From a0cfa4f118023d35b767a999d5a2ac4b082857b4 Mon Sep 17 00:00:00 2001 From: Samuel Mimram Date: Fri, 25 Jul 2008 15:12:53 +0200 Subject: Imported Upstream version 8.2~beta3+dfsg --- .depend | 4067 - .depend.camlp4 | 54 - .depend.coq | 390 - CHANGES | 445 +- COMPATIBILITY | 98 +- COPYRIGHT | 7 + CREDITS | 55 +- INSTALL | 49 +- INSTALL.ide | 70 +- INSTALL.macosx | 14 +- Makefile | 1843 +- Makefile.build | 995 + Makefile.common | 890 + Makefile.dep | 15 - Makefile.doc | 240 + Makefile.stage1 | 33 + Makefile.stage2 | 20 + Makefile.stage3 | 21 + README | 10 +- README.win | 2 +- checker/.depend | 58 + checker/Makefile | 88 + checker/check.ml | 376 + checker/check_stat.ml | 69 + checker/check_stat.mli | 12 + checker/checker.ml | 376 + checker/closure.ml | 1047 + checker/closure.mli | 198 + checker/declarations.ml | 658 + checker/declarations.mli | 212 + checker/environ.ml | 206 + checker/environ.mli | 67 + checker/indtypes.ml | 527 + checker/indtypes.mli | 42 + checker/inductive.ml | 913 + checker/inductive.mli | 85 + checker/main.ml | 2 + checker/mod_checking.ml | 398 + checker/modops.ml | 347 + checker/modops.mli | 70 + checker/reduction.ml | 436 + checker/reduction.mli | 54 + checker/safe_typing.ml | 137 + checker/safe_typing.mli | 27 + checker/subtyping.ml | 388 + checker/subtyping.mli | 21 + checker/term.ml | 462 + checker/term.mli | 111 + checker/type_errors.ml | 115 + checker/type_errors.mli | 105 + checker/typeops.ml | 456 + checker/typeops.mli | 28 + checker/validate.ml | 265 + config/Makefile.template | 16 +- config/coq_config.mli | 2 +- configure | 288 +- contrib/cc/ccalgo.ml | 307 +- contrib/cc/ccalgo.mli | 19 +- contrib/cc/ccproof.ml | 2 +- contrib/cc/ccproof.mli | 2 +- contrib/cc/cctac.ml | 145 +- contrib/cc/cctac.mli | 4 +- contrib/cc/g_congruence.ml4 | 10 +- contrib/correctness/ProgramsExtraction.v | 4 +- contrib/correctness/past.mli | 97 - contrib/correctness/pcic.ml | 231 - contrib/correctness/pcic.mli | 24 - contrib/correctness/pcicenv.ml | 118 - contrib/correctness/pcicenv.mli | 38 - contrib/correctness/pdb.ml | 165 - contrib/correctness/pdb.mli | 25 - contrib/correctness/peffect.ml | 159 - contrib/correctness/peffect.mli | 42 - contrib/correctness/penv.ml | 240 - contrib/correctness/penv.mli | 87 - contrib/correctness/perror.ml | 172 - contrib/correctness/perror.mli | 47 - contrib/correctness/pextract.ml | 473 - contrib/correctness/pextract.mli | 17 - contrib/correctness/pmisc.ml | 222 - contrib/correctness/pmisc.mli | 81 - contrib/correctness/pmlize.ml | 320 - contrib/correctness/pmlize.mli | 20 - contrib/correctness/pmonad.ml | 665 - contrib/correctness/pmonad.mli | 106 - contrib/correctness/pred.ml | 115 - contrib/correctness/pred.mli | 26 - contrib/correctness/prename.ml | 139 - contrib/correctness/prename.mli | 57 - contrib/correctness/psyntax.ml4 | 1058 - contrib/correctness/psyntax.mli | 25 - contrib/correctness/ptactic.ml | 258 - contrib/correctness/ptactic.mli | 22 - contrib/correctness/ptype.mli | 73 - contrib/correctness/ptyping.ml | 600 - contrib/correctness/ptyping.mli | 36 - contrib/correctness/putil.ml | 303 - contrib/correctness/putil.mli | 72 - contrib/correctness/pwp.ml | 347 - contrib/correctness/pwp.mli | 18 - contrib/dp/Dp.v | 120 + contrib/dp/TODO | 4 - contrib/dp/dp.ml | 316 +- contrib/dp/dp.mli | 8 + contrib/dp/dp_cvcl.ml | 112 - contrib/dp/dp_cvcl.mli | 4 - contrib/dp/dp_gappa.ml | 445 + contrib/dp/dp_simplify.ml | 117 - contrib/dp/dp_simplify.mli | 4 - contrib/dp/dp_sorts.ml | 51 - contrib/dp/dp_sorts.mli | 4 - contrib/dp/dp_why.ml | 12 + contrib/dp/dp_why.mli | 17 + contrib/dp/dp_zenon.ml | 103 - contrib/dp/dp_zenon.mli | 5 +- contrib/dp/dp_zenon.mll | 181 + contrib/dp/fol.mli | 9 +- contrib/dp/g_dp.ml4 | 43 +- contrib/dp/test2.v | 8 +- contrib/dp/test_gappa.v | 91 + contrib/dp/tests.v | 116 +- contrib/dp/zenon.v | 94 + contrib/extraction/CHANGES | 4 +- contrib/extraction/common.ml | 759 +- contrib/extraction/common.mli | 50 +- contrib/extraction/extract_env.ml | 453 +- contrib/extraction/extract_env.mli | 13 +- contrib/extraction/extraction.ml | 63 +- contrib/extraction/extraction.mli | 14 +- contrib/extraction/g_extraction.ml4 | 7 +- contrib/extraction/haskell.ml | 134 +- contrib/extraction/haskell.mli | 12 +- contrib/extraction/miniml.mli | 66 +- contrib/extraction/mlutil.ml | 79 +- contrib/extraction/modutil.ml | 209 +- contrib/extraction/modutil.mli | 36 +- contrib/extraction/ocaml.ml | 704 +- contrib/extraction/ocaml.mli | 46 +- contrib/extraction/scheme.ml | 75 +- contrib/extraction/scheme.mli | 20 +- contrib/extraction/table.ml | 173 +- contrib/extraction/table.mli | 36 +- contrib/extraction/test/.depend | 1136 - contrib/extraction/test/Makefile | 109 - contrib/extraction/test/Makefile.haskell | 416 - contrib/extraction/test/addReals | 21 - contrib/extraction/test/custom/Adalloc | 2 - contrib/extraction/test/custom/Euclid | 1 - contrib/extraction/test/custom/List | 1 - contrib/extraction/test/custom/ListSet | 1 - contrib/extraction/test/custom/Lsort | 2 - contrib/extraction/test/custom/Map | 3 - contrib/extraction/test/custom/Mapcard | 4 - contrib/extraction/test/custom/Mapiter | 2 - contrib/extraction/test/custom/R_Ifp | 2 - contrib/extraction/test/custom/R_sqr | 2 - contrib/extraction/test/custom/Ranalysis | 2 - contrib/extraction/test/custom/Raxioms | 2 - contrib/extraction/test/custom/Rbase | 2 - contrib/extraction/test/custom/Rbasic_fun | 2 - contrib/extraction/test/custom/Rdefinitions | 2 - contrib/extraction/test/custom/Reals.v | 17 - contrib/extraction/test/custom/Rfunctions | 2 - contrib/extraction/test/custom/Rgeom | 2 - contrib/extraction/test/custom/Rlimit | 2 - contrib/extraction/test/custom/Rseries | 2 - contrib/extraction/test/custom/Rsigma | 2 - contrib/extraction/test/custom/Rtrigo | 2 - contrib/extraction/test/custom/ZArith_dec | 1 - contrib/extraction/test/custom/fast_integer | 1 - contrib/extraction/test/e | 17 - contrib/extraction/test/extract | 12 - contrib/extraction/test/extract.haskell | 12 - contrib/extraction/test/hs2v.ml | 14 - contrib/extraction/test/make_mli | 17 - contrib/extraction/test/ml2v.ml | 14 - contrib/extraction/test/v2hs.ml | 9 - contrib/extraction/test/v2ml.ml | 9 - contrib/field/field.ml4 | 4 +- contrib/first-order/formula.ml | 270 - contrib/first-order/formula.mli | 77 - contrib/first-order/g_ground.ml4 | 127 - contrib/first-order/ground.ml | 152 - contrib/first-order/ground.mli | 13 - contrib/first-order/instances.ml | 206 - contrib/first-order/instances.mli | 26 - contrib/first-order/rules.ml | 216 - contrib/first-order/rules.mli | 54 - contrib/first-order/sequent.ml | 303 - contrib/first-order/sequent.mli | 66 - contrib/first-order/unify.ml | 143 - contrib/first-order/unify.mli | 23 - contrib/firstorder/formula.ml | 270 + contrib/firstorder/formula.mli | 77 + contrib/firstorder/g_ground.ml4 | 128 + contrib/firstorder/ground.ml | 152 + contrib/firstorder/ground.mli | 13 + contrib/firstorder/instances.ml | 206 + contrib/firstorder/instances.mli | 26 + contrib/firstorder/rules.ml | 216 + contrib/firstorder/rules.mli | 54 + contrib/firstorder/sequent.ml | 303 + contrib/firstorder/sequent.mli | 66 + contrib/firstorder/unify.ml | 143 + contrib/firstorder/unify.mli | 23 + contrib/fourier/Fourier_util.v | 4 +- contrib/fourier/fourierR.ml | 21 +- contrib/funind/Recdef.v | 48 + contrib/funind/functional_principles_proofs.ml | 88 +- contrib/funind/functional_principles_types.ml | 25 +- contrib/funind/g_indfun.ml4 | 485 + contrib/funind/indfun.ml | 114 +- contrib/funind/indfun_common.ml | 57 +- contrib/funind/indfun_main.ml4 | 470 - contrib/funind/invfun.ml | 76 +- contrib/funind/merge.ml | 514 +- contrib/funind/rawterm_to_relation.ml | 41 +- contrib/funind/rawtermops.ml | 142 +- contrib/funind/rawtermops.mli | 8 +- contrib/funind/recdef.ml | 1430 + contrib/funind/tacinv.ml4 | 872 - contrib/funind/tacinvutils.ml | 284 - contrib/funind/tacinvutils.mli | 80 - contrib/interface/COPYRIGHT | 6 +- contrib/interface/ascent.mli | 9 +- contrib/interface/blast.ml | 59 +- contrib/interface/centaur.ml4 | 408 +- contrib/interface/debug_tac.ml4 | 10 +- contrib/interface/depends.ml | 454 + contrib/interface/name_to_ast.ml | 12 +- contrib/interface/name_to_ast.mli | 4 + contrib/interface/parse.ml | 27 +- contrib/interface/pbp.ml | 16 +- contrib/interface/showproof.ml | 23 +- contrib/interface/translate.ml | 3 + contrib/interface/translate.mli | 1 + contrib/interface/vtp.ml | 1575 +- contrib/interface/vtp.mli | 27 +- contrib/interface/xlate.ml | 337 +- contrib/interface/xlate.mli | 1 - contrib/jprover/jall.ml | 103 +- contrib/jprover/jprover.ml4 | 2 +- contrib/micromega/CheckerMaker.v | 129 + contrib/micromega/Env.v | 182 + contrib/micromega/EnvRing.v | 1403 + contrib/micromega/LICENSE.sos | 29 + contrib/micromega/MExtraction.v | 23 + contrib/micromega/Micromegatac.v | 79 + contrib/micromega/OrderedRing.v | 458 + contrib/micromega/QMicromega.v | 259 + contrib/micromega/RMicromega.v | 148 + contrib/micromega/Refl.v | 129 + contrib/micromega/RingMicromega.v | 779 + contrib/micromega/Tauto.v | 324 + contrib/micromega/VarMap.v | 258 + contrib/micromega/ZCoeff.v | 173 + contrib/micromega/ZMicromega.v | 714 + contrib/micromega/certificate.ml | 618 + contrib/micromega/coq_micromega.ml | 1290 + contrib/micromega/csdpcert.ml | 333 + contrib/micromega/g_micromega.ml4 | 59 + contrib/micromega/mfourier.ml | 667 + contrib/micromega/micromega.ml | 1512 + contrib/micromega/micromega.mli | 398 + contrib/micromega/mutils.ml | 305 + contrib/micromega/sos.ml | 1919 + contrib/micromega/sos.mli | 66 + contrib/micromega/vector.ml | 674 + contrib/omega/Omega.v | 5 +- contrib/omega/PreOmega.v | 445 + contrib/omega/coq_omega.ml | 10 +- contrib/omega/g_omega.ml4 | 27 +- contrib/recdef/Recdef.v | 48 - contrib/recdef/recdef.ml4 | 1324 - contrib/ring/LegacyRing.v | 2 +- contrib/ring/LegacyRing_theory.v | 6 +- contrib/ring/Ring_abstract.v | 4 +- contrib/ring/Ring_normalize.v | 6 +- contrib/ring/Setoid_ring_normalize.v | 4 +- contrib/ring/Setoid_ring_theory.v | 8 +- contrib/ring/quote.ml | 9 +- contrib/ring/ring.ml | 20 +- contrib/romega/ROmega.v | 5 +- contrib/romega/ReflOmegaCore.v | 2353 +- contrib/romega/const_omega.ml | 260 +- contrib/romega/const_omega.mli | 176 + contrib/romega/g_romega.ml4 | 31 +- contrib/romega/refl_omega.ml | 285 +- contrib/rtauto/Bintree.v | 15 +- contrib/rtauto/refl_tauto.ml | 4 +- contrib/setoid_ring/ArithRing.v | 2 +- contrib/setoid_ring/Field_tac.v | 185 +- contrib/setoid_ring/Field_theory.v | 176 +- contrib/setoid_ring/InitialRing.v | 224 +- contrib/setoid_ring/NArithRing.v | 2 +- contrib/setoid_ring/RealField.v | 1 + contrib/setoid_ring/Ring.v | 2 +- contrib/setoid_ring/Ring_polynom.v | 257 +- contrib/setoid_ring/Ring_tac.v | 152 +- contrib/setoid_ring/Ring_theory.v | 21 +- contrib/setoid_ring/ZArithRing.v | 16 +- contrib/setoid_ring/newring.ml4 | 251 +- contrib/subtac/FixSub.v | 147 - contrib/subtac/FunctionalExtensionality.v | 47 - contrib/subtac/Heq.v | 34 - contrib/subtac/Subtac.v | 2 - contrib/subtac/SubtacTactics.v | 158 - contrib/subtac/Utils.v | 65 - contrib/subtac/eterm.ml | 65 +- contrib/subtac/eterm.mli | 15 +- contrib/subtac/g_subtac.ml4 | 50 +- contrib/subtac/subtac.ml | 266 +- contrib/subtac/subtac_cases.ml | 370 +- contrib/subtac/subtac_cases.mli | 2 +- contrib/subtac/subtac_classes.ml | 210 + contrib/subtac/subtac_classes.mli | 42 + contrib/subtac/subtac_coercion.ml | 234 +- contrib/subtac/subtac_command.ml | 389 +- contrib/subtac/subtac_command.mli | 13 +- contrib/subtac/subtac_obligations.ml | 349 +- contrib/subtac/subtac_obligations.mli | 34 +- contrib/subtac/subtac_pretyping.ml | 51 +- contrib/subtac/subtac_pretyping.mli | 14 +- contrib/subtac/subtac_pretyping_F.ml | 132 +- contrib/subtac/subtac_utils.ml | 85 +- contrib/subtac/subtac_utils.mli | 14 +- contrib/subtac/test/ListDep.v | 8 +- contrib/subtac/test/Mutind.v | 17 +- contrib/subtac/test/euclid.v | 11 +- contrib/subtac/test/measure.v | 10 +- contrib/subtac/test/take.v | 38 + contrib/xml/cic2acic.ml | 28 +- contrib/xml/doubleTypeInference.ml | 2 +- contrib/xml/dumptree.ml4 | 152 + contrib/xml/xmlcommand.ml | 41 +- dev/base_include | 12 +- dev/db | 4 + dev/doc/build-system.dev.txt | 70 + dev/doc/build-system.txt | 299 + dev/doc/changes.txt | 33 + dev/doc/header | 7 - dev/doc/notes-on-conversion | 73 + dev/doc/perf-analysis | 80 +- dev/header | 7 + dev/include | 9 + dev/ocamldebug-coq.template | 9 +- dev/ocamlweb-doc/Makefile | 21 +- dev/ocamlweb-doc/interp.dep.ps | 672 +- dev/ocamlweb-doc/kernel.dep.ps | 2343 +- dev/ocamlweb-doc/library.dep.ps | 1155 +- dev/ocamlweb-doc/proofs.dep.ps | 857 +- dev/set_raw_db | 1 + dev/top_printers.ml | 73 +- dev/v8-syntax/syntax-v8.tex | 2 +- doc/Makefile | 307 - doc/stdlib/Library.tex | 10 +- doc/stdlib/index-list.html.template | 387 +- doc/stdlib/make-library-files | 2 +- doc/stdlib/make-library-index | 42 +- ide/command_windows.ml | 50 +- ide/command_windows.mli | 6 +- ide/coq.ml | 511 +- ide/coq.mli | 56 +- ide/coq.png | Bin 9101 -> 5821 bytes ide/coq_commands.ml | 11 +- ide/coqide.ml | 695 +- ide/highlight.mll | 141 +- ide/ideutils.ml | 121 +- ide/ideutils.mli | 8 +- ide/index_urls.txt | 563 - ide/preferences.ml | 121 +- ide/preferences.mli | 11 +- ide/utf8.v | 56 - ide/utils/config_file.ml | 4 +- ide/utils/configwin_ihm.ml | 12 +- ide/utils/uoptions.ml | 32 +- interp/constrextern.ml | 238 +- interp/constrextern.mli | 9 +- interp/constrintern.ml | 905 +- interp/constrintern.mli | 37 +- interp/coqlib.ml | 36 +- interp/coqlib.mli | 9 +- interp/genarg.ml | 26 +- interp/genarg.mli | 247 +- interp/implicit_quantifiers.ml | 285 + interp/implicit_quantifiers.mli | 68 + interp/modintern.ml | 63 +- interp/modintern.mli | 13 +- interp/notation.ml | 86 +- interp/notation.mli | 7 +- interp/reserve.ml | 20 +- interp/syntax_def.ml | 47 +- interp/syntax_def.mli | 22 +- interp/topconstr.ml | 269 +- interp/topconstr.mli | 74 +- kernel/byterun/coq_fix_code.c | 17 +- kernel/byterun/coq_fix_code.h | 1 + kernel/byterun/coq_instruct.h | 13 +- kernel/byterun/coq_interp.c | 354 +- kernel/byterun/int64_emul.h | 272 + kernel/byterun/int64_native.h | 50 + kernel/cbytecodes.ml | 102 + kernel/cbytecodes.mli | 73 + kernel/cbytegen.ml | 339 +- kernel/cbytegen.mli | 25 +- kernel/cemitcodes.ml | 31 +- kernel/closure.ml | 149 +- kernel/closure.mli | 9 +- kernel/conv_oracle.ml | 78 +- kernel/conv_oracle.mli | 31 +- kernel/cooking.ml | 10 +- kernel/cooking.mli | 5 +- kernel/csymtable.ml | 39 +- kernel/declarations.ml | 74 +- kernel/declarations.mli | 80 +- kernel/entries.ml | 31 +- kernel/entries.mli | 31 +- kernel/environ.ml | 357 +- kernel/environ.mli | 45 +- kernel/indtypes.ml | 297 +- kernel/indtypes.mli | 6 +- kernel/inductive.ml | 52 +- kernel/inductive.mli | 2 +- kernel/mod_subst.ml | 306 +- kernel/mod_subst.mli | 16 +- kernel/mod_typing.ml | 552 +- kernel/mod_typing.mli | 13 +- kernel/modops.ml | 529 +- kernel/modops.mli | 53 +- kernel/names.ml | 28 +- kernel/names.mli | 15 +- kernel/pre_env.ml | 75 +- kernel/pre_env.mli | 41 +- kernel/reduction.ml | 145 +- kernel/reduction.mli | 11 +- kernel/retroknowledge.ml | 279 + kernel/retroknowledge.mli | 154 + kernel/safe_typing.ml | 584 +- kernel/safe_typing.mli | 28 +- kernel/sign.ml | 16 +- kernel/subtyping.ml | 282 +- kernel/subtyping.mli | 2 +- kernel/term.ml | 38 +- kernel/term.mli | 38 +- kernel/term_typing.ml | 18 +- kernel/term_typing.mli | 6 +- kernel/type_errors.ml | 8 +- kernel/type_errors.mli | 6 +- kernel/typeops.ml | 18 +- kernel/typeops.mli | 5 +- kernel/univ.ml | 121 +- kernel/univ.mli | 26 +- kernel/vm.ml | 10 + lib/bigint.ml | 25 +- lib/bigint.mli | 4 +- lib/bstack.ml | 18 +- lib/bstack.mli | 3 +- lib/compat.ml4 | 10 +- lib/edit.ml | 13 +- lib/flags.ml | 132 + lib/flags.mli | 77 + lib/gmap.ml | 4 +- lib/gmap.mli | 3 +- lib/gset.mli | 4 +- lib/option.ml | 165 + lib/option.mli | 112 + lib/options.ml | 124 - lib/options.mli | 71 - lib/pp.ml4 | 116 +- lib/pp.mli | 10 +- lib/pp_control.ml | 9 +- lib/pp_control.mli | 6 +- lib/rtree.ml | 168 +- lib/rtree.mli | 61 +- lib/system.ml | 32 +- lib/system.mli | 2 +- lib/util.ml | 540 +- lib/util.mli | 69 +- library/decl_kinds.ml | 29 +- library/decl_kinds.mli | 84 + library/declare.ml | 191 +- library/declare.mli | 24 +- library/declaremods.ml | 734 +- library/declaremods.mli | 29 +- library/decls.ml | 76 + library/decls.mli | 47 + library/dischargedhypsmap.ml | 2 +- library/global.ml | 12 +- library/global.mli | 18 +- library/goptions.ml | 6 +- library/goptions.mli | 3 +- library/heads.ml | 190 + library/heads.mli | 28 + library/impargs.ml | 375 +- library/impargs.mli | 33 +- library/lib.ml | 233 +- library/lib.mli | 22 +- library/libnames.ml | 3 +- library/libnames.mli | 2 +- library/libobject.ml | 21 +- library/libobject.mli | 16 +- library/library.ml | 88 +- library/nameops.ml | 2 +- library/nameops.mli | 2 +- library/nametab.ml | 31 +- library/nametab.mli | 12 +- parsing/argextend.ml4 | 4 +- parsing/egrammar.ml | 37 +- parsing/egrammar.mli | 2 +- parsing/g_ascii_syntax.ml | 4 +- parsing/g_constr.ml4 | 234 +- parsing/g_decl_mode.ml4 | 6 +- parsing/g_intsyntax.ml | 342 + parsing/g_intsyntax.mli | 13 + parsing/g_ltac.ml4 | 95 +- parsing/g_minicoq.ml4 | 4 +- parsing/g_natsyntax.ml | 13 +- parsing/g_natsyntax.mli | 6 +- parsing/g_prim.ml4 | 12 +- parsing/g_proofs.ml4 | 9 +- parsing/g_rsyntax.ml | 2 + parsing/g_string_syntax.ml | 2 + parsing/g_tactic.ml4 | 353 +- parsing/g_vernac.ml4 | 311 +- parsing/g_xml.ml4 | 10 +- parsing/g_zsyntax.ml | 2 +- parsing/lexer.ml4 | 172 +- parsing/pcoq.ml4 | 144 +- parsing/pcoq.mli | 75 +- parsing/ppconstr.ml | 261 +- parsing/ppconstr.mli | 14 +- parsing/ppdecl_proof.ml | 7 +- parsing/pptactic.ml | 248 +- parsing/pptactic.mli | 19 +- parsing/ppvernac.ml | 236 +- parsing/prettyp.ml | 418 +- parsing/prettyp.mli | 29 +- parsing/printer.ml | 157 +- parsing/printer.mli | 32 +- parsing/printmod.ml | 108 +- parsing/printmod.mli | 2 +- parsing/q_constr.ml4 | 10 +- parsing/q_coqast.ml4 | 143 +- parsing/q_util.ml4 | 4 +- parsing/search.ml | 13 +- parsing/tacextend.ml4 | 6 +- parsing/tactic_printer.ml | 67 +- parsing/tactic_printer.mli | 3 +- parsing/vernacextend.ml4 | 6 +- pretyping/cases.ml | 1298 +- pretyping/cases.mli | 21 +- pretyping/classops.ml | 18 +- pretyping/classops.mli | 5 +- pretyping/clenv.ml | 450 +- pretyping/clenv.mli | 52 +- pretyping/coercion.ml | 181 +- pretyping/coercion.mli | 5 +- pretyping/detyping.ml | 139 +- pretyping/detyping.mli | 8 +- pretyping/evarconv.ml | 365 +- pretyping/evarutil.ml | 1211 +- pretyping/evarutil.mli | 45 +- pretyping/evd.ml | 269 +- pretyping/evd.mli | 102 +- pretyping/indrec.ml | 152 +- pretyping/indrec.mli | 4 +- pretyping/inductiveops.ml | 48 +- pretyping/inductiveops.mli | 8 +- pretyping/matching.ml | 7 +- pretyping/pattern.ml | 20 +- pretyping/pretype_errors.ml | 28 +- pretyping/pretype_errors.mli | 18 +- pretyping/pretyping.ml | 421 +- pretyping/pretyping.mli | 9 +- pretyping/rawterm.ml | 66 +- pretyping/rawterm.mli | 32 +- pretyping/recordops.ml | 53 +- pretyping/recordops.mli | 17 +- pretyping/reductionops.ml | 144 +- pretyping/reductionops.mli | 16 +- pretyping/retyping.ml | 30 +- pretyping/tacred.ml | 524 +- pretyping/tacred.mli | 26 +- pretyping/termops.ml | 232 +- pretyping/termops.mli | 71 +- pretyping/typeclasses.ml | 457 + pretyping/typeclasses.mli | 105 + pretyping/typeclasses_errors.ml | 55 + pretyping/typeclasses_errors.mli | 44 + pretyping/typing.ml | 18 +- pretyping/unification.ml | 583 +- pretyping/unification.mli | 26 +- pretyping/vnorm.ml | 39 +- proofs/clenvtac.ml | 48 +- proofs/clenvtac.mli | 15 +- proofs/decl_expr.mli | 3 +- proofs/decl_mode.ml | 26 +- proofs/decl_mode.mli | 22 +- proofs/evar_refiner.ml | 22 +- proofs/logic.ml | 40 +- proofs/logic.mli | 5 +- proofs/pfedit.ml | 16 +- proofs/pfedit.mli | 17 +- proofs/proof_trees.ml | 3 +- proofs/proof_type.ml | 8 +- proofs/proof_type.mli | 8 +- proofs/redexpr.ml | 103 +- proofs/redexpr.mli | 16 +- proofs/refiner.ml | 124 +- proofs/refiner.mli | 24 +- proofs/tacexpr.ml | 135 +- proofs/tacmach.ml | 21 +- proofs/tacmach.mli | 11 +- proofs/tactic_debug.ml | 2 + scripts/coqc.ml | 6 +- scripts/coqmktop.ml | 43 +- tactics/auto.ml | 312 +- tactics/auto.mli | 43 +- tactics/autorewrite.ml | 34 +- tactics/class_tactics.ml4 | 1692 + tactics/contradiction.ml | 6 +- tactics/contradiction.mli | 5 +- tactics/decl_interp.ml | 44 +- tactics/decl_interp.mli | 2 +- tactics/decl_proof_instr.ml | 995 +- tactics/decl_proof_instr.mli | 87 +- tactics/dhyp.ml | 12 +- tactics/eauto.ml4 | 301 +- tactics/eauto.mli | 12 +- tactics/elim.ml | 10 +- tactics/eqdecide.ml4 | 6 +- tactics/equality.ml | 406 +- tactics/equality.mli | 50 +- tactics/evar_tactics.ml | 24 +- tactics/extraargs.ml4 | 182 +- tactics/extraargs.mli | 26 +- tactics/extratactics.ml4 | 283 +- tactics/extratactics.mli | 15 +- tactics/hiddentac.ml | 115 +- tactics/hiddentac.mli | 47 +- tactics/inv.ml | 41 +- tactics/leminv.ml | 6 +- tactics/nbtermdn.ml | 8 +- tactics/refine.ml | 64 +- tactics/setoid_replace.ml | 344 +- tactics/setoid_replace.mli | 12 +- tactics/tacinterp.ml | 1181 +- tactics/tacinterp.mli | 33 +- tactics/tacticals.ml | 89 +- tactics/tacticals.mli | 14 +- tactics/tactics.ml | 1052 +- tactics/tactics.mli | 120 +- tactics/tauto.ml4 | 6 +- test-suite/bugs/closed/1519.v | 23 + test-suite/bugs/closed/1780.v | 12 + test-suite/bugs/closed/1787.v | 11 + test-suite/bugs/closed/shouldfail/1703.v | 7 + test-suite/bugs/closed/shouldsucceed/1041.v | 13 + test-suite/bugs/closed/shouldsucceed/1100.v | 12 + test-suite/bugs/closed/shouldsucceed/121.v | 17 + test-suite/bugs/closed/shouldsucceed/1243.v | 12 + test-suite/bugs/closed/shouldsucceed/1302.v | 22 + test-suite/bugs/closed/shouldsucceed/1322.v | 24 + test-suite/bugs/closed/shouldsucceed/1411.v | 35 + test-suite/bugs/closed/shouldsucceed/1414.v | 41 + test-suite/bugs/closed/shouldsucceed/1419.v | 8 + test-suite/bugs/closed/shouldsucceed/1425.v | 19 + test-suite/bugs/closed/shouldsucceed/1446.v | 20 + test-suite/bugs/closed/shouldsucceed/1448.v | 28 + test-suite/bugs/closed/shouldsucceed/1477.v | 18 + test-suite/bugs/closed/shouldsucceed/1483.v | 10 + test-suite/bugs/closed/shouldsucceed/1507.v | 121 + test-suite/bugs/closed/shouldsucceed/1519.v | 14 + test-suite/bugs/closed/shouldsucceed/1568.v | 13 + test-suite/bugs/closed/shouldsucceed/1576.v | 38 + test-suite/bugs/closed/shouldsucceed/1582.v | 15 + test-suite/bugs/closed/shouldsucceed/1604.v | 7 + test-suite/bugs/closed/shouldsucceed/1614.v | 21 + test-suite/bugs/closed/shouldsucceed/1618.v | 23 + test-suite/bugs/closed/shouldsucceed/1634.v | 24 + test-suite/bugs/closed/shouldsucceed/1643.v | 21 + test-suite/bugs/closed/shouldsucceed/1680.v | 9 + test-suite/bugs/closed/shouldsucceed/1683.v | 42 + test-suite/bugs/closed/shouldsucceed/1696.v | 16 + test-suite/bugs/closed/shouldsucceed/1704.v | 17 + test-suite/bugs/closed/shouldsucceed/1718.v | 9 + test-suite/bugs/closed/shouldsucceed/1738.v | 30 + test-suite/bugs/closed/shouldsucceed/1740.v | 23 + test-suite/bugs/closed/shouldsucceed/1754.v | 24 + test-suite/bugs/closed/shouldsucceed/1773.v | 9 + test-suite/bugs/closed/shouldsucceed/1774.v | 18 + test-suite/bugs/closed/shouldsucceed/1775.v | 39 + test-suite/bugs/closed/shouldsucceed/1776.v | 22 + test-suite/bugs/closed/shouldsucceed/1779.v | 25 + test-suite/bugs/closed/shouldsucceed/1784.v | 101 + test-suite/bugs/closed/shouldsucceed/1844.v | 217 + test-suite/bugs/closed/shouldsucceed/1865.v | 18 + test-suite/bugs/closed/shouldsucceed/348.v | 13 + test-suite/bugs/closed/shouldsucceed/38.v | 22 + test-suite/bugs/closed/shouldsucceed/545.v | 5 + test-suite/bugs/closed/shouldsucceed/846.v | 213 + test-suite/bugs/closed/shouldsucceed/931.v | 7 + test-suite/bugs/opened/1773.v | 10 + .../bugs/opened/shouldnotfail/1338.v-disabled | 12 + test-suite/bugs/opened/shouldnotfail/1416.v | 27 + test-suite/bugs/opened/shouldnotfail/1501.v | 93 + test-suite/bugs/opened/shouldnotfail/1596.v | 242 + test-suite/bugs/opened/shouldnotfail/1811.v | 9 + test-suite/bugs/opened/shouldnotfail/743.v | 12 + test-suite/check | 98 +- test-suite/complexity/injection.v | 113 + test-suite/complexity/ring.v | 7 + test-suite/complexity/ring2.v | 51 + test-suite/csdp.cache | 106548 ++++++++++++++++++ test-suite/failure/circular_subtyping1.v | 7 + test-suite/failure/circular_subtyping2.v | 8 + test-suite/failure/fixpoint2.v | 6 + test-suite/failure/guard.v | 10 + test-suite/failure/rewrite_in_hyp2.v | 8 + test-suite/failure/subtyping.v | 21 + test-suite/failure/subtyping2.v | 245 + test-suite/failure/univ_include.v | 30 + test-suite/ide/undo.v | 79 + test-suite/ideal-features/Case9.v | 12 + test-suite/ideal-features/complexity/evars_subst.v | 53 + test-suite/ideal-features/evars_subst.v | 53 + test-suite/ideal-features/universes.v | 43 + test-suite/micromega/bertot.v | 22 + test-suite/micromega/example.v | 347 + test-suite/micromega/heap3_vcgen_25.v | 38 + test-suite/micromega/qexample.v | 62 + test-suite/micromega/rexample.v | 62 + test-suite/micromega/square.v | 61 + test-suite/micromega/zomicron.v | 27 + test-suite/modules/pseudo_circular_with.v | 6 + test-suite/modules/resolver.v | 37 + test-suite/modules/subtyping.v | 46 + test-suite/output/Cases.out | 21 + test-suite/output/Cases.v | 29 + test-suite/output/Fixpoint.out | 14 + test-suite/output/Fixpoint.v | 23 + test-suite/output/Implicit.out | 5 +- test-suite/output/Implicit.v | 19 + test-suite/output/InitSyntax.out | 3 +- test-suite/output/Nametab.out | 36 +- test-suite/output/Nametab.v | 22 +- test-suite/output/Notations.out | 4 + test-suite/output/Notations.v | 10 + test-suite/output/Tactics.out | 2 + test-suite/output/TranspModtype.out | 3 - test-suite/output/ZSyntax.out | 10 +- test-suite/output/reduction.out | 4 + test-suite/output/reduction.v | 13 + test-suite/success/AdvancedCanonicalStructure.v | 144 + test-suite/success/Case18.v | 12 + test-suite/success/Cases-bug1834.v | 13 + test-suite/success/Cases.v | 5 +- test-suite/success/CasesDep.v | 58 +- test-suite/success/Discriminate.v | 23 + test-suite/success/Fixpoint.v | 19 + test-suite/success/ImplicitArguments.v | 17 + test-suite/success/Injection.v | 27 +- test-suite/success/LetPat.v | 55 + test-suite/success/Notations.v | 16 +- test-suite/success/Omega.v | 14 +- test-suite/success/OmegaPre.v | 127 + test-suite/success/ROmega.v | 20 +- test-suite/success/ROmegaPre.v | 127 + test-suite/success/apply.v | 193 +- test-suite/success/cc.v | 9 + test-suite/success/change.v | 6 + test-suite/success/clear.v | 13 +- test-suite/success/conv_pbs.v | 223 + test-suite/success/decl_mode.v | 182 + test-suite/success/dependentind.v | 100 + test-suite/success/destruct.v | 32 + test-suite/success/evars.v | 136 + test-suite/success/extraction.v | 2 +- test-suite/success/fix.v | 59 +- test-suite/success/hyps_inclusion.v | 32 + test-suite/success/implicit.v | 10 + test-suite/success/ltac.v | 47 +- test-suite/success/options.v | 2 +- test-suite/success/parsing.v | 8 + test-suite/success/pattern.v | 7 + test-suite/success/refine.v | 30 + test-suite/success/rewrite.v | 21 + test-suite/success/setoid_test.v | 14 +- test-suite/success/setoid_test2.v | 4 + test-suite/success/setoid_test_function_space.v | 12 +- test-suite/success/specialize.v | 48 + test-suite/success/unification.v | 65 +- test-suite/success/univers.v | 4 + test-suite/typeclasses/NewSetoid.v | 74 + test-suite/typeclasses/clrewrite.v | 111 + test-suite/typeclasses/unification_delta.v | 46 + theories/Arith/Arith_base.v | 4 +- theories/Arith/Compare_dec.v | 6 +- theories/Arith/Div.v | 64 - theories/Arith/Div2.v | 6 +- theories/Arith/EqNat.v | 12 +- theories/Arith/Even.v | 4 +- theories/Arith/Max.v | 11 +- theories/Arith/Min.v | 19 +- theories/Arith/Minus.v | 53 +- theories/Arith/Mult.v | 41 +- theories/Arith/Peano_dec.v | 2 +- theories/Arith/Plus.v | 12 +- theories/Arith/Wf_nat.v | 76 +- theories/Bool/Bool.v | 84 +- theories/Bool/Bvector.v | 87 +- theories/Classes/EquivDec.v | 158 + theories/Classes/Equivalence.v | 144 + theories/Classes/Functions.v | 42 + theories/Classes/Init.v | 21 + theories/Classes/Morphisms.v | 467 + theories/Classes/Morphisms_Prop.v | 132 + theories/Classes/Morphisms_Relations.v | 50 + theories/Classes/RelationClasses.v | 400 + theories/Classes/SetoidAxioms.v | 35 + theories/Classes/SetoidClass.v | 181 + theories/Classes/SetoidDec.v | 126 + theories/Classes/SetoidTactics.v | 176 + theories/FSets/FMapAVL.v | 2791 +- theories/FSets/FMapFacts.v | 1170 +- theories/FSets/FMapFullAVL.v | 823 + theories/FSets/FMapIntMap.v | 622 - theories/FSets/FMapInterface.v | 233 +- theories/FSets/FMapList.v | 120 +- theories/FSets/FMapPositive.v | 102 +- theories/FSets/FMapWeak.v | 15 - theories/FSets/FMapWeakFacts.v | 599 - theories/FSets/FMapWeakInterface.v | 201 - theories/FSets/FMapWeakList.v | 127 +- theories/FSets/FMaps.v | 14 +- theories/FSets/FSetAVL.v | 3365 +- theories/FSets/FSetBridge.v | 104 +- theories/FSets/FSetDecide.v | 841 + theories/FSets/FSetEqProperties.v | 167 +- theories/FSets/FSetFacts.v | 120 +- theories/FSets/FSetFullAVL.v | 1125 + theories/FSets/FSetInterface.v | 265 +- theories/FSets/FSetList.v | 36 +- theories/FSets/FSetProperties.v | 806 +- theories/FSets/FSetToFiniteSet.v | 46 +- theories/FSets/FSetWeak.v | 16 - theories/FSets/FSetWeakFacts.v | 421 - theories/FSets/FSetWeakInterface.v | 251 - theories/FSets/FSetWeakList.v | 114 +- theories/FSets/FSetWeakProperties.v | 896 - theories/FSets/FSets.v | 8 +- theories/FSets/OrderedType.v | 36 +- theories/FSets/OrderedTypeAlt.v | 24 +- theories/FSets/OrderedTypeEx.v | 27 +- theories/Init/Datatypes.v | 60 +- theories/Init/Logic.v | 135 +- theories/Init/Logic_Type.v | 8 +- theories/Init/Notations.v | 11 +- theories/Init/Peano.v | 24 +- theories/Init/Prelude.v | 6 +- theories/Init/Specif.v | 21 +- theories/Init/Tactics.v | 154 +- theories/Init/Wf.v | 69 +- theories/IntMap/.depend | 48 - theories/IntMap/Adalloc.v | 94 - theories/IntMap/Allmaps.v | 21 - theories/IntMap/Fset.v | 371 - theories/IntMap/Lsort.v | 413 - theories/IntMap/Map.v | 869 - theories/IntMap/Mapaxioms.v | 761 - theories/IntMap/Mapc.v | 539 - theories/IntMap/Mapcanon.v | 401 - theories/IntMap/Mapcard.v | 764 - theories/IntMap/Mapfold.v | 425 - theories/IntMap/Mapiter.v | 618 - theories/IntMap/Maplists.v | 438 - theories/IntMap/Mapsubset.v | 605 - theories/IntMap/intro.tex | 6 - theories/Lists/List.v | 115 +- theories/Lists/ListSet.v | 10 +- theories/Lists/ListTactics.v | 2 +- theories/Lists/SetoidList.v | 497 +- theories/Lists/StreamMemo.v | 205 + theories/Lists/Streams.v | 84 +- theories/Logic/ChoiceFacts.v | 264 +- theories/Logic/ClassicalChoice.v | 12 +- theories/Logic/ClassicalDescription.v | 13 +- theories/Logic/ClassicalEpsilon.v | 8 +- theories/Logic/ClassicalFacts.v | 35 +- theories/Logic/ClassicalUniqueChoice.v | 8 +- theories/Logic/ConstructiveEpsilon.v | 32 +- theories/Logic/Decidable.v | 161 +- theories/Logic/DecidableType.v | 25 +- theories/Logic/DecidableTypeEx.v | 71 +- theories/Logic/Description.v | 21 + theories/Logic/Epsilon.v | 72 + theories/Logic/EqdepFacts.v | 23 +- theories/Logic/Eqdep_dec.v | 23 +- theories/Logic/IndefiniteDescription.v | 39 + theories/Logic/JMeq.v | 37 +- theories/Logic/SetIsType.v | 17 + theories/NArith/BinNat.v | 180 +- theories/NArith/BinPos.v | 1171 +- theories/NArith/NArith.v | 4 +- theories/NArith/Ndec.v | 182 +- theories/NArith/Ndigits.v | 9 +- theories/NArith/Ndist.v | 2 +- theories/NArith/Nnat.v | 205 +- theories/NArith/Pnat.v | 4 +- theories/Numbers/BigNumPrelude.v | 372 + theories/Numbers/Cyclic/Abstract/CyclicAxioms.v | 375 + theories/Numbers/Cyclic/Abstract/NZCyclic.v | 236 + theories/Numbers/Cyclic/DoubleCyclic/DoubleAdd.v | 318 + theories/Numbers/Cyclic/DoubleCyclic/DoubleBase.v | 446 + .../Numbers/Cyclic/DoubleCyclic/DoubleCyclic.v | 885 + theories/Numbers/Cyclic/DoubleCyclic/DoubleDiv.v | 1540 + theories/Numbers/Cyclic/DoubleCyclic/DoubleDivn1.v | 528 + theories/Numbers/Cyclic/DoubleCyclic/DoubleLift.v | 487 + theories/Numbers/Cyclic/DoubleCyclic/DoubleMul.v | 628 + theories/Numbers/Cyclic/DoubleCyclic/DoubleSqrt.v | 1389 + theories/Numbers/Cyclic/DoubleCyclic/DoubleSub.v | 357 + theories/Numbers/Cyclic/DoubleCyclic/DoubleType.v | 71 + theories/Numbers/Cyclic/Int31/Cyclic31.v | 2516 + theories/Numbers/Cyclic/Int31/Int31.v | 469 + theories/Numbers/Cyclic/ZModulo/ZModulo.v | 946 + theories/Numbers/Integer/Abstract/ZAdd.v | 345 + theories/Numbers/Integer/Abstract/ZAddOrder.v | 373 + theories/Numbers/Integer/Abstract/ZAxioms.v | 65 + theories/Numbers/Integer/Abstract/ZBase.v | 86 + theories/Numbers/Integer/Abstract/ZDomain.v | 69 + theories/Numbers/Integer/Abstract/ZLt.v | 432 + theories/Numbers/Integer/Abstract/ZMul.v | 115 + theories/Numbers/Integer/Abstract/ZMulOrder.v | 343 + theories/Numbers/Integer/BigZ/BigZ.v | 109 + theories/Numbers/Integer/BigZ/ZMake.v | 491 + theories/Numbers/Integer/Binary/ZBinary.v | 249 + theories/Numbers/Integer/NatPairs/ZNatPairs.v | 422 + theories/Numbers/Integer/SpecViaZ/ZSig.v | 117 + theories/Numbers/Integer/SpecViaZ/ZSigZAxioms.v | 306 + theories/Numbers/NaryFunctions.v | 142 + theories/Numbers/NatInt/NZAdd.v | 91 + theories/Numbers/NatInt/NZAddOrder.v | 166 + theories/Numbers/NatInt/NZAxioms.v | 99 + theories/Numbers/NatInt/NZBase.v | 84 + theories/Numbers/NatInt/NZMul.v | 80 + theories/Numbers/NatInt/NZMulOrder.v | 310 + theories/Numbers/NatInt/NZOrder.v | 666 + theories/Numbers/Natural/Abstract/NAdd.v | 156 + theories/Numbers/Natural/Abstract/NAddOrder.v | 114 + theories/Numbers/Natural/Abstract/NAxioms.v | 71 + theories/Numbers/Natural/Abstract/NBase.v | 288 + theories/Numbers/Natural/Abstract/NDefOps.v | 298 + theories/Numbers/Natural/Abstract/NIso.v | 122 + theories/Numbers/Natural/Abstract/NMul.v | 87 + theories/Numbers/Natural/Abstract/NMulOrder.v | 131 + theories/Numbers/Natural/Abstract/NOrder.v | 539 + theories/Numbers/Natural/Abstract/NStrongRec.v | 133 + theories/Numbers/Natural/Abstract/NSub.v | 180 + theories/Numbers/Natural/BigN/BigN.v | 83 + theories/Numbers/Natural/BigN/NMake_gen.ml | 3166 + theories/Numbers/Natural/BigN/Nbasic.v | 514 + theories/Numbers/Natural/Binary/NBinDefs.v | 267 + theories/Numbers/Natural/Binary/NBinary.v | 15 + theories/Numbers/Natural/Peano/NPeano.v | 220 + theories/Numbers/Natural/SpecViaZ/NSig.v | 115 + theories/Numbers/Natural/SpecViaZ/NSigNAxioms.v | 356 + theories/Numbers/NumPrelude.v | 267 + theories/Numbers/Rational/BigQ/BigQ.v | 35 + theories/Numbers/Rational/BigQ/Q0Make.v | 1412 + theories/Numbers/Rational/BigQ/QMake_base.v | 34 + theories/Numbers/Rational/BigQ/QbiMake.v | 1066 + theories/Numbers/Rational/BigQ/QifMake.v | 979 + theories/Numbers/Rational/BigQ/QpMake.v | 901 + theories/Numbers/Rational/BigQ/QvMake.v | 1151 + theories/Numbers/Rational/SpecViaQ/QSig.v | 84 + theories/Program/Basics.v | 57 + theories/Program/Combinators.v | 71 + theories/Program/Equality.v | 264 + theories/Program/FunctionalExtensionality.v | 109 + theories/Program/Program.v | 7 + theories/Program/Subset.v | 116 + theories/Program/Syntax.v | 59 + theories/Program/Tactics.v | 234 + theories/Program/Utils.v | 56 + theories/Program/Wf.v | 148 + theories/QArith/QArith.v | 2 +- theories/QArith/QArith_base.v | 183 +- theories/QArith/Qabs.v | 124 + theories/QArith/Qcanon.v | 38 +- theories/QArith/Qfield.v | 153 + theories/QArith/Qpower.v | 239 + theories/QArith/Qreals.v | 32 +- theories/QArith/Qreduction.v | 26 +- theories/QArith/Qring.v | 97 +- theories/QArith/Qround.v | 139 + theories/Reals/Alembert.v | 70 +- theories/Reals/AltSeries.v | 14 +- theories/Reals/ArithProp.v | 2 +- theories/Reals/Cos_plus.v | 6 +- theories/Reals/Cos_rel.v | 8 +- theories/Reals/DiscrR.v | 5 +- theories/Reals/Exp_prop.v | 20 +- theories/Reals/LegacyRfield.v | 2 +- theories/Reals/MVT.v | 11 +- theories/Reals/NewtonInt.v | 39 +- theories/Reals/PSeries_reg.v | 29 +- theories/Reals/PartSum.v | 12 +- theories/Reals/RIneq.v | 1117 +- theories/Reals/R_sqr.v | 5 +- theories/Reals/R_sqrt.v | 5 +- theories/Reals/Ranalysis.v | 5 +- theories/Reals/Ranalysis1.v | 53 +- theories/Reals/Ranalysis2.v | 5 +- theories/Reals/Ranalysis3.v | 13 +- theories/Reals/Ranalysis4.v | 21 +- theories/Reals/Raxioms.v | 6 +- theories/Reals/Rbasic_fun.v | 5 +- theories/Reals/Rcomplete.v | 6 +- theories/Reals/Rdefinitions.v | 26 +- theories/Reals/Rderiv.v | 5 +- theories/Reals/Rfunctions.v | 12 +- theories/Reals/Rgeom.v | 5 +- theories/Reals/RiemannInt.v | 131 +- theories/Reals/RiemannInt_SF.v | 36 +- theories/Reals/Rlimit.v | 9 +- theories/Reals/Rlogic.v | 293 + theories/Reals/Rpow_def.v | 10 + theories/Reals/Rpower.v | 58 +- theories/Reals/Rprod.v | 112 +- theories/Reals/Rseries.v | 6 +- theories/Reals/Rsigma.v | 2 +- theories/Reals/Rsqrt_def.v | 30 +- theories/Reals/Rtopology.v | 6 +- theories/Reals/Rtrigo.v | 2 +- theories/Reals/Rtrigo_alt.v | 6 +- theories/Reals/Rtrigo_def.v | 55 +- theories/Reals/Rtrigo_fun.v | 5 +- theories/Reals/Rtrigo_reg.v | 32 +- theories/Reals/SeqProp.v | 236 +- theories/Reals/SeqSeries.v | 20 +- theories/Reals/Sqrt_reg.v | 7 +- theories/Relations/Operators_Properties.v | 2 +- theories/Relations/Relation_Operators.v | 8 +- theories/Relations/Relations.v | 2 +- theories/Relations/Rstar.v | 4 +- theories/Setoids/Setoid.v | 676 +- theories/Setoids/Setoid_Prop.v | 79 + theories/Setoids/Setoid_tac.v | 595 + theories/Sets/Infinite_sets.v | 4 +- theories/Sets/Integers.v | 8 +- theories/Sets/Multiset.v | 6 +- theories/Sets/Permut.v | 4 +- theories/Sets/Powerset_Classical_facts.v | 2 +- theories/Sets/Relations_2_facts.v | 8 +- theories/Sorting/Heap.v | 44 +- theories/Sorting/PermutEq.v | 13 +- theories/Sorting/PermutSetoid.v | 19 +- theories/Sorting/Permutation.v | 9 +- theories/Sorting/Sorting.v | 25 +- theories/Strings/String.v | 6 +- theories/Unicode/Utf8.v | 60 + theories/Wellfounded/Disjoint_Union.v | 6 +- theories/Wellfounded/Inclusion.v | 6 +- theories/Wellfounded/Inverse_Image.v | 4 +- .../Wellfounded/Lexicographic_Exponentiation.v | 3 +- theories/Wellfounded/Lexicographic_Product.v | 2 +- theories/Wellfounded/Transitive_Closure.v | 2 +- theories/Wellfounded/Union.v | 6 +- theories/Wellfounded/Well_Ordering.v | 2 +- theories/ZArith/BinInt.v | 208 +- theories/ZArith/Int.v | 47 +- theories/ZArith/ZArith_dec.v | 2 +- theories/ZArith/ZOdiv.v | 953 + theories/ZArith/ZOdiv_def.v | 136 + theories/ZArith/Zabs.v | 129 +- theories/ZArith/Zbool.v | 16 +- theories/ZArith/Zcomplements.v | 8 +- theories/ZArith/Zdiv.v | 1068 +- theories/ZArith/Zeven.v | 130 +- theories/ZArith/Zgcd_alt.v | 317 + theories/ZArith/Zmax.v | 60 +- theories/ZArith/Zmin.v | 20 +- theories/ZArith/Zmisc.v | 29 +- theories/ZArith/Znat.v | 207 +- theories/ZArith/Znumtheory.v | 750 +- theories/ZArith/Zorder.v | 32 +- theories/ZArith/Zpow_facts.v | 465 + theories/ZArith/Zpower.v | 126 +- theories/ZArith/Zsqrt.v | 53 +- tools/coq-tex.ml4 | 2 +- tools/coq_makefile.ml4 | 439 +- tools/coqdep.ml | 396 +- tools/coqdep_lexer.mll | 4 +- tools/coqdoc/cdglobals.ml | 8 +- tools/coqdoc/coqdoc.sty | 126 +- tools/coqdoc/index.mli | 18 +- tools/coqdoc/index.mll | 145 +- tools/coqdoc/main.ml | 391 +- tools/coqdoc/output.ml | 193 +- tools/coqdoc/pretty.mll | 319 +- tools/coqwc.mll | 2 +- toplevel/auto_ind_decl.ml | 812 + toplevel/auto_ind_decl.mli | 27 + toplevel/cerrors.ml | 29 +- toplevel/class.ml | 52 +- toplevel/class.mli | 12 +- toplevel/classes.ml | 737 + toplevel/classes.mli | 103 + toplevel/command.ml | 884 +- toplevel/command.mli | 79 +- toplevel/coqinit.ml | 78 +- toplevel/coqtop.ml | 65 +- toplevel/discharge.ml | 4 +- toplevel/himsg.ml | 907 +- toplevel/himsg.mli | 5 +- toplevel/ind_tables.ml | 102 + toplevel/ind_tables.mli | 40 + toplevel/metasyntax.ml | 28 +- toplevel/metasyntax.mli | 4 +- toplevel/minicoq.ml | 4 +- toplevel/mltop.ml4 | 13 +- toplevel/record.ml | 55 +- toplevel/record.mli | 12 +- toplevel/toplevel.ml | 18 +- toplevel/vernac.ml | 29 +- toplevel/vernacentries.ml | 419 +- toplevel/vernacentries.mli | 9 +- toplevel/vernacexpr.ml | 65 +- toplevel/vernacinterp.ml | 4 +- toplevel/whelp.ml4 | 22 +- 1130 files changed, 233636 insertions(+), 60360 deletions(-) delete mode 100644 .depend delete mode 100644 .depend.camlp4 delete mode 100644 .depend.coq create mode 100644 Makefile.build create mode 100644 Makefile.common delete mode 100644 Makefile.dep create mode 100644 Makefile.doc create mode 100644 Makefile.stage1 create mode 100644 Makefile.stage2 create mode 100644 Makefile.stage3 create mode 100644 checker/.depend create mode 100644 checker/Makefile create mode 100644 checker/check.ml create mode 100644 checker/check_stat.ml create mode 100644 checker/check_stat.mli create mode 100644 checker/checker.ml create mode 100644 checker/closure.ml create mode 100644 checker/closure.mli create mode 100644 checker/declarations.ml create mode 100644 checker/declarations.mli create mode 100644 checker/environ.ml create mode 100644 checker/environ.mli create mode 100644 checker/indtypes.ml create mode 100644 checker/indtypes.mli create mode 100644 checker/inductive.ml create mode 100644 checker/inductive.mli create mode 100644 checker/main.ml create mode 100644 checker/mod_checking.ml create mode 100644 checker/modops.ml create mode 100644 checker/modops.mli create mode 100644 checker/reduction.ml create mode 100644 checker/reduction.mli create mode 100644 checker/safe_typing.ml create mode 100644 checker/safe_typing.mli create mode 100644 checker/subtyping.ml create mode 100644 checker/subtyping.mli create mode 100644 checker/term.ml create mode 100644 checker/term.mli create mode 100644 checker/type_errors.ml create mode 100644 checker/type_errors.mli create mode 100644 checker/typeops.ml create mode 100644 checker/typeops.mli create mode 100644 checker/validate.ml delete mode 100644 contrib/correctness/past.mli delete mode 100644 contrib/correctness/pcic.ml delete mode 100644 contrib/correctness/pcic.mli delete mode 100644 contrib/correctness/pcicenv.ml delete mode 100644 contrib/correctness/pcicenv.mli delete mode 100644 contrib/correctness/pdb.ml delete mode 100644 contrib/correctness/pdb.mli delete mode 100644 contrib/correctness/peffect.ml delete mode 100644 contrib/correctness/peffect.mli delete mode 100644 contrib/correctness/penv.ml delete mode 100644 contrib/correctness/penv.mli delete mode 100644 contrib/correctness/perror.ml delete mode 100644 contrib/correctness/perror.mli delete mode 100644 contrib/correctness/pextract.ml delete mode 100644 contrib/correctness/pextract.mli delete mode 100644 contrib/correctness/pmisc.ml delete mode 100644 contrib/correctness/pmisc.mli delete mode 100644 contrib/correctness/pmlize.ml delete mode 100644 contrib/correctness/pmlize.mli delete mode 100644 contrib/correctness/pmonad.ml delete mode 100644 contrib/correctness/pmonad.mli delete mode 100644 contrib/correctness/pred.ml delete mode 100644 contrib/correctness/pred.mli delete mode 100644 contrib/correctness/prename.ml delete mode 100644 contrib/correctness/prename.mli delete mode 100644 contrib/correctness/psyntax.ml4 delete mode 100644 contrib/correctness/psyntax.mli delete mode 100644 contrib/correctness/ptactic.ml delete mode 100644 contrib/correctness/ptactic.mli delete mode 100644 contrib/correctness/ptype.mli delete mode 100644 contrib/correctness/ptyping.ml delete mode 100644 contrib/correctness/ptyping.mli delete mode 100644 contrib/correctness/putil.ml delete mode 100644 contrib/correctness/putil.mli delete mode 100644 contrib/correctness/pwp.ml delete mode 100644 contrib/correctness/pwp.mli create mode 100644 contrib/dp/Dp.v delete mode 100644 contrib/dp/dp_cvcl.ml delete mode 100644 contrib/dp/dp_cvcl.mli create mode 100644 contrib/dp/dp_gappa.ml delete mode 100644 contrib/dp/dp_simplify.ml delete mode 100644 contrib/dp/dp_simplify.mli delete mode 100644 contrib/dp/dp_sorts.ml delete mode 100644 contrib/dp/dp_sorts.mli create mode 100644 contrib/dp/dp_why.mli delete mode 100644 contrib/dp/dp_zenon.ml create mode 100644 contrib/dp/dp_zenon.mll create mode 100644 contrib/dp/test_gappa.v create mode 100644 contrib/dp/zenon.v delete mode 100644 contrib/extraction/test/.depend delete mode 100644 contrib/extraction/test/Makefile delete mode 100644 contrib/extraction/test/Makefile.haskell delete mode 100644 contrib/extraction/test/addReals delete mode 100644 contrib/extraction/test/custom/Adalloc delete mode 100644 contrib/extraction/test/custom/Euclid delete mode 100644 contrib/extraction/test/custom/List delete mode 100644 contrib/extraction/test/custom/ListSet delete mode 100644 contrib/extraction/test/custom/Lsort delete mode 100644 contrib/extraction/test/custom/Map delete mode 100644 contrib/extraction/test/custom/Mapcard delete mode 100644 contrib/extraction/test/custom/Mapiter delete mode 100644 contrib/extraction/test/custom/R_Ifp delete mode 100644 contrib/extraction/test/custom/R_sqr delete mode 100644 contrib/extraction/test/custom/Ranalysis delete mode 100644 contrib/extraction/test/custom/Raxioms delete mode 100644 contrib/extraction/test/custom/Rbase delete mode 100644 contrib/extraction/test/custom/Rbasic_fun delete mode 100644 contrib/extraction/test/custom/Rdefinitions delete mode 100644 contrib/extraction/test/custom/Reals.v delete mode 100644 contrib/extraction/test/custom/Rfunctions delete mode 100644 contrib/extraction/test/custom/Rgeom delete mode 100644 contrib/extraction/test/custom/Rlimit delete mode 100644 contrib/extraction/test/custom/Rseries delete mode 100644 contrib/extraction/test/custom/Rsigma delete mode 100644 contrib/extraction/test/custom/Rtrigo delete mode 100644 contrib/extraction/test/custom/ZArith_dec delete mode 100644 contrib/extraction/test/custom/fast_integer delete mode 100644 contrib/extraction/test/e delete mode 100755 contrib/extraction/test/extract delete mode 100755 contrib/extraction/test/extract.haskell delete mode 100644 contrib/extraction/test/hs2v.ml delete mode 100755 contrib/extraction/test/make_mli delete mode 100644 contrib/extraction/test/ml2v.ml delete mode 100644 contrib/extraction/test/v2hs.ml delete mode 100644 contrib/extraction/test/v2ml.ml delete mode 100644 contrib/first-order/formula.ml delete mode 100644 contrib/first-order/formula.mli delete mode 100644 contrib/first-order/g_ground.ml4 delete mode 100644 contrib/first-order/ground.ml delete mode 100644 contrib/first-order/ground.mli delete mode 100644 contrib/first-order/instances.ml delete mode 100644 contrib/first-order/instances.mli delete mode 100644 contrib/first-order/rules.ml delete mode 100644 contrib/first-order/rules.mli delete mode 100644 contrib/first-order/sequent.ml delete mode 100644 contrib/first-order/sequent.mli delete mode 100644 contrib/first-order/unify.ml delete mode 100644 contrib/first-order/unify.mli create mode 100644 contrib/firstorder/formula.ml create mode 100644 contrib/firstorder/formula.mli create mode 100644 contrib/firstorder/g_ground.ml4 create mode 100644 contrib/firstorder/ground.ml create mode 100644 contrib/firstorder/ground.mli create mode 100644 contrib/firstorder/instances.ml create mode 100644 contrib/firstorder/instances.mli create mode 100644 contrib/firstorder/rules.ml create mode 100644 contrib/firstorder/rules.mli create mode 100644 contrib/firstorder/sequent.ml create mode 100644 contrib/firstorder/sequent.mli create mode 100644 contrib/firstorder/unify.ml create mode 100644 contrib/firstorder/unify.mli create mode 100644 contrib/funind/Recdef.v create mode 100644 contrib/funind/g_indfun.ml4 delete mode 100644 contrib/funind/indfun_main.ml4 create mode 100644 contrib/funind/recdef.ml delete mode 100644 contrib/funind/tacinv.ml4 delete mode 100644 contrib/funind/tacinvutils.ml delete mode 100644 contrib/funind/tacinvutils.mli create mode 100644 contrib/interface/depends.ml create mode 100644 contrib/micromega/CheckerMaker.v create mode 100644 contrib/micromega/Env.v create mode 100644 contrib/micromega/EnvRing.v create mode 100644 contrib/micromega/LICENSE.sos create mode 100644 contrib/micromega/MExtraction.v create mode 100644 contrib/micromega/Micromegatac.v create mode 100644 contrib/micromega/OrderedRing.v create mode 100644 contrib/micromega/QMicromega.v create mode 100644 contrib/micromega/RMicromega.v create mode 100644 contrib/micromega/Refl.v create mode 100644 contrib/micromega/RingMicromega.v create mode 100644 contrib/micromega/Tauto.v create mode 100644 contrib/micromega/VarMap.v create mode 100644 contrib/micromega/ZCoeff.v create mode 100644 contrib/micromega/ZMicromega.v create mode 100644 contrib/micromega/certificate.ml create mode 100644 contrib/micromega/coq_micromega.ml create mode 100644 contrib/micromega/csdpcert.ml create mode 100644 contrib/micromega/g_micromega.ml4 create mode 100644 contrib/micromega/mfourier.ml create mode 100644 contrib/micromega/micromega.ml create mode 100644 contrib/micromega/micromega.mli create mode 100644 contrib/micromega/mutils.ml create mode 100644 contrib/micromega/sos.ml create mode 100644 contrib/micromega/sos.mli create mode 100644 contrib/micromega/vector.ml create mode 100644 contrib/omega/PreOmega.v delete mode 100644 contrib/recdef/Recdef.v delete mode 100644 contrib/recdef/recdef.ml4 create mode 100644 contrib/romega/const_omega.mli delete mode 100644 contrib/subtac/FixSub.v delete mode 100644 contrib/subtac/FunctionalExtensionality.v delete mode 100644 contrib/subtac/Heq.v delete mode 100644 contrib/subtac/Subtac.v delete mode 100644 contrib/subtac/SubtacTactics.v delete mode 100644 contrib/subtac/Utils.v create mode 100644 contrib/subtac/subtac_classes.ml create mode 100644 contrib/subtac/subtac_classes.mli create mode 100644 contrib/subtac/test/take.v create mode 100644 contrib/xml/dumptree.ml4 create mode 100644 dev/doc/build-system.dev.txt create mode 100644 dev/doc/build-system.txt delete mode 100644 dev/doc/header create mode 100644 dev/doc/notes-on-conversion create mode 100644 dev/header create mode 100644 dev/set_raw_db delete mode 100644 doc/Makefile delete mode 100644 ide/index_urls.txt delete mode 100644 ide/utf8.v create mode 100644 interp/implicit_quantifiers.ml create mode 100644 interp/implicit_quantifiers.mli create mode 100644 kernel/byterun/int64_emul.h create mode 100644 kernel/byterun/int64_native.h create mode 100644 kernel/retroknowledge.ml create mode 100644 kernel/retroknowledge.mli create mode 100644 lib/flags.ml create mode 100644 lib/flags.mli create mode 100644 lib/option.ml create mode 100644 lib/option.mli delete mode 100644 lib/options.ml delete mode 100644 lib/options.mli create mode 100644 library/decl_kinds.mli create mode 100644 library/decls.ml create mode 100644 library/decls.mli create mode 100644 library/heads.ml create mode 100644 library/heads.mli create mode 100644 parsing/g_intsyntax.ml create mode 100644 parsing/g_intsyntax.mli create mode 100644 pretyping/typeclasses.ml create mode 100644 pretyping/typeclasses.mli create mode 100644 pretyping/typeclasses_errors.ml create mode 100644 pretyping/typeclasses_errors.mli create mode 100644 tactics/class_tactics.ml4 create mode 100644 test-suite/bugs/closed/1519.v create mode 100644 test-suite/bugs/closed/1780.v create mode 100644 test-suite/bugs/closed/1787.v create mode 100644 test-suite/bugs/closed/shouldfail/1703.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1041.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1100.v create mode 100644 test-suite/bugs/closed/shouldsucceed/121.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1243.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1302.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1322.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1411.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1414.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1419.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1425.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1446.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1448.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1477.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1483.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1507.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1519.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1568.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1576.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1582.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1604.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1614.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1618.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1634.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1643.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1680.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1683.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1696.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1704.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1718.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1738.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1740.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1754.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1773.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1774.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1775.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1776.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1779.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1784.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1844.v create mode 100644 test-suite/bugs/closed/shouldsucceed/1865.v create mode 100644 test-suite/bugs/closed/shouldsucceed/348.v create mode 100644 test-suite/bugs/closed/shouldsucceed/38.v create mode 100644 test-suite/bugs/closed/shouldsucceed/545.v create mode 100644 test-suite/bugs/closed/shouldsucceed/846.v create mode 100644 test-suite/bugs/closed/shouldsucceed/931.v create mode 100644 test-suite/bugs/opened/1773.v create mode 100644 test-suite/bugs/opened/shouldnotfail/1338.v-disabled create mode 100644 test-suite/bugs/opened/shouldnotfail/1416.v create mode 100644 test-suite/bugs/opened/shouldnotfail/1501.v create mode 100644 test-suite/bugs/opened/shouldnotfail/1596.v create mode 100644 test-suite/bugs/opened/shouldnotfail/1811.v create mode 100644 test-suite/bugs/opened/shouldnotfail/743.v create mode 100644 test-suite/complexity/injection.v create mode 100644 test-suite/complexity/ring.v create mode 100644 test-suite/complexity/ring2.v create mode 100644 test-suite/csdp.cache create mode 100644 test-suite/failure/circular_subtyping1.v create mode 100644 test-suite/failure/circular_subtyping2.v create mode 100644 test-suite/failure/fixpoint2.v create mode 100644 test-suite/failure/guard.v create mode 100644 test-suite/failure/rewrite_in_hyp2.v create mode 100644 test-suite/failure/subtyping.v create mode 100644 test-suite/failure/subtyping2.v create mode 100644 test-suite/failure/univ_include.v create mode 100644 test-suite/ide/undo.v create mode 100644 test-suite/ideal-features/Case9.v create mode 100644 test-suite/ideal-features/complexity/evars_subst.v create mode 100644 test-suite/ideal-features/evars_subst.v create mode 100644 test-suite/ideal-features/universes.v create mode 100644 test-suite/micromega/bertot.v create mode 100644 test-suite/micromega/example.v create mode 100644 test-suite/micromega/heap3_vcgen_25.v create mode 100644 test-suite/micromega/qexample.v create mode 100644 test-suite/micromega/rexample.v create mode 100644 test-suite/micromega/square.v create mode 100644 test-suite/micromega/zomicron.v create mode 100644 test-suite/modules/pseudo_circular_with.v create mode 100644 test-suite/modules/resolver.v create mode 100644 test-suite/modules/subtyping.v create mode 100644 test-suite/output/reduction.out create mode 100644 test-suite/output/reduction.v create mode 100644 test-suite/success/AdvancedCanonicalStructure.v create mode 100644 test-suite/success/Cases-bug1834.v create mode 100644 test-suite/success/ImplicitArguments.v create mode 100644 test-suite/success/LetPat.v create mode 100644 test-suite/success/OmegaPre.v create mode 100644 test-suite/success/ROmegaPre.v create mode 100644 test-suite/success/change.v create mode 100644 test-suite/success/conv_pbs.v create mode 100644 test-suite/success/decl_mode.v create mode 100644 test-suite/success/dependentind.v create mode 100644 test-suite/success/hyps_inclusion.v create mode 100644 test-suite/success/parsing.v create mode 100644 test-suite/success/pattern.v create mode 100644 test-suite/success/specialize.v create mode 100644 test-suite/typeclasses/NewSetoid.v create mode 100644 test-suite/typeclasses/clrewrite.v create mode 100644 test-suite/typeclasses/unification_delta.v delete mode 100644 theories/Arith/Div.v create mode 100644 theories/Classes/EquivDec.v create mode 100644 theories/Classes/Equivalence.v create mode 100644 theories/Classes/Functions.v create mode 100644 theories/Classes/Init.v create mode 100644 theories/Classes/Morphisms.v create mode 100644 theories/Classes/Morphisms_Prop.v create mode 100644 theories/Classes/Morphisms_Relations.v create mode 100644 theories/Classes/RelationClasses.v create mode 100644 theories/Classes/SetoidAxioms.v create mode 100644 theories/Classes/SetoidClass.v create mode 100644 theories/Classes/SetoidDec.v create mode 100644 theories/Classes/SetoidTactics.v create mode 100644 theories/FSets/FMapFullAVL.v delete mode 100644 theories/FSets/FMapIntMap.v delete mode 100644 theories/FSets/FMapWeak.v delete mode 100644 theories/FSets/FMapWeakFacts.v delete mode 100644 theories/FSets/FMapWeakInterface.v create mode 100644 theories/FSets/FSetDecide.v create mode 100644 theories/FSets/FSetFullAVL.v delete mode 100644 theories/FSets/FSetWeak.v delete mode 100644 theories/FSets/FSetWeakFacts.v delete mode 100644 theories/FSets/FSetWeakInterface.v delete mode 100644 theories/FSets/FSetWeakProperties.v delete mode 100644 theories/IntMap/.depend delete mode 100644 theories/IntMap/Adalloc.v delete mode 100644 theories/IntMap/Allmaps.v delete mode 100644 theories/IntMap/Fset.v delete mode 100644 theories/IntMap/Lsort.v delete mode 100644 theories/IntMap/Map.v delete mode 100644 theories/IntMap/Mapaxioms.v delete mode 100644 theories/IntMap/Mapc.v delete mode 100644 theories/IntMap/Mapcanon.v delete mode 100644 theories/IntMap/Mapcard.v delete mode 100644 theories/IntMap/Mapfold.v delete mode 100644 theories/IntMap/Mapiter.v delete mode 100644 theories/IntMap/Maplists.v delete mode 100644 theories/IntMap/Mapsubset.v delete mode 100644 theories/IntMap/intro.tex create mode 100644 theories/Lists/StreamMemo.v create mode 100644 theories/Logic/Description.v create mode 100644 theories/Logic/Epsilon.v create mode 100644 theories/Logic/IndefiniteDescription.v create mode 100644 theories/Logic/SetIsType.v create mode 100644 theories/Numbers/BigNumPrelude.v create mode 100644 theories/Numbers/Cyclic/Abstract/CyclicAxioms.v create mode 100644 theories/Numbers/Cyclic/Abstract/NZCyclic.v create mode 100644 theories/Numbers/Cyclic/DoubleCyclic/DoubleAdd.v create mode 100644 theories/Numbers/Cyclic/DoubleCyclic/DoubleBase.v create mode 100644 theories/Numbers/Cyclic/DoubleCyclic/DoubleCyclic.v create mode 100644 theories/Numbers/Cyclic/DoubleCyclic/DoubleDiv.v create mode 100644 theories/Numbers/Cyclic/DoubleCyclic/DoubleDivn1.v create mode 100644 theories/Numbers/Cyclic/DoubleCyclic/DoubleLift.v create mode 100644 theories/Numbers/Cyclic/DoubleCyclic/DoubleMul.v create mode 100644 theories/Numbers/Cyclic/DoubleCyclic/DoubleSqrt.v create mode 100644 theories/Numbers/Cyclic/DoubleCyclic/DoubleSub.v create mode 100644 theories/Numbers/Cyclic/DoubleCyclic/DoubleType.v create mode 100644 theories/Numbers/Cyclic/Int31/Cyclic31.v create mode 100644 theories/Numbers/Cyclic/Int31/Int31.v create mode 100644 theories/Numbers/Cyclic/ZModulo/ZModulo.v create mode 100644 theories/Numbers/Integer/Abstract/ZAdd.v create mode 100644 theories/Numbers/Integer/Abstract/ZAddOrder.v create mode 100644 theories/Numbers/Integer/Abstract/ZAxioms.v create mode 100644 theories/Numbers/Integer/Abstract/ZBase.v create mode 100644 theories/Numbers/Integer/Abstract/ZDomain.v create mode 100644 theories/Numbers/Integer/Abstract/ZLt.v create mode 100644 theories/Numbers/Integer/Abstract/ZMul.v create mode 100644 theories/Numbers/Integer/Abstract/ZMulOrder.v create mode 100644 theories/Numbers/Integer/BigZ/BigZ.v create mode 100644 theories/Numbers/Integer/BigZ/ZMake.v create mode 100644 theories/Numbers/Integer/Binary/ZBinary.v create mode 100644 theories/Numbers/Integer/NatPairs/ZNatPairs.v create mode 100644 theories/Numbers/Integer/SpecViaZ/ZSig.v create mode 100644 theories/Numbers/Integer/SpecViaZ/ZSigZAxioms.v create mode 100644 theories/Numbers/NaryFunctions.v create mode 100644 theories/Numbers/NatInt/NZAdd.v create mode 100644 theories/Numbers/NatInt/NZAddOrder.v create mode 100644 theories/Numbers/NatInt/NZAxioms.v create mode 100644 theories/Numbers/NatInt/NZBase.v create mode 100644 theories/Numbers/NatInt/NZMul.v create mode 100644 theories/Numbers/NatInt/NZMulOrder.v create mode 100644 theories/Numbers/NatInt/NZOrder.v create mode 100644 theories/Numbers/Natural/Abstract/NAdd.v create mode 100644 theories/Numbers/Natural/Abstract/NAddOrder.v create mode 100644 theories/Numbers/Natural/Abstract/NAxioms.v create mode 100644 theories/Numbers/Natural/Abstract/NBase.v create mode 100644 theories/Numbers/Natural/Abstract/NDefOps.v create mode 100644 theories/Numbers/Natural/Abstract/NIso.v create mode 100644 theories/Numbers/Natural/Abstract/NMul.v create mode 100644 theories/Numbers/Natural/Abstract/NMulOrder.v create mode 100644 theories/Numbers/Natural/Abstract/NOrder.v create mode 100644 theories/Numbers/Natural/Abstract/NStrongRec.v create mode 100644 theories/Numbers/Natural/Abstract/NSub.v create mode 100644 theories/Numbers/Natural/BigN/BigN.v create mode 100644 theories/Numbers/Natural/BigN/NMake_gen.ml create mode 100644 theories/Numbers/Natural/BigN/Nbasic.v create mode 100644 theories/Numbers/Natural/Binary/NBinDefs.v create mode 100644 theories/Numbers/Natural/Binary/NBinary.v create mode 100644 theories/Numbers/Natural/Peano/NPeano.v create mode 100644 theories/Numbers/Natural/SpecViaZ/NSig.v create mode 100644 theories/Numbers/Natural/SpecViaZ/NSigNAxioms.v create mode 100644 theories/Numbers/NumPrelude.v create mode 100644 theories/Numbers/Rational/BigQ/BigQ.v create mode 100644 theories/Numbers/Rational/BigQ/Q0Make.v create mode 100644 theories/Numbers/Rational/BigQ/QMake_base.v create mode 100644 theories/Numbers/Rational/BigQ/QbiMake.v create mode 100644 theories/Numbers/Rational/BigQ/QifMake.v create mode 100644 theories/Numbers/Rational/BigQ/QpMake.v create mode 100644 theories/Numbers/Rational/BigQ/QvMake.v create mode 100644 theories/Numbers/Rational/SpecViaQ/QSig.v create mode 100644 theories/Program/Basics.v create mode 100644 theories/Program/Combinators.v create mode 100644 theories/Program/Equality.v create mode 100644 theories/Program/FunctionalExtensionality.v create mode 100644 theories/Program/Program.v create mode 100644 theories/Program/Subset.v create mode 100644 theories/Program/Syntax.v create mode 100644 theories/Program/Tactics.v create mode 100644 theories/Program/Utils.v create mode 100644 theories/Program/Wf.v create mode 100644 theories/QArith/Qabs.v create mode 100644 theories/QArith/Qfield.v create mode 100644 theories/QArith/Qpower.v create mode 100644 theories/QArith/Qround.v create mode 100644 theories/Reals/Rlogic.v create mode 100644 theories/Setoids/Setoid_Prop.v create mode 100644 theories/Setoids/Setoid_tac.v create mode 100644 theories/Unicode/Utf8.v create mode 100644 theories/ZArith/ZOdiv.v create mode 100644 theories/ZArith/ZOdiv_def.v create mode 100644 theories/ZArith/Zgcd_alt.v create mode 100644 theories/ZArith/Zpow_facts.v create mode 100644 toplevel/auto_ind_decl.ml create mode 100644 toplevel/auto_ind_decl.mli create mode 100644 toplevel/classes.ml create mode 100644 toplevel/classes.mli create mode 100644 toplevel/ind_tables.ml create mode 100644 toplevel/ind_tables.mli diff --git a/.depend b/.depend deleted file mode 100644 index c6205347..00000000 --- a/.depend +++ /dev/null @@ -1,4067 +0,0 @@ -ide/config_parser.cmi: lib/util.cmi -ide/coq.cmi: toplevel/vernacexpr.cmo lib/util.cmi kernel/term.cmi \ - kernel/names.cmi pretyping/evd.cmi kernel/environ.cmi -interp/constrextern.cmi: lib/util.cmi interp/topconstr.cmi \ - pretyping/termops.cmi kernel/term.cmi kernel/sign.cmi \ - pretyping/rawterm.cmi pretyping/pattern.cmi interp/notation.cmi \ - library/nametab.cmi kernel/names.cmi library/libnames.cmi \ - kernel/environ.cmi -interp/constrintern.cmi: interp/topconstr.cmi pretyping/termops.cmi \ - kernel/term.cmi kernel/sign.cmi pretyping/rawterm.cmi \ - pretyping/pretyping.cmi pretyping/pattern.cmi kernel/names.cmi \ - library/libnames.cmi library/impargs.cmi pretyping/evd.cmi \ - kernel/environ.cmi -interp/coqlib.cmi: kernel/term.cmi pretyping/pattern.cmi library/nametab.cmi \ - kernel/names.cmi library/libnames.cmi -interp/genarg.cmi: lib/util.cmi interp/topconstr.cmi kernel/term.cmi \ - pretyping/rawterm.cmi lib/pp.cmi kernel/names.cmi library/libnames.cmi \ - pretyping/evd.cmi -interp/modintern.cmi: interp/topconstr.cmi kernel/environ.cmi \ - kernel/entries.cmi kernel/declarations.cmi -interp/notation.cmi: lib/util.cmi interp/topconstr.cmi kernel/term.cmi \ - pretyping/rawterm.cmi interp/ppextend.cmi lib/pp.cmi library/nametab.cmi \ - kernel/names.cmi library/libnames.cmi pretyping/classops.cmi \ - lib/bigint.cmi -interp/ppextend.cmi: lib/pp.cmi kernel/names.cmi -interp/reserve.cmi: lib/util.cmi pretyping/rawterm.cmi kernel/names.cmi -interp/syntax_def.cmi: lib/util.cmi interp/topconstr.cmi \ - pretyping/rawterm.cmi kernel/names.cmi library/libnames.cmi -interp/topconstr.cmi: lib/util.cmi kernel/term.cmi pretyping/rawterm.cmi \ - lib/pp.cmi kernel/names.cmi kernel/mod_subst.cmi library/libnames.cmi \ - pretyping/evd.cmi lib/dyn.cmi lib/bigint.cmi -kernel/cbytecodes.cmi: kernel/term.cmi kernel/names.cmi -kernel/cbytegen.cmi: kernel/term.cmi kernel/pre_env.cmi kernel/names.cmi \ - kernel/declarations.cmi kernel/cemitcodes.cmi kernel/cbytecodes.cmi -kernel/cemitcodes.cmi: kernel/names.cmi kernel/mod_subst.cmi \ - kernel/cbytecodes.cmi -kernel/closure.cmi: kernel/term.cmi lib/pp.cmi kernel/names.cmi \ - kernel/esubst.cmi kernel/environ.cmi -kernel/conv_oracle.cmi: kernel/names.cmi -kernel/cooking.cmi: kernel/univ.cmi kernel/term.cmi kernel/sign.cmi \ - kernel/names.cmi kernel/environ.cmi kernel/declarations.cmi -kernel/csymtable.cmi: kernel/term.cmi kernel/pre_env.cmi kernel/names.cmi -kernel/declarations.cmi: kernel/univ.cmi kernel/term.cmi kernel/sign.cmi \ - lib/rtree.cmi kernel/names.cmi kernel/mod_subst.cmi kernel/cemitcodes.cmi \ - kernel/cbytecodes.cmi -kernel/entries.cmi: kernel/univ.cmi kernel/term.cmi kernel/sign.cmi \ - kernel/names.cmi -kernel/environ.cmi: kernel/univ.cmi kernel/term.cmi kernel/sign.cmi \ - kernel/pre_env.cmi kernel/names.cmi kernel/declarations.cmi \ - kernel/cemitcodes.cmi -kernel/esubst.cmi: lib/util.cmi -kernel/indtypes.cmi: kernel/univ.cmi kernel/typeops.cmi kernel/term.cmi \ - kernel/names.cmi kernel/environ.cmi kernel/entries.cmi \ - kernel/declarations.cmi -kernel/inductive.cmi: kernel/univ.cmi kernel/term.cmi kernel/sign.cmi \ - kernel/names.cmi kernel/environ.cmi kernel/declarations.cmi -kernel/modops.cmi: lib/util.cmi kernel/univ.cmi kernel/names.cmi \ - kernel/mod_subst.cmi kernel/environ.cmi kernel/entries.cmi \ - kernel/declarations.cmi -kernel/mod_subst.cmi: kernel/term.cmi lib/pp.cmi kernel/names.cmi -kernel/mod_typing.cmi: kernel/environ.cmi kernel/entries.cmi \ - kernel/declarations.cmi -kernel/names.cmi: lib/predicate.cmi lib/pp.cmi -kernel/pre_env.cmi: lib/util.cmi kernel/univ.cmi kernel/term.cmi \ - kernel/sign.cmi kernel/names.cmi kernel/declarations.cmi -kernel/reduction.cmi: kernel/univ.cmi kernel/term.cmi kernel/sign.cmi \ - kernel/environ.cmi -kernel/safe_typing.cmi: kernel/univ.cmi kernel/term.cmi kernel/names.cmi \ - kernel/environ.cmi kernel/entries.cmi kernel/declarations.cmi \ - kernel/cooking.cmi -kernel/sign.cmi: kernel/term.cmi kernel/names.cmi -kernel/subtyping.cmi: kernel/univ.cmi kernel/environ.cmi \ - kernel/declarations.cmi -kernel/term.cmi: kernel/univ.cmi kernel/names.cmi kernel/esubst.cmi -kernel/term_typing.cmi: kernel/univ.cmi kernel/typeops.cmi kernel/term.cmi \ - kernel/names.cmi kernel/inductive.cmi kernel/environ.cmi \ - kernel/entries.cmi kernel/declarations.cmi kernel/cooking.cmi -kernel/type_errors.cmi: kernel/term.cmi kernel/names.cmi kernel/environ.cmi -kernel/typeops.cmi: kernel/univ.cmi kernel/term.cmi kernel/sign.cmi \ - kernel/names.cmi kernel/environ.cmi kernel/entries.cmi \ - kernel/declarations.cmi -kernel/univ.cmi: lib/pp.cmi kernel/names.cmi -kernel/vconv.cmi: kernel/term.cmi kernel/reduction.cmi kernel/names.cmi \ - kernel/environ.cmi -kernel/vm.cmi: kernel/term.cmi kernel/names.cmi kernel/cemitcodes.cmi \ - kernel/cbytecodes.cmi -lib/bigint.cmi: lib/pp.cmi -lib/pp.cmi: lib/pp_control.cmi -library/declare.cmi: kernel/term.cmi kernel/sign.cmi kernel/safe_typing.cmi \ - library/nametab.cmi kernel/names.cmi library/libnames.cmi \ - kernel/indtypes.cmi kernel/environ.cmi kernel/entries.cmi \ - kernel/declarations.cmi library/decl_kinds.cmo -library/declaremods.cmi: lib/util.cmi kernel/safe_typing.cmi lib/pp.cmi \ - kernel/names.cmi library/libobject.cmi library/libnames.cmi \ - library/lib.cmi kernel/environ.cmi kernel/entries.cmi -library/dischargedhypsmap.cmi: kernel/term.cmi library/nametab.cmi \ - library/libnames.cmi kernel/environ.cmi -library/global.cmi: kernel/univ.cmi kernel/term.cmi kernel/sign.cmi \ - kernel/safe_typing.cmi kernel/names.cmi library/libnames.cmi \ - kernel/indtypes.cmi kernel/environ.cmi kernel/entries.cmi \ - kernel/declarations.cmi -library/goptions.cmi: lib/util.cmi kernel/term.cmi lib/pp.cmi \ - library/nametab.cmi kernel/names.cmi kernel/mod_subst.cmi \ - library/libnames.cmi -library/impargs.cmi: interp/topconstr.cmi kernel/term.cmi library/nametab.cmi \ - kernel/names.cmi library/libnames.cmi kernel/environ.cmi -library/lib.cmi: lib/util.cmi library/summary.cmi kernel/sign.cmi \ - kernel/names.cmi kernel/mod_subst.cmi library/libobject.cmi \ - library/libnames.cmi -library/libnames.cmi: lib/util.cmi kernel/term.cmi lib/predicate.cmi \ - lib/pp.cmi kernel/names.cmi kernel/mod_subst.cmi -library/libobject.cmi: kernel/names.cmi kernel/mod_subst.cmi \ - library/libnames.cmi -library/library.cmi: lib/util.cmi lib/system.cmi lib/pp.cmi kernel/names.cmi \ - library/libobject.cmi library/libnames.cmi -library/nameops.cmi: kernel/term.cmi lib/pp.cmi kernel/names.cmi -library/nametab.cmi: lib/util.cmi lib/pp.cmi kernel/names.cmi \ - library/libnames.cmi -lib/rtree.cmi: lib/pp.cmi -lib/system.cmi: lib/pp.cmi -lib/util.cmi: lib/pp.cmi lib/compat.cmo -parsing/egrammar.cmi: toplevel/vernacexpr.cmo lib/util.cmi \ - interp/topconstr.cmi proofs/tacexpr.cmo pretyping/rawterm.cmi \ - interp/ppextend.cmi parsing/pcoq.cmi kernel/names.cmi \ - kernel/mod_subst.cmi interp/genarg.cmi parsing/extend.cmi lib/compat.cmo -parsing/extend.cmi: lib/util.cmi -parsing/g_minicoq.cmi: kernel/term.cmi lib/pp.cmi kernel/names.cmi \ - kernel/environ.cmi -parsing/lexer.cmi: lib/util.cmi lib/pp.cmi -parsing/pcoq.cmi: toplevel/vernacexpr.cmo lib/util.cmi interp/topconstr.cmi \ - proofs/tacexpr.cmo pretyping/rawterm.cmi kernel/names.cmi \ - library/libnames.cmi interp/genarg.cmi parsing/extend.cmi \ - library/decl_kinds.cmo proofs/decl_expr.cmi lib/compat.cmo lib/bigint.cmi -parsing/ppconstr.cmi: lib/util.cmi interp/topconstr.cmi kernel/term.cmi \ - proofs/tacexpr.cmo pretyping/rawterm.cmi interp/ppextend.cmi lib/pp.cmi \ - parsing/pcoq.cmi kernel/names.cmi library/libnames.cmi interp/genarg.cmi \ - kernel/environ.cmi -parsing/ppdecl_proof.cmi: lib/pp.cmi kernel/environ.cmi proofs/decl_expr.cmi -parsing/pptactic.cmi: interp/topconstr.cmi kernel/term.cmi proofs/tacexpr.cmo \ - pretyping/rawterm.cmi proofs/proof_type.cmi pretyping/pretyping.cmi \ - interp/ppextend.cmi lib/pp.cmi library/libnames.cmi interp/genarg.cmi \ - kernel/environ.cmi -parsing/ppvernac.cmi: toplevel/vernacexpr.cmo lib/util.cmi \ - interp/topconstr.cmi pretyping/rawterm.cmi parsing/pptactic.cmi \ - interp/ppextend.cmi parsing/ppconstr.cmi lib/pp.cmi parsing/pcoq.cmi \ - library/nametab.cmi kernel/names.cmi library/nameops.cmi \ - library/libnames.cmi interp/genarg.cmi -parsing/prettyp.cmi: lib/util.cmi pretyping/termops.cmi kernel/term.cmi \ - kernel/sign.cmi kernel/safe_typing.cmi pretyping/reductionops.cmi \ - lib/pp.cmi library/nametab.cmi kernel/names.cmi library/libnames.cmi \ - library/lib.cmi library/impargs.cmi kernel/environ.cmi \ - pretyping/classops.cmi -parsing/printer.cmi: pretyping/termops.cmi kernel/term.cmi kernel/sign.cmi \ - pretyping/rawterm.cmi proofs/proof_type.cmi lib/pp.cmi \ - pretyping/pattern.cmi library/nametab.cmi kernel/names.cmi \ - library/libnames.cmi pretyping/evd.cmi kernel/environ.cmi -parsing/printmod.cmi: lib/pp.cmi kernel/names.cmi -parsing/q_util.cmi: lib/util.cmi parsing/pcoq.cmi -parsing/search.cmi: kernel/term.cmi lib/pp.cmi pretyping/pattern.cmi \ - library/nametab.cmi kernel/names.cmi library/libnames.cmi \ - kernel/environ.cmi -parsing/tactic_printer.cmi: proofs/tacexpr.cmo kernel/sign.cmi \ - proofs/proof_type.cmi lib/pp.cmi pretyping/evd.cmi -pretyping/cases.cmi: lib/util.cmi kernel/term.cmi pretyping/rawterm.cmi \ - kernel/names.cmi pretyping/inductiveops.cmi pretyping/evd.cmi \ - pretyping/evarutil.cmi kernel/environ.cmi pretyping/coercion.cmi -pretyping/cbv.cmi: kernel/term.cmi kernel/names.cmi kernel/esubst.cmi \ - kernel/environ.cmi kernel/closure.cmi -pretyping/classops.cmi: kernel/term.cmi lib/pp.cmi library/nametab.cmi \ - kernel/names.cmi kernel/mod_subst.cmi library/libnames.cmi \ - pretyping/evd.cmi kernel/environ.cmi library/decl_kinds.cmo -pretyping/clenv.cmi: lib/util.cmi kernel/term.cmi kernel/sign.cmi \ - pretyping/rawterm.cmi lib/pp.cmi kernel/names.cmi kernel/mod_subst.cmi \ - pretyping/evd.cmi pretyping/evarutil.cmi kernel/environ.cmi -pretyping/coercion.cmi: lib/util.cmi kernel/term.cmi kernel/sign.cmi \ - pretyping/rawterm.cmi kernel/names.cmi pretyping/evd.cmi \ - pretyping/evarutil.cmi kernel/environ.cmi -pretyping/detyping.cmi: lib/util.cmi pretyping/termops.cmi kernel/term.cmi \ - kernel/sign.cmi pretyping/rawterm.cmi kernel/names.cmi \ - kernel/mod_subst.cmi kernel/environ.cmi -pretyping/evarconv.cmi: kernel/term.cmi kernel/sign.cmi \ - pretyping/reductionops.cmi pretyping/evd.cmi kernel/environ.cmi -pretyping/evarutil.cmi: lib/util.cmi kernel/term.cmi kernel/sign.cmi \ - pretyping/reductionops.cmi pretyping/rawterm.cmi lib/pp.cmi \ - kernel/names.cmi pretyping/evd.cmi kernel/environ.cmi -pretyping/evd.cmi: lib/util.cmi kernel/term.cmi kernel/sign.cmi \ - kernel/reduction.cmi lib/pp.cmi kernel/names.cmi kernel/mod_subst.cmi \ - library/libnames.cmi kernel/environ.cmi lib/dyn.cmi -pretyping/indrec.cmi: kernel/term.cmi kernel/names.cmi \ - pretyping/inductiveops.cmi pretyping/evd.cmi kernel/environ.cmi \ - kernel/declarations.cmi -pretyping/inductiveops.cmi: kernel/term.cmi kernel/sign.cmi kernel/names.cmi \ - kernel/mod_subst.cmi pretyping/evd.cmi kernel/environ.cmi \ - kernel/declarations.cmi -pretyping/matching.cmi: pretyping/termops.cmi kernel/term.cmi \ - pretyping/pattern.cmi kernel/names.cmi pretyping/evd.cmi \ - kernel/environ.cmi -pretyping/pattern.cmi: kernel/term.cmi kernel/sign.cmi pretyping/rawterm.cmi \ - lib/pp.cmi library/nametab.cmi kernel/names.cmi kernel/mod_subst.cmi \ - library/libnames.cmi kernel/environ.cmi -pretyping/pretype_errors.cmi: lib/util.cmi kernel/term.cmi kernel/sign.cmi \ - pretyping/rawterm.cmi lib/pp.cmi kernel/names.cmi \ - pretyping/inductiveops.cmi pretyping/evd.cmi kernel/environ.cmi -pretyping/pretyping.cmi: kernel/term.cmi kernel/sign.cmi \ - pretyping/rawterm.cmi kernel/names.cmi pretyping/evd.cmi \ - pretyping/evarutil.cmi kernel/environ.cmi lib/dyn.cmi \ - pretyping/coercion.cmi pretyping/cases.cmi -pretyping/rawterm.cmi: lib/util.cmi kernel/univ.cmi kernel/term.cmi \ - kernel/sign.cmi library/nametab.cmi kernel/names.cmi library/libnames.cmi \ - pretyping/evd.cmi lib/dyn.cmi -pretyping/recordops.cmi: kernel/term.cmi library/nametab.cmi kernel/names.cmi \ - library/library.cmi library/libobject.cmi library/libnames.cmi \ - pretyping/classops.cmi -pretyping/reductionops.cmi: kernel/univ.cmi kernel/term.cmi kernel/sign.cmi \ - kernel/names.cmi pretyping/evd.cmi kernel/environ.cmi kernel/closure.cmi -pretyping/retyping.cmi: pretyping/termops.cmi kernel/term.cmi \ - kernel/names.cmi pretyping/evd.cmi kernel/environ.cmi -pretyping/tacred.cmi: kernel/type_errors.cmi kernel/term.cmi \ - pretyping/reductionops.cmi pretyping/rawterm.cmi kernel/names.cmi \ - library/libnames.cmi pretyping/evd.cmi kernel/environ.cmi \ - kernel/closure.cmi -pretyping/termops.cmi: lib/util.cmi kernel/univ.cmi kernel/term.cmi \ - kernel/sign.cmi lib/pp.cmi kernel/names.cmi kernel/environ.cmi -pretyping/typing.cmi: kernel/term.cmi pretyping/evd.cmi kernel/environ.cmi -pretyping/unification.cmi: kernel/term.cmi pretyping/evd.cmi \ - kernel/environ.cmi -pretyping/vnorm.cmi: kernel/term.cmi kernel/reduction.cmi kernel/names.cmi \ - kernel/environ.cmi -proofs/clenvtac.cmi: lib/util.cmi kernel/term.cmi kernel/sign.cmi \ - proofs/proof_type.cmi kernel/names.cmi pretyping/evd.cmi \ - pretyping/clenv.cmi -proofs/decl_expr.cmi: lib/util.cmi interp/topconstr.cmi kernel/term.cmi \ - proofs/tacexpr.cmo pretyping/rawterm.cmi kernel/names.cmi \ - interp/genarg.cmi -proofs/decl_mode.cmi: kernel/term.cmi proofs/tacmach.cmi \ - proofs/proof_type.cmi kernel/names.cmi pretyping/evd.cmi lib/dyn.cmi \ - proofs/decl_expr.cmi -proofs/evar_refiner.cmi: interp/topconstr.cmi kernel/term.cmi \ - proofs/refiner.cmi pretyping/rawterm.cmi kernel/names.cmi \ - pretyping/evd.cmi kernel/environ.cmi -proofs/logic.cmi: kernel/term.cmi kernel/sign.cmi proofs/proof_type.cmi \ - kernel/names.cmi pretyping/evd.cmi kernel/environ.cmi -proofs/pfedit.cmi: lib/util.cmi interp/topconstr.cmi kernel/term.cmi \ - proofs/tacmach.cmi proofs/tacexpr.cmo kernel/sign.cmi lib/pp.cmi \ - kernel/names.cmi pretyping/evd.cmi kernel/environ.cmi kernel/entries.cmi \ - library/decl_kinds.cmo -proofs/proof_trees.cmi: lib/util.cmi kernel/term.cmi kernel/sign.cmi \ - proofs/proof_type.cmi lib/pp.cmi kernel/names.cmi pretyping/evd.cmi \ - kernel/environ.cmi lib/dyn.cmi -proofs/proof_type.cmi: lib/util.cmi kernel/term.cmi proofs/tacexpr.cmo \ - pretyping/rawterm.cmi pretyping/pattern.cmi library/nametab.cmi \ - kernel/names.cmi library/libnames.cmi interp/genarg.cmi pretyping/evd.cmi \ - kernel/environ.cmi proofs/decl_expr.cmi -proofs/redexpr.cmi: kernel/term.cmi pretyping/reductionops.cmi \ - pretyping/rawterm.cmi kernel/names.cmi kernel/closure.cmi -proofs/refiner.cmi: pretyping/termops.cmi kernel/term.cmi proofs/tacexpr.cmo \ - kernel/sign.cmi proofs/proof_type.cmi proofs/proof_trees.cmi lib/pp.cmi \ - pretyping/evd.cmi kernel/environ.cmi -proofs/tacmach.cmi: interp/topconstr.cmi pretyping/termops.cmi \ - kernel/term.cmi proofs/tacexpr.cmo kernel/sign.cmi proofs/refiner.cmi \ - kernel/reduction.cmi proofs/redexpr.cmi pretyping/rawterm.cmi \ - proofs/proof_type.cmi proofs/proof_trees.cmi lib/pp.cmi kernel/names.cmi \ - pretyping/evd.cmi kernel/environ.cmi -proofs/tactic_debug.cmi: kernel/term.cmi proofs/tacexpr.cmo \ - proofs/proof_type.cmi lib/pp.cmi pretyping/pattern.cmi kernel/names.cmi \ - pretyping/evd.cmi kernel/environ.cmi -tactics/auto.cmi: toplevel/vernacexpr.cmo lib/util.cmi kernel/term.cmi \ - proofs/tacmach.cmi proofs/tacexpr.cmo kernel/sign.cmi \ - pretyping/rawterm.cmi proofs/proof_type.cmi lib/pp.cmi \ - pretyping/pattern.cmi kernel/names.cmi kernel/mod_subst.cmi \ - library/libnames.cmi pretyping/evd.cmi kernel/environ.cmi \ - pretyping/clenv.cmi tactics/btermdn.cmi -tactics/autorewrite.cmi: kernel/term.cmi tactics/tacticals.cmi \ - proofs/tacmach.cmi proofs/tacexpr.cmo kernel/names.cmi -tactics/btermdn.cmi: kernel/term.cmi pretyping/pattern.cmi -tactics/contradiction.cmi: kernel/term.cmi pretyping/rawterm.cmi \ - proofs/proof_type.cmi kernel/names.cmi -tactics/decl_interp.cmi: tactics/tacinterp.cmi kernel/mod_subst.cmi \ - pretyping/evd.cmi kernel/environ.cmi proofs/decl_mode.cmi \ - proofs/decl_expr.cmi -tactics/decl_proof_instr.cmi: kernel/term.cmi proofs/tacmach.cmi \ - proofs/refiner.cmi pretyping/rawterm.cmi proofs/proof_type.cmi \ - kernel/names.cmi kernel/environ.cmi proofs/decl_mode.cmi \ - proofs/decl_expr.cmi -tactics/dhyp.cmi: toplevel/vernacexpr.cmo interp/topconstr.cmi \ - proofs/tacmach.cmi proofs/tacexpr.cmo kernel/names.cmi -tactics/eauto.cmi: interp/topconstr.cmi kernel/term.cmi proofs/tacexpr.cmo \ - proofs/proof_type.cmi tactics/auto.cmi -tactics/elim.cmi: kernel/term.cmi tactics/tacticals.cmi proofs/tacmach.cmi \ - pretyping/rawterm.cmi proofs/proof_type.cmi kernel/names.cmi \ - interp/genarg.cmi -tactics/equality.cmi: kernel/term.cmi tactics/tactics.cmi \ - tactics/tacticals.cmi proofs/tacmach.cmi proofs/tacexpr.cmo \ - kernel/sign.cmi pretyping/rawterm.cmi proofs/proof_type.cmi \ - pretyping/pattern.cmi kernel/names.cmi tactics/hipattern.cmi \ - interp/genarg.cmi pretyping/evd.cmi kernel/environ.cmi -tactics/evar_tactics.cmi: kernel/term.cmi proofs/tacmach.cmi \ - proofs/tacexpr.cmo pretyping/rawterm.cmi kernel/names.cmi -tactics/extraargs.cmi: lib/util.cmi interp/topconstr.cmi kernel/term.cmi \ - tactics/tacticals.cmi proofs/tacexpr.cmo tactics/setoid_replace.cmi \ - pretyping/rawterm.cmi proofs/proof_type.cmi parsing/pcoq.cmi \ - kernel/names.cmi -tactics/extratactics.cmi: lib/util.cmi interp/topconstr.cmi kernel/term.cmi \ - proofs/tacexpr.cmo pretyping/rawterm.cmi proofs/proof_type.cmi \ - kernel/names.cmi interp/genarg.cmi -tactics/hiddentac.cmi: kernel/term.cmi tactics/tacticals.cmi \ - proofs/tacmach.cmi proofs/tacexpr.cmo proofs/redexpr.cmi \ - pretyping/rawterm.cmi proofs/proof_type.cmi kernel/names.cmi \ - interp/genarg.cmi -tactics/hipattern.cmi: lib/util.cmi kernel/term.cmi proofs/tacmach.cmi \ - kernel/sign.cmi proofs/proof_type.cmi proofs/proof_trees.cmi \ - pretyping/pattern.cmi kernel/names.cmi pretyping/evd.cmi \ - interp/coqlib.cmi -tactics/inv.cmi: kernel/term.cmi proofs/tacmach.cmi proofs/tacexpr.cmo \ - pretyping/rawterm.cmi kernel/names.cmi interp/genarg.cmi -tactics/leminv.cmi: lib/util.cmi interp/topconstr.cmi kernel/term.cmi \ - pretyping/rawterm.cmi proofs/proof_type.cmi kernel/names.cmi -tactics/nbtermdn.cmi: kernel/term.cmi pretyping/pattern.cmi \ - library/libnames.cmi tactics/btermdn.cmi -tactics/refine.cmi: proofs/tacmach.cmi pretyping/evd.cmi -tactics/setoid_replace.cmi: interp/topconstr.cmi kernel/term.cmi \ - proofs/proof_type.cmi lib/pp.cmi kernel/names.cmi -tactics/tacinterp.cmi: lib/util.cmi interp/topconstr.cmi kernel/term.cmi \ - proofs/tactic_debug.cmi proofs/tacmach.cmi proofs/tacexpr.cmo \ - proofs/redexpr.cmi proofs/proof_type.cmi lib/pp.cmi library/nametab.cmi \ - kernel/names.cmi kernel/mod_subst.cmi library/libnames.cmi \ - interp/genarg.cmi pretyping/evd.cmi kernel/environ.cmi lib/dyn.cmi -tactics/tacticals.cmi: kernel/term.cmi proofs/tacmach.cmi proofs/tacexpr.cmo \ - kernel/sign.cmi kernel/reduction.cmi proofs/proof_type.cmi lib/pp.cmi \ - pretyping/pattern.cmi kernel/names.cmi interp/genarg.cmi \ - pretyping/clenv.cmi -tactics/tactics.cmi: interp/topconstr.cmi kernel/term.cmi \ - tactics/tacticals.cmi proofs/tacmach.cmi proofs/tacexpr.cmo \ - kernel/sign.cmi kernel/reduction.cmi proofs/redexpr.cmi \ - pretyping/rawterm.cmi proofs/proof_type.cmi library/nametab.cmi \ - kernel/names.cmi library/libnames.cmi interp/genarg.cmi pretyping/evd.cmi \ - proofs/evar_refiner.cmi kernel/environ.cmi pretyping/clenv.cmi -tactics/termdn.cmi: kernel/term.cmi pretyping/pattern.cmi \ - library/libnames.cmi -toplevel/cerrors.cmi: lib/util.cmi lib/pp.cmi -toplevel/class.cmi: kernel/term.cmi proofs/tacexpr.cmo library/nametab.cmi \ - kernel/names.cmi library/libnames.cmi library/declare.cmi \ - library/decl_kinds.cmo pretyping/classops.cmi -toplevel/command.cmi: toplevel/vernacexpr.cmo lib/util.cmi \ - interp/topconstr.cmi kernel/term.cmi proofs/tacexpr.cmo \ - proofs/redexpr.cmi pretyping/rawterm.cmi library/nametab.cmi \ - kernel/names.cmi library/library.cmi library/libnames.cmi \ - pretyping/evd.cmi kernel/environ.cmi kernel/entries.cmi \ - library/declare.cmi library/decl_kinds.cmo -toplevel/coqinit.cmi: kernel/names.cmi -toplevel/discharge.cmi: kernel/sign.cmi kernel/entries.cmi \ - kernel/declarations.cmi kernel/cooking.cmi -toplevel/fhimsg.cmi: kernel/type_errors.cmi kernel/term.cmi kernel/sign.cmi \ - lib/pp.cmi kernel/names.cmi kernel/environ.cmi -toplevel/himsg.cmi: kernel/type_errors.cmi pretyping/tacred.cmi \ - pretyping/pretype_errors.cmi lib/pp.cmi kernel/names.cmi proofs/logic.cmi \ - kernel/indtypes.cmi pretyping/indrec.cmi kernel/environ.cmi \ - pretyping/cases.cmi -toplevel/metasyntax.cmi: toplevel/vernacexpr.cmo lib/util.cmi \ - interp/topconstr.cmi proofs/tacexpr.cmo interp/ppextend.cmi \ - interp/notation.cmi library/libnames.cmi parsing/extend.cmi \ - interp/constrintern.cmi pretyping/classops.cmi -toplevel/mltop.cmi: kernel/names.cmi library/libobject.cmi -toplevel/protectedtoplevel.cmi: lib/pp.cmi -toplevel/record.cmi: toplevel/vernacexpr.cmo interp/topconstr.cmi \ - kernel/term.cmi kernel/sign.cmi kernel/names.cmi -toplevel/searchisos.cmi: kernel/term.cmi kernel/names.cmi \ - library/libobject.cmi -toplevel/toplevel.cmi: lib/pp.cmi parsing/pcoq.cmi -toplevel/vernacentries.cmi: toplevel/vernacinterp.cmi toplevel/vernacexpr.cmo \ - lib/util.cmi interp/topconstr.cmi kernel/term.cmi kernel/names.cmi \ - library/libnames.cmi pretyping/evd.cmi kernel/environ.cmi -toplevel/vernacinterp.cmi: proofs/tacexpr.cmo -toplevel/vernac.cmi: toplevel/vernacexpr.cmo lib/util.cmi parsing/pcoq.cmi -toplevel/whelp.cmi: interp/topconstr.cmi kernel/term.cmi kernel/names.cmi \ - kernel/environ.cmi -contrib/cc/ccalgo.cmi: lib/util.cmi kernel/term.cmi lib/pp.cmi \ - kernel/names.cmi -contrib/cc/ccproof.cmi: kernel/term.cmi kernel/names.cmi \ - contrib/cc/ccalgo.cmi -contrib/cc/cctac.cmi: kernel/term.cmi proofs/proof_type.cmi \ - contrib/cc/ccproof.cmi -contrib/correctness/past.cmi: lib/util.cmi interp/topconstr.cmi \ - kernel/term.cmi kernel/names.cmi -contrib/correctness/pcicenv.cmi: kernel/term.cmi kernel/sign.cmi \ - kernel/names.cmi -contrib/correctness/pcic.cmi: pretyping/rawterm.cmi -contrib/correctness/pdb.cmi: kernel/names.cmi -contrib/correctness/peffect.cmi: lib/pp.cmi kernel/names.cmi -contrib/correctness/penv.cmi: kernel/term.cmi kernel/names.cmi \ - library/libnames.cmi -contrib/correctness/perror.cmi: lib/util.cmi lib/pp.cmi kernel/names.cmi -contrib/correctness/pextract.cmi: kernel/names.cmi -contrib/correctness/pmisc.cmi: lib/util.cmi interp/topconstr.cmi \ - kernel/term.cmi lib/pp.cmi kernel/names.cmi -contrib/correctness/pmlize.cmi: kernel/names.cmi -contrib/correctness/pmonad.cmi: kernel/term.cmi kernel/names.cmi -contrib/correctness/pred.cmi: kernel/term.cmi -contrib/correctness/prename.cmi: lib/pp.cmi kernel/names.cmi -contrib/correctness/psyntax.cmi: interp/topconstr.cmi parsing/pcoq.cmi -contrib/correctness/ptactic.cmi: proofs/tacmach.cmi -contrib/correctness/ptype.cmi: kernel/term.cmi kernel/names.cmi -contrib/correctness/ptyping.cmi: interp/topconstr.cmi kernel/term.cmi \ - kernel/names.cmi -contrib/correctness/putil.cmi: kernel/term.cmi lib/pp.cmi kernel/names.cmi -contrib/correctness/pwp.cmi: kernel/term.cmi -contrib/dp/dp_cvcl.cmi: contrib/dp/fol.cmi -contrib/dp/dp.cmi: proofs/proof_type.cmi library/libnames.cmi -contrib/dp/dp_simplify.cmi: contrib/dp/fol.cmi -contrib/dp/dp_sorts.cmi: contrib/dp/fol.cmi -contrib/dp/dp_zenon.cmi: contrib/dp/fol.cmi -contrib/extraction/common.cmi: kernel/names.cmi contrib/extraction/mlutil.cmi \ - contrib/extraction/miniml.cmi -contrib/extraction/extract_env.cmi: kernel/names.cmi library/libnames.cmi -contrib/extraction/extraction.cmi: kernel/term.cmi kernel/names.cmi \ - contrib/extraction/miniml.cmi library/libnames.cmi kernel/environ.cmi \ - kernel/declarations.cmi -contrib/extraction/haskell.cmi: lib/pp.cmi kernel/names.cmi \ - contrib/extraction/miniml.cmi -contrib/extraction/miniml.cmi: lib/util.cmi lib/pp.cmi kernel/names.cmi \ - library/libnames.cmi -contrib/extraction/mlutil.cmi: lib/util.cmi kernel/term.cmi kernel/names.cmi \ - contrib/extraction/miniml.cmi library/libnames.cmi -contrib/extraction/modutil.cmi: kernel/names.cmi kernel/mod_subst.cmi \ - contrib/extraction/miniml.cmi library/libnames.cmi kernel/environ.cmi \ - kernel/declarations.cmi -contrib/extraction/ocaml.cmi: lib/pp.cmi kernel/names.cmi \ - contrib/extraction/miniml.cmi library/libnames.cmi -contrib/extraction/scheme.cmi: lib/pp.cmi kernel/names.cmi \ - contrib/extraction/miniml.cmi -contrib/extraction/table.cmi: kernel/term.cmi kernel/names.cmi \ - contrib/extraction/miniml.cmi library/libnames.cmi kernel/environ.cmi \ - kernel/declarations.cmi -contrib/first-order/formula.cmi: kernel/term.cmi proofs/tacmach.cmi \ - kernel/sign.cmi proofs/proof_type.cmi kernel/names.cmi \ - library/libnames.cmi kernel/closure.cmi -contrib/first-order/ground.cmi: proofs/tacmach.cmi \ - contrib/first-order/sequent.cmi proofs/proof_type.cmi -contrib/first-order/instances.cmi: contrib/first-order/unify.cmi \ - kernel/term.cmi proofs/tacmach.cmi contrib/first-order/sequent.cmi \ - contrib/first-order/rules.cmi kernel/names.cmi library/libnames.cmi \ - contrib/first-order/formula.cmi -contrib/first-order/rules.cmi: kernel/term.cmi proofs/tacmach.cmi \ - contrib/first-order/sequent.cmi kernel/names.cmi library/libnames.cmi -contrib/first-order/sequent.cmi: lib/util.cmi kernel/term.cmi \ - proofs/tacmach.cmi proofs/proof_type.cmi kernel/names.cmi \ - library/libnames.cmi lib/heap.cmi contrib/first-order/formula.cmi \ - tactics/auto.cmi -contrib/first-order/unify.cmi: kernel/term.cmi -contrib/funind/functional_principles_proofs.cmi: kernel/term.cmi \ - proofs/tacmach.cmi kernel/names.cmi -contrib/funind/functional_principles_types.cmi: kernel/term.cmi \ - proofs/tacmach.cmi pretyping/rawterm.cmi kernel/names.cmi \ - library/libnames.cmi kernel/entries.cmi -contrib/funind/indfun_common.cmi: kernel/term.cmi proofs/tacexpr.cmo \ - pretyping/rawterm.cmi lib/pp.cmi kernel/names.cmi library/libnames.cmi \ - kernel/entries.cmi library/decl_kinds.cmo -contrib/funind/rawtermops.cmi: lib/util.cmi pretyping/rawterm.cmi \ - kernel/names.cmi library/libnames.cmi -contrib/funind/rawterm_to_relation.cmi: interp/topconstr.cmi \ - pretyping/rawterm.cmi kernel/names.cmi -contrib/funind/tacinvutils.cmi: lib/util.cmi pretyping/termops.cmi \ - kernel/term.cmi tactics/tactics.cmi tactics/tacticals.cmi \ - proofs/tacmach.cmi tactics/tacinterp.cmi tactics/refine.cmi \ - pretyping/reductionops.cmi proofs/proof_type.cmi parsing/printer.cmi \ - lib/pp.cmi kernel/names.cmi pretyping/inductiveops.cmi pretyping/evd.cmi \ - tactics/equality.cmi interp/coqlib.cmi -contrib/interface/blast.cmi: proofs/tacexpr.cmo proofs/proof_type.cmi -contrib/interface/dad.cmi: interp/topconstr.cmi proofs/tacmach.cmi \ - proofs/tacexpr.cmo proofs/proof_type.cmi -contrib/interface/debug_tac.cmi: proofs/tacmach.cmi proofs/tacexpr.cmo \ - proofs/proof_type.cmi pretyping/evd.cmi -contrib/interface/name_to_ast.cmi: toplevel/vernacexpr.cmo \ - library/libnames.cmi -contrib/interface/pbp.cmi: proofs/tacexpr.cmo proofs/proof_type.cmi \ - kernel/names.cmi -contrib/interface/showproof.cmi: toplevel/vernacinterp.cmi lib/util.cmi \ - pretyping/typing.cmi kernel/term.cmi kernel/sign.cmi \ - contrib/interface/showproof_ct.cmo kernel/reduction.cmi \ - proofs/proof_type.cmi proofs/proof_trees.cmi parsing/printer.cmi \ - lib/pp.cmi proofs/pfedit.cmi kernel/names.cmi kernel/inductive.cmi \ - pretyping/evd.cmi kernel/environ.cmi kernel/declarations.cmi \ - pretyping/clenv.cmi contrib/interface/ascent.cmi -contrib/interface/translate.cmi: kernel/term.cmi proofs/proof_type.cmi \ - pretyping/evd.cmi kernel/environ.cmi contrib/interface/ascent.cmi -contrib/interface/vtp.cmi: contrib/interface/ascent.cmi -contrib/interface/xlate.cmi: toplevel/vernacexpr.cmo interp/topconstr.cmi \ - proofs/tacexpr.cmo kernel/names.cmi contrib/interface/ascent.cmi -contrib/jprover/jall.cmi: contrib/jprover/opname.cmi \ - contrib/jprover/jterm.cmi contrib/jprover/jlogic.cmi -contrib/jprover/jlogic.cmi: contrib/jprover/jterm.cmi -contrib/jprover/jterm.cmi: contrib/jprover/opname.cmi -contrib/rtauto/refl_tauto.cmi: kernel/term.cmi proofs/tacmach.cmi \ - proofs/proof_type.cmi contrib/rtauto/proof_search.cmi kernel/names.cmi -contrib/subtac/eterm.cmi: lib/util.cmi kernel/term.cmi proofs/tacmach.cmi \ - kernel/names.cmi pretyping/evd.cmi -contrib/subtac/subtac_cases.cmi: lib/util.cmi kernel/term.cmi \ - pretyping/rawterm.cmi kernel/names.cmi pretyping/inductiveops.cmi \ - pretyping/evd.cmi pretyping/evarutil.cmi kernel/environ.cmi \ - pretyping/coercion.cmi pretyping/cases.cmi -contrib/subtac/subtac_coercion.cmi: pretyping/coercion.cmi -contrib/subtac/subtac_command.cmi: toplevel/vernacexpr.cmo \ - interp/topconstr.cmi kernel/term.cmi pretyping/pretyping.cmi lib/pp.cmi \ - kernel/names.cmi library/libnames.cmi pretyping/evd.cmi \ - kernel/environ.cmi interp/constrintern.cmi -contrib/subtac/subtac_errors.cmi: lib/util.cmi lib/pp.cmi -contrib/subtac/subtac.cmi: toplevel/vernacexpr.cmo lib/util.cmi -contrib/subtac/subtac_obligations.cmi: lib/util.cmi interp/topconstr.cmi \ - kernel/term.cmi proofs/tacexpr.cmo proofs/proof_type.cmi lib/pp.cmi \ - kernel/names.cmi -contrib/subtac/subtac_pretyping.cmi: interp/topconstr.cmi kernel/term.cmi \ - kernel/sign.cmi pretyping/pretyping.cmi kernel/names.cmi \ - library/global.cmi pretyping/evd.cmi kernel/environ.cmi -contrib/subtac/subtac_utils.cmi: lib/util.cmi interp/topconstr.cmi \ - kernel/term.cmi proofs/tacmach.cmi proofs/tacexpr.cmo kernel/sign.cmi \ - pretyping/rawterm.cmi proofs/proof_type.cmi lib/pp.cmi kernel/names.cmi \ - library/libnames.cmi pretyping/evd.cmi pretyping/evarutil.cmi \ - kernel/environ.cmi library/decl_kinds.cmo interp/coqlib.cmi -contrib/xml/doubleTypeInference.cmi: kernel/term.cmi kernel/names.cmi \ - pretyping/evd.cmi kernel/environ.cmi contrib/xml/acic.cmo -contrib/xml/xmlcommand.cmi: contrib/xml/xml.cmi kernel/term.cmi \ - proofs/proof_type.cmi contrib/xml/proof2aproof.cmo library/libnames.cmi \ - pretyping/evd.cmi contrib/xml/acic.cmo -ide/utils/configwin.cmi: ide/utils/config_file.cmi -tools/coqdoc/index.cmi: tools/coqdoc/cdglobals.cmo -tools/coqdoc/output.cmi: tools/coqdoc/index.cmi tools/coqdoc/cdglobals.cmo -tools/coqdoc/pretty.cmi: tools/coqdoc/index.cmi tools/coqdoc/cdglobals.cmo -config/coq_config.cmo: config/coq_config.cmi -config/coq_config.cmx: config/coq_config.cmi -dev/db_printers.cmo: lib/pp.cmi kernel/names.cmi -dev/db_printers.cmx: lib/pp.cmx kernel/names.cmx -dev/top_printers.cmo: toplevel/vernacinterp.cmi lib/util.cmi kernel/univ.cmi \ - pretyping/termops.cmi kernel/term.cmi parsing/tactic_printer.cmi \ - lib/system.cmi kernel/sign.cmi proofs/refiner.cmi proofs/proof_trees.cmi \ - parsing/printer.cmi parsing/pptactic.cmi lib/pp.cmi proofs/pfedit.cmi \ - parsing/pcoq.cmi kernel/names.cmi library/nameops.cmi proofs/logic.cmi \ - library/libobject.cmi library/libnames.cmi library/goptions.cmi \ - library/global.cmi interp/genarg.cmi pretyping/evd.cmi kernel/environ.cmi \ - parsing/egrammar.cmi kernel/declarations.cmi interp/constrintern.cmi \ - interp/constrextern.cmi kernel/closure.cmi pretyping/clenv.cmi \ - toplevel/cerrors.cmi lib/bigint.cmi -dev/top_printers.cmx: toplevel/vernacinterp.cmx lib/util.cmx kernel/univ.cmx \ - pretyping/termops.cmx kernel/term.cmx parsing/tactic_printer.cmx \ - lib/system.cmx kernel/sign.cmx proofs/refiner.cmx proofs/proof_trees.cmx \ - parsing/printer.cmx parsing/pptactic.cmx lib/pp.cmx proofs/pfedit.cmx \ - parsing/pcoq.cmx kernel/names.cmx library/nameops.cmx proofs/logic.cmx \ - library/libobject.cmx library/libnames.cmx library/goptions.cmx \ - library/global.cmx interp/genarg.cmx pretyping/evd.cmx kernel/environ.cmx \ - parsing/egrammar.cmx kernel/declarations.cmx interp/constrintern.cmx \ - interp/constrextern.cmx kernel/closure.cmx pretyping/clenv.cmx \ - toplevel/cerrors.cmx lib/bigint.cmx -dev/vm_printers.cmo: kernel/vm.cmi kernel/term.cmi kernel/names.cmi \ - kernel/cemitcodes.cmi kernel/cbytecodes.cmi -dev/vm_printers.cmx: kernel/vm.cmx kernel/term.cmx kernel/names.cmx \ - kernel/cemitcodes.cmx kernel/cbytecodes.cmx -ide/blaster_window.cmo: ide/ideutils.cmi ide/coq.cmi -ide/blaster_window.cmx: ide/ideutils.cmx ide/coq.cmx -ide/command_windows.cmo: ide/ideutils.cmi ide/coq_commands.cmo ide/coq.cmi \ - ide/command_windows.cmi -ide/command_windows.cmx: ide/ideutils.cmx ide/coq_commands.cmx ide/coq.cmx \ - ide/command_windows.cmi -ide/config_lexer.cmo: lib/util.cmi ide/config_parser.cmi -ide/config_lexer.cmx: lib/util.cmx ide/config_parser.cmx -ide/config_parser.cmo: lib/util.cmi ide/config_parser.cmi -ide/config_parser.cmx: lib/util.cmx ide/config_parser.cmi -ide/coqide.cmo: toplevel/vernacexpr.cmo lib/util.cmi ide/undo.cmi \ - lib/system.cmi ide/preferences.cmi lib/pp.cmi proofs/pfedit.cmi \ - ide/ideutils.cmi ide/highlight.cmo ide/find_phrase.cmo \ - proofs/decl_mode.cmi config/coq_config.cmi ide/coq_commands.cmo \ - ide/coq.cmi ide/command_windows.cmi ide/blaster_window.cmo ide/coqide.cmi -ide/coqide.cmx: toplevel/vernacexpr.cmx lib/util.cmx ide/undo.cmx \ - lib/system.cmx ide/preferences.cmx lib/pp.cmx proofs/pfedit.cmx \ - ide/ideutils.cmx ide/highlight.cmx ide/find_phrase.cmx \ - proofs/decl_mode.cmx config/coq_config.cmx ide/coq_commands.cmx \ - ide/coq.cmx ide/command_windows.cmx ide/blaster_window.cmx ide/coqide.cmi -ide/coq.cmo: toplevel/vernacexpr.cmo toplevel/vernacentries.cmi \ - toplevel/vernac.cmi lib/util.cmi pretyping/termops.cmi kernel/term.cmi \ - proofs/tacmach.cmi tactics/tacinterp.cmi lib/system.cmi \ - library/states.cmi proofs/refiner.cmi pretyping/reductionops.cmi \ - parsing/printer.cmi lib/pp.cmi proofs/pfedit.cmi parsing/pcoq.cmi \ - lib/options.cmi library/nametab.cmi kernel/names.cmi toplevel/mltop.cmi \ - library/library.cmi library/libnames.cmi library/lib.cmi ide/ideutils.cmi \ - tactics/hipattern.cmi library/goptions.cmi library/global.cmi \ - pretyping/evd.cmi pretyping/evarutil.cmi kernel/environ.cmi \ - kernel/declarations.cmi proofs/decl_mode.cmi toplevel/coqtop.cmi \ - config/coq_config.cmi toplevel/cerrors.cmi ide/coq.cmi -ide/coq.cmx: toplevel/vernacexpr.cmx toplevel/vernacentries.cmx \ - toplevel/vernac.cmx lib/util.cmx pretyping/termops.cmx kernel/term.cmx \ - proofs/tacmach.cmx tactics/tacinterp.cmx lib/system.cmx \ - library/states.cmx proofs/refiner.cmx pretyping/reductionops.cmx \ - parsing/printer.cmx lib/pp.cmx proofs/pfedit.cmx parsing/pcoq.cmx \ - lib/options.cmx library/nametab.cmx kernel/names.cmx toplevel/mltop.cmx \ - library/library.cmx library/libnames.cmx library/lib.cmx ide/ideutils.cmx \ - tactics/hipattern.cmx library/goptions.cmx library/global.cmx \ - pretyping/evd.cmx pretyping/evarutil.cmx kernel/environ.cmx \ - kernel/declarations.cmx proofs/decl_mode.cmx toplevel/coqtop.cmx \ - config/coq_config.cmx toplevel/cerrors.cmx ide/coq.cmi -ide/coq_tactics.cmo: ide/coq_tactics.cmi -ide/coq_tactics.cmx: ide/coq_tactics.cmi -ide/find_phrase.cmo: ide/preferences.cmi ide/ideutils.cmi -ide/find_phrase.cmx: ide/preferences.cmx ide/ideutils.cmx -ide/highlight.cmo: ide/ideutils.cmi -ide/highlight.cmx: ide/ideutils.cmx -ide/ideutils.cmo: ide/utf8_convert.cmo lib/system.cmi ide/preferences.cmi \ - lib/pp_control.cmi lib/options.cmi config/coq_config.cmi ide/ideutils.cmi -ide/ideutils.cmx: ide/utf8_convert.cmx lib/system.cmx ide/preferences.cmx \ - lib/pp_control.cmx lib/options.cmx config/coq_config.cmx ide/ideutils.cmi -ide/preferences.cmo: lib/util.cmi lib/system.cmi lib/options.cmi \ - ide/utils/configwin.cmi ide/config_lexer.cmo ide/preferences.cmi -ide/preferences.cmx: lib/util.cmx lib/system.cmx lib/options.cmx \ - ide/utils/configwin.cmx ide/config_lexer.cmx ide/preferences.cmi -ide/undo.cmo: ide/ideutils.cmi ide/undo.cmi -ide/undo.cmx: ide/ideutils.cmx ide/undo.cmi -interp/constrextern.cmo: lib/util.cmi kernel/univ.cmi interp/topconstr.cmi \ - pretyping/termops.cmi kernel/term.cmi kernel/sign.cmi interp/reserve.cmi \ - pretyping/recordops.cmi pretyping/rawterm.cmi lib/pp.cmi \ - pretyping/pattern.cmi lib/options.cmi interp/notation.cmi \ - library/nametab.cmi kernel/names.cmi library/nameops.cmi \ - library/libnames.cmi kernel/inductive.cmi library/impargs.cmi \ - library/global.cmi pretyping/evd.cmi kernel/environ.cmi \ - pretyping/detyping.cmi kernel/declarations.cmi pretyping/classops.cmi \ - lib/bigint.cmi interp/constrextern.cmi -interp/constrextern.cmx: lib/util.cmx kernel/univ.cmx interp/topconstr.cmx \ - pretyping/termops.cmx kernel/term.cmx kernel/sign.cmx interp/reserve.cmx \ - pretyping/recordops.cmx pretyping/rawterm.cmx lib/pp.cmx \ - pretyping/pattern.cmx lib/options.cmx interp/notation.cmx \ - library/nametab.cmx kernel/names.cmx library/nameops.cmx \ - library/libnames.cmx kernel/inductive.cmx library/impargs.cmx \ - library/global.cmx pretyping/evd.cmx kernel/environ.cmx \ - pretyping/detyping.cmx kernel/declarations.cmx pretyping/classops.cmx \ - lib/bigint.cmx interp/constrextern.cmi -interp/constrintern.cmo: lib/util.cmi interp/topconstr.cmi \ - pretyping/termops.cmi kernel/term.cmi interp/syntax_def.cmi \ - kernel/sign.cmi interp/reserve.cmi pretyping/recordops.cmi \ - pretyping/rawterm.cmi pretyping/pretyping.cmi \ - pretyping/pretype_errors.cmi lib/pp.cmi pretyping/pattern.cmi \ - lib/options.cmi interp/notation.cmi library/nametab.cmi kernel/names.cmi \ - library/nameops.cmi library/libnames.cmi library/lib.cmi \ - parsing/lexer.cmi pretyping/inductiveops.cmi kernel/inductive.cmi \ - library/impargs.cmi library/global.cmi pretyping/evd.cmi \ - kernel/environ.cmi kernel/declarations.cmi pretyping/cases.cmi \ - lib/bigint.cmi interp/constrintern.cmi -interp/constrintern.cmx: lib/util.cmx interp/topconstr.cmx \ - pretyping/termops.cmx kernel/term.cmx interp/syntax_def.cmx \ - kernel/sign.cmx interp/reserve.cmx pretyping/recordops.cmx \ - pretyping/rawterm.cmx pretyping/pretyping.cmx \ - pretyping/pretype_errors.cmx lib/pp.cmx pretyping/pattern.cmx \ - lib/options.cmx interp/notation.cmx library/nametab.cmx kernel/names.cmx \ - library/nameops.cmx library/libnames.cmx library/lib.cmx \ - parsing/lexer.cmx pretyping/inductiveops.cmx kernel/inductive.cmx \ - library/impargs.cmx library/global.cmx pretyping/evd.cmx \ - kernel/environ.cmx kernel/declarations.cmx pretyping/cases.cmx \ - lib/bigint.cmx interp/constrintern.cmi -interp/coqlib.cmo: lib/util.cmi kernel/term.cmi lib/pp.cmi \ - pretyping/pattern.cmi library/nametab.cmi kernel/names.cmi \ - library/library.cmi library/libnames.cmi interp/coqlib.cmi -interp/coqlib.cmx: lib/util.cmx kernel/term.cmx lib/pp.cmx \ - pretyping/pattern.cmx library/nametab.cmx kernel/names.cmx \ - library/library.cmx library/libnames.cmx interp/coqlib.cmi -interp/genarg.cmo: lib/util.cmi interp/topconstr.cmi kernel/term.cmi \ - pretyping/rawterm.cmi lib/pp.cmi library/nametab.cmi kernel/names.cmi \ - library/nameops.cmi pretyping/evd.cmi interp/genarg.cmi -interp/genarg.cmx: lib/util.cmx interp/topconstr.cmx kernel/term.cmx \ - pretyping/rawterm.cmx lib/pp.cmx library/nametab.cmx kernel/names.cmx \ - library/nameops.cmx pretyping/evd.cmx interp/genarg.cmi -interp/modintern.cmo: lib/util.cmi interp/topconstr.cmi lib/pp.cmi \ - library/nametab.cmi kernel/names.cmi kernel/modops.cmi \ - library/libnames.cmi pretyping/evd.cmi kernel/entries.cmi \ - interp/constrintern.cmi interp/modintern.cmi -interp/modintern.cmx: lib/util.cmx interp/topconstr.cmx lib/pp.cmx \ - library/nametab.cmx kernel/names.cmx kernel/modops.cmx \ - library/libnames.cmx pretyping/evd.cmx kernel/entries.cmx \ - interp/constrintern.cmx interp/modintern.cmi -interp/notation.cmo: lib/util.cmi interp/topconstr.cmi kernel/term.cmi \ - library/summary.cmi pretyping/reductionops.cmi pretyping/rawterm.cmi \ - interp/ppextend.cmi lib/pp.cmi lib/options.cmi library/nametab.cmi \ - kernel/names.cmi library/libobject.cmi library/libnames.cmi \ - library/lib.cmi lib/gmapl.cmi lib/gmap.cmi library/global.cmi \ - pretyping/classops.cmi lib/bigint.cmi interp/notation.cmi -interp/notation.cmx: lib/util.cmx interp/topconstr.cmx kernel/term.cmx \ - library/summary.cmx pretyping/reductionops.cmx pretyping/rawterm.cmx \ - interp/ppextend.cmx lib/pp.cmx lib/options.cmx library/nametab.cmx \ - kernel/names.cmx library/libobject.cmx library/libnames.cmx \ - library/lib.cmx lib/gmapl.cmx lib/gmap.cmx library/global.cmx \ - pretyping/classops.cmx lib/bigint.cmx interp/notation.cmi -interp/ppextend.cmo: lib/util.cmi lib/pp.cmi kernel/names.cmi \ - interp/ppextend.cmi -interp/ppextend.cmx: lib/util.cmx lib/pp.cmx kernel/names.cmx \ - interp/ppextend.cmi -interp/reserve.cmo: lib/util.cmi library/summary.cmi pretyping/rawterm.cmi \ - lib/pp.cmi kernel/names.cmi library/nameops.cmi library/libobject.cmi \ - library/lib.cmi pretyping/evd.cmi interp/reserve.cmi -interp/reserve.cmx: lib/util.cmx library/summary.cmx pretyping/rawterm.cmx \ - lib/pp.cmx kernel/names.cmx library/nameops.cmx library/libobject.cmx \ - library/lib.cmx pretyping/evd.cmx interp/reserve.cmi -interp/syntax_def.cmo: lib/util.cmi interp/topconstr.cmi library/summary.cmi \ - pretyping/rawterm.cmi lib/pp.cmi interp/notation.cmi library/nametab.cmi \ - kernel/names.cmi library/nameops.cmi library/libobject.cmi \ - library/libnames.cmi library/lib.cmi interp/syntax_def.cmi -interp/syntax_def.cmx: lib/util.cmx interp/topconstr.cmx library/summary.cmx \ - pretyping/rawterm.cmx lib/pp.cmx interp/notation.cmx library/nametab.cmx \ - kernel/names.cmx library/nameops.cmx library/libobject.cmx \ - library/libnames.cmx library/lib.cmx interp/syntax_def.cmi -interp/topconstr.cmo: lib/util.cmi kernel/term.cmi pretyping/rawterm.cmi \ - lib/pp.cmi library/nametab.cmi kernel/names.cmi library/nameops.cmi \ - kernel/mod_subst.cmi library/libnames.cmi pretyping/evd.cmi lib/dyn.cmi \ - pretyping/detyping.cmi lib/bigint.cmi interp/topconstr.cmi -interp/topconstr.cmx: lib/util.cmx kernel/term.cmx pretyping/rawterm.cmx \ - lib/pp.cmx library/nametab.cmx kernel/names.cmx library/nameops.cmx \ - kernel/mod_subst.cmx library/libnames.cmx pretyping/evd.cmx lib/dyn.cmx \ - pretyping/detyping.cmx lib/bigint.cmx interp/topconstr.cmi -kernel/cbytecodes.cmo: kernel/term.cmi kernel/names.cmi kernel/cbytecodes.cmi -kernel/cbytecodes.cmx: kernel/term.cmx kernel/names.cmx kernel/cbytecodes.cmi -kernel/cbytegen.cmo: lib/util.cmi kernel/term.cmi kernel/pre_env.cmi \ - kernel/names.cmi kernel/declarations.cmi kernel/cemitcodes.cmi \ - kernel/cbytecodes.cmi kernel/cbytegen.cmi -kernel/cbytegen.cmx: lib/util.cmx kernel/term.cmx kernel/pre_env.cmx \ - kernel/names.cmx kernel/declarations.cmx kernel/cemitcodes.cmx \ - kernel/cbytecodes.cmx kernel/cbytegen.cmi -kernel/cemitcodes.cmo: kernel/term.cmi kernel/names.cmi kernel/mod_subst.cmi \ - kernel/copcodes.cmo kernel/cbytecodes.cmi kernel/cemitcodes.cmi -kernel/cemitcodes.cmx: kernel/term.cmx kernel/names.cmx kernel/mod_subst.cmx \ - kernel/copcodes.cmx kernel/cbytecodes.cmx kernel/cemitcodes.cmi -kernel/closure.cmo: lib/util.cmi kernel/term.cmi kernel/sign.cmi lib/pp.cmi \ - kernel/names.cmi kernel/esubst.cmi kernel/environ.cmi \ - kernel/declarations.cmi kernel/closure.cmi -kernel/closure.cmx: lib/util.cmx kernel/term.cmx kernel/sign.cmx lib/pp.cmx \ - kernel/names.cmx kernel/esubst.cmx kernel/environ.cmx \ - kernel/declarations.cmx kernel/closure.cmi -kernel/conv_oracle.cmo: kernel/names.cmi kernel/conv_oracle.cmi -kernel/conv_oracle.cmx: kernel/names.cmx kernel/conv_oracle.cmi -kernel/cooking.cmo: lib/util.cmi kernel/typeops.cmi kernel/term.cmi \ - kernel/sign.cmi kernel/reduction.cmi lib/pp.cmi kernel/names.cmi \ - kernel/environ.cmi kernel/declarations.cmi kernel/cemitcodes.cmi \ - kernel/cooking.cmi -kernel/cooking.cmx: lib/util.cmx kernel/typeops.cmx kernel/term.cmx \ - kernel/sign.cmx kernel/reduction.cmx lib/pp.cmx kernel/names.cmx \ - kernel/environ.cmx kernel/declarations.cmx kernel/cemitcodes.cmx \ - kernel/cooking.cmi -kernel/csymtable.cmo: kernel/vm.cmi kernel/term.cmi kernel/pre_env.cmi \ - kernel/names.cmi kernel/declarations.cmi kernel/cemitcodes.cmi \ - kernel/cbytegen.cmi kernel/cbytecodes.cmi kernel/csymtable.cmi -kernel/csymtable.cmx: kernel/vm.cmx kernel/term.cmx kernel/pre_env.cmx \ - kernel/names.cmx kernel/declarations.cmx kernel/cemitcodes.cmx \ - kernel/cbytegen.cmx kernel/cbytecodes.cmx kernel/csymtable.cmi -kernel/declarations.cmo: lib/util.cmi kernel/univ.cmi kernel/term.cmi \ - kernel/sign.cmi lib/rtree.cmi kernel/names.cmi kernel/mod_subst.cmi \ - kernel/cemitcodes.cmi kernel/cbytecodes.cmi kernel/declarations.cmi -kernel/declarations.cmx: lib/util.cmx kernel/univ.cmx kernel/term.cmx \ - kernel/sign.cmx lib/rtree.cmx kernel/names.cmx kernel/mod_subst.cmx \ - kernel/cemitcodes.cmx kernel/cbytecodes.cmx kernel/declarations.cmi -kernel/entries.cmo: kernel/univ.cmi kernel/term.cmi kernel/sign.cmi \ - kernel/names.cmi kernel/entries.cmi -kernel/entries.cmx: kernel/univ.cmx kernel/term.cmx kernel/sign.cmx \ - kernel/names.cmx kernel/entries.cmi -kernel/environ.cmo: lib/util.cmi kernel/univ.cmi kernel/term.cmi \ - kernel/sign.cmi kernel/pre_env.cmi kernel/names.cmi \ - kernel/declarations.cmi kernel/csymtable.cmi kernel/cbytegen.cmi \ - kernel/environ.cmi -kernel/environ.cmx: lib/util.cmx kernel/univ.cmx kernel/term.cmx \ - kernel/sign.cmx kernel/pre_env.cmx kernel/names.cmx \ - kernel/declarations.cmx kernel/csymtable.cmx kernel/cbytegen.cmx \ - kernel/environ.cmi -kernel/esubst.cmo: lib/util.cmi kernel/esubst.cmi -kernel/esubst.cmx: lib/util.cmx kernel/esubst.cmi -kernel/indtypes.cmo: lib/util.cmi kernel/univ.cmi kernel/typeops.cmi \ - kernel/term.cmi kernel/sign.cmi lib/rtree.cmi kernel/reduction.cmi \ - kernel/names.cmi kernel/inductive.cmi kernel/environ.cmi \ - kernel/entries.cmi kernel/declarations.cmi kernel/indtypes.cmi -kernel/indtypes.cmx: lib/util.cmx kernel/univ.cmx kernel/typeops.cmx \ - kernel/term.cmx kernel/sign.cmx lib/rtree.cmx kernel/reduction.cmx \ - kernel/names.cmx kernel/inductive.cmx kernel/environ.cmx \ - kernel/entries.cmx kernel/declarations.cmx kernel/indtypes.cmi -kernel/inductive.cmo: lib/util.cmi kernel/univ.cmi kernel/type_errors.cmi \ - kernel/term.cmi kernel/sign.cmi kernel/reduction.cmi kernel/names.cmi \ - kernel/environ.cmi kernel/declarations.cmi kernel/closure.cmi \ - kernel/inductive.cmi -kernel/inductive.cmx: lib/util.cmx kernel/univ.cmx kernel/type_errors.cmx \ - kernel/term.cmx kernel/sign.cmx kernel/reduction.cmx kernel/names.cmx \ - kernel/environ.cmx kernel/declarations.cmx kernel/closure.cmx \ - kernel/inductive.cmi -kernel/modops.cmo: lib/util.cmi kernel/univ.cmi kernel/term.cmi lib/pp.cmi \ - kernel/names.cmi kernel/mod_subst.cmi kernel/environ.cmi \ - kernel/entries.cmi kernel/declarations.cmi kernel/cemitcodes.cmi \ - kernel/modops.cmi -kernel/modops.cmx: lib/util.cmx kernel/univ.cmx kernel/term.cmx lib/pp.cmx \ - kernel/names.cmx kernel/mod_subst.cmx kernel/environ.cmx \ - kernel/entries.cmx kernel/declarations.cmx kernel/cemitcodes.cmx \ - kernel/modops.cmi -kernel/mod_subst.cmo: lib/util.cmi kernel/term.cmi lib/pp.cmi \ - kernel/names.cmi kernel/mod_subst.cmi -kernel/mod_subst.cmx: lib/util.cmx kernel/term.cmx lib/pp.cmx \ - kernel/names.cmx kernel/mod_subst.cmi -kernel/mod_typing.cmo: lib/util.cmi kernel/univ.cmi kernel/typeops.cmi \ - kernel/term_typing.cmi kernel/subtyping.cmi kernel/reduction.cmi \ - kernel/names.cmi kernel/modops.cmi kernel/mod_subst.cmi \ - kernel/environ.cmi kernel/entries.cmi kernel/declarations.cmi \ - kernel/cemitcodes.cmi kernel/mod_typing.cmi -kernel/mod_typing.cmx: lib/util.cmx kernel/univ.cmx kernel/typeops.cmx \ - kernel/term_typing.cmx kernel/subtyping.cmx kernel/reduction.cmx \ - kernel/names.cmx kernel/modops.cmx kernel/mod_subst.cmx \ - kernel/environ.cmx kernel/entries.cmx kernel/declarations.cmx \ - kernel/cemitcodes.cmx kernel/mod_typing.cmi -kernel/names.cmo: lib/util.cmi lib/predicate.cmi lib/pp.cmi lib/hashcons.cmi \ - kernel/names.cmi -kernel/names.cmx: lib/util.cmx lib/predicate.cmx lib/pp.cmx lib/hashcons.cmx \ - kernel/names.cmi -kernel/pre_env.cmo: lib/util.cmi kernel/univ.cmi kernel/term.cmi \ - kernel/sign.cmi kernel/names.cmi kernel/declarations.cmi \ - kernel/pre_env.cmi -kernel/pre_env.cmx: lib/util.cmx kernel/univ.cmx kernel/term.cmx \ - kernel/sign.cmx kernel/names.cmx kernel/declarations.cmx \ - kernel/pre_env.cmi -kernel/reduction.cmo: lib/util.cmi kernel/univ.cmi kernel/term.cmi \ - kernel/sign.cmi kernel/names.cmi kernel/esubst.cmi kernel/environ.cmi \ - kernel/declarations.cmi kernel/conv_oracle.cmi kernel/closure.cmi \ - kernel/reduction.cmi -kernel/reduction.cmx: lib/util.cmx kernel/univ.cmx kernel/term.cmx \ - kernel/sign.cmx kernel/names.cmx kernel/esubst.cmx kernel/environ.cmx \ - kernel/declarations.cmx kernel/conv_oracle.cmx kernel/closure.cmx \ - kernel/reduction.cmi -kernel/safe_typing.cmo: lib/util.cmi kernel/univ.cmi kernel/typeops.cmi \ - kernel/type_errors.cmi kernel/term_typing.cmi kernel/term.cmi \ - kernel/subtyping.cmi kernel/sign.cmi kernel/reduction.cmi \ - kernel/names.cmi kernel/modops.cmi kernel/mod_typing.cmi \ - kernel/inductive.cmi kernel/indtypes.cmi kernel/environ.cmi \ - kernel/entries.cmi kernel/declarations.cmi kernel/cooking.cmi \ - kernel/safe_typing.cmi -kernel/safe_typing.cmx: lib/util.cmx kernel/univ.cmx kernel/typeops.cmx \ - kernel/type_errors.cmx kernel/term_typing.cmx kernel/term.cmx \ - kernel/subtyping.cmx kernel/sign.cmx kernel/reduction.cmx \ - kernel/names.cmx kernel/modops.cmx kernel/mod_typing.cmx \ - kernel/inductive.cmx kernel/indtypes.cmx kernel/environ.cmx \ - kernel/entries.cmx kernel/declarations.cmx kernel/cooking.cmx \ - kernel/safe_typing.cmi -kernel/sign.cmo: lib/util.cmi kernel/term.cmi kernel/names.cmi \ - kernel/sign.cmi -kernel/sign.cmx: lib/util.cmx kernel/term.cmx kernel/names.cmx \ - kernel/sign.cmi -kernel/subtyping.cmo: lib/util.cmi kernel/univ.cmi kernel/typeops.cmi \ - kernel/term.cmi kernel/sign.cmi kernel/reduction.cmi kernel/pre_env.cmi \ - kernel/names.cmi kernel/modops.cmi kernel/mod_subst.cmi \ - kernel/inductive.cmi kernel/environ.cmi kernel/entries.cmi \ - kernel/declarations.cmi kernel/subtyping.cmi -kernel/subtyping.cmx: lib/util.cmx kernel/univ.cmx kernel/typeops.cmx \ - kernel/term.cmx kernel/sign.cmx kernel/reduction.cmx kernel/pre_env.cmx \ - kernel/names.cmx kernel/modops.cmx kernel/mod_subst.cmx \ - kernel/inductive.cmx kernel/environ.cmx kernel/entries.cmx \ - kernel/declarations.cmx kernel/subtyping.cmi -kernel/term.cmo: lib/util.cmi kernel/univ.cmi lib/pp.cmi kernel/names.cmi \ - lib/hashcons.cmi kernel/esubst.cmi kernel/term.cmi -kernel/term.cmx: lib/util.cmx kernel/univ.cmx lib/pp.cmx kernel/names.cmx \ - lib/hashcons.cmx kernel/esubst.cmx kernel/term.cmi -kernel/term_typing.cmo: lib/util.cmi kernel/univ.cmi kernel/typeops.cmi \ - kernel/type_errors.cmi kernel/term.cmi kernel/sign.cmi \ - kernel/reduction.cmi kernel/names.cmi kernel/inductive.cmi \ - kernel/indtypes.cmi kernel/environ.cmi kernel/entries.cmi \ - kernel/declarations.cmi kernel/cooking.cmi kernel/cemitcodes.cmi \ - kernel/term_typing.cmi -kernel/term_typing.cmx: lib/util.cmx kernel/univ.cmx kernel/typeops.cmx \ - kernel/type_errors.cmx kernel/term.cmx kernel/sign.cmx \ - kernel/reduction.cmx kernel/names.cmx kernel/inductive.cmx \ - kernel/indtypes.cmx kernel/environ.cmx kernel/entries.cmx \ - kernel/declarations.cmx kernel/cooking.cmx kernel/cemitcodes.cmx \ - kernel/term_typing.cmi -kernel/type_errors.cmo: kernel/term.cmi kernel/sign.cmi kernel/reduction.cmi \ - kernel/names.cmi kernel/environ.cmi kernel/type_errors.cmi -kernel/type_errors.cmx: kernel/term.cmx kernel/sign.cmx kernel/reduction.cmx \ - kernel/names.cmx kernel/environ.cmx kernel/type_errors.cmi -kernel/typeops.cmo: lib/util.cmi kernel/univ.cmi kernel/type_errors.cmi \ - kernel/term.cmi kernel/sign.cmi kernel/reduction.cmi kernel/names.cmi \ - kernel/inductive.cmi kernel/environ.cmi kernel/entries.cmi \ - kernel/declarations.cmi kernel/typeops.cmi -kernel/typeops.cmx: lib/util.cmx kernel/univ.cmx kernel/type_errors.cmx \ - kernel/term.cmx kernel/sign.cmx kernel/reduction.cmx kernel/names.cmx \ - kernel/inductive.cmx kernel/environ.cmx kernel/entries.cmx \ - kernel/declarations.cmx kernel/typeops.cmi -kernel/univ.cmo: lib/util.cmi lib/pp.cmi kernel/names.cmi lib/hashcons.cmi \ - kernel/univ.cmi -kernel/univ.cmx: lib/util.cmx lib/pp.cmx kernel/names.cmx lib/hashcons.cmx \ - kernel/univ.cmi -kernel/vconv.cmo: kernel/vm.cmi kernel/univ.cmi kernel/term.cmi \ - kernel/reduction.cmi kernel/names.cmi kernel/environ.cmi \ - kernel/declarations.cmi kernel/csymtable.cmi kernel/conv_oracle.cmi \ - kernel/closure.cmi kernel/vconv.cmi -kernel/vconv.cmx: kernel/vm.cmx kernel/univ.cmx kernel/term.cmx \ - kernel/reduction.cmx kernel/names.cmx kernel/environ.cmx \ - kernel/declarations.cmx kernel/csymtable.cmx kernel/conv_oracle.cmx \ - kernel/closure.cmx kernel/vconv.cmi -kernel/vm.cmo: lib/util.cmi kernel/term.cmi kernel/names.cmi \ - kernel/conv_oracle.cmi kernel/cbytecodes.cmi kernel/vm.cmi -kernel/vm.cmx: lib/util.cmx kernel/term.cmx kernel/names.cmx \ - kernel/conv_oracle.cmx kernel/cbytecodes.cmx kernel/vm.cmi -lib/bigint.cmo: lib/pp.cmi lib/bigint.cmi -lib/bigint.cmx: lib/pp.cmx lib/bigint.cmi -lib/bstack.cmo: lib/util.cmi lib/bstack.cmi -lib/bstack.cmx: lib/util.cmx lib/bstack.cmi -lib/dyn.cmo: lib/util.cmi lib/dyn.cmi -lib/dyn.cmx: lib/util.cmx lib/dyn.cmi -lib/edit.cmo: lib/util.cmi lib/pp.cmi lib/bstack.cmi lib/edit.cmi -lib/edit.cmx: lib/util.cmx lib/pp.cmx lib/bstack.cmx lib/edit.cmi -lib/explore.cmo: lib/explore.cmi -lib/explore.cmx: lib/explore.cmi -lib/gmapl.cmo: lib/util.cmi lib/gmap.cmi lib/gmapl.cmi -lib/gmapl.cmx: lib/util.cmx lib/gmap.cmx lib/gmapl.cmi -lib/gmap.cmo: lib/gmap.cmi -lib/gmap.cmx: lib/gmap.cmi -lib/gset.cmo: lib/gset.cmi -lib/gset.cmx: lib/gset.cmi -lib/hashcons.cmo: lib/hashcons.cmi -lib/hashcons.cmx: lib/hashcons.cmi -lib/heap.cmo: lib/heap.cmi -lib/heap.cmx: lib/heap.cmi -lib/options.cmo: lib/util.cmi lib/options.cmi -lib/options.cmx: lib/util.cmx lib/options.cmi -lib/pp_control.cmo: lib/pp_control.cmi -lib/pp_control.cmx: lib/pp_control.cmi -lib/pp.cmo: lib/pp_control.cmi lib/pp.cmi -lib/pp.cmx: lib/pp_control.cmx lib/pp.cmi -lib/predicate.cmo: lib/predicate.cmi -lib/predicate.cmx: lib/predicate.cmi -lib/profile.cmo: lib/profile.cmi -lib/profile.cmx: lib/profile.cmi -library/declare.cmo: lib/util.cmi kernel/univ.cmi kernel/typeops.cmi \ - kernel/type_errors.cmi kernel/term.cmi library/summary.cmi \ - kernel/sign.cmi kernel/safe_typing.cmi kernel/reduction.cmi lib/pp.cmi \ - lib/options.cmi interp/notation.cmi library/nametab.cmi kernel/names.cmi \ - library/nameops.cmi library/libobject.cmi library/libnames.cmi \ - library/lib.cmi kernel/inductive.cmi kernel/indtypes.cmi \ - library/impargs.cmi library/global.cmi kernel/environ.cmi \ - kernel/entries.cmi library/dischargedhypsmap.cmi toplevel/discharge.cmi \ - kernel/declarations.cmi library/decl_kinds.cmo kernel/cooking.cmi \ - library/declare.cmi -library/declare.cmx: lib/util.cmx kernel/univ.cmx kernel/typeops.cmx \ - kernel/type_errors.cmx kernel/term.cmx library/summary.cmx \ - kernel/sign.cmx kernel/safe_typing.cmx kernel/reduction.cmx lib/pp.cmx \ - lib/options.cmx interp/notation.cmx library/nametab.cmx kernel/names.cmx \ - library/nameops.cmx library/libobject.cmx library/libnames.cmx \ - library/lib.cmx kernel/inductive.cmx kernel/indtypes.cmx \ - library/impargs.cmx library/global.cmx kernel/environ.cmx \ - kernel/entries.cmx library/dischargedhypsmap.cmx toplevel/discharge.cmx \ - kernel/declarations.cmx library/decl_kinds.cmx kernel/cooking.cmx \ - library/declare.cmi -library/declaremods.cmo: lib/util.cmi library/summary.cmi \ - kernel/subtyping.cmi lib/pp.cmi library/nametab.cmi kernel/names.cmi \ - kernel/modops.cmi kernel/mod_typing.cmi kernel/mod_subst.cmi \ - library/libobject.cmi library/libnames.cmi library/lib.cmi \ - library/global.cmi kernel/environ.cmi kernel/entries.cmi \ - kernel/declarations.cmi library/declaremods.cmi -library/declaremods.cmx: lib/util.cmx library/summary.cmx \ - kernel/subtyping.cmx lib/pp.cmx library/nametab.cmx kernel/names.cmx \ - kernel/modops.cmx kernel/mod_typing.cmx kernel/mod_subst.cmx \ - library/libobject.cmx library/libnames.cmx library/lib.cmx \ - library/global.cmx kernel/environ.cmx kernel/entries.cmx \ - kernel/declarations.cmx library/declaremods.cmi -library/decl_kinds.cmo: lib/util.cmi -library/decl_kinds.cmx: lib/util.cmx -library/dischargedhypsmap.cmo: lib/util.cmi kernel/term.cmi \ - library/summary.cmi kernel/reduction.cmi library/nametab.cmi \ - kernel/names.cmi library/libobject.cmi library/libnames.cmi \ - library/lib.cmi kernel/inductive.cmi kernel/environ.cmi \ - kernel/declarations.cmi library/dischargedhypsmap.cmi -library/dischargedhypsmap.cmx: lib/util.cmx kernel/term.cmx \ - library/summary.cmx kernel/reduction.cmx library/nametab.cmx \ - kernel/names.cmx library/libobject.cmx library/libnames.cmx \ - library/lib.cmx kernel/inductive.cmx kernel/environ.cmx \ - kernel/declarations.cmx library/dischargedhypsmap.cmi -library/global.cmo: lib/util.cmi kernel/typeops.cmi kernel/term.cmi \ - library/summary.cmi kernel/sign.cmi kernel/safe_typing.cmi \ - kernel/names.cmi library/libnames.cmi kernel/inductive.cmi \ - kernel/environ.cmi library/global.cmi -library/global.cmx: lib/util.cmx kernel/typeops.cmx kernel/term.cmx \ - library/summary.cmx kernel/sign.cmx kernel/safe_typing.cmx \ - kernel/names.cmx library/libnames.cmx kernel/inductive.cmx \ - kernel/environ.cmx library/global.cmi -library/goptions.cmo: lib/util.cmi kernel/term.cmi library/summary.cmi \ - lib/pp.cmi library/nametab.cmi kernel/names.cmi kernel/mod_subst.cmi \ - library/libobject.cmi library/libnames.cmi library/lib.cmi \ - library/goptions.cmi -library/goptions.cmx: lib/util.cmx kernel/term.cmx library/summary.cmx \ - lib/pp.cmx library/nametab.cmx kernel/names.cmx kernel/mod_subst.cmx \ - library/libobject.cmx library/libnames.cmx library/lib.cmx \ - library/goptions.cmi -library/impargs.cmo: lib/util.cmi kernel/typeops.cmi interp/topconstr.cmi \ - pretyping/termops.cmi kernel/term.cmi library/summary.cmi \ - kernel/reduction.cmi lib/pp.cmi library/nametab.cmi kernel/names.cmi \ - library/libobject.cmi library/libnames.cmi library/lib.cmi \ - kernel/inductive.cmi library/global.cmi kernel/environ.cmi \ - kernel/declarations.cmi library/impargs.cmi -library/impargs.cmx: lib/util.cmx kernel/typeops.cmx interp/topconstr.cmx \ - pretyping/termops.cmx kernel/term.cmx library/summary.cmx \ - kernel/reduction.cmx lib/pp.cmx library/nametab.cmx kernel/names.cmx \ - library/libobject.cmx library/libnames.cmx library/lib.cmx \ - kernel/inductive.cmx library/global.cmx kernel/environ.cmx \ - kernel/declarations.cmx library/impargs.cmi -library/lib.cmo: lib/util.cmi kernel/term.cmi library/summary.cmi \ - kernel/sign.cmi lib/pp.cmi lib/options.cmi library/nametab.cmi \ - kernel/names.cmi library/nameops.cmi library/libobject.cmi \ - library/libnames.cmi kernel/cooking.cmi library/lib.cmi -library/lib.cmx: lib/util.cmx kernel/term.cmx library/summary.cmx \ - kernel/sign.cmx lib/pp.cmx lib/options.cmx library/nametab.cmx \ - kernel/names.cmx library/nameops.cmx library/libobject.cmx \ - library/libnames.cmx kernel/cooking.cmx library/lib.cmi -library/libnames.cmo: lib/util.cmi kernel/term.cmi lib/predicate.cmi \ - lib/pp.cmi kernel/names.cmi library/nameops.cmi kernel/mod_subst.cmi \ - library/libnames.cmi -library/libnames.cmx: lib/util.cmx kernel/term.cmx lib/predicate.cmx \ - lib/pp.cmx kernel/names.cmx library/nameops.cmx kernel/mod_subst.cmx \ - library/libnames.cmi -library/libobject.cmo: lib/util.cmi kernel/names.cmi kernel/mod_subst.cmi \ - library/libnames.cmi lib/dyn.cmi library/libobject.cmi -library/libobject.cmx: lib/util.cmx kernel/names.cmx kernel/mod_subst.cmx \ - library/libnames.cmx lib/dyn.cmx library/libobject.cmi -library/library.cmo: lib/util.cmi lib/system.cmi library/summary.cmi \ - kernel/safe_typing.cmi lib/pp.cmi lib/options.cmi library/nametab.cmi \ - kernel/names.cmi library/nameops.cmi library/libobject.cmi \ - library/libnames.cmi library/lib.cmi library/declaremods.cmi \ - library/library.cmi -library/library.cmx: lib/util.cmx lib/system.cmx library/summary.cmx \ - kernel/safe_typing.cmx lib/pp.cmx lib/options.cmx library/nametab.cmx \ - kernel/names.cmx library/nameops.cmx library/libobject.cmx \ - library/libnames.cmx library/lib.cmx library/declaremods.cmx \ - library/library.cmi -library/nameops.cmo: lib/util.cmi lib/pp.cmi kernel/names.cmi \ - library/nameops.cmi -library/nameops.cmx: lib/util.cmx lib/pp.cmx kernel/names.cmx \ - library/nameops.cmi -library/nametab.cmo: lib/util.cmi library/summary.cmi lib/pp.cmi \ - lib/options.cmi kernel/names.cmi library/nameops.cmi library/libnames.cmi \ - kernel/declarations.cmi library/nametab.cmi -library/nametab.cmx: lib/util.cmx library/summary.cmx lib/pp.cmx \ - lib/options.cmx kernel/names.cmx library/nameops.cmx library/libnames.cmx \ - kernel/declarations.cmx library/nametab.cmi -library/states.cmo: lib/system.cmi library/summary.cmi library/library.cmi \ - library/lib.cmi library/states.cmi -library/states.cmx: lib/system.cmx library/summary.cmx library/library.cmx \ - library/lib.cmx library/states.cmi -library/summary.cmo: lib/util.cmi lib/pp.cmi lib/dyn.cmi library/summary.cmi -library/summary.cmx: lib/util.cmx lib/pp.cmx lib/dyn.cmx library/summary.cmi -lib/rtree.cmo: lib/util.cmi lib/pp.cmi lib/rtree.cmi -lib/rtree.cmx: lib/util.cmx lib/pp.cmx lib/rtree.cmi -lib/system.cmo: lib/util.cmi lib/pp.cmi config/coq_config.cmi lib/system.cmi -lib/system.cmx: lib/util.cmx lib/pp.cmx config/coq_config.cmx lib/system.cmi -lib/tlm.cmo: lib/gset.cmi lib/gmap.cmi lib/tlm.cmi -lib/tlm.cmx: lib/gset.cmx lib/gmap.cmx lib/tlm.cmi -lib/util.cmo: lib/pp.cmi lib/compat.cmo lib/util.cmi -lib/util.cmx: lib/pp.cmx lib/compat.cmx lib/util.cmi -parsing/argextend.cmo: toplevel/vernacexpr.cmo lib/util.cmi \ - parsing/q_util.cmi parsing/q_coqast.cmo parsing/pcoq.cmi \ - interp/genarg.cmi lib/compat.cmo -parsing/argextend.cmx: toplevel/vernacexpr.cmx lib/util.cmx \ - parsing/q_util.cmx parsing/q_coqast.cmx parsing/pcoq.cmx \ - interp/genarg.cmx lib/compat.cmx -parsing/egrammar.cmo: toplevel/vernacexpr.cmo lib/util.cmi \ - interp/topconstr.cmi proofs/tacexpr.cmo library/summary.cmi lib/pp.cmi \ - parsing/pcoq.cmi interp/notation.cmi kernel/names.cmi library/nameops.cmi \ - library/libnames.cmi parsing/lexer.cmi interp/genarg.cmi \ - parsing/extend.cmi lib/bigint.cmi parsing/egrammar.cmi -parsing/egrammar.cmx: toplevel/vernacexpr.cmx lib/util.cmx \ - interp/topconstr.cmx proofs/tacexpr.cmx library/summary.cmx lib/pp.cmx \ - parsing/pcoq.cmx interp/notation.cmx kernel/names.cmx library/nameops.cmx \ - library/libnames.cmx parsing/lexer.cmx interp/genarg.cmx \ - parsing/extend.cmx lib/bigint.cmx parsing/egrammar.cmi -parsing/extend.cmo: lib/util.cmi interp/topconstr.cmi interp/ppextend.cmi \ - lib/pp.cmi kernel/names.cmi interp/genarg.cmi parsing/extend.cmi -parsing/extend.cmx: lib/util.cmx interp/topconstr.cmx interp/ppextend.cmx \ - lib/pp.cmx kernel/names.cmx interp/genarg.cmx parsing/extend.cmi -parsing/g_ascii_syntax.cmo: lib/util.cmi interp/topconstr.cmi \ - pretyping/rawterm.cmi lib/pp.cmi parsing/pcoq.cmi interp/notation.cmi \ - kernel/names.cmi library/libnames.cmi interp/coqlib.cmi lib/bigint.cmi -parsing/g_ascii_syntax.cmx: lib/util.cmx interp/topconstr.cmx \ - pretyping/rawterm.cmx lib/pp.cmx parsing/pcoq.cmx interp/notation.cmx \ - kernel/names.cmx library/libnames.cmx interp/coqlib.cmx lib/bigint.cmx -parsing/g_constr.cmo: lib/util.cmi interp/topconstr.cmi kernel/term.cmi \ - pretyping/rawterm.cmi lib/pp.cmi parsing/pcoq.cmi kernel/names.cmi \ - library/libnames.cmi parsing/lexer.cmi lib/bigint.cmi -parsing/g_constr.cmx: lib/util.cmx interp/topconstr.cmx kernel/term.cmx \ - pretyping/rawterm.cmx lib/pp.cmx parsing/pcoq.cmx kernel/names.cmx \ - library/libnames.cmx parsing/lexer.cmx lib/bigint.cmx -parsing/g_decl_mode.cmo: parsing/grammar.cma interp/topconstr.cmi kernel/term.cmi \ - parsing/pcoq.cmi kernel/names.cmi library/libnames.cmi interp/genarg.cmi \ - proofs/decl_expr.cmi -parsing/g_decl_mode.cmx: parsing/grammar.cma interp/topconstr.cmx kernel/term.cmx \ - parsing/pcoq.cmx kernel/names.cmx library/libnames.cmx interp/genarg.cmx \ - proofs/decl_expr.cmi -parsing/g_ltac.cmo: toplevel/vernacexpr.cmo lib/util.cmi interp/topconstr.cmi \ - proofs/tacexpr.cmo pretyping/rawterm.cmi lib/pp.cmi parsing/pcoq.cmi \ - kernel/names.cmi -parsing/g_ltac.cmx: toplevel/vernacexpr.cmx lib/util.cmx interp/topconstr.cmx \ - proofs/tacexpr.cmx pretyping/rawterm.cmx lib/pp.cmx parsing/pcoq.cmx \ - kernel/names.cmx -parsing/g_minicoq.cmo: lib/util.cmi kernel/univ.cmi kernel/term.cmi \ - lib/pp.cmi kernel/names.cmi parsing/lexer.cmi kernel/environ.cmi \ - parsing/g_minicoq.cmi -parsing/g_minicoq.cmx: lib/util.cmx kernel/univ.cmx kernel/term.cmx \ - lib/pp.cmx kernel/names.cmx parsing/lexer.cmx kernel/environ.cmx \ - parsing/g_minicoq.cmi -parsing/g_natsyntax.cmo: lib/util.cmi pretyping/rawterm.cmi lib/pp.cmi \ - parsing/pcoq.cmi lib/options.cmi interp/notation.cmi kernel/names.cmi \ - library/libnames.cmi interp/coqlib.cmi lib/bigint.cmi \ - parsing/g_natsyntax.cmi -parsing/g_natsyntax.cmx: lib/util.cmx pretyping/rawterm.cmx lib/pp.cmx \ - parsing/pcoq.cmx lib/options.cmx interp/notation.cmx kernel/names.cmx \ - library/libnames.cmx interp/coqlib.cmx lib/bigint.cmx \ - parsing/g_natsyntax.cmi -parsing/g_prim.cmo: lib/util.cmi interp/topconstr.cmi lib/pp.cmi \ - parsing/pcoq.cmi library/nametab.cmi kernel/names.cmi \ - library/libnames.cmi parsing/lexer.cmi lib/bigint.cmi -parsing/g_prim.cmx: lib/util.cmx interp/topconstr.cmx lib/pp.cmx \ - parsing/pcoq.cmx library/nametab.cmx kernel/names.cmx \ - library/libnames.cmx parsing/lexer.cmx lib/bigint.cmx -parsing/g_proofs.cmo: toplevel/vernacexpr.cmo lib/util.cmi \ - interp/topconstr.cmi kernel/term.cmi proofs/tacexpr.cmo \ - pretyping/rawterm.cmi lib/pp.cmi parsing/pcoq.cmi interp/genarg.cmi \ - parsing/g_vernac.cmo -parsing/g_proofs.cmx: toplevel/vernacexpr.cmx lib/util.cmx \ - interp/topconstr.cmx kernel/term.cmx proofs/tacexpr.cmx \ - pretyping/rawterm.cmx lib/pp.cmx parsing/pcoq.cmx interp/genarg.cmx \ - parsing/g_vernac.cmx -parsing/g_rsyntax.cmo: lib/util.cmi interp/topconstr.cmi \ - pretyping/rawterm.cmi lib/pp.cmi parsing/pcoq.cmi interp/notation.cmi \ - kernel/names.cmi library/libnames.cmi lib/bigint.cmi -parsing/g_rsyntax.cmx: lib/util.cmx interp/topconstr.cmx \ - pretyping/rawterm.cmx lib/pp.cmx parsing/pcoq.cmx interp/notation.cmx \ - kernel/names.cmx library/libnames.cmx lib/bigint.cmx -parsing/g_string_syntax.cmo: lib/util.cmi interp/topconstr.cmi \ - pretyping/rawterm.cmi lib/pp.cmi parsing/pcoq.cmi interp/notation.cmi \ - kernel/names.cmi library/libnames.cmi parsing/g_ascii_syntax.cmo \ - interp/coqlib.cmi -parsing/g_string_syntax.cmx: lib/util.cmx interp/topconstr.cmx \ - pretyping/rawterm.cmx lib/pp.cmx parsing/pcoq.cmx interp/notation.cmx \ - kernel/names.cmx library/libnames.cmx parsing/g_ascii_syntax.cmx \ - interp/coqlib.cmx -parsing/g_tactic.cmo: lib/util.cmi interp/topconstr.cmi proofs/tacexpr.cmo \ - pretyping/rawterm.cmi lib/pp.cmi parsing/pcoq.cmi kernel/names.cmi \ - parsing/lexer.cmi interp/genarg.cmi -parsing/g_tactic.cmx: lib/util.cmx interp/topconstr.cmx proofs/tacexpr.cmx \ - pretyping/rawterm.cmx lib/pp.cmx parsing/pcoq.cmx kernel/names.cmx \ - parsing/lexer.cmx interp/genarg.cmx -parsing/g_vernac.cmo: parsing/grammar.cma toplevel/vernacexpr.cmo lib/util.cmi \ - interp/topconstr.cmi pretyping/recordops.cmi pretyping/rawterm.cmi \ - interp/ppextend.cmi lib/pp.cmi parsing/pcoq.cmi lib/options.cmi \ - kernel/names.cmi library/nameops.cmi parsing/lexer.cmi \ - library/goptions.cmi interp/genarg.cmi parsing/g_constr.cmo \ - parsing/extend.cmi proofs/decl_mode.cmi library/decl_kinds.cmo \ - toplevel/class.cmi -parsing/g_vernac.cmx: parsing/grammar.cma toplevel/vernacexpr.cmx lib/util.cmx \ - interp/topconstr.cmx pretyping/recordops.cmx pretyping/rawterm.cmx \ - interp/ppextend.cmx lib/pp.cmx parsing/pcoq.cmx lib/options.cmx \ - kernel/names.cmx library/nameops.cmx parsing/lexer.cmx \ - library/goptions.cmx interp/genarg.cmx parsing/g_constr.cmx \ - parsing/extend.cmx proofs/decl_mode.cmx library/decl_kinds.cmx \ - toplevel/class.cmx -parsing/g_xml.cmo: lib/util.cmi kernel/term.cmi proofs/tacexpr.cmo \ - pretyping/rawterm.cmi lib/pp.cmi parsing/pcoq.cmi library/nametab.cmi \ - kernel/names.cmi library/libnames.cmi pretyping/inductiveops.cmi \ - kernel/inductive.cmi library/global.cmi interp/genarg.cmi \ - pretyping/detyping.cmi kernel/declarations.cmi -parsing/g_xml.cmx: lib/util.cmx kernel/term.cmx proofs/tacexpr.cmx \ - pretyping/rawterm.cmx lib/pp.cmx parsing/pcoq.cmx library/nametab.cmx \ - kernel/names.cmx library/libnames.cmx pretyping/inductiveops.cmx \ - kernel/inductive.cmx library/global.cmx interp/genarg.cmx \ - pretyping/detyping.cmx kernel/declarations.cmx -parsing/g_zsyntax.cmo: lib/util.cmi interp/topconstr.cmi \ - pretyping/rawterm.cmi lib/pp.cmi parsing/pcoq.cmi interp/notation.cmi \ - kernel/names.cmi library/libnames.cmi lib/bigint.cmi \ - parsing/g_zsyntax.cmi -parsing/g_zsyntax.cmx: lib/util.cmx interp/topconstr.cmx \ - pretyping/rawterm.cmx lib/pp.cmx parsing/pcoq.cmx interp/notation.cmx \ - kernel/names.cmx library/libnames.cmx lib/bigint.cmx \ - parsing/g_zsyntax.cmi -parsing/lexer.cmo: lib/util.cmi lib/pp.cmi lib/options.cmi parsing/lexer.cmi -parsing/lexer.cmx: lib/util.cmx lib/pp.cmx lib/options.cmx parsing/lexer.cmi -parsing/pcoq.cmo: lib/util.cmi interp/topconstr.cmi proofs/tacexpr.cmo \ - pretyping/rawterm.cmi interp/ppextend.cmi lib/pp.cmi lib/options.cmi \ - kernel/names.cmi library/libnames.cmi parsing/lexer.cmi interp/genarg.cmi \ - parsing/extend.cmi library/decl_kinds.cmo lib/compat.cmo parsing/pcoq.cmi -parsing/pcoq.cmx: lib/util.cmx interp/topconstr.cmx proofs/tacexpr.cmx \ - pretyping/rawterm.cmx interp/ppextend.cmx lib/pp.cmx lib/options.cmx \ - kernel/names.cmx library/libnames.cmx parsing/lexer.cmx interp/genarg.cmx \ - parsing/extend.cmx library/decl_kinds.cmx lib/compat.cmx parsing/pcoq.cmi -parsing/ppconstr.cmo: lib/util.cmi kernel/univ.cmi interp/topconstr.cmi \ - pretyping/termops.cmi kernel/term.cmi pretyping/rawterm.cmi \ - interp/ppextend.cmi lib/pp.cmi pretyping/pattern.cmi lib/options.cmi \ - interp/notation.cmi library/nametab.cmi kernel/names.cmi \ - library/nameops.cmi library/libnames.cmi interp/genarg.cmi \ - pretyping/evd.cmi interp/constrextern.cmi lib/bigint.cmi \ - parsing/ppconstr.cmi -parsing/ppconstr.cmx: lib/util.cmx kernel/univ.cmx interp/topconstr.cmx \ - pretyping/termops.cmx kernel/term.cmx pretyping/rawterm.cmx \ - interp/ppextend.cmx lib/pp.cmx pretyping/pattern.cmx lib/options.cmx \ - interp/notation.cmx library/nametab.cmx kernel/names.cmx \ - library/nameops.cmx library/libnames.cmx interp/genarg.cmx \ - pretyping/evd.cmx interp/constrextern.cmx lib/bigint.cmx \ - parsing/ppconstr.cmi -parsing/ppdecl_proof.cmo: lib/util.cmi kernel/term.cmi parsing/printer.cmi \ - parsing/pptactic.cmi parsing/ppconstr.cmi lib/pp.cmi kernel/names.cmi \ - library/nameops.cmi kernel/environ.cmi proofs/decl_expr.cmi \ - parsing/ppdecl_proof.cmi -parsing/ppdecl_proof.cmx: lib/util.cmx kernel/term.cmx parsing/printer.cmx \ - parsing/pptactic.cmx parsing/ppconstr.cmx lib/pp.cmx kernel/names.cmx \ - library/nameops.cmx kernel/environ.cmx proofs/decl_expr.cmi \ - parsing/ppdecl_proof.cmi -parsing/pptactic.cmo: lib/util.cmi interp/topconstr.cmi pretyping/termops.cmi \ - kernel/term.cmi proofs/tactic_debug.cmi proofs/tacexpr.cmo \ - pretyping/rawterm.cmi parsing/printer.cmi interp/ppextend.cmi \ - parsing/ppconstr.cmi lib/pp.cmi parsing/pcoq.cmi pretyping/pattern.cmi \ - library/nametab.cmi kernel/names.cmi library/nameops.cmi \ - library/libnames.cmi library/global.cmi interp/genarg.cmi \ - parsing/egrammar.cmi lib/dyn.cmi kernel/closure.cmi parsing/pptactic.cmi -parsing/pptactic.cmx: lib/util.cmx interp/topconstr.cmx pretyping/termops.cmx \ - kernel/term.cmx proofs/tactic_debug.cmx proofs/tacexpr.cmx \ - pretyping/rawterm.cmx parsing/printer.cmx interp/ppextend.cmx \ - parsing/ppconstr.cmx lib/pp.cmx parsing/pcoq.cmx pretyping/pattern.cmx \ - library/nametab.cmx kernel/names.cmx library/nameops.cmx \ - library/libnames.cmx library/global.cmx interp/genarg.cmx \ - parsing/egrammar.cmx lib/dyn.cmx kernel/closure.cmx parsing/pptactic.cmi -parsing/ppvernac.cmo: toplevel/vernacexpr.cmo lib/util.cmi \ - interp/topconstr.cmi tactics/tacinterp.cmi proofs/tacexpr.cmo \ - pretyping/rawterm.cmi parsing/pptactic.cmi interp/ppextend.cmi \ - parsing/ppconstr.cmi lib/pp.cmi proofs/pfedit.cmi parsing/pcoq.cmi \ - lib/options.cmi library/nametab.cmi kernel/names.cmi library/nameops.cmi \ - interp/modintern.cmi library/libnames.cmi library/lib.cmi \ - library/impargs.cmi library/goptions.cmi library/global.cmi \ - interp/genarg.cmi parsing/extend.cmi parsing/egrammar.cmi \ - library/declaremods.cmi library/decl_kinds.cmo parsing/ppvernac.cmi -parsing/ppvernac.cmx: toplevel/vernacexpr.cmx lib/util.cmx \ - interp/topconstr.cmx tactics/tacinterp.cmx proofs/tacexpr.cmx \ - pretyping/rawterm.cmx parsing/pptactic.cmx interp/ppextend.cmx \ - parsing/ppconstr.cmx lib/pp.cmx proofs/pfedit.cmx parsing/pcoq.cmx \ - lib/options.cmx library/nametab.cmx kernel/names.cmx library/nameops.cmx \ - interp/modintern.cmx library/libnames.cmx library/lib.cmx \ - library/impargs.cmx library/goptions.cmx library/global.cmx \ - interp/genarg.cmx parsing/extend.cmx parsing/egrammar.cmx \ - library/declaremods.cmx library/decl_kinds.cmx parsing/ppvernac.cmi -parsing/prettyp.cmo: lib/util.cmi pretyping/termops.cmi kernel/term.cmi \ - interp/syntax_def.cmi kernel/sign.cmi kernel/safe_typing.cmi \ - pretyping/reductionops.cmi kernel/reduction.cmi pretyping/recordops.cmi \ - parsing/printmod.cmi parsing/printer.cmi lib/pp.cmi interp/notation.cmi \ - library/nametab.cmi kernel/names.cmi library/nameops.cmi \ - library/libobject.cmi library/libnames.cmi library/lib.cmi \ - pretyping/inductiveops.cmi kernel/inductive.cmi library/impargs.cmi \ - library/global.cmi pretyping/evd.cmi kernel/environ.cmi \ - library/declare.cmi kernel/declarations.cmi kernel/conv_oracle.cmi \ - interp/constrextern.cmi pretyping/classops.cmi parsing/prettyp.cmi -parsing/prettyp.cmx: lib/util.cmx pretyping/termops.cmx kernel/term.cmx \ - interp/syntax_def.cmx kernel/sign.cmx kernel/safe_typing.cmx \ - pretyping/reductionops.cmx kernel/reduction.cmx pretyping/recordops.cmx \ - parsing/printmod.cmx parsing/printer.cmx lib/pp.cmx interp/notation.cmx \ - library/nametab.cmx kernel/names.cmx library/nameops.cmx \ - library/libobject.cmx library/libnames.cmx library/lib.cmx \ - pretyping/inductiveops.cmx kernel/inductive.cmx library/impargs.cmx \ - library/global.cmx pretyping/evd.cmx kernel/environ.cmx \ - library/declare.cmx kernel/declarations.cmx kernel/conv_oracle.cmx \ - interp/constrextern.cmx pretyping/classops.cmx parsing/prettyp.cmi -parsing/printer.cmo: lib/util.cmi pretyping/termops.cmi kernel/term.cmi \ - kernel/sign.cmi proofs/refiner.cmi proofs/proof_type.cmi \ - parsing/ppconstr.cmi lib/pp.cmi proofs/pfedit.cmi lib/options.cmi \ - library/nametab.cmi kernel/names.cmi library/nameops.cmi \ - library/libnames.cmi library/global.cmi pretyping/evd.cmi \ - pretyping/evarutil.cmi kernel/environ.cmi library/declare.cmi \ - proofs/decl_mode.cmi interp/constrextern.cmi parsing/printer.cmi -parsing/printer.cmx: lib/util.cmx pretyping/termops.cmx kernel/term.cmx \ - kernel/sign.cmx proofs/refiner.cmx proofs/proof_type.cmx \ - parsing/ppconstr.cmx lib/pp.cmx proofs/pfedit.cmx lib/options.cmx \ - library/nametab.cmx kernel/names.cmx library/nameops.cmx \ - library/libnames.cmx library/global.cmx pretyping/evd.cmx \ - pretyping/evarutil.cmx kernel/environ.cmx library/declare.cmx \ - proofs/decl_mode.cmx interp/constrextern.cmx parsing/printer.cmi -parsing/printmod.cmo: lib/util.cmi lib/pp.cmi library/nametab.cmi \ - kernel/names.cmi library/nameops.cmi library/libnames.cmi \ - library/global.cmi kernel/declarations.cmi parsing/printmod.cmi -parsing/printmod.cmx: lib/util.cmx lib/pp.cmx library/nametab.cmx \ - kernel/names.cmx library/nameops.cmx library/libnames.cmx \ - library/global.cmx kernel/declarations.cmx parsing/printmod.cmi -parsing/q_constr.cmo: lib/util.cmi kernel/term.cmi pretyping/rawterm.cmi \ - parsing/q_util.cmi pretyping/pattern.cmi kernel/names.cmi -parsing/q_constr.cmx: lib/util.cmx kernel/term.cmx pretyping/rawterm.cmx \ - parsing/q_util.cmx pretyping/pattern.cmx kernel/names.cmx -parsing/q_coqast.cmo: lib/util.cmi interp/topconstr.cmi proofs/tacexpr.cmo \ - pretyping/rawterm.cmi parsing/q_util.cmi parsing/pcoq.cmi \ - kernel/names.cmi library/libnames.cmi interp/genarg.cmi -parsing/q_coqast.cmx: lib/util.cmx interp/topconstr.cmx proofs/tacexpr.cmx \ - pretyping/rawterm.cmx parsing/q_util.cmx parsing/pcoq.cmx \ - kernel/names.cmx library/libnames.cmx interp/genarg.cmx -parsing/q_util.cmo: toplevel/vernacexpr.cmo lib/util.cmi parsing/pcoq.cmi \ - interp/genarg.cmi parsing/q_util.cmi -parsing/q_util.cmx: toplevel/vernacexpr.cmx lib/util.cmx parsing/pcoq.cmx \ - interp/genarg.cmx parsing/q_util.cmi -parsing/search.cmo: lib/util.cmi pretyping/typing.cmi kernel/typeops.cmi \ - pretyping/termops.cmi kernel/term.cmi pretyping/rawterm.cmi \ - parsing/printer.cmi lib/pp.cmi pretyping/pattern.cmi library/nametab.cmi \ - kernel/names.cmi library/nameops.cmi pretyping/matching.cmi \ - library/libobject.cmi library/libnames.cmi pretyping/inductiveops.cmi \ - library/global.cmi pretyping/evd.cmi kernel/environ.cmi \ - library/declaremods.cmi library/declare.cmi kernel/declarations.cmi \ - interp/coqlib.cmi parsing/search.cmi -parsing/search.cmx: lib/util.cmx pretyping/typing.cmx kernel/typeops.cmx \ - pretyping/termops.cmx kernel/term.cmx pretyping/rawterm.cmx \ - parsing/printer.cmx lib/pp.cmx pretyping/pattern.cmx library/nametab.cmx \ - kernel/names.cmx library/nameops.cmx pretyping/matching.cmx \ - library/libobject.cmx library/libnames.cmx pretyping/inductiveops.cmx \ - library/global.cmx pretyping/evd.cmx kernel/environ.cmx \ - library/declaremods.cmx library/declare.cmx kernel/declarations.cmx \ - interp/coqlib.cmx parsing/search.cmi -parsing/tacextend.cmo: lib/util.cmi parsing/q_util.cmi parsing/q_coqast.cmo \ - lib/pp_control.cmi lib/pp.cmi parsing/pcoq.cmi interp/genarg.cmi \ - parsing/argextend.cmo -parsing/tacextend.cmx: lib/util.cmx parsing/q_util.cmx parsing/q_coqast.cmx \ - lib/pp_control.cmx lib/pp.cmx parsing/pcoq.cmx interp/genarg.cmx \ - parsing/argextend.cmx -parsing/tactic_printer.cmo: lib/util.cmi proofs/tacexpr.cmo kernel/sign.cmi \ - proofs/refiner.cmi proofs/proof_type.cmi proofs/proof_trees.cmi \ - parsing/printer.cmi parsing/pptactic.cmi parsing/ppdecl_proof.cmi \ - lib/pp.cmi proofs/logic.cmi library/global.cmi pretyping/evd.cmi \ - kernel/environ.cmi proofs/decl_expr.cmi parsing/tactic_printer.cmi -parsing/tactic_printer.cmx: lib/util.cmx proofs/tacexpr.cmx kernel/sign.cmx \ - proofs/refiner.cmx proofs/proof_type.cmx proofs/proof_trees.cmx \ - parsing/printer.cmx parsing/pptactic.cmx parsing/ppdecl_proof.cmx \ - lib/pp.cmx proofs/logic.cmx library/global.cmx pretyping/evd.cmx \ - kernel/environ.cmx proofs/decl_expr.cmi parsing/tactic_printer.cmi -parsing/vernacextend.cmo: lib/util.cmi parsing/q_util.cmi \ - parsing/q_coqast.cmo lib/pp_control.cmi lib/pp.cmi interp/genarg.cmi \ - parsing/argextend.cmo -parsing/vernacextend.cmx: lib/util.cmx parsing/q_util.cmx \ - parsing/q_coqast.cmx lib/pp_control.cmx lib/pp.cmx interp/genarg.cmx \ - parsing/argextend.cmx -pretyping/cases.cmo: lib/util.cmi kernel/typeops.cmi kernel/type_errors.cmi \ - pretyping/termops.cmi kernel/term.cmi kernel/sign.cmi \ - pretyping/retyping.cmi pretyping/reductionops.cmi pretyping/rawterm.cmi \ - pretyping/pretype_errors.cmi lib/pp.cmi kernel/names.cmi \ - library/nameops.cmi pretyping/inductiveops.cmi kernel/inductive.cmi \ - library/global.cmi pretyping/evd.cmi pretyping/evarutil.cmi \ - pretyping/evarconv.cmi kernel/environ.cmi kernel/declarations.cmi \ - pretyping/coercion.cmi kernel/closure.cmi pretyping/cases.cmi -pretyping/cases.cmx: lib/util.cmx kernel/typeops.cmx kernel/type_errors.cmx \ - pretyping/termops.cmx kernel/term.cmx kernel/sign.cmx \ - pretyping/retyping.cmx pretyping/reductionops.cmx pretyping/rawterm.cmx \ - pretyping/pretype_errors.cmx lib/pp.cmx kernel/names.cmx \ - library/nameops.cmx pretyping/inductiveops.cmx kernel/inductive.cmx \ - library/global.cmx pretyping/evd.cmx pretyping/evarutil.cmx \ - pretyping/evarconv.cmx kernel/environ.cmx kernel/declarations.cmx \ - pretyping/coercion.cmx kernel/closure.cmx pretyping/cases.cmi -pretyping/cbv.cmo: lib/util.cmi kernel/univ.cmi kernel/term.cmi lib/pp.cmi \ - kernel/names.cmi pretyping/evd.cmi kernel/esubst.cmi kernel/environ.cmi \ - kernel/conv_oracle.cmi kernel/closure.cmi pretyping/cbv.cmi -pretyping/cbv.cmx: lib/util.cmx kernel/univ.cmx kernel/term.cmx lib/pp.cmx \ - kernel/names.cmx pretyping/evd.cmx kernel/esubst.cmx kernel/environ.cmx \ - kernel/conv_oracle.cmx kernel/closure.cmx pretyping/cbv.cmi -pretyping/classops.cmo: lib/util.cmi pretyping/termops.cmi kernel/term.cmi \ - pretyping/tacred.cmi library/summary.cmi pretyping/reductionops.cmi \ - pretyping/rawterm.cmi lib/pp.cmi lib/options.cmi library/nametab.cmi \ - kernel/names.cmi kernel/mod_subst.cmi library/library.cmi \ - library/libobject.cmi library/libnames.cmi library/lib.cmi \ - pretyping/inductiveops.cmi library/goptions.cmi lib/gmap.cmi \ - library/global.cmi pretyping/evd.cmi kernel/environ.cmi \ - library/decl_kinds.cmo pretyping/classops.cmi -pretyping/classops.cmx: lib/util.cmx pretyping/termops.cmx kernel/term.cmx \ - pretyping/tacred.cmx library/summary.cmx pretyping/reductionops.cmx \ - pretyping/rawterm.cmx lib/pp.cmx lib/options.cmx library/nametab.cmx \ - kernel/names.cmx kernel/mod_subst.cmx library/library.cmx \ - library/libobject.cmx library/libnames.cmx library/lib.cmx \ - pretyping/inductiveops.cmx library/goptions.cmx lib/gmap.cmx \ - library/global.cmx pretyping/evd.cmx kernel/environ.cmx \ - library/decl_kinds.cmx pretyping/classops.cmi -pretyping/clenv.cmo: lib/util.cmi pretyping/unification.cmi \ - pretyping/typing.cmi pretyping/termops.cmi kernel/term.cmi \ - pretyping/tacred.cmi proofs/tacexpr.cmo kernel/sign.cmi \ - pretyping/retyping.cmi pretyping/reductionops.cmi kernel/reduction.cmi \ - pretyping/rawterm.cmi pretyping/pretype_errors.cmi lib/pp.cmi \ - pretyping/pattern.cmi kernel/names.cmi library/nameops.cmi \ - kernel/mod_subst.cmi library/global.cmi pretyping/evd.cmi \ - pretyping/evarutil.cmi kernel/environ.cmi pretyping/coercion.cmi \ - pretyping/clenv.cmi -pretyping/clenv.cmx: lib/util.cmx pretyping/unification.cmx \ - pretyping/typing.cmx pretyping/termops.cmx kernel/term.cmx \ - pretyping/tacred.cmx proofs/tacexpr.cmx kernel/sign.cmx \ - pretyping/retyping.cmx pretyping/reductionops.cmx kernel/reduction.cmx \ - pretyping/rawterm.cmx pretyping/pretype_errors.cmx lib/pp.cmx \ - pretyping/pattern.cmx kernel/names.cmx library/nameops.cmx \ - kernel/mod_subst.cmx library/global.cmx pretyping/evd.cmx \ - pretyping/evarutil.cmx kernel/environ.cmx pretyping/coercion.cmx \ - pretyping/clenv.cmi -pretyping/coercion.cmo: lib/util.cmi kernel/typeops.cmi pretyping/termops.cmi \ - kernel/term.cmi pretyping/retyping.cmi pretyping/reductionops.cmi \ - kernel/reduction.cmi pretyping/recordops.cmi pretyping/rawterm.cmi \ - pretyping/pretype_errors.cmi kernel/names.cmi pretyping/evd.cmi \ - pretyping/evarutil.cmi pretyping/evarconv.cmi kernel/environ.cmi \ - pretyping/classops.cmi pretyping/coercion.cmi -pretyping/coercion.cmx: lib/util.cmx kernel/typeops.cmx pretyping/termops.cmx \ - kernel/term.cmx pretyping/retyping.cmx pretyping/reductionops.cmx \ - kernel/reduction.cmx pretyping/recordops.cmx pretyping/rawterm.cmx \ - pretyping/pretype_errors.cmx kernel/names.cmx pretyping/evd.cmx \ - pretyping/evarutil.cmx pretyping/evarconv.cmx kernel/environ.cmx \ - pretyping/classops.cmx pretyping/coercion.cmi -pretyping/detyping.cmo: lib/util.cmi kernel/univ.cmi pretyping/termops.cmi \ - kernel/term.cmi kernel/sign.cmi pretyping/rawterm.cmi lib/pp.cmi \ - lib/options.cmi library/nametab.cmi kernel/names.cmi library/nameops.cmi \ - kernel/mod_subst.cmi library/libnames.cmi pretyping/inductiveops.cmi \ - kernel/inductive.cmi library/goptions.cmi library/global.cmi \ - pretyping/evd.cmi kernel/environ.cmi kernel/declarations.cmi \ - pretyping/detyping.cmi -pretyping/detyping.cmx: lib/util.cmx kernel/univ.cmx pretyping/termops.cmx \ - kernel/term.cmx kernel/sign.cmx pretyping/rawterm.cmx lib/pp.cmx \ - lib/options.cmx library/nametab.cmx kernel/names.cmx library/nameops.cmx \ - kernel/mod_subst.cmx library/libnames.cmx pretyping/inductiveops.cmx \ - kernel/inductive.cmx library/goptions.cmx library/global.cmx \ - pretyping/evd.cmx kernel/environ.cmx kernel/declarations.cmx \ - pretyping/detyping.cmi -pretyping/evarconv.cmo: lib/util.cmi pretyping/typing.cmi \ - pretyping/termops.cmi kernel/term.cmi pretyping/reductionops.cmi \ - kernel/reduction.cmi pretyping/recordops.cmi lib/pp.cmi kernel/names.cmi \ - library/libnames.cmi pretyping/evd.cmi pretyping/evarutil.cmi \ - kernel/environ.cmi kernel/closure.cmi pretyping/classops.cmi \ - pretyping/evarconv.cmi -pretyping/evarconv.cmx: lib/util.cmx pretyping/typing.cmx \ - pretyping/termops.cmx kernel/term.cmx pretyping/reductionops.cmx \ - kernel/reduction.cmx pretyping/recordops.cmx lib/pp.cmx kernel/names.cmx \ - library/libnames.cmx pretyping/evd.cmx pretyping/evarutil.cmx \ - kernel/environ.cmx kernel/closure.cmx pretyping/classops.cmx \ - pretyping/evarconv.cmi -pretyping/evarutil.cmo: lib/util.cmi kernel/univ.cmi pretyping/typing.cmi \ - kernel/typeops.cmi pretyping/termops.cmi kernel/term.cmi kernel/sign.cmi \ - pretyping/reductionops.cmi kernel/reduction.cmi \ - pretyping/pretype_errors.cmi lib/pp.cmi kernel/names.cmi \ - library/nameops.cmi library/global.cmi pretyping/evd.cmi \ - kernel/environ.cmi pretyping/evarutil.cmi -pretyping/evarutil.cmx: lib/util.cmx kernel/univ.cmx pretyping/typing.cmx \ - kernel/typeops.cmx pretyping/termops.cmx kernel/term.cmx kernel/sign.cmx \ - pretyping/reductionops.cmx kernel/reduction.cmx \ - pretyping/pretype_errors.cmx lib/pp.cmx kernel/names.cmx \ - library/nameops.cmx library/global.cmx pretyping/evd.cmx \ - kernel/environ.cmx pretyping/evarutil.cmi -pretyping/evd.cmo: lib/util.cmi kernel/univ.cmi pretyping/termops.cmi \ - kernel/term.cmi kernel/sign.cmi kernel/reduction.cmi lib/pp.cmi \ - kernel/names.cmi library/nameops.cmi kernel/mod_subst.cmi \ - library/libnames.cmi library/global.cmi kernel/environ.cmi lib/dyn.cmi \ - pretyping/evd.cmi -pretyping/evd.cmx: lib/util.cmx kernel/univ.cmx pretyping/termops.cmx \ - kernel/term.cmx kernel/sign.cmx kernel/reduction.cmx lib/pp.cmx \ - kernel/names.cmx library/nameops.cmx kernel/mod_subst.cmx \ - library/libnames.cmx library/global.cmx kernel/environ.cmx lib/dyn.cmx \ - pretyping/evd.cmi -pretyping/indrec.cmo: lib/util.cmi kernel/typeops.cmi kernel/type_errors.cmi \ - pretyping/termops.cmi kernel/term.cmi kernel/sign.cmi \ - kernel/safe_typing.cmi pretyping/reductionops.cmi kernel/reduction.cmi \ - lib/pp.cmi lib/options.cmi library/nametab.cmi kernel/names.cmi \ - library/nameops.cmi library/libnames.cmi pretyping/inductiveops.cmi \ - kernel/inductive.cmi library/global.cmi kernel/environ.cmi \ - kernel/entries.cmi kernel/declarations.cmi pretyping/indrec.cmi -pretyping/indrec.cmx: lib/util.cmx kernel/typeops.cmx kernel/type_errors.cmx \ - pretyping/termops.cmx kernel/term.cmx kernel/sign.cmx \ - kernel/safe_typing.cmx pretyping/reductionops.cmx kernel/reduction.cmx \ - lib/pp.cmx lib/options.cmx library/nametab.cmx kernel/names.cmx \ - library/nameops.cmx library/libnames.cmx pretyping/inductiveops.cmx \ - kernel/inductive.cmx library/global.cmx kernel/environ.cmx \ - kernel/entries.cmx kernel/declarations.cmx pretyping/indrec.cmi -pretyping/inductiveops.cmo: lib/util.cmi kernel/univ.cmi \ - pretyping/termops.cmi kernel/term.cmi kernel/sign.cmi \ - pretyping/reductionops.cmi kernel/names.cmi kernel/mod_subst.cmi \ - kernel/inductive.cmi library/global.cmi pretyping/evd.cmi \ - kernel/environ.cmi kernel/declarations.cmi pretyping/inductiveops.cmi -pretyping/inductiveops.cmx: lib/util.cmx kernel/univ.cmx \ - pretyping/termops.cmx kernel/term.cmx kernel/sign.cmx \ - pretyping/reductionops.cmx kernel/names.cmx kernel/mod_subst.cmx \ - kernel/inductive.cmx library/global.cmx pretyping/evd.cmx \ - kernel/environ.cmx kernel/declarations.cmx pretyping/inductiveops.cmi -pretyping/matching.cmo: lib/util.cmi pretyping/termops.cmi kernel/term.cmi \ - kernel/sign.cmi pretyping/reductionops.cmi pretyping/rawterm.cmi \ - pretyping/pattern.cmi kernel/names.cmi library/nameops.cmi \ - library/libnames.cmi kernel/environ.cmi pretyping/matching.cmi -pretyping/matching.cmx: lib/util.cmx pretyping/termops.cmx kernel/term.cmx \ - kernel/sign.cmx pretyping/reductionops.cmx pretyping/rawterm.cmx \ - pretyping/pattern.cmx kernel/names.cmx library/nameops.cmx \ - library/libnames.cmx kernel/environ.cmx pretyping/matching.cmi -pretyping/pattern.cmo: lib/util.cmi kernel/term.cmi pretyping/rawterm.cmi \ - lib/pp.cmi lib/options.cmi library/nametab.cmi kernel/names.cmi \ - library/nameops.cmi kernel/mod_subst.cmi library/libnames.cmi \ - pretyping/inductiveops.cmi pretyping/evd.cmi kernel/environ.cmi \ - pretyping/pattern.cmi -pretyping/pattern.cmx: lib/util.cmx kernel/term.cmx pretyping/rawterm.cmx \ - lib/pp.cmx lib/options.cmx library/nametab.cmx kernel/names.cmx \ - library/nameops.cmx kernel/mod_subst.cmx library/libnames.cmx \ - pretyping/inductiveops.cmx pretyping/evd.cmx kernel/environ.cmx \ - pretyping/pattern.cmi -pretyping/pretype_errors.cmo: lib/util.cmi kernel/type_errors.cmi \ - pretyping/termops.cmi kernel/term.cmi kernel/sign.cmi \ - pretyping/reductionops.cmi kernel/reduction.cmi pretyping/rawterm.cmi \ - library/nametab.cmi kernel/names.cmi pretyping/inductiveops.cmi \ - pretyping/evd.cmi kernel/environ.cmi pretyping/pretype_errors.cmi -pretyping/pretype_errors.cmx: lib/util.cmx kernel/type_errors.cmx \ - pretyping/termops.cmx kernel/term.cmx kernel/sign.cmx \ - pretyping/reductionops.cmx kernel/reduction.cmx pretyping/rawterm.cmx \ - library/nametab.cmx kernel/names.cmx pretyping/inductiveops.cmx \ - pretyping/evd.cmx kernel/environ.cmx pretyping/pretype_errors.cmi -pretyping/pretyping.cmo: lib/util.cmi kernel/typeops.cmi \ - kernel/type_errors.cmi pretyping/termops.cmi kernel/term.cmi \ - kernel/sign.cmi pretyping/retyping.cmi pretyping/reductionops.cmi \ - pretyping/recordops.cmi pretyping/rawterm.cmi \ - pretyping/pretype_errors.cmi lib/pp.cmi pretyping/pattern.cmi \ - kernel/names.cmi library/nameops.cmi library/libnames.cmi \ - pretyping/inductiveops.cmi kernel/inductive.cmi pretyping/evd.cmi \ - pretyping/evarutil.cmi pretyping/evarconv.cmi kernel/environ.cmi \ - lib/dyn.cmi kernel/declarations.cmi pretyping/coercion.cmi \ - pretyping/classops.cmi pretyping/cases.cmi pretyping/pretyping.cmi -pretyping/pretyping.cmx: lib/util.cmx kernel/typeops.cmx \ - kernel/type_errors.cmx pretyping/termops.cmx kernel/term.cmx \ - kernel/sign.cmx pretyping/retyping.cmx pretyping/reductionops.cmx \ - pretyping/recordops.cmx pretyping/rawterm.cmx \ - pretyping/pretype_errors.cmx lib/pp.cmx pretyping/pattern.cmx \ - kernel/names.cmx library/nameops.cmx library/libnames.cmx \ - pretyping/inductiveops.cmx kernel/inductive.cmx pretyping/evd.cmx \ - pretyping/evarutil.cmx pretyping/evarconv.cmx kernel/environ.cmx \ - lib/dyn.cmx kernel/declarations.cmx pretyping/coercion.cmx \ - pretyping/classops.cmx pretyping/cases.cmx pretyping/pretyping.cmi -pretyping/rawterm.cmo: lib/util.cmi kernel/univ.cmi kernel/term.cmi \ - kernel/sign.cmi library/nametab.cmi kernel/names.cmi library/libnames.cmi \ - pretyping/evd.cmi lib/dyn.cmi pretyping/rawterm.cmi -pretyping/rawterm.cmx: lib/util.cmx kernel/univ.cmx kernel/term.cmx \ - kernel/sign.cmx library/nametab.cmx kernel/names.cmx library/libnames.cmx \ - pretyping/evd.cmx lib/dyn.cmx pretyping/rawterm.cmi -pretyping/recordops.cmo: lib/util.cmi kernel/typeops.cmi \ - pretyping/termops.cmi kernel/term.cmi library/summary.cmi \ - pretyping/reductionops.cmi lib/pp.cmi library/nametab.cmi \ - kernel/names.cmi library/nameops.cmi kernel/mod_subst.cmi \ - library/library.cmi library/libobject.cmi library/libnames.cmi \ - library/lib.cmi pretyping/inductiveops.cmi library/global.cmi \ - pretyping/evd.cmi kernel/environ.cmi kernel/declarations.cmi \ - pretyping/classops.cmi pretyping/recordops.cmi -pretyping/recordops.cmx: lib/util.cmx kernel/typeops.cmx \ - pretyping/termops.cmx kernel/term.cmx library/summary.cmx \ - pretyping/reductionops.cmx lib/pp.cmx library/nametab.cmx \ - kernel/names.cmx library/nameops.cmx kernel/mod_subst.cmx \ - library/library.cmx library/libobject.cmx library/libnames.cmx \ - library/lib.cmx pretyping/inductiveops.cmx library/global.cmx \ - pretyping/evd.cmx kernel/environ.cmx kernel/declarations.cmx \ - pretyping/classops.cmx pretyping/recordops.cmi -pretyping/reductionops.cmo: lib/util.cmi kernel/univ.cmi \ - pretyping/termops.cmi kernel/term.cmi kernel/sign.cmi \ - kernel/reduction.cmi lib/pp.cmi kernel/names.cmi pretyping/evd.cmi \ - kernel/esubst.cmi kernel/environ.cmi kernel/declarations.cmi \ - kernel/closure.cmi pretyping/reductionops.cmi -pretyping/reductionops.cmx: lib/util.cmx kernel/univ.cmx \ - pretyping/termops.cmx kernel/term.cmx kernel/sign.cmx \ - kernel/reduction.cmx lib/pp.cmx kernel/names.cmx pretyping/evd.cmx \ - kernel/esubst.cmx kernel/environ.cmx kernel/declarations.cmx \ - kernel/closure.cmx pretyping/reductionops.cmi -pretyping/retyping.cmo: lib/util.cmi kernel/univ.cmi kernel/typeops.cmi \ - pretyping/termops.cmi kernel/term.cmi pretyping/reductionops.cmi \ - kernel/names.cmi pretyping/inductiveops.cmi kernel/inductive.cmi \ - pretyping/evd.cmi kernel/environ.cmi kernel/declarations.cmi \ - pretyping/retyping.cmi -pretyping/retyping.cmx: lib/util.cmx kernel/univ.cmx kernel/typeops.cmx \ - pretyping/termops.cmx kernel/term.cmx pretyping/reductionops.cmx \ - kernel/names.cmx pretyping/inductiveops.cmx kernel/inductive.cmx \ - pretyping/evd.cmx kernel/environ.cmx kernel/declarations.cmx \ - pretyping/retyping.cmi -pretyping/tacred.cmo: lib/util.cmi pretyping/typing.cmi \ - kernel/type_errors.cmi pretyping/termops.cmi kernel/term.cmi \ - library/summary.cmi pretyping/retyping.cmi pretyping/reductionops.cmi \ - pretyping/rawterm.cmi lib/pp.cmi library/nametab.cmi kernel/names.cmi \ - library/nameops.cmi library/libnames.cmi kernel/inductive.cmi \ - pretyping/evd.cmi kernel/environ.cmi kernel/declarations.cmi \ - kernel/conv_oracle.cmi kernel/closure.cmi pretyping/cbv.cmi \ - pretyping/tacred.cmi -pretyping/tacred.cmx: lib/util.cmx pretyping/typing.cmx \ - kernel/type_errors.cmx pretyping/termops.cmx kernel/term.cmx \ - library/summary.cmx pretyping/retyping.cmx pretyping/reductionops.cmx \ - pretyping/rawterm.cmx lib/pp.cmx library/nametab.cmx kernel/names.cmx \ - library/nameops.cmx library/libnames.cmx kernel/inductive.cmx \ - pretyping/evd.cmx kernel/environ.cmx kernel/declarations.cmx \ - kernel/conv_oracle.cmx kernel/closure.cmx pretyping/cbv.cmx \ - pretyping/tacred.cmi -pretyping/termops.cmo: lib/util.cmi kernel/univ.cmi kernel/term.cmi \ - kernel/sign.cmi lib/pp.cmi library/nametab.cmi kernel/names.cmi \ - library/nameops.cmi library/libnames.cmi library/lib.cmi \ - library/global.cmi kernel/environ.cmi pretyping/termops.cmi -pretyping/termops.cmx: lib/util.cmx kernel/univ.cmx kernel/term.cmx \ - kernel/sign.cmx lib/pp.cmx library/nametab.cmx kernel/names.cmx \ - library/nameops.cmx library/libnames.cmx library/lib.cmx \ - library/global.cmx kernel/environ.cmx pretyping/termops.cmi -pretyping/typing.cmo: lib/util.cmi kernel/typeops.cmi kernel/type_errors.cmi \ - kernel/term.cmi pretyping/reductionops.cmi pretyping/pretype_errors.cmi \ - kernel/names.cmi pretyping/inductiveops.cmi kernel/inductive.cmi \ - pretyping/evd.cmi kernel/environ.cmi pretyping/typing.cmi -pretyping/typing.cmx: lib/util.cmx kernel/typeops.cmx kernel/type_errors.cmx \ - kernel/term.cmx pretyping/reductionops.cmx pretyping/pretype_errors.cmx \ - kernel/names.cmx pretyping/inductiveops.cmx kernel/inductive.cmx \ - pretyping/evd.cmx kernel/environ.cmx pretyping/typing.cmi -pretyping/unification.cmo: lib/util.cmi pretyping/typing.cmi \ - pretyping/termops.cmi kernel/term.cmi kernel/sign.cmi \ - pretyping/retyping.cmi pretyping/reductionops.cmi kernel/reduction.cmi \ - pretyping/rawterm.cmi pretyping/pretype_errors.cmi lib/pp.cmi \ - pretyping/pattern.cmi kernel/names.cmi library/nameops.cmi \ - library/global.cmi pretyping/evd.cmi pretyping/evarutil.cmi \ - kernel/environ.cmi pretyping/unification.cmi -pretyping/unification.cmx: lib/util.cmx pretyping/typing.cmx \ - pretyping/termops.cmx kernel/term.cmx kernel/sign.cmx \ - pretyping/retyping.cmx pretyping/reductionops.cmx kernel/reduction.cmx \ - pretyping/rawterm.cmx pretyping/pretype_errors.cmx lib/pp.cmx \ - pretyping/pattern.cmx kernel/names.cmx library/nameops.cmx \ - library/global.cmx pretyping/evd.cmx pretyping/evarutil.cmx \ - kernel/environ.cmx pretyping/unification.cmi -pretyping/vnorm.cmo: kernel/vm.cmi kernel/vconv.cmi lib/util.cmi \ - kernel/typeops.cmi kernel/term.cmi kernel/reduction.cmi kernel/names.cmi \ - kernel/inductive.cmi kernel/environ.cmi kernel/declarations.cmi \ - pretyping/vnorm.cmi -pretyping/vnorm.cmx: kernel/vm.cmx kernel/vconv.cmx lib/util.cmx \ - kernel/typeops.cmx kernel/term.cmx kernel/reduction.cmx kernel/names.cmx \ - kernel/inductive.cmx kernel/environ.cmx kernel/declarations.cmx \ - pretyping/vnorm.cmi -proofs/clenvtac.cmo: lib/util.cmi pretyping/unification.cmi \ - pretyping/typing.cmi pretyping/termops.cmi kernel/term.cmi \ - proofs/tacmach.cmi proofs/tacexpr.cmo kernel/sign.cmi proofs/refiner.cmi \ - pretyping/reductionops.cmi kernel/reduction.cmi pretyping/rawterm.cmi \ - proofs/proof_type.cmi proofs/proof_trees.cmi lib/pp.cmi \ - pretyping/pattern.cmi kernel/names.cmi library/nameops.cmi \ - proofs/logic.cmi pretyping/evd.cmi pretyping/evarutil.cmi \ - proofs/evar_refiner.cmi kernel/environ.cmi pretyping/clenv.cmi \ - proofs/clenvtac.cmi -proofs/clenvtac.cmx: lib/util.cmx pretyping/unification.cmx \ - pretyping/typing.cmx pretyping/termops.cmx kernel/term.cmx \ - proofs/tacmach.cmx proofs/tacexpr.cmx kernel/sign.cmx proofs/refiner.cmx \ - pretyping/reductionops.cmx kernel/reduction.cmx pretyping/rawterm.cmx \ - proofs/proof_type.cmx proofs/proof_trees.cmx lib/pp.cmx \ - pretyping/pattern.cmx kernel/names.cmx library/nameops.cmx \ - proofs/logic.cmx pretyping/evd.cmx pretyping/evarutil.cmx \ - proofs/evar_refiner.cmx kernel/environ.cmx pretyping/clenv.cmx \ - proofs/clenvtac.cmi -proofs/decl_mode.cmo: lib/util.cmi kernel/term.cmi proofs/refiner.cmi \ - proofs/proof_trees.cmi proofs/pfedit.cmi kernel/names.cmi \ - pretyping/evd.cmi lib/dyn.cmi proofs/decl_expr.cmi proofs/decl_mode.cmi -proofs/decl_mode.cmx: lib/util.cmx kernel/term.cmx proofs/refiner.cmx \ - proofs/proof_trees.cmx proofs/pfedit.cmx kernel/names.cmx \ - pretyping/evd.cmx lib/dyn.cmx proofs/decl_expr.cmi proofs/decl_mode.cmi -proofs/evar_refiner.cmo: lib/util.cmi kernel/term.cmi kernel/sign.cmi \ - proofs/refiner.cmi proofs/proof_trees.cmi pretyping/pretyping.cmi \ - kernel/names.cmi pretyping/evd.cmi pretyping/evarutil.cmi \ - interp/constrintern.cmi proofs/evar_refiner.cmi -proofs/evar_refiner.cmx: lib/util.cmx kernel/term.cmx kernel/sign.cmx \ - proofs/refiner.cmx proofs/proof_trees.cmx pretyping/pretyping.cmx \ - kernel/names.cmx pretyping/evd.cmx pretyping/evarutil.cmx \ - interp/constrintern.cmx proofs/evar_refiner.cmi -proofs/logic.cmo: lib/util.cmi pretyping/typing.cmi kernel/typeops.cmi \ - kernel/type_errors.cmi pretyping/termops.cmi kernel/term.cmi \ - kernel/sign.cmi pretyping/retyping.cmi pretyping/reductionops.cmi \ - proofs/proof_type.cmi proofs/proof_trees.cmi pretyping/pretype_errors.cmi \ - lib/pp.cmi lib/options.cmi library/nametab.cmi kernel/names.cmi \ - library/nameops.cmi pretyping/inductiveops.cmi kernel/inductive.cmi \ - pretyping/indrec.cmi library/global.cmi pretyping/evd.cmi \ - pretyping/evarutil.cmi kernel/environ.cmi proofs/logic.cmi -proofs/logic.cmx: lib/util.cmx pretyping/typing.cmx kernel/typeops.cmx \ - kernel/type_errors.cmx pretyping/termops.cmx kernel/term.cmx \ - kernel/sign.cmx pretyping/retyping.cmx pretyping/reductionops.cmx \ - proofs/proof_type.cmx proofs/proof_trees.cmx pretyping/pretype_errors.cmx \ - lib/pp.cmx lib/options.cmx library/nametab.cmx kernel/names.cmx \ - library/nameops.cmx pretyping/inductiveops.cmx kernel/inductive.cmx \ - pretyping/indrec.cmx library/global.cmx pretyping/evd.cmx \ - pretyping/evarutil.cmx kernel/environ.cmx proofs/logic.cmi -proofs/pfedit.cmo: lib/util.cmi pretyping/typing.cmi kernel/term.cmi \ - proofs/tacexpr.cmo kernel/sign.cmi kernel/safe_typing.cmi \ - proofs/refiner.cmi proofs/proof_type.cmi proofs/proof_trees.cmi \ - lib/pp.cmi kernel/names.cmi library/nameops.cmi library/lib.cmi \ - pretyping/evd.cmi proofs/evar_refiner.cmi kernel/environ.cmi \ - kernel/entries.cmi lib/edit.cmi kernel/declarations.cmi \ - library/decl_kinds.cmo proofs/pfedit.cmi -proofs/pfedit.cmx: lib/util.cmx pretyping/typing.cmx kernel/term.cmx \ - proofs/tacexpr.cmx kernel/sign.cmx kernel/safe_typing.cmx \ - proofs/refiner.cmx proofs/proof_type.cmx proofs/proof_trees.cmx \ - lib/pp.cmx kernel/names.cmx library/nameops.cmx library/lib.cmx \ - pretyping/evd.cmx proofs/evar_refiner.cmx kernel/environ.cmx \ - kernel/entries.cmx lib/edit.cmx kernel/declarations.cmx \ - library/decl_kinds.cmx proofs/pfedit.cmi -proofs/proof_trees.cmo: lib/util.cmi pretyping/typing.cmi \ - pretyping/termops.cmi kernel/term.cmi pretyping/tacred.cmi \ - kernel/sign.cmi proofs/proof_type.cmi lib/pp.cmi library/nametab.cmi \ - kernel/names.cmi library/nameops.cmi library/libnames.cmi \ - pretyping/evd.cmi pretyping/evarutil.cmi kernel/environ.cmi \ - pretyping/detyping.cmi proofs/decl_expr.cmi kernel/closure.cmi \ - proofs/proof_trees.cmi -proofs/proof_trees.cmx: lib/util.cmx pretyping/typing.cmx \ - pretyping/termops.cmx kernel/term.cmx pretyping/tacred.cmx \ - kernel/sign.cmx proofs/proof_type.cmx lib/pp.cmx library/nametab.cmx \ - kernel/names.cmx library/nameops.cmx library/libnames.cmx \ - pretyping/evd.cmx pretyping/evarutil.cmx kernel/environ.cmx \ - pretyping/detyping.cmx proofs/decl_expr.cmi kernel/closure.cmx \ - proofs/proof_trees.cmi -proofs/proof_type.cmo: lib/util.cmi kernel/term.cmi proofs/tacexpr.cmo \ - pretyping/rawterm.cmi pretyping/pattern.cmi library/nametab.cmi \ - kernel/names.cmi library/libnames.cmi interp/genarg.cmi pretyping/evd.cmi \ - kernel/environ.cmi proofs/decl_expr.cmi proofs/proof_type.cmi -proofs/proof_type.cmx: lib/util.cmx kernel/term.cmx proofs/tacexpr.cmx \ - pretyping/rawterm.cmx pretyping/pattern.cmx library/nametab.cmx \ - kernel/names.cmx library/libnames.cmx interp/genarg.cmx pretyping/evd.cmx \ - kernel/environ.cmx proofs/decl_expr.cmi proofs/proof_type.cmi -proofs/redexpr.cmo: pretyping/vnorm.cmi lib/util.cmi kernel/typeops.cmi \ - kernel/term.cmi pretyping/tacred.cmi library/summary.cmi \ - pretyping/reductionops.cmi pretyping/rawterm.cmi lib/pp.cmi \ - library/nametab.cmi kernel/names.cmi library/libnames.cmi \ - library/global.cmi kernel/environ.cmi kernel/declarations.cmi \ - kernel/csymtable.cmi kernel/conv_oracle.cmi kernel/closure.cmi \ - proofs/redexpr.cmi -proofs/redexpr.cmx: pretyping/vnorm.cmx lib/util.cmx kernel/typeops.cmx \ - kernel/term.cmx pretyping/tacred.cmx library/summary.cmx \ - pretyping/reductionops.cmx pretyping/rawterm.cmx lib/pp.cmx \ - library/nametab.cmx kernel/names.cmx library/libnames.cmx \ - library/global.cmx kernel/environ.cmx kernel/declarations.cmx \ - kernel/csymtable.cmx kernel/conv_oracle.cmx kernel/closure.cmx \ - proofs/redexpr.cmi -proofs/refiner.cmo: lib/util.cmi kernel/type_errors.cmi pretyping/termops.cmi \ - kernel/term.cmi proofs/tacexpr.cmo kernel/sign.cmi \ - pretyping/reductionops.cmi proofs/proof_type.cmi proofs/proof_trees.cmi \ - lib/pp.cmi proofs/logic.cmi library/global.cmi pretyping/evd.cmi \ - pretyping/evarutil.cmi kernel/environ.cmi proofs/refiner.cmi -proofs/refiner.cmx: lib/util.cmx kernel/type_errors.cmx pretyping/termops.cmx \ - kernel/term.cmx proofs/tacexpr.cmx kernel/sign.cmx \ - pretyping/reductionops.cmx proofs/proof_type.cmx proofs/proof_trees.cmx \ - lib/pp.cmx proofs/logic.cmx library/global.cmx pretyping/evd.cmx \ - pretyping/evarutil.cmx kernel/environ.cmx proofs/refiner.cmi -proofs/tacexpr.cmo: lib/util.cmi interp/topconstr.cmi kernel/term.cmi \ - pretyping/rawterm.cmi pretyping/pattern.cmi library/nametab.cmi \ - kernel/names.cmi library/libnames.cmi interp/genarg.cmi lib/dyn.cmi \ - library/decl_kinds.cmo -proofs/tacexpr.cmx: lib/util.cmx interp/topconstr.cmx kernel/term.cmx \ - pretyping/rawterm.cmx pretyping/pattern.cmx library/nametab.cmx \ - kernel/names.cmx library/libnames.cmx interp/genarg.cmx lib/dyn.cmx \ - library/decl_kinds.cmx -proofs/tacmach.cmo: lib/util.cmi pretyping/typing.cmi pretyping/termops.cmi \ - kernel/term.cmi pretyping/tacred.cmi proofs/tacexpr.cmo kernel/sign.cmi \ - pretyping/retyping.cmi proofs/refiner.cmi pretyping/reductionops.cmi \ - proofs/redexpr.cmi pretyping/rawterm.cmi proofs/proof_type.cmi \ - proofs/proof_trees.cmi lib/pp.cmi kernel/names.cmi library/nameops.cmi \ - proofs/logic.cmi library/global.cmi pretyping/evd.cmi kernel/environ.cmi \ - interp/constrintern.cmi proofs/tacmach.cmi -proofs/tacmach.cmx: lib/util.cmx pretyping/typing.cmx pretyping/termops.cmx \ - kernel/term.cmx pretyping/tacred.cmx proofs/tacexpr.cmx kernel/sign.cmx \ - pretyping/retyping.cmx proofs/refiner.cmx pretyping/reductionops.cmx \ - proofs/redexpr.cmx pretyping/rawterm.cmx proofs/proof_type.cmx \ - proofs/proof_trees.cmx lib/pp.cmx kernel/names.cmx library/nameops.cmx \ - proofs/logic.cmx library/global.cmx pretyping/evd.cmx kernel/environ.cmx \ - interp/constrintern.cmx proofs/tacmach.cmi -proofs/tactic_debug.cmo: pretyping/termops.cmi proofs/tacexpr.cmo \ - proofs/refiner.cmi proofs/proof_trees.cmi lib/pp.cmi kernel/names.cmi \ - proofs/logic.cmi interp/constrextern.cmi proofs/tactic_debug.cmi -proofs/tactic_debug.cmx: pretyping/termops.cmx proofs/tacexpr.cmx \ - proofs/refiner.cmx proofs/proof_trees.cmx lib/pp.cmx kernel/names.cmx \ - proofs/logic.cmx interp/constrextern.cmx proofs/tactic_debug.cmi -scripts/coqc.cmo: toplevel/usage.cmi config/coq_config.cmi -scripts/coqc.cmx: toplevel/usage.cmx config/coq_config.cmx -scripts/coqmktop.cmo: scripts/tolink.cmo config/coq_config.cmi -scripts/coqmktop.cmx: scripts/tolink.cmx config/coq_config.cmx -tactics/auto.cmo: toplevel/vernacexpr.cmo lib/util.cmi pretyping/typing.cmi \ - pretyping/termops.cmi kernel/term.cmi tactics/tactics.cmi \ - tactics/tacticals.cmi pretyping/tacred.cmi proofs/tacmach.cmi \ - proofs/tacexpr.cmo library/summary.cmi kernel/sign.cmi proofs/refiner.cmi \ - kernel/reduction.cmi pretyping/rawterm.cmi proofs/proof_type.cmi \ - parsing/printer.cmi parsing/pptactic.cmi lib/pp.cmi proofs/pfedit.cmi \ - pretyping/pattern.cmi lib/options.cmi library/nametab.cmi \ - kernel/names.cmi library/nameops.cmi kernel/mod_subst.cmi \ - pretyping/matching.cmi proofs/logic.cmi library/library.cmi \ - library/libobject.cmi library/libnames.cmi library/lib.cmi \ - kernel/inductive.cmi tactics/hipattern.cmi tactics/hiddentac.cmi \ - lib/gmap.cmi library/global.cmi pretyping/evd.cmi proofs/evar_refiner.cmi \ - kernel/environ.cmi tactics/dhyp.cmi kernel/declarations.cmi \ - interp/constrintern.cmi pretyping/clenv.cmi tactics/btermdn.cmi \ - tactics/auto.cmi -tactics/auto.cmx: toplevel/vernacexpr.cmx lib/util.cmx pretyping/typing.cmx \ - pretyping/termops.cmx kernel/term.cmx tactics/tactics.cmx \ - tactics/tacticals.cmx pretyping/tacred.cmx proofs/tacmach.cmx \ - proofs/tacexpr.cmx library/summary.cmx kernel/sign.cmx proofs/refiner.cmx \ - kernel/reduction.cmx pretyping/rawterm.cmx proofs/proof_type.cmx \ - parsing/printer.cmx parsing/pptactic.cmx lib/pp.cmx proofs/pfedit.cmx \ - pretyping/pattern.cmx lib/options.cmx library/nametab.cmx \ - kernel/names.cmx library/nameops.cmx kernel/mod_subst.cmx \ - pretyping/matching.cmx proofs/logic.cmx library/library.cmx \ - library/libobject.cmx library/libnames.cmx library/lib.cmx \ - kernel/inductive.cmx tactics/hipattern.cmx tactics/hiddentac.cmx \ - lib/gmap.cmx library/global.cmx pretyping/evd.cmx proofs/evar_refiner.cmx \ - kernel/environ.cmx tactics/dhyp.cmx kernel/declarations.cmx \ - interp/constrintern.cmx pretyping/clenv.cmx tactics/btermdn.cmx \ - tactics/auto.cmi -tactics/autorewrite.cmo: toplevel/vernacinterp.cmi lib/util.cmi \ - pretyping/typing.cmi kernel/term.cmi tactics/tactics.cmi \ - tactics/tacticals.cmi proofs/tacmach.cmi tactics/tacinterp.cmi \ - proofs/tacexpr.cmo library/summary.cmi proofs/refiner.cmi \ - proofs/proof_type.cmi parsing/printer.cmi parsing/pptactic.cmi lib/pp.cmi \ - kernel/names.cmi kernel/mod_subst.cmi library/libobject.cmi \ - library/lib.cmi tactics/hipattern.cmi library/global.cmi \ - pretyping/evd.cmi tactics/equality.cmi kernel/environ.cmi \ - tactics/autorewrite.cmi -tactics/autorewrite.cmx: toplevel/vernacinterp.cmx lib/util.cmx \ - pretyping/typing.cmx kernel/term.cmx tactics/tactics.cmx \ - tactics/tacticals.cmx proofs/tacmach.cmx tactics/tacinterp.cmx \ - proofs/tacexpr.cmx library/summary.cmx proofs/refiner.cmx \ - proofs/proof_type.cmx parsing/printer.cmx parsing/pptactic.cmx lib/pp.cmx \ - kernel/names.cmx kernel/mod_subst.cmx library/libobject.cmx \ - library/lib.cmx tactics/hipattern.cmx library/global.cmx \ - pretyping/evd.cmx tactics/equality.cmx kernel/environ.cmx \ - tactics/autorewrite.cmi -tactics/btermdn.cmo: tactics/termdn.cmi kernel/term.cmi pretyping/pattern.cmi \ - library/libnames.cmi tactics/dn.cmi tactics/btermdn.cmi -tactics/btermdn.cmx: tactics/termdn.cmx kernel/term.cmx pretyping/pattern.cmx \ - library/libnames.cmx tactics/dn.cmx tactics/btermdn.cmi -tactics/contradiction.cmo: lib/util.cmi kernel/term.cmi tactics/tactics.cmi \ - tactics/tacticals.cmi proofs/tacmach.cmi pretyping/retyping.cmi \ - pretyping/reductionops.cmi pretyping/rawterm.cmi proofs/proof_type.cmi \ - tactics/hipattern.cmi pretyping/evd.cmi kernel/environ.cmi \ - interp/coqlib.cmi pretyping/coercion.cmi tactics/contradiction.cmi -tactics/contradiction.cmx: lib/util.cmx kernel/term.cmx tactics/tactics.cmx \ - tactics/tacticals.cmx proofs/tacmach.cmx pretyping/retyping.cmx \ - pretyping/reductionops.cmx pretyping/rawterm.cmx proofs/proof_type.cmx \ - tactics/hipattern.cmx pretyping/evd.cmx kernel/environ.cmx \ - interp/coqlib.cmx pretyping/coercion.cmx tactics/contradiction.cmi -tactics/decl_interp.cmo: lib/util.cmi interp/topconstr.cmi \ - pretyping/termops.cmi kernel/term.cmi proofs/tacmach.cmi \ - tactics/tacinterp.cmi pretyping/rawterm.cmi pretyping/pretyping.cmi \ - lib/pp.cmi kernel/names.cmi library/nameops.cmi library/libnames.cmi \ - library/global.cmi pretyping/evd.cmi kernel/environ.cmi \ - pretyping/detyping.cmi kernel/declarations.cmi proofs/decl_mode.cmi \ - proofs/decl_expr.cmi interp/coqlib.cmi interp/constrintern.cmi \ - kernel/closure.cmi tactics/decl_interp.cmi -tactics/decl_interp.cmx: lib/util.cmx interp/topconstr.cmx \ - pretyping/termops.cmx kernel/term.cmx proofs/tacmach.cmx \ - tactics/tacinterp.cmx pretyping/rawterm.cmx pretyping/pretyping.cmx \ - lib/pp.cmx kernel/names.cmx library/nameops.cmx library/libnames.cmx \ - library/global.cmx pretyping/evd.cmx kernel/environ.cmx \ - pretyping/detyping.cmx kernel/declarations.cmx proofs/decl_mode.cmx \ - proofs/decl_expr.cmi interp/coqlib.cmx interp/constrintern.cmx \ - kernel/closure.cmx tactics/decl_interp.cmi -tactics/decl_proof_instr.cmo: lib/util.cmi pretyping/unification.cmi \ - kernel/type_errors.cmi pretyping/termops.cmi kernel/term.cmi \ - tactics/tactics.cmi tactics/tacticals.cmi proofs/tacmach.cmi \ - tactics/tacinterp.cmi proofs/tacexpr.cmo proofs/refiner.cmi \ - pretyping/reductionops.cmi kernel/reduction.cmi pretyping/rawterm.cmi \ - proofs/proof_type.cmi proofs/proof_trees.cmi parsing/printer.cmi \ - lib/pp.cmi proofs/pfedit.cmi kernel/names.cmi library/nameops.cmi \ - library/libnames.cmi pretyping/inductiveops.cmi kernel/inductive.cmi \ - library/goptions.cmi library/global.cmi interp/genarg.cmi \ - pretyping/evd.cmi kernel/environ.cmi kernel/declarations.cmi \ - proofs/decl_mode.cmi tactics/decl_interp.cmi proofs/decl_expr.cmi \ - interp/coqlib.cmi kernel/closure.cmi tactics/decl_proof_instr.cmi -tactics/decl_proof_instr.cmx: lib/util.cmx pretyping/unification.cmx \ - kernel/type_errors.cmx pretyping/termops.cmx kernel/term.cmx \ - tactics/tactics.cmx tactics/tacticals.cmx proofs/tacmach.cmx \ - tactics/tacinterp.cmx proofs/tacexpr.cmx proofs/refiner.cmx \ - pretyping/reductionops.cmx kernel/reduction.cmx pretyping/rawterm.cmx \ - proofs/proof_type.cmx proofs/proof_trees.cmx parsing/printer.cmx \ - lib/pp.cmx proofs/pfedit.cmx kernel/names.cmx library/nameops.cmx \ - library/libnames.cmx pretyping/inductiveops.cmx kernel/inductive.cmx \ - library/goptions.cmx library/global.cmx interp/genarg.cmx \ - pretyping/evd.cmx kernel/environ.cmx kernel/declarations.cmx \ - proofs/decl_mode.cmx tactics/decl_interp.cmx proofs/decl_expr.cmi \ - interp/coqlib.cmx kernel/closure.cmx tactics/decl_proof_instr.cmi -tactics/dhyp.cmo: lib/util.cmi kernel/term.cmi tactics/tactics.cmi \ - tactics/tacticals.cmi proofs/tacmach.cmi proofs/tacexpr.cmo \ - library/summary.cmi proofs/refiner.cmi kernel/reduction.cmi \ - pretyping/rawterm.cmi proofs/proof_type.cmi lib/pp.cmi parsing/pcoq.cmi \ - pretyping/pattern.cmi tactics/nbtermdn.cmi kernel/names.cmi \ - pretyping/matching.cmi library/library.cmi library/libobject.cmi \ - library/libnames.cmi library/lib.cmi library/global.cmi pretyping/evd.cmi \ - kernel/environ.cmi interp/constrintern.cmi pretyping/clenv.cmi \ - tactics/dhyp.cmi -tactics/dhyp.cmx: lib/util.cmx kernel/term.cmx tactics/tactics.cmx \ - tactics/tacticals.cmx proofs/tacmach.cmx proofs/tacexpr.cmx \ - library/summary.cmx proofs/refiner.cmx kernel/reduction.cmx \ - pretyping/rawterm.cmx proofs/proof_type.cmx lib/pp.cmx parsing/pcoq.cmx \ - pretyping/pattern.cmx tactics/nbtermdn.cmx kernel/names.cmx \ - pretyping/matching.cmx library/library.cmx library/libobject.cmx \ - library/libnames.cmx library/lib.cmx library/global.cmx pretyping/evd.cmx \ - kernel/environ.cmx interp/constrintern.cmx pretyping/clenv.cmx \ - tactics/dhyp.cmi -tactics/dn.cmo: lib/tlm.cmi tactics/dn.cmi -tactics/dn.cmx: lib/tlm.cmx tactics/dn.cmi -tactics/eauto.cmo: parsing/grammar.cma lib/util.cmi pretyping/termops.cmi kernel/term.cmi \ - tactics/tactics.cmi tactics/tacticals.cmi proofs/tacmach.cmi \ - tactics/tacinterp.cmi proofs/tacexpr.cmo kernel/sign.cmi \ - proofs/refiner.cmi kernel/reduction.cmi pretyping/rawterm.cmi \ - proofs/proof_type.cmi proofs/proof_trees.cmi parsing/pptactic.cmi \ - lib/pp.cmi parsing/pcoq.cmi pretyping/pattern.cmi kernel/names.cmi \ - library/nameops.cmi proofs/logic.cmi parsing/lexer.cmi library/global.cmi \ - interp/genarg.cmi lib/explore.cmi proofs/evar_refiner.cmi \ - parsing/egrammar.cmi kernel/declarations.cmi proofs/clenvtac.cmi \ - pretyping/clenv.cmi toplevel/cerrors.cmi tactics/auto.cmi \ - tactics/eauto.cmi -tactics/eauto.cmx: parsing/grammar.cma lib/util.cmx pretyping/termops.cmx kernel/term.cmx \ - tactics/tactics.cmx tactics/tacticals.cmx proofs/tacmach.cmx \ - tactics/tacinterp.cmx proofs/tacexpr.cmx kernel/sign.cmx \ - proofs/refiner.cmx kernel/reduction.cmx pretyping/rawterm.cmx \ - proofs/proof_type.cmx proofs/proof_trees.cmx parsing/pptactic.cmx \ - lib/pp.cmx parsing/pcoq.cmx pretyping/pattern.cmx kernel/names.cmx \ - library/nameops.cmx proofs/logic.cmx parsing/lexer.cmx library/global.cmx \ - interp/genarg.cmx lib/explore.cmx proofs/evar_refiner.cmx \ - parsing/egrammar.cmx kernel/declarations.cmx proofs/clenvtac.cmx \ - pretyping/clenv.cmx toplevel/cerrors.cmx tactics/auto.cmx \ - tactics/eauto.cmi -tactics/elim.cmo: lib/util.cmi pretyping/termops.cmi kernel/term.cmi \ - tactics/tactics.cmi tactics/tacticals.cmi proofs/tacmach.cmi \ - proofs/tacexpr.cmo proofs/refiner.cmi kernel/reduction.cmi \ - proofs/proof_type.cmi parsing/printer.cmi lib/pp.cmi kernel/names.cmi \ - library/libnames.cmi pretyping/inductiveops.cmi tactics/hipattern.cmi \ - tactics/hiddentac.cmi interp/genarg.cmi kernel/environ.cmi \ - pretyping/clenv.cmi tactics/elim.cmi -tactics/elim.cmx: lib/util.cmx pretyping/termops.cmx kernel/term.cmx \ - tactics/tactics.cmx tactics/tacticals.cmx proofs/tacmach.cmx \ - proofs/tacexpr.cmx proofs/refiner.cmx kernel/reduction.cmx \ - proofs/proof_type.cmx parsing/printer.cmx lib/pp.cmx kernel/names.cmx \ - library/libnames.cmx pretyping/inductiveops.cmx tactics/hipattern.cmx \ - tactics/hiddentac.cmx interp/genarg.cmx kernel/environ.cmx \ - pretyping/clenv.cmx tactics/elim.cmi -tactics/eqdecide.cmo: parsing/grammar.cma lib/util.cmi kernel/term.cmi tactics/tactics.cmi \ - tactics/tacticals.cmi proofs/tacmach.cmi tactics/tacinterp.cmi \ - proofs/tacexpr.cmo proofs/refiner.cmi pretyping/rawterm.cmi \ - proofs/proof_type.cmi proofs/proof_trees.cmi parsing/pptactic.cmi \ - lib/pp.cmi parsing/pcoq.cmi pretyping/pattern.cmi kernel/names.cmi \ - library/nameops.cmi pretyping/matching.cmi tactics/hipattern.cmi \ - tactics/hiddentac.cmi library/global.cmi interp/genarg.cmi \ - tactics/extratactics.cmi tactics/equality.cmi parsing/egrammar.cmi \ - kernel/declarations.cmi interp/coqlib.cmi toplevel/cerrors.cmi \ - tactics/auto.cmi -tactics/eqdecide.cmx: parsing/grammar.cma lib/util.cmx kernel/term.cmx tactics/tactics.cmx \ - tactics/tacticals.cmx proofs/tacmach.cmx tactics/tacinterp.cmx \ - proofs/tacexpr.cmx proofs/refiner.cmx pretyping/rawterm.cmx \ - proofs/proof_type.cmx proofs/proof_trees.cmx parsing/pptactic.cmx \ - lib/pp.cmx parsing/pcoq.cmx pretyping/pattern.cmx kernel/names.cmx \ - library/nameops.cmx pretyping/matching.cmx tactics/hipattern.cmx \ - tactics/hiddentac.cmx library/global.cmx interp/genarg.cmx \ - tactics/extratactics.cmx tactics/equality.cmx parsing/egrammar.cmx \ - kernel/declarations.cmx interp/coqlib.cmx toplevel/cerrors.cmx \ - tactics/auto.cmx -tactics/equality.cmo: toplevel/vernacexpr.cmo lib/util.cmi kernel/univ.cmi \ - pretyping/typing.cmi kernel/typeops.cmi pretyping/termops.cmi \ - kernel/term.cmi tactics/tactics.cmi tactics/tacticals.cmi \ - pretyping/tacred.cmi proofs/tacmach.cmi proofs/tacexpr.cmo \ - kernel/sign.cmi tactics/setoid_replace.cmi pretyping/retyping.cmi \ - pretyping/reductionops.cmi pretyping/rawterm.cmi proofs/proof_type.cmi \ - lib/pp.cmi pretyping/pattern.cmi kernel/names.cmi library/nameops.cmi \ - pretyping/matching.cmi proofs/logic.cmi library/libnames.cmi \ - pretyping/inductiveops.cmi kernel/inductive.cmi pretyping/indrec.cmi \ - tactics/hipattern.cmi pretyping/evd.cmi pretyping/evarutil.cmi \ - pretyping/evarconv.cmi proofs/evar_refiner.cmi kernel/environ.cmi \ - kernel/declarations.cmi interp/coqlib.cmi tactics/equality.cmi -tactics/equality.cmx: toplevel/vernacexpr.cmx lib/util.cmx kernel/univ.cmx \ - pretyping/typing.cmx kernel/typeops.cmx pretyping/termops.cmx \ - kernel/term.cmx tactics/tactics.cmx tactics/tacticals.cmx \ - pretyping/tacred.cmx proofs/tacmach.cmx proofs/tacexpr.cmx \ - kernel/sign.cmx tactics/setoid_replace.cmx pretyping/retyping.cmx \ - pretyping/reductionops.cmx pretyping/rawterm.cmx proofs/proof_type.cmx \ - lib/pp.cmx pretyping/pattern.cmx kernel/names.cmx library/nameops.cmx \ - pretyping/matching.cmx proofs/logic.cmx library/libnames.cmx \ - pretyping/inductiveops.cmx kernel/inductive.cmx pretyping/indrec.cmx \ - tactics/hipattern.cmx pretyping/evd.cmx pretyping/evarutil.cmx \ - pretyping/evarconv.cmx proofs/evar_refiner.cmx kernel/environ.cmx \ - kernel/declarations.cmx interp/coqlib.cmx tactics/equality.cmi -tactics/evar_tactics.cmo: lib/util.cmi pretyping/termops.cmi kernel/term.cmi \ - tactics/tactics.cmi proofs/tacmach.cmi proofs/tacexpr.cmo kernel/sign.cmi \ - proofs/refiner.cmi proofs/proof_type.cmi pretyping/evd.cmi \ - pretyping/evarutil.cmi proofs/evar_refiner.cmi kernel/environ.cmi \ - tactics/evar_tactics.cmi -tactics/evar_tactics.cmx: lib/util.cmx pretyping/termops.cmx kernel/term.cmx \ - tactics/tactics.cmx proofs/tacmach.cmx proofs/tacexpr.cmx kernel/sign.cmx \ - proofs/refiner.cmx proofs/proof_type.cmx pretyping/evd.cmx \ - pretyping/evarutil.cmx proofs/evar_refiner.cmx kernel/environ.cmx \ - tactics/evar_tactics.cmi -tactics/extraargs.cmo: parsing/grammar.cma lib/util.cmi tactics/tacticals.cmi \ - tactics/tacinterp.cmi proofs/tacexpr.cmo tactics/setoid_replace.cmi \ - parsing/printer.cmi parsing/pptactic.cmi interp/ppextend.cmi \ - parsing/ppconstr.cmi lib/pp.cmi parsing/pcoq.cmi kernel/names.cmi \ - library/nameops.cmi toplevel/metasyntax.cmi parsing/lexer.cmi \ - interp/genarg.cmi tactics/extraargs.cmi -tactics/extraargs.cmx: parsing/grammar.cma lib/util.cmx tactics/tacticals.cmx \ - tactics/tacinterp.cmx proofs/tacexpr.cmx tactics/setoid_replace.cmx \ - parsing/printer.cmx parsing/pptactic.cmx interp/ppextend.cmx \ - parsing/ppconstr.cmx lib/pp.cmx parsing/pcoq.cmx kernel/names.cmx \ - library/nameops.cmx toplevel/metasyntax.cmx parsing/lexer.cmx \ - interp/genarg.cmx tactics/extraargs.cmi -tactics/extratactics.cmo: parsing/grammar.cma toplevel/vernacinterp.cmi lib/util.cmi \ - kernel/term.cmi tactics/tactics.cmi tactics/tacticals.cmi \ - tactics/tacinterp.cmi proofs/tacexpr.cmo library/summary.cmi \ - tactics/setoid_replace.cmi proofs/refiner.cmi tactics/refine.cmi \ - pretyping/rawterm.cmi parsing/pptactic.cmi lib/pp.cmi parsing/pcoq.cmi \ - kernel/names.cmi kernel/mod_subst.cmi library/libobject.cmi \ - library/libnames.cmi library/lib.cmi tactics/leminv.cmi tactics/inv.cmi \ - library/global.cmi interp/genarg.cmi tactics/extraargs.cmi \ - pretyping/evd.cmi tactics/evar_tactics.cmi tactics/equality.cmi \ - parsing/egrammar.cmi tactics/contradiction.cmi interp/constrintern.cmi \ - toplevel/cerrors.cmi tactics/autorewrite.cmi tactics/extratactics.cmi -tactics/extratactics.cmx: parsing/grammar.cma toplevel/vernacinterp.cmx lib/util.cmx \ - kernel/term.cmx tactics/tactics.cmx tactics/tacticals.cmx \ - tactics/tacinterp.cmx proofs/tacexpr.cmx library/summary.cmx \ - tactics/setoid_replace.cmx proofs/refiner.cmx tactics/refine.cmx \ - pretyping/rawterm.cmx parsing/pptactic.cmx lib/pp.cmx parsing/pcoq.cmx \ - kernel/names.cmx kernel/mod_subst.cmx library/libobject.cmx \ - library/libnames.cmx library/lib.cmx tactics/leminv.cmx tactics/inv.cmx \ - library/global.cmx interp/genarg.cmx tactics/extraargs.cmx \ - pretyping/evd.cmx tactics/evar_tactics.cmx tactics/equality.cmx \ - parsing/egrammar.cmx tactics/contradiction.cmx interp/constrintern.cmx \ - toplevel/cerrors.cmx tactics/autorewrite.cmx tactics/extratactics.cmi -tactics/hiddentac.cmo: lib/util.cmi kernel/term.cmi tactics/tactics.cmi \ - proofs/tacmach.cmi proofs/tacexpr.cmo proofs/refiner.cmi \ - proofs/redexpr.cmi pretyping/rawterm.cmi proofs/proof_type.cmi \ - interp/genarg.cmi tactics/evar_tactics.cmi tactics/hiddentac.cmi -tactics/hiddentac.cmx: lib/util.cmx kernel/term.cmx tactics/tactics.cmx \ - proofs/tacmach.cmx proofs/tacexpr.cmx proofs/refiner.cmx \ - proofs/redexpr.cmx pretyping/rawterm.cmx proofs/proof_type.cmx \ - interp/genarg.cmx tactics/evar_tactics.cmx tactics/hiddentac.cmi -tactics/hipattern.cmo: parsing/grammar.cma parsing/q_constr.cmo lib/util.cmi pretyping/termops.cmi kernel/term.cmi \ - tactics/tacticals.cmi proofs/tacmach.cmi pretyping/reductionops.cmi \ - pretyping/rawterm.cmi proofs/proof_trees.cmi lib/pp.cmi \ - pretyping/pattern.cmi kernel/names.cmi library/nameops.cmi \ - pretyping/matching.cmi library/libnames.cmi pretyping/inductiveops.cmi \ - library/global.cmi pretyping/evd.cmi kernel/environ.cmi \ - kernel/declarations.cmi interp/coqlib.cmi pretyping/clenv.cmi \ - tactics/hipattern.cmi -tactics/hipattern.cmx: parsing/grammar.cma parsing/q_constr.cmo lib/util.cmx pretyping/termops.cmx kernel/term.cmx \ - tactics/tacticals.cmx proofs/tacmach.cmx pretyping/reductionops.cmx \ - pretyping/rawterm.cmx proofs/proof_trees.cmx lib/pp.cmx \ - pretyping/pattern.cmx kernel/names.cmx library/nameops.cmx \ - pretyping/matching.cmx library/libnames.cmx pretyping/inductiveops.cmx \ - library/global.cmx pretyping/evd.cmx kernel/environ.cmx \ - kernel/declarations.cmx interp/coqlib.cmx pretyping/clenv.cmx \ - tactics/hipattern.cmi -tactics/inv.cmo: lib/util.cmi pretyping/unification.cmi pretyping/typing.cmi \ - pretyping/termops.cmi kernel/term.cmi tactics/tactics.cmi \ - tactics/tacticals.cmi proofs/tacmach.cmi proofs/tacexpr.cmo \ - kernel/sign.cmi pretyping/retyping.cmi pretyping/reductionops.cmi \ - kernel/reduction.cmi pretyping/rawterm.cmi proofs/proof_type.cmi \ - parsing/printer.cmi lib/pp.cmi pretyping/pattern.cmi kernel/names.cmi \ - library/nameops.cmi pretyping/matching.cmi pretyping/inductiveops.cmi \ - tactics/hipattern.cmi library/global.cmi interp/genarg.cmi \ - pretyping/evd.cmi pretyping/evarutil.cmi proofs/evar_refiner.cmi \ - tactics/equality.cmi kernel/environ.cmi tactics/elim.cmi \ - interp/coqlib.cmi pretyping/clenv.cmi tactics/inv.cmi -tactics/inv.cmx: lib/util.cmx pretyping/unification.cmx pretyping/typing.cmx \ - pretyping/termops.cmx kernel/term.cmx tactics/tactics.cmx \ - tactics/tacticals.cmx proofs/tacmach.cmx proofs/tacexpr.cmx \ - kernel/sign.cmx pretyping/retyping.cmx pretyping/reductionops.cmx \ - kernel/reduction.cmx pretyping/rawterm.cmx proofs/proof_type.cmx \ - parsing/printer.cmx lib/pp.cmx pretyping/pattern.cmx kernel/names.cmx \ - library/nameops.cmx pretyping/matching.cmx pretyping/inductiveops.cmx \ - tactics/hipattern.cmx library/global.cmx interp/genarg.cmx \ - pretyping/evd.cmx pretyping/evarutil.cmx proofs/evar_refiner.cmx \ - tactics/equality.cmx kernel/environ.cmx tactics/elim.cmx \ - interp/coqlib.cmx pretyping/clenv.cmx tactics/inv.cmi -tactics/leminv.cmo: toplevel/vernacexpr.cmo lib/util.cmi \ - pretyping/termops.cmi kernel/term.cmi tactics/tactics.cmi \ - tactics/tacticals.cmi proofs/tacmach.cmi kernel/sign.cmi \ - kernel/safe_typing.cmi pretyping/reductionops.cmi proofs/proof_type.cmi \ - proofs/proof_trees.cmi parsing/printer.cmi pretyping/pretyping.cmi \ - pretyping/pretype_errors.cmi lib/pp.cmi proofs/pfedit.cmi lib/options.cmi \ - kernel/names.cmi library/nameops.cmi tactics/inv.cmi \ - pretyping/inductiveops.cmi library/global.cmi pretyping/evd.cmi \ - proofs/evar_refiner.cmi kernel/environ.cmi kernel/entries.cmi \ - library/declare.cmi kernel/declarations.cmi library/decl_kinds.cmo \ - interp/constrintern.cmi proofs/clenvtac.cmi pretyping/clenv.cmi \ - tactics/leminv.cmi -tactics/leminv.cmx: toplevel/vernacexpr.cmx lib/util.cmx \ - pretyping/termops.cmx kernel/term.cmx tactics/tactics.cmx \ - tactics/tacticals.cmx proofs/tacmach.cmx kernel/sign.cmx \ - kernel/safe_typing.cmx pretyping/reductionops.cmx proofs/proof_type.cmx \ - proofs/proof_trees.cmx parsing/printer.cmx pretyping/pretyping.cmx \ - pretyping/pretype_errors.cmx lib/pp.cmx proofs/pfedit.cmx lib/options.cmx \ - kernel/names.cmx library/nameops.cmx tactics/inv.cmx \ - pretyping/inductiveops.cmx library/global.cmx pretyping/evd.cmx \ - proofs/evar_refiner.cmx kernel/environ.cmx kernel/entries.cmx \ - library/declare.cmx kernel/declarations.cmx library/decl_kinds.cmx \ - interp/constrintern.cmx proofs/clenvtac.cmx pretyping/clenv.cmx \ - tactics/leminv.cmi -tactics/nbtermdn.cmo: lib/util.cmi tactics/termdn.cmi kernel/term.cmi \ - pretyping/pattern.cmi kernel/names.cmi library/library.cmi \ - library/libobject.cmi library/libnames.cmi lib/gmap.cmi \ - tactics/btermdn.cmi tactics/nbtermdn.cmi -tactics/nbtermdn.cmx: lib/util.cmx tactics/termdn.cmx kernel/term.cmx \ - pretyping/pattern.cmx kernel/names.cmx library/library.cmx \ - library/libobject.cmx library/libnames.cmx lib/gmap.cmx \ - tactics/btermdn.cmx tactics/nbtermdn.cmi -tactics/refine.cmo: lib/util.cmi pretyping/typing.cmi pretyping/termops.cmi \ - kernel/term.cmi tactics/tactics.cmi tactics/tacticals.cmi \ - proofs/tacmach.cmi kernel/sign.cmi pretyping/retyping.cmi \ - proofs/refiner.cmi kernel/reduction.cmi parsing/printer.cmi lib/pp.cmi \ - kernel/names.cmi pretyping/evarutil.cmi kernel/environ.cmi \ - tactics/refine.cmi -tactics/refine.cmx: lib/util.cmx pretyping/typing.cmx pretyping/termops.cmx \ - kernel/term.cmx tactics/tactics.cmx tactics/tacticals.cmx \ - proofs/tacmach.cmx kernel/sign.cmx pretyping/retyping.cmx \ - proofs/refiner.cmx kernel/reduction.cmx parsing/printer.cmx lib/pp.cmx \ - kernel/names.cmx pretyping/evarutil.cmx kernel/environ.cmx \ - tactics/refine.cmi -tactics/setoid_replace.cmo: toplevel/vernacexpr.cmo lib/util.cmi \ - pretyping/unification.cmi pretyping/typing.cmi interp/topconstr.cmi \ - pretyping/termops.cmi kernel/term.cmi tactics/tactics.cmi \ - tactics/tacticals.cmi pretyping/tacred.cmi proofs/tacmach.cmi \ - library/summary.cmi kernel/sign.cmi kernel/safe_typing.cmi \ - pretyping/reductionops.cmi kernel/reduction.cmi pretyping/rawterm.cmi \ - proofs/proof_type.cmi parsing/printer.cmi pretyping/pretype_errors.cmi \ - parsing/ppconstr.cmi lib/pp.cmi proofs/pfedit.cmi lib/options.cmi \ - library/nametab.cmi kernel/names.cmi library/nameops.cmi \ - kernel/mod_subst.cmi proofs/logic.cmi library/libobject.cmi \ - library/libnames.cmi library/lib.cmi lib/gmap.cmi library/global.cmi \ - pretyping/evd.cmi pretyping/evarutil.cmi kernel/environ.cmi \ - kernel/entries.cmi library/declare.cmi library/decl_kinds.cmo \ - interp/coqlib.cmi interp/constrintern.cmi kernel/closure.cmi \ - pretyping/clenv.cmi tactics/setoid_replace.cmi -tactics/setoid_replace.cmx: toplevel/vernacexpr.cmx lib/util.cmx \ - pretyping/unification.cmx pretyping/typing.cmx interp/topconstr.cmx \ - pretyping/termops.cmx kernel/term.cmx tactics/tactics.cmx \ - tactics/tacticals.cmx pretyping/tacred.cmx proofs/tacmach.cmx \ - library/summary.cmx kernel/sign.cmx kernel/safe_typing.cmx \ - pretyping/reductionops.cmx kernel/reduction.cmx pretyping/rawterm.cmx \ - proofs/proof_type.cmx parsing/printer.cmx pretyping/pretype_errors.cmx \ - parsing/ppconstr.cmx lib/pp.cmx proofs/pfedit.cmx lib/options.cmx \ - library/nametab.cmx kernel/names.cmx library/nameops.cmx \ - kernel/mod_subst.cmx proofs/logic.cmx library/libobject.cmx \ - library/libnames.cmx library/lib.cmx lib/gmap.cmx library/global.cmx \ - pretyping/evd.cmx pretyping/evarutil.cmx kernel/environ.cmx \ - kernel/entries.cmx library/declare.cmx library/decl_kinds.cmx \ - interp/coqlib.cmx interp/constrintern.cmx kernel/closure.cmx \ - pretyping/clenv.cmx tactics/setoid_replace.cmi -tactics/tacinterp.cmo: lib/util.cmi pretyping/typing.cmi interp/topconstr.cmi \ - pretyping/termops.cmi kernel/term.cmi tactics/tactics.cmi \ - proofs/tactic_debug.cmi pretyping/tacred.cmi proofs/tacmach.cmi \ - proofs/tacexpr.cmo lib/system.cmi interp/syntax_def.cmi \ - library/summary.cmi kernel/sign.cmi kernel/safe_typing.cmi \ - pretyping/retyping.cmi proofs/refiner.cmi pretyping/reductionops.cmi \ - pretyping/rawterm.cmi proofs/proof_type.cmi parsing/printer.cmi \ - pretyping/pretyping.cmi pretyping/pretype_errors.cmi parsing/pptactic.cmi \ - lib/pp.cmi proofs/pfedit.cmi parsing/pcoq.cmi pretyping/pattern.cmi \ - lib/options.cmi library/nametab.cmi kernel/names.cmi library/nameops.cmi \ - kernel/mod_subst.cmi pretyping/matching.cmi proofs/logic.cmi \ - library/libobject.cmi library/libnames.cmi library/lib.cmi \ - tactics/leminv.cmi tactics/inv.cmi pretyping/inductiveops.cmi \ - tactics/hiddentac.cmi lib/gmap.cmi library/global.cmi interp/genarg.cmi \ - parsing/g_xml.cmo pretyping/evd.cmi tactics/equality.cmi \ - kernel/environ.cmi kernel/entries.cmi tactics/elim.cmi lib/dyn.cmi \ - tactics/dhyp.cmi pretyping/detyping.cmi kernel/declarations.cmi \ - library/decl_kinds.cmo interp/constrintern.cmi kernel/closure.cmi \ - tactics/auto.cmi tactics/tacinterp.cmi -tactics/tacinterp.cmx: lib/util.cmx pretyping/typing.cmx interp/topconstr.cmx \ - pretyping/termops.cmx kernel/term.cmx tactics/tactics.cmx \ - proofs/tactic_debug.cmx pretyping/tacred.cmx proofs/tacmach.cmx \ - proofs/tacexpr.cmx lib/system.cmx interp/syntax_def.cmx \ - library/summary.cmx kernel/sign.cmx kernel/safe_typing.cmx \ - pretyping/retyping.cmx proofs/refiner.cmx pretyping/reductionops.cmx \ - pretyping/rawterm.cmx proofs/proof_type.cmx parsing/printer.cmx \ - pretyping/pretyping.cmx pretyping/pretype_errors.cmx parsing/pptactic.cmx \ - lib/pp.cmx proofs/pfedit.cmx parsing/pcoq.cmx pretyping/pattern.cmx \ - lib/options.cmx library/nametab.cmx kernel/names.cmx library/nameops.cmx \ - kernel/mod_subst.cmx pretyping/matching.cmx proofs/logic.cmx \ - library/libobject.cmx library/libnames.cmx library/lib.cmx \ - tactics/leminv.cmx tactics/inv.cmx pretyping/inductiveops.cmx \ - tactics/hiddentac.cmx lib/gmap.cmx library/global.cmx interp/genarg.cmx \ - parsing/g_xml.cmx pretyping/evd.cmx tactics/equality.cmx \ - kernel/environ.cmx kernel/entries.cmx tactics/elim.cmx lib/dyn.cmx \ - tactics/dhyp.cmx pretyping/detyping.cmx kernel/declarations.cmx \ - library/decl_kinds.cmx interp/constrintern.cmx kernel/closure.cmx \ - tactics/auto.cmx tactics/tacinterp.cmi -tactics/tacticals.cmo: lib/util.cmi pretyping/termops.cmi kernel/term.cmi \ - proofs/tacmach.cmi proofs/tacexpr.cmo kernel/sign.cmi proofs/refiner.cmi \ - kernel/reduction.cmi lib/pp.cmi pretyping/pattern.cmi kernel/names.cmi \ - pretyping/matching.cmi library/libnames.cmi kernel/inductive.cmi \ - pretyping/indrec.cmi library/global.cmi interp/genarg.cmi \ - pretyping/evd.cmi proofs/evar_refiner.cmi kernel/environ.cmi \ - kernel/declarations.cmi proofs/clenvtac.cmi pretyping/clenv.cmi \ - tactics/tacticals.cmi -tactics/tacticals.cmx: lib/util.cmx pretyping/termops.cmx kernel/term.cmx \ - proofs/tacmach.cmx proofs/tacexpr.cmx kernel/sign.cmx proofs/refiner.cmx \ - kernel/reduction.cmx lib/pp.cmx pretyping/pattern.cmx kernel/names.cmx \ - pretyping/matching.cmx library/libnames.cmx kernel/inductive.cmx \ - pretyping/indrec.cmx library/global.cmx interp/genarg.cmx \ - pretyping/evd.cmx proofs/evar_refiner.cmx kernel/environ.cmx \ - kernel/declarations.cmx proofs/clenvtac.cmx pretyping/clenv.cmx \ - tactics/tacticals.cmi -tactics/tactics.cmo: lib/util.cmi pretyping/typing.cmi pretyping/termops.cmi \ - kernel/term.cmi tactics/tacticals.cmi pretyping/tacred.cmi \ - proofs/tacmach.cmi proofs/tacexpr.cmo kernel/sign.cmi proofs/refiner.cmi \ - pretyping/reductionops.cmi kernel/reduction.cmi proofs/redexpr.cmi \ - pretyping/rawterm.cmi proofs/proof_type.cmi proofs/proof_trees.cmi \ - pretyping/pretype_errors.cmi lib/pp.cmi proofs/pfedit.cmi lib/options.cmi \ - library/nametab.cmi kernel/names.cmi library/nameops.cmi proofs/logic.cmi \ - library/libnames.cmi pretyping/inductiveops.cmi kernel/inductive.cmi \ - pretyping/indrec.cmi tactics/hipattern.cmi library/global.cmi \ - interp/genarg.cmi pretyping/evd.cmi pretyping/evarutil.cmi \ - proofs/evar_refiner.cmi kernel/environ.cmi kernel/entries.cmi \ - library/declare.cmi kernel/declarations.cmi library/decl_kinds.cmo \ - interp/coqlib.cmi interp/constrintern.cmi proofs/clenvtac.cmi \ - pretyping/clenv.cmi tactics/tactics.cmi -tactics/tactics.cmx: lib/util.cmx pretyping/typing.cmx pretyping/termops.cmx \ - kernel/term.cmx tactics/tacticals.cmx pretyping/tacred.cmx \ - proofs/tacmach.cmx proofs/tacexpr.cmx kernel/sign.cmx proofs/refiner.cmx \ - pretyping/reductionops.cmx kernel/reduction.cmx proofs/redexpr.cmx \ - pretyping/rawterm.cmx proofs/proof_type.cmx proofs/proof_trees.cmx \ - pretyping/pretype_errors.cmx lib/pp.cmx proofs/pfedit.cmx lib/options.cmx \ - library/nametab.cmx kernel/names.cmx library/nameops.cmx proofs/logic.cmx \ - library/libnames.cmx pretyping/inductiveops.cmx kernel/inductive.cmx \ - pretyping/indrec.cmx tactics/hipattern.cmx library/global.cmx \ - interp/genarg.cmx pretyping/evd.cmx pretyping/evarutil.cmx \ - proofs/evar_refiner.cmx kernel/environ.cmx kernel/entries.cmx \ - library/declare.cmx kernel/declarations.cmx library/decl_kinds.cmx \ - interp/coqlib.cmx interp/constrintern.cmx proofs/clenvtac.cmx \ - pretyping/clenv.cmx tactics/tactics.cmi -tactics/tauto.cmo: parsing/grammar.cma lib/util.cmi interp/topconstr.cmi tactics/tactics.cmi \ - tactics/tacticals.cmi tactics/tacinterp.cmi proofs/tacexpr.cmo \ - proofs/refiner.cmi pretyping/rawterm.cmi proofs/proof_type.cmi \ - parsing/pptactic.cmi lib/pp.cmi parsing/pcoq.cmi kernel/names.cmi \ - library/libnames.cmi tactics/hipattern.cmi interp/genarg.cmi \ - parsing/egrammar.cmi toplevel/cerrors.cmi -tactics/tauto.cmx: parsing/grammar.cma lib/util.cmx interp/topconstr.cmx tactics/tactics.cmx \ - tactics/tacticals.cmx tactics/tacinterp.cmx proofs/tacexpr.cmx \ - proofs/refiner.cmx pretyping/rawterm.cmx proofs/proof_type.cmx \ - parsing/pptactic.cmx lib/pp.cmx parsing/pcoq.cmx kernel/names.cmx \ - library/libnames.cmx tactics/hipattern.cmx interp/genarg.cmx \ - parsing/egrammar.cmx toplevel/cerrors.cmx -tactics/termdn.cmo: lib/util.cmi kernel/term.cmi pretyping/rawterm.cmi \ - pretyping/pattern.cmi library/nametab.cmi kernel/names.cmi \ - library/nameops.cmi library/libnames.cmi tactics/dn.cmi \ - tactics/termdn.cmi -tactics/termdn.cmx: lib/util.cmx kernel/term.cmx pretyping/rawterm.cmx \ - pretyping/pattern.cmx library/nametab.cmx kernel/names.cmx \ - library/nameops.cmx library/libnames.cmx tactics/dn.cmx \ - tactics/termdn.cmi -tools/coqdep.cmo: tools/coqdep_lexer.cmo config/coq_config.cmi -tools/coqdep.cmx: tools/coqdep_lexer.cmx config/coq_config.cmx -tools/gallina.cmo: tools/gallina_lexer.cmo -tools/gallina.cmx: tools/gallina_lexer.cmx -toplevel/cerrors.cmo: lib/util.cmi kernel/univ.cmi kernel/type_errors.cmi \ - proofs/tactic_debug.cmi pretyping/tacred.cmi proofs/refiner.cmi \ - pretyping/pretype_errors.cmi lib/pp.cmi lib/options.cmi \ - library/nametab.cmi proofs/logic.cmi library/libnames.cmi \ - parsing/lexer.cmi kernel/indtypes.cmi pretyping/indrec.cmi \ - toplevel/himsg.cmi pretyping/cases.cmi toplevel/cerrors.cmi -toplevel/cerrors.cmx: lib/util.cmx kernel/univ.cmx kernel/type_errors.cmx \ - proofs/tactic_debug.cmx pretyping/tacred.cmx proofs/refiner.cmx \ - pretyping/pretype_errors.cmx lib/pp.cmx lib/options.cmx \ - library/nametab.cmx proofs/logic.cmx library/libnames.cmx \ - parsing/lexer.cmx kernel/indtypes.cmx pretyping/indrec.cmx \ - toplevel/himsg.cmx pretyping/cases.cmx toplevel/cerrors.cmi -toplevel/class.cmo: lib/util.cmi pretyping/typing.cmi pretyping/termops.cmi \ - kernel/term.cmi kernel/sign.cmi kernel/safe_typing.cmi \ - pretyping/reductionops.cmi parsing/printer.cmi lib/pp.cmi lib/options.cmi \ - library/nametab.cmi kernel/names.cmi library/nameops.cmi \ - library/libnames.cmi library/lib.cmi kernel/inductive.cmi \ - library/global.cmi pretyping/evd.cmi kernel/environ.cmi \ - kernel/entries.cmi library/declare.cmi kernel/declarations.cmi \ - library/decl_kinds.cmo pretyping/classops.cmi toplevel/class.cmi -toplevel/class.cmx: lib/util.cmx pretyping/typing.cmx pretyping/termops.cmx \ - kernel/term.cmx kernel/sign.cmx kernel/safe_typing.cmx \ - pretyping/reductionops.cmx parsing/printer.cmx lib/pp.cmx lib/options.cmx \ - library/nametab.cmx kernel/names.cmx library/nameops.cmx \ - library/libnames.cmx library/lib.cmx kernel/inductive.cmx \ - library/global.cmx pretyping/evd.cmx kernel/environ.cmx \ - kernel/entries.cmx library/declare.cmx kernel/declarations.cmx \ - library/decl_kinds.cmx pretyping/classops.cmx toplevel/class.cmi -toplevel/command.cmo: toplevel/vernacexpr.cmo lib/util.cmi kernel/typeops.cmi \ - interp/topconstr.cmi pretyping/termops.cmi kernel/term.cmi \ - proofs/tacmach.cmi interp/syntax_def.cmi library/states.cmi \ - kernel/sign.cmi kernel/safe_typing.cmi pretyping/retyping.cmi \ - pretyping/reductionops.cmi kernel/reduction.cmi proofs/redexpr.cmi \ - pretyping/rawterm.cmi proofs/proof_type.cmi pretyping/pretyping.cmi \ - lib/pp.cmi proofs/pfedit.cmi lib/options.cmi interp/notation.cmi \ - library/nametab.cmi kernel/names.cmi library/nameops.cmi \ - toplevel/metasyntax.cmi proofs/logic.cmi library/library.cmi \ - library/libobject.cmi library/libnames.cmi library/lib.cmi \ - pretyping/inductiveops.cmi kernel/inductive.cmi kernel/indtypes.cmi \ - pretyping/indrec.cmi library/impargs.cmi library/global.cmi \ - pretyping/evd.cmi pretyping/evarutil.cmi pretyping/evarconv.cmi \ - kernel/environ.cmi kernel/entries.cmi library/declare.cmi \ - kernel/declarations.cmi library/decl_kinds.cmo interp/coqlib.cmi \ - interp/constrintern.cmi interp/constrextern.cmi toplevel/class.cmi \ - toplevel/command.cmi -toplevel/command.cmx: toplevel/vernacexpr.cmx lib/util.cmx kernel/typeops.cmx \ - interp/topconstr.cmx pretyping/termops.cmx kernel/term.cmx \ - proofs/tacmach.cmx interp/syntax_def.cmx library/states.cmx \ - kernel/sign.cmx kernel/safe_typing.cmx pretyping/retyping.cmx \ - pretyping/reductionops.cmx kernel/reduction.cmx proofs/redexpr.cmx \ - pretyping/rawterm.cmx proofs/proof_type.cmx pretyping/pretyping.cmx \ - lib/pp.cmx proofs/pfedit.cmx lib/options.cmx interp/notation.cmx \ - library/nametab.cmx kernel/names.cmx library/nameops.cmx \ - toplevel/metasyntax.cmx proofs/logic.cmx library/library.cmx \ - library/libobject.cmx library/libnames.cmx library/lib.cmx \ - pretyping/inductiveops.cmx kernel/inductive.cmx kernel/indtypes.cmx \ - pretyping/indrec.cmx library/impargs.cmx library/global.cmx \ - pretyping/evd.cmx pretyping/evarutil.cmx pretyping/evarconv.cmx \ - kernel/environ.cmx kernel/entries.cmx library/declare.cmx \ - kernel/declarations.cmx library/decl_kinds.cmx interp/coqlib.cmx \ - interp/constrintern.cmx interp/constrextern.cmx toplevel/class.cmx \ - toplevel/command.cmi -toplevel/coqinit.cmo: toplevel/vernac.cmi toplevel/toplevel.cmi \ - lib/system.cmi lib/pp.cmi lib/options.cmi kernel/names.cmi \ - library/nameops.cmi toplevel/mltop.cmi config/coq_config.cmi \ - toplevel/coqinit.cmi -toplevel/coqinit.cmx: toplevel/vernac.cmx toplevel/toplevel.cmx \ - lib/system.cmx lib/pp.cmx lib/options.cmx kernel/names.cmx \ - library/nameops.cmx toplevel/mltop.cmx config/coq_config.cmx \ - toplevel/coqinit.cmi -toplevel/coqtop.cmo: kernel/vm.cmi toplevel/vernac.cmi kernel/vconv.cmi \ - lib/util.cmi toplevel/usage.cmi toplevel/toplevel.cmi lib/system.cmi \ - library/states.cmi lib/profile.cmi lib/pp.cmi lib/options.cmi \ - kernel/names.cmi library/nameops.cmi toplevel/mltop.cmi \ - library/library.cmi library/libnames.cmi library/lib.cmi \ - library/global.cmi library/declaremods.cmi kernel/declarations.cmi \ - toplevel/coqinit.cmi config/coq_config.cmi interp/constrintern.cmi \ - toplevel/cerrors.cmi toplevel/coqtop.cmi -toplevel/coqtop.cmx: kernel/vm.cmx toplevel/vernac.cmx kernel/vconv.cmx \ - lib/util.cmx toplevel/usage.cmx toplevel/toplevel.cmx lib/system.cmx \ - library/states.cmx lib/profile.cmx lib/pp.cmx lib/options.cmx \ - kernel/names.cmx library/nameops.cmx toplevel/mltop.cmx \ - library/library.cmx library/libnames.cmx library/lib.cmx \ - library/global.cmx library/declaremods.cmx kernel/declarations.cmx \ - toplevel/coqinit.cmx config/coq_config.cmx interp/constrintern.cmx \ - toplevel/cerrors.cmx toplevel/coqtop.cmi -toplevel/discharge.cmo: lib/util.cmi pretyping/termops.cmi kernel/term.cmi \ - kernel/sign.cmi kernel/names.cmi kernel/inductive.cmi library/global.cmi \ - kernel/entries.cmi kernel/declarations.cmi kernel/cooking.cmi \ - toplevel/discharge.cmi -toplevel/discharge.cmx: lib/util.cmx pretyping/termops.cmx kernel/term.cmx \ - kernel/sign.cmx kernel/names.cmx kernel/inductive.cmx library/global.cmx \ - kernel/entries.cmx kernel/declarations.cmx kernel/cooking.cmx \ - toplevel/discharge.cmi -toplevel/fhimsg.cmo: lib/util.cmi kernel/type_errors.cmi kernel/term.cmi \ - kernel/sign.cmi kernel/reduction.cmi lib/pp.cmi kernel/names.cmi \ - parsing/g_minicoq.cmi kernel/environ.cmi toplevel/fhimsg.cmi -toplevel/fhimsg.cmx: lib/util.cmx kernel/type_errors.cmx kernel/term.cmx \ - kernel/sign.cmx kernel/reduction.cmx lib/pp.cmx kernel/names.cmx \ - parsing/g_minicoq.cmx kernel/environ.cmx toplevel/fhimsg.cmi -toplevel/himsg.cmo: lib/util.cmi kernel/type_errors.cmi pretyping/termops.cmi \ - kernel/term.cmi pretyping/tacred.cmi kernel/sign.cmi kernel/reduction.cmi \ - pretyping/rawterm.cmi parsing/printer.cmi pretyping/pretype_errors.cmi \ - lib/pp.cmi lib/options.cmi library/nametab.cmi kernel/names.cmi \ - library/nameops.cmi proofs/logic.cmi kernel/inductive.cmi \ - kernel/indtypes.cmi pretyping/indrec.cmi library/global.cmi \ - pretyping/evd.cmi kernel/environ.cmi pretyping/cases.cmi \ - toplevel/himsg.cmi -toplevel/himsg.cmx: lib/util.cmx kernel/type_errors.cmx pretyping/termops.cmx \ - kernel/term.cmx pretyping/tacred.cmx kernel/sign.cmx kernel/reduction.cmx \ - pretyping/rawterm.cmx parsing/printer.cmx pretyping/pretype_errors.cmx \ - lib/pp.cmx lib/options.cmx library/nametab.cmx kernel/names.cmx \ - library/nameops.cmx proofs/logic.cmx kernel/inductive.cmx \ - kernel/indtypes.cmx pretyping/indrec.cmx library/global.cmx \ - pretyping/evd.cmx kernel/environ.cmx pretyping/cases.cmx \ - toplevel/himsg.cmi -toplevel/line_oriented_parser.cmo: toplevel/line_oriented_parser.cmi -toplevel/line_oriented_parser.cmx: toplevel/line_oriented_parser.cmi -toplevel/metasyntax.cmo: toplevel/vernacexpr.cmo lib/util.cmi \ - interp/topconstr.cmi tactics/tacinterp.cmi library/summary.cmi \ - pretyping/rawterm.cmi parsing/pptactic.cmi interp/ppextend.cmi lib/pp.cmi \ - parsing/pcoq.cmi lib/options.cmi interp/notation.cmi kernel/names.cmi \ - library/libobject.cmi library/libnames.cmi library/lib.cmi \ - parsing/lexer.cmi library/global.cmi parsing/extend.cmi \ - parsing/egrammar.cmi interp/constrintern.cmi lib/compat.cmo \ - pretyping/classops.cmi lib/bigint.cmi toplevel/metasyntax.cmi -toplevel/metasyntax.cmx: toplevel/vernacexpr.cmx lib/util.cmx \ - interp/topconstr.cmx tactics/tacinterp.cmx library/summary.cmx \ - pretyping/rawterm.cmx parsing/pptactic.cmx interp/ppextend.cmx lib/pp.cmx \ - parsing/pcoq.cmx lib/options.cmx interp/notation.cmx kernel/names.cmx \ - library/libobject.cmx library/libnames.cmx library/lib.cmx \ - parsing/lexer.cmx library/global.cmx parsing/extend.cmx \ - parsing/egrammar.cmx interp/constrintern.cmx lib/compat.cmx \ - pretyping/classops.cmx lib/bigint.cmx toplevel/metasyntax.cmi -toplevel/minicoq.cmo: lib/util.cmi kernel/type_errors.cmi kernel/term.cmi \ - kernel/sign.cmi kernel/safe_typing.cmi lib/pp.cmi kernel/names.cmi \ - kernel/inductive.cmi parsing/g_minicoq.cmi toplevel/fhimsg.cmi \ - kernel/declarations.cmi -toplevel/minicoq.cmx: lib/util.cmx kernel/type_errors.cmx kernel/term.cmx \ - kernel/sign.cmx kernel/safe_typing.cmx lib/pp.cmx kernel/names.cmx \ - kernel/inductive.cmx parsing/g_minicoq.cmx toplevel/fhimsg.cmx \ - kernel/declarations.cmx -toplevel/mltop.cmo: toplevel/vernacinterp.cmi lib/util.cmi lib/system.cmi \ - library/summary.cmi lib/pp.cmi lib/options.cmi kernel/names.cmi \ - library/library.cmi library/libobject.cmi library/lib.cmi \ - toplevel/mltop.cmi -toplevel/mltop.cmx: toplevel/vernacinterp.cmx lib/util.cmx lib/system.cmx \ - library/summary.cmx lib/pp.cmx lib/options.cmx kernel/names.cmx \ - library/library.cmx library/libobject.cmx library/lib.cmx \ - toplevel/mltop.cmi -toplevel/protectedtoplevel.cmo: toplevel/vernacexpr.cmo toplevel/vernac.cmi \ - lib/pp.cmi parsing/pcoq.cmi toplevel/line_oriented_parser.cmi \ - toplevel/cerrors.cmi toplevel/protectedtoplevel.cmi -toplevel/protectedtoplevel.cmx: toplevel/vernacexpr.cmx toplevel/vernac.cmx \ - lib/pp.cmx parsing/pcoq.cmx toplevel/line_oriented_parser.cmx \ - toplevel/cerrors.cmx toplevel/protectedtoplevel.cmi -toplevel/record.cmo: toplevel/vernacexpr.cmo lib/util.cmi \ - kernel/type_errors.cmi interp/topconstr.cmi pretyping/termops.cmi \ - kernel/term.cmi kernel/safe_typing.cmi pretyping/recordops.cmi \ - pretyping/rawterm.cmi parsing/printer.cmi lib/pp.cmi lib/options.cmi \ - library/nametab.cmi kernel/names.cmi library/nameops.cmi \ - library/libnames.cmi pretyping/inductiveops.cmi kernel/inductive.cmi \ - kernel/indtypes.cmi library/global.cmi pretyping/evd.cmi \ - kernel/environ.cmi kernel/entries.cmi library/declare.cmi \ - kernel/declarations.cmi library/decl_kinds.cmo interp/constrintern.cmi \ - toplevel/command.cmi toplevel/class.cmi toplevel/record.cmi -toplevel/record.cmx: toplevel/vernacexpr.cmx lib/util.cmx \ - kernel/type_errors.cmx interp/topconstr.cmx pretyping/termops.cmx \ - kernel/term.cmx kernel/safe_typing.cmx pretyping/recordops.cmx \ - pretyping/rawterm.cmx parsing/printer.cmx lib/pp.cmx lib/options.cmx \ - library/nametab.cmx kernel/names.cmx library/nameops.cmx \ - library/libnames.cmx pretyping/inductiveops.cmx kernel/inductive.cmx \ - kernel/indtypes.cmx library/global.cmx pretyping/evd.cmx \ - kernel/environ.cmx kernel/entries.cmx library/declare.cmx \ - kernel/declarations.cmx library/decl_kinds.cmx interp/constrintern.cmx \ - toplevel/command.cmx toplevel/class.cmx toplevel/record.cmi -toplevel/toplevel.cmo: toplevel/vernacexpr.cmo toplevel/vernac.cmi \ - lib/util.cmi toplevel/protectedtoplevel.cmi parsing/printer.cmi \ - lib/pp.cmi proofs/pfedit.cmi parsing/pcoq.cmi lib/options.cmi \ - kernel/names.cmi toplevel/mltop.cmi library/lib.cmi toplevel/cerrors.cmi \ - toplevel/toplevel.cmi -toplevel/toplevel.cmx: toplevel/vernacexpr.cmx toplevel/vernac.cmx \ - lib/util.cmx toplevel/protectedtoplevel.cmx parsing/printer.cmx \ - lib/pp.cmx proofs/pfedit.cmx parsing/pcoq.cmx lib/options.cmx \ - kernel/names.cmx toplevel/mltop.cmx library/lib.cmx toplevel/cerrors.cmx \ - toplevel/toplevel.cmi -toplevel/usage.cmo: config/coq_config.cmi toplevel/usage.cmi -toplevel/usage.cmx: config/coq_config.cmx toplevel/usage.cmi -toplevel/vernacentries.cmo: kernel/vm.cmi toplevel/vernacinterp.cmi \ - toplevel/vernacexpr.cmo kernel/vconv.cmi lib/util.cmi kernel/univ.cmi \ - kernel/typeops.cmi interp/topconstr.cmi pretyping/termops.cmi \ - kernel/term.cmi tactics/tactics.cmi parsing/tactic_printer.cmi \ - proofs/tactic_debug.cmi proofs/tacmach.cmi tactics/tacinterp.cmi \ - proofs/tacexpr.cmo lib/system.cmi interp/syntax_def.cmi \ - library/states.cmi kernel/sign.cmi tactics/setoid_replace.cmi \ - parsing/search.cmi kernel/safe_typing.cmi interp/reserve.cmi \ - pretyping/reductionops.cmi proofs/redexpr.cmi pretyping/recordops.cmi \ - toplevel/record.cmi pretyping/rawterm.cmi proofs/proof_type.cmi \ - proofs/proof_trees.cmi parsing/printmod.cmi parsing/printer.cmi \ - pretyping/pretyping.cmi parsing/prettyp.cmi lib/pp_control.cmi lib/pp.cmi \ - proofs/pfedit.cmi lib/options.cmi interp/notation.cmi library/nametab.cmi \ - kernel/names.cmi library/nameops.cmi interp/modintern.cmi \ - toplevel/mltop.cmi toplevel/metasyntax.cmi library/library.cmi \ - library/libnames.cmi library/lib.cmi pretyping/inductiveops.cmi \ - library/impargs.cmi library/goptions.cmi library/global.cmi \ - pretyping/evd.cmi pretyping/evarutil.cmi kernel/environ.cmi \ - kernel/entries.cmi pretyping/detyping.cmi library/declaremods.cmi \ - kernel/declarations.cmi tactics/decl_proof_instr.cmi proofs/decl_mode.cmi \ - library/decl_kinds.cmo interp/constrintern.cmi interp/constrextern.cmi \ - toplevel/command.cmi pretyping/classops.cmi toplevel/class.cmi \ - tactics/autorewrite.cmi tactics/auto.cmi toplevel/vernacentries.cmi -toplevel/vernacentries.cmx: kernel/vm.cmx toplevel/vernacinterp.cmx \ - toplevel/vernacexpr.cmx kernel/vconv.cmx lib/util.cmx kernel/univ.cmx \ - kernel/typeops.cmx interp/topconstr.cmx pretyping/termops.cmx \ - kernel/term.cmx tactics/tactics.cmx parsing/tactic_printer.cmx \ - proofs/tactic_debug.cmx proofs/tacmach.cmx tactics/tacinterp.cmx \ - proofs/tacexpr.cmx lib/system.cmx interp/syntax_def.cmx \ - library/states.cmx kernel/sign.cmx tactics/setoid_replace.cmx \ - parsing/search.cmx kernel/safe_typing.cmx interp/reserve.cmx \ - pretyping/reductionops.cmx proofs/redexpr.cmx pretyping/recordops.cmx \ - toplevel/record.cmx pretyping/rawterm.cmx proofs/proof_type.cmx \ - proofs/proof_trees.cmx parsing/printmod.cmx parsing/printer.cmx \ - pretyping/pretyping.cmx parsing/prettyp.cmx lib/pp_control.cmx lib/pp.cmx \ - proofs/pfedit.cmx lib/options.cmx interp/notation.cmx library/nametab.cmx \ - kernel/names.cmx library/nameops.cmx interp/modintern.cmx \ - toplevel/mltop.cmx toplevel/metasyntax.cmx library/library.cmx \ - library/libnames.cmx library/lib.cmx pretyping/inductiveops.cmx \ - library/impargs.cmx library/goptions.cmx library/global.cmx \ - pretyping/evd.cmx pretyping/evarutil.cmx kernel/environ.cmx \ - kernel/entries.cmx pretyping/detyping.cmx library/declaremods.cmx \ - kernel/declarations.cmx tactics/decl_proof_instr.cmx proofs/decl_mode.cmx \ - library/decl_kinds.cmx interp/constrintern.cmx interp/constrextern.cmx \ - toplevel/command.cmx pretyping/classops.cmx toplevel/class.cmx \ - tactics/autorewrite.cmx tactics/auto.cmx toplevel/vernacentries.cmi -toplevel/vernacexpr.cmo: lib/util.cmi interp/topconstr.cmi proofs/tacexpr.cmo \ - pretyping/rawterm.cmi interp/ppextend.cmi library/nametab.cmi \ - kernel/names.cmi library/libnames.cmi library/goptions.cmi \ - interp/genarg.cmi parsing/extend.cmi library/decl_kinds.cmo \ - proofs/decl_expr.cmi -toplevel/vernacexpr.cmx: lib/util.cmx interp/topconstr.cmx proofs/tacexpr.cmx \ - pretyping/rawterm.cmx interp/ppextend.cmx library/nametab.cmx \ - kernel/names.cmx library/libnames.cmx library/goptions.cmx \ - interp/genarg.cmx parsing/extend.cmx library/decl_kinds.cmx \ - proofs/decl_expr.cmi -toplevel/vernacinterp.cmo: toplevel/vernacexpr.cmo lib/util.cmi \ - tactics/tacinterp.cmi proofs/tacexpr.cmo proofs/proof_type.cmi lib/pp.cmi \ - lib/options.cmi kernel/names.cmi library/libnames.cmi toplevel/himsg.cmi \ - toplevel/vernacinterp.cmi -toplevel/vernacinterp.cmx: toplevel/vernacexpr.cmx lib/util.cmx \ - tactics/tacinterp.cmx proofs/tacexpr.cmx proofs/proof_type.cmx lib/pp.cmx \ - lib/options.cmx kernel/names.cmx library/libnames.cmx toplevel/himsg.cmx \ - toplevel/vernacinterp.cmi -toplevel/vernac.cmo: toplevel/vernacinterp.cmi toplevel/vernacexpr.cmo \ - toplevel/vernacentries.cmi lib/util.cmi lib/system.cmi library/states.cmi \ - parsing/ppvernac.cmi lib/pp.cmi proofs/pfedit.cmi parsing/pcoq.cmi \ - lib/options.cmi kernel/names.cmi library/library.cmi library/lib.cmi \ - parsing/lexer.cmi interp/constrintern.cmi toplevel/vernac.cmi -toplevel/vernac.cmx: toplevel/vernacinterp.cmx toplevel/vernacexpr.cmx \ - toplevel/vernacentries.cmx lib/util.cmx lib/system.cmx library/states.cmx \ - parsing/ppvernac.cmx lib/pp.cmx proofs/pfedit.cmx parsing/pcoq.cmx \ - lib/options.cmx kernel/names.cmx library/library.cmx library/lib.cmx \ - parsing/lexer.cmx interp/constrintern.cmx toplevel/vernac.cmi -toplevel/whelp.cmo: parsing/grammar.cma toplevel/vernacinterp.cmi lib/util.cmi \ - pretyping/termops.cmi kernel/term.cmi proofs/tacmach.cmi lib/system.cmi \ - interp/syntax_def.cmi proofs/refiner.cmi pretyping/rawterm.cmi lib/pp.cmi \ - proofs/pfedit.cmi parsing/pcoq.cmi lib/options.cmi library/nametab.cmi \ - kernel/names.cmi library/libnames.cmi parsing/lexer.cmi \ - library/goptions.cmi interp/genarg.cmi kernel/environ.cmi \ - parsing/egrammar.cmi library/dischargedhypsmap.cmi pretyping/detyping.cmi \ - interp/constrintern.cmi toplevel/command.cmi toplevel/cerrors.cmi \ - toplevel/whelp.cmi -toplevel/whelp.cmx: parsing/grammar.cma toplevel/vernacinterp.cmx lib/util.cmx \ - pretyping/termops.cmx kernel/term.cmx proofs/tacmach.cmx lib/system.cmx \ - interp/syntax_def.cmx proofs/refiner.cmx pretyping/rawterm.cmx lib/pp.cmx \ - proofs/pfedit.cmx parsing/pcoq.cmx lib/options.cmx library/nametab.cmx \ - kernel/names.cmx library/libnames.cmx parsing/lexer.cmx \ - library/goptions.cmx interp/genarg.cmx kernel/environ.cmx \ - parsing/egrammar.cmx library/dischargedhypsmap.cmx pretyping/detyping.cmx \ - interp/constrintern.cmx toplevel/command.cmx toplevel/cerrors.cmx \ - toplevel/whelp.cmi -contrib/cc/ccalgo.cmo: lib/util.cmi kernel/term.cmi lib/pp.cmi \ - kernel/names.cmi library/goptions.cmi contrib/cc/ccalgo.cmi -contrib/cc/ccalgo.cmx: lib/util.cmx kernel/term.cmx lib/pp.cmx \ - kernel/names.cmx library/goptions.cmx contrib/cc/ccalgo.cmi -contrib/cc/ccproof.cmo: lib/util.cmi kernel/term.cmi kernel/names.cmi \ - contrib/cc/ccalgo.cmi contrib/cc/ccproof.cmi -contrib/cc/ccproof.cmx: lib/util.cmx kernel/term.cmx kernel/names.cmx \ - contrib/cc/ccalgo.cmx contrib/cc/ccproof.cmi -contrib/cc/cctac.cmo: lib/util.cmi pretyping/termops.cmi kernel/term.cmi \ - tactics/tactics.cmi tactics/tacticals.cmi proofs/tacmach.cmi \ - tactics/tacinterp.cmi kernel/sign.cmi proofs/proof_type.cmi lib/pp.cmi \ - kernel/names.cmi library/nameops.cmi library/libnames.cmi \ - pretyping/inductiveops.cmi library/global.cmi pretyping/evd.cmi \ - kernel/environ.cmi kernel/declarations.cmi interp/coqlib.cmi \ - kernel/closure.cmi contrib/cc/ccproof.cmi contrib/cc/ccalgo.cmi \ - contrib/cc/cctac.cmi -contrib/cc/cctac.cmx: lib/util.cmx pretyping/termops.cmx kernel/term.cmx \ - tactics/tactics.cmx tactics/tacticals.cmx proofs/tacmach.cmx \ - tactics/tacinterp.cmx kernel/sign.cmx proofs/proof_type.cmx lib/pp.cmx \ - kernel/names.cmx library/nameops.cmx library/libnames.cmx \ - pretyping/inductiveops.cmx library/global.cmx pretyping/evd.cmx \ - kernel/environ.cmx kernel/declarations.cmx interp/coqlib.cmx \ - kernel/closure.cmx contrib/cc/ccproof.cmx contrib/cc/ccalgo.cmx \ - contrib/cc/cctac.cmi -contrib/cc/g_congruence.cmo: parsing/grammar.cma lib/util.cmi tactics/tactics.cmi \ - tactics/tacticals.cmi tactics/tacinterp.cmi proofs/tacexpr.cmo \ - parsing/pptactic.cmi lib/pp.cmi parsing/pcoq.cmi interp/genarg.cmi \ - parsing/egrammar.cmi toplevel/cerrors.cmi contrib/cc/cctac.cmi -contrib/cc/g_congruence.cmx: parsing/grammar.cma lib/util.cmx tactics/tactics.cmx \ - tactics/tacticals.cmx tactics/tacinterp.cmx proofs/tacexpr.cmx \ - parsing/pptactic.cmx lib/pp.cmx parsing/pcoq.cmx interp/genarg.cmx \ - parsing/egrammar.cmx toplevel/cerrors.cmx contrib/cc/cctac.cmx -contrib/correctness/pcicenv.cmo: kernel/univ.cmi kernel/term.cmi \ - kernel/sign.cmi kernel/names.cmi library/global.cmi \ - contrib/correctness/pcicenv.cmi -contrib/correctness/pcicenv.cmx: kernel/univ.cmx kernel/term.cmx \ - kernel/sign.cmx kernel/names.cmx library/global.cmx \ - contrib/correctness/pcicenv.cmi -contrib/correctness/pcic.cmo: toplevel/vernacexpr.cmo lib/util.cmi \ - kernel/typeops.cmi interp/topconstr.cmi pretyping/termops.cmi \ - kernel/term.cmi kernel/sign.cmi toplevel/record.cmi pretyping/rawterm.cmi \ - library/nametab.cmi kernel/names.cmi library/nameops.cmi \ - library/libnames.cmi kernel/indtypes.cmi library/global.cmi \ - kernel/entries.cmi pretyping/detyping.cmi library/declare.cmi \ - kernel/declarations.cmi contrib/correctness/pcic.cmi -contrib/correctness/pcic.cmx: toplevel/vernacexpr.cmx lib/util.cmx \ - kernel/typeops.cmx interp/topconstr.cmx pretyping/termops.cmx \ - kernel/term.cmx kernel/sign.cmx toplevel/record.cmx pretyping/rawterm.cmx \ - library/nametab.cmx kernel/names.cmx library/nameops.cmx \ - library/libnames.cmx kernel/indtypes.cmx library/global.cmx \ - kernel/entries.cmx pretyping/detyping.cmx library/declare.cmx \ - kernel/declarations.cmx contrib/correctness/pcic.cmi -contrib/correctness/pdb.cmo: pretyping/termops.cmi kernel/term.cmi \ - library/nametab.cmi kernel/names.cmi library/global.cmi \ - interp/constrintern.cmi contrib/correctness/pdb.cmi -contrib/correctness/pdb.cmx: pretyping/termops.cmx kernel/term.cmx \ - library/nametab.cmx kernel/names.cmx library/global.cmx \ - interp/constrintern.cmx contrib/correctness/pdb.cmi -contrib/correctness/peffect.cmo: lib/util.cmi lib/pp.cmi kernel/names.cmi \ - library/nameops.cmi toplevel/himsg.cmi contrib/correctness/peffect.cmi -contrib/correctness/peffect.cmx: lib/util.cmx lib/pp.cmx kernel/names.cmx \ - library/nameops.cmx toplevel/himsg.cmx contrib/correctness/peffect.cmi -contrib/correctness/penv.cmo: kernel/term.cmi library/summary.cmi lib/pp.cmi \ - lib/options.cmi kernel/names.cmi library/nameops.cmi library/library.cmi \ - library/libobject.cmi library/lib.cmi toplevel/himsg.cmi \ - contrib/correctness/penv.cmi -contrib/correctness/penv.cmx: kernel/term.cmx library/summary.cmx lib/pp.cmx \ - lib/options.cmx kernel/names.cmx library/nameops.cmx library/library.cmx \ - library/libobject.cmx library/lib.cmx toplevel/himsg.cmx \ - contrib/correctness/penv.cmi -contrib/correctness/perror.cmo: lib/util.cmi kernel/term.cmi \ - pretyping/reductionops.cmi lib/pp.cmi kernel/names.cmi \ - library/nameops.cmi toplevel/himsg.cmi library/global.cmi \ - pretyping/evd.cmi interp/constrintern.cmi contrib/correctness/perror.cmi -contrib/correctness/perror.cmx: lib/util.cmx kernel/term.cmx \ - pretyping/reductionops.cmx lib/pp.cmx kernel/names.cmx \ - library/nameops.cmx toplevel/himsg.cmx library/global.cmx \ - pretyping/evd.cmx interp/constrintern.cmx contrib/correctness/perror.cmi -contrib/correctness/pextract.cmo: toplevel/vernacinterp.cmi lib/util.cmi \ - kernel/term.cmi lib/system.cmi pretyping/reductionops.cmi \ - kernel/reduction.cmi lib/pp_control.cmi lib/pp.cmi \ - contrib/extraction/ocaml.cmi library/nametab.cmi kernel/names.cmi \ - library/library.cmi toplevel/himsg.cmi pretyping/evd.cmi \ - contrib/correctness/pextract.cmi -contrib/correctness/pextract.cmx: toplevel/vernacinterp.cmx lib/util.cmx \ - kernel/term.cmx lib/system.cmx pretyping/reductionops.cmx \ - kernel/reduction.cmx lib/pp_control.cmx lib/pp.cmx \ - contrib/extraction/ocaml.cmx library/nametab.cmx kernel/names.cmx \ - library/library.cmx toplevel/himsg.cmx pretyping/evd.cmx \ - contrib/correctness/pextract.cmi -contrib/correctness/pmisc.cmo: lib/util.cmi interp/topconstr.cmi \ - kernel/term.cmi lib/pp.cmi lib/options.cmi kernel/names.cmi \ - library/nameops.cmi library/libnames.cmi library/global.cmi \ - pretyping/evarutil.cmi interp/constrintern.cmi interp/constrextern.cmi \ - contrib/correctness/pmisc.cmi -contrib/correctness/pmisc.cmx: lib/util.cmx interp/topconstr.cmx \ - kernel/term.cmx lib/pp.cmx lib/options.cmx kernel/names.cmx \ - library/nameops.cmx library/libnames.cmx library/global.cmx \ - pretyping/evarutil.cmx interp/constrintern.cmx interp/constrextern.cmx \ - contrib/correctness/pmisc.cmi -contrib/correctness/pmlize.cmo: lib/util.cmi pretyping/typing.cmi \ - kernel/term.cmi pretyping/reductionops.cmi pretyping/pattern.cmi \ - kernel/names.cmi pretyping/matching.cmi tactics/hipattern.cmi \ - library/global.cmi pretyping/evd.cmi contrib/correctness/pmlize.cmi -contrib/correctness/pmlize.cmx: lib/util.cmx pretyping/typing.cmx \ - kernel/term.cmx pretyping/reductionops.cmx pretyping/pattern.cmx \ - kernel/names.cmx pretyping/matching.cmx tactics/hipattern.cmx \ - library/global.cmx pretyping/evd.cmx contrib/correctness/pmlize.cmi -contrib/correctness/pmonad.cmo: lib/util.cmi kernel/term.cmi kernel/names.cmi \ - contrib/correctness/pmonad.cmi -contrib/correctness/pmonad.cmx: lib/util.cmx kernel/term.cmx kernel/names.cmx \ - contrib/correctness/pmonad.cmi -contrib/correctness/pred.cmo: kernel/term.cmi pretyping/reductionops.cmi \ - lib/pp.cmi library/global.cmi pretyping/evd.cmi \ - contrib/correctness/pred.cmi -contrib/correctness/pred.cmx: kernel/term.cmx pretyping/reductionops.cmx \ - lib/pp.cmx library/global.cmx pretyping/evd.cmx \ - contrib/correctness/pred.cmi -contrib/correctness/prename.cmo: lib/util.cmi lib/pp.cmi kernel/names.cmi \ - library/nameops.cmi toplevel/himsg.cmi contrib/correctness/prename.cmi -contrib/correctness/prename.cmx: lib/util.cmx lib/pp.cmx kernel/names.cmx \ - library/nameops.cmx toplevel/himsg.cmx contrib/correctness/prename.cmi -contrib/correctness/ptactic.cmo: toplevel/vernacentries.cmi lib/util.cmi \ - pretyping/termops.cmi kernel/term.cmi tactics/tactics.cmi \ - tactics/tacticals.cmi proofs/tacmach.cmi kernel/reduction.cmi \ - parsing/printer.cmi pretyping/pretyping.cmi lib/pp.cmi proofs/pfedit.cmi \ - pretyping/pattern.cmi lib/options.cmi library/nametab.cmi \ - kernel/names.cmi library/nameops.cmi library/libnames.cmi \ - library/global.cmi tactics/extratactics.cmi pretyping/evd.cmi \ - tactics/equality.cmi library/decl_kinds.cmo interp/coqlib.cmi \ - contrib/correctness/ptactic.cmi -contrib/correctness/ptactic.cmx: toplevel/vernacentries.cmx lib/util.cmx \ - pretyping/termops.cmx kernel/term.cmx tactics/tactics.cmx \ - tactics/tacticals.cmx proofs/tacmach.cmx kernel/reduction.cmx \ - parsing/printer.cmx pretyping/pretyping.cmx lib/pp.cmx proofs/pfedit.cmx \ - pretyping/pattern.cmx lib/options.cmx library/nametab.cmx \ - kernel/names.cmx library/nameops.cmx library/libnames.cmx \ - library/global.cmx tactics/extratactics.cmx pretyping/evd.cmx \ - tactics/equality.cmx library/decl_kinds.cmx interp/coqlib.cmx \ - contrib/correctness/ptactic.cmi -contrib/correctness/ptyping.cmo: lib/util.cmi pretyping/typing.cmi \ - interp/topconstr.cmi pretyping/termops.cmi kernel/term.cmi \ - pretyping/reductionops.cmi proofs/proof_trees.cmi lib/pp.cmi \ - kernel/names.cmi toplevel/himsg.cmi library/global.cmi pretyping/evd.cmi \ - kernel/environ.cmi interp/constrintern.cmi \ - contrib/correctness/ptyping.cmi -contrib/correctness/ptyping.cmx: lib/util.cmx pretyping/typing.cmx \ - interp/topconstr.cmx pretyping/termops.cmx kernel/term.cmx \ - pretyping/reductionops.cmx proofs/proof_trees.cmx lib/pp.cmx \ - kernel/names.cmx toplevel/himsg.cmx library/global.cmx pretyping/evd.cmx \ - kernel/environ.cmx interp/constrintern.cmx \ - contrib/correctness/ptyping.cmi -contrib/correctness/putil.cmo: lib/util.cmi pretyping/termops.cmi \ - kernel/term.cmi parsing/printer.cmi lib/pp.cmi pretyping/pattern.cmi \ - kernel/names.cmi library/nameops.cmi pretyping/matching.cmi \ - tactics/hipattern.cmi library/global.cmi kernel/environ.cmi \ - contrib/correctness/putil.cmi -contrib/correctness/putil.cmx: lib/util.cmx pretyping/termops.cmx \ - kernel/term.cmx parsing/printer.cmx lib/pp.cmx pretyping/pattern.cmx \ - kernel/names.cmx library/nameops.cmx pretyping/matching.cmx \ - tactics/hipattern.cmx library/global.cmx kernel/environ.cmx \ - contrib/correctness/putil.cmi -contrib/correctness/pwp.cmo: lib/util.cmi pretyping/termops.cmi \ - kernel/term.cmi pretyping/reductionops.cmi kernel/reduction.cmi \ - library/nametab.cmi kernel/names.cmi library/libnames.cmi \ - tactics/hipattern.cmi library/global.cmi kernel/environ.cmi \ - contrib/correctness/pwp.cmi -contrib/correctness/pwp.cmx: lib/util.cmx pretyping/termops.cmx \ - kernel/term.cmx pretyping/reductionops.cmx kernel/reduction.cmx \ - library/nametab.cmx kernel/names.cmx library/libnames.cmx \ - tactics/hipattern.cmx library/global.cmx kernel/environ.cmx \ - contrib/correctness/pwp.cmi -contrib/dp/dp_cvcl.cmo: contrib/dp/fol.cmi contrib/dp/dp_cvcl.cmi -contrib/dp/dp_cvcl.cmx: contrib/dp/fol.cmi contrib/dp/dp_cvcl.cmi -contrib/dp/dp.cmo: lib/util.cmi pretyping/typing.cmi pretyping/termops.cmi \ - kernel/term.cmi tactics/tactics.cmi tactics/tacticals.cmi \ - proofs/tacmach.cmi library/summary.cmi pretyping/reductionops.cmi \ - parsing/printer.cmi lib/pp.cmi library/nametab.cmi kernel/names.cmi \ - library/nameops.cmi library/libnames.cmi tactics/hipattern.cmi \ - library/global.cmi contrib/dp/fol.cmi pretyping/evd.cmi \ - kernel/environ.cmi contrib/dp/dp_why.cmo kernel/declarations.cmi \ - interp/coqlib.cmi contrib/dp/dp.cmi -contrib/dp/dp.cmx: lib/util.cmx pretyping/typing.cmx pretyping/termops.cmx \ - kernel/term.cmx tactics/tactics.cmx tactics/tacticals.cmx \ - proofs/tacmach.cmx library/summary.cmx pretyping/reductionops.cmx \ - parsing/printer.cmx lib/pp.cmx library/nametab.cmx kernel/names.cmx \ - library/nameops.cmx library/libnames.cmx tactics/hipattern.cmx \ - library/global.cmx contrib/dp/fol.cmi pretyping/evd.cmx \ - kernel/environ.cmx contrib/dp/dp_why.cmx kernel/declarations.cmx \ - interp/coqlib.cmx contrib/dp/dp.cmi -contrib/dp/dp_simplify.cmo: contrib/dp/fol.cmi contrib/dp/dp_simplify.cmi -contrib/dp/dp_simplify.cmx: contrib/dp/fol.cmi contrib/dp/dp_simplify.cmi -contrib/dp/dp_sorts.cmo: contrib/dp/fol.cmi contrib/dp/dp_sorts.cmi -contrib/dp/dp_sorts.cmx: contrib/dp/fol.cmi contrib/dp/dp_sorts.cmi -contrib/dp/dp_why.cmo: contrib/dp/fol.cmi -contrib/dp/dp_why.cmx: contrib/dp/fol.cmi -contrib/dp/dp_zenon.cmo: lib/util.cmi contrib/dp/fol.cmi \ - contrib/dp/dp_zenon.cmi -contrib/dp/dp_zenon.cmx: lib/util.cmx contrib/dp/fol.cmi \ - contrib/dp/dp_zenon.cmi -contrib/dp/g_dp.cmo: parsing/grammar.cma toplevel/vernacinterp.cmi lib/util.cmi \ - tactics/tactics.cmi tactics/tacinterp.cmi proofs/tacexpr.cmo \ - proofs/refiner.cmi parsing/pptactic.cmi lib/pp.cmi parsing/pcoq.cmi \ - interp/genarg.cmi parsing/egrammar.cmi contrib/dp/dp.cmi \ - toplevel/cerrors.cmi -contrib/dp/g_dp.cmx: parsing/grammar.cma toplevel/vernacinterp.cmx lib/util.cmx \ - tactics/tactics.cmx tactics/tacinterp.cmx proofs/tacexpr.cmx \ - proofs/refiner.cmx parsing/pptactic.cmx lib/pp.cmx parsing/pcoq.cmx \ - interp/genarg.cmx parsing/egrammar.cmx contrib/dp/dp.cmx \ - toplevel/cerrors.cmx -contrib/extraction/common.cmo: lib/util.cmi kernel/term.cmi \ - contrib/extraction/table.cmi contrib/extraction/scheme.cmi \ - lib/pp_control.cmi lib/pp.cmi lib/options.cmi \ - contrib/extraction/ocaml.cmi kernel/names.cmi library/nameops.cmi \ - contrib/extraction/modutil.cmi kernel/modops.cmi \ - contrib/extraction/mlutil.cmi contrib/extraction/miniml.cmi \ - library/libnames.cmi kernel/inductive.cmi contrib/extraction/haskell.cmi \ - lib/gset.cmi library/global.cmi contrib/extraction/extraction.cmi \ - kernel/declarations.cmi contrib/extraction/common.cmi -contrib/extraction/common.cmx: lib/util.cmx kernel/term.cmx \ - contrib/extraction/table.cmx contrib/extraction/scheme.cmx \ - lib/pp_control.cmx lib/pp.cmx lib/options.cmx \ - contrib/extraction/ocaml.cmx kernel/names.cmx library/nameops.cmx \ - contrib/extraction/modutil.cmx kernel/modops.cmx \ - contrib/extraction/mlutil.cmx contrib/extraction/miniml.cmi \ - library/libnames.cmx kernel/inductive.cmx contrib/extraction/haskell.cmx \ - lib/gset.cmx library/global.cmx contrib/extraction/extraction.cmx \ - kernel/declarations.cmx contrib/extraction/common.cmi -contrib/extraction/extract_env.cmo: lib/util.cmi kernel/typeops.cmi \ - kernel/term.cmi contrib/extraction/table.cmi kernel/reduction.cmi \ - lib/pp.cmi library/nametab.cmi kernel/names.cmi \ - contrib/extraction/modutil.cmi kernel/modops.cmi kernel/mod_subst.cmi \ - contrib/extraction/miniml.cmi library/library.cmi library/libobject.cmi \ - library/libnames.cmi library/lib.cmi library/global.cmi \ - contrib/extraction/extraction.cmi kernel/declarations.cmi \ - contrib/extraction/common.cmi contrib/extraction/extract_env.cmi -contrib/extraction/extract_env.cmx: lib/util.cmx kernel/typeops.cmx \ - kernel/term.cmx contrib/extraction/table.cmx kernel/reduction.cmx \ - lib/pp.cmx library/nametab.cmx kernel/names.cmx \ - contrib/extraction/modutil.cmx kernel/modops.cmx kernel/mod_subst.cmx \ - contrib/extraction/miniml.cmi library/library.cmx library/libobject.cmx \ - library/libnames.cmx library/lib.cmx library/global.cmx \ - contrib/extraction/extraction.cmx kernel/declarations.cmx \ - contrib/extraction/common.cmx contrib/extraction/extract_env.cmi -contrib/extraction/extraction.cmo: lib/util.cmi kernel/typeops.cmi \ - pretyping/termops.cmi kernel/term.cmi contrib/extraction/table.cmi \ - library/summary.cmi pretyping/retyping.cmi pretyping/reductionops.cmi \ - kernel/reduction.cmi pretyping/recordops.cmi library/nametab.cmi \ - kernel/names.cmi library/nameops.cmi contrib/extraction/mlutil.cmi \ - contrib/extraction/miniml.cmi library/libnames.cmi \ - pretyping/inductiveops.cmi kernel/inductive.cmi pretyping/evd.cmi \ - kernel/environ.cmi kernel/declarations.cmi \ - contrib/extraction/extraction.cmi -contrib/extraction/extraction.cmx: lib/util.cmx kernel/typeops.cmx \ - pretyping/termops.cmx kernel/term.cmx contrib/extraction/table.cmx \ - library/summary.cmx pretyping/retyping.cmx pretyping/reductionops.cmx \ - kernel/reduction.cmx pretyping/recordops.cmx library/nametab.cmx \ - kernel/names.cmx library/nameops.cmx contrib/extraction/mlutil.cmx \ - contrib/extraction/miniml.cmi library/libnames.cmx \ - pretyping/inductiveops.cmx kernel/inductive.cmx pretyping/evd.cmx \ - kernel/environ.cmx kernel/declarations.cmx \ - contrib/extraction/extraction.cmi -contrib/extraction/g_extraction.cmo: parsing/grammar.cma toplevel/vernacinterp.cmi \ - toplevel/vernacexpr.cmo lib/util.cmi tactics/tacinterp.cmi \ - contrib/extraction/table.cmi parsing/pptactic.cmi lib/pp.cmi \ - parsing/pcoq.cmi parsing/lexer.cmi interp/genarg.cmi \ - contrib/extraction/extract_env.cmi parsing/egrammar.cmi \ - toplevel/cerrors.cmi -contrib/extraction/g_extraction.cmx: parsing/grammar.cma toplevel/vernacinterp.cmx \ - toplevel/vernacexpr.cmx lib/util.cmx tactics/tacinterp.cmx \ - contrib/extraction/table.cmx parsing/pptactic.cmx lib/pp.cmx \ - parsing/pcoq.cmx parsing/lexer.cmx interp/genarg.cmx \ - contrib/extraction/extract_env.cmx parsing/egrammar.cmx \ - toplevel/cerrors.cmx -contrib/extraction/haskell.cmo: lib/util.cmi contrib/extraction/table.cmi \ - lib/pp.cmi contrib/extraction/ocaml.cmi kernel/names.cmi \ - library/nameops.cmi contrib/extraction/mlutil.cmi \ - contrib/extraction/miniml.cmi library/libnames.cmi \ - contrib/extraction/haskell.cmi -contrib/extraction/haskell.cmx: lib/util.cmx contrib/extraction/table.cmx \ - lib/pp.cmx contrib/extraction/ocaml.cmx kernel/names.cmx \ - library/nameops.cmx contrib/extraction/mlutil.cmx \ - contrib/extraction/miniml.cmi library/libnames.cmx \ - contrib/extraction/haskell.cmi -contrib/extraction/mlutil.cmo: lib/util.cmi contrib/extraction/table.cmi \ - lib/pp.cmi library/nametab.cmi kernel/names.cmi \ - contrib/extraction/miniml.cmi library/libnames.cmi \ - contrib/extraction/mlutil.cmi -contrib/extraction/mlutil.cmx: lib/util.cmx contrib/extraction/table.cmx \ - lib/pp.cmx library/nametab.cmx kernel/names.cmx \ - contrib/extraction/miniml.cmi library/libnames.cmx \ - contrib/extraction/mlutil.cmi -contrib/extraction/modutil.cmo: lib/util.cmi contrib/extraction/table.cmi \ - kernel/names.cmi kernel/modops.cmi kernel/mod_subst.cmi \ - contrib/extraction/mlutil.cmi contrib/extraction/miniml.cmi \ - library/libnames.cmi kernel/environ.cmi kernel/declarations.cmi \ - contrib/extraction/modutil.cmi -contrib/extraction/modutil.cmx: lib/util.cmx contrib/extraction/table.cmx \ - kernel/names.cmx kernel/modops.cmx kernel/mod_subst.cmx \ - contrib/extraction/mlutil.cmx contrib/extraction/miniml.cmi \ - library/libnames.cmx kernel/environ.cmx kernel/declarations.cmx \ - contrib/extraction/modutil.cmi -contrib/extraction/ocaml.cmo: lib/util.cmi contrib/extraction/table.cmi \ - lib/pp.cmi kernel/names.cmi library/nameops.cmi \ - contrib/extraction/modutil.cmi contrib/extraction/mlutil.cmi \ - contrib/extraction/miniml.cmi library/libnames.cmi \ - contrib/extraction/ocaml.cmi -contrib/extraction/ocaml.cmx: lib/util.cmx contrib/extraction/table.cmx \ - lib/pp.cmx kernel/names.cmx library/nameops.cmx \ - contrib/extraction/modutil.cmx contrib/extraction/mlutil.cmx \ - contrib/extraction/miniml.cmi library/libnames.cmx \ - contrib/extraction/ocaml.cmi -contrib/extraction/scheme.cmo: lib/util.cmi contrib/extraction/table.cmi \ - lib/pp.cmi contrib/extraction/ocaml.cmi kernel/names.cmi \ - library/nameops.cmi contrib/extraction/mlutil.cmi \ - contrib/extraction/miniml.cmi library/libnames.cmi \ - contrib/extraction/scheme.cmi -contrib/extraction/scheme.cmx: lib/util.cmx contrib/extraction/table.cmx \ - lib/pp.cmx contrib/extraction/ocaml.cmx kernel/names.cmx \ - library/nameops.cmx contrib/extraction/mlutil.cmx \ - contrib/extraction/miniml.cmi library/libnames.cmx \ - contrib/extraction/scheme.cmi -contrib/extraction/table.cmo: lib/util.cmi kernel/typeops.cmi kernel/term.cmi \ - library/summary.cmi kernel/reduction.cmi parsing/printer.cmi lib/pp.cmi \ - library/nametab.cmi kernel/names.cmi library/nameops.cmi \ - contrib/extraction/miniml.cmi library/library.cmi library/libobject.cmi \ - library/libnames.cmi library/lib.cmi library/goptions.cmi \ - library/global.cmi kernel/environ.cmi kernel/declarations.cmi \ - contrib/extraction/table.cmi -contrib/extraction/table.cmx: lib/util.cmx kernel/typeops.cmx kernel/term.cmx \ - library/summary.cmx kernel/reduction.cmx parsing/printer.cmx lib/pp.cmx \ - library/nametab.cmx kernel/names.cmx library/nameops.cmx \ - contrib/extraction/miniml.cmi library/library.cmx library/libobject.cmx \ - library/libnames.cmx library/lib.cmx library/goptions.cmx \ - library/global.cmx kernel/environ.cmx kernel/declarations.cmx \ - contrib/extraction/table.cmi -contrib/field/field.cmo: parsing/grammar.cma toplevel/vernacinterp.cmi toplevel/vernacexpr.cmo \ - lib/util.cmi pretyping/typing.cmi interp/topconstr.cmi kernel/term.cmi \ - tactics/tacticals.cmi proofs/tacmach.cmi tactics/tacinterp.cmi \ - proofs/tacexpr.cmo library/summary.cmi contrib/ring/ring.cmo \ - pretyping/reductionops.cmi contrib/ring/quote.cmo proofs/proof_type.cmi \ - parsing/printer.cmi parsing/pptactic.cmi parsing/ppconstr.cmi lib/pp.cmi \ - parsing/pcoq.cmi kernel/names.cmi kernel/mod_subst.cmi \ - library/libobject.cmi library/libnames.cmi library/lib.cmi \ - parsing/lexer.cmi tactics/hipattern.cmi lib/gmap.cmi library/global.cmi \ - interp/genarg.cmi parsing/extend.cmi pretyping/evd.cmi \ - parsing/egrammar.cmi interp/coqlib.cmi interp/constrintern.cmi \ - toplevel/cerrors.cmi -contrib/field/field.cmx: parsing/grammar.cma toplevel/vernacinterp.cmx toplevel/vernacexpr.cmx \ - lib/util.cmx pretyping/typing.cmx interp/topconstr.cmx kernel/term.cmx \ - tactics/tacticals.cmx proofs/tacmach.cmx tactics/tacinterp.cmx \ - proofs/tacexpr.cmx library/summary.cmx contrib/ring/ring.cmx \ - pretyping/reductionops.cmx contrib/ring/quote.cmx proofs/proof_type.cmx \ - parsing/printer.cmx parsing/pptactic.cmx parsing/ppconstr.cmx lib/pp.cmx \ - parsing/pcoq.cmx kernel/names.cmx kernel/mod_subst.cmx \ - library/libobject.cmx library/libnames.cmx library/lib.cmx \ - parsing/lexer.cmx tactics/hipattern.cmx lib/gmap.cmx library/global.cmx \ - interp/genarg.cmx parsing/extend.cmx pretyping/evd.cmx \ - parsing/egrammar.cmx interp/coqlib.cmx interp/constrintern.cmx \ - toplevel/cerrors.cmx -contrib/first-order/formula.cmo: lib/util.cmi pretyping/termops.cmi \ - kernel/term.cmi proofs/tacmach.cmi kernel/sign.cmi \ - pretyping/reductionops.cmi kernel/names.cmi library/libnames.cmi \ - pretyping/inductiveops.cmi tactics/hipattern.cmi library/global.cmi \ - kernel/declarations.cmi kernel/closure.cmi \ - contrib/first-order/formula.cmi -contrib/first-order/formula.cmx: lib/util.cmx pretyping/termops.cmx \ - kernel/term.cmx proofs/tacmach.cmx kernel/sign.cmx \ - pretyping/reductionops.cmx kernel/names.cmx library/libnames.cmx \ - pretyping/inductiveops.cmx tactics/hipattern.cmx library/global.cmx \ - kernel/declarations.cmx kernel/closure.cmx \ - contrib/first-order/formula.cmi -contrib/first-order/g_ground.cmo: parsing/grammar.cma lib/util.cmi kernel/term.cmi \ - tactics/tactics.cmi tactics/tacticals.cmi tactics/tacinterp.cmi \ - proofs/tacexpr.cmo contrib/first-order/sequent.cmi proofs/refiner.cmi \ - parsing/pptactic.cmi lib/pp.cmi parsing/pcoq.cmi kernel/names.cmi \ - library/libnames.cmi contrib/first-order/ground.cmi library/goptions.cmi \ - interp/genarg.cmi contrib/first-order/formula.cmi parsing/egrammar.cmi \ - tactics/decl_proof_instr.cmi toplevel/cerrors.cmi contrib/cc/cctac.cmi \ - tactics/auto.cmi -contrib/first-order/g_ground.cmx: parsing/grammar.cma lib/util.cmx kernel/term.cmx \ - tactics/tactics.cmx tactics/tacticals.cmx tactics/tacinterp.cmx \ - proofs/tacexpr.cmx contrib/first-order/sequent.cmx proofs/refiner.cmx \ - parsing/pptactic.cmx lib/pp.cmx parsing/pcoq.cmx kernel/names.cmx \ - library/libnames.cmx contrib/first-order/ground.cmx library/goptions.cmx \ - interp/genarg.cmx contrib/first-order/formula.cmx parsing/egrammar.cmx \ - tactics/decl_proof_instr.cmx toplevel/cerrors.cmx contrib/cc/cctac.cmx \ - tactics/auto.cmx -contrib/first-order/ground.cmo: kernel/term.cmi tactics/tactics.cmi \ - tactics/tacticals.cmi proofs/tactic_debug.cmi proofs/tacmach.cmi \ - tactics/tacinterp.cmi contrib/first-order/sequent.cmi \ - contrib/first-order/rules.cmi parsing/printer.cmi lib/pp.cmi \ - kernel/names.cmi library/libnames.cmi contrib/first-order/instances.cmi \ - lib/heap.cmi contrib/first-order/formula.cmi kernel/closure.cmi \ - pretyping/classops.cmi contrib/first-order/ground.cmi -contrib/first-order/ground.cmx: kernel/term.cmx tactics/tactics.cmx \ - tactics/tacticals.cmx proofs/tactic_debug.cmx proofs/tacmach.cmx \ - tactics/tacinterp.cmx contrib/first-order/sequent.cmx \ - contrib/first-order/rules.cmx parsing/printer.cmx lib/pp.cmx \ - kernel/names.cmx library/libnames.cmx contrib/first-order/instances.cmx \ - lib/heap.cmx contrib/first-order/formula.cmx kernel/closure.cmx \ - pretyping/classops.cmx contrib/first-order/ground.cmi -contrib/first-order/instances.cmo: lib/util.cmi contrib/first-order/unify.cmi \ - pretyping/termops.cmi kernel/term.cmi tactics/tactics.cmi \ - tactics/tacticals.cmi proofs/tacmach.cmi kernel/sign.cmi \ - contrib/first-order/sequent.cmi contrib/first-order/rules.cmi \ - proofs/refiner.cmi pretyping/reductionops.cmi pretyping/rawterm.cmi \ - pretyping/pretyping.cmi lib/pp.cmi kernel/names.cmi library/libnames.cmi \ - lib/heap.cmi contrib/first-order/formula.cmi pretyping/evd.cmi \ - pretyping/detyping.cmi kernel/declarations.cmi \ - contrib/first-order/instances.cmi -contrib/first-order/instances.cmx: lib/util.cmx contrib/first-order/unify.cmx \ - pretyping/termops.cmx kernel/term.cmx tactics/tactics.cmx \ - tactics/tacticals.cmx proofs/tacmach.cmx kernel/sign.cmx \ - contrib/first-order/sequent.cmx contrib/first-order/rules.cmx \ - proofs/refiner.cmx pretyping/reductionops.cmx pretyping/rawterm.cmx \ - pretyping/pretyping.cmx lib/pp.cmx kernel/names.cmx library/libnames.cmx \ - lib/heap.cmx contrib/first-order/formula.cmx pretyping/evd.cmx \ - pretyping/detyping.cmx kernel/declarations.cmx \ - contrib/first-order/instances.cmi -contrib/first-order/rules.cmo: lib/util.cmi pretyping/termops.cmi \ - kernel/term.cmi tactics/tactics.cmi tactics/tacticals.cmi \ - proofs/tacmach.cmi proofs/tacexpr.cmo kernel/sign.cmi \ - contrib/first-order/sequent.cmi lib/pp.cmi kernel/names.cmi \ - library/libnames.cmi contrib/first-order/formula.cmi \ - kernel/declarations.cmi interp/coqlib.cmi contrib/first-order/rules.cmi -contrib/first-order/rules.cmx: lib/util.cmx pretyping/termops.cmx \ - kernel/term.cmx tactics/tactics.cmx tactics/tacticals.cmx \ - proofs/tacmach.cmx proofs/tacexpr.cmx kernel/sign.cmx \ - contrib/first-order/sequent.cmx lib/pp.cmx kernel/names.cmx \ - library/libnames.cmx contrib/first-order/formula.cmx \ - kernel/declarations.cmx interp/coqlib.cmx contrib/first-order/rules.cmi -contrib/first-order/sequent.cmo: lib/util.cmi contrib/first-order/unify.cmi \ - kernel/term.cmi proofs/tacmach.cmi parsing/printer.cmi \ - parsing/ppconstr.cmi lib/pp.cmi kernel/names.cmi library/libnames.cmi \ - lib/heap.cmi library/global.cmi contrib/first-order/formula.cmi \ - interp/constrextern.cmi tactics/auto.cmi contrib/first-order/sequent.cmi -contrib/first-order/sequent.cmx: lib/util.cmx contrib/first-order/unify.cmx \ - kernel/term.cmx proofs/tacmach.cmx parsing/printer.cmx \ - parsing/ppconstr.cmx lib/pp.cmx kernel/names.cmx library/libnames.cmx \ - lib/heap.cmx library/global.cmx contrib/first-order/formula.cmx \ - interp/constrextern.cmx tactics/auto.cmx contrib/first-order/sequent.cmi -contrib/first-order/unify.cmo: lib/util.cmi pretyping/termops.cmi \ - kernel/term.cmi proofs/tacmach.cmi pretyping/reductionops.cmi \ - kernel/names.cmi contrib/first-order/formula.cmi \ - contrib/first-order/unify.cmi -contrib/first-order/unify.cmx: lib/util.cmx pretyping/termops.cmx \ - kernel/term.cmx proofs/tacmach.cmx pretyping/reductionops.cmx \ - kernel/names.cmx contrib/first-order/formula.cmx \ - contrib/first-order/unify.cmi -contrib/fourier/fourierR.cmo: toplevel/vernacexpr.cmo lib/util.cmi \ - kernel/term.cmi tactics/tactics.cmi tactics/tacticals.cmi \ - proofs/tacmach.cmi contrib/ring/ring.cmo kernel/names.cmi \ - library/libnames.cmi contrib/fourier/fourier.cmo pretyping/evarutil.cmi \ - tactics/equality.cmi interp/coqlib.cmi tactics/contradiction.cmi \ - pretyping/clenv.cmi -contrib/fourier/fourierR.cmx: toplevel/vernacexpr.cmx lib/util.cmx \ - kernel/term.cmx tactics/tactics.cmx tactics/tacticals.cmx \ - proofs/tacmach.cmx contrib/ring/ring.cmx kernel/names.cmx \ - library/libnames.cmx contrib/fourier/fourier.cmx pretyping/evarutil.cmx \ - tactics/equality.cmx interp/coqlib.cmx tactics/contradiction.cmx \ - pretyping/clenv.cmx -contrib/fourier/g_fourier.cmo: parsing/grammar.cma lib/util.cmi tactics/tacinterp.cmi \ - proofs/tacexpr.cmo proofs/refiner.cmi parsing/pptactic.cmi lib/pp.cmi \ - parsing/pcoq.cmi contrib/fourier/fourierR.cmo parsing/egrammar.cmi \ - toplevel/cerrors.cmi -contrib/fourier/g_fourier.cmx: parsing/grammar.cma lib/util.cmx tactics/tacinterp.cmx \ - proofs/tacexpr.cmx proofs/refiner.cmx parsing/pptactic.cmx lib/pp.cmx \ - parsing/pcoq.cmx contrib/fourier/fourierR.cmx parsing/egrammar.cmx \ - toplevel/cerrors.cmx -contrib/funind/functional_principles_proofs.cmo: lib/util.cmi \ - pretyping/typing.cmi kernel/typeops.cmi pretyping/termops.cmi \ - kernel/term.cmi tactics/tactics.cmi tactics/tacticals.cmi \ - pretyping/tacred.cmi proofs/tacmach.cmi tactics/tacinterp.cmi \ - proofs/tacexpr.cmo kernel/sign.cmi pretyping/reductionops.cmi \ - contrib/recdef/recdef.cmo pretyping/rawterm.cmi proofs/proof_type.cmi \ - parsing/printer.cmi lib/pp.cmi proofs/pfedit.cmi library/nametab.cmi \ - kernel/names.cmi library/nameops.cmi library/libnames.cmi \ - contrib/funind/indfun_common.cmi tactics/hiddentac.cmi library/global.cmi \ - interp/genarg.cmi pretyping/evd.cmi tactics/equality.cmi \ - kernel/environ.cmi kernel/entries.cmi tactics/elim.cmi tactics/eauto.cmi \ - kernel/declarations.cmi library/decl_kinds.cmo interp/coqlib.cmi \ - toplevel/command.cmi kernel/closure.cmi toplevel/cerrors.cmi \ - contrib/funind/functional_principles_proofs.cmi -contrib/funind/functional_principles_proofs.cmx: lib/util.cmx \ - pretyping/typing.cmx kernel/typeops.cmx pretyping/termops.cmx \ - kernel/term.cmx tactics/tactics.cmx tactics/tacticals.cmx \ - pretyping/tacred.cmx proofs/tacmach.cmx tactics/tacinterp.cmx \ - proofs/tacexpr.cmx kernel/sign.cmx pretyping/reductionops.cmx \ - contrib/recdef/recdef.cmx pretyping/rawterm.cmx proofs/proof_type.cmx \ - parsing/printer.cmx lib/pp.cmx proofs/pfedit.cmx library/nametab.cmx \ - kernel/names.cmx library/nameops.cmx library/libnames.cmx \ - contrib/funind/indfun_common.cmx tactics/hiddentac.cmx library/global.cmx \ - interp/genarg.cmx pretyping/evd.cmx tactics/equality.cmx \ - kernel/environ.cmx kernel/entries.cmx tactics/elim.cmx tactics/eauto.cmx \ - kernel/declarations.cmx library/decl_kinds.cmx interp/coqlib.cmx \ - toplevel/command.cmx kernel/closure.cmx toplevel/cerrors.cmx \ - contrib/funind/functional_principles_proofs.cmi -contrib/funind/functional_principles_types.cmo: lib/util.cmi \ - pretyping/typing.cmi pretyping/termops.cmi kernel/term.cmi \ - tactics/tactics.cmi tactics/tacticals.cmi pretyping/tacred.cmi \ - proofs/tacmach.cmi tactics/tacinterp.cmi lib/system.cmi kernel/sign.cmi \ - pretyping/rawterm.cmi proofs/proof_type.cmi parsing/printer.cmi \ - pretyping/pretyping.cmi parsing/ppconstr.cmi lib/pp.cmi proofs/pfedit.cmi \ - lib/options.cmi library/nametab.cmi kernel/names.cmi library/nameops.cmi \ - library/libnames.cmi pretyping/indrec.cmi \ - contrib/funind/indfun_common.cmi tactics/hiddentac.cmi library/global.cmi \ - contrib/funind/functional_principles_proofs.cmi pretyping/evd.cmi \ - kernel/environ.cmi kernel/entries.cmi library/declare.cmi \ - kernel/declarations.cmi library/decl_kinds.cmo toplevel/command.cmi \ - kernel/closure.cmi contrib/funind/functional_principles_types.cmi -contrib/funind/functional_principles_types.cmx: lib/util.cmx \ - pretyping/typing.cmx pretyping/termops.cmx kernel/term.cmx \ - tactics/tactics.cmx tactics/tacticals.cmx pretyping/tacred.cmx \ - proofs/tacmach.cmx tactics/tacinterp.cmx lib/system.cmx kernel/sign.cmx \ - pretyping/rawterm.cmx proofs/proof_type.cmx parsing/printer.cmx \ - pretyping/pretyping.cmx parsing/ppconstr.cmx lib/pp.cmx proofs/pfedit.cmx \ - lib/options.cmx library/nametab.cmx kernel/names.cmx library/nameops.cmx \ - library/libnames.cmx pretyping/indrec.cmx \ - contrib/funind/indfun_common.cmx tactics/hiddentac.cmx library/global.cmx \ - contrib/funind/functional_principles_proofs.cmx pretyping/evd.cmx \ - kernel/environ.cmx kernel/entries.cmx library/declare.cmx \ - kernel/declarations.cmx library/decl_kinds.cmx toplevel/command.cmx \ - kernel/closure.cmx contrib/funind/functional_principles_types.cmi -contrib/funind/indfun_common.cmo: lib/util.cmi pretyping/termops.cmi \ - kernel/term.cmi library/summary.cmi proofs/refiner.cmi \ - pretyping/reductionops.cmi pretyping/rawterm.cmi proofs/proof_type.cmi \ - parsing/printer.cmi lib/pp.cmi proofs/pfedit.cmi lib/options.cmi \ - library/nametab.cmi kernel/names.cmi library/nameops.cmi \ - kernel/mod_subst.cmi library/libobject.cmi library/libnames.cmi \ - library/lib.cmi library/impargs.cmi library/goptions.cmi \ - library/global.cmi pretyping/evd.cmi pretyping/evarutil.cmi \ - kernel/entries.cmi library/declare.cmi kernel/declarations.cmi \ - library/decl_kinds.cmo interp/coqlib.cmi kernel/closure.cmi \ - contrib/funind/indfun_common.cmi -contrib/funind/indfun_common.cmx: lib/util.cmx pretyping/termops.cmx \ - kernel/term.cmx library/summary.cmx proofs/refiner.cmx \ - pretyping/reductionops.cmx pretyping/rawterm.cmx proofs/proof_type.cmx \ - parsing/printer.cmx lib/pp.cmx proofs/pfedit.cmx lib/options.cmx \ - library/nametab.cmx kernel/names.cmx library/nameops.cmx \ - kernel/mod_subst.cmx library/libobject.cmx library/libnames.cmx \ - library/lib.cmx library/impargs.cmx library/goptions.cmx \ - library/global.cmx pretyping/evd.cmx pretyping/evarutil.cmx \ - kernel/entries.cmx library/declare.cmx kernel/declarations.cmx \ - library/decl_kinds.cmx interp/coqlib.cmx kernel/closure.cmx \ - contrib/funind/indfun_common.cmi -contrib/funind/indfun_main.cmo: parsing/grammar.cma toplevel/vernacinterp.cmi lib/util.cmi \ - interp/topconstr.cmi pretyping/termops.cmi kernel/term.cmi \ - tactics/tactics.cmi tactics/tacticals.cmi proofs/tacmach.cmi \ - tactics/tacinterp.cmi proofs/tacexpr.cmo proofs/refiner.cmi \ - pretyping/rawterm.cmi proofs/proof_type.cmi parsing/printer.cmi \ - parsing/pptactic.cmi parsing/ppconstr.cmi lib/pp.cmi parsing/pcoq.cmi \ - library/nametab.cmi kernel/names.cmi library/nameops.cmi \ - contrib/funind/merge.cmo parsing/lexer.cmi contrib/funind/invfun.cmo \ - contrib/funind/indfun_common.cmi contrib/funind/indfun.cmo \ - library/global.cmi interp/genarg.cmi \ - contrib/funind/functional_principles_types.cmi pretyping/evd.cmi \ - parsing/egrammar.cmi interp/coqlib.cmi interp/constrintern.cmi \ - toplevel/cerrors.cmi -contrib/funind/indfun_main.cmx: parsing/grammar.cma toplevel/vernacinterp.cmx lib/util.cmx \ - interp/topconstr.cmx pretyping/termops.cmx kernel/term.cmx \ - tactics/tactics.cmx tactics/tacticals.cmx proofs/tacmach.cmx \ - tactics/tacinterp.cmx proofs/tacexpr.cmx proofs/refiner.cmx \ - pretyping/rawterm.cmx proofs/proof_type.cmx parsing/printer.cmx \ - parsing/pptactic.cmx parsing/ppconstr.cmx lib/pp.cmx parsing/pcoq.cmx \ - library/nametab.cmx kernel/names.cmx library/nameops.cmx \ - contrib/funind/merge.cmx parsing/lexer.cmx contrib/funind/invfun.cmx \ - contrib/funind/indfun_common.cmx contrib/funind/indfun.cmx \ - library/global.cmx interp/genarg.cmx \ - contrib/funind/functional_principles_types.cmx pretyping/evd.cmx \ - parsing/egrammar.cmx interp/coqlib.cmx interp/constrintern.cmx \ - toplevel/cerrors.cmx -contrib/funind/indfun.cmo: toplevel/vernacexpr.cmo lib/util.cmi \ - kernel/typeops.cmi interp/topconstr.cmi pretyping/termops.cmi \ - kernel/term.cmi tactics/tactics.cmi tactics/tacticals.cmi \ - proofs/tacmach.cmi tactics/tacinterp.cmi proofs/tacexpr.cmo \ - library/states.cmi kernel/sign.cmi contrib/recdef/recdef.cmo \ - contrib/funind/rawterm_to_relation.cmi pretyping/rawterm.cmi \ - parsing/printer.cmi parsing/ppconstr.cmi lib/pp.cmi lib/options.cmi \ - interp/notation.cmi kernel/names.cmi library/nameops.cmi \ - library/libnames.cmi contrib/funind/invfun.cmo pretyping/indrec.cmi \ - contrib/funind/indfun_common.cmi library/impargs.cmi \ - tactics/hiddentac.cmi library/global.cmi \ - contrib/funind/functional_principles_types.cmi \ - contrib/funind/functional_principles_proofs.cmi pretyping/evd.cmi \ - tactics/equality.cmi kernel/environ.cmi kernel/declarations.cmi \ - library/decl_kinds.cmo interp/constrintern.cmi interp/constrextern.cmi \ - toplevel/command.cmi toplevel/cerrors.cmi -contrib/funind/indfun.cmx: toplevel/vernacexpr.cmx lib/util.cmx \ - kernel/typeops.cmx interp/topconstr.cmx pretyping/termops.cmx \ - kernel/term.cmx tactics/tactics.cmx tactics/tacticals.cmx \ - proofs/tacmach.cmx tactics/tacinterp.cmx proofs/tacexpr.cmx \ - library/states.cmx kernel/sign.cmx contrib/recdef/recdef.cmx \ - contrib/funind/rawterm_to_relation.cmx pretyping/rawterm.cmx \ - parsing/printer.cmx parsing/ppconstr.cmx lib/pp.cmx lib/options.cmx \ - interp/notation.cmx kernel/names.cmx library/nameops.cmx \ - library/libnames.cmx contrib/funind/invfun.cmx pretyping/indrec.cmx \ - contrib/funind/indfun_common.cmx library/impargs.cmx \ - tactics/hiddentac.cmx library/global.cmx \ - contrib/funind/functional_principles_types.cmx \ - contrib/funind/functional_principles_proofs.cmx pretyping/evd.cmx \ - tactics/equality.cmx kernel/environ.cmx kernel/declarations.cmx \ - library/decl_kinds.cmx interp/constrintern.cmx interp/constrextern.cmx \ - toplevel/command.cmx toplevel/cerrors.cmx -contrib/funind/invfun.cmo: toplevel/vernacentries.cmi lib/util.cmi \ - pretyping/typing.cmi pretyping/termops.cmi kernel/term.cmi \ - tactics/tauto.cmo tactics/tactics.cmi tactics/tacticals.cmi \ - proofs/tacmach.cmi tactics/tacinterp.cmi proofs/tacexpr.cmo \ - kernel/sign.cmi lib/rtree.cmi pretyping/reductionops.cmi \ - pretyping/rawterm.cmi parsing/printer.cmi parsing/ppconstr.cmi lib/pp.cmi \ - proofs/pfedit.cmi kernel/names.cmi library/nameops.cmi \ - library/libnames.cmi tactics/inv.cmi kernel/inductive.cmi \ - pretyping/indrec.cmi contrib/funind/indfun_common.cmi \ - tactics/hiddentac.cmi library/global.cmi interp/genarg.cmi \ - pretyping/evd.cmi tactics/equality.cmi kernel/environ.cmi \ - kernel/entries.cmi kernel/declarations.cmi library/decl_kinds.cmo \ - interp/coqlib.cmi toplevel/command.cmi kernel/closure.cmi \ - toplevel/cerrors.cmi -contrib/funind/invfun.cmx: toplevel/vernacentries.cmx lib/util.cmx \ - pretyping/typing.cmx pretyping/termops.cmx kernel/term.cmx \ - tactics/tauto.cmx tactics/tactics.cmx tactics/tacticals.cmx \ - proofs/tacmach.cmx tactics/tacinterp.cmx proofs/tacexpr.cmx \ - kernel/sign.cmx lib/rtree.cmx pretyping/reductionops.cmx \ - pretyping/rawterm.cmx parsing/printer.cmx parsing/ppconstr.cmx lib/pp.cmx \ - proofs/pfedit.cmx kernel/names.cmx library/nameops.cmx \ - library/libnames.cmx tactics/inv.cmx kernel/inductive.cmx \ - pretyping/indrec.cmx contrib/funind/indfun_common.cmx \ - tactics/hiddentac.cmx library/global.cmx interp/genarg.cmx \ - pretyping/evd.cmx tactics/equality.cmx kernel/environ.cmx \ - kernel/entries.cmx kernel/declarations.cmx library/decl_kinds.cmx \ - interp/coqlib.cmx toplevel/command.cmx kernel/closure.cmx \ - toplevel/cerrors.cmx -contrib/funind/merge.cmo: toplevel/vernacexpr.cmo lib/util.cmi \ - interp/topconstr.cmi kernel/term.cmi tactics/tacinterp.cmi \ - contrib/funind/rawtermops.cmi pretyping/rawterm.cmi parsing/printer.cmi \ - pretyping/pretyping.cmi lib/pp.cmi lib/options.cmi kernel/names.cmi \ - library/nameops.cmi library/libnames.cmi pretyping/inductiveops.cmi \ - kernel/inductive.cmi library/global.cmi pretyping/evd.cmi \ - kernel/environ.cmi pretyping/detyping.cmi kernel/declarations.cmi \ - interp/constrintern.cmi interp/constrextern.cmi toplevel/command.cmi -contrib/funind/merge.cmx: toplevel/vernacexpr.cmx lib/util.cmx \ - interp/topconstr.cmx kernel/term.cmx tactics/tacinterp.cmx \ - contrib/funind/rawtermops.cmx pretyping/rawterm.cmx parsing/printer.cmx \ - pretyping/pretyping.cmx lib/pp.cmx lib/options.cmx kernel/names.cmx \ - library/nameops.cmx library/libnames.cmx pretyping/inductiveops.cmx \ - kernel/inductive.cmx library/global.cmx pretyping/evd.cmx \ - kernel/environ.cmx pretyping/detyping.cmx kernel/declarations.cmx \ - interp/constrintern.cmx interp/constrextern.cmx toplevel/command.cmx -contrib/funind/rawtermops.cmo: lib/util.cmi kernel/term.cmi \ - pretyping/rawterm.cmi lib/pp.cmi kernel/names.cmi library/nameops.cmi \ - library/libnames.cmi pretyping/inductiveops.cmi \ - contrib/funind/indfun_common.cmi library/global.cmi pretyping/evd.cmi \ - interp/coqlib.cmi contrib/funind/rawtermops.cmi -contrib/funind/rawtermops.cmx: lib/util.cmx kernel/term.cmx \ - pretyping/rawterm.cmx lib/pp.cmx kernel/names.cmx library/nameops.cmx \ - library/libnames.cmx pretyping/inductiveops.cmx \ - contrib/funind/indfun_common.cmx library/global.cmx pretyping/evd.cmx \ - interp/coqlib.cmx contrib/funind/rawtermops.cmi -contrib/funind/rawterm_to_relation.cmo: toplevel/vernacexpr.cmo lib/util.cmi \ - pretyping/typing.cmi interp/topconstr.cmi pretyping/termops.cmi \ - kernel/term.cmi tactics/tacinterp.cmi lib/system.cmi kernel/sign.cmi \ - kernel/reduction.cmi contrib/funind/rawtermops.cmi pretyping/rawterm.cmi \ - parsing/printer.cmi pretyping/pretyping.cmi parsing/ppvernac.cmi \ - parsing/ppconstr.cmi lib/pp.cmi lib/options.cmi kernel/names.cmi \ - library/nameops.cmi library/libnames.cmi pretyping/inductiveops.cmi \ - kernel/inductive.cmi contrib/funind/indfun_common.cmi library/impargs.cmi \ - library/global.cmi pretyping/evd.cmi kernel/environ.cmi \ - pretyping/detyping.cmi kernel/declarations.cmi interp/coqlib.cmi \ - interp/constrextern.cmi toplevel/command.cmi toplevel/cerrors.cmi \ - contrib/funind/rawterm_to_relation.cmi -contrib/funind/rawterm_to_relation.cmx: toplevel/vernacexpr.cmx lib/util.cmx \ - pretyping/typing.cmx interp/topconstr.cmx pretyping/termops.cmx \ - kernel/term.cmx tactics/tacinterp.cmx lib/system.cmx kernel/sign.cmx \ - kernel/reduction.cmx contrib/funind/rawtermops.cmx pretyping/rawterm.cmx \ - parsing/printer.cmx pretyping/pretyping.cmx parsing/ppvernac.cmx \ - parsing/ppconstr.cmx lib/pp.cmx lib/options.cmx kernel/names.cmx \ - library/nameops.cmx library/libnames.cmx pretyping/inductiveops.cmx \ - kernel/inductive.cmx contrib/funind/indfun_common.cmx library/impargs.cmx \ - library/global.cmx pretyping/evd.cmx kernel/environ.cmx \ - pretyping/detyping.cmx kernel/declarations.cmx interp/coqlib.cmx \ - interp/constrextern.cmx toplevel/command.cmx toplevel/cerrors.cmx \ - contrib/funind/rawterm_to_relation.cmi -contrib/funind/tacinv.cmo: parsing/grammar.cma toplevel/vernacinterp.cmi lib/util.cmi \ - pretyping/typing.cmi pretyping/termops.cmi kernel/term.cmi \ - tactics/tactics.cmi tactics/tacticals.cmi pretyping/tacred.cmi \ - proofs/tacmach.cmi contrib/funind/tacinvutils.cmi tactics/tacinterp.cmi \ - proofs/tacexpr.cmo tactics/setoid_replace.cmi kernel/safe_typing.cmi \ - proofs/refiner.cmi tactics/refine.cmi pretyping/reductionops.cmi \ - proofs/proof_type.cmi parsing/printer.cmi parsing/pptactic.cmi lib/pp.cmi \ - parsing/pcoq.cmi kernel/names.cmi pretyping/inductiveops.cmi \ - library/global.cmi interp/genarg.cmi pretyping/evd.cmi \ - tactics/equality.cmi kernel/environ.cmi kernel/entries.cmi \ - parsing/egrammar.cmi library/declare.cmi library/decl_kinds.cmo \ - interp/coqlib.cmi interp/constrintern.cmi toplevel/cerrors.cmi -contrib/funind/tacinv.cmx: parsing/grammar.cma toplevel/vernacinterp.cmx lib/util.cmx \ - pretyping/typing.cmx pretyping/termops.cmx kernel/term.cmx \ - tactics/tactics.cmx tactics/tacticals.cmx pretyping/tacred.cmx \ - proofs/tacmach.cmx contrib/funind/tacinvutils.cmx tactics/tacinterp.cmx \ - proofs/tacexpr.cmx tactics/setoid_replace.cmx kernel/safe_typing.cmx \ - proofs/refiner.cmx tactics/refine.cmx pretyping/reductionops.cmx \ - proofs/proof_type.cmx parsing/printer.cmx parsing/pptactic.cmx lib/pp.cmx \ - parsing/pcoq.cmx kernel/names.cmx pretyping/inductiveops.cmx \ - library/global.cmx interp/genarg.cmx pretyping/evd.cmx \ - tactics/equality.cmx kernel/environ.cmx kernel/entries.cmx \ - parsing/egrammar.cmx library/declare.cmx library/decl_kinds.cmx \ - interp/coqlib.cmx interp/constrintern.cmx toplevel/cerrors.cmx -contrib/funind/tacinvutils.cmo: lib/util.cmi pretyping/termops.cmi \ - kernel/term.cmi kernel/sign.cmi pretyping/reductionops.cmi \ - parsing/printer.cmi lib/pp.cmi kernel/names.cmi library/nameops.cmi \ - pretyping/inductiveops.cmi library/global.cmi pretyping/evd.cmi \ - kernel/environ.cmi kernel/declarations.cmi interp/coqlib.cmi \ - contrib/funind/tacinvutils.cmi -contrib/funind/tacinvutils.cmx: lib/util.cmx pretyping/termops.cmx \ - kernel/term.cmx kernel/sign.cmx pretyping/reductionops.cmx \ - parsing/printer.cmx lib/pp.cmx kernel/names.cmx library/nameops.cmx \ - pretyping/inductiveops.cmx library/global.cmx pretyping/evd.cmx \ - kernel/environ.cmx kernel/declarations.cmx interp/coqlib.cmx \ - contrib/funind/tacinvutils.cmi -contrib/interface/blast.cmo: toplevel/vernacinterp.cmi \ - toplevel/vernacentries.cmi lib/util.cmi pretyping/typing.cmi \ - kernel/typeops.cmi pretyping/termops.cmi kernel/term.cmi \ - tactics/tactics.cmi tactics/tacticals.cmi parsing/tactic_printer.cmi \ - pretyping/tacred.cmi proofs/tacmach.cmi tactics/tacinterp.cmi \ - kernel/sign.cmi proofs/refiner.cmi kernel/reduction.cmi \ - pretyping/rawterm.cmi proofs/proof_type.cmi proofs/proof_trees.cmi \ - parsing/printer.cmi parsing/pptactic.cmi lib/pp.cmi proofs/pfedit.cmi \ - parsing/pcoq.cmi contrib/interface/pbp.cmi pretyping/pattern.cmi \ - kernel/names.cmi library/nameops.cmi proofs/logic.cmi \ - kernel/inductive.cmi tactics/hipattern.cmi library/global.cmi \ - lib/explore.cmi pretyping/evd.cmi tactics/equality.cmi kernel/environ.cmi \ - tactics/eauto.cmi library/declare.cmi kernel/declarations.cmi \ - toplevel/command.cmi pretyping/clenv.cmi tactics/auto.cmi \ - contrib/interface/blast.cmi -contrib/interface/blast.cmx: toplevel/vernacinterp.cmx \ - toplevel/vernacentries.cmx lib/util.cmx pretyping/typing.cmx \ - kernel/typeops.cmx pretyping/termops.cmx kernel/term.cmx \ - tactics/tactics.cmx tactics/tacticals.cmx parsing/tactic_printer.cmx \ - pretyping/tacred.cmx proofs/tacmach.cmx tactics/tacinterp.cmx \ - kernel/sign.cmx proofs/refiner.cmx kernel/reduction.cmx \ - pretyping/rawterm.cmx proofs/proof_type.cmx proofs/proof_trees.cmx \ - parsing/printer.cmx parsing/pptactic.cmx lib/pp.cmx proofs/pfedit.cmx \ - parsing/pcoq.cmx contrib/interface/pbp.cmx pretyping/pattern.cmx \ - kernel/names.cmx library/nameops.cmx proofs/logic.cmx \ - kernel/inductive.cmx tactics/hipattern.cmx library/global.cmx \ - lib/explore.cmx pretyping/evd.cmx tactics/equality.cmx kernel/environ.cmx \ - tactics/eauto.cmx library/declare.cmx kernel/declarations.cmx \ - toplevel/command.cmx pretyping/clenv.cmx tactics/auto.cmx \ - contrib/interface/blast.cmi -contrib/interface/centaur.cmo: parsing/grammar.cma contrib/interface/xlate.cmi \ - contrib/interface/vtp.cmi toplevel/vernacinterp.cmi \ - toplevel/vernacexpr.cmo toplevel/vernacentries.cmi toplevel/vernac.cmi \ - lib/util.cmi kernel/typeops.cmi contrib/interface/translate.cmi \ - kernel/term.cmi proofs/tacmach.cmi tactics/tacinterp.cmi \ - proofs/tacexpr.cmo contrib/interface/showproof_ct.cmo \ - contrib/interface/showproof.cmi parsing/search.cmi proofs/refiner.cmi \ - kernel/reduction.cmi pretyping/rawterm.cmi toplevel/protectedtoplevel.cmi \ - proofs/proof_type.cmi proofs/proof_trees.cmi parsing/printer.cmi \ - pretyping/pretyping.cmi parsing/pptactic.cmi lib/pp.cmi proofs/pfedit.cmi \ - parsing/pcoq.cmi contrib/interface/pbp.cmi library/nametab.cmi \ - kernel/names.cmi library/nameops.cmi contrib/interface/name_to_ast.cmi \ - pretyping/matching.cmi toplevel/line_oriented_parser.cmi \ - library/library.cmi library/libobject.cmi library/libnames.cmi \ - library/lib.cmi parsing/lexer.cmi contrib/interface/history.cmi \ - library/global.cmi interp/genarg.cmi pretyping/evd.cmi kernel/environ.cmi \ - parsing/egrammar.cmi library/declare.cmi kernel/declarations.cmi \ - contrib/interface/debug_tac.cmi interp/constrintern.cmi \ - toplevel/command.cmi pretyping/classops.cmi toplevel/cerrors.cmi \ - contrib/interface/blast.cmi contrib/interface/ascent.cmi -contrib/interface/centaur.cmx: parsing/grammar.cma contrib/interface/xlate.cmx \ - contrib/interface/vtp.cmx toplevel/vernacinterp.cmx \ - toplevel/vernacexpr.cmx toplevel/vernacentries.cmx toplevel/vernac.cmx \ - lib/util.cmx kernel/typeops.cmx contrib/interface/translate.cmx \ - kernel/term.cmx proofs/tacmach.cmx tactics/tacinterp.cmx \ - proofs/tacexpr.cmx contrib/interface/showproof_ct.cmx \ - contrib/interface/showproof.cmx parsing/search.cmx proofs/refiner.cmx \ - kernel/reduction.cmx pretyping/rawterm.cmx toplevel/protectedtoplevel.cmx \ - proofs/proof_type.cmx proofs/proof_trees.cmx parsing/printer.cmx \ - pretyping/pretyping.cmx parsing/pptactic.cmx lib/pp.cmx proofs/pfedit.cmx \ - parsing/pcoq.cmx contrib/interface/pbp.cmx library/nametab.cmx \ - kernel/names.cmx library/nameops.cmx contrib/interface/name_to_ast.cmx \ - pretyping/matching.cmx toplevel/line_oriented_parser.cmx \ - library/library.cmx library/libobject.cmx library/libnames.cmx \ - library/lib.cmx parsing/lexer.cmx contrib/interface/history.cmx \ - library/global.cmx interp/genarg.cmx pretyping/evd.cmx kernel/environ.cmx \ - parsing/egrammar.cmx library/declare.cmx kernel/declarations.cmx \ - contrib/interface/debug_tac.cmx interp/constrintern.cmx \ - toplevel/command.cmx pretyping/classops.cmx toplevel/cerrors.cmx \ - contrib/interface/blast.cmx contrib/interface/ascent.cmi -contrib/interface/dad.cmo: toplevel/vernacinterp.cmi toplevel/vernacexpr.cmo \ - lib/util.cmi pretyping/typing.cmi interp/topconstr.cmi kernel/term.cmi \ - tactics/tactics.cmi tactics/tacticals.cmi proofs/tacmach.cmi \ - proofs/tacexpr.cmo kernel/reduction.cmi pretyping/rawterm.cmi \ - proofs/proof_type.cmi proofs/proof_trees.cmi lib/pp.cmi \ - pretyping/pattern.cmi contrib/interface/paths.cmi library/nametab.cmi \ - kernel/names.cmi library/nameops.cmi pretyping/matching.cmi \ - library/libnames.cmi library/global.cmi interp/genarg.cmi \ - pretyping/evd.cmi kernel/environ.cmi interp/constrintern.cmi \ - interp/constrextern.cmi contrib/interface/dad.cmi -contrib/interface/dad.cmx: toplevel/vernacinterp.cmx toplevel/vernacexpr.cmx \ - lib/util.cmx pretyping/typing.cmx interp/topconstr.cmx kernel/term.cmx \ - tactics/tactics.cmx tactics/tacticals.cmx proofs/tacmach.cmx \ - proofs/tacexpr.cmx kernel/reduction.cmx pretyping/rawterm.cmx \ - proofs/proof_type.cmx proofs/proof_trees.cmx lib/pp.cmx \ - pretyping/pattern.cmx contrib/interface/paths.cmx library/nametab.cmx \ - kernel/names.cmx library/nameops.cmx pretyping/matching.cmx \ - library/libnames.cmx library/global.cmx interp/genarg.cmx \ - pretyping/evd.cmx kernel/environ.cmx interp/constrintern.cmx \ - interp/constrextern.cmx contrib/interface/dad.cmi -contrib/interface/debug_tac.cmo: parsing/grammar.cma lib/util.cmi tactics/tacticals.cmi \ - proofs/tacmach.cmi tactics/tacinterp.cmi proofs/tacexpr.cmo \ - proofs/proof_type.cmi proofs/proof_trees.cmi parsing/printer.cmi \ - parsing/pptactic.cmi lib/pp.cmi parsing/pcoq.cmi library/global.cmi \ - interp/genarg.cmi toplevel/cerrors.cmi contrib/interface/debug_tac.cmi -contrib/interface/debug_tac.cmx: parsing/grammar.cma lib/util.cmx tactics/tacticals.cmx \ - proofs/tacmach.cmx tactics/tacinterp.cmx proofs/tacexpr.cmx \ - proofs/proof_type.cmx proofs/proof_trees.cmx parsing/printer.cmx \ - parsing/pptactic.cmx lib/pp.cmx parsing/pcoq.cmx library/global.cmx \ - interp/genarg.cmx toplevel/cerrors.cmx contrib/interface/debug_tac.cmi -contrib/interface/history.cmo: contrib/interface/paths.cmi \ - contrib/interface/history.cmi -contrib/interface/history.cmx: contrib/interface/paths.cmx \ - contrib/interface/history.cmi -contrib/interface/line_parser.cmo: contrib/interface/line_parser.cmi -contrib/interface/line_parser.cmx: contrib/interface/line_parser.cmi -contrib/interface/name_to_ast.cmo: toplevel/vernacexpr.cmo lib/util.cmi \ - kernel/typeops.cmi interp/topconstr.cmi kernel/term.cmi kernel/sign.cmi \ - kernel/reduction.cmi parsing/prettyp.cmi lib/pp.cmi library/nametab.cmi \ - kernel/names.cmi library/nameops.cmi library/libobject.cmi \ - library/libnames.cmi library/lib.cmi kernel/inductive.cmi \ - library/impargs.cmi library/global.cmi kernel/environ.cmi \ - library/declare.cmi kernel/declarations.cmi library/decl_kinds.cmo \ - interp/constrextern.cmi pretyping/classops.cmi \ - contrib/interface/name_to_ast.cmi -contrib/interface/name_to_ast.cmx: toplevel/vernacexpr.cmx lib/util.cmx \ - kernel/typeops.cmx interp/topconstr.cmx kernel/term.cmx kernel/sign.cmx \ - kernel/reduction.cmx parsing/prettyp.cmx lib/pp.cmx library/nametab.cmx \ - kernel/names.cmx library/nameops.cmx library/libobject.cmx \ - library/libnames.cmx library/lib.cmx kernel/inductive.cmx \ - library/impargs.cmx library/global.cmx kernel/environ.cmx \ - library/declare.cmx kernel/declarations.cmx library/decl_kinds.cmx \ - interp/constrextern.cmx pretyping/classops.cmx \ - contrib/interface/name_to_ast.cmi -contrib/interface/parse.cmo: contrib/interface/xlate.cmi \ - contrib/interface/vtp.cmi toplevel/vernacexpr.cmo \ - toplevel/vernacentries.cmi lib/util.cmi lib/system.cmi lib/pp.cmi \ - parsing/pcoq.cmi library/nametab.cmi kernel/names.cmi library/nameops.cmi \ - toplevel/mltop.cmi contrib/interface/line_parser.cmi library/library.cmi \ - library/libobject.cmi library/libnames.cmi library/declaremods.cmi \ - config/coq_config.cmi toplevel/cerrors.cmi contrib/interface/ascent.cmi -contrib/interface/parse.cmx: contrib/interface/xlate.cmx \ - contrib/interface/vtp.cmx toplevel/vernacexpr.cmx \ - toplevel/vernacentries.cmx lib/util.cmx lib/system.cmx lib/pp.cmx \ - parsing/pcoq.cmx library/nametab.cmx kernel/names.cmx library/nameops.cmx \ - toplevel/mltop.cmx contrib/interface/line_parser.cmx library/library.cmx \ - library/libobject.cmx library/libnames.cmx library/declaremods.cmx \ - config/coq_config.cmx toplevel/cerrors.cmx contrib/interface/ascent.cmi -contrib/interface/paths.cmo: contrib/interface/paths.cmi -contrib/interface/paths.cmx: contrib/interface/paths.cmi -contrib/interface/pbp.cmo: lib/util.cmi pretyping/typing.cmi \ - interp/topconstr.cmi pretyping/termops.cmi kernel/term.cmi \ - tactics/tactics.cmi tactics/tacticals.cmi proofs/tacmach.cmi \ - tactics/tacinterp.cmi proofs/tacexpr.cmo kernel/reduction.cmi \ - pretyping/rawterm.cmi proofs/proof_type.cmi proofs/proof_trees.cmi \ - pretyping/pretyping.cmi lib/pp.cmi pretyping/pattern.cmi \ - library/nametab.cmi kernel/names.cmi pretyping/matching.cmi \ - proofs/logic.cmi library/libnames.cmi tactics/hipattern.cmi \ - library/global.cmi interp/genarg.cmi pretyping/evd.cmi kernel/environ.cmi \ - interp/coqlib.cmi contrib/interface/pbp.cmi -contrib/interface/pbp.cmx: lib/util.cmx pretyping/typing.cmx \ - interp/topconstr.cmx pretyping/termops.cmx kernel/term.cmx \ - tactics/tactics.cmx tactics/tacticals.cmx proofs/tacmach.cmx \ - tactics/tacinterp.cmx proofs/tacexpr.cmx kernel/reduction.cmx \ - pretyping/rawterm.cmx proofs/proof_type.cmx proofs/proof_trees.cmx \ - pretyping/pretyping.cmx lib/pp.cmx pretyping/pattern.cmx \ - library/nametab.cmx kernel/names.cmx pretyping/matching.cmx \ - proofs/logic.cmx library/libnames.cmx tactics/hipattern.cmx \ - library/global.cmx interp/genarg.cmx pretyping/evd.cmx kernel/environ.cmx \ - interp/coqlib.cmx contrib/interface/pbp.cmi -contrib/interface/showproof_ct.cmo: contrib/interface/xlate.cmi \ - contrib/interface/vtp.cmi contrib/interface/translate.cmi \ - parsing/printer.cmi lib/pp.cmi toplevel/metasyntax.cmi library/global.cmi \ - contrib/interface/ascent.cmi -contrib/interface/showproof_ct.cmx: contrib/interface/xlate.cmx \ - contrib/interface/vtp.cmx contrib/interface/translate.cmx \ - parsing/printer.cmx lib/pp.cmx toplevel/metasyntax.cmx library/global.cmx \ - contrib/interface/ascent.cmi -contrib/interface/showproof.cmo: toplevel/vernacinterp.cmi lib/util.cmi \ - pretyping/typing.cmi kernel/typeops.cmi contrib/interface/translate.cmi \ - pretyping/termops.cmi kernel/term.cmi proofs/tacmach.cmi \ - proofs/tacexpr.cmo kernel/sign.cmi contrib/interface/showproof_ct.cmo \ - pretyping/reductionops.cmi pretyping/rawterm.cmi proofs/proof_type.cmi \ - proofs/proof_trees.cmi parsing/printer.cmi lib/pp.cmi proofs/pfedit.cmi \ - kernel/names.cmi library/nameops.cmi library/libnames.cmi \ - pretyping/inductiveops.cmi kernel/inductive.cmi library/global.cmi \ - interp/genarg.cmi pretyping/evd.cmi kernel/environ.cmi \ - kernel/declarations.cmi interp/constrintern.cmi pretyping/clenv.cmi \ - contrib/interface/showproof.cmi -contrib/interface/showproof.cmx: toplevel/vernacinterp.cmx lib/util.cmx \ - pretyping/typing.cmx kernel/typeops.cmx contrib/interface/translate.cmx \ - pretyping/termops.cmx kernel/term.cmx proofs/tacmach.cmx \ - proofs/tacexpr.cmx kernel/sign.cmx contrib/interface/showproof_ct.cmx \ - pretyping/reductionops.cmx pretyping/rawterm.cmx proofs/proof_type.cmx \ - proofs/proof_trees.cmx parsing/printer.cmx lib/pp.cmx proofs/pfedit.cmx \ - kernel/names.cmx library/nameops.cmx library/libnames.cmx \ - pretyping/inductiveops.cmx kernel/inductive.cmx library/global.cmx \ - interp/genarg.cmx pretyping/evd.cmx kernel/environ.cmx \ - kernel/declarations.cmx interp/constrintern.cmx pretyping/clenv.cmx \ - contrib/interface/showproof.cmi -contrib/interface/translate.cmo: contrib/interface/xlate.cmi \ - contrib/interface/vtp.cmi toplevel/vernacinterp.cmi lib/util.cmi \ - kernel/term.cmi proofs/tacmach.cmi kernel/sign.cmi proofs/proof_type.cmi \ - lib/pp.cmi proofs/pfedit.cmi kernel/names.cmi library/library.cmi \ - library/libobject.cmi pretyping/evd.cmi pretyping/evarutil.cmi \ - kernel/environ.cmi interp/constrextern.cmi contrib/interface/ascent.cmi \ - contrib/interface/translate.cmi -contrib/interface/translate.cmx: contrib/interface/xlate.cmx \ - contrib/interface/vtp.cmx toplevel/vernacinterp.cmx lib/util.cmx \ - kernel/term.cmx proofs/tacmach.cmx kernel/sign.cmx proofs/proof_type.cmx \ - lib/pp.cmx proofs/pfedit.cmx kernel/names.cmx library/library.cmx \ - library/libobject.cmx pretyping/evd.cmx pretyping/evarutil.cmx \ - kernel/environ.cmx interp/constrextern.cmx contrib/interface/ascent.cmi \ - contrib/interface/translate.cmi -contrib/interface/vtp.cmo: contrib/interface/ascent.cmi \ - contrib/interface/vtp.cmi -contrib/interface/vtp.cmx: contrib/interface/ascent.cmi \ - contrib/interface/vtp.cmi -contrib/interface/xlate.cmo: toplevel/vernacexpr.cmo lib/util.cmi \ - interp/topconstr.cmi kernel/term.cmi proofs/tacexpr.cmo \ - pretyping/rawterm.cmi parsing/ppconstr.cmi parsing/pcoq.cmi \ - kernel/names.cmi library/libnames.cmi library/goptions.cmi \ - interp/genarg.cmi tactics/extraargs.cmi parsing/extend.cmi \ - tactics/eauto.cmi library/decl_kinds.cmo lib/bigint.cmi \ - contrib/interface/ascent.cmi contrib/interface/xlate.cmi -contrib/interface/xlate.cmx: toplevel/vernacexpr.cmx lib/util.cmx \ - interp/topconstr.cmx kernel/term.cmx proofs/tacexpr.cmx \ - pretyping/rawterm.cmx parsing/ppconstr.cmx parsing/pcoq.cmx \ - kernel/names.cmx library/libnames.cmx library/goptions.cmx \ - interp/genarg.cmx tactics/extraargs.cmx parsing/extend.cmx \ - tactics/eauto.cmx library/decl_kinds.cmx lib/bigint.cmx \ - contrib/interface/ascent.cmi contrib/interface/xlate.cmi -contrib/jprover/jall.cmo: lib/pp.cmi contrib/jprover/opname.cmi \ - contrib/jprover/jtunify.cmi contrib/jprover/jterm.cmi \ - contrib/jprover/jlogic.cmi contrib/jprover/jall.cmi -contrib/jprover/jall.cmx: lib/pp.cmx contrib/jprover/opname.cmx \ - contrib/jprover/jtunify.cmx contrib/jprover/jterm.cmx \ - contrib/jprover/jlogic.cmx contrib/jprover/jall.cmi -contrib/jprover/jlogic.cmo: contrib/jprover/opname.cmi \ - contrib/jprover/jterm.cmi contrib/jprover/jlogic.cmi -contrib/jprover/jlogic.cmx: contrib/jprover/opname.cmx \ - contrib/jprover/jterm.cmx contrib/jprover/jlogic.cmi -contrib/jprover/jprover.cmo: parsing/grammar.cma lib/util.cmi pretyping/termops.cmi \ - kernel/term.cmi tactics/tactics.cmi tactics/tacticals.cmi \ - proofs/tacmach.cmi tactics/tacinterp.cmi proofs/tacexpr.cmo \ - proofs/refiner.cmi pretyping/reductionops.cmi kernel/reduction.cmi \ - pretyping/rawterm.cmi proofs/proof_type.cmi parsing/printer.cmi \ - parsing/pptactic.cmi lib/pp.cmi parsing/pcoq.cmi pretyping/pattern.cmi \ - kernel/names.cmi contrib/jprover/jterm.cmi contrib/jprover/jlogic.cmi \ - contrib/jprover/jall.cmi tactics/hipattern.cmi tactics/hiddentac.cmi \ - library/global.cmi interp/genarg.cmi pretyping/evarutil.cmi \ - parsing/egrammar.cmi toplevel/cerrors.cmi -contrib/jprover/jprover.cmx: parsing/grammar.cma lib/util.cmx pretyping/termops.cmx \ - kernel/term.cmx tactics/tactics.cmx tactics/tacticals.cmx \ - proofs/tacmach.cmx tactics/tacinterp.cmx proofs/tacexpr.cmx \ - proofs/refiner.cmx pretyping/reductionops.cmx kernel/reduction.cmx \ - pretyping/rawterm.cmx proofs/proof_type.cmx parsing/printer.cmx \ - parsing/pptactic.cmx lib/pp.cmx parsing/pcoq.cmx pretyping/pattern.cmx \ - kernel/names.cmx contrib/jprover/jterm.cmx contrib/jprover/jlogic.cmx \ - contrib/jprover/jall.cmx tactics/hipattern.cmx tactics/hiddentac.cmx \ - library/global.cmx interp/genarg.cmx pretyping/evarutil.cmx \ - parsing/egrammar.cmx toplevel/cerrors.cmx -contrib/jprover/jterm.cmo: contrib/jprover/opname.cmi \ - contrib/jprover/jterm.cmi -contrib/jprover/jterm.cmx: contrib/jprover/opname.cmx \ - contrib/jprover/jterm.cmi -contrib/jprover/jtunify.cmo: contrib/jprover/jtunify.cmi -contrib/jprover/jtunify.cmx: contrib/jprover/jtunify.cmi -contrib/jprover/opname.cmo: contrib/jprover/opname.cmi -contrib/jprover/opname.cmx: contrib/jprover/opname.cmi -contrib/omega/coq_omega.cmo: lib/util.cmi pretyping/termops.cmi \ - kernel/term.cmi tactics/tactics.cmi tactics/tacticals.cmi \ - pretyping/tacred.cmi proofs/tacmach.cmi kernel/sign.cmi \ - kernel/reduction.cmi pretyping/rawterm.cmi proofs/proof_type.cmi \ - parsing/printer.cmi lib/pp.cmi contrib/omega/omega.cmo \ - library/nametab.cmi kernel/names.cmi library/nameops.cmi proofs/logic.cmi \ - library/libnames.cmi kernel/inductive.cmi library/goptions.cmi \ - library/global.cmi pretyping/evarutil.cmi proofs/evar_refiner.cmi \ - tactics/equality.cmi kernel/environ.cmi kernel/declarations.cmi \ - interp/coqlib.cmi tactics/contradiction.cmi kernel/closure.cmi \ - pretyping/clenv.cmi lib/bigint.cmi -contrib/omega/coq_omega.cmx: lib/util.cmx pretyping/termops.cmx \ - kernel/term.cmx tactics/tactics.cmx tactics/tacticals.cmx \ - pretyping/tacred.cmx proofs/tacmach.cmx kernel/sign.cmx \ - kernel/reduction.cmx pretyping/rawterm.cmx proofs/proof_type.cmx \ - parsing/printer.cmx lib/pp.cmx contrib/omega/omega.cmx \ - library/nametab.cmx kernel/names.cmx library/nameops.cmx proofs/logic.cmx \ - library/libnames.cmx kernel/inductive.cmx library/goptions.cmx \ - library/global.cmx pretyping/evarutil.cmx proofs/evar_refiner.cmx \ - tactics/equality.cmx kernel/environ.cmx kernel/declarations.cmx \ - interp/coqlib.cmx tactics/contradiction.cmx kernel/closure.cmx \ - pretyping/clenv.cmx lib/bigint.cmx -contrib/omega/g_omega.cmo: parsing/grammar.cma lib/util.cmi tactics/tacinterp.cmi \ - proofs/tacexpr.cmo proofs/refiner.cmi parsing/pptactic.cmi lib/pp.cmi \ - parsing/pcoq.cmi parsing/egrammar.cmi contrib/omega/coq_omega.cmo \ - toplevel/cerrors.cmi -contrib/omega/g_omega.cmx: parsing/grammar.cma lib/util.cmx tactics/tacinterp.cmx \ - proofs/tacexpr.cmx proofs/refiner.cmx parsing/pptactic.cmx lib/pp.cmx \ - parsing/pcoq.cmx parsing/egrammar.cmx contrib/omega/coq_omega.cmx \ - toplevel/cerrors.cmx -contrib/omega/omega.cmo: lib/util.cmi kernel/names.cmi -contrib/omega/omega.cmx: lib/util.cmx kernel/names.cmx -contrib/recdef/recdef.cmo: parsing/grammar.cma toplevel/vernacinterp.cmi \ - toplevel/vernacentries.cmi lib/util.cmi pretyping/typing.cmi \ - kernel/typeops.cmi interp/topconstr.cmi pretyping/termops.cmi \ - kernel/term.cmi tactics/tactics.cmi tactics/tacticals.cmi \ - proofs/tactic_debug.cmi pretyping/tacred.cmi proofs/tacmach.cmi \ - tactics/tacinterp.cmi kernel/safe_typing.cmi pretyping/reductionops.cmi \ - pretyping/rawterm.cmi proofs/proof_type.cmi parsing/printer.cmi \ - pretyping/pretyping.cmi parsing/ppconstr.cmi lib/pp.cmi proofs/pfedit.cmi \ - parsing/pcoq.cmi lib/options.cmi library/nametab.cmi kernel/names.cmi \ - library/nameops.cmi library/libnames.cmi library/lib.cmi \ - tactics/hiddentac.cmi library/global.cmi interp/genarg.cmi \ - pretyping/evd.cmi tactics/equality.cmi kernel/environ.cmi \ - kernel/entries.cmi tactics/elim.cmi parsing/egrammar.cmi \ - tactics/eauto.cmi library/declare.cmi kernel/declarations.cmi \ - library/decl_kinds.cmo interp/coqlib.cmi interp/constrintern.cmi \ - toplevel/command.cmi kernel/closure.cmi toplevel/cerrors.cmi \ - tactics/auto.cmi -contrib/recdef/recdef.cmx: parsing/grammar.cma toplevel/vernacinterp.cmx \ - toplevel/vernacentries.cmx lib/util.cmx pretyping/typing.cmx \ - kernel/typeops.cmx interp/topconstr.cmx pretyping/termops.cmx \ - kernel/term.cmx tactics/tactics.cmx tactics/tacticals.cmx \ - proofs/tactic_debug.cmx pretyping/tacred.cmx proofs/tacmach.cmx \ - tactics/tacinterp.cmx kernel/safe_typing.cmx pretyping/reductionops.cmx \ - pretyping/rawterm.cmx proofs/proof_type.cmx parsing/printer.cmx \ - pretyping/pretyping.cmx parsing/ppconstr.cmx lib/pp.cmx proofs/pfedit.cmx \ - parsing/pcoq.cmx lib/options.cmx library/nametab.cmx kernel/names.cmx \ - library/nameops.cmx library/libnames.cmx library/lib.cmx \ - tactics/hiddentac.cmx library/global.cmx interp/genarg.cmx \ - pretyping/evd.cmx tactics/equality.cmx kernel/environ.cmx \ - kernel/entries.cmx tactics/elim.cmx parsing/egrammar.cmx \ - tactics/eauto.cmx library/declare.cmx kernel/declarations.cmx \ - library/decl_kinds.cmx interp/coqlib.cmx interp/constrintern.cmx \ - toplevel/command.cmx kernel/closure.cmx toplevel/cerrors.cmx \ - tactics/auto.cmx -contrib/ring/g_quote.cmo: parsing/grammar.cma lib/util.cmi tactics/tacinterp.cmi \ - proofs/tacexpr.cmo contrib/ring/quote.cmo parsing/pptactic.cmi lib/pp.cmi \ - parsing/pcoq.cmi interp/genarg.cmi parsing/egrammar.cmi \ - toplevel/cerrors.cmi -contrib/ring/g_quote.cmx: parsing/grammar.cma lib/util.cmx tactics/tacinterp.cmx \ - proofs/tacexpr.cmx contrib/ring/quote.cmx parsing/pptactic.cmx lib/pp.cmx \ - parsing/pcoq.cmx interp/genarg.cmx parsing/egrammar.cmx \ - toplevel/cerrors.cmx -contrib/ring/g_ring.cmo: parsing/grammar.cma toplevel/vernacinterp.cmi lib/util.cmi \ - tactics/tacticals.cmi tactics/tacinterp.cmi proofs/tacexpr.cmo \ - contrib/ring/ring.cmo proofs/refiner.cmi contrib/ring/quote.cmo \ - parsing/pptactic.cmi lib/pp.cmi parsing/pcoq.cmi interp/genarg.cmi \ - parsing/egrammar.cmi toplevel/cerrors.cmi -contrib/ring/g_ring.cmx: parsing/grammar.cma toplevel/vernacinterp.cmx lib/util.cmx \ - tactics/tacticals.cmx tactics/tacinterp.cmx proofs/tacexpr.cmx \ - contrib/ring/ring.cmx proofs/refiner.cmx contrib/ring/quote.cmx \ - parsing/pptactic.cmx lib/pp.cmx parsing/pcoq.cmx interp/genarg.cmx \ - parsing/egrammar.cmx toplevel/cerrors.cmx -contrib/ring/quote.cmo: lib/util.cmi pretyping/termops.cmi kernel/term.cmi \ - tactics/tactics.cmi proofs/tacmach.cmi proofs/tacexpr.cmo \ - proofs/proof_trees.cmi lib/pp.cmi pretyping/pattern.cmi kernel/names.cmi \ - pretyping/matching.cmi library/global.cmi kernel/environ.cmi \ - interp/coqlib.cmi -contrib/ring/quote.cmx: lib/util.cmx pretyping/termops.cmx kernel/term.cmx \ - tactics/tactics.cmx proofs/tacmach.cmx proofs/tacexpr.cmx \ - proofs/proof_trees.cmx lib/pp.cmx pretyping/pattern.cmx kernel/names.cmx \ - pretyping/matching.cmx library/global.cmx kernel/environ.cmx \ - interp/coqlib.cmx -contrib/ring/ring.cmo: toplevel/vernacinterp.cmi toplevel/vernacexpr.cmo \ - lib/util.cmi pretyping/typing.cmi kernel/term.cmi tactics/tactics.cmi \ - tactics/tacticals.cmi pretyping/tacred.cmi proofs/tacmach.cmi \ - proofs/tacexpr.cmo library/summary.cmi tactics/setoid_replace.cmi \ - pretyping/reductionops.cmi contrib/ring/quote.cmo proofs/proof_trees.cmi \ - parsing/printer.cmi lib/pp.cmi pretyping/pattern.cmi lib/options.cmi \ - library/nametab.cmi kernel/names.cmi library/nameops.cmi \ - kernel/mod_subst.cmi library/libobject.cmi library/libnames.cmi \ - library/lib.cmi tactics/hipattern.cmi tactics/hiddentac.cmi \ - library/global.cmi pretyping/evd.cmi tactics/equality.cmi \ - interp/coqlib.cmi interp/constrintern.cmi kernel/closure.cmi -contrib/ring/ring.cmx: toplevel/vernacinterp.cmx toplevel/vernacexpr.cmx \ - lib/util.cmx pretyping/typing.cmx kernel/term.cmx tactics/tactics.cmx \ - tactics/tacticals.cmx pretyping/tacred.cmx proofs/tacmach.cmx \ - proofs/tacexpr.cmx library/summary.cmx tactics/setoid_replace.cmx \ - pretyping/reductionops.cmx contrib/ring/quote.cmx proofs/proof_trees.cmx \ - parsing/printer.cmx lib/pp.cmx pretyping/pattern.cmx lib/options.cmx \ - library/nametab.cmx kernel/names.cmx library/nameops.cmx \ - kernel/mod_subst.cmx library/libobject.cmx library/libnames.cmx \ - library/lib.cmx tactics/hipattern.cmx tactics/hiddentac.cmx \ - library/global.cmx pretyping/evd.cmx tactics/equality.cmx \ - interp/coqlib.cmx interp/constrintern.cmx kernel/closure.cmx -contrib/romega/const_omega.cmo: lib/util.cmi kernel/term.cmi \ - library/nametab.cmi kernel/names.cmi library/libnames.cmi \ - interp/coqlib.cmi lib/bigint.cmi -contrib/romega/const_omega.cmx: lib/util.cmx kernel/term.cmx \ - library/nametab.cmx kernel/names.cmx library/libnames.cmx \ - interp/coqlib.cmx lib/bigint.cmx -contrib/romega/g_romega.cmo: parsing/grammar.cma lib/util.cmi tactics/tacinterp.cmi \ - proofs/tacexpr.cmo contrib/romega/refl_omega.cmo proofs/refiner.cmi \ - parsing/pptactic.cmi lib/pp.cmi parsing/pcoq.cmi parsing/egrammar.cmi \ - toplevel/cerrors.cmi -contrib/romega/g_romega.cmx: parsing/grammar.cma lib/util.cmx tactics/tacinterp.cmx \ - proofs/tacexpr.cmx contrib/romega/refl_omega.cmx proofs/refiner.cmx \ - parsing/pptactic.cmx lib/pp.cmx parsing/pcoq.cmx parsing/egrammar.cmx \ - toplevel/cerrors.cmx -contrib/romega/refl_omega.cmo: lib/util.cmi kernel/term.cmi \ - tactics/tactics.cmi tactics/tacticals.cmi proofs/tacmach.cmi \ - parsing/printer.cmi lib/pp.cmi contrib/omega/omega.cmo kernel/names.cmi \ - proofs/logic.cmi interp/coqlib.cmi contrib/romega/const_omega.cmo \ - lib/bigint.cmi -contrib/romega/refl_omega.cmx: lib/util.cmx kernel/term.cmx \ - tactics/tactics.cmx tactics/tacticals.cmx proofs/tacmach.cmx \ - parsing/printer.cmx lib/pp.cmx contrib/omega/omega.cmx kernel/names.cmx \ - proofs/logic.cmx interp/coqlib.cmx contrib/romega/const_omega.cmx \ - lib/bigint.cmx -contrib/rtauto/g_rtauto.cmo: parsing/grammar.cma lib/util.cmi tactics/tacinterp.cmi \ - proofs/tacexpr.cmo contrib/rtauto/refl_tauto.cmi proofs/refiner.cmi \ - parsing/pptactic.cmi lib/pp.cmi parsing/pcoq.cmi parsing/egrammar.cmi \ - toplevel/cerrors.cmi -contrib/rtauto/g_rtauto.cmx: parsing/grammar.cma lib/util.cmx tactics/tacinterp.cmx \ - proofs/tacexpr.cmx contrib/rtauto/refl_tauto.cmx proofs/refiner.cmx \ - parsing/pptactic.cmx lib/pp.cmx parsing/pcoq.cmx parsing/egrammar.cmx \ - toplevel/cerrors.cmx -contrib/rtauto/proof_search.cmo: lib/util.cmi kernel/term.cmi lib/pp.cmi \ - library/goptions.cmi contrib/rtauto/proof_search.cmi -contrib/rtauto/proof_search.cmx: lib/util.cmx kernel/term.cmx lib/pp.cmx \ - library/goptions.cmx contrib/rtauto/proof_search.cmi -contrib/rtauto/refl_tauto.cmo: lib/util.cmi pretyping/termops.cmi \ - kernel/term.cmi tactics/tactics.cmi proofs/tactic_debug.cmi \ - proofs/tacmach.cmi tactics/tacinterp.cmi lib/system.cmi \ - pretyping/retyping.cmi contrib/rtauto/proof_search.cmi lib/pp.cmi \ - kernel/names.cmi library/goptions.cmi lib/explore.cmi pretyping/evd.cmi \ - kernel/environ.cmi interp/coqlib.cmi kernel/closure.cmi \ - contrib/rtauto/refl_tauto.cmi -contrib/rtauto/refl_tauto.cmx: lib/util.cmx pretyping/termops.cmx \ - kernel/term.cmx tactics/tactics.cmx proofs/tactic_debug.cmx \ - proofs/tacmach.cmx tactics/tacinterp.cmx lib/system.cmx \ - pretyping/retyping.cmx contrib/rtauto/proof_search.cmx lib/pp.cmx \ - kernel/names.cmx library/goptions.cmx lib/explore.cmx pretyping/evd.cmx \ - kernel/environ.cmx interp/coqlib.cmx kernel/closure.cmx \ - contrib/rtauto/refl_tauto.cmi -contrib/setoid_ring/newring.cmo: parsing/grammar.cma toplevel/vernacinterp.cmi lib/util.cmi \ - pretyping/typing.cmi interp/topconstr.cmi pretyping/termops.cmi \ - kernel/term.cmi tactics/tactics.cmi tactics/tacticals.cmi \ - proofs/tacmach.cmi tactics/tacinterp.cmi proofs/tacexpr.cmo \ - library/summary.cmi tactics/setoid_replace.cmi pretyping/retyping.cmi \ - proofs/refiner.cmi pretyping/reductionops.cmi pretyping/rawterm.cmi \ - contrib/ring/quote.cmo proofs/proof_type.cmi parsing/printer.cmi \ - pretyping/pretyping.cmi parsing/pptactic.cmi lib/pp.cmi parsing/pcoq.cmi \ - library/nametab.cmi kernel/names.cmi kernel/mod_subst.cmi \ - library/libobject.cmi library/libnames.cmi library/lib.cmi \ - parsing/lexer.cmi library/global.cmi interp/genarg.cmi pretyping/evd.cmi \ - kernel/esubst.cmi kernel/environ.cmi kernel/entries.cmi \ - parsing/egrammar.cmi library/declare.cmi library/decl_kinds.cmo \ - interp/coqlib.cmi interp/constrintern.cmi kernel/closure.cmi \ - toplevel/cerrors.cmi -contrib/setoid_ring/newring.cmx: parsing/grammar.cma toplevel/vernacinterp.cmx lib/util.cmx \ - pretyping/typing.cmx interp/topconstr.cmx pretyping/termops.cmx \ - kernel/term.cmx tactics/tactics.cmx tactics/tacticals.cmx \ - proofs/tacmach.cmx tactics/tacinterp.cmx proofs/tacexpr.cmx \ - library/summary.cmx tactics/setoid_replace.cmx pretyping/retyping.cmx \ - proofs/refiner.cmx pretyping/reductionops.cmx pretyping/rawterm.cmx \ - contrib/ring/quote.cmx proofs/proof_type.cmx parsing/printer.cmx \ - pretyping/pretyping.cmx parsing/pptactic.cmx lib/pp.cmx parsing/pcoq.cmx \ - library/nametab.cmx kernel/names.cmx kernel/mod_subst.cmx \ - library/libobject.cmx library/libnames.cmx library/lib.cmx \ - parsing/lexer.cmx library/global.cmx interp/genarg.cmx pretyping/evd.cmx \ - kernel/esubst.cmx kernel/environ.cmx kernel/entries.cmx \ - parsing/egrammar.cmx library/declare.cmx library/decl_kinds.cmx \ - interp/coqlib.cmx interp/constrintern.cmx kernel/closure.cmx \ - toplevel/cerrors.cmx -contrib/subtac/eterm.cmo: lib/util.cmi pretyping/termops.cmi kernel/term.cmi \ - tactics/tacticals.cmi contrib/subtac/subtac_utils.cmi lib/pp.cmi \ - lib/options.cmi kernel/names.cmi library/global.cmi pretyping/evd.cmi \ - pretyping/evarutil.cmi kernel/environ.cmi contrib/subtac/eterm.cmi -contrib/subtac/eterm.cmx: lib/util.cmx pretyping/termops.cmx kernel/term.cmx \ - tactics/tacticals.cmx contrib/subtac/subtac_utils.cmx lib/pp.cmx \ - lib/options.cmx kernel/names.cmx library/global.cmx pretyping/evd.cmx \ - pretyping/evarutil.cmx kernel/environ.cmx contrib/subtac/eterm.cmi -contrib/subtac/g_eterm.cmo: parsing/grammar.cma lib/util.cmi proofs/tacmach.cmi \ - tactics/tacinterp.cmi proofs/tacexpr.cmo proofs/refiner.cmi \ - parsing/pptactic.cmi lib/pp.cmi parsing/pcoq.cmi contrib/subtac/eterm.cmi \ - parsing/egrammar.cmi toplevel/cerrors.cmi -contrib/subtac/g_eterm.cmx: parsing/grammar.cma lib/util.cmx proofs/tacmach.cmx \ - tactics/tacinterp.cmx proofs/tacexpr.cmx proofs/refiner.cmx \ - parsing/pptactic.cmx lib/pp.cmx parsing/pcoq.cmx contrib/subtac/eterm.cmx \ - parsing/egrammar.cmx toplevel/cerrors.cmx -contrib/subtac/g_subtac.cmo: parsing/grammar.cma toplevel/vernacinterp.cmi \ - toplevel/vernacexpr.cmo toplevel/vernacentries.cmi lib/util.cmi \ - interp/topconstr.cmi kernel/term.cmi tactics/tacinterp.cmi \ - proofs/tacexpr.cmo contrib/subtac/subtac_obligations.cmi \ - contrib/subtac/subtac.cmi kernel/reduction.cmi proofs/proof_type.cmi \ - lib/pp.cmi parsing/pcoq.cmi lib/options.cmi kernel/names.cmi \ - library/nameops.cmi library/libnames.cmi interp/genarg.cmi \ - parsing/egrammar.cmi toplevel/cerrors.cmi -contrib/subtac/g_subtac.cmx: parsing/grammar.cma toplevel/vernacinterp.cmx \ - toplevel/vernacexpr.cmx toplevel/vernacentries.cmx lib/util.cmx \ - interp/topconstr.cmx kernel/term.cmx tactics/tacinterp.cmx \ - proofs/tacexpr.cmx contrib/subtac/subtac_obligations.cmx \ - contrib/subtac/subtac.cmx kernel/reduction.cmx proofs/proof_type.cmx \ - lib/pp.cmx parsing/pcoq.cmx lib/options.cmx kernel/names.cmx \ - library/nameops.cmx library/libnames.cmx interp/genarg.cmx \ - parsing/egrammar.cmx toplevel/cerrors.cmx -contrib/subtac/subtac_cases.cmo: lib/util.cmi kernel/typeops.cmi \ - kernel/type_errors.cmi pretyping/termops.cmi kernel/term.cmi \ - contrib/subtac/subtac_utils.cmi kernel/sign.cmi pretyping/retyping.cmi \ - pretyping/reductionops.cmi kernel/reduction.cmi pretyping/rawterm.cmi \ - parsing/printer.cmi pretyping/pretype_errors.cmi lib/pp.cmi \ - kernel/names.cmi library/nameops.cmi pretyping/inductiveops.cmi \ - kernel/inductive.cmi library/global.cmi pretyping/evd.cmi \ - pretyping/evarutil.cmi pretyping/evarconv.cmi kernel/environ.cmi \ - kernel/declarations.cmi pretyping/coercion.cmi kernel/closure.cmi \ - pretyping/cases.cmi contrib/subtac/subtac_cases.cmi -contrib/subtac/subtac_cases.cmx: lib/util.cmx kernel/typeops.cmx \ - kernel/type_errors.cmx pretyping/termops.cmx kernel/term.cmx \ - contrib/subtac/subtac_utils.cmx kernel/sign.cmx pretyping/retyping.cmx \ - pretyping/reductionops.cmx kernel/reduction.cmx pretyping/rawterm.cmx \ - parsing/printer.cmx pretyping/pretype_errors.cmx lib/pp.cmx \ - kernel/names.cmx library/nameops.cmx pretyping/inductiveops.cmx \ - kernel/inductive.cmx library/global.cmx pretyping/evd.cmx \ - pretyping/evarutil.cmx pretyping/evarconv.cmx kernel/environ.cmx \ - kernel/declarations.cmx pretyping/coercion.cmx kernel/closure.cmx \ - pretyping/cases.cmx contrib/subtac/subtac_cases.cmi -contrib/subtac/subtac_coercion.cmo: lib/util.cmi pretyping/typing.cmi \ - kernel/typeops.cmi pretyping/termops.cmi kernel/term.cmi \ - contrib/subtac/subtac_utils.cmi contrib/subtac/subtac_errors.cmi \ - pretyping/retyping.cmi pretyping/reductionops.cmi kernel/reduction.cmi \ - pretyping/recordops.cmi pretyping/rawterm.cmi parsing/printer.cmi \ - pretyping/pretype_errors.cmi lib/pp.cmi kernel/names.cmi \ - library/nameops.cmi library/global.cmi pretyping/evd.cmi \ - pretyping/evarutil.cmi pretyping/evarconv.cmi contrib/subtac/eterm.cmi \ - kernel/environ.cmi interp/coqlib.cmi pretyping/classops.cmi \ - contrib/subtac/subtac_coercion.cmi -contrib/subtac/subtac_coercion.cmx: lib/util.cmx pretyping/typing.cmx \ - kernel/typeops.cmx pretyping/termops.cmx kernel/term.cmx \ - contrib/subtac/subtac_utils.cmx contrib/subtac/subtac_errors.cmx \ - pretyping/retyping.cmx pretyping/reductionops.cmx kernel/reduction.cmx \ - pretyping/recordops.cmx pretyping/rawterm.cmx parsing/printer.cmx \ - pretyping/pretype_errors.cmx lib/pp.cmx kernel/names.cmx \ - library/nameops.cmx library/global.cmx pretyping/evd.cmx \ - pretyping/evarutil.cmx pretyping/evarconv.cmx contrib/subtac/eterm.cmx \ - kernel/environ.cmx interp/coqlib.cmx pretyping/classops.cmx \ - contrib/subtac/subtac_coercion.cmi -contrib/subtac/subtac_command.cmo: toplevel/vernacexpr.cmo lib/util.cmi \ - pretyping/typing.cmi interp/topconstr.cmi pretyping/termops.cmi \ - kernel/term.cmi tactics/tactics.cmi tactics/tacticals.cmi \ - proofs/tactic_debug.cmi pretyping/tacred.cmi proofs/tacmach.cmi \ - tactics/tacinterp.cmi proofs/tacexpr.cmo interp/syntax_def.cmi \ - contrib/subtac/subtac_utils.cmi contrib/subtac/subtac_pretyping.cmi \ - contrib/subtac/subtac_obligations.cmi library/states.cmi kernel/sign.cmi \ - kernel/safe_typing.cmi interp/reserve.cmi proofs/refiner.cmi \ - pretyping/rawterm.cmi proofs/proof_type.cmi parsing/printer.cmi \ - pretyping/pretyping.cmi lib/pp.cmi proofs/pfedit.cmi \ - pretyping/pattern.cmi interp/notation.cmi library/nametab.cmi \ - kernel/names.cmi library/nameops.cmi kernel/mod_subst.cmi \ - toplevel/metasyntax.cmi pretyping/matching.cmi library/libobject.cmi \ - library/libnames.cmi pretyping/inductiveops.cmi library/impargs.cmi \ - tactics/hiddentac.cmi library/global.cmi interp/genarg.cmi \ - pretyping/evd.cmi pretyping/evarutil.cmi contrib/subtac/eterm.cmi \ - kernel/environ.cmi kernel/entries.cmi lib/dyn.cmi kernel/declarations.cmi \ - library/decl_kinds.cmo interp/coqlib.cmi interp/constrintern.cmi \ - toplevel/command.cmi kernel/closure.cmi contrib/subtac/subtac_command.cmi -contrib/subtac/subtac_command.cmx: toplevel/vernacexpr.cmx lib/util.cmx \ - pretyping/typing.cmx interp/topconstr.cmx pretyping/termops.cmx \ - kernel/term.cmx tactics/tactics.cmx tactics/tacticals.cmx \ - proofs/tactic_debug.cmx pretyping/tacred.cmx proofs/tacmach.cmx \ - tactics/tacinterp.cmx proofs/tacexpr.cmx interp/syntax_def.cmx \ - contrib/subtac/subtac_utils.cmx contrib/subtac/subtac_pretyping.cmx \ - contrib/subtac/subtac_obligations.cmx library/states.cmx kernel/sign.cmx \ - kernel/safe_typing.cmx interp/reserve.cmx proofs/refiner.cmx \ - pretyping/rawterm.cmx proofs/proof_type.cmx parsing/printer.cmx \ - pretyping/pretyping.cmx lib/pp.cmx proofs/pfedit.cmx \ - pretyping/pattern.cmx interp/notation.cmx library/nametab.cmx \ - kernel/names.cmx library/nameops.cmx kernel/mod_subst.cmx \ - toplevel/metasyntax.cmx pretyping/matching.cmx library/libobject.cmx \ - library/libnames.cmx pretyping/inductiveops.cmx library/impargs.cmx \ - tactics/hiddentac.cmx library/global.cmx interp/genarg.cmx \ - pretyping/evd.cmx pretyping/evarutil.cmx contrib/subtac/eterm.cmx \ - kernel/environ.cmx kernel/entries.cmx lib/dyn.cmx kernel/declarations.cmx \ - library/decl_kinds.cmx interp/coqlib.cmx interp/constrintern.cmx \ - toplevel/command.cmx kernel/closure.cmx contrib/subtac/subtac_command.cmi -contrib/subtac/subtac_errors.cmo: lib/util.cmi parsing/printer.cmi lib/pp.cmi \ - contrib/subtac/subtac_errors.cmi -contrib/subtac/subtac_errors.cmx: lib/util.cmx parsing/printer.cmx lib/pp.cmx \ - contrib/subtac/subtac_errors.cmi -contrib/subtac/subtac.cmo: toplevel/vernacexpr.cmo lib/util.cmi \ - kernel/typeops.cmi kernel/type_errors.cmi pretyping/termops.cmi \ - kernel/term.cmi tactics/tacinterp.cmi proofs/tacexpr.cmo \ - contrib/subtac/subtac_utils.cmi contrib/subtac/subtac_pretyping.cmi \ - contrib/subtac/subtac_errors.cmi contrib/subtac/subtac_command.cmi \ - contrib/subtac/subtac_coercion.cmi kernel/sign.cmi \ - pretyping/reductionops.cmi pretyping/recordops.cmi pretyping/rawterm.cmi \ - parsing/printer.cmi pretyping/pretype_errors.cmi parsing/ppconstr.cmi \ - lib/pp.cmi proofs/pfedit.cmi pretyping/pattern.cmi lib/options.cmi \ - library/nametab.cmi kernel/names.cmi library/library.cmi \ - library/libnames.cmi library/lib.cmi toplevel/himsg.cmi \ - library/global.cmi pretyping/evd.cmi pretyping/evarutil.cmi \ - pretyping/evarconv.cmi contrib/subtac/eterm.cmi kernel/environ.cmi \ - lib/dyn.cmi pretyping/detyping.cmi library/decl_kinds.cmo \ - interp/coqlib.cmi toplevel/command.cmi pretyping/classops.cmi \ - toplevel/cerrors.cmi pretyping/cases.cmi contrib/subtac/subtac.cmi -contrib/subtac/subtac.cmx: toplevel/vernacexpr.cmx lib/util.cmx \ - kernel/typeops.cmx kernel/type_errors.cmx pretyping/termops.cmx \ - kernel/term.cmx tactics/tacinterp.cmx proofs/tacexpr.cmx \ - contrib/subtac/subtac_utils.cmx contrib/subtac/subtac_pretyping.cmx \ - contrib/subtac/subtac_errors.cmx contrib/subtac/subtac_command.cmx \ - contrib/subtac/subtac_coercion.cmx kernel/sign.cmx \ - pretyping/reductionops.cmx pretyping/recordops.cmx pretyping/rawterm.cmx \ - parsing/printer.cmx pretyping/pretype_errors.cmx parsing/ppconstr.cmx \ - lib/pp.cmx proofs/pfedit.cmx pretyping/pattern.cmx lib/options.cmx \ - library/nametab.cmx kernel/names.cmx library/library.cmx \ - library/libnames.cmx library/lib.cmx toplevel/himsg.cmx \ - library/global.cmx pretyping/evd.cmx pretyping/evarutil.cmx \ - pretyping/evarconv.cmx contrib/subtac/eterm.cmx kernel/environ.cmx \ - lib/dyn.cmx pretyping/detyping.cmx library/decl_kinds.cmx \ - interp/coqlib.cmx toplevel/command.cmx pretyping/classops.cmx \ - toplevel/cerrors.cmx pretyping/cases.cmx contrib/subtac/subtac.cmi -contrib/subtac/subtac_obligations.cmo: lib/util.cmi kernel/term.cmi \ - tactics/tacinterp.cmi proofs/tacexpr.cmo library/summary.cmi \ - contrib/subtac/subtac_utils.cmi proofs/refiner.cmi \ - pretyping/reductionops.cmi proofs/proof_type.cmi parsing/ppconstr.cmi \ - lib/pp.cmi proofs/pfedit.cmi lib/options.cmi kernel/names.cmi \ - library/libobject.cmi library/libnames.cmi library/lib.cmi \ - library/global.cmi pretyping/evd.cmi kernel/entries.cmi \ - library/declare.cmi library/decl_kinds.cmo toplevel/command.cmi \ - tactics/auto.cmi contrib/subtac/subtac_obligations.cmi -contrib/subtac/subtac_obligations.cmx: lib/util.cmx kernel/term.cmx \ - tactics/tacinterp.cmx proofs/tacexpr.cmx library/summary.cmx \ - contrib/subtac/subtac_utils.cmx proofs/refiner.cmx \ - pretyping/reductionops.cmx proofs/proof_type.cmx parsing/ppconstr.cmx \ - lib/pp.cmx proofs/pfedit.cmx lib/options.cmx kernel/names.cmx \ - library/libobject.cmx library/libnames.cmx library/lib.cmx \ - library/global.cmx pretyping/evd.cmx kernel/entries.cmx \ - library/declare.cmx library/decl_kinds.cmx toplevel/command.cmx \ - tactics/auto.cmx contrib/subtac/subtac_obligations.cmi -contrib/subtac/subtac_pretyping_F.cmo: lib/util.cmi kernel/typeops.cmi \ - kernel/type_errors.cmi pretyping/termops.cmi kernel/term.cmi \ - contrib/subtac/subtac_cases.cmi kernel/sign.cmi pretyping/retyping.cmi \ - pretyping/reductionops.cmi pretyping/recordops.cmi pretyping/rawterm.cmi \ - pretyping/pretyping.cmi pretyping/pretype_errors.cmi lib/pp.cmi \ - pretyping/pattern.cmi kernel/names.cmi library/nameops.cmi \ - library/libnames.cmi pretyping/inductiveops.cmi kernel/inductive.cmi \ - pretyping/evd.cmi pretyping/evarutil.cmi pretyping/evarconv.cmi \ - kernel/environ.cmi lib/dyn.cmi kernel/declarations.cmi \ - pretyping/coercion.cmi pretyping/classops.cmi -contrib/subtac/subtac_pretyping_F.cmx: lib/util.cmx kernel/typeops.cmx \ - kernel/type_errors.cmx pretyping/termops.cmx kernel/term.cmx \ - contrib/subtac/subtac_cases.cmx kernel/sign.cmx pretyping/retyping.cmx \ - pretyping/reductionops.cmx pretyping/recordops.cmx pretyping/rawterm.cmx \ - pretyping/pretyping.cmx pretyping/pretype_errors.cmx lib/pp.cmx \ - pretyping/pattern.cmx kernel/names.cmx library/nameops.cmx \ - library/libnames.cmx pretyping/inductiveops.cmx kernel/inductive.cmx \ - pretyping/evd.cmx pretyping/evarutil.cmx pretyping/evarconv.cmx \ - kernel/environ.cmx lib/dyn.cmx kernel/declarations.cmx \ - pretyping/coercion.cmx pretyping/classops.cmx -contrib/subtac/subtac_pretyping.cmo: toplevel/vernacexpr.cmo lib/util.cmi \ - kernel/typeops.cmi kernel/type_errors.cmi interp/topconstr.cmi \ - pretyping/termops.cmi kernel/term.cmi contrib/subtac/subtac_utils.cmi \ - contrib/subtac/subtac_pretyping_F.cmo \ - contrib/subtac/subtac_obligations.cmi contrib/subtac/subtac_errors.cmi \ - contrib/subtac/subtac_coercion.cmi kernel/sign.cmi \ - pretyping/reductionops.cmi pretyping/recordops.cmi pretyping/rawterm.cmi \ - parsing/printer.cmi pretyping/pretype_errors.cmi lib/pp.cmi \ - pretyping/pattern.cmi kernel/names.cmi library/nameops.cmi \ - library/libnames.cmi library/global.cmi pretyping/evd.cmi \ - pretyping/evarutil.cmi pretyping/evarconv.cmi contrib/subtac/eterm.cmi \ - kernel/environ.cmi lib/dyn.cmi interp/coqlib.cmi interp/constrintern.cmi \ - toplevel/command.cmi pretyping/classops.cmi \ - contrib/subtac/subtac_pretyping.cmi -contrib/subtac/subtac_pretyping.cmx: toplevel/vernacexpr.cmx lib/util.cmx \ - kernel/typeops.cmx kernel/type_errors.cmx interp/topconstr.cmx \ - pretyping/termops.cmx kernel/term.cmx contrib/subtac/subtac_utils.cmx \ - contrib/subtac/subtac_pretyping_F.cmx \ - contrib/subtac/subtac_obligations.cmx contrib/subtac/subtac_errors.cmx \ - contrib/subtac/subtac_coercion.cmx kernel/sign.cmx \ - pretyping/reductionops.cmx pretyping/recordops.cmx pretyping/rawterm.cmx \ - parsing/printer.cmx pretyping/pretype_errors.cmx lib/pp.cmx \ - pretyping/pattern.cmx kernel/names.cmx library/nameops.cmx \ - library/libnames.cmx library/global.cmx pretyping/evd.cmx \ - pretyping/evarutil.cmx pretyping/evarconv.cmx contrib/subtac/eterm.cmx \ - kernel/environ.cmx lib/dyn.cmx interp/coqlib.cmx interp/constrintern.cmx \ - toplevel/command.cmx pretyping/classops.cmx \ - contrib/subtac/subtac_pretyping.cmi -contrib/subtac/subtac_utils.cmo: lib/util.cmi interp/topconstr.cmi \ - pretyping/termops.cmi kernel/term.cmi tactics/tactics.cmi \ - tactics/tacticals.cmi proofs/tacexpr.cmo kernel/reduction.cmi \ - pretyping/rawterm.cmi proofs/proof_type.cmi parsing/printer.cmi \ - pretyping/pretype_errors.cmi parsing/ppconstr.cmi lib/pp.cmi \ - proofs/pfedit.cmi lib/options.cmi kernel/names.cmi library/nameops.cmi \ - library/libnames.cmi library/global.cmi pretyping/evd.cmi \ - pretyping/evarutil.cmi kernel/entries.cmi library/decl_kinds.cmo \ - interp/coqlib.cmi interp/constrextern.cmi toplevel/command.cmi \ - contrib/subtac/subtac_utils.cmi -contrib/subtac/subtac_utils.cmx: lib/util.cmx interp/topconstr.cmx \ - pretyping/termops.cmx kernel/term.cmx tactics/tactics.cmx \ - tactics/tacticals.cmx proofs/tacexpr.cmx kernel/reduction.cmx \ - pretyping/rawterm.cmx proofs/proof_type.cmx parsing/printer.cmx \ - pretyping/pretype_errors.cmx parsing/ppconstr.cmx lib/pp.cmx \ - proofs/pfedit.cmx lib/options.cmx kernel/names.cmx library/nameops.cmx \ - library/libnames.cmx library/global.cmx pretyping/evd.cmx \ - pretyping/evarutil.cmx kernel/entries.cmx library/decl_kinds.cmx \ - interp/coqlib.cmx interp/constrextern.cmx toplevel/command.cmx \ - contrib/subtac/subtac_utils.cmi -contrib/xml/acic2Xml.cmo: contrib/xml/xml.cmi lib/util.cmi kernel/term.cmi \ - kernel/names.cmi contrib/xml/cic2acic.cmo contrib/xml/acic.cmo -contrib/xml/acic2Xml.cmx: contrib/xml/xml.cmx lib/util.cmx kernel/term.cmx \ - kernel/names.cmx contrib/xml/cic2acic.cmx contrib/xml/acic.cmx -contrib/xml/acic.cmo: kernel/term.cmi kernel/names.cmi -contrib/xml/acic.cmx: kernel/term.cmx kernel/names.cmx -contrib/xml/cic2acic.cmo: lib/util.cmi contrib/xml/unshare.cmi \ - kernel/univ.cmi kernel/typeops.cmi pretyping/termops.cmi kernel/term.cmi \ - pretyping/reductionops.cmi parsing/printer.cmi lib/pp.cmi \ - library/nametab.cmi kernel/names.cmi library/nameops.cmi \ - library/library.cmi library/libnames.cmi library/lib.cmi \ - pretyping/inductiveops.cmi library/global.cmi pretyping/evd.cmi \ - kernel/environ.cmi contrib/xml/doubleTypeInference.cmi \ - library/dischargedhypsmap.cmi library/declare.cmi kernel/declarations.cmi \ - contrib/xml/acic.cmo -contrib/xml/cic2acic.cmx: lib/util.cmx contrib/xml/unshare.cmx \ - kernel/univ.cmx kernel/typeops.cmx pretyping/termops.cmx kernel/term.cmx \ - pretyping/reductionops.cmx parsing/printer.cmx lib/pp.cmx \ - library/nametab.cmx kernel/names.cmx library/nameops.cmx \ - library/library.cmx library/libnames.cmx library/lib.cmx \ - pretyping/inductiveops.cmx library/global.cmx pretyping/evd.cmx \ - kernel/environ.cmx contrib/xml/doubleTypeInference.cmx \ - library/dischargedhypsmap.cmx library/declare.cmx kernel/declarations.cmx \ - contrib/xml/acic.cmx -contrib/xml/cic2Xml.cmo: contrib/xml/xml.cmi contrib/xml/unshare.cmi \ - tactics/tacinterp.cmi contrib/xml/cic2acic.cmo contrib/xml/acic2Xml.cmo \ - contrib/xml/acic.cmo -contrib/xml/cic2Xml.cmx: contrib/xml/xml.cmx contrib/xml/unshare.cmx \ - tactics/tacinterp.cmx contrib/xml/cic2acic.cmx contrib/xml/acic2Xml.cmx \ - contrib/xml/acic.cmx -contrib/xml/doubleTypeInference.cmo: lib/util.cmi contrib/xml/unshare.cmi \ - kernel/typeops.cmi pretyping/termops.cmi kernel/term.cmi \ - pretyping/retyping.cmi pretyping/reductionops.cmi kernel/reduction.cmi \ - pretyping/rawterm.cmi parsing/printer.cmi lib/pp.cmi kernel/names.cmi \ - library/libnames.cmi pretyping/inductiveops.cmi kernel/inductive.cmi \ - pretyping/evd.cmi pretyping/evarutil.cmi kernel/environ.cmi \ - kernel/closure.cmi contrib/xml/acic.cmo \ - contrib/xml/doubleTypeInference.cmi -contrib/xml/doubleTypeInference.cmx: lib/util.cmx contrib/xml/unshare.cmx \ - kernel/typeops.cmx pretyping/termops.cmx kernel/term.cmx \ - pretyping/retyping.cmx pretyping/reductionops.cmx kernel/reduction.cmx \ - pretyping/rawterm.cmx parsing/printer.cmx lib/pp.cmx kernel/names.cmx \ - library/libnames.cmx pretyping/inductiveops.cmx kernel/inductive.cmx \ - pretyping/evd.cmx pretyping/evarutil.cmx kernel/environ.cmx \ - kernel/closure.cmx contrib/xml/acic.cmx \ - contrib/xml/doubleTypeInference.cmi -contrib/xml/proof2aproof.cmo: lib/util.cmi contrib/xml/unshare.cmi \ - pretyping/termops.cmi kernel/term.cmi parsing/tactic_printer.cmi \ - proofs/tacmach.cmi kernel/sign.cmi proofs/refiner.cmi \ - proofs/proof_type.cmi lib/pp.cmi proofs/logic.cmi pretyping/evd.cmi \ - pretyping/evarutil.cmi kernel/environ.cmi -contrib/xml/proof2aproof.cmx: lib/util.cmx contrib/xml/unshare.cmx \ - pretyping/termops.cmx kernel/term.cmx parsing/tactic_printer.cmx \ - proofs/tacmach.cmx kernel/sign.cmx proofs/refiner.cmx \ - proofs/proof_type.cmx lib/pp.cmx proofs/logic.cmx pretyping/evd.cmx \ - pretyping/evarutil.cmx kernel/environ.cmx -contrib/xml/proofTree2Xml.cmo: contrib/xml/xml.cmi lib/util.cmi \ - contrib/xml/unshare.cmi kernel/term.cmi proofs/tacexpr.cmo \ - kernel/sign.cmi proofs/proof_type.cmi contrib/xml/proof2aproof.cmo \ - parsing/printer.cmi parsing/pptactic.cmi lib/pp.cmi kernel/names.cmi \ - proofs/logic.cmi library/global.cmi pretyping/evd.cmi kernel/environ.cmi \ - contrib/xml/cic2acic.cmo contrib/xml/acic2Xml.cmo contrib/xml/acic.cmo -contrib/xml/proofTree2Xml.cmx: contrib/xml/xml.cmx lib/util.cmx \ - contrib/xml/unshare.cmx kernel/term.cmx proofs/tacexpr.cmx \ - kernel/sign.cmx proofs/proof_type.cmx contrib/xml/proof2aproof.cmx \ - parsing/printer.cmx parsing/pptactic.cmx lib/pp.cmx kernel/names.cmx \ - proofs/logic.cmx library/global.cmx pretyping/evd.cmx kernel/environ.cmx \ - contrib/xml/cic2acic.cmx contrib/xml/acic2Xml.cmx contrib/xml/acic.cmx -contrib/xml/unshare.cmo: contrib/xml/unshare.cmi -contrib/xml/unshare.cmx: contrib/xml/unshare.cmi -contrib/xml/xmlcommand.cmo: contrib/xml/xml.cmi toplevel/vernac.cmi \ - lib/util.cmi contrib/xml/unshare.cmi kernel/typeops.cmi kernel/term.cmi \ - proofs/tacmach.cmi pretyping/recordops.cmi proofs/proof_trees.cmi \ - contrib/xml/proof2aproof.cmo lib/pp.cmi proofs/pfedit.cmi \ - library/nametab.cmi kernel/names.cmi library/library.cmi \ - library/libobject.cmi library/libnames.cmi library/lib.cmi \ - parsing/lexer.cmi pretyping/inductiveops.cmi kernel/inductive.cmi \ - library/global.cmi pretyping/evd.cmi pretyping/evarutil.cmi \ - kernel/environ.cmi library/declare.cmi kernel/declarations.cmi \ - library/decl_kinds.cmo config/coq_config.cmi contrib/xml/cic2acic.cmo \ - contrib/xml/acic2Xml.cmo contrib/xml/acic.cmo contrib/xml/xmlcommand.cmi -contrib/xml/xmlcommand.cmx: contrib/xml/xml.cmx toplevel/vernac.cmx \ - lib/util.cmx contrib/xml/unshare.cmx kernel/typeops.cmx kernel/term.cmx \ - proofs/tacmach.cmx pretyping/recordops.cmx proofs/proof_trees.cmx \ - contrib/xml/proof2aproof.cmx lib/pp.cmx proofs/pfedit.cmx \ - library/nametab.cmx kernel/names.cmx library/library.cmx \ - library/libobject.cmx library/libnames.cmx library/lib.cmx \ - parsing/lexer.cmx pretyping/inductiveops.cmx kernel/inductive.cmx \ - library/global.cmx pretyping/evd.cmx pretyping/evarutil.cmx \ - kernel/environ.cmx library/declare.cmx kernel/declarations.cmx \ - library/decl_kinds.cmx config/coq_config.cmx contrib/xml/cic2acic.cmx \ - contrib/xml/acic2Xml.cmx contrib/xml/acic.cmx contrib/xml/xmlcommand.cmi -contrib/xml/xmlentries.cmo: parsing/grammar.cma contrib/xml/xmlcommand.cmi \ - toplevel/vernacinterp.cmi lib/util.cmi lib/pp.cmi parsing/pcoq.cmi \ - parsing/lexer.cmi interp/genarg.cmi parsing/extend.cmi \ - parsing/egrammar.cmi toplevel/cerrors.cmi -contrib/xml/xmlentries.cmx: parsing/grammar.cma contrib/xml/xmlcommand.cmx \ - toplevel/vernacinterp.cmx lib/util.cmx lib/pp.cmx parsing/pcoq.cmx \ - parsing/lexer.cmx interp/genarg.cmx parsing/extend.cmx \ - parsing/egrammar.cmx toplevel/cerrors.cmx -contrib/xml/xml.cmo: contrib/xml/xml.cmi -contrib/xml/xml.cmx: contrib/xml/xml.cmi -ide/utils/config_file.cmo: ide/utils/config_file.cmi -ide/utils/config_file.cmx: ide/utils/config_file.cmi -ide/utils/configwin_html_config.cmo: ide/utils/configwin_types.cmo \ - ide/utils/configwin_messages.cmo ide/utils/configwin_ihm.cmo \ - ide/utils/config_file.cmi -ide/utils/configwin_html_config.cmx: ide/utils/configwin_types.cmx \ - ide/utils/configwin_messages.cmx ide/utils/configwin_ihm.cmx \ - ide/utils/config_file.cmx -ide/utils/configwin_ihm.cmo: ide/utils/okey.cmi ide/utils/configwin_types.cmo \ - ide/utils/configwin_messages.cmo ide/utils/config_file.cmi -ide/utils/configwin_ihm.cmx: ide/utils/okey.cmx ide/utils/configwin_types.cmx \ - ide/utils/configwin_messages.cmx ide/utils/config_file.cmx -ide/utils/configwin.cmo: ide/utils/configwin_types.cmo \ - ide/utils/configwin_ihm.cmo ide/utils/configwin.cmi -ide/utils/configwin.cmx: ide/utils/configwin_types.cmx \ - ide/utils/configwin_ihm.cmx ide/utils/configwin.cmi -ide/utils/configwin_types.cmo: ide/utils/configwin_keys.cmo \ - ide/utils/config_file.cmi -ide/utils/configwin_types.cmx: ide/utils/configwin_keys.cmx \ - ide/utils/config_file.cmx -ide/utils/okey.cmo: ide/utils/okey.cmi -ide/utils/okey.cmx: ide/utils/okey.cmi -ide/utils/uoptions.cmo: ide/utils/uoptions.cmi -ide/utils/uoptions.cmx: ide/utils/uoptions.cmi -tools/coqdoc/alpha.cmo: tools/coqdoc/alpha.cmi -tools/coqdoc/alpha.cmx: tools/coqdoc/alpha.cmi -tools/coqdoc/cdglobals.cmo: config/coq_config.cmi -tools/coqdoc/cdglobals.cmx: config/coq_config.cmx -tools/coqdoc/index.cmo: tools/coqdoc/cdglobals.cmo tools/coqdoc/alpha.cmi \ - tools/coqdoc/index.cmi -tools/coqdoc/index.cmx: tools/coqdoc/cdglobals.cmx tools/coqdoc/alpha.cmx \ - tools/coqdoc/index.cmi -tools/coqdoc/main.cmo: tools/coqdoc/pretty.cmi tools/coqdoc/output.cmi \ - tools/coqdoc/index.cmi config/coq_config.cmi tools/coqdoc/cdglobals.cmo -tools/coqdoc/main.cmx: tools/coqdoc/pretty.cmx tools/coqdoc/output.cmx \ - tools/coqdoc/index.cmx config/coq_config.cmx tools/coqdoc/cdglobals.cmx -tools/coqdoc/output.cmo: tools/coqdoc/index.cmi tools/coqdoc/cdglobals.cmo \ - tools/coqdoc/output.cmi -tools/coqdoc/output.cmx: tools/coqdoc/index.cmx tools/coqdoc/cdglobals.cmx \ - tools/coqdoc/output.cmi -tools/coqdoc/pretty.cmo: tools/coqdoc/output.cmi tools/coqdoc/index.cmi \ - tools/coqdoc/cdglobals.cmo tools/coqdoc/pretty.cmi -tools/coqdoc/pretty.cmx: tools/coqdoc/output.cmx tools/coqdoc/index.cmx \ - tools/coqdoc/cdglobals.cmx tools/coqdoc/pretty.cmi -coq_fix_code.o: kernel/byterun/coq_fix_code.c \ - kernel/byterun/coq_instruct.h kernel/byterun/coq_fix_code.h -coq_interp.o: kernel/byterun/coq_interp.c kernel/byterun/coq_gc.h \ - kernel/byterun/coq_instruct.h kernel/byterun/coq_fix_code.h \ - kernel/byterun/coq_memory.h kernel/byterun/coq_values.h \ - kernel/byterun/coq_jumptbl.h -coq_memory.o: kernel/byterun/coq_memory.c kernel/byterun/coq_gc.h \ - kernel/byterun/coq_instruct.h kernel/byterun/coq_fix_code.h \ - kernel/byterun/coq_memory.h kernel/byterun/coq_interp.h -coq_values.o: kernel/byterun/coq_values.c kernel/byterun/coq_fix_code.h \ - kernel/byterun/coq_instruct.h kernel/byterun/coq_memory.h \ - kernel/byterun/coq_values.h diff --git a/.depend.camlp4 b/.depend.camlp4 deleted file mode 100644 index 895c7857..00000000 --- a/.depend.camlp4 +++ /dev/null @@ -1,54 +0,0 @@ -tactics/tauto.ml: parsing/grammar.cma -tactics/eqdecide.ml: parsing/grammar.cma -tactics/extraargs.ml: parsing/grammar.cma -tactics/extratactics.ml: parsing/grammar.cma -tactics/eauto.ml: parsing/grammar.cma -toplevel/whelp.ml: parsing/grammar.cma -tactics/hipattern.ml: parsing/grammar.cma parsing/q_constr.cmo -contrib/omega/g_omega.ml: parsing/grammar.cma -contrib/romega/g_romega.ml: parsing/grammar.cma -contrib/ring/g_quote.ml: parsing/grammar.cma -contrib/ring/g_ring.ml: parsing/grammar.cma -contrib/dp/g_dp.ml: parsing/grammar.cma -contrib/setoid_ring/newring.ml: parsing/grammar.cma -contrib/field/field.ml: parsing/grammar.cma -contrib/fourier/g_fourier.ml: parsing/grammar.cma -contrib/extraction/g_extraction.ml: parsing/grammar.cma -contrib/xml/xmlentries.ml: parsing/grammar.cma -contrib/jprover/jprover.ml: parsing/grammar.cma -contrib/cc/g_congruence.ml: parsing/grammar.cma -contrib/funind/tacinv.ml: parsing/grammar.cma -contrib/first-order/g_ground.ml: parsing/grammar.cma -contrib/subtac/g_subtac.ml: parsing/grammar.cma -contrib/subtac/g_eterm.ml: parsing/grammar.cma -contrib/rtauto/g_rtauto.ml: parsing/grammar.cma -contrib/recdef/recdef.ml: parsing/grammar.cma -contrib/funind/indfun_main.ml: parsing/grammar.cma -contrib/interface/debug_tac.ml: parsing/grammar.cma -contrib/interface/centaur.ml: parsing/grammar.cma -parsing/lexer.ml: -parsing/pcoq.ml: -parsing/q_util.ml: -parsing/q_coqast.ml: -parsing/g_prim.ml: -parsing/g_minicoq.ml: -parsing/g_vernac.ml: parsing/grammar.cma -parsing/g_proofs.ml: -parsing/g_xml.ml: -parsing/g_constr.ml: -parsing/g_tactic.ml: -parsing/g_ltac.ml: -parsing/argextend.ml: -parsing/tacextend.ml: -parsing/vernacextend.ml: -parsing/q_constr.ml: -parsing/g_decl_mode.ml: parsing/grammar.cma -toplevel/mltop.ml: -lib/pp.ml: -lib/compat.ml: -contrib/xml/xml.ml: -contrib/xml/acic2Xml.ml: -contrib/xml/proofTree2Xml.ml: -contrib/interface/line_parser.ml: -tools/coq_makefile.ml: -tools/coq-tex.ml: diff --git a/.depend.coq b/.depend.coq deleted file mode 100644 index f8b4cd6c..00000000 --- a/.depend.coq +++ /dev/null @@ -1,390 +0,0 @@ -theories/FSets/OrderedType.vo: theories/FSets/OrderedType.v theories/Lists/SetoidList.vo -theories/FSets/OrderedTypeEx.vo: theories/FSets/OrderedTypeEx.v theories/FSets/OrderedType.vo theories/ZArith/ZArith.vo contrib/omega/Omega.vo theories/NArith/NArith.vo theories/NArith/Ndec.vo theories/Arith/Compare_dec.vo -theories/FSets/OrderedTypeAlt.vo: theories/FSets/OrderedTypeAlt.v theories/FSets/OrderedType.vo -theories/FSets/FSetInterface.vo: theories/FSets/FSetInterface.v theories/Bool/Bool.vo theories/FSets/OrderedType.vo -theories/FSets/FSetList.vo: theories/FSets/FSetList.v theories/FSets/FSetInterface.vo -theories/FSets/FSetBridge.vo: theories/FSets/FSetBridge.v theories/FSets/FSetInterface.vo -theories/FSets/FSetFacts.vo: theories/FSets/FSetFacts.v theories/FSets/FSetInterface.vo -theories/FSets/FSetProperties.vo: theories/FSets/FSetProperties.v theories/FSets/FSetInterface.vo theories/FSets/FSetFacts.vo -theories/FSets/FSetEqProperties.vo: theories/FSets/FSetEqProperties.v theories/FSets/FSetProperties.vo theories/Bool/Zerob.vo theories/Bool/Sumbool.vo contrib/omega/Omega.vo -theories/FSets/FSets.vo: theories/FSets/FSets.v theories/FSets/OrderedType.vo theories/FSets/OrderedTypeEx.vo theories/FSets/OrderedTypeAlt.vo theories/FSets/FSetInterface.vo theories/FSets/FSetBridge.vo theories/FSets/FSetProperties.vo theories/FSets/FSetEqProperties.vo theories/FSets/FSetList.vo -theories/FSets/FSetWeakProperties.vo: theories/FSets/FSetWeakProperties.v theories/FSets/FSetWeakInterface.vo theories/FSets/FSetWeakFacts.vo -theories/FSets/FSetWeakInterface.vo: theories/FSets/FSetWeakInterface.v theories/Bool/Bool.vo theories/Logic/DecidableType.vo -theories/FSets/FSetWeakList.vo: theories/FSets/FSetWeakList.v theories/FSets/FSetWeakInterface.vo -theories/FSets/FSetWeakFacts.vo: theories/FSets/FSetWeakFacts.v theories/FSets/FSetWeakInterface.vo -theories/FSets/FSetWeak.vo: theories/FSets/FSetWeak.v theories/Logic/DecidableType.vo theories/Logic/DecidableTypeEx.vo theories/FSets/FSetWeakInterface.vo theories/FSets/FSetWeakFacts.vo theories/FSets/FSetWeakProperties.vo theories/FSets/FSetWeakList.vo -theories/FSets/FMapInterface.vo: theories/FSets/FMapInterface.v theories/FSets/FSetInterface.vo -theories/FSets/FMapList.vo: theories/FSets/FMapList.v theories/FSets/FSetInterface.vo theories/FSets/FMapInterface.vo -theories/FSets/FMaps.vo: theories/FSets/FMaps.v theories/FSets/OrderedType.vo theories/FSets/OrderedTypeEx.vo theories/FSets/OrderedTypeAlt.vo theories/FSets/FMapInterface.vo theories/FSets/FMapList.vo theories/FSets/FMapPositive.vo theories/FSets/FMapIntMap.vo theories/FSets/FMapFacts.vo -theories/FSets/FMapFacts.vo: theories/FSets/FMapFacts.v theories/Bool/Bool.vo theories/FSets/OrderedType.vo theories/FSets/FMapInterface.vo -theories/FSets/FMapWeakFacts.vo: theories/FSets/FMapWeakFacts.v theories/Bool/Bool.vo theories/FSets/OrderedType.vo theories/FSets/FMapWeakInterface.vo -theories/FSets/FMapWeakInterface.vo: theories/FSets/FMapWeakInterface.v theories/FSets/FSetInterface.vo theories/FSets/FSetWeakInterface.vo -theories/FSets/FMapWeakList.vo: theories/FSets/FMapWeakList.v theories/FSets/FSetInterface.vo theories/FSets/FSetWeakInterface.vo theories/FSets/FMapWeakInterface.vo -theories/FSets/FMapWeak.vo: theories/FSets/FMapWeak.v theories/Logic/DecidableType.vo theories/Logic/DecidableTypeEx.vo theories/FSets/FMapWeakInterface.vo theories/FSets/FMapWeakList.vo theories/FSets/FMapWeakFacts.vo -theories/FSets/FMapPositive.vo: theories/FSets/FMapPositive.v theories/Bool/Bool.vo theories/ZArith/ZArith.vo theories/FSets/OrderedType.vo theories/FSets/FMapInterface.vo -theories/FSets/FMapIntMap.vo: theories/FSets/FMapIntMap.v theories/Bool/Bool.vo theories/NArith/NArith.vo theories/NArith/Ndigits.vo theories/NArith/Ndec.vo theories/NArith/Nnat.vo theories/IntMap/Allmaps.vo theories/FSets/OrderedType.vo theories/FSets/OrderedTypeEx.vo theories/FSets/FMapInterface.vo theories/FSets/FMapList.vo -theories/FSets/FSetToFiniteSet.vo: theories/FSets/FSetToFiniteSet.v theories/Sets/Ensembles.vo theories/Sets/Finite_sets.vo theories/FSets/FSetInterface.vo theories/FSets/FSetProperties.vo theories/FSets/OrderedTypeEx.vo -theories/FSets/FMapAVL.vo: theories/FSets/FMapAVL.v theories/FSets/FSetInterface.vo theories/FSets/FMapInterface.vo theories/FSets/FMapList.vo theories/ZArith/ZArith.vo theories/ZArith/Int.vo -theories/FSets/FSetAVL.vo: theories/FSets/FSetAVL.v theories/FSets/FSetInterface.vo theories/FSets/FSetList.vo theories/ZArith/ZArith.vo theories/ZArith/Int.vo -theories/Reals/Rdefinitions.vo: theories/Reals/Rdefinitions.v theories/ZArith/ZArith_base.vo -theories/Reals/Rpow_def.vo: theories/Reals/Rpow_def.v theories/Reals/Rdefinitions.vo -theories/Reals/Raxioms.vo: theories/Reals/Raxioms.v theories/ZArith/ZArith_base.vo theories/Reals/Rdefinitions.vo -theories/Reals/RIneq.vo: theories/Reals/RIneq.v theories/Reals/Raxioms.vo theories/Reals/Rpow_def.vo theories/ZArith/Zpower.vo contrib/setoid_ring/ZArithRing.vo contrib/omega/Omega.vo contrib/setoid_ring/RealField.vo -theories/Reals/DiscrR.vo: theories/Reals/DiscrR.v theories/Reals/RIneq.vo contrib/omega/Omega.vo -theories/Reals/Rbase.vo: theories/Reals/Rbase.v theories/Reals/Rdefinitions.vo theories/Reals/Raxioms.vo theories/Reals/RIneq.vo theories/Reals/DiscrR.vo -theories/Reals/LegacyRfield.vo: theories/Reals/LegacyRfield.v theories/Reals/Raxioms.vo contrib/field/LegacyField.vo -theories/Reals/R_Ifp.vo: theories/Reals/R_Ifp.v theories/Reals/Rbase.vo contrib/omega/Omega.vo -theories/Reals/Rpow_def.vo: theories/Reals/Rpow_def.v theories/Reals/Rdefinitions.vo -theories/Reals/Rbasic_fun.vo: theories/Reals/Rbasic_fun.v theories/Reals/Rbase.vo theories/Reals/R_Ifp.vo contrib/fourier/Fourier.vo -theories/Reals/R_sqr.vo: theories/Reals/R_sqr.v theories/Reals/Rbase.vo theories/Reals/Rbasic_fun.vo -theories/Reals/SplitAbsolu.vo: theories/Reals/SplitAbsolu.v theories/Reals/Rbasic_fun.vo -theories/Reals/SplitRmult.vo: theories/Reals/SplitRmult.v theories/Reals/Rbase.vo -theories/Reals/ArithProp.vo: theories/Reals/ArithProp.v theories/Reals/Rbase.vo theories/Reals/Rbasic_fun.vo theories/Arith/Even.vo theories/Arith/Div2.vo contrib/setoid_ring/ArithRing.vo -theories/Reals/Rfunctions.vo: theories/Reals/Rfunctions.v contrib/setoid_ring/ArithRing.vo theories/Reals/Rbase.vo theories/Reals/Rpow_def.vo theories/Reals/R_Ifp.vo theories/Reals/Rbasic_fun.vo theories/Reals/R_sqr.vo theories/Reals/SplitAbsolu.vo theories/Reals/SplitRmult.vo theories/Reals/ArithProp.vo contrib/omega/Omega.vo theories/ZArith/Zpower.vo -theories/Reals/Rseries.vo: theories/Reals/Rseries.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Logic/Classical.vo theories/Arith/Compare.vo -theories/Reals/SeqProp.vo: theories/Reals/SeqProp.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Rseries.vo theories/Logic/Classical.vo theories/Arith/Max.vo -theories/Reals/Rcomplete.vo: theories/Reals/Rcomplete.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Rseries.vo theories/Reals/SeqProp.vo theories/Arith/Max.vo -theories/Reals/PartSum.vo: theories/Reals/PartSum.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Rseries.vo theories/Reals/Rcomplete.vo theories/Arith/Max.vo -theories/Reals/AltSeries.vo: theories/Reals/AltSeries.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Rseries.vo theories/Reals/SeqProp.vo theories/Reals/PartSum.vo theories/Arith/Max.vo -theories/Reals/Binomial.vo: theories/Reals/Binomial.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/PartSum.vo -theories/Reals/Rsigma.vo: theories/Reals/Rsigma.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Rseries.vo theories/Reals/PartSum.vo -theories/Reals/Rprod.vo: theories/Reals/Rprod.v theories/Arith/Compare.vo theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Rseries.vo theories/Reals/PartSum.vo theories/Reals/Binomial.vo -theories/Reals/Cauchy_prod.vo: theories/Reals/Cauchy_prod.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Rseries.vo theories/Reals/PartSum.vo -theories/Reals/Alembert.vo: theories/Reals/Alembert.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Rseries.vo theories/Reals/SeqProp.vo theories/Reals/PartSum.vo theories/Arith/Max.vo -theories/Reals/SeqSeries.vo: theories/Reals/SeqSeries.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Arith/Max.vo theories/Reals/Rseries.vo theories/Reals/SeqProp.vo theories/Reals/Rcomplete.vo theories/Reals/PartSum.vo theories/Reals/AltSeries.vo theories/Reals/Binomial.vo theories/Reals/Rsigma.vo theories/Reals/Rprod.vo theories/Reals/Cauchy_prod.vo theories/Reals/Alembert.vo -theories/Reals/Rtrigo_fun.vo: theories/Reals/Rtrigo_fun.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo -theories/Reals/Rtrigo_def.vo: theories/Reals/Rtrigo_def.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo_fun.vo theories/Arith/Max.vo -theories/Reals/Rtrigo_alt.vo: theories/Reals/Rtrigo_alt.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo_def.vo -theories/Reals/Cos_rel.vo: theories/Reals/Cos_rel.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo_def.vo -theories/Reals/Cos_plus.vo: theories/Reals/Cos_plus.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo_def.vo theories/Reals/Cos_rel.vo theories/Arith/Max.vo -theories/Reals/Rtrigo.vo: theories/Reals/Rtrigo.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo_fun.vo theories/Reals/Rtrigo_def.vo theories/Reals/Rtrigo_alt.vo theories/Reals/Cos_rel.vo theories/Reals/Cos_plus.vo theories/ZArith/ZArith_base.vo theories/ZArith/Zcomplements.vo theories/Logic/Classical_Prop.vo -theories/Reals/Rlimit.vo: theories/Reals/Rlimit.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Logic/Classical_Prop.vo contrib/fourier/Fourier.vo -theories/Reals/Rderiv.vo: theories/Reals/Rderiv.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Rlimit.vo contrib/fourier/Fourier.vo theories/Logic/Classical_Prop.vo theories/Logic/Classical_Pred_Type.vo contrib/omega/Omega.vo -theories/Reals/RList.vo: theories/Reals/RList.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo -theories/Reals/Ranalysis1.vo: theories/Reals/Ranalysis1.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Rlimit.vo theories/Reals/Rderiv.vo -theories/Reals/Ranalysis2.vo: theories/Reals/Ranalysis2.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Ranalysis1.vo -theories/Reals/Ranalysis3.vo: theories/Reals/Ranalysis3.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Ranalysis1.vo theories/Reals/Ranalysis2.vo -theories/Reals/Rtopology.vo: theories/Reals/Rtopology.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Ranalysis1.vo theories/Reals/RList.vo theories/Logic/Classical_Prop.vo theories/Logic/Classical_Pred_Type.vo -theories/Reals/MVT.vo: theories/Reals/MVT.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Ranalysis1.vo theories/Reals/Rtopology.vo -theories/Reals/PSeries_reg.vo: theories/Reals/PSeries_reg.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Ranalysis1.vo theories/Arith/Max.vo theories/Arith/Even.vo -theories/Reals/Exp_prop.vo: theories/Reals/Exp_prop.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo.vo theories/Reals/Ranalysis1.vo theories/Reals/PSeries_reg.vo theories/Arith/Div2.vo theories/Arith/Even.vo theories/Arith/Max.vo -theories/Reals/Rtrigo_reg.vo: theories/Reals/Rtrigo_reg.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo.vo theories/Reals/Ranalysis1.vo theories/Reals/PSeries_reg.vo -theories/Reals/Rsqrt_def.vo: theories/Reals/Rsqrt_def.v theories/Bool/Sumbool.vo theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Ranalysis1.vo -theories/Reals/R_sqrt.vo: theories/Reals/R_sqrt.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Rsqrt_def.vo -theories/Reals/Rtrigo_calc.vo: theories/Reals/Rtrigo_calc.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo.vo theories/Reals/R_sqrt.vo -theories/Reals/Rgeom.vo: theories/Reals/Rgeom.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo.vo theories/Reals/R_sqrt.vo -theories/Reals/Sqrt_reg.vo: theories/Reals/Sqrt_reg.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Ranalysis1.vo theories/Reals/R_sqrt.vo -theories/Reals/Ranalysis4.vo: theories/Reals/Ranalysis4.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo.vo theories/Reals/Ranalysis1.vo theories/Reals/Ranalysis3.vo theories/Reals/Exp_prop.vo -theories/Reals/Rpower.vo: theories/Reals/Rpower.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo.vo theories/Reals/Ranalysis1.vo theories/Reals/Exp_prop.vo theories/Reals/Rsqrt_def.vo theories/Reals/R_sqrt.vo theories/Reals/MVT.vo theories/Reals/Ranalysis4.vo -theories/Reals/Ranalysis.vo: theories/Reals/Ranalysis.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Rtrigo.vo theories/Reals/SeqSeries.vo theories/Reals/Ranalysis1.vo theories/Reals/Ranalysis2.vo theories/Reals/Ranalysis3.vo theories/Reals/Rtopology.vo theories/Reals/MVT.vo theories/Reals/PSeries_reg.vo theories/Reals/Exp_prop.vo theories/Reals/Rtrigo_reg.vo theories/Reals/Rsqrt_def.vo theories/Reals/R_sqrt.vo theories/Reals/Rtrigo_calc.vo theories/Reals/Rgeom.vo theories/Reals/RList.vo theories/Reals/Sqrt_reg.vo theories/Reals/Ranalysis4.vo theories/Reals/Rpower.vo -theories/Reals/NewtonInt.vo: theories/Reals/NewtonInt.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo.vo theories/Reals/Ranalysis.vo -theories/Reals/RiemannInt_SF.vo: theories/Reals/RiemannInt_SF.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Ranalysis.vo theories/Logic/Classical_Prop.vo -theories/Reals/RiemannInt.vo: theories/Reals/RiemannInt.v theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Ranalysis.vo theories/Reals/Rbase.vo theories/Reals/RiemannInt_SF.vo theories/Logic/Classical_Prop.vo theories/Logic/Classical_Pred_Type.vo theories/Arith/Max.vo -theories/Reals/Integration.vo: theories/Reals/Integration.v theories/Reals/NewtonInt.vo theories/Reals/RiemannInt_SF.vo theories/Reals/RiemannInt.vo -theories/Reals/Reals.vo: theories/Reals/Reals.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo.vo theories/Reals/Ranalysis.vo theories/Reals/Integration.vo -theories/Init/Notations.vo: theories/Init/Notations.v -theories/Init/Datatypes.vo: theories/Init/Datatypes.v theories/Init/Notations.vo theories/Init/Logic.vo -theories/Init/Peano.vo: theories/Init/Peano.v theories/Init/Notations.vo theories/Init/Datatypes.vo theories/Init/Logic.vo -theories/Init/Logic.vo: theories/Init/Logic.v theories/Init/Notations.vo -theories/Init/Specif.vo: theories/Init/Specif.v theories/Init/Notations.vo theories/Init/Datatypes.vo theories/Init/Logic.vo -theories/Init/Logic_Type.vo: theories/Init/Logic_Type.v theories/Init/Datatypes.vo theories/Init/Logic.vo -theories/Init/Wf.vo: theories/Init/Wf.v theories/Init/Notations.vo theories/Init/Logic.vo theories/Init/Datatypes.vo -theories/Init/Tactics.vo: theories/Init/Tactics.v theories/Init/Notations.vo theories/Init/Logic.vo -theories/Init/Prelude.vo: theories/Init/Prelude.v theories/Init/Notations.vo theories/Init/Logic.vo theories/Init/Datatypes.vo theories/Init/Specif.vo theories/Init/Peano.vo theories/Init/Wf.vo theories/Init/Tactics.vo -theories/Init/Notations.vo: theories/Init/Notations.v -theories/Init/Datatypes.vo: theories/Init/Datatypes.v theories/Init/Notations.vo theories/Init/Logic.vo -theories/Init/Peano.vo: theories/Init/Peano.v theories/Init/Notations.vo theories/Init/Datatypes.vo theories/Init/Logic.vo -theories/Init/Logic.vo: theories/Init/Logic.v theories/Init/Notations.vo -theories/Init/Specif.vo: theories/Init/Specif.v theories/Init/Notations.vo theories/Init/Datatypes.vo theories/Init/Logic.vo -theories/Init/Logic_Type.vo: theories/Init/Logic_Type.v theories/Init/Datatypes.vo theories/Init/Logic.vo -theories/Init/Wf.vo: theories/Init/Wf.v theories/Init/Notations.vo theories/Init/Logic.vo theories/Init/Datatypes.vo -theories/Init/Tactics.vo: theories/Init/Tactics.v theories/Init/Notations.vo theories/Init/Logic.vo -theories/Init/Prelude.vo: theories/Init/Prelude.v theories/Init/Notations.vo theories/Init/Logic.vo theories/Init/Datatypes.vo theories/Init/Specif.vo theories/Init/Peano.vo theories/Init/Wf.vo theories/Init/Tactics.vo -theories/Logic/Hurkens.vo: theories/Logic/Hurkens.v -theories/Logic/ProofIrrelevance.vo: theories/Logic/ProofIrrelevance.v theories/Logic/ProofIrrelevanceFacts.vo -theories/Logic/Classical.vo: theories/Logic/Classical.v theories/Logic/Classical_Prop.vo theories/Logic/Classical_Pred_Type.vo -theories/Logic/Classical_Type.vo: theories/Logic/Classical_Type.v theories/Logic/Classical_Prop.vo theories/Logic/Classical_Pred_Type.vo -theories/Logic/Classical_Pred_Set.vo: theories/Logic/Classical_Pred_Set.v theories/Logic/Classical_Pred_Type.vo -theories/Logic/Eqdep.vo: theories/Logic/Eqdep.v theories/Logic/EqdepFacts.vo -theories/Logic/Classical_Prop.vo: theories/Logic/Classical_Prop.v theories/Logic/ClassicalFacts.vo theories/Logic/EqdepFacts.vo -theories/Logic/Classical_Pred_Type.vo: theories/Logic/Classical_Pred_Type.v theories/Logic/Classical_Prop.vo -theories/Logic/ClassicalFacts.vo: theories/Logic/ClassicalFacts.v theories/Logic/Hurkens.vo -theories/Logic/ChoiceFacts.vo: theories/Logic/ChoiceFacts.v theories/Arith/Wf_nat.vo theories/Arith/Compare_dec.vo theories/Logic/Decidable.vo theories/Arith/Arith.vo theories/Setoids/Setoid.vo -theories/Logic/Berardi.vo: theories/Logic/Berardi.v -theories/Logic/Eqdep_dec.vo: theories/Logic/Eqdep_dec.v theories/Logic/EqdepFacts.vo -theories/Logic/Decidable.vo: theories/Logic/Decidable.v -theories/Logic/JMeq.vo: theories/Logic/JMeq.v theories/Logic/Eqdep.vo -theories/Logic/ClassicalChoice.vo: theories/Logic/ClassicalChoice.v theories/Logic/ClassicalUniqueChoice.vo theories/Logic/RelationalChoice.vo theories/Logic/ChoiceFacts.vo -theories/Logic/ClassicalDescription.vo: theories/Logic/ClassicalDescription.v theories/Logic/Classical.vo theories/Logic/ChoiceFacts.vo -theories/Logic/RelationalChoice.vo: theories/Logic/RelationalChoice.v -theories/Logic/Diaconescu.vo: theories/Logic/Diaconescu.v theories/Logic/ClassicalFacts.vo theories/Logic/ChoiceFacts.vo theories/Bool/Bool.vo -theories/Logic/EqdepFacts.vo: theories/Logic/EqdepFacts.v -theories/Logic/ProofIrrelevanceFacts.vo: theories/Logic/ProofIrrelevanceFacts.v theories/Logic/EqdepFacts.vo -theories/Logic/ClassicalEpsilon.vo: theories/Logic/ClassicalEpsilon.v theories/Logic/Classical.vo theories/Logic/ChoiceFacts.vo -theories/Logic/ClassicalUniqueChoice.vo: theories/Logic/ClassicalUniqueChoice.v theories/Logic/Classical.vo theories/Setoids/Setoid.vo -theories/Logic/DecidableType.vo: theories/Logic/DecidableType.v theories/Lists/SetoidList.vo -theories/Logic/DecidableTypeEx.vo: theories/Logic/DecidableTypeEx.v theories/Logic/DecidableType.vo theories/FSets/OrderedType.vo theories/FSets/OrderedTypeEx.vo -theories/Logic/ConstructiveEpsilon.vo: theories/Logic/ConstructiveEpsilon.v theories/Arith/Arith.vo -theories/Arith/Arith.vo: theories/Arith/Arith.v theories/Arith/Arith_base.vo contrib/setoid_ring/ArithRing.vo -theories/Arith/Gt.vo: theories/Arith/Gt.v theories/Arith/Le.vo theories/Arith/Lt.vo theories/Arith/Plus.vo -theories/Arith/Between.vo: theories/Arith/Between.v theories/Arith/Le.vo theories/Arith/Lt.vo -theories/Arith/Le.vo: theories/Arith/Le.v -theories/Arith/Compare.vo: theories/Arith/Compare.v theories/Arith/Arith_base.vo theories/Arith/Peano_dec.vo theories/Arith/Compare_dec.vo theories/Arith/Wf_nat.vo theories/Arith/Min.vo -theories/Arith/Lt.vo: theories/Arith/Lt.v theories/Arith/Le.vo -theories/Arith/Compare_dec.vo: theories/Arith/Compare_dec.v theories/Arith/Le.vo theories/Arith/Lt.vo theories/Arith/Gt.vo theories/Logic/Decidable.vo -theories/Arith/Min.vo: theories/Arith/Min.v theories/Arith/Le.vo -theories/Arith/Div2.vo: theories/Arith/Div2.v theories/Arith/Lt.vo theories/Arith/Plus.vo theories/Arith/Compare_dec.vo theories/Arith/Even.vo -theories/Arith/Minus.vo: theories/Arith/Minus.v theories/Arith/Lt.vo theories/Arith/Le.vo -theories/Arith/Mult.vo: theories/Arith/Mult.v theories/Arith/Plus.vo theories/Arith/Minus.vo theories/Arith/Lt.vo theories/Arith/Le.vo -theories/Arith/Even.vo: theories/Arith/Even.v -theories/Arith/EqNat.vo: theories/Arith/EqNat.v -theories/Arith/Peano_dec.vo: theories/Arith/Peano_dec.v theories/Logic/Decidable.vo -theories/Arith/Euclid.vo: theories/Arith/Euclid.v theories/Arith/Mult.vo theories/Arith/Compare_dec.vo theories/Arith/Wf_nat.vo -theories/Arith/Plus.vo: theories/Arith/Plus.v theories/Arith/Le.vo theories/Arith/Lt.vo -theories/Arith/Wf_nat.vo: theories/Arith/Wf_nat.v theories/Arith/Lt.vo -theories/Arith/Max.vo: theories/Arith/Max.v theories/Arith/Arith.vo -theories/Arith/Bool_nat.vo: theories/Arith/Bool_nat.v theories/Arith/Compare_dec.vo theories/Arith/Peano_dec.vo theories/Bool/Sumbool.vo -theories/Arith/Factorial.vo: theories/Arith/Factorial.v theories/Arith/Plus.vo theories/Arith/Mult.vo theories/Arith/Lt.vo -theories/Arith/Arith_base.vo: theories/Arith/Arith_base.v theories/Arith/Le.vo theories/Arith/Lt.vo theories/Arith/Plus.vo theories/Arith/Gt.vo theories/Arith/Minus.vo theories/Arith/Mult.vo theories/Arith/Between.vo theories/Arith/Peano_dec.vo theories/Arith/Compare_dec.vo theories/Arith/Factorial.vo -theories/Bool/Bool.vo: theories/Bool/Bool.v -theories/Bool/IfProp.vo: theories/Bool/IfProp.v theories/Bool/Bool.vo -theories/Bool/Zerob.vo: theories/Bool/Zerob.v theories/Arith/Arith.vo theories/Bool/Bool.vo -theories/Bool/DecBool.vo: theories/Bool/DecBool.v -theories/Bool/Sumbool.vo: theories/Bool/Sumbool.v -theories/Bool/BoolEq.vo: theories/Bool/BoolEq.v theories/Bool/Bool.vo -theories/Bool/Bvector.vo: theories/Bool/Bvector.v theories/Bool/Bool.vo theories/Bool/Sumbool.vo theories/Arith/Arith.vo -theories/NArith/BinPos.vo: theories/NArith/BinPos.v -theories/NArith/Pnat.vo: theories/NArith/Pnat.v theories/NArith/BinPos.vo theories/Arith/Le.vo theories/Arith/Lt.vo theories/Arith/Gt.vo theories/Arith/Plus.vo theories/Arith/Mult.vo theories/Arith/Minus.vo -theories/NArith/BinNat.vo: theories/NArith/BinNat.v theories/NArith/BinPos.vo -theories/NArith/NArith.vo: theories/NArith/NArith.v theories/NArith/BinPos.vo theories/NArith/BinNat.vo contrib/setoid_ring/NArithRing.vo -theories/NArith/Nnat.vo: theories/NArith/Nnat.v theories/Arith/Arith_base.vo theories/Arith/Compare_dec.vo theories/Bool/Sumbool.vo theories/Arith/Div2.vo theories/NArith/BinPos.vo theories/NArith/BinNat.vo theories/NArith/Pnat.vo -theories/NArith/Ndigits.vo: theories/NArith/Ndigits.v theories/Bool/Bool.vo theories/Bool/Bvector.vo theories/NArith/BinPos.vo theories/NArith/BinNat.vo -theories/NArith/Ndec.vo: theories/NArith/Ndec.v theories/Bool/Bool.vo theories/Bool/Sumbool.vo theories/Arith/Arith.vo theories/NArith/BinPos.vo theories/NArith/BinNat.vo theories/NArith/Pnat.vo theories/NArith/Nnat.vo theories/NArith/Ndigits.vo -theories/NArith/Ndist.vo: theories/NArith/Ndist.v theories/Arith/Arith.vo theories/Arith/Min.vo theories/NArith/BinPos.vo theories/NArith/BinNat.vo theories/NArith/Ndigits.vo -theories/ZArith/BinInt.vo: theories/ZArith/BinInt.v theories/NArith/BinPos.vo theories/NArith/Pnat.vo theories/NArith/BinNat.vo theories/Arith/Plus.vo theories/Arith/Mult.vo -theories/ZArith/Wf_Z.vo: theories/ZArith/Wf_Z.v theories/ZArith/BinInt.vo theories/ZArith/Zcompare.vo theories/ZArith/Zorder.vo theories/ZArith/Znat.vo theories/ZArith/Zmisc.vo theories/Arith/Wf_nat.vo -theories/ZArith/ZArith.vo: theories/ZArith/ZArith.v theories/ZArith/ZArith_base.vo theories/ZArith/Zcomplements.vo theories/ZArith/Zsqrt.vo theories/ZArith/Zpower.vo theories/ZArith/Zdiv.vo theories/ZArith/Zlogarithm.vo -theories/ZArith/ZArith_dec.vo: theories/ZArith/ZArith_dec.v theories/Bool/Sumbool.vo theories/ZArith/BinInt.vo theories/ZArith/Zorder.vo theories/ZArith/Zcompare.vo -theories/ZArith/auxiliary.vo: theories/ZArith/auxiliary.v theories/Arith/Arith_base.vo theories/ZArith/BinInt.vo theories/ZArith/Zorder.vo theories/Logic/Decidable.vo theories/Arith/Peano_dec.vo theories/Arith/Compare_dec.vo -theories/ZArith/Zmisc.vo: theories/ZArith/Zmisc.v theories/ZArith/BinInt.vo theories/ZArith/Zcompare.vo theories/ZArith/Zorder.vo theories/Bool/Bool.vo -theories/ZArith/Zcompare.vo: theories/ZArith/Zcompare.v theories/NArith/BinPos.vo theories/ZArith/BinInt.vo theories/Arith/Lt.vo theories/Arith/Gt.vo theories/Arith/Plus.vo theories/Arith/Mult.vo -theories/ZArith/Znat.vo: theories/ZArith/Znat.v theories/Arith/Arith_base.vo theories/NArith/BinPos.vo theories/ZArith/BinInt.vo theories/ZArith/Zcompare.vo theories/ZArith/Zorder.vo theories/Logic/Decidable.vo theories/Arith/Peano_dec.vo theories/Arith/Compare_dec.vo -theories/ZArith/Zorder.vo: theories/ZArith/Zorder.v theories/NArith/BinPos.vo theories/ZArith/BinInt.vo theories/Arith/Arith_base.vo theories/Logic/Decidable.vo theories/ZArith/Zcompare.vo -theories/ZArith/Zabs.vo: theories/ZArith/Zabs.v theories/Arith/Arith_base.vo theories/NArith/BinPos.vo theories/ZArith/BinInt.vo theories/ZArith/Zorder.vo theories/ZArith/ZArith_dec.vo -theories/ZArith/Zmin.vo: theories/ZArith/Zmin.v theories/Arith/Arith_base.vo theories/ZArith/BinInt.vo theories/ZArith/Zcompare.vo theories/ZArith/Zorder.vo -theories/ZArith/Zmax.vo: theories/ZArith/Zmax.v theories/Arith/Arith_base.vo theories/ZArith/BinInt.vo theories/ZArith/Zcompare.vo theories/ZArith/Zorder.vo -theories/ZArith/Zminmax.vo: theories/ZArith/Zminmax.v theories/ZArith/Zmin.vo theories/ZArith/Zmax.vo theories/ZArith/BinInt.vo theories/ZArith/Zorder.vo -theories/ZArith/Zeven.vo: theories/ZArith/Zeven.v theories/ZArith/BinInt.vo -theories/ZArith/Zhints.vo: theories/ZArith/Zhints.v theories/ZArith/BinInt.vo theories/ZArith/Zorder.vo theories/ZArith/Zmin.vo theories/ZArith/Zabs.vo theories/ZArith/Zcompare.vo theories/ZArith/Znat.vo theories/ZArith/auxiliary.vo theories/ZArith/Zmisc.vo theories/ZArith/Wf_Z.vo -theories/ZArith/Zlogarithm.vo: theories/ZArith/Zlogarithm.v theories/ZArith/ZArith_base.vo contrib/omega/Omega.vo theories/ZArith/Zcomplements.vo theories/ZArith/Zpower.vo -theories/ZArith/Zpower.vo: theories/ZArith/Zpower.v theories/ZArith/ZArith_base.vo theories/ZArith/Zpow_def.vo contrib/omega/Omega.vo theories/ZArith/Zcomplements.vo -theories/ZArith/Zcomplements.vo: theories/ZArith/Zcomplements.v contrib/setoid_ring/ZArithRing.vo theories/ZArith/ZArith_base.vo contrib/omega/Omega.vo theories/Arith/Wf_nat.vo theories/Lists/List.vo -theories/ZArith/Zdiv.vo: theories/ZArith/Zdiv.v theories/ZArith/ZArith_base.vo theories/ZArith/Zbool.vo contrib/omega/Omega.vo contrib/setoid_ring/ZArithRing.vo theories/ZArith/Zcomplements.vo -theories/ZArith/Zsqrt.vo: theories/ZArith/Zsqrt.v contrib/setoid_ring/ZArithRing.vo contrib/omega/Omega.vo theories/ZArith/ZArith_base.vo -theories/ZArith/Zwf.vo: theories/ZArith/Zwf.v theories/ZArith/ZArith_base.vo theories/Arith/Wf_nat.vo contrib/omega/Omega.vo -theories/ZArith/ZArith_base.vo: theories/ZArith/ZArith_base.v theories/NArith/BinPos.vo theories/NArith/BinNat.vo theories/ZArith/BinInt.vo theories/ZArith/Zcompare.vo theories/ZArith/Zorder.vo theories/ZArith/Zeven.vo theories/ZArith/Zmin.vo theories/ZArith/Zmax.vo theories/ZArith/Zminmax.vo theories/ZArith/Zabs.vo theories/ZArith/Znat.vo theories/ZArith/auxiliary.vo theories/ZArith/ZArith_dec.vo theories/ZArith/Zbool.vo theories/ZArith/Zmisc.vo theories/ZArith/Wf_Z.vo theories/ZArith/Zhints.vo -theories/ZArith/Zbool.vo: theories/ZArith/Zbool.v theories/ZArith/BinInt.vo theories/ZArith/Zeven.vo theories/ZArith/Zorder.vo theories/ZArith/Zcompare.vo theories/ZArith/ZArith_dec.vo theories/Bool/Sumbool.vo -theories/ZArith/Zbinary.vo: theories/ZArith/Zbinary.v theories/Bool/Bvector.vo theories/ZArith/ZArith.vo theories/ZArith/Zpower.vo contrib/omega/Omega.vo -theories/ZArith/Znumtheory.vo: theories/ZArith/Znumtheory.v theories/ZArith/ZArith_base.vo contrib/setoid_ring/ZArithRing.vo theories/ZArith/Zcomplements.vo theories/ZArith/Zdiv.vo theories/NArith/Ndigits.vo theories/Arith/Wf_nat.vo -theories/ZArith/Int.vo: theories/ZArith/Int.v theories/ZArith/ZArith.vo contrib/romega/ROmega.vo -theories/ZArith/Zpow_def.vo: theories/ZArith/Zpow_def.v theories/ZArith/ZArith_base.vo contrib/setoid_ring/Ring_theory.vo -theories/Setoids/Setoid.vo: theories/Setoids/Setoid.v theories/Relations/Relation_Definitions.vo -theories/Lists/MonoList.vo: theories/Lists/MonoList.v theories/Arith/Le.vo -theories/Lists/ListSet.vo: theories/Lists/ListSet.v theories/Lists/List.vo -theories/Lists/Streams.vo: theories/Lists/Streams.v -theories/Lists/TheoryList.vo: theories/Lists/TheoryList.v theories/Lists/List.vo theories/Arith/Le.vo theories/Arith/Lt.vo theories/Arith/Minus.vo theories/Bool/DecBool.vo -theories/Lists/List.vo: theories/Lists/List.v theories/Arith/Le.vo theories/Arith/Gt.vo theories/Arith/Minus.vo theories/Arith/Min.vo theories/Bool/Bool.vo theories/Setoids/Setoid.vo -theories/Lists/SetoidList.vo: theories/Lists/SetoidList.v theories/Lists/List.vo theories/Sorting/Sorting.vo theories/Setoids/Setoid.vo -theories/Lists/ListTactics.vo: theories/Lists/ListTactics.v theories/NArith/BinPos.vo theories/Lists/List.vo -theories/Strings/Ascii.vo: theories/Strings/Ascii.v theories/Bool/Bool.vo theories/NArith/BinPos.vo -theories/Strings/String.vo: theories/Strings/String.v theories/Arith/Arith.vo theories/Strings/Ascii.vo -theories/Sets/Classical_sets.vo: theories/Sets/Classical_sets.v theories/Sets/Ensembles.vo theories/Sets/Constructive_sets.vo theories/Logic/Classical_Type.vo -theories/Sets/Permut.vo: theories/Sets/Permut.v -theories/Sets/Constructive_sets.vo: theories/Sets/Constructive_sets.v theories/Sets/Ensembles.vo -theories/Sets/Powerset.vo: theories/Sets/Powerset.v theories/Sets/Ensembles.vo theories/Sets/Relations_1.vo theories/Sets/Relations_1_facts.vo theories/Sets/Partial_Order.vo theories/Sets/Cpo.vo -theories/Sets/Cpo.vo: theories/Sets/Cpo.v theories/Sets/Ensembles.vo theories/Sets/Relations_1.vo theories/Sets/Partial_Order.vo -theories/Sets/Powerset_Classical_facts.vo: theories/Sets/Powerset_Classical_facts.v theories/Sets/Ensembles.vo theories/Sets/Constructive_sets.vo theories/Sets/Relations_1.vo theories/Sets/Relations_1_facts.vo theories/Sets/Partial_Order.vo theories/Sets/Cpo.vo theories/Sets/Powerset.vo theories/Sets/Powerset_facts.vo theories/Logic/Classical_Type.vo theories/Sets/Classical_sets.vo -theories/Sets/Ensembles.vo: theories/Sets/Ensembles.v -theories/Sets/Powerset_facts.vo: theories/Sets/Powerset_facts.v theories/Sets/Ensembles.vo theories/Sets/Constructive_sets.vo theories/Sets/Relations_1.vo theories/Sets/Relations_1_facts.vo theories/Sets/Partial_Order.vo theories/Sets/Cpo.vo theories/Sets/Powerset.vo -theories/Sets/Finite_sets.vo: theories/Sets/Finite_sets.v theories/Sets/Ensembles.vo theories/Sets/Constructive_sets.vo -theories/Sets/Relations_1.vo: theories/Sets/Relations_1.v -theories/Sets/Finite_sets_facts.vo: theories/Sets/Finite_sets_facts.v theories/Sets/Finite_sets.vo theories/Sets/Constructive_sets.vo theories/Logic/Classical_Type.vo theories/Sets/Classical_sets.vo theories/Sets/Powerset.vo theories/Sets/Powerset_facts.vo theories/Sets/Powerset_Classical_facts.vo theories/Arith/Gt.vo theories/Arith/Lt.vo -theories/Sets/Relations_1_facts.vo: theories/Sets/Relations_1_facts.v theories/Sets/Relations_1.vo -theories/Sets/Image.vo: theories/Sets/Image.v theories/Sets/Finite_sets.vo theories/Sets/Constructive_sets.vo theories/Logic/Classical_Type.vo theories/Sets/Classical_sets.vo theories/Sets/Powerset.vo theories/Sets/Powerset_facts.vo theories/Sets/Powerset_Classical_facts.vo theories/Arith/Gt.vo theories/Arith/Lt.vo theories/Arith/Le.vo theories/Sets/Finite_sets_facts.vo -theories/Sets/Relations_2.vo: theories/Sets/Relations_2.v theories/Sets/Relations_1.vo -theories/Sets/Infinite_sets.vo: theories/Sets/Infinite_sets.v theories/Sets/Finite_sets.vo theories/Sets/Constructive_sets.vo theories/Logic/Classical_Type.vo theories/Sets/Classical_sets.vo theories/Sets/Powerset.vo theories/Sets/Powerset_facts.vo theories/Sets/Powerset_Classical_facts.vo theories/Arith/Gt.vo theories/Arith/Lt.vo theories/Arith/Le.vo theories/Sets/Finite_sets_facts.vo theories/Sets/Image.vo -theories/Sets/Relations_2_facts.vo: theories/Sets/Relations_2_facts.v theories/Sets/Relations_1.vo theories/Sets/Relations_1_facts.vo theories/Sets/Relations_2.vo -theories/Sets/Integers.vo: theories/Sets/Integers.v theories/Sets/Finite_sets.vo theories/Sets/Constructive_sets.vo theories/Logic/Classical_Type.vo theories/Sets/Classical_sets.vo theories/Sets/Powerset.vo theories/Sets/Powerset_facts.vo theories/Sets/Powerset_Classical_facts.vo theories/Arith/Gt.vo theories/Arith/Lt.vo theories/Arith/Le.vo theories/Sets/Finite_sets_facts.vo theories/Sets/Image.vo theories/Sets/Infinite_sets.vo theories/Arith/Compare_dec.vo theories/Sets/Relations_1.vo theories/Sets/Partial_Order.vo theories/Sets/Cpo.vo -theories/Sets/Relations_3.vo: theories/Sets/Relations_3.v theories/Sets/Relations_1.vo theories/Sets/Relations_2.vo -theories/Sets/Multiset.vo: theories/Sets/Multiset.v theories/Sets/Permut.vo theories/Arith/Plus.vo -theories/Sets/Relations_3_facts.vo: theories/Sets/Relations_3_facts.v theories/Sets/Relations_1.vo theories/Sets/Relations_1_facts.vo theories/Sets/Relations_2.vo theories/Sets/Relations_2_facts.vo theories/Sets/Relations_3.vo -theories/Sets/Partial_Order.vo: theories/Sets/Partial_Order.v theories/Sets/Ensembles.vo theories/Sets/Relations_1.vo -theories/Sets/Uniset.vo: theories/Sets/Uniset.v theories/Bool/Bool.vo theories/Sets/Permut.vo -theories/FSets/OrderedType.vo: theories/FSets/OrderedType.v theories/Lists/SetoidList.vo -theories/FSets/OrderedTypeEx.vo: theories/FSets/OrderedTypeEx.v theories/FSets/OrderedType.vo theories/ZArith/ZArith.vo contrib/omega/Omega.vo theories/NArith/NArith.vo theories/NArith/Ndec.vo theories/Arith/Compare_dec.vo -theories/FSets/OrderedTypeAlt.vo: theories/FSets/OrderedTypeAlt.v theories/FSets/OrderedType.vo -theories/FSets/FSetInterface.vo: theories/FSets/FSetInterface.v theories/Bool/Bool.vo theories/FSets/OrderedType.vo -theories/FSets/FSetList.vo: theories/FSets/FSetList.v theories/FSets/FSetInterface.vo -theories/FSets/FSetBridge.vo: theories/FSets/FSetBridge.v theories/FSets/FSetInterface.vo -theories/FSets/FSetFacts.vo: theories/FSets/FSetFacts.v theories/FSets/FSetInterface.vo -theories/FSets/FSetProperties.vo: theories/FSets/FSetProperties.v theories/FSets/FSetInterface.vo theories/FSets/FSetFacts.vo -theories/FSets/FSetEqProperties.vo: theories/FSets/FSetEqProperties.v theories/FSets/FSetProperties.vo theories/Bool/Zerob.vo theories/Bool/Sumbool.vo contrib/omega/Omega.vo -theories/FSets/FSets.vo: theories/FSets/FSets.v theories/FSets/OrderedType.vo theories/FSets/OrderedTypeEx.vo theories/FSets/OrderedTypeAlt.vo theories/FSets/FSetInterface.vo theories/FSets/FSetBridge.vo theories/FSets/FSetProperties.vo theories/FSets/FSetEqProperties.vo theories/FSets/FSetList.vo -theories/FSets/FSetWeakProperties.vo: theories/FSets/FSetWeakProperties.v theories/FSets/FSetWeakInterface.vo theories/FSets/FSetWeakFacts.vo -theories/FSets/FSetWeakInterface.vo: theories/FSets/FSetWeakInterface.v theories/Bool/Bool.vo theories/Logic/DecidableType.vo -theories/FSets/FSetWeakList.vo: theories/FSets/FSetWeakList.v theories/FSets/FSetWeakInterface.vo -theories/FSets/FSetWeakFacts.vo: theories/FSets/FSetWeakFacts.v theories/FSets/FSetWeakInterface.vo -theories/FSets/FSetWeak.vo: theories/FSets/FSetWeak.v theories/Logic/DecidableType.vo theories/Logic/DecidableTypeEx.vo theories/FSets/FSetWeakInterface.vo theories/FSets/FSetWeakFacts.vo theories/FSets/FSetWeakProperties.vo theories/FSets/FSetWeakList.vo -theories/FSets/FMapInterface.vo: theories/FSets/FMapInterface.v theories/FSets/FSetInterface.vo -theories/FSets/FMapList.vo: theories/FSets/FMapList.v theories/FSets/FSetInterface.vo theories/FSets/FMapInterface.vo -theories/FSets/FMaps.vo: theories/FSets/FMaps.v theories/FSets/OrderedType.vo theories/FSets/OrderedTypeEx.vo theories/FSets/OrderedTypeAlt.vo theories/FSets/FMapInterface.vo theories/FSets/FMapList.vo theories/FSets/FMapPositive.vo theories/FSets/FMapIntMap.vo theories/FSets/FMapFacts.vo -theories/FSets/FMapFacts.vo: theories/FSets/FMapFacts.v theories/Bool/Bool.vo theories/FSets/OrderedType.vo theories/FSets/FMapInterface.vo -theories/FSets/FMapWeakFacts.vo: theories/FSets/FMapWeakFacts.v theories/Bool/Bool.vo theories/FSets/OrderedType.vo theories/FSets/FMapWeakInterface.vo -theories/FSets/FMapWeakInterface.vo: theories/FSets/FMapWeakInterface.v theories/FSets/FSetInterface.vo theories/FSets/FSetWeakInterface.vo -theories/FSets/FMapWeakList.vo: theories/FSets/FMapWeakList.v theories/FSets/FSetInterface.vo theories/FSets/FSetWeakInterface.vo theories/FSets/FMapWeakInterface.vo -theories/FSets/FMapWeak.vo: theories/FSets/FMapWeak.v theories/Logic/DecidableType.vo theories/Logic/DecidableTypeEx.vo theories/FSets/FMapWeakInterface.vo theories/FSets/FMapWeakList.vo theories/FSets/FMapWeakFacts.vo -theories/FSets/FMapPositive.vo: theories/FSets/FMapPositive.v theories/Bool/Bool.vo theories/ZArith/ZArith.vo theories/FSets/OrderedType.vo theories/FSets/FMapInterface.vo -theories/FSets/FMapIntMap.vo: theories/FSets/FMapIntMap.v theories/Bool/Bool.vo theories/NArith/NArith.vo theories/NArith/Ndigits.vo theories/NArith/Ndec.vo theories/NArith/Nnat.vo theories/IntMap/Allmaps.vo theories/FSets/OrderedType.vo theories/FSets/OrderedTypeEx.vo theories/FSets/FMapInterface.vo theories/FSets/FMapList.vo -theories/FSets/FSetToFiniteSet.vo: theories/FSets/FSetToFiniteSet.v theories/Sets/Ensembles.vo theories/Sets/Finite_sets.vo theories/FSets/FSetInterface.vo theories/FSets/FSetProperties.vo theories/FSets/OrderedTypeEx.vo -theories/FSets/FMapAVL.vo: theories/FSets/FMapAVL.v theories/FSets/FSetInterface.vo theories/FSets/FMapInterface.vo theories/FSets/FMapList.vo theories/ZArith/ZArith.vo theories/ZArith/Int.vo -theories/FSets/FSetAVL.vo: theories/FSets/FSetAVL.v theories/FSets/FSetInterface.vo theories/FSets/FSetList.vo theories/ZArith/ZArith.vo theories/ZArith/Int.vo -theories/IntMap/Adalloc.vo: theories/IntMap/Adalloc.v theories/Bool/Bool.vo theories/Bool/Sumbool.vo theories/Arith/Arith.vo theories/NArith/NArith.vo theories/NArith/Ndigits.vo theories/NArith/Ndec.vo theories/NArith/Nnat.vo theories/IntMap/Map.vo theories/IntMap/Fset.vo -theories/IntMap/Mapcanon.vo: theories/IntMap/Mapcanon.v theories/Bool/Bool.vo theories/Bool/Sumbool.vo theories/Arith/Arith.vo theories/NArith/NArith.vo theories/NArith/Ndigits.vo theories/NArith/Ndec.vo theories/IntMap/Map.vo theories/IntMap/Mapaxioms.vo theories/IntMap/Mapiter.vo theories/IntMap/Fset.vo theories/Lists/List.vo theories/IntMap/Lsort.vo theories/IntMap/Mapsubset.vo theories/IntMap/Mapcard.vo -theories/IntMap/Mapfold.vo: theories/IntMap/Mapfold.v theories/Bool/Bool.vo theories/Bool/Sumbool.vo theories/NArith/NArith.vo theories/NArith/Ndigits.vo theories/NArith/Ndec.vo theories/IntMap/Map.vo theories/IntMap/Fset.vo theories/IntMap/Mapaxioms.vo theories/IntMap/Mapiter.vo theories/IntMap/Lsort.vo theories/IntMap/Mapsubset.vo theories/Lists/List.vo -theories/IntMap/Mapcard.vo: theories/IntMap/Mapcard.v theories/Bool/Bool.vo theories/Bool/Sumbool.vo theories/Arith/Arith.vo theories/NArith/NArith.vo theories/NArith/Ndigits.vo theories/NArith/Ndec.vo theories/IntMap/Map.vo theories/IntMap/Mapaxioms.vo theories/IntMap/Mapiter.vo theories/IntMap/Fset.vo theories/IntMap/Mapsubset.vo theories/Lists/List.vo theories/IntMap/Lsort.vo theories/Arith/Peano_dec.vo -theories/IntMap/Mapc.vo: theories/IntMap/Mapc.v theories/Bool/Bool.vo theories/Bool/Sumbool.vo theories/Arith/Arith.vo theories/NArith/NArith.vo theories/IntMap/Map.vo theories/IntMap/Mapaxioms.vo theories/IntMap/Fset.vo theories/IntMap/Mapiter.vo theories/IntMap/Mapsubset.vo theories/Lists/List.vo theories/IntMap/Lsort.vo theories/IntMap/Mapcard.vo theories/IntMap/Mapcanon.vo -theories/IntMap/Allmaps.vo: theories/IntMap/Allmaps.v theories/IntMap/Map.vo theories/IntMap/Fset.vo theories/IntMap/Mapaxioms.vo theories/IntMap/Mapiter.vo theories/IntMap/Mapsubset.vo theories/IntMap/Lsort.vo theories/IntMap/Mapfold.vo theories/IntMap/Mapcard.vo theories/IntMap/Mapcanon.vo theories/IntMap/Mapc.vo theories/IntMap/Maplists.vo theories/IntMap/Adalloc.vo -theories/IntMap/Mapiter.vo: theories/IntMap/Mapiter.v theories/Bool/Bool.vo theories/Bool/Sumbool.vo theories/NArith/NArith.vo theories/NArith/Ndigits.vo theories/NArith/Ndec.vo theories/IntMap/Map.vo theories/IntMap/Mapaxioms.vo theories/IntMap/Fset.vo theories/Lists/List.vo -theories/IntMap/Fset.vo: theories/IntMap/Fset.v theories/Bool/Bool.vo theories/Bool/Sumbool.vo theories/NArith/NArith.vo theories/NArith/Ndigits.vo theories/NArith/Ndec.vo theories/IntMap/Map.vo -theories/IntMap/Maplists.vo: theories/IntMap/Maplists.v theories/NArith/BinNat.vo theories/NArith/Ndigits.vo theories/NArith/Ndec.vo theories/IntMap/Map.vo theories/IntMap/Fset.vo theories/IntMap/Mapaxioms.vo theories/IntMap/Mapsubset.vo theories/IntMap/Mapcard.vo theories/IntMap/Mapcanon.vo theories/IntMap/Mapc.vo theories/Bool/Bool.vo theories/Bool/Sumbool.vo theories/Lists/List.vo theories/Arith/Arith.vo theories/IntMap/Mapiter.vo theories/IntMap/Mapfold.vo -theories/IntMap/Lsort.vo: theories/IntMap/Lsort.v theories/Bool/Bool.vo theories/Bool/Sumbool.vo theories/Arith/Arith.vo theories/NArith/NArith.vo theories/NArith/Ndigits.vo theories/NArith/Ndec.vo theories/IntMap/Map.vo theories/Lists/List.vo theories/IntMap/Mapiter.vo -theories/IntMap/Mapsubset.vo: theories/IntMap/Mapsubset.v theories/Bool/Bool.vo theories/Bool/Sumbool.vo theories/Arith/Arith.vo theories/NArith/NArith.vo theories/NArith/Ndigits.vo theories/NArith/Ndec.vo theories/IntMap/Map.vo theories/IntMap/Fset.vo theories/IntMap/Mapaxioms.vo theories/IntMap/Mapiter.vo -theories/IntMap/Mapaxioms.vo: theories/IntMap/Mapaxioms.v theories/Bool/Bool.vo theories/Bool/Sumbool.vo theories/NArith/NArith.vo theories/NArith/Ndigits.vo theories/NArith/Ndec.vo theories/IntMap/Map.vo theories/IntMap/Fset.vo -theories/IntMap/Map.vo: theories/IntMap/Map.v theories/Bool/Bool.vo theories/Bool/Sumbool.vo theories/NArith/NArith.vo theories/NArith/Ndigits.vo theories/NArith/Ndec.vo -theories/Relations/Newman.vo: theories/Relations/Newman.v theories/Relations/Rstar.vo -theories/Relations/Operators_Properties.vo: theories/Relations/Operators_Properties.v theories/Relations/Relation_Definitions.vo theories/Relations/Relation_Operators.vo -theories/Relations/Relation_Definitions.vo: theories/Relations/Relation_Definitions.v -theories/Relations/Relation_Operators.vo: theories/Relations/Relation_Operators.v theories/Relations/Relation_Definitions.vo theories/Lists/List.vo -theories/Relations/Relations.vo: theories/Relations/Relations.v theories/Relations/Relation_Definitions.vo theories/Relations/Relation_Operators.vo theories/Relations/Operators_Properties.vo -theories/Relations/Rstar.vo: theories/Relations/Rstar.v -theories/Wellfounded/Disjoint_Union.vo: theories/Wellfounded/Disjoint_Union.v theories/Relations/Relation_Operators.vo -theories/Wellfounded/Inclusion.vo: theories/Wellfounded/Inclusion.v theories/Relations/Relation_Definitions.vo -theories/Wellfounded/Inverse_Image.vo: theories/Wellfounded/Inverse_Image.v -theories/Wellfounded/Lexicographic_Exponentiation.vo: theories/Wellfounded/Lexicographic_Exponentiation.v theories/Logic/Eqdep.vo theories/Lists/List.vo theories/Relations/Relation_Operators.vo theories/Wellfounded/Transitive_Closure.vo -theories/Wellfounded/Transitive_Closure.vo: theories/Wellfounded/Transitive_Closure.v theories/Relations/Relation_Definitions.vo theories/Relations/Relation_Operators.vo -theories/Wellfounded/Union.vo: theories/Wellfounded/Union.v theories/Relations/Relation_Operators.vo theories/Relations/Relation_Definitions.vo theories/Wellfounded/Transitive_Closure.vo -theories/Wellfounded/Wellfounded.vo: theories/Wellfounded/Wellfounded.v theories/Wellfounded/Disjoint_Union.vo theories/Wellfounded/Inclusion.vo theories/Wellfounded/Inverse_Image.vo theories/Wellfounded/Lexicographic_Exponentiation.vo theories/Wellfounded/Lexicographic_Product.vo theories/Wellfounded/Transitive_Closure.vo theories/Wellfounded/Union.vo theories/Wellfounded/Well_Ordering.vo -theories/Wellfounded/Well_Ordering.vo: theories/Wellfounded/Well_Ordering.v theories/Logic/Eqdep.vo -theories/Wellfounded/Lexicographic_Product.vo: theories/Wellfounded/Lexicographic_Product.v theories/Logic/Eqdep.vo theories/Relations/Relation_Operators.vo theories/Wellfounded/Transitive_Closure.vo -theories/Reals/Rdefinitions.vo: theories/Reals/Rdefinitions.v theories/ZArith/ZArith_base.vo -theories/Reals/Rpow_def.vo: theories/Reals/Rpow_def.v theories/Reals/Rdefinitions.vo -theories/Reals/Raxioms.vo: theories/Reals/Raxioms.v theories/ZArith/ZArith_base.vo theories/Reals/Rdefinitions.vo -theories/Reals/RIneq.vo: theories/Reals/RIneq.v theories/Reals/Raxioms.vo theories/Reals/Rpow_def.vo theories/ZArith/Zpower.vo contrib/setoid_ring/ZArithRing.vo contrib/omega/Omega.vo contrib/setoid_ring/RealField.vo -theories/Reals/DiscrR.vo: theories/Reals/DiscrR.v theories/Reals/RIneq.vo contrib/omega/Omega.vo -theories/Reals/Rbase.vo: theories/Reals/Rbase.v theories/Reals/Rdefinitions.vo theories/Reals/Raxioms.vo theories/Reals/RIneq.vo theories/Reals/DiscrR.vo -theories/Reals/LegacyRfield.vo: theories/Reals/LegacyRfield.v theories/Reals/Raxioms.vo contrib/field/LegacyField.vo -theories/Reals/R_Ifp.vo: theories/Reals/R_Ifp.v theories/Reals/Rbase.vo contrib/omega/Omega.vo -theories/Reals/Rpow_def.vo: theories/Reals/Rpow_def.v theories/Reals/Rdefinitions.vo -theories/Reals/Rbasic_fun.vo: theories/Reals/Rbasic_fun.v theories/Reals/Rbase.vo theories/Reals/R_Ifp.vo contrib/fourier/Fourier.vo -theories/Reals/R_sqr.vo: theories/Reals/R_sqr.v theories/Reals/Rbase.vo theories/Reals/Rbasic_fun.vo -theories/Reals/SplitAbsolu.vo: theories/Reals/SplitAbsolu.v theories/Reals/Rbasic_fun.vo -theories/Reals/SplitRmult.vo: theories/Reals/SplitRmult.v theories/Reals/Rbase.vo -theories/Reals/ArithProp.vo: theories/Reals/ArithProp.v theories/Reals/Rbase.vo theories/Reals/Rbasic_fun.vo theories/Arith/Even.vo theories/Arith/Div2.vo contrib/setoid_ring/ArithRing.vo -theories/Reals/Rfunctions.vo: theories/Reals/Rfunctions.v contrib/setoid_ring/ArithRing.vo theories/Reals/Rbase.vo theories/Reals/Rpow_def.vo theories/Reals/R_Ifp.vo theories/Reals/Rbasic_fun.vo theories/Reals/R_sqr.vo theories/Reals/SplitAbsolu.vo theories/Reals/SplitRmult.vo theories/Reals/ArithProp.vo contrib/omega/Omega.vo theories/ZArith/Zpower.vo -theories/Reals/Rseries.vo: theories/Reals/Rseries.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Logic/Classical.vo theories/Arith/Compare.vo -theories/Reals/SeqProp.vo: theories/Reals/SeqProp.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Rseries.vo theories/Logic/Classical.vo theories/Arith/Max.vo -theories/Reals/Rcomplete.vo: theories/Reals/Rcomplete.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Rseries.vo theories/Reals/SeqProp.vo theories/Arith/Max.vo -theories/Reals/PartSum.vo: theories/Reals/PartSum.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Rseries.vo theories/Reals/Rcomplete.vo theories/Arith/Max.vo -theories/Reals/AltSeries.vo: theories/Reals/AltSeries.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Rseries.vo theories/Reals/SeqProp.vo theories/Reals/PartSum.vo theories/Arith/Max.vo -theories/Reals/Binomial.vo: theories/Reals/Binomial.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/PartSum.vo -theories/Reals/Rsigma.vo: theories/Reals/Rsigma.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Rseries.vo theories/Reals/PartSum.vo -theories/Reals/Rprod.vo: theories/Reals/Rprod.v theories/Arith/Compare.vo theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Rseries.vo theories/Reals/PartSum.vo theories/Reals/Binomial.vo -theories/Reals/Cauchy_prod.vo: theories/Reals/Cauchy_prod.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Rseries.vo theories/Reals/PartSum.vo -theories/Reals/Alembert.vo: theories/Reals/Alembert.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Rseries.vo theories/Reals/SeqProp.vo theories/Reals/PartSum.vo theories/Arith/Max.vo -theories/Reals/SeqSeries.vo: theories/Reals/SeqSeries.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Arith/Max.vo theories/Reals/Rseries.vo theories/Reals/SeqProp.vo theories/Reals/Rcomplete.vo theories/Reals/PartSum.vo theories/Reals/AltSeries.vo theories/Reals/Binomial.vo theories/Reals/Rsigma.vo theories/Reals/Rprod.vo theories/Reals/Cauchy_prod.vo theories/Reals/Alembert.vo -theories/Reals/Rtrigo_fun.vo: theories/Reals/Rtrigo_fun.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo -theories/Reals/Rtrigo_def.vo: theories/Reals/Rtrigo_def.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo_fun.vo theories/Arith/Max.vo -theories/Reals/Rtrigo_alt.vo: theories/Reals/Rtrigo_alt.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo_def.vo -theories/Reals/Cos_rel.vo: theories/Reals/Cos_rel.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo_def.vo -theories/Reals/Cos_plus.vo: theories/Reals/Cos_plus.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo_def.vo theories/Reals/Cos_rel.vo theories/Arith/Max.vo -theories/Reals/Rtrigo.vo: theories/Reals/Rtrigo.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo_fun.vo theories/Reals/Rtrigo_def.vo theories/Reals/Rtrigo_alt.vo theories/Reals/Cos_rel.vo theories/Reals/Cos_plus.vo theories/ZArith/ZArith_base.vo theories/ZArith/Zcomplements.vo theories/Logic/Classical_Prop.vo -theories/Reals/Rlimit.vo: theories/Reals/Rlimit.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Logic/Classical_Prop.vo contrib/fourier/Fourier.vo -theories/Reals/Rderiv.vo: theories/Reals/Rderiv.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Rlimit.vo contrib/fourier/Fourier.vo theories/Logic/Classical_Prop.vo theories/Logic/Classical_Pred_Type.vo contrib/omega/Omega.vo -theories/Reals/RList.vo: theories/Reals/RList.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo -theories/Reals/Ranalysis1.vo: theories/Reals/Ranalysis1.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Rlimit.vo theories/Reals/Rderiv.vo -theories/Reals/Ranalysis2.vo: theories/Reals/Ranalysis2.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Ranalysis1.vo -theories/Reals/Ranalysis3.vo: theories/Reals/Ranalysis3.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Ranalysis1.vo theories/Reals/Ranalysis2.vo -theories/Reals/Rtopology.vo: theories/Reals/Rtopology.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Ranalysis1.vo theories/Reals/RList.vo theories/Logic/Classical_Prop.vo theories/Logic/Classical_Pred_Type.vo -theories/Reals/MVT.vo: theories/Reals/MVT.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Ranalysis1.vo theories/Reals/Rtopology.vo -theories/Reals/PSeries_reg.vo: theories/Reals/PSeries_reg.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Ranalysis1.vo theories/Arith/Max.vo theories/Arith/Even.vo -theories/Reals/Exp_prop.vo: theories/Reals/Exp_prop.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo.vo theories/Reals/Ranalysis1.vo theories/Reals/PSeries_reg.vo theories/Arith/Div2.vo theories/Arith/Even.vo theories/Arith/Max.vo -theories/Reals/Rtrigo_reg.vo: theories/Reals/Rtrigo_reg.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo.vo theories/Reals/Ranalysis1.vo theories/Reals/PSeries_reg.vo -theories/Reals/Rsqrt_def.vo: theories/Reals/Rsqrt_def.v theories/Bool/Sumbool.vo theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Ranalysis1.vo -theories/Reals/R_sqrt.vo: theories/Reals/R_sqrt.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Rsqrt_def.vo -theories/Reals/Rtrigo_calc.vo: theories/Reals/Rtrigo_calc.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo.vo theories/Reals/R_sqrt.vo -theories/Reals/Rgeom.vo: theories/Reals/Rgeom.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo.vo theories/Reals/R_sqrt.vo -theories/Reals/Sqrt_reg.vo: theories/Reals/Sqrt_reg.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Ranalysis1.vo theories/Reals/R_sqrt.vo -theories/Reals/Ranalysis4.vo: theories/Reals/Ranalysis4.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo.vo theories/Reals/Ranalysis1.vo theories/Reals/Ranalysis3.vo theories/Reals/Exp_prop.vo -theories/Reals/Rpower.vo: theories/Reals/Rpower.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo.vo theories/Reals/Ranalysis1.vo theories/Reals/Exp_prop.vo theories/Reals/Rsqrt_def.vo theories/Reals/R_sqrt.vo theories/Reals/MVT.vo theories/Reals/Ranalysis4.vo -theories/Reals/Ranalysis.vo: theories/Reals/Ranalysis.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Rtrigo.vo theories/Reals/SeqSeries.vo theories/Reals/Ranalysis1.vo theories/Reals/Ranalysis2.vo theories/Reals/Ranalysis3.vo theories/Reals/Rtopology.vo theories/Reals/MVT.vo theories/Reals/PSeries_reg.vo theories/Reals/Exp_prop.vo theories/Reals/Rtrigo_reg.vo theories/Reals/Rsqrt_def.vo theories/Reals/R_sqrt.vo theories/Reals/Rtrigo_calc.vo theories/Reals/Rgeom.vo theories/Reals/RList.vo theories/Reals/Sqrt_reg.vo theories/Reals/Ranalysis4.vo theories/Reals/Rpower.vo -theories/Reals/NewtonInt.vo: theories/Reals/NewtonInt.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo.vo theories/Reals/Ranalysis.vo -theories/Reals/RiemannInt_SF.vo: theories/Reals/RiemannInt_SF.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/Ranalysis.vo theories/Logic/Classical_Prop.vo -theories/Reals/RiemannInt.vo: theories/Reals/RiemannInt.v theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Ranalysis.vo theories/Reals/Rbase.vo theories/Reals/RiemannInt_SF.vo theories/Logic/Classical_Prop.vo theories/Logic/Classical_Pred_Type.vo theories/Arith/Max.vo -theories/Reals/Integration.vo: theories/Reals/Integration.v theories/Reals/NewtonInt.vo theories/Reals/RiemannInt_SF.vo theories/Reals/RiemannInt.vo -theories/Reals/Reals.vo: theories/Reals/Reals.v theories/Reals/Rbase.vo theories/Reals/Rfunctions.vo theories/Reals/SeqSeries.vo theories/Reals/Rtrigo.vo theories/Reals/Ranalysis.vo theories/Reals/Integration.vo -theories/Sorting/Heap.vo: theories/Sorting/Heap.v theories/Lists/List.vo theories/Sets/Multiset.vo theories/Sorting/Permutation.vo theories/Relations/Relations.vo theories/Sorting/Sorting.vo -theories/Sorting/Permutation.vo: theories/Sorting/Permutation.v theories/Relations/Relations.vo theories/Lists/List.vo theories/Sets/Multiset.vo theories/Arith/Arith.vo -theories/Sorting/Sorting.vo: theories/Sorting/Sorting.v theories/Lists/List.vo theories/Sets/Multiset.vo theories/Sorting/Permutation.vo theories/Relations/Relations.vo -theories/Sorting/PermutSetoid.vo: theories/Sorting/PermutSetoid.v contrib/omega/Omega.vo theories/Relations/Relations.vo theories/Lists/List.vo theories/Sets/Multiset.vo theories/Sorting/Permutation.vo theories/Lists/SetoidList.vo -theories/Sorting/PermutEq.vo: theories/Sorting/PermutEq.v contrib/omega/Omega.vo theories/Relations/Relations.vo theories/Setoids/Setoid.vo theories/Lists/List.vo theories/Sets/Multiset.vo theories/Sorting/Permutation.vo -theories/QArith/QArith_base.vo: theories/QArith/QArith_base.v theories/ZArith/ZArith.vo contrib/setoid_ring/ZArithRing.vo theories/Setoids/Setoid.vo -theories/QArith/Qreduction.vo: theories/QArith/Qreduction.v theories/QArith/QArith_base.vo theories/ZArith/Znumtheory.vo -theories/QArith/Qring.vo: theories/QArith/Qring.v contrib/setoid_ring/Ring.vo theories/QArith/QArith_base.vo -theories/QArith/Qreals.vo: theories/QArith/Qreals.v theories/Reals/Rbase.vo theories/QArith/QArith_base.vo -theories/QArith/QArith.vo: theories/QArith/QArith.v theories/QArith/QArith_base.vo theories/QArith/Qring.vo theories/QArith/Qreduction.vo -theories/QArith/Qcanon.vo: theories/QArith/Qcanon.v contrib/setoid_ring/Field.vo theories/QArith/QArith.vo theories/ZArith/Znumtheory.vo theories/Logic/Eqdep_dec.vo -contrib/omega/OmegaLemmas.vo: contrib/omega/OmegaLemmas.v theories/ZArith/ZArith_base.vo -contrib/omega/Omega.vo: contrib/omega/Omega.v theories/ZArith/ZArith_base.vo contrib/omega/OmegaLemmas.vo theories/ZArith/Zhints.vo -contrib/romega/ReflOmegaCore.vo: contrib/romega/ReflOmegaCore.v theories/Arith/Arith.vo theories/Lists/List.vo theories/Bool/Bool.vo theories/ZArith/ZArith_base.vo contrib/omega/OmegaLemmas.vo theories/Logic/Decidable.vo -contrib/romega/ROmega.vo: contrib/romega/ROmega.v contrib/romega/ReflOmegaCore.vo -contrib/ring/LegacyArithRing.vo: contrib/ring/LegacyArithRing.v theories/Bool/Bool.vo contrib/ring/LegacyRing.vo theories/Arith/Arith.vo theories/Logic/Eqdep_dec.vo -contrib/ring/Ring_normalize.vo: contrib/ring/Ring_normalize.v contrib/ring/LegacyRing_theory.vo contrib/ring/Quote.vo -contrib/ring/LegacyRing_theory.vo: contrib/ring/LegacyRing_theory.v theories/Bool/Bool.vo -contrib/ring/LegacyRing.vo: contrib/ring/LegacyRing.v theories/Bool/Bool.vo contrib/ring/LegacyRing_theory.vo contrib/ring/Quote.vo contrib/ring/Ring_normalize.vo contrib/ring/Ring_abstract.vo -contrib/ring/LegacyNArithRing.vo: contrib/ring/LegacyNArithRing.v theories/Bool/Bool.vo contrib/ring/LegacyRing.vo theories/ZArith/ZArith_base.vo theories/NArith/NArith.vo theories/Logic/Eqdep_dec.vo -contrib/ring/LegacyZArithRing.vo: contrib/ring/LegacyZArithRing.v contrib/ring/LegacyArithRing.vo theories/ZArith/ZArith_base.vo theories/Logic/Eqdep_dec.vo contrib/ring/LegacyRing.vo -contrib/ring/Ring_abstract.vo: contrib/ring/Ring_abstract.v contrib/ring/LegacyRing_theory.vo contrib/ring/Quote.vo contrib/ring/Ring_normalize.vo -contrib/ring/Quote.vo: contrib/ring/Quote.v -contrib/ring/Setoid_ring_normalize.vo: contrib/ring/Setoid_ring_normalize.v contrib/ring/Setoid_ring_theory.vo contrib/ring/Quote.vo -contrib/ring/Setoid_ring.vo: contrib/ring/Setoid_ring.v contrib/ring/Setoid_ring_theory.vo contrib/ring/Quote.vo contrib/ring/Setoid_ring_normalize.vo -contrib/ring/Setoid_ring_theory.vo: contrib/ring/Setoid_ring_theory.v theories/Bool/Bool.vo theories/Setoids/Setoid.vo -contrib/field/LegacyField_Compl.vo: contrib/field/LegacyField_Compl.v theories/Lists/List.vo -contrib/field/LegacyField_Theory.vo: contrib/field/LegacyField_Theory.v theories/Lists/List.vo theories/Arith/Peano_dec.vo contrib/ring/LegacyRing.vo contrib/field/LegacyField_Compl.vo -contrib/field/LegacyField_Tactic.vo: contrib/field/LegacyField_Tactic.v theories/Lists/List.vo contrib/ring/LegacyRing.vo contrib/field/LegacyField_Compl.vo contrib/field/LegacyField_Theory.vo -contrib/field/LegacyField.vo: contrib/field/LegacyField.v contrib/field/LegacyField_Compl.vo contrib/field/LegacyField_Theory.vo contrib/field/LegacyField_Tactic.vo -contrib/fourier/Fourier_util.vo: contrib/fourier/Fourier_util.v theories/Reals/Rbase.vo -contrib/fourier/Fourier.vo: contrib/fourier/Fourier.v contrib/ring/quote.cmo contrib/ring/ring.cmo contrib/fourier/fourier.cmo contrib/fourier/fourierR.cmo contrib/field/field.cmo contrib/fourier/Fourier_util.vo contrib/field/LegacyField.vo theories/Reals/DiscrR.vo -contrib/subtac/SubtacTactics.vo: contrib/subtac/SubtacTactics.v theories/Logic/Eqdep.vo -contrib/subtac/Heq.vo: contrib/subtac/Heq.v theories/Logic/JMeq.vo -contrib/subtac/Utils.vo: contrib/subtac/Utils.v contrib/subtac/SubtacTactics.vo theories/Bool/Sumbool.vo theories/Logic/ProofIrrelevance.vo contrib/subtac/Heq.vo -contrib/subtac/FixSub.vo: contrib/subtac/FixSub.v theories/Init/Wf.vo contrib/subtac/Utils.vo theories/Arith/Wf_nat.vo theories/Arith/Lt.vo -contrib/subtac/Subtac.vo: contrib/subtac/Subtac.v contrib/subtac/Utils.vo contrib/subtac/FixSub.vo -contrib/subtac/FunctionalExtensionality.vo: contrib/subtac/FunctionalExtensionality.v contrib/subtac/Utils.vo contrib/subtac/FixSub.vo -contrib/rtauto/Bintree.vo: contrib/rtauto/Bintree.v theories/Lists/List.vo theories/NArith/BinPos.vo -contrib/rtauto/Rtauto.vo: contrib/rtauto/Rtauto.v theories/Lists/List.vo contrib/rtauto/Bintree.vo theories/Bool/Bool.vo theories/NArith/BinPos.vo -contrib/recdef/Recdef.vo: contrib/recdef/Recdef.v theories/Arith/Compare_dec.vo theories/Arith/Wf_nat.vo -contrib/setoid_ring/BinList.vo: contrib/setoid_ring/BinList.v theories/NArith/BinPos.vo theories/Lists/List.vo theories/Lists/ListTactics.vo -contrib/setoid_ring/Ring_theory.vo: contrib/setoid_ring/Ring_theory.v theories/Setoids/Setoid.vo theories/NArith/BinPos.vo theories/NArith/BinNat.vo -contrib/setoid_ring/Ring_polynom.vo: contrib/setoid_ring/Ring_polynom.v theories/Setoids/Setoid.vo contrib/setoid_ring/BinList.vo theories/NArith/BinPos.vo theories/NArith/BinNat.vo theories/ZArith/BinInt.vo contrib/setoid_ring/Ring_theory.vo -contrib/setoid_ring/Ring_tac.vo: contrib/setoid_ring/Ring_tac.v theories/Setoids/Setoid.vo theories/NArith/BinPos.vo contrib/setoid_ring/Ring_polynom.vo contrib/setoid_ring/BinList.vo contrib/setoid_ring/InitialRing.vo contrib/setoid_ring/newring.cmo -contrib/setoid_ring/Ring_base.vo: contrib/setoid_ring/Ring_base.v contrib/setoid_ring/newring.cmo contrib/setoid_ring/Ring_theory.vo contrib/setoid_ring/Ring_tac.vo contrib/setoid_ring/InitialRing.vo -contrib/setoid_ring/InitialRing.vo: contrib/setoid_ring/InitialRing.v theories/ZArith/ZArith_base.vo theories/ZArith/Zpow_def.vo theories/ZArith/BinInt.vo theories/NArith/BinNat.vo theories/Setoids/Setoid.vo contrib/setoid_ring/Ring_theory.vo contrib/setoid_ring/Ring_polynom.vo -contrib/setoid_ring/Ring_equiv.vo: contrib/setoid_ring/Ring_equiv.v contrib/ring/Setoid_ring_theory.vo contrib/ring/LegacyRing_theory.vo contrib/setoid_ring/Ring_theory.vo -contrib/setoid_ring/Ring.vo: contrib/setoid_ring/Ring.v theories/Bool/Bool.vo contrib/setoid_ring/Ring_theory.vo contrib/setoid_ring/Ring_base.vo contrib/setoid_ring/InitialRing.vo contrib/setoid_ring/Ring_tac.vo -contrib/setoid_ring/ArithRing.vo: contrib/setoid_ring/ArithRing.v theories/Arith/Mult.vo theories/NArith/BinNat.vo theories/NArith/Nnat.vo contrib/setoid_ring/Ring.vo -contrib/setoid_ring/NArithRing.vo: contrib/setoid_ring/NArithRing.v contrib/setoid_ring/Ring.vo theories/NArith/BinPos.vo theories/NArith/BinNat.vo -contrib/setoid_ring/ZArithRing.vo: contrib/setoid_ring/ZArithRing.v contrib/setoid_ring/Ring.vo theories/ZArith/ZArith_base.vo theories/ZArith/Zpow_def.vo -contrib/setoid_ring/Field_theory.vo: contrib/setoid_ring/Field_theory.v contrib/setoid_ring/Ring.vo theories/ZArith/ZArith_base.vo -contrib/setoid_ring/Field_tac.vo: contrib/setoid_ring/Field_tac.v contrib/setoid_ring/Ring_tac.vo contrib/setoid_ring/BinList.vo contrib/setoid_ring/Ring_polynom.vo contrib/setoid_ring/InitialRing.vo contrib/setoid_ring/Field_theory.vo -contrib/setoid_ring/Field.vo: contrib/setoid_ring/Field.v contrib/setoid_ring/Field_theory.vo contrib/setoid_ring/Field_tac.vo -contrib/setoid_ring/RealField.vo: contrib/setoid_ring/RealField.v theories/NArith/Nnat.vo contrib/setoid_ring/ArithRing.vo contrib/setoid_ring/Ring.vo contrib/setoid_ring/Field.vo theories/Reals/Rdefinitions.vo theories/Reals/Rpow_def.vo theories/Reals/Raxioms.vo diff --git a/CHANGES b/CHANGES index 9967fad5..675db3f1 100644 --- a/CHANGES +++ b/CHANGES @@ -1,41 +1,418 @@ -Changes from V8.1pl2 to V8.1pl3 -=============================== - -Bug fixes +Changes from V8.1 to V8.2 +========================= -- A critical bug and a few other bugs have been fixed. +Language -Changes from V8.1pl1 to V8.1pl2 -=============================== +- If a fixpoint is not written with an explicit { struct ... }, then + all arguments are tried successively (from left to right) until one is + found that satisfies the structural decreasing condition. +- New experimental typeclass system giving ad-hoc polymorphism and + overloading based on dependent records and implicit arguments. +- New syntax "let 'pat := b in c" for let-binding using irrefutable patterns. +- New syntax "forall {A}, T" for specifying maximally inserted implicit + arguments in terms. +- Sort of Record/Structure, Inductive and CoInductive defaults to Type + if omitted. +- Record/Structure now usable for defining coinductive types + (e.g. "Record stream := { hd : nat; tl : stream }.") +- New syntax "Theorem id1:t1 ... with idn:tn" for proving mutually dependent + statements. +- Support for sort-polymorphism on constants denoting inductive types. +- Several evolutions of the module system (handling of module aliases, + functorial module types, an Include feature, etc). (TODO: Say more!) +- Prop now a subtype of Set (predicative and impredicative forms). -Installation +Vernacular commands -- Support for compilation with ocaml 3.10 and (transitional) camlp5. +- Added option Global to "Arguments Scope" for section surviving. (DOC TODO) +- Added option "Unset Elimination Schemes" to deactivate the automatic + generation of elimination schemes. +- Modification of the Scheme command so you can ask for the name to be + automatically computed (e.g. Scheme Induction for nat Sort Set). +- New command "Combined Scheme" to build combined mutual induction + principles from existing mutual induction principles. +- New command "Scheme Equality" to build a decidable (boolean) equality + for simple inductive datatypes and a decision property over this equality + (e.g. Scheme Equality for nat). +- Added option "Set Equality Scheme" to make automatic the declaration + of the boolean equality when possible. +- Source of universe inconsistencies now printed when option + "Set Printing Universes" is activated. +- New option "Set Printing Existential Instances" for making the display of + existential variable instances explicit. +- Support for option "[id1 ... idn]", and "-[id1 ... idn]", for the + "compute"/"cbv" reduction strategy, respectively meaning reduce only, or + everything but, the constants id1 ... idn. "lazy" alone or followed by + "[id1 ... idn]", and "-[id1 ... idn]" also supported, meaning apply + all of beta-iota-zeta-delta, possibly restricting delta. +- New command "Strategy" to control the expansion of constants during + conversion tests. It generalizes commands Opaque and Transparent by + introducing a range of levels. Lower levels are assigned to constants + that should be expanded first. +- New command "Print Assumptions" to display all variables, parameters + or axioms a theorem or definition relies on. + +Libraries (DOC TO CHECK) + +- Several parts of the libraries are now in Type, in particular FSets, + SetoidList, ListSet, Sorting, Zmisc. This may induce a few + incompatibilities. In case of trouble while fixing existing development, + it may help to simply declare Set as an alias for Type (see file + SetIsType). +- New arithmetical library in theories/Numbers. It contains: + * an abstract modular development of natural and integer arithmetics + in Numbers/Natural/Abstract and Numbers/Integer/Abstract + * an implementation of efficient computational bounded and unbounded + integers that can be mapped to processor native arithmetics. + See Numbers/Cyclic/Int31 for 31-bit integers and Numbers/Natural/BigN + for unbounded natural numbers and Numbers/Integer/BigZ for unbounded + integers. + * some proofs that both older libraries Arith, ZArith and NArith and + newer BigN and BigZ implement the abstract modular development. + This allows in particular BigN and BigZ to already come with a + large database of basic lemmas and some generic tactics (ring), + This library has still an experimental status, as well as the + processor-acceleration mechanism, but both its abstract and its + concrete parts are already quite usable and could challenge the use + of nat, N and Z in actual developments. Moreover, an extension of + this framework to rational numbers is ongoing, and an efficient + Q structure is already provided (see Numbers/Rational/BigQ), but + this part is currently incomplete (no abstract layer and generic + lemmas). +- Many changes in FSets/FMaps. In practice, compatibility with earlier + version should be fairly good, but some adaptations may be required. + * Interfaces of unordered ("weak") and ordered sets have been factorized + thanks to new features of Coq modules (in particular Include), see + FSetInterface. Same for maps. Hints in these interfaces have been + reworked (they are now placed in a "set" database). + * FSetDecide, contributed by Aaron Bohannon, contains a decision + procedure allowing to solve basic set-related goals (for instance, + is a point in a particular set ?). See FSetProperties for examples. + * Functors of properties have been improved, especially the ones about + maps, that now propose some induction principles. Some properties + of fold need less hypothesis. + * More uniformity in implementations of sets and maps: they all use + implicit arguments, and no longer export unnecessary scopes (see + bug #1347) + * Internal parts of the implementations based on AVL have evolved a + lot. The main files FSetAVL and FMapAVL are now much more + lightweight now. In particular, minor changes in some functions + has allowed to fully separate the proofs of operational + correctness from the proofs of well-balancing: well-balancing is + critical for efficiency, but not anymore for proving that these + trees implement our interfaces, hence we have moved these proofs + into appendix files FSetFullAVL and FMapFullAVL. Moreover, a few + functions like union and compare have been modified in order to be + structural yet efficient. The appendix files also contains + alternative versions of these few functions, much closer to the + initial Ocaml code and written via the Function framework. +- Library IntMap, subsumed by FSets/FMaps, has been removed from + Coq Standard Library and moved into a user contribution Cachan/IntMap +- Better computational behavior of some constants (eq_nat_dec and + le_lt_dec more efficient, Z_lt_le_dec and Positive_as_OT.compare + transparent, ...) (exceptional source of incompatibilities). +- Boolean operators moved from module Bool to module Datatypes (may need + to rename qualified references in script and force notations || and && + to be at levels 50 and 40 respectively). +- The constructors xI and xO of type positive now have postfix notations + "~1" and "~0", allowing to write numbers in binary form easily, for instance + 6 is 1~1~0 and 4*p is p~0~0 (see BinPos.v). +- Improvements to NArith (Nminus, Nmin, Nmax), and to QArith (in particular + a better power function). +- Changes in ZArith: several additional lemmas (used in theories/Numbers), + especially in Zdiv, Znumtheory, Zpower. Moreover, many results in + Zdiv have been generalized: the divisor may simply be non-null + instead of strictly positive (see lemmas with name ending by + "_full"). An alternative file ZOdiv proposes a different behavior + (the one of Ocaml) when dividing by negative numbers. +- Changes in Arith: EqNat and Wf_nat now exported from Arith, some + constructions on nat that were outside Arith are now in (e.g. iter_nat). +- In SetoidList, eqlistA now expresses that two lists have similar elements + at the same position, while the predicate previously called eqlistA + is now equivlistA (this one only states that the lists contain the same + elements, nothing more). +- Changes in Reals: + * Most statement in "sigT" (including the + completeness axiom) are now in "sig" (in case of incompatibility, + use proj1_sig instead of projT1, sig instead of sigT, etc). + * More uniform naming scheme (identifiers in French moved to English, + consistent use of 0 -- zero -- instead of O -- letter O --, etc). + * Lemma on prod_f_SO is now on prod_f_R0. + * Useless hypothesis of ln_exists1 dropped. + * New Rlogic.v states a few logical properties about R axioms. + * RIneq.v extended and made cleaner. +- Slight restructuration of the Logic library regarding choice and classical + logic. Addition of files providing intuitionistic axiomatizations of + descriptions: Epsilon.v, Description.v and IndefiniteDescription.v. +- Definition of pred and minus made compatible with the structural + decreasing criterion for use in fixpoints. + +Notations, coercions, implicit arguments and type inference + +- More automation in the inference of the return clause of dependent + pattern-matching problems. +- Experimental allowance for omission of the clauses easily detectable as + impossible in pattern-matching problems. +- Improved inference of implicit arguments. +- New options "Set Maximal Implicit Insertion", "Set Reversible Pattern + Implicit", "Set Strongly Strict Implicit" and "Set Printing Implicit + Defensive" for controlling inference and use of implicit arguments. +- New modifier in "Implicit Arguments" to force an implicit argument to + be maximally inserted. +- New modifier of "Implicit Arguments" to enrich the set of implicit arguments. + (DOC TODO?) +- New options Global and Local to "Implicit Arguments" for section + surviving or non export outside module. +- Level "constr" moved from 9 to 8. (DOC TODO?) +- Structure/Record now printed as Record (unless option Printing All is set). +- Support for parametric notations defining constants. +- Insertion of coercions below product types refrains to unfold + constants (possible source of incompatibility). +- New support for fix/cofix in notations. + +Tactic Language + +- Second-order pattern-matching now working in Ltac "match" clauses + (syntax for second-order unification variable is "@?X"). +- Ltac accepts integer arguments (syntax is "ltac:nnn" for nnn an integer). +- The general sequence tactical "expr_0 ; [ expr_1 | ... | expr_n ]" + is extended so that at most one expr_i may have the form "expr .." + or just "..". Also, n can be different from the number of subgoals + generated by expr_0. In this case, the value of expr (or idtac in + case of just "..") is applied to the intermediate subgoals to make + the number of tactics equal to the number of subgoals. (DOC TODO) +- A name used as the name of the parameter of a lemma (like f in + "apply f_equal with (f:=t)") is now interpreted as a ltac variable + if such a variable exists (this is a possible source of + incompatibility and it can be fixed by renaming the variables of a + ltac function into names that do not clash with the lemmas + parameter names used in the tactic). +- New syntax "Ltac tac ::= ..." to rebind a tactic to a new expression. +- "let rec ... in ... " now supported for expressions without explicit + parameters; interpretation is lazy to the contrary of "let ... in ..."; + hence, the "rec" keyword can be used to turn the argument of a + "let ... in ..." into a lazy one. +- Patterns for hypotheses types in "match goal" are now interpreted in + type_scope. -Bug fixes +Tactics -- Many bugs have been fixed (cf coq-bugs web page) +- New tactics "apply -> term", "apply <- term", "apply -> term in + ident", "apply <- term in ident" for applying equivalences (iff). (DOC TODO) +- Slight improvement of the hnf and simpl tactics when applied on + expressions with explicit occurrences of match or fix. +- New tactics "eapply in", "erewrite", "erewrite in". +- New tactics "ediscriminate", "einjection", "esimplify_eq". +- Tactics "discriminate", "injection", "simplify_eq" now support any + term as argument. Clause "with" is also supported. +- Unfoldable references can be given by notation's string rather than by name + in unfold. +- The "with" arguments are now typed using informations from the current goal: + allows support for coercions and more inference of implicit arguments. +- Application of "f_equal"-style lemmas works better. +- Tactics elim, case, destruct and induction now support variants eelim, + ecase, edestruct and einduction. +- Tactics destruct and induction now support the "with" option and the + "in" clause option. If the option "in" is used, an equality is added + to remember the term to which the induction or case analysis applied + (possible source of parsing incompatibilities when destruct or induction is + part of a let-in expression in Ltac; extra parentheses are then required). +- Some new intro patterns: + * intro pattern "?A" genererates a fresh name based on A. + Caveat about a slight loss of compatibility: + Some intro patterns don't need space between them. In particular + intros ?a?b used to be legal and equivalent to intros ? a ? b. Now it + is still legal but equivalent to intros ?a ?b. + * intro pattern "(A & ... & Y & Z)" synonym to "(A,....,(Y,Z)))))" + for right-associative constructs like /\ or exists. +- Several syntax extensions concerning "rewrite": (DOC TODO) + * "rewrite A,B,C" can be used to rewrite A, then B, then C. These rewrites + occur only on the first subgoal: in particular, side-conditions of the + "rewrite A" are not concerned by the "rewrite B,C". + * "rewrite A by tac" allows to apply tac on all side-conditions generated by + the "rewrite A". + * "rewrite A at n" allows to select occurrences to rewrite: rewrite only + happen at the n-th exact occurrence of the first successful matching of + A in the goal. + * "rewrite 3 A" or "rewrite 3!A" is equivalent to "rewrite A,A,A". + * "rewrite !A" means rewriting A as long as possible (and at least once). + * "rewrite 3?A" means rewriting A at most three times. + * "rewrite ?A" means rewriting A as long as possible (possibly never). + * many of the above extensions can be combined with each other. +- New syntax "rename a into b, c into d" for "rename a into b; rename c into d" +- New tactics "dependent induction/destruction H [ generalizing id_1 .. id_n ]" + to do induction-inversion on instantiated inductive families à la BasicElim. +- Tactic "apply" now able to reason modulo unfolding of constants + (possible source of incompatibility in situations where apply may fail, + e.g. as argument of a try or a repeat and in a ltac function); + version of apply that does not unfold is renamed into "simple apply" + (usable for compatibility or for automation). +- Tactic "apply" now able to traverse conjunctions and to select the first + matching lemma among the components of the conjunction; tactic apply also + able to apply lemmas of conclusion an empty type. +- Tactics "set" and "pose" can set functions using notation "(f x1..xn := c)". +- New tactic "instantiate" (without argument). +- Tactic firstorder "with" and "using" options have their meaning swapped for + consistency with auto/eauto (source of incompatibility). +- Tactic "generalize" now supports "at" options to specify occurrences + and "as" options to name the hypothesis. +- New tactic "specialize H with a" or "specialize (H a)" allows to transform + in-place a universally-quantified hypothesis (H : forall x, T x) into its + instantiated form (H : T a). Nota: "specialize" was in fact there in earlier + versions of Coq, but was undocumented, and had a slightly different behavior. +- New tactic "contradict H" can be used to solve any kind of goal as long as + the user can provide afterwards a proof of the negation of the hypothesis H. + If H is already a negation, say ~T, then a proof of T is asked. + If the current goal is a negation, say ~U, then U is saved in H afterwards, + hence this new tactic "contradict" extends earlier tactic "swap", which is + now obsolete. +- Tactics f_equal is now done in ML instead of Ltac: it now works on any + equality of functions, regardless of the arity of the function. +- Some more debug of reflexive omega (romega), and internal clarifications. + Moreover, romega now has a variant "romega with *" that can be also used + on non-Z goals (nat, N, positive) via a call to a translation tactic named + zify (its purpose is to Z-ify your goal...). This zify may also be used + independantly of romega. +- Tactic "remember" now supports an "in" clause to remember only selected + occurrences of a term. + +Program + +- Moved useful tactics in theories/Program and documented them. +- Add Program.Basics which contains standard definitions for functional + programming (id, apply, flip...) +- More robust obligation handling, dependent pattern-matching and + well-founded definitions. +- New syntax " dest term as pat in term " for destructing objects using + an irrefutable pattern while keeping equalities (use this instead of + "let" in Programs). +- Program CoFixpoint is accepted, Program Fixpoint uses the new way to infer + which argument decreases structurally. +- Program Lemma, Axiom etc... now permit to have obligations in the statement + iff they can be automatically solved by the default tactic. +- New command "Preterm [ of id ]" to see the actual term fed to Coq for + debugging purposes. +- New option "Transparent Obligations" to control the declaration of + obligations as transparent or opaque. All obligations are now transparent + by default, otherwise the system declares them opaque if possible. +- Changed the notations "left" and "right" to "in_left" and "in_right" to hide + the proofs in standard disjunctions, to avoid breaking existing scripts when + importing Program. Also, put them in program_scope. + +Type Classes + +- New "Class", "Instance" and "Program Instance" commands to define + classes and instances documented in the reference manual. +- New binding construct " [ Class_1 param_1 .. param_n, Class_2 ... ] " + for binding type classes, usable everywhere. +- New command " Print Classes " and " Print Instances some_class " to + print tables for typeclasses. +- New default eauto hint database "typeclass_instances" used by the default + typeclass instance search tactic. +- New theories directory "theories/Classes" for standard typeclasses + declarations. Module Classes.RelationClasses is a typeclass port of + Relation_Definitions plus a generic development of algebra on + n-ary heterogeneous predicates. + +Setoid rewriting + +- Complete (and still experimental) rewrite of the tactic + based on typeclasses. The old interface and semantics are + almost entirely respected, except: + + - Import Setoid is now mandatory to be able to call setoid_replace + and declare morphisms. + + - "-->", "++>" and "==>" are now right associative notations + declared at level 55 in scope signature_scope. + Their introduction may break existing scripts that defined + them as notations with different levels. + + - One needs to use [Typeclasses unfold [cst]] if [cst] is used + as an abbreviation hiding products in types of morphisms, + e.g. if ones redefines [relation] and declares morphisms + whose type mentions [relation]. + + - The [setoid_rewrite]'s semantics change when rewriting with + a lemma: it can rewrite two different instantiations of the lemma + at once. Use [setoid_rewrite H at 1] for (almost) the usual semantics. + [setoid_rewrite] will also try to rewrite under binders now, and can + succeed on different terms than before. In particular, it will unify under + let-bound variables. When called through [rewrite], the semantics are + unchanged though. + + - [Add Morphism term : id] has different semantics when used with + parametric morphism: it will try to find a relation on the parameters + too. The behavior has also changed with respect to default relations: + the most recently declared Setoid/Relation will be used, the documentation + explains how to customize this behavior. + + - Parametric Relation and Morphism are declared differently, using the + new [Add Parametric] commands, documented in the manual. + + - Setoid_Theory is now an alias to Equivalence, scripts building objects + of type Setoid_Theory need to unfold (or "red") the definitions + of Reflexive, Symmetric and Transitive in order to get the same goals + as before. Scripts which introduced variables explicitely will not break. + + - The order of subgoals when doing [setoid_rewrite] with side-conditions + is always the same: first the new goal, then the conditions. + +- New standard library modules Classes.Morphisms declares + standard morphisms on refl/sym/trans relations. + Classes.Morphisms_Prop declares morphisms on propositional + connectives and Classes.Morphisms_Relations on generalized predicate + connectives. Classes.Equivalence declares notations and tactics + related to equivalences and Classes.SetoidTactics defines the + setoid_replace tactics and some support for the "Add *" interface, + notably the tactic applied automatically before each "Add Morphism" + proof. + +- User-defined subrelations are supported, as well as higher-order morphisms + and rewriting under binders. The tactic is also extensible entirely in Ltac. + The documentation has been updated to cover these features. + +- [setoid_rewrite] and [rewrite] now support the [at] modifier to select + occurrences to rewrite, and both use the [setoid_rewrite] code, even when + rewriting with leibniz equality if occurrences are specified. -Changes from V8.1 to V8.1pl1 -============================ +Extraction -Bug fixes +- Improved behavior of the Caml extraction of modules: name clashes should + not happen anymore. +- The command Extract Inductive has now a syntax for infix notations. This + allows in particular to map Coq lists and pairs onto Caml ones: + Extract Inductive list => list [ "[]" "(::)" ]. + Extract Inductive prod => "(*)" [ "(,)" ]. +- In pattern matchings, a default pattern "| _ -> ..." is now used whenever + possible if several branches are identical. For instance, functions + corresponding to decidability of equalities are now linear instead of + quadratic. + +CoqIDE + +- CoqIDE font defaults to monospace so as indentation to be meaningful. +- CoqIDE supports nested goals and any other kind of declaration in the middle + of a proof. +- Undoing non-tactic commands in CoqIDE works faster. +- New CoqIDE menu for activating display of various implicit informations. +- Added the possibility to choose the location of tabs in coqide: + (in Edit->Preferences->Misc) +- New Open and Save As dialogs in CoqIDE which filter *.v files. -- Many bugs have been fixed (cf coq-bugs web page) +Tools -Tactics - -- All known failures of ROmega have been fixed. It should now be a - faithful and quicker replacement for Omega (except when nat parts - are involved). ROmega and Omega now handle <->. +- New stand-alone .vo files verifier "coqchk". -Libraries +Miscellaneous -- Better computational behavior of some constants (eq_nat_dec and - le_lt_dec more efficient, Z_lt_le_dec and Positive_as_OT.compare - transparent) [exceptionally source of incompatibilities]. -- Loading FSets/FMap used to open unwanted scopes of integer datatypes - (see bug #1347). These scopes may need to be manually opened now. +- Coq installation provides enough files so that Ocaml's extensions need not + the Coq sources to be compiled (this assumes O'Caml 3.10 and Camlp5). +- New commands "Set Whelp Server" and "Set Whelp Getter" to customize the + Whelp search tool. +- Syntax of "Test Printing Let ref" and "Test Printing If ref" changed into + "Test Printing Let for ref" and "Test Printing If for ref". +- An overhauled build system (new Makefiles); see dev/doc/build-system.txt Changes from V8.1gamma to V8.1 ============================== @@ -71,7 +448,7 @@ Syntax Language and commands -- Added sort-polymorphism for definitions in Type. +- Added sort-polymorphism for definitions in Type (but finally abandonned). - Support for implicit arguments in the types of parameters in (co-)fixpoints and (co-)inductive declarations. - Improved type inference: use as much of possible general information. @@ -137,7 +514,7 @@ Vernacular commands Ltac and tactic syntactic extensions -- New primitive "external" for communication with tool external to Coq. +- New primitive "external" for communication with tool external to Coq - New semantics for "match t with": if a clause returns a tactic, it is now applied to the current goal. If it fails, the next clause or next matching subterm is tried (i.e. it behaves as "match @@ -188,6 +565,13 @@ Tactics - Tactic "assert" now accepts "as" intro patterns and "by" tactic clauses. - New tactic "pose proof" that generalizes "assert (id:=p)" with intro patterns. - New introduction pattern "?" for letting Coq choose a name. +- Introduction patterns now support side hypotheses (e.g. intros [|] on + "(nat -> nat) -> nat" works). +- New introduction patterns "->" and "<-" for immediate rewriting of + introduced hypotheses. +- Introduction patterns coming after non trivial introduction patterns now + force full introduction of the first pattern (e.g. "intros [[|] p]" on + "nat->nat->nat" now behaves like "intros [[|?] p]") - Added "eassumption". - Added option 'using lemmas' to auto, trivial and eauto. - Tactic "congruence" is now complete for its intended scope (ground @@ -230,7 +614,7 @@ Modules "Module Type M(Export/Import X Y: T)" (only for interactive definitions) - Construct "with" generalized to module paths: - T with (Definition|Module) M1.M2....Mn.l := l' (doc TODO). + T with (Definition|Module) M1.M2....Mn.l := l'. Notations @@ -256,7 +640,8 @@ Libraries digit 0; weaken premises in Z_lt_induction). - Restructuration of Eqdep_dec.v and Eqdep.v: more lemmas in Type. - Znumtheory now contains a gcd function that can compute within Coq. -- More lemmas stated on Type in Wf.v, removal of redundant Fix_F. +- More lemmas stated on Type in Wf.v, removal of redundant Acc_iter and + Acc_iter2. - Change of the internal names of lemmas in OmegaLemmas. - Acc in Wf.v and clos_refl_trans in Relation_Operators.v now rely on the allowance for recursively non uniform parameters (possible diff --git a/COMPATIBILITY b/COMPATIBILITY index b5d94d58..b44f344d 100644 --- a/COMPATIBILITY +++ b/COMPATIBILITY @@ -1,58 +1,62 @@ -Potential sources of incompatibilities between Coq V8.0 and V8.1 +Potential sources of incompatibilities between Coq V8.1 and V8.2 ---------------------------------------------------------------- (see also file CHANGES) -Language +Tactics -- Inductive types in Type are now polymorphic over their parameters in - Type. This may affect the naming of introduction hypotheses if such - an inductive type in Type is used on small types such as Prop or - Set: the hypothesis names suffix will default to H instead of X. As - a matter of fact, it is recommended to systematically name the - hypotheses that are later refered to in the proof script. +- The apply tactic now unfolds the constants if needed to succeed. As + a consequence, use of "try apply" or "repeat apply" or "apply" in + other Ltac potentially backtracking code may behave differently. Use + "simple apply" instead. + +- Add Relation and Add Morphism on polymorphic relations should now be + declared with Add Parametric Relation and Add Parametric Morphism. + +- The default relation chosen by setoid_replace may differ. The + workaround is to enforce the choice of the setoid relation with the + "using relation ..." option. + +- The ordering of subgoals generated by setoid_rewrite and + setoid_replace tactics has been changed. Some reordering in the + proof script may be necessary. You may also use the 'by ...' option + of setoid_replace and setoid_rewrite. + +- The definition of Setoid_Theory has changed. When using the + constructors of the structure, you need to unfold the definitions + Reflexive, Symmetric, and Transitive. + +- The names of bound variables of theorems generated by Add Morphism + differs, which may cause some problems with scripts that do not name + variable when perform introductions. Changing intros to the + appropriate intro x x0 ... xn should fix the problem. + +- Tactic firstorder "with" and "using" options have their meaning + swapped for consistency with auto/eauto. The solution is to swap + the use of these options in call to firstorder. + +- Introduction patterns are more strict. In "intros [ ... | ... | ... ] H", + the names in the brackets are synchronized so that H denotes the same + hypothesis in every subgoal. + +- Some bug fixes may lead to incompatibilities (see CHANGES for a detailed + account). -Tactics +Language -- Some bug fixes may lead to incompatibilities. This is e.g. the case - of inversion on Type which failed to rewrite some hypotheses as it - did on Prop/Set. - -- Add Morphism for the Prop/iff setoid now requires a proof of - biimplication instead of a proof of implication. - -- The order of arguments in compatibility morphisms changed: the - premises and the parameters are now interleaved while the whole - bunch of parameters used to come first. - -- The previous implementation of the ring and field tactics are - maintained but their name changed : require modules "LegacyRing" or - "LegacyField" and globally replace calls to "ring" and "field" by - calls to "legacy ring" and "legacy field". - -- Users ready to benefit of the power of the new implemetations have - to know that - - - most of the time, ring solves goals similarly and often faster; - - if not, it may be because the old ring did some automatic unfold; - they now have to be done separately (by hand or using ltac); - - most of the time, field solvesp goals similarly but much faster but - there are usually less side conditions to prove; - - to simplify expressions, use now ring_simplify and field_simplify; - - simplifications are most of the time different: the new results are - more natural but they may require some adaptation of proof scripts; - - the Ring library no longer imports the Bool library (you may have - to explicitly request a "Require Import Bool"); - - to declare new rings and fields, see the documentation. +- Constants hidding polymorphic inductive types are now polymorphic + themselves. This may exceptionally affect the naming of + introduction hypotheses if such an inductive type in Type is used on + small types such as Prop or Set: the hypothesis names suffix will + default to H instead of X. Libraries -- A few changes in the library (as mentioned in the CHANGES file) may - imply the need for local adaptations. - -- Occurrence numbering order for unfold, pattern, etc changed for the - match construction: occurrences in the return clause now come after - the occurrences in the term matched; this was the opposite before. +- Some changes in the library (as mentioned in the CHANGES file) may + imply the need for local adaptations. This may particularly be the + case with the move from Set to Type in libraries FSets, SetoidList, + ListSet, Sorting and Zmisc. In case of trouble it may help to simply + declare Set as an alias for Type (see file SetIsType). -For changes in the ML interfaces, see file dev/doc/changes.txt in the -main archive. +For the main changes in the ML interfaces, see file +dev/doc/changes.txt in the main archive. diff --git a/COPYRIGHT b/COPYRIGHT index ac7d87df..2cbb6fbc 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -5,6 +5,13 @@ University Paris Sud. Copyright 1999-2004 The Coq development team, INRIA-CNRS, University Paris Sud, All rights reserved. +This version contains modifications by Lionel Elie Mamane + done while under employment of the Radboud +University Nijmegen. However, no copyright-assignment-to-employer +agreement was signed, and copyright of articles and books written on +work time rest with the employee. By analogy, it is Lionel's opinion +that copyright on these changes rests with him. + This product includes also software developed by Yves Bertot, Lemme, INRIA Sophia-Antipolis (contrib/interface, parsing/search.ml) diff --git a/CREDITS b/CREDITS index 93e35164..b3d563ca 100644 --- a/CREDITS +++ b/CREDITS @@ -1,6 +1,6 @@ The "Coq proof assistant" was jointly developed by -- INRIA Formel, Coq, LogiCal, ProVal projects (since 1985), +- INRIA Formel, Coq, LogiCal, ProVal, TypiCal projects (since 1985), - Laboratoire de l'Informatique du Parallelisme (LIP) associated to CNRS and ENS Lyon (Sep. 1989 to Aug. 1997), - Laboratoire de Recherche en Informatique (LRI) @@ -14,7 +14,7 @@ All files of the "Coq proof assistant" in directories or sub-directories of scripts states tactics test-suite theories tools toplevel are distributed under the terms of the GNU Lesser General Public License -Version 2.1 (see file LICENSE). These files are COPYRIGHT 1999-2006, +Version 2.1 (see file LICENSE). These files are COPYRIGHT 1999-2008, The Coq development team, CNRS, INRIA and Université Paris Sud. Files from the directory doc are distributed as indicated in file doc/LICENCE. @@ -24,26 +24,30 @@ by the Coq development team. All of them are released under the terms of the GNU Lesser General Public License Version 2.1. contrib/cc - developed by Pierre Corbineau (ENS Cachan, 2001 and LRI, 2001-2005) + developed by Pierre Corbineau (ENS Cachan, 2001, LRI, 2001-2005, Radboud + University at Nijmegen, 2005-2008) contrib/correctness developed by Jean-Christophe Filliâtre (LRI, 1999-2001) contrib/dp - developed by Nicolas Ayache and Jean-Christophe Filliâtre (LRI, 2005-2007) + developed by Nicolas Ayache (LRI, 2005-2006) and Jean-Christophe Filliâtre + (LRI, 2005-2008) contrib/extraction - developed by Pierre Letouzey (LRI, 2000-2007) + developed by Pierre Letouzey (LRI, 2000-2004, PPS-Paris7, 2005-now) contrib/field developed by David Delahaye and Micaela Mayero (INRIA-LogiCal, 2001) -contrib/first-order - developed by Pierre Corbineau (LRI, 2003-2005) +contrib/firstorder + developed by Pierre Corbineau (LRI, 2003-2008) contrib/fourier developed by Loïc Pottier (INRIA-Lemme, 2001) contrib/funind - developed by Pierre Courtieu (INRIA-Lemme, 2003-2004, CNAM, 2004-2007), - Julien Forest (INRIA-Everest, 2006-2007) - and Yves Bertot (INRIA-Marelle, 2005-2006). + developed by Pierre Courtieu (INRIA-Lemme, 2003-2004, CNAM, 2004-2008), + Julien Forest (INRIA-Everest, 2006, CNAM, 2007-2008) + and Yves Bertot (INRIA-Marelle, 2005-2006) contrib/interface developed by Yves Bertot with contributions from Loïc Pottier and - Laurence Rideau as part of the Pcoq project (INRIA-Lemme, 1997-2006) + Laurence Rideau as part of the Pcoq project (INRIA-Lemme, 1997-2006); + extended by Lionel Mamane as part of the TeXMacs project (Radboud university + at Nijmegen, 2007-2008) contrib/omega developed by Pierre Crégut (France Telecom R&D, 1996) contrib/recdef @@ -56,15 +60,20 @@ contrib/romega contrib/rtauto developed by Pierre Corbineau (LRI, 2005) contrib/setoid_ring - developed by Benjamin Grégoire (INRIA-Everest, 2005-2007), - Assia Mahboubi, Laurent Théry (INRIA-Marelle, 2007) - and Bruno Barras (INRIA LogiCal, 2005-2007), + developed by Benjamin Grégoire (INRIA-Everest, 2005-2006), + Assia Mahboubi, Laurent Théry (INRIA-Marelle, 2006) + and Bruno Barras (INRIA LogiCal, 2005-2006), contrib/subtac - developed by Matthieu Sozeau (LRI, 2005-2007) + developed by Matthieu Sozeau (LRI, 2005-2008) contrib/xml developed by Claudio Sacerdoti (Univ. Bologna, 2000-2005) - as part of the HELM and MoWGLI projects - + as part of the HELM and MoWGLI projects; extension by Cezary Kaliszyk as + part of the ProofWeb project (Radbout University at Nijmegen, 2008) +contrib/micromega + developed by Frédéric Besson (IRISA/INRIA, 2006-2008), with some + extensions by Evgeny Makarov (INRIA, 2007); sum-of-squares solver and + interface to the csdp solver uses code from John Harrison (University + of Cambridge, 1998) parsing/search.ml mainly developed by Yves Bertot (INRIA-Lemme, 2000-2004) theories/ZArith @@ -84,11 +93,12 @@ influenced significantly the design of Coq especially with Intensive users suggested improvements of the system : - Y. Bertot, L. Pottier, L. Théry (INRIA-Lemme projects), + Y. Bertot, L. Pottier, L. Théry (INRIA-Lemme/Marelle projects), C. Alvarado, P. Crégut, J.-F. Monin (France Telecom R&D), P. Castéran (University Bordeaux 1), The Foundations Group (Radboud University, Nijmegen, The Netherlands), - Laboratoire J.-A. Dieudonné (University of Nice-Sophia Antipolis). + Laboratoire J.-A. Dieudonné (University of Nice-Sophia Antipolis), + G. Gonthier (INRIA-MSR joint lab), A. Charguéraud (INRIA-Gallium project). The following people have contributed to the development of different versions of the Coq Proof assistant during the indicated time : @@ -109,10 +119,11 @@ of the Coq Proof assistant during the indicated time : Benjamin Grégoire (INRIA, 2003-now) Hugo Herbelin (INRIA, 1996-now) Gérard Huet (INRIA, 1985-1997) - Pierre Letouzey (LRI, 2000-2005 & PPS-Paris 7, 2005-now) + Pierre Letouzey (LRI, 2000-2004 & PPS-Paris 7, 2005-now) + Evgeny Makarov (INRIA, 2007) Pascal Manoury (INRIA, 1993) Micaela Mayero (INRIA, 1997-2002) - Claude Marché (INRIA 2003-2004 & LRI, 2004-2005) + Claude Marché (INRIA 2003-2004 & LRI, 2004-now) Benjamin Monate (LRI, 2003) César Muñoz (INRIA, 1994-1995) Chetan Murthy (INRIA, 1992-1994) @@ -124,6 +135,8 @@ of the Coq Proof assistant during the indicated time : LRI, 1997-now) Clément Renard (INRIA, 2001-2004) Claudio Sacerdoti Coen (INRIA, 2004-2005) + Matthieu Sozeau (INRIA, 2005-now) + Arnaud Spiwack (INRIA, 2006-now) Amokrane Saïbi (INRIA, 1993-1998) Benjamin Werner (INRIA, 1989-1994) diff --git a/INSTALL b/INSTALL index 8658fb0e..68cd2faf 100644 --- a/INSTALL +++ b/INSTALL @@ -1,5 +1,5 @@ - INSTALLATION PROCEDURES FOR THE COQ V8.1 SYSTEM + INSTALLATION PROCEDURES FOR THE COQ V8.2 SYSTEM ----------------------------------------------- WHAT DO YOU NEED ? @@ -30,23 +30,47 @@ WHAT DO YOU NEED ? aptitude install coq - - Gentoo GNU/Linux: emerge sci-mathematics/coq + - Gentoo GNU/Linux: + emerge sci-mathematics/coq - Should you need or prefer to compile Coq V8.1 yourself, you need: + - Mandriva GNU/Linux: + + urpmi coq + + Should you need or prefer to compile Coq V8.2 yourself, you need: - Objective Caml version 3.07 or later (available at http://caml.inria.fr/) For Ocaml version >= 3.10.0, you also need to install camlp5 - version <= 4.08, or 5.01 transitional - (see http://pauillac.inria.fr/~ddr/camlp5/) - - - GNU Make + (version <= 4.08, or >= 5.01 transitional) + + + - GNU Make version 3.81 or later + ( + available at http://www.gnu.org/software/make/, but also a + standard or optional add-on part to most Unices and Unix + clones, sometimes under the name "gmake". + + If a new enough version is not included in your system, nor + easily available as an add-on, this should get you a working + make: + + #Download it (wget is an example, use your favourite FTP or HTTP client) + wget http://ftp.gnu.org/pub/gnu/make/make-3.81.tar.bz2 + bzip2 -cd make-3.81.tar.bz2 | tar x + #If you don't have bzip2, you can download the gzipped version instead. + cd make-3.81 + ./configure --prefix=${HOME} + make install + + Then, make sure that ${HOME}/bin is first in your $PATH. + ) - a C compiler - - for Coqide, the Lablgtk development files, and the GTK libraries + - for Coqide, the Lablgtk development files, and the GTK libraries, see INSTALL.ide for more details By FTP, Coq comes as a single compressed tar-file. You have probably already decompressed it if you are reading this document. @@ -99,7 +123,8 @@ INSTALLATION PROCEDURE IN DETAILS (NORMAL USERS). the Coq binaries, standard library, man pages, etc. It will propose you some default values. - The "configure" script accepts the following options: + For a list of options accepted by the "configure" script, run + "./configure -help". The main options accepted are: -prefix Binaries, library, man pages and Emacs mode will be respectively @@ -167,7 +192,7 @@ INSTALLATION PROCEDURE FOR ADVANCED USERS. ========================================== If you wish to write tactics (and that really means that you belong - to advanced users !) you *must* keep the Coq sources, without cleaning + to advanced users!) you *must* keep the Coq sources, without cleaning them. Therefore, to avoid a duplication of binaries and library, it is not necessary to do the installation step (6- above). You just have to tell it at configuration step (4- above) with the @@ -218,9 +243,11 @@ THE AVAILABLE COMMANDS. command "Require". A detailed description of these commands and of their options is given - in the Reference Manual (which you can get by FTP, in the doc/ directory) + in the Reference Manual (which you can get by FTP, in the doc/ + directory, or read online on http://coq.inria.fr/doc/) and in the corresponding manual pages. + There is also a tutorial and a FAQ; see http://coq.inria.fr/doc1-eng.html COMMON PROBLEMS. ================ diff --git a/INSTALL.ide b/INSTALL.ide index 365f59ee..fbb484fd 100644 --- a/INSTALL.ide +++ b/INSTALL.ide @@ -2,9 +2,9 @@ CoqIde is a graphical interface to perform interactive proofs. You should be able to do everything you do in coqtop inside CoqIde -excepted dropping to the ml toplevel. +excepted dropping to the ML toplevel. -DISCLAIMER: CoqIde is ongoing work. Eventhough it should never let you +DISCLAIMER: CoqIde is ongoing work. Although it should never let you loose a proof, you may encounter unexpected bugs. Do not hesitate to send suggestions/bug reports. @@ -23,51 +23,58 @@ On Gentoo GNU/Linux, do: Else, read the rest of this document to compile your own CoqIde. REQUIREMENT: - - OCaml >= 3.07 with native thread support. + - OCaml >= 3.07 with native threads support. - make world must succeed. - - The graphical toolkit Gtk 2.x. See http://www.gtk.org. + - The graphical toolkit GTK+ 2.x. See http://www.gtk.org. The official supported version is at least 2.8.x. You may still compile CoqIde with older versions and use all features. Run "pkg-config --modversion gtk+-2.0" to check your version. - All recent distributions have precompiled packages. - Do not forget to install the development headers packages. - As for Debian or Ubuntu, - apt-get install libgtk2.0-dev - should be enough. + All recent distributions have precompiled packages. + Do not forget to install the developement headers packages. - - The OCaml bindings for for GTK+ 2.x, lablgtk2. + On Debian, installing lablgtk2 (see below) will automatically + install GTK+. (But "aptitude install libgtk2.0-dev" will + install GTK+ 2.x should you need to force it for one reason + or another.) + + - The OCaml bindings for GTK+ 2.x, lablgtk2. + + You need at least version 2.10.0. Your distribution may contain precompiled packages. For example, for Debian, run aptitude install liblablgtk2-ocaml-dev + for Mandriva, run + urpmi ocaml-lablgtk2-devel If it does not, see http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgtk.html . - The latest official release of lablftk2 is here: - http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/lablgtk-2.10.0.tar.gz + One official releases of lablgtk2 is here: + http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/dist/lablgtk-2.10.1.tar.gz Note that even if its README requires ocaml > 3.07, it works ok with 3.07. If you are in a hurry just run : cd /tmp && \ wget \ - http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/lablgtk-2.10.0.tar.gz && \ - tar zxvf lablgtk-2.10.0.tar.gz && \ - cd lablgtk-2.10.0 && \ + http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/lablgtk-2.10.1.tar.gz && \ + tar zxvf lablgtk-2.10.1.tar.gz && \ + cd lablgtk-2.10.1 && \ ./configure && \ make world && \ make install You must have write access to the OCaml standard library path. - If this fails, read lablgtk-2.10.0/README. + If this fails, read lablgtk-2.10.1/README. + INSTALLATION -0) For optimal performance, OCaml must support native threads (aka pthreads). + 0) For optimal performance, OCaml must support native threads (aka pthreads). If this not the case, this means that Coq computations will be slow and "make ide" will fail. Use "make bin/coqide.byte" instead. To fix this problem, just recompile OCaml from source and configure OCaml with : @@ -75,23 +82,26 @@ INSTALLATION In case you install over an existing copy of OCaml, you should better empty the OCaml installation directory. -1) Go into your Coq source directory and, as usual, configure with: + 1) Go into your Coq source directory and, as usual, configure with: ./configure - This should detect the ability of making CoqIde. - Then compile with + This should detect the ability of making CoqIde; check that is + says it has detected this ability and activated the building of + CoqIde. + + Then compile with make world - and install with + and install with make install - In case you are upgrading from an old version you may need to run + In case you are upgrading from an old version you may need to run make clean-ide -2) You may now run bin/coqide +3) You may now run bin/coqide NOTES @@ -109,3 +119,17 @@ There are three configuration files located in your $(HOME) dir. to change the default shortcuts for the menus. Read ide/FAQ for more informations. + + +TROUBLESHOOTING + + - Problem with automatic templates + + Some users may experiment problems with unwanted automatic + templates while using Coqide. This is due to a change in the + modifiers keys available through GTK. The straightest way to get + rid of the problem is to edit by hand your .coqiderc (either + /home//.coqiderc under Linux, or + C:\Documents and Settings\\.coqiderc under Windows) + and replace any occurence of MOD4 by MOD1. + diff --git a/INSTALL.macosx b/INSTALL.macosx index 84f32670..121a3e0b 100644 --- a/INSTALL.macosx +++ b/INSTALL.macosx @@ -1,11 +1,15 @@ -INSTALLATION PROCEDURE FOR THE COQ V8.1 SYSTEM UNDER MACOS X ------------------------------------------------------------- +INSTALLATION PROCEDURE FOR THE PRECOMPILED COQ V8.2 SYSTEM UNDER MACOS X +------------------------------------------------------------------------ -1) Download archive coq-8.1-macosx.dmg. +You can also use fink, or the MacOS X package prepared by the Coq +team. To use the MacOS X package,: -2) Double-click on its icon; it mounts a disk volume named "Coq V8.1". +1) Download archive coq-8.2-macosx-ppc.dmg (for PowerPC-base computer) + or coq-8.2-macosx-i386.dmg (for Pentium-based computer). -3) Open volume "Coq 8.1" and double-click on coq-8.1.pkg to launch the +2) Double-click on its icon; it mounts a disk volume named "Coq V8.2". + +3) Open volume "Coq 8.2" and double-click on coq-8.2.pkg to launch the installer (you'll need administrator permissions). 4) Coq installs in /usr/local/bin, which should be in your PATH, and diff --git a/Makefile b/Makefile index b43a0942..0cbc0f1c 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # # GNU Lesser General Public License Version 2.1 # ####################################################################### -# $Id: Makefile 10314 2007-11-12 15:10:25Z notin $ +# $Id: Makefile 11029 2008-06-01 19:39:44Z herbelin $ # Makefile for Coq @@ -24,12 +24,37 @@ # by Emacs' next-error. ########################################################################### -include config/Makefile +FIND_VCS_CLAUSE:='(' -name '{arch}' -or -name '.svn' -or -name '_darcs' -or -name '.git' -or -name "$${GIT_DIR}" ')' -prune -or +FIND_PRINTF_P:=-print | sed 's|^\./||' -.PHONY: NOARG +export YACCFILES:=$(shell find . $(FIND_VCS_CLAUSE) '(' -name '*.mly' ')' $(FIND_PRINTF_P)) +export LEXFILES := $(shell find . $(FIND_VCS_CLAUSE) '(' -name '*.mll' ')' $(FIND_PRINTF_P)) +export GENMLFILES:=$(LEXFILES:.mll=.ml) $(YACCFILES:.mly=.ml) \ + scripts/tolink.ml kernel/copcodes.ml +export GENMLIFILES:=$(YACCFILES:.mly=.mli) +export GENHFILES:=kernel/byterun/coq_jumptbl.h +export GENVFILES:=theories/Numbers/Natural/BigN/NMake.v +export GENFILES:=$(GENMLFILES) $(GENMLIFILES) $(GENHFILES) $(GENVFILES) +export MLFILES := $(shell find . $(FIND_VCS_CLAUSE) '(' -name '*.ml' ')' $(FIND_PRINTF_P) | \ + while read f; do if ! [ -e "$${f}4" ]; then echo "$$f"; fi; done) \ + $(GENMLFILES) +export MLIFILES := $(shell find . $(FIND_VCS_CLAUSE) '(' -name '*.mli' ')' $(FIND_PRINTF_P)) \ + $(GENMLIFILES) +export ML4FILES := $(shell find . $(FIND_VCS_CLAUSE) '(' -name '*.ml4' ')' $(FIND_PRINTF_P)) +#export VFILES := $(shell find . $(FIND_VCS_CLAUSE) '(' -name '*.v' ')' $(FIND_PRINTF_P)) \ +# $(GENVFILES) +export CFILES := $(shell find kernel/byterun -name '*.c') + +export ML4FILESML:= $(ML4FILES:.ml4=.ml) + +include Makefile.common NOARG: world +.PHONY: NOARG help always tags otags + +always: ; + help: @echo "Please use either" @echo " ./configure" @@ -40,1330 +65,156 @@ help: @echo @echo "For make to be verbose, add VERBOSE=1" - -# build and install the three subsystems: coq, coqide, pcoq -world: depend dependcoq - $(MAKE) worldnodep - -worldnodep: revision coq coqide pcoq - -install: install-coq install-coqide install-pcoq -#install-manpages: install-coq-manpages install-pcoq-manpages - -########################################################################### -# Compilation options -########################################################################### - -# The SHOW and HIDE variables control whether make will echo complete commands -# or only abbreviated versions. -# Quiet mode is ON by default except if VERBOSE=1 option is given to make - -ifeq ($(VERBOSE),1) - SHOW = @true "" - HIDE = -else - SHOW = @echo "" - HIDE = @ +ifdef COQ_CONFIGURED +define stage-template + @echo '*****************************************************' + @echo '*****************************************************' + @echo '****************** Entering stage$(1) ******************' + @echo '*****************************************************' + @echo '*****************************************************' + +$(MAKE) -f Makefile.stage$(1) "$@" +endef +else +define stage-template + @echo "Please run ./configure first" >&2; exit 1 +endef endif -LOCALINCLUDES=-I config -I tools -I tools/coqdoc \ - -I scripts -I lib -I kernel -I kernel/byterun -I library \ - -I proofs -I tactics -I pretyping \ - -I interp -I toplevel -I parsing -I ide/utils -I ide \ - -I contrib/omega -I contrib/romega \ - -I contrib/ring -I contrib/dp -I contrib/setoid_ring \ - -I contrib/xml -I contrib/extraction \ - -I contrib/interface -I contrib/fourier \ - -I contrib/jprover -I contrib/cc \ - -I contrib/funind -I contrib/first-order \ - -I contrib/field -I contrib/subtac -I contrib/rtauto \ - -I contrib/recdef - -MLINCLUDES=$(LOCALINCLUDES) -I $(MYCAMLP4LIB) $(COQIDEINCLUDES) - -OCAMLC += $(CAMLFLAGS) -OCAMLOPT += $(CAMLFLAGS) - -BYTEFLAGS=$(MLINCLUDES) $(CAMLDEBUG) $(USERFLAGS) -OPTFLAGS=$(MLINCLUDES) $(CAMLTIMEPROF) $(INLINEFLAG) $(USERFLAGS) -DEPFLAGS= -slash $(LOCALINCLUDES) - -OCAMLC_P4O=$(OCAMLC) -pp $(CAMLP4O) $(BYTEFLAGS) -OCAMLOPT_P4O=$(OCAMLOPT) -pp $(CAMLP4O) $(OPTFLAGS) -CAMLP4EXTENSIONS=-I . pa_extend.cmo pa_extend_m.cmo q_MLast.cmo pa_macro.cmo -CAMLP4OPTIONS=$(CAMLP4COMPAT) -D$(CAMLVERSION) -CAMLP4DEPS=sed -n -e 's|^(\*.*camlp4deps: "\(.*\)".*\*)|\1|p' - -COQINCLUDES= # coqtop includes itself the needed paths -GLOB= # is "-dump-glob file" when making the doc -COQ_XML= # is "-xml" when building XML library -VM= # is "-no-vm" to not use the vm" -UNBOXEDVALUES= # is "-unboxed-values" to use unboxed values -COQOPTS=$(GLOB) $(COQ_XML) $(VM) $(UNBOXEDVALUES) -TIME= # is "'time -p'" to get compilation time of .v - -BOOTCOQTOP= $(TIME) $(BESTCOQTOP) -boot $(COQOPTS) - -########################################################################### -# Objects files -########################################################################### - -LIBCOQRUN=kernel/byterun/libcoqrun.a - -CLIBS=unix.cma - -CAMLP4OBJS=gramlib.cma - -CONFIG=\ - config/coq_config.cmo - -LIBREP=\ - lib/pp_control.cmo lib/pp.cmo lib/compat.cmo lib/util.cmo lib/bigint.cmo \ - lib/hashcons.cmo lib/dyn.cmo lib/system.cmo lib/options.cmo \ - lib/bstack.cmo lib/edit.cmo lib/gset.cmo lib/gmap.cmo \ - lib/tlm.cmo lib/gmapl.cmo lib/profile.cmo lib/explore.cmo \ - lib/predicate.cmo lib/rtree.cmo lib/heap.cmo -# Rem: Cygwin already uses variable LIB - -BYTERUN=\ - kernel/byterun/coq_fix_code.o kernel/byterun/coq_memory.o \ - kernel/byterun/coq_values.o kernel/byterun/coq_interp.o - -KERNEL=\ - kernel/names.cmo kernel/univ.cmo \ - kernel/esubst.cmo kernel/term.cmo kernel/mod_subst.cmo kernel/sign.cmo \ - kernel/cbytecodes.cmo kernel/copcodes.cmo \ - kernel/cemitcodes.cmo kernel/vm.cmo \ - kernel/declarations.cmo kernel/pre_env.cmo \ - kernel/cbytegen.cmo kernel/environ.cmo \ - kernel/csymtable.cmo kernel/conv_oracle.cmo \ - kernel/closure.cmo kernel/reduction.cmo kernel/type_errors.cmo \ - kernel/entries.cmo kernel/modops.cmo \ - kernel/inductive.cmo kernel/vconv.cmo kernel/typeops.cmo \ - kernel/indtypes.cmo kernel/cooking.cmo kernel/term_typing.cmo \ - kernel/subtyping.cmo kernel/mod_typing.cmo kernel/safe_typing.cmo - -LIBRARY=\ - library/nameops.cmo library/libnames.cmo library/libobject.cmo \ - library/summary.cmo library/nametab.cmo library/global.cmo library/lib.cmo \ - library/declaremods.cmo library/library.cmo library/states.cmo \ - library/decl_kinds.cmo library/dischargedhypsmap.cmo library/goptions.cmo - -PRETYPING=\ - pretyping/termops.cmo pretyping/evd.cmo \ - pretyping/reductionops.cmo pretyping/vnorm.cmo pretyping/inductiveops.cmo \ - pretyping/retyping.cmo pretyping/cbv.cmo \ - pretyping/pretype_errors.cmo pretyping/recordops.cmo pretyping/typing.cmo \ - pretyping/tacred.cmo \ - pretyping/evarutil.cmo pretyping/unification.cmo pretyping/evarconv.cmo \ - pretyping/classops.cmo pretyping/coercion.cmo pretyping/clenv.cmo \ - pretyping/rawterm.cmo pretyping/pattern.cmo \ - pretyping/detyping.cmo pretyping/indrec.cmo\ - pretyping/cases.cmo pretyping/pretyping.cmo pretyping/matching.cmo - -INTERP=\ - parsing/lexer.cmo interp/topconstr.cmo interp/ppextend.cmo \ - interp/notation.cmo \ - interp/genarg.cmo interp/syntax_def.cmo interp/reserve.cmo \ - library/impargs.cmo interp/constrintern.cmo \ - interp/modintern.cmo interp/constrextern.cmo interp/coqlib.cmo \ - toplevel/discharge.cmo library/declare.cmo - -PROOFS=\ - proofs/tacexpr.cmo proofs/proof_type.cmo proofs/redexpr.cmo \ - proofs/proof_trees.cmo proofs/logic.cmo \ - proofs/refiner.cmo proofs/evar_refiner.cmo proofs/tacmach.cmo \ - proofs/pfedit.cmo proofs/tactic_debug.cmo \ - proofs/clenvtac.cmo proofs/decl_mode.cmo - -PARSING=\ - parsing/extend.cmo \ - parsing/pcoq.cmo parsing/egrammar.cmo parsing/g_xml.cmo \ - parsing/ppconstr.cmo parsing/printer.cmo \ - parsing/pptactic.cmo parsing/ppdecl_proof.cmo parsing/tactic_printer.cmo \ - parsing/printmod.cmo parsing/prettyp.cmo parsing/search.cmo - -HIGHPARSING=\ - parsing/g_constr.cmo parsing/g_vernac.cmo parsing/g_prim.cmo \ - parsing/g_proofs.cmo parsing/g_tactic.cmo parsing/g_ltac.cmo \ - parsing/g_natsyntax.cmo parsing/g_zsyntax.cmo parsing/g_rsyntax.cmo \ - parsing/g_ascii_syntax.cmo parsing/g_string_syntax.cmo \ - parsing/g_decl_mode.cmo - -TACTICS=\ - tactics/dn.cmo tactics/termdn.cmo tactics/btermdn.cmo \ - tactics/nbtermdn.cmo tactics/tacticals.cmo \ - tactics/hipattern.cmo tactics/tactics.cmo \ - tactics/evar_tactics.cmo \ - tactics/hiddentac.cmo tactics/elim.cmo \ - tactics/dhyp.cmo tactics/auto.cmo \ - tactics/setoid_replace.cmo tactics/equality.cmo \ - tactics/contradiction.cmo tactics/inv.cmo tactics/leminv.cmo \ - tactics/tacinterp.cmo tactics/autorewrite.cmo \ - tactics/decl_interp.cmo tactics/decl_proof_instr.cmo - -TOPLEVEL=\ - toplevel/himsg.cmo toplevel/cerrors.cmo toplevel/class.cmo \ - toplevel/vernacexpr.cmo toplevel/metasyntax.cmo \ - toplevel/command.cmo toplevel/record.cmo \ - parsing/ppvernac.cmo \ - toplevel/vernacinterp.cmo toplevel/mltop.cmo \ - toplevel/vernacentries.cmo toplevel/whelp.cmo toplevel/vernac.cmo \ - toplevel/line_oriented_parser.cmo toplevel/protectedtoplevel.cmo \ - toplevel/toplevel.cmo toplevel/usage.cmo \ - toplevel/coqinit.cmo toplevel/coqtop.cmo - -HIGHTACTICS=\ - tactics/refine.cmo tactics/extraargs.cmo \ - tactics/extratactics.cmo tactics/eauto.cmo - -SPECTAC= tactics/tauto.ml4 tactics/eqdecide.ml4 -USERTAC = $(SPECTAC) -ML4FILES += $(USERTAC) tactics/extraargs.ml4 tactics/extratactics.ml4 \ - tactics/eauto.ml4 toplevel/whelp.ml4 tactics/hipattern.ml4 - -USERTACCMO=$(USERTAC:.ml4=.cmo) -USERTACCMX=$(USERTAC:.ml4=.cmx) - -ML4FILES +=\ - contrib/omega/g_omega.ml4 \ - contrib/romega/g_romega.ml4 contrib/ring/g_quote.ml4 \ - contrib/ring/g_ring.ml4 contrib/dp/g_dp.ml4 \ - contrib/setoid_ring/newring.ml4 \ - contrib/field/field.ml4 contrib/fourier/g_fourier.ml4 \ - contrib/extraction/g_extraction.ml4 contrib/xml/xmlentries.ml4 - -OMEGACMO=\ - contrib/omega/omega.cmo contrib/omega/coq_omega.cmo \ - contrib/omega/g_omega.cmo - -ROMEGACMO=\ - contrib/romega/const_omega.cmo \ - contrib/romega/refl_omega.cmo contrib/romega/g_romega.cmo - -RINGCMO=\ - contrib/ring/quote.cmo contrib/ring/g_quote.cmo \ - contrib/ring/ring.cmo contrib/ring/g_ring.cmo - -NEWRINGCMO=\ - contrib/setoid_ring/newring.cmo - -DPCMO=contrib/dp/dp_why.cmo contrib/dp/dp.cmo contrib/dp/g_dp.cmo - -FIELDCMO=\ - contrib/field/field.cmo - -XMLCMO=\ - contrib/xml/unshare.cmo contrib/xml/xml.cmo contrib/xml/acic.cmo \ - contrib/xml/doubleTypeInference.cmo \ - contrib/xml/cic2acic.cmo contrib/xml/acic2Xml.cmo \ - contrib/xml/proof2aproof.cmo \ - contrib/xml/xmlcommand.cmo contrib/xml/proofTree2Xml.cmo \ - contrib/xml/xmlentries.cmo contrib/xml/cic2Xml.cmo - -FOURIERCMO=\ - contrib/fourier/fourier.cmo contrib/fourier/fourierR.cmo \ - contrib/fourier/g_fourier.cmo - -EXTRACTIONCMO=\ - contrib/extraction/table.cmo\ - contrib/extraction/mlutil.cmo\ - contrib/extraction/modutil.cmo \ - contrib/extraction/ocaml.cmo \ - contrib/extraction/haskell.cmo \ - contrib/extraction/scheme.cmo \ - contrib/extraction/extraction.cmo \ - contrib/extraction/common.cmo \ - contrib/extraction/extract_env.cmo \ - contrib/extraction/g_extraction.cmo - -JPROVERCMO=\ - contrib/jprover/opname.cmo \ - contrib/jprover/jterm.cmo contrib/jprover/jlogic.cmo \ - contrib/jprover/jtunify.cmo contrib/jprover/jall.cmo \ - contrib/jprover/jprover.cmo - -FUNINDCMO=\ - contrib/funind/tacinvutils.cmo contrib/funind/tacinv.cmo \ - contrib/funind/indfun_common.cmo contrib/funind/rawtermops.cmo \ - contrib/funind/rawterm_to_relation.cmo \ - contrib/funind/functional_principles_proofs.cmo \ - contrib/funind/functional_principles_types.cmo \ - contrib/funind/invfun.cmo contrib/funind/indfun.cmo \ - contrib/funind/merge.cmo contrib/funind/indfun_main.cmo - -RECDEFCMO=\ - contrib/recdef/recdef.cmo - -FOCMO=\ - contrib/first-order/formula.cmo contrib/first-order/unify.cmo \ - contrib/first-order/sequent.cmo contrib/first-order/rules.cmo \ - contrib/first-order/instances.cmo contrib/first-order/ground.cmo \ - contrib/first-order/g_ground.cmo - -CCCMO=contrib/cc/ccalgo.cmo contrib/cc/ccproof.cmo contrib/cc/cctac.cmo \ - contrib/cc/g_congruence.cmo - -SUBTACCMO=contrib/subtac/subtac_utils.cmo contrib/subtac/eterm.cmo \ - contrib/subtac/g_eterm.cmo \ - contrib/subtac/subtac_errors.cmo contrib/subtac/subtac_coercion.cmo \ - contrib/subtac/subtac_obligations.cmo contrib/subtac/subtac_cases.cmo \ - contrib/subtac/subtac_pretyping_F.cmo contrib/subtac/subtac_pretyping.cmo \ - contrib/subtac/subtac_command.cmo contrib/subtac/subtac.cmo \ - contrib/subtac/g_subtac.cmo - - -RTAUTOCMO=contrib/rtauto/proof_search.cmo contrib/rtauto/refl_tauto.cmo \ - contrib/rtauto/g_rtauto.cmo - -ML4FILES += contrib/jprover/jprover.ml4 contrib/cc/g_congruence.ml4 \ - contrib/funind/tacinv.ml4 contrib/first-order/g_ground.ml4 \ - contrib/subtac/g_subtac.ml4 contrib/subtac/g_eterm.ml4 \ - contrib/rtauto/g_rtauto.ml4 contrib/recdef/recdef.ml4 \ - contrib/funind/indfun_main.ml4 - - -CONTRIB=$(OMEGACMO) $(ROMEGACMO) $(RINGCMO) $(NEWRINGCMO) $(DPCMO) $(FIELDCMO) \ - $(FOURIERCMO) $(EXTRACTIONCMO) $(JPROVERCMO) $(XMLCMO) \ - $(CCCMO) $(FOCMO) $(SUBTACCMO) $(RTAUTOCMO) \ - $(RECDEFCMO) $(FUNINDCMO) - -CMA=$(CLIBS) $(CAMLP4OBJS) -CMXA=$(CMA:.cma=.cmxa) - -# LINK ORDER: -# Beware that highparsing.cma should appear before hightactics.cma -# respecting this order is useful for developers that want to load or link -# the libraries directly -LINKCMO=$(CONFIG) lib/lib.cma kernel/kernel.cma library/library.cma \ - pretyping/pretyping.cma interp/interp.cma proofs/proofs.cma \ - parsing/parsing.cma tactics/tactics.cma toplevel/toplevel.cma \ - parsing/highparsing.cma tactics/hightactics.cma contrib/contrib.cma -LINKCMOCMXA=$(LINKCMO:.cma=.cmxa) -LINKCMX=$(LINKCMOCMXA:.cmo=.cmx) - -# objects known by the toplevel of Coq -OBJSCMO=$(CONFIG) $(LIBREP) $(KERNEL) $(LIBRARY) $(PRETYPING) $(INTERP) \ - $(PROOFS) $(PARSING) $(TACTICS) $(TOPLEVEL) $(HIGHPARSING) \ - $(HIGHTACTICS) $(USERTACMO) $(CONTRIB) - -########################################################################### -# Compilation option for .c files -########################################################################### - -CINCLUDES= -I $(CAMLHLIB) - -# libcoqrun.a - -$(LIBCOQRUN): kernel/byterun/coq_jumptbl.h $(BYTERUN) - $(AR) rc $(LIBCOQRUN) $(BYTERUN) - $(RANLIB) $(LIBCOQRUN) - -#coq_jumptbl.h is required only if you have GCC 2.0 or later -kernel/byterun/coq_jumptbl.h : kernel/byterun/coq_instruct.h - sed -n -e '/^ /s/ \([A-Z]\)/ \&\&coq_lbl_\1/gp' \ - -e '/^}/q' kernel/byterun/coq_instruct.h > \ - kernel/byterun/coq_jumptbl.h - - -kernel/copcodes.ml: kernel/byterun/coq_instruct.h - sed -n -e '/^enum/p' -e 's/,//g' -e '/^ /p' \ - kernel/byterun/coq_instruct.h | \ - awk -f kernel/make-opcodes > kernel/copcodes.ml - -BEFOREDEPEND+= kernel/byterun/coq_jumptbl.h kernel/copcodes.ml - -clean :: - rm -f kernel/byterun/coq_jumptbl.h kernel/copcodes.ml - -########################################################################### -# Main targets (coqmktop, coqtop.opt, coqtop.byte) -########################################################################### - -COQMKTOPBYTE=bin/coqmktop.byte$(EXE) -COQMKTOPOPT=bin/coqmktop.opt$(EXE) -BESTCOQMKTOP=bin/coqmktop.$(BEST)$(EXE) -COQMKTOP=bin/coqmktop$(EXE) -COQCBYTE=bin/coqc.byte$(EXE) -COQCOPT=bin/coqc.opt$(EXE) -BESTCOQC=bin/coqc.$(BEST)$(EXE) -COQC=bin/coqc$(EXE) -COQTOPBYTE=bin/coqtop.byte$(EXE) -COQTOPOPT=bin/coqtop.opt$(EXE) -BESTCOQTOP=bin/coqtop.$(BEST)$(EXE) -COQTOP=bin/coqtop$(EXE) - -COQBINARIES= $(COQMKTOP) $(COQC) $(COQTOPBYTE) $(BESTCOQTOP) $(COQTOP) - -coqbinaries:: ${COQBINARIES} - -coq: coqlib tools coqbinaries - -coqlib:: theories contrib - -coqlight: theories-light tools coqbinaries - -states:: states/initial.coq - -$(COQTOPOPT): $(COQMKTOP) $(LINKCMX) $(LIBCOQRUN) $(USERTACCMX) - $(SHOW)'COQMKTOP -o $@' - $(HIDE)$(COQMKTOP) -opt $(OPTFLAGS) -o $@ - $(STRIP) $@ - -$(COQTOPBYTE): $(COQMKTOP) $(LINKCMO) $(LIBCOQRUN) $(USERTACCMO) - $(SHOW)'COQMKTOP -o $@' - $(HIDE)$(COQMKTOP) -top $(BYTEFLAGS) -o $@ - -$(COQTOP): - cd bin; ln -sf coqtop.$(BEST)$(EXE) coqtop$(EXE) - -# coqmktop - -COQMKTOPCMO=$(CONFIG) scripts/tolink.cmo scripts/coqmktop.cmo -COQMKTOPCMX=config/coq_config.cmx scripts/tolink.cmx scripts/coqmktop.cmx - -$(COQMKTOPBYTE): $(COQMKTOPCMO) - $(SHOW)'OCAMLC -o $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -o $@ str.cma unix.cma \ - $(COQMKTOPCMO) $(OSDEPLIBS) - -$(COQMKTOPOPT): $(COQMKTOPCMX) - $(SHOW)'OCAMLOPT -o $@' - $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -o $@ str.cmxa unix.cmxa \ - $(COQMKTOPCMX) $(OSDEPLIBS) - -$(COQMKTOP): $(BESTCOQMKTOP) - cd bin; ln -sf coqmktop.$(BEST)$(EXE) coqmktop$(EXE) - - -scripts/tolink.ml: Makefile - $(SHOW)"ECHO... >" $@ - $(HIDE)echo "let copts = \"-cclib -lcoqrun\"" > $@ - $(HIDE)echo "let core_libs = \""$(LINKCMO)"\"" >> $@ - $(HIDE)echo "let core_objs = \""$(OBJSCMO)"\"" >> $@ - $(HIDE)echo "let ide = \""$(COQIDECMO)"\"" >> $@ - -BEFOREDEPEND+= scripts/tolink.ml - -# coqc - -COQCCMO=$(CONFIG) toplevel/usage.cmo scripts/coqc.cmo -COQCCMX=config/coq_config.cmx toplevel/usage.cmx scripts/coqc.cmx - -$(COQCBYTE): $(COQCCMO) $(COQTOPBYTE) $(BESTCOQTOP) - $(SHOW)'OCAMLC -o $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -o $@ unix.cma $(COQCCMO) $(OSDEPLIBS) - -$(COQCOPT): $(COQCCMX) $(COQTOPOPT) $(BESTCOQTOP) - $(SHOW)'OCAMLOPT -o $@' - $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -o $@ unix.cmxa $(COQCCMX) $(OSDEPLIBS) - -$(COQC): $(BESTCOQC) - cd bin; ln -sf coqc.$(BEST)$(EXE) coqc$(EXE) - - -clean:: - rm -f scripts/tolink.ml - -archclean:: - rm -f $(COQTOPBYTE) $(COQTOPOPT) $(BESTCOQTOP) $(COQC) $(COQMKTOP) - rm -f $(COQTOP) - -# we provide targets for each subdirectory - -lib: $(LIBREP) -kernel: $(KERNEL) -byterun: $(BYTERUN) -library: $(LIBRARY) -proofs: $(PROOFS) -tactics: $(TACTICS) -interp: $(INTERP) -parsing: $(PARSING) -pretyping: $(PRETYPING) -highparsing: $(HIGHPARSING) -toplevel: $(TOPLEVEL) -hightactics: $(HIGHTACTICS) - -# target for libraries - -lib/lib.cma: $(LIBREP) - $(SHOW)'OCAMLC -a -o $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(LIBREP) - -lib/lib.cmxa: $(LIBREP:.cmo=.cmx) - $(SHOW)'OCAMLOPT -a -o $@' - $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(LIBREP:.cmo=.cmx) - -kernel/kernel.cma: $(KERNEL) - $(SHOW)'OCAMLC -a -o $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(KERNEL) - -kernel/kernel.cmxa: $(KERNEL:.cmo=.cmx) - $(SHOW)'OCAMLOPT -a -o $@' - $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(KERNEL:.cmo=.cmx) - -library/library.cma: $(LIBRARY) - $(SHOW)'OCAMLC -a -o $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(LIBRARY) - -library/library.cmxa: $(LIBRARY:.cmo=.cmx) - $(SHOW)'OCAMLOPT -a -o $@' - $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(LIBRARY:.cmo=.cmx) - -pretyping/pretyping.cma: $(PRETYPING) - $(SHOW)'OCAMLC -a -o $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(PRETYPING) - -pretyping/pretyping.cmxa: $(PRETYPING:.cmo=.cmx) - $(SHOW)'OCAMLOPT -a -o $@' - $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(PRETYPING:.cmo=.cmx) - -interp/interp.cma: $(INTERP) - $(SHOW)'OCAMLC -a -o $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(INTERP) - -interp/interp.cmxa: $(INTERP:.cmo=.cmx) - $(SHOW)'OCAMLOPT -a -o $@' - $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(INTERP:.cmo=.cmx) - -parsing/parsing.cma: $(PARSING) - $(SHOW)'OCAMLC -a -o $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(PARSING) - -parsing/parsing.cmxa: $(PARSING:.cmo=.cmx) - $(SHOW)'OCAMLOPT -a -o $@' - $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(PARSING:.cmo=.cmx) - -proofs/proofs.cma: $(PROOFS) - $(SHOW)'OCAMLC -a -o $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(PROOFS) - -proofs/proofs.cmxa: $(PROOFS:.cmo=.cmx) - $(SHOW)'OCAMLOPT -a -o $@' - $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(PROOFS:.cmo=.cmx) - -tactics/tactics.cma: $(TACTICS) - $(SHOW)'OCAMLC -a -o $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(TACTICS) - -tactics/tactics.cmxa: $(TACTICS:.cmo=.cmx) - $(SHOW)'OCAMLOPT -a -o $@' - $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(TACTICS:.cmo=.cmx) - -toplevel/toplevel.cma: $(TOPLEVEL) - $(SHOW)'OCAMLC -a -o $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(TOPLEVEL) - -toplevel/toplevel.cmxa: $(TOPLEVEL:.cmo=.cmx) - $(SHOW)'OCAMLOPT -a -o $@' - $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(TOPLEVEL:.cmo=.cmx) - -parsing/highparsing.cma: $(HIGHPARSING) - $(SHOW)'OCAMLC -a -o $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(HIGHPARSING) - -parsing/highparsing.cmxa: $(HIGHPARSING:.cmo=.cmx) - $(SHOW)'OCAMLOPT -a -o $@' - $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(HIGHPARSING:.cmo=.cmx) - -tactics/hightactics.cma: $(HIGHTACTICS) $(USERTACCMO) - $(SHOW)'OCAMLC -a -o $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(HIGHTACTICS) $(USERTACCMO) - -tactics/hightactics.cmxa: $(HIGHTACTICS:.cmo=.cmx) $(USERTACCMO:.cmo=.cmx) - $(SHOW)'OCAMLOPT -a -o $@' - $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(HIGHTACTICS:.cmo=.cmx) \ - $(USERTACCMO:.cmo=.cmx) - -contrib/contrib.cma: $(CONTRIB) - $(SHOW)'OCAMLC -a -o $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(CONTRIB) - -contrib/contrib.cmxa: $(CONTRIB:.cmo=.cmx) - $(SHOW)'OCAMLOPT -a -o $@' - $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(CONTRIB:.cmo=.cmx) - -########################################################################### -# CoqIde special targets -########################################################################### - -# target to build CoqIde -coqide:: coqide-files coqide-binaries states - -COQIDEBYTE=bin/coqide.byte$(EXE) -COQIDEOPT=bin/coqide.opt$(EXE) -COQIDE=bin/coqide$(EXE) - -COQIDECMO=ide/utils/okey.cmo ide/utils/config_file.cmo \ - ide/utils/configwin_keys.cmo ide/utils/configwin_types.cmo \ - ide/utils/configwin_messages.cmo ide/utils/configwin_ihm.cmo \ - ide/utils/configwin.cmo \ - ide/utils/editable_cells.cmo ide/config_parser.cmo \ - ide/config_lexer.cmo ide/utf8_convert.cmo ide/preferences.cmo \ - ide/ideutils.cmo ide/blaster_window.cmo ide/undo.cmo \ - ide/find_phrase.cmo \ - ide/highlight.cmo ide/coq.cmo ide/coq_commands.cmo \ - ide/coq_tactics.cmo ide/command_windows.cmo ide/coqide.cmo - -COQIDECMX=$(COQIDECMO:.cmo=.cmx) -COQIDEFLAGS=-thread $(COQIDEINCLUDES) -BEFOREDEPEND+= ide/config_lexer.ml ide/find_phrase.ml ide/highlight.ml -BEFOREDEPEND+= ide/config_parser.mli ide/config_parser.ml -BEFOREDEPEND+= ide/utf8_convert.ml - -COQIDEVO=ide/utf8.vo - -$(COQIDEVO): states/initial.coq - $(BOOTCOQTOP) -compile $* - -IDEFILES=$(COQIDEVO) ide/utf8.v ide/coq.png ide/.coqide-gtk2rc - -coqide-binaries: coqide-$(HASCOQIDE) -coqide-no: -coqide-byte: $(COQIDEBYTE) $(COQIDE) -coqide-opt: $(COQIDEBYTE) $(COQIDEOPT) $(COQIDE) -coqide-files: $(IDEFILES) - -clean-ide: - rm -f $(COQIDEVO) $(COQIDECMO) $(COQIDECMX) $(COQIDECMO:.cmo=.cmi) $(COQIDEBYTE) $(COQIDEOPT) $(COQIDE) - rm -f ide/extract_index.ml ide/find_phrase.ml ide/highlight.ml - rm -f ide/config_lexer.ml ide/config_parser.mli ide/config_parser.ml - rm -f ide/utf8_convert.ml - -$(COQIDEOPT): $(COQMKTOP) $(LINKCMX) $(LIBCOQRUN) $(USERTACCMX) ide/ide.cmxa - $(SHOW)'COQMKTOP -o $@' - $(HIDE)$(COQMKTOP) -ide -opt $(OPTFLAGS) -o $@ - $(STRIP) $@ - -$(COQIDEBYTE): $(COQMKTOP) $(LINKCMO) $(LIBCOQRUN) $(USERTACCMO) ide/ide.cma - $(SHOW)'COQMKTOP -o $@' - $(HIDE)$(COQMKTOP) -g -ide -top $(BYTEFLAGS) -o $@ - -$(COQIDE): - cd bin; ln -sf coqide.$(HASCOQIDE)$(EXE) coqide$(EXE) - -ide/%.cmo: ide/%.ml - $(SHOW)'OCAMLC $<' - $(HIDE)$(OCAMLC) -g $(COQIDEFLAGS) $(BYTEFLAGS) -c $< - -ide/%.cmi: ide/%.mli - $(SHOW)'OCAMLC $<' - $(HIDE)$(OCAMLC) -g $(COQIDEFLAGS) $(BYTEFLAGS) -c $< - -ide/%.cmx: ide/%.ml - $(SHOW)'OCAMLOPT $<' - $(HIDE)$(OCAMLOPT) $(COQIDEFLAGS) $(OPTFLAGS) -c $< - -ide/utils/%.cmo: ide/%.ml - $(SHOW)'OCAMLC $<' - $(HIDE)$(OCAMLC) -g $(COQIDEFLAGS) $(BYTEFLAGS) -c $< - -ide/utils/%.cmi: ide/%.mli - $(SHOW)'OCAMLC $<' - $(HIDE)$(OCAMLC) -g $(COQIDEFLAGS) $(BYTEFLAGS) -c $< - -ide/utils/%.cmx: ide/%.ml - $(SHOW)'OCAMLOPT $<' - $(HIDE)$(OCAMLOPT) $(COQIDEFLAGS) $(OPTFLAGS) -c $< - -clean:: - rm -f ide/extract_index.ml ide/find_phrase.ml ide/highlight.ml - rm -f ide/config_lexer.ml ide/config_parser.mli ide/config_parser.ml - rm -f ide/utf8_convert.ml - rm -f $(COQIDEVO) $(COQIDECMO) $(COQIDECMX) $(COQIDECMO:.cmo=.cmi) - rm -f $(COQIDEBYTE) $(COQIDEOPT) $(COQIDE) - -ide/ide.cma: $(COQIDECMO) - $(SHOW)'OCAMLC -a -o $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(COQIDECMO) - -ide/ide.cmxa: $(COQIDECMO:.cmo=.cmx) - $(SHOW)'OCAMLOPT -a -o $@' - $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(COQIDECMO:.cmo=.cmx) - -# install targets - -FULLIDELIB=$(FULLCOQLIB)/ide - -install-coqide:: install-ide-$(HASCOQIDE) install-ide-files install-ide-info - -install-ide-no: - -install-ide-byte: - $(MKDIR) $(FULLBINDIR) - cp $(COQIDEBYTE) $(FULLBINDIR) - cd $(FULLBINDIR); ln -sf coqide.byte$(EXE) coqide$(EXE) - -install-ide-opt: - $(MKDIR) $(FULLBINDIR) - cp $(COQIDEBYTE) $(COQIDEOPT) $(FULLBINDIR) - cd $(FULLBINDIR); ln -sf coqide.opt$(EXE) coqide$(EXE) - -install-ide-files: - $(MKDIR) $(FULLIDELIB) - cp $(IDEFILES) $(FULLIDELIB) +UNSAVED_FILES:=$(shell find . -name '.\#*v' -o -name '.\#*.ml' -o -name '.\#*.mli' -o -name '.\#*.ml4') +ifdef UNSAVED_FILES +$(error You have unsaved changes in your editor (emacs?) [$(UNSAVED_FILES)]; cancel them or save before proceeding. \ +Or your editor crashed. Then, you may want to consider whether you want to restore the autosaves) +#If you try to simply remove this explicit test, the compilation may +#fail later. In particular, if a .#*.v file exists, coqdep fails to +#run. +endif -install-ide-info: - $(MKDIR) $(FULLIDELIB) - cp ide/FAQ $(FULLIDELIB) +ifdef GOTO_STAGE +config/Makefile Makefile.common Makefile.build Makefile: ; -########################################################################### -# Pcoq: special binaries for debugging (coq-interface, parser) -########################################################################### +%: always + $(call stage-template,$(GOTO_STAGE)) +else -# target to build Pcoq -pcoq: pcoq-binaries pcoq-files +.PHONY: stage1 stage2 stage3 world revision -INTERFACE=\ - contrib/interface/vtp.cmo contrib/interface/xlate.cmo \ - contrib/interface/paths.cmo contrib/interface/translate.cmo \ - contrib/interface/pbp.cmo \ - contrib/interface/dad.cmo \ - contrib/interface/history.cmo \ - contrib/interface/name_to_ast.cmo contrib/interface/debug_tac.cmo \ - contrib/interface/showproof_ct.cmo contrib/interface/showproof.cmo \ - contrib/interface/blast.cmo contrib/interface/centaur.cmo +# This is to remove the built-in rule "%: %.o" +# Otherwise, "make foo" recurses into stage1, trying to build foo.o . +%: %.o -INTERFACECMX=$(INTERFACE:.cmo=.cmx) +%.o: always + $(call stage-template,1) -ML4FILES += contrib/interface/debug_tac.ml4 contrib/interface/centaur.ml4 +#STAGE1_TARGETS includes all object files necessary for $(STAGE1) +stage1 $(STAGE1_TARGETS): always + $(call stage-template,1) -PARSERREQUIRES=$(LINKCMO) $(LIBCOQRUN) # Solution de facilité... -PARSERREQUIRESCMX=$(LINKCMX) +CAML_OBJECT_PATTERNS:=%.cmo %.cmx %.cmi %.cma %.cmxa %.dep.ps %.dot +ifdef CM_STAGE1 +$(CAML_OBJECT_PATTERNS): always + $(call stage-template,1) -ifeq ($(BEST),opt) - COQINTERFACE=bin/coq-interface$(EXE) bin/coq-interface.opt$(EXE) bin/parser$(EXE) bin/parser.opt$(EXE) +%.ml4-preprocessed: stage1 + $(call stage-template,2) else - COQINTERFACE=bin/coq-interface$(EXE) bin/parser$(EXE) +$(CAML_OBJECT_PATTERNS) %.ml4-preprocessed: stage1 + $(call stage-template,2) endif -pcoq-binaries:: $(COQINTERFACE) - -bin/coq-interface$(EXE): $(COQMKTOP) $(LINKCMO) $(LIBCOQRUN) $(USERTACCMO) $(INTERFACE) - $(SHOW)'COQMKTOP -o $@' - $(HIDE)$(COQMKTOP) -top $(BYTEFLAGS) -o $@ $(INTERFACE) - -bin/coq-interface.opt$(EXE): $(COQMKTOP) $(LINKCMX) $(LIBCOQRUN) $(USERTACCMX) $(INTERFACECMX) - $(SHOW)'COQMKTOP -o $@' - $(HIDE)$(COQMKTOP) -opt $(OPTFLAGS) -o $@ $(INTERFACECMX) - -PARSERCODE=contrib/interface/line_parser.cmo contrib/interface/vtp.cmo \ - contrib/interface/xlate.cmo contrib/interface/parse.cmo -PARSERCMO=$(PARSERREQUIRES) $(PARSERCODE) -PARSERCMX= $(PARSERREQUIRESCMX) $(PARSERCODE:.cmo=.cmx) - -bin/parser$(EXE):$(LIBCOQRUN) $(PARSERCMO) - $(SHOW)'OCAMLC -o $@' - $(HIDE)$(OCAMLC) -custom -linkall $(BYTEFLAGS) -o $@ \ - dynlink.cma $(LIBCOQRUN) $(CMA) $(PARSERCMO) - -bin/parser.opt$(EXE): $(LIBCOQRUN) $(PARSERCMX) - $(SHOW)'OCAMLOPT -o $@' - $(HIDE)$(OCAMLOPT) -linkall $(OPTFLAGS) -o $@ \ - $(LIBCOQRUN) $(CMXA) $(PARSERCMX) - -INTERFACEVO= - -INTERFACERC= contrib/interface/vernacrc - -pcoq-files:: $(INTERFACEVO) $(INTERFACERC) - -clean:: - rm -f bin/parser$(EXE) bin/parser.opt$(EXE) bin/coq-interface$(EXE) bin/coq-interface.opt$(EXE) - -# install targets -install-pcoq:: install-pcoq-binaries install-pcoq-files install-pcoq-manpages - -install-pcoq-binaries:: - $(MKDIR) $(FULLBINDIR) - cp $(COQINTERFACE) $(FULLBINDIR) - -install-pcoq-files:: - $(MKDIR) $(FULLCOQLIB)/contrib/interface - cp $(INTERFACERC) $(FULLCOQLIB)/contrib/interface - -PCOQMANPAGES=man/coq-interface.1 man/parser.1 +stage2 $(STAGE2_TARGETS): stage1 + $(call stage-template,2) -install-pcoq-manpages: - $(MKDIR) $(FULLMANDIR)/man1 - cp $(PCOQMANPAGES) $(FULLMANDIR)/man1 +%.vo %.glob states/% install-%: stage2 + $(call stage-template,3) -########################################################################### -# tests -########################################################################### +stage3 $(STAGE3_TARGETS): stage2 + $(call stage-template,3) -check:: world pcoq - cd test-suite; \ - env COQBIN=../bin COQLIB=.. ./check -$(BEST) | tee check.log - if grep -F 'Error!' test-suite/check.log ; then false; fi +endif #GOTO_STAGE ########################################################################### -# theories and contrib files -########################################################################### - -INITVO=\ - theories/Init/Notations.vo \ - theories/Init/Datatypes.vo theories/Init/Peano.vo \ - theories/Init/Logic.vo theories/Init/Specif.vo \ - theories/Init/Logic_Type.vo theories/Init/Wf.vo \ - theories/Init/Tactics.vo theories/Init/Prelude.vo - -init: $(INITVO) - -LOGICVO=\ - theories/Logic/Hurkens.vo theories/Logic/ProofIrrelevance.vo\ - theories/Logic/Classical.vo theories/Logic/Classical_Type.vo \ - theories/Logic/Classical_Pred_Set.vo theories/Logic/Eqdep.vo \ - theories/Logic/Classical_Prop.vo theories/Logic/Classical_Pred_Type.vo \ - theories/Logic/ClassicalFacts.vo theories/Logic/ChoiceFacts.vo \ - theories/Logic/Berardi.vo theories/Logic/Eqdep_dec.vo \ - theories/Logic/Decidable.vo theories/Logic/JMeq.vo \ - theories/Logic/ClassicalChoice.vo theories/Logic/ClassicalDescription.vo \ - theories/Logic/RelationalChoice.vo theories/Logic/Diaconescu.vo \ - theories/Logic/EqdepFacts.vo theories/Logic/ProofIrrelevanceFacts.vo \ - theories/Logic/ClassicalEpsilon.vo theories/Logic/ClassicalUniqueChoice.vo \ - theories/Logic/DecidableType.vo theories/Logic/DecidableTypeEx.vo \ - theories/Logic/ConstructiveEpsilon.vo - -ARITHVO=\ - theories/Arith/Arith.vo theories/Arith/Gt.vo \ - theories/Arith/Between.vo theories/Arith/Le.vo \ - theories/Arith/Compare.vo theories/Arith/Lt.vo \ - theories/Arith/Compare_dec.vo theories/Arith/Min.vo \ - theories/Arith/Div2.vo theories/Arith/Minus.vo \ - theories/Arith/Mult.vo theories/Arith/Even.vo \ - theories/Arith/EqNat.vo theories/Arith/Peano_dec.vo \ - theories/Arith/Euclid.vo theories/Arith/Plus.vo \ - theories/Arith/Wf_nat.vo theories/Arith/Max.vo \ - theories/Arith/Bool_nat.vo theories/Arith/Factorial.vo \ - theories/Arith/Arith_base.vo - -SORTINGVO=\ - theories/Sorting/Heap.vo theories/Sorting/Permutation.vo \ - theories/Sorting/Sorting.vo theories/Sorting/PermutSetoid.vo \ - theories/Sorting/PermutEq.vo - -BOOLVO=\ - theories/Bool/Bool.vo theories/Bool/IfProp.vo \ - theories/Bool/Zerob.vo theories/Bool/DecBool.vo \ - theories/Bool/Sumbool.vo theories/Bool/BoolEq.vo \ - theories/Bool/Bvector.vo - -NARITHVO=\ - theories/NArith/BinPos.vo theories/NArith/Pnat.vo \ - theories/NArith/BinNat.vo theories/NArith/NArith.vo \ - theories/NArith/Nnat.vo theories/NArith/Ndigits.vo \ - theories/NArith/Ndec.vo theories/NArith/Ndist.vo - -ZARITHVO=\ - theories/ZArith/BinInt.vo theories/ZArith/Wf_Z.vo \ - theories/ZArith/ZArith.vo theories/ZArith/ZArith_dec.vo \ - theories/ZArith/auxiliary.vo theories/ZArith/Zmisc.vo \ - theories/ZArith/Zcompare.vo theories/ZArith/Znat.vo \ - theories/ZArith/Zorder.vo theories/ZArith/Zabs.vo \ - theories/ZArith/Zmin.vo theories/ZArith/Zmax.vo \ - theories/ZArith/Zminmax.vo theories/ZArith/Zeven.vo \ - theories/ZArith/Zhints.vo theories/ZArith/Zlogarithm.vo \ - theories/ZArith/Zpower.vo theories/ZArith/Zcomplements.vo \ - theories/ZArith/Zdiv.vo theories/ZArith/Zsqrt.vo \ - theories/ZArith/Zwf.vo theories/ZArith/ZArith_base.vo \ - theories/ZArith/Zbool.vo theories/ZArith/Zbinary.vo \ - theories/ZArith/Znumtheory.vo theories/ZArith/Int.vo \ - theories/ZArith/Zpow_def.vo - -QARITHVO=\ - theories/QArith/QArith_base.vo theories/QArith/Qreduction.vo \ - theories/QArith/Qring.vo theories/QArith/Qreals.vo \ - theories/QArith/QArith.vo theories/QArith/Qcanon.vo - -LISTSVO=\ - theories/Lists/MonoList.vo \ - theories/Lists/ListSet.vo theories/Lists/Streams.vo \ - theories/Lists/TheoryList.vo theories/Lists/List.vo \ - theories/Lists/SetoidList.vo theories/Lists/ListTactics.vo - -STRINGSVO=\ - theories/Strings/Ascii.vo theories/Strings/String.vo - -SETSVO=\ - theories/Sets/Classical_sets.vo theories/Sets/Permut.vo \ - theories/Sets/Constructive_sets.vo theories/Sets/Powerset.vo \ - theories/Sets/Cpo.vo theories/Sets/Powerset_Classical_facts.vo \ - theories/Sets/Ensembles.vo theories/Sets/Powerset_facts.vo \ - theories/Sets/Finite_sets.vo theories/Sets/Relations_1.vo \ - theories/Sets/Finite_sets_facts.vo theories/Sets/Relations_1_facts.vo \ - theories/Sets/Image.vo theories/Sets/Relations_2.vo \ - theories/Sets/Infinite_sets.vo theories/Sets/Relations_2_facts.vo \ - theories/Sets/Integers.vo theories/Sets/Relations_3.vo \ - theories/Sets/Multiset.vo theories/Sets/Relations_3_facts.vo \ - theories/Sets/Partial_Order.vo theories/Sets/Uniset.vo - -FSETSBASEVO=\ - theories/FSets/OrderedType.vo \ - theories/FSets/OrderedTypeEx.vo theories/FSets/OrderedTypeAlt.vo \ - theories/FSets/FSetInterface.vo theories/FSets/FSetList.vo \ - theories/FSets/FSetBridge.vo theories/FSets/FSetFacts.vo \ - theories/FSets/FSetProperties.vo theories/FSets/FSetEqProperties.vo \ - theories/FSets/FSets.vo theories/FSets/FSetWeakProperties.vo \ - theories/FSets/FSetWeakInterface.vo theories/FSets/FSetWeakList.vo \ - theories/FSets/FSetWeakFacts.vo theories/FSets/FSetWeak.vo \ - theories/FSets/FMapInterface.vo theories/FSets/FMapList.vo \ - theories/FSets/FMaps.vo theories/FSets/FMapFacts.vo \ - theories/FSets/FMapWeakFacts.vo \ - theories/FSets/FMapWeakInterface.vo theories/FSets/FMapWeakList.vo \ - theories/FSets/FMapWeak.vo theories/FSets/FMapPositive.vo \ - theories/FSets/FMapIntMap.vo theories/FSets/FSetToFiniteSet.vo - -FSETS_basic= - -FSETS_all=\ - theories/FSets/FMapAVL.vo theories/FSets/FSetAVL.vo \ - -FSETSVO=$(FSETSBASEVO) $(FSETS_$(FSETS)) - -ALLFSETS=$(FSETSBASEVO) $(FSETS_all) - -INTMAPVO=\ - theories/IntMap/Adalloc.vo theories/IntMap/Mapcanon.vo \ - theories/IntMap/Mapfold.vo \ - theories/IntMap/Mapcard.vo theories/IntMap/Mapc.vo \ - theories/IntMap/Allmaps.vo theories/IntMap/Mapiter.vo \ - theories/IntMap/Fset.vo theories/IntMap/Maplists.vo \ - theories/IntMap/Lsort.vo theories/IntMap/Mapsubset.vo \ - theories/IntMap/Mapaxioms.vo theories/IntMap/Map.vo \ - -RELATIONSVO=\ - theories/Relations/Newman.vo \ - theories/Relations/Operators_Properties.vo \ - theories/Relations/Relation_Definitions.vo \ - theories/Relations/Relation_Operators.vo \ - theories/Relations/Relations.vo \ - theories/Relations/Rstar.vo - -WELLFOUNDEDVO=\ - theories/Wellfounded/Disjoint_Union.vo \ - theories/Wellfounded/Inclusion.vo \ - theories/Wellfounded/Inverse_Image.vo \ - theories/Wellfounded/Lexicographic_Exponentiation.vo \ - theories/Wellfounded/Transitive_Closure.vo \ - theories/Wellfounded/Union.vo \ - theories/Wellfounded/Wellfounded.vo \ - theories/Wellfounded/Well_Ordering.vo \ - theories/Wellfounded/Lexicographic_Product.vo - -REALSBASEVO=\ - theories/Reals/Rdefinitions.vo theories/Reals/Rpow_def.vo \ - theories/Reals/Raxioms.vo theories/Reals/RIneq.vo \ - theories/Reals/DiscrR.vo theories/Reals/Rbase.vo \ - theories/Reals/LegacyRfield.vo - -REALS_basic= - -REALS_all=\ - theories/Reals/R_Ifp.vo theories/Reals/Rpow_def.vo \ - theories/Reals/Rbasic_fun.vo theories/Reals/R_sqr.vo \ - theories/Reals/SplitAbsolu.vo theories/Reals/SplitRmult.vo \ - theories/Reals/ArithProp.vo theories/Reals/Rfunctions.vo \ - theories/Reals/Rseries.vo theories/Reals/SeqProp.vo \ - theories/Reals/Rcomplete.vo theories/Reals/PartSum.vo \ - theories/Reals/AltSeries.vo theories/Reals/Binomial.vo \ - theories/Reals/Rsigma.vo theories/Reals/Rprod.vo \ - theories/Reals/Cauchy_prod.vo theories/Reals/Alembert.vo \ - theories/Reals/SeqSeries.vo theories/Reals/Rtrigo_fun.vo \ - theories/Reals/Rtrigo_def.vo theories/Reals/Rtrigo_alt.vo \ - theories/Reals/Cos_rel.vo theories/Reals/Cos_plus.vo \ - theories/Reals/Rtrigo.vo theories/Reals/Rlimit.vo \ - theories/Reals/Rderiv.vo theories/Reals/RList.vo \ - theories/Reals/Ranalysis1.vo theories/Reals/Ranalysis2.vo \ - theories/Reals/Ranalysis3.vo theories/Reals/Rtopology.vo \ - theories/Reals/MVT.vo theories/Reals/PSeries_reg.vo \ - theories/Reals/Exp_prop.vo theories/Reals/Rtrigo_reg.vo \ - theories/Reals/Rsqrt_def.vo theories/Reals/R_sqrt.vo \ - theories/Reals/Rtrigo_calc.vo theories/Reals/Rgeom.vo \ - theories/Reals/Sqrt_reg.vo theories/Reals/Ranalysis4.vo \ - theories/Reals/Rpower.vo theories/Reals/Ranalysis.vo \ - theories/Reals/NewtonInt.vo theories/Reals/RiemannInt_SF.vo \ - theories/Reals/RiemannInt.vo theories/Reals/Integration.vo \ - theories/Reals/Reals.vo - -REALSVO=$(REALSBASEVO) $(REALS_$(REALS)) - -ALLREALS=$(REALSBASEVO) $(REALS_all) - -SETOIDSVO=theories/Setoids/Setoid.vo - -THEORIESVO =\ - $(INITVO) $(LOGICVO) $(ARITHVO) $(BOOLVO) $(NARITHVO) $(ZARITHVO) \ - $(SETOIDSVO) $(LISTSVO) $(STRINGSVO) $(SETSVO) $(FSETSVO) $(INTMAPVO) \ - $(RELATIONSVO) $(WELLFOUNDEDVO) $(REALSVO) $(SORTINGVO) $(QARITHVO) - -THEORIESLIGHTVO = $(INITVO) $(LOGICVO) $(ARITHVO) - -theories: $(THEORIESVO) -theories-light: $(THEORIESLIGHTVO) - -logic: $(LOGICVO) -arith: $(ARITHVO) -bool: $(BOOLVO) -narith: $(NARITHVO) -zarith: $(ZARITHVO) -qarith: $(QARITHVO) -lists: $(LISTSVO) -strings: $(STRINGSVO) -sets: $(SETSVO) -fsets: $(FSETSVO) -allfsets: $(ALLFSETS) -intmap: $(INTMAPVO) -relations: $(RELATIONSVO) -wellfounded: $(WELLFOUNDEDVO) -# reals -reals: $(REALSVO) -allreals: $(ALLREALS) -setoids: $(SETOIDSVO) -sorting: $(SORTINGVO) - -noreal: logic arith bool zarith qarith lists sets fsets intmap relations \ - wellfounded setoids sorting - -########################################################################### -# contribs (interface not included) -########################################################################### - -OMEGAVO=\ - contrib/omega/OmegaLemmas.vo contrib/omega/Omega.vo - -ROMEGAVO=\ - contrib/romega/ReflOmegaCore.vo contrib/romega/ROmega.vo - -RINGVO=\ - contrib/ring/LegacyArithRing.vo contrib/ring/Ring_normalize.vo \ - contrib/ring/LegacyRing_theory.vo contrib/ring/LegacyRing.vo \ - contrib/ring/LegacyNArithRing.vo \ - contrib/ring/LegacyZArithRing.vo contrib/ring/Ring_abstract.vo \ - contrib/ring/Quote.vo contrib/ring/Setoid_ring_normalize.vo \ - contrib/ring/Setoid_ring.vo contrib/ring/Setoid_ring_theory.vo - -FIELDVO=\ - contrib/field/LegacyField_Compl.vo contrib/field/LegacyField_Theory.vo \ - contrib/field/LegacyField_Tactic.vo contrib/field/LegacyField.vo - -NEWRINGVO=\ - contrib/setoid_ring/BinList.vo contrib/setoid_ring/Ring_theory.vo \ - contrib/setoid_ring/Ring_polynom.vo contrib/setoid_ring/Ring_tac.vo \ - contrib/setoid_ring/Ring_base.vo contrib/setoid_ring/InitialRing.vo \ - contrib/setoid_ring/Ring_equiv.vo contrib/setoid_ring/Ring.vo \ - contrib/setoid_ring/ArithRing.vo contrib/setoid_ring/NArithRing.vo \ - contrib/setoid_ring/ZArithRing.vo \ - contrib/setoid_ring/Field_theory.vo contrib/setoid_ring/Field_tac.vo \ - contrib/setoid_ring/Field.vo contrib/setoid_ring/RealField.vo - -XMLVO= - -FOURIERVO=\ - contrib/fourier/Fourier_util.vo contrib/fourier/Fourier.vo - -FUNINDVO= - -RECDEFVO=contrib/recdef/Recdef.vo - -JPROVERVO= - -CCVO= - -SUBTACVO=contrib/subtac/SubtacTactics.vo contrib/subtac/Heq.vo \ - contrib/subtac/Utils.vo contrib/subtac/FixSub.vo contrib/subtac/Subtac.vo \ - contrib/subtac/FunctionalExtensionality.vo - -RTAUTOVO = \ - contrib/rtauto/Bintree.vo contrib/rtauto/Rtauto.vo - -CONTRIBVO = $(OMEGAVO) $(ROMEGAVO) $(RINGVO) $(FIELDVO) $(XMLVO) \ - $(FOURIERVO) $(JPROVERVO) $(CCVO) $(FUNINDVO) $(SUBTACVO) \ - $(RTAUTOVO) $(RECDEFVO) $(NEWRINGVO) - -$(CONTRIBVO): states/initial.coq - -contrib: $(CONTRIBVO) $(CONTRIBCMO) -omega: $(OMEGAVO) $(OMEGACMO) $(ROMEGAVO) $(ROMEGACMO) -ring: $(RINGVO) $(RINGCMO) -setoid_ring: $(NEWRINGVO) $(NEWRINGCMO) -dp: $(DPCMO) -xml: $(XMLVO) $(XMLCMO) -extraction: $(EXTRACTIONCMO) -field: $(FIELDVO) $(FIELDCMO) -fourier: $(FOURIERVO) $(FOURIERCMO) -jprover: $(JPROVERVO) $(JPROVERCMO) -funind: $(FUNINDCMO) $(FUNINDVO) -cc: $(CCVO) $(CCCMO) -subtac: $(SUBTACVO) $(SUBTACCMO) -rtauto: $(RTAUTOVO) $(RTAUTOCMO) - -ALLVO = $(INITVO) $(THEORIESVO) $(CONTRIBVO) - -########################################################################### -# rules to make theories, contrib and states +# Cleaning ########################################################################### -SYNTAXPP=syntax/PPConstr.v syntax/PPCases.v - -states/initial.coq: states/MakeInitial.v $(INITVO) - $(BOOTCOQTOP) -batch -notop -silent -nois -load-vernac-source states/MakeInitial.v -outputstate states/initial.coq +.PHONY: clean objclean cruftclean indepclean archclean ml4clean clean-ide ml4depclean depclean distclean cleanconfig cleantheories docclean devdocclean -theories/Init/%.vo: $(BESTCOQTOP) theories/Init/%.v - $(BOOTCOQTOP) -nois -compile theories/Init/$* +clean: objclean cruftclean depclean docclean devdocclean -theories/%.vo: theories/%.v states/initial.coq - $(BOOTCOQTOP) -compile theories/$* +objclean: archclean indepclean -contrib/%.vo: contrib/%.v - $(BOOTCOQTOP) -compile contrib/$* - -cleantheories: - rm -f states/*.coq - rm -f theories/*/*.vo - -clean :: cleantheories - -clean :: - rm -f contrib/*/*.cm[io] contrib/*.cma contrib/*/*.vo - -archclean:: - rm -f contrib/*/*.cmx contrib/*.cmxa contrib/*.a contrib/*/*.[so] - -# globalizations (for coqdoc) +cruftclean: ml4clean + find . -name '*~' -or -name '*.annot' | xargs rm -f + rm -f gmon.out core -glob.dump:: +indepclean: + rm -f $(GENFILES) + rm -f $(COQTOPBYTE) $(COQCBYTE) bin/coq-interface$(EXE) bin/parser$(EXE) + find . -name '*~' -or -name '*.cm[ioa]' | xargs rm -f + find contrib -name '*.vo' -or -name '*.glob' | xargs rm -f + rm -f */*.pp[iox] contrib/*/*.pp[iox] + rm -rf $(SOURCEDOCDIR) + rm -f toplevel/mltop.byteml toplevel/mltop.optml rm -f glob.dump - rm -f theories/*/*.vo - $(MAKE) GLOB="-dump-glob glob.dump" world - -########################################################################### -# tools -########################################################################### - -COQDEP=bin/coqdep$(EXE) -COQMAKEFILE=bin/coq_makefile$(EXE) -GALLINA=bin/gallina$(EXE) -COQTEX=bin/coq-tex$(EXE) -COQWC=bin/coqwc$(EXE) -COQDOC=bin/coqdoc$(EXE) - -TOOLS=$(COQDEP) $(COQMAKEFILE) $(GALLINA) $(COQTEX) \ - $(COQWC) $(COQDOC) - -DEBUGPRINTERS=dev/top_printers.cmo dev/vm_printers.cmo dev/printers.cma - -printers: $(DEBUGPRINTERS) - -tools:: $(TOOLS) $(DEBUGPRINTERS) - -COQDEPCMO=config/coq_config.cmo tools/coqdep_lexer.cmo tools/coqdep.cmo - -$(COQDEP): $(COQDEPCMO) - $(SHOW)'OCAMLC -o $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -custom -o $@ unix.cma $(COQDEPCMO) $(OSDEPLIBS) - -BEFOREDEPEND+= tools/coqdep_lexer.ml - -GALLINACMO=tools/gallina_lexer.cmo tools/gallina.cmo - -$(GALLINA): $(GALLINACMO) - $(SHOW)'OCAMLC -o $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -custom -o $@ $(GALLINACMO) - -BEFOREDEPEND+= tools/gallina_lexer.ml - -$(COQMAKEFILE): tools/coq_makefile.cmo - $(SHOW)'OCAMLC -o $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -custom -o $@ tools/coq_makefile.cmo - -$(COQTEX): tools/coq-tex.cmo - $(SHOW)'OCAMLC -o $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -custom -o $@ str.cma tools/coq-tex.cmo - -BEFOREDEPEND+= tools/coqwc.ml - -$(COQWC): tools/coqwc.cmo - $(SHOW)'OCAMLC -o $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -custom -o $@ tools/coqwc.cmo - -BEFOREDEPEND+= tools/coqdoc/pretty.ml tools/coqdoc/index.ml - -COQDOCCMO=$(CONFIG) tools/coqdoc/cdglobals.cmo tools/coqdoc/alpha.cmo \ - tools/coqdoc/index.cmo tools/coqdoc/output.cmo \ - tools/coqdoc/pretty.cmo tools/coqdoc/main.cmo - -$(COQDOC): $(COQDOCCMO) - $(SHOW)'OCAMLC -o $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -custom -o $@ str.cma unix.cma $(COQDOCCMO) - -clean:: - rm -f tools/coqdep_lexer.ml tools/gallina_lexer.ml - rm -f tools/coqwc.ml - rm -f tools/coqdoc/pretty.ml tools/coqdoc/index.ml + rm -f revision + +docclean: + rm -f doc/*/*.dvi doc/*/*.aux doc/*/*.log doc/*/*.bbl doc/*/*.blg doc/*/*.toc \ + doc/*/*.idx doc/*/*~ doc/*/*.ilg doc/*/*.ind doc/*/*.dvi.gz doc/*/*.ps.gz doc/*/*.pdf.gz\ + doc/*/*.???idx doc/*/*.???ind doc/*/*.v.tex doc/*/*.atoc doc/*/*.lof\ + doc/*/*.hatoc doc/*/*.haux doc/*/*.hcomind doc/*/*.herrind doc/*/*.hidx doc/*/*.hind \ + doc/*/*.htacind doc/*/*.htoc doc/*/*.v.html + rm -f doc/stdlib/index-list.html doc/stdlib/index-body.html \ + doc/stdlib/Library.coqdoc.tex doc/stdlib/library.files \ + doc/stdlib/library.files.ls + rm -f doc/*/*.ps doc/*/*.pdf + rm -rf doc/refman/html doc/stdlib/html doc/faq/html doc/tutorial/tutorial.v.html + rm -f doc/stdlib/html/*.html + rm -f doc/refman/euclid.ml{,i} doc/refman/heapsort.ml{,i} + rm -f doc/common/version.tex + rm -f doc/refman/*.eps doc/refman/Reference-Manual.html + rm -f doc/coq.tex -archclean:: +archclean: clean-ide cleantheories + rm -f $(COQTOPOPT) $(BESTCOQTOP) $(COQC) $(COQMKTOP) + rm -f $(COQTOP) $(COQCOPT) $(COQMKTOPOPT) + rm -f bin/parser.opt$(EXE) bin/coq-interface.opt$(EXE) + find . -name '*.cmx' -or -name '*.cmxa' -or -name '*.[soa]' | xargs rm -f rm -f $(TOOLS) - -########################################################################### -# minicoq -########################################################################### - -MINICOQCMO=$(CONFIG) $(LIBREP) $(KERNEL) \ - parsing/lexer.cmo parsing/g_minicoq.cmo \ - toplevel/fhimsg.cmo toplevel/minicoq.cmo - -MINICOQ=bin/minicoq$(EXE) - -$(MINICOQ): $(MINICOQCMO) - $(SHOW)'OCAMLC -o $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -o $@ $(CMA) $(MINICOQCMO) $(OSDEPLIBS) - -archclean:: rm -f $(MINICOQ) -########################################################################### -# Installation -########################################################################### - -COQINSTALLPREFIX= -OLDROOT= - - # Can be changed for a local installation (to make packages). - # You must NOT put a "/" at the end (Cygnus for win32 does not like "//"). - -FULLBINDIR=$(BINDIR:"$(OLDROOT)%="$(COQINSTALLPREFIX)%) -FULLCOQLIB=$(COQLIB:"$(OLDROOT)%="$(COQINSTALLPREFIX)%) -FULLMANDIR=$(MANDIR:"$(OLDROOT)%="$(COQINSTALLPREFIX)%) -FULLEMACSLIB=$(EMACSLIB:"$(OLDROOT)%="$(COQINSTALLPREFIX)%) -FULLCOQDOCDIR=$(COQDOCDIR:"$(OLDROOT)%="$(COQINSTALLPREFIX)%) - -install-coq: install-binaries install-library install-coq-info -install-coqlight: install-binaries install-library-light - -install-binaries:: install-$(BEST) install-tools - -install-byte:: - $(MKDIR) $(FULLBINDIR) - cp $(COQMKTOP) $(COQC) $(COQTOPBYTE) $(FULLBINDIR) - cd $(FULLBINDIR); ln -sf coqtop.byte$(EXE) coqtop$(EXE) - -install-opt:: - $(MKDIR) $(FULLBINDIR) - cp $(COQMKTOP) $(COQC) $(COQTOPBYTE) $(COQTOPOPT) $(FULLBINDIR) - cd $(FULLBINDIR); ln -sf coqtop.opt$(EXE) coqtop$(EXE) - -install-tools:: - $(MKDIR) $(FULLBINDIR) - # recopie des fichiers de style pour coqide - $(MKDIR) $(FULLCOQLIB)/tools/coqdoc - touch $(FULLCOQLIB)/tools/coqdoc/coqdoc.sty $(FULLCOQLIB)/tools/coqdoc/coqdoc.css # to have the mode according to umask (bug #1715) - cp tools/coqdoc/coqdoc.css tools/coqdoc/coqdoc.sty $(FULLCOQLIB)/tools/coqdoc - cp $(TOOLS) $(FULLBINDIR) - -LIBFILES=$(THEORIESVO) $(CONTRIBVO) -LIBFILESLIGHT=$(THEORIESLIGHTVO) - - -GRAMMARCMA=parsing/grammar.cma -OBJECTCMA=lib/lib.cma kernel/kernel.cma library/library.cma \ - pretyping/pretyping.cma interp/interp.cma proofs/proofs.cma \ - parsing/parsing.cma tactics/tactics.cma toplevel/toplevel.cma \ - parsing/highparsing.cma tactics/hightactics.cma contrib/contrib.cma - -OBJECTCMXA=$(OBJECTCMA:.cma=.cmxa) - -install-library: - $(MKDIR) $(FULLCOQLIB) - for f in $(LIBFILES); do \ - $(MKDIR) $(FULLCOQLIB)/`dirname $$f`; \ - cp $$f $(FULLCOQLIB)/`dirname $$f`; \ - done - $(MKDIR) $(FULLCOQLIB)/states - cp states/*.coq $(FULLCOQLIB)/states - $(MKDIR) $(FULLCOQLIB)/user-contrib - cp $(OBJECTCMA) $(OBJECTCMXA) $(GRAMMARCMA) $(FULLCOQLIB) - -install-library-light: - $(MKDIR) $(FULLCOQLIB) - for f in $(LIBFILESLIGHT); do \ - $(MKDIR) $(FULLCOQLIB)/`dirname $$f`; \ - cp $$f $(FULLCOQLIB)/`dirname $$f`; \ - done - $(MKDIR) $(FULLCOQLIB)/states - cp states/*.coq $(FULLCOQLIB)/states - -install-allreals:: - for f in $(ALLREALS); do \ - $(MKDIR) $(FULLCOQLIB)/`dirname $$f`; \ - cp $$f $(FULLCOQLIB)/`dirname $$f`; \ - done - -install-coq-info: install-coq-manpages install-emacs install-latex - -MANPAGES=man/coq-tex.1 man/coqdep.1 man/gallina.1 \ - man/coqc.1 man/coqtop.1 man/coqtop.byte.1 man/coqtop.opt.1 \ - man/coqwc.1 man/coqdoc.1 \ - man/coq_makefile.1 man/coqmktop.1 - -install-coq-manpages: - $(MKDIR) $(FULLMANDIR)/man1 - cp $(MANPAGES) $(FULLMANDIR)/man1 - -install-emacs: - $(MKDIR) $(FULLEMACSLIB) - cp tools/coq.el tools/coq-inferior.el $(FULLEMACSLIB) - -# command to update TeX' kpathsea database -#UPDATETEX = $(MKTEXLSR) /usr/share/texmf /var/spool/texmf $(BASETEXDIR) > /dev/null - -install-latex: - $(MKDIR) $(FULLCOQDOCDIR) - cp tools/coqdoc/coqdoc.sty $(FULLCOQDOCDIR) -# -$(UPDATETEX) - -########################################################################### -# Documentation -# Literate programming (with ocamlweb) -########################################################################### - -.PHONY: doc - -doc: glob.dump - (cd doc; $(MAKE) all) - -clean:: - (cd doc; $(MAKE) clean) - -clean:: - rm -f doc/coq.tex - -########################################################################### -# Documentation of the source code (using ocamldoc) -########################################################################### +clean-ide: + rm -f $(COQIDECMO) $(COQIDECMX) $(COQIDECMO:.cmo=.cmi) $(COQIDEBYTE) $(COQIDEOPT) $(COQIDE) + rm -f ide/extract_index.ml ide/find_phrase.ml ide/highlight.ml + rm -f ide/config_lexer.ml ide/config_parser.mli ide/config_parser.ml + rm -f ide/utf8_convert.ml -SOURCEDOCDIR=dev/source-doc +ml4clean: + rm -f $(ML4FILESML) $(ML4FILESML:.ml=.ml4-preprocessed) -.PHONY: source-doc +ml4depclean: + find . -name '*.ml4.d' | xargs rm -f -source-doc: - if !(test -d $(SOURCEDOCDIR)); then mkdir $(SOURCEDOCDIR); fi - $(OCAMLDOC) -html -rectypes $(LOCALINCLUDES) -d $(SOURCEDOCDIR) `find . -name "*.ml"` +depclean: + find . -name '*.d' | xargs rm -f -clean:: - rm -rf $(SOURCEDOCDIR) +cleanconfig: + rm -f config/Makefile config/coq_config.ml dev/ocamldebug-v7 ide/undo.mli +distclean: clean cleanconfig +cleantheories: + rm -f states/*.coq + find theories -name '*.vo' -or -name '*.glob' | xargs rm -f +devdocclean: + find . -name '*.dep.ps' -o -name '*.dot' -exec rm -f {} \; ########################################################################### # Emacs tags ########################################################################### -# NB: the -maxdepth 3 is for excluding files from contrib/extraction/test - tags: - find . -maxdepth 3 -regex ".*\.ml[i4]?" | sort -r | xargs \ + echo $(MLIFILES) $(MLFILES) $(ML4FILES) | sort -r | xargs \ etags --language=none\ "--regex=/let[ \t]+\([^ \t]+\)/\1/" \ "--regex=/let[ \t]+rec[ \t]+\([^ \t]+\)/\1/" \ @@ -1372,11 +223,14 @@ tags: "--regex=/exception[ \t]+\([^ \t]+\)/\1/" \ "--regex=/val[ \t]+\([^ \t]+\)/\1/" \ "--regex=/module[ \t]+\([^ \t]+\)/\1/" + echo $(ML4FILES) | sort -r | xargs \ + etags --append --language=none\ + "--regex=/[ \t]*\([^: \t]+\)[ \t]*:/\1/" + otags: - find . -maxdepth 3 -name "*.ml" -o -name "*.mli" \ - | sort -r | xargs otags - find . -maxdepth 3 -name "*.ml4" | sort -r | xargs \ + echo $(MLIFILES) $(MLFILES) | sort -r | xargs otags + echo $(ML4FILES) | sort -r | xargs \ etags --append --language=none\ "--regex=/let[ \t]+\([^ \t]+\)/\1/" \ "--regex=/let[ \t]+rec[ \t]+\([^ \t]+\)/\1/" \ @@ -1387,413 +241,12 @@ otags: "--regex=/module[ \t]+\([^ \t]+\)/\1/" -########################################################################### -### Special rules -########################################################################### - -# grammar modules with camlp4 - -ML4FILES += parsing/lexer.ml4 parsing/pcoq.ml4 parsing/q_util.ml4 \ - parsing/q_coqast.ml4 parsing/g_prim.ml4 - -GRAMMARNEEDEDCMO=\ - lib/pp_control.cmo lib/pp.cmo lib/compat.cmo lib/util.cmo lib/bigint.cmo \ - lib/dyn.cmo lib/options.cmo lib/hashcons.cmo lib/predicate.cmo \ - lib/rtree.cmo \ - kernel/names.cmo kernel/univ.cmo \ - kernel/esubst.cmo kernel/term.cmo kernel/mod_subst.cmo kernel/sign.cmo \ - kernel/cbytecodes.cmo kernel/copcodes.cmo kernel/cemitcodes.cmo \ - kernel/declarations.cmo kernel/pre_env.cmo \ - kernel/cbytegen.cmo kernel/conv_oracle.cmo kernel/environ.cmo \ - kernel/closure.cmo kernel/reduction.cmo kernel/type_errors.cmo\ - kernel/entries.cmo \ - kernel/modops.cmo \ - kernel/inductive.cmo kernel/typeops.cmo \ - kernel/indtypes.cmo kernel/cooking.cmo kernel/term_typing.cmo \ - kernel/subtyping.cmo kernel/mod_typing.cmo kernel/safe_typing.cmo \ - library/nameops.cmo library/libnames.cmo library/summary.cmo \ - library/nametab.cmo library/libobject.cmo library/lib.cmo \ - library/goptions.cmo library/decl_kinds.cmo library/global.cmo \ - pretyping/termops.cmo pretyping/evd.cmo pretyping/reductionops.cmo \ - pretyping/inductiveops.cmo pretyping/rawterm.cmo pretyping/detyping.cmo \ - pretyping/pattern.cmo \ - interp/topconstr.cmo interp/genarg.cmo interp/ppextend.cmo \ - proofs/tacexpr.cmo \ - parsing/lexer.cmo parsing/extend.cmo \ - toplevel/vernacexpr.cmo parsing/pcoq.cmo parsing/q_util.cmo \ - parsing/q_coqast.cmo - -CAMLP4EXTENSIONSCMO=\ - parsing/argextend.cmo parsing/tacextend.cmo parsing/vernacextend.cmo - -GRAMMARSCMO=\ - parsing/g_prim.cmo parsing/g_tactic.cmo \ - parsing/g_ltac.cmo parsing/g_constr.cmo - -GRAMMARCMO=$(GRAMMARNEEDEDCMO) $(CAMLP4EXTENSIONSCMO) $(GRAMMARSCMO) - -PRINTERSCMO=\ - config/coq_config.cmo lib/lib.cma \ - kernel/names.cmo kernel/univ.cmo kernel/esubst.cmo kernel/term.cmo \ - kernel/mod_subst.cmo kernel/copcodes.cmo kernel/cemitcodes.cmo \ - kernel/sign.cmo kernel/declarations.cmo kernel/pre_env.cmo \ - kernel/cbytecodes.cmo kernel/cbytegen.cmo kernel/environ.cmo \ - kernel/conv_oracle.cmo kernel/closure.cmo kernel/reduction.cmo \ - kernel/modops.cmo kernel/type_errors.cmo kernel/inductive.cmo \ - kernel/typeops.cmo kernel/subtyping.cmo kernel/indtypes.cmo \ - kernel/cooking.cmo \ - kernel/term_typing.cmo kernel/mod_typing.cmo kernel/safe_typing.cmo \ - library/summary.cmo library/global.cmo library/nameops.cmo \ - library/libnames.cmo library/nametab.cmo library/libobject.cmo \ - library/lib.cmo library/goptions.cmo \ - pretyping/termops.cmo pretyping/evd.cmo \ - pretyping/rawterm.cmo pretyping/termops.cmo pretyping/evd.cmo \ - pretyping/reductionops.cmo pretyping/inductiveops.cmo \ - pretyping/retyping.cmo pretyping/cbv.cmo \ - pretyping/pretype_errors.cmo pretyping/recordops.cmo pretyping/typing.cmo \ - pretyping/evarutil.cmo pretyping/unification.cmo pretyping/evarconv.cmo \ - pretyping/tacred.cmo pretyping/classops.cmo pretyping/detyping.cmo \ - pretyping/indrec.cmo pretyping/coercion.cmo pretyping/cases.cmo \ - pretyping/pretyping.cmo pretyping/clenv.cmo pretyping/pattern.cmo \ - parsing/lexer.cmo interp/ppextend.cmo interp/genarg.cmo \ - interp/topconstr.cmo interp/notation.cmo interp/reserve.cmo \ - library/impargs.cmo\ - interp/constrextern.cmo interp/syntax_def.cmo interp/constrintern.cmo \ - proofs/proof_trees.cmo proofs/logic.cmo proofs/refiner.cmo \ - proofs/tacexpr.cmo \ - proofs/evar_refiner.cmo proofs/pfedit.cmo proofs/tactic_debug.cmo \ - proofs/decl_mode.cmo \ - parsing/ppconstr.cmo parsing/extend.cmo parsing/pcoq.cmo \ - parsing/printer.cmo parsing/pptactic.cmo \ - parsing/ppdecl_proof.cmo \ - parsing/tactic_printer.cmo \ - parsing/egrammar.cmo toplevel/himsg.cmo \ - toplevel/cerrors.cmo toplevel/vernacexpr.cmo toplevel/vernacinterp.cmo \ - dev/top_printers.cmo - -dev/printers.cma: $(PRINTERSCMO) - $(SHOW)'Testing $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) gramlib.cma $(PRINTERSCMO) -o test-printer - @rm -f test-printer - $(SHOW)'OCAMLC -a $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) $(PRINTERSCMO) -linkall -a -o $@ - -parsing/grammar.cma: $(GRAMMARCMO) - $(SHOW)'Testing $@' - @touch test.ml4 - $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -pp "$(CAMLP4O) $(CAMLP4EXTENSIONS) $(GRAMMARCMO) -impl" -impl test.ml4 -o test-grammar - @rm -f test-grammar test.* - $(SHOW)'OCAMLC -a $@' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) $(GRAMMARCMO) -linkall -a -o $@ - -clean:: - rm -f parsing/grammar.cma - -ML4FILES +=parsing/g_minicoq.ml4 \ - parsing/g_vernac.ml4 parsing/g_proofs.ml4 \ - parsing/g_xml.ml4 parsing/g_constr.ml4 \ - parsing/g_tactic.ml4 parsing/g_ltac.ml4 \ - parsing/argextend.ml4 parsing/tacextend.ml4 \ - parsing/vernacextend.ml4 parsing/q_constr.ml4 \ - parsing/g_decl_mode.ml4 - - -BEFOREDEPEND+= $(GRAMMARCMO) - -# BEFOREDEPEND+= parsing/pcoq.ml parsing/extend.ml - -# File using pa_macro and only necessary for parsing ml files - -parsing/q_coqast.cmo: parsing/q_coqast.ml4 - $(SHOW)'OCAMLC4 $<' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -pp "$(CAMLP4O) $(CAMLP4EXTENSIONS) $(CAMLP4OPTIONS) -impl" -c -impl $< - -# toplevel/mltop.ml4 (ifdef Byte) - -toplevel/mltop.cmo: toplevel/mltop.byteml - $(SHOW)'OCAMLC $<' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -c -impl $< -o $@ - -toplevel/mltop.cmx: toplevel/mltop.optml - $(SHOW)'OCAMLOPT $<' - $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -c -impl $< -o $@ - -toplevel/mltop.byteml: toplevel/mltop.ml4 - $(SHOW)'CAMLP4O $<' - $(HIDE)$(CAMLP4O) $(CAMLP4EXTENSIONS) pr_o.cmo -DByte -impl $< > $@ || rm -f $@ - -toplevel/mltop.optml: toplevel/mltop.ml4 - $(SHOW)'CAMLP4O $<' - $(HIDE)$(CAMLP4O) $(CAMLP4EXTENSIONS) pr_o.cmo -impl $< > $@ || rm -f $@ - -ML4FILES += toplevel/mltop.ml4 - -clean:: - rm -f toplevel/mltop.byteml toplevel/mltop.optml - -# files compiled with -rectypes - -kernel/term.cmo: kernel/term.ml - $(SHOW)'OCAMLC -rectypes $<' - $(HIDE)$(OCAMLC) -rectypes $(BYTEFLAGS) -c $< - -kernel/term.cmx: kernel/term.ml - $(SHOW)'OCAMLOPT -rectypes $<' - $(HIDE)$(OCAMLOPT) -rectypes $(OPTFLAGS) -c $< - -library/nametab.cmo: library/nametab.ml - $(SHOW)'OCAMLC -rectypes $<' - $(HIDE)$(OCAMLC) -rectypes $(BYTEFLAGS) -c $< - -library/nametab.cmx: library/nametab.ml - $(SHOW)'OCAMLOPT -rectypes $<' - $(HIDE)$(OCAMLOPT) -rectypes $(OPTFLAGS) -c $< - -proofs/tacexpr.cmo: proofs/tacexpr.ml - $(SHOW)'OCAMLC -rectypes $<' - $(HIDE)$(OCAMLC) -rectypes $(BYTEFLAGS) -c $< - -proofs/tacexpr.cmx: proofs/tacexpr.ml - $(SHOW)'OCAMLOPT -rectypes $<' - $(HIDE)$(OCAMLOPT) -rectypes $(OPTFLAGS) -c $< - -parsing/pptactic.cmo: parsing/pptactic.ml - $(SHOW)'OCAMLC -rectypes $<' - $(HIDE)$(OCAMLC) -rectypes $(BYTEFLAGS) -c $< - -parsing/pptactic.cmx: parsing/pptactic.ml - $(SHOW)'OCAMLOPT -rectypes $<' - $(HIDE)$(OCAMLOPT) -rectypes $(OPTFLAGS) -c $< - -ML4FILES += lib/pp.ml4 lib/compat.ml4 - -lib/compat.cmo: lib/compat.ml4 - $(SHOW)'OCAMLC4 $<' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -pp "$(CAMLP4O) $(CAMLP4EXTENSIONS) $(CAMLP4OPTIONS) -impl" -c -impl $< - -lib/compat.cmx: lib/compat.ml4 - $(SHOW)'OCAMLOPT $<' - $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -pp "$(CAMLP4O) $(CAMLP4EXTENSIONS) $(CAMLP4OPTIONS) -impl" -c -impl $< - -# files compiled with camlp4 because of streams syntax - -ML4FILES += contrib/xml/xml.ml4 \ - contrib/xml/acic2Xml.ml4 \ - contrib/xml/proofTree2Xml.ml4 \ - contrib/interface/line_parser.ml4 \ - tools/coq_makefile.ml4 \ - tools/coq-tex.ml4 - -# Add pr_o.cmo to circumvent a useless-warning bug when preprocessed with -# ast-based camlp4 - -parsing/lexer.cmx: parsing/lexer.ml4 - $(SHOW)'OCAMLOPT4 $<' - $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -pp "$(CAMLP4O) $(CAMLP4EXTENSIONS) pr_o.cmo `$(CAMLP4DEPS) $<` -impl" -c -impl $< - -parsing/lexer.cmo: parsing/lexer.ml4 - $(SHOW)'OCAMLC4 $<' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -pp "$(CAMLP4O) $(CAMLP4EXTENSIONS) pr_o.cmo `$(CAMLP4DEPS) $<` -impl" -c -impl $< - -# pretty printing of the revision number when compiling a checked out -# source tree -.PHONY: revision - -revision: -ifeq ($(CHECKEDOUT),1) - - /bin/rm -f revision - sed -ne '/url/s/^.*\/\([^\/"]\{1,\}\)"$$/\1/p' .svn/entries > revision - sed -ne '/revision/s/^.*"\([0-9]\{1,\}\)".*$$/r\1/p' .svn/entries >> revision -endif - -archclean:: - /bin/rm -f revision - - -########################################################################### -# Default rules -########################################################################### - -.SUFFIXES: .ml .mli .cmo .cmi .cmx .mll .mly .ml4 .v .vo .el .elc .h .c .o - -.c.o: - $(CC) -o $@ $(CFLAGS) $(CINCLUDES) -c $< - -.ml.cmo: - $(SHOW)'OCAMLC $<' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -c $< - -.mli.cmi: - $(SHOW)'OCAMLC $<' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -c $< - -.ml.cmx: - $(SHOW)'OCAMLOPT $<' - $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -c $< - -.mll.ml: - $(SHOW)'OCAMLLEX $<' - $(HIDE)$(OCAMLLEX) $< - -.mly.ml: - $(SHOW)'OCAMLYACC $<' - $(HIDE)$(OCAMLYACC) $< - -.mly.mli: - $(SHOW)'OCAMLYACC $<' - $(HIDE)$(OCAMLYACC) $< - -.ml4.cmx: - $(SHOW)'OCAMLOPT4 $<' - $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -pp "$(CAMLP4O) $(CAMLP4EXTENSIONS) `$(CAMLP4DEPS) $<` $(CAMLP4OPTIONS) -impl" -c -impl $< - -.ml4.cmo: - $(SHOW)'OCAMLC4 $<' - $(HIDE)$(OCAMLC) $(BYTEFLAGS) -pp "$(CAMLP4O) $(CAMLP4EXTENSIONS) `$(CAMLP4DEPS) $<` $(CAMLP4OPTIONS) -impl" -c -impl $< - -.el.elc: +%.elc: %.el +ifdef COQ_CONFIGURED echo "(setq load-path (cons \".\" load-path))" > $*.compile echo "(byte-compile-file \"$<\")" >> $*.compile - $(EMACS) -batch -l $*.compile - rm -f $*.compile - -########################################################################### -# Cleaning -########################################################################### - -archclean:: - rm -f config/*.cmx* config/*.[soa] - rm -f lib/*.cmx* lib/*.[soa] - rm -f kernel/*.cmx* kernel/*.[soa] - rm -f kernel/byterun/*.o - rm -f kernel/byterun/libcoqrun.a - rm -f library/*.cmx* library/*.[soa] - rm -f proofs/*.cmx* proofs/*.[soa] - rm -f tactics/*.cmx* tactics/*.[soa] - rm -f interp/*.cmx* interp/*.[soa] - rm -f parsing/*.cmx* parsing/*.[soa] - rm -f pretyping/*.cmx* pretyping/*.[soa] - rm -f toplevel/*.cmx* toplevel/*.[soa] - rm -f ide/*.cmx* ide/*.[soa] - rm -f ide/utils/*.cmx* ide/utils/*.[soa] - rm -f tools/*.cmx* tools/*.[soa] - rm -f tools/*/*.cmx* tools/*/*.[soa] - rm -f scripts/*.cmx* scripts/*.[soa] - rm -f dev/*.cmx* dev/*.[soa] - -clean:: archclean - rm -f *~ */*~ */*/*~ - rm -f gmon.out core - rm -f config/*.cm[ioa] config/*.annot - rm -f lib/*.cm[ioa] lib/*.annot - rm -f kernel/*.cm[ioa] kernel/*.annot - rm -f library/*.cm[ioa] library/*.annot - rm -f proofs/*.cm[ioa] proofs/*.annot - rm -f tactics/*.cm[ioa] tactics/*.annot - rm -f interp/*.cm[ioa] interp/*.annot - rm -f parsing/*.cm[ioa] parsing/*.ppo parsing/*.annot - rm -f pretyping/*.cm[ioa] pretyping/*.annot - rm -f toplevel/*.cm[ioa] toplevel/*.annot - rm -f ide/*.cm[ioa] ide/*.annot - rm -f ide/utils/*.cm[ioa] ide/utils/*.annot - rm -f tools/*.cm[ioa] tools/*.annot - rm -f tools/*/*.cm[ioa] tools/*/*.annot - rm -f scripts/*.cm[ioa] scripts/*.annot - rm -f dev/*.cm[ioa] dev/*.annot - rm -f */*.pp[iox] contrib/*/*.pp[iox] - -cleanconfig:: - rm -f config/Makefile config/coq_config.ml dev/ocamldebug-v7 - -########################################################################### -# Dependencies -########################################################################### - -.PHONY: alldepend dependcoq scratchdepend - -alldepend: depend dependcoq - -dependcoq: $(BEFOREDEPEND) $(COQDEP) - $(COQDEP) -slash -coqlib . -R theories Coq -R contrib Coq $(COQINCLUDES) \ - $(ALLFSETS:.vo=.v) $(ALLREALS:.vo=.v) $(ALLVO:.vo=.v) > .depend.coq - -# Build dependencies ignoring failures in building ml files from ml4 files -# This is useful to rebuild dependencies when they are strongly corrupted: -# by making scratchdepend, one gets dependencies OK for .ml files and -# .ml4 files not using fancy parsers. This is sufficient to get beforedepend -# and depend targets successfully built -scratchdepend: dependp4 - $(OCAMLDEP) $(DEPFLAGS) */*.mli */*/*.mli */*.ml */*/*.ml > .depend - -$(MAKE) -k -f Makefile.dep $(ML4FILESML) - $(OCAMLDEP) $(DEPFLAGS) */*.mli */*/*.mli */*.ml */*/*.ml > .depend - $(MAKE) depend - - -# Computing the dependencies in camlp4 files is tricky. -# We proceed in several steps: - -ML4FILESML = $(ML4FILES:.ml4=.ml) - -# Expresses dependencies of the .ml4 files w.r.t their grammars - -.PHONY: dependp4 -dependp4: - rm -f .depend.camlp4 - for f in $(ML4FILES); do \ - printf "%s" `dirname $$f`/`basename $$f .ml4`".ml: " >> .depend.camlp4; \ - echo `$(CAMLP4DEPS) $$f` >> .depend.camlp4; \ - done - -# Produce the .ml files using Makefile.dep -.PHONY: ml4filesml -ml4filesml:: .depend.camlp4 parsing/grammar.cma - $(MAKE) -f Makefile.dep $(ML4FILESML) - - -.PHONY: depend -depend: dependp4 ml4filesml $(BEFOREDEPEND) -# 1. We express dependencies of the .ml files w.r.t their grammars -# 2. Then we are able to produce the .ml files using Makefile.dep -# 3. We compute the dependencies inside the .ml files using ocamldep - $(OCAMLDEP) $(DEPFLAGS) */*.mli */*/*.mli */*.ml */*/*.ml > .depend -# 4. We express dependencies of .cmo and .cmx files w.r.t their grammars - for f in $(ML4FILES); do \ - bn=`dirname $$f`/`basename $$f .ml4`; \ - deps=`$(CAMLP4DEPS) $$f`; \ - if [ -n "$${deps}" ]; then \ - /bin/mv -f .depend .depend.tmp; \ - sed -e "\|^$${bn}.cmo|s|^$${bn}.cmo: \(.*\)$$|$${bn}.cmo: $${deps} \1|" \ - -e "\|^$${bn}.cmx|s|^$${bn}.cmx: \(.*\)$$|$${bn}.cmx: $${deps} \1|" \ - .depend.tmp > .depend; \ - /bin/rm -f .depend.tmp; \ - fi; \ - done -# 5. We express dependencies of .o files - $(CC) -MM -isystem $(CAMLHLIB) kernel/byterun/*.c >> .depend -# 6. Finally, we erase the generated .ml files - rm -f $(ML4FILESML) -# and the .cmo and .cmi files needed by grammar.cma - rm -f rm parsing/*.cm[io] lib/pp.cm[io] lib/compat.cm[io] -# 7. Since .depend contains correct dependencies .depend.devel can be deleted -# (see dev/Makefile.dir for details about this file) - if [ -e makefile ]; then >.depend.devel; else rm -f .depend.devel; fi - -ml4clean:: - rm -f $(ML4FILESML) - -clean:: - rm -f $(ML4FILESML) - -# this sets up developper supporting stuff -devel: - touch .depend.devel - $(MAKE) -f dev/Makefile.devel setup-devel - $(MAKE) $(DEBUGPRINTERS) - --include .depend --include .depend.coq - -clean:: - find . -name "\.#*" -exec rm -f {} \; - -########################################################################### + rm -f $*.compile +else + @echo "Please run ./configure first" >&2; exit 1 +endif diff --git a/Makefile.build b/Makefile.build new file mode 100644 index 00000000..e759aafe --- /dev/null +++ b/Makefile.build @@ -0,0 +1,995 @@ +####################################################################### +# v # The Coq Proof Assistant / The Coq Development Team # +# \ + kernel/byterun/coq_jumptbl.h \ + || ( RV=$$?; rm -f "$@"; exit $${RV} ) + +kernel/copcodes.ml: kernel/byterun/coq_instruct.h + sed -n -e '/^enum/p' -e 's/,//g' -e '/^ /p' \ + kernel/byterun/coq_instruct.h | \ + awk -f kernel/make-opcodes > kernel/copcodes.ml \ + || ( RV=$$?; rm -f "$@"; exit $${RV} ) + + +########################################################################### +# Main targets (coqmktop, coqtop.opt, coqtop.byte) +########################################################################### + +coqbinaries:: ${COQBINARIES} ${CSDPCERT} + +coq: coqlib tools coqbinaries + +coqlib:: theories contrib + +coqlight: theories-light tools coqbinaries + +states:: states/initial.coq + +$(COQTOPOPT): $(COQMKTOP) $(LINKCMX) $(LIBCOQRUN) + $(SHOW)'COQMKTOP -o $@' + $(HIDE)$(COQMKTOP) -opt $(OPTFLAGS) -o $@ + $(STRIP) $@ + +$(COQTOPBYTE): $(COQMKTOP) $(LINKCMO) $(LIBCOQRUN) + $(SHOW)'COQMKTOP -o $@' + $(HIDE)$(COQMKTOP) -top $(BYTEFLAGS) -o $@ + +$(COQTOP): $(ORDER_ONLY_SEP) $(BESTCOQTOP) + cd bin; ln -sf coqtop.$(BEST)$(EXE) coqtop$(EXE) + +LOCALCHKLIBS:=-I checker -I lib -I config -I kernel +CHKLIBS:=$(LOCALCHKLIBS) -I $(MYCAMLP4LIB) +CHKBYTEFLAGS:=$(CHKLIBS) $(CAMLDEBUG) $(USERFLAGS) +CHKOPTFLAGS:=$(CHKLIBS) $(CAMLDEBUGOPT) $(CAMLTIMEPROF) $(USERFLAGS) + +$(CHICKENOPT): checker/check.cmxa checker/main.ml + $(SHOW)'OCAMLOPT -o $@' + $(HIDE)$(OCAMLOPT) $(CHKOPTFLAGS) -o $@ unix.cmxa gramlib.cmxa checker/check.cmxa checker/main.ml + $(STRIP) $@ + +$(CHICKENBYTE): checker/check.cma checker/main.ml + $(SHOW)'OCAMLC -o $@' + $(HIDE)$(OCAMLC) $(CHKBYTEFLAGS) -custom -o $@ unix.cma gramlib.cma checker/check.cma checker/main.ml + +$(CHICKEN): $(ORDER_ONLY_SEP) $(BESTCHICKEN) + cd bin && ln -sf coqchk.$(BEST)$(EXE) coqchk$(EXE) + +# coqmktop + +$(COQMKTOPBYTE): $(COQMKTOPCMO) + $(SHOW)'OCAMLC -o $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -custom -o $@ str.cma unix.cma \ + $(COQMKTOPCMO) $(OSDEPLIBS) + +$(COQMKTOPOPT): $(COQMKTOPCMX) + $(SHOW)'OCAMLOPT -o $@' + $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -o $@ str.cmxa unix.cmxa \ + $(COQMKTOPCMX) $(OSDEPLIBS) + +$(COQMKTOP): $(ORDER_ONLY_SEP) $(BESTCOQMKTOP) + cd bin; ln -sf coqmktop.$(BEST)$(EXE) coqmktop$(EXE) + +scripts/tolink.ml: Makefile.build Makefile.common + $(SHOW)"ECHO... >" $@ + $(HIDE)echo "let copts = \"-cclib -lcoqrun\"" > $@ + $(HIDE)echo "let core_libs = \""$(LINKCMO)"\"" >> $@ + $(HIDE)echo "let core_objs = \""$(OBJSCMO)"\"" >> $@ + $(HIDE)echo "let ide = \""$(COQIDECMO)"\"" >> $@ + +# coqc + +$(COQCBYTE): $(COQCCMO) $(COQTOPBYTE) $(BESTCOQTOP) + $(SHOW)'OCAMLC -o $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -custom -o $@ unix.cma $(COQCCMO) $(OSDEPLIBS) + +$(COQCOPT): $(COQCCMX) $(COQTOPOPT) $(BESTCOQTOP) + $(SHOW)'OCAMLOPT -o $@' + $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -o $@ unix.cmxa $(COQCCMX) $(OSDEPLIBS) + +$(COQC): $(ORDER_ONLY_SEP) $(BESTCOQC) + cd bin; ln -sf coqc.$(BEST)$(EXE) coqc$(EXE) + +# we provide targets for each subdirectory + +lib: $(LIBREP) +kernel: $(KERNEL) +byterun: $(BYTERUN) +library: $(LIBRARY) +proofs: $(PROOFS) +tactics: $(TACTICS) +interp: $(INTERP) +parsing: $(PARSING) +pretyping: $(PRETYPING) +highparsing: $(HIGHPARSING) +toplevel: $(TOPLEVEL) +hightactics: $(HIGHTACTICS) + +# target for libraries + +lib/lib.cma: $(LIBREP) + $(SHOW)'OCAMLC -a -o $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(LIBREP) + +lib/lib.cmxa: $(LIBREP:.cmo=.cmx) + $(SHOW)'OCAMLOPT -a -o $@' + $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(LIBREP:.cmo=.cmx) + +kernel/kernel.cma: $(KERNEL) + $(SHOW)'OCAMLC -a -o $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(KERNEL) + +kernel/kernel.cmxa: $(KERNEL:.cmo=.cmx) + $(SHOW)'OCAMLOPT -a -o $@' + $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(KERNEL:.cmo=.cmx) + +checker/check.cma: $(MCHECKER) + $(SHOW)'OCAMLC -a -o $@' + $(HIDE)$(OCAMLC) $(CHKBYTEFLAGS) -a -o $@ $(MCHECKER) + +checker/check.cmxa: $(MCHECKER:.cmo=.cmx) + $(SHOW)'OCAMLOPT -a -o $@' + $(HIDE)$(OCAMLOPT) $(CHKOPTFLAGS) -a -o $@ $(MCHECKER:.cmo=.cmx) + +library/library.cma: $(LIBRARY) + $(SHOW)'OCAMLC -a -o $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(LIBRARY) + +library/library.cmxa: $(LIBRARY:.cmo=.cmx) + $(SHOW)'OCAMLOPT -a -o $@' + $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(LIBRARY:.cmo=.cmx) + +pretyping/pretyping.cma: $(PRETYPING) + $(SHOW)'OCAMLC -a -o $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(PRETYPING) + +pretyping/pretyping.cmxa: $(PRETYPING:.cmo=.cmx) + $(SHOW)'OCAMLOPT -a -o $@' + $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(PRETYPING:.cmo=.cmx) + +interp/interp.cma: $(INTERP) + $(SHOW)'OCAMLC -a -o $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(INTERP) + +interp/interp.cmxa: $(INTERP:.cmo=.cmx) + $(SHOW)'OCAMLOPT -a -o $@' + $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(INTERP:.cmo=.cmx) + +parsing/parsing.cma: $(PARSING) + $(SHOW)'OCAMLC -a -o $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(PARSING) + +parsing/parsing.cmxa: $(PARSING:.cmo=.cmx) + $(SHOW)'OCAMLOPT -a -o $@' + $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(PARSING:.cmo=.cmx) + +proofs/proofs.cma: $(PROOFS) + $(SHOW)'OCAMLC -a -o $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(PROOFS) + +proofs/proofs.cmxa: $(PROOFS:.cmo=.cmx) + $(SHOW)'OCAMLOPT -a -o $@' + $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(PROOFS:.cmo=.cmx) + +tactics/tactics.cma: $(TACTICS) + $(SHOW)'OCAMLC -a -o $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(TACTICS) + +tactics/tactics.cmxa: $(TACTICS:.cmo=.cmx) + $(SHOW)'OCAMLOPT -a -o $@' + $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(TACTICS:.cmo=.cmx) + +toplevel/toplevel.cma: $(TOPLEVEL) + $(SHOW)'OCAMLC -a -o $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(TOPLEVEL) + +toplevel/toplevel.cmxa: $(TOPLEVEL:.cmo=.cmx) + $(SHOW)'OCAMLOPT -a -o $@' + $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(TOPLEVEL:.cmo=.cmx) + +parsing/highparsing.cma: $(HIGHPARSING) + $(SHOW)'OCAMLC -a -o $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(HIGHPARSING) + +parsing/highparsing.cmxa: $(HIGHPARSING:.cmo=.cmx) + $(SHOW)'OCAMLOPT -a -o $@' + $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(HIGHPARSING:.cmo=.cmx) + +tactics/hightactics.cma: $(HIGHTACTICS) + $(SHOW)'OCAMLC -a -o $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(HIGHTACTICS) + +tactics/hightactics.cmxa: $(HIGHTACTICS:.cmo=.cmx) + $(SHOW)'OCAMLOPT -a -o $@' + $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(HIGHTACTICS:.cmo=.cmx) + +contrib/contrib.cma: $(CONTRIB) + $(SHOW)'OCAMLC -a -o $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(CONTRIB) + +contrib/contrib.cmxa: $(CONTRIB:.cmo=.cmx) + $(SHOW)'OCAMLOPT -a -o $@' + $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(CONTRIB:.cmo=.cmx) + +########################################################################### +# Csdp to micromega special targets +########################################################################### + +ifeq ($(BEST),opt) +bin/csdpcert$(EXE): $(CSDPCERTCMX) + $(SHOW)'OCAMLOPT -o $@' + $(HIDE)$(OCAMLOPT) $(OPTFLAGS) nums.cmxa -o $@ $(CSDPCERTCMX) +else +bin/csdpcert$(EXE): $(CSDPCERTCMO) + $(SHOW)'OCAMLC -o $@' + $(HIDE)$(OCAMLC) -custom $(BYTEFLAGS) nums.cma -o $@ $(CSDPCERTCMO) +endif + +########################################################################### +# CoqIde special targets +########################################################################### + +# target to build CoqIde +coqide:: coqide-files coqide-binaries states + +COQIDEFLAGS=-thread $(COQIDEINCLUDES) + +.SUFFIXES:.vo + +IDEFILES=ide/coq.png ide/.coqide-gtk2rc + +coqide-binaries: coqide-$(HASCOQIDE) +coqide-no: +coqide-byte: $(COQIDEBYTE) $(COQIDE) +coqide-opt: $(COQIDEBYTE) $(COQIDEOPT) $(COQIDE) +coqide-files: $(IDEFILES) + +$(COQIDEOPT): $(COQMKTOP) $(LINKCMX) $(LIBCOQRUN) ide/ide.cmxa + $(SHOW)'COQMKTOP -o $@' + $(HIDE)$(COQMKTOP) -ide -opt $(OPTFLAGS) -o $@ + $(STRIP) $@ + +$(COQIDEBYTE): $(COQMKTOP) $(LINKCMO) $(LIBCOQRUN) ide/ide.cma + $(SHOW)'COQMKTOP -o $@' + $(HIDE)$(COQMKTOP) -g -ide -top $(BYTEFLAGS) -o $@ + +$(COQIDE): + cd bin; ln -sf coqide.$(HASCOQIDE)$(EXE) coqide$(EXE) + +ide/%.cmo: ide/%.ml | ide/%.ml.d + $(SHOW)'OCAMLC $<' + $(HIDE)$(OCAMLC) -g $(COQIDEFLAGS) $(BYTEFLAGS) -c $< + +ide/%.cmi: ide/%.mli | ide/%.mli.d + $(SHOW)'OCAMLC $<' + $(HIDE)$(OCAMLC) -g $(COQIDEFLAGS) $(BYTEFLAGS) -c $< + +ide/%.cmx: ide/%.ml | ide/%.ml.d + $(SHOW)'OCAMLOPT $<' + $(HIDE)$(OCAMLOPT) $(COQIDEFLAGS) $(OPTFLAGS) -c $< + +ide/ide.cma: $(COQIDECMO) + $(SHOW)'OCAMLC -a -o $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -a -o $@ $(COQIDECMO) + +ide/ide.cmxa: $(COQIDECMO:.cmo=.cmx) + $(SHOW)'OCAMLOPT -a -o $@' + $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -a -o $@ $(COQIDECMO:.cmo=.cmx) + +# install targets + +FULLIDELIB=$(FULLCOQLIB)/ide + +install-coqide:: install-ide-$(HASCOQIDE) install-ide-files install-ide-info + +install-ide-no: + +install-ide-byte: + $(MKDIR) $(FULLBINDIR) + $(INSTALLBIN) $(COQIDEBYTE) $(FULLBINDIR) + cd $(FULLBINDIR); ln -sf coqide.byte$(EXE) coqide$(EXE) + +install-ide-opt: + $(MKDIR) $(FULLBINDIR) + $(INSTALLBIN) $(COQIDEBYTE) $(COQIDEOPT) $(FULLBINDIR) + cd $(FULLBINDIR); ln -sf coqide.opt$(EXE) coqide$(EXE) + +install-ide-files: + $(MKDIR) $(FULLIDELIB) + $(INSTALLLIB) $(IDEFILES) $(FULLIDELIB) + +install-ide-info: + $(MKDIR) $(FULLIDELIB) + $(INSTALLLIB) ide/FAQ $(FULLIDELIB) + +########################################################################### +# Pcoq: special binaries for debugging (coq-interface, parser) +########################################################################### + +# target to build Pcoq +pcoq: pcoq-binaries pcoq-files + +pcoq-binaries:: $(COQINTERFACE) + +bin/coq-interface$(EXE): $(COQMKTOP) $(LINKCMO) $(LIBCOQRUN) $(INTERFACE) + $(SHOW)'COQMKTOP -o $@' + $(HIDE)$(COQMKTOP) -top $(BYTEFLAGS) -o $@ $(INTERFACE) + +bin/coq-interface.opt$(EXE): $(COQMKTOP) $(LINKCMX) $(LIBCOQRUN) $(INTERFACECMX) + $(SHOW)'COQMKTOP -o $@' + $(HIDE)$(COQMKTOP) -opt $(OPTFLAGS) -o $@ $(INTERFACECMX) + +bin/parser$(EXE):$(LIBCOQRUN) $(PARSERCMO) + $(SHOW)'OCAMLC -o $@' + $(HIDE)$(OCAMLC) -custom -linkall $(BYTEFLAGS) -o $@ \ + dynlink.cma nums.cma $(LIBCOQRUN) $(CMA) $(PARSERCMO) + +bin/parser.opt$(EXE): $(LIBCOQRUN) $(PARSERCMX) + $(SHOW)'OCAMLOPT -o $@' + $(HIDE)$(OCAMLOPT) -linkall $(OPTFLAGS) -o $@ \ + $(LIBCOQRUN) nums.cmxa $(CMXA) $(PARSERCMX) + +pcoq-files:: $(INTERFACEVO) $(INTERFACERC) + + +# install targets +install-pcoq:: install-pcoq-binaries install-pcoq-files install-pcoq-manpages + +install-pcoq-binaries:: + $(MKDIR) $(FULLBINDIR) + $(INSTALLBIN) $(COQINTERFACE) $(FULLBINDIR) + +install-pcoq-files:: + $(MKDIR) $(FULLCOQLIB)/contrib/interface + $(INSTALLLIB) $(INTERFACERC) $(FULLCOQLIB)/contrib/interface + +install-pcoq-manpages: + $(MKDIR) $(FULLMANDIR)/man1 + $(INSTALLLIB) $(PCOQMANPAGES) $(FULLMANDIR)/man1 + +########################################################################### +# tests +########################################################################### + +check:: world pcoq + cd test-suite; \ + env COQBIN=../bin COQLIB=.. ./check -$(BEST) | tee check.log + if grep -F 'Error!' test-suite/check.log ; then false; fi + +########################################################################### +# theories and contrib files +########################################################################### + +init: $(INITVO) + +theories: $(THEORIESVO) +theories-light: $(THEORIESLIGHTVO) + +logic: $(LOGICVO) +arith: $(ARITHVO) +bool: $(BOOLVO) +narith: $(NARITHVO) +zarith: $(ZARITHVO) +qarith: $(QARITHVO) +lists: $(LISTSVO) +strings: $(STRINGSVO) +sets: $(SETSVO) +fsets: $(FSETSVO) +allfsets: $(ALLFSETS) +relations: $(RELATIONSVO) +wellfounded: $(WELLFOUNDEDVO) +# reals +reals: $(REALSVO) +allreals: $(ALLREALS) +setoids: $(SETOIDSVO) +sorting: $(SORTINGVO) +# numbers +natural: $(NATURALVO) +integer: $(INTEGERVO) +rational: $(RATIONALVO) +numbers: $(NUMBERSVO) + +noreal: logic arith bool zarith qarith lists sets fsets relations \ + wellfounded setoids sorting + +########################################################################### +# contribs (interface not included) +########################################################################### + +contrib: $(CONTRIBVO) $(CONTRIBCMO) +omega: $(OMEGAVO) $(OMEGACMO) $(ROMEGAVO) $(ROMEGACMO) +micromega: $(MICROMEGAVO) $(MICROMEGACMO) $(CSDPCERT) +ring: $(RINGVO) $(RINGCMO) +setoid_ring: $(NEWRINGVO) $(NEWRINGCMO) +dp: $(DPCMO) +xml: $(XMLVO) $(XMLCMO) +extraction: $(EXTRACTIONCMO) +field: $(FIELDVO) $(FIELDCMO) +fourier: $(FOURIERVO) $(FOURIERCMO) +jprover: $(JPROVERVO) $(JPROVERCMO) +funind: $(FUNINDCMO) $(FUNINDVO) +cc: $(CCVO) $(CCCMO) +programs subtac: $(SUBTACVO) $(SUBTACCMO) +rtauto: $(RTAUTOVO) $(RTAUTOCMO) + +########################################################################### +# rules to make theories, contrib and states +########################################################################### + +states/initial.coq: states/MakeInitial.v $(INITVO) $(VO_TOOLS_STRICT) | states/MakeInitial.v.d $(VO_TOOLS_ORDER_ONLY) + $(SHOW)'BUILD $@' + $(HIDE)$(BOOTCOQTOP) -batch -notop -silent -nois -load-vernac-source states/MakeInitial.v -outputstate states/initial.coq + +theories/Init/%.vo theories/Init/%.glob: theories/Init/%.v $(VO_TOOLS_STRICT) | theories/Init/%.v.d $(VO_TOOLS_ORDER_ONLY) + $(SHOW)'COQC -nois $<' + $(HIDE)rm -f theories/Init/$*.glob + $(HIDE)$(BOOTCOQTOP) -dump-glob theories/Init/$*.glob -nois -compile theories/Init/$* + +theories/Numbers/Natural/BigN/NMake.v: theories/Numbers/Natural/BigN/NMake_gen.ml + $(OCAML) $< > $@ + +########################################################################### +# tools +########################################################################### + +printers: $(DEBUGPRINTERS) + +tools:: $(TOOLS) $(DEBUGPRINTERS) + +$(COQDEP): $(COQDEPCMO) + $(SHOW)'OCAMLC -o $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -custom -o $@ unix.cma $(COQDEPCMO) $(OSDEPLIBS) + +$(GALLINA): $(GALLINACMO) + $(SHOW)'OCAMLC -o $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -custom -o $@ $(GALLINACMO) + +$(COQMAKEFILE): tools/coq_makefile.cmo config/coq_config.cmo + $(SHOW)'OCAMLC -o $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -custom -o $@ str.cma config/coq_config.cmo tools/coq_makefile.cmo + +$(COQTEX): tools/coq-tex.cmo + $(SHOW)'OCAMLC -o $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -custom -o $@ str.cma tools/coq-tex.cmo + +$(COQWC): tools/coqwc.cmo + $(SHOW)'OCAMLC -o $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -custom -o $@ tools/coqwc.cmo + +$(COQDOC): $(COQDOCCMO) + $(SHOW)'OCAMLC -o $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -custom -o $@ str.cma unix.cma $(COQDOCCMO) + +########################################################################### +# minicoq +########################################################################### + +$(MINICOQ): $(MINICOQCMO) + $(SHOW)'OCAMLC -o $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -custom -o $@ $(CMA) $(MINICOQCMO) $(OSDEPLIBS) + +########################################################################### +# Installation +########################################################################### + +#These variables are intended to be set by the caller to make +#COQINSTALLPREFIX= +#OLDROOT= + + # Can be changed for a local installation (to make packages). + # You must NOT put a "/" at the end (Cygnus for win32 does not like "//"). + +FULLBINDIR=$(BINDIR:"$(OLDROOT)%="$(COQINSTALLPREFIX)%) +FULLCOQLIB=$(COQLIB:"$(OLDROOT)%="$(COQINSTALLPREFIX)%) +FULLMANDIR=$(MANDIR:"$(OLDROOT)%="$(COQINSTALLPREFIX)%) +FULLEMACSLIB=$(EMACSLIB:"$(OLDROOT)%="$(COQINSTALLPREFIX)%) +FULLCOQDOCDIR=$(COQDOCDIR:"$(OLDROOT)%="$(COQINSTALLPREFIX)%) + +install-coq: install-binaries install-library install-coq-info +install-coqlight: install-binaries install-library-light + +install-binaries:: install-$(BEST) install-tools + +install-byte:: + $(MKDIR) $(FULLBINDIR) + $(INSTALLBIN) $(COQMKTOP) $(COQC) $(COQTOPBYTE) $(FULLBINDIR) + cd $(FULLBINDIR); ln -sf coqtop.byte$(EXE) coqtop$(EXE) + +install-opt:: + $(MKDIR) $(FULLBINDIR) + $(INSTALLBIN) $(COQMKTOP) $(COQC) $(COQTOPBYTE) $(COQTOPOPT) $(FULLBINDIR) + cd $(FULLBINDIR); ln -sf coqtop.opt$(EXE) coqtop$(EXE) + +install-tools:: + $(MKDIR) $(FULLBINDIR) + # recopie des fichiers de style pour coqide + $(MKDIR) $(FULLCOQLIB)/tools/coqdoc + touch $(FULLCOQLIB)/tools/coqdoc/coqdoc.sty $(FULLCOQLIB)/tools/coqdoc/coqdoc.css # to have the mode according to umask (bug #1715) + $(INSTALLLIB) tools/coqdoc/coqdoc.css tools/coqdoc/coqdoc.sty $(FULLCOQLIB)/tools/coqdoc + $(INSTALLBIN) $(TOOLS) $(FULLBINDIR) + +install-library: + $(MKDIR) $(FULLCOQLIB) + for f in $(LIBFILES); do \ + $(MKDIR) $(FULLCOQLIB)/`dirname $$f`; \ + $(INSTALLLIB) $$f $(FULLCOQLIB)/`dirname $$f`; \ + done + $(MKDIR) $(FULLCOQLIB)/states + $(INSTALLLIB) states/*.coq $(FULLCOQLIB)/states + $(MKDIR) $(FULLCOQLIB)/user-contrib + $(INSTALLLIB) $(LINKCMO) $(LINKCMX) $(GRAMMARCMA) $(FULLCOQLIB) + find . -name \*.cmi -exec $(INSTALLLIB) {} $(FULLCOQLIB) \; + +install-library-light: + $(MKDIR) $(FULLCOQLIB) + for f in $(LIBFILESLIGHT); do \ + $(MKDIR) $(FULLCOQLIB)/`dirname $$f`; \ + $(INSTALLLIB) $$f $(FULLCOQLIB)/`dirname $$f`; \ + done + $(MKDIR) $(FULLCOQLIB)/states + $(INSTALLLIB) states/*.coq $(FULLCOQLIB)/states + +install-allreals:: + for f in $(ALLREALS); do \ + $(MKDIR) $(FULLCOQLIB)/`dirname $$f`; \ + $(INSTALLLIB) $$f $(FULLCOQLIB)/`dirname $$f`; \ + done + +install-coq-info: install-coq-manpages install-emacs install-latex + +install-coq-manpages: + $(MKDIR) $(FULLMANDIR)/man1 + $(INSTALLLIB) $(MANPAGES) $(FULLMANDIR)/man1 + +install-emacs: + $(MKDIR) $(FULLEMACSLIB) + $(INSTALLLIB) tools/coq.el tools/coq-inferior.el $(FULLEMACSLIB) + +# command to update TeX' kpathsea database +#UPDATETEX = $(MKTEXLSR) /usr/share/texmf /var/spool/texmf $(BASETEXDIR) > /dev/null + +install-latex: + $(MKDIR) $(FULLCOQDOCDIR) + $(INSTALLLIB) tools/coqdoc/coqdoc.sty $(FULLCOQDOCDIR) +# -$(UPDATETEX) + +########################################################################### +# Documentation of the source code (using ocamldoc) +########################################################################### + +.PHONY: source-doc + +source-doc: + if !(test -d $(SOURCEDOCDIR)); then mkdir $(SOURCEDOCDIR); fi + $(OCAMLDOC) -html -rectypes $(LOCALINCLUDES) -d $(SOURCEDOCDIR) `find . -name "*.ml"` + + +########################################################################### +### Special rules +########################################################################### + +dev/printers.cma: $(PRINTERSCMO) + $(SHOW)'Testing $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) gramlib.cma $(PRINTERSCMO) -o test-printer + @rm -f test-printer + $(SHOW)'OCAMLC -a $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) $(PRINTERSCMO) -linkall -a -o $@ + +parsing/grammar.cma: $(GRAMMARCMO) + $(SHOW)'Testing $@' + @touch test.ml4 + $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -pp "$(CAMLP4O) $(CAMLP4EXTENDFLAGS) $(GRAMMARCMO) -impl" -impl test.ml4 -o test-grammar + @rm -f test-grammar test.* + $(SHOW)'OCAMLC -a $@' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) $(GRAMMARCMO) -linkall -a -o $@ + +# toplevel/mltop.ml4 (ifdef Byte) + +toplevel/mltop.cmo: toplevel/mltop.byteml | toplevel/mltop.ml4.ml.d toplevel/mltop.ml4.d + $(SHOW)'OCAMLC $<' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -c -impl $< -o $@ + +toplevel/mltop.cmx: toplevel/mltop.optml | toplevel/mltop.ml4.ml.d toplevel/mltop.ml4.d + $(SHOW)'OCAMLOPT $<' + $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -c -impl $< -o $@ + +## This works depency-wise because the dependencies of the +## .{opt,byte}ml files are those we deduce from the .ml4 file. +## In other words, the Byte-only code doesn't import a new module. +toplevel/mltop.byteml: toplevel/mltop.ml4 # no camlp4deps here + $(SHOW)'CAMLP4O $<' + $(HIDE)$(CAMLP4O) $(CAMLP4EXTENDFLAGS) pr_o.cmo `$(CAMLP4USE) $<` -DByte -impl $< > $@ \ + || ( RV=$$?; rm -f "$@"; exit $${RV} ) + +toplevel/mltop.optml: toplevel/mltop.ml4 # no camlp4deps here + $(SHOW)'CAMLP4O $<' + $(HIDE)$(CAMLP4O) $(CAMLP4EXTENDFLAGS) pr_o.cmo `$(CAMLP4USE) $<` -impl $< > $@ \ + || ( RV=$$?; rm -f "$@"; exit $${RV} ) + +# files compiled with -rectypes + +define rectypes-rules-template +$(1:.ml=.cmo): $(1) | $(1).d + $(SHOW)'OCAMLC -rectypes $$<' + $(HIDE)$(OCAMLC) -rectypes $(BYTEFLAGS) -c $$< + +$(1:.ml=.cmx): $(1) | $(1).d + $(SHOW)'OCAMLOPT -rectypes $$<' + $(HIDE)$(OCAMLOPT) -rectypes $(OPTFLAGS) -c $$< + +endef + +$(foreach f,$(RECTYPESML),$(eval $(call rectypes-rules-template,$(f)))) + +# pretty printing of the revision number when compiling a checked out +# source tree +.PHONY: revision + +revision: + $(SHOW)'CHECK revision' + $(HIDE)rm -f revision.new +ifeq ($(CHECKEDOUT),svn) + $(HIDE)set -e; \ + if test -x "`which svn`"; then \ + export LC_ALL=C;\ + svn info . | sed -ne '/URL/s/.*\/\([^\/]\{1,\}\)/\1/p' > revision.new; \ + svn info . | sed -ne '/Revision/s/Revision: \([0-9]\{1,\}\)/\1/p'>> revision.new; \ + fi +endif +ifeq ($(CHECKEDOUT),gnuarch) + $(HIDE)set -e; \ + if test -x "`which tla`"; then \ + LANG=C; export LANG; \ + tla tree-version > revision.new ; \ + tla tree-revision | sed -ne 's|.*--||p' >> revision.new ; \ + fi +endif +ifeq ($(CHECKEDOUT),git) + $(HIDE)set -e; \ + if test -x "`which git`"; then \ + LANG=C; export LANG; \ + GIT_BRANCH=$$(git branch -a | sed -ne '/^\* /s/^\* \(.*\)/\1/p'); \ + GIT_HOST=$$(hostname --fqdn); \ + GIT_PATH=$$(pwd); \ + (echo "$${GIT_HOST}:$${GIT_PATH},$${GIT_BRANCH}") > revision.new; \ + git log -1 | sed -ne '/^commit /s/^commit[[:space:]]\+\(.*\)/\1/p' >> revision.new; \ + fi +endif + $(HIDE)set -e; \ + if test -e revision.new; then \ + if test -e revision; then \ + if test "`cat revision`" = "`cat revision.new`" ; then \ + rm -f revision.new; \ + else \ + mv -f revision.new revision; \ + fi; \ + else \ + mv -f revision.new revision; \ + fi \ + fi + +########################################################################### +# Default rules +########################################################################### + +checker/%.cmo: checker/%.ml | checker/%.ml.d + $(SHOW)'OCAMLC $<' + $(HIDE)$(OCAMLC) -c $(CHKBYTEFLAGS) $< + +checker/%.cmx: checker/%.ml | checker/%.ml.d + $(SHOW)'OCAMLOPT $<' + $(HIDE)$(OCAMLOPT) -c $(CHKOPTFLAGS) $< + +checker/%.cmi: checker/%.mli | checker/%.mli.d + $(SHOW)'OCAMLC $<' + $(HIDE)$(OCAMLC) -c $(CHKBYTEFLAGS) $< + +%.o: %.c + $(SHOW)'CC $<' + $(HIDE)$(CC) -o $@ $(CFLAGS) $(CINCLUDES) -c $< + +ifdef KEEP_ML4_PREPROCESSED +.PRECIOUS: %.ml4-preprocessed +%.cmo: %.ml4-preprocessed | %.ml4.ml.d + $(SHOW)'OCAMLC $<' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -c -impl $< + +%.cmx: %.ml4-preprocessed | %.ml4.ml.d + $(SHOW)'OCAMLOPT $<' + $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -c -impl $< +else +%.cmo: %.ml4 | %.ml4.ml.d %.ml4.d + $(SHOW)'OCAMLC4 $<' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -pp "$(CAMLP4O) $(CAMLP4EXTENDFLAGS) `$(CAMLP4USE) $<` `$(CAMLP4DEPS) $<` $(CAMLP4COMPAT) -impl" -c -impl $< + +%.cmx: %.ml4 | %.ml4.ml.d %.ml4.d + $(SHOW)'OCAMLOPT4 $<' + $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -pp "$(CAMLP4O) $(CAMLP4EXTENDFLAGS) `$(CAMLP4USE) $<` `$(CAMLP4DEPS) $<` $(CAMLP4COMPAT) -impl" -c -impl $< +endif + +%.cmo: %.ml | %.ml.d + $(SHOW)'OCAMLC $<' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -c $< + +%.cmi: %.mli | %.mli.d + $(SHOW)'OCAMLC $<' + $(HIDE)$(OCAMLC) $(BYTEFLAGS) -c $< + +%.cmx: %.ml | %.ml.d + $(SHOW)'OCAMLOPT $<' + $(HIDE)$(OCAMLOPT) $(OPTFLAGS) -c $< + +%.ml: %.mll + $(SHOW)'OCAMLLEX $<' + $(HIDE)$(OCAMLLEX) "$*.mll" -o $@ + +%.ml %.mli: %.mly + $(SHOW)'OCAMLYACC $<' + $(HIDE)$(OCAMLYACC) $< + +%.ml4-preprocessed: %.ml4 | %.ml4.d + $(SHOW)'CAMLP4O $<' + $(HIDE)$(CAMLP4O) $(CAMLP4EXTENDFLAGS) pr_o.cmo `$(CAMLP4USE) $<` `$(CAMLP4DEPS) $<` $(CAMLP4COMPAT) -impl $< > $@ \ + || ( RV=$$?; rm -f "$@"; exit $${RV} ) + +%.vo %.glob: %.v states/initial.coq $(VO_TOOLS_STRICT) | %.v.d $(VO_TOOLS_ORDER_ONLY) + $(SHOW)'COQC $<' + $(HIDE)rm -f $*.glob + $(HIDE)$(BOOTCOQTOP) -dump-glob $*.glob -compile $* +ifdef VALIDATE + $(SHOW)'COQCHK $(shell basename $*)' + $(HIDE)$(BESTCHICKEN) -silent -norec $(shell basename $*) \ + || ( RV=$$?; rm -f "$@"; exit $${RV} ) +endif + +########################################################################### +# Dependencies +########################################################################### + +# .ml4.d contains the dependencies to generate the .ml from the .ml4 +# NOT to generate object code. +ifdef NO_RECOMPILE_ML4 + SEP:=$(ORDER_ONLY_SEP) +else + SEP:= +endif +%.ml4.d: $(D_DEPEND_BEFORE_SRC) %.ml4 + $(SHOW)'CAMLP4DEPS $<' + $(HIDE)( /bin/echo -n '$*.cmo $*.cmx $*.ml4.ml.d $*.ml4-preprocessed: $(SEP)' && $(CAMLP4DEPS) "$<" ) > "$@" \ + || ( RV=$$?; rm -f "$@"; exit $${RV} ) + +%.ml4.ml.d: $(D_DEPEND_BEFORE_SRC) %.ml4 $(D_DEPEND_AFTER_SRC) $(GENFILES) $(ML4FILES:.ml4=.ml) %.ml4.d +#Critical section: +# Nobody (in a make -j) should touch the .ml file here. + $(SHOW)'OCAMLDEP4 $<' + $(HIDE)$(CAMLP4O) $(CAMLP4EXTENDFLAGS) pr_o.cmo `$(CAMLP4USE) $<` `$(CAMLP4DEPS) $<` $(CAMLP4COMPAT) -impl $< -o $*.ml \ + || ( RV=$$?; rm -f "$*.ml"; exit $${RV} ) + $(HIDE)$(OCAMLDEP) $(DEPFLAGS) $*.ml | sed '' > "$@" || ( RV=$$?; rm -f "$@"; exit $${RV} ) + $(HIDE)echo "let keep_ocamldep_happy Do_not_compile_me = assert false" > $*.ml +#End critical section + +checker/%.ml.d: $(D_DEPEND_BEFORE_SRC) checker/%.ml $(D_DEPEND_AFTER_SRC) + $(SHOW)'OCAMLDEP $<' + $(HIDE)$(OCAMLDEP) -slash $(LOCALCHKLIBS) "$<" | sed '' > "$@" + +checker/%.mli.d: $(D_DEPEND_BEFORE_SRC) checker/%.mli $(D_DEPEND_AFTER_SRC) + $(SHOW)'OCAMLDEP $<' + $(HIDE)$(OCAMLDEP) -slash $(LOCALCHKLIBS) "$<" | sed '' > "$@" + +%.ml.d: $(D_DEPEND_BEFORE_SRC) %.ml $(D_DEPEND_AFTER_SRC) $(GENFILES) $(ML4FILES:.ml4=.ml) + $(SHOW)'OCAMLDEP $<' + $(HIDE)$(OCAMLDEP) $(DEPFLAGS) "$<" | sed '' > "$@" + +%.mli.d: $(D_DEPEND_BEFORE_SRC) %.mli $(D_DEPEND_AFTER_SRC) $(GENFILES) $(ML4FILES:.ml4=.ml) + $(SHOW)'OCAMLDEP $<' + $(HIDE)$(OCAMLDEP) $(DEPFLAGS) "$<" | sed '' > "$@" + +## Veerry nasty hack to keep ocamldep happy +%.ml: | %.ml4 + $(SHOW)'TOUCH $@' + $(HIDE)echo "let keep_ocamldep_happy Do_not_compile_me = assert false" > $@ \ + || ( RV=$$?; rm -f "$@"; exit $${RV} ) + +%.v.d: $(D_DEPEND_BEFORE_SRC) %.v $(D_DEPEND_AFTER_SRC) $(COQDEP) $(GENVFILES) + $(SHOW)'COQDEP $<' + $(HIDE)$(COQDEP) -glob -slash -boot $(COQINCLUDES) "$<" > "$@" \ + || ( RV=$$?; rm -f "$@"; exit $${RV} ) + +%.c.d: $(D_DEPEND_BEFORE_SRC) %.c $(D_DEPEND_AFTER_SRC) $(GENHFILES) + $(SHOW)'CCDEP $<' + $(HIDE)$(CC) -MM -MQ "$@" -MQ "$(<:.c=.o)" $(CFLAGS) -isystem $(CAMLHLIB) $< > $@ \ + || ( RV=$$?; rm -f "$@"; exit $${RV} ) + +.SECONDARY: $(GENFILES) + +########################################################################### +# this sets up developper supporting stuff +########################################################################### + +.PHONY: devel +devel: $(DEBUGPRINTERS) + +########################################################################### + + +%.dot: %.mli + $(OCAMLDOC) -rectypes $(MLINCLUDES) $(ODOCDOTOPTS) -o $@ $< + +%.types.dot: %.mli + $(OCAMLDOC) -rectypes $(MLINCLUDES) $(ODOCDOTOPTS) -dot-types -o $@ $< + +%.dep.ps: %.dot + $(DOT) $(DOTOPTS) -o $@ $< + +kernel/kernel.dot: $(KERNELMLI:.mli=.cmi) + $(OCAMLDOC) -rectypes $(MLINCLUDES) $(ODOCDOTOPTS) -o $@ $(KERNELMLI) + +interp/interp.dot: $(INTERPMLI:.mli=.cmi) + $(OCAMLDOC) -rectypes $(MLINCLUDES) $(ODOCDOTOPTS) -o $@ $(INTERPMLI) + +pretyping/pretyping.dot: $(PRETYPINGMLI:.mli=.cmi) + $(OCAMLDOC) -rectypes $(MLINCLUDES) $(ODOCDOTOPTS) -o $@ $(PRETYPINGMLI) + +library/library.dot: $(LIBRARYMLI:.mli=.cmi) + $(OCAMLDOC) -rectypes $(MLINCLUDES) $(ODOCDOTOPTS) -o $@ $(LIBRARYMLI) + +parsing/parsing.dot: $(PARSINGMLI:.mli=.cmi) + $(OCAMLDOC) -rectypes $(MLINCLUDES) $(ODOCDOTOPTS) -o $@ $(PARSINGMLI) + +tactics/tactics.dot: $(TACTICSMLI:.mli=.cmi) + $(OCAMLDOC) -rectypes $(MLINCLUDES) $(ODOCDOTOPTS) -o $@ $(TACTICSMLI) + +proofs/proofs.dot: $(PROOFSMLI:.mli=.cmi) + $(OCAMLDOC) -rectypes $(MLINCLUDES) $(ODOCDOTOPTS) -o $@ $(PROOFSMLI) + +toplevel/toplevel.dot: $(TOPLEVELMLI:.mli=.cmi) + $(OCAMLDOC) -rectypes $(MLINCLUDES) $(ODOCDOTOPTS) -o $@ $(TOPLEVELMLI) + +coq.dot: $(COQMLI:.mli=.cmi) + $(OCAMLDOC) -rectypes $(MLINCLUDES) $(ODOCDOTOPTS) -o $@ $(COQMLI) + + +# For emacs: +# Local Variables: +# mode: makefile +# End: diff --git a/Makefile.common b/Makefile.common new file mode 100644 index 00000000..509ceedb --- /dev/null +++ b/Makefile.common @@ -0,0 +1,890 @@ +####################################################################### +# v # The Coq Proof Assistant / The Coq Development Team # +# $@ || rm -f $@ diff --git a/Makefile.doc b/Makefile.doc new file mode 100644 index 00000000..4046d5e7 --- /dev/null +++ b/Makefile.doc @@ -0,0 +1,240 @@ +# Makefile for the Coq documentation + +# COQSRC needs to be set to a coq source repository + +# To compile documentation, you need the following tools: +# Dvi: latex (latex2e), bibtex, makeindex +# Pdf: pdflatex +# Html: hevea (http://hevea.inria.fr) >= 1.05 + +###################################################################### +### General rules +###################################################################### + +.PHONY: doc doc-html doc-pdf doc-ps refman tutorial stdlib faq rectutorial + +doc: doc-html doc-pdf doc-ps ide/index_urls.txt + +doc-html:\ + doc/tutorial/Tutorial.v.html doc/refman/html/index.html \ + doc/faq/html/index.html doc/stdlib/html/index.html doc/RecTutorial/RecTutorial.v.html + +doc-pdf:\ + doc/tutorial/Tutorial.v.pdf doc/refman/Reference-Manual.pdf \ + doc/faq/FAQ.v.pdf doc/stdlib/Library.pdf doc/RecTutorial/RecTutorial.v.pdf + +doc-ps:\ + doc/tutorial/Tutorial.v.ps doc/refman/Reference-Manual.ps \ + doc/faq/FAQ.v.ps doc/stdlib/Library.ps doc/RecTutorial/RecTutorial.v.ps + +refman:\ + doc/refman/html/index.html doc/refman/Reference-Manual.ps doc/refman/Reference-Manual.pdf + +tutorial:\ + doc/tutorial/Tutorial.v.html doc/tutorial/Tutorial.v.ps doc/tutorial/Tutorial.v.pdf + +stdlib:\ + doc/stdlib/html/index.html doc/stdlib/Library.ps doc/stdlib/Library.pdf + +faq:\ + doc/faq/html/index.html doc/faq/FAQ.v.ps doc/faq/FAQ.v.pdf + +rectutorial:\ + doc/RecTutorial/RecTutorial.v.html \ + doc/RecTutorial/RecTutorial.v.ps doc/RecTutorial/RecTutorial.v.pdf + +###################################################################### +### Implicit rules +###################################################################### + +%.v.tex: %.tex coq + (cd `dirname $<`; $(COQSRC)/$(COQTEX) $(COQTEXOPTS) `basename $<`) + +%.ps: %.dvi + (cd `dirname $<`; dvips -o `basename $@` `basename $<`) + +%.eps: %.png + pngtopnm $< | pnmtops -equalpixels -noturn -rle > $@ + +###################################################################### +# Common +###################################################################### + +### Version + +doc/common/version.tex: config/Makefile + printf '\\newcommand{\\coqversion}{$(VERSION)}' > doc/common/version.tex + +###################################################################### +# Reference Manual +###################################################################### + + +### Reference Manual (printable format) + +# The second LATEX compilation is necessary otherwise the pages of the index +# are not correct (don't know why...) - BB +doc/refman/Reference-Manual.dvi: $(DOCCOMMON) $(REFMANFILES) doc/refman/Reference-Manual.tex + (cd doc/refman;\ + $(LATEX) Reference-Manual;\ + $(BIBTEX) Reference-Manual;\ + $(LATEX) Reference-Manual;\ + $(MAKEINDEX) Reference-Manual;\ + $(MAKEINDEX) Reference-Manual.tacidx -o Reference-Manual.tacind;\ + $(MAKEINDEX) Reference-Manual.comidx -o Reference-Manual.comind;\ + $(MAKEINDEX) Reference-Manual.erridx -o Reference-Manual.errind;\ + $(LATEX) Reference-Manual;\ + $(LATEX) Reference-Manual) + +doc/refman/Reference-Manual.pdf: $(DOCCOMMON) $(REFMANFILES) doc/refman/Reference-Manual.tex + (cd doc/refman; $(PDFLATEX) Reference-Manual.tex) + +### Reference Manual (browsable format) + +doc/refman/Reference-Manual.html: doc/refman/headers.hva doc/refman/Reference-Manual.dvi # to ensure bbl file + (cd doc/refman; $(HEVEA) $(HEVEAOPTS) ./Reference-Manual.tex) + +doc/refman/html/index.html: doc/refman/Reference-Manual.html $(REFMANPNGFILES) \ + doc/refman/cover.html doc/refman/index.html + - rm -rf doc/refman/html + $(MKDIR) doc/refman/html + $(INSTALLLIB) $(REFMANPNGFILES) doc/refman/html + (cd doc/refman/html; hacha -o toc.html ../Reference-Manual.html) + $(INSTALLLIB) doc/refman/cover.html doc/refman/menu.html doc/refman/html + $(INSTALLLIB) doc/refman/index.html doc/refman/html + +doc/refman-quick: + (cd doc/refman; \ + $(PDFLATEX) Reference-Manual.tex; \ + $(HEVEA) $(HEVEAOPTS) ./Reference-Manual.tex) + + +###################################################################### +# Tutorial +###################################################################### + +doc/tutorial/Tutorial.v.dvi: $(DOCCOMMON) doc/tutorial/Tutorial.v.tex + (cd doc/tutorial; $(LATEX) Tutorial.v) + +doc/tutorial/Tutorial.v.pdf: $(DOCCOMMON) doc/tutorial/Tutorial.v.tex + (cd doc/tutorial; $(PDFLATEX) Tutorial.v.tex) + +doc/tutorial/Tutorial.v.html: $(DOCCOMMON) doc/tutorial/Tutorial.v.tex + (cd doc/tutorial; $(HEVEA) $(HEVEAOPTS) Tutorial.v) + + +###################################################################### +# FAQ +###################################################################### + +doc/faq/FAQ.v.dvi: doc/common/version.tex doc/common/title.tex doc/faq/FAQ.v.tex + (cd doc/faq;\ + $(LATEX) FAQ.v;\ + $(BIBTEX) FAQ.v;\ + $(LATEX) FAQ.v;\ + $(LATEX) FAQ.v) + +doc/faq/FAQ.v.pdf: doc/common/version.tex doc/common/title.tex doc/faq/FAQ.v.dvi doc/faq/axioms.png + (cd doc/faq; $(PDFLATEX) FAQ.v.tex) + +doc/faq/FAQ.v.html: doc/faq/FAQ.v.dvi # to ensure FAQ.v.bbl + (cd doc/faq; $(HEVEA) $(HEVEAOPTS) FAQ.v.tex) + +doc/faq/html/index.html: doc/faq/FAQ.v.html + - rm -rf doc/faq/html + $(MKDIR) doc/faq/html + $(INSTALLLIB) doc/faq/interval_discr.v doc/faq/axioms.png doc/faq/html + $(INSTALLLIB) doc/faq/FAQ.v.html doc/faq/html/index.html + +###################################################################### +# Standard library +###################################################################### + +### Standard library (browsable html format) + +doc/stdlib/index-body.html: $(THEORIESVO:.vo=.glob) $(COQDOC) + - rm -rf doc/stdlib/html + $(MKDIR) doc/stdlib/html + $(COQDOC) -q -d doc/stdlib/html --multi-index --html \ + -R theories Coq $(THEORIESVO:.vo=.v) + mv doc/stdlib/html/index.html doc/stdlib/index-body.html + +doc/stdlib/index-list.html: doc/stdlib/index-list.html.template + COQTOP=$(COQSRC) ./doc/stdlib/make-library-index doc/stdlib/index-list.html + +doc/stdlib/html/index.html: doc/stdlib/index-list.html doc/stdlib/index-body.html doc/stdlib/index-trailer.html + cat doc/stdlib/index-list.html > $@ + sed -n -e '//,/<\/table>/p' doc/stdlib/index-body.html >> $@ + cat doc/stdlib/index-trailer.html >> $@ + +### Standard library (light version, full version is definitely too big) + +doc/stdlib/Library.coqdoc.tex: $(THEORIESLIGHTVO:.vo=.glob) $(COQDOC) + $(COQSRC)/$(COQDOC) -q --gallina --body-only --latex --stdout \ + -R theories Coq $(THEORIESLIGHTVO:.vo=.v) >> $@ + +doc/stdlib/Library.dvi: $(DOCCOMMON) doc/stdlib/Library.coqdoc.tex doc/stdlib/Library.tex + (cd doc/stdlib;\ + $(LATEX) Library;\ + $(LATEX) Library) + +doc/stdlib/Library.pdf: $(DOCCOMMON) doc/stdlib/Library.coqdoc.tex doc/stdlib/Library.dvi + (cd doc/stdlib; $(PDFLATEX) Library) + +###################################################################### +# Tutorial on inductive types +###################################################################### + +doc/RecTutorial/RecTutorial.v.dvi: doc/common/version.tex doc/common/title.tex doc/RecTutorial/RecTutorial.v.tex + (cd doc/RecTutorial;\ + $(LATEX) RecTutorial.v;\ + $(BIBTEX) RecTutorial.v;\ + $(LATEX) RecTutorial.v;\ + $(LATEX) RecTutorial.v) + +doc/RecTutorial/RecTutorial.v.pdf: doc/common/version.tex doc/common/title.tex doc/RecTutorial/RecTutorial.v.dvi + (cd doc/RecTutorial; $(PDFLATEX) RecTutorial.v.tex) + +doc/RecTutorial/RecTutorial.v.html: doc/RecTutorial/RecTutorial.v.tex + (cd doc/RecTutorial; $(HEVEA) $(HEVEAOPTS) RecTutorial.v) + +###################################################################### +# Index file for CoqIDE +###################################################################### + +# Not robust, improve... +ide/index_urls.txt: doc/refman/html/index.html + - rm ide/index_urls.txt + cat doc/refman/html/command-index.html doc/refman/html/tactic-index.html | grep li-indexenv | grep HREF | sed -e 's@.*\(.*\).*, .*@\1,\2@' > ide/index_urls.txt + + +###################################################################### +# Install all documentation files +###################################################################### + +install-doc: install-doc-meta install-doc-html install-doc-printable + +install-doc-meta: + $(MKDIR) $(DOCDIR) + $(INSTALLLIB) doc/LICENCE $(DOCDIR)/LICENCE.doc + +install-doc-html: doc-html + $(MKDIR) $(addprefix $(DOCDIR)/html/, refman stdlib faq) + $(INSTALLLIB) doc/refman/html/* $(DOCDIR)/html/refman + $(INSTALLLIB) doc/stdlib/html/* $(DOCDIR)/html/stdlib + $(INSTALLLIB) doc/RecTutorial/RecTutorial.v.html $(DOCDIR)/html/RecTutorial.html + $(INSTALLLIB) doc/faq/html/* $(DOCDIR)/html/faq + $(INSTALLLIB) doc/tutorial/Tutorial.v.html $(DOCDIR)/html/Tutorial.html + +install-doc-printable: doc-pdf doc-ps + $(MKDIR) $(DOCDIR)/ps $(DOCDIR)/pdf + $(INSTALLLIB) doc/refman/Reference-Manual.pdf \ + doc/stdlib/Library.pdf $(DOCDIR)/pdf + $(INSTALLLIB) doc/refman/Reference-Manual.ps \ + doc/stdlib/Library.ps $(DOCDIR)/ps + $(INSTALLLIB) doc/tutorial/Tutorial.v.pdf $(DOCDIR)/pdf/Tutorial.pdf + $(INSTALLLIB) doc/RecTutorial/RecTutorial.v.pdf $(DOCDIR)/pdf/RecTutorial.pdf + $(INSTALLLIB) doc/faq/FAQ.v.pdf $(DOCDIR)/pdf/FAQ.pdf + $(INSTALLLIB) doc/tutorial/Tutorial.v.ps $(DOCDIR)/ps/Tutorial.ps + $(INSTALLLIB) doc/RecTutorial/RecTutorial.v.ps $(DOCDIR)/ps/RecTutorial.ps + $(INSTALLLIB) doc/faq/FAQ.v.ps $(DOCDIR)/ps/FAQ.ps diff --git a/Makefile.stage1 b/Makefile.stage1 new file mode 100644 index 00000000..a60d388f --- /dev/null +++ b/Makefile.stage1 @@ -0,0 +1,33 @@ +####################################################################### +# v # The Coq Proof Assistant / The Coq Development Team # +# .depend + +clean:: + rm -f *.cm* *.o *.a *~ $(BINARIES) + +-include .depend diff --git a/checker/check.ml b/checker/check.ml new file mode 100644 index 00000000..f8844975 --- /dev/null +++ b/checker/check.ml @@ -0,0 +1,376 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* failwith "path_of_dirpath" + | l::dir -> + {dirpath=List.map string_of_id dir;basename=string_of_id l} +let pr_dirlist dp = + prlist_with_sep (fun _ -> str".") str (List.rev dp) +let pr_path sp = + match sp.dirpath with + [] -> str sp.basename + | sl -> pr_dirlist sl ++ str"." ++ str sp.basename + +type library_objects + +type compilation_unit_name = dir_path + +type library_disk = { + md_name : compilation_unit_name; + md_compiled : Safe_typing.compiled_library; + md_objects : library_objects; + md_deps : (compilation_unit_name * Digest.t) list; + md_imports : compilation_unit_name list } + +(************************************************************************) +(*s Modules on disk contain the following informations (after the magic + number, and before the digest). *) + +(*s Modules loaded in memory contain the following informations. They are + kept in the global table [libraries_table]. *) + +type library_t = { + library_name : compilation_unit_name; + library_filename : System.physical_path; + library_compiled : Safe_typing.compiled_library; + library_deps : (compilation_unit_name * Digest.t) list; + library_digest : Digest.t } + +module LibraryOrdered = + struct + type t = dir_path + let compare d1 d2 = + Pervasives.compare + (List.rev (repr_dirpath d1)) (List.rev (repr_dirpath d2)) + end + +module LibrarySet = Set.Make(LibraryOrdered) +module LibraryMap = Map.Make(LibraryOrdered) + +(* This is a map from names to loaded libraries *) +let libraries_table = ref LibraryMap.empty + +(* various requests to the tables *) + +let find_library dir = + LibraryMap.find dir !libraries_table + +let try_find_library dir = + try find_library dir + with Not_found -> + error ("Unknown library " ^ (string_of_dirpath dir)) + +let library_full_filename dir = (find_library dir).library_filename + + (* If a library is loaded several time, then the first occurrence must + be performed first, thus the libraries_loaded_list ... *) + +let register_loaded_library m = + libraries_table := LibraryMap.add m.library_name m !libraries_table + +let check_one_lib admit (dir,m) = + let file = m.library_filename in + let md = m.library_compiled in + let dig = m.library_digest in + (* Look up if the library is to be admitted correct. We could + also check if it carries a validation certificate (yet to + be implemented). *) + if LibrarySet.mem dir admit then + (Flags.if_verbose msgnl + (str "Admitting library: " ++ pr_dirpath dir); + Safe_typing.unsafe_import file md dig) + else + (Flags.if_verbose msgnl + (str "Checking library: " ++ pr_dirpath dir); + Safe_typing.import file md dig); + Flags.if_verbose msg(fnl()); + register_loaded_library m + +(*************************************************************************) +(*s Load path. Mapping from physical to logical paths etc.*) + +type logical_path = dir_path + +let load_paths = ref ([],[] : System.physical_path list * logical_path list) + +let get_load_paths () = fst !load_paths + +(* Hints to partially detects if two paths refer to the same repertory *) +let rec remove_path_dot p = + let curdir = Filename.concat Filename.current_dir_name "" in (* Unix: "./" *) + let n = String.length curdir in + if String.length p > n && String.sub p 0 n = curdir then + remove_path_dot (String.sub p n (String.length p - n)) + else + p + +let strip_path p = + let cwd = Filename.concat (Sys.getcwd ()) "" in (* Unix: "`pwd`/" *) + let n = String.length cwd in + if String.length p > n && String.sub p 0 n = cwd then + remove_path_dot (String.sub p n (String.length p - n)) + else + remove_path_dot p + +let canonical_path_name p = + let current = Sys.getcwd () in + try + Sys.chdir p; + let p' = Sys.getcwd () in + Sys.chdir current; + p' + with Sys_error _ -> + (* We give up to find a canonical name and just simplify it... *) + strip_path p + +let find_logical_path phys_dir = + let phys_dir = canonical_path_name phys_dir in + match list_filter2 (fun p d -> p = phys_dir) !load_paths with + | _,[dir] -> dir + | _,[] -> default_root_prefix + | _,l -> anomaly ("Two logical paths are associated to "^phys_dir) + +let is_in_load_paths phys_dir = + let dir = canonical_path_name phys_dir in + let lp = get_load_paths () in + let check_p = fun p -> (String.compare dir p) == 0 in + List.exists check_p lp + +let remove_load_path dir = + load_paths := list_filter2 (fun p d -> p <> dir) !load_paths + +let add_load_path (phys_path,coq_path) = + let phys_path = canonical_path_name phys_path in + match list_filter2 (fun p d -> p = phys_path) !load_paths with + | _,[dir] -> + if coq_path <> dir + (* If this is not the default -I . to coqtop *) + && not + (phys_path = canonical_path_name Filename.current_dir_name + && coq_path = default_root_prefix) + then + begin + (* Assume the user is concerned by library naming *) + if dir <> default_root_prefix then + Flags.if_warn msg_warning + (str phys_path ++ strbrk " was previously bound to " ++ + pr_dirpath dir ++ strbrk "; it is remapped to " ++ + pr_dirpath coq_path); + remove_load_path phys_path; + load_paths := (phys_path::fst !load_paths, coq_path::snd !load_paths) + end + | _,[] -> + load_paths := (phys_path :: fst !load_paths, coq_path :: snd !load_paths) + | _ -> anomaly ("Two logical paths are associated to "^phys_path) + +let physical_paths (dp,lp) = dp + +let load_paths_of_dir_path dir = + fst (list_filter2 (fun p d -> d = dir) !load_paths) + +let get_full_load_paths () = List.combine (fst !load_paths) (snd !load_paths) + +(************************************************************************) +(*s Locate absolute or partially qualified library names in the path *) + +exception LibUnmappedDir +exception LibNotFound + +let locate_absolute_library dir = + (* Search in loadpath *) + let pref, base = split_dirpath dir in + let loadpath = load_paths_of_dir_path pref in + if loadpath = [] then raise LibUnmappedDir; + try + let name = string_of_id base^".vo" in + let _, file = System.where_in_path loadpath name in + (dir, file) + with Not_found -> + (* Last chance, removed from the file system but still in memory *) + try + (dir, library_full_filename dir) + with Not_found -> + raise LibNotFound + +let locate_qualified_library qid = + try + let loadpath = + (* Search library in loadpath *) + if qid.dirpath=[] then get_load_paths () + else + (* we assume dir is an absolute dirpath *) + load_paths_of_dir_path (dir_of_path qid) + in + if loadpath = [] then raise LibUnmappedDir; + let name = qid.basename^".vo" in + let path, file = System.where_in_path loadpath name in + let dir = + extend_dirpath (find_logical_path path) (id_of_string qid.basename) in + (* Look if loaded *) + try + (dir, library_full_filename dir) + with Not_found -> + (dir, file) + with Not_found -> raise LibNotFound + +let explain_locate_library_error qid = function + | LibUnmappedDir -> + let prefix = qid.dirpath in + errorlabstrm "load_absolute_library_from" + (str "Cannot load " ++ pr_path qid ++ str ":" ++ spc () ++ + str "no physical path bound to" ++ spc () ++ pr_dirlist prefix ++ fnl ()) + | LibNotFound -> + errorlabstrm "load_absolute_library_from" + (str"Cannot find library " ++ pr_path qid ++ str" in loadpath") + | e -> raise e + +let try_locate_absolute_library dir = + try + locate_absolute_library dir + with e -> + explain_locate_library_error (path_of_dirpath dir) e + +let try_locate_qualified_library qid = + try + locate_qualified_library qid + with e -> + explain_locate_library_error qid e + +(************************************************************************) +(*s Low-level interning/externing of libraries to files *) + +(*s Loading from disk to cache (preparation phase) *) + +let vo_magic_number = 08190 (* trunk *) + +let (raw_extern_library, raw_intern_library) = + System.raw_extern_intern vo_magic_number ".vo" + +let with_magic_number_check f a = + try f a + with System.Bad_magic_number fname -> + errorlabstrm "with_magic_number_check" + (str"file " ++ str fname ++ spc () ++ str"has bad magic number." ++ + spc () ++ str"It is corrupted" ++ spc () ++ + str"or was compiled with another version of Coq.") + +(************************************************************************) +(* Internalise libraries *) + +let mk_library md f digest = { + library_name = md.md_name; + library_filename = f; + library_compiled = md.md_compiled; + library_deps = md.md_deps; + library_digest = digest } + +let name_clash_message dir mdir f = + str ("The file " ^ f ^ " contains library") ++ spc () ++ + pr_dirpath mdir ++ spc () ++ str "and not library" ++ spc() ++ + pr_dirpath dir + +(* Dependency graph *) +let depgraph = ref LibraryMap.empty + +let intern_from_file (dir, f) = + Flags.if_verbose msg (str"[intern "++str f++str" ..."); + let (md,digest) = + try + let ch = with_magic_number_check raw_intern_library f in + let (md:library_disk) = System.marshal_in ch in + let digest = System.marshal_in ch in + close_in ch; + if dir <> md.md_name then + errorlabstrm "load_physical_library" + (name_clash_message dir md.md_name f); + Flags.if_verbose msgnl(str" done]"); + md,digest + with e -> Flags.if_verbose msgnl(str" failed!]"); raise e in + depgraph := LibraryMap.add md.md_name md.md_deps !depgraph; + mk_library md f digest + +let get_deps (dir, f) = + try LibraryMap.find dir !depgraph + with Not_found -> + let _ = intern_from_file (dir,f) in + LibraryMap.find dir !depgraph + +(* Read a compiled library and all dependencies, in reverse order. + Do not include files that are already in the context. *) +let rec intern_library (dir, f) needed = + (* Look if in the current logical environment *) + try let _ = find_library dir in needed + with Not_found -> + (* Look if already listed and consequently its dependencies too *) + if List.mem_assoc dir needed then needed + else + (* [dir] is an absolute name which matches [f] which must be in loadpath *) + let m = intern_from_file (dir,f) in + (dir,m)::List.fold_right intern_mandatory_library m.library_deps needed + +(* digest error with checked modules could be a warning *) +and intern_mandatory_library (dir,_) needed = + intern_library (try_locate_absolute_library dir) needed + +(* Compute the reflexive transitive dependency closure *) +let rec fold_deps ff (dir,f) s = + if LibrarySet.mem dir s then s + else + let deps = get_deps (dir,f) in + let deps = List.map (fun (d,_) -> try_locate_absolute_library d) deps in + ff dir (List.fold_right (fold_deps ff) deps s) + +and fold_deps_list ff modl needed = + List.fold_right (fold_deps ff) modl needed + +let recheck_library ~norec ~admit ~check = + let ml = List.map try_locate_qualified_library check in + let nrl = List.map try_locate_qualified_library norec in + let al = List.map try_locate_qualified_library admit in + let needed = List.rev (List.fold_right intern_library (ml@nrl) []) in + (* first compute the closure of norec, remove closure of check, + add closure of admit, and finally remove norec and check *) + let nochk = fold_deps_list LibrarySet.add nrl LibrarySet.empty in + let nochk = fold_deps_list LibrarySet.remove ml nochk in + let nochk = fold_deps_list LibrarySet.add al nochk in + (* explicitely required modules cannot be skipped... *) + let nochk = + List.fold_right LibrarySet.remove (List.map fst (nrl@ml)) nochk in + (* *) + Flags.if_verbose msgnl (fnl()++hv 2 (str "Ordered list:" ++ fnl() ++ + prlist + (fun (dir,_) -> pr_dirpath dir ++ fnl()) needed)); + List.iter (check_one_lib nochk) needed; + Flags.if_verbose msgnl(str"Modules were successfully checked") + +open Printf + +let mem s = + let m = try_find_library s in + h 0 (str (sprintf "%dk" (size_kb m))) diff --git a/checker/check_stat.ml b/checker/check_stat.ml new file mode 100644 index 00000000..96366594 --- /dev/null +++ b/checker/check_stat.ml @@ -0,0 +1,69 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* + str "Theory: Set is impredicative" + | None -> + str "Theory: Set is predicative" + +let cst_filter f csts = + Cmap.fold + (fun c ce acc -> if f c ce then c::acc else acc) + csts [] + +let is_ax _ cb = cb.const_body = None + +let pr_ax csts = + let axs = cst_filter is_ax csts in + if axs = [] then + str "Axioms: " + else + hv 2 (str "Axioms:" ++ fnl() ++ prlist_with_sep fnl Indtypes.prcon axs) + +let print_context env = + if !output_context then begin + let + {env_globals= + {env_constants=csts; env_inductives=inds; + env_modules=mods; env_modtypes=mtys}; + env_stratification= + {env_universes=univ; env_engagement=engt}} = env in + msgnl(hov 0 + (str"CONTEXT SUMMARY" ++ fnl() ++ + str"===============" ++ fnl() ++ fnl() ++ + str "* " ++ hov 0 (pr_engt engt ++ fnl()) ++ fnl() ++ + str "* " ++ hov 0 (pr_ax csts) ++ + fnl())) + end + +let stats () = + print_context (Safe_typing.get_env()); + print_memory_stat () + +let _ = at_exit stats diff --git a/checker/check_stat.mli b/checker/check_stat.mli new file mode 100644 index 00000000..7037bd46 --- /dev/null +++ b/checker/check_stat.mli @@ -0,0 +1,12 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* unit diff --git a/checker/checker.ml b/checker/checker.ml new file mode 100644 index 00000000..1c7ace12 --- /dev/null +++ b/checker/checker.ml @@ -0,0 +1,376 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* =len then dirs else + let pos = + try + String.index_from s n '.' + with Not_found -> len + in + let dir = String.sub s n (pos-n) in + decoupe_dirs (dir::dirs) (pos+1) + in + decoupe_dirs [] 0 +let dirpath_of_string s = + match parse_dir s with + [] -> invalid_arg "dirpath_of_string" + | dir -> make_dirpath (List.map id_of_string dir) +let path_of_string s = + match parse_dir s with + [] -> invalid_arg "dirpath_of_string" + | l::dir -> {dirpath=dir; basename=l} + +let (/) = Filename.concat + +let get_version_date () = + try + let ch = open_in (Coq_config.coqlib^"/revision") in + let ver = input_line ch in + let rev = input_line ch in + (ver,rev) + with _ -> (Coq_config.version,Coq_config.date) + +let print_header () = + let (ver,rev) = (get_version_date ()) in + Printf.printf "Welcome to Chicken %s (%s)\n" ver rev; + flush stdout + +(* Adding files to Coq loadpath *) + +let add_path ~unix_path:dir ~coq_root:coq_dirpath = + if exists_dir dir then + begin + Check.add_load_path (dir,coq_dirpath) + end + else + msg_warning (str ("Cannot open " ^ dir)) + +let convert_string d = + try id_of_string d + with _ -> + if_verbose warning + ("Directory "^d^" cannot be used as a Coq identifier (skipped)"); + flush_all (); + failwith "caught" + +let add_rec_path ~unix_path:dir ~coq_root:coq_dirpath = + let dirs = all_subdirs dir in + let prefix = repr_dirpath coq_dirpath in + if dirs <> [] then + let convert_dirs (lp,cp) = + (lp,Names.make_dirpath + ((List.map convert_string (List.rev cp))@prefix)) in + let dirs = map_succeed convert_dirs dirs in + begin + List.iter Check.add_load_path dirs + end + else + msg_warning (str ("Cannot open " ^ dir)) + +(* By the option -include -I or -R of the command line *) +let includes = ref [] +let push_include (s, alias) = includes := (s,alias,false) :: !includes +let push_rec_include (s, alias) = includes := (s,alias,true) :: !includes + +let check_coq_overwriting p = + if string_of_id (list_last (repr_dirpath p)) = "Coq" then + error "The \"Coq\" logical root directory is reserved for the Coq library" + +let set_default_include d = + push_include (d, Check.default_root_prefix) +let set_default_rec_include d = + let p = Check.default_root_prefix in + check_coq_overwriting p; + push_rec_include (d, p) + +(* Initializes the LoadPath according to COQLIB and Coq_config *) +let init_load_path () = + let coqlib = + (* variable COQLIB overrides the default library *) + getenv_else "COQLIB" + (if Coq_config.local || !Flags.boot then Coq_config.coqtop + else Coq_config.coqlib) in + let user_contrib = coqlib/"user-contrib" in + let contrib = coqlib/"contrib" in + (* first user-contrib *) + if Sys.file_exists user_contrib then + add_rec_path user_contrib Check.default_root_prefix; + (* then contrib *) + add_rec_path contrib (Names.make_dirpath [coq_root]); + (* then standard library *) +(* List.iter + (fun (s,alias) -> + add_rec_path (coqlib/s) ([alias; coq_root])) + theories_dirs_map;*) + add_rec_path (coqlib/"theories") (Names.make_dirpath[coq_root]); + (* then current directory *) + add_path "." Check.default_root_prefix; + (* additional loadpath, given with -I -include -R options *) + List.iter + (fun (s,alias,reci) -> + if reci then add_rec_path s alias else add_path s alias) + (List.rev !includes); + includes := [] + + +let set_debug () = Flags.debug := true + +let engagement = ref None +let set_engagement c = engagement := Some c +let engage () = + match !engagement with Some c -> Safe_typing.set_engagement c | None -> () + + +let admit_list = ref ([] : section_path list) +let add_admit s = + admit_list := path_of_string s :: !admit_list + +let norec_list = ref ([] : section_path list) +let add_norec s = + norec_list := path_of_string s :: !norec_list + +let compile_list = ref ([] : section_path list) +let add_compile s = + compile_list := path_of_string s :: !compile_list + +(*s Parsing of the command line. + We no longer use [Arg.parse], in order to use share [Usage.print_usage] + between coqtop and coqc. *) + +let compile_files () = + Check.recheck_library + ~norec:(List.rev !norec_list) + ~admit:(List.rev !admit_list) + ~check:(List.rev !compile_list) + +let version () = + Printf.printf "The Coq Proof Checker, version %s (%s)\n" + Coq_config.version Coq_config.date; + Printf.printf "compiled on %s\n" Coq_config.compile_date; + exit 0 + +(* print the usage of coqtop (or coqc) on channel co *) + +let print_usage_channel co command = + output_string co command; + output_string co "Coq options are:\n"; + output_string co +" -I dir add directory dir in the include path + -include dir (idem) + -R dir coqdir recursively map physical dir to logical coqdir + + -admit module load module and dependencies without checking + -norec module check module but admit dependencies without checking + + -where print Coq's standard library location and exit + -v print Coq version and exit + + -h, --help print this list of options +" + +(* print the usage on standard error *) + +let print_usage = print_usage_channel stderr + +let print_usage_coqtop () = + print_usage "Usage: coqchk \n\n" + +let usage () = + print_usage_coqtop (); + flush stderr; + exit 1 + +let warning s = msg_warning (str s) + +open Type_errors + +let anomaly_string () = str "Anomaly: " +let report () = (str "." ++ spc () ++ str "Please report.") + +let print_loc loc = + if loc = dummy_loc then + (str"") + else + let loc = unloc loc in + (int (fst loc) ++ str"-" ++ int (snd loc)) +let guill s = "\""^s^"\"" + +let where s = + if !Flags.debug then (str"in " ++ str s ++ str":" ++ spc ()) else (mt ()) + +let rec explain_exn = function + | Stream.Failure -> + hov 0 (anomaly_string () ++ str "uncaught Stream.Failure.") + | Stream.Error txt -> + hov 0 (str "Syntax error: " ++ str txt) + | Token.Error txt -> + hov 0 (str "Syntax error: " ++ str txt) + | Sys_error msg -> + hov 0 (anomaly_string () ++ str "uncaught exception Sys_error " ++ str (guill msg) ++ report() ) + | UserError(s,pps) -> + hov 1 (str "User error: " ++ where s ++ pps) + | Out_of_memory -> + hov 0 (str "Out of memory") + | Stack_overflow -> + hov 0 (str "Stack overflow") + | Anomaly (s,pps) -> + hov 1 (anomaly_string () ++ where s ++ pps ++ report ()) + | Match_failure(filename,pos1,pos2) -> + hov 1 (anomaly_string () ++ str "Match failure in file " ++ str (guill filename) ++ + if Sys.ocaml_version = "3.06" then + (str " from character " ++ int pos1 ++ + str " to " ++ int pos2) + else + (str " at line " ++ int pos1 ++ + str " character " ++ int pos2) + ++ report ()) + | Not_found -> + hov 0 (anomaly_string () ++ str "uncaught exception Not_found" ++ report ()) + | Failure s -> + hov 0 (anomaly_string () ++ str "uncaught exception Failure " ++ str (guill s) ++ report ()) + | Invalid_argument s -> + hov 0 (anomaly_string () ++ str "uncaught exception Invalid_argument " ++ str (guill s) ++ report ()) + | Sys.Break -> + hov 0 (fnl () ++ str "User interrupt.") + | Univ.UniverseInconsistency (o,u,v) -> + let msg = + if !Flags.debug (*!Constrextern.print_universes*) then + spc() ++ str "(cannot enforce" ++ spc() ++ (*Univ.pr_uni u ++*) spc() ++ + str (match o with Univ.Lt -> "<" | Univ.Le -> "<=" | Univ.Eq -> "=") + ++ spc() ++ (*Univ.pr_uni v ++*) str")" + else + mt() in + hov 0 (str "Error: Universe inconsistency" ++ msg ++ str ".") + | TypeError(ctx,te) -> +(* hov 0 (str "Error:" ++ spc () ++ Himsg.explain_type_error ctx *) + (* te)*) + hov 0 (str "Type error") + + | Indtypes.InductiveError e -> + hov 0 (str "Error related to inductive types") +(* let ctx = Check.get_env() in + hov 0 + (str "Error:" ++ spc () ++ Himsg.explain_inductive_error ctx e)*) + | Stdpp.Exc_located (loc,exc) -> + hov 0 ((if loc = dummy_loc then (mt ()) + else (str"At location " ++ print_loc loc ++ str":" ++ fnl ())) + ++ explain_exn exc) + | Assert_failure (s,b,e) -> + hov 0 (anomaly_string () ++ str "assert failure" ++ spc () ++ + (if s <> "" then + if Sys.ocaml_version = "3.06" then + (str ("(file \"" ^ s ^ "\", characters ") ++ + int b ++ str "-" ++ int e ++ str ")") + else + (str ("(file \"" ^ s ^ "\", line ") ++ int b ++ + str ", characters " ++ int e ++ str "-" ++ + int (e+6) ++ str ")") + else + (mt ())) ++ + report ()) + | reraise -> + hov 0 (anomaly_string () ++ str "Uncaught exception " ++ + str (Printexc.to_string reraise)++report()) + +let parse_args() = + let rec parse = function + | [] -> () + | "-impredicative-set" :: rem -> + set_engagement Declarations.ImpredicativeSet; parse rem + + | ("-I"|"-include") :: d :: rem -> set_default_include d; parse rem + | ("-I"|"-include") :: [] -> usage () + + | "-R" :: d :: p :: rem -> + push_rec_include (d, dirpath_of_string p);parse rem + | "-R" :: ([] | [_]) -> usage () + + | "-debug" :: rem -> set_debug (); parse rem + + | "-where" :: _ -> + print_endline (getenv_else "COQLIB" Coq_config.coqlib); exit 0 + + | ("-?"|"-h"|"-H"|"-help"|"--help") :: _ -> usage () + + | ("-v"|"--version") :: _ -> version () + + | ("-m" | "--memory") :: rem -> Check_stat.memory_stat := true; parse rem + + | ("-o" | "-output-context") :: rem -> + Check_stat.output_context := true; parse rem + + | "-no-hash-consing" :: rem -> Flags.hash_cons_proofs := false; parse rem + + | "-admit" :: s :: rem -> add_admit s; parse rem + | "-admit" :: [] -> usage () + + | "-norec" :: s :: rem -> add_norec s; parse rem + | "-norec" :: [] -> usage () + + | "-silent" :: rem -> + Flags.make_silent true; parse rem + + | s :: _ when s<>"" && s.[0]='-' -> + msgnl (str "Unknown option " ++ str s); exit 1 + | s :: rem -> add_compile s; parse rem + in + try + parse (List.tl (Array.to_list Sys.argv)) + with + | UserError(_,s) as e -> begin + try + Stream.empty s; exit 1 + with Stream.Failure -> + msgnl (explain_exn e); exit 1 + end + | e -> begin msgnl (explain_exn e); exit 1 end + + +(* To prevent from doing the initialization twice *) +let initialized = ref false + +let init() = + if not !initialized then begin + initialized := true; + Sys.catch_break false; (* Ctrl-C is fatal during the initialisation *) + try + parse_args(); + if_verbose print_header (); + init_load_path (); + engage (); + with e -> + flush_all(); + message "Error during initialization :"; + msgnl (explain_exn e); + exit 1 + end + +let run () = + try + compile_files (); + flush_all() + with e -> + (Pp.ppnl(explain_exn e); + flush_all(); + exit 1) + +let start () = init(); run(); exit 0 diff --git a/checker/closure.ml b/checker/closure.ml new file mode 100644 index 00000000..ccbfbc4c --- /dev/null +++ b/checker/closure.ml @@ -0,0 +1,1047 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* red_kind + val fVAR : identifier -> red_kind + val no_red : reds + val red_add : reds -> red_kind -> reds + val red_sub : reds -> red_kind -> reds + val red_add_transparent : reds -> transparent_state -> reds + val mkflags : red_kind list -> reds + val red_set : reds -> red_kind -> bool + val red_get_const : reds -> bool * evaluable_global_reference list +end + +module RedFlags = (struct + + (* [r_const=(true,cl)] means all constants but those in [cl] *) + (* [r_const=(false,cl)] means only those in [cl] *) + (* [r_delta=true] just mean [r_const=(true,[])] *) + + type reds = { + r_beta : bool; + r_delta : bool; + r_const : transparent_state; + r_zeta : bool; + r_evar : bool; + r_iota : bool } + + type red_kind = BETA | DELTA | IOTA | ZETA + | CONST of constant | VAR of identifier + let fBETA = BETA + let fDELTA = DELTA + let fIOTA = IOTA + let fZETA = ZETA + let fCONST kn = CONST kn + let fVAR id = VAR id + let no_red = { + r_beta = false; + r_delta = false; + r_const = all_opaque; + r_zeta = false; + r_evar = false; + r_iota = false } + + let red_add red = function + | BETA -> { red with r_beta = true } + | DELTA -> { red with r_delta = true; r_const = all_transparent } + | CONST kn -> + let (l1,l2) = red.r_const in + { red with r_const = l1, Cpred.add kn l2 } + | IOTA -> { red with r_iota = true } + | ZETA -> { red with r_zeta = true } + | VAR id -> + let (l1,l2) = red.r_const in + { red with r_const = Idpred.add id l1, l2 } + + let red_sub red = function + | BETA -> { red with r_beta = false } + | DELTA -> { red with r_delta = false } + | CONST kn -> + let (l1,l2) = red.r_const in + { red with r_const = l1, Cpred.remove kn l2 } + | IOTA -> { red with r_iota = false } + | ZETA -> { red with r_zeta = false } + | VAR id -> + let (l1,l2) = red.r_const in + { red with r_const = Idpred.remove id l1, l2 } + + let red_add_transparent red tr = + { red with r_const = tr } + + let mkflags = List.fold_left red_add no_red + + let red_set red = function + | BETA -> incr_cnt red.r_beta beta + | CONST kn -> + let (_,l) = red.r_const in + let c = Cpred.mem kn l in + incr_cnt c delta + | VAR id -> (* En attendant d'avoir des kn pour les Var *) + let (l,_) = red.r_const in + let c = Idpred.mem id l in + incr_cnt c delta + | ZETA -> incr_cnt red.r_zeta zeta + | IOTA -> incr_cnt red.r_iota iota + | DELTA -> (* Used for Rel/Var defined in context *) + incr_cnt red.r_delta delta + + let red_get_const red = + let p1,p2 = red.r_const in + let (b1,l1) = Idpred.elements p1 in + let (b2,l2) = Cpred.elements p2 in + if b1=b2 then + let l1' = List.map (fun x -> EvalVarRef x) l1 in + let l2' = List.map (fun x -> EvalConstRef x) l2 in + (b1, l1' @ l2') + else error "unrepresentable pair of predicate" + +end : RedFlagsSig) + +open RedFlags + +let betadeltaiota = mkflags [fBETA;fDELTA;fZETA;fIOTA] +let betadeltaiotanolet = mkflags [fBETA;fDELTA;fIOTA] +let betaiota = mkflags [fBETA;fIOTA] +let beta = mkflags [fBETA] +let betaiotazeta = mkflags [fBETA;fIOTA;fZETA] +let unfold_red kn = + let flag = match kn with + | EvalVarRef id -> fVAR id + | EvalConstRef kn -> fCONST kn + in (* Remove fZETA for finer behaviour ? *) + mkflags [fBETA;flag;fIOTA;fZETA] + +(************************* Obsolète +(* [r_const=(true,cl)] means all constants but those in [cl] *) +(* [r_const=(false,cl)] means only those in [cl] *) +type reds = { + r_beta : bool; + r_const : bool * constant_path list * identifier list; + r_zeta : bool; + r_evar : bool; + r_iota : bool } + +let betadeltaiota_red = { + r_beta = true; + r_const = true,[],[]; + r_zeta = true; + r_evar = true; + r_iota = true } + +let betaiota_red = { + r_beta = true; + r_const = false,[],[]; + r_zeta = false; + r_evar = false; + r_iota = true } + +let beta_red = { + r_beta = true; + r_const = false,[],[]; + r_zeta = false; + r_evar = false; + r_iota = false } + +let no_red = { + r_beta = false; + r_const = false,[],[]; + r_zeta = false; + r_evar = false; + r_iota = false } + +let betaiotazeta_red = { + r_beta = true; + r_const = false,[],[]; + r_zeta = true; + r_evar = false; + r_iota = true } + +let unfold_red kn = + let c = match kn with + | EvalVarRef id -> false,[],[id] + | EvalConstRef kn -> false,[kn],[] + in { + r_beta = true; + r_const = c; + r_zeta = true; (* false for finer behaviour ? *) + r_evar = false; + r_iota = true } + +(* Sets of reduction kinds. + Main rule: delta implies all consts (both global (= by + kernel_name) and local (= by Rel or Var)), all evars, and zeta (= letin's). + Rem: reduction of a Rel/Var bound to a term is Delta, but reduction of + a LetIn expression is Letin reduction *) + +type red_kind = + BETA | DELTA | ZETA | IOTA + | CONST of constant_path list | CONSTBUT of constant_path list + | VAR of identifier | VARBUT of identifier + +let rec red_add red = function + | BETA -> { red with r_beta = true } + | DELTA -> + (match red.r_const with + | _,_::_,[] | _,[],_::_ -> error "Conflict in the reduction flags" + | _ -> { red with r_const = true,[],[]; r_zeta = true; r_evar = true }) + | CONST cl -> + (match red.r_const with + | true,_,_ -> error "Conflict in the reduction flags" + | _,l1,l2 -> { red with r_const = false, list_union cl l1, l2 }) + | CONSTBUT cl -> + (match red.r_const with + | false,_::_,_ | false,_,_::_ -> + error "Conflict in the reduction flags" + | _,l1,l2 -> + { red with r_const = true, list_union cl l1, l2; + r_zeta = true; r_evar = true }) + | IOTA -> { red with r_iota = true } + | ZETA -> { red with r_zeta = true } + | VAR id -> + (match red.r_const with + | true,_,_ -> error "Conflict in the reduction flags" + | _,l1,l2 -> { red with r_const = false, l1, list_union [id] l2 }) + | VARBUT cl -> + (match red.r_const with + | false,_::_,_ | false,_,_::_ -> + error "Conflict in the reduction flags" + | _,l1,l2 -> + { red with r_const = true, l1, list_union [cl] l2; + r_zeta = true; r_evar = true }) + +let red_delta_set red = + let b,_,_ = red.r_const in b + +let red_local_const = red_delta_set + +(* to know if a redex is allowed, only a subset of red_kind is used ... *) +let red_set red = function + | BETA -> incr_cnt red.r_beta beta + | CONST [kn] -> + let (b,l,_) = red.r_const in + let c = List.mem kn l in + incr_cnt ((b & not c) or (c & not b)) delta + | VAR id -> (* En attendant d'avoir des kn pour les Var *) + let (b,_,l) = red.r_const in + let c = List.mem id l in + incr_cnt ((b & not c) or (c & not b)) delta + | ZETA -> incr_cnt red.r_zeta zeta + | EVAR -> incr_cnt red.r_zeta evar + | IOTA -> incr_cnt red.r_iota iota + | DELTA -> red_delta_set red (*Used for Rel/Var defined in context*) + (* Not for internal use *) + | CONST _ | CONSTBUT _ | VAR _ | VARBUT _ -> failwith "not implemented" + +(* Gives the constant list *) +let red_get_const red = + let b,l1,l2 = red.r_const in + let l1' = List.map (fun x -> EvalConstRef x) l1 in + let l2' = List.map (fun x -> EvalVarRef x) l2 in + b, l1' @ l2' +fin obsolète **************) +(* specification of the reduction function *) + + +(* Flags of reduction and cache of constants: 'a is a type that may be + * mapped to constr. 'a infos implements a cache for constants and + * abstractions, storing a representation (of type 'a) of the body of + * this constant or abstraction. + * * i_tab is the cache table of the results + * * i_repr is the function to get the representation from the current + * state of the cache and the body of the constant. The result + * is stored in the table. + * * i_rels = (4,[(1,c);(3,d)]) means there are 4 free rel variables + * and only those with index 1 and 3 have bodies which are c and d resp. + * * i_vars is the list of _defined_ named variables. + * + * ref_value_cache searchs in the tab, otherwise uses i_repr to + * compute the result and store it in the table. If the constant can't + * be unfolded, returns None, but does not store this failure. * This + * doesn't take the RESET into account. You mustn't keep such a table + * after a Reset. * This type is not exported. Only its two + * instantiations (cbv or lazy) are. + *) + +type table_key = + | ConstKey of constant + | VarKey of identifier + | RelKey of int + +type 'a infos = { + i_flags : reds; + i_repr : 'a infos -> constr -> 'a; + i_env : env; + i_rels : int * (int * constr) list; + i_vars : (identifier * constr) list; + i_tab : (table_key, 'a) Hashtbl.t } + +let info_flags info = info.i_flags + +let ref_value_cache info ref = + try + Some (Hashtbl.find info.i_tab ref) + with Not_found -> + try + let body = + match ref with + | RelKey n -> + let (s,l) = info.i_rels in lift n (List.assoc (s-n) l) + | VarKey id -> List.assoc id info.i_vars + | ConstKey cst -> constant_value info.i_env cst + in + let v = info.i_repr info body in + Hashtbl.add info.i_tab ref v; + Some v + with + | Not_found (* List.assoc *) + | NotEvaluableConst _ (* Const *) + -> None + +let defined_vars flags env = +(* if red_local_const (snd flags) then*) + fold_named_context + (fun (id,b,_) e -> + match b with + | None -> e + | Some body -> (id, body)::e) + (named_context env) ~init:[] +(* else []*) + +let defined_rels flags env = +(* if red_local_const (snd flags) then*) + fold_rel_context + (fun (id,b,t) (i,subs) -> + match b with + | None -> (i+1, subs) + | Some body -> (i+1, (i,body) :: subs)) + (rel_context env) ~init:(0,[]) +(* else (0,[])*) + +let mind_equiv_infos info = mind_equiv info.i_env + +let create mk_cl flgs env = + { i_flags = flgs; + i_repr = mk_cl; + i_env = env; + i_rels = defined_rels flgs env; + i_vars = defined_vars flgs env; + i_tab = Hashtbl.create 17 } + + +(**********************************************************************) +(* Lazy reduction: the one used in kernel operations *) + +(* type of shared terms. fconstr and frterm are mutually recursive. + * Clone of the constr structure, but completely mutable, and + * annotated with reduction state (reducible or not). + * - FLIFT is a delayed shift; allows sharing between 2 lifted copies + * of a given term. + * - FCLOS is a delayed substitution applied to a constr + * - FLOCKED is used to erase the content of a reference that must + * be updated. This is to allow the garbage collector to work + * before the term is computed. + *) + +(* Norm means the term is fully normalized and cannot create a redex + when substituted + Cstr means the term is in head normal form and that it can + create a redex when substituted (i.e. constructor, fix, lambda) + Whnf means we reached the head normal form and that it cannot + create a redex when substituted + Red is used for terms that might be reduced +*) +type red_state = Norm | Cstr | Whnf | Red + +let neutr = function + | (Whnf|Norm) -> Whnf + | (Red|Cstr) -> Red + +type fconstr = { + mutable norm: red_state; + mutable term: fterm } + +and fterm = + | FRel of int + | FAtom of constr (* Metas and Sorts *) + | FCast of fconstr * cast_kind * fconstr + | FFlex of table_key + | FInd of inductive + | FConstruct of constructor + | FApp of fconstr * fconstr array + | FFix of fixpoint * fconstr subs + | FCoFix of cofixpoint * fconstr subs + | FCases of case_info * fconstr * fconstr * fconstr array + | FLambda of int * (name * constr) list * constr * fconstr subs + | FProd of name * fconstr * fconstr + | FLetIn of name * fconstr * fconstr * constr * fconstr subs + | FEvar of existential_key * fconstr array + | FLIFT of int * fconstr + | FCLOS of constr * fconstr subs + | FLOCKED + +let fterm_of v = v.term +let set_norm v = v.norm <- Norm +let is_val v = v.norm = Norm + +let mk_atom c = {norm=Norm;term=FAtom c} + +(* Could issue a warning if no is still Red, pointing out that we loose + sharing. *) +let update v1 (no,t) = + if !share then + (v1.norm <- no; + v1.term <- t; + v1) + else {norm=no;term=t} + +(**********************************************************************) +(* The type of (machine) stacks (= lambda-bar-calculus' contexts) *) + +type stack_member = + | Zapp of fconstr array + | Zcase of case_info * fconstr * fconstr array + | Zfix of fconstr * stack + | Zshift of int + | Zupdate of fconstr + +and stack = stack_member list + +let empty_stack = [] +let append_stack v s = + if Array.length v = 0 then s else + match s with + | Zapp l :: s -> Zapp (Array.append v l) :: s + | _ -> Zapp v :: s + +(* Collapse the shifts in the stack *) +let zshift n s = + match (n,s) with + (0,_) -> s + | (_,Zshift(k)::s) -> Zshift(n+k)::s + | _ -> Zshift(n)::s + +let rec stack_args_size = function + | Zapp v :: s -> Array.length v + stack_args_size s + | Zshift(_)::s -> stack_args_size s + | Zupdate(_)::s -> stack_args_size s + | _ -> 0 + +(* When used as an argument stack (only Zapp can appear) *) +let rec decomp_stack = function + | Zapp v :: s -> + (match Array.length v with + 0 -> decomp_stack s + | 1 -> Some (v.(0), s) + | _ -> + Some (v.(0), (Zapp (Array.sub v 1 (Array.length v - 1)) :: s))) + | _ -> None +let rec decomp_stackn = function + | Zapp v :: s -> if Array.length v = 0 then decomp_stackn s else (v, s) + | _ -> assert false +let array_of_stack s = + let rec stackrec = function + | [] -> [] + | Zapp args :: s -> args :: (stackrec s) + | _ -> assert false + in Array.concat (stackrec s) +let rec stack_assign s p c = match s with + | Zapp args :: s -> + let q = Array.length args in + if p >= q then + Zapp args :: stack_assign s (p-q) c + else + (let nargs = Array.copy args in + nargs.(p) <- c; + Zapp nargs :: s) + | _ -> s +let rec stack_tail p s = + if p = 0 then s else + match s with + | Zapp args :: s -> + let q = Array.length args in + if p >= q then stack_tail (p-q) s + else Zapp (Array.sub args p (q-p)) :: s + | _ -> failwith "stack_tail" +let rec stack_nth s p = match s with + | Zapp args :: s -> + let q = Array.length args in + if p >= q then stack_nth s (p-q) + else args.(p) + | _ -> raise Not_found + +(* Lifting. Preserves sharing (useful only for cell with norm=Red). + lft_fconstr always create a new cell, while lift_fconstr avoids it + when the lift is 0. *) +let rec lft_fconstr n ft = + match ft.term with + | (FInd _|FConstruct _|FFlex(ConstKey _|VarKey _)) -> ft + | FRel i -> {norm=Norm;term=FRel(i+n)} + | FLambda(k,tys,f,e) -> {norm=Cstr; term=FLambda(k,tys,f,subs_shft(n,e))} + | FFix(fx,e) -> {norm=Cstr; term=FFix(fx,subs_shft(n,e))} + | FCoFix(cfx,e) -> {norm=Cstr; term=FCoFix(cfx,subs_shft(n,e))} + | FLIFT(k,m) -> lft_fconstr (n+k) m + | FLOCKED -> assert false + | _ -> {norm=ft.norm; term=FLIFT(n,ft)} +let lift_fconstr k f = + if k=0 then f else lft_fconstr k f +let lift_fconstr_vect k v = + if k=0 then v else Array.map (fun f -> lft_fconstr k f) v +let lift_fconstr_list k l = + if k=0 then l else List.map (fun f -> lft_fconstr k f) l + +let clos_rel e i = + match expand_rel i e with + | Inl(n,mt) -> lift_fconstr n mt + | Inr(k,None) -> {norm=Norm; term= FRel k} + | Inr(k,Some p) -> + lift_fconstr (k-p) {norm=Red;term=FFlex(RelKey p)} + +(* since the head may be reducible, we might introduce lifts of 0 *) +let compact_stack head stk = + let rec strip_rec depth = function + | Zshift(k)::s -> strip_rec (depth+k) s + | Zupdate(m)::s -> + (* Be sure to create a new cell otherwise sharing would be + lost by the update operation *) + let h' = lft_fconstr depth head in + let _ = update m (h'.norm,h'.term) in + strip_rec depth s + | stk -> zshift depth stk in + strip_rec 0 stk + +(* Put an update mark in the stack, only if needed *) +let zupdate m s = + if !share & m.norm = Red + then + let s' = compact_stack m s in + let _ = m.term <- FLOCKED in + Zupdate(m)::s' + else s + +(* Closure optimization: *) +let rec compact_constr (lg, subs as s) c k = + match c with + Rel i -> + if i < k then c,s else + (try Rel (k + lg - list_index (i-k+1) subs), (lg,subs) + with Not_found -> Rel (k+lg), (lg+1, (i-k+1)::subs)) + | (Sort _|Var _|Meta _|Ind _|Const _|Construct _) -> c,s + | Evar(ev,v) -> + let (v',s) = compact_vect s v k in + if v==v' then c,s else Evar(ev,v'),s + | Cast(a,ck,b) -> + let (a',s) = compact_constr s a k in + let (b',s) = compact_constr s b k in + if a==a' && b==b' then c,s else Cast(a', ck, b'), s + | App(f,v) -> + let (f',s) = compact_constr s f k in + let (v',s) = compact_vect s v k in + if f==f' && v==v' then c,s else App(f',v'), s + | Lambda(n,a,b) -> + let (a',s) = compact_constr s a k in + let (b',s) = compact_constr s b (k+1) in + if a==a' && b==b' then c,s else Lambda(n,a',b'), s + | Prod(n,a,b) -> + let (a',s) = compact_constr s a k in + let (b',s) = compact_constr s b (k+1) in + if a==a' && b==b' then c,s else Prod(n,a',b'), s + | LetIn(n,a,ty,b) -> + let (a',s) = compact_constr s a k in + let (ty',s) = compact_constr s ty k in + let (b',s) = compact_constr s b (k+1) in + if a==a' && ty==ty' && b==b' then c,s else LetIn(n,a',ty',b'), s + | Fix(fi,(na,ty,bd)) -> + let (ty',s) = compact_vect s ty k in + let (bd',s) = compact_vect s bd (k+Array.length ty) in + if ty==ty' && bd==bd' then c,s else Fix(fi,(na,ty',bd')), s + | CoFix(i,(na,ty,bd)) -> + let (ty',s) = compact_vect s ty k in + let (bd',s) = compact_vect s bd (k+Array.length ty) in + if ty==ty' && bd==bd' then c,s else CoFix(i,(na,ty',bd')), s + | Case(ci,p,a,br) -> + let (p',s) = compact_constr s p k in + let (a',s) = compact_constr s a k in + let (br',s) = compact_vect s br k in + if p==p' && a==a' && br==br' then c,s else Case(ci,p',a',br'),s +and compact_vect s v k = compact_v [] s v k (Array.length v - 1) +and compact_v acc s v k i = + if i < 0 then + let v' = Array.of_list acc in + if array_for_all2 (==) v v' then v,s else v',s + else + let (a',s') = compact_constr s v.(i) k in + compact_v (a'::acc) s' v k (i-1) + +(* Computes the minimal environment of a closure. + Idea: if the subs is not identity, the term will have to be + reallocated entirely (to propagate the substitution). So, + computing the set of free variables does not change the + complexity. *) +let optimise_closure env c = + if is_subs_id env then (env,c) else + let (c',(_,s)) = compact_constr (0,[]) c 1 in + let env' = + Array.map (fun i -> clos_rel env i) (Array.of_list s) in + (subs_cons (env', ESID 0),c') + +let mk_lambda env t = + let (env,t) = optimise_closure env t in + let (rvars,t') = decompose_lam t in + FLambda(List.length rvars, List.rev rvars, t', env) + +let destFLambda clos_fun t = + match t.term with + FLambda(_,[(na,ty)],b,e) -> (na,clos_fun e ty,clos_fun (subs_lift e) b) + | FLambda(n,(na,ty)::tys,b,e) -> + (na,clos_fun e ty,{norm=Cstr;term=FLambda(n-1,tys,b,subs_lift e)}) + | _ -> assert false + +(* Optimization: do not enclose variables in a closure. + Makes variable access much faster *) +let mk_clos e t = + match t with + | Rel i -> clos_rel e i + | Var x -> { norm = Red; term = FFlex (VarKey x) } + | Const c -> { norm = Red; term = FFlex (ConstKey c) } + | Meta _ | Sort _ -> { norm = Norm; term = FAtom t } + | Ind kn -> { norm = Norm; term = FInd kn } + | Construct kn -> { norm = Cstr; term = FConstruct kn } + | (CoFix _|Lambda _|Fix _|Prod _|Evar _|App _|Case _|Cast _|LetIn _) -> + {norm = Red; term = FCLOS(t,e)} + +let mk_clos_vect env v = Array.map (mk_clos env) v + +(* Translate the head constructor of t from constr to fconstr. This + function is parameterized by the function to apply on the direct + subterms. + Could be used insted of mk_clos. *) +let mk_clos_deep clos_fun env t = + match t with + | (Rel _|Ind _|Const _|Construct _|Var _|Meta _ | Sort _) -> + mk_clos env t + | Cast (a,k,b) -> + { norm = Red; + term = FCast (clos_fun env a, k, clos_fun env b)} + | App (f,v) -> + { norm = Red; + term = FApp (clos_fun env f, Array.map (clos_fun env) v) } + | Case (ci,p,c,v) -> + { norm = Red; + term = FCases (ci, clos_fun env p, clos_fun env c, + Array.map (clos_fun env) v) } + | Fix fx -> + { norm = Cstr; term = FFix (fx, env) } + | CoFix cfx -> + { norm = Cstr; term = FCoFix(cfx,env) } + | Lambda _ -> + { norm = Cstr; term = mk_lambda env t } + | Prod (n,t,c) -> + { norm = Whnf; + term = FProd (n, clos_fun env t, clos_fun (subs_lift env) c) } + | LetIn (n,b,t,c) -> + { norm = Red; + term = FLetIn (n, clos_fun env b, clos_fun env t, c, env) } + | Evar(ev,args) -> + { norm = Whnf; term = FEvar(ev,Array.map (clos_fun env) args) } + +(* A better mk_clos? *) +let mk_clos2 = mk_clos_deep mk_clos + +(* The inverse of mk_clos_deep: move back to constr *) +let rec to_constr constr_fun lfts v = + match v.term with + | FRel i -> Rel (reloc_rel i lfts) + | FFlex (RelKey p) -> Rel (reloc_rel p lfts) + | FFlex (VarKey x) -> Var x + | FAtom c -> exliftn lfts c + | FCast (a,k,b) -> + Cast (constr_fun lfts a, k, constr_fun lfts b) + | FFlex (ConstKey op) -> Const op + | FInd op -> Ind op + | FConstruct op -> Construct op + | FCases (ci,p,c,ve) -> + Case (ci, constr_fun lfts p, + constr_fun lfts c, + Array.map (constr_fun lfts) ve) + | FFix ((op,(lna,tys,bds)),e) -> + let n = Array.length bds in + let ftys = Array.map (mk_clos e) tys in + let fbds = Array.map (mk_clos (subs_liftn n e)) bds in + let lfts' = el_liftn n lfts in + Fix (op, (lna, Array.map (constr_fun lfts) ftys, + Array.map (constr_fun lfts') fbds)) + | FCoFix ((op,(lna,tys,bds)),e) -> + let n = Array.length bds in + let ftys = Array.map (mk_clos e) tys in + let fbds = Array.map (mk_clos (subs_liftn n e)) bds in + let lfts' = el_liftn (Array.length bds) lfts in + CoFix (op, (lna, Array.map (constr_fun lfts) ftys, + Array.map (constr_fun lfts') fbds)) + | FApp (f,ve) -> + App (constr_fun lfts f, + Array.map (constr_fun lfts) ve) + | FLambda _ -> + let (na,ty,bd) = destFLambda mk_clos2 v in + Lambda (na, constr_fun lfts ty, + constr_fun (el_lift lfts) bd) + | FProd (n,t,c) -> + Prod (n, constr_fun lfts t, + constr_fun (el_lift lfts) c) + | FLetIn (n,b,t,f,e) -> + let fc = mk_clos2 (subs_lift e) f in + LetIn (n, constr_fun lfts b, + constr_fun lfts t, + constr_fun (el_lift lfts) fc) + | FEvar (ev,args) -> Evar(ev,Array.map (constr_fun lfts) args) + | FLIFT (k,a) -> to_constr constr_fun (el_shft k lfts) a + | FCLOS (t,env) -> + let fr = mk_clos2 env t in + let unfv = update v (fr.norm,fr.term) in + to_constr constr_fun lfts unfv + | FLOCKED -> assert false (*mkVar(id_of_string"_LOCK_")*) + +(* This function defines the correspondance between constr and + fconstr. When we find a closure whose substitution is the identity, + then we directly return the constr to avoid possibly huge + reallocation. *) +let term_of_fconstr = + let rec term_of_fconstr_lift lfts v = + match v.term with + | FCLOS(t,env) when is_subs_id env & is_lift_id lfts -> t + | FLambda(_,tys,f,e) when is_subs_id e & is_lift_id lfts -> + compose_lam (List.rev tys) f + | FFix(fx,e) when is_subs_id e & is_lift_id lfts -> Fix fx + | FCoFix(cfx,e) when is_subs_id e & is_lift_id lfts -> CoFix cfx + | _ -> to_constr term_of_fconstr_lift lfts v in + term_of_fconstr_lift ELID + + + +(* fstrong applies unfreeze_fun recursively on the (freeze) term and + * yields a term. Assumes that the unfreeze_fun never returns a + * FCLOS term. +let rec fstrong unfreeze_fun lfts v = + to_constr (fstrong unfreeze_fun) lfts (unfreeze_fun v) +*) + +let rec zip m stk = + match stk with + | [] -> m + | Zapp args :: s -> zip {norm=neutr m.norm; term=FApp(m, args)} s + | Zcase(ci,p,br)::s -> + let t = FCases(ci, p, m, br) in + zip {norm=neutr m.norm; term=t} s + | Zfix(fx,par)::s -> + zip fx (par @ append_stack [|m|] s) + | Zshift(n)::s -> + zip (lift_fconstr n m) s + | Zupdate(rf)::s -> + zip (update rf (m.norm,m.term)) s + +let fapp_stack (m,stk) = zip m stk + +(*********************************************************************) + +(* The assertions in the functions below are granted because they are + called only when m is a constructor, a cofix + (strip_update_shift_app), a fix (get_nth_arg) or an abstraction + (strip_update_shift, through get_arg). *) + +(* optimised for the case where there are no shifts... *) +let strip_update_shift head stk = + assert (head.norm <> Red); + let rec strip_rec h depth = function + | Zshift(k)::s -> strip_rec (lift_fconstr k h) (depth+k) s + | Zupdate(m)::s -> + strip_rec (update m (h.norm,h.term)) depth s + | stk -> (depth,stk) in + strip_rec head 0 stk + +(* optimised for the case where there are no shifts... *) +let strip_update_shift_app head stk = + assert (head.norm <> Red); + let rec strip_rec rstk h depth = function + | Zshift(k) as e :: s -> + strip_rec (e::rstk) (lift_fconstr k h) (depth+k) s + | (Zapp args :: s) -> + strip_rec (Zapp args :: rstk) + {norm=h.norm;term=FApp(h,args)} depth s + | Zupdate(m)::s -> + strip_rec rstk (update m (h.norm,h.term)) depth s + | stk -> (depth,List.rev rstk, stk) in + strip_rec [] head 0 stk + + +let get_nth_arg head n stk = + assert (head.norm <> Red); + let rec strip_rec rstk h depth n = function + | Zshift(k) as e :: s -> + strip_rec (e::rstk) (lift_fconstr k h) (depth+k) n s + | Zapp args::s' -> + let q = Array.length args in + if n >= q + then + strip_rec (Zapp args::rstk) + {norm=h.norm;term=FApp(h,args)} depth (n-q) s' + else + let bef = Array.sub args 0 n in + let aft = Array.sub args (n+1) (q-n-1) in + let stk' = + List.rev (if n = 0 then rstk else (Zapp bef :: rstk)) in + (Some (stk', args.(n)), append_stack aft s') + | Zupdate(m)::s -> + strip_rec rstk (update m (h.norm,h.term)) depth n s + | s -> (None, List.rev rstk @ s) in + strip_rec [] head 0 n stk + +(* Beta reduction: look for an applied argument in the stack. + Since the encountered update marks are removed, h must be a whnf *) +let get_arg h stk = + let (depth,stk') = strip_update_shift h stk in + match decomp_stack stk' with + Some (v, s') -> (Some (depth,v), s') + | None -> (None, zshift depth stk') + +let rec get_args n tys f e stk = + match stk with + Zupdate r :: s -> + let _hd = update r (Cstr,FLambda(n,tys,f,e)) in + get_args n tys f e s + | Zshift k :: s -> + get_args n tys f (subs_shft (k,e)) s + | Zapp l :: s -> + let na = Array.length l in + if n == na then (Inl (subs_cons(l,e)),s) + else if n < na then (* more arguments *) + let args = Array.sub l 0 n in + let eargs = Array.sub l n (na-n) in + (Inl (subs_cons(args,e)), Zapp eargs :: s) + else (* more lambdas *) + let etys = list_skipn na tys in + get_args (n-na) etys f (subs_cons(l,e)) s + | _ -> (Inr {norm=Cstr;term=FLambda(n,tys,f,e)}, stk) + + +(* Iota reduction: extract the arguments to be passed to the Case + branches *) +let rec reloc_rargs_rec depth stk = + match stk with + Zapp args :: s -> + Zapp (lift_fconstr_vect depth args) :: reloc_rargs_rec depth s + | Zshift(k)::s -> if k=depth then s else reloc_rargs_rec (depth-k) s + | _ -> stk + +let reloc_rargs depth stk = + if depth = 0 then stk else reloc_rargs_rec depth stk + +let rec drop_parameters depth n stk = + match stk with + Zapp args::s -> + let q = Array.length args in + if n > q then drop_parameters depth (n-q) s + else if n = q then reloc_rargs depth s + else + let aft = Array.sub args n (q-n) in + reloc_rargs depth (append_stack aft s) + | Zshift(k)::s -> drop_parameters (depth-k) n s + | [] -> assert (n=0); [] + | _ -> assert false (* we know that n < stack_args_size(stk) *) + + +(* Iota reduction: expansion of a fixpoint. + * Given a fixpoint and a substitution, returns the corresponding + * fixpoint body, and the substitution in which it should be + * evaluated: its first variables are the fixpoint bodies + * + * FCLOS(fix Fi {F0 := T0 .. Fn-1 := Tn-1}, S) + * -> (S. FCLOS(F0,S) . ... . FCLOS(Fn-1,S), Ti) + *) +(* does not deal with FLIFT *) +let contract_fix_vect fix = + let (thisbody, make_body, env, nfix) = + match fix with + | FFix (((reci,i),(_,_,bds as rdcl)),env) -> + (bds.(i), + (fun j -> { norm = Cstr; term = FFix (((reci,j),rdcl),env) }), + env, Array.length bds) + | FCoFix ((i,(_,_,bds as rdcl)),env) -> + (bds.(i), + (fun j -> { norm = Cstr; term = FCoFix ((j,rdcl),env) }), + env, Array.length bds) + | _ -> assert false + in + (subs_cons(Array.init nfix make_body, env), thisbody) + + +(*********************************************************************) +(* A machine that inspects the head of a term until it finds an + atom or a subterm that may produce a redex (abstraction, + constructor, cofix, letin, constant), or a neutral term (product, + inductive) *) +let rec knh m stk = + match m.term with + | FLIFT(k,a) -> knh a (zshift k stk) + | FCLOS(t,e) -> knht e t (zupdate m stk) + | FLOCKED -> assert false + | FApp(a,b) -> knh a (append_stack b (zupdate m stk)) + | FCases(ci,p,t,br) -> knh t (Zcase(ci,p,br)::zupdate m stk) + | FFix(((ri,n),(_,_,_)),_) -> + (match get_nth_arg m ri.(n) stk with + (Some(pars,arg),stk') -> knh arg (Zfix(m,pars)::stk') + | (None, stk') -> (m,stk')) + | FCast(t,_,_) -> knh t stk +(* cases where knh stops *) + | (FFlex _|FLetIn _|FConstruct _|FEvar _| + FCoFix _|FLambda _|FRel _|FAtom _|FInd _|FProd _) -> + (m, stk) + +(* The same for pure terms *) +and knht e t stk = + match t with + | App(a,b) -> + knht e a (append_stack (mk_clos_vect e b) stk) + | Case(ci,p,t,br) -> + knht e t (Zcase(ci, mk_clos e p, mk_clos_vect e br)::stk) + | Fix _ -> knh (mk_clos2 e t) stk + | Cast(a,_,_) -> knht e a stk + | Rel n -> knh (clos_rel e n) stk + | (Lambda _|Prod _|Construct _|CoFix _|Ind _| + LetIn _|Const _|Var _|Evar _|Meta _|Sort _) -> + (mk_clos2 e t, stk) + + +(************************************************************************) + +(* Computes a weak head normal form from the result of knh. *) +let rec knr info m stk = + match m.term with + | FLambda(n,tys,f,e) when red_set info.i_flags fBETA -> + (match get_args n tys f e stk with + Inl e', s -> knit info e' f s + | Inr lam, s -> (lam,s)) + | FFlex(ConstKey kn) when red_set info.i_flags (fCONST kn) -> + (match ref_value_cache info (ConstKey kn) with + Some v -> kni info v stk + | None -> (set_norm m; (m,stk))) + | FFlex(VarKey id) when red_set info.i_flags (fVAR id) -> + (match ref_value_cache info (VarKey id) with + Some v -> kni info v stk + | None -> (set_norm m; (m,stk))) + | FFlex(RelKey k) when red_set info.i_flags fDELTA -> + (match ref_value_cache info (RelKey k) with + Some v -> kni info v stk + | None -> (set_norm m; (m,stk))) + | FConstruct(ind,c) when red_set info.i_flags fIOTA -> + (match strip_update_shift_app m stk with + (depth, args, Zcase(ci,_,br)::s) -> + assert (ci.ci_npar>=0); + let rargs = drop_parameters depth ci.ci_npar args in + kni info br.(c-1) (rargs@s) + | (_, cargs, Zfix(fx,par)::s) -> + let rarg = fapp_stack(m,cargs) in + let stk' = par @ append_stack [|rarg|] s in + let (fxe,fxbd) = contract_fix_vect fx.term in + knit info fxe fxbd stk' + | (_,args,s) -> (m,args@s)) + | FCoFix _ when red_set info.i_flags fIOTA -> + (match strip_update_shift_app m stk with + (_, args, ((Zcase _::_) as stk')) -> + let (fxe,fxbd) = contract_fix_vect m.term in + knit info fxe fxbd (args@stk') + | (_,args,s) -> (m,args@s)) + | FLetIn (_,v,_,bd,e) when red_set info.i_flags fZETA -> + knit info (subs_cons([|v|],e)) bd stk + | _ -> (m,stk) + +(* Computes the weak head normal form of a term *) +and kni info m stk = + let (hm,s) = knh m stk in + knr info hm s +and knit info e t stk = + let (ht,s) = knht e t stk in + knr info ht s + +let kh info v stk = fapp_stack(kni info v stk) + +(************************************************************************) +(* Initialization and then normalization *) + +(* weak reduction *) +let whd_val info v = + with_stats (lazy (term_of_fconstr (kh info v []))) + +let inject = mk_clos (ESID 0) + +let whd_stack infos m stk = + let k = kni infos m stk in + let _ = fapp_stack k in (* to unlock Zupdates! *) + k + +(* cache of constants: the body is computed only when needed. *) +type clos_infos = fconstr infos + +let create_clos_infos flgs env = + create (fun _ -> inject) flgs env + +let unfold_reference = ref_value_cache diff --git a/checker/closure.mli b/checker/closure.mli new file mode 100644 index 00000000..fa302de6 --- /dev/null +++ b/checker/closure.mli @@ -0,0 +1,198 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* 'a + +(*s Delta implies all consts (both global (= by + [kernel_name]) and local (= by [Rel] or [Var])), all evars, and letin's. + Rem: reduction of a Rel/Var bound to a term is Delta, but reduction of + a LetIn expression is Letin reduction *) + +type transparent_state = Idpred.t * Cpred.t + +val all_opaque : transparent_state +val all_transparent : transparent_state + +(* Sets of reduction kinds. *) +module type RedFlagsSig = sig + type reds + type red_kind + + (* The different kinds of reduction *) + val fBETA : red_kind + val fDELTA : red_kind + val fIOTA : red_kind + val fZETA : red_kind + val fCONST : constant -> red_kind + val fVAR : identifier -> red_kind + + (* No reduction at all *) + val no_red : reds + + (* Adds a reduction kind to a set *) + val red_add : reds -> red_kind -> reds + + (* Removes a reduction kind to a set *) + val red_sub : reds -> red_kind -> reds + + (* Adds a reduction kind to a set *) + val red_add_transparent : reds -> transparent_state -> reds + + (* Build a reduction set from scratch = iter [red_add] on [no_red] *) + val mkflags : red_kind list -> reds + + (* Tests if a reduction kind is set *) + val red_set : reds -> red_kind -> bool + + (* Gives the constant list *) + val red_get_const : reds -> bool * evaluable_global_reference list +end + +module RedFlags : RedFlagsSig +open RedFlags + +val beta : reds +val betaiota : reds +val betadeltaiota : reds +val betaiotazeta : reds +val betadeltaiotanolet : reds + +val unfold_red : evaluable_global_reference -> reds + +(***********************************************************************) +type table_key = + | ConstKey of constant + | VarKey of identifier + | RelKey of int + +type 'a infos +val ref_value_cache: 'a infos -> table_key -> 'a option +val info_flags: 'a infos -> reds +val create: ('a infos -> constr -> 'a) -> reds -> env -> 'a infos + +(************************************************************************) +(*s Lazy reduction. *) + +(* [fconstr] is the type of frozen constr *) + +type fconstr + +(* [fconstr] can be accessed by using the function [fterm_of] and by + matching on type [fterm] *) + +type fterm = + | FRel of int + | FAtom of constr (* Metas and Sorts *) + | FCast of fconstr * cast_kind * fconstr + | FFlex of table_key + | FInd of inductive + | FConstruct of constructor + | FApp of fconstr * fconstr array + | FFix of fixpoint * fconstr subs + | FCoFix of cofixpoint * fconstr subs + | FCases of case_info * fconstr * fconstr * fconstr array + | FLambda of int * (name * constr) list * constr * fconstr subs + | FProd of name * fconstr * fconstr + | FLetIn of name * fconstr * fconstr * constr * fconstr subs + | FEvar of existential_key * fconstr array + | FLIFT of int * fconstr + | FCLOS of constr * fconstr subs + | FLOCKED + +(************************************************************************) +(*s A [stack] is a context of arguments, arguments are pushed by + [append_stack] one array at a time but popped with [decomp_stack] + one by one *) + +type stack_member = + | Zapp of fconstr array + | Zcase of case_info * fconstr * fconstr array + | Zfix of fconstr * stack + | Zshift of int + | Zupdate of fconstr + +and stack = stack_member list + +val empty_stack : stack +val append_stack : fconstr array -> stack -> stack + +val decomp_stack : stack -> (fconstr * stack) option +val array_of_stack : stack -> fconstr array +val stack_assign : stack -> int -> fconstr -> stack +val stack_args_size : stack -> int +val stack_tail : int -> stack -> stack +val stack_nth : stack -> int -> fconstr + +(* To lazy reduce a constr, create a [clos_infos] with + [create_clos_infos], inject the term to reduce with [inject]; then use + a reduction function *) + +val inject : constr -> fconstr +(* mk_atom: prevents a term from being evaluated *) +val mk_atom : constr -> fconstr + +val fterm_of : fconstr -> fterm +val term_of_fconstr : fconstr -> constr +val destFLambda : + (fconstr subs -> constr -> fconstr) -> fconstr -> name * fconstr * fconstr + +(* Global and local constant cache *) +type clos_infos +val create_clos_infos : reds -> env -> clos_infos + +(* Reduction function *) + +(* [whd_val] is for weak head normalization *) +val whd_val : clos_infos -> fconstr -> constr + +(* [whd_stack] performs weak head normalization in a given stack. It + stops whenever a reduction is blocked. *) +val whd_stack : + clos_infos -> fconstr -> stack -> fconstr * stack + +(* Conversion auxiliary functions to do step by step normalisation *) + +(* [unfold_reference] unfolds references in a [fconstr] *) +val unfold_reference : clos_infos -> table_key -> fconstr option + +(* [mind_equiv] checks whether two inductive types are intentionally equal *) +val mind_equiv_infos : clos_infos -> inductive -> inductive -> bool + +(************************************************************************) +(*i This is for lazy debug *) + +val lift_fconstr : int -> fconstr -> fconstr +val lift_fconstr_vect : int -> fconstr array -> fconstr array + +val mk_clos : fconstr subs -> constr -> fconstr +val mk_clos_vect : fconstr subs -> constr array -> fconstr array +val mk_clos_deep : + (fconstr subs -> constr -> fconstr) -> + fconstr subs -> constr -> fconstr + +val kni: clos_infos -> fconstr -> stack -> fconstr * stack +val knr: clos_infos -> fconstr -> stack -> fconstr * stack + +val to_constr : (lift -> fconstr -> constr) -> lift -> fconstr -> constr +val optimise_closure : fconstr subs -> constr -> fconstr subs * constr + +(* End of cbn debug section i*) diff --git a/checker/declarations.ml b/checker/declarations.ml new file mode 100644 index 00000000..71b6c9ca --- /dev/null +++ b/checker/declarations.ml @@ -0,0 +1,658 @@ +open Util +open Names +open Term + +(* Bytecode *) +type values +type reloc_table +type to_patch_substituted +(*Retroknowledge *) +type action +type retroknowledge + +type engagement = ImpredicativeSet + + +type polymorphic_arity = { + poly_param_levels : Univ.universe option list; + poly_level : Univ.universe; +} + +type constant_type = + | NonPolymorphicType of constr + | PolymorphicArity of rel_context * polymorphic_arity + + + +type substitution_domain = + MSI of mod_self_id + | MBI of mod_bound_id + | MPI of module_path + +module Umap = Map.Make(struct + type t = substitution_domain + let compare = Pervasives.compare + end) + +type resolver + +type substitution = (module_path * resolver option) Umap.t +type 'a subst_fun = substitution -> 'a -> 'a + +let fold_subst fs fb fp = + Umap.fold + (fun k (mp,_) acc -> + match k with + MSI msid -> fs msid mp acc + | MBI mbid -> fb mbid mp acc + | MPI mp1 -> fp mp1 mp acc) + +let empty_subst = Umap.empty + +let add_msid msid mp = + Umap.add (MSI msid) (mp,None) +let add_mbid mbid mp = + Umap.add (MBI mbid) (mp,None) +let add_mp mp1 mp2 = + Umap.add (MPI mp1) (mp2,None) + +let map_msid msid mp = add_msid msid mp empty_subst +let map_mbid mbid mp = add_mbid mbid mp empty_subst +let map_mp mp1 mp2 = add_mp mp1 mp2 empty_subst + +let subst_mp0 sub mp = (* 's like subst *) + let rec aux mp = + match mp with + | MPself sid -> + let mp',resolve = Umap.find (MSI sid) sub in + mp',resolve + | MPbound bid -> + let mp',resolve = Umap.find (MBI bid) sub in + mp',resolve + | MPdot (mp1,l) as mp2 -> + begin + try + let mp',resolve = Umap.find (MPI mp2) sub in + mp',resolve + with Not_found -> + let mp1',resolve = aux mp1 in + MPdot (mp1',l),resolve + end + | _ -> raise Not_found + in + try + Some (aux mp) + with Not_found -> None + + + +let subst_mp0 sub mp = (* 's like subst *) + let rec aux mp = + match mp with + | MPself sid -> fst (Umap.find (MSI sid) sub) + | MPbound bid -> fst (Umap.find (MBI bid) sub) + | MPdot (mp1,l) as mp2 -> + begin + try fst (Umap.find (MPI mp2) sub) + with Not_found -> MPdot (aux mp1,l) + end + + | _ -> raise Not_found + in + try Some (aux mp) with Not_found -> None + +let subst_mp sub mp = + match subst_mp0 sub mp with + None -> mp + | Some mp' -> mp' + +let subst_kn0 sub kn = + let mp,dir,l = repr_kn kn in + match subst_mp0 sub mp with + Some mp' -> + Some (make_kn mp' dir l) + | None -> None + +let subst_kn sub kn = + match subst_kn0 sub kn with + None -> kn + | Some kn' -> kn' + +let subst_con sub con = + let mp,dir,l = repr_con con in + match subst_mp0 sub mp with + None -> con + | Some mp' -> make_con mp' dir l + +let subst_con0 sub con = + let mp,dir,l = repr_con con in + match subst_mp0 sub mp with + None -> None + | Some mp' -> + let con' = make_con mp' dir l in + Some (Const con') + +let rec map_kn f f' c = + let func = map_kn f f' in + match c with + | Const kn -> + (match f' kn with + None -> c + | Some const ->const) + | Ind (kn,i) -> + (match f kn with + None -> c + | Some kn' -> + Ind (kn',i)) + | Construct ((kn,i),j) -> + (match f kn with + None -> c + | Some kn' -> + Construct ((kn',i),j)) + | Case (ci,p,ct,l) -> + let ci_ind = + let (kn,i) = ci.ci_ind in + (match f kn with None -> ci.ci_ind | Some kn' -> kn',i ) in + let p' = func p in + let ct' = func ct in + let l' = array_smartmap func l in + if (ci.ci_ind==ci_ind && p'==p + && l'==l && ct'==ct)then c + else + Case ({ci with ci_ind = ci_ind}, + p',ct', l') + | Cast (ct,k,t) -> + let ct' = func ct in + let t'= func t in + if (t'==t && ct'==ct) then c + else Cast (ct', k, t') + | Prod (na,t,ct) -> + let ct' = func ct in + let t'= func t in + if (t'==t && ct'==ct) then c + else Prod (na, t', ct') + | Lambda (na,t,ct) -> + let ct' = func ct in + let t'= func t in + if (t'==t && ct'==ct) then c + else Lambda (na, t', ct') + | LetIn (na,b,t,ct) -> + let ct' = func ct in + let t'= func t in + let b'= func b in + if (t'==t && ct'==ct && b==b') then c + else LetIn (na, b', t', ct') + | App (ct,l) -> + let ct' = func ct in + let l' = array_smartmap func l in + if (ct'== ct && l'==l) then c + else App (ct',l') + | Evar (e,l) -> + let l' = array_smartmap func l in + if (l'==l) then c + else Evar (e,l') + | Fix (ln,(lna,tl,bl)) -> + let tl' = array_smartmap func tl in + let bl' = array_smartmap func bl in + if (bl == bl'&& tl == tl') then c + else Fix (ln,(lna,tl',bl')) + | CoFix(ln,(lna,tl,bl)) -> + let tl' = array_smartmap func tl in + let bl' = array_smartmap func bl in + if (bl == bl'&& tl == tl') then c + else CoFix (ln,(lna,tl',bl')) + | _ -> c + +let subst_mps sub = + map_kn (subst_kn0 sub) (subst_con0 sub) + +let rec replace_mp_in_mp mpfrom mpto mp = + match mp with + | _ when mp = mpfrom -> mpto + | MPdot (mp1,l) -> + let mp1' = replace_mp_in_mp mpfrom mpto mp1 in + if mp1==mp1' then mp + else MPdot (mp1',l) + | _ -> mp + +let replace_mp_in_con mpfrom mpto kn = + let mp,dir,l = kn in + let mp'' = replace_mp_in_mp mpfrom mpto mp in + if mp==mp'' then kn + else (mp'', dir, l) + +type 'a lazy_subst = + | LSval of 'a + | LSlazy of substitution * 'a + +type 'a substituted = 'a lazy_subst ref + +let from_val a = ref (LSval a) + +let force fsubst r = + match !r with + | LSval a -> a + | LSlazy(s,a) -> + let a' = fsubst s a in + r := LSval a'; + a' + + + +let join (subst1 : substitution) (subst2 : substitution) = + let apply_subst (sub : substitution) key (mp,_) = + match subst_mp0 sub mp with + None -> mp,None + | Some mp' -> mp',None in + let subst = Umap.mapi (apply_subst subst2) subst1 in + (Umap.fold Umap.add subst2 subst) + +let subst_key subst1 subst2 = + let replace_in_key key mp sub= + let newkey = + match key with + | MPI mp1 -> + begin + match subst_mp0 subst1 mp1 with + | None -> None + | Some mp2 -> Some (MPI mp2) + end + | _ -> None + in + match newkey with + | None -> Umap.add key mp sub + | Some mpi -> Umap.add mpi mp sub + in + Umap.fold replace_in_key subst2 empty_subst + +let update_subst_alias subst1 subst2 = + let subst_inv key (mp,_) sub = + let newmp = + match key with + | MBI msid -> Some (MPbound msid) + | MSI msid -> Some (MPself msid) + | _ -> None + in + match newmp with + | None -> sub + | Some mpi -> match mp with + | MPbound mbid -> Umap.add (MBI mbid) (mpi,None) sub + | MPself msid -> Umap.add (MSI msid) (mpi,None) sub + | _ -> Umap.add (MPI mp) (mpi,None) sub + in + let subst_mbi = Umap.fold subst_inv subst2 empty_subst in + let alias_subst key (mp,_) sub= + let newkey = + match key with + | MPI mp1 -> + begin + match subst_mp0 subst_mbi mp1 with + | None -> None + | Some mp2 -> Some (MPI mp2) + end + | _ -> None + in + match newkey with + | None -> Umap.add key (mp,None) sub + | Some mpi -> Umap.add mpi (mp,None) sub + in + Umap.fold alias_subst subst1 empty_subst + +let join_alias (subst1 : substitution) (subst2 : substitution) = + let apply_subst (sub : substitution) key (mp,_) = + match subst_mp0 sub mp with + None -> mp,None + | Some mp' -> mp',None in + Umap.mapi (apply_subst subst2) subst1 + + +let update_subst subst1 subst2 = + let subst_inv key (mp,_) l = + let newmp = + match key with + | MBI msid -> MPbound msid + | MSI msid -> MPself msid + | MPI mp -> mp + in + match mp with + | MPbound mbid -> ((MBI mbid),newmp)::l + | MPself msid -> ((MSI msid),newmp)::l + | _ -> ((MPI mp),newmp)::l + in + let subst_mbi = Umap.fold subst_inv subst2 [] in + let alias_subst key (mp,_) sub= + let newsetkey = + match key with + | MPI mp1 -> + let compute_set_newkey l (k,mp') = + let mp_from_key = match k with + | MBI msid -> MPbound msid + | MSI msid -> MPself msid + | MPI mp -> mp + in + let new_mp1 = replace_mp_in_mp mp_from_key mp' mp1 in + if new_mp1 == mp1 then l else (MPI new_mp1)::l + in + begin + match List.fold_left compute_set_newkey [] subst_mbi with + | [] -> None + | l -> Some (l) + end + | _ -> None + in + match newsetkey with + | None -> sub + | Some l -> + List.fold_left (fun s k -> Umap.add k (mp,None) s) + sub l + in + Umap.fold alias_subst subst1 empty_subst + + +let subst_substituted s r = + match !r with + | LSval a -> ref (LSlazy(s,a)) + | LSlazy(s',a) -> + let s'' = join s' s in + ref (LSlazy(s'',a)) + +let force_constr = force subst_mps + +type constr_substituted = constr substituted + +let subst_constr_subst = subst_substituted + +type constant_body = { + const_hyps : section_context; (* New: younger hyp at top *) + const_body : constr_substituted option; + const_type : constant_type; + const_body_code : to_patch_substituted; + (* const_type_code : Cemitcodes.to_patch; *) + const_constraints : Univ.constraints; + const_opaque : bool; + const_inline : bool} + +let subst_rel_declaration sub (id,copt,t as x) = + let copt' = Option.smartmap (subst_mps sub) copt in + let t' = subst_mps sub t in + if copt == copt' & t == t' then x else (id,copt',t') + +let subst_rel_context sub = list_smartmap (subst_rel_declaration sub) + +type recarg = + | Norec + | Mrec of int + | Imbr of inductive + +let subst_recarg sub r = match r with + | Norec | Mrec _ -> r + | Imbr (kn,i) -> let kn' = subst_kn sub kn in + if kn==kn' then r else Imbr (kn',i) + +type wf_paths = recarg Rtree.t + +let mk_norec = Rtree.mk_node Norec [||] + +let mk_paths r recargs = + Rtree.mk_node r + (Array.map (fun l -> Rtree.mk_node Norec (Array.of_list l)) recargs) + +let dest_recarg p = fst (Rtree.dest_node p) + +let dest_subterms p = + let (_,cstrs) = Rtree.dest_node p in + Array.map (fun t -> Array.to_list (snd (Rtree.dest_node t))) cstrs + +let subst_wf_paths sub p = Rtree.smartmap (subst_recarg sub) p + +(**********************************************************************) +(* Representation of mutual inductive types in the kernel *) +(* + Inductive I1 (params) : U1 := c11 : T11 | ... | c1p1 : T1p1 + ... + with In (params) : Un := cn1 : Tn1 | ... | cnpn : Tnpn +*) + +type monomorphic_inductive_arity = { + mind_user_arity : constr; + mind_sort : sorts; +} + +type inductive_arity = +| Monomorphic of monomorphic_inductive_arity +| Polymorphic of polymorphic_arity + +type one_inductive_body = { + +(* Primitive datas *) + + (* Name of the type: [Ii] *) + mind_typename : identifier; + + (* Arity context of [Ii] with parameters: [forall params, Ui] *) + mind_arity_ctxt : rel_context; + + (* Arity sort, original user arity, and allowed elim sorts, if monomorphic *) + mind_arity : inductive_arity; + + (* Names of the constructors: [cij] *) + mind_consnames : identifier array; + + (* Types of the constructors with parameters: [forall params, Tij], + where the Ik are replaced by de Bruijn index in the context + I1:forall params, U1 .. In:forall params, Un *) + mind_user_lc : constr array; + +(* Derived datas *) + + (* Number of expected real arguments of the type (no let, no params) *) + mind_nrealargs : int; + + (* List of allowed elimination sorts *) + mind_kelim : sorts_family list; + + (* Head normalized constructor types so that their conclusion is atomic *) + mind_nf_lc : constr array; + + (* Length of the signature of the constructors (with let, w/o params) *) + mind_consnrealdecls : int array; + + (* Signature of recursive arguments in the constructors *) + mind_recargs : wf_paths; + +(* Datas for bytecode compilation *) + + (* number of constant constructor *) + mind_nb_constant : int; + + (* number of no constant constructor *) + mind_nb_args : int; + + mind_reloc_tbl : reloc_table; + } + +type mutual_inductive_body = { + + (* The component of the mutual inductive block *) + mind_packets : one_inductive_body array; + + (* Whether the inductive type has been declared as a record *) + mind_record : bool; + + (* Whether the type is inductive or coinductive *) + mind_finite : bool; + + (* Number of types in the block *) + mind_ntypes : int; + + (* Section hypotheses on which the block depends *) + mind_hyps : section_context; + + (* Number of expected parameters *) + mind_nparams : int; + + (* Number of recursively uniform (i.e. ordinary) parameters *) + mind_nparams_rec : int; + + (* The context of parameters (includes let-in declaration) *) + mind_params_ctxt : rel_context; + + (* Universes constraints enforced by the inductive declaration *) + mind_constraints : Univ.constraints; + + (* Source of the inductive block when aliased in a module *) + mind_equiv : kernel_name option + } + +let subst_arity sub = function +| NonPolymorphicType s -> NonPolymorphicType (subst_mps sub s) +| PolymorphicArity (ctx,s) -> PolymorphicArity (subst_rel_context sub ctx,s) + +(* TODO: should be changed to non-coping after Term.subst_mps *) +let subst_const_body sub cb = { + const_hyps = (assert (cb.const_hyps=[]); []); + const_body = Option.map (subst_constr_subst sub) cb.const_body; + const_type = subst_arity sub cb.const_type; + const_body_code = (*Cemitcodes.subst_to_patch_subst sub*) cb.const_body_code; + (*const_type_code = Cemitcodes.subst_to_patch sub cb.const_type_code;*) + const_constraints = cb.const_constraints; + const_opaque = cb.const_opaque; + const_inline = cb.const_inline} + +let subst_arity sub = function +| Monomorphic s -> + Monomorphic { + mind_user_arity = subst_mps sub s.mind_user_arity; + mind_sort = s.mind_sort; + } +| Polymorphic s as x -> x + +let subst_mind_packet sub mbp = + { mind_consnames = mbp.mind_consnames; + mind_consnrealdecls = mbp.mind_consnrealdecls; + mind_typename = mbp.mind_typename; + mind_nf_lc = array_smartmap (subst_mps sub) mbp.mind_nf_lc; + mind_arity_ctxt = subst_rel_context sub mbp.mind_arity_ctxt; + mind_arity = subst_arity sub mbp.mind_arity; + mind_user_lc = array_smartmap (subst_mps sub) mbp.mind_user_lc; + mind_nrealargs = mbp.mind_nrealargs; + mind_kelim = mbp.mind_kelim; + mind_recargs = subst_wf_paths sub mbp.mind_recargs (*wf_paths*); + mind_nb_constant = mbp.mind_nb_constant; + mind_nb_args = mbp.mind_nb_args; + mind_reloc_tbl = mbp.mind_reloc_tbl } + + +let subst_mind sub mib = + { mind_record = mib.mind_record ; + mind_finite = mib.mind_finite ; + mind_ntypes = mib.mind_ntypes ; + mind_hyps = (assert (mib.mind_hyps=[]); []) ; + mind_nparams = mib.mind_nparams; + mind_nparams_rec = mib.mind_nparams_rec; + mind_params_ctxt = + map_rel_context (subst_mps sub) mib.mind_params_ctxt; + mind_packets = array_smartmap (subst_mind_packet sub) mib.mind_packets ; + mind_constraints = mib.mind_constraints ; + mind_equiv = Option.map (subst_kn sub) mib.mind_equiv } + +(* Modules *) + +type structure_field_body = + | SFBconst of constant_body + | SFBmind of mutual_inductive_body + | SFBmodule of module_body + | SFBalias of module_path * Univ.constraints option + | SFBmodtype of module_type_body + +and structure_body = (label * structure_field_body) list + +and struct_expr_body = + | SEBident of module_path + | SEBfunctor of mod_bound_id * module_type_body * struct_expr_body + | SEBstruct of mod_self_id * structure_body + | SEBapply of struct_expr_body * struct_expr_body + * Univ.constraints + | SEBwith of struct_expr_body * with_declaration_body + +and with_declaration_body = + With_module_body of identifier list * module_path * Univ.constraints + | With_definition_body of identifier list * constant_body + +and module_body = + { mod_expr : struct_expr_body option; + mod_type : struct_expr_body option; + mod_constraints : Univ.constraints; + mod_alias : substitution; + mod_retroknowledge : action list} + +and module_type_body = + { typ_expr : struct_expr_body; + typ_strength : module_path option; + typ_alias : substitution} + + +let subst_with_body sub = function + | With_module_body(id,mp,cst) -> + With_module_body(id,subst_mp sub mp,cst) + | With_definition_body(id,cb) -> + With_definition_body( id,subst_const_body sub cb) + +let rec subst_modtype sub mtb = + let typ_expr' = subst_struct_expr sub mtb.typ_expr in + if typ_expr'==mtb.typ_expr then + mtb + else + { mtb with + typ_expr = typ_expr'} + +and subst_structure sub sign = + let subst_body = function + SFBconst cb -> + SFBconst (subst_const_body sub cb) + | SFBmind mib -> + SFBmind (subst_mind sub mib) + | SFBmodule mb -> + SFBmodule (subst_module sub mb) + | SFBmodtype mtb -> + SFBmodtype (subst_modtype sub mtb) + | SFBalias (mp,cst) -> + SFBalias (subst_mp sub mp,cst) + in + List.map (fun (l,b) -> (l,subst_body b)) sign + +and subst_module sub mb = + let mtb' = Option.smartmap (subst_struct_expr sub) mb.mod_type in + (* This is similar to the previous case. In this case we have + a module M in a signature that is knows to be equivalent to a module M' + (because the signature is "K with Module M := M'") and we are substituting + M' with some M''. *) + let me' = Option.smartmap (subst_struct_expr sub) mb.mod_expr in + let mb_alias = join_alias mb.mod_alias sub in + if mtb'==mb.mod_type && mb.mod_expr == me' + && mb_alias == mb.mod_alias + then mb else + { mod_expr = me'; + mod_type=mtb'; + mod_constraints=mb.mod_constraints; + mod_alias = mb_alias; + mod_retroknowledge=mb.mod_retroknowledge} + + +and subst_struct_expr sub = function + | SEBident mp -> SEBident (subst_mp sub mp) + | SEBfunctor (msid, mtb, meb') -> + SEBfunctor(msid,subst_modtype sub mtb,subst_struct_expr sub meb') + | SEBstruct (msid,str)-> + SEBstruct(msid, subst_structure sub str) + | SEBapply (meb1,meb2,cst)-> + SEBapply(subst_struct_expr sub meb1, + subst_struct_expr sub meb2, + cst) + | SEBwith (meb,wdb)-> + SEBwith(subst_struct_expr sub meb, + subst_with_body sub wdb) + + +let subst_signature_msid msid mp = + subst_structure (map_msid msid mp) diff --git a/checker/declarations.mli b/checker/declarations.mli new file mode 100644 index 00000000..fdea3383 --- /dev/null +++ b/checker/declarations.mli @@ -0,0 +1,212 @@ +open Util +open Names +open Term + +(* Bytecode *) +type values +type reloc_table +type to_patch_substituted +(*Retroknowledge *) +type action +type retroknowledge + +(* Engagements *) + +type engagement = ImpredicativeSet + +(* Constants *) + +type polymorphic_arity = { + poly_param_levels : Univ.universe option list; + poly_level : Univ.universe; +} + +type constant_type = + | NonPolymorphicType of constr + | PolymorphicArity of rel_context * polymorphic_arity + +type constr_substituted +val force_constr : constr_substituted -> constr +val from_val : constr -> constr_substituted + +type constant_body = { + const_hyps : section_context; (* New: younger hyp at top *) + const_body : constr_substituted option; + const_type : constant_type; + const_body_code : to_patch_substituted; + const_constraints : Univ.constraints; + const_opaque : bool; + const_inline : bool} + +(* Mutual inductives *) + +type recarg = + | Norec + | Mrec of int + | Imbr of inductive + +type wf_paths = recarg Rtree.t + +val mk_norec : wf_paths +val mk_paths : recarg -> wf_paths list array -> wf_paths +val dest_subterms : wf_paths -> wf_paths list array + +type monomorphic_inductive_arity = { + mind_user_arity : constr; + mind_sort : sorts; +} + +type inductive_arity = +| Monomorphic of monomorphic_inductive_arity +| Polymorphic of polymorphic_arity + +type one_inductive_body = { + +(* Primitive datas *) + + (* Name of the type: [Ii] *) + mind_typename : identifier; + + (* Arity context of [Ii] with parameters: [forall params, Ui] *) + mind_arity_ctxt : rel_context; + + (* Arity sort, original user arity, and allowed elim sorts, if monomorphic *) + mind_arity : inductive_arity; + + (* Names of the constructors: [cij] *) + mind_consnames : identifier array; + + (* Types of the constructors with parameters: [forall params, Tij], + where the Ik are replaced by de Bruijn index in the context + I1:forall params, U1 .. In:forall params, Un *) + mind_user_lc : constr array; + +(* Derived datas *) + + (* Number of expected real arguments of the type (no let, no params) *) + mind_nrealargs : int; + + (* List of allowed elimination sorts *) + mind_kelim : sorts_family list; + + (* Head normalized constructor types so that their conclusion is atomic *) + mind_nf_lc : constr array; + + (* Length of the signature of the constructors (with let, w/o params) *) + mind_consnrealdecls : int array; + + (* Signature of recursive arguments in the constructors *) + mind_recargs : wf_paths; + +(* Datas for bytecode compilation *) + + (* number of constant constructor *) + mind_nb_constant : int; + + (* number of no constant constructor *) + mind_nb_args : int; + + mind_reloc_tbl : reloc_table; + } + +type mutual_inductive_body = { + + (* The component of the mutual inductive block *) + mind_packets : one_inductive_body array; + + (* Whether the inductive type has been declared as a record *) + mind_record : bool; + + (* Whether the type is inductive or coinductive *) + mind_finite : bool; + + (* Number of types in the block *) + mind_ntypes : int; + + (* Section hypotheses on which the block depends *) + mind_hyps : section_context; + + (* Number of expected parameters *) + mind_nparams : int; + + (* Number of recursively uniform (i.e. ordinary) parameters *) + mind_nparams_rec : int; + + (* The context of parameters (includes let-in declaration) *) + mind_params_ctxt : rel_context; + + (* Universes constraints enforced by the inductive declaration *) + mind_constraints : Univ.constraints; + + (* Source of the inductive block when aliased in a module *) + mind_equiv : kernel_name option + } + +(* Modules *) + +type substitution + +type structure_field_body = + | SFBconst of constant_body + | SFBmind of mutual_inductive_body + | SFBmodule of module_body + | SFBalias of module_path * Univ.constraints option + | SFBmodtype of module_type_body + +and structure_body = (label * structure_field_body) list + +and struct_expr_body = + | SEBident of module_path + | SEBfunctor of mod_bound_id * module_type_body * struct_expr_body + | SEBstruct of mod_self_id * structure_body + | SEBapply of struct_expr_body * struct_expr_body + * Univ.constraints + | SEBwith of struct_expr_body * with_declaration_body + +and with_declaration_body = + With_module_body of identifier list * module_path * Univ.constraints + | With_definition_body of identifier list * constant_body + +and module_body = + { mod_expr : struct_expr_body option; + mod_type : struct_expr_body option; + mod_constraints : Univ.constraints; + mod_alias : substitution; + mod_retroknowledge : action list} + +and module_type_body = + { typ_expr : struct_expr_body; + typ_strength : module_path option; + typ_alias : substitution} + +(* Substitutions *) + +val fold_subst : + (mod_self_id -> module_path -> 'a -> 'a) -> + (mod_bound_id -> module_path -> 'a -> 'a) -> + (module_path -> module_path -> 'a -> 'a) -> + substitution -> 'a -> 'a + +type 'a subst_fun = substitution -> 'a -> 'a + +val empty_subst : substitution +val add_msid : mod_self_id -> module_path -> substitution -> substitution +val add_mbid : mod_bound_id -> module_path -> substitution -> substitution +val add_mp : module_path -> module_path -> substitution -> substitution +val map_msid : mod_self_id -> module_path -> substitution +val map_mbid : mod_bound_id -> module_path -> substitution +val map_mp : module_path -> module_path -> substitution + +val subst_const_body : constant_body subst_fun +val subst_mind : mutual_inductive_body subst_fun +val subst_modtype : substitution -> module_type_body -> module_type_body +val subst_struct_expr : substitution -> struct_expr_body -> struct_expr_body +val subst_structure : substitution -> structure_body -> structure_body +val subst_signature_msid : + mod_self_id -> module_path -> structure_body -> structure_body + +val join : substitution -> substitution -> substitution +val join_alias : substitution -> substitution -> substitution +val update_subst_alias : substitution -> substitution -> substitution +val update_subst : substitution -> substitution -> substitution +val subst_key : substitution -> substitution -> substitution diff --git a/checker/environ.ml b/checker/environ.ml new file mode 100644 index 00000000..58f08bdd --- /dev/null +++ b/checker/environ.ml @@ -0,0 +1,206 @@ +open Util +open Names +open Univ +open Term +open Declarations + +type globals = { + env_constants : constant_body Cmap.t; + env_inductives : mutual_inductive_body KNmap.t; + env_modules : module_body MPmap.t; + env_modtypes : module_type_body MPmap.t; + env_alias : module_path MPmap.t } + +type stratification = { + env_universes : universes; + env_engagement : engagement option +} + +type env = { + env_globals : globals; + env_named_context : named_context; + env_rel_context : rel_context; + env_stratification : stratification; + env_imports : Digest.t MPmap.t } + +let empty_env = { + env_globals = + { env_constants = Cmap.empty; + env_inductives = KNmap.empty; + env_modules = MPmap.empty; + env_modtypes = MPmap.empty; + env_alias = MPmap.empty }; + env_named_context = []; + env_rel_context = []; + env_stratification = + { env_universes = Univ.initial_universes; + env_engagement = None}; + env_imports = MPmap.empty } + +let engagement env = env.env_stratification.env_engagement +let universes env = env.env_stratification.env_universes +let named_context env = env.env_named_context +let rel_context env = env.env_rel_context + +let set_engagement c env = + match env.env_stratification.env_engagement with + | Some c' -> if c=c' then env else error "Incompatible engagement" + | None -> + { env with env_stratification = + { env.env_stratification with env_engagement = Some c } } + +(* Digests *) + +let add_digest env dp digest = + { env with env_imports = MPmap.add (MPfile dp) digest env.env_imports } + +let lookup_digest env dp = + MPmap.find (MPfile dp) env.env_imports + +(* Rel context *) +let lookup_rel n env = + let rec lookup_rel n sign = + match n, sign with + | 1, decl :: _ -> decl + | n, _ :: sign -> lookup_rel (n-1) sign + | _, [] -> raise Not_found in + lookup_rel n env.env_rel_context + +let push_rel d env = + { env with + env_rel_context = d :: env.env_rel_context } + +let push_rel_context ctxt x = fold_rel_context push_rel ctxt ~init:x + +let push_rec_types (lna,typarray,_) env = + let ctxt = array_map2_i (fun i na t -> (na, None, lift i t)) lna typarray in + Array.fold_left (fun e assum -> push_rel assum e) env ctxt + +(* Named context *) + +let push_named d env = +(* if not (env.env_rel_context = []) then raise (ASSERT env.env_rel_context); + assert (env.env_rel_context = []); *) + { env with + env_named_context = d :: env.env_named_context } + +let lookup_named id env = + let rec lookup_named id = function + | (id',_,_ as decl) :: _ when id=id' -> decl + | _ :: sign -> lookup_named id sign + | [] -> raise Not_found in + lookup_named id env.env_named_context + +(* A local const is evaluable if it is defined *) + +let named_type id env = + let (_,_,t) = lookup_named id env in t + +(* Universe constraints *) +let add_constraints c env = + if c == Constraint.empty then + env + else + let s = env.env_stratification in + { env with env_stratification = + { s with env_universes = merge_constraints c s.env_universes } } + +(* Global constants *) + +let lookup_constant kn env = + Cmap.find kn env.env_globals.env_constants + +let add_constant kn cs env = + let new_constants = + Cmap.add kn cs env.env_globals.env_constants in + let new_globals = + { env.env_globals with + env_constants = new_constants } in + { env with env_globals = new_globals } + +(* constant_type gives the type of a constant *) +let constant_type env kn = + let cb = lookup_constant kn env in + cb.const_type + +type const_evaluation_result = NoBody | Opaque + +exception NotEvaluableConst of const_evaluation_result + +let constant_value env kn = + let cb = lookup_constant kn env in + if cb.const_opaque then raise (NotEvaluableConst Opaque); + match cb.const_body with + | Some l_body -> force_constr l_body + | None -> raise (NotEvaluableConst NoBody) + +let constant_opt_value env cst = + try Some (constant_value env cst) + with NotEvaluableConst _ -> None + +(* A global const is evaluable if it is defined and not opaque *) +let evaluable_constant cst env = + try let _ = constant_value env cst in true + with Not_found | NotEvaluableConst _ -> false + +(* Mutual Inductives *) +let lookup_mind kn env = + KNmap.find kn env.env_globals.env_inductives + +let rec scrape_mind env kn = + match (lookup_mind kn env).mind_equiv with + | None -> kn + | Some kn' -> scrape_mind env kn' + +let add_mind kn mib env = + let new_inds = KNmap.add kn mib env.env_globals.env_inductives in + let new_globals = + { env.env_globals with + env_inductives = new_inds } in + { env with env_globals = new_globals } + +let rec mind_equiv env (kn1,i1) (kn2,i2) = + let rec equiv kn1 kn2 = + kn1 = kn2 || + scrape_mind env kn1 = scrape_mind env kn2 in + i1 = i2 && equiv kn1 kn2 + + +(* Modules *) + +let add_modtype ln mtb env = + let new_modtypes = MPmap.add ln mtb env.env_globals.env_modtypes in + let new_globals = + { env.env_globals with + env_modtypes = new_modtypes } in + { env with env_globals = new_globals } + +let shallow_add_module mp mb env = + let new_mods = MPmap.add mp mb env.env_globals.env_modules in + let new_globals = + { env.env_globals with + env_modules = new_mods } in + { env with env_globals = new_globals } + +let register_alias mp1 mp2 env = + let new_alias = MPmap.add mp1 mp2 env.env_globals.env_alias in + let new_globals = + { env.env_globals with + env_alias = new_alias } in + { env with env_globals = new_globals } + +let rec scrape_alias mp env = + try + let mp1 = MPmap.find mp env.env_globals.env_alias in + scrape_alias mp1 env + with + Not_found -> mp + +let lookup_module mp env = + MPmap.find mp env.env_globals.env_modules + +let lookup_modtype ln env = + MPmap.find ln env.env_globals.env_modtypes + +let lookup_alias mp env = + MPmap.find mp env.env_globals.env_alias diff --git a/checker/environ.mli b/checker/environ.mli new file mode 100644 index 00000000..a3f531dd --- /dev/null +++ b/checker/environ.mli @@ -0,0 +1,67 @@ +open Names +open Term + +type globals = { + env_constants : Declarations.constant_body Cmap.t; + env_inductives : Declarations.mutual_inductive_body KNmap.t; + env_modules : Declarations.module_body MPmap.t; + env_modtypes : Declarations.module_type_body MPmap.t; + env_alias : module_path MPmap.t; +} +type stratification = { + env_universes : Univ.universes; + env_engagement : Declarations.engagement option; +} +type env = { + env_globals : globals; + env_named_context : named_context; + env_rel_context : rel_context; + env_stratification : stratification; + env_imports : Digest.t MPmap.t; +} +val empty_env : env +val engagement : env -> Declarations.engagement option +val universes : env -> Univ.universes +val named_context : env -> named_context +val rel_context : env -> rel_context +val set_engagement : Declarations.engagement -> env -> env + +val add_digest : env -> dir_path -> Digest.t -> env +val lookup_digest : env -> dir_path -> Digest.t + +val lookup_rel : int -> env -> rel_declaration +val push_rel : rel_declaration -> env -> env +val push_rel_context : rel_context -> env -> env +val push_rec_types : name array * constr array * 'a -> env -> env + +val push_named : named_declaration -> env -> env +val lookup_named : identifier -> env -> named_declaration +val named_type : identifier -> env -> constr + +val add_constraints : Univ.constraints -> env -> env + +val lookup_constant : constant -> env -> Declarations.constant_body +val add_constant : constant -> Declarations.constant_body -> env -> env +val constant_type : env -> constant -> Declarations.constant_type +type const_evaluation_result = NoBody | Opaque +exception NotEvaluableConst of const_evaluation_result +val constant_value : env -> constant -> constr +val constant_opt_value : env -> constant -> constr option +val evaluable_constant : constant -> env -> bool + +val lookup_mind : + mutual_inductive -> env -> Declarations.mutual_inductive_body +val scrape_mind : env -> mutual_inductive -> mutual_inductive +val add_mind : + mutual_inductive -> Declarations.mutual_inductive_body -> env -> env +val mind_equiv : env -> inductive -> inductive -> bool + +val add_modtype : + module_path -> Declarations.module_type_body -> env -> env +val shallow_add_module : + module_path -> Declarations.module_body -> env -> env +val register_alias : module_path -> module_path -> env -> env +val scrape_alias : module_path -> env -> module_path +val lookup_module : module_path -> env -> Declarations.module_body +val lookup_modtype : module_path -> env -> Declarations.module_type_body +val lookup_alias : module_path -> env -> module_path diff --git a/checker/indtypes.ml b/checker/indtypes.ml new file mode 100644 index 00000000..8c84fb0f --- /dev/null +++ b/checker/indtypes.ml @@ -0,0 +1,527 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* true + | _ -> false + +let conv_ctxt_prefix env (ctx1:rel_context) ctx2 = + let rec chk env rctx1 rctx2 = + match rctx1, rctx2 with + (_,None,ty1 as d1)::rctx1', (_,None,ty2)::rctx2' -> + conv env ty1 ty2; + chk (push_rel d1 env) rctx1' rctx2' + | (_,Some bd1,ty1 as d1)::rctx1', (_,Some bd2,ty2)::rctx2' -> + conv env ty1 ty2; + conv env bd1 bd2; + chk (push_rel d1 env) rctx1' rctx2' + | [],_ -> () + | _ -> failwith "non convertible contexts" in + chk env (List.rev ctx1) (List.rev ctx2) + +(************************************************************************) +(* Various well-formedness check for inductive declarations *) + +(* Errors related to inductive constructions *) +type inductive_error = + | NonPos of env * constr * constr + | NotEnoughArgs of env * constr * constr + | NotConstructor of env * constr * constr + | NonPar of env * constr * int * constr * constr + | SameNamesTypes of identifier + | SameNamesConstructors of identifier + | SameNamesOverlap of identifier list + | NotAnArity of identifier + | BadEntry + +exception InductiveError of inductive_error + +(************************************************************************) +(************************************************************************) + +(* Typing the arities and constructor types *) + +let rec sorts_of_constr_args env t = + let t = whd_betadeltaiota_nolet env t in + match t with + | Prod (name,c1,c2) -> + let varj = infer_type env c1 in + let env1 = push_rel (name,None,c1) env in + varj :: sorts_of_constr_args env1 c2 + | LetIn (name,def,ty,c) -> + let env1 = push_rel (name,Some def,ty) env in + sorts_of_constr_args env1 c + | _ when is_constructor_head t -> [] + | _ -> anomaly "infos_and_sort: not a positive constructor" + + +(* Prop and Set are small *) +let is_small_sort = function + | Prop _ -> true + | _ -> false + +let is_logic_sort s = (s = Prop Null) + +(* [infos] is a sequence of pair [islogic,issmall] for each type in + the product of a constructor or arity *) + +let is_small_constr infos = List.for_all (fun s -> is_small_sort s) infos +let is_logic_constr infos = List.for_all (fun s -> is_logic_sort s) infos + +(* An inductive definition is a "unit" if it has only one constructor + and that all arguments expected by this constructor are + logical, this is the case for equality, conjunction of logical properties +*) +let is_unit constrsinfos = + match constrsinfos with (* One info = One constructor *) + | [|constrinfos|] -> is_logic_constr constrinfos + | [||] -> (* type without constructors *) true + | _ -> false + +let small_unit constrsinfos = + let issmall = array_for_all is_small_constr constrsinfos + and isunit = is_unit constrsinfos in + issmall, isunit + +(* check information related to inductive arity *) +let typecheck_arity env params inds = + let nparamargs = rel_context_nhyps params in + let check_arity arctxt = function + Monomorphic mar -> + let ar = mar.mind_user_arity in + let _ = infer_type env ar in + conv env (it_mkProd_or_LetIn (Sort mar.mind_sort) arctxt) ar; + ar + | Polymorphic par -> + check_polymorphic_arity env params par; + it_mkProd_or_LetIn (Sort(Type par.poly_level)) arctxt in + let env_arities = + Array.fold_left + (fun env_ar ind -> + let ar_ctxt = ind.mind_arity_ctxt in + let _ = check_ctxt env ar_ctxt in + conv_ctxt_prefix env params ar_ctxt; + (* Arities (with params) are typed-checked here *) + let arity = check_arity ar_ctxt ind.mind_arity in + (* mind_nrealargs *) + if ind.mind_nrealargs <> rel_context_nhyps ar_ctxt - nparamargs then + failwith "bad number of real inductive arguments"; + (* We do not need to generate the universe of full_arity; if + later, after the validation of the inductive definition, + full_arity is used as argument or subject to cast, an + upper universe will be generated *) + let id = ind.mind_typename in + let env_ar' = push_rel (Name id, None, arity) env_ar in + env_ar') + env + inds in + env_arities + +(* Allowed eliminations *) + +let check_predicativity env s small level = + match s, engagement env with + Type u, _ -> + let u' = fresh_local_univ () in + let cst = + merge_constraints (enforce_geq u' u Constraint.empty) + (universes env) in + if not (check_geq cst u' level) then + failwith "impredicative Type inductive type" + | Prop Pos, Some ImpredicativeSet -> () + | Prop Pos, _ -> + if not small then failwith "impredicative Set inductive type" + | Prop Null,_ -> () + + +let sort_of_ind = function + Monomorphic mar -> mar.mind_sort + | Polymorphic par -> Type par.poly_level + +let all_sorts = [InProp;InSet;InType] +let small_sorts = [InProp;InSet] +let logical_sorts = [InProp] + +let allowed_sorts issmall isunit s = + match family_of_sort s with + (* Type: all elimination allowed *) + | InType -> all_sorts + + (* Small Set is predicative: all elimination allowed *) + | InSet when issmall -> all_sorts + + (* Large Set is necessarily impredicative: forbids large elimination *) + | InSet -> small_sorts + + (* Unitary/empty Prop: elimination to all sorts are realizable *) + (* unless the type is large. If it is large, forbids large elimination *) + (* which otherwise allows to simulate the inconsistent system Type:Type *) + | InProp when isunit -> if issmall then all_sorts else small_sorts + + (* Other propositions: elimination only to Prop *) + | InProp -> logical_sorts + + + +let compute_elim_sorts env_ar params mib arity lc = + let inst = extended_rel_list 0 params in + let env_params = push_rel_context params env_ar in + let lc = Array.map + (fun c -> + hnf_prod_applist env_params (lift (rel_context_length params) c) inst) + lc in + let s = sort_of_ind arity in + let infos = Array.map (sorts_of_constr_args env_params) lc in + let (small,unit) = small_unit infos in + (* We accept recursive unit types... *) + let unit = unit && mib.mind_ntypes = 1 in + (* compute the max of the sorts of the products of the constructor type *) + let level = max_inductive_sort + (Array.concat (Array.to_list (Array.map Array.of_list infos))) in + check_predicativity env_ar s small level; + allowed_sorts small unit s + + +let typecheck_one_inductive env params mib mip = + (* mind_typename and mind_consnames not checked *) + (* mind_reloc_tbl, mind_nb_constant, mind_nb_args not checked (VM) *) + (* mind_arity_ctxt, mind_arity, mind_nrealargs DONE (typecheck_arity) *) + (* mind_user_lc *) + let _ = Array.map (infer_type env) mip.mind_user_lc in + (* mind_nf_lc *) + let _ = Array.map (infer_type env) mip.mind_nf_lc in + array_iter2 (conv env) mip.mind_nf_lc mip.mind_user_lc; + (* mind_consnrealdecls *) + let check_cons_args c n = + let ctx,_ = decompose_prod_assum c in + if n <> rel_context_length ctx - rel_context_length params then + failwith "bad number of real constructor arguments" in + array_iter2 check_cons_args mip.mind_nf_lc mip.mind_consnrealdecls; + (* mind_kelim: checked by positivity criterion ? *) + let sorts = + compute_elim_sorts env params mib mip.mind_arity mip.mind_nf_lc in + if List.exists (fun s -> not (List.mem s sorts)) mip.mind_kelim then + failwith "elimination not allowed"; + (* mind_recargs: checked by positivity criterion *) + () + +(************************************************************************) +(************************************************************************) +(* Positivity *) + +type ill_formed_ind = + | LocalNonPos of int + | LocalNotEnoughArgs of int + | LocalNotConstructor + | LocalNonPar of int * int + +exception IllFormedInd of ill_formed_ind + +(* [mind_extract_params mie] extracts the params from an inductive types + declaration, and checks that they are all present (and all the same) + for all the given types. *) + +let mind_extract_params = decompose_prod_n_assum + +let explain_ind_err ntyp env0 nbpar c err = + let (lpar,c') = mind_extract_params nbpar c in + let env = push_rel_context lpar env0 in + match err with + | LocalNonPos kt -> + raise (InductiveError (NonPos (env,c',Rel (kt+nbpar)))) + | LocalNotEnoughArgs kt -> + raise (InductiveError + (NotEnoughArgs (env,c',Rel (kt+nbpar)))) + | LocalNotConstructor -> + raise (InductiveError + (NotConstructor (env,c',Rel (ntyp+nbpar)))) + | LocalNonPar (n,l) -> + raise (InductiveError + (NonPar (env,c',n,Rel (nbpar-n+1), Rel (l+nbpar)))) + +let failwith_non_pos n ntypes c = + for k = n to n + ntypes - 1 do + if not (noccurn k c) then raise (IllFormedInd (LocalNonPos (k-n+1))) + done + +let failwith_non_pos_vect n ntypes v = + Array.iter (failwith_non_pos n ntypes) v; + anomaly "failwith_non_pos_vect: some k in [n;n+ntypes-1] should occur" + +let failwith_non_pos_list n ntypes l = + List.iter (failwith_non_pos n ntypes) l; + anomaly "failwith_non_pos_list: some k in [n;n+ntypes-1] should occur" + +(* Conclusion of constructors: check the inductive type is called with + the expected parameters *) +let check_correct_par (env,n,ntypes,_) hyps l largs = + let nparams = rel_context_nhyps hyps in + let largs = Array.of_list largs in + if Array.length largs < nparams then + raise (IllFormedInd (LocalNotEnoughArgs l)); + let (lpar,largs') = array_chop nparams largs in + let nhyps = List.length hyps in + let rec check k index = function + | [] -> () + | (_,Some _,_)::hyps -> check k (index+1) hyps + | _::hyps -> + match whd_betadeltaiota env lpar.(k) with + | Rel w when w = index -> check (k-1) (index+1) hyps + | _ -> raise (IllFormedInd (LocalNonPar (k+1,l))) + in check (nparams-1) (n-nhyps) hyps; + if not (array_for_all (noccur_between n ntypes) largs') then + failwith_non_pos_vect n ntypes largs' + +(* Arguments of constructor: check the number of recursive parameters nrecp. + the first parameters which are constant in recursive arguments + n is the current depth, nmr is the maximum number of possible + recursive parameters *) + +let check_rec_par (env,n,_,_) hyps nrecp largs = + let (lpar,_) = list_chop nrecp largs in + let rec find index = + function + | ([],_) -> () + | (_,[]) -> + failwith "number of recursive parameters cannot be greater than the number of parameters." + | (lp,(_,Some _,_)::hyps) -> find (index-1) (lp,hyps) + | (p::lp,_::hyps) -> + (match whd_betadeltaiota env p with + | Rel w when w = index -> find (index-1) (lp,hyps) + | _ -> failwith "bad number of recursive parameters") + in find (n-1) (lpar,List.rev hyps) + +let lambda_implicit_lift n a = + let lambda_implicit a = Lambda(Anonymous,Evar(0,[||]),a) in + iterate lambda_implicit n (lift n a) + +(* This removes global parameters of the inductive types in lc (for + nested inductive types only ) *) +let abstract_mind_lc env ntyps npars lc = + if npars = 0 then + lc + else + let make_abs = + list_tabulate + (function i -> lambda_implicit_lift npars (Rel (i+1))) ntyps + in + Array.map (substl make_abs) lc + +(* [env] is the typing environment + [n] is the dB of the last inductive type + [ntypes] is the number of inductive types in the definition + (i.e. range of inductives is [n; n+ntypes-1]) + [lra] is the list of recursive tree of each variable + *) +let ienv_push_var (env, n, ntypes, lra) (x,a,ra) = + (push_rel (x,None,a) env, n+1, ntypes, (Norec,ra)::lra) + +let ienv_push_inductive (env, n, ntypes, ra_env) (mi,lpar) = + let auxntyp = 1 in + let specif = lookup_mind_specif env mi in + let env' = + push_rel (Anonymous,None, + hnf_prod_applist env (type_of_inductive env specif) lpar) env in + let ra_env' = + (Imbr mi,(Rtree.mk_rec_calls 1).(0)) :: + List.map (fun (r,t) -> (r,Rtree.lift 1 t)) ra_env in + (* New index of the inductive types *) + let newidx = n + auxntyp in + (env', newidx, ntypes, ra_env') + +(* The recursive function that checks positivity and builds the list + of recursive arguments *) +let check_positivity_one (env, _,ntypes,_ as ienv) hyps nrecp i indlc = + let lparams = rel_context_length hyps in + (* check the inductive types occur positively in [c] *) + let rec check_pos (env, n, ntypes, ra_env as ienv) c = + let x,largs = decompose_app (whd_betadeltaiota env c) in + match x with + | Prod (na,b,d) -> + assert (largs = []); + (match weaker_noccur_between env n ntypes b with + None -> failwith_non_pos_list n ntypes [b] + | Some b -> + check_pos (ienv_push_var ienv (na, b, mk_norec)) d) + | Rel k -> + (try + let (ra,rarg) = List.nth ra_env (k-1) in + (match ra with + Mrec _ -> check_rec_par ienv hyps nrecp largs + | _ -> ()); + if not (List.for_all (noccur_between n ntypes) largs) + then failwith_non_pos_list n ntypes largs + else rarg + with Failure _ | Invalid_argument _ -> mk_norec) + | Ind ind_kn -> + (* If the inductive type being defined appears in a + parameter, then we have an imbricated type *) + if List.for_all (noccur_between n ntypes) largs then mk_norec + else check_positive_imbr ienv (ind_kn, largs) + | err -> + if noccur_between n ntypes x && + List.for_all (noccur_between n ntypes) largs + then mk_norec + else failwith_non_pos_list n ntypes (x::largs) + + (* accesses to the environment are not factorised, but is it worth it? *) + and check_positive_imbr (env,n,ntypes,ra_env as ienv) (mi, largs) = + let (mib,mip) = lookup_mind_specif env mi in + let auxnpar = mib.mind_nparams_rec in + let (lpar,auxlargs) = + try list_chop auxnpar largs + with Failure _ -> raise (IllFormedInd (LocalNonPos n)) in + (* If the inductive appears in the args (non params) then the + definition is not positive. *) + if not (List.for_all (noccur_between n ntypes) auxlargs) then + raise (IllFormedInd (LocalNonPos n)); + (* We do not deal with imbricated mutual inductive types *) + let auxntyp = mib.mind_ntypes in + if auxntyp <> 1 then raise (IllFormedInd (LocalNonPos n)); + (* The nested inductive type with parameters removed *) + let auxlcvect = abstract_mind_lc env auxntyp auxnpar mip.mind_nf_lc in + (* Extends the environment with a variable corresponding to + the inductive def *) + let (env',_,_,_ as ienv') = ienv_push_inductive ienv (mi,lpar) in + (* Parameters expressed in env' *) + let lpar' = List.map (lift auxntyp) lpar in + let irecargs = + (* fails if the inductive type occurs non positively *) + (* when substituted *) + Array.map + (function c -> + let c' = hnf_prod_applist env' c lpar' in + check_constructors ienv' false c') + auxlcvect in + (Rtree.mk_rec [|mk_paths (Imbr mi) irecargs|]).(0) + + (* check the inductive types occur positively in the products of C, if + check_head=true, also check the head corresponds to a constructor of + the ith type *) + + and check_constructors ienv check_head c = + let rec check_constr_rec (env,n,ntypes,ra_env as ienv) lrec c = + let x,largs = decompose_app (whd_betadeltaiota env c) in + match x with + | Prod (na,b,d) -> + assert (largs = []); + let recarg = check_pos ienv b in + let ienv' = ienv_push_var ienv (na,b,mk_norec) in + check_constr_rec ienv' (recarg::lrec) d + + | hd -> + if check_head then + if hd = Rel (n+ntypes-i-1) then + check_correct_par ienv hyps (ntypes-i) largs + else + raise (IllFormedInd LocalNotConstructor) + else + if not (List.for_all (noccur_between n ntypes) largs) + then raise (IllFormedInd (LocalNonPos n)); + List.rev lrec + in check_constr_rec ienv [] c + in + let irecargs = + Array.map + (fun c -> + let _,rawc = mind_extract_params lparams c in + try + check_constructors ienv true rawc + with IllFormedInd err -> + explain_ind_err (ntypes-i) env lparams c err) + indlc + in mk_paths (Mrec i) irecargs + +let check_subtree (t1:'a) (t2:'a) = + if not (Rtree.compare_rtree (fun t1 t2 -> + let l1 = fst(Rtree.dest_node t1) in + let l2 = fst(Rtree.dest_node t2) in + if l1 = Norec || l1 = l2 then 0 else -1) + t1 t2) then + failwith "bad recursive trees" +(* if t1=t2 then () else msg_warning (str"TODO: check recursive positions")*) + +let check_positivity env_ar params nrecp inds = + let ntypes = Array.length inds in + let rc = Array.mapi (fun j t -> (Mrec j,t)) (Rtree.mk_rec_calls ntypes) in + let lra_ind = List.rev (Array.to_list rc) in + let lparams = rel_context_length params in + let check_one i mip = + let ra_env = + list_tabulate (fun _ -> (Norec,mk_norec)) lparams @ lra_ind in + let ienv = (env_ar, 1+lparams, ntypes, ra_env) in + check_positivity_one ienv params nrecp i mip.mind_nf_lc + in + let irecargs = Array.mapi check_one inds in + let wfp = Rtree.mk_rec irecargs in + array_iter2 (fun ind wfpi -> check_subtree ind.mind_recargs wfpi) inds wfp + +(************************************************************************) +(************************************************************************) + +let check_inductive env kn mib = + Flags.if_verbose msgnl (str " checking ind: " ++ prkn kn); + (* check mind_constraints: should be consistent with env *) + let env = add_constraints mib.mind_constraints env in + (* check mind_record : TODO ? check #constructor = 1 ? *) + (* check mind_finite : always OK *) + (* check mind_ntypes *) + if Array.length mib.mind_packets <> mib.mind_ntypes then + error "not the right number of packets"; + (* check mind_hyps: should be empty *) + if mib.mind_hyps <> empty_named_context then + error "section context not empty"; + (* check mind_params_ctxt *) + let params = mib.mind_params_ctxt in + let _ = check_ctxt env params in + (* check mind_nparams *) + if rel_context_nhyps params <> mib.mind_nparams then + error "number the right number of parameters"; + (* mind_packets *) + (* - check arities *) + let env_ar = typecheck_arity env params mib.mind_packets in + (* - check constructor types *) + Array.iter (typecheck_one_inductive env_ar params mib) mib.mind_packets; + (* check mind_nparams_rec: positivity condition *) + check_positivity env_ar params mib.mind_nparams_rec mib.mind_packets; + (* check mind_equiv... *) + if mib.mind_equiv <> None then + msg_warning (str"TODO: mind_equiv not checked"); + (* Now we can add the inductive *) + add_mind kn mib env + diff --git a/checker/indtypes.mli b/checker/indtypes.mli new file mode 100644 index 00000000..b920315a --- /dev/null +++ b/checker/indtypes.mli @@ -0,0 +1,42 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Pp.std_ppcmds +val prcon : constant -> Pp.std_ppcmds + +(*s The different kinds of errors that may result of a malformed inductive + definition. *) + +(* Errors related to inductive constructions *) +type inductive_error = + | NonPos of env * constr * constr + | NotEnoughArgs of env * constr * constr + | NotConstructor of env * constr * constr + | NonPar of env * constr * int * constr * constr + | SameNamesTypes of identifier + | SameNamesConstructors of identifier + | SameNamesOverlap of identifier list + | NotAnArity of identifier + | BadEntry + +exception InductiveError of inductive_error + +(*s The following function does checks on inductive declarations. *) + +val check_inductive : env -> mutual_inductive -> mutual_inductive_body -> env diff --git a/checker/inductive.ml b/checker/inductive.ml new file mode 100644 index 00000000..05ab5a84 --- /dev/null +++ b/checker/inductive.ml @@ -0,0 +1,913 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* = Array.length mib.mind_packets then + error "Inductive.lookup_mind_specif: invalid inductive index"; + (mib, mib.mind_packets.(tyi)) + +let find_rectype env c = + let (t, l) = decompose_app (whd_betadeltaiota env c) in + match t with + | Ind ind -> (ind, l) + | _ -> raise Not_found + +let find_inductive env c = + let (t, l) = decompose_app (whd_betadeltaiota env c) in + match t with + | Ind ind + when (fst (lookup_mind_specif env ind)).mind_finite -> (ind, l) + | _ -> raise Not_found + +let find_coinductive env c = + let (t, l) = decompose_app (whd_betadeltaiota env c) in + match t with + | Ind ind + when not (fst (lookup_mind_specif env ind)).mind_finite -> (ind, l) + | _ -> raise Not_found + +let inductive_params (mib,_) = mib.mind_nparams + +(************************************************************************) + +(* Build the substitution that replaces Rels by the appropriate *) +(* inductives *) +let ind_subst mind mib = + let ntypes = mib.mind_ntypes in + let make_Ik k = Ind (mind,ntypes-k-1) in + list_tabulate make_Ik ntypes + +(* Instantiate inductives in constructor type *) +let constructor_instantiate mind mib c = + let s = ind_subst mind mib in + substl s c + +let instantiate_params full t args sign = + let fail () = + anomaly "instantiate_params: type, ctxt and args mismatch" in + let (rem_args, subs, ty) = + fold_rel_context + (fun (_,copt,_) (largs,subs,ty) -> + match (copt, largs, ty) with + | (None, a::args, Prod(_,_,t)) -> (args, a::subs, t) + | (Some b,_,LetIn(_,_,_,t)) -> (largs, (substl subs b)::subs, t) + | (_,[],_) -> if full then fail() else ([], subs, ty) + | _ -> fail ()) + sign + ~init:(args,[],t) + in + if rem_args <> [] then fail(); + substl subs ty + +let instantiate_partial_params = instantiate_params false + +let full_inductive_instantiate mib params sign = + let dummy = Prop Null in + let t = mkArity (sign,dummy) in + fst (destArity (instantiate_params true t params mib.mind_params_ctxt)) + +let full_constructor_instantiate ((mind,_),(mib,_),params) = + let inst_ind = constructor_instantiate mind mib in + (fun t -> + instantiate_params true (inst_ind t) params mib.mind_params_ctxt) + +(************************************************************************) +(************************************************************************) + +(* Functions to build standard types related to inductive *) + + +let number_of_inductives mib = Array.length mib.mind_packets +let number_of_constructors mip = Array.length mip.mind_consnames + +(* +Computing the actual sort of an applied or partially applied inductive type: + +I_i: forall uniformparams:utyps, forall otherparams:otyps, Type(a) +uniformargs : utyps +otherargs : otyps +I_1:forall ...,s_1;...I_n:forall ...,s_n |- sort(C_kj(uniformargs)) = s_kj +s'_k = max(..s_kj..) +merge(..s'_k..) = ..s''_k.. +-------------------------------------------------------------------- +Gamma |- I_i uniformargs otherargs : phi(s''_i) + +where + +- if p=0, phi() = Prop +- if p=1, phi(s) = s +- if p<>1, phi(s) = sup(Set,s) + +Remark: Set (predicative) is encoded as Type(0) +*) + +let sort_as_univ = function +| Type u -> u +| Prop Null -> type0m_univ +| Prop Pos -> type0_univ + +let cons_subst u su subst = + try (u, sup su (List.assoc u subst)) :: List.remove_assoc u subst + with Not_found -> (u, su) :: subst + +let actualize_decl_level env lev t = + let sign,s = dest_arity env t in + mkArity (sign,lev) + +let polymorphism_on_non_applied_parameters = false + +(* Bind expected levels of parameters to actual levels *) +(* Propagate the new levels in the signature *) +let rec make_subst env = function + | (_,Some _,_ as t)::sign, exp, args -> + let ctx,subst = make_subst env (sign, exp, args) in + t::ctx, subst + | d::sign, None::exp, args -> + let args = match args with _::args -> args | [] -> [] in + let ctx,subst = make_subst env (sign, exp, args) in + d::ctx, subst + | d::sign, Some u::exp, a::args -> + (* We recover the level of the argument, but we don't change the *) + (* level in the corresponding type in the arity; this level in the *) + (* arity is a global level which, at typing time, will be enforce *) + (* to be greater than the level of the argument; this is probably *) + (* a useless extra constraint *) + let s = sort_as_univ (snd (dest_arity env a)) in + let ctx,subst = make_subst env (sign, exp, args) in + d::ctx, cons_subst u s subst + | (na,None,t as d)::sign, Some u::exp, [] -> + (* No more argument here: we instantiate the type with a fresh level *) + (* which is first propagated to the corresponding premise in the arity *) + (* (actualize_decl_level), then to the conclusion of the arity (via *) + (* the substitution) *) + let ctx,subst = make_subst env (sign, exp, []) in + if polymorphism_on_non_applied_parameters then + let s = fresh_local_univ () in + let t = actualize_decl_level env (Type s) t in + (na,None,t)::ctx, cons_subst u s subst + else + d::ctx, subst + | sign, [], _ -> + (* Uniform parameters are exhausted *) + sign,[] + | [], _, _ -> + assert false + +let instantiate_universes env ctx ar argsorts = + let args = Array.to_list argsorts in + let ctx,subst = make_subst env (ctx,ar.poly_param_levels,args) in + let level = subst_large_constraints subst ar.poly_level in + ctx, + if is_type0m_univ level then Prop Null + else if is_type0_univ level then Prop Pos + else Type level + +let type_of_inductive_knowing_parameters env mip paramtyps = + match mip.mind_arity with + | Monomorphic s -> + s.mind_user_arity + | Polymorphic ar -> + let ctx = List.rev mip.mind_arity_ctxt in + let ctx,s = instantiate_universes env ctx ar paramtyps in + mkArity (List.rev ctx,s) + +(* Type of a (non applied) inductive type *) + +let type_of_inductive env (_,mip) = + type_of_inductive_knowing_parameters env mip [||] + +(* The max of an array of universes *) + +let cumulate_constructor_univ u = function + | Prop Null -> u + | Prop Pos -> sup type0_univ u + | Type u' -> sup u u' + +let max_inductive_sort = + Array.fold_left cumulate_constructor_univ type0m_univ + +(************************************************************************) +(* Type of a constructor *) + +let type_of_constructor cstr (mib,mip) = + let ind = inductive_of_constructor cstr in + let specif = mip.mind_user_lc in + let i = index_of_constructor cstr in + let nconstr = Array.length mip.mind_consnames in + if i > nconstr then error "Not enough constructors in the type"; + constructor_instantiate (fst ind) mib specif.(i-1) + +let arities_of_specif kn (mib,mip) = + let specif = mip.mind_nf_lc in + Array.map (constructor_instantiate kn mib) specif + + + +(************************************************************************) + +let error_elim_expln kp ki = + match kp,ki with + | (InType | InSet), InProp -> NonInformativeToInformative + | InType, InSet -> StrongEliminationOnNonSmallType (* if Set impredicative *) + | _ -> WrongArity + +(* Type of case predicates *) + +(* Get type of inductive, with parameters instantiated *) + +let inductive_sort_family mip = + match mip.mind_arity with + | Monomorphic s -> family_of_sort s.mind_sort + | Polymorphic _ -> InType + +let mind_arity mip = + mip.mind_arity_ctxt, inductive_sort_family mip + +let get_instantiated_arity (mib,mip) params = + let sign, s = mind_arity mip in + full_inductive_instantiate mib params sign, s + +let elim_sorts (_,mip) = mip.mind_kelim + +let rel_list n m = + let rec reln l p = + if p>m then l else reln (Rel(n+p)::l) (p+1) + in + reln [] 1 + +let build_dependent_inductive ind (_,mip) params = + let nrealargs = mip.mind_nrealargs in + applist + (Ind ind, (List.map (lift nrealargs) params)@(rel_list 0 nrealargs)) + +(* This exception is local *) +exception LocalArity of (sorts_family * sorts_family * arity_error) option + +let check_allowed_sort ksort specif = + if not (List.exists ((=) ksort) (elim_sorts specif)) then + let s = inductive_sort_family (snd specif) in + raise (LocalArity (Some(ksort,s,error_elim_expln ksort s))) + +let is_correct_arity env c (p,pj) ind specif params = + let arsign,_ = get_instantiated_arity specif params in + let rec srec env pt ar = + let pt' = whd_betadeltaiota env pt in + match pt', ar with + | Prod (na1,a1,t), (_,None,a1')::ar' -> + (try conv env a1 a1' + with NotConvertible -> raise (LocalArity None)); + srec (push_rel (na1,None,a1) env) t ar' + | Prod (_,a1,a2), [] -> (* whnf of t was not needed here! *) + let ksort = match (whd_betadeltaiota env a2) with + | Sort s -> family_of_sort s + | _ -> raise (LocalArity None) in + let dep_ind = build_dependent_inductive ind specif params in + (try conv env a1 dep_ind + with NotConvertible -> raise (LocalArity None)); + check_allowed_sort ksort specif; + true + | Sort s', [] -> + check_allowed_sort (family_of_sort s') specif; + false + | _ -> + raise (LocalArity None) + in + try srec env pj (List.rev arsign) + with LocalArity kinds -> + error_elim_arity env ind (elim_sorts specif) c (p,pj) kinds + + +(************************************************************************) +(* Type of case branches *) + +(* [p] is the predicate, [i] is the constructor number (starting from 0), + and [cty] is the type of the constructor (params not instantiated) *) +let build_branches_type ind (_,mip as specif) params dep p = + let build_one_branch i cty = + let typi = full_constructor_instantiate (ind,specif,params) cty in + let (args,ccl) = decompose_prod_assum typi in + let nargs = rel_context_length args in + let (_,allargs) = decompose_app ccl in + let (lparams,vargs) = list_chop (inductive_params specif) allargs in + let cargs = + if dep then + let cstr = ith_constructor_of_inductive ind (i+1) in + let dep_cstr = + applist (Construct cstr,lparams@extended_rel_list 0 args) in + vargs @ [dep_cstr] + else + vargs in + let base = beta_appvect (lift nargs p) (Array.of_list cargs) in + it_mkProd_or_LetIn base args in + Array.mapi build_one_branch mip.mind_nf_lc + +(* [p] is the predicate, [c] is the match object, [realargs] is the + list of real args of the inductive type *) +let build_case_type dep p c realargs = + let args = if dep then realargs@[c] else realargs in + beta_appvect p (Array.of_list args) + +let type_case_branches env (ind,largs) (p,pj) c = + let specif = lookup_mind_specif env ind in + let nparams = inductive_params specif in + let (params,realargs) = list_chop nparams largs in + let dep = is_correct_arity env c (p,pj) ind specif params in + let lc = build_branches_type ind specif params dep p in + let ty = build_case_type dep p c realargs in + (lc, ty) + + +(************************************************************************) +(* Checking the case annotation is relevent *) + +let check_case_info env indsp ci = + let (mib,mip) = lookup_mind_specif env indsp in + if + not (mind_equiv env indsp ci.ci_ind) or + (mib.mind_nparams <> ci.ci_npar) or + (mip.mind_consnrealdecls <> ci.ci_cstr_nargs) + then raise (TypeError(env,WrongCaseInfo(indsp,ci))) + +(************************************************************************) +(************************************************************************) + +(* Guard conditions for fix and cofix-points *) + +(* Check if t is a subterm of Rel n, and gives its specification, + assuming lst already gives index of + subterms with corresponding specifications of recursive arguments *) + +(* A powerful notion of subterm *) + +(* To each inductive definition corresponds an array describing the + structure of recursive arguments for each constructor, we call it + the recursive spec of the type (it has type recargs vect). For + checking the guard, we start from the decreasing argument (Rel n) + with its recursive spec. During checking the guardness condition, + we collect patterns variables corresponding to subterms of n, each + of them with its recursive spec. They are organised in a list lst + of type (int * recargs) list which is sorted with respect to the + first argument. +*) + +(*************************************************************) +(* Environment annotated with marks on recursive arguments *) + +(* tells whether it is a strict or loose subterm *) +type size = Large | Strict + +(* merging information *) +let size_glb s1 s2 = + match s1,s2 with + Strict, Strict -> Strict + | _ -> Large + +(* possible specifications for a term: + - Not_subterm: when the size of a term is not related to the + recursive argument of the fixpoint + - Subterm: when the term is a subterm of the recursive argument + the wf_paths argument specifies which subterms are recursive + - Dead_code: when the term has been built by elimination over an + empty type + *) + +type subterm_spec = + Subterm of (size * wf_paths) + | Dead_code + | Not_subterm + +let spec_of_tree t = + if Rtree.eq_rtree (=) t mk_norec then Not_subterm else Subterm(Strict,t) + +let subterm_spec_glb = + let glb2 s1 s2 = + match s1,s2 with + _, Dead_code -> s1 + | Dead_code, _ -> s2 + | Not_subterm, _ -> Not_subterm + | _, Not_subterm -> Not_subterm + | Subterm (a1,t1), Subterm (a2,t2) -> + if Rtree.eq_rtree (=) t1 t2 then Subterm (size_glb a1 a2, t1) + (* branches do not return objects with same spec *) + else Not_subterm in + Array.fold_left glb2 Dead_code + +type guard_env = + { env : env; + (* dB of last fixpoint *) + rel_min : int; + (* inductive of recarg of each fixpoint *) + inds : inductive array; + (* the recarg information of inductive family *) + recvec : wf_paths array; + (* dB of variables denoting subterms *) + genv : subterm_spec list; + } + +let make_renv env minds recarg (kn,tyi) = + let mib = lookup_mind kn env in + let mind_recvec = + Array.map (fun mip -> mip.mind_recargs) mib.mind_packets in + { env = env; + rel_min = recarg+2; + inds = minds; + recvec = mind_recvec; + genv = [Subterm(Large,mind_recvec.(tyi))] } + +let push_var renv (x,ty,spec) = + { renv with + env = push_rel (x,None,ty) renv.env; + rel_min = renv.rel_min+1; + genv = spec:: renv.genv } + +let assign_var_spec renv (i,spec) = + { renv with genv = list_assign renv.genv (i-1) spec } + +let push_var_renv renv (x,ty) = + push_var renv (x,ty,Not_subterm) + +(* Fetch recursive information about a variable p *) +let subterm_var p renv = + try List.nth renv.genv (p-1) + with Failure _ | Invalid_argument _ -> Not_subterm + +(* Add a variable and mark it as strictly smaller with information [spec]. *) +let add_subterm renv (x,a,spec) = + push_var renv (x,a,spec_of_tree spec) + +let push_ctxt_renv renv ctxt = + let n = rel_context_length ctxt in + { renv with + env = push_rel_context ctxt renv.env; + rel_min = renv.rel_min+n; + genv = iterate (fun ge -> Not_subterm::ge) n renv.genv } + +let push_fix_renv renv (_,v,_ as recdef) = + let n = Array.length v in + { renv with + env = push_rec_types recdef renv.env; + rel_min = renv.rel_min+n; + genv = iterate (fun ge -> Not_subterm::ge) n renv.genv } + + +(******************************) +(* Computing the recursive subterms of a term (propagation of size + information through Cases). *) + +(* + c is a branch of an inductive definition corresponding to the spec + lrec. mind_recvec is the recursive spec of the inductive + definition of the decreasing argument n. + + case_branches_specif renv lrec lc will pass the lambdas + of c corresponding to pattern variables and collect possibly new + subterms variables and returns the bodies of the branches with the + correct envs and decreasing args. +*) + +let lookup_subterms env ind = + let (_,mip) = lookup_mind_specif env ind in + mip.mind_recargs + +(*********************************) + +(* Propagation of size information through Cases: if the matched + object is a recursive subterm then compute the information + associated to its own subterms. + Rq: if branch is not eta-long, then the recursive information + is not propagated to the missing abstractions *) +let case_branches_specif renv c_spec ind lbr = + let rec push_branch_args renv lrec c = + match lrec with + ra::lr -> + let c' = whd_betadeltaiota renv.env c in + (match c' with + Lambda(x,a,b) -> + let renv' = push_var renv (x,a,ra) in + push_branch_args renv' lr b + | _ -> (* branch not in eta-long form: cannot perform rec. calls *) + (renv,c')) + | [] -> (renv, c) in + match c_spec with + Subterm (_,t) -> + let sub_spec = Array.map (List.map spec_of_tree) (dest_subterms t) in + assert (Array.length sub_spec = Array.length lbr); + array_map2 (push_branch_args renv) sub_spec lbr + | Dead_code -> + let t = dest_subterms (lookup_subterms renv.env ind) in + let sub_spec = Array.map (List.map (fun _ -> Dead_code)) t in + assert (Array.length sub_spec = Array.length lbr); + array_map2 (push_branch_args renv) sub_spec lbr + | Not_subterm -> Array.map (fun c -> (renv,c)) lbr + +(* [subterm_specif renv t] computes the recursive structure of [t] and + compare its size with the size of the initial recursive argument of + the fixpoint we are checking. [renv] collects such information + about variables. +*) + +let rec subterm_specif renv t = + (* maybe reduction is not always necessary! *) + let f,l = decompose_app (whd_betadeltaiota renv.env t) in + match f with + | Rel k -> subterm_var k renv + + | Case (ci,_,c,lbr) -> + if Array.length lbr = 0 then Dead_code + else + let c_spec = subterm_specif renv c in + let lbr_spec = case_branches_specif renv c_spec ci.ci_ind lbr in + let stl = + Array.map (fun (renv',br') -> subterm_specif renv' br') + lbr_spec in + subterm_spec_glb stl + + | Fix ((recindxs,i),(_,typarray,bodies as recdef)) -> +(* when proving that the fixpoint f(x)=e is less than n, it is enough + to prove that e is less than n assuming f is less than n + furthermore when f is applied to a term which is strictly less than + n, one may assume that x itself is strictly less than n +*) + let (ctxt,clfix) = dest_prod renv.env typarray.(i) in + let oind = + let env' = push_rel_context ctxt renv.env in + try Some(fst(find_inductive env' clfix)) + with Not_found -> None in + (match oind with + None -> Not_subterm (* happens if fix is polymorphic *) + | Some ind -> + let nbfix = Array.length typarray in + let recargs = lookup_subterms renv.env ind in + (* pushing the fixpoints *) + let renv' = push_fix_renv renv recdef in + let renv' = + (* Why Strict here ? To be general, it could also be + Large... *) + assign_var_spec renv' (nbfix-i, Subterm(Strict,recargs)) in + let decrArg = recindxs.(i) in + let theBody = bodies.(i) in + let nbOfAbst = decrArg+1 in + let sign,strippedBody = decompose_lam_n_assum nbOfAbst theBody in + (* pushing the fix parameters *) + let renv'' = push_ctxt_renv renv' sign in + let renv'' = + if List.length l < nbOfAbst then renv'' + else + let theDecrArg = List.nth l decrArg in + let arg_spec = subterm_specif renv theDecrArg in + assign_var_spec renv'' (1, arg_spec) in + subterm_specif renv'' strippedBody) + + | Lambda (x,a,b) -> + assert (l=[]); + subterm_specif (push_var_renv renv (x,a)) b + + (* Metas and evars are considered OK *) + | (Meta _|Evar _) -> Dead_code + + (* Other terms are not subterms *) + | _ -> Not_subterm + + +(* Check term c can be applied to one of the mutual fixpoints. *) +let check_is_subterm renv c = + match subterm_specif renv c with + Subterm (Strict,_) | Dead_code -> true + | _ -> false + +(************************************************************************) + +exception FixGuardError of env * guard_error + +let error_illegal_rec_call renv fx arg = + let (_,le_vars,lt_vars) = + List.fold_left + (fun (i,le,lt) sbt -> + match sbt with + (Subterm(Strict,_) | Dead_code) -> (i+1, le, i::lt) + | (Subterm(Large,_)) -> (i+1, i::le, lt) + | _ -> (i+1, le ,lt)) + (1,[],[]) renv.genv in + raise (FixGuardError (renv.env, + RecursionOnIllegalTerm(fx,arg,le_vars,lt_vars))) + +let error_partial_apply renv fx = + raise (FixGuardError (renv.env,NotEnoughArgumentsForFixCall fx)) + +(* Check if [def] is a guarded fixpoint body with decreasing arg. + given [recpos], the decreasing arguments of each mutually defined + fixpoint. *) +let check_one_fix renv recpos def = + let nfi = Array.length recpos in + + (* Checks if [t] only make valid recursive calls *) + let rec check_rec_call renv t = + (* if [t] does not make recursive calls, it is guarded: *) + if noccur_with_meta renv.rel_min nfi t then () + else + let (f,l) = decompose_app (whd_betaiotazeta renv.env t) in + match f with + | Rel p -> + (* Test if [p] is a fixpoint (recursive call) *) + if renv.rel_min <= p & p < renv.rel_min+nfi then + begin + List.iter (check_rec_call renv) l; + (* the position of the invoked fixpoint: *) + let glob = renv.rel_min+nfi-1-p in + (* the decreasing arg of the rec call: *) + let np = recpos.(glob) in + if List.length l <= np then error_partial_apply renv glob + else + (* Check the decreasing arg is smaller *) + let z = List.nth l np in + if not (check_is_subterm renv z) then + error_illegal_rec_call renv glob z + end + else + begin + match pi2 (lookup_rel p renv.env) with + | None -> + List.iter (check_rec_call renv) l + | Some c -> + try List.iter (check_rec_call renv) l + with FixGuardError _ -> check_rec_call renv (applist(c,l)) + end + + | Case (ci,p,c_0,lrest) -> + List.iter (check_rec_call renv) (c_0::p::l); + (* compute the recarg information for the arguments of + each branch *) + let c_spec = subterm_specif renv c_0 in + let lbr = case_branches_specif renv c_spec ci.ci_ind lrest in + Array.iter (fun (renv',br') -> check_rec_call renv' br') lbr + + (* Enables to traverse Fixpoint definitions in a more intelligent + way, ie, the rule : + if - g = Fix g/p := [y1:T1]...[yp:Tp]e & + - f is guarded with respect to the set of pattern variables S + in a1 ... am & + - f is guarded with respect to the set of pattern variables S + in T1 ... Tp & + - ap is a sub-term of the formal argument of f & + - f is guarded with respect to the set of pattern variables + S+{yp} in e + then f is guarded with respect to S in (g a1 ... am). + Eduardo 7/9/98 *) + + | Fix ((recindxs,i),(_,typarray,bodies as recdef)) -> + List.iter (check_rec_call renv) l; + Array.iter (check_rec_call renv) typarray; + let decrArg = recindxs.(i) in + let renv' = push_fix_renv renv recdef in + if (List.length l < (decrArg+1)) then + Array.iter (check_rec_call renv') bodies + else + Array.iteri + (fun j body -> + if i=j then + let theDecrArg = List.nth l decrArg in + let arg_spec = subterm_specif renv theDecrArg in + check_nested_fix_body renv' (decrArg+1) arg_spec body + else check_rec_call renv' body) + bodies + + | Const kn -> + if evaluable_constant kn renv.env then + try List.iter (check_rec_call renv) l + with (FixGuardError _ ) -> + check_rec_call renv(applist(constant_value renv.env kn, l)) + else List.iter (check_rec_call renv) l + + (* The cases below simply check recursively the condition on the + subterms *) + | Cast (a,_, b) -> + List.iter (check_rec_call renv) (a::b::l) + + | Lambda (x,a,b) -> + List.iter (check_rec_call renv) (a::l); + check_rec_call (push_var_renv renv (x,a)) b + + | Prod (x,a,b) -> + List.iter (check_rec_call renv) (a::l); + check_rec_call (push_var_renv renv (x,a)) b + + | CoFix (i,(_,typarray,bodies as recdef)) -> + List.iter (check_rec_call renv) l; + Array.iter (check_rec_call renv) typarray; + let renv' = push_fix_renv renv recdef in + Array.iter (check_rec_call renv') bodies + + | (Ind _ | Construct _ | Sort _) -> + List.iter (check_rec_call renv) l + + | Var id -> + begin + match pi2 (lookup_named id renv.env) with + | None -> + List.iter (check_rec_call renv) l + | Some c -> + try List.iter (check_rec_call renv) l + with (FixGuardError _) -> check_rec_call renv (applist(c,l)) + end + + (* l is not checked because it is considered as the meta's context *) + | (Evar _ | Meta _) -> () + + | (App _|LetIn _) -> assert false (* beta zeta reduction *) + + and check_nested_fix_body renv decr recArgsDecrArg body = + if decr = 0 then + check_rec_call (assign_var_spec renv (1,recArgsDecrArg)) body + else + match body with + | Lambda (x,a,b) -> + check_rec_call renv a; + let renv' = push_var_renv renv (x,a) in + check_nested_fix_body renv' (decr-1) recArgsDecrArg b + | _ -> anomaly "Not enough abstractions in fix body" + + in + check_rec_call renv def + + +let inductive_of_mutfix env ((nvect,bodynum),(names,types,bodies as recdef)) = + let nbfix = Array.length bodies in + if nbfix = 0 + or Array.length nvect <> nbfix + or Array.length types <> nbfix + or Array.length names <> nbfix + or bodynum < 0 + or bodynum >= nbfix + then anomaly "Ill-formed fix term"; + let fixenv = push_rec_types recdef env in + let raise_err env i err = + error_ill_formed_rec_body env err names i in + (* Check the i-th definition with recarg k *) + let find_ind i k def = + (* check fi does not appear in the k+1 first abstractions, + gives the type of the k+1-eme abstraction (must be an inductive) *) + let rec check_occur env n def = + match (whd_betadeltaiota env def) with + | Lambda (x,a,b) -> + if noccur_with_meta n nbfix a then + let env' = push_rel (x, None, a) env in + if n = k+1 then + (* get the inductive type of the fixpoint *) + let (mind, _) = + try find_inductive env a + with Not_found -> + raise_err env i (RecursionNotOnInductiveType a) in + (mind, (env', b)) + else check_occur env' (n+1) b + else anomaly "check_one_fix: Bad occurrence of recursive call" + | _ -> raise_err env i NotEnoughAbstractionInFixBody in + check_occur fixenv 1 def in + (* Do it on every fixpoint *) + let rv = array_map2_i find_ind nvect bodies in + (Array.map fst rv, Array.map snd rv) + + +let check_fix env ((nvect,_),(names,_,bodies as _recdef) as fix) = + let (minds, rdef) = inductive_of_mutfix env fix in + for i = 0 to Array.length bodies - 1 do + let (fenv,body) = rdef.(i) in + let renv = make_renv fenv minds nvect.(i) minds.(i) in + try check_one_fix renv nvect body + with FixGuardError (fixenv,err) -> + error_ill_formed_rec_body fixenv err names i + done + +(* +let cfkey = Profile.declare_profile "check_fix";; +let check_fix env fix = Profile.profile3 cfkey check_fix env fix;; +*) + +(************************************************************************) +(* Co-fixpoints. *) + +exception CoFixGuardError of env * guard_error + +let anomaly_ill_typed () = + anomaly "check_one_cofix: too many arguments applied to constructor" + +let rec codomain_is_coind env c = + let b = whd_betadeltaiota env c in + match b with + | Prod (x,a,b) -> + codomain_is_coind (push_rel (x, None, a) env) b + | _ -> + (try find_coinductive env b + with Not_found -> + raise (CoFixGuardError (env, CodomainNotInductiveType b))) + +let check_one_cofix env nbfix def deftype = + let rec check_rec_call env alreadygrd n vlra t = + if not (noccur_with_meta n nbfix t) then + let c,args = decompose_app (whd_betadeltaiota env t) in + match c with + | Rel p when n <= p && p < n+nbfix -> + (* recursive call: must be guarded and no nested recursive + call allowed *) + if not alreadygrd then + raise (CoFixGuardError (env,UnguardedRecursiveCall t)) + else if not(List.for_all (noccur_with_meta n nbfix) args) then + raise (CoFixGuardError (env,NestedRecursiveOccurrences)) + + | Construct (_,i as cstr_kn) -> + let lra = vlra.(i-1) in + let mI = inductive_of_constructor cstr_kn in + let (mib,mip) = lookup_mind_specif env mI in + let realargs = list_skipn mib.mind_nparams args in + let rec process_args_of_constr = function + | (t::lr), (rar::lrar) -> + if rar = mk_norec then + if noccur_with_meta n nbfix t + then process_args_of_constr (lr, lrar) + else raise (CoFixGuardError + (env,RecCallInNonRecArgOfConstructor t)) + else + let spec = dest_subterms rar in + check_rec_call env true n spec t; + process_args_of_constr (lr, lrar) + | [],_ -> () + | _ -> anomaly_ill_typed () + in process_args_of_constr (realargs, lra) + + | Lambda (x,a,b) -> + assert (args = []); + if noccur_with_meta n nbfix a then + let env' = push_rel (x, None, a) env in + check_rec_call env' alreadygrd (n+1) vlra b + else + raise (CoFixGuardError (env,RecCallInTypeOfAbstraction a)) + + | CoFix (j,(_,varit,vdefs as recdef)) -> + if (List.for_all (noccur_with_meta n nbfix) args) + then + let nbfix = Array.length vdefs in + if (array_for_all (noccur_with_meta n nbfix) varit) then + let env' = push_rec_types recdef env in + (Array.iter (check_rec_call env' alreadygrd (n+1) vlra) vdefs; + List.iter (check_rec_call env alreadygrd n vlra) args) + else + raise (CoFixGuardError (env,RecCallInTypeOfDef c)) + else + raise (CoFixGuardError (env,UnguardedRecursiveCall c)) + + | Case (_,p,tm,vrest) -> + if (noccur_with_meta n nbfix p) then + if (noccur_with_meta n nbfix tm) then + if (List.for_all (noccur_with_meta n nbfix) args) then + Array.iter (check_rec_call env alreadygrd n vlra) vrest + else + raise (CoFixGuardError (env,RecCallInCaseFun c)) + else + raise (CoFixGuardError (env,RecCallInCaseArg c)) + else + raise (CoFixGuardError (env,RecCallInCasePred c)) + + | Meta _ -> () + | Evar _ -> + List.iter (check_rec_call env alreadygrd n vlra) args + + | _ -> raise (CoFixGuardError (env,NotGuardedForm t)) in + + let (mind, _) = codomain_is_coind env deftype in + let vlra = lookup_subterms env mind in + check_rec_call env false 1 (dest_subterms vlra) def + +(* The function which checks that the whole block of definitions + satisfies the guarded condition *) + +let check_cofix env (bodynum,(names,types,bodies as recdef)) = + let nbfix = Array.length bodies in + for i = 0 to nbfix-1 do + let fixenv = push_rec_types recdef env in + try check_one_cofix fixenv nbfix bodies.(i) types.(i) + with CoFixGuardError (errenv,err) -> + error_ill_formed_rec_body errenv err names i + done diff --git a/checker/inductive.mli b/checker/inductive.mli new file mode 100644 index 00000000..8e6d4ffb --- /dev/null +++ b/checker/inductive.mli @@ -0,0 +1,85 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* constr -> inductive * constr list + +type mind_specif = mutual_inductive_body * one_inductive_body + +(*s Fetching information in the environment about an inductive type. + Raises [Not_found] if the inductive type is not found. *) +val lookup_mind_specif : env -> inductive -> mind_specif + +val type_of_inductive : env -> mind_specif -> constr + +(* Return type as quoted by the user *) +val type_of_constructor : constructor -> mind_specif -> constr + +val arities_of_specif : mutual_inductive -> mind_specif -> constr array + +(* [type_case_branches env (I,args) (p:A) c] computes useful types + about the following Cases expression: +

Cases (c :: (I args)) of b1..bn end + It computes the type of every branch (pattern variables are + introduced by products) and the type for the whole expression. + *) +val type_case_branches : + env -> inductive * constr list -> constr * constr -> constr + -> constr array * constr + +(* Check a [case_info] actually correspond to a Case expression on the + given inductive type. *) +val check_case_info : env -> inductive -> case_info -> unit + +(*s Guard conditions for fix and cofix-points. *) +val check_fix : env -> fixpoint -> unit +val check_cofix : env -> cofixpoint -> unit + +(*s Support for sort-polymorphic inductive types *) + +val type_of_inductive_knowing_parameters : + env -> one_inductive_body -> constr array -> constr + +val max_inductive_sort : sorts array -> Univ.universe + +val instantiate_universes : env -> rel_context -> + polymorphic_arity -> constr array -> rel_context * sorts + +(***************************************************************) +(* Debug *) + +type size = Large | Strict +type subterm_spec = + Subterm of (size * wf_paths) + | Dead_code + | Not_subterm +type guard_env = + { env : env; + (* dB of last fixpoint *) + rel_min : int; + (* inductive of recarg of each fixpoint *) + inds : inductive array; + (* the recarg information of inductive family *) + recvec : wf_paths array; + (* dB of variables denoting subterms *) + genv : subterm_spec list; + } + +val subterm_specif : guard_env -> constr -> subterm_spec +val case_branches_specif : guard_env -> subterm_spec -> inductive -> + constr array -> (guard_env * constr) array diff --git a/checker/main.ml b/checker/main.ml new file mode 100644 index 00000000..83b4ddd2 --- /dev/null +++ b/checker/main.ml @@ -0,0 +1,2 @@ + +let _ = Checker.start () diff --git a/checker/mod_checking.ml b/checker/mod_checking.ml new file mode 100644 index 00000000..ecf8d633 --- /dev/null +++ b/checker/mod_checking.ml @@ -0,0 +1,398 @@ + +open Pp +open Util +open Names +open Term +open Inductive +open Reduction +open Typeops +open Indtypes +open Modops +open Subtyping +open Declarations +open Environ + +(************************************************************************) +(* Checking constants *) + +let refresh_arity ar = + let ctxt, hd = decompose_prod_assum ar in + match hd with + Sort (Type u) when not (Univ.is_univ_variable u) -> + let u' = Univ.fresh_local_univ() in + mkArity (ctxt,Type u'), + Univ.enforce_geq u' u Univ.Constraint.empty + | _ -> ar, Univ.Constraint.empty + +let check_constant_declaration env kn cb = + Flags.if_verbose msgnl (str " checking cst: " ++ prcon kn); + let env = add_constraints cb.const_constraints env in + let env' = check_named_ctxt env cb.const_hyps in + (match cb.const_type with + NonPolymorphicType ty -> + let ty, cu = refresh_arity ty in + let envty = add_constraints cu env' in + let _ = infer_type envty ty in + (match cb.const_body with + | Some bd -> + let j = infer env' (force_constr bd) in + conv_leq envty j ty + | None -> ()) + | PolymorphicArity(ctxt,par) -> + let _ = check_ctxt env ctxt in + check_polymorphic_arity env ctxt par); + add_constant kn cb env + +(************************************************************************) +(* Checking modules *) + + +let rec add_struct_expr_constraints env = function + | SEBident _ -> env + + | SEBfunctor (_,mtb,meb) -> + add_struct_expr_constraints + (add_modtype_constraints env mtb) meb + + | SEBstruct (_,structure_body) -> + List.fold_left + (fun env (l,item) -> add_struct_elem_constraints env item) + env + structure_body + + | SEBapply (meb1,meb2,cst) -> +(* let g = Univ.merge_constraints cst Univ.initial_universes in +msgnl(str"ADDING FUNCTOR APPLICATION CONSTRAINTS:"++fnl()++ + Univ.pr_universes g++str"============="++fnl()); +*) + Environ.add_constraints cst + (add_struct_expr_constraints + (add_struct_expr_constraints env meb1) + meb2) + | SEBwith(meb,With_definition_body(_,cb))-> + Environ.add_constraints cb.const_constraints + (add_struct_expr_constraints env meb) + | SEBwith(meb,With_module_body(_,_,cst))-> + Environ.add_constraints cst + (add_struct_expr_constraints env meb) + +and add_struct_elem_constraints env = function + | SFBconst cb -> Environ.add_constraints cb.const_constraints env + | SFBmind mib -> Environ.add_constraints mib.mind_constraints env + | SFBmodule mb -> add_module_constraints env mb + | SFBalias (mp,Some cst) -> Environ.add_constraints cst env + | SFBalias (mp,None) -> env + | SFBmodtype mtb -> add_modtype_constraints env mtb + +and add_module_constraints env mb = + let env = match mb.mod_expr with + | None -> env + | Some meb -> add_struct_expr_constraints env meb + in + let env = match mb.mod_type with + | None -> env + | Some mtb -> + add_struct_expr_constraints env mtb + in + Environ.add_constraints mb.mod_constraints env + +and add_modtype_constraints env mtb = + add_struct_expr_constraints env mtb.typ_expr + +exception Not_path + +let path_of_mexpr = function + | SEBident mp -> mp + | _ -> raise Not_path + +let rec list_split_assoc k rev_before = function + | [] -> raise Not_found + | (k',b)::after when k=k' -> rev_before,b,after + | h::tail -> list_split_assoc k (h::rev_before) tail + +let rec list_fold_map2 f e = function + | [] -> (e,[],[]) + | h::t -> + let e',h1',h2' = f e h in + let e'',t1',t2' = list_fold_map2 f e' t in + e'',h1'::t1',h2'::t2' + + +let check_alias (s1:substitution) s2 = + if s1 <> s2 then failwith "Incorrect alias" + +let check_definition_sub env cb1 cb2 = + let check_type env t1 t2 = + + (* If the type of a constant is generated, it may mention + non-variable algebraic universes that the general conversion + algorithm is not ready to handle. Anyway, generated types of + constants are functions of the body of the constant. If the + bodies are the same in environments that are subtypes one of + the other, the types are subtypes too (i.e. if Gamma <= Gamma', + Gamma |- A |> T, Gamma |- A' |> T' and Gamma |- A=A' then T <= T'). + Hence they don't have to be checked again *) + + let t1,t2 = + if isArity t2 then + let (ctx2,s2) = destArity t2 in + match s2 with + | Type v when not (Univ.is_univ_variable v) -> + (* The type in the interface is inferred and is made of algebraic + universes *) + begin try + let (ctx1,s1) = dest_arity env t1 in + match s1 with + | Type u when not (Univ.is_univ_variable u) -> + (* Both types are inferred, no need to recheck them. We + cheat and collapse the types to Prop *) + mkArity (ctx1,Prop Null), mkArity (ctx2,Prop Null) + | Prop _ -> + (* The type in the interface is inferred, it may be the case + that the type in the implementation is smaller because + the body is more reduced. We safely collapse the upper + type to Prop *) + mkArity (ctx1,Prop Null), mkArity (ctx2,Prop Null) + | Type _ -> + (* The type in the interface is inferred and the type in the + implementation is not inferred or is inferred but from a + more reduced body so that it is just a variable. Since + constraints of the form "univ <= max(...)" are not + expressible in the system of algebraic universes: we fail + (the user has to use an explicit type in the interface *) + raise Reduction.NotConvertible + with UserError _ (* "not an arity" *) -> + raise Reduction.NotConvertible end + | _ -> t1,t2 + else + (t1,t2) in + Reduction.conv_leq env t1 t2 + in + assert (cb1.const_hyps=[] && cb2.const_hyps=[]) ; + (*Start by checking types*) + let typ1 = Typeops.type_of_constant_type env cb1.const_type in + let typ2 = Typeops.type_of_constant_type env cb2.const_type in + check_type env typ1 typ2; + (match cb2 with + | {const_body=Some lc2;const_opaque=false} -> + let c2 = force_constr lc2 in + let c1 = match cb1.const_body with + | Some lc1 -> force_constr lc1 + | None -> assert false in + Reduction.conv env c1 c2 + | _ -> ()) + +let rec check_with env mtb with_decl = + match with_decl with + | With_definition_body _ -> + check_with_aux_def env mtb with_decl; + empty_subst + | With_module_body _ -> + check_with_aux_mod env mtb with_decl + +and check_with_aux_def env mtb with_decl = + let msid,sig_b = match (eval_struct env mtb) with + | SEBstruct(msid,sig_b) -> + msid,sig_b + | _ -> error_signature_expected mtb + in + let id,idl = match with_decl with + | With_definition_body (id::idl,_) | With_module_body (id::idl,_,_) -> + id,idl + | With_definition_body ([],_) | With_module_body ([],_,_) -> assert false + in + let l = label_of_id id in + try + let rev_before,spec,after = list_split_assoc l [] sig_b in + let before = List.rev rev_before in + let env' = Modops.add_signature (MPself msid) before env in + match with_decl with + | With_definition_body ([],_) -> assert false + | With_definition_body ([id],c) -> + let cb = match spec with + SFBconst cb -> cb + | _ -> error_not_a_constant l + in + check_definition_sub env' c cb + | With_definition_body (_::_,_) -> + let old = match spec with + SFBmodule msb -> msb + | _ -> error_not_a_module l + in + begin + match old.mod_expr with + | None -> + let new_with_decl = match with_decl with + With_definition_body (_,c) -> + With_definition_body (idl,c) + | With_module_body (_,c,cst) -> + With_module_body (idl,c,cst) in + check_with_aux_def env' (type_of_mb env old) new_with_decl + | Some msb -> + error_a_generative_module_expected l + end + | _ -> anomaly "Modtyping:incorrect use of with" + with + Not_found -> error_no_such_label l + | Reduction.NotConvertible -> error_with_incorrect l + +and check_with_aux_mod env mtb with_decl = + let initmsid,msid,sig_b = + match eval_struct env mtb with + | SEBstruct(msid,sig_b) -> + let msid'=(refresh_msid msid) in + msid,msid',(subst_signature_msid msid (MPself(msid')) sig_b) + | _ -> error_signature_expected mtb in + let id,idl = match with_decl with + | With_definition_body (id::idl,_) | With_module_body (id::idl,_,_) -> + id,idl + | With_definition_body ([],_) | With_module_body ([],_,_) -> assert false + in + let l = label_of_id id in + try + let rev_before,spec,after = list_split_assoc l [] sig_b in + let before = List.rev rev_before in + let rec mp_rec = function + | [] -> MPself initmsid + | i::r -> MPdot(mp_rec r,label_of_id i) + in + let env' = Modops.add_signature (MPself msid) before env in + match with_decl with + | With_module_body ([],_,_) -> assert false + | With_module_body ([id], mp,_) -> + let old,alias = match spec with + SFBmodule msb -> Some msb,None + | SFBalias (mp',_) -> None,Some mp' + | _ -> error_not_a_module l + in + let mtb' = lookup_modtype mp env' in + let _ = + match old,alias with + Some msb,None -> () + | None,Some mp' -> + check_modpath_equiv env' mp mp' + | _,_ -> + anomaly "Mod_typing:no implementation and no alias" + in + join (map_mp (mp_rec [id]) mp) mtb'.typ_alias + | With_module_body (_::_,mp,_) -> + let old = match spec with + SFBmodule msb -> msb + | _ -> error_not_a_module l + in + begin + match old.mod_expr with + None -> + let new_with_decl = match with_decl with + With_definition_body (_,c) -> + With_definition_body (idl,c) + | With_module_body (_,c,cst) -> + With_module_body (idl,c,cst) in + let sub = + check_with_aux_mod env' + (type_of_mb env old) new_with_decl in + join (map_mp (mp_rec idl) mp) sub + | Some msb -> + error_a_generative_module_expected l + end + | _ -> anomaly "Modtyping:incorrect use of with" + with + Not_found -> error_no_such_label l + | Reduction.NotConvertible -> error_with_incorrect l + +and check_module_type env mty = + if mty.typ_strength <> None then + failwith "strengthening of module types not supported"; + let sub = check_modexpr env mty.typ_expr in + check_alias mty.typ_alias sub + +and check_module env mb = + let env' = add_module_constraints env mb in + let sub = + match mb.mod_expr, mb.mod_type with + | None, None -> + anomaly "Mod_typing.translate_module: empty type and expr in module entry" + | None, Some mtb -> check_modexpr env' mtb + + | Some mexpr, _ -> + let sub1 = check_modexpr env' mexpr in + (match mb.mod_type with + | None -> sub1 + | Some mte -> + let sub2 = check_modexpr env' mte in + check_subtypes env + {typ_expr = mexpr; + typ_strength = None; + typ_alias = sub1;} + {typ_expr = mte; + typ_strength = None; + typ_alias = sub2;}; + sub2) in + check_alias mb.mod_alias sub + +and check_structure_field (s,env) mp lab = function + | SFBconst cb -> + let c = make_con mp empty_dirpath lab in + (s,check_constant_declaration env c cb) + | SFBmind mib -> + let kn = make_kn mp empty_dirpath lab in + (s,Indtypes.check_inductive env kn mib) + | SFBmodule msb -> + check_module env msb; + let mp1 = MPdot(mp,lab) in + let is_fun, sub = Modops.update_subst env msb mp1 in + ((if is_fun then s else join s sub), + Modops.add_module (MPdot(mp,lab)) msb + (add_module_constraints env msb)) + | SFBalias(mp2,cst) -> + (try + let mp2' = scrape_alias mp2 env in + let msb = lookup_module mp2' env in + (join s (add_mp (MPdot(mp,lab)) mp2' msb.mod_alias), + Option.fold_right add_constraints cst + (register_alias (MPdot(mp,lab)) mp2 env)) + with Not_found -> failwith "unkown aliased module") + | SFBmodtype mty -> + let kn = MPdot(mp, lab) in + check_module_type env mty; + (join s mty.typ_alias, + add_modtype kn mty (add_modtype_constraints env mty)) + +and check_modexpr env mse = match mse with + | SEBident mp -> + let mtb = lookup_modtype mp env in + mtb.typ_alias + | SEBfunctor (arg_id, mtb, body) -> + check_module_type env mtb; + let env' = add_module (MPbound arg_id) (module_body_of_type mtb) env in + let sub = check_modexpr env' body in + sub + | SEBapply (f,m,cst) -> + let sub1 = check_modexpr env f in + let f'= eval_struct env f in + let farg_id, farg_b, fbody_b = destr_functor env f' in + let mp = + try scrape_alias (path_of_mexpr m) env + with Not_path -> error_application_to_not_path m + (* place for nondep_supertype *) in + let mtb = lookup_modtype mp env in + check_subtypes env mtb farg_b; + let sub2 = match eval_struct env m with + | SEBstruct (msid,sign) -> + join_alias + (subst_key (map_msid msid mp) mtb.typ_alias) + (map_msid msid mp) + | _ -> mtb.typ_alias in + let sub3 = join_alias sub1 (map_mbid farg_id mp) in + let sub4 = update_subst sub2 sub3 in + join sub3 sub4 + | SEBwith(mte, with_decl) -> + let sub1 = check_modexpr env mte in + let sub2 = check_with env mte with_decl in + join sub1 sub2 + | SEBstruct(msid,msb) -> + let mp = MPself msid in + let (sub,_) = + List.fold_left (fun env (lab,mb) -> + check_structure_field env mp lab mb) (empty_subst,env) msb in + sub diff --git a/checker/modops.ml b/checker/modops.ml new file mode 100644 index 00000000..f79e52c2 --- /dev/null +++ b/checker/modops.ml @@ -0,0 +1,347 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* expr + | None -> (match mb.mod_expr with + | Some expr -> expr + | None -> + anomaly "Modops: empty expr and type")); + typ_alias = mb.mod_alias; + typ_strength = mp + } + + + +let rec list_split_assoc k rev_before = function + | [] -> raise Not_found + | (k',b)::after when k=k' -> rev_before,b,after + | h::tail -> list_split_assoc k (h::rev_before) tail + +let path_of_seb = function + | SEBident mp -> mp + | _ -> anomaly "Modops: evaluation failed." + + +let destr_functor env mtb = + match mtb with + | SEBfunctor (arg_id,arg_t,body_t) -> + (arg_id,arg_t,body_t) + | _ -> error_not_a_functor mtb + + +let rec check_modpath_equiv env mp1 mp2 = + if mp1=mp2 then () else + let mp1 = scrape_alias mp1 env in + let mp2 = scrape_alias mp2 env in + if mp1=mp2 then () + else + error_not_equal mp1 mp2 + + + +let strengthen_const env mp l cb = + match cb.const_opaque, cb.const_body with + | false, Some _ -> cb + | true, Some _ + | _, None -> + let const = Const (make_con mp empty_dirpath l) in + let const_subs = Some (Declarations.from_val const) in + {cb with + const_body = const_subs; + const_opaque = false + } + +let strengthen_mind env mp l mib = match mib.mind_equiv with + | Some _ -> mib + | None -> {mib with mind_equiv = Some (make_kn mp empty_dirpath l)} + + +let rec eval_struct env = function + | SEBident mp -> + begin + let mtb =lookup_modtype mp env in + match mtb.typ_expr,mtb.typ_strength with + mtb,None -> eval_struct env mtb + | mtb,Some mp -> strengthen_mtb env mp (eval_struct env mtb) + end + | SEBapply (seb1,seb2,_) -> + let svb1 = eval_struct env seb1 in + let farg_id, farg_b, fbody_b = destr_functor env svb1 in + let mp = path_of_seb seb2 in + let mp = scrape_alias mp env in + let sub_alias = (lookup_modtype mp env).typ_alias in + let sub_alias = match eval_struct env (SEBident mp) with + | SEBstruct (msid,sign) -> subst_key (map_msid msid mp) sub_alias + | _ -> sub_alias in + let sub_alias = update_subst_alias sub_alias + (map_mbid farg_id mp) in + eval_struct env (subst_struct_expr + (join sub_alias (map_mbid farg_id mp)) fbody_b) + | SEBwith (mtb,(With_definition_body _ as wdb)) -> + merge_with env mtb wdb empty_subst + | SEBwith (mtb, (With_module_body (_,mp,_) as wdb)) -> + let alias_in_mp = + (lookup_modtype mp env).typ_alias in + merge_with env mtb wdb alias_in_mp +(* | SEBfunctor(mbid,mtb,body) -> + let env = add_module (MPbound mbid) (module_body_of_type mtb) env in + SEBfunctor(mbid,mtb,eval_struct env body) *) + | mtb -> mtb + +and type_of_mb env mb = + match mb.mod_type,mb.mod_expr with + None,Some b -> eval_struct env b + | Some t, _ -> eval_struct env t + | _,_ -> anomaly + "Modops: empty type and empty expr" + +and merge_with env mtb with_decl alias= + let msid,sig_b = match (eval_struct env mtb) with + | SEBstruct(msid,sig_b) -> msid,sig_b + | _ -> error_signature_expected mtb + in + let id,idl = match with_decl with + | With_definition_body (id::idl,_) | With_module_body (id::idl,_,_) -> id,idl + | With_definition_body ([],_) | With_module_body ([],_,_) -> assert false + in + let l = label_of_id id in + try + let rev_before,spec,after = list_split_assoc l [] sig_b in + let before = List.rev rev_before in + let rec mp_rec = function + | [] -> MPself msid + | i::r -> MPdot(mp_rec r,label_of_id i) + in + let new_spec,subst = match with_decl with + | With_definition_body ([],_) + | With_module_body ([],_,_) -> assert false + | With_definition_body ([id],c) -> + SFBconst c,None + | With_module_body ([id], mp,cst) -> + let mp' = scrape_alias mp env in + SFBalias (mp,Some cst), + Some(join (map_mp (mp_rec [id]) mp') alias) + | With_definition_body (_::_,_) + | With_module_body (_::_,_,_) -> + let old = match spec with + SFBmodule msb -> msb + | _ -> error_not_a_module l + in + let new_with_decl,subst1 = + match with_decl with + With_definition_body (_,c) -> With_definition_body (idl,c),None + | With_module_body (idc,mp,cst) -> + With_module_body (idl,mp,cst), + Some(map_mp (mp_rec idc) mp) + in + let subst = Option.fold_right join subst1 alias in + let modtype = + merge_with env (type_of_mb env old) new_with_decl alias in + let msb = + { mod_expr = None; + mod_type = Some modtype; + mod_constraints = old.mod_constraints; + mod_alias = subst; + mod_retroknowledge = old.mod_retroknowledge} + in + (SFBmodule msb),Some subst + in + SEBstruct(msid, before@(l,new_spec):: + (Option.fold_right subst_structure subst after)) + with + Not_found -> error_no_such_label l + +and add_signature mp sign env = + let add_one env (l,elem) = + let kn = make_kn mp empty_dirpath l in + let con = make_con mp empty_dirpath l in + match elem with + | SFBconst cb -> Environ.add_constant con cb env + | SFBmind mib -> Environ.add_mind kn mib env + | SFBmodule mb -> + add_module (MPdot (mp,l)) mb env + (* adds components as well *) + | SFBalias (mp1,cst) -> + Environ.register_alias (MPdot(mp,l)) mp1 env + | SFBmodtype mtb -> Environ.add_modtype (MPdot(mp,l)) + mtb env + in + List.fold_left add_one env sign + +and add_module mp mb env = + let env = Environ.shallow_add_module mp mb env in + let env = + Environ.add_modtype mp (module_type_of_module (Some mp) mb) env + in + let mod_typ = type_of_mb env mb in + match mod_typ with + | SEBstruct (msid,sign) -> + add_signature mp (subst_signature_msid msid mp sign) env + | SEBfunctor _ -> env + | _ -> anomaly "Modops:the evaluation of the structure failed " + + + +and constants_of_specification env mp sign = + let aux (env,res) (l,elem) = + match elem with + | SFBconst cb -> env,((make_con mp empty_dirpath l),cb)::res + | SFBmind _ -> env,res + | SFBmodule mb -> + let new_env = add_module (MPdot (mp,l)) mb env in + new_env,(constants_of_modtype env (MPdot (mp,l)) + (type_of_mb env mb)) @ res + | SFBalias (mp1,cst) -> + let new_env = register_alias (MPdot (mp,l)) mp1 env in + new_env,(constants_of_modtype env (MPdot (mp,l)) + (eval_struct env (SEBident mp1))) @ res + | SFBmodtype mtb -> + (* module type dans un module type. + Il faut au moins mettre mtb dans l'environnement (avec le bon + kn pour pouvoir continuer aller deplier les modules utilisant ce + mtb + ex: + Module Type T1. + Module Type T2. + .... + End T2. + ..... + Declare Module M : T2. + End T2 + si on ne rajoute pas T2 dans l'environement de typage + on va exploser au moment du Declare Module + *) + let new_env = Environ.add_modtype (MPdot(mp,l)) mtb env in + new_env, (constants_of_modtype env (MPdot(mp,l)) mtb.typ_expr) @ res + in + snd (List.fold_left aux (env,[]) sign) + +and constants_of_modtype env mp modtype = + match (eval_struct env modtype) with + SEBstruct (msid,sign) -> + constants_of_specification env mp + (subst_signature_msid msid mp sign) + | SEBfunctor _ -> [] + | _ -> anomaly "Modops:the evaluation of the structure failed " + +and strengthen_mtb env mp mtb = + let mtb1 = eval_struct env mtb in + match mtb1 with + | SEBfunctor _ -> mtb1 + | SEBstruct (msid,sign) -> + SEBstruct (msid,strengthen_sig env msid sign mp) + | _ -> anomaly "Modops:the evaluation of the structure failed " + +and strengthen_mod env mp mb = + let mod_typ = type_of_mb env mb in + { mod_expr = mb.mod_expr; + mod_type = Some (strengthen_mtb env mp mod_typ); + mod_constraints = mb.mod_constraints; + mod_alias = mb.mod_alias; + mod_retroknowledge = mb.mod_retroknowledge} + +and strengthen_sig env msid sign mp = match sign with + | [] -> [] + | (l,SFBconst cb) :: rest -> + let item' = l,SFBconst (strengthen_const env mp l cb) in + let rest' = strengthen_sig env msid rest mp in + item'::rest' + | (l,SFBmind mib) :: rest -> + let item' = l,SFBmind (strengthen_mind env mp l mib) in + let rest' = strengthen_sig env msid rest mp in + item'::rest' + | (l,SFBmodule mb) :: rest -> + let mp' = MPdot (mp,l) in + let item' = l,SFBmodule (strengthen_mod env mp' mb) in + let env' = add_module + (MPdot (MPself msid,l)) mb env in + let rest' = strengthen_sig env' msid rest mp in + item':: rest' + | ((l,SFBalias (mp1,cst)) as item) :: rest -> + let env' = register_alias (MPdot(MPself msid,l)) mp1 env in + let rest' = strengthen_sig env' msid rest mp in + item::rest' + | (l,SFBmodtype mty as item) :: rest -> + let env' = add_modtype + (MPdot((MPself msid),l)) + mty + env + in + let rest' = strengthen_sig env' msid rest mp in + item::rest' + + +let strengthen env mtb mp = strengthen_mtb env mp mtb + +let update_subst env mb mp = + match type_of_mb env mb with + | SEBstruct(msid,str) -> false, join_alias + (subst_key (map_msid msid mp) mb.mod_alias) + (map_msid msid mp) + | _ -> true, mb.mod_alias diff --git a/checker/modops.mli b/checker/modops.mli new file mode 100644 index 00000000..17b063e2 --- /dev/null +++ b/checker/modops.mli @@ -0,0 +1,70 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* module_body + +val module_type_of_module : module_path option -> module_body -> + module_type_body + +val destr_functor : + env -> struct_expr_body -> mod_bound_id * module_type_body * struct_expr_body + +(* Evaluation functions *) +val eval_struct : env -> struct_expr_body -> struct_expr_body + +val type_of_mb : env -> module_body -> struct_expr_body + +(* [add_signature mp sign env] assumes that the substitution [msid] + $\mapsto$ [mp] has already been performed (or is not necessary, like + when [mp = MPself msid]) *) +val add_signature : module_path -> structure_body -> env -> env + +(* adds a module and its components, but not the constraints *) +val add_module : module_path -> module_body -> env -> env + +val check_modpath_equiv : env -> module_path -> module_path -> unit + +val strengthen : env -> struct_expr_body -> module_path -> struct_expr_body + +val update_subst : env -> module_body -> module_path -> bool * substitution + +val error_incompatible_modtypes : + module_type_body -> module_type_body -> 'a + +val error_not_match : label -> structure_field_body -> 'a + +val error_with_incorrect : label -> 'a + +val error_no_such_label : label -> 'a + +val error_no_such_label_sub : + label -> mod_self_id -> mod_self_id -> 'a + +val error_signature_expected : struct_expr_body -> 'a + +val error_not_a_constant : label -> 'a + +val error_not_a_module : label -> 'a + +val error_a_generative_module_expected : label -> 'a + +val error_application_to_not_path : struct_expr_body -> 'a diff --git a/checker/reduction.ml b/checker/reduction.ml new file mode 100644 index 00000000..49f05daf --- /dev/null +++ b/checker/reduction.ml @@ -0,0 +1,436 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* true + | Zupdate _::s -> is_empty_stack s + | Zshift _::s -> is_empty_stack s + | _ -> false + +(* Compute the lift to be performed on a term placed in a given stack *) +let el_stack el stk = + let n = + List.fold_left + (fun i z -> + match z with + Zshift n -> i+n + | _ -> i) + 0 + stk in + el_shft n el + +let compare_stack_shape stk1 stk2 = + let rec compare_rec bal stk1 stk2 = + match (stk1,stk2) with + ([],[]) -> bal=0 + | ((Zupdate _|Zshift _)::s1, _) -> compare_rec bal s1 stk2 + | (_, (Zupdate _|Zshift _)::s2) -> compare_rec bal stk1 s2 + | (Zapp l1::s1, _) -> compare_rec (bal+Array.length l1) s1 stk2 + | (_, Zapp l2::s2) -> compare_rec (bal-Array.length l2) stk1 s2 + | (Zcase(c1,_,_)::s1, Zcase(c2,_,_)::s2) -> + bal=0 (* && c1.ci_ind = c2.ci_ind *) && compare_rec 0 s1 s2 + | (Zfix(_,a1)::s1, Zfix(_,a2)::s2) -> + bal=0 && compare_rec 0 a1 a2 && compare_rec 0 s1 s2 + | (_,_) -> false in + compare_rec 0 stk1 stk2 + +type lft_constr_stack_elt = + Zlapp of (lift * fconstr) array + | Zlfix of (lift * fconstr) * lft_constr_stack + | Zlcase of case_info * lift * fconstr * fconstr array +and lft_constr_stack = lft_constr_stack_elt list + +let rec zlapp v = function + Zlapp v2 :: s -> zlapp (Array.append v v2) s + | s -> Zlapp v :: s + +let pure_stack lfts stk = + let rec pure_rec lfts stk = + match stk with + [] -> (lfts,[]) + | zi::s -> + (match (zi,pure_rec lfts s) with + (Zupdate _,lpstk) -> lpstk + | (Zshift n,(l,pstk)) -> (el_shft n l, pstk) + | (Zapp a, (l,pstk)) -> + (l,zlapp (Array.map (fun t -> (l,t)) a) pstk) + | (Zfix(fx,a),(l,pstk)) -> + let (lfx,pa) = pure_rec l a in + (l, Zlfix((lfx,fx),pa)::pstk) + | (Zcase(ci,p,br),(l,pstk)) -> + (l,Zlcase(ci,l,p,br)::pstk)) in + snd (pure_rec lfts stk) + +(****************************************************************************) +(* Reduction Functions *) +(****************************************************************************) + +let whd_betaiotazeta env x = + match x with + | (Sort _|Var _|Meta _|Evar _|Const _|Ind _|Construct _| + Prod _|Lambda _|Fix _|CoFix _) -> x + | _ -> whd_val (create_clos_infos betaiotazeta env) (inject x) + +let whd_betadeltaiota env t = + match t with + | (Sort _|Meta _|Evar _|Ind _|Construct _| + Prod _|Lambda _|Fix _|CoFix _) -> t + | _ -> whd_val (create_clos_infos betadeltaiota env) (inject t) + +let whd_betadeltaiota_nolet env t = + match t with + | (Sort _|Meta _|Evar _|Ind _|Construct _| + Prod _|Lambda _|Fix _|CoFix _|LetIn _) -> t + | _ -> whd_val (create_clos_infos betadeltaiotanolet env) (inject t) + +(* Beta *) + +let beta_appvect c v = + let rec stacklam env t stack = + match t, stack with + Lambda(_,_,c), arg::stacktl -> stacklam (arg::env) c stacktl + | _ -> applist (substl env t, stack) in + stacklam [] c (Array.to_list v) + +(********************************************************************) +(* Conversion *) +(********************************************************************) + +(* Conversion utility functions *) +type 'a conversion_function = env -> 'a -> 'a -> unit + +exception NotConvertible +exception NotConvertibleVect of int + +let compare_stacks f fmind lft1 stk1 lft2 stk2 = + let rec cmp_rec pstk1 pstk2 = + match (pstk1,pstk2) with + | (z1::s1, z2::s2) -> + cmp_rec s1 s2; + (match (z1,z2) with + | (Zlapp a1,Zlapp a2) -> array_iter2 f a1 a2 + | (Zlfix(fx1,a1),Zlfix(fx2,a2)) -> + f fx1 fx2; cmp_rec a1 a2 + | (Zlcase(ci1,l1,p1,br1),Zlcase(ci2,l2,p2,br2)) -> + if not (fmind ci1.ci_ind ci2.ci_ind) then + raise NotConvertible; + f (l1,p1) (l2,p2); + array_iter2 (fun c1 c2 -> f (l1,c1) (l2,c2)) br1 br2 + | _ -> assert false) + | _ -> () in + if compare_stack_shape stk1 stk2 then + cmp_rec (pure_stack lft1 stk1) (pure_stack lft2 stk2) + else raise NotConvertible + +(* Convertibility of sorts *) + +type conv_pb = + | CONV + | CUMUL + +let sort_cmp univ pb s0 s1 = + match (s0,s1) with + | (Prop c1, Prop c2) -> if c1 = Pos & c2 = Null then raise NotConvertible + | (Prop c1, Type u) -> + (match pb with + CUMUL -> () + | _ -> raise NotConvertible) + | (Type u1, Type u2) -> + if not + (match pb with + | CONV -> check_eq univ u1 u2 + | CUMUL -> check_geq univ u2 u1) + then raise NotConvertible + | (_, _) -> raise NotConvertible + +let rec no_arg_available = function + | [] -> true + | Zupdate _ :: stk -> no_arg_available stk + | Zshift _ :: stk -> no_arg_available stk + | Zapp v :: stk -> Array.length v = 0 && no_arg_available stk + | Zcase _ :: _ -> true + | Zfix _ :: _ -> true + +let rec no_nth_arg_available n = function + | [] -> true + | Zupdate _ :: stk -> no_nth_arg_available n stk + | Zshift _ :: stk -> no_nth_arg_available n stk + | Zapp v :: stk -> + let k = Array.length v in + if n >= k then no_nth_arg_available (n-k) stk + else false + | Zcase _ :: _ -> true + | Zfix _ :: _ -> true + +let rec no_case_available = function + | [] -> true + | Zupdate _ :: stk -> no_case_available stk + | Zshift _ :: stk -> no_case_available stk + | Zapp _ :: stk -> no_case_available stk + | Zcase _ :: _ -> false + | Zfix _ :: _ -> true + +let in_whnf (t,stk) = + match fterm_of t with + | (FLetIn _ | FCases _ | FApp _ | FCLOS _ | FLIFT _ | FCast _) -> false + | FLambda _ -> no_arg_available stk + | FConstruct _ -> no_case_available stk + | FCoFix _ -> no_case_available stk + | FFix(((ri,n),(_,_,_)),_) -> no_nth_arg_available ri.(n) stk + | (FFlex _ | FProd _ | FEvar _ | FInd _ | FAtom _ | FRel _) -> true + | FLOCKED -> assert false + +(* Conversion between [lft1]term1 and [lft2]term2 *) +let rec ccnv univ cv_pb infos lft1 lft2 term1 term2 = + eqappr univ cv_pb infos (lft1, (term1,[])) (lft2, (term2,[])) + +(* Conversion between [lft1](hd1 v1) and [lft2](hd2 v2) *) +and eqappr univ cv_pb infos (lft1,st1) (lft2,st2) = + Util.check_for_interrupt (); + (* First head reduce both terms *) + let rec whd_both (t1,stk1) (t2,stk2) = + let st1' = whd_stack infos t1 stk1 in + let st2' = whd_stack infos t2 stk2 in + (* Now, whd_stack on term2 might have modified st1 (due to sharing), + and st1 might not be in whnf anymore. If so, we iterate ccnv. *) + if in_whnf st1' then (st1',st2') else whd_both st1' st2' in + let ((hd1,v1),(hd2,v2)) = whd_both st1 st2 in + let appr1 = (lft1,(hd1,v1)) and appr2 = (lft2,(hd2,v2)) in + (* compute the lifts that apply to the head of the term (hd1 and hd2) *) + let el1 = el_stack lft1 v1 in + let el2 = el_stack lft2 v2 in + match (fterm_of hd1, fterm_of hd2) with + (* case of leaves *) + | (FAtom a1, FAtom a2) -> + (match a1, a2 with + | (Sort s1, Sort s2) -> + assert (is_empty_stack v1 && is_empty_stack v2); + sort_cmp univ cv_pb s1 s2 + | (Meta n, Meta m) -> + if n=m + then convert_stacks univ infos lft1 lft2 v1 v2 + else raise NotConvertible + | _ -> raise NotConvertible) + | (FEvar (ev1,args1), FEvar (ev2,args2)) -> + if ev1=ev2 then + (convert_stacks univ infos lft1 lft2 v1 v2; + convert_vect univ infos el1 el2 args1 args2) + else raise NotConvertible + + (* 2 index known to be bound to no constant *) + | (FRel n, FRel m) -> + if reloc_rel n el1 = reloc_rel m el2 + then convert_stacks univ infos lft1 lft2 v1 v2 + else raise NotConvertible + + (* 2 constants, 2 local defined vars or 2 defined rels *) + | (FFlex fl1, FFlex fl2) -> + (try (* try first intensional equality *) + if fl1 = fl2 + then convert_stacks univ infos lft1 lft2 v1 v2 + else raise NotConvertible + with NotConvertible -> + (* else the oracle tells which constant is to be expanded *) + let (app1,app2) = + match unfold_reference infos fl2 with + | Some def2 -> (appr1, (lft2, whd_stack infos def2 v2)) + | None -> + (match unfold_reference infos fl1 with + | Some def1 -> ((lft1, whd_stack infos def1 v1), appr2) + | None -> raise NotConvertible) in + eqappr univ cv_pb infos app1 app2) + + (* only one constant, defined var or defined rel *) + | (FFlex fl1, _) -> + (match unfold_reference infos fl1 with + | Some def1 -> + eqappr univ cv_pb infos (lft1, whd_stack infos def1 v1) appr2 + | None -> raise NotConvertible) + | (_, FFlex fl2) -> + (match unfold_reference infos fl2 with + | Some def2 -> + eqappr univ cv_pb infos appr1 (lft2, whd_stack infos def2 v2) + | None -> raise NotConvertible) + + (* other constructors *) + | (FLambda _, FLambda _) -> + assert (is_empty_stack v1 && is_empty_stack v2); + let (_,ty1,bd1) = destFLambda mk_clos hd1 in + let (_,ty2,bd2) = destFLambda mk_clos hd2 in + ccnv univ CONV infos el1 el2 ty1 ty2; + ccnv univ CONV infos (el_lift el1) (el_lift el2) bd1 bd2 + + | (FProd (_,c1,c2), FProd (_,c'1,c'2)) -> + assert (is_empty_stack v1 && is_empty_stack v2); + (* Luo's system *) + ccnv univ CONV infos el1 el2 c1 c'1; + ccnv univ cv_pb infos (el_lift el1) (el_lift el2) c2 c'2 + + (* Inductive types: MutInd MutConstruct Fix Cofix *) + + | (FInd ind1, FInd ind2) -> + if mind_equiv_infos infos ind1 ind2 + then + convert_stacks univ infos lft1 lft2 v1 v2 + else raise NotConvertible + + | (FConstruct (ind1,j1), FConstruct (ind2,j2)) -> + if j1 = j2 && mind_equiv_infos infos ind1 ind2 + then + convert_stacks univ infos lft1 lft2 v1 v2 + else raise NotConvertible + + | (FFix ((op1,(_,tys1,cl1)),e1), FFix((op2,(_,tys2,cl2)),e2)) -> + if op1 = op2 + then + let n = Array.length cl1 in + let fty1 = Array.map (mk_clos e1) tys1 in + let fty2 = Array.map (mk_clos e2) tys2 in + let fcl1 = Array.map (mk_clos (subs_liftn n e1)) cl1 in + let fcl2 = Array.map (mk_clos (subs_liftn n e2)) cl2 in + convert_vect univ infos el1 el2 fty1 fty2; + convert_vect univ infos + (el_liftn n el1) (el_liftn n el2) fcl1 fcl2; + convert_stacks univ infos lft1 lft2 v1 v2 + else raise NotConvertible + + | (FCoFix ((op1,(_,tys1,cl1)),e1), FCoFix((op2,(_,tys2,cl2)),e2)) -> + if op1 = op2 + then + let n = Array.length cl1 in + let fty1 = Array.map (mk_clos e1) tys1 in + let fty2 = Array.map (mk_clos e2) tys2 in + let fcl1 = Array.map (mk_clos (subs_liftn n e1)) cl1 in + let fcl2 = Array.map (mk_clos (subs_liftn n e2)) cl2 in + convert_vect univ infos el1 el2 fty1 fty2; + convert_vect univ infos + (el_liftn n el1) (el_liftn n el2) fcl1 fcl2; + convert_stacks univ infos lft1 lft2 v1 v2 + else raise NotConvertible + + (* Should not happen because both (hd1,v1) and (hd2,v2) are in whnf *) + | ( (FLetIn _, _) | (FCases _,_) | (FApp _,_) | (FCLOS _,_) | (FLIFT _,_) + | (_, FLetIn _) | (_,FCases _) | (_,FApp _) | (_,FCLOS _) | (_,FLIFT _) + | (FLOCKED,_) | (_,FLOCKED) ) -> assert false + + (* In all other cases, terms are not convertible *) + | _ -> raise NotConvertible + +and convert_stacks univ infos lft1 lft2 stk1 stk2 = + compare_stacks + (fun (l1,t1) (l2,t2) -> ccnv univ CONV infos l1 l2 t1 t2) + (mind_equiv_infos infos) + lft1 stk1 lft2 stk2 + +and convert_vect univ infos lft1 lft2 v1 v2 = + array_iter2 (fun t1 t2 -> ccnv univ CONV infos lft1 lft2 t1 t2) v1 v2 + +let clos_fconv cv_pb env t1 t2 = + let infos = create_clos_infos betaiotazeta env in + let univ = universes env in + ccnv univ cv_pb infos ELID ELID (inject t1) (inject t2) + +let fconv cv_pb env t1 t2 = + if eq_constr t1 t2 then () + else clos_fconv cv_pb env t1 t2 + +let conv_cmp = fconv +let conv = fconv CONV +let conv_leq = fconv CUMUL + +let conv_leq_vecti env v1 v2 = + array_fold_left2_i + (fun i _ t1 t2 -> + (try conv_leq env t1 t2 + with (NotConvertible|Invalid_argument _) -> + raise (NotConvertibleVect i)); + ()) + () + v1 + v2 + +(* option for conversion *) + +let vm_conv = ref fconv +let set_vm_conv f = vm_conv := f +let vm_conv cv_pb env t1 t2 = + try + !vm_conv cv_pb env t1 t2 + with Not_found | Invalid_argument _ -> + (* If compilation fails, fall-back to closure conversion *) + clos_fconv cv_pb env t1 t2 + +(********************************************************************) +(* Special-Purpose Reduction *) +(********************************************************************) + +(* pseudo-reduction rule: + * [hnf_prod_app env s (Prod(_,B)) N --> B[N] + * with an HNF on the first argument to produce a product. + * if this does not work, then we use the string S as part of our + * error message. *) + +let hnf_prod_app env t n = + match whd_betadeltaiota env t with + | Prod (_,_,b) -> subst1 n b + | _ -> anomaly "hnf_prod_app: Need a product" + +let hnf_prod_applist env t nl = + List.fold_left (hnf_prod_app env) t nl + +(* Dealing with arities *) + +let dest_prod env = + let rec decrec env m c = + let t = whd_betadeltaiota env c in + match t with + | Prod (n,a,c0) -> + let d = (n,None,a) in + decrec (push_rel d env) (d::m) c0 + | _ -> m,t + in + decrec env empty_rel_context + +(* The same but preserving lets *) +let dest_prod_assum env = + let rec prodec_rec env l ty = + let rty = whd_betadeltaiota_nolet env ty in + match rty with + | Prod (x,t,c) -> + let d = (x,None,t) in + prodec_rec (push_rel d env) (d::l) c + | LetIn (x,b,t,c) -> + let d = (x,Some b,t) in + prodec_rec (push_rel d env) (d::l) c + | Cast (c,_,_) -> prodec_rec env l c + | _ -> l,rty + in + prodec_rec env empty_rel_context + +let dest_arity env c = + let l, c = dest_prod_assum env c in + match c with + | Sort s -> l,s + | _ -> error "not an arity" + +let is_arity env c = + try + let _ = dest_arity env c in + true + with UserError _ -> false + diff --git a/checker/reduction.mli b/checker/reduction.mli new file mode 100644 index 00000000..eb50ae32 --- /dev/null +++ b/checker/reduction.mli @@ -0,0 +1,54 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* constr -> constr +val whd_betadeltaiota : env -> constr -> constr +val whd_betadeltaiota_nolet : env -> constr -> constr + +(************************************************************************) +(*s conversion functions *) + +exception NotConvertible +exception NotConvertibleVect of int +type 'a conversion_function = env -> 'a -> 'a -> unit + +type conv_pb = CONV | CUMUL + +val conv : constr conversion_function +val conv_leq : constr conversion_function +val conv_leq_vecti : constr array conversion_function + +val vm_conv : conv_pb -> constr conversion_function + +(************************************************************************) + +(* Builds an application node, reducing beta redexes it may produce. *) +val beta_appvect : constr -> constr array -> constr + +(* Pseudo-reduction rule Prod(x,A,B) a --> B[x\a] *) +val hnf_prod_applist : env -> constr -> constr list -> constr + + +(************************************************************************) +(*s Recognizing products and arities modulo reduction *) + +val dest_prod : env -> constr -> rel_context * constr +val dest_prod_assum : env -> constr -> rel_context * constr + +val dest_arity : env -> constr -> arity +val is_arity : env -> constr -> bool diff --git a/checker/safe_typing.ml b/checker/safe_typing.ml new file mode 100644 index 00000000..4b156e7e --- /dev/null +++ b/checker/safe_typing.ml @@ -0,0 +1,137 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* () + | _, None -> () + | _, Some ImpredicativeSet -> + error "Needs option -impredicative-set" + +(* Libraries = Compiled modules *) + +let report_clash f caller dir = + let msg = + str "compiled library " ++ str(string_of_dirpath caller) ++ + spc() ++ str "makes inconsistent assumptions over library" ++ spc() ++ + str(string_of_dirpath dir) ++ fnl() in + f msg + + +let check_imports f caller env needed = + let check (dp,stamp) = + try + let actual_stamp = lookup_digest env dp in + if stamp <> actual_stamp then report_clash f caller dp + with Not_found -> + error ("Reference to unknown module " ^ (string_of_dirpath dp)) + in + List.iter check needed + + + +(* Remove the body of opaque constants in modules *) +(* also remove mod_expr ? *) +let rec lighten_module mb = + { mb with + mod_expr = Option.map lighten_modexpr mb.mod_expr; + mod_type = Option.map lighten_modexpr mb.mod_type } + +and lighten_struct struc = + let lighten_body (l,body) = (l,match body with + | SFBconst ({const_opaque=true} as x) -> SFBconst {x with const_body=None} + | (SFBconst _ | SFBmind _ | SFBalias _) as x -> x + | SFBmodule m -> SFBmodule (lighten_module m) + | SFBmodtype m -> SFBmodtype + ({m with + typ_expr = lighten_modexpr m.typ_expr})) + in + List.map lighten_body struc + +and lighten_modexpr = function + | SEBfunctor (mbid,mty,mexpr) -> + SEBfunctor (mbid, + ({mty with + typ_expr = lighten_modexpr mty.typ_expr}), + lighten_modexpr mexpr) + | SEBident mp as x -> x + | SEBstruct (msid, struc) -> + SEBstruct (msid, lighten_struct struc) + | SEBapply (mexpr,marg,u) -> + SEBapply (lighten_modexpr mexpr,lighten_modexpr marg,u) + | SEBwith (seb,wdcl) -> + SEBwith (lighten_modexpr seb,wdcl) + +let lighten_library (dp,mb,depends,s) = (dp,lighten_module mb,depends,s) + + +type compiled_library = + dir_path * + module_body * + (dir_path * Digest.t) list * + engagement option + +(* This function should append a certificate to the .vo file. + The digest must be part of the certicate to rule out attackers + that could change the .vo file between the time it was read and + the time the stamp is written. + For the moment, .vo are not signed. *) +let stamp_library file digest = () + +(* When the module is checked, digests do not need to match, but a + warning is issued in case of mismatch *) +let import file (dp,mb,depends,engmt as vo) digest = + Validate.val_vo (Obj.repr vo); + Flags.if_verbose msgnl (str "*** vo structure validated ***"); + let env = !genv in + check_imports msg_warning dp env depends; + check_engagement env engmt; + check_module env mb; + stamp_library file digest; + (* We drop proofs once checked *) +(* let mb = lighten_module mb in*) + full_add_module dp mb digest + +(* When the module is admitted, digests *must* match *) +let unsafe_import file (dp,mb,depends,engmt) digest = + let env = !genv in + check_imports (errorlabstrm"unsafe_import") dp env depends; + check_engagement env engmt; + (* We drop proofs once checked *) +(* let mb = lighten_module mb in*) + full_add_module dp mb digest diff --git a/checker/safe_typing.mli b/checker/safe_typing.mli new file mode 100644 index 00000000..12fdbfce --- /dev/null +++ b/checker/safe_typing.mli @@ -0,0 +1,27 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* unit +val get_env : unit -> env + +(* exporting and importing modules *) +type compiled_library + +val set_engagement : Declarations.engagement -> unit +val import : + System.physical_path -> compiled_library -> Digest.t -> unit +val unsafe_import : + System.physical_path -> compiled_library -> Digest.t -> unit diff --git a/checker/subtyping.ml b/checker/subtyping.ml new file mode 100644 index 00000000..fb95b606 --- /dev/null +++ b/checker/subtyping.ml @@ -0,0 +1,388 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* + Labmap.add (label_of_id id) (IndConstr((ip,i+1), mib)) map) + oib.mind_consnames + map + in + Labmap.add (label_of_id oib.mind_typename) (IndType (ip, mib)) map + in + array_fold_right_i add_nameobjects_of_one mib.mind_packets map + + +(* creates namedobject map for the whole signature *) + +let make_label_map mp list = + let add_one (l,e) map = + let add_map obj = Labmap.add l obj map in + match e with + | SFBconst cb -> add_map (Constant cb) + | SFBmind mib -> + add_nameobjects_of_mib (make_kn mp empty_dirpath l) mib map + | SFBmodule mb -> add_map (Module mb) + | SFBmodtype mtb -> add_map (Modtype mtb) + | SFBalias (mp,cst) -> add_map (Alias mp) + in + List.fold_right add_one list Labmap.empty + +let check_conv_error error f env a1 a2 = + try + f env a1 a2 + with + NotConvertible -> error () + +(* for now we do not allow reorderings *) +let check_inductive env msid1 l info1 mib2 spec2 = + let kn = make_kn (MPself msid1) empty_dirpath l in + let error () = error_not_match l spec2 in + let check_conv f = check_conv_error error f in + let mib1 = + match info1 with + | IndType ((_,0), mib) -> mib + | _ -> error () + in + let check_inductive_type env t1 t2 = + + (* Due to sort-polymorphism in inductive types, the conclusions of + t1 and t2, if in Type, are generated as the least upper bounds + of the types of the constructors. + + By monotonicity of the infered l.u.b. wrt subtyping (i.e. if X:U + |- T(X):s and |- M:U' and U'<=U then infer_type(T(M))<=s), each + universe in the conclusion of t1 has an bounding universe in + the conclusion of t2, so that we don't need to check the + subtyping of the conclusions of t1 and t2. + + Even if we'd like to recheck it, the inference of constraints + is not designed to deal with algebraic constraints of the form + max-univ(u1..un) <= max-univ(u'1..u'n), so that it is not easy + to recheck it (in short, we would need the actual graph of + constraints as input while type checking is currently designed + to output a set of constraints instead) *) + + (* So we cheat and replace the subtyping problem on algebraic + constraints of the form max-univ(u1..un) <= max-univ(u'1..u'n) + (that we know are necessary true) by trivial constraints that + the constraint generator knows how to deal with *) + + let (ctx1,s1) = dest_arity env t1 in + let (ctx2,s2) = dest_arity env t2 in + let s1,s2 = + match s1, s2 with + | Type _, Type _ -> (* shortcut here *) Prop Null, Prop Null + | (Prop _, Type _) | (Type _,Prop _) -> error () + | _ -> (s1, s2) in + check_conv conv_leq env + (mkArity (ctx1,s1)) (mkArity (ctx2,s2)) + in + + let check_packet p1 p2 = + let check f = if f p1 <> f p2 then error () in + check (fun p -> p.mind_consnames); + check (fun p -> p.mind_typename); + (* nf_lc later *) + (* nf_arity later *) + (* user_lc ignored *) + (* user_arity ignored *) + check (fun p -> p.mind_nrealargs); + (* kelim ignored *) + (* listrec ignored *) + (* finite done *) + (* nparams done *) + (* params_ctxt done because part of the inductive types *) + (* Don't check the sort of the type if polymorphic *) + check_inductive_type env + (type_of_inductive env (mib1,p1)) (type_of_inductive env (mib2,p2)) + in + let check_cons_types i p1 p2 = + array_iter2 (check_conv conv env) + (arities_of_specif kn (mib1,p1)) + (arities_of_specif kn (mib2,p2)) + in + let check f = if f mib1 <> f mib2 then error () in + check (fun mib -> mib.mind_finite); + check (fun mib -> mib.mind_ntypes); + assert (mib1.mind_hyps=[] && mib2.mind_hyps=[]); + assert (Array.length mib1.mind_packets >= 1 + && Array.length mib2.mind_packets >= 1); + + (* Check that the expected numbers of uniform parameters are the same *) + (* No need to check the contexts of parameters: it is checked *) + (* at the time of checking the inductive arities in check_packet. *) + (* Notice that we don't expect the local definitions to match: only *) + (* the inductive types and constructors types have to be convertible *) + check (fun mib -> mib.mind_nparams); + + begin + match mib2.mind_equiv with + | None -> () + | Some kn2' -> + let kn2 = scrape_mind env kn2' in + let kn1 = match mib1.mind_equiv with + None -> kn + | Some kn1' -> scrape_mind env kn1' + in + if kn1 <> kn2 then error () + end; + (* we check that records and their field names are preserved. *) + check (fun mib -> mib.mind_record); + if mib1.mind_record then begin + let rec names_prod_letin t = match t with + | Prod(n,_,t) -> n::(names_prod_letin t) + | LetIn(n,_,_,t) -> n::(names_prod_letin t) + | Cast(t,_,_) -> names_prod_letin t + | _ -> [] + in + assert (Array.length mib1.mind_packets = 1); + assert (Array.length mib2.mind_packets = 1); + assert (Array.length mib1.mind_packets.(0).mind_user_lc = 1); + assert (Array.length mib2.mind_packets.(0).mind_user_lc = 1); + check (fun mib -> names_prod_letin mib.mind_packets.(0).mind_user_lc.(0)); + end; + (* we first check simple things *) + array_iter2 check_packet mib1.mind_packets mib2.mind_packets; + (* and constructor types in the end *) + let _ = array_map2_i check_cons_types mib1.mind_packets mib2.mind_packets + in () + +let check_constant env msid1 l info1 cb2 spec2 = + let error () = error_not_match l spec2 in + let check_conv f = check_conv_error error f in + let check_type env t1 t2 = + + (* If the type of a constant is generated, it may mention + non-variable algebraic universes that the general conversion + algorithm is not ready to handle. Anyway, generated types of + constants are functions of the body of the constant. If the + bodies are the same in environments that are subtypes one of + the other, the types are subtypes too (i.e. if Gamma <= Gamma', + Gamma |- A |> T, Gamma |- A' |> T' and Gamma |- A=A' then T <= T'). + Hence they don't have to be checked again *) + + let t1,t2 = + if isArity t2 then + let (ctx2,s2) = destArity t2 in + match s2 with + | Type v when not (is_univ_variable v) -> + (* The type in the interface is inferred and is made of algebraic + universes *) + begin try + let (ctx1,s1) = dest_arity env t1 in + match s1 with + | Type u when not (is_univ_variable u) -> + (* Both types are inferred, no need to recheck them. We + cheat and collapse the types to Prop *) + mkArity (ctx1,Prop Null), mkArity (ctx2,Prop Null) + | Prop _ -> + (* The type in the interface is inferred, it may be the case + that the type in the implementation is smaller because + the body is more reduced. We safely collapse the upper + type to Prop *) + mkArity (ctx1,Prop Null), mkArity (ctx2,Prop Null) + | Type _ -> + (* The type in the interface is inferred and the type in the + implementation is not inferred or is inferred but from a + more reduced body so that it is just a variable. Since + constraints of the form "univ <= max(...)" are not + expressible in the system of algebraic universes: we fail + (the user has to use an explicit type in the interface *) + error () + with UserError _ (* "not an arity" *) -> + error () end + | _ -> t1,t2 + else + (t1,t2) in + check_conv conv_leq env t1 t2 + in + + match info1 with + | Constant cb1 -> + assert (cb1.const_hyps=[] && cb2.const_hyps=[]) ; + (*Start by checking types*) + let typ1 = Typeops.type_of_constant_type env cb1.const_type in + let typ2 = Typeops.type_of_constant_type env cb2.const_type in + check_type env typ1 typ2; + let con = make_con (MPself msid1) empty_dirpath l in + (match cb2 with + | {const_body=Some lc2;const_opaque=false} -> + let c2 = force_constr lc2 in + let c1 = match cb1.const_body with + | Some lc1 -> force_constr lc1 + | None -> Const con + in + check_conv conv env c1 c2 + | _ -> ()) + | IndType ((kn,i),mind1) -> + ignore (Util.error ( + "The kernel does not recognize yet that a parameter can be " ^ + "instantiated by an inductive type. Hint: you can rename the " ^ + "inductive type and give a definition to map the old name to the new " ^ + "name.")); + assert (mind1.mind_hyps=[] && cb2.const_hyps=[]) ; + if cb2.const_body <> None then error () ; + let arity1 = type_of_inductive env (mind1,mind1.mind_packets.(i)) in + let typ2 = Typeops.type_of_constant_type env cb2.const_type in + check_conv conv_leq env arity1 typ2 + | IndConstr (((kn,i),j) as cstr,mind1) -> + ignore (Util.error ( + "The kernel does not recognize yet that a parameter can be " ^ + "instantiated by a constructor. Hint: you can rename the " ^ + "constructor and give a definition to map the old name to the new " ^ + "name.")); + assert (mind1.mind_hyps=[] && cb2.const_hyps=[]) ; + if cb2.const_body <> None then error () ; + let ty1 = type_of_constructor cstr (mind1,mind1.mind_packets.(i)) in + let ty2 = Typeops.type_of_constant_type env cb2.const_type in + check_conv conv env ty1 ty2 + | _ -> error () + +let rec check_modules env msid1 l msb1 msb2 = + let mp = (MPdot(MPself msid1,l)) in + let mty1 = module_type_of_module (Some mp) msb1 in + let mty2 = module_type_of_module None msb2 in + check_modtypes env mty1 mty2 false + + +and check_signatures env (msid1,sig1) alias (msid2,sig2') = + let mp1 = MPself msid1 in + let env = add_signature mp1 sig1 env in + let alias = update_subst_alias alias (map_msid msid2 mp1) in + let sig2 = subst_structure alias sig2' in + let sig2 = subst_signature_msid msid2 mp1 sig2 in + let map1 = make_label_map mp1 sig1 in + let check_one_body (l,spec2) = + let info1 = + try + Labmap.find l map1 + with + Not_found -> error_no_such_label_sub l msid1 msid2 + in + match spec2 with + | SFBconst cb2 -> + check_constant env msid1 l info1 cb2 spec2 + | SFBmind mib2 -> + check_inductive env msid1 l info1 mib2 spec2 + | SFBmodule msb2 -> + begin + match info1 with + | Module msb -> check_modules env msid1 l msb msb2 + | Alias mp ->let msb = + {mod_expr = Some (SEBident mp); + mod_type = Some (eval_struct env (SEBident mp)); + mod_constraints = Constraint.empty; + mod_alias = (lookup_modtype mp env).typ_alias; + mod_retroknowledge = []} in + check_modules env msid1 l msb msb2 + | _ -> error_not_match l spec2 + end + | SFBalias (mp,_) -> + begin + match info1 with + | Alias mp1 -> check_modpath_equiv env mp mp1 + | Module msb -> + let msb1 = + {mod_expr = Some (SEBident mp); + mod_type = Some (eval_struct env (SEBident mp)); + mod_constraints = Constraint.empty; + mod_alias = (lookup_modtype mp env).typ_alias; + mod_retroknowledge = []} in + check_modules env msid1 l msb msb1 + | _ -> error_not_match l spec2 + end + | SFBmodtype mtb2 -> + let mtb1 = + match info1 with + | Modtype mtb -> mtb + | _ -> error_not_match l spec2 + in + check_modtypes env mtb1 mtb2 true + in + List.iter check_one_body sig2 + +and check_modtypes env mtb1 mtb2 equiv = + if mtb1==mtb2 then () else (* just in case :) *) + let mtb1',mtb2'= + (match mtb1.typ_strength with + None -> eval_struct env mtb1.typ_expr, + eval_struct env mtb2.typ_expr + | Some mp -> strengthen env mtb1.typ_expr mp, + eval_struct env mtb2.typ_expr) in + let rec check_structure env str1 str2 equiv = + match str1, str2 with + | SEBstruct (msid1,list1), + SEBstruct (msid2,list2) -> + check_signatures env + (msid1,list1) mtb1.typ_alias (msid2,list2); + if equiv then + check_signatures env + (msid2,list2) mtb2.typ_alias (msid1,list1) + | SEBfunctor (arg_id1,arg_t1,body_t1), + SEBfunctor (arg_id2,arg_t2,body_t2) -> + check_modtypes env arg_t2 arg_t1 equiv; + (* contravariant *) + let env = + add_module (MPbound arg_id2) (module_body_of_type arg_t2) env + in + let body_t1' = + (* since we are just checking well-typedness we do not need + to expand any constant. Hence the identity resolver. *) + subst_struct_expr + (map_mbid arg_id1 (MPbound arg_id2)) + body_t1 + in + check_structure env (eval_struct env body_t1') + (eval_struct env body_t2) equiv + | _ , _ -> error_incompatible_modtypes mtb1 mtb2 + in + if mtb1'== mtb2' then () + else check_structure env mtb1' mtb2' equiv + +let check_subtypes env sup super = + (*if sup<>super then*) + check_modtypes env sup super false + +let check_equal env sup super = + (*if sup<>super then*) + check_modtypes env sup super true diff --git a/checker/subtyping.mli b/checker/subtyping.mli new file mode 100644 index 00000000..10842252 --- /dev/null +++ b/checker/subtyping.mli @@ -0,0 +1,21 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* module_type_body -> module_type_body -> unit +val check_equal : env -> module_type_body -> module_type_body -> unit + + diff --git a/checker/term.ml b/checker/term.ml new file mode 100644 index 00000000..45568a59 --- /dev/null +++ b/checker/term.ml @@ -0,0 +1,462 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* InProp + | Prop Pos -> InSet + | Type _ -> InType + +(********************************************************************) +(* Constructions as implemented *) +(********************************************************************) + +(* [constr array] is an instance matching definitional [named_context] in + the same order (i.e. last argument first) *) +type 'constr pexistential = existential_key * 'constr array +type 'constr prec_declaration = + name array * 'constr array * 'constr array +type 'constr pfixpoint = + (int array * int) * 'constr prec_declaration +type 'constr pcofixpoint = + int * 'constr prec_declaration + +type cast_kind = VMcast | DEFAULTcast + +(*s*******************************************************************) +(* The type of constructions *) + +type constr = + | Rel of int + | Var of identifier + | Meta of metavariable + | Evar of constr pexistential + | Sort of sorts + | Cast of constr * cast_kind * constr + | Prod of name * constr * constr + | Lambda of name * constr * constr + | LetIn of name * constr * constr * constr + | App of constr * constr array + | Const of constant + | Ind of inductive + | Construct of constructor + | Case of case_info * constr * constr * constr array + | Fix of constr pfixpoint + | CoFix of constr pcofixpoint + +type existential = constr pexistential +type rec_declaration = constr prec_declaration +type fixpoint = constr pfixpoint +type cofixpoint = constr pcofixpoint + +let rec strip_outer_cast c = match c with + | Cast (c,_,_) -> strip_outer_cast c + | _ -> c + +let rec collapse_appl c = match c with + | App (f,cl) -> + let rec collapse_rec f cl2 = + match (strip_outer_cast f) with + | App (g,cl1) -> collapse_rec g (Array.append cl1 cl2) + | _ -> App (f,cl2) + in + collapse_rec f cl + | _ -> c + +let decompose_app c = + match collapse_appl c with + | App (f,cl) -> (f, Array.to_list cl) + | _ -> (c,[]) + + +let applist (f,l) = App (f, Array.of_list l) + + +(****************************************************************************) +(* Functions for dealing with constr terms *) +(****************************************************************************) + +(*********************) +(* Occurring *) +(*********************) + +let iter_constr_with_binders g f n c = match c with + | (Rel _ | Meta _ | Var _ | Sort _ | Const _ | Ind _ + | Construct _) -> () + | Cast (c,_,t) -> f n c; f n t + | Prod (_,t,c) -> f n t; f (g n) c + | Lambda (_,t,c) -> f n t; f (g n) c + | LetIn (_,b,t,c) -> f n b; f n t; f (g n) c + | App (c,l) -> f n c; Array.iter (f n) l + | Evar (_,l) -> Array.iter (f n) l + | Case (_,p,c,bl) -> f n p; f n c; Array.iter (f n) bl + | Fix (_,(_,tl,bl)) -> + Array.iter (f n) tl; + Array.iter (f (iterate g (Array.length tl) n)) bl + | CoFix (_,(_,tl,bl)) -> + Array.iter (f n) tl; + Array.iter (f (iterate g (Array.length tl) n)) bl + +exception LocalOccur + +(* (closedn n M) raises FreeVar if a variable of height greater than n + occurs in M, returns () otherwise *) + +let closedn n c = + let rec closed_rec n c = match c with + | Rel m -> if m>n then raise LocalOccur + | _ -> iter_constr_with_binders succ closed_rec n c + in + try closed_rec n c; true with LocalOccur -> false + +(* [closed0 M] is true iff [M] is a (deBruijn) closed term *) + +let closed0 = closedn 0 + +(* (noccurn n M) returns true iff (Rel n) does NOT occur in term M *) + +let noccurn n term = + let rec occur_rec n c = match c with + | Rel m -> if m = n then raise LocalOccur + | _ -> iter_constr_with_binders succ occur_rec n c + in + try occur_rec n term; true with LocalOccur -> false + +(* (noccur_between n m M) returns true iff (Rel p) does NOT occur in term M + for n <= p < n+m *) + +let noccur_between n m term = + let rec occur_rec n c = match c with + | Rel(p) -> if n<=p && p iter_constr_with_binders succ occur_rec n c + in + try occur_rec n term; true with LocalOccur -> false + +(* Checking function for terms containing existential variables. + The function [noccur_with_meta] considers the fact that + each existential variable (as well as each isevar) + in the term appears applied to its local context, + which may contain the CoFix variables. These occurrences of CoFix variables + are not considered *) + +let noccur_with_meta n m term = + let rec occur_rec n c = match c with + | Rel p -> if n<=p & p + (match f with + | (Cast (Meta _,_,_)| Meta _) -> () + | _ -> iter_constr_with_binders succ occur_rec n c) + | Evar (_, _) -> () + | _ -> iter_constr_with_binders succ occur_rec n c + in + try (occur_rec n term; true) with LocalOccur -> false + + +(*********************) +(* Lifting *) +(*********************) + +let map_constr_with_binders g f l c = match c with + | (Rel _ | Meta _ | Var _ | Sort _ | Const _ | Ind _ + | Construct _) -> c + | Cast (c,k,t) -> Cast (f l c, k, f l t) + | Prod (na,t,c) -> Prod (na, f l t, f (g l) c) + | Lambda (na,t,c) -> Lambda (na, f l t, f (g l) c) + | LetIn (na,b,t,c) -> LetIn (na, f l b, f l t, f (g l) c) + | App (c,al) -> App (f l c, Array.map (f l) al) + | Evar (e,al) -> Evar (e, Array.map (f l) al) + | Case (ci,p,c,bl) -> Case (ci, f l p, f l c, Array.map (f l) bl) + | Fix (ln,(lna,tl,bl)) -> + let l' = iterate g (Array.length tl) l in + Fix (ln,(lna,Array.map (f l) tl,Array.map (f l') bl)) + | CoFix(ln,(lna,tl,bl)) -> + let l' = iterate g (Array.length tl) l in + CoFix (ln,(lna,Array.map (f l) tl,Array.map (f l') bl)) + +(* The generic lifting function *) +let rec exliftn el c = match c with + | Rel i -> Rel(reloc_rel i el) + | _ -> map_constr_with_binders el_lift exliftn el c + +(* Lifting the binding depth across k bindings *) + +let liftn k n = + match el_liftn (pred n) (el_shft k ELID) with + | ELID -> (fun c -> c) + | el -> exliftn el + +let lift k = liftn k 1 + +(*********************) +(* Substituting *) +(*********************) + +(* (subst1 M c) substitutes M for Rel(1) in c + we generalise it to (substl [M1,...,Mn] c) which substitutes in parallel + M1,...,Mn for respectively Rel(1),...,Rel(n) in c *) + +(* 1st : general case *) +type info = Closed | Open | Unknown +type 'a substituend = { mutable sinfo: info; sit: 'a } + +let rec lift_substituend depth s = + match s.sinfo with + | Closed -> s.sit + | Open -> lift depth s.sit + | Unknown -> + s.sinfo <- if closed0 s.sit then Closed else Open; + lift_substituend depth s + +let make_substituend c = { sinfo=Unknown; sit=c } + +let substn_many lamv n c = + let lv = Array.length lamv in + if lv = 0 then c + else + let rec substrec depth c = match c with + | Rel k -> + if k<=depth then c + else if k-depth <= lv then lift_substituend depth lamv.(k-depth-1) + else Rel (k-lv) + | _ -> map_constr_with_binders succ substrec depth c in + substrec n c + +let substnl laml n = + substn_many (Array.map make_substituend (Array.of_list laml)) n +let substl laml = substnl laml 0 +let subst1 lam = substl [lam] + + +(***************************************************************************) +(* Type of assumptions and contexts *) +(***************************************************************************) + +type named_declaration = identifier * constr option * constr +type rel_declaration = name * constr option * constr + +let map_named_declaration f (id, v, ty) = (id, Option.map f v, f ty) +let map_rel_declaration = map_named_declaration + +let fold_named_declaration f (_, v, ty) a = f ty (Option.fold_right f v a) +let fold_rel_declaration = fold_named_declaration + + +type named_context = named_declaration list +let empty_named_context = [] +let fold_named_context f l ~init = List.fold_right f l init + +type section_context = named_context + +type rel_context = rel_declaration list +let empty_rel_context = [] +let rel_context_length = List.length +let rel_context_nhyps hyps = + let rec nhyps acc = function + | [] -> acc + | (_,None,_)::hyps -> nhyps (1+acc) hyps + | (_,Some _,_)::hyps -> nhyps acc hyps in + nhyps 0 hyps +let fold_rel_context f l ~init = List.fold_right f l init + +let map_context f l = + let map_decl (n, body_o, typ as decl) = + let body_o' = Option.smartmap f body_o in + let typ' = f typ in + if body_o' == body_o && typ' == typ then decl else + (n, body_o', typ') + in + list_smartmap map_decl l + +let map_rel_context = map_context + +let extended_rel_list n hyps = + let rec reln l p = function + | (_,None,_) :: hyps -> reln (Rel (n+p) :: l) (p+1) hyps + | (_,Some _,_) :: hyps -> reln l (p+1) hyps + | [] -> l + in + reln [] 1 hyps + +(* Iterate lambda abstractions *) + +(* compose_lam [xn:Tn;..;x1:T1] b = [x1:T1]..[xn:Tn]b *) +let compose_lam l b = + let rec lamrec = function + | ([], b) -> b + | ((v,t)::l, b) -> lamrec (l, Lambda (v,t,b)) + in + lamrec (l,b) + +(* Transforms a lambda term [x1:T1]..[xn:Tn]T into the pair + ([(xn,Tn);...;(x1,T1)],T), where T is not a lambda *) +let decompose_lam = + let rec lamdec_rec l c = match c with + | Lambda (x,t,c) -> lamdec_rec ((x,t)::l) c + | Cast (c,_,_) -> lamdec_rec l c + | _ -> l,c + in + lamdec_rec [] + +(* Decompose lambda abstractions and lets, until finding n + abstractions *) +let decompose_lam_n_assum n = + if n < 0 then + error "decompose_lam_n_assum: integer parameter must be positive"; + let rec lamdec_rec l n c = + if n=0 then l,c + else match c with + | Lambda (x,t,c) -> lamdec_rec ((x,None,t) :: l) (n-1) c + | LetIn (x,b,t,c) -> lamdec_rec ((x,Some b,t) :: l) n c + | Cast (c,_,_) -> lamdec_rec l n c + | c -> error "decompose_lam_n_assum: not enough abstractions" + in + lamdec_rec empty_rel_context n + +(* Iterate products, with or without lets *) + +(* Constructs either [(x:t)c] or [[x=b:t]c] *) +let mkProd_or_LetIn (na,body,t) c = + match body with + | None -> Prod (na, t, c) + | Some b -> LetIn (na, b, t, c) + +let it_mkProd_or_LetIn = List.fold_left (fun c d -> mkProd_or_LetIn d c) + +let decompose_prod_assum = + let rec prodec_rec l c = + match c with + | Prod (x,t,c) -> prodec_rec ((x,None,t) :: l) c + | LetIn (x,b,t,c) -> prodec_rec ((x,Some b,t) :: l) c + | Cast (c,_,_) -> prodec_rec l c + | _ -> l,c + in + prodec_rec empty_rel_context + +let decompose_prod_n_assum n = + if n < 0 then + error "decompose_prod_n_assum: integer parameter must be positive"; + let rec prodec_rec l n c = + if n=0 then l,c + else match c with + | Prod (x,t,c) -> prodec_rec ((x,None,t) :: l) (n-1) c + | LetIn (x,b,t,c) -> prodec_rec ((x,Some b,t) :: l) (n-1) c + | Cast (c,_,_) -> prodec_rec l n c + | c -> error "decompose_prod_n_assum: not enough assumptions" + in + prodec_rec empty_rel_context n + + +(***************************) +(* Other term constructors *) +(***************************) + +type arity = rel_context * sorts + +let mkArity (sign,s) = it_mkProd_or_LetIn (Sort s) sign + +let destArity = + let rec prodec_rec l c = + match c with + | Prod (x,t,c) -> prodec_rec ((x,None,t)::l) c + | LetIn (x,b,t,c) -> prodec_rec ((x,Some b,t)::l) c + | Cast (c,_,_) -> prodec_rec l c + | Sort s -> l,s + | _ -> anomaly "destArity: not an arity" + in + prodec_rec [] + +let rec isArity c = + match c with + | Prod (_,_,c) -> isArity c + | LetIn (_,b,_,c) -> isArity (subst1 b c) + | Cast (c,_,_) -> isArity c + | Sort _ -> true + | _ -> false + +(*******************************) +(* alpha conversion functions *) +(*******************************) + +(* alpha conversion : ignore print names and casts *) + +let compare_constr f t1 t2 = + match t1, t2 with + | Rel n1, Rel n2 -> n1 = n2 + | Meta m1, Meta m2 -> m1 = m2 + | Var id1, Var id2 -> id1 = id2 + | Sort s1, Sort s2 -> s1 = s2 + | Cast (c1,_,_), _ -> f c1 t2 + | _, Cast (c2,_,_) -> f t1 c2 + | Prod (_,t1,c1), Prod (_,t2,c2) -> f t1 t2 & f c1 c2 + | Lambda (_,t1,c1), Lambda (_,t2,c2) -> f t1 t2 & f c1 c2 + | LetIn (_,b1,t1,c1), LetIn (_,b2,t2,c2) -> f b1 b2 & f t1 t2 & f c1 c2 + | App (c1,l1), App (c2,l2) -> + if Array.length l1 = Array.length l2 then + f c1 c2 & array_for_all2 f l1 l2 + else + let (h1,l1) = decompose_app t1 in + let (h2,l2) = decompose_app t2 in + if List.length l1 = List.length l2 then + f h1 h2 & List.for_all2 f l1 l2 + else false + | Evar (e1,l1), Evar (e2,l2) -> e1 = e2 & array_for_all2 f l1 l2 + | Const c1, Const c2 -> c1 = c2 + | Ind c1, Ind c2 -> c1 = c2 + | Construct c1, Construct c2 -> c1 = c2 + | Case (_,p1,c1,bl1), Case (_,p2,c2,bl2) -> + f p1 p2 & f c1 c2 & array_for_all2 f bl1 bl2 + | Fix (ln1,(_,tl1,bl1)), Fix (ln2,(_,tl2,bl2)) -> + ln1 = ln2 & array_for_all2 f tl1 tl2 & array_for_all2 f bl1 bl2 + | CoFix(ln1,(_,tl1,bl1)), CoFix(ln2,(_,tl2,bl2)) -> + ln1 = ln2 & array_for_all2 f tl1 tl2 & array_for_all2 f bl1 bl2 + | _ -> false + +let rec eq_constr m n = + (m==n) or + compare_constr eq_constr m n + +let eq_constr m n = eq_constr m n (* to avoid tracing a recursive fun *) diff --git a/checker/term.mli b/checker/term.mli new file mode 100644 index 00000000..30a2c03a --- /dev/null +++ b/checker/term.mli @@ -0,0 +1,111 @@ +open Names + +type existential_key = int +type metavariable = int +type case_style = + LetStyle + | IfStyle + | LetPatternStyle + | MatchStyle + | RegularStyle +type case_printing = { ind_nargs : int; style : case_style; } +type case_info = { + ci_ind : inductive; + ci_npar : int; + ci_cstr_nargs : int array; + ci_pp_info : case_printing; +} +type contents = Pos | Null +type sorts = Prop of contents | Type of Univ.universe +type sorts_family = InProp | InSet | InType +val family_of_sort : sorts -> sorts_family +type 'a pexistential = existential_key * 'a array +type 'a prec_declaration = name array * 'a array * 'a array +type 'a pfixpoint = (int array * int) * 'a prec_declaration +type 'a pcofixpoint = int * 'a prec_declaration +type cast_kind = VMcast | DEFAULTcast +type constr = + Rel of int + | Var of identifier + | Meta of metavariable + | Evar of constr pexistential + | Sort of sorts + | Cast of constr * cast_kind * constr + | Prod of name * constr * constr + | Lambda of name * constr * constr + | LetIn of name * constr * constr * constr + | App of constr * constr array + | Const of constant + | Ind of inductive + | Construct of constructor + | Case of case_info * constr * constr * constr array + | Fix of constr pfixpoint + | CoFix of constr pcofixpoint +type existential = constr pexistential +type rec_declaration = constr prec_declaration +type fixpoint = constr pfixpoint +type cofixpoint = constr pcofixpoint +val strip_outer_cast : constr -> constr +val collapse_appl : constr -> constr +val decompose_app : constr -> constr * constr list +val applist : constr * constr list -> constr +val iter_constr_with_binders : + ('a -> 'a) -> ('a -> constr -> unit) -> 'a -> constr -> unit +exception LocalOccur +val closedn : int -> constr -> bool +val closed0 : constr -> bool +val noccurn : int -> constr -> bool +val noccur_between : int -> int -> constr -> bool +val noccur_with_meta : int -> int -> constr -> bool +val map_constr_with_binders : + ('a -> 'a) -> ('a -> constr -> constr) -> 'a -> constr -> constr +val exliftn : Esubst.lift -> constr -> constr +val liftn : int -> int -> constr -> constr +val lift : int -> constr -> constr +type info = Closed | Open | Unknown +type 'a substituend = { mutable sinfo : info; sit : 'a; } +val lift_substituend : int -> constr substituend -> constr +val make_substituend : 'a -> 'a substituend +val substn_many : constr substituend array -> int -> constr -> constr +val substnl : constr list -> int -> constr -> constr +val substl : constr list -> constr -> constr +val subst1 : constr -> constr -> constr + +type named_declaration = identifier * constr option * constr +type rel_declaration = name * constr option * constr +val map_named_declaration : + (constr -> constr) -> named_declaration -> named_declaration +val map_rel_declaration : + (constr -> constr) -> rel_declaration -> rel_declaration +val fold_named_declaration : + (constr -> 'a -> 'a) -> named_declaration -> 'a -> 'a +val fold_rel_declaration : + (constr -> 'a -> 'a) -> rel_declaration -> 'a -> 'a +type named_context = named_declaration list +val empty_named_context : named_context +val fold_named_context : + (named_declaration -> 'a -> 'a) -> named_context -> init:'a -> 'a +type section_context = named_context +type rel_context = rel_declaration list +val empty_rel_context : rel_context +val rel_context_length : rel_context -> int +val rel_context_nhyps : rel_context -> int +val fold_rel_context : + (rel_declaration -> 'a -> 'a) -> rel_context -> init:'a -> 'a +val map_context : (constr -> constr) -> named_context -> named_context +val map_rel_context : (constr -> constr) -> rel_context -> rel_context +val extended_rel_list : int -> rel_context -> constr list +val compose_lam : (name * constr) list -> constr -> constr +val decompose_lam : constr -> (name * constr) list * constr +val decompose_lam_n_assum : int -> constr -> rel_context * constr +val mkProd_or_LetIn : name * constr option * constr -> constr -> constr +val it_mkProd_or_LetIn : constr -> rel_context -> constr +val decompose_prod_assum : constr -> rel_context * constr +val decompose_prod_n_assum : int -> constr -> rel_context * constr + +type arity = rel_context * sorts +val mkArity : arity -> constr +val destArity : constr -> arity +val isArity : constr -> bool +val compare_constr : (constr -> constr -> bool) -> constr -> constr -> bool +val eq_constr : constr -> constr -> bool diff --git a/checker/type_errors.ml b/checker/type_errors.ml new file mode 100644 index 00000000..a96bba6a --- /dev/null +++ b/checker/type_errors.ml @@ -0,0 +1,115 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* int -> 'a + +val error_unbound_var : env -> variable -> 'a + +val error_not_type : env -> unsafe_judgment -> 'a + +val error_assumption : env -> unsafe_judgment -> 'a + +val error_reference_variables : env -> constr -> 'a + +val error_elim_arity : + env -> inductive -> sorts_family list -> constr -> unsafe_judgment -> + (sorts_family * sorts_family * arity_error) option -> 'a + +val error_case_not_inductive : env -> unsafe_judgment -> 'a + +val error_number_branches : env -> unsafe_judgment -> int -> 'a + +val error_ill_formed_branch : env -> constr -> int -> constr -> constr -> 'a + +val error_generalization : env -> name * constr -> unsafe_judgment -> 'a + +val error_actual_type : env -> unsafe_judgment -> constr -> 'a + +val error_cant_apply_not_functional : + env -> unsafe_judgment -> unsafe_judgment array -> 'a + +val error_cant_apply_bad_type : + env -> int * constr * constr -> + unsafe_judgment -> unsafe_judgment array -> 'a + +val error_ill_formed_rec_body : + env -> guard_error -> name array -> int -> 'a + +val error_ill_typed_rec_body : + env -> int -> name array -> unsafe_judgment array -> constr array -> 'a + diff --git a/checker/typeops.ml b/checker/typeops.ml new file mode 100644 index 00000000..1af8b2ce --- /dev/null +++ b/checker/typeops.ml @@ -0,0 +1,456 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* + (try conv_leq env t1 t2 + with NotConvertible -> raise (NotConvertibleVect i)); ()) + () + v1 + v2 + +(* This should be a type (a priori without intension to be an assumption) *) +let type_judgment env (c,ty as j) = + match whd_betadeltaiota env ty with + | Sort s -> (c,s) + | _ -> error_not_type env j + +(* This should be a type intended to be assumed. The error message is *) +(* not as useful as for [type_judgment]. *) +let assumption_of_judgment env j = + try fst(type_judgment env j) + with TypeError _ -> + error_assumption env j + +(************************************************) +(* Incremental typing rules: builds a typing judgement given the *) +(* judgements for the subterms. *) + +(*s Type of sorts *) + +(* Prop and Set *) + +let judge_of_prop = Sort (Type type1_univ) + +(* Type of Type(i). *) + +let judge_of_type u = Sort (Type (super u)) + +(*s Type of a de Bruijn index. *) + +let judge_of_relative env n = + try + let (_,_,typ) = lookup_rel n env in + lift n typ + with Not_found -> + error_unbound_rel env n + +(* Type of variables *) +let judge_of_variable env id = + try named_type id env + with Not_found -> + error_unbound_var env id + +(* Management of context of variables. *) + +(* Checks if a context of variable can be instantiated by the + variables of the current env *) +(* TODO: check order? *) +let rec check_hyps_inclusion env sign = + fold_named_context + (fun (id,_,ty1) () -> + let ty2 = named_type id env in + if not (eq_constr ty2 ty1) then + error "types do not match") + sign + ~init:() + + +let check_args env c hyps = + try check_hyps_inclusion env hyps + with UserError _ | Not_found -> + error_reference_variables env c + + +(* Checks if the given context of variables [hyps] is included in the + current context of [env]. *) +(* +let check_hyps id env hyps = + let hyps' = named_context env in + if not (hyps_inclusion env hyps hyps') then + error_reference_variables env id +*) +(* Instantiation of terms on real arguments. *) + +(* Make a type polymorphic if an arity *) + +let extract_level env p = + let _,c = dest_prod_assum env p in + match c with Sort (Type u) -> Some u | _ -> None + +let extract_context_levels env = + List.fold_left + (fun l (_,b,p) -> if b=None then extract_level env p::l else l) [] + +let make_polymorphic_if_arity env t = + let params, ccl = dest_prod_assum env t in + match ccl with + | Sort (Type u) -> + let param_ccls = extract_context_levels env params in + let s = { poly_param_levels = param_ccls; poly_level = u} in + PolymorphicArity (params,s) + | _ -> + NonPolymorphicType t + +(* Type of constants *) + +let type_of_constant_knowing_parameters env t paramtyps = + match t with + | NonPolymorphicType t -> t + | PolymorphicArity (sign,ar) -> + let ctx = List.rev sign in + let ctx,s = instantiate_universes env ctx ar paramtyps in + mkArity (List.rev ctx,s) + +let type_of_constant_type env t = + type_of_constant_knowing_parameters env t [||] + +let type_of_constant env cst = + type_of_constant_type env (constant_type env cst) + +let judge_of_constant_knowing_parameters env cst paramstyp = + let c = Const cst in + let cb = lookup_constant cst env in + let _ = check_args env c cb.const_hyps in + type_of_constant_knowing_parameters env cb.const_type paramstyp + +let judge_of_constant env cst = + judge_of_constant_knowing_parameters env cst [||] + +(* Type of an application. *) + +let judge_of_apply env (f,funj) argjv = + let rec apply_rec n typ = function + | [] -> typ + | (h,hj)::restjl -> + (match whd_betadeltaiota env typ with + | Prod (_,c1,c2) -> + (try conv_leq env hj c1 + with NotConvertible -> + error_cant_apply_bad_type env (n,c1, hj) (f,funj) argjv); + apply_rec (n+1) (subst1 h c2) restjl + | _ -> + error_cant_apply_not_functional env (f,funj) argjv) + in + apply_rec 1 funj (Array.to_list argjv) + +(* Type of product *) + +let sort_of_product env domsort rangsort = + match (domsort, rangsort) with + (* Product rule (s,Prop,Prop) *) + | (_, Prop Null) -> rangsort + (* Product rule (Prop/Set,Set,Set) *) + | (Prop _, Prop Pos) -> rangsort + (* Product rule (Type,Set,?) *) + | (Type u1, Prop Pos) -> + if engagement env = Some ImpredicativeSet then + (* Rule is (Type,Set,Set) in the Set-impredicative calculus *) + rangsort + else + (* Rule is (Type_i,Set,Type_i) in the Set-predicative calculus *) + Type (sup u1 type0_univ) + (* Product rule (Prop,Type_i,Type_i) *) + | (Prop Pos, Type u2) -> Type (sup type0_univ u2) + (* Product rule (Prop,Type_i,Type_i) *) + | (Prop Null, Type _) -> rangsort + (* Product rule (Type_i,Type_i,Type_i) *) + | (Type u1, Type u2) -> Type (sup u1 u2) + +(* Type of a type cast *) + +(* [judge_of_cast env (c,typ1) (typ2,s)] implements the rule + + env |- c:typ1 env |- typ2:s env |- typ1 <= typ2 + --------------------------------------------------------------------- + env |- c:typ2 +*) + +let judge_of_cast env (c,cj) k tj = + let conversion = + match k with + | VMcast -> vm_conv CUMUL + | DEFAULTcast -> conv_leq in + try + conversion env cj tj + with NotConvertible -> + error_actual_type env (c,cj) tj + +(* Inductive types. *) + +(* The type is parametric over the uniform parameters whose conclusion + is in Type; to enforce the internal constraints between the + parameters and the instances of Type occurring in the type of the + constructors, we use the level variables _statically_ assigned to + the conclusions of the parameters as mediators: e.g. if a parameter + has conclusion Type(alpha), static constraints of the form alpha<=v + exist between alpha and the Type's occurring in the constructor + types; when the parameters is finally instantiated by a term of + conclusion Type(u), then the constraints u<=alpha is computed in + the App case of execute; from this constraints, the expected + dynamic constraints of the form u<=v are enforced *) + +let judge_of_inductive_knowing_parameters env ind (paramstyp:constr array) = + let c = Ind ind in + let (mib,mip) = lookup_mind_specif env ind in + check_args env c mib.mind_hyps; + type_of_inductive_knowing_parameters env mip paramstyp + +let judge_of_inductive env ind = + judge_of_inductive_knowing_parameters env ind [||] + +(* Constructors. *) + +let judge_of_constructor env c = + let constr = Construct c in + let _ = + let ((kn,_),_) = c in + let mib = lookup_mind kn env in + check_args env constr mib.mind_hyps in + let specif = lookup_mind_specif env (inductive_of_constructor c) in + type_of_constructor c specif + +(* Case. *) + +let check_branch_types env (c,cj) (lfj,explft) = + try conv_leq_vecti env lfj explft + with + NotConvertibleVect i -> + error_ill_formed_branch env c i lfj.(i) explft.(i) + | Invalid_argument _ -> + error_number_branches env (c,cj) (Array.length explft) + +let judge_of_case env ci pj (c,cj) lfj = + let indspec = + try find_rectype env cj + with Not_found -> error_case_not_inductive env (c,cj) in + let _ = check_case_info env (fst indspec) ci in + let (bty,rslty) = type_case_branches env indspec pj c in + check_branch_types env (c,cj) (lfj,bty); + rslty + +(* Fixpoints. *) + +(* Checks the type of a general (co)fixpoint, i.e. without checking *) +(* the specific guard condition. *) + +let type_fixpoint env lna lar lbody vdefj = + let lt = Array.length vdefj in + assert (Array.length lar = lt && Array.length lbody = lt); + try + conv_leq_vecti env vdefj (Array.map (fun ty -> lift lt ty) lar) + with NotConvertibleVect i -> + let vdefj = array_map2 (fun b ty -> b,ty) lbody vdefj in + error_ill_typed_rec_body env i lna vdefj lar + +(************************************************************************) +(************************************************************************) + + +let refresh_arity env ar = + let ctxt, hd = decompose_prod_assum ar in + match hd with + Sort (Type u) when not (is_univ_variable u) -> + let u' = fresh_local_univ() in + let env' = add_constraints (enforce_geq u' u Constraint.empty) env in + env', mkArity (ctxt,Type u') + | _ -> env, ar + + +(* The typing machine. *) +let rec execute env cstr = + match cstr with + (* Atomic terms *) + | Sort (Prop _) -> judge_of_prop + + | Sort (Type u) -> judge_of_type u + + | Rel n -> judge_of_relative env n + + | Var id -> judge_of_variable env id + + | Const c -> judge_of_constant env c + + (* Lambda calculus operators *) + | App (App (f,args),args') -> + execute env (App(f,Array.append args args')) + + | App (f,args) -> + let jl = execute_array env args in + let j = + match f with + | Ind ind -> + (* Sort-polymorphism of inductive types *) + judge_of_inductive_knowing_parameters env ind jl + | Const cst -> + (* Sort-polymorphism of constant *) + judge_of_constant_knowing_parameters env cst jl + | _ -> + (* No sort-polymorphism *) + execute env f + in + let jl = array_map2 (fun c ty -> c,ty) args jl in + judge_of_apply env (f,j) jl + + | Lambda (name,c1,c2) -> + let _ = execute_type env c1 in + let env1 = push_rel (name,None,c1) env in + let j' = execute env1 c2 in + Prod(name,c1,j') + + | Prod (name,c1,c2) -> + let varj = execute_type env c1 in + let env1 = push_rel (name,None,c1) env in + let varj' = execute_type env1 c2 in + Sort (sort_of_product env varj varj') + + | LetIn (name,c1,c2,c3) -> + let j1 = execute env c1 in + (* /!\ c2 can be an inferred type => refresh + (but the pushed type is still c2) *) + let _ = + let env',c2' = refresh_arity env c2 in + let _ = execute_type env' c2' in + judge_of_cast env' (c1,j1) DEFAULTcast c2' in + let env1 = push_rel (name,Some c1,c2) env in + let j' = execute env1 c3 in + subst1 c1 j' + + | Cast (c,k,t) -> + let cj = execute env c in + let _ = execute_type env t in + judge_of_cast env (c,cj) k t; + t + + (* Inductive types *) + | Ind ind -> judge_of_inductive env ind + + | Construct c -> judge_of_constructor env c + + | Case (ci,p,c,lf) -> + let cj = execute env c in + let pj = execute env p in + let lfj = execute_array env lf in + judge_of_case env ci (p,pj) (c,cj) lfj + + | Fix ((_,i as vni),recdef) -> + let fix_ty = execute_recdef env recdef i in + let fix = (vni,recdef) in + check_fix env fix; + fix_ty + + | CoFix (i,recdef) -> + let fix_ty = execute_recdef env recdef i in + let cofix = (i,recdef) in + check_cofix env cofix; + fix_ty + + (* Partial proofs: unsupported by the kernel *) + | Meta _ -> + anomaly "the kernel does not support metavariables" + + | Evar _ -> + anomaly "the kernel does not support existential variables" + +and execute_type env constr = + let j = execute env constr in + snd (type_judgment env (constr,j)) + +and execute_recdef env (names,lar,vdef) i = + let larj = execute_array env lar in + let larj = array_map2 (fun c ty -> c,ty) lar larj in + let lara = Array.map (assumption_of_judgment env) larj in + let env1 = push_rec_types (names,lara,vdef) env in + let vdefj = execute_array env1 vdef in + type_fixpoint env1 names lara vdef vdefj; + lara.(i) + +and execute_array env = Array.map (execute env) + +and execute_list env = List.map (execute env) + +(* Derived functions *) +let infer env constr = execute env constr +let infer_type env constr = execute_type env constr +let infer_v env cv = execute_array env cv + +(* Typing of several terms. *) + +let check_ctxt env rels = + fold_rel_context (fun d env -> + match d with + (_,None,ty) -> + let _ = infer_type env ty in + push_rel d env + | (_,Some bd,ty) -> + let j1 = infer env bd in + let _ = infer env ty in + conv_leq env j1 ty; + push_rel d env) + rels ~init:env + +let check_named_ctxt env ctxt = + fold_named_context (fun (id,_,_ as d) env -> + let _ = + try + let _ = lookup_named id env in + failwith ("variable "^string_of_id id^" defined twice") + with Not_found -> () in + match d with + (_,None,ty) -> + let _ = infer_type env ty in + push_named d env + | (_,Some bd,ty) -> + let j1 = infer env bd in + let _ = infer env ty in + conv_leq env j1 ty; + push_named d env) + ctxt ~init:env + +(* Polymorphic arities utils *) + +let check_kind env ar u = + if snd (dest_prod env ar) = Sort(Type u) then () + else failwith "not the correct sort" + +let check_polymorphic_arity env params par = + let pl = par.poly_param_levels in + let rec check_p env pl params = + match pl, params with + Some u::pl, (na,None,ty)::params -> + check_kind env ty u; + check_p (push_rel (na,None,ty) env) pl params + | None::pl,d::params -> check_p (push_rel d env) pl params + | [], _ -> () + | _ -> failwith "check_poly: not the right number of params" in + check_p env pl (List.rev params) diff --git a/checker/typeops.mli b/checker/typeops.mli new file mode 100644 index 00000000..de160a79 --- /dev/null +++ b/checker/typeops.mli @@ -0,0 +1,28 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* constr -> constr +val infer_type : env -> constr -> sorts +val check_ctxt : env -> rel_context -> env +val check_named_ctxt : env -> named_context -> env +val check_polymorphic_arity : + env -> rel_context -> polymorphic_arity -> unit + +val type_of_constant_type : env -> constant_type -> constr + diff --git a/checker/validate.ml b/checker/validate.ml new file mode 100644 index 00000000..86e51b7b --- /dev/null +++ b/checker/validate.ml @@ -0,0 +1,265 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Obj.no_scan_tag then + if t = Obj.string_tag then + Format.print_string ("STR:"^Obj.magic o) + else + Format.print_string "?" + else + (let n = Obj.size o in + Format.print_string ("#"^string_of_int t^"("); + Format.open_hvbox 0; + for i = 0 to n-1 do + pr_obj_rec (Obj.field o i); + if i<>n-1 then (Format.print_string ","; Format.print_cut()) + done; + Format.close_box(); + Format.print_string ")") + else Format.print_string "?" + +let pr_obj o = pr_obj_rec o; Format.print_newline() + +(**************************************************************************) +(* Low-level validators *) + +(* data not validated *) +let no_val (o:Obj.t) = () + +(* Check that object o is a block with tag t *) +let val_tag t o = + if Obj.is_block o && Obj.tag o = t then () + else failwith ("tag "^string_of_int t) + +let val_obj s o = + if Obj.is_block o then + (if Obj.tag o > Obj.no_scan_tag then + failwith (s^". Not a normal tag")) + else failwith (s^". Not a block") + +(* Check that an object is a tuple (or a record). v is an array of + validation functions for each field. Its size corresponds to the + expected size of the object. *) +let val_tuple s v o = + let n = Array.length v in + val_obj ("tuple: "^s) o; + if Obj.size o = n then + Array.iteri (fun i f -> f (Obj.field o i)) v + else + (pr_obj o; + failwith + ("tuple:" ^s^" size found:"^string_of_int (Obj.size o))) + +(* Check that the object is either a constant constructor of tag < cc, + or a constructed variant. each element of vv is an array of + validation functions to be applied to the constructor arguments. + The size of vv corresponds to the number of non-constant + constructors, and the size of vv.(i) is the expected arity of the + i-th non-constant constructor. *) +let val_sum s cc vv o = + if Obj.is_block o then + (val_obj ("sum: "^s) o; + let n = Array.length vv in + let i = Obj.tag o in + if i < n then val_tuple (s^"("^string_of_int i^")") vv.(i) o + else failwith ("bad tag in sum ("^s^"): "^string_of_int i)) + else if Obj.is_int o then + let (n:int) = Obj.magic o in + (if n<0 || n>=cc then failwith ("bad constant constructor ("^s^")")) + else failwith ("not a sum ("^s^")") + +let val_enum s n = val_sum s n [||] + +(* Recursive types: avoid looping by eta-expansion *) +let rec val_rec_sum s cc f o = + val_sum s cc (f (val_rec_sum s cc f)) o + +(**************************************************************************) +(* Builtin types *) + +(* Check the o is an array of values satisfying f. *) +let val_array f o = + val_obj "array" o; + for i = 0 to Obj.size o - 1 do + (f (Obj.field o i):unit) + done + +(* Integer validator *) +let val_int o = + if not (Obj.is_int o) then failwith "expected an int" + +(* String validator *) +let val_str s = val_tag Obj.string_tag s + +(* Booleans *) +let val_bool = val_enum "bool" 2 + +(* Option type *) +let val_opt f = val_sum "option" 1 [|[|f|]|] + +(* Lists *) +let val_list f = + val_rec_sum "list" 1 (fun vlist -> [|[|f;vlist|]|]) + +(* Reference *) +let val_ref f = val_tuple "ref" [|f|] + +(**************************************************************************) +(* Standard library types *) + +(* Sets *) +let val_set f = + val_rec_sum "set" 1 (fun vset -> [|[|vset;f;vset;val_int|]|]) + +(* Maps *) +let rec val_map fk fv = + val_rec_sum "map" 1 (fun vmap -> [|[|vmap;fk;fv;vmap;val_int|]|]) + +(**************************************************************************) +(* Coq types *) + +let val_id = val_str + +let val_dp = val_list val_id + +let val_name = val_sum "name" 1 [|[|val_id|]|] + +let val_uid = val_tuple "uid" [|val_int;val_str;val_dp|] + +let val_mp = + val_rec_sum "mp" 0 + (fun vmp -> [|[|val_dp|];[|val_uid|];[|val_uid|];[|vmp;val_id|]|]) + +let val_kn = val_tuple "kn" [|val_mp;val_dp;val_id|] + +let val_ind = val_tuple "ind"[|val_kn;val_int|] +let val_cstr = val_tuple "cstr"[|val_ind;val_int|] + +let val_ci = + let val_cstyle = val_enum "case_style" 5 in + let val_cprint = val_tuple "case_printing" [|val_int;val_cstyle|] in + val_tuple "case_info" [|val_ind;val_int;val_array val_int;val_cprint|] + + +let val_level = val_sum "level" 1 [|[|val_dp;val_int|]|] +let val_univ = val_sum "univ" 0 + [|[|val_level|];[|val_list val_level;val_list val_level|]|] + +let val_cstrs = + val_set (val_tuple"univ_cstr"[|val_level;val_enum "order" 3;val_level|]) + +let val_cast = val_enum "cast_kind" 2 +let val_sort = val_sum "sort" 0 [|[|val_enum "cnt" 2|];[|val_univ|]|] +let val_sortfam = val_enum "sort_family" 3 + +let val_evar f = val_tuple "evar" [|val_int;val_array f|] + +let val_prec f = + val_tuple "prec"[|val_array val_name; val_array f; val_array f|] +let val_fix f = + val_tuple"fix1"[|val_tuple"fix2"[|val_array val_int;val_int|];val_prec f|] +let val_cofix f = val_tuple"cofix"[|val_int;val_prec f|] + + +let val_constr = val_rec_sum "constr" 0 (fun val_constr -> [| + [|val_int|]; (* Rel *) + [|val_id|]; (* Var *) + [|val_int|]; (* Meta *) + [|val_evar val_constr|]; (* Evar *) + [|val_sort|]; (* Sort *) + [|val_constr;val_cast;val_constr|]; (* Cast *) + [|val_name;val_constr;val_constr|]; (* Prod *) + [|val_name;val_constr;val_constr|]; (* Lambda *) + [|val_name;val_constr;val_constr;val_constr|]; (* LetIn *) + [|val_constr;val_array val_constr|]; (* App *) + [|val_kn|]; (* Const *) + [|val_ind|]; (* Ind *) + [|val_cstr|]; (* Construct *) + [|val_ci;val_constr;val_constr;val_array val_constr|]; (* Case *) + [|val_fix val_constr|]; (* Fix *) + [|val_cofix val_constr|] (* CoFix *) +|]) + + +let val_ndecl = val_tuple"ndecl"[|val_id;val_opt val_constr;val_constr|] +let val_rdecl = val_tuple"rdecl"[|val_name;val_opt val_constr;val_constr|] +let val_nctxt = val_list val_ndecl +let val_rctxt = val_list val_rdecl + +let val_arity = val_tuple"arity"[|val_rctxt;val_constr|] + +let val_eng = val_enum "eng" 1 + +let val_pol_arity = val_tuple"pol_arity"[|val_list(val_opt val_univ);val_univ|] +let val_cst_type = + val_sum "cst_type" 0 [|[|val_constr|];[|val_rctxt;val_pol_arity|]|] + +let val_subst_dom = + val_sum "subst_dom" 0 [|[|val_uid|];[|val_uid|];[|val_mp|]|] + + +let val_res = val_opt no_val + +let val_subst = + val_map val_subst_dom (val_tuple "subst range" [|val_mp;val_res|]) + +let val_cstr_subst = + val_ref (val_sum "cstr_subst" 0 [|[|val_constr|];[|val_subst;val_constr|]|]) + +let val_cb = val_tuple "cb" + [|val_nctxt;val_opt val_cstr_subst; val_cst_type;no_val;val_cstrs; + val_bool; val_bool |] + +let val_recarg = val_sum "recarg" 1 [|[|val_int|];[|val_ind|]|] + +let val_wfp = val_rec_sum "wf_paths" 0 + (fun val_wfp -> + [|[|val_int;val_int|];[|val_recarg;val_array val_wfp|]; + [|val_int;val_array val_wfp|]|]) + +let val_mono_ind_arity = val_tuple"mono_ind_arity"[|val_constr;val_sort|] +let val_ind_arity = val_sum "ind_arity" 0 + [|[|val_mono_ind_arity|];[|val_pol_arity|]|] + +let val_one_ind = val_tuple "one_ind" + [|val_id;val_rctxt;val_ind_arity;val_array val_id;val_array val_constr; + val_int; val_list val_sortfam;val_array val_constr;val_array val_int; + val_wfp; val_int; val_int; no_val|] + +let val_ind_pack = val_tuple "ind_pack" + [|val_array val_one_ind;val_bool;val_bool;val_int;val_nctxt; + val_int; val_int; val_rctxt;val_cstrs;val_opt val_kn|] + +let rec val_sfb o = val_sum "sfb" 0 + [|[|val_cb|];[|val_ind_pack|];[|val_mod|]; + [|val_mp;val_opt val_cstrs|];[|val_modty|]|] o +and val_sb o = val_list (val_tuple"sb"[|val_id;val_sfb|]) o +and val_seb o = val_sum "seb" 0 + [|[|val_mp|];[|val_uid;val_modty;val_seb|];[|val_uid;val_sb|]; + [|val_seb;val_seb;val_cstrs|];[|val_seb;val_with|]|] o +and val_with o = val_sum "with" 0 + [|[|val_list val_id;val_mp;val_cstrs|]; + [|val_list val_id;val_cb|]|] o +and val_mod o = val_tuple "module_body" + [|val_opt val_seb;val_opt val_seb;val_cstrs;val_subst;no_val|] o +and val_modty o = val_tuple "module_type_body" + [|val_seb;val_opt val_mp;val_subst|] o + +let val_deps = val_list (val_tuple"dep"[|val_dp;no_val|]) + +let val_vo = val_tuple "vo" [|val_dp;val_mod;val_deps;val_eng|] diff --git a/config/Makefile.template b/config/Makefile.template index 1e611356..e5061ebe 100644 --- a/config/Makefile.template +++ b/config/Makefile.template @@ -15,6 +15,9 @@ # ############################################################################# +#Variable used to detect whether ./configure has run successfully. +COQ_CONFIGURED=yes + # Local use (no installation) LOCAL=LOCALINSTALLATION @@ -27,6 +30,7 @@ LOCAL=LOCALINSTALLATION BINDIR="BINDIRDIRECTORY" COQLIB="COQLIBDIRECTORY" MANDIR="MANDIRDIRECTORY" +DOCDIR="DOCDIRDIRECTORY" EMACSLIB="EMACSLIBDIRECTORY" EMACS=EMACSCOMMAND @@ -52,6 +56,7 @@ MYCAMLP4LIB="CAMLP4LIBDIRECTORY" COQIDEINCLUDES=LABLGTKINCLUDES # Objective-Caml compile command +OCAML="OCAMLEXEC" OCAMLC="BYTECAMLC" OCAMLOPT="NATIVECAMLC" OCAMLDEP="OCAMLDEPEXEC" @@ -67,11 +72,9 @@ CAMLMKTOP="CAMLMKTOPEXEC" # Caml flags CAMLFLAGS=-rectypes CAMLANNOTATEFLAG -# Compilation debug flag +# Compilation debug flags CAMLDEBUG=COQDEBUGFLAG - -# Inlining flag (inlining causes problems with ocaml < 3.09.x) -INLINEFLAG=COQINLINEFLAG +CAMLDEBUGOPT=COQDEBUGFLAGOPT # User compilation flag USERFLAGS= @@ -133,6 +136,11 @@ HASCOQIDE=COQIDEOPT # Defining REVISION CHECKEDOUT=CHECKEDOUTSOURCETREE +# Defining options to generate dependencies graphs +DOT=dot +DOTOPTS=-Tps +ODOCDOTOPTS=-dot -dot-reduce + # make or sed are bogus and believe lines not terminating by a return # are inexistent diff --git a/config/coq_config.mli b/config/coq_config.mli index bf77f0f3..23d3efbd 100644 --- a/config/coq_config.mli +++ b/config/coq_config.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: coq_config.mli 10185 2007-10-06 18:05:13Z herbelin $ i*) +(*i $Id: coq_config.mli 10122 2007-09-15 10:35:59Z letouzey $ i*) val local : bool (* local use (no installation) *) diff --git a/configure b/configure index 2cfbf7c4..59cfcb9f 100755 --- a/configure +++ b/configure @@ -6,8 +6,8 @@ # ################################## -VERSION=8.1pl3 -DATE="Dec. 2007" +VERSION=8.2beta3 +DATE="Jun. 2008" # a local which command for sh which () { @@ -23,53 +23,54 @@ done } usage () { - echo -e "Available options for configure are:\n" + echo "Available options for configure are:\n" echo "-help" - echo -e "\tDisplays this help page\n" + printf "\tDisplays this help page\n" echo "-prefix

" - echo -e "\tSet installation directory to \n" + printf "\tSet installation directory to \n" echo "-local" - echo -e "\tSet installation directory to the current source tree\n" + printf "\tSet installation directory to the current source tree\n" echo "-src" - echo -e "\tSpecifies the source directory\n" + printf "\tSpecifies the source directory\n" echo "-bindir" echo "-libdir" echo "-mandir" - echo -e "\tSpecifies where to install bin/lib/man files resp.\n" + echo "-docdir" + printf "\tSpecifies where to install bin/lib/man/doc files resp.\n" echo "-emacslib" echo "-emacs" - echo -e "\tSpecifies where emacs files are to be installed\n" + printf "\tSpecifies where emacs files are to be installed\n" echo "-coqdocdir" - echo -e "\tSpecifies where Coqdoc style files are to be installed\n" + printf "\tSpecifies where Coqdoc style files are to be installed\n" echo "-camldir" - echo -e "\tSpecifies the path to the OCaml library\n" + printf "\tSpecifies the path to the OCaml library\n" echo "-lablgtkdir" - echo -e "\tSpecifies the path to the Lablgtk library\n" + printf "\tSpecifies the path to the Lablgtk library\n" echo "-camlp5dir" - echo -e "\tSpecifies where to look for the Camlp5 library and tells to use it\n" + printf "\tSpecifies where to look for the Camlp5 library and tells to use it\n" echo "-arch" - echo -e "\tSpecifies the architecture\n" + printf "\tSpecifies the architecture\n" echo "-opt" - echo -e "\tSpecifies whether or not to generate optimized executables\n" + printf "\tSpecifies whether or not to generate optimized executables\n" echo "-fsets (all|basic)" echo "-reals (all|basic)" - echo -e "Specifies whether or not to compile full FSets/Reals library\n" + printf "\tSpecifies whether or not to compile full FSets/Reals library\n" echo "-coqide (opt|byte|no)" - echo -e "\tSpecifies whether or not to compile Coqide\n" + printf "\tSpecifies whether or not to compile Coqide\n" echo "-with-geoproof (yes|no)" - echo -e "\tSpecifies whether or not to use Geoproof binding\n" + printf "\tSpecifies whether or not to use Geoproof binding\n" echo "-with-cc " echo "-with-ar " echo "-with-ranlib " - echo -e "\tTells configure where to find gcc/ar/ranlib executables\n" + printf "\tTells configure where to find gcc/ar/ranlib executables\n" echo "-byte-only" - echo -e "\tCompiles only bytecode version of Coq\n" + printf "\tCompiles only bytecode version of Coq\n" echo "-debug" - echo -e "\tAdd debugging information in the Coq executables\n" + printf "\tAdd debugging information in the Coq executables\n" echo "-profile" - echo -e "\tAdd profiling information in the Coq executables\n" + printf "\tAdd profiling information in the Coq executables\n" echo "-annotate" - echo -e "\tCompiles Coq with -dtypes option" + printf "\tCompiles Coq with -dtypes option\n" } @@ -86,9 +87,9 @@ camlp4oexec=camlp4o coq_debug_flag= +coq_debug_flag_opt= coq_profile_flag= coq_annotate_flag= -coq_inline_flag= best_compiler=opt cflags="-fno-defer-pop -Wall -Wno-unused" @@ -102,14 +103,13 @@ prefix_spec=no bindir_spec=no libdir_spec=no mandir_spec=no +docdir_spec=no emacslib_spec=no emacs_spec=no camldir_spec=no lablgtkdir_spec=no coqdocdir_spec=no -fsets_opt=no fsets=all -reals_opt=no reals=all arch_spec=no coqide_spec=no @@ -127,9 +127,7 @@ while : ; do -prefix|--prefix) prefix_spec=yes prefix="$2" shift;; - -local|--local) local=true - reals_opt=yes - reals=all;; + -local|--local) local=true;; -src|--src) src_spec=yes COQSRC="$2" shift;; @@ -142,6 +140,9 @@ while : ; do -mandir|--mandir) mandir_spec=yes mandir="$2" shift;; + -docdir|--docdir) docdir_spec=yes + docdir="$2" + shift;; -emacslib|--emacslib) emacslib_spec=yes emacslib="$2" shift;; @@ -166,14 +167,12 @@ while : ; do -opt|--opt) bytecamlc=ocamlc.opt camlp4oexec=camlp4o # can't add .opt since dyn load'll be required nativecamlc=ocamlopt.opt;; - -fsets|--fsets) fsets_opt=yes - case "$2" in + -fsets|--fsets) case "$2" in yes|all) fsets=all;; *) fsets=basic esac shift;; - -reals|--reals) reals_opt=yes - case "$2" in + -reals|--reals) case "$2" in yes|all) reals=all;; *) reals=basic esac @@ -229,27 +228,29 @@ esac # Architecture case $arch_spec in - no) if test -x /bin/arch ; then - ARCH=`/bin/arch` - elif test -x /usr/bin/arch ; then - ARCH=`/usr/bin/arch` - elif test -x /usr/ucb/arch ; then - ARCH=`/usr/ucb/arch` - elif test -x /bin/uname && (/bin/uname -s | grep -q -i CYGWIN) ; then - ARCH=win32 - # cygwin returns a name of the form /cygdrive/c/... - # that coqc does not understand; need to transform it - COQTOP=`echo $COQTOP | sed -e "s#.*cygdrive.\(.\)#\1:#"` - elif test -x /bin/uname ; then - ARCH=`/bin/uname -s` - elif test -x /usr/bin/uname ; then - ARCH=`/usr/bin/uname -s` + no) + # First we test if we are running a Cygwin system + if [ `uname -s | cut -c -6` = "CYGWIN" ] ; then + ARCH="win32" + else + # If not, we determine the architecture + if test -x /bin/arch ; then + ARCH=`/bin/arch` + elif test -x /usr/bin/arch ; then + ARCH=`/usr/bin/arch` + elif test -x /usr/ucb/arch ; then + ARCH=`/usr/ucb/arch` + elif test -x /bin/uname ; then + ARCH=`/bin/uname -s` + elif test -x /usr/bin/uname ; then + ARCH=`/usr/bin/uname -s` else echo "I can not automatically find the name of your architecture" echo -n\ - "Give me a name, please [win32 for Win95, Win98 or WinNT]: " + "Give me a name, please [win32 for Win95, Win98 or WinNT]: " read ARCH - fi;; + fi + fi;; yes) ARCH=$arch esac @@ -267,20 +268,59 @@ case $ARCH in # true -> strip : it exists under cygwin ! STRIPCOMMAND="strip";; *) - if [ "$coq_profile_flag" = "-p" ] ; then + if [ "$coq_profile_flag" = "-p" ] || [ "$coq_debug_flag" = "-g" ]; then STRIPCOMMAND="true" else STRIPCOMMAND="strip" fi esac -# Is the source tree checked out from svn ? +# Is the source tree checked out from a recognised +# version control system ? if test -e .svn/entries ; then - checkedout=1 -else + checkedout=svn +elif [ -d '{arch}' ]; then + checkedout=gnuarch +elif [ -z "${GIT_DIR}" ] && [ -d .git ] || [ -d "${GIT_DIR}" ]; then + checkedout=git +else checkedout=0 fi +# make command + +MAKE=`which make` +if [ "$MAKE" != "" ]; then + MAKEVERSION=`$MAKE -v | head -1` + case $MAKEVERSION in + "GNU Make 3.81") + echo "You have GNU Make 3.81. Good!";; + *) + OK="no" + if [ -x ./make ]; then + MAKEVERSION=`./make -v | head -1` + if [ "$MAKEVERSION" == "GNU Make 3.81" ]; then OK="yes"; fi + fi + if [ $OK = "no" ]; then + echo "GNU Make >= 3.81 is needed" + echo "Make 3.81 can be downloaded from ftp://ftp.gnu.org/gnu/make/make-3.81.tar.gz" + echo "then locally installed on a Unix-style system by issuing:" + echo " tar xzvf make-3.81.tar.gz" + echo " cd make-3.81" + echo " ./configure" + echo " make" + echo " mv make .." + echo " cd .." + echo "Restart then the configure script and later use ./make instead of make" + exit 1 + else + echo "You have locally installed GNU Make 3.81. Good!" + fi + esac +else + echo "Cannot find GNU Make 3.81" +fi + ######################################### # Objective Caml programs @@ -340,12 +380,7 @@ case $CAMLVERSION in fi echo "Configuration script failed!" exit 1;; - 3.07*) - cflags="$cflags -DOCAML_307" - coq_inline_flag="-inline 0" - echo "You have Objective-Caml $CAMLVERSION. Good!";; - 3.08*) - coq_inline_flag="-inline 0" + 3.07*|3.08*) echo "You have Objective-Caml $CAMLVERSION. Good!";; ?*) CAMLP4COMPAT="-loc loc" @@ -359,29 +394,6 @@ esac CAMLTAG=OCAML`echo $CAMLVERSION | sed -e "s/\([1-9]\)\.\([0-9]*\).*/\1\2/g"` -# do we have a native compiler: test of ocamlopt and its version - -if [ "$best_compiler" = "opt" ] ; then - if test -e `which "$nativecamlc"` ; then - CAMLOPTVERSION=`"$nativecamlc" -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` - if [ "`uname -s`" = "Darwin" -a "$ARCH" = "i386" ]; then - case $CAMLOPTVERSION in - 3.09.3|3.1?*) ;; - *) echo "Native compilation on MacOS X Pentium requires Objective-Caml >= 3.09.3," - best_compiler=byte - echo "only the bytecode version of Coq will be available." - esac - elif [ "$CAMLOPTVERSION" != "$CAMLVERSION" ] ; then - echo "Native and bytecode compilers do not have the same version!"; - fi - echo "You have native-code compilation. Good!" - else - best_compiler=byte - echo "You have only bytecode compilation." - fi -fi - - # For coqmktop & bytecode compiler case $ARCH in @@ -389,16 +401,35 @@ case $ARCH in CAMLLIB=`"$CAMLC" -where | sed -e 's/^\(.*\)$/\1/'` ;; *) CAMLLIB=`"$CAMLC" -where` - esac - +esac + +# We need to set va special flag for OCaml 3.07 +case $CAMLVERSION in + 3.07*) + cflags="$cflags -DOCAML_307";; +esac + +if [ "$CAMLTAG" = "OCAML310" ] && [ "$coq_debug_flag" = "-g" ]; then + # Compilation debug flag + coq_debug_flag_opt="-g" +fi # Camlp4 / Camlp5 configuration -# Very basic for the moment: if camlp5 exists, we use it... if [ "$camlp5dir" != "" ]; then CAMLP4=camlp5 CAMLP4LIB=$camlp5dir + if [ ! -f $camlp5dir/camlp5.cma ]; then + echo "Cannot find camlp5 libraries in $camlp5dir (camlp5.cma not found)" + echo "Configuration script failed!" + exit 1 + fi camlp4oexec=`echo $camlp4oexec | sed -e 's/4/5/'` + if [ `$camlp4oexec -pmode 2>&1` = "strict" ]; then + echo "Error: Camlp5 found, but in strict mode!" + echo "Please compile Camlp5 in transitional mode." + exit 1 + fi elif [ "$CAMLTAG" = "OCAML310" ]; then if [ -x "${CAMLLIB}/camlp5" ]; then CAMLP4LIB=+camlp5 @@ -411,6 +442,11 @@ elif [ "$CAMLTAG" = "OCAML310" ]; then fi CAMLP4=camlp5 camlp4oexec=`echo $camlp4oexec | sed -e 's/4/5/'` + if [ `$camlp4oexec -pmode 2>&1` = "strict" ]; then + echo "Error: Camlp5 found, but in strict mode!" + echo "Please compile Camlp5 in transitional mode." + exit 1 + fi else CAMLP4=camlp4 CAMLP4LIB=+camlp4 @@ -432,6 +468,33 @@ esac # (this should become configurable some day) CAMLP4BIN=${CAMLBIN} +# do we have a native compiler: test of ocamlopt and its version + +if [ "$best_compiler" = "opt" ] ; then + if test -e "$nativecamlc" || test -e "`which $nativecamlc`"; then + CAMLOPTVERSION=`"$nativecamlc" -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` + if [ "`uname -s`" = "Darwin" -a "$ARCH" = "i386" ]; then + case $CAMLOPTVERSION in + 3.09.3|3.1?*) ;; + *) echo "Native compilation on MacOS X Pentium requires Objective-Caml >= 3.09.3," + best_compiler=byte + echo "only the bytecode version of Coq will be available." + esac + elif [ ! -f $FULLCAMLP4LIB/gramlib.cmxa ]; then + best_compiler=byte + echo "Cannot find native-code $CAMLP4," + echo "only the bytecode version of Coq will be available." + else + if [ "$CAMLOPTVERSION" != "$CAMLVERSION" ] ; then + echo "Native and bytecode compilers do not have the same version!" + fi + echo "You have native-code compilation. Good!" + fi + else + best_compiler=byte + echo "You have only bytecode compilation." + fi +fi # OS dependent libraries @@ -518,7 +581,7 @@ case $ARCH in # true -> strip : it exists under cygwin ! STRIPCOMMAND="strip";; *) - if [ "$coq_profile_flag" = "-p" ] ; then + if [ "$coq_profile_flag" = "-p" ] || [ "$coq_debug_flag" = "-g" ]; then STRIPCOMMAND="true" else STRIPCOMMAND="strip" @@ -532,7 +595,7 @@ esac #esac ########################################### -# bindir, libdir, mandir, etc. +# bindir, libdir, mandir, docdir, etc. case $src_spec in no) COQTOP=${COQSRC} @@ -548,14 +611,16 @@ case $ARCH in bindir_def='C:\coq\bin' libdir_def='C:\coq\lib' mandir_def='C:\coq\man' + docdir_def='C:\coq\doc' emacslib_def='C:\coq\emacs' coqdocdir_def='C:\coq\latex';; *) bindir_def=/usr/local/bin libdir_def=/usr/local/lib/coq mandir_def=/usr/local/man - emacslib_def=/usr/share/emacs/site-lisp - coqdocdir_def=/usr/share/texmf/tex/latex/misc;; + docdir_def=/usr/local/share/doc + emacslib_def=/usr/local/share/emacs/site-lisp + coqdocdir_def=/usr/local/share/texmf/tex/latex/misc;; esac emacs_def=emacs @@ -600,6 +665,18 @@ case $mandir_spec/$prefix_spec/$local in esac;; esac +case $docdir_spec/$prefix_spec/$local in + yes/*/*) DOCDIR=$docdir;; + */yes/*) DOCDIR=$prefix/share/doc ;; + */*/true) DOCDIR=$COQTOP/man ;; + *) echo "Where should I install the Coq documentation [$docdir_def] ?" + read DOCDIR + case $DOCDIR in + "") DOCDIR=$docdir_def;; + *) true;; + esac;; +esac + case $emacslib_spec/$prefix_spec/$local in yes/*/*) EMACSLIB=$emacslib;; */yes/*) @@ -632,18 +709,6 @@ case $coqdocdir_spec/$prefix_spec/$local in esac;; esac -case $reals_opt in - no) echo "Should I compile the complete theory of real analysis [Y/N, default is Y] ?" - read reals_ans - - case $reals_ans in - "N"|"n"|"No"|"NO"|"no") - reals=basic;; - *) reals=all;; - esac;; - yes) true;; -esac - # case $emacs_spec in # no) echo "Which Emacs command should I use to compile coq.el [$emacs_def] ?" # read EMACS @@ -686,10 +751,11 @@ echo " CoqIde : $COQIDE" echo "" echo " Paths for true installation:" -echo " binaries will be copied in $BINDIR" -echo " library will be copied in $LIBDIR" -echo " man pages will be copied in $MANDIR" -echo " emacs mode will be copied in $EMACSLIB" +echo " binaries will be copied in $BINDIR" +echo " library will be copied in $LIBDIR" +echo " man pages will be copied in $MANDIR" +echo " documentation will be copied in $MANDIR" +echo " emacs mode will be copied in $EMACSLIB" echo "" ##################################################### @@ -712,6 +778,7 @@ case $ARCH in ESCCAMLDIR=`echo $CAMLBIN |sed -e 's|\\\|\\\\\\\|g'` ESCCAMLLIB=`echo $CAMLLIB |sed -e 's|\\\|\\\\\\\|g'` ESCMANDIR=`echo $MANDIR |sed -e 's|\\\|\\\\\\\|g'` + ESCDOCDIR=`echo $DOCDIR |sed -e 's|\\\|\\\\\\\|g'` ESCEMACSLIB=`echo $EMACSLIB |sed -e 's|\\\|\\\\\\\|g'` ESCCOQDOCDIR=`echo $COQDOCDIR |sed -e 's|\\\|\\\\\\\|g'` ESCCAMLP4BIN=`echo $CAMLP4BIN |sed -e 's|\\\|\\\\\\\|g'` @@ -725,6 +792,7 @@ case $ARCH in ESCCAMLDIR="$CAMLBIN" ESCCAMLLIB="$CAMLLIB" ESCMANDIR="$MANDIR" + ESCDOCDIR="$DOCDIR" ESCEMACSLIB="$EMACSLIB" ESCCOQDOCDIR="$COQDOCDIR" ESCCAMLP4BIN="$CAMLP4BIN" @@ -763,7 +831,7 @@ PRINTF=`which printf` # Subdirectories of theories/ added in coq_config.ml subdirs () { - (cd $1; find * -type d ! -name .svn -exec $PRINTF "\"%s\";\n" {} \; | grep -v extraction/test | grep -v correctness >> "$mlconfig_file") + (cd $1; find * \( -name .svn -prune \) -o \( -type d -exec $PRINTF "\"%s\";\n" {} \; \) | grep -v correctness >> "$mlconfig_file") } echo "let theories_dirs = [" >> "$mlconfig_file" @@ -789,6 +857,7 @@ sed -e "s|LOCALINSTALLATION|$local|" \ -e "s|BINDIRDIRECTORY|$ESCBINDIR|" \ -e "s|COQLIBDIRECTORY|$ESCLIBDIR|" \ -e "s|MANDIRDIRECTORY|$ESCMANDIR|" \ + -e "s|DOCDIRDIRECTORY|$ESCDOCDIR|" \ -e "s|EMACSLIBDIRECTORY|$ESCEMACSLIB|" \ -e "s|EMACSCOMMAND|$EMACS|" \ -e "s|COQDOCDIRECTORY|$ESCCOQDOCDIR|" \ @@ -803,15 +872,16 @@ sed -e "s|LOCALINSTALLATION|$local|" \ -e "s|CAMLP4TOOL|$camlp4oexec|" \ -e "s|CAMLP4COMPATFLAGS|$CAMLP4COMPAT|" \ -e "s|LABLGTKINCLUDES|$ESCLABLGTKINCLUDES|" \ + -e "s|COQDEBUGFLAGOPT|$coq_debug_flag_opt|" \ -e "s|COQDEBUGFLAG|$coq_debug_flag|" \ -e "s|COQPROFILEFLAG|$coq_profile_flag|" \ - -e "s|COQINLINEFLAG|$coq_inline_flag|" \ -e "s|CAMLANNOTATEFLAG|$coq_annotate_flag|" \ -e "s|CCOMPILEFLAGS|$cflags|" \ -e "s|BESTCOMPILER|$best_compiler|" \ -e "s|EXECUTEEXTENSION|$EXE|" \ -e "s|BYTECAMLC|$bytecamlc|" \ -e "s|NATIVECAMLC|$nativecamlc|" \ + -e "s|OCAMLEXEC|$ocamlexec|" \ -e "s|OCAMLDEPEXEC|$ocamldepexec|" \ -e "s|OCAMLDOCEXEC|$ocamldocexec|" \ -e "s|OCAMLLEXEXEC|$ocamllexexec|" \ @@ -866,4 +936,4 @@ echo echo "*Warning* To compile the system for a new architecture" echo " don't forget to do a 'make archclean' before './configure'." -# $Id: configure 10375 2007-12-13 15:02:01Z notin $ +# $Id: configure 11181 2008-06-27 07:35:45Z notin $ diff --git a/contrib/cc/ccalgo.ml b/contrib/cc/ccalgo.ml index 8bdae54b..e67797e4 100644 --- a/contrib/cc/ccalgo.ml +++ b/contrib/cc/ccalgo.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: ccalgo.ml 9151 2006-09-19 13:32:22Z corbinea $ *) +(* $Id: ccalgo.ml 10579 2008-02-21 13:54:00Z corbinea $ *) (* This file implements the basic congruence-closure algorithm by *) (* Downey,Sethi and Tarjan. *) @@ -16,13 +16,16 @@ open Pp open Goptions open Names open Term +open Tacmach +open Evd +open Proof_type let init_size=5 let cc_verbose=ref false -let debug msg (stdpp:std_ppcmds) = - if !cc_verbose then msg stdpp +let debug f x = + if !cc_verbose then f x let _= let gdopt= @@ -97,7 +100,8 @@ type cinfo= type term= Symb of constr - | Eps + | Product of sorts_family * sorts_family + | Eps of identifier | Appli of term*term | Constructor of cinfo (* constructor arity + nhyps *) @@ -122,14 +126,19 @@ type equality = rule eq type disequality = from eq +type patt_kind = + Normal + | Trivial of types + | Creates_variables + type quant_eq = {qe_hyp_id: identifier; qe_pol: bool; qe_nvars:int; qe_lhs: ccpattern; - qe_lhs_valid:bool; + qe_lhs_valid:patt_kind; qe_rhs: ccpattern; - qe_rhs_valid:bool} + qe_rhs_valid:patt_kind} let swap eq : equality = let swap_rule=match eq.rule with @@ -145,10 +154,11 @@ type inductive_status = | Total of (int * pa_constructor) type representative= - {mutable nfathers:int; + {mutable weight:int; mutable lfathers:Intset.t; mutable fathers:Intset.t; mutable inductive_status: inductive_status; + class_type : Term.types; mutable functions: Intset.t PafMap.t; mutable constructors: int PacMap.t} (*pac -> term = app(constr,t) *) @@ -179,9 +189,11 @@ type state = mutable diseq: disequality list; mutable quant: quant_eq list; mutable pa_classes: Intset.t; - q_history: (constr,unit) Hashtbl.t; + q_history: (identifier,int array) Hashtbl.t; mutable rew_depth:int; - mutable changed:bool} + mutable changed:bool; + by_type: (types,Intset.t) Hashtbl.t; + mutable gls:Proof_type.goal Tacmach.sigma} let dummy_node = {clas=Eqto(min_int,{lhs=min_int;rhs=min_int;rule=Congruence}); @@ -189,7 +201,7 @@ let dummy_node = vertex=Leaf; term=Symb (mkRel min_int)} -let empty depth:state = +let empty depth gls:state = {uf= {max_size=init_size; size=0; @@ -206,7 +218,9 @@ let empty depth:state = pa_classes=Intset.empty; q_history=Hashtbl.create init_size; rew_depth=depth; - changed=false} + by_type=Hashtbl.create init_size; + changed=false; + gls=gls} let forest state = state.uf @@ -233,7 +247,7 @@ let get_constructor_info uf i= | _ -> anomaly "get_constructor: not a constructor" let size uf i= - (get_representative uf i).nfathers + (get_representative uf i).weight let axioms uf = uf.axioms @@ -241,13 +255,13 @@ let epsilons uf = uf.epsilons let add_lfather uf i t= let r=get_representative uf i in - r.nfathers<-r.nfathers+1; + r.weight<-r.weight+1; r.lfathers<-Intset.add t r.lfathers; r.fathers <-Intset.add t r.fathers let add_rfather uf i t= let r=get_representative uf i in - r.nfathers<-r.nfathers+1; + r.weight<-r.weight+1; r.fathers <-Intset.add t r.fathers exception Discriminable of int * pa_constructor * int * pa_constructor @@ -295,19 +309,29 @@ let next uf= uf.size<-nsize; size -let new_representative ()= - {nfathers=0; +let new_representative typ = + {weight=0; lfathers=Intset.empty; fathers=Intset.empty; inductive_status=Unknown; + class_type=typ; functions=PafMap.empty; constructors=PacMap.empty} (* rebuild a constr from an applicative term *) +let _A_ = Name (id_of_string "A") +let _B_ = Name (id_of_string "A") +let _body_ = mkProd(Anonymous,mkRel 2,mkRel 2) + +let cc_product s1 s2 = + mkLambda(_A_,mkSort(Termops.new_sort_in_family s1), + mkLambda(_B_,mkSort(Termops.new_sort_in_family s2),_body_)) + let rec constr_of_term = function Symb s->s - | Eps -> anomaly "epsilon constant has no value" + | Product(s1,s2) -> cc_product s1 s2 + | Eps id -> mkVar id | Constructor cinfo -> mkConstruct cinfo.ci_constr | Appli (s1,s2)-> make_app [(constr_of_term s2)] s1 @@ -330,24 +354,31 @@ let rec inst_pattern subst = function (fun spat f -> Appli (f,inst_pattern subst spat)) args t +let pr_idx_term state i = str "[" ++ int i ++ str ":=" ++ + Termops.print_constr (constr_of_term (term state.uf i)) ++ str "]" + +let pr_term t = str "[" ++ + Termops.print_constr (constr_of_term t) ++ str "]" + let rec add_term state t= let uf=state.uf in try Hashtbl.find uf.syms t with Not_found -> let b=next uf in + let typ = pf_type_of state.gls (constr_of_term t) in let new_node= match t with - Symb _ -> + Symb _ | Product (_,_) -> let paf = {fsym=b; fnargs=0} in Queue.add (b,Fmark paf) state.marks; - {clas= Rep (new_representative ()); + {clas= Rep (new_representative typ); cpath= -1; vertex= Leaf; term= t} - | Eps -> - {clas= Rep (new_representative ()); + | Eps id -> + {clas= Rep (new_representative typ); cpath= -1; vertex= Leaf; term= t} @@ -356,7 +387,7 @@ let rec add_term state t= add_lfather uf (find uf i1) b; add_rfather uf (find uf i2) b; state.terms<-Intset.add b state.terms; - {clas= Rep (new_representative ()); + {clas= Rep (new_representative typ); cpath= -1; vertex= Node(i1,i2); term= t} @@ -370,13 +401,17 @@ let rec add_term state t= arity= cinfo.ci_arity; args=[]} in Queue.add (b,Cmark pac) state.marks; - {clas=Rep (new_representative ()); + {clas=Rep (new_representative typ); cpath= -1; vertex=Leaf; term=t} in uf.map.(b)<-new_node; Hashtbl.add uf.syms t b; + Hashtbl.replace state.by_type typ + (Intset.add b + (try Hashtbl.find state.by_type typ with + Not_found -> Intset.empty)); b let add_equality state c s t= @@ -400,32 +435,53 @@ let add_quant state id pol (nvars,valid1,patt1,valid2,patt2) = qe_rhs= patt2; qe_rhs_valid=valid2}::state.quant +let is_redundant state id args = + try + let norm_args = Array.map (find state.uf) args in + let prev_args = Hashtbl.find_all state.q_history id in + List.exists + (fun old_args -> + Util.array_for_all2 (fun i j -> i = find state.uf j) + norm_args old_args) + prev_args + with Not_found -> false + let add_inst state (inst,int_subst) = - if state.rew_depth > 0 then - let subst = build_subst (forest state) int_subst in - let prfhead= mkVar inst.qe_hyp_id in - let args = Array.map constr_of_term subst in - let _ = array_rev args in (* highest deBruijn index first *) - let prf= mkApp(prfhead,args) in - try Hashtbl.find state.q_history prf - with Not_found -> - (* this instance is new, we can go on *) - let s = inst_pattern subst inst.qe_lhs - and t = inst_pattern subst inst.qe_rhs in - state.changed<-true; - state.rew_depth<-pred state.rew_depth; - if inst.qe_pol then - begin - debug msgnl - (str "adding new equality, depth="++ int state.rew_depth); - add_equality state prf s t - end - else - begin - debug msgnl (str "adding new disequality, depth="++ - int state.rew_depth); - add_disequality state (Hyp prf) s t - end + check_for_interrupt (); + if state.rew_depth > 0 then + if is_redundant state inst.qe_hyp_id int_subst then + debug msgnl (str "discarding redundant (dis)equality") + else + begin + Hashtbl.add state.q_history inst.qe_hyp_id int_subst; + let subst = build_subst (forest state) int_subst in + let prfhead= mkVar inst.qe_hyp_id in + let args = Array.map constr_of_term subst in + let _ = array_rev args in (* highest deBruijn index first *) + let prf= mkApp(prfhead,args) in + let s = inst_pattern subst inst.qe_lhs + and t = inst_pattern subst inst.qe_rhs in + state.changed<-true; + state.rew_depth<-pred state.rew_depth; + if inst.qe_pol then + begin + debug (fun () -> + msgnl + (str "Adding new equality, depth="++ int state.rew_depth); + msgnl (str " [" ++ Termops.print_constr prf ++ str " : " ++ + pr_term s ++ str " == " ++ pr_term t ++ str "]")) (); + add_equality state prf s t + end + else + begin + debug (fun () -> + msgnl + (str "Adding new disequality, depth="++ int state.rew_depth); + msgnl (str " [" ++ Termops.print_constr prf ++ str " : " ++ + pr_term s ++ str " <> " ++ pr_term t ++ str "]")) (); + add_disequality state (Hyp prf) s t + end + end let link uf i j eq = (* links i -> j *) let node=uf.map.(i) in @@ -448,12 +504,17 @@ let join_path uf i j= min_path (down_path uf i [],down_path uf j []) let union state i1 i2 eq= - debug msgnl (str "Linking " ++ int i1 ++ str " and " ++ int i2 ++ str "."); + debug (fun () -> msgnl (str "Linking " ++ pr_idx_term state i1 ++ + str " and " ++ pr_idx_term state i2 ++ str ".")) (); let r1= get_representative state.uf i1 and r2= get_representative state.uf i2 in link state.uf i1 i2 eq; + Hashtbl.replace state.by_type r1.class_type + (Intset.remove i1 + (try Hashtbl.find state.by_type r1.class_type with + Not_found -> Intset.empty)); let f= Intset.union r1.fathers r2.fathers in - r2.nfathers<-Intset.cardinal f; + r2.weight<-Intset.cardinal f; r2.fathers<-f; r2.lfathers<-Intset.union r1.lfathers r2.lfathers; ST.delete_set state.sigtable r1.fathers; @@ -483,8 +544,9 @@ let union state i1 i2 eq= | _,_ -> () let merge eq state = (* merge and no-merge *) - debug msgnl - (str "Merging " ++ int eq.lhs ++ str " and " ++ int eq.rhs ++ str "."); + debug (fun () -> msgnl + (str "Merging " ++ pr_idx_term state eq.lhs ++ + str " and " ++ pr_idx_term state eq.rhs ++ str ".")) (); let uf=state.uf in let i=find uf eq.lhs and j=find uf eq.rhs in @@ -495,8 +557,8 @@ let merge eq state = (* merge and no-merge *) union state j i (swap eq) let update t state = (* update 1 and 2 *) - debug msgnl - (str "Updating term " ++ int t ++ str "."); + debug (fun () -> msgnl + (str "Updating term " ++ pr_idx_term state t ++ str ".")) (); let (i,j) as sign = signature state.uf t in let (u,v) = subterms state.uf t in let rep = get_representative state.uf i in @@ -556,8 +618,8 @@ let process_constructor_mark t i rep pac state = end let process_mark t m state = - debug msgnl - (str "Processing mark for term " ++ int t ++ str "."); + debug (fun () -> msgnl + (str "Processing mark for term " ++ pr_idx_term state t ++ str ".")) (); let i=find state.uf t in let rep=get_representative state.uf i in match m with @@ -573,9 +635,9 @@ let check_disequalities state = let uf=state.uf in let rec check_aux = function dis::q -> - debug msg - (str "Checking if " ++ int dis.lhs ++ str " = " ++ - int dis.rhs ++ str " ... "); + debug (fun () -> msg + (str "Checking if " ++ pr_idx_term state dis.lhs ++ str " = " ++ + pr_idx_term state dis.rhs ++ str " ... ")) (); if find uf dis.lhs=find uf dis.rhs then begin debug msgnl (str "Yes");Some dis end else @@ -601,16 +663,35 @@ let one_step state = update t state; true with Not_found -> false - + +let __eps__ = id_of_string "_eps_" + +let new_state_var typ state = + let id = pf_get_new_id __eps__ state.gls in + state.gls<- + {state.gls with it = + {state.gls.it with evar_hyps = + Environ.push_named_context_val (id,None,typ) + state.gls.it.evar_hyps}}; + id let complete_one_class state i= match (get_representative state.uf i).inductive_status with Partial pac -> - let rec app t n = + let rec app t typ n = if n<=0 then t else - app (Appli(t,Eps)) (n-1) in + let _,etyp,rest= destProd typ in + let id = new_state_var etyp state in + app (Appli(t,Eps id)) (substl [mkVar id] rest) (n-1) in + let _c = pf_type_of state.gls + (constr_of_term (term state.uf pac.cnode)) in + let _args = + List.map (fun i -> constr_of_term (term state.uf i)) + pac.args in + let typ = prod_applist _c (List.rev _args) in + let ct = app (term state.uf i) typ pac.arity in state.uf.epsilons <- pac :: state.uf.epsilons; - ignore (add_term state (app (term state.uf i) pac.arity)) + ignore (add_term state ct) | _ -> anomaly "wrong incomplete class" let complete state = @@ -624,18 +705,18 @@ type matching_problem = let make_fun_table state = let uf= state.uf in let funtab=ref PafMap.empty in - for cl=0 to pred uf.size do - match uf.map.(cl).clas with - Rep rep -> - PafMap.iter - (fun paf _ -> - let elem = - try PafMap.find paf !funtab - with Not_found -> Intset.empty in - funtab:= PafMap.add paf (Intset.add cl elem) !funtab) - rep.functions - | _ -> () - done; + Array.iteri + (fun i inode -> if i < uf.size then + match inode.clas with + Rep rep -> + PafMap.iter + (fun paf _ -> + let elem = + try PafMap.find paf !funtab + with Not_found -> Intset.empty in + funtab:= PafMap.add paf (Intset.add i elem) !funtab) + rep.functions + | _ -> ()) state.uf.map; !funtab @@ -656,6 +737,7 @@ let rec do_match state res pb_stack = else if mp.mp_subst.(pred i) = cl then Stack.push {mp with mp_stack=remains} pb_stack + else (* mismatch for non-linear variable in pattern *) () | PApp (f,[]) -> begin try let j=Hashtbl.find uf.syms f in @@ -665,19 +747,19 @@ let rec do_match state res pb_stack = end | PApp(f, ((last_arg::rem_args) as args)) -> try - let j=Hashtbl.find uf.syms f in + let j=Hashtbl.find uf.syms f in let paf={fsym=j;fnargs=List.length args} in let rep=get_representative uf cl in let good_terms = PafMap.find paf rep.functions in let aux i = - let (s,t) = ST.rev_query i state.sigtable in + let (s,t) = signature state.uf i in Stack.push {mp with mp_subst=Array.copy mp.mp_subst; mp_stack= (PApp(f,rem_args),s) :: (last_arg,t) :: remains} pb_stack in - Intset.iter aux good_terms + Intset.iter aux good_terms with Not_found -> () let paf_of_patt syms = function @@ -692,28 +774,50 @@ let init_pb_stack state = let funtab = make_fun_table state in let aux inst = begin - if inst.qe_lhs_valid then - try - let paf= paf_of_patt syms inst.qe_lhs in - let good_classes = PafMap.find paf funtab in - Intset.iter (fun i -> - Stack.push - {mp_subst = Array.make inst.qe_nvars (-1); - mp_inst=inst; - mp_stack=[inst.qe_lhs,i]} pb_stack) good_classes - with Not_found -> () + let good_classes = + match inst.qe_lhs_valid with + Creates_variables -> Intset.empty + | Normal -> + begin + try + let paf= paf_of_patt syms inst.qe_lhs in + PafMap.find paf funtab + with Not_found -> Intset.empty + end + | Trivial typ -> + begin + try + Hashtbl.find state.by_type typ + with Not_found -> Intset.empty + end in + Intset.iter (fun i -> + Stack.push + {mp_subst = Array.make inst.qe_nvars (-1); + mp_inst=inst; + mp_stack=[inst.qe_lhs,i]} pb_stack) good_classes end; begin - if inst.qe_rhs_valid then - try - let paf= paf_of_patt syms inst.qe_rhs in - let good_classes = PafMap.find paf funtab in - Intset.iter (fun i -> - Stack.push - {mp_subst = Array.make inst.qe_nvars (-1); - mp_inst=inst; - mp_stack=[inst.qe_rhs,i]} pb_stack) good_classes - with Not_found -> () + let good_classes = + match inst.qe_rhs_valid with + Creates_variables -> Intset.empty + | Normal -> + begin + try + let paf= paf_of_patt syms inst.qe_rhs in + PafMap.find paf funtab + with Not_found -> Intset.empty + end + | Trivial typ -> + begin + try + Hashtbl.find state.by_type typ + with Not_found -> Intset.empty + end in + Intset.iter (fun i -> + Stack.push + {mp_subst = Array.make inst.qe_nvars (-1); + mp_inst=inst; + mp_stack=[inst.qe_rhs,i]} pb_stack) good_classes end in List.iter aux state.quant; pb_stack @@ -724,7 +828,8 @@ let find_instances state = let _ = debug msgnl (str "Running E-matching algorithm ... "); try - while true do + while true do + check_for_interrupt (); do_match state res pb_stack done; anomaly "get out of here !" @@ -734,7 +839,9 @@ let find_instances state = let rec execute first_run state = debug msgnl (str "Executing ... "); try - while one_step state do () + while + check_for_interrupt (); + one_step state do () done; match check_disequalities state with None -> diff --git a/contrib/cc/ccalgo.mli b/contrib/cc/ccalgo.mli index 05a5c4d1..cdc0065e 100644 --- a/contrib/cc/ccalgo.mli +++ b/contrib/cc/ccalgo.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: ccalgo.mli 9151 2006-09-19 13:32:22Z corbinea $ *) +(* $Id: ccalgo.mli 10579 2008-02-21 13:54:00Z corbinea $ *) open Util open Term @@ -19,10 +19,16 @@ type cinfo = type term = Symb of constr - | Eps + | Product of sorts_family * sorts_family + | Eps of identifier | Appli of term*term | Constructor of cinfo (* constructor arity + nhyps *) +type patt_kind = + Normal + | Trivial of types + | Creates_variables + type ccpattern = PApp of term * ccpattern list | PVar of int @@ -70,7 +76,7 @@ val axioms : forest -> (constr, term * term) Hashtbl.t val epsilons : forest -> pa_constructor list -val empty : int -> state +val empty : int -> Proof_type.goal Tacmach.sigma -> state val add_term : state -> term -> int @@ -79,8 +85,7 @@ val add_equality : state -> constr -> term -> term -> unit val add_disequality : state -> from -> term -> term -> unit val add_quant : state -> identifier -> bool -> - int * bool * ccpattern * bool * ccpattern -> unit - + int * patt_kind * ccpattern * patt_kind * ccpattern -> unit val tail_pac : pa_constructor -> pa_constructor @@ -102,9 +107,9 @@ type quant_eq= qe_pol: bool; qe_nvars:int; qe_lhs: ccpattern; - qe_lhs_valid:bool; + qe_lhs_valid:patt_kind; qe_rhs: ccpattern; - qe_rhs_valid:bool} + qe_rhs_valid:patt_kind} type pa_fun= diff --git a/contrib/cc/ccproof.ml b/contrib/cc/ccproof.ml index d336f599..a459b18f 100644 --- a/contrib/cc/ccproof.ml +++ b/contrib/cc/ccproof.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: ccproof.ml 9856 2007-05-24 14:05:40Z corbinea $ *) +(* $Id: ccproof.ml 9857 2007-05-24 14:21:08Z corbinea $ *) (* This file uses the (non-compressed) union-find structure to generate *) (* proof-trees that will be transformed into proof-terms in cctac.ml4 *) diff --git a/contrib/cc/ccproof.mli b/contrib/cc/ccproof.mli index 572b2c53..0eb97efe 100644 --- a/contrib/cc/ccproof.mli +++ b/contrib/cc/ccproof.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: ccproof.mli 9856 2007-05-24 14:05:40Z corbinea $ *) +(* $Id: ccproof.mli 9857 2007-05-24 14:21:08Z corbinea $ *) open Ccalgo open Names diff --git a/contrib/cc/cctac.ml b/contrib/cc/cctac.ml index dc0dec0e..871d7521 100644 --- a/contrib/cc/cctac.ml +++ b/contrib/cc/cctac.ml @@ -8,7 +8,7 @@ (*i camlp4deps: "parsing/grammar.cma" i*) -(* $Id: cctac.ml 10121 2007-09-14 09:45:40Z corbinea $ *) +(* $Id: cctac.ml 10670 2008-03-14 19:30:48Z letouzey $ *) (* This file is the interface between the c-c algorithm and Coq *) @@ -24,6 +24,7 @@ open Termops open Tacmach open Tactics open Tacticals +open Typing open Ccalgo open Tacinterp open Ccproof @@ -49,6 +50,8 @@ let _False = constant ["Init";"Logic"] "False" (* decompose member of equality in an applicative format *) +let sf_of env sigma c = family_of_sort (destSort (type_of env sigma c)) + let whd env= let infos=Closure.create_clos_infos Closure.betaiotazeta env in (fun t -> Closure.whd_val infos (Closure.inject t)) @@ -57,12 +60,19 @@ let whd_delta env= let infos=Closure.create_clos_infos Closure.betadeltaiota env in (fun t -> Closure.whd_val infos (Closure.inject t)) -let rec decompose_term env t= +let rec decompose_term env sigma t= match kind_of_term (whd env t) with App (f,args)-> - let tf=decompose_term env f in - let targs=Array.map (decompose_term env) args in + let tf=decompose_term env sigma f in + let targs=Array.map (decompose_term env sigma) args in Array.fold_left (fun s t->Appli (s,t)) tf targs + | Prod (_,a,_b) when not (dependent (mkRel 1) _b) -> + let b = pop _b in + let sort_b = sf_of env sigma b in + let sort_a = sf_of env sigma a in + Appli(Appli(Product (sort_a,sort_b) , + decompose_term env sigma a), + decompose_term env sigma b) | Construct c-> let (oib,_)=Global.lookup_inductive (fst c) in let nargs=mis_constructor_nargs_env env c in @@ -73,95 +83,111 @@ let rec decompose_term env t= (* decompose equality in members and type *) -let atom_of_constr env term = +let atom_of_constr env sigma term = let wh = (whd_delta env term) in let kot = kind_of_term wh in match kot with App (f,args)-> if eq_constr f (Lazy.force _eq) && (Array.length args)=3 then `Eq (args.(0), - decompose_term env args.(1), - decompose_term env args.(2)) - else `Other (decompose_term env term) - | _ -> `Other (decompose_term env term) + decompose_term env sigma args.(1), + decompose_term env sigma args.(2)) + else `Other (decompose_term env sigma term) + | _ -> `Other (decompose_term env sigma term) -let rec pattern_of_constr env c = +let rec pattern_of_constr env sigma c = match kind_of_term (whd env c) with App (f,args)-> - let pf = decompose_term env f in + let pf = decompose_term env sigma f in let pargs,lrels = List.split - (array_map_to_list (pattern_of_constr env) args) in + (array_map_to_list (pattern_of_constr env sigma) args) in PApp (pf,List.rev pargs), - List.fold_left Intset.union Intset.empty lrels + List.fold_left Intset.union Intset.empty lrels + | Prod (_,a,_b) when not (dependent (mkRel 1) _b) -> + let b =pop _b in + let pa,sa = pattern_of_constr env sigma a in + let pb,sb = pattern_of_constr env sigma (pop b) in + let sort_b = sf_of env sigma b in + let sort_a = sf_of env sigma a in + PApp(Product (sort_a,sort_b), + [pa;pb]),(Intset.union sa sb) | Rel i -> PVar i,Intset.singleton i | _ -> - let pf = decompose_term env c in + let pf = decompose_term env sigma c in PApp (pf,[]),Intset.empty let non_trivial = function PVar _ -> false | _ -> true -let patterns_of_constr env nrels term= +let patterns_of_constr env sigma nrels term= let f,args= try destApp (whd_delta env term) with _ -> raise Not_found in if eq_constr f (Lazy.force _eq) && (Array.length args)=3 then - let patt1,rels1 = pattern_of_constr env args.(1) - and patt2,rels2 = pattern_of_constr env args.(2) in - let valid1 = (Intset.cardinal rels1 = nrels && non_trivial patt1) - and valid2 = (Intset.cardinal rels2 = nrels && non_trivial patt2) in - if valid1 || valid2 then + let patt1,rels1 = pattern_of_constr env sigma args.(1) + and patt2,rels2 = pattern_of_constr env sigma args.(2) in + let valid1 = + if Intset.cardinal rels1 <> nrels then Creates_variables + else if non_trivial patt1 then Normal + else Trivial args.(0) + and valid2 = + if Intset.cardinal rels2 <> nrels then Creates_variables + else if non_trivial patt2 then Normal + else Trivial args.(0) in + if valid1 <> Creates_variables + || valid2 <> Creates_variables then nrels,valid1,patt1,valid2,patt2 else raise Not_found else raise Not_found -let rec quantified_atom_of_constr env nrels term = +let rec quantified_atom_of_constr env sigma nrels term = match kind_of_term (whd_delta env term) with Prod (_,atom,ff) -> if eq_constr ff (Lazy.force _False) then - let patts=patterns_of_constr env nrels atom in + let patts=patterns_of_constr env sigma nrels atom in `Nrule patts else - quantified_atom_of_constr env (succ nrels) ff + quantified_atom_of_constr env sigma (succ nrels) ff | _ -> - let patts=patterns_of_constr env nrels term in + let patts=patterns_of_constr env sigma nrels term in `Rule patts -let litteral_of_constr env term= +let litteral_of_constr env sigma term= match kind_of_term (whd_delta env term) with | Prod (_,atom,ff) -> if eq_constr ff (Lazy.force _False) then - match (atom_of_constr env atom) with + match (atom_of_constr env sigma atom) with `Eq(t,a,b) -> `Neq(t,a,b) | `Other(p) -> `Nother(p) else begin try - quantified_atom_of_constr env 1 ff + quantified_atom_of_constr env sigma 1 ff with Not_found -> - `Other (decompose_term env term) + `Other (decompose_term env sigma term) end | _ -> - atom_of_constr env term + atom_of_constr env sigma term (* store all equalities from the context *) let rec make_prb gls depth additionnal_terms = let env=pf_env gls in - let state = empty depth in + let sigma=sig_sig gls in + let state = empty depth gls in let pos_hyps = ref [] in let neg_hyps =ref [] in List.iter (fun c -> - let t = decompose_term env c in + let t = decompose_term env sigma c in ignore (add_term state t)) additionnal_terms; List.iter (fun (id,_,e) -> begin let cid=mkVar id in - match litteral_of_constr env e with + match litteral_of_constr env sigma e with `Eq (t,a,b) -> add_equality state cid a b | `Neq (t,a,b) -> add_disequality state (Hyp cid) a b | `Other ph -> @@ -180,7 +206,7 @@ let rec make_prb gls depth additionnal_terms = | `Nrule patts -> add_quant state id false patts end) (Environ.named_context_of_val gls.it.evar_hyps); begin - match atom_of_constr env gls.it.evar_concl with + match atom_of_constr env sigma gls.it.evar_concl with `Eq (t,a,b) -> add_disequality state Goal a b | `Other g -> List.iter @@ -209,7 +235,7 @@ let build_projection intype outtype (cstr:constructor) special default gls= let branches=Array.init lp branch in let casee=mkRel 1 in let pred=mkLambda(Anonymous,intype,outtype) in - let case_info=make_default_case_info (pf_env gls) RegularStyle ind in + let case_info=make_case_info (pf_env gls) ind RegularStyle in let body= mkCase(case_info, pred, casee, branches) in let id=pf_get_new_id (id_of_string "t") gls in mkLambda(Name id,intype,body) @@ -224,19 +250,19 @@ let rec proof_tac p gls = | SymAx c -> let l=constr_of_term p.p_lhs and r=constr_of_term p.p_rhs in - let typ = pf_type_of gls l in + let typ = refresh_universes (pf_type_of gls l) in exact_check (mkApp(Lazy.force _sym_eq,[|typ;r;l;c|])) gls | Refl t -> let lr = constr_of_term t in - let typ = pf_type_of gls lr in + let typ = refresh_universes (pf_type_of gls lr) in exact_check (mkApp(Lazy.force _refl_equal,[|typ;constr_of_term t|])) gls | Trans (p1,p2)-> let t1 = constr_of_term p1.p_lhs and t2 = constr_of_term p1.p_rhs and t3 = constr_of_term p2.p_rhs in - let typ = pf_type_of gls t2 in + let typ = refresh_universes (pf_type_of gls t2) in let prf = mkApp(Lazy.force _trans_eq,[|typ;t1;t2;t3;_M 1;_M 2|]) in tclTHENS (refine prf) [(proof_tac p1);(proof_tac p2)] gls @@ -245,16 +271,17 @@ let rec proof_tac p gls = and tx1=constr_of_term p2.p_lhs and tf2=constr_of_term p1.p_rhs and tx2=constr_of_term p2.p_rhs in - let typf = pf_type_of gls tf1 in - let typx = pf_type_of gls tx1 in - let typfx = pf_type_of gls (mkApp (tf1,[|tx1|])) in + let typf = refresh_universes (pf_type_of gls tf1) in + let typx = refresh_universes (pf_type_of gls tx1) in + let typfx = refresh_universes (pf_type_of gls (mkApp (tf1,[|tx1|]))) in let id = pf_get_new_id (id_of_string "f") gls in let appx1 = mkLambda(Name id,typf,mkApp(mkRel 1,[|tx1|])) in let lemma1 = mkApp(Lazy.force _f_equal, [|typf;typfx;appx1;tf1;tf2;_M 1|]) in let lemma2= - mkApp(Lazy.force _f_equal,[|typx;typfx;tf2;tx1;tx2;_M 1|]) in + mkApp(Lazy.force _f_equal, + [|typx;typfx;tf2;tx1;tx2;_M 1|]) in let prf = mkApp(Lazy.force _trans_eq, [|typfx; @@ -274,8 +301,8 @@ let rec proof_tac p gls = let ti=constr_of_term prf.p_lhs in let tj=constr_of_term prf.p_rhs in let default=constr_of_term p.p_lhs in - let intype=pf_type_of gls ti in - let outtype=pf_type_of gls default in + let intype=refresh_universes (pf_type_of gls ti) in + let outtype=refresh_universes (pf_type_of gls default) in let special=mkRel (1+nargs-argind) in let proj=build_projection intype outtype cstr special default gls in let injt= @@ -284,7 +311,7 @@ let rec proof_tac p gls = let refute_tac c t1 t2 p gls = let tt1=constr_of_term t1 and tt2=constr_of_term t2 in - let intype=pf_type_of gls tt1 in + let intype=refresh_universes (pf_type_of gls tt1) in let neweq= mkApp(Lazy.force _eq, [|intype;tt1;tt2|]) in @@ -295,7 +322,7 @@ let refute_tac c t1 t2 p gls = let convert_to_goal_tac c t1 t2 p gls = let tt1=constr_of_term t1 and tt2=constr_of_term t2 in - let sort=pf_type_of gls tt2 in + let sort=refresh_universes (pf_type_of gls tt2) in let neweq=mkApp(Lazy.force _eq,[|sort;tt1;tt2|]) in let e=pf_get_new_id (id_of_string "e") gls in let x=pf_get_new_id (id_of_string "X") gls in @@ -315,7 +342,7 @@ let convert_to_hyp_tac c1 t1 c2 t2 p gls = let discriminate_tac cstr p gls = let t1=constr_of_term p.p_lhs and t2=constr_of_term p.p_rhs in - let intype=pf_type_of gls t1 in + let intype=refresh_universes (pf_type_of gls t1) in let concl=pf_concl gls in let outsort=mkType (new_univ ()) in let xid=pf_get_new_id (id_of_string "X") gls in @@ -403,3 +430,29 @@ let congruence_tac depth l = tclORELSE (tclTHEN (tclREPEAT introf) (cc_tactic depth l)) cc_fail + +(* The [f_equal] tactic. + + It mimics the use of lemmas [f_equal], [f_equal2], etc. + This isn't particularly related with congruence, apart from + the fact that congruence is called internally. +*) + +let f_equal gl = + let cut_eq c1 c2 = + let ty = refresh_universes (pf_type_of gl c1) in + tclTHENTRY + (Tactics.cut (mkApp (Lazy.force _eq, [|ty; c1; c2|]))) reflexivity + in + try match kind_of_term (pf_concl gl) with + | App (r,[|_;t;t'|]) when eq_constr r (Lazy.force _eq) -> + begin match kind_of_term t, kind_of_term t' with + | App (f,v), App (f',v') when Array.length v = Array.length v' -> + let rec cuts i = + if i < 0 then tclTRY (congruence_tac 1000 []) + else tclTHENFIRST (cut_eq v.(i) v'.(i)) (cuts (i-1)) + in cuts (Array.length v - 1) gl + | _ -> tclIDTAC gl + end + | _ -> tclIDTAC gl + with Type_errors.TypeError _ -> tclIDTAC gl diff --git a/contrib/cc/cctac.mli b/contrib/cc/cctac.mli index ffc4b9c4..57ad0558 100644 --- a/contrib/cc/cctac.mli +++ b/contrib/cc/cctac.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: cctac.mli 10121 2007-09-14 09:45:40Z corbinea $ *) +(* $Id: cctac.mli 10637 2008-03-07 23:52:56Z letouzey $ *) open Term open Proof_type @@ -18,3 +18,5 @@ val cc_tactic : int -> constr list -> tactic val cc_fail : tactic val congruence_tac : int -> constr list -> tactic + +val f_equal : tactic diff --git a/contrib/cc/g_congruence.ml4 b/contrib/cc/g_congruence.ml4 index 693aebb4..9877e6fc 100644 --- a/contrib/cc/g_congruence.ml4 +++ b/contrib/cc/g_congruence.ml4 @@ -8,7 +8,7 @@ (*i camlp4deps: "parsing/grammar.cma" i*) -(* $Id: g_congruence.ml4 9151 2006-09-19 13:32:22Z corbinea $ *) +(* $Id: g_congruence.ml4 10637 2008-03-07 23:52:56Z letouzey $ *) open Cctac open Tactics @@ -17,9 +17,13 @@ open Tacticals (* Tactic registration *) TACTIC EXTEND cc - [ "congruence" ] -> [ congruence_tac 0 [] ] + [ "congruence" ] -> [ congruence_tac 1000 [] ] |[ "congruence" integer(n) ] -> [ congruence_tac n [] ] - |[ "congruence" "with" ne_constr_list(l) ] -> [ congruence_tac 0 l ] + |[ "congruence" "with" ne_constr_list(l) ] -> [ congruence_tac 1000 l ] |[ "congruence" integer(n) "with" ne_constr_list(l) ] -> [ congruence_tac n l ] END + +TACTIC EXTEND f_equal + [ "f_equal" ] -> [ f_equal ] +END diff --git a/contrib/correctness/ProgramsExtraction.v b/contrib/correctness/ProgramsExtraction.v index 5f7dfdbf..70f4b730 100644 --- a/contrib/correctness/ProgramsExtraction.v +++ b/contrib/correctness/ProgramsExtraction.v @@ -8,9 +8,7 @@ (* Certification of Imperative Programs / Jean-Christophe Filliâtre *) -(* $Id: ProgramsExtraction.v 5920 2004-07-16 20:01:26Z herbelin $ *) - -Require Export Extraction. +(* $Id: ProgramsExtraction.v 10290 2007-11-06 01:27:17Z letouzey $ *) Extract Inductive unit => unit [ "()" ]. Extract Inductive bool => bool [ true false ]. diff --git a/contrib/correctness/past.mli b/contrib/correctness/past.mli deleted file mode 100644 index 70328704..00000000 --- a/contrib/correctness/past.mli +++ /dev/null @@ -1,97 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* false - -let ast_set = CSort (dummy_loc,RProp Pos) - -let tuple_n n = - let id = make_ident "tuple_" (Some n) in - let l1n = Util.interval 1 n in - let params = - List.map (fun i -> - (LocalRawAssum ([dummy_loc,Name (make_ident "T" (Some i))], ast_set))) - l1n in - let fields = - List.map - (fun i -> - let id = make_ident ("proj_" ^ string_of_int n ^ "_") (Some i) in - let id' = make_ident "T" (Some i) in - (false, Vernacexpr.AssumExpr ((dummy_loc,Name id), mkIdentC id'))) - l1n - in - let cons = make_ident "Build_tuple_" (Some n) in - Record.definition_structure - ((false, (dummy_loc,id)), params, fields, cons, mk_Set) - -(*s [(sig_n n)] generates the inductive - \begin{verbatim} - Inductive sig_n [T1,...,Tn:Set; P:T1->...->Tn->Prop] : Set := - exist_n : (x1:T1)...(xn:Tn)(P x1 ... xn) -> (sig_n T1 ... Tn P). - \end{verbatim} *) - -let sig_n n = - let id = make_ident "sig_" (Some n) in - let l1n = Util.interval 1 n in - let lT = List.map (fun i -> make_ident "T" (Some i)) l1n in - let lx = List.map (fun i -> make_ident "x" (Some i)) l1n in - let idp = make_ident "P" None in - let params = - let typ = List.fold_right (fun _ c -> mkArrow (mkRel n) c) lT mkProp in - (idp, LocalAssum typ) :: - (List.rev_map (fun id -> (id, LocalAssum mkSet)) lT) - in - let lc = - let app_sig = mkApp(mkRel (2*n+3), - Array.init (n+1) (fun i -> mkRel (2*n+2-i))) in - let app_p = mkApp(mkRel (n+1), - Array.init n (fun i -> mkRel (n-i))) in - let c = mkArrow app_p app_sig in - List.fold_right (fun id c -> mkProd (Name id, mkRel (n+1), c)) lx c - in - let cname = make_ident "exist_" (Some n) in - Declare.declare_mind - { mind_entry_finite = true; - mind_entry_inds = - [ { mind_entry_params = params; - mind_entry_typename = id; - mind_entry_arity = mkSet; - mind_entry_consnames = [ cname ]; - mind_entry_lc = [ lc ] } ] } - -(*s On the fly generation of needed (possibly dependent) tuples. *) - -let check_product_n n = - if n > 2 then - let s = Printf.sprintf "tuple_%d" n in - if not (tuple_exists (id_of_string s)) then tuple_n n - -let check_dep_product_n n = - if n > 1 then - let s = Printf.sprintf "sig_%d" n in - if not (tuple_exists (id_of_string s)) then ignore (sig_n n) - -(*s Constructors for the tuples. *) - -let pair = ConstructRef ((coq_constant ["Init"; "Datatypes"] "prod",0),1) -let exist = ConstructRef ((coq_constant ["Init"; "Specif"] "sig",0),1) - -let tuple_ref dep n = - if n = 2 & not dep then - pair - else - let n = n - (if dep then 1 else 0) in - if dep then - if n = 1 then - exist - else begin - let id = make_ident "exist_" (Some n) in - if not (tuple_exists id) then ignore (sig_n n); - Nametab.locate (make_short_qualid id) - end - else begin - let id = make_ident "Build_tuple_" (Some n) in - if not (tuple_exists id) then tuple_n n; - Nametab.locate (make_short_qualid id) - end - -(* Binders. *) - -let trad_binder avoid nenv id = function - | CC_untyped_binder -> RHole (dummy_loc,BinderType (Name id)) - | CC_typed_binder ty -> Detyping.detype (false,Global.env()) avoid nenv ty - -let rec push_vars avoid nenv = function - | [] -> ([],avoid,nenv) - | (id,b) :: bl -> - let b' = trad_binder avoid nenv id b in - let bl',avoid',nenv' = - push_vars (id :: avoid) (add_name (Name id) nenv) bl - in - ((id,b') :: bl', avoid', nenv') - -let rec raw_lambda bl v = match bl with - | [] -> - v - | (id,ty) :: bl' -> - RLambda (dummy_loc, Name id, ty, raw_lambda bl' v) - -(* The translation itself is quite easy. - letin are translated into Cases constructions *) - -let rawconstr_of_prog p = - let rec trad avoid nenv = function - | CC_var id -> - RVar (dummy_loc, id) - - (*i optimisation : let x = in e2 => e2[x<-constr] - | CC_letin (_,_,[id,_],CC_expr c,e2) -> - real_subst_in_constr [id,c] (trad e2) - | CC_letin (_,_,([_] as b),CC_expr e1,e2) -> - let (b',avoid',nenv') = push_vars avoid nenv b in - let c1 = Detyping.detype avoid nenv e1 - and c2 = trad avoid' nenv' e2 in - let id = Name (fst (List.hd b')) in - RLetIn (dummy_loc, id, c1, c2) - i*) - - | CC_letin (_,_,([_] as b),e1,e2) -> - let (b',avoid',nenv') = push_vars avoid nenv b in - let c1 = trad avoid nenv e1 - and c2 = trad avoid' nenv' e2 in - RApp (dummy_loc, raw_lambda b' c2, [c1]) - - | CC_letin (dep,ty,bl,e1,e2) -> - let (bl',avoid',nenv') = push_vars avoid nenv bl in - let c1 = trad avoid nenv e1 - and c2 = trad avoid' nenv' e2 in - ROrderedCase (dummy_loc, LetStyle, None, c1, [| raw_lambda bl' c2 |], ref None) - - | CC_lam (bl,e) -> - let bl',avoid',nenv' = push_vars avoid nenv bl in - let c = trad avoid' nenv' e in - raw_lambda bl' c - - | CC_app (f,args) -> - let c = trad avoid nenv f - and cargs = List.map (trad avoid nenv) args in - RApp (dummy_loc, c, cargs) - - | CC_tuple (_,_,[e]) -> - trad avoid nenv e - - | CC_tuple (false,_,[e1;e2]) -> - let c1 = trad avoid nenv e1 - and c2 = trad avoid nenv e2 in - RApp (dummy_loc, RRef (dummy_loc,pair), - [RHole (dummy_loc,ImplicitArg (pair,1)); - RHole (dummy_loc,ImplicitArg (pair,2));c1;c2]) - - | CC_tuple (dep,tyl,l) -> - let n = List.length l in - let cl = List.map (trad avoid nenv) l in - let tuple = tuple_ref dep n in - let tyl = List.map (Detyping.detype (false,Global.env()) avoid nenv) tyl in - let args = tyl @ cl in - RApp (dummy_loc, RRef (dummy_loc, tuple), args) - - | CC_case (ty,b,el) -> - let c = trad avoid nenv b in - let cl = List.map (trad avoid nenv) el in - let ty = Detyping.detype (false,Global.env()) avoid nenv ty in - ROrderedCase (dummy_loc, RegularStyle, Some ty, c, Array.of_list cl, ref None) - - | CC_expr c -> - Detyping.detype (false,Global.env()) avoid nenv c - - | CC_hole c -> - RCast (dummy_loc, RHole (dummy_loc, QuestionMark), - Detyping.detype (false,Global.env()) avoid nenv c) - - in - trad [] empty_names_context p diff --git a/contrib/correctness/pcic.mli b/contrib/correctness/pcic.mli deleted file mode 100644 index 67b152f3..00000000 --- a/contrib/correctness/pcic.mli +++ /dev/null @@ -1,24 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* unit -val check_dep_product_n : int -> unit - -(* transforms intermediate functional programs into (raw) CIC terms *) - -val rawconstr_of_prog : cc_term -> rawconstr - diff --git a/contrib/correctness/pcicenv.ml b/contrib/correctness/pcicenv.ml deleted file mode 100644 index 368d0281..00000000 --- a/contrib/correctness/pcicenv.ml +++ /dev/null @@ -1,118 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* - if x=id then add_named_decl (x,b,t) sign else add_named_decl d sign) - s ~init:empty_named_context - -let add_sign (id,t) s = - try - let _ = lookup_named id s in - modify_sign id t s - with Not_found -> - add_named_decl (id,None,t) s - -let cast_set c = mkCast (c, mkSet) - -let set = mkCast (mkSet, mkType Univ.prop_univ) - -(* [cci_sign_of env] construit un environnement pour CIC ne comprenant que - * les objets fonctionnels de l'environnement de programes [env] - *) - -let cci_sign_of ren env = - Penv.fold_all - (fun (id,v) sign -> - match v with - | Penv.TypeV (Ref _ | Array _) -> sign - | Penv.TypeV v -> - let ty = Pmonad.trad_ml_type_v ren env v in - add_sign (id,cast_set ty) sign - | Penv.Set -> add_sign (id,set) sign) - env (Global.named_context ()) - -(* [sign_meta ren env fadd ini] - * construit un environnement pour CIC qui prend en compte les variables - * de programme. - * pour cela, cette fonction parcours tout l'envrionnement (global puis - * local [env]) et pour chaque déclaration, ajoute ce qu'il faut avec la - * fonction [fadd] s'il s'agit d'un mutable et directement sinon, - * en partant de [ini]. - *) - -let sign_meta ren env fast ini = - Penv.fold_all - (fun (id,v) sign -> - match v with - | Penv.TypeV (Ref _ | Array _ as v) -> - let ty = Pmonad.trad_imp_type ren env v in - fast sign id ty - | Penv.TypeV v -> - let ty = Pmonad.trad_ml_type_v ren env v in - add_sign (id,cast_set ty) sign - | Penv.Set -> add_sign (id,set) sign) - env ini - -let add_sign_d dates (id,c) sign = - let sign = - List.fold_left (fun sign d -> add_sign (at_id id d,c) sign) sign dates - in - add_sign (id,c) sign - -let sign_of add ren env = - sign_meta ren env - (fun sign id c -> let c = cast_set c in add (id,c) sign) - (Global.named_context ()) - -let result_of sign = function - None -> sign - | Some (id,c) -> add_sign (id, cast_set c) sign - -let before_after_result_sign_of res ren env = - let dates = "" :: Prename.all_dates ren in - result_of (sign_of (add_sign_d dates) ren env) res - -let before_after_sign_of ren = - let dates = "" :: Prename.all_dates ren in - sign_of (add_sign_d dates) ren - -let before_sign_of ren = - let dates = Prename.all_dates ren in - sign_of (add_sign_d dates) ren - -let now_sign_of = - sign_of (add_sign_d []) - - -(* environnement après traduction *) - -let trad_sign_of ren = - sign_of - (fun (id,c) sign -> add_sign (Prename.current_var ren id,c) sign) - ren - - diff --git a/contrib/correctness/pcicenv.mli b/contrib/correctness/pcicenv.mli deleted file mode 100644 index 365fa960..00000000 --- a/contrib/correctness/pcicenv.mli +++ /dev/null @@ -1,38 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* local_env -> named_context - -(* env. Coq avec seulement les variables X de l'env. *) -val now_sign_of : Prename.t -> local_env -> named_context - -(* + les variables X@d pour toutes les dates de l'env. *) -val before_sign_of : Prename.t -> local_env -> named_context - -(* + les variables `avant' X@ *) -val before_after_sign_of : Prename.t -> local_env -> named_context -val before_after_result_sign_of : ((identifier * constr) option) - -> Prename.t -> local_env -> named_context - -(* env. des programmes traduits, avec les variables rennomées *) -val trad_sign_of : Prename.t -> local_env -> named_context - diff --git a/contrib/correctness/pdb.ml b/contrib/correctness/pdb.ml deleted file mode 100644 index 759e9133..00000000 --- a/contrib/correctness/pdb.ml +++ /dev/null @@ -1,165 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* raise Not_found - -let lookup_var ids locop id = - if List.mem id ids then - None - else begin - try Some (cci_global id) - with Not_found -> Perror.unbound_variable id locop - end - -let check_ref idl loc id = - if (not (List.mem id idl)) & (not (Penv.is_global id)) then - Perror.unbound_reference id loc - -(* db types : only check the references for the moment *) - -let rec check_type_v refs = function - | Ref v -> - check_type_v refs v - | Array (c,v) -> - check_type_v refs v - | Arrow (bl,c) -> - check_binder refs c bl - | TypePure _ -> - () - -and check_type_c refs ((_,v),e,_,_) = - check_type_v refs v; - List.iter (check_ref refs None) (Peffect.get_reads e); - List.iter (check_ref refs None) (Peffect.get_writes e) - (* TODO: check_condition on p and q *) - -and check_binder refs c = function - | [] -> - check_type_c refs c - | (id, BindType (Ref _ | Array _ as v)) :: bl -> - check_type_v refs v; - check_binder (id :: refs) c bl - | (_, BindType v) :: bl -> - check_type_v refs v; - check_binder refs c bl - | _ :: bl -> - check_binder refs c bl - -(* db binders *) - -let rec db_binders ((tids,pids,refs) as idl) = function - | [] -> - idl, [] - | (id, BindType (Ref _ | Array _ as v)) as b :: rem -> - check_type_v refs v; - let idl',rem' = db_binders (tids,pids,id::refs) rem in - idl', b :: rem' - | (id, BindType v) as b :: rem -> - check_type_v refs v; - let idl',rem' = db_binders (tids,id::pids,refs) rem in - idl', b :: rem' - | ((id, BindSet) as t) :: rem -> - let idl',rem' = db_binders (id::tids,pids,refs) rem in - idl', t :: rem' - | a :: rem -> - let idl',rem' = db_binders idl rem in idl', a :: rem' - - -(* db programs *) - -let db_prog e = - (* tids = type identifiers, ids = variables, refs = references and arrays *) - let rec db_desc ((tids,ids,refs) as idl) = function - | (Variable x) as t -> - (match lookup_var ids (Some e.loc) x with - None -> t - | Some c -> Expression c) - | (Acc x) as t -> - check_ref refs (Some e.loc) x; - t - | Aff (x,e1) -> - check_ref refs (Some e.loc) x; - Aff (x, db idl e1) - | TabAcc (b,x,e1) -> - check_ref refs (Some e.loc) x; - TabAcc(b,x,db idl e1) - | TabAff (b,x,e1,e2) -> - check_ref refs (Some e.loc) x; - TabAff (b,x, db idl e1, db idl e2) - | Seq bl -> - Seq (List.map (function - Statement p -> Statement (db idl p) - | x -> x) bl) - | If (e1,e2,e3) -> - If (db idl e1, db idl e2, db idl e3) - | While (b,inv,var,bl) -> - let bl' = List.map (function - Statement p -> Statement (db idl p) - | x -> x) bl in - While (db idl b, inv, var, bl') - - | Lam (bl,e) -> - let idl',bl' = db_binders idl bl in Lam(bl', db idl' e) - | Apply (e1,l) -> - Apply (db idl e1, List.map (db_arg idl) l) - | SApp (dl,l) -> - SApp (dl, List.map (db idl) l) - | LetRef (x,e1,e2) -> - LetRef (x, db idl e1, db (tids,ids,x::refs) e2) - | Let (x,e1,e2) -> - Let (x, db idl e1, db (tids,x::ids,refs) e2) - - | LetRec (f,bl,v,var,e) -> - let (tids',ids',refs'),bl' = db_binders idl bl in - check_type_v refs' v; - LetRec (f, bl, v, var, db (tids',f::ids',refs') e) - - | Debug (s,e1) -> - Debug (s, db idl e1) - - | Expression _ as x -> x - | PPoint (s,d) -> PPoint (s, db_desc idl d) - - and db_arg ((tids,_,refs) as idl) = function - | Term ({ desc = Variable id } as t) -> - if List.mem id refs then Refarg id else Term (db idl t) - | Term t -> Term (db idl t) - | Type v as ty -> check_type_v refs v; ty - | Refarg _ -> assert false - - and db idl e = - { desc = db_desc idl e.desc ; - pre = e.pre; post = e.post; - loc = e.loc; info = e.info } - - in - let ids = Termops.ids_of_named_context (Global.named_context ()) in - (* TODO: separer X:Set et x:V:Set - virer le reste (axiomes, etc.) *) - let vars,refs = all_vars (), all_refs () in - db ([],vars@ids,refs) e -;; - diff --git a/contrib/correctness/pdb.mli b/contrib/correctness/pdb.mli deleted file mode 100644 index d6e647b7..00000000 --- a/contrib/correctness/pdb.mli +++ /dev/null @@ -1,25 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* 'a ml_type_v -> unit - -val db_prog : program -> program - diff --git a/contrib/correctness/peffect.ml b/contrib/correctness/peffect.ml deleted file mode 100644 index faf5f3d3..00000000 --- a/contrib/correctness/peffect.ml +++ /dev/null @@ -1,159 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* [x] - | (y::rem) as l -> - if x = y then l else if x > y then x::l else y :: push_rec rem - in - push_rec l - -let basic_remove x l = - let rec rem_rec = function - [] -> [] - | y::l -> if x = y then l else y :: rem_rec l - in - rem_rec l - -let mem x (r,w) = (List.mem x r) or (List.mem x w) - -let rec basic_union = function - [], s2 -> s2 - | s1, [] -> s1 - | ((v1::l1) as s1), ((v2::l2) as s2) -> - if v1 > v2 then - v1 :: basic_union (l1,s2) - else if v1 < v2 then - v2 :: basic_union (s1,l2) - else - v1 :: basic_union (l1,l2) - -(* adds reads and writes variables *) - -let add_read id ((r,w) as e) = - (* if the variable is already a RW it is ok, otherwise adds it as a RO. *) - if List.mem id w then - e - else - push id r, w - -let add_write id (r,w) = - (* if the variable is a RO then removes it from RO. Adds it to RW. *) - if List.mem id r then - basic_remove id r, push id w - else - r, push id w - -(* access *) - -let get_reads = basic_union -let get_writes = snd -let get_repr e = (get_reads e, get_writes e) - -(* tests *) - -let is_read (r,_) id = List.mem id r -let is_write (_,w) id = List.mem id w - -(* union and disjunction *) - -let union (r1,w1) (r2,w2) = basic_union (r1,r2), basic_union (w1,w2) - -let rec diff = function - [], s2 -> [] - | s1, [] -> s1 - | ((v1::l1) as s1), ((v2::l2) as s2) -> - if v1 > v2 then - v1 :: diff (l1,s2) - else if v1 < v2 then - diff (s1,l2) - else - diff (l1,l2) - -let disj (r1,w1) (r2,w2) = - let w1_w2 = diff (w1,w2) and w2_w1 = diff (w2,w1) in - let r = basic_union (basic_union (r1,r2), basic_union (w1_w2,w2_w1)) - and w = basic_union (w1,w2) in - r,w - -(* comparison relation *) - -let le e1 e2 = failwith "effects: le: not yet implemented" - -let inf e1 e2 = failwith "effects: inf: not yet implemented" - -(* composition *) - -let compose (r1,w1) (r2,w2) = - let r = basic_union (r1, diff (r2,w1)) in - let w = basic_union (w1,w2) in - r,w - -(* remove *) - -let remove (r,w) name = basic_remove name r, basic_remove name w - -(* substitution *) - -let subst_list (x,x') l = - if List.mem x l then push x' (basic_remove x l) else l - -let subst_one (r,w) s = subst_list s r, subst_list s w - -let subst s e = List.fold_left subst_one e s - -(* pretty-print *) - -open Pp -open Util -open Himsg - -let pp (r,w) = - hov 0 (if r<>[] then - (str"reads " ++ - prlist_with_sep (fun () -> (str"," ++ spc ())) pr_id r) - else (mt ()) ++ - spc () ++ - if w<>[] then - (str"writes " ++ - prlist_with_sep (fun ()-> (str"," ++ spc ())) pr_id w) - else (mt ()) -) - -let ppr e = - Pp.pp (pp e) - diff --git a/contrib/correctness/peffect.mli b/contrib/correctness/peffect.mli deleted file mode 100644 index 9a10dea4..00000000 --- a/contrib/correctness/peffect.mli +++ /dev/null @@ -1,42 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* t -> t -val add_write : identifier -> t -> t - -val get_reads : t -> identifier list -val get_writes : t -> identifier list -val get_repr : t -> (identifier list) * (identifier list) - -val is_read : t -> identifier -> bool (* read-only *) -val is_write : t -> identifier -> bool (* read-write *) - -val compose : t -> t -> t - -val union : t -> t -> t -val disj : t -> t -> t - -val remove : t -> identifier -> t - -val subst : (identifier * identifier) list -> t -> t - - -val pp : t -> Pp.std_ppcmds -val ppr : t -> unit - diff --git a/contrib/correctness/penv.ml b/contrib/correctness/penv.ml deleted file mode 100644 index 7f89b1e1..00000000 --- a/contrib/correctness/penv.ml +++ /dev/null @@ -1,240 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* v | Set -> raise Not_found - -let is_local env id = - try - match Env.find id env with TypeV _ -> true | Set -> false - with - Not_found -> false - -let is_local_set env id = - try - match Env.find id env with TypeV _ -> false | Set -> true - with - Not_found -> false - - -(* typed programs *) - -type typing_info = { - env : local_env; - kappa : constr ml_type_c -} - -type typed_program = (typing_info, constr) t - - -(* The global environment. - * - * We have a global typing environment env - * We also keep a table of programs for extraction purposes - * and a table of initializations (still for extraction) - *) - -let (env : type_info Env.t ref) = ref Env.empty - -let (pgm_table : (typed_program option) Idmap.t ref) = ref Idmap.empty - -let (init_table : constr Idmap.t ref) = ref Idmap.empty - -let freeze () = (!env, !pgm_table, !init_table) -let unfreeze (e,p,i) = env := e; pgm_table := p; init_table := i -let init () = - env := Env.empty; pgm_table := Idmap.empty; init_table := Idmap.empty -;; - -Summary.declare_summary "programs-environment" - { Summary.freeze_function = freeze; - Summary.unfreeze_function = unfreeze; - Summary.init_function = init; - Summary.survive_module = false; - Summary.survive_section = false } -;; - -(* Operations on the global environment. *) - -let add_pgm id p = pgm_table := Idmap.add id p !pgm_table - -let cache_global (_,(id,v,p)) = - env := Env.add id v !env; add_pgm id p - -let type_info_app f = function Set -> Set | TypeV v -> TypeV (f v) - -let subst_global (_,s,(id,v,p)) = (id, type_info_app (type_v_knsubst s) v, p) - -let (inProg,outProg) = - declare_object { object_name = "programs-objects"; - cache_function = cache_global; - load_function = (fun _ -> cache_global); - open_function = (fun _ _ -> ()); - classify_function = (fun (_,x) -> Substitute x); - subst_function = subst_global; - export_function = (fun x -> Some x) } - -let is_mutable = function Ref _ | Array _ -> true | _ -> false - -let add_global id v p = - try - let _ = Env.find id !env in - Perror.clash id None - with - Not_found -> begin - let id' = - if is_mutable v then id - else id_of_string ("prog_" ^ (string_of_id id)) - in - Lib.add_leaf id' (inProg (id,TypeV v,p)) - end - -let add_global_set id = - try - let _ = Env.find id !env in - Perror.clash id None - with - Not_found -> Lib.add_leaf id (inProg (id,Set,None)) - -let is_global id = - try - match Env.find id !env with TypeV _ -> true | Set -> false - with - Not_found -> false - -let is_global_set id = - try - match Env.find id !env with TypeV _ -> false | Set -> true - with - Not_found -> false - - -let lookup_global id = - match Env.find id !env with TypeV v -> v | Set -> raise Not_found - -let find_pgm id = Idmap.find id !pgm_table - -let all_vars () = - Env.fold - (fun (id,v) l -> match v with TypeV (Arrow _|TypePure _) -> id::l | _ -> l) - !env [] - -let all_refs () = - Env.fold - (fun (id,v) l -> match v with TypeV (Ref _ | Array _) -> id::l | _ -> l) - !env [] - -(* initializations *) - -let cache_init (_,(id,c)) = - init_table := Idmap.add id c !init_table - -let subst_init (_,s,(id,c)) = (id, subst_mps s c) - -let (inInit,outInit) = - declare_object { object_name = "programs-objects-init"; - cache_function = cache_init; - load_function = (fun _ -> cache_init); - open_function = (fun _ _-> ()); - classify_function = (fun (_,x) -> Substitute x); - subst_function = subst_init; - export_function = (fun x -> Some x) } - -let initialize id c = Lib.add_anonymous_leaf (inInit (id,c)) - -let find_init id = Idmap.find id !init_table - - -(* access in env, local then global *) - -let type_in_env env id = - try find id env with Not_found -> lookup_global id - -let is_in_env env id = - (is_global id) or (is_local env id) - -let fold_all f lenv x0 = - let x1 = Env.fold f !env x0 in - Env.fold f lenv x1 - - -(* recursions *) - -let add_recursion = Env.add_rec - -let find_recursion = Env.find_rec - - -(* We also maintain a table of the currently edited proofs of programs - * in order to add them in the environnement when the user does Save *) - -open Pp -open Himsg - -let (edited : (type_v * typed_program) Idmap.t ref) = ref Idmap.empty - -let new_edited id v = - edited := Idmap.add id v !edited - -let is_edited id = - try let _ = Idmap.find id !edited in true with Not_found -> false - -let register id id' = - try - let (v,p) = Idmap.find id !edited in - let _ = add_global id' v (Some p) in - Options.if_verbose - msgnl (hov 0 (str"Program " ++ pr_id id' ++ spc () ++ str"is defined")); - edited := Idmap.remove id !edited - with Not_found -> () - diff --git a/contrib/correctness/penv.mli b/contrib/correctness/penv.mli deleted file mode 100644 index 6743b465..00000000 --- a/contrib/correctness/penv.mli +++ /dev/null @@ -1,87 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* local_env -> local_env -val add_set : identifier -> local_env -> local_env -val is_local : local_env -> identifier -> bool -val is_local_set : local_env -> identifier -> bool - -(* typed programs *) - -type typing_info = { - env : local_env; - kappa : constr ml_type_c -} - -type typed_program = (typing_info, constr) t - -(* global environment *) - -val add_global : identifier -> type_v -> typed_program option -> object_name -val add_global_set : identifier -> object_name -val is_global : identifier -> bool -val is_global_set : identifier -> bool -val lookup_global : identifier -> type_v - -val all_vars : unit -> identifier list -val all_refs : unit -> identifier list - -(* a table keeps the program (for extraction) *) - -val find_pgm : identifier -> typed_program option - -(* a table keeps the initializations of mutable objects *) - -val initialize : identifier -> constr -> unit -val find_init : identifier -> constr - -(* access in env (local then global) *) - -val type_in_env : local_env -> identifier -> type_v -val is_in_env : local_env -> identifier -> bool - -type type_info = Set | TypeV of type_v -val fold_all : (identifier * type_info -> 'a -> 'a) -> local_env -> 'a -> 'a - -(* local environnements also contains a list of recursive functions - * with the associated variant *) - -val add_recursion : identifier * (identifier*variant) -> local_env -> local_env -val find_recursion : identifier -> local_env -> identifier * variant - -(* We also maintain a table of the currently edited proofs of programs - * in order to add them in the environnement when the user does Save *) - -val new_edited : identifier -> type_v * typed_program -> unit -val is_edited : identifier -> bool -val register : identifier -> identifier -> unit - diff --git a/contrib/correctness/perror.ml b/contrib/correctness/perror.ml deleted file mode 100644 index 8415e96d..00000000 --- a/contrib/correctness/perror.ml +++ /dev/null @@ -1,172 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* true | _ -> false -let is_pure = function TypePure _ -> true | _ -> false - -let raise_with_loc = function - | None -> raise - | Some loc -> Stdpp.raise_with_loc loc - -let unbound_variable id loc = - raise_with_loc loc - (UserError ("Perror.unbound_variable", - (hov 0 (str"Unbound variable" ++ spc () ++ pr_id id ++ fnl ())))) - -let unbound_reference id loc = - raise_with_loc loc - (UserError ("Perror.unbound_reference", - (hov 0 (str"Unbound reference" ++ spc () ++ pr_id id ++ fnl ())))) - -let clash id loc = - raise_with_loc loc - (UserError ("Perror.clash", - (hov 0 (str"Clash with previous constant" ++ spc () ++ - str(string_of_id id) ++ fnl ())))) - -let not_defined id = - raise - (UserError ("Perror.not_defined", - (hov 0 (str"The object" ++ spc () ++ pr_id id ++ spc () ++ - str"is not defined" ++ fnl ())))) - -let check_for_reference loc id = function - Ref _ -> () - | _ -> Stdpp.raise_with_loc loc - (UserError ("Perror.check_for_reference", - hov 0 (pr_id id ++ spc () ++ - str"is not a reference"))) - -let check_for_array loc id = function - Array _ -> () - | _ -> Stdpp.raise_with_loc loc - (UserError ("Perror.check_for_array", - hov 0 (pr_id id ++ spc () ++ - str"is not an array"))) - -let is_constant_type s = function - TypePure c -> - let id = id_of_string s in - let c' = Constrintern.global_reference id in - Reductionops.is_conv (Global.env()) Evd.empty c c' - | _ -> false - -let check_for_index_type loc v = - let is_index = is_constant_type "Z" v in - if not is_index then - Stdpp.raise_with_loc loc - (UserError ("Perror.check_for_index", - hov 0 (str"This expression is an index" ++ spc () ++ - str"and should have type int (Z)"))) - -let check_no_effect loc ef = - if not (Peffect.get_writes ef = []) then - Stdpp.raise_with_loc loc - (UserError ("Perror.check_no_effect", - hov 0 (str"A boolean should not have side effects" -))) - -let should_be_boolean loc = - Stdpp.raise_with_loc loc - (UserError ("Perror.should_be_boolean", - hov 0 (str"This expression is a test:" ++ spc () ++ - str"it should have type bool"))) - -let test_should_be_annotated loc = - Stdpp.raise_with_loc loc - (UserError ("Perror.test_should_be_annotated", - hov 0 (str"This test should be annotated"))) - -let if_branches loc = - Stdpp.raise_with_loc loc - (UserError ("Perror.if_branches", - hov 0 (str"The two branches of an `if' expression" ++ spc () ++ - str"should have the same type"))) - -let check_for_not_mutable loc v = - if is_mutable v then - Stdpp.raise_with_loc loc - (UserError ("Perror.check_for_not_mutable", - hov 0 (str"This expression cannot be a mutable"))) - -let check_for_pure_type loc v = - if not (is_pure v) then - Stdpp.raise_with_loc loc - (UserError ("Perror.check_for_pure_type", - hov 0 (str"This expression must be pure" ++ spc () ++ - str"(neither a mutable nor a function)"))) - -let check_for_let_ref loc v = - if not (is_pure v) then - Stdpp.raise_with_loc loc - (UserError ("Perror.check_for_let_ref", - hov 0 (str"References can only be bound in pure terms"))) - -let informative loc s = - Stdpp.raise_with_loc loc - (UserError ("Perror.variant_informative", - hov 0 (str s ++ spc () ++ str"must be informative"))) - -let variant_informative loc = informative loc "Variant" -let should_be_informative loc = informative loc "This term" - -let app_of_non_function loc = - Stdpp.raise_with_loc loc - (UserError ("Perror.app_of_non_function", - hov 0 (str"This term cannot be applied" ++ spc () ++ - str"(either it is not a function" ++ spc () ++ - str"or it is applied to non pure arguments)"))) - -let partial_app loc = - Stdpp.raise_with_loc loc - (UserError ("Perror.partial_app", - hov 0 (str"This function does not have" ++ - spc () ++ str"the right number of arguments"))) - -let expected_type loc s = - Stdpp.raise_with_loc loc - (UserError ("Perror.expected_type", - hov 0 (str"Argument is expected to have type" ++ spc () ++ s))) - -let expects_a_type id loc = - Stdpp.raise_with_loc loc - (UserError ("Perror.expects_a_type", - hov 0 (str"The argument " ++ pr_id id ++ spc () ++ - str"in this application is supposed to be a type"))) - -let expects_a_term id = - raise - (UserError ("Perror.expects_a_type", - hov 0 (str"The argument " ++ pr_id id ++ spc () ++ - str"in this application is supposed to be a term"))) - -let should_be_a_variable loc = - Stdpp.raise_with_loc loc - (UserError ("Perror.should_be_a_variable", - hov 0 (str"Argument should be a variable"))) - -let should_be_a_reference loc = - Stdpp.raise_with_loc loc - (UserError ("Perror.should_be_a_reference", - hov 0 (str"Argument of function should be a reference"))) - - diff --git a/contrib/correctness/perror.mli b/contrib/correctness/perror.mli deleted file mode 100644 index 45b2acdc..00000000 --- a/contrib/correctness/perror.mli +++ /dev/null @@ -1,47 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* loc option -> 'a -val unbound_reference : identifier -> loc option -> 'a - -val clash : identifier -> loc option -> 'a -val not_defined : identifier -> 'a - -val check_for_reference : loc -> identifier -> type_v -> unit -val check_for_array : loc -> identifier -> type_v -> unit - -val check_for_index_type : loc -> type_v -> unit -val check_no_effect : loc -> Peffect.t -> unit -val should_be_boolean : loc -> 'a -val test_should_be_annotated : loc -> 'a -val if_branches : loc -> 'a - -val check_for_not_mutable : loc -> type_v -> unit -val check_for_pure_type : loc -> type_v -> unit -val check_for_let_ref : loc -> type_v -> unit - -val variant_informative : loc -> 'a -val should_be_informative : loc -> 'a - -val app_of_non_function : loc -> 'a -val partial_app : loc -> 'a -val expected_type : loc -> std_ppcmds -> 'a -val expects_a_type : identifier -> loc -> 'a -val expects_a_term : identifier -> 'a -val should_be_a_variable : loc -> 'a -val should_be_a_reference : loc -> 'a diff --git a/contrib/correctness/pextract.ml b/contrib/correctness/pextract.ml deleted file mode 100644 index 407567ad..00000000 --- a/contrib/correctness/pextract.ml +++ /dev/null @@ -1,473 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* j._VAL - | (_,Logic) -> failwith "Prog_extract.pp: should be informative" - -(* les tableaux jouent un role particulier, puisqu'ils seront extraits - * vers des tableaux ML *) - -let sp_access = coq_constant ["correctness"; "Arrays"] "access" -let access = ConstRef sp_access - -let has_array = ref false - -let pp_conversions () = - (str"\ -let rec int_of_pos = function - XH -> 1 - | XI p -> 2 * (int_of_pos p) + 1 - | XO p -> 2 * (int_of_pos p) - ++ ++ - -let int_of_z = function - ZERO -> 0 - | POS p -> int_of_pos p - | NEG p -> -(int_of_pos p) - ++ ++ -") (* '"' *) - -(* collect all section-path in a CIC constant *) - -let spset_of_cci env c = - let spl = Fw_env.collect (extraction env c) in - let sps = List.fold_left (fun e x -> SpSet.add x e) SpSet.empty spl in - has_array := !has_array or (SpSet.mem sp_access sps) ++ - SpSet.remove sp_access sps - - -(* collect all Coq constants and all pgms appearing in a given program *) - -let add_id env ((sp,ids) as s) id = - if is_local env id then - s - else if is_global id then - (sp,IdSet.add id ids) - else - try (SpSet.add (Nametab.sp_of_id FW id) sp,ids) with Not_found -> s - -let collect env = - let rec collect_desc env s = function - | Var x -> add_id env s x - | Acc x -> add_id env s x - | Aff (x,e1) -> add_id env (collect_rec env s e1) x - | TabAcc (_,x,e1) -> - has_array := true ++ - add_id env (collect_rec env s e1) x - | TabAff (_,x,e1,e2) -> - has_array := true ++ - add_id env (collect_rec env (collect_rec env s e1) e2) x - | Seq bl -> - List.fold_left (fun s st -> match st with - Statement p -> collect_rec env s p - | _ -> s) s bl - | If (e1,e2,e3) -> - collect_rec env (collect_rec env (collect_rec env s e1) e2) e3 - | While (b,_,_,bl) -> - let s = List.fold_left (fun s st -> match st with - Statement p -> collect_rec env s p - | _ -> s) s bl in - collect_rec env s b - | Lam (bl,e) -> - collect_rec (traverse_binders env bl) s e - | App (e1,l) -> - let s = List.fold_left (fun s a -> match a with - Term t -> collect_rec env s t - | Type _ | Refarg _ -> s) s l in - collect_rec env s e1 - | SApp (_,l) -> - List.fold_left (fun s a -> collect_rec env s a) s l - | LetRef (x,e1,e2) -> - let (_,v),_,_,_ = e1.info.kappa in - collect_rec (add (x,Ref v) env) (collect_rec env s e1) e2 - | LetIn (x,e1,e2) -> - let (_,v),_,_,_ = e1.info.kappa in - collect_rec (add (x,v) env) (collect_rec env s e1) e2 - | LetRec (f,bl,_,_,e) -> - let env' = traverse_binders env bl in - let env'' = add (f,make_arrow bl e.info.kappa) env' in - collect_rec env'' s e - | Debug (_,e1) -> collect_rec env s e1 - | PPoint (_,d) -> collect_desc env s d - | Expression c -> - let (sp,ids) = s in - let sp' = spset_of_cci env c in - SpSet.fold - (fun s (es,ei) -> - let id = basename s in - if is_global id then (*SpSet.add s*)es,IdSet.add id ei - else SpSet.add s es,ei) - sp' (sp,ids) - - and collect_rec env s p = collect_desc env s p.desc - - in - collect_rec env (SpSet.empty,IdSet.empty) - - -(* On a besoin de faire du renommage, tout comme pour l'extraction des - * termes Coq. En ce qui concerne les globaux, on utilise la table de - * Fwtoml. Pour les objects locaux, on introduit la structure de - * renommage rename_struct - *) - -module Ocaml_ren = Ocaml.OCaml_renaming - -let rename_global id = - let id' = Ocaml_ren.rename_global_term !Fwtoml.globals (Name id) in - Fwtoml.add_global_renaming (id,id') ++ - id' - -type rename_struct = { rn_map : identifier IdMap.t; - rn_avoid : identifier list } - -let rn_empty = { rn_map = IdMap.empty; rn_avoid = [] } - -let rename_local rn id = - let id' = Ocaml_ren.rename_term (!Fwtoml.globals@rn.rn_avoid) (Name id) in - { rn_map = IdMap.add id id' rn.rn_map; rn_avoid = id' :: rn.rn_avoid }, - id' - -let get_local_name rn id = IdMap.find id rn.rn_map - -let get_name env rn id = - if is_local env id then - get_local_name rn id - else - Fwtoml.get_global_name id - -let rec rename_binders rn = function - | [] -> rn - | (id,_) :: bl -> let rn',_ = rename_local rn id in rename_binders rn' bl - -(* on a bespoin d'un pretty-printer de constr particulier, qui reconnaisse - * les acces a des references et dans des tableaux, et qui de plus n'imprime - * pas de GENTERM lorsque des identificateurs ne sont pas visibles. - * Il est simplifie dans la mesure ou l'on a ici que des constantes et - * des applications. - *) - -let putpar par s = - if par then (str"(" ++ s ++ str")") else s - -let is_ref env id = - try - (match type_in_env env id with Ref _ -> true | _ -> false) - with - Not_found -> false - -let rec pp_constr env rn = function - | VAR id -> - if is_ref env id then - (str"!" ++ pID (get_name env rn id)) - else - pID (get_name env rn id) - | DOPN((Const _|MutInd _|MutConstruct _) as oper, _) -> - pID (Fwtoml.name_of_oper oper) - | DOPN(AppL,v) -> - if Array.length v = 0 then - (mt ()) - else begin - match v.(0) with - DOPN(Const sp,_) when sp = sp_access -> - (pp_constr env rn v.(3) ++ - str".(int_of_z " ++ pp_constr env rn v.(4) ++ str")") - | _ -> - hov 2 (putpar true (prvect_with_sep (fun () -> (spc ())) - (pp_constr env rn) v)) - end - | DOP2(Cast,c,_) -> pp_constr env rn c - | _ -> failwith "Prog_extract.pp_constr: unexpected constr" - - -(* pretty-print of imperative programs *) - -let collect_lambda = - let rec collect acc p = match p.desc with - | Lam(bl,t) -> collect (bl@acc) t - | x -> acc,p - in - collect [] - -let pr_binding rn = - prlist_with_sep (fun () -> (mt ())) - (function - | (id,(Untyped | BindType _)) -> - (str" " ++ pID (get_local_name rn id)) - | (id,BindSet) -> (mt ())) - -let pp_prog id = - let rec pp_d env rn par = function - | Var x -> pID (get_name env rn x) - | Acc x -> (str"!" ++ pID (get_name env rn x)) - | Aff (x,e1) -> (pID (get_name env rn x) ++ - str" := " ++ hov 0 (pp env rn false e1)) - | TabAcc (_,x,e1) -> - (pID (get_name env rn x) ++ - str".(int_of_z " ++ hov 0 (pp env rn true e1) ++ str")") - | TabAff (_,x,e1,e2) -> - (pID (get_name env rn x) ++ - str".(int_of_z " ++ hov 0 (pp env rn true e1) ++ str")" ++ - str" <-" ++ spc () ++ hov 2 (pp env rn false e2)) - | Seq bl -> - (str"begin" ++ fnl () ++ - str" " ++ hov 0 (pp_block env rn bl) ++ fnl () ++ - str"end") - | If (e1,e2,e3) -> - putpar par (str"if " ++ (pp env rn false e1) ++ - str" then" ++ fnl () ++ - str" " ++ hov 0 (pp env rn false e2) ++ fnl () ++ - str"else" ++ fnl () ++ - str" " ++ hov 0 (pp env rn false e3)) - (* optimisations : then begin .... end else begin ... end *) - | While (b,inv,_,bl) -> - (str"while " ++ (pp env rn false b) ++ str" do" ++ fnl () ++ - str" " ++ - hov 0 ((match inv with - None -> (mt ()) - | Some c -> (str"(* invariant: " ++ pTERM c.a_value ++ - str" *)" ++ fnl ())) ++ - pp_block env rn bl) ++ fnl () ++ - str"done") - | Lam (bl,e) -> - let env' = traverse_binders env bl in - let rn' = rename_binders rn bl in - putpar par - (hov 2 (str"fun" ++ pr_binding rn' bl ++ str" ->" ++ - spc () ++ pp env' rn' false e)) - | SApp ((Var id)::_, [e1; e2]) - when id = connective_and or id = connective_or -> - let conn = if id = connective_and then "&" else "or" in - putpar par - (hov 0 (pp env rn true e1 ++ spc () ++ str conn ++ spc () ++ - pp env rn true e2)) - | SApp ((Var id)::_, [e]) when id = connective_not -> - putpar par - (hov 0 (str"not" ++ spc () ++ pp env rn true e)) - | SApp _ -> - invalid_arg "Prog_extract.pp_prog (SApp)" - | App(e1,[]) -> - hov 0 (pp env rn false e1) - | App (e1,l) -> - putpar true - (hov 2 (pp env rn true e1 ++ - prlist (function - Term p -> (spc () ++ pp env rn true p) - | Refarg x -> (spc () ++ pID (get_name env rn x)) - | Type _ -> (mt ())) - l)) - | LetRef (x,e1,e2) -> - let (_,v),_,_,_ = e1.info.kappa in - let env' = add (x,Ref v) env in - let rn',x' = rename_local rn x in - putpar par - (hov 0 (str"let " ++ pID x' ++ str" = ref " ++ pp env rn false e1 ++ - str" in" ++ fnl () ++ pp env' rn' false e2)) - | LetIn (x,e1,e2) -> - let (_,v),_,_,_ = e1.info.kappa in - let env' = add (x,v) env in - let rn',x' = rename_local rn x in - putpar par - (hov 0 (str"let " ++ pID x' ++ str" = " ++ pp env rn false e1 ++ - str" in" ++ fnl () ++ pp env' rn' false e2)) - | LetRec (f,bl,_,_,e) -> - let env' = traverse_binders env bl in - let rn' = rename_binders rn bl in - let env'' = add (f,make_arrow bl e.info.kappa) env' in - let rn'',f' = rename_local rn' f in - putpar par - (hov 0 (str"let rec " ++ pID f' ++ pr_binding rn' bl ++ str" =" ++ fnl () ++ - str" " ++ hov 0 (pp env'' rn'' false e) ++ fnl () ++ - str"in " ++ pID f')) - | Debug (_,e1) -> pp env rn par e1 - | PPoint (_,d) -> pp_d env rn par d - | Expression c -> - pp_constr env rn (extraction env c) - - and pp_block env rn bl = - let bl = - map_succeed (function Statement p -> p | _ -> failwith "caught") bl - in - prlist_with_sep (fun () -> (str";" ++ fnl ())) - (fun p -> hov 0 (pp env rn false p)) bl - - and pp env rn par p = - (pp_d env rn par p.desc) - - and pp_mut v c = match v with - | Ref _ -> - (str"ref " ++ pp_constr empty rn_empty (extraction empty c)) - | Array (n,_) -> - (str"Array.create " ++ cut () ++ - putpar true - (str"int_of_z " ++ - pp_constr empty rn_empty (extraction empty n)) ++ - str" " ++ pp_constr empty rn_empty (extraction empty c)) - | _ -> invalid_arg "pp_mut" - in - let v = lookup_global id in - let id' = rename_global id in - if is_mutable v then - try - let c = find_init id in - hov 0 (str"let " ++ pID id' ++ str" = " ++ pp_mut v c) - with Not_found -> - errorlabstrm "Prog_extract.pp_prog" - (str"The variable " ++ pID id ++ - str" must be initialized first !") - else - match find_pgm id with - | None -> - errorlabstrm "Prog_extract.pp_prog" - (str"The program " ++ pID id ++ - str" must be realized first !") - | Some p -> - let bl,p = collect_lambda p in - let rn = rename_binders rn_empty bl in - let env = traverse_binders empty bl in - hov 0 (str"let " ++ pID id' ++ pr_binding rn bl ++ str" =" ++ fnl () ++ - str" " ++ hov 2 (pp env rn false p)) - -(* extraction des programmes impératifs/fonctionnels vers ocaml *) - -(* Il faut parfois importer des modules non ouverts, sinon - * Ocaml.OCaml_pp_file.pp echoue en disant "machin is not a defined - * informative object". Cela dit, ce n'est pas tres satisfaisant, vu que - * la constante existe quand meme: il vaudrait mieux contourner l'echec - * de ml_import.fwsp_of_id - *) - -let import sp = match repr_path sp with - | [m],_,_ -> - begin - try Library.import_export_module m true - with _ -> () - end - | _ -> () - -let pp_ocaml file prm = - has_array := false ++ - (* on separe objects Coq et programmes *) - let cic,pgms = - List.fold_left - (fun (sp,ids) id -> - if is_global id then (sp,IdSet.add id ids) else (IdSet.add id sp,ids)) - (IdSet.empty,IdSet.empty) prm.needed - in - (* on met les programmes dans l'ordre et pour chacun on recherche les - * objects Coq necessaires, que l'on rajoute a l'ensemble cic *) - let cic,_,pgms = - let o_pgms = fold_all (fun (id,_) l -> id::l) empty [] in - List.fold_left - (fun (cic,pgms,pl) id -> - if IdSet.mem id pgms then - let spl,pgms' = - try - (match find_pgm id with - | Some p -> collect empty p - | None -> - (try - let c = find_init id in - spset_of_cci empty c,IdSet.empty - with Not_found -> - SpSet.empty,IdSet.empty)) - with Not_found -> SpSet.empty,IdSet.empty - in - let cic' = - SpSet.fold - (fun sp cic -> import sp ++ IdSet.add (basename sp) cic) - spl cic - in - (cic',IdSet.union pgms pgms',id::pl) - else - (cic,pgms,pl)) - (cic,pgms,[]) o_pgms - in - let cic = IdSet.elements cic in - (* on pretty-print *) - let prm' = { needed = cic ++ expand = prm.expand ++ - expansion = prm.expansion ++ exact = prm.exact } - in - let strm = (Ocaml.OCaml_pp_file.pp_recursive prm' ++ - fnl () ++ fnl () ++ - if !has_array then pp_conversions() else (mt ()) ++ - prlist (fun p -> (pp_prog p ++ fnl () ++ str";;" ++ fnl () ++ fnl ())) - pgms -) - in - (* puis on ecrit dans le fichier *) - let chan = open_trapping_failure open_out file ".ml" in - let ft = with_output_to chan in - begin - try pP_with ft strm ++ pp_flush_with ft () - with e -> pp_flush_with ft () ++ close_out chan ++ raise e - end ++ - close_out chan - - -(* Initializations of mutable objects *) - -let initialize id com = - let loc = Ast.loc com in - let c = constr_of_com (Evd.mt_evd()) (initial_sign()) com in - let ty = - Reductionops.nf_betaiota (type_of (Evd.mt_evd()) (initial_sign()) c) in - try - let v = lookup_global id in - let ety = match v with - | Ref (TypePure c) -> c | Array (_,TypePure c) -> c - | _ -> raise Not_found - in - if conv (Evd.mt_evd()) ty ety then - initialize id c - else - errorlabstrm "Prog_extract.initialize" - (str"Not the expected type for the mutable " ++ pID id) - with Not_found -> - errorlabstrm "Prog_extract.initialize" - (pr_id id ++ str" is not a mutable") - -(* grammaire *) - -open Vernacinterp - -let _ = vinterp_add "IMPERATIVEEXTRACTION" - (function - | VARG_STRING file :: rem -> - let prm = parse_param rem in (fun () -> pp_ocaml file prm) - | _ -> assert false) - -let _ = vinterp_add "INITIALIZE" - (function - | [VARG_IDENTIFIER id; VARG_COMMAND com] -> - (fun () -> initialize id com) - | _ -> assert false) diff --git a/contrib/correctness/pextract.mli b/contrib/correctness/pextract.mli deleted file mode 100644 index 3492729c..00000000 --- a/contrib/correctness/pextract.mli +++ /dev/null @@ -1,17 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* unit - - diff --git a/contrib/correctness/pmisc.ml b/contrib/correctness/pmisc.ml deleted file mode 100644 index 076b11cd..00000000 --- a/contrib/correctness/pmisc.ml +++ /dev/null @@ -1,222 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* [] - | Some x -> [x] - -let difference l1 l2 = - let rec diff = function - [] -> [] - | a::rem -> if List.mem a l2 then diff rem else a::(diff rem) - in - diff l1 - -(* TODO: these functions should be moved in the code of Coq *) - -let reraise_with_loc loc f x = - try f x with Util.UserError (_,_) as e -> Stdpp.raise_with_loc loc e - - -(* functions on names *) - -let at = if !Options.v7 then "@" else "'at'" - -let at_id id d = id_of_string ((string_of_id id) ^ at ^ d) - -let is_at id = - try - let _ = string_index_from (string_of_id id) 0 at in true - with Not_found -> - false - -let un_at id = - let s = string_of_id id in - try - let n = string_index_from s 0 at in - id_of_string (String.sub s 0 n), - String.sub s (n + String.length at) - (String.length s - n - String.length at) - with Not_found -> - invalid_arg "un_at" - -let renaming_of_ids avoid ids = - let rec rename avoid = function - [] -> [], avoid - | x::rem -> - let al,avoid = rename avoid rem in - let x' = next_ident_away x avoid in - (x,x')::al, x'::avoid - in - rename avoid ids - -let result_id = id_of_string "result" - -let adr_id id = id_of_string ("adr_" ^ (string_of_id id)) - -(* hypotheses names *) - -let next s r = function - Anonymous -> incr r; id_of_string (s ^ string_of_int !r) - | Name id -> id - -let reset_names,pre_name,post_name,inv_name, - test_name,bool_name,var_name,phi_name,for_name,label_name = - let pre = ref 0 in - let post = ref 0 in - let inv = ref 0 in - let test = ref 0 in - let bool = ref 0 in - let var = ref 0 in - let phi = ref 0 in - let forr = ref 0 in - let label = ref 0 in - (fun () -> - pre := 0; post := 0; inv := 0; test := 0; - bool := 0; var := 0; phi := 0; label := 0), - (next "Pre" pre), - (next "Post" post), - (next "Inv" inv), - (next "Test" test), - (fun () -> next "Bool" bool Anonymous), - (next "Variant" var), - (fun () -> next "rphi" phi Anonymous), - (fun () -> next "for" forr Anonymous), - (fun () -> string_of_id (next "Label" label Anonymous)) - -let default = id_of_string "x_" -let id_of_name = function Name id -> id | Anonymous -> default - - -(* functions on CIC terms *) - -let isevar = Evarutil.new_evar_in_sign (Global.env ()) - -(* Substitutions of variables by others. *) -let subst_in_constr alist = - let alist' = List.map (fun (id,id') -> (id, mkVar id')) alist in - replace_vars alist' - -(* -let subst_in_ast alist ast = - let rec subst = function - Nvar(l,s) -> Nvar(l,try List.assoc s alist with Not_found -> s) - | Node(l,s,args) -> Node(l,s,List.map subst args) - | Slam(l,so,a) -> Slam(l,so,subst a) (* TODO:enlever so de alist ? *) - | x -> x - in - subst ast -*) -(* -let subst_ast_in_ast alist ast = - let rec subst = function - Nvar(l,s) as x -> (try List.assoc s alist with Not_found -> x) - | Node(l,s,args) -> Node(l,s,List.map subst args) - | Slam(l,so,a) -> Slam(l,so,subst a) (* TODO:enlever so de alist ? *) - | x -> x - in - subst ast -*) - -let rec subst_in_ast alist = function - | CRef (Ident (loc,id)) -> - CRef (Ident (loc,(try List.assoc id alist with Not_found -> id))) - | x -> map_constr_expr_with_binders subst_in_ast List.remove_assoc alist x - -let rec subst_ast_in_ast alist = function - | CRef (Ident (_,id)) as x -> (try List.assoc id alist with Not_found -> x) - | x -> - map_constr_expr_with_binders subst_ast_in_ast List.remove_assoc alist x - -(* subst. of variables by constr *) -let real_subst_in_constr = replace_vars - -(* Coq constants *) - -let coq_constant d s = - Libnames.encode_kn - (make_dirpath (List.rev (List.map id_of_string ("Coq"::d)))) - (id_of_string s) - -let bool_sp = coq_constant ["Init"; "Datatypes"] "bool" -let coq_true = mkConstruct ((bool_sp,0),1) -let coq_false = mkConstruct ((bool_sp,0),2) - -let constant s = - let id = Constrextern.id_of_v7_string s in - Constrintern.global_reference id - -let connective_and = id_of_string "prog_bool_and" -let connective_or = id_of_string "prog_bool_or" -let connective_not = id_of_string "prog_bool_not" - -let is_connective id = - id = connective_and or id = connective_or or id = connective_not - -(* [conj i s] constructs the conjunction of two constr *) - -let conj i s = Term.applist (constant "and", [i; s]) - -(* [n_mkNamedProd v [xn,tn;...;x1,t1]] constructs the type - [(x1:t1)...(xn:tn)v] *) - -let rec n_mkNamedProd v = function - | [] -> v - | (id,ty) :: rem -> n_mkNamedProd (Term.mkNamedProd id ty v) rem - -(* [n_lambda v [xn,tn;...;x1,t1]] constructs the type [x1:t1]...[xn:tn]v *) - -let rec n_lambda v = function - | [] -> v - | (id,ty) :: rem -> n_lambda (Term.mkNamedLambda id ty v) rem - -(* [abstract env idl c] constructs [x1]...[xn]c where idl = [x1;...;xn] *) - -let abstract ids c = n_lambda c (List.rev ids) - -(* substitutivity (of kernel names, for modules management) *) - -open Ptype - -let rec type_v_knsubst s = function - | Ref v -> Ref (type_v_knsubst s v) - | Array (c, v) -> Array (subst_mps s c, type_v_knsubst s v) - | Arrow (bl, c) -> Arrow (List.map (binder_knsubst s) bl, type_c_knsubst s c) - | TypePure c -> TypePure (subst_mps s c) - -and type_c_knsubst s ((id,v),e,pl,q) = - ((id, type_v_knsubst s v), e, - List.map (fun p -> { p with p_value = subst_mps s p.p_value }) pl, - option_map (fun q -> { q with a_value = subst_mps s q.a_value }) q) - -and binder_knsubst s (id,b) = - (id, match b with BindType v -> BindType (type_v_knsubst s v) | _ -> b) diff --git a/contrib/correctness/pmisc.mli b/contrib/correctness/pmisc.mli deleted file mode 100644 index 9d96467f..00000000 --- a/contrib/correctness/pmisc.mli +++ /dev/null @@ -1,81 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* ('a -> 'b) -> 'a -> 'b - -val list_of_some : 'a option -> 'a list -val difference : 'a list -> 'a list -> 'a list - -val at_id : identifier -> string -> identifier -val un_at : identifier -> identifier * string -val is_at : identifier -> bool - -val result_id : identifier -val adr_id : identifier -> identifier - -val renaming_of_ids : identifier list -> identifier list - -> (identifier * identifier) list * identifier list - -val reset_names : unit -> unit -val pre_name : name -> identifier -val post_name : name -> identifier -val inv_name : name -> identifier -val test_name : name -> identifier -val bool_name : unit -> identifier -val var_name : name -> identifier -val phi_name : unit -> identifier -val for_name : unit -> identifier -val label_name : unit -> string - -val id_of_name : name -> identifier - -(* CIC terms *) - -val isevar : constr - -val subst_in_constr : (identifier * identifier) list -> constr -> constr -val subst_in_ast : (identifier * identifier) list -> constr_expr -> constr_expr -val subst_ast_in_ast : - (identifier * constr_expr) list -> constr_expr -> constr_expr -val real_subst_in_constr : (identifier * constr) list -> constr -> constr - -val constant : string -> constr -val coq_constant : string list -> string -> kernel_name -val conj : constr -> constr -> constr - -val coq_true : constr -val coq_false : constr - -val connective_and : identifier -val connective_or : identifier -val connective_not : identifier -val is_connective : identifier -> bool - -val n_mkNamedProd : constr -> (identifier * constr) list -> constr -val n_lambda : constr -> (identifier * constr) list -> constr -val abstract : (identifier * constr) list -> constr -> constr - -val type_v_knsubst : substitution -> type_v -> type_v -val type_c_knsubst : substitution -> type_c -> type_c - -(* for debugging purposes *) - -val deb_mess : Pp.std_ppcmds -> unit -val deb_print : ('a -> Pp.std_ppcmds) -> 'a -> unit - diff --git a/contrib/correctness/pmlize.ml b/contrib/correctness/pmlize.ml deleted file mode 100644 index e812fa57..00000000 --- a/contrib/correctness/pmlize.ml +++ /dev/null @@ -1,320 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* - let ids = get_reads eft in - let al = current_vars ren ids in - let c' = subst_in_constr al c in - if has_proof_part ren env c' then - CC_expr c' - else - let ty = trad_ml_type_v ren env tt in - make_tuple [ CC_expr c',ty ] qt ren env (current_date ren) - - | Variable id -> - if is_mutable_in_env env id then - invalid_arg "Mlise.trad_desc" - else if is_local env id then - CC_var id - else - CC_expr (constant (string_of_id id)) - - | Acc _ -> - failwith "Mlise.trad: pure terms are supposed to be expressions" - - | TabAcc (check, x, e1) -> - let _,ty_elem,_ = array_info ren env x in - let te1 = trad ren e1 in - let (_,ef1,p1,q1) = e1.info.kappa in - let w = get_writes ef1 in - let ren' = next ren w in - let id = id_of_string "index" in - let access = - make_raw_access ren' env (x,current_var ren' x) (mkVar id) - in - let t,ty = result_tuple ren' (current_date ren) env - (CC_expr access, ty_elem) (eft,qt) in - let t = - if check then - let h = make_pre_access ren env x (mkVar id) in - let_in_pre ty (anonymous_pre true h) t - else - t - in - make_let_in ren env te1 p1 - (current_vars ren' w,q1) (id,constant "Z") (t,ty) - - | Aff (x, e1) -> - let tx = trad_type_in_env ren env x in - let te1 = trad ren e1 in - let (_,ef1,p1,q1) = e1.info.kappa in - let w1 = get_writes ef1 in - let ren' = next ren (x::w1) in - let t_ty = result_tuple ren' (current_date ren) env - (CC_expr (constant "tt"), constant "unit") (eft,qt) - in - make_let_in ren env te1 p1 - (current_vars ren' w1,q1) (current_var ren' x,tx) t_ty - - | TabAff (check, x, e1, e2) -> - let _,ty_elem,ty_array = array_info ren env x in - let te1 = trad ren e1 in - let (_,ef1,p1,q1) = e1.info.kappa in - let w1 = get_writes ef1 in - let ren' = next ren w1 in - let te2 = trad ren' e2 in - let (_,ef2,p2,q2) = e2.info.kappa in - let w2 = get_writes ef2 in - let ren'' = next ren' w2 in - let id1 = id_of_string "index" in - let id2 = id_of_string "v" in - let ren''' = next ren'' [x] in - let t,ty = result_tuple ren''' (current_date ren) env - (CC_expr (constant "tt"), constant "unit") (eft,qt) in - let store = make_raw_store ren'' env (x,current_var ren'' x) (mkVar id1) - (mkVar id2) in - let t = make_let_in ren'' env (CC_expr store) [] ([],None) - (current_var ren''' x,ty_array) (t,ty) in - let t = make_let_in ren' env te2 p2 - (current_vars ren'' w2,q2) (id2,ty_elem) (t,ty) in - let t = - if check then - let h = make_pre_access ren' env x (mkVar id1) in - let_in_pre ty (anonymous_pre true h) t - else - t - in - make_let_in ren env te1 p1 - (current_vars ren' w1,q1) (id1,constant "Z") (t,ty) - - | Seq bl -> - let before = current_date ren in - let finish ren = function - Some (id,ty) -> - result_tuple ren before env (CC_var id, ty) (eft,qt) - | None -> - failwith "a block should contain at least one statement" - in - let bl = trad_block ren env bl in - make_block ren env finish bl - - | If (b, e1, e2) -> - let tb = trad ren b in - let _,efb,_,_ = b.info.kappa in - let ren' = next ren (get_writes efb) in - let te1 = trad ren' e1 in - let te2 = trad ren' e2 in - make_if ren env (tb,b.info.kappa) ren' (te1,e1.info.kappa) - (te2,e2.info.kappa) ct - - (* Translation of the while. *) - - | While (b, inv, var, bl) -> - let ren' = next ren (get_writes eft) in - let tb = trad ren' b in - let tbl = trad_block ren' env bl in - let var' = typed_var ren env var in - make_while ren env var' (tb,b.info.kappa) tbl (inv,ct) - - | Lam (bl, e) -> - let bl' = trad_binders ren env bl in - let env' = traverse_binders env bl in - let ren' = initial_renaming env' in - let te = trans ren' e in - CC_lam (bl', te) - - | SApp ([Variable id; Expression q1; Expression q2], [e1; e2]) - when id = connective_and or id = connective_or -> - let c = constant (string_of_id id) in - let te1 = trad ren e1 - and te2 = trad ren e2 in - let q1' = apply_post ren env (current_date ren) (anonymous q1) - and q2' = apply_post ren env (current_date ren) (anonymous q2) in - CC_app (CC_expr c, [CC_expr q1'.a_value; CC_expr q2'.a_value; te1; te2]) - - | SApp ([Variable id; Expression q], [e]) when id = connective_not -> - let c = constant (string_of_id id) in - let te = trad ren e in - let q' = apply_post ren env (current_date ren) (anonymous q) in - CC_app (CC_expr c, [CC_expr q'.a_value; te]) - - | SApp _ -> - invalid_arg "mlise.trad (SApp)" - - | Apply (f, args) -> - let trad_arg (ren,args) = function - | Term a -> - let ((_,tya),efa,_,_) as ca = a.info.kappa in - let ta = trad ren a in - let w = get_writes efa in - let ren' = next ren w in - ren', ta::args - | Refarg _ -> - ren, args - | Type v -> - let c = trad_ml_type_v ren env v in - ren, (CC_expr c)::args - in - let ren',targs = List.fold_left trad_arg (ren,[]) args in - let tf = trad ren' f in - let cf = f.info.kappa in - let c,(s,_,_),capp = effect_app ren env f args in - let tc_args = - List.combine - (List.rev targs) - (Util.map_succeed - (function - | Term x -> x.info.kappa - | Refarg _ -> failwith "caught" - | Type _ -> - (result_id,TypePure mkSet),Peffect.bottom,[],None) - args) - in - make_app env ren tc_args ren' (tf,cf) (c,s,capp) ct - - | LetRef (x, e1, e2) -> - let (_,v1),ef1,p1,q1 = e1.info.kappa in - let te1 = trad ren e1 in - let tv1 = trad_ml_type_v ren env v1 in - let env' = add (x,Ref v1) env in - let ren' = next ren [x] in - let (_,v2),ef2,p2,q2 = e2.info.kappa in - let tv2 = trad_ml_type_v ren' env' v2 in - let te2 = trad ren' e2 in - let ren'' = next ren' (get_writes ef2) in - let t,ty = result_tuple ren'' (current_date ren) env - (CC_var result_id, tv2) (eft,qt) in - let t = make_let_in ren' env' te2 p2 - (current_vars ren'' (get_writes ef2),q2) - (result_id,tv2) (t,ty) in - let t = make_let_in ren env te1 p1 - (current_vars ren' (get_writes ef1),q1) (x,tv1) (t,ty) - in - t - - | Let (x, e1, e2) -> - let (_,v1),ef1,p1,q1 = e1.info.kappa in - let te1 = trad ren e1 in - let tv1 = trad_ml_type_v ren env v1 in - let env' = add (x,v1) env in - let ren' = next ren (get_writes ef1) in - let (_,v2),ef2,p2,q2 = e2.info.kappa in - let tv2 = trad_ml_type_v ren' env' v2 in - let te2 = trad ren' e2 in - let ren'' = next ren' (get_writes ef2) in - let t,ty = result_tuple ren'' (current_date ren) env - (CC_var result_id, tv2) (eft,qt) in - let t = make_let_in ren' env' te2 p2 - (current_vars ren'' (get_writes ef2),q2) - (result_id,tv2) (t,ty) in - let t = make_let_in ren env te1 p1 - (current_vars ren' (get_writes ef1),q1) (x,tv1) (t,ty) - in - t - - | LetRec (f,bl,v,var,e) -> - let (_,ef,_,_) as c = - match tt with Arrow(_,c) -> c | _ -> assert false in - let bl' = trad_binders ren env bl in - let env' = traverse_binders env bl in - let ren' = initial_renaming env' in - let (phi0,var') = find_recursion f e.info.env in - let te = trad ren' e in - let t = make_letrec ren' env' (phi0,var') f bl' (te,e.info.kappa) c in - CC_lam (bl', t) - - | PPoint (s,d) -> - let ren' = push_date ren s in - trad_desc ren' env ct d - - | Debug _ -> failwith "Mlise.trad: Debug: not implemented" - - -and trad_binders ren env = function - | [] -> - [] - | (_,BindType (Ref _ | Array _))::bl -> - trad_binders ren env bl - | (id,BindType v)::bl -> - let tt = trad_ml_type_v ren env v in - (id, CC_typed_binder tt) :: (trad_binders ren env bl) - | (id,BindSet)::bl -> - (id, CC_typed_binder mkSet) :: (trad_binders ren env bl) - | (_,Untyped)::_ -> invalid_arg "trad_binders" - - -and trad_block ren env = function - | [] -> - [] - | (Assert c)::block -> - (Assert c)::(trad_block ren env block) - | (Label s)::block -> - let ren' = push_date ren s in - (Label s)::(trad_block ren' env block) - | (Statement e)::block -> - let te = trad ren e in - let _,efe,_,_ = e.info.kappa in - let w = get_writes efe in - let ren' = next ren w in - (Statement (te,e.info.kappa))::(trad_block ren' env block) - - -and trans ren e = - let env = e.info.env in - let _,ef,p,_ = e.info.kappa in - let ty = trad_ml_type_c ren env e.info.kappa in - let ids = get_reads ef in - let al = current_vars ren ids in - let c = trad ren e in - let c = abs_pre ren env (c,ty) p in - let bl = binding_of_alist ren env al in - make_abs (List.rev bl) c - diff --git a/contrib/correctness/pmlize.mli b/contrib/correctness/pmlize.mli deleted file mode 100644 index 1f8936f0..00000000 --- a/contrib/correctness/pmlize.mli +++ /dev/null @@ -1,20 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* typed_program -> cc_term - diff --git a/contrib/correctness/pmonad.ml b/contrib/correctness/pmonad.ml deleted file mode 100644 index 8f1b5946..00000000 --- a/contrib/correctness/pmonad.ml +++ /dev/null @@ -1,665 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* "prod" - | n -> check_product_n n; Printf.sprintf "tuple_%d" n - -let dep_product_name = function - | 1 -> "sig" - | n -> check_dep_product_n n; Printf.sprintf "sig_%d" n - -let product ren env before lo = function - | None -> (* non dependent case *) - begin match lo with - | [_,v] -> v - | _ -> - let s = product_name (List.length lo) in - Term.applist (constant s, List.map snd lo) - end - | Some q -> (* dependent case *) - let s = dep_product_name (List.length lo) in - let a' = apply_post ren env before q in - Term.applist (constant s, (List.map snd lo) @ [a'.a_value]) - -(* [arrow ren v pl] abstracts the term v over the pre-condition if any - * i.e. computes - * - * (P1 x1 ... xn) -> ... -> (Pk x1 ... xn) -> v - * - * where the xi are given by the renaming [ren]. - *) - -let arrow ren env v pl = - List.fold_left - (fun t p -> - if p.p_assert then t else Term.mkArrow (apply_pre ren env p).p_value t) - v pl - -(* [abstract_post ren env (e,q) (res,v)] abstract a post-condition q - * over the write-variables of e *) - -let rec abstract_post ren env (e,q) = - let after_id id = id_of_string ((string_of_id id) ^ "'") in - let (_,go) = Peffect.get_repr e in - let al = List.map (fun id -> (id,after_id id)) go in - let q = option_map (named_app (subst_in_constr al)) q in - let tgo = List.map (fun (id,aid) -> (aid, trad_type_in_env ren env id)) al in - option_map (named_app (abstract tgo)) q - -(* Translation of effects types in cic types. - * - * [trad_ml_type_v] and [trad_ml_type_c] translate types with effects - * into cic types. - *) - -and prod ren env g = - List.map - (fun id -> (current_var ren id, trad_type_in_env ren env id)) - g - -and input ren env e = - let i,_ = Peffect.get_repr e in - prod ren env i - -and output ren env ((id,v),e) = - let tv = trad_ml_type_v ren env v in - let _,o = Peffect.get_repr e in - (prod ren env o) @ [id,tv] - -and input_output ren env c = - let ((res,v),e,_,_) = c in - input ren env e, output ren env ((res,v),e) - -(* The function t -> \barre{t} on V and C. *) - -and trad_ml_type_c ren env c = - let ((res,v),e,p,q) = c in - let q = abstract_post ren env (e,q) in - let lo = output ren env ((res,v),e) in - let ty = product ren env (current_date ren) lo q in - let ty = arrow ren env ty p in - let li = input ren env e in - n_mkNamedProd ty li - -and trad_ml_type_v ren env = function - - | Ref _ | Array _ -> invalid_arg "Monad.trad_ml_type_v" - - | Arrow (bl, c) -> - let bl',ren',env' = - List.fold_left - (fun (bl,ren,env) b -> match b with - | (id,BindType ((Ref _ | Array _) as v)) -> - let env' = add (id,v) env in - let ren' = initial_renaming env' in - (bl,ren',env') - | (id,BindType v) -> - let tt = trad_ml_type_v ren env v in - let env' = add (id,v) env in - let ren' = initial_renaming env' in - (id,tt)::bl,ren',env' - | (id, BindSet) -> - (id,mkSet) :: bl,ren,env - | _ -> failwith "Monad: trad_ml_type_v: not yet implemented" - ) - ([],ren,env) bl - in - n_mkNamedProd (trad_ml_type_c ren' env' c) bl' - - | TypePure c -> - (apply_pre ren env (anonymous_pre false c)).p_value - -and trad_imp_type ren env = function - | Ref v -> trad_ml_type_v ren env v - | Array (c,v) -> Term.applist (constant "array", - [c; trad_ml_type_v ren env v]) - | _ -> invalid_arg "Monad.trad_imp_type" - -and trad_type_in_env ren env id = - let v = type_in_env env id in trad_imp_type ren env v - - - -(* bindings *) - -let binding_of_alist ren env al = - List.map - (fun (id,id') -> (id', CC_typed_binder (trad_type_in_env ren env id))) - al - - -(* [make_abs bl t p] abstracts t w.r.t binding list bl., that is - * [x1:t1]...[xn:tn]t. Returns t if the binding is empty. *) - -let make_abs bl t = match bl with - | [] -> t - | _ -> CC_lam (bl, t) - - -(* [result_tuple ren before env (res,v) (ef,q)] constructs the tuple - * - * (y1,...,yn,res,?::(q/ren y1 ... yn res)) - * - * where the yi are the values of the output of ef. - * if there is no yi and no post-condition, it is simplified in res itself. - *) - -let simple_constr_of_prog = function - | CC_expr c -> c - | CC_var id -> mkVar id - | _ -> assert false - -let make_tuple l q ren env before = match l with - | [e,_] when q = None -> - e - | _ -> - let tl = List.map snd l in - let dep,h,th = match q with - | None -> false,[],[] - | Some c -> - let args = List.map (fun (e,_) -> simple_constr_of_prog e) l in - let c = apply_post ren env before c in - true, - [ CC_hole (Term.applist (c.a_value, args)) ], (* hole *) - [ c.a_value ] (* type of the hole *) - in - CC_tuple (dep, tl @ th, (List.map fst l) @ h) - -let result_tuple ren before env (res,v) (ef,q) = - let ids = get_writes ef in - let lo = - (List.map (fun id -> - let id' = current_var ren id in - CC_var id', trad_type_in_env ren env id) ids) - @ [res,v] - in - let q = abstract_post ren env (ef,q) in - make_tuple lo q ren env before, - product ren env before lo q - - -(* [make_let_in ren env fe p (vo,q) (res,v) t] constructs the term - - [ let h1 = ?:P1 in ... let hn = ?:Pm in ] - let y1,y2,...,yn, res [,q] = fe in - t - - vo=[_,y1;...;_,ym] are list of renamings. - v is the type of res - *) - -let let_in_pre ty p t = - let h = p.p_value in - CC_letin (false, ty, [pre_name p.p_name,CC_typed_binder h], CC_hole h, t) - -let multiple_let_in_pre ty hl t = - List.fold_left (fun t h -> let_in_pre ty h t) t hl - -let make_let_in ren env fe p (vo,q) (res,tyres) (t,ty) = - let b = [res, CC_typed_binder tyres] in - let b',dep = match q with - | None -> [],false - | Some q -> [post_name q.a_name, CC_untyped_binder],true - in - let bl = (binding_of_alist ren env vo) @ b @ b' in - let tyapp = - let n = succ (List.length vo) in - let name = match q with None -> product_name n | _ -> dep_product_name n in - constant name - in - let t = CC_letin (dep, ty, bl, fe, t) in - multiple_let_in_pre ty (List.map (apply_pre ren env) p) t - - -(* [abs_pre ren env (t,ty) pl] abstracts a term t with respect to the - * list of pre-conditions [pl]. Some of them are real pre-conditions - * and others are assertions, according to the boolean field p_assert, - * so we construct the term - * [h1:P1]...[hn:Pn]let h'1 = ?:P'1 in ... let H'm = ?:P'm in t - *) - -let abs_pre ren env (t,ty) pl = - List.fold_left - (fun t p -> - if p.p_assert then - let_in_pre ty (apply_pre ren env p) t - else - let h = pre_name p.p_name in - CC_lam ([h,CC_typed_binder (apply_pre ren env p).p_value],t)) - t pl - - -(* [make_block ren env finish bl] builds the translation of a block - * finish is the function that is applied to the result at the end of the - * block. *) - -let make_block ren env finish bl = - let rec rec_block ren result = function - | [] -> - finish ren result - | (Assert c) :: block -> - let t,ty = rec_block ren result block in - let c = apply_assert ren env c in - let p = { p_assert = true; p_name = c.a_name; p_value = c.a_value } in - let_in_pre ty p t, ty - | (Label s) :: block -> - let ren' = push_date ren s in - rec_block ren' result block - | (Statement (te,info)) :: block -> - let (_,tye),efe,pe,qe = info in - let w = get_writes efe in - let ren' = next ren w in - let id = result_id in - let tye = trad_ml_type_v ren env tye in - let t = rec_block ren' (Some (id,tye)) block in - make_let_in ren env te pe (current_vars ren' w,qe) (id,tye) t, - snd t - in - let t,_ = rec_block ren None bl in - t - - -(* [make_app env ren args ren' (tf,cf) (cb,s,capp) c] - * constructs the application of [tf] to [args]. - * capp is the effect of application, after substitution (s) and cb before - *) - -let eq ty e1 e2 = - Term.applist (constant "eq", [ty; e1; e2]) - -let lt r e1 e2 = - Term.applist (r, [e1; e2]) - -let is_recursive env = function - | CC_var x -> - (try let _ = find_recursion x env in true with Not_found -> false) - | _ -> false - -let if_recursion env f = function - | CC_var x -> - (try let v = find_recursion x env in (f v x) with Not_found -> []) - | _ -> [] - -let dec_phi ren env s svi = - if_recursion env - (fun (phi0,(cphi,r,_)) f -> - let phi = subst_in_constr svi (subst_in_constr s cphi) in - let phi = (apply_pre ren env (anonymous_pre true phi)).p_value in - [CC_expr phi; CC_hole (lt r phi (mkVar phi0))]) - -let eq_phi ren env s svi = - if_recursion env - (fun (phi0,(cphi,_,a)) f -> - let phi = subst_in_constr svi (subst_in_constr s cphi) in - let phi = (apply_pre ren env (anonymous_pre true phi)).p_value in - [CC_hole (eq a phi phi)]) - -let is_ref_binder = function - | (_,BindType (Ref _ | Array _)) -> true - | _ -> false - -let make_app env ren args ren' (tf,cf) ((bl,cb),s,capp) c = - let ((_,tvf),ef,pf,qf) = cf in - let (_,eapp,papp,qapp) = capp in - let ((_,v),e,p,q) = c in - let bl = List.filter (fun b -> not (is_ref_binder b)) bl in - let recur = is_recursive env tf in - let before = current_date ren in - let ren'' = next ren' (get_writes ef) in - let ren''' = next ren'' (get_writes eapp) in - let res = result_id in - let vi,svi = - let ids = List.map fst bl in - let s = fresh (avoid ren ids) ids in - List.map snd s, s - in - let tyres = subst_in_constr svi (trad_ml_type_v ren env v) in - let t,ty = result_tuple ren''' before env (CC_var res, tyres) (e,q) in - let res_f = id_of_string "vf" in - let inf,outf = - let i,o = let _,e,_,_ = cb in get_reads e, get_writes e in - let apply_s = List.map (fun id -> try List.assoc id s with _ -> id) in - apply_s i, apply_s o - in - let fe = - let xi = List.rev (List.map snd (current_vars ren'' inf)) in - let holes = List.map (fun x -> (apply_pre ren'' env x).p_value) - (List.map (pre_app (subst_in_constr svi)) papp) in - CC_app ((if recur then tf else CC_var res_f), - (dec_phi ren'' env s svi tf) - @(List.map (fun id -> CC_var id) (vi @ xi)) - @(eq_phi ren'' env s svi tf) - @(List.map (fun c -> CC_hole c) holes)) - in - let qapp' = option_map (named_app (subst_in_constr svi)) qapp in - let t = - make_let_in ren'' env fe [] (current_vars ren''' outf,qapp') - (res,tyres) (t,ty) - in - let t = - if recur then - t - else - make_let_in ren' env tf pf - (current_vars ren'' (get_writes ef),qf) - (res_f,trad_ml_type_v ren env tvf) (t,ty) - in - let rec eval_args ren = function - | [] -> t - | (vx,(ta,((_,tva),ea,pa,qa)))::args -> - let w = get_writes ea in - let ren' = next ren w in - let t' = eval_args ren' args in - make_let_in ren env ta pa (current_vars ren' (get_writes ea),qa) - (vx,trad_ml_type_v ren env tva) (t',ty) - in - eval_args ren (List.combine vi args) - - -(* [make_if ren env (tb,cb) ren' (t1,c1) (t2,c2)] - * constructs the term corresponding to a if expression, i.e - * - * [p] let o1, b [,q1] = m1 [?::p1] in - * Cases b of - * R => let o2, v2 [,q2] = t1 [?::p2] in - * (proj (o1,o2)), v2 [,?::q] - * | S => let o2, v2 [,q2] = t2 [?::p2] in - * (proj (o1,o2)), v2 [,?::q] - *) - -let make_if_case ren env ty (b,qb) (br1,br2) = - let id_b,ty',ty1,ty2 = match qb with - | Some q -> - let q = apply_post ren env (current_date ren) q in - let (name,t1,t2) = Term.destLambda q.a_value in - q.a_name, - Term.mkLambda (name, t1, mkArrow t2 ty), - Term.mkApp (q.a_value, [| coq_true |]), - Term.mkApp (q.a_value, [| coq_false |]) - | None -> assert false - in - let n = test_name Anonymous in - CC_app (CC_case (ty', b, [CC_lam ([n,CC_typed_binder ty1], br1); - CC_lam ([n,CC_typed_binder ty2], br2)]), - [CC_var (post_name id_b)]) - -let make_if ren env (tb,cb) ren' (t1,c1) (t2,c2) c = - let ((_,tvb),eb,pb,qb) = cb in - let ((_,tv1),e1,p1,q1) = c1 in - let ((_,tv2),e2,p2,q2) = c2 in - let ((_,t),e,p,q) = c in - - let wb = get_writes eb in - let resb = id_of_string "resultb" in - let res = result_id in - let tyb = trad_ml_type_v ren' env tvb in - let tt = trad_ml_type_v ren env t in - - (* une branche de if *) - let branch (tv_br,e_br,p_br,q_br) f_br = - let w_br = get_writes e_br in - let ren'' = next ren' w_br in - let t,ty = result_tuple ren'' (current_date ren') env - (CC_var res,tt) (e,q) in - make_let_in ren' env f_br p_br (current_vars ren'' w_br,q_br) - (res,tt) (t,ty), - ty - in - let t1,ty1 = branch c1 t1 in - let t2,ty2 = branch c2 t2 in - let ty = ty1 in - let qb = force_bool_name qb in - let t = make_if_case ren env ty (CC_var resb,qb) (t1,t2) in - make_let_in ren env tb pb (current_vars ren' wb,qb) (resb,tyb) (t,ty) - - -(* [make_while ren env (cphi,r,a) (tb,cb) (te,ce) c] - * constructs the term corresponding to the while, i.e. - * - * [h:(I x)](well_founded_induction - * A R ?::(well_founded A R) - * [Phi:A] (x) Phi=phi(x)->(I x)-> \exists x'.res.(I x')/\(S x') - * [Phi_0:A][w:(Phi:A)(Phi ...] - * [x][eq:Phi_0=phi(x)][h:(I x)] - * Cases (b x) of - * (left HH) => (x,?::(IS x)) - * | (right HH) => let x1,_,_ = (e x ?) in - * (w phi(x1) ? x1 ? ?) - * phi(x) x ? ?) - *) - -let id_phi = id_of_string "phi" -let id_phi0 = id_of_string "phi0" - -let make_body_while ren env phi_of a r id_phi0 id_w (tb,cb) tbl (i,c) = - let ((_,tvb),eb,pb,qb) = cb in - let (_,ef,_,is) = c in - - let ren' = next ren (get_writes ef) in - let before = current_date ren in - - let ty = - let is = abstract_post ren' env (ef,is) in - let _,lo = input_output ren env c in - product ren env before lo is - in - let resb = id_of_string "resultb" in - let tyb = trad_ml_type_v ren' env tvb in - let wb = get_writes eb in - - (* première branche: le test est vrai => e;w *) - let t1 = - make_block ren' env - (fun ren'' result -> match result with - | Some (id,_) -> - let v = List.rev (current_vars ren'' (get_writes ef)) in - CC_app (CC_var id_w, - [CC_expr (phi_of ren''); - CC_hole (lt r (phi_of ren'') (mkVar id_phi0))] - @(List.map (fun (_,id) -> CC_var id) v) - @(CC_hole (eq a (phi_of ren'') (phi_of ren''))) - ::(match i with - | None -> [] - | Some c -> - [CC_hole (apply_assert ren'' env c).a_value])), - ty - | None -> failwith "a block should contain at least one statement") - tbl - in - - (* deuxième branche: le test est faux => on sort de la boucle *) - let t2,_ = - result_tuple ren' before env - (CC_expr (constant "tt"),constant "unit") (ef,is) - in - - let b_al = current_vars ren' (get_reads eb) in - let qb = force_bool_name qb in - let t = make_if_case ren' env ty (CC_var resb,qb) (t1,t2) in - let t = - make_let_in ren' env tb pb (current_vars ren' wb,qb) (resb,tyb) (t,ty) - in - let t = - let pl = List.map (pre_of_assert false) (list_of_some i) in - abs_pre ren' env (t,ty) pl - in - let t = - CC_lam ([var_name Anonymous, - CC_typed_binder (eq a (mkVar id_phi0) (phi_of ren'))],t) - in - let bl = binding_of_alist ren env (current_vars ren' (get_writes ef)) in - make_abs (List.rev bl) t - - -let make_while ren env (cphi,r,a) (tb,cb) tbl (i,c) = - let (_,ef,_,is) = c in - let phi_of ren = (apply_pre ren env (anonymous_pre true cphi)).p_value in - let wf_a_r = Term.applist (constant "well_founded", [a; r]) in - - let before = current_date ren in - let ren' = next ren (get_writes ef) in - let al = current_vars ren' (get_writes ef) in - let v = - let _,lo = input_output ren env c in - let is = abstract_post ren' env (ef,is) in - match i with - | None -> product ren' env before lo is - | Some ci -> - Term.mkArrow (apply_assert ren' env ci).a_value - (product ren' env before lo is) - in - let v = Term.mkArrow (eq a (mkVar id_phi) (phi_of ren')) v in - let v = - n_mkNamedProd v - (List.map (fun (id,id') -> (id',trad_type_in_env ren env id)) al) - in - let tw = - Term.mkNamedProd id_phi a - (Term.mkArrow (lt r (mkVar id_phi) (mkVar id_phi0)) v) - in - let id_w = id_of_string "loop" in - let vars = List.rev (current_vars ren (get_writes ef)) in - let body = - make_body_while ren env phi_of a r id_phi0 id_w (tb,cb) tbl (i,c) - in - CC_app (CC_expr (constant "well_founded_induction"), - [CC_expr a; CC_expr r; - CC_hole wf_a_r; - CC_expr (Term.mkNamedLambda id_phi a v); - CC_lam ([id_phi0, CC_typed_binder a; - id_w, CC_typed_binder tw], - body); - CC_expr (phi_of ren)] - @(List.map (fun (_,id) -> CC_var id) vars) - @(CC_hole (eq a (phi_of ren) (phi_of ren))) - ::(match i with - | None -> [] - | Some c -> [CC_hole (apply_assert ren env c).a_value])) - - -(* [make_letrec ren env (phi0,(cphi,r,a)) bl (te,ce) c] - * constructs the term corresponding to the let rec i.e. - * - * [x][h:P(x)](well_founded_induction - * A R ?::(well_founded A R) - * [Phi:A] (bl) (x) Phi=phi(x)->(P x)-> \exists x'.res.(Q x x') - * [Phi_0:A][w:(Phi:A)(Phi ...] - * [bl][x][eq:Phi_0=phi(x)][h:(P x)]te - * phi(x) bl x ? ?) - *) - -let make_letrec ren env (id_phi0,(cphi,r,a)) idf bl (te,ce) c = - let (_,ef,p,q) = c in - let phi_of ren = (apply_pre ren env (anonymous_pre true cphi)).p_value in - let wf_a_r = Term.applist (constant "well_founded", [a; r]) in - - let before = current_date ren in - let al = current_vars ren (get_reads ef) in - let v = - let _,lo = input_output ren env c in - let q = abstract_post ren env (ef,q) in - arrow ren env (product ren env (current_date ren) lo q) p - in - let v = Term.mkArrow (eq a (mkVar id_phi) (phi_of ren)) v in - let v = - n_mkNamedProd v - (List.map (fun (id,id') -> (id',trad_type_in_env ren env id)) al) - in - let v = - n_mkNamedProd v - (List.map (function (id,CC_typed_binder c) -> (id,c) - | _ -> assert false) (List.rev bl)) - in - let tw = - Term.mkNamedProd id_phi a - (Term.mkArrow (lt r (mkVar id_phi) (mkVar id_phi0)) v) - in - let vars = List.rev (current_vars ren (get_reads ef)) in - let body = - let al = current_vars ren (get_reads ef) in - let bod = abs_pre ren env (te,v) p in - let bod = CC_lam ([var_name Anonymous, - CC_typed_binder (eq a (mkVar id_phi0) (phi_of ren))], - bod) - in - let bl' = binding_of_alist ren env al in - make_abs (bl@(List.rev bl')) bod - in - let t = - CC_app (CC_expr (constant "well_founded_induction"), - [CC_expr a; CC_expr r; - CC_hole wf_a_r; - CC_expr (Term.mkNamedLambda id_phi a v); - CC_lam ([id_phi0, CC_typed_binder a; - idf, CC_typed_binder tw], - body); - CC_expr (phi_of ren)] - @(List.map (fun (id,_) -> CC_var id) bl) - @(List.map (fun (_,id) -> CC_var id) vars) - @[CC_hole (eq a (phi_of ren) (phi_of ren))] - ) - in - (* on abstrait juste par rapport aux variables de ef *) - let al = current_vars ren (get_reads ef) in - let bl = binding_of_alist ren env al in - make_abs (List.rev bl) t - - -(* [make_access env id c] Access in array id. - * - * Constructs [t:(array s T)](access_g s T t c ?::(lt c s)). - *) - -let array_info ren env id = - let ty = type_in_env env id in - let size,v = dearray_type ty in - let ty_elem = trad_ml_type_v ren env v in - let ty_array = trad_imp_type ren env ty in - size,ty_elem,ty_array - -let make_raw_access ren env (id,id') c = - let size,ty_elem,_ = array_info ren env id in - Term.applist (constant "access", [size; ty_elem; mkVar id'; c]) - -let make_pre_access ren env id c = - let size,_,_ = array_info ren env id in - conj (lt (constant "Zle") (constant "ZERO") c) - (lt (constant "Zlt") c size) - -let make_raw_store ren env (id,id') c1 c2 = - let size,ty_elem,_ = array_info ren env id in - Term.applist (constant "store", [size; ty_elem; mkVar id'; c1; c2]) diff --git a/contrib/correctness/pmonad.mli b/contrib/correctness/pmonad.mli deleted file mode 100644 index a46a040e..00000000 --- a/contrib/correctness/pmonad.mli +++ /dev/null @@ -1,106 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* local_env -> type_v -> constr -val trad_ml_type_c : Prename.t -> local_env -> type_c -> constr -val trad_imp_type : Prename.t -> local_env -> type_v -> constr -val trad_type_in_env : Prename.t -> local_env -> identifier -> constr - -val binding_of_alist : Prename.t -> local_env - -> (identifier * identifier) list - -> cc_binder list -val make_abs : cc_binder list -> cc_term -> cc_term -val abs_pre : Prename.t -> local_env -> cc_term * constr -> - constr precondition list -> cc_term - -(* The following functions translate the main constructions *) - -val make_tuple : (cc_term * cc_type) list -> predicate option - -> Prename.t -> local_env -> string - -> cc_term - -val result_tuple : Prename.t -> string -> local_env - -> (cc_term * constr) -> (Peffect.t * predicate option) - -> cc_term * constr - -val let_in_pre : constr -> constr precondition -> cc_term -> cc_term - -val make_let_in : Prename.t -> local_env -> cc_term - -> constr precondition list - -> ((identifier * identifier) list * predicate option) - -> identifier * constr - -> cc_term * constr -> cc_term - -val make_block : Prename.t -> local_env - -> (Prename.t -> (identifier * constr) option -> cc_term * constr) - -> (cc_term * type_c, constr) block - -> cc_term - -val make_app : local_env - -> Prename.t -> (cc_term * type_c) list - -> Prename.t -> cc_term * type_c - -> ((type_v binder list) * type_c) - * ((identifier*identifier) list) - * type_c - -> type_c - -> cc_term - -val make_if : Prename.t -> local_env - -> cc_term * type_c - -> Prename.t - -> cc_term * type_c - -> cc_term * type_c - -> type_c - -> cc_term - -val make_while : Prename.t -> local_env - -> (constr * constr * constr) (* typed variant *) - -> cc_term * type_c - -> (cc_term * type_c, constr) block - -> constr assertion option * type_c - -> cc_term - -val make_letrec : Prename.t -> local_env - -> (identifier * (constr * constr * constr)) (* typed variant *) - -> identifier (* the name of the function *) - -> (cc_binder list) - -> (cc_term * type_c) - -> type_c - -> cc_term - -(* Functions to translate array operations *) - -val array_info : - Prename.t -> local_env -> identifier -> constr * constr * constr - -val make_raw_access : - Prename.t -> local_env -> identifier * identifier -> constr -> constr - -val make_raw_store : - Prename.t -> local_env -> identifier * identifier - -> constr -> constr -> constr - -val make_pre_access : - Prename.t -> local_env -> identifier -> constr -> constr - diff --git a/contrib/correctness/pred.ml b/contrib/correctness/pred.ml deleted file mode 100644 index 669727fc..00000000 --- a/contrib/correctness/pred.ml +++ /dev/null @@ -1,115 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* - (try CC_expr (List.assoc id subst) with Not_found -> c) - | CC_letin (b,ty,bl,c1,c2) -> - CC_letin (b, real_subst_in_constr subst ty, cc_subst_binders subst bl, - cc_subst subst c1, cc_subst (cc_cross_binders subst bl) c2) - | CC_lam (bl, c) -> - CC_lam (cc_subst_binders subst bl, - cc_subst (cc_cross_binders subst bl) c) - | CC_app (c, cl) -> - CC_app (cc_subst subst c, List.map (cc_subst subst) cl) - | CC_tuple (b, tl, cl) -> - CC_tuple (b, List.map (real_subst_in_constr subst) tl, - List.map (cc_subst subst) cl) - | CC_case (ty, c, cl) -> - CC_case (real_subst_in_constr subst ty, cc_subst subst c, - List.map (cc_subst subst) cl) - | CC_expr c -> - CC_expr (real_subst_in_constr subst c) - | CC_hole ty -> - CC_hole (real_subst_in_constr subst ty) - -and cc_subst_binders subst = List.map (cc_subst_binder subst) - -and cc_subst_binder subst = function - | id,CC_typed_binder c -> id,CC_typed_binder (real_subst_in_constr subst c) - | b -> b - -and cc_cross_binders subst = function - | [] -> subst - | (id,_) :: bl -> cc_cross_binders (List.remove_assoc id subst) bl - -(* here we only perform eta-reductions on programs to eliminate - * redexes of the kind - * - * let (x1,...,xn) = e in (x1,...,xn) --> e - * - *) - -let is_eta_redex bl al = - try - List.for_all2 - (fun (id,_) t -> match t with CC_var id' -> id=id' | _ -> false) - bl al - with - Invalid_argument("List.for_all2") -> false - -let rec red = function - | CC_letin (_, _, [id,_], CC_expr c1, e2) -> - red (cc_subst [id,c1] e2) - | CC_letin (dep, ty, bl, e1, e2) -> - begin match red e2 with - | CC_tuple (false,tl,al) -> - if is_eta_redex bl al then - red e1 - else - CC_letin (dep, ty, bl, red e1, - CC_tuple (false,tl,List.map red al)) - | e -> CC_letin (dep, ty, bl, red e1, e) - end - | CC_lam (bl, e) -> - CC_lam (bl, red e) - | CC_app (e, al) -> - CC_app (red e, List.map red al) - | CC_case (ty, e1, el) -> - CC_case (ty, red e1, List.map red el) - | CC_tuple (dep, tl, al) -> - CC_tuple (dep, tl, List.map red al) - | e -> e - - -(* How to reduce uncomplete proof terms when they have become constr *) - -open Term -open Reductionops - -(* Il ne faut pas reduire de redexe (beta/iota) qui impliquerait - * la substitution d'une métavariable. - * - * On commence par rendre toutes les applications binaire (strong bin_app) - * puis on applique la reduction spéciale programmes définie dans - * typing/reduction *) - -(*i -let bin_app = function - | DOPN(AppL,v) as c -> - (match Array.length v with - | 1 -> v.(0) - | 2 -> c - | n -> - let f = DOPN(AppL,Array.sub v 0 (pred n)) in - DOPN(AppL,[|f;v.(pred n)|])) - | c -> c -i*) - -let red_cci c = - (*i let c = strong bin_app c in i*) - strong whd_programs (Global.env ()) Evd.empty c - diff --git a/contrib/correctness/pred.mli b/contrib/correctness/pred.mli deleted file mode 100644 index a5a9549b..00000000 --- a/contrib/correctness/pred.mli +++ /dev/null @@ -1,26 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* cc_term - - -(* Ad-hoc reduction on partial proof terms *) - -val red_cci : constr -> constr - - diff --git a/contrib/correctness/prename.ml b/contrib/correctness/prename.ml deleted file mode 100644 index 4ef1982d..00000000 --- a/contrib/correctness/prename.ml +++ /dev/null @@ -1,139 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* raise Not_found - | (y,v)::rem -> if y = x then v else find_in_one rem - in - let rec find_in_all = function - [] -> raise Not_found - | (_,l)::rem -> try find_in_one l with Not_found -> find_in_all rem - in - find_in_all r.levels - - -let current_var = find - -let current_vars r ids = List.map (fun id -> id,current_var r id) ids - - -let avoid r ids = { levels = r.levels; avoid = r.avoid @ ids; cpt = r.cpt } - -let fresh r ids = fst (renaming_of_ids r.avoid ids) - - -let current_date r = - match r.levels with - [] -> invalid_arg "Renamings.current_date" - | (d,_)::_ -> d - -let all_dates r = List.map fst r.levels - -let rec valid_date da r = - let rec valid = function - [] -> false - | (d,_)::rem -> (d=da) or (valid rem) - in - valid r.levels - -(* [until d r] selects the part of the renaming [r] starting from date [d] *) -let rec until da r = - let rec cut = function - [] -> invalid_arg "Renamings.until" - | (d,_)::rem as r -> if d=da then r else cut rem - in - { avoid = r.avoid; levels = cut r.levels; cpt = r.cpt } - -let var_at_date r d id = - try - find (until d r) id - with Not_found -> - raise (UserError ("Renamings.var_at_date", - hov 0 (str"Variable " ++ pr_id id ++ str" is unknown" ++ spc () ++ - str"at date " ++ str d))) - -let vars_at_date r d ids = - let r' = until d r in List.map (fun id -> id,find r' id) ids - - -(* pretty-printers *) - -open Pp -open Util -open Himsg - -let pp r = - hov 2 (prlist_with_sep (fun () -> (fnl ())) - (fun (d,l) -> - (str d ++ str": " ++ - prlist_with_sep (fun () -> (spc ())) - (fun (id,id') -> - (str"(" ++ pr_id id ++ str"," ++ pr_id id' ++ str")")) - l)) - r.levels) - -let ppr e = - Pp.pp (pp e) - diff --git a/contrib/correctness/prename.mli b/contrib/correctness/prename.mli deleted file mode 100644 index 1d3ab669..00000000 --- a/contrib/correctness/prename.mli +++ /dev/null @@ -1,57 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* date -> identifier list -> t - (* assign new names for the given variables, associated to a new date *) -val next : t -> identifier list -> t - (* assign new names for the given variables, associated to a new - * date which is generated from an internal counter *) -val push_date : t -> date -> t - (* put a new date on top of the stack *) - -val valid_date : date -> t -> bool -val current_date : t -> date -val all_dates : t -> date list - -val current_var : t -> identifier -> identifier -val current_vars : t -> identifier list -> (identifier * identifier) list - (* gives the current names of some variables *) - -val avoid : t -> identifier list -> t -val fresh : t -> identifier list -> (identifier * identifier) list - (* introduces new names to avoid and renames some given variables *) - -val var_at_date : t -> date -> identifier -> identifier - (* gives the name of a variable at a given date *) -val vars_at_date : t -> date -> identifier list - -> (identifier * identifier) list - (* idem for a list of variables *) - -(* pretty-printers *) - -val pp : t -> Pp.std_ppcmds -val ppr : t -> unit - diff --git a/contrib/correctness/psyntax.ml4 b/contrib/correctness/psyntax.ml4 deleted file mode 100644 index 98d43112..00000000 --- a/contrib/correctness/psyntax.ml4 +++ /dev/null @@ -1,1058 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* - *) - -module Gram = Pcoq.Gram -module Constr = Pcoq.Constr -module Tactic = Pcoq.Tactic - -module Programs = - struct - let gec s = Gram.Entry.create ("Programs."^s) - (* types *) - let type_v = gec "type_v" - let type_v0 = gec "type_v0" - let type_v1 = gec "type_v1" - let type_v2 = gec "type_v2" - let type_v3 = gec "type_v3" - let type_v_app = gec "type_v_app" - let type_c = gec "type_c" - let effects = gec "effects" - let reads = gec "reads" - let writes = gec "writes" - let pre_condition = gec "pre_condition" - let post_condition = gec "post_condition" - (* binders *) - let binder = gec "binder" - let binder_type = gec "binder_type" - let binders = gec "binders" - (* programs *) - let program = gec "program" - let prog1 = gec "prog1" - let prog2 = gec "prog2" - let prog3 = gec "prog3" - let prog4 = gec "prog4" - let prog5 = gec "prog5" - let prog6 = gec "prog6" - let prog7 = gec "prog7" - let ast1 = gec "ast1" - let ast2 = gec "ast2" - let ast3 = gec "ast3" - let ast4 = gec "ast4" - let ast5 = gec "ast5" - let ast6 = gec "ast6" - let ast7 = gec "ast7" - let arg = gec "arg" - let block = gec "block" - let block_statement = gec "block_statement" - let relation = gec "relation" - let variable = gec "variable" - let invariant = gec "invariant" - let variant = gec "variant" - let assertion = gec "assertion" - let precondition = gec "precondition" - let postcondition = gec "postcondition" - let predicate = gec "predicate" - let name = gec "name" - end - -open Programs - -let ast_of_int n = - CDelimiters - (dummy_loc, "Z", CNumeral (dummy_loc, Bignat.POS (Bignat.of_string n))) - -let constr_of_int n = - Constrintern.interp_constr Evd.empty (Global.env ()) (ast_of_int n) - -open Util -open Coqast - -let mk_id loc id = mkRefC (Ident (loc, id)) -let mk_ref loc s = mk_id loc (Constrextern.id_of_v7_string s) -let mk_appl loc1 loc2 f args = - CApp (join_loc loc1 loc2, (None,mk_ref loc1 f), List.map (fun a -> a,None) args) - -let conj_assert {a_name=n;a_value=a} {a_value=b} = - let loc1 = constr_loc a in - let loc2 = constr_loc a in - { a_value = mk_appl loc1 loc2 "and" [a;b]; a_name = n } - -let conj = function - None,None -> None - | None,b -> b - | a,None -> a - | Some a,Some b -> Some (conj_assert a b) - -let without_effect loc d = - { desc = d; pre = []; post = None; loc = loc; info = () } - -let isevar = Expression isevar - -let bin_op op loc e1 e2 = - without_effect loc - (Apply (without_effect loc (Expression (constant op)), - [ Term e1; Term e2 ])) - -let un_op op loc e = - without_effect loc - (Apply (without_effect loc (Expression (constant op)), [Term e])) - -let bool_bin op loc a1 a2 = - let w = without_effect loc in - let d = SApp ( [Variable op], [a1; a2]) in - w d - -let bool_or loc = bool_bin connective_or loc -let bool_and loc = bool_bin connective_and loc - -let bool_not loc a = - let w = without_effect loc in - let d = SApp ( [Variable connective_not ], [a]) in - w d - -let ast_zwf_zero loc = mk_appl loc loc "Zwf" [mk_ref loc "Z0"] - -(* program -> Coq AST *) - -let bdize c = - let env = - Global.env_of_context (Pcicenv.cci_sign_of Prename.empty_ren Penv.empty) - in - Constrextern.extern_constr true env c - -let rec coqast_of_program loc = function - | Variable id -> mk_id loc id - | Acc id -> mk_id loc id - | Apply (f,l) -> - let f = coqast_of_program f.loc f.desc in - let args = List.map - (function Term t -> (coqast_of_program t.loc t.desc,None) - | _ -> invalid_arg "coqast_of_program") l - in - CApp (dummy_loc, (None,f), args) - | Expression c -> bdize c - | _ -> invalid_arg "coqast_of_program" - -(* The construction `for' is syntactic sugar. - * - * for i = v1 to v2 do { invariant Inv } block done - * - * ==> (let rec f i { variant v2+1-i } = - * { i <= v2+1 /\ Inv(i) } - * (if i > v2 then tt else begin block; (f (i+1)) end) - * { Inv(v2+1) } - * in (f v1)) { Inv(v2+1) } - *) - -let ast_plus_un loc ast = - let un = ast_of_int "1" in - mk_appl loc loc "Zplus" [ast;un] - -let make_ast_for loc i v1 v2 inv block = - let f = for_name() in - let id_i = id_of_string i in - let var_i = without_effect loc (Variable id_i) in - let var_f = without_effect loc (Variable f) in - let succ_v2 = - let a_v2 = coqast_of_program v2.loc v2.desc in - ast_plus_un loc a_v2 in - let post = named_app (subst_ast_in_ast [ id_i, succ_v2 ]) inv in - let e1 = - let test = bin_op "Z_gt_le_bool" loc var_i v2 in - let br_t = without_effect loc (Expression (constant "tt")) in - let br_f = - let un = without_effect loc (Expression (constr_of_int "1")) in - let succ_i = bin_op "Zplus" loc var_i un in - let f_succ_i = without_effect loc (Apply (var_f, [Term succ_i])) in - without_effect loc (Seq (block @ [Statement f_succ_i])) - in - let inv' = - let i_le_sv2 = mk_appl loc loc "Zle" [mk_ref loc i; succ_v2] in - conj_assert {a_value=i_le_sv2;a_name=inv.a_name} inv - in - { desc = If(test,br_t,br_f); loc = loc; - pre = [pre_of_assert false inv']; post = Some post; info = () } - in - let bl = - let typez = mk_ref loc "Z" in - [(id_of_string i, BindType (TypePure typez))] - in - let fv1 = without_effect loc (Apply (var_f, [Term v1])) in - let v = TypePure (mk_ref loc "unit") in - let var = - let a = mk_appl loc loc "Zminus" [succ_v2;mk_ref loc i] in - (a, ast_zwf_zero loc) - in - Let (f, without_effect loc (LetRec (f,bl,v,var,e1)), fv1) - -let mk_prog loc p pre post = - { desc = p.desc; - pre = p.pre @ pre; - post = conj (p.post,post); - loc = loc; - info = () } - -if !Options.v7 then -GEXTEND Gram - - (* Types ******************************************************************) - type_v: - [ [ t = type_v0 -> t ] ] - ; - type_v0: - [ [ t = type_v1 -> t ] ] - ; - type_v1: - [ [ t = type_v2 -> t ] ] - ; - type_v2: - [ LEFTA - [ v = type_v2; IDENT "ref" -> Ref v - | t = type_v3 -> t ] ] - ; - type_v3: - [ [ IDENT "array"; size = Constr.constr; "of"; v = type_v0 -> - Array (size,v) - | IDENT "fun"; bl = binders; c = type_c -> make_arrow bl c - | c = Constr.constr -> TypePure c - ] ] - ; - type_c: - [ [ IDENT "returns"; id = IDENT; ":"; v = type_v; - e = effects; p = OPT pre_condition; q = OPT post_condition; "end" -> - ((id_of_string id, v), e, list_of_some p, q) - ] ] - ; - effects: - [ [ r = OPT reads; w = OPT writes -> - let r' = match r with Some l -> l | _ -> [] in - let w' = match w with Some l -> l | _ -> [] in - List.fold_left (fun e x -> Peffect.add_write x e) - (List.fold_left (fun e x -> Peffect.add_read x e) Peffect.bottom r') - w' - ] ] - ; - reads: - [ [ IDENT "reads"; l = LIST0 IDENT SEP "," -> List.map id_of_string l ] ] - ; - writes: - [ [ IDENT "writes"; l=LIST0 IDENT SEP "," -> List.map id_of_string l ] ] - ; - pre_condition: - [ [ IDENT "pre"; c = predicate -> pre_of_assert false c ] ] - ; - post_condition: - [ [ IDENT "post"; c = predicate -> c ] ] - ; - - (* Binders (for both types and programs) **********************************) - binder: - [ [ "("; sl = LIST1 IDENT SEP ","; ":"; t = binder_type ; ")" -> - List.map (fun s -> (id_of_string s, t)) sl - ] ] - ; - binder_type: - [ [ "Set" -> BindSet - | v = type_v -> BindType v - ] ] - ; - binders: - [ [ bl = LIST0 binder -> List.flatten bl ] ] - ; - - (* annotations *) - predicate: - [ [ c = Constr.constr; n = name -> { a_name = n; a_value = c } ] ] - ; - name: - [ [ "as"; s = IDENT -> Name (id_of_string s) - | -> Anonymous - ] ] - ; - - (* Programs ***************************************************************) - variable: - [ [ s = IDENT -> id_of_string s ] ] - ; - assertion: - [ [ "{"; c = predicate; "}" -> c ] ] - ; - precondition: - [ [ "{"; c = predicate; "}" -> pre_of_assert false c ] ] - ; - postcondition: - [ [ "{"; c = predicate; "}" -> c ] ] - ; - program: - [ [ p = prog1 -> p ] ] - ; - prog1: - [ [ pre = LIST0 precondition; ast = ast1; post = OPT postcondition -> - mk_prog loc ast pre post ] ] - ; - prog2: - [ [ pre = LIST0 precondition; ast = ast2; post = OPT postcondition -> - mk_prog loc ast pre post ] ] - ; - prog3: - [ [ pre = LIST0 precondition; ast = ast3; post = OPT postcondition -> - mk_prog loc ast pre post ] ] - ; - prog4: - [ [ pre = LIST0 precondition; ast = ast4; post = OPT postcondition -> - mk_prog loc ast pre post ] ] - ; - prog5: - [ [ pre = LIST0 precondition; ast = ast5; post = OPT postcondition -> - mk_prog loc ast pre post ] ] - ; - prog6: - [ [ pre = LIST0 precondition; ast = ast6; post = OPT postcondition -> - mk_prog loc ast pre post ] ] - ; - - ast1: - [ [ x = prog2; IDENT "or"; y = prog1 -> bool_or loc x y - | x = prog2; IDENT "and"; y = prog1 -> bool_and loc x y - | x = prog2 -> x - ] ] - ; - ast2: - [ [ IDENT "not"; x = prog3 -> bool_not loc x - | x = prog3 -> x - ] ] - ; - ast3: - [ [ x = prog4; rel = relation; y = prog4 -> bin_op rel loc x y - | x = prog4 -> x - ] ] - ; - ast4: - [ [ x = prog5; "+"; y = prog4 -> bin_op "Zplus" loc x y - | x = prog5; "-"; y = prog4 -> bin_op "Zminus" loc x y - | x = prog5 -> x - ] ] - ; - ast5: - [ [ x = prog6; "*"; y = prog5 -> bin_op "Zmult" loc x y - | x = prog6 -> x - ] ] - ; - ast6: - [ [ "-"; x = prog6 -> un_op "Zopp" loc x - | x = ast7 -> without_effect loc x - ] ] - ; - ast7: - [ [ v = variable -> - Variable v - | n = INT -> - Expression (constr_of_int n) - | "!"; v = variable -> - Acc v - | "?" -> - isevar - | v = variable; ":="; p = program -> - Aff (v,p) - | v = variable; "["; e = program; "]" -> TabAcc (true,v,e) - | v = variable; "#"; "["; e = program; "]" -> TabAcc (true,v,e) - | v = variable; "["; e = program; "]"; ":="; p = program -> - TabAff (true,v,e,p) - | v = variable; "#"; "["; e = program; "]"; ":="; p = program -> - TabAff (true,v,e,p) - | IDENT "if"; e1 = program; IDENT "then"; e2 = program; - IDENT "else"; e3 = program -> - If (e1,e2,e3) - | IDENT "if"; e1 = program; IDENT "then"; e2 = program -> - If (e1,e2,without_effect loc (Expression (constant "tt"))) - | IDENT "while"; b = program; IDENT "do"; - "{"; inv = OPT invariant; IDENT "variant"; wf = variant; "}"; - bl = block; IDENT "done" -> - While (b, inv, wf, bl) - | IDENT "for"; i = IDENT; "="; v1 = program; IDENT "to"; v2 = program; - IDENT "do"; "{"; inv = invariant; "}"; - bl = block; IDENT "done" -> - make_ast_for loc i v1 v2 inv bl - | IDENT "let"; v = variable; "="; IDENT "ref"; p1 = program; - "in"; p2 = program -> - LetRef (v, p1, p2) - | IDENT "let"; v = variable; "="; p1 = program; "in"; p2 = program -> - Let (v, p1, p2) - | IDENT "begin"; b = block; "end" -> - Seq b - | IDENT "fun"; bl = binders; "->"; p = program -> - Lam (bl,p) - | IDENT "let"; IDENT "rec"; f = variable; - bl = binders; ":"; v = type_v; - "{"; IDENT "variant"; var = variant; "}"; "="; p = program -> - LetRec (f,bl,v,var,p) - | IDENT "let"; IDENT "rec"; f = variable; - bl = binders; ":"; v = type_v; - "{"; IDENT "variant"; var = variant; "}"; "="; p = program; - "in"; p2 = program -> - Let (f, without_effect loc (LetRec (f,bl,v,var,p)), p2) - - | "@"; s = STRING; p = program -> - Debug (s,p) - - | "("; p = program; args = LIST0 arg; ")" -> - match args with - [] -> - if p.pre<>[] or p.post<>None then - Pp.warning "Some annotations are lost"; - p.desc - | _ -> - Apply(p,args) - ] ] - ; - arg: - [ [ "'"; t = type_v -> Type t - | p = program -> Term p - ] ] - ; - block: - [ [ s = block_statement; ";"; b = block -> s::b - | s = block_statement -> [s] ] ] - ; - block_statement: - [ [ IDENT "label"; s = IDENT -> Label s - | IDENT "assert"; c = assertion -> Assert c - | p = program -> Statement p ] ] - ; - relation: - [ [ "<" -> "Z_lt_ge_bool" - | "<=" -> "Z_le_gt_bool" - | ">" -> "Z_gt_le_bool" - | ">=" -> "Z_ge_lt_bool" - | "=" -> "Z_eq_bool" - | "<>" -> "Z_noteq_bool" ] ] - ; - - (* Other entries (invariants, etc.) ***************************************) - invariant: - [ [ IDENT "invariant"; c = predicate -> c ] ] - ; - variant: - [ [ c = Constr.constr; IDENT "for"; r = Constr.constr -> (c, r) - | c = Constr.constr -> (c, ast_zwf_zero loc) ] ] - ; - END -else -GEXTEND Gram - GLOBAL: type_v program; - - (* Types ******************************************************************) - type_v: - [ [ t = type_v0 -> t ] ] - ; - type_v0: - [ [ t = type_v1 -> t ] ] - ; - type_v1: - [ [ t = type_v2 -> t ] ] - ; - type_v2: - [ LEFTA - [ v = type_v2; IDENT "ref" -> Ref v - | t = type_v3 -> t ] ] - ; - type_v3: - [ [ IDENT "array"; size = Constr.constr; IDENT "of"; v = type_v0 -> - Array (size,v) - | "fun"; bl = binders; c = type_c -> make_arrow bl c - | c = Constr.constr -> TypePure c - ] ] - ; - type_c: - [ [ IDENT "returns"; id = IDENT; ":"; v = type_v; - e = effects; p = OPT pre_condition; q = OPT post_condition; "end" -> - ((id_of_string id, v), e, list_of_some p, q) - ] ] - ; - effects: - [ [ r = OPT reads; w = OPT writes -> - let r' = match r with Some l -> l | _ -> [] in - let w' = match w with Some l -> l | _ -> [] in - List.fold_left (fun e x -> Peffect.add_write x e) - (List.fold_left (fun e x -> Peffect.add_read x e) Peffect.bottom r') - w' - ] ] - ; - reads: - [ [ IDENT "reads"; l = LIST0 IDENT SEP "," -> List.map id_of_string l ] ] - ; - writes: - [ [ IDENT "writes"; l=LIST0 IDENT SEP "," -> List.map id_of_string l ] ] - ; - pre_condition: - [ [ IDENT "pre"; c = predicate -> pre_of_assert false c ] ] - ; - post_condition: - [ [ IDENT "post"; c = predicate -> c ] ] - ; - - (* Binders (for both types and programs) **********************************) - binder: - [ [ "("; sl = LIST1 IDENT SEP ","; ":"; t = binder_type ; ")" -> - List.map (fun s -> (id_of_string s, t)) sl - ] ] - ; - binder_type: - [ [ "Set" -> BindSet - | v = type_v -> BindType v - ] ] - ; - binders: - [ [ bl = LIST0 binder -> List.flatten bl ] ] - ; - - (* annotations *) - predicate: - [ [ c = Constr.constr; n = name -> { a_name = n; a_value = c } ] ] - ; - dpredicate: - [ [ c = Constr.lconstr; n = name -> { a_name = n; a_value = c } ] ] - ; - name: - [ [ "as"; s = IDENT -> Name (id_of_string s) - | -> Anonymous - ] ] - ; - - (* Programs ***************************************************************) - variable: - [ [ s = IDENT -> id_of_string s ] ] - ; - assertion: - [ [ "{"; c = dpredicate; "}" -> c ] ] - ; - precondition: - [ [ "{"; c = dpredicate; "}" -> pre_of_assert false c ] ] - ; - postcondition: - [ [ "{"; c = dpredicate; "}" -> c ] ] - ; - program: - [ [ p = prog1 -> p ] ] - ; - prog1: - [ [ pre = LIST0 precondition; ast = ast1; post = OPT postcondition -> - mk_prog loc ast pre post ] ] - ; - prog2: - [ [ pre = LIST0 precondition; ast = ast2; post = OPT postcondition -> - mk_prog loc ast pre post ] ] - ; - prog3: - [ [ pre = LIST0 precondition; ast = ast3; post = OPT postcondition -> - mk_prog loc ast pre post ] ] - ; - prog4: - [ [ pre = LIST0 precondition; ast = ast4; post = OPT postcondition -> - mk_prog loc ast pre post ] ] - ; - prog5: - [ [ pre = LIST0 precondition; ast = ast5; post = OPT postcondition -> - mk_prog loc ast pre post ] ] - ; - prog6: - [ [ pre = LIST0 precondition; ast = ast6; post = OPT postcondition -> - mk_prog loc ast pre post ] ] - ; - - ast1: - [ [ x = prog2; IDENT "or"; y = prog1 -> bool_or loc x y - | x = prog2; IDENT "and"; y = prog1 -> bool_and loc x y - | x = prog2 -> x - ] ] - ; - ast2: - [ [ IDENT "not"; x = prog3 -> bool_not loc x - | x = prog3 -> x - ] ] - ; - ast3: - [ [ x = prog4; rel = relation; y = prog4 -> bin_op rel loc x y - | x = prog4 -> x - ] ] - ; - ast4: - [ [ x = prog5; "+"; y = prog4 -> bin_op "Zplus" loc x y - | x = prog5; "-"; y = prog4 -> bin_op "Zminus" loc x y - | x = prog5 -> x - ] ] - ; - ast5: - [ [ x = prog6; "*"; y = prog5 -> bin_op "Zmult" loc x y - | x = prog6 -> x - ] ] - ; - ast6: - [ [ "-"; x = prog6 -> un_op "Zopp" loc x - | x = ast7 -> without_effect loc x - ] ] - ; - ast7: - [ [ v = variable -> - Variable v - | n = INT -> - Expression (constr_of_int n) - | "!"; v = variable -> - Acc v - | "?" -> - isevar - | v = variable; ":="; p = program -> - Aff (v,p) - | v = variable; "["; e = program; "]" -> TabAcc (true,v,e) - | v = variable; "#"; "["; e = program; "]" -> TabAcc (true,v,e) - | v = variable; "["; e = program; "]"; ":="; p = program -> - TabAff (true,v,e,p) - | v = variable; "#"; "["; e = program; "]"; ":="; p = program -> - TabAff (true,v,e,p) - | "if"; e1 = program; "then"; e2 = program; "else"; e3 = program -> - If (e1,e2,e3) - | "if"; e1 = program; "then"; e2 = program -> - If (e1,e2,without_effect loc (Expression (constant "tt"))) - | IDENT "while"; b = program; IDENT "do"; - "{"; inv = OPT invariant; IDENT "variant"; wf = variant; "}"; - bl = block; IDENT "done" -> - While (b, inv, wf, bl) - | "for"; i = IDENT; "="; v1 = program; IDENT "to"; v2 = program; - IDENT "do"; "{"; inv = invariant; "}"; - bl = block; IDENT "done" -> - make_ast_for loc i v1 v2 inv bl - | "let"; v = variable; "="; IDENT "ref"; p1 = program; - "in"; p2 = program -> - LetRef (v, p1, p2) - | "let"; v = variable; "="; p1 = program; "in"; p2 = program -> - Let (v, p1, p2) - | IDENT "begin"; b = block; "end" -> - Seq b - | "fun"; bl = binders; "=>"; p = program -> - Lam (bl,p) - | "let"; IDENT "rec"; f = variable; - bl = binders; ":"; v = type_v; - "{"; IDENT "variant"; var = variant; "}"; "="; p = program -> - LetRec (f,bl,v,var,p) - | "let"; IDENT "rec"; f = variable; - bl = binders; ":"; v = type_v; - "{"; IDENT "variant"; var = variant; "}"; "="; p = program; - "in"; p2 = program -> - Let (f, without_effect loc (LetRec (f,bl,v,var,p)), p2) - - | "@"; s = STRING; p = program -> - Debug (s,p) - - | "("; p = program; args = LIST0 arg; ")" -> - match args with - [] -> - if p.pre<>[] or p.post<>None then - Pp.warning "Some annotations are lost"; - p.desc - | _ -> - Apply(p,args) - ] ] - ; - arg: - [ [ "'"; t = type_v -> Type t - | p = program -> Term p - ] ] - ; - block: - [ [ s = block_statement; ";"; b = block -> s::b - | s = block_statement -> [s] ] ] - ; - block_statement: - [ [ IDENT "label"; s = IDENT -> Label s - | IDENT "assert"; c = assertion -> Assert c - | p = program -> Statement p ] ] - ; - relation: - [ [ "<" -> "Z_lt_ge_bool" - | "<=" -> "Z_le_gt_bool" - | ">" -> "Z_gt_le_bool" - | ">=" -> "Z_ge_lt_bool" - | "=" -> "Z_eq_bool" - | "<>" -> "Z_noteq_bool" ] ] - ; - - (* Other entries (invariants, etc.) ***************************************) - invariant: - [ [ IDENT "invariant"; c = predicate -> c ] ] - ; - variant: - [ [ c = Constr.constr; "for"; r = Constr.constr -> (c, r) - | c = Constr.constr -> (c, ast_zwf_zero loc) ] ] - ; - END -;; - -let wit_program, globwit_program, rawwit_program = - Genarg.create_arg "program" -let wit_type_v, globwit_type_v, rawwit_type_v = - Genarg.create_arg "type_v" - -open Pp -open Util -open Himsg -open Vernacinterp -open Vernacexpr -open Declare - -let is_assumed global ids = - if List.length ids = 1 then - msgnl (str (if global then "A global variable " else "") ++ - pr_id (List.hd ids) ++ str " is assumed") - else - msgnl (str (if global then "Some global variables " else "") ++ - prlist_with_sep (fun () -> (str ", ")) pr_id ids ++ - str " are assumed") - -open Pcoq - -(* Variables *) - -let wit_variables, globwit_variables, rawwit_variables = - Genarg.create_arg "variables" - -let variables = Gram.Entry.create "Variables" - -GEXTEND Gram - variables: [ [ l = LIST1 Prim.ident SEP "," -> l ] ]; -END - -let pr_variables _prc _prtac l = spc() ++ prlist_with_sep pr_coma pr_id l - -let _ = - Pptactic.declare_extra_genarg_pprule true - (rawwit_variables, pr_variables) - (globwit_variables, pr_variables) - (wit_variables, pr_variables) - -(* then_tac *) - -open Genarg -open Tacinterp - -let pr_then_tac _ prt = function - | None -> mt () - | Some t -> pr_semicolon () ++ prt t - -ARGUMENT EXTEND then_tac - TYPED AS tactic_opt - PRINTED BY pr_then_tac - INTERPRETED BY interp_genarg - GLOBALIZED BY intern_genarg -| [ ";" tactic(t) ] -> [ Some t ] -| [ ] -> [ None ] -END - -(* Correctness *) - -VERNAC COMMAND EXTEND Correctness - [ "Correctness" preident(str) program(pgm) then_tac(tac) ] - -> [ Ptactic.correctness str pgm (option_map Tacinterp.interp tac) ] -END - -(* Show Programs *) - -let show_programs () = - fold_all - (fun (id,v) _ -> - msgnl (pr_id id ++ str " : " ++ - hov 2 (match v with TypeV v -> pp_type_v v - | Set -> (str "Set")) ++ - fnl ())) - Penv.empty () - -VERNAC COMMAND EXTEND ShowPrograms - [ "Show" "Programs" ] -> [ show_programs () ] -END - -(* Global Variable *) - -let global_variable ids v = - List.iter - (fun id -> if Penv.is_global id then - Util.errorlabstrm "PROGVARIABLE" - (str"Clash with previous constant " ++ pr_id id)) - ids; - Pdb.check_type_v (all_refs ()) v; - let env = empty in - let ren = update empty_ren "" [] in - let v = Ptyping.cic_type_v env ren v in - if not (is_mutable v) then begin - let c = - Entries.ParameterEntry (trad_ml_type_v ren env v), - Decl_kinds.IsAssumption Decl_kinds.Definitional in - List.iter - (fun id -> ignore (Declare.declare_constant id c)) ids; - if_verbose (is_assumed false) ids - end; - if not (is_pure v) then begin - List.iter (fun id -> ignore (Penv.add_global id v None)) ids; - if_verbose (is_assumed true) ids - end - -VERNAC COMMAND EXTEND ProgVariable - [ "Global" "Variable" variables(ids) ":" type_v(t) ] - -> [ global_variable ids t] -END - -let pr_id id = pr_id (Constrextern.v7_to_v8_id id) - -(* Type printer *) - -let pr_reads = function - | [] -> mt () - | l -> spc () ++ - hov 0 (str "reads" ++ spc () ++ prlist_with_sep pr_coma pr_id l) - -let pr_writes = function - | [] -> mt () - | l -> spc () ++ - hov 0 (str "writes" ++ spc () ++ prlist_with_sep pr_coma pr_id l) - -let pr_effects x = - let (ro,rw) = Peffect.get_repr x in pr_reads ro ++ pr_writes rw - -let pr_predicate delimited { a_name = n; a_value = c } = - (if delimited then Ppconstr.pr_lconstr else Ppconstr.pr_constr) c ++ - (match n with Name id -> spc () ++ str "as " ++ pr_id id | Anonymous -> mt()) - -let pr_assert b { p_name = x; p_value = v } = - pr_predicate b { a_name = x; a_value = v } - -let pr_pre_condition_list = function - | [] -> mt () - | [pre] -> spc() ++ hov 0 (str "pre" ++ spc () ++ pr_assert false pre) - | _ -> assert false - -let pr_post_condition_opt = function - | None -> mt () - | Some post -> - spc() ++ hov 0 (str "post" ++ spc () ++ pr_predicate false post) - -let rec pr_type_v_v8 = function - | Array (a,v) -> - str "array" ++ spc() ++ Ppconstr.pr_constr a ++ spc() ++ str "of " ++ - pr_type_v_v8 v - | v -> pr_type_v3 v - -and pr_type_v3 = function - | Ref v -> pr_type_v3 v ++ spc () ++ str "ref" - | Arrow (bl,((id,v),e,prel,postl)) -> - str "fun" ++ spc() ++ hov 0 (prlist_with_sep cut pr_binder bl) ++ - spc () ++ str "returns" ++ spc () ++ pr_id id ++ str ":" ++ - pr_type_v_v8 v ++ pr_effects e ++ - pr_pre_condition_list prel ++ pr_post_condition_opt postl ++ - spc () ++ str "end" - | TypePure a -> Ppconstr.pr_constr a - | v -> str "(" ++ pr_type_v_v8 v ++ str ")" - -and pr_binder = function - | (id,BindType c) -> - str "(" ++ pr_id id ++ str ":" ++ pr_type_v_v8 c ++ str ")" - | (id,BindSet) -> - str "(" ++ pr_id id ++ str ":" ++ str "Set" ++ str ")" - | (id,Untyped) -> - str "<<<<< TODO: Untyped binder >>>>" - -let _ = - Pptactic.declare_extra_genarg_pprule true - (rawwit_type_v, fun _ _ -> pr_type_v_v8) - (globwit_type_v, fun _ -> raise Not_found) - (wit_type_v, fun _ -> raise Not_found) - -(* Program printer *) - -let pr_precondition pred = str "{" ++ pr_assert true pred ++ str "}" ++ spc () - -let pr_postcondition pred = str "{" ++ pr_predicate true pred ++ str "}" - -let pr_invariant = function - | None -> mt () - | Some c -> hov 2 (str "invariant" ++ spc () ++ pr_predicate false c) - -let pr_variant (c1,c2) = - Ppconstr.pr_constr c1 ++ - (try Constrextern.check_same_type c2 (ast_zwf_zero dummy_loc); mt () - with _ -> spc() ++ hov 0 (str "for" ++ spc () ++ Ppconstr.pr_constr c2)) - -let rec pr_desc = function - | Variable id -> - (* Unsafe: should distinguish global names and bound vars *) - let vars = (* TODO *) Idset.empty in - let id = try - snd (repr_qualid - (snd (qualid_of_reference - (Constrextern.extern_reference - dummy_loc vars (Nametab.locate (make_short_qualid id)))))) - with _ -> id in - pr_id id - | Acc id -> str "!" ++ pr_id id - | Aff (id,p) -> pr_id id ++ spc() ++ str ":=" ++ spc() ++ pr_prog p - | TabAcc (b,id,p) -> pr_id id ++ str "[" ++ pr_prog p ++ str "]" - | TabAff (b,id,p1,p2) -> - pr_id id ++ str "[" ++ pr_prog p1 ++ str "]" ++ - str ":=" ++ pr_prog p2 - | Seq bll -> - hv 0 (str "begin" ++ spc () ++ pr_block bll ++ spc () ++ str "end") - | While (p1,inv,var,bll) -> - hv 0 ( - hov 0 (str "while" ++ spc () ++ pr_prog p1 ++ spc () ++ str "do") ++ - brk (1,2) ++ - hv 2 ( - str "{ " ++ - pr_invariant inv ++ spc() ++ - hov 0 (str "variant" ++ spc () ++ pr_variant var) - ++ str " }") ++ cut () ++ - hov 0 (pr_block bll) ++ cut () ++ - str "done") - | If (p1,p2,p3) -> - hov 1 (str "if " ++ pr_prog p1) ++ spc () ++ - hov 0 (str "then" ++ spc () ++ pr_prog p2) ++ spc () ++ - hov 0 (str "else" ++ spc () ++ pr_prog p3) - | Lam (bl,p) -> - hov 0 - (str "fun" ++ spc () ++ hov 0 (prlist_with_sep cut pr_binder bl) ++ - spc () ++ str "=>") ++ - pr_prog p - | Apply ({desc=Expression e; pre=[]; post=None} as p,args) when isConst e -> - begin match - string_of_id (snd (repr_path (Nametab.sp_of_global (ConstRef (destConst e))))), - args - with - | "Zmult", [a1;a2] -> - str "(" ++ pr_arg a1 ++ str"*" ++ pr_arg a2 ++ str ")" - | "Zplus", [a1;a2] -> - str "(" ++ pr_arg a1 ++ str"+" ++ pr_arg a2 ++ str ")" - | "Zminus", [a1;a2] -> - str "(" ++ pr_arg a1 ++ str"-" ++ pr_arg a2 ++ str ")" - | "Zopp", [a] -> - str "( -" ++ pr_arg a ++ str ")" - | "Z_lt_ge_bool", [a1;a2] -> - str "(" ++ pr_arg a1 ++ str"<" ++ pr_arg a2 ++ str ")" - | "Z_le_gt_bool", [a1;a2] -> - str "(" ++ pr_arg a1 ++ str"<=" ++ pr_arg a2 ++ str ")" - | "Z_gt_le_bool", [a1;a2] -> - str "(" ++ pr_arg a1 ++ str">" ++ pr_arg a2 ++ str ")" - | "Z_ge_lt_bool", [a1;a2] -> - str "(" ++ pr_arg a1 ++ str">=" ++ pr_arg a2 ++ str ")" - | "Z_eq_bool", [a1;a2] -> - str "(" ++ pr_arg a1 ++ str"=" ++ pr_arg a2 ++ str ")" - | "Z_noteq_bool", [a1;a2] -> - str "(" ++ pr_arg a1 ++ str"<> " ++ pr_arg a2 ++ str ")" - | _ -> - str "(" ++ pr_prog p ++ spc () ++ prlist_with_sep spc pr_arg args ++ - str ")" - end - | Apply (p,args) -> - str "(" ++ pr_prog p ++ spc () ++ prlist_with_sep spc pr_arg args ++ - str ")" - | SApp ([Variable v], args) -> - begin match string_of_id v, args with - | "prog_bool_and", [a1;a2] -> - str"(" ++ pr_prog a1 ++ spc() ++ str"and " ++ pr_prog a2 ++str")" - | "prog_bool_or", [a1;a2] -> - str"(" ++ pr_prog a1 ++ spc() ++ str"or " ++ pr_prog a2 ++ str")" - | "prog_bool_not", [a] -> - str "(not " ++ pr_prog a ++ str ")" - | _ -> failwith "Correctness printer: TODO" - end - | SApp _ -> failwith "Correctness printer: TODO" - | LetRef (v,p1,p2) -> - hov 2 ( - str "let " ++ pr_id v ++ str " =" ++ spc () ++ str "ref" ++ spc () ++ - pr_prog p1 ++ str " in") ++ - spc () ++ pr_prog p2 - | Let (id, {desc=LetRec (f,bl,v,var,p); pre=[]; post=None },p2) when f=id -> - hov 2 ( - str "let rec " ++ pr_id f ++ spc () ++ - hov 0 (prlist_with_sep cut pr_binder bl) ++ spc () ++ - str ":" ++ pr_type_v_v8 v ++ spc () ++ - hov 2 (str "{ variant" ++ spc () ++ pr_variant var ++ str " }") ++ - spc() ++ str "=" ++ spc () ++ pr_prog p ++ - str " in") ++ - spc () ++ pr_prog p2 - | Let (v,p1,p2) -> - hov 2 ( - str "let " ++ pr_id v ++ str " =" ++ spc () ++ pr_prog p1 ++ str" in") - ++ spc () ++ pr_prog p2 - | LetRec (f,bl,v,var,p) -> - str "let rec " ++ pr_id f ++ spc () ++ - hov 0 (prlist_with_sep cut pr_binder bl) ++ spc () ++ - str ":" ++ pr_type_v_v8 v ++ spc () ++ - hov 2 (str "{ variant" ++ spc () ++ pr_variant var ++ str " }") ++ - spc () ++ str "=" ++ spc () ++ pr_prog p - | PPoint _ -> str "TODO: Ppoint" (* Internal use only *) - | Expression c -> - (* Numeral or "tt": use a printer which doesn't globalize *) - Ppconstr.pr_constr - (Constrextern.extern_constr_in_scope false "Z_scope" (Global.env()) c) - | Debug (s,p) -> str "@" ++ Pptactic.qsnew s ++ pr_prog p - -and pr_block_st = function - | Label s -> hov 0 (str "label" ++ spc() ++ str s) - | Assert pred -> - hov 0 (str "assert" ++ spc() ++ hov 0 (pr_postcondition pred)) - | Statement p -> pr_prog p - -and pr_block bl = prlist_with_sep pr_semicolon pr_block_st bl - -and pr_arg = function - | Past.Term p -> pr_prog p - | Past.Type t -> str "'" ++ pr_type_v_v8 t - | Refarg _ -> str "TODO: Refarg" (* Internal use only *) - -and pr_prog0 b { desc = desc; pre = pre; post = post } = - hv 0 ( - prlist pr_precondition pre ++ - hov 0 - (if b & post<>None then str"(" ++ pr_desc desc ++ str")" - else pr_desc desc) - ++ Ppconstr.pr_opt pr_postcondition post) - -and pr_prog x = pr_prog0 true x - -let _ = - Pptactic.declare_extra_genarg_pprule true - (rawwit_program, fun _ _ a -> spc () ++ pr_prog0 false a) - (globwit_program, fun _ -> raise Not_found) - (wit_program, fun _ -> raise Not_found) - diff --git a/contrib/correctness/psyntax.mli b/contrib/correctness/psyntax.mli deleted file mode 100644 index c0f0990b..00000000 --- a/contrib/correctness/psyntax.mli +++ /dev/null @@ -1,25 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* constr * constr] - * Traduction d'un programme impératif en un but (second constr) - * et un terme de preuve partiel pour ce but (premier constr) - *) - -let coqast_of_prog p = - (* 1. db : séparation dB/var/const *) - let p = Pdb.db_prog p in - - (* 2. typage avec effets *) - deb_mess (str"Ptyping.states: Typing with effects..." ++ fnl ()); - let env = Penv.empty in - let ren = initial_renaming env in - let p = Ptyping.states ren env p in - let ((_,v),_,_,_) as c = p.info.kappa in - Perror.check_for_not_mutable p.loc v; - deb_print pp_type_c c; - - (* 3. propagation annotations *) - let p = Pwp.propagate ren p in - - (* 4a. traduction type *) - let ty = Pmonad.trad_ml_type_c ren env c in - deb_print (Printer.pr_lconstr_env (Global.env())) ty; - - (* 4b. traduction terme (terme intermédiaire de type cc_term) *) - deb_mess - (fnl () ++ str"Mlize.trad: Translation program -> cc_term..." ++ fnl ()); - let cc = Pmlize.trans ren p in - let cc = Pred.red cc in - deb_print Putil.pp_cc_term cc; - - (* 5. traduction en constr *) - deb_mess - (fnl () ++ str"Pcic.constr_of_prog: Translation cc_term -> rawconstr..." ++ - fnl ()); - let r = Pcic.rawconstr_of_prog cc in - deb_print Printer.pr_lrawconstr r; - - (* 6. résolution implicites *) - deb_mess (fnl () ++ str"Resolution implicits (? => Meta(n))..." ++ fnl ()); - let oc = understand_gen_tcc Evd.empty (Global.env()) [] None r in - deb_print (Printer.pr_lconstr_env (Global.env())) (snd oc); - - p,oc,ty,v - -(* [automatic : tactic] - * - * Certains buts engendrés par "correctness" (ci-dessous) - * sont réellement triviaux. On peut les résoudre aisément, sans pour autant - * tomber dans la solution trop lourde qui consiste à faire "; Auto." - * - * Cette tactique fait les choses suivantes : - * o elle élimine les hypothèses de nom loop - * o sur G |- (well_founded nat lt) ==> Exact lt_wf. - * o sur G |- (well_founded Z (Zwf c)) ==> Exact (Zwf_well_founded c) - * o sur G |- e = e' ==> Reflexivity. (arg. de decr. des boucles) - * sinon Try Assumption. - * o sur G |- P /\ Q ==> Try (Split; Assumption). (sortie de boucle) - * o sinon, Try AssumptionBis (= Assumption + décomposition /\ dans hyp.) - * (pour entrée dans corps de boucle par ex.) - *) - -open Pattern -open Tacmach -open Tactics -open Tacticals -open Equality -open Nametab - -let nat = IndRef (coq_constant ["Init";"Datatypes"] "nat", 0) -let lt = ConstRef (coq_constant ["Init";"Peano"] "lt") -let well_founded = ConstRef (coq_constant ["Init";"Wf"] "well_founded") -let z = IndRef (coq_constant ["ZArith";"BinInt"] "Z", 0) -let and_ = IndRef (coq_constant ["Init";"Logic"] "and", 0) -let eq = IndRef (coq_constant ["Init";"Logic"] "eq", 0) - -let mkmeta n = Nameops.make_ident "X" (Some n) -let mkPMeta n = PMeta (Some (mkmeta n)) - -(* ["(well_founded nat lt)"] *) -let wf_nat_pattern = - PApp (PRef well_founded, [| PRef nat; PRef lt |]) -(* ["((well_founded Z (Zwf ?1))"] *) -let wf_z_pattern = - let zwf = ConstRef (coq_constant ["ZArith";"Zwf"] "Zwf") in - PApp (PRef well_founded, [| PRef z; PApp (PRef zwf, [| mkPMeta 1 |]) |]) -(* ["(and ?1 ?2)"] *) -let and_pattern = - PApp (PRef and_, [| mkPMeta 1; mkPMeta 2 |]) -(* ["(eq ?1 ?2 ?3)"] *) -let eq_pattern = - PApp (PRef eq, [| mkPMeta 1; mkPMeta 2; mkPMeta 3 |]) - -(* loop_ids: remove loop hypotheses from the context, and rewrite - * using Variant hypotheses when needed. *) - -let (loop_ids : tactic) = fun gl -> - let rec arec hyps gl = - let env = pf_env gl in - let concl = pf_concl gl in - match hyps with - | [] -> tclIDTAC gl - | (id,a) :: al -> - let s = string_of_id id in - let n = String.length s in - if n >= 4 & (let su = String.sub s 0 4 in su="loop" or su="Bool") - then - tclTHEN (clear [id]) (arec al) gl - else if n >= 7 & String.sub s 0 7 = "Variant" then begin - match pf_matches gl eq_pattern (body_of_type a) with - | [_; _,varphi; _] when isVar varphi -> - let phi = destVar varphi in - if Termops.occur_var env phi concl then - tclTHEN (rewriteLR (mkVar id)) (arec al) gl - else - arec al gl - | _ -> assert false end - else - arec al gl - in - arec (pf_hyps_types gl) gl - -(* assumption_bis: like assumption, but also solves ... h:A/\B ... |- A - * (resp. B) *) - -let (assumption_bis : tactic) = fun gl -> - let concl = pf_concl gl in - let rec arec = function - | [] -> Util.error "No such assumption" - | (s,a) :: al -> - let a = body_of_type a in - if pf_conv_x_leq gl a concl then - refine (mkVar s) gl - else if pf_is_matching gl and_pattern a then - match pf_matches gl and_pattern a with - | [_,c1; _,c2] -> - if pf_conv_x_leq gl c1 concl then - exact_check (applistc (constant "proj1") [c1;c2;mkVar s]) gl - else if pf_conv_x_leq gl c2 concl then - exact_check (applistc (constant "proj2") [c1;c2;mkVar s]) gl - else - arec al - | _ -> assert false - else - arec al - in - arec (pf_hyps_types gl) - -(* automatic: see above *) - -let (automatic : tactic) = - tclTHEN - loop_ids - (fun gl -> - let c = pf_concl gl in - if pf_is_matching gl wf_nat_pattern c then - exact_check (constant "lt_wf") gl - else if pf_is_matching gl wf_z_pattern c then - let (_,z) = List.hd (pf_matches gl wf_z_pattern c) in - exact_check (Term.applist (constant "Zwf_well_founded",[z])) gl - else if pf_is_matching gl and_pattern c then - (tclORELSE assumption_bis - (tclTRY (tclTHEN simplest_split assumption))) gl - else if pf_is_matching gl eq_pattern c then - (tclORELSE reflexivity (tclTRY assumption_bis)) gl - else - tclTRY assumption_bis gl) - -(* [correctness s p] : string -> program -> tactic option -> unit - * - * Vernac: Correctness [; ]. - *) - -let reduce_open_constr (em0,c) = - let existential_map_of_constr = - let rec collect em c = match kind_of_term c with - | Cast (c',t) -> - (match kind_of_term c' with - | Evar (ev,_) -> - if not (Evd.mem em ev) then - Evd.add em ev (Evd.find em0 ev) - else - em - | _ -> fold_constr collect em c) - | Evar _ -> - assert false (* all existentials should be casted *) - | _ -> - fold_constr collect em c - in - collect Evd.empty - in - let c = Pred.red_cci c in - let em = existential_map_of_constr c in - (em,c) - -let register id n = - let id' = match n with None -> id | Some id' -> id' in - Penv.register id id' - - (* On dit à la commande "Save" d'enregistrer les nouveaux programmes *) -let correctness_hook _ ref = - let pf_id = Nametab.id_of_global ref in - register pf_id None - -let correctness s p opttac = - Coqlib.check_required_library ["Coq";"correctness";"Correctness"]; - Pmisc.reset_names(); - let p,oc,cty,v = coqast_of_prog p in - let env = Global.env () in - let sign = Global.named_context () in - let sigma = Evd.empty in - let cty = Reduction.nf_betaiota cty in - let id = id_of_string s in - start_proof id (IsGlobal (Proof Lemma)) sign cty correctness_hook; - Penv.new_edited id (v,p); - if !debug then msg (Pfedit.pr_open_subgoals()); - deb_mess (str"Pred.red_cci: Reduction..." ++ fnl ()); - let oc = reduce_open_constr oc in - deb_mess (str"AFTER REDUCTION:" ++ fnl ()); - deb_print (Printer.pr_lconstr_env (Global.env())) (snd oc); - let tac = (tclTHEN (Extratactics.refine_tac oc) automatic) in - let tac = match opttac with - | None -> tac - | Some t -> tclTHEN tac t - in - solve_nth 1 tac; - if_verbose msg (pr_open_subgoals ()) diff --git a/contrib/correctness/ptactic.mli b/contrib/correctness/ptactic.mli deleted file mode 100644 index 87378cff..00000000 --- a/contrib/correctness/ptactic.mli +++ /dev/null @@ -1,22 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* Past.program -> Tacmach.tactic option -> unit - diff --git a/contrib/correctness/ptype.mli b/contrib/correctness/ptype.mli deleted file mode 100644 index be181bcc..00000000 --- a/contrib/correctness/ptype.mli +++ /dev/null @@ -1,73 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* - * - * INVARIANT: l'effet E contient toutes les variables apparaissant dans - * le programme ET les annotations P et Q - * Si E = { x1,...,xn | y1,...,ym }, les variables x sont les - * variables en lecture seule et y1 les variables modifiées - * les xi sont libres dans P et Q, et les yi,result liées dans Q - * i.e. P = p(x) - * et Q = [y1]...[yn][res]q(x,y,res) - *) - -(* pre and post conditions *) - -type 'a precondition = { p_assert : bool; p_name : Names.name; p_value : 'a } - -type 'a assertion = { a_name : Names.name; a_value : 'a } - -type 'a postcondition = 'a assertion - -type predicate = constr assertion - -(* binders *) - -type 'a binder_type = - BindType of 'a - | BindSet - | Untyped - -type 'a binder = Names.identifier * 'a binder_type - -(* variant *) - -type variant = constr * constr * constr (* phi, R, A *) - -(* types des valeurs *) - -type 'a ml_type_v = - Ref of 'a ml_type_v - | Array of 'a * 'a ml_type_v (* size x type *) - | Arrow of 'a ml_type_v binder list * 'a ml_type_c - - | TypePure of 'a - -(* et type des calculs *) - -and 'a ml_type_c = - (Names.identifier * 'a ml_type_v) - * Peffect.t - * ('a precondition list) * ('a postcondition option) - -(* at beginning they contain Coq AST but they become constr after typing *) -type type_v = constr ml_type_v -type type_c = constr ml_type_c - - diff --git a/contrib/correctness/ptyping.ml b/contrib/correctness/ptyping.ml deleted file mode 100644 index 91c1f293..00000000 --- a/contrib/correctness/ptyping.ml +++ /dev/null @@ -1,600 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* - Reductionops.is_conv (Global.env ()) Evd.empty c1 c2 - | (Ref v1, Ref v2) -> - convert (v1,v2) - | (Array (s1,v1), Array (s2,v2)) -> - (Reductionops.is_conv (Global.env ()) Evd.empty s1 s2) && (convert (v1,v2)) - | (v1,v2) -> v1 = v2 - -let effect_app ren env f args = - let n = List.length args in - let tf = - let ((_,v),_,_,_) = f.info.kappa in - match v with TypePure c -> v_of_constr c | _ -> v - in - let bl,c = - match tf with - Arrow (bl, c) -> - if List.length bl <> n then Perror.partial_app f.loc; - bl,c - | _ -> Perror.app_of_non_function f.loc - in - let check_type loc v t so = - let v' = type_v_rsubst so v in - if not (convert (v',t)) then Perror.expected_type loc (pp_type_v v') - in - let s,so,ok = - (* s est la substitution des références, so celle des autres arg. - * ok nous dit si les arguments sont sans effet i.e. des expressions *) - List.fold_left - (fun (s,so,ok) (b,a) -> - match b,a with - (id,BindType (Ref _ | Array _ as v)), Refarg id' -> - let ta = type_in_env env id' in - check_type f.loc v ta so; - (id,id')::s, so, ok - | _, Refarg _ -> Perror.should_be_a_variable f.loc - | (id,BindType v), Term t -> - let ((_,ta),_,_,_) = t.info.kappa in - check_type t.loc v ta so; - (match t.desc with - Expression c -> s, (id,c)::so, ok - | _ -> s,so,false) - | (id,BindSet), Type v -> - let c = Pmonad.trad_ml_type_v ren env v in - s, (id,c)::so, ok - | (id,BindSet), Term t -> Perror.expects_a_type id t.loc - | (id,BindType _), Type _ -> Perror.expects_a_term id - | (_,Untyped), _ -> invalid_arg "effects_app") - ([],[],true) - (List.combine bl args) - in - let (id,v),ef,pre,post = type_c_subst s c in - (bl,c), (s,so,ok), ((id,type_v_rsubst so v),ef,pre,post) - -(* Execution of a Coq AST. Returns value and type. - * Also returns its variables *) - -let state_coq_ast sign a = - let env = Global.env_of_context sign in - let j = - reraise_with_loc (constr_loc a) (judgment_of_rawconstr Evd.empty env) a in - let ids = global_vars env j.uj_val in - j.uj_val, j.uj_type, ids - -(* [is_pure p] tests wether the program p is an expression or not. *) - -let type_of_expression ren env c = - let sign = now_sign_of ren env in - simplify_type_of (Global.env_of_context sign) Evd.empty c - -let rec is_pure_type_v = function - TypePure _ -> true - | Arrow (bl,c) -> List.for_all is_pure_arg bl & is_pure_type_c c - | Ref _ | Array _ -> false -and is_pure_arg = function - (_,BindType v) -> is_pure_type_v v - | (_,BindSet) -> true - | (_,Untyped) -> false -and is_pure_type_c = function - (_,v),_,[],None -> is_pure_type_v v - | _ -> false - -let rec is_pure_desc ren env = function - Variable id -> - not (is_in_env env id) or (is_pure_type_v (type_in_env env id)) - | Expression c -> - (c = isevar) or (is_pure_cci (type_of_expression ren env c)) - | Acc _ -> true - | TabAcc (_,_,p) -> is_pure ren env p - | Apply (p,args) -> - is_pure ren env p & List.for_all (is_pure_arg ren env) args - | SApp _ | Aff _ | TabAff _ | Seq _ | While _ | If _ - | Lam _ | LetRef _ | Let _ | LetRec _ -> false - | Debug (_,p) -> is_pure ren env p - | PPoint (_,d) -> is_pure_desc ren env d -and is_pure ren env p = - p.pre = [] & p.post = None & is_pure_desc ren env p.desc -and is_pure_arg ren env = function - Term p -> is_pure ren env p - | Type _ -> true - | Refarg _ -> false - -(* [state_var ren env (phi,r)] returns a tuple (e,(phi',r')) - * where e is the effect of the variant phi and phi',r' the corresponding - * constr of phi and r. - *) - -let state_var ren env (phi,r) = - let sign = Pcicenv.before_after_sign_of ren env in - let phi',_,ids = state_coq_ast sign phi in - let ef = List.fold_left - (fun e id -> - if is_mutable_in_env env id then Peffect.add_read id e else e) - Peffect.bottom ids in - let r',_,_ = state_coq_ast (Global.named_context ()) r in - ef,(phi',r') - -(* [state_pre ren env pl] returns a pair (e,c) where e is the effect of the - * pre-conditions list pl and cl the corresponding constrs not yet abstracted - * over the variables xi (i.e. c NOT [x1]...[xn]c !) - *) - -let state_pre ren env pl = - let state e p = - let sign = Pcicenv.before_sign_of ren env in - let cc,_,ids = state_coq_ast sign p.p_value in - let ef = List.fold_left - (fun e id -> - if is_mutable_in_env env id then - Peffect.add_read id e - else if is_at id then - let uid,_ = un_at id in - if is_mutable_in_env env uid then - Peffect.add_read uid e - else - e - else - e) - e ids - in - ef,{ p_assert = p.p_assert; p_name = p.p_name; p_value = cc } - in - List.fold_left - (fun (e,cl) p -> let ef,c = state e p in (ef,c::cl)) - (Peffect.bottom,[]) pl - -let state_assert ren env a = - let p = pre_of_assert true a in - let e,l = state_pre ren env [p] in - e,assert_of_pre (List.hd l) - -let state_inv ren env = function - None -> Peffect.bottom, None - | Some i -> let e,p = state_assert ren env i in e,Some p - -(* [state_post ren env (id,v,ef) q] returns a pair (e,c) - * where e is the effect of the - * post-condition q and c the corresponding constr not yet abstracted - * over the variables xi, yi and result. - * Moreover the RW variables not appearing in ef have been replaced by - * RO variables, and (id,v) is the result - *) - -let state_post ren env (id,v,ef) = function - None -> Peffect.bottom, None - | Some q -> - let v' = Pmonad.trad_ml_type_v ren env v in - let sign = Pcicenv.before_after_result_sign_of (Some (id,v')) ren env in - let cc,_,ids = state_coq_ast sign q.a_value in - let ef,c = - List.fold_left - (fun (e,c) id -> - if is_mutable_in_env env id then - if is_write ef id then - Peffect.add_write id e, c - else - Peffect.add_read id e, - subst_in_constr [id,at_id id ""] c - else if is_at id then - let uid,_ = un_at id in - if is_mutable_in_env env uid then - Peffect.add_read uid e, c - else - e,c - else - e,c) - (Peffect.bottom,cc) ids - in - let c = abstract [id,v'] c in - ef, Some { a_name = q.a_name; a_value = c } - -(* transformation of AST into constr in types V and C *) - -let rec cic_type_v env ren = function - | Ref v -> Ref (cic_type_v env ren v) - | Array (com,v) -> - let sign = Pcicenv.now_sign_of ren env in - let c = interp_constr Evd.empty (Global.env_of_context sign) com in - Array (c, cic_type_v env ren v) - | Arrow (bl,c) -> - let bl',ren',env' = - List.fold_left - (fun (bl,ren,env) b -> - let b' = cic_binder env ren b in - let env' = traverse_binders env [b'] in - let ren' = initial_renaming env' in - b'::bl,ren',env') - ([],ren,env) bl - in - let c' = cic_type_c env' ren' c in - Arrow (List.rev bl',c') - | TypePure com -> - let sign = Pcicenv.cci_sign_of ren env in - let c = interp_constr Evd.empty (Global.env_of_context sign) com in - TypePure c - -and cic_type_c env ren ((id,v),e,p,q) = - let v' = cic_type_v env ren v in - let cv = Pmonad.trad_ml_type_v ren env v' in - let efp,p' = state_pre ren env p in - let efq,q' = state_post ren env (id,v',e) q in - let ef = Peffect.union e (Peffect.union efp efq) in - ((id,v'),ef,p',q') - -and cic_binder env ren = function - | (id,BindType v) -> - let v' = cic_type_v env ren v in - let env' = add (id,v') env in - let ren' = initial_renaming env' in - (id, BindType v') - | (id,BindSet) -> (id,BindSet) - | (id,Untyped) -> (id,Untyped) - -and cic_binders env ren = function - [] -> [] - | b::bl -> - let b' = cic_binder env ren b in - let env' = traverse_binders env [b'] in - let ren' = initial_renaming env' in - b' :: (cic_binders env' ren' bl) - - -(* The case of expressions. - * - * Expressions are programs without neither effects nor pre/post conditions. - * But access to variables are allowed. - * - * Here we transform an expression into the corresponding constr, - * the variables still appearing as VAR (they will be abstracted in - * Mlise.trad) - * We collect the pre-conditions (e - (if is_global id then constant (string_of_id id) else mkVar id), - pl, Peffect.bottom - | Expression c -> c, pl, Peffect.bottom - | Acc id -> mkVar id, pl, Peffect.add_read id Peffect.bottom - | TabAcc (_,id,p) -> - let c,pl,ef = effect pl p.desc in - let pre = Pmonad.make_pre_access ren env id c in - Pmonad.make_raw_access ren env (id,id) c, - (anonymous_pre true pre)::pl, Peffect.add_read id ef - | Apply (p,args) -> - let a,pl,e = effect pl p.desc in - let args,pl,e = - List.fold_right - (fun arg (l,pl,e) -> - match arg with - Term p -> - let carg,pl,earg = effect pl p.desc in - carg::l,pl,Peffect.union e earg - | Type v -> - let v' = cic_type_v env ren v in - (Pmonad.trad_ml_type_v ren env v')::l,pl,e - | Refarg _ -> assert false) - args ([],pl,e) - in - Term.applist (a,args),pl,e - | _ -> invalid_arg "Ptyping.states_expression" - in - let e0,pl0 = state_pre ren env expr.pre in - let c,pl,e = effect [] expr.desc in - let sign = Pcicenv.before_sign_of ren env in - (*i WAS - let c = (Trad.ise_resolve true empty_evd [] (gLOB sign) c)._VAL in - i*) - let ty = simplify_type_of (Global.env_of_context sign) Evd.empty c in - let v = TypePure ty in - let ef = Peffect.union e0 e in - Expression c, (v,ef), pl0@pl - - -(* We infer here the type with effects. - * The type of types with effects (ml_type_c) is defined in the module ProgAst. - * - * A program of the shape {P} e {Q} has a type - * - * V, E, {None|Some P}, {None|Some Q} - * - * where - V is the type of e - * - E = (I,O) is the effect; the input I contains - * all the input variables appearing in P,e and Q; - * the output O contains variables possibly modified in e - * - P is NOT abstracted - * - Q = [y'1]...[y'k][result]Q where O = {y'j} - * i.e. Q is only abstracted over the output and the result - * the other variables now refer to value BEFORE - *) - -let verbose_fix = ref false - -let rec states_desc ren env loc = function - - Expression c -> - let ty = type_of_expression ren env c in - let v = v_of_constr ty in - Expression c, (v,Peffect.bottom) - - | Acc _ -> - failwith "Ptyping.states: term is supposed not to be pure" - - | Variable id -> - let v = type_in_env env id in - let ef = Peffect.bottom in - Variable id, (v,ef) - - | Aff (x, e1) -> - Perror.check_for_reference loc x (type_in_env env x); - let s_e1 = states ren env e1 in - let _,e,_,_ = s_e1.info.kappa in - let ef = add_write x e in - let v = constant_unit () in - Aff (x, s_e1), (v, ef) - - | TabAcc (check, x, e) -> - let s_e = states ren env e in - let _,efe,_,_ = s_e.info.kappa in - let ef = Peffect.add_read x efe in - let _,ty = dearray_type (type_in_env env x) in - TabAcc (check, x, s_e), (ty, ef) - - | TabAff (check, x, e1, e2) -> - let s_e1 = states ren env e1 in - let s_e2 = states ren env e2 in - let _,ef1,_,_ = s_e1.info.kappa in - let _,ef2,_,_ = s_e2.info.kappa in - let ef = Peffect.add_write x (Peffect.union ef1 ef2) in - let v = constant_unit () in - TabAff (check, x, s_e1, s_e2), (v,ef) - - | Seq bl -> - let bl,v,ef,_ = states_block ren env bl in - Seq bl, (v,ef) - - | While(b, invopt, var, bl) -> - let efphi,(cvar,r') = state_var ren env var in - let ren' = next ren [] in - let s_b = states ren' env b in - let s_bl,_,ef_bl,_ = states_block ren' env bl in - let cb = s_b.info.kappa in - let efinv,inv = state_inv ren env invopt in - let _,efb,_,_ = s_b.info.kappa in - let ef = - Peffect.union (Peffect.union ef_bl efb) (Peffect.union efinv efphi) - in - let v = constant_unit () in - let cvar = - let al = List.map (fun id -> (id,at_id id "")) (just_reads ef) in - subst_in_constr al cvar - in - While (s_b,inv,(cvar,r'),s_bl), (v,ef) - - | Lam ([],_) -> - failwith "Ptyping.states: abs. should have almost one binder" - - | Lam (bl, e) -> - let bl' = cic_binders env ren bl in - let env' = traverse_binders env bl' in - let ren' = initial_renaming env' in - let s_e = states ren' env' e in - let v = make_arrow bl' s_e.info.kappa in - let ef = Peffect.bottom in - Lam(bl',s_e), (v,ef) - - (* Connectives AND and OR *) - | SApp ([Variable id], [e1;e2]) -> - let s_e1 = states ren env e1 - and s_e2 = states ren env e2 in - let (_,ef1,_,_) = s_e1.info.kappa - and (_,ef2,_,_) = s_e2.info.kappa in - let ef = Peffect.union ef1 ef2 in - SApp ([Variable id], [s_e1; s_e2]), - (TypePure (constant "bool"), ef) - - (* Connective NOT *) - | SApp ([Variable id], [e]) -> - let s_e = states ren env e in - let (_,ef,_,_) = s_e.info.kappa in - SApp ([Variable id], [s_e]), - (TypePure (constant "bool"), ef) - - | SApp _ -> invalid_arg "Ptyping.states (SApp)" - - (* ATTENTION: - Si un argument réel de type ref. correspond à une ref. globale - modifiée par la fonction alors la traduction ne sera pas correcte. - Exemple: - f=[x:ref Int]( r := !r+1 ; x := !x+1) modifie r et son argument x - donc si on l'applique à r justement, elle ne modifiera que r - mais le séquencement ne sera pas correct. *) - - | Apply (f, args) -> - let s_f = states ren env f in - let _,eff,_,_ = s_f.info.kappa in - let s_args = List.map (states_arg ren env) args in - let ef_args = - List.map - (function Term t -> let (_,e,_,_) = t.info.kappa in e - | _ -> Peffect.bottom) - s_args - in - let _,_,((_,tapp),efapp,_,_) = effect_app ren env s_f s_args in - let ef = - Peffect.compose (List.fold_left Peffect.compose eff ef_args) efapp - in - Apply (s_f, s_args), (tapp, ef) - - | LetRef (x, e1, e2) -> - let s_e1 = states ren env e1 in - let (_,v1),ef1,_,_ = s_e1.info.kappa in - let env' = add (x,Ref v1) env in - let ren' = next ren [x] in - let s_e2 = states ren' env' e2 in - let (_,v2),ef2,_,_ = s_e2.info.kappa in - Perror.check_for_let_ref loc v2; - let ef = Peffect.compose ef1 (Peffect.remove ef2 x) in - LetRef (x, s_e1, s_e2), (v2,ef) - - | Let (x, e1, e2) -> - let s_e1 = states ren env e1 in - let (_,v1),ef1,_,_ = s_e1.info.kappa in - Perror.check_for_not_mutable e1.loc v1; - let env' = add (x,v1) env in - let s_e2 = states ren env' e2 in - let (_,v2),ef2,_,_ = s_e2.info.kappa in - let ef = Peffect.compose ef1 ef2 in - Let (x, s_e1, s_e2), (v2,ef) - - | If (b, e1, e2) -> - let s_b = states ren env b in - let s_e1 = states ren env e1 - and s_e2 = states ren env e2 in - let (_,tb),efb,_,_ = s_b.info.kappa in - let (_,t1),ef1,_,_ = s_e1.info.kappa in - let (_,t2),ef2,_,_ = s_e2.info.kappa in - let ef = Peffect.compose efb (disj ef1 ef2) in - let v = type_v_sup loc t1 t2 in - If (s_b, s_e1, s_e2), (v,ef) - - | LetRec (f,bl,v,var,e) -> - let bl' = cic_binders env ren bl in - let env' = traverse_binders env bl' in - let ren' = initial_renaming env' in - let v' = cic_type_v env' ren' v in - let efvar,var' = state_var ren' env' var in - let phi0 = phi_name () in - let tvar = typed_var ren env' var' in - (* effect for a let/rec construct is computed as a fixpoint *) - let rec state_rec c = - let tf = make_arrow bl' c in - let env'' = add_recursion (f,(phi0,tvar)) (add (f,tf) env') in - let s_e = states ren' env'' e in - if s_e.info.kappa = c then - s_e - else begin - if !verbose_fix then begin msgnl (pp_type_c s_e.info.kappa) end ; - state_rec s_e.info.kappa - end - in - let s_e = state_rec ((result_id,v'),efvar,[],None) in - let tf = make_arrow bl' s_e.info.kappa in - LetRec (f,bl',v',var',s_e), (tf,Peffect.bottom) - - | PPoint (s,d) -> - let ren' = push_date ren s in - states_desc ren' env loc d - - | Debug _ -> failwith "Ptyping.states: Debug: TODO" - - -and states_arg ren env = function - Term a -> let s_a = states ren env a in Term s_a - | Refarg id -> Refarg id - | Type v -> let v' = cic_type_v env ren v in Type v' - - -and states ren env expr = - (* Here we deal with the pre- and post- conditions: - * we add their effects to the effects of the program *) - let (d,(v,e),p1) = - if is_pure_desc ren env expr.desc then - states_expression ren env expr - else - let (d,ve) = states_desc ren env expr.loc expr.desc in (d,ve,[]) - in - let (ep,p) = state_pre ren env expr.pre in - let (eq,q) = state_post ren env (result_id,v,e) expr.post in - let e' = Peffect.union e (Peffect.union ep eq) in - let p' = p1 @ p in - let tinfo = { env = env; kappa = ((result_id,v),e',p',q) } in - { desc = d; - loc = expr.loc; - pre = p'; post = q; (* on les conserve aussi ici pour prog_wp *) - info = tinfo } - - -and states_block ren env bl = - let rec ef_block ren tyres = function - [] -> - begin match tyres with - Some ty -> [],ty,Peffect.bottom,ren - | None -> failwith "a block should contain at least one statement" - end - | (Assert p)::block -> - let ep,c = state_assert ren env p in - let bl,t,ef,ren' = ef_block ren tyres block in - (Assert c)::bl,t,Peffect.union ep ef,ren' - | (Label s)::block -> - let ren' = push_date ren s in - let bl,t,ef,ren'' = ef_block ren' tyres block in - (Label s)::bl,t,ef,ren'' - | (Statement e)::block -> - let s_e = states ren env e in - let (_,t),efe,_,_ = s_e.info.kappa in - let ren' = next ren (get_writes efe) in - let bl,t,ef,ren'' = ef_block ren' (Some t) block in - (Statement s_e)::bl,t,Peffect.compose efe ef,ren'' - in - ef_block ren None bl - diff --git a/contrib/correctness/ptyping.mli b/contrib/correctness/ptyping.mli deleted file mode 100644 index eaf548b1..00000000 --- a/contrib/correctness/ptyping.mli +++ /dev/null @@ -1,36 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* Prename.t -> constr_expr ml_type_v -> type_v - -val effect_app : Prename.t -> local_env - -> (typing_info,'b) Past.t - -> (typing_info,constr) arg list - -> (type_v binder list * type_c) - * ((identifier*identifier) list * (identifier*constr) list * bool) - * type_c - -val typed_var : Prename.t -> local_env -> constr * constr -> variant - -val type_of_expression : Prename.t -> local_env -> constr -> constr - -val states : Prename.t -> local_env -> program -> typed_program diff --git a/contrib/correctness/putil.ml b/contrib/correctness/putil.ml deleted file mode 100644 index 18c3ba35..00000000 --- a/contrib/correctness/putil.ml +++ /dev/null @@ -1,303 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* true | _ -> false -let is_pure = function TypePure _ -> true | _ -> false - -let named_app f x = { a_name = x.a_name; a_value = (f x.a_value) } - -let pre_app f x = - { p_assert = x.p_assert; p_name = x.p_name; p_value = f x.p_value } - -let post_app = named_app - -let anonymous x = { a_name = Anonymous; a_value = x } - -let anonymous_pre b x = { p_assert = b; p_name = Anonymous; p_value = x } - -let force_name f x = - option_map (fun q -> { a_name = Name (f q.a_name); a_value = q.a_value }) x - -let force_post_name x = force_name post_name x - -let force_bool_name x = - force_name (function Name id -> id | Anonymous -> bool_name()) x - -let out_post = function - Some { a_value = x } -> x - | None -> invalid_arg "out_post" - -let pre_of_assert b x = - { p_assert = b; p_name = x.a_name; p_value = x.a_value } - -let assert_of_pre x = - { a_name = x.p_name; a_value = x.p_value } - -(* Some generic functions on programs *) - -let is_mutable_in_env env id = - (is_in_env env id) & (is_mutable (type_in_env env id)) - -let now_vars env c = - Util.map_succeed - (function id -> if is_mutable_in_env env id then id else failwith "caught") - (global_vars (Global.env()) c) - -let make_before_after c = - let ids = global_vars (Global.env()) c in - let al = - Util.map_succeed - (function id -> - if is_at id then - match un_at id with (uid,"") -> (id,uid) | _ -> failwith "caught" - else failwith "caught") - ids - in - subst_in_constr al c - -(* [apply_pre] and [apply_post] instantiate pre- and post- conditions - * according to a given renaming of variables (and a date that means - * `before' in the case of the post-condition). - *) - -let make_assoc_list ren env on_prime ids = - List.fold_left - (fun al id -> - if is_mutable_in_env env id then - (id,current_var ren id)::al - else if is_at id then - let uid,d = un_at id in - if is_mutable_in_env env uid then - (match d with - "" -> (id,on_prime ren uid) - | _ -> (id,var_at_date ren d uid))::al - else - al - else - al) - [] ids - -let apply_pre ren env c = - let ids = global_vars (Global.env()) c.p_value in - let al = make_assoc_list ren env current_var ids in - { p_assert = c.p_assert; p_name = c.p_name; - p_value = subst_in_constr al c.p_value } - -let apply_assert ren env c = - let ids = global_vars (Global.env()) c.a_value in - let al = make_assoc_list ren env current_var ids in - { a_name = c.a_name; a_value = subst_in_constr al c.a_value } - -let apply_post ren env before c = - let ids = global_vars (Global.env()) c.a_value in - let al = - make_assoc_list ren env (fun r uid -> var_at_date r before uid) ids in - { a_name = c.a_name; a_value = subst_in_constr al c.a_value } - -(* [traverse_binder ren env bl] updates renaming [ren] and environment [env] - * as we cross the binders [bl] - *) - -let rec traverse_binders env = function - [] -> env - | (id,BindType v)::rem -> - traverse_binders (add (id,v) env) rem - | (id,BindSet)::rem -> - traverse_binders (add_set id env) rem - | (_,Untyped)::_ -> - invalid_arg "traverse_binders" - -let initial_renaming env = - let ids = Penv.fold_all (fun (id,_) l -> id::l) env [] in - update empty_ren "0" ids - - -(* Substitutions *) - -let rec type_c_subst s ((id,t),e,p,q) = - let s' = s @ List.map (fun (x,x') -> (at_id x "", at_id x' "")) s in - (id, type_v_subst s t), Peffect.subst s e, - List.map (pre_app (subst_in_constr s)) p, - option_map (post_app (subst_in_constr s')) q - -and type_v_subst s = function - Ref v -> Ref (type_v_subst s v) - | Array (n,v) -> Array (n,type_v_subst s v) - | Arrow (bl,c) -> Arrow(List.map (binder_subst s) bl, type_c_subst s c) - | (TypePure _) as v -> v - -and binder_subst s = function - (n, BindType v) -> (n, BindType (type_v_subst s v)) - | b -> b - -(* substitution of constr by others *) - -let rec type_c_rsubst s ((id,t),e,p,q) = - (id, type_v_rsubst s t), e, - List.map (pre_app (real_subst_in_constr s)) p, - option_map (post_app (real_subst_in_constr s)) q - -and type_v_rsubst s = function - Ref v -> Ref (type_v_rsubst s v) - | Array (n,v) -> Array (real_subst_in_constr s n,type_v_rsubst s v) - | Arrow (bl,c) -> Arrow(List.map (binder_rsubst s) bl, type_c_rsubst s c) - | TypePure c -> TypePure (real_subst_in_constr s c) - -and binder_rsubst s = function - | (n, BindType v) -> (n, BindType (type_v_rsubst s v)) - | b -> b - -(* make_arrow bl c = (x1:V1)...(xn:Vn)c *) - -let make_arrow bl c = match bl with - | [] -> invalid_arg "make_arrow: no binder" - | _ -> Arrow (bl,c) - -(* misc. functions *) - -let deref_type = function - | Ref v -> v - | _ -> invalid_arg "deref_type" - -let dearray_type = function - | Array (size,v) -> size,v - | _ -> invalid_arg "dearray_type" - -let constant_unit () = TypePure (constant "unit") - -let id_from_name = function Name id -> id | Anonymous -> (id_of_string "X") - -(* v_of_constr : traduit un type CCI en un type ML *) - -(* TODO: faire un test plus serieux sur le type des objets Coq *) -let rec is_pure_cci c = match kind_of_term c with - | Cast (c,_) -> is_pure_cci c - | Prod(_,_,c') -> is_pure_cci c' - | Rel _ | Ind _ | Const _ -> true (* heu... *) - | App _ -> not (is_matching_sigma c) - | _ -> Util.error "CCI term not acceptable in programs" - -let rec v_of_constr c = match kind_of_term c with - | Cast (c,_) -> v_of_constr c - | Prod _ -> - let revbl,t2 = Term.decompose_prod c in - let bl = - List.map - (fun (name,t1) -> (id_from_name name, BindType (v_of_constr t1))) - (List.rev revbl) - in - let vars = List.rev (List.map (fun (id,_) -> mkVar id) bl) in - Arrow (bl, c_of_constr (substl vars t2)) - | Ind _ | Const _ | App _ -> - TypePure c - | _ -> - failwith "v_of_constr: TODO" - -and c_of_constr c = - if is_matching_sigma c then - let (a,q) = match_sigma c in - (result_id, v_of_constr a), Peffect.bottom, [], Some (anonymous q) - else - (result_id, v_of_constr c), Peffect.bottom, [], None - - -(* pretty printers (for debugging purposes) *) - -open Pp -open Util - -let pr_lconstr x = Printer.pr_lconstr_env (Global.env()) x - -let pp_pre = function - [] -> (mt ()) - | l -> - hov 0 (str"pre " ++ - prlist_with_sep (fun () -> (spc ())) - (fun x -> pr_lconstr x.p_value) l) - -let pp_post = function - None -> (mt ()) - | Some c -> hov 0 (str"post " ++ pr_lconstr c.a_value) - -let rec pp_type_v = function - Ref v -> hov 0 (pp_type_v v ++ spc () ++ str"ref") - | Array (cc,v) -> hov 0 (str"array " ++ pr_lconstr cc ++ str" of " ++ pp_type_v v) - | Arrow (b,c) -> - hov 0 (prlist_with_sep (fun () -> (mt ())) pp_binder b ++ - pp_type_c c) - | TypePure c -> pr_lconstr c - -and pp_type_c ((id,v),e,p,q) = - hov 0 (str"returns " ++ pr_id id ++ str":" ++ pp_type_v v ++ spc () ++ - Peffect.pp e ++ spc () ++ pp_pre p ++ spc () ++ pp_post q ++ - spc () ++ str"end") - -and pp_binder = function - id,BindType v -> (str"(" ++ pr_id id ++ str":" ++ pp_type_v v ++ str")") - | id,BindSet -> (str"(" ++ pr_id id ++ str":Set)") - | id,Untyped -> (str"(" ++ pr_id id ++ str")") - -(* pretty-print of cc-terms (intermediate terms) *) - -let rec pp_cc_term = function - CC_var id -> pr_id id - | CC_letin (_,_,bl,c,c1) -> - hov 0 (hov 2 (str"let " ++ - prlist_with_sep (fun () -> (str",")) - (fun (id,_) -> pr_id id) bl ++ - str" =" ++ spc () ++ - pp_cc_term c ++ - str " in") ++ - fnl () ++ - pp_cc_term c1) - | CC_lam (bl,c) -> - hov 2 (prlist (fun (id,_) -> (str"[" ++ pr_id id ++ str"]")) bl ++ - cut () ++ - pp_cc_term c) - | CC_app (f,args) -> - hov 2 (str"(" ++ - pp_cc_term f ++ spc () ++ - prlist_with_sep (fun () -> (spc ())) pp_cc_term args ++ - str")") - | CC_tuple (_,_,cl) -> - hov 2 (str"(" ++ - prlist_with_sep (fun () -> (str"," ++ cut ())) - pp_cc_term cl ++ - str")") - | CC_case (_,b,[e1;e2]) -> - hov 0 (str"if " ++ pp_cc_term b ++ str" then" ++ fnl () ++ - str" " ++ hov 0 (pp_cc_term e1) ++ fnl () ++ - str"else" ++ fnl () ++ - str" " ++ hov 0 (pp_cc_term e2)) - | CC_case _ -> - hov 0 (str"") - | CC_expr c -> - hov 0 (pr_lconstr c) - | CC_hole c -> - (str"(?::" ++ pr_lconstr c ++ str")") - diff --git a/contrib/correctness/putil.mli b/contrib/correctness/putil.mli deleted file mode 100644 index 6c487f3f..00000000 --- a/contrib/correctness/putil.mli +++ /dev/null @@ -1,72 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* bool -val is_pure : 'a ml_type_v -> bool - -val named_app : ('a -> 'b) -> 'a assertion -> 'b assertion -val pre_app : ('a -> 'b) -> 'a precondition -> 'b precondition -val post_app : ('a -> 'b) -> 'a postcondition -> 'b postcondition - -val anonymous : 'a -> 'a assertion -val anonymous_pre : bool -> 'a -> 'a precondition -val out_post : 'a postcondition option -> 'a -val pre_of_assert : bool -> 'a assertion -> 'a precondition -val assert_of_pre : 'a precondition -> 'a assertion - -val force_post_name : 'a postcondition option -> 'a postcondition option -val force_bool_name : 'a postcondition option -> 'a postcondition option - -val make_before_after : constr -> constr - -val traverse_binders : local_env -> (type_v binder) list -> local_env -val initial_renaming : local_env -> Prename.t - -val apply_pre : Prename.t -> local_env -> constr precondition -> - constr precondition -val apply_post : Prename.t -> local_env -> string -> constr postcondition -> - constr postcondition -val apply_assert : Prename.t -> local_env -> constr assertion -> - constr assertion - -val type_v_subst : (identifier * identifier) list -> type_v -> type_v -val type_c_subst : (identifier * identifier) list -> type_c -> type_c - -val type_v_rsubst : (identifier * constr) list -> type_v -> type_v -val type_c_rsubst : (identifier * constr) list -> type_c -> type_c - -val make_arrow : ('a ml_type_v binder) list -> 'a ml_type_c -> 'a ml_type_v - -val is_mutable_in_env : local_env -> identifier -> bool -val now_vars : local_env -> constr -> identifier list - -val deref_type : 'a ml_type_v -> 'a ml_type_v -val dearray_type : 'a ml_type_v -> 'a * 'a ml_type_v -val constant_unit : unit -> constr ml_type_v -val v_of_constr : constr -> constr ml_type_v -val c_of_constr : constr -> constr ml_type_c -val is_pure_cci : constr -> bool - -(* pretty printers *) - -val pp_type_v : type_v -> std_ppcmds -val pp_type_c : type_c -> std_ppcmds -val pp_cc_term : cc_term -> std_ppcmds - diff --git a/contrib/correctness/pwp.ml b/contrib/correctness/pwp.ml deleted file mode 100644 index f422c5cd..00000000 --- a/contrib/correctness/pwp.ml +++ /dev/null @@ -1,347 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* (f a1 ... an) {Qf} if the ai are functional - * - * 2. (if e1 then e2 else e3) {Q} -> (if e1 then e2 {Q} else e3 {Q}) {Q} - * - * 3. (let x = e1 in e2) {Q} -> (let x = e1 in e2 {Q}) {Q} - *) - -(* force a post-condition *) -let update_post env top ef c = - let i,o = Peffect.get_repr ef in - let al = - List.fold_left - (fun l id -> - if is_mutable_in_env env id then - if is_write ef id then l else (id,at_id id "")::l - else if is_at id then - let (uid,d) = un_at id in - if is_mutable_in_env env uid & d="" then - (id,at_id uid top)::l - else - l - else - l) - [] (global_vars (Global.env()) c) - in - subst_in_constr al c - -let force_post up env top q e = - let (res,ef,p,_) = e.info.kappa in - let q' = - if up then option_map (named_app (update_post env top ef)) q else q - in - let i = { env = e.info.env; kappa = (res,ef,p,q') } in - { desc = e.desc; pre = e.pre; post = q'; loc = e.loc; info = i } - -(* put a post-condition if none is present *) -let post_if_none_up env top q = function - | { post = None } as p -> force_post true env top q p - | p -> p - -let post_if_none env q = function - | { post = None } as p -> force_post false env "" q p - | p -> p - -(* [annotation_candidate p] determines if p is a candidate for a - * post-condition *) - -let annotation_candidate = function - | { desc = If _ | Let _ | LetRef _ ; post = None } -> true - | _ -> false - -(* [extract_pre p] erase the pre-condition of p and returns it *) -let extract_pre pr = - let (v,e,p,q) = pr.info.kappa in - { desc = pr.desc; pre = []; post = pr.post; loc = pr.loc; - info = { env = pr.info.env; kappa = (v,e,[],q) } }, - p - -(* adds some pre-conditions *) -let add_pre p1 pr = - let (v,e,p,q) = pr.info.kappa in - let p' = p1 @ p in - { desc = pr.desc; pre = p'; post = pr.post; loc = pr.loc; - info = { env = pr.info.env; kappa = (v,e,p',q) } } - -(* change the statement *) -let change_desc p d = - { desc = d; pre = p.pre; post = p.post; loc = p.loc; info = p.info } - -let create_bool_post c = - Some { a_value = c; a_name = Name (bool_name()) } - -(* [normalize_boolean b] checks if the boolean expression b (of type bool) is - * annotated, and if it is not the case tries to add the annotation - * (if result then c=true else c=false) if b is an expression c. - *) - -let is_bool = function - | TypePure c -> - (match kind_of_term (strip_outer_cast c) with - | Ind op -> - string_of_id (id_of_global (IndRef op)) = "bool" - | _ -> false) - | _ -> false - -let normalize_boolean ren env b = - let ((res,v),ef,p,q) = b.info.kappa in - Perror.check_no_effect b.loc ef; - if is_bool v then - match q with - | Some _ -> - (* il y a une annotation : on se contente de lui forcer un nom *) - let q = force_bool_name q in - { desc = b.desc; pre = b.pre; post = q; loc = b.loc; - info = { env = b.info.env; kappa = ((res,v),ef,p,q) } } - | None -> begin - (* il n'y a pas d'annotation : on cherche à en mettre une *) - match b.desc with - Expression c -> - let c' = Term.applist (constant "annot_bool",[c]) in - let ty = type_of_expression ren env c' in - let (_,q') = Hipattern.match_sigma ty in - let q' = Some { a_value = q'; a_name = Name (bool_name()) } in - { desc = Expression c'; - pre = b.pre; post = q'; loc = b.loc; - info = { env = b.info.env; kappa = ((res, v),ef,p,q') } } - | _ -> b - end - else - Perror.should_be_boolean b.loc - -(* [decomp_boolean c] returns the specs R and S of a boolean expression *) - -let decomp_boolean = function - | Some { a_value = q } -> - Reductionops.whd_betaiota (Term.applist (q, [constant "true"])), - Reductionops.whd_betaiota (Term.applist (q, [constant "false"])) - | _ -> invalid_arg "Ptyping.decomp_boolean" - -(* top point of a program *) - -let top_point = function - | PPoint (s,_) as p -> s,p - | p -> let s = label_name() in s,PPoint(s,p) - -let top_point_block = function - | (Label s :: _) as b -> s,b - | b -> let s = label_name() in s,(Label s)::b - -let abstract_unit q = abstract [result_id,constant "unit"] q - -(* [add_decreasing env ren ren' phi r bl] adds the decreasing condition - * phi(ren') r phi(ren) - * to the last assertion of the block [bl], which is created if needed - *) - -let add_decreasing env inv (var,r) lab bl = - let ids = now_vars env var in - let al = List.map (fun id -> (id,at_id id lab)) ids in - let var_lab = subst_in_constr al var in - let dec = Term.applist (r, [var;var_lab]) in - let post = match inv with - None -> anonymous dec - | Some i -> { a_value = conj dec i.a_value; a_name = i.a_name } - in - bl @ [ Assert post ] - -(* [post_last_statement env top q bl] annotates the last statement of the - * sequence bl with q if necessary *) - -let post_last_statement env top q bl = - match List.rev bl with - | Statement e :: rem when annotation_candidate e -> - List.rev ((Statement (post_if_none_up env top q e)) :: rem) - | _ -> bl - -(* [propagate_desc] moves the annotations inside the program - * info is the typing information coming from the outside annotations *) -let rec propagate_desc ren info d = - let env = info.env in - let (_,_,p,q) = info.kappa in - match d with - | If (e1,e2,e3) -> - (* propagation number 2 *) - let e1' = normalize_boolean ren env (propagate ren e1) in - if e2.post = None or e3.post = None then - let top = label_name() in - let ren' = push_date ren top in - PPoint (top, If (e1', - propagate ren' (post_if_none_up env top q e2), - propagate ren' (post_if_none_up env top q e3))) - else - If (e1', propagate ren e2, propagate ren e3) - | Aff (x,e) -> - Aff (x, propagate ren e) - | TabAcc (ch,x,e) -> - TabAcc (ch, x, propagate ren e) - | TabAff (ch,x,({desc=Expression c} as e1),e2) -> - let p = Pmonad.make_pre_access ren env x c in - let e1' = add_pre [(anonymous_pre true p)] e1 in - TabAff (false, x, propagate ren e1', propagate ren e2) - | TabAff (ch,x,e1,e2) -> - TabAff (ch, x, propagate ren e1, propagate ren e2) - | Apply (f,l) -> - Apply (propagate ren f, List.map (propagate_arg ren) l) - | SApp (f,l) -> - let l = - List.map (fun e -> normalize_boolean ren env (propagate ren e)) l - in - SApp (f, l) - | Lam (bl,e) -> - Lam (bl, propagate ren e) - | Seq bl -> - let top,bl = top_point_block bl in - let bl = post_last_statement env top q bl in - Seq (propagate_block ren env bl) - | While (b,inv,var,bl) -> - let b = normalize_boolean ren env (propagate ren b) in - let lab,bl = top_point_block bl in - let bl = add_decreasing env inv var lab bl in - While (b,inv,var,propagate_block ren env bl) - | LetRef (x,e1,e2) -> - let top = label_name() in - let ren' = push_date ren top in - PPoint (top, LetRef (x, propagate ren' e1, - propagate ren' (post_if_none_up env top q e2))) - | Let (x,e1,e2) -> - let top = label_name() in - let ren' = push_date ren top in - PPoint (top, Let (x, propagate ren' e1, - propagate ren' (post_if_none_up env top q e2))) - | LetRec (f,bl,v,var,e) -> - LetRec (f, bl, v, var, propagate ren e) - | PPoint (s,d) -> - PPoint (s, propagate_desc ren info d) - | Debug _ | Variable _ - | Acc _ | Expression _ as d -> d - - -(* [propagate] adds new annotations if possible *) -and propagate ren p = - let env = p.info.env in - let p = match p.desc with - | Apply (f,l) -> - let _,(_,so,ok),(_,_,_,qapp) = effect_app ren env f l in - if ok then - let q = option_map (named_app (real_subst_in_constr so)) qapp in - post_if_none env q p - else - p - | _ -> p - in - let d = propagate_desc ren p.info p.desc in - let p = change_desc p d in - match d with - | Aff (x,e) -> - let e1,p1 = extract_pre e in - change_desc (add_pre p1 p) (Aff (x,e1)) - - | TabAff (check, x, ({ desc = Expression _ } as e1), e2) -> - let e1',p1 = extract_pre e1 in - let e2',p2 = extract_pre e2 in - change_desc (add_pre (p1@p2) p) (TabAff (check,x,e1',e2')) - - | While (b,inv,_,_) -> - let _,s = decomp_boolean b.post in - let s = make_before_after s in - let q = match inv with - None -> Some (anonymous s) - | Some i -> Some { a_value = conj i.a_value s; a_name = i.a_name } - in - let q = option_map (named_app abstract_unit) q in - post_if_none env q p - - | SApp ([Variable id], [e1;e2]) - when id = connective_and or id = connective_or -> - let (_,_,_,q1) = e1.info.kappa - and (_,_,_,q2) = e2.info.kappa in - let (r1,s1) = decomp_boolean q1 - and (r2,s2) = decomp_boolean q2 in - let q = - let conn = if id = connective_and then "spec_and" else "spec_or" in - let c = Term.applist (constant conn, [r1; s1; r2; s2]) in - let c = Reduction.whd_betadeltaiota (Global.env()) c in - create_bool_post c - in - let d = - SApp ([Variable id; - Expression (out_post q1); - Expression (out_post q2)], - [e1; e2] ) - in - post_if_none env q (change_desc p d) - - | SApp ([Variable id], [e1]) when id = connective_not -> - let (_,_,_,q1) = e1.info.kappa in - let (r1,s1) = decomp_boolean q1 in - let q = - let c = Term.applist (constant "spec_not", [r1; s1]) in - let c = Reduction.whd_betadeltaiota (Global.env ()) c in - create_bool_post c - in - let d = SApp ([Variable id; Expression (out_post q1)], [ e1 ]) in - post_if_none env q (change_desc p d) - - | _ -> p - -and propagate_arg ren = function - | Type _ | Refarg _ as a -> a - | Term e -> Term (propagate ren e) - - -and propagate_block ren env = function - | [] -> - [] - | (Statement p) :: (Assert q) :: rem when annotation_candidate p -> - (* TODO: plutot p.post = None ? *) - let q' = - let ((id,v),_,_,_) = p.info.kappa in - let tv = Pmonad.trad_ml_type_v ren env v in - named_app (abstract [id,tv]) q - in - let p' = post_if_none env (Some q') p in - (Statement (propagate ren p')) :: (Assert q) - :: (propagate_block ren env rem) - | (Statement p) :: rem -> - (Statement (propagate ren p)) :: (propagate_block ren env rem) - | (Label s as x) :: rem -> - x :: propagate_block (push_date ren s) env rem - | x :: rem -> - x :: propagate_block ren env rem diff --git a/contrib/correctness/pwp.mli b/contrib/correctness/pwp.mli deleted file mode 100644 index 4027a623..00000000 --- a/contrib/correctness/pwp.mli +++ /dev/null @@ -1,18 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* string -> Peffect.t -> constr -> constr - -val propagate : Prename.t -> typed_program -> typed_program diff --git a/contrib/dp/Dp.v b/contrib/dp/Dp.v new file mode 100644 index 00000000..857c182c --- /dev/null +++ b/contrib/dp/Dp.v @@ -0,0 +1,120 @@ +(* Calls to external decision procedures *) + +Require Export ZArith. +Require Export Classical. + +(* Zenon *) + +(* Copyright 2004 INRIA *) +(* $Id: Dp.v 10739 2008-04-01 14:45:20Z herbelin $ *) + +Lemma zenon_nottrue : + (~True -> False). +Proof. tauto. Qed. + +Lemma zenon_noteq : forall (T : Type) (t : T), + ((t <> t) -> False). +Proof. tauto. Qed. + +Lemma zenon_and : forall P Q : Prop, + (P -> Q -> False) -> (P /\ Q -> False). +Proof. tauto. Qed. + +Lemma zenon_or : forall P Q : Prop, + (P -> False) -> (Q -> False) -> (P \/ Q -> False). +Proof. tauto. Qed. + +Lemma zenon_imply : forall P Q : Prop, + (~P -> False) -> (Q -> False) -> ((P -> Q) -> False). +Proof. tauto. Qed. + +Lemma zenon_equiv : forall P Q : Prop, + (~P -> ~Q -> False) -> (P -> Q -> False) -> ((P <-> Q) -> False). +Proof. tauto. Qed. + +Lemma zenon_notand : forall P Q : Prop, + (~P -> False) -> (~Q -> False) -> (~(P /\ Q) -> False). +Proof. tauto. Qed. + +Lemma zenon_notor : forall P Q : Prop, + (~P -> ~Q -> False) -> (~(P \/ Q) -> False). +Proof. tauto. Qed. + +Lemma zenon_notimply : forall P Q : Prop, + (P -> ~Q -> False) -> (~(P -> Q) -> False). +Proof. tauto. Qed. + +Lemma zenon_notequiv : forall P Q : Prop, + (~P -> Q -> False) -> (P -> ~Q -> False) -> (~(P <-> Q) -> False). +Proof. tauto. Qed. + +Lemma zenon_ex : forall (T : Type) (P : T -> Prop), + (forall z : T, ((P z) -> False)) -> ((exists x : T, (P x)) -> False). +Proof. firstorder. Qed. + +Lemma zenon_all : forall (T : Type) (P : T -> Prop) (t : T), + ((P t) -> False) -> ((forall x : T, (P x)) -> False). +Proof. firstorder. Qed. + +Lemma zenon_notex : forall (T : Type) (P : T -> Prop) (t : T), + (~(P t) -> False) -> (~(exists x : T, (P x)) -> False). +Proof. firstorder. Qed. + +Lemma zenon_notall : forall (T : Type) (P : T -> Prop), + (forall z : T, (~(P z) -> False)) -> (~(forall x : T, (P x)) -> False). +Proof. intros T P Ha Hb. apply Hb. intro. apply NNPP. exact (Ha x). Qed. + +Lemma zenon_equal_base : forall (T : Type) (f : T), f = f. +Proof. auto. Qed. + +Lemma zenon_equal_step : + forall (S T : Type) (fa fb : S -> T) (a b : S), + (fa = fb) -> (a <> b -> False) -> ((fa a) = (fb b)). +Proof. intros. rewrite (NNPP (a = b)). congruence. auto. Qed. + +Lemma zenon_pnotp : forall P Q : Prop, + (P = Q) -> (P -> ~Q -> False). +Proof. intros P Q Ha. rewrite Ha. auto. Qed. + +Lemma zenon_notequal : forall (T : Type) (a b : T), + (a = b) -> (a <> b -> False). +Proof. auto. Qed. + +Ltac zenon_intro id := + intro id || let nid := fresh in (intro nid; clear nid) +. + +Definition zenon_and_s := fun P Q a b => zenon_and P Q b a. +Definition zenon_or_s := fun P Q a b c => zenon_or P Q b c a. +Definition zenon_imply_s := fun P Q a b c => zenon_imply P Q b c a. +Definition zenon_equiv_s := fun P Q a b c => zenon_equiv P Q b c a. +Definition zenon_notand_s := fun P Q a b c => zenon_notand P Q b c a. +Definition zenon_notor_s := fun P Q a b => zenon_notor P Q b a. +Definition zenon_notimply_s := fun P Q a b => zenon_notimply P Q b a. +Definition zenon_notequiv_s := fun P Q a b c => zenon_notequiv P Q b c a. +Definition zenon_ex_s := fun T P a b => zenon_ex T P b a. +Definition zenon_notall_s := fun T P a b => zenon_notall T P b a. + +Definition zenon_pnotp_s := fun P Q a b c => zenon_pnotp P Q c a b. +Definition zenon_notequal_s := fun T a b x y => zenon_notequal T a b y x. + +(* Ergo *) + +Set Implicit Arguments. +Section congr. + Variable t:Type. +Lemma ergo_eq_concat_1 : + forall (P:t -> Prop) (x y:t), + P x -> x = y -> P y. +Proof. + intros; subst; auto. +Qed. + +Lemma ergo_eq_concat_2 : + forall (P:t -> t -> Prop) (x1 x2 y1 y2:t), + P x1 x2 -> x1 = y1 -> x2 = y2 -> P y1 y2. +Proof. + intros; subst; auto. +Qed. + +End congr. diff --git a/contrib/dp/TODO b/contrib/dp/TODO index 387cacdf..44349e21 100644 --- a/contrib/dp/TODO +++ b/contrib/dp/TODO @@ -21,8 +21,4 @@ TODO BUGS ---- -- value = Some : forall A:Set, A -> option A - - -> eta_expanse échoue sur assert false (ligne 147) - diff --git a/contrib/dp/dp.ml b/contrib/dp/dp.ml index 131dd029..79ffaf3f 100644 --- a/contrib/dp/dp.ml +++ b/contrib/dp/dp.ml @@ -13,6 +13,8 @@ open Util open Pp +open Libobject +open Summary open Term open Tacmach open Tactics @@ -25,12 +27,46 @@ open Coqlib open Hipattern open Libnames open Declarations +open Dp_why let debug = ref false +let set_debug b = debug := b +let trace = ref false +let set_trace b = trace := b +let timeout = ref 10 +let set_timeout n = timeout := n + +let (dp_timeout_obj,_) = + declare_object + {(default_object "Dp_timeout") with + cache_function = (fun (_,x) -> set_timeout x); + load_function = (fun _ (_,x) -> set_timeout x); + export_function = (fun x -> Some x)} + +let dp_timeout x = Lib.add_anonymous_leaf (dp_timeout_obj x) + +let (dp_debug_obj,_) = + declare_object + {(default_object "Dp_debug") with + cache_function = (fun (_,x) -> set_debug x); + load_function = (fun _ (_,x) -> set_debug x); + export_function = (fun x -> Some x)} + +let dp_debug x = Lib.add_anonymous_leaf (dp_debug_obj x) + +let (dp_trace_obj,_) = + declare_object + {(default_object "Dp_trace") with + cache_function = (fun (_,x) -> set_trace x); + load_function = (fun _ (_,x) -> set_trace x); + export_function = (fun x -> Some x)} + +let dp_trace x = Lib.add_anonymous_leaf (dp_trace_obj x) let logic_dir = ["Coq";"Logic";"Decidable"] let coq_modules = init_modules @ [logic_dir] @ arith_modules @ zarith_base_modules + @ [["Coq"; "ZArith"; "BinInt"]] @ [["Coq"; "omega"; "OmegaLemmas"]] let constant = gen_constant_in_modules "dp" coq_modules @@ -52,6 +88,7 @@ let coq_Zneg = lazy (constant "Zneg") let coq_xH = lazy (constant "xH") let coq_xI = lazy (constant "xI") let coq_xO = lazy (constant "xO") +let coq_iff = lazy (constant "iff") (* not Prop typed expressions *) exception NotProp @@ -104,7 +141,7 @@ let coq_rename_vars env vars = type_quantifiers env (A1:Set)...(Ak:Set)t = A1...An, (env+Ai), t *) let decomp_type_quantifiers env t = let rec loop vars t = match kind_of_term t with - | Prod (n, a, t) when is_Set a -> + | Prod (n, a, t) when is_Set a || is_Type a -> loop ((n,a) :: vars) t | _ -> let vars, env = coq_rename_vars env vars in @@ -116,7 +153,7 @@ let decomp_type_quantifiers env t = (* same thing with lambda binders (for axiomatize body) *) let decomp_type_lambdas env t = let rec loop vars t = match kind_of_term t with - | Lambda (n, a, t) when is_Set a -> + | Lambda (n, a, t) when is_Set a || is_Type a -> loop ((n,a) :: vars) t | _ -> let vars, env = coq_rename_vars env vars in @@ -314,7 +351,7 @@ and make_term_abstraction tv env c = *) and tr_decl env id ty = let tv, env, t = decomp_type_quantifiers env ty in - if is_Set t then + if is_Set t || is_Type t then DeclType (id, List.length tv) else if is_Prop t then DeclPred (id, List.length tv, []) @@ -329,8 +366,8 @@ and tr_decl env id ty = DeclPred(id, List.length tv, l) else let s = Typing.type_of env Evd.empty t in - if is_Set s then - DeclFun(id, List.length tv, l, tr_type tv env t) + if is_Set s || is_Type s then + DeclFun (id, List.length tv, l, tr_type tv env t) else raise NotFO @@ -364,17 +401,18 @@ and axiomatize_body env r id d = match r with begin match (Global.lookup_constant c).const_body with | Some b -> let b = force b in - let tv, env, b = decomp_type_lambdas env b in let axioms = (match d with | DeclPred (id, _, []) -> + let tv, env, b = decomp_type_lambdas env b in let value = tr_formula tv [] env b in [id, Iff (Fatom (Pred (id, [])), value)] | DeclFun (id, _, [], _) -> + let tv, env, b = decomp_type_lambdas env b in let value = tr_term tv [] env b in [id, Fatom (Eq (Fol.App (id, []), value))] | DeclFun (id, _, l, _) | DeclPred (id, _, l) -> - Format.eprintf "axiomatize_body %S@." id; + (*Format.eprintf "axiomatize_body %S@." id;*) let b = match kind_of_term b with (* a single recursive function *) | Fix (_, (_,_,[|b|])) -> @@ -391,6 +429,7 @@ and axiomatize_body env r id d = match r with | _ -> b in + let tv, env, b = decomp_type_lambdas env b in let vars, t = decompose_lam b in let n = List.length l in let k = List.length vars in @@ -401,21 +440,21 @@ and axiomatize_body env r id d = match r with let vars = List.rev vars in let bv = vars in let vars = List.map (fun x -> string_of_id x) vars in - let fol_var x = - Fol.App (x, []) in + let fol_var x = Fol.App (x, []) in let fol_vars = List.map fol_var vars in let vars = List.combine vars l in begin match d with - | DeclFun _ -> + | DeclFun (_, _, _, ty) -> begin match kind_of_term t with | Case (ci, _, e, br) -> equations_for_case env id vars tv bv ci e br | _ -> - let p = - Fatom (Eq (App (id, fol_vars), - tr_term tv bv env t)) + let t = tr_term tv bv env t in + let ax = + add_proof (Fun_def (id, vars, ty, t)) in - [id, foralls vars p] + let p = Fatom (Eq (App (id, fol_vars), t)) in + [ax, foralls vars p] end | DeclPred _ -> let value = tr_formula tv bv env t in @@ -436,7 +475,7 @@ and axiomatize_body env r id d = match r with | IndRef i -> iter_all_constructors i (fun _ c -> - let rc = reference_of_constr c in + let rc = global_of_constr c in try begin match tr_global env rc with | DeclFun (_, _, [], _) -> () @@ -453,18 +492,20 @@ and equations_for_case env id vars tv bv ci e br = match kind_of_term e with iter_all_constructors ci.ci_ind (fun j cj -> try - let cjr = reference_of_constr cj in + let cjr = global_of_constr cj in begin match tr_global env cjr with | DeclFun (idc, _, l, _) -> let b = br.(j) in let rec_vars, b = decompose_lam b in let rec_vars, env = coq_rename_vars env rec_vars in - let b = substl (List.map mkVar rec_vars) b in + let coq_rec_vars = List.map mkVar rec_vars in + let b = substl coq_rec_vars b in let rec_vars = List.rev rec_vars in + let coq_rec_term = applist (cj, List.rev coq_rec_vars) in + let b = replace_vars [x, coq_rec_term] b in let bv = bv @ rec_vars in let rec_vars = List.map string_of_id rec_vars in - let fol_var x = - Fol.App (x, []) in + let fol_var x = Fol.App (x, []) in let fol_rec_vars = List.map fol_var rec_vars in let fol_rec_term = App (idc, fol_rec_vars) in let rec_vars = List.combine rec_vars l in @@ -558,7 +599,7 @@ and tr_formula tv bv env f = Fatom (Pred (rename_global (VarRef id), [])) | _, [t;a;b] when c = build_coq_eq () -> let ty = Typing.type_of env Evd.empty t in - if is_Set ty then + if is_Set ty || is_Type ty then let _ = tr_type tv env t in Fatom (Eq (tr_term tv bv env a, tr_term tv bv env b)) else @@ -581,6 +622,8 @@ and tr_formula tv bv env f = And (tr_formula tv bv env a, tr_formula tv bv env b) | _, [a;b] when c = build_coq_or () -> Or (tr_formula tv bv env a, tr_formula tv bv env b) + | _, [a;b] when c = Lazy.force coq_iff -> + Iff (tr_formula tv bv env a, tr_formula tv bv env b) | Prod (n, a, b), _ -> if is_imp_term f then Imp (tr_formula tv bv env a, tr_formula tv bv env b) @@ -632,55 +675,164 @@ let tr_goal gl = hyps, c -type prover = Simplify | CVCLite | Harvey | Zenon +type prover = Simplify | Ergo | Yices | CVCLite | Harvey | Zenon | Gwhy let remove_files = List.iter (fun f -> try Sys.remove f with _ -> ()) let sprintf = Format.sprintf +let file_contents f = + let buf = Buffer.create 1024 in + try + let c = open_in f in + begin try + while true do + let s = input_line c in Buffer.add_string buf s; + Buffer.add_char buf '\n' + done; + assert false + with End_of_file -> + close_in c; + Buffer.contents buf + end + with _ -> + sprintf "(cannot open %s)" f + +let timeout_sys_command cmd = + if !debug then Format.eprintf "command line: %s@." cmd; + let out = Filename.temp_file "out" "" in + let cmd = sprintf "cpulimit %d %s > %s 2>&1" !timeout cmd out in + let ret = Sys.command cmd in + if !debug then + Format.eprintf "Output file %s:@.%s@." out (file_contents out); + ret, out + +let timeout_or_failure c cmd out = + if c = 152 then + Timeout + else + Failure + (sprintf "command %s failed with output:\n%s " cmd (file_contents out)) + +let prelude_files = ref ([] : string list) + +let set_prelude l = prelude_files := l + +let (dp_prelude_obj,_) = + declare_object + {(default_object "Dp_prelude") with + cache_function = (fun (_,x) -> set_prelude x); + load_function = (fun _ (_,x) -> set_prelude x); + export_function = (fun x -> Some x)} + +let dp_prelude x = Lib.add_anonymous_leaf (dp_prelude_obj x) + +let why_files f = String.concat " " (!prelude_files @ [f]) + let call_simplify fwhy = - let cmd = sprintf "why --simplify %s" fwhy in - if Sys.command cmd <> 0 then error ("Call to " ^ cmd ^ " failed"); + let cmd = + sprintf "why --no-arrays --simplify --encoding sstrat %s" (why_files fwhy) + in + if Sys.command cmd <> 0 then error ("call to " ^ cmd ^ " failed"); let fsx = Filename.chop_suffix fwhy ".why" ^ "_why.sx" in let cmd = - sprintf "timeout 10 Simplify %s > out 2>&1 && grep -q -w Valid out" fsx + sprintf "timeout %d Simplify %s > out 2>&1 && grep -q -w Valid out" + !timeout fsx in let out = Sys.command cmd in - let r = if out = 0 then Valid else if out = 1 then Invalid else Timeout in + let r = + if out = 0 then Valid None else if out = 1 then Invalid else Timeout + in if not !debug then remove_files [fwhy; fsx]; r +let call_ergo fwhy = + let cmd = sprintf "why --no-arrays --why %s" (why_files fwhy) in + if Sys.command cmd <> 0 then error ("call to " ^ cmd ^ " failed"); + let fwhy = Filename.chop_suffix fwhy ".why" ^ "_why.why" in + let ftrace = Filename.temp_file "ergo_trace" "" in + let cmd = + if !trace then + sprintf "ergo -cctrace %s %s" ftrace fwhy + else + sprintf "ergo %s" fwhy + in + let ret,out = timeout_sys_command cmd in + let r = + if ret <> 0 then + timeout_or_failure ret cmd out + else if Sys.command (sprintf "grep -q -w Valid %s" out) = 0 then + Valid (if !trace then Some ftrace else None) + else if Sys.command (sprintf "grep -q -w \"I don't know\" %s" out) = 0 then + DontKnow + else if Sys.command (sprintf "grep -q -w \"Invalid\" %s" out) = 0 then + Invalid + else + Failure ("command failed: " ^ cmd) + in + if not !debug then remove_files [fwhy; out]; + r + let call_zenon fwhy = - let cmd = sprintf "why --no-prelude --no-zenon-prelude --zenon %s" fwhy in + let cmd = + sprintf "why --no-prelude --no-zenon-prelude --zenon %s" (why_files fwhy) + in if Sys.command cmd <> 0 then error ("call to " ^ cmd ^ " failed"); let fznn = Filename.chop_suffix fwhy ".why" ^ "_why.znn" in + let out = Filename.temp_file "dp_out" "" in let cmd = - sprintf "timeout 10 zenon %s > out 2>&1 && grep -q PROOF-FOUND out" fznn + sprintf "timeout %d zenon -ocoqterm %s > %s 2>&1" !timeout fznn out + in + let c = Sys.command cmd in + if not !debug then remove_files [fwhy; fznn]; + if c = 137 then + Timeout + else begin + if c <> 0 then anomaly ("command failed: " ^ cmd); + if Sys.command (sprintf "grep -q -w Error %s" out) = 0 then + error "Zenon failed"; + let c = Sys.command (sprintf "grep -q PROOF-FOUND %s" out) in + if c = 0 then Valid (Some out) else Invalid + end + +let call_yices fwhy = + let cmd = + sprintf "why --no-arrays -smtlib --encoding sstrat %s" (why_files fwhy) + in + if Sys.command cmd <> 0 then error ("call to " ^ cmd ^ " failed"); + let fsmt = Filename.chop_suffix fwhy ".why" ^ "_why.smt" in + let cmd = + sprintf "timeout %d yices -pc 0 -smt < %s > out 2>&1 && grep -q -w unsat out" + !timeout fsmt in let out = Sys.command cmd in let r = - if out = 0 then Valid - else if out = 1 then Invalid - else if out = 137 then Timeout - else anomaly ("malformed Zenon input file " ^ fznn) + if out = 0 then Valid None else if out = 1 then Invalid else Timeout in - if not !debug then remove_files [fwhy; fznn]; + if not !debug then remove_files [fwhy; fsmt]; r let call_cvcl fwhy = - let cmd = sprintf "why --cvcl %s" fwhy in + let cmd = + sprintf "why --no-arrays --cvcl --encoding sstrat %s" (why_files fwhy) + in if Sys.command cmd <> 0 then error ("call to " ^ cmd ^ " failed"); let fcvc = Filename.chop_suffix fwhy ".why" ^ "_why.cvc" in let cmd = - sprintf "timeout 10 cvcl < %s > out 2>&1 && grep -q -w Valid out" fcvc + sprintf "timeout %d cvcl < %s > out 2>&1 && grep -q -w Valid out" + !timeout fcvc in let out = Sys.command cmd in - let r = if out = 0 then Valid else if out = 1 then Invalid else Timeout in + let r = + if out = 0 then Valid None else if out = 1 then Invalid else Timeout + in if not !debug then remove_files [fwhy; fcvc]; r let call_harvey fwhy = - let cmd = sprintf "why --harvey %s" fwhy in + let cmd = + sprintf "why --no-arrays --harvey --encoding strat %s" (why_files fwhy) + in if Sys.command cmd <> 0 then error ("call to " ^ cmd ^ " failed"); let frv = Filename.chop_suffix fwhy ".why" ^ "_why.rv" in let out = Sys.command (sprintf "rvc -e -t %s > /dev/null 2>&1" frv) in @@ -688,7 +840,8 @@ let call_harvey fwhy = let f = Filename.chop_suffix frv ".rv" ^ "-0.baf" in let outf = Filename.temp_file "rv" ".out" in let out = - Sys.command (sprintf "timeout 10 rv -e\"-T 2000\" %s > %s 2>&1" f outf) + Sys.command (sprintf "timeout %d rv -e\"-T 2000\" %s > %s 2>&1" + !timeout f outf) in let r = if out <> 0 then @@ -697,40 +850,69 @@ let call_harvey fwhy = let cmd = sprintf "grep \"Proof obligation in\" %s | grep -q \"is valid\"" outf in - if Sys.command cmd = 0 then Valid else Invalid + if Sys.command cmd = 0 then Valid None else Invalid in if not !debug then remove_files [fwhy; frv; outf]; r +let call_gwhy fwhy = + let cmd = sprintf "gwhy --no-arrays %s" (why_files fwhy) in + if Sys.command cmd <> 0 then ignore (Sys.command (sprintf "emacs %s" fwhy)); + NoAnswer + +let ergo_proof_from_file f gl = + let s = + let buf = Buffer.create 1024 in + let c = open_in f in + try + while true do Buffer.add_string buf (input_line c) done; assert false + with End_of_file -> + close_in c; + Buffer.contents buf + in + let parsed_constr = Pcoq.parse_string Pcoq.Constr.constr s in + let t = Constrintern.interp_constr (project gl) (pf_env gl) parsed_constr in + exact_check t gl + let call_prover prover q = let fwhy = Filename.temp_file "coq_dp" ".why" in Dp_why.output_file fwhy q; - if !debug then ignore (Sys.command (sprintf "cat %s" fwhy)); match prover with | Simplify -> call_simplify fwhy + | Ergo -> call_ergo fwhy + | Yices -> call_yices fwhy | Zenon -> call_zenon fwhy | CVCLite -> call_cvcl fwhy | Harvey -> call_harvey fwhy + | Gwhy -> call_gwhy fwhy let dp prover gl = + Coqlib.check_required_library ["Coq";"ZArith";"ZArith"]; let concl_type = pf_type_of gl (pf_concl gl) in if not (is_Prop concl_type) then error "Conclusion is not a Prop"; try let q = tr_goal gl in begin match call_prover prover q with - | Valid -> Tactics.admit_as_an_axiom gl + | Valid (Some f) when prover = Zenon -> Dp_zenon.proof_from_file f gl + | Valid (Some f) when prover = Ergo -> ergo_proof_from_file f gl + | Valid _ -> Tactics.admit_as_an_axiom gl | Invalid -> error "Invalid" | DontKnow -> error "Don't know" | Timeout -> error "Timeout" + | Failure s -> error s + | NoAnswer -> Tacticals.tclIDTAC gl end with NotFO -> error "Not a first order goal" - + let simplify = tclTHEN intros (dp Simplify) +let ergo = tclTHEN intros (dp Ergo) +let yices = tclTHEN intros (dp Yices) let cvc_lite = tclTHEN intros (dp CVCLite) let harvey = dp Harvey let zenon = tclTHEN intros (dp Zenon) +let gwhy = tclTHEN intros (dp Gwhy) let dp_hint l = let env = Global.env () in @@ -741,7 +923,8 @@ let dp_hint l = if is_Prop s then try let id = rename_global r in - let d = Axiom (id, tr_formula [] [] env ty) in + let tv, env, ty = decomp_type_quantifiers env ty in + let d = Axiom (id, tr_formula tv [] env ty) in add_global r (Gfo d); globals_stack := d :: !globals_stack with NotFO -> @@ -757,3 +940,52 @@ let dp_hint l = end in List.iter one_hint (List.map (fun qid -> qid, Nametab.global qid) l) + +let (dp_hint_obj,_) = + declare_object + {(default_object "Dp_hint") with + cache_function = (fun (_,l) -> dp_hint l); + load_function = (fun _ (_,l) -> dp_hint l); + export_function = (fun x -> Some x)} + +let dp_hint l = Lib.add_anonymous_leaf (dp_hint_obj l) + +let dp_predefined qid s = + let r = Nametab.global qid in + let ty = Global.type_of_global r in + let env = Global.env () in + let id = rename_global r in + try + let d = match tr_decl env id ty with + | DeclType (_, n) -> DeclType (s, n) + | DeclFun (_, n, tyl, ty) -> DeclFun (s, n, tyl, ty) + | DeclPred (_, n, tyl) -> DeclPred (s, n, tyl) + | Axiom _ as d -> d + in + match d with + | Axiom _ -> msg_warning (str " ignored (axiom)") + | d -> add_global r (Gfo d) + with NotFO -> + msg_warning (str " ignored (not a first order declaration)") + +let (dp_predefined_obj,_) = + declare_object + {(default_object "Dp_predefined") with + cache_function = (fun (_,(id,s)) -> dp_predefined id s); + load_function = (fun _ (_,(id,s)) -> dp_predefined id s); + export_function = (fun x -> Some x)} + +let dp_predefined id s = Lib.add_anonymous_leaf (dp_predefined_obj (id,s)) + +let _ = declare_summary "Dp options" + { freeze_function = + (fun () -> !debug, !trace, !timeout, !prelude_files); + unfreeze_function = + (fun (d,tr,tm,pr) -> + debug := d; trace := tr; timeout := tm; prelude_files := pr); + init_function = + (fun () -> + debug := false; trace := false; timeout := 10; + prelude_files := []); + survive_module = true; + survive_section = true } diff --git a/contrib/dp/dp.mli b/contrib/dp/dp.mli index 3dad469c..6dbc05e1 100644 --- a/contrib/dp/dp.mli +++ b/contrib/dp/dp.mli @@ -3,10 +3,18 @@ open Libnames open Proof_type val simplify : tactic +val ergo : tactic +val yices : tactic val cvc_lite : tactic val harvey : tactic val zenon : tactic +val gwhy : tactic val dp_hint : reference list -> unit +val dp_timeout : int -> unit +val dp_debug : bool -> unit +val dp_trace : bool -> unit +val dp_prelude : string list -> unit +val dp_predefined : reference -> string -> unit diff --git a/contrib/dp/dp_cvcl.ml b/contrib/dp/dp_cvcl.ml deleted file mode 100644 index 05d43081..00000000 --- a/contrib/dp/dp_cvcl.ml +++ /dev/null @@ -1,112 +0,0 @@ - -open Format -open Fol - -let rec print_list sep print fmt = function - | [] -> () - | [x] -> print fmt x - | x :: r -> print fmt x; sep fmt (); print_list sep print fmt r - -let space fmt () = fprintf fmt "@ " -let comma fmt () = fprintf fmt ",@ " - -let rec print_term fmt = function - | Cst n -> - fprintf fmt "%d" n - | Plus (a, b) -> - fprintf fmt "@[(%a@ +@ %a)@]" print_term a print_term b - | Moins (a, b) -> - fprintf fmt "@[(%a@ -@ %a)@]" print_term a print_term b - | Mult (a, b) -> - fprintf fmt "@[(%a@ *@ %a)@]" print_term a print_term b - | Div (a, b) -> - fprintf fmt "@[(%a@ /@ %a)@]" print_term a print_term b - | App (id, []) -> - fprintf fmt "@[%s@]" id - | App (id, tl) -> - fprintf fmt "@[%s(%a)@]" id print_terms tl - -and print_terms fmt tl = - print_list comma print_term fmt tl - -let rec print_predicate fmt p = - let pp = print_predicate in - match p with - | True -> - fprintf fmt "TRUE" - | False -> - fprintf fmt "FALSE" - | Fatom (Eq (a, b)) -> - fprintf fmt "@[(%a = %a)@]" print_term a print_term b - | Fatom (Le (a, b)) -> - fprintf fmt "@[(%a@ <= %a)@]" print_term a print_term b - | Fatom (Lt (a, b))-> - fprintf fmt "@[(%a@ < %a)@]" print_term a print_term b - | Fatom (Ge (a, b)) -> - fprintf fmt "@[(%a@ >= %a)@]" print_term a print_term b - | Fatom (Gt (a, b)) -> - fprintf fmt "@[(%a@ > %a)@]" print_term a print_term b - | Fatom (Pred (id, [])) -> - fprintf fmt "@[%s@]" id - | Fatom (Pred (id, tl)) -> - fprintf fmt "@[%s(%a)@]" id print_terms tl - | Imp (a, b) -> - fprintf fmt "@[(%a@ => %a)@]" pp a pp b - | And (a, b) -> - fprintf fmt "@[(%a@ AND@ %a)@]" pp a pp b - | Or (a, b) -> - fprintf fmt "@[(%a@ OR@ %a)@]" pp a pp b - | Not a -> - fprintf fmt "@[(NOT@ %a)@]" pp a - | Forall (id, t, p) -> - fprintf fmt "@[(FORALL (%s:%s): %a)@]" id t pp p - | Exists (id, t, p) -> - fprintf fmt "@[(EXISTS (%s:%s): %a)@]" id t pp p - -let rec string_of_type_list = function - | [] -> assert false - | [e] -> e - | e :: l' -> e ^ ", " ^ (string_of_type_list l') - -let print_query fmt (decls,concl) = - let print_decl = function - | DeclVar (id, [], t) -> - fprintf fmt "@[%s: %s;@]@\n" id t - | DeclVar (id, [e], t) -> - fprintf fmt "@[%s: [%s -> %s];@]@\n" - id e t - | DeclVar (id, l, t) -> - fprintf fmt "@[%s: [[%s] -> %s];@]@\n" - id (string_of_type_list l) t - | DeclPred (id, []) -> - fprintf fmt "@[%s: BOOLEAN;@]@\n" id - | DeclPred (id, [e]) -> - fprintf fmt "@[%s: [%s -> BOOLEAN];@]@\n" - id e - | DeclPred (id, l) -> - fprintf fmt "@[%s: [[%s] -> BOOLEAN];@]@\n" - id (string_of_type_list l) - | DeclType id -> - fprintf fmt "@[%s: TYPE;@]@\n" id - | Assert (id, f) -> - fprintf fmt "@[ASSERT %% %s@\n %a;@]@\n" id print_predicate f - in - List.iter print_decl decls; - fprintf fmt "QUERY %a;" print_predicate concl - -let call q = - let f = Filename.temp_file "coq_dp" ".cvc" in - let c = open_out f in - let fmt = formatter_of_out_channel c in - fprintf fmt "@[%a@]@." print_query q; - close_out c; - ignore (Sys.command (sprintf "cat %s" f)); - let cmd = - sprintf "timeout 10 cvcl < %s > out 2>&1 && grep -q -w Valid out" f - in - prerr_endline cmd; flush stderr; - let out = Sys.command cmd in - if out = 0 then Valid else if out = 1 then Invalid else Timeout - (* TODO: effacer le fichier f et le fichier out *) - - diff --git a/contrib/dp/dp_cvcl.mli b/contrib/dp/dp_cvcl.mli deleted file mode 100644 index 03b6d347..00000000 --- a/contrib/dp/dp_cvcl.mli +++ /dev/null @@ -1,4 +0,0 @@ - -open Fol - -val call : query -> prover_answer diff --git a/contrib/dp/dp_gappa.ml b/contrib/dp/dp_gappa.ml new file mode 100644 index 00000000..70439a97 --- /dev/null +++ b/contrib/dp/dp_gappa.ml @@ -0,0 +1,445 @@ + +open Format +open Util +open Pp +open Term +open Tacmach +open Tactics +open Tacticals +open Names +open Nameops +open Termops +open Coqlib +open Hipattern +open Libnames +open Declarations +open Evarutil + +let debug = ref false + +(* 1. gappa syntax trees and output *) + +module Constant = struct + + open Bigint + + type t = { mantissa : bigint; base : int; exp : bigint } + + let create (b, m, e) = + { mantissa = m; base = b; exp = e } + + let of_int x = + { mantissa = x; base = 1; exp = zero } + + let print fmt x = match x.base with + | 1 -> fprintf fmt "%s" (to_string x.mantissa) + | 2 -> fprintf fmt "%sb%s" (to_string x.mantissa) (to_string x.exp) + | 10 -> fprintf fmt "%se%s" (to_string x.mantissa) (to_string x.exp) + | _ -> assert false + +end + +type binop = Bminus | Bplus | Bmult | Bdiv + +type unop = Usqrt | Uabs | Uopp + +type rounding_mode = string + +type term = + | Tconst of Constant.t + | Tvar of string + | Tbinop of binop * term * term + | Tunop of unop * term + | Tround of rounding_mode * term + +type pred = + | Pin of term * Constant.t * Constant.t + +let rec print_term fmt = function + | Tconst c -> Constant.print fmt c + | Tvar s -> pp_print_string fmt s + | Tbinop (op, t1, t2) -> + let op = match op with + | Bplus -> "+" | Bminus -> "-" | Bmult -> "*" | Bdiv -> "/" + in + fprintf fmt "(%a %s %a)" print_term t1 op print_term t2 + | Tunop (Uabs, t) -> + fprintf fmt "|%a|" print_term t + | Tunop (Uopp | Usqrt as op, t) -> + let s = match op with + | Uopp -> "-" | Usqrt -> "sqrt" | _ -> assert false + in + fprintf fmt "(%s(%a))" s print_term t + | Tround (m, t) -> + fprintf fmt "(%s(%a))" m print_term t + +let print_pred fmt = function + | Pin (t, c1, c2) -> + fprintf fmt "%a in [%a, %a]" + print_term t Constant.print c1 Constant.print c2 + +let temp_file f = if !debug then f else Filename.temp_file f ".v" +let remove_file f = if not !debug then try Sys.remove f with _ -> () + +let read_gappa_proof f = + let buf = Buffer.create 1024 in + Buffer.add_char buf '('; + let cin = open_in f in + let rec skip_space () = + let c = input_char cin in if c = ' ' then skip_space () else c + in + while input_char cin <> '=' do () done; + try + while true do + let c = skip_space () in + if c = ':' then raise Exit; + Buffer.add_char buf c; + let s = input_line cin in + Buffer.add_string buf s; + Buffer.add_char buf '\n'; + done; + assert false + with Exit -> + close_in cin; + remove_file f; + Buffer.add_char buf ')'; + Buffer.contents buf + +exception GappaFailed +exception GappaProofFailed + +let patch_gappa_proof fin fout = + let cin = open_in fin in + let cout = open_out fout in + let fmt = formatter_of_out_channel cout in + let last = ref "" in + let defs = ref "" in + try + while true do + let s = input_line cin in + if s = "Qed." then + fprintf fmt "Defined.@\n" + else begin + begin + try Scanf.sscanf s "Lemma %s " + (fun n -> defs := n ^ " " ^ !defs; last := n) + with Scanf.Scan_failure _ -> + try Scanf.sscanf s "Definition %s " + (fun n -> defs := n ^ " " ^ !defs) + with Scanf.Scan_failure _ -> + () + end; + fprintf fmt "%s@\n" s + end + done + with End_of_file -> + close_in cin; + fprintf fmt "Definition proof := Eval cbv delta [%s] in %s.@." !defs !last; + close_out cout + +let call_gappa hl p = + let gappa_in = temp_file "gappa_input" in + let c = open_out gappa_in in + let fmt = formatter_of_out_channel c in + fprintf fmt "@[{ "; + List.iter (fun h -> fprintf fmt "%a ->@ " print_pred h) hl; + fprintf fmt "%a }@]@." print_pred p; + close_out c; + let gappa_out = temp_file "gappa_output" in + let cmd = sprintf "gappa -Bcoq < %s > %s 2> /dev/null" gappa_in gappa_out in + let out = Sys.command cmd in + if out <> 0 then raise GappaFailed; + remove_file gappa_in; + let gappa_out2 = temp_file "gappa2" in + patch_gappa_proof gappa_out gappa_out2; + remove_file gappa_out; + let cmd = sprintf "%s/coqc %s" Coq_config.bindir gappa_out2 in + let out = Sys.command cmd in + if out <> 0 then raise GappaProofFailed; + let gappa_out3 = temp_file "gappa3" in + let c = open_out gappa_out3 in + let gappa2 = Filename.chop_suffix (Filename.basename gappa_out2) ".v" in + Printf.fprintf c + "Require \"%s\". Set Printing Depth 9999999. Print %s.proof." + (Filename.chop_suffix gappa_out2 ".v") gappa2; + close_out c; + let lambda = temp_file "gappa_lambda" in + let cmd = sprintf "%s/coqc %s > %s" Coq_config.bindir gappa_out3 lambda in + let out = Sys.command cmd in + if out <> 0 then raise GappaProofFailed; + remove_file gappa_out2; remove_file gappa_out3; + remove_file (gappa_out2 ^ "o"); remove_file (gappa_out3 ^ "o"); + read_gappa_proof lambda + +(* 2. coq -> gappa translation *) + +exception NotGappa + +let logic_dir = ["Coq";"Logic";"Decidable"] +let coq_modules = + init_modules @ [logic_dir] @ arith_modules @ zarith_base_modules + @ [["Coq"; "ZArith"; "BinInt"]; + ["Coq"; "Reals"; "Rdefinitions"]; + ["Coq"; "Reals"; "Raxioms";]; + ["Coq"; "Reals"; "Rbasic_fun";]; + ["Coq"; "Reals"; "R_sqrt";]; + ["Coq"; "Reals"; "Rfunctions";]; + ["Gappa"; "Gappa_tactic";]; + ["Gappa"; "Gappa_fixed";]; + ["Gappa"; "Gappa_float";]; + ["Gappa"; "Gappa_round_def";]; + ["Gappa"; "Gappa_pred_bnd";]; + ["Gappa"; "Gappa_definitions";]; + ] + +let constant = gen_constant_in_modules "gappa" coq_modules + +let coq_refl_equal = lazy (constant "refl_equal") +let coq_Rle = lazy (constant "Rle") +let coq_R = lazy (constant "R") +(* +let coq_Rplus = lazy (constant "Rplus") +let coq_Rminus = lazy (constant "Rminus") +let coq_Rmult = lazy (constant "Rmult") +let coq_Rdiv = lazy (constant "Rdiv") +let coq_powerRZ = lazy (constant "powerRZ") +let coq_R1 = lazy (constant "R1") +let coq_Ropp = lazy (constant "Ropp") +let coq_Rabs = lazy (constant "Rabs") +let coq_sqrt = lazy (constant "sqrt") +*) + +let coq_convert = lazy (constant "convert") +let coq_reUnknown = lazy (constant "reUnknown") +let coq_reFloat2 = lazy (constant "reFloat2") +let coq_reFloat10 = lazy (constant "reFloat10") +let coq_reInteger = lazy (constant "reInteger") +let coq_reBinary = lazy (constant "reBinary") +let coq_reUnary = lazy (constant "reUnary") +let coq_reRound = lazy (constant "reRound") +let coq_roundDN = lazy (constant "roundDN") +let coq_roundUP = lazy (constant "roundUP") +let coq_roundNE = lazy (constant "roundNE") +let coq_roundZR = lazy (constant "roundZR") +let coq_rounding_fixed = lazy (constant "rounding_fixed") +let coq_rounding_float = lazy (constant "rounding_float") +let coq_boAdd = lazy (constant "boAdd") +let coq_boSub = lazy (constant "boSub") +let coq_boMul = lazy (constant "boMul") +let coq_boDiv = lazy (constant "boDiv") +let coq_uoAbs = lazy (constant "uoAbs") +let coq_uoNeg = lazy (constant "uoNeg") +let coq_uoSqrt = lazy (constant "uoSqrt") +let coq_subset = lazy (constant "subset") +let coq_makepairF = lazy (constant "makepairF") + +let coq_true = lazy (constant "true") +let coq_false = lazy (constant "false") + +let coq_Z0 = lazy (constant "Z0") +let coq_Zpos = lazy (constant "Zpos") +let coq_Zneg = lazy (constant "Zneg") +let coq_xH = lazy (constant "xH") +let coq_xI = lazy (constant "xI") +let coq_xO = lazy (constant "xO") +let coq_IZR = lazy (constant "IZR") + +(* translates a closed Coq term p:positive into a FOL term of type int *) +let rec tr_positive p = match kind_of_term p with + | Term.Construct _ when p = Lazy.force coq_xH -> + 1 + | Term.App (f, [|a|]) when f = Lazy.force coq_xI -> + 2 * (tr_positive a) + 1 + | Term.App (f, [|a|]) when f = Lazy.force coq_xO -> + 2 * (tr_positive a) + | Term.Cast (p, _, _) -> + tr_positive p + | _ -> + raise NotGappa + +(* translates a closed Coq term t:Z into a term of type int *) +let rec tr_arith_constant t = match kind_of_term t with + | Term.Construct _ when t = Lazy.force coq_Z0 -> 0 + | Term.App (f, [|a|]) when f = Lazy.force coq_Zpos -> tr_positive a + | Term.App (f, [|a|]) when f = Lazy.force coq_Zneg -> - (tr_positive a) + | Term.Cast (t, _, _) -> tr_arith_constant t + | _ -> raise NotGappa + +(* translates a closed Coq term p:positive into a FOL term of type bigint *) +let rec tr_bigpositive p = match kind_of_term p with + | Term.Construct _ when p = Lazy.force coq_xH -> + Bigint.one + | Term.App (f, [|a|]) when f = Lazy.force coq_xI -> + Bigint.add_1 (Bigint.mult_2 (tr_bigpositive a)) + | Term.App (f, [|a|]) when f = Lazy.force coq_xO -> + (Bigint.mult_2 (tr_bigpositive a)) + | Term.Cast (p, _, _) -> + tr_bigpositive p + | _ -> + raise NotGappa + +(* translates a closed Coq term t:Z into a term of type bigint *) +let rec tr_arith_bigconstant t = match kind_of_term t with + | Term.Construct _ when t = Lazy.force coq_Z0 -> Bigint.zero + | Term.App (f, [|a|]) when f = Lazy.force coq_Zpos -> tr_bigpositive a + | Term.App (f, [|a|]) when f = Lazy.force coq_Zneg -> + Bigint.neg (tr_bigpositive a) + | Term.Cast (t, _, _) -> tr_arith_bigconstant t + | _ -> raise NotGappa + +let decomp c = + let c, args = decompose_app c in + kind_of_term c, args + +let tr_bool c = match decompose_app c with + | c, [] when c = Lazy.force coq_true -> true + | c, [] when c = Lazy.force coq_false -> false + | _ -> raise NotGappa + +let tr_float b m e = + (b, tr_arith_bigconstant m, tr_arith_bigconstant e) + +let tr_binop c = match decompose_app c with + | c, [] when c = Lazy.force coq_boAdd -> Bplus + | c, [] when c = Lazy.force coq_boSub -> Bminus + | c, [] when c = Lazy.force coq_boMul -> Bmult + | c, [] when c = Lazy.force coq_boDiv -> Bdiv + | _ -> assert false + +let tr_unop c = match decompose_app c with + | c, [] when c = Lazy.force coq_uoNeg -> Uopp + | c, [] when c = Lazy.force coq_uoSqrt -> Usqrt + | c, [] when c = Lazy.force coq_uoAbs -> Uabs + | _ -> raise NotGappa + +let tr_var c = match decomp c with + | Var x, [] -> string_of_id x + | _ -> assert false + +let tr_mode c = match decompose_app c with + | c, [] when c = Lazy.force coq_roundDN -> "dn" + | c, [] when c = Lazy.force coq_roundNE -> "ne" + | c, [] when c = Lazy.force coq_roundUP -> "up" + | c, [] when c = Lazy.force coq_roundZR -> "zr" + | _ -> raise NotGappa + +let tr_rounding_mode c = match decompose_app c with + | c, [a;b] when c = Lazy.force coq_rounding_fixed -> + let a = tr_mode a in + let b = tr_arith_constant b in + sprintf "fixed<%d,%s>" b a + | c, [a;p;e] when c = Lazy.force coq_rounding_float -> + let a = tr_mode a in + let p = tr_positive p in + let e = tr_arith_constant e in + sprintf "float<%d,%d,%s>" p (-e) a + | _ -> + raise NotGappa + +(* REexpr -> term *) +let rec tr_term c0 = + let c, args = decompose_app c0 in + match kind_of_term c, args with + | _, [a] when c = Lazy.force coq_reUnknown -> + Tvar (tr_var a) + | _, [a; b] when c = Lazy.force coq_reFloat2 -> + Tconst (Constant.create (tr_float 2 a b)) + | _, [a; b] when c = Lazy.force coq_reFloat10 -> + Tconst (Constant.create (tr_float 10 a b)) + | _, [a] when c = Lazy.force coq_reInteger -> + Tconst (Constant.create (1, tr_arith_bigconstant a, Bigint.zero)) + | _, [op;a;b] when c = Lazy.force coq_reBinary -> + Tbinop (tr_binop op, tr_term a, tr_term b) + | _, [op;a] when c = Lazy.force coq_reUnary -> + Tunop (tr_unop op, tr_term a) + | _, [op;a] when c = Lazy.force coq_reRound -> + Tround (tr_rounding_mode op, tr_term a) + | _ -> + msgnl (str "tr_term: " ++ Printer.pr_constr c0); + assert false + +let tr_rle c = + let c, args = decompose_app c in + match kind_of_term c, args with + | _, [a;b] when c = Lazy.force coq_Rle -> + begin match decompose_app a, decompose_app b with + | (ac, [at]), (bc, [bt]) + when ac = Lazy.force coq_convert && bc = Lazy.force coq_convert -> + at, bt + | _ -> + raise NotGappa + end + | _ -> + raise NotGappa + +let tr_pred c = + let c, args = decompose_app c in + match kind_of_term c, args with + | _, [a;b] when c = build_coq_and () -> + begin match tr_rle a, tr_rle b with + | (c1, t1), (t2, c2) when t1 = t2 -> + begin match tr_term c1, tr_term c2 with + | Tconst c1, Tconst c2 -> + Pin (tr_term t1, c1, c2) + | _ -> + raise NotGappa + end + | _ -> + raise NotGappa + end + | _ -> + raise NotGappa + +let is_R c = match decompose_app c with + | c, [] when c = Lazy.force coq_R -> true + | _ -> false + +let tr_hyps = + List.fold_left + (fun acc (_,h) -> try tr_pred h :: acc with NotGappa -> acc) [] + +let constr_of_string gl s = + let parse_constr = Pcoq.parse_string Pcoq.Constr.constr in + Constrintern.interp_constr (project gl) (pf_env gl) (parse_constr s) + +let var_name = function + | Name id -> + let s = string_of_id id in + let s = String.sub s 1 (String.length s - 1) in + mkVar (id_of_string s) + | Anonymous -> + assert false + +let build_proof_term c0 = + let bl,c = decompose_lam c0 in + List.fold_right + (fun (x,t) pf -> + mkApp (pf, [| if is_R t then var_name x else mk_new_meta () |])) + bl c0 + +let gappa_internal gl = + try + let c = tr_pred (pf_concl gl) in + let s = call_gappa (tr_hyps (pf_hyps_types gl)) c in + let pf = constr_of_string gl s in + let pf = build_proof_term pf in + Tacticals.tclTHEN (Tacmach.refine_no_check pf) Tactics.assumption gl + with + | NotGappa -> error "not a gappa goal" + | GappaFailed -> error "gappa failed" + | GappaProofFailed -> error "incorrect gappa proof term" + +let gappa_prepare = + let id = Ident (dummy_loc, id_of_string "gappa_prepare") in + lazy (Tacinterp.interp (Tacexpr.TacArg (Tacexpr.Reference id))) + +let gappa gl = + Coqlib.check_required_library ["Gappa"; "Gappa_tactic"]; + Tacticals.tclTHEN (Lazy.force gappa_prepare) gappa_internal gl + +(* +Local Variables: +compile-command: "make -C ../.. bin/coqc.opt bin/coqide.opt" +End: +*) + diff --git a/contrib/dp/dp_simplify.ml b/contrib/dp/dp_simplify.ml deleted file mode 100644 index d5376b8d..00000000 --- a/contrib/dp/dp_simplify.ml +++ /dev/null @@ -1,117 +0,0 @@ - -open Format -open Fol - -let is_simplify_ident s = - let is_simplify_char = function - | 'a'..'z' | 'A'..'Z' | '0'..'9' -> true - | _ -> false - in - try - String.iter (fun c -> if not (is_simplify_char c) then raise Exit) s; true - with Exit -> - false - -let ident fmt s = - if is_simplify_ident s then fprintf fmt "%s" s else fprintf fmt "|%s|" s - -let rec print_list sep print fmt = function - | [] -> () - | [x] -> print fmt x - | x :: r -> print fmt x; sep fmt (); print_list sep print fmt r - -let space fmt () = fprintf fmt "@ " -let comma fmt () = fprintf fmt ",@ " - -let rec print_term fmt = function - | Cst n -> - fprintf fmt "%d" n - | Plus (a, b) -> - fprintf fmt "@[(+@ %a@ %a)@]" print_term a print_term b - | Moins (a, b) -> - fprintf fmt "@[(-@ %a@ %a)@]" print_term a print_term b - | Mult (a, b) -> - fprintf fmt "@[(*@ %a@ %a)@]" print_term a print_term b - | Div (a, b) -> - fprintf fmt "@[(/@ %a@ %a)@]" print_term a print_term b - | App (id, []) -> - fprintf fmt "%a" ident id - | App (id, tl) -> - fprintf fmt "@[(%a@ %a)@]" ident id print_terms tl - -and print_terms fmt tl = - print_list space print_term fmt tl - -let rec print_predicate fmt p = - let pp = print_predicate in - match p with - | True -> - fprintf fmt "TRUE" - | False -> - fprintf fmt "FALSE" - | Fatom (Eq (a, b)) -> - fprintf fmt "@[(EQ %a@ %a)@]" print_term a print_term b - | Fatom (Le (a, b)) -> - fprintf fmt "@[(<= %a@ %a)@]" print_term a print_term b - | Fatom (Lt (a, b))-> - fprintf fmt "@[(< %a@ %a)@]" print_term a print_term b - | Fatom (Ge (a, b)) -> - fprintf fmt "@[(>= %a@ %a)@]" print_term a print_term b - | Fatom (Gt (a, b)) -> - fprintf fmt "@[(> %a@ %a)@]" print_term a print_term b - | Fatom (Pred (id, tl)) -> - fprintf fmt "@[(EQ (%a@ %a) |@@true|)@]" ident id print_terms tl - | Imp (a, b) -> - fprintf fmt "@[(IMPLIES@ %a@ %a)@]" pp a pp b - | And (a, b) -> - fprintf fmt "@[(AND@ %a@ %a)@]" pp a pp b - | Or (a, b) -> - fprintf fmt "@[(OR@ %a@ %a)@]" pp a pp b - | Not a -> - fprintf fmt "@[(NOT@ %a)@]" pp a - | Forall (id, _, p) -> - fprintf fmt "@[(FORALL (%a)@ %a)@]" ident id pp p - | Exists (id, _, p) -> - fprintf fmt "@[(EXISTS (%a)@ %a)@]" ident id pp p - -(** -let rec string_list l = match l with - [] -> "" - | [e] -> e - | e::l' -> e ^ " " ^ (string_list l') -**) - -let print_query fmt (decls,concl) = - let print_decl = function - | DeclVar (id, [], t) -> - fprintf fmt "@[;; %s : %s@]@\n" id t - | DeclVar (id, l, t) -> - fprintf fmt "@[;; %s : %a -> %s@]@\n" - id (print_list comma pp_print_string) l t - | DeclPred (id, []) -> - fprintf fmt "@[;; %s : BOOLEAN @]@\n" id - | DeclPred (id, l) -> - fprintf fmt "@[;; %s : %a -> BOOLEAN@]@\n" - id (print_list comma pp_print_string) l - | DeclType id -> - fprintf fmt "@[;; %s : TYPE@]@\n" id - | Assert (id, f) -> - fprintf fmt "@[(BG_PUSH ;; %s@\n %a)@]@\n" id print_predicate f - in - List.iter print_decl decls; - fprintf fmt "%a@." print_predicate concl - -let call q = - let f = Filename.temp_file "coq_dp" ".sx" in - let c = open_out f in - let fmt = formatter_of_out_channel c in - fprintf fmt "@[%a@]@." print_query q; - close_out c; - ignore (Sys.command (sprintf "cat %s" f)); - let cmd = - sprintf "timeout 10 Simplify %s > out 2>&1 && grep -q -w Valid out" f - in - prerr_endline cmd; flush stderr; - let out = Sys.command cmd in - if out = 0 then Valid else if out = 1 then Invalid else Timeout - (* TODO: effacer le fichier f et le fichier out *) diff --git a/contrib/dp/dp_simplify.mli b/contrib/dp/dp_simplify.mli deleted file mode 100644 index 03b6d347..00000000 --- a/contrib/dp/dp_simplify.mli +++ /dev/null @@ -1,4 +0,0 @@ - -open Fol - -val call : query -> prover_answer diff --git a/contrib/dp/dp_sorts.ml b/contrib/dp/dp_sorts.ml deleted file mode 100644 index 7dbdfa56..00000000 --- a/contrib/dp/dp_sorts.ml +++ /dev/null @@ -1,51 +0,0 @@ - -open Fol - -let term_has_sort x s = Fatom (Pred ("%sort_" ^ s, [x])) - -let has_sort x s = term_has_sort (App (x, [])) s - -let rec form = function - | True | False | Fatom _ as f -> f - | Imp (f1, f2) -> Imp (form f1, form f2) - | And (f1, f2) -> And (form f1, form f2) - | Or (f1, f2) -> Or (form f1, form f2) - | Not f -> Not (form f) - | Forall (x, ("INT" as t), f) -> Forall (x, t, form f) - | Forall (x, t, f) -> Forall (x, t, Imp (has_sort x t, form f)) - | Exists (x, ("INT" as t), f) -> Exists (x, t, form f) - | Exists (x, t, f) -> Exists (x, t, Imp (has_sort x t, form f)) - -let sort_ax = let r = ref 0 in fun () -> incr r; "sort_ax_" ^ string_of_int !r - -let hyp acc = function - | Assert (id, f) -> - (Assert (id, form f)) :: acc - | DeclVar (id, _, "INT") as d -> - d :: acc - | DeclVar (id, [], t) as d -> - (Assert (sort_ax (), has_sort id t)) :: d :: acc - | DeclVar (id, l, t) as d -> - let n = ref 0 in - let xi = - List.fold_left - (fun l t -> incr n; ("x" ^ string_of_int !n, t) :: l) [] l - in - let f = - List.fold_left - (fun f (x,t) -> if t = "INT" then f else Imp (has_sort x t, f)) - (term_has_sort - (App (id, List.rev_map (fun (x,_) -> App (x,[])) xi)) t) - xi - in - let f = List.fold_left (fun f (x,t) -> Forall (x, t, f)) f xi in - (Assert (sort_ax (), f)) :: d :: acc - | DeclPred _ as d -> - d :: acc - | DeclType t as d -> - (DeclPred ("%sort_" ^ t, [t])) :: d :: acc - -let query (hyps, f) = - let hyps' = List.fold_left hyp [] hyps in - List.rev hyps', form f - diff --git a/contrib/dp/dp_sorts.mli b/contrib/dp/dp_sorts.mli deleted file mode 100644 index 9e74f997..00000000 --- a/contrib/dp/dp_sorts.mli +++ /dev/null @@ -1,4 +0,0 @@ - -open Fol - -val query : query -> query diff --git a/contrib/dp/dp_why.ml b/contrib/dp/dp_why.ml index e1ddb039..e24049ad 100644 --- a/contrib/dp/dp_why.ml +++ b/contrib/dp/dp_why.ml @@ -4,6 +4,18 @@ open Format open Fol +type proof = + | Immediate of Term.constr + | Fun_def of string * (string * typ) list * typ * term + +let proofs = Hashtbl.create 97 +let proof_name = + let r = ref 0 in fun () -> incr r; "dp_axiom__" ^ string_of_int !r + +let add_proof pr = let n = proof_name () in Hashtbl.add proofs n pr; n + +let find_proof = Hashtbl.find proofs + let rec print_list sep print fmt = function | [] -> () | [x] -> print fmt x diff --git a/contrib/dp/dp_why.mli b/contrib/dp/dp_why.mli new file mode 100644 index 00000000..b38a3d37 --- /dev/null +++ b/contrib/dp/dp_why.mli @@ -0,0 +1,17 @@ + +open Fol + +(* generation of the Why file *) + +val output_file : string -> query -> unit + +(* table to translate the proofs back to Coq (used in dp_zenon) *) + +type proof = + | Immediate of Term.constr + | Fun_def of string * (string * typ) list * typ * term + +val add_proof : proof -> string +val find_proof : string -> proof + + diff --git a/contrib/dp/dp_zenon.ml b/contrib/dp/dp_zenon.ml deleted file mode 100644 index 57b0a44f..00000000 --- a/contrib/dp/dp_zenon.ml +++ /dev/null @@ -1,103 +0,0 @@ - -open Format -open Fol - -let rec print_list sep print fmt = function - | [] -> () - | [x] -> print fmt x - | x :: r -> print fmt x; sep fmt (); print_list sep print fmt r - -let space fmt () = fprintf fmt "@ " - -let rec print_term fmt = function - | Cst n -> - fprintf fmt "%d" n - | Plus (a, b) -> - fprintf fmt "@[(+@ %a@ %a)@]" print_term a print_term b - | Moins (a, b) -> - fprintf fmt "@[(-@ %a@ %a)@]" print_term a print_term b - | Mult (a, b) -> - fprintf fmt "@[(*@ %a@ %a)@]" print_term a print_term b - | Div (a, b) -> - fprintf fmt "@[(/@ %a@ %a)@]" print_term a print_term b - | App (id, []) -> - fprintf fmt "%s" id - | App (id, tl) -> - fprintf fmt "@[(%s@ %a)@]" id print_terms tl - -and print_terms fmt tl = - print_list space print_term fmt tl - -let rec print_predicate fmt p = - let pp = print_predicate in - match p with - | True -> - fprintf fmt "True" - | False -> - fprintf fmt "False" - | Fatom (Eq (a, b)) -> - fprintf fmt "@[(= %a@ %a)@]" print_term a print_term b - | Fatom (Le (a, b)) -> - fprintf fmt "@[(<= %a@ %a)@]" print_term a print_term b - | Fatom (Lt (a, b))-> - fprintf fmt "@[(< %a@ %a)@]" print_term a print_term b - | Fatom (Ge (a, b)) -> - fprintf fmt "@[(>= %a@ %a)@]" print_term a print_term b - | Fatom (Gt (a, b)) -> - fprintf fmt "@[(> %a@ %a)@]" print_term a print_term b - | Fatom (Pred (id, tl)) -> - fprintf fmt "@[(%s@ %a)@]" id print_terms tl - | Imp (a, b) -> - fprintf fmt "@[(=>@ %a@ %a)@]" pp a pp b - | And (a, b) -> - fprintf fmt "@[(/\\@ %a@ %a)@]" pp a pp b - | Or (a, b) -> - fprintf fmt "@[(\\/@ %a@ %a)@]" pp a pp b - | Not a -> - fprintf fmt "@[(-.@ %a)@]" pp a - | Forall (id, t, p) -> - fprintf fmt "@[(A. ((%s \"%s\")@ %a))@]" id t pp p - | Exists (id, t, p) -> - fprintf fmt "@[(E. ((%s \"%s\")@ %a))@]" id t pp p - -let rec string_of_type_list = function - | [] -> "" - | e :: l' -> e ^ " -> " ^ (string_of_type_list l') - -let print_query fmt (decls,concl) = - let print_decl = function - | DeclVar (id, [], t) -> - fprintf fmt "@[;; %s: %s@]@\n" id t - | DeclVar (id, l, t) -> - fprintf fmt "@[;; %s: %s%s@]@\n" - id (string_of_type_list l) t - | DeclPred (id, l) -> - fprintf fmt "@[;; %s: %sBOOLEAN@]@\n" - id (string_of_type_list l) - | DeclType id -> - fprintf fmt "@[;; %s: TYPE@]@\n" id - | Assert (id, f) -> - fprintf fmt "@[\"%s\" %a@]@\n" id print_predicate f - in - List.iter print_decl decls; - fprintf fmt "$goal %a@." print_predicate concl - -let call q = - let f = Filename.temp_file "coq_dp" ".znn" in - let c = open_out f in - let fmt = formatter_of_out_channel c in - fprintf fmt "@[%a@]@." print_query q; - close_out c; - ignore (Sys.command (sprintf "cat %s" f)); - let cmd = - sprintf "timeout 10 zenon %s > out 2>&1 && grep -q PROOF-FOUND out" f - in - prerr_endline cmd; flush stderr; - let out = Sys.command cmd in - if out = 0 then Valid - else if out = 1 then Invalid - else if out = 137 then Timeout - else Util.anomaly "malformed Zenon input file" - (* TODO: effacer le fichier f et le fichier out *) - - diff --git a/contrib/dp/dp_zenon.mli b/contrib/dp/dp_zenon.mli index 03b6d347..0a727d1f 100644 --- a/contrib/dp/dp_zenon.mli +++ b/contrib/dp/dp_zenon.mli @@ -1,4 +1,7 @@ open Fol -val call : query -> prover_answer +val set_debug : bool -> unit + +val proof_from_file : string -> Proof_type.tactic + diff --git a/contrib/dp/dp_zenon.mll b/contrib/dp/dp_zenon.mll new file mode 100644 index 00000000..2fc2a5f4 --- /dev/null +++ b/contrib/dp/dp_zenon.mll @@ -0,0 +1,181 @@ + +{ + + open Lexing + open Pp + open Util + open Names + open Tacmach + open Dp_why + open Tactics + open Tacticals + + let debug = ref false + let set_debug b = debug := b + + let buf = Buffer.create 1024 + + let string_of_global env ref = + Libnames.string_of_qualid (Nametab.shortest_qualid_of_global env ref) + + let axioms = ref [] + + (* we cannot interpret the terms as we read them (since some lemmas + may need other lemmas to be already interpreted) *) + type lemma = { l_id : string; l_type : string; l_proof : string } + type zenon_proof = lemma list * string + +} + +let ident = ['a'-'z' 'A'-'Z' '_' '0'-'9' '\'']+ +let space = [' ' '\t' '\r'] + +rule start = parse +| "(* BEGIN-PROOF *)" "\n" { scan lexbuf } +| _ { start lexbuf } +| eof { anomaly "malformed Zenon proof term" } + +(* here we read the lemmas and the main proof term; + meanwhile we maintain the set of axioms that were used *) + +and scan = parse +| "Let" space (ident as id) space* ":" + { let t = read_coq_term lexbuf in + let p = read_lemma_proof lexbuf in + let l,pr = scan lexbuf in + { l_id = id; l_type = t; l_proof = p } :: l, pr } +| "Definition theorem:" + { let t = read_main_proof lexbuf in [], t } +| _ | eof + { anomaly "malformed Zenon proof term" } + +and read_coq_term = parse +| "." "\n" + { let s = Buffer.contents buf in Buffer.clear buf; s } +| "coq__" (ident as id) (* a Why keyword renamed *) + { Buffer.add_string buf id; read_coq_term lexbuf } +| ("dp_axiom__" ['0'-'9']+) as id + { axioms := id :: !axioms; Buffer.add_string buf id; read_coq_term lexbuf } +| _ as c + { Buffer.add_char buf c; read_coq_term lexbuf } +| eof + { anomaly "malformed Zenon proof term" } + +and read_lemma_proof = parse +| "Proof" space + { read_coq_term lexbuf } +| _ | eof + { anomaly "malformed Zenon proof term" } + +(* skip the main proof statement and then read its term *) +and read_main_proof = parse +| ":=" "\n" + { read_coq_term lexbuf } +| _ + { read_main_proof lexbuf } +| eof + { anomaly "malformed Zenon proof term" } + + +{ + + let read_zenon_proof f = + Buffer.clear buf; + let c = open_in f in + let lb = from_channel c in + let p = start lb in + close_in c; + if not !debug then begin try Sys.remove f with _ -> () end; + p + + let constr_of_string gl s = + let parse_constr = Pcoq.parse_string Pcoq.Constr.constr in + Constrintern.interp_constr (project gl) (pf_env gl) (parse_constr s) + + (* we are lazy here: we build strings containing Coq terms using a *) + (* pretty-printer Fol -> Coq *) + module Coq = struct + open Format + open Fol + + let rec print_list sep print fmt = function + | [] -> () + | [x] -> print fmt x + | x :: r -> print fmt x; sep fmt (); print_list sep print fmt r + + let space fmt () = fprintf fmt "@ " + let comma fmt () = fprintf fmt ",@ " + + let rec print_typ fmt = function + | Tvar x -> fprintf fmt "%s" x + | Tid ("int", []) -> fprintf fmt "Z" + | Tid (x, []) -> fprintf fmt "%s" x + | Tid (x, [t]) -> fprintf fmt "(%s %a)" x print_typ t + | Tid (x,tl) -> + fprintf fmt "(%s %a)" x (print_list comma print_typ) tl + + let rec print_term fmt = function + | Cst n -> + fprintf fmt "%d" n + | Plus (a, b) -> + fprintf fmt "@[(Zplus %a %a)@]" print_term a print_term b + | Moins (a, b) -> + fprintf fmt "@[(Zminus %a %a)@]" print_term a print_term b + | Mult (a, b) -> + fprintf fmt "@[(Zmult %a %a)@]" print_term a print_term b + | Div (a, b) -> + fprintf fmt "@[(Zdiv %a %a)@]" print_term a print_term b + | App (id, []) -> + fprintf fmt "%s" id + | App (id, tl) -> + fprintf fmt "@[(%s %a)@]" id print_terms tl + + and print_terms fmt tl = + print_list space print_term fmt tl + + (* builds the text for "forall vars, f vars = t" *) + let fun_def_axiom f vars t = + let binder fmt (x,t) = fprintf fmt "(%s: %a)" x print_typ t in + fprintf str_formatter + "@[(forall %a, %s %a = %a)@]@." + (print_list space binder) vars f + (print_list space (fun fmt (x,_) -> pp_print_string fmt x)) vars + print_term t; + flush_str_formatter () + + end + + let prove_axiom id = match Dp_why.find_proof id with + | Immediate t -> + exact_check t + | Fun_def (f, vars, ty, t) -> + tclTHENS + (fun gl -> + let s = Coq.fun_def_axiom f vars t in + if !debug then Format.eprintf "axiom fun def = %s@." s; + let c = constr_of_string gl s in + assert_tac true (Name (id_of_string id)) c gl) + [tclTHEN intros reflexivity; tclIDTAC] + + let exact_string s gl = + let c = constr_of_string gl s in + exact_check c gl + + let interp_zenon_proof (ll,p) = + let interp_lemma l gl = + let ty = constr_of_string gl l.l_type in + tclTHENS + (assert_tac true (Name (id_of_string l.l_id)) ty) + [exact_string l.l_proof; tclIDTAC] + gl + in + tclTHEN (tclMAP interp_lemma ll) (exact_string p) + + let proof_from_file f = + axioms := []; + msgnl (str "proof_from_file " ++ str f); + let zp = read_zenon_proof f in + msgnl (str "proof term is " ++ str (snd zp)); + tclTHEN (tclMAP prove_axiom !axioms) (interp_zenon_proof zp) + +} diff --git a/contrib/dp/fol.mli b/contrib/dp/fol.mli index a85469cc..b94bd3e3 100644 --- a/contrib/dp/fol.mli +++ b/contrib/dp/fol.mli @@ -45,4 +45,11 @@ type query = decl list * form (* prover result *) -type prover_answer = Valid | Invalid | DontKnow | Timeout +type prover_answer = + | Valid of string option + | Invalid + | DontKnow + | Timeout + | NoAnswer + | Failure of string + diff --git a/contrib/dp/g_dp.ml4 b/contrib/dp/g_dp.ml4 index eb7fb73b..99bcf477 100644 --- a/contrib/dp/g_dp.ml4 +++ b/contrib/dp/g_dp.ml4 @@ -8,7 +8,7 @@ (*i camlp4deps: "parsing/grammar.cma" i*) -(* $Id: g_dp.ml4 7165 2005-06-24 12:56:46Z coq $ *) +(* $Id: g_dp.ml4 10924 2008-05-13 14:01:11Z filliatr $ *) open Dp @@ -16,6 +16,14 @@ TACTIC EXTEND Simplify [ "simplify" ] -> [ simplify ] END +TACTIC EXTEND Ergo + [ "ergo" ] -> [ ergo ] +END + +TACTIC EXTEND Yices + [ "yices" ] -> [ yices ] +END + TACTIC EXTEND CVCLite [ "cvcl" ] -> [ cvc_lite ] END @@ -28,6 +36,18 @@ TACTIC EXTEND Zenon [ "zenon" ] -> [ zenon ] END +TACTIC EXTEND Gwhy + [ "gwhy" ] -> [ gwhy ] +END + +TACTIC EXTEND Gappa_internal + [ "gappa_internal" ] -> [ Dp_gappa.gappa_internal ] +END + +TACTIC EXTEND Gappa + [ "gappa" ] -> [ Dp_gappa.gappa ] +END + (* should be part of basic tactics syntax *) TACTIC EXTEND admit [ "admit" ] -> [ Tactics.admit_as_an_axiom ] @@ -36,3 +56,24 @@ END VERNAC COMMAND EXTEND Dp_hint [ "Dp_hint" ne_global_list(l) ] -> [ dp_hint l ] END + +VERNAC COMMAND EXTEND Dp_timeout +| [ "Dp_timeout" natural(n) ] -> [ dp_timeout n ] +END + +VERNAC COMMAND EXTEND Dp_prelude +| [ "Dp_prelude" string_list(l) ] -> [ dp_prelude l ] +END + +VERNAC COMMAND EXTEND Dp_predefined +| [ "Dp_predefined" global(g) "=>" string(s) ] -> [ dp_predefined g s ] +END + +VERNAC COMMAND EXTEND Dp_debug +| [ "Dp_debug" ] -> [ dp_debug true; Dp_zenon.set_debug true ] +END + +VERNAC COMMAND EXTEND Dp_trace +| [ "Dp_trace" ] -> [ dp_trace true ] +END + diff --git a/contrib/dp/test2.v b/contrib/dp/test2.v index 4e933a3c..3e4c0f6d 100644 --- a/contrib/dp/test2.v +++ b/contrib/dp/test2.v @@ -5,6 +5,10 @@ Require Import List. Open Scope list_scope. Open Scope Z_scope. +Dp_debug. +Dp_timeout 3. +Require Export zenon. + Definition neg (z:Z) : Z := match z with | Z0 => Z0 | Zpos p => Zneg p @@ -18,9 +22,7 @@ Open Scope nat_scope. Print plus. Goal forall x, x+0=x. - induction x. - zenon. - zenon. + induction x; ergo. (* simplify resoud le premier, pas le second *) Admitted. diff --git a/contrib/dp/test_gappa.v b/contrib/dp/test_gappa.v new file mode 100644 index 00000000..eb65a59d --- /dev/null +++ b/contrib/dp/test_gappa.v @@ -0,0 +1,91 @@ +Require Export Gappa_tactic. +Require Export Reals. + +Open Scope Z_scope. +Open Scope R_scope. + +Lemma test_base10 : + forall x y:R, + 0 <= x <= 4 -> + 0 <= x * (24 * powerRZ 10 (-1)) <= 10. +Proof. + gappa. +Qed. + +(* +@rnd = float< ieee_32, zr >; +a = rnd(a_); b = rnd(b_); +{ a in [3.2,3.3] /\ b in [1.4,1.9] -> + rnd(a - b) - (a - b) in [0,0] } +*) + +Definition rnd := gappa_rounding (rounding_float roundZR 43 (120)). + +Lemma test_float3 : + forall a_ b_ a b : R, + a = rnd a_ -> + b = rnd b_ -> + 52 / 16 <= a <= 53 / 16 -> + 22 / 16 <= b <= 30 / 16 -> + 0 <= rnd (a - b) - (a - b) <= 0. +Proof. + unfold rnd. + gappa. +Qed. + +Lemma test_float2 : + forall x y:R, + 0 <= x <= 1 -> + 0 <= y <= 1 -> + 0 <= gappa_rounding (rounding_float roundNE 53 (1074)) (x+y) <= 2. +Proof. + gappa. +Qed. + +Lemma test_float1 : + forall x y:R, + 0 <= gappa_rounding (rounding_fixed roundDN (0)) x - + gappa_rounding (rounding_fixed roundDN (0)) y <= 0 -> + Rabs (x - y) <= 1. +Proof. + gappa. +Qed. + +Lemma test1 : + forall x y:R, + 0 <= x <= 1 -> + 0 <= -y <= 1 -> + 0 <= x * (-y) <= 1. +Proof. + gappa. +Qed. + +Lemma test2 : + forall x y:R, + 3/4 <= x <= 3 -> + 0 <= sqrt x <= 1775 * (powerRZ 2 (-10)). +Proof. + gappa. +Qed. + +Lemma test3 : + forall x y z:R, + 0 <= x - y <= 3 -> + -2 <= y - z <= 4 -> + -2 <= x - z <= 7. +Proof. + gappa. +Qed. + +Lemma test4 : + forall x1 x2 y1 y2 : R, + 1 <= Rabs y1 <= 1000 -> + 1 <= Rabs y2 <= 1000 -> + - powerRZ 2 (-53) <= (x1 - y1) / y1 <= powerRZ 2 (-53) -> + - powerRZ 2 (-53) <= (x2 - y2) / y2 <= powerRZ 2 (-53) -> + - powerRZ 2 (-51) <= (x1 * x2 - y1 * y2) / (y1 * y2) <= powerRZ 2 (-51). +Proof. + gappa. +Qed. + + diff --git a/contrib/dp/tests.v b/contrib/dp/tests.v index 52a57a0c..a6d4f2e1 100644 --- a/contrib/dp/tests.v +++ b/contrib/dp/tests.v @@ -2,48 +2,115 @@ Require Import ZArith. Require Import Classical. +Dp_debug. +Dp_timeout 3. + +(* module renamings *) + +Module M. + Parameter t : Set. +End M. + +Lemma test_module_0 : forall x:M.t, x=x. +ergo. +Qed. + +Module N := M. + +Lemma test_module_renaming_0 : forall x:N.t, x=x. +ergo. +Qed. + +Dp_predefined M.t => "int". + +Lemma test_module_renaming_1 : forall x:N.t, x=x. +ergo. +Qed. + +(* Coq lists *) + +Require Export List. + +Lemma test_pol_0 : forall l:list nat, l=l. +ergo. +Qed. + +Parameter nlist: list nat -> Prop. + +Lemma poly_1 : forall l, nlist l -> True. +intros. +simplify. +Qed. + +(* user lists *) + +Inductive list (A:Set) : Set := +| nil : list A +| cons: forall a:A, list A -> list A. + +Fixpoint app (A:Set) (l m:list A) {struct l} : list A := +match l with +| nil => m +| cons a l1 => cons A a (app A l1 m) +end. + +Lemma entail: (nil Z) = app Z (nil Z) (nil Z) -> True. +intros; ergo. +Qed. + +(* polymorphism *) +Require Import List. + +Inductive mylist (A:Set) : Set := + mynil : mylist A +| mycons : forall a:A, mylist A -> mylist A. + +Parameter my_nlist: mylist nat -> Prop. + + Goal forall l, my_nlist l -> True. + intros. + simplify. +Qed. + (* First example with the 0 and the equality translated *) Goal 0 = 0. -zenon. +simplify. Qed. - (* Examples in the Propositional Calculus and theory of equality *) Parameter A C : Prop. Goal A -> A. -zenon. +simplify. Qed. Goal A -> (A \/ C). -zenon. +simplify. Qed. Parameter x y z : Z. Goal x = y -> y = z -> x = z. - -zenon. +ergo. Qed. Goal ((((A -> C) -> A) -> A) -> C) -> C. -zenon. +ergo. Qed. - (* Arithmetic *) Open Scope Z_scope. Goal 1 + 1 = 2. -simplify. +yices. Qed. @@ -57,14 +124,12 @@ Qed. Goal (forall (x y : Z), x = y) -> 0=1. try zenon. -simplify. +ergo. Qed. Goal forall (x: nat), (x + 0 = x)%nat. -induction x0. -zenon. -zenon. +induction x0; ergo. Qed. @@ -106,7 +171,7 @@ Inductive even : Z -> Prop := unlike CVC Lite *) Goal even 4. -cvcl. +ergo. Qed. @@ -115,8 +180,7 @@ Definition skip_z (z : Z) (n : nat) := n. Definition skip_z1 := skip_z. Goal forall (z : Z) (n : nat), skip_z z n = skip_z1 z n. - -zenon. +yices. Qed. @@ -133,8 +197,7 @@ Dp_hint add_S. unlike zenon *) Goal forall n : nat, add n 0 = n. - -induction n ; zenon. +induction n ; yices. Qed. @@ -144,8 +207,8 @@ Definition pred (n : nat) : nat := match n with end. Goal forall n : nat, n <> 0%nat -> pred (S n) <> 0%nat. - -zenon. +yices. +(*zenon.*) Qed. @@ -157,7 +220,7 @@ end. Goal forall n : nat, plus n 0%nat = n. -induction n; zenon. +induction n; ergo. Qed. @@ -173,8 +236,11 @@ with odd_b (n : nat) : bool := match n with end. Goal even_b (S (S O)) = true. - +ergo. +(* +simplify. zenon. +*) Qed. @@ -184,7 +250,8 @@ Parameter foo : Set. Parameter ff : nat -> foo -> foo -> nat. Parameter g : foo -> foo. Goal (forall x:foo, ff 0 x x = O) -> forall y, ff 0 (g y) (g y) = O. -zenon. +yices. +(*zenon.*) Qed. @@ -194,7 +261,8 @@ Qed. Parameter poly_f : forall A:Set, A->A. Goal forall x:nat, poly_f nat x = poly_f nat x. -zenon. +ergo. +(*zenon.*) Qed. diff --git a/contrib/dp/zenon.v b/contrib/dp/zenon.v new file mode 100644 index 00000000..4ad00a11 --- /dev/null +++ b/contrib/dp/zenon.v @@ -0,0 +1,94 @@ +(* Copyright 2004 INRIA *) +(* $Id: zenon.v 10739 2008-04-01 14:45:20Z herbelin $ *) + +Require Export Classical. + +Lemma zenon_nottrue : + (~True -> False). +Proof. tauto. Qed. + +Lemma zenon_noteq : forall (T : Type) (t : T), + ((t <> t) -> False). +Proof. tauto. Qed. + +Lemma zenon_and : forall P Q : Prop, + (P -> Q -> False) -> (P /\ Q -> False). +Proof. tauto. Qed. + +Lemma zenon_or : forall P Q : Prop, + (P -> False) -> (Q -> False) -> (P \/ Q -> False). +Proof. tauto. Qed. + +Lemma zenon_imply : forall P Q : Prop, + (~P -> False) -> (Q -> False) -> ((P -> Q) -> False). +Proof. tauto. Qed. + +Lemma zenon_equiv : forall P Q : Prop, + (~P -> ~Q -> False) -> (P -> Q -> False) -> ((P <-> Q) -> False). +Proof. tauto. Qed. + +Lemma zenon_notand : forall P Q : Prop, + (~P -> False) -> (~Q -> False) -> (~(P /\ Q) -> False). +Proof. tauto. Qed. + +Lemma zenon_notor : forall P Q : Prop, + (~P -> ~Q -> False) -> (~(P \/ Q) -> False). +Proof. tauto. Qed. + +Lemma zenon_notimply : forall P Q : Prop, + (P -> ~Q -> False) -> (~(P -> Q) -> False). +Proof. tauto. Qed. + +Lemma zenon_notequiv : forall P Q : Prop, + (~P -> Q -> False) -> (P -> ~Q -> False) -> (~(P <-> Q) -> False). +Proof. tauto. Qed. + +Lemma zenon_ex : forall (T : Type) (P : T -> Prop), + (forall z : T, ((P z) -> False)) -> ((exists x : T, (P x)) -> False). +Proof. firstorder. Qed. + +Lemma zenon_all : forall (T : Type) (P : T -> Prop) (t : T), + ((P t) -> False) -> ((forall x : T, (P x)) -> False). +Proof. firstorder. Qed. + +Lemma zenon_notex : forall (T : Type) (P : T -> Prop) (t : T), + (~(P t) -> False) -> (~(exists x : T, (P x)) -> False). +Proof. firstorder. Qed. + +Lemma zenon_notall : forall (T : Type) (P : T -> Prop), + (forall z : T, (~(P z) -> False)) -> (~(forall x : T, (P x)) -> False). +Proof. intros T P Ha Hb. apply Hb. intro. apply NNPP. exact (Ha x). Qed. + +Lemma zenon_equal_base : forall (T : Type) (f : T), f = f. +Proof. auto. Qed. + +Lemma zenon_equal_step : + forall (S T : Type) (fa fb : S -> T) (a b : S), + (fa = fb) -> (a <> b -> False) -> ((fa a) = (fb b)). +Proof. intros. rewrite (NNPP (a = b)). congruence. auto. Qed. + +Lemma zenon_pnotp : forall P Q : Prop, + (P = Q) -> (P -> ~Q -> False). +Proof. intros P Q Ha. rewrite Ha. auto. Qed. + +Lemma zenon_notequal : forall (T : Type) (a b : T), + (a = b) -> (a <> b -> False). +Proof. auto. Qed. + +Ltac zenon_intro id := + intro id || let nid := fresh in (intro nid; clear nid) +. + +Definition zenon_and_s := fun P Q a b => zenon_and P Q b a. +Definition zenon_or_s := fun P Q a b c => zenon_or P Q b c a. +Definition zenon_imply_s := fun P Q a b c => zenon_imply P Q b c a. +Definition zenon_equiv_s := fun P Q a b c => zenon_equiv P Q b c a. +Definition zenon_notand_s := fun P Q a b c => zenon_notand P Q b c a. +Definition zenon_notor_s := fun P Q a b => zenon_notor P Q b a. +Definition zenon_notimply_s := fun P Q a b => zenon_notimply P Q b a. +Definition zenon_notequiv_s := fun P Q a b c => zenon_notequiv P Q b c a. +Definition zenon_ex_s := fun T P a b => zenon_ex T P b a. +Definition zenon_notall_s := fun T P a b => zenon_notall T P b a. + +Definition zenon_pnotp_s := fun P Q a b c => zenon_pnotp P Q c a b. +Definition zenon_notequal_s := fun T a b x y => zenon_notequal T a b y x. diff --git a/contrib/extraction/CHANGES b/contrib/extraction/CHANGES index 83ea4910..acd1dbda 100644 --- a/contrib/extraction/CHANGES +++ b/contrib/extraction/CHANGES @@ -346,8 +346,8 @@ Dyade/BDDS boolean tautology checker. Lyon/CIRCUITS multiplication via a modelization of a circuit. Lyon/FIRING-SQUAD print the states of the firing squad. Marseille/CIRCUITS compares integers via a modelization of a circuit. -Nancy/FOUnify unification of two first-orderde deux termes. -Rocq/ARITH/Chinese computation of the chinese remaindering. +Nancy/FOUnify unification of two first-order terms. +Rocq/ARITH/Chinese computation of the chinese remainder. Rocq/COC small coc typechecker. (test by B. Barras, not by me) Rocq/HIGMAN run the proof on one example. Rocq/GRAPHS linear constraints checker in Z. diff --git a/contrib/extraction/common.ml b/contrib/extraction/common.ml index 346201ec..5ad4a288 100644 --- a/contrib/extraction/common.ml +++ b/contrib/extraction/common.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: common.ml 8930 2006-06-09 02:14:34Z letouzey $ i*) +(*i $Id: common.ml 10596 2008-02-27 15:30:11Z letouzey $ i*) open Pp open Util @@ -17,42 +17,218 @@ open Nameops open Libnames open Table open Miniml +open Mlutil open Modutil -open Ocaml +open Mod_subst -(*S Renamings. *) +(*s Some pretty-print utility functions. *) + +let pp_par par st = if par then str "(" ++ st ++ str ")" else st + +let pp_apply st par args = match args with + | [] -> st + | _ -> hov 2 (pp_par par (st ++ spc () ++ prlist_with_sep spc identity args)) + +let pr_binding = function + | [] -> mt () + | l -> str " " ++ prlist_with_sep (fun () -> str " ") pr_id l + +let fnl2 () = fnl () ++ fnl () + +let space_if = function true -> str " " | false -> mt () + +let sec_space_if = function true -> spc () | false -> mt () + +let is_digit = function + | '0'..'9' -> true + | _ -> false + +let begins_with_CoqXX s = + let n = String.length s in + n >= 4 && s.[0] = 'C' && s.[1] = 'o' && s.[2] = 'q' && + let i = ref 3 in + try while !i < n do + if s.[!i] = '_' then i:=n (*Stop*) + else if is_digit s.[!i] then incr i + else raise Not_found + done; true + with Not_found -> false + +let unquote s = + if lang () <> Scheme then s + else + let s = String.copy s in + for i=0 to String.length s - 1 do if s.[i] = '\'' then s.[i] <- '~' done; + s + +let rec dottify = function + | [] -> assert false + | [s] -> unquote s + | s::[""] -> unquote s + | s::l -> (dottify l)^"."^(unquote s) + +(*s Uppercase/lowercase renamings. *) + +let is_upper s = match s.[0] with 'A' .. 'Z' -> true | _ -> false +let is_lower s = match s.[0] with 'a' .. 'z' | '_' -> true | _ -> false + +let lowercase_id id = id_of_string (String.uncapitalize (string_of_id id)) +let uppercase_id id = id_of_string (String.capitalize (string_of_id id)) + +(* [pr_upper_id id] makes 2 String.copy lesser than [pr_id (uppercase_id id)] *) +let pr_upper_id id = str (String.capitalize (string_of_id id)) + + +(*s de Bruijn environments for programs *) + +type env = identifier list * Idset.t + +(*s Generic renaming issues for local variable names. *) + +let rec rename_id id avoid = + if Idset.mem id avoid then rename_id (lift_ident id) avoid else id + +let rec rename_vars avoid = function + | [] -> + [], avoid + | id :: idl when id == dummy_name -> + (* we don't rename dummy binders *) + let (idl', avoid') = rename_vars avoid idl in + (id :: idl', avoid') + | id :: idl -> + let (idl, avoid) = rename_vars avoid idl in + let id = rename_id (lowercase_id id) avoid in + (id :: idl, Idset.add id avoid) + +let rename_tvars avoid l = + let rec rename avoid = function + | [] -> [],avoid + | id :: idl -> + let id = rename_id (lowercase_id id) avoid in + let idl, avoid = rename (Idset.add id avoid) idl in + (id :: idl, avoid) in + fst (rename avoid l) + +let push_vars ids (db,avoid) = + let ids',avoid' = rename_vars avoid ids in + ids', (ids' @ db, avoid') + +let get_db_name n (db,_) = + let id = List.nth db (pred n) in + if id = dummy_name then id_of_string "__" else id + + +(*S Renamings of global objects. *) (*s Tables of global renamings *) let keywords = ref Idset.empty +let set_keywords kws = keywords := kws + let global_ids = ref Idset.empty -let modular = ref false +let add_global_ids s = global_ids := Idset.add s !global_ids +let global_ids_list () = Idset.elements !global_ids + +let empty_env () = [], !global_ids + +let mktable () = + let h = Hashtbl.create 97 in + (Hashtbl.add h, Hashtbl.find h, fun () -> Hashtbl.clear h) + +let mkset () = + let h = Hashtbl.create 97 in + (fun x -> Hashtbl.add h x ()), (Hashtbl.mem h), (fun () -> Hashtbl.clear h) + +let mktriset () = + let h = Hashtbl.create 97 in + (fun x y z -> Hashtbl.add h (x,y,z) ()), + (fun x y z -> Hashtbl.mem h (x,y,z)), + (fun () -> Hashtbl.clear h) (* For each [global_reference], this table will contain the different parts - of its renamings, in [string list] form. *) -let renamings = Hashtbl.create 97 -let rename r l = Hashtbl.add renamings r l -let get_renamings r = Hashtbl.find renamings r + of its renaming, in [string list] form. *) +let add_renaming, get_renaming, clear_renaming = mktable () (* Idem for [module_path]. *) -let mp_renamings = Hashtbl.create 97 -let mp_rename mp l = Hashtbl.add mp_renamings mp l -let mp_get_renamings mp = Hashtbl.find mp_renamings mp +let add_mp_renaming, get_mp_renaming, clear_mp_renaming = mktable () -let modvisited = ref MPset.empty -let modcontents = ref Gset.empty -let add_module_contents mp s = modcontents := Gset.add (mp,s) !modcontents -let module_contents mp s = Gset.mem (mp,s) !modcontents +(* A table for function modfstlev_rename *) +let add_modfstlev, get_modfstlev, clear_modfstlev = mktable () -let to_qualify = ref Refset.empty +(* A set of all external objects that will have to be fully qualified *) +let add_static_clash, static_clash, clear_static_clash = mkset () -let mod_1st_level = ref Idmap.empty +(* Two tables of triplets [kind * module_path * string]. The first one + will record the first level of all MPfile, not only the current one. + The second table will contains local renamings. *) -(*s Uppercase/lowercase renamings. *) +type kind = Term | Type | Cons | Mod -let is_upper s = match s.[0] with 'A' .. 'Z' -> true | _ -> false +let add_ext_mpmem, ext_mpmem, clear_ext_mpmem = mktriset () +let add_loc_mpmem, loc_mpmem, clear_loc_mpmem = mktriset () + +(* The list of external modules that will be opened initially *) +let add_mpfiles, mem_mpfiles, list_mpfiles, clear_mpfiles = + let m = ref MPset.empty in + (fun mp -> m:= MPset.add mp !m), + (fun mp -> MPset.mem mp !m), + (fun () -> MPset.elements !m), + (fun () -> m:= MPset.empty) + +(*s table containing the visible horizon at a precise moment *) + +let visible = ref ([] : module_path list) +let pop_visible () = visible := List.tl !visible +let push_visible mp = visible := mp :: !visible +let top_visible_mp () = List.hd !visible + +(*s substitutions for printing signatures *) + +let substs = ref empty_subst +let add_subst msid mp = substs := add_msid msid mp !substs +let subst_mp mp = subst_mp !substs mp +let subst_kn kn = subst_kn !substs kn +let subst_con c = fst (subst_con !substs c) +let subst_ref = function + | ConstRef con -> ConstRef (subst_con con) + | IndRef (kn,i) -> IndRef (subst_kn kn,i) + | ConstructRef ((kn,i),j) -> ConstructRef ((subst_kn kn,i),j) + | _ -> assert false -let is_lower s = match s.[0] with 'a' .. 'z' | '_' -> true | _ -> false + +let duplicate_index = ref 0 +let to_duplicate = ref Gmap.empty +let add_duplicate mp l = + incr duplicate_index; + let ren = "Coq__" ^ string_of_int (!duplicate_index) in + to_duplicate := Gmap.add (mp,l) ren !to_duplicate +let check_duplicate mp l = + let mp' = subst_mp mp in + Gmap.find (mp',l) !to_duplicate + +type reset_kind = OnlyLocal | AllButExternal | Everything + +let reset_allbutext () = + clear_loc_mpmem (); + global_ids := !keywords; + clear_renaming (); + clear_mp_renaming (); + clear_modfstlev (); + clear_static_clash (); + clear_mpfiles (); + duplicate_index := 0; + to_duplicate := Gmap.empty; + visible := []; + substs := empty_subst + +let reset_everything () = reset_allbutext (); clear_ext_mpmem () + +let reset_renaming_tables = function + | OnlyLocal -> clear_loc_mpmem () + | AllButExternal -> reset_allbutext () + | Everything -> reset_everything () + +(*S Renaming functions *) (* This function creates from [id] a correct uppercase/lowercase identifier. This is done by adding a [Coq_] or [coq_] prefix. To avoid potential clashes @@ -69,389 +245,238 @@ let modular_rename up id = then prefix ^ s else s -let rename_module = modular_rename true - -(* [clash mp0 l s mpl] checks if [mp0-l-s] can be printed as [l-s] when - [mpl] is the context of visible modules. More precisely, we check if - there exists a mp1, module (sub-)path of an element of [mpl], such as - module [mp1-l] contains [s]. - The verification stops if we encounter [mp1=mp0]. *) - -exception Stop - -let clash mp0 l s mpl = - let rec clash_one mp = match mp with - | _ when mp = mp0 -> raise Stop - | MPdot (mp',_) -> - (module_contents (add_labels_mp mp l) s) || (clash_one mp') - | mp when is_toplevel mp -> false - | _ -> module_contents (add_labels_mp mp l) s +(*s [record_contents_fstlev] finds the names of the first-level objects + exported by the ground-level modules in [struc]. *) + +let rec record_contents_fstlev struc = + let upper_type = (lang () = Haskell) in + let addtyp mp id = add_ext_mpmem Type mp (modular_rename upper_type id) in + let addcons mp id = add_ext_mpmem Cons mp (modular_rename true id) in + let addterm mp id = add_ext_mpmem Term mp (modular_rename false id) in + let addmod mp id = add_ext_mpmem Mod mp (modular_rename true id) in + let addfix mp r = + add_ext_mpmem Term mp (modular_rename false (id_of_global r)) + in + let f mp = function + | (l,SEdecl (Dind (_,ind))) -> + Array.iter + (fun ip -> + addtyp mp ip.ip_typename; Array.iter (addcons mp) ip.ip_consnames) + ind.ind_packets + | (l,SEdecl (Dtype _)) -> addtyp mp (id_of_label l) + | (l,SEdecl (Dterm _)) -> addterm mp (id_of_label l) + | (l,SEdecl (Dfix (rv,_,_))) -> Array.iter (addfix mp) rv + | (l,SEmodule _) -> addmod mp (id_of_label l) + | (l,SEmodtype _) -> addmod mp (id_of_label l) in - let rec clash_list = function - | [] -> false - | mp :: mpl -> (clash_one mp) || (clash_list mpl) - in try clash_list mpl with Stop -> false - -(*s [contents_first_level mp] finds the names of the first-level objects - exported by module [mp]. Nota: it might fail if [mp] isn't a directly - visible module. Ex: [MPself] under functor, [MPbound], etc ... *) - -let contents_first_level mp = - if not (MPset.mem mp !modvisited) then begin - modvisited := MPset.add mp !modvisited; - match (Global.lookup_module mp).mod_type with - | MTBsig (msid,msb) -> - let add b id = add_module_contents mp (modular_rename b id) in - let upper_type = (lang () = Haskell) in - List.iter - (function - | (l, SPBconst cb) -> - (match Extraction.constant_kind (Global.env ()) cb with - | Extraction.Logical -> () - | Extraction.Type -> add upper_type (id_of_label l) - | Extraction.Term -> add false (id_of_label l)) - | (_, SPBmind mib) -> - Array.iter - (fun mip -> if snd (Inductive.mind_arity mip) <> InProp - then begin - add upper_type mip.mind_typename; - Array.iter (add true) mip.mind_consnames - end) - mib.mind_packets - | _ -> ()) - (Modops.subst_signature_msid msid mp msb) - | _ -> () - end + List.iter (fun (mp,sel) -> List.iter (f mp) sel) struc -(*s Initial renamings creation, for modular extraction. *) +(*s For monolithic extraction, first-level modules might have to be renamed + with unique numbers *) -let rec mp_create_modular_renamings mp = - try mp_get_renamings mp +let modfstlev_rename l = + let coqid = id_of_string "Coq" in + let id = id_of_label l in + try + let coqset = get_modfstlev id in + let nextcoq = next_ident_away coqid coqset in + add_modfstlev id (nextcoq::coqset); + (string_of_id nextcoq)^"_"^(string_of_id id) + with Not_found -> + let s = string_of_id id in + if is_lower s || begins_with_CoqXX s then + (add_modfstlev id [coqid]; "Coq_"^s) + else + (add_modfstlev id []; s) + + +(*s Creating renaming for a [module_path] *) + +let rec mp_create_renaming mp = + try get_mp_renaming mp with Not_found -> let ren = match mp with + | _ when not (modular ()) && at_toplevel mp -> [""] | MPdot (mp,l) -> - (rename_module (id_of_label l)) :: (mp_create_modular_renamings mp) - | MPself msid -> [rename_module (id_of_msid msid)] - | MPbound mbid -> [rename_module (id_of_mbid mbid)] - | MPfile f -> [String.capitalize (string_of_id (List.hd (repr_dirpath f)))] - in mp_rename mp ren; ren + let lmp = mp_create_renaming mp in + if lmp = [""] then (modfstlev_rename l)::lmp + else (modular_rename true (id_of_label l))::lmp + | MPself msid -> [modular_rename true (id_of_msid msid)] + | MPbound mbid -> [modular_rename true (id_of_mbid mbid)] + | MPfile _ when not (modular ()) -> assert false + | MPfile _ -> [string_of_modfile mp] + in add_mp_renaming mp ren; ren + +(* [clash mp0 s mpl] checks if [mp0-s] can be printed as [s] when + [mpl] is the context of visible modules. More precisely, we check if + there exists a [mp] in [mpl] that contains [s]. + The verification stops if we encounter [mp=mp0]. *) +let rec clash mem mp0 s = function + | [] -> false + | mp :: _ when mp = mp0 -> false + | mp :: mpl -> mem mp s || clash mem mp0 s mpl + +(*s Initial renamings creation, for modular extraction. *) let create_modular_renamings struc = let current_module = fst (List.hd struc) in - let modfiles = ref MPset.empty in - let { up = u ; down = d } = struct_get_references_set struc + let { typ = ty ; trm = tr ; cons = co } = struct_get_references_set struc in (* 1) creates renamings of objects *) let add upper r = let mp = modpath_of_r r in - let l = mp_create_modular_renamings mp in + let l = mp_create_renaming mp in let s = modular_rename upper (id_of_global r) in - global_ids := Idset.add (id_of_string s) !global_ids; - rename r (s::l); + add_global_ids (id_of_string s); + add_renaming r (s::l); begin try - let mp = modfile_of_mp mp in - if mp <> current_module then modfiles := MPset.add mp !modfiles + let mp = modfile_of_mp mp in if mp <> current_module then add_mpfiles mp with Not_found -> () end; in - Refset.iter (add true) u; - Refset.iter (add false) d; + Refset.iter (add (lang () = Haskell)) ty; + Refset.iter (add true) co; + Refset.iter (add false) tr; (* 2) determines the opened libraries. *) - let used_modules = MPset.elements !modfiles in - - (* [s] will contain all first-level sub-modules of [cur_mp] *) - let s = ref Stringset.empty in - begin - let add l = s := Stringset.add (rename_module (id_of_label l)) !s in - match (Global.lookup_module current_module).mod_type with - | MTBsig (_,msb) -> - List.iter (function (l,SPBmodule _) -> add l | _ -> ()) msb - | _ -> () - end; - (* We now compare [s] with the modules coming from [used_modules]. *) - List.iter - (function - | MPfile d -> - let s_mp = - String.capitalize (string_of_id (List.hd (repr_dirpath d))) in - if Stringset.mem s_mp !s then error_module_clash s_mp - else s:= Stringset.add s_mp !s - | _ -> assert false) - used_modules; + let used_modules = list_mpfiles () in + let used_modules' = List.rev used_modules in + let str_list = List.map string_of_modfile used_modules' + in + let rec check_elsewhere mpl sl = match mpl, sl with + | [], [] -> [] + | mp::mpl, _::sl -> + if List.exists (ext_mpmem Mod mp) sl then + check_elsewhere mpl sl + else mp :: (check_elsewhere mpl sl) + | _ -> assert false + in + let opened_modules = check_elsewhere used_modules' str_list in + clear_mpfiles (); + List.iter add_mpfiles opened_modules; (* 3) determines the potential clashes *) - List.iter contents_first_level used_modules; - let used_modules' = List.rev used_modules in - let needs_qualify r = + let needs_qualify k r = let mp = modpath_of_r r in - if (is_modfile mp) && mp <> current_module && - (clash mp [] (List.hd (get_renamings r)) used_modules') - then to_qualify := Refset.add r !to_qualify + if (is_modfile mp) && mp <> current_module && + (clash (ext_mpmem k) mp (List.hd (get_renaming r)) opened_modules) + then add_static_clash r in - Refset.iter needs_qualify u; - Refset.iter needs_qualify d; - used_modules + Refset.iter (needs_qualify Type) ty; + Refset.iter (needs_qualify Term) tr; + Refset.iter (needs_qualify Cons) co; + List.rev opened_modules (*s Initial renamings creation, for monolithic extraction. *) -let begins_with_CoqXX s = - (String.length s >= 4) && - (String.sub s 0 3 = "Coq") && - (try - for i = 4 to (String.index s '_')-1 do - match s.[i] with - | '0'..'9' -> () - | _ -> raise Not_found - done; - true - with Not_found -> false) - -let mod_1st_level_rename l = - let coqid = id_of_string "Coq" in - let id = id_of_label l in - try - let coqset = Idmap.find id !mod_1st_level in - let nextcoq = next_ident_away coqid coqset in - mod_1st_level := Idmap.add id (nextcoq::coqset) !mod_1st_level; - (string_of_id nextcoq)^"_"^(string_of_id id) - with Not_found -> - let s = string_of_id id in - if is_lower s || begins_with_CoqXX s then - (mod_1st_level := Idmap.add id [coqid] !mod_1st_level; "Coq_"^s) - else - (mod_1st_level := Idmap.add id [] !mod_1st_level; s) - -let rec mp_create_mono_renamings mp = - try mp_get_renamings mp - with Not_found -> - let ren = match mp with - | _ when (at_toplevel mp) -> [""] - | MPdot (mp,l) -> - let lmp = mp_create_mono_renamings mp in - if lmp = [""] then (mod_1st_level_rename l)::lmp - else (rename_module (id_of_label l))::lmp - | MPself msid -> [rename_module (id_of_msid msid)] - | MPbound mbid -> [rename_module (id_of_mbid mbid)] - | _ -> assert false - in mp_rename mp ren; ren - let create_mono_renamings struc = - let { up = u ; down = d } = struct_get_references_list struc in + let { typ = ty ; trm = tr ; cons = co } = struct_get_references_list struc in let add upper r = let mp = modpath_of_r r in - let l = mp_create_mono_renamings mp in + let l = mp_create_renaming mp in let mycase = if upper then uppercase_id else lowercase_id in let id = if l = [""] then - next_ident_away (mycase (id_of_global r)) (Idset.elements !global_ids) + next_ident_away (mycase (id_of_global r)) (global_ids_list ()) else id_of_string (modular_rename upper (id_of_global r)) in - global_ids := Idset.add id !global_ids; - rename r ((string_of_id id)::l) + add_global_ids id; + add_renaming r ((string_of_id id)::l) in - List.iter (add true) (List.rev u); - List.iter (add false) (List.rev d) - -(*s Renaming issues at toplevel *) - -module TopParams = struct - let globals () = Idset.empty - let pp_global _ r = pr_id (id_of_global r) - let pp_module _ mp = str (string_of_mp mp) -end - -(*s Renaming issues for a monolithic or modular extraction. *) - -module StdParams = struct - - let globals () = !global_ids - - let unquote s = - if lang () <> Scheme then s - else - let s = String.copy s in - for i=0 to String.length s - 1 do if s.[i] = '\'' then s.[i] <- '~' done; - s - - let rec dottify = function - | [] -> assert false - | [s] -> unquote s - | s::[""] -> unquote s - | s::l -> (dottify l)^"."^(unquote s) - - let pp_global mpl r = - let ls = get_renamings r in - let s = List.hd ls in - let mp = modpath_of_r r in - let ls = - if mp = List.hd mpl then [s] (* simpliest situation *) - else match lang () with - | Scheme -> [s] (* no modular Scheme extraction... *) - | Toplevel -> [s] (* idem *) - | Haskell -> - if !modular then - ls (* for the moment we always qualify in modular Haskell *) - else [s] - | Ocaml -> - try (* has [mp] something in common with one of those in [mpl] ? *) - let pref = common_prefix_from_list mp mpl in - (*i TODO: possibilité de clash i*) - list_firstn ((mp_length mp)-(mp_length pref)+1) ls - with Not_found -> (* [mp] is othogonal with every element of [mp]. *) - let base = base_mp mp in - if !modular && - (at_toplevel mp) && - not (Refset.mem r !to_qualify) && - not (clash base [] s mpl) - then snd (list_sep_last ls) - else ls - in - add_module_contents mp s; (* update the visible environment *) - str (dottify ls) - - (* The next function is used only in Ocaml extraction...*) - let pp_module mpl mp = - let ls = - if !modular - then mp_create_modular_renamings mp - else mp_create_mono_renamings mp - in - let ls = - try (* has [mp] something in common with one of those in [mpl] ? *) - let pref = common_prefix_from_list mp mpl in - (*i TODO: clash possible i*) - list_firstn ((mp_length mp)-(mp_length pref)) ls - with Not_found -> (* [mp] is othogonal with every element of [mp]. *) - if !modular && (at_toplevel mp) - then snd (list_sep_last ls) - else ls - in str (dottify ls) - -end - -module ToplevelPp = Ocaml.Make(TopParams) -module OcamlPp = Ocaml.Make(StdParams) -module HaskellPp = Haskell.Make(StdParams) -module SchemePp = Scheme.Make(StdParams) - -let pp_decl mp d = match lang () with - | Ocaml -> OcamlPp.pp_decl mp d - | Haskell -> HaskellPp.pp_decl mp d - | Scheme -> SchemePp.pp_decl mp d - | Toplevel -> ToplevelPp.pp_decl mp d - -let pp_struct s = match lang () with - | Ocaml -> OcamlPp.pp_struct s - | Haskell -> HaskellPp.pp_struct s - | Scheme -> SchemePp.pp_struct s - | Toplevel -> ToplevelPp.pp_struct s - -let pp_signature s = match lang () with - | Ocaml -> OcamlPp.pp_signature s - | Haskell -> HaskellPp.pp_signature s - | _ -> assert false - -let set_keywords () = - (match lang () with - | Ocaml -> keywords := Ocaml.keywords - | Haskell -> keywords := Haskell.keywords - | Scheme -> keywords := Scheme.keywords - | Toplevel -> keywords := Idset.empty); - global_ids := !keywords; - to_qualify := Refset.empty + List.iter (add (lang () = Haskell)) (List.rev ty); + List.iter (add false) (List.rev tr); + List.iter (add true) (List.rev co); + [] + +let create_renamings struc = + if modular () then create_modular_renamings struc + else create_mono_renamings struc -let preamble prm = match lang () with - | Ocaml -> Ocaml.preamble prm - | Haskell -> Haskell.preamble prm - | Scheme -> Scheme.preamble prm - | Toplevel -> (fun _ _ _ -> mt ()) - -let preamble_sig prm = match lang () with - | Ocaml -> Ocaml.preamble_sig prm - | _ -> assert false - -(*S Extraction of one decl to stdout. *) - -let print_one_decl struc mp decl = - set_keywords (); - modular := false; - create_mono_renamings struc; - msgnl (pp_decl [mp] decl) - -(*S Extraction to a file. *) - -let info f = - Options.if_verbose msgnl - (str ("The file "^f^" has been created by extraction.")) - -let print_structure_to_file f prm struc = - Hashtbl.clear renamings; - mod_1st_level := Idmap.empty; - modcontents := Gset.empty; - modvisited := MPset.empty; - set_keywords (); - modular := prm.modular; - let used_modules = - if lang () = Toplevel then [] - else if prm.modular then create_modular_renamings struc - else (create_mono_renamings struc; []) - in - let print_dummys = - (struct_ast_search ((=) MLdummy) struc, - struct_type_search Mlutil.isDummy struc, - struct_type_search ((=) Tunknown) struc) - in - let print_magic = - if lang () <> Haskell then false - else struct_ast_search (function MLmagic _ -> true | _ -> false) struc - in - (* print the implementation *) - let cout = option_map (fun (f,_) -> open_out f) f in - let ft = match cout with - | None -> !Pp_control.std_ft - | Some cout -> Pp_control.with_output_to cout in - begin try - msg_with ft (preamble prm used_modules print_dummys print_magic); - msg_with ft (pp_struct struc); - option_iter close_out cout; - with e -> - option_iter close_out cout; raise e - end; - option_iter (fun (f,_) -> info f) f; - (* print the signature *) - match f with - | Some (_,f) when lang () = Ocaml -> - let cout = open_out f in - let ft = Pp_control.with_output_to cout in - begin try - msg_with ft (preamble_sig prm used_modules print_dummys); - msg_with ft (pp_signature (signature_of_structure struc)); - close_out cout; - with e -> - close_out cout; raise e - end; - info f - | _ -> () - - -(*i - (* DO NOT REMOVE: used when making names resolution *) - let cout = open_out (f^".ren") in - let ft = Pp_control.with_output_to cout in - Hashtbl.iter - (fun r id -> - if short_module r = !current_module then - msgnl_with ft (pr_id id ++ str " " ++ pr_sp (sp_of_r r))) - renamings; - pp_flush_with ft (); - close_out cout; -i*) - - - - - - + +(*s On-the-fly qualification issues for both monolithic or modular extraction. *) + +let pp_global k r = + let ls = get_renaming r in + assert (List.length ls > 1); + let s = List.hd ls in + let mp = modpath_of_r r in + if mp = top_visible_mp () then + (* simpliest situation: definition of r (or use in the same context) *) + (* we update the visible environment *) + (add_loc_mpmem k mp s; unquote s) + else match lang () with + | Scheme -> unquote s (* no modular Scheme extraction... *) + | Haskell -> + (* for the moment we always qualify in modular Haskell *) + if modular () then dottify ls else s + | Ocaml -> + try (* has [mp] something in common with one of [!visible] ? *) + let prefix = common_prefix_from_list mp !visible in + let delta = mp_length mp - mp_length prefix in + let ls = list_firstn (delta+1) ls in + (* Difficulty: in ocaml we cannot qualify more than [ls], + but this (not-so-long) name can in fact be hidden. Solution: + duplication of the _definition_ of r in a Coq__XXX module *) + let s,ls' = list_sep_last ls in + let k' = if ls' = [] then k else Mod in + if clash (loc_mpmem k') prefix s !visible then + let front = if ls' = [] then [s] else ls' in + let l = get_nth_label delta r in + try dottify (front @ [check_duplicate prefix l]) + with Not_found -> add_duplicate prefix l; dottify ls + else dottify ls + with Not_found -> + (* [mp] belongs to a closed module, not one of [!visible]. *) + let base = base_mp mp in + let base_s,ls1 = list_sep_last ls in + let s,ls2 = list_sep_last ls1 in + let k' = if ls2 = [] then k else Mod in + if modular () && (mem_mpfiles base) && + not (static_clash r) && + (* k' = Mod can't clash in an opened module, see earlier check *) + not (clash (loc_mpmem k') base s !visible) + then (* Standard situation of an object in another file: *) + (* Thanks to the "open" of this file we remove its name *) + dottify ls1 + else if clash (loc_mpmem Mod) base base_s !visible then + error_module_clash base_s + else dottify ls + +(* The next function is used only in Ocaml extraction...*) +let pp_module mp = + let ls = mp_create_renaming mp in + if List.length ls = 1 then dottify ls + else match mp with + | MPdot (mp0,_) when mp0 = top_visible_mp () -> + (* simpliest situation: definition of mp (or use in the same context) *) + (* we update the visible environment *) + let s = List.hd ls in + add_loc_mpmem Mod mp0 s; s + | _ -> + try (* has [mp] something in common with one of those in [!visible] ? *) + let prefix = common_prefix_from_list mp !visible in + assert (mp <> prefix); (* no use of mp as whole module from itself *) + let delta = mp_length mp - mp_length prefix in + let ls = list_firstn delta ls in + (* Difficulty: in ocaml we cannot qualify more than [ls], + but this (not-so-long) name can in fact be hidden. Solution: + duplication of the _definition_ of mp via a Coq__XXX module *) + let s,ls' = list_sep_last ls in + if clash (loc_mpmem Mod) prefix s !visible then + let l = get_nth_label_mp delta mp in + try dottify (ls' @ [check_duplicate prefix l]) + with Not_found -> add_duplicate prefix l; dottify ls + else dottify ls + with Not_found -> + (* [mp] belongs to a closed module, not one of [!visible]. *) + let base = base_mp mp in + let base_s,ls' = list_sep_last ls in + let s = fst (list_sep_last ls) in + if modular () && (mem_mpfiles base) && + not (clash (loc_mpmem Mod) base s !visible) + then dottify ls' + else if clash (loc_mpmem Mod) base base_s !visible then + error_module_clash base_s + else dottify ls diff --git a/contrib/extraction/common.mli b/contrib/extraction/common.mli index 2ba51e1c..5cd26584 100644 --- a/contrib/extraction/common.mli +++ b/contrib/extraction/common.mli @@ -6,16 +6,56 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: common.mli 5920 2004-07-16 20:01:26Z herbelin $ i*) +(*i $Id: common.mli 10232 2007-10-17 12:32:10Z letouzey $ i*) open Names +open Libnames open Miniml open Mlutil +open Pp -val print_one_decl : - ml_structure -> module_path -> ml_decl -> unit +val fnl2 : unit -> std_ppcmds +val space_if : bool -> std_ppcmds +val sec_space_if : bool -> std_ppcmds -val print_structure_to_file : - (string * string) option -> extraction_params -> ml_structure -> unit +val pp_par : bool -> std_ppcmds -> std_ppcmds +val pp_apply : std_ppcmds -> bool -> std_ppcmds list -> std_ppcmds +val pr_binding : identifier list -> std_ppcmds +val rename_id : identifier -> Idset.t -> identifier +val lowercase_id : identifier -> identifier +val uppercase_id : identifier -> identifier + +val pr_upper_id : identifier -> std_ppcmds + +type env = identifier list * Idset.t +val empty_env : unit -> env + +val rename_vars: Idset.t -> identifier list -> env +val rename_tvars: Idset.t -> identifier list -> identifier list +val push_vars : identifier list -> env -> identifier list * env +val get_db_name : int -> env -> identifier + +val record_contents_fstlev : ml_structure -> unit + +val create_renamings : ml_structure -> module_path list + +type kind = Term | Type | Cons | Mod + +val pp_global : kind -> global_reference -> string +val pp_module : module_path -> string + +val top_visible_mp : unit -> module_path +val push_visible : module_path -> unit +val pop_visible : unit -> unit + +val add_subst : mod_self_id -> module_path -> unit + +val check_duplicate : module_path -> label -> string + +type reset_kind = OnlyLocal | AllButExternal | Everything + +val reset_renaming_tables : reset_kind -> unit + +val set_keywords : Idset.t -> unit diff --git a/contrib/extraction/extract_env.ml b/contrib/extraction/extract_env.ml index 825b3554..311b42c0 100644 --- a/contrib/extraction/extract_env.ml +++ b/contrib/extraction/extract_env.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: extract_env.ml 10209 2007-10-09 21:49:37Z letouzey $ i*) +(*i $Id: extract_env.ml 10794 2008-04-15 00:12:06Z letouzey $ i*) open Term open Declarations @@ -21,7 +21,9 @@ open Modutil open Common open Mod_subst -(*s Obtaining Coq environment. *) +(***************************************) +(*S Part I: computing Coq environment. *) +(***************************************) let toplevel_env () = let seg = Lib.contents_after None in @@ -29,16 +31,17 @@ let toplevel_env () = | (_,kn), Lib.Leaf o -> let mp,_,l = repr_kn kn in let seb = match Libobject.object_tag o with - | "CONSTANT" -> SEBconst (Global.lookup_constant (constant_of_kn kn)) - | "INDUCTIVE" -> SEBmind (Global.lookup_mind kn) - | "MODULE" -> SEBmodule (Global.lookup_module (MPdot (mp,l))) - | "MODULE TYPE" -> SEBmodtype (Global.lookup_modtype kn) + | "CONSTANT" -> SFBconst (Global.lookup_constant (constant_of_kn kn)) + | "INDUCTIVE" -> SFBmind (Global.lookup_mind kn) + | "MODULE" -> SFBmodule (Global.lookup_module (MPdot (mp,l))) + | "MODULE TYPE" -> + SFBmodtype (Global.lookup_modtype (MPdot (mp,l))) | _ -> failwith "caught" in l,seb | _ -> failwith "caught" in match current_toplevel () with - | MPself msid -> MEBstruct (msid, List.rev (map_succeed get_reference seg)) + | MPself msid -> SEBstruct (msid, List.rev (map_succeed get_reference seg)) | _ -> assert false let environment_until dir_opt = @@ -130,58 +133,87 @@ let factor_fix env l cb msb = list_iter_i (fun j -> function - | (l,SEBconst cb') -> + | (l,SFBconst cb') -> if check <> check_fix env cb' (j+1) then raise Impossible; labels.(j+1) <- l; | _ -> raise Impossible) msb'; labels, recd, msb'' end -let rec extract_msig env mp = function +(* From a [structure_body] (i.e. a list of [structure_field_body]) + to specifications. *) + +let rec extract_sfb_spec env mp = function | [] -> [] - | (l,SPBconst cb) :: msig -> + | (l,SFBconst cb) :: msig -> let kn = make_con mp empty_dirpath l in let s = extract_constant_spec env kn cb in - if logical_spec s then extract_msig env mp msig - else begin - Visit.add_spec_deps s; - (l,Spec s) :: (extract_msig env mp msig) - end - | (l,SPBmind cb) :: msig -> + let specs = extract_sfb_spec env mp msig in + if logical_spec s then specs + else begin Visit.add_spec_deps s; (l,Spec s) :: specs end + | (l,SFBmind cb) :: msig -> let kn = make_kn mp empty_dirpath l in let s = Sind (kn, extract_inductive env kn) in - if logical_spec s then extract_msig env mp msig - else begin - Visit.add_spec_deps s; - (l,Spec s) :: (extract_msig env mp msig) - end - | (l,SPBmodule {msb_modtype=mtb}) :: msig -> - (l,Smodule (extract_mtb env None mtb)) :: (extract_msig env mp msig) - | (l,SPBmodtype mtb) :: msig -> - (l,Smodtype (extract_mtb env None mtb)) :: (extract_msig env mp msig) - -and extract_mtb env mpo = function - | MTBident kn -> Visit.add_kn kn; MTident kn - | MTBfunsig (mbid, mtb, mtb') -> + let specs = extract_sfb_spec env mp msig in + if logical_spec s then specs + else begin Visit.add_spec_deps s; (l,Spec s) :: specs end + | (l,SFBmodule mb) :: msig -> + let specs = extract_sfb_spec env mp msig in + let mtb = Modops.type_of_mb env mb in + let spec = extract_seb_spec env (mb.mod_type<>None) mtb in + (l,Smodule spec) :: specs + | (l,SFBmodtype mtb) :: msig -> + let specs = extract_sfb_spec env mp msig in + (l,Smodtype (extract_seb_spec env true(*?*) mtb.typ_expr)) :: specs + | (l,SFBalias(mp1,_))::msig -> + extract_sfb_spec env mp + ((l,SFBmodule {mod_expr = Some (SEBident mp1); + mod_type = None; + mod_constraints = Univ.Constraint.empty; + mod_alias = Mod_subst.empty_subst; + mod_retroknowledge = []})::msig) + +(* From [struct_expr_body] to specifications *) + + +and extract_seb_spec env truetype = function + | SEBident kn when truetype -> Visit.add_mp kn; MTident kn + | SEBwith(mtb',With_definition_body(idl,cb))-> + let mtb''= extract_seb_spec env truetype mtb' in + (match extract_with_type env cb with (* cb peut contenir des kn *) + | None -> mtb'' + | Some (vl,typ) -> MTwith(mtb'',ML_With_type(idl,vl,typ))) + | SEBwith(mtb',With_module_body(idl,mp,_))-> + Visit.add_mp mp; + MTwith(extract_seb_spec env truetype mtb', + ML_With_module(idl,mp)) + | SEBfunctor (mbid, mtb, mtb') -> let mp = MPbound mbid in - let env' = Modops.add_module mp (Modops.module_body_of_type mtb) env in - MTfunsig (mbid, extract_mtb env None mtb, - extract_mtb env' None mtb') - | MTBsig (msid, msig) -> - let mp, msig = match mpo with - | None -> MPself msid, msig - | Some mp -> mp, Modops.subst_signature_msid msid mp msig - in + let env' = Modops.add_module mp (Modops.module_body_of_type mtb) env in + MTfunsig (mbid, extract_seb_spec env true mtb.typ_expr, + extract_seb_spec env' truetype mtb') + | SEBstruct (msid, msig) -> + let mp = MPself msid in let env' = Modops.add_signature mp msig env in - MTsig (msid, extract_msig env' mp msig) + MTsig (msid, extract_sfb_spec env' mp msig) + | (SEBapply _|SEBident _ (*when not truetype*)) as mtb -> + extract_seb_spec env truetype (Modops.eval_struct env mtb) + + +(* From a [structure_body] (i.e. a list of [structure_field_body]) + to implementations. -let rec extract_msb env mp all = function + NB: when [all=false], the evaluation order of the list is + important: last to first ensures correct dependencies. +*) + +let rec extract_sfb env mp all = function | [] -> [] - | (l,SEBconst cb) :: msb -> + | (l,SFBconst cb) :: msb -> (try let vl,recd,msb = factor_fix env l cb msb in let vc = Array.map (make_con mp empty_dirpath) vl in - let ms = extract_msb env mp all msb in + let ms = extract_sfb env mp all msb in let b = array_exists Visit.needed_con vc in if all || b then let d = extract_fixpoint env vc recd in @@ -189,7 +221,7 @@ let rec extract_msb env mp all = function else begin Visit.add_decl_deps d; (l,SEdecl d) :: ms end else ms with Impossible -> - let ms = extract_msb env mp all msb in + let ms = extract_sfb env mp all msb in let c = make_con mp empty_dirpath l in let b = Visit.needed_con c in if all || b then @@ -197,8 +229,8 @@ let rec extract_msb env mp all = function if (not b) && (logical_decl d) then ms else begin Visit.add_decl_deps d; (l,SEdecl d) :: ms end else ms) - | (l,SEBmind mib) :: msb -> - let ms = extract_msb env mp all msb in + | (l,SFBmind mib) :: msb -> + let ms = extract_sfb env mp all msb in let kn = make_kn mp empty_dirpath l in let b = Visit.needed_kn kn in if all || b then @@ -206,48 +238,68 @@ let rec extract_msb env mp all = function if (not b) && (logical_decl d) then ms else begin Visit.add_decl_deps d; (l,SEdecl d) :: ms end else ms - | (l,SEBmodule mb) :: msb -> - let ms = extract_msb env mp all msb in + | (l,SFBmodule mb) :: msb -> + let ms = extract_sfb env mp all msb in let mp = MPdot (mp,l) in if all || Visit.needed_mp mp then (l,SEmodule (extract_module env mp true mb)) :: ms else ms - | (l,SEBmodtype mtb) :: msb -> - let ms = extract_msb env mp all msb in - let kn = make_kn mp empty_dirpath l in - if all || Visit.needed_kn kn then - (l,SEmodtype (extract_mtb env None mtb)) :: ms + | (l,SFBmodtype mtb) :: msb -> + let ms = extract_sfb env mp all msb in + let mp = MPdot (mp,l) in + if all || Visit.needed_mp mp then + (l,SEmodtype (extract_seb_spec env true(*?*) mtb.typ_expr)) :: ms + else ms + | (l,SFBalias (mp1,cst)) :: msb -> + let ms = extract_sfb env mp all msb in + let mp = MPdot (mp,l) in + if all || Visit.needed_mp mp then + (l,SEmodule (extract_module env mp true + {mod_expr = Some (SEBident mp1); + mod_type = None; + mod_constraints= Univ.Constraint.empty; + mod_alias = empty_subst; + mod_retroknowledge = []})) :: ms else ms -and extract_meb env mpo all = function - | MEBident (MPfile d) -> error_MPfile_as_mod d (* temporary (I hope) *) - | MEBident mp -> Visit.add_mp mp; MEident mp - | MEBapply (meb, meb',_) -> - MEapply (extract_meb env None true meb, - extract_meb env None true meb') - | MEBfunctor (mbid, mtb, meb) -> +(* From [struct_expr_body] to implementations *) + +and extract_seb env mpo all = function + | SEBident mp -> + if is_modfile mp && not (modular ()) then error_MPfile_as_mod mp false; + Visit.add_mp mp; MEident mp + | SEBapply (meb, meb',_) -> + MEapply (extract_seb env None true meb, + extract_seb env None true meb') + | SEBfunctor (mbid, mtb, meb) -> let mp = MPbound mbid in let env' = Modops.add_module mp (Modops.module_body_of_type mtb) env in - MEfunctor (mbid, extract_mtb env None mtb, - extract_meb env' None true meb) - | MEBstruct (msid, msb) -> + MEfunctor (mbid, extract_seb_spec env true mtb.typ_expr, + extract_seb env' None true meb) + | SEBstruct (msid, msb) -> let mp,msb = match mpo with | None -> MPself msid, msb - | Some mp -> mp, subst_msb (map_msid msid mp) msb + | Some mp -> mp, Modops.subst_structure (map_msid msid mp) msb in - let env' = add_structure mp msb env in - MEstruct (msid, extract_msb env' mp all msb) + let env' = Modops.add_signature mp msb env in + MEstruct (msid, extract_sfb env' mp all msb) + | SEBwith (_,_) -> anomaly "Not available yet" and extract_module env mp all mb = (* [mb.mod_expr <> None ], since we look at modules from outside. *) (* Example of module with empty [mod_expr] is X inside a Module F [X:SIG]. *) - let meb = out_some mb.mod_expr in - let mtb = match mb.mod_user_type with None -> mb.mod_type | Some mt -> mt in + let meb = Option.get mb.mod_expr in + let mtb = match mb.mod_type with + | None -> Modops.eval_struct env meb + | Some mt -> mt + in (* Because of the "with" construct, the module type can be [MTBsig] with *) (* a msid different from the one of the module. Here is the patch. *) - let mtb = replicate_msid meb mtb in - { ml_mod_expr = extract_meb env (Some mp) all meb; - ml_mod_type = extract_mtb env None mtb } + (* PL 26/02/2008: is this still relevant ? + let mtb = replicate_msid meb mtb in *) + { ml_mod_expr = extract_seb env (Some mp) all meb; + ml_mod_type = extract_seb_spec env (mb.mod_type<>None) mtb } + let unpack = function MEstruct (_,sel) -> sel | _ -> assert false @@ -258,161 +310,198 @@ let mono_environment refs mpl = let env = Global.env () in let l = List.rev (environment_until None) in List.rev_map - (fun (mp,m) -> mp, unpack (extract_meb env (Some mp) false m)) l + (fun (mp,m) -> mp, unpack (extract_seb env (Some mp) false m)) l + +(**************************************) +(*S Part II : Input/Output primitives *) +(**************************************) + +let descr () = match lang () with + | Ocaml -> Ocaml.ocaml_descr + | Haskell -> Haskell.haskell_descr + | Scheme -> Scheme.scheme_descr + +(* From a filename string "foo.ml" or "foo", builds "foo.ml" and "foo.mli" + Works similarly for the other languages. *) + +let default_id = id_of_string "Main" + +let mono_filename f = + let d = descr () in + match f with + | None -> None, None, default_id + | Some f -> + let f = + if Filename.check_suffix f d.file_suffix then + Filename.chop_suffix f d.file_suffix + else f + in + let id = + if lang () <> Haskell then default_id + else try id_of_string (Filename.basename f) + with _ -> error "Extraction: provided filename is not a valid identifier" + in + Some (f^d.file_suffix), Option.map ((^) f) d.sig_suffix, id + +(* Builds a suitable filename from a module id *) + +let module_filename m = + let d = descr () in + let f = if d.capital_file then String.capitalize else String.uncapitalize in + let fn = f (string_of_id m) in + Some (fn^d.file_suffix), Option.map ((^) fn) d.sig_suffix, m + +(*s Extraction of one decl to stdout. *) + +let print_one_decl struc mp decl = + let d = descr () in + reset_renaming_tables AllButExternal; + ignore (create_renamings struc); + push_visible mp; + msgnl (d.pp_decl decl); + pop_visible () + +(*s Extraction of a ml struct to a file. *) + +let print_structure_to_file (fn,si,mo) struc = + let d = descr () in + reset_renaming_tables AllButExternal; + let used_modules = create_renamings struc in + let unsafe_needs = { + mldummy = struct_ast_search ((=) MLdummy) struc; + tdummy = struct_type_search Mlutil.isDummy struc; + tunknown = struct_type_search ((=) Tunknown) struc; + magic = + if lang () <> Haskell then false + else struct_ast_search (function MLmagic _ -> true | _ -> false) struc } + in + (* print the implementation *) + let cout = Option.map open_out fn in + let ft = match cout with + | None -> !Pp_control.std_ft + | Some cout -> Pp_control.with_output_to cout in + begin try + msg_with ft (d.preamble mo used_modules unsafe_needs); + if lang () = Ocaml then begin + (* for computing objects to duplicate *) + let devnull = Format.make_formatter (fun _ _ _ -> ()) (fun _ -> ()) in + msg_with devnull (d.pp_struct struc); + reset_renaming_tables OnlyLocal; + end; + msg_with ft (d.pp_struct struc); + Option.iter close_out cout; + with e -> + Option.iter close_out cout; raise e + end; + Option.iter info_file fn; + (* print the signature *) + Option.iter + (fun si -> + let cout = open_out si in + let ft = Pp_control.with_output_to cout in + begin try + msg_with ft (d.sig_preamble mo used_modules unsafe_needs); + reset_renaming_tables OnlyLocal; + msg_with ft (d.pp_sig (signature_of_structure struc)); + close_out cout; + with e -> + close_out cout; raise e + end; + info_file si) + si + + +(*********************************************) +(*s Part III: the actual extraction commands *) +(*********************************************) + + +let reset () = + Visit.reset (); reset_tables (); reset_renaming_tables Everything + +let init modular = + check_inside_section (); check_inside_module (); + set_keywords (descr ()).keywords; + set_modular modular; + reset (); + if modular && lang () = Scheme then error_scheme () + - (*s Recursive extraction in the Coq toplevel. The vernacular command is - \verb!Recursive Extraction! [qualid1] ... [qualidn]. We use [extract_env] - to get the saturated environment to extract. *) + \verb!Recursive Extraction! [qualid1] ... [qualidn]. Also used when + extracting to a file with the command: + \verb!Extraction "file"! [qualid1] ... [qualidn]. *) -let mono_extraction (f,m) qualids = - check_inside_section (); - check_inside_module (); +let full_extraction f qualids = + init false; let rec find = function | [] -> [],[] | q::l -> let refs,mps = find l in try - let mp = Nametab.locate_module (snd (qualid_of_reference q)) - in refs,(mp::mps) + let mp = Nametab.locate_module (snd (qualid_of_reference q)) in + if is_modfile mp then error_MPfile_as_mod mp true; + refs,(mp::mps) with Not_found -> (Nametab.global q)::refs, mps - in + in let refs,mps = find qualids in - let prm = {modular=false; mod_name = m; to_appear= refs} in - let struc = optimize_struct prm None (mono_environment refs mps) in - print_structure_to_file f prm struc; - Visit.reset (); - reset_tables () + let struc = optimize_struct refs (mono_environment refs mps) in + warning_axioms (); + print_structure_to_file (mono_filename f) struc; + reset () -let extraction_rec = mono_extraction (None,id_of_string "Main") -(*s Extraction in the Coq toplevel. We display the extracted term in - Ocaml syntax and we use the Coq printers for globals. The - vernacular command is \verb!Extraction! [qualid]. *) +(*s Simple extraction in the Coq toplevel. The vernacular command + is \verb!Extraction! [qualid]. *) -let extraction qid = - check_inside_section (); - check_inside_module (); +let simple_extraction qid = + init false; try - let _ = Nametab.locate_module (snd (qualid_of_reference qid)) in - extraction_rec [qid] + let mp = Nametab.locate_module (snd (qualid_of_reference qid)) in + if is_modfile mp then error_MPfile_as_mod mp true; + full_extraction None [qid] with Not_found -> let r = Nametab.global qid in if is_custom r then msgnl (str "User defined extraction:" ++ spc () ++ str (find_custom r) ++ fnl ()) else - let prm = - { modular = false; mod_name = id_of_string "Main"; to_appear = [r]} in - let struc = optimize_struct prm None (mono_environment [r] []) in + let struc = optimize_struct [r] (mono_environment [r] []) in let d = get_decl_in_structure r struc in + warning_axioms (); print_one_decl struc (modpath_of_r r) d; - Visit.reset (); - reset_tables () - -(*s Extraction to a file (necessarily recursive). - The vernacular command is - \verb!Extraction "file"! [qualid1] ... [qualidn].*) - -let lang_suffix () = match lang () with - | Ocaml -> ".ml",".mli" - | Haskell -> ".hs",".hi" - | Scheme -> ".scm",".scm" - | Toplevel -> assert false - -let filename f = - let s,s' = lang_suffix () in - if Filename.check_suffix f s then - let f' = Filename.chop_suffix f s in - Some (f,f'^s'),id_of_string f' - else Some (f^s,f^s'),id_of_string f - -let extraction_file f vl = - if lang () = Toplevel then error_toplevel () - else mono_extraction (filename f) vl - -(*s Extraction of a module at the toplevel. *) - -let extraction_module m = - check_inside_section (); - check_inside_module (); - begin match lang () with - | Toplevel -> error_toplevel () - | Scheme -> error_scheme () - | _ -> () - end; - let q = snd (qualid_of_reference m) in - let mp = - try Nametab.locate_module q with Not_found -> error_unknown_module q - in - let b = is_modfile mp in - let prm = {modular=b; mod_name = id_of_string ""; to_appear= []} in - Visit.reset (); - Visit.add_mp mp; - let env = Global.env () in - let l = List.rev (environment_until None) in - let struc = - List.rev_map (fun (mp,m) -> mp, unpack (extract_meb env (Some mp) b m)) l - in - let struc = optimize_struct prm None struc in - let struc = - let bmp = base_mp mp in - try [bmp, List.assoc bmp struc] with Not_found -> assert false - in - print_structure_to_file None prm struc; - Visit.reset (); - reset_tables () + reset () (*s (Recursive) Extraction of a library. The vernacular command is \verb!(Recursive) Extraction Library! [M]. *) -let module_file_name m = match lang () with - | Ocaml -> let f = String.uncapitalize (string_of_id m) in f^".ml", f^".mli" - | Haskell -> let f = String.capitalize (string_of_id m) in f^".hs", f^".hi" - | _ -> assert false - -let dir_module_of_id m = - let q = make_short_qualid m in - try Nametab.full_name_module q with Not_found -> error_unknown_module q - let extraction_library is_rec m = - check_inside_section (); - check_inside_module (); - begin match lang () with - | Toplevel -> error_toplevel () - | Scheme -> error_scheme () - | _ -> () - end; - let dir_m = dir_module_of_id m in - Visit.reset (); + init true; + let dir_m = + let q = make_short_qualid m in + try Nametab.full_name_module q with Not_found -> error_unknown_module q + in Visit.add_mp (MPfile dir_m); let env = Global.env () in let l = List.rev (environment_until (Some dir_m)) in let select l (mp,meb) = if Visit.needed_mp mp - then (mp, unpack (extract_meb env (Some mp) true meb)) :: l + then (mp, unpack (extract_seb env (Some mp) true meb)) :: l else l in let struc = List.fold_left select [] l in - let dummy_prm = {modular=true; mod_name=m; to_appear=[]} in - let struc = optimize_struct dummy_prm None struc in + let struc = optimize_struct [] struc in + warning_axioms (); + record_contents_fstlev struc; let rec print = function | [] -> () | (MPfile dir, _) :: l when not is_rec && dir <> dir_m -> print l | (MPfile dir, sel) as e :: l -> let short_m = snd (split_dirpath dir) in - let f = module_file_name short_m in - let prm = {modular=true;mod_name=short_m;to_appear=[]} in - print_structure_to_file (Some f) prm [e]; + print_structure_to_file (module_filename short_m) [e]; print l | _ -> assert false in print struc; - Visit.reset (); - reset_tables () - - - - - + reset () diff --git a/contrib/extraction/extract_env.mli b/contrib/extraction/extract_env.mli index a09464a1..8d906985 100644 --- a/contrib/extraction/extract_env.mli +++ b/contrib/extraction/extract_env.mli @@ -6,15 +6,18 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: extract_env.mli 5920 2004-07-16 20:01:26Z herbelin $ i*) +(*i $Id: extract_env.mli 10895 2008-05-07 16:06:26Z letouzey $ i*) (*s This module declares the extraction commands. *) open Names open Libnames -val extraction : reference -> unit -val extraction_rec : reference list -> unit -val extraction_file : string -> reference list -> unit -val extraction_module : reference -> unit +val simple_extraction : reference -> unit +val full_extraction : string option -> reference list -> unit val extraction_library : bool -> identifier -> unit + +(* For debug / external output via coqtop.byte + Drop : *) + +val mono_environment : + global_reference list -> module_path list -> Miniml.ml_structure diff --git a/contrib/extraction/extraction.ml b/contrib/extraction/extraction.ml index 6982ffc6..fdc84a64 100644 --- a/contrib/extraction/extraction.ml +++ b/contrib/extraction/extraction.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: extraction.ml 10195 2007-10-08 01:47:55Z letouzey $ i*) +(*i $Id: extraction.ml 10497 2008-02-01 12:18:37Z soubiran $ i*) (*i*) open Util @@ -310,7 +310,7 @@ and extract_ind env kn = (* kn is supposed to be in long form *) with Not_found -> (* First, if this inductive is aliased via a Module, *) (* we process the original inductive. *) - option_iter (fun kn -> ignore (extract_ind env kn)) mib.mind_equiv; + Option.iter (fun kn -> ignore (extract_ind env kn)) mib.mind_equiv; (* Everything concerning parameters. *) (* We do that first, since they are common to all the [mib]. *) let mip0 = mib.mind_packets.(0) in @@ -337,7 +337,10 @@ and extract_ind env kn = (* kn is supposed to be in long form *) {ind_info = Standard; ind_nparams = npar; ind_packets = packets; - ind_equiv = mib.mind_equiv }; + ind_equiv = match mib.mind_equiv with + | None -> NoEquiv + | Some kn -> Equiv kn + }; (* Second pass: we extract constructors *) for i = 0 to mib.mind_ntypes - 1 do let p = packets.(i) in @@ -410,7 +413,7 @@ and extract_ind env kn = (* kn is supposed to be in long form *) (Inductive.type_of_inductive env (mib,mip0)) in List.iter - (option_iter + (Option.iter (fun kn -> if Cset.mem kn !projs then add_projection n kn)) (lookup_projections ip) with Not_found -> () @@ -421,7 +424,9 @@ and extract_ind env kn = (* kn is supposed to be in long form *) let i = {ind_info = ind_info; ind_nparams = npar; ind_packets = packets; - ind_equiv = mib.mind_equiv} + ind_equiv = match mib.mind_equiv with + | None -> NoEquiv + | Some kn -> Equiv kn } in add_ind kn mib i; i @@ -750,7 +755,7 @@ and extract_case env mle ((kn,i) as ip,c,br) mlt = end else (* Standard case: we apply [extract_branch]. *) - MLcase (mi.ind_info, a, Array.init br_size extract_branch) + MLcase ((mi.ind_info,[]), a, Array.init br_size extract_branch) (*s Extraction of a (co)-fixpoint. *) @@ -828,18 +833,18 @@ let extract_constant env kn cb = | None -> (* A logical axiom is risky, an informative one is fatal. *) (match flag_of_type env typ with | (Info,TypeScheme) -> - if not (is_custom r) then warning_info_ax r; + if not (is_custom r) then add_info_axiom r; let n = type_scheme_nb_args env typ in let ids = iterate (fun l -> anonymous::l) n [] in Dtype (r, ids, Taxiom) | (Info,Default) -> - if not (is_custom r) then warning_info_ax r; + if not (is_custom r) then add_info_axiom r; let t = snd (record_constant_type env kn (Some typ)) in Dterm (r, MLaxiom, type_expunge env t) | (Logic,TypeScheme) -> - warning_log_ax r; Dtype (r, [], Tdummy Ktype) + add_log_axiom r; Dtype (r, [], Tdummy Ktype) | (Logic,Default) -> - warning_log_ax r; Dterm (r, MLdummy, Tdummy Kother)) + add_log_axiom r; Dterm (r, MLdummy, Tdummy Kother)) | Some body -> (match flag_of_type env typ with | (Logic, Default) -> Dterm (r, MLdummy, Tdummy Kother) @@ -871,6 +876,20 @@ let extract_constant_spec env kn cb = let t = snd (record_constant_type env kn (Some typ)) in Sval (r, type_expunge env t) +let extract_with_type env cb = + let typ = Typeops.type_of_constant_type env cb.const_type in + match flag_of_type env typ with + | (_ , Default) -> None + | (Logic, TypeScheme) ->Some ([],Tdummy Ktype) + | (Info, TypeScheme) -> + let s,vl = type_sign_vl env typ in + (match cb.const_body with + | None -> assert false + | Some body -> + let db = db_from_sign s in + let t = extract_type_scheme env db (force body) (List.length s) + in Some ( vl, t) ) + let extract_inductive env kn = let ind = extract_ind env kn in add_recursors env kn; @@ -880,24 +899,6 @@ let extract_inductive env kn = ind.ind_packets in { ind with ind_packets = packets } -(*s From a global reference to a ML declaration. *) - -let extract_declaration env r = match r with - | ConstRef kn -> extract_constant env kn (Environ.lookup_constant kn env) - | IndRef (kn,_) -> Dind (kn, extract_inductive env kn) - | ConstructRef ((kn,_),_) -> Dind (kn, extract_inductive env kn) - | VarRef kn -> assert false - -(*s Without doing complete extraction, just guess what a constant would be. *) - -type kind = Logical | Term | Type - -let constant_kind env cb = - match flag_of_type env (Typeops.type_of_constant_type env cb.const_type) with - | (Logic,_) -> Logical - | (Info,TypeScheme) -> Type - | (Info,Default) -> Term - (*s Is a [ml_decl] logical ? *) let logical_decl = function @@ -916,9 +917,3 @@ let logical_spec = function | Sval (_,Tdummy _) -> true | Sind (_,i) -> array_for_all (fun ip -> ip.ip_logical) i.ind_packets | _ -> false - - - - - - diff --git a/contrib/extraction/extraction.mli b/contrib/extraction/extraction.mli index 1dfd7e1a..6d41b630 100644 --- a/contrib/extraction/extraction.mli +++ b/contrib/extraction/extraction.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: extraction.mli 6303 2004-11-16 12:37:40Z sacerdot $ i*) +(*i $Id: extraction.mli 10497 2008-02-01 12:18:37Z soubiran $ i*) (*s Extraction from Coq terms to Miniml. *) @@ -21,21 +21,13 @@ val extract_constant : env -> constant -> constant_body -> ml_decl val extract_constant_spec : env -> constant -> constant_body -> ml_spec +val extract_with_type : env -> constant_body -> ( identifier list * ml_type ) option + val extract_fixpoint : env -> constant array -> (constr, types) prec_declaration -> ml_decl val extract_inductive : env -> kernel_name -> ml_ind -(*s ML declaration corresponding to a Coq reference. *) - -val extract_declaration : env -> global_reference -> ml_decl - -(*s Without doing complete extraction, just guess what a constant would be. *) - -type kind = Logical | Term | Type - -val constant_kind : env -> constant_body -> kind - (*s Is a [ml_decl] or a [ml_spec] logical ? *) val logical_decl : ml_decl -> bool diff --git a/contrib/extraction/g_extraction.ml4 b/contrib/extraction/g_extraction.ml4 index 13b29c7b..cb95808d 100644 --- a/contrib/extraction/g_extraction.ml4 +++ b/contrib/extraction/g_extraction.ml4 @@ -31,19 +31,18 @@ VERNAC ARGUMENT EXTEND language | [ "Ocaml" ] -> [ Ocaml ] | [ "Haskell" ] -> [ Haskell ] | [ "Scheme" ] -> [ Scheme ] -| [ "Toplevel" ] -> [ Toplevel ] END (* Extraction commands *) VERNAC COMMAND EXTEND Extraction (* Extraction in the Coq toplevel *) -| [ "Extraction" global(x) ] -> [ extraction x ] -| [ "Recursive" "Extraction" ne_global_list(l) ] -> [ extraction_rec l ] +| [ "Extraction" global(x) ] -> [ simple_extraction x ] +| [ "Recursive" "Extraction" ne_global_list(l) ] -> [ full_extraction None l ] (* Monolithic extraction to a file *) | [ "Extraction" string(f) ne_global_list(l) ] - -> [ extraction_file f l ] + -> [ full_extraction (Some f) l ] END (* Modular extraction (one Coq library = one ML module) *) diff --git a/contrib/extraction/haskell.ml b/contrib/extraction/haskell.ml index f924396c..0ef225c0 100644 --- a/contrib/extraction/haskell.ml +++ b/contrib/extraction/haskell.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: haskell.ml 8930 2006-06-09 02:14:34Z letouzey $ i*) +(*i $Id: haskell.ml 10233 2007-10-17 23:29:08Z letouzey $ i*) (*s Production of Haskell syntax. *) @@ -18,7 +18,7 @@ open Libnames open Table open Miniml open Mlutil -open Ocaml +open Common (*s Haskell renaming issues. *) @@ -30,22 +30,19 @@ let keywords = "as"; "qualified"; "hiding" ; "unit" ; "unsafeCoerce" ] Idset.empty -let preamble prm used_modules (mldummy,tdummy,tunknown) magic = - let pp_mp = function - | MPfile d -> pr_upper_id (List.hd (repr_dirpath d)) - | _ -> assert false - in - (if not magic then mt () +let preamble mod_name used_modules usf = + let pp_import mp = str ("import qualified "^ string_of_modfile mp ^"\n") + in + (if not usf.magic then mt () else str "{-# OPTIONS_GHC -cpp -fglasgow-exts #-}\n" ++ str "{- For Hugs, use the option -F\"cpp -P -traditional\" -}\n\n") ++ - str "module " ++ pr_upper_id prm.mod_name ++ str " where" ++ fnl () - ++ fnl() ++ - str "import qualified Prelude" ++ fnl() ++ - prlist (fun mp -> str "import qualified " ++ pp_mp mp ++ fnl ()) used_modules - ++ fnl () ++ - (if not magic then mt () + str "module " ++ pr_upper_id mod_name ++ str " where" ++ fnl2 () ++ + str "import qualified Prelude" ++ fnl () ++ + prlist pp_import used_modules ++ fnl () ++ + (if used_modules = [] then mt () else fnl ()) ++ + (if not usf.magic then mt () else str "\ #ifdef __GLASGOW_HASKELL__ import qualified GHC.Base @@ -54,16 +51,10 @@ unsafeCoerce = GHC.Base.unsafeCoerce# -- HUGS import qualified IOExts unsafeCoerce = IOExts.unsafeCoerce -#endif") - ++ - fnl() ++ fnl() +#endif" ++ fnl2 ()) ++ - (if not mldummy then mt () - else - str "__ = Prelude.error \"Logical or arity value used\"" - ++ fnl () ++ fnl()) - -let preamble_sig prm used_modules (mldummy,tdummy,tunknown) = failwith "TODO" + (if not usf.mldummy then mt () + else str "__ = Prelude.error \"Logical or arity value used\"" ++ fnl2 ()) let pp_abst = function | [] -> (mt ()) @@ -73,17 +64,11 @@ let pp_abst = function let pr_lower_id id = pr_id (lowercase_id id) -(*s The pretty-printing functor. *) +(*s The pretty-printer for haskell syntax *) -module Make = functor(P : Mlpp_param) -> struct - -let local_mpl = ref ([] : module_path list) - -let pp_global r = +let pp_global k r = if is_inline_custom r then str (find_custom r) - else P.pp_global !local_mpl r - -let empty_env () = [], P.globals() + else str (Common.pp_global k r) (*s Pretty-printing of types. [par] is a boolean indicating whether parentheses are needed or not. *) @@ -96,13 +81,14 @@ let rec pp_type par vl t = let rec pp_rec par = function | Tmeta _ | Tvar' _ -> assert false | Tvar i -> (try pr_id (List.nth vl (pred i)) with _ -> (str "a" ++ int i)) - | Tglob (r,[]) -> pp_global r + | Tglob (r,[]) -> pp_global Type r | Tglob (r,l) -> if r = IndRef (kn_sig,0) then pp_type true vl (List.hd l) else pp_par par - (pp_global r ++ spc () ++ prlist_with_sep spc (pp_type true vl) l) + (pp_global Type r ++ spc () ++ + prlist_with_sep spc (pp_type true vl) l) | Tarr (t1,t2) -> pp_par par (pp_rec true t1 ++ spc () ++ str "->" ++ spc () ++ pp_rec false t2) @@ -151,20 +137,20 @@ let rec pp_expr par env args = spc () ++ str "in") ++ spc () ++ hov 0 pp_a2))) | MLglob r -> - apply (pp_global r) + apply (pp_global Term r) | MLcons (_,r,[]) -> - assert (args=[]); pp_global r + assert (args=[]); pp_global Cons r | MLcons (_,r,[a]) -> assert (args=[]); - pp_par par (pp_global r ++ spc () ++ pp_expr true env [] a) + pp_par par (pp_global Cons r ++ spc () ++ pp_expr true env [] a) | MLcons (_,r,args') -> assert (args=[]); - pp_par par (pp_global r ++ spc () ++ + pp_par par (pp_global Cons r ++ spc () ++ prlist_with_sep spc (pp_expr true env []) args') - | MLcase (_,t, pv) -> + | MLcase ((_,factors),t, pv) -> apply (pp_par par' (v 0 (str "case " ++ pp_expr false env [] t ++ str " of" ++ - fnl () ++ str " " ++ pp_pat env pv))) + fnl () ++ str " " ++ pp_pat env factors pv))) | MLfix (i,ids,defs) -> let ids',env' = push_vars (List.rev (Array.to_list ids)) env in pp_fix par env' i (Array.of_list (List.rev ids'),defs) args @@ -177,11 +163,11 @@ let rec pp_expr par env args = pp_apply (str "unsafeCoerce") par (pp_expr true env [] a :: args) | MLaxiom -> pp_par par (str "Prelude.error \"AXIOM TO BE REALIZED\"") -and pp_pat env pv = +and pp_pat env factors pv = let pp_one_pat (name,ids,t) = let ids,env' = push_vars (List.rev ids) env in let par = expr_needs_par t in - hov 2 (pp_global name ++ + hov 2 (pp_global Cons name ++ (match ids with | [] -> mt () | _ -> (str " " ++ @@ -189,7 +175,18 @@ and pp_pat env pv = (fun () -> (spc ())) pr_id (List.rev ids))) ++ str " ->" ++ spc () ++ pp_expr par env' [] t) in - (prvect_with_sep (fun () -> (fnl () ++ str " ")) pp_one_pat pv) + prvecti + (fun i x -> if List.mem i factors then mt () else + (pp_one_pat pv.(i) ++ + if factors = [] && i = Array.length pv - 1 then mt () + else fnl () ++ str " ")) pv + ++ + match factors with + | [] -> mt () + | i::_ -> + let (_,ids,t) = pv.(i) in + let t = ast_lift (-List.length ids) t in + hov 2 (str "_ ->" ++ spc () ++ pp_expr (expr_needs_par t) env [] t) (*s names of the functions ([ids]) are already pushed in [env], and passed here just for convenience. *) @@ -223,7 +220,7 @@ let pp_logical_ind packet = let pp_singleton kn packet = let l = rename_tvars keywords packet.ip_vars in let l' = List.rev l in - hov 2 (str "type " ++ pp_global (IndRef (kn,0)) ++ spc () ++ + hov 2 (str "type " ++ pp_global Type (IndRef (kn,0)) ++ spc () ++ prlist_with_sep spc pr_id l ++ (if l <> [] then str " " else mt ()) ++ str "=" ++ spc () ++ pp_type false l' (List.hd packet.ip_types.(0)) ++ fnl () ++ @@ -233,7 +230,7 @@ let pp_singleton kn packet = let pp_one_ind ip pl cv = let pl = rename_tvars keywords pl in let pp_constructor (r,l) = - (pp_global r ++ + (pp_global Cons r ++ match l with | [] -> (mt ()) | _ -> (str " " ++ @@ -241,7 +238,7 @@ let pp_one_ind ip pl cv = (fun () -> (str " ")) (pp_type true pl) l)) in str (if Array.length cv = 0 then "type " else "data ") ++ - pp_global (IndRef ip) ++ str " " ++ + pp_global Type (IndRef ip) ++ str " " ++ prlist_with_sep (fun () -> str " ") pr_lower_id pl ++ (if pl = [] then mt () else str " ") ++ if Array.length cv = 0 then str "= () -- empty inductive" @@ -269,9 +266,7 @@ let rec pp_ind first kn i ind = let pp_string_parameters ids = prlist (fun id -> str id ++ str " ") -let pp_decl mpl = - local_mpl := mpl; - function +let pp_decl = function | Dind (kn,i) when i.ind_info = Singleton -> pp_singleton kn i.ind_packets.(0) ++ fnl () | Dind (kn,i) -> hov 0 (pp_ind true kn 0 i) @@ -288,38 +283,51 @@ let pp_decl mpl = if t = Taxiom then str "= () -- AXIOM TO BE REALIZED\n" else str "=" ++ spc () ++ pp_type false l t in - hov 2 (str "type " ++ pp_global r ++ spc () ++ st) ++ fnl () ++ fnl () + hov 2 (str "type " ++ pp_global Type r ++ spc () ++ st) ++ fnl2 () | Dfix (rv, defs, typs) -> let max = Array.length rv in let rec iter i = if i = max then mt () else - let e = pp_global rv.(i) in + let e = pp_global Term rv.(i) in e ++ str " :: " ++ pp_type false [] typs.(i) ++ fnl () - ++ pp_function (empty_env ()) e defs.(i) ++ fnl () ++ fnl () + ++ pp_function (empty_env ()) e defs.(i) ++ fnl2 () ++ iter (i+1) in iter 0 | Dterm (r, a, t) -> if is_inline_custom r then mt () else - let e = pp_global r in + let e = pp_global Term r in e ++ str " :: " ++ pp_type false [] t ++ fnl () ++ if is_custom r then - hov 0 (e ++ str " = " ++ str (find_custom r) ++ fnl() ++ fnl ()) + hov 0 (e ++ str " = " ++ str (find_custom r) ++ fnl2 ()) else - hov 0 (pp_function (empty_env ()) e a ++ fnl () ++ fnl ()) + hov 0 (pp_function (empty_env ()) e a ++ fnl2 ()) -let pp_structure_elem mpl = function - | (l,SEdecl d) -> pp_decl mpl d +let pp_structure_elem = function + | (l,SEdecl d) -> pp_decl d | (l,SEmodule m) -> failwith "TODO: Haskell extraction of modules not implemented yet" | (l,SEmodtype m) -> failwith "TODO: Haskell extraction of modules not implemented yet" let pp_struct = - prlist (fun (mp,sel) -> prlist (pp_structure_elem [mp]) sel) - -let pp_signature s = failwith "TODO" - -end - + let pp_sel (mp,sel) = + push_visible mp; + let p = prlist_strict pp_structure_elem sel in + pop_visible (); p + in + prlist_strict pp_sel + + +let haskell_descr = { + keywords = keywords; + file_suffix = ".hs"; + capital_file = true; + preamble = preamble; + pp_struct = pp_struct; + sig_suffix = None; + sig_preamble = (fun _ _ _ -> mt ()); + pp_sig = (fun _ -> mt ()); + pp_decl = pp_decl; +} diff --git a/contrib/extraction/haskell.mli b/contrib/extraction/haskell.mli index 106f7868..1af9c231 100644 --- a/contrib/extraction/haskell.mli +++ b/contrib/extraction/haskell.mli @@ -6,15 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: haskell.mli 7632 2005-12-01 14:35:21Z letouzey $ i*) +(*i $Id: haskell.mli 10232 2007-10-17 12:32:10Z letouzey $ i*) -open Pp -open Names -open Miniml +val haskell_descr : Miniml.language_descr -val keywords : Idset.t - -val preamble : - extraction_params -> module_path list -> bool*bool*bool -> bool -> std_ppcmds - -module Make : functor(P : Mlpp_param) -> Mlpp diff --git a/contrib/extraction/miniml.mli b/contrib/extraction/miniml.mli index 3b4146f8..dfe4eb48 100644 --- a/contrib/extraction/miniml.mli +++ b/contrib/extraction/miniml.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: miniml.mli 9456 2006-12-17 20:08:38Z letouzey $ i*) +(*i $Id: miniml.mli 10497 2008-02-01 12:18:37Z soubiran $ i*) (*s Target language for extraction: a core ML called MiniML. *) @@ -58,6 +58,8 @@ type inductive_info = | Standard | Record of global_reference list +type case_info = int list (* list of branches to merge in a _ pattern *) + (* A [ml_ind_packet] is the miniml counterpart of a [one_inductive_body]. If the inductive is logical ([ip_logical = false]), then all other fields are unused. Otherwise, @@ -76,11 +78,16 @@ type ml_ind_packet = { (* [ip_nparams] contains the number of parameters. *) +type equiv = + | NoEquiv + | Equiv of kernel_name + | RenEquiv of string + type ml_ind = { ind_info : inductive_info; ind_nparams : int; ind_packets : ml_ind_packet array; - ind_equiv : kernel_name option + ind_equiv : equiv } (*s ML terms. *) @@ -92,7 +99,7 @@ type ml_ast = | MLletin of identifier * ml_ast * ml_ast | MLglob of global_reference | MLcons of inductive_info * global_reference * ml_ast list - | MLcase of inductive_info * ml_ast * + | MLcase of (inductive_info*case_info) * ml_ast * (global_reference * identifier list * ml_ast) array | MLfix of int * identifier array * ml_ast array | MLexn of string @@ -119,9 +126,14 @@ type ml_specif = | Smodtype of ml_module_type and ml_module_type = - | MTident of kernel_name + | MTident of module_path | MTfunsig of mod_bound_id * ml_module_type * ml_module_type | MTsig of mod_self_id * ml_module_sig + | MTwith of ml_module_type * ml_with_declaration + +and ml_with_declaration = + | ML_With_type of identifier list * identifier list * ml_type + | ML_With_module of identifier list * module_path and ml_module_sig = (label * ml_specif) list @@ -149,24 +161,28 @@ type ml_structure = (module_path * ml_module_structure) list type ml_signature = (module_path * ml_module_sig) list -(*s Pretty-printing of MiniML in a given concrete syntax is parameterized - by a function [pp_global] that pretty-prints global references. - The resulting pretty-printer is a module of type [Mlpp] providing - functions to print types, terms and declarations. *) - -module type Mlpp_param = sig - val globals : unit -> Idset.t - val pp_global : module_path list -> global_reference -> std_ppcmds - val pp_module : module_path list -> module_path -> std_ppcmds -end - -module type Mlpp = sig - val pp_decl : module_path list -> ml_decl -> std_ppcmds - val pp_struct : ml_structure -> std_ppcmds - val pp_signature : ml_signature -> std_ppcmds -end - -type extraction_params = - { modular : bool; - mod_name : identifier; - to_appear : global_reference list } +type unsafe_needs = { + mldummy : bool; + tdummy : bool; + tunknown : bool; + magic : bool +} + +type language_descr = { + keywords : Idset.t; + + (* Concerning the source file *) + file_suffix : string; + capital_file : bool; (* should we capitalize filenames ? *) + preamble : identifier -> module_path list -> unsafe_needs -> std_ppcmds; + pp_struct : ml_structure -> std_ppcmds; + + (* Concerning a possible interface file *) + sig_suffix : string option; + sig_preamble : identifier -> module_path list -> unsafe_needs -> std_ppcmds; + pp_sig : ml_signature -> std_ppcmds; + + (* for an isolated declaration print *) + pp_decl : ml_decl -> std_ppcmds; + +} diff --git a/contrib/extraction/mlutil.ml b/contrib/extraction/mlutil.ml index 6bfedce5..79aeea33 100644 --- a/contrib/extraction/mlutil.ml +++ b/contrib/extraction/mlutil.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: mlutil.ml 8886 2006-06-01 13:53:45Z letouzey $ i*) +(*i $Id: mlutil.ml 10329 2007-11-21 21:21:36Z letouzey $ i*) (*i*) open Pp @@ -573,14 +573,20 @@ let eta_red e = if n = 0 then e else match t with | MLapp (f,a) -> - let m = (List.length a) - n in - if m < 0 then e - else - let a1,a2 = list_chop m a in - let f = if m = 0 then f else MLapp (f,a1) in - if test_eta_args_lift 0 n a2 && not (ast_occurs_itvl 1 n f) - then ast_lift (-n) f - else e + let m = List.length a in + let ids,body,args = + if m = n then + [], f, a + else if m < n then + snd (list_chop (n-m) ids), f, a + else (* m > n *) + let a1,a2 = list_chop (m-n) a in + [], MLapp (f,a1), a2 + in + let p = List.length args in + if test_eta_args_lift 0 p args && not (ast_occurs_itvl 1 p body) + then named_lams ids (ast_lift (-p) body) + else e | _ -> e (*s Computes all head linear beta-reductions possible in [(t a)]. @@ -658,20 +664,27 @@ let check_generalizable_case unsafe br = if check_and_generalize br.(i) <> f then raise Impossible done; f -(*s Do all branches correspond to the same thing? *) +(*s Detecting similar branches of a match *) -let check_constant_case br = - if Array.length br = 0 then raise Impossible; - let (r,l,t) = br.(0) in - let n = List.length l in - if ast_occurs_itvl 1 n t then raise Impossible; - let cst = ast_lift (-n) t in - for i = 1 to Array.length br - 1 do - let (r,l,t) = br.(i) in - let n = List.length l in - if (ast_occurs_itvl 1 n t) || (cst <> (ast_lift (-n) t)) - then raise Impossible - done; cst +(* If several branches of a match are equal (and independent from their + patterns) we will print them using a _ pattern. If _all_ branches + are equal, we remove the match. +*) + +let common_branches br = + let tab = Hashtbl.create 13 in + for i = 0 to Array.length br - 1 do + let (r,ids,t) = br.(i) in + let n = List.length ids in + if not (ast_occurs_itvl 1 n t) then + let t = ast_lift (-n) t in + let l = try Hashtbl.find tab t with Not_found -> [] in + Hashtbl.replace tab t (i::l) + done; + let best = ref [] in + Hashtbl.iter + (fun _ l -> if List.length l > List.length !best then best := l) tab; + if List.length !best < 2 then [] else !best (*s If all branches are functions, try to permut the case and the functions. *) @@ -805,18 +818,20 @@ and simpl_case o i br e = let f = check_generalizable_case o.opt_case_idg br in simpl o (MLapp (MLlam (anonymous,f),[e])) with Impossible -> - try (* Is each branch independant of [e] ? *) - if not o.opt_case_cst then raise Impossible; - check_constant_case br - with Impossible -> + (* Detect common branches *) + let common_br = if not o.opt_case_cst then [] else common_branches br in + if List.length common_br = Array.length br && br <> [||] then + let (_,ids,t) = br.(0) in ast_lift (-List.length ids) t + else + let new_i = (fst i, common_br) in (* Swap the case and the lam if possible *) if o.opt_case_fun then let ids,br = permut_case_fun br [] in let n = List.length ids in - if n <> 0 then named_lams ids (MLcase (i,ast_lift n e, br)) - else MLcase (i,e,br) - else MLcase (i,e,br) + if n <> 0 then named_lams ids (MLcase (new_i,ast_lift n e, br)) + else MLcase (new_i,e,br) + else MLcase (new_i,e,br) let rec post_simpl = function | MLletin(_,c,e) when (is_atomic (eta_red c)) -> @@ -1122,13 +1137,15 @@ let is_not_strict t = Futhermore we don't expand fixpoints. *) let inline_test t = - not (is_fix (eta_red t)) && (ml_size t < 12 && is_not_strict t) + let t1 = eta_red t in + let t2 = snd (collect_lams t1) in + not (is_fix t2) && ml_size t < 12 && is_not_strict t let manual_inline_list = let mp = MPfile (dirpath_of_string "Coq.Init.Wf") in List.map (fun s -> (make_con mp empty_dirpath (mk_label s))) [ "well_founded_induction_type"; "well_founded_induction"; - "Acc_rect"; "Acc_rec" ; "Acc_iter" ] + "Acc_rect"; "Acc_rec" ; "Acc_iter" ; "Fix" ] let manual_inline = function | ConstRef c -> List.mem c manual_inline_list diff --git a/contrib/extraction/modutil.ml b/contrib/extraction/modutil.ml index c9d4e237..48444509 100644 --- a/contrib/extraction/modutil.ml +++ b/contrib/extraction/modutil.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: modutil.ml 9456 2006-12-17 20:08:38Z letouzey $ i*) +(*i $Id: modutil.ml 10665 2008-03-14 12:10:09Z soubiran $ i*) open Names open Declarations @@ -20,121 +20,34 @@ open Mod_subst (*S Functions upon modules missing in [Modops]. *) -(*s Add _all_ direct subobjects of a module, not only those exported. - Build on the [Modops.add_signature] model. *) - -let add_structure mp msb env = - let add_one env (l,elem) = - let kn = make_kn mp empty_dirpath l in - let con = make_con mp empty_dirpath l in - match elem with - | SEBconst cb -> Environ.add_constant con cb env - | SEBmind mib -> Environ.add_mind kn mib env - | SEBmodule mb -> Modops.add_module (MPdot (mp,l)) mb env - | SEBmodtype mtb -> Environ.add_modtype kn mtb env - in List.fold_left add_one env msb - -(*s Apply a module path substitution on a module. - Build on the [Modops.subst_modtype] model. *) - -let rec subst_module sub mb = - let mtb' = Modops.subst_modtype sub mb.mod_type - and meb' = option_smartmap (subst_meb sub) mb.mod_expr - and mtb'' = option_smartmap (Modops.subst_modtype sub) mb.mod_user_type - and mpo' = option_smartmap (subst_mp sub) mb.mod_equiv in - if (mtb'==mb.mod_type) && (meb'==mb.mod_expr) && - (mtb''==mb.mod_user_type) && (mpo'==mb.mod_equiv) - then mb - else { mod_expr= meb'; - mod_type=mtb'; - mod_user_type=mtb''; - mod_equiv=mpo'; - mod_constraints=mb.mod_constraints } - -and subst_meb sub = function - | MEBident mp -> MEBident (subst_mp sub mp) - | MEBfunctor (mbid, mtb, meb) -> - assert (not (occur_mbid mbid sub)); - MEBfunctor (mbid, Modops.subst_modtype sub mtb, subst_meb sub meb) - | MEBstruct (msid, msb) -> - assert (not (occur_msid msid sub)); - MEBstruct (msid, subst_msb sub msb) - | MEBapply (meb, meb', c) -> - MEBapply (subst_meb sub meb, subst_meb sub meb', c) - -and subst_msb sub msb = - let subst_body = function - | SEBconst cb -> SEBconst (subst_const_body sub cb) - | SEBmind mib -> SEBmind (subst_mind sub mib) - | SEBmodule mb -> SEBmodule (subst_module sub mb) - | SEBmodtype mtb -> SEBmodtype (Modops.subst_modtype sub mtb) - in List.map (fun (l,b) -> (l,subst_body b)) msb - (*s Change a msid in a module type, to follow a module expr. Because of the "with" construct, the module type of a module can be a [MTBsig] with a msid different from the one of the module. *) let rec replicate_msid meb mtb = match meb,mtb with - | MEBfunctor (_, _, meb), MTBfunsig (mbid, mtb1, mtb2) -> + | SEBfunctor (_, _, meb), SEBfunctor (mbid, mtb1, mtb2) -> let mtb' = replicate_msid meb mtb2 in - if mtb' == mtb2 then mtb else MTBfunsig (mbid, mtb1, mtb') - | MEBstruct (msid, _), MTBsig (msid1, msig) when msid <> msid1 -> + if mtb' == mtb2 then mtb else SEBfunctor (mbid, mtb1, mtb') + | SEBstruct (msid, _), SEBstruct (msid1, msig) when msid <> msid1 -> let msig' = Modops.subst_signature_msid msid1 (MPself msid) msig in - if msig' == msig then MTBsig (msid, msig) else MTBsig (msid, msig') + if msig' == msig then SEBstruct (msid, msig) else SEBstruct (msid, msig') | _ -> mtb - -(*S More functions concerning [module_path]. *) - -let rec mp_length = function - | MPdot (mp, _) -> 1 + (mp_length mp) - | _ -> 1 - -let rec prefixes_mp mp = match mp with - | MPdot (mp',_) -> MPset.add mp (prefixes_mp mp') - | _ -> MPset.singleton mp - -let rec common_prefix prefixes_mp1 mp2 = - if MPset.mem mp2 prefixes_mp1 then mp2 - else match mp2 with - | MPdot (mp,_) -> common_prefix prefixes_mp1 mp - | _ -> raise Not_found - -let common_prefix_from_list mp0 mpl = - let prefixes_mp0 = prefixes_mp mp0 in - let rec f = function - | [] -> raise Not_found - | mp1 :: l -> try common_prefix prefixes_mp0 mp1 with Not_found -> f l - in f mpl - -let rec modfile_of_mp mp = match mp with - | MPfile _ -> mp - | MPdot (mp,_) -> modfile_of_mp mp - | _ -> raise Not_found - -let rec parse_labels ll = function - | MPdot (mp,l) -> parse_labels (l::ll) mp - | mp -> mp,ll - -let labels_of_mp mp = parse_labels [] mp - -let labels_of_ref r = - let mp,_,l = - match r with - ConstRef con -> repr_con con - | IndRef (kn,_) - | ConstructRef ((kn,_),_) -> repr_kn kn - | VarRef _ -> assert false - in - parse_labels [l] mp - -let rec add_labels_mp mp = function - | [] -> mp - | l :: ll -> add_labels_mp (MPdot (mp,l)) ll - - (*S Functions upon ML modules. *) - +let rec msid_of_mt = function + | MTident mp -> begin + match Modops.eval_struct (Global.env()) (SEBident mp) with + | SEBstruct(msid,_) -> MPself msid + | _ -> anomaly "Extraction:the With can't be applied to a funsig" + end + | MTwith(mt,_)-> msid_of_mt mt + | _ -> anomaly "Extraction:the With operator isn't applied to a name" + +let make_mp_with mp idl = + let idl_rev = List.rev idl in + let idl' = List.rev (List.tl idl_rev) in + (List.fold_left (fun mp id -> MPdot(mp,label_of_id id)) + mp idl') (*s Apply some functions upon all [ml_decl] and [ml_spec] found in a [ml_structure]. *) @@ -142,6 +55,16 @@ let struct_iter do_decl do_spec s = let rec mt_iter = function | MTident _ -> () | MTfunsig (_,mt,mt') -> mt_iter mt; mt_iter mt' + | MTwith (mt,ML_With_type(idl,l,t))-> + let mp_mt = msid_of_mt mt in + let mp = make_mp_with mp_mt idl in + let gr = ConstRef ( + (make_con mp empty_dirpath + (label_of_id ( + List.hd (List.rev idl))))) in + mt_iter mt;do_decl + (Dtype(gr,l,t)) + | MTwith (mt,_)->mt_iter mt | MTsig (_, sign) -> List.iter spec_iter sign and spec_iter = function | (_,Spec s) -> do_spec s @@ -186,7 +109,7 @@ let ast_iter_references do_term do_cons do_type a = if lang () = Ocaml then record_iter_references do_term i; do_cons r | MLcase (i,_,v) -> - if lang () = Ocaml then record_iter_references do_term i; + if lang () = Ocaml then record_iter_references do_term (fst i); Array.iter (fun (r,_,_) -> do_cons r) v | _ -> () in iter a @@ -197,7 +120,9 @@ let ind_iter_references do_term do_cons do_type kn ind = let packet_iter ip p = do_type (IndRef ip); if lang () = Ocaml then - option_iter (fun kne -> do_type (IndRef (kne,snd ip))) ind.ind_equiv; + (match ind.ind_equiv with + | Equiv kne -> do_type (IndRef (kne, snd ip)); + | _ -> ()); Array.iteri (fun j -> cons_iter (ip,j+1)) p.ip_types in if lang () = Ocaml then record_iter_references do_term ind.ind_info; @@ -215,7 +140,7 @@ let decl_iter_references do_term do_cons do_type = let spec_iter_references do_term do_cons do_type = function | Sind (kn,ind) -> ind_iter_references do_term do_cons do_type kn ind - | Stype (r,_,ot) -> do_type r; option_iter (type_iter_references do_type) ot + | Stype (r,_,ot) -> do_type r; Option.iter (type_iter_references do_type) ot | Sval (r,t) -> do_term r; type_iter_references do_type t let struct_iter_references do_term do_cons do_type = @@ -225,13 +150,13 @@ let struct_iter_references do_term do_cons do_type = (*s Get all references used in one [ml_structure], either in [list] or [set]. *) -type 'a updown = { mutable up : 'a ; mutable down : 'a } +type 'a kinds = { mutable typ : 'a ; mutable trm : 'a; mutable cons : 'a } let struct_get_references empty add struc = - let o = { up = empty ; down = empty } in - let do_term r = o.down <- add r o.down in - let do_cons r = o.up <- add r o.up in - let do_type = if lang () = Haskell then do_cons else do_term in + let o = { typ = empty ; trm = empty ; cons = empty } in + let do_type r = o.typ <- add r o.typ in + let do_term r = o.trm <- add r o.trm in + let do_cons r = o.cons <- add r o.cons in struct_iter_references do_term do_cons do_type struc; o let struct_get_references_set = struct_get_references Refset.empty Refset.add @@ -248,7 +173,9 @@ end let struct_get_references_list struc = let o = struct_get_references Orefset.empty Orefset.add struc in - { up = Orefset.list o.up; down = Orefset.list o.down } + { typ = Orefset.list o.typ; + trm = Orefset.list o.trm; + cons = Orefset.list o.cons } (*s Searching occurrences of a particular term (no lifting done). *) @@ -284,7 +211,7 @@ let spec_type_search f = function | Sind (_,{ind_packets=p}) -> Array.iter (fun {ip_types=v} -> Array.iter (List.iter (type_search f)) v) p - | Stype (_,_,ot) -> option_iter (type_search f) ot + | Stype (_,_,ot) -> Option.iter (type_search f) ot | Sval (_,u) -> type_search f u let struct_type_search f s = @@ -360,38 +287,40 @@ let dfix_to_mlfix rv av i = let c = Array.map (subst 0) av in MLfix(i, ids, c) -let rec optim prm s = function +let rec optim to_appear s = function | [] -> [] | (Dtype (r,_,Tdummy _) | Dterm(r,MLdummy,_)) as d :: l -> - if List.mem r prm.to_appear then d :: (optim prm s l) else optim prm s l + if List.mem r to_appear + then d :: (optim to_appear s l) + else optim to_appear s l | Dterm (r,t,typ) :: l -> let t = normalize (ast_glob_subst !s t) in let i = inline r t in if i then s := Refmap.add r t !s; - if not i || prm.modular || List.mem r prm.to_appear + if not i || modular () || List.mem r to_appear then let d = match optimize_fix t with | MLfix (0, _, [|c|]) -> Dfix ([|r|], [|ast_subst (MLglob r) c|], [|typ|]) | t -> Dterm (r, t, typ) - in d :: (optim prm s l) - else optim prm s l - | d :: l -> d :: (optim prm s l) + in d :: (optim to_appear s l) + else optim to_appear s l + | d :: l -> d :: (optim to_appear s l) -let rec optim_se top prm s = function +let rec optim_se top to_appear s = function | [] -> [] | (l,SEdecl (Dterm (r,a,t))) :: lse -> let a = normalize (ast_glob_subst !s a) in let i = inline r a in if i then s := Refmap.add r a !s; - if top && i && not prm.modular && not (List.mem r prm.to_appear) - then optim_se top prm s lse + if top && i && not (modular ()) && not (List.mem r to_appear) + then optim_se top to_appear s lse else let d = match optimize_fix a with | MLfix (0, _, [|c|]) -> Dfix ([|r|], [|ast_subst (MLglob r) c|], [|t|]) | a -> Dterm (r, a, t) - in (l,SEdecl d) :: (optim_se top prm s lse) + in (l,SEdecl d) :: (optim_se top to_appear s lse) | (l,SEdecl (Dfix (rv,av,tv))) :: lse -> let av = Array.map (fun a -> normalize (ast_glob_subst !s a)) av in let all = ref true in @@ -402,22 +331,22 @@ let rec optim_se top prm s = function then s := Refmap.add rv.(i) (dfix_to_mlfix rv av i) !s else all := false done; - if !all && top && not prm.modular - && (array_for_all (fun r -> not (List.mem r prm.to_appear)) rv) - then optim_se top prm s lse - else (l,SEdecl (Dfix (rv, av, tv))) :: (optim_se top prm s lse) + if !all && top && not (modular ()) + && (array_for_all (fun r -> not (List.mem r to_appear)) rv) + then optim_se top to_appear s lse + else (l,SEdecl (Dfix (rv, av, tv))) :: (optim_se top to_appear s lse) | (l,SEmodule m) :: lse -> - let m = { m with ml_mod_expr = optim_me prm s m.ml_mod_expr} - in (l,SEmodule m) :: (optim_se top prm s lse) - | se :: lse -> se :: (optim_se top prm s lse) + let m = { m with ml_mod_expr = optim_me to_appear s m.ml_mod_expr} + in (l,SEmodule m) :: (optim_se top to_appear s lse) + | se :: lse -> se :: (optim_se top to_appear s lse) -and optim_me prm s = function - | MEstruct (msid, lse) -> MEstruct (msid, optim_se false prm s lse) +and optim_me to_appear s = function + | MEstruct (msid, lse) -> MEstruct (msid, optim_se false to_appear s lse) | MEident mp as me -> me - | MEapply (me, me') -> MEapply (optim_me prm s me, optim_me prm s me') - | MEfunctor (mbid,mt,me) -> MEfunctor (mbid,mt, optim_me prm s me) + | MEapply (me, me') -> + MEapply (optim_me to_appear s me, optim_me to_appear s me') + | MEfunctor (mbid,mt,me) -> MEfunctor (mbid,mt, optim_me to_appear s me) -let optimize_struct prm before struc = +let optimize_struct to_appear struc = let subst = ref (Refmap.empty : ml_ast Refmap.t) in - option_iter (fun l -> ignore (optim prm subst l)) before; - List.map (fun (mp,lse) -> (mp, optim_se true prm subst lse)) struc + List.map (fun (mp,lse) -> (mp, optim_se true to_appear subst lse)) struc diff --git a/contrib/extraction/modutil.mli b/contrib/extraction/modutil.mli index 115a42ca..85d58a4b 100644 --- a/contrib/extraction/modutil.mli +++ b/contrib/extraction/modutil.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: modutil.mli 8724 2006-04-20 09:57:01Z letouzey $ i*) +(*i $Id: modutil.mli 10620 2008-03-05 10:54:41Z letouzey $ i*) open Names open Declarations @@ -17,29 +17,9 @@ open Mod_subst (*s Functions upon modules missing in [Modops]. *) -(* Add _all_ direct subobjects of a module, not only those exported. - Build on the [Modops.add_signature] model. *) - -val add_structure : module_path -> module_structure_body -> env -> env - -(* Apply a module path substitution on a module. - Build on the [Modops.subst_modtype] model. *) - -val subst_module : substitution -> module_body -> module_body -val subst_meb : substitution -> module_expr_body -> module_expr_body -val subst_msb : substitution -> module_structure_body -> module_structure_body - (* Change a msid in a module type, to follow a module expr. *) -val replicate_msid : module_expr_body -> module_type_body -> module_type_body - -(*s More utilities concerning [module_path]. *) - -val mp_length : module_path -> int -val prefixes_mp : module_path -> MPset.t -val modfile_of_mp : module_path -> module_path -val common_prefix_from_list : module_path -> module_path list -> module_path -val add_labels_mp : module_path -> label list -> module_path +val replicate_msid : struct_expr_body -> struct_expr_body -> struct_expr_body (*s Functions upon ML modules. *) @@ -52,10 +32,10 @@ val decl_iter_references : do_ref -> do_ref -> do_ref -> ml_decl -> unit val spec_iter_references : do_ref -> do_ref -> do_ref -> ml_spec -> unit val struct_iter_references : do_ref -> do_ref -> do_ref -> ml_structure -> unit -type 'a updown = { mutable up : 'a ; mutable down : 'a } +type 'a kinds = { mutable typ : 'a ; mutable trm : 'a; mutable cons : 'a } -val struct_get_references_set : ml_structure -> Refset.t updown -val struct_get_references_list : ml_structure -> global_reference list updown +val struct_get_references_set : ml_structure -> Refset.t kinds +val struct_get_references_list : ml_structure -> global_reference list kinds val signature_of_structure : ml_structure -> ml_signature @@ -65,7 +45,7 @@ val get_decl_in_structure : global_reference -> ml_structure -> ml_decl all beta redexes (when the argument does not occur, it is just thrown away; when it occurs exactly once it is substituted; otherwise a let-in redex is created for clarity) and iota redexes, plus some other - optimizations. *) + optimizations. The first argument is the list of objects we want to appear. +*) -val optimize_struct : - extraction_params -> ml_decl list option -> ml_structure -> ml_structure +val optimize_struct : global_reference list -> ml_structure -> ml_structure diff --git a/contrib/extraction/ocaml.ml b/contrib/extraction/ocaml.ml index 35f9a83c..64c80a2a 100644 --- a/contrib/extraction/ocaml.ml +++ b/contrib/extraction/ocaml.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: ocaml.ml 9472 2007-01-05 15:49:32Z letouzey $ i*) +(*i $Id: ocaml.ml 10592 2008-02-27 14:16:07Z letouzey $ i*) (*s Production of Ocaml syntax. *) @@ -19,10 +19,27 @@ open Table open Miniml open Mlutil open Modutil +open Common +open Declarations + (*s Some utility functions. *) -let pp_par par st = if par then str "(" ++ st ++ str ")" else st +let rec msid_of_mt = function + | MTident mp -> begin + match Modops.eval_struct (Global.env()) (SEBident mp) with + | SEBstruct(msid,_) -> MPself msid + | _ -> anomaly "Extraction:the With can't be applied to a funsig" + end + | MTwith(mt,_)-> msid_of_mt mt + | _ -> anomaly "Extraction:the With operator isn't applied to a name" + +let make_mp_with mp idl = + let idl_rev = List.rev idl in + let idl' = List.rev (List.tl idl_rev) in + (List.fold_left (fun mp id -> MPdot(mp,label_of_id id)) + mp idl') + let pp_tvar id = let s = string_of_id id in @@ -52,70 +69,12 @@ let pp_abst = function str "fun " ++ prlist_with_sep (fun () -> str " ") pr_id l ++ str " ->" ++ spc () -let pp_apply st par args = match args with - | [] -> st - | _ -> hov 2 (pp_par par (st ++ spc () ++ prlist_with_sep spc identity args)) - -let pr_binding = function - | [] -> mt () - | l -> str " " ++ prlist_with_sep (fun () -> str " ") pr_id l - -let space_if = function true -> str " " | false -> mt () - -let sec_space_if = function true -> spc () | false -> mt () - -let fnl2 () = fnl () ++ fnl () - let pp_parameters l = (pp_boxed_tuple pp_tvar l ++ space_if (l<>[])) let pp_string_parameters l = (pp_boxed_tuple str l ++ space_if (l<>[])) -(*s Generic renaming issues. *) - -let rec rename_id id avoid = - if Idset.mem id avoid then rename_id (lift_ident id) avoid else id - -let lowercase_id id = id_of_string (String.uncapitalize (string_of_id id)) -let uppercase_id id = id_of_string (String.capitalize (string_of_id id)) - -(* [pr_upper_id id] makes 2 String.copy lesser than [pr_id (uppercase_id id)] *) -let pr_upper_id id = str (String.capitalize (string_of_id id)) - -(*s de Bruijn environments for programs *) - -type env = identifier list * Idset.t - -let rec rename_vars avoid = function - | [] -> - [], avoid - | id :: idl when id == dummy_name -> - (* we don't rename dummy binders *) - let (idl', avoid') = rename_vars avoid idl in - (id :: idl', avoid') - | id :: idl -> - let (idl, avoid) = rename_vars avoid idl in - let id = rename_id (lowercase_id id) avoid in - (id :: idl, Idset.add id avoid) - -let rename_tvars avoid l = - let rec rename avoid = function - | [] -> [],avoid - | id :: idl -> - let id = rename_id (lowercase_id id) avoid in - let idl, avoid = rename (Idset.add id avoid) idl in - (id :: idl, avoid) in - fst (rename avoid l) - -let push_vars ids (db,avoid) = - let ids',avoid' = rename_vars avoid ids in - ids', (ids' @ db, avoid') - -let get_db_name n (db,_) = - let id = List.nth db (pred n) in - if id = dummy_name then id_of_string "__" else id - (*s Ocaml renaming issues. *) let keywords = @@ -130,46 +89,39 @@ let keywords = "land"; "lor"; "lxor"; "lsl"; "lsr"; "asr" ; "unit" ; "_" ; "__" ] Idset.empty -let preamble _ used_modules (mldummy,tdummy,tunknown) _ = - let pp_mp = function - | MPfile d -> pr_upper_id (List.hd (repr_dirpath d)) - | _ -> assert false - in - prlist (fun mp -> str "open " ++ pp_mp mp ++ fnl ()) used_modules - ++ - (if used_modules = [] then mt () else fnl ()) - ++ - (if tdummy || tunknown then str "type __ = Obj.t" ++ fnl() else mt()) - ++ - (if mldummy then - str "let __ = let rec f _ = Obj.repr f in Obj.repr f" ++ fnl () - else mt ()) - ++ - (if tdummy || tunknown || mldummy then fnl () else mt ()) - -let preamble_sig _ used_modules (_,tdummy,tunknown) = - let pp_mp = function - | MPfile d -> pr_upper_id (List.hd (repr_dirpath d)) - | _ -> assert false - in - prlist (fun mp -> str "open " ++ pp_mp mp ++ fnl ()) used_modules - ++ - (if used_modules = [] then mt () else fnl ()) - ++ - (if tdummy || tunknown then str "type __ = Obj.t" ++ fnl() ++ fnl () - else mt()) +let pp_open mp = str ("open "^ string_of_modfile mp ^"\n") -(*s The pretty-printing functor. *) +let preamble _ used_modules usf = + prlist pp_open used_modules ++ + (if used_modules = [] then mt () else fnl ()) ++ + (if usf.tdummy || usf.tunknown then str "type __ = Obj.t\n" else mt()) ++ + (if usf.mldummy then + str "let __ = let rec f _ = Obj.repr f in Obj.repr f\n" + else mt ()) ++ + (if usf.tdummy || usf.tunknown || usf.mldummy then fnl () else mt ()) -module Make = functor(P : Mlpp_param) -> struct +let sig_preamble _ used_modules usf = + prlist pp_open used_modules ++ + (if used_modules = [] then mt () else fnl ()) ++ + (if usf.tdummy || usf.tunknown then str "type __ = Obj.t\n\n" else mt()) -let local_mpl = ref ([] : module_path list) +(*s The pretty-printer for Ocaml syntax*) -let pp_global r = +let pp_global k r = if is_inline_custom r then str (find_custom r) - else P.pp_global !local_mpl r + else str (Common.pp_global k r) + +let pp_modname mp = str (Common.pp_module mp) -let empty_env () = [], P.globals () +let is_infix r = + is_inline_custom r && + (let s = find_custom r in + let l = String.length s in + l >= 2 && s.[0] = '(' && s.[l-1] = ')') + +let get_infix r = + let s = find_custom r in + String.sub s 1 (String.length s - 2) exception NoRecord @@ -187,12 +139,16 @@ let rec pp_type par vl t = | Tmeta _ | Tvar' _ | Taxiom -> assert false | Tvar i -> (try pp_tvar (List.nth vl (pred i)) with _ -> (str "'a" ++ int i)) - | Tglob (r,[]) -> pp_global r + | Tglob (r,[a1;a2]) when is_infix r -> + pp_par par + (pp_rec true a1 ++ spc () ++ str (get_infix r) ++ spc () ++ + pp_rec true a2) + | Tglob (r,[]) -> pp_global Type r | Tglob (r,l) -> if r = IndRef (kn_sig,0) then pp_tuple_light pp_rec l else - pp_tuple_light pp_rec l ++ spc () ++ pp_global r + pp_tuple_light pp_rec l ++ spc () ++ pp_global Type r | Tarr (t1,t2) -> pp_par par (pp_rec true t1 ++ spc () ++ str "->" ++ spc () ++ pp_rec false t2) @@ -206,10 +162,16 @@ let rec pp_type par vl t = de Bruijn variables. [args] is the list of collected arguments (already pretty-printed). *) +let is_ifthenelse = function + | [|(r1,[],_);(r2,[],_)|] -> + (try (find_custom r1 = "true") && (find_custom r2 = "false") + with Not_found -> false) + | _ -> false + let expr_needs_par = function | MLlam _ -> true | MLcase (_,_,[|_|]) -> false - | MLcase _ -> true + | MLcase (_,_,pv) -> not (is_ifthenelse pv) | _ -> false @@ -244,26 +206,31 @@ let rec pp_expr par env args = (try let args = list_skipn (projection_arity r) args in let record = List.hd args in - pp_apply (record ++ str "." ++ pp_global r) par (List.tl args) - with _ -> apply (pp_global r)) + pp_apply (record ++ str "." ++ pp_global Term r) par (List.tl args) + with _ -> apply (pp_global Term r)) | MLcons (Coinductive,r,[]) -> assert (args=[]); - pp_par par (str "lazy " ++ pp_global r) + pp_par par (str "lazy " ++ pp_global Cons r) | MLcons (Coinductive,r,args') -> assert (args=[]); let tuple = pp_tuple (pp_expr true env []) args' in - pp_par par (str "lazy (" ++ pp_global r ++ spc() ++ tuple ++str ")") + pp_par par (str "lazy (" ++ pp_global Cons r ++ spc() ++ tuple ++str ")") | MLcons (_,r,[]) -> assert (args=[]); - pp_global r + pp_global Cons r | MLcons (Record projs, r, args') -> assert (args=[]); pp_record_pat (projs, List.map (pp_expr true env []) args') + | MLcons (_,r,[arg1;arg2]) when is_infix r -> + assert (args=[]); + pp_par par + ((pp_expr true env [] arg1) ++ spc () ++ str (get_infix r) ++ + spc () ++ (pp_expr true env [] arg2)) | MLcons (_,r,args') -> assert (args=[]); let tuple = pp_tuple (pp_expr true env []) args' in - pp_par par (pp_global r ++ spc () ++ tuple) - | MLcase (i, t, pv) -> + pp_par par (pp_global Cons r ++ spc () ++ tuple) + | MLcase ((i,factors), t, pv) -> let expr = if i = Coinductive then (str "Lazy.force" ++ spc () ++ pp_expr true env [] t) else @@ -276,7 +243,7 @@ let rec pp_expr par env args = match c with | MLrel i when i <= n -> apply (pp_par par' (pp_expr true env [] t ++ str "." ++ - pp_global (List.nth projs (n-i)))) + pp_global Term (List.nth projs (n-i)))) | MLapp (MLrel i, a) when i <= n -> if List.exists (ast_occurs_itvl 1 n) a then raise NoRecord @@ -284,7 +251,7 @@ let rec pp_expr par env args = let ids,env' = push_vars (List.rev ids) env in (pp_apply (pp_expr true env [] t ++ str "." ++ - pp_global (List.nth projs (n-i))) + pp_global Term (List.nth projs (n-i))) par ((List.map (pp_expr true env' []) a) @ args)) | _ -> raise NoRecord with NoRecord -> @@ -297,11 +264,13 @@ let rec pp_expr par env args = (hov 2 (str "let " ++ s1 ++ str " =" ++ spc () ++ expr) ++ spc () ++ str "in") ++ spc () ++ hov 0 s2))) - else - apply + else + apply (pp_par par' - (v 0 (str "match " ++ expr ++ str " with" ++ - fnl () ++ str " | " ++ pp_pat env i pv)))) + (try pp_ifthenelse par' env expr pv + with Not_found -> + v 0 (str "match " ++ expr ++ str " with" ++ fnl () ++ + str " | " ++ pp_pat env (i,factors) pv)))) | MLfix (i,ids,defs) -> let ids',env' = push_vars (List.rev (Array.to_list ids)) env in pp_fix par env' i (Array.of_list (List.rev ids'),defs) args @@ -319,10 +288,21 @@ let rec pp_expr par env args = and pp_record_pat (projs, args) = str "{ " ++ prlist_with_sep (fun () -> str ";" ++ spc ()) - (fun (r,a) -> pp_global r ++ str " =" ++ spc () ++ a) + (fun (r,a) -> pp_global Term r ++ str " =" ++ spc () ++ a) (List.combine projs args) ++ str " }" +and pp_ifthenelse par env expr pv = match pv with + | [|(tru,[],the);(fal,[],els)|] when + (find_custom tru = "true") && (find_custom fal = "false") + -> + hv 0 (hov 2 (str "if " ++ expr) ++ spc () ++ + hov 2 (str "then " ++ + hov 2 (pp_expr (expr_needs_par the) env [] the)) ++ spc () ++ + hov 2 (str "else " ++ + hov 2 (pp_expr (expr_needs_par els) env [] els))) + | _ -> raise Not_found + and pp_one_pat env i (r,ids,t) = let ids,env' = push_vars (List.rev ids) env in let expr = pp_expr (expr_needs_par t) env' [] t in @@ -330,33 +310,45 @@ and pp_one_pat env i (r,ids,t) = let projs = find_projections i in pp_record_pat (projs, List.rev_map pr_id ids), expr with NoRecord -> - let args = - if ids = [] then (mt ()) - else str " " ++ pp_boxed_tuple pr_id (List.rev ids) in - pp_global r ++ args, expr + (match List.rev ids with + | [i1;i2] when is_infix r -> + pr_id i1 ++ str " " ++ str (get_infix r) ++ str " " ++ pr_id i2 + | [] -> pp_global Cons r + | ids -> pp_global Cons r ++ str " " ++ pp_boxed_tuple pr_id ids), + expr -and pp_pat env i pv = - prvect_with_sep (fun () -> (fnl () ++ str " | ")) - (fun x -> let s1,s2 = pp_one_pat env i x in - hov 2 (s1 ++ str " ->" ++ spc () ++ s2)) pv - -and pp_function env f t = +and pp_pat env (info,factors) pv = + prvecti + (fun i x -> if List.mem i factors then mt () else + let s1,s2 = pp_one_pat env info x in + hov 2 (s1 ++ str " ->" ++ spc () ++ s2) ++ + (if factors = [] && i = Array.length pv-1 then mt () + else fnl () ++ str " | ")) pv + ++ + match factors with + | [] -> mt () + | i::_ -> + let (_,ids,t) = pv.(i) in + let t = ast_lift (-List.length ids) t in + hov 2 (str "_ ->" ++ spc () ++ pp_expr (expr_needs_par t) env [] t) + +and pp_function env t = let bl,t' = collect_lams t in let bl,env' = push_vars bl env in match t' with - | MLcase(i,MLrel 1,pv) when i=Standard -> + | MLcase(i,MLrel 1,pv) when fst i=Standard -> if not (ast_occurs 1 (MLcase(i,MLdummy,pv))) then - (f ++ pr_binding (List.rev (List.tl bl)) ++ - str " = function" ++ fnl () ++ - v 0 (str " | " ++ pp_pat env' i pv)) + pr_binding (List.rev (List.tl bl)) ++ + str " = function" ++ fnl () ++ + v 0 (str " | " ++ pp_pat env' i pv) else - (f ++ pr_binding (List.rev bl) ++ - str " = match " ++ - pr_id (List.hd bl) ++ str " with" ++ fnl () ++ - v 0 (str " | " ++ pp_pat env' i pv)) - | _ -> (f ++ pr_binding (List.rev bl) ++ - str " =" ++ fnl () ++ str " " ++ - hov 2 (pp_expr false env' [] t')) + pr_binding (List.rev bl) ++ + str " = match " ++ pr_id (List.hd bl) ++ str " with" ++ fnl () ++ + v 0 (str " | " ++ pp_pat env' i pv) + | _ -> + pr_binding (List.rev bl) ++ + str " =" ++ fnl () ++ str " " ++ + hov 2 (pp_expr false env' [] t') (*s names of the functions ([ids]) are already pushed in [env], and passed here just for convenience. *) @@ -366,93 +358,111 @@ and pp_fix par env i (ids,bl) args = (v 0 (str "let rec " ++ prvect_with_sep (fun () -> fnl () ++ str "and ") - (fun (fi,ti) -> pp_function env (pr_id fi) ti) + (fun (fi,ti) -> pr_id fi ++ pp_function env ti) (array_map2 (fun id b -> (id,b)) ids bl) ++ fnl () ++ hov 2 (str "in " ++ pp_apply (pr_id ids.(i)) false args))) let pp_val e typ = - str "(** val " ++ e ++ str " : " ++ pp_type false [] typ ++ - str " **)" ++ fnl2 () + hov 4 (str "(** val " ++ e ++ str " :" ++ spc () ++ pp_type false [] typ ++ + str " **)") ++ fnl2 () (*s Pretty-printing of [Dfix] *) -let rec pp_Dfix init i ((rv,c,t) as fix) = - if i >= Array.length rv then mt () - else - if is_inline_custom rv.(i) then pp_Dfix init (i+1) fix +let pp_Dfix (rv,c,t) = + let names = Array.map + (fun r -> if is_inline_custom r then mt () else pp_global Term r) rv + in + let rec pp sep letand i = + if i >= Array.length rv then mt () + else if is_inline_custom rv.(i) then pp sep letand (i+1) else - let e = pp_global rv.(i) in - (if init then mt () else fnl2 ()) ++ - pp_val e t.(i) ++ - str (if init then "let rec " else "and ") ++ - (if is_custom rv.(i) then e ++ str " = " ++ str (find_custom rv.(i)) - else pp_function (empty_env ()) e c.(i)) ++ - pp_Dfix false (i+1) fix - + let def = + if is_custom rv.(i) then str " = " ++ str (find_custom rv.(i)) + else pp_function (empty_env ()) c.(i) + in + sep () ++ pp_val names.(i) t.(i) ++ + str letand ++ names.(i) ++ def ++ pp fnl2 "and " (i+1) + in pp mt "let rec " 0 + (*s Pretty-printing of inductive types declaration. *) -let pp_equiv param_list = function - | None -> mt () - | Some ip_equiv -> - str " = " ++ pp_parameters param_list ++ pp_global (IndRef ip_equiv) +let pp_equiv param_list name = function + | NoEquiv, _ -> mt () + | Equiv kn, i -> + str " = " ++ pp_parameters param_list ++ pp_global Type (IndRef (kn,i)) + | RenEquiv ren, _ -> + str " = " ++ pp_parameters param_list ++ str (ren^".") ++ name let pp_comment s = str "(* " ++ s ++ str " *)" -let pp_one_ind prefix ip ip_equiv pl cv = +let pp_one_ind prefix ip_equiv pl name cnames ctyps = let pl = rename_tvars keywords pl in - let pp_constructor (r,l) = - hov 2 (str " | " ++ pp_global r ++ - match l with - | [] -> mt () - | _ -> (str " of " ++ - prlist_with_sep - (fun () -> spc () ++ str "* ") (pp_type true pl) l)) + let pp_constructor i typs = + (if i=0 then mt () else fnl ()) ++ + hov 5 (str " | " ++ cnames.(i) ++ + (if typs = [] then mt () else str " of ") ++ + prlist_with_sep + (fun () -> spc () ++ str "* ") (pp_type true pl) typs) in - pp_parameters pl ++ str prefix ++ pp_global (IndRef ip) ++ - pp_equiv pl ip_equiv ++ str " =" ++ - if Array.length cv = 0 then str " unit (* empty inductive *)" - else fnl () ++ v 0 (prvect_with_sep fnl pp_constructor - (Array.mapi (fun i c -> ConstructRef (ip,i+1), c) cv)) + pp_parameters pl ++ str prefix ++ name ++ + pp_equiv pl name ip_equiv ++ str " =" ++ + if Array.length ctyps = 0 then str " unit (* empty inductive *)" + else fnl () ++ v 0 (prvecti pp_constructor ctyps) let pp_logical_ind packet = pp_comment (pr_id packet.ip_typename ++ str " : logical inductive") ++ - fnl () ++ pp_comment (str "with constructors : " ++ - prvect_with_sep spc pr_id packet.ip_consnames) + fnl () ++ + pp_comment (str "with constructors : " ++ + prvect_with_sep spc pr_id packet.ip_consnames) ++ + fnl () let pp_singleton kn packet = + let name = pp_global Type (IndRef (kn,0)) in let l = rename_tvars keywords packet.ip_vars in - hov 2 (str "type " ++ pp_parameters l ++ - pp_global (IndRef (kn,0)) ++ str " =" ++ spc () ++ + hov 2 (str "type " ++ pp_parameters l ++ name ++ str " =" ++ spc () ++ pp_type false l (List.hd packet.ip_types.(0)) ++ fnl () ++ pp_comment (str "singleton inductive, whose constructor was " ++ pr_id packet.ip_consnames.(0))) let pp_record kn projs ip_equiv packet = - let l = List.combine projs packet.ip_types.(0) in + let name = pp_global Type (IndRef (kn,0)) in + let projnames = List.map (pp_global Term) projs in + let l = List.combine projnames packet.ip_types.(0) in let pl = rename_tvars keywords packet.ip_vars in - str "type " ++ pp_parameters pl ++ pp_global (IndRef (kn,0)) ++ - pp_equiv pl ip_equiv ++ str " = { "++ + str "type " ++ pp_parameters pl ++ name ++ + pp_equiv pl name ip_equiv ++ str " = { "++ hov 0 (prlist_with_sep (fun () -> str ";" ++ spc ()) - (fun (r,t) -> pp_global r ++ str " : " ++ pp_type true pl t) l) + (fun (p,t) -> p ++ str " : " ++ pp_type true pl t) l) ++ str " }" -let pp_coind ip pl = - let r = IndRef ip in +let pp_coind pl name = let pl = rename_tvars keywords pl in - pp_parameters pl ++ pp_global r ++ str " = " ++ - pp_parameters pl ++ str "__" ++ pp_global r ++ str " Lazy.t" ++ + pp_parameters pl ++ name ++ str " = " ++ + pp_parameters pl ++ str "__" ++ name ++ str " Lazy.t" ++ fnl() ++ str "and " let pp_ind co kn ind = let prefix = if co then "__" else "" in let some = ref false in let init= ref (str "type ") in + let names = + Array.mapi (fun i p -> if p.ip_logical then mt () else + pp_global Type (IndRef (kn,i))) + ind.ind_packets + in + let cnames = + Array.mapi + (fun i p -> if p.ip_logical then [||] else + Array.mapi (fun j _ -> pp_global Cons (ConstructRef ((kn,i),j+1))) + p.ip_types) + ind.ind_packets + in let rec pp i = if i >= Array.length ind.ind_packets then mt () else let ip = (kn,i) in - let ip_equiv = option_map (fun kn -> (kn,i)) ind.ind_equiv in + let ip_equiv = ind.ind_equiv, 0 in let p = ind.ind_packets.(i) in if is_custom (IndRef ip) then pp (i+1) else begin @@ -463,8 +473,9 @@ let pp_ind co kn ind = begin init := (fnl () ++ str "and "); s ++ - (if co then pp_coind ip p.ip_vars else mt ()) - ++ pp_one_ind prefix ip ip_equiv p.ip_vars p.ip_types ++ + (if co then pp_coind p.ip_vars names.(i) else mt ()) ++ + pp_one_ind + prefix ip_equiv p.ip_vars names.(i) cnames.(i) p.ip_types ++ pp (i+1) end end @@ -479,159 +490,248 @@ let pp_mind kn i = | Singleton -> pp_singleton kn i.ind_packets.(0) | Coinductive -> pp_ind true kn i | Record projs -> - let ip_equiv = option_map (fun kn -> (kn,0)) i.ind_equiv in - pp_record kn projs ip_equiv i.ind_packets.(0) + pp_record kn projs (i.ind_equiv,0) i.ind_packets.(0) | Standard -> pp_ind false kn i -let pp_decl mpl = - local_mpl := mpl; - function +let pp_decl = function + | Dtype (r,_,_) when is_inline_custom r -> failwith "empty phrase" + | Dterm (r,_,_) when is_inline_custom r -> failwith "empty phrase" | Dind (kn,i) -> pp_mind kn i - | Dtype (r, l, t) -> - if is_inline_custom r then failwith "empty phrase" - else - let pp_r = pp_global r in - let l = rename_tvars keywords l in - let ids, def = try + | Dtype (r, l, t) -> + let name = pp_global Type r in + let l = rename_tvars keywords l in + let ids, def = + try let ids,s = find_type_custom r in pp_string_parameters ids, str "=" ++ spc () ++ str s - with not_found -> + with Not_found -> pp_parameters l, if t = Taxiom then str "(* AXIOM TO BE REALIZED *)" else str "=" ++ spc () ++ pp_type false l t - in - hov 2 (str "type" ++ spc () ++ ids ++ pp_r ++ - spc () ++ def) + in + hov 2 (str "type " ++ ids ++ name ++ spc () ++ def) | Dterm (r, a, t) -> - if is_inline_custom r then failwith "empty phrase" - else - let e = pp_global r in - pp_val e t ++ - hov 0 - (str "let " ++ - if is_custom r then - e ++ str " = " ++ str (find_custom r) - else if is_projection r then - let s = prvecti (fun _ -> str) - (Array.make (projection_arity r) " _") in - e ++ s ++ str " x = x." ++ e - else pp_function (empty_env ()) e a) + let def = + if is_custom r then str (" = " ^ find_custom r) + else if is_projection r then + (prvect str (Array.make (projection_arity r) " _")) ++ + str " x = x." + else pp_function (empty_env ()) a + in + let name = pp_global Term r in + let postdef = if is_projection r then name else mt () in + pp_val name t ++ hov 0 (str "let " ++ name ++ def ++ postdef) | Dfix (rv,defs,typs) -> - pp_Dfix true 0 (rv,defs,typs) - -let pp_spec mpl = - local_mpl := mpl; - function - | Sind (kn,i) -> pp_mind kn i - | Sval (r,t) -> - if is_inline_custom r then failwith "empty phrase" - else - hov 2 (str "val" ++ spc () ++ pp_global r ++ str " :" ++ spc () ++ - pp_type false [] t) - | Stype (r,vl,ot) -> - if is_inline_custom r then failwith "empty phrase" - else - let l = rename_tvars keywords vl in - let ids, def = - try - let ids, s = find_type_custom r in - pp_string_parameters ids, str "= " ++ str s - with not_found -> - let ids = pp_parameters l in - match ot with - | None -> ids, mt () - | Some Taxiom -> ids, str "(* AXIOM TO BE REALIZED *)" - | Some t -> ids, str "=" ++ spc () ++ pp_type false l t - in - hov 2 (str "type" ++ spc () ++ ids ++ pp_global r ++ spc () ++ def) - -let rec pp_specif mpl = function - | (_,Spec s) -> pp_spec mpl s + pp_Dfix (rv,defs,typs) + +let pp_alias_decl ren = function + | Dind (kn,i) -> pp_mind kn { i with ind_equiv = RenEquiv ren } + | Dtype (r, l, _) -> + let name = pp_global Type r in + let l = rename_tvars keywords l in + let ids = pp_parameters l in + hov 2 (str "type " ++ ids ++ name ++ str " =" ++ spc () ++ ids ++ + str (ren^".") ++ name) + | Dterm (r, a, t) -> + let name = pp_global Term r in + hov 2 (str "let " ++ name ++ str (" = "^ren^".") ++ name) + | Dfix (rv, _, _) -> + prvecti (fun i r -> if is_inline_custom r then mt () else + let name = pp_global Term r in + hov 2 (str "let " ++ name ++ str (" = "^ren^".") ++ name) ++ + fnl ()) + rv + +let pp_spec = function + | Sval (r,_) when is_inline_custom r -> failwith "empty phrase" + | Stype (r,_,_) when is_inline_custom r -> failwith "empty phrase" + | Sind (kn,i) -> pp_mind kn i + | Sval (r,t) -> + let def = pp_type false [] t in + let name = pp_global Term r in + hov 2 (str "val " ++ name ++ str " :" ++ spc () ++ def) + | Stype (r,vl,ot) -> + let name = pp_global Type r in + let l = rename_tvars keywords vl in + let ids, def = + try + let ids, s = find_type_custom r in + pp_string_parameters ids, str "= " ++ str s + with Not_found -> + let ids = pp_parameters l in + match ot with + | None -> ids, mt () + | Some Taxiom -> ids, str "(* AXIOM TO BE REALIZED *)" + | Some t -> ids, str "=" ++ spc () ++ pp_type false l t + in + hov 2 (str "type " ++ ids ++ name ++ spc () ++ def) + +let pp_alias_spec ren = function + | Sind (kn,i) -> pp_mind kn { i with ind_equiv = RenEquiv ren } + | Stype (r,l,_) -> + let name = pp_global Type r in + let l = rename_tvars keywords l in + let ids = pp_parameters l in + hov 2 (str "type " ++ ids ++ name ++ str " =" ++ spc () ++ ids ++ + str (ren^".") ++ name) + | Sval _ -> assert false + +let rec pp_specif = function + | (_,Spec (Sval _ as s)) -> pp_spec s + | (l,Spec s) -> + (try + let ren = Common.check_duplicate (top_visible_mp ()) l in + hov 1 (str ("module "^ren^" : sig ") ++ fnl () ++ pp_spec s) ++ + fnl () ++ str "end" ++ fnl () ++ + pp_alias_spec ren s + with Not_found -> pp_spec s) | (l,Smodule mt) -> - hov 1 - (str "module " ++ - P.pp_module mpl (MPdot (List.hd mpl, l)) ++ - str " : " ++ fnl () ++ pp_module_type mpl None (* (Some l) *) mt) + let def = pp_module_type (Some l) mt in + let def' = pp_module_type (Some l) mt in + let name = pp_modname (MPdot (top_visible_mp (), l)) in + hov 1 (str "module " ++ name ++ str " : " ++ fnl () ++ def) ++ + (try + let ren = Common.check_duplicate (top_visible_mp ()) l in + fnl () ++ hov 1 (str ("module "^ren^" : ") ++ fnl () ++ def') + with Not_found -> Pp.mt ()) | (l,Smodtype mt) -> - hov 1 - (str "module type " ++ - P.pp_module mpl (MPdot (List.hd mpl, l)) ++ - str " = " ++ fnl () ++ pp_module_type mpl None mt) - -and pp_module_type mpl ol = function + let def = pp_module_type None mt in + let name = pp_modname (MPdot (top_visible_mp (), l)) in + hov 1 (str "module type " ++ name ++ str " = " ++ fnl () ++ def) ++ + (try + let ren = Common.check_duplicate (top_visible_mp ()) l in + fnl () ++ str ("module type "^ren^" = ") ++ name + with Not_found -> Pp.mt ()) + +and pp_module_type ol = function | MTident kn -> - let mp,_,l = repr_kn kn in P.pp_module mpl (MPdot (mp,l)) + pp_modname kn | MTfunsig (mbid, mt, mt') -> - str "functor (" ++ - P.pp_module mpl (MPbound mbid) ++ - str ":" ++ - pp_module_type mpl None mt ++ - str ") ->" ++ fnl () ++ - pp_module_type mpl None mt' + let name = pp_modname (MPbound mbid) in + let typ = pp_module_type None mt in + let def = pp_module_type None mt' in + str "functor (" ++ name ++ str ":" ++ typ ++ str ") ->" ++ fnl () ++ def | MTsig (msid, sign) -> - let mpl = match ol, mpl with - | None, _ -> (MPself msid) :: mpl - | Some l, mp :: mpl -> (MPdot (mp,l)) :: mpl - | _ -> assert false - in - let l = map_succeed (pp_specif mpl) sign in + let tvm = top_visible_mp () in + Option.iter (fun l -> add_subst msid (MPdot (tvm, l))) ol; + let mp = MPself msid in + push_visible mp; + let l = map_succeed pp_specif sign in + pop_visible (); str "sig " ++ fnl () ++ v 1 (str " " ++ prlist_with_sep fnl2 identity l) ++ - fnl () ++ str "end" - + fnl () ++ str "end" + | MTwith(mt,ML_With_type(idl,vl,typ)) -> + let l = rename_tvars keywords vl in + let ids = pp_parameters l in + let mp_mt = msid_of_mt mt in + let mp = make_mp_with mp_mt idl in + let gr = ConstRef ( + (make_con mp empty_dirpath + (label_of_id ( + List.hd (List.rev idl))))) in + push_visible mp_mt; + let s = pp_module_type None mt ++ + str " with type " ++ + pp_global Type gr ++ + ids in + pop_visible(); + s ++ str "=" ++ spc () ++ + pp_type false vl typ + | MTwith(mt,ML_With_module(idl,mp)) -> + let mp_mt=msid_of_mt mt in + push_visible mp_mt; + let s = + pp_module_type None mt ++ + str " with module " ++ + (pp_modname + (List.fold_left (fun mp id -> MPdot(mp,label_of_id id)) + mp_mt idl)) + ++ str " = " + in + pop_visible (); + s ++ (pp_modname mp) + + let is_short = function MEident _ | MEapply _ -> true | _ -> false - -let rec pp_structure_elem mpl = function - | (_,SEdecl d) -> pp_decl mpl d + +let rec pp_structure_elem = function + | (l,SEdecl d) -> + (try + let ren = Common.check_duplicate (top_visible_mp ()) l in + hov 1 (str ("module "^ren^" = struct ") ++ fnl () ++ pp_decl d) ++ + fnl () ++ str "end" ++ fnl () ++ + pp_alias_decl ren d + with Not_found -> pp_decl d) | (l,SEmodule m) -> + let def = pp_module_expr (Some l) m.ml_mod_expr in + let name = pp_modname (MPdot (top_visible_mp (), l)) in hov 1 - (str "module " ++ P.pp_module mpl (MPdot (List.hd mpl, l)) ++ - (*i if you want signatures everywhere: i*) - (*i str " :" ++ fnl () ++ i*) - (*i pp_module_type mpl None m.ml_mod_type ++ fnl () ++ i*) - str " = " ++ - (if (is_short m.ml_mod_expr) then mt () else fnl ()) ++ - pp_module_expr mpl (Some l) m.ml_mod_expr) + (str "module " ++ name ++ str " = " ++ + (if (is_short m.ml_mod_expr) then mt () else fnl ()) ++ def) ++ + (try + let ren = Common.check_duplicate (top_visible_mp ()) l in + fnl () ++ str ("module "^ren^" = ") ++ name + with Not_found -> mt ()) | (l,SEmodtype m) -> - hov 1 - (str "module type " ++ P.pp_module mpl (MPdot (List.hd mpl, l)) ++ - str " = " ++ fnl () ++ pp_module_type mpl None m) - -and pp_module_expr mpl ol = function - | MEident mp' -> P.pp_module mpl mp' + let def = pp_module_type None m in + let name = pp_modname (MPdot (top_visible_mp (), l)) in + hov 1 (str "module type " ++ name ++ str " = " ++ fnl () ++ def) ++ + (try + let ren = Common.check_duplicate (top_visible_mp ()) l in + fnl () ++ str ("module type "^ren^" = ") ++ name + with Not_found -> mt ()) + +and pp_module_expr ol = function + | MEident mp' -> pp_modname mp' | MEfunctor (mbid, mt, me) -> - str "functor (" ++ - P.pp_module mpl (MPbound mbid) ++ - str ":" ++ - pp_module_type mpl None mt ++ - str ") ->" ++ fnl () ++ - pp_module_expr mpl None me + let name = pp_modname (MPbound mbid) in + let typ = pp_module_type None mt in + let def = pp_module_expr None me in + str "functor (" ++ name ++ str ":" ++ typ ++ str ") ->" ++ fnl () ++ def | MEapply (me, me') -> - pp_module_expr mpl None me ++ str "(" ++ - pp_module_expr mpl None me' ++ str ")" + pp_module_expr None me ++ str "(" ++ pp_module_expr None me' ++ str ")" | MEstruct (msid, sel) -> - let mpl = match ol, mpl with - | None, _ -> (MPself msid) :: mpl - | Some l, mp :: mpl -> (MPdot (mp,l)) :: mpl - | _ -> assert false - in - let l = map_succeed (pp_structure_elem mpl) sel in + let tvm = top_visible_mp () in + let mp = match ol with None -> MPself msid | Some l -> MPdot (tvm,l) in + push_visible mp; + let l = map_succeed pp_structure_elem sel in + pop_visible (); str "struct " ++ fnl () ++ v 1 (str " " ++ prlist_with_sep fnl2 identity l) ++ fnl () ++ str "end" let pp_struct s = - let pp mp s = pp_structure_elem [mp] s ++ fnl2 () in - prlist (fun (mp,sel) -> prlist identity (map_succeed (pp mp) sel)) s + let pp mp s = + push_visible mp; + let p = pp_structure_elem s ++ fnl2 () in + pop_visible (); p + in + prlist_strict + (fun (mp,sel) -> prlist_strict identity (map_succeed (pp mp) sel)) s let pp_signature s = - let pp mp s = pp_specif [mp] s ++ fnl2 () in - prlist (fun (mp,sign) -> prlist identity (map_succeed (pp mp) sign)) s - -let pp_decl mpl d = - try pp_decl mpl d with Failure "empty phrase" -> mt () - -end - + let pp mp s = + push_visible mp; + let p = pp_specif s ++ fnl2 () in + pop_visible (); p + in + prlist_strict + (fun (mp,sign) -> prlist_strict identity (map_succeed (pp mp) sign)) s + +let pp_decl d = + try pp_decl d with Failure "empty phrase" -> mt () + +let ocaml_descr = { + keywords = keywords; + file_suffix = ".ml"; + capital_file = false; + preamble = preamble; + pp_struct = pp_struct; + sig_suffix = Some ".mli"; + sig_preamble = sig_preamble; + pp_sig = pp_signature; + pp_decl = pp_decl; +} diff --git a/contrib/extraction/ocaml.mli b/contrib/extraction/ocaml.mli index 8c521ccd..3d90e74c 100644 --- a/contrib/extraction/ocaml.mli +++ b/contrib/extraction/ocaml.mli @@ -6,49 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: ocaml.mli 7632 2005-12-01 14:35:21Z letouzey $ i*) - -(*s Some utility functions to be reused in module [Haskell]. *) - -open Pp -open Names -open Libnames -open Miniml - -val pp_par : bool -> std_ppcmds -> std_ppcmds -val pp_abst : identifier list -> std_ppcmds -val pp_apply : std_ppcmds -> bool -> std_ppcmds list -> std_ppcmds -val pr_binding : identifier list -> std_ppcmds - -val rename_id : identifier -> Idset.t -> identifier - -val lowercase_id : identifier -> identifier -val uppercase_id : identifier -> identifier - -val pr_upper_id : identifier -> std_ppcmds - -type env = identifier list * Idset.t - -val rename_vars: Idset.t -> identifier list -> env -val rename_tvars: Idset.t -> identifier list -> identifier list -val push_vars : identifier list -> env -> identifier list * env -val get_db_name : int -> env -> identifier - -val keywords : Idset.t - -val preamble : - extraction_params -> module_path list -> bool*bool*bool -> bool -> std_ppcmds - -val preamble_sig : - extraction_params -> module_path list -> bool*bool*bool -> std_ppcmds - -(*s Production of Ocaml syntax. We export both a functor to be used for - extraction in the Coq toplevel and a function to extract some - declarations to a file. *) - -module Make : functor(P : Mlpp_param) -> Mlpp - - - +(*i $Id: ocaml.mli 10232 2007-10-17 12:32:10Z letouzey $ i*) +val ocaml_descr : Miniml.language_descr diff --git a/contrib/extraction/scheme.ml b/contrib/extraction/scheme.ml index 7004a202..600f64db 100644 --- a/contrib/extraction/scheme.ml +++ b/contrib/extraction/scheme.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: scheme.ml 7651 2005-12-16 03:19:20Z letouzey $ i*) +(*i $Id: scheme.ml 10233 2007-10-17 23:29:08Z letouzey $ i*) (*s Production of Scheme syntax. *) @@ -18,7 +18,7 @@ open Libnames open Miniml open Mlutil open Table -open Ocaml +open Common (*s Scheme renaming issues. *) @@ -29,17 +29,11 @@ let keywords = "error"; "delay"; "force"; "_"; "__"] Idset.empty -let preamble _ _ (mldummy,_,_) _ = - str ";; This extracted scheme code relies on some additional macros" ++ - fnl () ++ - str ";; available at http://www.pps.jussieu.fr/~letouzey/scheme" ++ - fnl () ++ - str "(load \"macros_extr.scm\")" ++ - fnl () ++ fnl () ++ - (if mldummy then - str "(define __ (lambda (_) __))" - ++ fnl () ++ fnl() - else mt ()) +let preamble _ _ usf = + str ";; This extracted scheme code relies on some additional macros\n" ++ + str ";; available at http://www.pps.jussieu.fr/~letouzey/scheme\n" ++ + str "(load \"macros_extr.scm\")\n\n" ++ + (if usf.mldummy then str "(define __ (lambda (_) __))\n\n" else mt ()) let pr_id id = let s = string_of_id id in @@ -60,14 +54,11 @@ let pp_apply st _ = function | [] -> st | [a] -> hov 2 (paren (st ++ spc () ++ a)) | args -> hov 2 (paren (str "@ " ++ st ++ - (prlist (fun x -> spc () ++ x) args))) + (prlist_strict (fun x -> spc () ++ x) args))) -(*s The pretty-printing functor. *) +(*s The pretty-printer for Scheme syntax *) -module Make = functor(P : Mlpp_param) -> struct - -let pp_global r = P.pp_global [initial_path] r -let empty_env () = [], P.globals() +let pp_global k r = str (Common.pp_global k r) (*s Pretty-printing of expressions. *) @@ -95,17 +86,17 @@ let rec pp_expr env args = (pr_id (List.hd i) ++ spc () ++ pp_expr env [] a1)) ++ spc () ++ hov 0 (pp_expr env' [] a2))))) | MLglob r -> - apply (pp_global r) + apply (pp_global Term r) | MLcons (i,r,args') -> assert (args=[]); let st = str "`" ++ - paren (pp_global r ++ + paren (pp_global Cons r ++ (if args' = [] then mt () else spc ()) ++ prlist_with_sep spc (pp_cons_args env) args') in if i = Coinductive then paren (str "delay " ++ st) else st - | MLcase (i,t, pv) -> + | MLcase ((i,_),t, pv) -> let e = if i <> Coinductive then pp_expr env [] t else paren (str "force" ++ spc () ++ pp_expr env [] t) @@ -125,7 +116,7 @@ let rec pp_expr env args = and pp_cons_args env = function | MLcons (i,r,args) when i<>Coinductive -> - paren (pp_global r ++ + paren (pp_global Cons r ++ (if args = [] then mt () else spc ()) ++ prlist_with_sep spc (pp_cons_args env) args) | e -> str "," ++ pp_expr env [] e @@ -137,7 +128,7 @@ and pp_one_pat env (r,ids,t) = if ids = [] then mt () else (str " " ++ prlist_with_sep spc pr_id (List.rev ids)) in - (pp_global r ++ args), (pp_expr env' [] t) + (pp_global Cons r ++ args), (pp_expr env' [] t) and pp_pat env pv = prvect_with_sep fnl @@ -160,11 +151,11 @@ and pp_fix env j (ids,bl) args = (*s Pretty-printing of a declaration. *) -let pp_decl _ = function +let pp_decl = function | Dind _ -> mt () | Dtype _ -> mt () | Dfix (rv, defs,_) -> - let ppv = Array.map pp_global rv in + let ppv = Array.map (pp_global Term) rv in prvect_with_sep fnl (fun (pi,ti) -> hov 2 @@ -177,23 +168,35 @@ let pp_decl _ = function if is_inline_custom r then mt () else if is_custom r then - hov 2 (paren (str "define " ++ pp_global r ++ spc () ++ + hov 2 (paren (str "define " ++ pp_global Term r ++ spc () ++ str (find_custom r))) ++ fnl () ++ fnl () else - hov 2 (paren (str "define " ++ pp_global r ++ spc () ++ + hov 2 (paren (str "define " ++ pp_global Term r ++ spc () ++ pp_expr (empty_env ()) [] a)) ++ fnl () ++ fnl () -let pp_structure_elem mp = function - | (l,SEdecl d) -> pp_decl mp d +let pp_structure_elem = function + | (l,SEdecl d) -> pp_decl d | (l,SEmodule m) -> failwith "TODO: Scheme extraction of modules not implemented yet" | (l,SEmodtype m) -> failwith "TODO: Scheme extraction of modules not implemented yet" let pp_struct = - prlist (fun (mp,sel) -> prlist (pp_structure_elem mp) sel) - -let pp_signature s = assert false - -end - + let pp_sel (mp,sel) = + push_visible mp; + let p = prlist_strict pp_structure_elem sel in + pop_visible (); p + in + prlist_strict pp_sel + +let scheme_descr = { + keywords = keywords; + file_suffix = ".scm"; + capital_file = false; + preamble = preamble; + pp_struct = pp_struct; + sig_suffix = None; + sig_preamble = (fun _ _ _ -> mt ()); + pp_sig = (fun _ -> mt ()); + pp_decl = pp_decl; +} diff --git a/contrib/extraction/scheme.mli b/contrib/extraction/scheme.mli index ef4a3a63..a88bb6db 100644 --- a/contrib/extraction/scheme.mli +++ b/contrib/extraction/scheme.mli @@ -6,22 +6,6 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: scheme.mli 7632 2005-12-01 14:35:21Z letouzey $ i*) - -(*s Some utility functions to be reused in module [Haskell]. *) - -open Pp -open Miniml -open Names - -val keywords : Idset.t - -val preamble : - extraction_params -> module_path list -> bool*bool*bool -> bool -> std_ppcmds - -module Make : functor(P : Mlpp_param) -> Mlpp - - - - +(*i $Id: scheme.mli 10232 2007-10-17 12:32:10Z letouzey $ i*) +val scheme_descr : Miniml.language_descr diff --git a/contrib/extraction/table.ml b/contrib/extraction/table.ml index 6d39faee..abf461c1 100644 --- a/contrib/extraction/table.ml +++ b/contrib/extraction/table.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: table.ml 10209 2007-10-09 21:49:37Z letouzey $ i*) +(*i $Id: table.ml 10348 2007-12-06 17:36:14Z aspiwack $ i*) open Names open Term @@ -20,37 +20,49 @@ open Util open Pp open Miniml -(*S Utilities concerning [module_path] and [kernel_names] *) +(*S Utilities about [module_path] and [kernel_names] and [global_reference] *) -let occur_kn_in_ref kn = - function +let occur_kn_in_ref kn = function | IndRef (kn',_) | ConstructRef ((kn',_),_) -> kn = kn' | ConstRef _ -> false | VarRef _ -> assert false - -let modpath_of_r r = match r with - | ConstRef kn -> con_modpath kn - | IndRef (kn,_) - | ConstructRef ((kn,_),_) -> modpath kn - | VarRef _ -> assert false - -let label_of_r r = match r with - | ConstRef kn -> con_label kn - | IndRef (kn,_) - | ConstructRef ((kn,_),_) -> label kn - | VarRef _ -> assert false - -let current_toplevel () = fst (Lib.current_prefix ()) + +let modpath_of_r = function + | ConstRef kn -> con_modpath kn + | IndRef (kn,_) + | ConstructRef ((kn,_),_) -> modpath kn + | VarRef _ -> assert false + +let label_of_r = function + | ConstRef kn -> con_label kn + | IndRef (kn,_) + | ConstructRef ((kn,_),_) -> label kn + | VarRef _ -> assert false let rec base_mp = function | MPdot (mp,l) -> base_mp mp | mp -> mp +let rec mp_length = function + | MPdot (mp, _) -> 1 + (mp_length mp) + | _ -> 1 + let is_modfile = function | MPfile _ -> true | _ -> false +let string_of_modfile = function + | MPfile f -> String.capitalize (string_of_id (List.hd (repr_dirpath f))) + | _ -> assert false + +let rec modfile_of_mp = function + | (MPfile _) as mp -> mp + | MPdot (mp,_) -> modfile_of_mp mp + | _ -> raise Not_found + +let current_toplevel () = fst (Lib.current_prefix ()) + let is_toplevel mp = mp = initial_path || mp = current_toplevel () @@ -60,8 +72,56 @@ let at_toplevel mp = let visible_kn kn = at_toplevel (base_mp (modpath kn)) let visible_con kn = at_toplevel (base_mp (con_modpath kn)) +let rec prefixes_mp mp = match mp with + | MPdot (mp',_) -> MPset.add mp (prefixes_mp mp') + | _ -> MPset.singleton mp + +let rec get_nth_label_mp n mp = match mp with + | MPdot (mp,l) -> if n=1 then l else get_nth_label_mp (n-1) mp + | _ -> failwith "get_nth_label: not enough MPdot" + +let get_nth_label n r = + if n=0 then label_of_r r else get_nth_label_mp n (modpath_of_r r) + +let rec common_prefix prefixes_mp1 mp2 = + if MPset.mem mp2 prefixes_mp1 then mp2 + else match mp2 with + | MPdot (mp,_) -> common_prefix prefixes_mp1 mp + | _ -> raise Not_found + +let common_prefix_from_list mp0 mpl = + let prefixes_mp0 = prefixes_mp mp0 in + let rec f = function + | [] -> raise Not_found + | mp1 :: l -> try common_prefix prefixes_mp0 mp1 with Not_found -> f l + in f mpl + +let rec parse_labels ll = function + | MPdot (mp,l) -> parse_labels (l::ll) mp + | mp -> mp,ll + +let labels_of_mp mp = parse_labels [] mp + +let labels_of_ref r = + let mp,_,l = + match r with + ConstRef con -> repr_con con + | IndRef (kn,_) + | ConstructRef ((kn,_),_) -> repr_kn kn + | VarRef _ -> assert false + in + parse_labels [l] mp + +let rec add_labels_mp mp = function + | [] -> mp + | l :: ll -> add_labels_mp (MPdot (mp,l)) ll + + (*S The main tables: constants, inductives, records, ... *) +(* Theses tables are not registered within coq save/undo mechanism + since we reset their contents at each run of Extraction *) + (*s Constants tables. *) let terms = ref (Cmap.empty : ml_decl Cmap.t) @@ -109,11 +169,26 @@ let add_projection n kn = projs := Refmap.add (ConstRef kn) n !projs let is_projection r = Refmap.mem r !projs let projection_arity r = Refmap.find r !projs +(*s Table of used axioms *) + +let info_axioms = ref Refset.empty +let log_axioms = ref Refset.empty +let init_axioms () = info_axioms := Refset.empty; log_axioms := Refset.empty +let add_info_axiom r = info_axioms := Refset.add r !info_axioms +let add_log_axiom r = log_axioms := Refset.add r !log_axioms + +(*s Extraction mode: modular or monolithic *) + +let modular_ref = ref false + +let set_modular b = modular_ref := b +let modular () = !modular_ref + (*s Tables synchronization. *) let reset_tables () = init_terms (); init_types (); init_inductives (); init_recursors (); - init_projs () + init_projs (); init_axioms () (*s Printing. *) @@ -146,21 +221,34 @@ let pr_long_global r = let err s = errorlabstrm "Extraction" s +let warning_axioms () = + let info_axioms = Refset.elements !info_axioms in + if info_axioms = [] then () + else begin + let s = if List.length info_axioms = 1 then "axiom" else "axioms" in + msg_warning + (str ("The following "^s^" must be realized in the extracted code:") + ++ hov 1 (spc () ++ prlist_with_sep spc pr_global info_axioms) + ++ str "." ++ fnl ()) + end; + let log_axioms = Refset.elements !log_axioms in + if log_axioms = [] then () + else begin + let s = if List.length log_axioms = 1 then "axiom was" else "axioms were" + in + msg_warning + (str ("The following logical "^s^" encountered:") ++ + hov 1 (spc () ++ prlist_with_sep spc pr_global log_axioms ++ str ".\n") ++ + str "Having invalid logical axiom in the environment when extracting" ++ + spc () ++ str "may lead to incorrect or non-terminating ML terms." ++ + fnl ()) + end + let error_axiom_scheme r i = err (str "The type scheme axiom " ++ spc () ++ pr_global r ++ spc () ++ str "needs " ++ pr_int i ++ str " type variable(s).") -let warning_info_ax r = - msg_warning (str "You must realize axiom " ++ - pr_global r ++ str " in the extracted code.") - -let warning_log_ax r = - msg_warning (str "This extraction depends on logical axiom" ++ spc () ++ - pr_global r ++ str "." ++ spc() ++ - str "Having false logical axiom in the environment when extracting" ++ - spc () ++ str "may lead to incorrect or non-terminating ML terms.") - let check_inside_module () = if Lib.is_modtype () then err (str "You can't do that within a Module Type." ++ fnl () ++ @@ -186,15 +274,11 @@ let error_nb_cons () = let error_module_clash s = err (str ("There are two Coq modules with ML name " ^ s ^".\n") ++ - str "This is not allowed in ML. Please do some renaming first.") + str "This is not supported yet. Please do some renaming first.") let error_unknown_module m = err (str "Module" ++ spc () ++ pr_qualid m ++ spc () ++ str "not found.") -let error_toplevel () = - err (str "Toplevel pseudo-ML language can be used only at Coq toplevel.\n" ++ - str "You should use Extraction Language Ocaml or Haskell before.") - let error_scheme () = err (str "No Scheme modular extraction available yet.") @@ -203,9 +287,13 @@ let error_not_visible r = str "For example, it may be inside an applied functor." ++ str "Use Recursive Extraction to get the whole environment.") -let error_MPfile_as_mod d = - err (str ("The whole file "^(string_of_dirpath d)^".v is used somewhere as a module.\n"^ - "Extraction cannot currently deal with this situation.\n")) +let error_MPfile_as_mod mp b = + let s1 = if b then "asked" else "required" in + let s2 = if b then "extract some objects of this module or\n" else "" in + err (str ("Extraction of file "^(string_of_modfile mp)^ + ".v as a module is "^s1^".\n"^ + "Monolithic Extraction cannot deal with this situation.\n"^ + "Please "^s2^"use (Recursive) Extraction Library instead.\n")) let error_record r = err (str "Record " ++ pr_global r ++ str " has an anonymous field." ++ fnl () ++ @@ -216,8 +304,16 @@ let check_loaded_modfile mp = match base_mp mp with err (str ("Please load library "^(string_of_dirpath dp^" first."))) | _ -> () +let info_file f = + Flags.if_verbose message + ("The file "^f^" has been created by extraction.") + + (*S The Extraction auxiliary commands *) +(* The objects defined below should survive an arbitrary time, + so we register them to coq save/undo mechanism. *) + (*s Extraction AutoInline *) let auto_inline_ref = ref true @@ -305,7 +401,7 @@ let _ = declare_int_option (*s Extraction Lang *) -type lang = Ocaml | Haskell | Scheme | Toplevel +type lang = Ocaml | Haskell | Scheme let lang_ref = ref Ocaml @@ -327,7 +423,6 @@ let _ = declare_summary "Extraction Lang" let extraction_language x = Lib.add_anonymous_leaf (extr_lang x) - (*s Extraction Inline/NoInline *) let empty_inline_table = (Refset.empty,Refset.empty) diff --git a/contrib/extraction/table.mli b/contrib/extraction/table.mli index c9a4e8da..ca02cb4d 100644 --- a/contrib/extraction/table.mli +++ b/contrib/extraction/table.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: table.mli 10209 2007-10-09 21:49:37Z letouzey $ i*) +(*i $Id: table.mli 10245 2007-10-21 13:41:53Z letouzey $ i*) open Names open Libnames @@ -14,39 +14,49 @@ open Miniml open Declarations val id_of_global : global_reference -> identifier +val pr_long_global : global_reference -> Pp.std_ppcmds + (*s Warning and Error messages. *) +val warning_axioms : unit -> unit val error_axiom_scheme : global_reference -> int -> 'a -val warning_info_ax : global_reference -> unit -val warning_log_ax : global_reference -> unit val error_constant : global_reference -> 'a val error_inductive : global_reference -> 'a val error_nb_cons : unit -> 'a val error_module_clash : string -> 'a val error_unknown_module : qualid -> 'a -val error_toplevel : unit -> 'a val error_scheme : unit -> 'a val error_not_visible : global_reference -> 'a -val error_MPfile_as_mod : dir_path -> 'a +val error_MPfile_as_mod : module_path -> bool -> 'a val error_record : global_reference -> 'a val check_inside_module : unit -> unit val check_inside_section : unit -> unit val check_loaded_modfile : module_path -> unit -(*s utilities concerning [module_path]. *) +val info_file : string -> unit + +(*s utilities about [module_path] and [kernel_names] and [global_reference] *) val occur_kn_in_ref : kernel_name -> global_reference -> bool val modpath_of_r : global_reference -> module_path val label_of_r : global_reference -> label - val current_toplevel : unit -> module_path val base_mp : module_path -> module_path -val is_modfile : module_path -> bool +val is_modfile : module_path -> bool +val string_of_modfile : module_path -> string val is_toplevel : module_path -> bool val at_toplevel : module_path -> bool val visible_kn : kernel_name -> bool val visible_con : constant -> bool +val mp_length : module_path -> int +val prefixes_mp : module_path -> MPset.t +val modfile_of_mp : module_path -> module_path +val common_prefix_from_list : module_path -> module_path list -> module_path +val add_labels_mp : module_path -> label list -> module_path +val get_nth_label_mp : int -> module_path -> label +val get_nth_label : int -> global_reference -> label +val labels_of_ref : global_reference -> module_path * label list (*s Some table-related operations *) @@ -66,6 +76,9 @@ val add_projection : int -> constant -> unit val is_projection : global_reference -> bool val projection_arity : global_reference -> int +val add_info_axiom : global_reference -> unit +val add_log_axiom : global_reference -> unit + val reset_tables : unit -> unit (*s AutoInline parameter *) @@ -95,9 +108,14 @@ val optims : unit -> opt_flag (*s Target language. *) -type lang = Ocaml | Haskell | Scheme | Toplevel +type lang = Ocaml | Haskell | Scheme val lang : unit -> lang +(*s Extraction mode: modular or monolithic *) + +val set_modular : bool -> unit +val modular : unit -> bool + (*s Table for custom inlining *) val to_inline : global_reference -> bool diff --git a/contrib/extraction/test/.depend b/contrib/extraction/test/.depend deleted file mode 100644 index 31d46eeb..00000000 --- a/contrib/extraction/test/.depend +++ /dev/null @@ -1,1136 +0,0 @@ -theories/Arith/arith.cmo: theories/Arith/arith.cmi -theories/Arith/arith.cmx: theories/Arith/arith.cmi -theories/Arith/between.cmo: theories/Arith/between.cmi -theories/Arith/between.cmx: theories/Arith/between.cmi -theories/Arith/bool_nat.cmo: theories/Bool/sumbool.cmi \ - theories/Init/specif.cmi theories/Arith/peano_dec.cmi \ - theories/Init/datatypes.cmi theories/Arith/compare_dec.cmi \ - theories/Arith/bool_nat.cmi -theories/Arith/bool_nat.cmx: theories/Bool/sumbool.cmx \ - theories/Init/specif.cmx theories/Arith/peano_dec.cmx \ - theories/Init/datatypes.cmx theories/Arith/compare_dec.cmx \ - theories/Arith/bool_nat.cmi -theories/Arith/compare_dec.cmo: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/Arith/compare_dec.cmi -theories/Arith/compare_dec.cmx: theories/Init/specif.cmx \ - theories/Init/datatypes.cmx theories/Arith/compare_dec.cmi -theories/Arith/compare.cmo: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/Arith/compare_dec.cmi \ - theories/Arith/compare.cmi -theories/Arith/compare.cmx: theories/Init/specif.cmx \ - theories/Init/datatypes.cmx theories/Arith/compare_dec.cmx \ - theories/Arith/compare.cmi -theories/Arith/div2.cmo: theories/Init/specif.cmi theories/Init/peano.cmi \ - theories/Init/datatypes.cmi theories/Arith/div2.cmi -theories/Arith/div2.cmx: theories/Init/specif.cmx theories/Init/peano.cmx \ - theories/Init/datatypes.cmx theories/Arith/div2.cmi -theories/Arith/eqNat.cmo: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/Arith/eqNat.cmi -theories/Arith/eqNat.cmx: theories/Init/specif.cmx \ - theories/Init/datatypes.cmx theories/Arith/eqNat.cmi -theories/Arith/euclid.cmo: theories/Init/specif.cmi theories/Init/peano.cmi \ - theories/Init/datatypes.cmi theories/Arith/compare_dec.cmi \ - theories/Arith/euclid.cmi -theories/Arith/euclid.cmx: theories/Init/specif.cmx theories/Init/peano.cmx \ - theories/Init/datatypes.cmx theories/Arith/compare_dec.cmx \ - theories/Arith/euclid.cmi -theories/Arith/even.cmo: theories/Init/specif.cmi theories/Init/datatypes.cmi \ - theories/Arith/even.cmi -theories/Arith/even.cmx: theories/Init/specif.cmx theories/Init/datatypes.cmx \ - theories/Arith/even.cmi -theories/Arith/factorial.cmo: theories/Init/peano.cmi \ - theories/Init/datatypes.cmi theories/Arith/factorial.cmi -theories/Arith/factorial.cmx: theories/Init/peano.cmx \ - theories/Init/datatypes.cmx theories/Arith/factorial.cmi -theories/Arith/gt.cmo: theories/Arith/gt.cmi -theories/Arith/gt.cmx: theories/Arith/gt.cmi -theories/Arith/le.cmo: theories/Arith/le.cmi -theories/Arith/le.cmx: theories/Arith/le.cmi -theories/Arith/lt.cmo: theories/Arith/lt.cmi -theories/Arith/lt.cmx: theories/Arith/lt.cmi -theories/Arith/max.cmo: theories/Init/specif.cmi theories/Init/datatypes.cmi \ - theories/Arith/max.cmi -theories/Arith/max.cmx: theories/Init/specif.cmx theories/Init/datatypes.cmx \ - theories/Arith/max.cmi -theories/Arith/min.cmo: theories/Init/specif.cmi theories/Init/datatypes.cmi \ - theories/Arith/min.cmi -theories/Arith/min.cmx: theories/Init/specif.cmx theories/Init/datatypes.cmx \ - theories/Arith/min.cmi -theories/Arith/minus.cmo: theories/Arith/minus.cmi -theories/Arith/minus.cmx: theories/Arith/minus.cmi -theories/Arith/mult.cmo: theories/Arith/plus.cmi theories/Init/datatypes.cmi \ - theories/Arith/mult.cmi -theories/Arith/mult.cmx: theories/Arith/plus.cmx theories/Init/datatypes.cmx \ - theories/Arith/mult.cmi -theories/Arith/peano_dec.cmo: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/Arith/peano_dec.cmi -theories/Arith/peano_dec.cmx: theories/Init/specif.cmx \ - theories/Init/datatypes.cmx theories/Arith/peano_dec.cmi -theories/Arith/plus.cmo: theories/Init/specif.cmi theories/Init/datatypes.cmi \ - theories/Arith/plus.cmi -theories/Arith/plus.cmx: theories/Init/specif.cmx theories/Init/datatypes.cmx \ - theories/Arith/plus.cmi -theories/Arith/wf_nat.cmo: theories/Init/datatypes.cmi \ - theories/Arith/wf_nat.cmi -theories/Arith/wf_nat.cmx: theories/Init/datatypes.cmx \ - theories/Arith/wf_nat.cmi -theories/Bool/boolEq.cmo: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/Bool/boolEq.cmi -theories/Bool/boolEq.cmx: theories/Init/specif.cmx \ - theories/Init/datatypes.cmx theories/Bool/boolEq.cmi -theories/Bool/bool.cmo: theories/Init/specif.cmi theories/Init/datatypes.cmi \ - theories/Bool/bool.cmi -theories/Bool/bool.cmx: theories/Init/specif.cmx theories/Init/datatypes.cmx \ - theories/Bool/bool.cmi -theories/Bool/bvector.cmo: theories/Init/peano.cmi \ - theories/Init/datatypes.cmi theories/Bool/bool.cmi \ - theories/Bool/bvector.cmi -theories/Bool/bvector.cmx: theories/Init/peano.cmx \ - theories/Init/datatypes.cmx theories/Bool/bool.cmx \ - theories/Bool/bvector.cmi -theories/Bool/decBool.cmo: theories/Init/specif.cmi theories/Bool/decBool.cmi -theories/Bool/decBool.cmx: theories/Init/specif.cmx theories/Bool/decBool.cmi -theories/Bool/ifProp.cmo: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/Bool/ifProp.cmi -theories/Bool/ifProp.cmx: theories/Init/specif.cmx \ - theories/Init/datatypes.cmx theories/Bool/ifProp.cmi -theories/Bool/sumbool.cmo: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/Bool/sumbool.cmi -theories/Bool/sumbool.cmx: theories/Init/specif.cmx \ - theories/Init/datatypes.cmx theories/Bool/sumbool.cmi -theories/Bool/zerob.cmo: theories/Init/datatypes.cmi theories/Bool/zerob.cmi -theories/Bool/zerob.cmx: theories/Init/datatypes.cmx theories/Bool/zerob.cmi -theories/FSets/decidableTypeEx.cmo: theories/Init/specif.cmi \ - theories/FSets/orderedTypeEx.cmi theories/FSets/orderedType.cmi \ - theories/Init/datatypes.cmi theories/FSets/decidableTypeEx.cmi -theories/FSets/decidableTypeEx.cmx: theories/Init/specif.cmx \ - theories/FSets/orderedTypeEx.cmx theories/FSets/orderedType.cmx \ - theories/Init/datatypes.cmx theories/FSets/decidableTypeEx.cmi -theories/FSets/decidableType.cmo: theories/Init/specif.cmi \ - theories/FSets/decidableType.cmi -theories/FSets/decidableType.cmx: theories/Init/specif.cmx \ - theories/FSets/decidableType.cmi -theories/FSets/fMapAVL.cmo: theories/Init/wf.cmi theories/Init/specif.cmi \ - theories/FSets/orderedType.cmi theories/Lists/list.cmi \ - theories/FSets/int.cmi theories/FSets/fMapList.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/ZArith/binInt.cmi theories/FSets/fMapAVL.cmi -theories/FSets/fMapAVL.cmx: theories/Init/wf.cmx theories/Init/specif.cmx \ - theories/FSets/orderedType.cmx theories/Lists/list.cmx \ - theories/FSets/int.cmx theories/FSets/fMapList.cmx \ - theories/Init/datatypes.cmx theories/NArith/binPos.cmx \ - theories/ZArith/binInt.cmx theories/FSets/fMapAVL.cmi -theories/FSets/fMapFacts.cmo: theories/Init/specif.cmi \ - theories/FSets/orderedType.cmi theories/FSets/fMapInterface.cmi \ - theories/Init/datatypes.cmi theories/FSets/fMapFacts.cmi -theories/FSets/fMapFacts.cmx: theories/Init/specif.cmx \ - theories/FSets/orderedType.cmx theories/FSets/fMapInterface.cmx \ - theories/Init/datatypes.cmx theories/FSets/fMapFacts.cmi -theories/FSets/fMapInterface.cmo: theories/FSets/orderedType.cmi \ - theories/Lists/list.cmi theories/Init/datatypes.cmi \ - theories/FSets/fMapInterface.cmi -theories/FSets/fMapInterface.cmx: theories/FSets/orderedType.cmx \ - theories/Lists/list.cmx theories/Init/datatypes.cmx \ - theories/FSets/fMapInterface.cmi -theories/FSets/fMapIntMap.cmo: theories/Init/specif.cmi \ - theories/FSets/orderedType.cmi theories/NArith/ndigits.cmi \ - theories/IntMap/mapiter.cmi theories/IntMap/mapcanon.cmi \ - theories/IntMap/map.cmi theories/Lists/list.cmi \ - theories/FSets/fMapList.cmi theories/Init/datatypes.cmi \ - theories/NArith/binNat.cmi theories/FSets/fMapIntMap.cmi -theories/FSets/fMapIntMap.cmx: theories/Init/specif.cmx \ - theories/FSets/orderedType.cmx theories/NArith/ndigits.cmx \ - theories/IntMap/mapiter.cmx theories/IntMap/mapcanon.cmx \ - theories/IntMap/map.cmx theories/Lists/list.cmx \ - theories/FSets/fMapList.cmx theories/Init/datatypes.cmx \ - theories/NArith/binNat.cmx theories/FSets/fMapIntMap.cmi -theories/FSets/fMapList.cmo: theories/Init/specif.cmi \ - theories/FSets/orderedType.cmi theories/Lists/list.cmi \ - theories/Init/datatypes.cmi theories/FSets/fMapList.cmi -theories/FSets/fMapList.cmx: theories/Init/specif.cmx \ - theories/FSets/orderedType.cmx theories/Lists/list.cmx \ - theories/Init/datatypes.cmx theories/FSets/fMapList.cmi -theories/FSets/fMapPositive.cmo: theories/Init/specif.cmi \ - theories/FSets/orderedType.cmi theories/Lists/list.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/FSets/fMapPositive.cmi -theories/FSets/fMapPositive.cmx: theories/Init/specif.cmx \ - theories/FSets/orderedType.cmx theories/Lists/list.cmx \ - theories/Init/datatypes.cmx theories/NArith/binPos.cmx \ - theories/FSets/fMapPositive.cmi -theories/FSets/fMaps.cmo: theories/FSets/fMaps.cmi -theories/FSets/fMaps.cmx: theories/FSets/fMaps.cmi -theories/FSets/fMapWeakFacts.cmo: theories/Init/specif.cmi \ - theories/Lists/list.cmi theories/FSets/fMapWeakInterface.cmi \ - theories/Init/datatypes.cmi theories/FSets/fMapWeakFacts.cmi -theories/FSets/fMapWeakFacts.cmx: theories/Init/specif.cmx \ - theories/Lists/list.cmx theories/FSets/fMapWeakInterface.cmx \ - theories/Init/datatypes.cmx theories/FSets/fMapWeakFacts.cmi -theories/FSets/fMapWeakInterface.cmo: theories/Lists/list.cmi \ - theories/FSets/decidableType.cmi theories/Init/datatypes.cmi \ - theories/FSets/fMapWeakInterface.cmi -theories/FSets/fMapWeakInterface.cmx: theories/Lists/list.cmx \ - theories/FSets/decidableType.cmx theories/Init/datatypes.cmx \ - theories/FSets/fMapWeakInterface.cmi -theories/FSets/fMapWeakList.cmo: theories/Init/specif.cmi \ - theories/Lists/list.cmi theories/FSets/decidableType.cmi \ - theories/Init/datatypes.cmi theories/FSets/fMapWeakList.cmi -theories/FSets/fMapWeakList.cmx: theories/Init/specif.cmx \ - theories/Lists/list.cmx theories/FSets/decidableType.cmx \ - theories/Init/datatypes.cmx theories/FSets/fMapWeakList.cmi -theories/FSets/fMapWeak.cmo: theories/FSets/fMapWeak.cmi -theories/FSets/fMapWeak.cmx: theories/FSets/fMapWeak.cmi -theories/FSets/fSetAVL.cmo: theories/Init/wf.cmi theories/Init/specif.cmi \ - theories/Init/peano.cmi theories/FSets/orderedType.cmi \ - theories/Lists/list.cmi theories/FSets/int.cmi \ - theories/FSets/fSetList.cmi theories/Init/datatypes.cmi \ - theories/NArith/binPos.cmi theories/ZArith/binInt.cmi \ - theories/FSets/fSetAVL.cmi -theories/FSets/fSetAVL.cmx: theories/Init/wf.cmx theories/Init/specif.cmx \ - theories/Init/peano.cmx theories/FSets/orderedType.cmx \ - theories/Lists/list.cmx theories/FSets/int.cmx \ - theories/FSets/fSetList.cmx theories/Init/datatypes.cmx \ - theories/NArith/binPos.cmx theories/ZArith/binInt.cmx \ - theories/FSets/fSetAVL.cmi -theories/FSets/fSetBridge.cmo: theories/Init/specif.cmi \ - theories/FSets/orderedType.cmi theories/Lists/list.cmi \ - theories/FSets/fSetInterface.cmi theories/Init/datatypes.cmi \ - theories/FSets/fSetBridge.cmi -theories/FSets/fSetBridge.cmx: theories/Init/specif.cmx \ - theories/FSets/orderedType.cmx theories/Lists/list.cmx \ - theories/FSets/fSetInterface.cmx theories/Init/datatypes.cmx \ - theories/FSets/fSetBridge.cmi -theories/FSets/fSetEqProperties.cmo: theories/Init/specif.cmi \ - theories/Setoids/setoid.cmi theories/Init/peano.cmi \ - theories/FSets/orderedType.cmi theories/FSets/fSetProperties.cmi \ - theories/FSets/fSetInterface.cmi theories/Init/datatypes.cmi \ - theories/Bool/bool.cmi theories/FSets/fSetEqProperties.cmi -theories/FSets/fSetEqProperties.cmx: theories/Init/specif.cmx \ - theories/Setoids/setoid.cmx theories/Init/peano.cmx \ - theories/FSets/orderedType.cmx theories/FSets/fSetProperties.cmx \ - theories/FSets/fSetInterface.cmx theories/Init/datatypes.cmx \ - theories/Bool/bool.cmx theories/FSets/fSetEqProperties.cmi -theories/FSets/fSetFacts.cmo: theories/Init/specif.cmi \ - theories/Setoids/setoid.cmi theories/FSets/orderedType.cmi \ - theories/FSets/fSetInterface.cmi theories/Init/datatypes.cmi \ - theories/FSets/fSetFacts.cmi -theories/FSets/fSetFacts.cmx: theories/Init/specif.cmx \ - theories/Setoids/setoid.cmx theories/FSets/orderedType.cmx \ - theories/FSets/fSetInterface.cmx theories/Init/datatypes.cmx \ - theories/FSets/fSetFacts.cmi -theories/FSets/fSetInterface.cmo: theories/Init/specif.cmi \ - theories/FSets/orderedType.cmi theories/Lists/list.cmi \ - theories/Init/datatypes.cmi theories/FSets/fSetInterface.cmi -theories/FSets/fSetInterface.cmx: theories/Init/specif.cmx \ - theories/FSets/orderedType.cmx theories/Lists/list.cmx \ - theories/Init/datatypes.cmx theories/FSets/fSetInterface.cmi -theories/FSets/fSetList.cmo: theories/Init/specif.cmi \ - theories/FSets/orderedType.cmi theories/Lists/list.cmi \ - theories/Init/datatypes.cmi theories/FSets/fSetList.cmi -theories/FSets/fSetList.cmx: theories/Init/specif.cmx \ - theories/FSets/orderedType.cmx theories/Lists/list.cmx \ - theories/Init/datatypes.cmx theories/FSets/fSetList.cmi -theories/FSets/fSetProperties.cmo: theories/Init/specif.cmi \ - theories/Setoids/setoid.cmi theories/FSets/orderedType.cmi \ - theories/Lists/list.cmi theories/FSets/fSetInterface.cmi \ - theories/FSets/fSetFacts.cmi theories/Init/datatypes.cmi \ - theories/FSets/fSetProperties.cmi -theories/FSets/fSetProperties.cmx: theories/Init/specif.cmx \ - theories/Setoids/setoid.cmx theories/FSets/orderedType.cmx \ - theories/Lists/list.cmx theories/FSets/fSetInterface.cmx \ - theories/FSets/fSetFacts.cmx theories/Init/datatypes.cmx \ - theories/FSets/fSetProperties.cmi -theories/FSets/fSets.cmo: theories/FSets/fSets.cmi -theories/FSets/fSets.cmx: theories/FSets/fSets.cmi -theories/FSets/fSetToFiniteSet.cmo: theories/Init/specif.cmi \ - theories/Setoids/setoid.cmi theories/FSets/orderedTypeEx.cmi \ - theories/FSets/orderedType.cmi theories/Lists/list.cmi \ - theories/FSets/fSetProperties.cmi theories/Init/datatypes.cmi \ - theories/FSets/fSetToFiniteSet.cmi -theories/FSets/fSetToFiniteSet.cmx: theories/Init/specif.cmx \ - theories/Setoids/setoid.cmx theories/FSets/orderedTypeEx.cmx \ - theories/FSets/orderedType.cmx theories/Lists/list.cmx \ - theories/FSets/fSetProperties.cmx theories/Init/datatypes.cmx \ - theories/FSets/fSetToFiniteSet.cmi -theories/FSets/fSetWeakFacts.cmo: theories/Init/specif.cmi \ - theories/Setoids/setoid.cmi theories/FSets/fSetWeakInterface.cmi \ - theories/Init/datatypes.cmi theories/FSets/fSetWeakFacts.cmi -theories/FSets/fSetWeakFacts.cmx: theories/Init/specif.cmx \ - theories/Setoids/setoid.cmx theories/FSets/fSetWeakInterface.cmx \ - theories/Init/datatypes.cmx theories/FSets/fSetWeakFacts.cmi -theories/FSets/fSetWeakInterface.cmo: theories/Lists/list.cmi \ - theories/FSets/decidableType.cmi theories/Init/datatypes.cmi \ - theories/FSets/fSetWeakInterface.cmi -theories/FSets/fSetWeakInterface.cmx: theories/Lists/list.cmx \ - theories/FSets/decidableType.cmx theories/Init/datatypes.cmx \ - theories/FSets/fSetWeakInterface.cmi -theories/FSets/fSetWeakList.cmo: theories/Init/specif.cmi \ - theories/Lists/list.cmi theories/FSets/decidableType.cmi \ - theories/Init/datatypes.cmi theories/FSets/fSetWeakList.cmi -theories/FSets/fSetWeakList.cmx: theories/Init/specif.cmx \ - theories/Lists/list.cmx theories/FSets/decidableType.cmx \ - theories/Init/datatypes.cmx theories/FSets/fSetWeakList.cmi -theories/FSets/fSetWeak.cmo: theories/FSets/fSetWeak.cmi -theories/FSets/fSetWeak.cmx: theories/FSets/fSetWeak.cmi -theories/FSets/fSetWeakProperties.cmo: theories/Init/specif.cmi \ - theories/Setoids/setoid.cmi theories/Lists/list.cmi \ - theories/FSets/fSetWeakInterface.cmi theories/FSets/fSetWeakFacts.cmi \ - theories/Init/datatypes.cmi theories/FSets/fSetWeakProperties.cmi -theories/FSets/fSetWeakProperties.cmx: theories/Init/specif.cmx \ - theories/Setoids/setoid.cmx theories/Lists/list.cmx \ - theories/FSets/fSetWeakInterface.cmx theories/FSets/fSetWeakFacts.cmx \ - theories/Init/datatypes.cmx theories/FSets/fSetWeakProperties.cmi -theories/FSets/int.cmo: theories/ZArith/zmax.cmi \ - theories/ZArith/zArith_dec.cmi theories/Init/specif.cmi \ - theories/NArith/binPos.cmi theories/ZArith/binInt.cmi \ - theories/FSets/int.cmi -theories/FSets/int.cmx: theories/ZArith/zmax.cmx \ - theories/ZArith/zArith_dec.cmx theories/Init/specif.cmx \ - theories/NArith/binPos.cmx theories/ZArith/binInt.cmx \ - theories/FSets/int.cmi -theories/FSets/orderedTypeAlt.cmo: theories/Init/specif.cmi \ - theories/FSets/orderedType.cmi theories/Init/datatypes.cmi \ - theories/FSets/orderedTypeAlt.cmi -theories/FSets/orderedTypeAlt.cmx: theories/Init/specif.cmx \ - theories/FSets/orderedType.cmx theories/Init/datatypes.cmx \ - theories/FSets/orderedTypeAlt.cmi -theories/FSets/orderedTypeEx.cmo: theories/Init/specif.cmi \ - theories/FSets/orderedType.cmi theories/Init/datatypes.cmi \ - theories/Arith/compare_dec.cmi theories/NArith/binPos.cmi \ - theories/NArith/binNat.cmi theories/ZArith/binInt.cmi \ - theories/FSets/orderedTypeEx.cmi -theories/FSets/orderedTypeEx.cmx: theories/Init/specif.cmx \ - theories/FSets/orderedType.cmx theories/Init/datatypes.cmx \ - theories/Arith/compare_dec.cmx theories/NArith/binPos.cmx \ - theories/NArith/binNat.cmx theories/ZArith/binInt.cmx \ - theories/FSets/orderedTypeEx.cmi -theories/FSets/orderedType.cmo: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/FSets/orderedType.cmi -theories/FSets/orderedType.cmx: theories/Init/specif.cmx \ - theories/Init/datatypes.cmx theories/FSets/orderedType.cmi -theories/Init/datatypes.cmo: theories/Init/datatypes.cmi -theories/Init/datatypes.cmx: theories/Init/datatypes.cmi -theories/Init/logic.cmo: theories/Init/logic.cmi -theories/Init/logic.cmx: theories/Init/logic.cmi -theories/Init/logic_Type.cmo: theories/Init/logic_Type.cmi -theories/Init/logic_Type.cmx: theories/Init/logic_Type.cmi -theories/Init/notations.cmo: theories/Init/notations.cmi -theories/Init/notations.cmx: theories/Init/notations.cmi -theories/Init/peano.cmo: theories/Init/datatypes.cmi theories/Init/peano.cmi -theories/Init/peano.cmx: theories/Init/datatypes.cmx theories/Init/peano.cmi -theories/Init/prelude.cmo: theories/Init/prelude.cmi -theories/Init/prelude.cmx: theories/Init/prelude.cmi -theories/Init/specif.cmo: theories/Init/datatypes.cmi \ - theories/Init/specif.cmi -theories/Init/specif.cmx: theories/Init/datatypes.cmx \ - theories/Init/specif.cmi -theories/Init/tactics.cmo: theories/Init/tactics.cmi -theories/Init/tactics.cmx: theories/Init/tactics.cmi -theories/Init/wf.cmo: theories/Init/wf.cmi -theories/Init/wf.cmx: theories/Init/wf.cmi -theories/IntMap/adalloc.cmo: theories/Bool/sumbool.cmi \ - theories/Init/specif.cmi theories/NArith/ndec.cmi theories/IntMap/map.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/NArith/binNat.cmi theories/IntMap/adalloc.cmi -theories/IntMap/adalloc.cmx: theories/Bool/sumbool.cmx \ - theories/Init/specif.cmx theories/NArith/ndec.cmx theories/IntMap/map.cmx \ - theories/Init/datatypes.cmx theories/NArith/binPos.cmx \ - theories/NArith/binNat.cmx theories/IntMap/adalloc.cmi -theories/IntMap/allmaps.cmo: theories/IntMap/allmaps.cmi -theories/IntMap/allmaps.cmx: theories/IntMap/allmaps.cmi -theories/IntMap/fset.cmo: theories/Init/specif.cmi \ - theories/NArith/ndigits.cmi theories/NArith/ndec.cmi \ - theories/IntMap/map.cmi theories/Init/datatypes.cmi \ - theories/NArith/binNat.cmi theories/IntMap/fset.cmi -theories/IntMap/fset.cmx: theories/Init/specif.cmx \ - theories/NArith/ndigits.cmx theories/NArith/ndec.cmx \ - theories/IntMap/map.cmx theories/Init/datatypes.cmx \ - theories/NArith/binNat.cmx theories/IntMap/fset.cmi -theories/IntMap/lsort.cmo: theories/Bool/sumbool.cmi theories/Init/specif.cmi \ - theories/NArith/ndigits.cmi theories/NArith/ndec.cmi \ - theories/IntMap/mapiter.cmi theories/IntMap/map.cmi \ - theories/Lists/list.cmi theories/Init/datatypes.cmi \ - theories/NArith/binNat.cmi theories/IntMap/lsort.cmi -theories/IntMap/lsort.cmx: theories/Bool/sumbool.cmx theories/Init/specif.cmx \ - theories/NArith/ndigits.cmx theories/NArith/ndec.cmx \ - theories/IntMap/mapiter.cmx theories/IntMap/map.cmx \ - theories/Lists/list.cmx theories/Init/datatypes.cmx \ - theories/NArith/binNat.cmx theories/IntMap/lsort.cmi -theories/IntMap/mapaxioms.cmo: theories/IntMap/mapaxioms.cmi -theories/IntMap/mapaxioms.cmx: theories/IntMap/mapaxioms.cmi -theories/IntMap/mapcanon.cmo: theories/Init/specif.cmi \ - theories/IntMap/map.cmi theories/IntMap/mapcanon.cmi -theories/IntMap/mapcanon.cmx: theories/Init/specif.cmx \ - theories/IntMap/map.cmx theories/IntMap/mapcanon.cmi -theories/IntMap/mapcard.cmo: theories/Bool/sumbool.cmi \ - theories/Init/specif.cmi theories/Arith/plus.cmi \ - theories/Arith/peano_dec.cmi theories/Init/peano.cmi \ - theories/NArith/ndigits.cmi theories/NArith/ndec.cmi \ - theories/IntMap/map.cmi theories/Init/datatypes.cmi \ - theories/NArith/binNat.cmi theories/IntMap/mapcard.cmi -theories/IntMap/mapcard.cmx: theories/Bool/sumbool.cmx \ - theories/Init/specif.cmx theories/Arith/plus.cmx \ - theories/Arith/peano_dec.cmx theories/Init/peano.cmx \ - theories/NArith/ndigits.cmx theories/NArith/ndec.cmx \ - theories/IntMap/map.cmx theories/Init/datatypes.cmx \ - theories/NArith/binNat.cmx theories/IntMap/mapcard.cmi -theories/IntMap/mapc.cmo: theories/IntMap/mapc.cmi -theories/IntMap/mapc.cmx: theories/IntMap/mapc.cmi -theories/IntMap/mapfold.cmo: theories/Init/specif.cmi \ - theories/IntMap/mapiter.cmi theories/IntMap/map.cmi \ - theories/IntMap/fset.cmi theories/Init/datatypes.cmi \ - theories/IntMap/mapfold.cmi -theories/IntMap/mapfold.cmx: theories/Init/specif.cmx \ - theories/IntMap/mapiter.cmx theories/IntMap/map.cmx \ - theories/IntMap/fset.cmx theories/Init/datatypes.cmx \ - theories/IntMap/mapfold.cmi -theories/IntMap/mapiter.cmo: theories/Bool/sumbool.cmi \ - theories/Init/specif.cmi theories/NArith/ndigits.cmi \ - theories/NArith/ndec.cmi theories/IntMap/map.cmi theories/Lists/list.cmi \ - theories/Init/datatypes.cmi theories/NArith/binNat.cmi \ - theories/IntMap/mapiter.cmi -theories/IntMap/mapiter.cmx: theories/Bool/sumbool.cmx \ - theories/Init/specif.cmx theories/NArith/ndigits.cmx \ - theories/NArith/ndec.cmx theories/IntMap/map.cmx theories/Lists/list.cmx \ - theories/Init/datatypes.cmx theories/NArith/binNat.cmx \ - theories/IntMap/mapiter.cmi -theories/IntMap/maplists.cmo: theories/Bool/sumbool.cmi \ - theories/Init/specif.cmi theories/NArith/ndec.cmi \ - theories/IntMap/mapiter.cmi theories/IntMap/map.cmi \ - theories/Lists/list.cmi theories/IntMap/fset.cmi \ - theories/Init/datatypes.cmi theories/IntMap/maplists.cmi -theories/IntMap/maplists.cmx: theories/Bool/sumbool.cmx \ - theories/Init/specif.cmx theories/NArith/ndec.cmx \ - theories/IntMap/mapiter.cmx theories/IntMap/map.cmx \ - theories/Lists/list.cmx theories/IntMap/fset.cmx \ - theories/Init/datatypes.cmx theories/IntMap/maplists.cmi -theories/IntMap/map.cmo: theories/Init/specif.cmi theories/Init/peano.cmi \ - theories/NArith/ndigits.cmi theories/NArith/ndec.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/NArith/binNat.cmi theories/IntMap/map.cmi -theories/IntMap/map.cmx: theories/Init/specif.cmx theories/Init/peano.cmx \ - theories/NArith/ndigits.cmx theories/NArith/ndec.cmx \ - theories/Init/datatypes.cmx theories/NArith/binPos.cmx \ - theories/NArith/binNat.cmx theories/IntMap/map.cmi -theories/IntMap/mapsubset.cmo: theories/IntMap/mapiter.cmi \ - theories/IntMap/map.cmi theories/IntMap/fset.cmi \ - theories/Init/datatypes.cmi theories/Bool/bool.cmi \ - theories/IntMap/mapsubset.cmi -theories/IntMap/mapsubset.cmx: theories/IntMap/mapiter.cmx \ - theories/IntMap/map.cmx theories/IntMap/fset.cmx \ - theories/Init/datatypes.cmx theories/Bool/bool.cmx \ - theories/IntMap/mapsubset.cmi -theories/Lists/list.cmo: theories/Init/specif.cmi theories/Init/datatypes.cmi \ - theories/Lists/list.cmi -theories/Lists/list.cmx: theories/Init/specif.cmx theories/Init/datatypes.cmx \ - theories/Lists/list.cmi -theories/Lists/listSet.cmo: theories/Init/specif.cmi theories/Lists/list.cmi \ - theories/Init/datatypes.cmi theories/Lists/listSet.cmi -theories/Lists/listSet.cmx: theories/Init/specif.cmx theories/Lists/list.cmx \ - theories/Init/datatypes.cmx theories/Lists/listSet.cmi -theories/Lists/monoList.cmo: theories/Init/datatypes.cmi \ - theories/Lists/monoList.cmi -theories/Lists/monoList.cmx: theories/Init/datatypes.cmx \ - theories/Lists/monoList.cmi -theories/Lists/setoidList.cmo: theories/Init/specif.cmi \ - theories/Lists/list.cmi theories/Init/datatypes.cmi \ - theories/Lists/setoidList.cmi -theories/Lists/setoidList.cmx: theories/Init/specif.cmx \ - theories/Lists/list.cmx theories/Init/datatypes.cmx \ - theories/Lists/setoidList.cmi -theories/Lists/streams.cmo: theories/Init/datatypes.cmi \ - theories/Lists/streams.cmi -theories/Lists/streams.cmx: theories/Init/datatypes.cmx \ - theories/Lists/streams.cmi -theories/Lists/theoryList.cmo: theories/Init/specif.cmi \ - theories/Lists/list.cmi theories/Init/datatypes.cmi \ - theories/Lists/theoryList.cmi -theories/Lists/theoryList.cmx: theories/Init/specif.cmx \ - theories/Lists/list.cmx theories/Init/datatypes.cmx \ - theories/Lists/theoryList.cmi -theories/Logic/berardi.cmo: theories/Logic/berardi.cmi -theories/Logic/berardi.cmx: theories/Logic/berardi.cmi -theories/Logic/choiceFacts.cmo: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/Logic/choiceFacts.cmi -theories/Logic/choiceFacts.cmx: theories/Init/specif.cmx \ - theories/Init/datatypes.cmx theories/Logic/choiceFacts.cmi -theories/Logic/classicalChoice.cmo: theories/Logic/classicalChoice.cmi -theories/Logic/classicalChoice.cmx: theories/Logic/classicalChoice.cmi -theories/Logic/classicalDescription.cmo: theories/Init/specif.cmi \ - theories/Logic/choiceFacts.cmi theories/Logic/classicalDescription.cmi -theories/Logic/classicalDescription.cmx: theories/Init/specif.cmx \ - theories/Logic/choiceFacts.cmx theories/Logic/classicalDescription.cmi -theories/Logic/classicalEpsilon.cmo: theories/Init/specif.cmi \ - theories/Logic/choiceFacts.cmi theories/Logic/classicalEpsilon.cmi -theories/Logic/classicalEpsilon.cmx: theories/Init/specif.cmx \ - theories/Logic/choiceFacts.cmx theories/Logic/classicalEpsilon.cmi -theories/Logic/classicalFacts.cmo: theories/Logic/classicalFacts.cmi -theories/Logic/classicalFacts.cmx: theories/Logic/classicalFacts.cmi -theories/Logic/classical.cmo: theories/Logic/classical.cmi -theories/Logic/classical.cmx: theories/Logic/classical.cmi -theories/Logic/classical_Pred_Set.cmo: theories/Logic/classical_Pred_Set.cmi -theories/Logic/classical_Pred_Set.cmx: theories/Logic/classical_Pred_Set.cmi -theories/Logic/classical_Pred_Type.cmo: \ - theories/Logic/classical_Pred_Type.cmi -theories/Logic/classical_Pred_Type.cmx: \ - theories/Logic/classical_Pred_Type.cmi -theories/Logic/classical_Prop.cmo: theories/Logic/eqdepFacts.cmi \ - theories/Logic/classical_Prop.cmi -theories/Logic/classical_Prop.cmx: theories/Logic/eqdepFacts.cmx \ - theories/Logic/classical_Prop.cmi -theories/Logic/classical_Type.cmo: theories/Logic/classical_Type.cmi -theories/Logic/classical_Type.cmx: theories/Logic/classical_Type.cmi -theories/Logic/classicalUniqueChoice.cmo: \ - theories/Logic/classicalUniqueChoice.cmi -theories/Logic/classicalUniqueChoice.cmx: \ - theories/Logic/classicalUniqueChoice.cmi -theories/Logic/decidable.cmo: theories/Logic/decidable.cmi -theories/Logic/decidable.cmx: theories/Logic/decidable.cmi -theories/Logic/diaconescu.cmo: theories/Init/specif.cmi \ - theories/Logic/diaconescu.cmi -theories/Logic/diaconescu.cmx: theories/Init/specif.cmx \ - theories/Logic/diaconescu.cmi -theories/Logic/eqdep_dec.cmo: theories/Init/specif.cmi \ - theories/Logic/eqdep_dec.cmi -theories/Logic/eqdep_dec.cmx: theories/Init/specif.cmx \ - theories/Logic/eqdep_dec.cmi -theories/Logic/eqdepFacts.cmo: theories/Logic/eqdepFacts.cmi -theories/Logic/eqdepFacts.cmx: theories/Logic/eqdepFacts.cmi -theories/Logic/eqdep.cmo: theories/Logic/eqdepFacts.cmi \ - theories/Logic/eqdep.cmi -theories/Logic/eqdep.cmx: theories/Logic/eqdepFacts.cmx \ - theories/Logic/eqdep.cmi -theories/Logic/hurkens.cmo: theories/Logic/hurkens.cmi -theories/Logic/hurkens.cmx: theories/Logic/hurkens.cmi -theories/Logic/jMeq.cmo: theories/Logic/jMeq.cmi -theories/Logic/jMeq.cmx: theories/Logic/jMeq.cmi -theories/Logic/proofIrrelevanceFacts.cmo: theories/Logic/eqdepFacts.cmi \ - theories/Logic/proofIrrelevanceFacts.cmi -theories/Logic/proofIrrelevanceFacts.cmx: theories/Logic/eqdepFacts.cmx \ - theories/Logic/proofIrrelevanceFacts.cmi -theories/Logic/proofIrrelevance.cmo: theories/Logic/proofIrrelevanceFacts.cmi \ - theories/Logic/proofIrrelevance.cmi -theories/Logic/proofIrrelevance.cmx: theories/Logic/proofIrrelevanceFacts.cmx \ - theories/Logic/proofIrrelevance.cmi -theories/Logic/relationalChoice.cmo: theories/Logic/relationalChoice.cmi -theories/Logic/relationalChoice.cmx: theories/Logic/relationalChoice.cmi -theories/NArith/binNat.cmo: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/NArith/binNat.cmi -theories/NArith/binNat.cmx: theories/Init/specif.cmx \ - theories/Init/datatypes.cmx theories/NArith/binPos.cmx \ - theories/NArith/binNat.cmi -theories/NArith/binPos.cmo: theories/Init/peano.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi -theories/NArith/binPos.cmx: theories/Init/peano.cmx \ - theories/Init/datatypes.cmx theories/NArith/binPos.cmi -theories/NArith/nArith.cmo: theories/NArith/nArith.cmi -theories/NArith/nArith.cmx: theories/NArith/nArith.cmi -theories/NArith/ndec.cmo: theories/Bool/sumbool.cmi theories/Init/specif.cmi \ - theories/NArith/nnat.cmi theories/NArith/ndigits.cmi \ - theories/Init/datatypes.cmi theories/Arith/compare_dec.cmi \ - theories/NArith/binPos.cmi theories/NArith/binNat.cmi \ - theories/NArith/ndec.cmi -theories/NArith/ndec.cmx: theories/Bool/sumbool.cmx theories/Init/specif.cmx \ - theories/NArith/nnat.cmx theories/NArith/ndigits.cmx \ - theories/Init/datatypes.cmx theories/Arith/compare_dec.cmx \ - theories/NArith/binPos.cmx theories/NArith/binNat.cmx \ - theories/NArith/ndec.cmi -theories/NArith/ndigits.cmo: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/Bool/bvector.cmi \ - theories/Bool/bool.cmi theories/NArith/binPos.cmi \ - theories/NArith/binNat.cmi theories/NArith/ndigits.cmi -theories/NArith/ndigits.cmx: theories/Init/specif.cmx \ - theories/Init/datatypes.cmx theories/Bool/bvector.cmx \ - theories/Bool/bool.cmx theories/NArith/binPos.cmx \ - theories/NArith/binNat.cmx theories/NArith/ndigits.cmi -theories/NArith/ndist.cmo: theories/NArith/ndigits.cmi theories/Arith/min.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/NArith/binNat.cmi theories/NArith/ndist.cmi -theories/NArith/ndist.cmx: theories/NArith/ndigits.cmx theories/Arith/min.cmx \ - theories/Init/datatypes.cmx theories/NArith/binPos.cmx \ - theories/NArith/binNat.cmx theories/NArith/ndist.cmi -theories/NArith/nnat.cmo: theories/Init/datatypes.cmi \ - theories/NArith/binPos.cmi theories/NArith/binNat.cmi \ - theories/NArith/nnat.cmi -theories/NArith/nnat.cmx: theories/Init/datatypes.cmx \ - theories/NArith/binPos.cmx theories/NArith/binNat.cmx \ - theories/NArith/nnat.cmi -theories/NArith/pnat.cmo: theories/NArith/pnat.cmi -theories/NArith/pnat.cmx: theories/NArith/pnat.cmi -theories/QArith/qArith_base.cmo: theories/ZArith/zArith_dec.cmi \ - theories/Init/specif.cmi theories/Setoids/setoid.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/ZArith/binInt.cmi theories/QArith/qArith_base.cmi -theories/QArith/qArith_base.cmx: theories/ZArith/zArith_dec.cmx \ - theories/Init/specif.cmx theories/Setoids/setoid.cmx \ - theories/Init/datatypes.cmx theories/NArith/binPos.cmx \ - theories/ZArith/binInt.cmx theories/QArith/qArith_base.cmi -theories/QArith/qArith.cmo: theories/QArith/qArith.cmi -theories/QArith/qArith.cmx: theories/QArith/qArith.cmi -theories/QArith/qreals.cmo: theories/QArith/qArith_base.cmi \ - theories/ZArith/binInt.cmi theories/QArith/qreals.cmi -theories/QArith/qreals.cmx: theories/QArith/qArith_base.cmx \ - theories/ZArith/binInt.cmx theories/QArith/qreals.cmi -theories/QArith/qreduction.cmo: theories/ZArith/znumtheory.cmi \ - theories/Setoids/setoid.cmi theories/QArith/qArith_base.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/ZArith/binInt.cmi theories/QArith/qreduction.cmi -theories/QArith/qreduction.cmx: theories/ZArith/znumtheory.cmx \ - theories/Setoids/setoid.cmx theories/QArith/qArith_base.cmx \ - theories/Init/datatypes.cmx theories/NArith/binPos.cmx \ - theories/ZArith/binInt.cmx theories/QArith/qreduction.cmi -theories/QArith/qring.cmo: theories/Init/specif.cmi \ - theories/QArith/qArith_base.cmi theories/Init/datatypes.cmi \ - theories/QArith/qring.cmi -theories/QArith/qring.cmx: theories/Init/specif.cmx \ - theories/QArith/qArith_base.cmx theories/Init/datatypes.cmx \ - theories/QArith/qring.cmi -theories/Relations/newman.cmo: theories/Relations/newman.cmi -theories/Relations/newman.cmx: theories/Relations/newman.cmi -theories/Relations/operators_Properties.cmo: \ - theories/Relations/operators_Properties.cmi -theories/Relations/operators_Properties.cmx: \ - theories/Relations/operators_Properties.cmi -theories/Relations/relation_Definitions.cmo: \ - theories/Relations/relation_Definitions.cmi -theories/Relations/relation_Definitions.cmx: \ - theories/Relations/relation_Definitions.cmi -theories/Relations/relation_Operators.cmo: theories/Init/specif.cmi \ - theories/Lists/list.cmi theories/Relations/relation_Operators.cmi -theories/Relations/relation_Operators.cmx: theories/Init/specif.cmx \ - theories/Lists/list.cmx theories/Relations/relation_Operators.cmi -theories/Relations/relations.cmo: theories/Relations/relations.cmi -theories/Relations/relations.cmx: theories/Relations/relations.cmi -theories/Relations/rstar.cmo: theories/Relations/rstar.cmi -theories/Relations/rstar.cmx: theories/Relations/rstar.cmi -theories/Setoids/setoid.cmo: theories/Init/datatypes.cmi \ - theories/Setoids/setoid.cmi -theories/Setoids/setoid.cmx: theories/Init/datatypes.cmx \ - theories/Setoids/setoid.cmi -theories/Sets/classical_sets.cmo: theories/Sets/classical_sets.cmi -theories/Sets/classical_sets.cmx: theories/Sets/classical_sets.cmi -theories/Sets/constructive_sets.cmo: theories/Sets/constructive_sets.cmi -theories/Sets/constructive_sets.cmx: theories/Sets/constructive_sets.cmi -theories/Sets/cpo.cmo: theories/Sets/partial_Order.cmi theories/Sets/cpo.cmi -theories/Sets/cpo.cmx: theories/Sets/partial_Order.cmx theories/Sets/cpo.cmi -theories/Sets/ensembles.cmo: theories/Sets/ensembles.cmi -theories/Sets/ensembles.cmx: theories/Sets/ensembles.cmi -theories/Sets/finite_sets_facts.cmo: theories/Sets/finite_sets_facts.cmi -theories/Sets/finite_sets_facts.cmx: theories/Sets/finite_sets_facts.cmi -theories/Sets/finite_sets.cmo: theories/Sets/finite_sets.cmi -theories/Sets/finite_sets.cmx: theories/Sets/finite_sets.cmi -theories/Sets/image.cmo: theories/Sets/image.cmi -theories/Sets/image.cmx: theories/Sets/image.cmi -theories/Sets/infinite_sets.cmo: theories/Sets/infinite_sets.cmi -theories/Sets/infinite_sets.cmx: theories/Sets/infinite_sets.cmi -theories/Sets/integers.cmo: theories/Sets/partial_Order.cmi \ - theories/Init/datatypes.cmi theories/Sets/integers.cmi -theories/Sets/integers.cmx: theories/Sets/partial_Order.cmx \ - theories/Init/datatypes.cmx theories/Sets/integers.cmi -theories/Sets/multiset.cmo: theories/Init/specif.cmi theories/Init/peano.cmi \ - theories/Init/datatypes.cmi theories/Sets/multiset.cmi -theories/Sets/multiset.cmx: theories/Init/specif.cmx theories/Init/peano.cmx \ - theories/Init/datatypes.cmx theories/Sets/multiset.cmi -theories/Sets/partial_Order.cmo: theories/Sets/relations_1.cmi \ - theories/Sets/ensembles.cmi theories/Sets/partial_Order.cmi -theories/Sets/partial_Order.cmx: theories/Sets/relations_1.cmx \ - theories/Sets/ensembles.cmx theories/Sets/partial_Order.cmi -theories/Sets/permut.cmo: theories/Sets/permut.cmi -theories/Sets/permut.cmx: theories/Sets/permut.cmi -theories/Sets/powerset_Classical_facts.cmo: \ - theories/Sets/powerset_Classical_facts.cmi -theories/Sets/powerset_Classical_facts.cmx: \ - theories/Sets/powerset_Classical_facts.cmi -theories/Sets/powerset_facts.cmo: theories/Sets/powerset_facts.cmi -theories/Sets/powerset_facts.cmx: theories/Sets/powerset_facts.cmi -theories/Sets/powerset.cmo: theories/Sets/partial_Order.cmi \ - theories/Sets/ensembles.cmi theories/Sets/powerset.cmi -theories/Sets/powerset.cmx: theories/Sets/partial_Order.cmx \ - theories/Sets/ensembles.cmx theories/Sets/powerset.cmi -theories/Sets/relations_1_facts.cmo: theories/Sets/relations_1_facts.cmi -theories/Sets/relations_1_facts.cmx: theories/Sets/relations_1_facts.cmi -theories/Sets/relations_1.cmo: theories/Sets/relations_1.cmi -theories/Sets/relations_1.cmx: theories/Sets/relations_1.cmi -theories/Sets/relations_2_facts.cmo: theories/Sets/relations_2_facts.cmi -theories/Sets/relations_2_facts.cmx: theories/Sets/relations_2_facts.cmi -theories/Sets/relations_2.cmo: theories/Sets/relations_2.cmi -theories/Sets/relations_2.cmx: theories/Sets/relations_2.cmi -theories/Sets/relations_3_facts.cmo: theories/Sets/relations_3_facts.cmi -theories/Sets/relations_3_facts.cmx: theories/Sets/relations_3_facts.cmi -theories/Sets/relations_3.cmo: theories/Sets/relations_3.cmi -theories/Sets/relations_3.cmx: theories/Sets/relations_3.cmi -theories/Sets/uniset.cmo: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/Sets/uniset.cmi -theories/Sets/uniset.cmx: theories/Init/specif.cmx \ - theories/Init/datatypes.cmx theories/Sets/uniset.cmi -theories/Sorting/heap.cmo: theories/Init/specif.cmi \ - theories/Sorting/sorting.cmi theories/Init/peano.cmi \ - theories/Sets/multiset.cmi theories/Lists/list.cmi \ - theories/Init/datatypes.cmi theories/Sorting/heap.cmi -theories/Sorting/heap.cmx: theories/Init/specif.cmx \ - theories/Sorting/sorting.cmx theories/Init/peano.cmx \ - theories/Sets/multiset.cmx theories/Lists/list.cmx \ - theories/Init/datatypes.cmx theories/Sorting/heap.cmi -theories/Sorting/permutation.cmo: theories/Init/specif.cmi \ - theories/Init/peano.cmi theories/Sets/multiset.cmi \ - theories/Lists/list.cmi theories/Init/datatypes.cmi \ - theories/Sorting/permutation.cmi -theories/Sorting/permutation.cmx: theories/Init/specif.cmx \ - theories/Init/peano.cmx theories/Sets/multiset.cmx \ - theories/Lists/list.cmx theories/Init/datatypes.cmx \ - theories/Sorting/permutation.cmi -theories/Sorting/permutEq.cmo: theories/Sorting/permutEq.cmi -theories/Sorting/permutEq.cmx: theories/Sorting/permutEq.cmi -theories/Sorting/permutSetoid.cmo: theories/Sorting/permutSetoid.cmi -theories/Sorting/permutSetoid.cmx: theories/Sorting/permutSetoid.cmi -theories/Sorting/sorting.cmo: theories/Init/specif.cmi \ - theories/Lists/list.cmi theories/Sorting/sorting.cmi -theories/Sorting/sorting.cmx: theories/Init/specif.cmx \ - theories/Lists/list.cmx theories/Sorting/sorting.cmi -theories/Strings/ascii.cmo: theories/Init/specif.cmi theories/Init/peano.cmi \ - theories/Init/datatypes.cmi theories/Bool/bool.cmi \ - theories/NArith/binPos.cmi theories/Strings/ascii.cmi -theories/Strings/ascii.cmx: theories/Init/specif.cmx theories/Init/peano.cmx \ - theories/Init/datatypes.cmx theories/Bool/bool.cmx \ - theories/NArith/binPos.cmx theories/Strings/ascii.cmi -theories/Strings/string.cmo: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/Strings/ascii.cmi \ - theories/Strings/string.cmi -theories/Strings/string.cmx: theories/Init/specif.cmx \ - theories/Init/datatypes.cmx theories/Strings/ascii.cmx \ - theories/Strings/string.cmi -theories/Wellfounded/disjoint_Union.cmo: \ - theories/Wellfounded/disjoint_Union.cmi -theories/Wellfounded/disjoint_Union.cmx: \ - theories/Wellfounded/disjoint_Union.cmi -theories/Wellfounded/inclusion.cmo: theories/Wellfounded/inclusion.cmi -theories/Wellfounded/inclusion.cmx: theories/Wellfounded/inclusion.cmi -theories/Wellfounded/inverse_Image.cmo: \ - theories/Wellfounded/inverse_Image.cmi -theories/Wellfounded/inverse_Image.cmx: \ - theories/Wellfounded/inverse_Image.cmi -theories/Wellfounded/lexicographic_Exponentiation.cmo: \ - theories/Wellfounded/lexicographic_Exponentiation.cmi -theories/Wellfounded/lexicographic_Exponentiation.cmx: \ - theories/Wellfounded/lexicographic_Exponentiation.cmi -theories/Wellfounded/lexicographic_Product.cmo: \ - theories/Wellfounded/lexicographic_Product.cmi -theories/Wellfounded/lexicographic_Product.cmx: \ - theories/Wellfounded/lexicographic_Product.cmi -theories/Wellfounded/transitive_Closure.cmo: \ - theories/Wellfounded/transitive_Closure.cmi -theories/Wellfounded/transitive_Closure.cmx: \ - theories/Wellfounded/transitive_Closure.cmi -theories/Wellfounded/union.cmo: theories/Wellfounded/union.cmi -theories/Wellfounded/union.cmx: theories/Wellfounded/union.cmi -theories/Wellfounded/wellfounded.cmo: theories/Wellfounded/wellfounded.cmi -theories/Wellfounded/wellfounded.cmx: theories/Wellfounded/wellfounded.cmi -theories/Wellfounded/well_Ordering.cmo: theories/Init/specif.cmi \ - theories/Wellfounded/well_Ordering.cmi -theories/Wellfounded/well_Ordering.cmx: theories/Init/specif.cmx \ - theories/Wellfounded/well_Ordering.cmi -theories/ZArith/auxiliary.cmo: theories/ZArith/auxiliary.cmi -theories/ZArith/auxiliary.cmx: theories/ZArith/auxiliary.cmi -theories/ZArith/binInt.cmo: theories/Init/datatypes.cmi \ - theories/NArith/binPos.cmi theories/NArith/binNat.cmi \ - theories/ZArith/binInt.cmi -theories/ZArith/binInt.cmx: theories/Init/datatypes.cmx \ - theories/NArith/binPos.cmx theories/NArith/binNat.cmx \ - theories/ZArith/binInt.cmi -theories/ZArith/wf_Z.cmo: theories/Init/specif.cmi theories/Init/peano.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/ZArith/binInt.cmi theories/ZArith/wf_Z.cmi -theories/ZArith/wf_Z.cmx: theories/Init/specif.cmx theories/Init/peano.cmx \ - theories/Init/datatypes.cmx theories/NArith/binPos.cmx \ - theories/ZArith/binInt.cmx theories/ZArith/wf_Z.cmi -theories/ZArith/zabs.cmo: theories/Init/specif.cmi theories/ZArith/binInt.cmi \ - theories/ZArith/zabs.cmi -theories/ZArith/zabs.cmx: theories/Init/specif.cmx theories/ZArith/binInt.cmx \ - theories/ZArith/zabs.cmi -theories/ZArith/zArith_base.cmo: theories/ZArith/zArith_base.cmi -theories/ZArith/zArith_base.cmx: theories/ZArith/zArith_base.cmi -theories/ZArith/zArith_dec.cmo: theories/Bool/sumbool.cmi \ - theories/Init/specif.cmi theories/Init/datatypes.cmi \ - theories/ZArith/binInt.cmi theories/ZArith/zArith_dec.cmi -theories/ZArith/zArith_dec.cmx: theories/Bool/sumbool.cmx \ - theories/Init/specif.cmx theories/Init/datatypes.cmx \ - theories/ZArith/binInt.cmx theories/ZArith/zArith_dec.cmi -theories/ZArith/zArith.cmo: theories/ZArith/zArith.cmi -theories/ZArith/zArith.cmx: theories/ZArith/zArith.cmi -theories/ZArith/zbinary.cmo: theories/ZArith/zeven.cmi \ - theories/Init/datatypes.cmi theories/Bool/bvector.cmi \ - theories/NArith/binPos.cmi theories/ZArith/binInt.cmi \ - theories/ZArith/zbinary.cmi -theories/ZArith/zbinary.cmx: theories/ZArith/zeven.cmx \ - theories/Init/datatypes.cmx theories/Bool/bvector.cmx \ - theories/NArith/binPos.cmx theories/ZArith/binInt.cmx \ - theories/ZArith/zbinary.cmi -theories/ZArith/zbool.cmo: theories/ZArith/zeven.cmi \ - theories/ZArith/zArith_dec.cmi theories/Bool/sumbool.cmi \ - theories/Init/specif.cmi theories/Init/datatypes.cmi \ - theories/ZArith/binInt.cmi theories/ZArith/zbool.cmi -theories/ZArith/zbool.cmx: theories/ZArith/zeven.cmx \ - theories/ZArith/zArith_dec.cmx theories/Bool/sumbool.cmx \ - theories/Init/specif.cmx theories/Init/datatypes.cmx \ - theories/ZArith/binInt.cmx theories/ZArith/zbool.cmi -theories/ZArith/zcompare.cmo: theories/ZArith/zcompare.cmi -theories/ZArith/zcompare.cmx: theories/ZArith/zcompare.cmi -theories/ZArith/zcomplements.cmo: theories/ZArith/zabs.cmi \ - theories/ZArith/wf_Z.cmi theories/Init/specif.cmi theories/Lists/list.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/ZArith/binInt.cmi theories/ZArith/zcomplements.cmi -theories/ZArith/zcomplements.cmx: theories/ZArith/zabs.cmx \ - theories/ZArith/wf_Z.cmx theories/Init/specif.cmx theories/Lists/list.cmx \ - theories/Init/datatypes.cmx theories/NArith/binPos.cmx \ - theories/ZArith/binInt.cmx theories/ZArith/zcomplements.cmi -theories/ZArith/zdiv.cmo: theories/ZArith/zbool.cmi \ - theories/ZArith/zArith_dec.cmi theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/ZArith/binInt.cmi theories/ZArith/zdiv.cmi -theories/ZArith/zdiv.cmx: theories/ZArith/zbool.cmx \ - theories/ZArith/zArith_dec.cmx theories/Init/specif.cmx \ - theories/Init/datatypes.cmx theories/NArith/binPos.cmx \ - theories/ZArith/binInt.cmx theories/ZArith/zdiv.cmi -theories/ZArith/zeven.cmo: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/ZArith/binInt.cmi theories/ZArith/zeven.cmi -theories/ZArith/zeven.cmx: theories/Init/specif.cmx \ - theories/Init/datatypes.cmx theories/NArith/binPos.cmx \ - theories/ZArith/binInt.cmx theories/ZArith/zeven.cmi -theories/ZArith/zhints.cmo: theories/ZArith/zhints.cmi -theories/ZArith/zhints.cmx: theories/ZArith/zhints.cmi -theories/ZArith/zlogarithm.cmo: theories/NArith/binPos.cmi \ - theories/ZArith/binInt.cmi theories/ZArith/zlogarithm.cmi -theories/ZArith/zlogarithm.cmx: theories/NArith/binPos.cmx \ - theories/ZArith/binInt.cmx theories/ZArith/zlogarithm.cmi -theories/ZArith/zmax.cmo: theories/Init/datatypes.cmi \ - theories/ZArith/binInt.cmi theories/ZArith/zmax.cmi -theories/ZArith/zmax.cmx: theories/Init/datatypes.cmx \ - theories/ZArith/binInt.cmx theories/ZArith/zmax.cmi -theories/ZArith/zminmax.cmo: theories/ZArith/zminmax.cmi -theories/ZArith/zminmax.cmx: theories/ZArith/zminmax.cmi -theories/ZArith/zmin.cmo: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/ZArith/binInt.cmi \ - theories/ZArith/zmin.cmi -theories/ZArith/zmin.cmx: theories/Init/specif.cmx \ - theories/Init/datatypes.cmx theories/ZArith/binInt.cmx \ - theories/ZArith/zmin.cmi -theories/ZArith/zmisc.cmo: theories/Init/datatypes.cmi \ - theories/NArith/binPos.cmi theories/ZArith/binInt.cmi \ - theories/ZArith/zmisc.cmi -theories/ZArith/zmisc.cmx: theories/Init/datatypes.cmx \ - theories/NArith/binPos.cmx theories/ZArith/binInt.cmx \ - theories/ZArith/zmisc.cmi -theories/ZArith/znat.cmo: theories/ZArith/znat.cmi -theories/ZArith/znat.cmx: theories/ZArith/znat.cmi -theories/ZArith/znumtheory.cmo: theories/ZArith/zorder.cmi \ - theories/ZArith/zdiv.cmi theories/ZArith/zArith_dec.cmi \ - theories/ZArith/wf_Z.cmi theories/Init/specif.cmi theories/Init/peano.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/ZArith/binInt.cmi theories/ZArith/znumtheory.cmi -theories/ZArith/znumtheory.cmx: theories/ZArith/zorder.cmx \ - theories/ZArith/zdiv.cmx theories/ZArith/zArith_dec.cmx \ - theories/ZArith/wf_Z.cmx theories/Init/specif.cmx theories/Init/peano.cmx \ - theories/Init/datatypes.cmx theories/NArith/binPos.cmx \ - theories/ZArith/binInt.cmx theories/ZArith/znumtheory.cmi -theories/ZArith/zorder.cmo: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/ZArith/binInt.cmi \ - theories/ZArith/zorder.cmi -theories/ZArith/zorder.cmx: theories/Init/specif.cmx \ - theories/Init/datatypes.cmx theories/ZArith/binInt.cmx \ - theories/ZArith/zorder.cmi -theories/ZArith/zpower.cmo: theories/ZArith/zmisc.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/ZArith/binInt.cmi theories/ZArith/zpower.cmi -theories/ZArith/zpower.cmx: theories/ZArith/zmisc.cmx \ - theories/Init/datatypes.cmx theories/NArith/binPos.cmx \ - theories/ZArith/binInt.cmx theories/ZArith/zpower.cmi -theories/ZArith/zsqrt.cmo: theories/ZArith/zArith_dec.cmi \ - theories/Init/specif.cmi theories/NArith/binPos.cmi \ - theories/ZArith/binInt.cmi theories/ZArith/zsqrt.cmi -theories/ZArith/zsqrt.cmx: theories/ZArith/zArith_dec.cmx \ - theories/Init/specif.cmx theories/NArith/binPos.cmx \ - theories/ZArith/binInt.cmx theories/ZArith/zsqrt.cmi -theories/ZArith/zwf.cmo: theories/ZArith/zwf.cmi -theories/ZArith/zwf.cmx: theories/ZArith/zwf.cmi -theories/Arith/bool_nat.cmi: theories/Bool/sumbool.cmi \ - theories/Init/specif.cmi theories/Arith/peano_dec.cmi \ - theories/Init/datatypes.cmi theories/Arith/compare_dec.cmi -theories/Arith/compare_dec.cmi: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi -theories/Arith/compare.cmi: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/Arith/compare_dec.cmi -theories/Arith/div2.cmi: theories/Init/specif.cmi theories/Init/peano.cmi \ - theories/Init/datatypes.cmi -theories/Arith/eqNat.cmi: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi -theories/Arith/euclid.cmi: theories/Init/specif.cmi theories/Init/peano.cmi \ - theories/Init/datatypes.cmi theories/Arith/compare_dec.cmi -theories/Arith/even.cmi: theories/Init/specif.cmi theories/Init/datatypes.cmi -theories/Arith/factorial.cmi: theories/Init/peano.cmi \ - theories/Init/datatypes.cmi -theories/Arith/max.cmi: theories/Init/specif.cmi theories/Init/datatypes.cmi -theories/Arith/min.cmi: theories/Init/specif.cmi theories/Init/datatypes.cmi -theories/Arith/mult.cmi: theories/Arith/plus.cmi theories/Init/datatypes.cmi -theories/Arith/peano_dec.cmi: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi -theories/Arith/plus.cmi: theories/Init/specif.cmi theories/Init/datatypes.cmi -theories/Arith/wf_nat.cmi: theories/Init/datatypes.cmi -theories/Bool/boolEq.cmi: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi -theories/Bool/bool.cmi: theories/Init/specif.cmi theories/Init/datatypes.cmi -theories/Bool/bvector.cmi: theories/Init/peano.cmi \ - theories/Init/datatypes.cmi theories/Bool/bool.cmi -theories/Bool/decBool.cmi: theories/Init/specif.cmi -theories/Bool/ifProp.cmi: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi -theories/Bool/sumbool.cmi: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi -theories/Bool/zerob.cmi: theories/Init/datatypes.cmi -theories/FSets/decidableTypeEx.cmi: theories/Init/specif.cmi \ - theories/FSets/orderedTypeEx.cmi theories/FSets/orderedType.cmi \ - theories/Init/datatypes.cmi -theories/FSets/decidableType.cmi: theories/Init/specif.cmi -theories/FSets/fMapAVL.cmi: theories/Init/wf.cmi theories/Init/specif.cmi \ - theories/FSets/orderedType.cmi theories/Lists/list.cmi \ - theories/FSets/int.cmi theories/Init/datatypes.cmi \ - theories/NArith/binPos.cmi theories/ZArith/binInt.cmi -theories/FSets/fMapFacts.cmi: theories/Init/specif.cmi \ - theories/FSets/fMapInterface.cmi theories/Init/datatypes.cmi -theories/FSets/fMapInterface.cmi: theories/FSets/orderedType.cmi \ - theories/Lists/list.cmi theories/Init/datatypes.cmi -theories/FSets/fMapIntMap.cmi: theories/Init/specif.cmi \ - theories/FSets/orderedType.cmi theories/NArith/ndigits.cmi \ - theories/IntMap/mapiter.cmi theories/IntMap/mapcanon.cmi \ - theories/IntMap/map.cmi theories/Lists/list.cmi \ - theories/Init/datatypes.cmi theories/NArith/binNat.cmi -theories/FSets/fMapList.cmi: theories/Init/specif.cmi \ - theories/FSets/orderedType.cmi theories/Lists/list.cmi \ - theories/Init/datatypes.cmi -theories/FSets/fMapPositive.cmi: theories/Init/specif.cmi \ - theories/FSets/orderedType.cmi theories/Lists/list.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi -theories/FSets/fMapWeakFacts.cmi: theories/Init/specif.cmi \ - theories/Lists/list.cmi theories/FSets/fMapWeakInterface.cmi \ - theories/Init/datatypes.cmi -theories/FSets/fMapWeakInterface.cmi: theories/Lists/list.cmi \ - theories/FSets/decidableType.cmi theories/Init/datatypes.cmi -theories/FSets/fMapWeakList.cmi: theories/Init/specif.cmi \ - theories/Lists/list.cmi theories/FSets/decidableType.cmi \ - theories/Init/datatypes.cmi -theories/FSets/fSetAVL.cmi: theories/Init/wf.cmi theories/Init/specif.cmi \ - theories/Init/peano.cmi theories/FSets/orderedType.cmi \ - theories/Lists/list.cmi theories/FSets/int.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/ZArith/binInt.cmi -theories/FSets/fSetBridge.cmi: theories/Init/specif.cmi \ - theories/FSets/orderedType.cmi theories/Lists/list.cmi \ - theories/FSets/fSetInterface.cmi theories/Init/datatypes.cmi -theories/FSets/fSetEqProperties.cmi: theories/Init/specif.cmi \ - theories/Setoids/setoid.cmi theories/Init/peano.cmi \ - theories/FSets/fSetInterface.cmi theories/Init/datatypes.cmi \ - theories/Bool/bool.cmi -theories/FSets/fSetFacts.cmi: theories/Init/specif.cmi \ - theories/Setoids/setoid.cmi theories/FSets/fSetInterface.cmi \ - theories/Init/datatypes.cmi -theories/FSets/fSetInterface.cmi: theories/Init/specif.cmi \ - theories/FSets/orderedType.cmi theories/Lists/list.cmi \ - theories/Init/datatypes.cmi -theories/FSets/fSetList.cmi: theories/Init/specif.cmi \ - theories/FSets/orderedType.cmi theories/Lists/list.cmi \ - theories/Init/datatypes.cmi -theories/FSets/fSetProperties.cmi: theories/Init/specif.cmi \ - theories/Setoids/setoid.cmi theories/Lists/list.cmi \ - theories/FSets/fSetInterface.cmi theories/Init/datatypes.cmi -theories/FSets/fSetToFiniteSet.cmi: theories/Init/specif.cmi \ - theories/Setoids/setoid.cmi theories/FSets/orderedTypeEx.cmi \ - theories/FSets/orderedType.cmi theories/Lists/list.cmi \ - theories/Init/datatypes.cmi -theories/FSets/fSetWeakFacts.cmi: theories/Init/specif.cmi \ - theories/Setoids/setoid.cmi theories/FSets/fSetWeakInterface.cmi \ - theories/Init/datatypes.cmi -theories/FSets/fSetWeakInterface.cmi: theories/Lists/list.cmi \ - theories/FSets/decidableType.cmi theories/Init/datatypes.cmi -theories/FSets/fSetWeakList.cmi: theories/Init/specif.cmi \ - theories/Lists/list.cmi theories/FSets/decidableType.cmi \ - theories/Init/datatypes.cmi -theories/FSets/fSetWeakProperties.cmi: theories/Init/specif.cmi \ - theories/Setoids/setoid.cmi theories/Lists/list.cmi \ - theories/FSets/fSetWeakInterface.cmi theories/Init/datatypes.cmi -theories/FSets/int.cmi: theories/ZArith/zmax.cmi \ - theories/ZArith/zArith_dec.cmi theories/Init/specif.cmi \ - theories/NArith/binPos.cmi theories/ZArith/binInt.cmi -theories/FSets/orderedTypeAlt.cmi: theories/Init/specif.cmi \ - theories/FSets/orderedType.cmi theories/Init/datatypes.cmi -theories/FSets/orderedTypeEx.cmi: theories/Init/specif.cmi \ - theories/FSets/orderedType.cmi theories/Init/datatypes.cmi \ - theories/Arith/compare_dec.cmi theories/NArith/binPos.cmi \ - theories/NArith/binNat.cmi theories/ZArith/binInt.cmi -theories/FSets/orderedType.cmi: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi -theories/Init/peano.cmi: theories/Init/datatypes.cmi -theories/Init/specif.cmi: theories/Init/datatypes.cmi -theories/IntMap/adalloc.cmi: theories/Bool/sumbool.cmi \ - theories/Init/specif.cmi theories/NArith/ndec.cmi theories/IntMap/map.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/NArith/binNat.cmi -theories/IntMap/fset.cmi: theories/Init/specif.cmi \ - theories/NArith/ndigits.cmi theories/NArith/ndec.cmi \ - theories/IntMap/map.cmi theories/Init/datatypes.cmi \ - theories/NArith/binNat.cmi -theories/IntMap/lsort.cmi: theories/Bool/sumbool.cmi theories/Init/specif.cmi \ - theories/NArith/ndigits.cmi theories/NArith/ndec.cmi \ - theories/IntMap/mapiter.cmi theories/IntMap/map.cmi \ - theories/Lists/list.cmi theories/Init/datatypes.cmi \ - theories/NArith/binNat.cmi -theories/IntMap/mapcanon.cmi: theories/Init/specif.cmi \ - theories/IntMap/map.cmi -theories/IntMap/mapcard.cmi: theories/Bool/sumbool.cmi \ - theories/Init/specif.cmi theories/Arith/plus.cmi \ - theories/Arith/peano_dec.cmi theories/Init/peano.cmi \ - theories/NArith/ndigits.cmi theories/NArith/ndec.cmi \ - theories/IntMap/map.cmi theories/Init/datatypes.cmi \ - theories/NArith/binNat.cmi -theories/IntMap/mapfold.cmi: theories/Init/specif.cmi \ - theories/IntMap/mapiter.cmi theories/IntMap/map.cmi \ - theories/IntMap/fset.cmi theories/Init/datatypes.cmi -theories/IntMap/mapiter.cmi: theories/Bool/sumbool.cmi \ - theories/Init/specif.cmi theories/NArith/ndigits.cmi \ - theories/NArith/ndec.cmi theories/IntMap/map.cmi theories/Lists/list.cmi \ - theories/Init/datatypes.cmi theories/NArith/binNat.cmi -theories/IntMap/maplists.cmi: theories/Bool/sumbool.cmi \ - theories/Init/specif.cmi theories/NArith/ndec.cmi \ - theories/IntMap/mapiter.cmi theories/IntMap/map.cmi \ - theories/Lists/list.cmi theories/IntMap/fset.cmi \ - theories/Init/datatypes.cmi -theories/IntMap/map.cmi: theories/Init/specif.cmi theories/Init/peano.cmi \ - theories/NArith/ndigits.cmi theories/NArith/ndec.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/NArith/binNat.cmi -theories/IntMap/mapsubset.cmi: theories/IntMap/mapiter.cmi \ - theories/IntMap/map.cmi theories/IntMap/fset.cmi \ - theories/Init/datatypes.cmi theories/Bool/bool.cmi -theories/Lists/list.cmi: theories/Init/specif.cmi theories/Init/datatypes.cmi -theories/Lists/listSet.cmi: theories/Init/specif.cmi theories/Lists/list.cmi \ - theories/Init/datatypes.cmi -theories/Lists/monoList.cmi: theories/Init/datatypes.cmi -theories/Lists/setoidList.cmi: theories/Init/specif.cmi \ - theories/Lists/list.cmi theories/Init/datatypes.cmi -theories/Lists/streams.cmi: theories/Init/datatypes.cmi -theories/Lists/theoryList.cmi: theories/Init/specif.cmi \ - theories/Lists/list.cmi theories/Init/datatypes.cmi -theories/Logic/choiceFacts.cmi: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi -theories/Logic/classicalDescription.cmi: theories/Init/specif.cmi \ - theories/Logic/choiceFacts.cmi -theories/Logic/classicalEpsilon.cmi: theories/Init/specif.cmi \ - theories/Logic/choiceFacts.cmi -theories/Logic/diaconescu.cmi: theories/Init/specif.cmi -theories/Logic/eqdep_dec.cmi: theories/Init/specif.cmi -theories/NArith/binNat.cmi: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi -theories/NArith/binPos.cmi: theories/Init/peano.cmi \ - theories/Init/datatypes.cmi -theories/NArith/ndec.cmi: theories/Bool/sumbool.cmi theories/Init/specif.cmi \ - theories/NArith/nnat.cmi theories/NArith/ndigits.cmi \ - theories/Init/datatypes.cmi theories/Arith/compare_dec.cmi \ - theories/NArith/binPos.cmi theories/NArith/binNat.cmi -theories/NArith/ndigits.cmi: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/Bool/bvector.cmi \ - theories/Bool/bool.cmi theories/NArith/binPos.cmi \ - theories/NArith/binNat.cmi -theories/NArith/ndist.cmi: theories/NArith/ndigits.cmi theories/Arith/min.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/NArith/binNat.cmi -theories/NArith/nnat.cmi: theories/Init/datatypes.cmi \ - theories/NArith/binPos.cmi theories/NArith/binNat.cmi -theories/QArith/qArith_base.cmi: theories/ZArith/zArith_dec.cmi \ - theories/Init/specif.cmi theories/Setoids/setoid.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/ZArith/binInt.cmi -theories/QArith/qreals.cmi: theories/QArith/qArith_base.cmi \ - theories/ZArith/binInt.cmi -theories/QArith/qreduction.cmi: theories/ZArith/znumtheory.cmi \ - theories/Setoids/setoid.cmi theories/QArith/qArith_base.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/ZArith/binInt.cmi -theories/QArith/qring.cmi: theories/Init/specif.cmi \ - theories/QArith/qArith_base.cmi theories/Init/datatypes.cmi -theories/Relations/relation_Operators.cmi: theories/Init/specif.cmi \ - theories/Lists/list.cmi -theories/Setoids/setoid.cmi: theories/Init/datatypes.cmi -theories/Sets/cpo.cmi: theories/Sets/partial_Order.cmi -theories/Sets/integers.cmi: theories/Sets/partial_Order.cmi \ - theories/Init/datatypes.cmi -theories/Sets/multiset.cmi: theories/Init/specif.cmi theories/Init/peano.cmi \ - theories/Init/datatypes.cmi -theories/Sets/partial_Order.cmi: theories/Sets/relations_1.cmi \ - theories/Sets/ensembles.cmi -theories/Sets/powerset.cmi: theories/Sets/partial_Order.cmi \ - theories/Sets/ensembles.cmi -theories/Sets/uniset.cmi: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi -theories/Sorting/heap.cmi: theories/Init/specif.cmi \ - theories/Sorting/sorting.cmi theories/Init/peano.cmi \ - theories/Sets/multiset.cmi theories/Lists/list.cmi \ - theories/Init/datatypes.cmi -theories/Sorting/permutation.cmi: theories/Init/specif.cmi \ - theories/Init/peano.cmi theories/Sets/multiset.cmi \ - theories/Lists/list.cmi theories/Init/datatypes.cmi -theories/Sorting/sorting.cmi: theories/Init/specif.cmi \ - theories/Lists/list.cmi -theories/Strings/ascii.cmi: theories/Init/specif.cmi theories/Init/peano.cmi \ - theories/Init/datatypes.cmi theories/Bool/bool.cmi \ - theories/NArith/binPos.cmi -theories/Strings/string.cmi: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/Strings/ascii.cmi -theories/Wellfounded/well_Ordering.cmi: theories/Init/specif.cmi -theories/ZArith/binInt.cmi: theories/Init/datatypes.cmi \ - theories/NArith/binPos.cmi theories/NArith/binNat.cmi -theories/ZArith/wf_Z.cmi: theories/Init/specif.cmi theories/Init/peano.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/ZArith/binInt.cmi -theories/ZArith/zabs.cmi: theories/Init/specif.cmi theories/ZArith/binInt.cmi -theories/ZArith/zArith_dec.cmi: theories/Bool/sumbool.cmi \ - theories/Init/specif.cmi theories/Init/datatypes.cmi \ - theories/ZArith/binInt.cmi -theories/ZArith/zbinary.cmi: theories/ZArith/zeven.cmi \ - theories/Init/datatypes.cmi theories/Bool/bvector.cmi \ - theories/NArith/binPos.cmi theories/ZArith/binInt.cmi -theories/ZArith/zbool.cmi: theories/ZArith/zeven.cmi \ - theories/ZArith/zArith_dec.cmi theories/Bool/sumbool.cmi \ - theories/Init/specif.cmi theories/Init/datatypes.cmi \ - theories/ZArith/binInt.cmi -theories/ZArith/zcomplements.cmi: theories/ZArith/zabs.cmi \ - theories/ZArith/wf_Z.cmi theories/Init/specif.cmi theories/Lists/list.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/ZArith/binInt.cmi -theories/ZArith/zdiv.cmi: theories/ZArith/zbool.cmi \ - theories/ZArith/zArith_dec.cmi theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/ZArith/binInt.cmi -theories/ZArith/zeven.cmi: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/ZArith/binInt.cmi -theories/ZArith/zlogarithm.cmi: theories/NArith/binPos.cmi \ - theories/ZArith/binInt.cmi -theories/ZArith/zmax.cmi: theories/Init/datatypes.cmi \ - theories/ZArith/binInt.cmi -theories/ZArith/zmin.cmi: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/ZArith/binInt.cmi -theories/ZArith/zmisc.cmi: theories/Init/datatypes.cmi \ - theories/NArith/binPos.cmi theories/ZArith/binInt.cmi -theories/ZArith/znumtheory.cmi: theories/ZArith/zorder.cmi \ - theories/ZArith/zdiv.cmi theories/ZArith/zArith_dec.cmi \ - theories/ZArith/wf_Z.cmi theories/Init/specif.cmi theories/Init/peano.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/ZArith/binInt.cmi -theories/ZArith/zorder.cmi: theories/Init/specif.cmi \ - theories/Init/datatypes.cmi theories/ZArith/binInt.cmi -theories/ZArith/zpower.cmi: theories/ZArith/zmisc.cmi \ - theories/Init/datatypes.cmi theories/NArith/binPos.cmi \ - theories/ZArith/binInt.cmi -theories/ZArith/zsqrt.cmi: theories/ZArith/zArith_dec.cmi \ - theories/Init/specif.cmi theories/NArith/binPos.cmi \ - theories/ZArith/binInt.cmi diff --git a/contrib/extraction/test/Makefile b/contrib/extraction/test/Makefile deleted file mode 100644 index 65a54090..00000000 --- a/contrib/extraction/test/Makefile +++ /dev/null @@ -1,109 +0,0 @@ -# -# General variables -# - -TOPDIR=../../.. - -# Files with axioms to be realized: can't be extracted directly - -AXIOMSVO:= \ -theories/Reals/% \ -theories/Num/% - -DIRS:= $(shell (cd $(TOPDIR);find theories -type d ! -path \*.svn\*)) - -INCL:= $(patsubst %,-I %,$(DIRS)) - -VO:= $(shell (cd $(TOPDIR);find theories -name \*.vo)) - -VO:= $(filter-out $(AXIOMSVO),$(VO)) - -ML:= $(shell test -x v2ml && ./v2ml $(VO)) - -MLI:= $(patsubst %.ml,%.mli,$(ML)) - -CMO:= $(patsubst %.ml,%.cmo,$(ML)) - -OSTDLIB:=$(shell (ocamlc -where)) - -# -# General rules -# - -all: v2ml ml $(MLI) $(CMO) - -ml: $(ML) - -depend: #$(ML) - rm -f .depend; ocamldep $(INCL) theories/*/*.ml theories/*/*.mli > .depend - -tree: - mkdir -p $(DIRS) - cp $(OSTDLIB)/pervasives.cmi $(OSTDLIB)/obj.cmi $(OSTDLIB)/lazy.cmi theories - -#%.mli:%.ml -# ./make_mli $< > $@ - -%.cmi:%.mli - ocamlc -c $(INCL) -nostdlib $< - -%.cmo:%.ml - ocamlc -c $(INCL) -nostdlib $< - -$(ML): ml2v - ./extract $@ - -clean: - rm -f theories/*/*.ml* theories/*/*.cm* - - -# -# Utilities -# - -open: - find theories -name "*".ml -exec ./qualify2open \{\} \; - -undo_open: - find theories -name "*".ml -exec mv \{\}.orig \{\} \; - -ml2v: ml2v.ml - ocamlopt -o $@ $< - -v2ml: v2ml.ml - ocamlopt -o $@ $< - $(MAKE) - -# -# Extraction of Reals -# - - -REALSAXIOMSVO:=theories/Reals/Rsyntax.vo - -REALSALLVO:=$(shell cd $(TOPDIR); ls -tr theories/Reals/*.vo) -REALSVO:=$(filter-out $(REALSAXIOMSVO),$(REALSALLVO)) -REALSML:=$(shell test -x v2ml && ./v2ml $(REALSVO)) -REALSCMO:= $(patsubst %.ml,%.cmo,$(REALSML)) - -reals: all realsml theories/Reals/addReals.cmo $(REALSCMO) - -realsml: $(REALSML) - -theories/Reals/addReals.ml: - cp -f addReals theories/Reals/addReals.ml - -$(REALSML): - ./extract $@ - - -# -# The End -# - -.PHONY: all tree clean reals realsml depend - -include .depend - - - diff --git a/contrib/extraction/test/Makefile.haskell b/contrib/extraction/test/Makefile.haskell deleted file mode 100644 index 6e1e15d1..00000000 --- a/contrib/extraction/test/Makefile.haskell +++ /dev/null @@ -1,416 +0,0 @@ -# -# General variables -# - -TOPDIR=../../.. - -# Files with axioms to be realized: can't be extracted directly - -AXIOMSVO:= \ -theories/Init/Prelude.vo \ -theories/Reals/% \ -theories/Num/% - -DIRS:= $(shell (cd $(TOPDIR);find theories -type d ! -name CVS)) - -INCL:= $(patsubst %,-i%,$(DIRS)) - -VO:= $(shell (cd $(TOPDIR);find theories -name \*.vo)) - -VO:= $(filter-out $(AXIOMSVO),$(VO)) - -HS:= $(shell test -x v2hs && ./v2hs $(VO)) - -O:= $(patsubst %.hs,%.o,$(HS)) - -# -# General rules -# - -all: v2hs hs $(O) - -hs: $(HS) - -tree: - mkdir -p $(DIRS) - -%.o:%.hs - ghc $(INCL) -c $< - -$(HS): hs2v - ./extract.haskell $@ - -clean: - rm -f theories/*/*.h* theories/*/*.o - - -# -# Utilities -# - -hs2v: hs2v.ml - ocamlc -o $@ $< - -v2hs: v2hs.ml - ocamlc -o $@ $< - $(MAKE) -f Makefile.haskell - - -# -# The End -# - -.PHONY: all tree clean depend - -# DO NOT DELETE: Beginning of Haskell dependencies -theories/Arith/Between.o : theories/Arith/Between.hs -theories/Arith/Bool_nat.o : theories/Arith/Bool_nat.hs -theories/Arith/Bool_nat.o : theories/Bool/Sumbool.o -theories/Arith/Bool_nat.o : theories/Init/Specif.o -theories/Arith/Bool_nat.o : theories/Arith/Peano_dec.o -theories/Arith/Bool_nat.o : theories/Init/Datatypes.o -theories/Arith/Bool_nat.o : theories/Arith/Compare_dec.o -theories/Arith/Compare_dec.o : theories/Arith/Compare_dec.hs -theories/Arith/Compare_dec.o : theories/Init/Specif.o -theories/Arith/Compare_dec.o : theories/Init/Logic.o -theories/Arith/Compare_dec.o : theories/Init/Datatypes.o -theories/Arith/Compare.o : theories/Arith/Compare.hs -theories/Arith/Compare.o : theories/Init/Specif.o -theories/Arith/Compare.o : theories/Init/Datatypes.o -theories/Arith/Compare.o : theories/Arith/Compare_dec.o -theories/Arith/Div2.o : theories/Arith/Div2.hs -theories/Arith/Div2.o : theories/Init/Specif.o -theories/Arith/Div2.o : theories/Init/Peano.o -theories/Arith/Div2.o : theories/Init/Datatypes.o -theories/Arith/EqNat.o : theories/Arith/EqNat.hs -theories/Arith/EqNat.o : theories/Init/Specif.o -theories/Arith/EqNat.o : theories/Init/Datatypes.o -theories/Arith/Euclid.o : theories/Arith/Euclid.hs -theories/Arith/Euclid.o : theories/Arith/Wf_nat.o -theories/Arith/Euclid.o : theories/Init/Specif.o -theories/Arith/Euclid.o : theories/Arith/Minus.o -theories/Arith/Euclid.o : theories/Init/Datatypes.o -theories/Arith/Euclid.o : theories/Arith/Compare_dec.o -theories/Arith/Even.o : theories/Arith/Even.hs -theories/Arith/Even.o : theories/Init/Specif.o -theories/Arith/Even.o : theories/Init/Datatypes.o -theories/Arith/Gt.o : theories/Arith/Gt.hs -theories/Arith/Le.o : theories/Arith/Le.hs -theories/Arith/Lt.o : theories/Arith/Lt.hs -theories/Arith/Max.o : theories/Arith/Max.hs -theories/Arith/Max.o : theories/Init/Specif.o -theories/Arith/Max.o : theories/Init/Logic.o -theories/Arith/Max.o : theories/Init/Datatypes.o -theories/Arith/Min.o : theories/Arith/Min.hs -theories/Arith/Min.o : theories/Init/Specif.o -theories/Arith/Min.o : theories/Init/Logic.o -theories/Arith/Min.o : theories/Init/Datatypes.o -theories/Arith/Minus.o : theories/Arith/Minus.hs -theories/Arith/Minus.o : theories/Init/Datatypes.o -theories/Arith/Mult.o : theories/Arith/Mult.hs -theories/Arith/Mult.o : theories/Arith/Plus.o -theories/Arith/Mult.o : theories/Init/Datatypes.o -theories/Arith/Peano_dec.o : theories/Arith/Peano_dec.hs -theories/Arith/Peano_dec.o : theories/Init/Specif.o -theories/Arith/Peano_dec.o : theories/Init/Datatypes.o -theories/Arith/Plus.o : theories/Arith/Plus.hs -theories/Arith/Plus.o : theories/Init/Specif.o -theories/Arith/Plus.o : theories/Init/Logic.o -theories/Arith/Plus.o : theories/Init/Datatypes.o -theories/Arith/Wf_nat.o : theories/Arith/Wf_nat.hs -theories/Arith/Wf_nat.o : theories/Init/Wf.o -theories/Arith/Wf_nat.o : theories/Init/Logic.o -theories/Arith/Wf_nat.o : theories/Init/Datatypes.o -theories/Bool/BoolEq.o : theories/Bool/BoolEq.hs -theories/Bool/BoolEq.o : theories/Init/Specif.o -theories/Bool/BoolEq.o : theories/Init/Datatypes.o -theories/Bool/Bool.o : theories/Bool/Bool.hs -theories/Bool/Bool.o : theories/Init/Specif.o -theories/Bool/Bool.o : theories/Init/Datatypes.o -theories/Bool/DecBool.o : theories/Bool/DecBool.hs -theories/Bool/DecBool.o : theories/Init/Specif.o -theories/Bool/IfProp.o : theories/Bool/IfProp.hs -theories/Bool/IfProp.o : theories/Init/Specif.o -theories/Bool/IfProp.o : theories/Init/Datatypes.o -theories/Bool/Sumbool.o : theories/Bool/Sumbool.hs -theories/Bool/Sumbool.o : theories/Init/Specif.o -theories/Bool/Sumbool.o : theories/Init/Datatypes.o -theories/Bool/Zerob.o : theories/Bool/Zerob.hs -theories/Bool/Zerob.o : theories/Init/Datatypes.o -theories/Init/Datatypes.o : theories/Init/Datatypes.hs -theories/Init/DatatypesSyntax.o : theories/Init/DatatypesSyntax.hs -theories/Init/Logic.o : theories/Init/Logic.hs -theories/Init/LogicSyntax.o : theories/Init/LogicSyntax.hs -theories/Init/Logic_Type.o : theories/Init/Logic_Type.hs -theories/Init/Logic_TypeSyntax.o : theories/Init/Logic_TypeSyntax.hs -theories/Init/Peano.o : theories/Init/Peano.hs -theories/Init/Peano.o : theories/Init/Datatypes.o -theories/Init/Specif.o : theories/Init/Specif.hs -theories/Init/Specif.o : theories/Init/Logic.o -theories/Init/Specif.o : theories/Init/Datatypes.o -theories/Init/SpecifSyntax.o : theories/Init/SpecifSyntax.hs -theories/Init/Wf.o : theories/Init/Wf.hs -theories/IntMap/Adalloc.o : theories/IntMap/Adalloc.hs -theories/IntMap/Adalloc.o : theories/ZArith/Fast_integer.o -theories/IntMap/Adalloc.o : theories/Bool/Sumbool.o -theories/IntMap/Adalloc.o : theories/Init/Specif.o -theories/IntMap/Adalloc.o : theories/IntMap/Map.o -theories/IntMap/Adalloc.o : theories/Init/Logic.o -theories/IntMap/Adalloc.o : theories/Init/Datatypes.o -theories/IntMap/Adalloc.o : theories/IntMap/Addr.o -theories/IntMap/Adalloc.o : theories/IntMap/Addec.o -theories/IntMap/Addec.o : theories/IntMap/Addec.hs -theories/IntMap/Addec.o : theories/ZArith/Fast_integer.o -theories/IntMap/Addec.o : theories/Bool/Sumbool.o -theories/IntMap/Addec.o : theories/Init/Specif.o -theories/IntMap/Addec.o : theories/Init/Datatypes.o -theories/IntMap/Addec.o : theories/IntMap/Addr.o -theories/IntMap/Addr.o : theories/IntMap/Addr.hs -theories/IntMap/Addr.o : theories/ZArith/Fast_integer.o -theories/IntMap/Addr.o : theories/Init/Specif.o -theories/IntMap/Addr.o : theories/Init/Datatypes.o -theories/IntMap/Addr.o : theories/Bool/Bool.o -theories/IntMap/Adist.o : theories/IntMap/Adist.hs -theories/IntMap/Adist.o : theories/ZArith/Fast_integer.o -theories/IntMap/Adist.o : theories/Arith/Min.o -theories/IntMap/Adist.o : theories/Init/Datatypes.o -theories/IntMap/Adist.o : theories/IntMap/Addr.o -theories/IntMap/Allmaps.o : theories/IntMap/Allmaps.hs -theories/IntMap/Fset.o : theories/IntMap/Fset.hs -theories/IntMap/Fset.o : theories/Init/Specif.o -theories/IntMap/Fset.o : theories/IntMap/Map.o -theories/IntMap/Fset.o : theories/Init/Logic.o -theories/IntMap/Fset.o : theories/Init/Datatypes.o -theories/IntMap/Fset.o : theories/IntMap/Addr.o -theories/IntMap/Fset.o : theories/IntMap/Addec.o -theories/IntMap/Lsort.o : theories/IntMap/Lsort.hs -theories/IntMap/Lsort.o : theories/ZArith/Fast_integer.o -theories/IntMap/Lsort.o : theories/Bool/Sumbool.o -theories/IntMap/Lsort.o : theories/Init/Specif.o -theories/IntMap/Lsort.o : theories/Lists/PolyList.o -theories/IntMap/Lsort.o : theories/IntMap/Mapiter.o -theories/IntMap/Lsort.o : theories/IntMap/Map.o -theories/IntMap/Lsort.o : theories/Init/Logic.o -theories/IntMap/Lsort.o : theories/Init/Datatypes.o -theories/IntMap/Lsort.o : theories/Bool/Bool.o -theories/IntMap/Lsort.o : theories/IntMap/Addr.o -theories/IntMap/Lsort.o : theories/IntMap/Addec.o -theories/IntMap/Mapaxioms.o : theories/IntMap/Mapaxioms.hs -theories/IntMap/Mapcanon.o : theories/IntMap/Mapcanon.hs -theories/IntMap/Mapcanon.o : theories/Init/Specif.o -theories/IntMap/Mapcanon.o : theories/IntMap/Map.o -theories/IntMap/Mapcard.o : theories/IntMap/Mapcard.hs -theories/IntMap/Mapcard.o : theories/Bool/Sumbool.o -theories/IntMap/Mapcard.o : theories/Init/Specif.o -theories/IntMap/Mapcard.o : theories/Arith/Plus.o -theories/IntMap/Mapcard.o : theories/Arith/Peano_dec.o -theories/IntMap/Mapcard.o : theories/Init/Peano.o -theories/IntMap/Mapcard.o : theories/IntMap/Map.o -theories/IntMap/Mapcard.o : theories/Init/Logic.o -theories/IntMap/Mapcard.o : theories/Init/Datatypes.o -theories/IntMap/Mapcard.o : theories/IntMap/Addr.o -theories/IntMap/Mapcard.o : theories/IntMap/Addec.o -theories/IntMap/Mapc.o : theories/IntMap/Mapc.hs -theories/IntMap/Mapfold.o : theories/IntMap/Mapfold.hs -theories/IntMap/Mapfold.o : theories/Init/Specif.o -theories/IntMap/Mapfold.o : theories/IntMap/Mapiter.o -theories/IntMap/Mapfold.o : theories/IntMap/Map.o -theories/IntMap/Mapfold.o : theories/Init/Logic.o -theories/IntMap/Mapfold.o : theories/IntMap/Fset.o -theories/IntMap/Mapfold.o : theories/Init/Datatypes.o -theories/IntMap/Mapfold.o : theories/IntMap/Addr.o -theories/IntMap/Map.o : theories/IntMap/Map.hs -theories/IntMap/Map.o : theories/ZArith/Fast_integer.o -theories/IntMap/Map.o : theories/Init/Specif.o -theories/IntMap/Map.o : theories/Init/Peano.o -theories/IntMap/Map.o : theories/Init/Datatypes.o -theories/IntMap/Map.o : theories/IntMap/Addr.o -theories/IntMap/Map.o : theories/IntMap/Addec.o -theories/IntMap/Mapiter.o : theories/IntMap/Mapiter.hs -theories/IntMap/Mapiter.o : theories/Bool/Sumbool.o -theories/IntMap/Mapiter.o : theories/Init/Specif.o -theories/IntMap/Mapiter.o : theories/Lists/PolyList.o -theories/IntMap/Mapiter.o : theories/IntMap/Map.o -theories/IntMap/Mapiter.o : theories/Init/Logic.o -theories/IntMap/Mapiter.o : theories/Init/Datatypes.o -theories/IntMap/Mapiter.o : theories/IntMap/Addr.o -theories/IntMap/Mapiter.o : theories/IntMap/Addec.o -theories/IntMap/Maplists.o : theories/IntMap/Maplists.hs -theories/IntMap/Maplists.o : theories/Bool/Sumbool.o -theories/IntMap/Maplists.o : theories/Init/Specif.o -theories/IntMap/Maplists.o : theories/Lists/PolyList.o -theories/IntMap/Maplists.o : theories/IntMap/Mapiter.o -theories/IntMap/Maplists.o : theories/IntMap/Map.o -theories/IntMap/Maplists.o : theories/Init/Logic.o -theories/IntMap/Maplists.o : theories/IntMap/Fset.o -theories/IntMap/Maplists.o : theories/Init/Datatypes.o -theories/IntMap/Maplists.o : theories/Bool/Bool.o -theories/IntMap/Maplists.o : theories/IntMap/Addr.o -theories/IntMap/Maplists.o : theories/IntMap/Addec.o -theories/IntMap/Mapsubset.o : theories/IntMap/Mapsubset.hs -theories/IntMap/Mapsubset.o : theories/IntMap/Mapiter.o -theories/IntMap/Mapsubset.o : theories/IntMap/Map.o -theories/IntMap/Mapsubset.o : theories/IntMap/Fset.o -theories/IntMap/Mapsubset.o : theories/Init/Datatypes.o -theories/IntMap/Mapsubset.o : theories/Bool/Bool.o -theories/Lists/ListSet.o : theories/Lists/ListSet.hs -theories/Lists/ListSet.o : theories/Init/Specif.o -theories/Lists/ListSet.o : theories/Lists/PolyList.o -theories/Lists/ListSet.o : theories/Init/Logic.o -theories/Lists/ListSet.o : theories/Init/Datatypes.o -theories/Lists/PolyList.o : theories/Lists/PolyList.hs -theories/Lists/PolyList.o : theories/Init/Specif.o -theories/Lists/PolyList.o : theories/Init/Datatypes.o -theories/Lists/PolyListSyntax.o : theories/Lists/PolyListSyntax.hs -theories/Lists/Streams.o : theories/Lists/Streams.hs -theories/Lists/Streams.o : theories/Init/Datatypes.o -theories/Lists/TheoryList.o : theories/Lists/TheoryList.hs -theories/Lists/TheoryList.o : theories/Init/Specif.o -theories/Lists/TheoryList.o : theories/Lists/PolyList.o -theories/Lists/TheoryList.o : theories/Bool/DecBool.o -theories/Lists/TheoryList.o : theories/Init/Datatypes.o -theories/Logic/Berardi.o : theories/Logic/Berardi.hs -theories/Logic/ClassicalFacts.o : theories/Logic/ClassicalFacts.hs -theories/Logic/Classical.o : theories/Logic/Classical.hs -theories/Logic/Classical_Pred_Set.o : theories/Logic/Classical_Pred_Set.hs -theories/Logic/Classical_Pred_Type.o : theories/Logic/Classical_Pred_Type.hs -theories/Logic/Classical_Prop.o : theories/Logic/Classical_Prop.hs -theories/Logic/Classical_Type.o : theories/Logic/Classical_Type.hs -theories/Logic/Decidable.o : theories/Logic/Decidable.hs -theories/Logic/Eqdep_dec.o : theories/Logic/Eqdep_dec.hs -theories/Logic/Eqdep.o : theories/Logic/Eqdep.hs -theories/Logic/Hurkens.o : theories/Logic/Hurkens.hs -theories/Logic/JMeq.o : theories/Logic/JMeq.hs -theories/Logic/ProofIrrelevance.o : theories/Logic/ProofIrrelevance.hs -theories/Relations/Newman.o : theories/Relations/Newman.hs -theories/Relations/Operators_Properties.o : theories/Relations/Operators_Properties.hs -theories/Relations/Relation_Definitions.o : theories/Relations/Relation_Definitions.hs -theories/Relations/Relation_Operators.o : theories/Relations/Relation_Operators.hs -theories/Relations/Relation_Operators.o : theories/Init/Specif.o -theories/Relations/Relation_Operators.o : theories/Lists/PolyList.o -theories/Relations/Relations.o : theories/Relations/Relations.hs -theories/Relations/Rstar.o : theories/Relations/Rstar.hs -theories/Setoids/Setoid.o : theories/Setoids/Setoid.hs -theories/Sets/Classical_sets.o : theories/Sets/Classical_sets.hs -theories/Sets/Constructive_sets.o : theories/Sets/Constructive_sets.hs -theories/Sets/Cpo.o : theories/Sets/Cpo.hs -theories/Sets/Cpo.o : theories/Sets/Partial_Order.o -theories/Sets/Ensembles.o : theories/Sets/Ensembles.hs -theories/Sets/Finite_sets_facts.o : theories/Sets/Finite_sets_facts.hs -theories/Sets/Finite_sets.o : theories/Sets/Finite_sets.hs -theories/Sets/Image.o : theories/Sets/Image.hs -theories/Sets/Infinite_sets.o : theories/Sets/Infinite_sets.hs -theories/Sets/Integers.o : theories/Sets/Integers.hs -theories/Sets/Integers.o : theories/Sets/Partial_Order.o -theories/Sets/Integers.o : theories/Init/Datatypes.o -theories/Sets/Multiset.o : theories/Sets/Multiset.hs -theories/Sets/Multiset.o : theories/Init/Specif.o -theories/Sets/Multiset.o : theories/Init/Peano.o -theories/Sets/Multiset.o : theories/Init/Datatypes.o -theories/Sets/Partial_Order.o : theories/Sets/Partial_Order.hs -theories/Sets/Permut.o : theories/Sets/Permut.hs -theories/Sets/Powerset_Classical_facts.o : theories/Sets/Powerset_Classical_facts.hs -theories/Sets/Powerset_facts.o : theories/Sets/Powerset_facts.hs -theories/Sets/Powerset.o : theories/Sets/Powerset.hs -theories/Sets/Powerset.o : theories/Sets/Partial_Order.o -theories/Sets/Relations_1_facts.o : theories/Sets/Relations_1_facts.hs -theories/Sets/Relations_1.o : theories/Sets/Relations_1.hs -theories/Sets/Relations_2_facts.o : theories/Sets/Relations_2_facts.hs -theories/Sets/Relations_2.o : theories/Sets/Relations_2.hs -theories/Sets/Relations_3_facts.o : theories/Sets/Relations_3_facts.hs -theories/Sets/Relations_3.o : theories/Sets/Relations_3.hs -theories/Sets/Uniset.o : theories/Sets/Uniset.hs -theories/Sets/Uniset.o : theories/Init/Specif.o -theories/Sets/Uniset.o : theories/Init/Datatypes.o -theories/Sets/Uniset.o : theories/Bool/Bool.o -theories/Sorting/Heap.o : theories/Sorting/Heap.hs -theories/Sorting/Heap.o : theories/Init/Specif.o -theories/Sorting/Heap.o : theories/Sorting/Sorting.o -theories/Sorting/Heap.o : theories/Lists/PolyList.o -theories/Sorting/Heap.o : theories/Sets/Multiset.o -theories/Sorting/Heap.o : theories/Init/Logic.o -theories/Sorting/Permutation.o : theories/Sorting/Permutation.hs -theories/Sorting/Permutation.o : theories/Init/Specif.o -theories/Sorting/Permutation.o : theories/Lists/PolyList.o -theories/Sorting/Permutation.o : theories/Sets/Multiset.o -theories/Sorting/Sorting.o : theories/Sorting/Sorting.hs -theories/Sorting/Sorting.o : theories/Init/Specif.o -theories/Sorting/Sorting.o : theories/Lists/PolyList.o -theories/Sorting/Sorting.o : theories/Init/Logic.o -theories/Wellfounded/Disjoint_Union.o : theories/Wellfounded/Disjoint_Union.hs -theories/Wellfounded/Inclusion.o : theories/Wellfounded/Inclusion.hs -theories/Wellfounded/Inverse_Image.o : theories/Wellfounded/Inverse_Image.hs -theories/Wellfounded/Lexicographic_Exponentiation.o : theories/Wellfounded/Lexicographic_Exponentiation.hs -theories/Wellfounded/Lexicographic_Product.o : theories/Wellfounded/Lexicographic_Product.hs -theories/Wellfounded/Transitive_Closure.o : theories/Wellfounded/Transitive_Closure.hs -theories/Wellfounded/Union.o : theories/Wellfounded/Union.hs -theories/Wellfounded/Wellfounded.o : theories/Wellfounded/Wellfounded.hs -theories/Wellfounded/Well_Ordering.o : theories/Wellfounded/Well_Ordering.hs -theories/Wellfounded/Well_Ordering.o : theories/Init/Wf.o -theories/Wellfounded/Well_Ordering.o : theories/Init/Specif.o -theories/ZArith/Auxiliary.o : theories/ZArith/Auxiliary.hs -theories/ZArith/Fast_integer.o : theories/ZArith/Fast_integer.hs -theories/ZArith/Fast_integer.o : theories/Init/Peano.o -theories/ZArith/Fast_integer.o : theories/Init/Datatypes.o -theories/ZArith/Wf_Z.o : theories/ZArith/Wf_Z.hs -theories/ZArith/Wf_Z.o : theories/ZArith/Zarith_aux.o -theories/ZArith/Wf_Z.o : theories/ZArith/Fast_integer.o -theories/ZArith/Wf_Z.o : theories/Init/Specif.o -theories/ZArith/Wf_Z.o : theories/Init/Peano.o -theories/ZArith/Wf_Z.o : theories/Init/Logic.o -theories/ZArith/Wf_Z.o : theories/Init/Datatypes.o -theories/ZArith/Zarith_aux.o : theories/ZArith/Zarith_aux.hs -theories/ZArith/Zarith_aux.o : theories/ZArith/Fast_integer.o -theories/ZArith/Zarith_aux.o : theories/Init/Specif.o -theories/ZArith/Zarith_aux.o : theories/Init/Datatypes.o -theories/ZArith/ZArith_base.o : theories/ZArith/ZArith_base.hs -theories/ZArith/ZArith_dec.o : theories/ZArith/ZArith_dec.hs -theories/ZArith/ZArith_dec.o : theories/ZArith/Fast_integer.o -theories/ZArith/ZArith_dec.o : theories/Bool/Sumbool.o -theories/ZArith/ZArith_dec.o : theories/Init/Specif.o -theories/ZArith/ZArith_dec.o : theories/Init/Logic.o -theories/ZArith/ZArith.o : theories/ZArith/ZArith.hs -theories/ZArith/Zbool.o : theories/ZArith/Zbool.hs -theories/ZArith/Zbool.o : theories/ZArith/Fast_integer.o -theories/ZArith/Zbool.o : theories/ZArith/Zmisc.o -theories/ZArith/Zbool.o : theories/ZArith/ZArith_dec.o -theories/ZArith/Zbool.o : theories/Bool/Sumbool.o -theories/ZArith/Zbool.o : theories/Init/Specif.o -theories/ZArith/Zbool.o : theories/Init/Datatypes.o -theories/ZArith/Zcomplements.o : theories/ZArith/Zcomplements.hs -theories/ZArith/Zcomplements.o : theories/ZArith/Zarith_aux.o -theories/ZArith/Zcomplements.o : theories/ZArith/Fast_integer.o -theories/ZArith/Zcomplements.o : theories/ZArith/Wf_Z.o -theories/ZArith/Zcomplements.o : theories/Init/Specif.o -theories/ZArith/Zcomplements.o : theories/Init/Logic.o -theories/ZArith/Zcomplements.o : theories/Init/Datatypes.o -theories/ZArith/Zdiv.o : theories/ZArith/Zdiv.hs -theories/ZArith/Zdiv.o : theories/ZArith/Zarith_aux.o -theories/ZArith/Zdiv.o : theories/ZArith/Fast_integer.o -theories/ZArith/Zdiv.o : theories/ZArith/Zmisc.o -theories/ZArith/Zdiv.o : theories/ZArith/ZArith_dec.o -theories/ZArith/Zdiv.o : theories/Init/Specif.o -theories/ZArith/Zdiv.o : theories/Init/Logic.o -theories/ZArith/Zdiv.o : theories/Init/Datatypes.o -theories/ZArith/Zhints.o : theories/ZArith/Zhints.hs -theories/ZArith/Zlogarithm.o : theories/ZArith/Zlogarithm.hs -theories/ZArith/Zlogarithm.o : theories/ZArith/Zarith_aux.o -theories/ZArith/Zlogarithm.o : theories/ZArith/Fast_integer.o -theories/ZArith/Zmisc.o : theories/ZArith/Zmisc.hs -theories/ZArith/Zmisc.o : theories/ZArith/Fast_integer.o -theories/ZArith/Zmisc.o : theories/Init/Specif.o -theories/ZArith/Zmisc.o : theories/Init/Datatypes.o -theories/ZArith/Zpower.o : theories/ZArith/Zpower.hs -theories/ZArith/Zpower.o : theories/ZArith/Zarith_aux.o -theories/ZArith/Zpower.o : theories/ZArith/Fast_integer.o -theories/ZArith/Zpower.o : theories/ZArith/Zmisc.o -theories/ZArith/Zpower.o : theories/Init/Logic.o -theories/ZArith/Zpower.o : theories/Init/Datatypes.o -theories/ZArith/Zsqrt.o : theories/ZArith/Zsqrt.hs -theories/ZArith/Zsqrt.o : theories/ZArith/Zarith_aux.o -theories/ZArith/Zsqrt.o : theories/ZArith/Fast_integer.o -theories/ZArith/Zsqrt.o : theories/ZArith/ZArith_dec.o -theories/ZArith/Zsqrt.o : theories/Init/Specif.o -theories/ZArith/Zsqrt.o : theories/Init/Logic.o -theories/ZArith/Zwf.o : theories/ZArith/Zwf.hs -# DO NOT DELETE: End of Haskell dependencies diff --git a/contrib/extraction/test/addReals b/contrib/extraction/test/addReals deleted file mode 100644 index fb73d47b..00000000 --- a/contrib/extraction/test/addReals +++ /dev/null @@ -1,21 +0,0 @@ -open TypeSyntax -open Fast_integer - - -let total_order_T x y = -if x = y then InleftT RightT -else if x < y then InleftT LeftT -else InrightT - -let rec int_to_positive i = - if i = 1 then XH - else - if (i mod 2) = 0 then XO (int_to_positive (i/2)) - else XI (int_to_positive (i/2)) - -let rec int_to_Z i = - if i = 0 then ZERO - else if i > 0 then POS (int_to_positive i) - else NEG (int_to_positive (-i)) - -let my_ceil x = int_to_Z (succ (int_of_float (floor x))) diff --git a/contrib/extraction/test/custom/Adalloc b/contrib/extraction/test/custom/Adalloc deleted file mode 100644 index e7204838..00000000 --- a/contrib/extraction/test/custom/Adalloc +++ /dev/null @@ -1,2 +0,0 @@ -Require Import BinNat. -Extraction NoInline Ndouble Ndouble_plus_one. diff --git a/contrib/extraction/test/custom/Euclid b/contrib/extraction/test/custom/Euclid deleted file mode 100644 index a58e3940..00000000 --- a/contrib/extraction/test/custom/Euclid +++ /dev/null @@ -1 +0,0 @@ -Extraction Inline Wf_nat.gt_wf_rec Wf_nat.lt_wf_rec. diff --git a/contrib/extraction/test/custom/List b/contrib/extraction/test/custom/List deleted file mode 100644 index ffee7dc9..00000000 --- a/contrib/extraction/test/custom/List +++ /dev/null @@ -1 +0,0 @@ -Extraction NoInline map. diff --git a/contrib/extraction/test/custom/ListSet b/contrib/extraction/test/custom/ListSet deleted file mode 100644 index c9bea52a..00000000 --- a/contrib/extraction/test/custom/ListSet +++ /dev/null @@ -1 +0,0 @@ -Extraction NoInline set_add set_mem. diff --git a/contrib/extraction/test/custom/Lsort b/contrib/extraction/test/custom/Lsort deleted file mode 100644 index 22ab18e3..00000000 --- a/contrib/extraction/test/custom/Lsort +++ /dev/null @@ -1,2 +0,0 @@ -Require Import BinNat. -Extraction NoInline Ndouble Ndouble_plus_one. diff --git a/contrib/extraction/test/custom/Map b/contrib/extraction/test/custom/Map deleted file mode 100644 index f024dbd7..00000000 --- a/contrib/extraction/test/custom/Map +++ /dev/null @@ -1,3 +0,0 @@ -Require Import BinNat. -Extraction NoInline Ndouble Ndouble_plus_one. - diff --git a/contrib/extraction/test/custom/Mapcard b/contrib/extraction/test/custom/Mapcard deleted file mode 100644 index 5932cf7b..00000000 --- a/contrib/extraction/test/custom/Mapcard +++ /dev/null @@ -1,4 +0,0 @@ -Require Import Plus. -Extraction NoInline plus_is_one. -Require Import BinNat. -Extraction NoInline Ndouble Ndouble_plus_one. diff --git a/contrib/extraction/test/custom/Mapiter b/contrib/extraction/test/custom/Mapiter deleted file mode 100644 index 22ab18e3..00000000 --- a/contrib/extraction/test/custom/Mapiter +++ /dev/null @@ -1,2 +0,0 @@ -Require Import BinNat. -Extraction NoInline Ndouble Ndouble_plus_one. diff --git a/contrib/extraction/test/custom/R_Ifp b/contrib/extraction/test/custom/R_Ifp deleted file mode 100644 index d8f1b3e7..00000000 --- a/contrib/extraction/test/custom/R_Ifp +++ /dev/null @@ -1,2 +0,0 @@ -Load "custom/Reals". - diff --git a/contrib/extraction/test/custom/R_sqr b/contrib/extraction/test/custom/R_sqr deleted file mode 100644 index d8f1b3e7..00000000 --- a/contrib/extraction/test/custom/R_sqr +++ /dev/null @@ -1,2 +0,0 @@ -Load "custom/Reals". - diff --git a/contrib/extraction/test/custom/Ranalysis b/contrib/extraction/test/custom/Ranalysis deleted file mode 100644 index d8f1b3e7..00000000 --- a/contrib/extraction/test/custom/Ranalysis +++ /dev/null @@ -1,2 +0,0 @@ -Load "custom/Reals". - diff --git a/contrib/extraction/test/custom/Raxioms b/contrib/extraction/test/custom/Raxioms deleted file mode 100644 index d8f1b3e7..00000000 --- a/contrib/extraction/test/custom/Raxioms +++ /dev/null @@ -1,2 +0,0 @@ -Load "custom/Reals". - diff --git a/contrib/extraction/test/custom/Rbase b/contrib/extraction/test/custom/Rbase deleted file mode 100644 index d8f1b3e7..00000000 --- a/contrib/extraction/test/custom/Rbase +++ /dev/null @@ -1,2 +0,0 @@ -Load "custom/Reals". - diff --git a/contrib/extraction/test/custom/Rbasic_fun b/contrib/extraction/test/custom/Rbasic_fun deleted file mode 100644 index d8f1b3e7..00000000 --- a/contrib/extraction/test/custom/Rbasic_fun +++ /dev/null @@ -1,2 +0,0 @@ -Load "custom/Reals". - diff --git a/contrib/extraction/test/custom/Rdefinitions b/contrib/extraction/test/custom/Rdefinitions deleted file mode 100644 index d8f1b3e7..00000000 --- a/contrib/extraction/test/custom/Rdefinitions +++ /dev/null @@ -1,2 +0,0 @@ -Load "custom/Reals". - diff --git a/contrib/extraction/test/custom/Reals.v b/contrib/extraction/test/custom/Reals.v deleted file mode 100644 index 45d0a224..00000000 --- a/contrib/extraction/test/custom/Reals.v +++ /dev/null @@ -1,17 +0,0 @@ -Require Import Reals. -Extract Inlined Constant R => float. -Extract Inlined Constant R0 => "0.0". -Extract Inlined Constant R1 => "1.0". -Extract Inlined Constant Rplus => "(+.)". -Extract Inlined Constant Rmult => "( *.)". -Extract Inlined Constant Ropp => "(~-.)". -Extract Inlined Constant Rinv => "(fun x -> 1.0 /. x)". -Extract Inlined Constant Rlt => "(<)". -Extract Inlined Constant up => "AddReals.my_ceil". -Extract Inlined Constant total_order_T => "AddReals.total_order_T". -Extract Inlined Constant sqrt => "sqrt". -Extract Inlined Constant sigma => "(fun l h -> sigma_aux l h (Minus.minus h l))". -Extract Inlined Constant PI => "3.141593". -Extract Inlined Constant cos => cos. -Extract Inlined Constant sin => sin. -Extract Inlined Constant derive_pt => "(fun f x -> ((f (x+.1E-5))-.(f x))*.1E5)". diff --git a/contrib/extraction/test/custom/Rfunctions b/contrib/extraction/test/custom/Rfunctions deleted file mode 100644 index d8f1b3e7..00000000 --- a/contrib/extraction/test/custom/Rfunctions +++ /dev/null @@ -1,2 +0,0 @@ -Load "custom/Reals". - diff --git a/contrib/extraction/test/custom/Rgeom b/contrib/extraction/test/custom/Rgeom deleted file mode 100644 index d8f1b3e7..00000000 --- a/contrib/extraction/test/custom/Rgeom +++ /dev/null @@ -1,2 +0,0 @@ -Load "custom/Reals". - diff --git a/contrib/extraction/test/custom/Rlimit b/contrib/extraction/test/custom/Rlimit deleted file mode 100644 index d8f1b3e7..00000000 --- a/contrib/extraction/test/custom/Rlimit +++ /dev/null @@ -1,2 +0,0 @@ -Load "custom/Reals". - diff --git a/contrib/extraction/test/custom/Rseries b/contrib/extraction/test/custom/Rseries deleted file mode 100644 index d8f1b3e7..00000000 --- a/contrib/extraction/test/custom/Rseries +++ /dev/null @@ -1,2 +0,0 @@ -Load "custom/Reals". - diff --git a/contrib/extraction/test/custom/Rsigma b/contrib/extraction/test/custom/Rsigma deleted file mode 100644 index d8f1b3e7..00000000 --- a/contrib/extraction/test/custom/Rsigma +++ /dev/null @@ -1,2 +0,0 @@ -Load "custom/Reals". - diff --git a/contrib/extraction/test/custom/Rtrigo b/contrib/extraction/test/custom/Rtrigo deleted file mode 100644 index d8f1b3e7..00000000 --- a/contrib/extraction/test/custom/Rtrigo +++ /dev/null @@ -1,2 +0,0 @@ -Load "custom/Reals". - diff --git a/contrib/extraction/test/custom/ZArith_dec b/contrib/extraction/test/custom/ZArith_dec deleted file mode 100644 index 2201419e..00000000 --- a/contrib/extraction/test/custom/ZArith_dec +++ /dev/null @@ -1 +0,0 @@ -Extraction Inline Dcompare_inf Zcompare_rec. diff --git a/contrib/extraction/test/custom/fast_integer b/contrib/extraction/test/custom/fast_integer deleted file mode 100644 index e2b24953..00000000 --- a/contrib/extraction/test/custom/fast_integer +++ /dev/null @@ -1 +0,0 @@ -Extraction NoInline Zero_suivi_de Un_suivi_de. diff --git a/contrib/extraction/test/e b/contrib/extraction/test/e deleted file mode 100644 index 88b6c90b..00000000 --- a/contrib/extraction/test/e +++ /dev/null @@ -1,17 +0,0 @@ - -(* To trace Extraction, you can use this file via: *) -(* Drop. #use "e";; *) -(* *) - -#use "include";; -open Extraction;; -open Miniml;; -#trace extract_declaration;; -go();; - - - - - - - diff --git a/contrib/extraction/test/extract b/contrib/extraction/test/extract deleted file mode 100755 index 83444be3..00000000 --- a/contrib/extraction/test/extract +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -rm -f /tmp/extr$$.v -vfile=`./ml2v $1` -d=`dirname $vfile` -n=`basename $vfile .v` -if [ -e custom/$n ]; then cat custom/$n > /tmp/extr$$.v; fi -echo "Cd \"$d\". Extraction Library $n. " >> /tmp/extr$$.v -../../../bin/coqtop.opt -silent -batch -require $n -load-vernac-source /tmp/extr$$.v -out=$? -rm -f /tmp/extr$$.v -exit $out - diff --git a/contrib/extraction/test/extract.haskell b/contrib/extraction/test/extract.haskell deleted file mode 100755 index d11bc706..00000000 --- a/contrib/extraction/test/extract.haskell +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -rm -f /tmp/extr$$.v -vfile=`./hs2v $1` -d=`dirname $vfile` -n=`basename $vfile .v` -if [ -e custom/$n ]; then cat custom/$n > /tmp/extr$$.v; fi -echo "Cd \"$d\". Extraction Language Haskell. Extraction Library $n. " >> /tmp/extr$$.v -../../../bin/coqtop.opt -silent -batch -require $n -load-vernac-source /tmp/extr$$.v -out=$? -rm -f /tmp/extr$$.v -exit $out - diff --git a/contrib/extraction/test/hs2v.ml b/contrib/extraction/test/hs2v.ml deleted file mode 100644 index fd8b9b26..00000000 --- a/contrib/extraction/test/hs2v.ml +++ /dev/null @@ -1,14 +0,0 @@ -let _ = - for j = 1 to ((Array.length Sys.argv)-1) do - let fml = Sys.argv.(j) in - let f = Filename.chop_extension fml in - let fv = f ^ ".v" in - if Sys.file_exists ("../../../" ^ fv) then - print_string (fv^" ") - else - let d = Filename.dirname f in - let b = String.uncapitalize (Filename.basename f) in - let fv = Filename.concat d (b ^ ".v ") in - print_string fv - done; - print_newline() diff --git a/contrib/extraction/test/make_mli b/contrib/extraction/test/make_mli deleted file mode 100755 index 40ee496e..00000000 --- a/contrib/extraction/test/make_mli +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/awk -We $0 - -{ match($0,"^open") - if (RLENGTH>0) state=1 - match($0,"^type") - if (RLENGTH>0) state=1 - match($0,"^\(\*\* ") - if (RLENGTH>0) state=2 - match($0,"^let") - if (RLENGTH>0) state=0 - match($0,"^and") - if ((RLENGTH>0) && (state==2)) state=0 - if ((RLENGTH>0) && (state==1)) state=1 - gsub("\(\*\* ","") - gsub("\*\*\)","") - if (state>0) print -} diff --git a/contrib/extraction/test/ml2v.ml b/contrib/extraction/test/ml2v.ml deleted file mode 100644 index 363ea642..00000000 --- a/contrib/extraction/test/ml2v.ml +++ /dev/null @@ -1,14 +0,0 @@ -let _ = - for j = 1 to ((Array.length Sys.argv)-1) do - let fml = Sys.argv.(j) in - let f = Filename.chop_extension fml in - let fv = f ^ ".v" in - if Sys.file_exists ("../../../" ^ fv) then - print_string (fv^" ") - else - let d = Filename.dirname f in - let b = String.capitalize (Filename.basename f) in - let fv = Filename.concat d (b ^ ".v ") in - print_string fv - done; - print_newline() diff --git a/contrib/extraction/test/v2hs.ml b/contrib/extraction/test/v2hs.ml deleted file mode 100644 index 88632875..00000000 --- a/contrib/extraction/test/v2hs.ml +++ /dev/null @@ -1,9 +0,0 @@ -let _ = - for j = 1 to ((Array.length Sys.argv) -1) do - let s = Sys.argv.(j) in - let b = Filename.chop_extension (Filename.basename s) in - let b = String.capitalize b in - let d = Filename.dirname s in - print_string (Filename.concat d (b ^ ".hs ")) - done; - print_newline() diff --git a/contrib/extraction/test/v2ml.ml b/contrib/extraction/test/v2ml.ml deleted file mode 100644 index 245a1b1e..00000000 --- a/contrib/extraction/test/v2ml.ml +++ /dev/null @@ -1,9 +0,0 @@ -let _ = - for j = 1 to ((Array.length Sys.argv) -1) do - let s = Sys.argv.(j) in - let b = Filename.chop_extension (Filename.basename s) in - let b = String.uncapitalize b in - let d = Filename.dirname s in - print_string (Filename.concat d (b ^ ".ml ")) - done; - print_newline() diff --git a/contrib/field/field.ml4 b/contrib/field/field.ml4 index dab5a45c..dea79773 100644 --- a/contrib/field/field.ml4 +++ b/contrib/field/field.ml4 @@ -8,7 +8,7 @@ (*i camlp4deps: "parsing/grammar.cma" i*) -(* $Id: field.ml4 9273 2006-10-25 11:30:36Z barras $ *) +(* $Id: field.ml4 10076 2007-08-16 11:16:43Z notin $ *) open Names open Pp @@ -159,7 +159,7 @@ let field g = | Some (eq,t::args) when eq = (Coqlib.build_coq_eq_data()).Coqlib.eq -> t | _ -> error "The statement is not built from Leibniz' equality" in let th = VConstr (lookup (pf_env g) typ) in - (interp_tac_gen [(id_of_string "FT",th)] (get_debug ()) + (interp_tac_gen [(id_of_string "FT",th)] [] (get_debug ()) <:tactic< match goal with |- (@eq _ _ _) => field_gen FT end >>) g (* Verifies that all the terms have the same type and gives the right theory *) diff --git a/contrib/first-order/formula.ml b/contrib/first-order/formula.ml deleted file mode 100644 index 0be468aa..00000000 --- a/contrib/first-order/formula.ml +++ /dev/null @@ -1,270 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* metavariable - -exception Is_atom of constr - -let meta_succ m = m+1 - -let rec nb_prod_after n c= - match kind_of_term c with - | Prod (_,_,b) ->if n>0 then nb_prod_after (n-1) b else - 1+(nb_prod_after 0 b) - | _ -> 0 - -let construct_nhyps ind gls = - let nparams = (fst (Global.lookup_inductive ind)).mind_nparams in - let constr_types = Inductiveops.arities_of_constructors (pf_env gls) ind in - let hyp = nb_prod_after nparams in - Array.map hyp constr_types - -(* indhyps builds the array of arrays of constructor hyps for (ind largs)*) -let ind_hyps nevar ind largs gls= - let types= Inductiveops.arities_of_constructors (pf_env gls) ind in - let lp=Array.length types in - let myhyps i= - let t1=Term.prod_applist types.(i) largs in - let t2=snd (Sign.decompose_prod_n_assum nevar t1) in - fst (Sign.decompose_prod_assum t2) in - Array.init lp myhyps - -let special_nf gl= - let infos=Closure.create_clos_infos !red_flags (pf_env gl) in - (fun t -> Closure.norm_val infos (Closure.inject t)) - -let special_whd gl= - let infos=Closure.create_clos_infos !red_flags (pf_env gl) in - (fun t -> Closure.whd_val infos (Closure.inject t)) - -type kind_of_formula= - Arrow of constr*constr - | False of inductive*constr list - | And of inductive*constr list*bool - | Or of inductive*constr list*bool - | Exists of inductive*constr list - | Forall of constr*constr - | Atom of constr - -let rec kind_of_formula gl term = - let normalize=special_nf gl in - let cciterm=special_whd gl term in - match match_with_imp_term cciterm with - Some (a,b)-> Arrow(a,(pop b)) - |_-> - match match_with_forall_term cciterm with - Some (_,a,b)-> Forall(a,b) - |_-> - match match_with_nodep_ind cciterm with - Some (i,l,n)-> - let ind=destInd i in - let (mib,mip) = Global.lookup_inductive ind in - let nconstr=Array.length mip.mind_consnames in - if nconstr=0 then - False(ind,l) - else - let has_realargs=(n>0) in - let is_trivial= - let is_constant c = - nb_prod c = mib.mind_nparams in - array_exists is_constant mip.mind_nf_lc in - if Inductiveops.mis_is_recursive (ind,mib,mip) || - (has_realargs && not is_trivial) - then - Atom cciterm - else - if nconstr=1 then - And(ind,l,is_trivial) - else - Or(ind,l,is_trivial) - | _ -> - match match_with_sigma_type cciterm with - Some (i,l)-> Exists((destInd i),l) - |_-> Atom (normalize cciterm) - -type atoms = {positive:constr list;negative:constr list} - -type side = Hyp | Concl | Hint - -let no_atoms = (false,{positive=[];negative=[]}) - -let dummy_id=VarRef (id_of_string "") - -let build_atoms gl metagen side cciterm = - let trivial =ref false - and positive=ref [] - and negative=ref [] in - let normalize=special_nf gl in - let rec build_rec env polarity cciterm= - match kind_of_formula gl cciterm with - False(_,_)->if not polarity then trivial:=true - | Arrow (a,b)-> - build_rec env (not polarity) a; - build_rec env polarity b - | And(i,l,b) | Or(i,l,b)-> - if b then - begin - let unsigned=normalize (substnl env 0 cciterm) in - if polarity then - positive:= unsigned :: !positive - else - negative:= unsigned :: !negative - end; - let v = ind_hyps 0 i l gl in - let g i _ (_,_,t) = - build_rec env polarity (lift i t) in - let f l = - list_fold_left_i g (1-(List.length l)) () l in - if polarity && (* we have a constant constructor *) - array_exists (function []->true|_->false) v - then trivial:=true; - Array.iter f v - | Exists(i,l)-> - let var=mkMeta (metagen true) in - let v =(ind_hyps 1 i l gl).(0) in - let g i _ (_,_,t) = - build_rec (var::env) polarity (lift i t) in - list_fold_left_i g (2-(List.length l)) () v - | Forall(_,b)-> - let var=mkMeta (metagen true) in - build_rec (var::env) polarity b - | Atom t-> - let unsigned=substnl env 0 t in - if not (isMeta unsigned) then (* discarding wildcard atoms *) - if polarity then - positive:= unsigned :: !positive - else - negative:= unsigned :: !negative in - begin - match side with - Concl -> build_rec [] true cciterm - | Hyp -> build_rec [] false cciterm - | Hint -> - let rels,head=decompose_prod cciterm in - let env=List.rev (List.map (fun _->mkMeta (metagen true)) rels) in - build_rec env false head;trivial:=false (* special for hints *) - end; - (!trivial, - {positive= !positive; - negative= !negative}) - -type right_pattern = - Rarrow - | Rand - | Ror - | Rfalse - | Rforall - | Rexists of metavariable*constr*bool - -type left_arrow_pattern= - LLatom - | LLfalse of inductive*constr list - | LLand of inductive*constr list - | LLor of inductive*constr list - | LLforall of constr - | LLexists of inductive*constr list - | LLarrow of constr*constr*constr - -type left_pattern= - Lfalse - | Land of inductive - | Lor of inductive - | Lforall of metavariable*constr*bool - | Lexists of inductive - | LA of constr*left_arrow_pattern - -type t={id:global_reference; - constr:constr; - pat:(left_pattern,right_pattern) sum; - atoms:atoms} - -let build_formula side nam typ gl metagen= - let normalize = special_nf gl in - try - let m=meta_succ(metagen false) in - let trivial,atoms= - if !qflag then - build_atoms gl metagen side typ - else no_atoms in - let pattern= - match side with - Concl -> - let pat= - match kind_of_formula gl typ with - False(_,_) -> Rfalse - | Atom a -> raise (Is_atom a) - | And(_,_,_) -> Rand - | Or(_,_,_) -> Ror - | Exists (i,l) -> - let (_,_,d)=list_last (ind_hyps 0 i l gl).(0) in - Rexists(m,d,trivial) - | Forall (_,a) -> Rforall - | Arrow (a,b) -> Rarrow in - Right pat - | _ -> - let pat= - match kind_of_formula gl typ with - False(i,_) -> Lfalse - | Atom a -> raise (Is_atom a) - | And(i,_,b) -> - if b then - let nftyp=normalize typ in raise (Is_atom nftyp) - else Land i - | Or(i,_,b) -> - if b then - let nftyp=normalize typ in raise (Is_atom nftyp) - else Lor i - | Exists (ind,_) -> Lexists ind - | Forall (d,_) -> - Lforall(m,d,trivial) - | Arrow (a,b) -> - let nfa=normalize a in - LA (nfa, - match kind_of_formula gl a with - False(i,l)-> LLfalse(i,l) - | Atom t-> LLatom - | And(i,l,_)-> LLand(i,l) - | Or(i,l,_)-> LLor(i,l) - | Arrow(a,c)-> LLarrow(a,c,b) - | Exists(i,l)->LLexists(i,l) - | Forall(_,_)->LLforall a) in - Left pat - in - Left {id=nam; - constr=normalize typ; - pat=pattern; - atoms=atoms} - with Is_atom a-> Right a (* already in nf *) - diff --git a/contrib/first-order/formula.mli b/contrib/first-order/formula.mli deleted file mode 100644 index 8703045c..00000000 --- a/contrib/first-order/formula.mli +++ /dev/null @@ -1,77 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* 'a -> int) -> ('b -> 'b -> int) -> - 'a -> 'a -> 'b -> 'b -> int - -val (==?) : ('a -> 'a -> 'b ->'b -> int) -> ('c -> 'c -> int) -> - 'a -> 'a -> 'b -> 'b -> 'c ->'c -> int - -type ('a,'b) sum = Left of 'a | Right of 'b - -type counter = bool -> metavariable - -val construct_nhyps : inductive -> Proof_type.goal Tacmach.sigma -> int array - -val ind_hyps : int -> inductive -> constr list -> - Proof_type.goal Tacmach.sigma -> Sign.rel_context array - -type atoms = {positive:constr list;negative:constr list} - -type side = Hyp | Concl | Hint - -val dummy_id: global_reference - -val build_atoms : Proof_type.goal Tacmach.sigma -> counter -> - side -> constr -> bool * atoms - -type right_pattern = - Rarrow - | Rand - | Ror - | Rfalse - | Rforall - | Rexists of metavariable*constr*bool - -type left_arrow_pattern= - LLatom - | LLfalse of inductive*constr list - | LLand of inductive*constr list - | LLor of inductive*constr list - | LLforall of constr - | LLexists of inductive*constr list - | LLarrow of constr*constr*constr - -type left_pattern= - Lfalse - | Land of inductive - | Lor of inductive - | Lforall of metavariable*constr*bool - | Lexists of inductive - | LA of constr*left_arrow_pattern - -type t={id: global_reference; - constr: constr; - pat: (left_pattern,right_pattern) sum; - atoms: atoms} - -(*exception Is_atom of constr*) - -val build_formula : side -> global_reference -> types -> - Proof_type.goal Tacmach.sigma -> counter -> (t,types) sum - diff --git a/contrib/first-order/g_ground.ml4 b/contrib/first-order/g_ground.ml4 deleted file mode 100644 index 366f563b..00000000 --- a/contrib/first-order/g_ground.ml4 +++ /dev/null @@ -1,127 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* Some !ground_depth); - optwrite= - (function - None->ground_depth:=3 - | Some i->ground_depth:=(max i 0))} - in - declare_int_option gdopt - -let congruence_depth=ref 100 - -let _= - let gdopt= - { optsync=true; - optname="Congruence Depth"; - optkey=SecondaryTable("Congruence","Depth"); - optread=(fun ()->Some !congruence_depth); - optwrite= - (function - None->congruence_depth:=0 - | Some i->congruence_depth:=(max i 0))} - in - declare_int_option gdopt - -let default_solver=(Tacinterp.interp <:tactic>) - -let fail_solver=tclFAIL 0 (Pp.str "GTauto failed") - -type external_env= - Ids of global_reference list - | Bases of Auto.hint_db_name list - | Void - -let gen_ground_tac flag taco ext gl= - let backup= !qflag in - try - qflag:=flag; - let solver= - match taco with - Some tac-> tac - | None-> default_solver in - let startseq= - match ext with - Void -> (fun gl -> empty_seq !ground_depth) - | Ids l-> create_with_ref_list l !ground_depth - | Bases l-> create_with_auto_hints l !ground_depth in - let result=ground_tac solver startseq gl in - qflag:=backup;result - with e ->qflag:=backup;raise e - -(* special for compatibility with Intuition - -let constant str = Coqlib.gen_constant "User" ["Init";"Logic"] str - -let defined_connectives=lazy - [[],EvalConstRef (destConst (constant "not")); - [],EvalConstRef (destConst (constant "iff"))] - -let normalize_evaluables= - onAllClauses - (function - None->unfold_in_concl (Lazy.force defined_connectives) - | Some id-> - unfold_in_hyp (Lazy.force defined_connectives) - (Tacexpr.InHypType id)) *) - -TACTIC EXTEND firstorder - [ "firstorder" tactic_opt(t) "with" ne_reference_list(l) ] -> - [ gen_ground_tac true (option_map eval_tactic t) (Ids l) ] -| [ "firstorder" tactic_opt(t) "using" ne_preident_list(l) ] -> - [ gen_ground_tac true (option_map eval_tactic t) (Bases l) ] -| [ "firstorder" tactic_opt(t) ] -> - [ gen_ground_tac true (option_map eval_tactic t) Void ] -END - -TACTIC EXTEND gintuition - [ "gintuition" tactic_opt(t) ] -> - [ gen_ground_tac false (option_map eval_tactic t) Void ] -END - - -let default_declarative_automation gls = - tclORELSE - (Cctac.congruence_tac !congruence_depth []) - (gen_ground_tac true - (Some (tclTHEN - default_solver - (Cctac.congruence_tac !congruence_depth []))) - Void) gls - - - -let () = - Decl_proof_instr.register_automation_tac default_declarative_automation - diff --git a/contrib/first-order/ground.ml b/contrib/first-order/ground.ml deleted file mode 100644 index bccac6df..00000000 --- a/contrib/first-order/ground.ml +++ /dev/null @@ -1,152 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* - predref:=Names.KNpred.add kn !predref - | _ ->() in - let g _ l=List.iter f l in - let h _ hdb=Auto.Hint_db.iter g hdb in - Util.Stringmap.iter h !Auto.searchtable; - red_flags:= - Closure.RedFlags.red_add_transparent - Closure.betaiotazeta (Names.Idpred.full,!predref) - end -*) - -let update_flags ()= - let predref=ref Names.Cpred.empty in - let f coe= - try - let kn=destConst (Classops.get_coercion_value coe) in - predref:=Names.Cpred.add kn !predref - with Invalid_argument "destConst"-> () in - List.iter f (Classops.coercions ()); - red_flags:= - Closure.RedFlags.red_add_transparent - Closure.betaiotazeta - (Names.Idpred.full,Names.Cpred.complement !predref) - -let ground_tac solver startseq gl= - update_flags (); - let rec toptac skipped seq gl= - if Tacinterp.get_debug()=Tactic_debug.DebugOn 0 - then Pp.msgnl (Printer.pr_goal (sig_it gl)); - tclORELSE (axiom_tac seq.gl seq) - begin - try - let (hd,seq1)=take_formula seq - and re_add s=re_add_formula_list skipped s in - let continue=toptac [] - and backtrack gl=toptac (hd::skipped) seq1 gl in - match hd.pat with - Right rpat-> - begin - match rpat with - Rand-> - and_tac backtrack continue (re_add seq1) - | Rforall-> - let backtrack1= - if !qflag then - tclFAIL 0 (Pp.str "reversible in 1st order mode") - else - backtrack in - forall_tac backtrack1 continue (re_add seq1) - | Rarrow-> - arrow_tac backtrack continue (re_add seq1) - | Ror-> - or_tac backtrack continue (re_add seq1) - | Rfalse->backtrack - | Rexists(i,dom,triv)-> - let (lfp,seq2)=collect_quantified seq in - let backtrack2=toptac (lfp@skipped) seq2 in - if !qflag && seq.depth>0 then - quantified_tac lfp backtrack2 - continue (re_add seq) - else - backtrack2 (* need special backtracking *) - end - | Left lpat-> - begin - match lpat with - Lfalse-> - left_false_tac hd.id - | Land ind-> - left_and_tac ind backtrack - hd.id continue (re_add seq1) - | Lor ind-> - left_or_tac ind backtrack - hd.id continue (re_add seq1) - | Lforall (_,_,_)-> - let (lfp,seq2)=collect_quantified seq in - let backtrack2=toptac (lfp@skipped) seq2 in - if !qflag && seq.depth>0 then - quantified_tac lfp backtrack2 - continue (re_add seq) - else - backtrack2 (* need special backtracking *) - | Lexists ind -> - if !qflag then - left_exists_tac ind backtrack hd.id - continue (re_add seq1) - else backtrack - | LA (typ,lap)-> - let la_tac= - begin - match lap with - LLatom -> backtrack - | LLand (ind,largs) | LLor(ind,largs) - | LLfalse (ind,largs)-> - (ll_ind_tac ind largs backtrack - hd.id continue (re_add seq1)) - | LLforall p -> - if seq.depth>0 && !qflag then - (ll_forall_tac p backtrack - hd.id continue (re_add seq1)) - else backtrack - | LLexists (ind,l) -> - if !qflag then - ll_ind_tac ind l backtrack - hd.id continue (re_add seq1) - else - backtrack - | LLarrow (a,b,c) -> - (ll_arrow_tac a b c backtrack - hd.id continue (re_add seq1)) - end in - ll_atom_tac typ la_tac hd.id continue (re_add seq1) - end - with Heap.EmptyHeap->solver - end gl in - wrap (List.length (pf_hyps gl)) true (toptac []) (startseq gl) gl - diff --git a/contrib/first-order/ground.mli b/contrib/first-order/ground.mli deleted file mode 100644 index 621f99db..00000000 --- a/contrib/first-order/ground.mli +++ /dev/null @@ -1,13 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* - (Proof_type.goal Tacmach.sigma -> Sequent.t) -> Tacmach.tactic - diff --git a/contrib/first-order/instances.ml b/contrib/first-order/instances.ml deleted file mode 100644 index 254d7b84..00000000 --- a/contrib/first-order/instances.ml +++ /dev/null @@ -1,206 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* - (OrderedConstr.compare d1 d2) - | Real((m1,c1),n1),Real((m2,c2),n2)-> - ((-) =? (-) ==? OrderedConstr.compare) m2 m1 n1 n2 c1 c2 - | Phantom(_),Real((m,_),_)-> if m=0 then -1 else 1 - | Real((m,_),_),Phantom(_)-> if m=0 then 1 else -1 - -let compare_gr id1 id2= - if id1==id2 then 0 else - if id1==dummy_id then 1 - else if id2==dummy_id then -1 - else Pervasives.compare id1 id2 - -module OrderedInstance= -struct - type t=instance * Libnames.global_reference - let compare (inst1,id1) (inst2,id2)= - (compare_instance =? compare_gr) inst2 inst1 id2 id1 - (* we want a __decreasing__ total order *) -end - -module IS=Set.Make(OrderedInstance) - -let make_simple_atoms seq= - let ratoms= - match seq.glatom with - Some t->[t] - | None->[] - in {negative=seq.latoms;positive=ratoms} - -let do_sequent setref triv id seq i dom atoms= - let flag=ref true in - let phref=ref triv in - let do_atoms a1 a2 = - let do_pair t1 t2 = - match unif_atoms i dom t1 t2 with - None->() - | Some (Phantom _) ->phref:=true - | Some c ->flag:=false;setref:=IS.add (c,id) !setref in - List.iter (fun t->List.iter (do_pair t) a2.negative) a1.positive; - List.iter (fun t->List.iter (do_pair t) a2.positive) a1.negative in - HP.iter (fun lf->do_atoms atoms lf.atoms) seq.redexes; - do_atoms atoms (make_simple_atoms seq); - !flag && !phref - -let match_one_quantified_hyp setref seq lf= - match lf.pat with - Left(Lforall(i,dom,triv))|Right(Rexists(i,dom,triv))-> - if do_sequent setref triv lf.id seq i dom lf.atoms then - setref:=IS.add ((Phantom dom),lf.id) !setref - | _ ->anomaly "can't happen" - -let give_instances lf seq= - let setref=ref IS.empty in - List.iter (match_one_quantified_hyp setref seq) lf; - IS.elements !setref - -(* collector for the engine *) - -let rec collect_quantified seq= - try - let hd,seq1=take_formula seq in - (match hd.pat with - Left(Lforall(_,_,_)) | Right(Rexists(_,_,_)) -> - let (q,seq2)=collect_quantified seq1 in - ((hd::q),seq2) - | _->[],seq) - with Heap.EmptyHeap -> [],seq - -(* open instances processor *) - -let dummy_constr=mkMeta (-1) - -let dummy_bvid=id_of_string "x" - -let mk_open_instance id gl m t= - let env=pf_env gl in - let evmap=Refiner.project gl in - let var_id= - if id==dummy_id then dummy_bvid else - let typ=pf_type_of gl (constr_of_global id) in - (* since we know we will get a product, - reduction is not too expensive *) - let (nam,_,_)=destProd (whd_betadeltaiota env evmap typ) in - match nam with - Name id -> id - | Anonymous -> dummy_bvid in - let revt=substl (list_tabulate (fun i->mkRel (m-i)) m) t in - let rec aux n avoid= - if n=0 then [] else - let nid=(fresh_id avoid var_id gl) in - (Name nid,None,dummy_constr)::(aux (n-1) (nid::avoid)) in - let nt=it_mkLambda_or_LetIn revt (aux m []) in - let rawt=Detyping.detype false [] [] nt in - let rec raux n t= - if n=0 then t else - match t with - RLambda(loc,name,_,t0)-> - let t1=raux (n-1) t0 in - RLambda(loc,name,RHole (dummy_loc,Evd.BinderType name),t1) - | _-> anomaly "can't happen" in - let ntt=try - Pretyping.Default.understand evmap env (raux m rawt) - with _ -> - error "Untypable instance, maybe higher-order non-prenex quantification" in - Sign.decompose_lam_n_assum m ntt - -(* tactics *) - -let left_instance_tac (inst,id) continue seq= - match inst with - Phantom dom-> - if lookup (id,None) seq then - tclFAIL 0 (Pp.str "already done") - else - tclTHENS (cut dom) - [tclTHENLIST - [introf; - (fun gls->generalize - [mkApp(constr_of_global id, - [|mkVar (Tacmach.pf_nth_hyp_id gls 1)|])] gls); - introf; - tclSOLVE [wrap 1 false continue - (deepen (record (id,None) seq))]]; - tclTRY assumption] - | Real((m,t) as c,_)-> - if lookup (id,Some c) seq then - tclFAIL 0 (Pp.str "already done") - else - let special_generalize= - if m>0 then - fun gl-> - let (rc,ot)= mk_open_instance id gl m t in - let gt= - it_mkLambda_or_LetIn - (mkApp(constr_of_global id,[|ot|])) rc in - generalize [gt] gl - else - generalize [mkApp(constr_of_global id,[|t|])] - in - tclTHENLIST - [special_generalize; - introf; - tclSOLVE - [wrap 1 false continue (deepen (record (id,Some c) seq))]] - -let right_instance_tac inst continue seq= - match inst with - Phantom dom -> - tclTHENS (cut dom) - [tclTHENLIST - [introf; - (fun gls-> - split (Rawterm.ImplicitBindings - [mkVar (Tacmach.pf_nth_hyp_id gls 1)]) gls); - tclSOLVE [wrap 0 true continue (deepen seq)]]; - tclTRY assumption] - | Real ((0,t),_) -> - (tclTHEN (split (Rawterm.ImplicitBindings [t])) - (tclSOLVE [wrap 0 true continue (deepen seq)])) - | Real ((m,t),_) -> - tclFAIL 0 (Pp.str "not implemented ... yet") - -let instance_tac inst= - if (snd inst)==dummy_id then - right_instance_tac (fst inst) - else - left_instance_tac inst - -let quantified_tac lf backtrack continue seq gl= - let insts=give_instances lf seq in - tclORELSE - (tclFIRST (List.map (fun inst->instance_tac inst continue seq) insts)) - backtrack gl - - diff --git a/contrib/first-order/instances.mli b/contrib/first-order/instances.mli deleted file mode 100644 index 7667c89f..00000000 --- a/contrib/first-order/instances.mli +++ /dev/null @@ -1,26 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* Formula.t list * Sequent.t - -val give_instances : Formula.t list -> Sequent.t -> - (Unify.instance * global_reference) list - -val quantified_tac : Formula.t list -> seqtac with_backtracking - - - - diff --git a/contrib/first-order/rules.ml b/contrib/first-order/rules.ml deleted file mode 100644 index 6c51eda3..00000000 --- a/contrib/first-order/rules.ml +++ /dev/null @@ -1,216 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* tactic) -> Sequent.t -> tactic - -type lseqtac= global_reference -> seqtac - -type 'a with_backtracking = tactic -> 'a - -let wrap n b continue seq gls= - check_for_interrupt (); - let nc=pf_hyps gls in - let env=pf_env gls in - let rec aux i nc ctx= - if i<=0 then seq else - match nc with - []->anomaly "Not the expected number of hyps" - | ((id,_,typ) as nd)::q-> - if occur_var env id (pf_concl gls) || - List.exists (occur_var_in_decl env id) ctx then - (aux (i-1) q (nd::ctx)) - else - add_formula Hyp (VarRef id) typ (aux (i-1) q (nd::ctx)) gls in - let seq1=aux n nc [] in - let seq2=if b then - add_formula Concl dummy_id (pf_concl gls) seq1 gls else seq1 in - continue seq2 gls - -let id_of_global=function - VarRef id->id - | _->assert false - -let clear_global=function - VarRef id->clear [id] - | _->tclIDTAC - - -(* connection rules *) - -let axiom_tac t seq= - try exact_no_check (constr_of_global (find_left t seq)) - with Not_found->tclFAIL 0 (Pp.str "No axiom link") - -let ll_atom_tac a backtrack id continue seq= - tclIFTHENELSE - (try - tclTHENLIST - [generalize [mkApp(constr_of_global id, - [|constr_of_global (find_left a seq)|])]; - clear_global id; - intro] - with Not_found->tclFAIL 0 (Pp.str "No link")) - (wrap 1 false continue seq) backtrack - -(* right connectives rules *) - -let and_tac backtrack continue seq= - tclIFTHENELSE simplest_split (wrap 0 true continue seq) backtrack - -let or_tac backtrack continue seq= - tclORELSE - (any_constructor (Some (tclCOMPLETE (wrap 0 true continue seq)))) - backtrack - -let arrow_tac backtrack continue seq= - tclIFTHENELSE intro (wrap 1 true continue seq) - (tclORELSE - (tclTHEN introf (tclCOMPLETE (wrap 1 true continue seq))) - backtrack) -(* left connectives rules *) - -let left_and_tac ind backtrack id continue seq gls= - let n=(construct_nhyps ind gls).(0) in - tclIFTHENELSE - (tclTHENLIST - [simplest_elim (constr_of_global id); - clear_global id; - tclDO n intro]) - (wrap n false continue seq) - backtrack gls - -let left_or_tac ind backtrack id continue seq gls= - let v=construct_nhyps ind gls in - let f n= - tclTHENLIST - [clear_global id; - tclDO n intro; - wrap n false continue seq] in - tclIFTHENSVELSE - (simplest_elim (constr_of_global id)) - (Array.map f v) - backtrack gls - -let left_false_tac id= - simplest_elim (constr_of_global id) - -(* left arrow connective rules *) - -(* We use this function for false, and, or, exists *) - -let ll_ind_tac ind largs backtrack id continue seq gl= - let rcs=ind_hyps 0 ind largs gl in - let vargs=Array.of_list largs in - (* construire le terme H->B, le generaliser etc *) - let myterm i= - let rc=rcs.(i) in - let p=List.length rc in - let cstr=mkApp ((mkConstruct (ind,(i+1))),vargs) in - let vars=Array.init p (fun j->mkRel (p-j)) in - let capply=mkApp ((lift p cstr),vars) in - let head=mkApp ((lift p (constr_of_global id)),[|capply|]) in - Sign.it_mkLambda_or_LetIn head rc in - let lp=Array.length rcs in - let newhyps=list_tabulate myterm lp in - tclIFTHENELSE - (tclTHENLIST - [generalize newhyps; - clear_global id; - tclDO lp intro]) - (wrap lp false continue seq) backtrack gl - -let ll_arrow_tac a b c backtrack id continue seq= - let cc=mkProd(Anonymous,a,(lift 1 b)) in - let d=mkLambda (Anonymous,b, - mkApp ((constr_of_global id), - [|mkLambda (Anonymous,(lift 1 a),(mkRel 2))|])) in - tclORELSE - (tclTHENS (cut c) - [tclTHENLIST - [introf; - clear_global id; - wrap 1 false continue seq]; - tclTHENS (cut cc) - [exact_no_check (constr_of_global id); - tclTHENLIST - [generalize [d]; - clear_global id; - introf; - introf; - tclCOMPLETE (wrap 2 true continue seq)]]]) - backtrack - -(* quantifier rules (easy side) *) - -let forall_tac backtrack continue seq= - tclORELSE - (tclIFTHENELSE intro (wrap 0 true continue seq) - (tclORELSE - (tclTHEN introf (tclCOMPLETE (wrap 0 true continue seq))) - backtrack)) - (if !qflag then - tclFAIL 0 (Pp.str "reversible in 1st order mode") - else - backtrack) - -let left_exists_tac ind backtrack id continue seq gls= - let n=(construct_nhyps ind gls).(0) in - tclIFTHENELSE - (simplest_elim (constr_of_global id)) - (tclTHENLIST [clear_global id; - tclDO n intro; - (wrap (n-1) false continue seq)]) - backtrack - gls - -let ll_forall_tac prod backtrack id continue seq= - tclORELSE - (tclTHENS (cut prod) - [tclTHENLIST - [intro; - (fun gls-> - let id0=pf_nth_hyp_id gls 1 in - let term=mkApp((constr_of_global id),[|mkVar(id0)|]) in - tclTHEN (generalize [term]) (clear [id0]) gls); - clear_global id; - intro; - tclCOMPLETE (wrap 1 false continue (deepen seq))]; - tclCOMPLETE (wrap 0 true continue (deepen seq))]) - backtrack - -(* rules for instantiation with unification moved to instances.ml *) - -(* special for compatibility with old Intuition *) - -let constant str = Coqlib.gen_constant "User" ["Init";"Logic"] str - -let defined_connectives=lazy - [[],EvalConstRef (destConst (constant "not")); - [],EvalConstRef (destConst (constant "iff"))] - -let normalize_evaluables= - onAllClauses - (function - None->unfold_in_concl (Lazy.force defined_connectives) - | Some ((_,id),_)-> - unfold_in_hyp (Lazy.force defined_connectives) - (([],id),Tacexpr.InHypTypeOnly)) diff --git a/contrib/first-order/rules.mli b/contrib/first-order/rules.mli deleted file mode 100644 index 3798d8d4..00000000 --- a/contrib/first-order/rules.mli +++ /dev/null @@ -1,54 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* tactic) -> Sequent.t -> tactic - -type lseqtac= global_reference -> seqtac - -type 'a with_backtracking = tactic -> 'a - -val wrap : int -> bool -> seqtac - -val id_of_global: global_reference -> identifier - -val clear_global: global_reference -> tactic - -val axiom_tac : constr -> Sequent.t -> tactic - -val ll_atom_tac : constr -> lseqtac with_backtracking - -val and_tac : seqtac with_backtracking - -val or_tac : seqtac with_backtracking - -val arrow_tac : seqtac with_backtracking - -val left_and_tac : inductive -> lseqtac with_backtracking - -val left_or_tac : inductive -> lseqtac with_backtracking - -val left_false_tac : global_reference -> tactic - -val ll_ind_tac : inductive -> constr list -> lseqtac with_backtracking - -val ll_arrow_tac : constr -> constr -> constr -> lseqtac with_backtracking - -val forall_tac : seqtac with_backtracking - -val left_exists_tac : inductive -> lseqtac with_backtracking - -val ll_forall_tac : types -> lseqtac with_backtracking - -val normalize_evaluables : tactic diff --git a/contrib/first-order/sequent.ml b/contrib/first-order/sequent.ml deleted file mode 100644 index 805700b0..00000000 --- a/contrib/first-order/sequent.ml +++ /dev/null @@ -1,303 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* if b then incr cnt;!cnt - -let priority = (* pure heuristics, <=0 for non reversible *) - function - Right rf-> - begin - match rf with - Rarrow -> 100 - | Rand -> 40 - | Ror -> -15 - | Rfalse -> -50 - | Rforall -> 100 - | Rexists (_,_,_) -> -29 - end - | Left lf -> - match lf with - Lfalse -> 999 - | Land _ -> 90 - | Lor _ -> 40 - | Lforall (_,_,_) -> -30 - | Lexists _ -> 60 - | LA(_,lap) -> - match lap with - LLatom -> 0 - | LLfalse (_,_) -> 100 - | LLand (_,_) -> 80 - | LLor (_,_) -> 70 - | LLforall _ -> -20 - | LLexists (_,_) -> 50 - | LLarrow (_,_,_) -> -10 - -let left_reversible lpat=(priority lpat)>0 - -module OrderedFormula= -struct - type t=Formula.t - let compare e1 e2= - (priority e1.pat) - (priority e2.pat) -end - -(* [compare_constr f c1 c2] compare [c1] and [c2] using [f] to compare - the immediate subterms of [c1] of [c2] if needed; Cast's, - application associativity, binders name and Cases annotations are - not taken into account *) - -let rec compare_list f l1 l2= - match l1,l2 with - [],[]-> 0 - | [],_ -> -1 - | _,[] -> 1 - | (h1::q1),(h2::q2) -> (f =? (compare_list f)) h1 h2 q1 q2 - -let compare_array f v1 v2= - let l=Array.length v1 in - let c=l - Array.length v2 in - if c=0 then - let rec comp_aux i= - if i<0 then 0 - else - let ci=f v1.(i) v2.(i) in - if ci=0 then - comp_aux (i-1) - else ci - in comp_aux (l-1) - else c - -let compare_constr_int f t1 t2 = - match kind_of_term t1, kind_of_term t2 with - | Rel n1, Rel n2 -> n1 - n2 - | Meta m1, Meta m2 -> m1 - m2 - | Var id1, Var id2 -> Pervasives.compare id1 id2 - | Sort s1, Sort s2 -> Pervasives.compare s1 s2 - | Cast (c1,_,_), _ -> f c1 t2 - | _, Cast (c2,_,_) -> f t1 c2 - | Prod (_,t1,c1), Prod (_,t2,c2) - | Lambda (_,t1,c1), Lambda (_,t2,c2) -> - (f =? f) t1 t2 c1 c2 - | LetIn (_,b1,t1,c1), LetIn (_,b2,t2,c2) -> - ((f =? f) ==? f) b1 b2 t1 t2 c1 c2 - | App (_,_), App (_,_) -> - let c1,l1=decompose_app t1 - and c2,l2=decompose_app t2 in - (f =? (compare_list f)) c1 c2 l1 l2 - | Evar (e1,l1), Evar (e2,l2) -> - ((-) =? (compare_array f)) e1 e2 l1 l2 - | Const c1, Const c2 -> Pervasives.compare c1 c2 - | Ind c1, Ind c2 -> Pervasives.compare c1 c2 - | Construct c1, Construct c2 -> Pervasives.compare c1 c2 - | Case (_,p1,c1,bl1), Case (_,p2,c2,bl2) -> - ((f =? f) ==? (compare_array f)) p1 p2 c1 c2 bl1 bl2 - | Fix (ln1,(_,tl1,bl1)), Fix (ln2,(_,tl2,bl2)) -> - ((Pervasives.compare =? (compare_array f)) ==? (compare_array f)) - ln1 ln2 tl1 tl2 bl1 bl2 - | CoFix(ln1,(_,tl1,bl1)), CoFix(ln2,(_,tl2,bl2)) -> - ((Pervasives.compare =? (compare_array f)) ==? (compare_array f)) - ln1 ln2 tl1 tl2 bl1 bl2 - | _ -> Pervasives.compare t1 t2 - -let rec compare_constr m n= - compare_constr_int compare_constr m n - -module OrderedConstr= -struct - type t=constr - let compare=compare_constr -end - -type h_item = global_reference * (int*constr) option - -module Hitem= -struct - type t = h_item - let compare (id1,co1) (id2,co2)= - (Pervasives.compare - =? (fun oc1 oc2 -> - match oc1,oc2 with - Some (m1,c1),Some (m2,c2) -> - ((-) =? OrderedConstr.compare) m1 m2 c1 c2 - | _,_->Pervasives.compare oc1 oc2)) id1 id2 co1 co2 -end - -module CM=Map.Make(OrderedConstr) - -module History=Set.Make(Hitem) - -let cm_add typ nam cm= - try - let l=CM.find typ cm in CM.add typ (nam::l) cm - with - Not_found->CM.add typ [nam] cm - -let cm_remove typ nam cm= - try - let l=CM.find typ cm in - let l0=List.filter (fun id->id<>nam) l in - match l0 with - []->CM.remove typ cm - | _ ->CM.add typ l0 cm - with Not_found ->cm - -module HP=Heap.Functional(OrderedFormula) - -type t= - {redexes:HP.t; - context:(global_reference list) CM.t; - latoms:constr list; - gl:types; - glatom:constr option; - cnt:counter; - history:History.t; - depth:int} - -let deepen seq={seq with depth=seq.depth-1} - -let record item seq={seq with history=History.add item seq.history} - -let lookup item seq= - History.mem item seq.history || - match item with - (_,None)->false - | (id,Some ((m,t) as c))-> - let p (id2,o)= - match o with - None -> false - | Some ((m2,t2) as c2)->id=id2 && m2>m && more_general c2 c in - History.exists p seq.history - -let rec add_formula side nam t seq gl= - match build_formula side nam t gl seq.cnt with - Left f-> - begin - match side with - Concl -> - {seq with - redexes=HP.add f seq.redexes; - gl=f.constr; - glatom=None} - | _ -> - {seq with - redexes=HP.add f seq.redexes; - context=cm_add f.constr nam seq.context} - end - | Right t-> - match side with - Concl -> - {seq with gl=t;glatom=Some t} - | _ -> - {seq with - context=cm_add t nam seq.context; - latoms=t::seq.latoms} - -let re_add_formula_list lf seq= - let do_one f cm= - if f.id == dummy_id then cm - else cm_add f.constr f.id cm in - {seq with - redexes=List.fold_right HP.add lf seq.redexes; - context=List.fold_right do_one lf seq.context} - -let find_left t seq=List.hd (CM.find t seq.context) - -(*let rev_left seq= - try - let lpat=(HP.maximum seq.redexes).pat in - left_reversible lpat - with Heap.EmptyHeap -> false -*) -let no_formula seq= - seq.redexes=HP.empty - -let rec take_formula seq= - let hd=HP.maximum seq.redexes - and hp=HP.remove seq.redexes in - if hd.id == dummy_id then - let nseq={seq with redexes=hp} in - if seq.gl==hd.constr then - hd,nseq - else - take_formula nseq (* discarding deprecated goal *) - else - hd,{seq with - redexes=hp; - context=cm_remove hd.constr hd.id seq.context} - -let empty_seq depth= - {redexes=HP.empty; - context=CM.empty; - latoms=[]; - gl=(mkMeta 1); - glatom=None; - cnt=newcnt (); - history=History.empty; - depth=depth} - -let create_with_ref_list l depth gl= - let f gr seq= - let c=constr_of_global gr in - let typ=(pf_type_of gl c) in - add_formula Hyp gr typ seq gl in - List.fold_right f l (empty_seq depth) - -open Auto - -let create_with_auto_hints l depth gl= - let seqref=ref (empty_seq depth) in - let f p_a_t = - match p_a_t.code with - Res_pf (c,_) | Give_exact c - | Res_pf_THEN_trivial_fail (c,_) -> - (try - let gr=global_of_constr c in - let typ=(pf_type_of gl c) in - seqref:=add_formula Hint gr typ !seqref gl - with Not_found->()) - | _-> () in - let g _ l=List.iter f l in - let h dbname= - let hdb= - try - searchtable_map dbname - with Not_found-> - error ("Firstorder: "^dbname^" : No such Hint database") in - Hint_db.iter g hdb in - List.iter h l; - !seqref - -let print_cmap map= - let print_entry c l s= - let xc=Constrextern.extern_constr false (Global.env ()) c in - str "| " ++ - Util.prlist Printer.pr_global l ++ - str " : " ++ - Ppconstr.pr_constr_expr xc ++ - cut () ++ - s in - msgnl (v 0 - (str "-----" ++ - cut () ++ - CM.fold print_entry map (mt ()) ++ - str "-----")) - - diff --git a/contrib/first-order/sequent.mli b/contrib/first-order/sequent.mli deleted file mode 100644 index 47fb74c7..00000000 --- a/contrib/first-order/sequent.mli +++ /dev/null @@ -1,66 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* global_reference -> global_reference list CM.t -> - global_reference list CM.t - -val cm_remove : constr -> global_reference -> global_reference list CM.t -> - global_reference list CM.t - -module HP: Heap.S with type elt=Formula.t - -type t = {redexes:HP.t; - context: global_reference list CM.t; - latoms:constr list; - gl:types; - glatom:constr option; - cnt:counter; - history:History.t; - depth:int} - -val deepen: t -> t - -val record: h_item -> t -> t - -val lookup: h_item -> t -> bool - -val add_formula : side -> global_reference -> constr -> t -> - Proof_type.goal sigma -> t - -val re_add_formula_list : Formula.t list -> t -> t - -val find_left : constr -> t -> global_reference - -val take_formula : t -> Formula.t * t - -val empty_seq : int -> t - -val create_with_ref_list : global_reference list -> - int -> Proof_type.goal sigma -> t - -val create_with_auto_hints : Auto.hint_db_name list -> - int -> Proof_type.goal sigma -> t - -val print_cmap: global_reference list CM.t -> unit diff --git a/contrib/first-order/unify.ml b/contrib/first-order/unify.ml deleted file mode 100644 index 1dd13cbe..00000000 --- a/contrib/first-order/unify.ml +++ /dev/null @@ -1,143 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* (n,subst_meta [i,t] tn)) !sigma) in - let rec head_reduce t= - (* forbids non-sigma-normal meta in head position*) - match kind_of_term t with - Meta i-> - (try - head_reduce (List.assoc i !sigma) - with Not_found->t) - | _->t in - Queue.add (t1,t2) bige; - try while true do - let t1,t2=Queue.take bige in - let nt1=head_reduce (whd_betaiotazeta t1) - and nt2=head_reduce (whd_betaiotazeta t2) in - match (kind_of_term nt1),(kind_of_term nt2) with - Meta i,Meta j-> - if i<>j then - if i - let t=subst_meta !sigma nt2 in - if Intset.is_empty (free_rels t) && - not (occur_term (mkMeta i) t) then - bind i t else raise (UFAIL(nt1,nt2)) - | _,Meta i -> - let t=subst_meta !sigma nt1 in - if Intset.is_empty (free_rels t) && - not (occur_term (mkMeta i) t) then - bind i t else raise (UFAIL(nt1,nt2)) - | Cast(_,_,_),_->Queue.add (strip_outer_cast nt1,nt2) bige - | _,Cast(_,_,_)->Queue.add (nt1,strip_outer_cast nt2) bige - | (Prod(_,a,b),Prod(_,c,d))|(Lambda(_,a,b),Lambda(_,c,d))-> - Queue.add (a,c) bige;Queue.add (pop b,pop d) bige - | Case (_,pa,ca,va),Case (_,pb,cb,vb)-> - Queue.add (pa,pb) bige; - Queue.add (ca,cb) bige; - let l=Array.length va in - if l<>(Array.length vb) then - raise (UFAIL (nt1,nt2)) - else - for i=0 to l-1 do - Queue.add (va.(i),vb.(i)) bige - done - | App(ha,va),App(hb,vb)-> - Queue.add (ha,hb) bige; - let l=Array.length va in - if l<>(Array.length vb) then - raise (UFAIL (nt1,nt2)) - else - for i=0 to l-1 do - Queue.add (va.(i),vb.(i)) bige - done - | _->if not (eq_constr nt1 nt2) then raise (UFAIL (nt1,nt2)) - done; - assert false - (* this place is unreachable but needed for the sake of typing *) - with Queue.Empty-> !sigma - -let value i t= - let add x y= - if x<0 then y else if y<0 then x else x+y in - let tref=mkMeta i in - let rec vaux term= - if term=tref then 0 else - let f v t=add v (vaux t) in - let vr=fold_constr f (-1) term in - if vr<0 then -1 else vr+1 in - vaux t - -type instance= - Real of (int*constr)*int - | Phantom of constr - -let mk_rel_inst t= - let new_rel=ref 1 in - let rel_env=ref [] in - let rec renum_rec d t= - match kind_of_term t with - Meta n-> - (try - mkRel (d+(List.assoc n !rel_env)) - with Not_found-> - let m= !new_rel in - incr new_rel; - rel_env:=(n,m) :: !rel_env; - mkRel (m+d)) - | _ -> map_constr_with_binders succ renum_rec d t - in - let nt=renum_rec 0 t in (!new_rel - 1,nt) - -let unif_atoms i dom t1 t2= - try - let t=List.assoc i (unif t1 t2) in - if isMeta t then Some (Phantom dom) - else Some (Real(mk_rel_inst t,value i t1)) - with - UFAIL(_,_) ->None - | Not_found ->Some (Phantom dom) - -let renum_metas_from k n t= (* requires n = max (free_rels t) *) - let l=list_tabulate (fun i->mkMeta (k+i)) n in - substl l t - -let more_general (m1,t1) (m2,t2)= - let mt1=renum_metas_from 0 m1 t1 - and mt2=renum_metas_from m1 m2 t2 in - try - let sigma=unif mt1 mt2 in - let p (n,t)= nfalse diff --git a/contrib/first-order/unify.mli b/contrib/first-order/unify.mli deleted file mode 100644 index 9fbe3dda..00000000 --- a/contrib/first-order/unify.mli +++ /dev/null @@ -1,23 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* constr -> (int*constr) list - -type instance= - Real of (int*constr)*int (* nb trous*terme*valeur heuristique *) - | Phantom of constr (* domaine de quantification *) - -val unif_atoms : metavariable -> constr -> constr -> constr -> instance option - -val more_general : (int*constr) -> (int*constr) -> bool diff --git a/contrib/firstorder/formula.ml b/contrib/firstorder/formula.ml new file mode 100644 index 00000000..3e49cd9c --- /dev/null +++ b/contrib/firstorder/formula.ml @@ -0,0 +1,270 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* metavariable + +exception Is_atom of constr + +let meta_succ m = m+1 + +let rec nb_prod_after n c= + match kind_of_term c with + | Prod (_,_,b) ->if n>0 then nb_prod_after (n-1) b else + 1+(nb_prod_after 0 b) + | _ -> 0 + +let construct_nhyps ind gls = + let nparams = (fst (Global.lookup_inductive ind)).mind_nparams in + let constr_types = Inductiveops.arities_of_constructors (pf_env gls) ind in + let hyp = nb_prod_after nparams in + Array.map hyp constr_types + +(* indhyps builds the array of arrays of constructor hyps for (ind largs)*) +let ind_hyps nevar ind largs gls= + let types= Inductiveops.arities_of_constructors (pf_env gls) ind in + let lp=Array.length types in + let myhyps i= + let t1=Term.prod_applist types.(i) largs in + let t2=snd (Sign.decompose_prod_n_assum nevar t1) in + fst (Sign.decompose_prod_assum t2) in + Array.init lp myhyps + +let special_nf gl= + let infos=Closure.create_clos_infos !red_flags (pf_env gl) in + (fun t -> Closure.norm_val infos (Closure.inject t)) + +let special_whd gl= + let infos=Closure.create_clos_infos !red_flags (pf_env gl) in + (fun t -> Closure.whd_val infos (Closure.inject t)) + +type kind_of_formula= + Arrow of constr*constr + | False of inductive*constr list + | And of inductive*constr list*bool + | Or of inductive*constr list*bool + | Exists of inductive*constr list + | Forall of constr*constr + | Atom of constr + +let rec kind_of_formula gl term = + let normalize=special_nf gl in + let cciterm=special_whd gl term in + match match_with_imp_term cciterm with + Some (a,b)-> Arrow(a,(pop b)) + |_-> + match match_with_forall_term cciterm with + Some (_,a,b)-> Forall(a,b) + |_-> + match match_with_nodep_ind cciterm with + Some (i,l,n)-> + let ind=destInd i in + let (mib,mip) = Global.lookup_inductive ind in + let nconstr=Array.length mip.mind_consnames in + if nconstr=0 then + False(ind,l) + else + let has_realargs=(n>0) in + let is_trivial= + let is_constant c = + nb_prod c = mib.mind_nparams in + array_exists is_constant mip.mind_nf_lc in + if Inductiveops.mis_is_recursive (ind,mib,mip) || + (has_realargs && not is_trivial) + then + Atom cciterm + else + if nconstr=1 then + And(ind,l,is_trivial) + else + Or(ind,l,is_trivial) + | _ -> + match match_with_sigma_type cciterm with + Some (i,l)-> Exists((destInd i),l) + |_-> Atom (normalize cciterm) + +type atoms = {positive:constr list;negative:constr list} + +type side = Hyp | Concl | Hint + +let no_atoms = (false,{positive=[];negative=[]}) + +let dummy_id=VarRef (id_of_string "_") (* "_" cannot be parsed *) + +let build_atoms gl metagen side cciterm = + let trivial =ref false + and positive=ref [] + and negative=ref [] in + let normalize=special_nf gl in + let rec build_rec env polarity cciterm= + match kind_of_formula gl cciterm with + False(_,_)->if not polarity then trivial:=true + | Arrow (a,b)-> + build_rec env (not polarity) a; + build_rec env polarity b + | And(i,l,b) | Or(i,l,b)-> + if b then + begin + let unsigned=normalize (substnl env 0 cciterm) in + if polarity then + positive:= unsigned :: !positive + else + negative:= unsigned :: !negative + end; + let v = ind_hyps 0 i l gl in + let g i _ (_,_,t) = + build_rec env polarity (lift i t) in + let f l = + list_fold_left_i g (1-(List.length l)) () l in + if polarity && (* we have a constant constructor *) + array_exists (function []->true|_->false) v + then trivial:=true; + Array.iter f v + | Exists(i,l)-> + let var=mkMeta (metagen true) in + let v =(ind_hyps 1 i l gl).(0) in + let g i _ (_,_,t) = + build_rec (var::env) polarity (lift i t) in + list_fold_left_i g (2-(List.length l)) () v + | Forall(_,b)-> + let var=mkMeta (metagen true) in + build_rec (var::env) polarity b + | Atom t-> + let unsigned=substnl env 0 t in + if not (isMeta unsigned) then (* discarding wildcard atoms *) + if polarity then + positive:= unsigned :: !positive + else + negative:= unsigned :: !negative in + begin + match side with + Concl -> build_rec [] true cciterm + | Hyp -> build_rec [] false cciterm + | Hint -> + let rels,head=decompose_prod cciterm in + let env=List.rev (List.map (fun _->mkMeta (metagen true)) rels) in + build_rec env false head;trivial:=false (* special for hints *) + end; + (!trivial, + {positive= !positive; + negative= !negative}) + +type right_pattern = + Rarrow + | Rand + | Ror + | Rfalse + | Rforall + | Rexists of metavariable*constr*bool + +type left_arrow_pattern= + LLatom + | LLfalse of inductive*constr list + | LLand of inductive*constr list + | LLor of inductive*constr list + | LLforall of constr + | LLexists of inductive*constr list + | LLarrow of constr*constr*constr + +type left_pattern= + Lfalse + | Land of inductive + | Lor of inductive + | Lforall of metavariable*constr*bool + | Lexists of inductive + | LA of constr*left_arrow_pattern + +type t={id:global_reference; + constr:constr; + pat:(left_pattern,right_pattern) sum; + atoms:atoms} + +let build_formula side nam typ gl metagen= + let normalize = special_nf gl in + try + let m=meta_succ(metagen false) in + let trivial,atoms= + if !qflag then + build_atoms gl metagen side typ + else no_atoms in + let pattern= + match side with + Concl -> + let pat= + match kind_of_formula gl typ with + False(_,_) -> Rfalse + | Atom a -> raise (Is_atom a) + | And(_,_,_) -> Rand + | Or(_,_,_) -> Ror + | Exists (i,l) -> + let (_,_,d)=list_last (ind_hyps 0 i l gl).(0) in + Rexists(m,d,trivial) + | Forall (_,a) -> Rforall + | Arrow (a,b) -> Rarrow in + Right pat + | _ -> + let pat= + match kind_of_formula gl typ with + False(i,_) -> Lfalse + | Atom a -> raise (Is_atom a) + | And(i,_,b) -> + if b then + let nftyp=normalize typ in raise (Is_atom nftyp) + else Land i + | Or(i,_,b) -> + if b then + let nftyp=normalize typ in raise (Is_atom nftyp) + else Lor i + | Exists (ind,_) -> Lexists ind + | Forall (d,_) -> + Lforall(m,d,trivial) + | Arrow (a,b) -> + let nfa=normalize a in + LA (nfa, + match kind_of_formula gl a with + False(i,l)-> LLfalse(i,l) + | Atom t-> LLatom + | And(i,l,_)-> LLand(i,l) + | Or(i,l,_)-> LLor(i,l) + | Arrow(a,c)-> LLarrow(a,c,b) + | Exists(i,l)->LLexists(i,l) + | Forall(_,_)->LLforall a) in + Left pat + in + Left {id=nam; + constr=normalize typ; + pat=pattern; + atoms=atoms} + with Is_atom a-> Right a (* already in nf *) + diff --git a/contrib/firstorder/formula.mli b/contrib/firstorder/formula.mli new file mode 100644 index 00000000..8703045c --- /dev/null +++ b/contrib/firstorder/formula.mli @@ -0,0 +1,77 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* 'a -> int) -> ('b -> 'b -> int) -> + 'a -> 'a -> 'b -> 'b -> int + +val (==?) : ('a -> 'a -> 'b ->'b -> int) -> ('c -> 'c -> int) -> + 'a -> 'a -> 'b -> 'b -> 'c ->'c -> int + +type ('a,'b) sum = Left of 'a | Right of 'b + +type counter = bool -> metavariable + +val construct_nhyps : inductive -> Proof_type.goal Tacmach.sigma -> int array + +val ind_hyps : int -> inductive -> constr list -> + Proof_type.goal Tacmach.sigma -> Sign.rel_context array + +type atoms = {positive:constr list;negative:constr list} + +type side = Hyp | Concl | Hint + +val dummy_id: global_reference + +val build_atoms : Proof_type.goal Tacmach.sigma -> counter -> + side -> constr -> bool * atoms + +type right_pattern = + Rarrow + | Rand + | Ror + | Rfalse + | Rforall + | Rexists of metavariable*constr*bool + +type left_arrow_pattern= + LLatom + | LLfalse of inductive*constr list + | LLand of inductive*constr list + | LLor of inductive*constr list + | LLforall of constr + | LLexists of inductive*constr list + | LLarrow of constr*constr*constr + +type left_pattern= + Lfalse + | Land of inductive + | Lor of inductive + | Lforall of metavariable*constr*bool + | Lexists of inductive + | LA of constr*left_arrow_pattern + +type t={id: global_reference; + constr: constr; + pat: (left_pattern,right_pattern) sum; + atoms: atoms} + +(*exception Is_atom of constr*) + +val build_formula : side -> global_reference -> types -> + Proof_type.goal Tacmach.sigma -> counter -> (t,types) sum + diff --git a/contrib/firstorder/g_ground.ml4 b/contrib/firstorder/g_ground.ml4 new file mode 100644 index 00000000..f7b0a546 --- /dev/null +++ b/contrib/firstorder/g_ground.ml4 @@ -0,0 +1,128 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Some !ground_depth); + optwrite= + (function + None->ground_depth:=3 + | Some i->ground_depth:=(max i 0))} + in + declare_int_option gdopt + +let congruence_depth=ref 100 + +let _= + let gdopt= + { optsync=true; + optname="Congruence Depth"; + optkey=SecondaryTable("Congruence","Depth"); + optread=(fun ()->Some !congruence_depth); + optwrite= + (function + None->congruence_depth:=0 + | Some i->congruence_depth:=(max i 0))} + in + declare_int_option gdopt + +let default_solver=(Tacinterp.interp <:tactic>) + +let fail_solver=tclFAIL 0 (Pp.str "GTauto failed") + +type external_env= + Ids of global_reference list + | Bases of Auto.hint_db_name list + | Void + +let gen_ground_tac flag taco ext gl= + let backup= !qflag in + try + qflag:=flag; + let solver= + match taco with + Some tac-> tac + | None-> default_solver in + let startseq= + match ext with + Void -> (fun gl -> empty_seq !ground_depth) + | Ids l-> create_with_ref_list l !ground_depth + | Bases l-> create_with_auto_hints l !ground_depth in + let result=ground_tac solver startseq gl in + qflag:=backup;result + with e ->qflag:=backup;raise e + +(* special for compatibility with Intuition + +let constant str = Coqlib.gen_constant "User" ["Init";"Logic"] str + +let defined_connectives=lazy + [[],EvalConstRef (destConst (constant "not")); + [],EvalConstRef (destConst (constant "iff"))] + +let normalize_evaluables= + onAllClauses + (function + None->unfold_in_concl (Lazy.force defined_connectives) + | Some id-> + unfold_in_hyp (Lazy.force defined_connectives) + (Tacexpr.InHypType id)) *) + +TACTIC EXTEND firstorder + [ "firstorder" tactic_opt(t) "using" ne_reference_list(l) ] -> + [ gen_ground_tac true (Option.map eval_tactic t) (Ids l) ] +| [ "firstorder" tactic_opt(t) "with" ne_preident_list(l) ] -> + [ gen_ground_tac true (Option.map eval_tactic t) (Bases l) ] +| [ "firstorder" tactic_opt(t) ] -> + [ gen_ground_tac true (Option.map eval_tactic t) Void ] +END + +TACTIC EXTEND gintuition + [ "gintuition" tactic_opt(t) ] -> + [ gen_ground_tac false (Option.map eval_tactic t) Void ] +END + + +let default_declarative_automation gls = + tclORELSE + (tclORELSE (Auto.h_trivial [] None) + (Cctac.congruence_tac !congruence_depth [])) + (gen_ground_tac true + (Some (tclTHEN + default_solver + (Cctac.congruence_tac !congruence_depth []))) + Void) gls + + + +let () = + Decl_proof_instr.register_automation_tac default_declarative_automation + diff --git a/contrib/firstorder/ground.ml b/contrib/firstorder/ground.ml new file mode 100644 index 00000000..f4661869 --- /dev/null +++ b/contrib/firstorder/ground.ml @@ -0,0 +1,152 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* + predref:=Names.KNpred.add kn !predref + | _ ->() in + let g _ l=List.iter f l in + let h _ hdb=Auto.Hint_db.iter g hdb in + Util.Stringmap.iter h !Auto.searchtable; + red_flags:= + Closure.RedFlags.red_add_transparent + Closure.betaiotazeta (Names.Idpred.full,!predref) + end +*) + +let update_flags ()= + let predref=ref Names.Cpred.empty in + let f coe= + try + let kn=destConst (Classops.get_coercion_value coe) in + predref:=Names.Cpred.add kn !predref + with Invalid_argument "destConst"-> () in + List.iter f (Classops.coercions ()); + red_flags:= + Closure.RedFlags.red_add_transparent + Closure.betaiotazeta + (Names.Idpred.full,Names.Cpred.complement !predref) + +let ground_tac solver startseq gl= + update_flags (); + let rec toptac skipped seq gl= + if Tacinterp.get_debug()=Tactic_debug.DebugOn 0 + then Pp.msgnl (Printer.pr_goal (sig_it gl)); + tclORELSE (axiom_tac seq.gl seq) + begin + try + let (hd,seq1)=take_formula seq + and re_add s=re_add_formula_list skipped s in + let continue=toptac [] + and backtrack gl=toptac (hd::skipped) seq1 gl in + match hd.pat with + Right rpat-> + begin + match rpat with + Rand-> + and_tac backtrack continue (re_add seq1) + | Rforall-> + let backtrack1= + if !qflag then + tclFAIL 0 (Pp.str "reversible in 1st order mode") + else + backtrack in + forall_tac backtrack1 continue (re_add seq1) + | Rarrow-> + arrow_tac backtrack continue (re_add seq1) + | Ror-> + or_tac backtrack continue (re_add seq1) + | Rfalse->backtrack + | Rexists(i,dom,triv)-> + let (lfp,seq2)=collect_quantified seq in + let backtrack2=toptac (lfp@skipped) seq2 in + if !qflag && seq.depth>0 then + quantified_tac lfp backtrack2 + continue (re_add seq) + else + backtrack2 (* need special backtracking *) + end + | Left lpat-> + begin + match lpat with + Lfalse-> + left_false_tac hd.id + | Land ind-> + left_and_tac ind backtrack + hd.id continue (re_add seq1) + | Lor ind-> + left_or_tac ind backtrack + hd.id continue (re_add seq1) + | Lforall (_,_,_)-> + let (lfp,seq2)=collect_quantified seq in + let backtrack2=toptac (lfp@skipped) seq2 in + if !qflag && seq.depth>0 then + quantified_tac lfp backtrack2 + continue (re_add seq) + else + backtrack2 (* need special backtracking *) + | Lexists ind -> + if !qflag then + left_exists_tac ind backtrack hd.id + continue (re_add seq1) + else backtrack + | LA (typ,lap)-> + let la_tac= + begin + match lap with + LLatom -> backtrack + | LLand (ind,largs) | LLor(ind,largs) + | LLfalse (ind,largs)-> + (ll_ind_tac ind largs backtrack + hd.id continue (re_add seq1)) + | LLforall p -> + if seq.depth>0 && !qflag then + (ll_forall_tac p backtrack + hd.id continue (re_add seq1)) + else backtrack + | LLexists (ind,l) -> + if !qflag then + ll_ind_tac ind l backtrack + hd.id continue (re_add seq1) + else + backtrack + | LLarrow (a,b,c) -> + (ll_arrow_tac a b c backtrack + hd.id continue (re_add seq1)) + end in + ll_atom_tac typ la_tac hd.id continue (re_add seq1) + end + with Heap.EmptyHeap->solver + end gl in + wrap (List.length (pf_hyps gl)) true (toptac []) (startseq gl) gl + diff --git a/contrib/firstorder/ground.mli b/contrib/firstorder/ground.mli new file mode 100644 index 00000000..621f99db --- /dev/null +++ b/contrib/firstorder/ground.mli @@ -0,0 +1,13 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* + (Proof_type.goal Tacmach.sigma -> Sequent.t) -> Tacmach.tactic + diff --git a/contrib/firstorder/instances.ml b/contrib/firstorder/instances.ml new file mode 100644 index 00000000..1432207d --- /dev/null +++ b/contrib/firstorder/instances.ml @@ -0,0 +1,206 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* + (OrderedConstr.compare d1 d2) + | Real((m1,c1),n1),Real((m2,c2),n2)-> + ((-) =? (-) ==? OrderedConstr.compare) m2 m1 n1 n2 c1 c2 + | Phantom(_),Real((m,_),_)-> if m=0 then -1 else 1 + | Real((m,_),_),Phantom(_)-> if m=0 then 1 else -1 + +let compare_gr id1 id2= + if id1==id2 then 0 else + if id1==dummy_id then 1 + else if id2==dummy_id then -1 + else Pervasives.compare id1 id2 + +module OrderedInstance= +struct + type t=instance * Libnames.global_reference + let compare (inst1,id1) (inst2,id2)= + (compare_instance =? compare_gr) inst2 inst1 id2 id1 + (* we want a __decreasing__ total order *) +end + +module IS=Set.Make(OrderedInstance) + +let make_simple_atoms seq= + let ratoms= + match seq.glatom with + Some t->[t] + | None->[] + in {negative=seq.latoms;positive=ratoms} + +let do_sequent setref triv id seq i dom atoms= + let flag=ref true in + let phref=ref triv in + let do_atoms a1 a2 = + let do_pair t1 t2 = + match unif_atoms i dom t1 t2 with + None->() + | Some (Phantom _) ->phref:=true + | Some c ->flag:=false;setref:=IS.add (c,id) !setref in + List.iter (fun t->List.iter (do_pair t) a2.negative) a1.positive; + List.iter (fun t->List.iter (do_pair t) a2.positive) a1.negative in + HP.iter (fun lf->do_atoms atoms lf.atoms) seq.redexes; + do_atoms atoms (make_simple_atoms seq); + !flag && !phref + +let match_one_quantified_hyp setref seq lf= + match lf.pat with + Left(Lforall(i,dom,triv))|Right(Rexists(i,dom,triv))-> + if do_sequent setref triv lf.id seq i dom lf.atoms then + setref:=IS.add ((Phantom dom),lf.id) !setref + | _ ->anomaly "can't happen" + +let give_instances lf seq= + let setref=ref IS.empty in + List.iter (match_one_quantified_hyp setref seq) lf; + IS.elements !setref + +(* collector for the engine *) + +let rec collect_quantified seq= + try + let hd,seq1=take_formula seq in + (match hd.pat with + Left(Lforall(_,_,_)) | Right(Rexists(_,_,_)) -> + let (q,seq2)=collect_quantified seq1 in + ((hd::q),seq2) + | _->[],seq) + with Heap.EmptyHeap -> [],seq + +(* open instances processor *) + +let dummy_constr=mkMeta (-1) + +let dummy_bvid=id_of_string "x" + +let mk_open_instance id gl m t= + let env=pf_env gl in + let evmap=Refiner.project gl in + let var_id= + if id==dummy_id then dummy_bvid else + let typ=pf_type_of gl (constr_of_global id) in + (* since we know we will get a product, + reduction is not too expensive *) + let (nam,_,_)=destProd (whd_betadeltaiota env evmap typ) in + match nam with + Name id -> id + | Anonymous -> dummy_bvid in + let revt=substl (list_tabulate (fun i->mkRel (m-i)) m) t in + let rec aux n avoid= + if n=0 then [] else + let nid=(fresh_id avoid var_id gl) in + (Name nid,None,dummy_constr)::(aux (n-1) (nid::avoid)) in + let nt=it_mkLambda_or_LetIn revt (aux m []) in + let rawt=Detyping.detype false [] [] nt in + let rec raux n t= + if n=0 then t else + match t with + RLambda(loc,name,k,_,t0)-> + let t1=raux (n-1) t0 in + RLambda(loc,name,k,RHole (dummy_loc,Evd.BinderType name),t1) + | _-> anomaly "can't happen" in + let ntt=try + Pretyping.Default.understand evmap env (raux m rawt) + with _ -> + error "Untypable instance, maybe higher-order non-prenex quantification" in + Sign.decompose_lam_n_assum m ntt + +(* tactics *) + +let left_instance_tac (inst,id) continue seq= + match inst with + Phantom dom-> + if lookup (id,None) seq then + tclFAIL 0 (Pp.str "already done") + else + tclTHENS (cut dom) + [tclTHENLIST + [introf; + (fun gls->generalize + [mkApp(constr_of_global id, + [|mkVar (Tacmach.pf_nth_hyp_id gls 1)|])] gls); + introf; + tclSOLVE [wrap 1 false continue + (deepen (record (id,None) seq))]]; + tclTRY assumption] + | Real((m,t) as c,_)-> + if lookup (id,Some c) seq then + tclFAIL 0 (Pp.str "already done") + else + let special_generalize= + if m>0 then + fun gl-> + let (rc,ot)= mk_open_instance id gl m t in + let gt= + it_mkLambda_or_LetIn + (mkApp(constr_of_global id,[|ot|])) rc in + generalize [gt] gl + else + generalize [mkApp(constr_of_global id,[|t|])] + in + tclTHENLIST + [special_generalize; + introf; + tclSOLVE + [wrap 1 false continue (deepen (record (id,Some c) seq))]] + +let right_instance_tac inst continue seq= + match inst with + Phantom dom -> + tclTHENS (cut dom) + [tclTHENLIST + [introf; + (fun gls-> + split (Rawterm.ImplicitBindings + [mkVar (Tacmach.pf_nth_hyp_id gls 1)]) gls); + tclSOLVE [wrap 0 true continue (deepen seq)]]; + tclTRY assumption] + | Real ((0,t),_) -> + (tclTHEN (split (Rawterm.ImplicitBindings [t])) + (tclSOLVE [wrap 0 true continue (deepen seq)])) + | Real ((m,t),_) -> + tclFAIL 0 (Pp.str "not implemented ... yet") + +let instance_tac inst= + if (snd inst)==dummy_id then + right_instance_tac (fst inst) + else + left_instance_tac inst + +let quantified_tac lf backtrack continue seq gl= + let insts=give_instances lf seq in + tclORELSE + (tclFIRST (List.map (fun inst->instance_tac inst continue seq) insts)) + backtrack gl + + diff --git a/contrib/firstorder/instances.mli b/contrib/firstorder/instances.mli new file mode 100644 index 00000000..7667c89f --- /dev/null +++ b/contrib/firstorder/instances.mli @@ -0,0 +1,26 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Formula.t list * Sequent.t + +val give_instances : Formula.t list -> Sequent.t -> + (Unify.instance * global_reference) list + +val quantified_tac : Formula.t list -> seqtac with_backtracking + + + + diff --git a/contrib/firstorder/rules.ml b/contrib/firstorder/rules.ml new file mode 100644 index 00000000..b8b56548 --- /dev/null +++ b/contrib/firstorder/rules.ml @@ -0,0 +1,216 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* tactic) -> Sequent.t -> tactic + +type lseqtac= global_reference -> seqtac + +type 'a with_backtracking = tactic -> 'a + +let wrap n b continue seq gls= + check_for_interrupt (); + let nc=pf_hyps gls in + let env=pf_env gls in + let rec aux i nc ctx= + if i<=0 then seq else + match nc with + []->anomaly "Not the expected number of hyps" + | ((id,_,typ) as nd)::q-> + if occur_var env id (pf_concl gls) || + List.exists (occur_var_in_decl env id) ctx then + (aux (i-1) q (nd::ctx)) + else + add_formula Hyp (VarRef id) typ (aux (i-1) q (nd::ctx)) gls in + let seq1=aux n nc [] in + let seq2=if b then + add_formula Concl dummy_id (pf_concl gls) seq1 gls else seq1 in + continue seq2 gls + +let id_of_global=function + VarRef id->id + | _->assert false + +let clear_global=function + VarRef id->clear [id] + | _->tclIDTAC + + +(* connection rules *) + +let axiom_tac t seq= + try exact_no_check (constr_of_global (find_left t seq)) + with Not_found->tclFAIL 0 (Pp.str "No axiom link") + +let ll_atom_tac a backtrack id continue seq= + tclIFTHENELSE + (try + tclTHENLIST + [generalize [mkApp(constr_of_global id, + [|constr_of_global (find_left a seq)|])]; + clear_global id; + intro] + with Not_found->tclFAIL 0 (Pp.str "No link")) + (wrap 1 false continue seq) backtrack + +(* right connectives rules *) + +let and_tac backtrack continue seq= + tclIFTHENELSE simplest_split (wrap 0 true continue seq) backtrack + +let or_tac backtrack continue seq= + tclORELSE + (any_constructor false (Some (tclCOMPLETE (wrap 0 true continue seq)))) + backtrack + +let arrow_tac backtrack continue seq= + tclIFTHENELSE intro (wrap 1 true continue seq) + (tclORELSE + (tclTHEN introf (tclCOMPLETE (wrap 1 true continue seq))) + backtrack) +(* left connectives rules *) + +let left_and_tac ind backtrack id continue seq gls= + let n=(construct_nhyps ind gls).(0) in + tclIFTHENELSE + (tclTHENLIST + [simplest_elim (constr_of_global id); + clear_global id; + tclDO n intro]) + (wrap n false continue seq) + backtrack gls + +let left_or_tac ind backtrack id continue seq gls= + let v=construct_nhyps ind gls in + let f n= + tclTHENLIST + [clear_global id; + tclDO n intro; + wrap n false continue seq] in + tclIFTHENSVELSE + (simplest_elim (constr_of_global id)) + (Array.map f v) + backtrack gls + +let left_false_tac id= + simplest_elim (constr_of_global id) + +(* left arrow connective rules *) + +(* We use this function for false, and, or, exists *) + +let ll_ind_tac ind largs backtrack id continue seq gl= + let rcs=ind_hyps 0 ind largs gl in + let vargs=Array.of_list largs in + (* construire le terme H->B, le generaliser etc *) + let myterm i= + let rc=rcs.(i) in + let p=List.length rc in + let cstr=mkApp ((mkConstruct (ind,(i+1))),vargs) in + let vars=Array.init p (fun j->mkRel (p-j)) in + let capply=mkApp ((lift p cstr),vars) in + let head=mkApp ((lift p (constr_of_global id)),[|capply|]) in + Sign.it_mkLambda_or_LetIn head rc in + let lp=Array.length rcs in + let newhyps=list_tabulate myterm lp in + tclIFTHENELSE + (tclTHENLIST + [generalize newhyps; + clear_global id; + tclDO lp intro]) + (wrap lp false continue seq) backtrack gl + +let ll_arrow_tac a b c backtrack id continue seq= + let cc=mkProd(Anonymous,a,(lift 1 b)) in + let d=mkLambda (Anonymous,b, + mkApp ((constr_of_global id), + [|mkLambda (Anonymous,(lift 1 a),(mkRel 2))|])) in + tclORELSE + (tclTHENS (cut c) + [tclTHENLIST + [introf; + clear_global id; + wrap 1 false continue seq]; + tclTHENS (cut cc) + [exact_no_check (constr_of_global id); + tclTHENLIST + [generalize [d]; + clear_global id; + introf; + introf; + tclCOMPLETE (wrap 2 true continue seq)]]]) + backtrack + +(* quantifier rules (easy side) *) + +let forall_tac backtrack continue seq= + tclORELSE + (tclIFTHENELSE intro (wrap 0 true continue seq) + (tclORELSE + (tclTHEN introf (tclCOMPLETE (wrap 0 true continue seq))) + backtrack)) + (if !qflag then + tclFAIL 0 (Pp.str "reversible in 1st order mode") + else + backtrack) + +let left_exists_tac ind backtrack id continue seq gls= + let n=(construct_nhyps ind gls).(0) in + tclIFTHENELSE + (simplest_elim (constr_of_global id)) + (tclTHENLIST [clear_global id; + tclDO n intro; + (wrap (n-1) false continue seq)]) + backtrack + gls + +let ll_forall_tac prod backtrack id continue seq= + tclORELSE + (tclTHENS (cut prod) + [tclTHENLIST + [intro; + (fun gls-> + let id0=pf_nth_hyp_id gls 1 in + let term=mkApp((constr_of_global id),[|mkVar(id0)|]) in + tclTHEN (generalize [term]) (clear [id0]) gls); + clear_global id; + intro; + tclCOMPLETE (wrap 1 false continue (deepen seq))]; + tclCOMPLETE (wrap 0 true continue (deepen seq))]) + backtrack + +(* rules for instantiation with unification moved to instances.ml *) + +(* special for compatibility with old Intuition *) + +let constant str = Coqlib.gen_constant "User" ["Init";"Logic"] str + +let defined_connectives=lazy + [all_occurrences,EvalConstRef (destConst (constant "not")); + all_occurrences,EvalConstRef (destConst (constant "iff"))] + +let normalize_evaluables= + onAllClauses + (function + None->unfold_in_concl (Lazy.force defined_connectives) + | Some ((_,id),_)-> + unfold_in_hyp (Lazy.force defined_connectives) + ((Rawterm.all_occurrences_expr,id),Tacexpr.InHypTypeOnly)) diff --git a/contrib/firstorder/rules.mli b/contrib/firstorder/rules.mli new file mode 100644 index 00000000..3798d8d4 --- /dev/null +++ b/contrib/firstorder/rules.mli @@ -0,0 +1,54 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* tactic) -> Sequent.t -> tactic + +type lseqtac= global_reference -> seqtac + +type 'a with_backtracking = tactic -> 'a + +val wrap : int -> bool -> seqtac + +val id_of_global: global_reference -> identifier + +val clear_global: global_reference -> tactic + +val axiom_tac : constr -> Sequent.t -> tactic + +val ll_atom_tac : constr -> lseqtac with_backtracking + +val and_tac : seqtac with_backtracking + +val or_tac : seqtac with_backtracking + +val arrow_tac : seqtac with_backtracking + +val left_and_tac : inductive -> lseqtac with_backtracking + +val left_or_tac : inductive -> lseqtac with_backtracking + +val left_false_tac : global_reference -> tactic + +val ll_ind_tac : inductive -> constr list -> lseqtac with_backtracking + +val ll_arrow_tac : constr -> constr -> constr -> lseqtac with_backtracking + +val forall_tac : seqtac with_backtracking + +val left_exists_tac : inductive -> lseqtac with_backtracking + +val ll_forall_tac : types -> lseqtac with_backtracking + +val normalize_evaluables : tactic diff --git a/contrib/firstorder/sequent.ml b/contrib/firstorder/sequent.ml new file mode 100644 index 00000000..c832d30f --- /dev/null +++ b/contrib/firstorder/sequent.ml @@ -0,0 +1,303 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* if b then incr cnt;!cnt + +let priority = (* pure heuristics, <=0 for non reversible *) + function + Right rf-> + begin + match rf with + Rarrow -> 100 + | Rand -> 40 + | Ror -> -15 + | Rfalse -> -50 + | Rforall -> 100 + | Rexists (_,_,_) -> -29 + end + | Left lf -> + match lf with + Lfalse -> 999 + | Land _ -> 90 + | Lor _ -> 40 + | Lforall (_,_,_) -> -30 + | Lexists _ -> 60 + | LA(_,lap) -> + match lap with + LLatom -> 0 + | LLfalse (_,_) -> 100 + | LLand (_,_) -> 80 + | LLor (_,_) -> 70 + | LLforall _ -> -20 + | LLexists (_,_) -> 50 + | LLarrow (_,_,_) -> -10 + +let left_reversible lpat=(priority lpat)>0 + +module OrderedFormula= +struct + type t=Formula.t + let compare e1 e2= + (priority e1.pat) - (priority e2.pat) +end + +(* [compare_constr f c1 c2] compare [c1] and [c2] using [f] to compare + the immediate subterms of [c1] of [c2] if needed; Cast's, + application associativity, binders name and Cases annotations are + not taken into account *) + +let rec compare_list f l1 l2= + match l1,l2 with + [],[]-> 0 + | [],_ -> -1 + | _,[] -> 1 + | (h1::q1),(h2::q2) -> (f =? (compare_list f)) h1 h2 q1 q2 + +let compare_array f v1 v2= + let l=Array.length v1 in + let c=l - Array.length v2 in + if c=0 then + let rec comp_aux i= + if i<0 then 0 + else + let ci=f v1.(i) v2.(i) in + if ci=0 then + comp_aux (i-1) + else ci + in comp_aux (l-1) + else c + +let compare_constr_int f t1 t2 = + match kind_of_term t1, kind_of_term t2 with + | Rel n1, Rel n2 -> n1 - n2 + | Meta m1, Meta m2 -> m1 - m2 + | Var id1, Var id2 -> Pervasives.compare id1 id2 + | Sort s1, Sort s2 -> Pervasives.compare s1 s2 + | Cast (c1,_,_), _ -> f c1 t2 + | _, Cast (c2,_,_) -> f t1 c2 + | Prod (_,t1,c1), Prod (_,t2,c2) + | Lambda (_,t1,c1), Lambda (_,t2,c2) -> + (f =? f) t1 t2 c1 c2 + | LetIn (_,b1,t1,c1), LetIn (_,b2,t2,c2) -> + ((f =? f) ==? f) b1 b2 t1 t2 c1 c2 + | App (_,_), App (_,_) -> + let c1,l1=decompose_app t1 + and c2,l2=decompose_app t2 in + (f =? (compare_list f)) c1 c2 l1 l2 + | Evar (e1,l1), Evar (e2,l2) -> + ((-) =? (compare_array f)) e1 e2 l1 l2 + | Const c1, Const c2 -> Pervasives.compare c1 c2 + | Ind c1, Ind c2 -> Pervasives.compare c1 c2 + | Construct c1, Construct c2 -> Pervasives.compare c1 c2 + | Case (_,p1,c1,bl1), Case (_,p2,c2,bl2) -> + ((f =? f) ==? (compare_array f)) p1 p2 c1 c2 bl1 bl2 + | Fix (ln1,(_,tl1,bl1)), Fix (ln2,(_,tl2,bl2)) -> + ((Pervasives.compare =? (compare_array f)) ==? (compare_array f)) + ln1 ln2 tl1 tl2 bl1 bl2 + | CoFix(ln1,(_,tl1,bl1)), CoFix(ln2,(_,tl2,bl2)) -> + ((Pervasives.compare =? (compare_array f)) ==? (compare_array f)) + ln1 ln2 tl1 tl2 bl1 bl2 + | _ -> Pervasives.compare t1 t2 + +let rec compare_constr m n= + compare_constr_int compare_constr m n + +module OrderedConstr= +struct + type t=constr + let compare=compare_constr +end + +type h_item = global_reference * (int*constr) option + +module Hitem= +struct + type t = h_item + let compare (id1,co1) (id2,co2)= + (Pervasives.compare + =? (fun oc1 oc2 -> + match oc1,oc2 with + Some (m1,c1),Some (m2,c2) -> + ((-) =? OrderedConstr.compare) m1 m2 c1 c2 + | _,_->Pervasives.compare oc1 oc2)) id1 id2 co1 co2 +end + +module CM=Map.Make(OrderedConstr) + +module History=Set.Make(Hitem) + +let cm_add typ nam cm= + try + let l=CM.find typ cm in CM.add typ (nam::l) cm + with + Not_found->CM.add typ [nam] cm + +let cm_remove typ nam cm= + try + let l=CM.find typ cm in + let l0=List.filter (fun id->id<>nam) l in + match l0 with + []->CM.remove typ cm + | _ ->CM.add typ l0 cm + with Not_found ->cm + +module HP=Heap.Functional(OrderedFormula) + +type t= + {redexes:HP.t; + context:(global_reference list) CM.t; + latoms:constr list; + gl:types; + glatom:constr option; + cnt:counter; + history:History.t; + depth:int} + +let deepen seq={seq with depth=seq.depth-1} + +let record item seq={seq with history=History.add item seq.history} + +let lookup item seq= + History.mem item seq.history || + match item with + (_,None)->false + | (id,Some ((m,t) as c))-> + let p (id2,o)= + match o with + None -> false + | Some ((m2,t2) as c2)->id=id2 && m2>m && more_general c2 c in + History.exists p seq.history + +let rec add_formula side nam t seq gl= + match build_formula side nam t gl seq.cnt with + Left f-> + begin + match side with + Concl -> + {seq with + redexes=HP.add f seq.redexes; + gl=f.constr; + glatom=None} + | _ -> + {seq with + redexes=HP.add f seq.redexes; + context=cm_add f.constr nam seq.context} + end + | Right t-> + match side with + Concl -> + {seq with gl=t;glatom=Some t} + | _ -> + {seq with + context=cm_add t nam seq.context; + latoms=t::seq.latoms} + +let re_add_formula_list lf seq= + let do_one f cm= + if f.id == dummy_id then cm + else cm_add f.constr f.id cm in + {seq with + redexes=List.fold_right HP.add lf seq.redexes; + context=List.fold_right do_one lf seq.context} + +let find_left t seq=List.hd (CM.find t seq.context) + +(*let rev_left seq= + try + let lpat=(HP.maximum seq.redexes).pat in + left_reversible lpat + with Heap.EmptyHeap -> false +*) +let no_formula seq= + seq.redexes=HP.empty + +let rec take_formula seq= + let hd=HP.maximum seq.redexes + and hp=HP.remove seq.redexes in + if hd.id == dummy_id then + let nseq={seq with redexes=hp} in + if seq.gl==hd.constr then + hd,nseq + else + take_formula nseq (* discarding deprecated goal *) + else + hd,{seq with + redexes=hp; + context=cm_remove hd.constr hd.id seq.context} + +let empty_seq depth= + {redexes=HP.empty; + context=CM.empty; + latoms=[]; + gl=(mkMeta 1); + glatom=None; + cnt=newcnt (); + history=History.empty; + depth=depth} + +let create_with_ref_list l depth gl= + let f gr seq= + let c=constr_of_global gr in + let typ=(pf_type_of gl c) in + add_formula Hyp gr typ seq gl in + List.fold_right f l (empty_seq depth) + +open Auto + +let create_with_auto_hints l depth gl= + let seqref=ref (empty_seq depth) in + let f p_a_t = + match p_a_t.code with + Res_pf (c,_) | Give_exact c + | Res_pf_THEN_trivial_fail (c,_) -> + (try + let gr=global_of_constr c in + let typ=(pf_type_of gl c) in + seqref:=add_formula Hint gr typ !seqref gl + with Not_found->()) + | _-> () in + let g _ l=List.iter f l in + let h dbname= + let hdb= + try + searchtable_map dbname + with Not_found-> + error ("Firstorder: "^dbname^" : No such Hint database") in + Hint_db.iter g (snd hdb) in + List.iter h l; + !seqref + +let print_cmap map= + let print_entry c l s= + let xc=Constrextern.extern_constr false (Global.env ()) c in + str "| " ++ + Util.prlist Printer.pr_global l ++ + str " : " ++ + Ppconstr.pr_constr_expr xc ++ + cut () ++ + s in + msgnl (v 0 + (str "-----" ++ + cut () ++ + CM.fold print_entry map (mt ()) ++ + str "-----")) + + diff --git a/contrib/firstorder/sequent.mli b/contrib/firstorder/sequent.mli new file mode 100644 index 00000000..47fb74c7 --- /dev/null +++ b/contrib/firstorder/sequent.mli @@ -0,0 +1,66 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* global_reference -> global_reference list CM.t -> + global_reference list CM.t + +val cm_remove : constr -> global_reference -> global_reference list CM.t -> + global_reference list CM.t + +module HP: Heap.S with type elt=Formula.t + +type t = {redexes:HP.t; + context: global_reference list CM.t; + latoms:constr list; + gl:types; + glatom:constr option; + cnt:counter; + history:History.t; + depth:int} + +val deepen: t -> t + +val record: h_item -> t -> t + +val lookup: h_item -> t -> bool + +val add_formula : side -> global_reference -> constr -> t -> + Proof_type.goal sigma -> t + +val re_add_formula_list : Formula.t list -> t -> t + +val find_left : constr -> t -> global_reference + +val take_formula : t -> Formula.t * t + +val empty_seq : int -> t + +val create_with_ref_list : global_reference list -> + int -> Proof_type.goal sigma -> t + +val create_with_auto_hints : Auto.hint_db_name list -> + int -> Proof_type.goal sigma -> t + +val print_cmap: global_reference list CM.t -> unit diff --git a/contrib/firstorder/unify.ml b/contrib/firstorder/unify.ml new file mode 100644 index 00000000..1dd13cbe --- /dev/null +++ b/contrib/firstorder/unify.ml @@ -0,0 +1,143 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* (n,subst_meta [i,t] tn)) !sigma) in + let rec head_reduce t= + (* forbids non-sigma-normal meta in head position*) + match kind_of_term t with + Meta i-> + (try + head_reduce (List.assoc i !sigma) + with Not_found->t) + | _->t in + Queue.add (t1,t2) bige; + try while true do + let t1,t2=Queue.take bige in + let nt1=head_reduce (whd_betaiotazeta t1) + and nt2=head_reduce (whd_betaiotazeta t2) in + match (kind_of_term nt1),(kind_of_term nt2) with + Meta i,Meta j-> + if i<>j then + if i + let t=subst_meta !sigma nt2 in + if Intset.is_empty (free_rels t) && + not (occur_term (mkMeta i) t) then + bind i t else raise (UFAIL(nt1,nt2)) + | _,Meta i -> + let t=subst_meta !sigma nt1 in + if Intset.is_empty (free_rels t) && + not (occur_term (mkMeta i) t) then + bind i t else raise (UFAIL(nt1,nt2)) + | Cast(_,_,_),_->Queue.add (strip_outer_cast nt1,nt2) bige + | _,Cast(_,_,_)->Queue.add (nt1,strip_outer_cast nt2) bige + | (Prod(_,a,b),Prod(_,c,d))|(Lambda(_,a,b),Lambda(_,c,d))-> + Queue.add (a,c) bige;Queue.add (pop b,pop d) bige + | Case (_,pa,ca,va),Case (_,pb,cb,vb)-> + Queue.add (pa,pb) bige; + Queue.add (ca,cb) bige; + let l=Array.length va in + if l<>(Array.length vb) then + raise (UFAIL (nt1,nt2)) + else + for i=0 to l-1 do + Queue.add (va.(i),vb.(i)) bige + done + | App(ha,va),App(hb,vb)-> + Queue.add (ha,hb) bige; + let l=Array.length va in + if l<>(Array.length vb) then + raise (UFAIL (nt1,nt2)) + else + for i=0 to l-1 do + Queue.add (va.(i),vb.(i)) bige + done + | _->if not (eq_constr nt1 nt2) then raise (UFAIL (nt1,nt2)) + done; + assert false + (* this place is unreachable but needed for the sake of typing *) + with Queue.Empty-> !sigma + +let value i t= + let add x y= + if x<0 then y else if y<0 then x else x+y in + let tref=mkMeta i in + let rec vaux term= + if term=tref then 0 else + let f v t=add v (vaux t) in + let vr=fold_constr f (-1) term in + if vr<0 then -1 else vr+1 in + vaux t + +type instance= + Real of (int*constr)*int + | Phantom of constr + +let mk_rel_inst t= + let new_rel=ref 1 in + let rel_env=ref [] in + let rec renum_rec d t= + match kind_of_term t with + Meta n-> + (try + mkRel (d+(List.assoc n !rel_env)) + with Not_found-> + let m= !new_rel in + incr new_rel; + rel_env:=(n,m) :: !rel_env; + mkRel (m+d)) + | _ -> map_constr_with_binders succ renum_rec d t + in + let nt=renum_rec 0 t in (!new_rel - 1,nt) + +let unif_atoms i dom t1 t2= + try + let t=List.assoc i (unif t1 t2) in + if isMeta t then Some (Phantom dom) + else Some (Real(mk_rel_inst t,value i t1)) + with + UFAIL(_,_) ->None + | Not_found ->Some (Phantom dom) + +let renum_metas_from k n t= (* requires n = max (free_rels t) *) + let l=list_tabulate (fun i->mkMeta (k+i)) n in + substl l t + +let more_general (m1,t1) (m2,t2)= + let mt1=renum_metas_from 0 m1 t1 + and mt2=renum_metas_from m1 m2 t2 in + try + let sigma=unif mt1 mt2 in + let p (n,t)= nfalse diff --git a/contrib/firstorder/unify.mli b/contrib/firstorder/unify.mli new file mode 100644 index 00000000..9fbe3dda --- /dev/null +++ b/contrib/firstorder/unify.mli @@ -0,0 +1,23 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* constr -> (int*constr) list + +type instance= + Real of (int*constr)*int (* nb trous*terme*valeur heuristique *) + | Phantom of constr (* domaine de quantification *) + +val unif_atoms : metavariable -> constr -> constr -> constr -> instance option + +val more_general : (int*constr) -> (int*constr) -> bool diff --git a/contrib/fourier/Fourier_util.v b/contrib/fourier/Fourier_util.v index c3257b7d..6a9ab051 100644 --- a/contrib/fourier/Fourier_util.v +++ b/contrib/fourier/Fourier_util.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: Fourier_util.v 5920 2004-07-16 20:01:26Z herbelin $ *) +(* $Id: Fourier_util.v 10710 2008-03-23 09:24:09Z herbelin $ *) Require Export Rbase. Comments "Lemmas used by the tactic Fourier". @@ -152,7 +152,7 @@ apply Rlt_irrefl. ring. Qed. -Lemma Rlt_not_le : forall n d:R, 0 < n * / d -> ~ 0 <= - n * / d. +Lemma Rlt_not_le_frac_opp : forall n d:R, 0 < n * / d -> ~ 0 <= - n * / d. intros n d H; try assumption. apply Rgt_not_le. replace 0 with (-0). diff --git a/contrib/fourier/fourierR.ml b/contrib/fourier/fourierR.ml index f9518bcb..114d5f9c 100644 --- a/contrib/fourier/fourierR.ml +++ b/contrib/fourier/fourierR.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: fourierR.ml 7760 2005-12-30 10:49:13Z herbelin $ *) +(* $Id: fourierR.ml 10790 2008-04-14 22:34:19Z herbelin $ *) @@ -258,11 +258,11 @@ let fourier_lineq lineq1 = let nvar=ref (-1) in let hvar=Hashtbl.create 50 in (* la table des variables des inéquations *) List.iter (fun f -> - Hashtbl.iter (fun x c -> - try (Hashtbl.find hvar x;()) - with _-> nvar:=(!nvar)+1; - Hashtbl.add hvar x (!nvar)) - f.hflin.fhom) + Hashtbl.iter (fun x _ -> if not (Hashtbl.mem hvar x) then begin + nvar:=(!nvar)+1; + Hashtbl.add hvar x (!nvar) + end) + f.hflin.fhom) lineq1; let sys= List.map (fun h-> let v=Array.create ((!nvar)+1) r0 in @@ -334,7 +334,7 @@ let coq_Rfourier_le_lt = lazy (constant_fourier "Rfourier_le_lt") let coq_Rfourier_le_le = lazy (constant_fourier "Rfourier_le_le") let coq_Rnot_lt_lt = lazy (constant_fourier "Rnot_lt_lt") let coq_Rnot_le_le = lazy (constant_fourier "Rnot_le_le") -let coq_Rlt_not_le = lazy (constant_fourier "Rlt_not_le") +let coq_Rlt_not_le_frac_opp = lazy (constant_fourier "Rlt_not_le_frac_opp") (****************************************************************************** Construction de la preuve en cas de succès de la méthode de Fourier, @@ -404,7 +404,7 @@ let tac_zero_inf_false gl (n,d) = (* preuve que 0<=(-n)*(1/d) => False *) let tac_zero_infeq_false gl (n,d) = - (tclTHEN (apply (get coq_Rlt_not_le)) + (tclTHEN (apply (get coq_Rlt_not_le_frac_opp)) (tac_zero_inf_pos gl (-n,d))) ;; @@ -492,7 +492,7 @@ let rec fourier gl= in tac gl) with _ -> (* les hypothèses *) - let hyps = List.map (fun (h,t)-> (mkVar h,(body_of_type t))) + let hyps = List.map (fun (h,t)-> (mkVar h,t)) (list_of_sign (pf_hyps gl)) in let lineq =ref [] in List.iter (fun h -> try (lineq:=(ineq1_of_constr h)@(!lineq)) @@ -503,8 +503,7 @@ let rec fourier gl= let res=fourier_lineq (!lineq) in let tac=ref tclIDTAC in if res=[] - then (print_string "Tactic Fourier fails.\n"; - flush stdout) + then Util.error "fourier failed" (* l'algorithme de Fourier a réussi: on va en tirer une preuve Coq *) else (match res with [(cres,sres,lc)]-> diff --git a/contrib/funind/Recdef.v b/contrib/funind/Recdef.v new file mode 100644 index 00000000..2d206220 --- /dev/null +++ b/contrib/funind/Recdef.v @@ -0,0 +1,48 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* A) -> A -> A := + fun (fl : A -> A) (def : A) => + match n with + | O => def + | S m => fl (iter m fl def) + end. +End Iter. + +Theorem SSplus_lt : forall p p' : nat, p < S (S (p + p')). + intro p; intro p'; change (S p <= S (S (p + p'))); + apply le_S; apply Gt.gt_le_S; change (p < S (p + p')); + apply Lt.le_lt_n_Sm; apply Plus.le_plus_l. +Qed. + + +Theorem Splus_lt : forall p p' : nat, p' < S (p + p'). + intro p; intro p'; change (S p' <= S (p + p')); + apply Gt.gt_le_S; change (p' < S (p + p')); apply Lt.le_lt_n_Sm; + apply Plus.le_plus_r. +Qed. + +Theorem le_lt_SS : forall x y, x <= y -> x < S (S y). +intro x; intro y; intro H; change (S x <= S (S y)); + apply le_S; apply Gt.gt_le_S; change (x < S y); + apply Lt.le_lt_n_Sm; exact H. +Qed. + +Inductive max_type (m n:nat) : Set := + cmt : forall v, m <= v -> n <= v -> max_type m n. + +Definition max : forall m n:nat, max_type m n. +intros m n; case (Compare_dec.le_gt_dec m n). +intros h; exists n; [exact h | apply le_n]. +intros h; exists m; [apply le_n | apply Lt.lt_le_weak; exact h]. +Defined. diff --git a/contrib/funind/functional_principles_proofs.ml b/contrib/funind/functional_principles_proofs.ml index 975cf60b..3d80bd00 100644 --- a/contrib/funind/functional_principles_proofs.ml +++ b/contrib/funind/functional_principles_proofs.ml @@ -47,7 +47,7 @@ let observe_tac_stream s tac g = let observe_tac s tac g = observe_tac_stream (str s) tac g (* let tclTRYD tac = *) -(* if !Options.debug || do_observe () *) +(* if !Flags.debug || do_observe () *) (* then (fun g -> try (\* do_observe_tac "" *\)tac g with _ -> tclIDTAC g) *) (* else tac *) @@ -140,7 +140,7 @@ let change_hyp_with_using msg hyp_id t tac : tactic = [tclTHENLIST [ (* observe_tac "change_hyp_with_using thin" *) (thin [hyp_id]); - (* observe_tac "change_hyp_with_using rename " *) (h_rename prov_id hyp_id) + (* observe_tac "change_hyp_with_using rename " *) (h_rename [prov_id,hyp_id]) ]] g exception TOREMOVE @@ -573,7 +573,7 @@ let instanciate_hyps_with_args (do_prove:identifier list -> tactic) hyps args_id tclTHENLIST[ forward None (Genarg.IntroIdentifier prov_hid) (mkApp(mkVar hid,args)); thin [hid]; - (h_rename prov_hid hid) + h_rename [prov_hid,hid] ] g ) ( (* @@ -637,7 +637,7 @@ let build_proof [ h_generalize (term_eq::(List.map mkVar dyn_infos.rec_hyps)); thin dyn_infos.rec_hyps; - pattern_option [[-1],t] None; + pattern_option [(false,[1]),t] None; h_simplest_case t; (fun g' -> let g'_nb_prod = nb_prod (pf_concl g') in @@ -882,7 +882,7 @@ let generate_equation_lemma fnames f fun_num nb_params nb_args rec_args_num = let f_def = Global.lookup_constant (destConst f) in let eq_lhs = mkApp(f,Array.init (nb_params + nb_args) (fun i -> mkRel(nb_params + nb_args - i))) in let f_body = - force (out_some f_def.const_body) + force (Option.get f_def.const_body) in let params,f_body_with_params = decompose_lam_n nb_params f_body in let (_,num),(_,_,bodies) = destFix f_body_with_params in @@ -910,7 +910,7 @@ let generate_equation_lemma fnames f fun_num nb_params nb_args rec_args_num = let rec_id = pf_nth_hyp_id g 1 in tclTHENSEQ [(* observe_tac "generalize_non_dep in generate_equation_lemma" *) (generalize_non_dep rec_id); - (* observe_tac "h_case" *) (h_case (mkVar rec_id,Rawterm.NoBindings)); + (* observe_tac "h_case" *) (h_case false (mkVar rec_id,Rawterm.NoBindings)); intros_reflexivity] g ) ] @@ -933,8 +933,8 @@ let do_replace params rec_arg_num rev_args_id f fun_num all_funs g = let equation_lemma = try let finfos = find_Function_infos (destConst f) in - mkConst (out_some finfos.equation_lemma) - with (Not_found | Failure "out_some" as e) -> + mkConst (Option.get finfos.equation_lemma) + with (Not_found | Option.IsNone as e) -> let f_id = id_of_label (con_label (destConst f)) in (*i The next call to mk_equation_id is valid since we will construct the lemma Ensures by: obvious @@ -943,7 +943,7 @@ let do_replace params rec_arg_num rev_args_id f fun_num all_funs g = generate_equation_lemma all_funs f fun_num (List.length params) (List.length rev_args_id) rec_arg_num; let _ = match e with - | Failure "out_some" -> + | Option.IsNone -> let finfos = find_Function_infos (destConst f) in update_Function {finfos with @@ -1141,7 +1141,7 @@ let prove_princ_for_struct interactive_proof fun_num fnames all_funs _nparams : then (* observe_tac ("h_fix") *) (h_fix (Some this_fix_info.name) (this_fix_info.idx +1)) else - h_mutual_fix this_fix_info.name (this_fix_info.idx + 1) + h_mutual_fix false this_fix_info.name (this_fix_info.idx + 1) other_fix_infos | _ -> anomaly "Not a valid information" in @@ -1246,7 +1246,7 @@ let prove_princ_for_struct interactive_proof fun_num fnames all_funs _nparams : in let fname = destConst (fst (decompose_app (List.hd (List.rev pte_args)))) in tclTHENSEQ - [unfold_in_concl [([],Names.EvalConstRef fname)]; + [unfold_in_concl [(all_occurrences,Names.EvalConstRef fname)]; let do_prove = build_proof interactive_proof @@ -1347,19 +1347,27 @@ let build_clause eqs = { Tacexpr.onhyps = Some (List.map - (fun id -> ([],id),Tacexpr.InHyp) + (fun id -> (Rawterm.all_occurrences_expr,id),Tacexpr.InHyp) eqs ); - Tacexpr.onconcl = false; - Tacexpr.concl_occs = [] + Tacexpr.concl_occs = Rawterm.no_occurrences_expr } let rec rewrite_eqs_in_eqs eqs = match eqs with | [] -> tclIDTAC | eq::eqs -> + tclTHEN - (tclMAP (fun id -> tclTRY (Equality.general_rewrite_in true id (mkVar eq))) eqs) + (tclMAP + (fun id gl -> + observe_tac + (Format.sprintf "rewrite %s in %s " (string_of_id eq) (string_of_id id)) + (tclTRY (Equality.general_rewrite_in true all_occurrences id (mkVar eq) false)) + gl + ) + eqs + ) (rewrite_eqs_in_eqs eqs) let new_prove_with_tcc is_mes acc_inv hrec tcc_hyps eqs : tactic = @@ -1373,21 +1381,26 @@ let new_prove_with_tcc is_mes acc_inv hrec tcc_hyps eqs : tactic = [ tclTHENSEQ [ keep (tcc_hyps@eqs); - apply (Lazy.force acc_inv); (fun g -> if is_mes then - unfold_in_concl [([], evaluable_of_global_reference (delayed_force ltof_ref))] g + unfold_in_concl [(all_occurrences, evaluable_of_global_reference (delayed_force ltof_ref))] g else tclIDTAC g ); observe_tac "rew_and_finish" (tclTHENLIST [tclTRY(Recdef.list_rewrite false (List.map mkVar eqs)); - rewrite_eqs_in_eqs eqs; - (observe_tac "finishing" - (tclCOMPLETE ( - Eauto.gen_eauto false (false,5) [] (Some [])) + observe_tac "rewrite_eqs_in_eqs" (rewrite_eqs_in_eqs eqs); + (observe_tac "finishing using" + ( + tclCOMPLETE( + Eauto.eauto_with_bases + false + (true,5) + [Lazy.force refl_equal] + [empty_transparent_state, Auto.Hint_db.empty] + ) ) ) ] @@ -1445,7 +1458,7 @@ let prove_principle_for_gen let wf_tac = if is_mes then - (fun b -> Recdef.tclUSER_if_not_mes b None) + (fun b -> Recdef.tclUSER_if_not_mes tclIDTAC b None) else fun _ -> prove_with_tcc tcc_lemma_ref [] in let real_rec_arg_num = rec_arg_num - princ_info.nparams in @@ -1502,16 +1515,16 @@ let prove_principle_for_gen | None -> anomaly ( "No tcc proof !!") | Some lemma -> lemma in - let rec list_diff del_list check_list = - match del_list with - [] -> - [] - | f::r -> - if List.mem f check_list then - list_diff r check_list - else - f::(list_diff r check_list) - in +(* let rec list_diff del_list check_list = *) +(* match del_list with *) +(* [] -> *) +(* [] *) +(* | f::r -> *) +(* if List.mem f check_list then *) +(* list_diff r check_list *) +(* else *) +(* f::(list_diff r check_list) *) +(* in *) let tcc_list = ref [] in let start_tac gls = let hyps = pf_ids_of_hyps gls in @@ -1527,7 +1540,7 @@ let prove_principle_for_gen Elim.h_decompose_and (mkVar hid); (fun g -> let new_hyps = pf_ids_of_hyps g in - tcc_list := list_diff new_hyps (hid::hyps); + tcc_list := List.rev (list_subtract new_hyps (hid::hyps)); if !tcc_list = [] then begin @@ -1593,14 +1606,15 @@ let prove_principle_for_gen (* msgnl (str "eqs := "++ prlist_with_sep spc Ppconstr.pr_id eqs); *) (* observe_tac "new_prove_with_tcc" *) - (new_prove_with_tcc + (new_prove_with_tcc is_mes acc_inv fix_id - !tcc_list - ((List.map + + (!tcc_list@(List.map (fun (na,_,_) -> (Nameops.out_name na)) (princ_info.args@princ_info.params) - )@ (acc_rec_arg_id::eqs)) + )@ ([acc_rec_arg_id])) eqs ) + ); is_valid = is_valid_hypothesis predicates_names } diff --git a/contrib/funind/functional_principles_types.ml b/contrib/funind/functional_principles_types.ml index 8ad2e72b..16076479 100644 --- a/contrib/funind/functional_principles_types.ml +++ b/contrib/funind/functional_principles_types.ml @@ -115,7 +115,7 @@ let compute_new_princ_type_from_rel rel_to_fun sorts princ_type = it_mkProd_or_LetIn ~init: (it_mkProd_or_LetIn - ~init:(option_fold_right + ~init:(Option.fold_right mkProd_or_LetIn princ_type_info.indarg princ_type_info.concl @@ -384,7 +384,7 @@ let generate_functional_principle { const_entry_body = value; const_entry_type = None; const_entry_opaque = false; - const_entry_boxed = Options.boxed_definitions() + const_entry_boxed = Flags.boxed_definitions() } in ignore( @@ -394,7 +394,7 @@ let generate_functional_principle Decl_kinds.IsDefinition (Decl_kinds.Scheme) ) ); - Options.if_verbose + Flags.if_verbose (fun id -> Pp.msgnl (Ppconstr.pr_id id ++ str " is defined")) name; names := name :: !names @@ -561,6 +561,15 @@ let make_scheme (fas : (constant*Rawterm.rawsort) list) : Entries.definition_ent (fun _ _ _ -> ()) in incr i; + let opacity = + let finfos = find_Function_infos this_block_funs.(0) in + try + let equation = Option.get finfos.equation_lemma in + (Global.lookup_constant equation).Declarations.const_opaque + with Option.IsNone -> (* non recursive definition *) + false + in + let const = {const with const_entry_opaque = opacity } in (* The others are just deduced *) if other_princ_types = [] then @@ -642,10 +651,12 @@ let build_scheme fas = in List.iter2 (fun (princ_id,_,_) def_entry -> - ignore (Declare.declare_constant - princ_id - (Entries.DefinitionEntry def_entry,Decl_kinds.IsProof Decl_kinds.Theorem)); - Options.if_verbose (fun id -> Pp.msgnl (Ppconstr.pr_id id ++ str " is defined")) princ_id + ignore + (Declare.declare_constant + princ_id + (Entries.DefinitionEntry def_entry,Decl_kinds.IsProof Decl_kinds.Theorem)); + Flags.if_verbose + (fun id -> Pp.msgnl (Ppconstr.pr_id id ++ str " is defined")) princ_id ) fas bodies_types diff --git a/contrib/funind/g_indfun.ml4 b/contrib/funind/g_indfun.ml4 new file mode 100644 index 00000000..dae76f2d --- /dev/null +++ b/contrib/funind/g_indfun.ml4 @@ -0,0 +1,485 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* hov 1 (Ppconstr.pr_id id ++ str " := " ++ cut () ++ prc c) + | loc, Rawterm.AnonHyp n, c -> hov 1 (int n ++ str " := " ++ cut () ++ prc c) + +let pr_bindings prc prlc = function + | Rawterm.ImplicitBindings l -> + brk (1,1) ++ str "with" ++ brk (1,1) ++ + Util.prlist_with_sep spc prc l + | Rawterm.ExplicitBindings l -> + brk (1,1) ++ str "with" ++ brk (1,1) ++ + Util.prlist_with_sep spc (fun b -> str"(" ++ pr_binding prlc b ++ str")") l + | Rawterm.NoBindings -> mt () + +let pr_with_bindings prc prlc (c,bl) = + prc c ++ hv 0 (pr_bindings prc prlc bl) + +let pr_fun_ind_using prc prlc _ opt_c = + match opt_c with + | None -> mt () + | Some (p,b) -> spc () ++ hov 2 (str "using" ++ spc () ++ pr_with_bindings prc prlc (p,b)) + +(* Duplication of printing functions because "'a with_bindings" is + (internally) not uniform in 'a: indeed constr_with_bindings at the + "typed" level has type "open_constr with_bindings" instead of + "constr with_bindings"; hence, its printer cannot be polymorphic in + (prc,prlc)... *) + +let pr_with_bindings_typed prc prlc (c,bl) = + prc c ++ + hv 0 (pr_bindings (fun c -> prc (snd c)) (fun c -> prlc (snd c)) bl) + +let pr_fun_ind_using_typed prc prlc _ opt_c = + match opt_c with + | None -> mt () + | Some (p,b) -> spc () ++ hov 2 (str "using" ++ spc () ++ pr_with_bindings_typed prc prlc (p,b)) + + +ARGUMENT EXTEND fun_ind_using + TYPED AS constr_with_bindings_opt + PRINTED BY pr_fun_ind_using_typed + RAW_TYPED AS constr_with_bindings_opt + RAW_PRINTED BY pr_fun_ind_using + GLOB_TYPED AS constr_with_bindings_opt + GLOB_PRINTED BY pr_fun_ind_using +| [ "using" constr_with_bindings(c) ] -> [ Some c ] +| [ ] -> [ None ] +END + + +TACTIC EXTEND newfuninv + [ "functional" "inversion" quantified_hypothesis(hyp) reference_opt(fname) ] -> + [ + Invfun.invfun hyp fname + ] +END + + +let pr_intro_as_pat prc _ _ pat = + match pat with + | Some pat -> spc () ++ str "as" ++ spc () ++ pr_intro_pattern pat + | None -> mt () + + +ARGUMENT EXTEND with_names TYPED AS intro_pattern_opt PRINTED BY pr_intro_as_pat +| [ "as" simple_intropattern(ipat) ] -> [ Some ipat ] +| [] ->[ None ] +END + + + + +TACTIC EXTEND newfunind + ["functional" "induction" ne_constr_list(cl) fun_ind_using(princl) with_names(pat)] -> + [ + let pat = + match pat with + | None -> IntroAnonymous + | Some pat -> pat + in + let c = match cl with + | [] -> assert false + | [c] -> c + | c::cl -> applist(c,cl) + in + functional_induction true c princl pat ] +END +(***** debug only ***) +TACTIC EXTEND snewfunind + ["soft" "functional" "induction" ne_constr_list(cl) fun_ind_using(princl) with_names(pat)] -> + [ + let pat = + match pat with + | None -> IntroAnonymous + | Some pat -> pat + in + let c = match cl with + | [] -> assert false + | [c] -> c + | c::cl -> applist(c,cl) + in + functional_induction false c princl pat ] +END + + +let pr_constr_coma_sequence prc _ _ = Util.prlist_with_sep Util.pr_coma prc + +ARGUMENT EXTEND constr_coma_sequence' + TYPED AS constr_list + PRINTED BY pr_constr_coma_sequence +| [ constr(c) "," constr_coma_sequence'(l) ] -> [ c::l ] +| [ constr(c) ] -> [ [c] ] +END + +let pr_auto_using prc _prlc _prt = Pptactic.pr_auto_using prc + +ARGUMENT EXTEND auto_using' + TYPED AS constr_list + PRINTED BY pr_auto_using +| [ "using" constr_coma_sequence'(l) ] -> [ l ] +| [ ] -> [ [] ] +END + +VERNAC ARGUMENT EXTEND rec_annotation2 + [ "{" "struct" ident(id) "}"] -> [ Struct id ] +| [ "{" "wf" constr(r) ident_opt(id) auto_using'(l) "}" ] -> [ Wf(r,id,l) ] +| [ "{" "measure" constr(r) ident_opt(id) auto_using'(l) "}" ] -> [ Mes(r,id,l) ] +END + + +VERNAC ARGUMENT EXTEND binder2 + [ "(" ne_ident_list(idl) ":" lconstr(c) ")"] -> + [ + LocalRawAssum (List.map (fun id -> (Util.dummy_loc,Name id)) idl,Topconstr.default_binder_kind,c) ] +END + + +VERNAC ARGUMENT EXTEND rec_definition2 + [ ident(id) binder2_list( bl) + rec_annotation2_opt(annot) ":" lconstr( type_) + ":=" lconstr(def)] -> + [let names = List.map snd (Topconstr.names_of_local_assums bl) in + let check_one_name () = + if List.length names > 1 then + Util.user_err_loc + (Util.dummy_loc,"Function", + Pp.str "the recursive argument needs to be specified"); + in + let check_exists_args an = + try + let id = match an with + | Struct id -> id | Wf(_,Some id,_) -> id | Mes(_,Some id,_) -> id + | Wf(_,None,_) | Mes(_,None,_) -> failwith "check_exists_args" + in + (try ignore(Util.list_index0 (Name id) names); annot + with Not_found -> Util.user_err_loc + (Util.dummy_loc,"Function", + Pp.str "No argument named " ++ Nameops.pr_id id) + ) + with Failure "check_exists_args" -> check_one_name ();annot + in + let ni = + match annot with + | None -> + annot + | Some an -> + check_exists_args an + in + ((Util.dummy_loc,id), ni, bl, type_, def) ] + END + + +VERNAC ARGUMENT EXTEND rec_definitions2 +| [ rec_definition2(rd) ] -> [ [rd] ] +| [ rec_definition2(hd) "with" rec_definitions2(tl) ] -> [ hd::tl ] +END + + +VERNAC COMMAND EXTEND Function + ["Function" rec_definitions2(recsl)] -> + [ + do_generate_principle false recsl; + + ] +END + + +VERNAC ARGUMENT EXTEND fun_scheme_arg +| [ ident(princ_name) ":=" "Induction" "for" reference(fun_name) "Sort" sort(s) ] -> [ (princ_name,fun_name,s) ] +END + +VERNAC ARGUMENT EXTEND fun_scheme_args +| [ fun_scheme_arg(fa) ] -> [ [fa] ] +| [ fun_scheme_arg(fa) "with" fun_scheme_args(fas) ] -> [fa::fas] +END + +VERNAC COMMAND EXTEND NewFunctionalScheme + ["Functional" "Scheme" fun_scheme_args(fas) ] -> + [ + try + Functional_principles_types.build_scheme fas + with Functional_principles_types.No_graph_found -> + match fas with + | (_,fun_name,_)::_ -> + begin + begin + make_graph (Nametab.global fun_name) + end + ; + try Functional_principles_types.build_scheme fas + with Functional_principles_types.No_graph_found -> + Util.error ("Cannot generate induction principle(s)") + end + | _ -> assert false (* we can only have non empty list *) + ] +END +(***** debug only ***) + +VERNAC COMMAND EXTEND NewFunctionalCase + ["Functional" "Case" fun_scheme_arg(fas) ] -> + [ + Functional_principles_types.build_case_scheme fas + ] +END + +(***** debug only ***) +VERNAC COMMAND EXTEND GenerateGraph +["Generate" "graph" "for" reference(c)] -> [ make_graph (Nametab.global c) ] +END + + + + + +(* FINDUCTION *) + +(* comment this line to see debug msgs *) +let msg x = () ;; let pr_lconstr c = str "" + (* uncomment this to see debugging *) +let prconstr c = msg (str" " ++ Printer.pr_lconstr c ++ str"\n") +let prlistconstr lc = List.iter prconstr lc +let prstr s = msg(str s) +let prNamedConstr s c = + begin + msg(str ""); + msg(str(s^"==>\n ") ++ Printer.pr_lconstr c ++ str "\n<==\n"); + msg(str ""); + end + + + +(** Information about an occurrence of a function call (application) + inside a term. *) +type fapp_info = { + fname: constr; (** The function applied *) + largs: constr list; (** List of arguments *) + free: bool; (** [true] if all arguments are debruijn free *) + max_rel: int; (** max debruijn index in the funcall *) + onlyvars: bool (** [true] if all arguments are variables (and not debruijn) *) +} + + +(** [constr_head_match(a b c) a] returns true, false otherwise. *) +let constr_head_match u t= + if isApp u + then + let uhd,args= destApp u in + uhd=t + else false + +(** [hdMatchSub inu t] returns the list of occurrences of [t] in + [inu]. DeBruijn are not pushed, so some of them may be unbound in + the result. *) +let rec hdMatchSub inu (test: constr -> bool) : fapp_info list = + let subres = + match kind_of_term inu with + | Lambda (nm,tp,cstr) | Prod (nm,tp,cstr) -> + hdMatchSub tp test @ hdMatchSub (lift 1 cstr) test + | Fix (_,(lna,tl,bl)) -> (* not sure Fix is correct *) + Array.fold_left + (fun acc cstr -> acc @ hdMatchSub (lift (Array.length tl) cstr) test) + [] bl + | _ -> (* Cofix will be wrong *) + fold_constr + (fun l cstr -> + l @ hdMatchSub cstr test) [] inu in + if not (test inu) then subres + else + let f,args = decompose_app inu in + let freeset = Termops.free_rels inu in + let max_rel = try Util.Intset.max_elt freeset with Not_found -> -1 in + {fname = f; largs = args; free = Util.Intset.is_empty freeset; + max_rel = max_rel; onlyvars = List.for_all isVar args } + ::subres + +let mkEq typ c1 c2 = + mkApp (Coqlib.build_coq_eq(),[| typ; c1; c2|]) + + +let poseq_unsafe idunsafe cstr gl = + let typ = Tacmach.pf_type_of gl cstr in + tclTHEN + (Tactics.letin_tac None (Name idunsafe) cstr allClauses) + (tclTHENFIRST + (Tactics.assert_as true IntroAnonymous (mkEq typ (mkVar idunsafe) cstr)) + Tactics.reflexivity) + gl + + +let poseq id cstr gl = + let x = Tactics.fresh_id [] id gl in + poseq_unsafe x cstr gl + +(* dirty? *) + +let list_constr_largs = ref [] + +let rec poseq_list_ids_rec lcstr gl = + match lcstr with + | [] -> tclIDTAC gl + | c::lcstr' -> + match kind_of_term c with + | Var _ -> + (list_constr_largs:=c::!list_constr_largs ; poseq_list_ids_rec lcstr' gl) + | _ -> + let _ = prstr "c = " in + let _ = prconstr c in + let _ = prstr "\n" in + let typ = Tacmach.pf_type_of gl c in + let cname = Termops.id_of_name_using_hdchar (Global.env()) typ Anonymous in + let x = Tactics.fresh_id [] cname gl in + let _ = list_constr_largs:=mkVar x :: !list_constr_largs in + let _ = prstr " list_constr_largs = " in + let _ = prlistconstr !list_constr_largs in + let _ = prstr "\n" in + + tclTHEN + (poseq_unsafe x c) + (poseq_list_ids_rec lcstr') + gl + +let poseq_list_ids lcstr gl = + let _ = list_constr_largs := [] in + poseq_list_ids_rec lcstr gl + +(** [find_fapp test g] returns the list of [app_info] of all calls to + functions that satisfy [test] in the conclusion of goal g. Trivial + repetition (not modulo conversion) are deleted. *) +let find_fapp (test:constr -> bool) g : fapp_info list = + let pre_res = hdMatchSub (Tacmach.pf_concl g) test in + let res = + List.fold_right (fun x acc -> if List.mem x acc then acc else x::acc) pre_res [] in + (prlistconstr (List.map (fun x -> applist (x.fname,x.largs)) res); + res) + + + +(** [finduction id filter g] tries to apply functional induction on + an occurence of function [id] in the conclusion of goal [g]. If + [id]=[None] then calls to any function are selected. In any case + [heuristic] is used to select the most pertinent occurrence. *) +let finduction (oid:identifier option) (heuristic: fapp_info list -> fapp_info list) + (nexttac:Proof_type.tactic) g = + let test = match oid with + | Some id -> + let idconstr = mkConst (const_of_id id) in + (fun u -> constr_head_match u idconstr) (* select only id *) + | None -> (fun u -> isApp u) in (* select calls to any function *) + let info_list = find_fapp test g in + let ordered_info_list = heuristic info_list in + prlistconstr (List.map (fun x -> applist (x.fname,x.largs)) ordered_info_list); + if List.length ordered_info_list = 0 then Util.error "function not found in goal\n"; + let taclist: Proof_type.tactic list = + List.map + (fun info -> + (tclTHEN + (tclTHEN (poseq_list_ids info.largs) + ( + fun gl -> + (functional_induction + true (applist (info.fname, List.rev !list_constr_largs)) + None IntroAnonymous) gl)) + nexttac)) ordered_info_list in + (* we try each (f t u v) until one does not fail *) + (* TODO: try also to mix functional schemes *) + tclFIRST taclist g + + + + +(** [chose_heuristic oi x] returns the heuristic for reordering + (and/or forgetting some elts of) a list of occurrences of + function calls infos to chose first with functional induction. *) +let chose_heuristic (oi:int option) : fapp_info list -> fapp_info list = + match oi with + | Some i -> (fun l -> [ List.nth l (i-1) ]) (* occurrence was given by the user *) + | None -> + (* Default heuristic: put first occurrences where all arguments + are *bound* (meaning already introduced) variables *) + let ordering x y = + if x.free && x.onlyvars && y.free && y.onlyvars then 0 (* both pertinent *) + else if x.free && x.onlyvars then -1 + else if y.free && y.onlyvars then 1 + else 0 (* both not pertinent *) + in + List.sort ordering + + + +TACTIC EXTEND finduction + ["finduction" ident(id) natural_opt(oi)] -> + [ + match oi with + | Some(n) when n<=0 -> Util.error "numerical argument must be > 0" + | _ -> + let heuristic = chose_heuristic oi in + finduction (Some id) heuristic tclIDTAC + ] +END + + + +TACTIC EXTEND fauto + [ "fauto" tactic(tac)] -> + [ + let heuristic = chose_heuristic None in + finduction None heuristic (snd tac) + ] + | + [ "fauto" ] -> + [ + let heuristic = chose_heuristic None in + finduction None heuristic tclIDTAC + ] + +END + + +TACTIC EXTEND poseq + [ "poseq" ident(x) constr(c) ] -> + [ poseq x c ] +END + +VERNAC COMMAND EXTEND Showindinfo + [ "showindinfo" ident(x) ] -> [ Merge.showind x ] +END + +VERNAC COMMAND EXTEND MergeFunind + [ "Mergeschemes" "(" ident(id1) ne_ident_list(cl1) ")" + "with" "(" ident(id2) ne_ident_list(cl2) ")" "using" ident(id) ] -> + [ + let f1 = Constrintern.interp_constr Evd.empty (Global.env()) + (CRef (Libnames.Ident (Util.dummy_loc,id1))) in + let f2 = Constrintern.interp_constr Evd.empty (Global.env()) + (CRef (Libnames.Ident (Util.dummy_loc,id2))) in + let f1type = Typing.type_of (Global.env()) Evd.empty f1 in + let f2type = Typing.type_of (Global.env()) Evd.empty f2 in + let ar1 = List.length (fst (decompose_prod f1type)) in + let ar2 = List.length (fst (decompose_prod f2type)) in + let _ = + if ar1 <> List.length cl1 then + Util.error ("not the right number of arguments for " ^ string_of_id id1) in + let _ = + if ar2 <> List.length cl2 then + Util.error ("not the right number of arguments for " ^ string_of_id id2) in + Merge.merge id1 id2 (Array.of_list cl1) (Array.of_list cl2) id + ] +END diff --git a/contrib/funind/indfun.ml b/contrib/funind/indfun.ml index 82bee01f..a6cbb321 100644 --- a/contrib/funind/indfun.ml +++ b/contrib/funind/indfun.ml @@ -22,8 +22,8 @@ let is_rec_info scheme_info = let choose_dest_or_ind scheme_info = if is_rec_info scheme_info - then Tactics.new_induct - else Tactics.new_destruct + then Tactics.new_induct false + else Tactics.new_destruct false let functional_induction with_clean c princl pat = @@ -48,8 +48,8 @@ let functional_induction with_clean c princl pat = | InType -> finfo.rect_lemma in let princ = (* then we get the principle *) - try mkConst (out_some princ_option ) - with Failure "out_some" -> + try mkConst (Option.get princ_option ) + with Option.IsNone -> (*i If there is not default lemma defined then, we cross our finger and try to find a lemma named f_ind (or f_rec, f_rect) i*) @@ -77,7 +77,7 @@ let functional_induction with_clean c princl pat = if princ_infos.Tactics.farg_in_concl then [c] else [] in - List.map (fun c -> Tacexpr.ElimOnConstr c) (args@c_list) + List.map (fun c -> Tacexpr.ElimOnConstr (c,NoBindings)) (args@c_list) in let princ' = Some (princ,bindings) in let princ_vars = @@ -120,7 +120,8 @@ let functional_induction with_clean c princl pat = princ_infos args_as_induction_constr princ' - pat) + pat + None) subst_and_reduce g @@ -139,14 +140,14 @@ type newfixpoint_expr = let rec abstract_rawconstr c = function | [] -> c | Topconstr.LocalRawDef (x,b)::bl -> Topconstr.mkLetInC(x,b,abstract_rawconstr c bl) - | Topconstr.LocalRawAssum (idl,t)::bl -> - List.fold_right (fun x b -> Topconstr.mkLambdaC([x],t,b)) idl + | Topconstr.LocalRawAssum (idl,k,t)::bl -> + List.fold_right (fun x b -> Topconstr.mkLambdaC([x],k,t,b)) idl (abstract_rawconstr c bl) let interp_casted_constr_with_implicits sigma env impls c = (* Constrintern.interp_rawconstr_with_implicits sigma env [] impls c *) Constrintern.intern_gen false sigma env ~impls:([],impls) - ~allow_soapp:false ~ltacvars:([],[]) c + ~allow_patvar:false ~ltacvars:([],[]) c (* @@ -160,7 +161,7 @@ let build_newrecursive in let (rec_sign,rec_impls) = List.fold_left - (fun (env,impls) (recname,_,bl,arityc,_) -> + (fun (env,impls) ((_,recname),_,bl,arityc,_) -> let arityc = Command.generalize_constr_expr arityc bl in let arity = Constrintern.interp_type sigma env0 arityc in let impl = @@ -213,7 +214,7 @@ let rec is_rec names = | RRec _ -> error "RRec not handled" | RIf(_,b,_,lhs,rhs) -> (lookup names b) || (lookup names lhs) || (lookup names rhs) - | RLetIn(_,na,t,b) | RLambda(_,na,t,b) | RProd(_,na,t,b) -> + | RLetIn(_,na,t,b) | RLambda(_,na,_,t,b) | RProd(_,na,_,t,b) -> lookup names t || lookup (Nameops.name_fold Idset.remove na names) b | RLetTuple(_,nal,_,t,b) -> lookup names t || lookup @@ -224,7 +225,7 @@ let rec is_rec names = ) b | RApp(_,f,args) -> List.exists (lookup names) (f::args) - | RCases(_,_,el,brl) -> + | RCases(_,_,_,el,brl) -> List.exists (fun (e,_) -> lookup names e) el || List.exists (lookup_br names) brl and lookup_br names (_,idl,_,rt) = @@ -266,7 +267,7 @@ let derive_inversion fix_names = ) with e -> msg_warning - (str "Cannot build functional inversion principle" ++ + (str "Cannot built inversion information" ++ if do_observe () then Cerrors.explain_exn e else mt ()) with _ -> () @@ -297,7 +298,7 @@ let generate_principle on_error is_general do_built fix_rec_l recdefs interactive_proof (continue_proof : int -> Names.constant array -> Term.constr array -> int -> Tacmach.tactic) : unit = - let names = List.map (function (name,_,_,_,_) -> name) fix_rec_l in + let names = List.map (function ((_, name),_,_,_,_) -> name) fix_rec_l in let fun_bodies = List.map2 prepare_body fix_rec_l recdefs in let funs_args = List.map fst fun_bodies in let funs_types = List.map (function (_,_,_,types,_) -> types) fix_rec_l in @@ -318,7 +319,7 @@ let generate_principle on_error f_R_mut) in let fname_kn (fname,_,_,_,_) = - let f_ref = Ident (dummy_loc,fname) in + let f_ref = Ident fname in locate_with_msg (pr_reference f_ref++str ": Not an inductive type!") locate_constant @@ -351,17 +352,17 @@ let generate_principle on_error let register_struct is_rec fixpoint_exprl = match fixpoint_exprl with - | [(fname,_,bl,ret_type,body),_] when not is_rec -> + | [((_,fname),_,bl,ret_type,body),_] when not is_rec -> Command.declare_definition fname - (Decl_kinds.Global,Options.boxed_definitions (),Decl_kinds.Definition) + (Decl_kinds.Global,Flags.boxed_definitions (),Decl_kinds.Definition) bl None body (Some ret_type) (fun _ _ -> ()) | _ -> - Command.build_recursive fixpoint_exprl (Options.boxed_definitions()) + Command.build_recursive fixpoint_exprl (Flags.boxed_definitions()) let generate_correction_proof_wf f_ref tcc_lemma_ref is_mes functional_ref eq_ref rec_arg_num rec_arg_type nb_args relation @@ -402,7 +403,7 @@ let register_wf ?(is_mes=false) fname rec_impls wf_rel_expr wf_arg using_lemmas ) ) in - Topconstr.CApp (dummy_loc,(None,Topconstr.mkIdentC (id_of_string "eq")), + Topconstr.CApp (dummy_loc,(None,Topconstr.mkRefC (Qualid (dummy_loc,(qualid_of_string "Logic.eq")))), [(f_app_args,None);(body,None)]) in let eq = Command.generalize_constr_expr unbounded_eq args in @@ -434,7 +435,7 @@ let register_mes fname rec_impls wf_mes_expr wf_arg using_lemmas args ret_type b | None -> begin match args with - | [Topconstr.LocalRawAssum ([(_,Name x)],t)] -> t,x + | [Topconstr.LocalRawAssum ([(_,Name x)],k,t)] -> t,x | _ -> error "Recursive argument must be specified" end | Some wf_args -> @@ -442,7 +443,7 @@ let register_mes fname rec_impls wf_mes_expr wf_arg using_lemmas args ret_type b match List.find (function - | Topconstr.LocalRawAssum(l,t) -> + | Topconstr.LocalRawAssum(l,k,t) -> List.exists (function (_,Name id) -> id = wf_args | _ -> false) l @@ -450,7 +451,7 @@ let register_mes fname rec_impls wf_mes_expr wf_arg using_lemmas args ret_type b ) args with - | Topconstr.LocalRawAssum(_,t) -> t,wf_args + | Topconstr.LocalRawAssum(_,k,t) -> t,wf_args | _ -> assert false with Not_found -> assert false in @@ -462,7 +463,7 @@ let register_mes fname rec_impls wf_mes_expr wf_arg using_lemmas args ret_type b let fun_from_mes = let applied_mes = Topconstr.mkAppC(wf_mes_expr,[Topconstr.mkIdentC wf_arg]) in - Topconstr.mkLambdaC ([(dummy_loc,Name wf_arg)],wf_arg_type,applied_mes) + Topconstr.mkLambdaC ([(dummy_loc,Name wf_arg)],Topconstr.default_binder_kind,wf_arg_type,applied_mes) in let wf_rel_from_mes = Topconstr.mkAppC(Topconstr.mkRefC ltof,[wf_arg_type;fun_from_mes]) @@ -475,7 +476,7 @@ let do_generate_principle on_error register_built interactive_proof fixpoint_exp let recdefs,rec_impls = build_newrecursive fixpoint_exprl in let _is_struct = match fixpoint_exprl with - | [((name,Some (Wf (wf_rel,wf_x,using_lemmas)),args,types,body))] -> + | [(((_,name),Some (Wf (wf_rel,wf_x,using_lemmas)),args,types,body))] -> let pre_hook = generate_principle on_error @@ -488,7 +489,7 @@ let do_generate_principle on_error register_built interactive_proof fixpoint_exp if register_built then register_wf name rec_impls wf_rel wf_x using_lemmas args types body pre_hook; false - | [((name,Some (Mes (wf_mes,wf_x,using_lemmas)),args,types,body))] -> + | [(((_,name),Some (Mes (wf_mes,wf_x,using_lemmas)),args,types,body))] -> let pre_hook = generate_principle on_error @@ -503,20 +504,15 @@ let do_generate_principle on_error register_built interactive_proof fixpoint_exp true | _ -> let fix_names = - List.map (function (name,_,_,_,_) -> name) fixpoint_exprl + List.map (function ((_,name),_,_,_,_) -> name) fixpoint_exprl in let is_one_rec = is_rec fix_names in let old_fixpoint_exprl = List.map (function | (name,Some (Struct id),args,types,body),_ -> - let names = - List.map - snd - (Topconstr.names_of_local_assums args) - in let annot = - try Some (list_index (Name id) names - 1), Topconstr.CStructRec + try Some (dummy_loc, id), Topconstr.CStructRec with Not_found -> raise (UserError("",str "Cannot find argument " ++ Ppconstr.pr_id id)) @@ -529,7 +525,8 @@ let do_generate_principle on_error register_built interactive_proof fixpoint_exp (dummy_loc,"Function", Pp.str "the recursive argument needs to be specified in Function") else - (name,(Some 0, Topconstr.CStructRec),args,types,body), + let loc, na = List.hd names in + (name,(Some (loc, Nameops.out_name na), Topconstr.CStructRec),args,types,body), (None:Vernacexpr.decl_notation) | (_,Some (Wf _),_,_,_),_ | (_,Some (Mes _),_,_,_),_-> error @@ -539,7 +536,7 @@ let do_generate_principle on_error register_built interactive_proof fixpoint_exp in (* ok all the expressions are structural *) let fix_names = - List.map (function (name,_,_,_,_) -> name) fixpoint_exprl + List.map (function ((_,name),_,_,_,_) -> name) fixpoint_exprl in let is_rec = List.exists (is_rec fix_names) recdefs in if register_built then register_struct is_rec old_fixpoint_exprl; @@ -570,11 +567,11 @@ let rec add_args id new_args b = CArrow(loc,add_args id new_args b1, add_args id new_args b2) | CProdN(loc,nal,b1) -> CProdN(loc, - List.map (fun (nal,b2) -> (nal,add_args id new_args b2)) nal, + List.map (fun (nal,k,b2) -> (nal,k,add_args id new_args b2)) nal, add_args id new_args b1) | CLambdaN(loc,nal,b1) -> CLambdaN(loc, - List.map (fun (nal,b2) -> (nal,add_args id new_args b2)) nal, + List.map (fun (nal,k,b2) -> (nal,k,add_args id new_args b2)) nal, add_args id new_args b1) | CLetIn(loc,na,b1,b2) -> CLetIn(loc,na,add_args id new_args b1,add_args id new_args b2) @@ -588,22 +585,22 @@ let rec add_args id new_args b = | CApp(loc,(pf,b),bl) -> CApp(loc,(pf,add_args id new_args b), List.map (fun (e,o) -> add_args id new_args e,o) bl) - | CCases(loc,b_option,cel,cal) -> - CCases(loc,option_map (add_args id new_args) b_option, + | CCases(loc,sty,b_option,cel,cal) -> + CCases(loc,sty,Option.map (add_args id new_args) b_option, List.map (fun (b,(na,b_option)) -> add_args id new_args b, - (na,option_map (add_args id new_args) b_option)) cel, + (na,Option.map (add_args id new_args) b_option)) cel, List.map (fun (loc,cpl,e) -> (loc,cpl,add_args id new_args e)) cal ) | CLetTuple(loc,nal,(na,b_option),b1,b2) -> - CLetTuple(loc,nal,(na,option_map (add_args id new_args) b_option), + CLetTuple(loc,nal,(na,Option.map (add_args id new_args) b_option), add_args id new_args b1, add_args id new_args b2 ) | CIf(loc,b1,(na,b_option),b2,b3) -> CIf(loc,add_args id new_args b1, - (na,option_map (add_args id new_args) b_option), + (na,Option.map (add_args id new_args) b_option), add_args id new_args b2, add_args id new_args b3 ) @@ -644,13 +641,15 @@ let rec chop_n_arrow n t = let new_n = let rec aux (n:int) = function [] -> n - | (nal,t'')::nal_ta' -> + | (nal,k,t'')::nal_ta' -> let nal_l = List.length nal in if n >= nal_l then aux (n - nal_l) nal_ta' else - let new_t' = Topconstr.CProdN(dummy_loc,((snd (list_chop n nal)),t'')::nal_ta',t') + let new_t' = + Topconstr.CProdN(dummy_loc, + ((snd (list_chop n nal)),k,t'')::nal_ta',t') in raise (Stop new_t') in @@ -668,12 +667,12 @@ let rec get_args b t : Topconstr.local_binder list * | Topconstr.CLambdaN (loc, (nal_ta), b') -> begin let n = - (List.fold_left (fun n (nal,_) -> + (List.fold_left (fun n (nal,_,_) -> n+List.length nal) 0 nal_ta ) in let nal_tas,b'',t'' = get_args b' (chop_n_arrow n t) in - (List.map (fun (nal,ta) -> - (Topconstr.LocalRawAssum (nal,ta))) nal_ta)@nal_tas, b'',t'' + (List.map (fun (nal,k,ta) -> + (Topconstr.LocalRawAssum (nal,k,ta))) nal_ta)@nal_tas, b'',t'' end | _ -> [],b,t @@ -711,26 +710,13 @@ let make_graph (f_ref:global_reference) = let l = List.map (fun (id,(n,recexp),bl,t,b) -> - let bl' = - List.flatten - (List.map - (function - | Topconstr.LocalRawDef (na,_)-> [] - | Topconstr.LocalRawAssum (nal,_) -> nal - ) - bl - ) - in - let rec_id = - match List.nth bl' (out_some n) with - |(_,Name id) -> id | _ -> anomaly "" - in + let loc, rec_id = Option.get n in let new_args = List.flatten (List.map (function | Topconstr.LocalRawDef (na,_)-> [] - | Topconstr.LocalRawAssum (nal,_) -> + | Topconstr.LocalRawAssum (nal,_,_) -> List.map (fun (loc,n) -> CRef(Libnames.Ident(loc, Nameops.out_name n))) @@ -739,7 +725,7 @@ let make_graph (f_ref:global_reference) = nal_tas ) in - let b' = add_args id new_args b in + let b' = add_args (snd id) new_args b in (id, Some (Struct rec_id),nal_tas@bl,t,b') ) fixexprl @@ -747,13 +733,13 @@ let make_graph (f_ref:global_reference) = l | _ -> let id = id_of_label (con_label c) in - [(id,None,nal_tas,t,b)] + [((dummy_loc,id),None,nal_tas,t,b)] in do_generate_principle error_error false false expr_list; (* We register the infos *) let mp,dp,_ = repr_con c in List.iter - (fun (id,_,_,_,_) -> add_Function false (make_con mp dp (label_of_id id))) + (fun ((_,id),_,_,_,_) -> add_Function false (make_con mp dp (label_of_id id))) expr_list diff --git a/contrib/funind/indfun_common.ml b/contrib/funind/indfun_common.ml index 13b242d5..4010b49d 100644 --- a/contrib/funind/indfun_common.ml +++ b/contrib/funind/indfun_common.ml @@ -76,7 +76,7 @@ let chop_rlambda_n = then List.rev acc,rt else match rt with - | Rawterm.RLambda(_,name,t,b) -> chop_lambda_n ((name,t,false)::acc) (n-1) b + | Rawterm.RLambda(_,name,k,t,b) -> chop_lambda_n ((name,t,false)::acc) (n-1) b | Rawterm.RLetIn(_,name,v,b) -> chop_lambda_n ((name,v,true)::acc) (n-1) b | _ -> raise (Util.UserError("chop_rlambda_n", @@ -90,7 +90,7 @@ let chop_rprod_n = then List.rev acc,rt else match rt with - | Rawterm.RProd(_,name,t,b) -> chop_prod_n ((name,t)::acc) (n-1) b + | Rawterm.RProd(_,name,k,t,b) -> chop_prod_n ((name,t)::acc) (n-1) b | _ -> raise (Util.UserError("chop_rprod_n",str "chop_rprod_n: Not enough products")) in chop_prod_n [] @@ -131,7 +131,7 @@ let coq_constant s = (Coqlib.init_modules @ Coqlib.arith_modules) s;; let constant sl s = - constr_of_reference + constr_of_global (Nametab.locate (make_qualid(Names.make_dirpath (List.map id_of_string (List.rev sl))) (id_of_string s)));; @@ -153,7 +153,7 @@ open Entries open Decl_kinds open Declare let definition_message id = - Options.if_verbose message ((string_of_id id) ^ " is defined") + Flags.if_verbose message ((string_of_id id) ^ " is defined") let save with_clean id const (locality,kind) hook = @@ -237,24 +237,29 @@ let with_full_print f a = let old_implicit_args = Impargs.is_implicit_args () and old_strict_implicit_args = Impargs.is_strict_implicit_args () and old_contextual_implicit_args = Impargs.is_contextual_implicit_args () in - let old_rawprint = !Options.raw_print in - Options.raw_print := true; + let old_rawprint = !Flags.raw_print in + let old_dump = !Flags.dump in + Flags.raw_print := true; Impargs.make_implicit_args false; Impargs.make_strict_implicit_args false; Impargs.make_contextual_implicit_args false; + Impargs.make_contextual_implicit_args false; + Flags.dump := false; try let res = f a in Impargs.make_implicit_args old_implicit_args; Impargs.make_strict_implicit_args old_strict_implicit_args; Impargs.make_contextual_implicit_args old_contextual_implicit_args; - Options.raw_print := old_rawprint; + Flags.raw_print := old_rawprint; + Flags.dump := old_dump; res with | e -> Impargs.make_implicit_args old_implicit_args; Impargs.make_strict_implicit_args old_strict_implicit_args; Impargs.make_contextual_implicit_args old_contextual_implicit_args; - Options.raw_print := old_rawprint; + Flags.raw_print := old_rawprint; + Flags.dump := old_dump; raise e @@ -319,12 +324,12 @@ let subst_Function (_,subst,finfos) = in let function_constant' = do_subst_con finfos.function_constant in let graph_ind' = do_subst_ind finfos.graph_ind in - let equation_lemma' = Util.option_smartmap do_subst_con finfos.equation_lemma in - let correctness_lemma' = Util.option_smartmap do_subst_con finfos.correctness_lemma in - let completeness_lemma' = Util.option_smartmap do_subst_con finfos.completeness_lemma in - let rect_lemma' = Util.option_smartmap do_subst_con finfos.rect_lemma in - let rec_lemma' = Util.option_smartmap do_subst_con finfos.rec_lemma in - let prop_lemma' = Util.option_smartmap do_subst_con finfos.prop_lemma in + let equation_lemma' = Option.smartmap do_subst_con finfos.equation_lemma in + let correctness_lemma' = Option.smartmap do_subst_con finfos.correctness_lemma in + let completeness_lemma' = Option.smartmap do_subst_con finfos.completeness_lemma in + let rect_lemma' = Option.smartmap do_subst_con finfos.rect_lemma in + let rec_lemma' = Option.smartmap do_subst_con finfos.rec_lemma in + let prop_lemma' = Option.smartmap do_subst_con finfos.prop_lemma in if function_constant' == finfos.function_constant && graph_ind' == finfos.graph_ind && equation_lemma' == finfos.equation_lemma && @@ -354,12 +359,12 @@ let export_Function infos = Some infos let discharge_Function (_,finfos) = let function_constant' = Lib.discharge_con finfos.function_constant and graph_ind' = Lib.discharge_inductive finfos.graph_ind - and equation_lemma' = Util.option_smartmap Lib.discharge_con finfos.equation_lemma - and correctness_lemma' = Util.option_smartmap Lib.discharge_con finfos.correctness_lemma - and completeness_lemma' = Util.option_smartmap Lib.discharge_con finfos.completeness_lemma - and rect_lemma' = Util.option_smartmap Lib.discharge_con finfos.rect_lemma - and rec_lemma' = Util.option_smartmap Lib.discharge_con finfos.rec_lemma - and prop_lemma' = Util.option_smartmap Lib.discharge_con finfos.prop_lemma + and equation_lemma' = Option.smartmap Lib.discharge_con finfos.equation_lemma + and correctness_lemma' = Option.smartmap Lib.discharge_con finfos.correctness_lemma + and completeness_lemma' = Option.smartmap Lib.discharge_con finfos.completeness_lemma + and rect_lemma' = Option.smartmap Lib.discharge_con finfos.rect_lemma + and rec_lemma' = Option.smartmap Lib.discharge_con finfos.rec_lemma + and prop_lemma' = Option.smartmap Lib.discharge_con finfos.prop_lemma in if function_constant' == finfos.function_constant && graph_ind' == finfos.graph_ind && @@ -387,12 +392,12 @@ let pr_info f_info = str "function_constant := " ++ Printer.pr_lconstr (mkConst f_info.function_constant)++ fnl () ++ str "function_constant_type := " ++ (try Printer.pr_lconstr (Global.type_of_global (ConstRef f_info.function_constant)) with _ -> mt ()) ++ fnl () ++ - str "equation_lemma := " ++ (Util.option_fold_right (fun v acc -> Printer.pr_lconstr (mkConst v)) f_info.equation_lemma (mt ()) ) ++ fnl () ++ - str "completeness_lemma :=" ++ (Util.option_fold_right (fun v acc -> Printer.pr_lconstr (mkConst v)) f_info.completeness_lemma (mt ()) ) ++ fnl () ++ - str "correctness_lemma := " ++ (Util.option_fold_right (fun v acc -> Printer.pr_lconstr (mkConst v)) f_info.correctness_lemma (mt ()) ) ++ fnl () ++ - str "rect_lemma := " ++ (Util.option_fold_right (fun v acc -> Printer.pr_lconstr (mkConst v)) f_info.rect_lemma (mt ()) ) ++ fnl () ++ - str "rec_lemma := " ++ (Util.option_fold_right (fun v acc -> Printer.pr_lconstr (mkConst v)) f_info.rec_lemma (mt ()) ) ++ fnl () ++ - str "prop_lemma := " ++ (Util.option_fold_right (fun v acc -> Printer.pr_lconstr (mkConst v)) f_info.prop_lemma (mt ()) ) ++ fnl () ++ + str "equation_lemma := " ++ (Option.fold_right (fun v acc -> Printer.pr_lconstr (mkConst v)) f_info.equation_lemma (mt ()) ) ++ fnl () ++ + str "completeness_lemma :=" ++ (Option.fold_right (fun v acc -> Printer.pr_lconstr (mkConst v)) f_info.completeness_lemma (mt ()) ) ++ fnl () ++ + str "correctness_lemma := " ++ (Option.fold_right (fun v acc -> Printer.pr_lconstr (mkConst v)) f_info.correctness_lemma (mt ()) ) ++ fnl () ++ + str "rect_lemma := " ++ (Option.fold_right (fun v acc -> Printer.pr_lconstr (mkConst v)) f_info.rect_lemma (mt ()) ) ++ fnl () ++ + str "rec_lemma := " ++ (Option.fold_right (fun v acc -> Printer.pr_lconstr (mkConst v)) f_info.rec_lemma (mt ()) ) ++ fnl () ++ + str "prop_lemma := " ++ (Option.fold_right (fun v acc -> Printer.pr_lconstr (mkConst v)) f_info.prop_lemma (mt ()) ) ++ fnl () ++ str "graph_ind := " ++ Printer.pr_lconstr (mkInd f_info.graph_ind) ++ fnl () let pr_table tb = diff --git a/contrib/funind/indfun_main.ml4 b/contrib/funind/indfun_main.ml4 deleted file mode 100644 index 9cee9edc..00000000 --- a/contrib/funind/indfun_main.ml4 +++ /dev/null @@ -1,470 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* hov 1 (Ppconstr.pr_id id ++ str " := " ++ cut () ++ prc c) - | loc, Rawterm.AnonHyp n, c -> hov 1 (int n ++ str " := " ++ cut () ++ prc c) - -let pr_bindings prc prlc = function - | Rawterm.ImplicitBindings l -> - brk (1,1) ++ str "with" ++ brk (1,1) ++ - Util.prlist_with_sep spc prc l - | Rawterm.ExplicitBindings l -> - brk (1,1) ++ str "with" ++ brk (1,1) ++ - Util.prlist_with_sep spc (fun b -> str"(" ++ pr_binding prlc b ++ str")") l - | Rawterm.NoBindings -> mt () - - -let pr_with_bindings prc prlc (c,bl) = - prc c ++ hv 0 (pr_bindings prc prlc bl) - - -let pr_fun_ind_using prc prlc _ opt_c = - match opt_c with - | None -> mt () - | Some (p,b) -> spc () ++ hov 2 (str "using" ++ spc () ++ pr_with_bindings prc prlc (p,b)) - - -ARGUMENT EXTEND fun_ind_using - TYPED AS constr_with_bindings_opt - PRINTED BY pr_fun_ind_using -| [ "using" constr_with_bindings(c) ] -> [ Some c ] -| [ ] -> [ None ] -END - - -TACTIC EXTEND newfuninv - [ "functional" "inversion" quantified_hypothesis(hyp) reference_opt(fname) ] -> - [ - Invfun.invfun hyp fname - ] -END - - -let pr_intro_as_pat prc _ _ pat = - match pat with - | Some pat -> spc () ++ str "as" ++ spc () ++ pr_intro_pattern pat - | None -> mt () - - -ARGUMENT EXTEND with_names TYPED AS intro_pattern_opt PRINTED BY pr_intro_as_pat -| [ "as" simple_intropattern(ipat) ] -> [ Some ipat ] -| [] ->[ None ] -END - - - - -TACTIC EXTEND newfunind - ["functional" "induction" ne_constr_list(cl) fun_ind_using(princl) with_names(pat)] -> - [ - let pat = - match pat with - | None -> IntroAnonymous - | Some pat -> pat - in - let c = match cl with - | [] -> assert false - | [c] -> c - | c::cl -> applist(c,cl) - in - functional_induction true c princl pat ] -END -(***** debug only ***) -TACTIC EXTEND snewfunind - ["soft" "functional" "induction" ne_constr_list(cl) fun_ind_using(princl) with_names(pat)] -> - [ - let pat = - match pat with - | None -> IntroAnonymous - | Some pat -> pat - in - let c = match cl with - | [] -> assert false - | [c] -> c - | c::cl -> applist(c,cl) - in - functional_induction false c princl pat ] -END - - -let pr_constr_coma_sequence prc _ _ = Util.prlist_with_sep Util.pr_coma prc - -ARGUMENT EXTEND constr_coma_sequence' - TYPED AS constr_list - PRINTED BY pr_constr_coma_sequence -| [ constr(c) "," constr_coma_sequence'(l) ] -> [ c::l ] -| [ constr(c) ] -> [ [c] ] -END - -let pr_auto_using prc _prlc _prt = Pptactic.pr_auto_using prc - -ARGUMENT EXTEND auto_using' - TYPED AS constr_list - PRINTED BY pr_auto_using -| [ "using" constr_coma_sequence'(l) ] -> [ l ] -| [ ] -> [ [] ] -END - -VERNAC ARGUMENT EXTEND rec_annotation2 - [ "{" "struct" ident(id) "}"] -> [ Struct id ] -| [ "{" "wf" constr(r) ident_opt(id) auto_using'(l) "}" ] -> [ Wf(r,id,l) ] -| [ "{" "measure" constr(r) ident_opt(id) auto_using'(l) "}" ] -> [ Mes(r,id,l) ] -END - - -VERNAC ARGUMENT EXTEND binder2 - [ "(" ne_ident_list(idl) ":" lconstr(c) ")"] -> - [ - LocalRawAssum (List.map (fun id -> (Util.dummy_loc,Name id)) idl,c) ] -END - - -VERNAC ARGUMENT EXTEND rec_definition2 - [ ident(id) binder2_list( bl) - rec_annotation2_opt(annot) ":" lconstr( type_) - ":=" lconstr(def)] -> - [let names = List.map snd (Topconstr.names_of_local_assums bl) in - let check_one_name () = - if List.length names > 1 then - Util.user_err_loc - (Util.dummy_loc,"Function", - Pp.str "the recursive argument needs to be specified"); - in - let check_exists_args an = - try - let id = match an with - | Struct id -> id | Wf(_,Some id,_) -> id | Mes(_,Some id,_) -> id - | Wf(_,None,_) | Mes(_,None,_) -> failwith "check_exists_args" - in - (try ignore(Util.list_index (Name id) names - 1); annot - with Not_found -> Util.user_err_loc - (Util.dummy_loc,"Function", - Pp.str "No argument named " ++ Nameops.pr_id id) - ) - with Failure "check_exists_args" -> check_one_name ();annot - in - let ni = - match annot with - | None -> - annot - | Some an -> - check_exists_args an - in - (id, ni, bl, type_, def) ] - END - - -VERNAC ARGUMENT EXTEND rec_definitions2 -| [ rec_definition2(rd) ] -> [ [rd] ] -| [ rec_definition2(hd) "with" rec_definitions2(tl) ] -> [ hd::tl ] -END - - -VERNAC COMMAND EXTEND Function - ["Function" rec_definitions2(recsl)] -> - [ - do_generate_principle false recsl; - - ] -END - - -VERNAC ARGUMENT EXTEND fun_scheme_arg -| [ ident(princ_name) ":=" "Induction" "for" reference(fun_name) "Sort" sort(s) ] -> [ (princ_name,fun_name,s) ] -END - -VERNAC ARGUMENT EXTEND fun_scheme_args -| [ fun_scheme_arg(fa) ] -> [ [fa] ] -| [ fun_scheme_arg(fa) "with" fun_scheme_args(fas) ] -> [fa::fas] -END - -VERNAC COMMAND EXTEND NewFunctionalScheme - ["Functional" "Scheme" fun_scheme_args(fas) ] -> - [ - try - Functional_principles_types.build_scheme fas - with Functional_principles_types.No_graph_found -> - match fas with - | (_,fun_name,_)::_ -> - begin - begin - make_graph (Nametab.global fun_name) - end - ; - try Functional_principles_types.build_scheme fas - with Functional_principles_types.No_graph_found -> - Util.error ("Cannot generate induction principle(s)") - end - | _ -> assert false (* we can only have non empty list *) - ] -END -(***** debug only ***) - -VERNAC COMMAND EXTEND NewFunctionalCase - ["Functional" "Case" fun_scheme_arg(fas) ] -> - [ - Functional_principles_types.build_case_scheme fas - ] -END - -(***** debug only ***) -VERNAC COMMAND EXTEND GenerateGraph -["Generate" "graph" "for" reference(c)] -> [ make_graph (Nametab.global c) ] -END - - - - - -(* FINDUCTION *) - -(* comment this line to see debug msgs *) -let msg x = () ;; let pr_lconstr c = str "" - (* uncomment this to see debugging *) -let prconstr c = msg (str" " ++ Printer.pr_lconstr c ++ str"\n") -let prlistconstr lc = List.iter prconstr lc -let prstr s = msg(str s) -let prNamedConstr s c = - begin - msg(str ""); - msg(str(s^"==>\n ") ++ Printer.pr_lconstr c ++ str "\n<==\n"); - msg(str ""); - end - - - -(** Information about an occurrence of a function call (application) - inside a term. *) -type fapp_info = { - fname: constr; (** The function applied *) - largs: constr list; (** List of arguments *) - free: bool; (** [true] if all arguments are debruijn free *) - max_rel: int; (** max debruijn index in the funcall *) - onlyvars: bool (** [true] if all arguments are variables (and not debruijn) *) -} - - -(** [constr_head_match(a b c) a] returns true, false otherwise. *) -let constr_head_match u t= - if isApp u - then - let uhd,args= destApp u in - uhd=t - else false - -(** [hdMatchSub inu t] returns the list of occurrences of [t] in - [inu]. DeBruijn are not pushed, so some of them may be unbound in - the result. *) -let rec hdMatchSub inu (test: constr -> bool) : fapp_info list = - let subres = - match kind_of_term inu with - | Lambda (nm,tp,cstr) | Prod (nm,tp,cstr) -> - hdMatchSub tp test @ hdMatchSub (lift 1 cstr) test - | Fix (_,(lna,tl,bl)) -> (* not sure Fix is correct *) - Array.fold_left - (fun acc cstr -> acc @ hdMatchSub (lift (Array.length tl) cstr) test) - [] bl - | _ -> (* Cofix will be wrong *) - fold_constr - (fun l cstr -> - l @ hdMatchSub cstr test) [] inu in - if not (test inu) then subres - else - let f,args = decompose_app inu in - let freeset = Termops.free_rels inu in - let max_rel = try Util.Intset.max_elt freeset with Not_found -> -1 in - {fname = f; largs = args; free = Util.Intset.is_empty freeset; - max_rel = max_rel; onlyvars = List.for_all isVar args } - ::subres - -let mkEq typ c1 c2 = - mkApp (Coqlib.build_coq_eq(),[| typ; c1; c2|]) - - -let poseq_unsafe idunsafe cstr gl = - let typ = Tacmach.pf_type_of gl cstr in - tclTHEN - (Tactics.letin_tac true (Name idunsafe) cstr allClauses) - (tclTHENFIRST - (Tactics.assert_as true IntroAnonymous (mkEq typ (mkVar idunsafe) cstr)) - Tactics.reflexivity) - gl - - -let poseq id cstr gl = - let x = Tactics.fresh_id [] id gl in - poseq_unsafe x cstr gl - -(* dirty? *) - -let list_constr_largs = ref [] - -let rec poseq_list_ids_rec lcstr gl = - match lcstr with - | [] -> tclIDTAC gl - | c::lcstr' -> - match kind_of_term c with - | Var _ -> - (list_constr_largs:=c::!list_constr_largs ; poseq_list_ids_rec lcstr' gl) - | _ -> - let _ = prstr "c = " in - let _ = prconstr c in - let _ = prstr "\n" in - let typ = Tacmach.pf_type_of gl c in - let cname = Termops.id_of_name_using_hdchar (Global.env()) typ Anonymous in - let x = Tactics.fresh_id [] cname gl in - let _ = list_constr_largs:=mkVar x :: !list_constr_largs in - let _ = prstr " list_constr_largs = " in - let _ = prlistconstr !list_constr_largs in - let _ = prstr "\n" in - - tclTHEN - (poseq_unsafe x c) - (poseq_list_ids_rec lcstr') - gl - -let poseq_list_ids lcstr gl = - let _ = list_constr_largs := [] in - poseq_list_ids_rec lcstr gl - -(** [find_fapp test g] returns the list of [app_info] of all calls to - functions that satisfy [test] in the conclusion of goal g. Trivial - repetition (not modulo conversion) are deleted. *) -let find_fapp (test:constr -> bool) g : fapp_info list = - let pre_res = hdMatchSub (Tacmach.pf_concl g) test in - let res = - List.fold_right (fun x acc -> if List.mem x acc then acc else x::acc) pre_res [] in - (prlistconstr (List.map (fun x -> applist (x.fname,x.largs)) res); - res) - - - -(** [finduction id filter g] tries to apply functional induction on - an occurence of function [id] in the conclusion of goal [g]. If - [id]=[None] then calls to any function are selected. In any case - [heuristic] is used to select the most pertinent occurrence. *) -let finduction (oid:identifier option) (heuristic: fapp_info list -> fapp_info list) - (nexttac:Proof_type.tactic) g = - let test = match oid with - | Some id -> - let idconstr = mkConst (const_of_id id) in - (fun u -> constr_head_match u idconstr) (* select only id *) - | None -> (fun u -> isApp u) in (* select calls to any function *) - let info_list = find_fapp test g in - let ordered_info_list = heuristic info_list in - prlistconstr (List.map (fun x -> applist (x.fname,x.largs)) ordered_info_list); - if List.length ordered_info_list = 0 then Util.error "function not found in goal\n"; - let taclist: Proof_type.tactic list = - List.map - (fun info -> - (tclTHEN - (tclTHEN (poseq_list_ids info.largs) - ( - fun gl -> - (functional_induction - true (applist (info.fname, List.rev !list_constr_largs)) - None IntroAnonymous) gl)) - nexttac)) ordered_info_list in - (* we try each (f t u v) until one does not fail *) - (* TODO: try also to mix functional schemes *) - tclFIRST taclist g - - - - -(** [chose_heuristic oi x] returns the heuristic for reordering - (and/or forgetting some elts of) a list of occurrences of - function calls infos to chose first with functional induction. *) -let chose_heuristic (oi:int option) : fapp_info list -> fapp_info list = - match oi with - | Some i -> (fun l -> [ List.nth l (i-1) ]) (* occurrence was given by the user *) - | None -> - (* Default heuristic: put first occurrences where all arguments - are *bound* (meaning already introduced) variables *) - let ordering x y = - if x.free && x.onlyvars && y.free && y.onlyvars then 0 (* both pertinent *) - else if x.free && x.onlyvars then -1 - else if y.free && y.onlyvars then 1 - else 0 (* both not pertinent *) - in - List.sort ordering - - - -TACTIC EXTEND finduction - ["finduction" ident(id) natural_opt(oi)] -> - [ - match oi with - | Some(n) when n<=0 -> Util.error "numerical argument must be > 0" - | _ -> - let heuristic = chose_heuristic oi in - finduction (Some id) heuristic tclIDTAC - ] -END - - - -TACTIC EXTEND fauto - [ "fauto" tactic(tac)] -> - [ - let heuristic = chose_heuristic None in - finduction None heuristic (snd tac) - ] - | - [ "fauto" ] -> - [ - let heuristic = chose_heuristic None in - finduction None heuristic tclIDTAC - ] - -END - - -TACTIC EXTEND poseq - [ "poseq" ident(x) constr(c) ] -> - [ poseq x c ] -END - -VERNAC COMMAND EXTEND Showindinfo - [ "showindinfo" ident(x) ] -> [ Merge.showind x ] -END - -VERNAC COMMAND EXTEND MergeFunind - [ "Mergeschemes" lconstr(c) "with" lconstr(c') "using" ident(id) ] -> - [ - let c1 = Constrintern.interp_constr Evd.empty (Global.env()) c in - let c2 = Constrintern.interp_constr Evd.empty (Global.env()) c' in - let id1,args1 = - try - let hd,args = destApp c1 in - if Term.isInd hd then hd , args - else raise (Util.error "Ill-formed (fst) argument") - with Invalid_argument _ - -> Util.error ("Bad argument form for merging schemes") in - let id2,args2 = - try - let hd,args = destApp c2 in - if isInd hd then hd , args - else raise (Util.error "Ill-formed (snd) argument") - with Invalid_argument _ - -> Util.error ("Bad argument form for merging schemes") in - (* TOFO: enlever le ignore et declarer l'inductif *) - ignore(Merge.merge c1 c2 args1 args2 id) - ] -END diff --git a/contrib/funind/invfun.ml b/contrib/funind/invfun.ml index c7a3d164..63d44916 100644 --- a/contrib/funind/invfun.ml +++ b/contrib/funind/invfun.ml @@ -16,6 +16,7 @@ open Tacticals open Tactics open Indfun_common open Tacmach +open Termops open Sign open Hiddentac @@ -23,13 +24,13 @@ open Hiddentac let pr_binding prc = function - | loc, Rawterm.NamedHyp id, c -> hov 1 (Ppconstr.pr_id id ++ str " := " ++ Pp.cut () ++ prc c) - | loc, Rawterm.AnonHyp n, c -> hov 1 (int n ++ str " := " ++ Pp.cut () ++ prc c) + | loc, Rawterm.NamedHyp id, (_,c) -> hov 1 (Ppconstr.pr_id id ++ str " := " ++ Pp.cut () ++ prc c) + | loc, Rawterm.AnonHyp n, (_,c) -> hov 1 (int n ++ str " := " ++ Pp.cut () ++ prc c) let pr_bindings prc prlc = function | Rawterm.ImplicitBindings l -> brk (1,1) ++ str "with" ++ brk (1,1) ++ - Util.prlist_with_sep spc prc l + Util.prlist_with_sep spc (fun (_,c) -> prc c) l | Rawterm.ExplicitBindings l -> brk (1,1) ++ str "with" ++ brk (1,1) ++ Util.prlist_with_sep spc (fun b -> str"(" ++ pr_binding prlc b ++ str")") l @@ -59,13 +60,13 @@ let observennl strm = let do_observe_tac s tac g = - try let goal = begin try (Printer.pr_goal (sig_it g)) with _ -> assert false end in - let v = tac g in msgnl (goal ++ fnl () ++ s ++(str " ")++(str "finished")); v - with e -> - let goal = begin try (Printer.pr_goal (sig_it g)) with _ -> assert false end in - msgnl (str "observation "++ s++str " raised exception " ++ - Cerrors.explain_exn e ++ str " on goal " ++ goal ); - raise e;; + let goal = begin try (Printer.pr_goal (sig_it g)) with _ -> assert false end in + try + let v = tac g in msgnl (goal ++ fnl () ++ s ++(str " ")++(str "finished")); v + with e -> + msgnl (str "observation "++ s++str " raised exception " ++ + Cerrors.explain_exn e ++ str " on goal " ++ goal ); + raise e;; let observe_tac s tac g = @@ -314,7 +315,7 @@ let prove_fun_correct functional_induction funs_constr graphs_constr schemes lem | None -> (id::pre_args,pre_tac) | Some b -> (pre_args, - tclTHEN (h_reduce (Rawterm.Unfold([[],EvalVarRef id])) allHyps) pre_tac + tclTHEN (h_reduce (Rawterm.Unfold([Rawterm.all_occurrences_expr,EvalVarRef id])) allHyps) pre_tac ) else (pre_args,pre_tac) @@ -425,7 +426,7 @@ let prove_fun_correct functional_induction funs_constr graphs_constr schemes lem List.fold_left2 (fun (bindings,avoid) (x,_,_) p -> let id = Nameops.next_ident_away (Nameops.out_name x) avoid in - (dummy_loc,Rawterm.NamedHyp id,p)::bindings,id::avoid + (dummy_loc,Rawterm.NamedHyp id,inj_open p)::bindings,id::avoid ) ([],pf_ids_of_hyps g) princ_infos.params @@ -435,7 +436,7 @@ let prove_fun_correct functional_induction funs_constr graphs_constr schemes lem List.rev (fst (List.fold_left2 (fun (bindings,avoid) (x,_,_) p -> let id = Nameops.next_ident_away (Nameops.out_name x) avoid in - (dummy_loc,Rawterm.NamedHyp id,nf_zeta p)::bindings,id::avoid) + (dummy_loc,Rawterm.NamedHyp id,inj_open (nf_zeta p))::bindings,id::avoid) ([],avoid) princ_infos.predicates (lemmas))) @@ -461,14 +462,14 @@ let prove_fun_correct functional_induction funs_constr graphs_constr schemes lem ] g -(* [generalize_depedent_of x hyp g] +(* [generalize_dependent_of x hyp g] generalize every hypothesis which depends of [x] but [hyp] *) -let generalize_depedent_of x hyp g = +let generalize_dependent_of x hyp g = tclMAP (function | (id,None,t) when not (id = hyp) && - (Termops.occur_var (pf_env g) x t) -> h_generalize [mkVar id] + (Termops.occur_var (pf_env g) x t) -> tclTHEN (h_generalize [mkVar id]) (thin [id]) | _ -> tclIDTAC ) (pf_hyps g) @@ -490,12 +491,17 @@ and intros_with_rewrite_aux : tactic = | Prod(_,t,t') -> begin match kind_of_term t with - | App(eq,args) when (eq_constr eq eq_ind) -> - if isVar args.(1) + | App(eq,args) when (eq_constr eq eq_ind) -> + if Reductionops.is_conv (pf_env g) (project g) args.(1) args.(2) + then + let id = pf_get_new_id (id_of_string "y") g in + tclTHENSEQ [ h_intro id; thin [id]; intros_with_rewrite ] g + + else if isVar args.(1) then let id = pf_get_new_id (id_of_string "y") g in tclTHENSEQ [ h_intro id; - generalize_depedent_of (destVar args.(1)) id; + generalize_dependent_of (destVar args.(1)) id; tclTRY (Equality.rewriteLR (mkVar id)); intros_with_rewrite ] @@ -513,7 +519,7 @@ and intros_with_rewrite_aux : tactic = Tauto.tauto g | Case(_,_,v,_) -> tclTHENSEQ[ - h_case (v,Rawterm.NoBindings); + h_case false (v,Rawterm.NoBindings); intros_with_rewrite ] g | LetIn _ -> @@ -550,7 +556,7 @@ let rec reflexivity_with_destruct_cases g = match kind_of_term (snd (destApp (pf_concl g))).(2) with | Case(_,_,v,_) -> tclTHENSEQ[ - h_case (v,Rawterm.NoBindings); + h_case false (v,Rawterm.NoBindings); intros; observe_tac "reflexivity_with_destruct_cases" reflexivity_with_destruct_cases ] @@ -567,9 +573,9 @@ let rec reflexivity_with_destruct_cases g = match kind_of_term (pf_type_of g (mkVar id)) with | App(eq,[|_;t1;t2|]) when eq_constr eq eq_ind -> if Equality.discriminable (pf_env g) (project g) t1 t2 - then Equality.discr id g + then Equality.discrHyp id g else if Equality.injectable (pf_env g) (project g) t1 t2 - then tclTHENSEQ [Equality.inj [] id;thin [id];intros_with_rewrite] g + then tclTHENSEQ [Equality.injHyp id;thin [id];intros_with_rewrite] g else tclIDTAC g | _ -> tclIDTAC g ) @@ -665,8 +671,8 @@ let prove_fun_complete funcs graphs schemes lemmas_types_infos i : tactic = if infos.is_general || Rtree.is_infinite graph_def.mind_recargs then let eq_lemma = - try out_some (infos).equation_lemma - with Failure "out_some" -> anomaly "Cannot find equation lemma" + try Option.get (infos).equation_lemma + with Option.IsNone -> anomaly "Cannot find equation lemma" in tclTHENSEQ[ tclMAP h_intro ids; @@ -682,7 +688,7 @@ let prove_fun_complete funcs graphs schemes lemmas_types_infos i : tactic = h_generalize (List.map mkVar ids); thin ids ] - else unfold_in_concl [([],Names.EvalConstRef (destConst f))] + else unfold_in_concl [(all_occurrences,Names.EvalConstRef (destConst f))] in (* The proof of each branche itself *) let ind_number = ref 0 in @@ -706,7 +712,7 @@ let prove_fun_complete funcs graphs schemes lemmas_types_infos i : tactic = (* we expand the definition of the function *) observe_tac "rewrite_tac" (rewrite_tac this_ind_number this_branche_ids); (* introduce hypothesis with some rewrite *) - (intros_with_rewrite); + observe_tac "intros_with_rewrite" intros_with_rewrite; (* The proof is (almost) complete *) observe_tac "reflexivity" (reflexivity_with_destruct_cases) ] @@ -720,7 +726,7 @@ let prove_fun_complete funcs graphs schemes lemmas_types_infos i : tactic = (h_generalize [mkApp(applist(graph_principle,params),Array.map (fun c -> applist(c,params)) lemmas)]); h_intro graph_principle_id; observe_tac "" (tclTHEN_i - (observe_tac "elim" ((elim (mkVar hres,Rawterm.NoBindings) (Some (mkVar graph_principle_id,Rawterm.NoBindings))))) + (observe_tac "elim" ((elim false (mkVar hres,Rawterm.NoBindings) (Some (mkVar graph_principle_id,Rawterm.NoBindings))))) (fun i g -> observe_tac "prove_branche" (prove_branche i) g )) ] g @@ -769,7 +775,7 @@ let derive_correctness make_scheme functional_induction (funs: constant list) (g Array.of_list (List.map (fun entry -> - (entry.Entries.const_entry_body, out_some entry.Entries.const_entry_type ) + (entry.Entries.const_entry_body, Option.get entry.Entries.const_entry_type ) ) (make_scheme (array_map_to_list (fun const -> const,Rawterm.RType None) funs)) ) @@ -960,13 +966,13 @@ let invfun qhyp f = in try let finfos = find_Function_infos f in - let f_correct = mkConst(out_some finfos.correctness_lemma) + let f_correct = mkConst(Option.get finfos.correctness_lemma) and kn = fst finfos.graph_ind in Tactics.try_intros_until (fun hid -> functional_inversion kn hid (mkConst f) f_correct) qhyp with | Not_found -> error "No graph found" - | Failure "out_some" -> error "Cannot use equivalence with graph!" + | Option.IsNone -> error "Cannot use equivalence with graph!" let invfun qhyp f g = @@ -983,23 +989,23 @@ let invfun qhyp f g = try if not (isConst f1) then failwith ""; let finfos = find_Function_infos (destConst f1) in - let f_correct = mkConst(out_some finfos.correctness_lemma) + let f_correct = mkConst(Option.get finfos.correctness_lemma) and kn = fst finfos.graph_ind in functional_inversion kn hid f1 f_correct g - with | Failure "" | Failure "out_some" | Not_found -> + with | Failure "" | Option.IsNone | Not_found -> try let f2,_ = decompose_app args.(2) in if not (isConst f2) then failwith ""; let finfos = find_Function_infos (destConst f2) in - let f_correct = mkConst(out_some finfos.correctness_lemma) + let f_correct = mkConst(Option.get finfos.correctness_lemma) and kn = fst finfos.graph_ind in functional_inversion kn hid f2 f_correct g with | Failure "" -> errorlabstrm "" (str "Hypothesis" ++ Ppconstr.pr_id hid ++ str " must contain at leat one Function") - | Failure "out_some" -> + | Option.IsNone -> if do_observe () then error "Cannot use equivalence with graph for any side of the equality" diff --git a/contrib/funind/merge.ml b/contrib/funind/merge.ml index 1b796a81..ec456aae 100644 --- a/contrib/funind/merge.ml +++ b/contrib/funind/merge.ml @@ -9,13 +9,16 @@ (* Merging of induction principles. *) (*i $Id: i*) - +open Libnames +open Tactics +open Indfun_common open Util open Topconstr open Vernacexpr open Pp open Names open Term +open Termops open Declarations open Environ open Rawterm @@ -25,6 +28,8 @@ open Rawtermops (** {2 Useful operations on constr and rawconstr} *) +let rec popn i c = if i<=0 then c else pop (popn (i-1) c) + (** Substitutions in constr *) let compare_constr_nosub t1 t2 = if compare_constr (fun _ _ -> false) t1 t2 @@ -110,6 +115,19 @@ let prNamedLDecl s lc = List.iter (fun (nm,_,tp) -> prNamedConstr (string_of_name nm) tp) lc; prstr "\n"; end +let prNamedRLDecl s lc = + begin + prstr s; prstr "\n"; prstr "{§§ "; + List.iter + (fun x -> + match x with + | (nm,None,Some tp) -> prNamedRConstr (string_of_name nm) tp + | (nm,Some bdy,None) -> prNamedRConstr ("(letin) "^string_of_name nm) bdy + | _ -> assert false + ) lc; + prstr " §§}\n"; + prstr "\n"; + end let showind (id:identifier) = let cstrid = Tacinterp.constr_of_id (Global.env()) id in @@ -193,7 +211,7 @@ type linked_var = | Funres (** When merging two graphs, parameters may become regular arguments, - and thus be shifted. This type describe the result of computing + and thus be shifted. This type describes the result of computing the changes. *) type 'a shifted_params = { @@ -237,39 +255,47 @@ type 'a merged_arg = | Arg_linked of 'a | Arg_funres +(** Information about graph merging of two inductives. + All rel_decl list are IN REVERSE ORDER (ie well suited for compose) *) + type merge_infos = { - ident:identifier; (* new inductive name *) + ident:identifier; (** new inductive name *) mib1: mutual_inductive_body; oib1: one_inductive_body; mib2: mutual_inductive_body; oib2: one_inductive_body; - (* Array of links of the first inductive (should be all stable) *) + + (** Array of links of the first inductive (should be all stable) *) lnk1: int merged_arg array; - (* Array of links of the second inductive (point to the first ind param/args) *) + + (** Array of links of the second inductive (point to the first ind param/args) *) lnk2: int merged_arg array; - (* number of rec params of ind1 which remai rec param in merge *) - nrecprms1: int; - (* number of other rec params of ind1 (which become non parm) *) - notherprms1:int; - (* number of functional result params of ind2 (which become non parm) *) - nfunresprms1:int; - (* list of decl of rec parms from ind1 which remain parms *) + + (** rec params which remain rec param (ie not linked) *) recprms1: rel_declaration list; - (* List of other rec parms from ind1 *) - otherprms1: rel_declaration list; (* parms that became args *) - funresprms1: rel_declaration list; (* parms that are functional result args *) - (* number of rec params of ind2 which remain rec param in merge (and not linked) *) + recprms2: rel_declaration list; + nrecprms1: int; nrecprms2: int; - (* number of other params of ind2 (which become non rec parm) *) + + (** rec parms which became non parm (either linked to something + or because after a rec parm that became non parm) *) + otherprms1: rel_declaration list; + otherprms2: rel_declaration list; + notherprms1:int; notherprms2:int; - (* number of functional result params of ind2 (which become non parm) *) + + (** args which remain args in merge *) + args1:rel_declaration list; + args2:rel_declaration list; + nargs1:int; + nargs2:int; + + (** functional result args *) + funresprms1: rel_declaration list; + funresprms2: rel_declaration list; + nfunresprms1:int; nfunresprms2:int; - (* list of decl of rec parms from ind2 which remain parms (and not linked) *) - recprms2: rel_declaration list; - (* List of other rec parms from ind2 (which are linked or become non parm) *) - otherprms2: rel_declaration list; - funresprms2: rel_declaration list; (* parms that are functional result args *) } @@ -288,7 +314,11 @@ let pr_merginfo x = let isPrm_stable x = match x with Prm_stable _ -> true | _ -> false -let isArg_stable x = match x with Arg_stable _ -> true | _ -> false +(* ?? prm_linked?? *) +let isArg_stable x = match x with Arg_stable _ | Prm_arg _ -> true | _ -> false + +let is_stable x = + match x with Arg_stable _ | Prm_stable _ | Prm_arg _ -> true | _ -> false let isArg_funres x = match x with Arg_funres -> true | _ -> false @@ -346,6 +376,24 @@ let verify_inds mib1 mib2 = if mib2.mind_ntypes <> 1 then error "Second argument is mutual"; () +(* +(** [build_raw_params prms_decl avoid] returns a list of variables + attributed to the list of decl [prms_decl], avoiding names in + [avoid]. *) +let build_raw_params prms_decl avoid = + let dummy_constr = compose_prod (List.map (fun (x,_,z) -> x,z) prms_decl) (mkRel 1) in + let _ = prNamedConstr "DUMMY" dummy_constr in + let dummy_rawconstr = Detyping.detype false avoid [] dummy_constr in + let _ = prNamedRConstr "RAWDUMMY" dummy_rawconstr in + let res,_ = raw_decompose_prod dummy_rawconstr in + let comblist = List.combine prms_decl res in + comblist, res , (avoid @ (Idset.elements (ids_of_rawterm dummy_rawconstr))) +*) + +let ids_of_rawlist avoid rawl = + List.fold_left Idset.union avoid (List.map ids_of_rawterm rawl) + + (** {1 Merging function graphs} *) @@ -366,6 +414,7 @@ let verify_inds mib1 mib2 = ones, they become non rec (and the following too). And functinal argument have to be shifted at the end *) let shift_linked_params mib1 mib2 (lnk1:linked_var array) (lnk2:linked_var array) id = + let _ = prstr "\nYOUHOU shift\n" in let linked_targets = revlinked lnk2 in let is_param_of_mib1 x = x < mib1.mind_nparams_rec in let is_param_of_mib2 x = x < mib2.mind_nparams_rec in @@ -409,15 +458,29 @@ let shift_linked_params mib1 mib2 (lnk1:linked_var array) (lnk2:linked_var array let n_params2 = array_prfx mlnk2 (fun i x -> not (isPrm_stable x)) in let bldprms arity_ctxt mlnk = list_fold_lefti - (fun i (acc1,acc2,acc3) x -> + (fun i (acc1,acc2,acc3,acc4) x -> + prstr (pr_merginfo mlnk.(i));prstr "\n"; match mlnk.(i) with - | Prm_stable _ -> x::acc1 , acc2 , acc3 - | Prm_arg _ | Arg_stable _ -> acc1 , x::acc2 , acc3 - | Arg_funres -> acc1 , acc2 , x::acc3 - | _ -> acc1 , acc2 , acc3) (* Prm_linked and Arg_xxx = forget it *) - ([],[],[]) arity_ctxt in - let recprms1,otherprms1,funresprms1 = bldprms (List.rev oib1.mind_arity_ctxt) mlnk1 in - let recprms2,otherprms2,funresprms2 = bldprms (List.rev oib2.mind_arity_ctxt) mlnk2 in + | Prm_stable _ -> x::acc1 , acc2 , acc3, acc4 + | Prm_arg _ -> acc1 , x::acc2 , acc3, acc4 + | Arg_stable _ -> acc1 , acc2 , x::acc3, acc4 + | Arg_funres -> acc1 , acc2 , acc3, x::acc4 + | _ -> acc1 , acc2 , acc3, acc4) + ([],[],[],[]) arity_ctxt in +(* let arity_ctxt2 = + build_raw_params oib2.mind_arity_ctxt + (Idset.elements (ids_of_rawterm oib1.mind_arity_ctxt)) in*) + let recprms1,otherprms1,args1,funresprms1 = bldprms (List.rev oib1.mind_arity_ctxt) mlnk1 in + let _ = prstr "\n\n\n" in + let recprms2,otherprms2,args2,funresprms2 = bldprms (List.rev oib2.mind_arity_ctxt) mlnk2 in + let _ = prstr "\notherprms1:\n" in + let _ = + List.iter (fun (x,_,y) -> prstr (string_of_name x^" : ");prconstr y;prstr "\n") + otherprms1 in + let _ = prstr "\notherprms2:\n" in + let _ = + List.iter (fun (x,_,y) -> prstr (string_of_name x^" : ");prconstr y;prstr "\n") + otherprms2 in { ident=id; mib1=mib1; @@ -429,14 +492,18 @@ let shift_linked_params mib1 mib2 (lnk1:linked_var array) (lnk2:linked_var array nrecprms1 = n_params1; recprms1 = recprms1; otherprms1 = otherprms1; + args1 = args1; funresprms1 = funresprms1; notherprms1 = Array.length mlnk1 - n_params1; nfunresprms1 = List.length funresprms1; + nargs1 = List.length args1; nrecprms2 = n_params2; recprms2 = recprms2; otherprms2 = otherprms2; + args2 = args2; funresprms2 = funresprms2; notherprms2 = Array.length mlnk2 - n_params2; + nargs2 = List.length args2; nfunresprms2 = List.length funresprms2; } @@ -447,45 +514,61 @@ let shift_linked_params mib1 mib2 (lnk1:linked_var array) (lnk2:linked_var array exception NoMerge -(* lnk is an link array of *all* args (from 1 and 2) *) -let merge_app c1 c2 id1 id2 shift filter_shift_stable = +let rec merge_app c1 c2 id1 id2 shift filter_shift_stable = let lnk = Array.append shift.lnk1 shift.lnk2 in match c1 , c2 with | RApp(_,f1, arr1), RApp(_,f2,arr2) when isVarf id1 f1 && isVarf id2 f2 -> + let _ = prstr "\nICI1!\n";Pp.flush_all() in let args = filter_shift_stable lnk (arr1 @ arr2) in RApp (dummy_loc,RVar (dummy_loc,shift.ident) , args) | RApp(_,f1, arr1), RApp(_,f2,arr2) -> raise NoMerge - | _ -> raise NoMerge - -let merge_app_unsafe c1 c2 shift filter_shift_stable = + | RLetIn(_,nme,bdy,trm) , _ -> + let _ = prstr "\nICI2!\n";Pp.flush_all() in + let newtrm = merge_app trm c2 id1 id2 shift filter_shift_stable in + RLetIn(dummy_loc,nme,bdy,newtrm) + | _, RLetIn(_,nme,bdy,trm) -> + let _ = prstr "\nICI3!\n";Pp.flush_all() in + let newtrm = merge_app c1 trm id1 id2 shift filter_shift_stable in + RLetIn(dummy_loc,nme,bdy,newtrm) + | _ -> let _ = prstr "\nICI4!\n";Pp.flush_all() in + raise NoMerge + +let rec merge_app_unsafe c1 c2 shift filter_shift_stable = let lnk = Array.append shift.lnk1 shift.lnk2 in match c1 , c2 with | RApp(_,f1, arr1), RApp(_,f2,arr2) -> let args = filter_shift_stable lnk (arr1 @ arr2) in RApp (dummy_loc,RVar(dummy_loc,shift.ident) , args) - | _ -> raise NoMerge + (* FIXME: what if the function appears in the body of the let? *) + | RLetIn(_,nme,bdy,trm) , _ -> + let _ = prstr "\nICI2 '!\n";Pp.flush_all() in + let newtrm = merge_app_unsafe trm c2 shift filter_shift_stable in + RLetIn(dummy_loc,nme,bdy,newtrm) + | _, RLetIn(_,nme,bdy,trm) -> + let _ = prstr "\nICI3 '!\n";Pp.flush_all() in + let newtrm = merge_app_unsafe c1 trm shift filter_shift_stable in + RLetIn(dummy_loc,nme,bdy,newtrm) + | _ -> let _ = prstr "\nICI4 '!\n";Pp.flush_all() in raise NoMerge (* Heuristic when merging two lists of hypothesis: merge every rec - calls of nrach 1 with all rec calls of branch 2. *) + calls of branch 1 with all rec calls of branch 2. *) (* TODO: reecrire cette heuristique (jusqu'a merge_types) *) -let onefoud = ref false (* Ugly *) - -let rec merge_rec_hyps shift accrec (ltyp:(Names.name * Rawterm.rawconstr) list) - filter_shift_stable = +let rec merge_rec_hyps shift accrec + (ltyp:(Names.name * rawconstr option * rawconstr option) list) + filter_shift_stable : (Names.name * rawconstr option * rawconstr option) list = + let mergeonehyp t reldecl = + match reldecl with + | (nme,x,Some (RApp(_,i,args) as ind)) + -> nme,x, Some (merge_app_unsafe ind t shift filter_shift_stable) + | (nme,Some _,None) -> error "letins with recursive calls not treated yet" + | (nme,None,Some _) -> assert false + | (nme,None,None) | (nme,Some _,Some _) -> assert false in match ltyp with | [] -> [] - | (nme,(RApp(_,f, largs) as t)) :: lt when isVarf ind2name f -> - let _ = onefoud := true in - let rechyps = - List.map - (fun (nme,ind) -> - match ind with - | RApp(_,i,args) -> - nme, merge_app_unsafe ind t shift filter_shift_stable - | _ -> assert false) - accrec in + | (nme,None,Some (RApp(_,f, largs) as t)) :: lt when isVarf ind2name f -> + let rechyps = List.map (mergeonehyp t) accrec in rechyps @ merge_rec_hyps shift accrec lt filter_shift_stable | e::lt -> e :: merge_rec_hyps shift accrec lt filter_shift_stable @@ -494,50 +577,58 @@ let rec build_suppl_reccall (accrec:(name * rawconstr) list) concl2 shift = List.map (fun (nm,tp) -> (nm,merge_app_unsafe tp concl2 shift)) accrec -let find_app (nme:identifier) (ltyp: (name * rawconstr) list) = +let find_app (nme:identifier) ltyp = try ignore (List.map (fun x -> match x with - | _,(RApp(_,f,_)) when isVarf nme f -> raise (Found 0) + | _,None,Some (RApp(_,f,_)) when isVarf nme f -> raise (Found 0) | _ -> ()) ltyp); false with Found _ -> true + +let prnt_prod_or_letin nm letbdy typ = + match letbdy , typ with + | Some lbdy , None -> prNamedRConstr ("(letin) " ^ string_of_name nm) lbdy + | None , Some tp -> prNamedRConstr (string_of_name nm) tp + | _ , _ -> assert false + -let rec merge_types shift accrec1 (ltyp1:(name * rawconstr) list) - concl1 (ltyp2:(name * rawconstr) list) concl2 - : (name * rawconstr) list * rawconstr = +let rec merge_types shift accrec1 + (ltyp1:(name * rawconstr option * rawconstr option) list) + (concl1:rawconstr) (ltyp2:(name * rawconstr option * rawconstr option) list) concl2 + : (name * rawconstr option * rawconstr option) list * rawconstr = let _ = prstr "MERGE_TYPES\n" in let _ = prstr "ltyp 1 : " in - let _ = List.iter (fun (nm,tp) -> prNamedRConstr (string_of_name nm) tp) ltyp1 in + let _ = List.iter (fun (nm,lbdy,tp) -> prnt_prod_or_letin nm lbdy tp) ltyp1 in let _ = prstr "\nltyp 2 : " in - let _ = List.iter (fun (nm,tp) -> prNamedRConstr (string_of_name nm) tp) ltyp2 in + let _ = List.iter (fun (nm,lbdy,tp) -> prnt_prod_or_letin nm lbdy tp) ltyp2 in let _ = prstr "\n" in - - let res = match ltyp1 with | [] -> let isrec1 = (accrec1<>[]) in let isrec2 = find_app ind2name ltyp2 in - let _ = if isrec2 then prstr " ISREC2 TRUE" else prstr " ISREC2 FALSE" in - let _ = if isrec1 then prstr " ISREC1 TRUE\n" else prstr " ISREC1 FALSE\n" in let rechyps = if isrec1 && isrec2 - then merge_rec_hyps shift accrec1 ltyp2 filter_shift_stable + then (* merge_rec_hyps shift accrec1 ltyp2 filter_shift_stable *) + merge_rec_hyps shift [name_of_string "concl1",None,Some concl1] ltyp2 + filter_shift_stable_right + @ merge_rec_hyps shift accrec1 [name_of_string "concl2",None, Some concl2] + filter_shift_stable else if isrec1 (* if rec calls in accrec1 and not in ltyp2, add one to ltyp2 *) - then merge_rec_hyps shift accrec1 (ltyp2@[name_of_string "concl2",concl2]) - filter_shift_stable + then + merge_rec_hyps shift accrec1 + (ltyp2@[name_of_string "concl2",None,Some concl2]) filter_shift_stable else if isrec2 - then merge_rec_hyps shift [name_of_string "concl1",concl1] ltyp2 + then merge_rec_hyps shift [name_of_string "concl1",None,Some concl1] ltyp2 filter_shift_stable_right - else [] in + else ltyp2 in let _ = prstr"\nrechyps : " in - let _ = List.iter - (fun (nm,tp) -> prNamedRConstr (string_of_name nm) tp) rechyps in + let _ = List.iter(fun (nm,lbdy,tp)-> prnt_prod_or_letin nm lbdy tp) rechyps in let _ = prstr "MERGE CONCL : " in let _ = prNamedRConstr "concl1" concl1 in let _ = prstr " with " in @@ -548,15 +639,22 @@ let rec merge_types shift accrec1 (ltyp1:(name * rawconstr) list) let _ = prstr "FIN " in let _ = prNamedRConstr "concl" concl in let _ = prstr "\n" in + rechyps , concl - | (nme,t1)as e ::lt1 -> - match t1 with + | (nme,None, Some t1)as e ::lt1 -> + (match t1 with | RApp(_,f,carr) when isVarf ind1name f -> merge_types shift (e::accrec1) lt1 concl1 ltyp2 concl2 | _ -> let recres, recconcl2 = merge_types shift accrec1 lt1 concl1 ltyp2 concl2 in - ((nme,t1) :: recres) , recconcl2 + ((nme,None,Some t1) :: recres) , recconcl2) + | (nme,Some bd, None) ::lt1 -> + (* FIXME: what if ind1name appears in bd? *) + let recres, recconcl2 = + merge_types shift accrec1 lt1 concl1 ltyp2 concl2 in + ((nme,Some bd,None) :: recres) , recconcl2 + | (_,None,None)::_ | (_,Some _,Some _)::_ -> assert false in res @@ -578,9 +676,9 @@ let build_link_map_aux (allargs1:identifier array) (allargs2:identifier array) let build_link_map allargs1 allargs2 lnk = let allargs1 = - Array.of_list (List.rev (List.map (fun (x,y) -> id_of_name x) allargs1)) in + Array.of_list (List.rev (List.map (fun (x,_,_) -> id_of_name x) allargs1)) in let allargs2 = - Array.of_list (List.rev (List.map (fun (x,y) -> id_of_name x) allargs2)) in + Array.of_list (List.rev (List.map (fun (x,_,_) -> id_of_name x) allargs2)) in build_link_map_aux allargs1 allargs2 lnk @@ -598,7 +696,7 @@ let build_link_map allargs1 allargs2 lnk = forall recparams1 (recparams2 without linked params), forall ordparams1 (ordparams2 without linked params), - H1a' -> H2a' -> ... -> H2a' -> H2b' -> ... + H1a' -> H2a' -> ... -> H2a' -> H2b'(shifted) -> ... -> (newI x1 ... z1 x2 y2 ...z2 without linked params) where Hix' have been adapted, ie: @@ -621,21 +719,27 @@ let merge_one_constructor (shift:merge_infos) (typcstr1:rawconstr) shift.mib1.mind_nparams + shift.oib1.mind_nrealargs - shift.nfunresprms1 in let nargs2 = shift.mib2.mind_nparams + shift.oib2.mind_nrealargs - shift.nfunresprms2 in - let allargs1,rest1 = raw_decompose_prod_n nargs1 typcstr1 in - let allargs2,rest2 = raw_decompose_prod_n nargs2 typcstr2 in + let allargs1,rest1 = raw_decompose_prod_or_letin_n nargs1 typcstr1 in + let allargs2,rest2 = raw_decompose_prod_or_letin_n nargs2 typcstr2 in (* Build map of linked args of [typcstr2], and apply it to [typcstr2]. *) let linked_map = build_link_map allargs1 allargs2 shift.lnk2 in let rest2 = change_vars linked_map rest2 in - let hyps1,concl1 = raw_decompose_prod rest1 in - let hyps2,concl2' = raw_decompose_prod rest2 in + let hyps1,concl1 = raw_decompose_prod_or_letin rest1 in + let hyps2,concl2' = raw_decompose_prod_or_letin rest2 in let ltyp,concl2 = merge_types shift [] (List.rev hyps1) concl1 (List.rev hyps2) concl2' in - let typ = raw_compose_prod concl2 (List.rev ltyp) in + let _ = prNamedRLDecl "ltyp result:" ltyp in + let typ = raw_compose_prod_or_letin concl2 (List.rev ltyp) in let revargs1 = list_filteri (fun i _ -> isArg_stable shift.lnk1.(i)) (List.rev allargs1) in + let _ = prNamedRLDecl "ltyp allargs1" allargs1 in + let _ = prNamedRLDecl "ltyp revargs1" revargs1 in let revargs2 = list_filteri (fun i _ -> isArg_stable shift.lnk2.(i)) (List.rev allargs2) in - let typwithprms = raw_compose_prod typ (List.rev revargs2 @ List.rev revargs1) in + let _ = prNamedRLDecl "ltyp allargs2" allargs2 in + let _ = prNamedRLDecl "ltyp revargs2" revargs2 in + let typwithprms = + raw_compose_prod_or_letin typ (List.rev revargs2 @ List.rev revargs1) in typwithprms @@ -661,22 +765,16 @@ let merge_constructor_id id1 id2 shift:identifier = constructor [(name*type)]. These are translated to rawterms first, each of them having distinct var names. *) let rec merge_constructors (shift:merge_infos) (avoid:Idset.t) - (typcstr1:(identifier * types) list) - (typcstr2:(identifier * types) list) : (identifier * rawconstr) list = + (typcstr1:(identifier * rawconstr) list) + (typcstr2:(identifier * rawconstr) list) : (identifier * rawconstr) list = List.flatten (List.map - (fun (id1,typ1) -> - let typ1 = substitterm 0 (mkRel 1) (mkVar ind1name) typ1 in - let rawtyp1 = Detyping.detype false (Idset.elements avoid) [] typ1 in - let idsoftyp1:Idset.t = ids_of_rawterm rawtyp1 in + (fun (id1,rawtyp1) -> List.map - (fun (id2,typ2) -> - let typ2 = substitterm 0 (mkRel 1) (mkVar ind2name) typ2 in - (* Avoid also rawtyp1 names *) - let avoid2 = Idset.union avoid idsoftyp1 in - let rawtyp2 = Detyping.detype false (Idset.elements avoid2) [] typ2 in + (fun (id2,rawtyp2) -> let typ = merge_one_constructor shift rawtyp1 rawtyp2 in let newcstror_id = merge_constructor_id id1 id2 shift in + let _ = prstr "\n**************\n" in newcstror_id , typ) typcstr2) typcstr1) @@ -685,22 +783,33 @@ let rec merge_constructors (shift:merge_infos) (avoid:Idset.t) inductive bodies [oib1] and [oib2], linking with [lnk], params info in [shift], avoiding identifiers in [avoid]. *) let rec merge_inductive_body (shift:merge_infos) avoid (oib1:one_inductive_body) - (oib2:one_inductive_body) : (identifier * rawconstr) list = - let lcstr1 = Array.to_list oib1.mind_user_lc in - let lcstr2 = Array.to_list oib2.mind_user_lc in + (oib2:one_inductive_body) = + (* building rawconstr type of constructors *) + let mkrawcor nme avoid typ = + (* first replace rel 1 by a varname *) + let substindtyp = substitterm 0 (mkRel 1) (mkVar nme) typ in + Detyping.detype false (Idset.elements avoid) [] substindtyp in + let lcstr1: rawconstr list = + Array.to_list (Array.map (mkrawcor ind1name avoid) oib1.mind_user_lc) in + (* add to avoid all indentifiers of lcstr1 *) + let avoid2 = Idset.union avoid (ids_of_rawlist avoid lcstr1) in + let lcstr2 = + Array.to_list (Array.map (mkrawcor ind2name avoid2) oib2.mind_user_lc) in + let avoid3 = Idset.union avoid (ids_of_rawlist avoid lcstr2) in + + let params1 = + try fst (raw_decompose_prod_n shift.nrecprms1 (List.hd lcstr1)) + with _ -> [] in + let params2 = + try fst (raw_decompose_prod_n shift.nrecprms2 (List.hd lcstr2)) + with _ -> [] in + let lcstr1 = List.combine (Array.to_list oib1.mind_consnames) lcstr1 in let lcstr2 = List.combine (Array.to_list oib2.mind_consnames) lcstr2 in + cstror_suffix_init(); - merge_constructors shift avoid lcstr1 lcstr2 + params1,params2,merge_constructors shift avoid3 lcstr1 lcstr2 -(** [build_raw_params prms_decl avoid] returns a list of variables - attributed to the list of decl [prms_decl], avoiding names in - [avoid]. *) -let build_raw_params prms_decl avoid = - let dummy_constr = compose_prod prms_decl mkProp in - let dummy_rawconstr = Detyping.detype false avoid [] dummy_constr in - let res,_ = raw_decompose_prod dummy_rawconstr in - res , (avoid @ (Idset.elements (ids_of_rawterm dummy_rawconstr))) (** [merge_mutual_inductive_body lnk mib1 mib2 shift] merge mutual inductive bodies [mib1] and [mib2] linking vars with @@ -708,42 +817,35 @@ let build_raw_params prms_decl avoid = For the moment, inductives are supposed to be non mutual. *) let rec merge_mutual_inductive_body - (mib1:mutual_inductive_body) (mib2:mutual_inductive_body) - (shift:merge_infos) = + (mib1:mutual_inductive_body) (mib2:mutual_inductive_body) (shift:merge_infos) = (* Mutual not treated, we take first ind body of each. *) - let nprms1 = mib1.mind_nparams_rec in (* n# of rec uniform parms of mib1 *) - let prms1 = (* rec uniform parms of mib1 *) - List.map (fun (x,_,y) -> x,y) (fst (list_chop nprms1 mib1.mind_params_ctxt)) in - - (* useless: *) - let prms1_named,avoid' = build_raw_params prms1 [] in - let prms2_named,avoid = build_raw_params prms1 avoid' in - let avoid:Idset.t = List.fold_right Idset.add avoid Idset.empty in - (* *** *) - - merge_inductive_body shift avoid mib1.mind_packets.(0) mib2.mind_packets.(0) + merge_inductive_body shift Idset.empty mib1.mind_packets.(0) mib2.mind_packets.(0) +let rawterm_to_constr_expr x = (* build a constr_expr from a rawconstr *) + Flags.with_option Flags.raw_print (Constrextern.extern_rawtype Idset.empty) x -let merge_rec_params_and_arity params1 params2 shift (concl:constr) = - let params = shift.recprms1 @ shift.recprms2 in - let resparams, _ = +let merge_rec_params_and_arity prms1 prms2 shift (concl:constr) = + let params = prms2 @ prms1 in + let resparams = List.fold_left - (fun (acc,env) (nme,_,tp) -> - let typ = Constrextern.extern_constr false env tp in - let newenv = Environ.push_rel (nme,None,tp) env in - LocalRawAssum ([(dummy_loc,nme)] , typ) :: acc , newenv) - ([],Global.env()) - params in + (fun acc (nme,tp) -> + let _ = prstr "param :" in + let _ = prNamedRConstr (string_of_name nme) tp in + let _ = prstr " ; " in + let typ = rawterm_to_constr_expr tp in + LocalRawAssum ([(dummy_loc,nme)], Topconstr.default_binder_kind, typ) :: acc) + [] params in let concl = Constrextern.extern_constr false (Global.env()) concl in let arity,_ = List.fold_left (fun (acc,env) (nm,_,c) -> let typ = Constrextern.extern_constr false env c in let newenv = Environ.push_rel (nm,None,c) env in - CProdN (dummy_loc, [[(dummy_loc,nm)],typ] , acc) , newenv) + CProdN (dummy_loc, [[(dummy_loc,nm)],Topconstr.default_binder_kind,typ] , acc) , newenv) (concl,Global.env()) - (shift.otherprms1@shift.otherprms2@shift.funresprms1@shift.funresprms2) in + (shift.funresprms2 @ shift.funresprms1 + @ shift.args2 @ shift.args1 @ shift.otherprms2 @ shift.otherprms1) in resparams,arity @@ -752,20 +854,37 @@ let merge_rec_params_and_arity params1 params2 shift (concl:constr) = induct_expr corresponding to the the list of constructor types [rawlist], named ident. FIXME: params et cstr_expr (arity) *) -let rawterm_list_to_inductive_expr mib1 mib2 shift +let rawterm_list_to_inductive_expr prms1 prms2 mib1 mib2 shift (rawlist:(identifier * rawconstr) list):inductive_expr = - let rawterm_to_constr_expr x = (* build a constr_expr from a rawconstr *) - Options.with_option Options.raw_print (Constrextern.extern_rawtype Idset.empty) x in let lident = dummy_loc, shift.ident in let bindlist , cstr_expr = (* params , arities *) - merge_rec_params_and_arity - mib1.mind_params_ctxt mib2.mind_params_ctxt shift mkSet in + merge_rec_params_and_arity prms1 prms2 shift mkSet in let lcstor_expr : (bool * (lident * constr_expr)) list = List.map (* zeta_normalize t ? *) (fun (id,t) -> false, ((dummy_loc,id),rawterm_to_constr_expr t)) rawlist in lident , bindlist , cstr_expr , lcstor_expr + + +let mkProd_reldecl (rdecl:rel_declaration) (t2:rawconstr) = + match rdecl with + | (nme,None,t) -> + let traw = Detyping.detype false [] [] t in + RProd (dummy_loc,nme,Explicit,traw,t2) + | (_,Some _,_) -> assert false + + + + +let mkProd_reldecl (rdecl:rel_declaration) (t2:rawconstr) = + match rdecl with + | (nme,None,t) -> + let traw = Detyping.detype false [] [] t in + RProd (dummy_loc,nme,Explicit,traw,t2) + | (_,Some _,_) -> assert false + + (** [merge_inductive ind1 ind2 lnk] merges two graphs, linking variables specified in [lnk]. Graphs are not supposed to be mutual inductives for the moment. *) @@ -777,35 +896,124 @@ let merge_inductive (ind1: inductive) (ind2: inductive) let _ = verify_inds mib1 mib2 in (* raises an exception if something wrong *) (* compute params that become ordinary args (because linked to ord. args) *) let shift_prm = shift_linked_params mib1 mib2 lnk1 lnk2 id in - let rawlist = merge_mutual_inductive_body mib1 mib2 shift_prm in - let indexpr = rawterm_list_to_inductive_expr mib1 mib2 shift_prm rawlist in + let prms1,prms2, rawlist = merge_mutual_inductive_body mib1 mib2 shift_prm in + let _ = prstr "\nrawlist : " in + let _ = + List.iter (fun (nm,tp) -> prNamedRConstr (string_of_id nm) tp;prstr "\n") rawlist in + let _ = prstr "\nend rawlist\n" in +(* FIX: retransformer en constr ici + let shift_prm = + { shift_prm with + recprms1=prms1; + recprms1=prms1; + } in *) + let indexpr = rawterm_list_to_inductive_expr prms1 prms2 mib1 mib2 shift_prm rawlist in (* Declare inductive *) Command.build_mutual [(indexpr,None)] true (* means: not coinductive *) - -let merge (cstr1:constr) (cstr2:constr) (args1:constr array) (args2:constr array) id = - let env = Global.env() in - let ind1,_cstrlist1 = Inductiveops.find_inductive env Evd.empty cstr1 in - let ind2,_cstrlist2 = Inductiveops.find_inductive env Evd.empty cstr2 in - let lnk1 = (* args1 are unlinked. FIXME? mergescheme (G x x) ?? *) - Array.mapi (fun i c -> Unlinked) args1 in - let _ = lnk1.(Array.length lnk1 - 1) <- Funres in (* last arg is functional result *) - let lnk2 = (* args2 may be linked to args1 members. FIXME: same - as above: vars may be linked inside args2?? *) +(* Find infos on identifier id. *) +let find_Function_infos_safe (id:identifier): Indfun_common.function_info = + let kn_of_id x = + let f_ref = Libnames.Ident (dummy_loc,x) in + locate_with_msg (str "Don't know what to do with " ++ Libnames.pr_reference f_ref) + locate_constant f_ref in + try find_Function_infos (kn_of_id id) + with Not_found -> + errorlabstrm "indfun" (Nameops.pr_id id ++ str " has no functional scheme") + +(** [merge id1 id2 args1 args2 id] builds and declares a new inductive + type called [id], representing the merged graphs of both graphs + [ind1] and [ind2]. identifiers occuring in both arrays [args1] and + [args2] are considered linked (i.e. are the same variable) in the + new graph. + + Warning: For the moment, repetitions of an id in [args1] or + [args2] are not supported. *) +let merge (id1:identifier) (id2:identifier) (args1:identifier array) + (args2:identifier array) id : unit = + let finfo1 = find_Function_infos_safe id1 in + let finfo2 = find_Function_infos_safe id2 in + (* FIXME? args1 are supposed unlinked. mergescheme (G x x) ?? *) + (* We add one arg (functional arg of the graph) *) + let lnk1 = Array.make (Array.length args1 + 1) Unlinked in + let lnk2' = (* args2 may be linked to args1 members. FIXME: same + as above: vars may be linked inside args2?? *) Array.mapi (fun i c -> match array_find args1 (fun i x -> x=c) with | Some j -> Linked j | None -> Unlinked) args2 in - let _ = lnk2.(Array.length lnk2 - 1) <- Funres in (* last arg is functional result *) - let resa = merge_inductive ind1 ind2 lnk1 lnk2 id in - resa - - - + (* We add one arg (functional arg of the graph) *) + let lnk2 = Array.append lnk2' (Array.make 1 Unlinked) in + (* setting functional results *) + let _ = lnk1.(Array.length lnk1 - 1) <- Funres in + let _ = lnk2.(Array.length lnk2 - 1) <- Funres in + merge_inductive finfo1.graph_ind finfo2.graph_ind lnk1 lnk2 id + + +let remove_last_arg c = + let (x,y) = decompose_prod c in + let xnolast = List.rev (List.tl (List.rev x)) in + compose_prod xnolast y + +let rec remove_n_fst_list n l = if n=0 then l else remove_n_fst_list (n-1) (List.tl l) +let remove_n_last_list n l = List.rev (remove_n_fst_list n (List.rev l)) + +let remove_last_n_arg n c = + let (x,y) = decompose_prod c in + let xnolast = remove_n_last_list n x in + compose_prod xnolast y + +(* [funify_branches relinfo nfuns branch] returns the branch [branch] + of the relinfo [relinfo] modified to fit in a functional principle. + Things to do: + - remove indargs from rel applications + - replace *variables only* corresponding to function (recursive) + results by the actual function application. *) +let funify_branches relinfo nfuns branch = + let mut_induct, induct = + match relinfo.indref with + | None -> assert false + | Some (IndRef ((mutual_ind,i) as ind)) -> mutual_ind,ind + | _ -> assert false in + let is_dom c = + match kind_of_term c with + | Ind((u,_)) | Construct((u,_),_) -> u = mut_induct + | _ -> false in + let _dom_i c = + assert (is_dom c); + match kind_of_term c with + | Ind((u,i)) | Construct((u,_),i) -> i + | _ -> assert false in + let _is_pred c shift = + match kind_of_term c with + | Rel i -> let reali = i-shift in (reali>=0 && reali false in + (* FIXME: *) + (Anonymous,Some mkProp,mkProp) + +let relprinctype_to_funprinctype relprinctype nfuns = + let relinfo = compute_elim_sig relprinctype in + assert (not relinfo.farg_in_concl); + assert (relinfo.indarg_in_concl); + (* first remove indarg and indarg_in_concl *) + let relinfo_noindarg = { relinfo with + indarg_in_concl = false; indarg = None; + concl = remove_last_arg (pop relinfo.concl); } in + (* the nfuns last induction arguments are functional ones: remove them *) + let relinfo_argsok = { relinfo_noindarg with + nargs = relinfo_noindarg.nargs - nfuns; + (* args is in reverse order, so remove fst *) + args = remove_n_fst_list nfuns relinfo_noindarg.args; + concl = popn nfuns relinfo_noindarg.concl + } in + let new_branches = + List.map (funify_branches relinfo_argsok nfuns) relinfo_argsok.branches in + let relinfo_branches = { relinfo_argsok with branches = new_branches } in + relinfo_branches (* @article{ bundy93rippling, author = "Alan Bundy and Andrew Stevens and Frank van Harmelen and Andrew Ireland and Alan Smaill", diff --git a/contrib/funind/rawterm_to_relation.ml b/contrib/funind/rawterm_to_relation.ml index b34a1097..08a97fd2 100644 --- a/contrib/funind/rawterm_to_relation.ml +++ b/contrib/funind/rawterm_to_relation.ml @@ -368,7 +368,7 @@ let raw_push_named (na,raw_value,raw_typ) env = match na with | Anonymous -> env | Name id -> - let value = Util.option_map (Pretyping.Default.understand Evd.empty env) raw_value in + let value = Option.map (Pretyping.Default.understand Evd.empty env) raw_value in let typ = Pretyping.Default.understand_type Evd.empty env raw_typ in Environ.push_named (id,value,typ) env @@ -398,12 +398,12 @@ let add_pat_variables pat typ env : Environ.env = | Anonymous -> assert false | Name id -> let new_t = substl ctxt t in - let new_v = option_map (substl ctxt) v in + let new_v = Option.map (substl ctxt) v in observe (str "for variable " ++ Ppconstr.pr_id id ++ fnl () ++ str "old type := " ++ Printer.pr_lconstr t ++ fnl () ++ str "new type := " ++ Printer.pr_lconstr new_t ++ fnl () ++ - option_fold_right (fun v _ -> str "old value := " ++ Printer.pr_lconstr v ++ fnl ()) v (mt ()) ++ - option_fold_right (fun v _ -> str "new value := " ++ Printer.pr_lconstr v ++ fnl ()) new_v (mt ()) + Option.fold_right (fun v _ -> str "old value := " ++ Printer.pr_lconstr v ++ fnl ()) v (mt ()) ++ + Option.fold_right (fun v _ -> str "new value := " ++ Printer.pr_lconstr v ++ fnl ()) new_v (mt ()) ); (Environ.push_named (id,new_v,new_t) env,mkVar id::ctxt) ) @@ -446,7 +446,7 @@ let rec pattern_to_term_and_type env typ = function let patl_as_term = List.map2 (pattern_to_term_and_type env) (List.rev cs_args_types) patternl in - mkRApp(mkRRef(Libnames.ConstructRef constr), + mkRApp(mkRRef(ConstructRef constr), implicit_args@patl_as_term ) @@ -586,7 +586,7 @@ let rec build_entry_lc env funnames avoid rt : rawconstr build_entry_return = | RProd _ -> error "Cannot apply a type" end (* end of the application treatement *) - | RLambda(_,n,t,b) -> + | RLambda(_,n,_,t,b) -> (* we first compute the list of constructor corresponding to the body of the function, then the one corresponding to the type @@ -601,7 +601,7 @@ let rec build_entry_lc env funnames avoid rt : rawconstr build_entry_return = let new_env = raw_push_named (new_n,None,t) env in let b_res = build_entry_lc new_env funnames avoid b in combine_results (combine_lam new_n) t_res b_res - | RProd(_,n,t,b) -> + | RProd(_,n,_,t,b) -> (* we first compute the list of constructor corresponding to the body of the function, then the one corresponding to the type @@ -627,7 +627,7 @@ let rec build_entry_lc env funnames avoid rt : rawconstr build_entry_return = in let b_res = build_entry_lc new_env funnames avoid b in combine_results (combine_letin n) v_res b_res - | RCases(_,_,el,brl) -> + | RCases(_,_,_,el,brl) -> (* we create the discrimination function and treat the case itself *) @@ -689,7 +689,7 @@ let rec build_entry_lc env funnames avoid rt : rawconstr build_entry_return = build_entry_lc env funnames avoid b | RDynamic _ -> error "Not handled RDynamic" and build_entry_lc_from_case env funname make_discr - (el:tomatch_tuple) + (el:tomatch_tuples) (brl:Rawterm.cases_clauses) avoid : rawconstr build_entry_return = match el with @@ -865,7 +865,7 @@ let is_res id = *) let rec rebuild_cons nb_args relname args crossed_types depth rt = match rt with - | RProd(_,n,t,b) -> + | RProd(_,n,k,t,b) -> let not_free_in_t id = not (is_free_in id t) in let new_crossed_types = t::crossed_types in begin @@ -928,7 +928,7 @@ let rec rebuild_cons nb_args relname args crossed_types depth rt = (Idset.filter not_free_in_t id_to_exclude) | _ -> mkRProd(n,t,new_b),Idset.filter not_free_in_t id_to_exclude end - | RLambda(_,n,t,b) -> + | RLambda(_,n,k,t,b) -> begin let not_free_in_t id = not (is_free_in id t) in let new_crossed_types = t :: crossed_types in @@ -944,7 +944,7 @@ let rec rebuild_cons nb_args relname args crossed_types depth rt = then new_b, Idset.remove id (Idset.filter not_free_in_t id_to_exclude) else - RProd(dummy_loc,n,t,new_b),Idset.filter not_free_in_t id_to_exclude + RProd(dummy_loc,n,k,t,new_b),Idset.filter not_free_in_t id_to_exclude | _ -> anomaly "Should not have an anonymous function here" (* We have renamed all the anonymous functions during alpha_renaming phase *) @@ -1016,11 +1016,12 @@ let rec compute_cst_params relnames params = function compute_cst_params_from_app [] (params,rtl) | RApp(_,f,args) -> List.fold_left (compute_cst_params relnames) params (f::args) - | RLambda(_,_,t,b) | RProd(_,_,t,b) | RLetIn(_,_,t,b) | RLetTuple(_,_,_,t,b) -> + | RLambda(_,_,_,t,b) | RProd(_,_,_,t,b) | RLetIn(_,_,t,b) | RLetTuple(_,_,_,t,b) -> let t_params = compute_cst_params relnames params t in compute_cst_params relnames t_params b - | RCases _ -> params (* If there is still cases at this point they can only be - discriminitation ones *) + | RCases _ -> + params (* If there is still cases at this point they can only be + discriminitation ones *) | RSort _ -> params | RHole _ -> params | RIf _ | RRec _ | RCast _ | RDynamic _ -> @@ -1153,7 +1154,7 @@ let do_build_inductive else Topconstr.CProdN (dummy_loc, - [[(dummy_loc,n)],Constrextern.extern_rawconstr Idset.empty t], + [[(dummy_loc,n)],Topconstr.default_binder_kind,Constrextern.extern_rawconstr Idset.empty t], acc ) ) @@ -1173,7 +1174,7 @@ let do_build_inductive Topconstr.LocalRawDef((dummy_loc,n), Constrextern.extern_rawconstr Idset.empty t) else Topconstr.LocalRawAssum - ([(dummy_loc,n)], Constrextern.extern_rawconstr Idset.empty t) + ([(dummy_loc,n)], Topconstr.default_binder_kind, Constrextern.extern_rawconstr Idset.empty t) ) rels_params in @@ -1181,8 +1182,8 @@ let do_build_inductive Array.map (List.map (fun (id,t) -> false,((dummy_loc,id), - Options.with_option - Options.raw_print + Flags.with_option + Flags.raw_print (Constrextern.extern_rawtype Idset.empty) ((* zeta_normalize *) t) ) )) @@ -1218,7 +1219,7 @@ let do_build_inductive (* in *) let _time2 = System.get_time () in try - with_full_print (Options.silently (Command.build_mutual rel_inds)) true + with_full_print (Flags.silently (Command.build_mutual rel_inds)) true with | UserError(s,msg) as e -> let _time3 = System.get_time () in diff --git a/contrib/funind/rawtermops.ml b/contrib/funind/rawtermops.ml index 113ddd8b..92396af5 100644 --- a/contrib/funind/rawtermops.ml +++ b/contrib/funind/rawtermops.ml @@ -12,10 +12,10 @@ let idmap_is_empty m = m = Idmap.empty let mkRRef ref = RRef(dummy_loc,ref) let mkRVar id = RVar(dummy_loc,id) let mkRApp(rt,rtl) = RApp(dummy_loc,rt,rtl) -let mkRLambda(n,t,b) = RLambda(dummy_loc,n,t,b) -let mkRProd(n,t,b) = RProd(dummy_loc,n,t,b) +let mkRLambda(n,t,b) = RLambda(dummy_loc,n,Explicit,t,b) +let mkRProd(n,t,b) = RProd(dummy_loc,n,Explicit,t,b) let mkRLetIn(n,t,b) = RLetIn(dummy_loc,n,t,b) -let mkRCases(rto,l,brl) = RCases(dummy_loc,rto,l,brl) +let mkRCases(rto,l,brl) = RCases(dummy_loc,Term.RegularStyle,rto,l,brl) let mkRSort s = RSort(dummy_loc,s) let mkRHole () = RHole(dummy_loc,Evd.BinderType Anonymous) let mkRCast(b,t) = RCast(dummy_loc,b,CastConv (Term.DEFAULTcast,t)) @@ -26,27 +26,59 @@ let mkRCast(b,t) = RCast(dummy_loc,b,CastConv (Term.DEFAULTcast,t)) *) let raw_decompose_prod = let rec raw_decompose_prod args = function - | RProd(_,n,t,b) -> + | RProd(_,n,k,t,b) -> raw_decompose_prod ((n,t)::args) b | rt -> args,rt in raw_decompose_prod [] +let raw_decompose_prod_or_letin = + let rec raw_decompose_prod args = function + | RProd(_,n,k,t,b) -> + raw_decompose_prod ((n,None,Some t)::args) b + | RLetIn(_,n,t,b) -> + raw_decompose_prod ((n,Some t,None)::args) b + | rt -> args,rt + in + raw_decompose_prod [] + let raw_compose_prod = List.fold_left (fun b (n,t) -> mkRProd(n,t,b)) +let raw_compose_prod_or_letin = + List.fold_left ( + fun concl decl -> + match decl with + | (n,None,Some t) -> mkRProd(n,t,concl) + | (n,Some bdy,None) -> mkRLetIn(n,bdy,concl) + | _ -> assert false) + let raw_decompose_prod_n n = let rec raw_decompose_prod i args c = if i<=0 then args,c else match c with - | RProd(_,n,t,b) -> + | RProd(_,n,_,t,b) -> raw_decompose_prod (i-1) ((n,t)::args) b | rt -> args,rt in raw_decompose_prod n [] +let raw_decompose_prod_or_letin_n n = + let rec raw_decompose_prod i args c = + if i<=0 then args,c + else + match c with + | RProd(_,n,_,t,b) -> + raw_decompose_prod (i-1) ((n,None,Some t)::args) b + | RLetIn(_,n,t,b) -> + raw_decompose_prod (i-1) ((n,Some t,None)::args) b + | rt -> args,rt + in + raw_decompose_prod n [] + + let raw_decompose_app = let rec decompose_rapp acc rt = (* msgnl (str "raw_decompose_app on : "++ Printer.pr_rawconstr rt); *) @@ -103,15 +135,17 @@ let change_vars = change_vars mapping rt', List.map (change_vars mapping) rtl ) - | RLambda(loc,name,t,b) -> + | RLambda(loc,name,k,t,b) -> RLambda(loc, name, + k, change_vars mapping t, change_vars (remove_name_from_mapping mapping name) b ) - | RProd(loc,name,t,b) -> + | RProd(loc,name,k,t,b) -> RProd(loc, name, + k, change_vars mapping t, change_vars (remove_name_from_mapping mapping name) b ) @@ -125,12 +159,12 @@ let change_vars = let new_mapping = List.fold_left remove_name_from_mapping mapping nal in RLetTuple(loc, nal, - (na, option_map (change_vars mapping) rto), + (na, Option.map (change_vars mapping) rto), change_vars mapping b, change_vars new_mapping e ) - | RCases(loc,infos,el,brl) -> - RCases(loc, + | RCases(loc,sty,infos,el,brl) -> + RCases(loc,sty, infos, List.map (fun (e,x) -> (change_vars mapping e,x)) el, List.map (change_vars_br mapping) brl @@ -138,7 +172,7 @@ let change_vars = | RIf(loc,b,(na,e_option),lhs,rhs) -> RIf(loc, change_vars mapping b, - (na,option_map (change_vars mapping) e_option), + (na,Option.map (change_vars mapping) e_option), change_vars mapping lhs, change_vars mapping rhs ) @@ -229,21 +263,21 @@ let rec alpha_rt excluded rt = let new_rt = match rt with | RRef _ | RVar _ | REvar _ | RPatVar _ -> rt - | RLambda(loc,Anonymous,t,b) -> + | RLambda(loc,Anonymous,k,t,b) -> let new_id = Nameops.next_ident_away (id_of_string "_x") excluded in let new_excluded = new_id :: excluded in let new_t = alpha_rt new_excluded t in let new_b = alpha_rt new_excluded b in - RLambda(loc,Name new_id,new_t,new_b) - | RProd(loc,Anonymous,t,b) -> + RLambda(loc,Name new_id,k,new_t,new_b) + | RProd(loc,Anonymous,k,t,b) -> let new_t = alpha_rt excluded t in let new_b = alpha_rt excluded b in - RProd(loc,Anonymous,new_t,new_b) + RProd(loc,Anonymous,k,new_t,new_b) | RLetIn(loc,Anonymous,t,b) -> let new_t = alpha_rt excluded t in let new_b = alpha_rt excluded b in RLetIn(loc,Anonymous,new_t,new_b) - | RLambda(loc,Name id,t,b) -> + | RLambda(loc,Name id,k,t,b) -> let new_id = Nameops.next_ident_away id excluded in let t,b = if new_id = id @@ -255,8 +289,8 @@ let rec alpha_rt excluded rt = let new_excluded = new_id::excluded in let new_t = alpha_rt new_excluded t in let new_b = alpha_rt new_excluded b in - RLambda(loc,Name new_id,new_t,new_b) - | RProd(loc,Name id,t,b) -> + RLambda(loc,Name new_id,k,new_t,new_b) + | RProd(loc,Name id,k,t,b) -> let new_id = Nameops.next_ident_away id excluded in let new_excluded = new_id::excluded in let t,b = @@ -268,7 +302,7 @@ let rec alpha_rt excluded rt = in let new_t = alpha_rt new_excluded t in let new_b = alpha_rt new_excluded b in - RProd(loc,Name new_id,new_t,new_b) + RProd(loc,Name new_id,k,new_t,new_b) | RLetIn(loc,Name id,t,b) -> let new_id = Nameops.next_ident_away id excluded in let t,b = @@ -306,20 +340,20 @@ let rec alpha_rt excluded rt = if idmap_is_empty mapping then rto,t,b else let replace = change_vars mapping in - (option_map replace rto, t,replace b) + (Option.map replace rto, t,replace b) in let new_t = alpha_rt new_excluded new_t in let new_b = alpha_rt new_excluded new_b in - let new_rto = option_map (alpha_rt new_excluded) new_rto in + let new_rto = Option.map (alpha_rt new_excluded) new_rto in RLetTuple(loc,new_nal,(na,new_rto),new_t,new_b) - | RCases(loc,infos,el,brl) -> + | RCases(loc,sty,infos,el,brl) -> let new_el = List.map (function (rt,i) -> alpha_rt excluded rt, i) el in - RCases(loc,infos,new_el,List.map (alpha_br excluded) brl) + RCases(loc,sty,infos,new_el,List.map (alpha_br excluded) brl) | RIf(loc,b,(na,e_o),lhs,rhs) -> RIf(loc,alpha_rt excluded b, - (na,option_map (alpha_rt excluded) e_o), + (na,Option.map (alpha_rt excluded) e_o), alpha_rt excluded lhs, alpha_rt excluded rhs ) @@ -357,17 +391,16 @@ let is_free_in id = | REvar _ -> false | RPatVar _ -> false | RApp(_,rt,rtl) -> List.exists is_free_in (rt::rtl) - | RLambda(_,n,t,b) | RProd(_,n,t,b) | RLetIn(_,n,t,b) -> + | RLambda(_,n,_,t,b) | RProd(_,n,_,t,b) | RLetIn(_,n,t,b) -> let check_in_b = match n with | Name id' -> id_ord id' id <> 0 | _ -> true in is_free_in t || (check_in_b && is_free_in b) - | RCases(_,_,el,brl) -> + | RCases(_,_,_,el,brl) -> (List.exists (fun (e,_) -> is_free_in e) el) || List.exists is_free_in_br brl - | RLetTuple(_,nal,_,b,t) -> let check_in_nal = not (List.exists (function Name id' -> id'= id | _ -> false) nal) @@ -428,17 +461,19 @@ let replace_var_by_term x_id term = replace_var_by_pattern rt', List.map replace_var_by_pattern rtl ) - | RLambda(_,Name id,_,_) when id_ord id x_id == 0 -> rt - | RLambda(loc,name,t,b) -> + | RLambda(_,Name id,_,_,_) when id_ord id x_id == 0 -> rt + | RLambda(loc,name,k,t,b) -> RLambda(loc, name, + k, replace_var_by_pattern t, replace_var_by_pattern b ) - | RProd(_,Name id,_,_) when id_ord id x_id == 0 -> rt - | RProd(loc,name,t,b) -> + | RProd(_,Name id,_,_,_) when id_ord id x_id == 0 -> rt + | RProd(loc,name,k,t,b) -> RProd(loc, name, + k, replace_var_by_pattern t, replace_var_by_pattern b ) @@ -455,19 +490,19 @@ let replace_var_by_term x_id term = | RLetTuple(loc,nal,(na,rto),def,b) -> RLetTuple(loc, nal, - (na,option_map replace_var_by_pattern rto), + (na,Option.map replace_var_by_pattern rto), replace_var_by_pattern def, replace_var_by_pattern b ) - | RCases(loc,infos,el,brl) -> - RCases(loc, + | RCases(loc,sty,infos,el,brl) -> + RCases(loc,sty, infos, List.map (fun (e,x) -> (replace_var_by_pattern e,x)) el, List.map replace_var_by_pattern_br brl ) | RIf(loc,b,(na,e_option),lhs,rhs) -> RIf(loc, replace_var_by_pattern b, - (na,option_map replace_var_by_pattern e_option), + (na,Option.map replace_var_by_pattern e_option), replace_var_by_pattern lhs, replace_var_by_pattern rhs ) @@ -558,15 +593,15 @@ let ids_of_rawterm c = | RVar (_,id) -> id::acc | RApp (loc,g,args) -> ids_of_rawterm [] g @ List.flatten (List.map (ids_of_rawterm []) args) @ acc - | RLambda (loc,na,ty,c) -> idof na :: ids_of_rawterm [] ty @ ids_of_rawterm [] c @ acc - | RProd (loc,na,ty,c) -> idof na :: ids_of_rawterm [] ty @ ids_of_rawterm [] c @ acc + | RLambda (loc,na,k,ty,c) -> idof na :: ids_of_rawterm [] ty @ ids_of_rawterm [] c @ acc + | RProd (loc,na,k,ty,c) -> idof na :: ids_of_rawterm [] ty @ ids_of_rawterm [] c @ acc | RLetIn (loc,na,b,c) -> idof na :: ids_of_rawterm [] b @ ids_of_rawterm [] c @ acc | RCast (loc,c,CastConv(k,t)) -> ids_of_rawterm [] c @ ids_of_rawterm [] t @ acc | RCast (loc,c,CastCoerce) -> ids_of_rawterm [] c @ acc | RIf (loc,c,(na,po),b1,b2) -> ids_of_rawterm [] c @ ids_of_rawterm [] b1 @ ids_of_rawterm [] b2 @ acc | RLetTuple (_,nal,(na,po),b,c) -> List.map idof nal @ ids_of_rawterm [] b @ ids_of_rawterm [] c @ acc - | RCases (loc,rtntypopt,tml,brchl) -> + | RCases (loc,sty,rtntypopt,tml,brchl) -> List.flatten (List.map (fun (_,idl,patl,c) -> idl @ ids_of_rawterm [] c) brchl) | RRec _ -> failwith "Fix inside a constructor branch" | (RSort _ | RHole _ | RRef _ | REvar _ | RPatVar _ | RDynamic _) -> [] @@ -590,15 +625,17 @@ let zeta_normalize = zeta_normalize_term rt', List.map zeta_normalize_term rtl ) - | RLambda(loc,name,t,b) -> + | RLambda(loc,name,k,t,b) -> RLambda(loc, name, + k, zeta_normalize_term t, zeta_normalize_term b ) - | RProd(loc,name,t,b) -> + | RProd(loc,name,k,t,b) -> RProd(loc, - name, + name, + k, zeta_normalize_term t, zeta_normalize_term b ) @@ -608,19 +645,19 @@ let zeta_normalize = | RLetTuple(loc,nal,(na,rto),def,b) -> RLetTuple(loc, nal, - (na,option_map zeta_normalize_term rto), + (na,Option.map zeta_normalize_term rto), zeta_normalize_term def, zeta_normalize_term b ) - | RCases(loc,infos,el,brl) -> - RCases(loc, + | RCases(loc,sty,infos,el,brl) -> + RCases(loc,sty, infos, List.map (fun (e,x) -> (zeta_normalize_term e,x)) el, List.map zeta_normalize_br brl ) | RIf(loc,b,(na,e_option),lhs,rhs) -> RIf(loc, zeta_normalize_term b, - (na,option_map zeta_normalize_term e_option), + (na,Option.map zeta_normalize_term e_option), zeta_normalize_term lhs, zeta_normalize_term rhs ) @@ -659,24 +696,23 @@ let expand_as = with Not_found -> rt end | RApp(loc,f,args) -> RApp(loc,expand_as map f,List.map (expand_as map) args) - | RLambda(loc,na,t,b) -> RLambda(loc,na,expand_as map t, expand_as map b) - | RProd(loc,na,t,b) -> RProd(loc,na,expand_as map t, expand_as map b) + | RLambda(loc,na,k,t,b) -> RLambda(loc,na,k,expand_as map t, expand_as map b) + | RProd(loc,na,k,t,b) -> RProd(loc,na,k,expand_as map t, expand_as map b) | RLetIn(loc,na,v,b) -> RLetIn(loc,na, expand_as map v,expand_as map b) | RLetTuple(loc,nal,(na,po),v,b) -> - RLetTuple(loc,nal,(na,option_map (expand_as map) po), + RLetTuple(loc,nal,(na,Option.map (expand_as map) po), expand_as map v, expand_as map b) | RIf(loc,e,(na,po),br1,br2) -> - RIf(loc,expand_as map e,(na,option_map (expand_as map) po), + RIf(loc,expand_as map e,(na,Option.map (expand_as map) po), expand_as map br1, expand_as map br2) | RRec _ -> error "Not handled RRec" | RDynamic _ -> error "Not handled RDynamic" | RCast(loc,b,CastConv(kind,t)) -> RCast(loc,expand_as map b,CastConv(kind,expand_as map t)) | RCast(loc,b,CastCoerce) -> RCast(loc,expand_as map b,CastCoerce) - | RCases(loc,po,el,brl) -> - RCases(loc, option_map (expand_as map) po, List.map (fun (rt,t) -> expand_as map rt,t) el, + | RCases(loc,sty,po,el,brl) -> + RCases(loc, sty, Option.map (expand_as map) po, List.map (fun (rt,t) -> expand_as map rt,t) el, List.map (expand_as_br map) brl) - and expand_as_br map (loc,idl,cpl,rt) = - (loc,idl,cpl, expand_as (List.fold_left add_as map cpl) rt) + (loc,idl,cpl, expand_as (List.fold_left add_as map cpl) rt) in expand_as Idmap.empty diff --git a/contrib/funind/rawtermops.mli b/contrib/funind/rawtermops.mli index 9647640c..358c6ba6 100644 --- a/contrib/funind/rawtermops.mli +++ b/contrib/funind/rawtermops.mli @@ -22,7 +22,7 @@ val mkRApp : rawconstr*(rawconstr list) -> rawconstr val mkRLambda : Names.name*rawconstr*rawconstr -> rawconstr val mkRProd : Names.name*rawconstr*rawconstr -> rawconstr val mkRLetIn : Names.name*rawconstr*rawconstr -> rawconstr -val mkRCases : rawconstr option * tomatch_tuple * cases_clauses -> rawconstr +val mkRCases : rawconstr option * tomatch_tuples * cases_clauses -> rawconstr val mkRSort : rawsort -> rawconstr val mkRHole : unit -> rawconstr (* we only build Evd.BinderType Anonymous holes *) val mkRCast : rawconstr* rawconstr -> rawconstr @@ -31,8 +31,14 @@ val mkRCast : rawconstr* rawconstr -> rawconstr These are analogous to the ones constrs *) val raw_decompose_prod : rawconstr -> (Names.name*rawconstr) list * rawconstr +val raw_decompose_prod_or_letin : + rawconstr -> (Names.name*rawconstr option*rawconstr option) list * rawconstr val raw_decompose_prod_n : int -> rawconstr -> (Names.name*rawconstr) list * rawconstr +val raw_decompose_prod_or_letin_n : int -> rawconstr -> + (Names.name*rawconstr option*rawconstr option) list * rawconstr val raw_compose_prod : rawconstr -> (Names.name*rawconstr) list -> rawconstr +val raw_compose_prod_or_letin: rawconstr -> + (Names.name*rawconstr option*rawconstr option) list -> rawconstr val raw_decompose_app : rawconstr -> rawconstr*(rawconstr list) diff --git a/contrib/funind/recdef.ml b/contrib/funind/recdef.ml new file mode 100644 index 00000000..c9bf2f1f --- /dev/null +++ b/contrib/funind/recdef.ml @@ -0,0 +1,1430 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* next_global_ident_away false id (acc@ids)::acc) + idl + [] + +let pf_get_new_id id g = + List.hd (pf_get_new_ids [id] g) + +let h_intros l = + tclMAP h_intro l + +let do_observe_tac s tac g = + let goal = begin (Printer.pr_goal (sig_it g)) end in + try let v = tac g in msgnl (goal ++ fnl () ++ (str "recdef ") ++ + (str s)++(str " ")++(str "finished")); v + with e -> + msgnl (str "observation "++str s++str " raised exception " ++ + Cerrors.explain_exn e ++ str " on goal " ++ goal ); + raise e;; + + +let observe_tac s tac g = + if Tacinterp.get_debug () <> Tactic_debug.DebugOff + then do_observe_tac s tac g + else tac g + +let hyp_ids = List.map id_of_string + ["x";"v";"k";"def";"p";"h";"n";"h'"; "anonymous"; "teq"; "rec_res"; + "hspec";"heq"; "hrec"; "hex"; "teq"; "pmax";"hle"];; + +let rec nthtl = function + l, 0 -> l | _::tl, n -> nthtl (tl, n-1) | [], _ -> [];; + +let hyp_id n l = List.nth l n;; + +let (x_id:identifier) = hyp_id 0 hyp_ids;; +let (v_id:identifier) = hyp_id 1 hyp_ids;; +let (k_id:identifier) = hyp_id 2 hyp_ids;; +let (def_id:identifier) = hyp_id 3 hyp_ids;; +let (p_id:identifier) = hyp_id 4 hyp_ids;; +let (h_id:identifier) = hyp_id 5 hyp_ids;; +let (n_id:identifier) = hyp_id 6 hyp_ids;; +let (h'_id:identifier) = hyp_id 7 hyp_ids;; +let (ano_id:identifier) = hyp_id 8 hyp_ids;; +let (rec_res_id:identifier) = hyp_id 10 hyp_ids;; +let (hspec_id:identifier) = hyp_id 11 hyp_ids;; +let (heq_id:identifier) = hyp_id 12 hyp_ids;; +let (hrec_id:identifier) = hyp_id 13 hyp_ids;; +let (hex_id:identifier) = hyp_id 14 hyp_ids;; +let (teq_id:identifier) = hyp_id 15 hyp_ids;; +let (pmax_id:identifier) = hyp_id 16 hyp_ids;; +let (hle_id:identifier) = hyp_id 17 hyp_ids;; + +let message s = if Flags.is_verbose () then msgnl(str s);; + +let def_of_const t = + match (kind_of_term t) with + Const sp -> + (try (match (Global.lookup_constant sp) with + {const_body=Some c} -> Declarations.force c + |_ -> assert false) + with _ -> + anomaly ("Cannot find definition of constant "^ + (string_of_id (id_of_label (con_label sp)))) + ) + |_ -> assert false + +let type_of_const t = + match (kind_of_term t) with + Const sp -> Typeops.type_of_constant (Global.env()) sp + |_ -> assert false + +let arg_type t = + match kind_of_term (def_of_const t) with + Lambda(a,b,c) -> b + | _ -> assert false;; + +let evaluable_of_global_reference r = + match r with + ConstRef sp -> EvalConstRef sp + | VarRef id -> EvalVarRef id + | _ -> assert false;; + + +let rank_for_arg_list h = + let predicate a b = + try List.for_all2 eq_constr a b with + Invalid_argument _ -> false in + let rec rank_aux i = function + | [] -> None + | x::tl -> if predicate h x then Some i else rank_aux (i+1) tl in + rank_aux 0;; + +let rec (find_call_occs : int -> constr -> constr -> + (constr list -> constr) * constr list list) = + fun nb_lam f expr -> + match (kind_of_term expr) with + App (g, args) when g = f -> + (fun l -> List.hd l), [Array.to_list args] + | App (g, args) -> + let (largs: constr list) = Array.to_list args in + let rec find_aux = function + [] -> (fun x -> []), [] + | a::upper_tl -> + (match find_aux upper_tl with + (cf, ((arg1::args) as args_for_upper_tl)) -> + (match find_call_occs nb_lam f a with + cf2, (_ :: _ as other_args) -> + let rec avoid_duplicates args = + match args with + | [] -> (fun _ -> []), [] + | h::tl -> + let recomb_tl, args_for_tl = + avoid_duplicates tl in + match rank_for_arg_list h args_for_upper_tl with + | None -> + (fun l -> List.hd l::recomb_tl(List.tl l)), + h::args_for_tl + | Some i -> + (fun l -> List.nth l (i+List.length args_for_tl):: + recomb_tl l), + args_for_tl + in + let recombine, other_args' = + avoid_duplicates other_args in + let len1 = List.length other_args' in + (fun l -> cf2 (recombine l)::cf(nthtl(l,len1))), + other_args'@args_for_upper_tl + | _, [] -> (fun x -> a::cf x), args_for_upper_tl) + | _, [] -> + (match find_call_occs nb_lam f a with + cf, (arg1::args) -> (fun l -> cf l::upper_tl), (arg1::args) + | _, [] -> (fun x -> a::upper_tl), [])) in + begin + match (find_aux largs) with + cf, [] -> (fun l -> mkApp(g, args)), [] + | cf, args -> + (fun l -> mkApp (g, Array.of_list (cf l))), args + end + | Rel(v) -> if v > nb_lam then error "find_call_occs : Rel" else ((fun l -> expr),[]) + | Var(id) -> (fun l -> expr), [] + | Meta(_) -> error "find_call_occs : Meta" + | Evar(_) -> error "find_call_occs : Evar" + | Sort(_) -> (fun l -> expr), [] + | Cast(b,_,_) -> find_call_occs nb_lam f b + | Prod(_,_,_) -> error "find_call_occs : Prod" + | Lambda(na,t,b) -> + begin + match find_call_occs (succ nb_lam) f b with + | _, [] -> (* Lambda are authorized as long as they do not contain + recursives calls *) + (fun l -> expr),[] + | _ -> error "find_call_occs : Lambda" + end + | LetIn(na,v,t,b) -> + begin + match find_call_occs nb_lam f v, find_call_occs (succ nb_lam) f b with + | (_,[]),(_,[]) -> + ((fun l -> expr), []) + | (_,[]),(cf,(_::_ as l)) -> + ((fun l -> mkLetIn(na,v,t,cf l)),l) + | (cf,(_::_ as l)),(_,[]) -> + ((fun l -> mkLetIn(na,cf l,t,b)), l) + | _ -> error "find_call_occs : LetIn" + end + | Const(_) -> (fun l -> expr), [] + | Ind(_) -> (fun l -> expr), [] + | Construct (_, _) -> (fun l -> expr), [] + | Case(i,t,a,r) -> + (match find_call_occs nb_lam f a with + cf, (arg1::args) -> (fun l -> mkCase(i, t, (cf l), r)),(arg1::args) + | _ -> (fun l -> expr),[]) + | Fix(_) -> error "find_call_occs : Fix" + | CoFix(_) -> error "find_call_occs : CoFix";; + +let coq_constant s = + Coqlib.gen_constant_in_modules "RecursiveDefinition" + (Coqlib.init_modules @ Coqlib.arith_modules) s;; + +let constant sl s = + constr_of_global + (locate (make_qualid(Names.make_dirpath + (List.map id_of_string (List.rev sl))) + (id_of_string s)));; + +let find_reference sl s = + (locate (make_qualid(Names.make_dirpath + (List.map id_of_string (List.rev sl))) + (id_of_string s)));; + +let delayed_force f = f () + +let le_lt_SS = function () -> (constant ["Recdef"] "le_lt_SS") +let le_lt_n_Sm = function () -> (coq_constant "le_lt_n_Sm") + +let le_trans = function () -> (coq_constant "le_trans") +let le_lt_trans = function () -> (coq_constant "le_lt_trans") +let lt_S_n = function () -> (coq_constant "lt_S_n") +let le_n = function () -> (coq_constant "le_n") +let refl_equal = function () -> (coq_constant "refl_equal") +let eq = function () -> (coq_constant "eq") +let ex = function () -> (coq_constant "ex") +let coq_sig_ref = function () -> (find_reference ["Coq";"Init";"Specif"] "sig") +let coq_sig = function () -> (coq_constant "sig") +let coq_O = function () -> (coq_constant "O") +let coq_S = function () -> (coq_constant "S") + +let gt_antirefl = function () -> (coq_constant "gt_irrefl") +let lt_n_O = function () -> (coq_constant "lt_n_O") +let lt_n_Sn = function () -> (coq_constant "lt_n_Sn") + +let f_equal = function () -> (coq_constant "f_equal") +let well_founded_induction = function () -> (coq_constant "well_founded_induction") +let well_founded = function () -> (coq_constant "well_founded") +let acc_rel = function () -> (coq_constant "Acc") +let acc_inv_id = function () -> (coq_constant "Acc_inv") +let well_founded_ltof = function () -> (Coqlib.coq_constant "" ["Arith";"Wf_nat"] "well_founded_ltof") +let iter_ref = function () -> (try find_reference ["Recdef"] "iter" with Not_found -> error "module Recdef not loaded") +let max_ref = function () -> (find_reference ["Recdef"] "max") +let iter = function () -> (constr_of_global (delayed_force iter_ref)) +let max_constr = function () -> (constr_of_global (delayed_force max_ref)) + +let ltof_ref = function () -> (find_reference ["Coq";"Arith";"Wf_nat"] "ltof") +let coq_conj = function () -> find_reference ["Coq";"Init";"Logic"] "conj" + +(* These are specific to experiments in nat with lt as well_founded_relation, *) +(* but this should be made more general. *) +let nat = function () -> (coq_constant "nat") +let lt = function () -> (coq_constant "lt") + +(* This is simply an implementation of the case_eq tactic. this code + should be replaced with the tactic defined in Ltac in Init/Tactics.v *) +let mkCaseEq a : tactic = + (fun g -> + let type_of_a = pf_type_of g a in + tclTHENLIST + [h_generalize [mkApp(delayed_force refl_equal, [| type_of_a; a|])]; + (fun g2 -> + change_in_concl None + (pattern_occs [((false,[1]), a)] (pf_env g2) Evd.empty (pf_concl g2)) + g2); + simplest_case a] g);; + +(* This is like the previous one except that it also rewrite on all + hypotheses except the ones given in the first argument. All the + modified hypotheses are generalized in the process and should be + introduced back later; the result is the pair of the tactic and the + list of hypotheses that have been generalized and cleared. *) +let mkDestructEq : + identifier list -> constr -> goal sigma -> tactic * identifier list = + fun not_on_hyp expr g -> + let hyps = pf_hyps g in + let to_revert = + Util.map_succeed + (fun (id,_,t) -> + if List.mem id not_on_hyp || not (Termops.occur_term expr t) + then failwith "is_expr_context"; + id) hyps in + let to_revert_constr = List.rev_map mkVar to_revert in + let type_of_expr = pf_type_of g expr in + let new_hyps = mkApp(delayed_force refl_equal, [|type_of_expr; expr|]):: + to_revert_constr in + tclTHENLIST + [h_generalize new_hyps; + (fun g2 -> + change_in_concl None + (pattern_occs [((false,[1]), expr)] (pf_env g2) Evd.empty (pf_concl g2)) g2); + simplest_case expr], to_revert + +let rec mk_intros_and_continue thin_intros (extra_eqn:bool) + cont_function (eqs:constr list) nb_lam (expr:constr) g = + let finalize () = if extra_eqn then + let teq = pf_get_new_id teq_id g in + tclTHENLIST + [ h_intro teq; + thin thin_intros; + h_intros thin_intros; + + tclMAP + (fun eq -> tclTRY (Equality.general_rewrite_in true all_occurrences teq eq false)) + (List.rev eqs); + (fun g1 -> + let ty_teq = pf_type_of g1 (mkVar teq) in + let teq_lhs,teq_rhs = + let _,args = try destApp ty_teq with _ -> Pp.msgnl (Printer.pr_goal (sig_it g1) ++ fnl () ++ pr_id teq ++ str ":" ++ Printer.pr_lconstr ty_teq); assert false in + args.(1),args.(2) + in + cont_function (mkVar teq::eqs) (replace_term teq_lhs teq_rhs expr) g1 + ) + ] + g + else + tclTHENSEQ[ + thin thin_intros; + h_intros thin_intros; + cont_function eqs expr + ] g + in + if nb_lam = 0 + then finalize () + else + match kind_of_term expr with + | Lambda (n, _, b) -> + let n1 = + match n with + Name x -> x + | Anonymous -> ano_id + in + let new_n = pf_get_new_id n1 g in + tclTHEN (h_intro new_n) + (mk_intros_and_continue thin_intros extra_eqn cont_function eqs + (pred nb_lam) (subst1 (mkVar new_n) b)) g + | _ -> + assert false +(* finalize () *) +let const_of_ref = function + ConstRef kn -> kn + | _ -> anomaly "ConstRef expected" + +let simpl_iter clause = + reduce + (Lazy + {rBeta=true;rIota=true;rZeta= true; rDelta=false; + rConst = [ EvalConstRef (const_of_ref (delayed_force iter_ref))]}) +(* (Simpl (Some ([],mkConst (const_of_ref (delayed_force iter_ref))))) *) + clause + +(* The boolean value is_mes expresses that the termination is expressed + using a measure function instead of a well-founded relation. *) +let tclUSER tac is_mes l g = + let clear_tac = + match l with + | None -> h_clear true [] + | Some l -> tclMAP (fun id -> tclTRY (h_clear false [id])) (List.rev l) + in + tclTHENSEQ + [ + clear_tac; + if is_mes + then tclTHEN + (unfold_in_concl [(all_occurrences, evaluable_of_global_reference + (delayed_force ltof_ref))]) + tac + else tac + ] + g + + +let list_rewrite (rev:bool) (eqs: constr list) = + tclREPEAT + (List.fold_right + (fun eq i -> tclORELSE (rewriteLR eq) i) + (if rev then (List.rev eqs) else eqs) (tclFAIL 0 (mt())));; + +let base_leaf_terminate (func:global_reference) eqs expr = +(* let _ = msgnl (str "entering base_leaf") in *) + (fun g -> + let k',h = + match pf_get_new_ids [k_id;h_id] g with + [k';h] -> k',h + | _ -> assert false + in + tclTHENLIST + [observe_tac "first split" (split (ImplicitBindings [expr])); + observe_tac "second split" + (split (ImplicitBindings [delayed_force coq_O])); + observe_tac "intro k" (h_intro k'); + observe_tac "case on k" + (tclTHENS (simplest_case (mkVar k')) + [(tclTHEN (h_intro h) + (tclTHEN (simplest_elim (mkApp (delayed_force gt_antirefl, + [| delayed_force coq_O |]))) + default_auto)); tclIDTAC ]); + intros; + simpl_iter onConcl; + unfold_constr func; + list_rewrite true eqs; + default_auto] g);; + +(* La fonction est donnee en premier argument a la + fonctionnelle suivie d'autres Lambdas et de Case ... + Pour recuperer la fonction f a partir de la + fonctionnelle *) + +let get_f foncl = + match (kind_of_term (def_of_const foncl)) with + Lambda (Name f, _, _) -> f + |_ -> error "la fonctionnelle est mal definie";; + + +let rec compute_le_proofs = function + [] -> assumption + | a::tl -> + tclORELSE assumption + (tclTHENS + (fun g -> + let le_trans = delayed_force le_trans in + let t_le_trans = compute_renamed_type g le_trans in + let m_id = + let _,_,t = destProd t_le_trans in + let na,_,_ = destProd t in + Nameops.out_name na + in + apply_with_bindings + (le_trans, + ExplicitBindings[dummy_loc,NamedHyp m_id,a]) + g) + [compute_le_proofs tl; + tclORELSE (apply (delayed_force le_n)) assumption]) + +let make_lt_proof pmax le_proof = + tclTHENS + (fun g -> + let le_lt_trans = delayed_force le_lt_trans in + let t_le_lt_trans = compute_renamed_type g le_lt_trans in + let m_id = + let _,_,t = destProd t_le_lt_trans in + let na,_,_ = destProd t in + Nameops.out_name na + in + apply_with_bindings + (le_lt_trans, + ExplicitBindings[dummy_loc,NamedHyp m_id, pmax]) g) + [observe_tac "compute_le_proofs" (compute_le_proofs le_proof); + tclTHENLIST[observe_tac "lt_S_n" (apply (delayed_force lt_S_n)); default_full_auto]];; + +let rec list_cond_rewrite k def pmax cond_eqs le_proofs = + match cond_eqs with + [] -> tclIDTAC + | eq::eqs -> + (fun g -> + let t_eq = compute_renamed_type g (mkVar eq) in + let k_id,def_id = + let k_na,_,t = destProd t_eq in + let _,_,t = destProd t in + let def_na,_,_ = destProd t in + Nameops.out_name k_na,Nameops.out_name def_na + in + tclTHENS + (general_rewrite_bindings false all_occurrences + (mkVar eq, + ExplicitBindings[dummy_loc, NamedHyp k_id, mkVar k; + dummy_loc, NamedHyp def_id, mkVar def]) false) + [list_cond_rewrite k def pmax eqs le_proofs; + observe_tac "make_lt_proof" (make_lt_proof pmax le_proofs)] g + ) + +let rec introduce_all_equalities func eqs values specs bound le_proofs + cond_eqs = + match specs with + [] -> + fun g -> + let ids = pf_ids_of_hyps g in + let s_max = mkApp(delayed_force coq_S, [|bound|]) in + let k = next_global_ident_away true k_id ids in + let ids = k::ids in + let h' = next_global_ident_away true (h'_id) ids in + let ids = h'::ids in + let def = next_global_ident_away true def_id ids in + tclTHENLIST + [observe_tac "introduce_all_equalities_final split" (split (ImplicitBindings [s_max])); + observe_tac "introduce_all_equalities_final intro k" (h_intro k); + tclTHENS + (observe_tac "introduce_all_equalities_final case k" (simplest_case (mkVar k))) + [ + tclTHENLIST[h_intro h'; + simplest_elim(mkApp(delayed_force lt_n_O,[|s_max|])); + default_full_auto]; + tclIDTAC + ]; + observe_tac "clearing k " (clear [k]); + observe_tac "intros k h' def" (h_intros [k;h';def]); + observe_tac "simple_iter" (simpl_iter onConcl); + observe_tac "unfold functional" + (unfold_in_concl[((true,[1]),evaluable_of_global_reference func)]); + observe_tac "rewriting equations" + (list_rewrite true eqs); + observe_tac ("cond rewrite "^(string_of_id k)) (list_cond_rewrite k def bound cond_eqs le_proofs); + observe_tac "refl equal" (apply (delayed_force refl_equal))] g + | spec1::specs -> + fun g -> + let ids = ids_of_named_context (pf_hyps g) in + let p = next_global_ident_away true p_id ids in + let ids = p::ids in + let pmax = next_global_ident_away true pmax_id ids in + let ids = pmax::ids in + let hle1 = next_global_ident_away true hle_id ids in + let ids = hle1::ids in + let hle2 = next_global_ident_away true hle_id ids in + let ids = hle2::ids in + let heq = next_global_ident_away true heq_id ids in + tclTHENLIST + [simplest_elim (mkVar spec1); + list_rewrite true eqs; + h_intros [p; heq]; + simplest_elim (mkApp(delayed_force max_constr, [| bound; mkVar p|])); + h_intros [pmax; hle1; hle2]; + introduce_all_equalities func eqs values specs + (mkVar pmax) ((mkVar pmax)::le_proofs) + (heq::cond_eqs)] g;; + +let string_match s = + if String.length s < 3 then failwith "string_match"; + try + for i = 0 to 3 do + if String.get s i <> String.get "Acc_" i then failwith "string_match" + done; + with Invalid_argument _ -> failwith "string_match" + +let retrieve_acc_var g = + (* Julien: I don't like this version .... *) + let hyps = pf_ids_of_hyps g in + map_succeed + (fun id -> string_match (string_of_id id);id) + hyps + +let rec introduce_all_values concl_tac is_mes acc_inv func context_fn + eqs hrec args values specs = + (match args with + [] -> + tclTHENLIST + [observe_tac "split" (split(ImplicitBindings + [context_fn (List.map mkVar (List.rev values))])); + observe_tac "introduce_all_equalities" (introduce_all_equalities func eqs + (List.rev values) (List.rev specs) (delayed_force coq_O) [] [])] + | arg::args -> + (fun g -> + let ids = ids_of_named_context (pf_hyps g) in + let rec_res = next_global_ident_away true rec_res_id ids in + let ids = rec_res::ids in + let hspec = next_global_ident_away true hspec_id ids in + let tac = + observe_tac "introduce_all_values" ( + introduce_all_values concl_tac is_mes acc_inv func context_fn eqs + hrec args + (rec_res::values)(hspec::specs)) in + (tclTHENS + (observe_tac "elim h_rec" + (simplest_elim (mkApp(mkVar hrec, Array.of_list arg))) + ) + [tclTHENLIST [h_intros [rec_res; hspec]; + tac]; + (tclTHENS + (observe_tac "acc_inv" (apply (Lazy.force acc_inv))) + [(* tclTHEN (tclTRY(list_rewrite true eqs)) *) + (observe_tac "h_assumption" h_assumption) + ; + tclTHENLIST + [ + tclTRY(list_rewrite true eqs); + observe_tac "user proof" + (fun g -> + tclUSER + concl_tac + is_mes + (Some (hrec::hspec::(retrieve_acc_var g)@specs)) + g + ) + ] + ] + ) + ]) g) + + ) + + +let rec_leaf_terminate f_constr concl_tac is_mes acc_inv hrec (func:global_reference) eqs expr = + match find_call_occs 0 f_constr expr with + | context_fn, args -> + observe_tac "introduce_all_values" + (introduce_all_values concl_tac is_mes acc_inv func context_fn eqs hrec args [] []) + +let proveterminate rec_arg_id is_mes acc_inv (hrec:identifier) + (f_constr:constr) (func:global_reference) base_leaf rec_leaf = + let rec proveterminate (eqs:constr list) (expr:constr) = + try + (* let _ = msgnl (str "entering proveterminate") in *) + let v = + match (kind_of_term expr) with + Case (ci, t, a, l) -> + (match find_call_occs 0 f_constr a with + _,[] -> + (fun g -> + let destruct_tac, rev_to_thin_intro = + mkDestructEq rec_arg_id a g in + tclTHENS destruct_tac + (list_map_i + (fun i -> mk_intros_and_continue + (List.rev rev_to_thin_intro) + true + proveterminate + eqs + ci.ci_cstr_nargs.(i)) + 0 (Array.to_list l)) g) + | _, _::_ -> + (match find_call_occs 0 f_constr expr with + _,[] -> observe_tac "base_leaf" (base_leaf func eqs expr) + | _, _:: _ -> + observe_tac "rec_leaf" + (rec_leaf is_mes acc_inv hrec func eqs expr))) + | _ -> + (match find_call_occs 0 f_constr expr with + _,[] -> + (try observe_tac "base_leaf" (base_leaf func eqs expr) + with e -> (msgerrnl (str "failure in base case");raise e )) + | _, _::_ -> + observe_tac "rec_leaf" + (rec_leaf is_mes acc_inv hrec func eqs expr)) in + v + with e -> begin msgerrnl(str "failure in proveterminate"); raise e end + in + proveterminate + +let hyp_terminates nb_args func = + let a_arrow_b = arg_type (constr_of_global func) in + let rev_args,b = decompose_prod_n nb_args a_arrow_b in + let left = + mkApp(delayed_force iter, + Array.of_list + (lift 5 a_arrow_b:: mkRel 3:: + constr_of_global func::mkRel 1:: + List.rev (list_map_i (fun i _ -> mkRel (6+i)) 0 rev_args) + ) + ) + in + let right = mkRel 5 in + let equality = mkApp(delayed_force eq, [|lift 5 b; left; right|]) in + let result = (mkProd ((Name def_id) , lift 4 a_arrow_b, equality)) in + let cond = mkApp(delayed_force lt, [|(mkRel 2); (mkRel 1)|]) in + let nb_iter = + mkApp(delayed_force ex, + [|delayed_force nat; + (mkLambda + (Name + p_id, + delayed_force nat, + (mkProd (Name k_id, delayed_force nat, + mkArrow cond result))))|])in + let value = mkApp(delayed_force coq_sig, + [|b; + (mkLambda (Name v_id, b, nb_iter))|]) in + compose_prod rev_args value + + + +let tclUSER_if_not_mes concl_tac is_mes names_to_suppress = + if is_mes + then tclCOMPLETE (h_simplest_apply (delayed_force well_founded_ltof)) + else tclUSER concl_tac is_mes names_to_suppress + +let termination_proof_header is_mes input_type ids args_id relation + rec_arg_num rec_arg_id tac wf_tac : tactic = + begin + fun g -> + let nargs = List.length args_id in + let pre_rec_args = + List.rev_map + mkVar (fst (list_chop (rec_arg_num - 1) args_id)) + in + let relation = substl pre_rec_args relation in + let input_type = substl pre_rec_args input_type in + let wf_thm = next_global_ident_away true (id_of_string ("wf_R")) ids in + let wf_rec_arg = + next_global_ident_away true + (id_of_string ("Acc_"^(string_of_id rec_arg_id))) + (wf_thm::ids) + in + let hrec = next_global_ident_away true hrec_id + (wf_rec_arg::wf_thm::ids) in + let acc_inv = + lazy ( + mkApp ( + delayed_force acc_inv_id, + [|input_type;relation;mkVar rec_arg_id|] + ) + ) + in + tclTHEN + (h_intros args_id) + (tclTHENS + (observe_tac + "first assert" + (assert_tac + true (* the assert thm is in first subgoal *) + (Name wf_rec_arg) + (mkApp (delayed_force acc_rel, + [|input_type;relation;mkVar rec_arg_id|]) + ) + ) + ) + [ + (* accesibility proof *) + tclTHENS + (observe_tac + "second assert" + (assert_tac + true + (Name wf_thm) + (mkApp (delayed_force well_founded,[|input_type;relation|])) + ) + ) + [ + (* interactive proof that the relation is well_founded *) + observe_tac "wf_tac" (wf_tac is_mes (Some args_id)); + (* this gives the accessibility argument *) + observe_tac + "apply wf_thm" + (h_simplest_apply (mkApp(mkVar wf_thm,[|mkVar rec_arg_id|])) + ) + ] + ; + (* rest of the proof *) + tclTHENSEQ + [observe_tac "generalize" + (onNLastHyps (nargs+1) + (fun (id,_,_) -> + tclTHEN (h_generalize [mkVar id]) (h_clear false [id]) + )) + ; + observe_tac "h_fix" (h_fix (Some hrec) (nargs+1)); + h_intros args_id; + h_intro wf_rec_arg; + observe_tac "tac" (tac wf_rec_arg hrec acc_inv) + ] + ] + ) g + end + + + +let rec instantiate_lambda t l = + match l with + | [] -> t + | a::l -> + let (bound_name, _, body) = destLambda t in + instantiate_lambda (subst1 a body) l +;; + + +let whole_start (concl_tac:tactic) nb_args is_mes func input_type relation rec_arg_num : tactic = + begin + fun g -> + let ids = ids_of_named_context (pf_hyps g) in + let func_body = (def_of_const (constr_of_global func)) in + let (f_name, _, body1) = destLambda func_body in + let f_id = + match f_name with + | Name f_id -> next_global_ident_away true f_id ids + | Anonymous -> anomaly "Anonymous function" + in + let n_names_types,_ = decompose_lam_n nb_args body1 in + let n_ids,ids = + List.fold_left + (fun (n_ids,ids) (n_name,_) -> + match n_name with + | Name id -> + let n_id = next_global_ident_away true id ids in + n_id::n_ids,n_id::ids + | _ -> anomaly "anonymous argument" + ) + ([],(f_id::ids)) + n_names_types + in + let rec_arg_id = List.nth n_ids (rec_arg_num - 1) in + let expr = instantiate_lambda func_body (mkVar f_id::(List.map mkVar n_ids)) in + termination_proof_header + is_mes + input_type + ids + n_ids + relation + rec_arg_num + rec_arg_id + (fun rec_arg_id hrec acc_inv g -> + (proveterminate + [rec_arg_id] + is_mes + acc_inv + hrec + (mkVar f_id) + func + base_leaf_terminate + (rec_leaf_terminate (mkVar f_id) concl_tac) + [] + expr + ) + g + ) + (tclUSER_if_not_mes concl_tac) + g + end + +let get_current_subgoals_types () = + let pts = get_pftreestate () in + let _,subs = extract_open_pftreestate pts in + List.map snd ((* List.sort (fun (x,_) (y,_) -> x -y ) *)subs ) + +let build_and_l l = + let and_constr = Coqlib.build_coq_and () in + let conj_constr = coq_conj () in + let mk_and p1 p2 = + Term.mkApp(and_constr,[|p1;p2|]) in + let rec f = function + | [] -> failwith "empty list of subgoals!" + | [p] -> p,tclIDTAC,1 + | p1::pl -> + let c,tac,nb = f pl in + mk_and p1 c, + tclTHENS + (apply (constr_of_global conj_constr)) + [tclIDTAC; + tac + ],nb+1 + in f l + + +let is_rec_res id = + let rec_res_name = string_of_id rec_res_id in + let id_name = string_of_id id in + try + String.sub id_name 0 (String.length rec_res_name) = rec_res_name + with _ -> false + +let clear_goals = + let rec clear_goal t = + match kind_of_term t with + | Prod(Name id as na,t,b) -> + let b' = clear_goal b in + if noccurn 1 b' && (is_rec_res id) + then pop b' + else if b' == b then t + else mkProd(na,t,b') + | _ -> map_constr clear_goal t + in + List.map clear_goal + + +let build_new_goal_type () = + let sub_gls_types = get_current_subgoals_types () in + let sub_gls_types = clear_goals sub_gls_types in + let res = build_and_l sub_gls_types in + res + + + (* +let prove_with_tcc lemma _ : tactic = + fun gls -> + let hid = next_global_ident_away true h_id (pf_ids_of_hyps gls) in + tclTHENSEQ + [ + h_generalize [lemma]; + h_intro hid; + Elim.h_decompose_and (mkVar hid); + gen_eauto(* default_eauto *) false (false,5) [] (Some []) + (* default_auto *) + ] + gls + *) + + + +let open_new_goal (build_proof:tactic -> tactic -> unit) using_lemmas ref_ goal_name (gls_type,decompose_and_tac,nb_goal) = + let current_proof_name = get_current_proof_name () in + let name = match goal_name with + | Some s -> s + | None -> + try (add_suffix current_proof_name "_subproof") + with _ -> anomaly "open_new_goal with an unamed theorem" + in + let sign = Global.named_context () in + let sign = clear_proofs sign in + let na = next_global_ident_away false name [] in + if occur_existential gls_type then + Util.error "\"abstract\" cannot handle existentials"; + let hook _ _ = + let opacity = + let na_ref = Libnames.Ident (dummy_loc,na) in + let na_global = Nametab.global na_ref in + match na_global with + ConstRef c -> + let cb = Global.lookup_constant c in + if cb.Declarations.const_opaque then true + else begin match cb.const_body with None -> true | _ -> false end + | _ -> anomaly "equation_lemma: not a constant" + in + let lemma = mkConst (Lib.make_con na) in + ref_ := Some lemma ; + let lid = ref [] in + let h_num = ref (-1) in + Flags.silently Vernacentries.interp (Vernacexpr.VernacAbort None); + build_proof + ( fun gls -> + let hid = next_global_ident_away true h_id (pf_ids_of_hyps gls) in + tclTHENSEQ + [ + h_generalize [lemma]; + h_intro hid; + (fun g -> + let ids = pf_ids_of_hyps g in + tclTHEN + (Elim.h_decompose_and (mkVar hid)) + (fun g -> + let ids' = pf_ids_of_hyps g in + lid := List.rev (list_subtract ids' ids); + if !lid = [] then lid := [hid]; +(* list_iter_i *) +(* (fun i v -> *) +(* msgnl (str "hyp" ++ int i ++ str " " ++ *) +(* Nameops.pr_id v ++ fnl () ++ fnl())) *) +(* !lid; *) + tclIDTAC g + ) + g + ); + ] gls) + (fun g -> + match kind_of_term (pf_concl g) with + | App(f,_) when eq_constr f (well_founded ()) -> + Auto.h_auto None [] (Some []) g + | _ -> + incr h_num; + tclTHEN + (eapply_with_bindings (mkVar (List.nth !lid !h_num), NoBindings)) + e_assumption + g) +; + Command.save_named opacity; + in + start_proof + na + (Decl_kinds.Global, Decl_kinds.Proof Decl_kinds.Lemma) + sign + gls_type + hook ; + by ( + fun g -> + tclTHEN + (decompose_and_tac) + (tclORELSE + (tclFIRST + (List.map + (fun c -> + tclTHENSEQ + [intros; + h_simplest_apply (interp_constr Evd.empty (Global.env()) c); + tclCOMPLETE Auto.default_auto + ] + ) + using_lemmas) + ) tclIDTAC) + g); + try + by tclIDTAC; (* raises UserError _ if the proof is complete *) + if Flags.is_verbose () then (pp (Printer.pr_open_subgoals())) + with UserError _ -> + defined () + +;; + + +let com_terminate + tcc_lemma_name + tcc_lemma_ref + is_mes + fonctional_ref + input_type + relation + rec_arg_num + thm_name using_lemmas + nb_args + hook = + let start_proof (tac_start:tactic) (tac_end:tactic) = + let (evmap, env) = Command.get_current_context() in + start_proof thm_name + (Global, Proof Lemma) (Environ.named_context_val env) + (hyp_terminates nb_args fonctional_ref) hook; + by (observe_tac "starting_tac" tac_start); + by (observe_tac "whole_start" (whole_start tac_end nb_args is_mes fonctional_ref + input_type relation rec_arg_num )) + + in + start_proof tclIDTAC tclIDTAC; + try + let new_goal_type = build_new_goal_type () in + open_new_goal start_proof using_lemmas tcc_lemma_ref + (Some tcc_lemma_name) + (new_goal_type) + with Failure "empty list of subgoals!" -> + (* a non recursive function declared with measure ! *) + defined () + + + + +let ind_of_ref = function + | IndRef (ind,i) -> (ind,i) + | _ -> anomaly "IndRef expected" + +let (value_f:constr list -> global_reference -> constr) = + fun al fterm -> + let d0 = dummy_loc in + let rev_x_id_l = + ( + List.fold_left + (fun x_id_l _ -> + let x_id = next_global_ident_away true x_id x_id_l in + x_id::x_id_l + ) + [] + al + ) + in + let fun_body = + RCases + (d0,RegularStyle,None, + [RApp(d0, RRef(d0,fterm), List.rev_map (fun x_id -> RVar(d0, x_id)) rev_x_id_l), + (Anonymous,None)], + [d0, [v_id], [PatCstr(d0,(ind_of_ref + (delayed_force coq_sig_ref),1), + [PatVar(d0, Name v_id); + PatVar(d0, Anonymous)], + Anonymous)], + RVar(d0,v_id)]) + in + let value = + List.fold_left2 + (fun acc x_id a -> + RLambda + (d0, Name x_id, Explicit, RDynamic(d0, constr_in a), + acc + ) + ) + fun_body + rev_x_id_l + (List.rev al) + in + understand Evd.empty (Global.env()) value;; + +let (declare_fun : identifier -> logical_kind -> constr -> global_reference) = + fun f_id kind value -> + let ce = {const_entry_body = value; + const_entry_type = None; + const_entry_opaque = false; + const_entry_boxed = true} in + ConstRef(declare_constant f_id (DefinitionEntry ce, kind));; + +let (declare_f : identifier -> logical_kind -> constr list -> global_reference -> global_reference) = + fun f_id kind input_type fterm_ref -> + declare_fun f_id kind (value_f input_type fterm_ref);; + +let rec n_x_id ids n = + if n = 0 then [] + else let x = next_global_ident_away true x_id ids in + x::n_x_id (x::ids) (n-1);; + +let start_equation (f:global_reference) (term_f:global_reference) + (cont_tactic:identifier list -> tactic) g = + let ids = pf_ids_of_hyps g in + let terminate_constr = constr_of_global term_f in + let nargs = nb_prod (type_of_const terminate_constr) in + let x = n_x_id ids nargs in + tclTHENLIST [ + h_intros x; + unfold_in_concl [(all_occurrences, evaluable_of_global_reference f)]; + observe_tac "simplest_case" + (simplest_case (mkApp (terminate_constr, + Array.of_list (List.map mkVar x)))); + observe_tac "prove_eq" (cont_tactic x)] g;; + +let base_leaf_eq func eqs f_id g = + let ids = pf_ids_of_hyps g in + let k = next_global_ident_away true k_id ids in + let p = next_global_ident_away true p_id (k::ids) in + let v = next_global_ident_away true v_id (p::k::ids) in + let heq = next_global_ident_away true heq_id (v::p::k::ids) in + let heq1 = next_global_ident_away true heq_id (heq::v::p::k::ids) in + let hex = next_global_ident_away true hex_id (heq1::heq::v::p::k::ids) in + tclTHENLIST [ + h_intros [v; hex]; + simplest_elim (mkVar hex); + h_intros [p;heq1]; + tclTRY + (rewriteRL + (mkApp(mkVar heq1, + [|mkApp (delayed_force coq_S, [|mkVar p|]); + mkApp(delayed_force lt_n_Sn, [|mkVar p|]); f_id|]))); + simpl_iter onConcl; + tclTRY (unfold_in_concl [((true,[1]), evaluable_of_global_reference func)]); + list_rewrite true eqs; + apply (delayed_force refl_equal)] g;; + +let f_S t = mkApp(delayed_force coq_S, [|t|]);; + + +let rec introduce_all_values_eq cont_tac functional termine + f p heq1 pmax bounds le_proofs eqs ids = + function + [] -> + let heq2 = next_global_ident_away true heq_id ids in + tclTHENLIST + [forward None (IntroIdentifier heq2) + (mkApp(mkVar heq1, [|f_S(f_S(mkVar pmax))|])); + simpl_iter (onHyp heq2); + unfold_in_hyp [((true,[1]), evaluable_of_global_reference + (global_of_constr functional))] + ((all_occurrences_expr, heq2), Tacexpr.InHyp); + tclTHENS + (fun gls -> + let t_eq = compute_renamed_type gls (mkVar heq2) in + let def_id = + let _,_,t = destProd t_eq in let def_na,_,_ = destProd t in + Nameops.out_name def_na + in + observe_tac "rewrite heq" (general_rewrite_bindings false all_occurrences + (mkVar heq2, + ExplicitBindings[dummy_loc,NamedHyp def_id, + f]) false) gls) + [tclTHENLIST + [observe_tac "list_rewrite" (list_rewrite true eqs); + cont_tac pmax le_proofs]; + tclTHENLIST[apply (delayed_force le_lt_SS); + compute_le_proofs le_proofs]]] + | arg::args -> + let v' = next_global_ident_away true v_id ids in + let ids = v'::ids in + let hex' = next_global_ident_away true hex_id ids in + let ids = hex'::ids in + let p' = next_global_ident_away true p_id ids in + let ids = p'::ids in + let new_pmax = next_global_ident_away true pmax_id ids in + let ids = pmax::ids in + let hle1 = next_global_ident_away true hle_id ids in + let ids = hle1::ids in + let hle2 = next_global_ident_away true hle_id ids in + let ids = hle2::ids in + let heq = next_global_ident_away true heq_id ids in + let ids = heq::ids in + let heq2 = next_global_ident_away true heq_id ids in + let ids = heq2::ids in + tclTHENLIST + [mkCaseEq(mkApp(termine, Array.of_list arg)); + h_intros [v'; hex']; + simplest_elim(mkVar hex'); + h_intros [p']; + simplest_elim(mkApp(delayed_force max_constr, [|mkVar pmax; + mkVar p'|])); + h_intros [new_pmax;hle1;hle2]; + introduce_all_values_eq + (fun pmax' le_proofs'-> + tclTHENLIST + [cont_tac pmax' le_proofs'; + h_intros [heq;heq2]; + observe_tac ("rewriteRL " ^ (string_of_id heq2)) + (tclTRY (rewriteLR (mkVar heq2))); + tclTRY (tclTHENS + ( fun g -> + let t_eq = compute_renamed_type g (mkVar heq) in + let k_id,def_id = + let k_na,_,t = destProd t_eq in + let _,_,t = destProd t in + let def_na,_,_ = destProd t in + Nameops.out_name k_na,Nameops.out_name def_na + in + let c_b = (mkVar heq, + ExplicitBindings + [dummy_loc, NamedHyp k_id, + f_S(mkVar pmax'); + dummy_loc, NamedHyp def_id, f]) + in + observe_tac "general_rewrite_bindings" ( (general_rewrite_bindings false all_occurrences + c_b false)) + g + ) + [tclIDTAC; + tclTHENLIST + [apply (delayed_force le_lt_n_Sm); + compute_le_proofs le_proofs']])]) + functional termine f p heq1 new_pmax + (p'::bounds)((mkVar pmax)::le_proofs) eqs + (heq2::heq::hle2::hle1::new_pmax::p'::hex'::v'::ids) args] + + +let rec_leaf_eq termine f ids functional eqs expr fn args = + let p = next_global_ident_away true p_id ids in + let ids = p::ids in + let v = next_global_ident_away true v_id ids in + let ids = v::ids in + let hex = next_global_ident_away true hex_id ids in + let ids = hex::ids in + let heq1 = next_global_ident_away true heq_id ids in + let ids = heq1::ids in + let hle1 = next_global_ident_away true hle_id ids in + let ids = hle1::ids in + tclTHENLIST + [observe_tac "intros v hex" (h_intros [v;hex]); + simplest_elim (mkVar hex); + h_intros [p;heq1]; + h_generalize [mkApp(delayed_force le_n,[|mkVar p|])]; + h_intros [hle1]; + observe_tac "introduce_all_values_eq" (introduce_all_values_eq + (fun _ _ -> tclIDTAC) + functional termine f p heq1 p [] [] eqs ids args); + observe_tac "failing here" (apply (delayed_force refl_equal))] + +let rec prove_eq (termine:constr) (f:constr)(functional:global_reference) + (eqs:constr list) (expr:constr) = +(* tclTRY *) + (match kind_of_term expr with + Case(ci,t,a,l) -> + (match find_call_occs 0 f a with + _,[] -> + (fun g -> + let destruct_tac,rev_to_thin_intro = mkDestructEq [] a g in + tclTHENS + destruct_tac + (list_map_i + (fun i -> mk_intros_and_continue + (List.rev rev_to_thin_intro) true + (prove_eq termine f functional) + eqs ci.ci_cstr_nargs.(i)) + 0 (Array.to_list l)) g) + | _,_::_ -> + (match find_call_occs 0 f expr with + _,[] -> base_leaf_eq functional eqs f + | fn,args -> + fun g -> + let ids = ids_of_named_context (pf_hyps g) in + rec_leaf_eq termine f ids + (constr_of_global functional) + eqs expr fn args g)) + | _ -> + (match find_call_occs 0 f expr with + _,[] -> base_leaf_eq functional eqs f + | fn,args -> + fun g -> + let ids = ids_of_named_context (pf_hyps g) in + observe_tac "rec_leaf_eq" (rec_leaf_eq + termine f ids (constr_of_global functional) + eqs expr fn args) g));; + +let (com_eqn : identifier -> + global_reference -> global_reference -> global_reference + -> constr -> unit) = + fun eq_name functional_ref f_ref terminate_ref equation_lemma_type -> + let opacity = + match terminate_ref with + | ConstRef c -> + let cb = Global.lookup_constant c in + if cb.Declarations.const_opaque then true + else begin match cb.const_body with None -> true | _ -> false end + | _ -> anomaly "terminate_lemma: not a constant" + in + let (evmap, env) = Command.get_current_context() in + let f_constr = (constr_of_global f_ref) in + let equation_lemma_type = subst1 f_constr equation_lemma_type in + (start_proof eq_name (Global, Proof Lemma) + (Environ.named_context_val env) equation_lemma_type (fun _ _ -> ()); + by + (start_equation f_ref terminate_ref + (fun x -> + prove_eq + (constr_of_global terminate_ref) + f_constr + functional_ref + [] + (instantiate_lambda + (def_of_const (constr_of_global functional_ref)) + (f_constr::List.map mkVar x) + ) + ) + ); +(* (try Vernacentries.interp (Vernacexpr.VernacShow Vernacexpr.ShowProof) with _ -> ()); *) +(* Vernacentries.interp (Vernacexpr.VernacShow Vernacexpr.ShowScript); *) + Flags.silently (fun () ->Command.save_named opacity) () ; +(* Pp.msgnl (str "eqn finished"); *) + + );; + +let nf_zeta env = + Reductionops.clos_norm_flags (Closure.RedFlags.mkflags [Closure.RedFlags.fZETA]) + env + Evd.empty + +let recursive_definition is_mes function_name rec_impls type_of_f r rec_arg_num eq + generate_induction_principle using_lemmas : unit = + let function_type = interp_constr Evd.empty (Global.env()) type_of_f in + let env = push_named (function_name,None,function_type) (Global.env()) in +(* Pp.msgnl (str "function type := " ++ Printer.pr_lconstr function_type); *) + let equation_lemma_type = interp_gen (OfType None) Evd.empty env ~impls:([],rec_impls) eq in +(* Pp.msgnl (Printer.pr_lconstr equation_lemma_type); *) + let res_vars,eq' = decompose_prod equation_lemma_type in + let env_eq' = Environ.push_rel_context (List.map (fun (x,y) -> (x,None,y)) res_vars) env in + let eq' = nf_zeta env_eq' eq' in + let res = +(* Pp.msgnl (str "res_var :=" ++ Printer.pr_lconstr_env (push_rel_context (List.map (function (x,t) -> (x,None,t)) res_vars) env) eq'); *) +(* Pp.msgnl (str "rec_arg_num := " ++ str (string_of_int rec_arg_num)); *) +(* Pp.msgnl (str "eq' := " ++ str (string_of_int rec_arg_num)); *) + match kind_of_term eq' with + | App(e,[|_;_;eq_fix|]) -> + mkLambda (Name function_name,function_type,subst_var function_name (compose_lam res_vars eq_fix)) + | _ -> failwith "Recursive Definition (res not eq)" + in + let pre_rec_args,function_type_before_rec_arg = decompose_prod_n (rec_arg_num - 1) function_type in + let (_, rec_arg_type, _) = destProd function_type_before_rec_arg in + let arg_types = List.rev_map snd (fst (decompose_prod_n (List.length res_vars) function_type)) in + let equation_id = add_suffix function_name "_equation" in + let functional_id = add_suffix function_name "_F" in + let term_id = add_suffix function_name "_terminate" in + let functional_ref = declare_fun functional_id (IsDefinition Definition) res in + let env_with_pre_rec_args = push_rel_context(List.map (function (x,t) -> (x,None,t)) pre_rec_args) env in + let relation = + interp_constr + Evd.empty + env_with_pre_rec_args + r + in + let tcc_lemma_name = add_suffix function_name "_tcc" in + let tcc_lemma_constr = ref None in +(* let _ = Pp.msgnl (str "relation := " ++ Printer.pr_lconstr_env env_with_pre_rec_args relation) in *) + let hook _ _ = + let term_ref = Nametab.locate (make_short_qualid term_id) in + let f_ref = declare_f function_name (IsProof Lemma) arg_types term_ref in +(* message "start second proof"; *) + let stop = ref false in + begin + try com_eqn equation_id functional_ref f_ref term_ref (subst_var function_name equation_lemma_type) + with e -> + begin + if Tacinterp.get_debug () <> Tactic_debug.DebugOff + then pperrnl (str "Cannot create equation Lemma " ++ Cerrors.explain_exn e) + else anomaly "Cannot create equation Lemma" + ; +(* ignore(try Vernacentries.vernac_reset_name (Util.dummy_loc,functional_id) with _ -> ()); *) + stop := true; + end + end; + if not !stop + then + let eq_ref = Nametab.locate (make_short_qualid equation_id ) in + let f_ref = destConst (constr_of_global f_ref) + and functional_ref = destConst (constr_of_global functional_ref) + and eq_ref = destConst (constr_of_global eq_ref) in + generate_induction_principle f_ref tcc_lemma_constr + functional_ref eq_ref rec_arg_num rec_arg_type (nb_prod res) relation; + if Flags.is_verbose () + then msgnl (h 1 (Ppconstr.pr_id function_name ++ + spc () ++ str"is defined" )++ fnl () ++ + h 1 (Ppconstr.pr_id equation_id ++ + spc () ++ str"is defined" ) + ) + in + try + com_terminate + tcc_lemma_name + tcc_lemma_constr + is_mes functional_ref + rec_arg_type + relation rec_arg_num + term_id + using_lemmas + (List.length res_vars) + hook + with e -> + begin + ignore(try Vernacentries.vernac_reset_name (Util.dummy_loc,functional_id) with _ -> ()); +(* anomaly "Cannot create termination Lemma" *) + raise e + end + + + diff --git a/contrib/funind/tacinv.ml4 b/contrib/funind/tacinv.ml4 deleted file mode 100644 index 5d19079b..00000000 --- a/contrib/funind/tacinv.ml4 +++ /dev/null @@ -1,872 +0,0 @@ -(*i camlp4deps: "parsing/grammar.cma" i*) - -(*s FunInv Tactic: inversion following the shape of a function. *) - -(* Deprecated: see indfun_main.ml4 instead *) - -(* Don't delete this file yet, it may be used for other purposes *) - -(*i*) -open Termops -open Equality -open Names -open Pp -open Tacmach -open Proof_type -open Tacinterp -open Tactics -open Tacticals -open Term -open Util -open Printer -open Reductionops -open Inductiveops -open Coqlib -open Refine -open Typing -open Declare -open Decl_kinds -open Safe_typing -open Vernacinterp -open Evd -open Environ -open Entries -open Setoid_replace -open Tacinvutils -(*i*) - -module Smap = Map.Make(struct type t = constr let compare = compare end) -let smap_to_list m = Smap.fold (fun c cb l -> (c,cb)::l) m [] -let merge_smap m1 m2 = Smap.fold (fun c cb m -> Smap.add c cb m) m1 m2 -let rec listsuf i l = if i<=0 then l else listsuf (i-1) (List.tl l) -let rec listpref i l = if i<=0 then [] else List.hd l :: listpref (i-1) (List.tl l) -let rec split3 l = - List.fold_right (fun (e1,e2,e3) (a,b,c) -> (e1::a),(e2::b),(e3::c)) l ([],[],[]) - -let mkthesort = mkProp (* would like to put Type here, but with which index? *) - -(* this is the prefix used to name equality hypothesis generated by - case analysis*) -let equality_hyp_string = "_eg_" - -(* bug de refine: on doit ssavoir sur quelle hypothese on se trouve. valeur - initiale au debut de l'appel a la fonction proofPrinc: 1. *) -let nthhyp = ref 1 - -let debug i = prstr ("DEBUG "^ string_of_int i ^"\n") -let pr2constr = (fun c1 c2 -> prconstr c1; prstr " <---> "; prconstr c2) -(* Operations on names *) -let id_of_name = function - Anonymous -> id_of_string "H" - | Name id -> id;; -let string_of_name nme = string_of_id (id_of_name nme) - (*end debugging *) - -(* Interpretation of constr's *) -let constr_of c = Constrintern.interp_constr Evd.empty (Global.env()) c - -(*s specific manipulations on constr *) -let lift1_leqs leq= - List.map - (function (r,(typofg,g,d)) - -> lift 1 r, (lift 1 typofg, lift 1 g , lift 1 d)) leq - -let lift1_relleqs leq= List.map (function (r,x) -> lift 1 r,x) leq - -(* WARNING: In the types, we don't lift the rels in the type. This is - intentional. Use with care. *) -let lift1_lvars lvars= List.map - (function x,(nme,c) -> lift 1 x, (nme, (*lift 1*) c)) lvars - -let pop1_levar levars = List.map (function ev,tev -> ev, popn 1 tev) levars - - -let rec add_n_dummy_prod t n = - if n<=0 then t - else add_n_dummy_prod (mkNamedProd (id_of_string "DUMMY") mkthesort t) (n-1) - -(* [add_lambdas t gl [csr1;csr2...]] returns [[x1:type of csr1] - [x2:type of csr2] t [csr <- x1 ...]], names of abstracted variables - are not specified *) -let rec add_lambdas t gl lcsr = - match lcsr with - | [] -> t - | csr::lcsr' -> - let hyp_csr,hyptyp = csr,(pf_type_of gl csr) in - lambda_id hyp_csr hyptyp (add_lambdas t gl lcsr') - -(* [add_pis t gl [csr1;csr2...]] returns ([x1] :type of [csr1] - [x2]:type of csr2) [t]*) -let rec add_pis t gl lcsr = - match lcsr with - | [] -> t - | csr::lcsr' -> - let hyp_csr,hyptyp = csr,(pf_type_of gl csr) in - prod_id hyp_csr hyptyp (add_pis t gl lcsr') - -let mkProdEg teq eql eqr concl = - mkProd (name_of_string "eg", mkEq teq eql eqr, lift 1 concl) - -let eqs_of_beqs x = - List.map (function (_,(a,b,c)) -> (Anonymous, mkEq a b c)) x - - -let rec eqs_of_beqs_named_aux s i l = - match l with - | [] -> [] - | (r,(a,b,c))::l' -> - (Name(id_of_string (s^ string_of_int i)), mkEq a b c) - ::eqs_of_beqs_named_aux s (i-1) l' - - -let eqs_of_beqs_named s l = eqs_of_beqs_named_aux s (List.length l) l - -let rec patternify ltypes c nme = - match ltypes with - | [] -> c - | (mv,t)::ltypes' -> - let c'= substitterm 0 mv (mkRel 1) c in - let tlift = lift (List.length ltypes') t in - let res = - patternify ltypes' (mkLambda (newname_append nme "rec", tlift, c')) nme in - res - -let rec npatternify ltypes c = - match ltypes with - | [] -> c - | (mv,nme,t)::ltypes' -> - let c'= substitterm 0 mv (mkRel 1) c in - let tlift = lift (List.length ltypes') t in - let res = - npatternify ltypes' (mkLambda (newname_append nme "", tlift, c')) in - res - -(* fait une application (c m1 m2...mn, où mi est une evar, on rend également - la liste des evar munies de leur type) *) -let rec apply_levars c lmetav = - match lmetav with - | [] -> [],c - | (i,typ) :: lmetav' -> - let levars,trm = apply_levars c lmetav' in - let exkey = mknewexist() in - ((exkey,typ)::levars), applistc trm [mkEvar exkey] - (* EXPERIMENT le refine est plus long si on met un cast: - ((exkey,typ)::levars), mkCast ((applistc trm [mkEvar exkey]),typ) *) - - -let prod_change_concl c newconcl = - let lv,_ = decompose_prod c in prod_it newconcl lv - -let lam_change_concl c newconcl = - let lv,_ = decompose_prod c in lam_it newconcl lv - - -let rec mkAppRel c largs n = - match largs with - | [] -> c - | arg::largs' -> - let newc = mkApp (c,[|(mkRel n)|]) in mkAppRel newc largs' (n-1) - -let applFull c typofc = - let lv,t = decompose_prod typofc in - let ltyp = List.map fst lv in - let res = mkAppRel c ltyp (List.length ltyp) in - res - -(* Take two terms with same structure and return a map of deBruijn from the - first to the second. Only DeBruijn should be different between the two - terms. *) -let rec build_rel_map typ type_of_b = - match (kind_of_term typ), (kind_of_term type_of_b) with - Evar _ , Evar _ -> Smap.empty - | Const c1, Const c2 when c1=c2 -> Smap.empty - | Ind c1, Ind c2 when c1=c2 -> Smap.empty - | Rel i, Rel j when i=j -> Smap.empty - | Rel i, Rel j -> Smap.add typ type_of_b Smap.empty - | Prod (name,c1,c2), Prod (nameb,c1b,c2b) -> - let map1 = build_rel_map c1 c1b in - let map2 = build_rel_map (pop c2) (pop c2b) in - merge_smap map1 map2 - | App (f,args), App (fb,argsb) when Array.length args = Array.length argsb -> - build_rel_map_list (Array.to_list args) (Array.to_list argsb) - | _,_ -> failwith ("Could not generate case annotation. "^ - "Incompatibility between annotation and actual type") - -and build_rel_map_list ltyp ltype_of_b = - List.fold_left2 (fun a b c -> merge_smap a (build_rel_map b c)) - Smap.empty ltyp ltype_of_b - - -(*s Use (and proof) of the principle *) - -(* This is the type of the argument of [proofPrinc] *) - -type mimickinfo = - { - concl: constr; (* conclusion voulue, cad (xi:ti)gl, ou gl est le but a - prouver, et xi:ti correspondent aux arguments donnés à - la tactique. On enlèvera un produit à chaque fois - qu'on rencontrera un binder, sans lift ou pop. - Initialement: une seule conclusion, puis specifique à - chaque branche. *) - absconcl: constr array; (* conclusions patternisées pour pouvoir être - appliquées = un predicat pour chaque fixpt - mutuel. *) - mimick: constr; (* le terme qu'on imite. On plongera dedans au fur et - à mesure, sans lift ni pop. *) - env: env; (* The global typing environment, we will add thing in it when - going inside the term (push_rel, push_rec_types) *) - sigma: Evd.evar_map; - nmefonc: constr array; (* la constante correspondant à la fonction - appelée, permet de remplacer les appels - recursifs par des appels à la constante - correspondante (non pertinent (et inutile) si - on permet l'appel de la tactique sur une terme - donné directement (au lieu d'une constante - comme pour l'instant)). *) - fonc: int * int; (* bornes des indices des variable correspondant aux - appels récursifs (plusieurs car fixp. mutuels), - utile pour reconnaître les appels récursifs - (ATTENTION: initialement vide, reste vide tant qu'on - n'est pas dans un fix). *) - doeqs: bool; (* this reference is to toggle building of equalities during - the building of the principle (default is true) *) - fix: bool; (* did I already went through a fix or case constr? lambdas - found before a case or a fix are treated as parameters of - the induction principle *) - lst_vars: (constr*(name*constr)) list ; (* Variables rencontrées jusque là *) - lst_eqs: (Term.constr * (Term.constr * Term.constr * Term.constr)) list ; - (* liste d'équations engendrées au cours du - parcours, cette liste grandit à chaque - case, et il faut lifter le tout à chaque - binder *) - lst_recs: constr list ; (* appels récursifs rencontrés jusque là *) - } - -(* This is the return type of [proofPrinc] *) -type 'a funind = (* 'A = CONTR OU CONSTR ARRAY *) - { - - princ:'a; (* le (ou les) principe(s) demandé(s), il contient des meta - variables représentant soit des trous à prouver plus tard, - soit les conclusions à compléter avant de rendre le terme - (suivant qu'on utilise le principe pour faire refine ou - functional scheme). Il y plusieurs conclusions si plusieurs - fonction mutuellement récursives) voir la suite. *) - evarlist: (constr*Term.types) list; (* [(ev1,tev1);(ev2,tev2)...]] - l'ensemble des meta variables - correspondant à des trous. [evi] - est la meta variable, [tevi] est - son type. *) - hypnum: (int*int*int) list; (* [[(in,jn,kn)...]] sont les nombres - respectivement de variables, d'équations, - et d'hypothèses de récurrence pour le but - n. Permet de faire le bon nombre d'intros - et des rewrite au bons endroits dans la - suite. *) - mutfixmetas: constr array ; (* un tableau de meta variables correspondant - à chacun des prédicats mutuellement - récursifs construits. *) - conclarray: types array; (* un tableau contenant les conclusions - respectives de chacun des prédicats - mutuellement récursifs. Permet de finir la - construction du principe. *) - params:(constr*name*constr) list; (* [[(metavar,param,tparam)..]] la - liste des paramètres (les lambdas - au-dessus du fix) du fixpoint si - fixpoint il y a, le paramètre est - une meta var, dont on stocke le nom - et le type. TODO: utiliser la - structure adequat? *) - } - - - -let empty_funind_constr = - { - princ = mkProp; - evarlist = []; - hypnum = []; - mutfixmetas = [||]; - conclarray = [||]; - params = [] - } - -let empty_funind_array = - { empty_funind_constr with - princ = [||]; - } - -(* Replace the calls to the function (recursive calls) by calls to the - corresponding constant *) -let replace_reccalls mi b = - let d,f = mi.fonc in - let res = ref b in - let _ = for i = d to f do - res := substitterm 0 (mkRel i) mi.nmefonc.(f-i) !res done in - !res - - - -(* collects all information of match branches stored in [l] *) -let rec collect_cases l = - match l with - | [||] -> empty_funind_array - | arr -> - let x = arr.(0) in - let resrec = collect_cases (Array.sub arr 1 (Array.length arr - 1)) in - { x with - princ= Array.append [|x.princ|] resrec.princ; - evarlist = x.evarlist@resrec.evarlist; - hypnum = x.hypnum@resrec.hypnum; - } - -let collect_pred l = - let l1,l2,l3 = split3 l in - Array.of_list l1 , Array.of_list l2 , Array.of_list l3 - - -(* [build_pred n tarr] builds the right predicates for each element of [tarr] - (of type: [type array] of size [n]). Return the list of triples: - (?i , - fun (x1:t1) ... (xn:tn) => (?i x1...xn) , - forall (x1:t1) ... (xn:tn), (?i x1...xn)), - where ti's are deduced from elements of tarr, which are of the form: - t1 -> t2 -> ... -> tn -> . *) -let rec build_pred n tarr = - if n >= Array.length tarr (* iarr *) then [] - else - let ftyp = Array.get tarr n in - let gl = mknewmeta() in - let gl_app = applFull gl ftyp in - let pis = prod_change_concl ftyp gl_app in - let gl_abstr = lam_change_concl ftyp gl_app in - (gl,gl_abstr,pis):: build_pred (n+1) tarr - - -let heq_prefix = "H_eq_" - -type kind_of_hyp = Var | Eq (*| Rec*) - -(* the main function, build the principle by exploring the term and reproduce - the same structure. *) -let rec proofPrinc mi: constr funind = - match kind_of_term mi.mimick with - (* Fixpoint: we reproduce the Fix, fonc becomes (1,nbofmutf) to point on - the name of recursive calls *) - | Fix((iarr,i),(narr,tarr,carr)) -> - (* We construct the right predicates for each mutual fixpt *) - let evararr,newabsconcl,pisarr = collect_pred (build_pred 0 tarr) in - let newenv = push_rec_types (narr,tarr,carr) mi.env in - let anme',aappel_rec,llevar,llposeq = - collect_fix mi 0 iarr narr carr pisarr newabsconcl newenv in - let anme = Array.map (fun nme -> newname_append nme "_ind") anme' in - { - princ = mkFix((iarr,i),(anme, pisarr,aappel_rec)); - evarlist= pop1_levar llevar; (* llevar are put outside the fix, so we pop 1 *) - hypnum = llposeq; - mutfixmetas = evararr; - conclarray = pisarr; - params = [] - } - (* Cases b of arrPt end.*) - | Case (cinfo, pcase, b, arrPt) -> - let prod_pcase,_ = decompose_lam pcase in - let _nmeb,_ = List.hd prod_pcase in - let newb'= apply_leqtrpl_t b mi.lst_eqs in - let type_of_b = Typing.type_of mi.env mi.sigma b in - (* Replace the recursive calls to the function by calls to the constant *) - let newb = replace_reccalls mi newb' in - let cases = collect_cases (Array.mapi (fold_proof mi b type_of_b newb) arrPt) in - (* the match (case) annotation must be transformed, see [build_pcase] below *) - let newpcase = build_pcase mi pcase b type_of_b newb in - let trm' = mkCase (cinfo,newpcase,newb, cases.princ) in - { cases with - princ = if mi.doeqs then mkApp (trm',[|(mkRefl type_of_b newb)|]) else trm'; - params = [] (* FIX: fix parms here (fixpt inside a match)*) - } - - - | Lambda(nme, typ, cstr) -> - let _, _, cconcl = destProd mi.concl in - let d,f=mi.fonc in - let newenv = push_rel (nme,None,typ) mi.env in - let newlst_var = (* if this lambda is a param, then don't add it here *) - if mi.fix then (mkRel 1,(nme,typ)) :: lift1_lvars mi.lst_vars - else (*(mkRel 1,(nme,typ)) :: *) lift1_lvars mi.lst_vars in - let newmi = {mi with concl=cconcl; mimick=cstr; env=newenv; - fonc = (if d > 0 then d+1 else 0) , (if f > 0 then f+1 else 0); - lst_vars = newlst_var ; lst_eqs = lift1_leqs mi.lst_eqs; - lst_recs = lift1L mi.lst_recs} in - let resrec = proofPrinc newmi in - (* are we inside a fixpoint or a case? then this is a normal lambda *) - if mi.fix - then { resrec with princ = mkLambda (nme,typ,resrec.princ) ; params = [] } - else (* otherwise this is a parameter *) - let metav = mknewmeta() in - let substmeta t = popn 1 (substitterm 0 (mkRel 1) metav t) in - { resrec with - princ = substmeta resrec.princ; - evarlist = List.map (fun (ev,tev) -> ev, substmeta tev) resrec.evarlist; - conclarray = Array.map substmeta resrec.conclarray; - params = (metav,nme,typ) :: resrec.params - } - - - | LetIn(nme,cstr1, typ, cstr) -> - failwith ("I don't deal with let ins yet. "^ - "Please expand them before applying this function.") - - | u -> - let varrels = List.rev (List.map fst mi.lst_vars) in - let varnames = List.map snd mi.lst_vars in - let nb_vars = List.length varnames in - let nb_eqs = List.length mi.lst_eqs in - let _eqrels = List.map fst mi.lst_eqs in - (* [terms_recs]: appel rec du fixpoint, On concatène les appels recs - trouvés dans les let in et les Cases avec ceux trouves dans u (ie - mi.mimick). *) - (* TODO: il faudra gérer plusieurs pt fixes imbriqués ? *) - let terms_recs = mi.lst_recs @ hdMatchSub_cpl mi.mimick mi.fonc in - (*c construction du terme: application successive des variables, des - egalites et des appels rec, a la variable existentielle correspondant a - l'hypothese de recurrence en cours. *) - (* d'abord, on fabrique les types des appels recursifs en replacant le nom - de des fonctions par les predicats dans [terms_recs]: [(f_i t u v)] - devient [(P_i t u v)] *) - (* TODO optimiser ici: *) - let appsrecpred = exchange_reli_arrayi_L mi.absconcl mi.fonc terms_recs in - let typeofhole'' = prod_it_anonym_lift mi.concl appsrecpred in - let typeofhole = prodn nb_vars varnames typeofhole'' in - (* Un bug de refine m'oblige à mettre ici un H (meta variable à ce point, - mais remplacé par H avant le refine) au lieu d'un '?', je mettrai les - '?' à la fin comme ça [(([H1,H2,H3...] ...) ? ? ?)] *) - let newmeta = mknewmeta() in - let concl_with_var = applistc newmeta varrels in - let conclrecs = applistc concl_with_var terms_recs in - { empty_funind_constr with - princ = conclrecs; - evarlist = [ newmeta , typeofhole ]; - hypnum = [ nb_vars , List.length terms_recs , nb_eqs ]; - conclarray = mi.absconcl; - } - - -(* C'est un peu compliqué ici: en cas de type inductif vraiment dépendant - l'annotation de type du case [pcase] contient des lambdas supplémentaires - en tête. Je les récupère dans la variable [suppllam_pcase]. Le problème est - que la conclusion de l'annotation du nouveauacse doit faire référence à ces - variables plutôt qu'à celle de l'exterieur. Ce qui suit permet de changer - les reference de newpcase' pour pointer vers les lambda du piquant. On - procède comme suit: on repère les rels qui pointent à l'interieur de - l'annotation dans la fonction initiale et on les relie à celle du type - voulu pour le case, pour ça ([build_rel_map]) on parcourt en même temps le - dernier lambda du piquant ([typ]) (qui contient le type de l'argument du - case) et le type attendu pour le case ([type_of_b]) et on construit un - map. Ensuite on remplace les rels correspondant dans la preuve construite - en suivant le map. *) - -and build_pcase mi pcase b type_of_b newb = - let prod_pcase,_ = decompose_lam pcase in - let nme,typ = List.hd prod_pcase in - (* je remplace b par rel1 (apres avoir lifte un coup) dans la future - annotation du futur case: ensuite je mettrai un lambda devant *) - let typeof_case'' = substitterm 0 (lift 1 b) (mkRel 1) (lift 1 mi.concl) in - let suppllam_pcase = List.tl prod_pcase in - let suppllam_pcasel = List.length suppllam_pcase in - let rel_smap = - if suppllam_pcasel=0 then Smap.empty else (* FIX: is this test necessary ? *) - build_rel_map (lift suppllam_pcasel type_of_b) typ in - let newpcase''' = - Smap.fold (fun e e' acc -> substitterm 0 e (lift 1 e') acc) - rel_smap typeof_case'' in - let neweq = mkEq (lift (suppllam_pcasel + 1) type_of_b) - (lift (suppllam_pcasel + 1) newb) (mkRel 1) in - let newpcase'' = - if mi.doeqs - then mkProd (name_of_string "eg", neweq, lift 1 newpcase''') - else newpcase''' in - (* construction du dernier lambda du piquant. *) - let newpcase' = mkLambda (newname_append nme "_ind" ,typ, newpcase'') in - (* ajout des lambdas supplémentaires (type dépendant) du piquant. *) - lamn suppllam_pcasel suppllam_pcase newpcase' - - -(* [fold_proof mi b typeofb newb l n] rend le resultat de l'appel recursif sur - cstr (correpsondant au ième elt de [arrPt] ci-dessus et donc au ième - constructeur de [typeofb]), appele avec les bons arguments: [mi.concl] - devient [(DUMMY1:t1;...;DUMMY:tn)concl'], ou [n] est le nombre d'arguments - du constructeur considéré, et [concl'] est [mi.concl] ou l'on a réécrit [b] - en ($c_n$ [rel1]...). *) -and fold_proof mi b type_of_b newb i cstr = - let new_lst_recs = mi.lst_recs @ hdMatchSub_cpl b mi.fonc in - (* mise a jour de concl pour l'interieur du case, concl'= concl[b <- C x3 - x2 x1... ], sans quoi les annotations ne sont plus coherentes *) - let cstr_appl,nargs = nth_dep_constructor type_of_b i in - let concl'' = - substitterm 0 (lift nargs b) cstr_appl (lift nargs mi.concl) in - let neweq = mkEq type_of_b newb (popn nargs cstr_appl) in - let concl_dummy = add_n_dummy_prod concl'' nargs in - let lsteqs_rew = apply_eq_leqtrpl mi.lst_eqs neweq in - let new_lsteqs = (mkRel (-nargs),(type_of_b,newb, popn nargs cstr_appl))::lsteqs_rew in - let a',a'' = decompose_lam_n nargs cstr in - let newa'' = - if mi.doeqs - then mkLambda (name_of_string heq_prefix,lift nargs neweq,lift 1 a'') - else a'' in - let newmimick = lamn nargs a' newa'' in - let b',b'' = decompose_prod_n nargs concl_dummy in - let newb'' = - if mi.doeqs - then mkProd (name_of_string heq_prefix,lift nargs neweq,lift 1 b'') - else b'' in - let newconcl = prodn nargs b' newb'' in - let newmi = {mi with mimick=newmimick; concl=newconcl; fix=true; - lst_eqs= new_lsteqs; lst_recs = new_lst_recs} in - proofPrinc newmi - - -and collect_fix mi n iarr narr carr pisarr newabsconcl newenv = - if n >= Array.length iarr then [||],[||],[],[] - else - let nme = Array.get narr n in - let c = Array.get carr n in - (* rappelle sur le sous-terme, on ajoute un niveau de - profondeur (lift) parce que Fix est un binder. *) - let newmi = {mi with concl=(pisarr.(n)); absconcl=newabsconcl; - mimick=c; fonc=(1,((Array.length iarr)));env=newenv;fix=true; - lst_vars=lift1_lvars mi.lst_vars; lst_eqs=lift1_leqs mi.lst_eqs; - lst_recs= lift1L mi.lst_recs;} in - let resrec = proofPrinc newmi in - let lnme,lappel_rec,llevar,llposeq = - collect_fix mi (n+1) iarr narr carr pisarr newabsconcl newenv in - Array.append [|nme|] lnme , Array.append [|resrec.princ|] lappel_rec - , (resrec.evarlist@llevar) , (resrec.hypnum@llposeq) - -let mkevarmap_aux ex = let x,y = ex in (mkevarmap_from_listex x),y - - -(* TODO: deal with any term, not only a constant. *) -let interp_fonc_tacarg fonctac gl = - (* [fonc] is the constr corresponding to fontact not unfolded, - if [fonctac] is a (qualified) name then this is a [const] ?. *) -(* let fonc = constr_of_Constr fonctac in *) - (* TODO: replace the [with _ -> ] by something more precise in - the following. *) - (* [def_fonc] is the definition of fonc. TODO: We should do this only - if [fonc] is a const, and take [fonc] otherwise.*) - try fonctac, pf_const_value gl (destConst fonctac) - with _ -> failwith ("don't know how to deal with this function " - ^"(DEBUG:is it a constante?)") - - - - -(* [invfun_proof fonc def_fonc gl_abstr pis] builds the principle, - following the shape of [def_fonc], [fonc] is the constant - corresponding to [def_func] (or a reduced form of it ?), gl_abstr and - pis are the goal to be proved, of the form [x,y...]g and (x.y...)g. - - This function calls the big function proofPrinc. *) - -let invfun_proof fonc def_fonc gl_abstr pis env sigma = - let mi = {concl=pis; absconcl=gl_abstr; mimick=def_fonc; env=env; - sigma=sigma; nmefonc=fonc; fonc=(0,0); doeqs=true; fix=false ; - lst_vars = []; lst_eqs = []; lst_recs = []} in - proofPrinc mi - -(* Do intros [i] times, then do rewrite on all introduced hyps which are called - like [heq_prefix], FIX: have another filter than the name. *) -let rec iterintro i = - if i<=0 then tclIDTAC else - tclTHEN - (tclTHEN - intro - (iterintro (i-1))) - (fun gl -> - (tclREPEAT - (tclNTH_HYP i - (fun hyp -> - let hypname = (string_of_id (destVar hyp)) in - let sub = - try String.sub hypname 0 (String.length heq_prefix) - with _ -> "" (* different than [heq_prefix] *) in - if sub=heq_prefix then rewriteLR hyp else tclFAIL 0 (str "Cannot rewrite")) - )) gl) - - -(* - (fun hyp gl -> - let _ = prstr ("nthhyp= "^ string_of_int i) in - if isConst hyp && ((name_of_const hyp)==heq_prefix) then - let _ = prstr "YES\n" in - rewriteLR hyp gl - else - let _ = prstr "NO\n" in - tclIDTAC gl) - *) - -(* [invfun_basic C listargs_ids gl dorew lposeq] builds the tactic - which: - \begin{itemize} - \item Do refine on C (the induction principle), - \item try to Clear listargs_ids - \item if boolean dorew is true, then intro all new hypothesis, and - try rewrite on those hypothesis that are equalities. - \end{itemize} -*) - -let invfun_basic open_princ_proof_applied listargs_ids gl dorew lposeq = - (tclTHEN_i - (tclTHEN - (tclTHEN - (* Refine on the right term (following the sheme of the - given function) *) - (fun gl -> refine open_princ_proof_applied gl) - (* Clear the hypothesis given as arguments of the tactic - (because they are generalized) *) - (tclTHEN simpl_in_concl (tclTRY (clear listargs_ids)))) - (* Now we introduce the created hypothesis, and try rewrite on - equalities due to case analysis *) - (fun gl -> (tclIDTAC gl))) - (fun i gl -> - if not dorew then tclIDTAC gl - else - (* d,m,f correspond respectively to vars, induction hyps and - equalities*) - let d,m,f = List.nth lposeq (i-1) in - tclTHEN (iterintro (d)) (tclDO m (tclTRY intro)) gl) - ) - gl - - - - -(* This function trys to reduce instanciated arguments, provided they - are of the form [(C t u v...)] where [C] is a constructor, and - provided that the argument is not the argument of a fixpoint (i.e. the - argument corresponds to a simple lambda) . *) -let rec applistc_iota cstr lcstr env sigma = - match lcstr with - | [] -> cstr,[] - | arg::lcstr' -> - let arghd = - if isApp arg then let x,_ = destApp arg in x else arg in - if isConstruct arghd (* of the form [(C ...)]*) - then - applistc_iota (Tacred.nf env sigma (nf_beta (applistc cstr [arg]))) - lcstr' env sigma - else - try - let nme,typ,suite = destLambda cstr in - let c, l = applistc_iota suite lcstr' env sigma in - mkLambda (nme,typ,c), arg::l - with _ -> cstr,arg::lcstr' (* the arg does not correspond to a lambda*) - - - -(* TODO: ne plus mettre les sous-but à l'exterieur, mais à l'intérieur (le bug - de refine est normalement resolu). Ca permettra 2 choses: d'une part que - les preuves soient plus simple, et d'autre part de fabriquer un terme de - refine qui pourra s'aapliquer SANS FAIRE LES INTROS AVANT, ce qui est bcp - mieux car fonctionne comme induction et plus comme inversion (pas de perte - de connexion entre les hypothèse et les variables). *) - -(*s Tactic that makes induction and case analysis following the shape - of a function (idf) given with arguments (listargs) *) -let invfun c l dorew gl = -(* \begin{itemize} - \item [fonc] = the constant corresponding to the function - (necessary for equalities of the form [(f x1 x2 ...)=...] where - [f] is the recursive function). - \item [def_fonc] = body of the function, where let ins have - been expanded. *) - let fonc, def_fonc' = interp_fonc_tacarg c gl in - let def_fonc'',listargs' = - applistc_iota def_fonc' l (pf_env gl) (project gl) in - let def_fonc = expand_letins def_fonc'' in - (* quantifies on previously generalized arguments. - [(x1:T1)...g[arg1 <- x1 ...]] *) - let pis = add_pis (pf_concl gl) gl listargs' in - (* princ_proof builds the principle *) - let _ = resetmeta() in - let pr = invfun_proof [|fonc|] def_fonc [||] pis (pf_env gl) (project gl) in - (* Generalize the goal. [[x1:T1][x2:T2]... g[arg1 <- x1 ...]]. *) - let gl_abstr' = add_lambdas (pf_concl gl) gl listargs' in - (* apply parameters immediately *) - let gl_abstr = - applistc gl_abstr' (List.map (fun (x,y,z) -> x) (List.rev pr.params)) in - (* we apply args of the fix now, the parameters will be applied later *) - let princ_proof_applied_args = - applistc pr.princ (listsuf (List.length pr.params) listargs') in - (* parameters are still there so patternify must not take them -> lift *) - let princ_proof_applied_lift = - lift (List.length pr.evarlist) princ_proof_applied_args in - let princ_applied_hyps'' = patternify (List.rev pr.evarlist) - princ_proof_applied_lift (Name (id_of_string "Hyp")) in - (* if there was a fix, we will not add "Q" as in funscheme, so we make a pop, - TODO: find were we made the lift in proofPrinc instead and supress it here, - and add lift in funscheme. *) - let princ_applied_hyps' = - if Array.length pr.mutfixmetas > 0 then popn 1 princ_applied_hyps'' - else princ_applied_hyps'' in - (* if there is was fix, we have to replace the meta representing the - predicate of the goal by the abstracted goal itself. *) - let princ_applied_hyps = - if Array.length pr.mutfixmetas > 0 then(* mutual Fixpoint not treated in the tactic*) - (substit_red 0 (pr.mutfixmetas.(0)) gl_abstr princ_applied_hyps') - else princ_applied_hyps' (* No Fixpoint *) in - let _ = prNamedConstr "princ_applied_hyps" princ_applied_hyps in - (* Same thing inside levar *) - let newlevar' = - if Array.length pr.mutfixmetas > 0 then(* mutual Fixpoint not treated in the tactic*) - List.map (fun (x,y) -> x,substit_red 0 (pr.mutfixmetas.(0)) gl_abstr y) pr.evarlist - else pr.evarlist - in - (* replace params metavar by real args *) - let rec replace_parms lparms largs t = - match lparms, largs with - [], _ -> t - | ((p,_,_)::lp), (a::la) -> let t'= substitterm 0 p a t in replace_parms lp la t' - | _, _ -> error "problem with number of args." in - let princ_proof_applied = replace_parms pr.params listargs' princ_applied_hyps in - let _ = prNamedLConstr "levar:" (List.map fst newlevar') in - let _ = prNamedLConstr "levar types:" (List.map snd newlevar') in - let _ = prNamedConstr "princ_proof_applied" princ_proof_applied in - (* replace also in levar *) - let newlevar = - List.rev (List.map (fun (x,y) -> x, replace_parms pr.params listargs' y) newlevar') in -(* - (* replace params metavar by abstracted variables *) - let princ_proof_params = npatternify (List.rev pr.params) princ_applied_hyps in - (* we apply now the real parameters *) - let princ_proof_applied = - applistc princ_proof_params (listpref (List.length pr.params) listargs') in -*) - let princ_applied_evars = apply_levars princ_proof_applied newlevar in - let open_princ_proof_applied = princ_applied_evars in - let _ = prNamedConstr "princ_applied_evars" (snd princ_applied_evars) in - let _ = prNamedLConstr "evars" (List.map snd (fst princ_applied_evars)) in - let listargs_ids = List.map destVar (List.filter isVar listargs') in - (* debug: impression du but*) - let lgl = Evd.to_list (sig_sig gl) in - let _ = prNamedLConstr "\ngl= " (List.map (fun x -> (snd x).evar_concl) lgl) in - let _ = prstr "fin gl \n\n" in - invfun_basic (mkevarmap_aux open_princ_proof_applied) listargs_ids - gl dorew pr.hypnum - -(* function must be a constant, all arguments must be given. *) -let invfun_verif c l dorew gl = - if not (isConst c) then error "given function is not a constant" - else - let x,_ = decompose_prod (pf_type_of gl c) in - if List.length x = List.length l then - try invfun c l dorew gl - with UserError (x,y) -> raise (UserError (x,y)) - else error "wrong number of arguments for the function" - - - - -(* Construction of the functional scheme. *) -let buildFunscheme fonc mutflist = - let def_fonc = expand_letins (def_of_const fonc) in - let ftyp = type_of (Global.env ()) Evd.empty fonc in - let _ = resetmeta() in - let gl = mknewmeta() in - let gl_app = applFull gl ftyp in - let pis = prod_change_concl ftyp gl_app in - (* Here we call the function invfun_proof, that effectively - builds the scheme *) -(* let princ_proof,levar,_,evararr,absc,parms = *) - let _ = prstr "Recherche du principe... lancement de invfun_proof\n" in - let pr = invfun_proof mutflist def_fonc [||] pis (Global.env()) Evd.empty in - (* parameters are still there (unboud rel), and patternify must not take them - -> lift*) - let princ_proof_lift = lift (List.length pr.evarlist) pr.princ in - let princ_proof_hyps = - patternify (List.rev pr.evarlist) princ_proof_lift (Name (id_of_string "Hyp")) in - let rec princ_replace_metas ev abs i t = - if i>= Array.length ev then t - else (* fix? *) - princ_replace_metas ev abs (i+1) - (mkLambda ( - (Name (id_of_string ("Q"^(string_of_int i)))), - prod_change_concl (lift 0 abs.(i)) mkthesort, - (substitterm 0 ev.(i) (mkRel 1) (lift 0 t)))) - in - let rec princ_replace_params params t = - List.fold_left ( - fun acc (ev,nam,typ) -> - mkLambda (Name (id_of_name nam) , typ, - substitterm 0 ev (mkRel 1) (lift 0 acc))) - t (List.rev params) in - if Array.length pr.mutfixmetas = 0 (* Is there a Fixpoint? *) - then (* No Fixpoint *) - princ_replace_params pr.params (mkLambda ((Name (id_of_string "Q")), - prod_change_concl ftyp mkthesort, - (substitterm 0 gl (mkRel 1) princ_proof_hyps))) - else (* there is a fix -> add parameters + replace metas *) - let princ_rpl = - princ_replace_metas pr.mutfixmetas pr.conclarray 0 princ_proof_hyps in - princ_replace_params pr.params princ_rpl - - - -(* Declaration of the functional scheme. *) -let declareFunScheme f fname mutflist = - let _ = prstr "Recherche du perincipe...\n" in - let id_to_cstr id = - try constr_of_id (Global.env()) id - with - Not_found -> error (string_of_id id ^ " not found in the environment") in - let flist = if mutflist=[] then [f] else mutflist in - let fcstrlist = Array.of_list (List.map id_to_cstr flist) in - let idf = id_to_cstr f in - let scheme = buildFunscheme idf fcstrlist in - let _ = prstr "Principe:" in - let _ = prconstr scheme in - let ce = { - const_entry_body = scheme; - const_entry_type = None; - const_entry_opaque = false; - const_entry_boxed = true } in - let _= ignore (declare_constant fname (DefinitionEntry ce,IsDefinition Scheme)) in - () - - - -TACTIC EXTEND functional_induction - [ "old" "functional" "induction" constr(c) ne_constr_list(l) ] - -> [ invfun_verif c l true ] -END - -VERNAC COMMAND EXTEND FunctionalScheme - [ "Old" "Functional" "Scheme" ident(na) ":=" "Induction" "for" - ident(c) "with" ne_ident_list(l) ] - -> [ declareFunScheme c na l ] -| [ "Old" "Functional" "Scheme" ident(na) ":=" "Induction" "for" ident (c) ] - -> [ declareFunScheme c na [] ] -END - - - - - -(* -*** Local Variables: *** -*** compile-command: "make -C ../.. contrib/funind/tacinv.cmo" *** -*** tuareg-default-indent:1 *** -*** tuareg-begin-indent:1 *** -*** tuareg-let-indent:1 *** -*** tuareg-match-indent:-1 *** -*** tuareg-try-indent:1 *** -*** tuareg-with-indent:1 *** -*** tuareg-if-then-else-inden:1 *** -*** fill-column: 78 *** -*** indent-tabs-mode: nil *** -*** test-tactic: "../../bin/coqtop -translate -q -batch -load-vernac-source ../../test-suite/success/Funind.v" *** -*** End: *** -*) - - diff --git a/contrib/funind/tacinvutils.ml b/contrib/funind/tacinvutils.ml deleted file mode 100644 index ce775e0b..00000000 --- a/contrib/funind/tacinvutils.ml +++ /dev/null @@ -1,284 +0,0 @@ -(* tacinvutils.ml *) -(*s utilities *) - -(*i*) -open Names -open Util -open Term -open Termops -open Coqlib -open Pp -open Printer -open Inductiveops -open Environ -open Declarations -open Nameops -open Evd -open Sign -open Reductionops -(*i*) - -(*s printing of constr -- debugging *) - -(* comment this line to see debug msgs *) -let msg x = () ;; let pr_lconstr c = str "" - (* uncomment this to see debugging *) -let prconstr c = msg (str" " ++ pr_lconstr c ++ str"\n") -let prlistconstr lc = List.iter prconstr lc -let prstr s = msg(str s) - -let prchr () = msg (str" (ret) \n") -let prNamedConstr s c = - begin - msg(str ""); - msg(str(s^"==>\n ") ++ pr_lconstr c ++ str "\n<==\n"); - msg(str ""); - end - -let prNamedLConstr_aux lc = - List.iter (prNamedConstr "#>") lc - -let prNamedLConstr s lc = - begin - prstr s; - prNamedLConstr_aux lc - end - - -(* FIXME: ref 1, pas bon, si? *) -let evarcpt = ref 0 -let metacpt = ref 0 -let mknewexist ()= - begin - evarcpt := !evarcpt+1; - !evarcpt,[||] - end - -let resetexist ()= evarcpt := 0 - -let mknewmeta ()= - begin - metacpt := !metacpt+1; - mkMeta (!metacpt) - end - -let resetmeta () = metacpt := 0 - -let rec mkevarmap_from_listex lex = - match lex with - | [] -> Evd.empty - | ((ex,_),typ)::lex' -> -(* let _ = prstr "mkevarmap" in - let _ = prstr ("evar n. " ^ string_of_int ex ^ " ") in - let _ = prstr "OF TYPE: " in - let _ = prconstr typ in*) - let info = { - evar_concl = typ; - evar_hyps = empty_named_context_val; - evar_body = Evar_empty; - evar_extra = None} in - Evd.add (mkevarmap_from_listex lex') ex info - -let mkEq typ c1 c2 = - mkApp (build_coq_eq(),[| typ; c1; c2|]) - -let mkRefl typ c1 = - mkApp ((build_coq_eq_data()).refl, [| typ; c1|]) - -let rec popn i c = if i<=0 then c else pop (popn (i-1) c) - - -(* Operations on names *) -let id_of_name = function - Anonymous -> id_of_string "H" - | Name id -> id;; -let string_of_name nme = string_of_id (id_of_name nme) -let name_of_string str = Name (id_of_string str) -let newname_append nme str = - Name(id_of_string ((string_of_id (id_of_name nme))^str)) - -(* Substitutions in constr *) - -let compare_constr_nosub t1 t2 = - if compare_constr (fun _ _ -> false) t1 t2 - then true - else false - -let rec compare_constr' t1 t2 = - if compare_constr_nosub t1 t2 - then true - else (compare_constr (compare_constr') t1 t2) - -let rec substitterm prof t by_t in_u = - if (compare_constr' (lift prof t) in_u) - then (lift prof by_t) - else map_constr_with_binders succ - (fun i -> substitterm i t by_t) prof in_u - - -let apply_eqtrpl eq t = - let r,(tb,b,by_t) = eq in - substitterm 0 b by_t t - -let apply_eqtrpl_lt lt eq = List.map (apply_eqtrpl eq) lt - -let apply_leqtrpl_t t leq = - List.fold_left (fun x y -> apply_eqtrpl y x) t leq - - -let apply_refl_term eq t = - let _,arr = destApp eq in - let reli= (Array.get arr 1) in - let by_t= (Array.get arr 2) in - substitterm 0 reli by_t t - -let apply_eq_leqtrpl leq eq = - List.map - (function (r,(tb,b,t)) -> - r,(tb, - (if isRel b then b else (apply_refl_term eq b)), apply_refl_term eq t)) - leq - - - -(* [(a b c) a] -> true *) -let constr_head_match u t= - if isApp u - then - let uhd,args= destApp u in - uhd=t - else false - -(* My operations on constr *) -let lift1L l = (List.map (lift 1) l) -let mkArrow_lift t1 t2 = mkArrow t1 (lift 1 t2) -let mkProd_liftc nme c1 c2 = mkProd (nme,c1,(lift 1 c2)) -(* prod_it_lift x [a1 a2 ...] *) -let prod_it_lift ini lcpl = - List.fold_right (function a,b -> (fun c -> mkProd_liftc a b c)) ini lcpl;; - -let prod_it_anonym_lift trm lst = List.fold_right mkArrow_lift lst trm - -let lam_it_anonymous trm lst = - List.fold_right - (fun elt res -> mkLambda(Name(id_of_string "Hrec"),elt,res)) lst trm - -let lambda_id id typeofid cstr = - let cstr' = mkNamedLambda (id_of_string "FUNX") typeofid cstr in - substitterm 0 id (mkRel 0) cstr' - -let prod_id id typeofid cstr = - let cstr' = mkNamedProd (id_of_string "FUNX") typeofid cstr in - substitterm 0 id (mkRel 0) cstr' - - - - - -let nth_dep_constructor indtype n = - let sigma = Evd.empty and env = Global.env() in - let indtypedef = find_rectype env sigma indtype in - let indfam,_ = dest_ind_type indtypedef in - let arr_cstr_summary = get_constructors env indfam in - let cstr_sum = Array.get arr_cstr_summary n in - build_dependent_constructor cstr_sum, cstr_sum.cs_nargs - - -let rec buildrefl_from_eqs eqs = - match eqs with - | [] -> [] - | cstr::eqs' -> - let eq,args = destApp cstr in - (mkRefl (Array.get args 0) (Array.get args 2)) - :: (buildrefl_from_eqs eqs') - - - - -(* list of occurrences of a term inside another *) -(* Cofix will be wrong, not sure Fix is correct too *) -let rec hdMatchSub u t= - let subres = - match kind_of_term u with - | Lambda (nm,tp,cstr) | Prod (nm,tp,cstr) -> hdMatchSub (lift 1 cstr) t - | Fix (_,(lna,tl,bl)) -> - Array.fold_left - (fun acc cstr -> acc @ hdMatchSub (lift (Array.length tl) cstr) t) - [] bl - | LetIn _ -> assert false - (* Correct? *) - | _ -> fold_constr (fun l cstr -> l @ hdMatchSub cstr t) [] u - in - if constr_head_match u t then u :: subres else subres - - -(* let hdMatchSub_list u lt = List.flatten (List.map (hdMatchSub u) lt) *) -let hdMatchSub_cpl u (d,f) = - let res = ref [] in - begin - for i = d to f do res := hdMatchSub u (mkRel i) @ !res done; - !res - end - - -(* destApplication raises an exception if [t] is not an application *) -let exchange_hd_prod subst_hd t = - let hd,args= destApplication t in mkApp (subst_hd,args) - -(* substitute t by by_t in head of products inside in_u, reduces each - product found *) -let rec substit_red prof t by_t in_u = - if constr_head_match in_u (lift prof t) - then - let x = whd_beta (exchange_hd_prod (lift prof by_t) in_u) in - x - else - map_constr_with_binders succ (fun i u -> substit_red i t by_t u) prof in_u - -(* [exchange_reli_arrayi t=(reli x y ...) tarr (d,f)] exchange each - reli by tarr.(f-i). *) -let exchange_reli_arrayi tarr (d,f) t = - let hd,args= destApp t in - let i = destRel hd in - let res = whd_beta (mkApp (tarr.(f-i) ,args)) in - res - -let exchange_reli_arrayi_L tarr (d,f) = - List.map (exchange_reli_arrayi tarr (d,f)) - - -(* expand all letins in a term, before building the principle. *) -let rec expand_letins mimick = - match kind_of_term mimick with - | LetIn(nme,cstr1, typ, cstr) -> - let cstr' = substitterm 0 (mkRel 1) (lift 1 cstr1) cstr in - expand_letins (pop cstr') - | x -> map_constr expand_letins mimick - - -(* Valeur d'une constante, or identity *) -let def_of_const t = - match kind_of_term t with - | Const sp -> - (try - match Global.lookup_constant sp with - {const_body=Some c} -> force c - |_ -> assert false - with _ -> assert false) - | _ -> t - -(* nom d'une constante. Must be a constante. x*) -let name_of_const t = - match (kind_of_term t) with - Const cst -> Names.string_of_label (Names.con_label cst) - |_ -> assert false - ;; - - -(*i -*** Local Variables: -*** compile-command: "make -k tacinvutils.cmo" -*** test-tactic: "../../bin/coqtop -translate -q -batch -load-vernac-source ../../test-suite/success/Funind.v" -*** End: -i*) - diff --git a/contrib/funind/tacinvutils.mli b/contrib/funind/tacinvutils.mli deleted file mode 100644 index 64b21213..00000000 --- a/contrib/funind/tacinvutils.mli +++ /dev/null @@ -1,80 +0,0 @@ -(* tacinvutils.ml *) -(*s utilities *) - -(*i*) -open Termops -open Equality -open Names -open Pp -open Tacmach -open Proof_type -open Tacinterp -open Tactics -open Tacticals -open Term -open Util -open Printer -open Reductionops -open Inductiveops -open Coqlib -open Refine -open Evd -(*i*) - -(* printing debugging *) -val prconstr: constr -> unit -val prlistconstr: constr list -> unit -val prNamedConstr:string -> constr -> unit -val prNamedLConstr:string -> constr list -> unit -val prstr: string -> unit - - -val mknewmeta: unit -> constr -val mknewexist: unit -> existential -val resetmeta: unit -> unit (* safe *) -val resetexist: unit -> unit (* be careful with this one *) -val mkevarmap_from_listex: (Term.existential * Term.types) list -> evar_map -val mkEq: types -> constr -> constr -> constr -(* let mkEq typ c1 c2 = mkApp (build_coq_eq_data.eq(),[| typ; c1; c2|]) *) -val mkRefl: types -> constr -> constr -val buildrefl_from_eqs: constr list -> constr list -(* typ c1 = mkApp ((constant ["Coq"; "Init"; "Logic"] "refl_equal"), [| typ; c1|]) *) - -val nth_dep_constructor: constr -> int -> (constr*int) - -val prod_it_lift: (name*constr) list -> constr -> constr -val prod_it_anonym_lift: constr -> constr list -> constr -val lam_it_anonymous: constr -> constr list -> constr -val lift1L: (constr list) -> constr list -val popn: int -> constr -> constr -val lambda_id: constr -> constr -> constr -> constr -val prod_id: constr -> constr -> constr -> constr - - -val name_of_string : string -> name -val newname_append: name -> string -> name - -val apply_eqtrpl: constr*(constr*constr*constr) -> constr -> constr -val substitterm: int -> constr -> constr -> constr -> constr -val apply_leqtrpl_t: - constr -> (constr*(constr*constr*constr)) list -> constr -val apply_eq_leqtrpl: - (constr*(constr*constr*constr)) list -> constr -> (constr*(constr*constr*constr)) list -(* val apply_leq_lt: constr list -> constr list -> constr list *) - -val hdMatchSub: constr -> constr -> constr list -val hdMatchSub_cpl: constr -> int*int -> constr list -val exchange_hd_prod: constr -> constr -> constr -val exchange_reli_arrayi_L: constr array -> int*int -> constr list -> constr list -val substit_red: int -> constr -> constr -> constr -> constr -val expand_letins: constr -> constr - -val def_of_const: constr -> constr -val name_of_const: constr -> string - -(*i - *** Local Variables: *** - *** compile-command: "make -C ../.. contrib/funind/tacinvutils.cmi" *** - *** End: *** -i*) - diff --git a/contrib/interface/COPYRIGHT b/contrib/interface/COPYRIGHT index 2fb11c6b..23aeb6bb 100644 --- a/contrib/interface/COPYRIGHT +++ b/contrib/interface/COPYRIGHT @@ -1,8 +1,9 @@ (*****************************************************************************) (* *) -(* Coq support for the Pcoq Graphical Interface of Coq *) +(* Coq support for the Pcoq and tmEgg Graphical Interfaces of Coq *) (* *) (* Copyright (C) 1999-2004 INRIA Sophia-Antipolis (Lemme team) *) +(* Copyright (C) 2006,2007 Lionel Elie Mamane *) (* *) (*****************************************************************************) @@ -10,6 +11,9 @@ The current directory contrib/interface implements Coq support for the Pcoq Graphical Interface of Coq. It has been developed by Yves Bertot with contributions from Loïc Pottier and Laurence Rideau. +Modifications by Lionel Elie Mamane for +generalising the protocol to suit other Coq interfaces. + The Pcoq Graphical Interface (see http://www-sop.inria.fr/lemme/pcoq) is developed by the Lemme team at INRIA Sophia-Antipolis (see http://www-sop.inria.fr/lemme) diff --git a/contrib/interface/ascent.mli b/contrib/interface/ascent.mli index ef1d095e..32338523 100644 --- a/contrib/interface/ascent.mli +++ b/contrib/interface/ascent.mli @@ -113,7 +113,6 @@ and ct_COMMAND = | CT_module_type_decl of ct_ID * ct_MODULE_BINDER_LIST * ct_MODULE_TYPE_OPT | CT_no_inline of ct_ID_NE_LIST | CT_omega_flag of ct_OMEGA_MODE * ct_OMEGA_FEATURE - | CT_opaque of ct_ID_NE_LIST | CT_open_scope of ct_ID | CT_print | CT_print_about of ct_ID @@ -189,13 +188,13 @@ and ct_COMMAND = | CT_show_script | CT_show_tree | CT_solve of ct_INT * ct_TACTIC_COM * ct_DOTDOT_OPT + | CT_strategy of ct_LEVEL_LIST | CT_suspend | CT_syntax_macro of ct_ID * ct_FORMULA * ct_INT_OPT | CT_tactic_definition of ct_TAC_DEF_NE_LIST | CT_test_natural_feature of ct_NATURAL_FEATURE * ct_ID | CT_theorem_struct of ct_THEOREM_GOAL * ct_PROOF_SCRIPT | CT_time of ct_COMMAND - | CT_transparent of ct_ID_NE_LIST | CT_undo of ct_INT_OPT | CT_unfocus | CT_unset_option of ct_TABLE @@ -204,6 +203,12 @@ and ct_COMMAND = | CT_user_vernac of ct_ID * ct_VARG_LIST | CT_variable of ct_VAR * ct_BINDER_NE_LIST | CT_write_module of ct_ID * ct_STRING_OPT +and ct_LEVEL_LIST = + CT_level_list of (ct_LEVEL * ct_ID_LIST) list +and ct_LEVEL = + CT_Opaque + | CT_Level of ct_INT + | CT_Expand and ct_COMMAND_LIST = CT_command_list of ct_COMMAND * ct_COMMAND list and ct_COMMENT = diff --git a/contrib/interface/blast.ml b/contrib/interface/blast.ml index dc27cf98..6ec0fac4 100644 --- a/contrib/interface/blast.ml +++ b/contrib/interface/blast.ml @@ -151,7 +151,7 @@ let pp_string x = let unify_e_resolve (c,clenv) gls = let clenv' = connect_clenv gls clenv in let _ = clenv_unique_resolver false clenv' gls in - vernac_e_resolve_constr c gls + Hiddentac.h_simplest_eapply c gls let rec e_trivial_fail_db db_list local_db goal = let tacl = @@ -161,33 +161,36 @@ let rec e_trivial_fail_db db_list local_db goal = let d = pf_last_hyp g' in let hintl = make_resolve_hyp (pf_env g') (project g') d in (e_trivial_fail_db db_list - (Hint_db.add_list hintl local_db) g'))) :: + (add_hint_list hintl local_db) g'))) :: (List.map fst (e_trivial_resolve db_list local_db (pf_concl goal)) ) in tclFIRST (List.map tclCOMPLETE tacl) goal and e_my_find_search db_list local_db hdc concl = let hdc = head_of_constr_reference hdc in + let flags = Auto.auto_unif_flags in let hintl = if occur_existential concl then - list_map_append (Hint_db.map_all hdc) (local_db::db_list) + list_map_append (fun (st, db) -> List.map (fun x -> ({flags with Unification.modulo_delta = st}, x)) + (Hint_db.map_all hdc db)) (local_db::db_list) else - list_map_append (Hint_db.map_auto (hdc,concl)) (local_db::db_list) + list_map_append (fun (st, db) -> List.map (fun x -> ({flags with Unification.modulo_delta = st}, x)) + (Hint_db.map_auto (hdc,concl) db)) (local_db::db_list) in let tac_of_hint = - fun ({pri=b; pat = p; code=t} as _patac) -> + fun (st, ({pri=b; pat = p; code=t} as _patac)) -> (b, let tac = match t with - | Res_pf (term,cl) -> unify_resolve (term,cl) + | Res_pf (term,cl) -> unify_resolve st (term,cl) | ERes_pf (term,cl) -> unify_e_resolve (term,cl) | Give_exact (c) -> e_give_exact_constr c | Res_pf_THEN_trivial_fail (term,cl) -> tclTHEN (unify_e_resolve (term,cl)) (e_trivial_fail_db db_list local_db) - | Unfold_nth c -> unfold_in_concl [[],c] + | Unfold_nth c -> unfold_in_concl [all_occurrences,c] | Extern tacast -> Auto.conclPattern concl - (out_some p) tacast + (Option.get p) tacast in (free_try tac,fmt_autotactic t)) (*i @@ -227,8 +230,8 @@ module MySearchProblem = struct depth : int; (*r depth of search before failing *) tacres : goal list sigma * validation; last_tactic : std_ppcmds; - dblist : Auto.Hint_db.t list; - localdb : Auto.Hint_db.t list } + dblist : Auto.hint_db list; + localdb : Auto.hint_db list } let success s = (sig_it (fst s.tacres)) = [] @@ -242,9 +245,6 @@ module MySearchProblem = struct with e when Logic.catchable_exception e -> filter_tactics (glls,v) tacl - let rec list_addn n x l = - if n = 0 then l else x :: (list_addn (pred n) x l) - (* Ordering of states is lexicographic on depth (greatest first) then number of remaining goals. *) let compare s s' = @@ -279,7 +279,7 @@ module MySearchProblem = struct let hintl = make_resolve_hyp (pf_env g') (project g') (pf_last_hyp g') in - let ldb = Hint_db.add_list hintl (List.hd s.localdb) in + let ldb = add_hint_list hintl (List.hd s.localdb) in { depth = s.depth; tacres = res; last_tactic = pp; dblist = s.dblist; localdb = ldb :: List.tl s.localdb }) @@ -337,7 +337,7 @@ let e_breadth_search debug n db_list local_db gl = with Not_found -> error "EAuto: breadth first search failed" let e_search_auto debug (n,p) db_list gl = - let local_db = make_local_hint_db [] gl in + let local_db = make_local_hint_db true [] gl in if n = 0 then e_depth_search debug p db_list local_db gl else @@ -357,7 +357,7 @@ let full_eauto debug n gl = let dbnames = current_db_names () in let dbnames = list_subtract dbnames ["v62"] in let db_list = List.map searchtable_map dbnames in - let _local_db = make_local_hint_db [] gl in + let _local_db = make_local_hint_db true [] gl in tclTRY (e_search_auto debug n db_list) gl let my_full_eauto n gl = full_eauto false (n,0) gl @@ -375,7 +375,7 @@ let rec trivial_fail_db db_list local_db gl = tclTHEN intro (fun g'-> let hintl = make_resolve_hyp (pf_env g') (project g') (pf_last_hyp g') - in trivial_fail_db db_list (Hint_db.add_list hintl local_db) g') + in trivial_fail_db db_list (add_hint_list hintl local_db) g') in tclFIRST (assumption::intro_tac:: @@ -383,27 +383,29 @@ let rec trivial_fail_db db_list local_db gl = (trivial_resolve db_list local_db (pf_concl gl)))) gl and my_find_search db_list local_db hdc concl = + let flags = Auto.auto_unif_flags in let tacl = if occur_existential concl then - list_map_append (fun db -> Hint_db.map_all hdc db) (local_db::db_list) + list_map_append (fun (st, db) -> List.map (fun x -> {flags with Unification.modulo_delta = st}, x) + (Hint_db.map_all hdc db)) (local_db::db_list) else - list_map_append (fun db -> Hint_db.map_auto (hdc,concl) db) - (local_db::db_list) + list_map_append (fun (st, db) -> List.map (fun x -> {flags with Unification.modulo_delta = st}, x) + (Hint_db.map_auto (hdc,concl) db)) (local_db::db_list) in List.map - (fun ({pri=b; pat=p; code=t} as _patac) -> + (fun (st, {pri=b; pat=p; code=t} as _patac) -> (b, match t with - | Res_pf (term,cl) -> unify_resolve (term,cl) + | Res_pf (term,cl) -> unify_resolve st (term,cl) | ERes_pf (_,c) -> (fun gl -> error "eres_pf") | Give_exact c -> exact_check c | Res_pf_THEN_trivial_fail (term,cl) -> tclTHEN - (unify_resolve (term,cl)) + (unify_resolve st (term,cl)) (trivial_fail_db db_list local_db) - | Unfold_nth c -> unfold_in_concl [[],c] + | Unfold_nth c -> unfold_in_concl [all_occurrences,c] | Extern tacast -> - conclPattern concl (out_some p) tacast)) + conclPattern concl (Option.get p) tacast)) tacl and trivial_resolve db_list local_db cl = @@ -470,11 +472,12 @@ let rec search_gen decomp n db_list local_db extra_sign goal = try [make_apply_entry (pf_env g') (project g') (true,false) - (mkVar hid,body_of_type htyp)] + None + (mkVar hid,htyp)] with Failure _ -> [] in (free_try - (search_gen decomp n db_list (Hint_db.add_list hintl local_db) [d]) + (search_gen decomp n db_list (add_hint_list hintl local_db) [d]) g')) in let rec_tacs = @@ -497,7 +500,7 @@ let full_auto n gl = let dbnames = list_subtract dbnames ["v62"] in let db_list = List.map searchtable_map dbnames in let hyps = pf_hyps gl in - tclTRY (search n db_list (make_local_hint_db [] gl) hyps) gl + tclTRY (search n db_list (make_local_hint_db false [] gl) hyps) gl let default_full_auto gl = full_auto !default_search_depth gl (************************************************************************) diff --git a/contrib/interface/centaur.ml4 b/contrib/interface/centaur.ml4 index 730e055b..a4dc0eac 100644 --- a/contrib/interface/centaur.ml4 +++ b/contrib/interface/centaur.ml4 @@ -1,11 +1,28 @@ (*i camlp4deps: "parsing/grammar.cma" i*) +(* + * This file has been modified by Lionel Elie Mamane + * to implement the following features + * - Terms (optionally) as pretty-printed string and not trees + * - (Optionally) give most commands their usual Coq semantics + * - Add the backtracking information to the status message. + * in the following time period + * - May-November 2006 + * and + * - Make use of new Command.save_hook to generate dependencies at + * save-time. + * in + * - June 2007 + *) + (*Toplevel loop for the communication between Coq and Centaur *) open Names;; open Nameops;; open Util;; open Term;; open Pp;; +open Ppconstr;; +open Prettyp;; open Libnames;; open Libobject;; open Library;; @@ -43,6 +60,7 @@ open Showproof;; open Showproof_ct;; open Tacexpr;; open Vernacexpr;; +open Printer;; let pcoq_started = ref None;; @@ -51,6 +69,11 @@ let if_pcoq f a = let text_proof_flag = ref "en";; +let pcoq_history = ref true;; + +let assert_pcoq_history f a = + if !pcoq_history then f a else error "Pcoq-style history tracking deactivated";; + let current_proof_name () = try string_of_id (get_current_proof_name ()) @@ -85,10 +108,33 @@ let kill_proof_node index = History.border_length (current_proof_name());; +type vtp_tree = + | P_rl of ct_RULE_LIST + | P_r of ct_RULE + | P_s_int of ct_SIGNED_INT_LIST + | P_pl of ct_PREMISES_LIST + | P_cl of ct_COMMAND_LIST + | P_t of ct_TACTIC_COM + | P_text of ct_TEXT + | P_ids of ct_ID_LIST;; + +let print_tree t = + (match t with + | P_rl x -> fRULE_LIST x + | P_r x -> fRULE x + | P_s_int x -> fSIGNED_INT_LIST x + | P_pl x -> fPREMISES_LIST x + | P_cl x -> fCOMMAND_LIST x + | P_t x -> fTACTIC_COM x + | P_text x -> fTEXT x + | P_ids x -> fID_LIST x) + ++ (str "e\nblabla\n");; + + (*Message functions, the text of these messages is recognized by the protocols *) (*of CtCoq *) let ctf_header message_name request_id = - fnl () ++ str "message" ++ fnl() ++ str message_name ++ fnl() ++ + str "message" ++ fnl() ++ str message_name ++ fnl() ++ int request_id ++ fnl();; let ctf_acknowledge_command request_id command_count opt_exn = @@ -97,14 +143,20 @@ let ctf_acknowledge_command request_id command_count opt_exn = let g_count = List.length (fst (frontier (proof_of_pftreestate (get_pftreestate ())))) in - g_count, (min g_count !current_goal_index) + g_count, !current_goal_index else - (0, 0) in + (0, 0) + and statnum = Lib.current_command_label () + and dpth = let d = Pfedit.current_proof_depth() in if d >= 0 then d else 0 + and pending = CT_id_list (List.map xlate_ident (Pfedit.get_all_proof_names())) in (ctf_header "acknowledge" request_id ++ int command_count ++ fnl() ++ int goal_count ++ fnl () ++ int goal_index ++ fnl () ++ str (current_proof_name()) ++ fnl() ++ + int statnum ++ fnl() ++ + print_tree (P_ids pending) ++ + int dpth ++ fnl() ++ (match opt_exn with Some e -> Cerrors.explain_exn e | None -> mt ()) ++ fnl() ++ str "E-n-d---M-e-s-s-a-g-e" ++ fnl ());; @@ -126,6 +178,8 @@ let ctf_PathGoalMessage () = let ctf_GoalReqIdMessage = ctf_header "single_goal_state";; +let ctf_GoalsReqIdMessage = ctf_header "goals_state";; + let ctf_NewStateMessage = ctf_header "fresh_state";; let ctf_SavedMessage () = fnl () ++ str "message" ++ fnl () ++ @@ -153,39 +207,16 @@ let ctf_ResetIdentMessage request_id s = ctf_header "reset_ident" request_id ++ str s ++ fnl () ++ str "E-n-d---M-e-s-s-a-g-e" ++ fnl();; -type vtp_tree = - | P_rl of ct_RULE_LIST - | P_r of ct_RULE - | P_s_int of ct_SIGNED_INT_LIST - | P_pl of ct_PREMISES_LIST - | P_cl of ct_COMMAND_LIST - | P_t of ct_TACTIC_COM - | P_text of ct_TEXT - | P_ids of ct_ID_LIST;; - -let print_tree t = - (match t with - | P_rl x -> fRULE_LIST x - | P_r x -> fRULE x - | P_s_int x -> fSIGNED_INT_LIST x - | P_pl x -> fPREMISES_LIST x - | P_cl x -> fCOMMAND_LIST x - | P_t x -> fTACTIC_COM x - | P_text x -> fTEXT x - | P_ids x -> fID_LIST x); - print_string "e\nblabla\n";; - - let break_happened = ref false;; let output_results stream vtp_tree = let _ = Sys.signal Sys.sigint (Sys.Signal_handle(fun i -> (break_happened := true;()))) in - msg stream; - match vtp_tree with - Some t -> print_tree t - | None -> ();; + msg (stream ++ + (match vtp_tree with + Some t -> print_tree t + | None -> mt()));; let output_results_nl stream = let _ = Sys.signal Sys.sigint @@ -221,20 +252,18 @@ let print_past_goal index = let show_nth n = try - let pf = proof_of_pftreestate (get_pftreestate()) in - if (!text_proof_flag<>"off") then - (if n=0 - then output_results (ctf_TextMessage !global_request_id) - (Some (P_text (show_proof !text_proof_flag []))) - else - let path = History.get_nth_open_path (current_proof_name()) n in - output_results (ctf_TextMessage !global_request_id) - (Some (P_text (show_proof !text_proof_flag path)))) - else - output_results (ctf_GoalReqIdMessage !global_request_id) - (let goal = List.nth (fst (frontier pf)) - (n - 1) in - (Some (P_r (translate_goal goal)))) + output_results (ctf_GoalReqIdMessage !global_request_id + ++ pr_nth_open_subgoal n) + None + with + | Invalid_argument s -> + error "No focused proof (No proof-editing in progress)";; + +let show_subgoals () = + try + output_results (ctf_GoalReqIdMessage !global_request_id + ++ pr_open_subgoals ()) + None with | Invalid_argument s -> error "No focused proof (No proof-editing in progress)";; @@ -275,39 +304,24 @@ let ctf_EmptyGoalMessage id = fnl () ++ str "Empty Goal is a no-op. Fun oh fun." ++ fnl ();; -let print_check judg = - let {uj_val=value; uj_type=typ} = judg in - let value_ct_ast = - (try translate_constr false (Global.env()) value - with UserError(f,str) -> - raise(UserError(f,Printer.pr_lconstr value ++ - fnl () ++ str ))) in - let type_ct_ast = - (try translate_constr false (Global.env()) typ - with UserError(f,str) -> - raise(UserError(f, Printer.pr_lconstr value ++ fnl() ++ str))) in - ((ctf_SearchResults !global_request_id), - (Some (P_pl - (CT_premises_list - [CT_coerce_TYPED_FORMULA_to_PREMISE - (CT_typed_formula(value_ct_ast,type_ct_ast) - )]))));; - -let ct_print_eval ast red_fun env judg = -((if refining() then traverse_to []); -let {uj_val=value; uj_type=typ} = judg in -let nvalue = red_fun value -(* // Attention , ici il faut peut être utiliser des environnemenst locaux *) -and ntyp = nf_betaiota typ in -(ctf_SearchResults !global_request_id, - Some (P_pl - (CT_premises_list - [CT_eval_result - (xlate_formula ast, - translate_constr false env nvalue, - translate_constr false env ntyp)]))));; - - +let print_check env judg = + ((ctf_SearchResults !global_request_id) ++ + print_judgment env judg, + None);; + +let ct_print_eval red_fun env evmap ast judg = + (if refining() then traverse_to []); + let {uj_val=value; uj_type=typ} = judg in + let nvalue = (red_fun env evmap) value + (* // Attention , ici il faut peut être utiliser des environnemenst locaux *) + and ntyp = nf_betaiota typ in + print_tree + (P_pl + (CT_premises_list + [CT_eval_result + (xlate_formula ast, + translate_constr false env nvalue, + translate_constr false env ntyp)]));; let pbp_tac_pcoq = pbp_tac (function (x:raw_tactic_expr) -> @@ -330,6 +344,7 @@ let dad_tac_pcoq = *) let search_output_results () = + (* LEM: See comments for pcoq_search *) output_results (ctf_SearchResults !global_request_id) (Some (P_pl (CT_premises_list @@ -393,7 +408,7 @@ let inspect n = oname, Lib.Leaf lobj -> (match oname, object_tag lobj with (sp,_), "VARIABLE" -> - let (_, _, v) = get_variable (basename sp) in + let (_, _, v) = Global.lookup_named (basename sp) in add_search2 (Nametab.locate (qualid_of_sp sp)) v | (sp,kn), "CONSTANT" -> let typ = Typeops.type_of_constant (Global.env()) (constant_of_kn kn) in @@ -491,19 +506,19 @@ VERNAC COMMAND EXTEND OutputGoal END VERNAC COMMAND EXTEND OutputGoal - [ "Goal" "Cmd" natural(n) "with" tactic(tac) ] -> [ simulate_solve n tac ] + [ "Goal" "Cmd" natural(n) "with" tactic(tac) ] -> [ assert_pcoq_history (simulate_solve n) tac ] END VERNAC COMMAND EXTEND KillProofAfter -| [ "Kill" "Proof" "after" natural(n) ] -> [ kill_node_verbose n ] +| [ "Kill" "Proof" "after" natural(n) ] -> [ assert_pcoq_history kill_node_verbose n ] END VERNAC COMMAND EXTEND KillProofAt -| [ "Kill" "Proof" "at" natural(n) ] -> [ kill_node_verbose n ] +| [ "Kill" "Proof" "at" natural(n) ] -> [ assert_pcoq_history kill_node_verbose n ] END VERNAC COMMAND EXTEND KillSubProof - [ "Kill" "SubProof" natural(n) ] -> [ logical_kill n ] + [ "Kill" "SubProof" natural(n) ] -> [ assert_pcoq_history logical_kill n ] END VERNAC COMMAND EXTEND PcoqReset @@ -515,18 +530,17 @@ VERNAC COMMAND EXTEND PcoqResetInitial END let start_proof_hook () = - History.start_proof (current_proof_name()); + if !pcoq_history then History.start_proof (current_proof_name()); current_goal_index := 1 let solve_hook n = - let name = current_proof_name () in - let old_n_count = History.border_length name in - let pf = proof_of_pftreestate (get_pftreestate ()) in - let n_goals = (List.length (fst (frontier pf))) + 1 - old_n_count in - begin - current_goal_index := n; - History.push_command name n n_goals - end + current_goal_index := n; + if !pcoq_history then + let name = current_proof_name () in + let old_n_count = History.border_length name in + let pf = proof_of_pftreestate (get_pftreestate ()) in + let n_goals = (List.length (fst (frontier pf))) + 1 - old_n_count in + History.push_command name n n_goals let abort_hook s = output_results_nl (ctf_AbortedMessage !global_request_id s) @@ -535,6 +549,12 @@ let interp_search_about_item = function | SearchString s -> GlobSearchString s let pcoq_search s l = + (* LEM: I don't understand why this is done in this way (redoing the + * match on s here) instead of making the code in + * parsing/search.ml call the right function instead of + * "plain_display". Investigates this later. + * TODO + *) ctv_SEARCH_LIST:=[]; begin match s with | SearchAbout sl -> @@ -581,27 +601,25 @@ let hyp_search_pattern c l = (Some (P_pl (CT_premises_list (List.rev !ctv_SEARCH_LIST))));; let pcoq_print_name ref = - let results = xlate_vernac_list (name_to_ast ref) in output_results - (fnl () ++ str "message" ++ fnl () ++ str "PRINT_VALUE" ++ fnl ()) - (Some (P_cl results)) + (fnl () ++ str "message" ++ fnl () ++ str "PRINT_VALUE" ++ fnl () ++ print_name ref ) + None -let pcoq_print_check j = - let a,b = print_check j in output_results a b +let pcoq_print_check env j = + let a,b = print_check env j in output_results a b -let pcoq_print_eval redfun env c j = - let strm, vtp = ct_print_eval c redfun env j in - output_results strm vtp;; +let pcoq_print_eval redfun env evmap c j = + output_results + (ctf_SearchResults !global_request_id + ++ Prettyp.print_eval redfun env evmap c j) + None;; open Vernacentries let pcoq_show_goal = function | Some n -> show_nth n - | None -> - if !pcoq_started = Some true (* = debug *) then - msg (Printer.pr_open_subgoals ()) - else errorlabstrm "show_goal" - (str "Show must be followed by an integer in Centaur mode");; + | None -> show_subgoals () +;; let pcoq_hook = { start_proof = start_proof_hook; @@ -614,6 +632,165 @@ let pcoq_hook = { show_goal = pcoq_show_goal } +let pcoq_term_pr = { + pr_constr_expr = (fun c -> str "pcoq_constr_expr\n" ++ (default_term_pr.pr_constr_expr c)); + (* In future translate_constr false (Global.env()) + * Except with right bool/env which I'll get :) + *) + pr_lconstr_expr = (fun c -> fFORMULA (xlate_formula c) ++ str "(pcoq_lconstr_expr of " ++ (default_term_pr.pr_lconstr_expr c) ++ str ")"); + pr_pattern_expr = (fun c -> str "pcoq_pattern_expr\n" ++ (default_term_pr.pr_pattern_expr c)); + pr_lpattern_expr = (fun c -> str "pcoq_constr_expr\n" ++ (default_term_pr.pr_lpattern_expr c)) +} + +let start_pcoq_trees () = + set_term_pr pcoq_term_pr + +(* BEGIN functions for object_pr *) + +(* These functions in general mirror what name_to_ast does in a subcase, + and then print the corresponding object as a PCoq tree. *) + +let object_to_ast_template object_to_ast_list sp = + let l = object_to_ast_list sp in + VernacList (List.map (fun x -> (dummy_loc, x)) l) + +let pcoq_print_object_template object_to_ast_list sp = + let results = xlate_vernac_list (object_to_ast_template object_to_ast_list sp) in + print_tree (P_cl results) + +(* This function mirror what print_check does *) + +let pcoq_print_typed_value_in_env env (value, typ) = + let value_ct_ast = + (try translate_constr false (Global.env()) value + with UserError(f,str) -> + raise(UserError(f,Printer.pr_lconstr value ++ + fnl () ++ str ))) in + let type_ct_ast = + (try translate_constr false (Global.env()) typ + with UserError(f,str) -> + raise(UserError(f, Printer.pr_lconstr value ++ fnl() ++ str))) in + print_tree + (P_pl + (CT_premises_list + [CT_coerce_TYPED_FORMULA_to_PREMISE + (CT_typed_formula(value_ct_ast,type_ct_ast) + )])) +;; + +(* This function mirrors what show_nth does *) + +let pcoq_pr_subgoal n gl = + try + print_tree + (if (!text_proof_flag<>"off") then + (* This is a horrendeous hack; it ignores the "gl" argument + and just takes the currently focused proof. This will bite + us back one day. + TODO: Fix this. + *) + ( + if not !pcoq_history then error "Text mode requires Pcoq history tracking."; + if n=0 + then (P_text (show_proof !text_proof_flag [])) + else + let path = History.get_nth_open_path (current_proof_name()) n in + (P_text (show_proof !text_proof_flag path))) + else + (let goal = List.nth gl (n - 1) in + (P_r (translate_goal goal)))) + with + | Invalid_argument _ + | Failure "nth" + | Not_found -> error "No such goal";; + +let pcoq_pr_subgoals close_cmd evar gl = + (*LEM: TODO: we should check for evar emptiness or not, and do something *) + try + print_tree + (if (!text_proof_flag<>"off") then + raise (Anomaly ("centaur.ml4:pcoq_pr_subgoals", str "Text mode show all subgoals not implemented")) + else + (P_rl (translate_goals gl))) + with + | Invalid_argument _ + | Failure "nth" + | Not_found -> error "No such goal";; + + +(* END functions for object_pr *) + +let pcoq_object_pr = { + print_inductive = pcoq_print_object_template inductive_to_ast_list; + (* TODO: Check what that with_infos means, and adapt accordingly *) + print_constant_with_infos = pcoq_print_object_template constant_to_ast_list; + print_section_variable = pcoq_print_object_template variable_to_ast_list; + print_syntactic_def = pcoq_print_object_template (fun x -> errorlabstrm "print" + (str "printing of syntax definitions not implemented in PCoq syntax")); + (* TODO: These are placeholders only; write them *) + print_module = (fun x y -> str "pcoq_print_module not implemented"); + print_modtype = (fun x -> str "pcoq_print_modtype not implemented"); + print_named_decl = (fun x -> str "pcoq_print_named_decl not implemented"); + (* TODO: Find out what the first argument x (a bool) is about and react accordingly *) + print_leaf_entry = (fun x -> pcoq_print_object_template leaf_entry_to_ast_list); + print_library_entry = (fun x y -> Some (str "pcoq_print_library_entry not implemented")); + print_context = (fun x y z -> str "pcoq_print_context not implemented"); + print_typed_value_in_env = pcoq_print_typed_value_in_env; + Prettyp.print_eval = ct_print_eval; +};; + +let pcoq_printer_pr = { + pr_subgoals = pcoq_pr_subgoals; + pr_subgoal = pcoq_pr_subgoal; + pr_goal = (fun x -> str "pcoq_pr_goal not implemented"); +};; + + +let start_pcoq_objects () = + set_object_pr pcoq_object_pr; + set_printer_pr pcoq_printer_pr + +let start_default_objects () = + set_object_pr default_object_pr; + set_printer_pr default_printer_pr + +let full_name_of_ref r = + (match r with + | VarRef _ -> str "VAR" + | ConstRef _ -> str "CST" + | IndRef _ -> str "IND" + | ConstructRef _ -> str "CSR") + ++ str " " ++ (pr_sp (Nametab.sp_of_global r)) + (* LEM TODO: Cleanly separate path from id (see Libnames.string_of_path) *) + +let string_of_ref = + (*LEM TODO: Will I need the Var/Const/Ind/Construct info?*) + Depends.o Libnames.string_of_path Nametab.sp_of_global + +let print_depends compute_depends ptree = + output_results (List.fold_left (fun x y -> x ++ (full_name_of_ref y) ++ fnl()) + (str "This object depends on:" ++ fnl()) + (compute_depends ptree)) + None + +let output_depends compute_depends ptree = + (* Using an ident list for that is arguably stretching it, but less effort than touching the vtp types *) + output_results (ctf_header "depends" !global_request_id ++ + print_tree (P_ids (CT_id_list (List.map + (fun x -> CT_ident (string_of_ref x)) + (compute_depends ptree))))) + None + +let gen_start_depends_dumps print_depends print_depends' print_depends'' print_depends''' = + Command.set_declare_definition_hook (print_depends' (Depends.depends_of_definition_entry ~acc:[])); + Command.set_declare_assumption_hook (print_depends (fun (c:types) -> Depends.depends_of_constr c [])); + Command.set_start_hook (print_depends (fun c -> Depends.depends_of_constr c [])); + Command.set_save_hook (print_depends'' (Depends.depends_of_pftreestate Depends.depends_of_pftree)); + Refiner.set_solve_hook (print_depends''' (fun pt -> Depends.depends_of_pftree_head pt [])) + +let start_depends_dumps () = gen_start_depends_dumps output_depends output_depends output_depends output_depends + +let start_depends_dumps_debug () = gen_start_depends_dumps print_depends print_depends print_depends print_depends TACTIC EXTEND pbp | [ "pbp" ident_opt(idopt) natural_list(nl) ] -> @@ -635,7 +812,6 @@ let start_pcoq_mode debug = (* <\cpa> start_dad(); *) - declare_in_coq(); (* The following ones are added to enable rich comments in pcoq *) (* TODO ... add_tactic "Image" (fun _ -> tclIDTAC); @@ -649,6 +825,8 @@ let start_pcoq_mode debug = List.iter (fun (a,b) -> overwriting_vinterp_add a b) non_debug_changes; *) set_pcoq_hook pcoq_hook; + start_pcoq_objects(); + Flags.print_emacs := false; Pp.make_pp_nonemacs(); end;; @@ -681,3 +859,23 @@ END VERNAC COMMAND EXTEND StartPcoqDebug | [ "Start" "Pcoq" "Debug" "Mode" ] -> [ start_pcoq_debug () ] END + +VERNAC COMMAND EXTEND StartPcoqTerms +| [ "Start" "Pcoq" "Trees" ] -> [ start_pcoq_trees () ] +END + +VERNAC COMMAND EXTEND StartPcoqObjects +| [ "Start" "Pcoq" "Objects" ] -> [ start_pcoq_objects () ] +END + +VERNAC COMMAND EXTEND StartDefaultObjects +| [ "Start" "Default" "Objects" ] -> [ start_default_objects () ] +END + +VERNAC COMMAND EXTEND StartDependencyDumps +| [ "Start" "Dependency" "Dumps" ] -> [ start_depends_dumps () ] +END + +VERNAC COMMAND EXTEND StopPcoqHistory +| [ "Stop" "Pcoq" "History" ] -> [ pcoq_history := false ] +END diff --git a/contrib/interface/debug_tac.ml4 b/contrib/interface/debug_tac.ml4 index 890bb3ce..aad3a765 100644 --- a/contrib/interface/debug_tac.ml4 +++ b/contrib/interface/debug_tac.ml4 @@ -113,7 +113,7 @@ let count_subgoals2 let rec local_interp : glob_tactic_expr -> report_holder -> tactic = function TacThens (a,l) -> (fun report_holder -> checked_thens report_holder a l) - | TacThen (a,b) -> + | TacThen (a,[||],b,[||]) -> (fun report_holder -> checked_then report_holder a b) | t -> (fun report_holder g -> @@ -279,7 +279,7 @@ let rec reconstruct_success_tac (tac:glob_tactic_expr) = | Failed n -> TacId [] | Tree_fail r -> reconstruct_success_tac a r | Mismatch (n,p) -> a) - | TacThen (a,b) -> + | TacThen (a,[||],b,[||]) -> (function Report_node(true, n, l) -> tac | Report_node(false, n, rl) -> @@ -340,7 +340,7 @@ Tacinterp.add_tactic "OnThen" on_then;; let rec clean_path tac l = match tac, l with - | TacThen (a,b), fst::tl -> + | TacThen (a,[||],b,[||]), fst::tl -> fst::(clean_path (if fst = 1 then a else b) tl) | TacThens (a,l), 1::tl -> 1::(clean_path a tl) @@ -390,7 +390,7 @@ let rec report_error | t::tl -> (report_error t the_goal the_ast returned_path (n::2::path)):: (fold_num (n + 1) tl) in fold_num 1 l) - | TacThen (a,b) -> + | TacThen (a,[||],b,[||]) -> let the_count = ref 1 in tclTHEN (fun g -> @@ -398,7 +398,7 @@ let rec report_error report_error a the_goal the_ast returned_path (1::path) g with e -> - (the_ast := TacThen (!the_ast, b); + (the_ast := TacThen (!the_ast,[||], b,[||]); raise e)) (fun g -> try diff --git a/contrib/interface/depends.ml b/contrib/interface/depends.ml new file mode 100644 index 00000000..dd40c5cc --- /dev/null +++ b/contrib/interface/depends.ml @@ -0,0 +1,454 @@ +(************************************************************************) +(* v * The Coq Proof Assistant *) +(* *) + +(* This 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 *) +(* Lesser General Public License for more details. *) + +(* You should have received a copy of the GNU Lesser General Public *) +(* License along with this library; if not, write to the Free Software *) +(* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *) +(* MA 02110-1301, USA *) + + +(* LEM TODO: a .mli file *) + +open Refiner +open Proof_type +open Rawterm +open Term +open Libnames +open Util +open Tacexpr +open Entries + +(* DBG utilities, to be removed *) +let print_bool b = print_string (string_of_bool b) +let string_of_ppcmds p = Pp.pp_with Format.str_formatter p; Format.flush_str_formatter() +let acc_str f = List.fold_left (fun a b -> a ^ (f b) ^ "+") "O" +(* End utilities, to be removed *) + +let explore_tree pfs = + print_string "explore_tree called\n"; + print_string "pfs is a top: "; + (* We expect yes. *) + print_string (if (is_top_pftreestate pfs) then "yes" else "no"); + print_newline(); + let rec explain_tree (pt:proof_tree) = + match pt.ref with + | None -> "none" + | Some (Prim p, l) -> "" + | Some (Nested (t,p), l) -> "" + | Some (Decl_proof _, _) -> "Decl_proof" + | Some (Daimon, _) -> "Daimon" + and explain_compound cr = + match cr with + | Tactic (texp, b) -> "Tactic (" ^ (string_of_ppcmds (Tactic_printer.pr_tactic texp)) ^ ", " ^ (string_of_bool b) ^ ")" + | Proof_instr (b, instr) -> "Proof_instr (" ^ (string_of_bool b) ^ (string_of_ppcmds (Tactic_printer.pr_proof_instr instr)) ^ ")" + and explain_prim = function + | Refine c -> "Refine " ^ (string_of_ppcmds (Printer.prterm c)) + | Intro identifier -> "Intro" + | Intro_replacing identifier -> "Intro_replacing" + | Cut (bool, identifier, types) -> "Cut" + | FixRule (identifier, int, l) -> "FixRule" + | Cofix (identifier, l) -> "Cofix" + | Convert_concl (types, cast_kind) -> "Convert_concl" + | Convert_hyp named_declaration -> "Convert_hyp" + | Thin identifier_list -> "Thin" + | ThinBody identifier_list -> "ThinBody" + | Move (bool, identifier, identifier') -> "Move" + | Rename (identifier, identifier') -> "Rename" + | Change_evars -> "Change_evars" + in + let pt = proof_of_pftreestate pfs in + (* We expect 0 *) + print_string "Number of open subgoals: "; + print_int pt.open_subgoals; + print_newline(); + print_string "First rule is a "; + print_string (explain_tree pt); + print_newline() + + +let o f g x = f (g x) +let fst_of_3 (x, _, _) = x +let snd_of_3 (_, x, _) = x +let trd_of_3 (_, _, x) = x + +(* TODO: These for now return a Libnames.global_reference, but a + prooftree will also depend on things like tactic declarations, etc + so we may need a new type for that. *) +let rec depends_of_hole_kind hk acc = match hk with + | Evd.ImplicitArg (gr,_) -> gr::acc + | Evd.TomatchTypeParameter (ind, _) -> (IndRef ind)::acc + | Evd.BinderType _ + | Evd.QuestionMark _ + | Evd.CasesType + | Evd.InternalHole + | Evd.GoalEvar + | Evd.ImpossibleCase -> acc + +let depends_of_'a_cast_type depends_of_'a act acc = match act with + | CastConv (ck, a) -> depends_of_'a a acc + | CastCoerce -> acc + +let depends_of_'a_bindings depends_of_'a ab acc = match ab with + | ImplicitBindings al -> list_union_map depends_of_'a al acc + | ExplicitBindings apl -> list_union_map (fun x y -> depends_of_'a (trd_of_3 x) y) apl acc + | NoBindings -> acc + +let depends_of_'a_with_bindings depends_of_'a (a, ab) acc = + depends_of_'a a (depends_of_'a_bindings depends_of_'a ab acc) + +(* let depends_of_constr_with_bindings = depends_of_'a_with_bindings depends_of_constr *) +(* and depends_of_open_constr_with_bindings = depends_of_'a_with_bindings depends_of_open_let *) + +let depends_of_'a_induction_arg depends_of_'a aia acc = match aia with + | ElimOnConstr a -> depends_of_'a a acc + | ElimOnIdent _ -> + (* TODO: Check that this really refers only to an hypothesis (not a section variable, etc.) + * It *seems* thaat section variables are seen as hypotheses, so we have a problem :-( + + * Plan: Load all section variables before anything in that + * section and call the user's proof script "brittle" and refuse + * to handle if it breaks because of that + *) + acc + | ElimOnAnonHyp _ -> acc + +let depends_of_'a_or_var depends_of_'a aov acc = match aov with + | ArgArg a -> depends_of_'a a acc + | ArgVar _ -> acc + +let depends_of_'a_with_occurences depends_of_'a (_,a) acc = + depends_of_'a a acc + +let depends_of_'a_'b_red_expr_gen depends_of_'a reg acc = match reg with + (* TODO: dirty assumption that the 'b doesn't make any dependency *) + | Red _ + | Hnf + | Cbv _ + | Lazy _ + | Unfold _ + | ExtraRedExpr _ + | CbvVm -> acc + | Simpl awoo -> + Option.fold_right + (depends_of_'a_with_occurences depends_of_'a) + awoo + acc + | Fold al -> list_union_map depends_of_'a al acc + | Pattern awol -> + list_union_map + (depends_of_'a_with_occurences depends_of_'a) + awol + acc + +let depends_of_'a_'b_inversion_strength depends_of_'a is acc = match is with + (* TODO: dirty assumption that the 'b doesn't make any dependency *) + | NonDepInversion _ -> acc + | DepInversion (_, ao, _) -> Option.fold_right depends_of_'a ao acc + | InversionUsing (a, _) -> depends_of_'a a acc + +let depends_of_'a_pexistential depends_of_'a (_, aa) acc = array_union_map depends_of_'a aa acc + +let depends_of_named_vals nvs acc = + (* TODO: I'm stopping here because I have noooo idea what to do with values... *) + acc + +let depends_of_inductive ind acc = (IndRef ind)::acc + +let rec depends_of_constr c acc = match kind_of_term c with + | Rel _ -> acc + | Var id -> (VarRef id)::acc + | Meta _ -> acc + | Evar ev -> depends_of_'a_pexistential depends_of_constr ev acc + | Sort _ -> acc + | Cast (c, _, t) -> depends_of_constr c (depends_of_constr t acc) + | Prod (_, t, t') -> depends_of_constr t (depends_of_constr t' acc) + | Lambda (_, t, c) -> depends_of_constr t (depends_of_constr c acc) + | LetIn (_, c, t, c') -> depends_of_constr c (depends_of_constr t (depends_of_constr c' acc)) + | App (c, ca) -> depends_of_constr c (array_union_map depends_of_constr ca acc) + | Const cnst -> (ConstRef cnst)::acc + | Ind ind -> (IndRef ind)::acc + | Construct cons -> (ConstructRef cons)::acc + | Case (_, c, c', ca) -> depends_of_constr c (depends_of_constr c' (array_union_map depends_of_constr ca acc)) + | Fix (_, (_, ta, ca)) + | CoFix (_, (_, ta, ca)) -> array_union_map depends_of_constr ca (array_union_map depends_of_constr ta acc) +and depends_of_evar_map evm acc = + Evd.fold (fun ev evi -> depends_of_evar_info evi) evm acc +and depends_of_evar_info evi acc = + (* TODO: evi.evar_extra contains a dynamic... Figure out what to do with it. *) + depends_of_constr evi.Evd.evar_concl (depends_of_evar_body evi.Evd.evar_body (depends_of_named_context_val evi.Evd.evar_hyps acc)) +and depends_of_evar_body evb acc = match evb with + | Evd.Evar_empty -> acc + | Evd.Evar_defined c -> depends_of_constr c acc +and depends_of_named_context nc acc = list_union_map depends_of_named_declaration nc acc +and depends_of_named_context_val ncv acc = + depends_of_named_context (Environ.named_context_of_val ncv) (depends_of_named_vals (Environ.named_vals_of_val ncv) acc) +and depends_of_named_declaration (_,co,t) acc = depends_of_constr t (Option.fold_right depends_of_constr co acc) + + + +let depends_of_open_constr (evm,c) acc = + depends_of_constr c (depends_of_evar_map evm acc) + +let rec depends_of_rawconstr rc acc = match rc with + | RRef (_,r) -> r::acc + | RVar (_, id) -> (VarRef id)::acc + | REvar (_, _, rclo) -> Option.fold_right depends_of_rawconstr_list rclo acc + | RPatVar _ -> acc + | RApp (_, rc, rcl) -> depends_of_rawconstr rc (depends_of_rawconstr_list rcl acc) + | RLambda (_, _, _, rct, rcb) + | RProd (_, _, _, rct, rcb) + | RLetIn (_, _, rct, rcb) -> depends_of_rawconstr rcb (depends_of_rawconstr rct acc) + | RCases (_, _, rco, tmt, cc) -> + (* LEM TODO: handle the cc *) + (Option.fold_right depends_of_rawconstr rco + (list_union_map + (fun (rc, pp) acc -> + Option.fold_right (fun (_,ind,_,_) acc -> (IndRef ind)::acc) (snd pp) + (depends_of_rawconstr rc acc)) + tmt + acc)) + | RLetTuple (_,_,(_,rco),rc0,rc1) -> + depends_of_rawconstr rc1 (depends_of_rawconstr rc0 (Option.fold_right depends_of_rawconstr rco acc)) + | RIf (_, rcC, (_, rco), rcT, rcF) -> let dorc = depends_of_rawconstr in + dorc rcF (dorc rcT (dorc rcF (dorc rcC (Option.fold_right dorc rco acc)))) + | RRec (_, _, _, rdla, rca0, rca1) -> let dorca = array_union_map depends_of_rawconstr in + dorca rca0 (dorca rca1 (array_union_map + (list_union_map (fun (_,_,rco,rc) acc -> depends_of_rawconstr rc (Option.fold_right depends_of_rawconstr rco acc))) + rdla + acc)) + | RSort _ -> acc + | RHole (_, hk) -> depends_of_hole_kind hk acc + | RCast (_, rc, rcct) -> depends_of_rawconstr rc (depends_of_'a_cast_type depends_of_rawconstr rcct acc) + | RDynamic (_, dyn) -> failwith "Depends of a dyn not implemented yet" (* TODO: figure out how these dyns are used*) +and depends_of_rawconstr_list l = list_union_map depends_of_rawconstr l + +let depends_of_rawconstr_and_expr (rc, _) acc = + (* TODO Le constr_expr représente le même terme que le rawconstr. Vérifier ça. *) + depends_of_rawconstr rc acc + +let rec depends_of_gen_tactic_expr depends_of_'constr depends_of_'ind depends_of_'tac = + (* TODO: + * Dirty assumptions that the 'id, 'cst, 'ref don't generate dependencies + *) + let rec depends_of_tacexpr texp acc = match texp with + | TacAtom (_, atexpr) -> depends_of_atomic_tacexpr atexpr acc + | TacThen (tac0, taca0, tac1, taca1) -> + depends_of_tacexpr tac0 (array_union_map depends_of_tacexpr taca0 (depends_of_tacexpr tac1 (array_union_map depends_of_tacexpr taca1 acc))) + | TacThens (tac, tacl) -> + depends_of_tacexpr tac (list_union_map depends_of_tacexpr tacl acc) + | TacFirst tacl -> list_union_map depends_of_tacexpr tacl acc + | TacComplete tac -> depends_of_tacexpr tac acc + | TacSolve tacl -> list_union_map depends_of_tacexpr tacl acc + | TacTry tac -> depends_of_tacexpr tac acc + | TacOrelse (tac0, tac1) -> depends_of_tacexpr tac0 (depends_of_tacexpr tac1 acc) + | TacDo (_, tac) -> depends_of_tacexpr tac acc + | TacRepeat tac -> depends_of_tacexpr tac acc + | TacProgress tac -> depends_of_tacexpr tac acc + | TacAbstract (tac, _) -> depends_of_tacexpr tac acc + | TacId _ + | TacFail _ -> acc + | TacInfo tac -> depends_of_tacexpr tac acc + | TacLetIn (_, igtal, tac) -> + depends_of_tacexpr + tac + (list_union_map + (fun x y -> depends_of_tac_arg (snd x) y) + igtal + acc) + | TacMatch (_, tac, tacexpr_mrl) -> failwith "depends_of_tacexpr of a Match not implemented yet" + | TacMatchContext (_, _, tacexpr_mrl) -> failwith "depends_of_tacexpr of a Match Context not implemented yet" + | TacFun tacfa -> depends_of_tac_fun_ast tacfa acc + | TacArg tacarg -> depends_of_tac_arg tacarg acc + and depends_of_atomic_tacexpr atexpr acc = let depends_of_'constr_with_bindings = depends_of_'a_with_bindings depends_of_'constr in match atexpr with + (* Basic tactics *) + | TacIntroPattern _ + | TacIntrosUntil _ + | TacIntroMove _ + | TacAssumption -> acc + | TacExact c + | TacExactNoCheck c + | TacVmCastNoCheck c -> depends_of_'constr c acc + | TacApply (_, _, cb) -> depends_of_'constr_with_bindings cb acc + | TacElim (_, cwb, cwbo) -> + depends_of_'constr_with_bindings cwb + (Option.fold_right depends_of_'constr_with_bindings cwbo acc) + | TacElimType c -> depends_of_'constr c acc + | TacCase (_, cb) -> depends_of_'constr_with_bindings cb acc + | TacCaseType c -> depends_of_'constr c acc + | TacFix _ + | TacMutualFix _ + | TacCofix _ + | TacMutualCofix _ -> failwith "depends_of_atomic_tacexpr of a Tac(Mutual)(Co)Fix not implemented yet" + | TacCut c -> depends_of_'constr c acc + | TacAssert (taco, _, c) -> + Option.fold_right depends_of_'tac taco (depends_of_'constr c acc) + | TacGeneralize cl -> + list_union_map depends_of_'constr (List.map (fun ((_,c),_) -> c) cl) + acc + | TacGeneralizeDep c -> depends_of_'constr c acc + | TacLetTac (_,c,_,_) -> depends_of_'constr c acc + + (* Derived basic tactics *) + | TacSimpleInduction _ + | TacSimpleDestruct _ + | TacDoubleInduction _ -> acc + | TacNewInduction (_, cwbial, cwbo, _, _) + | TacNewDestruct (_, cwbial, cwbo, _, _) -> + list_union_map (depends_of_'a_induction_arg depends_of_'constr_with_bindings) + cwbial + (Option.fold_right depends_of_'constr_with_bindings cwbo acc) + | TacDecomposeAnd c + | TacDecomposeOr c -> depends_of_'constr c acc + | TacDecompose (il, c) -> depends_of_'constr c (list_union_map depends_of_'ind il acc) + | TacSpecialize (_,cwb) -> depends_of_'constr_with_bindings cwb acc + | TacLApply c -> depends_of_'constr c acc + + (* Automation tactics *) + | TacTrivial (cl, bs) -> + (* TODO: Maybe make use of bs: list of hint bases to be used. *) + list_union_map depends_of_'constr cl acc + | TacAuto (_, cs, bs) -> + (* TODO: Maybe make use of bs: list of hint bases to be used. + None -> all ("with *") + Some list -> a list, "core" added implicitly *) + list_union_map depends_of_'constr cs acc + | TacAutoTDB _ -> acc + | TacDestructHyp _ -> acc + | TacDestructConcl -> acc + | TacSuperAuto _ -> (* TODO: this reference thing is scary*) + acc + | TacDAuto _ -> acc + + (* Context management *) + | TacClear _ + | TacClearBody _ + | TacMove _ + | TacRename _ + | TacRevert _ -> acc + + (* Constructors *) + | TacLeft (_,cb) + | TacRight (_,cb) + | TacSplit (_, _, cb) + | TacConstructor (_, _, cb) -> depends_of_'a_bindings depends_of_'constr cb acc + | TacAnyConstructor (_,taco) -> Option.fold_right depends_of_'tac taco acc + + (* Conversion *) + | TacReduce (reg,_) -> + depends_of_'a_'b_red_expr_gen depends_of_'constr reg acc + | TacChange (cwoo, c, _) -> + depends_of_'constr + c + (Option.fold_right (depends_of_'a_with_occurences depends_of_'constr) cwoo acc) + + (* Equivalence relations *) + | TacReflexivity + | TacSymmetry _ -> acc + | TacTransitivity c -> depends_of_'constr c acc + + (* Equality and inversion *) + | TacRewrite (_,cbl,_,_) -> list_union_map (o depends_of_'constr_with_bindings (fun (_,_,x)->x)) cbl acc + | TacInversion (is, _) -> depends_of_'a_'b_inversion_strength depends_of_'constr is acc + + (* For ML extensions *) + | TacExtend (_, _, cgal) -> failwith "depends of TacExtend not implemented because depends of a generic_argument not implemented" + + (* For syntax extensions *) + | TacAlias (_,_,gal,(_,gte)) -> failwith "depends of a TacAlias not implemented because depends of a generic_argument not implemented" + and depends_of_tac_fun_ast tfa acc = failwith "depend_of_tac_fun_ast not implemented yet" + and depends_of_tac_arg ta acc = match ta with + | TacDynamic (_,d) -> failwith "Don't know what to do with a Dyn in tac_arg" + | TacVoid -> acc + | MetaIdArg _ -> failwith "Don't know what to do with a MetaIdArg in tac_arg" + | ConstrMayEval me -> failwith "TODO: depends_of_tac_arg of a ConstrMayEval" + | IntroPattern _ -> acc + | Reference ltc -> acc (* TODO: This assumes the "ltac constant" cannot somehow refer to a named object... *) + | Integer _ -> acc + | TacCall (_,ltc,l) -> (* TODO: This assumes the "ltac constant" cannot somehow refer to a named object... *) + list_union_map depends_of_tac_arg l acc + | TacExternal (_,_,_,l) -> list_union_map depends_of_tac_arg l acc + | TacFreshId _ -> acc + | Tacexp tac -> + depends_of_'tac tac acc + in + depends_of_tacexpr + +let rec depends_of_glob_tactic_expr (gte:glob_tactic_expr) acc = + depends_of_gen_tactic_expr + depends_of_rawconstr_and_expr + (depends_of_'a_or_var depends_of_inductive) + depends_of_glob_tactic_expr + gte + acc + +let rec depends_of_tacexpr te acc = + depends_of_gen_tactic_expr + depends_of_open_constr + depends_of_inductive + depends_of_glob_tactic_expr + te + acc + +let depends_of_compound_rule cr acc = match cr with + | Tactic (texp, _) -> depends_of_tacexpr texp acc + | Proof_instr (b, instr) -> + (* TODO: What is the boolean b? Should check. *) + failwith "Dependency calculation of Proof_instr not implemented yet" +and depends_of_prim_rule pr acc = match pr with + | Refine c -> depends_of_constr c acc + | Intro id -> acc + | Intro_replacing id -> acc + | Cut (_, _, t) -> depends_of_constr t acc (* TODO: check what 2nd argument contains *) + | FixRule (_, _, l) -> list_union_map (o depends_of_constr trd_of_3) l acc (* TODO: check what the arguments contain *) + | Cofix (_, l) -> list_union_map (o depends_of_constr snd) l acc (* TODO: check what the arguments contain *) + | Convert_concl (t, _) -> depends_of_constr t acc + | Convert_hyp (_, None, t) -> depends_of_constr t acc + | Convert_hyp (_, (Some c), t) -> depends_of_constr c (depends_of_constr t acc) + | Thin _ -> acc + | ThinBody _ -> acc + | Move _ -> acc + | Rename _ -> acc + | Change_evars -> acc + +let rec depends_of_pftree pt acc = + match pt.ref with + | None -> acc + | Some (Prim pr , l) -> depends_of_prim_rule pr (list_union_map depends_of_pftree l acc) + | Some (Nested (t, p), l) -> depends_of_compound_rule t (depends_of_pftree p (list_union_map depends_of_pftree l acc)) + | Some (Decl_proof _ , l) -> list_union_map depends_of_pftree l acc + | Some (Daimon, l) -> list_union_map depends_of_pftree l acc + +let rec depends_of_pftree_head pt acc = + match pt.ref with + | None -> acc + | Some (Prim pr , l) -> depends_of_prim_rule pr acc + | Some (Nested (t, p), l) -> depends_of_compound_rule t (depends_of_pftree p acc) + | Some (Decl_proof _ , l) -> acc + | Some (Daimon, l) -> acc + +let depends_of_pftreestate depends_of_pftree pfs = +(* print_string "depends_of_pftreestate called\n"; *) +(* explore_tree pfs; *) + let pt = proof_of_pftreestate pfs in + assert (is_top_pftreestate pfs); + assert (pt.open_subgoals = 0); + depends_of_pftree pt [] + +let depends_of_definition_entry de ~acc = + Option.fold_right + depends_of_constr + de.const_entry_type + (depends_of_constr de.const_entry_body acc) diff --git a/contrib/interface/name_to_ast.ml b/contrib/interface/name_to_ast.ml index 9a503cfb..6b17e739 100644 --- a/contrib/interface/name_to_ast.ml +++ b/contrib/interface/name_to_ast.ml @@ -28,7 +28,7 @@ let convert_env = let convert_binder env (na, b, c) = match b with | Some b -> LocalRawDef ((dummy_loc,na), extern_constr true env b) - | None -> LocalRawAssum ([dummy_loc,na], extern_constr true env c) in + | None -> LocalRawAssum ([dummy_loc,na], default_binder_kind, extern_constr true env c) in let rec cvrec env = function [] -> [] | b::rest -> (convert_binder env b)::(cvrec (push_rel b env) rest) in @@ -134,14 +134,14 @@ let implicits_to_ast_list implicits = let make_variable_ast name typ implicits = (VernacAssumption - ((Local,Definitional), - [false,([dummy_loc,name], constr_to_ast (body_of_type typ))])) + ((Local,Definitional),false,(*inline flag*) + [false,([dummy_loc,name], constr_to_ast typ)])) ::(implicits_to_ast_list implicits);; let make_definition_ast name c typ implicits = - VernacDefinition ((Global,false,Definition), (dummy_loc,name), DefineBody ([], None, - (constr_to_ast c), Some (constr_to_ast (body_of_type typ))), + VernacDefinition ((Global,false,Definition), (dummy_loc,name), + DefineBody ([], None, constr_to_ast c, Some (constr_to_ast typ)), (fun _ _ -> ())) ::(implicits_to_ast_list implicits);; @@ -158,7 +158,7 @@ let constant_to_ast_list kn = make_definition_ast (id_of_label (con_label kn)) (Declarations.force c1) typ l) let variable_to_ast_list sp = - let (id, c, v) = get_variable sp in + let (id, c, v) = Global.lookup_named sp in let l = implicits_of_global (VarRef sp) in (match c with None -> diff --git a/contrib/interface/name_to_ast.mli b/contrib/interface/name_to_ast.mli index b8c2d7dc..f9e83b5e 100644 --- a/contrib/interface/name_to_ast.mli +++ b/contrib/interface/name_to_ast.mli @@ -1 +1,5 @@ val name_to_ast : Libnames.reference -> Vernacexpr.vernac_expr;; +val inductive_to_ast_list : Names.mutual_inductive -> Vernacexpr.vernac_expr list;; +val constant_to_ast_list : Names.constant -> Vernacexpr.vernac_expr list;; +val variable_to_ast_list : Names.variable -> Vernacexpr.vernac_expr list;; +val leaf_entry_to_ast_list : (Libnames.section_path * Names.mutual_inductive) * Libobject.obj -> Vernacexpr.vernac_expr list;; diff --git a/contrib/interface/parse.ml b/contrib/interface/parse.ml index 8cca7614..bf8614b4 100644 --- a/contrib/interface/parse.ml +++ b/contrib/interface/parse.ml @@ -21,18 +21,19 @@ type parsed_tree = | P_i of ct_INT;; let print_parse_results n msg = - print_string "message\nparsed\n"; - print_int n; - print_string "\n"; - (match msg with - | P_cl x -> fCOMMAND_LIST x - | P_c x -> fCOMMAND x - | P_t x -> fTACTIC_COM x - | P_f x -> fFORMULA x - | P_id x -> fID x - | P_s x -> fSTRING x - | P_i x -> fINT x); - print_string "e\nblabla\n"; + Pp.msg + ( str "message\nparsed\n" ++ + int n ++ + str "\n" ++ + (match msg with + | P_cl x -> fCOMMAND_LIST x + | P_c x -> fCOMMAND x + | P_t x -> fTACTIC_COM x + | P_f x -> fFORMULA x + | P_id x -> fID x + | P_s x -> fSTRING x + | P_i x -> fINT x) ++ + str "e\nblabla\n"); flush stdout;; let ctf_SyntaxErrorMessage reqid pps = @@ -329,7 +330,7 @@ let add_path_action reqid string_arg = let print_version_action () = msgnl (mt ()); - msgnl (str "$Id: parse.ml 9397 2006-11-21 21:50:54Z herbelin $");; + msgnl (str "$Id: parse.ml 9476 2007-01-10 15:44:44Z lmamane $");; let load_syntax_action reqid module_name = msg (str "loading " ++ str module_name ++ str "... "); diff --git a/contrib/interface/pbp.ml b/contrib/interface/pbp.ml index d2f71bfc..06b957d9 100644 --- a/contrib/interface/pbp.ml +++ b/contrib/interface/pbp.ml @@ -156,29 +156,29 @@ let make_pbp_pattern x = let rec make_then = function | [] -> TacId [] | [t] -> t - | t1::t2::l -> make_then (TacThen (t1,t2)::l) + | t1::t2::l -> make_then (TacThen (t1,[||],t2,[||])::l) let make_pbp_atomic_tactic = function | PbpTryAssumption None -> TacTry (TacAtom (zz, TacAssumption)) | PbpTryAssumption (Some a) -> TacTry (TacAtom (zz, TacExact (make_var a))) | PbpExists x -> - TacAtom (zz, TacSplit (true,ImplicitBindings [make_pbp_pattern x])) + TacAtom (zz, TacSplit (false,true,ImplicitBindings [make_pbp_pattern x])) | PbpGeneralize (h,args) -> let l = List.map make_pbp_pattern args in - TacAtom (zz, TacGeneralize [make_app (make_var h) l]) - | PbpLeft -> TacAtom (zz, TacLeft NoBindings) - | PbpRight -> TacAtom (zz, TacRight NoBindings) + TacAtom (zz, TacGeneralize [((true,[]),make_app (make_var h) l),Anonymous]) + | PbpLeft -> TacAtom (zz, TacLeft (false,NoBindings)) + | PbpRight -> TacAtom (zz, TacRight (false,NoBindings)) | PbpIntros l -> TacAtom (zz, TacIntroPattern l) | PbpLApply h -> TacAtom (zz, TacLApply (make_var h)) - | PbpApply h -> TacAtom (zz, TacApply (make_var h,NoBindings)) + | PbpApply h -> TacAtom (zz, TacApply (true,false,(make_var h,NoBindings))) | PbpElim (hyp_name, names) -> let bind = List.map (fun s ->(zz,NamedHyp s,make_pbp_pattern s)) names in TacAtom - (zz, TacElim ((make_var hyp_name,ExplicitBindings bind),None)) + (zz, TacElim (false,(make_var hyp_name,ExplicitBindings bind),None)) | PbpTryClear l -> TacTry (TacAtom (zz, TacClear (false,List.map (fun s -> AI (zz,s)) l))) - | PbpSplit -> TacAtom (zz, TacSplit (false,NoBindings));; + | PbpSplit -> TacAtom (zz, TacSplit (false,false,NoBindings));; let rec make_pbp_tactic = function | PbpThen tl -> make_then (List.map make_pbp_atomic_tactic tl) diff --git a/contrib/interface/showproof.ml b/contrib/interface/showproof.ml index 4bec7350..953fb5e7 100644 --- a/contrib/interface/showproof.ml +++ b/contrib/interface/showproof.ml @@ -166,7 +166,7 @@ let rule_to_ntactic r = let rt = (match r with Nested(Tactic (t,_),_) -> t - | Prim (Refine h) -> TacAtom (dummy_loc,TacExact h) + | Prim (Refine h) -> TacAtom (dummy_loc,TacExact (Tactics.inj_open h)) | _ -> TacAtom (dummy_loc, TacIntroPattern [])) in if rule_is_complex r then (match rt with @@ -1183,8 +1183,8 @@ let rec natural_ntree ig ntree = TacIntroPattern _ -> natural_intros ig lh g gs ltree | TacIntroMove _ -> natural_intros ig lh g gs ltree | TacFix (_,n) -> natural_fix ig lh g gs n ltree - | TacSplit (_,NoBindings) -> natural_split ig lh g gs ge [] ltree - | TacSplit(_,ImplicitBindings l) -> natural_split ig lh g gs ge l ltree + | TacSplit (_,_,NoBindings) -> natural_split ig lh g gs ge [] ltree + | TacSplit(_,_,ImplicitBindings l) -> natural_split ig lh g gs ge (List.map snd l) ltree | TacGeneralize l -> natural_generalize ig lh g gs ge l ltree | TacRight _ -> natural_right ig lh g gs ltree | TacLeft _ -> natural_left ig lh g gs ltree @@ -1202,17 +1202,18 @@ let rec natural_ntree ig ntree = | TacExtend (_,"InductionIntro",[a]) -> let id=(out_gen wit_ident a) in natural_induction ig lh g gs ge id ltree true - | TacApply (c,_) -> natural_apply ig lh g gs c ltree - | TacExact c -> natural_exact ig lh g gs c ltree - | TacCut c -> natural_cut ig lh g gs c ltree + | TacApply (_,false,(c,_)) -> natural_apply ig lh g gs (snd c) ltree + | TacExact c -> natural_exact ig lh g gs (snd c) ltree + | TacCut c -> natural_cut ig lh g gs (snd c) ltree | TacExtend (_,"CutIntro",[a]) -> let _c = out_gen wit_constr a in natural_cutintro ig lh g gs a ltree - | TacCase (c,_) -> natural_case ig lh g gs ge c ltree false + | TacCase (_,(c,_)) -> natural_case ig lh g gs ge (snd c) ltree false | TacExtend (_,"CaseIntro",[a]) -> let c = out_gen wit_constr a in natural_case ig lh g gs ge c ltree true - | TacElim ((c,_),_) -> natural_elim ig lh g gs ge c ltree false + | TacElim (_,(c,_),_) -> + natural_elim ig lh g gs ge (snd c) ltree false | TacExtend (_,"ElimIntro",[a]) -> let c = out_gen wit_constr a in natural_elim ig lh g gs ge c ltree true @@ -1611,7 +1612,7 @@ and natural_fix ig lh g gs narg ltree = | _ -> assert false and natural_reduce ig lh g gs ge mode la ltree = match la with - {onhyps=Some[];onconcl=true} -> + {onhyps=Some[]} when la.concl_occs <> no_occurrences_expr -> spv [ (natural_lhyp lh ig.ihsg); (show_goal2 lh ig g gs ""); @@ -1619,7 +1620,7 @@ and natural_reduce ig lh g gs ge mode la ltree = {ihsg=All_subgoals_hyp;isgintro="simpl"}) ltree) ] - | {onhyps=Some[hyp]; onconcl=false} -> + | {onhyps=Some[hyp]} when la.concl_occs = no_occurrences_expr -> spv [ (natural_lhyp lh ig.ihsg); (show_goal2 lh ig g gs ""); @@ -1651,7 +1652,7 @@ and natural_split ig lh g gs ge la ltree = | _ -> assert false and natural_generalize ig lh g gs ge la ltree = match la with - [arg] -> + [(_,(_,arg)),_] -> let _env= (gLOB ge) in let arg1= (*dbize env*) arg in let _type_arg=type_of (Global.env()) Evd.empty arg in diff --git a/contrib/interface/translate.ml b/contrib/interface/translate.ml index 6e4782be..559860b2 100644 --- a/contrib/interface/translate.ml +++ b/contrib/interface/translate.ml @@ -75,3 +75,6 @@ let translate_path l = (*translates a path and a goal into a centaur-tree --> RULE *) let translate_goal (g:goal) = CT_rule(translate_sign (evar_env g), translate_constr true (evar_env g) g.evar_concl);; + +let translate_goals (gl: goal list) = + CT_rule_list (List.map translate_goal gl);; diff --git a/contrib/interface/translate.mli b/contrib/interface/translate.mli index 65d8331b..34841fc4 100644 --- a/contrib/interface/translate.mli +++ b/contrib/interface/translate.mli @@ -5,6 +5,7 @@ open Environ;; open Term;; val translate_goal : goal -> ct_RULE;; +val translate_goals : goal list -> ct_RULE_LIST;; (* The boolean argument indicates whether names from the environment should *) (* be avoided (same interpretation as for prterm_env and ast_of_constr) *) val translate_constr : bool -> env -> constr -> ct_FORMULA;; diff --git a/contrib/interface/vtp.ml b/contrib/interface/vtp.ml index 166a0cbf..551ad3a3 100644 --- a/contrib/interface/vtp.ml +++ b/contrib/interface/vtp.ml @@ -1,103 +1,108 @@ open Ascent;; +open Pp;; + +(* LEM: This is actually generated automatically *) let fNODE s n = - print_string "n\n"; - print_string ("vernac$" ^ s); - print_string "\n"; - print_int n; - print_string "\n";; + (str "n\n") ++ + (str ("vernac$" ^ s)) ++ + (str "\n") ++ + (int n) ++ + (str "\n");; let fATOM s1 = - print_string "a\n"; - print_string ("vernac$" ^ s1); - print_string "\n";; + (str "a\n") ++ + (str ("vernac$" ^ s1)) ++ + (str "\n");; -let f_atom_string = print_string;; -let f_atom_int = print_int;; +let f_atom_string = str;; +let f_atom_int = int;; let rec fAST = function | CT_coerce_ID_OR_INT_to_AST x -> fID_OR_INT x | CT_coerce_ID_OR_STRING_to_AST x -> fID_OR_STRING x | CT_coerce_SINGLE_OPTION_VALUE_to_AST x -> fSINGLE_OPTION_VALUE x | CT_astnode(x1, x2) -> - fID x1; - fAST_LIST x2; + fID x1 ++ + fAST_LIST x2 ++ fNODE "astnode" 2 | CT_astpath(x1) -> - fID_LIST x1; + fID_LIST x1 ++ fNODE "astpath" 1 | CT_astslam(x1, x2) -> - fID_OPT x1; - fAST x2; + fID_OPT x1 ++ + fAST x2 ++ fNODE "astslam" 2 and fAST_LIST = function | CT_ast_list l -> - (List.iter fAST l); + (List.fold_left (++) (mt()) (List.map fAST l)) ++ fNODE "ast_list" (List.length l) and fBINARY = function -| CT_binary x -> fATOM "binary"; - (f_atom_int x); - print_string "\n"and fBINDER = function +| CT_binary x -> fATOM "binary" ++ + (f_atom_int x) ++ + str "\n" +and fBINDER = function | CT_coerce_DEF_to_BINDER x -> fDEF x | CT_binder(x1, x2) -> - fID_OPT_NE_LIST x1; - fFORMULA x2; + fID_OPT_NE_LIST x1 ++ + fFORMULA x2 ++ fNODE "binder" 2 | CT_binder_coercion(x1, x2) -> - fID_OPT_NE_LIST x1; - fFORMULA x2; + fID_OPT_NE_LIST x1 ++ + fFORMULA x2 ++ fNODE "binder_coercion" 2 and fBINDER_LIST = function | CT_binder_list l -> - (List.iter fBINDER l); + (List.fold_left (++) (mt()) (List.map fBINDER l)) ++ fNODE "binder_list" (List.length l) and fBINDER_NE_LIST = function | CT_binder_ne_list(x,l) -> - fBINDER x; - (List.iter fBINDER l); + fBINDER x ++ + (List.fold_left (++) (mt()) (List.map fBINDER l)) ++ fNODE "binder_ne_list" (1 + (List.length l)) and fBINDING = function | CT_binding(x1, x2) -> - fID_OR_INT x1; - fFORMULA x2; + fID_OR_INT x1 ++ + fFORMULA x2 ++ fNODE "binding" 2 and fBINDING_LIST = function | CT_binding_list l -> - (List.iter fBINDING l); + (List.fold_left (++) (mt()) (List.map fBINDING l)) ++ fNODE "binding_list" (List.length l) and fBOOL = function | CT_false -> fNODE "false" 0 | CT_true -> fNODE "true" 0 and fCASE = function -| CT_case x -> fATOM "case"; - (f_atom_string x); - print_string "\n"and fCLAUSE = function +| CT_case x -> fATOM "case" ++ + (f_atom_string x) ++ + str "\n" +and fCLAUSE = function | CT_clause(x1, x2) -> - fHYP_LOCATION_LIST_OR_STAR x1; - fSTAR_OPT x2; + fHYP_LOCATION_LIST_OR_STAR x1 ++ + fSTAR_OPT x2 ++ fNODE "clause" 2 and fCOERCION_OPT = function | CT_coerce_NONE_to_COERCION_OPT x -> fNONE x | CT_coercion_atm -> fNODE "coercion_atm" 0 and fCOFIXTAC = function | CT_cofixtac(x1, x2) -> - fID x1; - fFORMULA x2; + fID x1 ++ + fFORMULA x2 ++ fNODE "cofixtac" 2 and fCOFIX_REC = function | CT_cofix_rec(x1, x2, x3, x4) -> - fID x1; - fBINDER_LIST x2; - fFORMULA x3; - fFORMULA x4; + fID x1 ++ + fBINDER_LIST x2 ++ + fFORMULA x3 ++ + fFORMULA x4 ++ fNODE "cofix_rec" 4 and fCOFIX_REC_LIST = function | CT_cofix_rec_list(x,l) -> - fCOFIX_REC x; - (List.iter fCOFIX_REC l); + fCOFIX_REC x ++ + (List.fold_left (++) (mt()) (List.map fCOFIX_REC l)) ++ fNODE "cofix_rec_list" (1 + (List.length l)) and fCOFIX_TAC_LIST = function | CT_cofix_tac_list l -> - (List.iter fCOFIXTAC l); + (List.fold_left (++) (mt()) (List.map fCOFIXTAC l)) ++ fNODE "cofix_tac_list" (List.length l) and fCOMMAND = function | CT_coerce_COMMAND_LIST_to_COMMAND x -> fCOMMAND_LIST x @@ -105,479 +110,476 @@ and fCOMMAND = function | CT_coerce_SECTION_BEGIN_to_COMMAND x -> fSECTION_BEGIN x | CT_coerce_THEOREM_GOAL_to_COMMAND x -> fTHEOREM_GOAL x | CT_abort(x1) -> - fID_OPT_OR_ALL x1; + fID_OPT_OR_ALL x1 ++ fNODE "abort" 1 | CT_abstraction(x1, x2, x3) -> - fID x1; - fFORMULA x2; - fINT_LIST x3; + fID x1 ++ + fFORMULA x2 ++ + fINT_LIST x3 ++ fNODE "abstraction" 3 | CT_add_field(x1, x2, x3, x4) -> - fFORMULA x1; - fFORMULA x2; - fFORMULA x3; - fFORMULA_OPT x4; + fFORMULA x1 ++ + fFORMULA x2 ++ + fFORMULA x3 ++ + fFORMULA_OPT x4 ++ fNODE "add_field" 4 | CT_add_natural_feature(x1, x2) -> - fNATURAL_FEATURE x1; - fID x2; + fNATURAL_FEATURE x1 ++ + fID x2 ++ fNODE "add_natural_feature" 2 | CT_addpath(x1, x2) -> - fSTRING x1; - fID_OPT x2; + fSTRING x1 ++ + fID_OPT x2 ++ fNODE "addpath" 2 | CT_arguments_scope(x1, x2) -> - fID x1; - fID_OPT_LIST x2; + fID x1 ++ + fID_OPT_LIST x2 ++ fNODE "arguments_scope" 2 | CT_bind_scope(x1, x2) -> - fID x1; - fID_NE_LIST x2; + fID x1 ++ + fID_NE_LIST x2 ++ fNODE "bind_scope" 2 | CT_cd(x1) -> - fSTRING_OPT x1; + fSTRING_OPT x1 ++ fNODE "cd" 1 | CT_check(x1) -> - fFORMULA x1; + fFORMULA x1 ++ fNODE "check" 1 | CT_class(x1) -> - fID x1; + fID x1 ++ fNODE "class" 1 | CT_close_scope(x1) -> - fID x1; + fID x1 ++ fNODE "close_scope" 1 | CT_coercion(x1, x2, x3, x4, x5) -> - fLOCAL_OPT x1; - fIDENTITY_OPT x2; - fID x3; - fID x4; - fID x5; + fLOCAL_OPT x1 ++ + fIDENTITY_OPT x2 ++ + fID x3 ++ + fID x4 ++ + fID x5 ++ fNODE "coercion" 5 | CT_cofix_decl(x1) -> - fCOFIX_REC_LIST x1; + fCOFIX_REC_LIST x1 ++ fNODE "cofix_decl" 1 | CT_compile_module(x1, x2, x3) -> - fVERBOSE_OPT x1; - fID x2; - fSTRING_OPT x3; + fVERBOSE_OPT x1 ++ + fID x2 ++ + fSTRING_OPT x3 ++ fNODE "compile_module" 3 | CT_declare_module(x1, x2, x3, x4) -> - fID x1; - fMODULE_BINDER_LIST x2; - fMODULE_TYPE_CHECK x3; - fMODULE_EXPR x4; + fID x1 ++ + fMODULE_BINDER_LIST x2 ++ + fMODULE_TYPE_CHECK x3 ++ + fMODULE_EXPR x4 ++ fNODE "declare_module" 4 | CT_define_notation(x1, x2, x3, x4) -> - fSTRING x1; - fFORMULA x2; - fMODIFIER_LIST x3; - fID_OPT x4; + fSTRING x1 ++ + fFORMULA x2 ++ + fMODIFIER_LIST x3 ++ + fID_OPT x4 ++ fNODE "define_notation" 4 | CT_definition(x1, x2, x3, x4, x5) -> - fDEFN x1; - fID x2; - fBINDER_LIST x3; - fDEF_BODY x4; - fFORMULA_OPT x5; + fDEFN x1 ++ + fID x2 ++ + fBINDER_LIST x3 ++ + fDEF_BODY x4 ++ + fFORMULA_OPT x5 ++ fNODE "definition" 5 | CT_delim_scope(x1, x2) -> - fID x1; - fID x2; + fID x1 ++ + fID x2 ++ fNODE "delim_scope" 2 | CT_delpath(x1) -> - fSTRING x1; + fSTRING x1 ++ fNODE "delpath" 1 | CT_derive_depinversion(x1, x2, x3, x4) -> - fINV_TYPE x1; - fID x2; - fFORMULA x3; - fSORT_TYPE x4; + fINV_TYPE x1 ++ + fID x2 ++ + fFORMULA x3 ++ + fSORT_TYPE x4 ++ fNODE "derive_depinversion" 4 | CT_derive_inversion(x1, x2, x3, x4) -> - fINV_TYPE x1; - fINT_OPT x2; - fID x3; - fID x4; + fINV_TYPE x1 ++ + fINT_OPT x2 ++ + fID x3 ++ + fID x4 ++ fNODE "derive_inversion" 4 | CT_derive_inversion_with(x1, x2, x3, x4) -> - fINV_TYPE x1; - fID x2; - fFORMULA x3; - fSORT_TYPE x4; + fINV_TYPE x1 ++ + fID x2 ++ + fFORMULA x3 ++ + fSORT_TYPE x4 ++ fNODE "derive_inversion_with" 4 | CT_explain_proof(x1) -> - fINT_LIST x1; + fINT_LIST x1 ++ fNODE "explain_proof" 1 | CT_explain_prooftree(x1) -> - fINT_LIST x1; + fINT_LIST x1 ++ fNODE "explain_prooftree" 1 | CT_export_id(x1) -> - fID_NE_LIST x1; + fID_NE_LIST x1 ++ fNODE "export_id" 1 | CT_extract_to_file(x1, x2) -> - fSTRING x1; - fID_NE_LIST x2; + fSTRING x1 ++ + fID_NE_LIST x2 ++ fNODE "extract_to_file" 2 | CT_extraction(x1) -> - fID_OPT x1; + fID_OPT x1 ++ fNODE "extraction" 1 | CT_fix_decl(x1) -> - fFIX_REC_LIST x1; + fFIX_REC_LIST x1 ++ fNODE "fix_decl" 1 | CT_focus(x1) -> - fINT_OPT x1; + fINT_OPT x1 ++ fNODE "focus" 1 | CT_go(x1) -> - fINT_OR_LOCN x1; + fINT_OR_LOCN x1 ++ fNODE "go" 1 | CT_guarded -> fNODE "guarded" 0 | CT_hint_destruct(x1, x2, x3, x4, x5, x6) -> - fID x1; - fINT x2; - fDESTRUCT_LOCATION x3; - fFORMULA x4; - fTACTIC_COM x5; - fID_LIST x6; + fID x1 ++ + fINT x2 ++ + fDESTRUCT_LOCATION x3 ++ + fFORMULA x4 ++ + fTACTIC_COM x5 ++ + fID_LIST x6 ++ fNODE "hint_destruct" 6 | CT_hint_extern(x1, x2, x3, x4) -> - fINT x1; - fFORMULA x2; - fTACTIC_COM x3; - fID_LIST x4; + fINT x1 ++ + fFORMULA x2 ++ + fTACTIC_COM x3 ++ + fID_LIST x4 ++ fNODE "hint_extern" 4 | CT_hintrewrite(x1, x2, x3, x4) -> - fORIENTATION x1; - fFORMULA_NE_LIST x2; - fID x3; - fTACTIC_COM x4; + fORIENTATION x1 ++ + fFORMULA_NE_LIST x2 ++ + fID x3 ++ + fTACTIC_COM x4 ++ fNODE "hintrewrite" 4 | CT_hints(x1, x2, x3) -> - fID x1; - fID_NE_LIST x2; - fID_LIST x3; + fID x1 ++ + fID_NE_LIST x2 ++ + fID_LIST x3 ++ fNODE "hints" 3 | CT_hints_immediate(x1, x2) -> - fFORMULA_NE_LIST x1; - fID_LIST x2; + fFORMULA_NE_LIST x1 ++ + fID_LIST x2 ++ fNODE "hints_immediate" 2 | CT_hints_resolve(x1, x2) -> - fFORMULA_NE_LIST x1; - fID_LIST x2; + fFORMULA_NE_LIST x1 ++ + fID_LIST x2 ++ fNODE "hints_resolve" 2 | CT_hyp_search_pattern(x1, x2) -> - fFORMULA x1; - fIN_OR_OUT_MODULES x2; + fFORMULA x1 ++ + fIN_OR_OUT_MODULES x2 ++ fNODE "hyp_search_pattern" 2 | CT_implicits(x1, x2) -> - fID x1; - fID_LIST_OPT x2; + fID x1 ++ + fID_LIST_OPT x2 ++ fNODE "implicits" 2 | CT_import_id(x1) -> - fID_NE_LIST x1; + fID_NE_LIST x1 ++ fNODE "import_id" 1 | CT_ind_scheme(x1) -> - fSCHEME_SPEC_LIST x1; + fSCHEME_SPEC_LIST x1 ++ fNODE "ind_scheme" 1 | CT_infix(x1, x2, x3, x4) -> - fSTRING x1; - fID x2; - fMODIFIER_LIST x3; - fID_OPT x4; + fSTRING x1 ++ + fID x2 ++ + fMODIFIER_LIST x3 ++ + fID_OPT x4 ++ fNODE "infix" 4 | CT_inline(x1) -> - fID_NE_LIST x1; + fID_NE_LIST x1 ++ fNODE "inline" 1 | CT_inspect(x1) -> - fINT x1; + fINT x1 ++ fNODE "inspect" 1 | CT_kill_node(x1) -> - fINT x1; + fINT x1 ++ fNODE "kill_node" 1 | CT_load(x1, x2) -> - fVERBOSE_OPT x1; - fID_OR_STRING x2; + fVERBOSE_OPT x1 ++ + fID_OR_STRING x2 ++ fNODE "load" 2 | CT_local_close_scope(x1) -> - fID x1; + fID x1 ++ fNODE "local_close_scope" 1 | CT_local_define_notation(x1, x2, x3, x4) -> - fSTRING x1; - fFORMULA x2; - fMODIFIER_LIST x3; - fID_OPT x4; + fSTRING x1 ++ + fFORMULA x2 ++ + fMODIFIER_LIST x3 ++ + fID_OPT x4 ++ fNODE "local_define_notation" 4 | CT_local_hint_destruct(x1, x2, x3, x4, x5, x6) -> - fID x1; - fINT x2; - fDESTRUCT_LOCATION x3; - fFORMULA x4; - fTACTIC_COM x5; - fID_LIST x6; + fID x1 ++ + fINT x2 ++ + fDESTRUCT_LOCATION x3 ++ + fFORMULA x4 ++ + fTACTIC_COM x5 ++ + fID_LIST x6 ++ fNODE "local_hint_destruct" 6 | CT_local_hint_extern(x1, x2, x3, x4) -> - fINT x1; - fFORMULA x2; - fTACTIC_COM x3; - fID_LIST x4; + fINT x1 ++ + fFORMULA x2 ++ + fTACTIC_COM x3 ++ + fID_LIST x4 ++ fNODE "local_hint_extern" 4 | CT_local_hints(x1, x2, x3) -> - fID x1; - fID_NE_LIST x2; - fID_LIST x3; + fID x1 ++ + fID_NE_LIST x2 ++ + fID_LIST x3 ++ fNODE "local_hints" 3 | CT_local_hints_immediate(x1, x2) -> - fFORMULA_NE_LIST x1; - fID_LIST x2; + fFORMULA_NE_LIST x1 ++ + fID_LIST x2 ++ fNODE "local_hints_immediate" 2 | CT_local_hints_resolve(x1, x2) -> - fFORMULA_NE_LIST x1; - fID_LIST x2; + fFORMULA_NE_LIST x1 ++ + fID_LIST x2 ++ fNODE "local_hints_resolve" 2 | CT_local_infix(x1, x2, x3, x4) -> - fSTRING x1; - fID x2; - fMODIFIER_LIST x3; - fID_OPT x4; + fSTRING x1 ++ + fID x2 ++ + fMODIFIER_LIST x3 ++ + fID_OPT x4 ++ fNODE "local_infix" 4 | CT_local_open_scope(x1) -> - fID x1; + fID x1 ++ fNODE "local_open_scope" 1 | CT_local_reserve_notation(x1, x2) -> - fSTRING x1; - fMODIFIER_LIST x2; + fSTRING x1 ++ + fMODIFIER_LIST x2 ++ fNODE "local_reserve_notation" 2 | CT_locate(x1) -> - fID x1; + fID x1 ++ fNODE "locate" 1 | CT_locate_file(x1) -> - fSTRING x1; + fSTRING x1 ++ fNODE "locate_file" 1 | CT_locate_lib(x1) -> - fID x1; + fID x1 ++ fNODE "locate_lib" 1 | CT_locate_notation(x1) -> - fSTRING x1; + fSTRING x1 ++ fNODE "locate_notation" 1 | CT_mind_decl(x1, x2) -> - fCO_IND x1; - fIND_SPEC_LIST x2; + fCO_IND x1 ++ + fIND_SPEC_LIST x2 ++ fNODE "mind_decl" 2 | CT_ml_add_path(x1) -> - fSTRING x1; + fSTRING x1 ++ fNODE "ml_add_path" 1 | CT_ml_declare_modules(x1) -> - fSTRING_NE_LIST x1; + fSTRING_NE_LIST x1 ++ fNODE "ml_declare_modules" 1 | CT_ml_print_modules -> fNODE "ml_print_modules" 0 | CT_ml_print_path -> fNODE "ml_print_path" 0 | CT_module(x1, x2, x3, x4) -> - fID x1; - fMODULE_BINDER_LIST x2; - fMODULE_TYPE_CHECK x3; - fMODULE_EXPR x4; + fID x1 ++ + fMODULE_BINDER_LIST x2 ++ + fMODULE_TYPE_CHECK x3 ++ + fMODULE_EXPR x4 ++ fNODE "module" 4 | CT_module_type_decl(x1, x2, x3) -> - fID x1; - fMODULE_BINDER_LIST x2; - fMODULE_TYPE_OPT x3; + fID x1 ++ + fMODULE_BINDER_LIST x2 ++ + fMODULE_TYPE_OPT x3 ++ fNODE "module_type_decl" 3 | CT_no_inline(x1) -> - fID_NE_LIST x1; + fID_NE_LIST x1 ++ fNODE "no_inline" 1 | CT_omega_flag(x1, x2) -> - fOMEGA_MODE x1; - fOMEGA_FEATURE x2; + fOMEGA_MODE x1 ++ + fOMEGA_FEATURE x2 ++ fNODE "omega_flag" 2 -| CT_opaque(x1) -> - fID_NE_LIST x1; - fNODE "opaque" 1 | CT_open_scope(x1) -> - fID x1; + fID x1 ++ fNODE "open_scope" 1 | CT_print -> fNODE "print" 0 | CT_print_about(x1) -> - fID x1; + fID x1 ++ fNODE "print_about" 1 | CT_print_all -> fNODE "print_all" 0 | CT_print_classes -> fNODE "print_classes" 0 | CT_print_ltac id -> - fID id; + fID id ++ fNODE "print_ltac" 1 | CT_print_coercions -> fNODE "print_coercions" 0 | CT_print_grammar(x1) -> - fGRAMMAR x1; + fGRAMMAR x1 ++ fNODE "print_grammar" 1 | CT_print_graph -> fNODE "print_graph" 0 | CT_print_hint(x1) -> - fID_OPT x1; + fID_OPT x1 ++ fNODE "print_hint" 1 | CT_print_hintdb(x1) -> - fID_OR_STAR x1; + fID_OR_STAR x1 ++ fNODE "print_hintdb" 1 | CT_print_rewrite_hintdb(x1) -> - fID x1; + fID x1 ++ fNODE "print_rewrite_hintdb" 1 | CT_print_id(x1) -> - fID x1; + fID x1 ++ fNODE "print_id" 1 | CT_print_implicit(x1) -> - fID x1; + fID x1 ++ fNODE "print_implicit" 1 | CT_print_loadpath -> fNODE "print_loadpath" 0 | CT_print_module(x1) -> - fID x1; + fID x1 ++ fNODE "print_module" 1 | CT_print_module_type(x1) -> - fID x1; + fID x1 ++ fNODE "print_module_type" 1 | CT_print_modules -> fNODE "print_modules" 0 | CT_print_natural(x1) -> - fID x1; + fID x1 ++ fNODE "print_natural" 1 | CT_print_natural_feature(x1) -> - fNATURAL_FEATURE x1; + fNATURAL_FEATURE x1 ++ fNODE "print_natural_feature" 1 | CT_print_opaqueid(x1) -> - fID x1; + fID x1 ++ fNODE "print_opaqueid" 1 | CT_print_path(x1, x2) -> - fID x1; - fID x2; + fID x1 ++ + fID x2 ++ fNODE "print_path" 2 | CT_print_proof(x1) -> - fID x1; + fID x1 ++ fNODE "print_proof" 1 | CT_print_scope(x1) -> - fID x1; + fID x1 ++ fNODE "print_scope" 1 | CT_print_setoids -> fNODE "print_setoids" 0 | CT_print_scopes -> fNODE "print_scopes" 0 | CT_print_section(x1) -> - fID x1; + fID x1 ++ fNODE "print_section" 1 | CT_print_states -> fNODE "print_states" 0 | CT_print_tables -> fNODE "print_tables" 0 | CT_print_universes(x1) -> - fSTRING_OPT x1; + fSTRING_OPT x1 ++ fNODE "print_universes" 1 | CT_print_visibility(x1) -> - fID_OPT x1; + fID_OPT x1 ++ fNODE "print_visibility" 1 | CT_proof(x1) -> - fFORMULA x1; + fFORMULA x1 ++ fNODE "proof" 1 | CT_proof_no_op -> fNODE "proof_no_op" 0 | CT_proof_with(x1) -> - fTACTIC_COM x1; + fTACTIC_COM x1 ++ fNODE "proof_with" 1 | CT_pwd -> fNODE "pwd" 0 | CT_quit -> fNODE "quit" 0 | CT_read_module(x1) -> - fID x1; + fID x1 ++ fNODE "read_module" 1 | CT_rec_ml_add_path(x1) -> - fSTRING x1; + fSTRING x1 ++ fNODE "rec_ml_add_path" 1 | CT_recaddpath(x1, x2) -> - fSTRING x1; - fID_OPT x2; + fSTRING x1 ++ + fID_OPT x2 ++ fNODE "recaddpath" 2 | CT_record(x1, x2, x3, x4, x5, x6) -> - fCOERCION_OPT x1; - fID x2; - fBINDER_LIST x3; - fFORMULA x4; - fID_OPT x5; - fRECCONSTR_LIST x6; + fCOERCION_OPT x1 ++ + fID x2 ++ + fBINDER_LIST x3 ++ + fFORMULA x4 ++ + fID_OPT x5 ++ + fRECCONSTR_LIST x6 ++ fNODE "record" 6 | CT_remove_natural_feature(x1, x2) -> - fNATURAL_FEATURE x1; - fID x2; + fNATURAL_FEATURE x1 ++ + fID x2 ++ fNODE "remove_natural_feature" 2 | CT_require(x1, x2, x3) -> - fIMPEXP x1; - fSPEC_OPT x2; - fID_NE_LIST_OR_STRING x3; + fIMPEXP x1 ++ + fSPEC_OPT x2 ++ + fID_NE_LIST_OR_STRING x3 ++ fNODE "require" 3 | CT_reserve(x1, x2) -> - fID_NE_LIST x1; - fFORMULA x2; + fID_NE_LIST x1 ++ + fFORMULA x2 ++ fNODE "reserve" 2 | CT_reserve_notation(x1, x2) -> - fSTRING x1; - fMODIFIER_LIST x2; + fSTRING x1 ++ + fMODIFIER_LIST x2 ++ fNODE "reserve_notation" 2 | CT_reset(x1) -> - fID x1; + fID x1 ++ fNODE "reset" 1 | CT_reset_section(x1) -> - fID x1; + fID x1 ++ fNODE "reset_section" 1 | CT_restart -> fNODE "restart" 0 | CT_restore_state(x1) -> - fID x1; + fID x1 ++ fNODE "restore_state" 1 | CT_resume(x1) -> - fID_OPT x1; + fID_OPT x1 ++ fNODE "resume" 1 | CT_save(x1, x2) -> - fTHM_OPT x1; - fID_OPT x2; + fTHM_OPT x1 ++ + fID_OPT x2 ++ fNODE "save" 2 | CT_scomments(x1) -> - fSCOMMENT_CONTENT_LIST x1; + fSCOMMENT_CONTENT_LIST x1 ++ fNODE "scomments" 1 | CT_search(x1, x2) -> - fID x1; - fIN_OR_OUT_MODULES x2; + fID x1 ++ + fIN_OR_OUT_MODULES x2 ++ fNODE "search" 2 | CT_search_about(x1, x2) -> - fID_OR_STRING_NE_LIST x1; - fIN_OR_OUT_MODULES x2; + fID_OR_STRING_NE_LIST x1 ++ + fIN_OR_OUT_MODULES x2 ++ fNODE "search_about" 2 | CT_search_pattern(x1, x2) -> - fFORMULA x1; - fIN_OR_OUT_MODULES x2; + fFORMULA x1 ++ + fIN_OR_OUT_MODULES x2 ++ fNODE "search_pattern" 2 | CT_search_rewrite(x1, x2) -> - fFORMULA x1; - fIN_OR_OUT_MODULES x2; + fFORMULA x1 ++ + fIN_OR_OUT_MODULES x2 ++ fNODE "search_rewrite" 2 | CT_section_end(x1) -> - fID x1; + fID x1 ++ fNODE "section_end" 1 | CT_section_struct(x1, x2, x3) -> - fSECTION_BEGIN x1; - fSECTION_BODY x2; - fCOMMAND x3; + fSECTION_BEGIN x1 ++ + fSECTION_BODY x2 ++ + fCOMMAND x3 ++ fNODE "section_struct" 3 | CT_set_natural(x1) -> - fID x1; + fID x1 ++ fNODE "set_natural" 1 | CT_set_natural_default -> fNODE "set_natural_default" 0 | CT_set_option(x1) -> - fTABLE x1; + fTABLE x1 ++ fNODE "set_option" 1 | CT_set_option_value(x1, x2) -> - fTABLE x1; - fSINGLE_OPTION_VALUE x2; + fTABLE x1 ++ + fSINGLE_OPTION_VALUE x2 ++ fNODE "set_option_value" 2 | CT_set_option_value2(x1, x2) -> - fTABLE x1; - fID_OR_STRING_NE_LIST x2; + fTABLE x1 ++ + fID_OR_STRING_NE_LIST x2 ++ fNODE "set_option_value2" 2 | CT_sethyp(x1) -> - fINT x1; + fINT x1 ++ fNODE "sethyp" 1 | CT_setundo(x1) -> - fINT x1; + fINT x1 ++ fNODE "setundo" 1 | CT_show_existentials -> fNODE "show_existentials" 0 | CT_show_goal(x1) -> - fINT_OPT x1; + fINT_OPT x1 ++ fNODE "show_goal" 1 | CT_show_implicit(x1) -> - fINT x1; + fINT x1 ++ fNODE "show_implicit" 1 | CT_show_intro -> fNODE "show_intro" 0 | CT_show_intros -> fNODE "show_intros" 0 @@ -587,97 +589,103 @@ and fCOMMAND = function | CT_show_script -> fNODE "show_script" 0 | CT_show_tree -> fNODE "show_tree" 0 | CT_solve(x1, x2, x3) -> - fINT x1; - fTACTIC_COM x2; - fDOTDOT_OPT x3; + fINT x1 ++ + fTACTIC_COM x2 ++ + fDOTDOT_OPT x3 ++ fNODE "solve" 3 +| CT_strategy(CT_level_list x1) -> + List.fold_left (++) (mt()) + (List.map (fun(l,q) -> fLEVEL l ++ fID_LIST q ++ fNODE "pair"2) x1) ++ + fNODE "strategy" (List.length x1) | CT_suspend -> fNODE "suspend" 0 | CT_syntax_macro(x1, x2, x3) -> - fID x1; - fFORMULA x2; - fINT_OPT x3; + fID x1 ++ + fFORMULA x2 ++ + fINT_OPT x3 ++ fNODE "syntax_macro" 3 | CT_tactic_definition(x1) -> - fTAC_DEF_NE_LIST x1; + fTAC_DEF_NE_LIST x1 ++ fNODE "tactic_definition" 1 | CT_test_natural_feature(x1, x2) -> - fNATURAL_FEATURE x1; - fID x2; + fNATURAL_FEATURE x1 ++ + fID x2 ++ fNODE "test_natural_feature" 2 | CT_theorem_struct(x1, x2) -> - fTHEOREM_GOAL x1; - fPROOF_SCRIPT x2; + fTHEOREM_GOAL x1 ++ + fPROOF_SCRIPT x2 ++ fNODE "theorem_struct" 2 | CT_time(x1) -> - fCOMMAND x1; + fCOMMAND x1 ++ fNODE "time" 1 -| CT_transparent(x1) -> - fID_NE_LIST x1; - fNODE "transparent" 1 | CT_undo(x1) -> - fINT_OPT x1; + fINT_OPT x1 ++ fNODE "undo" 1 | CT_unfocus -> fNODE "unfocus" 0 | CT_unset_option(x1) -> - fTABLE x1; + fTABLE x1 ++ fNODE "unset_option" 1 | CT_unsethyp -> fNODE "unsethyp" 0 | CT_unsetundo -> fNODE "unsetundo" 0 | CT_user_vernac(x1, x2) -> - fID x1; - fVARG_LIST x2; + fID x1 ++ + fVARG_LIST x2 ++ fNODE "user_vernac" 2 | CT_variable(x1, x2) -> - fVAR x1; - fBINDER_NE_LIST x2; + fVAR x1 ++ + fBINDER_NE_LIST x2 ++ fNODE "variable" 2 | CT_write_module(x1, x2) -> - fID x1; - fSTRING_OPT x2; + fID x1 ++ + fSTRING_OPT x2 ++ fNODE "write_module" 2 +and fLEVEL = function +| CT_Opaque -> fNODE "opaque" 0 +| CT_Level n -> fINT n ++ fNODE "level" 1 +| CT_Expand -> fNODE "expand" 0 and fCOMMAND_LIST = function | CT_command_list(x,l) -> - fCOMMAND x; - (List.iter fCOMMAND l); + fCOMMAND x ++ + (List.fold_left (++) (mt()) (List.map fCOMMAND l)) ++ fNODE "command_list" (1 + (List.length l)) and fCOMMENT = function -| CT_comment x -> fATOM "comment"; - (f_atom_string x); - print_string "\n"and fCOMMENT_S = function +| CT_comment x -> fATOM "comment" ++ + (f_atom_string x) ++ + str "\n" +and fCOMMENT_S = function | CT_comment_s l -> - (List.iter fCOMMENT l); + (List.fold_left (++) (mt()) (List.map fCOMMENT l)) ++ fNODE "comment_s" (List.length l) and fCONSTR = function | CT_constr(x1, x2) -> - fID x1; - fFORMULA x2; + fID x1 ++ + fFORMULA x2 ++ fNODE "constr" 2 | CT_constr_coercion(x1, x2) -> - fID x1; - fFORMULA x2; + fID x1 ++ + fFORMULA x2 ++ fNODE "constr_coercion" 2 and fCONSTR_LIST = function | CT_constr_list l -> - (List.iter fCONSTR l); + (List.fold_left (++) (mt()) (List.map fCONSTR l)) ++ fNODE "constr_list" (List.length l) and fCONTEXT_HYP_LIST = function | CT_context_hyp_list l -> - (List.iter fPREMISE_PATTERN l); + (List.fold_left (++) (mt()) (List.map fPREMISE_PATTERN l)) ++ fNODE "context_hyp_list" (List.length l) and fCONTEXT_PATTERN = function | CT_coerce_FORMULA_to_CONTEXT_PATTERN x -> fFORMULA x | CT_context(x1, x2) -> - fID_OPT x1; - fFORMULA x2; + fID_OPT x1 ++ + fFORMULA x2 ++ fNODE "context" 2 and fCONTEXT_RULE = function | CT_context_rule(x1, x2, x3) -> - fCONTEXT_HYP_LIST x1; - fCONTEXT_PATTERN x2; - fTACTIC_COM x3; + fCONTEXT_HYP_LIST x1 ++ + fCONTEXT_PATTERN x2 ++ + fTACTIC_COM x3 ++ fNODE "context_rule" 3 | CT_def_context_rule(x1) -> - fTACTIC_COM x1; + fTACTIC_COM x1 ++ fNODE "def_context_rule" 1 and fCONVERSION_FLAG = function | CT_beta -> fNODE "beta" 0 @@ -687,49 +695,52 @@ and fCONVERSION_FLAG = function | CT_zeta -> fNODE "zeta" 0 and fCONVERSION_FLAG_LIST = function | CT_conversion_flag_list l -> - (List.iter fCONVERSION_FLAG l); + (List.fold_left (++) (mt()) (List.map fCONVERSION_FLAG l)) ++ fNODE "conversion_flag_list" (List.length l) and fCONV_SET = function | CT_unf l -> - (List.iter fID l); + (List.fold_left (++) (mt()) (List.map fID l)) ++ fNODE "unf" (List.length l) | CT_unfbut l -> - (List.iter fID l); + (List.fold_left (++) (mt()) (List.map fID l)) ++ fNODE "unfbut" (List.length l) and fCO_IND = function -| CT_co_ind x -> fATOM "co_ind"; - (f_atom_string x); - print_string "\n"and fDECL_NOTATION_OPT = function +| CT_co_ind x -> fATOM "co_ind" ++ + (f_atom_string x) ++ + str "\n" +and fDECL_NOTATION_OPT = function | CT_coerce_NONE_to_DECL_NOTATION_OPT x -> fNONE x | CT_decl_notation(x1, x2, x3) -> - fSTRING x1; - fFORMULA x2; - fID_OPT x3; + fSTRING x1 ++ + fFORMULA x2 ++ + fID_OPT x3 ++ fNODE "decl_notation" 3 and fDEF = function | CT_def(x1, x2) -> - fID_OPT x1; - fFORMULA x2; + fID_OPT x1 ++ + fFORMULA x2 ++ fNODE "def" 2 and fDEFN = function -| CT_defn x -> fATOM "defn"; - (f_atom_string x); - print_string "\n"and fDEFN_OR_THM = function +| CT_defn x -> fATOM "defn" ++ + (f_atom_string x) ++ + str "\n" +and fDEFN_OR_THM = function | CT_coerce_DEFN_to_DEFN_OR_THM x -> fDEFN x | CT_coerce_THM_to_DEFN_OR_THM x -> fTHM x and fDEF_BODY = function | CT_coerce_CONTEXT_PATTERN_to_DEF_BODY x -> fCONTEXT_PATTERN x | CT_coerce_EVAL_CMD_to_DEF_BODY x -> fEVAL_CMD x | CT_type_of(x1) -> - fFORMULA x1; + fFORMULA x1 ++ fNODE "type_of" 1 and fDEF_BODY_OPT = function | CT_coerce_DEF_BODY_to_DEF_BODY_OPT x -> fDEF_BODY x | CT_coerce_FORMULA_OPT_to_DEF_BODY_OPT x -> fFORMULA_OPT x and fDEP = function -| CT_dep x -> fATOM "dep"; - (f_atom_string x); - print_string "\n"and fDESTRUCTING = function +| CT_dep x -> fATOM "dep" ++ + (f_atom_string x) ++ + str "\n" +and fDESTRUCTING = function | CT_coerce_NONE_to_DESTRUCTING x -> fNONE x | CT_destructing -> fNODE "destructing" 0 and fDESTRUCT_LOCATION = function @@ -741,54 +752,54 @@ and fDOTDOT_OPT = function | CT_dotdot -> fNODE "dotdot" 0 and fEQN = function | CT_eqn(x1, x2) -> - fMATCH_PATTERN_NE_LIST x1; - fFORMULA x2; + fMATCH_PATTERN_NE_LIST x1 ++ + fFORMULA x2 ++ fNODE "eqn" 2 and fEQN_LIST = function | CT_eqn_list l -> - (List.iter fEQN l); + (List.fold_left (++) (mt()) (List.map fEQN l)) ++ fNODE "eqn_list" (List.length l) and fEVAL_CMD = function | CT_eval(x1, x2, x3) -> - fINT_OPT x1; - fRED_COM x2; - fFORMULA x3; + fINT_OPT x1 ++ + fRED_COM x2 ++ + fFORMULA x3 ++ fNODE "eval" 3 and fFIXTAC = function | CT_fixtac(x1, x2, x3) -> - fID x1; - fINT x2; - fFORMULA x3; + fID x1 ++ + fINT x2 ++ + fFORMULA x3 ++ fNODE "fixtac" 3 and fFIX_BINDER = function | CT_coerce_FIX_REC_to_FIX_BINDER x -> fFIX_REC x | CT_fix_binder(x1, x2, x3, x4) -> - fID x1; - fINT x2; - fFORMULA x3; - fFORMULA x4; + fID x1 ++ + fINT x2 ++ + fFORMULA x3 ++ + fFORMULA x4 ++ fNODE "fix_binder" 4 and fFIX_BINDER_LIST = function | CT_fix_binder_list(x,l) -> - fFIX_BINDER x; - (List.iter fFIX_BINDER l); + fFIX_BINDER x ++ + (List.fold_left (++) (mt()) (List.map fFIX_BINDER l)) ++ fNODE "fix_binder_list" (1 + (List.length l)) and fFIX_REC = function | CT_fix_rec(x1, x2, x3, x4, x5) -> - fID x1; - fBINDER_NE_LIST x2; - fID_OPT x3; - fFORMULA x4; - fFORMULA x5; + fID x1 ++ + fBINDER_NE_LIST x2 ++ + fID_OPT x3 ++ + fFORMULA x4 ++ + fFORMULA x5 ++ fNODE "fix_rec" 5 and fFIX_REC_LIST = function | CT_fix_rec_list(x,l) -> - fFIX_REC x; - (List.iter fFIX_REC l); + fFIX_REC x ++ + (List.fold_left (++) (mt()) (List.map fFIX_REC l)) ++ fNODE "fix_rec_list" (1 + (List.length l)) and fFIX_TAC_LIST = function | CT_fix_tac_list l -> - (List.iter fFIXTAC l); + (List.fold_left (++) (mt()) (List.map fFIXTAC l)) ++ fNODE "fix_tac_list" (List.length l) and fFORMULA = function | CT_coerce_BINARY_to_FORMULA x -> fBINARY x @@ -797,90 +808,90 @@ and fFORMULA = function | CT_coerce_SORT_TYPE_to_FORMULA x -> fSORT_TYPE x | CT_coerce_TYPED_FORMULA_to_FORMULA x -> fTYPED_FORMULA x | CT_appc(x1, x2) -> - fFORMULA x1; - fFORMULA_NE_LIST x2; + fFORMULA x1 ++ + fFORMULA_NE_LIST x2 ++ fNODE "appc" 2 | CT_arrowc(x1, x2) -> - fFORMULA x1; - fFORMULA x2; + fFORMULA x1 ++ + fFORMULA x2 ++ fNODE "arrowc" 2 | CT_bang(x1) -> - fFORMULA x1; + fFORMULA x1 ++ fNODE "bang" 1 | CT_cases(x1, x2, x3) -> - fMATCHED_FORMULA_NE_LIST x1; - fFORMULA_OPT x2; - fEQN_LIST x3; + fMATCHED_FORMULA_NE_LIST x1 ++ + fFORMULA_OPT x2 ++ + fEQN_LIST x3 ++ fNODE "cases" 3 | CT_cofixc(x1, x2) -> - fID x1; - fCOFIX_REC_LIST x2; + fID x1 ++ + fCOFIX_REC_LIST x2 ++ fNODE "cofixc" 2 | CT_elimc(x1, x2, x3, x4) -> - fCASE x1; - fFORMULA_OPT x2; - fFORMULA x3; - fFORMULA_LIST x4; + fCASE x1 ++ + fFORMULA_OPT x2 ++ + fFORMULA x3 ++ + fFORMULA_LIST x4 ++ fNODE "elimc" 4 | CT_existvarc -> fNODE "existvarc" 0 | CT_fixc(x1, x2) -> - fID x1; - fFIX_BINDER_LIST x2; + fID x1 ++ + fFIX_BINDER_LIST x2 ++ fNODE "fixc" 2 | CT_if(x1, x2, x3, x4) -> - fFORMULA x1; - fRETURN_INFO x2; - fFORMULA x3; - fFORMULA x4; + fFORMULA x1 ++ + fRETURN_INFO x2 ++ + fFORMULA x3 ++ + fFORMULA x4 ++ fNODE "if" 4 | CT_inductive_let(x1, x2, x3, x4) -> - fFORMULA_OPT x1; - fID_OPT_NE_LIST x2; - fFORMULA x3; - fFORMULA x4; + fFORMULA_OPT x1 ++ + fID_OPT_NE_LIST x2 ++ + fFORMULA x3 ++ + fFORMULA x4 ++ fNODE "inductive_let" 4 | CT_labelled_arg(x1, x2) -> - fID x1; - fFORMULA x2; + fID x1 ++ + fFORMULA x2 ++ fNODE "labelled_arg" 2 | CT_lambdac(x1, x2) -> - fBINDER_NE_LIST x1; - fFORMULA x2; + fBINDER_NE_LIST x1 ++ + fFORMULA x2 ++ fNODE "lambdac" 2 | CT_let_tuple(x1, x2, x3, x4) -> - fID_OPT_NE_LIST x1; - fRETURN_INFO x2; - fFORMULA x3; - fFORMULA x4; + fID_OPT_NE_LIST x1 ++ + fRETURN_INFO x2 ++ + fFORMULA x3 ++ + fFORMULA x4 ++ fNODE "let_tuple" 4 | CT_letin(x1, x2) -> - fDEF x1; - fFORMULA x2; + fDEF x1 ++ + fFORMULA x2 ++ fNODE "letin" 2 | CT_notation(x1, x2) -> - fSTRING x1; - fFORMULA_LIST x2; + fSTRING x1 ++ + fFORMULA_LIST x2 ++ fNODE "notation" 2 | CT_num_encapsulator(x1, x2) -> - fNUM_TYPE x1; - fFORMULA x2; + fNUM_TYPE x1 ++ + fFORMULA x2 ++ fNODE "num_encapsulator" 2 | CT_prodc(x1, x2) -> - fBINDER_NE_LIST x1; - fFORMULA x2; + fBINDER_NE_LIST x1 ++ + fFORMULA x2 ++ fNODE "prodc" 2 | CT_proj(x1, x2) -> - fFORMULA x1; - fFORMULA_NE_LIST x2; + fFORMULA x1 ++ + fFORMULA_NE_LIST x2 ++ fNODE "proj" 2 and fFORMULA_LIST = function | CT_formula_list l -> - (List.iter fFORMULA l); + (List.fold_left (++) (mt()) (List.map fFORMULA l)) ++ fNODE "formula_list" (List.length l) and fFORMULA_NE_LIST = function | CT_formula_ne_list(x,l) -> - fFORMULA x; - (List.iter fFORMULA l); + fFORMULA x ++ + (List.fold_left (++) (mt()) (List.map fFORMULA l)) ++ fNODE "formula_ne_list" (1 + (List.length l)) and fFORMULA_OPT = function | CT_coerce_FORMULA_to_FORMULA_OPT x -> fFORMULA x @@ -893,44 +904,46 @@ and fGRAMMAR = function and fHYP_LOCATION = function | CT_coerce_UNFOLD_to_HYP_LOCATION x -> fUNFOLD x | CT_intype(x1, x2) -> - fID x1; - fINT_LIST x2; + fID x1 ++ + fINT_LIST x2 ++ fNODE "intype" 2 | CT_invalue(x1, x2) -> - fID x1; - fINT_LIST x2; + fID x1 ++ + fINT_LIST x2 ++ fNODE "invalue" 2 and fHYP_LOCATION_LIST_OR_STAR = function | CT_coerce_STAR_to_HYP_LOCATION_LIST_OR_STAR x -> fSTAR x | CT_hyp_location_list l -> - (List.iter fHYP_LOCATION l); + (List.fold_left (++) (mt()) (List.map fHYP_LOCATION l)) ++ fNODE "hyp_location_list" (List.length l) and fID = function -| CT_ident x -> fATOM "ident"; - (f_atom_string x); - print_string "\n"| CT_metac(x1) -> - fINT x1; +| CT_ident x -> fATOM "ident" ++ + (f_atom_string x) ++ + str "\n" +| CT_metac(x1) -> + fINT x1 ++ fNODE "metac" 1 -| CT_metaid x -> fATOM "metaid"; - (f_atom_string x); - print_string "\n"and fIDENTITY_OPT = function +| CT_metaid x -> fATOM "metaid" ++ + (f_atom_string x) ++ + str "\n" +and fIDENTITY_OPT = function | CT_coerce_NONE_to_IDENTITY_OPT x -> fNONE x | CT_identity -> fNODE "identity" 0 and fID_LIST = function | CT_id_list l -> - (List.iter fID l); + (List.fold_left (++) (mt()) (List.map fID l)) ++ fNODE "id_list" (List.length l) and fID_LIST_LIST = function | CT_id_list_list l -> - (List.iter fID_LIST l); + (List.fold_left (++) (mt()) (List.map fID_LIST l)) ++ fNODE "id_list_list" (List.length l) and fID_LIST_OPT = function | CT_coerce_ID_LIST_to_ID_LIST_OPT x -> fID_LIST x | CT_coerce_NONE_to_ID_LIST_OPT x -> fNONE x and fID_NE_LIST = function | CT_id_ne_list(x,l) -> - fID x; - (List.iter fID l); + fID x ++ + (List.fold_left (++) (mt()) (List.map fID l)) ++ fNODE "id_ne_list" (1 + (List.length l)) and fID_NE_LIST_OR_STAR = function | CT_coerce_ID_NE_LIST_to_ID_NE_LIST_OR_STAR x -> fID_NE_LIST x @@ -943,12 +956,12 @@ and fID_OPT = function | CT_coerce_NONE_to_ID_OPT x -> fNONE x and fID_OPT_LIST = function | CT_id_opt_list l -> - (List.iter fID_OPT l); + (List.fold_left (++) (mt()) (List.map fID_OPT l)) ++ fNODE "id_opt_list" (List.length l) and fID_OPT_NE_LIST = function | CT_id_opt_ne_list(x,l) -> - fID_OPT x; - (List.iter fID_OPT l); + fID_OPT x ++ + (List.fold_left (++) (mt()) (List.map fID_OPT l)) ++ fNODE "id_opt_ne_list" (1 + (List.length l)) and fID_OPT_OR_ALL = function | CT_coerce_ID_OPT_to_ID_OPT_OR_ALL x -> fID_OPT x @@ -968,8 +981,8 @@ and fID_OR_STRING = function | CT_coerce_STRING_to_ID_OR_STRING x -> fSTRING x and fID_OR_STRING_NE_LIST = function | CT_id_or_string_ne_list(x,l) -> - fID_OR_STRING x; - (List.iter fID_OR_STRING l); + fID_OR_STRING x ++ + (List.fold_left (++) (mt()) (List.map fID_OR_STRING l)) ++ fNODE "id_or_string_ne_list" (1 + (List.length l)) and fIMPEXP = function | CT_coerce_NONE_to_IMPEXP x -> fNONE x @@ -977,40 +990,41 @@ and fIMPEXP = function | CT_import -> fNODE "import" 0 and fIND_SPEC = function | CT_ind_spec(x1, x2, x3, x4, x5) -> - fID x1; - fBINDER_LIST x2; - fFORMULA x3; - fCONSTR_LIST x4; - fDECL_NOTATION_OPT x5; + fID x1 ++ + fBINDER_LIST x2 ++ + fFORMULA x3 ++ + fCONSTR_LIST x4 ++ + fDECL_NOTATION_OPT x5 ++ fNODE "ind_spec" 5 and fIND_SPEC_LIST = function | CT_ind_spec_list l -> - (List.iter fIND_SPEC l); + (List.fold_left (++) (mt()) (List.map fIND_SPEC l)) ++ fNODE "ind_spec_list" (List.length l) and fINT = function -| CT_int x -> fATOM "int"; - (f_atom_int x); - print_string "\n"and fINTRO_PATT = function +| CT_int x -> fATOM "int" ++ + (f_atom_int x) ++ + str "\n" +and fINTRO_PATT = function | CT_coerce_ID_to_INTRO_PATT x -> fID x | CT_disj_pattern(x,l) -> - fINTRO_PATT_LIST x; - (List.iter fINTRO_PATT_LIST l); + fINTRO_PATT_LIST x ++ + (List.fold_left (++) (mt()) (List.map fINTRO_PATT_LIST l)) ++ fNODE "disj_pattern" (1 + (List.length l)) and fINTRO_PATT_LIST = function | CT_intro_patt_list l -> - (List.iter fINTRO_PATT l); + (List.fold_left (++) (mt()) (List.map fINTRO_PATT l)) ++ fNODE "intro_patt_list" (List.length l) and fINTRO_PATT_OPT = function | CT_coerce_ID_OPT_to_INTRO_PATT_OPT x -> fID_OPT x | CT_coerce_INTRO_PATT_to_INTRO_PATT_OPT x -> fINTRO_PATT x and fINT_LIST = function | CT_int_list l -> - (List.iter fINT l); + (List.fold_left (++) (mt()) (List.map fINT l)) ++ fNODE "int_list" (List.length l) and fINT_NE_LIST = function | CT_int_ne_list(x,l) -> - fINT x; - (List.iter fINT l); + fINT x ++ + (List.fold_left (++) (mt()) (List.map fINT l)) ++ fNODE "int_ne_list" (1 + (List.length l)) and fINT_OPT = function | CT_coerce_INT_to_INT_OPT x -> fINT x @@ -1028,21 +1042,21 @@ and fINV_TYPE = function and fIN_OR_OUT_MODULES = function | CT_coerce_NONE_to_IN_OR_OUT_MODULES x -> fNONE x | CT_in_modules(x1) -> - fID_NE_LIST x1; + fID_NE_LIST x1 ++ fNODE "in_modules" 1 | CT_out_modules(x1) -> - fID_NE_LIST x1; + fID_NE_LIST x1 ++ fNODE "out_modules" 1 and fLET_CLAUSE = function | CT_let_clause(x1, x2, x3) -> - fID x1; - fTACTIC_OPT x2; - fLET_VALUE x3; + fID x1 ++ + fTACTIC_OPT x2 ++ + fLET_VALUE x3 ++ fNODE "let_clause" 3 and fLET_CLAUSES = function | CT_let_clauses(x,l) -> - fLET_CLAUSE x; - (List.iter fLET_CLAUSE l); + fLET_CLAUSE x ++ + (List.fold_left (++) (mt()) (List.map fLET_CLAUSE l)) ++ fNODE "let_clauses" (1 + (List.length l)) and fLET_VALUE = function | CT_coerce_DEF_BODY_to_LET_VALUE x -> fDEF_BODY x @@ -1051,120 +1065,121 @@ and fLOCAL_OPT = function | CT_coerce_NONE_to_LOCAL_OPT x -> fNONE x | CT_local -> fNODE "local" 0 and fLOCN = function -| CT_locn x -> fATOM "locn"; - (f_atom_string x); - print_string "\n"and fMATCHED_FORMULA = function +| CT_locn x -> fATOM "locn" ++ + (f_atom_string x) ++ + str "\n" +and fMATCHED_FORMULA = function | CT_coerce_FORMULA_to_MATCHED_FORMULA x -> fFORMULA x | CT_formula_as(x1, x2) -> - fFORMULA x1; - fID_OPT x2; + fFORMULA x1 ++ + fID_OPT x2 ++ fNODE "formula_as" 2 | CT_formula_as_in(x1, x2, x3) -> - fFORMULA x1; - fID_OPT x2; - fFORMULA x3; + fFORMULA x1 ++ + fID_OPT x2 ++ + fFORMULA x3 ++ fNODE "formula_as_in" 3 | CT_formula_in(x1, x2) -> - fFORMULA x1; - fFORMULA x2; + fFORMULA x1 ++ + fFORMULA x2 ++ fNODE "formula_in" 2 and fMATCHED_FORMULA_NE_LIST = function | CT_matched_formula_ne_list(x,l) -> - fMATCHED_FORMULA x; - (List.iter fMATCHED_FORMULA l); + fMATCHED_FORMULA x ++ + (List.fold_left (++) (mt()) (List.map fMATCHED_FORMULA l)) ++ fNODE "matched_formula_ne_list" (1 + (List.length l)) and fMATCH_PATTERN = function | CT_coerce_ID_OPT_to_MATCH_PATTERN x -> fID_OPT x | CT_coerce_NUM_to_MATCH_PATTERN x -> fNUM x | CT_pattern_app(x1, x2) -> - fMATCH_PATTERN x1; - fMATCH_PATTERN_NE_LIST x2; + fMATCH_PATTERN x1 ++ + fMATCH_PATTERN_NE_LIST x2 ++ fNODE "pattern_app" 2 | CT_pattern_as(x1, x2) -> - fMATCH_PATTERN x1; - fID_OPT x2; + fMATCH_PATTERN x1 ++ + fID_OPT x2 ++ fNODE "pattern_as" 2 | CT_pattern_delimitors(x1, x2) -> - fNUM_TYPE x1; - fMATCH_PATTERN x2; + fNUM_TYPE x1 ++ + fMATCH_PATTERN x2 ++ fNODE "pattern_delimitors" 2 | CT_pattern_notation(x1, x2) -> - fSTRING x1; - fMATCH_PATTERN_LIST x2; + fSTRING x1 ++ + fMATCH_PATTERN_LIST x2 ++ fNODE "pattern_notation" 2 and fMATCH_PATTERN_LIST = function | CT_match_pattern_list l -> - (List.iter fMATCH_PATTERN l); + (List.fold_left (++) (mt()) (List.map fMATCH_PATTERN l)) ++ fNODE "match_pattern_list" (List.length l) and fMATCH_PATTERN_NE_LIST = function | CT_match_pattern_ne_list(x,l) -> - fMATCH_PATTERN x; - (List.iter fMATCH_PATTERN l); + fMATCH_PATTERN x ++ + (List.fold_left (++) (mt()) (List.map fMATCH_PATTERN l)) ++ fNODE "match_pattern_ne_list" (1 + (List.length l)) and fMATCH_TAC_RULE = function | CT_match_tac_rule(x1, x2) -> - fCONTEXT_PATTERN x1; - fLET_VALUE x2; + fCONTEXT_PATTERN x1 ++ + fLET_VALUE x2 ++ fNODE "match_tac_rule" 2 and fMATCH_TAC_RULES = function | CT_match_tac_rules(x,l) -> - fMATCH_TAC_RULE x; - (List.iter fMATCH_TAC_RULE l); + fMATCH_TAC_RULE x ++ + (List.fold_left (++) (mt()) (List.map fMATCH_TAC_RULE l)) ++ fNODE "match_tac_rules" (1 + (List.length l)) and fMODIFIER = function | CT_entry_type(x1, x2) -> - fID x1; - fID x2; + fID x1 ++ + fID x2 ++ fNODE "entry_type" 2 | CT_format(x1) -> - fSTRING x1; + fSTRING x1 ++ fNODE "format" 1 | CT_lefta -> fNODE "lefta" 0 | CT_nona -> fNODE "nona" 0 | CT_only_parsing -> fNODE "only_parsing" 0 | CT_righta -> fNODE "righta" 0 | CT_set_item_level(x1, x2) -> - fID_NE_LIST x1; - fINT_OR_NEXT x2; + fID_NE_LIST x1 ++ + fINT_OR_NEXT x2 ++ fNODE "set_item_level" 2 | CT_set_level(x1) -> - fINT x1; + fINT x1 ++ fNODE "set_level" 1 and fMODIFIER_LIST = function | CT_modifier_list l -> - (List.iter fMODIFIER l); + (List.fold_left (++) (mt()) (List.map fMODIFIER l)) ++ fNODE "modifier_list" (List.length l) and fMODULE_BINDER = function | CT_module_binder(x1, x2) -> - fID_NE_LIST x1; - fMODULE_TYPE x2; + fID_NE_LIST x1 ++ + fMODULE_TYPE x2 ++ fNODE "module_binder" 2 and fMODULE_BINDER_LIST = function | CT_module_binder_list l -> - (List.iter fMODULE_BINDER l); + (List.fold_left (++) (mt()) (List.map fMODULE_BINDER l)) ++ fNODE "module_binder_list" (List.length l) and fMODULE_EXPR = function | CT_coerce_ID_OPT_to_MODULE_EXPR x -> fID_OPT x | CT_module_app(x1, x2) -> - fMODULE_EXPR x1; - fMODULE_EXPR x2; + fMODULE_EXPR x1 ++ + fMODULE_EXPR x2 ++ fNODE "module_app" 2 and fMODULE_TYPE = function | CT_coerce_ID_to_MODULE_TYPE x -> fID x | CT_module_type_with_def(x1, x2, x3) -> - fMODULE_TYPE x1; - fID_LIST x2; - fFORMULA x3; + fMODULE_TYPE x1 ++ + fID_LIST x2 ++ + fFORMULA x3 ++ fNODE "module_type_with_def" 3 | CT_module_type_with_mod(x1, x2, x3) -> - fMODULE_TYPE x1; - fID_LIST x2; - fID x3; + fMODULE_TYPE x1 ++ + fID_LIST x2 ++ + fID x3 ++ fNODE "module_type_with_mod" 3 and fMODULE_TYPE_CHECK = function | CT_coerce_MODULE_TYPE_OPT_to_MODULE_TYPE_CHECK x -> fMODULE_TYPE_OPT x | CT_only_check(x1) -> - fMODULE_TYPE x1; + fMODULE_TYPE x1 ++ fNODE "only_check" 1 and fMODULE_TYPE_OPT = function | CT_coerce_ID_OPT_to_MODULE_TYPE_OPT x -> fID_OPT x @@ -1176,12 +1191,14 @@ and fNATURAL_FEATURE = function and fNONE = function | CT_none -> fNODE "none" 0 and fNUM = function -| CT_int_encapsulator x -> fATOM "int_encapsulator"; - (f_atom_string x); - print_string "\n"and fNUM_TYPE = function -| CT_num_type x -> fATOM "num_type"; - (f_atom_string x); - print_string "\n"and fOMEGA_FEATURE = function +| CT_int_encapsulator x -> fATOM "int_encapsulator" ++ + (f_atom_string x) ++ + str "\n" +and fNUM_TYPE = function +| CT_num_type x -> fATOM "num_type" ++ + (f_atom_string x) ++ + str "\n" +and fOMEGA_FEATURE = function | CT_coerce_STRING_to_OMEGA_FEATURE x -> fSTRING x | CT_flag_action -> fNODE "flag_action" 0 | CT_flag_system -> fNODE "flag_system" 0 @@ -1195,13 +1212,13 @@ and fORIENTATION = function | CT_rl -> fNODE "rl" 0 and fPATTERN = function | CT_pattern_occ(x1, x2) -> - fINT_LIST x1; - fFORMULA x2; + fINT_LIST x1 ++ + fFORMULA x2 ++ fNODE "pattern_occ" 2 and fPATTERN_NE_LIST = function | CT_pattern_ne_list(x,l) -> - fPATTERN x; - (List.iter fPATTERN l); + fPATTERN x ++ + (List.fold_left (++) (mt()) (List.map fPATTERN l)) ++ fNODE "pattern_ne_list" (1 + (List.length l)) and fPATTERN_OPT = function | CT_coerce_NONE_to_PATTERN_OPT x -> fNONE x @@ -1209,146 +1226,147 @@ and fPATTERN_OPT = function and fPREMISE = function | CT_coerce_TYPED_FORMULA_to_PREMISE x -> fTYPED_FORMULA x | CT_eval_result(x1, x2, x3) -> - fFORMULA x1; - fFORMULA x2; - fFORMULA x3; + fFORMULA x1 ++ + fFORMULA x2 ++ + fFORMULA x3 ++ fNODE "eval_result" 3 | CT_premise(x1, x2) -> - fID x1; - fFORMULA x2; + fID x1 ++ + fFORMULA x2 ++ fNODE "premise" 2 and fPREMISES_LIST = function | CT_premises_list l -> - (List.iter fPREMISE l); + (List.fold_left (++) (mt()) (List.map fPREMISE l)) ++ fNODE "premises_list" (List.length l) and fPREMISE_PATTERN = function | CT_premise_pattern(x1, x2) -> - fID_OPT x1; - fCONTEXT_PATTERN x2; + fID_OPT x1 ++ + fCONTEXT_PATTERN x2 ++ fNODE "premise_pattern" 2 and fPROOF_SCRIPT = function | CT_proof_script l -> - (List.iter fCOMMAND l); + (List.fold_left (++) (mt()) (List.map fCOMMAND l)) ++ fNODE "proof_script" (List.length l) and fRECCONSTR = function | CT_defrecconstr(x1, x2, x3) -> - fID_OPT x1; - fFORMULA x2; - fFORMULA_OPT x3; + fID_OPT x1 ++ + fFORMULA x2 ++ + fFORMULA_OPT x3 ++ fNODE "defrecconstr" 3 | CT_defrecconstr_coercion(x1, x2, x3) -> - fID_OPT x1; - fFORMULA x2; - fFORMULA_OPT x3; + fID_OPT x1 ++ + fFORMULA x2 ++ + fFORMULA_OPT x3 ++ fNODE "defrecconstr_coercion" 3 | CT_recconstr(x1, x2) -> - fID_OPT x1; - fFORMULA x2; + fID_OPT x1 ++ + fFORMULA x2 ++ fNODE "recconstr" 2 | CT_recconstr_coercion(x1, x2) -> - fID_OPT x1; - fFORMULA x2; + fID_OPT x1 ++ + fFORMULA x2 ++ fNODE "recconstr_coercion" 2 and fRECCONSTR_LIST = function | CT_recconstr_list l -> - (List.iter fRECCONSTR l); + (List.fold_left (++) (mt()) (List.map fRECCONSTR l)) ++ fNODE "recconstr_list" (List.length l) and fREC_TACTIC_FUN = function | CT_rec_tactic_fun(x1, x2, x3) -> - fID x1; - fID_OPT_NE_LIST x2; - fTACTIC_COM x3; + fID x1 ++ + fID_OPT_NE_LIST x2 ++ + fTACTIC_COM x3 ++ fNODE "rec_tactic_fun" 3 and fREC_TACTIC_FUN_LIST = function | CT_rec_tactic_fun_list(x,l) -> - fREC_TACTIC_FUN x; - (List.iter fREC_TACTIC_FUN l); + fREC_TACTIC_FUN x ++ + (List.fold_left (++) (mt()) (List.map fREC_TACTIC_FUN l)) ++ fNODE "rec_tactic_fun_list" (1 + (List.length l)) and fRED_COM = function | CT_cbv(x1, x2) -> - fCONVERSION_FLAG_LIST x1; - fCONV_SET x2; + fCONVERSION_FLAG_LIST x1 ++ + fCONV_SET x2 ++ fNODE "cbv" 2 | CT_fold(x1) -> - fFORMULA_LIST x1; + fFORMULA_LIST x1 ++ fNODE "fold" 1 | CT_hnf -> fNODE "hnf" 0 | CT_lazy(x1, x2) -> - fCONVERSION_FLAG_LIST x1; - fCONV_SET x2; + fCONVERSION_FLAG_LIST x1 ++ + fCONV_SET x2 ++ fNODE "lazy" 2 | CT_pattern(x1) -> - fPATTERN_NE_LIST x1; + fPATTERN_NE_LIST x1 ++ fNODE "pattern" 1 | CT_red -> fNODE "red" 0 | CT_cbvvm -> fNODE "vm_compute" 0 | CT_simpl(x1) -> - fPATTERN_OPT x1; + fPATTERN_OPT x1 ++ fNODE "simpl" 1 | CT_unfold(x1) -> - fUNFOLD_NE_LIST x1; + fUNFOLD_NE_LIST x1 ++ fNODE "unfold" 1 and fRETURN_INFO = function | CT_coerce_NONE_to_RETURN_INFO x -> fNONE x | CT_as_and_return(x1, x2) -> - fID_OPT x1; - fFORMULA x2; + fID_OPT x1 ++ + fFORMULA x2 ++ fNODE "as_and_return" 2 | CT_return(x1) -> - fFORMULA x1; + fFORMULA x1 ++ fNODE "return" 1 and fRULE = function | CT_rule(x1, x2) -> - fPREMISES_LIST x1; - fFORMULA x2; + fPREMISES_LIST x1 ++ + fFORMULA x2 ++ fNODE "rule" 2 and fRULE_LIST = function | CT_rule_list l -> - (List.iter fRULE l); + (List.fold_left (++) (mt()) (List.map fRULE l)) ++ fNODE "rule_list" (List.length l) and fSCHEME_SPEC = function | CT_scheme_spec(x1, x2, x3, x4) -> - fID x1; - fDEP x2; - fFORMULA x3; - fSORT_TYPE x4; + fID x1 ++ + fDEP x2 ++ + fFORMULA x3 ++ + fSORT_TYPE x4 ++ fNODE "scheme_spec" 4 and fSCHEME_SPEC_LIST = function | CT_scheme_spec_list(x,l) -> - fSCHEME_SPEC x; - (List.iter fSCHEME_SPEC l); + fSCHEME_SPEC x ++ + (List.fold_left (++) (mt()) (List.map fSCHEME_SPEC l)) ++ fNODE "scheme_spec_list" (1 + (List.length l)) and fSCOMMENT_CONTENT = function | CT_coerce_FORMULA_to_SCOMMENT_CONTENT x -> fFORMULA x | CT_coerce_ID_OR_STRING_to_SCOMMENT_CONTENT x -> fID_OR_STRING x and fSCOMMENT_CONTENT_LIST = function | CT_scomment_content_list l -> - (List.iter fSCOMMENT_CONTENT l); + (List.fold_left (++) (mt()) (List.map fSCOMMENT_CONTENT l)) ++ fNODE "scomment_content_list" (List.length l) and fSECTION_BEGIN = function | CT_section(x1) -> - fID x1; + fID x1 ++ fNODE "section" 1 and fSECTION_BODY = function | CT_section_body l -> - (List.iter fCOMMAND l); + (List.fold_left (++) (mt()) (List.map fCOMMAND l)) ++ fNODE "section_body" (List.length l) and fSIGNED_INT = function | CT_coerce_INT_to_SIGNED_INT x -> fINT x | CT_minus(x1) -> - fINT x1; + fINT x1 ++ fNODE "minus" 1 and fSIGNED_INT_LIST = function | CT_signed_int_list l -> - (List.iter fSIGNED_INT l); + (List.fold_left (++) (mt()) (List.map fSIGNED_INT l)) ++ fNODE "signed_int_list" (List.length l) and fSINGLE_OPTION_VALUE = function | CT_coerce_INT_to_SINGLE_OPTION_VALUE x -> fINT x | CT_coerce_STRING_to_SINGLE_OPTION_VALUE x -> fSTRING x and fSORT_TYPE = function -| CT_sortc x -> fATOM "sortc"; - (f_atom_string x); - print_string "\n"and fSPEC_LIST = function +| CT_sortc x -> fATOM "sortc" ++ + (f_atom_string x) ++ + str "\n" +and fSPEC_LIST = function | CT_coerce_BINDING_LIST_to_SPEC_LIST x -> fBINDING_LIST x | CT_coerce_FORMULA_LIST_to_SPEC_LIST x -> fFORMULA_LIST x and fSPEC_OPT = function @@ -1360,12 +1378,13 @@ and fSTAR_OPT = function | CT_coerce_NONE_to_STAR_OPT x -> fNONE x | CT_coerce_STAR_to_STAR_OPT x -> fSTAR x and fSTRING = function -| CT_string x -> fATOM "string"; - (f_atom_string x); - print_string "\n"and fSTRING_NE_LIST = function +| CT_string x -> fATOM "string" ++ + (f_atom_string x) ++ + str "\n" +and fSTRING_NE_LIST = function | CT_string_ne_list(x,l) -> - fSTRING x; - (List.iter fSTRING l); + fSTRING x ++ + (List.fold_left (++) (mt()) (List.map fSTRING l)) ++ fNODE "string_ne_list" (1 + (List.length l)) and fSTRING_OPT = function | CT_coerce_NONE_to_STRING_OPT x -> fNONE x @@ -1373,8 +1392,8 @@ and fSTRING_OPT = function and fTABLE = function | CT_coerce_ID_to_TABLE x -> fID x | CT_table(x1, x2) -> - fID x1; - fID x2; + fID x1 ++ + fID x2 ++ fNODE "table" 2 and fTACTIC_ARG = function | CT_coerce_EVAL_CMD_to_TACTIC_ARG x -> fEVAL_CMD x @@ -1384,429 +1403,429 @@ and fTACTIC_ARG = function | CT_void -> fNODE "void" 0 and fTACTIC_ARG_LIST = function | CT_tactic_arg_list(x,l) -> - fTACTIC_ARG x; - (List.iter fTACTIC_ARG l); + fTACTIC_ARG x ++ + (List.fold_left (++) (mt()) (List.map fTACTIC_ARG l)) ++ fNODE "tactic_arg_list" (1 + (List.length l)) and fTACTIC_COM = function | CT_abstract(x1, x2) -> - fID_OPT x1; - fTACTIC_COM x2; + fID_OPT x1 ++ + fTACTIC_COM x2 ++ fNODE "abstract" 2 | CT_absurd(x1) -> - fFORMULA x1; + fFORMULA x1 ++ fNODE "absurd" 1 | CT_any_constructor(x1) -> - fTACTIC_OPT x1; + fTACTIC_OPT x1 ++ fNODE "any_constructor" 1 | CT_apply(x1, x2) -> - fFORMULA x1; - fSPEC_LIST x2; + fFORMULA x1 ++ + fSPEC_LIST x2 ++ fNODE "apply" 2 | CT_assert(x1, x2) -> - fID_OPT x1; - fFORMULA x2; + fID_OPT x1 ++ + fFORMULA x2 ++ fNODE "assert" 2 | CT_assumption -> fNODE "assumption" 0 | CT_auto(x1) -> - fINT_OPT x1; + fINT_OPT x1 ++ fNODE "auto" 1 | CT_auto_with(x1, x2) -> - fINT_OPT x1; - fID_NE_LIST_OR_STAR x2; + fINT_OPT x1 ++ + fID_NE_LIST_OR_STAR x2 ++ fNODE "auto_with" 2 | CT_autorewrite(x1, x2) -> - fID_NE_LIST x1; - fTACTIC_OPT x2; + fID_NE_LIST x1 ++ + fTACTIC_OPT x2 ++ fNODE "autorewrite" 2 | CT_autotdb(x1) -> - fINT_OPT x1; + fINT_OPT x1 ++ fNODE "autotdb" 1 | CT_case_type(x1) -> - fFORMULA x1; + fFORMULA x1 ++ fNODE "case_type" 1 | CT_casetac(x1, x2) -> - fFORMULA x1; - fSPEC_LIST x2; + fFORMULA x1 ++ + fSPEC_LIST x2 ++ fNODE "casetac" 2 | CT_cdhyp(x1) -> - fID x1; + fID x1 ++ fNODE "cdhyp" 1 | CT_change(x1, x2) -> - fFORMULA x1; - fCLAUSE x2; + fFORMULA x1 ++ + fCLAUSE x2 ++ fNODE "change" 2 | CT_change_local(x1, x2, x3) -> - fPATTERN x1; - fFORMULA x2; - fCLAUSE x3; + fPATTERN x1 ++ + fFORMULA x2 ++ + fCLAUSE x3 ++ fNODE "change_local" 3 | CT_clear(x1) -> - fID_NE_LIST x1; + fID_NE_LIST x1 ++ fNODE "clear" 1 | CT_clear_body(x1) -> - fID_NE_LIST x1; + fID_NE_LIST x1 ++ fNODE "clear_body" 1 | CT_cofixtactic(x1, x2) -> - fID_OPT x1; - fCOFIX_TAC_LIST x2; + fID_OPT x1 ++ + fCOFIX_TAC_LIST x2 ++ fNODE "cofixtactic" 2 | CT_condrewrite_lr(x1, x2, x3, x4) -> - fTACTIC_COM x1; - fFORMULA x2; - fSPEC_LIST x3; - fID_OPT x4; + fTACTIC_COM x1 ++ + fFORMULA x2 ++ + fSPEC_LIST x3 ++ + fID_OPT x4 ++ fNODE "condrewrite_lr" 4 | CT_condrewrite_rl(x1, x2, x3, x4) -> - fTACTIC_COM x1; - fFORMULA x2; - fSPEC_LIST x3; - fID_OPT x4; + fTACTIC_COM x1 ++ + fFORMULA x2 ++ + fSPEC_LIST x3 ++ + fID_OPT x4 ++ fNODE "condrewrite_rl" 4 | CT_constructor(x1, x2) -> - fINT x1; - fSPEC_LIST x2; + fINT x1 ++ + fSPEC_LIST x2 ++ fNODE "constructor" 2 | CT_contradiction -> fNODE "contradiction" 0 | CT_contradiction_thm(x1, x2) -> - fFORMULA x1; - fSPEC_LIST x2; + fFORMULA x1 ++ + fSPEC_LIST x2 ++ fNODE "contradiction_thm" 2 | CT_cut(x1) -> - fFORMULA x1; + fFORMULA x1 ++ fNODE "cut" 1 | CT_cutrewrite_lr(x1, x2) -> - fFORMULA x1; - fID_OPT x2; + fFORMULA x1 ++ + fID_OPT x2 ++ fNODE "cutrewrite_lr" 2 | CT_cutrewrite_rl(x1, x2) -> - fFORMULA x1; - fID_OPT x2; + fFORMULA x1 ++ + fID_OPT x2 ++ fNODE "cutrewrite_rl" 2 | CT_dauto(x1, x2) -> - fINT_OPT x1; - fINT_OPT x2; + fINT_OPT x1 ++ + fINT_OPT x2 ++ fNODE "dauto" 2 | CT_dconcl -> fNODE "dconcl" 0 | CT_decompose_list(x1, x2) -> - fID_NE_LIST x1; - fFORMULA x2; + fID_NE_LIST x1 ++ + fFORMULA x2 ++ fNODE "decompose_list" 2 | CT_decompose_record(x1) -> - fFORMULA x1; + fFORMULA x1 ++ fNODE "decompose_record" 1 | CT_decompose_sum(x1) -> - fFORMULA x1; + fFORMULA x1 ++ fNODE "decompose_sum" 1 | CT_depinversion(x1, x2, x3, x4) -> - fINV_TYPE x1; - fID_OR_INT x2; - fINTRO_PATT_OPT x3; - fFORMULA_OPT x4; + fINV_TYPE x1 ++ + fID_OR_INT x2 ++ + fINTRO_PATT_OPT x3 ++ + fFORMULA_OPT x4 ++ fNODE "depinversion" 4 | CT_deprewrite_lr(x1) -> - fID x1; + fID x1 ++ fNODE "deprewrite_lr" 1 | CT_deprewrite_rl(x1) -> - fID x1; + fID x1 ++ fNODE "deprewrite_rl" 1 | CT_destruct(x1) -> - fID_OR_INT x1; + fID_OR_INT x1 ++ fNODE "destruct" 1 | CT_dhyp(x1) -> - fID x1; + fID x1 ++ fNODE "dhyp" 1 | CT_discriminate_eq(x1) -> - fID_OR_INT_OPT x1; + fID_OR_INT_OPT x1 ++ fNODE "discriminate_eq" 1 | CT_do(x1, x2) -> - fID_OR_INT x1; - fTACTIC_COM x2; + fID_OR_INT x1 ++ + fTACTIC_COM x2 ++ fNODE "do" 2 | CT_eapply(x1, x2) -> - fFORMULA x1; - fSPEC_LIST x2; + fFORMULA x1 ++ + fSPEC_LIST x2 ++ fNODE "eapply" 2 | CT_eauto(x1, x2) -> - fID_OR_INT_OPT x1; - fID_OR_INT_OPT x2; + fID_OR_INT_OPT x1 ++ + fID_OR_INT_OPT x2 ++ fNODE "eauto" 2 | CT_eauto_with(x1, x2, x3) -> - fID_OR_INT_OPT x1; - fID_OR_INT_OPT x2; - fID_NE_LIST_OR_STAR x3; + fID_OR_INT_OPT x1 ++ + fID_OR_INT_OPT x2 ++ + fID_NE_LIST_OR_STAR x3 ++ fNODE "eauto_with" 3 | CT_elim(x1, x2, x3) -> - fFORMULA x1; - fSPEC_LIST x2; - fUSING x3; + fFORMULA x1 ++ + fSPEC_LIST x2 ++ + fUSING x3 ++ fNODE "elim" 3 | CT_elim_type(x1) -> - fFORMULA x1; + fFORMULA x1 ++ fNODE "elim_type" 1 | CT_exact(x1) -> - fFORMULA x1; + fFORMULA x1 ++ fNODE "exact" 1 | CT_exact_no_check(x1) -> - fFORMULA x1; + fFORMULA x1 ++ fNODE "exact_no_check" 1 | CT_vm_cast_no_check(x1) -> - fFORMULA x1; + fFORMULA x1 ++ fNODE "vm_cast_no_check" 1 | CT_exists(x1) -> - fSPEC_LIST x1; + fSPEC_LIST x1 ++ fNODE "exists" 1 | CT_fail(x1, x2) -> - fID_OR_INT x1; - fSTRING_OPT x2; + fID_OR_INT x1 ++ + fSTRING_OPT x2 ++ fNODE "fail" 2 | CT_first(x,l) -> - fTACTIC_COM x; - (List.iter fTACTIC_COM l); + fTACTIC_COM x ++ + (List.fold_left (++) (mt()) (List.map fTACTIC_COM l)) ++ fNODE "first" (1 + (List.length l)) | CT_firstorder(x1) -> - fTACTIC_OPT x1; + fTACTIC_OPT x1 ++ fNODE "firstorder" 1 | CT_firstorder_using(x1, x2) -> - fTACTIC_OPT x1; - fID_NE_LIST x2; + fTACTIC_OPT x1 ++ + fID_NE_LIST x2 ++ fNODE "firstorder_using" 2 | CT_firstorder_with(x1, x2) -> - fTACTIC_OPT x1; - fID_NE_LIST x2; + fTACTIC_OPT x1 ++ + fID_NE_LIST x2 ++ fNODE "firstorder_with" 2 | CT_fixtactic(x1, x2, x3) -> - fID_OPT x1; - fINT x2; - fFIX_TAC_LIST x3; + fID_OPT x1 ++ + fINT x2 ++ + fFIX_TAC_LIST x3 ++ fNODE "fixtactic" 3 | CT_formula_marker(x1) -> - fFORMULA x1; + fFORMULA x1 ++ fNODE "formula_marker" 1 | CT_fresh(x1) -> - fSTRING_OPT x1; + fSTRING_OPT x1 ++ fNODE "fresh" 1 | CT_generalize(x1) -> - fFORMULA_NE_LIST x1; + fFORMULA_NE_LIST x1 ++ fNODE "generalize" 1 | CT_generalize_dependent(x1) -> - fFORMULA x1; + fFORMULA x1 ++ fNODE "generalize_dependent" 1 | CT_idtac(x1) -> - fSTRING_OPT x1; + fSTRING_OPT x1 ++ fNODE "idtac" 1 | CT_induction(x1) -> - fID_OR_INT x1; + fID_OR_INT x1 ++ fNODE "induction" 1 | CT_info(x1) -> - fTACTIC_COM x1; + fTACTIC_COM x1 ++ fNODE "info" 1 | CT_injection_eq(x1) -> - fID_OR_INT_OPT x1; + fID_OR_INT_OPT x1 ++ fNODE "injection_eq" 1 | CT_instantiate(x1, x2, x3) -> - fINT x1; - fFORMULA x2; - fCLAUSE x3; + fINT x1 ++ + fFORMULA x2 ++ + fCLAUSE x3 ++ fNODE "instantiate" 3 | CT_intro(x1) -> - fID_OPT x1; + fID_OPT x1 ++ fNODE "intro" 1 | CT_intro_after(x1, x2) -> - fID_OPT x1; - fID x2; + fID_OPT x1 ++ + fID x2 ++ fNODE "intro_after" 2 | CT_intros(x1) -> - fINTRO_PATT_LIST x1; + fINTRO_PATT_LIST x1 ++ fNODE "intros" 1 | CT_intros_until(x1) -> - fID_OR_INT x1; + fID_OR_INT x1 ++ fNODE "intros_until" 1 | CT_inversion(x1, x2, x3, x4) -> - fINV_TYPE x1; - fID_OR_INT x2; - fINTRO_PATT_OPT x3; - fID_LIST x4; + fINV_TYPE x1 ++ + fID_OR_INT x2 ++ + fINTRO_PATT_OPT x3 ++ + fID_LIST x4 ++ fNODE "inversion" 4 | CT_left(x1) -> - fSPEC_LIST x1; + fSPEC_LIST x1 ++ fNODE "left" 1 | CT_let_ltac(x1, x2) -> - fLET_CLAUSES x1; - fLET_VALUE x2; + fLET_CLAUSES x1 ++ + fLET_VALUE x2 ++ fNODE "let_ltac" 2 | CT_lettac(x1, x2, x3) -> - fID_OPT x1; - fFORMULA x2; - fCLAUSE x3; + fID_OPT x1 ++ + fFORMULA x2 ++ + fCLAUSE x3 ++ fNODE "lettac" 3 | CT_match_context(x,l) -> - fCONTEXT_RULE x; - (List.iter fCONTEXT_RULE l); + fCONTEXT_RULE x ++ + (List.fold_left (++) (mt()) (List.map fCONTEXT_RULE l)) ++ fNODE "match_context" (1 + (List.length l)) | CT_match_context_reverse(x,l) -> - fCONTEXT_RULE x; - (List.iter fCONTEXT_RULE l); + fCONTEXT_RULE x ++ + (List.fold_left (++) (mt()) (List.map fCONTEXT_RULE l)) ++ fNODE "match_context_reverse" (1 + (List.length l)) | CT_match_tac(x1, x2) -> - fTACTIC_COM x1; - fMATCH_TAC_RULES x2; + fTACTIC_COM x1 ++ + fMATCH_TAC_RULES x2 ++ fNODE "match_tac" 2 | CT_move_after(x1, x2) -> - fID x1; - fID x2; + fID x1 ++ + fID x2 ++ fNODE "move_after" 2 | CT_new_destruct(x1, x2, x3) -> - (List.iter fFORMULA_OR_INT x1); (* Julien F. Est-ce correct? *) - fUSING x2; - fINTRO_PATT_OPT x3; + (List.fold_left (++) (mt()) (List.map fFORMULA_OR_INT x1)) ++ (* Julien F. Est-ce correct? *) + fUSING x2 ++ + fINTRO_PATT_OPT x3 ++ fNODE "new_destruct" 3 | CT_new_induction(x1, x2, x3) -> - (List.iter fFORMULA_OR_INT x1); (* Pierre C. Est-ce correct? *) - fUSING x2; - fINTRO_PATT_OPT x3; + (List.fold_left (++) (mt()) (List.map fFORMULA_OR_INT x1)) ++ (* Pierre C. Est-ce correct? *) + fUSING x2 ++ + fINTRO_PATT_OPT x3 ++ fNODE "new_induction" 3 | CT_omega -> fNODE "omega" 0 | CT_orelse(x1, x2) -> - fTACTIC_COM x1; - fTACTIC_COM x2; + fTACTIC_COM x1 ++ + fTACTIC_COM x2 ++ fNODE "orelse" 2 | CT_parallel(x,l) -> - fTACTIC_COM x; - (List.iter fTACTIC_COM l); + fTACTIC_COM x ++ + (List.fold_left (++) (mt()) (List.map fTACTIC_COM l)) ++ fNODE "parallel" (1 + (List.length l)) | CT_pose(x1, x2) -> - fID_OPT x1; - fFORMULA x2; + fID_OPT x1 ++ + fFORMULA x2 ++ fNODE "pose" 2 | CT_progress(x1) -> - fTACTIC_COM x1; + fTACTIC_COM x1 ++ fNODE "progress" 1 | CT_prolog(x1, x2) -> - fFORMULA_LIST x1; - fINT x2; + fFORMULA_LIST x1 ++ + fINT x2 ++ fNODE "prolog" 2 | CT_rec_tactic_in(x1, x2) -> - fREC_TACTIC_FUN_LIST x1; - fTACTIC_COM x2; + fREC_TACTIC_FUN_LIST x1 ++ + fTACTIC_COM x2 ++ fNODE "rec_tactic_in" 2 | CT_reduce(x1, x2) -> - fRED_COM x1; - fCLAUSE x2; + fRED_COM x1 ++ + fCLAUSE x2 ++ fNODE "reduce" 2 | CT_refine(x1) -> - fFORMULA x1; + fFORMULA x1 ++ fNODE "refine" 1 | CT_reflexivity -> fNODE "reflexivity" 0 | CT_rename(x1, x2) -> - fID x1; - fID x2; + fID x1 ++ + fID x2 ++ fNODE "rename" 2 | CT_repeat(x1) -> - fTACTIC_COM x1; + fTACTIC_COM x1 ++ fNODE "repeat" 1 | CT_replace_with(x1, x2,x3,x4) -> - fFORMULA x1; - fFORMULA x2; - fCLAUSE x3; - fTACTIC_OPT x4; + fFORMULA x1 ++ + fFORMULA x2 ++ + fCLAUSE x3 ++ + fTACTIC_OPT x4 ++ fNODE "replace_with" 4 | CT_rewrite_lr(x1, x2, x3) -> - fFORMULA x1; - fSPEC_LIST x2; - fCLAUSE x3; + fFORMULA x1 ++ + fSPEC_LIST x2 ++ + fCLAUSE x3 ++ fNODE "rewrite_lr" 3 | CT_rewrite_rl(x1, x2, x3) -> - fFORMULA x1; - fSPEC_LIST x2; - fCLAUSE x3; + fFORMULA x1 ++ + fSPEC_LIST x2 ++ + fCLAUSE x3 ++ fNODE "rewrite_rl" 3 | CT_right(x1) -> - fSPEC_LIST x1; + fSPEC_LIST x1 ++ fNODE "right" 1 | CT_ring(x1) -> - fFORMULA_LIST x1; + fFORMULA_LIST x1 ++ fNODE "ring" 1 | CT_simple_user_tac(x1, x2) -> - fID x1; - fTACTIC_ARG_LIST x2; + fID x1 ++ + fTACTIC_ARG_LIST x2 ++ fNODE "simple_user_tac" 2 | CT_simplify_eq(x1) -> - fID_OR_INT_OPT x1; + fID_OR_INT_OPT x1 ++ fNODE "simplify_eq" 1 | CT_specialize(x1, x2, x3) -> - fINT_OPT x1; - fFORMULA x2; - fSPEC_LIST x3; + fINT_OPT x1 ++ + fFORMULA x2 ++ + fSPEC_LIST x3 ++ fNODE "specialize" 3 | CT_split(x1) -> - fSPEC_LIST x1; + fSPEC_LIST x1 ++ fNODE "split" 1 | CT_subst(x1) -> - fID_LIST x1; + fID_LIST x1 ++ fNODE "subst" 1 | CT_superauto(x1, x2, x3, x4) -> - fINT_OPT x1; - fID_LIST x2; - fDESTRUCTING x3; - fUSINGTDB x4; + fINT_OPT x1 ++ + fID_LIST x2 ++ + fDESTRUCTING x3 ++ + fUSINGTDB x4 ++ fNODE "superauto" 4 | CT_symmetry(x1) -> - fCLAUSE x1; + fCLAUSE x1 ++ fNODE "symmetry" 1 | CT_tac_double(x1, x2) -> - fID_OR_INT x1; - fID_OR_INT x2; + fID_OR_INT x1 ++ + fID_OR_INT x2 ++ fNODE "tac_double" 2 | CT_tacsolve(x,l) -> - fTACTIC_COM x; - (List.iter fTACTIC_COM l); + fTACTIC_COM x ++ + (List.fold_left (++) (mt()) (List.map fTACTIC_COM l)) ++ fNODE "tacsolve" (1 + (List.length l)) | CT_tactic_fun(x1, x2) -> - fID_OPT_NE_LIST x1; - fTACTIC_COM x2; + fID_OPT_NE_LIST x1 ++ + fTACTIC_COM x2 ++ fNODE "tactic_fun" 2 | CT_then(x,l) -> - fTACTIC_COM x; - (List.iter fTACTIC_COM l); + fTACTIC_COM x ++ + (List.fold_left (++) (mt()) (List.map fTACTIC_COM l)) ++ fNODE "then" (1 + (List.length l)) | CT_transitivity(x1) -> - fFORMULA x1; + fFORMULA x1 ++ fNODE "transitivity" 1 | CT_trivial -> fNODE "trivial" 0 | CT_trivial_with(x1) -> - fID_NE_LIST_OR_STAR x1; + fID_NE_LIST_OR_STAR x1 ++ fNODE "trivial_with" 1 | CT_truecut(x1, x2) -> - fID_OPT x1; - fFORMULA x2; + fID_OPT x1 ++ + fFORMULA x2 ++ fNODE "truecut" 2 | CT_try(x1) -> - fTACTIC_COM x1; + fTACTIC_COM x1 ++ fNODE "try" 1 | CT_use(x1) -> - fFORMULA x1; + fFORMULA x1 ++ fNODE "use" 1 | CT_use_inversion(x1, x2, x3) -> - fID_OR_INT x1; - fFORMULA x2; - fID_LIST x3; + fID_OR_INT x1 ++ + fFORMULA x2 ++ + fID_LIST x3 ++ fNODE "use_inversion" 3 | CT_user_tac(x1, x2) -> - fID x1; - fTARG_LIST x2; + fID x1 ++ + fTARG_LIST x2 ++ fNODE "user_tac" 2 and fTACTIC_OPT = function | CT_coerce_NONE_to_TACTIC_OPT x -> fNONE x | CT_coerce_TACTIC_COM_to_TACTIC_OPT x -> fTACTIC_COM x and fTAC_DEF = function | CT_tac_def(x1, x2) -> - fID x1; - fTACTIC_COM x2; + fID x1 ++ + fTACTIC_COM x2 ++ fNODE "tac_def" 2 and fTAC_DEF_NE_LIST = function | CT_tac_def_ne_list(x,l) -> - fTAC_DEF x; - (List.iter fTAC_DEF l); + fTAC_DEF x ++ + (List.fold_left (++) (mt()) (List.map fTAC_DEF l)) ++ fNODE "tac_def_ne_list" (1 + (List.length l)) and fTARG = function | CT_coerce_BINDING_to_TARG x -> fBINDING x @@ -1824,81 +1843,83 @@ and fTARG = function | CT_coerce_UNFOLD_NE_LIST_to_TARG x -> fUNFOLD_NE_LIST x and fTARG_LIST = function | CT_targ_list l -> - (List.iter fTARG l); + (List.fold_left (++) (mt()) (List.map fTARG l)) ++ fNODE "targ_list" (List.length l) and fTERM_CHANGE = function | CT_check_term(x1) -> - fFORMULA x1; + fFORMULA x1 ++ fNODE "check_term" 1 | CT_inst_term(x1, x2) -> - fID x1; - fFORMULA x2; + fID x1 ++ + fFORMULA x2 ++ fNODE "inst_term" 2 and fTEXT = function | CT_coerce_ID_to_TEXT x -> fID x | CT_text_formula(x1) -> - fFORMULA x1; + fFORMULA x1 ++ fNODE "text_formula" 1 | CT_text_h l -> - (List.iter fTEXT l); + (List.fold_left (++) (mt()) (List.map fTEXT l)) ++ fNODE "text_h" (List.length l) | CT_text_hv l -> - (List.iter fTEXT l); + (List.fold_left (++) (mt()) (List.map fTEXT l)) ++ fNODE "text_hv" (List.length l) | CT_text_op l -> - (List.iter fTEXT l); + (List.fold_left (++) (mt()) (List.map fTEXT l)) ++ fNODE "text_op" (List.length l) | CT_text_path(x1) -> - fSIGNED_INT_LIST x1; + fSIGNED_INT_LIST x1 ++ fNODE "text_path" 1 | CT_text_v l -> - (List.iter fTEXT l); + (List.fold_left (++) (mt()) (List.map fTEXT l)) ++ fNODE "text_v" (List.length l) and fTHEOREM_GOAL = function | CT_goal(x1) -> - fFORMULA x1; + fFORMULA x1 ++ fNODE "goal" 1 | CT_theorem_goal(x1, x2, x3, x4) -> - fDEFN_OR_THM x1; - fID x2; - fBINDER_LIST x3; - fFORMULA x4; + fDEFN_OR_THM x1 ++ + fID x2 ++ + fBINDER_LIST x3 ++ + fFORMULA x4 ++ fNODE "theorem_goal" 4 and fTHM = function -| CT_thm x -> fATOM "thm"; - (f_atom_string x); - print_string "\n"and fTHM_OPT = function +| CT_thm x -> fATOM "thm" ++ + (f_atom_string x) ++ + str "\n" +and fTHM_OPT = function | CT_coerce_NONE_to_THM_OPT x -> fNONE x | CT_coerce_THM_to_THM_OPT x -> fTHM x and fTYPED_FORMULA = function | CT_typed_formula(x1, x2) -> - fFORMULA x1; - fFORMULA x2; + fFORMULA x1 ++ + fFORMULA x2 ++ fNODE "typed_formula" 2 and fUNFOLD = function | CT_coerce_ID_to_UNFOLD x -> fID x | CT_unfold_occ(x1, x2) -> - fID x1; - fINT_NE_LIST x2; + fID x1 ++ + fINT_NE_LIST x2 ++ fNODE "unfold_occ" 2 and fUNFOLD_NE_LIST = function | CT_unfold_ne_list(x,l) -> - fUNFOLD x; - (List.iter fUNFOLD l); + fUNFOLD x ++ + (List.fold_left (++) (mt()) (List.map fUNFOLD l)) ++ fNODE "unfold_ne_list" (1 + (List.length l)) and fUSING = function | CT_coerce_NONE_to_USING x -> fNONE x | CT_using(x1, x2) -> - fFORMULA x1; - fSPEC_LIST x2; + fFORMULA x1 ++ + fSPEC_LIST x2 ++ fNODE "using" 2 and fUSINGTDB = function | CT_coerce_NONE_to_USINGTDB x -> fNONE x | CT_usingtdb -> fNODE "usingtdb" 0 and fVAR = function -| CT_var x -> fATOM "var"; - (f_atom_string x); - print_string "\n"and fVARG = function +| CT_var x -> fATOM "var" ++ + (f_atom_string x) ++ + str "\n" +and fVARG = function | CT_coerce_AST_to_VARG x -> fAST x | CT_coerce_AST_LIST_to_VARG x -> fAST_LIST x | CT_coerce_BINDER_to_VARG x -> fBINDER x @@ -1916,7 +1937,7 @@ and fVAR = function | CT_coerce_VARG_LIST_to_VARG x -> fVARG_LIST x and fVARG_LIST = function | CT_varg_list l -> - (List.iter fVARG l); + (List.fold_left (++) (mt()) (List.map fVARG l)) ++ fNODE "varg_list" (List.length l) and fVERBOSE_OPT = function | CT_coerce_NONE_to_VERBOSE_OPT x -> fNONE x diff --git a/contrib/interface/vtp.mli b/contrib/interface/vtp.mli index fe30b317..d7bd8db5 100644 --- a/contrib/interface/vtp.mli +++ b/contrib/interface/vtp.mli @@ -1,15 +1,16 @@ open Ascent;; +open Pp;; -val fCOMMAND_LIST : ct_COMMAND_LIST -> unit;; -val fCOMMAND : ct_COMMAND -> unit;; -val fTACTIC_COM : ct_TACTIC_COM -> unit;; -val fFORMULA : ct_FORMULA -> unit;; -val fID : ct_ID -> unit;; -val fSTRING : ct_STRING -> unit;; -val fINT : ct_INT -> unit;; -val fRULE_LIST : ct_RULE_LIST -> unit;; -val fRULE : ct_RULE -> unit;; -val fSIGNED_INT_LIST : ct_SIGNED_INT_LIST -> unit;; -val fPREMISES_LIST : ct_PREMISES_LIST -> unit;; -val fID_LIST : ct_ID_LIST -> unit;; -val fTEXT : ct_TEXT -> unit;; \ No newline at end of file +val fCOMMAND_LIST : ct_COMMAND_LIST -> std_ppcmds;; +val fCOMMAND : ct_COMMAND -> std_ppcmds;; +val fTACTIC_COM : ct_TACTIC_COM -> std_ppcmds;; +val fFORMULA : ct_FORMULA -> std_ppcmds;; +val fID : ct_ID -> std_ppcmds;; +val fSTRING : ct_STRING -> std_ppcmds;; +val fINT : ct_INT -> std_ppcmds;; +val fRULE_LIST : ct_RULE_LIST -> std_ppcmds;; +val fRULE : ct_RULE -> std_ppcmds;; +val fSIGNED_INT_LIST : ct_SIGNED_INT_LIST -> std_ppcmds;; +val fPREMISES_LIST : ct_PREMISES_LIST -> std_ppcmds;; +val fID_LIST : ct_ID_LIST -> std_ppcmds;; +val fTEXT : ct_TEXT -> std_ppcmds;; diff --git a/contrib/interface/xlate.ml b/contrib/interface/xlate.ml index df03a579..7d1f57fe 100644 --- a/contrib/interface/xlate.ml +++ b/contrib/interface/xlate.ml @@ -15,12 +15,6 @@ open Libnames;; open Goptions;; -let in_coq_ref = ref false;; - -let declare_in_coq () = in_coq_ref:=true;; - -let in_coq () = !in_coq_ref;; - (* // Verify whether this is dead code, as of coq version 7 *) (* The following three sentences have been added to cope with a change of strategy from the Coq team in the way rules construct ast's. The @@ -203,6 +197,10 @@ let xlate_int_or_var_opt_to_int_opt = function | Some (ArgVar _) -> xlate_error "int_or_var: TODO" | None -> CT_coerce_NONE_to_INT_OPT CT_none +let apply_or_by_notation f = function + | AN x -> f x + | ByNotation _ -> xlate_error "TODO: ByNotation" + let tac_qualid_to_ct_ID ref = CT_ident (Libnames.string_of_qualid (snd (qualid_of_reference ref))) @@ -307,14 +305,10 @@ let make_fix_struct (n,bl) = let names = names_of_local_assums bl in let nn = List.length names in if nn = 1 || n = None then ctv_ID_OPT_NONE - else - let n = out_some n in - if n < nn then xlate_id_opt(List.nth names n) - else xlate_error "unexpected result of parsing for Fixpoint";; - + else ctf_ID_OPT_SOME(CT_ident (string_of_id (snd (Option.get n))));; let rec xlate_binder = function - (l,t) -> CT_binder(xlate_id_opt_ne_list l, xlate_formula t) + (l,k,t) -> CT_binder(xlate_id_opt_ne_list l, xlate_formula t) and xlate_return_info = function | (Some Anonymous, None) | (None, None) -> CT_coerce_NONE_to_RETURN_INFO CT_none @@ -327,7 +321,7 @@ and xlate_formula_opt = | Some e -> CT_coerce_FORMULA_to_FORMULA_OPT (xlate_formula e) and xlate_binder_l = function - LocalRawAssum(l,t) -> CT_binder(xlate_id_opt_ne_list l, xlate_formula t) + LocalRawAssum(l,_,t) -> CT_binder(xlate_id_opt_ne_list l, xlate_formula t) | LocalRawDef(n,v) -> CT_coerce_DEF_to_BINDER(CT_def(xlate_id_opt n, xlate_formula v)) and @@ -336,7 +330,7 @@ and | a::l -> CT_match_pattern_ne_list(xlate_match_pattern a, List.map xlate_match_pattern l) and translate_one_equation = function - (_,[lp], a) -> CT_eqn (xlate_match_pattern_ne_list lp, xlate_formula a) + (_,[_,lp], a) -> CT_eqn (xlate_match_pattern_ne_list lp, xlate_formula a) | _ -> xlate_error "TODO: disjunctive multiple patterns" and xlate_binder_ne_list = function @@ -379,8 +373,8 @@ and (xlate_formula:Topconstr.constr_expr -> Ascent.ct_FORMULA) = function (xlate_formula f, List.map xlate_formula_expl l')) | CApp(_, (_,f), l) -> CT_appc(xlate_formula f, xlate_formula_expl_ne_list l) - | CCases (_, _, [], _) -> assert false - | CCases (_, ret_type, tm::tml, eqns)-> + | CCases (_, _, _, [], _) -> assert false + | CCases (_, _, ret_type, tm::tml, eqns)-> CT_cases(CT_matched_formula_ne_list(xlate_matched_formula tm, List.map xlate_matched_formula tml), xlate_formula_opt ret_type, @@ -418,23 +412,16 @@ and (xlate_formula:Topconstr.constr_expr -> Ascent.ct_FORMULA) = function CT_coerce_ID_to_FORMULA(CT_metaid (string_of_id s)) | CPatVar (_, (true, s)) -> xlate_error "Second order variable not supported" - | CEvar (_, _) -> xlate_error "CEvar not supported" + | CEvar _ -> xlate_error "CEvar not supported" | CCoFix (_, (_, id), lm::lmi) -> - let strip_mutcorec (fid, bl,arf, ardef) = + let strip_mutcorec ((_, fid), bl,arf, ardef) = CT_cofix_rec (xlate_ident fid, xlate_binder_list bl, xlate_formula arf, xlate_formula ardef) in CT_cofixc(xlate_ident id, (CT_cofix_rec_list (strip_mutcorec lm, List.map strip_mutcorec lmi))) | CFix (_, (_, id), lm::lmi) -> - let strip_mutrec (fid, (n, ro), bl, arf, ardef) = - let (struct_arg,bl,arf,ardef) = - (* Pierre L: could the case [n=None && bl=[]] happen ? Normally not *) - (* By the way, how could [bl = []] happen in V8 syntax ? *) - if bl = [] then - let n = out_some n in - let (bl,arf,ardef) = Ppconstr.split_fix (n+1) arf ardef in - (xlate_id_opt(List.nth (names_of_local_assums bl) n),bl,arf,ardef) - else (make_fix_struct (n, bl),bl,arf,ardef) in + let strip_mutrec ((_, fid), (n, ro), bl, arf, ardef) = + let struct_arg = make_fix_struct (n, bl) in let arf = xlate_formula arf in let ardef = xlate_formula ardef in match xlate_binder_list bl with @@ -461,7 +448,7 @@ and xlate_matched_formula = function CT_coerce_FORMULA_to_MATCHED_FORMULA(xlate_formula f) and xlate_formula_expl = function (a, None) -> xlate_formula a - | (a, Some (_,ExplByPos i)) -> + | (a, Some (_,ExplByPos (i, _))) -> xlate_error "explicitation of implicit by rank not supported" | (a, Some (_,ExplByName i)) -> CT_labelled_arg(CT_ident (string_of_id i), xlate_formula a) @@ -477,24 +464,31 @@ let (xlate_ident_or_metaid: AI (_, x) -> xlate_ident x | MetaId(_, x) -> CT_metaid x;; +let nums_of_occs (b,nums) = + if b then nums + else List.map (function ArgArg x -> ArgArg (-x) | y -> y) nums + let xlate_hyp = function | AI (_,id) -> xlate_ident id | MetaId _ -> xlate_error "MetaId should occur only in quotations" let xlate_hyp_location = function - | (nums, AI (_,id)), InHypTypeOnly -> - CT_intype(xlate_ident id, nums_or_var_to_int_list nums) - | (nums, AI (_,id)), InHypValueOnly -> - CT_invalue(xlate_ident id, nums_or_var_to_int_list nums) - | ([], AI (_,id)), InHyp -> + | (occs, AI (_,id)), InHypTypeOnly -> + CT_intype(xlate_ident id, nums_or_var_to_int_list (nums_of_occs occs)) + | (occs, AI (_,id)), InHypValueOnly -> + CT_invalue(xlate_ident id, nums_or_var_to_int_list (nums_of_occs occs)) + | (occs, AI (_,id)), InHyp when occs = all_occurrences_expr -> CT_coerce_UNFOLD_to_HYP_LOCATION (CT_coerce_ID_to_UNFOLD (xlate_ident id)) - | (a::l, AI (_,id)), InHyp -> + | ((_,a::l as occs), AI (_,id)), InHyp -> + let nums = nums_of_occs occs in + let a = List.hd nums and l = List.tl nums in CT_coerce_UNFOLD_to_HYP_LOCATION (CT_unfold_occ (xlate_ident id, CT_int_ne_list(num_or_var_to_int a, nums_or_var_to_int_list_aux l))) + | (_, AI (_,id)), InHyp -> xlate_error "Unused" (* (true,]) *) | (_, MetaId _),_ -> xlate_error "MetaId not supported in xlate_hyp_location (should occur only in quotations)" @@ -507,7 +501,7 @@ let xlate_clause cls = | Some l -> CT_hyp_location_list(List.map xlate_hyp_location l) in CT_clause (hyps_info, - if cls.onconcl then + if cls.concl_occs <> no_occurrences_expr then CT_coerce_STAR_to_STAR_OPT CT_star else CT_coerce_NONE_to_STAR_OPT CT_none) @@ -606,14 +600,15 @@ let strip_targ_intropatt = | _ -> xlate_error "strip_targ_intropatt";; let get_flag r = - let conv_flags, red_ids = + let conv_flags, red_ids = + let csts = List.map (apply_or_by_notation tac_qualid_to_ct_ID) r.rConst in if r.rDelta then - [CT_delta], CT_unfbut (List.map tac_qualid_to_ct_ID r.rConst) + [CT_delta], CT_unfbut csts else (if r.rConst = [] then (* probably useless: just for compatibility *) [] else [CT_delta]), - CT_unf (List.map tac_qualid_to_ct_ID r.rConst) in + CT_unf csts in let conv_flags = if r.rBeta then CT_beta::conv_flags else conv_flags in let conv_flags = if r.rIota then CT_iota::conv_flags else conv_flags in let conv_flags = if r.rZeta then CT_zeta::conv_flags else conv_flags in @@ -633,6 +628,8 @@ let rec xlate_intro_pattern = | IntroWildcard -> CT_coerce_ID_to_INTRO_PATT(CT_ident "_" ) | IntroIdentifier c -> CT_coerce_ID_to_INTRO_PATT(xlate_ident c) | IntroAnonymous -> xlate_error "TODO: IntroAnonymous" + | IntroFresh _ -> xlate_error "TODO: IntroFresh" + | IntroRewrite _ -> xlate_error "TODO: IntroRewrite" let compute_INV_TYPE = function FullInversionClear -> CT_inv_clear @@ -663,7 +660,8 @@ let xlate_largs_to_id_opt largs = | _ -> assert false;; let xlate_int_or_constr = function - ElimOnConstr a -> CT_coerce_FORMULA_to_FORMULA_OR_INT(xlate_formula a) + ElimOnConstr (a,NoBindings) -> CT_coerce_FORMULA_to_FORMULA_OR_INT(xlate_formula a) + | ElimOnConstr _ -> xlate_error "TODO: ElimOnConstr with bindings" | ElimOnIdent(_,i) -> CT_coerce_ID_OR_INT_to_FORMULA_OR_INT (CT_coerce_ID_to_ID_OR_INT(xlate_ident i)) @@ -676,9 +674,13 @@ let xlate_using = function | Some (c2,sl2) -> CT_using (xlate_formula c2, xlate_bindings sl2);; let xlate_one_unfold_block = function - ([],qid) -> CT_coerce_ID_to_UNFOLD(tac_qualid_to_ct_ID qid) - | (n::nums, qid) -> - CT_unfold_occ(tac_qualid_to_ct_ID qid, nums_or_var_to_int_ne_list n nums) + ((true,[]),qid) -> + CT_coerce_ID_to_UNFOLD(apply_or_by_notation tac_qualid_to_ct_ID qid) + | (((_,_::_) as occs), qid) -> + let l = nums_of_occs occs in + CT_unfold_occ(apply_or_by_notation tac_qualid_to_ct_ID qid, + nums_or_var_to_int_ne_list (List.hd l) (List.tl l)) + | ((false,[]), qid) -> xlate_error "Unused" ;; let xlate_with_names = function @@ -739,7 +741,8 @@ and xlate_red_tactic = | CbvVm -> CT_cbvvm | Hnf -> CT_hnf | Simpl None -> CT_simpl ctv_PATTERN_OPT_NONE - | Simpl (Some (l,c)) -> + | Simpl (Some (occs,c)) -> + let l = nums_of_occs occs in CT_simpl (CT_coerce_PATTERN_to_PATTERN_OPT (CT_pattern_occ @@ -758,9 +761,9 @@ and xlate_red_tactic = | Fold formula_list -> CT_fold(CT_formula_list(List.map xlate_formula formula_list)) | Pattern l -> - let pat_list = List.map (fun (nums,c) -> + let pat_list = List.map (fun (occs,c) -> CT_pattern_occ - (CT_int_list (nums_or_var_to_int_list_aux nums), + (CT_int_list (nums_or_var_to_int_list_aux (nums_of_occs occs)), xlate_formula c)) l in (match pat_list with | first :: others -> CT_pattern (CT_pattern_ne_list (first, others)) @@ -770,21 +773,23 @@ and xlate_red_tactic = and xlate_local_rec_tac = function (* TODO LATER: local recursive tactics and global ones should be handled in the same manner *) - | ((_,x),(argl,tac)) -> + | ((_,x),Tacexp (TacFun (argl,tac))) -> let fst, rest = xlate_largs_to_id_opt argl in CT_rec_tactic_fun(xlate_ident x, CT_id_opt_ne_list(fst, rest), xlate_tactic tac) + | _ -> xlate_error "TODO: more general argument of 'let rec in'" and xlate_tactic = function | TacFun (largs, t) -> let fst, rest = xlate_largs_to_id_opt largs in CT_tactic_fun (CT_id_opt_ne_list(fst, rest), xlate_tactic t) - | TacThen (t1,t2) -> + | TacThen (t1,[||],t2,[||]) -> (match xlate_tactic t1 with CT_then(a,l) -> CT_then(a,l@[xlate_tactic t2]) | t -> CT_then (t,[xlate_tactic t2])) + | TacThen _ -> xlate_error "TacThen generalization TODO" | TacThens(t1,[]) -> assert false | TacThens(t1,t::l) -> let ct = xlate_tactic t in @@ -831,36 +836,31 @@ and xlate_tactic = | TacMatchContext (false,true,rule1::rules) -> CT_match_context_reverse(xlate_context_rule rule1, List.map xlate_context_rule rules) - | TacLetIn (l, t) -> + | TacLetIn (false, l, t) -> let cvt_clause = function - ((_,s),None,ConstrMayEval v) -> + ((_,s),ConstrMayEval v) -> CT_let_clause(xlate_ident s, CT_coerce_NONE_to_TACTIC_OPT CT_none, CT_coerce_DEF_BODY_to_LET_VALUE (formula_to_def_body v)) - | ((_,s),None,Tacexp t) -> + | ((_,s),Tacexp t) -> CT_let_clause(xlate_ident s, CT_coerce_NONE_to_TACTIC_OPT CT_none, CT_coerce_TACTIC_COM_to_LET_VALUE (xlate_tactic t)) - | ((_,s),None,t) -> + | ((_,s),t) -> CT_let_clause(xlate_ident s, CT_coerce_NONE_to_TACTIC_OPT CT_none, CT_coerce_TACTIC_COM_to_LET_VALUE - (xlate_call_or_tacarg t)) - | ((_,s),Some c,t) -> - CT_let_clause(xlate_ident s, - CT_coerce_TACTIC_COM_to_TACTIC_OPT(xlate_tactic c), - CT_coerce_TACTIC_COM_to_LET_VALUE - (xlate_call_or_tacarg t)) in + (xlate_call_or_tacarg t)) in let cl_l = List.map cvt_clause l in (match cl_l with | [] -> assert false | fst::others -> CT_let_ltac (CT_let_clauses(fst, others), mk_let_value t)) - | TacLetRecIn([], _) -> xlate_error "recursive definition with no definition" - | TacLetRecIn(f1::l, t) -> + | TacLetIn(true, [], _) -> xlate_error "recursive definition with no definition" + | TacLetIn(true, f1::l, t) -> let tl = CT_rec_tactic_fun_list (xlate_local_rec_tac f1, List.map xlate_local_rec_tac l) in CT_rec_tactic_in(tl, xlate_tactic t) @@ -917,6 +917,7 @@ and xlate_tac = | TacChange (None, f, b) -> CT_change (xlate_formula f, xlate_clause b) | TacChange (Some(l,c), f, b) -> (* TODO LATER: combine with other constructions of pattern_occ *) + let l = nums_of_occs l in CT_change_local( CT_pattern_occ(CT_int_list(nums_or_var_to_int_list_aux l), xlate_formula c), @@ -946,18 +947,22 @@ and xlate_tac = xlate_error "TODO: injection as" | TacFix (idopt, n) -> CT_fixtactic (xlate_ident_opt idopt, CT_int n, CT_fix_tac_list []) - | TacMutualFix (id, n, fixtac_list) -> + | TacMutualFix (false, id, n, fixtac_list) -> let f (id,n,c) = CT_fixtac (xlate_ident id, CT_int n, xlate_formula c) in CT_fixtactic (ctf_ID_OPT_SOME (xlate_ident id), CT_int n, CT_fix_tac_list (List.map f fixtac_list)) + | TacMutualFix (true, id, n, fixtac_list) -> + xlate_error "TODO: non user-visible fix" | TacCofix idopt -> CT_cofixtactic (xlate_ident_opt idopt, CT_cofix_tac_list []) - | TacMutualCofix (id, cofixtac_list) -> + | TacMutualCofix (false, id, cofixtac_list) -> let f (id,c) = CT_cofixtac (xlate_ident id, xlate_formula c) in CT_cofixtactic (CT_coerce_ID_to_ID_OPT (xlate_ident id), CT_cofix_tac_list (List.map f cofixtac_list)) + | TacMutualCofix (true, id, cofixtac_list) -> + xlate_error "TODO: non user-visible cofix" | TacIntrosUntil (NamedHyp id) -> CT_intros_until (CT_coerce_ID_to_ID_OR_INT (xlate_ident id)) | TacIntrosUntil (AnonHyp n) -> @@ -975,10 +980,12 @@ and xlate_tac = | TacIntroMove (Some id, None) -> CT_intros (CT_intro_patt_list[CT_coerce_ID_to_INTRO_PATT(xlate_ident id)]) | TacIntroMove (None, None) -> CT_intro (CT_coerce_NONE_to_ID_OPT CT_none) - | TacLeft bindl -> CT_left (xlate_bindings bindl) - | TacRight bindl -> CT_right (xlate_bindings bindl) - | TacSplit (false,bindl) -> CT_split (xlate_bindings bindl) - | TacSplit (true,bindl) -> CT_exists (xlate_bindings bindl) + | TacLeft (false,bindl) -> CT_left (xlate_bindings bindl) + | TacRight (false,bindl) -> CT_right (xlate_bindings bindl) + | TacSplit (false,false,bindl) -> CT_split (xlate_bindings bindl) + | TacSplit (false,true,bindl) -> CT_exists (xlate_bindings bindl) + | TacSplit _ | TacRight _ | TacLeft _ -> + xlate_error "TODO: esplit, eright, etc" | TacExtend (_,"replace", [c1; c2;cl;tac_opt]) -> let c1 = xlate_formula (out_gen rawwit_constr c1) in let c2 = xlate_formula (out_gen rawwit_constr c2) in @@ -991,7 +998,7 @@ and xlate_tac = let cl_as_xlate_arg = {cl_as_clause with Tacexpr.onhyps = - option_map + Option.map (fun l -> List.map (fun ((l,id),hyp_flag) -> ((l, Tacexpr.AI ((),id)) ,hyp_flag)) l ) @@ -1009,12 +1016,15 @@ and xlate_tac = CT_coerce_TACTIC_COM_to_TACTIC_OPT tac in CT_replace_with (c1, c2,cl,tac_opt) - | TacRewrite(b,cbindl,cl) -> + | TacRewrite(false,[b,Precisely 1,cbindl],cl,None) -> let cl = xlate_clause cl and c = xlate_formula (fst cbindl) and bindl = xlate_bindings (snd cbindl) in if b then CT_rewrite_lr (c, bindl, cl) else CT_rewrite_rl (c, bindl, cl) + | TacRewrite(_,_,_,Some _) -> xlate_error "TODO: rewrite by" + | TacRewrite(false,_,cl,_) -> xlate_error "TODO: rewrite of several hyps at once" + | TacRewrite(true,_,cl,_) -> xlate_error "TODO: erewrite" | TacExtend (_,"conditional_rewrite", [t; b; cbindl]) -> let t = out_gen rawwit_main_tactic t in let b = out_gen Extraargs.rawwit_orient b in @@ -1127,10 +1137,9 @@ and xlate_tac = (match out_gen rawwit_int_or_var n with | ArgVar _ -> xlate_error "" | ArgArg n -> CT_prolog (CT_formula_list cl, CT_int n)) - | TacExtend (_,"eapply", [cbindl]) -> - let (c,bindl) = out_gen rawwit_constr_with_bindings cbindl in - let c = xlate_formula c and bindl = xlate_bindings bindl in - CT_eapply (c, bindl) + (* eapply now represented by TacApply (true,cbindl) + | TacExtend (_,"eapply", [cbindl]) -> +*) | TacTrivial ([],Some []) -> CT_trivial | TacTrivial ([],None) -> CT_trivial_with(CT_coerce_STAR_to_ID_NE_LIST_OR_STAR CT_star) @@ -1141,25 +1150,36 @@ and xlate_tac = xlate_error "TODO: trivial using" | TacReduce (red, l) -> CT_reduce (xlate_red_tactic red, xlate_clause l) - | TacApply (c,bindl) -> + | TacApply (true,false,(c,bindl)) -> CT_apply (xlate_formula c, xlate_bindings bindl) - | TacConstructor (n_or_meta, bindl) -> + | TacApply (true,true,(c,bindl)) -> + CT_eapply (xlate_formula c, xlate_bindings bindl) + | TacApply (false,_,_) -> xlate_error "TODO: simple (e)apply" + | TacConstructor (false,n_or_meta, bindl) -> let n = match n_or_meta with AI n -> n | MetaId _ -> xlate_error "" in CT_constructor (CT_int n, xlate_bindings bindl) + | TacConstructor _ -> xlate_error "TODO: econstructor" | TacSpecialize (nopt, (c,sl)) -> CT_specialize (xlate_int_opt nopt, xlate_formula c, xlate_bindings sl) | TacGeneralize [] -> xlate_error "" - | TacGeneralize (first :: cl) -> + | TacGeneralize ((((true,[]),first),Anonymous) :: cl) + when List.for_all (fun ((o,_),na) -> o = all_occurrences_expr + & na = Anonymous) cl -> CT_generalize - (CT_formula_ne_list (xlate_formula first, List.map xlate_formula cl)) + (CT_formula_ne_list (xlate_formula first, + List.map (fun ((_,c),_) -> xlate_formula c) cl)) + | TacGeneralize _ -> xlate_error "TODO: Generalize at and as" | TacGeneralizeDep c -> CT_generalize_dependent (xlate_formula c) | TacElimType c -> CT_elim_type (xlate_formula c) | TacCaseType c -> CT_case_type (xlate_formula c) - | TacElim ((c1,sl), u) -> + | TacElim (false,(c1,sl), u) -> CT_elim (xlate_formula c1, xlate_bindings sl, xlate_using u) - | TacCase (c1,sl) -> + | TacCase (false,(c1,sl)) -> CT_casetac (xlate_formula c1, xlate_bindings sl) + | TacElim (true,_,_) | TacCase (true,_) + | TacNewDestruct (true,_,_,_,_) | TacNewInduction (true,_,_,_,_) -> + xlate_error "TODO: eelim, ecase, edestruct, einduction" | TacSimpleInduction h -> CT_induction (xlate_quantified_hypothesis h) | TacSimpleDestruct h -> CT_destruct (xlate_quantified_hypothesis h) | TacCut c -> CT_cut (xlate_formula c) @@ -1167,8 +1187,8 @@ and xlate_tac = | TacDecompose ([],c) -> xlate_error "Decompose : empty list of identifiers?" | TacDecompose (id::l,c) -> - let id' = tac_qualid_to_ct_ID id in - let l' = List.map tac_qualid_to_ct_ID l in + let id' = apply_or_by_notation tac_qualid_to_ct_ID id in + let l' = List.map (apply_or_by_notation tac_qualid_to_ct_ID) l in CT_decompose_list(CT_id_ne_list(id',l'),xlate_formula c) | TacDecomposeAnd c -> CT_decompose_record (xlate_formula c) | TacDecomposeOr c -> CT_decompose_sum(xlate_formula c) @@ -1178,6 +1198,7 @@ and xlate_tac = let idl' = List.map xlate_hyp idl in CT_clear (CT_id_ne_list (xlate_hyp id, idl')) | TacClear (true,_) -> xlate_error "TODO: 'clear - idl' and 'clear'" + | TacRevert _ -> xlate_error "TODO: revert" | (*For translating tactics/Inv.v *) TacInversion (NonDepInversion (k,idl,l),quant_hyp) -> CT_inversion(compute_INV_TYPE k, xlate_quantified_hypothesis quant_hyp, @@ -1192,30 +1213,36 @@ and xlate_tac = CT_use_inversion (id, xlate_formula c, CT_id_list (List.map xlate_hyp idlist)) | TacExtend (_,"omega", []) -> CT_omega - | TacRename (id1, id2) -> CT_rename(xlate_hyp id1, xlate_hyp id2) + | TacRename [id1, id2] -> CT_rename(xlate_hyp id1, xlate_hyp id2) + | TacRename _ -> xlate_error "TODO: add support for n-ary rename" | TacClearBody([]) -> assert false | TacClearBody(a::l) -> CT_clear_body (CT_id_ne_list (xlate_hyp a, List.map xlate_hyp l)) - | TacDAuto (a, b) -> + | TacDAuto (a, b, []) -> CT_dauto(xlate_int_or_var_opt_to_int_opt a, xlate_int_opt b) - | TacNewDestruct(a,b,c) -> - CT_new_destruct (* Julien F. : est-ce correct *) + | TacDAuto (a, b, _) -> + xlate_error "TODO: dauto using" + | TacNewDestruct(false,a,b,c,None) -> + CT_new_destruct (List.map xlate_int_or_constr a, xlate_using b, xlate_with_names c) - | TacNewInduction(a,b,c) -> - CT_new_induction (* Pierre C. : est-ce correct *) + | TacNewInduction(false,a,b,c,None) -> + CT_new_induction (List.map xlate_int_or_constr a, xlate_using b, xlate_with_names c) + | TacNewDestruct(false,a,b,c,_) -> xlate_error "TODO: destruct in" + | TacNewInduction(false,a,b,c,_) ->xlate_error "TODO: induction in" (*| TacInstantiate (a, b, cl) -> CT_instantiate(CT_int a, xlate_formula b, assert false) *) - | TacLetTac (na, c, cl) when cl = nowhere -> + | TacLetTac (na, c, cl, true) when cl = nowhere -> CT_pose(xlate_id_opt_aux na, xlate_formula c) - | TacLetTac (na, c, cl) -> + | TacLetTac (na, c, cl, true) -> CT_lettac(xlate_id_opt ((0,0),na), xlate_formula c, (* TODO LATER: This should be shared with Unfold, but the structures are different *) xlate_clause cl) + | TacLetTac (na, c, cl, false) -> xlate_error "TODO: remember" | TacAssert (None, IntroIdentifier id, c) -> CT_assert(xlate_id_opt ((0,0),Name id), xlate_formula c) | TacAssert (None, IntroAnonymous, c) -> @@ -1226,16 +1253,18 @@ and xlate_tac = CT_truecut(xlate_id_opt ((0,0),Anonymous), xlate_formula c) | TacAssert _ -> xlate_error "TODO: assert with 'as' and 'by' and pose proof with 'as'" - | TacAnyConstructor(Some tac) -> + | TacAnyConstructor(false,Some tac) -> CT_any_constructor (CT_coerce_TACTIC_COM_to_TACTIC_OPT(xlate_tactic tac)) - | TacAnyConstructor(None) -> + | TacAnyConstructor(false,None) -> CT_any_constructor(CT_coerce_NONE_to_TACTIC_OPT CT_none) + | TacAnyConstructor _ -> xlate_error "TODO: econstructor" | TacExtend(_, "ring", [args]) -> CT_ring (CT_formula_list (List.map xlate_formula (out_gen (wit_list0 rawwit_constr) args))) + | TacExtend (_, "f_equal", _) -> xlate_error "TODO: f_equal" | TacExtend (_,id, l) -> print_endline ("Extratactics : "^ id); CT_user_tac (CT_ident id, CT_targ_list (List.map coerce_genarg_to_TARG l)) @@ -1299,7 +1328,7 @@ and coerce_genarg_to_TARG x = (snd (out_gen (rawwit_open_constr_gen b) x)))) | ExtraArgType s as y when Pcoq.is_tactic_genarg y -> - let n = out_some (Pcoq.tactic_genarg_level s) in + let n = Option.get (Pcoq.tactic_genarg_level s) in let t = xlate_tactic (out_gen (Pcoq.rawwit_tactic n) x) in CT_coerce_TACTIC_COM_to_TARG t | ConstrWithBindingsArgType -> xlate_error "TODO: generic constr with bindings" @@ -1392,7 +1421,7 @@ let coerce_genarg_to_VARG x = | ConstrMayEvalArgType -> xlate_error"TODO: generic constr-may-eval argument" | QuantHypArgType ->xlate_error"TODO: generic quantified hypothesis argument" | ExtraArgType s as y when Pcoq.is_tactic_genarg y -> - let n = out_some (Pcoq.tactic_genarg_level s) in + let n = Option.get (Pcoq.tactic_genarg_level s) in let t = xlate_tactic (out_gen (Pcoq.rawwit_tactic n) x) in CT_coerce_TACTIC_OPT_to_VARG (CT_coerce_TACTIC_COM_to_TACTIC_OPT t) | OpenConstrArgType _ -> xlate_error "TODO: generic open constr" @@ -1563,7 +1592,9 @@ let rec xlate_module_type = function | CWith_Module((_, idl), (_, qid)) -> CT_module_type_with_mod(mty1, CT_id_list (List.map xlate_ident idl), - CT_ident (xlate_qualid qid)));; + CT_ident (xlate_qualid qid))) + | CMTEapply (_,_) -> xlate_error "TODO: Funsig application";; + let xlate_module_binder_list (l:module_binder list) = CT_module_binder_list @@ -1596,8 +1627,8 @@ let rec xlate_vernac = | VernacDeclareTacticDefinition (true, tacs) -> (match List.map (function - ((_, id), body) -> - CT_tac_def(CT_ident (string_of_id id), xlate_tactic body)) + (id, _, body) -> + CT_tac_def(reference_to_ct_ID id, xlate_tactic body)) tacs with [] -> assert false | fst::tacs1 -> @@ -1714,7 +1745,7 @@ let rec xlate_vernac = CT_id_ne_list(n1, names), dblist) | HintsExtern (n, c, t) -> CT_hint_extern(CT_int n, xlate_formula c, xlate_tactic t, dblist) - | HintsResolve l | HintsImmediate l -> + | HintsImmediate l -> let f1, formulas = match List.map xlate_formula l with a :: tl -> a, tl | _ -> failwith "" in @@ -1731,6 +1762,23 @@ let rec xlate_vernac = HintsResolve _ -> CT_hints_resolve(l', dblist) | HintsImmediate _ -> CT_hints_immediate(l', dblist) | _ -> assert false) + | HintsResolve l -> + let f1, formulas = match List.map xlate_formula (List.map snd l) with + a :: tl -> a, tl + | _ -> failwith "" in + let l' = CT_formula_ne_list(f1, formulas) in + if local then + (match h with + HintsResolve _ -> + CT_local_hints_resolve(l', dblist) + | HintsImmediate _ -> + CT_local_hints_immediate(l', dblist) + | _ -> assert false) + else + (match h with + HintsResolve _ -> CT_hints_resolve(l', dblist) + | HintsImmediate _ -> CT_hints_immediate(l', dblist) + | _ -> assert false) | HintsUnfold l -> let n1, names = match List.map loc_qualid_to_ct_ID l with n1 :: names -> n1, names @@ -1766,13 +1814,11 @@ let rec xlate_vernac = ctf_ID_OPT_SOME (xlate_ident s)) | VernacEndProof Admitted -> CT_save (CT_coerce_THM_to_THM_OPT (CT_thm "Admitted"), ctv_ID_OPT_NONE) - | VernacSetOpacity (false, id :: idl) -> - CT_transparent(CT_id_ne_list(loc_qualid_to_ct_ID id, - List.map loc_qualid_to_ct_ID idl)) - | VernacSetOpacity (true, id :: idl) - -> CT_opaque (CT_id_ne_list(loc_qualid_to_ct_ID id, - List.map loc_qualid_to_ct_ID idl)) - | VernacSetOpacity (_, []) -> xlate_error "Shouldn't occur" + | VernacSetOpacity (_,l) -> + CT_strategy(CT_level_list + (List.map (fun (l,q) -> + (level_to_ct_LEVEL l, + CT_id_list(List.map loc_qualid_to_ct_ID q))) l)) | VernacUndo n -> CT_undo (CT_coerce_INT_to_INT_OPT (CT_int n)) | VernacShow (ShowGoal nopt) -> CT_show_goal (xlate_int_opt nopt) | VernacShow ShowNode -> CT_show_node @@ -1799,7 +1845,7 @@ let rec xlate_vernac = | PrintOpaqueName id -> CT_print_opaqueid (loc_qualid_to_ct_ID id) | PrintSectionContext id -> CT_print_section (loc_qualid_to_ct_ID id) | PrintModules -> CT_print_modules - | PrintGrammar (phylum, name) -> CT_print_grammar CT_grammar_none + | PrintGrammar name -> CT_print_grammar CT_grammar_none | PrintHintDb -> CT_print_hintdb (CT_coerce_STAR_to_ID_OR_STAR CT_star) | PrintHintDbName id -> CT_print_hintdb (CT_coerce_ID_to_ID_OR_STAR (CT_ident id)) @@ -1819,6 +1865,12 @@ let rec xlate_vernac = CT_print_path (xlate_class id1, xlate_class id2) | PrintCanonicalConversions -> xlate_error "TODO: Print Canonical Structures" + | PrintAssumptions _ -> + xlate_error "TODO: Print Needed Assumptions" + | PrintInstances _ -> + xlate_error "TODO: Print Instances" + | PrintTypeClasses -> + xlate_error "TODO: Print TypeClasses" | PrintInspect n -> CT_inspect (CT_int n) | PrintUniverses opt_s -> CT_print_universes(ctf_STRING_OPT opt_s) | PrintSetoids -> CT_print_setoids @@ -1837,12 +1889,14 @@ let rec xlate_vernac = | VernacBeginSection (_,id) -> CT_coerce_SECTION_BEGIN_to_COMMAND (CT_section (xlate_ident id)) | VernacEndSegment (_,id) -> CT_section_end (xlate_ident id) - | VernacStartTheoremProof (k, (_,s), (bl,c), _, _) -> + | VernacStartTheoremProof (k, [Some (_,s), (bl,c)], _, _) -> CT_coerce_THEOREM_GOAL_to_COMMAND( CT_theorem_goal (CT_coerce_THM_to_DEFN_OR_THM (xlate_thm k), xlate_ident s, xlate_binder_list bl, xlate_formula c)) + | VernacStartTheoremProof _ -> + xlate_error "TODO: Mutually dependent theorems" | VernacSuspend -> CT_suspend - | VernacResume idopt -> CT_resume (xlate_ident_opt (option_map snd idopt)) + | VernacResume idopt -> CT_resume (xlate_ident_opt (Option.map snd idopt)) | VernacDefinition (k,(_,s),ProveBody (bl,typ),_) -> CT_coerce_THEOREM_GOAL_to_COMMAND (CT_theorem_goal @@ -1853,8 +1907,9 @@ let rec xlate_vernac = (xlate_defn kind, xlate_ident s, xlate_binder_list bl, cvt_optional_eval_for_definition c red_option, xlate_formula_opt typ_opt) - | VernacAssumption (kind, b) -> - CT_variable (xlate_var kind, cvt_vernac_binders b) + | VernacAssumption (kind,inline ,b) ->xlate_error "TODO: Parameter Inline" + (*inline : bool -> automatic delta reduction at fonctor application*) + (* CT_variable (xlate_var kind, cvt_vernac_binders b)*) | VernacCheckMayEval (None, numopt, c) -> CT_check (xlate_formula c) | VernacSearch (s,x) -> @@ -1884,7 +1939,7 @@ let rec xlate_vernac = (_, (add_coercion, (_,s)), binders, c1, rec_constructor_or_none, field_list) -> let record_constructor = - xlate_ident_opt (option_map snd rec_constructor_or_none) in + xlate_ident_opt (Option.map snd rec_constructor_or_none) in CT_record ((if add_coercion then CT_coercion_atm else CT_coerce_NONE_to_COERCION_OPT(CT_none)), @@ -1902,15 +1957,8 @@ let rec xlate_vernac = (CT_co_ind co_or_ind, CT_ind_spec_list (List.map strip_mutind lmi)) | VernacFixpoint ([],_) -> xlate_error "mutual recursive" | VernacFixpoint ((lm :: lmi),boxed) -> - let strip_mutrec ((fid, (n, ro), bl, arf, ardef), _ntn) = - let (struct_arg,bl,arf,ardef) = - (* Pierre L: could the case [n=None && bl=[]] happen ? Normally not *) - (* By the way, how could [bl = []] happen in V8 syntax ? *) - if bl = [] then - let n = out_some n in - let (bl,arf,ardef) = Ppconstr.split_fix (n+1) arf ardef in - (xlate_id_opt(List.nth (names_of_local_assums bl) n),bl,arf,ardef) - else (make_fix_struct (n, bl),bl,arf,ardef) in + let strip_mutrec (((_,fid), (n, ro), bl, arf, ardef), _ntn) = + let struct_arg = make_fix_struct (n, bl) in let arf = xlate_formula arf in let ardef = xlate_formula ardef in match xlate_binder_list bl with @@ -1922,26 +1970,35 @@ let rec xlate_vernac = (CT_fix_rec_list (strip_mutrec lm, List.map strip_mutrec lmi)) | VernacCoFixpoint ([],boxed) -> xlate_error "mutual corecursive" | VernacCoFixpoint ((lm :: lmi),boxed) -> - let strip_mutcorec ((fid, bl, arf, ardef), _ntn) = + let strip_mutcorec (((_,fid), bl, arf, ardef), _ntn) = CT_cofix_rec (xlate_ident fid, xlate_binder_list bl, xlate_formula arf, xlate_formula ardef) in CT_cofix_decl (CT_cofix_rec_list (strip_mutcorec lm, List.map strip_mutcorec lmi)) | VernacScheme [] -> xlate_error "induction scheme" | VernacScheme (lm :: lmi) -> - let strip_ind ((_,id), depstr, inde, sort) = + let strip_ind = function + | (Some (_,id), InductionScheme (depstr, inde, sort)) -> CT_scheme_spec (xlate_ident id, xlate_dep depstr, CT_coerce_ID_to_FORMULA (loc_qualid_to_ct_ID inde), - xlate_sort sort) in + xlate_sort sort) + | (None, InductionScheme (depstr, inde, sort)) -> + CT_scheme_spec + (xlate_ident (id_of_string ""), xlate_dep depstr, + CT_coerce_ID_to_FORMULA (loc_qualid_to_ct_ID inde), + xlate_sort sort) + | (_, EqualityScheme _) -> xlate_error "TODO: Scheme Equality" in CT_ind_scheme (CT_scheme_spec_list (strip_ind lm, List.map strip_ind lmi)) - | VernacSyntacticDefinition (id, c, false, _) -> + | VernacCombinedScheme _ -> xlate_error "TODO: Combined Scheme" + | VernacSyntacticDefinition ((_,id), ([],c), false, _) -> CT_syntax_macro (xlate_ident id, xlate_formula c, xlate_int_opt None) - | VernacSyntacticDefinition (id, c, true, _) -> - xlate_error "TODO: Local abbreviations" + | VernacSyntacticDefinition ((_,id), _, _, _) -> + xlate_error"TODO: Local abbreviations and abbreviations with parameters" (* Modules and Module Types *) - | VernacDeclareModuleType((_, id), bl, mty_o) -> + | VernacInclude (_) -> xlate_error "TODO : Include " + | VernacDeclareModuleType((_, id), bl, mty_o) -> CT_module_type_decl(xlate_ident id, xlate_module_binder_list bl, match mty_o with @@ -2051,6 +2108,12 @@ let rec xlate_vernac = | Local -> CT_local in CT_coercion (local_opt, id_opt, xlate_ident id1, xlate_class id2, xlate_class id3) + + (* Type Classes *) + | VernacDeclareInstance _|VernacContext _| + VernacInstance (_, _, _, _, _)|VernacClass (_, _, _, _, _) -> + xlate_error "TODO: Type Classes commands" + | VernacResetName id -> CT_reset (xlate_ident (snd id)) | VernacResetInitial -> CT_restore_state (CT_ident "Initial") | VernacExtend (s, l) -> @@ -2073,10 +2136,10 @@ let rec xlate_vernac = CT_coerce_ID_LIST_to_ID_LIST_OPT (CT_id_list (List.map - (function ExplByPos x + (function ExplByPos (x,_), _, _ -> xlate_error "explication argument by rank is obsolete" - | ExplByName id -> CT_ident (string_of_id id)) l))) + | ExplByName id, _, _ -> CT_ident (string_of_id id)) l))) | VernacDeclareImplicits(false, id, opt_positions) -> xlate_error "TODO: Implicit Arguments Global" | VernacReserve((_,a)::l, f) -> @@ -2096,13 +2159,15 @@ let rec xlate_vernac = let table1 = match table with PrimaryTable(s) -> CT_coerce_ID_to_TABLE(CT_ident s) - | SecondaryTable(s1,s2) -> CT_table(CT_ident s1, CT_ident s2) in + | SecondaryTable(s1,s2) -> CT_table(CT_ident s1, CT_ident s2) + | TertiaryTable(s1,s2,s3) -> xlate_error "TODO: TertiaryTable" in CT_set_option(table1) | VernacSetOption (table, v) -> let table1 = match table with PrimaryTable(s) -> CT_coerce_ID_to_TABLE(CT_ident s) - | SecondaryTable(s1,s2) -> CT_table(CT_ident s1, CT_ident s2) in + | SecondaryTable(s1,s2) -> CT_table(CT_ident s1, CT_ident s2) + | TertiaryTable(s1,s2,s3) -> xlate_error "TODO: TertiaryTable" in let value = match v with | BoolValue _ -> assert false @@ -2115,7 +2180,8 @@ let rec xlate_vernac = let table1 = match table with PrimaryTable(s) -> CT_coerce_ID_to_TABLE(CT_ident s) - | SecondaryTable(s1,s2) -> CT_table(CT_ident s1, CT_ident s2) in + | SecondaryTable(s1,s2) -> CT_table(CT_ident s1, CT_ident s2) + | TertiaryTable(s1,s2,s3) -> xlate_error "TODO: TertiaryTable" in CT_unset_option(table1) | VernacAddOption (table, l) -> let values = @@ -2130,7 +2196,8 @@ let rec xlate_vernac = let table1 = match table with PrimaryTable(s) -> CT_coerce_ID_to_TABLE(CT_ident s) - | SecondaryTable(s1,s2) -> CT_table(CT_ident s1, CT_ident s2) in + | SecondaryTable(s1,s2) -> CT_table(CT_ident s1, CT_ident s2) + | TertiaryTable(s1,s2,s3) -> xlate_error "TODO: TertiaryTable" in CT_set_option_value2(table1, CT_id_or_string_ne_list(fst, values1)) | VernacImport(true, a::l) -> CT_export_id(CT_id_ne_list(reference_to_ct_ID a, @@ -2140,13 +2207,17 @@ let rec xlate_vernac = List.map reference_to_ct_ID l)) | VernacImport(_, []) -> assert false | VernacProof t -> CT_proof_with(xlate_tactic t) - | VernacVar _ -> xlate_error "Grammar vernac obsolete" | (VernacGlobalCheck _|VernacPrintOption _| VernacMemOption (_, _)|VernacRemoveOption (_, _) | VernacBack _ | VernacBacktrack _ |VernacBackTo _|VernacRestoreState _| VernacWriteState _| VernacSolveExistential (_, _)|VernacCanonical _ | - VernacTacticNotation _) - -> xlate_error "TODO: vernac";; + VernacTacticNotation _ | VernacUndoTo _ | VernacRemoveName _) + -> xlate_error "TODO: vernac" +and level_to_ct_LEVEL = function + Conv_oracle.Opaque -> CT_Opaque + | Conv_oracle.Level n -> CT_Level (CT_int n) + | Conv_oracle.Expand -> CT_Expand;; + let rec xlate_vernac_list = function diff --git a/contrib/interface/xlate.mli b/contrib/interface/xlate.mli index bedb4ac8..2e2b95fe 100644 --- a/contrib/interface/xlate.mli +++ b/contrib/interface/xlate.mli @@ -6,4 +6,3 @@ val xlate_formula : Topconstr.constr_expr -> ct_FORMULA;; val xlate_ident : Names.identifier -> ct_ID;; val xlate_vernac_list : Vernacexpr.vernac_expr -> ct_COMMAND_LIST;; -val declare_in_coq : (unit -> unit);; diff --git a/contrib/jprover/jall.ml b/contrib/jprover/jall.ml index a2a72676..a9ebe5b6 100644 --- a/contrib/jprover/jall.ml +++ b/contrib/jprover/jall.ml @@ -31,23 +31,6 @@ * Modified by: Aleksey Nogin *) -(*: All of Huang's modifications of this file are quoted or denoted - by comments followed by a colon. -:*) - -(*: -open Mp_debug - -open Refiner.Refiner -open Term -open TermType -open TermOp -open TermSubst -open TermMan -open RefineError -open Opname -:*) - open Jterm open Opname open Jlogic @@ -55,10 +38,6 @@ open Jtunify let ruletable = Jlogic.ruletable -(*: -let free_var_op = make_opname ["free_variable";"Jprover"] -let jprover_op = make_opname ["string";"Jprover"] -:*) let free_var_op = make_opname ["free_variable"; "Jprover"] let jprover_op = make_opname ["jprover"; "string"] @@ -1308,23 +1287,6 @@ struct (* append renamed paramater "r" to non-quantifier subformulae of renamed quantifier formulae *) -(*: BUG :*) -(*: - let make_new_eigenvariable term = - let op = (dest_term term).term_op in - let opn = (dest_op op).op_name in - let opnam = dest_opname opn in - match opnam with - [] -> - raise jprover_bug - | ofirst::orest -> - let ofname = List.hd orest in - let new_eigen_var = (ofname^"_r"^(string_of_int (!eigen_counter))) in - eigen_counter := !eigen_counter + 1; -(* print_endline ("New Counter :"^(string_of_int (!eigen_counter))); *) - mk_string_term jprover_op new_eigen_var -:*) - let make_new_eigenvariable term = let op = (dest_term term).term_op in let opa = (dest_op op).op_params in @@ -2485,30 +2447,6 @@ struct let dbt = dest_bterm bt in (dbt.bterm)::(collect_subterms r) - (*: Bug! :*) -(*: let rec collect_delta_terms = function - [] -> [] - | t::r -> - let dt = dest_term t in - let top = dt.term_op - and tterms = dt.term_terms in - let dop = dest_op top in - let don = dest_opname dop.op_name in - match don with - [] -> - let sub_terms = collect_subterms tterms in - collect_delta_terms (sub_terms @ r) - | op1::opr -> - if op1 = "jprover" then - match opr with - [] -> raise (Invalid_argument "Jprover: delta position missing") - | delta::_ -> - delta::(collect_delta_terms r) - else - let sub_terms = collect_subterms tterms in - collect_delta_terms (sub_terms @ r) -:*) - let rec collect_delta_terms = function [] -> [] | t::r -> @@ -3219,23 +3157,7 @@ struct | (v,termlist)::r -> let dterms = collect_delta_terms termlist in begin -(*: print_stringlist dterms; - mbreak "add_sigmaQ:1\n"; - Format.open_box 0; - print_endline " "; - print_endline "sigmaQ: "; - print_string (v^" = "); - print_term_list termlist; - Format.force_newline (); - print_stringlist dterms; - Format.force_newline (); - Format.print_flush (); - mbreak "add_sigmaQ:2\n"; -:*) let new_ordering = add_arrowsQ v dterms ordering in -(*: print_ordering new_ordering; - mbreak "add_sigmaQ:3\n"; -:*) let (rest_pairs,rest_ordering) = add_sigmaQ r new_ordering in ((v,dterms)::rest_pairs),rest_ordering end @@ -3303,7 +3225,6 @@ struct let jqunify term1 term2 sigmaQ = let app_term1,app_term2 = apply_2_sigmaQ term1 term2 sigmaQ in try -(*: let tauQ = unify_mm app_term1 app_term2 String_set.StringSet.empty in :*) let tauQ = unify_mm app_term1 app_term2 StringSet.empty in let (mult,oel) = multiply sigmaQ tauQ in (mult,oel) @@ -3740,19 +3661,7 @@ let rec subst_replace subst_list t = [] -> t | (old_t,new_t)::r -> let inter_term = var_subst t old_t "dummy" in -(*: print_string "("; - print_term stdout old_t; - print_string " --> "; - print_term stdout new_t; - print_string ")\n"; - print_term stdout t; - print_newline (); - print_term stdout inter_term; - print_newline (); :*) let new_term = subst1 inter_term "dummy" new_t in -(*: print_term stdout new_term; - print_newline (); - mbreak "\n+++========----- ---------..........\n"; :*) subst_replace r new_term let rename_pos x m = @@ -3950,10 +3859,6 @@ exception Failed_connections let path_checker atom_rel atom_sets qprefixes init_ordering logic = let con = connections atom_rel [] in -(*: print_endline ""; - print_endline ("number of connections: "^(string_of_int (List.length con))); - mbreak "#connec\n"; -:*) let rec provable path closed (orderingQ,reduction_ordering) eqlist (sigmaQ,sigmaJ) = let rec check_connections (reduction_partners,extension_partners) ext_atom = @@ -4470,7 +4375,6 @@ let rec create_output rule_list input_map = and new_term2 = apply_var_subst next_term2 var_mapping and (a,b) = pos in -(*: print_string (a^"+++"^b^"\n"); :*) (* kick away the first argument, the position *) (JLogic.append_inf (create_output r input_map) (b,new_term1) (a,new_term2) rule) @@ -4514,8 +4418,6 @@ let rec make_test_interface rule_list input_map = (**************************************************************) -(*: modified for Coq :*) - let decomp_pos pos = let {name=n; address=a; label=l} = pos in (n,(a,l)) @@ -4590,8 +4492,6 @@ let gen_prover mult_limit logic calculus hyps concls = (* from the LJmc to the LJ proof *) create_coq_input (create_output sequent_proof input_map) idl -(*: end of coq modification :*) - let prover mult_limit hyps concl = gen_prover mult_limit "J" "LJ" hyps [concl] (************* test with propositional proof reconstruction ************) @@ -4658,7 +4558,6 @@ let do_prove mult_limit termlist logic calculus = print_endline ""; print_endline ""; Format.print_flush (); -(*: let _ = input_char stdin in :*) let reconstr_proof = reconstruct ftree red_ordering sigmaQ ext_proof logic calculus in let sequent_proof = make_test_interface reconstr_proof input_map in Format.open_box 0; @@ -4676,7 +4575,7 @@ let do_prove mult_limit termlist logic calculus = Format.force_newline (); Format.force_newline (); Format.print_flush (); - tt ptree; (*: print proof tree :*) + tt ptree; Format.print_flush (); print_endline ""; print_endline "" diff --git a/contrib/jprover/jprover.ml4 b/contrib/jprover/jprover.ml4 index 294943f7..5fd763c3 100644 --- a/contrib/jprover/jprover.ml4 +++ b/contrib/jprover/jprover.ml4 @@ -410,7 +410,7 @@ i*) | Negl -> dyn_negl s1 | Allr -> dyn_allr (JT.dest_var t2) | Alll -> dyn_alll s1 s2 (constr_of_jterm t2) - | Exr -> dyn_exr (constr_of_jterm t2) + | Exr -> dyn_exr (Tactics.inj_open (constr_of_jterm t2)) | Exl -> dyn_exl s1 s2 (JT.dest_var t2) | Ax -> T.assumption (*i TCL.tclIDTAC i*) | Truer -> dyn_truer diff --git a/contrib/micromega/CheckerMaker.v b/contrib/micromega/CheckerMaker.v new file mode 100644 index 00000000..93b4d213 --- /dev/null +++ b/contrib/micromega/CheckerMaker.v @@ -0,0 +1,129 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Formula -> Prop. + +Variable Formula' : Type. + +Variable eval' : Env -> Formula' -> Prop. + +Variable normalise : Formula -> Formula'. + +Variable negate : Formula -> Formula'. + +Hypothesis normalise_sound : + forall (env : Env) (t : Formula), eval env t -> eval' env (normalise t). + +Hypothesis negate_correct : + forall (env : Env) (t : Formula), eval env t <-> ~ (eval' env (negate t)). + +Variable Witness : Type. + +Variable check_formulas' : list Formula' -> Witness -> bool. + +Hypothesis check_formulas'_sound : + forall (l : list Formula') (w : Witness), + check_formulas' l w = true -> + forall env : Env, make_impl (eval' env) l False. + +Definition normalise_list : list Formula -> list Formula' := map normalise. +Definition negate_list : list Formula -> list Formula' := map negate. + +Definition check_formulas (l : list Formula) (w : Witness) : bool := + check_formulas' (map normalise l) w. + +(* Contraposition of normalise_sound for lists *) +Lemma normalise_sound_contr : forall (env : Env) (l : list Formula), + make_impl (eval' env) (map normalise l) False -> make_impl (eval env) l False. +Proof. +intros env l; induction l as [| t l IH]; simpl in *. +trivial. +intros H1 H2. apply IH. apply H1. now apply normalise_sound. +Qed. + +Theorem check_formulas_sound : + forall (l : list Formula) (w : Witness), + check_formulas l w = true -> forall env : Env, make_impl (eval env) l False. +Proof. +unfold check_formulas; intros l w H env. destruct l as [| t l]; simpl in *. +pose proof (check_formulas'_sound H env) as H1; now simpl in H1. +intro H1. apply normalise_sound in H1. +pose proof (check_formulas'_sound H env) as H2; simpl in H2. +apply H2 in H1. now apply normalise_sound_contr. +Qed. + +(* In check_conj_formulas', t2 is supposed to be a list of negations of +formulas. If, for example, t1 = [A1, A2] and t2 = [~ B1, ~ B2], then +check_conj_formulas' checks that each of [~ B1, A1, A2] and [~ B2, A1, A2] is +inconsistent. This means that A1 /\ A2 -> B1 and A1 /\ A2 -> B1, i.e., that +A1 /\ A2 -> B1 /\ B2. *) + +Fixpoint check_conj_formulas' + (t1 : list Formula') (wits : list Witness) (t2 : list Formula') {struct wits} : bool := +match t2 with +| nil => true +| t':: rt2 => + match wits with + | nil => false + | w :: rwits => + match check_formulas' (t':: t1) w with + | true => check_conj_formulas' t1 rwits rt2 + | false => false + end + end +end. + +(* checks whether the conjunction of t1 implies the conjunction of t2 *) + +Definition check_conj_formulas + (t1 : list Formula) (wits : list Witness) (t2 : list Formula) : bool := + check_conj_formulas' (normalise_list t1) wits (negate_list t2). + +Theorem check_conj_formulas_sound : + forall (t1 : list Formula) (t2 : list Formula) (wits : list Witness), + check_conj_formulas t1 wits t2 = true -> + forall env : Env, make_impl (eval env) t1 (make_conj (eval env) t2). +Proof. +intro t1; induction t2 as [| a2 t2' IH]. +intros; apply make_impl_true. +intros wits H env. +unfold check_conj_formulas in H; simpl in H. +destruct wits as [| w ws]; simpl in H. discriminate. +case_eq (check_formulas' (negate a2 :: normalise_list t1) w); +intro H1; rewrite H1 in H; [| discriminate]. +assert (H2 : make_impl (eval' env) (negate a2 :: normalise_list t1) False) by +now apply check_formulas'_sound with (w := w). clear H1. +pose proof (IH ws H env) as H1. simpl in H2. +assert (H3 : eval' env (negate a2) -> make_impl (eval env) t1 False) +by auto using normalise_sound_contr. clear H2. +rewrite <- make_conj_impl in *. +rewrite make_conj_cons. intro H2. split. +apply <- negate_correct. intro; now elim H3. exact (H1 H2). +Qed. + +End CheckerMaker. diff --git a/contrib/micromega/Env.v b/contrib/micromega/Env.v new file mode 100644 index 00000000..40db9e46 --- /dev/null +++ b/contrib/micromega/Env.v @@ -0,0 +1,182 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* D. + + Definition jump (j:positive) (e:Env) := fun x => e (Pplus x j). + + Definition nth (n:positive) (e : Env ) := e n. + + Definition hd (x:D) (e: Env) := nth xH e. + + Definition tail (e: Env) := jump xH e. + + Lemma psucc : forall p, (match p with + | xI y' => xO (Psucc y') + | xO y' => xI y' + | 1%positive => 2%positive + end) = (p+1)%positive. + Proof. + destruct p. + auto with zarith. + rewrite xI_succ_xO. + auto with zarith. + reflexivity. + Qed. + + Lemma jump_Pplus : forall i j l, + forall x, jump (i + j) l x = jump i (jump j l) x. + Proof. + unfold jump. + intros. + rewrite Pplus_assoc. + reflexivity. + Qed. + + Lemma jump_simpl : forall p l, + forall x, jump p l x = + match p with + | xH => tail l x + | xO p => jump p (jump p l) x + | xI p => jump p (jump p (tail l)) x + end. + Proof. + destruct p ; unfold tail ; intros ; repeat rewrite <- jump_Pplus. + (* xI p = p + p + 1 *) + rewrite xI_succ_xO. + rewrite Pplus_diag. + rewrite <- Pplus_one_succ_r. + reflexivity. + (* xO p = p + p *) + rewrite Pplus_diag. + reflexivity. + reflexivity. + Qed. + + Ltac jump_s := + repeat + match goal with + | |- context [jump xH ?e] => rewrite (jump_simpl xH) + | |- context [jump (xO ?p) ?e] => rewrite (jump_simpl (xO p)) + | |- context [jump (xI ?p) ?e] => rewrite (jump_simpl (xI p)) + end. + + Lemma jump_tl : forall j l, forall x, tail (jump j l) x = jump j (tail l) x. + Proof. + unfold tail. + intros. + repeat rewrite <- jump_Pplus. + rewrite Pplus_comm. + reflexivity. + Qed. + + Lemma jump_Psucc : forall j l, + forall x, (jump (Psucc j) l x) = (jump 1 (jump j l) x). + Proof. + intros. + rewrite <- jump_Pplus. + rewrite Pplus_one_succ_r. + rewrite Pplus_comm. + reflexivity. + Qed. + + Lemma jump_Pdouble_minus_one : forall i l, + forall x, (jump (Pdouble_minus_one i) (tail l)) x = (jump i (jump i l)) x. + Proof. + unfold tail. + intros. + repeat rewrite <- jump_Pplus. + rewrite <- Pplus_one_succ_r. + rewrite Psucc_o_double_minus_one_eq_xO. + rewrite Pplus_diag. + reflexivity. + Qed. + + Lemma jump_x0_tail : forall p l, forall x, jump (xO p) (tail l) x = jump (xI p) l x. + Proof. + intros. + unfold jump. + unfold tail. + unfold jump. + rewrite <- Pplus_assoc. + simpl. + reflexivity. + Qed. + + Lemma nth_spec : forall p l x, + nth p l = + match p with + | xH => hd x l + | xO p => nth p (jump p l) + | xI p => nth p (jump p (tail l)) + end. + Proof. + unfold nth. + destruct p. + intros. + unfold jump, tail. + unfold jump. + rewrite Pplus_diag. + rewrite xI_succ_xO. + simpl. + reflexivity. + unfold jump. + rewrite Pplus_diag. + reflexivity. + unfold hd. + unfold nth. + reflexivity. + Qed. + + + Lemma nth_jump : forall p l x, nth p (tail l) = hd x (jump p l). + Proof. + unfold tail. + unfold hd. + unfold jump. + unfold nth. + intros. + rewrite Pplus_comm. + reflexivity. + Qed. + + Lemma nth_Pdouble_minus_one : + forall p l, nth (Pdouble_minus_one p) (tail l) = nth p (jump p l). + Proof. + intros. + unfold tail. + unfold nth, jump. + rewrite Pplus_diag. + rewrite <- Psucc_o_double_minus_one_eq_xO. + rewrite Pplus_one_succ_r. + reflexivity. + Qed. + +End S. + diff --git a/contrib/micromega/EnvRing.v b/contrib/micromega/EnvRing.v new file mode 100644 index 00000000..04e68272 --- /dev/null +++ b/contrib/micromega/EnvRing.v @@ -0,0 +1,1403 @@ +(************************************************************************) +(* V * The Coq Proof Assistant / The Coq Development Team *) +(* R->R) (ropp : R->R). + Variable req : R -> R -> Prop. + + (* Ring properties *) + Variable Rsth : Setoid_Theory R req. + Variable Reqe : ring_eq_ext radd rmul ropp req. + Variable ARth : almost_ring_theory rO rI radd rmul rsub ropp req. + + (* Coefficients *) + Variable C: Type. + Variable (cO cI: C) (cadd cmul csub : C->C->C) (copp : C->C). + Variable ceqb : C->C->bool. + Variable phi : C -> R. + Variable CRmorph : ring_morph rO rI radd rmul rsub ropp req + cO cI cadd cmul csub copp ceqb phi. + + (* Power coefficients *) + Variable Cpow : Set. + Variable Cp_phi : N -> Cpow. + Variable rpow : R -> Cpow -> R. + Variable pow_th : power_theory rI rmul req Cp_phi rpow. + + + (* R notations *) + Notation "0" := rO. Notation "1" := rI. + Notation "x + y" := (radd x y). Notation "x * y " := (rmul x y). + Notation "x - y " := (rsub x y). Notation "- x" := (ropp x). + Notation "x == y" := (req x y). + + (* C notations *) + Notation "x +! y" := (cadd x y). Notation "x *! y " := (cmul x y). + Notation "x -! y " := (csub x y). Notation "-! x" := (copp x). + Notation " x ?=! y" := (ceqb x y). Notation "[ x ]" := (phi x). + + (* Usefull tactics *) + Add Setoid R req Rsth as R_set1. + Ltac rrefl := gen_reflexivity Rsth. + Add Morphism radd : radd_ext. exact (Radd_ext Reqe). Qed. + Add Morphism rmul : rmul_ext. exact (Rmul_ext Reqe). Qed. + Add Morphism ropp : ropp_ext. exact (Ropp_ext Reqe). Qed. + Add Morphism rsub : rsub_ext. exact (ARsub_ext Rsth Reqe ARth). Qed. + Ltac rsimpl := gen_srewrite Rsth Reqe ARth. + Ltac add_push := gen_add_push radd Rsth Reqe ARth. + Ltac mul_push := gen_mul_push rmul Rsth Reqe ARth. + + (* Definition of multivariable polynomials with coefficients in C : + Type [Pol] represents [X1 ... Xn]. + The representation is Horner's where a [n] variable polynomial + (C[X1..Xn]) is seen as a polynomial on [X1] which coefficients + are polynomials with [n-1] variables (C[X2..Xn]). + There are several optimisations to make the repr compacter: + - [Pc c] is the constant polynomial of value c + == c*X1^0*..*Xn^0 + - [Pinj j Q] is a polynomial constant w.r.t the [j] first variables. + variable indices are shifted of j in Q. + == X1^0 *..* Xj^0 * Q{X1 <- Xj+1;..; Xn-j <- Xn} + - [PX P i Q] is an optimised Horner form of P*X^i + Q + with P not the null polynomial + == P * X1^i + Q{X1 <- X2; ..; Xn-1 <- Xn} + + In addition: + - polynomials of the form (PX (PX P i (Pc 0)) j Q) are forbidden + since they can be represented by the simpler form (PX P (i+j) Q) + - (Pinj i (Pinj j P)) is (Pinj (i+j) P) + - (Pinj i (Pc c)) is (Pc c) + *) + + Inductive Pol : Type := + | Pc : C -> Pol + | Pinj : positive -> Pol -> Pol + | PX : Pol -> positive -> Pol -> Pol. + + Definition P0 := Pc cO. + Definition P1 := Pc cI. + + Fixpoint Peq (P P' : Pol) {struct P'} : bool := + match P, P' with + | Pc c, Pc c' => c ?=! c' + | Pinj j Q, Pinj j' Q' => + match Pcompare j j' Eq with + | Eq => Peq Q Q' + | _ => false + end + | PX P i Q, PX P' i' Q' => + match Pcompare i i' Eq with + | Eq => if Peq P P' then Peq Q Q' else false + | _ => false + end + | _, _ => false + end. + + Notation " P ?== P' " := (Peq P P'). + + Definition mkPinj j P := + match P with + | Pc _ => P + | Pinj j' Q => Pinj ((j + j'):positive) Q + | _ => Pinj j P + end. + + Definition mkPinj_pred j P:= + match j with + | xH => P + | xO j => Pinj (Pdouble_minus_one j) P + | xI j => Pinj (xO j) P + end. + + Definition mkPX P i Q := + match P with + | Pc c => if c ?=! cO then mkPinj xH Q else PX P i Q + | Pinj _ _ => PX P i Q + | PX P' i' Q' => if Q' ?== P0 then PX P' (i' + i) Q else PX P i Q + end. + + Definition mkXi i := PX P1 i P0. + + Definition mkX := mkXi 1. + + (** Opposite of addition *) + + Fixpoint Popp (P:Pol) : Pol := + match P with + | Pc c => Pc (-! c) + | Pinj j Q => Pinj j (Popp Q) + | PX P i Q => PX (Popp P) i (Popp Q) + end. + + Notation "-- P" := (Popp P). + + (** Addition et subtraction *) + + Fixpoint PaddC (P:Pol) (c:C) {struct P} : Pol := + match P with + | Pc c1 => Pc (c1 +! c) + | Pinj j Q => Pinj j (PaddC Q c) + | PX P i Q => PX P i (PaddC Q c) + end. + + Fixpoint PsubC (P:Pol) (c:C) {struct P} : Pol := + match P with + | Pc c1 => Pc (c1 -! c) + | Pinj j Q => Pinj j (PsubC Q c) + | PX P i Q => PX P i (PsubC Q c) + end. + + Section PopI. + + Variable Pop : Pol -> Pol -> Pol. + Variable Q : Pol. + + Fixpoint PaddI (j:positive) (P:Pol){struct P} : Pol := + match P with + | Pc c => mkPinj j (PaddC Q c) + | Pinj j' Q' => + match ZPminus j' j with + | Zpos k => mkPinj j (Pop (Pinj k Q') Q) + | Z0 => mkPinj j (Pop Q' Q) + | Zneg k => mkPinj j' (PaddI k Q') + end + | PX P i Q' => + match j with + | xH => PX P i (Pop Q' Q) + | xO j => PX P i (PaddI (Pdouble_minus_one j) Q') + | xI j => PX P i (PaddI (xO j) Q') + end + end. + + Fixpoint PsubI (j:positive) (P:Pol){struct P} : Pol := + match P with + | Pc c => mkPinj j (PaddC (--Q) c) + | Pinj j' Q' => + match ZPminus j' j with + | Zpos k => mkPinj j (Pop (Pinj k Q') Q) + | Z0 => mkPinj j (Pop Q' Q) + | Zneg k => mkPinj j' (PsubI k Q') + end + | PX P i Q' => + match j with + | xH => PX P i (Pop Q' Q) + | xO j => PX P i (PsubI (Pdouble_minus_one j) Q') + | xI j => PX P i (PsubI (xO j) Q') + end + end. + + Variable P' : Pol. + + Fixpoint PaddX (i':positive) (P:Pol) {struct P} : Pol := + match P with + | Pc c => PX P' i' P + | Pinj j Q' => + match j with + | xH => PX P' i' Q' + | xO j => PX P' i' (Pinj (Pdouble_minus_one j) Q') + | xI j => PX P' i' (Pinj (xO j) Q') + end + | PX P i Q' => + match ZPminus i i' with + | Zpos k => mkPX (Pop (PX P k P0) P') i' Q' + | Z0 => mkPX (Pop P P') i Q' + | Zneg k => mkPX (PaddX k P) i Q' + end + end. + + Fixpoint PsubX (i':positive) (P:Pol) {struct P} : Pol := + match P with + | Pc c => PX (--P') i' P + | Pinj j Q' => + match j with + | xH => PX (--P') i' Q' + | xO j => PX (--P') i' (Pinj (Pdouble_minus_one j) Q') + | xI j => PX (--P') i' (Pinj (xO j) Q') + end + | PX P i Q' => + match ZPminus i i' with + | Zpos k => mkPX (Pop (PX P k P0) P') i' Q' + | Z0 => mkPX (Pop P P') i Q' + | Zneg k => mkPX (PsubX k P) i Q' + end + end. + + + End PopI. + + Fixpoint Padd (P P': Pol) {struct P'} : Pol := + match P' with + | Pc c' => PaddC P c' + | Pinj j' Q' => PaddI Padd Q' j' P + | PX P' i' Q' => + match P with + | Pc c => PX P' i' (PaddC Q' c) + | Pinj j Q => + match j with + | xH => PX P' i' (Padd Q Q') + | xO j => PX P' i' (Padd (Pinj (Pdouble_minus_one j) Q) Q') + | xI j => PX P' i' (Padd (Pinj (xO j) Q) Q') + end + | PX P i Q => + match ZPminus i i' with + | Zpos k => mkPX (Padd (PX P k P0) P') i' (Padd Q Q') + | Z0 => mkPX (Padd P P') i (Padd Q Q') + | Zneg k => mkPX (PaddX Padd P' k P) i (Padd Q Q') + end + end + end. + Notation "P ++ P'" := (Padd P P'). + + Fixpoint Psub (P P': Pol) {struct P'} : Pol := + match P' with + | Pc c' => PsubC P c' + | Pinj j' Q' => PsubI Psub Q' j' P + | PX P' i' Q' => + match P with + | Pc c => PX (--P') i' (*(--(PsubC Q' c))*) (PaddC (--Q') c) + | Pinj j Q => + match j with + | xH => PX (--P') i' (Psub Q Q') + | xO j => PX (--P') i' (Psub (Pinj (Pdouble_minus_one j) Q) Q') + | xI j => PX (--P') i' (Psub (Pinj (xO j) Q) Q') + end + | PX P i Q => + match ZPminus i i' with + | Zpos k => mkPX (Psub (PX P k P0) P') i' (Psub Q Q') + | Z0 => mkPX (Psub P P') i (Psub Q Q') + | Zneg k => mkPX (PsubX Psub P' k P) i (Psub Q Q') + end + end + end. + Notation "P -- P'" := (Psub P P'). + + (** Multiplication *) + + Fixpoint PmulC_aux (P:Pol) (c:C) {struct P} : Pol := + match P with + | Pc c' => Pc (c' *! c) + | Pinj j Q => mkPinj j (PmulC_aux Q c) + | PX P i Q => mkPX (PmulC_aux P c) i (PmulC_aux Q c) + end. + + Definition PmulC P c := + if c ?=! cO then P0 else + if c ?=! cI then P else PmulC_aux P c. + + Section PmulI. + Variable Pmul : Pol -> Pol -> Pol. + Variable Q : Pol. + Fixpoint PmulI (j:positive) (P:Pol) {struct P} : Pol := + match P with + | Pc c => mkPinj j (PmulC Q c) + | Pinj j' Q' => + match ZPminus j' j with + | Zpos k => mkPinj j (Pmul (Pinj k Q') Q) + | Z0 => mkPinj j (Pmul Q' Q) + | Zneg k => mkPinj j' (PmulI k Q') + end + | PX P' i' Q' => + match j with + | xH => mkPX (PmulI xH P') i' (Pmul Q' Q) + | xO j' => mkPX (PmulI j P') i' (PmulI (Pdouble_minus_one j') Q') + | xI j' => mkPX (PmulI j P') i' (PmulI (xO j') Q') + end + end. + + End PmulI. +(* A symmetric version of the multiplication *) + + Fixpoint Pmul (P P'' : Pol) {struct P''} : Pol := + match P'' with + | Pc c => PmulC P c + | Pinj j' Q' => PmulI Pmul Q' j' P + | PX P' i' Q' => + match P with + | Pc c => PmulC P'' c + | Pinj j Q => + let QQ' := + match j with + | xH => Pmul Q Q' + | xO j => Pmul (Pinj (Pdouble_minus_one j) Q) Q' + | xI j => Pmul (Pinj (xO j) Q) Q' + end in + mkPX (Pmul P P') i' QQ' + | PX P i Q=> + let QQ' := Pmul Q Q' in + let PQ' := PmulI Pmul Q' xH P in + let QP' := Pmul (mkPinj xH Q) P' in + let PP' := Pmul P P' in + (mkPX (mkPX PP' i P0 ++ QP') i' P0) ++ mkPX PQ' i QQ' + end + end. + +(* Non symmetric *) +(* + Fixpoint Pmul_aux (P P' : Pol) {struct P'} : Pol := + match P' with + | Pc c' => PmulC P c' + | Pinj j' Q' => PmulI Pmul_aux Q' j' P + | PX P' i' Q' => + (mkPX (Pmul_aux P P') i' P0) ++ (PmulI Pmul_aux Q' xH P) + end. + + Definition Pmul P P' := + match P with + | Pc c => PmulC P' c + | Pinj j Q => PmulI Pmul_aux Q j P' + | PX P i Q => + (mkPX (Pmul_aux P P') i P0) ++ (PmulI Pmul_aux Q xH P') + end. +*) + Notation "P ** P'" := (Pmul P P'). + + Fixpoint Psquare (P:Pol) : Pol := + match P with + | Pc c => Pc (c *! c) + | Pinj j Q => Pinj j (Psquare Q) + | PX P i Q => + let twoPQ := Pmul P (mkPinj xH (PmulC Q (cI +! cI))) in + let Q2 := Psquare Q in + let P2 := Psquare P in + mkPX (mkPX P2 i P0 ++ twoPQ) i Q2 + end. + + (** Monomial **) + + Inductive Mon: Set := + mon0: Mon + | zmon: positive -> Mon -> Mon + | vmon: positive -> Mon -> Mon. + + Fixpoint Mphi(l:Env R) (M: Mon) {struct M} : R := + match M with + mon0 => rI + | zmon j M1 => Mphi (jump j l) M1 + | vmon i M1 => + let x := hd 0 l in + let xi := pow_pos rmul x i in + (Mphi (tail l) M1) * xi + end. + + Definition mkZmon j M := + match M with mon0 => mon0 | _ => zmon j M end. + + Definition zmon_pred j M := + match j with xH => M | _ => mkZmon (Ppred j) M end. + + Definition mkVmon i M := + match M with + | mon0 => vmon i mon0 + | zmon j m => vmon i (zmon_pred j m) + | vmon i' m => vmon (i+i') m + end. + + Fixpoint MFactor (P: Pol) (M: Mon) {struct P}: Pol * Pol := + match P, M with + _, mon0 => (Pc cO, P) + | Pc _, _ => (P, Pc cO) + | Pinj j1 P1, zmon j2 M1 => + match (j1 ?= j2) Eq with + Eq => let (R,S) := MFactor P1 M1 in + (mkPinj j1 R, mkPinj j1 S) + | Lt => let (R,S) := MFactor P1 (zmon (j2 - j1) M1) in + (mkPinj j1 R, mkPinj j1 S) + | Gt => (P, Pc cO) + end + | Pinj _ _, vmon _ _ => (P, Pc cO) + | PX P1 i Q1, zmon j M1 => + let M2 := zmon_pred j M1 in + let (R1, S1) := MFactor P1 M in + let (R2, S2) := MFactor Q1 M2 in + (mkPX R1 i R2, mkPX S1 i S2) + | PX P1 i Q1, vmon j M1 => + match (i ?= j) Eq with + Eq => let (R1,S1) := MFactor P1 (mkZmon xH M1) in + (mkPX R1 i Q1, S1) + | Lt => let (R1,S1) := MFactor P1 (vmon (j - i) M1) in + (mkPX R1 i Q1, S1) + | Gt => let (R1,S1) := MFactor P1 (mkZmon xH M1) in + (mkPX R1 i Q1, mkPX S1 (i-j) (Pc cO)) + end + end. + + Definition POneSubst (P1: Pol) (M1: Mon) (P2: Pol): option Pol := + let (Q1,R1) := MFactor P1 M1 in + match R1 with + (Pc c) => if c ?=! cO then None + else Some (Padd Q1 (Pmul P2 R1)) + | _ => Some (Padd Q1 (Pmul P2 R1)) + end. + + Fixpoint PNSubst1 (P1: Pol) (M1: Mon) (P2: Pol) (n: nat) {struct n}: Pol := + match POneSubst P1 M1 P2 with + Some P3 => match n with S n1 => PNSubst1 P3 M1 P2 n1 | _ => P3 end + | _ => P1 + end. + + Definition PNSubst (P1: Pol) (M1: Mon) (P2: Pol) (n: nat): option Pol := + match POneSubst P1 M1 P2 with + Some P3 => match n with S n1 => Some (PNSubst1 P3 M1 P2 n1) | _ => None end + | _ => None + end. + + Fixpoint PSubstL1 (P1: Pol) (LM1: list (Mon * Pol)) (n: nat) {struct LM1}: + Pol := + match LM1 with + cons (M1,P2) LM2 => PSubstL1 (PNSubst1 P1 M1 P2 n) LM2 n + | _ => P1 + end. + + Fixpoint PSubstL (P1: Pol) (LM1: list (Mon * Pol)) (n: nat) {struct LM1}: option Pol := + match LM1 with + cons (M1,P2) LM2 => + match PNSubst P1 M1 P2 n with + Some P3 => Some (PSubstL1 P3 LM2 n) + | None => PSubstL P1 LM2 n + end + | _ => None + end. + + Fixpoint PNSubstL (P1: Pol) (LM1: list (Mon * Pol)) (m n: nat) {struct m}: Pol := + match PSubstL P1 LM1 n with + Some P3 => match m with S m1 => PNSubstL P3 LM1 m1 n | _ => P3 end + | _ => P1 + end. + + (** Evaluation of a polynomial towards R *) + + Fixpoint Pphi(l:Env R) (P:Pol) {struct P} : R := + match P with + | Pc c => [c] + | Pinj j Q => Pphi (jump j l) Q + | PX P i Q => + let x := hd 0 l in + let xi := pow_pos rmul x i in + (Pphi l P) * xi + (Pphi (tail l) Q) + end. + + Reserved Notation "P @ l " (at level 10, no associativity). + Notation "P @ l " := (Pphi l P). + (** Proofs *) + Lemma ZPminus_spec : forall x y, + match ZPminus x y with + | Z0 => x = y + | Zpos k => x = (y + k)%positive + | Zneg k => y = (x + k)%positive + end. + Proof. + induction x;destruct y. + replace (ZPminus (xI x) (xI y)) with (Zdouble (ZPminus x y));trivial. + assert (H := IHx y);destruct (ZPminus x y);unfold Zdouble;rewrite H;trivial. + replace (ZPminus (xI x) (xO y)) with (Zdouble_plus_one (ZPminus x y));trivial. + assert (H := IHx y);destruct (ZPminus x y);unfold Zdouble_plus_one;rewrite H;trivial. + apply Pplus_xI_double_minus_one. + simpl;trivial. + replace (ZPminus (xO x) (xI y)) with (Zdouble_minus_one (ZPminus x y));trivial. + assert (H := IHx y);destruct (ZPminus x y);unfold Zdouble_minus_one;rewrite H;trivial. + apply Pplus_xI_double_minus_one. + replace (ZPminus (xO x) (xO y)) with (Zdouble (ZPminus x y));trivial. + assert (H := IHx y);destruct (ZPminus x y);unfold Zdouble;rewrite H;trivial. + replace (ZPminus (xO x) xH) with (Zpos (Pdouble_minus_one x));trivial. + rewrite <- Pplus_one_succ_l. + rewrite Psucc_o_double_minus_one_eq_xO;trivial. + replace (ZPminus xH (xI y)) with (Zneg (xO y));trivial. + replace (ZPminus xH (xO y)) with (Zneg (Pdouble_minus_one y));trivial. + rewrite <- Pplus_one_succ_l. + rewrite Psucc_o_double_minus_one_eq_xO;trivial. + simpl;trivial. + Qed. + + Lemma Peq_ok : forall P P', + (P ?== P') = true -> forall l, P@l == P'@ l. + Proof. + induction P;destruct P';simpl;intros;try discriminate;trivial. + apply (morph_eq CRmorph);trivial. + assert (H1 := Pcompare_Eq_eq p p0); destruct ((p ?= p0)%positive Eq); + try discriminate H. + rewrite (IHP P' H); rewrite H1;trivial;rrefl. + assert (H1 := Pcompare_Eq_eq p p0); destruct ((p ?= p0)%positive Eq); + try discriminate H. + rewrite H1;trivial. clear H1. + assert (H1 := IHP1 P'1);assert (H2 := IHP2 P'2); + destruct (P2 ?== P'1);[destruct (P3 ?== P'2); [idtac|discriminate H] + |discriminate H]. + rewrite (H1 H);rewrite (H2 H);rrefl. + Qed. + + Lemma Pphi0 : forall l, P0@l == 0. + Proof. + intros;simpl;apply (morph0 CRmorph). + Qed. + +Lemma env_morph : forall p e1 e2, (forall x, e1 x = e2 x) -> + p @ e1 = p @ e2. +Proof. + induction p ; simpl. + reflexivity. + intros. + apply IHp. + intros. + unfold jump. + apply H. + intros. + rewrite (IHp1 e1 e2) ; auto. + rewrite (IHp2 (tail e1) (tail e2)) ; auto. + unfold hd. unfold nth. rewrite H. reflexivity. + unfold tail. unfold jump. intros ; apply H. +Qed. + +Lemma Pjump_Pplus : forall P i j l, P @ (jump (i + j) l ) = P @ (jump j (jump i l)). +Proof. + intros. apply env_morph. intros. rewrite <- jump_Pplus. + rewrite Pplus_comm. + reflexivity. +Qed. + +Lemma Pjump_xO_tail : forall P p l, + P @ (jump (xO p) (tail l)) = P @ (jump (xI p) l). +Proof. + intros. + apply env_morph. + intros. + rewrite (@jump_simpl R (xI p)). + rewrite (@jump_simpl R (xO p)). + reflexivity. +Qed. + +Lemma Pjump_Pdouble_minus_one : forall P p l, + P @ (jump (Pdouble_minus_one p) (tail l)) = P @ (jump (xO p) l). +Proof. + intros. + apply env_morph. + intros. + rewrite jump_Pdouble_minus_one. + rewrite (@jump_simpl R (xO p)). + reflexivity. +Qed. + + + + Lemma Pphi1 : forall l, P1@l == 1. + Proof. + intros;simpl;apply (morph1 CRmorph). + Qed. + + Lemma mkPinj_ok : forall j l P, (mkPinj j P)@l == P@(jump j l). + Proof. + intros j l p;destruct p;simpl;rsimpl. + rewrite Pjump_Pplus. + reflexivity. + Qed. + + Let pow_pos_Pplus := + pow_pos_Pplus rmul Rsth Reqe.(Rmul_ext) ARth.(ARmul_comm) ARth.(ARmul_assoc). + + Lemma mkPX_ok : forall l P i Q, + (mkPX P i Q)@l == P@l*(pow_pos rmul (hd 0 l) i) + Q@(tail l). + Proof. + intros l P i Q;unfold mkPX. + destruct P;try (simpl;rrefl). + assert (H := morph_eq CRmorph c cO);destruct (c ?=! cO);simpl;try rrefl. + rewrite (H (refl_equal true));rewrite (morph0 CRmorph). + rewrite mkPinj_ok;rsimpl;simpl;rrefl. + assert (H := @Peq_ok P3 P0);destruct (P3 ?== P0);simpl;try rrefl. + rewrite (H (refl_equal true));trivial. + rewrite Pphi0. rewrite pow_pos_Pplus;rsimpl. + Qed. + + + Ltac Esimpl := + repeat (progress ( + match goal with + | |- context [P0@?l] => rewrite (Pphi0 l) + | |- context [P1@?l] => rewrite (Pphi1 l) + | |- context [(mkPinj ?j ?P)@?l] => rewrite (mkPinj_ok j l P) + | |- context [(mkPX ?P ?i ?Q)@?l] => rewrite (mkPX_ok l P i Q) + | |- context [[cO]] => rewrite (morph0 CRmorph) + | |- context [[cI]] => rewrite (morph1 CRmorph) + | |- context [[?x +! ?y]] => rewrite ((morph_add CRmorph) x y) + | |- context [[?x *! ?y]] => rewrite ((morph_mul CRmorph) x y) + | |- context [[?x -! ?y]] => rewrite ((morph_sub CRmorph) x y) + | |- context [[-! ?x]] => rewrite ((morph_opp CRmorph) x) + end)); + rsimpl; simpl. + + Lemma PaddC_ok : forall c P l, (PaddC P c)@l == P@l + [c]. + Proof. + induction P;simpl;intros;Esimpl;trivial. + rewrite IHP2;rsimpl. + Qed. + + Lemma PsubC_ok : forall c P l, (PsubC P c)@l == P@l - [c]. + Proof. + induction P;simpl;intros. + Esimpl. + rewrite IHP;rsimpl. + rewrite IHP2;rsimpl. + Qed. + + Lemma PmulC_aux_ok : forall c P l, (PmulC_aux P c)@l == P@l * [c]. + Proof. + induction P;simpl;intros;Esimpl;trivial. + rewrite IHP1;rewrite IHP2;rsimpl. + mul_push ([c]);rrefl. + Qed. + + Lemma PmulC_ok : forall c P l, (PmulC P c)@l == P@l * [c]. + Proof. + intros c P l; unfold PmulC. + assert (H:= morph_eq CRmorph c cO);destruct (c ?=! cO). + rewrite (H (refl_equal true));Esimpl. + assert (H1:= morph_eq CRmorph c cI);destruct (c ?=! cI). + rewrite (H1 (refl_equal true));Esimpl. + apply PmulC_aux_ok. + Qed. + + Lemma Popp_ok : forall P l, (--P)@l == - P@l. + Proof. + induction P;simpl;intros. + Esimpl. + apply IHP. + rewrite IHP1;rewrite IHP2;rsimpl. + Qed. + + Ltac Esimpl2 := + Esimpl; + repeat (progress ( + match goal with + | |- context [(PaddC ?P ?c)@?l] => rewrite (PaddC_ok c P l) + | |- context [(PsubC ?P ?c)@?l] => rewrite (PsubC_ok c P l) + | |- context [(PmulC ?P ?c)@?l] => rewrite (PmulC_ok c P l) + | |- context [(--?P)@?l] => rewrite (Popp_ok P l) + end)); Esimpl. + + + + + Lemma Padd_ok : forall P' P l, (P ++ P')@l == P@l + P'@l. + Proof. + induction P';simpl;intros;Esimpl2. + generalize P p l;clear P p l. + induction P;simpl;intros. + Esimpl2;apply (ARadd_comm ARth). + assert (H := ZPminus_spec p p0);destruct (ZPminus p p0). + rewrite H;Esimpl. rewrite IHP';rrefl. + rewrite H;Esimpl. rewrite IHP';Esimpl. + rewrite Pjump_Pplus. rrefl. + rewrite H;Esimpl. rewrite IHP. + rewrite Pjump_Pplus. rrefl. + destruct p0;simpl. + rewrite IHP2;simpl. rsimpl. + rewrite Pjump_xO_tail. Esimpl. + rewrite IHP2;simpl. + rewrite Pjump_Pdouble_minus_one. + rsimpl. + rewrite IHP'. + rsimpl. + destruct P;simpl. + Esimpl2;add_push [c];rrefl. + destruct p0;simpl;Esimpl2. + rewrite IHP'2;simpl. + rewrite Pjump_xO_tail. + rsimpl;add_push (P'1@l * (pow_pos rmul (hd 0 l) p));rrefl. + rewrite IHP'2;simpl. + rewrite Pjump_Pdouble_minus_one. rsimpl. + add_push (P'1@l * (pow_pos rmul (hd 0 l) p));rrefl. + rewrite IHP'2;rsimpl. + unfold tail. + add_push (P @ (jump 1 l));rrefl. + assert (H := ZPminus_spec p0 p);destruct (ZPminus p0 p);Esimpl2. + rewrite IHP'1;rewrite IHP'2;rsimpl. + add_push (P3 @ (tail l));rewrite H;rrefl. + rewrite IHP'1;rewrite IHP'2;simpl;Esimpl. + rewrite H;rewrite Pplus_comm. + rewrite pow_pos_Pplus;rsimpl. + add_push (P3 @ (tail l));rrefl. + assert (forall P k l, + (PaddX Padd P'1 k P) @ l == P@l + P'1@l * pow_pos rmul (hd 0 l) k). + induction P;simpl;intros;try apply (ARadd_comm ARth). + destruct p2; simpl; try apply (ARadd_comm ARth). + rewrite Pjump_xO_tail. + apply (ARadd_comm ARth). + rewrite Pjump_Pdouble_minus_one. + apply (ARadd_comm ARth). + assert (H1 := ZPminus_spec p2 k);destruct (ZPminus p2 k);Esimpl2. + rewrite IHP'1;rsimpl; rewrite H1;add_push (P5 @ (tail l0));rrefl. + rewrite IHP'1;simpl;Esimpl. + rewrite H1;rewrite Pplus_comm. + rewrite pow_pos_Pplus;simpl;Esimpl. + add_push (P5 @ (tail l0));rrefl. + rewrite IHP1;rewrite H1;rewrite Pplus_comm. + rewrite pow_pos_Pplus;simpl;rsimpl. + add_push (P5 @ (tail l0));rrefl. + rewrite H0;rsimpl. + add_push (P3 @ (tail l)). + rewrite H;rewrite Pplus_comm. + rewrite IHP'2;rewrite pow_pos_Pplus;rsimpl. + add_push (P3 @ (tail l));rrefl. + Qed. + + Lemma Psub_ok : forall P' P l, (P -- P')@l == P@l - P'@l. + Proof. + induction P';simpl;intros;Esimpl2;trivial. + generalize P p l;clear P p l. + induction P;simpl;intros. + Esimpl2;apply (ARadd_comm ARth). + assert (H := ZPminus_spec p p0);destruct (ZPminus p p0). + rewrite H;Esimpl. rewrite IHP';rsimpl. + rewrite H;Esimpl. rewrite IHP';Esimpl. + rewrite <- Pjump_Pplus;rewrite Pplus_comm;rrefl. + rewrite H;Esimpl. rewrite IHP. + rewrite <- Pjump_Pplus;rewrite Pplus_comm;rrefl. + destruct p0;simpl. + rewrite IHP2;simpl; try rewrite Pjump_xO_tail ; rsimpl. + rewrite IHP2;simpl. + rewrite Pjump_Pdouble_minus_one;rsimpl. + unfold tail ; rsimpl. + rewrite IHP';rsimpl. + destruct P;simpl. + repeat rewrite Popp_ok;Esimpl2;rsimpl;add_push [c];try rrefl. + destruct p0;simpl;Esimpl2. + rewrite IHP'2;simpl;rsimpl;add_push (P'1@l * (pow_pos rmul (hd 0 l) p));trivial. + rewrite Pjump_xO_tail. + add_push (P @ ((jump (xI p0) l)));rrefl. + rewrite IHP'2;simpl;rewrite Pjump_Pdouble_minus_one;rsimpl. + add_push (- (P'1 @ l * pow_pos rmul (hd 0 l) p));rrefl. + unfold tail. + rewrite IHP'2;rsimpl;add_push (P @ (jump 1 l));rrefl. + assert (H := ZPminus_spec p0 p);destruct (ZPminus p0 p);Esimpl2. + rewrite IHP'1; rewrite IHP'2;rsimpl. + add_push (P3 @ (tail l));rewrite H;rrefl. + rewrite IHP'1; rewrite IHP'2;rsimpl;simpl;Esimpl. + rewrite H;rewrite Pplus_comm. + rewrite pow_pos_Pplus;rsimpl. + add_push (P3 @ (tail l));rrefl. + assert (forall P k l, + (PsubX Psub P'1 k P) @ l == P@l + - P'1@l * pow_pos rmul (hd 0 l) k). + induction P;simpl;intros. + rewrite Popp_ok;rsimpl;apply (ARadd_comm ARth);trivial. + destruct p2;simpl; rewrite Popp_ok;rsimpl. + rewrite Pjump_xO_tail. + apply (ARadd_comm ARth);trivial. + rewrite Pjump_Pdouble_minus_one. + apply (ARadd_comm ARth);trivial. + apply (ARadd_comm ARth);trivial. + assert (H1 := ZPminus_spec p2 k);destruct (ZPminus p2 k);Esimpl2;rsimpl. + rewrite IHP'1;rsimpl;add_push (P5 @ (tail l0));rewrite H1;rrefl. + rewrite IHP'1;rewrite H1;rewrite Pplus_comm. + rewrite pow_pos_Pplus;simpl;Esimpl. + add_push (P5 @ (tail l0));rrefl. + rewrite IHP1;rewrite H1;rewrite Pplus_comm. + rewrite pow_pos_Pplus;simpl;rsimpl. + add_push (P5 @ (tail l0));rrefl. + rewrite H0;rsimpl. + rewrite IHP'2;rsimpl;add_push (P3 @ (tail l)). + rewrite H;rewrite Pplus_comm. + rewrite pow_pos_Pplus;rsimpl. + Qed. +(* Proof for the symmetric version *) + + Lemma PmulI_ok : + forall P', + (forall (P : Pol) (l : Env R), (Pmul P P') @ l == P @ l * P' @ l) -> + forall (P : Pol) (p : positive) (l : Env R), + (PmulI Pmul P' p P) @ l == P @ l * P' @ (jump p l). + Proof. + induction P;simpl;intros. + Esimpl2;apply (ARmul_comm ARth). + assert (H1 := ZPminus_spec p p0);destruct (ZPminus p p0);Esimpl2. + rewrite H1; rewrite H;rrefl. + rewrite H1; rewrite H. + rewrite Pjump_Pplus;simpl;rrefl. + rewrite H1. + rewrite Pjump_Pplus;rewrite IHP;rrefl. + destruct p0;Esimpl2. + rewrite IHP1;rewrite IHP2;rsimpl. + rewrite Pjump_xO_tail. + mul_push (pow_pos rmul (hd 0 l) p);rrefl. + rewrite IHP1;rewrite IHP2;simpl;rsimpl. + mul_push (pow_pos rmul (hd 0 l) p); rewrite Pjump_Pdouble_minus_one. + rrefl. + rewrite IHP1;simpl;rsimpl. + mul_push (pow_pos rmul (hd 0 l) p). + rewrite H;rrefl. + Qed. + +(* + Lemma PmulI_ok : + forall P', + (forall (P : Pol) (l : list R), (Pmul_aux P P') @ l == P @ l * P' @ l) -> + forall (P : Pol) (p : positive) (l : list R), + (PmulI Pmul_aux P' p P) @ l == P @ l * P' @ (jump p l). + Proof. + induction P;simpl;intros. + Esimpl2;apply (ARmul_comm ARth). + assert (H1 := ZPminus_spec p p0);destruct (ZPminus p p0);Esimpl2. + rewrite H1; rewrite H;rrefl. + rewrite H1; rewrite H. + rewrite Pplus_comm. + rewrite jump_Pplus;simpl;rrefl. + rewrite H1;rewrite Pplus_comm. + rewrite jump_Pplus;rewrite IHP;rrefl. + destruct p0;Esimpl2. + rewrite IHP1;rewrite IHP2;simpl;rsimpl. + mul_push (pow_pos rmul (hd 0 l) p);rrefl. + rewrite IHP1;rewrite IHP2;simpl;rsimpl. + mul_push (pow_pos rmul (hd 0 l) p); rewrite jump_Pdouble_minus_one;rrefl. + rewrite IHP1;simpl;rsimpl. + mul_push (pow_pos rmul (hd 0 l) p). + rewrite H;rrefl. + Qed. + + Lemma Pmul_aux_ok : forall P' P l,(Pmul_aux P P')@l == P@l * P'@l. + Proof. + induction P';simpl;intros. + Esimpl2;trivial. + apply PmulI_ok;trivial. + rewrite Padd_ok;Esimpl2. + rewrite (PmulI_ok P'2 IHP'2). rewrite IHP'1. rrefl. + Qed. +*) + +(* Proof for the symmetric version *) + Lemma Pmul_ok : forall P P' l, (P**P')@l == P@l * P'@l. + Proof. + intros P P';generalize P;clear P;induction P';simpl;intros. + apply PmulC_ok. apply PmulI_ok;trivial. + destruct P. + rewrite (ARmul_comm ARth);Esimpl2;Esimpl2. + Esimpl2. rewrite IHP'1;Esimpl2. + assert (match p0 with + | xI j => Pinj (xO j) P ** P'2 + | xO j => Pinj (Pdouble_minus_one j) P ** P'2 + | 1 => P ** P'2 + end @ (tail l) == P @ (jump p0 l) * P'2 @ (tail l)). + destruct p0;rewrite IHP'2;Esimpl. + rewrite Pjump_xO_tail. reflexivity. + rewrite Pjump_Pdouble_minus_one;Esimpl. + rewrite H;Esimpl. + rewrite Padd_ok; Esimpl2. rewrite Padd_ok; Esimpl2. + repeat (rewrite IHP'1 || rewrite IHP'2);simpl. + rewrite PmulI_ok;trivial. + unfold tail. + mul_push (P'1@l). simpl. mul_push (P'2 @ (jump 1 l)). Esimpl. + Qed. + +(* +Lemma Pmul_ok : forall P P' l, (P**P')@l == P@l * P'@l. + Proof. + destruct P;simpl;intros. + Esimpl2;apply (ARmul_comm ARth). + rewrite (PmulI_ok P (Pmul_aux_ok P)). + apply (ARmul_comm ARth). + rewrite Padd_ok; Esimpl2. + rewrite (PmulI_ok P3 (Pmul_aux_ok P3));trivial. + rewrite Pmul_aux_ok;mul_push (P' @ l). + rewrite (ARmul_comm ARth (P' @ l));rrefl. + Qed. +*) + + Lemma Psquare_ok : forall P l, (Psquare P)@l == P@l * P@l. + Proof. + induction P;simpl;intros;Esimpl2. + apply IHP. rewrite Padd_ok. rewrite Pmul_ok;Esimpl2. + rewrite IHP1;rewrite IHP2. + mul_push (pow_pos rmul (hd 0 l) p). mul_push (P2@l). + rrefl. + Qed. + + Lemma Mphi_morph : forall P env env', (forall x, env x = env' x ) -> + Mphi env P = Mphi env' P. + Proof. + induction P ; simpl. + reflexivity. + intros. + apply IHP. + intros. + unfold jump. + apply H. + (**) + intros. + replace (Mphi (tail env) P) with (Mphi (tail env') P). + unfold hd. unfold nth. + rewrite H. + reflexivity. + apply IHP. + unfold tail,jump. + intros. symmetry. apply H. + Qed. + +Lemma Mjump_xO_tail : forall M p l, + Mphi (jump (xO p) (tail l)) M = Mphi (jump (xI p) l) M. +Proof. + intros. + apply Mphi_morph. + intros. + rewrite (@jump_simpl R (xI p)). + rewrite (@jump_simpl R (xO p)). + reflexivity. +Qed. + +Lemma Mjump_Pdouble_minus_one : forall M p l, + Mphi (jump (Pdouble_minus_one p) (tail l)) M = Mphi (jump (xO p) l) M. +Proof. + intros. + apply Mphi_morph. + intros. + rewrite jump_Pdouble_minus_one. + rewrite (@jump_simpl R (xO p)). + reflexivity. +Qed. + +Lemma Mjump_Pplus : forall M i j l, Mphi (jump (i + j) l ) M = Mphi (jump j (jump i l)) M. +Proof. + intros. apply Mphi_morph. intros. rewrite <- jump_Pplus. + rewrite Pplus_comm. + reflexivity. +Qed. + + + + Lemma mkZmon_ok: forall M j l, + Mphi l (mkZmon j M) == Mphi l (zmon j M). + intros M j l; case M; simpl; intros; rsimpl. + Qed. + + Lemma zmon_pred_ok : forall M j l, + Mphi (tail l) (zmon_pred j M) == Mphi l (zmon j M). + Proof. + destruct j; simpl;intros l; rsimpl. + rewrite mkZmon_ok;rsimpl. + simpl. + rewrite Mjump_xO_tail. + reflexivity. + rewrite mkZmon_ok;simpl. + rewrite Mjump_Pdouble_minus_one; rsimpl. + Qed. + + Lemma mkVmon_ok : forall M i l, Mphi l (mkVmon i M) == Mphi l M*pow_pos rmul (hd 0 l) i. + Proof. + destruct M;simpl;intros;rsimpl. + rewrite zmon_pred_ok;simpl;rsimpl. + rewrite Pplus_comm;rewrite pow_pos_Pplus;rsimpl. + Qed. + + + Lemma Mphi_ok: forall P M l, + let (Q,R) := MFactor P M in + P@l == Q@l + (Mphi l M) * (R@l). + Proof. + intros P; elim P; simpl; auto; clear P. + intros c M l; case M; simpl; auto; try intro p; try intro m; + try rewrite (morph0 CRmorph); rsimpl. + + intros i P Hrec M l; case M; simpl; clear M. + rewrite (morph0 CRmorph); rsimpl. + intros j M. + case_eq ((i ?= j) Eq); intros He; simpl. + rewrite (Pcompare_Eq_eq _ _ He). + generalize (Hrec M (jump j l)); case (MFactor P M); + simpl; intros P2 Q2 H; repeat rewrite mkPinj_ok; auto. + generalize (Hrec (zmon (j -i) M) (jump i l)); + case (MFactor P (zmon (j -i) M)); simpl. + intros P2 Q2 H; repeat rewrite mkPinj_ok; auto. + rewrite <- (Pplus_minus _ _ (ZC2 _ _ He)). + rewrite Mjump_Pplus; auto. + rewrite (morph0 CRmorph); rsimpl. + intros P2 m; rewrite (morph0 CRmorph); rsimpl. + + intros P2 Hrec1 i Q2 Hrec2 M l; case M; simpl; auto. + rewrite (morph0 CRmorph); rsimpl. + intros j M1. + generalize (Hrec1 (zmon j M1) l); + case (MFactor P2 (zmon j M1)). + intros R1 S1 H1. + generalize (Hrec2 (zmon_pred j M1) (tail l)); + case (MFactor Q2 (zmon_pred j M1)); simpl. + intros R2 S2 H2; rewrite H1; rewrite H2. + repeat rewrite mkPX_ok; simpl. + rsimpl. + apply radd_ext; rsimpl. + rewrite (ARadd_comm ARth); rsimpl. + apply radd_ext; rsimpl. + rewrite (ARadd_comm ARth); rsimpl. + rewrite zmon_pred_ok;rsimpl. + intros j M1. + case_eq ((i ?= j) Eq); intros He; simpl. + rewrite (Pcompare_Eq_eq _ _ He). + generalize (Hrec1 (mkZmon xH M1) l); case (MFactor P2 (mkZmon xH M1)); + simpl; intros P3 Q3 H; repeat rewrite mkPinj_ok; auto. + rewrite H; rewrite mkPX_ok; rsimpl. + repeat (rewrite <-(ARadd_assoc ARth)). + apply radd_ext; rsimpl. + rewrite (ARadd_comm ARth); rsimpl. + apply radd_ext; rsimpl. + repeat (rewrite <-(ARmul_assoc ARth)). + rewrite mkZmon_ok. + apply rmul_ext; rsimpl. + rewrite (ARmul_comm ARth); rsimpl. + generalize (Hrec1 (vmon (j - i) M1) l); + case (MFactor P2 (vmon (j - i) M1)); + simpl; intros P3 Q3 H; repeat rewrite mkPinj_ok; auto. + rewrite H; rsimpl; repeat rewrite mkPinj_ok; auto. + rewrite mkPX_ok; rsimpl. + repeat (rewrite <-(ARadd_assoc ARth)). + apply radd_ext; rsimpl. + rewrite (ARadd_comm ARth); rsimpl. + apply radd_ext; rsimpl. + repeat (rewrite <-(ARmul_assoc ARth)). + apply rmul_ext; rsimpl. + rewrite (ARmul_comm ARth); rsimpl. + apply rmul_ext; rsimpl. + rewrite <- pow_pos_Pplus. + rewrite (Pplus_minus _ _ (ZC2 _ _ He)); rsimpl. + generalize (Hrec1 (mkZmon 1 M1) l); + case (MFactor P2 (mkZmon 1 M1)); + simpl; intros P3 Q3 H; repeat rewrite mkPinj_ok; auto. + rewrite H; rsimpl. + rewrite mkPX_ok; rsimpl. + repeat (rewrite <-(ARadd_assoc ARth)). + apply radd_ext; rsimpl. + rewrite (ARadd_comm ARth); rsimpl. + apply radd_ext; rsimpl. + rewrite mkZmon_ok. + repeat (rewrite <-(ARmul_assoc ARth)). + apply rmul_ext; rsimpl. + rewrite (ARmul_comm ARth); rsimpl. + rewrite mkPX_ok; simpl; rsimpl. + rewrite (morph0 CRmorph); rsimpl. + repeat (rewrite <-(ARmul_assoc ARth)). + rewrite (ARmul_comm ARth (Q3@l)); rsimpl. + apply rmul_ext; rsimpl. + rewrite <- pow_pos_Pplus. + rewrite (Pplus_minus _ _ He); rsimpl. + Qed. + +(* Proof for the symmetric version *) + + Lemma POneSubst_ok: forall P1 M1 P2 P3 l, + POneSubst P1 M1 P2 = Some P3 -> Mphi l M1 == P2@l -> P1@l == P3@l. + Proof. + intros P2 M1 P3 P4 l; unfold POneSubst. + generalize (Mphi_ok P2 M1 l); case (MFactor P2 M1); simpl; auto. + intros Q1 R1; case R1. + intros c H; rewrite H. + generalize (morph_eq CRmorph c cO); + case (c ?=! cO); simpl; auto. + intros H1 H2; rewrite H1; auto; rsimpl. + discriminate. + intros _ H1 H2; injection H1; intros; subst. + rewrite H2; rsimpl. + (* new version *) + rewrite Padd_ok; rewrite PmulC_ok; rsimpl. + intros i P5 H; rewrite H. + intros HH H1; injection HH; intros; subst; rsimpl. + rewrite Padd_ok; rewrite PmulI_ok by (intros;apply Pmul_ok). rewrite H1; rsimpl. + intros i P5 P6 H1 H2 H3; rewrite H1; rewrite H3. + assert (P4 = Q1 ++ P3 ** PX i P5 P6). + injection H2; intros; subst;trivial. + rewrite H;rewrite Padd_ok;rewrite Pmul_ok;rsimpl. +Qed. +(* + Lemma POneSubst_ok: forall P1 M1 P2 P3 l, + POneSubst P1 M1 P2 = Some P3 -> Mphi l M1 == P2@l -> P1@l == P3@l. +Proof. + intros P2 M1 P3 P4 l; unfold POneSubst. + generalize (Mphi_ok P2 M1 l); case (MFactor P2 M1); simpl; auto. + intros Q1 R1; case R1. + intros c H; rewrite H. + generalize (morph_eq CRmorph c cO); + case (c ?=! cO); simpl; auto. + intros H1 H2; rewrite H1; auto; rsimpl. + discriminate. + intros _ H1 H2; injection H1; intros; subst. + rewrite H2; rsimpl. + rewrite Padd_ok; rewrite Pmul_ok; rsimpl. + intros i P5 H; rewrite H. + intros HH H1; injection HH; intros; subst; rsimpl. + rewrite Padd_ok; rewrite Pmul_ok. rewrite H1; rsimpl. + intros i P5 P6 H1 H2 H3; rewrite H1; rewrite H3. + injection H2; intros; subst; rsimpl. + rewrite Padd_ok. + rewrite Pmul_ok; rsimpl. + Qed. +*) + Lemma PNSubst1_ok: forall n P1 M1 P2 l, + Mphi l M1 == P2@l -> P1@l == (PNSubst1 P1 M1 P2 n)@l. + Proof. + intros n; elim n; simpl; auto. + intros P2 M1 P3 l H. + generalize (fun P4 => @POneSubst_ok P2 M1 P3 P4 l); + case (POneSubst P2 M1 P3); [idtac | intros; rsimpl]. + intros P4 Hrec; rewrite (Hrec P4); auto; rsimpl. + intros n1 Hrec P2 M1 P3 l H. + generalize (fun P4 => @POneSubst_ok P2 M1 P3 P4 l); + case (POneSubst P2 M1 P3); [idtac | intros; rsimpl]. + intros P4 Hrec1; rewrite (Hrec1 P4); auto; rsimpl. + Qed. + + Lemma PNSubst_ok: forall n P1 M1 P2 l P3, + PNSubst P1 M1 P2 n = Some P3 -> Mphi l M1 == P2@l -> P1@l == P3@l. + Proof. + intros n P2 M1 P3 l P4; unfold PNSubst. + generalize (fun P4 => @POneSubst_ok P2 M1 P3 P4 l); + case (POneSubst P2 M1 P3); [idtac | intros; discriminate]. + intros P5 H1; case n; try (intros; discriminate). + intros n1 H2; injection H2; intros; subst. + rewrite <- PNSubst1_ok; auto. + Qed. + + Fixpoint MPcond (LM1: list (Mon * Pol)) (l: Env R) {struct LM1} : Prop := + match LM1 with + cons (M1,P2) LM2 => (Mphi l M1 == P2@l) /\ (MPcond LM2 l) + | _ => True + end. + + Lemma PSubstL1_ok: forall n LM1 P1 l, + MPcond LM1 l -> P1@l == (PSubstL1 P1 LM1 n)@l. + Proof. + intros n LM1; elim LM1; simpl; auto. + intros; rsimpl. + intros (M2,P2) LM2 Hrec P3 l [H H1]. + rewrite <- Hrec; auto. + apply PNSubst1_ok; auto. + Qed. + + Lemma PSubstL_ok: forall n LM1 P1 P2 l, + PSubstL P1 LM1 n = Some P2 -> MPcond LM1 l -> P1@l == P2@l. + Proof. + intros n LM1; elim LM1; simpl; auto. + intros; discriminate. + intros (M2,P2) LM2 Hrec P3 P4 l. + generalize (PNSubst_ok n P3 M2 P2); case (PNSubst P3 M2 P2 n). + intros P5 H0 H1 [H2 H3]; injection H1; intros; subst. + rewrite <- PSubstL1_ok; auto. + intros l1 H [H1 H2]; auto. + Qed. + + Lemma PNSubstL_ok: forall m n LM1 P1 l, + MPcond LM1 l -> P1@l == (PNSubstL P1 LM1 m n)@l. + Proof. + intros m; elim m; simpl; auto. + intros n LM1 P2 l H; generalize (fun P3 => @PSubstL_ok n LM1 P2 P3 l); + case (PSubstL P2 LM1 n); intros; rsimpl; auto. + intros m1 Hrec n LM1 P2 l H. + generalize (fun P3 => @PSubstL_ok n LM1 P2 P3 l); + case (PSubstL P2 LM1 n); intros; rsimpl; auto. + rewrite <- Hrec; auto. + Qed. + + (** Definition of polynomial expressions *) + + Inductive PExpr : Type := + | PEc : C -> PExpr + | PEX : positive -> PExpr + | PEadd : PExpr -> PExpr -> PExpr + | PEsub : PExpr -> PExpr -> PExpr + | PEmul : PExpr -> PExpr -> PExpr + | PEopp : PExpr -> PExpr + | PEpow : PExpr -> N -> PExpr. + + (** evaluation of polynomial expressions towards R *) + Definition mk_X j := mkPinj_pred j mkX. + + (** evaluation of polynomial expressions towards R *) + + Fixpoint PEeval (l:Env R) (pe:PExpr) {struct pe} : R := + match pe with + | PEc c => phi c + | PEX j => nth j l + | PEadd pe1 pe2 => (PEeval l pe1) + (PEeval l pe2) + | PEsub pe1 pe2 => (PEeval l pe1) - (PEeval l pe2) + | PEmul pe1 pe2 => (PEeval l pe1) * (PEeval l pe2) + | PEopp pe1 => - (PEeval l pe1) + | PEpow pe1 n => rpow (PEeval l pe1) (Cp_phi n) + end. + + (** Correctness proofs *) + + Lemma mkX_ok : forall p l, nth p l == (mk_X p) @ l. + Proof. + destruct p;simpl;intros;Esimpl;trivial. + rewrite nth_spec ; auto. + unfold hd. + rewrite <- nth_Pdouble_minus_one. + rewrite (nth_jump (Pdouble_minus_one p) l 1). + reflexivity. + Qed. + + Ltac Esimpl3 := + repeat match goal with + | |- context [(?P1 ++ ?P2)@?l] => rewrite (Padd_ok P2 P1 l) + | |- context [(?P1 -- ?P2)@?l] => rewrite (Psub_ok P2 P1 l) + end;Esimpl2;try rrefl;try apply (ARadd_comm ARth). + +(* Power using the chinise algorithm *) +(*Section POWER. + Variable subst_l : Pol -> Pol. + Fixpoint Ppow_pos (P:Pol) (p:positive){struct p} : Pol := + match p with + | xH => P + | xO p => subst_l (Psquare (Ppow_pos P p)) + | xI p => subst_l (Pmul P (Psquare (Ppow_pos P p))) + end. + + Definition Ppow_N P n := + match n with + | N0 => P1 + | Npos p => Ppow_pos P p + end. + + Lemma Ppow_pos_ok : forall l, (forall P, subst_l P@l == P@l) -> + forall P p, (Ppow_pos P p)@l == (pow_pos Pmul P p)@l. + Proof. + intros l subst_l_ok P. + induction p;simpl;intros;try rrefl;try rewrite subst_l_ok. + repeat rewrite Pmul_ok;rewrite Psquare_ok;rewrite IHp;rrefl. + repeat rewrite Pmul_ok;rewrite Psquare_ok;rewrite IHp;rrefl. + Qed. + + Lemma Ppow_N_ok : forall l, (forall P, subst_l P@l == P@l) -> + forall P n, (Ppow_N P n)@l == (pow_N P1 Pmul P n)@l. + Proof. destruct n;simpl. rrefl. apply Ppow_pos_ok. trivial. Qed. + + End POWER. *) + +Section POWER. + Variable subst_l : Pol -> Pol. + Fixpoint Ppow_pos (res P:Pol) (p:positive){struct p} : Pol := + match p with + | xH => subst_l (Pmul res P) + | xO p => Ppow_pos (Ppow_pos res P p) P p + | xI p => subst_l (Pmul (Ppow_pos (Ppow_pos res P p) P p) P) + end. + + Definition Ppow_N P n := + match n with + | N0 => P1 + | Npos p => Ppow_pos P1 P p + end. + + Lemma Ppow_pos_ok : forall l, (forall P, subst_l P@l == P@l) -> + forall res P p, (Ppow_pos res P p)@l == res@l * (pow_pos Pmul P p)@l. + Proof. + intros l subst_l_ok res P p. generalize res;clear res. + induction p;simpl;intros;try rewrite subst_l_ok; repeat rewrite Pmul_ok;repeat rewrite IHp. + rsimpl. mul_push (P@l);rsimpl. rsimpl. rrefl. + Qed. + + Lemma Ppow_N_ok : forall l, (forall P, subst_l P@l == P@l) -> + forall P n, (Ppow_N P n)@l == (pow_N P1 Pmul P n)@l. + Proof. destruct n;simpl. rrefl. rewrite Ppow_pos_ok. trivial. Esimpl. auto. Qed. + + End POWER. + + (** Normalization and rewriting *) + + Section NORM_SUBST_REC. + Variable n : nat. + Variable lmp:list (Mon*Pol). + Let subst_l P := PNSubstL P lmp n n. + Let Pmul_subst P1 P2 := subst_l (Pmul P1 P2). + Let Ppow_subst := Ppow_N subst_l. + + Fixpoint norm_aux (pe:PExpr) : Pol := + match pe with + | PEc c => Pc c + | PEX j => mk_X j + | PEadd (PEopp pe1) pe2 => Psub (norm_aux pe2) (norm_aux pe1) + | PEadd pe1 (PEopp pe2) => + Psub (norm_aux pe1) (norm_aux pe2) + | PEadd pe1 pe2 => Padd (norm_aux pe1) (norm_aux pe2) + | PEsub pe1 pe2 => Psub (norm_aux pe1) (norm_aux pe2) + | PEmul pe1 pe2 => Pmul (norm_aux pe1) (norm_aux pe2) + | PEopp pe1 => Popp (norm_aux pe1) + | PEpow pe1 n => Ppow_N (fun p => p) (norm_aux pe1) n + end. + + Definition norm_subst pe := subst_l (norm_aux pe). + + (* + Fixpoint norm_subst (pe:PExpr) : Pol := + match pe with + | PEc c => Pc c + | PEX j => subst_l (mk_X j) + | PEadd (PEopp pe1) pe2 => Psub (norm_subst pe2) (norm_subst pe1) + | PEadd pe1 (PEopp pe2) => + Psub (norm_subst pe1) (norm_subst pe2) + | PEadd pe1 pe2 => Padd (norm_subst pe1) (norm_subst pe2) + | PEsub pe1 pe2 => Psub (norm_subst pe1) (norm_subst pe2) + | PEmul pe1 pe2 => Pmul_subst (norm_subst pe1) (norm_subst pe2) + | PEopp pe1 => Popp (norm_subst pe1) + | PEpow pe1 n => Ppow_subst (norm_subst pe1) n + end. + + Lemma norm_subst_spec : + forall l pe, MPcond lmp l -> + PEeval l pe == (norm_subst pe)@l. + Proof. + intros;assert (subst_l_ok:forall P, (subst_l P)@l == P@l). + unfold subst_l;intros. + rewrite <- PNSubstL_ok;trivial. rrefl. + assert (Pms_ok:forall P1 P2, (Pmul_subst P1 P2)@l == P1@l*P2@l). + intros;unfold Pmul_subst;rewrite subst_l_ok;rewrite Pmul_ok;rrefl. + induction pe;simpl;Esimpl3. + rewrite subst_l_ok;apply mkX_ok. + rewrite IHpe1;rewrite IHpe2;destruct pe1;destruct pe2;Esimpl3. + rewrite IHpe1;rewrite IHpe2;rrefl. + rewrite Pms_ok;rewrite IHpe1;rewrite IHpe2;rrefl. + rewrite IHpe;rrefl. + unfold Ppow_subst. rewrite Ppow_N_ok. trivial. + rewrite pow_th.(rpow_pow_N). destruct n0;Esimpl3. + induction p;simpl;try rewrite IHp;try rewrite IHpe;repeat rewrite Pms_ok; + repeat rewrite Pmul_ok;rrefl. + Qed. +*) + Lemma norm_aux_spec : + forall l pe, (*MPcond lmp l ->*) + PEeval l pe == (norm_aux pe)@l. + Proof. + intros. + induction pe;simpl;Esimpl3. + apply mkX_ok. + rewrite IHpe1;rewrite IHpe2;destruct pe1;destruct pe2;Esimpl3. + rewrite IHpe1;rewrite IHpe2;rrefl. + rewrite IHpe1;rewrite IHpe2. rewrite Pmul_ok. rrefl. + rewrite IHpe;rrefl. + rewrite Ppow_N_ok by reflexivity. + rewrite pow_th.(rpow_pow_N). destruct n0;Esimpl3. + induction p;simpl;try rewrite IHp;try rewrite IHpe;repeat rewrite Pms_ok; + repeat rewrite Pmul_ok;rrefl. + Qed. + + + End NORM_SUBST_REC. + + +End MakeRingPol. + diff --git a/contrib/micromega/LICENSE.sos b/contrib/micromega/LICENSE.sos new file mode 100644 index 00000000..5aadfa2a --- /dev/null +++ b/contrib/micromega/LICENSE.sos @@ -0,0 +1,29 @@ + HOL Light copyright notice, licence and disclaimer + + (c) University of Cambridge 1998 + (c) Copyright, John Harrison 1998-2006 + +HOL Light version 2.20, hereinafter referred to as "the software", is a +computer theorem proving system written by John Harrison. Much of the +software was developed at the University of Cambridge Computer Laboratory, +New Museums Site, Pembroke Street, Cambridge, CB2 3QG, England. The +software is copyright, University of Cambridge 1998 and John Harrison +1998-2006. + +Permission to use, copy, modify, and distribute the software and its +documentation for any purpose and without fee is hereby granted. In the +case of further distribution of the software the present text, including +copyright notice, licence and disclaimer of warranty, must be included in +full and unmodified form in any release. Distribution of derivative +software obtained by modifying the software, or incorporating it into +other software, is permitted, provided the inclusion of the software is +acknowledged and that any changes made to the software are clearly +documented. + +John Harrison and the University of Cambridge disclaim all warranties +with regard to the software, including all implied warranties of +merchantability and fitness. In no event shall John Harrison or the +University of Cambridge be liable for any special, indirect, +incidental or consequential damages or any damages whatsoever, +including, but not limited to, those arising from computer failure or +malfunction, work stoppage, loss of profit or loss of contracts. diff --git a/contrib/micromega/MExtraction.v b/contrib/micromega/MExtraction.v new file mode 100644 index 00000000..a5ac92db --- /dev/null +++ b/contrib/micromega/MExtraction.v @@ -0,0 +1,23 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* + micromegap d ; + intros __wit __varmap __ff ; + change (Tauto.eval_f (Zeval_formula (@find Z Z0 __varmap)) __ff) ; + apply (ZTautoChecker_sound __ff __wit); vm_compute ; reflexivity + | R => + rmicromegap d ; + intros __wit __varmap __ff ; + change (Tauto.eval_f (Reval_formula (@find R 0%R __varmap)) __ff) ; + apply (RTautoChecker_sound __ff __wit); vm_compute ; reflexivity + | _ => fail "Unsupported domain" + end in tac. + +Tactic Notation "micromega" constr(dom) int_or_var(n) := micromegac dom n. +Tactic Notation "micromega" constr(dom) := micromegac dom ltac:-1. + +Ltac zfarkas := omicronp ; + intros __wit __varmap __ff ; + change (Tauto.eval_f (Zeval_formula (@find Z Z0 __varmap)) __ff) ; + apply (ZTautoChecker_sound __ff __wit); vm_compute ; reflexivity. + +Ltac omicron dom := + let tac := lazymatch dom with + | Z => + zomicronp ; + intros __wit __varmap __ff ; + change (Tauto.eval_f (Zeval_formula (@find Z Z0 __varmap)) __ff) ; + apply (ZTautoChecker_sound __ff __wit); vm_compute ; reflexivity + | Q => + qomicronp ; + intros __wit __varmap __ff ; + change (Tauto.eval_f (Qeval_formula (@find Q 0%Q __varmap)) __ff) ; + apply (QTautoChecker_sound __ff __wit); vm_compute ; reflexivity + | R => + romicronp ; + intros __wit __varmap __ff ; + change (Tauto.eval_f (Reval_formula (@find R 0%R __varmap)) __ff) ; + apply (RTautoChecker_sound __ff __wit); vm_compute ; reflexivity + | _ => fail "Unsupported domain" + end in tac. + +Ltac sos dom := + let tac := lazymatch dom with + | Z => + sosp ; + intros __wit __varmap __ff ; + change (Tauto.eval_f (Zeval_formula (@find Z Z0 __varmap)) __ff) ; + apply (ZTautoChecker_sound __ff __wit); vm_compute ; reflexivity + | _ => fail "Unsupported domain" + end in tac. + + diff --git a/contrib/micromega/OrderedRing.v b/contrib/micromega/OrderedRing.v new file mode 100644 index 00000000..149b7731 --- /dev/null +++ b/contrib/micromega/OrderedRing.v @@ -0,0 +1,458 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* R -> R) (ropp : R -> R). +Variable req rle rlt : R -> R -> Prop. +Notation "0" := rO. +Notation "1" := rI. +Notation "x + y" := (rplus x y). +Notation "x * y " := (rtimes x y). +Notation "x - y " := (rminus x y). +Notation "- x" := (ropp x). +Notation "x == y" := (req x y). +Notation "x ~= y" := (~ req x y). +Notation "x <= y" := (rle x y). +Notation "x < y" := (rlt x y). + +Record SOR : Type := mk_SOR_theory { + SORsetoid : Setoid_Theory R req; + SORplus_wd : forall x1 x2, x1 == x2 -> forall y1 y2, y1 == y2 -> x1 + y1 == x2 + y2; + SORtimes_wd : forall x1 x2, x1 == x2 -> forall y1 y2, y1 == y2 -> x1 * y1 == x2 * y2; + SORopp_wd : forall x1 x2, x1 == x2 -> -x1 == -x2; + SORle_wd : forall x1 x2, x1 == x2 -> forall y1 y2, y1 == y2 -> (x1 <= y1 <-> x2 <= y2); + SORlt_wd : forall x1 x2, x1 == x2 -> forall y1 y2, y1 == y2 -> (x1 < y1 <-> x2 < y2); + SORrt : ring_theory rO rI rplus rtimes rminus ropp req; + SORle_refl : forall n : R, n <= n; + SORle_antisymm : forall n m : R, n <= m -> m <= n -> n == m; + SORle_trans : forall n m p : R, n <= m -> m <= p -> n <= p; + SORlt_le_neq : forall n m : R, n < m <-> n <= m /\ n ~= m; + SORlt_trichotomy : forall n m : R, n < m \/ n == m \/ m < n; + SORplus_le_mono_l : forall n m p : R, n <= m -> p + n <= p + m; + SORtimes_pos_pos : forall n m : R, 0 < n -> 0 < m -> 0 < n * m; + SORneq_0_1 : 0 ~= 1 +}. + +(* We cannot use Relation_Definitions.order.ord_antisym and +Relations_1.Antisymmetric because they refer to Leibniz equality *) + +End DEFINITIONS. + +Section STRICT_ORDERED_RING. + +Variable R : Type. +Variable (rO rI : R) (rplus rtimes rminus: R -> R -> R) (ropp : R -> R). +Variable req rle rlt : R -> R -> Prop. + +Variable sor : SOR rO rI rplus rtimes rminus ropp req rle rlt. + +Notation "0" := rO. +Notation "1" := rI. +Notation "x + y" := (rplus x y). +Notation "x * y " := (rtimes x y). +Notation "x - y " := (rminus x y). +Notation "- x" := (ropp x). +Notation "x == y" := (req x y). +Notation "x ~= y" := (~ req x y). +Notation "x <= y" := (rle x y). +Notation "x < y" := (rlt x y). + + +Add Relation R req + reflexivity proved by sor.(SORsetoid).(@Equivalence_Reflexive _ _ ) + symmetry proved by sor.(SORsetoid).(@Equivalence_Symmetric _ _ ) + transitivity proved by sor.(SORsetoid).(@Equivalence_Transitive _ _ ) +as sor_setoid. + + +Add Morphism rplus with signature req ==> req ==> req as rplus_morph. +Proof. +exact sor.(SORplus_wd). +Qed. +Add Morphism rtimes with signature req ==> req ==> req as rtimes_morph. +Proof. +exact sor.(SORtimes_wd). +Qed. +Add Morphism ropp with signature req ==> req as ropp_morph. +Proof. +exact sor.(SORopp_wd). +Qed. +Add Morphism rle with signature req ==> req ==> iff as rle_morph. +Proof. +exact sor.(SORle_wd). +Qed. +Add Morphism rlt with signature req ==> req ==> iff as rlt_morph. +Proof. +exact sor.(SORlt_wd). +Qed. + +Add Ring SOR : sor.(SORrt). + +Add Morphism rminus with signature req ==> req ==> req as rminus_morph. +Proof. +intros x1 x2 H1 y1 y2 H2. +rewrite (sor.(SORrt).(Rsub_def) x1 y1). +rewrite (sor.(SORrt).(Rsub_def) x2 y2). +rewrite H1; now rewrite H2. +Qed. + +Theorem Rneq_symm : forall n m : R, n ~= m -> m ~= n. +Proof. +intros n m H1 H2; rewrite H2 in H1; now apply H1. +Qed. + +(* Propeties of plus, minus and opp *) + +Theorem Rplus_0_l : forall n : R, 0 + n == n. +Proof. +intro; ring. +Qed. + +Theorem Rplus_0_r : forall n : R, n + 0 == n. +Proof. +intro; ring. +Qed. + +Theorem Rtimes_0_r : forall n : R, n * 0 == 0. +Proof. +intro; ring. +Qed. + +Theorem Rplus_comm : forall n m : R, n + m == m + n. +Proof. +intros; ring. +Qed. + +Theorem Rtimes_0_l : forall n : R, 0 * n == 0. +Proof. +intro; ring. +Qed. + +Theorem Rtimes_comm : forall n m : R, n * m == m * n. +Proof. +intros; ring. +Qed. + +Theorem Rminus_eq_0 : forall n m : R, n - m == 0 <-> n == m. +Proof. +intros n m. +split; intro H. setoid_replace n with ((n - m) + m) by ring. rewrite H. +now rewrite Rplus_0_l. +rewrite H; ring. +Qed. + +Theorem Rplus_cancel_l : forall n m p : R, p + n == p + m <-> n == m. +Proof. +intros n m p; split; intro H. +setoid_replace n with (- p + (p + n)) by ring. +setoid_replace m with (- p + (p + m)) by ring. now rewrite H. +now rewrite H. +Qed. + +(* Relations *) + +Theorem Rle_refl : forall n : R, n <= n. +Proof sor.(SORle_refl). + +Theorem Rle_antisymm : forall n m : R, n <= m -> m <= n -> n == m. +Proof sor.(SORle_antisymm). + +Theorem Rle_trans : forall n m p : R, n <= m -> m <= p -> n <= p. +Proof sor.(SORle_trans). + +Theorem Rlt_trichotomy : forall n m : R, n < m \/ n == m \/ m < n. +Proof sor.(SORlt_trichotomy). + +Theorem Rlt_le_neq : forall n m : R, n < m <-> n <= m /\ n ~= m. +Proof sor.(SORlt_le_neq). + +Theorem Rneq_0_1 : 0 ~= 1. +Proof sor.(SORneq_0_1). + +Theorem Req_em : forall n m : R, n == m \/ n ~= m. +Proof. +intros n m. destruct (Rlt_trichotomy n m) as [H | [H | H]]; try rewrite Rlt_le_neq in H. +right; now destruct H. +now left. +right; apply Rneq_symm; now destruct H. +Qed. + +Theorem Req_dne : forall n m : R, ~ ~ n == m <-> n == m. +Proof. +intros n m; destruct (Req_em n m) as [H | H]. +split; auto. +split. intro H1; false_hyp H H1. auto. +Qed. + +Theorem Rle_lt_eq : forall n m : R, n <= m <-> n < m \/ n == m. +Proof. +intros n m; rewrite Rlt_le_neq. +split; [intro H | intros [[H1 H2] | H]]. +destruct (Req_em n m) as [H1 | H1]. now right. left; now split. +assumption. +rewrite H; apply Rle_refl. +Qed. + +Ltac le_less := rewrite Rle_lt_eq; left; try assumption. +Ltac le_equal := rewrite Rle_lt_eq; right; try reflexivity; try assumption. +Ltac le_elim H := rewrite Rle_lt_eq in H; destruct H as [H | H]. + +Theorem Rlt_trans : forall n m p : R, n < m -> m < p -> n < p. +Proof. +intros n m p; repeat rewrite Rlt_le_neq; intros [H1 H2] [H3 H4]; split. +now apply Rle_trans with m. +intro H. rewrite H in H1. pose proof (Rle_antisymm H3 H1). now apply H4. +Qed. + +Theorem Rle_lt_trans : forall n m p : R, n <= m -> m < p -> n < p. +Proof. +intros n m p H1 H2; le_elim H1. +now apply Rlt_trans with (m := m). now rewrite H1. +Qed. + +Theorem Rlt_le_trans : forall n m p : R, n < m -> m <= p -> n < p. +Proof. +intros n m p H1 H2; le_elim H2. +now apply Rlt_trans with (m := m). now rewrite <- H2. +Qed. + +Theorem Rle_gt_cases : forall n m : R, n <= m \/ m < n. +Proof. +intros n m; destruct (Rlt_trichotomy n m) as [H | [H | H]]. +left; now le_less. left; now le_equal. now right. +Qed. + +Theorem Rlt_neq : forall n m : R, n < m -> n ~= m. +Proof. +intros n m; rewrite Rlt_le_neq; now intros [_ H]. +Qed. + +Theorem Rle_ngt : forall n m : R, n <= m <-> ~ m < n. +Proof. +intros n m; split. +intros H H1; assert (H2 : n < n) by now apply Rle_lt_trans with m. now apply (Rlt_neq H2). +intro H. destruct (Rle_gt_cases n m) as [H1 | H1]. assumption. false_hyp H1 H. +Qed. + +Theorem Rlt_nge : forall n m : R, n < m <-> ~ m <= n. +Proof. +intros n m; split. +intros H H1; assert (H2 : n < n) by now apply Rlt_le_trans with m. now apply (Rlt_neq H2). +intro H. destruct (Rle_gt_cases m n) as [H1 | H1]. false_hyp H1 H. assumption. +Qed. + +(* Plus, minus and order *) + +Theorem Rplus_le_mono_l : forall n m p : R, n <= m <-> p + n <= p + m. +Proof. +intros n m p; split. +apply sor.(SORplus_le_mono_l). +intro H. apply (sor.(SORplus_le_mono_l) (p + n) (p + m) (- p)) in H. +setoid_replace (- p + (p + n)) with n in H by ring. +setoid_replace (- p + (p + m)) with m in H by ring. assumption. +Qed. + +Theorem Rplus_le_mono_r : forall n m p : R, n <= m <-> n + p <= m + p. +Proof. +intros n m p; rewrite (Rplus_comm n p); rewrite (Rplus_comm m p). +apply Rplus_le_mono_l. +Qed. + +Theorem Rplus_lt_mono_l : forall n m p : R, n < m <-> p + n < p + m. +Proof. +intros n m p; do 2 rewrite Rlt_le_neq. rewrite Rplus_cancel_l. +now rewrite <- Rplus_le_mono_l. +Qed. + +Theorem Rplus_lt_mono_r : forall n m p : R, n < m <-> n + p < m + p. +Proof. +intros n m p. +rewrite (Rplus_comm n p); rewrite (Rplus_comm m p); apply Rplus_lt_mono_l. +Qed. + +Theorem Rplus_lt_mono : forall n m p q : R, n < m -> p < q -> n + p < m + q. +Proof. +intros n m p q H1 H2. +apply Rlt_trans with (m + p); [now apply -> Rplus_lt_mono_r | now apply -> Rplus_lt_mono_l]. +Qed. + +Theorem Rplus_le_mono : forall n m p q : R, n <= m -> p <= q -> n + p <= m + q. +Proof. +intros n m p q H1 H2. +apply Rle_trans with (m + p); [now apply -> Rplus_le_mono_r | now apply -> Rplus_le_mono_l]. +Qed. + +Theorem Rplus_lt_le_mono : forall n m p q : R, n < m -> p <= q -> n + p < m + q. +Proof. +intros n m p q H1 H2. +apply Rlt_le_trans with (m + p); [now apply -> Rplus_lt_mono_r | now apply -> Rplus_le_mono_l]. +Qed. + +Theorem Rplus_le_lt_mono : forall n m p q : R, n <= m -> p < q -> n + p < m + q. +Proof. +intros n m p q H1 H2. +apply Rle_lt_trans with (m + p); [now apply -> Rplus_le_mono_r | now apply -> Rplus_lt_mono_l]. +Qed. + +Theorem Rplus_pos_pos : forall n m : R, 0 < n -> 0 < m -> 0 < n + m. +Proof. +intros n m H1 H2. rewrite <- (Rplus_0_l 0). now apply Rplus_lt_mono. +Qed. + +Theorem Rplus_pos_nonneg : forall n m : R, 0 < n -> 0 <= m -> 0 < n + m. +Proof. +intros n m H1 H2. rewrite <- (Rplus_0_l 0). now apply Rplus_lt_le_mono. +Qed. + +Theorem Rplus_nonneg_pos : forall n m : R, 0 <= n -> 0 < m -> 0 < n + m. +Proof. +intros n m H1 H2. rewrite <- (Rplus_0_l 0). now apply Rplus_le_lt_mono. +Qed. + +Theorem Rplus_nonneg_nonneg : forall n m : R, 0 <= n -> 0 <= m -> 0 <= n + m. +Proof. +intros n m H1 H2. rewrite <- (Rplus_0_l 0). now apply Rplus_le_mono. +Qed. + +Theorem Rle_le_minus : forall n m : R, n <= m <-> 0 <= m - n. +Proof. +intros n m. rewrite (@Rplus_le_mono_r n m (- n)). +setoid_replace (n + - n) with 0 by ring. +now setoid_replace (m + - n) with (m - n) by ring. +Qed. + +Theorem Rlt_lt_minus : forall n m : R, n < m <-> 0 < m - n. +Proof. +intros n m. rewrite (@Rplus_lt_mono_r n m (- n)). +setoid_replace (n + - n) with 0 by ring. +now setoid_replace (m + - n) with (m - n) by ring. +Qed. + +Theorem Ropp_lt_mono : forall n m : R, n < m <-> - m < - n. +Proof. +intros n m. split; intro H. +apply -> (@Rplus_lt_mono_l n m (- n - m)) in H. +setoid_replace (- n - m + n) with (- m) in H by ring. +now setoid_replace (- n - m + m) with (- n) in H by ring. +apply -> (@Rplus_lt_mono_l (- m) (- n) (n + m)) in H. +setoid_replace (n + m + - m) with n in H by ring. +now setoid_replace (n + m + - n) with m in H by ring. +Qed. + +Theorem Ropp_pos_neg : forall n : R, 0 < - n <-> n < 0. +Proof. +intro n; rewrite (Ropp_lt_mono n 0). now setoid_replace (- 0) with 0 by ring. +Qed. + +(* Times and order *) + +Theorem Rtimes_pos_pos : forall n m : R, 0 < n -> 0 < m -> 0 < n * m. +Proof sor.(SORtimes_pos_pos). + +Theorem Rtimes_nonneg_nonneg : forall n m : R, 0 <= n -> 0 <= m -> 0 <= n * m. +Proof. +intros n m H1 H2. +le_elim H1. le_elim H2. +le_less; now apply Rtimes_pos_pos. +rewrite <- H2; rewrite Rtimes_0_r; le_equal. +rewrite <- H1; rewrite Rtimes_0_l; le_equal. +Qed. + +Theorem Rtimes_pos_neg : forall n m : R, 0 < n -> m < 0 -> n * m < 0. +Proof. +intros n m H1 H2. apply -> Ropp_pos_neg. +setoid_replace (- (n * m)) with (n * (- m)) by ring. +apply Rtimes_pos_pos. assumption. now apply <- Ropp_pos_neg. +Qed. + +Theorem Rtimes_neg_neg : forall n m : R, n < 0 -> m < 0 -> 0 < n * m. +Proof. +intros n m H1 H2. +setoid_replace (n * m) with ((- n) * (- m)) by ring. +apply Rtimes_pos_pos; now apply <- Ropp_pos_neg. +Qed. + +Theorem Rtimes_square_nonneg : forall n : R, 0 <= n * n. +Proof. +intro n; destruct (Rlt_trichotomy 0 n) as [H | [H | H]]. +le_less; now apply Rtimes_pos_pos. +rewrite <- H, Rtimes_0_l; le_equal. +le_less; now apply Rtimes_neg_neg. +Qed. + +Theorem Rtimes_neq_0 : forall n m : R, n ~= 0 /\ m ~= 0 -> n * m ~= 0. +Proof. +intros n m [H1 H2]. +destruct (Rlt_trichotomy n 0) as [H3 | [H3 | H3]]; +destruct (Rlt_trichotomy m 0) as [H4 | [H4 | H4]]; +try (false_hyp H3 H1); try (false_hyp H4 H2). +apply Rneq_symm. apply Rlt_neq. now apply Rtimes_neg_neg. +apply Rlt_neq. rewrite Rtimes_comm. now apply Rtimes_pos_neg. +apply Rlt_neq. now apply Rtimes_pos_neg. +apply Rneq_symm. apply Rlt_neq. now apply Rtimes_pos_pos. +Qed. + +(* The following theorems are used to build a morphism from Z to R and +prove its properties in ZCoeff.v. They are not used in RingMicromega.v. *) + +(* Surprisingly, multilication is needed to prove the following theorem *) + +Theorem Ropp_neg_pos : forall n : R, - n < 0 <-> 0 < n. +Proof. +intro n; setoid_replace n with (- - n) by ring. rewrite Ropp_pos_neg. +now setoid_replace (- - n) with n by ring. +Qed. + +Theorem Rlt_0_1 : 0 < 1. +Proof. +apply <- Rlt_le_neq. split. +setoid_replace 1 with (1 * 1) by ring. apply Rtimes_square_nonneg. +apply Rneq_0_1. +Qed. + +Theorem Rlt_succ_r : forall n : R, n < 1 + n. +Proof. +intro n. rewrite <- (Rplus_0_l n); setoid_replace (1 + (0 + n)) with (1 + n) by ring. +apply -> Rplus_lt_mono_r. apply Rlt_0_1. +Qed. + +Theorem Rlt_lt_succ : forall n m : R, n < m -> n < 1 + m. +Proof. +intros n m H; apply Rlt_trans with m. assumption. apply Rlt_succ_r. +Qed. + +(*Theorem Rtimes_lt_mono_pos_l : forall n m p : R, 0 < p -> n < m -> p * n < p * m. +Proof. +intros n m p H1 H2. apply <- Rlt_lt_minus. +setoid_replace (p * m - p * n) with (p * (m - n)) by ring. +apply Rtimes_pos_pos. assumption. now apply -> Rlt_lt_minus. +Qed.*) + +End STRICT_ORDERED_RING. + diff --git a/contrib/micromega/QMicromega.v b/contrib/micromega/QMicromega.v new file mode 100644 index 00000000..9e95f6c4 --- /dev/null +++ b/contrib/micromega/QMicromega.v @@ -0,0 +1,259 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* x == y. +Proof. + intros. + unfold Qeq_bool in H. + unfold Qeq. + apply (Zeqb_ok _ _ H). +Qed. + + +Lemma Qeq_bool_neq : forall x y, Qeq_bool x y = false -> ~ x == y. +Proof. + unfold Qeq_bool,Qeq. + red ; intros ; subst. + rewrite H0 in H. + apply (ZMicromega.Zeq_bool_neq _ _ H). + reflexivity. +Qed. + +Lemma Qle_bool_imp_le : forall x y : Q, Qle_bool x y = true -> x <= y. +Proof. + unfold Qle_bool, Qle. + intros. + apply Zle_bool_imp_le ; auto. +Qed. + + + + +Lemma QSORaddon : + SORaddon 0 1 Qplus Qmult Qminus Qopp Qeq Qle (* ring elements *) + 0 1 Qplus Qmult Qminus Qopp (* coefficients *) + Qeq_bool Qle_bool + (fun x => x) (fun x => x) (pow_N 1 Qmult). +Proof. + constructor. + constructor ; intros ; try reflexivity. + apply Qeq_bool_ok ; auto. + constructor. + reflexivity. + intros x y. + apply Qeq_bool_neq ; auto. + apply Qle_bool_imp_le. +Qed. + + +(*Definition Zeval_expr := eval_pexpr 0 Zplus Zmult Zminus Zopp (fun x => x) (fun x => Z_of_N x) (Zpower).*) +Require Import EnvRing. + +Fixpoint Qeval_expr (env: PolEnv Q) (e: PExpr Q) : Q := + match e with + | PEc c => c + | PEX j => env j + | PEadd pe1 pe2 => (Qeval_expr env pe1) + (Qeval_expr env pe2) + | PEsub pe1 pe2 => (Qeval_expr env pe1) - (Qeval_expr env pe2) + | PEmul pe1 pe2 => (Qeval_expr env pe1) * (Qeval_expr env pe2) + | PEopp pe1 => - (Qeval_expr env pe1) + | PEpow pe1 n => Qpower (Qeval_expr env pe1) (Z_of_N n) + end. + +Lemma Qeval_expr_simpl : forall env e, + Qeval_expr env e = + match e with + | PEc c => c + | PEX j => env j + | PEadd pe1 pe2 => (Qeval_expr env pe1) + (Qeval_expr env pe2) + | PEsub pe1 pe2 => (Qeval_expr env pe1) - (Qeval_expr env pe2) + | PEmul pe1 pe2 => (Qeval_expr env pe1) * (Qeval_expr env pe2) + | PEopp pe1 => - (Qeval_expr env pe1) + | PEpow pe1 n => Qpower (Qeval_expr env pe1) (Z_of_N n) + end. +Proof. + destruct e ; reflexivity. +Qed. + +Definition Qeval_expr' := eval_pexpr Qplus Qmult Qminus Qopp (fun x => x) (fun x => x) (pow_N 1 Qmult). + +Lemma QNpower : forall r n, r ^ Z_of_N n = pow_N 1 Qmult r n. +Proof. + destruct n ; reflexivity. +Qed. + + +Lemma Qeval_expr_compat : forall env e, Qeval_expr env e = Qeval_expr' env e. +Proof. + induction e ; simpl ; subst ; try congruence. + rewrite IHe. + apply QNpower. +Qed. + +Definition Qeval_op2 (o : Op2) : Q -> Q -> Prop := +match o with +| OpEq => Qeq +| OpNEq => fun x y => ~ x == y +| OpLe => Qle +| OpGe => Qge +| OpLt => Qlt +| OpGt => Qgt +end. + +Definition Qeval_formula (e:PolEnv Q) (ff : Formula Q) := + let (lhs,o,rhs) := ff in Qeval_op2 o (Qeval_expr e lhs) (Qeval_expr e rhs). + +Definition Qeval_formula' := + eval_formula Qplus Qmult Qminus Qopp Qeq Qle Qlt (fun x => x) (fun x => x) (pow_N 1 Qmult). + +Lemma Qeval_formula_compat : forall env f, Qeval_formula env f <-> Qeval_formula' env f. +Proof. + intros. + unfold Qeval_formula. + destruct f. + repeat rewrite Qeval_expr_compat. + unfold Qeval_formula'. + unfold Qeval_expr'. + split ; destruct Fop ; simpl; auto. +Qed. + + + +Definition Qeval_nformula := + eval_nformula 0 Qplus Qmult Qminus Qopp Qeq Qle Qlt (fun x => x) (fun x => x) (pow_N 1 Qmult). + +Definition Qeval_op1 (o : Op1) : Q -> Prop := +match o with +| Equal => fun x : Q => x == 0 +| NonEqual => fun x : Q => ~ x == 0 +| Strict => fun x : Q => 0 < x +| NonStrict => fun x : Q => 0 <= x +end. + +Lemma Qeval_nformula_simpl : forall env f, Qeval_nformula env f = (let (p, op) := f in Qeval_op1 op (Qeval_expr env p)). +Proof. + intros. + destruct f. + rewrite Qeval_expr_compat. + reflexivity. +Qed. + +Lemma Qeval_nformula_dec : forall env d, (Qeval_nformula env d) \/ ~ (Qeval_nformula env d). +Proof. + exact (fun env d =>eval_nformula_dec Qsor (fun x => x) (fun x => x) (pow_N 1 Qmult) env d). +Qed. + +Definition QWitness := ConeMember Q. + +Definition QWeakChecker := check_normalised_formulas 0 1 Qplus Qmult Qminus Qopp Qeq_bool Qle_bool. + +Require Import List. + +Lemma QWeakChecker_sound : forall (l : list (NFormula Q)) (cm : QWitness), + QWeakChecker l cm = true -> + forall env, make_impl (Qeval_nformula env) l False. +Proof. + intros l cm H. + intro. + unfold Qeval_nformula. + apply (checker_nf_sound Qsor QSORaddon l cm). + unfold QWeakChecker in H. + exact H. +Qed. + +Require Import Tauto. + +Definition QTautoChecker (f : BFormula (Formula Q)) (w: list QWitness) : bool := + @tauto_checker (Formula Q) (NFormula Q) (@cnf_normalise Q) (@cnf_negate Q) QWitness QWeakChecker f w. + +Lemma QTautoChecker_sound : forall f w, QTautoChecker f w = true -> forall env, eval_f (Qeval_formula env) f. +Proof. + intros f w. + unfold QTautoChecker. + apply (tauto_checker_sound Qeval_formula Qeval_nformula). + apply Qeval_nformula_dec. + intros. rewrite Qeval_formula_compat. unfold Qeval_formula'. now apply (cnf_normalise_correct Qsor). + intros. rewrite Qeval_formula_compat. unfold Qeval_formula'. now apply (cnf_negate_correct Qsor). + intros t w0. + apply QWeakChecker_sound. +Qed. + + diff --git a/contrib/micromega/RMicromega.v b/contrib/micromega/RMicromega.v new file mode 100644 index 00000000..ef28db32 --- /dev/null +++ b/contrib/micromega/RMicromega.v @@ -0,0 +1,148 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* IZR 0%Z + | Npos p => IZR (Zpos p) + end. + +Definition Reval_expr := eval_pexpr Rplus Rmult Rminus Ropp IZR Nnat.nat_of_N pow. + + +Definition Reval_formula := + eval_formula Rplus Rmult Rminus Ropp (@eq R) Rle Rlt IZR Nnat.nat_of_N pow. + + +Definition Reval_nformula := + eval_nformula 0 Rplus Rmult Rminus Ropp (@eq R) Rle Rlt IZR Nnat.nat_of_N pow. + + +Lemma Reval_nformula_dec : forall env d, (Reval_nformula env d) \/ ~ (Reval_nformula env d). +Proof. + exact (fun env d =>eval_nformula_dec Rsor IZR Nnat.nat_of_N pow env d). +Qed. + +Definition RWitness := ConeMember Z. + +Definition RWeakChecker := check_normalised_formulas 0%Z 1%Z Zplus Zmult Zminus Zopp Zeq_bool Zle_bool. + +Require Import List. + +Lemma RWeakChecker_sound : forall (l : list (NFormula Z)) (cm : RWitness), + RWeakChecker l cm = true -> + forall env, make_impl (Reval_nformula env) l False. +Proof. + intros l cm H. + intro. + unfold Reval_nformula. + apply (checker_nf_sound Rsor RZSORaddon l cm). + unfold RWeakChecker in H. + exact H. +Qed. + +Require Import Tauto. + +Definition RTautoChecker (f : BFormula (Formula Z)) (w: list RWitness) : bool := + @tauto_checker (Formula Z) (NFormula Z) (@cnf_normalise Z) (@cnf_negate Z) RWitness RWeakChecker f w. + +Lemma RTautoChecker_sound : forall f w, RTautoChecker f w = true -> forall env, eval_f (Reval_formula env) f. +Proof. + intros f w. + unfold RTautoChecker. + apply (tauto_checker_sound Reval_formula Reval_nformula). + apply Reval_nformula_dec. + intros. unfold Reval_formula. now apply (cnf_normalise_correct Rsor). + intros. unfold Reval_formula. now apply (cnf_negate_correct Rsor). + intros t w0. + apply RWeakChecker_sound. +Qed. + + diff --git a/contrib/micromega/Refl.v b/contrib/micromega/Refl.v new file mode 100644 index 00000000..801d8b21 --- /dev/null +++ b/contrib/micromega/Refl.v @@ -0,0 +1,129 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* ' '/\': basic properties *) + +Fixpoint make_impl (A : Type) (eval : A -> Prop) (l : list A) (goal : Prop) {struct l} : Prop := + match l with + | nil => goal + | cons e l => (eval e) -> (make_impl eval l goal) + end. + +Theorem make_impl_true : + forall (A : Type) (eval : A -> Prop) (l : list A), make_impl eval l True. +Proof. +induction l as [| a l IH]; simpl. +trivial. +intro; apply IH. +Qed. + +Fixpoint make_conj (A : Type) (eval : A -> Prop) (l : list A) {struct l} : Prop := + match l with + | nil => True + | cons e nil => (eval e) + | cons e l2 => ((eval e) /\ (make_conj eval l2)) + end. + +Theorem make_conj_cons : forall (A : Type) (eval : A -> Prop) (a : A) (l : list A), + make_conj eval (a :: l) <-> eval a /\ make_conj eval l. +Proof. +intros; destruct l; simpl; tauto. +Qed. + + +Lemma make_conj_impl : forall (A : Type) (eval : A -> Prop) (l : list A) (g : Prop), + (make_conj eval l -> g) <-> make_impl eval l g. +Proof. + induction l. + simpl. + tauto. + simpl. + intros. + destruct l. + simpl. + tauto. + generalize (IHl g). + tauto. +Qed. + +Lemma make_conj_in : forall (A : Type) (eval : A -> Prop) (l : list A), + make_conj eval l -> (forall p, In p l -> eval p). +Proof. + induction l. + simpl. + tauto. + simpl. + intros. + destruct l. + simpl in H0. + destruct H0. + subst; auto. + tauto. + destruct H. + destruct H0. + subst;auto. + apply IHl; auto. +Qed. + + + +Lemma make_conj_app : forall A eval l1 l2, @make_conj A eval (l1 ++ l2) <-> @make_conj A eval l1 /\ @make_conj A eval l2. +Proof. + induction l1. + simpl. + tauto. + intros. + change ((a::l1) ++ l2) with (a :: (l1 ++ l2)). + rewrite make_conj_cons. + rewrite IHl1. + rewrite make_conj_cons. + tauto. +Qed. + +Lemma not_make_conj_cons : forall (A:Type) (t:A) a eval (no_middle_eval : (eval t) \/ ~ (eval t)), + ~ make_conj eval (t ::a) -> ~ (eval t) \/ (~ make_conj eval a). +Proof. + intros. + simpl in H. + destruct a. + tauto. + tauto. +Qed. + +Lemma not_make_conj_app : forall (A:Type) (t:list A) a eval + (no_middle_eval : forall d, eval d \/ ~ eval d) , + ~ make_conj eval (t ++ a) -> (~ make_conj eval t) \/ (~ make_conj eval a). +Proof. + induction t. + simpl. + tauto. + intros. + simpl ((a::t)++a0)in H. + destruct (@not_make_conj_cons _ _ _ _ (no_middle_eval a) H). + left ; red ; intros. + apply H0. + rewrite make_conj_cons in H1. + tauto. + destruct (IHt _ _ no_middle_eval H0). + left ; red ; intros. + apply H1. + rewrite make_conj_cons in H2. + tauto. + right ; auto. +Qed. diff --git a/contrib/micromega/RingMicromega.v b/contrib/micromega/RingMicromega.v new file mode 100644 index 00000000..6885b82c --- /dev/null +++ b/contrib/micromega/RingMicromega.v @@ -0,0 +1,779 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* R -> R. +Variable ropp : R -> R. +Variables req rle rlt : R -> R -> Prop. + +Variable sor : SOR rO rI rplus rtimes rminus ropp req rle rlt. + +Notation "0" := rO. +Notation "1" := rI. +Notation "x + y" := (rplus x y). +Notation "x * y " := (rtimes x y). +Notation "x - y " := (rminus x y). +Notation "- x" := (ropp x). +Notation "x == y" := (req x y). +Notation "x ~= y" := (~ req x y). +Notation "x <= y" := (rle x y). +Notation "x < y" := (rlt x y). + +(* Assume we have a type of coefficients C and a morphism from C to R *) + +Variable C : Type. +Variables cO cI : C. +Variables cplus ctimes cminus: C -> C -> C. +Variable copp : C -> C. +Variables ceqb cleb : C -> C -> bool. +Variable phi : C -> R. + +(* Power coefficients *) +Variable E : Set. (* the type of exponents *) +Variable pow_phi : N -> E. +Variable rpow : R -> E -> R. + +Notation "[ x ]" := (phi x). +Notation "x [=] y" := (ceqb x y). +Notation "x [<=] y" := (cleb x y). + +(* Let's collect all hypotheses in addition to the ordered ring axioms into +one structure *) + +Record SORaddon := mk_SOR_addon { + SORrm : ring_morph 0 1 rplus rtimes rminus ropp req cO cI cplus ctimes cminus copp ceqb phi; + SORpower : power_theory rI rtimes req pow_phi rpow; + SORcneqb_morph : forall x y : C, x [=] y = false -> [x] ~= [y]; + SORcleb_morph : forall x y : C, x [<=] y = true -> [x] <= [y] +}. + +Variable addon : SORaddon. + +Add Relation R req + reflexivity proved by sor.(SORsetoid).(@Equivalence_Reflexive _ _ ) + symmetry proved by sor.(SORsetoid).(@Equivalence_Symmetric _ _ ) + transitivity proved by sor.(SORsetoid).(@Equivalence_Transitive _ _ ) +as micomega_sor_setoid. + +Add Morphism rplus with signature req ==> req ==> req as rplus_morph. +Proof. +exact sor.(SORplus_wd). +Qed. +Add Morphism rtimes with signature req ==> req ==> req as rtimes_morph. +Proof. +exact sor.(SORtimes_wd). +Qed. +Add Morphism ropp with signature req ==> req as ropp_morph. +Proof. +exact sor.(SORopp_wd). +Qed. +Add Morphism rle with signature req ==> req ==> iff as rle_morph. +Proof. + exact sor.(SORle_wd). +Qed. +Add Morphism rlt with signature req ==> req ==> iff as rlt_morph. +Proof. + exact sor.(SORlt_wd). +Qed. + +Add Morphism rminus with signature req ==> req ==> req as rminus_morph. +Proof. + exact (rminus_morph sor). (* We already proved that minus is a morphism in OrderedRing.v *) +Qed. + +Definition cneqb (x y : C) := negb (ceqb x y). +Definition cltb (x y : C) := (cleb x y) && (cneqb x y). + +Notation "x [~=] y" := (cneqb x y). +Notation "x [<] y" := (cltb x y). + +Ltac le_less := rewrite (Rle_lt_eq sor); left; try assumption. +Ltac le_equal := rewrite (Rle_lt_eq sor); right; try reflexivity; try assumption. +Ltac le_elim H := rewrite (Rle_lt_eq sor) in H; destruct H as [H | H]. + +Lemma cleb_sound : forall x y : C, x [<=] y = true -> [x] <= [y]. +Proof. + exact addon.(SORcleb_morph). +Qed. + +Lemma cneqb_sound : forall x y : C, x [~=] y = true -> [x] ~= [y]. +Proof. +intros x y H1. apply addon.(SORcneqb_morph). unfold cneqb, negb in H1. +destruct (ceqb x y); now try discriminate. +Qed. + +Lemma cltb_sound : forall x y : C, x [<] y = true -> [x] < [y]. +Proof. +intros x y H. unfold cltb in H. apply andb_prop in H. destruct H as [H1 H2]. +apply cleb_sound in H1. apply cneqb_sound in H2. apply <- (Rlt_le_neq sor). now split. +Qed. + +(* Begin Micromega *) + +Definition PExprC := PExpr C. (* arbitrary expressions built from +, *, - *) +Definition PolC := Pol C. (* polynomials in generalized Horner form, defined in Ring_polynom or EnvRing *) +(*****) +(*Definition Env := Env R. (* For interpreting PExprC *)*) +Definition PolEnv := Env R. (* For interpreting PolC *) +(*****) +(*Definition Env := list R. +Definition PolEnv := list R.*) +(*****) + +(* What benefit do we get, in the case of EnvRing, from defining eval_pexpr +explicitely below and not through PEeval, as the following lemma says? The +function eval_pexpr seems to be a straightforward special case of PEeval +when the environment (i.e., the second last argument of PEeval) of type +off_map (which is (option positive * t)) is (None, env). *) + +(*****) +Fixpoint eval_pexpr (l : PolEnv) (pe : PExprC) {struct pe} : R := +match pe with +| PEc c => phi c +| PEX j => l j +| PEadd pe1 pe2 => (eval_pexpr l pe1) + (eval_pexpr l pe2) +| PEsub pe1 pe2 => (eval_pexpr l pe1) - (eval_pexpr l pe2) +| PEmul pe1 pe2 => (eval_pexpr l pe1) * (eval_pexpr l pe2) +| PEopp pe1 => - (eval_pexpr l pe1) +| PEpow pe1 n => rpow (eval_pexpr l pe1) (pow_phi n) +end. + + +Lemma eval_pexpr_simpl : forall (l : PolEnv) (pe : PExprC), + eval_pexpr l pe = + match pe with + | PEc c => phi c + | PEX j => l j + | PEadd pe1 pe2 => (eval_pexpr l pe1) + (eval_pexpr l pe2) + | PEsub pe1 pe2 => (eval_pexpr l pe1) - (eval_pexpr l pe2) + | PEmul pe1 pe2 => (eval_pexpr l pe1) * (eval_pexpr l pe2) + | PEopp pe1 => - (eval_pexpr l pe1) + | PEpow pe1 n => rpow (eval_pexpr l pe1) (pow_phi n) + end. +Proof. + intros ; destruct pe ; reflexivity. +Qed. + + + +Lemma eval_pexpr_PEeval : forall (env : PolEnv) (pe : PExprC), + eval_pexpr env pe = + PEeval rplus rtimes rminus ropp phi pow_phi rpow env pe. +Proof. +induction pe; simpl; intros. +reflexivity. +reflexivity. +rewrite <- IHpe1; rewrite <- IHpe2; reflexivity. +rewrite <- IHpe1; rewrite <- IHpe2; reflexivity. +rewrite <- IHpe1; rewrite <- IHpe2; reflexivity. +rewrite <- IHpe; reflexivity. +rewrite <- IHpe; reflexivity. +Qed. +(*****) +(*Definition eval_pexpr : Env -> PExprC -> R := + PEeval 0 rplus rtimes rminus ropp phi pow_phi rpow.*) +(*****) + +Inductive Op1 : Set := (* relations with 0 *) +| Equal (* == 0 *) +| NonEqual (* ~= 0 *) +| Strict (* > 0 *) +| NonStrict (* >= 0 *). + +Definition NFormula := (PExprC * Op1)%type. (* normalized formula *) + +Definition eval_op1 (o : Op1) : R -> Prop := +match o with +| Equal => fun x => x == 0 +| NonEqual => fun x : R => x ~= 0 +| Strict => fun x : R => 0 < x +| NonStrict => fun x : R => 0 <= x +end. + +Definition eval_nformula (env : PolEnv) (f : NFormula) : Prop := +let (p, op) := f in eval_op1 op (eval_pexpr env p). + + +Definition OpMult (o o' : Op1) : Op1 := +match o with +| Equal => Equal +| NonStrict => NonStrict (* (OpMult NonStrict Equal) could be defined as Equal *) +| Strict => o' +| NonEqual => NonEqual (* does not matter what we return here; see the following lemmas *) +end. + +Definition OpAdd (o o': Op1) : Op1 := +match o with +| Equal => o' +| NonStrict => + match o' with + | Strict => Strict + | _ => NonStrict + end +| Strict => Strict +| NonEqual => NonEqual (* does not matter what we return here *) +end. + +Lemma OpMultNonEqual : + forall o o' : Op1, o <> NonEqual -> o' <> NonEqual -> OpMult o o' <> NonEqual. +Proof. +intros o o' H1 H2; destruct o; destruct o'; simpl; try discriminate; +try (intro H; apply H1; reflexivity); +try (intro H; apply H2; reflexivity). +Qed. + +Lemma OpAdd_NonEqual : + forall o o' : Op1, o <> NonEqual -> o' <> NonEqual -> OpAdd o o' <> NonEqual. +Proof. +intros o o' H1 H2; destruct o; destruct o'; simpl; try discriminate; +try (intro H; apply H1; reflexivity); +try (intro H; apply H2; reflexivity). +Qed. + +Lemma OpMult_sound : + forall (o o' : Op1) (x y : R), o <> NonEqual -> o' <> NonEqual -> + eval_op1 o x -> eval_op1 o' y -> eval_op1 (OpMult o o') (x * y). +Proof. +unfold eval_op1; destruct o; simpl; intros o' x y H1 H2 H3 H4. +rewrite H3; now rewrite (Rtimes_0_l sor). +elimtype False; now apply H1. +destruct o'. +rewrite H4; now rewrite (Rtimes_0_r sor). +elimtype False; now apply H2. +now apply (Rtimes_pos_pos sor). +apply (Rtimes_nonneg_nonneg sor); [le_less | assumption]. +destruct o'. +rewrite H4, (Rtimes_0_r sor); le_equal. +elimtype False; now apply H2. +apply (Rtimes_nonneg_nonneg sor); [assumption | le_less]. +now apply (Rtimes_nonneg_nonneg sor). +Qed. + +Lemma OpAdd_sound : + forall (o o' : Op1) (e e' : R), o <> NonEqual -> o' <> NonEqual -> + eval_op1 o e -> eval_op1 o' e' -> eval_op1 (OpAdd o o') (e + e'). +Proof. +unfold eval_op1; destruct o; simpl; intros o' e e' H1 H2 H3 H4. +destruct o'. +now rewrite H3, H4, (Rplus_0_l sor). +elimtype False; now apply H2. +now rewrite H3, (Rplus_0_l sor). +now rewrite H3, (Rplus_0_l sor). +elimtype False; now apply H1. +destruct o'. +now rewrite H4, (Rplus_0_r sor). +elimtype False; now apply H2. +now apply (Rplus_pos_pos sor). +now apply (Rplus_pos_nonneg sor). +destruct o'. +now rewrite H4, (Rplus_0_r sor). +elimtype False; now apply H2. +now apply (Rplus_nonneg_pos sor). +now apply (Rplus_nonneg_nonneg sor). +Qed. + +(* We consider a monoid whose generators are polynomials from the +hypotheses of the form (p ~= 0). Thus it follows from the hypotheses that +every element of the monoid (i.e., arbitrary product of generators) is ~= +0. Therefore, the square of every element is > 0. *) + +Inductive Monoid (l : list NFormula) : PExprC -> Prop := +| M_One : Monoid l (PEc cI) +| M_In : forall p : PExprC, In (p, NonEqual) l -> Monoid l p +| M_Mult : forall (e1 e2 : PExprC), Monoid l e1 -> Monoid l e2 -> Monoid l (PEmul e1 e2). + +(* Do we really need to rely on the intermediate definition of monoid ? + InC why the restriction NonEqual ? + Could not we consider the IsIdeal as a IsMult ? + The same for IsSquare ? +*) + +Inductive Cone (l : list (NFormula)) : PExprC -> Op1 -> Prop := +| InC : forall p op, In (p, op) l -> op <> NonEqual -> Cone l p op +| IsIdeal : forall p, Cone l p Equal -> forall p', Cone l (PEmul p p') Equal +| IsSquare : forall p, Cone l (PEmul p p) NonStrict +| IsMonoid : forall p, Monoid l p -> Cone l (PEmul p p) Strict +| IsMult : forall p op q oq, Cone l p op -> Cone l q oq -> Cone l (PEmul p q) (OpMult op oq) +| IsAdd : forall p op q oq, Cone l p op -> Cone l q oq -> Cone l (PEadd p q) (OpAdd op oq) +| IsPos : forall c : C, cltb cO c = true -> Cone l (PEc c) Strict +| IsZ : Cone l (PEc cO) Equal. + +(* As promised, if all hypotheses are true in some environment, then every +member of the monoid is nonzero in this environment *) + +Lemma monoid_nonzero : forall (l : list NFormula) (env : PolEnv), + (forall f : NFormula, In f l -> eval_nformula env f) -> + forall p : PExprC, Monoid l p -> eval_pexpr env p ~= 0. +Proof. +intros l env H1 p H2. induction H2 as [| f H | e1 e2 H3 IH1 H4 IH2]; simpl. +rewrite addon.(SORrm).(morph1). apply (Rneq_symm sor). apply (Rneq_0_1 sor). +apply H1 in H. now simpl in H. +simpl in IH1, IH2. apply (Rtimes_neq_0 sor). now split. +Qed. + +(* If all members of a cone base are true in some environment, then every +member of the cone is true as well *) + +Lemma cone_true : + forall (l : list NFormula) (env : PolEnv), + (forall (f : NFormula), In f l -> eval_nformula env f) -> + forall (p : PExprC) (op : Op1), Cone l p op -> + op <> NonEqual /\ eval_nformula env (p, op). +Proof. +intros l env H1 p op H2. induction H2; simpl in *. +split. assumption. apply H1 in H. now unfold eval_nformula in H. +split. discriminate. destruct IHCone as [_ H3]. rewrite H3. now rewrite (Rtimes_0_l sor). +split. discriminate. apply (Rtimes_square_nonneg sor). +split. discriminate. apply <- (Rlt_le_neq sor). split. apply (Rtimes_square_nonneg sor). +apply (Rneq_symm sor). apply (Rtimes_neq_0 sor). split; now apply monoid_nonzero with l. +destruct IHCone1 as [IH1 IH2]; destruct IHCone2 as [IH3 IH4]. +split. now apply OpMultNonEqual. now apply OpMult_sound. +destruct IHCone1 as [IH1 IH2]; destruct IHCone2 as [IH3 IH4]. +split. now apply OpAdd_NonEqual. now apply OpAdd_sound. +split. discriminate. rewrite <- addon.(SORrm).(morph0). now apply cltb_sound. +split. discriminate. apply addon.(SORrm).(morph0). +Qed. + +(* Every element of a monoid is a product of some generators; therefore, +to determine an element we can give a list of generators' indices *) + +Definition MonoidMember : Set := list nat. + +Inductive ConeMember : Type := +| S_In : nat -> ConeMember +| S_Ideal : PExprC -> ConeMember -> ConeMember +| S_Square : PExprC -> ConeMember +| S_Monoid : MonoidMember -> ConeMember +| S_Mult : ConeMember -> ConeMember -> ConeMember +| S_Add : ConeMember -> ConeMember -> ConeMember +| S_Pos : C -> ConeMember +| S_Z : ConeMember. + +Definition nformula_times (f f' : NFormula) : NFormula := +let (p, op) := f in + let (p', op') := f' in + (PEmul p p', OpMult op op'). + +Definition nformula_plus (f f' : NFormula) : NFormula := +let (p, op) := f in + let (p', op') := f' in + (PEadd p p', OpAdd op op'). + +Definition nformula_times_0 (p : PExprC) (f : NFormula) : NFormula := +let (q, op) := f in + match op with + | Equal => (PEmul q p, Equal) + | _ => f + end. + +Fixpoint eval_monoid (l : list NFormula) (ns : MonoidMember) {struct ns} : PExprC := +match ns with +| nil => PEc cI +| n :: ns => + let p := match nth n l (PEc cI, NonEqual) with + | (q, NonEqual) => q + | _ => PEc cI + end in + PEmul p (eval_monoid l ns) +end. + +Theorem eval_monoid_in_monoid : + forall (l : list NFormula) (ns : MonoidMember), Monoid l (eval_monoid l ns). +Proof. +intro l; induction ns; simpl in *. +constructor. +apply M_Mult; [| assumption]. +destruct (nth_in_or_default a l (PEc cI, NonEqual)). +destruct (nth a l (PEc cI, NonEqual)). destruct o; try constructor. assumption. +rewrite e; simpl. constructor. +Qed. + +(* Provides the cone member from the witness, i.e., ConeMember *) +Fixpoint eval_cone (l : list NFormula) (cm : ConeMember) {struct cm} : NFormula := +match cm with +| S_In n => match nth n l (PEc cO, Equal) with + | (_, NonEqual) => (PEc cO, Equal) + | f => f + end +| S_Ideal p cm' => nformula_times_0 p (eval_cone l cm') +| S_Square p => (PEmul p p, NonStrict) +| S_Monoid m => let p := eval_monoid l m in (PEmul p p, Strict) +| S_Mult p q => nformula_times (eval_cone l p) (eval_cone l q) +| S_Add p q => nformula_plus (eval_cone l p) (eval_cone l q) +| S_Pos c => if cltb cO c then (PEc c, Strict) else (PEc cO, Equal) +| S_Z => (PEc cO, Equal) +end. + +Theorem eval_cone_in_cone : + forall (l : list NFormula) (cm : ConeMember), + let (p, op) := eval_cone l cm in Cone l p op. +Proof. +intros l cm; induction cm; simpl. +destruct (nth_in_or_default n l (PEc cO, Equal)). +destruct (nth n l (PEc cO, Equal)). destruct o; try (now apply InC). apply IsZ. +rewrite e. apply IsZ. +destruct (eval_cone l cm). destruct o; simpl; try assumption. now apply IsIdeal. +apply IsSquare. +apply IsMonoid. apply eval_monoid_in_monoid. +destruct (eval_cone l cm1). destruct (eval_cone l cm2). unfold nformula_times. now apply IsMult. +destruct (eval_cone l cm1). destruct (eval_cone l cm2). unfold nformula_plus. now apply IsAdd. +case_eq (cO [<] c) ; intros ; [apply IsPos ; auto| apply IsZ]. +apply IsZ. +Qed. + +(* (inconsistent_cone_member l p) means (p, op) is in the cone for some op +(> 0, >= 0, == 0, or ~= 0) and this formula is inconsistent. This fact +implies that l is inconsistent, as shown by the next lemma. Inconsistency +of a formula (p, op) can be established by normalizing p and showing that +it is a constant c for which (c, op) is false. (This is only a sufficient, +not necessary, condition, of course.) Membership in the cone can be +verified if we have a certificate. *) + +Definition inconsistent_cone_member (l : list NFormula) (p : PExprC) := + exists op : Op1, Cone l p op /\ + forall env : PolEnv, ~ eval_op1 op (eval_pexpr env p). + +(* If some element of a cone is inconsistent, then the base of the cone +is also inconsistent *) + +Lemma prove_inconsistent : + forall (l : list NFormula) (p : PExprC), + inconsistent_cone_member l p -> forall env, make_impl (eval_nformula env) l False. +Proof. +intros l p H env. +destruct H as [o [wit H]]. +apply -> make_conj_impl. +intro H1. apply H with env. +pose proof (@cone_true l env) as H2. +cut (forall f : NFormula, In f l -> eval_nformula env f). intro H3. +apply (proj2 (H2 H3 p o wit)). intro. now apply make_conj_in. +Qed. + +Definition normalise_pexpr : PExprC -> PolC := + norm_aux cO cI cplus ctimes cminus copp ceqb. + +(* The following definition we don't really need, hence it is commented *) +(*Definition eval_pol : PolEnv -> PolC -> R := Pphi 0 rplus rtimes phi.*) + +(* roughly speaking, normalise_pexpr_correct is a proof of + forall env p, eval_pexpr env p == eval_pol env (normalise_pexpr p) *) + +(*****) +Definition normalise_pexpr_correct := +let Rops_wd := mk_reqe rplus rtimes ropp req + sor.(SORplus_wd) + sor.(SORtimes_wd) + sor.(SORopp_wd) in + norm_aux_spec sor.(SORsetoid) Rops_wd (Rth_ARth (SORsetoid sor) Rops_wd sor.(SORrt)) + addon.(SORrm) addon.(SORpower). +(*****) +(*Definition normalise_pexpr_correct := +let Rops_wd := mk_reqe rplus rtimes ropp req + sor.(SORplus_wd) + sor.(SORtimes_wd) + sor.(SORopp_wd) in + norm_aux_spec sor.(SORsetoid) Rops_wd (Rth_ARth sor.(SORsetoid) Rops_wd sor.(SORrt)) + addon.(SORrm) addon.(SORpower) nil.*) +(*****) + +(* Check that a formula f is inconsistent by normalizing and comparing the +resulting constant with 0 *) + +Definition check_inconsistent (f : NFormula) : bool := +let (e, op) := f in + match normalise_pexpr e with + | Pc c => + match op with + | Equal => cneqb c cO + | NonStrict => c [<] cO + | Strict => c [<=] cO + | NonEqual => false (* eval_cone never returns (p, NonEqual) *) + end + | _ => false (* not a constant *) + end. + +Lemma check_inconsistent_sound : + forall (p : PExprC) (op : Op1), + check_inconsistent (p, op) = true -> forall env, ~ eval_op1 op (eval_pexpr env p). +Proof. +intros p op H1 env. unfold check_inconsistent, normalise_pexpr in H1. +destruct op; simpl; +(*****) +rewrite eval_pexpr_PEeval; +(*****) +(*unfold eval_pexpr;*) +(*****) +rewrite normalise_pexpr_correct; +destruct (norm_aux cO cI cplus ctimes cminus copp ceqb p); simpl; try discriminate H1; +try rewrite <- addon.(SORrm).(morph0); trivial. +now apply cneqb_sound. +apply cleb_sound in H1. now apply -> (Rle_ngt sor). +apply cltb_sound in H1. now apply -> (Rlt_nge sor). +Qed. + +Definition check_normalised_formulas : list NFormula -> ConeMember -> bool := + fun l cm => check_inconsistent (eval_cone l cm). + +Lemma checker_nf_sound : + forall (l : list NFormula) (cm : ConeMember), + check_normalised_formulas l cm = true -> + forall env : PolEnv, make_impl (eval_nformula env) l False. +Proof. +intros l cm H env. +unfold check_normalised_formulas in H. +case_eq (eval_cone l cm). intros p op H1. +apply prove_inconsistent with p. unfold inconsistent_cone_member. exists op. split. +pose proof (eval_cone_in_cone l cm) as H2. now rewrite H1 in H2. +apply check_inconsistent_sound. now rewrite <- H1. +Qed. + +(** Normalisation of formulae **) + +Inductive Op2 : Set := (* binary relations *) +| OpEq +| OpNEq +| OpLe +| OpGe +| OpLt +| OpGt. + +Definition eval_op2 (o : Op2) : R -> R -> Prop := +match o with +| OpEq => req +| OpNEq => fun x y : R => x ~= y +| OpLe => rle +| OpGe => fun x y : R => y <= x +| OpLt => fun x y : R => x < y +| OpGt => fun x y : R => y < x +end. + +Record Formula : Type := { + Flhs : PExprC; + Fop : Op2; + Frhs : PExprC +}. + +Definition eval_formula (env : PolEnv) (f : Formula) : Prop := + let (lhs, op, rhs) := f in + (eval_op2 op) (eval_pexpr env lhs) (eval_pexpr env rhs). + +(* We normalize Formulas by moving terms to one side *) + +Definition normalise (f : Formula) : NFormula := +let (lhs, op, rhs) := f in + match op with + | OpEq => (PEsub lhs rhs, Equal) + | OpNEq => (PEsub lhs rhs, NonEqual) + | OpLe => (PEsub rhs lhs, NonStrict) + | OpGe => (PEsub lhs rhs, NonStrict) + | OpGt => (PEsub lhs rhs, Strict) + | OpLt => (PEsub rhs lhs, Strict) + end. + +Definition negate (f : Formula) : NFormula := +let (lhs, op, rhs) := f in + match op with + | OpEq => (PEsub rhs lhs, NonEqual) + | OpNEq => (PEsub rhs lhs, Equal) + | OpLe => (PEsub lhs rhs, Strict) (* e <= e' == ~ e > e' *) + | OpGe => (PEsub rhs lhs, Strict) + | OpGt => (PEsub rhs lhs, NonStrict) + | OpLt => (PEsub lhs rhs, NonStrict) +end. + +Theorem normalise_sound : + forall (env : PolEnv) (f : Formula), + eval_formula env f -> eval_nformula env (normalise f). +Proof. +intros env f H; destruct f as [lhs op rhs]; simpl in *. +destruct op; simpl in *. +now apply <- (Rminus_eq_0 sor). +intros H1. apply -> (Rminus_eq_0 sor) in H1. now apply H. +now apply -> (Rle_le_minus sor). +now apply -> (Rle_le_minus sor). +now apply -> (Rlt_lt_minus sor). +now apply -> (Rlt_lt_minus sor). +Qed. + +Theorem negate_correct : + forall (env : PolEnv) (f : Formula), + eval_formula env f <-> ~ (eval_nformula env (negate f)). +Proof. +intros env f; destruct f as [lhs op rhs]; simpl. +destruct op; simpl. +symmetry. rewrite (Rminus_eq_0 sor). +split; intro H; [symmetry; now apply -> (Req_dne sor) | symmetry in H; now apply <- (Req_dne sor)]. +rewrite (Rminus_eq_0 sor). split; intro; now apply (Rneq_symm sor). +rewrite <- (Rlt_lt_minus sor). now rewrite <- (Rle_ngt sor). +rewrite <- (Rlt_lt_minus sor). now rewrite <- (Rle_ngt sor). +rewrite <- (Rle_le_minus sor). now rewrite <- (Rlt_nge sor). +rewrite <- (Rle_le_minus sor). now rewrite <- (Rlt_nge sor). +Qed. + +(** Another normalistion - this is used for cnf conversion **) + +Definition xnormalise (t:Formula) : list (NFormula) := + let (lhs,o,rhs) := t in + match o with + | OpEq => + (PEsub lhs rhs, Strict)::(PEsub rhs lhs , Strict)::nil + | OpNEq => (PEsub lhs rhs,Equal) :: nil + | OpGt => (PEsub rhs lhs,NonStrict) :: nil + | OpLt => (PEsub lhs rhs,NonStrict) :: nil + | OpGe => (PEsub rhs lhs , Strict) :: nil + | OpLe => (PEsub lhs rhs ,Strict) :: nil + end. + +Require Import Tauto. + +Definition cnf_normalise (t:Formula) : cnf (NFormula) := + List.map (fun x => x::nil) (xnormalise t). + + +Add Ring SORRing : sor.(SORrt). + +Lemma cnf_normalise_correct : forall env t, eval_cnf (eval_nformula env) (cnf_normalise t) -> eval_formula env t. +Proof. + unfold cnf_normalise, xnormalise ; simpl ; intros env t. + unfold eval_cnf. + destruct t as [lhs o rhs]; case_eq o ; simpl; + generalize (eval_pexpr env lhs); + generalize (eval_pexpr env rhs) ; intros z1 z2 ; intros. + (**) + apply sor.(SORle_antisymm). + rewrite (Rle_ngt sor). rewrite (Rlt_lt_minus sor). tauto. + rewrite (Rle_ngt sor). rewrite (Rlt_lt_minus sor). tauto. + now rewrite <- (Rminus_eq_0 sor). + rewrite (Rle_ngt sor). rewrite (Rlt_lt_minus sor). auto. + rewrite (Rle_ngt sor). rewrite (Rlt_lt_minus sor). auto. + rewrite (Rlt_nge sor). rewrite (Rle_le_minus sor). auto. + rewrite (Rlt_nge sor). rewrite (Rle_le_minus sor). auto. +Qed. + +Definition xnegate (t:Formula) : list (NFormula) := + let (lhs,o,rhs) := t in + match o with + | OpEq => (PEsub lhs rhs,Equal) :: nil + | OpNEq => (PEsub lhs rhs ,Strict)::(PEsub rhs lhs,Strict)::nil + | OpGt => (PEsub lhs rhs,Strict) :: nil + | OpLt => (PEsub rhs lhs,Strict) :: nil + | OpGe => (PEsub lhs rhs,NonStrict) :: nil + | OpLe => (PEsub rhs lhs,NonStrict) :: nil + end. + +Definition cnf_negate (t:Formula) : cnf (NFormula) := + List.map (fun x => x::nil) (xnegate t). + +Lemma cnf_negate_correct : forall env t, eval_cnf (eval_nformula env) (cnf_negate t) -> ~ eval_formula env t. +Proof. + unfold cnf_negate, xnegate ; simpl ; intros env t. + unfold eval_cnf. + destruct t as [lhs o rhs]; case_eq o ; simpl ; + generalize (eval_pexpr env lhs); + generalize (eval_pexpr env rhs) ; intros z1 z2 ; intros ; + intuition. + (**) + apply H0. + rewrite H1 ; ring. + (**) + apply H1. + apply sor.(SORle_antisymm). + rewrite (Rle_ngt sor). rewrite (Rlt_lt_minus sor). tauto. + rewrite (Rle_ngt sor). rewrite (Rlt_lt_minus sor). tauto. + (**) + apply H0. now rewrite (Rle_le_minus sor) in H1. + apply H0. now rewrite (Rle_le_minus sor) in H1. + apply H0. now rewrite (Rlt_lt_minus sor) in H1. + apply H0. now rewrite (Rlt_lt_minus sor) in H1. +Qed. + + +Lemma eval_nformula_dec : forall env d, (eval_nformula env d) \/ ~ (eval_nformula env d). +Proof. + intros. + destruct d ; simpl. + generalize (eval_pexpr env p); intros. + destruct o ; simpl. + apply (Req_em sor r 0). + destruct (Req_em sor r 0) ; tauto. + rewrite <- (Rle_ngt sor r 0). generalize (Rle_gt_cases sor r 0). tauto. + rewrite <- (Rlt_nge sor r 0). generalize (Rle_gt_cases sor 0 r). tauto. +Qed. + +(** Some syntactic simplifications of expressions and cone elements *) + + +Fixpoint simpl_expr (e:PExprC) : PExprC := + match e with + | PEmul y z => let y' := simpl_expr y in let z' := simpl_expr z in + match y' , z' with + | PEc c , z' => if ceqb c cI then z' else PEmul y' z' + | _ , _ => PEmul y' z' + end + | PEadd x y => PEadd (simpl_expr x) (simpl_expr y) + | _ => e + end. + + +Definition simpl_cone (e:ConeMember) : ConeMember := + match e with + | S_Square t => match simpl_expr t with + | PEc c => if ceqb cO c then S_Z else S_Pos (ctimes c c) + | x => S_Square x + end + | S_Mult t1 t2 => + match t1 , t2 with + | S_Z , x => S_Z + | x , S_Z => S_Z + | S_Pos c , S_Pos c' => S_Pos (ctimes c c') + | S_Pos p1 , S_Mult (S_Pos p2) x => S_Mult (S_Pos (ctimes p1 p2)) x + | S_Pos p1 , S_Mult x (S_Pos p2) => S_Mult (S_Pos (ctimes p1 p2)) x + | S_Mult (S_Pos p2) x , S_Pos p1 => S_Mult (S_Pos (ctimes p1 p2)) x + | S_Mult x (S_Pos p2) , S_Pos p1 => S_Mult (S_Pos (ctimes p1 p2)) x + | S_Pos x , S_Add y z => S_Add (S_Mult (S_Pos x) y) (S_Mult (S_Pos x) z) + | S_Pos c , _ => if ceqb cI c then t2 else S_Mult t1 t2 + | _ , S_Pos c => if ceqb cI c then t1 else S_Mult t1 t2 + | _ , _ => e + end + | S_Add t1 t2 => + match t1 , t2 with + | S_Z , x => x + | x , S_Z => x + | x , y => S_Add x y + end + | _ => e + end. + + + +End Micromega. + diff --git a/contrib/micromega/Tauto.v b/contrib/micromega/Tauto.v new file mode 100644 index 00000000..ef48efa6 --- /dev/null +++ b/contrib/micromega/Tauto.v @@ -0,0 +1,324 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* BFormula A + | A : A -> BFormula A + | Cj : BFormula A -> BFormula A -> BFormula A + | D : BFormula A-> BFormula A -> BFormula A + | N : BFormula A -> BFormula A + | I : BFormula A-> BFormula A-> BFormula A. + + Fixpoint eval_f (A:Type) (ev:A -> Prop ) (f:BFormula A) {struct f}: Prop := + match f with + | TT => True + | FF => False + | A a => ev a + | X p => p + | Cj e1 e2 => (eval_f ev e1) /\ (eval_f ev e2) + | D e1 e2 => (eval_f ev e1) \/ (eval_f ev e2) + | N e => ~ (eval_f ev e) + | I f1 f2 => (eval_f ev f1) -> (eval_f ev f2) + end. + + + Lemma map_simpl : forall A B f l, @map A B f l = match l with + | nil => nil + | a :: l=> (f a) :: (@map A B f l) + end. + Proof. + destruct l ; reflexivity. + Qed. + + + + Section S. + + Variable Env : Type. + Variable Term : Type. + Variable eval : Env -> Term -> Prop. + Variable Term' : Type. + Variable eval' : Env -> Term' -> Prop. + + + + Variable no_middle_eval' : forall env d, (eval' env d) \/ ~ (eval' env d). + + + Definition clause := list Term'. + Definition cnf := list clause. + + Variable normalise : Term -> cnf. + Variable negate : Term -> cnf. + + + Definition tt : cnf := @nil clause. + Definition ff : cnf := cons (@nil Term') nil. + + + Definition or_clause_cnf (t:clause) (f:cnf) : cnf := + List.map (fun x => (t++x)) f. + + Fixpoint or_cnf (f : cnf) (f' : cnf) {struct f}: cnf := + match f with + | nil => tt + | e :: rst => (or_cnf rst f') ++ (or_clause_cnf e f') + end. + + + Definition and_cnf (f1 : cnf) (f2 : cnf) : cnf := + f1 ++ f2. + + Fixpoint xcnf (pol : bool) (f : BFormula Term) {struct f}: cnf := + match f with + | TT => if pol then tt else ff + | FF => if pol then ff else tt + | X p => if pol then ff else ff (* This is not complete - cannot negate any proposition *) + | A x => if pol then normalise x else negate x + | N e => xcnf (negb pol) e + | Cj e1 e2 => + (if pol then and_cnf else or_cnf) (xcnf pol e1) (xcnf pol e2) + | D e1 e2 => (if pol then or_cnf else and_cnf) (xcnf pol e1) (xcnf pol e2) + | I e1 e2 => (if pol then or_cnf else and_cnf) (xcnf (negb pol) e1) (xcnf pol e2) + end. + + Definition eval_cnf (env : Term' -> Prop) (f:cnf) := make_conj (fun cl => ~ make_conj env cl) f. + + + Lemma eval_cnf_app : forall env x y, eval_cnf (eval' env) (x++y) -> eval_cnf (eval' env) x /\ eval_cnf (eval' env) y. + Proof. + unfold eval_cnf. + intros. + rewrite make_conj_app in H ; auto. + Qed. + + + Lemma or_clause_correct : forall env t f, eval_cnf (eval' env) (or_clause_cnf t f) -> (~ make_conj (eval' env) t) \/ (eval_cnf (eval' env) f). + Proof. + unfold eval_cnf. + unfold or_clause_cnf. + induction f. + simpl. + intros ; right;auto. + (**) + rewrite map_simpl. + intros. + rewrite make_conj_cons in H. + destruct H as [HH1 HH2]. + generalize (IHf HH2) ; clear IHf ; intro. + destruct H. + left ; auto. + rewrite make_conj_cons. + destruct (not_make_conj_app _ _ _ (no_middle_eval' env) HH1). + tauto. + tauto. + Qed. + + Lemma eval_cnf_cons : forall env a f, (~ make_conj (eval' env) a) -> eval_cnf (eval' env) f -> eval_cnf (eval' env) (a::f). + Proof. + intros. + unfold eval_cnf in *. + rewrite make_conj_cons ; eauto. + Qed. + + Lemma or_cnf_correct : forall env f f', eval_cnf (eval' env) (or_cnf f f') -> (eval_cnf (eval' env) f) \/ (eval_cnf (eval' env) f'). + Proof. + induction f. + unfold eval_cnf. + simpl. + tauto. + (**) + intros. + simpl in H. + destruct (eval_cnf_app _ _ _ H). + clear H. + destruct (IHf _ H0). + destruct (or_clause_correct _ _ _ H1). + left. + apply eval_cnf_cons ; auto. + right ; auto. + right ; auto. + Qed. + + Variable normalise_correct : forall env t, eval_cnf (eval' env) (normalise t) -> eval env t. + + Variable negate_correct : forall env t, eval_cnf (eval' env) (negate t) -> ~ eval env t. + + + Lemma xcnf_correct : forall f pol env, eval_cnf (eval' env) (xcnf pol f) -> eval_f (eval env) (if pol then f else N f). + Proof. + induction f. + (* TT *) + unfold eval_cnf. + simpl. + destruct pol ; simpl ; auto. + (* FF *) + unfold eval_cnf. + destruct pol; simpl ; auto. + (* P *) + simpl. + destruct pol ; intros ;simpl. + unfold eval_cnf in H. + (* Here I have to drop the proposition *) + simpl in H. + tauto. + (* Here, I could store P in the clause *) + unfold eval_cnf in H;simpl in H. + tauto. + (* A *) + simpl. + destruct pol ; simpl. + intros. + apply normalise_correct ; auto. + (* A 2 *) + intros. + apply negate_correct ; auto. + auto. + (* Cj *) + destruct pol ; simpl. + (* pol = true *) + intros. + unfold and_cnf in H. + destruct (eval_cnf_app _ _ _ H). + clear H. + split. + apply (IHf1 _ _ H0). + apply (IHf2 _ _ H1). + (* pol = false *) + intros. + destruct (or_cnf_correct _ _ _ H). + generalize (IHf1 false env H0). + simpl. + tauto. + generalize (IHf2 false env H0). + simpl. + tauto. + (* D *) + simpl. + destruct pol. + (* pol = true *) + intros. + destruct (or_cnf_correct _ _ _ H). + generalize (IHf1 _ env H0). + simpl. + tauto. + generalize (IHf2 _ env H0). + simpl. + tauto. + (* pol = true *) + unfold and_cnf. + intros. + destruct (eval_cnf_app _ _ _ H). + clear H. + simpl. + generalize (IHf1 _ _ H0). + generalize (IHf2 _ _ H1). + simpl. + tauto. + (**) + simpl. + destruct pol ; simpl. + intros. + apply (IHf false) ; auto. + intros. + generalize (IHf _ _ H). + tauto. + (* I *) + simpl; intros. + destruct pol. + simpl. + intro. + destruct (or_cnf_correct _ _ _ H). + generalize (IHf1 _ _ H1). + simpl in *. + tauto. + generalize (IHf2 _ _ H1). + auto. + (* pol = false *) + unfold and_cnf in H. + simpl in H. + destruct (eval_cnf_app _ _ _ H). + generalize (IHf1 _ _ H0). + generalize (IHf2 _ _ H1). + simpl. + tauto. + Qed. + + + Variable Witness : Type. + Variable checker : list Term' -> Witness -> bool. + + Variable checker_sound : forall t w, checker t w = true -> forall env, make_impl (eval' env) t False. + + Fixpoint cnf_checker (f : cnf) (l : list Witness) {struct f}: bool := + match f with + | nil => true + | e::f => match l with + | nil => false + | c::l => match checker e c with + | true => cnf_checker f l + | _ => false + end + end + end. + + Lemma cnf_checker_sound : forall t w, cnf_checker t w = true -> forall env, eval_cnf (eval' env) t. + Proof. + unfold eval_cnf. + induction t. + (* bc *) + simpl. + auto. + (* ic *) + simpl. + destruct w. + intros ; discriminate. + case_eq (checker a w) ; intros ; try discriminate. + generalize (@checker_sound _ _ H env). + generalize (IHt _ H0 env) ; intros. + destruct t. + red ; intro. + rewrite <- make_conj_impl in H2. + tauto. + rewrite <- make_conj_impl in H2. + tauto. + Qed. + + + Definition tauto_checker (f:BFormula Term) (w:list Witness) : bool := + cnf_checker (xcnf true f) w. + + Lemma tauto_checker_sound : forall t w, tauto_checker t w = true -> forall env, eval_f (eval env) t. + Proof. + unfold tauto_checker. + intros. + change (eval_f (eval env) t) with (eval_f (eval env) (if true then t else TT Term)). + apply (xcnf_correct t true). + eapply cnf_checker_sound ; eauto. + Qed. + + + + +End S. + diff --git a/contrib/micromega/VarMap.v b/contrib/micromega/VarMap.v new file mode 100644 index 00000000..240c0fb7 --- /dev/null +++ b/contrib/micromega/VarMap.v @@ -0,0 +1,258 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* t + | Node : t -> A -> t -> t . + + Fixpoint find (vm : t ) (p:positive) {struct vm} : A := + match vm with + | Empty => default + | Leaf i => i + | Node l e r => match p with + | xH => e + | xO p => find l p + | xI p => find r p + end + end. + + (* an off_map (a map with offset) offers the same functionalites as /contrib/setoid_ring/BinList.v - it is used in EnvRing.v *) +(* + Definition off_map := (option positive *t )%type. + + + + Definition jump (j:positive) (l:off_map ) := + let (o,m) := l in + match o with + | None => (Some j,m) + | Some j0 => (Some (j+j0)%positive,m) + end. + + Definition nth (n:positive) (l: off_map ) := + let (o,m) := l in + let idx := match o with + | None => n + | Some i => i + n + end%positive in + find idx m. + + + Definition hd (l:off_map) := nth xH l. + + + Definition tail (l:off_map ) := jump xH l. + + + Lemma psucc : forall p, (match p with + | xI y' => xO (Psucc y') + | xO y' => xI y' + | 1%positive => 2%positive + end) = (p+1)%positive. + Proof. + destruct p. + auto with zarith. + rewrite xI_succ_xO. + auto with zarith. + reflexivity. + Qed. + + Lemma jump_Pplus : forall i j l, + (jump (i + j) l) = (jump i (jump j l)). + Proof. + unfold jump. + destruct l. + destruct o. + rewrite Pplus_assoc. + reflexivity. + reflexivity. + Qed. + + Lemma jump_simpl : forall p l, + jump p l = + match p with + | xH => tail l + | xO p => jump p (jump p l) + | xI p => jump p (jump p (tail l)) + end. + Proof. + destruct p ; unfold tail ; intros ; repeat rewrite <- jump_Pplus. + (* xI p = p + p + 1 *) + rewrite xI_succ_xO. + rewrite Pplus_diag. + rewrite <- Pplus_one_succ_r. + reflexivity. + (* xO p = p + p *) + rewrite Pplus_diag. + reflexivity. + reflexivity. + Qed. + + Ltac jump_s := + repeat + match goal with + | |- context [jump xH ?e] => rewrite (jump_simpl xH) + | |- context [jump (xO ?p) ?e] => rewrite (jump_simpl (xO p)) + | |- context [jump (xI ?p) ?e] => rewrite (jump_simpl (xI p)) + end. + + Lemma jump_tl : forall j l, tail (jump j l) = jump j (tail l). + Proof. + unfold tail. + intros. + repeat rewrite <- jump_Pplus. + rewrite Pplus_comm. + reflexivity. + Qed. + + Lemma jump_Psucc : forall j l, + (jump (Psucc j) l) = (jump 1 (jump j l)). + Proof. + intros. + rewrite <- jump_Pplus. + rewrite Pplus_one_succ_r. + rewrite Pplus_comm. + reflexivity. + Qed. + + Lemma jump_Pdouble_minus_one : forall i l, + (jump (Pdouble_minus_one i) (tail l)) = (jump i (jump i l)). + Proof. + unfold tail. + intros. + repeat rewrite <- jump_Pplus. + rewrite <- Pplus_one_succ_r. + rewrite Psucc_o_double_minus_one_eq_xO. + rewrite Pplus_diag. + reflexivity. + Qed. + + Lemma jump_x0_tail : forall p l, jump (xO p) (tail l) = jump (xI p) l. + Proof. + intros. + jump_s. + repeat rewrite <- jump_Pplus. + reflexivity. + Qed. + + + Lemma nth_spec : forall p l, + nth p l = + match p with + | xH => hd l + | xO p => nth p (jump p l) + | xI p => nth p (jump p (tail l)) + end. + Proof. + unfold nth. + destruct l. + destruct o. + simpl. + rewrite psucc. + destruct p. + replace (p0 + xI p)%positive with ((p + (p0 + 1) + p))%positive. + reflexivity. + rewrite xI_succ_xO. + rewrite Pplus_one_succ_r. + rewrite <- Pplus_diag. + rewrite Pplus_comm. + symmetry. + rewrite (Pplus_comm p0). + rewrite <- Pplus_assoc. + rewrite (Pplus_comm 1)%positive. + rewrite <- Pplus_assoc. + reflexivity. + (**) + replace ((p0 + xO p))%positive with (p + p0 + p)%positive. + reflexivity. + rewrite <- Pplus_diag. + rewrite <- Pplus_assoc. + rewrite Pplus_comm. + rewrite Pplus_assoc. + reflexivity. + reflexivity. + simpl. + destruct p. + rewrite xI_succ_xO. + rewrite Pplus_one_succ_r. + rewrite <- Pplus_diag. + symmetry. + rewrite Pplus_comm. + rewrite Pplus_assoc. + reflexivity. + rewrite Pplus_diag. + reflexivity. + reflexivity. + Qed. + + + Lemma nth_jump : forall p l, nth p (tail l) = hd (jump p l). + Proof. + destruct l. + unfold tail. + unfold hd. + unfold jump. + unfold nth. + destruct o. + symmetry. + rewrite Pplus_comm. + rewrite <- Pplus_assoc. + rewrite (Pplus_comm p0). + reflexivity. + rewrite Pplus_comm. + reflexivity. + Qed. + + Lemma nth_Pdouble_minus_one : + forall p l, nth (Pdouble_minus_one p) (tail l) = nth p (jump p l). + Proof. + destruct l. + unfold tail. + unfold nth, jump. + destruct o. + rewrite ((Pplus_comm p)). + rewrite <- (Pplus_assoc p0). + rewrite Pplus_diag. + rewrite <- Psucc_o_double_minus_one_eq_xO. + rewrite Pplus_one_succ_r. + rewrite (Pplus_comm (Pdouble_minus_one p)). + rewrite Pplus_assoc. + rewrite (Pplus_comm p0). + reflexivity. + rewrite <- Pplus_one_succ_l. + rewrite Psucc_o_double_minus_one_eq_xO. + rewrite Pplus_diag. + reflexivity. + Qed. + +*) + +End MakeVarMap. + diff --git a/contrib/micromega/ZCoeff.v b/contrib/micromega/ZCoeff.v new file mode 100644 index 00000000..ced67e39 --- /dev/null +++ b/contrib/micromega/ZCoeff.v @@ -0,0 +1,173 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* R -> R. +Variable ropp : R -> R. +Variables req rle rlt : R -> R -> Prop. + +Variable sor : SOR rO rI rplus rtimes rminus ropp req rle rlt. + +Notation "0" := rO. +Notation "1" := rI. +Notation "x + y" := (rplus x y). +Notation "x * y " := (rtimes x y). +Notation "x - y " := (rminus x y). +Notation "- x" := (ropp x). +Notation "x == y" := (req x y). +Notation "x ~= y" := (~ req x y). +Notation "x <= y" := (rle x y). +Notation "x < y" := (rlt x y). + +Lemma req_refl : forall x, req x x. +Proof. + destruct sor.(SORsetoid). + apply Equivalence_Reflexive. +Qed. + +Lemma req_sym : forall x y, req x y -> req y x. +Proof. + destruct sor.(SORsetoid). + apply Equivalence_Symmetric. +Qed. + +Lemma req_trans : forall x y z, req x y -> req y z -> req x z. +Proof. + destruct sor.(SORsetoid). + apply Equivalence_Transitive. +Qed. + + +Add Relation R req + reflexivity proved by sor.(SORsetoid).(@Equivalence_Reflexive _ _) + symmetry proved by sor.(SORsetoid).(@Equivalence_Symmetric _ _) + transitivity proved by sor.(SORsetoid).(@Equivalence_Transitive _ _) +as sor_setoid. + +Add Morphism rplus with signature req ==> req ==> req as rplus_morph. +Proof. +exact sor.(SORplus_wd). +Qed. +Add Morphism rtimes with signature req ==> req ==> req as rtimes_morph. +Proof. +exact sor.(SORtimes_wd). +Qed. +Add Morphism ropp with signature req ==> req as ropp_morph. +Proof. +exact sor.(SORopp_wd). +Qed. +Add Morphism rle with signature req ==> req ==> iff as rle_morph. +Proof. +exact sor.(SORle_wd). +Qed. +Add Morphism rlt with signature req ==> req ==> iff as rlt_morph. +Proof. +exact sor.(SORlt_wd). +Qed. +Add Morphism rminus with signature req ==> req ==> req as rminus_morph. +Proof. + exact (rminus_morph sor). +Qed. + +Ltac le_less := rewrite (Rle_lt_eq sor); left; try assumption. +Ltac le_equal := rewrite (Rle_lt_eq sor); right; try reflexivity; try assumption. + +Definition gen_order_phi_Z : Z -> R := gen_phiZ 0 1 rplus rtimes ropp. + +Notation phi_pos := (gen_phiPOS 1 rplus rtimes). +Notation phi_pos1 := (gen_phiPOS1 1 rplus rtimes). + +Notation "[ x ]" := (gen_order_phi_Z x). + +Lemma ring_ops_wd : ring_eq_ext rplus rtimes ropp req. +Proof. +constructor. +exact rplus_morph. +exact rtimes_morph. +exact ropp_morph. +Qed. + +Lemma Zring_morph : + ring_morph 0 1 rplus rtimes rminus ropp req + 0%Z 1%Z Zplus Zmult Zminus Zopp + Zeq_bool gen_order_phi_Z. +Proof. +exact (gen_phiZ_morph sor.(SORsetoid) ring_ops_wd sor.(SORrt)). +Qed. + +Lemma phi_pos1_pos : forall x : positive, 0 < phi_pos1 x. +Proof. +induction x as [x IH | x IH |]; simpl; +try apply (Rplus_pos_pos sor); try apply (Rtimes_pos_pos sor); try apply (Rplus_pos_pos sor); +try apply (Rlt_0_1 sor); assumption. +Qed. + +Lemma phi_pos1_succ : forall x : positive, phi_pos1 (Psucc x) == 1 + phi_pos1 x. +Proof. +exact (ARgen_phiPOS_Psucc sor.(SORsetoid) ring_ops_wd + (Rth_ARth sor.(SORsetoid) ring_ops_wd sor.(SORrt))). +Qed. + +Lemma clt_pos_morph : forall x y : positive, (x < y)%positive -> phi_pos1 x < phi_pos1 y. +Proof. +intros x y H. pattern y; apply Plt_ind with x. +rewrite phi_pos1_succ; apply (Rlt_succ_r sor). +clear y H; intros y _ H. rewrite phi_pos1_succ. now apply (Rlt_lt_succ sor). +assumption. +Qed. + +Lemma clt_morph : forall x y : Z, (x < y)%Z -> [x] < [y]. +Proof. +unfold Zlt; intros x y H; +do 2 rewrite (same_genZ sor.(SORsetoid) ring_ops_wd sor.(SORrt)); +destruct x; destruct y; simpl in *; try discriminate. +apply phi_pos1_pos. +now apply clt_pos_morph. +apply <- (Ropp_neg_pos sor); apply phi_pos1_pos. +apply (Rlt_trans sor) with 0. apply <- (Ropp_neg_pos sor); apply phi_pos1_pos. +apply phi_pos1_pos. +rewrite Pcompare_antisym in H; simpl in H. apply -> (Ropp_lt_mono sor). +now apply clt_pos_morph. +Qed. + +Lemma Zcleb_morph : forall x y : Z, Zle_bool x y = true -> [x] <= [y]. +Proof. +unfold Zle_bool; intros x y H. +case_eq (x ?= y)%Z; intro H1; rewrite H1 in H. +le_equal. apply Zring_morph.(morph_eq). unfold Zeq_bool; now rewrite H1. +le_less. now apply clt_morph. +discriminate. +Qed. + +Lemma Zcneqb_morph : forall x y : Z, Zeq_bool x y = false -> [x] ~= [y]. +Proof. +intros x y H. unfold Zeq_bool in H. +case_eq (Zcompare x y); intro H1; rewrite H1 in *; (discriminate || clear H). +apply (Rlt_neq sor). now apply clt_morph. +fold (x > y)%Z in H1. rewrite Zgt_iff_lt in H1. +apply (Rneq_symm sor). apply (Rlt_neq sor). now apply clt_morph. +Qed. + +End InitialMorphism. + + diff --git a/contrib/micromega/ZMicromega.v b/contrib/micromega/ZMicromega.v new file mode 100644 index 00000000..94c83f73 --- /dev/null +++ b/contrib/micromega/ZMicromega.v @@ -0,0 +1,714 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* destruct (andb_prop _ _ id); clear id + | [ id : (_ || _)%bool = true |- _ ] => destruct (orb_prop _ _ id); clear id + end. + +Require Import EnvRing. + +Open Scope Z_scope. + +Lemma Zsor : SOR 0 1 Zplus Zmult Zminus Zopp (@eq Z) Zle Zlt. +Proof. + constructor ; intros ; subst ; try (intuition (auto with zarith)). + apply Zsth. + apply Zth. + destruct (Ztrichotomy n m) ; intuition (auto with zarith). + apply Zmult_lt_0_compat ; auto. +Qed. + +Lemma Zeq_bool_neq : forall x y, Zeq_bool x y = false -> x <> y. +Proof. + red ; intros. + subst. + unfold Zeq_bool in H. + rewrite Zcompare_refl in H. + discriminate. +Qed. + +Lemma ZSORaddon : + SORaddon 0 1 Zplus Zmult Zminus Zopp (@eq Z) Zle (* ring elements *) + 0%Z 1%Z Zplus Zmult Zminus Zopp (* coefficients *) + Zeq_bool Zle_bool + (fun x => x) (fun x => x) (pow_N 1 Zmult). +Proof. + constructor. + constructor ; intros ; try reflexivity. + apply Zeqb_ok ; auto. + constructor. + reflexivity. + intros x y. + apply Zeq_bool_neq ; auto. + apply Zle_bool_imp_le. +Qed. + + +(*Definition Zeval_expr := eval_pexpr 0 Zplus Zmult Zminus Zopp (fun x => x) (fun x => Z_of_N x) (Zpower).*) + +Fixpoint Zeval_expr (env: PolEnv Z) (e: PExpr Z) : Z := + match e with + | PEc c => c + | PEX j => env j + | PEadd pe1 pe2 => (Zeval_expr env pe1) + (Zeval_expr env pe2) + | PEsub pe1 pe2 => (Zeval_expr env pe1) - (Zeval_expr env pe2) + | PEmul pe1 pe2 => (Zeval_expr env pe1) * (Zeval_expr env pe2) + | PEopp pe1 => - (Zeval_expr env pe1) + | PEpow pe1 n => Zpower (Zeval_expr env pe1) (Z_of_N n) + end. + +Lemma Zeval_expr_simpl : forall env e, + Zeval_expr env e = + match e with + | PEc c => c + | PEX j => env j + | PEadd pe1 pe2 => (Zeval_expr env pe1) + (Zeval_expr env pe2) + | PEsub pe1 pe2 => (Zeval_expr env pe1) - (Zeval_expr env pe2) + | PEmul pe1 pe2 => (Zeval_expr env pe1) * (Zeval_expr env pe2) + | PEopp pe1 => - (Zeval_expr env pe1) + | PEpow pe1 n => Zpower (Zeval_expr env pe1) (Z_of_N n) + end. +Proof. + destruct e ; reflexivity. +Qed. + + +Definition Zeval_expr' := eval_pexpr Zplus Zmult Zminus Zopp (fun x => x) (fun x => x) (pow_N 1 Zmult). + +Lemma ZNpower : forall r n, r ^ Z_of_N n = pow_N 1 Zmult r n. +Proof. + destruct n. + reflexivity. + simpl. + unfold Zpower_pos. + replace (pow_pos Zmult r p) with (1 * (pow_pos Zmult r p)) by ring. + generalize 1. + induction p; simpl ; intros ; repeat rewrite IHp ; ring. +Qed. + + + +Lemma Zeval_expr_compat : forall env e, Zeval_expr env e = Zeval_expr' env e. +Proof. + induction e ; simpl ; subst ; try congruence. + rewrite IHe. + apply ZNpower. +Qed. + +Definition Zeval_op2 (o : Op2) : Z -> Z -> Prop := +match o with +| OpEq => @eq Z +| OpNEq => fun x y => ~ x = y +| OpLe => Zle +| OpGe => Zge +| OpLt => Zlt +| OpGt => Zgt +end. + +Definition Zeval_formula (e: PolEnv Z) (ff : Formula Z) := + let (lhs,o,rhs) := ff in Zeval_op2 o (Zeval_expr e lhs) (Zeval_expr e rhs). + +Definition Zeval_formula' := + eval_formula Zplus Zmult Zminus Zopp (@eq Z) Zle Zlt (fun x => x) (fun x => x) (pow_N 1 Zmult). + +Lemma Zeval_formula_compat : forall env f, Zeval_formula env f <-> Zeval_formula' env f. +Proof. + intros. + unfold Zeval_formula. + destruct f. + repeat rewrite Zeval_expr_compat. + unfold Zeval_formula'. + unfold Zeval_expr'. + split ; destruct Fop ; simpl; auto with zarith. +Qed. + + + +Definition Zeval_nformula := + eval_nformula 0 Zplus Zmult Zminus Zopp (@eq Z) Zle Zlt (fun x => x) (fun x => x) (pow_N 1 Zmult). + +Definition Zeval_op1 (o : Op1) : Z -> Prop := +match o with +| Equal => fun x : Z => x = 0 +| NonEqual => fun x : Z => x <> 0 +| Strict => fun x : Z => 0 < x +| NonStrict => fun x : Z => 0 <= x +end. + +Lemma Zeval_nformula_simpl : forall env f, Zeval_nformula env f = (let (p, op) := f in Zeval_op1 op (Zeval_expr env p)). +Proof. + intros. + destruct f. + rewrite Zeval_expr_compat. + reflexivity. +Qed. + +Lemma Zeval_nformula_dec : forall env d, (Zeval_nformula env d) \/ ~ (Zeval_nformula env d). +Proof. + exact (fun env d =>eval_nformula_dec Zsor (fun x => x) (fun x => x) (pow_N 1%Z Zmult) env d). +Qed. + +Definition ZWitness := ConeMember Z. + +Definition ZWeakChecker := check_normalised_formulas 0 1 Zplus Zmult Zminus Zopp Zeq_bool Zle_bool. + +Lemma ZWeakChecker_sound : forall (l : list (NFormula Z)) (cm : ZWitness), + ZWeakChecker l cm = true -> + forall env, make_impl (Zeval_nformula env) l False. +Proof. + intros l cm H. + intro. + unfold Zeval_nformula. + apply (checker_nf_sound Zsor ZSORaddon l cm). + unfold ZWeakChecker in H. + exact H. +Qed. + +Definition xnormalise (t:Formula Z) : list (NFormula Z) := + let (lhs,o,rhs) := t in + match o with + | OpEq => + ((PEsub lhs (PEadd rhs (PEc 1))),NonStrict)::((PEsub rhs (PEadd lhs (PEc 1))),NonStrict)::nil + | OpNEq => (PEsub lhs rhs,Equal) :: nil + | OpGt => (PEsub rhs lhs,NonStrict) :: nil + | OpLt => (PEsub lhs rhs,NonStrict) :: nil + | OpGe => (PEsub rhs (PEadd lhs (PEc 1)),NonStrict) :: nil + | OpLe => (PEsub lhs (PEadd rhs (PEc 1)),NonStrict) :: nil + end. + +Require Import Tauto. + +Definition normalise (t:Formula Z) : cnf (NFormula Z) := + List.map (fun x => x::nil) (xnormalise t). + + +Lemma normalise_correct : forall env t, eval_cnf (Zeval_nformula env) (normalise t) <-> Zeval_formula env t. +Proof. + unfold normalise, xnormalise ; simpl ; intros env t. + rewrite Zeval_formula_compat. + unfold eval_cnf. + destruct t as [lhs o rhs]; case_eq o ; simpl; + generalize ( eval_pexpr Zplus Zmult Zminus Zopp (fun x : Z => x) + (fun x : BinNat.N => x) (pow_N 1 Zmult) env lhs); + generalize (eval_pexpr Zplus Zmult Zminus Zopp (fun x : Z => x) + (fun x : BinNat.N => x) (pow_N 1 Zmult) env rhs) ; intros z1 z2 ; intros ; subst; + intuition (auto with zarith). +Qed. + +Definition xnegate (t:RingMicromega.Formula Z) : list (NFormula Z) := + let (lhs,o,rhs) := t in + match o with + | OpEq => (PEsub lhs rhs,Equal) :: nil + | OpNEq => ((PEsub lhs (PEadd rhs (PEc 1))),NonStrict)::((PEsub rhs (PEadd lhs (PEc 1))),NonStrict)::nil + | OpGt => (PEsub lhs (PEadd rhs (PEc 1)),NonStrict) :: nil + | OpLt => (PEsub rhs (PEadd lhs (PEc 1)),NonStrict) :: nil + | OpGe => (PEsub lhs rhs,NonStrict) :: nil + | OpLe => (PEsub rhs lhs,NonStrict) :: nil + end. + +Definition negate (t:RingMicromega.Formula Z) : cnf (NFormula Z) := + List.map (fun x => x::nil) (xnegate t). + +Lemma negate_correct : forall env t, eval_cnf (Zeval_nformula env) (negate t) <-> ~ Zeval_formula env t. +Proof. + unfold negate, xnegate ; simpl ; intros env t. + rewrite Zeval_formula_compat. + unfold eval_cnf. + destruct t as [lhs o rhs]; case_eq o ; simpl ; + generalize ( eval_pexpr Zplus Zmult Zminus Zopp (fun x : Z => x) + (fun x : BinNat.N => x) (pow_N 1 Zmult) env lhs); + generalize (eval_pexpr Zplus Zmult Zminus Zopp (fun x : Z => x) + (fun x : BinNat.N => x) (pow_N 1 Zmult) env rhs) ; intros z1 z2 ; intros ; + intuition (auto with zarith). +Qed. + + +Definition ZweakTautoChecker (w: list ZWitness) (f : BFormula (Formula Z)) : bool := + @tauto_checker (Formula Z) (NFormula Z) normalise negate ZWitness ZWeakChecker f w. + +(* To get a complete checker, the proof format has to be enriched *) + +Require Import Zdiv. +Open Scope Z_scope. + +Definition ceiling (a b:Z) : Z := + let (q,r) := Zdiv_eucl a b in + match r with + | Z0 => q + | _ => q + 1 + end. + +Lemma narrow_interval_lower_bound : forall a b x, a > 0 -> a * x >= b -> x >= ceiling b a. +Proof. + unfold ceiling. + intros. + generalize (Z_div_mod b a H). + destruct (Zdiv_eucl b a). + intros. + destruct H1. + destruct H2. + subst. + destruct (Ztrichotomy z0 0) as [ HH1 | [HH2 | HH3]]; destruct z0 ; try auto with zarith ; try discriminate. + assert (HH :x >= z \/ x < z) by (destruct (Ztrichotomy x z) ; auto with zarith). + destruct HH ;auto. + generalize (Zmult_lt_compat_l _ _ _ H3 H1). + auto with zarith. + clear H2. + assert (HH :x >= z +1 \/ x <= z) by (destruct (Ztrichotomy x z) ; intuition (auto with zarith)). + destruct HH ;auto. + assert (0 < a) by auto with zarith. + generalize (Zmult_lt_0_le_compat_r _ _ _ H2 H1). + intros. + rewrite Zmult_comm in H4. + rewrite (Zmult_comm z) in H4. + auto with zarith. +Qed. + +Lemma narrow_interval_upper_bound : forall a b x, a > 0 -> a * x <= b -> x <= Zdiv b a. +Proof. + unfold Zdiv. + intros. + generalize (Z_div_mod b a H). + destruct (Zdiv_eucl b a). + intros. + destruct H1. + destruct H2. + subst. + assert (HH :x <= z \/ z <= x -1) by (destruct (Ztrichotomy x z) ; intuition (auto with zarith)). + destruct HH ;auto. + assert (0 < a) by auto with zarith. + generalize (Zmult_lt_0_le_compat_r _ _ _ H4 H1). + intros. + ring_simplify in H5. + rewrite Zmult_comm in H5. + auto with zarith. +Qed. + + +(* In this case, a certificate is made of a pair of inequations, in 1 variable, + that do not have an integer solution. + => modify the fourier elimination + *) +Require Import QArith. + + +Inductive ProofTerm : Type := +| RatProof : ZWitness -> ProofTerm +| CutProof : PExprC Z -> Q -> ZWitness -> ProofTerm -> ProofTerm +| EnumProof : Q -> PExprC Z -> Q -> ZWitness -> ZWitness -> list ProofTerm -> ProofTerm. + +(* n/d <= x -> d*x - n >= 0 *) + +Definition makeLb (v:PExpr Z) (q:Q) : NFormula Z := + let (n,d) := q in (PEsub (PEmul (PEc (Zpos d)) v) (PEc n),NonStrict). + +(* x <= n/d -> d * x <= d *) +Definition makeUb (v:PExpr Z) (q:Q) : NFormula Z := + let (n,d) := q in + (PEsub (PEc n) (PEmul (PEc (Zpos d)) v), NonStrict). + +Definition qceiling (q:Q) : Z := + let (n,d) := q in ceiling n (Zpos d). + +Definition qfloor (q:Q) : Z := + let (n,d) := q in Zdiv n (Zpos d). + +Definition makeLbCut (v:PExprC Z) (q:Q) : NFormula Z := + (PEsub v (PEc (qceiling q)), NonStrict). + +Definition neg_nformula (f : NFormula Z) := + let (e,o) := f in + (PEopp (PEadd e (PEc 1%Z)), o). + +Lemma neg_nformula_sound : forall env f, snd f = NonStrict ->( ~ (Zeval_nformula env (neg_nformula f)) <-> Zeval_nformula env f). +Proof. + unfold neg_nformula. + destruct f. + simpl. + intros ; subst ; simpl in *. + split; auto with zarith. +Qed. + + +Definition cutChecker (l:list (NFormula Z)) (e: PExpr Z) (lb:Q) (pf : ZWitness) : option (NFormula Z) := + let (lb,lc) := (makeLb e lb,makeLbCut e lb) in + if ZWeakChecker (neg_nformula lb::l) pf then Some lc else None. + + +Fixpoint ZChecker (l:list (NFormula Z)) (pf : ProofTerm) {struct pf} : bool := + match pf with + | RatProof pf => ZWeakChecker l pf + | CutProof e q pf rst => + match cutChecker l e q pf with + | None => false + | Some c => ZChecker (c::l) rst + end + | EnumProof lb e ub pf1 pf2 rst => + match cutChecker l e lb pf1 , cutChecker l (PEopp e) (Qopp ub) pf2 with + | None , _ | _ , None => false + | Some _ , Some _ => let (lb',ub') := (qceiling lb, Zopp (qceiling (- ub))) in + (fix label (pfs:list ProofTerm) := + fun lb ub => + match pfs with + | nil => if Z_gt_dec lb ub then true else false + | pf::rsr => andb (ZChecker ((PEsub e (PEc lb), Equal) :: l) pf) (label rsr (Zplus lb 1%Z) ub) + end) + rst lb' ub' + end + end. + + +Lemma ZChecker_simpl : forall (pf : ProofTerm) (l:list (NFormula Z)), + ZChecker l pf = + match pf with + | RatProof pf => ZWeakChecker l pf + | CutProof e q pf rst => + match cutChecker l e q pf with + | None => false + | Some c => ZChecker (c::l) rst + end + | EnumProof lb e ub pf1 pf2 rst => + match cutChecker l e lb pf1 , cutChecker l (PEopp e) (Qopp ub) pf2 with + | None , _ | _ , None => false + | Some _ , Some _ => let (lb',ub') := (qceiling lb, Zopp (qceiling (- ub))) in + (fix label (pfs:list ProofTerm) := + fun lb ub => + match pfs with + | nil => if Z_gt_dec lb ub then true else false + | pf::rsr => andb (ZChecker ((PEsub e (PEc lb), Equal) :: l) pf) (label rsr (Zplus lb 1%Z) ub) + end) + rst lb' ub' + end + end. +Proof. + destruct pf ; reflexivity. +Qed. + +(* +Fixpoint depth (n:nat) : ProofTerm -> option nat := + match n with + | O => fun pf => None + | S n => + fun pf => + match pf with + | RatProof _ => Some O + | CutProof _ _ _ p => option_map S (depth n p) + | EnumProof _ _ _ _ _ l => + let f := fun pf x => + match x , depth n pf with + | None , _ | _ , None => None + | Some n1 , Some n2 => Some (Max.max n1 n2) + end in + List.fold_right f (Some O) l + end + end. +*) +Fixpoint bdepth (pf : ProofTerm) : nat := + match pf with + | RatProof _ => O + | CutProof _ _ _ p => S (bdepth p) + | EnumProof _ _ _ _ _ l => S (List.fold_right (fun pf x => Max.max (bdepth pf) x) O l) + end. + +Require Import Wf_nat. + +Lemma in_bdepth : forall l a b p c c0 y, In y l -> ltof ProofTerm bdepth y (EnumProof a b p c c0 l). +Proof. + induction l. + simpl. + tauto. + simpl. + intros. + destruct H. + subst. + unfold ltof. + simpl. + generalize ( (fold_right + (fun (pf : ProofTerm) (x : nat) => Max.max (bdepth pf) x) 0%nat l)). + intros. + generalize (bdepth y) ; intros. + generalize (Max.max_l n0 n) (Max.max_r n0 n). + omega. + generalize (IHl a0 b p c c0 y H). + unfold ltof. + simpl. + generalize ( (fold_right (fun (pf : ProofTerm) (x : nat) => Max.max (bdepth pf) x) 0%nat + l)). + intros. + generalize (Max.max_l (bdepth a) n) (Max.max_r (bdepth a) n). + omega. +Qed. + +Lemma lb_lbcut : forall env e q, Zeval_nformula env (makeLb e q) -> Zeval_nformula env (makeLbCut e q). +Proof. + unfold makeLb, makeLbCut. + destruct q. + rewrite Zeval_nformula_simpl. + rewrite Zeval_nformula_simpl. + unfold Zeval_op1. + rewrite Zeval_expr_simpl. + rewrite Zeval_expr_simpl. + rewrite Zeval_expr_simpl. + intro. + rewrite Zeval_expr_simpl. + revert H. + generalize (Zeval_expr env e). + rewrite Zeval_expr_simpl. + rewrite Zeval_expr_simpl. + unfold qceiling. + intros. + assert ( z >= ceiling Qnum (' Qden))%Z. + apply narrow_interval_lower_bound. + compute. + reflexivity. + destruct z ; auto with zarith. + auto with zarith. +Qed. + +Lemma cutChecker_sound : forall e lb pf l res, cutChecker l e lb pf = Some res -> + forall env, make_impl (Zeval_nformula env) l (Zeval_nformula env res). +Proof. + unfold cutChecker. + intros. + revert H. + case_eq (ZWeakChecker (neg_nformula (makeLb e lb) :: l) pf); intros ; [idtac | discriminate]. + generalize (ZWeakChecker_sound _ _ H env). + intros. + inversion H0 ; subst ; clear H0. + apply -> make_conj_impl. + simpl in H1. + rewrite <- make_conj_impl in H1. + intros. + apply -> neg_nformula_sound ; auto. + red ; intros. + apply H1 ; auto. + clear H H1 H0. + generalize (lb_lbcut env e lb). + intros. + destruct (Zeval_nformula_dec env ((neg_nformula (makeLb e lb)))). + auto. + rewrite -> neg_nformula_sound in H0. + assert (HH := H H0). + rewrite <- neg_nformula_sound in HH. + tauto. + reflexivity. + unfold makeLb. + destruct lb. + reflexivity. +Qed. + + +Lemma cutChecker_sound_bound : forall e lb pf l res, cutChecker l e lb pf = Some res -> + forall env, make_conj (Zeval_nformula env) l -> (Zeval_expr env e >= qceiling lb)%Z. +Proof. + intros. + generalize (cutChecker_sound _ _ _ _ _ H env). + intros. + rewrite <- (make_conj_impl) in H1. + generalize (H1 H0). + unfold cutChecker in H. + destruct (ZWeakChecker (neg_nformula (makeLb e lb) :: l) pf). + unfold makeLbCut in H. + inversion H ; subst. + clear H. + simpl. + rewrite Zeval_expr_compat. + unfold Zeval_expr'. + auto with zarith. + discriminate. +Qed. + + +Lemma ZChecker_sound : forall w l, ZChecker l w = true -> forall env, make_impl (Zeval_nformula env) l False. +Proof. + induction w using (well_founded_ind (well_founded_ltof _ bdepth)). + destruct w. + (* RatProof *) + simpl. + intros. + eapply ZWeakChecker_sound. + apply H0. + (* CutProof *) + simpl. + intro. + case_eq (cutChecker l p q z) ; intros. + generalize (cutChecker_sound _ _ _ _ _ H0 env). + intro. + assert (make_impl (Zeval_nformula env) (n::l) False). + eapply (H w) ; auto. + unfold ltof. + simpl. + auto with arith. + simpl in H3. + rewrite <- make_conj_impl in H2. + rewrite <- make_conj_impl in H3. + rewrite <- make_conj_impl. + tauto. + discriminate. + (* EnumProof *) + intro. + rewrite ZChecker_simpl. + case_eq (cutChecker l0 p q z). + rename q into llb. + case_eq (cutChecker l0 (PEopp p) (- q0) z0). + intros. + rename q0 into uub. + (* get the bounds of the enum *) + rewrite <- make_conj_impl. + intro. + assert (qceiling llb <= Zeval_expr env p <= - qceiling ( - uub))%Z. + generalize (cutChecker_sound_bound _ _ _ _ _ H0 env H3). + generalize (cutChecker_sound_bound _ _ _ _ _ H1 env H3). + intros. + rewrite Zeval_expr_simpl in H5. + auto with zarith. + clear H0 H1. + revert H2 H3 H4. + generalize (qceiling llb) (- qceiling (- uub))%Z. + set (FF := (fix label (pfs : list ProofTerm) (lb ub : Z) {struct pfs} : bool := + match pfs with + | nil => if Z_gt_dec lb ub then true else false + | pf :: rsr => + (ZChecker ((PEsub p (PEc lb), Equal) :: l0) pf && + label rsr (lb + 1)%Z ub)%bool + end)). + intros z1 z2. + intros. + assert (forall x, z1 <= x <= z2 -> exists pr, + (In pr l /\ + ZChecker ((PEsub p (PEc x),Equal) :: l0) pr = true))%Z. + clear H. + revert H2. + clear H4. + revert z1 z2. + induction l;simpl ;intros. + destruct (Z_gt_dec z1 z2). + intros. + apply False_ind ; omega. + discriminate. + intros. + simpl in H2. + flatten_bool. + assert (HH:(x = z1 \/ z1 +1 <=x)%Z) by omega. + destruct HH. + subst. + exists a ; auto. + assert (z1 + 1 <= x <= z2)%Z by omega. + destruct (IHl _ _ H1 _ H4). + destruct H5. + exists x0 ; split;auto. + (*/asser *) + destruct (H0 _ H4) as [pr [Hin Hcheker]]. + assert (make_impl (Zeval_nformula env) ((PEsub p (PEc (Zeval_expr env p)),Equal) :: l0) False). + apply (H pr);auto. + apply in_bdepth ; auto. + rewrite <- make_conj_impl in H1. + apply H1. + rewrite make_conj_cons. + split ;auto. + rewrite Zeval_nformula_simpl; + unfold Zeval_op1; + rewrite Zeval_expr_simpl. + generalize (Zeval_expr env p). + intros. + rewrite Zeval_expr_simpl. + auto with zarith. + intros ; discriminate. + intros ; discriminate. +Qed. + +Definition ZTautoChecker (f : BFormula (Formula Z)) (w: list ProofTerm): bool := + @tauto_checker (Formula Z) (NFormula Z) normalise negate ProofTerm ZChecker f w. + +Lemma ZTautoChecker_sound : forall f w, ZTautoChecker f w = true -> forall env, eval_f (Zeval_formula env) f. +Proof. + intros f w. + unfold ZTautoChecker. + apply (tauto_checker_sound Zeval_formula Zeval_nformula). + apply Zeval_nformula_dec. + intros env t. + rewrite normalise_correct ; auto. + intros env t. + rewrite negate_correct ; auto. + intros t w0. + apply ZChecker_sound. +Qed. + + +Open Scope Z_scope. + + +Fixpoint map_cone (f: nat -> nat) (e:ZWitness) : ZWitness := + match e with + | S_In n => S_In _ (f n) + | S_Ideal e cm => S_Ideal e (map_cone f cm) + | S_Square _ => e + | S_Monoid l => S_Monoid _ (List.map f l) + | S_Mult cm1 cm2 => S_Mult (map_cone f cm1) (map_cone f cm2) + | S_Add cm1 cm2 => S_Add (map_cone f cm1) (map_cone f cm2) + | _ => e + end. + +Fixpoint indexes (e:ZWitness) : list nat := + match e with + | S_In n => n::nil + | S_Ideal e cm => indexes cm + | S_Square e => nil + | S_Monoid l => l + | S_Mult cm1 cm2 => (indexes cm1)++ (indexes cm2) + | S_Add cm1 cm2 => (indexes cm1)++ (indexes cm2) + | _ => nil + end. + +(** To ease bindings from ml code **) +(*Definition varmap := Quote.varmap.*) +Definition make_impl := Refl.make_impl. +Definition make_conj := Refl.make_conj. + +Require VarMap. + +(*Definition varmap_type := VarMap.t Z. *) +Definition env := PolEnv Z. +Definition node := @VarMap.Node Z. +Definition empty := @VarMap.Empty Z. +Definition leaf := @VarMap.Leaf Z. + +Definition coneMember := ZWitness. + +Definition eval := Zeval_formula. + +Definition prod_pos_nat := prod positive nat. + +Require Import Int. + + +Definition n_of_Z (z:Z) : BinNat.N := + match z with + | Z0 => N0 + | Zpos p => Npos p + | Zneg p => N0 + end. + + + diff --git a/contrib/micromega/certificate.ml b/contrib/micromega/certificate.ml new file mode 100644 index 00000000..88e882e6 --- /dev/null +++ b/contrib/micromega/certificate.ml @@ -0,0 +1,618 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* ) = add_num +let (<->) = minus_num +let (<*>) = mult_num + +type var = Mc.positive + +module Monomial : +sig + type t + val const : t + val var : var -> t + val find : var -> t -> int + val mult : var -> t -> t + val prod : t -> t -> t + val compare : t -> t -> int + val pp : out_channel -> t -> unit + val fold : (var -> int -> 'a -> 'a) -> t -> 'a -> 'a +end + = +struct + (* A monomial is represented by a multiset of variables *) + module Map = Map.Make(struct type t = var let compare = Pervasives.compare end) + open Map + + type t = int Map.t + + (* The monomial that corresponds to a constant *) + let const = Map.empty + + (* The monomial 'x' *) + let var x = Map.add x 1 Map.empty + + (* Get the degre of a variable in a monomial *) + let find x m = try find x m with Not_found -> 0 + + (* Multiply a monomial by a variable *) + let mult x m = add x ( (find x m) + 1) m + + (* Product of monomials *) + let prod m1 m2 = Map.fold (fun k d m -> add k ((find k m) + d) m) m1 m2 + + (* Total ordering of monomials *) + let compare m1 m2 = Map.compare Pervasives.compare m1 m2 + + let pp o m = Map.iter (fun k v -> + if v = 1 then Printf.fprintf o "x%i." (C2Ml.index k) + else Printf.fprintf o "x%i^%i." (C2Ml.index k) v) m + + let fold = fold + +end + + +module Poly : + (* A polynomial is a map of monomials *) + (* + This is probably a naive implementation + (expected to be fast enough - Coq is probably the bottleneck) + *The new ring contribution is using a sparse Horner representation. + *) +sig + type t + val get : Monomial.t -> t -> num + val variable : var -> t + val add : Monomial.t -> num -> t -> t + val constant : num -> t + val mult : Monomial.t -> num -> t -> t + val product : t -> t -> t + val addition : t -> t -> t + val uminus : t -> t + val fold : (Monomial.t -> num -> 'a -> 'a) -> t -> 'a -> 'a + val pp : out_channel -> t -> unit + val compare : t -> t -> int +end = +struct + (*normalisation bug : 0*x ... *) + module P = Map.Make(Monomial) + open P + + type t = num P.t + + let pp o p = P.iter (fun k v -> + if compare_num v (Int 0) <> 0 + then + if Monomial.compare Monomial.const k = 0 + then Printf.fprintf o "%s " (string_of_num v) + else Printf.fprintf o "%s*%a " (string_of_num v) Monomial.pp k) p + + (* Get the coefficient of monomial mn *) + let get : Monomial.t -> t -> num = + fun mn p -> try find mn p with Not_found -> (Int 0) + + + (* The polynomial 1.x *) + let variable : var -> t = + fun x -> add (Monomial.var x) (Int 1) empty + + (*The constant polynomial *) + let constant : num -> t = + fun c -> add (Monomial.const) c empty + + (* The addition of a monomial *) + + let add : Monomial.t -> num -> t -> t = + fun mn v p -> + let vl = (get mn p) <+> v in + add mn vl p + + + (** Design choice: empty is not a polynomial + I do not remember why .... + **) + + (* The product by a monomial *) + let mult : Monomial.t -> num -> t -> t = + fun mn v p -> + fold (fun mn' v' res -> P.add (Monomial.prod mn mn') (v<*>v') res) p empty + + + let addition : t -> t -> t = + fun p1 p2 -> fold (fun mn v p -> add mn v p) p1 p2 + + + let product : t -> t -> t = + fun p1 p2 -> + fold (fun mn v res -> addition (mult mn v p2) res ) p1 empty + + + let uminus : t -> t = + fun p -> map (fun v -> minus_num v) p + + let fold = P.fold + + let compare = compare compare_num +end + +open Mutils +type 'a number_spec = { + bigint_to_number : big_int -> 'a; + number_to_num : 'a -> num; + zero : 'a; + unit : 'a; + mult : 'a -> 'a -> 'a; + eqb : 'a -> 'a -> Mc.bool +} + +let z_spec = { + bigint_to_number = Ml2C.bigint ; + number_to_num = (fun x -> Big_int (C2Ml.z_big_int x)); + zero = Mc.Z0; + unit = Mc.Zpos Mc.XH; + mult = Mc.zmult; + eqb = Mc.zeq_bool +} + + +let q_spec = { + bigint_to_number = (fun x -> {Mc.qnum = Ml2C.bigint x; Mc.qden = Mc.XH}); + number_to_num = C2Ml.q_to_num; + zero = {Mc.qnum = Mc.Z0;Mc.qden = Mc.XH}; + unit = {Mc.qnum = (Mc.Zpos Mc.XH) ; Mc.qden = Mc.XH}; + mult = Mc.qmult; + eqb = Mc.qeq_bool +} + +let r_spec = z_spec + + + + +let dev_form n_spec p = + let rec dev_form p = + match p with + | Mc.PEc z -> Poly.constant (n_spec.number_to_num z) + | Mc.PEX v -> Poly.variable v + | Mc.PEmul(p1,p2) -> + let p1 = dev_form p1 in + let p2 = dev_form p2 in + Poly.product p1 p2 + | Mc.PEadd(p1,p2) -> Poly.addition (dev_form p1) (dev_form p2) + | Mc.PEopp p -> Poly.uminus (dev_form p) + | Mc.PEsub(p1,p2) -> Poly.addition (dev_form p1) (Poly.uminus (dev_form p2)) + | Mc.PEpow(p,n) -> + let p = dev_form p in + let n = C2Ml.n n in + let rec pow n = + if n = 0 + then Poly.constant (n_spec.number_to_num n_spec.unit) + else Poly.product p (pow (n-1)) in + pow n in + dev_form p + + +let monomial_to_polynomial mn = + Monomial.fold + (fun v i acc -> + let mn = if i = 1 then Mc.PEX v else Mc.PEpow (Mc.PEX v ,Ml2C.n i) in + if acc = Mc.PEc (Mc.Zpos Mc.XH) + then mn + else Mc.PEmul(mn,acc)) + mn + (Mc.PEc (Mc.Zpos Mc.XH)) + +let list_to_polynomial vars l = + assert (List.for_all (fun x -> ceiling_num x =/ x) l); + let var x = monomial_to_polynomial (List.nth vars x) in + let rec xtopoly p i = function + | [] -> p + | c::l -> if c =/ (Int 0) then xtopoly p (i+1) l + else let c = Mc.PEc (Ml2C.bigint (numerator c)) in + let mn = + if c = Mc.PEc (Mc.Zpos Mc.XH) + then var i + else Mc.PEmul (c,var i) in + let p' = if p = Mc.PEc Mc.Z0 then mn else + Mc.PEadd (mn, p) in + xtopoly p' (i+1) l in + + xtopoly (Mc.PEc Mc.Z0) 0 l + +let rec fixpoint f x = + let y' = f x in + if y' = x then y' + else fixpoint f y' + + + + + + + + +let rec_simpl_cone n_spec e = + let simpl_cone = + Mc.simpl_cone n_spec.zero n_spec.unit n_spec.mult n_spec.eqb in + + let rec rec_simpl_cone = function + | Mc.S_Mult(t1, t2) -> + simpl_cone (Mc.S_Mult (rec_simpl_cone t1, rec_simpl_cone t2)) + | Mc.S_Add(t1,t2) -> + simpl_cone (Mc.S_Add (rec_simpl_cone t1, rec_simpl_cone t2)) + | x -> simpl_cone x in + rec_simpl_cone e + + +let simplify_cone n_spec c = fixpoint (rec_simpl_cone n_spec) c + +type cone_prod = + Const of cone + | Ideal of cone *cone + | Mult of cone * cone + | Other of cone +and cone = Mc.zWitness + + + +let factorise_linear_cone c = + + let rec cone_list c l = + match c with + | Mc.S_Add (x,r) -> cone_list r (x::l) + | _ -> c :: l in + + let factorise c1 c2 = + match c1 , c2 with + | Mc.S_Ideal(x,y) , Mc.S_Ideal(x',y') -> + if x = x' then Some (Mc.S_Ideal(x, Mc.S_Add(y,y'))) else None + | Mc.S_Mult(x,y) , Mc.S_Mult(x',y') -> + if x = x' then Some (Mc.S_Mult(x, Mc.S_Add(y,y'))) else None + | _ -> None in + + let rec rebuild_cone l pending = + match l with + | [] -> (match pending with + | None -> Mc.S_Z + | Some p -> p + ) + | e::l -> + (match pending with + | None -> rebuild_cone l (Some e) + | Some p -> (match factorise p e with + | None -> Mc.S_Add(p, rebuild_cone l (Some e)) + | Some f -> rebuild_cone l (Some f) ) + ) in + + (rebuild_cone (List.sort Pervasives.compare (cone_list c [])) None) + + + +(* The binding with Fourier might be a bit obsolete + -- how does it handle equalities ? *) + +(* Certificates are elements of the cone such that P = 0 *) + +(* To begin with, we search for certificates of the form: + a1.p1 + ... an.pn + b1.q1 +... + bn.qn + c = 0 + where pi >= 0 qi > 0 + ai >= 0 + bi >= 0 + Sum bi + c >= 1 + This is a linear problem: each monomial is considered as a variable. + Hence, we can use fourier. + + The variable c is at index 0 +*) + +open Mfourier + (*module Fourier = Fourier(Vector.VList)(SysSet(Vector.VList))*) + (*module Fourier = Fourier(Vector.VSparse)(SysSetAlt(Vector.VSparse))*) +module Fourier = Mfourier.Fourier(Vector.VSparse)(*(SysSetAlt(Vector.VMap))*) + +module Vect = Fourier.Vect +open Fourier.Cstr + +(* fold_left followed by a rev ! *) + +let constrain_monomial mn l = + let coeffs = List.fold_left (fun acc p -> (Poly.get mn p)::acc) [] l in + if mn = Monomial.const + then + { coeffs = Vect.from_list ((Big_int unit_big_int):: (List.rev coeffs)) ; + op = Eq ; + cst = Big_int zero_big_int } + else + { coeffs = Vect.from_list ((Big_int zero_big_int):: (List.rev coeffs)) ; + op = Eq ; + cst = Big_int zero_big_int } + + +let positivity l = + let rec xpositivity i l = + match l with + | [] -> [] + | (_,Mc.Equal)::l -> xpositivity (i+1) l + | (_,_)::l -> + {coeffs = Vect.update (i+1) (fun _ -> Int 1) Vect.null ; + op = Ge ; + cst = Int 0 } :: (xpositivity (i+1) l) + in + xpositivity 0 l + + +let string_of_op = function + | Mc.Strict -> "> 0" + | Mc.NonStrict -> ">= 0" + | Mc.Equal -> "= 0" + | Mc.NonEqual -> "<> 0" + + + +(* If the certificate includes at least one strict inequality, + the obtained polynomial can also be 0 *) +let build_linear_system l = + + (* Gather the monomials: HINT add up of the polynomials *) + let l' = List.map fst l in + let monomials = + List.fold_left (fun acc p -> Poly.addition p acc) (Poly.constant (Int 0)) l' + in (* For each monomial, compute a constraint *) + let s0 = + Poly.fold (fun mn _ res -> (constrain_monomial mn l')::res) monomials [] in + (* I need at least something strictly positive *) + let strict = { + coeffs = Vect.from_list ((Big_int unit_big_int):: + (List.map (fun (x,y) -> + match y with Mc.Strict -> + Big_int unit_big_int + | _ -> Big_int zero_big_int) l)); + op = Ge ; cst = Big_int unit_big_int } in + (* Add the positivity constraint *) + {coeffs = Vect.from_list ([Big_int unit_big_int]) ; + op = Ge ; + cst = Big_int zero_big_int}::(strict::(positivity l)@s0) + + +let big_int_to_z = Ml2C.bigint + +(* For Q, this is a pity that the certificate has been scaled + -- at a lower layer, certificates are using nums... *) +let make_certificate n_spec cert li = + let bint_to_cst = n_spec.bigint_to_number in + match cert with + | [] -> None + | e::cert' -> + let cst = match compare_big_int e zero_big_int with + | 0 -> Mc.S_Z + | 1 -> Mc.S_Pos (bint_to_cst e) + | _ -> failwith "positivity error" + in + let rec scalar_product cert l = + match cert with + | [] -> Mc.S_Z + | c::cert -> match l with + | [] -> failwith "make_certificate(1)" + | i::l -> + let r = scalar_product cert l in + match compare_big_int c zero_big_int with + | -1 -> Mc.S_Add ( + Mc.S_Ideal (Mc.PEc ( bint_to_cst c), Mc.S_In (Ml2C.nat i)), + r) + | 0 -> r + | _ -> Mc.S_Add ( + Mc.S_Mult (Mc.S_Pos (bint_to_cst c), Mc.S_In (Ml2C.nat i)), + r) in + + Some ((factorise_linear_cone + (simplify_cone n_spec (Mc.S_Add (cst, scalar_product cert' li))))) + + +exception Found of Monomial.t + +let raw_certificate l = + let sys = build_linear_system l in + try + match Fourier.find_point sys with + | None -> None + | Some cert -> Some (rats_to_ints (Vect.to_list cert)) + (* should not use rats_to_ints *) + with x -> + if debug + then (Printf.printf "raw certificate %s" (Printexc.to_string x); + flush stdout) ; + None + + +let simple_linear_prover to_constant l = + let (lc,li) = List.split l in + match raw_certificate lc with + | None -> None (* No certificate *) + | Some cert -> make_certificate to_constant cert li + + + +let linear_prover n_spec l = + let li = List.combine l (interval 0 (List.length l -1)) in + let (l1,l') = List.partition + (fun (x,_) -> if snd' x = Mc.NonEqual then true else false) li in + let l' = List.map + (fun (c,i) -> let (Mc.Pair(x,y)) = c in + match y with + Mc.NonEqual -> failwith "cannot happen" + | y -> ((dev_form n_spec x, y),i)) l' in + + simple_linear_prover n_spec l' + + +let linear_prover n_spec l = + try linear_prover n_spec l with + x -> (print_string (Printexc.to_string x); None) + +(* zprover.... *) + +(* I need to gather the set of variables ---> + Then go for fold + Once I have an interval, I need a certificate : 2 other fourier elims. + (I could probably get the certificate directly + as it is done in the fourier contrib.) +*) + +let make_linear_system l = + let l' = List.map fst l in + let monomials = List.fold_left (fun acc p -> Poly.addition p acc) + (Poly.constant (Int 0)) l' in + let monomials = Poly.fold + (fun mn _ l -> if mn = Monomial.const then l else mn::l) monomials [] in + (List.map (fun (c,op) -> + {coeffs = Vect.from_list (List.map (fun mn -> (Poly.get mn c)) monomials) ; + op = op ; + cst = minus_num ( (Poly.get Monomial.const c))}) l + ,monomials) + + +open Interval +let pplus x y = Mc.PEadd(x,y) +let pmult x y = Mc.PEmul(x,y) +let pconst x = Mc.PEc x +let popp x = Mc.PEopp x + +let debug = false + +(* keep track of enumerated vectors *) +let rec mem p x l = + match l with [] -> false | e::l -> if p x e then true else mem p x l + +let rec remove_assoc p x l = + match l with [] -> [] | e::l -> if p x (fst e) then + remove_assoc p x l else e::(remove_assoc p x l) + +let eq x y = Vect.compare x y = 0 + +(* Beurk... this code is a shame *) + +let rec zlinear_prover sys = xzlinear_prover [] sys + +and xzlinear_prover enum l : (Mc.proofTerm option) = + match linear_prover z_spec l with + | Some prf -> Some (Mc.RatProof prf) + | None -> + let ll = List.fold_right (fun (Mc.Pair(e,k)) r -> match k with + Mc.NonEqual -> r + | k -> (dev_form z_spec e , + match k with + | Mc.Strict | Mc.NonStrict -> Ge + (* Loss of precision -- weakness of fourier*) + | Mc.Equal -> Eq + | Mc.NonEqual -> failwith "Cannot happen") :: r) l [] in + + let (sys,var) = make_linear_system ll in + let res = + match Fourier.find_Q_interval sys with + | Some(i,x,j) -> if i =/ j + then Some(i,Vect.set x (Int 1) Vect.null,i) else None + | None -> None in + let res = match res with + | None -> + begin + let candidates = List.fold_right + (fun cstr acc -> + let gcd = Big_int (Vect.gcd cstr.coeffs) in + let vect = Vect.mul (Int 1 // gcd) cstr.coeffs in + if mem eq vect enum then acc + else ((vect,Fourier.optimise vect sys)::acc)) sys [] in + let candidates = List.fold_left (fun l (x,i) -> + match i with + None -> (x,Empty)::l + | Some i -> (x,i)::l) [] (candidates) in + match List.fold_left (fun (x1,i1) (x2,i2) -> + if smaller_itv i1 i2 + then (x1,i1) else (x2,i2)) (Vect.null,Itv(None,None)) candidates + with + | (i,Empty) -> None + | (x,Itv(Some i, Some j)) -> Some(i,x,j) + | (x,Point n) -> Some(n,x,n) + | x -> match Fourier.find_Q_interval sys with + | None -> None + | Some(i,x,j) -> + if i =/ j + then Some(i,Vect.set x (Int 1) Vect.null,i) + else None + end + | _ -> res in + + match res with + | Some (lb,e,ub) -> + let (lbn,lbd) = + (Ml2C.bigint (sub_big_int (numerator lb) unit_big_int), + Ml2C.bigint (denominator lb)) in + let (ubn,ubd) = + (Ml2C.bigint (add_big_int unit_big_int (numerator ub)) , + Ml2C.bigint (denominator ub)) in + let expr = list_to_polynomial var (Vect.to_list e) in + (match + (*x <= ub -> x > ub *) + linear_prover z_spec + (Mc.Pair(pplus (pmult (pconst ubd) expr) (popp (pconst ubn)), + Mc.NonStrict) :: l), + (* lb <= x -> lb > x *) + linear_prover z_spec + (Mc.Pair( pplus (popp (pmult (pconst lbd) expr)) (pconst lbn) , + Mc.NonStrict)::l) + with + | Some cub , Some clb -> + (match zlinear_enum (e::enum) expr + (ceiling_num lb) (floor_num ub) l + with + | None -> None + | Some prf -> + Some (Mc.EnumProof(Ml2C.q lb,expr,Ml2C.q ub,clb,cub,prf))) + | _ -> None + ) + | _ -> None +and xzlinear_enum enum expr clb cub l = + if clb >/ cub + then Some Mc.Nil + else + let pexpr = pplus (popp (pconst (Ml2C.bigint (numerator clb)))) expr in + let sys' = (Mc.Pair(pexpr, Mc.Equal))::l in + match xzlinear_prover enum sys' with + | None -> if debug then print_string "zlp?"; None + | Some prf -> if debug then print_string "zlp!"; + match zlinear_enum enum expr (clb +/ (Int 1)) cub l with + | None -> None + | Some prfl -> Some (Mc.Cons(prf,prfl)) + +and zlinear_enum enum expr clb cub l = + let res = xzlinear_enum enum expr clb cub l in + if debug then Printf.printf "zlinear_enum %s %s -> %s\n" + (string_of_num clb) + (string_of_num cub) + (match res with + | None -> "None" + | Some r -> "Some") ; res + diff --git a/contrib/micromega/coq_micromega.ml b/contrib/micromega/coq_micromega.ml new file mode 100644 index 00000000..29e2a183 --- /dev/null +++ b/contrib/micromega/coq_micromega.ml @@ -0,0 +1,1290 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* A(x,t) + | C(x,y,_) -> C(x,y,t) + | D(x,y,_) -> D(x,y,t) + | N(x,_) -> N(x,t) + | I(x,y,_) -> I(x,y,t) + | _ -> f + +let tt = [] +let ff = [ [] ] + + +type ('constant,'contr) sentence = + ('constant Micromega.formula, 'contr) formula + +let cnf negate normalise f = + let negate a = + CoqToCaml.list (fun cl -> CoqToCaml.list (fun x -> x) cl) (negate a) in + + let normalise a = + CoqToCaml.list (fun cl -> CoqToCaml.list (fun x -> x) cl) (normalise a) in + + let and_cnf x y = x @ y in + let or_clause_cnf t f = List.map (fun x -> t@x ) f in + + let rec or_cnf f f' = + match f with + | [] -> tt + | e :: rst -> (or_cnf rst f') @ (or_clause_cnf e f') in + + let rec xcnf (pol : bool) f = + match f with + | TT -> if pol then tt else ff (* ?? *) + | FF -> if pol then ff else tt (* ?? *) + | X p -> if pol then ff else ff (* ?? *) + | A(x,t) -> if pol then normalise x else negate x + | N(e,t) -> xcnf (not pol) e + | C(e1,e2,t) -> + (if pol then and_cnf else or_cnf) (xcnf pol e1) (xcnf pol e2) + | D(e1,e2,t) -> + (if pol then or_cnf else and_cnf) (xcnf pol e1) (xcnf pol e2) + | I(e1,e2,t) -> + (if pol then or_cnf else and_cnf) (xcnf (not pol) e1) (xcnf pol e2) in + + xcnf true f + + + +module M = +struct + open Coqlib + open Term + (* let constant = gen_constant_in_modules "Omicron" coq_modules*) + + + let logic_dir = ["Coq";"Logic";"Decidable"] + let coq_modules = + init_modules @ + [logic_dir] @ arith_modules @ zarith_base_modules @ + [ ["Coq";"Lists";"List"]; + ["ZMicromega"]; + ["Tauto"]; + ["RingMicromega"]; + ["EnvRing"]; + ["Coq"; "micromega"; "ZMicromega"]; + ["Coq" ; "micromega" ; "Tauto"]; + ["Coq" ; "micromega" ; "RingMicromega"]; + ["Coq" ; "micromega" ; "EnvRing"]; + ["Coq";"QArith"; "QArith_base"]; + ["Coq";"Reals" ; "Rdefinitions"]; + ["LRing_normalise"]] + + let constant = gen_constant_in_modules "ZMicromega" coq_modules + + let coq_and = lazy (constant "and") + let coq_or = lazy (constant "or") + let coq_not = lazy (constant "not") + let coq_iff = lazy (constant "iff") + let coq_True = lazy (constant "True") + let coq_False = lazy (constant "False") + + let coq_cons = lazy (constant "cons") + let coq_nil = lazy (constant "nil") + let coq_list = lazy (constant "list") + + let coq_O = lazy (constant "O") + let coq_S = lazy (constant "S") + let coq_nat = lazy (constant "nat") + + let coq_NO = lazy + (gen_constant_in_modules "N" [ ["Coq";"NArith";"BinNat" ]] "N0") + let coq_Npos = lazy + (gen_constant_in_modules "N" [ ["Coq";"NArith"; "BinNat"]] "Npos") + (* let coq_n = lazy (constant "N")*) + + let coq_pair = lazy (constant "pair") + let coq_None = lazy (constant "None") + let coq_option = lazy (constant "option") + let coq_positive = lazy (constant "positive") + let coq_xH = lazy (constant "xH") + let coq_xO = lazy (constant "xO") + let coq_xI = lazy (constant "xI") + + let coq_N0 = lazy (constant "N0") + let coq_N0 = lazy (constant "Npos") + + + let coq_Z = lazy (constant "Z") + let coq_Q = lazy (constant "Q") + let coq_R = lazy (constant "R") + + let coq_ZERO = lazy (constant "Z0") + let coq_POS = lazy (constant "Zpos") + let coq_NEG = lazy (constant "Zneg") + + let coq_QWitness = lazy + (gen_constant_in_modules "QMicromega" + [["Coq"; "micromega"; "QMicromega"]] "QWitness") + let coq_ZWitness = lazy + (gen_constant_in_modules "QMicromega" + [["Coq"; "micromega"; "ZMicromega"]] "ZWitness") + + + let coq_Build_Witness = lazy (constant "Build_Witness") + + + let coq_Qmake = lazy (constant "Qmake") + + let coq_proofTerm = lazy (constant "ProofTerm") + let coq_ratProof = lazy (constant "RatProof") + let coq_cutProof = lazy (constant "CutProof") + let coq_enumProof = lazy (constant "EnumProof") + + let coq_Zgt = lazy (constant "Zgt") + let coq_Zge = lazy (constant "Zge") + let coq_Zle = lazy (constant "Zle") + let coq_Zlt = lazy (constant "Zlt") + let coq_Eq = lazy (constant "eq") + + let coq_Zplus = lazy (constant "Zplus") + let coq_Zminus = lazy (constant "Zminus") + let coq_Zopp = lazy (constant "Zopp") + let coq_Zmult = lazy (constant "Zmult") + let coq_N_of_Z = lazy + (gen_constant_in_modules "ZArithRing" + [["Coq";"setoid_ring";"ZArithRing"]] "N_of_Z") + + + let coq_PEX = lazy (constant "PEX" ) + let coq_PEc = lazy (constant"PEc") + let coq_PEadd = lazy (constant "PEadd") + let coq_PEopp = lazy (constant "PEopp") + let coq_PEmul = lazy (constant "PEmul") + let coq_PEsub = lazy (constant "PEsub") + let coq_PEpow = lazy (constant "PEpow") + + + let coq_OpEq = lazy (constant "OpEq") + let coq_OpNEq = lazy (constant "OpNEq") + let coq_OpLe = lazy (constant "OpLe") + let coq_OpLt = lazy (constant "OpLt") + let coq_OpGe = lazy (constant "OpGe") + let coq_OpGt = lazy (constant "OpGt") + + + let coq_S_In = lazy (constant "S_In") + let coq_S_Square = lazy (constant "S_Square") + let coq_S_Monoid = lazy (constant "S_Monoid") + let coq_S_Ideal = lazy (constant "S_Ideal") + let coq_S_Mult = lazy (constant "S_Mult") + let coq_S_Add = lazy (constant "S_Add") + let coq_S_Pos = lazy (constant "S_Pos") + let coq_S_Z = lazy (constant "S_Z") + let coq_coneMember = lazy (constant "coneMember") + + + let coq_make_impl = lazy + (gen_constant_in_modules "Zmicromega" [["Refl"]] "make_impl") + let coq_make_conj = lazy + (gen_constant_in_modules "Zmicromega" [["Refl"]] "make_conj") + + let coq_Build = lazy + (gen_constant_in_modules "RingMicromega" + [["Coq" ; "micromega" ; "RingMicromega"] ; ["RingMicromega"] ] + "Build_Formula") + let coq_Cstr = lazy + (gen_constant_in_modules "RingMicromega" + [["Coq" ; "micromega" ; "RingMicromega"] ; ["RingMicromega"] ] "Formula") + + type parse_error = + | Ukn + | BadStr of string + | BadNum of int + | BadTerm of Term.constr + | Msg of string + | Goal of (Term.constr list ) * Term.constr * parse_error + + let string_of_error = function + | Ukn -> "ukn" + | BadStr s -> s + | BadNum i -> string_of_int i + | BadTerm _ -> "BadTerm" + | Msg s -> s + | Goal _ -> "Goal" + + + exception ParseError + + + + + let get_left_construct term = + match Term.kind_of_term term with + | Term.Construct(_,i) -> (i,[| |]) + | Term.App(l,rst) -> + (match Term.kind_of_term l with + | Term.Construct(_,i) -> (i,rst) + | _ -> raise ParseError + ) + | _ -> raise ParseError + + module Mc = Micromega + + let rec parse_nat term = + let (i,c) = get_left_construct term in + match i with + | 1 -> Mc.O + | 2 -> Mc.S (parse_nat (c.(0))) + | i -> raise ParseError + + + let pp_nat o n = Printf.fprintf o "%i" (CoqToCaml.nat n) + + + let rec dump_nat x = + match x with + | Mc.O -> Lazy.force coq_O + | Mc.S p -> Term.mkApp(Lazy.force coq_S,[| dump_nat p |]) + + + let rec parse_positive term = + let (i,c) = get_left_construct term in + match i with + | 1 -> Mc.XI (parse_positive c.(0)) + | 2 -> Mc.XO (parse_positive c.(0)) + | 3 -> Mc.XH + | i -> raise ParseError + + + let rec dump_positive x = + match x with + | Mc.XH -> Lazy.force coq_xH + | Mc.XO p -> Term.mkApp(Lazy.force coq_xO,[| dump_positive p |]) + | Mc.XI p -> Term.mkApp(Lazy.force coq_xI,[| dump_positive p |]) + + let pp_positive o x = Printf.fprintf o "%i" (CoqToCaml.positive x) + + + let rec dump_n x = + match x with + | Mc.N0 -> Lazy.force coq_N0 + | Mc.Npos p -> Term.mkApp(Lazy.force coq_Npos,[| dump_positive p|]) + + let rec dump_index x = + match x with + | Mc.XH -> Lazy.force coq_xH + | Mc.XO p -> Term.mkApp(Lazy.force coq_xO,[| dump_index p |]) + | Mc.XI p -> Term.mkApp(Lazy.force coq_xI,[| dump_index p |]) + + + let pp_index o x = Printf.fprintf o "%i" (CoqToCaml.index x) + + let rec dump_n x = + match x with + | Mc.N0 -> Lazy.force coq_NO + | Mc.Npos p -> Term.mkApp(Lazy.force coq_Npos,[| dump_positive p |]) + + let rec pp_n o x = output_string o (string_of_int (CoqToCaml.n x)) + + let dump_pair t1 t2 dump_t1 dump_t2 (Mc.Pair (x,y)) = + Term.mkApp(Lazy.force coq_pair,[| t1 ; t2 ; dump_t1 x ; dump_t2 y|]) + + + let rec parse_z term = + let (i,c) = get_left_construct term in + match i with + | 1 -> Mc.Z0 + | 2 -> Mc.Zpos (parse_positive c.(0)) + | 3 -> Mc.Zneg (parse_positive c.(0)) + | i -> raise ParseError + + let dump_z x = + match x with + | Mc.Z0 ->Lazy.force coq_ZERO + | Mc.Zpos p -> Term.mkApp(Lazy.force coq_POS,[| dump_positive p|]) + | Mc.Zneg p -> Term.mkApp(Lazy.force coq_NEG,[| dump_positive p|]) + + let pp_z o x = Printf.fprintf o "%i" (CoqToCaml.z x) + +let dump_num bd1 = + Term.mkApp(Lazy.force coq_Qmake, + [|dump_z (CamlToCoq.bigint (numerator bd1)) ; + dump_positive (CamlToCoq.positive_big_int (denominator bd1)) |]) + + +let dump_q q = + Term.mkApp(Lazy.force coq_Qmake, + [| dump_z q.Micromega.qnum ; dump_positive q.Micromega.qden|]) + +let parse_q term = + match Term.kind_of_term term with + | Term.App(c, args) -> + ( + match Term.kind_of_term c with + Term.Construct((n,j),i) -> + if Names.string_of_kn n = "Coq.QArith.QArith_base#<>#Q" + then {Mc.qnum = parse_z args.(0) ; Mc.qden = parse_positive args.(1) } + else raise ParseError + | _ -> raise ParseError + ) + | _ -> raise ParseError + + let rec parse_list parse_elt term = + let (i,c) = get_left_construct term in + match i with + | 1 -> Mc.Nil + | 2 -> Mc.Cons(parse_elt c.(1), parse_list parse_elt c.(2)) + | i -> raise ParseError + + + let rec dump_list typ dump_elt l = + match l with + | Mc.Nil -> Term.mkApp(Lazy.force coq_nil,[| typ |]) + | Mc.Cons(e,l) -> Term.mkApp(Lazy.force coq_cons, + [| typ; dump_elt e;dump_list typ dump_elt l|]) + + let rec dump_ml_list typ dump_elt l = + match l with + | [] -> Term.mkApp(Lazy.force coq_nil,[| typ |]) + | e::l -> Term.mkApp(Lazy.force coq_cons, + [| typ; dump_elt e;dump_ml_list typ dump_elt l|]) + + + + let pp_list op cl elt o l = + let rec _pp o l = + match l with + | Mc.Nil -> () + | Mc.Cons(e,Mc.Nil) -> Printf.fprintf o "%a" elt e + | Mc.Cons(e,l) -> Printf.fprintf o "%a ,%a" elt e _pp l in + Printf.fprintf o "%s%a%s" op _pp l cl + + + + let pp_var = pp_positive + let dump_var = dump_positive + + let rec pp_expr o e = + match e with + | Mc.PEX n -> Printf.fprintf o "V %a" pp_var n + | Mc.PEc z -> pp_z o z + | Mc.PEadd(e1,e2) -> Printf.fprintf o "(%a)+(%a)" pp_expr e1 pp_expr e2 + | Mc.PEmul(e1,e2) -> Printf.fprintf o "%a*(%a)" pp_expr e1 pp_expr e2 + | Mc.PEopp e -> Printf.fprintf o "-(%a)" pp_expr e + | Mc.PEsub(e1,e2) -> Printf.fprintf o "(%a)-(%a)" pp_expr e1 pp_expr e2 + | Mc.PEpow(e,n) -> Printf.fprintf o "(%a)^(%a)" pp_expr e pp_n n + + + let dump_expr typ dump_z e = + let rec dump_expr e = + match e with + | Mc.PEX n -> mkApp(Lazy.force coq_PEX,[| typ; dump_var n |]) + | Mc.PEc z -> mkApp(Lazy.force coq_PEc,[| typ ; dump_z z |]) + | Mc.PEadd(e1,e2) -> mkApp(Lazy.force coq_PEadd, + [| typ; dump_expr e1;dump_expr e2|]) + | Mc.PEsub(e1,e2) -> mkApp(Lazy.force coq_PEsub, + [| typ; dump_expr e1;dump_expr e2|]) + | Mc.PEopp e -> mkApp(Lazy.force coq_PEopp, + [| typ; dump_expr e|]) + | Mc.PEmul(e1,e2) -> mkApp(Lazy.force coq_PEmul, + [| typ; dump_expr e1;dump_expr e2|]) + | Mc.PEpow(e,n) -> mkApp(Lazy.force coq_PEpow, + [| typ; dump_expr e; dump_n n|]) + in + dump_expr e + + let rec dump_monoid l = dump_list (Lazy.force coq_nat) dump_nat l + + let rec dump_cone typ dump_z e = + let z = Lazy.force typ in + let rec dump_cone e = + match e with + | Mc.S_In n -> mkApp(Lazy.force coq_S_In,[| z; dump_nat n |]) + | Mc.S_Ideal(e,c) -> mkApp(Lazy.force coq_S_Ideal, + [| z; dump_expr z dump_z e ; dump_cone c |]) + | Mc.S_Square e -> mkApp(Lazy.force coq_S_Square, + [| z;dump_expr z dump_z e|]) + | Mc.S_Monoid l -> mkApp (Lazy.force coq_S_Monoid, + [|z; dump_monoid l|]) + | Mc.S_Add(e1,e2) -> mkApp(Lazy.force coq_S_Add, + [| z; dump_cone e1; dump_cone e2|]) + | Mc.S_Mult(e1,e2) -> mkApp(Lazy.force coq_S_Mult, + [| z; dump_cone e1; dump_cone e2|]) + | Mc.S_Pos p -> mkApp(Lazy.force coq_S_Pos,[| z; dump_z p|]) + | Mc.S_Z -> mkApp( Lazy.force coq_S_Z,[| z|]) in + dump_cone e + + + let pp_cone pp_z o e = + let rec pp_cone o e = + match e with + | Mc.S_In n -> + Printf.fprintf o "(S_In %a)%%nat" pp_nat n + | Mc.S_Ideal(e,c) -> + Printf.fprintf o "(S_Ideal %a %a)" pp_expr e pp_cone c + | Mc.S_Square e -> + Printf.fprintf o "(S_Square %a)" pp_expr e + | Mc.S_Monoid l -> + Printf.fprintf o "(S_Monoid %a)" (pp_list "[" "]" pp_nat) l + | Mc.S_Add(e1,e2) -> + Printf.fprintf o "(S_Add %a %a)" pp_cone e1 pp_cone e2 + | Mc.S_Mult(e1,e2) -> + Printf.fprintf o "(S_Mult %a %a)" pp_cone e1 pp_cone e2 + | Mc.S_Pos p -> + Printf.fprintf o "(S_Pos %a)%%positive" pp_z p + | Mc.S_Z -> + Printf.fprintf o "S_Z" in + pp_cone o e + + + + + let rec parse_op term = + let (i,c) = get_left_construct term in + match i with + | 1 -> Mc.OpEq + | 2 -> Mc.OpLe + | 3 -> Mc.OpGe + | 4 -> Mc.OpGt + | 5 -> Mc.OpLt + | i -> raise ParseError + + + let rec dump_op = function + | Mc.OpEq-> Lazy.force coq_OpEq + | Mc.OpNEq-> Lazy.force coq_OpNEq + | Mc.OpLe -> Lazy.force coq_OpLe + | Mc.OpGe -> Lazy.force coq_OpGe + | Mc.OpGt-> Lazy.force coq_OpGt + | Mc.OpLt-> Lazy.force coq_OpLt + + + + let pp_op o e= + match e with + | Mc.OpEq-> Printf.fprintf o "=" + | Mc.OpNEq-> Printf.fprintf o "<>" + | Mc.OpLe -> Printf.fprintf o "=<" + | Mc.OpGe -> Printf.fprintf o ">=" + | Mc.OpGt-> Printf.fprintf o ">" + | Mc.OpLt-> Printf.fprintf o "<" + + + + + let pp_cstr o {Mc.flhs = l ; Mc.fop = op ; Mc.frhs = r } = + Printf.fprintf o"(%a %a %a)" pp_expr l pp_op op pp_expr r + + let dump_cstr typ dump_constant {Mc.flhs = e1 ; Mc.fop = o ; Mc.frhs = e2} = + Term.mkApp(Lazy.force coq_Build, + [| typ; dump_expr typ dump_constant e1 ; + dump_op o ; + dump_expr typ dump_constant e2|]) + + + + let parse_zop (op,args) = + match kind_of_term op with + | Const x -> + (match Names.string_of_con x with + | "Coq.ZArith.BinInt#<>#Zgt" -> (Mc.OpGt, args.(0), args.(1)) + | "Coq.ZArith.BinInt#<>#Zge" -> (Mc.OpGe, args.(0), args.(1)) + | "Coq.ZArith.BinInt#<>#Zlt" -> (Mc.OpLt, args.(0), args.(1)) + | "Coq.ZArith.BinInt#<>#Zle" -> (Mc.OpLe, args.(0), args.(1)) + (*| "Coq.Init.Logic#<>#not" -> Mc.OpNEq (* for backward compat *)*) + | s -> raise ParseError + ) + | Ind(n,0) -> + (match Names.string_of_kn n with + | "Coq.Init.Logic#<>#eq" -> + if args.(0) <> Lazy.force coq_Z + then raise ParseError + else (Mc.OpEq, args.(1), args.(2)) + | _ -> raise ParseError) + | _ -> failwith "parse_zop" + + + let parse_rop (op,args) = + try + match kind_of_term op with + | Const x -> + (match Names.string_of_con x with + | "Coq.Reals.Rdefinitions#<>#Rgt" -> (Mc.OpGt, args.(0), args.(1)) + | "Coq.Reals.Rdefinitions#<>#Rge" -> (Mc.OpGe, args.(0), args.(1)) + | "Coq.Reals.Rdefinitions#<>#Rlt" -> (Mc.OpLt, args.(0), args.(1)) + | "Coq.Reals.Rdefinitions#<>#Rle" -> (Mc.OpLe, args.(0), args.(1)) + (*| "Coq.Init.Logic#<>#not"-> Mc.OpNEq (* for backward compat *)*) + | s -> raise ParseError + ) + | Ind(n,0) -> + (match Names.string_of_kn n with + | "Coq.Init.Logic#<>#eq" -> + (* if args.(0) <> Lazy.force coq_R + then raise ParseError + else*) (Mc.OpEq, args.(1), args.(2)) + | _ -> raise ParseError) + | _ -> failwith "parse_rop" + with x -> + (Pp.pp (Pp.str "parse_rop failure ") ; + Pp.pp (Printer.prterm op) ; Pp.pp_flush ()) + ; raise x + + + let parse_qop (op,args) = + ( + (match kind_of_term op with + | Const x -> + (match Names.string_of_con x with + | "Coq.QArith.QArith_base#<>#Qgt" -> Mc.OpGt + | "Coq.QArith.QArith_base#<>#Qge" -> Mc.OpGe + | "Coq.QArith.QArith_base#<>#Qlt" -> Mc.OpLt + | "Coq.QArith.QArith_base#<>#Qle" -> Mc.OpLe + | "Coq.QArith.QArith_base#<>#Qeq" -> Mc.OpEq + | s -> raise ParseError + ) + | _ -> failwith "parse_zop") , args.(0) , args.(1)) + + + module Env = + struct + type t = constr list + + let compute_rank_add env v = + let rec _add env n v = + match env with + | [] -> ([v],n) + | e::l -> + if eq_constr e v + then (env,n) + else + let (env,n) = _add l ( n+1) v in + (e::env,n) in + let (env, n) = _add env 1 v in + (env, CamlToCoq.idx n) + + + let empty = [] + + let elements env = env + + end + + + let is_constant t = (* This is an approx *) + match kind_of_term t with + | Construct(i,_) -> true + | _ -> false + + + type 'a op = + | Binop of ('a Mc.pExpr -> 'a Mc.pExpr -> 'a Mc.pExpr) + | Opp + | Power + | Ukn of string + + + let parse_expr parse_constant parse_exp ops_spec env term = + if debug + then (Pp.pp (Pp.str "parse_expr: "); + Pp.pp_flush ();Pp.pp (Printer.prterm term); Pp.pp_flush ()); + + let constant_or_variable env term = + try + ( Mc.PEc (parse_constant term) , env) + with ParseError -> + let (env,n) = Env.compute_rank_add env term in + (Mc.PEX n , env) in + + let rec parse_expr env term = + let combine env op (t1,t2) = + let (expr1,env) = parse_expr env t1 in + let (expr2,env) = parse_expr env t2 in + (op expr1 expr2,env) in + match kind_of_term term with + | App(t,args) -> + ( + match kind_of_term t with + | Const c -> + ( match ops_spec (Names.string_of_con c) with + | Binop f -> combine env f (args.(0),args.(1)) + | Opp -> let (expr,env) = parse_expr env args.(0) in + (Mc.PEopp expr, env) + | Power -> + let (expr,env) = parse_expr env args.(0) in + let exp = (parse_exp args.(1)) in + (Mc.PEpow(expr, exp) , env) + | Ukn s -> + if debug + then (Printf.printf "unknown op: %s\n" s; flush stdout;); + let (env,n) = Env.compute_rank_add env term in (Mc.PEX n, env) + ) + | _ -> constant_or_variable env term + ) + | _ -> constant_or_variable env term in + parse_expr env term + + +let zop_spec = function + | "Coq.ZArith.BinInt#<>#Zplus" -> Binop (fun x y -> Mc.PEadd(x,y)) + | "Coq.ZArith.BinInt#<>#Zminus" -> Binop (fun x y -> Mc.PEsub(x,y)) + | "Coq.ZArith.BinInt#<>#Zmult" -> Binop (fun x y -> Mc.PEmul (x,y)) + | "Coq.ZArith.BinInt#<>#Zopp" -> Opp + | "Coq.ZArith.Zpow_def#<>#Zpower" -> Power + | s -> Ukn s + +let qop_spec = function + | "Coq.QArith.QArith_base#<>#Qplus" -> Binop (fun x y -> Mc.PEadd(x,y)) + | "Coq.QArith.QArith_base#<>#Qminus" -> Binop (fun x y -> Mc.PEsub(x,y)) + | "Coq.QArith.QArith_base#<>#Qmult" -> Binop (fun x y -> Mc.PEmul (x,y)) + | "Coq.QArith.QArith_base#<>#Qopp" -> Opp + | "Coq.QArith.QArith_base#<>#Qpower" -> Power + | s -> Ukn s + +let rop_spec = function + | "Coq.Reals.Rdefinitions#<>#Rplus" -> Binop (fun x y -> Mc.PEadd(x,y)) + | "Coq.Reals.Rdefinitions#<>#Rminus" -> Binop (fun x y -> Mc.PEsub(x,y)) + | "Coq.Reals.Rdefinitions#<>#Rmult" -> Binop (fun x y -> Mc.PEmul (x,y)) + | "Coq.Reals.Rdefinitions#<>#Ropp" -> Opp + | "Coq.Reals.Rpow_def#<>#pow" -> Power + | s -> Ukn s + + + + + +let zconstant = parse_z +let qconstant = parse_q + + +let rconstant term = + if debug + then (Pp.pp_flush (); + Pp.pp (Pp.str "rconstant: "); + Pp.pp (Printer.prterm term); Pp.pp_flush ()); + match Term.kind_of_term term with + | Const x -> + (match Names.string_of_con x with + | "Coq.Reals.Rdefinitions#<>#R0" -> Mc.Z0 + | "Coq.Reals.Rdefinitions#<>#R1" -> Mc.Zpos Mc.XH + | _ -> raise ParseError + ) + | _ -> raise ParseError + + +let parse_zexpr = + parse_expr zconstant (fun x -> Mc.n_of_Z (parse_z x)) zop_spec +let parse_qexpr = + parse_expr qconstant (fun x -> Mc.n_of_Z (parse_z x)) qop_spec +let parse_rexpr = + parse_expr rconstant (fun x -> Mc.n_of_nat (parse_nat x)) rop_spec + + + let parse_arith parse_op parse_expr env cstr = + if debug + then (Pp.pp_flush (); + Pp.pp (Pp.str "parse_arith: "); + Pp.pp (Printer.prterm cstr); + Pp.pp_flush ()); + match kind_of_term cstr with + | App(op,args) -> + let (op,lhs,rhs) = parse_op (op,args) in + let (e1,env) = parse_expr env lhs in + let (e2,env) = parse_expr env rhs in + ({Mc.flhs = e1; Mc.fop = op;Mc.frhs = e2},env) + | _ -> failwith "error : parse_arith(2)" + + let parse_zarith = parse_arith parse_zop parse_zexpr + + let parse_qarith = parse_arith parse_qop parse_qexpr + + let parse_rarith = parse_arith parse_rop parse_rexpr + + + (* generic parsing of arithmetic expressions *) + + let rec parse_conj parse_arith env term = + match kind_of_term term with + | App(l,rst) -> + (match kind_of_term l with + | Ind (n,_) -> + ( match Names.string_of_kn n with + | "Coq.Init.Logic#<>#and" -> + let (e1,env) = parse_arith env rst.(0) in + let (e2,env) = parse_conj parse_arith env rst.(1) in + (Mc.Cons(e1,e2),env) + | _ -> (* This might be an equality *) + let (e,env) = parse_arith env term in + (Mc.Cons(e,Mc.Nil),env)) + | _ -> (* This is an arithmetic expression *) + let (e,env) = parse_arith env term in + (Mc.Cons(e,Mc.Nil),env)) + | _ -> failwith "parse_conj(2)" + + + + let rec f2f = function + | TT -> Mc.TT + | FF -> Mc.FF + | X _ -> Mc.X + | A (x,_) -> Mc.A x + | C (a,b,_) -> Mc.Cj(f2f a,f2f b) + | D (a,b,_) -> Mc.D(f2f a,f2f b) + | N (a,_) -> Mc.N(f2f a) + | I(a,b,_) -> Mc.I(f2f a,f2f b) + + let is_prop t = + match t with + | Names.Anonymous -> true (* Not quite right *) + | Names.Name x -> false + + let mkC f1 f2 = C(f1,f2,none) + let mkD f1 f2 = D(f1,f2,none) + let mkIff f1 f2 = C(I(f1,f2,none),I(f2,f2,none),none) + let mkI f1 f2 = I(f1,f2,none) + + let mkformula_binary g term f1 f2 = + match f1 , f2 with + | X _ , X _ -> X(term) + | _ -> g f1 f2 + + let parse_formula parse_atom env term = + let parse_atom env t = try let (at,env) = parse_atom env t in (A(at,none), env) with _ -> (X(t),env) in + + let rec xparse_formula env term = + match kind_of_term term with + | App(l,rst) -> + (match rst with + | [|a;b|] when l = Lazy.force coq_and -> + let f,env = xparse_formula env a in + let g,env = xparse_formula env b in + mkformula_binary mkC term f g,env + | [|a;b|] when l = Lazy.force coq_or -> + let f,env = xparse_formula env a in + let g,env = xparse_formula env b in + mkformula_binary mkD term f g,env + | [|a|] when l = Lazy.force coq_not -> + let (f,env) = xparse_formula env a in (N(f,none), env) + | [|a;b|] when l = Lazy.force coq_iff -> + let f,env = xparse_formula env a in + let g,env = xparse_formula env b in + mkformula_binary mkIff term f g,env + | _ -> parse_atom env term) + | Prod(typ,a,b) when not (Termops.dependent (mkRel 1) b) -> + let f,env = xparse_formula env a in + let g,env = xparse_formula env b in + mkformula_binary mkI term f g,env + | _ when term = Lazy.force coq_True -> (TT,env) + | _ when term = Lazy.force coq_False -> (FF,env) + | _ -> X(term),env in + xparse_formula env term + + let coq_TT = lazy + (gen_constant_in_modules "ZMicromega" + [["Coq" ; "micromega" ; "Tauto"];["Tauto"]] "TT") + let coq_FF = lazy + (gen_constant_in_modules "ZMicromega" + [["Coq" ; "micromega" ; "Tauto"];["Tauto"]] "FF") + let coq_And = lazy + (gen_constant_in_modules "ZMicromega" + [["Coq" ; "micromega" ; "Tauto"];["Tauto"]] "Cj") + let coq_Or = lazy + (gen_constant_in_modules "ZMicromega" + [["Coq" ; "micromega" ; "Tauto"];["Tauto"]] "D") + let coq_Neg = lazy + (gen_constant_in_modules "ZMicromega" + [["Coq" ; "micromega" ; "Tauto"];["Tauto"]] "N") + let coq_Atom = lazy + (gen_constant_in_modules "ZMicromega" + [["Coq" ; "micromega" ; "Tauto"];["Tauto"]] "A") + let coq_X = lazy + (gen_constant_in_modules "ZMicromega" + [["Coq" ; "micromega" ; "Tauto"];["Tauto"]] "X") + let coq_Impl = lazy + (gen_constant_in_modules "ZMicromega" + [["Coq" ; "micromega" ; "Tauto"];["Tauto"]] "I") + let coq_Formula = lazy + (gen_constant_in_modules "ZMicromega" + [["Coq" ; "micromega" ; "Tauto"];["Tauto"]] "BFormula") + + let dump_formula typ dump_atom f = + let rec xdump f = + match f with + | TT -> mkApp(Lazy.force coq_TT,[| typ|]) + | FF -> mkApp(Lazy.force coq_FF,[| typ|]) + | C(x,y,_) -> mkApp(Lazy.force coq_And,[| typ ; xdump x ; xdump y|]) + | D(x,y,_) -> mkApp(Lazy.force coq_Or,[| typ ; xdump x ; xdump y|]) + | I(x,y,_) -> mkApp(Lazy.force coq_Impl,[| typ ; xdump x ; xdump y|]) + | N(x,_) -> mkApp(Lazy.force coq_Neg,[| typ ; xdump x|]) + | A(x,_) -> mkApp(Lazy.force coq_Atom,[| typ ; dump_atom x|]) + | X(t) -> mkApp(Lazy.force coq_X,[| typ ; t|]) in + + xdump f + + + (* Backward compat *) + + let rec parse_concl parse_arith env term = + match kind_of_term term with + | Prod(_,expr,rst) -> (* a -> b *) + let (lhs,rhs,env) = parse_concl parse_arith env rst in + let (e,env) = parse_arith env expr in + (Mc.Cons(e,lhs),rhs,env) + | App(_,_) -> + let (conj, env) = parse_conj parse_arith env term in + (Mc.Nil,conj,env) + | Ind(n,_) -> + (match (Names.string_of_kn n) with + | "Coq.Init.Logic#<>#False" -> (Mc.Nil,Mc.Nil,env) + | s -> + print_string s ; flush stdout; + failwith "parse_concl") + | _ -> failwith "parse_concl" + + + let rec parse_hyps parse_arith env goal_hyps hyps = + match hyps with + | [] -> ([],goal_hyps,env) + | (i,t)::l -> + let (li,lt,env) = parse_hyps parse_arith env goal_hyps l in + try + let (c,env) = parse_arith env t in + (i::li, Mc.Cons(c,lt), env) + with x -> + (*(if debug then Printf.printf "parse_arith : %s\n" x);*) + (li,lt,env) + + + let parse_goal parse_arith env hyps term = + try + let (lhs,rhs,env) = parse_concl parse_arith env term in + let (li,lt,env) = parse_hyps parse_arith env lhs hyps in + (li,lt,rhs,env) + with Failure x -> raise ParseError + (* backward compat *) + + + (* ! reverse the list of bindings *) + let set l concl = + let rec _set acc = function + | [] -> acc + | (e::l) -> + let (name,expr,typ) = e in + _set (Term.mkNamedLetIn + (Names.id_of_string name) + expr typ acc) l in + _set concl l + + +end + +open M + + +let rec sig_of_cone = function + | Mc.S_In n -> [CoqToCaml.nat n] + | Mc.S_Ideal(e,w) -> sig_of_cone w + | Mc.S_Mult(w1,w2) -> + (sig_of_cone w1)@(sig_of_cone w2) + | Mc.S_Add(w1,w2) -> (sig_of_cone w1)@(sig_of_cone w2) + | _ -> [] + +let same_proof sg cl1 cl2 = + let cl1 = CoqToCaml.list (fun x -> x) cl1 in + let cl2 = CoqToCaml.list (fun x -> x) cl2 in + let rec xsame_proof sg = + match sg with + | [] -> true + | n::sg -> (try List.nth cl1 n = List.nth cl2 n with _ -> false) + && (xsame_proof sg ) in + xsame_proof sg + + + + +let tags_of_clause tgs wit clause = + let rec xtags tgs = function + | Mc.S_In n -> Names.Idset.union tgs + (snd (List.nth clause (CoqToCaml.nat n) )) + | Mc.S_Ideal(e,w) -> xtags tgs w + | Mc.S_Mult (w1,w2) | Mc.S_Add(w1,w2) -> xtags (xtags tgs w1) w2 + | _ -> tgs in + xtags tgs wit + +let tags_of_cnf wits cnf = + List.fold_left2 (fun acc w cl -> tags_of_clause acc w cl) + Names.Idset.empty wits cnf + + +let find_witness prover polys1 = + let l = CoqToCaml.list (fun x -> x) polys1 in + try_any prover l + +let rec witness prover l1 l2 = + match l2 with + | Micromega.Nil -> Some (Micromega.Nil) + | Micromega.Cons(e,l2) -> + match find_witness prover (Micromega.Cons( e,l1)) with + | None -> None + | Some w -> + (match witness prover l1 l2 with + | None -> None + | Some l -> Some (Micromega.Cons (w,l)) + ) + + +let rec apply_ids t ids = + match ids with + | [] -> t + | i::ids -> apply_ids (Term.mkApp(t,[| Term.mkVar i |])) ids + + +let coq_Node = lazy + (Coqlib.gen_constant_in_modules "VarMap" + [["Coq" ; "micromega" ; "VarMap"];["VarMap"]] "Node") +let coq_Leaf = lazy + (Coqlib.gen_constant_in_modules "VarMap" + [["Coq" ; "micromega" ; "VarMap"];["VarMap"]] "Leaf") +let coq_Empty = lazy + (Coqlib.gen_constant_in_modules "VarMap" + [["Coq" ; "micromega" ;"VarMap"];["VarMap"]] "Empty") + + +let btree_of_array typ a = + let size_of_a = Array.length a in + let semi_size_of_a = size_of_a lsr 1 in + let node = Lazy.force coq_Node + and leaf = Lazy.force coq_Leaf + and empty = Term.mkApp (Lazy.force coq_Empty, [| typ |]) in + let rec aux n = + if n > size_of_a + then empty + else if n > semi_size_of_a + then Term.mkApp (leaf, [| typ; a.(n-1) |]) + else Term.mkApp (node, [| typ; aux (2*n); a.(n-1); aux (2*n+1) |]) + in + aux 1 + +let btree_of_array typ a = + try + btree_of_array typ a + with x -> + failwith (Printf.sprintf "btree of array : %s" (Printexc.to_string x)) + +let dump_varmap typ env = + btree_of_array typ (Array.of_list env) + + +let rec pp_varmap o vm = + match vm with + | Mc.Empty -> output_string o "[]" + | Mc.Leaf z -> Printf.fprintf o "[%a]" pp_z z + | Mc.Node(l,z,r) -> Printf.fprintf o "[%a, %a, %a]" pp_varmap l pp_z z pp_varmap r + + + +let rec dump_proof_term = function + | Micromega.RatProof cone -> + Term.mkApp(Lazy.force coq_ratProof, [|dump_cone coq_Z dump_z cone|]) + | Micromega.CutProof(e,q,cone,prf) -> + Term.mkApp(Lazy.force coq_cutProof, + [| dump_expr (Lazy.force coq_Z) dump_z e ; + dump_q q ; + dump_cone coq_Z dump_z cone ; + dump_proof_term prf|]) + | Micromega.EnumProof( q1,e1,q2,c1,c2,prfs) -> + Term.mkApp (Lazy.force coq_enumProof, + [| dump_q q1 ; dump_expr (Lazy.force coq_Z) dump_z e1 ; dump_q q2; + dump_cone coq_Z dump_z c1 ; dump_cone coq_Z dump_z c2 ; + dump_list (Lazy.force coq_proofTerm) dump_proof_term prfs |]) + +let pp_q o q = Printf.fprintf o "%a/%a" pp_z q.Micromega.qnum pp_positive q.Micromega.qden + + +let rec pp_proof_term o = function + | Micromega.RatProof cone -> Printf.fprintf o "R[%a]" (pp_cone pp_z) cone + | Micromega.CutProof(e,q,_,p) -> failwith "not implemented" + | Micromega.EnumProof(q1,e1,q2,c1,c2,rst) -> + Printf.fprintf o "EP[%a,%a,%a,%a,%a,%a]" + pp_q q1 pp_expr e1 pp_q q2 (pp_cone pp_z) c1 (pp_cone pp_z) c2 + (pp_list "[" "]" pp_proof_term) rst + +let rec parse_hyps parse_arith env hyps = + match hyps with + | [] -> ([],env) + | (i,t)::l -> + let (lhyps,env) = parse_hyps parse_arith env l in + try + let (c,env) = parse_formula parse_arith env t in + ((i,c)::lhyps, env) + with _ -> (lhyps,env) + (*(if debug then Printf.printf "parse_arith : %s\n" x);*) + + +exception ParseError + +let parse_goal parse_arith env hyps term = + (* try*) + let (f,env) = parse_formula parse_arith env term in + let (lhyps,env) = parse_hyps parse_arith env hyps in + (lhyps,f,env) + (* with Failure x -> raise ParseError*) + + +type ('a, 'b) domain_spec = { + typ : Term.constr; (* Z, Q , R *) + coeff : Term.constr ; (* Z, Q *) + dump_coeff : 'a -> Term.constr ; + proof_typ : Term.constr ; + dump_proof : 'b -> Term.constr +} + +let zz_domain_spec = lazy { + typ = Lazy.force coq_Z; + coeff = Lazy.force coq_Z; + dump_coeff = dump_z ; + proof_typ = Lazy.force coq_proofTerm ; + dump_proof = dump_proof_term +} + +let qq_domain_spec = lazy { + typ = Lazy.force coq_Q; + coeff = Lazy.force coq_Q; + dump_coeff = dump_q ; + proof_typ = Lazy.force coq_QWitness ; + dump_proof = dump_cone coq_Q dump_q +} + +let rz_domain_spec = lazy { + typ = Lazy.force coq_R; + coeff = Lazy.force coq_Z; + dump_coeff = dump_z; + proof_typ = Lazy.force coq_ZWitness ; + dump_proof = dump_cone coq_Z dump_z +} + + + + +let micromega_order_change spec cert cert_typ env ff gl = + let formula_typ = (Term.mkApp( Lazy.force coq_Cstr,[| spec.coeff|])) in + + let ff = dump_formula formula_typ (dump_cstr spec.coeff spec.dump_coeff) ff in + let vm = dump_varmap ( spec.typ) env in + Tactics.change_in_concl None + (set + [ + ("__ff", ff, Term.mkApp(Lazy.force coq_Formula ,[| formula_typ |])); + ("__varmap", vm , Term.mkApp + (Coqlib.gen_constant_in_modules "VarMap" + [["Coq" ; "micromega" ; "VarMap"];["VarMap"]] "t", [| spec.typ|])); + ("__wit", cert,cert_typ) + ] + (Tacmach.pf_concl gl ) + + ) + gl + + +let detect_duplicates cnf wit = + let cnf = CoqToCaml.list (fun x -> x) cnf in + let wit = CoqToCaml.list (fun x -> x) wit in + + let rec xdup cnf wit = + match wit with + | [] -> [] + | w :: wit -> + let sg = sig_of_cone w in + match cnf with + | [] -> [] + | e::cnf -> + let (dups,cnf) = (List.partition (fun x -> same_proof sg e x) cnf) in + dups@(xdup cnf wit) in + xdup cnf wit + +let find_witness prover polys1 = + try_any prover polys1 + + +let witness_list_with_tags prover l = + + let rec xwitness_list l = + match l with + | [] -> Some([]) + | e::l -> + match find_witness prover (List.map fst e) with + | None -> None + | Some w -> + (match xwitness_list l with + | None -> None + | Some l -> Some (w::l) + ) in + xwitness_list l + +let witness_list_without_tags prover l = + + let rec xwitness_list l = + match l with + | [] -> Some([]) + | e::l -> + match find_witness prover e with + | None -> None + | Some w -> + (match xwitness_list l with + | None -> None + | Some l -> Some (w::l) + ) in + xwitness_list l + +let witness_list prover l = + let rec xwitness_list l = + match l with + | Micromega.Nil -> Some(Micromega.Nil) + | Micromega.Cons(e,l) -> + match find_witness prover e with + | None -> None + | Some w -> + (match xwitness_list l with + | None -> None + | Some l -> Some (Micromega.Cons(w,l)) + ) in + xwitness_list l + + + + +let is_singleton = function [] -> true | [e] -> true | _ -> false + + +let micromega_tauto negate normalise spec prover env polys1 polys2 gl = + let spec = Lazy.force spec in + let (ff,ids) = + List.fold_right + (fun (id,f) (cc,ids) -> + match f with + X _ -> (cc,ids) + | _ -> (I(tag_formula (Names.Name id) f,cc,none), id::ids)) + polys1 (polys2,[]) in + + let cnf_ff = cnf negate normalise ff in + + if debug then + (Pp.pp (Pp.str "Formula....\n") ; + let formula_typ = (Term.mkApp( Lazy.force coq_Cstr,[| spec.coeff|])) in + let ff = dump_formula formula_typ + (dump_cstr spec.typ spec.dump_coeff) ff in + Pp.pp (Printer.prterm ff) ; Pp.pp_flush ()) ; + + match witness_list_without_tags prover cnf_ff with + | None -> Tacticals.tclFAIL 0 (Pp.str "Cannot find witness") gl + | Some res -> (*Printf.printf "\nList %i" (List.length res); *) + let (ff,res,ids) = (ff,res,List.map Term.mkVar ids) in + let res' = dump_ml_list (spec.proof_typ) spec.dump_proof res in + (Tacticals.tclTHENSEQ + [ + Tactics.generalize ids; + micromega_order_change spec res' + (Term.mkApp(Lazy.force coq_list,[| spec.proof_typ|])) env ff ; + ]) gl + + +let micromega_gen parse_arith negate normalise spec prover gl = + let concl = Tacmach.pf_concl gl in + let hyps = Tacmach.pf_hyps_types gl in + try + let (hyps,concl,env) = parse_goal parse_arith Env.empty hyps concl in + let env = Env.elements env in + micromega_tauto negate normalise spec prover env hyps concl gl + with + | Failure x -> flush stdout ; Pp.pp_flush () ; + Tacticals.tclFAIL 0 (Pp.str x) gl + | ParseError -> Tacticals.tclFAIL 0 (Pp.str "Bad logical fragment") gl + + +let lift_ratproof prover l = + match prover l with + | None -> None + | Some c -> Some (Mc.RatProof c) + + +type csdpcert = Certificate.Mc.z Certificate.Mc.coneMember option +type micromega_polys = (Micromega.z Mc.pExpr, Mc.op1) Micromega.prod list +type provername = string * int option + +let call_csdpcert provername poly = + let tmp_to,ch_to = Filename.open_temp_file "csdpcert" ".in" in + let tmp_from = Filename.temp_file "csdpcert" ".out" in + output_value ch_to (provername,poly : provername * micromega_polys); + close_out ch_to; + let cmdname = + Filename.concat Coq_config.bindir + ("csdpcert" ^ Coq_config.exec_extension) in + let c = Sys.command (cmdname ^" "^ tmp_to ^" "^ tmp_from) in + (try Sys.remove tmp_to with _ -> ()); + if c <> 0 then Util.error ("Failed to call csdp certificate generator"); + let ch_from = open_in tmp_from in + let cert = (input_value ch_from : csdpcert) in + close_in ch_from; Sys.remove tmp_from; + cert + +let omicron gl = + micromega_gen parse_zarith Mc.negate Mc.normalise zz_domain_spec + [lift_ratproof + (Certificate.linear_prover Certificate.z_spec), "fourier refutation" ] gl + + +let qomicron gl = + micromega_gen parse_qarith Mc.cnf_negate Mc.cnf_normalise qq_domain_spec + [ Certificate.linear_prover Certificate.q_spec, "fourier refutation" ] gl + +let romicron gl = + micromega_gen parse_rarith Mc.cnf_negate Mc.cnf_normalise rz_domain_spec + [ Certificate.linear_prover Certificate.z_spec, "fourier refutation" ] gl + + +let rmicromega i gl = + micromega_gen parse_rarith Mc.negate Mc.normalise rz_domain_spec + [ call_csdpcert ("real_nonlinear_prover", Some i), "fourier refutation" ] gl + + +let micromega i gl = + micromega_gen parse_zarith Mc.negate Mc.normalise zz_domain_spec + [lift_ratproof (call_csdpcert ("real_nonlinear_prover",Some i)), + "fourier refutation" ] gl + + +let sos gl = + micromega_gen parse_zarith Mc.negate Mc.normalise zz_domain_spec + [lift_ratproof (call_csdpcert ("pure_sos", None)), "pure sos refutation"] gl + +let zomicron gl = + micromega_gen parse_zarith Mc.negate Mc.normalise zz_domain_spec + [Certificate.zlinear_prover, "zprover"] gl diff --git a/contrib/micromega/csdpcert.ml b/contrib/micromega/csdpcert.ml new file mode 100644 index 00000000..cfaf6ae1 --- /dev/null +++ b/contrib/micromega/csdpcert.ml @@ -0,0 +1,333 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Const (Big_int (C2Ml.z_big_int z)) + | PEX v -> Var ("x"^(string_of_int (C2Ml.index v))) + | PEmul(p1,p2) -> + let p1 = expr_to_term p1 in + let p2 = expr_to_term p2 in + let res = Mul(p1,p2) in res + + | PEadd(p1,p2) -> Add(expr_to_term p1, expr_to_term p2) + | PEsub(p1,p2) -> Sub(expr_to_term p1, expr_to_term p2) + | PEpow(p,n) -> Pow(expr_to_term p , C2Ml.n n) + | PEopp p -> Opp (expr_to_term p) + + + let rec term_to_expr = function + | Const n -> PEc (Ml2C.bigint (big_int_of_num n)) + | Zero -> PEc ( Z0) + | Var s -> PEX (Ml2C.index + (int_of_string (String.sub s 1 (String.length s - 1)))) + | Mul(p1,p2) -> PEmul(term_to_expr p1, term_to_expr p2) + | Add(p1,p2) -> PEadd(term_to_expr p1, term_to_expr p2) + | Opp p -> PEopp (term_to_expr p) + | Pow(t,n) -> PEpow (term_to_expr t,Ml2C.n n) + | Sub(t1,t2) -> PEsub (term_to_expr t1, term_to_expr t2) + | _ -> failwith "term_to_expr: not implemented" + + let term_to_expr e = + let e' = term_to_expr e in + if debug + then Printf.printf "term_to_expr : %s - %s\n" + (string_of_poly (poly_of_term e)) + (string_of_poly (poly_of_term (expr_to_term e'))); + e' + +end +open M + +open List +open Mutils + +let rec scale_term t = + match t with + | Zero -> unit_big_int , Zero + | Const n -> (denominator n) , Const (Big_int (numerator n)) + | Var n -> unit_big_int , Var n + | Inv _ -> failwith "scale_term : not implemented" + | Opp t -> let s, t = scale_term t in s, Opp t + | Add(t1,t2) -> let s1,y1 = scale_term t1 and s2,y2 = scale_term t2 in + let g = gcd_big_int s1 s2 in + let s1' = div_big_int s1 g in + let s2' = div_big_int s2 g in + let e = mult_big_int g (mult_big_int s1' s2') in + if (compare_big_int e unit_big_int) = 0 + then (unit_big_int, Add (y1,y2)) + else e, Add (Mul(Const (Big_int s2'), y1), + Mul (Const (Big_int s1'), y2)) + | Sub _ -> failwith "scale term: not implemented" + | Mul(y,z) -> let s1,y1 = scale_term y and s2,y2 = scale_term z in + mult_big_int s1 s2 , Mul (y1, y2) + | Pow(t,n) -> let s,t = scale_term t in + power_big_int_positive_int s n , Pow(t,n) + | _ -> failwith "scale_term : not implemented" + +let scale_term t = + let (s,t') = scale_term t in + s,t' + + + + +let rec scale_certificate pos = match pos with + | Axiom_eq i -> unit_big_int , Axiom_eq i + | Axiom_le i -> unit_big_int , Axiom_le i + | Axiom_lt i -> unit_big_int , Axiom_lt i + | Monoid l -> unit_big_int , Monoid l + | Rational_eq n -> (denominator n) , Rational_eq (Big_int (numerator n)) + | Rational_le n -> (denominator n) , Rational_le (Big_int (numerator n)) + | Rational_lt n -> (denominator n) , Rational_lt (Big_int (numerator n)) + | Square t -> let s,t' = scale_term t in + mult_big_int s s , Square t' + | Eqmul (t, y) -> let s1,y1 = scale_term t and s2,y2 = scale_certificate y in + mult_big_int s1 s2 , Eqmul (y1,y2) + | Sum (y, z) -> let s1,y1 = scale_certificate y + and s2,y2 = scale_certificate z in + let g = gcd_big_int s1 s2 in + let s1' = div_big_int s1 g in + let s2' = div_big_int s2 g in + mult_big_int g (mult_big_int s1' s2'), + Sum (Product(Rational_le (Big_int s2'), y1), + Product (Rational_le (Big_int s1'), y2)) + | Product (y, z) -> + let s1,y1 = scale_certificate y and s2,y2 = scale_certificate z in + mult_big_int s1 s2 , Product (y1,y2) + + +let is_eq = function Mc.Equal -> true | _ -> false +let is_le = function Mc.NonStrict -> true | _ -> false +let is_lt = function Mc.Strict -> true | _ -> false + +let get_index_of_ith_match f i l = + let rec get j res l = + match l with + | [] -> failwith "bad index" + | e::l -> if f e + then + (if j = i then res else get (j+1) (res+1) l ) + else get j (res+1) l in + get 0 0 l + + +let cert_of_pos eq le lt ll l pos = + let s,pos = (scale_certificate pos) in + let rec _cert_of_pos = function + Axiom_eq i -> let idx = get_index_of_ith_match is_eq i l in + Mc.S_In (Ml2C.nat idx) + | Axiom_le i -> let idx = get_index_of_ith_match is_le i l in + Mc.S_In (Ml2C.nat idx) + | Axiom_lt i -> let idx = get_index_of_ith_match is_lt i l in + Mc.S_In (Ml2C.nat idx) + | Monoid l -> Mc.S_Monoid (Ml2C.list Ml2C.nat l) + | Rational_eq n | Rational_le n | Rational_lt n -> + if compare_num n (Int 0) = 0 then Mc.S_Z else + Mc.S_Pos (Ml2C.bigint (big_int_of_num n)) + | Square t -> Mc.S_Square (term_to_expr t) + | Eqmul (t, y) -> Mc.S_Ideal(term_to_expr t, _cert_of_pos y) + | Sum (y, z) -> Mc.S_Add (_cert_of_pos y, _cert_of_pos z) + | Product (y, z) -> Mc.S_Mult (_cert_of_pos y, _cert_of_pos z) in + s, Certificate.simplify_cone Certificate.z_spec (_cert_of_pos pos) + + +let term_of_cert l pos = + let l = List.map fst' l in + let rec _cert_of_pos = function + | Mc.S_In i -> expr_to_term (List.nth l (C2Ml.nat i)) + | Mc.S_Pos p -> Const (C2Ml.num p) + | Mc.S_Z -> Const (Int 0) + | Mc.S_Square t -> Mul(expr_to_term t, expr_to_term t) + | Mc.S_Monoid m -> List.fold_right + (fun x m -> Mul (expr_to_term (List.nth l (C2Ml.nat x)),m)) + (C2Ml.list (fun x -> x) m) (Const (Int 1)) + | Mc.S_Ideal (t, y) -> Mul(expr_to_term t, _cert_of_pos y) + | Mc.S_Add (y, z) -> Add (_cert_of_pos y, _cert_of_pos z) + | Mc.S_Mult (y, z) -> Mul (_cert_of_pos y, _cert_of_pos z) in + (_cert_of_pos pos) + +let rec canonical_sum_to_string = function s -> failwith "not implemented" + +let print_canonical_sum m = Format.print_string (canonical_sum_to_string m) + +let print_list_term l = + print_string "print_list_term\n"; + List.iter (fun (Mc.Pair(e,k)) -> Printf.printf "q: %s %s ;" + (string_of_poly (poly_of_term (expr_to_term e))) + (match k with + Mc.Equal -> "= " + | Mc.Strict -> "> " + | Mc.NonStrict -> ">= " + | _ -> failwith "not_implemented")) l ; + print_string "\n" + + +let partition_expr l = + let rec f i = function + | [] -> ([],[],[]) + | Mc.Pair(e,k)::l -> + let (eq,ge,neq) = f (i+1) l in + match k with + | Mc.Equal -> ((e,i)::eq,ge,neq) + | Mc.NonStrict -> (eq,(e,Axiom_le i)::ge,neq) + | Mc.Strict -> (* e > 0 == e >= 0 /\ e <> 0 *) + (eq, (e,Axiom_lt i)::ge,(e,Axiom_lt i)::neq) + | Mc.NonEqual -> (eq,ge,(e,Axiom_eq i)::neq) + (* Not quite sure -- Coq interface has changed *) + in f 0 l + + +let rec sets_of_list l = + match l with + | [] -> [[]] + | e::l -> let s = sets_of_list l in + s@(List.map (fun s0 -> e::s0) s) + +let cert_of_pos pos = + let s,pos = (scale_certificate pos) in + let rec _cert_of_pos = function + Axiom_eq i -> Mc.S_In (Ml2C.nat i) + | Axiom_le i -> Mc.S_In (Ml2C.nat i) + | Axiom_lt i -> Mc.S_In (Ml2C.nat i) + | Monoid l -> Mc.S_Monoid (Ml2C.list Ml2C.nat l) + | Rational_eq n | Rational_le n | Rational_lt n -> + if compare_num n (Int 0) = 0 then Mc.S_Z else + Mc.S_Pos (Ml2C.bigint (big_int_of_num n)) + | Square t -> Mc.S_Square (term_to_expr t) + | Eqmul (t, y) -> Mc.S_Ideal(term_to_expr t, _cert_of_pos y) + | Sum (y, z) -> Mc.S_Add (_cert_of_pos y, _cert_of_pos z) + | Product (y, z) -> Mc.S_Mult (_cert_of_pos y, _cert_of_pos z) in + s, Certificate.simplify_cone Certificate.z_spec (_cert_of_pos pos) + +(* The exploration is probably not complete - for simple cases, it works... *) +let real_nonlinear_prover d l = + try + let (eq,ge,neq) = partition_expr l in + + let rec elim_const = function + [] -> [] + | (x,y)::l -> let p = poly_of_term (expr_to_term x) in + if poly_isconst p + then elim_const l + else (p,y)::(elim_const l) in + + let eq = elim_const eq in + let peq = List.map fst eq in + + let pge = List.map + (fun (e,psatz) -> poly_of_term (expr_to_term e),psatz) ge in + + let monoids = List.map (fun m -> (List.fold_right (fun (p,kd) y -> + let p = poly_of_term (expr_to_term p) in + match kd with + | Axiom_lt i -> poly_mul p y + | Axiom_eq i -> poly_mul (poly_pow p 2) y + | _ -> failwith "monoids") m (poly_const (Int 1)) , map snd m)) + (sets_of_list neq) in + + let (cert_ideal, cert_cone,monoid) = deepen_until d (fun d -> + list_try_find (fun m -> let (ci,cc) = + real_positivnullstellensatz_general false d peq pge (poly_neg (fst m) ) in + (ci,cc,snd m)) monoids) 0 in + + let proofs_ideal = map2 (fun q i -> Eqmul(term_of_poly q,Axiom_eq i)) + cert_ideal (List.map snd eq) in + + let proofs_cone = map term_of_sos cert_cone in + + let proof_ne = + let (neq , lt) = List.partition + (function Axiom_eq _ -> true | _ -> false ) monoid in + let sq = match + (List.map (function Axiom_eq i -> i | _ -> failwith "error") neq) + with + | [] -> Rational_lt (Int 1) + | l -> Monoid l in + List.fold_right (fun x y -> Product(x,y)) lt sq in + + let proof = list_fold_right_elements + (fun s t -> Sum(s,t)) (proof_ne :: proofs_ideal @ proofs_cone) in + + let s,proof' = scale_certificate proof in + let cert = snd (cert_of_pos proof') in + if debug + then Printf.printf "cert poly : %s\n" + (string_of_poly (poly_of_term (term_of_cert l cert))); + match Mc.zWeakChecker (Ml2C.list (fun x -> x) l) cert with + | Mc.True -> Some cert + | Mc.False -> (print_string "buggy certificate" ; flush stdout) ;None + with + | Sos.TooDeep -> None + + +(* This is somewhat buggy, over Z, strict inequality vanish... *) +let pure_sos l = + (* If there is no strict inequality, + I should nonetheless be able to try something - over Z > is equivalent to -1 >= *) + try + let l = List.combine l (interval 0 (length l -1)) in + let (lt,i) = try (List.find (fun (x,_) -> snd' x = Mc.Strict) l) + with Not_found -> List.hd l in + let plt = poly_neg (poly_of_term (expr_to_term (fst' lt))) in + let (n,polys) = sumofsquares plt in (* n * (ci * pi^2) *) + let pos = Product (Rational_lt n, + List.fold_right (fun (c,p) rst -> Sum (Product (Rational_lt c, Square + (term_of_poly p)), rst)) + polys (Rational_lt (Int 0))) in + let proof = Sum(Axiom_lt i, pos) in + let s,proof' = scale_certificate proof in + let cert = snd (cert_of_pos proof') in + Some cert + with + | Not_found -> (* This is no strict inequality *) None + | x -> None + + +type micromega_polys = (Micromega.z Mc.pExpr, Mc.op1) Micromega.prod list +type csdp_certificate = Certificate.Mc.z Certificate.Mc.coneMember option +type provername = string * int option + +let main () = + if Array.length Sys.argv <> 3 then + (Printf.printf "Usage: csdpcert inputfile outputfile\n"; exit 1); + let input_file = Sys.argv.(1) in + let output_file = Sys.argv.(2) in + let inch = open_in input_file in + let (prover,poly) = (input_value inch : provername * micromega_polys) in + close_in inch; + let cert = + match prover with + | "real_nonlinear_prover", Some d -> real_nonlinear_prover d poly + | "pure_sos", None -> pure_sos poly + | prover, _ -> (Printf.printf "unknown prover: %s\n" prover; exit 1) in + let outch = open_out output_file in + output_value outch (cert:csdp_certificate); + close_out outch; + exit 0;; + +let _ = main () in () diff --git a/contrib/micromega/g_micromega.ml4 b/contrib/micromega/g_micromega.ml4 new file mode 100644 index 00000000..259b5d4b --- /dev/null +++ b/contrib/micromega/g_micromega.ml4 @@ -0,0 +1,59 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* anomaly "Unevaluated or_var variable" + | ArgArg x -> x + +TACTIC EXTEND Micromega +| [ "micromegap" int_or_var(i) ] -> [ Coq_micromega.micromega (out_arg i) ] +| [ "micromegap" ] -> [ Coq_micromega.micromega (-1) ] +END + +TACTIC EXTEND Sos +[ "sosp" ] -> [ Coq_micromega.sos] +END + + +TACTIC EXTEND Omicron +[ "omicronp" ] -> [ Coq_micromega.omicron] +END + +TACTIC EXTEND QOmicron +[ "qomicronp" ] -> [ Coq_micromega.qomicron] +END + + +TACTIC EXTEND ZOmicron +[ "zomicronp" ] -> [ Coq_micromega.zomicron] +END + +TACTIC EXTEND ROmicron +[ "romicronp" ] -> [ Coq_micromega.romicron] +END + +TACTIC EXTEND RMicromega +| [ "rmicromegap" int_or_var(i) ] -> [ Coq_micromega.rmicromega (out_arg i) ] +| [ "rmicromegap" ] -> [ Coq_micromega.rmicromega (-1) ] +END diff --git a/contrib/micromega/mfourier.ml b/contrib/micromega/mfourier.ml new file mode 100644 index 00000000..415d3a3e --- /dev/null +++ b/contrib/micromega/mfourier.ml @@ -0,0 +1,667 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* 0 (* Equal *) + | f::l -> + let cmp = f () in + if cmp = 0 then compare_lexical l else cmp + + let rec compare_list cmp l1 l2 = + match l1 , l2 with + | [] , [] -> 0 + | [] , _ -> -1 + | _ , [] -> 1 + | e1::l1 , e2::l2 -> + let c = cmp e1 e2 in + if c = 0 then compare_list cmp l1 l2 else c + + let hash_list hash l = + let rec xhash res l = + match l with + | [] -> res + | e::l -> xhash ((hash e) lxor res) l in + xhash (Hashtbl.hash []) l + +end + +module Interval = +struct + (** The type of intervals. **) + type intrvl = Empty | Point of num | Itv of num option * num option + + (** + Different intervals can denote the same set of variables e.g., + Point n && Itv (Some n, Some n) + Itv (Some x) (Some y) && Empty if x > y + see the 'belongs_to' function. + **) + + (* The set of numerics that belong to an interval *) + let belongs_to n = function + | Empty -> false + | Point x -> n =/ x + | Itv(Some x, Some y) -> x <=/ n && n <=/ y + | Itv(None,Some y) -> n <=/ y + | Itv(Some x,None) -> x <=/ n + | Itv(None,None) -> true + + let string_of_bound = function + | None -> "oo" + | Some n -> Printf.sprintf "Bd(%s)" (string_of_num n) + + let string_of_intrvl = function + | Empty -> "[]" + | Point n -> Printf.sprintf "[%s]" (string_of_num n) + | Itv(bd1,bd2) -> + Printf.sprintf "[%s,%s]" (string_of_bound bd1) (string_of_bound bd2) + + let pick_closed_to_zero = function + | Empty -> None + | Point n -> Some n + | Itv(None,None) -> Some (Int 0) + | Itv(None,Some i) -> + Some (if (Int 0) <=/ (floor_num i) then Int 0 else floor_num i) + | Itv(Some i,None) -> + Some (if i <=/ (Int 0) then Int 0 else ceiling_num i) + | Itv(Some i,Some j) -> + Some ( + if i <=/ Int 0 && Int 0 <=/ j + then Int 0 + else if ceiling_num i <=/ floor_num j + then ceiling_num i (* why not *) else i) + + type status = + | O | Qonly | Z | Q + + let interval_kind = function + | Empty -> O + | Point n -> if ceiling_num n =/ n then Z else Qonly + | Itv(None,None) -> Z + | Itv(None,Some i) -> if ceiling_num i <>/ i then Q else Z + | Itv(Some i,None) -> if ceiling_num i <>/ i then Q else Z + | Itv(Some i,Some j) -> + if ceiling_num i <>/ i or floor_num j <>/ j then Q else Z + + let empty_z = function + | Empty -> true + | Point n -> ceiling_num n <>/ n + | Itv(None,None) | Itv(None,Some _) | Itv(Some _,None) -> false + | Itv(Some i,Some j) -> ceiling_num i >/ floor_num j + + + let normalise b1 b2 = + match b1 , b2 with + | Some i , Some j -> + (match compare_num i j with + | 1 -> Empty + | 0 -> Point i + | _ -> Itv(b1,b2) + ) + | _ -> Itv(b1,b2) + + + + let min x y = + match x , y with + | None , x | x , None -> x + | Some i , Some j -> Some (min_num i j) + + let max x y = + match x , y with + | None , x | x , None -> x + | Some i , Some j -> Some (max_num i j) + + let inter i1 i2 = + match i1,i2 with + | Empty , _ -> Empty + | _ , Empty -> Empty + | Point n , Point m -> if n =/ m then i1 else Empty + | Point n , Itv (mn,mx) | Itv (mn,mx) , Point n-> + if (match mn with + | None -> true + | Some mn -> mn <=/ n) && + (match mx with + | None -> true + | Some mx -> n <=/ mx) then Point n else Empty + | Itv (min1,max1) , Itv (min2,max2) -> + let bmin = max min1 min2 + and bmax = min max1 max2 in + normalise bmin bmax + + (* a.x >= b*) + let bound_of_constraint (a,b) = + match compare_num a (Int 0) with + | 0 -> + if compare_num b (Int 0) = 1 + then Empty + (*actually this is a contradiction failwith "bound_of_constraint" *) + else Itv (None,None) + | 1 -> Itv (Some (div_num b a),None) + | -1 -> Itv (None, Some (div_num b a)) + | x -> failwith "bound_of_constraint(2)" + + + let bounded x = + match x with + | Itv(None,_) | Itv(_,None) -> false + | _ -> true + + + let range = function + | Empty -> Some (Int 0) + | Point n -> Some (Int (if ceiling_num n =/ n then 1 else 0)) + | Itv(None,_) | Itv(_,None)-> None + | Itv(Some i,Some j) -> Some (floor_num j -/ceiling_num i +/ (Int 1)) + + (* Returns the interval of smallest range *) + let smaller_itv i1 i2 = + match range i1 , range i2 with + | None , _ -> false + | _ , None -> true + | Some i , Some j -> i <=/ j + +end +open Interval + +(* A set of constraints *) +module Sys(V:Vector.S) (* : Vector.SystemS with module Vect = V*) = +struct + + module Vect = V + + module Cstr = Vector.Cstr(V) + open Cstr + + + module CMap = Map.Make( + struct + type t = Vect.t + let compare = Vect.compare + end) + + module CstrBag = + struct + + type mut_itv = { mutable itv : intrvl} + + type t = mut_itv CMap.t + + exception Contradiction + + let cstr_to_itv cstr = + let (n,l) = V.normalise cstr.coeffs in + if n =/ (Int 0) + then (Vect.null, bound_of_constraint (Int 0,cstr.cst)) (* Might be empty *) + else + match cstr.op with + | Eq -> let n = cstr.cst // n in (l, Point n) + | Ge -> + match compare_num n (Int 0) with + | 0 -> failwith "intrvl_of_constraint" + | 1 -> (l,Itv (Some (cstr.cst // n), None)) + | -1 -> (l, Itv(None,Some (cstr.cst // n))) + | _ -> failwith "cstr_to_itv" + + + let empty = CMap.empty + + + + + let is_empty = CMap.is_empty + + let find_vect v bag = + try + (bag,CMap.find v bag) + with Not_found -> let x = { itv = Itv(None,None)} in (CMap.add v x bag ,x) + + + let add (v,b) bag = + match b with + | Empty -> raise Contradiction + | Itv(None,None) -> bag + | _ -> + let (bag,intrl) = find_vect v bag in + match inter b intrl.itv with + | Empty -> raise Contradiction + | itv -> intrl.itv <- itv ; bag + + exception Found of cstr + + let find_equation bag = + try + CMap.fold (fun v i () -> + match i.itv with + | Point n -> let e = {coeffs = v ; op = Eq ; cst = n} + in raise (Found e) + | _ -> () ) bag () ; None + with Found c -> Some c + + + let fold f bag acc = + CMap.fold (fun v itv acc -> + match itv.itv with + | Empty | Itv(None,None) -> failwith "fold Empty" + | Itv(None ,Some i) -> + f {coeffs = V.mul (Int (-1)) v ; op = Ge ; cst = minus_num i} acc + | Point n -> f {coeffs = v ; op = Eq ; cst = n} acc + | Itv(x,y) -> + (match x with + | None -> (fun x -> x) + | Some i -> f {coeffs = v ; op = Ge ; cst = i}) + (match y with + | None -> acc + | Some i -> + f {coeffs = V.mul (Int (-1)) v ; op = Ge ; cst = minus_num i} acc + ) ) bag acc + + + let remove l _ = failwith "remove:Not implemented" + + module Map = + Map.Make( + struct + type t = int + let compare : int -> int -> int = Pervasives.compare + end) + + let split f (t:t) = + let res = + fold (fun e m -> let i = f e in + Map.add i (add (cstr_to_itv e) + (try Map.find i m with + Not_found -> empty)) m) t Map.empty in + (fun i -> try Map.find i res with Not_found -> empty) + + type map = (int list * int list) Map.t + + + let status (b:t) = + let _ , map = fold (fun c ( (idx:int),(res: map)) -> + ( idx + 1, + List.fold_left (fun (res:map) (pos,s) -> + let (lp,ln) = try Map.find pos res with Not_found -> ([],[]) in + match s with + | Vect.Pos -> Map.add pos (idx::lp,ln) res + | Vect.Neg -> + Map.add pos (lp, idx::ln) res) res + (Vect.status c.coeffs))) b (0,Map.empty) in + Map.fold (fun k e res -> (k,e)::res) map [] + + + type it = num CMap.t + + let iterator x = x + + let element it = failwith "element:Not implemented" + + end +end + +module Fourier(Vect : Vector.S) = +struct + module Vect = Vect + module Sys = Sys( Vect) + module Cstr = Sys.Cstr + module Bag = Sys.CstrBag + + open Cstr + open Sys + + let debug = false + + let print_bag msg b = + print_endline msg; + CstrBag.fold (fun e () -> print_endline (Cstr.string_of_cstr e)) b () + + let print_bag_file file msg b = + let f = open_out file in + output_string f msg; + CstrBag.fold (fun e () -> + Printf.fprintf f "%s\n" (Cstr.string_of_cstr e)) b () + + + (* A system with only inequations -- + *) + let partition i m = + let splitter cstr = compare_num (Vect.get i cstr.coeffs ) (Int 0) in + let split = CstrBag.split splitter m in + (split (-1) , split 0, split 1) + + + (* op of the result is arbitrary Ge *) + let lin_comb n1 c1 n2 c2 = + { coeffs = Vect.lin_comb n1 c1.coeffs n2 c2.coeffs ; + op = Ge ; + cst = (n1 */ c1.cst) +/ (n2 */ c2.cst)} + + (* BUG? : operator of the result ? *) + + let combine_project i c1 c2 = + let p = Vect.get i c1.coeffs + and n = Vect.get i c2.coeffs in + assert (n / Int 0) ; + let nopp = minus_num n in + let c =lin_comb nopp c1 p c2 in + let op = if c1.op = Ge || c2.op = Ge then Ge else Eq in + CstrBag.cstr_to_itv {coeffs = c.coeffs ; op = op ; cst= c.cst } + + + let project i m = + let (neg,zero,pos) = partition i m in + let project1 cpos acc = + CstrBag.fold (fun cneg res -> + CstrBag.add (combine_project i cpos cneg) res) neg acc in + (CstrBag.fold project1 pos zero) + + (* Given a vector [x1 -> v1; ... ; xn -> vn] + and a constraint {x1 ; .... xn >= c } + *) + let evaluate_constraint i map cstr = + let {coeffs = _coeffs ; op = _op ; cst = _cst} = cstr in + let vi = Vect.get i _coeffs in + let v = Vect.set i (Int 0) _coeffs in + (vi, _cst -/ Vect.dotp map v) + + + let rec bounds m itv = + match m with + | [] -> itv + | e::m -> bounds m (inter itv (bound_of_constraint e)) + + + + let compare_status (i,(lp,ln)) (i',(lp',ln')) = + let cmp = Pervasives.compare + ((List.length lp) * (List.length ln)) + ((List.length lp') * (List.length ln')) in + if cmp = 0 + then Pervasives.compare i i' + else cmp + + let cardinal m = CstrBag.fold (fun _ x -> x + 1) m 0 + + let lightest_projection l c m = + let bound = c in + if debug then (Printf.printf "l%i" bound; flush stdout) ; + let rec xlight best l = + match l with + | [] -> best + | i::l -> + let proj = (project i m) in + let cproj = cardinal proj in + (*Printf.printf " p %i " cproj; flush stdout;*) + match best with + | None -> + if cproj < bound + then Some(cproj,proj,i) + else xlight (Some(cproj,proj,i)) l + | Some (cbest,_,_) -> + if cproj < cbest + then + if cproj < bound then Some(cproj,proj,i) + else xlight (Some(cproj,proj,i)) l + else xlight best l in + match xlight None l with + | None -> None + | Some(_,p,i) -> Some (p,i) + + + + exception Equality of cstr + + let find_equality m = Bag.find_equation m + + + + let pivot (n,v) eq ge = + assert (eq.op = Eq) ; + let res = + match + compare_num v (Int 0), + compare_num (Vect.get n ge.coeffs) (Int 0) + with + | 0 , _ -> failwith "Buggy" + | _ ,0 -> (CstrBag.cstr_to_itv ge) + | 1 , -1 -> combine_project n eq ge + | -1 , 1 -> combine_project n ge eq + | 1 , 1 -> + combine_project n ge + {coeffs = Vect.mul (Int (-1)) eq.coeffs; + op = eq.op ; + cst = minus_num eq.cst} + | -1 , -1 -> + combine_project n + {coeffs = Vect.mul (Int (-1)) eq.coeffs; + op = eq.op ; cst = minus_num eq.cst} ge + | _ -> failwith "pivot" in + res + + let check_cstr v c = + let {coeffs = _coeffs ; op = _op ; cst = _cst} = c in + let vl = Vect.dotp v _coeffs in + match _op with + | Eq -> vl =/ _cst + | Ge -> vl >= _cst + + + let forall p sys = + try + CstrBag.fold (fun c () -> if p c then () else raise Not_found) sys (); true + with Not_found -> false + + + let check_sys v sys = forall (check_cstr v) sys + + let check_null_cstr c = + let {coeffs = _coeffs ; op = _op ; cst = _cst} = c in + match _op with + | Eq -> (Int 0) =/ _cst + | Ge -> (Int 0) >= _cst + + let check_null sys = forall check_null_cstr sys + + + let optimise_ge + quick_check choose choose_idx return_empty return_ge return_eq m = + let c = cardinal m in + let bound = 2 * c in + if debug then (Printf.printf "optimise_ge: %i\n" c; flush stdout); + + let rec xoptimise m = + if debug then (Printf.printf "x%i" (cardinal m) ; flush stdout); + if debug then (print_bag "xoptimise" m ; flush stdout); + if quick_check m + then return_empty m + else + match find_equality m with + | None -> xoptimise_ge m + | Some eq -> xoptimise_eq eq m + + and xoptimise_ge m = + begin + let c = cardinal m in + let l = List.map fst (List.sort compare_status (CstrBag.status m)) in + let idx = choose bound l c m in + match idx with + | None -> return_empty m + | Some (proj,i) -> + match xoptimise proj with + | None -> None + | Some mapping -> return_ge m i mapping + end + and xoptimise_eq eq m = + let l = List.map fst (Vect.status eq.coeffs) in + match choose_idx l with + | None -> (*if l = [] then None else*) return_empty m + | Some i -> + let p = (i,Vect.get i eq.coeffs) in + let m' = CstrBag.fold + (fun ge res -> CstrBag.add (pivot p eq ge) res) m CstrBag.empty in + match xoptimise ( m') with + | None -> None + | Some mapp -> return_eq m eq i mapp in + try + let res = xoptimise m in res + with CstrBag.Contradiction -> (*print_string "contradiction" ;*) None + + + + let minimise m = + let opt_zero_choose bound l c m = + if c > bound + then lightest_projection l c m + else match l with + | [] -> None + | i::_ -> Some (project i m, i) in + + let choose_idx = function [] -> None | x::l -> Some x in + + let opt_zero_return_empty m = Some Vect.null in + + + let opt_zero_return_ge m i mapping = + let (it:intrvl) = CstrBag.fold (fun cstr itv -> Interval.inter + (bound_of_constraint (evaluate_constraint i mapping cstr)) itv) m + (Itv (None, None)) in + match pick_closed_to_zero it with + | None -> print_endline "Cannot pick" ; None + | Some v -> + let res = (Vect.set i v mapping) in + if debug + then Printf.printf "xoptimise res %i [%s]" i (Vect.string res) ; + Some res in + + let opt_zero_return_eq m eq i mapp = + let (a,b) = evaluate_constraint i mapp eq in + Some (Vect.set i (div_num b a) mapp) in + + optimise_ge check_null opt_zero_choose + choose_idx opt_zero_return_empty opt_zero_return_ge opt_zero_return_eq m + + let normalise cstr = [CstrBag.cstr_to_itv cstr] + + let find_point l = + (* List.iter (fun e -> print_endline (Cstr.string_of_cstr e)) l;*) + try + let m = List.fold_left (fun sys e -> CstrBag.add (CstrBag.cstr_to_itv e) sys) + CstrBag.empty l in + match minimise m with + | None -> None + | Some res -> + if debug then Printf.printf "[%s]" (Vect.string res); + Some res + with CstrBag.Contradiction -> None + + + let find_q_interval_for x m = + if debug then Printf.printf "find_q_interval_for %i\n" x ; + + let choose bound l c m = + let rec xchoose l = + match l with + | [] -> None + | i::l -> if i = x then xchoose l else Some (project i m,i) in + xchoose l in + + let rec choose_idx = function + [] -> None + | e::l -> if e = x then choose_idx l else Some e in + + let return_empty m = (* Beurk *) + (* returns the interval of x *) + Some (CstrBag.fold (fun cstr itv -> + let i = if cstr.op = Eq + then Point (cstr.cst // Vect.get x cstr.coeffs) + else if Vect.is_null (Vect.set x (Int 0) cstr.coeffs) + then bound_of_constraint (Vect.get x cstr.coeffs , cstr.cst) + else itv + in + Interval.inter i itv) m (Itv (None, None))) in + + let return_ge m i res = Some res in + + let return_eq m eq i res = Some res in + + try + optimise_ge + (fun x -> false) choose choose_idx return_empty return_ge return_eq m + with CstrBag.Contradiction -> None + + + let find_q_intervals sys = + let variables = + List.map fst (List.sort compare_status (CstrBag.status sys)) in + List.map (fun x -> (x,find_q_interval_for x sys)) variables + + let pp_option f o = function + None -> Printf.fprintf o "None" + | Some x -> Printf.fprintf o "Some %a" f x + + let optimise vect sys = + (* we have to modify the system with a dummy variable *) + let fresh = + List.fold_left (fun fr c -> Pervasives.max fr (Vect.fresh c.coeffs)) 0 sys in + assert (List.for_all (fun x -> Vect.get fresh x.coeffs =/ Int 0) sys); + let cstr = { + coeffs = Vect.set fresh (Int (-1)) vect ; + op = Eq ; + cst = (Int 0)} in + try + find_q_interval_for fresh + (List.fold_left + (fun bg c -> CstrBag.add (CstrBag.cstr_to_itv c) bg) + CstrBag.empty (cstr::sys)) + with CstrBag.Contradiction -> None + + + let optimise vect sys = + let res = optimise vect sys in + if debug + then Printf.printf "optimise %s -> %a\n" + (Vect.string vect) (pp_option (fun o x -> Printf.printf "%s" (string_of_intrvl x))) res + ; res + + let find_Q_interval sys = + try + let sys = + (List.fold_left + (fun bg c -> CstrBag.add (CstrBag.cstr_to_itv c) bg) CstrBag.empty sys) in + let candidates = + List.fold_left + (fun l (x,i) -> match i with + None -> (x,Empty)::l + | Some i -> (x,i)::l) [] (find_q_intervals sys) in + match List.fold_left + (fun (x1,i1) (x2,i2) -> + if smaller_itv i1 i2 + then (x1,i1) else (x2,i2)) (-1,Itv(None,None)) candidates + with + | (i,Empty) -> None + | (x,Itv(Some i, Some j)) -> Some(i,x,j) + | (x,Point n) -> Some(n,x,n) + | _ -> None + with CstrBag.Contradiction -> None + + +end + diff --git a/contrib/micromega/micromega.ml b/contrib/micromega/micromega.ml new file mode 100644 index 00000000..e151e4e1 --- /dev/null +++ b/contrib/micromega/micromega.ml @@ -0,0 +1,1512 @@ +type __ = Obj.t +let __ = let rec f _ = Obj.repr f in Obj.repr f + +type bool = + | True + | False + +(** val negb : bool -> bool **) + +let negb = function + | True -> False + | False -> True + +type nat = + | O + | S of nat + +type 'a option = + | Some of 'a + | None + +type ('a, 'b) prod = + | Pair of 'a * 'b + +type comparison = + | Eq + | Lt + | Gt + +(** val compOpp : comparison -> comparison **) + +let compOpp = function + | Eq -> Eq + | Lt -> Gt + | Gt -> Lt + +type sumbool = + | Left + | Right + +type 'a sumor = + | Inleft of 'a + | Inright + +type 'a list = + | Nil + | Cons of 'a * 'a list + +(** val app : 'a1 list -> 'a1 list -> 'a1 list **) + +let rec app l m = + match l with + | Nil -> m + | Cons (a, l1) -> Cons (a, (app l1 m)) + +(** val nth : nat -> 'a1 list -> 'a1 -> 'a1 **) + +let rec nth n0 l default = + match n0 with + | O -> (match l with + | Nil -> default + | Cons (x, l') -> x) + | S m -> + (match l with + | Nil -> default + | Cons (x, t0) -> nth m t0 default) + +(** val map : ('a1 -> 'a2) -> 'a1 list -> 'a2 list **) + +let rec map f = function + | Nil -> Nil + | Cons (a, t0) -> Cons ((f a), (map f t0)) + +type positive = + | XI of positive + | XO of positive + | XH + +(** val psucc : positive -> positive **) + +let rec psucc = function + | XI p -> XO (psucc p) + | XO p -> XI p + | XH -> XO XH + +(** val pplus : positive -> positive -> positive **) + +let rec pplus x y = + match x with + | XI p -> + (match y with + | XI q0 -> XO (pplus_carry p q0) + | XO q0 -> XI (pplus p q0) + | XH -> XO (psucc p)) + | XO p -> + (match y with + | XI q0 -> XI (pplus p q0) + | XO q0 -> XO (pplus p q0) + | XH -> XI p) + | XH -> + (match y with + | XI q0 -> XO (psucc q0) + | XO q0 -> XI q0 + | XH -> XO XH) + +(** val pplus_carry : positive -> positive -> positive **) + +and pplus_carry x y = + match x with + | XI p -> + (match y with + | XI q0 -> XI (pplus_carry p q0) + | XO q0 -> XO (pplus_carry p q0) + | XH -> XI (psucc p)) + | XO p -> + (match y with + | XI q0 -> XO (pplus_carry p q0) + | XO q0 -> XI (pplus p q0) + | XH -> XO (psucc p)) + | XH -> + (match y with + | XI q0 -> XI (psucc q0) + | XO q0 -> XO (psucc q0) + | XH -> XI XH) + +(** val p_of_succ_nat : nat -> positive **) + +let rec p_of_succ_nat = function + | O -> XH + | S x -> psucc (p_of_succ_nat x) + +(** val pdouble_minus_one : positive -> positive **) + +let rec pdouble_minus_one = function + | XI p -> XI (XO p) + | XO p -> XI (pdouble_minus_one p) + | XH -> XH + +type positive_mask = + | IsNul + | IsPos of positive + | IsNeg + +(** val pdouble_plus_one_mask : positive_mask -> positive_mask **) + +let pdouble_plus_one_mask = function + | IsNul -> IsPos XH + | IsPos p -> IsPos (XI p) + | IsNeg -> IsNeg + +(** val pdouble_mask : positive_mask -> positive_mask **) + +let pdouble_mask = function + | IsNul -> IsNul + | IsPos p -> IsPos (XO p) + | IsNeg -> IsNeg + +(** val pdouble_minus_two : positive -> positive_mask **) + +let pdouble_minus_two = function + | XI p -> IsPos (XO (XO p)) + | XO p -> IsPos (XO (pdouble_minus_one p)) + | XH -> IsNul + +(** val pminus_mask : positive -> positive -> positive_mask **) + +let rec pminus_mask x y = + match x with + | XI p -> + (match y with + | XI q0 -> pdouble_mask (pminus_mask p q0) + | XO q0 -> pdouble_plus_one_mask (pminus_mask p q0) + | XH -> IsPos (XO p)) + | XO p -> + (match y with + | XI q0 -> pdouble_plus_one_mask (pminus_mask_carry p q0) + | XO q0 -> pdouble_mask (pminus_mask p q0) + | XH -> IsPos (pdouble_minus_one p)) + | XH -> (match y with + | XH -> IsNul + | _ -> IsNeg) + +(** val pminus_mask_carry : positive -> positive -> positive_mask **) + +and pminus_mask_carry x y = + match x with + | XI p -> + (match y with + | XI q0 -> pdouble_plus_one_mask (pminus_mask_carry p q0) + | XO q0 -> pdouble_mask (pminus_mask p q0) + | XH -> IsPos (pdouble_minus_one p)) + | XO p -> + (match y with + | XI q0 -> pdouble_mask (pminus_mask_carry p q0) + | XO q0 -> pdouble_plus_one_mask (pminus_mask_carry p q0) + | XH -> pdouble_minus_two p) + | XH -> IsNeg + +(** val pminus : positive -> positive -> positive **) + +let pminus x y = + match pminus_mask x y with + | IsPos z0 -> z0 + | _ -> XH + +(** val pmult : positive -> positive -> positive **) + +let rec pmult x y = + match x with + | XI p -> pplus y (XO (pmult p y)) + | XO p -> XO (pmult p y) + | XH -> y + +(** val pcompare : positive -> positive -> comparison -> comparison **) + +let rec pcompare x y r = + match x with + | XI p -> + (match y with + | XI q0 -> pcompare p q0 r + | XO q0 -> pcompare p q0 Gt + | XH -> Gt) + | XO p -> + (match y with + | XI q0 -> pcompare p q0 Lt + | XO q0 -> pcompare p q0 r + | XH -> Gt) + | XH -> (match y with + | XH -> r + | _ -> Lt) + +type n = + | N0 + | Npos of positive + +type z = + | Z0 + | Zpos of positive + | Zneg of positive + +(** val zdouble_plus_one : z -> z **) + +let zdouble_plus_one = function + | Z0 -> Zpos XH + | Zpos p -> Zpos (XI p) + | Zneg p -> Zneg (pdouble_minus_one p) + +(** val zdouble_minus_one : z -> z **) + +let zdouble_minus_one = function + | Z0 -> Zneg XH + | Zpos p -> Zpos (pdouble_minus_one p) + | Zneg p -> Zneg (XI p) + +(** val zdouble : z -> z **) + +let zdouble = function + | Z0 -> Z0 + | Zpos p -> Zpos (XO p) + | Zneg p -> Zneg (XO p) + +(** val zPminus : positive -> positive -> z **) + +let rec zPminus x y = + match x with + | XI p -> + (match y with + | XI q0 -> zdouble (zPminus p q0) + | XO q0 -> zdouble_plus_one (zPminus p q0) + | XH -> Zpos (XO p)) + | XO p -> + (match y with + | XI q0 -> zdouble_minus_one (zPminus p q0) + | XO q0 -> zdouble (zPminus p q0) + | XH -> Zpos (pdouble_minus_one p)) + | XH -> + (match y with + | XI q0 -> Zneg (XO q0) + | XO q0 -> Zneg (pdouble_minus_one q0) + | XH -> Z0) + +(** val zplus : z -> z -> z **) + +let zplus x y = + match x with + | Z0 -> y + | Zpos x' -> + (match y with + | Z0 -> Zpos x' + | Zpos y' -> Zpos (pplus x' y') + | Zneg y' -> + (match pcompare x' y' Eq with + | Eq -> Z0 + | Lt -> Zneg (pminus y' x') + | Gt -> Zpos (pminus x' y'))) + | Zneg x' -> + (match y with + | Z0 -> Zneg x' + | Zpos y' -> + (match pcompare x' y' Eq with + | Eq -> Z0 + | Lt -> Zpos (pminus y' x') + | Gt -> Zneg (pminus x' y')) + | Zneg y' -> Zneg (pplus x' y')) + +(** val zopp : z -> z **) + +let zopp = function + | Z0 -> Z0 + | Zpos x0 -> Zneg x0 + | Zneg x0 -> Zpos x0 + +(** val zminus : z -> z -> z **) + +let zminus m n0 = + zplus m (zopp n0) + +(** val zmult : z -> z -> z **) + +let zmult x y = + match x with + | Z0 -> Z0 + | Zpos x' -> + (match y with + | Z0 -> Z0 + | Zpos y' -> Zpos (pmult x' y') + | Zneg y' -> Zneg (pmult x' y')) + | Zneg x' -> + (match y with + | Z0 -> Z0 + | Zpos y' -> Zneg (pmult x' y') + | Zneg y' -> Zpos (pmult x' y')) + +(** val zcompare : z -> z -> comparison **) + +let zcompare x y = + match x with + | Z0 -> (match y with + | Z0 -> Eq + | Zpos y' -> Lt + | Zneg y' -> Gt) + | Zpos x' -> (match y with + | Zpos y' -> pcompare x' y' Eq + | _ -> Gt) + | Zneg x' -> + (match y with + | Zneg y' -> compOpp (pcompare x' y' Eq) + | _ -> Lt) + +(** val dcompare_inf : comparison -> sumbool sumor **) + +let dcompare_inf = function + | Eq -> Inleft Left + | Lt -> Inleft Right + | Gt -> Inright + +(** val zcompare_rec : + z -> z -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) -> 'a1 **) + +let zcompare_rec x y h1 h2 h3 = + match dcompare_inf (zcompare x y) with + | Inleft x0 -> (match x0 with + | Left -> h1 __ + | Right -> h2 __) + | Inright -> h3 __ + +(** val z_gt_dec : z -> z -> sumbool **) + +let z_gt_dec x y = + zcompare_rec x y (fun _ -> Right) (fun _ -> Right) (fun _ -> Left) + +(** val zle_bool : z -> z -> bool **) + +let zle_bool x y = + match zcompare x y with + | Gt -> False + | _ -> True + +(** val zge_bool : z -> z -> bool **) + +let zge_bool x y = + match zcompare x y with + | Lt -> False + | _ -> True + +(** val zgt_bool : z -> z -> bool **) + +let zgt_bool x y = + match zcompare x y with + | Gt -> True + | _ -> False + +(** val zeq_bool : z -> z -> bool **) + +let zeq_bool x y = + match zcompare x y with + | Eq -> True + | _ -> False + +(** val n_of_nat : nat -> n **) + +let n_of_nat = function + | O -> N0 + | S n' -> Npos (p_of_succ_nat n') + +(** val zdiv_eucl_POS : positive -> z -> (z, z) prod **) + +let rec zdiv_eucl_POS a b = + match a with + | XI a' -> + let Pair (q0, r) = zdiv_eucl_POS a' b in + let r' = zplus (zmult (Zpos (XO XH)) r) (Zpos XH) in + (match zgt_bool b r' with + | True -> Pair ((zmult (Zpos (XO XH)) q0), r') + | False -> Pair ((zplus (zmult (Zpos (XO XH)) q0) (Zpos XH)), + (zminus r' b))) + | XO a' -> + let Pair (q0, r) = zdiv_eucl_POS a' b in + let r' = zmult (Zpos (XO XH)) r in + (match zgt_bool b r' with + | True -> Pair ((zmult (Zpos (XO XH)) q0), r') + | False -> Pair ((zplus (zmult (Zpos (XO XH)) q0) (Zpos XH)), + (zminus r' b))) + | XH -> + (match zge_bool b (Zpos (XO XH)) with + | True -> Pair (Z0, (Zpos XH)) + | False -> Pair ((Zpos XH), Z0)) + +(** val zdiv_eucl : z -> z -> (z, z) prod **) + +let zdiv_eucl a b = + match a with + | Z0 -> Pair (Z0, Z0) + | Zpos a' -> + (match b with + | Z0 -> Pair (Z0, Z0) + | Zpos p -> zdiv_eucl_POS a' b + | Zneg b' -> + let Pair (q0, r) = zdiv_eucl_POS a' (Zpos b') in + (match r with + | Z0 -> Pair ((zopp q0), Z0) + | _ -> Pair ((zopp (zplus q0 (Zpos XH))), (zplus b r)))) + | Zneg a' -> + (match b with + | Z0 -> Pair (Z0, Z0) + | Zpos p -> + let Pair (q0, r) = zdiv_eucl_POS a' b in + (match r with + | Z0 -> Pair ((zopp q0), Z0) + | _ -> Pair ((zopp (zplus q0 (Zpos XH))), (zminus b r))) + | Zneg b' -> + let Pair (q0, r) = zdiv_eucl_POS a' (Zpos b') in + Pair (q0, (zopp r))) + +type 'c pol = + | Pc of 'c + | Pinj of positive * 'c pol + | PX of 'c pol * positive * 'c pol + +(** val p0 : 'a1 -> 'a1 pol **) + +let p0 cO = + Pc cO + +(** val p1 : 'a1 -> 'a1 pol **) + +let p1 cI = + Pc cI + +(** val peq : ('a1 -> 'a1 -> bool) -> 'a1 pol -> 'a1 pol -> bool **) + +let rec peq ceqb p p' = + match p with + | Pc c -> (match p' with + | Pc c' -> ceqb c c' + | _ -> False) + | Pinj (j, q0) -> + (match p' with + | Pinj (j', q') -> + (match pcompare j j' Eq with + | Eq -> peq ceqb q0 q' + | _ -> False) + | _ -> False) + | PX (p2, i, q0) -> + (match p' with + | PX (p'0, i', q') -> + (match pcompare i i' Eq with + | Eq -> + (match peq ceqb p2 p'0 with + | True -> peq ceqb q0 q' + | False -> False) + | _ -> False) + | _ -> False) + +(** val mkPinj_pred : positive -> 'a1 pol -> 'a1 pol **) + +let mkPinj_pred j p = + match j with + | XI j0 -> Pinj ((XO j0), p) + | XO j0 -> Pinj ((pdouble_minus_one j0), p) + | XH -> p + +(** val mkPX : + 'a1 -> ('a1 -> 'a1 -> bool) -> 'a1 pol -> positive -> 'a1 pol -> 'a1 pol **) + +let mkPX cO ceqb p i q0 = + match p with + | Pc c -> + (match ceqb c cO with + | True -> + (match q0 with + | Pc c0 -> q0 + | Pinj (j', q1) -> Pinj ((pplus XH j'), q1) + | PX (p2, p3, p4) -> Pinj (XH, q0)) + | False -> PX (p, i, q0)) + | Pinj (p2, p3) -> PX (p, i, q0) + | PX (p', i', q') -> + (match peq ceqb q' (p0 cO) with + | True -> PX (p', (pplus i' i), q0) + | False -> PX (p, i, q0)) + +(** val mkXi : 'a1 -> 'a1 -> positive -> 'a1 pol **) + +let mkXi cO cI i = + PX ((p1 cI), i, (p0 cO)) + +(** val mkX : 'a1 -> 'a1 -> 'a1 pol **) + +let mkX cO cI = + mkXi cO cI XH + +(** val popp : ('a1 -> 'a1) -> 'a1 pol -> 'a1 pol **) + +let rec popp copp = function + | Pc c -> Pc (copp c) + | Pinj (j, q0) -> Pinj (j, (popp copp q0)) + | PX (p2, i, q0) -> PX ((popp copp p2), i, (popp copp q0)) + +(** val paddC : ('a1 -> 'a1 -> 'a1) -> 'a1 pol -> 'a1 -> 'a1 pol **) + +let rec paddC cadd p c = + match p with + | Pc c1 -> Pc (cadd c1 c) + | Pinj (j, q0) -> Pinj (j, (paddC cadd q0 c)) + | PX (p2, i, q0) -> PX (p2, i, (paddC cadd q0 c)) + +(** val psubC : ('a1 -> 'a1 -> 'a1) -> 'a1 pol -> 'a1 -> 'a1 pol **) + +let rec psubC csub p c = + match p with + | Pc c1 -> Pc (csub c1 c) + | Pinj (j, q0) -> Pinj (j, (psubC csub q0 c)) + | PX (p2, i, q0) -> PX (p2, i, (psubC csub q0 c)) + +(** val paddI : + ('a1 -> 'a1 -> 'a1) -> ('a1 pol -> 'a1 pol -> 'a1 pol) -> 'a1 pol -> + positive -> 'a1 pol -> 'a1 pol **) + +let rec paddI cadd pop q0 j = function + | Pc c -> + let p2 = paddC cadd q0 c in + (match p2 with + | Pc c0 -> p2 + | Pinj (j', q1) -> Pinj ((pplus j j'), q1) + | PX (p3, p4, p5) -> Pinj (j, p2)) + | Pinj (j', q') -> + (match zPminus j' j with + | Z0 -> + let p2 = pop q' q0 in + (match p2 with + | Pc c -> p2 + | Pinj (j'0, q1) -> Pinj ((pplus j j'0), q1) + | PX (p3, p4, p5) -> Pinj (j, p2)) + | Zpos k -> + let p2 = pop (Pinj (k, q')) q0 in + (match p2 with + | Pc c -> p2 + | Pinj (j'0, q1) -> Pinj ((pplus j j'0), q1) + | PX (p3, p4, p5) -> Pinj (j, p2)) + | Zneg k -> + let p2 = paddI cadd pop q0 k q' in + (match p2 with + | Pc c -> p2 + | Pinj (j'0, q1) -> Pinj ((pplus j' j'0), q1) + | PX (p3, p4, p5) -> Pinj (j', p2))) + | PX (p2, i, q') -> + (match j with + | XI j0 -> PX (p2, i, (paddI cadd pop q0 (XO j0) q')) + | XO j0 -> PX (p2, i, (paddI cadd pop q0 (pdouble_minus_one j0) q')) + | XH -> PX (p2, i, (pop q' q0))) + +(** val psubI : + ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1) -> ('a1 pol -> 'a1 pol -> 'a1 pol) -> + 'a1 pol -> positive -> 'a1 pol -> 'a1 pol **) + +let rec psubI cadd copp pop q0 j = function + | Pc c -> + let p2 = paddC cadd (popp copp q0) c in + (match p2 with + | Pc c0 -> p2 + | Pinj (j', q1) -> Pinj ((pplus j j'), q1) + | PX (p3, p4, p5) -> Pinj (j, p2)) + | Pinj (j', q') -> + (match zPminus j' j with + | Z0 -> + let p2 = pop q' q0 in + (match p2 with + | Pc c -> p2 + | Pinj (j'0, q1) -> Pinj ((pplus j j'0), q1) + | PX (p3, p4, p5) -> Pinj (j, p2)) + | Zpos k -> + let p2 = pop (Pinj (k, q')) q0 in + (match p2 with + | Pc c -> p2 + | Pinj (j'0, q1) -> Pinj ((pplus j j'0), q1) + | PX (p3, p4, p5) -> Pinj (j, p2)) + | Zneg k -> + let p2 = psubI cadd copp pop q0 k q' in + (match p2 with + | Pc c -> p2 + | Pinj (j'0, q1) -> Pinj ((pplus j' j'0), q1) + | PX (p3, p4, p5) -> Pinj (j', p2))) + | PX (p2, i, q') -> + (match j with + | XI j0 -> PX (p2, i, (psubI cadd copp pop q0 (XO j0) q')) + | XO j0 -> PX (p2, i, + (psubI cadd copp pop q0 (pdouble_minus_one j0) q')) + | XH -> PX (p2, i, (pop q' q0))) + +(** val paddX : + 'a1 -> ('a1 -> 'a1 -> bool) -> ('a1 pol -> 'a1 pol -> 'a1 pol) -> 'a1 pol + -> positive -> 'a1 pol -> 'a1 pol **) + +let rec paddX cO ceqb pop p' i' p = match p with + | Pc c -> PX (p', i', p) + | Pinj (j, q') -> + (match j with + | XI j0 -> PX (p', i', (Pinj ((XO j0), q'))) + | XO j0 -> PX (p', i', (Pinj ((pdouble_minus_one j0), q'))) + | XH -> PX (p', i', q')) + | PX (p2, i, q') -> + (match zPminus i i' with + | Z0 -> mkPX cO ceqb (pop p2 p') i q' + | Zpos k -> mkPX cO ceqb (pop (PX (p2, k, (p0 cO))) p') i' q' + | Zneg k -> mkPX cO ceqb (paddX cO ceqb pop p' k p2) i q') + +(** val psubX : + 'a1 -> ('a1 -> 'a1) -> ('a1 -> 'a1 -> bool) -> ('a1 pol -> 'a1 pol -> 'a1 + pol) -> 'a1 pol -> positive -> 'a1 pol -> 'a1 pol **) + +let rec psubX cO copp ceqb pop p' i' p = match p with + | Pc c -> PX ((popp copp p'), i', p) + | Pinj (j, q') -> + (match j with + | XI j0 -> PX ((popp copp p'), i', (Pinj ((XO j0), q'))) + | XO j0 -> PX ((popp copp p'), i', (Pinj ( + (pdouble_minus_one j0), q'))) + | XH -> PX ((popp copp p'), i', q')) + | PX (p2, i, q') -> + (match zPminus i i' with + | Z0 -> mkPX cO ceqb (pop p2 p') i q' + | Zpos k -> mkPX cO ceqb (pop (PX (p2, k, (p0 cO))) p') i' q' + | Zneg k -> mkPX cO ceqb (psubX cO copp ceqb pop p' k p2) i q') + +(** val padd : + 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> bool) -> 'a1 pol -> 'a1 pol + -> 'a1 pol **) + +let rec padd cO cadd ceqb p = function + | Pc c' -> paddC cadd p c' + | Pinj (j', q') -> paddI cadd (fun x x0 -> padd cO cadd ceqb x x0) q' j' p + | PX (p'0, i', q') -> + (match p with + | Pc c -> PX (p'0, i', (paddC cadd q' c)) + | Pinj (j, q0) -> + (match j with + | XI j0 -> PX (p'0, i', + (padd cO cadd ceqb (Pinj ((XO j0), q0)) q')) + | XO j0 -> PX (p'0, i', + (padd cO cadd ceqb (Pinj ((pdouble_minus_one j0), q0)) + q')) + | XH -> PX (p'0, i', (padd cO cadd ceqb q0 q'))) + | PX (p2, i, q0) -> + (match zPminus i i' with + | Z0 -> + mkPX cO ceqb (padd cO cadd ceqb p2 p'0) i + (padd cO cadd ceqb q0 q') + | Zpos k -> + mkPX cO ceqb + (padd cO cadd ceqb (PX (p2, k, (p0 cO))) p'0) i' + (padd cO cadd ceqb q0 q') + | Zneg k -> + mkPX cO ceqb + (paddX cO ceqb (fun x x0 -> padd cO cadd ceqb x x0) p'0 + k p2) i (padd cO cadd ceqb q0 q'))) + +(** val psub : + 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1) -> ('a1 + -> 'a1 -> bool) -> 'a1 pol -> 'a1 pol -> 'a1 pol **) + +let rec psub cO cadd csub copp ceqb p = function + | Pc c' -> psubC csub p c' + | Pinj (j', q') -> + psubI cadd copp (fun x x0 -> psub cO cadd csub copp ceqb x x0) q' j' p + | PX (p'0, i', q') -> + (match p with + | Pc c -> PX ((popp copp p'0), i', (paddC cadd (popp copp q') c)) + | Pinj (j, q0) -> + (match j with + | XI j0 -> PX ((popp copp p'0), i', + (psub cO cadd csub copp ceqb (Pinj ((XO j0), q0)) q')) + | XO j0 -> PX ((popp copp p'0), i', + (psub cO cadd csub copp ceqb (Pinj + ((pdouble_minus_one j0), q0)) q')) + | XH -> PX ((popp copp p'0), i', + (psub cO cadd csub copp ceqb q0 q'))) + | PX (p2, i, q0) -> + (match zPminus i i' with + | Z0 -> + mkPX cO ceqb (psub cO cadd csub copp ceqb p2 p'0) i + (psub cO cadd csub copp ceqb q0 q') + | Zpos k -> + mkPX cO ceqb + (psub cO cadd csub copp ceqb (PX (p2, k, (p0 cO))) p'0) + i' (psub cO cadd csub copp ceqb q0 q') + | Zneg k -> + mkPX cO ceqb + (psubX cO copp ceqb (fun x x0 -> + psub cO cadd csub copp ceqb x x0) p'0 k p2) i + (psub cO cadd csub copp ceqb q0 q'))) + +(** val pmulC_aux : + 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> bool) -> 'a1 pol -> 'a1 -> + 'a1 pol **) + +let rec pmulC_aux cO cmul ceqb p c = + match p with + | Pc c' -> Pc (cmul c' c) + | Pinj (j, q0) -> + let p2 = pmulC_aux cO cmul ceqb q0 c in + (match p2 with + | Pc c0 -> p2 + | Pinj (j', q1) -> Pinj ((pplus j j'), q1) + | PX (p3, p4, p5) -> Pinj (j, p2)) + | PX (p2, i, q0) -> + mkPX cO ceqb (pmulC_aux cO cmul ceqb p2 c) i + (pmulC_aux cO cmul ceqb q0 c) + +(** val pmulC : + 'a1 -> 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> bool) -> 'a1 pol -> + 'a1 -> 'a1 pol **) + +let pmulC cO cI cmul ceqb p c = + match ceqb c cO with + | True -> p0 cO + | False -> + (match ceqb c cI with + | True -> p + | False -> pmulC_aux cO cmul ceqb p c) + +(** val pmulI : + 'a1 -> 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> bool) -> ('a1 pol -> + 'a1 pol -> 'a1 pol) -> 'a1 pol -> positive -> 'a1 pol -> 'a1 pol **) + +let rec pmulI cO cI cmul ceqb pmul0 q0 j = function + | Pc c -> + let p2 = pmulC cO cI cmul ceqb q0 c in + (match p2 with + | Pc c0 -> p2 + | Pinj (j', q1) -> Pinj ((pplus j j'), q1) + | PX (p3, p4, p5) -> Pinj (j, p2)) + | Pinj (j', q') -> + (match zPminus j' j with + | Z0 -> + let p2 = pmul0 q' q0 in + (match p2 with + | Pc c -> p2 + | Pinj (j'0, q1) -> Pinj ((pplus j j'0), q1) + | PX (p3, p4, p5) -> Pinj (j, p2)) + | Zpos k -> + let p2 = pmul0 (Pinj (k, q')) q0 in + (match p2 with + | Pc c -> p2 + | Pinj (j'0, q1) -> Pinj ((pplus j j'0), q1) + | PX (p3, p4, p5) -> Pinj (j, p2)) + | Zneg k -> + let p2 = pmulI cO cI cmul ceqb pmul0 q0 k q' in + (match p2 with + | Pc c -> p2 + | Pinj (j'0, q1) -> Pinj ((pplus j' j'0), q1) + | PX (p3, p4, p5) -> Pinj (j', p2))) + | PX (p', i', q') -> + (match j with + | XI j' -> + mkPX cO ceqb (pmulI cO cI cmul ceqb pmul0 q0 j p') i' + (pmulI cO cI cmul ceqb pmul0 q0 (XO j') q') + | XO j' -> + mkPX cO ceqb (pmulI cO cI cmul ceqb pmul0 q0 j p') i' + (pmulI cO cI cmul ceqb pmul0 q0 (pdouble_minus_one j') q') + | XH -> + mkPX cO ceqb (pmulI cO cI cmul ceqb pmul0 q0 XH p') i' + (pmul0 q' q0)) + +(** val pmul : + 'a1 -> 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 + -> bool) -> 'a1 pol -> 'a1 pol -> 'a1 pol **) + +let rec pmul cO cI cadd cmul ceqb p p'' = match p'' with + | Pc c -> pmulC cO cI cmul ceqb p c + | Pinj (j', q') -> + pmulI cO cI cmul ceqb (fun x x0 -> pmul cO cI cadd cmul ceqb x x0) q' + j' p + | PX (p', i', q') -> + (match p with + | Pc c -> pmulC cO cI cmul ceqb p'' c + | Pinj (j, q0) -> + mkPX cO ceqb (pmul cO cI cadd cmul ceqb p p') i' + (match j with + | XI j0 -> + pmul cO cI cadd cmul ceqb (Pinj ((XO j0), q0)) q' + | XO j0 -> + pmul cO cI cadd cmul ceqb (Pinj + ((pdouble_minus_one j0), q0)) q' + | XH -> pmul cO cI cadd cmul ceqb q0 q') + | PX (p2, i, q0) -> + padd cO cadd ceqb + (mkPX cO ceqb + (padd cO cadd ceqb + (mkPX cO ceqb (pmul cO cI cadd cmul ceqb p2 p') i (p0 cO)) + (pmul cO cI cadd cmul ceqb + (match q0 with + | Pc c -> q0 + | Pinj (j', q1) -> Pinj ((pplus XH j'), q1) + | PX (p3, p4, p5) -> Pinj (XH, q0)) p')) i' + (p0 cO)) + (mkPX cO ceqb + (pmulI cO cI cmul ceqb (fun x x0 -> + pmul cO cI cadd cmul ceqb x x0) q' XH p2) i + (pmul cO cI cadd cmul ceqb q0 q'))) + +type 'c pExpr = + | PEc of 'c + | PEX of positive + | PEadd of 'c pExpr * 'c pExpr + | PEsub of 'c pExpr * 'c pExpr + | PEmul of 'c pExpr * 'c pExpr + | PEopp of 'c pExpr + | PEpow of 'c pExpr * n + +(** val mk_X : 'a1 -> 'a1 -> positive -> 'a1 pol **) + +let mk_X cO cI j = + mkPinj_pred j (mkX cO cI) + +(** val ppow_pos : + 'a1 -> 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 + -> bool) -> ('a1 pol -> 'a1 pol) -> 'a1 pol -> 'a1 pol -> positive -> 'a1 + pol **) + +let rec ppow_pos cO cI cadd cmul ceqb subst_l res p = function + | XI p3 -> + subst_l + (pmul cO cI cadd cmul ceqb + (ppow_pos cO cI cadd cmul ceqb subst_l + (ppow_pos cO cI cadd cmul ceqb subst_l res p p3) p p3) p) + | XO p3 -> + ppow_pos cO cI cadd cmul ceqb subst_l + (ppow_pos cO cI cadd cmul ceqb subst_l res p p3) p p3 + | XH -> subst_l (pmul cO cI cadd cmul ceqb res p) + +(** val ppow_N : + 'a1 -> 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 + -> bool) -> ('a1 pol -> 'a1 pol) -> 'a1 pol -> n -> 'a1 pol **) + +let ppow_N cO cI cadd cmul ceqb subst_l p = function + | N0 -> p1 cI + | Npos p2 -> ppow_pos cO cI cadd cmul ceqb subst_l (p1 cI) p p2 + +(** val norm_aux : + 'a1 -> 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 + -> 'a1) -> ('a1 -> 'a1) -> ('a1 -> 'a1 -> bool) -> 'a1 pExpr -> 'a1 pol **) + +let rec norm_aux cO cI cadd cmul csub copp ceqb = function + | PEc c -> Pc c + | PEX j -> mk_X cO cI j + | PEadd (pe1, pe2) -> + (match pe1 with + | PEopp pe3 -> + psub cO cadd csub copp ceqb + (norm_aux cO cI cadd cmul csub copp ceqb pe2) + (norm_aux cO cI cadd cmul csub copp ceqb pe3) + | _ -> + (match pe2 with + | PEopp pe3 -> + psub cO cadd csub copp ceqb + (norm_aux cO cI cadd cmul csub copp ceqb pe1) + (norm_aux cO cI cadd cmul csub copp ceqb pe3) + | _ -> + padd cO cadd ceqb + (norm_aux cO cI cadd cmul csub copp ceqb pe1) + (norm_aux cO cI cadd cmul csub copp ceqb pe2))) + | PEsub (pe1, pe2) -> + psub cO cadd csub copp ceqb + (norm_aux cO cI cadd cmul csub copp ceqb pe1) + (norm_aux cO cI cadd cmul csub copp ceqb pe2) + | PEmul (pe1, pe2) -> + pmul cO cI cadd cmul ceqb (norm_aux cO cI cadd cmul csub copp ceqb pe1) + (norm_aux cO cI cadd cmul csub copp ceqb pe2) + | PEopp pe1 -> popp copp (norm_aux cO cI cadd cmul csub copp ceqb pe1) + | PEpow (pe1, n0) -> + ppow_N cO cI cadd cmul ceqb (fun p -> p) + (norm_aux cO cI cadd cmul csub copp ceqb pe1) n0 + +type 'a bFormula = + | TT + | FF + | X + | A of 'a + | Cj of 'a bFormula * 'a bFormula + | D of 'a bFormula * 'a bFormula + | N of 'a bFormula + | I of 'a bFormula * 'a bFormula + +type 'term' clause = 'term' list + +type 'term' cnf = 'term' clause list + +(** val tt : 'a1 cnf **) + +let tt = + Nil + +(** val ff : 'a1 cnf **) + +let ff = + Cons (Nil, Nil) + +(** val or_clause_cnf : 'a1 clause -> 'a1 cnf -> 'a1 cnf **) + +let or_clause_cnf t0 f = + map (fun x -> app t0 x) f + +(** val or_cnf : 'a1 cnf -> 'a1 cnf -> 'a1 cnf **) + +let rec or_cnf f f' = + match f with + | Nil -> tt + | Cons (e, rst) -> app (or_cnf rst f') (or_clause_cnf e f') + +(** val and_cnf : 'a1 cnf -> 'a1 cnf -> 'a1 cnf **) + +let and_cnf f1 f2 = + app f1 f2 + +(** val xcnf : + ('a1 -> 'a2 cnf) -> ('a1 -> 'a2 cnf) -> bool -> 'a1 bFormula -> 'a2 cnf **) + +let rec xcnf normalise0 negate0 pol0 = function + | TT -> (match pol0 with + | True -> tt + | False -> ff) + | FF -> (match pol0 with + | True -> ff + | False -> tt) + | X -> ff + | A x -> (match pol0 with + | True -> normalise0 x + | False -> negate0 x) + | Cj (e1, e2) -> + (match pol0 with + | True -> + and_cnf (xcnf normalise0 negate0 pol0 e1) + (xcnf normalise0 negate0 pol0 e2) + | False -> + or_cnf (xcnf normalise0 negate0 pol0 e1) + (xcnf normalise0 negate0 pol0 e2)) + | D (e1, e2) -> + (match pol0 with + | True -> + or_cnf (xcnf normalise0 negate0 pol0 e1) + (xcnf normalise0 negate0 pol0 e2) + | False -> + and_cnf (xcnf normalise0 negate0 pol0 e1) + (xcnf normalise0 negate0 pol0 e2)) + | N e -> xcnf normalise0 negate0 (negb pol0) e + | I (e1, e2) -> + (match pol0 with + | True -> + or_cnf (xcnf normalise0 negate0 (negb pol0) e1) + (xcnf normalise0 negate0 pol0 e2) + | False -> + and_cnf (xcnf normalise0 negate0 (negb pol0) e1) + (xcnf normalise0 negate0 pol0 e2)) + +(** val cnf_checker : + ('a1 list -> 'a2 -> bool) -> 'a1 cnf -> 'a2 list -> bool **) + +let rec cnf_checker checker f l = + match f with + | Nil -> True + | Cons (e, f0) -> + (match l with + | Nil -> False + | Cons (c, l0) -> + (match checker e c with + | True -> cnf_checker checker f0 l0 + | False -> False)) + +(** val tauto_checker : + ('a1 -> 'a2 cnf) -> ('a1 -> 'a2 cnf) -> ('a2 list -> 'a3 -> bool) -> 'a1 + bFormula -> 'a3 list -> bool **) + +let tauto_checker normalise0 negate0 checker f w = + cnf_checker checker (xcnf normalise0 negate0 True f) w + +type 'c pExprC = 'c pExpr + +type 'c polC = 'c pol + +type op1 = + | Equal + | NonEqual + | Strict + | NonStrict + +type 'c nFormula = ('c pExprC, op1) prod + +type monoidMember = nat list + +type 'c coneMember = + | S_In of nat + | S_Ideal of 'c pExprC * 'c coneMember + | S_Square of 'c pExprC + | S_Monoid of monoidMember + | S_Mult of 'c coneMember * 'c coneMember + | S_Add of 'c coneMember * 'c coneMember + | S_Pos of 'c + | S_Z + +(** val nformula_times : 'a1 nFormula -> 'a1 nFormula -> 'a1 nFormula **) + +let nformula_times f f' = + let Pair (p, op) = f in + let Pair (p', op') = f' in + Pair ((PEmul (p, p')), + (match op with + | Equal -> Equal + | NonEqual -> NonEqual + | Strict -> op' + | NonStrict -> NonStrict)) + +(** val nformula_plus : 'a1 nFormula -> 'a1 nFormula -> 'a1 nFormula **) + +let nformula_plus f f' = + let Pair (p, op) = f in + let Pair (p', op') = f' in + Pair ((PEadd (p, p')), + (match op with + | Equal -> op' + | NonEqual -> NonEqual + | Strict -> Strict + | NonStrict -> (match op' with + | Strict -> Strict + | _ -> NonStrict))) + +(** val eval_monoid : + 'a1 -> 'a1 nFormula list -> monoidMember -> 'a1 pExprC **) + +let rec eval_monoid cI l = function + | Nil -> PEc cI + | Cons (n0, ns0) -> PEmul + ((let Pair (q0, o) = nth n0 l (Pair ((PEc cI), NonEqual)) in + (match o with + | NonEqual -> q0 + | _ -> PEc cI)), (eval_monoid cI l ns0)) + +(** val eval_cone : + 'a1 -> 'a1 -> ('a1 -> 'a1 -> bool) -> ('a1 -> 'a1 -> bool) -> 'a1 + nFormula list -> 'a1 coneMember -> 'a1 nFormula **) + +let rec eval_cone cO cI ceqb cleb l = function + | S_In n0 -> + let Pair (p, o) = nth n0 l (Pair ((PEc cO), Equal)) in + (match o with + | NonEqual -> Pair ((PEc cO), Equal) + | _ -> nth n0 l (Pair ((PEc cO), Equal))) + | S_Ideal (p, cm') -> + let f = eval_cone cO cI ceqb cleb l cm' in + let Pair (q0, op) = f in + (match op with + | Equal -> Pair ((PEmul (q0, p)), Equal) + | _ -> f) + | S_Square p -> Pair ((PEmul (p, p)), NonStrict) + | S_Monoid m -> let p = eval_monoid cI l m in Pair ((PEmul (p, p)), Strict) + | S_Mult (p, q0) -> + nformula_times (eval_cone cO cI ceqb cleb l p) + (eval_cone cO cI ceqb cleb l q0) + | S_Add (p, q0) -> + nformula_plus (eval_cone cO cI ceqb cleb l p) + (eval_cone cO cI ceqb cleb l q0) + | S_Pos c -> + (match match cleb cO c with + | True -> negb (ceqb cO c) + | False -> False with + | True -> Pair ((PEc c), Strict) + | False -> Pair ((PEc cO), Equal)) + | S_Z -> Pair ((PEc cO), Equal) + +(** val normalise_pexpr : + 'a1 -> 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 + -> 'a1) -> ('a1 -> 'a1) -> ('a1 -> 'a1 -> bool) -> 'a1 pExprC -> 'a1 polC **) + +let normalise_pexpr cO cI cplus ctimes cminus copp ceqb x = + norm_aux cO cI cplus ctimes cminus copp ceqb x + +(** val check_inconsistent : + 'a1 -> 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 + -> 'a1) -> ('a1 -> 'a1) -> ('a1 -> 'a1 -> bool) -> ('a1 -> 'a1 -> bool) + -> 'a1 nFormula -> bool **) + +let check_inconsistent cO cI cplus ctimes cminus copp ceqb cleb = function + | Pair (e, op) -> + (match normalise_pexpr cO cI cplus ctimes cminus copp ceqb e with + | Pc c -> + (match op with + | Equal -> negb (ceqb c cO) + | NonEqual -> False + | Strict -> cleb c cO + | NonStrict -> + (match cleb c cO with + | True -> negb (ceqb c cO) + | False -> False)) + | _ -> False) + +(** val check_normalised_formulas : + 'a1 -> 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 + -> 'a1) -> ('a1 -> 'a1) -> ('a1 -> 'a1 -> bool) -> ('a1 -> 'a1 -> bool) + -> 'a1 nFormula list -> 'a1 coneMember -> bool **) + +let check_normalised_formulas cO cI cplus ctimes cminus copp ceqb cleb l cm = + check_inconsistent cO cI cplus ctimes cminus copp ceqb cleb + (eval_cone cO cI ceqb cleb l cm) + +type op2 = + | OpEq + | OpNEq + | OpLe + | OpGe + | OpLt + | OpGt + +type 'c formula = { flhs : 'c pExprC; fop : op2; frhs : 'c pExprC } + +(** val flhs : 'a1 formula -> 'a1 pExprC **) + +let flhs x = x.flhs + +(** val fop : 'a1 formula -> op2 **) + +let fop x = x.fop + +(** val frhs : 'a1 formula -> 'a1 pExprC **) + +let frhs x = x.frhs + +(** val xnormalise : 'a1 formula -> 'a1 nFormula list **) + +let xnormalise t0 = + let { flhs = lhs; fop = o; frhs = rhs } = t0 in + (match o with + | OpEq -> Cons ((Pair ((PEsub (lhs, rhs)), Strict)), (Cons ((Pair + ((PEsub (rhs, lhs)), Strict)), Nil))) + | OpNEq -> Cons ((Pair ((PEsub (lhs, rhs)), Equal)), Nil) + | OpLe -> Cons ((Pair ((PEsub (lhs, rhs)), Strict)), Nil) + | OpGe -> Cons ((Pair ((PEsub (rhs, lhs)), Strict)), Nil) + | OpLt -> Cons ((Pair ((PEsub (lhs, rhs)), NonStrict)), Nil) + | OpGt -> Cons ((Pair ((PEsub (rhs, lhs)), NonStrict)), Nil)) + +(** val cnf_normalise : 'a1 formula -> 'a1 nFormula cnf **) + +let cnf_normalise t0 = + map (fun x -> Cons (x, Nil)) (xnormalise t0) + +(** val xnegate : 'a1 formula -> 'a1 nFormula list **) + +let xnegate t0 = + let { flhs = lhs; fop = o; frhs = rhs } = t0 in + (match o with + | OpEq -> Cons ((Pair ((PEsub (lhs, rhs)), Equal)), Nil) + | OpNEq -> Cons ((Pair ((PEsub (lhs, rhs)), Strict)), (Cons ((Pair + ((PEsub (rhs, lhs)), Strict)), Nil))) + | OpLe -> Cons ((Pair ((PEsub (rhs, lhs)), NonStrict)), Nil) + | OpGe -> Cons ((Pair ((PEsub (lhs, rhs)), NonStrict)), Nil) + | OpLt -> Cons ((Pair ((PEsub (rhs, lhs)), Strict)), Nil) + | OpGt -> Cons ((Pair ((PEsub (lhs, rhs)), Strict)), Nil)) + +(** val cnf_negate : 'a1 formula -> 'a1 nFormula cnf **) + +let cnf_negate t0 = + map (fun x -> Cons (x, Nil)) (xnegate t0) + +(** val simpl_expr : + 'a1 -> ('a1 -> 'a1 -> bool) -> 'a1 pExprC -> 'a1 pExprC **) + +let rec simpl_expr cI ceqb e = match e with + | PEadd (x, y) -> PEadd ((simpl_expr cI ceqb x), (simpl_expr cI ceqb y)) + | PEmul (y, z0) -> + let y' = simpl_expr cI ceqb y in + (match y' with + | PEc c -> + (match ceqb c cI with + | True -> simpl_expr cI ceqb z0 + | False -> PEmul (y', (simpl_expr cI ceqb z0))) + | _ -> PEmul (y', (simpl_expr cI ceqb z0))) + | _ -> e + +(** val simpl_cone : + 'a1 -> 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> bool) -> 'a1 + coneMember -> 'a1 coneMember **) + +let simpl_cone cO cI ctimes ceqb e = match e with + | S_Square t0 -> + (match simpl_expr cI ceqb t0 with + | PEc c -> + (match ceqb cO c with + | True -> S_Z + | False -> S_Pos (ctimes c c)) + | _ -> S_Square (simpl_expr cI ceqb t0)) + | S_Mult (t1, t2) -> + (match t1 with + | S_Mult (x, x0) -> + (match x with + | S_Pos p2 -> + (match t2 with + | S_Pos c -> S_Mult ((S_Pos (ctimes c p2)), x0) + | S_Z -> S_Z + | _ -> e) + | _ -> + (match x0 with + | S_Pos p2 -> + (match t2 with + | S_Pos c -> S_Mult ((S_Pos (ctimes c p2)), x) + | S_Z -> S_Z + | _ -> e) + | _ -> + (match t2 with + | S_Pos c -> + (match ceqb cI c with + | True -> t1 + | False -> S_Mult (t1, t2)) + | S_Z -> S_Z + | _ -> e))) + | S_Pos c -> + (match t2 with + | S_Mult (x, x0) -> + (match x with + | S_Pos p2 -> S_Mult ((S_Pos (ctimes c p2)), x0) + | _ -> + (match x0 with + | S_Pos p2 -> S_Mult ((S_Pos (ctimes c p2)), x) + | _ -> + (match ceqb cI c with + | True -> t2 + | False -> S_Mult (t1, t2)))) + | S_Add (y, z0) -> S_Add ((S_Mult ((S_Pos c), y)), (S_Mult + ((S_Pos c), z0))) + | S_Pos c0 -> S_Pos (ctimes c c0) + | S_Z -> S_Z + | _ -> + (match ceqb cI c with + | True -> t2 + | False -> S_Mult (t1, t2))) + | S_Z -> S_Z + | _ -> + (match t2 with + | S_Pos c -> + (match ceqb cI c with + | True -> t1 + | False -> S_Mult (t1, t2)) + | S_Z -> S_Z + | _ -> e)) + | S_Add (t1, t2) -> + (match t1 with + | S_Z -> t2 + | _ -> (match t2 with + | S_Z -> t1 + | _ -> S_Add (t1, t2))) + | _ -> e + +type q = { qnum : z; qden : positive } + +(** val qnum : q -> z **) + +let qnum x = x.qnum + +(** val qden : q -> positive **) + +let qden x = x.qden + +(** val qplus : q -> q -> q **) + +let qplus x y = + { qnum = (zplus (zmult x.qnum (Zpos y.qden)) (zmult y.qnum (Zpos x.qden))); + qden = (pmult x.qden y.qden) } + +(** val qmult : q -> q -> q **) + +let qmult x y = + { qnum = (zmult x.qnum y.qnum); qden = (pmult x.qden y.qden) } + +(** val qopp : q -> q **) + +let qopp x = + { qnum = (zopp x.qnum); qden = x.qden } + +(** val qminus : q -> q -> q **) + +let qminus x y = + qplus x (qopp y) + +type 'a t = + | Empty + | Leaf of 'a + | Node of 'a t * 'a * 'a t + +(** val find : 'a1 -> 'a1 t -> positive -> 'a1 **) + +let rec find default vm p = + match vm with + | Empty -> default + | Leaf i -> i + | Node (l, e, r) -> + (match p with + | XI p2 -> find default r p2 + | XO p2 -> find default l p2 + | XH -> e) + +type zWitness = z coneMember + +(** val zWeakChecker : z nFormula list -> z coneMember -> bool **) + +let zWeakChecker x x0 = + check_normalised_formulas Z0 (Zpos XH) zplus zmult zminus zopp zeq_bool + zle_bool x x0 + +(** val xnormalise0 : z formula -> z nFormula list **) + +let xnormalise0 t0 = + let { flhs = lhs; fop = o; frhs = rhs } = t0 in + (match o with + | OpEq -> Cons ((Pair ((PEsub (lhs, (PEadd (rhs, (PEc (Zpos XH)))))), + NonStrict)), (Cons ((Pair ((PEsub (rhs, (PEadd (lhs, (PEc (Zpos + XH)))))), NonStrict)), Nil))) + | OpNEq -> Cons ((Pair ((PEsub (lhs, rhs)), Equal)), Nil) + | OpLe -> Cons ((Pair ((PEsub (lhs, (PEadd (rhs, (PEc (Zpos XH)))))), + NonStrict)), Nil) + | OpGe -> Cons ((Pair ((PEsub (rhs, (PEadd (lhs, (PEc (Zpos XH)))))), + NonStrict)), Nil) + | OpLt -> Cons ((Pair ((PEsub (lhs, rhs)), NonStrict)), Nil) + | OpGt -> Cons ((Pair ((PEsub (rhs, lhs)), NonStrict)), Nil)) + +(** val normalise : z formula -> z nFormula cnf **) + +let normalise t0 = + map (fun x -> Cons (x, Nil)) (xnormalise0 t0) + +(** val xnegate0 : z formula -> z nFormula list **) + +let xnegate0 t0 = + let { flhs = lhs; fop = o; frhs = rhs } = t0 in + (match o with + | OpEq -> Cons ((Pair ((PEsub (lhs, rhs)), Equal)), Nil) + | OpNEq -> Cons ((Pair ((PEsub (lhs, (PEadd (rhs, (PEc (Zpos XH)))))), + NonStrict)), (Cons ((Pair ((PEsub (rhs, (PEadd (lhs, (PEc (Zpos + XH)))))), NonStrict)), Nil))) + | OpLe -> Cons ((Pair ((PEsub (rhs, lhs)), NonStrict)), Nil) + | OpGe -> Cons ((Pair ((PEsub (lhs, rhs)), NonStrict)), Nil) + | OpLt -> Cons ((Pair ((PEsub (rhs, (PEadd (lhs, (PEc (Zpos XH)))))), + NonStrict)), Nil) + | OpGt -> Cons ((Pair ((PEsub (lhs, (PEadd (rhs, (PEc (Zpos XH)))))), + NonStrict)), Nil)) + +(** val negate : z formula -> z nFormula cnf **) + +let negate t0 = + map (fun x -> Cons (x, Nil)) (xnegate0 t0) + +(** val ceiling : z -> z -> z **) + +let ceiling a b = + let Pair (q0, r) = zdiv_eucl a b in + (match r with + | Z0 -> q0 + | _ -> zplus q0 (Zpos XH)) + +type proofTerm = + | RatProof of zWitness + | CutProof of z pExprC * q * zWitness * proofTerm + | EnumProof of q * z pExprC * q * zWitness * zWitness * proofTerm list + +(** val makeLb : z pExpr -> q -> z nFormula **) + +let makeLb v q0 = + let { qnum = n0; qden = d } = q0 in + Pair ((PEsub ((PEmul ((PEc (Zpos d)), v)), (PEc n0))), NonStrict) + +(** val qceiling : q -> z **) + +let qceiling q0 = + let { qnum = n0; qden = d } = q0 in ceiling n0 (Zpos d) + +(** val makeLbCut : z pExprC -> q -> z nFormula **) + +let makeLbCut v q0 = + Pair ((PEsub (v, (PEc (qceiling q0)))), NonStrict) + +(** val neg_nformula : z nFormula -> (z pExpr, op1) prod **) + +let neg_nformula = function + | Pair (e, o) -> Pair ((PEopp (PEadd (e, (PEc (Zpos XH))))), o) + +(** val cutChecker : + z nFormula list -> z pExpr -> q -> zWitness -> z nFormula option **) + +let cutChecker l e lb pf = + match zWeakChecker (Cons ((neg_nformula (makeLb e lb)), l)) pf with + | True -> Some (makeLbCut e lb) + | False -> None + +(** val zChecker : z nFormula list -> proofTerm -> bool **) + +let rec zChecker l = function + | RatProof pf0 -> zWeakChecker l pf0 + | CutProof (e, q0, pf0, rst) -> + (match cutChecker l e q0 pf0 with + | Some c -> zChecker (Cons (c, l)) rst + | None -> False) + | EnumProof (lb, e, ub, pf1, pf2, rst) -> + (match cutChecker l e lb pf1 with + | Some n0 -> + (match cutChecker l (PEopp e) (qopp ub) pf2 with + | Some n1 -> + let rec label pfs lb0 ub0 = + match pfs with + | Nil -> + (match z_gt_dec lb0 ub0 with + | Left -> True + | Right -> False) + | Cons (pf0, rsr) -> + (match zChecker (Cons ((Pair ((PEsub (e, (PEc + lb0))), Equal)), l)) pf0 with + | True -> label rsr (zplus lb0 (Zpos XH)) ub0 + | False -> False) + in label rst (qceiling lb) (zopp (qceiling (qopp ub))) + | None -> False) + | None -> False) + +(** val zTautoChecker : z formula bFormula -> proofTerm list -> bool **) + +let zTautoChecker f w = + tauto_checker normalise negate zChecker f w + +(** val map_cone : (nat -> nat) -> zWitness -> zWitness **) + +let rec map_cone f e = match e with + | S_In n0 -> S_In (f n0) + | S_Ideal (e0, cm) -> S_Ideal (e0, (map_cone f cm)) + | S_Monoid l -> S_Monoid (map f l) + | S_Mult (cm1, cm2) -> S_Mult ((map_cone f cm1), (map_cone f cm2)) + | S_Add (cm1, cm2) -> S_Add ((map_cone f cm1), (map_cone f cm2)) + | _ -> e + +(** val indexes : zWitness -> nat list **) + +let rec indexes = function + | S_In n0 -> Cons (n0, Nil) + | S_Ideal (e0, cm) -> indexes cm + | S_Monoid l -> l + | S_Mult (cm1, cm2) -> app (indexes cm1) (indexes cm2) + | S_Add (cm1, cm2) -> app (indexes cm1) (indexes cm2) + | _ -> Nil + +(** val n_of_Z : z -> n **) + +let n_of_Z = function + | Zpos p -> Npos p + | _ -> N0 + +(** val qeq_bool : q -> q -> bool **) + +let qeq_bool p q0 = + zeq_bool (zmult p.qnum (Zpos q0.qden)) (zmult q0.qnum (Zpos p.qden)) + +(** val qle_bool : q -> q -> bool **) + +let qle_bool x y = + zle_bool (zmult x.qnum (Zpos y.qden)) (zmult y.qnum (Zpos x.qden)) + +type qWitness = q coneMember + +(** val qWeakChecker : q nFormula list -> q coneMember -> bool **) + +let qWeakChecker x x0 = + check_normalised_formulas { qnum = Z0; qden = XH } { qnum = (Zpos XH); + qden = XH } qplus qmult qminus qopp qeq_bool qle_bool x x0 + +(** val qTautoChecker : q formula bFormula -> qWitness list -> bool **) + +let qTautoChecker f w = + tauto_checker (fun x -> cnf_normalise x) (fun x -> + cnf_negate x) qWeakChecker f w + diff --git a/contrib/micromega/micromega.mli b/contrib/micromega/micromega.mli new file mode 100644 index 00000000..f94f091e --- /dev/null +++ b/contrib/micromega/micromega.mli @@ -0,0 +1,398 @@ +type __ = Obj.t + +type bool = + | True + | False + +val negb : bool -> bool + +type nat = + | O + | S of nat + +type 'a option = + | Some of 'a + | None + +type ('a, 'b) prod = + | Pair of 'a * 'b + +type comparison = + | Eq + | Lt + | Gt + +val compOpp : comparison -> comparison + +type sumbool = + | Left + | Right + +type 'a sumor = + | Inleft of 'a + | Inright + +type 'a list = + | Nil + | Cons of 'a * 'a list + +val app : 'a1 list -> 'a1 list -> 'a1 list + +val nth : nat -> 'a1 list -> 'a1 -> 'a1 + +val map : ('a1 -> 'a2) -> 'a1 list -> 'a2 list + +type positive = + | XI of positive + | XO of positive + | XH + +val psucc : positive -> positive + +val pplus : positive -> positive -> positive + +val pplus_carry : positive -> positive -> positive + +val p_of_succ_nat : nat -> positive + +val pdouble_minus_one : positive -> positive + +type positive_mask = + | IsNul + | IsPos of positive + | IsNeg + +val pdouble_plus_one_mask : positive_mask -> positive_mask + +val pdouble_mask : positive_mask -> positive_mask + +val pdouble_minus_two : positive -> positive_mask + +val pminus_mask : positive -> positive -> positive_mask + +val pminus_mask_carry : positive -> positive -> positive_mask + +val pminus : positive -> positive -> positive + +val pmult : positive -> positive -> positive + +val pcompare : positive -> positive -> comparison -> comparison + +type n = + | N0 + | Npos of positive + +type z = + | Z0 + | Zpos of positive + | Zneg of positive + +val zdouble_plus_one : z -> z + +val zdouble_minus_one : z -> z + +val zdouble : z -> z + +val zPminus : positive -> positive -> z + +val zplus : z -> z -> z + +val zopp : z -> z + +val zminus : z -> z -> z + +val zmult : z -> z -> z + +val zcompare : z -> z -> comparison + +val dcompare_inf : comparison -> sumbool sumor + +val zcompare_rec : z -> z -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) -> 'a1 + +val z_gt_dec : z -> z -> sumbool + +val zle_bool : z -> z -> bool + +val zge_bool : z -> z -> bool + +val zgt_bool : z -> z -> bool + +val zeq_bool : z -> z -> bool + +val n_of_nat : nat -> n + +val zdiv_eucl_POS : positive -> z -> (z, z) prod + +val zdiv_eucl : z -> z -> (z, z) prod + +type 'c pol = + | Pc of 'c + | Pinj of positive * 'c pol + | PX of 'c pol * positive * 'c pol + +val p0 : 'a1 -> 'a1 pol + +val p1 : 'a1 -> 'a1 pol + +val peq : ('a1 -> 'a1 -> bool) -> 'a1 pol -> 'a1 pol -> bool + +val mkPinj_pred : positive -> 'a1 pol -> 'a1 pol + +val mkPX : + 'a1 -> ('a1 -> 'a1 -> bool) -> 'a1 pol -> positive -> 'a1 pol -> 'a1 pol + +val mkXi : 'a1 -> 'a1 -> positive -> 'a1 pol + +val mkX : 'a1 -> 'a1 -> 'a1 pol + +val popp : ('a1 -> 'a1) -> 'a1 pol -> 'a1 pol + +val paddC : ('a1 -> 'a1 -> 'a1) -> 'a1 pol -> 'a1 -> 'a1 pol + +val psubC : ('a1 -> 'a1 -> 'a1) -> 'a1 pol -> 'a1 -> 'a1 pol + +val paddI : + ('a1 -> 'a1 -> 'a1) -> ('a1 pol -> 'a1 pol -> 'a1 pol) -> 'a1 pol -> + positive -> 'a1 pol -> 'a1 pol + +val psubI : + ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1) -> ('a1 pol -> 'a1 pol -> 'a1 pol) -> + 'a1 pol -> positive -> 'a1 pol -> 'a1 pol + +val paddX : + 'a1 -> ('a1 -> 'a1 -> bool) -> ('a1 pol -> 'a1 pol -> 'a1 pol) -> 'a1 pol + -> positive -> 'a1 pol -> 'a1 pol + +val psubX : + 'a1 -> ('a1 -> 'a1) -> ('a1 -> 'a1 -> bool) -> ('a1 pol -> 'a1 pol -> 'a1 + pol) -> 'a1 pol -> positive -> 'a1 pol -> 'a1 pol + +val padd : + 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> bool) -> 'a1 pol -> 'a1 pol -> + 'a1 pol + +val psub : + 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1) -> ('a1 + -> 'a1 -> bool) -> 'a1 pol -> 'a1 pol -> 'a1 pol + +val pmulC_aux : + 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> bool) -> 'a1 pol -> 'a1 -> 'a1 + pol + +val pmulC : + 'a1 -> 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> bool) -> 'a1 pol -> 'a1 + -> 'a1 pol + +val pmulI : + 'a1 -> 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> bool) -> ('a1 pol -> + 'a1 pol -> 'a1 pol) -> 'a1 pol -> positive -> 'a1 pol -> 'a1 pol + +val pmul : + 'a1 -> 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> + bool) -> 'a1 pol -> 'a1 pol -> 'a1 pol + +type 'c pExpr = + | PEc of 'c + | PEX of positive + | PEadd of 'c pExpr * 'c pExpr + | PEsub of 'c pExpr * 'c pExpr + | PEmul of 'c pExpr * 'c pExpr + | PEopp of 'c pExpr + | PEpow of 'c pExpr * n + +val mk_X : 'a1 -> 'a1 -> positive -> 'a1 pol + +val ppow_pos : + 'a1 -> 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> + bool) -> ('a1 pol -> 'a1 pol) -> 'a1 pol -> 'a1 pol -> positive -> 'a1 pol + +val ppow_N : + 'a1 -> 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> + bool) -> ('a1 pol -> 'a1 pol) -> 'a1 pol -> n -> 'a1 pol + +val norm_aux : + 'a1 -> 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> + 'a1) -> ('a1 -> 'a1) -> ('a1 -> 'a1 -> bool) -> 'a1 pExpr -> 'a1 pol + +type 'a bFormula = + | TT + | FF + | X + | A of 'a + | Cj of 'a bFormula * 'a bFormula + | D of 'a bFormula * 'a bFormula + | N of 'a bFormula + | I of 'a bFormula * 'a bFormula + +type 'term' clause = 'term' list + +type 'term' cnf = 'term' clause list + +val tt : 'a1 cnf + +val ff : 'a1 cnf + +val or_clause_cnf : 'a1 clause -> 'a1 cnf -> 'a1 cnf + +val or_cnf : 'a1 cnf -> 'a1 cnf -> 'a1 cnf + +val and_cnf : 'a1 cnf -> 'a1 cnf -> 'a1 cnf + +val xcnf : + ('a1 -> 'a2 cnf) -> ('a1 -> 'a2 cnf) -> bool -> 'a1 bFormula -> 'a2 cnf + +val cnf_checker : ('a1 list -> 'a2 -> bool) -> 'a1 cnf -> 'a2 list -> bool + +val tauto_checker : + ('a1 -> 'a2 cnf) -> ('a1 -> 'a2 cnf) -> ('a2 list -> 'a3 -> bool) -> 'a1 + bFormula -> 'a3 list -> bool + +type 'c pExprC = 'c pExpr + +type 'c polC = 'c pol + +type op1 = + | Equal + | NonEqual + | Strict + | NonStrict + +type 'c nFormula = ('c pExprC, op1) prod + +type monoidMember = nat list + +type 'c coneMember = + | S_In of nat + | S_Ideal of 'c pExprC * 'c coneMember + | S_Square of 'c pExprC + | S_Monoid of monoidMember + | S_Mult of 'c coneMember * 'c coneMember + | S_Add of 'c coneMember * 'c coneMember + | S_Pos of 'c + | S_Z + +val nformula_times : 'a1 nFormula -> 'a1 nFormula -> 'a1 nFormula + +val nformula_plus : 'a1 nFormula -> 'a1 nFormula -> 'a1 nFormula + +val eval_monoid : 'a1 -> 'a1 nFormula list -> monoidMember -> 'a1 pExprC + +val eval_cone : + 'a1 -> 'a1 -> ('a1 -> 'a1 -> bool) -> ('a1 -> 'a1 -> bool) -> 'a1 nFormula + list -> 'a1 coneMember -> 'a1 nFormula + +val normalise_pexpr : + 'a1 -> 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> + 'a1) -> ('a1 -> 'a1) -> ('a1 -> 'a1 -> bool) -> 'a1 pExprC -> 'a1 polC + +val check_inconsistent : + 'a1 -> 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> + 'a1) -> ('a1 -> 'a1) -> ('a1 -> 'a1 -> bool) -> ('a1 -> 'a1 -> bool) -> 'a1 + nFormula -> bool + +val check_normalised_formulas : + 'a1 -> 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> + 'a1) -> ('a1 -> 'a1) -> ('a1 -> 'a1 -> bool) -> ('a1 -> 'a1 -> bool) -> 'a1 + nFormula list -> 'a1 coneMember -> bool + +type op2 = + | OpEq + | OpNEq + | OpLe + | OpGe + | OpLt + | OpGt + +type 'c formula = { flhs : 'c pExprC; fop : op2; frhs : 'c pExprC } + +val flhs : 'a1 formula -> 'a1 pExprC + +val fop : 'a1 formula -> op2 + +val frhs : 'a1 formula -> 'a1 pExprC + +val xnormalise : 'a1 formula -> 'a1 nFormula list + +val cnf_normalise : 'a1 formula -> 'a1 nFormula cnf + +val xnegate : 'a1 formula -> 'a1 nFormula list + +val cnf_negate : 'a1 formula -> 'a1 nFormula cnf + +val simpl_expr : 'a1 -> ('a1 -> 'a1 -> bool) -> 'a1 pExprC -> 'a1 pExprC + +val simpl_cone : + 'a1 -> 'a1 -> ('a1 -> 'a1 -> 'a1) -> ('a1 -> 'a1 -> bool) -> 'a1 coneMember + -> 'a1 coneMember + +type q = { qnum : z; qden : positive } + +val qnum : q -> z + +val qden : q -> positive + +val qplus : q -> q -> q + +val qmult : q -> q -> q + +val qopp : q -> q + +val qminus : q -> q -> q + +type 'a t = + | Empty + | Leaf of 'a + | Node of 'a t * 'a * 'a t + +val find : 'a1 -> 'a1 t -> positive -> 'a1 + +type zWitness = z coneMember + +val zWeakChecker : z nFormula list -> z coneMember -> bool + +val xnormalise0 : z formula -> z nFormula list + +val normalise : z formula -> z nFormula cnf + +val xnegate0 : z formula -> z nFormula list + +val negate : z formula -> z nFormula cnf + +val ceiling : z -> z -> z + +type proofTerm = + | RatProof of zWitness + | CutProof of z pExprC * q * zWitness * proofTerm + | EnumProof of q * z pExprC * q * zWitness * zWitness * proofTerm list + +val makeLb : z pExpr -> q -> z nFormula + +val qceiling : q -> z + +val makeLbCut : z pExprC -> q -> z nFormula + +val neg_nformula : z nFormula -> (z pExpr, op1) prod + +val cutChecker : + z nFormula list -> z pExpr -> q -> zWitness -> z nFormula option + +val zChecker : z nFormula list -> proofTerm -> bool + +val zTautoChecker : z formula bFormula -> proofTerm list -> bool + +val map_cone : (nat -> nat) -> zWitness -> zWitness + +val indexes : zWitness -> nat list + +val n_of_Z : z -> n + +val qeq_bool : q -> q -> bool + +val qle_bool : q -> q -> bool + +type qWitness = q coneMember + +val qWeakChecker : q nFormula list -> q coneMember -> bool + +val qTautoChecker : q formula bFormula -> qWitness list -> bool + diff --git a/contrib/micromega/mutils.ml b/contrib/micromega/mutils.ml new file mode 100644 index 00000000..2473608f --- /dev/null +++ b/contrib/micromega/mutils.ml @@ -0,0 +1,305 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* None + | (f,s)::l -> match f x with + | None -> try_any l x + | x -> x + +let list_try_find f = + let rec try_find_f = function + | [] -> failwith "try_find" + | h::t -> try f h with Failure _ -> try_find_f t + in + try_find_f + +let rec list_fold_right_elements f l = + let rec aux = function + | [] -> invalid_arg "list_fold_right_elements" + | [x] -> x + | x::l -> f x (aux l) in + aux l + +let interval n m = + let rec interval_n (l,m) = + if n > m then l else interval_n (m::l,pred m) + in + interval_n ([],m) + +open Num +open Big_int + +let ppcm x y = + let g = gcd_big_int x y in + let x' = div_big_int x g in + let y' = div_big_int y g in + mult_big_int g (mult_big_int x' y') + + +let denominator = function + | Int _ | Big_int _ -> unit_big_int + | Ratio r -> Ratio.denominator_ratio r + +let numerator = function + | Ratio r -> Ratio.numerator_ratio r + | Int i -> Big_int.big_int_of_int i + | Big_int i -> i + +let rec ppcm_list c l = + match l with + | [] -> c + | e::l -> ppcm_list (ppcm c (denominator e)) l + +let rec rec_gcd_list c l = + match l with + | [] -> c + | e::l -> rec_gcd_list (gcd_big_int c (numerator e)) l + +let rec gcd_list l = + let res = rec_gcd_list zero_big_int l in + if compare_big_int res zero_big_int = 0 + then unit_big_int else res + + + +let rats_to_ints l = + let c = ppcm_list unit_big_int l in + List.map (fun x -> (div_big_int (mult_big_int (numerator x) c) + (denominator x))) l + +(* Nasty reordering of lists - useful to trim certificate down *) +let mapi f l = + let rec xmapi i l = + match l with + | [] -> [] + | e::l -> (f e i)::(xmapi (i+1) l) in + xmapi 0 l + + +let concatMapi f l = List.rev (mapi (fun e i -> (i,f e)) l) + +(* assoc_pos j [a0...an] = [j,a0....an,j+n],j+n+1 *) +let assoc_pos j l = (mapi (fun e i -> e,i+j) l, j + (List.length l)) + +let assoc_pos_assoc l = + let rec xpos i l = + match l with + | [] -> [] + | (x,l) ::rst -> let (l',j) = assoc_pos i l in + (x,l')::(xpos j rst) in + xpos 0 l + +let filter_pos f l = + (* Could sort ... take care of duplicates... *) + let rec xfilter l = + match l with + | [] -> [] + | (x,e)::l -> + if List.exists (fun ee -> List.mem ee f) (List.map snd e) + then (x,e)::(xfilter l) + else xfilter l in + xfilter l + +let select_pos lpos l = + let rec xselect i lpos l = + match lpos with + | [] -> [] + | j::rpos -> + match l with + | [] -> failwith "select_pos" + | e::l -> + if i = j + then e:: (xselect (i+1) rpos l) + else xselect (i+1) lpos l in + xselect 0 lpos l + + +module CoqToCaml = +struct + open Micromega + + let rec nat = function + | O -> 0 + | S n -> (nat n) + 1 + + + let rec positive p = + match p with + | XH -> 1 + | XI p -> 1+ 2*(positive p) + | XO p -> 2*(positive p) + + + let n nt = + match nt with + | N0 -> 0 + | Npos p -> positive p + + + let rec index i = (* Swap left-right ? *) + match i with + | XH -> 1 + | XI i -> 1+(2*(index i)) + | XO i -> 2*(index i) + + + let z x = + match x with + | Z0 -> 0 + | Zpos p -> (positive p) + | Zneg p -> - (positive p) + + open Big_int + + let rec positive_big_int p = + match p with + | XH -> unit_big_int + | XI p -> add_int_big_int 1 (mult_int_big_int 2 (positive_big_int p)) + | XO p -> (mult_int_big_int 2 (positive_big_int p)) + + + let z_big_int x = + match x with + | Z0 -> zero_big_int + | Zpos p -> (positive_big_int p) + | Zneg p -> minus_big_int (positive_big_int p) + + + let num x = Num.Big_int (z_big_int x) + + let rec list elt l = + match l with + | Nil -> [] + | Cons(e,l) -> (elt e)::(list elt l) + + let q_to_num {qnum = x ; qden = y} = + Big_int (z_big_int x) // (Big_int (z_big_int (Zpos y))) + +end + + +module CamlToCoq = +struct + open Micromega + + let rec nat = function + | 0 -> O + | n -> S (nat (n-1)) + + + let rec positive n = + if n=1 then XH + else if n land 1 = 1 then XI (positive (n lsr 1)) + else XO (positive (n lsr 1)) + + let n nt = + if nt < 0 + then assert false + else if nt = 0 then N0 + else Npos (positive nt) + + + + + + let rec index n = + if n=1 then XH + else if n land 1 = 1 then XI (index (n lsr 1)) + else XO (index (n lsr 1)) + + + let idx n = + (*a.k.a path_of_int *) + (* returns the list of digits of n in reverse order with + initial 1 removed *) + let rec digits_of_int n = + if n=1 then [] + else (n mod 2 = 1)::(digits_of_int (n lsr 1)) + in + List.fold_right + (fun b c -> (if b then XI c else XO c)) + (List.rev (digits_of_int n)) + (XH) + + + + let z x = + match compare x 0 with + | 0 -> Z0 + | 1 -> Zpos (positive x) + | _ -> (* this should be -1 *) + Zneg (positive (-x)) + + open Big_int + + let positive_big_int n = + let two = big_int_of_int 2 in + let rec _pos n = + if eq_big_int n unit_big_int then XH + else + let (q,m) = quomod_big_int n two in + if eq_big_int unit_big_int m + then XI (_pos q) + else XO (_pos q) in + _pos n + + let bigint x = + match sign_big_int x with + | 0 -> Z0 + | 1 -> Zpos (positive_big_int x) + | _ -> Zneg (positive_big_int (minus_big_int x)) + + let q n = + {Micromega.qnum = bigint (numerator n) ; + Micromega.qden = positive_big_int (denominator n)} + + + let list elt l = List.fold_right (fun x l -> Cons(elt x, l)) l Nil + +end + +module Cmp = +struct + + let rec compare_lexical l = + match l with + | [] -> 0 (* Equal *) + | f::l -> + let cmp = f () in + if cmp = 0 then compare_lexical l else cmp + + let rec compare_list cmp l1 l2 = + match l1 , l2 with + | [] , [] -> 0 + | [] , _ -> -1 + | _ , [] -> 1 + | e1::l1 , e2::l2 -> + let c = cmp e1 e2 in + if c = 0 then compare_list cmp l1 l2 else c + + let hash_list hash l = + let rec _hash_list l h = + match l with + | [] -> h lxor (Hashtbl.hash []) + | e::l -> _hash_list l ((hash e) lxor h) in + + _hash_list l 0 +end diff --git a/contrib/micromega/sos.ml b/contrib/micromega/sos.ml new file mode 100644 index 00000000..e3d72ed9 --- /dev/null +++ b/contrib/micromega/sos.ml @@ -0,0 +1,1919 @@ +(* ========================================================================= *) +(* - This code originates from John Harrison's HOL LIGHT 2.20 *) +(* (see file LICENSE.sos for license, copyright and disclaimer) *) +(* - Laurent Théry (thery@sophia.inria.fr) has isolated the HOL *) +(* independent bits *) +(* - Frédéric Besson (fbesson@irisa.fr) is using it to feed micromega *) +(* - Addition of a csdp cache by the Coq development team *) +(* ========================================================================= *) + +(* ========================================================================= *) +(* Nonlinear universal reals procedure using SOS decomposition. *) +(* ========================================================================= *) + +open Num;; +open List;; + +let debugging = ref false;; + +exception Sanity;; + +exception Unsolvable;; + +(* ------------------------------------------------------------------------- *) +(* Comparisons that are reflexive on NaN and also short-circuiting. *) +(* ------------------------------------------------------------------------- *) + +let (=?) = fun x y -> Pervasives.compare x y = 0;; +let ( Pervasives.compare x y < 0;; +let (<=?) = fun x y -> Pervasives.compare x y <= 0;; +let (>?) = fun x y -> Pervasives.compare x y > 0;; +let (>=?) = fun x y -> Pervasives.compare x y >= 0;; + +(* ------------------------------------------------------------------------- *) +(* Combinators. *) +(* ------------------------------------------------------------------------- *) + +let (o) = fun f g x -> f(g x);; + +(* ------------------------------------------------------------------------- *) +(* Some useful functions on "num" type. *) +(* ------------------------------------------------------------------------- *) + + +let num_0 = Int 0 +and num_1 = Int 1 +and num_2 = Int 2 +and num_10 = Int 10;; + +let pow2 n = power_num num_2 (Int n);; +let pow10 n = power_num num_10 (Int n);; + +let numdom r = + let r' = Ratio.normalize_ratio (ratio_of_num r) in + num_of_big_int(Ratio.numerator_ratio r'), + num_of_big_int(Ratio.denominator_ratio r');; + +let numerator = (o) fst numdom +and denominator = (o) snd numdom;; + +let gcd_num n1 n2 = + num_of_big_int(Big_int.gcd_big_int (big_int_of_num n1) (big_int_of_num n2));; + +let lcm_num x y = + if x =/ num_0 & y =/ num_0 then num_0 + else abs_num((x */ y) // gcd_num x y);; + + +(* ------------------------------------------------------------------------- *) +(* List basics. *) +(* ------------------------------------------------------------------------- *) + +let rec el n l = + if n = 0 then hd l else el (n - 1) (tl l);; + + +(* ------------------------------------------------------------------------- *) +(* Various versions of list iteration. *) +(* ------------------------------------------------------------------------- *) + +let rec itlist f l b = + match l with + [] -> b + | (h::t) -> f h (itlist f t b);; + +let rec end_itlist f l = + match l with + [] -> failwith "end_itlist" + | [x] -> x + | (h::t) -> f h (end_itlist f t);; + +let rec itlist2 f l1 l2 b = + match (l1,l2) with + ([],[]) -> b + | (h1::t1,h2::t2) -> f h1 h2 (itlist2 f t1 t2 b) + | _ -> failwith "itlist2";; + +(* ------------------------------------------------------------------------- *) +(* All pairs arising from applying a function over two lists. *) +(* ------------------------------------------------------------------------- *) + +let rec allpairs f l1 l2 = + match l1 with + h1::t1 -> itlist (fun x a -> f h1 x :: a) l2 (allpairs f t1 l2) + | [] -> [];; + +(* ------------------------------------------------------------------------- *) +(* String operations (surely there is a better way...) *) +(* ------------------------------------------------------------------------- *) + +let implode l = itlist (^) l "";; + +let explode s = + let rec exap n l = + if n < 0 then l else + exap (n - 1) ((String.sub s n 1)::l) in + exap (String.length s - 1) [];; + + +(* ------------------------------------------------------------------------- *) +(* Attempting function or predicate applications. *) +(* ------------------------------------------------------------------------- *) + +let can f x = try (f x; true) with Failure _ -> false;; + + +(* ------------------------------------------------------------------------- *) +(* Repetition of a function. *) +(* ------------------------------------------------------------------------- *) + +let rec funpow n f x = + if n < 1 then x else funpow (n-1) f (f x);; + + +(* ------------------------------------------------------------------------- *) +(* term?? *) +(* ------------------------------------------------------------------------- *) + +type vname = string;; + +type term = +| Zero +| Const of Num.num +| Var of vname +| Inv of term +| Opp of term +| Add of (term * term) +| Sub of (term * term) +| Mul of (term * term) +| Div of (term * term) +| Pow of (term * int);; + + +(* ------------------------------------------------------------------------- *) +(* Data structure for Positivstellensatz refutations. *) +(* ------------------------------------------------------------------------- *) + +type positivstellensatz = + Axiom_eq of int + | Axiom_le of int + | Axiom_lt of int + | Rational_eq of num + | Rational_le of num + | Rational_lt of num + | Square of term + | Monoid of int list + | Eqmul of term * positivstellensatz + | Sum of positivstellensatz * positivstellensatz + | Product of positivstellensatz * positivstellensatz;; + + + +(* ------------------------------------------------------------------------- *) +(* Replication and sequences. *) +(* ------------------------------------------------------------------------- *) + +let rec replicate x n = + if n < 1 then [] + else x::(replicate x (n - 1));; + +let rec (--) = fun m n -> if m > n then [] else m::((m + 1) -- n);; + +(* ------------------------------------------------------------------------- *) +(* Various useful list operations. *) +(* ------------------------------------------------------------------------- *) + +let rec forall p l = + match l with + [] -> true + | h::t -> p(h) & forall p t;; + +let rec tryfind f l = + match l with + [] -> failwith "tryfind" + | (h::t) -> try f h with Failure _ -> tryfind f t;; + +let index x = + let rec ind n l = + match l with + [] -> failwith "index" + | (h::t) -> if x =? h then n else ind (n + 1) t in + ind 0;; + +(* ------------------------------------------------------------------------- *) +(* "Set" operations on lists. *) +(* ------------------------------------------------------------------------- *) + +let rec mem x lis = + match lis with + [] -> false + | (h::t) -> x =? h or mem x t;; + +let insert x l = + if mem x l then l else x::l;; + +let union l1 l2 = itlist insert l1 l2;; + +let subtract l1 l2 = filter (fun x -> not (mem x l2)) l1;; + +(* ------------------------------------------------------------------------- *) +(* Merging and bottom-up mergesort. *) +(* ------------------------------------------------------------------------- *) + +let rec merge ord l1 l2 = + match l1 with + [] -> l2 + | h1::t1 -> match l2 with + [] -> l1 + | h2::t2 -> if ord h1 h2 then h1::(merge ord t1 l2) + else h2::(merge ord l1 t2);; + + +(* ------------------------------------------------------------------------- *) +(* Common measure predicates to use with "sort". *) +(* ------------------------------------------------------------------------- *) + +let increasing f x y = f x ? f y;; + +(* ------------------------------------------------------------------------- *) +(* Zipping, unzipping etc. *) +(* ------------------------------------------------------------------------- *) + +let rec zip l1 l2 = + match (l1,l2) with + ([],[]) -> [] + | (h1::t1,h2::t2) -> (h1,h2)::(zip t1 t2) + | _ -> failwith "zip";; + +let rec unzip = + function [] -> [],[] + | ((a,b)::rest) -> let alist,blist = unzip rest in + (a::alist,b::blist);; + +(* ------------------------------------------------------------------------- *) +(* Iterating functions over lists. *) +(* ------------------------------------------------------------------------- *) + +let rec do_list f l = + match l with + [] -> () + | (h::t) -> (f h; do_list f t);; + +(* ------------------------------------------------------------------------- *) +(* Sorting. *) +(* ------------------------------------------------------------------------- *) + +let rec sort cmp lis = + match lis with + [] -> [] + | piv::rest -> + let r,l = partition (cmp piv) rest in + (sort cmp l) @ (piv::(sort cmp r));; + +(* ------------------------------------------------------------------------- *) +(* Removing adjacent (NB!) equal elements from list. *) +(* ------------------------------------------------------------------------- *) + +let rec uniq l = + match l with + x::(y::_ as t) -> let t' = uniq t in + if x =? y then t' else + if t'==t then l else x::t' + | _ -> l;; + +(* ------------------------------------------------------------------------- *) +(* Convert list into set by eliminating duplicates. *) +(* ------------------------------------------------------------------------- *) + +let setify s = uniq (sort (<=?) s);; + +(* ------------------------------------------------------------------------- *) +(* Polymorphic finite partial functions via Patricia trees. *) +(* *) +(* The point of this strange representation is that it is canonical (equal *) +(* functions have the same encoding) yet reasonably efficient on average. *) +(* *) +(* Idea due to Diego Olivier Fernandez Pons (OCaml list, 2003/11/10). *) +(* ------------------------------------------------------------------------- *) + +type ('a,'b)func = + Empty + | Leaf of int * ('a*'b)list + | Branch of int * int * ('a,'b)func * ('a,'b)func;; + +(* ------------------------------------------------------------------------- *) +(* Undefined function. *) +(* ------------------------------------------------------------------------- *) + +let undefined = Empty;; + +(* ------------------------------------------------------------------------- *) +(* In case of equality comparison worries, better use this. *) +(* ------------------------------------------------------------------------- *) + +let is_undefined f = + match f with + Empty -> true + | _ -> false;; + +(* ------------------------------------------------------------------------- *) +(* Operation analagous to "map" for lists. *) +(* ------------------------------------------------------------------------- *) + +let mapf = + let rec map_list f l = + match l with + [] -> [] + | (x,y)::t -> (x,f(y))::(map_list f t) in + let rec mapf f t = + match t with + Empty -> Empty + | Leaf(h,l) -> Leaf(h,map_list f l) + | Branch(p,b,l,r) -> Branch(p,b,mapf f l,mapf f r) in + mapf;; + +(* ------------------------------------------------------------------------- *) +(* Operations analogous to "fold" for lists. *) +(* ------------------------------------------------------------------------- *) + +let foldl = + let rec foldl_list f a l = + match l with + [] -> a + | (x,y)::t -> foldl_list f (f a x y) t in + let rec foldl f a t = + match t with + Empty -> a + | Leaf(h,l) -> foldl_list f a l + | Branch(p,b,l,r) -> foldl f (foldl f a l) r in + foldl;; + +let foldr = + let rec foldr_list f l a = + match l with + [] -> a + | (x,y)::t -> f x y (foldr_list f t a) in + let rec foldr f t a = + match t with + Empty -> a + | Leaf(h,l) -> foldr_list f l a + | Branch(p,b,l,r) -> foldr f l (foldr f r a) in + foldr;; + +(* ------------------------------------------------------------------------- *) +(* Redefinition and combination. *) +(* ------------------------------------------------------------------------- *) + +let (|->),combine = + let ldb x y = let z = x lxor y in z land (-z) in + let newbranch p1 t1 p2 t2 = + let b = ldb p1 p2 in + let p = p1 land (b - 1) in + if p1 land b = 0 then Branch(p,b,t1,t2) + else Branch(p,b,t2,t1) in + let rec define_list (x,y as xy) l = + match l with + (a,b as ab)::t -> + if x =? a then xy::t + else if x [xy] + and combine_list op z l1 l2 = + match (l1,l2) with + [],_ -> l2 + | _,[] -> l1 + | ((x1,y1 as xy1)::t1,(x2,y2 as xy2)::t2) -> + if x1 ) x y = + let k = Hashtbl.hash x in + let rec upd t = + match t with + Empty -> Leaf (k,[x,y]) + | Leaf(h,l) -> + if h = k then Leaf(h,define_list (x,y) l) + else newbranch h t k (Leaf(k,[x,y])) + | Branch(p,b,l,r) -> + if k land (b - 1) <> p then newbranch p t k (Leaf(k,[x,y])) + else if k land b = 0 then Branch(p,b,upd l,r) + else Branch(p,b,l,upd r) in + upd in + let rec combine op z t1 t2 = + match (t1,t2) with + Empty,_ -> t2 + | _,Empty -> t1 + | Leaf(h1,l1),Leaf(h2,l2) -> + if h1 = h2 then + let l = combine_list op z l1 l2 in + if l = [] then Empty else Leaf(h1,l) + else newbranch h1 t1 h2 t2 + | (Leaf(k,lis) as lf),(Branch(p,b,l,r) as br) | + (Branch(p,b,l,r) as br),(Leaf(k,lis) as lf) -> + if k land (b - 1) = p then + if k land b = 0 then + let l' = combine op z lf l in + if is_undefined l' then r else Branch(p,b,l',r) + else + let r' = combine op z lf r in + if is_undefined r' then l else Branch(p,b,l,r') + else + newbranch k lf p br + | Branch(p1,b1,l1,r1),Branch(p2,b2,l2,r2) -> + if b1 < b2 then + if p2 land (b1 - 1) <> p1 then newbranch p1 t1 p2 t2 + else if p2 land b1 = 0 then + let l = combine op z l1 t2 in + if is_undefined l then r1 else Branch(p1,b1,l,r1) + else + let r = combine op z r1 t2 in + if is_undefined r then l1 else Branch(p1,b1,l1,r) + else if b2 < b1 then + if p1 land (b2 - 1) <> p2 then newbranch p1 t1 p2 t2 + else if p1 land b2 = 0 then + let l = combine op z t1 l2 in + if is_undefined l then r2 else Branch(p2,b2,l,r2) + else + let r = combine op z t1 r2 in + if is_undefined r then l2 else Branch(p2,b2,l2,r) + else if p1 = p2 then + let l = combine op z l1 l2 and r = combine op z r1 r2 in + if is_undefined l then r + else if is_undefined r then l else Branch(p1,b1,l,r) + else + newbranch p1 t1 p2 t2 in + (|->),combine;; + +(* ------------------------------------------------------------------------- *) +(* Special case of point function. *) +(* ------------------------------------------------------------------------- *) + +let (|=>) = fun x y -> (x |-> y) undefined;; + + +(* ------------------------------------------------------------------------- *) +(* Grab an arbitrary element. *) +(* ------------------------------------------------------------------------- *) + +let rec choose t = + match t with + Empty -> failwith "choose: completely undefined function" + | Leaf(h,l) -> hd l + | Branch(b,p,t1,t2) -> choose t1;; + +(* ------------------------------------------------------------------------- *) +(* Application. *) +(* ------------------------------------------------------------------------- *) + +let applyd = + let rec apply_listd l d x = + match l with + (a,b)::t -> if x =? a then b + else if x >? a then apply_listd t d x else d x + | [] -> d x in + fun f d x -> + let k = Hashtbl.hash x in + let rec look t = + match t with + Leaf(h,l) when h = k -> apply_listd l d x + | Branch(p,b,l,r) -> look (if k land b = 0 then l else r) + | _ -> d x in + look f;; + +let apply f = applyd f (fun x -> failwith "apply");; + +let tryapplyd f a d = applyd f (fun x -> d) a;; + +let defined f x = try apply f x; true with Failure _ -> false;; + +(* ------------------------------------------------------------------------- *) +(* Undefinition. *) +(* ------------------------------------------------------------------------- *) + +let undefine = + let rec undefine_list x l = + match l with + (a,b as ab)::t -> + if x =? a then t + else if x [] in + fun x -> + let k = Hashtbl.hash x in + let rec und t = + match t with + Leaf(h,l) when h = k -> + let l' = undefine_list x l in + if l' == l then t + else if l' = [] then Empty + else Leaf(h,l') + | Branch(p,b,l,r) when k land (b - 1) = p -> + if k land b = 0 then + let l' = und l in + if l' == l then t + else if is_undefined l' then r + else Branch(p,b,l',r) + else + let r' = und r in + if r' == r then t + else if is_undefined r' then l + else Branch(p,b,l,r') + | _ -> t in + und;; + + +(* ------------------------------------------------------------------------- *) +(* Mapping to sorted-list representation of the graph, domain and range. *) +(* ------------------------------------------------------------------------- *) + +let graph f = setify (foldl (fun a x y -> (x,y)::a) [] f);; + +let dom f = setify(foldl (fun a x y -> x::a) [] f);; + +let ran f = setify(foldl (fun a x y -> y::a) [] f);; + +(* ------------------------------------------------------------------------- *) +(* Turn a rational into a decimal string with d sig digits. *) +(* ------------------------------------------------------------------------- *) + +let decimalize = + let rec normalize y = + if abs_num y =/ Int 1 then normalize (y // Int 10) + 1 + else 0 in + fun d x -> + if x =/ Int 0 then "0.0" else + let y = abs_num x in + let e = normalize y in + let z = pow10(-e) */ y +/ Int 1 in + let k = round_num(pow10 d */ z) in + (if x a + | h::t -> itern (k + 1) t f (f h k a);; + +let rec iter (m,n) f a = + if n < m then a + else iter (m+1,n) f (f m a);; + +(* ------------------------------------------------------------------------- *) +(* The main types. *) +(* ------------------------------------------------------------------------- *) + +type vector = int*(int,num)func;; + +type matrix = (int*int)*(int*int,num)func;; + +type monomial = (vname,int)func;; + +type poly = (monomial,num)func;; + +(* ------------------------------------------------------------------------- *) +(* Assignment avoiding zeros. *) +(* ------------------------------------------------------------------------- *) + +let (|-->) x y a = if y =/ Int 0 then a else (x |-> y) a;; + +(* ------------------------------------------------------------------------- *) +(* This can be generic. *) +(* ------------------------------------------------------------------------- *) + +let element (d,v) i = tryapplyd v i (Int 0);; + +let mapa f (d,v) = + d,foldl (fun a i c -> (i |--> f(c)) a) undefined v;; + +let is_zero (d,v) = + match v with + Empty -> true + | _ -> false;; + +(* ------------------------------------------------------------------------- *) +(* Vectors. Conventionally indexed 1..n. *) +(* ------------------------------------------------------------------------- *) + +let vector_0 n = (n,undefined:vector);; + +let dim (v:vector) = fst v;; + +let vector_const c n = + if c =/ Int 0 then vector_0 n + else (n,itlist (fun k -> k |-> c) (1--n) undefined :vector);; + +let vector_1 = vector_const (Int 1);; + +let vector_cmul c (v:vector) = + let n = dim v in + if c =/ Int 0 then vector_0 n + else n,mapf (fun x -> c */ x) (snd v);; + +let vector_neg (v:vector) = (fst v,mapf minus_num (snd v) :vector);; + +let vector_add (v1:vector) (v2:vector) = + let m = dim v1 and n = dim v2 in + if m <> n then failwith "vector_add: incompatible dimensions" else + (n,combine (+/) (fun x -> x =/ Int 0) (snd v1) (snd v2) :vector);; + +let vector_sub v1 v2 = vector_add v1 (vector_neg v2);; + +let vector_of_list l = + let n = length l in + (n,itlist2 (|->) (1--n) l undefined :vector);; + +(* ------------------------------------------------------------------------- *) +(* Matrices; again rows and columns indexed from 1. *) +(* ------------------------------------------------------------------------- *) + +let matrix_0 (m,n) = ((m,n),undefined:matrix);; + +let dimensions (m:matrix) = fst m;; + +let matrix_const c (m,n as mn) = + if m <> n then failwith "matrix_const: needs to be square" + else if c =/ Int 0 then matrix_0 mn + else (mn,itlist (fun k -> (k,k) |-> c) (1--n) undefined :matrix);; + +let matrix_1 = matrix_const (Int 1);; + +let matrix_cmul c (m:matrix) = + let (i,j) = dimensions m in + if c =/ Int 0 then matrix_0 (i,j) + else (i,j),mapf (fun x -> c */ x) (snd m);; + +let matrix_neg (m:matrix) = (dimensions m,mapf minus_num (snd m) :matrix);; + +let matrix_add (m1:matrix) (m2:matrix) = + let d1 = dimensions m1 and d2 = dimensions m2 in + if d1 <> d2 then failwith "matrix_add: incompatible dimensions" + else (d1,combine (+/) (fun x -> x =/ Int 0) (snd m1) (snd m2) :matrix);; + +let matrix_sub m1 m2 = matrix_add m1 (matrix_neg m2);; + +let row k (m:matrix) = + let i,j = dimensions m in + (j, + foldl (fun a (i,j) c -> if i = k then (j |-> c) a else a) undefined (snd m) + : vector);; + +let column k (m:matrix) = + let i,j = dimensions m in + (i, + foldl (fun a (i,j) c -> if j = k then (i |-> c) a else a) undefined (snd m) + : vector);; + +let transp (m:matrix) = + let i,j = dimensions m in + ((j,i),foldl (fun a (i,j) c -> ((j,i) |-> c) a) undefined (snd m) :matrix);; + +let diagonal (v:vector) = + let n = dim v in + ((n,n),foldl (fun a i c -> ((i,i) |-> c) a) undefined (snd v) : matrix);; + +let matrix_of_list l = + let m = length l in + if m = 0 then matrix_0 (0,0) else + let n = length (hd l) in + (m,n),itern 1 l (fun v i -> itern 1 v (fun c j -> (i,j) |-> c)) undefined;; + +(* ------------------------------------------------------------------------- *) +(* Monomials. *) +(* ------------------------------------------------------------------------- *) + +let monomial_eval assig (m:monomial) = + foldl (fun a x k -> a */ power_num (apply assig x) (Int k)) + (Int 1) m;; + +let monomial_1 = (undefined:monomial);; + +let monomial_var x = (x |=> 1 :monomial);; + +let (monomial_mul:monomial->monomial->monomial) = + combine (+) (fun x -> false);; + +let monomial_pow (m:monomial) k = + if k = 0 then monomial_1 + else mapf (fun x -> k * x) m;; + +let monomial_divides (m1:monomial) (m2:monomial) = + foldl (fun a x k -> tryapplyd m2 x 0 >= k & a) true m1;; + +let monomial_div (m1:monomial) (m2:monomial) = + let m = combine (+) (fun x -> x = 0) m1 (mapf (fun x -> -x) m2) in + if foldl (fun a x k -> k >= 0 & a) true m then m + else failwith "monomial_div: non-divisible";; + +let monomial_degree x (m:monomial) = tryapplyd m x 0;; + +let monomial_lcm (m1:monomial) (m2:monomial) = + (itlist (fun x -> x |-> max (monomial_degree x m1) (monomial_degree x m2)) + (union (dom m1) (dom m2)) undefined :monomial);; + +let monomial_multidegree (m:monomial) = foldl (fun a x k -> k + a) 0 m;; + +let monomial_variables m = dom m;; + +(* ------------------------------------------------------------------------- *) +(* Polynomials. *) +(* ------------------------------------------------------------------------- *) + +let eval assig (p:poly) = + foldl (fun a m c -> a +/ c */ monomial_eval assig m) (Int 0) p;; + +let poly_0 = (undefined:poly);; + +let poly_isconst (p:poly) = foldl (fun a m c -> m = monomial_1 & a) true p;; + +let poly_var x = ((monomial_var x) |=> Int 1 :poly);; + +let poly_const c = + if c =/ Int 0 then poly_0 else (monomial_1 |=> c);; + +let poly_cmul c (p:poly) = + if c =/ Int 0 then poly_0 + else mapf (fun x -> c */ x) p;; + +let poly_neg (p:poly) = (mapf minus_num p :poly);; + +let poly_add (p1:poly) (p2:poly) = + (combine (+/) (fun x -> x =/ Int 0) p1 p2 :poly);; + +let poly_sub p1 p2 = poly_add p1 (poly_neg p2);; + +let poly_cmmul (c,m) (p:poly) = + if c =/ Int 0 then poly_0 + else if m = monomial_1 then mapf (fun d -> c */ d) p + else foldl (fun a m' d -> (monomial_mul m m' |-> c */ d) a) poly_0 p;; + +let poly_mul (p1:poly) (p2:poly) = + foldl (fun a m c -> poly_add (poly_cmmul (c,m) p2) a) poly_0 p1;; + +let poly_div (p1:poly) (p2:poly) = + if not(poly_isconst p2) then failwith "poly_div: non-constant" else + let c = eval undefined p2 in + if c =/ Int 0 then failwith "poly_div: division by zero" + else poly_cmul (Int 1 // c) p1;; + +let poly_square p = poly_mul p p;; + +let rec poly_pow p k = + if k = 0 then poly_const (Int 1) + else if k = 1 then p + else let q = poly_square(poly_pow p (k / 2)) in + if k mod 2 = 1 then poly_mul p q else q;; + +let poly_exp p1 p2 = + if not(poly_isconst p2) then failwith "poly_exp: not a constant" else + poly_pow p1 (Num.int_of_num (eval undefined p2));; + +let degree x (p:poly) = foldl (fun a m c -> max (monomial_degree x m) a) 0 p;; + +let multidegree (p:poly) = + foldl (fun a m c -> max (monomial_multidegree m) a) 0 p;; + +let poly_variables (p:poly) = + foldr (fun m c -> union (monomial_variables m)) p [];; + +(* ------------------------------------------------------------------------- *) +(* Order monomials for human presentation. *) +(* ------------------------------------------------------------------------- *) + +let humanorder_varpow (x1,k1) (x2,k2) = x1 < x2 or (x1 = x2 & k1 > k2);; + +let humanorder_monomial = + let rec ord l1 l2 = match (l1,l2) with + _,[] -> true + | [],_ -> false + | h1::t1,h2::t2 -> humanorder_varpow h1 h2 or (h1 = h2 & ord t1 t2) in + fun m1 m2 -> m1 = m2 or + ord (sort humanorder_varpow (graph m1)) + (sort humanorder_varpow (graph m2));; + +(* ------------------------------------------------------------------------- *) +(* Conversions to strings. *) +(* ------------------------------------------------------------------------- *) + +let string_of_vector min_size max_size (v:vector) = + let n_raw = dim v in + if n_raw = 0 then "[]" else + let n = max min_size (min n_raw max_size) in + let xs = map ((o) string_of_num (element v)) (1--n) in + "[" ^ end_itlist (fun s t -> s ^ ", " ^ t) xs ^ + (if n_raw > max_size then ", ...]" else "]");; + +let string_of_matrix max_size (m:matrix) = + let i_raw,j_raw = dimensions m in + let i = min max_size i_raw and j = min max_size j_raw in + let rstr = map (fun k -> string_of_vector j j (row k m)) (1--i) in + "["^end_itlist(fun s t -> s^";\n "^t) rstr ^ + (if j > max_size then "\n ...]" else "]");; + +let string_of_vname (v:vname): string = (v: string);; + +let rec string_of_term t = + match t with + Opp t1 -> "(- " ^ string_of_term t1 ^ ")" +| Add (t1, t2) -> + "(" ^ (string_of_term t1) ^ " + " ^ (string_of_term t2) ^ ")" +| Sub (t1, t2) -> + "(" ^ (string_of_term t1) ^ " - " ^ (string_of_term t2) ^ ")" +| Mul (t1, t2) -> + "(" ^ (string_of_term t1) ^ " * " ^ (string_of_term t2) ^ ")" +| Inv t1 -> "(/ " ^ string_of_term t1 ^ ")" +| Div (t1, t2) -> + "(" ^ (string_of_term t1) ^ " / " ^ (string_of_term t2) ^ ")" +| Pow (t1, n1) -> + "(" ^ (string_of_term t1) ^ " ^ " ^ (string_of_int n1) ^ ")" +| Zero -> "0" +| Var v -> "x" ^ (string_of_vname v) +| Const x -> string_of_num x;; + + +let string_of_varpow x k = + if k = 1 then string_of_vname x else string_of_vname x^"^"^string_of_int k;; + +let string_of_monomial m = + if m = monomial_1 then "1" else + let vps = List.fold_right (fun (x,k) a -> string_of_varpow x k :: a) + (sort humanorder_varpow (graph m)) [] in + end_itlist (fun s t -> s^"*"^t) vps;; + +let string_of_cmonomial (c,m) = + if m = monomial_1 then string_of_num c + else if c =/ Int 1 then string_of_monomial m + else string_of_num c ^ "*" ^ string_of_monomial m;; + +let string_of_poly (p:poly) = + if p = poly_0 then "<<0>>" else + let cms = sort (fun (m1,_) (m2,_) -> humanorder_monomial m1 m2) (graph p) in + let s = + List.fold_left (fun a (m,c) -> + if c >";; + +(* ------------------------------------------------------------------------- *) +(* Printers. *) +(* ------------------------------------------------------------------------- *) + +let print_vector v = Format.print_string(string_of_vector 0 20 v);; + +let print_matrix m = Format.print_string(string_of_matrix 20 m);; + +let print_monomial m = Format.print_string(string_of_monomial m);; + +let print_poly m = Format.print_string(string_of_poly m);; + +(* +#install_printer print_vector;; +#install_printer print_matrix;; +#install_printer print_monomial;; +#install_printer print_poly;; +*) + +(* ------------------------------------------------------------------------- *) +(* Conversion from term. *) +(* ------------------------------------------------------------------------- *) + +let rec poly_of_term t = match t with + Zero -> poly_0 +| Const n -> poly_const n +| Var x -> poly_var x +| Opp t1 -> poly_neg (poly_of_term t1) +| Inv t1 -> + let p = poly_of_term t1 in + if poly_isconst p then poly_const(Int 1 // eval undefined p) + else failwith "poly_of_term: inverse of non-constant polyomial" +| Add (l, r) -> poly_add (poly_of_term l) (poly_of_term r) +| Sub (l, r) -> poly_sub (poly_of_term l) (poly_of_term r) +| Mul (l, r) -> poly_mul (poly_of_term l) (poly_of_term r) +| Div (l, r) -> + let p = poly_of_term l and q = poly_of_term r in + if poly_isconst q then poly_cmul (Int 1 // eval undefined q) p + else failwith "poly_of_term: division by non-constant polynomial" +| Pow (t, n) -> + poly_pow (poly_of_term t) n;; + +(* ------------------------------------------------------------------------- *) +(* String of vector (just a list of space-separated numbers). *) +(* ------------------------------------------------------------------------- *) + +let sdpa_of_vector (v:vector) = + let n = dim v in + let strs = map (o (decimalize 20) (element v)) (1--n) in + end_itlist (fun x y -> x ^ " " ^ y) strs ^ "\n";; + +(* ------------------------------------------------------------------------- *) +(* String for block diagonal matrix numbered k. *) +(* ------------------------------------------------------------------------- *) + +let sdpa_of_blockdiagonal k m = + let pfx = string_of_int k ^" " in + let ents = + foldl (fun a (b,i,j) c -> if i > j then a else ((b,i,j),c)::a) [] m in + let entss = sort (increasing fst) ents in + itlist (fun ((b,i,j),c) a -> + pfx ^ string_of_int b ^ " " ^ string_of_int i ^ " " ^ string_of_int j ^ + " " ^ decimalize 20 c ^ "\n" ^ a) entss "";; + +(* ------------------------------------------------------------------------- *) +(* String for a matrix numbered k, in SDPA sparse format. *) +(* ------------------------------------------------------------------------- *) + +let sdpa_of_matrix k (m:matrix) = + let pfx = string_of_int k ^ " 1 " in + let ms = foldr (fun (i,j) c a -> if i > j then a else ((i,j),c)::a) + (snd m) [] in + let mss = sort (increasing fst) ms in + itlist (fun ((i,j),c) a -> + pfx ^ string_of_int i ^ " " ^ string_of_int j ^ + " " ^ decimalize 20 c ^ "\n" ^ a) mss "";; + +(* ------------------------------------------------------------------------- *) +(* String in SDPA sparse format for standard SDP problem: *) +(* *) +(* X = v_1 * [M_1] + ... + v_m * [M_m] - [M_0] must be PSD *) +(* Minimize obj_1 * v_1 + ... obj_m * v_m *) +(* ------------------------------------------------------------------------- *) + +let sdpa_of_problem comment obj mats = + let m = length mats - 1 + and n,_ = dimensions (hd mats) in + "\"" ^ comment ^ "\"\n" ^ + string_of_int m ^ "\n" ^ + "1\n" ^ + string_of_int n ^ "\n" ^ + sdpa_of_vector obj ^ + itlist2 (fun k m a -> sdpa_of_matrix (k - 1) m ^ a) + (1--length mats) mats "";; + +(* ------------------------------------------------------------------------- *) +(* More parser basics. *) +(* ------------------------------------------------------------------------- *) + +exception Noparse;; + + +let isspace,issep,isbra,issymb,isalpha,isnum,isalnum = + let charcode s = Char.code(String.get s 0) in + let spaces = " \t\n\r" + and separators = ",;" + and brackets = "()[]{}" + and symbs = "\\!@#$%^&*-+|\\<=>/?~.:" + and alphas = "'abcdefghijklmnopqrstuvwxyz_ABCDEFGHIJKLMNOPQRSTUVWXYZ" + and nums = "0123456789" in + let allchars = spaces^separators^brackets^symbs^alphas^nums in + let csetsize = itlist ((o) max charcode) (explode allchars) 256 in + let ctable = Array.make csetsize 0 in + do_list (fun c -> Array.set ctable (charcode c) 1) (explode spaces); + do_list (fun c -> Array.set ctable (charcode c) 2) (explode separators); + do_list (fun c -> Array.set ctable (charcode c) 4) (explode brackets); + do_list (fun c -> Array.set ctable (charcode c) 8) (explode symbs); + do_list (fun c -> Array.set ctable (charcode c) 16) (explode alphas); + do_list (fun c -> Array.set ctable (charcode c) 32) (explode nums); + let isspace c = Array.get ctable (charcode c) = 1 + and issep c = Array.get ctable (charcode c) = 2 + and isbra c = Array.get ctable (charcode c) = 4 + and issymb c = Array.get ctable (charcode c) = 8 + and isalpha c = Array.get ctable (charcode c) = 16 + and isnum c = Array.get ctable (charcode c) = 32 + and isalnum c = Array.get ctable (charcode c) >= 16 in + isspace,issep,isbra,issymb,isalpha,isnum,isalnum;; + +let (||) parser1 parser2 input = + try parser1 input + with Noparse -> parser2 input;; + +let (++) parser1 parser2 input = + let result1,rest1 = parser1 input in + let result2,rest2 = parser2 rest1 in + (result1,result2),rest2;; + +let rec many prs input = + try let result,next = prs input in + let results,rest = many prs next in + (result::results),rest + with Noparse -> [],input;; + +let (>>) prs treatment input = + let result,rest = prs input in + treatment(result),rest;; + +let fix err prs input = + try prs input + with Noparse -> failwith (err ^ " expected");; + +let rec listof prs sep err = + prs ++ many (sep ++ fix err prs >> snd) >> (fun (h,t) -> h::t);; + +let possibly prs input = + try let x,rest = prs input in [x],rest + with Noparse -> [],input;; + +let some p = + function + [] -> raise Noparse + | (h::t) -> if p h then (h,t) else raise Noparse;; + +let a tok = some (fun item -> item = tok);; + +let rec atleast n prs i = + (if n <= 0 then many prs + else prs ++ atleast (n - 1) prs >> (fun (h,t) -> h::t)) i;; + +let finished input = + if input = [] then 0,input else failwith "Unparsed input";; + +let word s = + end_itlist (fun p1 p2 -> (p1 ++ p2) >> (fun (s,t) -> s^t)) + (map a (explode s));; + +let token s = + many (some isspace) ++ word s ++ many (some isspace) + >> (fun ((_,t),_) -> t);; + +let decimal = + let numeral = some isnum in + let decimalint = atleast 1 numeral >> ((o) Num.num_of_string implode) in + let decimalfrac = atleast 1 numeral + >> (fun s -> Num.num_of_string(implode s) // pow10 (length s)) in + let decimalsig = + decimalint ++ possibly (a "." ++ decimalfrac >> snd) + >> (function (h,[]) -> h | (h,[x]) -> h +/ x | _ -> failwith "decimalsig") in + let signed prs = + a "-" ++ prs >> ((o) minus_num snd) + || a "+" ++ prs >> snd + || prs in + let exponent = (a "e" || a "E") ++ signed decimalint >> snd in + signed decimalsig ++ possibly exponent + >> (function (h,[]) -> h | (h,[x]) -> h */ power_num (Int 10) x | _ -> + failwith "exponent");; + +let mkparser p s = + let x,rst = p(explode s) in + if rst = [] then x else failwith "mkparser: unparsed input";; + +let parse_decimal = mkparser decimal;; + +(* ------------------------------------------------------------------------- *) +(* Parse back a vector. *) +(* ------------------------------------------------------------------------- *) + +let parse_csdpoutput = + let rec skipupto dscr prs inp = + (dscr ++ prs >> snd + || some (fun c -> true) ++ skipupto dscr prs >> snd) inp in + let ignore inp = (),[] in + let csdpoutput = + (decimal ++ many(a " " ++ decimal >> snd) >> (fun (h,t) -> h::t)) ++ + (a " " ++ a "\n" ++ ignore) >> ((o) vector_of_list fst) in + mkparser csdpoutput;; + +(* ------------------------------------------------------------------------- *) +(* CSDP parameters; so far I'm sticking with the defaults. *) +(* ------------------------------------------------------------------------- *) + +let csdp_default_parameters = +"axtol=1.0e-8 +atytol=1.0e-8 +objtol=1.0e-8 +pinftol=1.0e8 +dinftol=1.0e8 +maxiter=100 +minstepfrac=0.9 +maxstepfrac=0.97 +minstepp=1.0e-8 +minstepd=1.0e-8 +usexzgap=1 +tweakgap=0 +affine=0 +printlevel=1 +";; + +let csdp_params = csdp_default_parameters;; + +(* ------------------------------------------------------------------------- *) +(* The same thing with CSDP. *) +(* Modified by the Coq development team to use a cache *) +(* ------------------------------------------------------------------------- *) + +let buffer_add_line buff line = + Buffer.add_string buff line; Buffer.add_char buff '\n' + +let string_of_file filename = + let fd = open_in filename in + let buff = Buffer.create 16 in + try while true do buffer_add_line buff (input_line fd) done; failwith "" + with End_of_file -> (close_in fd; Buffer.contents buff) + +let file_of_string filename s = + let fd = Pervasives.open_out filename in + output_string fd s; close_out fd + +let request_mark = "*** REQUEST ***" +let answer_mark = "*** ANSWER ***" +let end_mark = "*** END ***" +let infeasible_mark = "Infeasible\n" +let failure_mark = "Failure\n" + +let cache_name = "csdp.cache" + +let look_in_cache string_problem = + let n = String.length string_problem in + try + let inch = open_in cache_name in + let rec search () = + while input_line inch <> request_mark do () done; + let i = ref 0 in + while !i < n & string_problem.[!i] = input_char inch do incr i done; + if !i < n or input_line inch <> answer_mark then + search () + else begin + let buff = Buffer.create 16 in + let line = ref (input_line inch) in + while (!line <> end_mark) do + buffer_add_line buff !line; line := input_line inch + done; + close_in inch; + Buffer.contents buff + end in + try search () with End_of_file -> close_in inch; raise Not_found + with Sys_error _ -> raise Not_found + +let flush_to_cache string_problem string_result = + try + let flags = [Open_append;Open_text;Open_creat] in + let outch = open_out_gen flags 0o666 cache_name in + begin + try + Printf.fprintf outch "%s\n" request_mark; + Printf.fprintf outch "%s" string_problem; + Printf.fprintf outch "%s\n" answer_mark; + Printf.fprintf outch "%s" string_result; + Printf.fprintf outch "%s\n" end_mark; + with Sys_error _ as e -> close_out outch; raise e + end; + close_out outch + with Sys_error _ -> + print_endline "Warning: Could not open or write to csdp cache" + +exception CsdpInfeasible + +let run_csdp dbg string_problem = + try + let res = look_in_cache string_problem in + if res = infeasible_mark then raise CsdpInfeasible; + if res = failure_mark then failwith "csdp error"; + res + with Not_found -> + let input_file = Filename.temp_file "sos" ".dat-s" in + let output_file = Filename.temp_file "sos" ".dat-s" in + let temp_path = Filename.dirname input_file in + let params_file = Filename.concat temp_path "param.csdp" in + file_of_string input_file string_problem; + file_of_string params_file csdp_params; + let rv = Sys.command("cd "^temp_path^"; csdp "^input_file^" "^output_file^ + (if dbg then "" else "> /dev/null")) in + if rv = 1 or rv = 2 then + (flush_to_cache string_problem infeasible_mark; raise CsdpInfeasible); + if rv = 127 then + (print_string "csdp not found, exiting..."; exit 1); + if rv <> 0 & rv <> 3 (* reduced accuracy *) then + (flush_to_cache string_problem failure_mark; + failwith("csdp: error "^string_of_int rv)); + let string_result = string_of_file output_file in + flush_to_cache string_problem string_result; + if not dbg then + (Sys.remove input_file; Sys.remove output_file; Sys.remove params_file); + string_result + +let csdp obj mats = + try parse_csdpoutput (run_csdp !debugging (sdpa_of_problem "" obj mats)) + with CsdpInfeasible -> failwith "csdp: Problem is infeasible" + +(* ------------------------------------------------------------------------- *) +(* Try some apparently sensible scaling first. Note that this is purely to *) +(* get a cleaner translation to floating-point, and doesn't affect any of *) +(* the results, in principle. In practice it seems a lot better when there *) +(* are extreme numbers in the original problem. *) +(* ------------------------------------------------------------------------- *) + +let scale_then = + let common_denominator amat acc = + foldl (fun a m c -> lcm_num (denominator c) a) acc amat + and maximal_element amat acc = + foldl (fun maxa m c -> max_num maxa (abs_num c)) acc amat in + fun solver obj mats -> + let cd1 = itlist common_denominator mats (Int 1) + and cd2 = common_denominator (snd obj) (Int 1) in + let mats' = map (mapf (fun x -> cd1 */ x)) mats + and obj' = vector_cmul cd2 obj in + let max1 = itlist maximal_element mats' (Int 0) + and max2 = maximal_element (snd obj') (Int 0) in + let scal1 = pow2 (20-int_of_float(log(float_of_num max1) /. log 2.0)) + and scal2 = pow2 (20-int_of_float(log(float_of_num max2) /. log 2.0)) in + let mats'' = map (mapf (fun x -> x */ scal1)) mats' + and obj'' = vector_cmul scal2 obj' in + solver obj'' mats'';; + +(* ------------------------------------------------------------------------- *) +(* Round a vector to "nice" rationals. *) +(* ------------------------------------------------------------------------- *) + +let nice_rational n x = round_num (n */ x) // n;; + +let nice_vector n = mapa (nice_rational n);; + +(* ------------------------------------------------------------------------- *) +(* Reduce linear program to SDP (diagonal matrices) and test with CSDP. This *) +(* one tests A [-1;x1;..;xn] >= 0 (i.e. left column is negated constants). *) +(* ------------------------------------------------------------------------- *) + +let linear_program_basic a = + let m,n = dimensions a in + let mats = map (fun j -> diagonal (column j a)) (1--n) + and obj = vector_const (Int 1) m in + try ignore (run_csdp false (sdpa_of_problem "" obj mats)); true + with CsdpInfeasible -> false + +(* ------------------------------------------------------------------------- *) +(* Test whether a point is in the convex hull of others. Rather than use *) +(* computational geometry, express as linear inequalities and call CSDP. *) +(* This is a bit lazy of me, but it's easy and not such a bottleneck so far. *) +(* ------------------------------------------------------------------------- *) + +let in_convex_hull pts pt = + let pts1 = (1::pt) :: map (fun x -> 1::x) pts in + let pts2 = map (fun p -> map (fun x -> -x) p @ p) pts1 in + let n = length pts + 1 + and v = 2 * (length pt + 1) in + let m = v + n - 1 in + let mat = + (m,n), + itern 1 pts2 (fun pts j -> itern 1 pts (fun x i -> (i,j) |-> Int x)) + (iter (1,n) (fun i -> (v + i,i+1) |-> Int 1) undefined) in + linear_program_basic mat;; + +(* ------------------------------------------------------------------------- *) +(* Filter down a set of points to a minimal set with the same convex hull. *) +(* ------------------------------------------------------------------------- *) + +let minimal_convex_hull = + let augment1 = function (m::ms) -> if in_convex_hull ms m then ms else ms@[m] + | _ -> failwith "augment1" + in + let augment m ms = funpow 3 augment1 (m::ms) in + fun mons -> + let mons' = itlist augment (tl mons) [hd mons] in + funpow (length mons') augment1 mons';; + +(* ------------------------------------------------------------------------- *) +(* Stuff for "equations" (generic A->num functions). *) +(* ------------------------------------------------------------------------- *) + +let equation_cmul c eq = + if c =/ Int 0 then Empty else mapf (fun d -> c */ d) eq;; + +let equation_add eq1 eq2 = combine (+/) (fun x -> x =/ Int 0) eq1 eq2;; + +let equation_eval assig eq = + let value v = apply assig v in + foldl (fun a v c -> a +/ value(v) */ c) (Int 0) eq;; + +(* ------------------------------------------------------------------------- *) +(* Eliminate among linear equations: return unconstrained variables and *) +(* assignments for the others in terms of them. We give one pseudo-variable *) +(* "one" that's used for a constant term. *) +(* ------------------------------------------------------------------------- *) + + +let eliminate_equations = + let rec extract_first p l = + match l with + [] -> failwith "extract_first" + | h::t -> if p(h) then h,t else + let k,s = extract_first p t in + k,h::s in + let rec eliminate vars dun eqs = + match vars with + [] -> if forall is_undefined eqs then dun + else (raise Unsolvable) + | v::vs -> + try let eq,oeqs = extract_first (fun e -> defined e v) eqs in + let a = apply eq v in + let eq' = equation_cmul (Int(-1) // a) (undefine v eq) in + let elim e = + let b = tryapplyd e v (Int 0) in + if b =/ Int 0 then e else + equation_add e (equation_cmul (minus_num b // a) eq) in + eliminate vs ((v |-> eq') (mapf elim dun)) (map elim oeqs) + with Failure _ -> eliminate vs dun eqs in + fun one vars eqs -> + let assig = eliminate vars undefined eqs in + let vs = foldl (fun a x f -> subtract (dom f) [one] @ a) [] assig in + setify vs,assig;; + +(* ------------------------------------------------------------------------- *) +(* Eliminate all variables, in an essentially arbitrary order. *) +(* ------------------------------------------------------------------------- *) + +let eliminate_all_equations one = + let choose_variable eq = + let (v,_) = choose eq in + if v = one then + let eq' = undefine v eq in + if is_undefined eq' then failwith "choose_variable" else + let (w,_) = choose eq' in w + else v in + let rec eliminate dun eqs = + match eqs with + [] -> dun + | eq::oeqs -> + if is_undefined eq then eliminate dun oeqs else + let v = choose_variable eq in + let a = apply eq v in + let eq' = equation_cmul (Int(-1) // a) (undefine v eq) in + let elim e = + let b = tryapplyd e v (Int 0) in + if b =/ Int 0 then e else + equation_add e (equation_cmul (minus_num b // a) eq) in + eliminate ((v |-> eq') (mapf elim dun)) (map elim oeqs) in + fun eqs -> + let assig = eliminate undefined eqs in + let vs = foldl (fun a x f -> subtract (dom f) [one] @ a) [] assig in + setify vs,assig;; + +(* ------------------------------------------------------------------------- *) +(* Solve equations by assigning arbitrary numbers. *) +(* ------------------------------------------------------------------------- *) + +let solve_equations one eqs = + let vars,assigs = eliminate_all_equations one eqs in + let vfn = itlist (fun v -> (v |-> Int 0)) vars (one |=> Int(-1)) in + let ass = + combine (+/) (fun c -> false) (mapf (equation_eval vfn) assigs) vfn in + if forall (fun e -> equation_eval ass e =/ Int 0) eqs + then undefine one ass else raise Sanity;; + +(* ------------------------------------------------------------------------- *) +(* Hence produce the "relevant" monomials: those whose squares lie in the *) +(* Newton polytope of the monomials in the input. (This is enough according *) +(* to Reznik: "Extremal PSD forms with few terms", Duke Math. Journal, *) +(* vol 45, pp. 363--374, 1978. *) +(* *) +(* These are ordered in sort of decreasing degree. In particular the *) +(* constant monomial is last; this gives an order in diagonalization of the *) +(* quadratic form that will tend to display constants. *) +(* ------------------------------------------------------------------------- *) + +let newton_polytope pol = + let vars = poly_variables pol in + let mons = map (fun m -> map (fun x -> monomial_degree x m) vars) (dom pol) + and ds = map (fun x -> (degree x pol + 1) / 2) vars in + let all = itlist (fun n -> allpairs (fun h t -> h::t) (0--n)) ds [[]] + and mons' = minimal_convex_hull mons in + let all' = + filter (fun m -> in_convex_hull mons' (map (fun x -> 2 * x) m)) all in + map (fun m -> itlist2 (fun v i a -> if i = 0 then a else (v |-> i) a) + vars m monomial_1) (rev all');; + +(* ------------------------------------------------------------------------- *) +(* Diagonalize (Cholesky/LDU) the matrix corresponding to a quadratic form. *) +(* ------------------------------------------------------------------------- *) + +let diag m = + let nn = dimensions m in + let n = fst nn in + if snd nn <> n then failwith "diagonalize: non-square matrix" else + let rec diagonalize i m = + if is_zero m then [] else + let a11 = element m (i,i) in + if a11 a1k // a11) v in + let m' = + (n,n), + iter (i+1,n) (fun j -> + iter (i+1,n) (fun k -> + ((j,k) |--> (element m (j,k) -/ element v j */ element v' k)))) + undefined in + (a11,v')::diagonalize (i + 1) m' in + diagonalize 1 m;; + +(* ------------------------------------------------------------------------- *) +(* Adjust a diagonalization to collect rationals at the start. *) +(* ------------------------------------------------------------------------- *) + +let deration d = + if d = [] then Int 0,d else + let adj(c,l) = + let a = foldl (fun a i c -> lcm_num a (denominator c)) (Int 1) (snd l) // + foldl (fun a i c -> gcd_num a (numerator c)) (Int 0) (snd l) in + (c // (a */ a)),mapa (fun x -> a */ x) l in + let d' = map adj d in + let a = itlist ((o) lcm_num ((o) denominator fst)) d' (Int 1) // + itlist ((o) gcd_num ((o) numerator fst)) d' (Int 0) in + (Int 1 // a),map (fun (c,l) -> (a */ c,l)) d';; + +(* ------------------------------------------------------------------------- *) +(* Enumeration of monomials with given multidegree bound. *) +(* ------------------------------------------------------------------------- *) + +let rec enumerate_monomials d vars = + if d < 0 then [] + else if d = 0 then [undefined] + else if vars = [] then [monomial_1] else + let alts = + map (fun k -> let oths = enumerate_monomials (d - k) (tl vars) in + map (fun ks -> if k = 0 then ks else (hd vars |-> k) ks) oths) + (0--d) in + end_itlist (@) alts;; + +(* ------------------------------------------------------------------------- *) +(* Enumerate products of distinct input polys with degree <= d. *) +(* We ignore any constant input polynomials. *) +(* Give the output polynomial and a record of how it was derived. *) +(* ------------------------------------------------------------------------- *) + +let rec enumerate_products d pols = + if d = 0 then [poly_const num_1,Rational_lt num_1] else if d < 0 then [] else + match pols with + [] -> [poly_const num_1,Rational_lt num_1] + | (p,b)::ps -> let e = multidegree p in + if e = 0 then enumerate_products d ps else + enumerate_products d ps @ + map (fun (q,c) -> poly_mul p q,Product(b,c)) + (enumerate_products (d - e) ps);; + +(* ------------------------------------------------------------------------- *) +(* Multiply equation-parametrized poly by regular poly and add accumulator. *) +(* ------------------------------------------------------------------------- *) + +let epoly_pmul p q acc = + foldl (fun a m1 c -> + foldl (fun b m2 e -> + let m = monomial_mul m1 m2 in + let es = tryapplyd b m undefined in + (m |-> equation_add (equation_cmul c e) es) b) + a q) acc p;; + +(* ------------------------------------------------------------------------- *) +(* Usual operations on equation-parametrized poly. *) +(* ------------------------------------------------------------------------- *) + +let epoly_cmul c l = + if c =/ Int 0 then undefined else mapf (equation_cmul c) l;; + +let epoly_neg x = epoly_cmul (Int(-1)) x;; + +let epoly_add x = combine equation_add is_undefined x;; + +let epoly_sub p q = epoly_add p (epoly_neg q);; + +(* ------------------------------------------------------------------------- *) +(* Convert regular polynomial. Note that we treat (0,0,0) as -1. *) +(* ------------------------------------------------------------------------- *) + +let epoly_of_poly p = + foldl (fun a m c -> (m |-> ((0,0,0) |=> minus_num c)) a) undefined p;; + +(* ------------------------------------------------------------------------- *) +(* String for block diagonal matrix numbered k. *) +(* ------------------------------------------------------------------------- *) + +let sdpa_of_blockdiagonal k m = + let pfx = string_of_int k ^" " in + let ents = + foldl (fun a (b,i,j) c -> if i > j then a else ((b,i,j),c)::a) [] m in + let entss = sort (increasing fst) ents in + itlist (fun ((b,i,j),c) a -> + pfx ^ string_of_int b ^ " " ^ string_of_int i ^ " " ^ string_of_int j ^ + " " ^ decimalize 20 c ^ "\n" ^ a) entss "";; + +(* ------------------------------------------------------------------------- *) +(* SDPA for problem using block diagonal (i.e. multiple SDPs) *) +(* ------------------------------------------------------------------------- *) + +let sdpa_of_blockproblem comment nblocks blocksizes obj mats = + let m = length mats - 1 in + "\"" ^ comment ^ "\"\n" ^ + string_of_int m ^ "\n" ^ + string_of_int nblocks ^ "\n" ^ + (end_itlist (fun s t -> s^" "^t) (map string_of_int blocksizes)) ^ + "\n" ^ + sdpa_of_vector obj ^ + itlist2 (fun k m a -> sdpa_of_blockdiagonal (k - 1) m ^ a) + (1--length mats) mats "";; + +(* ------------------------------------------------------------------------- *) +(* Hence run CSDP on a problem in block diagonal form. *) +(* ------------------------------------------------------------------------- *) + +let csdp_blocks nblocks blocksizes obj mats = + let string_problem = sdpa_of_blockproblem "" nblocks blocksizes obj mats in + try parse_csdpoutput (run_csdp !debugging string_problem) + with CsdpInfeasible -> failwith "csdp: Problem is infeasible" + +(* ------------------------------------------------------------------------- *) +(* 3D versions of matrix operations to consider blocks separately. *) +(* ------------------------------------------------------------------------- *) + +let bmatrix_add = combine (+/) (fun x -> x =/ Int 0);; + +let bmatrix_cmul c bm = + if c =/ Int 0 then undefined + else mapf (fun x -> c */ x) bm;; + +let bmatrix_neg = bmatrix_cmul (Int(-1));; + +let bmatrix_sub m1 m2 = bmatrix_add m1 (bmatrix_neg m2);; + +(* ------------------------------------------------------------------------- *) +(* Smash a block matrix into components. *) +(* ------------------------------------------------------------------------- *) + +let blocks blocksizes bm = + map (fun (bs,b0) -> + let m = foldl + (fun a (b,i,j) c -> if b = b0 then ((i,j) |-> c) a else a) + undefined bm in + (*let d = foldl (fun a (i,j) c -> max a (max i j)) 0 m in*) + (((bs,bs),m):matrix)) + (zip blocksizes (1--length blocksizes));; + +(* ------------------------------------------------------------------------- *) +(* Positiv- and Nullstellensatz. Flag "linf" forces a linear representation. *) +(* ------------------------------------------------------------------------- *) + +let real_positivnullstellensatz_general linf d eqs leqs pol + : poly list * (positivstellensatz * (num * poly) list) list = + + let vars = itlist ((o) union poly_variables) (pol::eqs @ map fst leqs) [] in + let monoid = + if linf then + (poly_const num_1,Rational_lt num_1):: + (filter (fun (p,c) -> multidegree p <= d) leqs) + else enumerate_products d leqs in + let nblocks = length monoid in + let mk_idmultiplier k p = + let e = d - multidegree p in + let mons = enumerate_monomials e vars in + let nons = zip mons (1--length mons) in + mons, + itlist (fun (m,n) -> (m |-> ((-k,-n,n) |=> Int 1))) nons undefined in + let mk_sqmultiplier k (p,c) = + let e = (d - multidegree p) / 2 in + let mons = enumerate_monomials e vars in + let nons = zip mons (1--length mons) in + mons, + itlist (fun (m1,n1) -> + itlist (fun (m2,n2) a -> + let m = monomial_mul m1 m2 in + if n1 > n2 then a else + let c = if n1 = n2 then Int 1 else Int 2 in + let e = tryapplyd a m undefined in + (m |-> equation_add ((k,n1,n2) |=> c) e) a) + nons) + nons undefined in + let sqmonlist,sqs = unzip(map2 mk_sqmultiplier (1--length monoid) monoid) + and idmonlist,ids = unzip(map2 mk_idmultiplier (1--length eqs) eqs) in + let blocksizes = map length sqmonlist in + let bigsum = + itlist2 (fun p q a -> epoly_pmul p q a) eqs ids + (itlist2 (fun (p,c) s a -> epoly_pmul p s a) monoid sqs + (epoly_of_poly(poly_neg pol))) in + let eqns = foldl (fun a m e -> e::a) [] bigsum in + let pvs,assig = eliminate_all_equations (0,0,0) eqns in + let qvars = (0,0,0)::pvs in + let allassig = itlist (fun v -> (v |-> (v |=> Int 1))) pvs assig in + let mk_matrix v = + foldl (fun m (b,i,j) ass -> if b < 0 then m else + let c = tryapplyd ass v (Int 0) in + if c =/ Int 0 then m else + ((b,j,i) |-> c) (((b,i,j) |-> c) m)) + undefined allassig in + let diagents = foldl + (fun a (b,i,j) e -> if b > 0 & i = j then equation_add e a else a) + undefined allassig in + let mats = map mk_matrix qvars + and obj = length pvs, + itern 1 pvs (fun v i -> (i |--> tryapplyd diagents v (Int 0))) + undefined in + let raw_vec = if pvs = [] then vector_0 0 + else scale_then (csdp_blocks nblocks blocksizes) obj mats in + let find_rounding d = + (if !debugging then + (Format.print_string("Trying rounding with limit "^string_of_num d); + Format.print_newline()) + else ()); + let vec = nice_vector d raw_vec in + let blockmat = iter (1,dim vec) + (fun i a -> bmatrix_add (bmatrix_cmul (element vec i) (el i mats)) a) + (bmatrix_neg (el 0 mats)) in + let allmats = blocks blocksizes blockmat in + vec,map diag allmats in + let vec,ratdias = + if pvs = [] then find_rounding num_1 + else tryfind find_rounding (map Num.num_of_int (1--31) @ + map pow2 (5--66)) in + let newassigs = + itlist (fun k -> el (k - 1) pvs |-> element vec k) + (1--dim vec) ((0,0,0) |=> Int(-1)) in + let finalassigs = + foldl (fun a v e -> (v |-> equation_eval newassigs e) a) newassigs + allassig in + let poly_of_epoly p = + foldl (fun a v e -> (v |--> equation_eval finalassigs e) a) + undefined p in + let mk_sos mons = + let mk_sq (c,m) = + c,itlist (fun k a -> (el (k - 1) mons |--> element m k) a) + (1--length mons) undefined in + map mk_sq in + let sqs = map2 mk_sos sqmonlist ratdias + and cfs = map poly_of_epoly ids in + let msq = filter (fun (a,b) -> b <> []) (map2 (fun a b -> a,b) monoid sqs) in + let eval_sq sqs = itlist + (fun (c,q) -> poly_add (poly_cmul c (poly_mul q q))) sqs poly_0 in + let sanity = + itlist (fun ((p,c),s) -> poly_add (poly_mul p (eval_sq s))) msq + (itlist2 (fun p q -> poly_add (poly_mul p q)) cfs eqs + (poly_neg pol)) in + if not(is_undefined sanity) then raise Sanity else + cfs,map (fun (a,b) -> snd a,b) msq;; + + +let term_of_monoid l1 m = itlist (fun i m -> Mul (nth l1 i,m)) m (Const num_1) + +let rec term_of_pos l1 x = match x with + Axiom_eq i -> failwith "term_of_pos" + | Axiom_le i -> nth l1 i + | Axiom_lt i -> nth l1 i + | Monoid m -> term_of_monoid l1 m + | Rational_eq n -> Const n + | Rational_le n -> Const n + | Rational_lt n -> Const n + | Square t -> Pow (t, 2) + | Eqmul (t, y) -> Mul (t, term_of_pos l1 y) + | Sum (y, z) -> Add (term_of_pos l1 y, term_of_pos l1 z) + | Product (y, z) -> Mul (term_of_pos l1 y, term_of_pos l1 z);; + + +let dest_monomial mon = sort (increasing fst) (graph mon);; + +let monomial_order = + let rec lexorder l1 l2 = + match (l1,l2) with + [],[] -> true + | vps,[] -> false + | [],vps -> true + | ((x1,n1)::vs1),((x2,n2)::vs2) -> + if x1 < x2 then true + else if x2 < x1 then false + else if n1 < n2 then false + else if n2 < n1 then true + else lexorder vs1 vs2 in + fun m1 m2 -> + if m2 = monomial_1 then true else if m1 = monomial_1 then false else + let mon1 = dest_monomial m1 and mon2 = dest_monomial m2 in + let deg1 = itlist ((o) (+) snd) mon1 0 + and deg2 = itlist ((o) (+) snd) mon2 0 in + if deg1 < deg2 then false else if deg1 > deg2 then true + else lexorder mon1 mon2;; + +let dest_poly p = + map (fun (m,c) -> c,dest_monomial m) + (sort (fun (m1,_) (m2,_) -> monomial_order m1 m2) (graph p));; + +(* ------------------------------------------------------------------------- *) +(* Map back polynomials and their composites to term. *) +(* ------------------------------------------------------------------------- *) + +let term_of_varpow = + fun x k -> + if k = 1 then Var x else Pow (Var x, k);; + +let term_of_monomial = + fun m -> if m = monomial_1 then Const num_1 else + let m' = dest_monomial m in + let vps = itlist (fun (x,k) a -> term_of_varpow x k :: a) m' [] in + end_itlist (fun s t -> Mul (s,t)) vps;; + +let term_of_cmonomial = + fun (m,c) -> + if m = monomial_1 then Const c + else if c =/ num_1 then term_of_monomial m + else Mul (Const c,term_of_monomial m);; + +let term_of_poly = + fun p -> + if p = poly_0 then Zero else + let cms = map term_of_cmonomial + (sort (fun (m1,_) (m2,_) -> monomial_order m1 m2) (graph p)) in + end_itlist (fun t1 t2 -> Add (t1,t2)) cms;; + +let term_of_sqterm (c,p) = + Product(Rational_lt c,Square(term_of_poly p));; + +let term_of_sos (pr,sqs) = + if sqs = [] then pr + else Product(pr,end_itlist (fun a b -> Sum(a,b)) (map term_of_sqterm sqs));; + +let rec deepen f n = + try (*print_string "Searching with depth limit "; + print_int n; print_newline();*) f n + with Failure _ -> deepen f (n + 1);; + + + + + +exception TooDeep + +let deepen_until limit f n = + match compare limit 0 with + | 0 -> raise TooDeep + | -1 -> deepen f n + | _ -> + let rec d_until f n = + try if !debugging + then (print_string "Searching with depth limit "; + print_int n; print_newline()) ; f n + with Failure x -> + if !debugging then (Printf.printf "solver error : %s\n" x) ; + if n = limit then raise TooDeep else d_until f (n + 1) in + d_until f n + + +(* patch to remove zero polynomials from equalities. + In this case, hol light loops *) + +let real_nonlinear_prover depthmax eqs les lts = + let eq = map poly_of_term eqs + and le = map poly_of_term les + and lt = map poly_of_term lts in + let pol = itlist poly_mul lt (poly_const num_1) + and lep = map (fun (t,i) -> t,Axiom_le i) (zip le (0--(length le - 1))) + and ltp = map (fun (t,i) -> t,Axiom_lt i) (zip lt (0--(length lt - 1))) + and eqp = itlist2 (fun t i res -> + if t = undefined then res else (t,Axiom_eq i)::res) eq (0--(length eq - 1)) [] + in + + let proof = + let leq = lep @ ltp in + let eq = List.map fst eqp in + let tryall d = + let e = multidegree pol (*and pol' = poly_neg pol*) in + let k = if e = 0 then 1 else d / e in + tryfind (fun i -> d,i, + real_positivnullstellensatz_general false d eq leq + (poly_neg(poly_pow pol i))) + (0--k) in + let d,i,(cert_ideal,cert_cone) = deepen_until depthmax tryall 0 in + let proofs_ideal = + map2 (fun q i -> Eqmul(term_of_poly q,i)) + cert_ideal (List.map snd eqp) + and proofs_cone = map term_of_sos cert_cone + and proof_ne = + if lt = [] then Rational_lt num_1 else + let p = end_itlist (fun s t -> Product(s,t)) (map snd ltp) in + funpow i (fun q -> Product(p,q)) (Rational_lt num_1) in + end_itlist (fun s t -> Sum(s,t)) (proof_ne :: proofs_ideal @ proofs_cone) in + if !debugging then (print_string("Translating proof certificate to Coq"); print_newline()); + proof;; + + +(* ------------------------------------------------------------------------- *) +(* Now pure SOS stuff. *) +(* ------------------------------------------------------------------------- *) + +(* ------------------------------------------------------------------------- *) +(* Some combinatorial helper functions. *) +(* ------------------------------------------------------------------------- *) + +let rec allpermutations l = + if l = [] then [[]] else + itlist (fun h acc -> map (fun t -> h::t) + (allpermutations (subtract l [h])) @ acc) l [];; + +let allvarorders l = + map (fun vlis x -> index x vlis) (allpermutations l);; + +let changevariables_monomial zoln (m:monomial) = + foldl (fun a x k -> (assoc x zoln |-> k) a) monomial_1 m;; + +let changevariables zoln pol = + foldl (fun a m c -> (changevariables_monomial zoln m |-> c) a) + poly_0 pol;; + +(* ------------------------------------------------------------------------- *) +(* Sum-of-squares function with some lowbrow symmetry reductions. *) +(* ------------------------------------------------------------------------- *) + +let sumofsquares_general_symmetry tool pol = + let vars = poly_variables pol + and lpps = newton_polytope pol in + let n = length lpps in + let sym_eqs = + let invariants = filter + (fun vars' -> + is_undefined(poly_sub pol (changevariables (zip vars vars') pol))) + (allpermutations vars) in +(* let lpps2 = allpairs monomial_mul lpps lpps in*) +(* let lpp2_classes = + setify(map (fun m -> + setify(map (fun vars' -> changevariables_monomial (zip vars vars') m) + invariants)) lpps2) in *) + let lpns = zip lpps (1--length lpps) in + let lppcs = + filter (fun (m,(n1,n2)) -> n1 <= n2) + (allpairs + (fun (m1,n1) (m2,n2) -> (m1,m2),(n1,n2)) lpns lpns) in + let clppcs = end_itlist (@) + (map (fun ((m1,m2),(n1,n2)) -> + map (fun vars' -> + (changevariables_monomial (zip vars vars') m1, + changevariables_monomial (zip vars vars') m2),(n1,n2)) + invariants) + lppcs) in + let clppcs_dom = setify(map fst clppcs) in + let clppcs_cls = map (fun d -> filter (fun (e,_) -> e = d) clppcs) + clppcs_dom in + let eqvcls = map (o setify (map snd)) clppcs_cls in + let mk_eq cls acc = + match cls with + [] -> raise Sanity + | [h] -> acc + | h::t -> map (fun k -> (k |-> Int(-1)) (h |=> Int 1)) t @ acc in + itlist mk_eq eqvcls [] in + let eqs = foldl (fun a x y -> y::a) [] + (itern 1 lpps (fun m1 n1 -> + itern 1 lpps (fun m2 n2 f -> + let m = monomial_mul m1 m2 in + if n1 > n2 then f else + let c = if n1 = n2 then Int 1 else Int 2 in + (m |-> ((n1,n2) |-> c) (tryapplyd f m undefined)) f)) + (foldl (fun a m c -> (m |-> ((0,0)|=>c)) a) + undefined pol)) @ + sym_eqs in + let pvs,assig = eliminate_all_equations (0,0) eqs in + let allassig = itlist (fun v -> (v |-> (v |=> Int 1))) pvs assig in + let qvars = (0,0)::pvs in + let diagents = + end_itlist equation_add (map (fun i -> apply allassig (i,i)) (1--n)) in + let mk_matrix v = + ((n,n), + foldl (fun m (i,j) ass -> let c = tryapplyd ass v (Int 0) in + if c =/ Int 0 then m else + ((j,i) |-> c) (((i,j) |-> c) m)) + undefined allassig :matrix) in + let mats = map mk_matrix qvars + and obj = length pvs, + itern 1 pvs (fun v i -> (i |--> tryapplyd diagents v (Int 0))) + undefined in + let raw_vec = if pvs = [] then vector_0 0 else tool obj mats in + let find_rounding d = + (if !debugging then + (Format.print_string("Trying rounding with limit "^string_of_num d); + Format.print_newline()) + else ()); + let vec = nice_vector d raw_vec in + let mat = iter (1,dim vec) + (fun i a -> matrix_add (matrix_cmul (element vec i) (el i mats)) a) + (matrix_neg (el 0 mats)) in + deration(diag mat) in + let rat,dia = + if pvs = [] then + let mat = matrix_neg (el 0 mats) in + deration(diag mat) + else + tryfind find_rounding (map Num.num_of_int (1--31) @ + map pow2 (5--66)) in + let poly_of_lin(d,v) = + d,foldl(fun a i c -> (el (i - 1) lpps |-> c) a) undefined (snd v) in + let lins = map poly_of_lin dia in + let sqs = map (fun (d,l) -> poly_mul (poly_const d) (poly_pow l 2)) lins in + let sos = poly_cmul rat (end_itlist poly_add sqs) in + if is_undefined(poly_sub sos pol) then rat,lins else raise Sanity;; + +let (sumofsquares: poly -> Num.num * (( Num.num * poly) list)) = +sumofsquares_general_symmetry csdp;; diff --git a/contrib/micromega/sos.mli b/contrib/micromega/sos.mli new file mode 100644 index 00000000..31c9518c --- /dev/null +++ b/contrib/micromega/sos.mli @@ -0,0 +1,66 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* bool + +val poly_neg : poly -> poly + +val poly_mul : poly -> poly -> poly + +val poly_pow : poly -> int -> poly + +val poly_const : Num.num -> poly + +val poly_of_term : term -> poly + +val term_of_poly : poly -> term + +val term_of_sos : positivstellensatz * (Num.num * poly) list -> + positivstellensatz + +val string_of_poly : poly -> string + +exception TooDeep + +val deepen_until : int -> (int -> 'a) -> int -> 'a + +val real_positivnullstellensatz_general : bool -> int -> poly list -> + (poly * positivstellensatz) list -> + poly -> poly list * (positivstellensatz * (Num.num * poly) list) list + +val sumofsquares : poly -> Num.num * ( Num.num * poly) list diff --git a/contrib/micromega/vector.ml b/contrib/micromega/vector.ml new file mode 100644 index 00000000..fee4ebfc --- /dev/null +++ b/contrib/micromega/vector.ml @@ -0,0 +1,674 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* int + + val null : t + + val is_null : t -> bool + + val get : int -> t -> num + + val update : int -> (num -> num) -> t -> t + (* behaviour is undef if index < 0 -- might loop*) + + val set : int -> num -> t -> t + + (* + For efficiency... + + val get_update : int -> (num -> num) -> t -> num * t + *) + + val mul : num -> t -> t + + val uminus : t -> t + + val add : t -> t -> t + + val dotp : t -> t -> num + + val lin_comb : num -> t -> num -> t -> t + (* lin_comb n1 t1 n2 t2 = (n1 * t1) + (n2 * t2) *) + + val gcd : t -> Big_int.big_int + + val normalise : t -> num * t + + val hash : t -> int + + val compare : t -> t -> int + + type it + + val iterator : t -> it + val element : it -> (num*it) option + + val string : t -> string + + type status = Pos | Neg + + (* the result list is ordered by fst *) + val status : t -> (int * status) list + + val from_list : num list -> t + val to_list : t -> num list + +end + + +module type SystemS = +sig + + module Vect : S + + module Cstr : + sig + type kind = Eq | Ge + val string_of_kind : kind -> string + type cstr = {coeffs : Vect.t ; op : kind ; cst : num} + val string_of_cstr : cstr -> string + val compare : cstr -> cstr -> int + end + open Cstr + + + module CstrBag : + sig + type t + exception Contradiction + + val empty : t + + val is_empty : t -> bool + + val add : cstr -> t -> t + (* c can be deduced from add c t *) + + val find : (cstr -> bool) -> t -> cstr option + + val fold : (cstr -> 'a -> 'a) -> t -> 'a -> 'a + + val status : t -> (int * (int list * int list)) list + (* aggregate of vector statuses *) + + val remove : cstr -> t -> t + + (* remove_list the ith element -- it is the ith element visited by 'fold' *) + + val split : (cstr -> int) -> t -> (int -> t) + + type it + val iterator : t -> it + val element : it -> (cstr*it) option + + end + +end + +let zero_num = Int 0 +let unit_num = Int 1 + + + + +module Cstr(V:S) = +struct + type kind = Eq | Ge + let string_of_kind = function Eq -> "Eq" | Ge -> "Ge" + + type cstr = {coeffs : V.t ; op : kind ; cst : num} + + let string_of_cstr {coeffs =a ; op = b ; cst =c} = + Printf.sprintf "{coeffs = %s;op=%s;cst=%s}" (V.string a) (string_of_kind b) (string_of_num c) + + type t = cstr + let compare + {coeffs = v1 ; op = op1 ; cst = c1} + {coeffs = v2 ; op = op2 ; cst = c2} = + Mutils.Cmp.compare_lexical [ + (fun () -> V.compare v1 v2); + (fun () -> Pervasives.compare op1 op2); + (fun () -> compare_num c1 c2) + ] + + +end + + + +module VList : S with type t = num list = +struct + type t = num list + + let fresh l = failwith "not implemented" + + let null = [] + + let is_null = List.for_all ((=/) zero_num) + + let normalise l = failwith "Not implemented" + (*match l with (* Buggy : What if the first num is zero! *) + | [] -> (Int 0,[]) + | [n] -> (n,[Int 1]) + | n::l -> (n, (Int 1) :: List.map (fun x -> x // n) l) + *) + + + let get i l = try List.nth l i with _ -> zero_num + + (* This is not tail-recursive *) + let rec update i f t = + match t with + | [] -> if i = 0 then [f zero_num] else (zero_num)::(update (i-1) f []) + | e::t -> if i = 0 then (f e)::t else e::(update (i-1) f t) + + let rec set i n t = + match t with + | [] -> if i = 0 then [n] else (zero_num)::(set (i-1) n []) + | e::t -> if i = 0 then (n)::t else e::(set (i-1) n t) + + + + + let rec mul z t = + match z with + | Int 0 -> null + | Int 1 -> t + | _ -> List.map (mult_num z) t + + let uminus t = mul (Int (-1)) t + + let rec add t1 t2 = + match t1,t2 with + | [], _ -> t2 + | _ , [] -> t1 + | e1::t1,e2::t2 -> (e1 +/ e2 )::(add t1 t2) + + let dotp t1 t2 = + let rec _dotp t1 t2 acc = + match t1, t2 with + | [] , _ -> acc + | _ , [] -> acc + | e1::t1,e2::t2 -> _dotp t1 t2 (acc +/ (e1 */ e2)) in + _dotp t1 t2 zero_num + + let add_mul n t1 t2 = + match n with + | Int 0 -> t2 + | Int 1 -> add t1 t2 + | _ -> + let rec _add_mul t1 t2 = + match t1,t2 with + | [], _ -> t2 + | _ , [] -> mul n t1 + | e1::t1,e2::t2 -> ( (n */e1) +/ e2 )::(_add_mul t1 t2) in + _add_mul t1 t2 + + let lin_comb n1 t1 n2 t2 = + match n1,n2 with + | Int 0 , _ -> mul n2 t2 + | Int 1 , _ -> add_mul n2 t2 t1 + | _ , Int 0 -> mul n1 t1 + | _ , Int 1 -> add_mul n1 t1 t2 + | _ -> + let rec _lin_comb t1 t2 = + match t1,t2 with + | [], _ -> mul n2 t2 + | _ , [] -> mul n1 t1 + | e1::t1,e2::t2 -> ( (n1 */e1) +/ (n2 */ e2 ))::(_lin_comb t1 t2) in + _lin_comb t1 t2 + + (* could be computed on the fly *) + let gcd t =Mutils.gcd_list t + + + + + let hash = Mutils.Cmp.hash_list int_of_num + + let compare = Mutils.Cmp.compare_list compare_num + + type it = t + let iterator (x:t) : it = x + let element it = + match it with + | [] -> None + | e::l -> Some (e,l) + + (* TODO: Buffer! *) + let string l = List.fold_right (fun n s -> (string_of_num n)^";"^s) l "" + + type status = Pos | Neg + + let status l = + let rec xstatus i l = + match l with + | [] -> [] + | e::l -> + begin + match compare_num e (Int 0) with + | 1 -> (i,Pos):: (xstatus (i+1) l) + | 0 -> xstatus (i+1) l + | -1 -> (i,Neg) :: (xstatus (i+1) l) + | _ -> assert false + end in + xstatus 0 l + + let from_list l = l + let to_list l = l + +end + +module VMap : S = +struct + module Map = Map.Make(struct type t = int let compare (x:int) (y:int) = Pervasives.compare x y end) + + type t = num Map.t + + let null = Map.empty + + let fresh m = failwith "not implemented" + + let is_null = Map.is_empty + + let normalise m = failwith "Not implemented" + + + + let get i l = try Map.find i l with _ -> zero_num + + let update i f t = + try + let res = f (Map.find i t) in + if res =/ zero_num + then Map.remove i t + else Map.add i res t + with + Not_found -> + let res = f zero_num in + if res =/ zero_num then t else Map.add i res t + + let set i n t = + if n =/ zero_num then Map.remove i t + else Map.add i n t + + + let rec mul z t = + match z with + | Int 0 -> null + | Int 1 -> t + | _ -> Map.map (mult_num z) t + + let uminus t = mul (Int (-1)) t + + + let map2 f m1 m2 = + let res,m2' = + Map.fold (fun k e (res,m2) -> + let v = f e (get k m2) in + if v =/ zero_num + then (res,Map.remove k m2) + else (Map.add k v res,Map.remove k m2)) m1 (Map.empty,m2) in + Map.fold (fun k e res -> + let v = f zero_num e in + if v =/ zero_num + then res else Map.add k v res) m2' res + + let add t1 t2 = map2 (+/) t1 t2 + + + let dotp t1 t2 = + Map.fold (fun k e res -> + res +/ (e */ get k t2)) t1 zero_num + + + + let add_mul n t1 t2 = + match n with + | Int 0 -> t2 + | Int 1 -> add t1 t2 + | _ -> map2 (fun x y -> (n */ x) +/ y) t1 t2 + + let lin_comb n1 t1 n2 t2 = + match n1,n2 with + | Int 0 , _ -> mul n2 t2 + | Int 1 , _ -> add_mul n2 t2 t1 + | _ , Int 0 -> mul n1 t1 + | _ , Int 1 -> add_mul n1 t1 t2 + | _ -> map2 (fun x y -> (n1 */ x) +/ (n2 */ y)) t1 t2 + + + let hash map = Map.fold (fun k e res -> k lxor (int_of_num e) lxor res) map 0 + + let compare = Map.compare compare_num + + type it = t * int + + let iterator (x:t) : it = (x,0) + + let element (mp,id) = + try + Some (Map.find id mp, (mp, id+1)) + with + Not_found -> None + + (* TODO: Buffer! *) + type status = Pos | Neg + + let status l = Map.fold (fun k e l -> + match compare_num e (Int 0) with + | 1 -> (k,Pos)::l + | 0 -> l + | -1 -> (k,Neg) :: l + | _ -> assert false) l [] + let from_list l = + let rec from_list i l map = + match l with + | [] -> map + | e::l -> from_list (i+1) l (if e <>/ Int 0 then Map.add i e map else map) in + from_list 0 l Map.empty + + let gcd m = + let res = Map.fold (fun _ e x -> Big_int.gcd_big_int x (Mutils.numerator e)) m Big_int.zero_big_int in + if Big_int.compare_big_int res Big_int.zero_big_int = 0 + then Big_int.unit_big_int else res + + + let to_list m = + let l = List.rev (Map.fold (fun k e l -> (k,e)::l) m []) in + let rec xto_list i l = + match l with + | [] -> [] + | (x,v)::l' -> if i = x then v::(xto_list (i+1) l') else zero_num ::(xto_list (i+1) l) in + xto_list 0 l + + let string l = VList.string (to_list l) + + +end + + +module VSparse : S = +struct + + type t = (int*num) list + + let null = [] + + let fresh l = List.fold_left (fun acc (i,_) -> max (i+1) acc) 0 l + + let is_null l = l = [] + + let rec is_sorted l = + match l with + | [] -> true + | [e] -> true + | (i,_)::(j,x)::l -> i < j && is_sorted ((j,x)::l) + + + let check l = (List.for_all (fun (_,n) -> compare_num n (Int 0) <> 0) l) && (is_sorted l) + + (* let get i t = + assert (check t); + try List.assoc i t with Not_found -> zero_num *) + + let rec get (i:int) t = + match t with + | [] -> zero_num + | (j,n)::t -> + match compare i j with + | 0 -> n + | 1 -> get i t + | _ -> zero_num + + let cons i v rst = if v =/ Int 0 then rst else (i,v)::rst + + let rec update i f t = + match t with + | [] -> cons i (f zero_num) [] + | (k,v)::l -> + match Pervasives.compare i k with + | 0 -> cons k (f v) l + | -1 -> cons i (f zero_num) t + | 1 -> (k,v) ::(update i f l) + | _ -> failwith "compare_num" + + let update i f t = + assert (check t); + let res = update i f t in + assert (check t) ; res + + + let rec set i n t = + match t with + | [] -> cons i n [] + | (k,v)::l -> + match Pervasives.compare i k with + | 0 -> cons k n l + | -1 -> cons i n t + | 1 -> (k,v) :: (set i n l) + | _ -> failwith "compare_num" + + + let rec map f l = + match l with + | [] -> [] + | (i,e)::l -> cons i (f e) (map f l) + + let rec mul z t = + match z with + | Int 0 -> null + | Int 1 -> t + | _ -> List.map (fun (i,n) -> (i, mult_num z n)) t + + let mul z t = + assert (check t) ; + let res = mul z t in + assert (check res) ; + res + + let uminus t = mul (Int (-1)) t + + + let normalise l = + match l with + | [] -> (Int 0,[]) + | (i,n)::_ -> (n, mul ((Int 1) // n) l) + + + let rec map2 f m1 m2 = + match m1, m2 with + | [] , [] -> [] + | l , [] -> map (fun x -> f x zero_num) l + | [] ,l -> map (f zero_num) l + | (i,e)::l1,(i',e')::l2 -> + match Pervasives.compare i i' with + | 0 -> cons i (f e e') (map2 f l1 l2) + | -1 -> cons i (f e zero_num) (map2 f l1 m2) + | 1 -> cons i' (f zero_num e') (map2 f m1 l2) + | _ -> assert false + + (* let add t1 t2 = map2 (+/) t1 t2*) + + let rec add (m1:t) (m2:t) = + match m1, m2 with + | [] , [] -> [] + | l , [] -> l + | [] ,l -> l + | (i,e)::l1,(i',e')::l2 -> + match Pervasives.compare i i' with + | 0 -> cons i ( e +/ e') (add l1 l2) + | -1 -> (i,e) :: (add l1 m2) + | 1 -> (i', e') :: (add m1 l2) + | _ -> assert false + + + + + let add t1 t2 = + assert (check t1 && check t2); + let res = add t1 t2 in + assert (check res); + res + + + let rec dotp (t1:t) (t2:t) = + match t1, t2 with + | [] , _ -> zero_num + | _ , [] -> zero_num + | (i,e)::l1 , (i',e')::l2 -> + match Pervasives.compare i i' with + | 0 -> (e */ e') +/ (dotp l1 l2) + | -1 -> dotp l1 t2 + | 1 -> dotp t1 l2 + | _ -> assert false + + let dotp t1 t2 = + assert (check t1 && check t2) ; dotp t1 t2 + + let add_mul n t1 t2 = + match n with + | Int 0 -> t2 + | Int 1 -> add t1 t2 + | _ -> map2 (fun x y -> (n */ x) +/ y) t1 t2 + + let add_mul n (t1:t) (t2:t) = + match n with + | Int 0 -> t2 + | Int 1 -> add t1 t2 + | _ -> + let rec xadd_mul m1 m2 = + match m1, m2 with + | [] , [] -> [] + | _ , [] -> mul n m1 + | [] , _ -> m2 + | (i,e)::l1,(i',e')::l2 -> + match Pervasives.compare i i' with + | 0 -> cons i ( n */ e +/ e') (xadd_mul l1 l2) + | -1 -> (i,n */ e) :: (xadd_mul l1 m2) + | 1 -> (i', e') :: (xadd_mul m1 l2) + | _ -> assert false in + xadd_mul t1 t2 + + + + + let lin_comb n1 t1 n2 t2 = + match n1,n2 with + | Int 0 , _ -> mul n2 t2 + | Int 1 , _ -> add_mul n2 t2 t1 + | _ , Int 0 -> mul n1 t1 + | _ , Int 1 -> add_mul n1 t1 t2 + | _ -> (*map2 (fun x y -> (n1 */ x) +/ (n2 */ y)) t1 t2*) + let rec xlin_comb m1 m2 = + match m1, m2 with + | [] , [] -> [] + | _ , [] -> mul n1 m1 + | [] , _ -> mul n2 m2 + | (i,e)::l1,(i',e')::l2 -> + match Pervasives.compare i i' with + | 0 -> cons i ( n1 */ e +/ n2 */ e') (xlin_comb l1 l2) + | -1 -> (i,n1 */ e) :: (xlin_comb l1 m2) + | 1 -> (i', n2 */ e') :: (xlin_comb m1 l2) + | _ -> assert false in + xlin_comb t1 t2 + + + + + + let lin_comb n1 t1 n2 t2 = + assert (check t1 && check t2); + let res = lin_comb n1 t1 n2 t2 in + assert (check res); res + + let hash = Mutils.Cmp.hash_list (fun (x,y) -> (Hashtbl.hash x) lxor (int_of_num y)) + + + let compare = Mutils.Cmp.compare_list (fun x y -> Mutils.Cmp.compare_lexical + [ + (fun () -> Pervasives.compare (fst x) (fst y)); + (fun () -> compare_num (snd x) (snd y))]) + + (* + let compare (x:t) (y:t) = + let rec xcompare acc1 acc2 x y = + match x , y with + | [] , [] -> xcomp acc1 acc2 + | [] , _ -> -1 + | _ , [] -> 1 + | (i,n1)::l1 , (j,n2)::l2 -> + match Pervasives.compare i j with + | 0 -> xcompare (n1::acc1) (n2::acc2) l1 l2 + | c -> c + and xcomp acc1 acc2 = Mutils.Cmp.compare_list compare_num acc1 acc2 in + xcompare [] [] x y + *) + + type it = t + + let iterator (x:t) : it = x + + let element l = failwith "Not_implemented" + + (* TODO: Buffer! *) + type status = Pos | Neg + + let status l = List.map (fun (i,e) -> + match compare_num e (Int 0) with + | 1 -> i,Pos + | -1 -> i,Neg + | _ -> assert false) l + + let from_list (l: num list) = + let rec xfrom_list i l = + match l with + | [] -> [] + | e::l -> + if e <>/ Int 0 + then (i,e)::(xfrom_list (i+1) l) + else xfrom_list (i+1) l in + + let res = xfrom_list 0 l in + assert (check res) ; res + + + let gcd m = + let res = List.fold_left (fun x (i,e) -> Big_int.gcd_big_int x (Mutils.numerator e)) Big_int.zero_big_int m in + if Big_int.compare_big_int res Big_int.zero_big_int = 0 + then Big_int.unit_big_int else res + + let to_list m = + let rec xto_list i l = + match l with + | [] -> [] + | (x,v)::l' -> + if i = x then v::(xto_list (i+1) l') else zero_num ::(xto_list (i+1) l) in + xto_list 0 m + + let to_list l = + assert (check l); + to_list l + + + let string l = VList.string (to_list l) + +end diff --git a/contrib/omega/Omega.v b/contrib/omega/Omega.v index 66f86a49..ee823502 100644 --- a/contrib/omega/Omega.v +++ b/contrib/omega/Omega.v @@ -9,15 +9,16 @@ (* *) (* Omega: a solver of quantifier-free problems in Presburger Arithmetic *) (* *) -(* Pierre Crégut (CNET, Lannion, France) *) +(* Pierre Crégut (CNET, Lannion, France) *) (* *) (**************************************************************************) -(* $Id: Omega.v 8642 2006-03-17 10:09:02Z notin $ *) +(* $Id: Omega.v 10028 2007-07-18 22:38:06Z letouzey $ *) (* We do not require [ZArith] anymore, but only what's necessary for Omega *) Require Export ZArith_base. Require Export OmegaLemmas. +Require Export PreOmega. Hint Resolve Zle_refl Zplus_comm Zplus_assoc Zmult_comm Zmult_assoc Zplus_0_l Zplus_0_r Zmult_1_l Zplus_opp_l Zplus_opp_r Zmult_plus_distr_l diff --git a/contrib/omega/PreOmega.v b/contrib/omega/PreOmega.v new file mode 100644 index 00000000..47e22a97 --- /dev/null +++ b/contrib/omega/PreOmega.v @@ -0,0 +1,445 @@ +Require Import Arith Max Min ZArith_base NArith Nnat. + +Open Local Scope Z_scope. + + +(** * zify: the Z-ification tactic *) + +(* This tactic searches for nat and N and positive elements in the goal and + translates everything into Z. It is meant as a pre-processor for + (r)omega; for instance a positivity hypothesis is added whenever + - a multiplication is encountered + - an atom is encountered (that is a variable or an unknown construct) + + Recognized relations (can be handled as deeply as allowed by setoid rewrite): + - { eq, le, lt, ge, gt } on { Z, positive, N, nat } + + Recognized operations: + - on Z: Zmin, Zmax, Zabs, Zsgn are translated in term of <= < = + - on nat: + * - S O pred min max nat_of_P nat_of_N Zabs_nat + - on positive: Zneg Zpos xI xO xH + * - Psucc Ppred Pmin Pmax P_of_succ_nat + - on N: N0 Npos + * - Nsucc Nmin Nmax N_of_nat Zabs_N +*) + + + + +(** I) translation of Zmax, Zmin, Zabs, Zsgn into recognized equations *) + +Ltac zify_unop_core t thm a := + (* Let's introduce the specification theorem for t *) + let H:= fresh "H" in assert (H:=thm a); + (* Then we replace (t a) everywhere with a fresh variable *) + let z := fresh "z" in set (z:=t a) in *; clearbody z. + +Ltac zify_unop_var_or_term t thm a := + (* If a is a variable, no need for aliasing *) + let za := fresh "z" in + (rename a into za; rename za into a; zify_unop_core t thm a) || + (* Otherwise, a is a complex term: we alias it. *) + (remember a as za; zify_unop_core t thm za). + +Ltac zify_unop t thm a := + (* if a is a scalar, we can simply reduce the unop *) + let isz := isZcst a in + match isz with + | true => simpl (t a) in * + | _ => zify_unop_var_or_term t thm a + end. + +Ltac zify_unop_nored t thm a := + (* in this version, we don't try to reduce the unop (that can be (Zplus x)) *) + let isz := isZcst a in + match isz with + | true => zify_unop_core t thm a + | _ => zify_unop_var_or_term t thm a + end. + +Ltac zify_binop t thm a b:= + (* works as zify_unop, except that we should be careful when + dealing with b, since it can be equal to a *) + let isza := isZcst a in + match isza with + | true => zify_unop (t a) (thm a) b + | _ => + let za := fresh "z" in + (rename a into za; rename za into a; zify_unop_nored (t a) (thm a) b) || + (remember a as za; match goal with + | H : za = b |- _ => zify_unop_nored (t za) (thm za) za + | _ => zify_unop_nored (t za) (thm za) b + end) + end. + +Ltac zify_op_1 := + match goal with + | |- context [ Zmax ?a ?b ] => zify_binop Zmax Zmax_spec a b + | H : context [ Zmax ?a ?b ] |- _ => zify_binop Zmax Zmax_spec a b + | |- context [ Zmin ?a ?b ] => zify_binop Zmin Zmin_spec a b + | H : context [ Zmin ?a ?b ] |- _ => zify_binop Zmin Zmin_spec a b + | |- context [ Zsgn ?a ] => zify_unop Zsgn Zsgn_spec a + | H : context [ Zsgn ?a ] |- _ => zify_unop Zsgn Zsgn_spec a + | |- context [ Zabs ?a ] => zify_unop Zabs Zabs_spec a + | H : context [ Zabs ?a ] |- _ => zify_unop Zabs Zabs_spec a + end. + +Ltac zify_op := repeat zify_op_1. + + + + + +(** II) Conversion from nat to Z *) + + +Definition Z_of_nat' := Z_of_nat. + +Ltac hide_Z_of_nat t := + let z := fresh "z" in set (z:=Z_of_nat t) in *; + change Z_of_nat with Z_of_nat' in z; + unfold z in *; clear z. + +Ltac zify_nat_rel := + match goal with + (* I: equalities *) + | H : (@eq nat ?a ?b) |- _ => generalize (inj_eq _ _ H); clear H; intro H + | |- (@eq nat ?a ?b) => apply (inj_eq_rev a b) + | H : context [ @eq nat ?a ?b ] |- _ => rewrite (inj_eq_iff a b) in H + | |- context [ @eq nat ?a ?b ] => rewrite (inj_eq_iff a b) + (* II: less than *) + | H : (lt ?a ?b) |- _ => generalize (inj_lt _ _ H); clear H; intro H + | |- (lt ?a ?b) => apply (inj_lt_rev a b) + | H : context [ lt ?a ?b ] |- _ => rewrite (inj_lt_iff a b) in H + | |- context [ lt ?a ?b ] => rewrite (inj_lt_iff a b) + (* III: less or equal *) + | H : (le ?a ?b) |- _ => generalize (inj_le _ _ H); clear H; intro H + | |- (le ?a ?b) => apply (inj_le_rev a b) + | H : context [ le ?a ?b ] |- _ => rewrite (inj_le_iff a b) in H + | |- context [ le ?a ?b ] => rewrite (inj_le_iff a b) + (* IV: greater than *) + | H : (gt ?a ?b) |- _ => generalize (inj_gt _ _ H); clear H; intro H + | |- (gt ?a ?b) => apply (inj_gt_rev a b) + | H : context [ gt ?a ?b ] |- _ => rewrite (inj_gt_iff a b) in H + | |- context [ gt ?a ?b ] => rewrite (inj_gt_iff a b) + (* V: greater or equal *) + | H : (ge ?a ?b) |- _ => generalize (inj_ge _ _ H); clear H; intro H + | |- (ge ?a ?b) => apply (inj_ge_rev a b) + | H : context [ ge ?a ?b ] |- _ => rewrite (inj_ge_iff a b) in H + | |- context [ ge ?a ?b ] => rewrite (inj_ge_iff a b) + end. + +Ltac zify_nat_op := + match goal with + (* misc type conversions: positive/N/Z to nat *) + | H : context [ Z_of_nat (nat_of_P ?a) ] |- _ => rewrite <- (Zpos_eq_Z_of_nat_o_nat_of_P a) in H + | |- context [ Z_of_nat (nat_of_P ?a) ] => rewrite <- (Zpos_eq_Z_of_nat_o_nat_of_P a) + | H : context [ Z_of_nat (nat_of_N ?a) ] |- _ => rewrite (Z_of_nat_of_N a) in H + | |- context [ Z_of_nat (nat_of_N ?a) ] => rewrite (Z_of_nat_of_N a) + | H : context [ Z_of_nat (Zabs_nat ?a) ] |- _ => rewrite (inj_Zabs_nat a) in H + | |- context [ Z_of_nat (Zabs_nat ?a) ] => rewrite (inj_Zabs_nat a) + + (* plus -> Zplus *) + | H : context [ Z_of_nat (plus ?a ?b) ] |- _ => rewrite (inj_plus a b) in H + | |- context [ Z_of_nat (plus ?a ?b) ] => rewrite (inj_plus a b) + + (* min -> Zmin *) + | H : context [ Z_of_nat (min ?a ?b) ] |- _ => rewrite (inj_min a b) in H + | |- context [ Z_of_nat (min ?a ?b) ] => rewrite (inj_min a b) + + (* max -> Zmax *) + | H : context [ Z_of_nat (max ?a ?b) ] |- _ => rewrite (inj_max a b) in H + | |- context [ Z_of_nat (max ?a ?b) ] => rewrite (inj_max a b) + + (* minus -> Zmax (Zminus ... ...) 0 *) + | H : context [ Z_of_nat (minus ?a ?b) ] |- _ => rewrite (inj_minus a b) in H + | |- context [ Z_of_nat (minus ?a ?b) ] => rewrite (inj_minus a b) + + (* pred -> minus ... -1 -> Zmax (Zminus ... -1) 0 *) + | H : context [ Z_of_nat (pred ?a) ] |- _ => rewrite (pred_of_minus a) in H + | |- context [ Z_of_nat (pred ?a) ] => rewrite (pred_of_minus a) + + (* mult -> Zmult and a positivity hypothesis *) + | H : context [ Z_of_nat (mult ?a ?b) ] |- _ => + let H:= fresh "H" in + assert (H:=Zle_0_nat (mult a b)); rewrite (inj_mult a b) in * + | |- context [ Z_of_nat (mult ?a ?b) ] => + let H:= fresh "H" in + assert (H:=Zle_0_nat (mult a b)); rewrite (inj_mult a b) in * + + (* O -> Z0 *) + | H : context [ Z_of_nat O ] |- _ => simpl (Z_of_nat O) in H + | |- context [ Z_of_nat O ] => simpl (Z_of_nat O) + + (* S -> number or Zsucc *) + | H : context [ Z_of_nat (S ?a) ] |- _ => + let isnat := isnatcst a in + match isnat with + | true => simpl (Z_of_nat (S a)) in H + | _ => rewrite (inj_S a) in H + end + | |- context [ Z_of_nat (S ?a) ] => + let isnat := isnatcst a in + match isnat with + | true => simpl (Z_of_nat (S a)) + | _ => rewrite (inj_S a) + end + + (* atoms of type nat : we add a positivity condition (if not already there) *) + | H : context [ Z_of_nat ?a ] |- _ => + match goal with + | H' : 0 <= Z_of_nat a |- _ => hide_Z_of_nat a + | H' : 0 <= Z_of_nat' a |- _ => fail + | _ => let H:= fresh "H" in + assert (H:=Zle_0_nat a); hide_Z_of_nat a + end + | |- context [ Z_of_nat ?a ] => + match goal with + | H' : 0 <= Z_of_nat a |- _ => hide_Z_of_nat a + | H' : 0 <= Z_of_nat' a |- _ => fail + | _ => let H:= fresh "H" in + assert (H:=Zle_0_nat a); hide_Z_of_nat a + end + end. + +Ltac zify_nat := repeat zify_nat_rel; repeat zify_nat_op; unfold Z_of_nat' in *. + + + + +(* III) conversion from positive to Z *) + +Definition Zpos' := Zpos. +Definition Zneg' := Zneg. + +Ltac hide_Zpos t := + let z := fresh "z" in set (z:=Zpos t) in *; + change Zpos with Zpos' in z; + unfold z in *; clear z. + +Ltac zify_positive_rel := + match goal with + (* I: equalities *) + | H : (@eq positive ?a ?b) |- _ => generalize (Zpos_eq _ _ H); clear H; intro H + | |- (@eq positive ?a ?b) => apply (Zpos_eq_rev a b) + | H : context [ @eq positive ?a ?b ] |- _ => rewrite (Zpos_eq_iff a b) in H + | |- context [ @eq positive ?a ?b ] => rewrite (Zpos_eq_iff a b) + (* II: less than *) + | H : context [ (?a change (a change (a change (a<=b)%positive with (Zpos a<=Zpos b) in H + | |- context [ (?a<=?b)%positive ] => change (a<=b)%positive with (Zpos a<=Zpos b) + (* IV: greater than *) + | H : context [ (?a>?b)%positive ] |- _ => change (a>b)%positive with (Zpos a>Zpos b) in H + | |- context [ (?a>?b)%positive ] => change (a>b)%positive with (Zpos a>Zpos b) + (* V: greater or equal *) + | H : context [ (?a>=?b)%positive ] |- _ => change (a>=b)%positive with (Zpos a>=Zpos b) in H + | |- context [ (?a>=?b)%positive ] => change (a>=b)%positive with (Zpos a>=Zpos b) + end. + +Ltac zify_positive_op := + match goal with + (* Zneg -> -Zpos (except for numbers) *) + | H : context [ Zneg ?a ] |- _ => + let isp := isPcst a in + match isp with + | true => change (Zneg a) with (Zneg' a) in H + | _ => change (Zneg a) with (- Zpos a) in H + end + | |- context [ Zneg ?a ] => + let isp := isPcst a in + match isp with + | true => change (Zneg a) with (Zneg' a) + | _ => change (Zneg a) with (- Zpos a) + end + + (* misc type conversions: nat to positive *) + | H : context [ Zpos (P_of_succ_nat ?a) ] |- _ => rewrite (Zpos_P_of_succ_nat a) in H + | |- context [ Zpos (P_of_succ_nat ?a) ] => rewrite (Zpos_P_of_succ_nat a) + + (* Pplus -> Zplus *) + | H : context [ Zpos (Pplus ?a ?b) ] |- _ => change (Zpos (Pplus a b)) with (Zplus (Zpos a) (Zpos b)) in H + | |- context [ Zpos (Pplus ?a ?b) ] => change (Zpos (Pplus a b)) with (Zplus (Zpos a) (Zpos b)) + + (* Pmin -> Zmin *) + | H : context [ Zpos (Pmin ?a ?b) ] |- _ => rewrite (Zpos_min a b) in H + | |- context [ Zpos (Pmin ?a ?b) ] => rewrite (Zpos_min a b) + + (* Pmax -> Zmax *) + | H : context [ Zpos (Pmax ?a ?b) ] |- _ => rewrite (Zpos_max a b) in H + | |- context [ Zpos (Pmax ?a ?b) ] => rewrite (Zpos_max a b) + + (* Pminus -> Zmax 1 (Zminus ... ...) *) + | H : context [ Zpos (Pminus ?a ?b) ] |- _ => rewrite (Zpos_minus a b) in H + | |- context [ Zpos (Pminus ?a ?b) ] => rewrite (Zpos_minus a b) + + (* Psucc -> Zsucc *) + | H : context [ Zpos (Psucc ?a) ] |- _ => rewrite (Zpos_succ_morphism a) in H + | |- context [ Zpos (Psucc ?a) ] => rewrite (Zpos_succ_morphism a) + + (* Ppred -> Pminus ... -1 -> Zmax 1 (Zminus ... - 1) *) + | H : context [ Zpos (Ppred ?a) ] |- _ => rewrite (Ppred_minus a) in H + | |- context [ Zpos (Ppred ?a) ] => rewrite (Ppred_minus a) + + (* Pmult -> Zmult and a positivity hypothesis *) + | H : context [ Zpos (Pmult ?a ?b) ] |- _ => + let H:= fresh "H" in + assert (H:=Zgt_pos_0 (Pmult a b)); rewrite (Zpos_mult_morphism a b) in * + | |- context [ Zpos (Pmult ?a ?b) ] => + let H:= fresh "H" in + assert (H:=Zgt_pos_0 (Pmult a b)); rewrite (Zpos_mult_morphism a b) in * + + (* xO *) + | H : context [ Zpos (xO ?a) ] |- _ => + let isp := isPcst a in + match isp with + | true => change (Zpos (xO a)) with (Zpos' (xO a)) in H + | _ => rewrite (Zpos_xO a) in H + end + | |- context [ Zpos (xO ?a) ] => + let isp := isPcst a in + match isp with + | true => change (Zpos (xO a)) with (Zpos' (xO a)) + | _ => rewrite (Zpos_xO a) + end + (* xI *) + | H : context [ Zpos (xI ?a) ] |- _ => + let isp := isPcst a in + match isp with + | true => change (Zpos (xI a)) with (Zpos' (xI a)) in H + | _ => rewrite (Zpos_xI a) in H + end + | |- context [ Zpos (xI ?a) ] => + let isp := isPcst a in + match isp with + | true => change (Zpos (xI a)) with (Zpos' (xI a)) + | _ => rewrite (Zpos_xI a) + end + + (* xI : nothing to do, just prevent adding a useless positivity condition *) + | H : context [ Zpos xH ] |- _ => hide_Zpos xH + | |- context [ Zpos xH ] => hide_Zpos xH + + (* atoms of type positive : we add a positivity condition (if not already there) *) + | H : context [ Zpos ?a ] |- _ => + match goal with + | H' : Zpos a > 0 |- _ => hide_Zpos a + | H' : Zpos' a > 0 |- _ => fail + | _ => let H:= fresh "H" in assert (H:=Zgt_pos_0 a); hide_Zpos a + end + | |- context [ Zpos ?a ] => + match goal with + | H' : Zpos a > 0 |- _ => hide_Zpos a + | H' : Zpos' a > 0 |- _ => fail + | _ => let H:= fresh "H" in assert (H:=Zgt_pos_0 a); hide_Zpos a + end + end. + +Ltac zify_positive := + repeat zify_positive_rel; repeat zify_positive_op; unfold Zpos',Zneg' in *. + + + + + +(* IV) conversion from N to Z *) + +Definition Z_of_N' := Z_of_N. + +Ltac hide_Z_of_N t := + let z := fresh "z" in set (z:=Z_of_N t) in *; + change Z_of_N with Z_of_N' in z; + unfold z in *; clear z. + +Ltac zify_N_rel := + match goal with + (* I: equalities *) + | H : (@eq N ?a ?b) |- _ => generalize (Z_of_N_eq _ _ H); clear H; intro H + | |- (@eq N ?a ?b) => apply (Z_of_N_eq_rev a b) + | H : context [ @eq N ?a ?b ] |- _ => rewrite (Z_of_N_eq_iff a b) in H + | |- context [ @eq N ?a ?b ] => rewrite (Z_of_N_eq_iff a b) + (* II: less than *) + | H : (?a generalize (Z_of_N_lt _ _ H); clear H; intro H + | |- (?a apply (Z_of_N_lt_rev a b) + | H : context [ (?a rewrite (Z_of_N_lt_iff a b) in H + | |- context [ (?a rewrite (Z_of_N_lt_iff a b) + (* III: less or equal *) + | H : (?a<=?b)%N |- _ => generalize (Z_of_N_le _ _ H); clear H; intro H + | |- (?a<=?b)%N => apply (Z_of_N_le_rev a b) + | H : context [ (?a<=?b)%N ] |- _ => rewrite (Z_of_N_le_iff a b) in H + | |- context [ (?a<=?b)%N ] => rewrite (Z_of_N_le_iff a b) + (* IV: greater than *) + | H : (?a>?b)%N |- _ => generalize (Z_of_N_gt _ _ H); clear H; intro H + | |- (?a>?b)%N => apply (Z_of_N_gt_rev a b) + | H : context [ (?a>?b)%N ] |- _ => rewrite (Z_of_N_gt_iff a b) in H + | |- context [ (?a>?b)%N ] => rewrite (Z_of_N_gt_iff a b) + (* V: greater or equal *) + | H : (?a>=?b)%N |- _ => generalize (Z_of_N_ge _ _ H); clear H; intro H + | |- (?a>=?b)%N => apply (Z_of_N_ge_rev a b) + | H : context [ (?a>=?b)%N ] |- _ => rewrite (Z_of_N_ge_iff a b) in H + | |- context [ (?a>=?b)%N ] => rewrite (Z_of_N_ge_iff a b) + end. + +Ltac zify_N_op := + match goal with + (* misc type conversions: nat to positive *) + | H : context [ Z_of_N (N_of_nat ?a) ] |- _ => rewrite (Z_of_N_of_nat a) in H + | |- context [ Z_of_N (N_of_nat ?a) ] => rewrite (Z_of_N_of_nat a) + | H : context [ Z_of_N (Zabs_N ?a) ] |- _ => rewrite (Z_of_N_abs a) in H + | |- context [ Z_of_N (Zabs_N ?a) ] => rewrite (Z_of_N_abs a) + | H : context [ Z_of_N (Npos ?a) ] |- _ => rewrite (Z_of_N_pos a) in H + | |- context [ Z_of_N (Npos ?a) ] => rewrite (Z_of_N_pos a) + | H : context [ Z_of_N N0 ] |- _ => change (Z_of_N N0) with Z0 in H + | |- context [ Z_of_N N0 ] => change (Z_of_N N0) with Z0 + + (* Nplus -> Zplus *) + | H : context [ Z_of_N (Nplus ?a ?b) ] |- _ => rewrite (Z_of_N_plus a b) in H + | |- context [ Z_of_N (Nplus ?a ?b) ] => rewrite (Z_of_N_plus a b) + + (* Nmin -> Zmin *) + | H : context [ Z_of_N (Nmin ?a ?b) ] |- _ => rewrite (Z_of_N_min a b) in H + | |- context [ Z_of_N (Nmin ?a ?b) ] => rewrite (Z_of_N_min a b) + + (* Nmax -> Zmax *) + | H : context [ Z_of_N (Nmax ?a ?b) ] |- _ => rewrite (Z_of_N_max a b) in H + | |- context [ Z_of_N (Nmax ?a ?b) ] => rewrite (Z_of_N_max a b) + + (* Nminus -> Zmax 0 (Zminus ... ...) *) + | H : context [ Z_of_N (Nminus ?a ?b) ] |- _ => rewrite (Z_of_N_minus a b) in H + | |- context [ Z_of_N (Nminus ?a ?b) ] => rewrite (Z_of_N_minus a b) + + (* Nsucc -> Zsucc *) + | H : context [ Z_of_N (Nsucc ?a) ] |- _ => rewrite (Z_of_N_succ a) in H + | |- context [ Z_of_N (Nsucc ?a) ] => rewrite (Z_of_N_succ a) + + (* Nmult -> Zmult and a positivity hypothesis *) + | H : context [ Z_of_N (Nmult ?a ?b) ] |- _ => + let H:= fresh "H" in + assert (H:=Z_of_N_le_0 (Nmult a b)); rewrite (Z_of_N_mult a b) in * + | |- context [ Z_of_N (Nmult ?a ?b) ] => + let H:= fresh "H" in + assert (H:=Z_of_N_le_0 (Nmult a b)); rewrite (Z_of_N_mult a b) in * + + (* atoms of type N : we add a positivity condition (if not already there) *) + | H : context [ Z_of_N ?a ] |- _ => + match goal with + | H' : 0 <= Z_of_N a |- _ => hide_Z_of_N a + | H' : 0 <= Z_of_N' a |- _ => fail + | _ => let H:= fresh "H" in assert (H:=Z_of_N_le_0 a); hide_Z_of_N a + end + | |- context [ Z_of_N ?a ] => + match goal with + | H' : 0 <= Z_of_N a |- _ => hide_Z_of_N a + | H' : 0 <= Z_of_N' a |- _ => fail + | _ => let H:= fresh "H" in assert (H:=Z_of_N_le_0 a); hide_Z_of_N a + end + end. + +Ltac zify_N := repeat zify_N_rel; repeat zify_N_op; unfold Z_of_N' in *. + + + +(** The complete Z-ification tactic *) + +Ltac zify := + repeat progress (zify_nat; zify_positive; zify_N); zify_op. + diff --git a/contrib/omega/coq_omega.ml b/contrib/omega/coq_omega.ml index be9ea5ae..84092812 100644 --- a/contrib/omega/coq_omega.ml +++ b/contrib/omega/coq_omega.ml @@ -13,7 +13,7 @@ (* *) (**************************************************************************) -(* $Id: coq_omega.ml 9963 2007-07-09 14:02:20Z letouzey $ *) +(* $Id: coq_omega.ml 11094 2008-06-10 19:35:23Z herbelin $ *) open Util open Pp @@ -128,12 +128,12 @@ let intern_id,unintern_id = let mk_then = tclTHENLIST -let exists_tac c = constructor_tac (Some 1) 1 (Rawterm.ImplicitBindings [c]) +let exists_tac c = constructor_tac false (Some 1) 1 (Rawterm.ImplicitBindings [c]) let generalize_tac t = generalize_time (generalize t) let elim t = elim_time (simplest_elim t) let exact t = exact_time (Tactics.refine t) -let unfold s = Tactics.unfold_in_concl [[], Lazy.force s] +let unfold s = Tactics.unfold_in_concl [all_occurrences, Lazy.force s] let rev_assoc k = let rec loop = function @@ -180,8 +180,6 @@ let coq_Zneg = lazy (constant "Zneg") let coq_Z = lazy (constant "Z") let coq_comparison = lazy (constant "comparison") let coq_Gt = lazy (constant "Gt") -let coq_INFEEIEUR = lazy (constant "Lt") -let coq_Eq = lazy (constant "Eq") let coq_Zplus = lazy (constant "Zplus") let coq_Zmult = lazy (constant "Zmult") let coq_Zopp = lazy (constant "Zopp") @@ -1227,7 +1225,7 @@ let replay_history tactic_normalisation = (clear [aux]); (intros_using [id]); (loop l) ]; - tclTHEN (exists_tac eq1) reflexivity ] + tclTHEN (exists_tac (inj_open eq1)) reflexivity ] | SPLIT_INEQ(e,(e1,act1),(e2,act2)) :: l -> let id1 = new_identifier () and id2 = new_identifier () in diff --git a/contrib/omega/g_omega.ml4 b/contrib/omega/g_omega.ml4 index 01592ebe..02545b30 100644 --- a/contrib/omega/g_omega.ml4 +++ b/contrib/omega/g_omega.ml4 @@ -15,10 +15,33 @@ (*i camlp4deps: "parsing/grammar.cma" i*) -(* $Id: g_omega.ml4 7734 2005-12-26 14:06:51Z herbelin $ *) +(* $Id: g_omega.ml4 10028 2007-07-18 22:38:06Z letouzey $ *) open Coq_omega +open Refiner + +let omega_tactic l = + let tacs = List.map + (function + | "nat" -> Tacinterp.interp <:tactic> + | "positive" -> Tacinterp.interp <:tactic> + | "N" -> Tacinterp.interp <:tactic> + | "Z" -> Tacinterp.interp <:tactic> + | s -> Util.error ("No Omega knowledge base for type "^s)) + (Util.list_uniquize (List.sort compare l)) + in + tclTHEN + (tclREPEAT (tclPROGRESS (tclTHENLIST tacs))) + omega_solver + TACTIC EXTEND omega - [ "omega" ] -> [ omega_solver ] +| [ "omega" ] -> [ omega_tactic [] ] END + +TACTIC EXTEND omega' +| [ "omega" "with" ne_ident_list(l) ] -> + [ omega_tactic (List.map Names.string_of_id l) ] +| [ "omega" "with" "*" ] -> [ omega_tactic ["nat";"positive";"N";"Z"] ] +END + diff --git a/contrib/recdef/Recdef.v b/contrib/recdef/Recdef.v deleted file mode 100644 index 2d206220..00000000 --- a/contrib/recdef/Recdef.v +++ /dev/null @@ -1,48 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* A) -> A -> A := - fun (fl : A -> A) (def : A) => - match n with - | O => def - | S m => fl (iter m fl def) - end. -End Iter. - -Theorem SSplus_lt : forall p p' : nat, p < S (S (p + p')). - intro p; intro p'; change (S p <= S (S (p + p'))); - apply le_S; apply Gt.gt_le_S; change (p < S (p + p')); - apply Lt.le_lt_n_Sm; apply Plus.le_plus_l. -Qed. - - -Theorem Splus_lt : forall p p' : nat, p' < S (p + p'). - intro p; intro p'; change (S p' <= S (p + p')); - apply Gt.gt_le_S; change (p' < S (p + p')); apply Lt.le_lt_n_Sm; - apply Plus.le_plus_r. -Qed. - -Theorem le_lt_SS : forall x y, x <= y -> x < S (S y). -intro x; intro y; intro H; change (S x <= S (S y)); - apply le_S; apply Gt.gt_le_S; change (x < S y); - apply Lt.le_lt_n_Sm; exact H. -Qed. - -Inductive max_type (m n:nat) : Set := - cmt : forall v, m <= v -> n <= v -> max_type m n. - -Definition max : forall m n:nat, max_type m n. -intros m n; case (Compare_dec.le_gt_dec m n). -intros h; exists n; [exact h | apply le_n]. -intros h; exists m; [apply le_n | apply Lt.lt_le_weak; exact h]. -Defined. diff --git a/contrib/recdef/recdef.ml4 b/contrib/recdef/recdef.ml4 deleted file mode 100644 index 40832677..00000000 --- a/contrib/recdef/recdef.ml4 +++ /dev/null @@ -1,1324 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* next_global_ident_away false id (acc@ids)::acc) - idl - [] - -let pf_get_new_id id g = - List.hd (pf_get_new_ids [id] g) - -let h_intros l = - tclMAP h_intro l - -let do_observe_tac s tac g = - let goal = begin (Printer.pr_goal (sig_it g)) end in - try let v = tac g in msgnl (goal ++ fnl () ++ (str s)++(str " ")++(str "finished")); v - with e -> - msgnl (str "observation "++str s++str " raised exception " ++ - Cerrors.explain_exn e ++ str " on goal " ++ goal ); - raise e;; - - -let observe_tac s tac g = - if Tacinterp.get_debug () <> Tactic_debug.DebugOff - then do_observe_tac s tac g - else tac g - -let hyp_ids = List.map id_of_string - ["x";"v";"k";"def";"p";"h";"n";"h'"; "anonymous"; "teq"; "rec_res"; - "hspec";"heq"; "hrec"; "hex"; "teq"; "pmax";"hle"];; - -let rec nthtl = function - l, 0 -> l | _::tl, n -> nthtl (tl, n-1) | [], _ -> [];; - -let hyp_id n l = List.nth l n;; - -let (x_id:identifier) = hyp_id 0 hyp_ids;; -let (v_id:identifier) = hyp_id 1 hyp_ids;; -let (k_id:identifier) = hyp_id 2 hyp_ids;; -let (def_id:identifier) = hyp_id 3 hyp_ids;; -let (p_id:identifier) = hyp_id 4 hyp_ids;; -let (h_id:identifier) = hyp_id 5 hyp_ids;; -let (n_id:identifier) = hyp_id 6 hyp_ids;; -let (h'_id:identifier) = hyp_id 7 hyp_ids;; -let (ano_id:identifier) = hyp_id 8 hyp_ids;; -let (rec_res_id:identifier) = hyp_id 10 hyp_ids;; -let (hspec_id:identifier) = hyp_id 11 hyp_ids;; -let (heq_id:identifier) = hyp_id 12 hyp_ids;; -let (hrec_id:identifier) = hyp_id 13 hyp_ids;; -let (hex_id:identifier) = hyp_id 14 hyp_ids;; -let (teq_id:identifier) = hyp_id 15 hyp_ids;; -let (pmax_id:identifier) = hyp_id 16 hyp_ids;; -let (hle_id:identifier) = hyp_id 17 hyp_ids;; - -let message s = if Options.is_verbose () then msgnl(str s);; - -let def_of_const t = - match (kind_of_term t) with - Const sp -> - (try (match (Global.lookup_constant sp) with - {const_body=Some c} -> Declarations.force c - |_ -> assert false) - with _ -> - anomaly ("Cannot find definition of constant "^ - (string_of_id (id_of_label (con_label sp)))) - ) - |_ -> assert false - -let type_of_const t = - match (kind_of_term t) with - Const sp -> Typeops.type_of_constant (Global.env()) sp - |_ -> assert false - -let arg_type t = - match kind_of_term (def_of_const t) with - Lambda(a,b,c) -> b - | _ -> assert false;; - -let evaluable_of_global_reference r = - match r with - ConstRef sp -> EvalConstRef sp - | VarRef id -> EvalVarRef id - | _ -> assert false;; - - -let rank_for_arg_list h = - let predicate a b = - try List.for_all2 eq_constr a b with - Invalid_argument _ -> false in - let rec rank_aux i = function - | [] -> None - | x::tl -> if predicate h x then Some i else rank_aux (i+1) tl in - rank_aux 0;; - -let rec (find_call_occs: - constr -> constr -> (constr list ->constr)*(constr list list)) = - fun f expr -> - match (kind_of_term expr) with - App (g, args) when g = f -> - (fun l -> List.hd l), [Array.to_list args] - | App (g, args) -> - let (largs: constr list) = Array.to_list args in - let rec find_aux = function - [] -> (fun x -> []), [] - | a::upper_tl -> - (match find_aux upper_tl with - (cf, ((arg1::args) as args_for_upper_tl)) -> - (match find_call_occs f a with - cf2, (_ :: _ as other_args) -> - let rec avoid_duplicates args = - match args with - | [] -> (fun _ -> []), [] - | h::tl -> - let recomb_tl, args_for_tl = - avoid_duplicates tl in - match rank_for_arg_list h args_for_upper_tl with - | None -> - (fun l -> List.hd l::recomb_tl(List.tl l)), - h::args_for_tl - | Some i -> - (fun l -> List.nth l (i+List.length args_for_tl):: - recomb_tl l), - args_for_tl - in - let recombine, other_args' = - avoid_duplicates other_args in - let len1 = List.length other_args' in - (fun l -> cf2 (recombine l)::cf(nthtl(l,len1))), - other_args'@args_for_upper_tl - | _, [] -> (fun x -> a::cf x), args_for_upper_tl) - | _, [] -> - (match find_call_occs f a with - cf, (arg1::args) -> (fun l -> cf l::upper_tl), (arg1::args) - | _, [] -> (fun x -> a::upper_tl), [])) in - begin - match (find_aux largs) with - cf, [] -> (fun l -> mkApp(g, args)), [] - | cf, args -> - (fun l -> mkApp (g, Array.of_list (cf l))), args - end - | Rel(_) -> error "find_call_occs : Rel" - | Var(id) -> (fun l -> expr), [] - | Meta(_) -> error "find_call_occs : Meta" - | Evar(_) -> error "find_call_occs : Evar" - | Sort(_) -> error "find_call_occs : Sort" - | Cast(b,_,_) -> find_call_occs f b - | Prod(_,_,_) -> error "find_call_occs : Prod" - | Lambda(_,_,_) -> error "find_call_occs : Lambda" - | LetIn(_,_,_,_) -> error "find_call_occs : let in" - | Const(_) -> (fun l -> expr), [] - | Ind(_) -> (fun l -> expr), [] - | Construct (_, _) -> (fun l -> expr), [] - | Case(i,t,a,r) -> - (match find_call_occs f a with - cf, (arg1::args) -> (fun l -> mkCase(i, t, (cf l), r)),(arg1::args) - | _ -> (fun l -> mkCase(i, t, a, r)),[]) - | Fix(_) -> error "find_call_occs : Fix" - | CoFix(_) -> error "find_call_occs : CoFix";; - - - -let coq_constant s = - Coqlib.gen_constant_in_modules "RecursiveDefinition" - (Coqlib.init_modules @ Coqlib.arith_modules) s;; - -let constant sl s = - constr_of_reference - (locate (make_qualid(Names.make_dirpath - (List.map id_of_string (List.rev sl))) - (id_of_string s)));; - -let find_reference sl s = - (locate (make_qualid(Names.make_dirpath - (List.map id_of_string (List.rev sl))) - (id_of_string s)));; - -let delayed_force f = f () - -let le_lt_SS = function () -> (constant ["Recdef"] "le_lt_SS") -let le_lt_n_Sm = function () -> (coq_constant "le_lt_n_Sm") - -let le_trans = function () -> (coq_constant "le_trans") -let le_lt_trans = function () -> (coq_constant "le_lt_trans") -let lt_S_n = function () -> (coq_constant "lt_S_n") -let le_n = function () -> (coq_constant "le_n") -let refl_equal = function () -> (coq_constant "refl_equal") -let eq = function () -> (coq_constant "eq") -let ex = function () -> (coq_constant "ex") -let coq_sig_ref = function () -> (find_reference ["Coq";"Init";"Specif"] "sig") -let coq_sig = function () -> (coq_constant "sig") -let coq_O = function () -> (coq_constant "O") -let coq_S = function () -> (coq_constant "S") - -let gt_antirefl = function () -> (coq_constant "gt_irrefl") -let lt_n_O = function () -> (coq_constant "lt_n_O") -let lt_n_Sn = function () -> (coq_constant "lt_n_Sn") - -let f_equal = function () -> (coq_constant "f_equal") -let well_founded_induction = function () -> (coq_constant "well_founded_induction") -let well_founded = function () -> (coq_constant "well_founded") -let acc_rel = function () -> (coq_constant "Acc") -let acc_inv_id = function () -> (coq_constant "Acc_inv") -let well_founded_ltof = function () -> (Coqlib.coq_constant "" ["Arith";"Wf_nat"] "well_founded_ltof") -let iter_ref = function () -> (try find_reference ["Recdef"] "iter" with Not_found -> error "module Recdef not loaded") -let max_ref = function () -> (find_reference ["Recdef"] "max") -let iter = function () -> (constr_of_reference (delayed_force iter_ref)) -let max_constr = function () -> (constr_of_reference (delayed_force max_ref)) - -let ltof_ref = function () -> (find_reference ["Coq";"Arith";"Wf_nat"] "ltof") -let coq_conj = function () -> find_reference ["Coq";"Init";"Logic"] "conj" - -(* These are specific to experiments in nat with lt as well_founded_relation, *) -(* but this should be made more general. *) -let nat = function () -> (coq_constant "nat") -let lt = function () -> (coq_constant "lt") - -let mkCaseEq a : tactic = - (fun g -> - (* commentaire de Yves: on pourra avoir des problemes si - a n'est pas bien type dans l'environnement du but *) - let type_of_a = pf_type_of g a in - (tclTHEN (generalize [mkApp(delayed_force refl_equal, [| type_of_a; a|])]) - (tclTHEN - (fun g2 -> - change_in_concl None - (pattern_occs [([2], a)] (pf_env g2) Evd.empty (pf_concl g2)) - g2) - (simplest_case a))) g);; - -let rec mk_intros_and_continue (extra_eqn:bool) - cont_function (eqs:constr list) (expr:constr) g = - match kind_of_term expr with - | Lambda (n, _, b) -> - let n1 = - match n with - Name x -> x - | Anonymous -> ano_id - in - let new_n = pf_get_new_id n1 g in - tclTHEN (h_intro new_n) - (mk_intros_and_continue extra_eqn cont_function eqs - (subst1 (mkVar new_n) b)) g - | _ -> - if extra_eqn then - let teq = pf_get_new_id teq_id g in - tclTHENLIST - [ h_intro teq; - tclMAP - (fun eq -> tclTRY (Equality.general_rewrite_in true teq eq)) - (List.rev eqs); - (fun g1 -> - let ty_teq = pf_type_of g1 (mkVar teq) in - let teq_lhs,teq_rhs = - let _,args = destApp ty_teq in - args.(1),args.(2) - in - cont_function (mkVar teq::eqs) (replace_term teq_lhs teq_rhs expr) g1 - ) - ] - g - else - cont_function eqs expr g - -let const_of_ref = function - ConstRef kn -> kn - | _ -> anomaly "ConstRef expected" - -let simpl_iter () = - reduce - (Lazy - {rBeta=true;rIota=true;rZeta= true; rDelta=false; - rConst = [ EvalConstRef (const_of_ref (delayed_force iter_ref))]}) - onConcl - -(* The boolean value is_mes expresses that the termination is expressed - using a measure function instead of a well-founded relation. *) -let tclUSER is_mes l g = - let clear_tac = - match l with - | None -> h_clear true [] - | Some l -> tclMAP (fun id -> tclTRY (h_clear false [id])) (List.rev l) - in - tclTHENSEQ - [ - clear_tac; - if is_mes - then unfold_in_concl [([], evaluable_of_global_reference (delayed_force ltof_ref))] - else tclIDTAC - ] - g - - -let list_rewrite (rev:bool) (eqs: constr list) = - tclREPEAT - (List.fold_right - (fun eq i -> tclORELSE (rewriteLR eq) i) - (if rev then (List.rev eqs) else eqs) (tclFAIL 0 (mt())));; - -let base_leaf_terminate (func:global_reference) eqs expr = -(* let _ = msgnl (str "entering base_leaf") in *) - (fun g -> - let k',h = - match pf_get_new_ids [k_id;h_id] g with - [k';h] -> k',h - | _ -> assert false - in - tclTHENLIST [observe_tac "first split" (split (ImplicitBindings [expr])); - observe_tac "second split" (split (ImplicitBindings [delayed_force coq_O])); - observe_tac "intro k" (h_intro k'); - observe_tac "case on k" - (tclTHENS - (simplest_case (mkVar k')) - [(tclTHEN (h_intro h) - (tclTHEN (simplest_elim - (mkApp (delayed_force gt_antirefl, - [| delayed_force coq_O |]))) - default_auto)); tclIDTAC ]); - intros; - simpl_iter(); - unfold_constr func; - list_rewrite true eqs; - default_auto ] g);; - -(* La fonction est donnee en premier argument a la - fonctionnelle suivie d'autres Lambdas et de Case ... - Pour recuperer la fonction f a partir de la - fonctionnelle *) - -let get_f foncl = - match (kind_of_term (def_of_const foncl)) with - Lambda (Name f, _, _) -> f - |_ -> error "la fonctionnelle est mal definie";; - - -let rec compute_le_proofs = function - [] -> assumption - | a::tl -> - tclORELSE assumption - (tclTHENS - (fun g -> - let le_trans = delayed_force le_trans in - let t_le_trans = compute_renamed_type g le_trans in - let m_id = - let _,_,t = destProd t_le_trans in - let na,_,_ = destProd t in - Nameops.out_name na - in - apply_with_bindings - (le_trans, - ExplicitBindings[dummy_loc,NamedHyp m_id,a]) - g - ) - [compute_le_proofs tl; - tclORELSE (apply (delayed_force le_n)) assumption]) - -let make_lt_proof pmax le_proof = - tclTHENS - (fun g -> - let le_lt_trans = delayed_force le_lt_trans in - let t_le_lt_trans = compute_renamed_type g le_lt_trans in - let m_id = - let _,_,t = destProd t_le_lt_trans in - let na,_,_ = destProd t in - Nameops.out_name na - in - apply_with_bindings - (le_lt_trans, - ExplicitBindings[dummy_loc,NamedHyp m_id, pmax]) g) - [observe_tac "compute_le_proofs" (compute_le_proofs le_proof); - tclTHENLIST[observe_tac "lt_S_n" (apply (delayed_force lt_S_n)); default_full_auto]];; - -let rec list_cond_rewrite k def pmax cond_eqs le_proofs = - match cond_eqs with - [] -> tclIDTAC - | eq::eqs -> - (fun g -> - let t_eq = compute_renamed_type g (mkVar eq) in - let k_id,def_id = - let k_na,_,t = destProd t_eq in - let _,_,t = destProd t in - let def_na,_,_ = destProd t in - Nameops.out_name k_na,Nameops.out_name def_na - in - tclTHENS - (general_rewrite_bindings false - (mkVar eq, - ExplicitBindings[dummy_loc, NamedHyp k_id, mkVar k; - dummy_loc, NamedHyp def_id, mkVar def])) - [list_cond_rewrite k def pmax eqs le_proofs; - observe_tac "make_lt_proof" (make_lt_proof pmax le_proofs)] g - ) - -let rec introduce_all_equalities func eqs values specs bound le_proofs - cond_eqs = - match specs with - [] -> - fun g -> - let ids = pf_ids_of_hyps g in - let s_max = mkApp(delayed_force coq_S, [|bound|]) in - let k = next_global_ident_away true k_id ids in - let ids = k::ids in - let h' = next_global_ident_away true (h'_id) ids in - let ids = h'::ids in - let def = next_global_ident_away true def_id ids in - tclTHENLIST - [observe_tac "introduce_all_equalities_final split" (split (ImplicitBindings [s_max])); - observe_tac "introduce_all_equalities_final intro k" (h_intro k); - tclTHENS - (observe_tac "introduce_all_equalities_final case k" (simplest_case (mkVar k))) - [ - tclTHENLIST[h_intro h'; - simplest_elim(mkApp(delayed_force lt_n_O,[|s_max|])); - default_full_auto]; - tclIDTAC - ]; - observe_tac "clearing k " (clear [k]); - observe_tac "intros k h' def" (h_intros [k;h';def]); - observe_tac "simple_iter" (simpl_iter()); - observe_tac "unfold functional" - (unfold_in_concl[([1],evaluable_of_global_reference func)]); - observe_tac "rewriting equations" - (list_rewrite true eqs); - observe_tac "cond rewrite" (list_cond_rewrite k def bound cond_eqs le_proofs); - observe_tac "refl equal" (apply (delayed_force refl_equal))] g - | spec1::specs -> - fun g -> - let ids = ids_of_named_context (pf_hyps g) in - let p = next_global_ident_away true p_id ids in - let ids = p::ids in - let pmax = next_global_ident_away true pmax_id ids in - let ids = pmax::ids in - let hle1 = next_global_ident_away true hle_id ids in - let ids = hle1::ids in - let hle2 = next_global_ident_away true hle_id ids in - let ids = hle2::ids in - let heq = next_global_ident_away true heq_id ids in - tclTHENLIST - [simplest_elim (mkVar spec1); - list_rewrite true eqs; - h_intros [p; heq]; - simplest_elim (mkApp(delayed_force max_constr, [| bound; mkVar p|])); - h_intros [pmax; hle1; hle2]; - introduce_all_equalities func eqs values specs - (mkVar pmax) ((mkVar pmax)::le_proofs) - (heq::cond_eqs)] g;; - -let string_match s = - if String.length s < 3 then failwith "string_match"; - try - for i = 0 to 3 do - if String.get s i <> String.get "Acc_" i then failwith "string_match" - done; - with Invalid_argument _ -> failwith "string_match" - -let retrieve_acc_var g = - (* Julien: I don't like this version .... *) - let hyps = pf_ids_of_hyps g in - map_succeed - (fun id -> string_match (string_of_id id);id) - hyps - -let rec introduce_all_values is_mes acc_inv func context_fn - eqs hrec args values specs = - (match args with - [] -> - tclTHENLIST - [observe_tac "split" (split(ImplicitBindings - [context_fn (List.map mkVar (List.rev values))])); - observe_tac "introduce_all_equalities" (introduce_all_equalities func eqs - (List.rev values) (List.rev specs) (delayed_force coq_O) [] [])] - | arg::args -> - (fun g -> - let ids = ids_of_named_context (pf_hyps g) in - let rec_res = next_global_ident_away true rec_res_id ids in - let ids = rec_res::ids in - let hspec = next_global_ident_away true hspec_id ids in - let tac = - observe_tac "introduce_all_values" ( - introduce_all_values is_mes acc_inv func context_fn eqs - hrec args - (rec_res::values)(hspec::specs)) in - (tclTHENS - (observe_tac "elim h_rec" (simplest_elim (mkApp(mkVar hrec, Array.of_list arg)))) - [tclTHENLIST [h_intros [rec_res; hspec]; - tac]; - (tclTHENS - (observe_tac "acc_inv" (apply (Lazy.force acc_inv))) - [ observe_tac "h_assumption" h_assumption - ; - tclTHENLIST - [ - tclTRY(list_rewrite true eqs); - observe_tac "user proof" - (fun g -> - tclUSER - is_mes - (Some (hrec::hspec::(retrieve_acc_var g)@specs)) - g - ) - ] - ] - ) - ]) g) - - ) - - -let rec_leaf_terminate is_mes acc_inv hrec (func:global_reference) eqs expr = - match find_call_occs (mkVar (get_f (constr_of_reference func))) expr with - | context_fn, args -> - observe_tac "introduce_all_values" - (introduce_all_values is_mes acc_inv func context_fn eqs hrec args [] []) - -let proveterminate is_mes acc_inv (hrec:identifier) - (f_constr:constr) (func:global_reference) base_leaf rec_leaf = - let rec proveterminate (eqs:constr list) (expr:constr) = - try - (* let _ = msgnl (str "entering proveterminate") in *) - let v = - match (kind_of_term expr) with - Case (_, t, a, l) -> - (match find_call_occs f_constr a with - _,[] -> - tclTHENS - (fun g -> - (* let _ = msgnl(str "entering mkCaseEq") in *) - let v = (mkCaseEq a) g in - (* let _ = msgnl (str "exiting mkCaseEq") in *) - v - ) - (List.map - (mk_intros_and_continue true proveterminate eqs) - (Array.to_list l) - ) - | _, _::_ -> - ( - match find_call_occs f_constr expr with - _,[] -> observe_tac "base_leaf" (base_leaf func eqs expr) - | _, _:: _ -> - observe_tac "rec_leaf" - (rec_leaf is_mes acc_inv hrec func eqs expr) - ) - ) - | _ -> (match find_call_occs f_constr expr with - _,[] -> - (try - observe_tac "base_leaf" (base_leaf func eqs expr) - with e -> - (msgerrnl (str "failure in base case");raise e )) - | _, _::_ -> - observe_tac "rec_leaf" - (rec_leaf is_mes acc_inv hrec func eqs expr) - ) in - (* let _ = msgnl(str "exiting proveterminate") in *) - v - with e -> - begin - msgerrnl(str "failure in proveterminate"); - raise e - end - in - proveterminate - -let hyp_terminates func = - let a_arrow_b = arg_type (constr_of_reference func) in - let rev_args,b = decompose_prod a_arrow_b in - let left = - mkApp(delayed_force iter, - Array.of_list - (lift 5 a_arrow_b:: mkRel 3:: - constr_of_reference func::mkRel 1:: - List.rev (list_map_i (fun i _ -> mkRel (6+i)) 0 rev_args) - ) - ) - in - let right = mkRel 5 in - let equality = mkApp(delayed_force eq, [|lift 5 b; left; right|]) in - let result = (mkProd ((Name def_id) , lift 4 a_arrow_b, equality)) in - let cond = mkApp(delayed_force lt, [|(mkRel 2); (mkRel 1)|]) in - let nb_iter = - mkApp(delayed_force ex, - [|delayed_force nat; - (mkLambda - (Name - p_id, - delayed_force nat, - (mkProd (Name k_id, delayed_force nat, - mkArrow cond result))))|])in - let value = mkApp(delayed_force coq_sig, - [|b; - (mkLambda (Name v_id, b, nb_iter))|]) in - compose_prod rev_args value - - - -let tclUSER_if_not_mes is_mes names_to_suppress = - if is_mes - then - tclCOMPLETE (h_apply (delayed_force well_founded_ltof,Rawterm.NoBindings)) - else tclUSER is_mes names_to_suppress - -let termination_proof_header is_mes input_type ids args_id relation - rec_arg_num rec_arg_id tac wf_tac : tactic = - begin - fun g -> - let nargs = List.length args_id in - let pre_rec_args = - List.rev_map - mkVar (fst (list_chop (rec_arg_num - 1) args_id)) - in - let relation = substl pre_rec_args relation in - let input_type = substl pre_rec_args input_type in - let wf_thm = next_global_ident_away true (id_of_string ("wf_R")) ids in - let wf_rec_arg = - next_global_ident_away true - (id_of_string ("Acc_"^(string_of_id rec_arg_id))) - (wf_thm::ids) - in - let hrec = next_global_ident_away true hrec_id - (wf_rec_arg::wf_thm::ids) in - let acc_inv = - lazy ( - mkApp ( - delayed_force acc_inv_id, - [|input_type;relation;mkVar rec_arg_id|] - ) - ) - in - tclTHEN - (h_intros args_id) - (tclTHENS - (observe_tac - "first assert" - (assert_tac - true (* the assert thm is in first subgoal *) - (Name wf_rec_arg) - (mkApp (delayed_force acc_rel, - [|input_type;relation;mkVar rec_arg_id|]) - ) - ) - ) - [ - (* accesibility proof *) - tclTHENS - (observe_tac - "second assert" - (assert_tac - true - (Name wf_thm) - (mkApp (delayed_force well_founded,[|input_type;relation|])) - ) - ) - [ - (* interactive proof that the relation is well_founded *) - observe_tac "wf_tac" (wf_tac is_mes (Some args_id)); - (* this gives the accessibility argument *) - observe_tac - "apply wf_thm" - (h_apply ((mkApp(mkVar wf_thm, - [|mkVar rec_arg_id |])),Rawterm.NoBindings) - ) - ] - ; - (* rest of the proof *) - tclTHENSEQ - [observe_tac "generalize" - (onNLastHyps (nargs+1) - (fun (id,_,_) -> - tclTHEN (generalize [mkVar id]) (h_clear false [id]) - )) - ; - observe_tac "h_fix" (h_fix (Some hrec) (nargs+1)); - h_intros args_id; - h_intro wf_rec_arg; - observe_tac "tac" (tac hrec acc_inv) - ] - ] - ) g - end - - - -let rec instantiate_lambda t l = - match l with - | [] -> t - | a::l -> - let (bound_name, _, body) = destLambda t in - instantiate_lambda (subst1 a body) l -;; - - -let whole_start is_mes func input_type relation rec_arg_num : tactic = - begin - fun g -> - let ids = ids_of_named_context (pf_hyps g) in - let func_body = (def_of_const (constr_of_reference func)) in - let (f_name, _, body1) = destLambda func_body in - let f_id = - match f_name with - | Name f_id -> next_global_ident_away true f_id ids - | Anonymous -> anomaly "Anonymous function" - in - let n_names_types,_ = decompose_lam body1 in - let n_ids,ids = - List.fold_left - (fun (n_ids,ids) (n_name,_) -> - match n_name with - | Name id -> - let n_id = next_global_ident_away true id ids in - n_id::n_ids,n_id::ids - | _ -> anomaly "anonymous argument" - ) - ([],(f_id::ids)) - n_names_types - in - let rec_arg_id = List.nth n_ids (rec_arg_num - 1) in - let expr = instantiate_lambda func_body (mkVar f_id::(List.map mkVar n_ids)) in - termination_proof_header - is_mes - input_type - ids - n_ids - relation - rec_arg_num - rec_arg_id - (fun hrec acc_inv g -> - (proveterminate - is_mes - acc_inv - hrec - (mkVar f_id) - func - base_leaf_terminate - rec_leaf_terminate - [] - expr - ) - g - ) - tclUSER_if_not_mes - g - end - - -let get_current_subgoals_types () = - let pts = get_pftreestate () in - let _,subs = extract_open_pftreestate pts in - List.map snd (List.sort (fun (x,_) (y,_) -> x -y )subs ) - - -let build_and_l l = - let and_constr = Coqlib.build_coq_and () in - let conj_constr = coq_conj () in - let mk_and p1 p2 = - Term.mkApp(and_constr,[|p1;p2|]) in - let rec f = function - | [] -> failwith "empty list of subgoals!" - | [p] -> p,tclIDTAC,1 - | p1::pl -> - let c,tac,nb = f pl in - mk_and p1 c, - tclTHENS - (apply (constr_of_reference conj_constr)) - [tclIDTAC; - tac - ],nb+1 - in f l - - -let is_rec_res id = - let rec_res_name = string_of_id rec_res_id in - let id_name = string_of_id id in - try - String.sub id_name 0 (String.length rec_res_name) = rec_res_name - with _ -> false - -let clear_goals = - let rec clear_goal t = - match kind_of_term t with - | Prod(Name id as na,t,b) -> - let b' = clear_goal b in - if noccurn 1 b' && (is_rec_res id) - then pop b' - else if b' == b then t - else mkProd(na,t,b') - | _ -> map_constr clear_goal t - in - List.map clear_goal - - -let build_new_goal_type () = - let sub_gls_types = get_current_subgoals_types () in - let sub_gls_types = clear_goals sub_gls_types in - let res = build_and_l sub_gls_types in - res - - - -let prove_with_tcc lemma _ : tactic = - fun gls -> - let hid = next_global_ident_away true h_id (pf_ids_of_hyps gls) in - tclTHENSEQ - [ - generalize [lemma]; - h_intro hid; - Elim.h_decompose_and (mkVar hid); - gen_eauto(* default_eauto *) false (false,5) [] (Some []) - (* default_auto *) - ] - gls - - - -let open_new_goal using_lemmas ref goal_name (gls_type,decompose_and_tac,nb_goal) = - let current_proof_name = get_current_proof_name () in - let name = match goal_name with - | Some s -> s - | None -> - try (add_suffix current_proof_name "_subproof") - with _ -> anomaly "open_new_goal with an unamed theorem" - in - let sign = Global.named_context () in - let sign = clear_proofs sign in - let na = next_global_ident_away false name [] in - if occur_existential gls_type then - Util.error "\"abstract\" cannot handle existentials"; - let hook _ _ = - let lemma = mkConst (Lib.make_con na) in - Array.iteri - (fun i _ -> - by (observe_tac ("reusing lemma "^(string_of_id na)) (prove_with_tcc lemma i))) - (Array.make nb_goal ()) - ; - ref := Some lemma ; - defined (); - in - start_proof - na - (Decl_kinds.Global, Decl_kinds.Proof Decl_kinds.Lemma) - sign - gls_type - hook ; - by ( - fun g -> - tclTHEN - (decompose_and_tac) - (tclORELSE - (tclFIRST - (List.map - (fun c -> - tclTHENSEQ - [intros; - h_apply (interp_constr Evd.empty (Global.env()) c,Rawterm.NoBindings); - tclCOMPLETE Auto.default_auto - ] - ) - using_lemmas) - ) tclIDTAC) - g); - try - by tclIDTAC; (* raises UserError _ if the proof is complete *) - if Options.is_verbose () then (pp (Printer.pr_open_subgoals())) - with UserError _ -> - defined () - - -let com_terminate - tcc_lemma_name - tcc_lemma_ref - is_mes - fonctional_ref - input_type - relation - rec_arg_num - thm_name using_lemmas hook = - let (evmap, env) = Command.get_current_context() in - start_proof thm_name - (Global, Proof Lemma) (Environ.named_context_val env) - (hyp_terminates fonctional_ref) hook; - by (observe_tac "whole_start" (whole_start is_mes fonctional_ref - input_type relation rec_arg_num )); - try - let new_goal_type = build_new_goal_type () in - open_new_goal using_lemmas tcc_lemma_ref - (Some tcc_lemma_name) - (new_goal_type) - with Failure "empty list of subgoals!" -> - (* a non recursive function declared with measure ! *) - defined () - - - -let ind_of_ref = function - | IndRef (ind,i) -> (ind,i) - | _ -> anomaly "IndRef expected" - -let (value_f:constr list -> global_reference -> constr) = - fun al fterm -> - let d0 = dummy_loc in - let rev_x_id_l = - ( - List.fold_left - (fun x_id_l _ -> - let x_id = next_global_ident_away true x_id x_id_l in - x_id::x_id_l - ) - [] - al - ) - in - let fun_body = - RCases - (d0,None, - [RApp(d0, RRef(d0,fterm), List.rev_map (fun x_id -> RVar(d0, x_id)) rev_x_id_l), - (Anonymous,None)], - [d0, [v_id], [PatCstr(d0,(ind_of_ref - (delayed_force coq_sig_ref),1), - [PatVar(d0, Name v_id); - PatVar(d0, Anonymous)], - Anonymous)], - RVar(d0,v_id)]) - in - let value = - List.fold_left2 - (fun acc x_id a -> - RLambda - (d0, Name x_id, RDynamic(d0, constr_in a), - acc - ) - ) - fun_body - rev_x_id_l - (List.rev al) - in - understand Evd.empty (Global.env()) value;; - -let (declare_fun : identifier -> logical_kind -> constr -> global_reference) = - fun f_id kind value -> - let ce = {const_entry_body = value; - const_entry_type = None; - const_entry_opaque = false; - const_entry_boxed = true} in - ConstRef(declare_constant f_id (DefinitionEntry ce, kind));; - -let (declare_f : identifier -> logical_kind -> constr list -> global_reference -> global_reference) = - fun f_id kind input_type fterm_ref -> - declare_fun f_id kind (value_f input_type fterm_ref);; - -let start_equation (f:global_reference) (term_f:global_reference) - (cont_tactic:identifier list -> tactic) g = - let ids = pf_ids_of_hyps g in - let terminate_constr = constr_of_reference term_f in - let nargs = nb_prod (type_of_const terminate_constr) in - let x = - let rec f ids n = - if n = 0 - then [] - else - let x = next_global_ident_away true x_id ids in - x::f (x::ids) (n-1) - in - f ids nargs - in - tclTHENLIST [ - h_intros x; - observe_tac "unfold_constr f" (unfold_constr f); - observe_tac "simplest_case" (simplest_case (mkApp (terminate_constr, Array.of_list (List.map mkVar x)))); - observe_tac "prove_eq" (cont_tactic x)] g -;; - -let base_leaf_eq func eqs f_id g = - let ids = pf_ids_of_hyps g in - let k = next_global_ident_away true k_id ids in - let p = next_global_ident_away true p_id (k::ids) in - let v = next_global_ident_away true v_id (p::k::ids) in - let heq = next_global_ident_away true heq_id (v::p::k::ids) in - let heq1 = next_global_ident_away true heq_id (heq::v::p::k::ids) in - let hex = next_global_ident_away true hex_id (heq1::heq::v::p::k::ids) in - tclTHENLIST [ - h_intros [v; hex]; - simplest_elim (mkVar hex); - h_intros [p;heq1]; - tclTRY - (rewriteRL - (mkApp(mkVar heq1, - [|mkApp (delayed_force coq_S, [|mkVar p|]); - mkApp(delayed_force lt_n_Sn, [|mkVar p|]); f_id|]))); - simpl_iter(); - unfold_in_concl [([1], evaluable_of_global_reference func)]; - list_rewrite true eqs; - apply (delayed_force refl_equal)] g;; - -let f_S t = mkApp(delayed_force coq_S, [|t|]);; - -let rec introduce_all_values_eq cont_tac functional termine - f p heq1 pmax bounds le_proofs eqs ids = - function - [] -> - tclTHENLIST - [tclTHENS - (fun gls -> - let t_eq = compute_renamed_type gls (mkVar heq1) in - let k_id,def_id = - let k_na,_,t = destProd t_eq in - let _,_,t = destProd t in - let def_na,_,_ = destProd t in - Nameops.out_name k_na,Nameops.out_name def_na - in - general_rewrite_bindings false - (mkVar heq1, - ExplicitBindings[dummy_loc,NamedHyp k_id, - f_S(f_S(mkVar pmax)); - dummy_loc,NamedHyp def_id, - f]) gls ) - [tclTHENLIST - [simpl_iter(); - unfold_constr (reference_of_constr functional); - list_rewrite true eqs; cont_tac pmax le_proofs]; - tclTHENLIST[apply (delayed_force le_lt_SS); - compute_le_proofs le_proofs]]] - | arg::args -> - let v' = next_global_ident_away true v_id ids in - let ids = v'::ids in - let hex' = next_global_ident_away true hex_id ids in - let ids = hex'::ids in - let p' = next_global_ident_away true p_id ids in - let ids = p'::ids in - let new_pmax = next_global_ident_away true pmax_id ids in - let ids = pmax::ids in - let hle1 = next_global_ident_away true hle_id ids in - let ids = hle1::ids in - let hle2 = next_global_ident_away true hle_id ids in - let ids = hle2::ids in - let heq = next_global_ident_away true heq_id ids in - let ids = heq::ids in - let heq2 = next_global_ident_away true heq_id ids in - let ids = heq2::ids in - tclTHENLIST - [mkCaseEq(mkApp(termine, Array.of_list arg)); - h_intros [v'; hex']; - simplest_elim(mkVar hex'); - h_intros [p']; - simplest_elim(mkApp(delayed_force max_constr, [|mkVar pmax; - mkVar p'|])); - h_intros [new_pmax;hle1;hle2]; - introduce_all_values_eq - (fun pmax' le_proofs'-> - tclTHENLIST - [cont_tac pmax' le_proofs'; - h_intros [heq;heq2]; - rewriteLR (mkVar heq2); - tclTHENS - ( fun g -> - let t_eq = compute_renamed_type g (mkVar heq) in - let k_id,def_id = - let k_na,_,t = destProd t_eq in - let _,_,t = destProd t in - let def_na,_,_ = destProd t in - Nameops.out_name k_na,Nameops.out_name def_na - in - general_rewrite_bindings false - (mkVar heq, - ExplicitBindings - [dummy_loc, NamedHyp k_id, - f_S(mkVar pmax'); - dummy_loc, NamedHyp def_id, f]) - g - ) - [tclIDTAC; - tclTHENLIST - [apply (delayed_force le_lt_n_Sm); - compute_le_proofs le_proofs']]]) - functional termine f p heq1 new_pmax - (p'::bounds)((mkVar pmax)::le_proofs) eqs - (heq2::heq::hle2::hle1::new_pmax::p'::hex'::v'::ids) args] - - -let rec_leaf_eq termine f ids functional eqs expr fn args = - let p = next_global_ident_away true p_id ids in - let ids = p::ids in - let v = next_global_ident_away true v_id ids in - let ids = v::ids in - let hex = next_global_ident_away true hex_id ids in - let ids = hex::ids in - let heq1 = next_global_ident_away true heq_id ids in - let ids = heq1::ids in - let hle1 = next_global_ident_away true hle_id ids in - let ids = hle1::ids in - tclTHENLIST - [h_intros [v;hex]; - simplest_elim (mkVar hex); - h_intros [p;heq1]; - generalize [mkApp(delayed_force le_n,[|mkVar p|])]; - h_intros [hle1]; - introduce_all_values_eq - (fun _ _ -> tclIDTAC) - functional termine f p heq1 p [] [] eqs ids args; - apply (delayed_force refl_equal)] - -let rec prove_eq (termine:constr) (f:constr)(functional:global_reference) - (eqs:constr list) - (expr:constr) = - tclTRY - (match kind_of_term expr with - Case(_,t,a,l) -> - (match find_call_occs f a with - _,[] -> - tclTHENS(mkCaseEq a)(* (simplest_case a) *) - (List.map - (fun expr -> observe_tac "mk_intros_and_continue" (mk_intros_and_continue true - (prove_eq termine f functional) eqs expr)) - (Array.to_list l)) - | _,_::_ -> - (match find_call_occs f expr with - _,[] -> base_leaf_eq functional eqs f - | fn,args -> - fun g -> - let ids = ids_of_named_context (pf_hyps g) in - rec_leaf_eq termine f ids - (constr_of_reference functional) - eqs expr fn args g)) - | _ -> - (match find_call_occs f expr with - _,[] -> base_leaf_eq functional eqs f - | fn,args -> - fun g -> - let ids = ids_of_named_context (pf_hyps g) in - observe_tac "rec_leaf_eq" (rec_leaf_eq - termine f ids (constr_of_reference functional) - eqs expr fn args) g));; - -let (com_eqn : identifier -> - global_reference -> global_reference -> global_reference - -> constr -> unit) = - fun eq_name functional_ref f_ref terminate_ref equation_lemma_type -> - let (evmap, env) = Command.get_current_context() in - let f_constr = (constr_of_reference f_ref) in - let equation_lemma_type = subst1 f_constr equation_lemma_type in - (start_proof eq_name (Global, Proof Lemma) - (Environ.named_context_val env) equation_lemma_type (fun _ _ -> ()); - by - (start_equation f_ref terminate_ref - (fun x -> - prove_eq - (constr_of_reference terminate_ref) - f_constr - functional_ref - [] - (instantiate_lambda - (def_of_const (constr_of_reference functional_ref)) - (f_constr::List.map mkVar x) - ) - ) - ); -(* (try Vernacentries.interp (Vernacexpr.VernacShow Vernacexpr.ShowProof) with _ -> ()); - Vernacentries.interp (Vernacexpr.VernacShow Vernacexpr.ShowScript); -*) - Options.silently defined (); - );; - - -let nf_zeta env = - Reductionops.clos_norm_flags (Closure.RedFlags.mkflags [Closure.RedFlags.fZETA]) - env - Evd.empty - - -let recursive_definition is_mes function_name rec_impls type_of_f r rec_arg_num eq - generate_induction_principle using_lemmas : unit = - let function_type = interp_constr Evd.empty (Global.env()) type_of_f in - let env = push_named (function_name,None,function_type) (Global.env()) in -(* Pp.msgnl (str "function type := " ++ Printer.pr_lconstr function_type); *) - let equation_lemma_type = interp_gen (OfType None) Evd.empty env ~impls:([],rec_impls) eq in -(* Pp.msgnl (Printer.pr_lconstr equation_lemma_type); *) - let res_vars,eq' = decompose_prod equation_lemma_type in - let env_eq' = Environ.push_rel_context (List.map (fun (x,y) -> (x,None,y)) res_vars) env in - let eq' = nf_zeta env_eq' eq' in - let res = -(* Pp.msgnl (str "res_var :=" ++ Printer.pr_lconstr_env (push_rel_context (List.map (function (x,t) -> (x,None,t)) res_vars) env) eq'); *) -(* Pp.msgnl (str "rec_arg_num := " ++ str (string_of_int rec_arg_num)); *) -(* Pp.msgnl (str "eq' := " ++ Printer.pr_lconstr_env env eq' ++ fnl () ++str (string_of_int rec_arg_num)); *) - match kind_of_term eq' with - | App(e,[|_;_;eq_fix|]) -> - mkLambda (Name function_name,function_type,subst_var function_name (compose_lam res_vars eq_fix)) - | _ -> failwith "Recursive Definition (res not eq)" - in - let pre_rec_args,function_type_before_rec_arg = decompose_prod_n (rec_arg_num - 1) function_type in - let (_, rec_arg_type, _) = destProd function_type_before_rec_arg in - let arg_types = List.rev_map snd (fst (decompose_prod_n (List.length res_vars) function_type)) in - let equation_id = add_suffix function_name "_equation" in - let functional_id = add_suffix function_name "_F" in - let term_id = add_suffix function_name "_terminate" in - let functional_ref = declare_fun functional_id (IsDefinition Definition) res in - let env_with_pre_rec_args = push_rel_context(List.map (function (x,t) -> (x,None,t)) pre_rec_args) env in - let relation = - interp_constr - Evd.empty - env_with_pre_rec_args - r - in - let tcc_lemma_name = add_suffix function_name "_tcc" in - let tcc_lemma_constr = ref None in -(* let _ = Pp.msgnl (str "relation := " ++ Printer.pr_lconstr_env env_with_pre_rec_args relation) in *) - let hook _ _ = - let term_ref = Nametab.locate (make_short_qualid term_id) in - let f_ref = declare_f function_name (IsProof Lemma) arg_types term_ref in -(* message "start second proof"; *) - let continue = ref true in - begin - try com_eqn equation_id functional_ref f_ref term_ref (subst_var function_name equation_lemma_type) - with e -> - begin - if Tacinterp.get_debug () <> Tactic_debug.DebugOff - then (Pp.msgnl (str "Cannot create equation Lemma " ++ Cerrors.explain_exn e); continue := false) - else (ignore(try Vernacentries.vernac_reset_name (Util.dummy_loc,functional_id) with _ -> ()); - anomaly "Cannot create equation Lemma") - end - end; - if !continue - then - let eq_ref = Nametab.locate (make_short_qualid equation_id ) in - let f_ref = destConst (constr_of_reference f_ref) - and functional_ref = destConst (constr_of_reference functional_ref) - and eq_ref = destConst (constr_of_reference eq_ref) in - generate_induction_principle f_ref tcc_lemma_constr - functional_ref eq_ref rec_arg_num rec_arg_type (nb_prod res) relation; - if Options.is_verbose () - then msgnl (h 1 (Ppconstr.pr_id function_name ++ - spc () ++ str"is defined" )++ fnl () ++ - h 1 (Ppconstr.pr_id equation_id ++ - spc () ++ str"is defined" ) - ) - in - try - com_terminate - tcc_lemma_name - tcc_lemma_constr - is_mes functional_ref - rec_arg_type - relation rec_arg_num - term_id - using_lemmas - hook - with e -> - begin - ignore(try Vernacentries.vernac_reset_name (Util.dummy_loc,functional_id) with _ -> ()); -(* anomaly "Cannot create termination Lemma" *) - raise e - end - - -VERNAC COMMAND EXTEND RecursiveDefinition - [ "Recursive" "Definition" ident(f) constr(type_of_f) constr(r) constr(wf) - constr(proof) integer_opt(rec_arg_num) constr(eq) ] -> - [ - warning "Recursive Definition is obsolete. Use Function instead"; - ignore(proof);ignore(wf); - let rec_arg_num = - match rec_arg_num with - | None -> 1 - | Some n -> n - in - recursive_definition false f [] type_of_f r rec_arg_num eq (fun _ _ _ _ _ _ _ _ -> ()) []] -| [ "Recursive" "Definition" ident(f) constr(type_of_f) constr(r) constr(wf) - "[" ne_constr_list(proof) "]" constr(eq) ] -> - [ ignore(proof);ignore(wf);recursive_definition false f [] type_of_f r 1 eq (fun _ _ _ _ _ _ _ _ -> ()) []] -END - - - diff --git a/contrib/ring/LegacyRing.v b/contrib/ring/LegacyRing.v index dc8635bd..40323b3d 100644 --- a/contrib/ring/LegacyRing.v +++ b/contrib/ring/LegacyRing.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: Ring.v 5920 2004-07-16 20:01:26Z herbelin $ *) +(* $Id: LegacyRing.v 10739 2008-04-01 14:45:20Z herbelin $ *) Require Export Bool. Require Export LegacyRing_theory. diff --git a/contrib/ring/LegacyRing_theory.v b/contrib/ring/LegacyRing_theory.v index 5df927a6..d15d18a6 100644 --- a/contrib/ring/LegacyRing_theory.v +++ b/contrib/ring/LegacyRing_theory.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: LegacyRing_theory.v 9179 2006-09-26 12:13:06Z barras $ *) +(* $Id: LegacyRing_theory.v 9370 2006-11-13 09:21:31Z herbelin $ *) Require Export Bool. @@ -153,7 +153,7 @@ Notation "- x" := (Aopp x). Record Ring_Theory : Prop := {Th_plus_comm : forall n m:A, n + m = m + n; Th_plus_assoc : forall n m p:A, n + (m + p) = n + m + p; - Th_mult_sym : forall n m:A, n * m = m * n; + Th_mult_comm : forall n m:A, n * m = m * n; Th_mult_assoc : forall n m p:A, n * (m * p) = n * m * p; Th_plus_zero_left : forall n:A, 0 + n = n; Th_mult_one_left : forall n:A, 1 * n = n; @@ -165,7 +165,7 @@ Variable T : Ring_Theory. Let plus_comm := Th_plus_comm T. Let plus_assoc := Th_plus_assoc T. -Let mult_comm := Th_mult_sym T. +Let mult_comm := Th_mult_comm T. Let mult_assoc := Th_mult_assoc T. Let plus_zero_left := Th_plus_zero_left T. Let mult_one_left := Th_mult_one_left T. diff --git a/contrib/ring/Ring_abstract.v b/contrib/ring/Ring_abstract.v index 115ed5ca..c2467ebf 100644 --- a/contrib/ring/Ring_abstract.v +++ b/contrib/ring/Ring_abstract.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: Ring_abstract.v 9179 2006-09-26 12:13:06Z barras $ *) +(* $Id: Ring_abstract.v 9370 2006-11-13 09:21:31Z herbelin $ *) Require Import LegacyRing_theory. Require Import Quote. @@ -428,7 +428,7 @@ Fixpoint interp_ap (p:apolynomial) : A := Hint Resolve (Th_plus_comm T). Hint Resolve (Th_plus_assoc T). Hint Resolve (Th_plus_assoc2 T). -Hint Resolve (Th_mult_sym T). +Hint Resolve (Th_mult_comm T). Hint Resolve (Th_mult_assoc T). Hint Resolve (Th_mult_assoc2 T). Hint Resolve (Th_plus_zero_left T). diff --git a/contrib/ring/Ring_normalize.v b/contrib/ring/Ring_normalize.v index 4a082396..e8d9f1ee 100644 --- a/contrib/ring/Ring_normalize.v +++ b/contrib/ring/Ring_normalize.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: Ring_normalize.v 9179 2006-09-26 12:13:06Z barras $ *) +(* $Id: Ring_normalize.v 10913 2008-05-09 14:40:04Z herbelin $ *) Require Import LegacyRing_theory. Require Import Quote. @@ -774,7 +774,7 @@ Variable T : Ring_Theory Aplus Amult Aone Azero Aopp Aeq. Hint Resolve (Th_plus_comm T). Hint Resolve (Th_plus_assoc T). Hint Resolve (Th_plus_assoc2 T). -Hint Resolve (Th_mult_sym T). +Hint Resolve (Th_mult_comm T). Hint Resolve (Th_mult_assoc T). Hint Resolve (Th_mult_assoc2 T). Hint Resolve (Th_plus_zero_left T). @@ -897,6 +897,6 @@ End rings. Infix "+" := Pplus : ring_scope. Infix "*" := Pmult : ring_scope. Notation "- x" := (Popp x) : ring_scope. -Notation "[ x ]" := (Pvar x) (at level 1) : ring_scope. +Notation "[ x ]" := (Pvar x) (at level 0) : ring_scope. Delimit Scope ring_scope with ring. diff --git a/contrib/ring/Setoid_ring_normalize.v b/contrib/ring/Setoid_ring_normalize.v index 56329ade..8eb49a37 100644 --- a/contrib/ring/Setoid_ring_normalize.v +++ b/contrib/ring/Setoid_ring_normalize.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: Setoid_ring_normalize.v 6662 2005-02-02 21:33:14Z sacerdot $ *) +(* $Id: Setoid_ring_normalize.v 9370 2006-11-13 09:21:31Z herbelin $ *) Require Import Setoid_ring_theory. Require Import Quote. @@ -1032,7 +1032,7 @@ Variable T : Setoid_Ring_Theory Aequiv Aplus Amult Aone Azero Aopp Aeq. Hint Resolve (STh_plus_comm T). Hint Resolve (STh_plus_assoc T). Hint Resolve (STh_plus_assoc2 S T). -Hint Resolve (STh_mult_sym T). +Hint Resolve (STh_mult_comm T). Hint Resolve (STh_mult_assoc T). Hint Resolve (STh_mult_assoc2 S T). Hint Resolve (STh_plus_zero_left T). diff --git a/contrib/ring/Setoid_ring_theory.v b/contrib/ring/Setoid_ring_theory.v index ae6610d3..88abd7de 100644 --- a/contrib/ring/Setoid_ring_theory.v +++ b/contrib/ring/Setoid_ring_theory.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: Setoid_ring_theory.v 6662 2005-02-02 21:33:14Z sacerdot $ *) +(* $Id: Setoid_ring_theory.v 10631 2008-03-06 18:17:24Z msozeau $ *) Require Export Bool. Require Export Setoid. @@ -177,7 +177,7 @@ Section Theory_of_setoid_rings. Record Setoid_Ring_Theory : Prop := {STh_plus_comm : forall n m:A, n + m == m + n; STh_plus_assoc : forall n m p:A, n + (m + p) == n + m + p; - STh_mult_sym : forall n m:A, n * m == m * n; + STh_mult_comm : forall n m:A, n * m == m * n; STh_mult_assoc : forall n m p:A, n * (m * p) == n * m * p; STh_plus_zero_left : forall n:A, 0 + n == n; STh_mult_one_left : forall n:A, 1 * n == n; @@ -189,7 +189,7 @@ Variable T : Setoid_Ring_Theory. Let plus_comm := STh_plus_comm T. Let plus_assoc := STh_plus_assoc T. -Let mult_comm := STh_mult_sym T. +Let mult_comm := STh_mult_comm T. Let mult_assoc := STh_mult_assoc T. Let plus_zero_left := STh_plus_zero_left T. Let mult_one_left := STh_mult_one_left T. @@ -245,7 +245,7 @@ Lemma Saux1 : forall a:A, a + a == a -> a == 0. intros. rewrite <- (plus_zero_left a). rewrite (plus_comm 0 a). -setoid_replace (a + 0) with (a + (a + - a)); auto. +setoid_replace (a + 0) with (a + (a + - a)) by auto. rewrite (plus_assoc a a (- a)). rewrite H. apply opp_def. diff --git a/contrib/ring/quote.ml b/contrib/ring/quote.ml index e0a6cba3..7cd22a36 100644 --- a/contrib/ring/quote.ml +++ b/contrib/ring/quote.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: quote.ml 9178 2006-09-26 11:18:22Z barras $ *) +(* $Id: quote.ml 10790 2008-04-14 22:34:19Z herbelin $ *) (* The `Quote' tactic *) @@ -191,8 +191,11 @@ let decomp_term c = kind_of_term (strip_outer_cast c) ?2 ?1)}, where \texttt{C} is the [i]-th constructor of inductive type [typ] *) -let coerce_meta_out id = int_of_string (string_of_id id) -let coerce_meta_in n = id_of_string (string_of_int n) +let coerce_meta_out id = + let s = string_of_id id in + int_of_string (String.sub s 1 (String.length s - 1)) +let coerce_meta_in n = + id_of_string ("M" ^ string_of_int n) let compute_lhs typ i nargsi = match kind_of_term typ with diff --git a/contrib/ring/ring.ml b/contrib/ring/ring.ml index 6b82b75b..3d13a254 100644 --- a/contrib/ring/ring.ml +++ b/contrib/ring/ring.ml @@ -6,13 +6,13 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: ring.ml 9179 2006-09-26 12:13:06Z barras $ *) +(* $Id: ring.ml 11094 2008-06-10 19:35:23Z herbelin $ *) (* ML part of the Ring tactic *) open Pp open Util -open Options +open Flags open Term open Names open Libnames @@ -193,7 +193,7 @@ let _ = let subst_morph subst morph = let plusm' = subst_mps subst morph.plusm in let multm' = subst_mps subst morph.multm in - let oppm' = option_smartmap (subst_mps subst) morph.oppm in + let oppm' = Option.smartmap (subst_mps subst) morph.oppm in if plusm' == morph.plusm && multm' == morph.multm && oppm' == morph.oppm then @@ -215,15 +215,15 @@ let subst_set subst cset = if !same then cset else cset' let subst_theory subst th = - let th_equiv' = option_smartmap (subst_mps subst) th.th_equiv in - let th_setoid_th' = option_smartmap (subst_mps subst) th.th_setoid_th in - let th_morph' = option_smartmap (subst_morph subst) th.th_morph in + let th_equiv' = Option.smartmap (subst_mps subst) th.th_equiv in + let th_setoid_th' = Option.smartmap (subst_mps subst) th.th_setoid_th in + let th_morph' = Option.smartmap (subst_morph subst) th.th_morph in let th_a' = subst_mps subst th.th_a in let th_plus' = subst_mps subst th.th_plus in let th_mult' = subst_mps subst th.th_mult in let th_one' = subst_mps subst th.th_one in let th_zero' = subst_mps subst th.th_zero in - let th_opp' = option_smartmap (subst_mps subst) th.th_opp in + let th_opp' = Option.smartmap (subst_mps subst) th.th_opp in let th_eq' = subst_mps subst th.th_eq in let th_t' = subst_mps subst th.th_t in let th_closed' = subst_set subst th.th_closed in @@ -826,9 +826,11 @@ let raw_polynom th op lc gl = c'''i; ci; c'i_eq_c''i |])))) (tclTHENS (tclORELSE - (Setoid_replace.general_s_rewrite true c'i_eq_c''i + (Setoid_replace.general_s_rewrite true + Termops.all_occurrences c'i_eq_c''i ~new_goals:[]) - (Setoid_replace.general_s_rewrite false c'i_eq_c''i + (Setoid_replace.general_s_rewrite false + Termops.all_occurrences c'i_eq_c''i ~new_goals:[])) [tac])) else diff --git a/contrib/romega/ROmega.v b/contrib/romega/ROmega.v index 19933873..68bc43bb 100644 --- a/contrib/romega/ROmega.v +++ b/contrib/romega/ROmega.v @@ -1,10 +1,11 @@ (************************************************************************* PROJET RNRT Calife - 2001 - Author: Pierre Crégut - France Télécom R&D + Author: Pierre Crégut - France Télécom R&D Licence : LGPL version 2.1 *************************************************************************) Require Import ReflOmegaCore. - +Require Export Setoid. +Require Export PreOmega. diff --git a/contrib/romega/ReflOmegaCore.v b/contrib/romega/ReflOmegaCore.v index d20cafc1..9d379548 100644 --- a/contrib/romega/ReflOmegaCore.v +++ b/contrib/romega/ReflOmegaCore.v @@ -7,32 +7,852 @@ *************************************************************************) -Require Import Arith. -Require Import List. -Require Import Bool. -Require Import ZArith_base. -Require Import OmegaLemmas. - -Open Scope Z_scope. - -(* \subsection{Definition of basic types} *) - -(* \subsubsection{Environment of propositions (lists) *) -Inductive PropList : Type := - | Pnil : PropList - | Pcons : Prop -> PropList -> PropList. - -(* Access function for the environment with a default *) -Fixpoint nthProp (n : nat) (l : PropList) (default : Prop) {struct l} : - Prop := - match n, l with - | O, Pcons x l' => x - | O, other => default - | S m, Pnil => default - | S m, Pcons x t => nthProp m t default - end. +Require Import List Bool Sumbool EqNat Setoid Ring_theory Decidable. +Delimit Scope Int_scope with I. + +(* Abstract Integers. *) + +Module Type Int. + + Parameter int : Set. + + Parameter zero : int. + Parameter one : int. + Parameter plus : int -> int -> int. + Parameter opp : int -> int. + Parameter minus : int -> int -> int. + Parameter mult : int -> int -> int. + + Notation "0" := zero : Int_scope. + Notation "1" := one : Int_scope. + Infix "+" := plus : Int_scope. + Infix "-" := minus : Int_scope. + Infix "*" := mult : Int_scope. + Notation "- x" := (opp x) : Int_scope. + + Open Scope Int_scope. + + (* First, int is a ring: *) + Axiom ring : @ring_theory int 0 1 plus mult minus opp (@eq int). + + (* int should also be ordered: *) + + Parameter le : int -> int -> Prop. + Parameter lt : int -> int -> Prop. + Parameter ge : int -> int -> Prop. + Parameter gt : int -> int -> Prop. + Notation "x <= y" := (le x y): Int_scope. + Notation "x < y" := (lt x y) : Int_scope. + Notation "x >= y" := (ge x y) : Int_scope. + Notation "x > y" := (gt x y): Int_scope. + Axiom le_lt_iff : forall i j, (i<=j) <-> ~(j=j) <-> (j<=i). + Axiom gt_lt_iff : forall i j, (i>j) <-> (j j i i<>j. + + (* Compatibilities *) + Axiom lt_0_1 : 0<1. + Axiom plus_le_compat : forall i j k l, i<=j -> k<=l -> i+k<=j+l. + Axiom opp_le_compat : forall i j, i<=j -> (-j)<=(-i). + Axiom mult_lt_compat_l : + forall i j k, 0 < k -> i < j -> k*i int -> comparison. + Infix "?=" := compare (at level 70, no associativity) : Int_scope. + Axiom compare_Eq : forall i j, compare i j = Eq <-> i=j. + Axiom compare_Lt : forall i j, compare i j = Lt <-> i i>j. + + (* Up to here, these requirements could be fulfilled + by any totally ordered ring. Let's now be int-specific: *) + Axiom le_lt_int : forall x y, x x<=y+-(1). + + (* Btw, lt_0_1 could be deduced from this last axiom *) + +End Int. + + + +(* Of course, Z is a model for our abstract int *) + +Module Z_as_Int <: Int. + + Require Import ZArith_base. + Open Scope Z_scope. + + Definition int := Z. + Definition zero := 0. + Definition one := 1. + Definition plus := Zplus. + Definition opp := Zopp. + Definition minus := Zminus. + Definition mult := Zmult. + + Lemma ring : @ring_theory int zero one plus mult minus opp (@eq int). + Proof. + constructor. + exact Zplus_0_l. + exact Zplus_comm. + exact Zplus_assoc. + exact Zmult_1_l. + exact Zmult_comm. + exact Zmult_assoc. + exact Zmult_plus_distr_l. + unfold minus, Zminus; auto. + exact Zplus_opp_r. + Qed. + + Definition le := Zle. + Definition lt := Zlt. + Definition ge := Zge. + Definition gt := Zgt. + Lemma le_lt_iff : forall i j, (i<=j) <-> ~(j (-j)<=(-i). + Proof. + unfold Zle; intros; rewrite <- Zcompare_opp; auto. + Qed. + + Definition compare := Zcompare. + Definition compare_Eq := Zcompare_Eq_iff_eq. + Lemma compare_Lt : forall i j, compare i j = Lt <-> i i>j. + Proof. intros; unfold compare, Zgt; intuition. Qed. + + Lemma le_lt_int : forall x y, x x<=y+-(1). + Proof. + intros; split; intros. + generalize (Zlt_left _ _ H); simpl; intros. + apply Zle_left_rev; auto. + apply Zlt_0_minus_lt. + generalize (Zplus_le_lt_compat x (y+-1) (-x) (-x+1) H). + rewrite Zplus_opp_r. + rewrite <-Zplus_assoc. + rewrite (Zplus_permute (-1)). + simpl in *. + rewrite Zplus_0_r. + intro H'; apply H'. + replace (-x+1) with (Zsucc (-x)); auto. + apply Zlt_succ. + Qed. + +End Z_as_Int. + + + + +Module IntProperties (I:Int). + Import I. + + (* Primo, some consequences of being a ring theory... *) + + Definition two := 1+1. + Notation "2" := two : Int_scope. + + (* Aliases for properties packed in the ring record. *) + + Definition plus_assoc := ring.(Radd_assoc). + Definition plus_comm := ring.(Radd_comm). + Definition plus_0_l := ring.(Radd_0_l). + Definition mult_assoc := ring.(Rmul_assoc). + Definition mult_comm := ring.(Rmul_comm). + Definition mult_1_l := ring.(Rmul_1_l). + Definition mult_plus_distr_r := ring.(Rdistr_l). + Definition opp_def := ring.(Ropp_def). + Definition minus_def := ring.(Rsub_def). + + Opaque plus_assoc plus_comm plus_0_l mult_assoc mult_comm mult_1_l + mult_plus_distr_r opp_def minus_def. + + (* More facts about plus *) + + Lemma plus_0_r : forall x, x+0 = x. + Proof. intros; rewrite plus_comm; apply plus_0_l. Qed. + + Lemma plus_0_r_reverse : forall x, x = x+0. + Proof. intros; symmetry; apply plus_0_r. Qed. + + Lemma plus_assoc_reverse : forall x y z, x+y+z = x+(y+z). + Proof. intros; symmetry; apply plus_assoc. Qed. + + Lemma plus_permute : forall x y z, x+(y+z) = y+(x+z). + Proof. intros; do 2 rewrite plus_assoc; f_equal; apply plus_comm. Qed. + + Lemma plus_reg_l : forall x y z, x+y = x+z -> y = z. + Proof. + intros. + rewrite (plus_0_r_reverse y), (plus_0_r_reverse z), <-(opp_def x). + now rewrite plus_permute, plus_assoc, H, <- plus_assoc, plus_permute. + Qed. + + (* More facts about mult *) + + Lemma mult_assoc_reverse : forall x y z, x*y*z = x*(y*z). + Proof. intros; symmetry; apply mult_assoc. Qed. + + Lemma mult_plus_distr_l : forall x y z, x*(y+z)=x*y+x*z. + Proof. + intros. + rewrite (mult_comm x (y+z)), (mult_comm x y), (mult_comm x z). + apply mult_plus_distr_r. + Qed. + + Lemma mult_0_l : forall x, 0*x = 0. + Proof. + intros. + generalize (mult_plus_distr_r 0 1 x). + rewrite plus_0_l, mult_1_l, plus_comm; intros. + apply plus_reg_l with x. + rewrite <- H. + apply plus_0_r_reverse. + Qed. + + + (* More facts about opp *) + + Definition plus_opp_r := opp_def. + + Lemma plus_opp_l : forall x, -x + x = 0. + Proof. intros; now rewrite plus_comm, opp_def. Qed. + + Lemma mult_opp_comm : forall x y, - x * y = x * - y. + Proof. + intros. + apply plus_reg_l with (x*y). + rewrite <- mult_plus_distr_l, <- mult_plus_distr_r. + now rewrite opp_def, opp_def, mult_0_l, mult_comm, mult_0_l. + Qed. + + Lemma opp_eq_mult_neg_1 : forall x, -x = x * -(1). + Proof. + intros; now rewrite mult_comm, mult_opp_comm, mult_1_l. + Qed. + + Lemma opp_involutive : forall x, -(-x) = x. + Proof. + intros. + apply plus_reg_l with (-x). + now rewrite opp_def, plus_comm, opp_def. + Qed. + + Lemma opp_plus_distr : forall x y, -(x+y) = -x + -y. + Proof. + intros. + apply plus_reg_l with (x+y). + rewrite opp_def. + rewrite plus_permute. + do 2 rewrite plus_assoc. + now rewrite (plus_comm (-x)), opp_def, plus_0_l, opp_def. + Qed. + + Lemma opp_mult_distr_r : forall x y, -(x*y) = x * -y. + Proof. + intros. + rewrite <- mult_opp_comm. + apply plus_reg_l with (x*y). + now rewrite opp_def, <-mult_plus_distr_r, opp_def, mult_0_l. + Qed. + + Lemma egal_left : forall n m, n=m -> n+-m = 0. + Proof. intros; subst; apply opp_def. Qed. + + Lemma ne_left_2 : forall x y : int, x<>y -> 0<>(x + - y). + Proof. + intros; contradict H. + apply (plus_reg_l (-y)). + now rewrite plus_opp_l, plus_comm, H. + Qed. + + (* Special lemmas for factorisation. *) + + Lemma red_factor0 : forall n, n = n*1. + Proof. symmetry; rewrite mult_comm; apply mult_1_l. Qed. + + Lemma red_factor1 : forall n, n+n = n*2. + Proof. + intros; unfold two. + now rewrite mult_comm, mult_plus_distr_r, mult_1_l. + Qed. + + Lemma red_factor2 : forall n m, n + n*m = n * (1+m). + Proof. + intros; rewrite mult_plus_distr_l. + f_equal; now rewrite mult_comm, mult_1_l. + Qed. + + Lemma red_factor3 : forall n m, n*m + n = n*(1+m). + Proof. intros; now rewrite plus_comm, red_factor2. Qed. + + Lemma red_factor4 : forall n m p, n*m + n*p = n*(m+p). + Proof. + intros; now rewrite mult_plus_distr_l. + Qed. + + Lemma red_factor5 : forall n m , n * 0 + m = m. + Proof. intros; now rewrite mult_comm, mult_0_l, plus_0_l. Qed. + + Definition red_factor6 := plus_0_r_reverse. + + + (* Specialized distributivities *) + + Hint Rewrite mult_plus_distr_l mult_plus_distr_r mult_assoc : int. + Hint Rewrite <- plus_assoc : int. + + Lemma OMEGA10 : + forall v c1 c2 l1 l2 k1 k2 : int, + (v * c1 + l1) * k1 + (v * c2 + l2) * k2 = + v * (c1 * k1 + c2 * k2) + (l1 * k1 + l2 * k2). + Proof. + intros; autorewrite with int; f_equal; now rewrite plus_permute. + Qed. + + Lemma OMEGA11 : + forall v1 c1 l1 l2 k1 : int, + (v1 * c1 + l1) * k1 + l2 = v1 * (c1 * k1) + (l1 * k1 + l2). + Proof. + intros; now autorewrite with int. + Qed. + + Lemma OMEGA12 : + forall v2 c2 l1 l2 k2 : int, + l1 + (v2 * c2 + l2) * k2 = v2 * (c2 * k2) + (l1 + l2 * k2). + Proof. + intros; autorewrite with int; now rewrite plus_permute. + Qed. + + Lemma OMEGA13 : + forall v l1 l2 x : int, + v * -x + l1 + (v * x + l2) = l1 + l2. + Proof. + intros; autorewrite with int. + rewrite plus_permute; f_equal. + rewrite plus_assoc. + now rewrite <- mult_plus_distr_l, plus_opp_l, mult_comm, mult_0_l, plus_0_l. + Qed. + + Lemma OMEGA15 : + forall v c1 c2 l1 l2 k2 : int, + v * c1 + l1 + (v * c2 + l2) * k2 = v * (c1 + c2 * k2) + (l1 + l2 * k2). + Proof. + intros; autorewrite with int; f_equal; now rewrite plus_permute. + Qed. + + Lemma OMEGA16 : forall v c l k : int, (v * c + l) * k = v * (c * k) + l * k. + Proof. + intros; now autorewrite with int. + Qed. + + Lemma sum1 : forall a b c d : int, 0 = a -> 0 = b -> 0 = a * c + b * d. + Proof. + intros; elim H; elim H0; simpl in |- *; auto. + now rewrite mult_0_l, mult_0_l, plus_0_l. + Qed. + + + (* Secondo, some results about order (and equality) *) + + Lemma lt_irrefl : forall n, ~ n m False. + Proof. + intros; elim (lt_irrefl _ (lt_trans _ _ _ H H0)); auto. + Qed. + + Lemma lt_le_weak : forall n m, n n<=m. + Proof. + intros; rewrite le_lt_iff; intro H'; eapply lt_antisym; eauto. + Qed. + + Lemma le_refl : forall n, n<=n. + Proof. + intros; rewrite le_lt_iff; apply lt_irrefl; auto. + Qed. + + Lemma le_antisym : forall n m, n<=m -> m<=n -> n=m. + Proof. + intros n m; do 2 rewrite le_lt_iff; intros. + rewrite <- compare_Lt in H0. + rewrite <- gt_lt_iff, <- compare_Gt in H. + rewrite <- compare_Eq. + destruct compare; intuition. + Qed. + + Lemma lt_eq_lt_dec : forall n m, { n ~(m<=n). + Proof. + intros. + rewrite le_lt_iff. + destruct (lt_dec n m); intuition. + Qed. + + Lemma le_dec : forall n m: int, { n<=m } + { ~n<=m }. + Proof. + intros; destruct (lt_dec m n); [right|left]; rewrite le_lt_iff; intuition. + Qed. + + Lemma le_lt_dec : forall n m, { n<=m } + { m true | _ => false end. + + Lemma beq_iff : forall i j, beq i j = true <-> i=j. + Proof. + intros; unfold beq; generalize (compare_Eq i j). + destruct compare; intuition discriminate. + Qed. + + Lemma beq_true : forall i j, beq i j = true -> i=j. + Proof. + intros. + rewrite <- beq_iff; auto. + Qed. + + Lemma beq_false : forall i j, beq i j = false -> i<>j. + Proof. + intros. + intro H'. + rewrite <- beq_iff in H'; rewrite H' in H; discriminate. + Qed. + + Lemma eq_dec : forall n m:int, { n=m } + { n<>m }. + Proof. + intros; generalize (beq_iff n m); destruct beq; [left|right]; intuition. + Qed. + + Definition bgt i j := match compare i j with Gt => true | _ => false end. + + Lemma bgt_iff : forall i j, bgt i j = true <-> i>j. + Proof. + intros; unfold bgt; generalize (compare_Gt i j). + destruct compare; intuition discriminate. + Qed. + + Lemma bgt_true : forall i j, bgt i j = true -> i>j. + Proof. intros; now rewrite <- bgt_iff. Qed. + + Lemma bgt_false : forall i j, bgt i j = false -> i<=j. + Proof. + intros. + rewrite le_lt_iff, <-gt_lt_iff, <-bgt_iff; intro H'; now rewrite H' in H. + Qed. + + Lemma le_is_lt_or_eq : forall n m, n<=m -> { n n<>m -> n m<=p -> n<=p. + Proof. + intros n m p; do 3 rewrite le_lt_iff; intros A B C. + destruct (lt_eq_lt_dec p m) as [[H|H]|H]; subst; auto. + generalize (lt_trans _ _ _ H C); intuition. + Qed. + + (* order and operations *) + + Lemma le_0_neg : forall n, 0 <= n <-> -n <= 0. + Proof. + intros. + pattern 0 at 2; rewrite <- (mult_0_l (-(1))). + rewrite <- opp_eq_mult_neg_1. + split; intros. + apply opp_le_compat; auto. + rewrite <-(opp_involutive 0), <-(opp_involutive n). + apply opp_le_compat; auto. + Qed. + + Lemma le_0_neg' : forall n, n <= 0 <-> 0 <= -n. + Proof. + intros; rewrite le_0_neg, opp_involutive; intuition. + Qed. + + Lemma plus_le_reg_r : forall n m p, n + p <= m + p -> n <= m. + Proof. + intros. + replace n with ((n+p)+-p). + replace m with ((m+p)+-p). + apply plus_le_compat; auto. + apply le_refl. + now rewrite <- plus_assoc, opp_def, plus_0_r. + now rewrite <- plus_assoc, opp_def, plus_0_r. + Qed. + + Lemma plus_le_lt_compat : forall n m p q, n<=m -> p n+p p n+p -m < -n. + Proof. + intros n m; do 2 rewrite lt_le_iff; intros H; contradict H. + rewrite <-(opp_involutive m), <-(opp_involutive n). + apply opp_le_compat; auto. + Qed. + + Lemma lt_0_neg : forall n, 0 < n <-> -n < 0. + Proof. + intros. + pattern 0 at 2; rewrite <- (mult_0_l (-(1))). + rewrite <- opp_eq_mult_neg_1. + split; intros. + apply opp_lt_compat; auto. + rewrite <-(opp_involutive 0), <-(opp_involutive n). + apply opp_lt_compat; auto. + Qed. + + Lemma lt_0_neg' : forall n, n < 0 <-> 0 < -n. + Proof. + intros; rewrite lt_0_neg, opp_involutive; intuition. + Qed. + + Lemma mult_lt_0_compat : forall n m, 0 < n -> 0 < m -> 0 < n*m. + Proof. + intros. + rewrite <- (mult_0_l n), mult_comm. + apply mult_lt_compat_l; auto. + Qed. + + Lemma mult_integral : forall n m, n * m = 0 -> n = 0 \/ m = 0. + Proof. + intros. + destruct (lt_eq_lt_dec n 0) as [[Hn|Hn]|Hn]; auto; + destruct (lt_eq_lt_dec m 0) as [[Hm|Hm]|Hm]; auto; elimtype False. + + rewrite lt_0_neg' in Hn. + rewrite lt_0_neg' in Hm. + generalize (mult_lt_0_compat _ _ Hn Hm). + rewrite <- opp_mult_distr_r, mult_comm, <- opp_mult_distr_r, opp_involutive. + rewrite mult_comm, H. + exact (lt_irrefl 0). + + rewrite lt_0_neg' in Hn. + generalize (mult_lt_0_compat _ _ Hn Hm). + rewrite mult_comm, <- opp_mult_distr_r, mult_comm. + rewrite H. + rewrite opp_eq_mult_neg_1, mult_0_l. + exact (lt_irrefl 0). + + rewrite lt_0_neg' in Hm. + generalize (mult_lt_0_compat _ _ Hn Hm). + rewrite <- opp_mult_distr_r. + rewrite H. + rewrite opp_eq_mult_neg_1, mult_0_l. + exact (lt_irrefl 0). + + generalize (mult_lt_0_compat _ _ Hn Hm). + rewrite H. + exact (lt_irrefl 0). + Qed. + + Lemma mult_le_compat : + forall i j k l, i<=j -> k<=l -> 0<=i -> 0<=k -> i*k<=j*l. + Proof. + intros. + destruct (le_is_lt_or_eq _ _ H1). + + apply le_trans with (i*l). + destruct (le_is_lt_or_eq _ _ H0); [ | subst; apply le_refl]. + apply lt_le_weak. + apply mult_lt_compat_l; auto. + + generalize (le_trans _ _ _ H2 H0); clear H0 H1 H2; intros. + rewrite (mult_comm i), (mult_comm j). + destruct (le_is_lt_or_eq _ _ H0); + [ | subst; do 2 rewrite mult_0_l; apply le_refl]. + destruct (le_is_lt_or_eq _ _ H); + [ | subst; apply le_refl]. + apply lt_le_weak. + apply mult_lt_compat_l; auto. + + subst i. + rewrite mult_0_l. + generalize (le_trans _ _ _ H2 H0); clear H0 H1 H2; intros. + destruct (le_is_lt_or_eq _ _ H); + [ | subst; rewrite mult_0_l; apply le_refl]. + destruct (le_is_lt_or_eq _ _ H0); + [ | subst; rewrite mult_comm, mult_0_l; apply le_refl]. + apply lt_le_weak. + apply mult_lt_0_compat; auto. + Qed. + + Lemma sum5 : + forall a b c d : int, c <> 0 -> 0 <> a -> 0 = b -> 0 <> a * c + b * d. + Proof. + intros. + subst b; rewrite mult_0_l, plus_0_r. + contradict H. + symmetry in H; destruct (mult_integral _ _ H); congruence. + Qed. + + Lemma one_neq_zero : 1 <> 0. + Proof. + red; intro. + symmetry in H. + apply (lt_not_eq 0 1); auto. + apply lt_0_1. + Qed. + + Lemma minus_one_neq_zero : -(1) <> 0. + Proof. + apply lt_not_eq. + rewrite <- lt_0_neg. + apply lt_0_1. + Qed. + + Lemma le_left : forall n m, n <= m -> 0 <= m + - n. + Proof. + intros. + rewrite <- (opp_def m). + apply plus_le_compat. + apply le_refl. + apply opp_le_compat; auto. + Qed. + + Lemma OMEGA2 : forall x y, 0 <= x -> 0 <= y -> 0 <= x + y. + Proof. + intros. + replace 0 with (0+0). + apply plus_le_compat; auto. + rewrite plus_0_l; auto. + Qed. + + Lemma OMEGA8 : forall x y, 0 <= x -> 0 <= y -> x = - y -> x = 0. + Proof. + intros. + assert (y=-x). + subst x; symmetry; apply opp_involutive. + clear H1; subst y. + destruct (eq_dec 0 x) as [H'|H']; auto. + assert (H'':=le_neq_lt _ _ H H'). + generalize (plus_le_lt_compat _ _ _ _ H0 H''). + rewrite plus_opp_l, plus_0_l. + intros. + elim (lt_not_eq _ _ H1); auto. + Qed. + + Lemma sum2 : + forall a b c d : int, 0 <= d -> 0 = a -> 0 <= b -> 0 <= a * c + b * d. + Proof. + intros. + subst a; rewrite mult_0_l, plus_0_l. + rewrite <- (mult_0_l 0). + apply mult_le_compat; auto; apply le_refl. + Qed. + + Lemma sum3 : + forall a b c d : int, + 0 <= c -> 0 <= d -> 0 <= a -> 0 <= b -> 0 <= a * c + b * d. + Proof. + intros. + rewrite <- (plus_0_l 0). + apply plus_le_compat; auto. + rewrite <- (mult_0_l 0). + apply mult_le_compat; auto; apply le_refl. + rewrite <- (mult_0_l 0). + apply mult_le_compat; auto; apply le_refl. + Qed. + + Lemma sum4 : forall k : int, k>0 -> 0 <= k. + Proof. + intros k; rewrite gt_lt_iff; apply lt_le_weak. + Qed. + + (* Lemmas specific to integers (they use lt_le_int) *) + + Lemma lt_left : forall n m, n < m -> 0 <= m + -(1) + - n. + Proof. + intros; apply le_left. + now rewrite <- le_lt_int. + Qed. + + Lemma lt_left_inv : forall x y, 0 <= y + -(1) + - x -> x < y. + Proof. + intros. + generalize (plus_le_compat _ _ _ _ H (le_refl x)); clear H. + now rewrite plus_0_l, <-plus_assoc, plus_opp_l, plus_0_r, le_lt_int. + Qed. + + Lemma OMEGA4 : forall x y z, x > 0 -> y > x -> z * y + x <> 0. + Proof. + intros. + intro H'. + rewrite gt_lt_iff in H,H0. + destruct (lt_eq_lt_dec z 0) as [[G|G]|G]. + + rewrite lt_0_neg' in G. + generalize (plus_le_lt_compat _ _ _ _ (le_refl (z*y)) H0). + rewrite H'. + pattern y at 2; rewrite <-(mult_1_l y), <-mult_plus_distr_r. + intros. + rewrite le_lt_int in G. + rewrite <- opp_plus_distr in G. + assert (0 < y) by (apply lt_trans with x; auto). + generalize (mult_le_compat _ _ _ _ G (lt_le_weak _ _ H2) (le_refl 0) (le_refl 0)). + rewrite mult_0_l, mult_comm, <- opp_mult_distr_r, mult_comm, <-le_0_neg', le_lt_iff. + intuition. + + subst; rewrite mult_0_l, plus_0_l in H'; subst. + apply (lt_not_eq _ _ H); auto. + + apply (lt_not_eq 0 (z*y+x)); auto. + rewrite <- (plus_0_l 0). + apply plus_lt_compat; auto. + apply mult_lt_0_compat; auto. + apply lt_trans with x; auto. + Qed. + + Lemma OMEGA19 : forall x, x<>0 -> 0 <= x + -(1) \/ 0 <= x * -(1) + -(1). + Proof. + intros. + do 2 rewrite <- le_lt_int. + rewrite <- opp_eq_mult_neg_1. + destruct (lt_eq_lt_dec 0 x) as [[H'|H']|H']. + auto. + congruence. + right. + rewrite <-(mult_0_l (-(1))), <-(opp_eq_mult_neg_1 0). + apply opp_lt_compat; auto. + Qed. + + Lemma mult_le_approx : + forall n m p, n > 0 -> n > p -> 0 <= m * n + p -> 0 <= m. + Proof. + intros n m p. + do 2 rewrite gt_lt_iff. + do 2 rewrite le_lt_iff; intros. + contradict H1. + rewrite lt_0_neg' in H1. + rewrite lt_0_neg'. + rewrite opp_plus_distr. + rewrite mult_comm, opp_mult_distr_r. + rewrite le_lt_int. + rewrite <- plus_assoc, (plus_comm (-p)), plus_assoc. + apply lt_left. + rewrite le_lt_int. + rewrite le_lt_int in H0. + apply le_trans with (n+-(1)); auto. + apply plus_le_compat; [ | apply le_refl ]. + rewrite le_lt_int in H1. + generalize (mult_le_compat _ _ _ _ (lt_le_weak _ _ H) H1 (le_refl 0) (le_refl 0)). + rewrite mult_0_l. + rewrite mult_plus_distr_l. + rewrite <- opp_eq_mult_neg_1. + intros. + generalize (plus_le_compat _ _ _ _ (le_refl n) H2). + now rewrite plus_permute, opp_def, plus_0_r, plus_0_r. + Qed. + + (* Some decidabilities *) + + Lemma dec_eq : forall i j:int, decidable (i=j). + Proof. + red; intros; destruct (eq_dec i j); auto. + Qed. + + Lemma dec_ne : forall i j:int, decidable (i<>j). + Proof. + red; intros; destruct (eq_dec i j); auto. + Qed. + + Lemma dec_le : forall i j:int, decidable (i<=j). + Proof. + red; intros; destruct (le_dec i j); auto. + Qed. + + Lemma dec_lt : forall i j:int, decidable (i=j). + Proof. + red; intros; rewrite ge_le_iff; destruct (le_dec j i); auto. + Qed. + + Lemma dec_gt : forall i j:int, decidable (i>j). + Proof. + red; intros; rewrite gt_lt_iff; destruct (lt_dec j i); auto. + Qed. + +End IntProperties. + + + + +Module IntOmega (I:Int). +Import I. +Module IP:=IntProperties(I). +Import IP. -(* \subsubsection{Définition of reified integer expressions} +(* \subsubsection{Definition of reified integer expressions} Terms are either: \begin{itemize} \item integers [Tint] @@ -41,7 +861,7 @@ Fixpoint nthProp (n : nat) (l : PropList) (default : Prop) {struct l} : The last two are translated in additions and products. *) Inductive term : Set := - | Tint : Z -> term + | Tint : int -> term | Tplus : term -> term -> term | Tmult : term -> term -> term | Tminus : term -> term -> term @@ -49,6 +869,7 @@ Inductive term : Set := | Tvar : nat -> term. Delimit Scope romega_scope with term. +Arguments Scope Tint [Int_scope]. Arguments Scope Tplus [romega_scope romega_scope]. Arguments Scope Tmult [romega_scope romega_scope]. Arguments Scope Tminus [romega_scope romega_scope]. @@ -58,20 +879,21 @@ Infix "+" := Tplus : romega_scope. Infix "*" := Tmult : romega_scope. Infix "-" := Tminus : romega_scope. Notation "- x" := (Topp x) : romega_scope. -Notation "[ x ]" := (Tvar x) (at level 1) : romega_scope. +Notation "[ x ]" := (Tvar x) (at level 0) : romega_scope. (* \subsubsection{Definition of reified goals} *) + (* Very restricted definition of handled predicates that should be extended to cover a wider set of operations. Taking care of negations and disequations require solving more than a goal in parallel. This is a major improvement over previous versions. *) Inductive proposition : Set := - | EqTerm : term -> term -> proposition (* egalité entre termes *) - | LeqTerm : term -> term -> proposition (* plus petit ou egal *) - | TrueTerm : proposition (* vrai *) - | FalseTerm : proposition (* faux *) - | Tnot : proposition -> proposition (* négation *) + | EqTerm : term -> term -> proposition (* equality between terms *) + | LeqTerm : term -> term -> proposition (* less or equal on terms *) + | TrueTerm : proposition (* true *) + | FalseTerm : proposition (* false *) + | Tnot : proposition -> proposition (* negation *) | GeqTerm : term -> term -> proposition | GtTerm : term -> term -> proposition | LtTerm : term -> term -> proposition @@ -87,7 +909,7 @@ Notation hyps := (list proposition). (* Definition of lists of subgoals (set of open goals) *) Notation lhyps := (list hyps). -(* a syngle goal packed in a subgoal list *) +(* a single goal packed in a subgoal list *) Notation singleton := (fun a : hyps => a :: nil). (* an absurd goal *) @@ -110,24 +932,22 @@ Inductive t_fusion : Set := (* \subsubsection{Rewriting steps to normalize terms} *) Inductive step : Set := - (* apply the rewriting steps to both subterms of an operation *) - | C_DO_BOTH : - step -> step -> step - (* apply the rewriting step to the first branch *) + (* apply the rewriting steps to both subterms of an operation *) + | C_DO_BOTH : step -> step -> step + (* apply the rewriting step to the first branch *) | C_LEFT : step -> step - (* apply the rewriting step to the second branch *) + (* apply the rewriting step to the second branch *) | C_RIGHT : step -> step - (* apply two steps consecutively to a term *) - | C_SEQ : step -> step -> step - (* empty step *) - | C_NOP : step - (* the following operations correspond to actual rewriting *) + (* apply two steps consecutively to a term *) + | C_SEQ : step -> step -> step + (* empty step *) + | C_NOP : step + (* the following operations correspond to actual rewriting *) | C_OPP_PLUS : step | C_OPP_OPP : step | C_OPP_MULT_R : step - | C_OPP_ONE : - step - (* This is a special step that reduces the term (computation) *) + | C_OPP_ONE : step + (* This is a special step that reduces the term (computation) *) | C_REDUCE : step | C_MULT_PLUS_DISTR : step | C_MULT_OPP_LEFT : step @@ -152,261 +972,98 @@ Inductive step : Set := the trace coming from the decision procedure Omega. *) Inductive t_omega : Set := - (* n = 0 n!= 0 *) + (* n = 0 and n!= 0 *) | O_CONSTANT_NOT_NUL : nat -> t_omega - | O_CONSTANT_NEG : - nat -> t_omega - (* division et approximation of an equation *) - | O_DIV_APPROX : - Z -> - Z -> - term -> - nat -> - t_omega -> nat -> t_omega - (* no solution because no exact division *) - | O_NOT_EXACT_DIVIDE : - Z -> Z -> term -> nat -> nat -> t_omega - (* exact division *) - | O_EXACT_DIVIDE : Z -> term -> nat -> t_omega -> nat -> t_omega - | O_SUM : Z -> nat -> Z -> nat -> list t_fusion -> t_omega -> t_omega + | O_CONSTANT_NEG : nat -> t_omega + (* division and approximation of an equation *) + | O_DIV_APPROX : int -> int -> term -> nat -> t_omega -> nat -> t_omega + (* no solution because no exact division *) + | O_NOT_EXACT_DIVIDE : int -> int -> term -> nat -> nat -> t_omega + (* exact division *) + | O_EXACT_DIVIDE : int -> term -> nat -> t_omega -> nat -> t_omega + | O_SUM : int -> nat -> int -> nat -> list t_fusion -> t_omega -> t_omega | O_CONTRADICTION : nat -> nat -> nat -> t_omega | O_MERGE_EQ : nat -> nat -> nat -> t_omega -> t_omega | O_SPLIT_INEQ : nat -> nat -> t_omega -> t_omega -> t_omega | O_CONSTANT_NUL : nat -> t_omega | O_NEGATE_CONTRADICT : nat -> nat -> t_omega | O_NEGATE_CONTRADICT_INV : nat -> nat -> nat -> t_omega - | O_STATE : Z -> step -> nat -> nat -> t_omega -> t_omega. + | O_STATE : int -> step -> nat -> nat -> t_omega -> t_omega. + +(* \subsubsection{Rules for normalizing the hypothesis} *) +(* These rules indicate how to normalize useful propositions + of each useful hypothesis before the decomposition of hypothesis. + The rules include the inversion phase for negation removal. *) -(* \subsubsection{Règles pour normaliser les hypothèses} *) -(* Ces règles indiquent comment normaliser les propositions utiles - de chaque hypothèse utile avant la décomposition des hypothèses et - incluent l'étape d'inversion pour la suppression des négations *) Inductive p_step : Set := | P_LEFT : p_step -> p_step | P_RIGHT : p_step -> p_step | P_INVERT : step -> p_step | P_STEP : step -> p_step | P_NOP : p_step. -(* Liste des normalisations a effectuer : avec un constructeur dans le - type [p_step] permettant - de parcourir à la fois les branches gauches et droit, on pourrait n'avoir - qu'une normalisation par hypothèse. Et comme toutes les hypothèses sont - utiles (sinon on ne les inclurait pas), on pourrait remplacer [h_step] - par une simple liste *) + +(* List of normalizations to perform : with a constructor of type + [p_step] allowing to visit both left and right branches, we would be + able to restrict to only one normalization by hypothesis. + And since all hypothesis are useful (otherwise they wouldn't be included), + we would be able to replace [h_step] by a simple list. *) Inductive h_step : Set := pair_step : nat -> p_step -> h_step. -(* \subsubsection{Règles pour décomposer les hypothèses} *) -(* Ce type permet de se diriger dans les constructeurs logiques formant les - prédicats des hypothèses pour aller les décomposer. Ils permettent - en particulier d'extraire une hypothèse d'une conjonction avec - éventuellement le bon niveau de négations. *) +(* \subsubsection{Rules for decomposing the hypothesis} *) +(* This type allows to navigate in the logical constructors that + form the predicats of the hypothesis in order to decompose them. + This allows in particular to extract one hypothesis from a + conjonction with possibly the right level of negations. *) Inductive direction : Set := | D_left : direction | D_right : direction | D_mono : direction. -(* Ce type permet d'extraire les composants utiles des hypothèses : que ce - soit des hypothèses générées par éclatement d'une disjonction, ou - des équations. Le constructeur terminal indique comment résoudre le système - obtenu en recourrant au type de trace d'Omega [t_omega] *) +(* This type allows to extract useful components from hypothesis, either + hypothesis generated by splitting a disjonction, or equations. + The last constructor indicates how to solve the obtained system + via the use of the trace type of Omega [t_omega] *) Inductive e_step : Set := | E_SPLIT : nat -> list direction -> e_step -> e_step -> e_step | E_EXTRACT : nat -> list direction -> e_step -> e_step | E_SOLVE : t_omega -> e_step. -(* \subsection{Egalité décidable efficace} *) -(* Pour chaque type de donnée réifié, on calcule un test d'égalité efficace. - Ce n'est pas le cas de celui rendu par [Decide Equality]. +(* \subsection{Efficient decidable equality} *) +(* For each reified data-type, we define an efficient equality test. + It is not the one produced by [Decide Equality]. - Puis on prouve deux théorèmes permettant d'éliminer de telles égalités : + Then we prove two theorem allowing to eliminate such equalities : \begin{verbatim} (t1,t2: typ) (eq_typ t1 t2) = true -> t1 = t2. (t1,t2: typ) (eq_typ t1 t2) = false -> ~ t1 = t2. \end{verbatim} *) -(* Ces deux tactiques permettent de résoudre pas mal de cas. L'une pour - les théorèmes positifs, l'autre pour les théorèmes négatifs *) - -Ltac absurd_case := simpl in |- *; intros; discriminate. -Ltac trivial_case := unfold not in |- *; intros; discriminate. - -(* \subsubsection{Entiers naturels} *) - -Fixpoint eq_nat (t1 t2 : nat) {struct t2} : bool := - match t1 with - | O => match t2 with - | O => true - | _ => false - end - | S n1 => match t2 with - | O => false - | S n2 => eq_nat n1 n2 - end - end. - -Theorem eq_nat_true : forall t1 t2 : nat, eq_nat t1 t2 = true -> t1 = t2. - -simple induction t1; - [ intro t2; case t2; [ trivial | absurd_case ] - | intros n H t2; case t2; - [ absurd_case - | simpl in |- *; intros; rewrite (H n0); [ trivial | assumption ] ] ]. - -Qed. - -Theorem eq_nat_false : forall t1 t2 : nat, eq_nat t1 t2 = false -> t1 <> t2. - -simple induction t1; - [ intro t2; case t2; [ simpl in |- *; intros; discriminate | trivial_case ] - | intros n H t2; case t2; simpl in |- *; unfold not in |- *; intros; - [ discriminate | elim (H n0 H0); simplify_eq H1; trivial ] ]. - -Qed. - - -(* \subsubsection{Entiers positifs} *) +(* \subsubsection{Reified terms} *) -Fixpoint eq_pos (p1 p2 : positive) {struct p2} : bool := - match p1 with - | xI n1 => match p2 with - | xI n2 => eq_pos n1 n2 - | _ => false - end - | xO n1 => match p2 with - | xO n2 => eq_pos n1 n2 - | _ => false - end - | xH => match p2 with - | xH => true - | _ => false - end - end. +Open Scope romega_scope. -Theorem eq_pos_true : forall t1 t2 : positive, eq_pos t1 t2 = true -> t1 = t2. - -simple induction t1; - [ intros p H t2; case t2; - [ simpl in |- *; intros; rewrite (H p0 H0); trivial - | absurd_case - | absurd_case ] - | intros p H t2; case t2; - [ absurd_case - | simpl in |- *; intros; rewrite (H p0 H0); trivial - | absurd_case ] - | intro t2; case t2; [ absurd_case | absurd_case | auto ] ]. - -Qed. - -Theorem eq_pos_false : - forall t1 t2 : positive, eq_pos t1 t2 = false -> t1 <> t2. - -simple induction t1; - [ intros p H t2; case t2; - [ simpl in |- *; unfold not in |- *; intros; elim (H p0 H0); - simplify_eq H1; auto - | trivial_case - | trivial_case ] - | intros p H t2; case t2; - [ trivial_case - | simpl in |- *; unfold not in |- *; intros; elim (H p0 H0); - simplify_eq H1; auto - | trivial_case ] - | intros t2; case t2; [ trivial_case | trivial_case | absurd_case ] ]. -Qed. - -(* \subsubsection{Entiers relatifs} *) - -Definition eq_Z (z1 z2 : Z) : bool := - match z1 with - | Z0 => match z2 with - | Z0 => true - | _ => false - end - | Zpos p1 => match z2 with - | Zpos p2 => eq_pos p1 p2 - | _ => false - end - | Zneg p1 => match z2 with - | Zneg p2 => eq_pos p1 p2 - | _ => false - end +Fixpoint eq_term (t1 t2 : term) {struct t2} : bool := + match t1, t2 with + | Tint st1, Tint st2 => beq st1 st2 + | (st11 + st12), (st21 + st22) => eq_term st11 st21 && eq_term st12 st22 + | (st11 * st12), (st21 * st22) => eq_term st11 st21 && eq_term st12 st22 + | (st11 - st12), (st21 - st22) => eq_term st11 st21 && eq_term st12 st22 + | (- st1), (- st2) => eq_term st1 st2 + | [st1], [st2] => beq_nat st1 st2 + | _, _ => false end. -Theorem eq_Z_true : forall t1 t2 : Z, eq_Z t1 t2 = true -> t1 = t2. - -simple induction t1; - [ intros t2; case t2; [ auto | absurd_case | absurd_case ] - | intros p t2; case t2; - [ absurd_case - | simpl in |- *; intros; rewrite (eq_pos_true p p0 H); trivial - | absurd_case ] - | intros p t2; case t2; - [ absurd_case - | absurd_case - | simpl in |- *; intros; rewrite (eq_pos_true p p0 H); trivial ] ]. - -Qed. - -Theorem eq_Z_false : forall t1 t2 : Z, eq_Z t1 t2 = false -> t1 <> t2. - -simple induction t1; - [ intros t2; case t2; [ absurd_case | trivial_case | trivial_case ] - | intros p t2; case t2; - [ absurd_case - | simpl in |- *; unfold not in |- *; intros; elim (eq_pos_false p p0 H); - simplify_eq H0; auto - | trivial_case ] - | intros p t2; case t2; - [ absurd_case - | trivial_case - | simpl in |- *; unfold not in |- *; intros; elim (eq_pos_false p p0 H); - simplify_eq H0; auto ] ]. -Qed. - -(* \subsubsection{Termes réifiés} *) - -Fixpoint eq_term (t1 t2 : term) {struct t2} : bool := - match t1 with - | Tint st1 => match t2 with - | Tint st2 => eq_Z st1 st2 - | _ => false - end - | (st11 + st12)%term => - match t2 with - | (st21 + st22)%term => eq_term st11 st21 && eq_term st12 st22 - | _ => false - end - | (st11 * st12)%term => - match t2 with - | (st21 * st22)%term => eq_term st11 st21 && eq_term st12 st22 - | _ => false - end - | (st11 - st12)%term => - match t2 with - | (st21 - st22)%term => eq_term st11 st21 && eq_term st12 st22 - | _ => false - end - | (- st1)%term => - match t2 with - | (- st2)%term => eq_term st1 st2 - | _ => false - end - | [st1]%term => - match t2 with - | [st2]%term => eq_nat st1 st2 - | _ => false - end - end. +Close Scope romega_scope. Theorem eq_term_true : forall t1 t2 : term, eq_term t1 t2 = true -> t1 = t2. - - -simple induction t1; intros until t2; case t2; try absurd_case; simpl in |- *; - [ intros; elim eq_Z_true with (1 := H); trivial +Proof. + simple induction t1; intros until t2; case t2; simpl in *; + try (intros; discriminate; fail); + [ intros; elim beq_true with (1 := H); trivial | intros t21 t22 H3; elim andb_prop with (1 := H3); intros H4 H5; elim H with (1 := H4); elim H0 with (1 := H5); trivial @@ -417,16 +1074,17 @@ simple induction t1; intros until t2; case t2; try absurd_case; simpl in |- *; elim H with (1 := H4); elim H0 with (1 := H5); trivial | intros t21 H3; elim H with (1 := H3); trivial - | intros; elim eq_nat_true with (1 := H); trivial ]. - + | intros; elim beq_nat_true with (1 := H); trivial ]. Qed. +Ltac trivial_case := unfold not in |- *; intros; discriminate. + Theorem eq_term_false : forall t1 t2 : term, eq_term t1 t2 = false -> t1 <> t2. - -simple induction t1; +Proof. + simple induction t1; [ intros z t2; case t2; try trivial_case; simpl in |- *; unfold not in |- *; - intros; elim eq_Z_false with (1 := H); simplify_eq H0; + intros; elim beq_false with (1 := H); simplify_eq H0; auto | intros t11 H1 t12 H2 t2; case t2; try trivial_case; simpl in |- *; intros t21 t22 H3; unfold not in |- *; intro H4; @@ -447,9 +1105,8 @@ simple induction t1; unfold not in |- *; intro H4; elim H1 with (1 := H3); simplify_eq H4; auto | intros n t2; case t2; try trivial_case; simpl in |- *; unfold not in |- *; - intros; elim eq_nat_false with (1 := H); simplify_eq H0; + intros; elim beq_nat_false with (1 := H); simplify_eq H0; auto ]. - Qed. (* \subsubsection{Tactiques pour éliminer ces tests} @@ -463,54 +1120,29 @@ Qed. tel test préserve bien l'information voulue mais calculatoirement de telles fonctions sont trop lentes. *) -(* Le théorème suivant permet de garder dans les hypothèses la valeur - du booléen lors de l'élimination. *) - -Theorem bool_ind2 : - forall (P : bool -> Prop) (b : bool), - (b = true -> P true) -> (b = false -> P false) -> P b. - -simple induction b; auto. -Qed. - (* Les tactiques définies si après se comportent exactement comme si on avait utilisé le test précédent et fait une elimination dessus. *) Ltac elim_eq_term t1 t2 := - pattern (eq_term t1 t2) in |- *; apply bool_ind2; intro Aux; + pattern (eq_term t1 t2) in |- *; apply bool_eq_ind; intro Aux; [ generalize (eq_term_true t1 t2 Aux); clear Aux | generalize (eq_term_false t1 t2 Aux); clear Aux ]. -Ltac elim_eq_Z t1 t2 := - pattern (eq_Z t1 t2) in |- *; apply bool_ind2; intro Aux; - [ generalize (eq_Z_true t1 t2 Aux); clear Aux - | generalize (eq_Z_false t1 t2 Aux); clear Aux ]. - -Ltac elim_eq_pos t1 t2 := - pattern (eq_pos t1 t2) in |- *; apply bool_ind2; intro Aux; - [ generalize (eq_pos_true t1 t2 Aux); clear Aux - | generalize (eq_pos_false t1 t2 Aux); clear Aux ]. +Ltac elim_beq t1 t2 := + pattern (beq t1 t2) in |- *; apply bool_eq_ind; intro Aux; + [ generalize (beq_true t1 t2 Aux); clear Aux + | generalize (beq_false t1 t2 Aux); clear Aux ]. -(* \subsubsection{Comparaison sur Z} *) - -(* Sujet très lié au précédent : on introduit la tactique d'élimination - avec son théorème *) - -Theorem relation_ind2 : - forall (P : comparison -> Prop) (b : comparison), - (b = Eq -> P Eq) -> - (b = Lt -> P Lt) -> - (b = Gt -> P Gt) -> P b. - -simple induction b; auto. -Qed. +Ltac elim_bgt t1 t2 := + pattern (bgt t1 t2) in |- *; apply bool_eq_ind; intro Aux; + [ generalize (bgt_true t1 t2 Aux); clear Aux + | generalize (bgt_false t1 t2 Aux); clear Aux ]. -Ltac elim_Zcompare t1 t2 := pattern (t1 ?= t2) in |- *; apply relation_ind2. (* \subsection{Interprétations} \subsubsection{Interprétation des termes dans Z} *) -Fixpoint interp_term (env : list Z) (t : term) {struct t} : Z := +Fixpoint interp_term (env : list int) (t : term) {struct t} : int := match t with | Tint x => x | (t1 + t2)%term => interp_term env t1 + interp_term env t2 @@ -521,7 +1153,8 @@ Fixpoint interp_term (env : list Z) (t : term) {struct t} : Z := end. (* \subsubsection{Interprétation des prédicats} *) -Fixpoint interp_proposition (envp : PropList) (env : list Z) + +Fixpoint interp_proposition (envp : list Prop) (env : list int) (p : proposition) {struct p} : Prop := match p with | EqTerm t1 t2 => interp_term env t1 = interp_term env t2 @@ -532,14 +1165,14 @@ Fixpoint interp_proposition (envp : PropList) (env : list Z) | GeqTerm t1 t2 => interp_term env t1 >= interp_term env t2 | GtTerm t1 t2 => interp_term env t1 > interp_term env t2 | LtTerm t1 t2 => interp_term env t1 < interp_term env t2 - | NeqTerm t1 t2 => Zne (interp_term env t1) (interp_term env t2) + | NeqTerm t1 t2 => (interp_term env t1)<>(interp_term env t2) | Tor p1 p2 => interp_proposition envp env p1 \/ interp_proposition envp env p2 | Tand p1 p2 => interp_proposition envp env p1 /\ interp_proposition envp env p2 | Timp p1 p2 => interp_proposition envp env p1 -> interp_proposition envp env p2 - | Tprop n => nthProp n envp True + | Tprop n => nth n envp True end. (* \subsubsection{Inteprétation des listes d'hypothèses} @@ -547,7 +1180,7 @@ Fixpoint interp_proposition (envp : PropList) (env : list Z) Interprétation sous forme d'une conjonction d'hypothèses plus faciles à manipuler individuellement *) -Fixpoint interp_hyps (envp : PropList) (env : list Z) +Fixpoint interp_hyps (envp : list Prop) (env : list int) (l : hyps) {struct l} : Prop := match l with | nil => True @@ -559,8 +1192,8 @@ Fixpoint interp_hyps (envp : PropList) (env : list Z) [Generalize] et qu'une conjonction est forcément lourde (répétition des types dans les conjonctions intermédiaires) *) -Fixpoint interp_goal_concl (c : proposition) (envp : PropList) - (env : list Z) (l : hyps) {struct l} : Prop := +Fixpoint interp_goal_concl (c : proposition) (envp : list Prop) + (env : list int) (l : hyps) {struct l} : Prop := match l with | nil => interp_proposition envp env c | p' :: l' => @@ -573,19 +1206,19 @@ Notation interp_goal := (interp_goal_concl FalseTerm). interprétations. *) Theorem goal_to_hyps : - forall (envp : PropList) (env : list Z) (l : hyps), + forall (envp : list Prop) (env : list int) (l : hyps), (interp_hyps envp env l -> False) -> interp_goal envp env l. - -simple induction l; +Proof. + simple induction l; [ simpl in |- *; auto | simpl in |- *; intros a l1 H1 H2 H3; apply H1; intro H4; apply H2; auto ]. Qed. Theorem hyps_to_goal : - forall (envp : PropList) (env : list Z) (l : hyps), + forall (envp : list Prop) (env : list int) (l : hyps), interp_goal envp env l -> interp_hyps envp env l -> False. - -simple induction l; simpl in |- *; [ auto | intros; apply H; elim H1; auto ]. +Proof. + simple induction l; simpl in |- *; [ auto | intros; apply H; elim H1; auto ]. Qed. (* \subsection{Manipulations sur les hypothèses} *) @@ -593,7 +1226,7 @@ Qed. (* \subsubsection{Définitions de base de stabilité pour la réflexion} *) (* Une opération laisse un terme stable si l'égalité est préservée *) Definition term_stable (f : term -> term) := - forall (e : list Z) (t : term), interp_term e t = interp_term e (f t). + forall (e : list int) (t : term), interp_term e t = interp_term e (f t). (* Une opération est valide sur une hypothèse, si l'hypothèse implique le résultat de l'opération. \emph{Attention : cela ne concerne que des @@ -602,11 +1235,11 @@ Definition term_stable (f : term -> term) := en argument (cela suffit pour omega). *) Definition valid1 (f : proposition -> proposition) := - forall (ep : PropList) (e : list Z) (p1 : proposition), + forall (ep : list Prop) (e : list int) (p1 : proposition), interp_proposition ep e p1 -> interp_proposition ep e (f p1). Definition valid2 (f : proposition -> proposition -> proposition) := - forall (ep : PropList) (e : list Z) (p1 p2 : proposition), + forall (ep : list Prop) (e : list int) (p1 p2 : proposition), interp_proposition ep e p1 -> interp_proposition ep e p2 -> interp_proposition ep e (f p1 p2). @@ -615,31 +1248,31 @@ Definition valid2 (f : proposition -> proposition -> proposition) := On reste contravariant *) Definition valid_hyps (f : hyps -> hyps) := - forall (ep : PropList) (e : list Z) (lp : hyps), + forall (ep : list Prop) (e : list int) (lp : hyps), interp_hyps ep e lp -> interp_hyps ep e (f lp). (* Enfin ce théorème élimine la contravariance et nous ramène à une opération sur les buts *) - Theorem valid_goal : - forall (ep : PropList) (env : list Z) (l : hyps) (a : hyps -> hyps), +Theorem valid_goal : + forall (ep : list Prop) (env : list int) (l : hyps) (a : hyps -> hyps), valid_hyps a -> interp_goal ep env (a l) -> interp_goal ep env l. - -intros; simpl in |- *; apply goal_to_hyps; intro H1; +Proof. + intros; simpl in |- *; apply goal_to_hyps; intro H1; apply (hyps_to_goal ep env (a l) H0); apply H; assumption. Qed. (* \subsubsection{Généralisation a des listes de buts (disjonctions)} *) -Fixpoint interp_list_hyps (envp : PropList) (env : list Z) +Fixpoint interp_list_hyps (envp : list Prop) (env : list int) (l : lhyps) {struct l} : Prop := match l with | nil => False | h :: l' => interp_hyps envp env h \/ interp_list_hyps envp env l' end. -Fixpoint interp_list_goal (envp : PropList) (env : list Z) +Fixpoint interp_list_goal (envp : list Prop) (env : list int) (l : lhyps) {struct l} : Prop := match l with | nil => True @@ -647,10 +1280,10 @@ Fixpoint interp_list_goal (envp : PropList) (env : list Z) end. Theorem list_goal_to_hyps : - forall (envp : PropList) (env : list Z) (l : lhyps), + forall (envp : list Prop) (env : list int) (l : lhyps), (interp_list_hyps envp env l -> False) -> interp_list_goal envp env l. - -simple induction l; simpl in |- *; +Proof. + simple induction l; simpl in |- *; [ auto | intros h1 l1 H H1; split; [ apply goal_to_hyps; intro H2; apply H1; auto @@ -658,37 +1291,37 @@ simple induction l; simpl in |- *; Qed. Theorem list_hyps_to_goal : - forall (envp : PropList) (env : list Z) (l : lhyps), + forall (envp : list Prop) (env : list int) (l : lhyps), interp_list_goal envp env l -> interp_list_hyps envp env l -> False. - -simple induction l; simpl in |- *; +Proof. + simple induction l; simpl in |- *; [ auto | intros h1 l1 H (H1, H2) H3; elim H3; intro H4; [ apply hyps_to_goal with (1 := H1); assumption | auto ] ]. Qed. Definition valid_list_hyps (f : hyps -> lhyps) := - forall (ep : PropList) (e : list Z) (lp : hyps), + forall (ep : list Prop) (e : list int) (lp : hyps), interp_hyps ep e lp -> interp_list_hyps ep e (f lp). Definition valid_list_goal (f : hyps -> lhyps) := - forall (ep : PropList) (e : list Z) (lp : hyps), + forall (ep : list Prop) (e : list int) (lp : hyps), interp_list_goal ep e (f lp) -> interp_goal ep e lp. Theorem goal_valid : forall f : hyps -> lhyps, valid_list_hyps f -> valid_list_goal f. - -unfold valid_list_goal in |- *; intros f H ep e lp H1; apply goal_to_hyps; +Proof. + unfold valid_list_goal in |- *; intros f H ep e lp H1; apply goal_to_hyps; intro H2; apply list_hyps_to_goal with (1 := H1); apply (H ep e lp); assumption. Qed. Theorem append_valid : - forall (ep : PropList) (e : list Z) (l1 l2 : lhyps), + forall (ep : list Prop) (e : list int) (l1 l2 : lhyps), interp_list_hyps ep e l1 \/ interp_list_hyps ep e l2 -> interp_list_hyps ep e (l1 ++ l2). - -intros ep e; simple induction l1; +Proof. + intros ep e; simple induction l1; [ simpl in |- *; intros l2 [H| H]; [ contradiction | trivial ] | simpl in |- *; intros h1 t1 HR l2 [[H| H]| H]; [ auto @@ -703,10 +1336,10 @@ Qed. Definition nth_hyps (n : nat) (l : hyps) := nth n l TrueTerm. Theorem nth_valid : - forall (ep : PropList) (e : list Z) (i : nat) (l : hyps), + forall (ep : list Prop) (e : list int) (i : nat) (l : hyps), interp_hyps ep e l -> interp_proposition ep e (nth_hyps i l). - -unfold nth_hyps in |- *; simple induction i; +Proof. + unfold nth_hyps in |- *; simple induction i; [ simple induction l; simpl in |- *; [ auto | intros; elim H0; auto ] | intros n H; simple induction l; [ simpl in |- *; trivial @@ -722,8 +1355,8 @@ Definition apply_oper_2 (i j : nat) Theorem apply_oper_2_valid : forall (i j : nat) (f : proposition -> proposition -> proposition), valid2 f -> valid_hyps (apply_oper_2 i j f). - -intros i j f Hf; unfold apply_oper_2, valid_hyps in |- *; simpl in |- *; +Proof. + intros i j f Hf; unfold apply_oper_2, valid_hyps in |- *; simpl in |- *; intros lp Hlp; split; [ apply Hf; apply nth_valid; assumption | assumption ]. Qed. @@ -743,8 +1376,8 @@ Fixpoint apply_oper_1 (i : nat) (f : proposition -> proposition) Theorem apply_oper_1_valid : forall (i : nat) (f : proposition -> proposition), valid1 f -> valid_hyps (apply_oper_1 i f). - -unfold valid_hyps in |- *; intros i f Hf ep e; elim i; +Proof. + unfold valid_hyps in |- *; intros i f Hf ep e; elim i; [ intro lp; case lp; [ simpl in |- *; trivial | simpl in |- *; intros p l' (H1, H2); split; @@ -753,7 +1386,6 @@ unfold valid_hyps in |- *; intros i f Hf ep e; elim i; [ simpl in |- *; auto | simpl in |- *; intros p l' (H1, H2); split; [ assumption | apply Hrec; assumption ] ] ]. - Qed. (* \subsubsection{Manipulations de termes} *) @@ -789,31 +1421,31 @@ Definition apply_both (f g : term -> term) (t : term) := Theorem apply_left_stable : forall f : term -> term, term_stable f -> term_stable (apply_left f). - -unfold term_stable in |- *; intros f H e t; case t; auto; simpl in |- *; +Proof. + unfold term_stable in |- *; intros f H e t; case t; auto; simpl in |- *; intros; elim H; trivial. Qed. Theorem apply_right_stable : forall f : term -> term, term_stable f -> term_stable (apply_right f). - -unfold term_stable in |- *; intros f H e t; case t; auto; simpl in |- *; +Proof. + unfold term_stable in |- *; intros f H e t; case t; auto; simpl in |- *; intros t0 t1; elim H; trivial. Qed. Theorem apply_both_stable : forall f g : term -> term, term_stable f -> term_stable g -> term_stable (apply_both f g). - -unfold term_stable in |- *; intros f g H1 H2 e t; case t; auto; simpl in |- *; +Proof. + unfold term_stable in |- *; intros f g H1 H2 e t; case t; auto; simpl in |- *; intros t0 t1; elim H1; elim H2; trivial. Qed. Theorem compose_term_stable : forall f g : term -> term, term_stable f -> term_stable g -> term_stable (fun t : term => f (g t)). - -unfold term_stable in |- *; intros f g Hf Hg e t; elim Hf; apply Hg. +Proof. + unfold term_stable in |- *; intros f g Hf Hg e t; elim Hf; apply Hg. Qed. (* \subsection{Les règles de réécriture} *) @@ -879,21 +1511,7 @@ Ltac loop t := | Tand x x0 => _ | Timp x x0 => _ | Tprop x => _ - end => - case X1; - [ intro; intro - | intro; intro - | idtac - | idtac - | intro - | intro; intro - | intro; intro - | intro; intro - | intro; intro - | intro; intro - | intro; intro - | intro; intro - | intro ]; auto; Simplify + end => destruct X1; auto; Simplify | match ?X1 with | Tint x => _ | (x + x0)%term => _ @@ -901,38 +1519,27 @@ Ltac loop t := | (x - x0)%term => _ | (- x)%term => _ | [x]%term => _ - end => - case X1; - [ intro | intro; intro | intro; intro | intro; intro | intro | intro ]; - auto; Simplify - | match ?X1 ?= ?X2 with - | Eq => _ - | Lt => _ - | Gt => _ - end => - elim_Zcompare X1 X2; intro; auto; Simplify - | match ?X1 with - | Z0 => _ - | Zpos x => _ - | Zneg x => _ - end => - case X1; [ idtac | intro | intro ]; auto; Simplify - | (if eq_Z ?X1 ?X2 then _ else _) => - elim_eq_Z X1 X2; intro H; [ rewrite H; clear H | clear H ]; + end => destruct X1; auto; Simplify + | (if beq ?X1 ?X2 then _ else _) => + let H := fresh "H" in + elim_beq X1 X2; intro H; try (rewrite H in *; clear H); simpl in |- *; auto; Simplify + | (if bgt ?X1 ?X2 then _ else _) => + let H := fresh "H" in + elim_bgt X1 X2; intro H; simpl in |- *; auto; Simplify | (if eq_term ?X1 ?X2 then _ else _) => - elim_eq_term X1 X2; intro H; [ rewrite H; clear H | clear H ]; - simpl in |- *; auto; Simplify - | (if eq_pos ?X1 ?X2 then _ else _) => - elim_eq_pos X1 X2; intro H; [ rewrite H; clear H | clear H ]; + let H := fresh "H" in + elim_eq_term X1 X2; intro H; try (rewrite H in *; clear H); simpl in |- *; auto; Simplify + | (if _ && _ then _ else _) => rewrite andb_if; Simplify + | (if negb _ then _ else _) => rewrite negb_if; Simplify | _ => fail end - with Simplify := match goal with - | |- ?X1 => try loop X1 - | _ => idtac - end. +with Simplify := match goal with + | |- ?X1 => try loop X1 + | _ => idtac + end. Ltac prove_stable x th := match constr:x with @@ -949,8 +1556,8 @@ Definition Tplus_assoc_l (t : term) := end. Theorem Tplus_assoc_l_stable : term_stable Tplus_assoc_l. - -prove_stable Tplus_assoc_l Zplus_assoc. +Proof. + prove_stable Tplus_assoc_l (ring.(Radd_assoc)). Qed. Definition Tplus_assoc_r (t : term) := @@ -960,8 +1567,8 @@ Definition Tplus_assoc_r (t : term) := end. Theorem Tplus_assoc_r_stable : term_stable Tplus_assoc_r. - -prove_stable Tplus_assoc_r Zplus_assoc_reverse. +Proof. + prove_stable Tplus_assoc_r plus_assoc_reverse. Qed. Definition Tmult_assoc_r (t : term) := @@ -971,8 +1578,8 @@ Definition Tmult_assoc_r (t : term) := end. Theorem Tmult_assoc_r_stable : term_stable Tmult_assoc_r. - -prove_stable Tmult_assoc_r Zmult_assoc_reverse. +Proof. + prove_stable Tmult_assoc_r mult_assoc_reverse. Qed. Definition Tplus_permute (t : term) := @@ -982,46 +1589,44 @@ Definition Tplus_permute (t : term) := end. Theorem Tplus_permute_stable : term_stable Tplus_permute. - -prove_stable Tplus_permute Zplus_permute. +Proof. + prove_stable Tplus_permute plus_permute. Qed. -Definition Tplus_sym (t : term) := +Definition Tplus_comm (t : term) := match t with | (x + y)%term => (y + x)%term | _ => t end. -Theorem Tplus_sym_stable : term_stable Tplus_sym. - -prove_stable Tplus_sym Zplus_comm. +Theorem Tplus_comm_stable : term_stable Tplus_comm. +Proof. + prove_stable Tplus_comm plus_comm. Qed. -Definition Tmult_sym (t : term) := +Definition Tmult_comm (t : term) := match t with | (x * y)%term => (y * x)%term | _ => t end. -Theorem Tmult_sym_stable : term_stable Tmult_sym. - -prove_stable Tmult_sym Zmult_comm. +Theorem Tmult_comm_stable : term_stable Tmult_comm. +Proof. + prove_stable Tmult_comm mult_comm. Qed. Definition T_OMEGA10 (t : term) := match t with | ((v * Tint c1 + l1) * Tint k1 + (v' * Tint c2 + l2) * Tint k2)%term => - match eq_term v v' with - | true => - (v * Tint (c1 * k1 + c2 * k2) + (l1 * Tint k1 + l2 * Tint k2))%term - | false => t - end + if eq_term v v' + then (v * Tint (c1 * k1 + c2 * k2)%I + (l1 * Tint k1 + l2 * Tint k2))%term + else t | _ => t end. Theorem T_OMEGA10_stable : term_stable T_OMEGA10. - -prove_stable T_OMEGA10 OMEGA10. +Proof. + prove_stable T_OMEGA10 OMEGA10. Qed. Definition T_OMEGA11 (t : term) := @@ -1032,8 +1637,8 @@ Definition T_OMEGA11 (t : term) := end. Theorem T_OMEGA11_stable : term_stable T_OMEGA11. - -prove_stable T_OMEGA11 OMEGA11. +Proof. + prove_stable T_OMEGA11 OMEGA11. Qed. Definition T_OMEGA12 (t : term) := @@ -1044,52 +1649,37 @@ Definition T_OMEGA12 (t : term) := end. Theorem T_OMEGA12_stable : term_stable T_OMEGA12. - -prove_stable T_OMEGA12 OMEGA12. +Proof. + prove_stable T_OMEGA12 OMEGA12. Qed. Definition T_OMEGA13 (t : term) := match t with - | (v * Tint (Zpos x) + l1 + (v' * Tint (Zneg x') + l2))%term => - match eq_term v v' with - | true => - match eq_pos x x' with - | true => (l1 + l2)%term - | false => t - end - | false => t - end - | (v * Tint (Zneg x) + l1 + (v' * Tint (Zpos x') + l2))%term => - match eq_term v v' with - | true => - match eq_pos x x' with - | true => (l1 + l2)%term - | false => t - end - | false => t - end + | (v * Tint x + l1 + (v' * Tint x' + l2))%term => + if eq_term v v' && beq x (-x') + then (l1+l2)%term + else t | _ => t end. Theorem T_OMEGA13_stable : term_stable T_OMEGA13. - -unfold term_stable, T_OMEGA13 in |- *; intros; Simplify; simpl in |- *; - [ apply OMEGA13 | apply OMEGA14 ]. +Proof. + unfold term_stable, T_OMEGA13 in |- *; intros; Simplify; simpl in |- *; + apply OMEGA13. Qed. Definition T_OMEGA15 (t : term) := match t with | (v * Tint c1 + l1 + (v' * Tint c2 + l2) * Tint k2)%term => - match eq_term v v' with - | true => (v * Tint (c1 + c2 * k2) + (l1 + l2 * Tint k2))%term - | false => t - end + if eq_term v v' + then (v * Tint (c1 + c2 * k2)%I + (l1 + l2 * Tint k2))%term + else t | _ => t end. Theorem T_OMEGA15_stable : term_stable T_OMEGA15. - -prove_stable T_OMEGA15 OMEGA15. +Proof. + prove_stable T_OMEGA15 OMEGA15. Qed. Definition T_OMEGA16 (t : term) := @@ -1100,20 +1690,19 @@ Definition T_OMEGA16 (t : term) := Theorem T_OMEGA16_stable : term_stable T_OMEGA16. - -prove_stable T_OMEGA16 OMEGA16. +Proof. + prove_stable T_OMEGA16 OMEGA16. Qed. Definition Tred_factor5 (t : term) := match t with - | (x * Tint Z0 + y)%term => y + | (x * Tint c + y)%term => if beq c 0 then y else t | _ => t end. Theorem Tred_factor5_stable : term_stable Tred_factor5. - - -prove_stable Tred_factor5 Zred_factor5. +Proof. + prove_stable Tred_factor5 red_factor5. Qed. Definition Topp_plus (t : term) := @@ -1123,8 +1712,8 @@ Definition Topp_plus (t : term) := end. Theorem Topp_plus_stable : term_stable Topp_plus. - -prove_stable Topp_plus Zopp_plus_distr. +Proof. + prove_stable Topp_plus opp_plus_distr. Qed. @@ -1135,8 +1724,8 @@ Definition Topp_opp (t : term) := end. Theorem Topp_opp_stable : term_stable Topp_opp. - -prove_stable Topp_opp Zopp_involutive. +Proof. + prove_stable Topp_opp opp_involutive. Qed. Definition Topp_mult_r (t : term) := @@ -1146,19 +1735,19 @@ Definition Topp_mult_r (t : term) := end. Theorem Topp_mult_r_stable : term_stable Topp_mult_r. - -prove_stable Topp_mult_r Zopp_mult_distr_r. +Proof. + prove_stable Topp_mult_r opp_mult_distr_r. Qed. Definition Topp_one (t : term) := match t with - | (- x)%term => (x * Tint (-1))%term + | (- x)%term => (x * Tint (-(1)))%term | _ => t end. Theorem Topp_one_stable : term_stable Topp_one. - -prove_stable Topp_one Zopp_eq_mult_neg_1. +Proof. + prove_stable Topp_one opp_eq_mult_neg_1. Qed. Definition Tmult_plus_distr (t : term) := @@ -1168,8 +1757,8 @@ Definition Tmult_plus_distr (t : term) := end. Theorem Tmult_plus_distr_stable : term_stable Tmult_plus_distr. - -prove_stable Tmult_plus_distr Zmult_plus_distr_l. +Proof. + prove_stable Tmult_plus_distr mult_plus_distr_r. Qed. Definition Tmult_opp_left (t : term) := @@ -1179,8 +1768,8 @@ Definition Tmult_opp_left (t : term) := end. Theorem Tmult_opp_left_stable : term_stable Tmult_opp_left. - -prove_stable Tmult_opp_left Zmult_opp_comm. +Proof. + prove_stable Tmult_opp_left mult_opp_comm. Qed. Definition Tmult_assoc_reduced (t : term) := @@ -1190,91 +1779,81 @@ Definition Tmult_assoc_reduced (t : term) := end. Theorem Tmult_assoc_reduced_stable : term_stable Tmult_assoc_reduced. - -prove_stable Tmult_assoc_reduced Zmult_assoc_reverse. +Proof. + prove_stable Tmult_assoc_reduced mult_assoc_reverse. Qed. Definition Tred_factor0 (t : term) := (t * Tint 1)%term. Theorem Tred_factor0_stable : term_stable Tred_factor0. - -prove_stable Tred_factor0 Zred_factor0. +Proof. + prove_stable Tred_factor0 red_factor0. Qed. Definition Tred_factor1 (t : term) := match t with | (x + y)%term => - match eq_term x y with - | true => (x * Tint 2)%term - | false => t - end + if eq_term x y + then (x * Tint 2)%term + else t | _ => t end. Theorem Tred_factor1_stable : term_stable Tred_factor1. - -prove_stable Tred_factor1 Zred_factor1. +Proof. + prove_stable Tred_factor1 red_factor1. Qed. Definition Tred_factor2 (t : term) := match t with | (x + y * Tint k)%term => - match eq_term x y with - | true => (x * Tint (1 + k))%term - | false => t - end + if eq_term x y + then (x * Tint (1 + k))%term + else t | _ => t end. -(* Attention : il faut rendre opaque [Zplus] pour éviter que la tactique - de simplification n'aille trop loin et défasse [Zplus 1 k] *) - -Opaque Zplus. - Theorem Tred_factor2_stable : term_stable Tred_factor2. -prove_stable Tred_factor2 Zred_factor2. +Proof. + prove_stable Tred_factor2 red_factor2. Qed. Definition Tred_factor3 (t : term) := match t with | (x * Tint k + y)%term => - match eq_term x y with - | true => (x * Tint (1 + k))%term - | false => t - end + if eq_term x y + then (x * Tint (1 + k))%term + else t | _ => t end. Theorem Tred_factor3_stable : term_stable Tred_factor3. - -prove_stable Tred_factor3 Zred_factor3. +Proof. + prove_stable Tred_factor3 red_factor3. Qed. Definition Tred_factor4 (t : term) := match t with | (x * Tint k1 + y * Tint k2)%term => - match eq_term x y with - | true => (x * Tint (k1 + k2))%term - | false => t - end + if eq_term x y + then (x * Tint (k1 + k2))%term + else t | _ => t end. Theorem Tred_factor4_stable : term_stable Tred_factor4. - -prove_stable Tred_factor4 Zred_factor4. +Proof. + prove_stable Tred_factor4 red_factor4. Qed. Definition Tred_factor6 (t : term) := (t + Tint 0)%term. Theorem Tred_factor6_stable : term_stable Tred_factor6. - -prove_stable Tred_factor6 Zred_factor6. +Proof. + prove_stable Tred_factor6 red_factor6. Qed. -Transparent Zplus. - Definition Tminus_def (t : term) := match t with | (x - y)%term => (x + - y)%term @@ -1282,9 +1861,8 @@ Definition Tminus_def (t : term) := end. Theorem Tminus_def_stable : term_stable Tminus_def. - -(* Le théorème ne sert à rien. Le but est prouvé avant. *) -prove_stable Tminus_def False. +Proof. + prove_stable Tminus_def minus_def. Qed. (* \subsection{Fonctions de réécriture complexes} *) @@ -1332,8 +1910,8 @@ Fixpoint reduce (t : term) : term := end. Theorem reduce_stable : term_stable reduce. - -unfold term_stable in |- *; intros e t; elim t; auto; +Proof. + unfold term_stable in |- *; intros e t; elim t; auto; try (intros t0 H0 t1 H1; simpl in |- *; rewrite H0; rewrite H1; (case (reduce t0); @@ -1366,8 +1944,8 @@ Fixpoint fusion (trace : list t_fusion) (t : term) {struct trace} : term := end. Theorem fusion_stable : forall t : list t_fusion, term_stable (fusion t). - -simple induction t; simpl in |- *; +Proof. + simple induction t; simpl in |- *; [ exact reduce_stable | intros stp l H; case stp; [ apply compose_term_stable; @@ -1378,7 +1956,6 @@ simple induction t; simpl in |- *; [ apply apply_right_stable; assumption | exact T_OMEGA11_stable ] | apply compose_term_stable; [ apply apply_right_stable; assumption | exact T_OMEGA12_stable ] ] ]. - Qed. (* \paragraph{Fusion de deux équations dont une sans coefficient} *) @@ -1405,8 +1982,8 @@ Fixpoint fusion_cancel (trace : nat) (t : term) {struct trace} : term := end. Theorem fusion_cancel_stable : forall t : nat, term_stable (fusion_cancel t). - -unfold term_stable, fusion_cancel in |- *; intros trace e; elim trace; +Proof. + unfold term_stable, fusion_cancel in |- *; intros trace e; elim trace; [ exact (reduce_stable e) | intros n H t; elim H; exact (T_OMEGA13_stable e t) ]. Qed. @@ -1422,8 +1999,8 @@ Fixpoint scalar_norm_add (trace : nat) (t : term) {struct trace} : term := Theorem scalar_norm_add_stable : forall t : nat, term_stable (scalar_norm_add t). - -unfold term_stable, scalar_norm_add in |- *; intros trace; elim trace; +Proof. + unfold term_stable, scalar_norm_add in |- *; intros trace; elim trace; [ exact reduce_stable | intros n H e t; elim apply_right_stable; [ exact (T_OMEGA11_stable e t) | exact H ] ]. @@ -1437,8 +2014,8 @@ Fixpoint scalar_norm (trace : nat) (t : term) {struct trace} : term := end. Theorem scalar_norm_stable : forall t : nat, term_stable (scalar_norm t). - -unfold term_stable, scalar_norm in |- *; intros trace; elim trace; +Proof. + unfold term_stable, scalar_norm in |- *; intros trace; elim trace; [ exact reduce_stable | intros n H e t; elim apply_right_stable; [ exact (T_OMEGA16_stable e t) | exact H ] ]. @@ -1452,8 +2029,8 @@ Fixpoint add_norm (trace : nat) (t : term) {struct trace} : term := end. Theorem add_norm_stable : forall t : nat, term_stable (add_norm t). - -unfold term_stable, add_norm in |- *; intros trace; elim trace; +Proof. + unfold term_stable, add_norm in |- *; intros trace; elim trace; [ exact reduce_stable | intros n H e t; elim apply_right_stable; [ exact (Tplus_assoc_r_stable e t) | exact H ] ]. @@ -1480,7 +2057,7 @@ Fixpoint rewrite (s : step) : term -> term := | C_PLUS_ASSOC_R => Tplus_assoc_r | C_PLUS_ASSOC_L => Tplus_assoc_l | C_PLUS_PERMUTE => Tplus_permute - | C_PLUS_COMM => Tplus_sym + | C_PLUS_COMM => Tplus_comm | C_RED0 => Tred_factor0 | C_RED1 => Tred_factor1 | C_RED2 => Tred_factor2 @@ -1490,12 +2067,12 @@ Fixpoint rewrite (s : step) : term -> term := | C_RED6 => Tred_factor6 | C_MULT_ASSOC_REDUCED => Tmult_assoc_reduced | C_MINUS => Tminus_def - | C_MULT_COMM => Tmult_sym + | C_MULT_COMM => Tmult_comm end. Theorem rewrite_stable : forall s : step, term_stable (rewrite s). - -simple induction s; simpl in |- *; +Proof. + simple induction s; simpl in |- *; [ intros; apply apply_both_stable; auto | intros; apply apply_left_stable; auto | intros; apply apply_right_stable; auto @@ -1512,7 +2089,7 @@ simple induction s; simpl in |- *; | exact Tplus_assoc_r_stable | exact Tplus_assoc_l_stable | exact Tplus_permute_stable - | exact Tplus_sym_stable + | exact Tplus_comm_stable | exact Tred_factor0_stable | exact Tred_factor1_stable | exact Tred_factor2_stable @@ -1522,7 +2099,7 @@ simple induction s; simpl in |- *; | exact Tred_factor6_stable | exact Tmult_assoc_reduced_stable | exact Tminus_def_stable - | exact Tmult_sym_stable ]. + | exact Tmult_comm_stable ]. Qed. (* \subsection{tactiques de résolution d'un but omega normalisé} @@ -1532,20 +2109,18 @@ Qed. Definition constant_not_nul (i : nat) (h : hyps) := match nth_hyps i h with - | EqTerm (Tint Z0) (Tint n) => - match eq_Z n 0 with - | true => h - | false => absurd - end + | EqTerm (Tint Nul) (Tint n) => + if beq n Nul then h else absurd | _ => h end. Theorem constant_not_nul_valid : forall i : nat, valid_hyps (constant_not_nul i). - -unfold valid_hyps, constant_not_nul in |- *; intros; - generalize (nth_valid ep e i lp); Simplify; simpl in |- *; - elim_eq_Z ipattern:z0 0; auto; simpl in |- *; intros H1 H2; +Proof. + unfold valid_hyps, constant_not_nul in |- *; intros; + generalize (nth_valid ep e i lp); Simplify; simpl in |- *. + + elim_beq i1 i0; auto; simpl in |- *; intros H1 H2; elim H1; symmetry in |- *; auto. Qed. @@ -1553,66 +2128,55 @@ Qed. Definition constant_neg (i : nat) (h : hyps) := match nth_hyps i h with - | LeqTerm (Tint Z0) (Tint (Zneg n)) => absurd + | LeqTerm (Tint Nul) (Tint Neg) => + if bgt Nul Neg then absurd else h | _ => h end. Theorem constant_neg_valid : forall i : nat, valid_hyps (constant_neg i). - -unfold valid_hyps, constant_neg in |- *; intros; - generalize (nth_valid ep e i lp); Simplify; simpl in |- *; - unfold Zle in |- *; simpl in |- *; intros H1; elim H1; - [ assumption | trivial ]. -Qed. +Proof. + unfold valid_hyps, constant_neg in |- *; intros; + generalize (nth_valid ep e i lp); Simplify; simpl in |- *. + rewrite gt_lt_iff in H0; rewrite le_lt_iff; intuition. +Qed. (* \paragraph{[NOT_EXACT_DIVIDE]} *) -Definition not_exact_divide (k1 k2 : Z) (body : term) +Definition not_exact_divide (k1 k2 : int) (body : term) (t i : nat) (l : hyps) := match nth_hyps i l with - | EqTerm (Tint Z0) b => - match - eq_term (scalar_norm_add t (body * Tint k1 + Tint k2)%term) b - with - | true => - match k2 ?= 0 with - | Gt => - match k1 ?= k2 with - | Gt => absurd - | _ => l - end - | _ => l - end - | false => l - end + | EqTerm (Tint Nul) b => + if beq Nul 0 && + eq_term (scalar_norm_add t (body * Tint k1 + Tint k2)%term) b && + bgt k2 0 && + bgt k1 k2 + then absurd + else l | _ => l end. Theorem not_exact_divide_valid : - forall (k1 k2 : Z) (body : term) (t i : nat), + forall (k1 k2 : int) (body : term) (t i : nat), valid_hyps (not_exact_divide k1 k2 body t i). - -unfold valid_hyps, not_exact_divide in |- *; intros; - generalize (nth_valid ep e i lp); Simplify; - elim_eq_term (scalar_norm_add t (body * Tint k1 + Tint k2)%term) t1; - auto; Simplify; intro H2; elim H2; simpl in |- *; - elim (scalar_norm_add_stable t e); simpl in |- *; - intro H4; absurd (interp_term e body * k1 + k2 = 0); - [ apply OMEGA4; assumption | symmetry in |- *; auto ]. - +Proof. + unfold valid_hyps, not_exact_divide in |- *; intros; + generalize (nth_valid ep e i lp); Simplify. + rewrite (scalar_norm_add_stable t e), <-H1. + do 2 rewrite <- scalar_norm_add_stable; simpl in *; intros. + absurd (interp_term e body * k1 + k2 = 0); + [ now apply OMEGA4 | symmetry; auto ]. Qed. (* \paragraph{[O_CONTRADICTION]} *) Definition contradiction (t i j : nat) (l : hyps) := match nth_hyps i l with - | LeqTerm (Tint Z0) b1 => + | LeqTerm (Tint Nul) b1 => match nth_hyps j l with - | LeqTerm (Tint Z0) b2 => + | LeqTerm (Tint Nul') b2 => match fusion_cancel t (b1 + b2)%term with - | Tint k => match 0 ?= k with - | Gt => absurd - | _ => l - end + | Tint k => if beq Nul 0 && beq Nul' 0 && bgt 0 k + then absurd + else l | _ => l end | _ => l @@ -1622,43 +2186,40 @@ Definition contradiction (t i j : nat) (l : hyps) := Theorem contradiction_valid : forall t i j : nat, valid_hyps (contradiction t i j). - -unfold valid_hyps, contradiction in |- *; intros t i j ep e l H; +Proof. + unfold valid_hyps, contradiction in |- *; intros t i j ep e l H; generalize (nth_valid _ _ i _ H); generalize (nth_valid _ _ j _ H); case (nth_hyps i l); auto; intros t1 t2; case t1; - auto; intros z; case z; auto; case (nth_hyps j l); - auto; intros t3 t4; case t3; auto; intros z'; case z'; - auto; simpl in |- *; intros H1 H2; + auto; case (nth_hyps j l); + auto; intros t3 t4; case t3; auto; + simpl in |- *; intros z z' H1 H2; generalize (refl_equal (interp_term e (fusion_cancel t (t2 + t4)%term))); pattern (fusion_cancel t (t2 + t4)%term) at 2 3 in |- *; case (fusion_cancel t (t2 + t4)%term); simpl in |- *; - auto; intro k; elim (fusion_cancel_stable t); simpl in |- *; - intro E; generalize (OMEGA2 _ _ H2 H1); rewrite E; - case k; auto; unfold Zle in |- *; simpl in |- *; intros p H3; - elim H3; auto. - + auto; intro k; elim (fusion_cancel_stable t); simpl in |- *. + Simplify; intro H3. + generalize (OMEGA2 _ _ H2 H1); rewrite H3. + rewrite gt_lt_iff in H0; rewrite le_lt_iff; intuition. Qed. (* \paragraph{[O_NEGATE_CONTRADICT]} *) Definition negate_contradict (i1 i2 : nat) (h : hyps) := match nth_hyps i1 h with - | EqTerm (Tint Z0) b1 => + | EqTerm (Tint Nul) b1 => match nth_hyps i2 h with - | NeqTerm (Tint Z0) b2 => - match eq_term b1 b2 with - | true => absurd - | false => h - end + | NeqTerm (Tint Nul') b2 => + if beq Nul 0 && beq Nul' 0 && eq_term b1 b2 + then absurd + else h | _ => h end - | NeqTerm (Tint Z0) b1 => + | NeqTerm (Tint Nul) b1 => match nth_hyps i2 h with - | EqTerm (Tint Z0) b2 => - match eq_term b1 b2 with - | true => absurd - | false => h - end + | EqTerm (Tint Nul') b2 => + if beq Nul 0 && beq Nul' 0 && eq_term b1 b2 + then absurd + else h | _ => h end | _ => h @@ -1666,22 +2227,22 @@ Definition negate_contradict (i1 i2 : nat) (h : hyps) := Definition negate_contradict_inv (t i1 i2 : nat) (h : hyps) := match nth_hyps i1 h with - | EqTerm (Tint Z0) b1 => + | EqTerm (Tint Nul) b1 => match nth_hyps i2 h with - | NeqTerm (Tint Z0) b2 => - match eq_term b1 (scalar_norm t (b2 * Tint (-1))%term) with - | true => absurd - | false => h - end + | NeqTerm (Tint Nul') b2 => + if beq Nul 0 && beq Nul' 0 && + eq_term b1 (scalar_norm t (b2 * Tint (-(1)))%term) + then absurd + else h | _ => h end - | NeqTerm (Tint Z0) b1 => + | NeqTerm (Tint Nul) b1 => match nth_hyps i2 h with - | EqTerm (Tint Z0) b2 => - match eq_term b1 (scalar_norm t (b2 * Tint (-1))%term) with - | true => absurd - | false => h - end + | EqTerm (Tint Nul') b2 => + if beq Nul 0 && beq Nul' 0 && + eq_term b1 (scalar_norm t (b2 * Tint (-(1)))%term) + then absurd + else h | _ => h end | _ => h @@ -1689,45 +2250,33 @@ Definition negate_contradict_inv (t i1 i2 : nat) (h : hyps) := Theorem negate_contradict_valid : forall i j : nat, valid_hyps (negate_contradict i j). - -unfold valid_hyps, negate_contradict in |- *; intros i j ep e l H; +Proof. + unfold valid_hyps, negate_contradict in |- *; intros i j ep e l H; generalize (nth_valid _ _ i _ H); generalize (nth_valid _ _ j _ H); case (nth_hyps i l); auto; intros t1 t2; case t1; - auto; intros z; case z; auto; case (nth_hyps j l); - auto; intros t3 t4; case t3; auto; intros z'; case z'; - auto; simpl in |- *; intros H1 H2; - [ elim_eq_term t2 t4; intro H3; - [ elim H1; elim H3; assumption | assumption ] - | elim_eq_term t2 t4; intro H3; - [ elim H2; rewrite H3; assumption | assumption ] ]. - + auto; intros z; auto; case (nth_hyps j l); + auto; intros t3 t4; case t3; auto; intros z'; + auto; simpl in |- *; intros H1 H2; Simplify. Qed. Theorem negate_contradict_inv_valid : forall t i j : nat, valid_hyps (negate_contradict_inv t i j). - - -unfold valid_hyps, negate_contradict_inv in |- *; intros t i j ep e l H; +Proof. + unfold valid_hyps, negate_contradict_inv in |- *; intros t i j ep e l H; generalize (nth_valid _ _ i _ H); generalize (nth_valid _ _ j _ H); case (nth_hyps i l); auto; intros t1 t2; case t1; - auto; intros z; case z; auto; case (nth_hyps j l); - auto; intros t3 t4; case t3; auto; intros z'; case z'; - auto; simpl in |- *; intros H1 H2; - (pattern (eq_term t2 (scalar_norm t (t4 * Tint (-1))%term)) in |- *; - apply bool_ind2; intro Aux; - [ generalize (eq_term_true t2 (scalar_norm t (t4 * Tint (-1))%term) Aux); - clear Aux - | generalize (eq_term_false t2 (scalar_norm t (t4 * Tint (-1))%term) Aux); - clear Aux ]); - [ intro H3; elim H1; generalize H2; rewrite H3; - rewrite <- (scalar_norm_stable t e); simpl in |- *; - elim (interp_term e t4); simpl in |- *; auto; intros p H4; - discriminate H4 - | auto - | intro H3; elim H2; rewrite H3; elim (scalar_norm_stable t e); - simpl in |- *; elim H1; simpl in |- *; trivial - | auto ]. - + auto; intros z; auto; case (nth_hyps j l); + auto; intros t3 t4; case t3; auto; intros z'; + auto; simpl in |- *; intros H1 H2; Simplify; + [ + rewrite <- scalar_norm_stable in H2; simpl in *; + elim (mult_integral (interp_term e t4) (-(1))); intuition; + elim minus_one_neq_zero; auto + | + elim H2; clear H2; + rewrite <- scalar_norm_stable; simpl in *; + now rewrite <- H1, mult_0_l + ]. Qed. (* \subsubsection{Tactiques générant une nouvelle équation} *) @@ -1737,150 +2286,93 @@ Qed. preuve un peu compliquée. On utilise quelques lemmes qui sont des généralisations des théorèmes utilisés par OMEGA. *) -Definition sum (k1 k2 : Z) (trace : list t_fusion) +Definition sum (k1 k2 : int) (trace : list t_fusion) (prop1 prop2 : proposition) := match prop1 with - | EqTerm (Tint Z0) b1 => + | EqTerm (Tint Null) b1 => match prop2 with - | EqTerm (Tint Z0) b2 => - EqTerm (Tint 0) (fusion trace (b1 * Tint k1 + b2 * Tint k2)%term) - | LeqTerm (Tint Z0) b2 => - match k2 ?= 0 with - | Gt => - LeqTerm (Tint 0) + | EqTerm (Tint Null') b2 => + if beq Null 0 && beq Null' 0 + then EqTerm (Tint 0) (fusion trace (b1 * Tint k1 + b2 * Tint k2)%term) + else TrueTerm + | LeqTerm (Tint Null') b2 => + if beq Null 0 && beq Null' 0 && bgt k2 0 + then LeqTerm (Tint 0) (fusion trace (b1 * Tint k1 + b2 * Tint k2)%term) - | _ => TrueTerm - end + else TrueTerm | _ => TrueTerm end - | LeqTerm (Tint Z0) b1 => - match k1 ?= 0 with - | Gt => - match prop2 with - | EqTerm (Tint Z0) b2 => + | LeqTerm (Tint Null) b1 => + if beq Null 0 && bgt k1 0 + then match prop2 with + | EqTerm (Tint Null') b2 => + if beq Null' 0 then LeqTerm (Tint 0) (fusion trace (b1 * Tint k1 + b2 * Tint k2)%term) - | LeqTerm (Tint Z0) b2 => - match k2 ?= 0 with - | Gt => - LeqTerm (Tint 0) + else TrueTerm + | LeqTerm (Tint Null') b2 => + if beq Null' 0 && bgt k2 0 + then LeqTerm (Tint 0) (fusion trace (b1 * Tint k1 + b2 * Tint k2)%term) - | _ => TrueTerm - end + else TrueTerm | _ => TrueTerm end - | _ => TrueTerm - end - | NeqTerm (Tint Z0) b1 => + else TrueTerm + | NeqTerm (Tint Null) b1 => match prop2 with - | EqTerm (Tint Z0) b2 => - match eq_Z k1 0 with - | true => TrueTerm - | false => - NeqTerm (Tint 0) - (fusion trace (b1 * Tint k1 + b2 * Tint k2)%term) - end + | EqTerm (Tint Null') b2 => + if beq Null 0 && beq Null' 0 && (negb (beq k1 0)) + then NeqTerm (Tint 0) + (fusion trace (b1 * Tint k1 + b2 * Tint k2)%term) + else TrueTerm | _ => TrueTerm end | _ => TrueTerm end. -Theorem sum1 : forall a b c d : Z, 0 = a -> 0 = b -> 0 = a * c + b * d. - -intros; elim H; elim H0; simpl in |- *; auto. -Qed. - -Theorem sum2 : - forall a b c d : Z, 0 <= d -> 0 = a -> 0 <= b -> 0 <= a * c + b * d. - -intros; elim H0; simpl in |- *; generalize H H1; case b; case d; - unfold Zle in |- *; simpl in |- *; auto. -Qed. - -Theorem sum3 : - forall a b c d : Z, - 0 <= c -> 0 <= d -> 0 <= a -> 0 <= b -> 0 <= a * c + b * d. - -intros a b c d; case a; case b; case c; case d; unfold Zle in |- *; - simpl in |- *; auto. -Qed. - -Theorem sum4 : forall k : Z, (k ?= 0) = Gt -> 0 <= k. - -intro; case k; unfold Zle in |- *; simpl in |- *; auto; intros; discriminate. -Qed. - -Theorem sum5 : - forall a b c d : Z, c <> 0 -> 0 <> a -> 0 = b -> 0 <> a * c + b * d. - -intros a b c d H1 H2 H3; elim H3; simpl in |- *; rewrite Zplus_comm; - simpl in |- *; generalize H1 H2; case a; case c; simpl in |- *; - intros; try discriminate; assumption. -Qed. - Theorem sum_valid : - forall (k1 k2 : Z) (t : list t_fusion), valid2 (sum k1 k2 t). - -unfold valid2 in |- *; intros k1 k2 t ep e p1 p2; unfold sum in |- *; + forall (k1 k2 : int) (t : list t_fusion), valid2 (sum k1 k2 t). +Proof. + unfold valid2 in |- *; intros k1 k2 t ep e p1 p2; unfold sum in |- *; Simplify; simpl in |- *; auto; try elim (fusion_stable t); simpl in |- *; intros; [ apply sum1; assumption | apply sum2; try assumption; apply sum4; assumption - | rewrite Zplus_comm; apply sum2; try assumption; apply sum4; assumption + | rewrite plus_comm; apply sum2; try assumption; apply sum4; assumption | apply sum3; try assumption; apply sum4; assumption - | elim_eq_Z k1 0; simpl in |- *; auto; elim (fusion_stable t); simpl in |- *; - intros; unfold Zne in |- *; apply sum5; assumption ]. + | apply sum5; auto ]. Qed. (* \paragraph{[O_EXACT_DIVIDE]} c'est une oper1 valide mais on préfère une substitution a ce point la *) -Definition exact_divide (k : Z) (body : term) (t : nat) +Definition exact_divide (k : int) (body : term) (t : nat) (prop : proposition) := match prop with - | EqTerm (Tint Z0) b => - match eq_term (scalar_norm t (body * Tint k)%term) b with - | true => - match eq_Z k 0 with - | true => TrueTerm - | false => EqTerm (Tint 0) body - end - | false => TrueTerm - end - | NeqTerm (Tint Z0) b => - match eq_term (scalar_norm t (body * Tint k)%term) b with - | true => - match eq_Z k 0 with - | true => FalseTerm - | false => NeqTerm (Tint 0) body - end - | false => TrueTerm - end + | EqTerm (Tint Null) b => + if beq Null 0 && + eq_term (scalar_norm t (body * Tint k)%term) b && + negb (beq k 0) + then EqTerm (Tint 0) body + else TrueTerm + | NeqTerm (Tint Null) b => + if beq Null 0 && + eq_term (scalar_norm t (body * Tint k)%term) b && + negb (beq k 0) + then NeqTerm (Tint 0) body + else TrueTerm | _ => TrueTerm end. Theorem exact_divide_valid : - forall (k : Z) (t : term) (n : nat), valid1 (exact_divide k t n). - - -unfold valid1, exact_divide in |- *; intros k1 k2 t ep e p1; Simplify; - simpl in |- *; auto; elim_eq_term (scalar_norm t (k2 * Tint k1)%term) t1; - simpl in |- *; auto; elim_eq_Z k1 0; simpl in |- *; - auto; intros H1 H2; elim H2; elim scalar_norm_stable; - simpl in |- *; - [ - generalize H1; case (interp_term e k2); - try trivial; - (case k1; simpl in |- *; - [ intros; absurd (0 = 0); assumption - | intros p2 p3 H3 H4; discriminate H4 - | intros p2 p3 H3 H4; discriminate H4 ]) - | - subst k1; rewrite Zmult_comm; simpl in *; intros; absurd (0=0); trivial - | - generalize H1; case (interp_term e k2); - try trivial; intros p2 p3 H3 H4; discriminate H4 + forall (k : int) (t : term) (n : nat), valid1 (exact_divide k t n). +Proof. + unfold valid1, exact_divide in |- *; intros k1 k2 t ep e p1; + Simplify; simpl; auto; subst; + rewrite <- scalar_norm_stable; simpl; intros; + [ destruct (mult_integral _ _ (sym_eq H0)); intuition + | contradict H0; rewrite <- H0, mult_0_l; auto ]. Qed. @@ -1889,61 +2381,51 @@ Qed. La preuve reprend le schéma de la précédente mais on est sur une opération de type valid1 et non sur une opération terminale. *) -Definition divide_and_approx (k1 k2 : Z) (body : term) +Definition divide_and_approx (k1 k2 : int) (body : term) (t : nat) (prop : proposition) := match prop with - | LeqTerm (Tint Z0) b => - match - eq_term (scalar_norm_add t (body * Tint k1 + Tint k2)%term) b - with - | true => - match k1 ?= 0 with - | Gt => - match k1 ?= k2 with - | Gt => LeqTerm (Tint 0) body - | _ => prop - end - | _ => prop - end - | false => prop - end + | LeqTerm (Tint Null) b => + if beq Null 0 && + eq_term (scalar_norm_add t (body * Tint k1 + Tint k2)%term) b && + bgt k1 0 && + bgt k1 k2 + then LeqTerm (Tint 0) body + else prop | _ => prop end. Theorem divide_and_approx_valid : - forall (k1 k2 : Z) (body : term) (t : nat), + forall (k1 k2 : int) (body : term) (t : nat), valid1 (divide_and_approx k1 k2 body t). - -unfold valid1, divide_and_approx in |- *; intros k1 k2 body t ep e p1; - Simplify; - elim_eq_term (scalar_norm_add t (body * Tint k1 + Tint k2)%term) t1; - Simplify; auto; intro E; elim E; simpl in |- *; - elim (scalar_norm_add_stable t e); simpl in |- *; - intro H1; apply Zmult_le_approx with (3 := H1); assumption. +Proof. + unfold valid1, divide_and_approx in |- *; intros k1 k2 body t ep e p1; + Simplify; simpl; auto; subst; + elim (scalar_norm_add_stable t e); simpl in |- *. + intro H2; apply mult_le_approx with (3 := H2); assumption. Qed. (* \paragraph{[MERGE_EQ]} *) Definition merge_eq (t : nat) (prop1 prop2 : proposition) := match prop1 with - | LeqTerm (Tint Z0) b1 => + | LeqTerm (Tint Null) b1 => match prop2 with - | LeqTerm (Tint Z0) b2 => - match eq_term b1 (scalar_norm t (b2 * Tint (-1))%term) with - | true => EqTerm (Tint 0) b1 - | false => TrueTerm - end + | LeqTerm (Tint Null') b2 => + if beq Null 0 && beq Null' 0 && + eq_term b1 (scalar_norm t (b2 * Tint (-(1)))%term) + then EqTerm (Tint 0) b1 + else TrueTerm | _ => TrueTerm end | _ => TrueTerm end. Theorem merge_eq_valid : forall n : nat, valid2 (merge_eq n). - -unfold valid2, merge_eq in |- *; intros n ep e p1 p2; Simplify; simpl in |- *; +Proof. + unfold valid2, merge_eq in |- *; intros n ep e p1 p2; Simplify; simpl in |- *; auto; elim (scalar_norm_stable n e); simpl in |- *; intros; symmetry in |- *; apply OMEGA8 with (2 := H0); - [ assumption | elim Zopp_eq_mult_neg_1; trivial ]. + [ assumption | elim opp_eq_mult_neg_1; trivial ]. Qed. @@ -1952,36 +2434,39 @@ Qed. Definition constant_nul (i : nat) (h : hyps) := match nth_hyps i h with - | NeqTerm (Tint Z0) (Tint Z0) => absurd + | NeqTerm (Tint Null) (Tint Null') => + if beq Null Null' then absurd else h | _ => h end. Theorem constant_nul_valid : forall i : nat, valid_hyps (constant_nul i). - -unfold valid_hyps, constant_nul in |- *; intros; +Proof. + unfold valid_hyps, constant_nul in |- *; intros; generalize (nth_valid ep e i lp); Simplify; simpl in |- *; - unfold Zne in |- *; intro H1; absurd (0 = 0); auto. + intro H1; absurd (0 = 0); intuition. Qed. (* \paragraph{[O_STATE]} *) -Definition state (m : Z) (s : step) (prop1 prop2 : proposition) := +Definition state (m : int) (s : step) (prop1 prop2 : proposition) := match prop1 with - | EqTerm (Tint Z0) b1 => + | EqTerm (Tint Null) b1 => match prop2 with | EqTerm b2 b3 => - EqTerm (Tint 0) (rewrite s (b1 + (- b3 + b2) * Tint m)%term) + if beq Null 0 + then EqTerm (Tint 0) (rewrite s (b1 + (- b3 + b2) * Tint m)%term) + else TrueTerm | _ => TrueTerm end | _ => TrueTerm end. -Theorem state_valid : forall (m : Z) (s : step), valid2 (state m s). - -unfold valid2 in |- *; intros m s ep e p1 p2; unfold state in |- *; Simplify; +Theorem state_valid : forall (m : int) (s : step), valid2 (state m s). +Proof. + unfold valid2 in |- *; intros m s ep e p1 p2; unfold state in |- *; Simplify; simpl in |- *; auto; elim (rewrite_stable s e); simpl in |- *; intros H1 H2; elim H1. - rewrite H2; rewrite Zplus_opp_l; simpl; reflexivity. + now rewrite H2, plus_opp_l, plus_0_l, mult_0_l. Qed. (* \subsubsection{Tactiques générant plusieurs but} @@ -1991,11 +2476,13 @@ Qed. Definition split_ineq (i t : nat) (f1 f2 : hyps -> lhyps) (l : hyps) := match nth_hyps i l with - | NeqTerm (Tint Z0) b1 => - f1 (LeqTerm (Tint 0) (add_norm t (b1 + Tint (-1))%term) :: l) ++ + | NeqTerm (Tint Null) b1 => + if beq Null 0 then + f1 (LeqTerm (Tint 0) (add_norm t (b1 + Tint (-(1)))%term) :: l) ++ f2 (LeqTerm (Tint 0) - (scalar_norm_add t (b1 * Tint (-1) + Tint (-1))%term) :: l) + (scalar_norm_add t (b1 * Tint (-(1)) + Tint (-(1)))%term) :: l) + else l :: nil | _ => l :: nil end. @@ -2003,17 +2490,18 @@ Theorem split_ineq_valid : forall (i t : nat) (f1 f2 : hyps -> lhyps), valid_list_hyps f1 -> valid_list_hyps f2 -> valid_list_hyps (split_ineq i t f1 f2). - -unfold valid_list_hyps, split_ineq in |- *; intros i t f1 f2 H1 H2 ep e lp H; +Proof. + unfold valid_list_hyps, split_ineq in |- *; intros i t f1 f2 H1 H2 ep e lp H; generalize (nth_valid _ _ i _ H); case (nth_hyps i lp); simpl in |- *; auto; intros t1 t2; case t1; simpl in |- *; - auto; intros z; case z; simpl in |- *; auto; intro H3; + auto; intros z; simpl in |- *; auto; intro H3. + Simplify. apply append_valid; elim (OMEGA19 (interp_term e t2)); [ intro H4; left; apply H1; simpl in |- *; elim (add_norm_stable t); simpl in |- *; auto | intro H4; right; apply H2; simpl in |- *; elim (scalar_norm_add_stable t); simpl in |- *; auto - | generalize H3; unfold Zne, not in |- *; intros E1 E2; apply E1; + | generalize H3; unfold not in |- *; intros E1 E2; apply E1; symmetry in |- *; trivial ]. Qed. @@ -2046,8 +2534,8 @@ Fixpoint execute_omega (t : t_omega) (l : hyps) {struct t} : lhyps := end. Theorem omega_valid : forall t : t_omega, valid_list_hyps (execute_omega t). - -simple induction t; simpl in |- *; +Proof. + simple induction t; simpl in |- *; [ unfold valid_list_hyps in |- *; simpl in |- *; intros; left; apply (constant_not_nul_valid n ep e lp H) | unfold valid_list_hyps in |- *; simpl in |- *; intros; left; @@ -2058,7 +2546,7 @@ simple induction t; simpl in |- *; (apply_oper_1_valid m (divide_and_approx k1 k2 body n) (divide_and_approx_valid k1 k2 body n) ep e lp H) | unfold valid_list_hyps in |- *; simpl in |- *; intros; left; - apply (not_exact_divide_valid z z0 t0 n n0 ep e lp H) + apply (not_exact_divide_valid i i0 t0 n n0 ep e lp H) | unfold valid_list_hyps, valid_hyps in |- *; intros k body n t' Ht' m ep e lp H; apply Ht'; apply @@ -2101,36 +2589,30 @@ Definition move_right (s : step) (p : proposition) := | EqTerm t1 t2 => EqTerm (Tint 0) (rewrite s (t1 + - t2)%term) | LeqTerm t1 t2 => LeqTerm (Tint 0) (rewrite s (t2 + - t1)%term) | GeqTerm t1 t2 => LeqTerm (Tint 0) (rewrite s (t1 + - t2)%term) - | LtTerm t1 t2 => LeqTerm (Tint 0) (rewrite s (t2 + Tint (-1) + - t1)%term) - | GtTerm t1 t2 => LeqTerm (Tint 0) (rewrite s (t1 + Tint (-1) + - t2)%term) + | LtTerm t1 t2 => LeqTerm (Tint 0) (rewrite s (t2 + Tint (-(1)) + - t1)%term) + | GtTerm t1 t2 => LeqTerm (Tint 0) (rewrite s (t1 + Tint (-(1)) + - t2)%term) | NeqTerm t1 t2 => NeqTerm (Tint 0) (rewrite s (t1 + - t2)%term) | p => p end. -Theorem Zne_left_2 : forall x y : Z, Zne x y -> Zne 0 (x + - y). -unfold Zne, not in |- *; intros x y H1 H2; apply H1; - apply (Zplus_reg_l (- y)); rewrite Zplus_comm; elim H2; - rewrite Zplus_opp_l; trivial. -Qed. - Theorem move_right_valid : forall s : step, valid1 (move_right s). - -unfold valid1, move_right in |- *; intros s ep e p; Simplify; simpl in |- *; +Proof. + unfold valid1, move_right in |- *; intros s ep e p; Simplify; simpl in |- *; elim (rewrite_stable s e); simpl in |- *; - [ symmetry in |- *; apply Zegal_left; assumption - | intro; apply Zle_left; assumption - | intro; apply Zge_left; assumption - | intro; apply Zgt_left; assumption - | intro; apply Zlt_left; assumption - | intro; apply Zne_left_2; assumption ]. + [ symmetry in |- *; apply egal_left; assumption + | intro; apply le_left; assumption + | intro; apply le_left; rewrite <- ge_le_iff; assumption + | intro; apply lt_left; rewrite <- gt_lt_iff; assumption + | intro; apply lt_left; assumption + | intro; apply ne_left_2; assumption ]. Qed. Definition do_normalize (i : nat) (s : step) := apply_oper_1 i (move_right s). Theorem do_normalize_valid : forall (i : nat) (s : step), valid_hyps (do_normalize i s). - -intros; unfold do_normalize in |- *; apply apply_oper_1_valid; +Proof. + intros; unfold do_normalize in |- *; apply apply_oper_1_valid; apply move_right_valid. Qed. @@ -2143,43 +2625,40 @@ Fixpoint do_normalize_list (l : list step) (i : nat) Theorem do_normalize_list_valid : forall (l : list step) (i : nat), valid_hyps (do_normalize_list l i). - -simple induction l; simpl in |- *; unfold valid_hyps in |- *; +Proof. + simple induction l; simpl in |- *; unfold valid_hyps in |- *; [ auto | intros a l' Hl' i ep e lp H; unfold valid_hyps in Hl'; apply Hl'; apply (do_normalize_valid i a ep e lp); assumption ]. Qed. Theorem normalize_goal : - forall (s : list step) (ep : PropList) (env : list Z) (l : hyps), + forall (s : list step) (ep : list Prop) (env : list int) (l : hyps), interp_goal ep env (do_normalize_list s 0 l) -> interp_goal ep env l. - -intros; apply valid_goal with (2 := H); apply do_normalize_list_valid. +Proof. + intros; apply valid_goal with (2 := H); apply do_normalize_list_valid. Qed. (* \subsubsection{Exécution de la trace} *) Theorem execute_goal : - forall (t : t_omega) (ep : PropList) (env : list Z) (l : hyps), + forall (t : t_omega) (ep : list Prop) (env : list int) (l : hyps), interp_list_goal ep env (execute_omega t l) -> interp_goal ep env l. - -intros; apply (goal_valid (execute_omega t) (omega_valid t) ep env l H). +Proof. + intros; apply (goal_valid (execute_omega t) (omega_valid t) ep env l H). Qed. Theorem append_goal : - forall (ep : PropList) (e : list Z) (l1 l2 : lhyps), + forall (ep : list Prop) (e : list int) (l1 l2 : lhyps), interp_list_goal ep e l1 /\ interp_list_goal ep e l2 -> interp_list_goal ep e (l1 ++ l2). - -intros ep e; simple induction l1; +Proof. + intros ep e; simple induction l1; [ simpl in |- *; intros l2 (H1, H2); assumption | simpl in |- *; intros h1 t1 HR l2 ((H1, H2), H3); split; auto ]. - Qed. -Require Import Decidable. - (* A simple decidability checker : if the proposition belongs to the simple grammar describe below then it is decidable. Proof is by induction and uses well known theorem about arithmetic and propositional @@ -2203,30 +2682,29 @@ Fixpoint decidability (p : proposition) : bool := end. Theorem decidable_correct : - forall (ep : PropList) (e : list Z) (p : proposition), + forall (ep : list Prop) (e : list int) (p : proposition), decidability p = true -> decidable (interp_proposition ep e p). - -simple induction p; simpl in |- *; intros; +Proof. + simple induction p; simpl in |- *; intros; [ apply dec_eq - | apply dec_Zle + | apply dec_le | left; auto | right; unfold not in |- *; auto | apply dec_not; auto - | apply dec_Zge - | apply dec_Zgt - | apply dec_Zlt - | apply dec_Zne + | apply dec_ge + | apply dec_gt + | apply dec_lt + | apply dec_ne | apply dec_or; elim andb_prop with (1 := H1); auto | apply dec_and; elim andb_prop with (1 := H1); auto | apply dec_imp; elim andb_prop with (1 := H1); auto | discriminate H ]. - Qed. (* An interpretation function for a complete goal with an explicit conclusion. We use an intermediate fixpoint. *) -Fixpoint interp_full_goal (envp : PropList) (env : list Z) +Fixpoint interp_full_goal (envp : list Prop) (env : list int) (c : proposition) (l : hyps) {struct l} : Prop := match l with | nil => interp_proposition envp env c @@ -2234,7 +2712,7 @@ Fixpoint interp_full_goal (envp : PropList) (env : list Z) interp_proposition envp env p' -> interp_full_goal envp env c l' end. -Definition interp_full (ep : PropList) (e : list Z) +Definition interp_full (ep : list Prop) (e : list int) (lc : hyps * proposition) : Prop := match lc with | (l, c) => interp_full_goal ep e c l @@ -2244,12 +2722,11 @@ Definition interp_full (ep : PropList) (e : list Z) of its hypothesis and conclusion *) Theorem interp_full_false : - forall (ep : PropList) (e : list Z) (l : hyps) (c : proposition), + forall (ep : list Prop) (e : list int) (l : hyps) (c : proposition), (interp_hyps ep e l -> interp_proposition ep e c) -> interp_full ep e (l, c). - -simple induction l; unfold interp_full in |- *; simpl in |- *; +Proof. + simple induction l; unfold interp_full in |- *; simpl in |- *; [ auto | intros a l1 H1 c H2 H3; apply H1; auto ]. - Qed. (* Push the conclusion in the list of hypothesis using a double negation @@ -2265,11 +2742,11 @@ Definition to_contradict (lc : hyps * proposition) := hypothesis implies the original goal *) Theorem to_contradict_valid : - forall (ep : PropList) (e : list Z) (lc : hyps * proposition), + forall (ep : list Prop) (e : list int) (lc : hyps * proposition), interp_goal ep e (to_contradict lc) -> interp_full ep e lc. - -intros ep e lc; case lc; intros l c; simpl in |- *; - pattern (decidability c) in |- *; apply bool_ind2; +Proof. + intros ep e lc; case lc; intros l c; simpl in |- *; + pattern (decidability c) in |- *; apply bool_eq_ind; [ simpl in |- *; intros H H1; apply interp_full_false; intros H2; apply not_not; [ apply decidable_correct; assumption @@ -2333,19 +2810,19 @@ Fixpoint destructure_hyps (nn : nat) (ll : hyps) {struct nn} : lhyps := end. Theorem map_cons_val : - forall (ep : PropList) (e : list Z) (p : proposition) (l : lhyps), + forall (ep : list Prop) (e : list int) (p : proposition) (l : lhyps), interp_proposition ep e p -> interp_list_hyps ep e l -> interp_list_hyps ep e (map_cons _ p l). - -simple induction l; simpl in |- *; [ auto | intros; elim H1; intro H2; auto ]. +Proof. + simple induction l; simpl in |- *; [ auto | intros; elim H1; intro H2; auto ]. Qed. Hint Resolve map_cons_val append_valid decidable_correct. Theorem destructure_hyps_valid : forall n : nat, valid_list_hyps (destructure_hyps n). - -simple induction n; +Proof. + simple induction n; [ unfold valid_list_hyps in |- *; simpl in |- *; auto | unfold valid_list_hyps at 2 in |- *; intros n1 H ep e lp; case lp; [ simpl in |- *; auto @@ -2358,7 +2835,7 @@ simple induction n; (simpl in |- *; intros; apply map_cons_val; simpl in |- *; elim H0; auto); [ simpl in |- *; intros p1 (H1, H2); - pattern (decidability p1) in |- *; apply bool_ind2; + pattern (decidability p1) in |- *; apply bool_eq_ind; intro H3; [ apply H; simpl in |- *; split; [ apply not_not; auto | assumption ] @@ -2366,7 +2843,7 @@ simple induction n; | simpl in |- *; intros p1 p2 (H1, H2); apply H; simpl in |- *; elim not_or with (1 := H1); auto | simpl in |- *; intros p1 p2 (H1, H2); - pattern (decidability p1) in |- *; apply bool_ind2; + pattern (decidability p1) in |- *; apply bool_eq_ind; intro H3; [ apply append_valid; elim not_and with (2 := H1); [ intro; left; apply H; simpl in |- *; auto @@ -2378,18 +2855,17 @@ simple induction n; apply H; simpl in |- *; auto | simpl in |- *; intros; apply H; simpl in |- *; tauto | simpl in |- *; intros p1 p2 (H1, H2); - pattern (decidability p1) in |- *; apply bool_ind2; + pattern (decidability p1) in |- *; apply bool_eq_ind; intro H3; [ apply append_valid; elim imp_simp with (2 := H1); [ intro H4; left; simpl in |- *; apply H; simpl in |- *; auto | intro H4; right; simpl in |- *; apply H; simpl in |- *; auto | auto ] | auto ] ] ] ]. - Qed. Definition prop_stable (f : proposition -> proposition) := - forall (ep : PropList) (e : list Z) (p : proposition), + forall (ep : list Prop) (e : list int) (p : proposition), interp_proposition ep e p <-> interp_proposition ep e (f p). Definition p_apply_left (f : proposition -> proposition) @@ -2405,8 +2881,8 @@ Definition p_apply_left (f : proposition -> proposition) Theorem p_apply_left_stable : forall f : proposition -> proposition, prop_stable f -> prop_stable (p_apply_left f). - -unfold prop_stable in |- *; intros f H ep e p; split; +Proof. + unfold prop_stable in |- *; intros f H ep e p; split; (case p; simpl in |- *; auto; intros p1; elim (H ep e p1); tauto). Qed. @@ -2423,8 +2899,8 @@ Definition p_apply_right (f : proposition -> proposition) Theorem p_apply_right_stable : forall f : proposition -> proposition, prop_stable f -> prop_stable (p_apply_right f). - -unfold prop_stable in |- *; intros f H ep e p; split; +Proof. + unfold prop_stable in |- *; intros f H ep e p; split; (case p; simpl in |- *; auto; [ intros p1; elim (H ep e p1); tauto | intros p1 p2; elim (H ep e p2); tauto @@ -2447,67 +2923,55 @@ Definition p_invert (f : proposition -> proposition) Theorem p_invert_stable : forall f : proposition -> proposition, prop_stable f -> prop_stable (p_invert f). - -unfold prop_stable in |- *; intros f H ep e p; split; +Proof. + unfold prop_stable in |- *; intros f H ep e p; split; (case p; simpl in |- *; auto; [ intros t1 t2; elim (H ep e (NeqTerm t1 t2)); simpl in |- *; - unfold Zne in |- *; generalize (dec_eq (interp_term e t1) (interp_term e t2)); unfold decidable in |- *; tauto | intros t1 t2; elim (H ep e (GtTerm t1 t2)); simpl in |- *; - unfold Zgt in |- *; - generalize (dec_Zgt (interp_term e t1) (interp_term e t2)); - unfold decidable, Zgt, Zle in |- *; tauto + generalize (dec_gt (interp_term e t1) (interp_term e t2)); + unfold decidable in |- *; rewrite le_lt_iff, <- gt_lt_iff; tauto | intros t1 t2; elim (H ep e (LtTerm t1 t2)); simpl in |- *; - unfold Zlt in |- *; - generalize (dec_Zlt (interp_term e t1) (interp_term e t2)); - unfold decidable, Zge in |- *; tauto + generalize (dec_lt (interp_term e t1) (interp_term e t2)); + unfold decidable in |- *; rewrite ge_le_iff, le_lt_iff; tauto | intros t1 t2; elim (H ep e (LeqTerm t1 t2)); simpl in |- *; - generalize (dec_Zgt (interp_term e t1) (interp_term e t2)); - unfold Zle, Zgt in |- *; unfold decidable in |- *; - tauto + generalize (dec_gt (interp_term e t1) (interp_term e t2)); + unfold decidable in |- *; repeat rewrite le_lt_iff; + repeat rewrite gt_lt_iff; tauto | intros t1 t2; elim (H ep e (GeqTerm t1 t2)); simpl in |- *; - generalize (dec_Zlt (interp_term e t1) (interp_term e t2)); - unfold Zge, Zlt in |- *; unfold decidable in |- *; - tauto + generalize (dec_lt (interp_term e t1) (interp_term e t2)); + unfold decidable in |- *; repeat rewrite ge_le_iff; + repeat rewrite le_lt_iff; tauto | intros t1 t2; elim (H ep e (EqTerm t1 t2)); simpl in |- *; generalize (dec_eq (interp_term e t1) (interp_term e t2)); - unfold decidable, Zne in |- *; tauto ]). -Qed. - -Theorem Zlt_left_inv : forall x y : Z, 0 <= y + -1 + - x -> x < y. - -intros; apply Zsucc_lt_reg; apply Zle_lt_succ; - apply (fun a b : Z => Zplus_le_reg_r a b (-1 + - x)); - rewrite Zplus_assoc; unfold Zsucc in |- *; rewrite (Zplus_assoc_reverse x); - rewrite (Zplus_assoc y); simpl in |- *; rewrite Zplus_0_r; - rewrite Zplus_opp_r; assumption. + unfold decidable; tauto ]). Qed. Theorem move_right_stable : forall s : step, prop_stable (move_right s). - -unfold move_right, prop_stable in |- *; intros s ep e p; split; +Proof. + unfold move_right, prop_stable in |- *; intros s ep e p; split; [ Simplify; simpl in |- *; elim (rewrite_stable s e); simpl in |- *; - [ symmetry in |- *; apply Zegal_left; assumption - | intro; apply Zle_left; assumption - | intro; apply Zge_left; assumption - | intro; apply Zgt_left; assumption - | intro; apply Zlt_left; assumption - | intro; apply Zne_left_2; assumption ] + [ symmetry in |- *; apply egal_left; assumption + | intro; apply le_left; assumption + | intro; apply le_left; rewrite <- ge_le_iff; assumption + | intro; apply lt_left; rewrite <- gt_lt_iff; assumption + | intro; apply lt_left; assumption + | intro; apply ne_left_2; assumption ] | case p; simpl in |- *; intros; auto; generalize H; elim (rewrite_stable s); simpl in |- *; intro H1; - [ rewrite (Zplus_0_r_reverse (interp_term e t0)); rewrite H1; - rewrite Zplus_permute; rewrite Zplus_opp_r; - rewrite Zplus_0_r; trivial - | apply (fun a b : Z => Zplus_le_reg_r a b (- interp_term e t)); - rewrite Zplus_opp_r; assumption - | apply Zle_ge; - apply (fun a b : Z => Zplus_le_reg_r a b (- interp_term e t0)); - rewrite Zplus_opp_r; assumption - | apply Zlt_gt; apply Zlt_left_inv; assumption - | apply Zlt_left_inv; assumption - | unfold Zne, not in |- *; unfold Zne in H1; intro H2; apply H1; - rewrite H2; rewrite Zplus_opp_r; trivial ] ]. + [ rewrite (plus_0_r_reverse (interp_term e t0)); rewrite H1; + rewrite plus_permute; rewrite plus_opp_r; + rewrite plus_0_r; trivial + | apply (fun a b => plus_le_reg_r a b (- interp_term e t)); + rewrite plus_opp_r; assumption + | rewrite ge_le_iff; + apply (fun a b => plus_le_reg_r a b (- interp_term e t0)); + rewrite plus_opp_r; assumption + | rewrite gt_lt_iff; apply lt_left_inv; assumption + | apply lt_left_inv; assumption + | unfold not in |- *; intro H2; apply H1; + rewrite H2; rewrite plus_opp_r; trivial ] ]. Qed. @@ -2521,9 +2985,8 @@ Fixpoint p_rewrite (s : p_step) : proposition -> proposition := end. Theorem p_rewrite_stable : forall s : p_step, prop_stable (p_rewrite s). - - -simple induction s; simpl in |- *; +Proof. + simple induction s; simpl in |- *; [ intros; apply p_apply_left_stable; trivial | intros; apply p_apply_right_stable; trivial | intros; apply p_invert_stable; apply move_right_stable @@ -2539,8 +3002,8 @@ Fixpoint normalize_hyps (l : list h_step) (lh : hyps) {struct l} : hyps := Theorem normalize_hyps_valid : forall l : list h_step, valid_hyps (normalize_hyps l). - -simple induction l; unfold valid_hyps in |- *; simpl in |- *; +Proof. + simple induction l; unfold valid_hyps in |- *; simpl in |- *; [ auto | intros n_s r; case n_s; intros n s H ep e lp H1; apply H; apply apply_oper_1_valid; @@ -2550,10 +3013,10 @@ simple induction l; unfold valid_hyps in |- *; simpl in |- *; Qed. Theorem normalize_hyps_goal : - forall (s : list h_step) (ep : PropList) (env : list Z) (l : hyps), + forall (s : list h_step) (ep : list Prop) (env : list int) (l : hyps), interp_goal ep env (normalize_hyps s l) -> interp_goal ep env l. - -intros; apply valid_goal with (2 := H); apply normalize_hyps_valid. +Proof. + intros; apply valid_goal with (2 := H); apply normalize_hyps_valid. Qed. Fixpoint extract_hyp_pos (s : list direction) (p : proposition) {struct s} : @@ -2604,18 +3067,18 @@ Fixpoint extract_hyp_pos (s : list direction) (p : proposition) {struct s} : end. Definition co_valid1 (f : proposition -> proposition) := - forall (ep : PropList) (e : list Z) (p1 : proposition), + forall (ep : list Prop) (e : list int) (p1 : proposition), interp_proposition ep e (Tnot p1) -> interp_proposition ep e (f p1). Theorem extract_valid : forall s : list direction, valid1 (extract_hyp_pos s) /\ co_valid1 (extract_hyp_neg s). - -unfold valid1, co_valid1 in |- *; simple induction s; +Proof. + unfold valid1, co_valid1 in |- *; simple induction s; [ split; [ simpl in |- *; auto | intros ep e p1; case p1; simpl in |- *; auto; intro p; - pattern (decidability p) in |- *; apply bool_ind2; + pattern (decidability p) in |- *; apply bool_eq_ind; [ intro H; generalize (decidable_correct ep e p H); unfold decidable in |- *; tauto | simpl in |- *; auto ] ] @@ -2623,12 +3086,11 @@ unfold valid1, co_valid1 in |- *; simple induction s; case p; auto; simpl in |- *; intros; (apply H1; tauto) || (apply H2; tauto) || - (pattern (decidability p0) in |- *; apply bool_ind2; + (pattern (decidability p0) in |- *; apply bool_eq_ind; [ intro H3; generalize (decidable_correct ep e p0 H3); unfold decidable in |- *; intro H4; apply H1; tauto | intro; tauto ]) ]. - Qed. Fixpoint decompose_solve (s : e_step) (h : hyps) {struct s} : lhyps := @@ -2655,13 +3117,13 @@ Fixpoint decompose_solve (s : e_step) (h : hyps) {struct s} : lhyps := Theorem decompose_solve_valid : forall s : e_step, valid_list_goal (decompose_solve s). - -intro s; apply goal_valid; unfold valid_list_hyps in |- *; elim s; +Proof. + intro s; apply goal_valid; unfold valid_list_hyps in |- *; elim s; simpl in |- *; intros; [ cut (interp_proposition ep e1 (extract_hyp_pos l (nth_hyps n lp))); [ case (extract_hyp_pos l (nth_hyps n lp)); simpl in |- *; auto; [ intro p; case p; simpl in |- *; auto; intros p1 p2 H2; - pattern (decidability p1) in |- *; apply bool_ind2; + pattern (decidability p1) in |- *; apply bool_eq_ind; [ intro H3; generalize (decidable_correct ep e1 p1 H3); intro H4; apply append_valid; elim H4; intro H5; [ right; apply H0; simpl in |- *; tauto @@ -2671,7 +3133,7 @@ intro s; apply goal_valid; unfold valid_list_hyps in |- *; elim s; [ intros H3; left; apply H; simpl in |- *; auto | intros H3; right; apply H0; simpl in |- *; auto ] | intros p1 p2 H2; - pattern (decidability p1) in |- *; apply bool_ind2; + pattern (decidability p1) in |- *; apply bool_eq_ind; [ intro H3; generalize (decidable_correct ep e1 p1 H3); intro H4; apply append_valid; elim H4; intro H5; [ right; apply H0; simpl in |- *; tauto @@ -2687,7 +3149,7 @@ Qed. (* \subsection{La dernière étape qui élimine tous les séquents inutiles} *) Definition valid_lhyps (f : lhyps -> lhyps) := - forall (ep : PropList) (e : list Z) (lp : lhyps), + forall (ep : list Prop) (e : list int) (lp : lhyps), interp_list_hyps ep e lp -> interp_list_hyps ep e (f lp). Fixpoint reduce_lhyps (lp : lhyps) : lhyps := @@ -2698,8 +3160,8 @@ Fixpoint reduce_lhyps (lp : lhyps) : lhyps := end. Theorem reduce_lhyps_valid : valid_lhyps reduce_lhyps. - -unfold valid_lhyps in |- *; intros ep e lp; elim lp; +Proof. + unfold valid_lhyps in |- *; intros ep e lp; elim lp; [ simpl in |- *; auto | intros a l HR; elim a; [ simpl in |- *; tauto @@ -2707,10 +3169,10 @@ unfold valid_lhyps in |- *; intros ep e lp; elim lp; Qed. Theorem do_reduce_lhyps : - forall (envp : PropList) (env : list Z) (l : lhyps), + forall (envp : list Prop) (env : list int) (l : lhyps), interp_list_goal envp env (reduce_lhyps l) -> interp_list_goal envp env l. - -intros envp env l H; apply list_goal_to_hyps; intro H1; +Proof. + intros envp env l H; apply list_goal_to_hyps; intro H1; apply list_hyps_to_goal with (1 := H); apply reduce_lhyps_valid; assumption. Qed. @@ -2719,13 +3181,13 @@ Definition concl_to_hyp (p : proposition) := if decidability p then Tnot p else TrueTerm. Definition do_concl_to_hyp : - forall (envp : PropList) (env : list Z) (c : proposition) (l : hyps), + forall (envp : list Prop) (env : list int) (c : proposition) (l : hyps), interp_goal envp env (concl_to_hyp c :: l) -> interp_goal_concl c envp env l. - -simpl in |- *; intros envp env c l; induction l as [| a l Hrecl]; +Proof. + simpl in |- *; intros envp env c l; induction l as [| a l Hrecl]; [ simpl in |- *; unfold concl_to_hyp in |- *; - pattern (decidability c) in |- *; apply bool_ind2; + pattern (decidability c) in |- *; apply bool_eq_ind; [ intro H; generalize (decidable_correct envp env c H); unfold decidable in |- *; simpl in |- *; tauto | simpl in |- *; intros H1 H2; elim H2; trivial ] @@ -2737,12 +3199,19 @@ Definition omega_tactic (t1 : e_step) (t2 : list h_step) reduce_lhyps (decompose_solve t1 (normalize_hyps t2 (concl_to_hyp c :: l))). Theorem do_omega : - forall (t1 : e_step) (t2 : list h_step) (envp : PropList) - (env : list Z) (c : proposition) (l : hyps), + forall (t1 : e_step) (t2 : list h_step) (envp : list Prop) + (env : list int) (c : proposition) (l : hyps), interp_list_goal envp env (omega_tactic t1 t2 c l) -> interp_goal_concl c envp env l. - -unfold omega_tactic in |- *; intros; apply do_concl_to_hyp; +Proof. + unfold omega_tactic in |- *; intros; apply do_concl_to_hyp; apply (normalize_hyps_goal t2); apply (decompose_solve_valid t1); apply do_reduce_lhyps; assumption. Qed. + +End IntOmega. + +(* For now, the above modular construction is instanciated on Z, + in order to retrieve the initial ROmega. *) + +Module ZOmega := IntOmega(Z_as_Int). diff --git a/contrib/romega/const_omega.ml b/contrib/romega/const_omega.ml index 69b4b2de..bdec6bf4 100644 --- a/contrib/romega/const_omega.ml +++ b/contrib/romega/const_omega.ml @@ -48,64 +48,16 @@ let dest_const_apply t = | _ -> raise Destruct in Nametab.id_of_global ref, args -let recognize_number t = - let rec loop t = - let f,l = dest_const_apply t in - match Names.string_of_id f,l with - "xI",[t] -> Bigint.add Bigint.one (Bigint.mult Bigint.two (loop t)) - | "xO",[t] -> Bigint.mult Bigint.two (loop t) - | "xH",[] -> Bigint.one - | _ -> failwith "not a number" in - let f,l = dest_const_apply t in - match Names.string_of_id f,l with - "Zpos",[t] -> loop t - | "Zneg",[t] -> Bigint.neg (loop t) - | "Z0",[] -> Bigint.zero - | _ -> failwith "not a number";; - - let logic_dir = ["Coq";"Logic";"Decidable"] let coq_modules = Coqlib.init_modules @ [logic_dir] @ Coqlib.arith_modules @ Coqlib.zarith_base_modules - @ [["Coq"; "omega"; "OmegaLemmas"]] @ [["Coq"; "Lists"; "List"]] @ [module_refl_path] - + @ [module_refl_path@["ZOmega"]] let constant = Coqlib.gen_constant_in_modules "Omega" coq_modules -let coq_xH = lazy (constant "xH") -let coq_xO = lazy (constant "xO") -let coq_xI = lazy (constant "xI") -let coq_Z0 = lazy (constant "Z0") -let coq_Zpos = lazy (constant "Zpos") -let coq_Zneg = lazy (constant "Zneg") -let coq_Z = lazy (constant "Z") -let coq_comparison = lazy (constant "comparison") -let coq_Gt = lazy (constant "Gt") -let coq_Lt = lazy (constant "Lt") -let coq_Eq = lazy (constant "Eq") -let coq_Zplus = lazy (constant "Zplus") -let coq_Zmult = lazy (constant "Zmult") -let coq_Zopp = lazy (constant "Zopp") - -let coq_Zminus = lazy (constant "Zminus") -let coq_Zsucc = lazy (constant "Zsucc") -let coq_Zgt = lazy (constant "Zgt") -let coq_Zle = lazy (constant "Zle") -let coq_Z_of_nat = lazy (constant "Z_of_nat") - -(* Peano *) -let coq_le = lazy(constant "le") -let coq_gt = lazy(constant "gt") - -(* Integers *) -let coq_nat = lazy(constant "nat") -let coq_S = lazy(constant "S") -let coq_O = lazy(constant "O") -let coq_minus = lazy(constant "minus") - (* Logic *) let coq_eq = lazy(constant "eq") let coq_refl_equal = lazy(constant "refl_equal") @@ -114,15 +66,9 @@ let coq_not = lazy(constant "not") let coq_or = lazy(constant "or") let coq_True = lazy(constant "True") let coq_False = lazy(constant "False") -let coq_ex = lazy(constant "ex") let coq_I = lazy(constant "I") -(* Lists *) -let coq_cons = lazy (constant "cons") -let coq_nil = lazy (constant "nil") - -let coq_pcons = lazy (constant "Pcons") -let coq_pnil = lazy (constant "Pnil") +(* ReflOmegaCore/ZOmega *) let coq_h_step = lazy (constant "h_step") let coq_pair_step = lazy (constant "pair_step") @@ -130,8 +76,6 @@ let coq_p_left = lazy (constant "P_LEFT") let coq_p_right = lazy (constant "P_RIGHT") let coq_p_invert = lazy (constant "P_INVERT") let coq_p_step = lazy (constant "P_STEP") -let coq_p_nop = lazy (constant "P_NOP") - let coq_t_int = lazy (constant "Tint") let coq_t_plus = lazy (constant "Tplus") @@ -140,6 +84,7 @@ let coq_t_opp = lazy (constant "Topp") let coq_t_minus = lazy (constant "Tminus") let coq_t_var = lazy (constant "Tvar") +let coq_proposition = lazy (constant "proposition") let coq_p_eq = lazy (constant "EqTerm") let coq_p_leq = lazy (constant "LeqTerm") let coq_p_geq = lazy (constant "GeqTerm") @@ -154,14 +99,6 @@ let coq_p_and = lazy (constant "Tand") let coq_p_imp = lazy (constant "Timp") let coq_p_prop = lazy (constant "Tprop") -let coq_proposition = lazy (constant "proposition") -let coq_interp_sequent = lazy (constant "interp_goal_concl") -let coq_normalize_sequent = lazy (constant "normalize_goal") -let coq_execute_sequent = lazy (constant "execute_goal") -let coq_do_concl_to_hyp = lazy (constant "do_concl_to_hyp") -let coq_sequent_to_hyps = lazy (constant "goal_to_hyps") -let coq_normalize_hyps_goal = lazy (constant "normalize_hyps_goal") - (* Constructors for shuffle tactic *) let coq_t_fusion = lazy (constant "t_fusion") let coq_f_equal = lazy (constant "F_equal") @@ -170,7 +107,6 @@ let coq_f_left = lazy (constant "F_left") let coq_f_right = lazy (constant "F_right") (* Constructors for reordering tactics *) -let coq_step = lazy (constant "step") let coq_c_do_both = lazy (constant "C_DO_BOTH") let coq_c_do_left = lazy (constant "C_LEFT") let coq_c_do_right = lazy (constant "C_RIGHT") @@ -196,8 +132,7 @@ let coq_c_red4 = lazy (constant "C_RED4") let coq_c_red5 = lazy (constant "C_RED5") let coq_c_red6 = lazy (constant "C_RED6") let coq_c_mult_opp_left = lazy (constant "C_MULT_OPP_LEFT") -let coq_c_mult_assoc_reduced = - lazy (constant "C_MULT_ASSOC_REDUCED") +let coq_c_mult_assoc_reduced = lazy (constant "C_MULT_ASSOC_REDUCED") let coq_c_minus = lazy (constant "C_MINUS") let coq_c_mult_comm = lazy (constant "C_MULT_COMM") @@ -225,30 +160,11 @@ let coq_e_split = lazy (constant "E_SPLIT") let coq_e_extract = lazy (constant "E_EXTRACT") let coq_e_solve = lazy (constant "E_SOLVE") -let coq_decompose_solve_valid = - lazy (constant "decompose_solve_valid") -let coq_do_reduce_lhyps = lazy (constant "do_reduce_lhyps") +let coq_interp_sequent = lazy (constant "interp_goal_concl") let coq_do_omega = lazy (constant "do_omega") (* \subsection{Construction d'expressions} *) - -let mk_var v = Term.mkVar (Names.id_of_string v) -let mk_plus t1 t2 = Term.mkApp (Lazy.force coq_Zplus,[| t1; t2 |]) -let mk_times t1 t2 = Term.mkApp (Lazy.force coq_Zmult, [| t1; t2 |]) -let mk_minus t1 t2 = Term.mkApp (Lazy.force coq_Zminus, [| t1;t2 |]) -let mk_eq t1 t2 = Term.mkApp (Lazy.force coq_eq, [| Lazy.force coq_Z; t1; t2 |]) -let mk_le t1 t2 = Term.mkApp (Lazy.force coq_Zle, [|t1; t2 |]) -let mk_gt t1 t2 = Term.mkApp (Lazy.force coq_Zgt, [|t1; t2 |]) -let mk_inv t = Term.mkApp (Lazy.force coq_Zopp, [|t |]) -let mk_and t1 t2 = Term.mkApp (Lazy.force coq_and, [|t1; t2 |]) -let mk_or t1 t2 = Term.mkApp (Lazy.force coq_or, [|t1; t2 |]) -let mk_not t = Term.mkApp (Lazy.force coq_not, [|t |]) -let mk_eq_rel t1 t2 = Term.mkApp (Lazy.force coq_eq, [| - Lazy.force coq_comparison; t1; t2 |]) -let mk_inj t = Term.mkApp (Lazy.force coq_Z_of_nat, [|t |]) - - let do_left t = if t = Lazy.force coq_c_nop then Lazy.force coq_c_nop else Term.mkApp (Lazy.force coq_c_do_left, [|t |] ) @@ -272,27 +188,20 @@ let rec do_list = function | [x] -> x | (x::l) -> do_seq x (do_list l) -let mk_integer n = - let rec loop n = - if n=Bigint.one then Lazy.force coq_xH else - let (q,r) = Bigint.euclid n Bigint.two in - Term.mkApp - ((if r = Bigint.zero then Lazy.force coq_xO else Lazy.force coq_xI), - [| loop q |]) in - - if n = Bigint.zero then Lazy.force coq_Z0 - else - if Bigint.is_strictly_pos n then - Term.mkApp (Lazy.force coq_Zpos, [| loop n |]) - else - Term.mkApp (Lazy.force coq_Zneg, [| loop (Bigint.neg n) |]) +(* Nat *) -let mk_Z = mk_integer +let coq_S = lazy(constant "S") +let coq_O = lazy(constant "O") let rec mk_nat = function | 0 -> Lazy.force coq_O | n -> Term.mkApp (Lazy.force coq_S, [| mk_nat (n-1) |]) +(* Lists *) + +let coq_cons = lazy (constant "cons") +let coq_nil = lazy (constant "nil") + let mk_list typ l = let rec loop = function | [] -> @@ -301,14 +210,141 @@ let mk_list typ l = Term.mkApp (Lazy.force coq_cons, [|typ; step; loop l |]) in loop l -let mk_plist l = - let rec loop = function - | [] -> - (Lazy.force coq_pnil) - | (step :: l) -> - Term.mkApp (Lazy.force coq_pcons, [| step; loop l |]) in - loop l - +let mk_plist l = mk_list Term.mkProp l let mk_shuffle_list l = mk_list (Lazy.force coq_t_fusion) l + +type parse_term = + | Tplus of Term.constr * Term.constr + | Tmult of Term.constr * Term.constr + | Tminus of Term.constr * Term.constr + | Topp of Term.constr + | Tsucc of Term.constr + | Tnum of Bigint.bigint + | Tother + +type parse_rel = + | Req of Term.constr * Term.constr + | Rne of Term.constr * Term.constr + | Rlt of Term.constr * Term.constr + | Rle of Term.constr * Term.constr + | Rgt of Term.constr * Term.constr + | Rge of Term.constr * Term.constr + | Rtrue + | Rfalse + | Rnot of Term.constr + | Ror of Term.constr * Term.constr + | Rand of Term.constr * Term.constr + | Rimp of Term.constr * Term.constr + | Riff of Term.constr * Term.constr + | Rother + +let parse_logic_rel c = + try match destructurate c with + | Kapp("True",[]) -> Rtrue + | Kapp("False",[]) -> Rfalse + | Kapp("not",[t]) -> Rnot t + | Kapp("or",[t1;t2]) -> Ror (t1,t2) + | Kapp("and",[t1;t2]) -> Rand (t1,t2) + | Kimp(t1,t2) -> Rimp (t1,t2) + | Kapp("iff",[t1;t2]) -> Riff (t1,t2) + | _ -> Rother + with e when Logic.catchable_exception e -> Rother + + +module type Int = sig + val typ : Term.constr Lazy.t + val plus : Term.constr Lazy.t + val mult : Term.constr Lazy.t + val opp : Term.constr Lazy.t + val minus : Term.constr Lazy.t + + val mk : Bigint.bigint -> Term.constr + val parse_term : Term.constr -> parse_term + val parse_rel : Proof_type.goal Tacmach.sigma -> Term.constr -> parse_rel + (* check whether t is built only with numbers and + * - *) + val is_scalar : Term.constr -> bool +end + +module Z : Int = struct + +let typ = lazy (constant "Z") +let plus = lazy (constant "Zplus") +let mult = lazy (constant "Zmult") +let opp = lazy (constant "Zopp") +let minus = lazy (constant "Zminus") + +let coq_xH = lazy (constant "xH") +let coq_xO = lazy (constant "xO") +let coq_xI = lazy (constant "xI") +let coq_Z0 = lazy (constant "Z0") +let coq_Zpos = lazy (constant "Zpos") +let coq_Zneg = lazy (constant "Zneg") + +let recognize t = + let rec loop t = + let f,l = dest_const_apply t in + match Names.string_of_id f,l with + "xI",[t] -> Bigint.add Bigint.one (Bigint.mult Bigint.two (loop t)) + | "xO",[t] -> Bigint.mult Bigint.two (loop t) + | "xH",[] -> Bigint.one + | _ -> failwith "not a number" in + let f,l = dest_const_apply t in + match Names.string_of_id f,l with + "Zpos",[t] -> loop t + | "Zneg",[t] -> Bigint.neg (loop t) + | "Z0",[] -> Bigint.zero + | _ -> failwith "not a number";; + +let rec mk_positive n = + if n=Bigint.one then Lazy.force coq_xH + else + let (q,r) = Bigint.euclid n Bigint.two in + Term.mkApp + ((if r = Bigint.zero then Lazy.force coq_xO else Lazy.force coq_xI), + [| mk_positive q |]) + +let mk_Z n = + if n = Bigint.zero then Lazy.force coq_Z0 + else if Bigint.is_strictly_pos n then + Term.mkApp (Lazy.force coq_Zpos, [| mk_positive n |]) + else + Term.mkApp (Lazy.force coq_Zneg, [| mk_positive (Bigint.neg n) |]) + +let mk = mk_Z + +let parse_term t = + try match destructurate t with + | Kapp("Zplus",[t1;t2]) -> Tplus (t1,t2) + | Kapp("Zminus",[t1;t2]) -> Tminus (t1,t2) + | Kapp("Zmult",[t1;t2]) -> Tmult (t1,t2) + | Kapp("Zopp",[t]) -> Topp t + | Kapp("Zsucc",[t]) -> Tsucc t + | Kapp("Zpred",[t]) -> Tplus(t, mk_Z (Bigint.neg Bigint.one)) + | Kapp(("Zpos"|"Zneg"|"Z0"),_) -> + (try Tnum (recognize t) with _ -> Tother) + | _ -> Tother + with e when Logic.catchable_exception e -> Tother + +let parse_rel gl t = + try match destructurate t with + | Kapp("eq",[typ;t1;t2]) + when destructurate (Tacmach.pf_nf gl typ) = Kapp("Z",[]) -> Req (t1,t2) + | Kapp("Zne",[t1;t2]) -> Rne (t1,t2) + | Kapp("Zle",[t1;t2]) -> Rle (t1,t2) + | Kapp("Zlt",[t1;t2]) -> Rlt (t1,t2) + | Kapp("Zge",[t1;t2]) -> Rge (t1,t2) + | Kapp("Zgt",[t1;t2]) -> Rgt (t1,t2) + | _ -> parse_logic_rel t + with e when Logic.catchable_exception e -> Rother + +let is_scalar t = + let rec aux t = match destructurate t with + | Kapp(("Zplus"|"Zminus"|"Zmult"),[t1;t2]) -> aux t1 & aux t2 + | Kapp(("Zopp"|"Zsucc"|"Zpred"),[t]) -> aux t + | Kapp(("Zpos"|"Zneg"|"Z0"),_) -> let _ = recognize t in true + | _ -> false in + try aux t with _ -> false + +end diff --git a/contrib/romega/const_omega.mli b/contrib/romega/const_omega.mli new file mode 100644 index 00000000..0f00e918 --- /dev/null +++ b/contrib/romega/const_omega.mli @@ -0,0 +1,176 @@ +(************************************************************************* + + PROJET RNRT Calife - 2001 + Author: Pierre Crégut - France Télécom R&D + Licence : LGPL version 2.1 + + *************************************************************************) + + +(** Coq objects used in romega *) + +(* from Logic *) +val coq_refl_equal : Term.constr lazy_t +val coq_and : Term.constr lazy_t +val coq_not : Term.constr lazy_t +val coq_or : Term.constr lazy_t +val coq_True : Term.constr lazy_t +val coq_False : Term.constr lazy_t +val coq_I : Term.constr lazy_t + +(* from ReflOmegaCore/ZOmega *) +val coq_h_step : Term.constr lazy_t +val coq_pair_step : Term.constr lazy_t +val coq_p_left : Term.constr lazy_t +val coq_p_right : Term.constr lazy_t +val coq_p_invert : Term.constr lazy_t +val coq_p_step : Term.constr lazy_t + +val coq_t_int : Term.constr lazy_t +val coq_t_plus : Term.constr lazy_t +val coq_t_mult : Term.constr lazy_t +val coq_t_opp : Term.constr lazy_t +val coq_t_minus : Term.constr lazy_t +val coq_t_var : Term.constr lazy_t + +val coq_proposition : Term.constr lazy_t +val coq_p_eq : Term.constr lazy_t +val coq_p_leq : Term.constr lazy_t +val coq_p_geq : Term.constr lazy_t +val coq_p_lt : Term.constr lazy_t +val coq_p_gt : Term.constr lazy_t +val coq_p_neq : Term.constr lazy_t +val coq_p_true : Term.constr lazy_t +val coq_p_false : Term.constr lazy_t +val coq_p_not : Term.constr lazy_t +val coq_p_or : Term.constr lazy_t +val coq_p_and : Term.constr lazy_t +val coq_p_imp : Term.constr lazy_t +val coq_p_prop : Term.constr lazy_t + +val coq_f_equal : Term.constr lazy_t +val coq_f_cancel : Term.constr lazy_t +val coq_f_left : Term.constr lazy_t +val coq_f_right : Term.constr lazy_t + +val coq_c_do_both : Term.constr lazy_t +val coq_c_do_left : Term.constr lazy_t +val coq_c_do_right : Term.constr lazy_t +val coq_c_do_seq : Term.constr lazy_t +val coq_c_nop : Term.constr lazy_t +val coq_c_opp_plus : Term.constr lazy_t +val coq_c_opp_opp : Term.constr lazy_t +val coq_c_opp_mult_r : Term.constr lazy_t +val coq_c_opp_one : Term.constr lazy_t +val coq_c_reduce : Term.constr lazy_t +val coq_c_mult_plus_distr : Term.constr lazy_t +val coq_c_opp_left : Term.constr lazy_t +val coq_c_mult_assoc_r : Term.constr lazy_t +val coq_c_plus_assoc_r : Term.constr lazy_t +val coq_c_plus_assoc_l : Term.constr lazy_t +val coq_c_plus_permute : Term.constr lazy_t +val coq_c_plus_comm : Term.constr lazy_t +val coq_c_red0 : Term.constr lazy_t +val coq_c_red1 : Term.constr lazy_t +val coq_c_red2 : Term.constr lazy_t +val coq_c_red3 : Term.constr lazy_t +val coq_c_red4 : Term.constr lazy_t +val coq_c_red5 : Term.constr lazy_t +val coq_c_red6 : Term.constr lazy_t +val coq_c_mult_opp_left : Term.constr lazy_t +val coq_c_mult_assoc_reduced : Term.constr lazy_t +val coq_c_minus : Term.constr lazy_t +val coq_c_mult_comm : Term.constr lazy_t + +val coq_s_constant_not_nul : Term.constr lazy_t +val coq_s_constant_neg : Term.constr lazy_t +val coq_s_div_approx : Term.constr lazy_t +val coq_s_not_exact_divide : Term.constr lazy_t +val coq_s_exact_divide : Term.constr lazy_t +val coq_s_sum : Term.constr lazy_t +val coq_s_state : Term.constr lazy_t +val coq_s_contradiction : Term.constr lazy_t +val coq_s_merge_eq : Term.constr lazy_t +val coq_s_split_ineq : Term.constr lazy_t +val coq_s_constant_nul : Term.constr lazy_t +val coq_s_negate_contradict : Term.constr lazy_t +val coq_s_negate_contradict_inv : Term.constr lazy_t + +val coq_direction : Term.constr lazy_t +val coq_d_left : Term.constr lazy_t +val coq_d_right : Term.constr lazy_t +val coq_d_mono : Term.constr lazy_t + +val coq_e_split : Term.constr lazy_t +val coq_e_extract : Term.constr lazy_t +val coq_e_solve : Term.constr lazy_t + +val coq_interp_sequent : Term.constr lazy_t +val coq_do_omega : Term.constr lazy_t + +(** Building expressions *) + +val do_left : Term.constr -> Term.constr +val do_right : Term.constr -> Term.constr +val do_both : Term.constr -> Term.constr -> Term.constr +val do_seq : Term.constr -> Term.constr -> Term.constr +val do_list : Term.constr list -> Term.constr + +val mk_nat : int -> Term.constr +val mk_list : Term.constr -> Term.constr list -> Term.constr +val mk_plist : Term.types list -> Term.types +val mk_shuffle_list : Term.constr list -> Term.constr + +(** Analyzing a coq term *) + +(* The generic result shape of the analysis of a term. + One-level depth, except when a number is found *) +type parse_term = + Tplus of Term.constr * Term.constr + | Tmult of Term.constr * Term.constr + | Tminus of Term.constr * Term.constr + | Topp of Term.constr + | Tsucc of Term.constr + | Tnum of Bigint.bigint + | Tother + +(* The generic result shape of the analysis of a relation. + One-level depth. *) +type parse_rel = + Req of Term.constr * Term.constr + | Rne of Term.constr * Term.constr + | Rlt of Term.constr * Term.constr + | Rle of Term.constr * Term.constr + | Rgt of Term.constr * Term.constr + | Rge of Term.constr * Term.constr + | Rtrue + | Rfalse + | Rnot of Term.constr + | Ror of Term.constr * Term.constr + | Rand of Term.constr * Term.constr + | Rimp of Term.constr * Term.constr + | Riff of Term.constr * Term.constr + | Rother + +(* A module factorizing what we should now about the number representation *) +module type Int = + sig + (* the coq type of the numbers *) + val typ : Term.constr Lazy.t + (* the operations on the numbers *) + val plus : Term.constr Lazy.t + val mult : Term.constr Lazy.t + val opp : Term.constr Lazy.t + val minus : Term.constr Lazy.t + (* building a coq number *) + val mk : Bigint.bigint -> Term.constr + (* parsing a term (one level, except if a number is found) *) + val parse_term : Term.constr -> parse_term + (* parsing a relation expression, including = < <= >= > *) + val parse_rel : Proof_type.goal Tacmach.sigma -> Term.constr -> parse_rel + (* Is a particular term only made of numbers and + * - ? *) + val is_scalar : Term.constr -> bool + end + +(* Currently, we only use Z numbers *) +module Z : Int diff --git a/contrib/romega/g_romega.ml4 b/contrib/romega/g_romega.ml4 index 7cfc50f8..39b6c210 100644 --- a/contrib/romega/g_romega.ml4 +++ b/contrib/romega/g_romega.ml4 @@ -9,7 +9,34 @@ (*i camlp4deps: "parsing/grammar.cma" i*) open Refl_omega +open Refiner -TACTIC EXTEND romelga - [ "romega" ] -> [ total_reflexive_omega_tactic ] +let romega_tactic l = + let tacs = List.map + (function + | "nat" -> Tacinterp.interp <:tactic> + | "positive" -> Tacinterp.interp <:tactic> + | "N" -> Tacinterp.interp <:tactic> + | "Z" -> Tacinterp.interp <:tactic> + | s -> Util.error ("No ROmega knowledge base for type "^s)) + (Util.list_uniquize (List.sort compare l)) + in + tclTHEN + (tclREPEAT (tclPROGRESS (tclTHENLIST tacs))) + (tclTHEN + (* because of the contradiction process in (r)omega, + we'd better leave as little as possible in the conclusion, + for an easier decidability argument. *) + Tactics.intros + total_reflexive_omega_tactic) + + +TACTIC EXTEND romega +| [ "romega" ] -> [ romega_tactic [] ] +END + +TACTIC EXTEND romega' +| [ "romega" "with" ne_ident_list(l) ] -> + [ romega_tactic (List.map Names.string_of_id l) ] +| [ "romega" "with" "*" ] -> [ romega_tactic ["nat";"positive";"N";"Z"] ] END diff --git a/contrib/romega/refl_omega.ml b/contrib/romega/refl_omega.ml index e7e7b3c5..fc4f7a8f 100644 --- a/contrib/romega/refl_omega.ml +++ b/contrib/romega/refl_omega.ml @@ -6,10 +6,7 @@ *************************************************************************) -(* The addition on int, since it while be hidden soon by the one on BigInt *) - -let (+.) = (+) - +open Util open Const_omega module OmegaSolver = Omega.MakeOmegaSolver (Bigint) open OmegaSolver @@ -26,65 +23,6 @@ let pp i = print_int i; print_newline (); flush stdout (* More readable than the prefix notation *) let (>>) = Tacticals.tclTHEN -(* [list_index t l = i] \eqv $nth l i = t \wedge \forall j < i nth l j != t$ *) - -let list_index t = - let rec loop i = function - | (u::l) -> if u = t then i else loop (succ i) l - | [] -> raise Not_found in - loop 0 - -(* [list_uniq l = filter_i (x i -> nth l (i-1) != x) l] *) -let list_uniq l = - let rec uniq = function - x :: ((y :: _) as l) when x = y -> uniq l - | x :: l -> x :: uniq l - | [] -> [] in - uniq (List.sort compare l) - -(* $\forall x. mem x (list\_union l1 l2) \eqv x \in \{l1\} \cup \{l2\}$ *) -let list_union l1 l2 = - let rec loop buf = function - x :: r -> if List.mem x l2 then loop buf r else loop (x :: buf) r - | [] -> buf in - loop l2 l1 - -(* $\forall x. - mem \;\; x \;\; (list\_intersect\;\; l1\;\;l2) \eqv x \in \{l1\} - \cap \{l2\}$ *) -let list_intersect l1 l2 = - let rec loop buf = function - x :: r -> if List.mem x l2 then loop (x::buf) r else loop buf r - | [] -> buf in - loop [] l1 - -(* cartesian product. Elements are lists and are concatenated. - $cartesian [x_1 ... x_n] [y_1 ... y_p] = [x_1 @ y_1, x_2 @ y_1 ... x_n @ y_1 , x_1 @ y_2 ... x_n @ y_p]$ *) - -let rec cartesien l1 l2 = - let rec loop = function - (x2 :: r2) -> List.map (fun x1 -> x1 @ x2) l1 @ loop r2 - | [] -> [] in - loop l2 - -(* remove element e from list l *) -let list_remove e l = - let rec loop = function - x :: l -> if x = e then loop l else x :: loop l - | [] -> [] in - loop l - -(* equivalent of the map function but no element is added when the function - raises an exception (and the computation silently continues) *) -let map_exc f = - let rec loop = function - (x::l) -> - begin match try Some (f x) with exc -> None with - Some v -> v :: loop l | None -> loop l - end - | [] -> [] in - loop - let mkApp = Term.mkApp (* \section{Types} @@ -174,6 +112,7 @@ type environment = { (* \subsection{Solution tree} Définition d'une solution trouvée par Omega sous la forme d'un identifiant, d'un ensemble d'équation dont dépend la solution et d'une trace *) +(* La liste des dépendances est triée et sans redondance *) type solution = { s_index : int; s_equa_deps : int list; @@ -280,7 +219,7 @@ let unintern_omega env id = calcul des variables utiles. *) let add_reified_atom t env = - try list_index t env.terms + try list_index0 t env.terms with Not_found -> let i = List.length env.terms in env.terms <- env.terms @ [t]; i @@ -291,7 +230,7 @@ let get_reified_atom env = (* \subsection{Gestion de l'environnement de proposition pour Omega} *) (* ajout d'une proposition *) let add_prop env t = - try list_index t env.props + try list_index0 t env.props with Not_found -> let i = List.length env.props in env.props <- env.props @ [t]; i @@ -362,13 +301,6 @@ let omega_of_oformula env kind = (* \subsection{Omega vers Oformula} *) -let reified_of_atom env i = - try Hashtbl.find env.real_indices i - with Not_found -> - Printf.printf "Atome %d non trouvé\n" i; - Hashtbl.iter (fun k v -> Printf.printf "%d -> %d\n" k v) env.real_indices; - raise Not_found - let rec oformula_of_omega env af = let rec loop = function | ({v=v; c=n}::r) -> @@ -382,20 +314,27 @@ let app f v = mkApp(Lazy.force f,v) let rec coq_of_formula env t = let rec loop = function - | Oplus (t1,t2) -> app coq_Zplus [| loop t1; loop t2 |] - | Oopp t -> app coq_Zopp [| loop t |] - | Omult(t1,t2) -> app coq_Zmult [| loop t1; loop t2 |] - | Oint v -> mk_Z v + | Oplus (t1,t2) -> app Z.plus [| loop t1; loop t2 |] + | Oopp t -> app Z.opp [| loop t |] + | Omult(t1,t2) -> app Z.mult [| loop t1; loop t2 |] + | Oint v -> Z.mk v | Oufo t -> loop t | Oatom var -> (* attention ne traite pas les nouvelles variables si on ne les * met pas dans env.term *) get_reified_atom env var - | Ominus(t1,t2) -> app coq_Zminus [| loop t1; loop t2 |] in + | Ominus(t1,t2) -> app Z.minus [| loop t1; loop t2 |] in loop t (* \subsection{Oformula vers COQ reifié} *) +let reified_of_atom env i = + try Hashtbl.find env.real_indices i + with Not_found -> + Printf.printf "Atome %d non trouvé\n" i; + Hashtbl.iter (fun k v -> Printf.printf "%d -> %d\n" k v) env.real_indices; + raise Not_found + let rec reified_of_formula env = function | Oplus (t1,t2) -> app coq_t_plus [| reified_of_formula env t1; reified_of_formula env t2 |] @@ -403,7 +342,7 @@ let rec reified_of_formula env = function app coq_t_opp [| reified_of_formula env t |] | Omult(t1,t2) -> app coq_t_mult [| reified_of_formula env t1; reified_of_formula env t2 |] - | Oint v -> app coq_t_int [| mk_Z v |] + | Oint v -> app coq_t_int [| Z.mk v |] | Oufo t -> reified_of_formula env t | Oatom i -> app coq_t_var [| mk_nat (reified_of_atom env i) |] | Ominus(t1,t2) -> @@ -448,12 +387,12 @@ let reified_of_proposition env f = let reified_of_omega env body constant = let coeff_constant = - app coq_t_int [| mk_Z constant |] in + app coq_t_int [| Z.mk constant |] in let mk_coeff {c=c; v=v} t = let coef = app coq_t_mult [| reified_of_formula env (unintern_omega env v); - app coq_t_int [| mk_Z c |] |] in + app coq_t_int [| Z.mk c |] |] in app coq_t_plus [|coef; t |] in List.fold_right mk_coeff body coeff_constant @@ -469,22 +408,34 @@ Ces fonctions pr pour faire des opérations de normalisation sur les équations. *) (* \subsection{Extractions des variables d'une équation} *) -(* Extraction des variables d'une équation *) +(* Extraction des variables d'une équation. *) +(* Chaque fonction retourne une liste triée sans redondance *) + +let (@@) = list_merge_uniq compare let rec vars_of_formula = function | Oint _ -> [] - | Oplus (e1,e2) -> (vars_of_formula e1) @ (vars_of_formula e2) - | Omult (e1,e2) -> (vars_of_formula e1) @ (vars_of_formula e2) - | Ominus (e1,e2) -> (vars_of_formula e1) @ (vars_of_formula e2) - | Oopp e -> (vars_of_formula e) + | Oplus (e1,e2) -> (vars_of_formula e1) @@ (vars_of_formula e2) + | Omult (e1,e2) -> (vars_of_formula e1) @@ (vars_of_formula e2) + | Ominus (e1,e2) -> (vars_of_formula e1) @@ (vars_of_formula e2) + | Oopp e -> vars_of_formula e | Oatom i -> [i] | Oufo _ -> [] -let vars_of_equations l = - let rec loop = function - e :: l -> vars_of_formula e.e_left @ vars_of_formula e.e_right @ loop l - | [] -> [] in - list_uniq (List.sort compare (loop l)) +let rec vars_of_equations = function + | [] -> [] + | e::l -> + (vars_of_formula e.e_left) @@ + (vars_of_formula e.e_right) @@ + (vars_of_equations l) + +let rec vars_of_prop = function + | Pequa(_,e) -> vars_of_equations [e] + | Pnot p -> vars_of_prop p + | Por(_,p1,p2) -> (vars_of_prop p1) @@ (vars_of_prop p2) + | Pand(_,p1,p2) -> (vars_of_prop p1) @@ (vars_of_prop p2) + | Pimp(_,p1,p2) -> (vars_of_prop p1) @@ (vars_of_prop p2) + | Pprop _ | Ptrue | Pfalse -> [] (* \subsection{Multiplication par un scalaire} *) @@ -715,36 +666,23 @@ let normalize_equation env (negated,depends,origin,path) (oper,t1,t2) = (* \section{Compilation des hypothèses} *) -let is_scalar t = - let rec aux t = match destructurate t with - | Kapp(("Zplus"|"Zminus"|"Zmult"),[t1;t2]) -> aux t1 & aux t2 - | Kapp(("Zopp"|"Zsucc"),[t]) -> aux t - | Kapp(("Zpos"|"Zneg"|"Z0"),_) -> let _ = recognize_number t in true - | _ -> false in - try aux t with _ -> false - let rec oformula_of_constr env t = - try match destructurate t with - | Kapp("Zplus",[t1;t2]) -> binop env (fun x y -> Oplus(x,y)) t1 t2 - | Kapp("Zminus",[t1;t2]) -> binop env (fun x y -> Ominus(x,y)) t1 t2 - | Kapp("Zmult",[t1;t2]) when is_scalar t1 or is_scalar t2 -> - binop env (fun x y -> Omult(x,y)) t1 t2 - | Kapp("Zopp",[t]) -> Oopp(oformula_of_constr env t) - | Kapp("Zsucc",[t]) -> Oplus(oformula_of_constr env t, Oint one) - | Kapp(("Zpos"|"Zneg"|"Z0"),_) -> - begin try Oint(recognize_number t) - with _ -> Oatom (add_reified_atom t env) end - | _ -> - Oatom (add_reified_atom t env) - with e when Logic.catchable_exception e -> - Oatom (add_reified_atom t env) - -and binop env c t1 t2 = - let t1' = oformula_of_constr env t1 in - let t2' = oformula_of_constr env t2 in - c t1' t2' - -and binprop env (neg2,depends,origin,path) + match Z.parse_term t with + | Tplus (t1,t2) -> binop env (fun x y -> Oplus(x,y)) t1 t2 + | Tminus (t1,t2) -> binop env (fun x y -> Ominus(x,y)) t1 t2 + | Tmult (t1,t2) when Z.is_scalar t1 || Z.is_scalar t2 -> + binop env (fun x y -> Omult(x,y)) t1 t2 + | Topp t -> Oopp(oformula_of_constr env t) + | Tsucc t -> Oplus(oformula_of_constr env t, Oint one) + | Tnum n -> Oint n + | _ -> Oatom (add_reified_atom t env) + +and binop env c t1 t2 = + let t1' = oformula_of_constr env t1 in + let t2' = oformula_of_constr env t2 in + c t1' t2' + +and binprop env (neg2,depends,origin,path) add_to_depends neg1 gl c t1 t2 = let i = new_connector_id env in let depends1 = if add_to_depends then Left i::depends else depends in @@ -767,40 +705,32 @@ and mk_equation env ctxt c connector t1 t2 = Pequa (c,omega) and oproposition_of_constr env ((negated,depends,origin,path) as ctxt) gl c = - try match destructurate c with - | Kapp("eq",[typ;t1;t2]) - when destructurate (Tacmach.pf_nf gl typ) = Kapp("Z",[]) -> - mk_equation env ctxt c Eq t1 t2 - | Kapp("Zne",[t1;t2]) -> - mk_equation env ctxt c Neq t1 t2 - | Kapp("Zle",[t1;t2]) -> - mk_equation env ctxt c Leq t1 t2 - | Kapp("Zlt",[t1;t2]) -> - mk_equation env ctxt c Lt t1 t2 - | Kapp("Zge",[t1;t2]) -> - mk_equation env ctxt c Geq t1 t2 - | Kapp("Zgt",[t1;t2]) -> - mk_equation env ctxt c Gt t1 t2 - | Kapp("True",[]) -> Ptrue - | Kapp("False",[]) -> Pfalse - | Kapp("not",[t]) -> - let t' = - oproposition_of_constr - env (not negated, depends, origin,(O_mono::path)) gl t in - Pnot t' - | Kapp("or",[t1;t2]) -> + match Z.parse_rel gl c with + | Req (t1,t2) -> mk_equation env ctxt c Eq t1 t2 + | Rne (t1,t2) -> mk_equation env ctxt c Neq t1 t2 + | Rle (t1,t2) -> mk_equation env ctxt c Leq t1 t2 + | Rlt (t1,t2) -> mk_equation env ctxt c Lt t1 t2 + | Rge (t1,t2) -> mk_equation env ctxt c Geq t1 t2 + | Rgt (t1,t2) -> mk_equation env ctxt c Gt t1 t2 + | Rtrue -> Ptrue + | Rfalse -> Pfalse + | Rnot t -> + let t' = + oproposition_of_constr + env (not negated, depends, origin,(O_mono::path)) gl t in + Pnot t' + | Ror (t1,t2) -> binprop env ctxt (not negated) negated gl (fun i x y -> Por(i,x,y)) t1 t2 - | Kapp("and",[t1;t2]) -> + | Rand (t1,t2) -> binprop env ctxt negated negated gl (fun i x y -> Pand(i,x,y)) t1 t2 - | Kimp(t1,t2) -> + | Rimp (t1,t2) -> binprop env ctxt (not negated) (not negated) gl (fun i x y -> Pimp(i,x,y)) t1 t2 - | Kapp("iff",[t1;t2]) -> + | Riff (t1,t2) -> binprop env ctxt negated negated gl (fun i x y -> Pand(i,x,y)) (Term.mkArrow t1 t2) (Term.mkArrow t2 t1) | _ -> Pprop c - with e when Logic.catchable_exception e -> Pprop c (* Destructuration des hypothèses et de la conclusion *) @@ -881,7 +811,7 @@ let destructurate_hyps syst = (i,t) :: l -> let l_syst1 = destructurate_pos_hyp i [] [] t in let l_syst2 = loop l in - cartesien l_syst1 l_syst2 + list_cartesian (@) l_syst1 l_syst2 | [] -> [[]] in loop syst @@ -924,9 +854,9 @@ let display_systems syst_list = let rec hyps_used_in_trace = function | act :: l -> begin match act with - | HYP e -> e.id :: hyps_used_in_trace l + | HYP e -> [e.id] @@ (hyps_used_in_trace l) | SPLIT_INEQ (_,(_,act1),(_,act2)) -> - hyps_used_in_trace act1 @ hyps_used_in_trace act2 + hyps_used_in_trace act1 @@ hyps_used_in_trace act2 | _ -> hyps_used_in_trace l end | [] -> [] @@ -950,14 +880,15 @@ let rec variable_stated_in_trace = function ;; let add_stated_equations env tree = - let rec loop = function - Tree(_,t1,t2) -> - list_union (loop t1) (loop t2) - | Leaf s -> variable_stated_in_trace s.s_trace in (* Il faut trier les variables par ordre d'introduction pour ne pas risquer de définir dans le mauvais ordre *) let stated_equations = - List.sort (fun x y -> Pervasives.(-) x.st_var y.st_var) (loop tree) in + let cmpvar x y = Pervasives.(-) x.st_var y.st_var in + let rec loop = function + | Tree(_,t1,t2) -> List.merge cmpvar (loop t1) (loop t2) + | Leaf s -> List.sort cmpvar (variable_stated_in_trace s.s_trace) + in loop tree + in let add_env st = (* On retransforme la définition de v en formule reifiée *) let v_def = oformula_of_omega env st.st_def in @@ -966,7 +897,7 @@ let add_stated_equations env tree = let coq_v = coq_of_formula env v_def in let v = add_reified_atom coq_v env in (* Le terme qu'il va falloir introduire *) - let term_to_generalize = app coq_refl_equal [|Lazy.force coq_Z; coq_v|] in + let term_to_generalize = app coq_refl_equal [|Lazy.force Z.typ; coq_v|] in (* sa représentation sous forme d'équation mais non réifié car on n'a pas * l'environnement pour le faire correctement *) let term_to_reify = (v_def,Oatom v) in @@ -978,10 +909,15 @@ let add_stated_equations env tree = (* Calcule la liste des éclatements à réaliser sur les hypothèses nécessaires pour extraire une liste d'équations donnée *) +(* PL: experimentally, the result order of the following function seems + _very_ crucial for efficiency. No idea why. Do not remove the List.rev + or modify the current semantics of Util.list_union (some elements of first + arg, then second arg), unless you know what you're doing. *) + let rec get_eclatement env = function i :: r -> let l = try (get_equation env i).e_depends with Not_found -> [] in - list_union l (get_eclatement env r) + list_union (List.rev l) (get_eclatement env r) | [] -> [] let select_smaller l = @@ -992,14 +928,13 @@ let filter_compatible_systems required systems = let rec select = function (x::l) -> if List.mem x required then select l - else if List.mem (barre x) required then raise Exit + else if List.mem (barre x) required then failwith "Exit" else x :: select l | [] -> [] in - map_exc (function (sol,splits) -> (sol,select splits)) systems + map_succeed (function (sol,splits) -> (sol,select splits)) systems let rec equas_of_solution_tree = function - Tree(_,t1,t2) -> - list_union (equas_of_solution_tree t1) (equas_of_solution_tree t2) + Tree(_,t1,t2) -> (equas_of_solution_tree t1)@@(equas_of_solution_tree t2) | Leaf s -> s.s_equa_deps (* [really_useful_prop] pushes useless props in a new Pprop variable *) @@ -1041,14 +976,6 @@ let really_useful_prop l_equa c = None -> Pprop (real_of c) | Some t -> t -let rec vars_of_prop = function - | Pequa(_,e) -> vars_of_equations [e] - | Pnot p -> vars_of_prop p - | Por(_,p1,p2) -> list_union (vars_of_prop p1) (vars_of_prop p2) - | Pand(_,p1,p2) -> list_union (vars_of_prop p1) (vars_of_prop p2) - | Pimp(_,p1,p2) -> list_union (vars_of_prop p1) (vars_of_prop p2) - | _ -> [] - let rec display_solution_tree ch = function Leaf t -> output_string ch @@ -1103,7 +1030,7 @@ let mk_direction_list l = (* \section{Rejouer l'historique} *) let get_hyp env_hyp i = - try list_index (CCEqua i) env_hyp + try list_index0 (CCEqua i) env_hyp with Not_found -> failwith (Printf.sprintf "get_hyp %d" i) let replay_history env env_hyp = @@ -1116,7 +1043,7 @@ let replay_history env env_hyp = mk_nat (get_hyp env_hyp e2.id) |]) | DIVIDE_AND_APPROX (e1,e2,k,d) :: l -> mkApp (Lazy.force coq_s_div_approx, - [| mk_Z k; mk_Z d; + [| Z.mk k; Z.mk d; reified_of_omega env e2.body e2.constant; mk_nat (List.length e2.body); loop env_hyp l; mk_nat (get_hyp env_hyp e1.id) |]) @@ -1125,7 +1052,7 @@ let replay_history env env_hyp = let d = e1.constant - e2_constant * k in let e2_body = map_eq_linear (fun c -> c / k) e1.body in mkApp (Lazy.force coq_s_not_exact_divide, - [|mk_Z k; mk_Z d; + [|Z.mk k; Z.mk d; reified_of_omega env e2_body e2_constant; mk_nat (List.length e2_body); mk_nat (get_hyp env_hyp e1.id)|]) @@ -1134,7 +1061,7 @@ let replay_history env env_hyp = map_eq_linear (fun c -> c / k) e1.body in let e2_constant = floor_div e1.constant k in mkApp (Lazy.force coq_s_exact_divide, - [|mk_Z k; + [|Z.mk k; reified_of_omega env e2_body e2_constant; mk_nat (List.length e2_body); loop env_hyp l; mk_nat (get_hyp env_hyp e1.id)|]) @@ -1149,7 +1076,7 @@ let replay_history env env_hyp = and n2 = get_hyp env_hyp e2.id in let trace = shuffle_path k1 e1.body k2 e2.body in mkApp (Lazy.force coq_s_sum, - [| mk_Z k1; mk_nat n1; mk_Z k2; + [| Z.mk k1; mk_nat n1; Z.mk k2; mk_nat n2; trace; (loop (CCEqua e3 :: env_hyp) l) |]) | CONSTANT_NOT_NUL(e,k) :: l -> mkApp (Lazy.force coq_s_constant_not_nul, @@ -1169,7 +1096,7 @@ let replay_history env env_hyp = Oplus (o_orig,Omult (Oplus (Oopp v,o_def), Oint m)) in let trace,_ = normalize_linear_term env body in mkApp (Lazy.force coq_s_state, - [| mk_Z m; trace; mk_nat n1; mk_nat n2; + [| Z.mk m; trace; mk_nat n1; mk_nat n2; loop (CCEqua new_eq.id :: env_hyp) l |]) | HYP _ :: l -> loop env_hyp l | CONSTANT_NUL e :: l -> @@ -1267,17 +1194,17 @@ let resolution env full_reified_goal systems_list = print_newline() end; (* calcule la liste de toutes les hypothèses utilisées dans l'arbre de solution *) - let useful_equa_id = list_uniq (equas_of_solution_tree solution_tree) in + let useful_equa_id = equas_of_solution_tree solution_tree in (* recupere explicitement ces equations *) let equations = List.map (get_equation env) useful_equa_id in - let l_hyps' = list_uniq (List.map (fun e -> e.e_origin.o_hyp) equations) in + let l_hyps' = list_uniquize (List.map (fun e -> e.e_origin.o_hyp) equations) in let l_hyps = id_concl :: list_remove id_concl l_hyps' in let useful_hyps = List.map (fun id -> List.assoc id full_reified_goal) l_hyps in let useful_vars = let really_useful_vars = vars_of_equations equations in let concl_vars = vars_of_prop (List.assoc id_concl full_reified_goal) in - list_uniq (List.sort compare (really_useful_vars @ concl_vars)) + really_useful_vars @@ concl_vars in (* variables a introduire *) let to_introduce = add_stated_equations env solution_tree in @@ -1295,7 +1222,7 @@ let resolution env full_reified_goal systems_list = Hashtbl.add env.real_indices var i; t :: loop (succ i) l | [] -> [] in loop 0 all_vars_env in - let env_terms_reified = mk_list (Lazy.force coq_Z) basic_env in + let env_terms_reified = mk_list (Lazy.force Z.typ) basic_env in (* On peut maintenant généraliser le but : env est a jour *) let l_reified_stated = List.map (fun (_,_,(l,r),_) -> @@ -1325,10 +1252,10 @@ let resolution env full_reified_goal systems_list = | ((O_left | O_mono) :: l) -> app coq_p_left [| loop l |] | (O_right :: l) -> app coq_p_right [| loop l |] in let correct_index = - let i = list_index e.e_origin.o_hyp l_hyps in + let i = list_index0 e.e_origin.o_hyp l_hyps in (* PL: it seems that additionnally introduced hyps are in the way during normalization, hence this index shifting... *) - if i=0 then 0 else i +. List.length to_introduce + if i=0 then 0 else Pervasives.(+) i (List.length to_introduce) in app coq_pair_step [| mk_nat correct_index; loop e.e_origin.o_path |] in let normalization_trace = diff --git a/contrib/rtauto/Bintree.v b/contrib/rtauto/Bintree.v index f4b24d4b..e90fea84 100644 --- a/contrib/rtauto/Bintree.v +++ b/contrib/rtauto/Bintree.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: Bintree.v 8881 2006-05-31 18:16:34Z jforest $ *) +(* $Id: Bintree.v 10681 2008-03-16 13:40:45Z msozeau $ *) Require Export List. Require Export BinPos. @@ -20,15 +20,6 @@ Ltac caseq t := generalize (refl_equal t); pattern t at -1; case t. Functional Scheme Pcompare_ind := Induction for Pcompare Sort Prop. -Lemma Prect : forall P : positive -> Type, - P 1 -> - (forall n : positive, P n -> P (Psucc n)) -> forall p : positive, P p. -intros P H1 Hsucc n; induction n. -rewrite <- plus_iter_xI; apply Hsucc; apply iterate_add; assumption. -rewrite <- plus_iter_xO; apply iterate_add; assumption. -assumption. -Qed. - Lemma Gt_Eq_Gt : forall p q cmp, (p ?= q) Eq = Gt -> (p ?= q) cmp = Gt. apply (Pcompare_ind (fun p q cmp _ => (p ?= q) Eq = Gt -> (p ?= q) cmp = Gt)); @@ -116,7 +107,7 @@ intro ne;right;congruence. left;reflexivity. Defined. -Theorem pos_eq_dec_refl : forall m, pos_eq_dec m m = left (m<>m) (refl_equal m) . +Theorem pos_eq_dec_refl : forall m, pos_eq_dec m m = left _ (refl_equal m). fix 1;intros [mm|mm|]. simpl; rewrite pos_eq_dec_refl; reflexivity. simpl; rewrite pos_eq_dec_refl; reflexivity. @@ -125,7 +116,7 @@ Qed. Theorem pos_eq_dec_ex : forall m n, pos_eq m n =true -> exists h:m=n, - pos_eq_dec m n = left (m<>n) h. + pos_eq_dec m n = left _ h. fix 1;intros [mm|mm|] [nn|nn|];try (simpl;congruence). simpl;intro e. elim (pos_eq_dec_ex _ _ e). diff --git a/contrib/rtauto/refl_tauto.ml b/contrib/rtauto/refl_tauto.ml index a1f5e5aa..81256f4a 100644 --- a/contrib/rtauto/refl_tauto.ml +++ b/contrib/rtauto/refl_tauto.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: refl_tauto.ml 9154 2006-09-20 17:18:18Z corbinea $ *) +(* $Id: refl_tauto.ml 10478 2008-01-29 10:31:39Z notin $ *) module Search = Explore.Make(Proof_search) @@ -292,7 +292,7 @@ let rtauto_tac gls= let prf = try project (search_fun (init_state [] formula)) with Not_found -> - errorlabstrm "rtauto" (Pp.str "rtauto could'nt find any proof") in + errorlabstrm "rtauto" (Pp.str "rtauto couldn't find any proof") in let search_end_time = System.get_time () in let _ = if !verbose then begin diff --git a/contrib/setoid_ring/ArithRing.v b/contrib/setoid_ring/ArithRing.v index 074f6ef7..601cabe0 100644 --- a/contrib/setoid_ring/ArithRing.v +++ b/contrib/setoid_ring/ArithRing.v @@ -32,7 +32,7 @@ Qed. Ltac natcst t := match isnatcst t with true => constr:(N_of_nat t) - | _ => InitialRing.NotConstant + | _ => constr:InitialRing.NotConstant end. Ltac Ss_to_add f acc := diff --git a/contrib/setoid_ring/Field_tac.v b/contrib/setoid_ring/Field_tac.v index aad3a580..cccee604 100644 --- a/contrib/setoid_ring/Field_tac.v +++ b/contrib/setoid_ring/Field_tac.v @@ -67,12 +67,12 @@ Ltac FFV Cst CstPow add mul sub opp div inv pow t fv := end in TFV t fv. -Ltac ParseFieldComponents lemma := +Ltac ParseFieldComponents lemma req := match type of lemma with | context [ (* PCond _ _ _ _ _ _ _ _ _ _ _ -> *) - (@FEeval ?R ?rO ?radd ?rmul ?rsub ?ropp ?rdiv ?rinv - ?C ?phi ?Cpow ?Cp_phi ?rpow _ _) ] => + req (@FEeval ?R ?rO ?radd ?rmul ?rsub ?ropp ?rdiv ?rinv + ?C ?phi ?Cpow ?Cp_phi ?rpow _ _) _ ] => (fun f => f radd rmul rsub ropp rdiv rinv rpow C) | _ => fail 1 "field anomaly: bad correctness lemma (parse)" end. @@ -119,18 +119,18 @@ Ltac Field_norm_gen f Cst_tac Pow_tac lemma Cond_lemma req n lH rl := let prh := proofHyp_tac lH in pose (vlpe := lpe); match type of lemma with - | context [mk_monpol_list ?cO ?cI ?cadd ?cmul ?csub ?copp ?ceqb _] => + | context [mk_monpol_list ?cO ?cI ?cadd ?cmul ?csub ?copp ?cdiv ?ceqb _] => compute_assertion vlmp_eq vlmp - (mk_monpol_list cO cI cadd cmul csub copp ceqb vlpe); + (mk_monpol_list cO cI cadd cmul csub copp cdiv ceqb vlpe); (assert (rr_lemma := lemma n vlpe fv prh vlmp vlmp_eq) - || fail "type error when build the rewriting lemma"); + || fail 1 "type error when build the rewriting lemma"); RW_tac rr_lemma; try clear rr_lemma vlmp_eq vlmp vlpe | _ => fail 1 "field_simplify anomaly: bad correctness lemma" end in ReflexiveRewriteTactic mkFFV mkFE simpl_field lemma_tac fv rl; try (apply Cond_lemma; simpl_PCond req) in - ParseFieldComponents lemma Main. + ParseFieldComponents lemma req Main. Ltac Field_simplify_gen f := fun req cst_tac pow_tac _ _ field_simplify_ok _ cond_ok pre post lH rl => @@ -141,33 +141,35 @@ Ltac Field_simplify_gen f := Ltac Field_simplify := Field_simplify_gen ltac:(fun H => rewrite H). -Tactic Notation (at level 0) - "field_simplify" constr_list(rl) := - match goal with [|- ?G] => field_lookup Field_simplify [] rl [G] end. +Tactic Notation (at level 0) "field_simplify" constr_list(rl) := + let G := Get_goal in + field_lookup Field_simplify [] rl G. Tactic Notation (at level 0) "field_simplify" "[" constr_list(lH) "]" constr_list(rl) := - match goal with [|- ?G] => field_lookup Field_simplify [lH] rl [G] end. + let G := Get_goal in + field_lookup Field_simplify [lH] rl G. Tactic Notation "field_simplify" constr_list(rl) "in" hyp(H):= - let G := getGoal in - let t := type of H in - let g := fresh "goal" in - set (g:= G); - generalize H;clear H; - field_lookup Field_simplify [] rl [t]; - intro H; - unfold g;clear g. - -Tactic Notation "field_simplify" "["constr_list(lH) "]" constr_list(rl) "in" hyp(H):= - let G := getGoal in - let t := type of H in - let g := fresh "goal" in - set (g:= G); - generalize H;clear H; - field_lookup Field_simplify [lH] rl [t]; - intro H; - unfold g;clear g. + let G := Get_goal in + let t := type of H in + let g := fresh "goal" in + set (g:= G); + generalize H;clear H; + field_lookup Field_simplify [] rl t; + intro H; + unfold g;clear g. + +Tactic Notation "field_simplify" + "["constr_list(lH) "]" constr_list(rl) "in" hyp(H):= + let G := Get_goal in + let t := type of H in + let g := fresh "goal" in + set (g:= G); + generalize H;clear H; + field_lookup Field_simplify [lH] rl t; + intro H; + unfold g;clear g. (* Ltac Field_simplify_in hyp:= @@ -176,12 +178,12 @@ Ltac Field_simplify_in hyp:= Tactic Notation (at level 0) "field_simplify" constr_list(rl) "in" hyp(h) := let t := type of h in - field_lookup (Field_simplify_in h) [] rl [t]. + field_lookup (Field_simplify_in h) [] rl t. Tactic Notation (at level 0) "field_simplify" "[" constr_list(lH) "]" constr_list(rl) "in" hyp(h) := let t := type of h in - field_lookup (Field_simplify_in h) [lH] rl [t]. + field_lookup (Field_simplify_in h) [lH] rl t. *) (** Generic tactic for solving equations *) @@ -224,7 +226,7 @@ Ltac Field_Scheme Simpl_tac Cst_tac Pow_tac lemma Cond_lemma req n lH := [ Simpl_tac | apply Cond_lemma; simpl_PCond req]); clear vlpe nlemma in OnEquation req Main_eq in - ParseFieldComponents lemma Main. + ParseFieldComponents lemma req Main. (* solve completely a field equation, leaving non-zero conditions to be proved (field) *) @@ -239,14 +241,15 @@ Ltac FIELD := post(). Tactic Notation (at level 0) "field" := - let G := getGoal in field_lookup FIELD [] [G]. + let G := Get_goal in + field_lookup FIELD [] G. Tactic Notation (at level 0) "field" "[" constr_list(lH) "]" := - let G := getGoal in field_lookup FIELD [lH] [G]. + let G := Get_goal in + field_lookup FIELD [lH] G. (* transforms a field equation to an equivalent (simplified) ring equation, and leaves non-zero conditions to be proved (field_simplify_eq) *) - Ltac FIELD_SIMPL := let Simpl := (protect_fv "field") in fun req cst_tac pow_tac _ field_simplify_eq_ok _ _ cond_ok pre post lH rl => @@ -256,17 +259,19 @@ Ltac FIELD_SIMPL := post(). Tactic Notation (at level 0) "field_simplify_eq" := - let G := getGoal in field_lookup FIELD_SIMPL [] [G]. + let G := Get_goal in + field_lookup FIELD_SIMPL [] G. Tactic Notation (at level 0) "field_simplify_eq" "[" constr_list(lH) "]" := - let G := getGoal in field_lookup FIELD_SIMPL [lH] [G]. + let G := Get_goal in + field_lookup FIELD_SIMPL [lH] G. (* Same as FIELD_SIMPL but in hypothesis *) Ltac Field_simplify_eq Cst_tac Pow_tac lemma Cond_lemma req n lH := let Main radd rmul rsub ropp rdiv rinv rpow C := let hyp := fresh "hyp" in - intro hyp; + intro hyp; match type of hyp with | req ?t1 ?t2 => let mkFV := FV Cst_tac Pow_tac radd rmul rsub ropp rpow in @@ -306,7 +311,7 @@ Ltac Field_simplify_eq Cst_tac Pow_tac lemma Cond_lemma req n lH := clear hyp end) end in - ParseFieldComponents lemma Main. + ParseFieldComponents lemma req Main. Ltac FIELD_SIMPL_EQ := fun req cst_tac pow_tac _ _ _ lemma cond_ok pre post lH rl => @@ -318,7 +323,7 @@ Ltac FIELD_SIMPL_EQ := Tactic Notation (at level 0) "field_simplify_eq" "in" hyp(H) := let t := type of H in generalize H; - field_lookup FIELD_SIMPL_EQ [] [t]; + field_lookup FIELD_SIMPL_EQ [] t; [ try exact I | clear H;intro H]. @@ -327,7 +332,7 @@ Tactic Notation (at level 0) "field_simplify_eq" "[" constr_list(lH) "]" "in" hyp(H) := let t := type of H in generalize H; - field_lookup FIELD_SIMPL_EQ [lH] [t]; + field_lookup FIELD_SIMPL_EQ [lH] t; [ try exact I |clear H;intro H]. @@ -347,59 +352,55 @@ Ltac coerce_to_almost_field set ext f := | semi_field_theory _ _ _ _ _ _ _ => constr:(SF2AF set f) end. -Ltac field_elements set ext fspec pspec sspec rk := +Ltac field_elements set ext fspec pspec sspec dspec rk := let afth := coerce_to_almost_field set ext fspec in let rspec := ring_of_field fspec in - ring_elements set ext rspec pspec sspec rk - ltac:(fun arth ext_r morph p_spec s_spec f => f afth ext_r morph p_spec s_spec). - -Ltac field_lemmas set ext inv_m fspec pspec sspec rk := - let simpl_eq_lemma := - match pspec with - | None => constr:(Field_simplify_eq_correct) - | Some _ => constr:(Field_simplify_eq_pow_correct) - end in - let simpl_eq_in_lemma := - match pspec with - | None => constr:(Field_simplify_eq_in_correct) - | Some _ => constr:(Field_simplify_eq_pow_in_correct) - end in - let rw_lemma := - match pspec with - | None => constr:(Field_rw_correct) - | Some _ => constr:(Field_rw_pow_correct) - end in - field_elements set ext fspec pspec sspec rk - ltac:(fun afth ext_r morph p_spec s_spec => - match p_spec with - | mkhypo ?pp_spec => match s_spec with - | mkhypo ?ss_spec => - let field_simpl_eq_ok := - constr:(simpl_eq_lemma _ _ _ _ _ _ _ _ _ _ + ring_elements set ext rspec pspec sspec dspec rk + ltac:(fun arth ext_r morph p_spec s_spec d_spec f => f afth ext_r morph p_spec s_spec d_spec). + +Ltac field_lemmas set ext inv_m fspec pspec sspec dspec rk := + let get_lemma := + match pspec with None => fun x y => x | _ => fun x y => y end in + let simpl_eq_lemma := get_lemma + Field_simplify_eq_correct Field_simplify_eq_pow_correct in + let simpl_eq_in_lemma := get_lemma + Field_simplify_eq_in_correct Field_simplify_eq_pow_in_correct in + let rw_lemma := get_lemma + Field_rw_correct Field_rw_pow_correct in + field_elements set ext fspec pspec sspec dspec rk + ltac:(fun afth ext_r morph p_spec s_spec d_spec => + match morph with + | _ => + let field_ok1 := constr:(Field_correct set ext_r inv_m afth morph) in + match p_spec with + | mkhypo ?pp_spec => + let field_ok2 := constr:(field_ok1 _ _ _ pp_spec) in + match s_spec with + | mkhypo ?ss_spec => + let field_ok3 := constr:(field_ok2 _ ss_spec) in + match d_spec with + | mkhypo ?dd_spec => + let field_ok := constr:(field_ok3 _ dd_spec) in + let mk_lemma lemma := + constr:(lemma _ _ _ _ _ _ _ _ _ _ set ext_r inv_m afth _ _ _ _ _ _ _ _ _ morph - _ _ _ pp_spec _ ss_spec) in - let field_simpl_ok := - constr:(rw_lemma _ _ _ _ _ _ _ _ _ _ - set ext_r inv_m afth - _ _ _ _ _ _ _ _ _ morph - _ _ _ pp_spec _ ss_spec) in - let field_simpl_eq_in := - constr:(simpl_eq_in_lemma _ _ _ _ _ _ _ _ _ _ - set ext_r inv_m afth - _ _ _ _ _ _ _ _ _ morph - _ _ _ pp_spec _ ss_spec) in - let field_ok := - constr:(Field_correct set ext_r inv_m afth morph pp_spec ss_spec) in - let cond1_ok := - constr:(Pcond_simpl_gen set ext_r afth morph pp_spec) in - let cond2_ok := - constr:(Pcond_simpl_complete set ext_r afth morph pp_spec) in - (fun f => - f afth ext_r morph field_ok field_simpl_ok field_simpl_eq_ok field_simpl_eq_in - cond1_ok cond2_ok) - | _ => fail 2 "bad sign specification" - end - | _ => fail 1 "bad power specification" + _ _ _ pp_spec _ ss_spec _ dd_spec) in + let field_simpl_eq_ok := mk_lemma simpl_eq_lemma in + let field_simpl_ok := mk_lemma rw_lemma in + let field_simpl_eq_in := mk_lemma simpl_eq_in_lemma in + let cond1_ok := + constr:(Pcond_simpl_gen set ext_r afth morph pp_spec dd_spec) in + let cond2_ok := + constr:(Pcond_simpl_complete set ext_r afth morph pp_spec dd_spec) in + (fun f => + f afth ext_r morph field_ok field_simpl_ok field_simpl_eq_ok field_simpl_eq_in + cond1_ok cond2_ok) + | _ => fail 4 "field: bad coefficiant division specification" + end + | _ => fail 3 "field: bad sign specification" + end + | _ => fail 2 "field: bad power specification" + end + | _ => fail 1 "field internal error : field_lemmas, please report" end). - diff --git a/contrib/setoid_ring/Field_theory.v b/contrib/setoid_ring/Field_theory.v index ea8421cf..65a397ac 100644 --- a/contrib/setoid_ring/Field_theory.v +++ b/contrib/setoid_ring/Field_theory.v @@ -74,7 +74,7 @@ Qed. Notation "[ x ]" := (phi x) (at level 0). - (* Usefull tactics *) + (* Useful tactics *) Add Setoid R req Rsth as R_set1. Add Morphism radd : radd_ext. exact (Radd_ext Reqe). Qed. Add Morphism rmul : rmul_ext. exact (Rmul_ext Reqe). Qed. @@ -102,10 +102,13 @@ Hint Resolve (ARadd_0_l ARth) (ARadd_comm ARth) (ARadd_assoc ARth) Variable pow_th : power_theory rI rmul req Cp_phi rpow. (* sign function *) Variable get_sign : C -> option C. - Variable get_sign_spec : sign_theory ropp req phi get_sign. + Variable get_sign_spec : sign_theory copp ceqb get_sign. + + Variable cdiv:C -> C -> C*C. + Variable cdiv_th : div_theory req cadd cmul phi cdiv. Notation NPEeval := (PEeval rO radd rmul rsub ropp phi Cp_phi rpow). -Notation Nnorm := (norm_subst cO cI cadd cmul csub copp ceqb). +Notation Nnorm:= (norm_subst cO cI cadd cmul csub copp ceqb cdiv). Notation NPphi_dev := (Pphi_dev rO rI radd rmul rsub ropp cO cI ceqb phi get_sign). Notation NPphi_pow := (Pphi_pow rO rI radd rmul rsub ropp cO cI ceqb phi Cp_phi rpow get_sign). @@ -300,7 +303,30 @@ transitivity (r2 * (r1 / r2) * (r4 * (r3 / r4))); [ ring | idtac ]. repeat rewrite rdiv_simpl in |- *; trivial. Qed. - Theorem rdiv7: + Theorem rdiv4b: + forall r1 r2 r3 r4 r5 r6, + ~ r2 * r5 == 0 -> + ~ r4 * r6 == 0 -> + ((r1 * r6) / (r2 * r5)) * ((r3 * r5) / (r4 * r6)) == (r1 * r3) / (r2 * r4). +Proof. +intros r1 r2 r3 r4 r5 r6 H H0. +rewrite rdiv4; auto. +transitivity ((r5 * r6) * (r1 * r3) / ((r5 * r6) * (r2 * r4))). +apply SRdiv_ext; ring. +assert (HH: ~ r5*r6 == 0). + apply field_is_integral_domain. + intros H1; case H; rewrite H1; ring. + intros H1; case H0; rewrite H1; ring. +rewrite <- rdiv4 ; auto. + rewrite rdiv_r_r; auto. + + apply field_is_integral_domain. + intros H1; case H; rewrite H1; ring. + intros H1; case H0; rewrite H1; ring. +Qed. + + +Theorem rdiv7: forall r1 r2 r3 r4, ~ r2 == 0 -> ~ r3 == 0 -> @@ -313,6 +339,29 @@ rewrite rdiv6 in |- *; trivial. apply rdiv4; trivial. Qed. +Theorem rdiv7b: + forall r1 r2 r3 r4 r5 r6, + ~ r2 * r6 == 0 -> + ~ r3 * r5 == 0 -> + ~ r4 * r6 == 0 -> + ((r1 * r5) / (r2 * r6)) / ((r3 * r5) / (r4 * r6)) == (r1 * r4) / (r2 * r3). +Proof. +intros. +rewrite rdiv7; auto. +transitivity ((r5 * r6) * (r1 * r4) / ((r5 * r6) * (r2 * r3))). +apply SRdiv_ext; ring. +assert (HH: ~ r5*r6 == 0). + apply field_is_integral_domain. + intros H2; case H0; rewrite H2; ring. + intros H2; case H1; rewrite H2; ring. +rewrite <- rdiv4 ; auto. +rewrite rdiv_r_r; auto. + apply field_is_integral_domain. + intros H2; case H; rewrite H2; ring. + intros H2; case H0; rewrite H2; ring. +Qed. + + Theorem rdiv8: forall r1 r2, ~ r2 == 0 -> r1 == 0 -> r1 / r2 == 0. intros r1 r2 H H0. transitivity (r1 * / r2); auto. @@ -331,8 +380,7 @@ transitivity (r1 / r2 * (r4 / r4)). rewrite H1 in |- *. rewrite (ARmul_comm ARth r2 r4) in |- *. rewrite <- rdiv4 in |- *; trivial. - rewrite rdiv_r_r in |- *. - trivial. + rewrite rdiv_r_r in |- * by trivial. apply (ARmul_1_r Rsth ARth). Qed. @@ -395,7 +443,7 @@ Add Morphism (pow_pos rmul) : pow_morph. intros x y H p;induction p as [p IH| p IH|];simpl;auto;ring[IH]. Qed. -Add Morphism (pow_N rI rmul) : pow_N_morph. +Add Morphism (pow_N rI rmul) with signature req ==> (@eq N) ==> req as pow_N_morph. intros x y H [|p];simpl;auto. apply pow_morph;trivial. Qed. (* @@ -451,7 +499,7 @@ Proof. intros l e1 e2. destruct e1; destruct e2; simpl in |- *; try reflexivity; try apply ceqb_rect; try (intro eq_c; rewrite eq_c in |- *); simpl in |- *;try apply eq_refl; - try ring [(morph0 CRmorph)]. + try (ring [(morph0 CRmorph)]). apply (morph_add CRmorph). Qed. @@ -613,6 +661,8 @@ Fixpoint FEeval (l : list R) (pe : FExpr) {struct pe} : R := | FEpow x n => rpow (FEeval l x) (Cp_phi n) end. +Strategy expand [FEeval]. + (* The result of the normalisation *) Record linear : Type := mk_linear { @@ -732,7 +782,7 @@ Proof. case_eq ((p1 ?= p2)%positive Eq);intros;simpl. repeat rewrite pow_th.(rpow_pow_N);simpl. split. 2:refine (refl_equal _). rewrite (Pcompare_Eq_eq _ _ H0). - rewrite H;[trivial | ring [ (morph1 CRmorph)]]. + rewrite H by trivial. ring [ (morph1 CRmorph)]. fold (NPEpow e2 (Npos (p2 - p1))). rewrite NPEpow_correct;simpl. repeat rewrite pow_th.(rpow_pow_N);simpl. @@ -813,7 +863,7 @@ destruct n. (Zpos p1 - Zpos p6 = Zpos p1 - Zpos p4 + (Zpos p4 - Zpos p6))%Z. change ((Zpos p1 - Zpos p6)%Z = (Zpos p1 + (- Zpos p4) + (Zpos p4 +(- Zpos p6)))%Z). rewrite <- Zplus_assoc. rewrite (Zplus_assoc (- Zpos p4)). - simpl. rewrite Pcompare_refl. reflexivity. + simpl. rewrite Pcompare_refl. simpl. reflexivity. unfold Zminus, Zopp in H0. simpl in H0. rewrite H2 in H0;rewrite H4 in H0;rewrite H in H0. inversion H0;trivial. simpl. repeat rewrite pow_th.(rpow_pow_N). @@ -961,8 +1011,10 @@ Fixpoint Fnorm (e : FExpr) : linear := | FEmul e1 e2 => let x := Fnorm e1 in let y := Fnorm e2 in - mk_linear (NPEmul (num x) (num y)) - (NPEmul (denum x) (denum y)) + let s1 := split (num x) (denum y) in + let s2 := split (num y) (denum x) in + mk_linear (NPEmul (left s1) (left s2)) + (NPEmul (right s2) (right s1)) (condition x ++ condition y) | FEopp e1 => let x := Fnorm e1 in @@ -973,8 +1025,10 @@ Fixpoint Fnorm (e : FExpr) : linear := | FEdiv e1 e2 => let x := Fnorm e1 in let y := Fnorm e2 in - mk_linear (NPEmul (num x) (denum y)) - (NPEmul (denum x) (num y)) + let s1 := split (num x) (num y) in + let s2 := split (denum x) (denum y) in + mk_linear (NPEmul (left s1) (right s2)) + (NPEmul (left s2) (right s1)) (num y :: condition x ++ condition y) | FEpow e1 n => let x := Fnorm e1 in @@ -996,10 +1050,11 @@ Proof. induction p;simpl. intro Hp;assert (H1 := @rmul_reg_l _ (pow_pos rmul x p * pow_pos rmul x p) 0 H). apply IHp. - rewrite (@rmul_reg_l _ (pow_pos rmul x p) 0 IHp). rewrite H1. rewrite Hp;ring. ring. - reflexivity. + rewrite (@rmul_reg_l _ (pow_pos rmul x p) 0 IHp). + reflexivity. + rewrite H1. ring. rewrite Hp;ring. intro Hp;apply IHp. rewrite (@rmul_reg_l _ (pow_pos rmul x p) 0 IHp). - rewrite Hp;ring. reflexivity. trivial. + reflexivity. rewrite Hp;ring. trivial. Qed. Theorem Pcond_Fnorm: @@ -1040,10 +1095,14 @@ intros l e; elim e. rewrite NPEmul_correct in |- *. simpl in |- *. apply field_is_integral_domain. - apply Hrec1. + intros HH; apply Hrec1. apply PCond_app_inv_l with (1 := Hcond). - apply Hrec2. + rewrite (split_correct_r l (num (Fnorm e2)) (denum (Fnorm e1))). + rewrite NPEmul_correct; simpl; rewrite HH; ring. + intros HH; apply Hrec2. apply PCond_app_inv_r with (1 := Hcond). + rewrite (split_correct_r l (num (Fnorm e1)) (denum (Fnorm e2))). + rewrite NPEmul_correct; simpl; rewrite HH; ring. intros e1 Hrec1 Hcond. simpl condition in Hcond. simpl denum in |- *. @@ -1058,10 +1117,14 @@ intros l e; elim e. rewrite NPEmul_correct in |- *. simpl in |- *. apply field_is_integral_domain. - apply Hrec1. + intros HH; apply Hrec1. specialize PCond_cons_inv_r with (1:=Hcond); intro Hcond1. apply PCond_app_inv_l with (1 := Hcond1). - apply PCond_cons_inv_l with (1:=Hcond). + rewrite (split_correct_l l (denum (Fnorm e1)) (denum (Fnorm e2))). + rewrite NPEmul_correct; simpl; rewrite HH; ring. + intros HH; apply PCond_cons_inv_l with (1:=Hcond). + rewrite (split_correct_r l (num (Fnorm e1)) (num (Fnorm e2))). + rewrite NPEmul_correct; simpl; rewrite HH; ring. simpl;intros e1 Hrec1 n Hcond. rewrite NPEpow_correct. simpl;rewrite pow_th.(rpow_pow_N). @@ -1124,7 +1187,16 @@ assert (HH2: PCond l (condition (Fnorm e2))). apply PCond_app_inv_r with ( 1 := HH ). rewrite (He1 HH1); rewrite (He2 HH2). repeat rewrite NPEmul_correct; simpl. -apply rdiv4; auto. +generalize (split_correct_l l (num (Fnorm e1)) (denum (Fnorm e2))) + (split_correct_r l (num (Fnorm e1)) (denum (Fnorm e2))) + (split_correct_l l (num (Fnorm e2)) (denum (Fnorm e1))) + (split_correct_r l (num (Fnorm e2)) (denum (Fnorm e1))). +repeat rewrite NPEmul_correct; simpl. +intros U1 U2 U3 U4; rewrite U1; rewrite U2; rewrite U3; + rewrite U4; simpl. +apply rdiv4b; auto. + rewrite <- U4; auto. + rewrite <- U2; auto. intros e1 He1 HH. rewrite NPEopp_correct; simpl; rewrite (He1 HH); apply rdiv5; auto. @@ -1144,8 +1216,18 @@ apply PCond_app_inv_r with (condition (Fnorm e1)). apply PCond_cons_inv_r with ( 1 := HH ). rewrite (He1 HH1); rewrite (He2 HH2). repeat rewrite NPEmul_correct;simpl. -apply rdiv7; auto. +generalize (split_correct_l l (num (Fnorm e1)) (num (Fnorm e2))) + (split_correct_r l (num (Fnorm e1)) (num (Fnorm e2))) + (split_correct_l l (denum (Fnorm e1)) (denum (Fnorm e2))) + (split_correct_r l (denum (Fnorm e1)) (denum (Fnorm e2))). +repeat rewrite NPEmul_correct; simpl. +intros U1 U2 U3 U4; rewrite U1; rewrite U2; rewrite U3; + rewrite U4; simpl. +apply rdiv7b; auto. + rewrite <- U3; auto. + rewrite <- U2; auto. apply PCond_cons_inv_l with ( 1 := HH ). + rewrite <- U4; auto. intros e1 He1 n Hcond;assert (He1' := He1 Hcond);clear He1. repeat rewrite NPEpow_correct;simpl;repeat rewrite pow_th.(rpow_pow_N). @@ -1155,13 +1237,15 @@ generalize (NPEeval l (num (Fnorm e1))) (NPEeval l (denum (Fnorm e1))) (Pcond_Fnorm _ _ Hcond). intros r r0 Hdiff;induction p;simpl. repeat (rewrite <- rdiv4;trivial). -intro Hp;apply (pow_pos_not_0 Hdiff p). +rewrite IHp. reflexivity. +apply pow_pos_not_0;trivial. +apply pow_pos_not_0;trivial. +intro Hp. apply (pow_pos_not_0 Hdiff p). rewrite (@rmul_reg_l (pow_pos rmul r0 p) (pow_pos rmul r0 p) 0). - apply pow_pos_not_0;trivial. ring [Hp]. reflexivity. -apply pow_pos_not_0;trivial. apply pow_pos_not_0;trivial. -rewrite IHp;reflexivity. -rewrite <- rdiv4;trivial. apply pow_pos_not_0;trivial. apply pow_pos_not_0;trivial. + reflexivity. apply pow_pos_not_0;trivial. ring [Hp]. +rewrite <- rdiv4;trivial. rewrite IHp;reflexivity. +apply pow_pos_not_0;trivial. apply pow_pos_not_0;trivial. reflexivity. Qed. @@ -1174,9 +1258,9 @@ Theorem Fnorm_crossproduct: PCond l (condition nfe1 ++ condition nfe2) -> FEeval l fe1 == FEeval l fe2. intros l fe1 fe2 nfe1 nfe2 Hcrossprod Hcond; subst nfe1 nfe2. -rewrite Fnorm_FEeval_PEeval in |- *. +rewrite Fnorm_FEeval_PEeval in |- * by apply PCond_app_inv_l with (1 := Hcond). - rewrite Fnorm_FEeval_PEeval in |- *. + rewrite Fnorm_FEeval_PEeval in |- * by apply PCond_app_inv_r with (1 := Hcond). apply cross_product_eq; trivial. apply Pcond_Fnorm. @@ -1187,7 +1271,7 @@ Qed. (* Correctness lemmas of reflexive tactics *) Notation Ninterp_PElist := (interp_PElist rO radd rmul rsub ropp req phi Cp_phi rpow). -Notation Nmk_monpol_list := (mk_monpol_list cO cI cadd cmul csub copp ceqb). +Notation Nmk_monpol_list := (mk_monpol_list cO cI cadd cmul csub copp ceqb cdiv). Theorem Fnorm_correct: forall n l lpe fe, @@ -1198,7 +1282,7 @@ intros n l lpe fe Hlpe H H1; apply eq_trans with (1 := Fnorm_FEeval_PEeval l fe H1). apply rdiv8; auto. transitivity (NPEeval l (PEc cO)); auto. -rewrite (norm_subst_ok Rsth Reqe ARth CRmorph pow_th n l lpe);auto. +rewrite (norm_subst_ok Rsth Reqe ARth CRmorph pow_th cdiv_th n l lpe);auto. change (NPEeval l (PEc cO)) with (Pphi 0 radd rmul phi l (Pc cO)). apply (Peq_ok Rsth Reqe CRmorph);auto. simpl. apply (morph0 CRmorph); auto. @@ -1270,9 +1354,9 @@ intros l fe1 fe2 nfe1 nfe2 eq1 eq2 Hcrossprod Hcond; subst nfe1 nfe2. apply Fnorm_crossproduct; trivial. match goal with [ |- NPEeval l ?x == NPEeval l ?y] => - rewrite (ring_rw_correct Rsth Reqe ARth CRmorph pow_th get_sign_spec + rewrite (ring_rw_correct Rsth Reqe ARth CRmorph pow_th cdiv_th get_sign_spec O nil l I (refl_equal nil) x (refl_equal (Nnorm O nil x))); - rewrite (ring_rw_correct Rsth Reqe ARth CRmorph pow_th get_sign_spec + rewrite (ring_rw_correct Rsth Reqe ARth CRmorph pow_th cdiv_th get_sign_spec O nil l I (refl_equal nil) y (refl_equal (Nnorm O nil y))) end. trivial. @@ -1303,14 +1387,14 @@ repeat rewrite (ARmul_assoc ARth) in |- *. rewrite <-( let x := PEmul (num (Fnorm fe1)) (rsplit_right (split (denum (Fnorm fe1)) (denum (Fnorm fe2)))) in -ring_rw_correct Rsth Reqe ARth CRmorph pow_th get_sign_spec n lpe l +ring_rw_correct Rsth Reqe ARth CRmorph pow_th cdiv_th get_sign_spec n lpe l Hlpe (refl_equal (Nmk_monpol_list lpe)) x (refl_equal (Nnorm n (Nmk_monpol_list lpe) x))) in Hcrossprod. rewrite <-( let x := (PEmul (num (Fnorm fe2)) (rsplit_left (split (denum (Fnorm fe1)) (denum (Fnorm fe2))))) in - ring_rw_correct Rsth Reqe ARth CRmorph pow_th get_sign_spec n lpe l + ring_rw_correct Rsth Reqe ARth CRmorph pow_th cdiv_th get_sign_spec n lpe l Hlpe (refl_equal (Nmk_monpol_list lpe)) x (refl_equal (Nnorm n (Nmk_monpol_list lpe) x))) in Hcrossprod. simpl in Hcrossprod. @@ -1343,14 +1427,14 @@ repeat rewrite (ARmul_assoc ARth) in |- *. rewrite <-( let x := PEmul (num (Fnorm fe1)) (rsplit_right (split (denum (Fnorm fe1)) (denum (Fnorm fe2)))) in -ring_rw_pow_correct Rsth Reqe ARth CRmorph pow_th get_sign_spec n lpe l +ring_rw_pow_correct Rsth Reqe ARth CRmorph pow_th cdiv_th get_sign_spec n lpe l Hlpe (refl_equal (Nmk_monpol_list lpe)) x (refl_equal (Nnorm n (Nmk_monpol_list lpe) x))) in Hcrossprod. rewrite <-( let x := (PEmul (num (Fnorm fe2)) (rsplit_left (split (denum (Fnorm fe1)) (denum (Fnorm fe2))))) in - ring_rw_pow_correct Rsth Reqe ARth CRmorph pow_th get_sign_spec n lpe l + ring_rw_pow_correct Rsth Reqe ARth CRmorph pow_th cdiv_th get_sign_spec n lpe l Hlpe (refl_equal (Nmk_monpol_list lpe)) x (refl_equal (Nnorm n (Nmk_monpol_list lpe) x))) in Hcrossprod. simpl in Hcrossprod. @@ -1394,18 +1478,18 @@ Proof. rewrite <- (@AFinv_l AFth (NPEeval l (denum (Fnorm fe2))));trivial. ring [Heq]. rewrite (ARth.(ARmul_comm) (/ NPEeval l (denum (Fnorm fe2)))). repeat rewrite <- (ARth.(ARmul_assoc)). - rewrite <- (AFth.(AFdiv_def)). rewrite rdiv_r_r. trivial. + rewrite <- (AFth.(AFdiv_def)). rewrite rdiv_r_r by trivial. apply (@rmul_reg_l (/NPEeval l (denum (Fnorm fe1)))). intro Heq; apply AFth.(AF_1_neq_0). rewrite <- (@AFinv_l AFth (NPEeval l (denum (Fnorm fe1))));trivial. ring [Heq]. repeat rewrite (ARth.(ARmul_comm) (/ NPEeval l (denum (Fnorm fe1)))). repeat rewrite <- (ARth.(ARmul_assoc)). - repeat rewrite <- (AFth.(AFdiv_def)). rewrite rdiv_r_r. trivial. + repeat rewrite <- (AFth.(AFdiv_def)). rewrite rdiv_r_r by trivial. rewrite (AFth.(AFdiv_def)). ring_simplify. unfold SRopp. rewrite (ARth.(ARmul_comm) (/ NPEeval l (denum (Fnorm fe2)))). repeat rewrite <- (AFth.(AFdiv_def)). - repeat rewrite <- Fnorm_FEeval_PEeval;trivial. - apply (PCond_app_inv_l _ _ _ H7). apply (PCond_app_inv_r _ _ _ H7). + repeat rewrite <- Fnorm_FEeval_PEeval ; trivial. + apply (PCond_app_inv_r _ _ _ H7). apply (PCond_app_inv_l _ _ _ H7). Qed. Theorem Field_simplify_eq_in_correct : @@ -1444,18 +1528,18 @@ Proof. rewrite <- (@AFinv_l AFth (NPEeval l (denum (Fnorm fe2))));trivial. ring [Heq]. rewrite (ARth.(ARmul_comm) (/ NPEeval l (denum (Fnorm fe2)))). repeat rewrite <- (ARth.(ARmul_assoc)). - rewrite <- (AFth.(AFdiv_def)). rewrite rdiv_r_r. trivial. + rewrite <- (AFth.(AFdiv_def)). rewrite rdiv_r_r by trivial. apply (@rmul_reg_l (/NPEeval l (denum (Fnorm fe1)))). intro Heq; apply AFth.(AF_1_neq_0). rewrite <- (@AFinv_l AFth (NPEeval l (denum (Fnorm fe1))));trivial. ring [Heq]. repeat rewrite (ARth.(ARmul_comm) (/ NPEeval l (denum (Fnorm fe1)))). repeat rewrite <- (ARth.(ARmul_assoc)). - repeat rewrite <- (AFth.(AFdiv_def)). rewrite rdiv_r_r. trivial. + repeat rewrite <- (AFth.(AFdiv_def)). rewrite rdiv_r_r by trivial. rewrite (AFth.(AFdiv_def)). ring_simplify. unfold SRopp. rewrite (ARth.(ARmul_comm) (/ NPEeval l (denum (Fnorm fe2)))). repeat rewrite <- (AFth.(AFdiv_def)). repeat rewrite <- Fnorm_FEeval_PEeval;trivial. - apply (PCond_app_inv_l _ _ _ H7). apply (PCond_app_inv_r _ _ _ H7). + apply (PCond_app_inv_r _ _ _ H7). apply (PCond_app_inv_l _ _ _ H7). Qed. @@ -1524,7 +1608,7 @@ Theorem PFcons0_fcons_inv: intros l a l1; elim l1; simpl Fcons0; auto. simpl; auto. intros a0 l0. -generalize (ring_correct Rsth Reqe ARth CRmorph pow_th O l nil a a0). simpl. +generalize (ring_correct Rsth Reqe ARth CRmorph pow_th cdiv_th O l nil a a0). simpl. case (Peq ceqb (Nnorm O nil a) (Nnorm O nil a0)). intros H H0 H1; split; auto. rewrite H; auto. diff --git a/contrib/setoid_ring/InitialRing.v b/contrib/setoid_ring/InitialRing.v index f5f845c2..c1fa963f 100644 --- a/contrib/setoid_ring/InitialRing.v +++ b/contrib/setoid_ring/InitialRing.v @@ -13,13 +13,13 @@ Require Import BinNat. Require Import Setoid. Require Import Ring_theory. Require Import Ring_polynom. +Require Import ZOdiv_def. Import List. Set Implicit Arguments. Import RingSyntax. - (* An object to return when an expression is not recognized as a constant *) Definition NotConstant := false. @@ -101,19 +101,19 @@ Section ZMORPHISM. | _ => None end. - Lemma get_signZ_th : sign_theory ropp req gen_phiZ get_signZ. + Lemma get_signZ_th : sign_theory Zopp Zeq_bool get_signZ. Proof. constructor. destruct c;intros;try discriminate. injection H;clear H;intros H1;subst c'. - simpl;rrefl. + simpl. unfold Zeq_bool. rewrite Zcompare_refl. trivial. Qed. Section ALMOST_RING. Variable ARth : almost_ring_theory 0 1 radd rmul rsub ropp req. Add Morphism rsub : rsub_ext3. exact (ARsub_ext Rsth Reqe ARth). Qed. - Ltac norm := gen_srewrite 0 1 radd rmul rsub ropp req Rsth Reqe ARth. + Ltac norm := gen_srewrite Rsth Reqe ARth. Ltac add_push := gen_add_push radd Rsth Reqe ARth. Lemma same_gen : forall x, gen_phiPOS1 x == gen_phiPOS x. @@ -161,7 +161,7 @@ Section ZMORPHISM. Variable Rth : ring_theory 0 1 radd rmul rsub ropp req. Let ARth := Rth_ARth Rsth Reqe Rth. Add Morphism rsub : rsub_ext4. exact (ARsub_ext Rsth Reqe ARth). Qed. - Ltac norm := gen_srewrite 0 1 radd rmul rsub ropp req Rsth Reqe ARth. + Ltac norm := gen_srewrite Rsth Reqe ARth. Ltac add_push := gen_add_push radd Rsth Reqe ARth. (*morphisms are extensionaly equal*) @@ -243,7 +243,7 @@ Section ZMORPHISM. Zplus Zmult Zeq_bool gen_phiZ). apply mkRmorph;simpl;try rrefl. apply gen_phiZ_add. apply gen_phiZ_mul. apply gen_Zeqb_ok. - apply (Smorph_morph Rsth Reqe Rth Zsth Zth SRmorph gen_phiZ_ext). + apply (Smorph_morph Rsth Reqe Rth Zth SRmorph gen_phiZ_ext). Qed. End ZMORPHISM. @@ -317,8 +317,8 @@ Section NMORPHISM. Add Morphism rmul : rmul_ext4. exact (Rmul_ext Reqe). Qed. Add Morphism ropp : ropp_ext4. exact (Ropp_ext Reqe). Qed. Add Morphism rsub : rsub_ext5. exact (ARsub_ext Rsth Reqe ARth). Qed. - Ltac norm := gen_srewrite 0 1 radd rmul rsub ropp req Rsth Reqe ARth. - + Ltac norm := gen_srewrite Rsth Reqe ARth. + Definition gen_phiN1 x := match x with | N0 => 0 @@ -433,7 +433,7 @@ Section NWORDMORPHISM. Variable ARth : almost_ring_theory 0 1 radd rmul rsub ropp req. Add Morphism rsub : rsub_ext7. exact (ARsub_ext Rsth Reqe ARth). Qed. - Ltac norm := gen_srewrite 0 1 radd rmul rsub ropp req Rsth Reqe ARth. + Ltac norm := gen_srewrite Rsth Reqe ARth. Ltac add_push := gen_add_push radd Rsth Reqe ARth. Fixpoint gen_phiNword (w : Nword) : R := @@ -515,12 +515,12 @@ induction x; intros. simpl Nwadd in |- *. repeat rewrite gen_phiNword_cons in |- *. - rewrite (fun sreq => gen_phiN_add Rsth sreq (ARth_SRth ARth)) in |- *. - destruct Reqe; constructor; trivial. + rewrite (fun sreq => gen_phiN_add Rsth sreq (ARth_SRth ARth)) in |- * by + (destruct Reqe; constructor; trivial). - rewrite IHx in |- *. - norm. - add_push (- gen_phiNword x); reflexivity. + rewrite IHx in |- *. + norm. + add_push (- gen_phiNword x); reflexivity. Qed. Lemma Nwopp_ok : forall x, gen_phiNword (Nwopp x) == - gen_phiNword x. @@ -537,8 +537,8 @@ induction x; intros. simpl Nwscal in |- *. repeat rewrite gen_phiNword_cons in |- *. - rewrite (fun sreq => gen_phiN_mult Rsth sreq (ARth_SRth ARth)) in |- *. - destruct Reqe; constructor; trivial. + rewrite (fun sreq => gen_phiN_mult Rsth sreq (ARth_SRth ARth)) in |- * + by (destruct Reqe; constructor; trivial). rewrite IHx in |- *. norm. @@ -592,7 +592,70 @@ Qed. End NWORDMORPHISM. +Section GEN_DIV. + + Variables (R : Type) (rO : R) (rI : R) (radd : R -> R -> R) + (rmul : R -> R -> R) (rsub : R -> R -> R) (ropp : R -> R) + (req : R -> R -> Prop) (C : Type) (cO : C) (cI : C) + (cadd : C -> C -> C) (cmul : C -> C -> C) (csub : C -> C -> C) + (copp : C -> C) (ceqb : C -> C -> bool) (phi : C -> R). + Variable Rsth : Setoid_Theory R req. + Variable Reqe : ring_eq_ext radd rmul ropp req. + Variable ARth : almost_ring_theory rO rI radd rmul rsub ropp req. + Variable morph : ring_morph rO rI radd rmul rsub ropp req cO cI cadd cmul csub copp ceqb phi. + + (* Useful tactics *) + Add Setoid R req Rsth as R_set1. + Ltac rrefl := gen_reflexivity Rsth. + Add Morphism radd : radd_ext. exact (Radd_ext Reqe). Qed. + Add Morphism rmul : rmul_ext. exact (Rmul_ext Reqe). Qed. + Add Morphism ropp : ropp_ext. exact (Ropp_ext Reqe). Qed. + Add Morphism rsub : rsub_ext. exact (ARsub_ext Rsth Reqe ARth). Qed. + Ltac rsimpl := gen_srewrite Rsth Reqe ARth. + + Definition triv_div x y := + if ceqb x y then (cI, cO) + else (cO, x). + + Ltac Esimpl :=repeat (progress ( + match goal with + | |- context [phi cO] => rewrite (morph0 morph) + | |- context [phi cI] => rewrite (morph1 morph) + | |- context [phi (cadd ?x ?y)] => rewrite ((morph_add morph) x y) + | |- context [phi (cmul ?x ?y)] => rewrite ((morph_mul morph) x y) + | |- context [phi (csub ?x ?y)] => rewrite ((morph_sub morph) x y) + | |- context [phi (copp ?x)] => rewrite ((morph_opp morph) x) + end)). + + Lemma triv_div_th : Ring_theory.div_theory req cadd cmul phi triv_div. + Proof. + constructor. + intros a b;unfold triv_div. + assert (X:= morph.(morph_eq) a b);destruct (ceqb a b). + Esimpl. + rewrite X; trivial. + rsimpl. + Esimpl; rsimpl. +Qed. + + Variable zphi : Z -> R. + + Lemma Ztriv_div_th : div_theory req Zplus Zmult zphi ZOdiv_eucl. + Proof. + constructor. + intros; generalize (ZOdiv_eucl_correct a b); case ZOdiv_eucl; intros; subst. + rewrite Zmult_comm; rsimpl. + Qed. + Variable nphi : N -> R. + + Lemma Ntriv_div_th : div_theory req Nplus Nmult nphi Ndiv_eucl. + constructor. + intros; generalize (Ndiv_eucl_correct a b); case Ndiv_eucl; intros; subst. + rewrite Nmult_comm; rsimpl. + Qed. + +End GEN_DIV. (* syntaxification of constants in an abstract ring: the inverse of gen_phiPOS *) @@ -604,17 +667,17 @@ End NWORDMORPHISM. | (add rI (add rI rI)) => constr:3%positive | (mul (add rI rI) ?p) => (* 2p *) match inv_cst p with - NotConstant => NotConstant - | 1%positive => NotConstant (* 2*1 is not convertible to 2 *) + NotConstant => constr:NotConstant + | 1%positive => constr:NotConstant (* 2*1 is not convertible to 2 *) | ?p => constr:(xO p) end | (add rI (mul (add rI rI) ?p)) => (* 1+2p *) match inv_cst p with - NotConstant => NotConstant - | 1%positive => NotConstant + NotConstant => constr:NotConstant + | 1%positive => constr:NotConstant | ?p => constr:(xI p) end - | _ => NotConstant + | _ => constr:NotConstant end in inv_cst t. @@ -624,7 +687,7 @@ End NWORDMORPHISM. rO => constr:NwO | _ => match inv_gen_phi_pos rI add mul t with - NotConstant => NotConstant + NotConstant => constr:NotConstant | ?p => constr:(Npos p::nil) end end. @@ -636,7 +699,7 @@ End NWORDMORPHISM. rO => constr:0%N | _ => match inv_gen_phi_pos rI add mul t with - NotConstant => NotConstant + NotConstant => constr:NotConstant | ?p => constr:(Npos p) end end. @@ -647,12 +710,12 @@ End NWORDMORPHISM. rO => constr:0%Z | (opp ?p) => match inv_gen_phi_pos rI add mul p with - NotConstant => NotConstant + NotConstant => constr:NotConstant | ?p => constr:(Zneg p) end | _ => match inv_gen_phi_pos rI add mul t with - NotConstant => NotConstant + NotConstant => constr:NotConstant | ?p => constr:(Zpos p) end end. @@ -668,7 +731,7 @@ Ltac inv_gen_phi rO rI cO cI t := end. (* A simple tactic recognizing no constant *) - Ltac inv_morph_nothing t := constr:(NotConstant). + Ltac inv_morph_nothing t := constr:NotConstant. Ltac coerce_to_almost_ring set ext rspec := match type of rspec with @@ -710,31 +773,42 @@ Ltac gen_ring_pow set arth pspec := | Some ?t => constr:(t) end. -Ltac default_sign_spec morph := +Ltac gen_ring_sign morph sspec := + match sspec with + | None => + match type of morph with + | @ring_morph ?R ?r0 ?rI ?radd ?rmul ?rsub ?ropp ?req + Z ?c0 ?c1 ?cadd ?cmul ?csub ?copp ?ceqb ?phi => + constr:(@mkhypo (sign_theory copp ceqb get_signZ) get_signZ_th) + | @ring_morph ?R ?r0 ?rI ?radd ?rmul ?rsub ?ropp ?req + ?C ?c0 ?c1 ?cadd ?cmul ?csub ?copp ?ceqb ?phi => + constr:(mkhypo (@get_sign_None_th C copp ceqb)) + | _ => fail 2 "ring anomaly : default_sign_spec" + end + | Some ?t => constr:(t) + end. + +Ltac default_div_spec set reqe arth morph := match type of morph with + | @ring_morph ?R ?r0 ?rI ?radd ?rmul ?rsub ?ropp ?req + Z ?c0 ?c1 Zplus Zmult ?csub ?copp ?ceq_b ?phi => + constr:(mkhypo (Ztriv_div_th set phi)) + | @ring_morph ?R ?r0 ?rI ?radd ?rmul ?rsub ?ropp ?req + N ?c0 ?c1 Nplus Nmult ?csub ?copp ?ceq_b ?phi => + constr:(mkhypo (Ntriv_div_th set phi)) | @ring_morph ?R ?r0 ?rI ?radd ?rmul ?rsub ?ropp ?req ?C ?c0 ?c1 ?cadd ?cmul ?csub ?copp ?ceq_b ?phi => - constr:(mkhypo (@get_sign_None_th R ropp req C phi)) + constr:(mkhypo (triv_div_th set reqe arth morph)) | _ => fail 1 "ring anomaly : default_sign_spec" end. -Ltac gen_ring_sign set rspec morph sspec rk := - match sspec with - | None => - match rk with - | Abstract => - match type of rspec with - | @ring_theory ?R ?rO ?rI ?radd ?rmul ?rsub ?ropp ?req => - constr:(mkhypo (@get_signZ_th R rO rI radd rmul ropp req set)) - | _ => default_sign_spec morph - end - | _ => default_sign_spec morph - end +Ltac gen_ring_div set reqe arth morph dspec := + match dspec with + | None => default_div_spec set reqe arth morph | Some ?t => constr:(t) end. - - -Ltac ring_elements set ext rspec pspec sspec rk := + +Ltac ring_elements set ext rspec pspec sspec dspec rk := let arth := coerce_to_almost_ring set ext rspec in let ext_r := coerce_to_ring_ext ext in let morph := @@ -756,42 +830,54 @@ Ltac ring_elements set ext rspec pspec sspec rk := | _ => fail 1 "ill-formed ring kind" end in let p_spec := gen_ring_pow set arth pspec in - let s_spec := gen_ring_sign set rspec morph sspec rk in - fun f => f arth ext_r morph p_spec s_spec. + let s_spec := gen_ring_sign morph sspec in + let d_spec := gen_ring_div set ext_r arth morph dspec in + fun f => f arth ext_r morph p_spec s_spec d_spec. (* Given a ring structure and the kind of morphism, returns 2 lemmas (one for ring, and one for ring_simplify). *) -Ltac ring_lemmas set ext rspec pspec sspec rk := + + Ltac ring_lemmas set ext rspec pspec sspec dspec rk := let gen_lemma2 := match pspec with | None => constr:(ring_rw_correct) | Some _ => constr:(ring_rw_pow_correct) end in - ring_elements set ext rspec pspec sspec rk - ltac:(fun arth ext_r morph p_spec s_spec => - match p_spec with - | mkhypo ?pp_spec => - match s_spec with - | mkhypo ?ps_spec => - let lemma1 := - constr:(ring_correct set ext_r arth morph pp_spec) in - let lemma2 := - constr:(gen_lemma2 _ _ _ _ _ _ _ _ set ext_r arth - _ _ _ _ _ _ _ _ _ morph - _ _ _ pp_spec - _ ps_spec) in - fun f => f arth ext_r morph lemma1 lemma2 - | _ => fail 2 "bad sign specification" - end - | _ => fail 1 "bad power specification" + ring_elements set ext rspec pspec sspec dspec rk + ltac:(fun arth ext_r morph p_spec s_spec d_spec => + match type of morph with + | @ring_morph ?R ?r0 ?rI ?radd ?rmul ?rsub ?ropp ?req + ?C ?c0 ?c1 ?cadd ?cmul ?csub ?copp ?ceq_b ?phi => + let gen_lemma2_0 := + constr:(gen_lemma2 R r0 rI radd rmul rsub ropp req set ext_r arth + C c0 c1 cadd cmul csub copp ceq_b phi morph) in + match p_spec with + | @mkhypo (power_theory _ _ _ ?Cp_phi ?rpow) ?pp_spec => + let gen_lemma2_1 := constr:(gen_lemma2_0 _ Cp_phi rpow pp_spec) in + match d_spec with + | @mkhypo (div_theory _ _ _ _ ?cdiv) ?dd_spec => + let gen_lemma2_2 := constr:(gen_lemma2_1 cdiv dd_spec) in + match s_spec with + | @mkhypo (sign_theory _ _ ?get_sign) ?ss_spec => + let lemma2 := constr:(gen_lemma2_2 get_sign ss_spec) in + let lemma1 := + constr:(ring_correct set ext_r arth morph pp_spec dd_spec) in + fun f => f arth ext_r morph lemma1 lemma2 + | _ => fail 4 "ring: bad sign specification" + end + | _ => fail 3 "ring: bad coefficiant division specification" + end + | _ => fail 2 "ring: bad power specification" + end + | _ => fail 1 "ring internal error: ring_lemmas, please report" end). - + (* Tactic for constant *) Ltac isnatcst t := match t with - O => true + O => constr:true | S ?p => isnatcst p - | _ => false + | _ => constr:false end. Ltac isPcst t := @@ -801,7 +887,7 @@ Ltac isPcst t := | xH => constr:true (* nat -> positive *) | P_of_succ_nat ?n => isnatcst n - | _ => false + | _ => constr:false end. Ltac isNcst t := @@ -813,7 +899,7 @@ Ltac isNcst t := Ltac isZcst t := match t with - Z0 => true + Z0 => constr:true | Zpos ?p => isPcst p | Zneg ?p => isPcst p (* injection nat -> Z *) @@ -821,7 +907,7 @@ Ltac isZcst t := (* injection N -> Z *) | Z_of_N ?n => isNcst n (* *) - | _ => false + | _ => constr:false end. diff --git a/contrib/setoid_ring/NArithRing.v b/contrib/setoid_ring/NArithRing.v index ae067a8a..0ba519fd 100644 --- a/contrib/setoid_ring/NArithRing.v +++ b/contrib/setoid_ring/NArithRing.v @@ -15,7 +15,7 @@ Set Implicit Arguments. Ltac Ncst t := match isNcst t with true => t - | _ => NotConstant + | _ => constr:NotConstant end. Add Ring Nr : Nth (decidable Neq_bool_ok, constants [Ncst]). diff --git a/contrib/setoid_ring/RealField.v b/contrib/setoid_ring/RealField.v index d0512dff..60641bcf 100644 --- a/contrib/setoid_ring/RealField.v +++ b/contrib/setoid_ring/RealField.v @@ -130,4 +130,5 @@ Add Field RField : Rfield (completeness Zeq_bool_complete, power_tac R_power_theory [Rpow_tac]). + diff --git a/contrib/setoid_ring/Ring.v b/contrib/setoid_ring/Ring.v index 1a4e1cc7..d01b1625 100644 --- a/contrib/setoid_ring/Ring.v +++ b/contrib/setoid_ring/Ring.v @@ -38,7 +38,7 @@ Ltac bool_cst t := match t with true => constr:true | false => constr:false - | _ => NotConstant + | _ => constr:NotConstant end. Add Ring bool_ring : BoolTheory (decidable bool_eq_ok, constants [bool_cst]). diff --git a/contrib/setoid_ring/Ring_polynom.v b/contrib/setoid_ring/Ring_polynom.v index b79f2fe2..d8847036 100644 --- a/contrib/setoid_ring/Ring_polynom.v +++ b/contrib/setoid_ring/Ring_polynom.v @@ -43,6 +43,10 @@ Section MakeRingPol. Variable rpow : R -> Cpow -> R. Variable pow_th : power_theory rI rmul req Cp_phi rpow. + (* division is ok *) + Variable cdiv: C -> C -> C * C. + Variable div_th: div_theory req cadd cmul phi cdiv. + (* R notations *) Notation "0" := rO. Notation "1" := rI. @@ -55,14 +59,14 @@ Section MakeRingPol. Notation "x -! y " := (csub x y). Notation "-! x" := (copp x). Notation " x ?=! y" := (ceqb x y). Notation "[ x ]" := (phi x). - (* Usefull tactics *) + (* Useful tactics *) Add Setoid R req Rsth as R_set1. Ltac rrefl := gen_reflexivity Rsth. Add Morphism radd : radd_ext. exact (Radd_ext Reqe). Qed. Add Morphism rmul : rmul_ext. exact (Rmul_ext Reqe). Qed. Add Morphism ropp : ropp_ext. exact (Ropp_ext Reqe). Qed. Add Morphism rsub : rsub_ext. exact (ARsub_ext Rsth Reqe ARth). Qed. - Ltac rsimpl := gen_srewrite 0 1 radd rmul rsub ropp req Rsth Reqe ARth. + Ltac rsimpl := gen_srewrite Rsth Reqe ARth. Ltac add_push := gen_add_push radd Rsth Reqe ARth. Ltac mul_push := gen_mul_push rmul Rsth Reqe ARth. @@ -411,63 +415,79 @@ Section MakeRingPol. | vmon i' m => vmon (i+i') m end. - Fixpoint MFactor (P: Pol) (M: Mon) {struct P}: Pol * Pol := + Fixpoint CFactor (P: Pol) (c: C) {struct P}: Pol * Pol := + match P with + | Pc c1 => let (q,r) := cdiv c1 c in (Pc r, Pc q) + | Pinj j1 P1 => + let (R,S) := CFactor P1 c in + (mkPinj j1 R, mkPinj j1 S) + | PX P1 i Q1 => + let (R1, S1) := CFactor P1 c in + let (R2, S2) := CFactor Q1 c in + (mkPX R1 i R2, mkPX S1 i S2) + end. + + Fixpoint MFactor (P: Pol) (c: C) (M: Mon) {struct P}: Pol * Pol := match P, M with - _, mon0 => (Pc cO, P) + _, mon0 => + if (ceqb c cI) then (Pc cO, P) else +(* if (ceqb c (copp cI)) then (Pc cO, Popp P) else Not in almost ring *) + CFactor P c | Pc _, _ => (P, Pc cO) | Pinj j1 P1, zmon j2 M1 => match (j1 ?= j2) Eq with - Eq => let (R,S) := MFactor P1 M1 in + Eq => let (R,S) := MFactor P1 c M1 in (mkPinj j1 R, mkPinj j1 S) - | Lt => let (R,S) := MFactor P1 (zmon (j2 - j1) M1) in + | Lt => let (R,S) := MFactor P1 c (zmon (j2 - j1) M1) in (mkPinj j1 R, mkPinj j1 S) | Gt => (P, Pc cO) end | Pinj _ _, vmon _ _ => (P, Pc cO) | PX P1 i Q1, zmon j M1 => let M2 := zmon_pred j M1 in - let (R1, S1) := MFactor P1 M in - let (R2, S2) := MFactor Q1 M2 in + let (R1, S1) := MFactor P1 c M in + let (R2, S2) := MFactor Q1 c M2 in (mkPX R1 i R2, mkPX S1 i S2) | PX P1 i Q1, vmon j M1 => match (i ?= j) Eq with - Eq => let (R1,S1) := MFactor P1 (mkZmon xH M1) in + Eq => let (R1,S1) := MFactor P1 c (mkZmon xH M1) in (mkPX R1 i Q1, S1) - | Lt => let (R1,S1) := MFactor P1 (vmon (j - i) M1) in + | Lt => let (R1,S1) := MFactor P1 c (vmon (j - i) M1) in (mkPX R1 i Q1, S1) - | Gt => let (R1,S1) := MFactor P1 (mkZmon xH M1) in + | Gt => let (R1,S1) := MFactor P1 c (mkZmon xH M1) in (mkPX R1 i Q1, mkPX S1 (i-j) (Pc cO)) end end. - Definition POneSubst (P1: Pol) (M1: Mon) (P2: Pol): option Pol := - let (Q1,R1) := MFactor P1 M1 in + Definition POneSubst (P1: Pol) (cM1: C * Mon) (P2: Pol): option Pol := + let (c,M1) := cM1 in + let (Q1,R1) := MFactor P1 c M1 in match R1 with (Pc c) => if c ?=! cO then None else Some (Padd Q1 (Pmul P2 R1)) | _ => Some (Padd Q1 (Pmul P2 R1)) end. - Fixpoint PNSubst1 (P1: Pol) (M1: Mon) (P2: Pol) (n: nat) {struct n}: Pol := - match POneSubst P1 M1 P2 with - Some P3 => match n with S n1 => PNSubst1 P3 M1 P2 n1 | _ => P3 end + Fixpoint PNSubst1 (P1: Pol) (cM1: C * Mon) (P2: Pol) (n: nat) {struct n}: Pol := + match POneSubst P1 cM1 P2 with + Some P3 => match n with S n1 => PNSubst1 P3 cM1 P2 n1 | _ => P3 end | _ => P1 end. - Definition PNSubst (P1: Pol) (M1: Mon) (P2: Pol) (n: nat): option Pol := - match POneSubst P1 M1 P2 with - Some P3 => match n with S n1 => Some (PNSubst1 P3 M1 P2 n1) | _ => None end + Definition PNSubst (P1: Pol) (cM1: C * Mon) (P2: Pol) (n: nat): option Pol := + match POneSubst P1 cM1 P2 with + Some P3 => match n with S n1 => Some (PNSubst1 P3 cM1 P2 n1) | _ => None end | _ => None end. - Fixpoint PSubstL1 (P1: Pol) (LM1: list (Mon * Pol)) (n: nat) {struct LM1}: + Fixpoint PSubstL1 (P1: Pol) (LM1: list ((C * Mon) * Pol)) (n: nat) {struct LM1}: Pol := match LM1 with cons (M1,P2) LM2 => PSubstL1 (PNSubst1 P1 M1 P2 n) LM2 n | _ => P1 end. - Fixpoint PSubstL (P1: Pol) (LM1: list (Mon * Pol)) (n: nat) {struct LM1}: option Pol := + Fixpoint PSubstL (P1: Pol) (LM1: list ((C * Mon) * Pol)) (n: nat) {struct LM1}: option Pol := match LM1 with cons (M1,P2) LM2 => match PNSubst P1 M1 P2 n with @@ -477,7 +497,7 @@ Section MakeRingPol. | _ => None end. - Fixpoint PNSubstL (P1: Pol) (LM1: list (Mon * Pol)) (m n: nat) {struct m}: Pol := + Fixpoint PNSubstL (P1: Pol) (LM1: list ((C * Mon) * Pol)) (m n: nat) {struct m}: Pol := match PSubstL P1 LM1 n with Some P3 => match m with S m1 => PNSubstL P3 LM1 m1 n | _ => P3 end | _ => P1 @@ -579,16 +599,22 @@ Section MakeRingPol. Ltac Esimpl := repeat (progress ( match goal with - | |- context [P0@?l] => rewrite (Pphi0 l) - | |- context [P1@?l] => rewrite (Pphi1 l) - | |- context [(mkPinj ?j ?P)@?l] => rewrite (mkPinj_ok j l P) - | |- context [(mkPX ?P ?i ?Q)@?l] => rewrite (mkPX_ok l P i Q) - | |- context [[cO]] => rewrite (morph0 CRmorph) - | |- context [[cI]] => rewrite (morph1 CRmorph) - | |- context [[?x +! ?y]] => rewrite ((morph_add CRmorph) x y) - | |- context [[?x *! ?y]] => rewrite ((morph_mul CRmorph) x y) - | |- context [[?x -! ?y]] => rewrite ((morph_sub CRmorph) x y) - | |- context [[-! ?x]] => rewrite ((morph_opp CRmorph) x) + | |- context [?P@?l] => + match P with + | P0 => rewrite (Pphi0 l) + | P1 => rewrite (Pphi1 l) + | (mkPinj ?j ?P) => rewrite (mkPinj_ok j l P) + | (mkPX ?P ?i ?Q) => rewrite (mkPX_ok l P i Q) + end + | |- context [[?c]] => + match c with + | cO => rewrite (morph0 CRmorph) + | cI => rewrite (morph1 CRmorph) + | ?x +! ?y => rewrite ((morph_add CRmorph) x y) + | ?x *! ?y => rewrite ((morph_mul CRmorph) x y) + | ?x -! ?y => rewrite ((morph_sub CRmorph) x y) + | -! ?x => rewrite ((morph_opp CRmorph) x) + end end)); rsimpl; simpl. @@ -876,38 +902,82 @@ Lemma Pmul_ok : forall P P' l, (P**P')@l == P@l * P'@l. rewrite Pplus_comm;rewrite pow_pos_Pplus;rsimpl. Qed. - - Lemma Mphi_ok: forall P M l, - let (Q,R) := MFactor P M in - P@l == Q@l + (Mphi l M) * (R@l). + Lemma Mcphi_ok: forall P c l, + let (Q,R) := CFactor P c in + P@l == Q@l + (phi c) * (R@l). Proof. intros P; elim P; simpl; auto; clear P. - intros c M l; case M; simpl; auto; try intro p; try intro m; - try rewrite (morph0 CRmorph); rsimpl. + intros c c1 l; generalize (div_th.(div_eucl_th) c c1); case cdiv. + intros q r H; rewrite H. + Esimpl. + rewrite (ARadd_comm ARth); rsimpl. + intros i P Hrec c l. + generalize (Hrec c (jump i l)); case CFactor. + intros R1 S1; Esimpl; auto. + intros Q1 Qrec i R1 Rrec c l. + generalize (Qrec c l); case CFactor; intros S1 S2 HS. + generalize (Rrec c (tail l)); case CFactor; intros S3 S4 HS1. + rewrite HS; rewrite HS1; Esimpl. + apply (Radd_ext Reqe); rsimpl. + repeat rewrite <- (ARadd_assoc ARth). + apply (Radd_ext Reqe); rsimpl. + rewrite (ARadd_comm ARth); rsimpl. + Qed. - intros i P Hrec M l; case M; simpl; clear M. - rewrite (morph0 CRmorph); rsimpl. + Lemma Mphi_ok: forall P (cM: C * Mon) l, + let (c,M) := cM in + let (Q,R) := MFactor P c M in + P@l == Q@l + (phi c) * (Mphi l M) * (R@l). + Proof. + intros P; elim P; simpl; auto; clear P. + intros c (c1, M) l; case M; simpl; auto. + assert (H1:= morph_eq CRmorph c1 cI);destruct (c1 ?=! cI). + rewrite (H1 (refl_equal true));Esimpl. + try rewrite (morph0 CRmorph); rsimpl. + generalize (div_th.(div_eucl_th) c c1); case (cdiv c c1). + intros q r H; rewrite H; clear H H1. + Esimpl. + rewrite (ARadd_comm ARth); rsimpl. + intros p m; Esimpl. + intros p m; Esimpl. + intros i P Hrec (c,M) l; case M; simpl; clear M. + assert (H1:= morph_eq CRmorph c cI);destruct (c ?=! cI). + rewrite (H1 (refl_equal true));Esimpl. + Esimpl. + generalize (Mcphi_ok P c (jump i l)); case CFactor. + intros R1 Q1 HH; rewrite HH; Esimpl. intros j M. case_eq ((i ?= j) Eq); intros He; simpl. rewrite (Pcompare_Eq_eq _ _ He). - generalize (Hrec M (jump j l)); case (MFactor P M); + generalize (Hrec (c, M) (jump j l)); case (MFactor P c M); simpl; intros P2 Q2 H; repeat rewrite mkPinj_ok; auto. - generalize (Hrec (zmon (j -i) M) (jump i l)); - case (MFactor P (zmon (j -i) M)); simpl. + generalize (Hrec (c, (zmon (j -i) M)) (jump i l)); + case (MFactor P c (zmon (j -i) M)); simpl. intros P2 Q2 H; repeat rewrite mkPinj_ok; auto. rewrite <- (Pplus_minus _ _ (ZC2 _ _ He)). rewrite Pplus_comm; rewrite jump_Pplus; auto. rewrite (morph0 CRmorph); rsimpl. intros P2 m; rewrite (morph0 CRmorph); rsimpl. - intros P2 Hrec1 i Q2 Hrec2 M l; case M; simpl; auto. - rewrite (morph0 CRmorph); rsimpl. + intros P2 Hrec1 i Q2 Hrec2 (c, M) l; case M; simpl; auto. + assert (H1:= morph_eq CRmorph c cI);destruct (c ?=! cI). + rewrite (H1 (refl_equal true));Esimpl. + Esimpl. + generalize (Mcphi_ok P2 c l); case CFactor. + intros S1 S2 HS. + generalize (Mcphi_ok Q2 c (tail l)); case CFactor. + intros S3 S4 HS1; Esimpl; rewrite HS; rewrite HS1. + rsimpl. + apply (Radd_ext Reqe); rsimpl. + repeat rewrite <- (ARadd_assoc ARth). + apply (Radd_ext Reqe); rsimpl. + rewrite (ARadd_comm ARth); rsimpl. intros j M1. - generalize (Hrec1 (zmon j M1) l); - case (MFactor P2 (zmon j M1)). + generalize (Hrec1 (c,zmon j M1) l); + case (MFactor P2 c (zmon j M1)). intros R1 S1 H1. - generalize (Hrec2 (zmon_pred j M1) (List.tail l)); - case (MFactor Q2 (zmon_pred j M1)); simpl. + generalize (Hrec2 (c, zmon_pred j M1) (List.tail l)); + case (MFactor Q2 c (zmon_pred j M1)); simpl. intros R2 S2 H2; rewrite H1; rewrite H2. repeat rewrite mkPX_ok; simpl. rsimpl. @@ -919,7 +989,7 @@ Lemma Pmul_ok : forall P P' l, (P**P')@l == P@l * P'@l. intros j M1. case_eq ((i ?= j) Eq); intros He; simpl. rewrite (Pcompare_Eq_eq _ _ He). - generalize (Hrec1 (mkZmon xH M1) l); case (MFactor P2 (mkZmon xH M1)); + generalize (Hrec1 (c, mkZmon xH M1) l); case (MFactor P2 c (mkZmon xH M1)); simpl; intros P3 Q3 H; repeat rewrite mkPinj_ok; auto. rewrite H; rewrite mkPX_ok; rsimpl. repeat (rewrite <-(ARadd_assoc ARth)). @@ -929,9 +999,11 @@ Lemma Pmul_ok : forall P P' l, (P**P')@l == P@l * P'@l. repeat (rewrite <-(ARmul_assoc ARth)). rewrite mkZmon_ok. apply rmul_ext; rsimpl. + repeat (rewrite <-(ARmul_assoc ARth)). + apply rmul_ext; rsimpl. rewrite (ARmul_comm ARth); rsimpl. - generalize (Hrec1 (vmon (j - i) M1) l); - case (MFactor P2 (vmon (j - i) M1)); + generalize (Hrec1 (c, vmon (j - i) M1) l); + case (MFactor P2 c (vmon (j - i) M1)); simpl; intros P3 Q3 H; repeat rewrite mkPinj_ok; auto. rewrite H; rsimpl; repeat rewrite mkPinj_ok; auto. rewrite mkPX_ok; rsimpl. @@ -943,10 +1015,13 @@ Lemma Pmul_ok : forall P P' l, (P**P')@l == P@l * P'@l. apply rmul_ext; rsimpl. rewrite (ARmul_comm ARth); rsimpl. apply rmul_ext; rsimpl. + rewrite <- (ARmul_comm ARth (Mphi (tail l) M1)); rsimpl. + repeat (rewrite <-(ARmul_assoc ARth)). + apply rmul_ext; rsimpl. rewrite <- pow_pos_Pplus. rewrite (Pplus_minus _ _ (ZC2 _ _ He)); rsimpl. - generalize (Hrec1 (mkZmon 1 M1) l); - case (MFactor P2 (mkZmon 1 M1)); + generalize (Hrec1 (c, mkZmon 1 M1) l); + case (MFactor P2 c (mkZmon 1 M1)); simpl; intros P3 Q3 H; repeat rewrite mkPinj_ok; auto. rewrite H; rsimpl. rewrite mkPX_ok; rsimpl. @@ -963,6 +1038,9 @@ Lemma Pmul_ok : forall P P' l, (P**P')@l == P@l * P'@l. repeat (rewrite <-(ARmul_assoc ARth)). rewrite (ARmul_comm ARth (Q3@l)); rsimpl. apply rmul_ext; rsimpl. + rewrite (ARmul_comm ARth); rsimpl. + repeat (rewrite <- (ARmul_assoc ARth)). + apply rmul_ext; rsimpl. rewrite <- pow_pos_Pplus. rewrite (Pplus_minus _ _ He); rsimpl. Qed. @@ -970,10 +1048,10 @@ Lemma Pmul_ok : forall P P' l, (P**P')@l == P@l * P'@l. (* Proof for the symmetric version *) Lemma POneSubst_ok: forall P1 M1 P2 P3 l, - POneSubst P1 M1 P2 = Some P3 -> Mphi l M1 == P2@l -> P1@l == P3@l. + POneSubst P1 M1 P2 = Some P3 -> phi (fst M1) * Mphi l (snd M1) == P2@l -> P1@l == P3@l. Proof. - intros P2 M1 P3 P4 l; unfold POneSubst. - generalize (Mphi_ok P2 M1 l); case (MFactor P2 M1); simpl; auto. + intros P2 (cc,M1) P3 P4 l; unfold POneSubst. + generalize (Mphi_ok P2 (cc, M1) l); case (MFactor P2 cc M1); simpl; auto. intros Q1 R1; case R1. intros c H; rewrite H. generalize (morph_eq CRmorph c cO); @@ -986,7 +1064,7 @@ Lemma Pmul_ok : forall P P' l, (P**P')@l == P@l * P'@l. rewrite Padd_ok; rewrite PmulC_ok; rsimpl. intros i P5 H; rewrite H. intros HH H1; injection HH; intros; subst; rsimpl. - rewrite Padd_ok; rewrite PmulI_ok. intros;apply Pmul_ok. rewrite H1; rsimpl. + rewrite Padd_ok; rewrite PmulI_ok by (intros;apply Pmul_ok). rewrite H1; rsimpl. intros i P5 P6 H1 H2 H3; rewrite H1; rewrite H3. assert (P4 = Q1 ++ P3 ** PX i P5 P6). injection H2; intros; subst;trivial. @@ -1017,7 +1095,7 @@ Proof. Qed. *) Lemma PNSubst1_ok: forall n P1 M1 P2 l, - Mphi l M1 == P2@l -> P1@l == (PNSubst1 P1 M1 P2 n)@l. + [fst M1] * Mphi l (snd M1) == P2@l -> P1@l == (PNSubst1 P1 M1 P2 n)@l. Proof. intros n; elim n; simpl; auto. intros P2 M1 P3 l H. @@ -1031,19 +1109,19 @@ Proof. Qed. Lemma PNSubst_ok: forall n P1 M1 P2 l P3, - PNSubst P1 M1 P2 n = Some P3 -> Mphi l M1 == P2@l -> P1@l == P3@l. + PNSubst P1 M1 P2 n = Some P3 -> [fst M1] * Mphi l (snd M1) == P2@l -> P1@l == P3@l. Proof. - intros n P2 M1 P3 l P4; unfold PNSubst. - generalize (fun P4 => @POneSubst_ok P2 M1 P3 P4 l); - case (POneSubst P2 M1 P3); [idtac | intros; discriminate]. + intros n P2 (cc, M1) P3 l P4; unfold PNSubst. + generalize (fun P4 => @POneSubst_ok P2 (cc,M1) P3 P4 l); + case (POneSubst P2 (cc,M1) P3); [idtac | intros; discriminate]. intros P5 H1; case n; try (intros; discriminate). intros n1 H2; injection H2; intros; subst. rewrite <- PNSubst1_ok; auto. Qed. - Fixpoint MPcond (LM1: list (Mon * Pol)) (l: list R) {struct LM1} : Prop := + Fixpoint MPcond (LM1: list (C * Mon * Pol)) (l: list R) {struct LM1} : Prop := match LM1 with - cons (M1,P2) LM2 => (Mphi l M1 == P2@l) /\ (MPcond LM2 l) + cons (M1,P2) LM2 => ([fst M1] * Mphi l (snd M1) == P2@l) /\ (MPcond LM2 l) | _ => True end. @@ -1108,6 +1186,8 @@ Proof. | PEpow pe1 n => rpow (PEeval l pe1) (Cp_phi n) end. +Strategy expand [PEeval]. + (** Correctness proofs *) Lemma mkX_ok : forall p l, nth 0 p l == (mk_X p) @ l. @@ -1180,7 +1260,7 @@ Section POWER. Lemma Ppow_N_ok : forall l, (forall P, subst_l P@l == P@l) -> forall P n, (Ppow_N P n)@l == (pow_N P1 Pmul P n)@l. - Proof. destruct n;simpl. rrefl. rewrite Ppow_pos_ok. trivial. Esimpl. Qed. + Proof. destruct n;simpl. rrefl. rewrite Ppow_pos_ok by trivial. Esimpl. Qed. End POWER. @@ -1188,7 +1268,7 @@ Section POWER. Section NORM_SUBST_REC. Variable n : nat. - Variable lmp:list (Mon*Pol). + Variable lmp:list (C*Mon*Pol). Let subst_l P := PNSubstL P lmp n n. Let Pmul_subst P1 P2 := subst_l (Pmul P1 P2). Let Ppow_subst := Ppow_N subst_l. @@ -1256,7 +1336,7 @@ Section POWER. rewrite IHpe1;rewrite IHpe2;rrefl. rewrite IHpe1;rewrite IHpe2. rewrite Pmul_ok. rrefl. rewrite IHpe;rrefl. - rewrite Ppow_N_ok. intros;rrefl. + rewrite Ppow_N_ok by (intros;rrefl). rewrite pow_th.(rpow_pow_N). destruct n0;Esimpl3. induction p;simpl;try rewrite IHp;try rewrite IHpe;repeat rewrite Pms_ok; repeat rewrite Pmul_ok;rrefl. @@ -1282,24 +1362,24 @@ Section POWER. end end. - Fixpoint mon_of_pol (P:Pol) : option Mon := + Fixpoint mon_of_pol (P:Pol) : option (C * Mon) := match P with - | Pc c => if (c ?=! cI) then Some mon0 else None + | Pc c => if (c ?=! cO) then None else Some (c, mon0) | Pinj j P => match mon_of_pol P with | None => None - | Some m => Some (mkZmon j m) + | Some (c,m) => Some (c, mkZmon j m) end | PX P i Q => if Peq Q P0 then match mon_of_pol P with | None => None - | Some m => Some (mkVmon i m) + | Some (c,m) => Some (c, mkVmon i m) end else None end. - Fixpoint mk_monpol_list (lpe:list (PExpr * PExpr)) : list (Mon*Pol) := + Fixpoint mk_monpol_list (lpe:list (PExpr * PExpr)) : list (C*Mon*Pol) := match lpe with | nil => nil | (me,pe)::lpe => @@ -1310,16 +1390,18 @@ Section POWER. end. Lemma mon_of_pol_ok : forall P m, mon_of_pol P = Some m -> - forall l, Mphi l m == P@l. + forall l, [fst m] * Mphi l (snd m) == P@l. Proof. induction P;simpl;intros;Esimpl. - assert (H1 := (morph_eq CRmorph) c cI). - destruct (c ?=! cI). - inversion H;rewrite H1;trivial;Esimpl. + assert (H1 := (morph_eq CRmorph) c cO). + destruct (c ?=! cO). discriminate. - generalize H;clear H;case_eq (mon_of_pol P);intros;try discriminate. - inversion H0. - rewrite mkZmon_ok;simpl;auto. + inversion H;trivial;Esimpl. + generalize H;clear H;case_eq (mon_of_pol P). + intros (c1,P2) H0 H1; inversion H1; Esimpl. + generalize (IHP (c1, P2) H0 (jump p l)). + rewrite mkZmon_ok;simpl;auto. + intros; discriminate. generalize H;clear H;change match P3 with | Pc c => c ?=! cO | Pinj _ _ => false @@ -1327,10 +1409,13 @@ Section POWER. end with (P3 ?== P0). assert (H := Peq_ok P3 P0). destruct (P3 ?== P0). - case_eq (mon_of_pol P2);intros. + case_eq (mon_of_pol P2);try intros (cc, pp); intros. inversion H1. + simpl. rewrite mkVmon_ok;simpl. - rewrite H;trivial;Esimpl. rewrite IHP1;trivial;Esimpl. discriminate. + rewrite H;trivial;Esimpl. + generalize (IHP1 _ H0); simpl; intros HH; rewrite HH; rsimpl. + discriminate. intros;discriminate. Qed. @@ -1342,7 +1427,7 @@ Section POWER. assert (HH:=mon_of_pol_ok (norm_subst 0 nil p)); destruct (mon_of_pol (norm_subst 0 nil p)). split. - rewrite <- norm_subst_spec. exact I. + rewrite <- norm_subst_spec by exact I. destruct lpe;try destruct H;rewrite <- H; rewrite (norm_subst_spec 0 nil); try exact I;apply HH;trivial. apply IHlpe. destruct lpe;simpl;trivial. destruct H. exact H0. @@ -1371,7 +1456,7 @@ Section POWER. (** Generic evaluation of polynomial towards R avoiding parenthesis *) Variable get_sign : C -> option C. - Variable get_sign_spec : sign_theory ropp req phi get_sign. + Variable get_sign_spec : sign_theory copp ceqb get_sign. Section EVALUATION. @@ -1509,7 +1594,7 @@ Section POWER. case_eq (get_sign c);intros. assert (H1 := (morph_eq CRmorph) c0 cI). destruct (c0 ?=! cI). - rewrite (get_sign_spec.(sign_spec) _ H). rewrite H1;trivial. + rewrite (CRmorph.(morph_eq) _ _ (get_sign_spec.(sign_spec) _ H)). Esimpl. rewrite H1;trivial. rewrite <- r_list_pow_rev;trivial;Esimpl. apply mkmultm1_ok. rewrite <- r_list_pow_rev; apply mkmult_rec_ok. @@ -1520,7 +1605,7 @@ Qed. Proof. intros;unfold mkadd_mult. case_eq (get_sign c);intros. - rewrite (get_sign_spec.(sign_spec) _ H). + rewrite (CRmorph.(morph_eq) _ _ (get_sign_spec.(sign_spec) _ H));Esimpl. rewrite mkmult_c_pos_ok;Esimpl. rewrite mkmult_c_pos_ok;Esimpl. Qed. diff --git a/contrib/setoid_ring/Ring_tac.v b/contrib/setoid_ring/Ring_tac.v index d8bb9eae..46d106d3 100644 --- a/contrib/setoid_ring/Ring_tac.v +++ b/contrib/setoid_ring/Ring_tac.v @@ -16,11 +16,6 @@ Ltac compute_assertion id id' t := [vm_cast_no_check (refl_equal id')|idtac]. (* [exact_no_check (refl_equal id'<: t = id')|idtac]). *) -Ltac getGoal := - match goal with - | |- ?G => G - end. - (********************************************************************) (* Tacticals to build reflexive tactics *) @@ -47,10 +42,10 @@ Ltac ApplyLemmaThen lemma expr tac := forall x, ?nf_spec = x -> _ => nf_spec | _ => fail 1 "ApplyLemmaThen: cannot find norm expression" end in - (compute_assertion H nexpr nf_spec; - (assert (Heq:=lemma _ _ H) || fail "anomaly: failed to apply lemma"); - clear H; - OnMainSubgoal Heq ltac:(type of Heq) ltac:(tac Heq; clear Heq nexpr)). + compute_assertion H nexpr nf_spec; + assert (Heq:=lemma _ _ H) || fail "anomaly: failed to apply lemma"; + clear H; + OnMainSubgoal Heq ltac:(type of Heq) ltac:(tac Heq; clear Heq nexpr). Ltac ApplyLemmaThenAndCont lemma expr tac CONT_tac cont_arg := let npe := fresh "expr_nf" in @@ -143,13 +138,11 @@ Ltac mkPolexpr C Cst CstPow radd rmul rsub ropp rpow t fv := Ltac ParseRingComponents lemma := match type of lemma with - | context - [@PEeval ?R ?rO ?add ?mul ?sub ?opp ?C ?phi ?Cpow ?powphi ?pow _ _] => + | context [@PEeval ?R ?rO ?add ?mul ?sub ?opp ?C ?phi ?Cpow ?powphi ?pow _ _] => (fun f => f R add mul sub opp pow C) | _ => fail 1 "ring anomaly: bad correctness lemma (parse)" end. - (* ring tactics *) Ltac relation_carrier req := @@ -175,7 +168,7 @@ Ltac mkHyp_tac C req mkPE lH := let pe1 := mkPE r1 in let pe2 := mkPE r2 in constr:(cons (pe1,pe2) res) - | _ => fail "hypothesis is not a ring equality" + | _ => fail 1 "hypothesis is not a ring equality" end in list_fold_right mkHyp (@nil (PExpr C * PExpr C)) lH. @@ -226,12 +219,6 @@ Ltac Ring_norm_gen f Cst_tac CstPow_tac lemma2 req n lH rl := let mkPol := mkPolexpr C Cst_tac CstPow_tac add mul sub opp pow in let fv := FV_hypo_tac mkFV req lH in let simpl_ring H := (protect_fv "ring" in H; f H) in - let Coeffs := - match type of lemma2 with - | context [mk_monpol_list ?cO ?cI ?cadd ?cmul ?csub ?copp ?ceqb _] => - (fun f => f cO cI cadd cmul csub copp ceqb) - | _ => fail 1 "ring_simplify anomaly: bad correctness lemma" - end in let lemma_tac fv RW_tac := let rr_lemma := fresh "r_rw_lemma" in let lpe := mkHyp_tac C req ltac:(fun t => mkPol t fv) lH in @@ -240,25 +227,34 @@ Ltac Ring_norm_gen f Cst_tac CstPow_tac lemma2 req n lH rl := let vlmp_eq := fresh "list_hyp_norm_eq" in let prh := proofHyp_tac lH in pose (vlpe := lpe); - Coeffs ltac:(fun cO cI cadd cmul csub copp ceqb => + match type of lemma2 with + | context [mk_monpol_list ?cO ?cI ?cadd ?cmul ?csub ?copp ?cdiv ?ceqb _] + => compute_assertion vlmp_eq vlmp - (mk_monpol_list cO cI cadd cmul csub copp ceqb vlpe); - assert (rr_lemma := lemma2 n vlpe fv prh vlmp vlmp_eq) - || fail "type error when build the rewriting lemma"; - RW_tac rr_lemma; - try clear rr_lemma vlmp_eq vlmp vlpe) in + (mk_monpol_list cO cI cadd cmul csub copp cdiv ceqb vlpe); + (assert (rr_lemma := lemma2 n vlpe fv prh vlmp vlmp_eq) + || fail 1 "type error when build the rewriting lemma"); + RW_tac rr_lemma; + try clear rr_lemma vlmp_eq vlmp vlpe + | _ => fail 1 "ring_simplify anomaly: bad correctness lemma" + end in ReflexiveRewriteTactic mkFV mkPol simpl_ring lemma_tac fv rl in ParseRingComponents lemma2 Main. + Ltac Ring_gen req sth ext morph arth cst_tac pow_tac lemma1 lemma2 pre post lH rl := pre();Ring cst_tac pow_tac lemma1 req ring_subst_niter lH. +Ltac Get_goal := match goal with [|- ?G] => G end. + Tactic Notation (at level 0) "ring" := - let G := getGoal in ring_lookup Ring_gen [] [G]. + let G := Get_goal in + ring_lookup Ring_gen [] G. Tactic Notation (at level 0) "ring" "[" constr_list(lH) "]" := - let G := getGoal in ring_lookup Ring_gen [lH] [G]. + let G := Get_goal in + ring_lookup Ring_gen [lH] G. (* Simplification *) @@ -269,67 +265,89 @@ Ltac Ring_simplify_gen f := generalize (refl_equal l); unfold l at 2; pre(); - match goal with - | [|- l = ?RL -> _ ] => + let Tac RL := let Heq := fresh "Heq" in intros Heq;clear Heq l; Ring_norm_gen f cst_tac pow_tac lemma2 req ring_subst_niter lH RL; - post() - | _ => fail 1 "ring_simplify anomaly: bad goal after pre" - end. + post() in + let Main := + match goal with + | [|- l = ?RL -> _ ] => (fun f => f RL) + | _ => fail 1 "ring_simplify anomaly: bad goal after pre" + end in + Main Tac. Ltac Ring_simplify := Ring_simplify_gen ltac:(fun H => rewrite H). -Ltac Ring_nf Cst_tac lemma2 req rl f := - let on_rhs H := - match type of H with - | req _ ?rhs => clear H; f rhs - end in - Ring_norm_gen on_rhs Cst_tac lemma2 req rl. - +Tactic Notation (at level 0) "ring_simplify" constr_list(rl) := + let G := Get_goal in + ring_lookup Ring_simplify [] rl G. Tactic Notation (at level 0) "ring_simplify" "[" constr_list(lH) "]" constr_list(rl) := - let G := getGoal in ring_lookup Ring_simplify [lH] rl [G]. - -Tactic Notation (at level 0) - "ring_simplify" constr_list(rl) := - let G := getGoal in ring_lookup Ring_simplify [] rl [G]. + let G := Get_goal in + ring_lookup Ring_simplify [lH] rl G. +(* MON DIEU QUE C'EST MOCHE !!!!!!!!!!!!! *) Tactic Notation "ring_simplify" constr_list(rl) "in" hyp(H):= - let G := getGoal in - let t := type of H in - let g := fresh "goal" in - set (g:= G); - generalize H;clear H; - ring_lookup Ring_simplify [] rl [t]; - intro H; - unfold g;clear g. - -Tactic Notation "ring_simplify" "["constr_list(lH)"]" constr_list(rl) "in" hyp(H):= - let G := getGoal in - let t := type of H in - let g := fresh "goal" in - set (g:= G); - generalize H;clear H; - ring_lookup Ring_simplify [lH] rl [t]; - intro H; - unfold g;clear g. + let G := Get_goal in + let t := type of H in + let g := fresh "goal" in + set (g:= G); + generalize H;clear H; + ring_lookup Ring_simplify [] rl t; + intro H; + unfold g;clear g. + +Tactic Notation + "ring_simplify" "["constr_list(lH)"]" constr_list(rl) "in" hyp(H):= + let G := Get_goal in + let t := type of H in + let g := fresh "goal" in + set (g:= G); + generalize H;clear H; + ring_lookup Ring_simplify [lH] rl t; + intro H; + unfold g;clear g. + + + +(* LE RESTE MARCHE PAS DOMMAGE ..... *) + + + + + + + + + + + + + (* + + + + + + + Ltac Ring_simplify_in hyp:= Ring_simplify_gen ltac:(fun H => rewrite H in hyp). Tactic Notation (at level 0) "ring_simplify" "[" constr_list(lH) "]" constr_list(rl) := - match goal with [|- ?G] => ring_lookup Ring_simplify [lH] rl [G] end. + match goal with [|- ?G] => ring_lookup Ring_simplify [lH] rl G end. Tactic Notation (at level 0) "ring_simplify" constr_list(rl) := - match goal with [|- ?G] => ring_lookup Ring_simplify [] rl [G] end. + match goal with [|- ?G] => ring_lookup Ring_simplify [] rl G end. Tactic Notation (at level 0) "ring_simplify" "[" constr_list(lH) "]" constr_list(rl) "in" hyp(h):= @@ -339,7 +357,7 @@ Tactic Notation (at level 0) pre(); Ring_norm_gen ltac:(fun EQ => rewrite EQ in h) cst_tac pow_tac lemma2 req ring_subst_niter lH rl; post()) - [lH] rl [t]. + [lH] rl t. (* ring_lookup ltac:(Ring_simplify_in h) [lH] rl [t]. NE MARCHE PAS ??? *) Ltac Ring_simpl_in hyp := Ring_norm_gen ltac:(fun H => rewrite H in hyp). @@ -352,7 +370,7 @@ Tactic Notation (at level 0) pre(); Ring_simpl_in h cst_tac pow_tac lemma2 req ring_subst_niter lH rl; post()) - [] rl [t]. + [] rl t. Ltac rw_in H Heq := rewrite Heq in H. @@ -363,7 +381,7 @@ Ltac simpl_in H := pre(); Ring_norm_gen ltac:(fun Heq => rewrite Heq in H) cst_tac pow_tac lemma2 req ring_subst_niter lH rl; post()) - [] [t]. + [] t. *) diff --git a/contrib/setoid_ring/Ring_theory.v b/contrib/setoid_ring/Ring_theory.v index 5498911d..29feab5c 100644 --- a/contrib/setoid_ring/Ring_theory.v +++ b/contrib/setoid_ring/Ring_theory.v @@ -19,7 +19,7 @@ Reserved Notation "x -! y" (at level 50, left associativity). Reserved Notation "x *! y" (at level 40, left associativity). Reserved Notation "-! x" (at level 35, right associativity). -Reserved Notation "[ x ]" (at level 1, no associativity). +Reserved Notation "[ x ]" (at level 0). Reserved Notation "x ?== y" (at level 70, no associativity). Reserved Notation "x -- y" (at level 50, left associativity). @@ -59,8 +59,7 @@ Section Power. induction j;simpl. rewrite IHj. rewrite (mul_comm x (pow_pos x j *pow_pos x j)). - set (w:= x*pow_pos x j);unfold w at 2. - rewrite (mul_comm x (pow_pos x j));unfold w. + setoid_rewrite (mul_comm x (pow_pos x j)) at 2. repeat rewrite mul_assoc. apply (Seq_refl _ _ Rsth). repeat rewrite mul_assoc. apply (Seq_refl _ _ Rsth). apply (Seq_refl _ _ Rsth). @@ -198,7 +197,7 @@ Section DEFINITIONS. Section SIGN. Variable get_sign : C -> option C. Record sign_theory : Prop := mksign_th { - sign_spec : forall c c', get_sign c = Some c' -> [c] == - [c'] + sign_spec : forall c c', get_sign c = Some c' -> c ?=! -! c' = true }. End SIGN. @@ -207,6 +206,13 @@ Section DEFINITIONS. Lemma get_sign_None_th : sign_theory get_sign_None. Proof. constructor;intros;discriminate. Qed. + Section DIV. + Variable cdiv: C -> C -> C*C. + Record div_theory : Prop := mkdiv_th { + div_eucl_th : forall a b, let (q,r) := cdiv a b in [a] == [b *! q +! r] + }. + End DIV. + End MORPHISM. (** Identity is a morphism *) @@ -235,6 +241,7 @@ Section DEFINITIONS. Definition pow_N_th := mkpow_th id_phi_N (pow_N rI rmul) (pow_N_pow_N rI rmul Rsth). + End DEFINITIONS. @@ -250,7 +257,7 @@ Section ALMOST_RING. (** Leibniz equality leads to a setoid theory and is extensional*) Lemma Eqsth : Setoid_Theory R (@eq R). - Proof. constructor;intros;subst;trivial. Qed. + Proof. constructor;red;intros;subst;trivial. Qed. Lemma Eq_s_ext : sring_eq_ext radd rmul (@eq R). Proof. constructor;intros;subst;trivial. Qed. @@ -442,7 +449,7 @@ Section ALMOST_RING. End RING. - (** Usefull lemmas on almost ring *) + (** Useful lemmas on almost ring *) Variable ARth : almost_ring_theory 0 1 radd rmul rsub ropp req. Lemma ARth_SRth : semi_ring_theory 0 1 radd rmul req. @@ -564,7 +571,7 @@ End AddRing. (** Some simplification tactics*) Ltac gen_reflexivity Rsth := apply (Seq_refl _ _ Rsth). -Ltac gen_srewrite O I add mul sub opp eq Rsth Reqe ARth := +Ltac gen_srewrite Rsth Reqe ARth := repeat first [ gen_reflexivity Rsth | progress rewrite (ARopp_zero Rsth Reqe ARth) diff --git a/contrib/setoid_ring/ZArithRing.v b/contrib/setoid_ring/ZArithRing.v index 8de7021e..4a5b623b 100644 --- a/contrib/setoid_ring/ZArithRing.v +++ b/contrib/setoid_ring/ZArithRing.v @@ -17,14 +17,14 @@ Set Implicit Arguments. Ltac Zcst t := match isZcst t with true => t - | _ => NotConstant + | _ => constr:NotConstant end. Ltac isZpow_coef t := match t with | Zpos ?p => isPcst p - | Z0 => true - | _ => false + | Z0 => constr:true + | _ => constr:false end. Definition N_of_Z x := @@ -36,7 +36,7 @@ Definition N_of_Z x := Ltac Zpow_tac t := match isZpow_coef t with | true => constr:(N_of_Z t) - | _ => constr:(NotConstant) + | _ => constr:NotConstant end. Ltac Zpower_neg := @@ -49,8 +49,12 @@ Ltac Zpower_neg := end end. - Add Ring Zr : Zth (decidable Zeqb_ok, constants [Zcst], preprocess [Zpower_neg;unfold Zsucc], - power_tac Zpower_theory [Zpow_tac]). + power_tac Zpower_theory [Zpow_tac], + (* The two following option are not needed, it is the default chose when the set of + coefficiant is usual ring Z *) + div (InitialRing.Ztriv_div_th (@Eqsth Z) (@IDphi Z)), + sign get_signZ_th). + diff --git a/contrib/setoid_ring/newring.ml4 b/contrib/setoid_ring/newring.ml4 index 134ba1a8..dd79801d 100644 --- a/contrib/setoid_ring/newring.ml4 +++ b/contrib/setoid_ring/newring.ml4 @@ -8,7 +8,7 @@ (*i camlp4deps: "parsing/grammar.cma" i*) -(*i $Id: newring.ml4 10047 2007-07-24 17:55:18Z barras $ i*) +(*i $Id: newring.ml4 11094 2008-06-10 19:35:23Z herbelin $ i*) open Pp open Util @@ -104,7 +104,8 @@ let protect_tac map = Tactics.reduct_option (protect_red map,DEFAULTcast) None ;; let protect_tac_in map id = - Tactics.reduct_option (protect_red map,DEFAULTcast) (Some(([],id),InHyp));; + Tactics.reduct_option (protect_red map,DEFAULTcast) + (Some((all_occurrences_expr,id),InHyp));; TACTIC EXTEND protect_fv @@ -176,13 +177,9 @@ let ltac_lcall tac args = let carg c = TacDynamic(dummy_loc,Pretyping.constr_in c) -let dummy_goal env = - {Evd.it= - {Evd.evar_concl=mkProp; - Evd.evar_hyps=named_context_val env; - Evd.evar_body=Evd.Evar_empty; - Evd.evar_extra=None}; - Evd.sigma=Evd.empty} +let dummy_goal env = + {Evd.it = Evd.make_evar (named_context_val env) mkProp; + Evd.sigma = Evd.empty} let exec_tactic env n f args = let lid = list_tabulate(fun i -> id_of_string("x"^string_of_int i)) n in @@ -205,7 +202,8 @@ let constr_of = function let stdlib_modules = [["Coq";"Setoids";"Setoid"]; ["Coq";"Lists";"List"]; - ["Coq";"Init";"Datatypes"] + ["Coq";"Init";"Datatypes"]; + ["Coq";"Init";"Logic"]; ] let coq_constant c = @@ -216,6 +214,7 @@ let coq_cons = coq_constant "cons" let coq_nil = coq_constant "nil" let coq_None = coq_constant "None" let coq_Some = coq_constant "Some" +let coq_eq = coq_constant "eq" let lapp f args = mkApp(Lazy.force f,args) @@ -452,10 +451,12 @@ let (theory_to_obj, obj_to_theory) = export_function = export_th } -let setoid_of_relation r = +let setoid_of_relation env a r = lapp coq_mk_Setoid - [|r.rel_a; r.rel_aeq; - out_some r.rel_refl; out_some r.rel_sym; out_some r.rel_trans |] + [|a ; r ; + Class_tactics.reflexive_proof env a r ; + Class_tactics.symmetric_proof env a r ; + Class_tactics.transitive_proof env a r |] let op_morph r add mul opp req m1 m2 m3 = lapp coq_mk_reqe [| r; add; mul; opp; req; m1; m2; m3 |] @@ -463,63 +464,110 @@ let op_morph r add mul opp req m1 m2 m3 = let op_smorph r add mul req m1 m2 = lapp coq_mk_seqe [| r; add; mul; req; m1; m2 |] -let default_ring_equality (r,add,mul,opp,req) = - let is_setoid = function - {rel_refl=Some _; rel_sym=Some _;rel_trans=Some _;rel_aeq=rel} -> - eq_constr req rel (* Qu: use conversion ? *) - | _ -> false in - match default_relation_for_carrier ~filter:is_setoid r with - Leibniz _ -> - let setoid = lapp coq_eq_setoid [|r|] in - let op_morph = - match opp with +(* let default_ring_equality (r,add,mul,opp,req) = *) +(* let is_setoid = function *) +(* {rel_refl=Some _; rel_sym=Some _;rel_trans=Some _;rel_aeq=rel} -> *) +(* eq_constr req rel (\* Qu: use conversion ? *\) *) +(* | _ -> false in *) +(* match default_relation_for_carrier ~filter:is_setoid r with *) +(* Leibniz _ -> *) +(* let setoid = lapp coq_eq_setoid [|r|] in *) +(* let op_morph = *) +(* match opp with *) +(* Some opp -> lapp coq_eq_morph [|r;add;mul;opp|] *) +(* | None -> lapp coq_eq_smorph [|r;add;mul|] in *) +(* (setoid,op_morph) *) +(* | Relation rel -> *) +(* let setoid = setoid_of_relation rel in *) +(* let is_endomorphism = function *) +(* { args=args } -> List.for_all *) +(* (function (var,Relation rel) -> *) +(* var=None && eq_constr req rel *) +(* | _ -> false) args in *) +(* let add_m = *) +(* try default_morphism ~filter:is_endomorphism add *) +(* with Not_found -> *) +(* error "ring addition should be declared as a morphism" in *) +(* let mul_m = *) +(* try default_morphism ~filter:is_endomorphism mul *) +(* with Not_found -> *) +(* error "ring multiplication should be declared as a morphism" in *) +(* let op_morph = *) +(* match opp with *) +(* | Some opp -> *) +(* (let opp_m = *) +(* try default_morphism ~filter:is_endomorphism opp *) +(* with Not_found -> *) +(* error "ring opposite should be declared as a morphism" in *) +(* let op_morph = *) +(* op_morph r add mul opp req add_m.lem mul_m.lem opp_m.lem in *) +(* msgnl *) +(* (str"Using setoid \""++pr_constr rel.rel_aeq++str"\""++spc()++ *) +(* str"and morphisms \""++pr_constr add_m.morphism_theory++ *) +(* str"\","++spc()++ str"\""++pr_constr mul_m.morphism_theory++ *) +(* str"\""++spc()++str"and \""++pr_constr opp_m.morphism_theory++ *) +(* str"\""); *) +(* op_morph) *) +(* | None -> *) +(* (msgnl *) +(* (str"Using setoid \""++pr_constr rel.rel_aeq++str"\"" ++ spc() ++ *) +(* str"and morphisms \""++pr_constr add_m.morphism_theory++ *) +(* str"\""++spc()++str"and \""++ *) +(* pr_constr mul_m.morphism_theory++str"\""); *) +(* op_smorph r add mul req add_m.lem mul_m.lem) in *) +(* (setoid,op_morph) *) + +let ring_equality (r,add,mul,opp,req) = + match kind_of_term req with + | App (f, [| _ |]) when eq_constr f (Lazy.force coq_eq) -> + let setoid = lapp coq_eq_setoid [|r|] in + let op_morph = + match opp with Some opp -> lapp coq_eq_morph [|r;add;mul;opp|] | None -> lapp coq_eq_smorph [|r;add;mul|] in - (setoid,op_morph) - | Relation rel -> - let setoid = setoid_of_relation rel in - let is_endomorphism = function - { args=args } -> List.for_all - (function (var,Relation rel) -> - var=None && eq_constr req rel - | _ -> false) args in - let add_m = - try default_morphism ~filter:is_endomorphism add + (setoid,op_morph) + | _ -> + let setoid = setoid_of_relation (Global.env ()) r req in + let signature = [Some (r,req);Some (r,req)],Some(Lazy.lazy_from_val (r,req)) in + let add_m, add_m_lem = + try Class_tactics.default_morphism signature add with Not_found -> error "ring addition should be declared as a morphism" in - let mul_m = - try default_morphism ~filter:is_endomorphism mul + let mul_m, mul_m_lem = + try Class_tactics.default_morphism signature mul with Not_found -> error "ring multiplication should be declared as a morphism" in let op_morph = match opp with | Some opp -> - (let opp_m = - try default_morphism ~filter:is_endomorphism opp - with Not_found -> - error "ring opposite should be declared as a morphism" in - let op_morph = - op_morph r add mul opp req add_m.lem mul_m.lem opp_m.lem in - msgnl - (str"Using setoid \""++pr_constr rel.rel_aeq++str"\""++spc()++ - str"and morphisms \""++pr_constr add_m.morphism_theory++ - str"\","++spc()++ str"\""++pr_constr mul_m.morphism_theory++ - str"\""++spc()++str"and \""++pr_constr opp_m.morphism_theory++ - str"\""); - op_morph) + (let opp_m,opp_m_lem = + try Class_tactics.default_morphism ([Some(r,req)],Some(Lazy.lazy_from_val (r,req))) opp + with Not_found -> + error "ring opposite should be declared as a morphism" in + let op_morph = + op_morph r add mul opp req add_m_lem mul_m_lem opp_m_lem in + Flags.if_verbose + msgnl + (str"Using setoid \""++pr_constr req++str"\""++spc()++ + str"and morphisms \""++pr_constr add_m_lem ++ + str"\","++spc()++ str"\""++pr_constr mul_m_lem++ + str"\""++spc()++str"and \""++pr_constr opp_m_lem++ + str"\""); + op_morph) | None -> - (msgnl - (str"Using setoid \""++pr_constr rel.rel_aeq++str"\"" ++ spc() ++ - str"and morphisms \""++pr_constr add_m.morphism_theory++ - str"\""++spc()++str"and \""++ - pr_constr mul_m.morphism_theory++str"\""); - op_smorph r add mul req add_m.lem mul_m.lem) in - (setoid,op_morph) - + (Flags.if_verbose + msgnl + (str"Using setoid \""++pr_constr req ++str"\"" ++ spc() ++ + str"and morphisms \""++pr_constr add_m_lem ++ + str"\""++spc()++str"and \""++ + pr_constr mul_m_lem++str"\""); + op_smorph r add mul req add_m_lem mul_m_lem) in + (setoid,op_morph) + let build_setoid_params r add mul opp req eqth = match eqth with Some th -> th - | None -> default_ring_equality (r,add,mul,opp,req) + | None -> ring_equality (r,add,mul,opp,req) let dest_ring env sigma th_spec = let th_typ = Retyping.get_type_of env sigma th_spec in @@ -569,7 +617,8 @@ type cst_tac_spec = let interp_cst_tac env sigma rk kind (zero,one,add,mul,opp) cst_tac = match cst_tac with Some (CstTac t) -> Tacinterp.glob_tactic t - | Some (Closed lc) -> closed_term_ast (List.map Nametab.global lc) + | Some (Closed lc) -> + closed_term_ast (List.map Syntax_def.global_with_alias lc) | None -> (match rk, opp, kind with Abstract, None, _ -> @@ -612,7 +661,8 @@ let interp_power env pow = let tac = match tac with | CstTac t -> Tacinterp.glob_tactic t - | Closed lc -> closed_term_ast (List.map Nametab.global lc) in + | Closed lc -> + closed_term_ast (List.map Syntax_def.global_with_alias lc) in let spec = make_hyp env (ic spec) in (tac, lapp coq_Some [|carrier; spec|]) @@ -625,7 +675,16 @@ let interp_sign env sign = lapp coq_Some [|carrier;spec|] (* Same remark on ill-typed terms ... *) -let add_theory name rth eqth morphth cst_tac (pre,post) power sign = +let interp_div env div = + let carrier = Lazy.force coq_hypo in + match div with + | None -> lapp coq_None [|carrier|] + | Some spec -> + let spec = make_hyp env (ic spec) in + lapp coq_Some [|carrier;spec|] + (* Same remark on ill-typed terms ... *) + +let add_theory name rth eqth morphth cst_tac (pre,post) power sign div = check_required_library (cdir@["Ring_base"]); let env = Global.env() in let sigma = Evd.empty in @@ -633,10 +692,11 @@ let add_theory name rth eqth morphth cst_tac (pre,post) power sign = let (sth,ext) = build_setoid_params r add mul opp req eqth in let (pow_tac, pspec) = interp_power env power in let sspec = interp_sign env sign in + let dspec = interp_div env div in let rk = reflect_coeff morphth in let params = exec_tactic env 5 (zltac "ring_lemmas") - (List.map carg[sth;ext;rth;pspec;sspec;rk]) in + (List.map carg[sth;ext;rth;pspec;sspec;dspec;rk]) in let lemma1 = constr_of params.(3) in let lemma2 = constr_of params.(4) in @@ -678,6 +738,7 @@ type ring_mod = | Pow_spec of cst_tac_spec * Topconstr.constr_expr (* Syntaxification tactic , correctness lemma *) | Sign_spec of Topconstr.constr_expr + | Div_spec of Topconstr.constr_expr VERNAC ARGUMENT EXTEND ring_mod @@ -694,6 +755,7 @@ VERNAC ARGUMENT EXTEND ring_mod [ Pow_spec (Closed l, pow_spec) ] | [ "power_tac" constr(pow_spec) "[" tactic(cst_tac) "]" ] -> [ Pow_spec (CstTac cst_tac, pow_spec) ] + | [ "div" constr(div_spec) ] -> [ Div_spec div_spec ] END let set_once s r v = @@ -707,6 +769,7 @@ let process_ring_mods l = let post = ref None in let sign = ref None in let power = ref None in + let div = ref None in List.iter(function Ring_kind k -> set_once "ring kind" kind k | Const_tac t -> set_once "tactic recognizing constants" cst_tac t @@ -714,14 +777,15 @@ let process_ring_mods l = | Post_tac t -> set_once "postprocess tactic" post t | Setoid(sth,ext) -> set_once "setoid" set (ic sth,ic ext) | Pow_spec(t,spec) -> set_once "power" power (t,spec) - | Sign_spec t -> set_once "sign" sign t) l; + | Sign_spec t -> set_once "sign" sign t + | Div_spec t -> set_once "div" div t) l; let k = match !kind with Some k -> k | None -> Abstract in - (k, !set, !cst_tac, !pre, !post, !power, !sign) + (k, !set, !cst_tac, !pre, !post, !power, !sign, !div) VERNAC COMMAND EXTEND AddSetoidRing | [ "Add" "Ring" ident(id) ":" constr(t) ring_mods(l) ] -> - [ let (k,set,cst,pre,post,power,sign) = process_ring_mods l in - add_theory id (ic t) set k cst (pre,post) power sign ] + [ let (k,set,cst,pre,post,power,sign, div) = process_ring_mods l in + add_theory id (ic t) set k cst (pre,post) power sign div] END (*****************************************************************************) @@ -759,15 +823,14 @@ let ring_lookup (f:glob_tactic_expr) lH rl t gl = let posttac = Tacexp(TacFun([None],e.ring_post_tac)) in Tacinterp.eval_tactic (TacLetIn - ([(dummy_loc,id_of_string"f"),None,Tacexp f], + (false,[(dummy_loc,id_of_string"f"),Tacexp f], ltac_lcall "f" [req;sth;ext;morph;th;cst_tac;pow_tac; lemma1;lemma2;pretac;posttac;lH;rl])) gl TACTIC EXTEND ring_lookup -| [ "ring_lookup" tactic(f) "[" constr_list(lH) "]" constr_list(lr) - "[" constr(t) "]" ] -> - [ring_lookup (fst f) lH lr t] +| [ "ring_lookup" tactic0(f) "[" constr_list(lH) "]" ne_constr_list(lrt) ] -> + [ let (t,lr) = list_sep_last lrt in ring_lookup (fst f) lH lr t] END @@ -968,26 +1031,20 @@ let (ftheory_to_obj, obj_to_ftheory) = classify_function = (fun (_,x) -> Substitute x); export_function = export_th } -let default_field_equality r inv req = - let is_setoid = function - {rel_refl=Some _; rel_sym=Some _;rel_trans=Some _} -> true - | _ -> false in - match default_relation_for_carrier ~filter:is_setoid r with - Leibniz _ -> +let field_equality r inv req = + match kind_of_term req with + | App (f, [| _ |]) when eq_constr f (Lazy.force coq_eq) -> mkApp((Coqlib.build_coq_eq_data()).congr,[|r;r;inv|]) - | Relation rel -> - let is_endomorphism = function - { args=args } -> List.for_all - (function (var,Relation rel) -> - var=None && eq_constr req rel - | _ -> false) args in - let inv_m = - try default_morphism ~filter:is_endomorphism inv + | _ -> + let _setoid = setoid_of_relation (Global.env ()) r req in + let signature = [Some (r,req)],Some(Lazy.lazy_from_val (r,req)) in + let inv_m, inv_m_lem = + try Class_tactics.default_morphism signature inv with Not_found -> error "field inverse should be declared as a morphism" in - inv_m.lem - -let add_field_theory name fth eqth morphth cst_tac inj (pre,post) power sign = + inv_m_lem + +let add_field_theory name fth eqth morphth cst_tac inj (pre,post) power sign odiv = check_required_library (cdir@["Field_tac"]); let env = Global.env() in let sigma = Evd.empty in @@ -995,14 +1052,15 @@ let add_field_theory name fth eqth morphth cst_tac inj (pre,post) power sign = dest_field env sigma fth in let (sth,ext) = build_setoid_params r add mul opp req eqth in let eqth = Some(sth,ext) in - let _ = add_theory name rth eqth morphth cst_tac (None,None) power sign in + let _ = add_theory name rth eqth morphth cst_tac (None,None) power sign odiv in let (pow_tac, pspec) = interp_power env power in let sspec = interp_sign env sign in - let inv_m = default_field_equality r inv req in + let dspec = interp_div env odiv in + let inv_m = field_equality r inv req in let rk = reflect_coeff morphth in let params = exec_tactic env 9 (field_ltac"field_lemmas") - (List.map carg[sth;ext;inv_m;fth;pspec;sspec;rk]) in + (List.map carg[sth;ext;inv_m;fth;pspec;sspec;dspec;rk]) in let lemma1 = constr_of params.(3) in let lemma2 = constr_of params.(4) in let lemma3 = constr_of params.(5) in @@ -1059,6 +1117,7 @@ let process_field_mods l = let inj = ref None in let sign = ref None in let power = ref None in + let div = ref None in List.iter(function Ring_mod(Ring_kind k) -> set_once "field kind" kind k | Ring_mod(Const_tac t) -> @@ -1068,14 +1127,15 @@ let process_field_mods l = | Ring_mod(Setoid(sth,ext)) -> set_once "setoid" set (ic sth,ic ext) | Ring_mod(Pow_spec(t,spec)) -> set_once "power" power (t,spec) | Ring_mod(Sign_spec t) -> set_once "sign" sign t + | Ring_mod(Div_spec t) -> set_once "div" div t | Inject i -> set_once "infinite property" inj (ic i)) l; let k = match !kind with Some k -> k | None -> Abstract in - (k, !set, !inj, !cst_tac, !pre, !post, !power, !sign) + (k, !set, !inj, !cst_tac, !pre, !post, !power, !sign, !div) VERNAC COMMAND EXTEND AddSetoidField | [ "Add" "Field" ident(id) ":" constr(t) field_mods(l) ] -> - [ let (k,set,inj,cst_tac,pre,post,power,sign) = process_field_mods l in - add_field_theory id (ic t) set k cst_tac inj (pre,post) power sign] + [ let (k,set,inj,cst_tac,pre,post,power,sign,div) = process_field_mods l in + add_field_theory id (ic t) set k cst_tac inj (pre,post) power sign div] END let field_lookup (f:glob_tactic_expr) lH rl t gl = @@ -1097,13 +1157,12 @@ let field_lookup (f:glob_tactic_expr) lH rl t gl = let posttac = Tacexp(TacFun([None],e.field_post_tac)) in Tacinterp.eval_tactic (TacLetIn - ([(dummy_loc,id_of_string"f"),None,Tacexp f], + (false,[(dummy_loc,id_of_string"f"),Tacexp f], ltac_lcall "f" [req;cst_tac;pow_tac;field_ok;field_simpl_ok;field_simpl_eq_ok; field_simpl_eq_in_ok;cond_ok;pretac;posttac;lH;rl])) gl TACTIC EXTEND field_lookup -| [ "field_lookup" tactic(f) "[" constr_list(lH) "]" constr_list(l) - "[" constr(t) "]" ] -> - [ field_lookup (fst f) lH l t ] +| [ "field_lookup" tactic0(f) "[" constr_list(lH) "]" ne_constr_list(lt) ] -> + [ let (t,l) = list_sep_last lt in field_lookup (fst f) lH l t ] END diff --git a/contrib/subtac/FixSub.v b/contrib/subtac/FixSub.v deleted file mode 100644 index f047b729..00000000 --- a/contrib/subtac/FixSub.v +++ /dev/null @@ -1,147 +0,0 @@ -Require Import Wf. -Require Import Coq.subtac.Utils. - -(** Reformulation of the Wellfounded module using subsets where possible. *) - -Section Well_founded. - Variable A : Type. - Variable R : A -> A -> Prop. - Hypothesis Rwf : well_founded R. - - Section Acc. - - Variable P : A -> Type. - - Variable F_sub : forall x:A, (forall y: { y : A | R y x }, P (proj1_sig y)) -> P x. - - Fixpoint Fix_F_sub (x : A) (r : Acc R x) {struct r} : P x := - F_sub x (fun y: { y : A | R y x} => Fix_F_sub (proj1_sig y) - (Acc_inv r (proj1_sig y) (proj2_sig y))). - - Definition Fix_sub (x : A) := Fix_F_sub x (Rwf x). - End Acc. - - Section FixPoint. - Variable P : A -> Type. - - Variable F_sub : forall x:A, (forall y: { y : A | R y x }, P (proj1_sig y)) -> P x. - - Notation Fix_F := (Fix_F_sub P F_sub) (only parsing). (* alias *) - - Definition Fix (x:A) := Fix_F_sub P F_sub x (Rwf x). - - Hypothesis - F_ext : - forall (x:A) (f g:forall y:{y:A | R y x}, P (`y)), - (forall y:{ y:A | R y x}, f y = g y) -> F_sub x f = F_sub x g. - - Lemma Fix_F_eq : - forall (x:A) (r:Acc R x), - F_sub x (fun (y:{y:A|R y x}) => Fix_F (`y) (Acc_inv r (proj1_sig y) (proj2_sig y))) = Fix_F x r. - Proof. - destruct r using Acc_inv_dep; auto. - Qed. - - Lemma Fix_F_inv : forall (x:A) (r s:Acc R x), Fix_F x r = Fix_F x s. - Proof. - intro x; induction (Rwf x); intros. - rewrite <- (Fix_F_eq x r); rewrite <- (Fix_F_eq x s); intros. - apply F_ext; auto. - intros. - rewrite (proof_irrelevance (Acc R x) r s) ; auto. - Qed. - - Lemma Fix_eq : forall x:A, Fix x = F_sub x (fun (y:{y:A|R y x}) => Fix (proj1_sig y)). - Proof. - intro x; unfold Fix in |- *. - rewrite <- (Fix_F_eq ). - apply F_ext; intros. - apply Fix_F_inv. - Qed. - - Lemma fix_sub_eq : - forall x : A, - Fix_sub P F_sub x = - let f_sub := F_sub in - f_sub x (fun {y : A | R y x}=> Fix (`y)). - exact Fix_eq. - Qed. - - End FixPoint. - -End Well_founded. - -Extraction Inline Fix_F_sub Fix_sub. - -Require Import Wf_nat. -Require Import Lt. - -Section Well_founded_measure. - Variable A : Type. - Variable m : A -> nat. - - Section Acc. - - Variable P : A -> Type. - - Variable F_sub : forall x:A, (forall y: { y : A | m y < m x }, P (proj1_sig y)) -> P x. - - Fixpoint Fix_measure_F_sub (x : A) (r : Acc lt (m x)) {struct r} : P x := - F_sub x (fun y: { y : A | m y < m x} => Fix_measure_F_sub (proj1_sig y) - (Acc_inv r (m (proj1_sig y)) (proj2_sig y))). - - Definition Fix_measure_sub (x : A) := Fix_measure_F_sub x (lt_wf (m x)). - - End Acc. - - Section FixPoint. - Variable P : A -> Type. - - Variable F_sub : forall x:A, (forall y: { y : A | m y < m x }, P (proj1_sig y)) -> P x. - - Notation Fix_F := (Fix_measure_F_sub P F_sub) (only parsing). (* alias *) - - Definition Fix_measure (x:A) := Fix_measure_F_sub P F_sub x (lt_wf (m x)). - - Hypothesis - F_ext : - forall (x:A) (f g:forall y:{y:A | m y < m x}, P (`y)), - (forall y:{ y:A | m y < m x}, f y = g y) -> F_sub x f = F_sub x g. - - Lemma Fix_measure_F_eq : - forall (x:A) (r:Acc lt (m x)), - F_sub x (fun (y:{y:A|m y < m x}) => Fix_F (`y) (Acc_inv r (m (proj1_sig y)) (proj2_sig y))) = Fix_F x r. - Proof. - intros x. - set (y := m x). - unfold Fix_measure_F_sub. - intros r ; case r ; auto. - Qed. - - Lemma Fix_measure_F_inv : forall (x:A) (r s:Acc lt (m x)), Fix_F x r = Fix_F x s. - Proof. - intros x r s. - rewrite (proof_irrelevance (Acc lt (m x)) r s) ; auto. - Qed. - - Lemma Fix_measure_eq : forall x:A, Fix_measure x = F_sub x (fun (y:{y:A| m y < m x}) => Fix_measure (proj1_sig y)). - Proof. - intro x; unfold Fix_measure in |- *. - rewrite <- (Fix_measure_F_eq ). - apply F_ext; intros. - apply Fix_measure_F_inv. - Qed. - - Lemma fix_measure_sub_eq : - forall x : A, - Fix_measure_sub P F_sub x = - let f_sub := F_sub in - f_sub x (fun {y : A | m y < m x}=> Fix_measure (`y)). - exact Fix_measure_eq. - Qed. - - End FixPoint. - -End Well_founded_measure. - -Extraction Inline Fix_measure_F_sub Fix_measure_sub. diff --git a/contrib/subtac/FunctionalExtensionality.v b/contrib/subtac/FunctionalExtensionality.v deleted file mode 100644 index 4610f346..00000000 --- a/contrib/subtac/FunctionalExtensionality.v +++ /dev/null @@ -1,47 +0,0 @@ -Lemma equal_f : forall A B : Type, forall (f g : A -> B), - f = g -> forall x, f x = g x. -Proof. - intros. - rewrite H. - auto. -Qed. - -Axiom fun_extensionality : forall A B (f g : A -> B), - (forall x, f x = g x) -> f = g. - -Axiom fun_extensionality_dep : forall A, forall B : (A -> Type), forall (f g : forall x : A, B x), - (forall x, f x = g x) -> f = g. - -Hint Resolve fun_extensionality fun_extensionality_dep : subtac. - -Require Import Coq.subtac.Utils. -Require Import Coq.subtac.FixSub. - -Lemma fix_sub_eq_ext : - forall (A : Set) (R : A -> A -> Prop) (Rwf : well_founded R) - (P : A -> Set) - (F_sub : forall x : A, (forall {y : A | R y x}, P (`y)) -> P x), - forall x : A, - Fix_sub A R Rwf P F_sub x = - F_sub x (fun {y : A | R y x}=> Fix A R Rwf P F_sub (`y)). -Proof. - intros ; apply Fix_eq ; auto. - intros. - assert(f = g). - apply (fun_extensionality_dep _ _ _ _ H). - rewrite H0 ; auto. -Qed. - -Lemma fix_sub_measure_eq_ext : - forall (A : Type) (f : A -> nat) (P : A -> Type) - (F_sub : forall x : A, (forall {y : A | f y < f x}, P (`y)) -> P x), - forall x : A, - Fix_measure_sub A f P F_sub x = - F_sub x (fun {y : A | f y < f x}=> Fix_measure_sub A f P F_sub (`y)). -Proof. - intros ; apply Fix_measure_eq ; auto. - intros. - assert(f0 = g). - apply (fun_extensionality_dep _ _ _ _ H). - rewrite H0 ; auto. -Qed. diff --git a/contrib/subtac/Heq.v b/contrib/subtac/Heq.v deleted file mode 100644 index f2b216d9..00000000 --- a/contrib/subtac/Heq.v +++ /dev/null @@ -1,34 +0,0 @@ -Require Export JMeq. - -(** Notation for heterogenous equality. *) - -Notation " [ x : X ] = [ y : Y ] " := (@JMeq X x Y y) (at level 0, X at next level, Y at next level). - -(** Do something on an heterogeneous equality appearing in the context. *) - -Ltac on_JMeq tac := - match goal with - | [ H : @JMeq ?x ?X ?y ?Y |- _ ] => tac H - end. - -(** Try to apply [JMeq_eq] to get back a regular equality when the two types are equal. *) - -Ltac simpl_one_JMeq := - on_JMeq - ltac:(fun H => let H' := fresh "H" in - assert (H' := JMeq_eq H) ; clear H ; rename H' into H). - -(** Repeat it for every possible hypothesis. *) - -Ltac simpl_JMeq := repeat simpl_one_JMeq. - -(** Just simplify an h.eq. without clearing it. *) - -Ltac simpl_one_dep_JMeq := - on_JMeq - ltac:(fun H => let H' := fresh "H" in - assert (H' := JMeq_eq H)). - - - - diff --git a/contrib/subtac/Subtac.v b/contrib/subtac/Subtac.v deleted file mode 100644 index 9912cd24..00000000 --- a/contrib/subtac/Subtac.v +++ /dev/null @@ -1,2 +0,0 @@ -Require Export Coq.subtac.Utils. -Require Export Coq.subtac.FixSub. \ No newline at end of file diff --git a/contrib/subtac/SubtacTactics.v b/contrib/subtac/SubtacTactics.v deleted file mode 100644 index a00234dd..00000000 --- a/contrib/subtac/SubtacTactics.v +++ /dev/null @@ -1,158 +0,0 @@ -Ltac induction_with_subterm c H := - let x := fresh "x" in - let y := fresh "y" in - (remember c as x ; rewrite <- y in H ; induction H ; subst). - -Ltac induction_on_subterm c := - let x := fresh "x" in - let y := fresh "y" in - (set(x := c) ; assert(y:x = c) by reflexivity ; clearbody x ; induction x ; inversion y ; try subst ; - clear y). - -Ltac induction_with_subterms c c' H := - let x := fresh "x" in - let y := fresh "y" in - let z := fresh "z" in - let w := fresh "w" in - (set(x := c) ; assert(y:x = c) by reflexivity ; - set(z := c') ; assert(w:z = c') by reflexivity ; - rewrite <- y in H ; rewrite <- w in H ; - induction H ; subst). - - -Ltac destruct_one_pair := - match goal with - | [H : (_ /\ _) |- _] => destruct H - | [H : prod _ _ |- _] => destruct H - end. - -Ltac destruct_pairs := repeat (destruct_one_pair). - -Ltac destruct_one_ex := - let tac H := let ph := fresh "H" in destruct H as [H ph] in - match goal with - | [H : (ex _) |- _] => tac H - | [H : (sig ?P) |- _ ] => tac H - | [H : (ex2 _) |- _] => tac H - end. - -Ltac destruct_exists := repeat (destruct_one_ex). - -Tactic Notation "destruct" "exist" ident(t) ident(Ht) := destruct t as [t Ht]. - -Tactic Notation "destruct" "or" ident(H) := destruct H as [H|H]. - -Tactic Notation "contradiction" "by" constr(t) := - let H := fresh in assert t as H by auto with * ; contradiction. - -Ltac discriminates := - match goal with - | [ H : ?x <> ?x |- _ ] => elim H ; reflexivity - | _ => discriminate - end. - -Ltac destruct_conjs := repeat (destruct_one_pair || destruct_one_ex). - -Ltac on_last_hyp tac := - match goal with - [ H : _ |- _ ] => tac H - end. - -Tactic Notation "on_last_hyp" tactic(t) := on_last_hyp t. - -Ltac revert_last := - match goal with - [ H : _ |- _ ] => revert H - end. - -Ltac reverse := repeat revert_last. - -Ltac on_call f tac := - match goal with - | H : ?T |- _ => - match T with - | context [f ?x ?y ?z ?w ?v ?u] => tac (f x y z w v u) - | context [f ?x ?y ?z ?w ?v] => tac (f x y z w v) - | context [f ?x ?y ?z ?w] => tac (f x y z w) - | context [f ?x ?y ?z] => tac (f x y z) - | context [f ?x ?y] => tac (f x y) - | context [f ?x] => tac (f x) - end - | |- ?T => - match T with - | context [f ?x ?y ?z ?w ?v ?u] => tac (f x y z w v u) - | context [f ?x ?y ?z ?w ?v] => tac (f x y z w v) - | context [f ?x ?y ?z ?w] => tac (f x y z w) - | context [f ?x ?y ?z] => tac (f x y z) - | context [f ?x ?y] => tac (f x y) - | context [f ?x] => tac (f x) - end - end. - -(* Destructs calls to f in hypothesis or conclusion, useful if f creates a subset object *) -Ltac destruct_call f := - let tac t := destruct t in on_call f tac. - -Ltac destruct_call_as f l := - let tac t := destruct t as l in on_call f tac. - -Tactic Notation "destruct_call" constr(f) := destruct_call f. -Tactic Notation "destruct_call" constr(f) "as" simple_intropattern(l) := destruct_call_as f l. - -Ltac myinjection := - let tac H := inversion H ; subst ; clear H in - match goal with - | [ H : ?f ?a = ?f' ?a' |- _ ] => tac H - | [ H : ?f ?a ?b = ?f' ?a' ?b' |- _ ] => tac H - | [ H : ?f ?a ?b ?c = ?f' ?a' ?b' ?c' |- _ ] => tac H - | [ H : ?f ?a ?b ?c ?d= ?f' ?a' ?b' ?c' ?d' |- _ ] => tac H - | [ H : ?f ?a ?b ?c ?d ?e= ?f' ?a' ?b' ?c' ?d' ?e' |- _ ] => tac H - | [ H : ?f ?a ?b ?c ?d ?e ?g= ?f' ?a' ?b' ?c' ?d' ?e' ?g' |- _ ] => tac H - | [ H : ?f ?a ?b ?c ?d ?e ?g ?h= ?f' ?a' ?b' ?c' ?d' ?e'?g' ?h' |- _ ] => tac H - | [ H : ?f ?a ?b ?c ?d ?e ?g ?h ?i = ?f' ?a' ?b' ?c' ?d' ?e'?g' ?h' ?i' |- _ ] => tac H - | [ H : ?f ?a ?b ?c ?d ?e ?g ?h ?i ?j = ?f' ?a' ?b' ?c' ?d' ?e'?g' ?h' ?i' ?j' |- _ ] => tac H - | _ => idtac - end. - -Ltac destruct_nondep H := let H0 := fresh "H" in assert(H0 := H); destruct H0. - -Ltac bang := - match goal with - | |- ?x => - match x with - | context [False_rect _ ?p] => elim p - end - end. - -Require Import Eqdep. - -Ltac elim_eq_rect := - match goal with - | [ |- ?t ] => - match t with - | context [ @eq_rect _ _ _ _ _ ?p ] => - let P := fresh "P" in - set (P := p); simpl in P ; - try ((case P ; clear P) || (clearbody P; rewrite (UIP_refl _ _ P); clear P)) - | context [ @eq_rect _ _ _ _ _ ?p _ ] => - let P := fresh "P" in - set (P := p); simpl in P ; - try ((case P ; clear P) || (clearbody P; rewrite (UIP_refl _ _ P); clear P)) - end - end. - -Ltac real_elim_eq_rect := - match goal with - | [ |- ?t ] => - match t with - | context [ @eq_rect _ _ _ _ _ ?p ] => - let P := fresh "P" in - set (P := p); simpl in P ; - ((case P ; clear P) || (clearbody P; rewrite (UIP_refl _ _ P); clear P)) - | context [ @eq_rect _ _ _ _ _ ?p _ ] => - let P := fresh "P" in - set (P := p); simpl in P ; - ((case P ; clear P) || (clearbody P; rewrite (UIP_refl _ _ P); clear P)) - end - end. - \ No newline at end of file diff --git a/contrib/subtac/Utils.v b/contrib/subtac/Utils.v deleted file mode 100644 index 76f49dd3..00000000 --- a/contrib/subtac/Utils.v +++ /dev/null @@ -1,65 +0,0 @@ -Require Export Coq.subtac.SubtacTactics. - -Set Implicit Arguments. - -(** Wrap a proposition inside a subset. *) - -Notation " {{ x }} " := (tt : { y : unit | x }). - -(** A simpler notation for subsets defined on a cartesian product. *) - -Notation "{ ( x , y ) : A | P }" := - (sig (fun anonymous : A => let (x,y) := anonymous in P)) - (x ident, y ident) : type_scope. - -(** Generates an obligation to prove False. *) - -Notation " ! " := (False_rect _ _). - -(** Abbreviation for first projection and hiding of proofs of subset objects. *) - -Notation " ` t " := (proj1_sig t) (at level 10) : core_scope. -Notation "( x & ? )" := (@exist _ _ x _) : core_scope. - -(** Coerces objects to their support before comparing them. *) - -Notation " x '`=' y " := ((x :>) = (y :>)) (at level 70). - -(** Quantifying over subsets. *) - -Notation "'fun' { x : A | P } => Q" := - (fun x:{x:A|P} => Q) - (at level 200, x ident, right associativity). - -Notation "'forall' { x : A | P } , Q" := - (forall x:{x:A|P}, Q) - (at level 200, x ident, right associativity). - -Require Import Coq.Bool.Sumbool. - -(** Construct a dependent disjunction from a boolean. *) - -Notation "'dec'" := (sumbool_of_bool) (at level 0). - -(** The notations [in_right] and [in_left] construct objects of a dependent disjunction. *) - -Notation in_right := (@right _ _ _). -Notation in_left := (@left _ _ _). - -(** Default simplification tactic. *) - -Ltac subtac_simpl := simpl ; intros ; destruct_conjs ; simpl in * ; try subst ; - try (solve [ red ; intros ; discriminate ]) ; auto with *. - -(** Extraction directives *) -Extraction Inline proj1_sig. -Extract Inductive unit => "unit" [ "()" ]. -Extract Inductive bool => "bool" [ "true" "false" ]. -Extract Inductive sumbool => "bool" [ "true" "false" ]. -(* Extract Inductive prod "'a" "'b" => " 'a * 'b " [ "(,)" ]. *) -(* Extract Inductive sigT => "prod" [ "" ]. *) - -Require Export ProofIrrelevance. -Require Export Coq.subtac.Heq. - -Delimit Scope program_scope with program. diff --git a/contrib/subtac/eterm.ml b/contrib/subtac/eterm.ml index 2a84fdd0..9bfb33ea 100644 --- a/contrib/subtac/eterm.ml +++ b/contrib/subtac/eterm.ml @@ -14,17 +14,21 @@ open Util open Subtac_utils let trace s = - if !Options.debug then (msgnl s; msgerr s) + if !Flags.debug then (msgnl s; msgerr s) else () +let succfix (depth, fixrels) = + (succ depth, List.map succ fixrels) + (** Substitute evar references in t using De Bruijn indices, where n binders were passed through. *) let subst_evar_constr evs n t = let seen = ref Intset.empty in + let transparent = ref Idset.empty in let evar_info id = List.assoc id evs in - let rec substrec depth c = match kind_of_term c with + let rec substrec (depth, fixrels) c = match kind_of_term c with | Evar (k, args) -> - let (id, idstr), hyps, chop, _, _ = + let (id, idstr), hyps, chop, _, _, _ = try evar_info k with Not_found -> anomaly ("eterm: existential variable " ^ string_of_int k ^ " not found") @@ -42,7 +46,7 @@ let subst_evar_constr evs n t = let rec aux hyps args acc = match hyps, args with ((_, None, _) :: tlh), (c :: tla) -> - aux tlh tla ((map_constr_with_binders succ substrec depth c) :: acc) + aux tlh tla ((map_constr_with_binders succfix substrec (depth, fixrels) c) :: acc) | ((_, Some _, _) :: tlh), (_ :: tla) -> aux tlh tla acc | [], [] -> acc @@ -53,11 +57,15 @@ let subst_evar_constr evs n t = int (List.length hyps) ++ str " hypotheses" ++ spc () ++ pp_list (fun x -> my_print_constr (Global.env ()) x) args); with _ -> ()); + if List.exists (fun x -> match kind_of_term x with Rel n -> List.mem n fixrels | _ -> false) args then + transparent := Idset.add idstr !transparent; mkApp (mkVar idstr, Array.of_list args) - | _ -> map_constr_with_binders succ substrec depth c + | Fix _ -> + map_constr_with_binders succfix substrec (depth, 1 :: fixrels) c + | _ -> map_constr_with_binders succfix substrec (depth, fixrels) c in - let t' = substrec 0 t in - t', !seen + let t' = substrec (0, []) t in + t', !seen, !transparent (** Substitute variable references in t using De Bruijn indices, @@ -74,26 +82,29 @@ let subst_vars acc n t = to a product : forall H1 : t1, ..., forall Hn : tn, concl. Changes evars and hypothesis references to variable references. A little optimization: don't include unnecessary let-ins and their dependencies. -*) +*) let etype_of_evar evs hyps concl = let rec aux acc n = function (id, copt, t) :: tl -> - let t', s = subst_evar_constr evs n t in + let t', s, trans = subst_evar_constr evs n t in let t'' = subst_vars acc 0 t' in - let rest, s' = aux (id :: acc) (succ n) tl in + let rest, s', trans' = aux (id :: acc) (succ n) tl in let s' = Intset.union s s' in + let trans' = Idset.union trans trans' in (match copt with Some c -> - if noccurn 1 rest then lift (-1) rest, s' + if noccurn 1 rest then lift (-1) rest, s', trans' else - let c', s'' = subst_evar_constr evs n c in + let c', s'', trans'' = subst_evar_constr evs n c in let c' = subst_vars acc 0 c' in - mkNamedProd_or_LetIn (id, Some c', t'') rest, Intset.union s'' s' + mkNamedProd_or_LetIn (id, Some c', t'') rest, + Intset.union s'' s', + Idset.union trans'' trans' | None -> - mkNamedProd_or_LetIn (id, None, t'') rest, s') + mkNamedProd_or_LetIn (id, None, t'') rest, s', trans') | [] -> - let t', s = subst_evar_constr evs n concl in - subst_vars acc 0 t', s + let t', s, trans = subst_evar_constr evs n concl in + subst_vars acc 0 t', s, trans in aux [] 0 (rev hyps) @@ -110,12 +121,14 @@ let rec chop_product n t = | Prod (_, _, b) -> if noccurn 1 b then chop_product (pred n) (Termops.pop b) else None | _ -> None -let eterm_obligations name nclen isevars evm fs t tycon = +let eterm_obligations env name isevars evm fs t ty = (* 'Serialize' the evars, we assume that the types of the existentials refer to previous existentials in the list only *) trace (str " In eterm: isevars: " ++ my_print_evardefs isevars); trace (str "Term given to eterm" ++ spc () ++ Termops.print_constr_env (Global.env ()) t); + let nc = Environ.named_context env in + let nc_len = Sign.named_context_length nc in let evl = List.rev (to_list evm) in let evn = let i = ref (-1) in @@ -128,9 +141,9 @@ let eterm_obligations name nclen isevars evm fs t tycon = (* Remove existential variables in types and build the corresponding products *) fold_right (fun (id, (n, nstr), ev) l -> - let hyps = Environ.named_context_of_val ev.evar_hyps in - let hyps = trunc_named_context nclen hyps in - let evtyp, deps = etype_of_evar l hyps ev.evar_concl in + let hyps = Evd.evar_filtered_context ev in + let hyps = trunc_named_context nc_len hyps in + let evtyp, deps, transp = etype_of_evar l hyps ev.evar_concl in let evtyp, hyps, chop = match chop_product fs evtyp with Some t -> @@ -145,26 +158,28 @@ let eterm_obligations name nclen isevars evm fs t tycon = let loc, k = evar_source id isevars in let opacity = match k with QuestionMark o -> o | _ -> true in let opaque = if not opacity || chop <> fs then None else Some chop in - let y' = (id, ((n, nstr), hyps, opaque, evtyp, deps)) in + let y' = (id, ((n, nstr), hyps, opaque, loc, evtyp, deps)) in y' :: l) evn [] in - let t', _ = (* Substitute evar refs in the term by variables *) + let t', _, transparent = (* Substitute evar refs in the term by variables *) subst_evar_constr evts 0 t in + let ty, _, _ = subst_evar_constr evts 0 ty in let evars = - List.map (fun (_, ((_, name), _, opaque, typ, deps)) -> name, typ, not (opaque = None), deps) evts + List.map (fun (_, ((_, name), _, opaque, loc, typ, deps)) -> + name, typ, loc, not (opaque = None) && not (Idset.mem name transparent), deps) evts in (try trace (str "Term constructed in eterm" ++ spc () ++ Termops.print_constr_env (Global.env ()) t'); ignore(iter - (fun (name, typ, _, deps) -> + (fun (name, typ, _, _, deps) -> trace (str "Evar :" ++ spc () ++ str (string_of_id name) ++ Termops.print_constr_env (Global.env ()) typ)) evars); with _ -> ()); - Array.of_list (List.rev evars), t' + Array.of_list (List.rev evars), t', ty let mkMetas n = list_tabulate (fun _ -> Evarutil.mk_new_meta ()) n diff --git a/contrib/subtac/eterm.mli b/contrib/subtac/eterm.mli index 76994c06..007e327c 100644 --- a/contrib/subtac/eterm.mli +++ b/contrib/subtac/eterm.mli @@ -6,8 +6,8 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: eterm.mli 9976 2007-07-12 11:58:30Z msozeau $ i*) - +(*i $Id: eterm.mli 10889 2008-05-06 14:05:20Z msozeau $ i*) +open Environ open Tacmach open Term open Evd @@ -18,10 +18,11 @@ val mkMetas : int -> constr list (* val eterm_term : evar_map -> constr -> types option -> constr * types option * (identifier * types) list *) -(* id, named context length, evars, number of - function prototypes to try to clear from evars contexts, object and optional type *) -val eterm_obligations : identifier -> int -> evar_defs -> evar_map -> int -> constr -> types option -> - (identifier * types * bool * Intset.t) array * constr - (* Obl. name, type as product, opacity (true = opaque) and dependencies as indexes into the array *) +(* env, id, evars, number of + function prototypes to try to clear from evars contexts, object and type *) +val eterm_obligations : env -> identifier -> evar_defs -> evar_map -> int -> constr -> types -> + (identifier * types * loc * bool * Intset.t) array * constr * types + (* Obl. name, type as product, location of the original evar, + opacity (true = opaque) and dependencies as indexes into the array *) val etermtac : open_constr -> tactic diff --git a/contrib/subtac/g_subtac.ml4 b/contrib/subtac/g_subtac.ml4 index 43a3bec4..88243b60 100644 --- a/contrib/subtac/g_subtac.ml4 +++ b/contrib/subtac/g_subtac.ml4 @@ -6,15 +6,18 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) +(*i camlp4deps: "parsing/grammar.cma" i*) +(*i camlp4use: "pa_extend.cmo" i*) + + (* Syntax for the subtac terms and types. Elaborated from correctness/psyntax.ml4 by Jean-Christophe Filliâtre *) -(* $Id: g_subtac.ml4 9976 2007-07-12 11:58:30Z msozeau $ *) +(* $Id: g_subtac.ml4 10919 2008-05-11 22:04:26Z msozeau $ *) -(*i camlp4deps: "parsing/grammar.cma" i*) -open Options +open Flags open Util open Names open Nameops @@ -41,17 +44,20 @@ struct let subtac_nameopt : identifier option Gram.Entry.e = gec "subtac_nameopt" end +open Rawterm open SubtacGram open Util open Pcoq - +open Prim +open Constr let sigref = mkRefC (Qualid (dummy_loc, Libnames.qualid_of_string "Coq.Init.Specif.sig")) GEXTEND Gram - GLOBAL: subtac_gallina_loc Constr.binder_let Constr.binder subtac_nameopt; + GLOBAL: subtac_gallina_loc typeclass_constraint Constr.binder subtac_nameopt; subtac_gallina_loc: - [ [ g = Vernac.gallina -> loc, g ] ] + [ [ g = Vernac.gallina -> loc, g + | g = Vernac.gallina_ext -> loc, g ] ] ; subtac_nameopt: @@ -60,31 +66,31 @@ GEXTEND Gram ; Constr.binder_let: - [ [ "("; id=Prim.name; ":"; t=Constr.lconstr; "|"; c=Constr.lconstr; ")" -> - let typ = mkAppC (sigref, [mkLambdaC ([id], t, c)]) in - LocalRawAssum ([id], typ) + [[ "("; id=Prim.name; ":"; t=Constr.lconstr; "|"; c=Constr.lconstr; ")" -> + let typ = mkAppC (sigref, [mkLambdaC ([id], default_binder_kind, t, c)]) in + [LocalRawAssum ([id], default_binder_kind, typ)] ] ]; Constr.binder: [ [ "("; id=Prim.name; ":"; c=Constr.lconstr; "|"; p=Constr.lconstr; ")" -> - ([id],mkAppC (sigref, [mkLambdaC ([id], c, p)])) + ([id],default_binder_kind, mkAppC (sigref, [mkLambdaC ([id], default_binder_kind, c, p)])) | "("; id=Prim.name; ":"; c=Constr.lconstr; ")" -> - ([id],c) + ([id],default_binder_kind, c) | "("; id=Prim.name; lid=LIST1 Prim.name; ":"; c=Constr.lconstr; ")" -> - (id::lid,c) + (id::lid,default_binder_kind, c) ] ]; END -type ('a,'b) gallina_loc_argtype = (Vernacexpr.vernac_expr located, 'a, 'b) Genarg.abstract_argument_type +type 'a gallina_loc_argtype = (Vernacexpr.vernac_expr located, 'a) Genarg.abstract_argument_type -let (wit_subtac_gallina_loc : (Genarg.tlevel, Proof_type.tactic) gallina_loc_argtype), - (globwit_subtac_gallina_loc : (Genarg.glevel, Tacexpr.glob_tactic_expr ) gallina_loc_argtype), - (rawwit_subtac_gallina_loc : (Genarg.rlevel, Tacexpr.raw_tactic_expr) gallina_loc_argtype) = +let (wit_subtac_gallina_loc : Genarg.tlevel gallina_loc_argtype), + (globwit_subtac_gallina_loc : Genarg.glevel gallina_loc_argtype), + (rawwit_subtac_gallina_loc : Genarg.rlevel gallina_loc_argtype) = Genarg.create_arg "subtac_gallina_loc" -type 'a nameopt_argtype = (identifier option, 'a, 'a) Genarg.abstract_argument_type +type 'a nameopt_argtype = (identifier option, 'a) Genarg.abstract_argument_type let (wit_subtac_nameopt : Genarg.tlevel nameopt_argtype), (globwit_subtac_nameopt : Genarg.glevel nameopt_argtype), @@ -133,10 +139,18 @@ VERNAC COMMAND EXTEND Subtac_Admit_Obligations END VERNAC COMMAND EXTEND Subtac_Set_Solver -| [ "Obligations" "Tactic" ":=" tactic(t) ] -> [ Subtac_obligations.set_default_tactic (Tacinterp.glob_tactic t) ] +| [ "Obligations" "Tactic" ":=" tactic(t) ] -> [ + Coqlib.check_required_library ["Coq";"Program";"Tactics"]; + Tacinterp.add_tacdef false + [(Qualid (dummy_loc, qualid_of_string "Coq.Program.Tactics.obligations_tactic"), true, t)] ] END VERNAC COMMAND EXTEND Subtac_Show_Obligations | [ "Obligations" "of" ident(name) ] -> [ Subtac_obligations.show_obligations (Some name) ] | [ "Obligations" ] -> [ Subtac_obligations.show_obligations None ] END + +VERNAC COMMAND EXTEND Subtac_Show_Preterm +| [ "Preterm" "of" ident(name) ] -> [ Subtac_obligations.show_term (Some name) ] +| [ "Preterm" ] -> [ Subtac_obligations.show_term None ] +END diff --git a/contrib/subtac/subtac.ml b/contrib/subtac/subtac.ml index 8bc310d5..a59ad6f5 100644 --- a/contrib/subtac/subtac.ml +++ b/contrib/subtac/subtac.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: subtac.ml 9976 2007-07-12 11:58:30Z msozeau $ *) +(* $Id: subtac.ml 11150 2008-06-19 11:38:27Z msozeau $ *) open Global open Pp @@ -49,24 +49,41 @@ open Decl_kinds open Tacinterp open Tacexpr +let solve_tccs_in_type env id isevars evm c typ = + if not (evm = Evd.empty) then + let stmt_id = Nameops.add_suffix id "_stmt" in + let obls, c', t' = eterm_obligations env stmt_id !isevars evm 0 c typ in + (** Make all obligations transparent so that real dependencies can be sorted out by the user *) + let obls = Array.map (fun (id, t, l, op, d) -> (id, t, l, false, d)) obls in + match Subtac_obligations.add_definition stmt_id c' typ obls with + Subtac_obligations.Defined cst -> constant_value (Global.env()) + (match cst with ConstRef kn -> kn | _ -> assert false) + | _ -> + errorlabstrm "start_proof" + (str "The statement obligations could not be resolved automatically, " ++ spc () ++ + str "write a statement definition first.") + else + let _ = Typeops.infer_type env c in c + + let start_proof_com env isevars sopt kind (bl,t) hook = let id = match sopt with - | Some id -> + | Some (loc,id) -> (* We check existence here: it's a bit late at Qed time *) if Nametab.exists_cci (Lib.make_path id) or is_section_variable id then - errorlabstrm "start_proof" (pr_id id ++ str " already exists"); + user_err_loc (loc,"start_proof",pr_id id ++ str " already exists"); id | None -> next_global_ident_away false (id_of_string "Unnamed_thm") (Pfedit.get_all_proof_names ()) in - let evm, c, typ = + let evm, c, typ, _imps = Subtac_pretyping.subtac_process env isevars id [] (Command.generalize_constr_expr t bl) None in - let _ = Typeops.infer_type env c in - Command.start_proof id kind c hook + let c = solve_tccs_in_type env id isevars evm c typ in + Command.start_proof id kind c hook -let print_subgoals () = Options.if_verbose (fun () -> msg (Printer.pr_open_subgoals ())) () +let print_subgoals () = Flags.if_verbose (fun () -> msg (Printer.pr_open_subgoals ())) () let start_proof_and_print env isevars idopt k t hook = start_proof_com env isevars idopt k t hook; @@ -75,122 +92,157 @@ let start_proof_and_print env isevars idopt k t hook = let _ = Detyping.set_detype_anonymous (fun loc n -> RVar (loc, id_of_string ("Anonymous_REL_" ^ string_of_int n))) let assumption_message id = - Options.if_verbose message ((string_of_id id) ^ " is assumed") + Flags.if_verbose message ((string_of_id id) ^ " is assumed") -let declare_assumption env isevars idl is_coe k bl c = - if not (Pfedit.refining ()) then - let evm, c, typ = - Subtac_pretyping.subtac_process env isevars (snd (List.hd idl)) [] (Command.generalize_constr_expr c bl) None +let declare_assumption env isevars idl is_coe k bl c nl = + if not (Pfedit.refining ()) then + let id = snd (List.hd idl) in + let evm, c, typ, imps = + Subtac_pretyping.subtac_process env isevars id [] (Command.generalize_constr_expr c bl) None in - List.iter (Command.declare_one_assumption is_coe k c) idl + let c = solve_tccs_in_type env id isevars evm c typ in + List.iter (Command.declare_one_assumption is_coe k c imps false false nl) idl else errorlabstrm "Command.Assumption" (str "Cannot declare an assumption while in proof editing mode.") -let vernac_assumption env isevars kind l = - List.iter (fun (is_coe,(idl,c)) -> declare_assumption env isevars idl is_coe kind [] c) l +let dump_definition (loc, id) s = + Flags.dump_string (Printf.sprintf "%s %d %s\n" s (fst (unloc loc)) (string_of_id id)) + +let dump_constraint ty ((loc, n), _, _) = + match n with + | Name id -> dump_definition (loc, id) ty + | Anonymous -> () +let dump_variable lid = () +let vernac_assumption env isevars kind l nl = + let global = fst kind = Global in + List.iter (fun (is_coe,(idl,c)) -> + if !Flags.dump then + List.iter (fun lid -> + if global then dump_definition lid "ax" + else dump_variable lid) idl; + declare_assumption env isevars idl is_coe kind [] c nl) l + +let check_fresh (loc,id) = + if Nametab.exists_cci (Lib.make_path id) or is_section_variable id then + user_err_loc (loc,"",pr_id id ++ str " already exists") + let subtac (loc, command) = check_required_library ["Coq";"Init";"Datatypes"]; check_required_library ["Coq";"Init";"Specif"]; -(* check_required_library ["Coq";"Logic";"JMeq"]; *) - require_library "Coq.subtac.FixSub"; - require_library "Coq.subtac.Utils"; - require_library "Coq.Logic.JMeq"; + check_required_library ["Coq";"Program";"Tactics"]; let env = Global.env () in let isevars = ref (create_evar_defs Evd.empty) in try match command with - VernacDefinition (defkind, (locid, id), expr, hook) -> - (match expr with - ProveBody (bl, c) -> Subtac_pretyping.subtac_proof env isevars id bl c None - | DefineBody (bl, _, c, tycon) -> - Subtac_pretyping.subtac_proof env isevars id bl c tycon) - | VernacFixpoint (l, b) -> - let _ = trace (str "Building fixpoint") in - ignore(Subtac_command.build_recursive l b) - - | VernacStartTheoremProof (thkind, (locid, id), (bl, t), lettop, hook) -> - if not(Pfedit.refining ()) then - if lettop then - errorlabstrm "Subtac_command.StartProof" - (str "Let declarations can only be used in proof editing mode"); + | VernacDefinition (defkind, (_, id as lid), expr, hook) -> + check_fresh lid; + dump_definition lid "def"; + (match expr with + | ProveBody (bl, t) -> if Lib.is_modtype () then errorlabstrm "Subtac_command.StartProof" (str "Proof editing mode not supported in module types"); - start_proof_and_print env isevars (Some id) (Global, Proof thkind) (bl,t) hook - - - | VernacAssumption (stre,l) -> - vernac_assumption env isevars stre l - - (*| VernacEndProof e -> - subtac_end_proof e*) - - | _ -> user_err_loc (loc,"", str ("Invalid Program command")) - with - | Typing_error e -> - msg_warning (str "Type error in Program tactic:"); - let cmds = - (match e with - | NonFunctionalApp (loc, x, mux, e) -> - str "non functional application of term " ++ - e ++ str " to function " ++ x ++ str " of (mu) type " ++ mux - | NonSigma (loc, t) -> - str "Term is not of Sigma type: " ++ t - | NonConvertible (loc, x, y) -> - str "Unconvertible terms:" ++ spc () ++ - x ++ spc () ++ str "and" ++ spc () ++ y - | IllSorted (loc, t) -> - str "Term is ill-sorted:" ++ spc () ++ t - ) - in msg_warning cmds - - | Subtyping_error e -> - msg_warning (str "(Program tactic) Subtyping error:"); - let cmds = - match e with - | UncoercibleInferType (loc, x, y) -> - str "Uncoercible terms:" ++ spc () - ++ x ++ spc () ++ str "and" ++ spc () ++ y - | UncoercibleInferTerm (loc, x, y, tx, ty) -> - str "Uncoercible terms:" ++ spc () - ++ tx ++ spc () ++ str "of" ++ spc () ++ str "type" ++ spc () ++ x - ++ str "and" ++ spc() ++ ty ++ spc () ++ str "of" ++ spc () ++ str "type" ++ spc () ++ y - | UncoercibleRewrite (x, y) -> - str "Uncoercible terms:" ++ spc () - ++ x ++ spc () ++ str "and" ++ spc () ++ y - in msg_warning cmds - - | Cases.PatternMatchingError (env, exn) as e -> - debug 2 (Himsg.explain_pattern_matching_error env exn); - raise e - - | Type_errors.TypeError (env, exn) as e -> - debug 2 (Himsg.explain_type_error env exn); - raise e - - | Pretype_errors.PretypeError (env, exn) as e -> - debug 2 (Himsg.explain_pretype_error env exn); - raise e + start_proof_and_print env isevars (Some lid) (Global, DefinitionBody Definition) (bl,t) + (fun _ _ -> ()) + | DefineBody (bl, _, c, tycon) -> + ignore(Subtac_pretyping.subtac_proof defkind env isevars id bl c tycon)) + | VernacFixpoint (l, b) -> + List.iter (fun ((lid, _, _, _, _), _) -> + check_fresh lid; + dump_definition lid "fix") l; + let _ = trace (str "Building fixpoint") in + ignore(Subtac_command.build_recursive l b) - | (Stdpp.Exc_located (loc, e')) as e -> - debug 2 (str "Parsing exception: "); - (match e' with - | Type_errors.TypeError (env, exn) -> - debug 2 (Himsg.explain_type_error env exn); - raise e - - | Pretype_errors.PretypeError (env, exn) -> - debug 2 (Himsg.explain_pretype_error env exn); - raise e - - | e'' -> msg_warning (str "Unexpected exception: " ++ Cerrors.explain_exn e''); - raise e) - - | e -> - msg_warning (str "Uncatched exception: " ++ Cerrors.explain_exn e); - raise e - - + | VernacStartTheoremProof (thkind, [Some id, (bl, t)], lettop, hook) -> + if !Flags.dump then dump_definition id "prf"; + if not(Pfedit.refining ()) then + if lettop then + errorlabstrm "Subtac_command.StartProof" + (str "Let declarations can only be used in proof editing mode"); + if Lib.is_modtype () then + errorlabstrm "Subtac_command.StartProof" + (str "Proof editing mode not supported in module types"); + check_fresh id; + start_proof_and_print env isevars (Some id) (Global, Proof thkind) (bl,t) hook + + | VernacAssumption (stre,nl,l) -> + vernac_assumption env isevars stre l nl + + | VernacInstance (glob, sup, is, props, pri) -> + if !Flags.dump then dump_constraint "inst" is; + ignore(Subtac_classes.new_instance ~global:glob sup is props pri) + + | VernacCoFixpoint (l, b) -> + List.iter (fun ((lid, _, _, _), _) -> dump_definition lid "cofix") l; + ignore(Subtac_command.build_corecursive l b) + + (*| VernacEndProof e -> + subtac_end_proof e*) + + | _ -> user_err_loc (loc,"", str ("Invalid Program command")) + with + | Typing_error e -> + msg_warning (str "Type error in Program tactic:"); + let cmds = + (match e with + | NonFunctionalApp (loc, x, mux, e) -> + str "non functional application of term " ++ + e ++ str " to function " ++ x ++ str " of (mu) type " ++ mux + | NonSigma (loc, t) -> + str "Term is not of Sigma type: " ++ t + | NonConvertible (loc, x, y) -> + str "Unconvertible terms:" ++ spc () ++ + x ++ spc () ++ str "and" ++ spc () ++ y + | IllSorted (loc, t) -> + str "Term is ill-sorted:" ++ spc () ++ t + ) + in msg_warning cmds + + | Subtyping_error e -> + msg_warning (str "(Program tactic) Subtyping error:"); + let cmds = + match e with + | UncoercibleInferType (loc, x, y) -> + str "Uncoercible terms:" ++ spc () + ++ x ++ spc () ++ str "and" ++ spc () ++ y + | UncoercibleInferTerm (loc, x, y, tx, ty) -> + str "Uncoercible terms:" ++ spc () + ++ tx ++ spc () ++ str "of" ++ spc () ++ str "type" ++ spc () ++ x + ++ str "and" ++ spc() ++ ty ++ spc () ++ str "of" ++ spc () ++ str "type" ++ spc () ++ y + | UncoercibleRewrite (x, y) -> + str "Uncoercible terms:" ++ spc () + ++ x ++ spc () ++ str "and" ++ spc () ++ y + in msg_warning cmds + + | Cases.PatternMatchingError (env, exn) as e -> + debug 2 (Himsg.explain_pattern_matching_error env exn); + raise e + + | Type_errors.TypeError (env, exn) as e -> + debug 2 (Himsg.explain_type_error env exn); + raise e + + | Pretype_errors.PretypeError (env, exn) as e -> + debug 2 (Himsg.explain_pretype_error env exn); + raise e + + | (Stdpp.Exc_located (loc, e')) as e -> + debug 2 (str "Parsing exception: "); + (match e' with + | Type_errors.TypeError (env, exn) -> + debug 2 (Himsg.explain_type_error env exn); + raise e + + | Pretype_errors.PretypeError (env, exn) -> + debug 2 (Himsg.explain_pretype_error env exn); + raise e + + | e'' -> msg_warning (str "Unexpected exception: " ++ Cerrors.explain_exn e''); + raise e) + + | e -> + msg_warning (str "Uncatched exception: " ++ Cerrors.explain_exn e); + raise e diff --git a/contrib/subtac/subtac_cases.ml b/contrib/subtac/subtac_cases.ml index 04cad7c0..c7182bd2 100644 --- a/contrib/subtac/subtac_cases.ml +++ b/contrib/subtac/subtac_cases.ml @@ -1,3 +1,4 @@ +(* -*- compile-command: "make -C ../.. bin/coqtop.byte" -*- *) (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* env -> rawconstr -> unsafe_judgment } (*--------------------------------------------------------------------------* @@ -386,7 +387,7 @@ let mkDeclTomatch na = function let map_tomatch_type f = function | IsInd (t,ind) -> IsInd (f t,map_inductive_type f ind) - | NotInd (c,t) -> NotInd (option_map f c, f t) + | NotInd (c,t) -> NotInd (Option.map f c, f t) let liftn_tomatch_type n depth = map_tomatch_type (liftn n depth) let lift_tomatch_type n = liftn_tomatch_type n 1 @@ -422,25 +423,6 @@ let remove_current_pattern eqn = let prepend_pattern tms eqn = {eqn with patterns = tms@eqn.patterns } -(**********************************************************************) -(* Dealing with regular and default patterns *) -let is_regular eqn = eqn.tag = RegularPat - -let lower_pattern_status = function - | RegularPat -> DefaultPat 0 - | DefaultPat n -> DefaultPat (n+1) - -let pattern_status pats = - if array_exists ((=) RegularPat) pats then RegularPat - else - let min = - Array.fold_right - (fun pat n -> match pat with - | DefaultPat i when i i - | _ -> n) - pats 0 in - DefaultPat min - (**********************************************************************) (* Well-formedness tests *) (* Partial check on patterns *) @@ -499,7 +481,7 @@ let extract_rhs pb = | [] -> errorlabstrm "build_leaf" (mssg_may_need_inversion()) | eqn::_ -> set_used_pattern eqn; - eqn.tag, eqn.rhs + eqn.rhs (**********************************************************************) (* Functions to deal with matrix factorization *) @@ -676,26 +658,6 @@ let all_name sign = List.map (fun (n, b, t) -> let n = match n with Name _ -> n let push_rels_eqn sign eqn = let sign = all_name sign in -(* trace (str "push_rels_eqn: " ++ my_print_rel_context eqn.rhs.rhs_env sign ++ str "end"); *) -(* str " branch is " ++ my_print_constr (fst eqn.rhs.c_orig) (snd eqn.rhs.c_orig)); *) -(* let rhs = eqn.rhs in *) -(* let l, c, s, e = *) -(* List.fold_right *) -(* (fun (na, c, t) (itlift, it, sign, env) -> *) -(* (try trace (str "Pushing decl: " ++ pr_rel_decl env (na, c, t) ++ *) -(* str " lift is " ++ int itlift); *) -(* with _ -> trace (str "error in push_rels_eqn")); *) -(* let env' = push_rel (na, c, t) env in *) -(* match sign with *) -(* [] -> (itlift, lift 1 it, sign, env') *) -(* | (na', c, t) :: sign' -> *) -(* if na' = na then *) -(* (pred itlift, it, sign', env') *) -(* else ( *) -(* trace (str "skipping it"); *) -(* (itlift, liftn 1 itlift it, sign, env'))) *) -(* sign (rhs.rhs_lift, rhs.c_it, eqn.rhs.rhs_sign, eqn.rhs.rhs_env) *) -(* in *) {eqn with rhs = {eqn.rhs with rhs_env = push_rels sign eqn.rhs.rhs_env; } } let push_rels_eqn_with_names sign eqn = @@ -1126,7 +1088,6 @@ let group_equations pb ind current cstrs mat = for i=1 to Array.length cstrs do let n = cstrs.(i-1).cs_nargs in let args = make_anonymous_patvars n in - let rest = {rest with tag = lower_pattern_status rest.tag } in brs.(i-1) <- (args, rest) :: brs.(i-1) done | PatCstr (loc,((_,i)),args,_) -> @@ -1148,22 +1109,22 @@ let rec generalize_problem pb = function let tomatch = regeneralize_index_tomatch (i+1) tomatch in { pb with tomatch = Abstract d :: tomatch; - pred = option_map (generalize_predicate i d) pb'.pred } + pred = Option.map (generalize_predicate i d) pb'.pred } (* No more patterns: typing the right-hand-side of equations *) let build_leaf pb = - let tag, rhs = extract_rhs pb in + let rhs = extract_rhs pb in let tycon = match pb.pred with | None -> anomaly "Predicate not found" | Some (PrCcl typ) -> mk_tycon typ | Some _ -> anomaly "not all parameters of pred have been consumed" in - tag, pb.typing_function tycon rhs.rhs_env rhs.it + pb.typing_function tycon rhs.rhs_env rhs.it (* Building the sub-problem when all patterns are variables *) let shift_problem (current,t) pb = {pb with tomatch = Alias (current,current,NonDepAlias,type_of_tomatch t)::pb.tomatch; - pred = option_map (specialize_predicate_var (current,t)) pb.pred; + pred = Option.map (specialize_predicate_var (current,t)) pb.pred; history = push_history_pattern 0 AliasLeaf pb.history; mat = List.map remove_current_pattern pb.mat } @@ -1228,7 +1189,7 @@ let build_branch current deps pb eqns const_info = let cur_alias = lift (List.length sign) current in let currents = Alias (ci,cur_alias,alias_type,ind) :: currents in let env' = push_rels sign pb.env in - let pred' = option_map (specialize_predicate (List.rev typs') dep_sign const_info) pb.pred in + let pred' = Option.map (specialize_predicate (List.rev typs') dep_sign const_info) pb.pred in sign, { pb with env = env'; @@ -1279,33 +1240,30 @@ and match_current pb tomatch = let brs = array_map2 (compile_branch current deps pb) eqns cstrs in (* We build the (elementary) case analysis *) - let tags = Array.map (fun (t,_,_) -> t) brs in - let brvals = Array.map (fun (_,v,_) -> v) brs in - let brtyps = Array.map (fun (_,_,t) -> t) brs in + let brvals = Array.map (fun (v,_) -> v) brs in + let brtyps = Array.map (fun (_,t) -> t) brs in let (pred,typ,s) = find_predicate pb.caseloc pb.env pb.isevars pb.pred brtyps cstrs current indt pb.tomatch in - let ci = make_case_info pb.env mind RegularStyle tags in + let ci = make_case_info pb.env mind pb.casestyle in let case = mkCase (ci,nf_betaiota pred,current,brvals) in let inst = List.map mkRel deps in - pattern_status tags, { uj_val = applist (case, inst); uj_type = substl inst typ } and compile_branch current deps pb eqn cstr = let sign, pb = build_branch current deps pb eqn cstr in - let tag, j = compile pb in - (tag, it_mkLambda_or_LetIn j.uj_val sign, j.uj_type) + let j = compile pb in + (it_mkLambda_or_LetIn j.uj_val sign, j.uj_type) and compile_generalization pb d rest = let pb = { pb with env = push_rel d pb.env; tomatch = rest; - pred = option_map ungeneralize_predicate pb.pred; + pred = Option.map ungeneralize_predicate pb.pred; mat = List.map (push_rels_eqn [d]) pb.mat } in - let patstat,j = compile pb in - patstat, + let j = compile pb in { uj_val = mkLambda_or_LetIn d j.uj_val; uj_type = mkProd_or_LetIn d j.uj_type } @@ -1328,11 +1286,10 @@ and compile_alias pb (deppat,nondeppat,d,t) rest = {pb with env = newenv; tomatch = tomatch; - pred = option_map (lift_predicate n) pb.pred; + pred = Option.map (lift_predicate n) pb.pred; history = history; mat = mat } in - let patstat,j = compile pb in - patstat, + let j = compile pb in List.fold_left mkSpecialLetInJudge j sign (* pour les alias des initiaux, enrichir les env de ce qu'il faut et @@ -1352,7 +1309,6 @@ let matx_of_eqns env eqns = it = rhs; } in { patterns = lpat; - tag = RegularPat; alias_stack = []; eqn_loc = loc; used = ref false; @@ -1421,9 +1377,9 @@ let set_arity_signature dep n arsign tomatchl pred x = let rec decomp_lam_force n avoid l p = if n = 0 then (List.rev l,p,avoid) else match p with - | RLambda (_,(Name id as na),_,c) -> + | RLambda (_,(Name id as na),k,_,c) -> decomp_lam_force (n-1) (id::avoid) (na::l) c - | RLambda (_,(Anonymous as na),_,c) -> decomp_lam_force (n-1) avoid (na::l) c + | RLambda (_,(Anonymous as na),k,_,c) -> decomp_lam_force (n-1) avoid (na::l) c | _ -> let x = next_ident_away (id_of_string "x") avoid in decomp_lam_force (n-1) (x::avoid) (Name x :: l) @@ -1513,7 +1469,7 @@ let extract_arity_signature env0 tomatchl tmsign = match tm with | NotInd (bo,typ) -> (match t with - | None -> [na,option_map (lift n) bo,lift n typ] + | None -> [na,Option.map (lift n) bo,lift n typ] | Some (loc,_,_,_) -> user_err_loc (loc,"", str "Unexpected type annotation for a term of non inductive type")) @@ -1612,7 +1568,8 @@ let eq_id avoid id = let mk_eq typ x y = mkApp (Lazy.force eq_ind, [| typ; x ; y |]) let mk_eq_refl typ x = mkApp (Lazy.force eq_refl, [| typ; x |]) -let mk_JMeq typ x typ' y = mkApp (Lazy.force Subtac_utils.jmeq_ind, [| typ; x ; typ'; y |]) +let mk_JMeq typ x typ' y = + mkApp (Lazy.force Subtac_utils.jmeq_ind, [| typ; x ; typ'; y |]) let mk_JMeq_refl typ x = mkApp (Lazy.force Subtac_utils.jmeq_refl, [| typ; x |]) let hole = RHole (dummy_loc, Evd.QuestionMark true) @@ -1626,18 +1583,14 @@ let context_of_arsign l = let constr_of_pat env isevars arsign pat avoid = let rec typ env (ty, realargs) pat avoid = - trace (str "Typing pattern " ++ Printer.pr_cases_pattern pat ++ str " in env " ++ - print_env env ++ str" should have type: " ++ my_print_constr env ty); match pat with | PatVar (l,name) -> - trace (str "Treating pattern variable " ++ str (string_of_id (id_of_name name))); let name, avoid = match name with Name n -> name, avoid | Anonymous -> let previd, id = prime avoid (Name (id_of_string "wildcard")) in Name id, id :: avoid in - trace (str "Treated pattern variable " ++ str (string_of_id (id_of_name name))); PatVar (l, name), [name, None, ty] @ realargs, mkRel 1, ty, (List.map (fun x -> mkRel 1) realargs), 1, avoid | PatCstr (l,((_, i) as cstr),args,alias) -> let cind = inductive_of_constructor cstr in @@ -1665,11 +1618,8 @@ let constr_of_pat env isevars arsign pat avoid = let cstr = mkConstruct ci.cs_cstr in let app = applistc cstr (List.map (lift (List.length sign)) params) in let app = applistc app args in - trace (str "Getting type of app: " ++ my_print_constr env app); let apptype = Retyping.get_type_of env (Evd.evars_of !isevars) app in - trace (str "Family and args of apptype: " ++ my_print_constr env apptype); let IndType (indf, realargs) = find_rectype env (Evd.evars_of !isevars) apptype in - trace (str "Got Family and args of apptype: " ++ my_print_constr env apptype); match alias with Anonymous -> pat', sign, app, apptype, realargs, n, avoid @@ -1680,8 +1630,6 @@ let constr_of_pat env isevars arsign pat avoid = try let env = push_rels sign env in isevars := the_conv_x_leq (push_rels sign env) (lift (succ m) ty) (lift 1 apptype) !isevars; - trace (str "convertible types for alias : " ++ my_print_constr env (lift (succ m) ty) - ++ my_print_constr env (lift 1 apptype)); let eq_t = mk_eq (lift (succ m) ty) (mkRel 1) (* alias *) (lift 1 app) (* aliased term *) @@ -1693,15 +1641,8 @@ let constr_of_pat env isevars arsign pat avoid = (* Mark the equality as a hole *) pat', sign, lift i app, lift i apptype, realargs, n + i, avoid in -(* let tycon, arity = mk_tycon_from_sign env isevars arsign arity in *) let pat', sign, patc, patty, args, z, avoid = typ env (pi3 (List.hd arsign), List.tl arsign) pat avoid in - let c = it_mkProd_or_LetIn patc sign in - trace (str "arity signature is : " ++ my_print_rel_context env arsign); - trace (str "signature is : " ++ my_print_rel_context env sign); - trace (str "patty, args are : " ++ my_print_constr env (applistc patty args)); - trace (str "Constr_of_pat gives: " ++ my_print_constr env c); - trace (str "with args: " ++ pp_list (my_print_constr (push_rels sign env)) args); - pat', (sign, patc, (pi3 (List.hd arsign), args), pat'), avoid + pat', (sign, patc, (pi3 (List.hd arsign), args), pat'), avoid (* shadows functional version *) @@ -1729,7 +1670,7 @@ let vars_of_ctx ctx = match na with Anonymous -> raise (Invalid_argument "vars_of_ctx") | Name n -> n, RVar (dummy_loc, n) :: vars) - ctx (id_of_string "vars_of_ctx: error", []) + ctx (id_of_string "vars_of_ctx_error", []) in List.rev y let rec is_included x y = @@ -1740,14 +1681,17 @@ let rec is_included x y = if i = i' then List.for_all2 is_included args args' else false -(* liftsign is the current pattern's signature length *) +(* liftsign is the current pattern's complete signature length. Hence pats is already typed in its + full signature. However prevpatterns are in the original one signature per pattern form. + *) let build_ineqs prevpatterns pats liftsign = let _tomatchs = List.length pats in let diffs = List.fold_left (fun c eqnpats -> - let acc = List.fold_left2 - (fun acc (ppat_sign, ppat_c, (ppat_ty, ppat_tyargs), ppat) + let acc = List.fold_left2 + (* ppat is the pattern we are discriminating against, curpat is the current one. *) + (fun acc (ppat_sign, ppat_c, (ppat_ty, ppat_tyargs), ppat) (curpat_sign, curpat_c, (curpat_ty, curpat_tyargs), curpat) -> match acc with None -> None @@ -1757,21 +1701,16 @@ let build_ineqs prevpatterns pats liftsign = let lens = List.length ppat_sign in (* Accumulated length of previous pattern's signatures *) let len' = lens + len in - trace (str "Lifting " ++ my_print_constr Environ.empty_env curpat_c ++ str " by " - ++ int len'); let acc = ((* Jump over previous prevpat signs *) lift_rel_context len ppat_sign @ sign, len', succ n, (* nth pattern *) mkApp (Lazy.force eq_ind, - [| lift (lens + liftsign) ppat_ty ; - liftn liftsign (succ lens) ppat_c ; + [| lift (len' + liftsign) curpat_ty; + liftn (len + liftsign) (succ lens) ppat_c ; lift len' curpat_c |]) :: - List.map - (fun t -> - liftn (List.length curpat_sign) (succ len') (* Jump over the curpat signature *) - (lift lens t (* Jump over this prevpat signature *))) c) + List.map (lift lens (* Jump over this prevpat signature *)) c) in Some acc else None) (Some ([], 0, 0, [])) eqnpats pats @@ -1790,20 +1729,19 @@ let subst_rel_context k ctx subst = let (_, ctx') = List.fold_right (fun (n, b, t) (k, acc) -> - (succ k, (n, option_map (substnl subst k) b, substnl subst k t) :: acc)) + (succ k, (n, Option.map (substnl subst k) b, substnl subst k t) :: acc)) ctx (k, []) in ctx' let lift_rel_contextn n k sign = let rec liftrec k = function | (na,c,t)::sign -> - (na,option_map (liftn n k) c,type_app (liftn n k) t) - ::(liftrec (k-1) sign) + (na,Option.map (liftn n k) c,liftn n k t)::(liftrec (k-1) sign) | [] -> [] in liftrec (rel_context_length sign + k) sign -let constrs_of_pats typing_fun tycon env isevars eqns tomatchs sign neqs eqs arity = +let constrs_of_pats typing_fun env isevars eqns tomatchs sign neqs arity = let i = ref 0 in let (x, y, z) = List.fold_left @@ -1815,71 +1753,53 @@ let constrs_of_pats typing_fun tycon env isevars eqns tomatchs sign neqs eqs ari (idents, pat' :: newpatterns, cpat :: pats)) ([], [], []) eqn.patterns sign in - let newpatterns = List.rev newpatterns and pats = List.rev pats in + let newpatterns = List.rev newpatterns and opats = List.rev pats in let rhs_rels, pats, signlen = List.fold_left (fun (renv, pats, n) (sign,c, (s, args), p) -> (* Recombine signatures and terms of all of the row's patterns *) -(* trace (str "treating pattern:" ++ my_print_constr Environ.empty_env c); *) let sign' = lift_rel_context n sign in let len = List.length sign' in (sign' @ renv, (* lift to get outside of previous pattern's signatures. *) (sign', liftn n (succ len) c, (s, List.map (liftn n (succ len)) args), p) :: pats, len + n)) - ([], [], 0) pats in + ([], [], 0) opats in let pats, _ = List.fold_left (* lift to get outside of past patterns to get terms in the combined environment. *) (fun (pats, n) (sign, c, (s, args), p) -> let len = List.length sign in ((rels_of_patsign sign, lift n c, (s, List.map (lift n) args), p) :: pats, len + n)) - ([], 0) pats + ([], 0) pats in + let ineqs = build_ineqs prevpatterns pats signlen in let rhs_rels' = rels_of_patsign rhs_rels in let _signenv = push_rel_context rhs_rels' env in -(* trace (str "Env with signature is: " ++ my_print_env _signenv); *) - let ineqs = build_ineqs prevpatterns pats signlen in - let eqs_rels = - let eqs = (*List.concat (List.rev eqs)*) context_of_arsign eqs in + let arity = let args, nargs = List.fold_right (fun (sign, c, (_, args), _) (allargs,n) -> -(* trace (str "treating arg:" ++ my_print_constr Environ.empty_env c); *) (args @ c :: allargs, List.length args + succ n)) pats ([], 0) in let args = List.rev args in -(* trace (str " equalities " ++ my_print_rel_context Environ.empty_env eqs); *) -(* trace (str " args " ++ pp_list (my_print_constr _signenv) args); *) - (* Make room for substitution of prime arguments by constr patterns *) - let eqs' = lift_rel_contextn signlen nargs eqs in - let eqs'' = subst_rel_context 0 eqs' args in -(* trace (str " new equalities " ++ my_print_rel_context Environ.empty_env eqs'); *) -(* trace (str " subtituted equalities " ++ my_print_rel_context _signenv eqs''); *) - eqs'' + substl args (liftn signlen (succ nargs) arity) in - let rhs_rels', lift_ineqs = - match ineqs with - None -> eqs_rels @ rhs_rels', 0 - | Some ineqs -> - (* let _ = trace (str"Generated inequalities: " ++ my_print_constr env ineqs) in *) - lift_rel_context 1 eqs_rels @ ((Anonymous, None, ineqs) :: rhs_rels'), 1 + let rhs_rels', tycon = + let neqs_rels, arity = + match ineqs with + | None -> [], arity + | Some ineqs -> + [Anonymous, None, ineqs], lift 1 arity + in + let eqs_rels, arity = decompose_prod_n_assum neqs arity in + eqs_rels @ neqs_rels @ rhs_rels', arity in let rhs_env = push_rels rhs_rels' env in -(* (try trace (str "branch env: " ++ print_env rhs_env) *) -(* with _ -> trace (str "error in print branch env")); *) - let tycon = lift_tycon (List.length eqs_rels + lift_ineqs + signlen) tycon in - - let j = typing_fun tycon rhs_env eqn.rhs.it in -(* (try trace (str "in env: " ++ my_print_env rhs_env ++ str"," ++ *) -(* str "Typed branch: " ++ Prettyp.print_judgment rhs_env j); *) -(* with _ -> *) -(* trace (str "Error in typed branch pretty printing")); *) + let j = typing_fun (mk_tycon tycon) rhs_env eqn.rhs.it in let bbody = it_mkLambda_or_LetIn j.uj_val rhs_rels' and btype = it_mkProd_or_LetIn j.uj_type rhs_rels' in let branch_name = id_of_string ("branch_" ^ (string_of_int !i)) in let branch_decl = (Name branch_name, Some (lift !i bbody), (lift !i btype)) in - (* (try trace (str "Branch decl: " ++ pr_rel_decl env (Name branch_name, Some bbody, btype)) *) - (* with _ -> trace (str "Error in branch decl pp")); *) let branch = let bref = RVar (dummy_loc, branch_name) in match vars_of_ctx rhs_rels with @@ -1890,22 +1810,13 @@ let constrs_of_pats typing_fun tycon env isevars eqns tomatchs sign neqs eqs ari Some _ -> RApp (dummy_loc, branch, [ hole ]) | None -> branch in - (* let branch = *) - (* List.fold_left (fun br (eqH, _, t) -> RLambda (dummy_loc, eqH, RHole (dummy_loc, Evd.InternalHole), br)) branch eqs_rels *) - (* in *) - (* (try trace (str "New branch: " ++ Printer.pr_rawconstr branch) *) - (* with _ -> trace (str "Error in new branch pp")); *) - incr i; - let rhs = { eqn.rhs with it = branch } in - (branch_decl :: branches, - { eqn with patterns = newpatterns; rhs = rhs } :: eqns, - pats :: prevpatterns)) + incr i; + let rhs = { eqn.rhs with it = branch } in + (branch_decl :: branches, + { eqn with patterns = newpatterns; rhs = rhs } :: eqns, + opats :: prevpatterns)) ([], [], []) eqns in x, y - - -(* liftn_rel_declaration *) - (* Builds the predicate. If the predicate is dependent, its context is * made of 1+nrealargs assumptions for each matched term in an inductive @@ -1920,11 +1831,6 @@ let constrs_of_pats typing_fun tycon env isevars eqns tomatchs sign neqs eqs ari let prepare_predicate_from_rettyp loc typing_fun isevars env tomatchs sign tycon rtntyp = (* We extract the signature of the arity *) let arsign = extract_arity_signature env tomatchs sign in -(* (try List.iter *) -(* (fun arsign -> *) -(* trace (str "arity signature: " ++ my_print_rel_context env arsign)) *) -(* arsign; *) -(* with _ -> trace (str "error in arity signature printing")); *) let env = List.fold_right push_rels arsign env in let allnames = List.rev (List.map (List.map pi1) arsign) in match rtntyp with @@ -1984,15 +1890,10 @@ let build_dependent_signature env evars avoid tomatchs arsign = (* Build the arity signature following the names in matched terms as much as possible *) let argsign = List.tl arsign in (* arguments in inverse application order *) let (appn, appb, appt) as _appsign = List.hd arsign in (* The matched argument *) -(* let _ = trace (str "Working on dependent arg: " ++ my_print_rel_context *) -(* (push_rel_context argsign env) [_appsign]) *) -(* in *) let argsign = List.rev argsign in (* arguments in application order *) let env', nargeqs, argeqs, refl_args, slift, argsign' = List.fold_left2 (fun (env, nargeqs, argeqs, refl_args, slift, argsign') arg (name, b, t) -> -(* trace (str "Matching indexes: " ++ my_print_constr env arg ++ *) -(* str " and " ++ my_print_rel_context env [(name,b,t)]); *) let argt = Retyping.get_type_of env evars arg in let eq, refl_arg = if Reductionops.is_conv env evars argt t then @@ -2001,7 +1902,7 @@ let build_dependent_signature env evars avoid tomatchs arsign = (lift (nargeqs + nar) arg), mk_eq_refl argt arg) else - (mk_JMeq (lift (nargeqs + slift) appt) + (mk_JMeq (lift (nargeqs + slift) t) (mkRel (nargeqs + slift)) (lift (nargeqs + nar) argt) (lift (nargeqs + nar) arg), @@ -2022,10 +1923,6 @@ let build_dependent_signature env evars avoid tomatchs arsign = (Name id, b, t) :: argsign')) (env, 0, [], [], slift, []) args argsign in -(* trace (str "neqs: " ++ int neqs ++ spc () ++ *) -(* str "nargeqs: " ++ int nargeqs ++spc () ++ *) -(* str "slift: " ++ int slift ++spc () ++ *) -(* str "nar: " ++ int nar); *) let eq = mk_JMeq (lift (nargeqs + slift) appt) (mkRel (nargeqs + slift)) @@ -2045,15 +1942,10 @@ let build_dependent_signature env evars avoid tomatchs arsign = let (name, b, typ) = match arsign with [x] -> x | _ -> assert(false) in let previd, id = make_prime avoid name in let arsign' = (Name id, b, typ) in -(* let _ = trace (str "Working on arg: " ++ my_print_rel_context *) -(* env [arsign']) *) -(* in *) let tomatch_ty = type_of_tomatch ty in let eq = mk_eq (lift nar tomatch_ty) (mkRel slift) (lift nar tm) -(* mk_eq (lift (neqs + nar) tomatch_ty) *) -(* (mkRel (neqs + slift)) (lift (neqs + nar) tm) *) in ([(Name (eq_id avoid previd), None, eq)] :: eqs, succ neqs, (mk_eq_refl tomatch_ty tm) :: refl_args, @@ -2062,28 +1954,7 @@ let build_dependent_signature env evars avoid tomatchs arsign = in let arsign'' = List.rev arsign' in assert(slift = 0); (* we must have folded over all elements of the arity signature *) -(* begin try *) -(* List.iter *) -(* (fun arsign -> *) -(* trace (str "old arity signature: " ++ my_print_rel_context env arsign)) *) -(* arsign; *) - List.iter - (fun c -> - trace (str "new arity signature: " ++ my_print_rel_context env c)) - (arsign''); -(* with _ -> trace (str "error in arity signature printing") *) -(* end; *) - let env' = push_rel_context (context_of_arsign arsign') env in - let _eqsenv = push_rel_context (context_of_arsign eqs) env' in - (try trace (str "Where env with eqs is: " ++ my_print_env _eqsenv); - trace (str "args: " ++ List.fold_left (fun acc x -> acc ++ my_print_constr env x) - (mt()) refls) - with _ -> trace (str "error in equalities signature printing")); - arsign'', allnames, nar, eqs, neqs, refls - -(* let len = List.length eqs in *) -(* it_mkProd_wo_LetIn (lift (nar + len) pred) eqs, pred, len *) - + arsign'', allnames, nar, eqs, neqs, refls (**************************************************************************) (* Main entry of the matching compilation *) @@ -2091,8 +1962,7 @@ let build_dependent_signature env evars avoid tomatchs arsign = let liftn_rel_context n k sign = let rec liftrec k = function | (na,c,t)::sign -> - (na,option_map (liftn n k) c,type_app (liftn n k) t) - ::(liftrec (k-1) sign) + (na,Option.map (liftn n k) c,liftn n k t)::(liftrec (k-1) sign) | [] -> [] in liftrec (k + rel_context_length sign) sign @@ -2101,73 +1971,109 @@ let nf_evars_env evar_defs (env : env) : env = let nf t = nf_isevar evar_defs t in let env0 : env = reset_context env in let f e (na, b, t) e' : env = - Environ.push_named (na, option_map nf b, nf t) e' + Environ.push_named (na, Option.map nf b, nf t) e' in let env' = Environ.fold_named_context f ~init:env0 env in - Environ.fold_rel_context (fun e (na, b, t) e' -> Environ.push_rel (na, option_map nf b, nf t) e') + Environ.fold_rel_context (fun e (na, b, t) e' -> Environ.push_rel (na, Option.map nf b, nf t) e') ~init:env' env -let compile_cases loc (typing_fun, isevars) (tycon : Evarutil.type_constraint) env (predopt, tomatchl, eqns) = +(* We put the tycon inside the arity signature, possibly discovering dependencies. *) + +let prepare_predicate_from_arsign_tycon loc env evm tomatchs arsign c = + let nar = List.fold_left (fun n sign -> List.length sign + n) 0 arsign in + let subst, len = + List.fold_left2 (fun (subst, len) (tm, tmtype) sign -> + let signlen = List.length sign in + match kind_of_term tm with + | Rel n when dependent tm c + && signlen = 1 (* The term to match is not of a dependent type itself *) -> + ((n, len) :: subst, len - signlen) + | Rel _ when not (dependent tm c) + && signlen > 1 (* The term is of a dependent type but does not appear in + the tycon, maybe some variable in its type does. *) -> + (match tmtype with + NotInd _ -> (* len - signlen, subst*) assert false (* signlen > 1 *) + | IsInd (_, IndType(indf,realargs)) -> + List.fold_left + (fun (subst, len) arg -> + match kind_of_term arg with + | Rel n when dependent arg c -> + ((n, len) :: subst, pred len) + | _ -> (subst, pred len)) + (subst, len) realargs) + | _ -> (subst, len - signlen)) + ([], nar) tomatchs arsign + in + let rec predicate lift c = + match kind_of_term c with + | Rel n when n > lift -> + (try + (* Make the predicate dependent on the matched variable *) + let idx = List.assoc (n - lift) subst in + mkRel (idx + lift) + with Not_found -> + (* A variable that is not matched, lift over the arsign. *) + mkRel (n + nar)) + | _ -> + map_constr_with_binders succ predicate lift c + in + try + (* The tycon may be ill-typed after abstraction. *) + let pred = predicate 0 c in + let env' = push_rel_context (context_of_arsign arsign) env in + ignore(Typing.sort_of env' evm pred); pred + with _ -> lift nar c + +let compile_cases loc style (typing_fun, isevars) (tycon : Evarutil.type_constraint) env (predopt, tomatchl, eqns) = + + let typing_fun tycon env = typing_fun tycon env isevars in + (* We build the matrix of patterns and right-hand-side *) let matx = matx_of_eqns env eqns in (* We build the vector of terms to match consistently with the *) (* constructors found in patterns *) let tomatchs = coerce_to_indtype typing_fun isevars env matx tomatchl in -(* isevars := nf_evar_defs !isevars; *) -(* let env = nf_evars_env !isevars (env : env) in *) -(* trace (str "Evars : " ++ my_print_evardefs !isevars); *) -(* trace (str "Env : " ++ my_print_env env); *) - - let tomatchs, tomatchs_lets = abstract_tomatch env tomatchs in - let tomatchs_len = List.length tomatchs_lets in - let tycon = lift_tycon tomatchs_len tycon in - let env = push_rel_context tomatchs_lets env in let _isdep = List.exists (fun (x, y) -> is_dependent_ind y) tomatchs in if predopt = None then + let tomatchs, tomatchs_lets = abstract_tomatch env tomatchs in + let tomatchs_len = List.length tomatchs_lets in + let env = push_rel_context tomatchs_lets env in let len = List.length eqns in let sign, allnames, signlen, eqs, neqs, args = (* The arity signature *) let arsign = extract_arity_signatures env tomatchs (List.map snd tomatchl) in (* Build the dependent arity signature, the equalities which makes the first part of the predicate and their instantiations. *) - trace (str "Arity signatures : " ++ my_print_rel_context env (context_of_arsign arsign)); let avoid = [] in build_dependent_signature env (Evd.evars_of !isevars) avoid tomatchs arsign in - let tycon_constr = + let tycon, arity = match valcon_of_tycon tycon with - | None -> mkExistential env isevars - | Some t -> t + | None -> let ev = mkExistential env isevars in ev, ev + | Some t -> + t, prepare_predicate_from_arsign_tycon loc env (Evd.evars_of !isevars) + tomatchs sign (lift tomatchs_len t) + in + let arity = + it_mkProd_or_LetIn (lift neqs arity) (context_of_arsign eqs) in let lets, matx = (* Type the rhs under the assumption of equations *) - constrs_of_pats typing_fun tycon env isevars matx tomatchs sign neqs - (eqs : rel_context list) (lift (signlen + neqs) tycon_constr) in - + constrs_of_pats typing_fun env isevars matx tomatchs sign neqs arity + in let matx = List.rev matx in let _ = assert(len = List.length lets) in let env = push_rels lets env in let matx = List.map (fun eqn -> { eqn with rhs = { eqn.rhs with rhs_env = env } }) matx in let tomatchs = List.map (fun (x, y) -> lift len x, lift_tomatch_type len y) tomatchs in let args = List.rev_map (lift len) args in - let sign = List.map (lift_rel_context len) sign in - let pred = it_mkProd_wo_LetIn (lift (signlen + neqs) tycon_constr) - (context_of_arsign eqs) in + let pred = liftn len (succ signlen) arity in + let pred = build_initial_predicate true allnames pred in - let pred = liftn len (succ signlen) pred in -(* it_mkProd_wo_LetIn (lift (len + signlen + neqs) tycon_constr) (liftn_rel_context len signlen eqs) in*) - (* We build the elimination predicate if any and check its consistency *) - (* with the type of arguments to match *) - let _signenv = List.fold_right push_rels sign env in -(* trace (str "Using predicate: " ++ my_print_constr signenv pred ++ str " in env: " ++ my_print_env signenv ++ str " len is " ++ int len); *) - - let pred = - (* prepare_predicate_from_tycon loc typing_fun isevars env tomatchs eqs allnames signlen sign tycon in *) - build_initial_predicate true allnames pred in - (* We push the initial terms to match and push their alias to rhs' envs *) - (* names of aliases will be recovered from patterns (hence Anonymous here) *) + (* We push the initial terms to match and push their alias to rhs' envs *) + (* names of aliases will be recovered from patterns (hence Anonymous here) *) let initial_pushed = List.map (fun tm -> Pushed (tm,[])) tomatchs in let pb = @@ -2178,17 +2084,17 @@ let compile_cases loc (typing_fun, isevars) (tycon : Evarutil.type_constraint) e history = start_history (List.length initial_pushed); mat = matx; caseloc = loc; + casestyle= style; typing_function = typing_fun } in - let _, j = compile pb in + let j = compile pb in (* We check for unused patterns *) List.iter (check_unused_pattern env) matx; let body = it_mkLambda_or_LetIn (applistc j.uj_val args) lets in let j = { uj_val = it_mkLambda_or_LetIn body tomatchs_lets; - uj_type = lift (-tomatchs_len) (nf_isevar !isevars tycon_constr); } + uj_type = nf_isevar !isevars tycon; } in j -(* inh_conv_coerce_to_tycon loc env isevars j tycon0 *) else (* We build the elimination predicate if any and check its consistency *) (* with the type of arguments to match *) @@ -2207,12 +2113,12 @@ let compile_cases loc (typing_fun, isevars) (tycon : Evarutil.type_constraint) e history = start_history (List.length initial_pushed); mat = matx; caseloc = loc; + casestyle= style; typing_function = typing_fun } in - let _, j = compile pb in + let j = compile pb in (* We check for unused patterns *) List.iter (check_unused_pattern env) matx; - let j = { j with uj_val = it_mkLambda_or_LetIn j.uj_val tomatchs_lets } in inh_conv_coerce_to_tycon loc env isevars j tycon end diff --git a/contrib/subtac/subtac_cases.mli b/contrib/subtac/subtac_cases.mli index 02fe016d..6b8a0981 100644 --- a/contrib/subtac/subtac_cases.mli +++ b/contrib/subtac/subtac_cases.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: cases.mli 8741 2006-04-26 22:30:32Z herbelin $ i*) +(*i $Id: subtac_cases.mli 10739 2008-04-01 14:45:20Z herbelin $ i*) (*i*) open Util diff --git a/contrib/subtac/subtac_classes.ml b/contrib/subtac/subtac_classes.ml new file mode 100644 index 00000000..15addb44 --- /dev/null +++ b/contrib/subtac/subtac_classes.ml @@ -0,0 +1,210 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* + let n = Name i in + let t' = interp_binder_evars isevars env n t in + let d = (i,None,t') in + (push_named d env, i :: ids, d::params)) + (env, avoid, []) l + +let interp_typeclass_context_evars isevars env avoid l = + List.fold_left + (fun (env, ids, params) (iid, bk, cl) -> + let t' = interp_binder_evars isevars env (snd iid) cl in + let i = match snd iid with + | Anonymous -> Nameops.next_name_away (Termops.named_hd env t' Anonymous) ids + | Name id -> id + in + let d = (i,None,t') in + (push_named d env, i :: ids, d::params)) + (env, avoid, []) l + +let interp_constrs_evars isevars env avoid l = + List.fold_left + (fun (env, ids, params) t -> + let t' = interp_binder_evars isevars env Anonymous t in + let id = Nameops.next_name_away (Termops.named_hd env t' Anonymous) ids in + let d = (id,None,t') in + (push_named d env, id :: ids, d::params)) + (env, avoid, []) l + +let interp_constr_evars_gen evdref env ?(impls=([],[])) kind c = + SPretyping.understand_tcc_evars evdref env kind + (intern_gen (kind=IsType) ~impls (Evd.evars_of !evdref) env c) + +let interp_casted_constr_evars evdref env ?(impls=([],[])) c typ = + interp_constr_evars_gen evdref env ~impls (OfType (Some typ)) c + +let type_ctx_instance isevars env ctx inst subst = + List.fold_left2 + (fun (subst, instctx) (na, _, t) ce -> + let t' = replace_vars subst t in + let c = interp_casted_constr_evars isevars env ce t' in + let d = na, Some c, t' in + (na, c) :: subst, d :: instctx) + (subst, []) (List.rev ctx) inst + +(*let superclass_ce = CRef (Ident (dummy_loc, id_of_string ".superclass"))*) + +let type_class_instance_params isevars env id n ctx inst subst = + List.fold_left2 + (fun (subst, instctx) (na, _, t) ce -> + let t' = replace_vars subst t in + let c = +(* if ce = superclass_ce then *) + (* (\* Control over the evars which are direct superclasses to avoid partial instanciations *) + (* in instance search. *\) *) + (* Evarutil.e_new_evar isevars env ~src:(dummy_loc, ImplicitArg (VarRef id, (n, Some na))) t' *) + (* else *) + interp_casted_constr_evars isevars env ce t' + in + let d = na, Some c, t' in + (na, c) :: subst, d :: instctx) + (subst, []) (List.rev ctx) inst + +let substitution_of_constrs ctx cstrs = + List.fold_right2 (fun c (na, _, _) acc -> (na, c) :: acc) cstrs ctx [] + +let new_instance ?(global=false) ctx (instid, bk, cl) props ?(on_free_vars=Classes.default_on_free_vars) pri = + let env = Global.env() in + let isevars = ref (Evd.create_evar_defs Evd.empty) in + let bound = Implicit_quantifiers.ids_of_list (Termops.ids_of_context env) in + let bound, fvs = Implicit_quantifiers.free_vars_of_binders ~bound [] ctx in + let tclass = + match bk with + | Implicit -> + let loc, id, par = Implicit_quantifiers.destClassAppExpl cl in + let k = class_info (Nametab.global id) in + let applen = List.fold_left (fun acc (x, y) -> if y = None then succ acc else acc) 0 par in + let needlen = List.fold_left (fun acc (x, y) -> if x = None then succ acc else acc) 0 k.cl_context in + if needlen <> applen then + Classes.mismatched_params env (List.map fst par) (List.map snd k.cl_context); + let pars, _ = Implicit_quantifiers.combine_params Idset.empty (* need no avoid *) + (fun avoid (clname, (id, _, t)) -> + match clname with + Some (cl, b) -> + let t = + if b then + let _k = class_info cl in + CHole (Util.dummy_loc, Some Evd.InternalHole) (* (Evd.ImplicitArg (IndRef k.cl_impl, (1, None)))) *) + else CHole (Util.dummy_loc, None) + in t, avoid + | None -> failwith ("new instance: under-applied typeclass")) + par (List.rev k.cl_context) + in Topconstr.CAppExpl (loc, (None, id), pars) + + | Explicit -> cl + in + let ctx_bound = Idset.union bound (Implicit_quantifiers.ids_of_list fvs) in + let gen_ids = Implicit_quantifiers.free_vars_of_constr_expr ~bound:ctx_bound tclass [] in + let bound = Idset.union (Implicit_quantifiers.ids_of_list gen_ids) ctx_bound in + on_free_vars (List.rev (gen_ids @ fvs)); + let gen_ctx = Implicit_quantifiers.binder_list_of_ids gen_ids in + let ctx, avoid = Classes.name_typeclass_binders bound ctx in + let ctx = List.append ctx (List.rev gen_ctx) in + let k, ctx', imps, subst = + let c = Command.generalize_constr_expr tclass ctx in + let c', imps = interp_type_evars_impls ~evdref:isevars env c in + let ctx, c = Classes.decompose_named_assum c' in + let cl, args = Typeclasses.dest_class_app c in + cl, ctx, imps, substitution_of_constrs (List.map snd cl.cl_context) (List.rev (Array.to_list args)) + in + let id = + match snd instid with + Name id -> + let sp = Lib.make_path id in + if Nametab.exists_cci sp then + errorlabstrm "new_instance" (Nameops.pr_id id ++ Pp.str " already exists"); + id + | Anonymous -> + let i = Nameops.add_suffix (Classes.id_of_class k) "_instance_0" in + Termops.next_global_ident_away false i (Termops.ids_of_context env) + in + let env' = Classes.push_named_context ctx' env in + isevars := Evarutil.nf_evar_defs !isevars; + isevars := resolve_typeclasses ~onlyargs:false ~fail:true env' !isevars; + let sigma = Evd.evars_of !isevars in + let substctx = Typeclasses.nf_substitution sigma subst in + let subst, _propsctx = + let props = + List.map (fun (x, l, d) -> + x, Topconstr.abstract_constr_expr d (Classes.binders_of_lidents l)) + props + in + if List.length props > List.length k.cl_props then + Classes.mismatched_props env' (List.map snd props) k.cl_props; + let props, rest = + List.fold_left + (fun (props, rest) (id,_,_) -> + try + let ((loc, mid), c) = List.find (fun ((_,id'), c) -> id' = id) rest in + let rest' = List.filter (fun ((_,id'), c) -> id' <> id) rest in + Constrintern.add_glob loc (ConstRef (List.assoc mid k.cl_projs)); + c :: props, rest' + with Not_found -> (CHole (Util.dummy_loc, None) :: props), rest) + ([], props) k.cl_props + in + if rest <> [] then + unbound_method env' k.cl_impl (fst (List.hd rest)) + else + type_ctx_instance isevars env' k.cl_props props substctx + in + let inst_constr, ty_constr = instance_constructor k (List.rev_map snd subst) in + isevars := Evarutil.nf_evar_defs !isevars; + let term = Evarutil.nf_isevar !isevars (it_mkNamedLambda_or_LetIn inst_constr ctx') + and termtype = Evarutil.nf_isevar !isevars (it_mkNamedProd_or_LetIn ty_constr ctx') + in + isevars := undefined_evars !isevars; + Evarutil.check_evars env Evd.empty !isevars termtype; +(* let imps = *) +(* Util.list_map_i *) +(* (fun i binder -> *) +(* match binder with *) +(* ExplByPos (i, Some na), (true, true)) *) +(* 1 ctx *) +(* in *) + let hook gr = + let cst = match gr with ConstRef kn -> kn | _ -> assert false in + let inst = Typeclasses.new_instance k pri global cst in + Impargs.declare_manual_implicits false gr false imps; + Typeclasses.add_instance inst + in + let evm = Subtac_utils.evars_of_term (Evd.evars_of !isevars) Evd.empty term in + let obls, constr, typ = Eterm.eterm_obligations env id !isevars evm 0 term termtype in + ignore(Subtac_obligations.add_definition id constr typ ~kind:(Global,false,Instance) ~hook obls); + id diff --git a/contrib/subtac/subtac_classes.mli b/contrib/subtac/subtac_classes.mli new file mode 100644 index 00000000..43f00107 --- /dev/null +++ b/contrib/subtac/subtac_classes.mli @@ -0,0 +1,42 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* + Environ.env -> + (Names.identifier * 'a * Term.constr) list -> + Topconstr.constr_expr list -> + (Names.identifier * Term.constr) list -> + (Names.identifier * Term.constr) list * + (Names.identifier * Term.constr option * Term.constr) list + +val new_instance : + ?global:bool -> + Topconstr.local_binder list -> + typeclass_constraint -> + binder_def_list -> + ?on_free_vars:(identifier list -> unit) -> + int option -> + identifier diff --git a/contrib/subtac/subtac_coercion.ml b/contrib/subtac/subtac_coercion.ml index c764443f..b45e23d0 100644 --- a/contrib/subtac/subtac_coercion.ml +++ b/contrib/subtac/subtac_coercion.ml @@ -1,3 +1,4 @@ +(* -*- compile-command: "make -C ../.. bin/coqtop.byte" -*- *) (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* coerce' env x y and coerce' env x y : (Term.constr -> Term.constr) option = let subco () = subset_coerce env isevars x y in - let rec coerce_application typ c c' l l' = + let rec coerce_application typ typ' c c' l l' = let len = Array.length l in - let rec aux tele typ i co = + let rec aux tele typ typ' i co = +(* (try trace (str "coerce_application.aux from " ++ (my_print_constr env x) ++ *) +(* str " to "++ my_print_constr env y *) +(* ++ str "in env:" ++ my_print_env env); *) +(* with _ -> ()); *) if i < len then let hdx = l.(i) and hdy = l'.(i) in try isevars := the_conv_x_leq env hdx hdy !isevars; let (n, eqT, restT) = destProd typ in - aux (hdx :: tele) (subst1 hdy restT) (succ i) co + let (n', eqT', restT') = destProd typ' in + aux (hdx :: tele) (subst1 hdx restT) (subst1 hdy restT') (succ i) co with Reduction.NotConvertible -> let (n, eqT, restT) = destProd typ in + let (n', eqT', restT') = destProd typ' in + let _ = + try isevars := the_conv_x_leq env eqT eqT' !isevars + with Reduction.NotConvertible -> raise NoSubtacCoercion + in + (* Disallow equalities on arities *) + if Reduction.is_arity env eqT then raise NoSubtacCoercion; let restargs = lift_args 1 (List.rev (Array.to_list (Array.sub l (succ i) (len - (succ i))))) in let args = List.rev (restargs @ mkRel 1 :: lift_args 1 tele) in let pred = mkLambda (n, eqT, applistc (lift 1 c) args) in let eq = mkApp (Lazy.force eq_ind, [| eqT; hdx; hdy |]) in -(* let jmeq = mkApp (Lazy.force jmeq_ind, [| eqT; hdx; eqT; hdy |]) in *) - let evar = make_existential dummy_loc env isevars eq in + let evar = make_existential loc env isevars eq in let eq_app x = mkApp (Lazy.force eq_rect, [| eqT; hdx; pred; x; hdy; evar|]) in - trace (str"Inserting coercion at application"); - aux (hdy :: tele) (subst1 hdy restT) (succ i) (fun x -> eq_app (co x)) - else co - in aux [] typ 0 (fun x -> x) + aux (hdy :: tele) (subst1 hdx restT) (subst1 hdy restT') (succ i) (fun x -> eq_app (co x)) + else Some co + in aux [] typ typ' 0 (fun x -> x) in -(* (try debug 1 (str "coerce' from " ++ (my_print_constr env x) ++ *) -(* str " to "++ my_print_constr env y); *) -(* with _ -> ()); *) +(* (try trace (str "coerce' from " ++ (my_print_constr env x) ++ *) +(* str " to "++ my_print_constr env y *) +(* ++ str "in env:" ++ my_print_env env); *) +(* with _ -> ()); *) match (kind_of_term x, kind_of_term y) with | Sort s, Sort s' -> (match s, s' with @@ -167,24 +179,35 @@ module Coercion = struct | Prod (name, a, b), Prod (name', a', b') -> let name' = Name (Nameops.next_ident_away (id_of_string "x") (Termops.ids_of_context env)) in let env' = push_rel (name', None, a') env in + +(* let c1 = coerce_unify env' (lift 1 a') (lift 1 a) in *) +(* let name'' = Name (Nameops.next_ident_away (id_of_string "x'") (Termops.ids_of_context env)) in *) +(* let env'' = push_rel (name'', Some (app_opt c1 (mkRel 1)), lift 1 a) env' in *) +(* let c2 = coerce_unify env'' (liftn 1 1 b) (lift 1 b') in *) +(* mkLetIn (name'', app_opt c1 (mkRel 1), (lift 1 a), *) + let c1 = coerce_unify env' (lift 1 a') (lift 1 a) in - let c2 = coerce_unify env' b b' in + (* env, x : a' |- c1 : lift 1 a' > lift 1 a *) + let coec1 = app_opt c1 (mkRel 1) in + (* env, x : a' |- c1[x] : lift 1 a *) + let c2 = coerce_unify env' (subst1 coec1 (liftn 1 2 b)) b' in + (* env, x : a' |- c2 : b[c1[x]/x]] > b' *) (match c1, c2 with None, None -> failwith "subtac.coerce': Should have detected equivalence earlier" | _, _ -> Some (fun f -> - mkLambda (name', a', - app_opt c2 - (mkApp (Term.lift 1 f, - [| app_opt c1 (mkRel 1) |]))))) + mkLambda (name', a', + app_opt c2 + (mkApp (Term.lift 1 f, [| coec1 |]))))) | App (c, l), App (c', l') -> (match kind_of_term c, kind_of_term c' with - Ind i, Ind i' -> (* Sigma types *) + Ind i, Ind i' -> (* Inductive types *) let len = Array.length l in let existS = Lazy.force existS in let prod = Lazy.force prod in + (* Sigma types *) if len = Array.length l' && len = 2 && i = i' && (i = Term.destInd existS.typ || i = Term.destInd prod.typ) then @@ -248,21 +271,22 @@ module Coercion = struct else if i = i' && len = Array.length l' then let evm = evars_of !isevars in - let typ = Typing.type_of env evm c in (try subco () - with NoSubtacCoercion -> - -(* if not (is_arity env evm typ) then *) - Some (coerce_application typ c c' l l')) -(* else subco () *) + with NoSubtacCoercion -> + let typ = Typing.type_of env evm c in + let typ' = Typing.type_of env evm c' in + (* if not (is_arity env evm typ) then *) + coerce_application typ typ' c c' l l') + (* else subco () *) else subco () | x, y when x = y -> if Array.length l = Array.length l' then let evm = evars_of !isevars in let lam_type = Typing.type_of env evm c in + let lam_type' = Typing.type_of env evm c' in (* if not (is_arity env evm lam_type) then ( *) - Some (coerce_application lam_type c c' l l') + coerce_application lam_type lam_type' c c' l l' (* ) else subco () *) else subco () | _ -> subco ()) @@ -284,7 +308,7 @@ module Coercion = struct Some (fun x -> let cx = app_opt c x in - let evar = make_existential dummy_loc env isevars (mkApp (p, [| cx |])) + let evar = make_existential loc env isevars (mkApp (p, [| cx |])) in (mkApp ((Lazy.force sig_).intro, @@ -298,7 +322,7 @@ module Coercion = struct let coerce_itf loc env isevars v t c1 = let evars = ref isevars in let coercion = coerce loc env evars t c1 in - !evars, option_map (app_opt coercion) v, t + !evars, Option.map (app_opt coercion) v (* Taken from pretyping/coercion.ml *) @@ -360,7 +384,7 @@ module Coercion = struct match kind_of_term t with | Prod (_,_,_) -> (isevars,j) | Evar ev when not (is_defined_evar isevars ev) -> - let (isevars',t) = define_evar_as_arrow isevars ev in + let (isevars',t) = define_evar_as_product isevars ev in (isevars',{ uj_val = j.uj_val; uj_type = t }) | _ -> (try @@ -400,11 +424,15 @@ module Coercion = struct uj_type = typ' } - let inh_coerce_to_fail env isevars c1 v t = + let inh_coerce_to_fail env evd rigidonly v t c1 = + if rigidonly & not (Heads.is_rigid env c1 && Heads.is_rigid env t) + then + raise NoCoercion + else let v', t' = try - let t1,i1 = class_of1 env (evars_of isevars) c1 in - let t2,i2 = class_of1 env (evars_of isevars) t in + let t1,i1 = class_of1 env (evars_of evd) c1 in + let t2,i2 = class_of1 env (evars_of evd) t in let p = lookup_path_between (i2,i1) in match v with Some v -> @@ -413,132 +441,88 @@ module Coercion = struct | None -> None, t with Not_found -> raise NoCoercion in - try (the_conv_x_leq env t' c1 isevars, v', t') + try (the_conv_x_leq env t' c1 evd, v') with Reduction.NotConvertible -> raise NoCoercion - let rec inh_conv_coerce_to_fail loc env isevars v t c1 = -(* (try *) -(* debug 1 (str "inh_conv_coerce_to_fail called for " ++ *) -(* Termops.print_constr_env env t ++ str " and "++ spc () ++ *) -(* Termops.print_constr_env env c1 ++ str " with evars: " ++ spc () ++ *) -(* Subtac_utils.pr_evar_defs isevars ++ str " in env: " ++ spc () ++ *) -(* Termops.print_env env); *) -(* with _ -> ()); *) - try (the_conv_x_leq env t c1 isevars, v, t) + + let rec inh_conv_coerce_to_fail loc env evd rigidonly v t c1 = + try (the_conv_x_leq env t c1 evd, v) with Reduction.NotConvertible -> - (try - inh_coerce_to_fail env isevars c1 v t - with NoCoercion -> - (match kind_of_term (whd_betadeltaiota env (evars_of isevars) t), - kind_of_term (whd_betadeltaiota env (evars_of isevars) c1) with - | Prod (_,t1,t2), Prod (name,u1,u2) -> - let v' = option_map (whd_betadeltaiota env (evars_of isevars)) v in - let (evd',b) = - match v' with - Some v' -> - (match kind_of_term v' with - | Lambda (x,v1,v2) -> - (try the_conv_x env v1 u1 isevars, Some (x, v1, v2) (* leq v1 u1? *) - with Reduction.NotConvertible -> (isevars, None)) - | _ -> (isevars, None)) - | None -> (isevars, None) - in - (match b with - Some (x, v1, v2) -> - let env1 = push_rel (x,None,v1) env in - let (evd'', v2', t2') = inh_conv_coerce_to_fail loc env1 evd' - (Some v2) t2 u2 in - (evd'', option_map (fun v2' -> mkLambda (x, v1, v2')) v2', - mkProd (x, v1, t2')) - | None -> - (* Mismatch on t1 and u1 or not a lambda: we eta-expand *) - (* we look for a coercion c:u1->t1 s.t. [name:u1](v' (c x)) *) - (* has type (name:u1)u2 (with v' recursively obtained) *) - let name = (match name with - | Anonymous -> Name (id_of_string "x") - | _ -> name) in - let env1 = push_rel (name,None,u1) env in - let (evd', v1', t1') = - inh_conv_coerce_to_fail loc env1 isevars - (Some (mkRel 1)) (lift 1 u1) (lift 1 t1) - in - let (evd'', v2', t2') = - let v2 = - match v with - Some v -> option_map (fun v1' -> mkApp (lift 1 v, [|v1'|])) v1' - | None -> None - and evd', t2 = - match v1' with - Some v1' -> evd', subst1 v1' t2 - | None -> - let evd', ev = new_evar evd' env ~src:(loc, InternalHole) t1' in - evd', subst1 ev t2 - in - inh_conv_coerce_to_fail loc env1 evd' v2 t2 u2 - in - (evd'', option_map (fun v2' -> mkLambda (name, u1, v2')) v2', - mkProd (name, u1, t2'))) - | _ -> raise NoCoercion)) + try inh_coerce_to_fail env evd rigidonly v t c1 + with NoCoercion -> + match + kind_of_term (whd_betadeltaiota env (evars_of evd) t), + kind_of_term (whd_betadeltaiota env (evars_of evd) c1) + with + | Prod (name,t1,t2), Prod (_,u1,u2) -> + (* Conversion did not work, we may succeed with a coercion. *) + (* We eta-expand (hence possibly modifying the original term!) *) + (* and look for a coercion c:u1->t1 s.t. fun x:u1 => v' (c x)) *) + (* has type forall (x:u1), u2 (with v' recursively obtained) *) + let name = match name with + | Anonymous -> Name (id_of_string "x") + | _ -> name in + let env1 = push_rel (name,None,u1) env in + let (evd', v1) = + inh_conv_coerce_to_fail loc env1 evd rigidonly + (Some (mkRel 1)) (lift 1 u1) (lift 1 t1) in + let v1 = Option.get v1 in + let v2 = Option.map (fun v -> beta_applist (lift 1 v,[v1])) v in + let t2 = Termops.subst_term v1 t2 in + let (evd'',v2') = inh_conv_coerce_to_fail loc env1 evd' rigidonly v2 t2 u2 in + (evd'', Option.map (fun v2' -> mkLambda (name, u1, v2')) v2') + | _ -> raise NoCoercion - (* Look for cj' obtained from cj by inserting coercions, s.t. cj'.typ = t *) - let inh_conv_coerce_to loc env isevars cj ((n, t) as _tycon) = -(* (try *) -(* trace (str "Subtac_coercion.inh_conv_coerce_to called for " ++ *) -(* Termops.print_constr_env env cj.uj_type ++ str " and "++ spc () ++ *) -(* Evarutil.pr_tycon_type env tycon ++ str " with evars: " ++ spc () ++ *) -(* Subtac_utils.pr_evar_defs isevars ++ str " in env: " ++ spc () ++ *) -(* Termops.print_env env); *) -(* with _ -> ()); *) + let inh_conv_coerce_to_gen rigidonly loc env evd cj ((n, t) as _tycon) = + let evd = nf_evar_defs evd in match n with None -> - let (evd', val', type') = + let (evd', val') = try - inh_conv_coerce_to_fail loc env isevars (Some cj.uj_val) cj.uj_type t + inh_conv_coerce_to_fail loc env evd rigidonly + (Some (nf_isevar evd cj.uj_val)) + (nf_isevar evd cj.uj_type) (nf_isevar evd t) with NoCoercion -> - let sigma = evars_of isevars in + let sigma = evars_of evd in try - coerce_itf loc env isevars (Some cj.uj_val) cj.uj_type t + coerce_itf loc env evd (Some cj.uj_val) cj.uj_type t with NoSubtacCoercion -> error_actual_type_loc loc env sigma cj t in let val' = match val' with Some v -> v | None -> assert(false) in (evd',{ uj_val = val'; uj_type = t }) | Some (init, cur) -> - (isevars, cj) + (evd, cj) + + let inh_conv_coerce_to = inh_conv_coerce_to_gen false + let inh_conv_coerce_rigid_to = inh_conv_coerce_to_gen true let inh_conv_coerces_to loc env isevars t ((abs, t') as _tycon) = -(* (try *) -(* trace (str "Subtac_coercion.inh_conv_coerces_to called for " ++ *) -(* Termops.print_constr_env env t ++ str " and "++ spc () ++ *) -(* Evarutil.pr_tycon_type env tycon ++ str " with evars: " ++ spc () ++ *) -(* Evd.pr_evar_defs isevars ++ str " in env: " ++ spc () ++ *) -(* Termops.print_env env); *) -(* with _ -> ()); *) - let nabsinit, nabs = + let nabsinit, nabs = match abs with None -> 0, 0 | Some (init, cur) -> init, cur in - (* a little more effort to get products is needed *) + (* a little more effort to get products is needed *) try let rels, rng = decompose_prod_n nabs t in (* The final range free variables must have been replaced by evars, we accept only that evars in rng are applied to free vars. *) if noccur_with_meta 0 (succ nabsinit) rng then ( (* trace (str "No occur between 0 and " ++ int (succ nabsinit)); *) - let env', t, t' = + let env', t, t' = let env' = List.fold_right (fun (n, t) env -> push_rel (n, None, t) env) rels env in env', rng, lift nabs t' in - try - pi1 (try inh_conv_coerce_to_fail loc env' isevars None t t' + try + fst (try inh_conv_coerce_to_fail loc env' isevars false None t t' with NoCoercion -> - coerce_itf loc env' isevars None t t') + coerce_itf loc env' isevars None t t') with NoSubtacCoercion -> let sigma = evars_of isevars in error_cannot_coerce env' sigma (t, t')) - else isevars + else isevars with _ -> isevars - (* trace (str "decompose_prod_n failed"); *) - (* raise (Invalid_argument "Subtac_coercion.inh_conv_coerces_to") *) +(* trace (str "decompose_prod_n failed"); *) +(* raise (Invalid_argument "Subtac_coercion.inh_conv_coerces_to") *) end diff --git a/contrib/subtac/subtac_command.ml b/contrib/subtac/subtac_command.ml index 86139039..5bff6ad1 100644 --- a/contrib/subtac/subtac_command.ml +++ b/contrib/subtac/subtac_command.ml @@ -39,6 +39,8 @@ open Tacticals open Tacinterp open Vernacexpr open Notation +open Evd +open Evarutil module SPretyping = Subtac_pretyping.Pretyping open Subtac_utils @@ -53,22 +55,24 @@ let evar_nf isevars c = Evarutil.nf_isevar !isevars c let interp_gen kind isevars env - ?(impls=([],[])) ?(allow_soapp=false) ?(ltacvars=([],[])) + ?(impls=([],[])) ?(allow_patvar=false) ?(ltacvars=([],[])) c = - let c' = Constrintern.intern_gen (kind=IsType) ~impls ~allow_soapp ~ltacvars (Evd.evars_of !isevars) env c in -(* (try trace (str "Pretyping " ++ my_print_constr_expr c) with _ -> ()); *) + let c' = Constrintern.intern_gen (kind=IsType) ~impls ~allow_patvar ~ltacvars (Evd.evars_of !isevars) env c in let c' = SPretyping.pretype_gen isevars env ([],[]) kind c' in evar_nf isevars c' - + let interp_constr isevars env c = interp_gen (OfType None) isevars env c -let interp_type isevars env ?(impls=([],[])) c = +let interp_type_evars isevars env ?(impls=([],[])) c = interp_gen IsType isevars env ~impls c let interp_casted_constr isevars env ?(impls=([],[])) c typ = interp_gen (OfType (Some typ)) isevars env ~impls c +let interp_casted_constr_evars isevars env ?(impls=([],[])) c typ = + interp_gen (OfType (Some typ)) isevars env ~impls c + let interp_open_constr isevars env c = msgnl (str "Pretyping " ++ my_print_constr_expr c); let c = Constrintern.intern_constr (Evd.evars_of !isevars) env c in @@ -92,26 +96,31 @@ let locate_if_isevar loc na = function let interp_binder sigma env na t = let t = Constrintern.intern_gen true (Evd.evars_of !sigma) env t in - SPretyping.understand_type (Evd.evars_of !sigma) env (locate_if_isevar (loc_of_rawconstr t) na t) - - -let interp_context sigma env params = - List.fold_left - (fun (env,params) d -> match d with - | LocalRawAssum ([_,na],(CHole _ as t)) -> - let t = interp_binder sigma env na t in - let d = (na,None,t) in - (push_rel d env, d::params) - | LocalRawAssum (nal,t) -> - let t = interp_type sigma env t in - let ctx = list_map_i (fun i (_,na) -> (na,None,lift i t)) 0 nal in - let ctx = List.rev ctx in - (push_rel_context ctx env, ctx@params) - | LocalRawDef ((_,na),c) -> - let c = interp_constr_judgment sigma env c in - let d = (na, Some c.uj_val, c.uj_type) in - (push_rel d env,d::params)) - (env,[]) params + SPretyping.pretype_gen sigma env ([], []) IsType (locate_if_isevar (loc_of_rawconstr t) na t) + +let interp_context_evars evdref env params = + let bl = Constrintern.intern_context (Evd.evars_of !evdref) env params in + let (env, par, _, impls) = + List.fold_left + (fun (env,params,n,impls) (na, k, b, t) -> + match b with + None -> + let t' = locate_if_isevar (loc_of_rawconstr t) na t in + let t = SPretyping.understand_tcc_evars evdref env IsType t' in + let d = (na,None,t) in + let impls = + if k = Implicit then + let na = match na with Name n -> Some n | Anonymous -> None in + (ExplByPos (n, na), (true, true)) :: impls + else impls + in + (push_rel d env, d::params, succ n, impls) + | Some b -> + let c = SPretyping.understand_judgment_tcc evdref env b in + let d = (na, Some c.uj_val, c.uj_type) in + (push_rel d env,d::params, succ n, impls)) + (env,[],1,[]) (List.rev bl) + in (env, par), impls (* try to find non recursive definitions *) @@ -126,7 +135,7 @@ let collect_non_rec env = let i = list_try_find_i (fun i f -> - if List.for_all (fun (_, _, def) -> not (occur_var env f def)) ldefrec + if List.for_all (fun (_, def) -> not (occur_var env f def)) ldefrec then i else failwith "try_find_i") 0 lnamerec in @@ -152,14 +161,14 @@ let collect_non_rec env = let list_of_local_binders l = let rec aux acc = function Topconstr.LocalRawDef (n, c) :: tl -> aux ((n, Some c, None) :: acc) tl - | Topconstr.LocalRawAssum (nl, c) :: tl -> + | Topconstr.LocalRawAssum (nl, k, c) :: tl -> aux (List.fold_left (fun acc n -> (n, None, Some c) :: acc) acc nl) tl | [] -> List.rev acc in aux [] l let lift_binders k n l = let rec aux n = function - | (id, t, c) :: tl -> (id, option_map (liftn k n) t, liftn k n c) :: aux (pred n) tl + | (id, t, c) :: tl -> (id, Option.map (liftn k n) t, liftn k n c) :: aux (pred n) tl | [] -> [] in aux n l @@ -172,11 +181,10 @@ let split_args n rel = match list_chop ((List.length rel) - n) rel with | _ -> assert(false) let build_wellfounded (recname, n, bl,arityc,body) r measure notation boxed = + Coqlib.check_required_library ["Coq";"Program";"Wf"]; let sigma = Evd.empty in let isevars = ref (Evd.create_evar_defs sigma) in let env = Global.env() in - let nc = named_context env in - let nc_len = named_context_length nc in let pr c = my_print_constr env c in let prr = Printer.pr_rel_context env in let _prn = Printer.pr_named_context env in @@ -188,8 +196,10 @@ let build_wellfounded (recname, n, bl,arityc,body) r measure notation boxed = (* Ppconstr.pr_constr_expr body) *) (* with _ -> () *) (* in *) - let env', binders_rel = interp_context isevars env bl in - let after, ((argname, _, argtyp) as arg), before = split_args (succ n) binders_rel in + let (env', binders_rel), impls = interp_context_evars isevars env bl in + let after, ((argname, _, argtyp) as arg), before = + let idx = list_index (Name (snd n)) (List.rev_map (fun (na, _, _) -> na) binders_rel) in + split_args idx binders_rel in let before_length, after_length = List.length before, List.length after in let argid = match argname with Name n -> n | _ -> assert(false) in let liftafter = lift_binders 1 after_length after in @@ -226,11 +236,10 @@ let build_wellfounded (recname, n, bl,arityc,body) r measure notation boxed = (wf_rel_fun (succ len) (mkRel 1) (mkRel (len + 1)))) in let top_bl = after @ (arg :: before) in - let intern_bl = liftafter @ (wfarg 1 :: arg :: before) in - (try trace (str "Intern bl: " ++ prr intern_bl) with _ -> ()); let top_env = push_rel_context top_bl env in + let top_arity = interp_type_evars isevars top_env arityc in + let intern_bl = wfarg 1 :: arg :: before in let _intern_env = push_rel_context intern_bl env in - let top_arity = interp_type isevars top_env arityc in let proj = (Lazy.force sig_).Coqlib.proj1 in let projection = mkApp (proj, [| argtyp ; @@ -240,29 +249,21 @@ let build_wellfounded (recname, n, bl,arityc,body) r measure notation boxed = |]) in let intern_arity = it_mkProd_or_LetIn top_arity after in - (try trace (str "After length: " ++ int after_length ++ str "Top env: " ++ prr top_bl ++ spc () ++ str "Top arity: " ++ my_print_constr top_env top_arity); - trace (str "Before lifting arity: " ++ my_print_constr env top_arity) with _ -> ()); - (* Top arity is in top_env = after :: arg :: before *) -(* let intern_arity' = liftn 1 (succ after_length) top_arity in (\* arity in after :: wfarg :: arg :: before *\) *) -(* (try trace (str "projection: " "After lifting arity: " ++ my_print_constr env intern_arity' ++ spc ()); *) -(* trace (str "Intern env: " ++ prr intern_bl ++ str "intern_arity': " ++ my_print_constr _intern_env intern_arity') with _ -> ()); *) - let intern_arity = substl [projection] intern_arity in (* substitute the projection of wfarg for arg *) - (try trace (str "Top arity after subst: " ++ my_print_constr (Global.env ()) intern_arity) with _ -> ()); -(* let intern_arity = liftn 1 (succ after_length) intern_arity in (\* back in after :: wfarg :: arg :: before (ie, jump over arg) *\) *) -(* (try trace (str "Top arity after subst and lift: " ++ my_print_constr (Global.env ()) intern_arity) with _ -> ()); *) + (* Intern arity is in top_env = arg :: before *) + let intern_arity = liftn 2 2 intern_arity in +(* trace (str "After lifting arity: " ++ *) +(* my_print_constr (push_rel (Name argid', None, lift 2 argtyp) intern_env) *) +(* intern_arity); *) + (* arity is now in something :: wfarg :: arg :: before + where what refered to arg now refers to something *) + let intern_arity = substl [projection] intern_arity in + (* substitute the projection of wfarg for something *) let intern_before_env = push_rel_context before env in -(* let intern_fun_bl = liftafter @ [wfarg 1] in (\* FixMe dependencies *\) *) -(* (try debug 2 (str "Intern fun bl: " ++ prr intern_fun_bl) with _ -> ()); *) - (try trace (str "Intern arity: " ++ - my_print_constr _intern_env intern_arity) with _ -> ()); let intern_fun_arity_prod = it_mkProd_or_LetIn intern_arity [wfarg 1] in - (try trace (str "Intern fun arity product: " ++ - my_print_constr (push_rel_context [arg] intern_before_env) intern_fun_arity_prod) with _ -> ()); let intern_fun_binder = (Name recname, None, intern_fun_arity_prod) in let fun_bl = liftafter @ (intern_fun_binder :: [arg]) in -(* (try debug 2 (str "Fun bl: " ++ pr_rel intern_before_env fun_bl ++ spc ()) with _ -> ()); *) let fun_env = push_rel_context fun_bl intern_before_env in - let fun_arity = interp_type isevars fun_env arityc in + let fun_arity = interp_type_evars isevars fun_env arityc in let intern_body = interp_casted_constr isevars fun_env body fun_arity in let intern_body_lam = it_mkLambda_or_LetIn intern_body fun_bl in let _ = @@ -274,161 +275,177 @@ let build_wellfounded (recname, n, bl,arityc,body) r measure notation boxed = (* str "Intern body " ++ pr intern_body_lam) *) with _ -> () in - let _impl = - if Impargs.is_implicit_args() - then Impargs.compute_implicits top_env top_arity - else [] - in let prop = mkLambda (Name argid, argtyp, it_mkProd_or_LetIn top_arity after) in + (* Lift to get to constant arguments *) + let lift_cst = List.length after + 1 in let fix_def = match measure_fn with None -> - mkApp (constr_of_reference (Lazy.force fix_sub_ref), + mkApp (constr_of_global (Lazy.force fix_sub_ref), [| argtyp ; wf_rel ; - make_existential dummy_loc ~opaque:false intern_before_env isevars wf_proof ; - prop ; - intern_body_lam |]) + make_existential dummy_loc ~opaque:false env isevars wf_proof ; + lift lift_cst prop ; + lift lift_cst intern_body_lam |]) | Some f -> - lift (succ after_length) - (mkApp (constr_of_reference (Lazy.force fix_measure_sub_ref), - [| argtyp ; - f ; - prop ; - intern_body_lam |])) + mkApp (constr_of_global (Lazy.force fix_measure_sub_ref), + [| lift lift_cst argtyp ; + lift lift_cst f ; + lift lift_cst prop ; + lift lift_cst intern_body_lam |]) in let def_appl = applist (fix_def, gen_rels (after_length + 1)) in let def = it_mkLambda_or_LetIn def_appl binders_rel in let typ = it_mkProd_or_LetIn top_arity binders_rel in let fullcoqc = Evarutil.nf_isevar !isevars def in let fullctyp = Evarutil.nf_isevar !isevars typ in -(* let _ = try trace (str "After evar normalization: " ++ spc () ++ *) -(* str "Coq term: " ++ my_print_constr env fullcoqc ++ spc () *) -(* ++ str "Coq type: " ++ my_print_constr env fullctyp) *) -(* with _ -> () *) -(* in *) let evm = evars_of_term (Evd.evars_of !isevars) Evd.empty fullctyp in let evm = evars_of_term (Evd.evars_of !isevars) evm fullcoqc in let evm = non_instanciated_map env isevars evm in - - (* let _ = try trace (str "Non instanciated evars map: " ++ Evd.pr_evar_map evm) with _ -> () in *) - let evars, evars_def = Eterm.eterm_obligations recname nc_len !isevars evm 0 fullcoqc (Some fullctyp) in - (* (try trace (str "Generated obligations : "); *) -(* Array.iter *) - (* (fun (n, t, _) -> trace (str "Evar " ++ str (string_of_id n) ++ spc () ++ my_print_constr env t)) *) - (* evars; *) - (* with _ -> ()); *) - Subtac_obligations.add_definition recname evars_def fullctyp evars + let evars, evars_def, evars_typ = Eterm.eterm_obligations env recname !isevars evm 0 fullcoqc fullctyp in + Subtac_obligations.add_definition recname evars_def evars_typ ~implicits:impls evars let nf_evar_context isevars ctx = List.map (fun (n, b, t) -> - (n, option_map (Evarutil.nf_isevar isevars) b, Evarutil.nf_isevar isevars t)) ctx + (n, Option.map (Evarutil.nf_isevar isevars) b, Evarutil.nf_isevar isevars t)) ctx -let build_mutrec l boxed = - let sigma = Evd.empty and env = Global.env () in - let nc = named_context env in - let nc_len = named_context_length nc in - let lnameargsardef = - (*List.map (fun (f, d) -> Subtac_interp_fixpoint.rewrite_fixpoint env protos (f, d))*) - l - in - let lrecnames = List.map (fun ((f,_,_,_,_),_) -> f) lnameargsardef - and nv = List.map (fun ((_,n,_,_,_),_) -> n) lnameargsardef +let interp_fix_context evdref env fix = + interp_context_evars evdref env fix.Command.fix_binders + +let interp_fix_ccl evdref (env,_) fix = + interp_type_evars evdref env fix.Command.fix_type + +let interp_fix_body evdref env_rec impls (_,ctx) fix ccl = + let env = push_rel_context ctx env_rec in + let body = interp_casted_constr_evars evdref env ~impls fix.Command.fix_body ccl in + it_mkLambda_or_LetIn body ctx + +let build_fix_type (_,ctx) ccl = it_mkProd_or_LetIn ccl ctx + +let prepare_recursive_declaration fixnames fixtypes fixdefs = + let defs = List.map (subst_vars (List.rev fixnames)) fixdefs in + let names = List.map (fun id -> Name id) fixnames in + (Array.of_list names, Array.of_list fixtypes, Array.of_list defs) + +let rel_index n ctx = + list_index0 (Name n) (List.rev_map pi1 (List.filter (fun x -> pi2 x = None) ctx)) + +let rec unfold f b = + match f b with + | Some (x, b') -> x :: unfold f b' + | None -> [] + +let compute_possible_guardness_evidences (n,_) (_, fixctx) fixtype = + match n with + | Some (loc, n) -> [rel_index n fixctx] + | None -> + (* If recursive argument was not given by user, we try all args. + An earlier approach was to look only for inductive arguments, + but doing it properly involves delta-reduction, and it finally + doesn't seem to worth the effort (except for huge mutual + fixpoints ?) *) + let len = List.length fixctx in + unfold (function x when x = len -> None + | n -> Some (n, succ n)) 0 + +let push_named_context = List.fold_right push_named + +let interp_recursive fixkind l boxed = + let env = Global.env() in + let fixl, ntnl = List.split l in + let fixnames = List.map (fun fix -> fix.Command.fix_name) fixl in + + (* Interp arities allowing for unresolved types *) + let evdref = ref (Evd.create_evar_defs Evd.empty) in + let fixctxs, fiximps = List.split (List.map (interp_fix_context evdref env) fixl) in + let fixccls = List.map2 (interp_fix_ccl evdref) fixctxs fixl in + let fixtypes = List.map2 build_fix_type fixctxs fixccls in + let rec_sign = + List.fold_left2 (fun env id t -> (id,None,t) :: env) + [] fixnames fixtypes in - (* Build the recursive context and notations for the recursive types *) - let (rec_sign,rec_env,rec_impls,arityl) = - List.fold_left - (fun (sign,env,impls,arl) ((recname, n, bl,arityc,body),_) -> - let isevars = ref (Evd.create_evar_defs sigma) in - let arityc = Command.generalize_constr_expr arityc bl in - let arity = interp_type isevars env arityc in - let impl = - if Impargs.is_implicit_args() - then Impargs.compute_implicits env arity - else [] in - let impls' =(recname,([],impl,compute_arguments_scope arity))::impls in - ((recname,None,arity) :: sign, Environ.push_named (recname,None,arity) env, impls', (isevars, None, arity)::arl)) - ([],env,[],[]) lnameargsardef in - let arityl = List.rev arityl in - let notations = - List.fold_right (fun (_,ntnopt) l -> option_cons ntnopt l) - lnameargsardef [] in - - let recdef = - - (* Declare local notations *) - let fs = States.freeze() in + let env_rec = push_named_context rec_sign env in + + (* Get interpretation metadatas *) + let impls = Command.compute_interning_datas env [] fixnames fixtypes fiximps in + let notations = List.fold_right Option.List.cons ntnl [] in + + (* Interp bodies with rollback because temp use of notations/implicit *) + let fixdefs = + States.with_heavy_rollback (fun () -> + List.iter (Command.declare_interning_data impls) notations; + list_map3 (interp_fix_body evdref env_rec impls) fixctxs fixl fixccls) + () in + + (* Instantiate evars and check all are resolved *) + let evd,_ = Evarconv.consider_remaining_unif_problems env_rec !evdref in + let fixdefs = List.map (nf_evar (evars_of evd)) fixdefs in + let fixtypes = List.map (nf_evar (evars_of evd)) fixtypes in + let rec_sign = nf_named_context_evar (evars_of evd) rec_sign in + + let recdefs = List.length rec_sign in +(* List.iter (check_evars env_rec Evd.empty evd) fixdefs; *) +(* List.iter (check_evars env Evd.empty evd) fixtypes; *) +(* check_mutuality env kind (List.combine fixnames fixdefs); *) + + (* Russell-specific code *) + + (* Get the interesting evars, those that were not instanciated *) + let isevars = Evd.undefined_evars evd in + trace (str "got undefined evars" ++ Evd.pr_evar_defs isevars); + let evm = Evd.evars_of isevars in + trace (str "got the evm, recdefs is " ++ int recdefs); + (* Solve remaining evars *) + let rec collect_evars id def typ imps = + let _ = try trace (str "In collect evars, isevars is: " ++ Evd.pr_evar_defs isevars) with _ -> () in + (* Generalize by the recursive prototypes *) let def = - try - List.iter (fun (df,c,scope) -> (* No scope for tmp notation *) - Metasyntax.add_notation_interpretation df rec_impls c None) notations; - List.map2 - (fun ((_,_,bl,_,def),_) (isevars, info, arity) -> - match info with - None -> - let def = abstract_constr_expr def bl in - isevars, info, interp_casted_constr isevars rec_env ~impls:([],rec_impls) - def arity - | Some (n, artyp, wfrel, fun_bl, intern_bl, intern_arity) -> - let rec_env = push_rel_context fun_bl rec_env in - let cstr = interp_casted_constr isevars rec_env ~impls:([],rec_impls) - def intern_arity - in isevars, info, it_mkLambda_or_LetIn cstr fun_bl) - lnameargsardef arityl - with e -> - States.unfreeze fs; raise e in - States.unfreeze fs; def - in - let (lnonrec,(namerec,defrec,arrec,nvrec)) = - collect_non_rec env lrecnames recdef arityl nv in - let recdefs = Array.length defrec in - (* Solve remaining evars *) - let rec collect_evars i acc = - if i < recdefs then - let (isevars, info, def) = defrec.(i) in - (* let _ = try trace (str "In solve evars, isevars is: " ++ Evd.pr_evar_defs !isevars) with _ -> () in *) - let def = evar_nf isevars def in - let x, y, typ = arrec.(i) in - let typ = evar_nf isevars typ in - arrec.(i) <- (x, y, typ); - let rec_sign = nf_evar_context !isevars rec_sign in - let isevars = Evd.undefined_evars !isevars in - (* let _ = try trace (str "In solve evars, undefined is: " ++ Evd.pr_evar_defs isevars) with _ -> () in *) - let evm = Evd.evars_of isevars in - let id = namerec.(i) in - (* Generalize by the recursive prototypes *) - let def = - Termops.it_mkNamedLambda_or_LetIn def rec_sign - and typ = - Termops.it_mkNamedProd_or_LetIn typ rec_sign - in - let evars, def = Eterm.eterm_obligations id nc_len isevars evm recdefs def (Some typ) in - collect_evars (succ i) ((id, def, typ, evars) :: acc) - else acc + Termops.it_mkNamedLambda_or_LetIn def rec_sign + and typ = + Termops.it_mkNamedProd_or_LetIn typ rec_sign + in + let evm' = Subtac_utils.evars_of_term evm Evd.empty def in + let evm' = Subtac_utils.evars_of_term evm evm' typ in + let evars, def, typ = Eterm.eterm_obligations env id isevars evm' recdefs def typ in + (id, def, typ, imps, evars) in - let defs = collect_evars 0 [] in - Subtac_obligations.add_mutual_definitions (List.rev defs) nvrec - + let defs = list_map4 collect_evars fixnames fixdefs fixtypes fiximps in + (match fixkind with + | Command.IsFixpoint wfl -> + let possible_indexes = + list_map3 compute_possible_guardness_evidences wfl fixctxs fixtypes in + let fixdecls = Array.of_list (List.map (fun x -> Name x) fixnames), + Array.of_list fixtypes, + Array.of_list (List.map (subst_vars (List.rev fixnames)) fixdefs) + in + let indexes = Pretyping.search_guard dummy_loc (Global.env ()) possible_indexes fixdecls in + list_iter_i (fun i _ -> Inductive.check_fix env ((indexes,i),fixdecls)) l + | Command.IsCoFixpoint -> ()); + Subtac_obligations.add_mutual_definitions defs notations fixkind + let out_n = function Some n -> n - | None -> 0 - -let build_recursive (lnameargsardef:(fixpoint_expr * decl_notation) list) boxed = - match lnameargsardef with - | ((id, (n, CWfRec r), bl, typ, body), no) :: [] -> - build_wellfounded (id, out_n n, bl, typ, body) r false no boxed - | ((id, (n, CMeasureRec r), bl, typ, body), no) :: [] -> - build_wellfounded (id, out_n n, bl, typ, body) r true no boxed - | l -> - let lnameargsardef = - List.map (fun ((id, (n, ro), bl, typ, body), no) -> - match ro with - CStructRec -> (id, out_n n, bl, typ, body), no - | CWfRec _ | CMeasureRec _ -> - errorlabstrm "Subtac_command.build_recursive" - (str "Well-founded fixpoints not allowed in mutually recursive blocks")) - lnameargsardef - in build_mutrec lnameargsardef boxed - - - + | None -> raise Not_found + +let build_recursive l b = + let g = List.map (fun ((_,wf,_,_,_),_) -> wf) l in + match g, l with + [(n, CWfRec r)], [(((_,id),_,bl,typ,def),ntn)] -> + ignore(build_wellfounded (id, out_n n, bl, typ, def) r false ntn false) + + | [(n, CMeasureRec r)], [(((_,id),_,bl,typ,def),ntn)] -> + ignore(build_wellfounded (id, out_n n, bl, typ, def) r true ntn false) + + | _, _ when List.for_all (fun (n, ro) -> ro = CStructRec) g -> + let fixl = List.map (fun (((_,id),_,bl,typ,def),ntn) -> + ({Command.fix_name = id; Command.fix_binders = bl; Command.fix_body = def; Command.fix_type = typ},ntn)) l + in interp_recursive (Command.IsFixpoint g) fixl b + | _, _ -> + errorlabstrm "Subtac_command.build_recursive" + (str "Well-founded fixpoints not allowed in mutually recursive blocks") + +let build_corecursive l b = + let fixl = List.map (fun (((_,id),bl,typ,def),ntn) -> + ({Command.fix_name = id; Command.fix_binders = bl; Command.fix_body = def; Command.fix_type = typ},ntn)) + l in + interp_recursive Command.IsCoFixpoint fixl b diff --git a/contrib/subtac/subtac_command.mli b/contrib/subtac/subtac_command.mli index 846e06cf..27520867 100644 --- a/contrib/subtac/subtac_command.mli +++ b/contrib/subtac/subtac_command.mli @@ -14,18 +14,18 @@ val interp_gen : evar_defs ref -> env -> ?impls:full_implicits_env -> - ?allow_soapp:bool -> + ?allow_patvar:bool -> ?ltacvars:ltac_sign -> constr_expr -> constr val interp_constr : evar_defs ref -> env -> constr_expr -> constr -val interp_type : +val interp_type_evars : evar_defs ref -> env -> ?impls:full_implicits_env -> constr_expr -> constr -val interp_casted_constr : +val interp_casted_constr_evars : evar_defs ref -> env -> ?impls:full_implicits_env -> @@ -38,5 +38,12 @@ val interp_constr_judgment : constr_expr -> unsafe_judgment val list_chop_hd : int -> 'a list -> 'a list * 'a * 'a list +val interp_binder : Evd.evar_defs ref -> + Environ.env -> Names.name -> Topconstr.constr_expr -> Term.constr + + val build_recursive : (fixpoint_expr * decl_notation) list -> bool -> unit + +val build_corecursive : + (cofixpoint_expr * decl_notation) list -> bool -> unit diff --git a/contrib/subtac/subtac_obligations.ml b/contrib/subtac/subtac_obligations.ml index d182f7cd..55cdc7c4 100644 --- a/contrib/subtac/subtac_obligations.ml +++ b/contrib/subtac/subtac_obligations.ml @@ -1,7 +1,7 @@ -(* -*- default-directory: "~/research/coq/trunk/" -*- *) open Printf open Pp open Subtac_utils +open Command open Term open Names @@ -12,8 +12,11 @@ open Entries open Decl_kinds open Util open Evd +open Declare -let pperror cmd = Util.errorlabstrm "Subtac" cmd +type definition_hook = global_reference -> unit + +let pperror cmd = Util.errorlabstrm "Program" cmd let error s = pperror (str s) exception NoObligations of identifier option @@ -22,11 +25,12 @@ let explain_no_obligations = function Some ident -> str "No obligations for program " ++ str (string_of_id ident) | None -> str "No obligations remaining" -type obligation_info = (Names.identifier * Term.types * bool * Intset.t) array +type obligation_info = (Names.identifier * Term.types * loc * bool * Intset.t) array type obligation = { obl_name : identifier; obl_type : types; + obl_location : loc; obl_body : constr option; obl_opaque : bool; obl_deps : Intset.t; @@ -34,27 +38,46 @@ type obligation = type obligations = (obligation array * int) +type notations = (string * Topconstr.constr_expr * Topconstr.scope_name option) list + type program_info = { prg_name: identifier; prg_body: constr; prg_type: constr; prg_obligations: obligations; prg_deps : identifier list; - prg_nvrec : int array; + prg_fixkind : Command.fixpoint_kind option ; + prg_implicits : (Topconstr.explicitation * (bool * bool)) list; + prg_notations : notations ; + prg_kind : definition_kind; + prg_hook : definition_hook; } let assumption_message id = - Options.if_verbose message ((string_of_id id) ^ " is assumed") + Flags.if_verbose message ((string_of_id id) ^ " is assumed") let default_tactic : Proof_type.tactic ref = ref Refiner.tclIDTAC let default_tactic_expr : Tacexpr.glob_tactic_expr ref = ref (Obj.magic ()) let set_default_tactic t = default_tactic_expr := t; default_tactic := Tacinterp.eval_tactic t -let evar_of_obligation o = { evar_hyps = Global.named_context_val () ; - evar_concl = o.obl_type ; - evar_body = Evar_empty ; - evar_extra = None } +(* true = All transparent, false = Opaque if possible *) +let proofs_transparency = ref true + +let set_proofs_transparency = (:=) proofs_transparency +let get_proofs_transparency () = !proofs_transparency + +open Goptions + +let _ = + declare_bool_option + { optsync = true; + optname = "transparency of Program obligations"; + optkey = (SecondaryTable ("Transparent","Obligations")); + optread = get_proofs_transparency; + optwrite = set_proofs_transparency; } + +let evar_of_obligation o = make_evar (Global.named_context_val ()) o.obl_type let subst_deps obls deps t = Intset.fold @@ -62,7 +85,7 @@ let subst_deps obls deps t = let xobl = obls.(x) in debug 3 (str "Trying to get body of obligation " ++ int x); let oblb = - try out_some xobl.obl_body + try Option.get xobl.obl_body with _ -> debug 3 (str "Couldn't get body of obligation " ++ int x); assert(false) @@ -96,7 +119,7 @@ let from_prg : program_info ProgMap.t ref = ref ProgMap.empty let freeze () = !from_prg, !default_tactic_expr let unfreeze (v, t) = from_prg := v; set_default_tactic t let init () = - from_prg := ProgMap.empty; set_default_tactic (Subtac_utils.utils_call "subtac_simpl" []) + from_prg := ProgMap.empty; set_default_tactic (Subtac_utils.tactics_call "obligations_tactic" []) let _ = Summary.declare_summary "program-tcc-table" @@ -110,7 +133,7 @@ let progmap_union = ProgMap.fold ProgMap.add let cache (_, (infos, tac)) = from_prg := infos; - default_tactic_expr := tac + set_default_tactic tac let (input,output) = declare_object @@ -129,69 +152,112 @@ let rec intset_to = function let subst_body prg = let obls, _ = prg.prg_obligations in - subst_deps obls (intset_to (pred (Array.length obls))) prg.prg_body - + let ints = intset_to (pred (Array.length obls)) in + subst_deps obls ints prg.prg_body, + subst_deps obls ints (Termops.refresh_universes prg.prg_type) + let declare_definition prg = - let body = subst_body prg in + let body, typ = subst_body prg in (try trace (str "Declaring: " ++ Ppconstr.pr_id prg.prg_name ++ spc () ++ my_print_constr (Global.env()) body ++ str " : " ++ my_print_constr (Global.env()) prg.prg_type); with _ -> ()); + let (local, boxed, kind) = prg.prg_kind in let ce = { const_entry_body = body; - const_entry_type = Some prg.prg_type; + const_entry_type = Some typ; const_entry_opaque = false; - const_entry_boxed = false} + const_entry_boxed = boxed} in - let _constant = Declare.declare_constant - prg.prg_name (DefinitionEntry ce,IsDefinition Definition) - in - Subtac_utils.definition_message prg.prg_name + (Command.get_declare_definition_hook ()) ce; + match local with + | Local when Lib.sections_are_opened () -> + let c = + SectionLocalDef(ce.const_entry_body,ce.const_entry_type,false) in + let _ = declare_variable prg.prg_name (Lib.cwd(),c,IsDefinition kind) in + print_message (Subtac_utils.definition_message prg.prg_name); + if Pfedit.refining () then + Flags.if_verbose msg_warning + (str"Local definition " ++ Nameops.pr_id prg.prg_name ++ + str" is not visible from current goals"); + VarRef prg.prg_name + | (Global|Local) -> + let c = + Declare.declare_constant + prg.prg_name (DefinitionEntry ce,IsDefinition (pi3 prg.prg_kind)) + in + let gr = ConstRef c in + if Impargs.is_implicit_args () || prg.prg_implicits <> [] then + Impargs.declare_manual_implicits false gr (Impargs.is_implicit_args ()) prg.prg_implicits; + print_message (Subtac_utils.definition_message prg.prg_name); + prg.prg_hook gr; + gr open Pp open Ppconstr +let rec lam_index n t acc = + match kind_of_term t with + | Lambda (na, _, b) -> + if na = Name n then acc + else lam_index n b (succ acc) + | _ -> raise Not_found + +let compute_possible_guardness_evidences (n,_) fixbody fixtype = + match n with + | Some (loc, n) -> [lam_index n fixbody 0] + | None -> + (* If recursive argument was not given by user, we try all args. + An earlier approach was to look only for inductive arguments, + but doing it properly involves delta-reduction, and it finally + doesn't seem to worth the effort (except for huge mutual + fixpoints ?) *) + let m = Term.nb_prod fixtype in + let ctx = fst (Sign.decompose_prod_n_assum m fixtype) in + list_map_i (fun i _ -> i) 0 ctx + let declare_mutual_definition l = let len = List.length l in - let namerec = Array.of_list (List.map (fun x -> x.prg_name) l) in - let arrec = - Array.of_list (List.map (fun x -> snd (decompose_prod_n len x.prg_type)) l) - in - let recvec = - Array.of_list + let fixdefs, fixtypes, fiximps = + list_split3 (List.map (fun x -> - let subs = (subst_body x) in - snd (decompose_lam_n len subs)) l) + let subs, typ = (subst_body x) in + snd (decompose_lam_n len subs), snd (decompose_prod_n len typ), x.prg_implicits) l) in - let nvrec = (List.hd l).prg_nvrec in - let recdecls = (Array.map (fun id -> Name id) namerec, arrec, recvec) in - let rec declare i fi = - (try trace (str "Declaring: " ++ pr_id fi ++ spc () ++ - my_print_constr (Global.env()) (recvec.(i))); - with _ -> ()); - let ce = - { const_entry_body = mkFix ((nvrec,i),recdecls); - const_entry_type = Some arrec.(i); - const_entry_opaque = false; - const_entry_boxed = true} in - let kn = Declare.declare_constant fi (DefinitionEntry ce,IsDefinition Fixpoint) - in - ConstRef kn - in - let lrefrec = Array.mapi declare namerec in - Options.if_verbose ppnl (recursive_message lrefrec) - + let fixkind = Option.get (List.hd l).prg_fixkind in + let arrrec, recvec = Array.of_list fixtypes, Array.of_list fixdefs in + let fixdecls = (Array.of_list (List.map (fun x -> Name x.prg_name) l), arrrec, recvec) in + let boxed = true (* TODO *) in + let fixnames = (List.hd l).prg_deps in + let kind = if fixkind <> IsCoFixpoint then Fixpoint else CoFixpoint in + let indexes, fixdecls = + match fixkind with + | IsFixpoint wfl -> + let possible_indexes = + list_map3 compute_possible_guardness_evidences wfl fixdefs fixtypes in + let indexes = Pretyping.search_guard dummy_loc (Global.env ()) possible_indexes fixdecls in + Some indexes, list_map_i (fun i _ -> mkFix ((indexes,i),fixdecls)) 0 l + | IsCoFixpoint -> + None, list_map_i (fun i _ -> mkCoFix (i,fixdecls)) 0 l + in + (* Declare the recursive definitions *) + let kns = list_map4 (declare_fix boxed kind) fixnames fixdecls fixtypes fiximps in + (* Declare notations *) + List.iter (Command.declare_interning_data ([],[])) (List.hd l).prg_notations; + Flags.if_verbose ppnl (Command.recursive_message kind indexes fixnames); + (match List.hd kns with ConstRef kn -> kn | _ -> assert false) + let declare_obligation obl body = let ce = { const_entry_body = body; const_entry_type = Some obl.obl_type; - const_entry_opaque = obl.obl_opaque; + const_entry_opaque = if get_proofs_transparency () then false else obl.obl_opaque; const_entry_boxed = false} in let constant = Declare.declare_constant obl.obl_name (DefinitionEntry ce,IsProof Property) in - Subtac_utils.definition_message obl.obl_name; + print_message (Subtac_utils.definition_message obl.obl_name); { obl with obl_body = Some (mkConst constant) } let try_tactics obls = @@ -209,18 +275,19 @@ let try_tactics obls = let red = Reductionops.nf_betaiota -let init_prog_info n b t deps nvrec obls = +let init_prog_info n b t deps fixkind notations obls impls kind hook = let obls' = Array.mapi - (fun i (n, t, o, d) -> + (fun i (n, t, l, o, d) -> debug 2 (str "Adding obligation " ++ int i ++ str " with deps : " ++ str (string_of_intset d)); { obl_name = n ; obl_body = None; - obl_type = red t; obl_opaque = o; + obl_location = l; obl_type = red t; obl_opaque = o; obl_deps = d }) obls in { prg_name = n ; prg_body = b; prg_type = red t; prg_obligations = (obls', Array.length obls'); - prg_deps = deps; prg_nvrec = nvrec; } + prg_deps = deps; prg_fixkind = fixkind ; prg_notations = notations ; + prg_implicits = impls; prg_kind = kind; prg_hook = hook; } let get_prog name = let prg_infos = !from_prg in @@ -244,44 +311,63 @@ let update_state s = (* msgnl (str "Updating obligations info"); *) Lib.add_anonymous_leaf (input s) -let obligations_message rem = +type progress = + | Remain of int + | Dependent + | Defined of global_reference + +let obligations_message rem = if rem > 0 then if rem = 1 then - Options.if_verbose msgnl (int rem ++ str " obligation remaining") + Flags.if_verbose msgnl (int rem ++ str " obligation remaining") else - Options.if_verbose msgnl (int rem ++ str " obligations remaining") + Flags.if_verbose msgnl (int rem ++ str " obligations remaining") else - Options.if_verbose msgnl (str "No more obligations remaining") - + Flags.if_verbose msgnl (str "No more obligations remaining") + let update_obls prg obls rem = let prg' = { prg with prg_obligations = (obls, rem) } in from_prg := map_replace prg.prg_name prg' !from_prg; obligations_message rem; - if rem > 0 then () - else ( - match prg'.prg_deps with - [] -> - declare_definition prg'; - from_prg := ProgMap.remove prg.prg_name !from_prg - | l -> - let progs = List.map (fun x -> ProgMap.find x !from_prg) prg'.prg_deps in - if List.for_all (fun x -> obligations_solved x) progs then - (declare_mutual_definition progs; - from_prg := List.fold_left - (fun acc x -> - ProgMap.remove x.prg_name acc) !from_prg progs)); - update_state (!from_prg, !default_tactic_expr); - rem + let res = + if rem > 0 then Remain rem + else ( + match prg'.prg_deps with + [] -> + let kn = declare_definition prg' in + from_prg := ProgMap.remove prg.prg_name !from_prg; + Defined kn + | l -> + let progs = List.map (fun x -> ProgMap.find x !from_prg) prg'.prg_deps in + if List.for_all (fun x -> obligations_solved x) progs then + (let kn = declare_mutual_definition progs in + from_prg := List.fold_left + (fun acc x -> + ProgMap.remove x.prg_name acc) !from_prg progs; + Defined (ConstRef kn)) + else Dependent); + in + update_state (!from_prg, !default_tactic_expr); + res let is_defined obls x = obls.(x).obl_body <> None let deps_remaining obls deps = - Intset.fold - (fun x acc -> - if is_defined obls x then acc - else x :: acc) - deps [] - + Intset.fold + (fun x acc -> + if is_defined obls x then acc + else x :: acc) + deps [] + +let has_dependencies obls n = + let res = ref false in + Array.iteri + (fun i obl -> + if i <> n && Intset.mem n obl.obl_deps then + res := true) + obls; + !res + let kind_of_opacity o = if o then Subtac_utils.goal_proof_kind else Subtac_utils.goal_kind @@ -293,6 +379,7 @@ let obligations_of_evars evars = (fun (n, t) -> { obl_name = n; obl_type = t; + obl_location = dummy_loc; obl_body = None; obl_opaque = false; obl_deps = Intset.empty; @@ -315,11 +402,15 @@ let rec solve_obligation prg num = let obl = { obl with obl_body = Some (Libnames.constr_of_global gr) } in let obls = Array.copy obls in let _ = obls.(num) <- obl in - if update_obls prg obls (pred rem) <> 0 then - auto_solve_obligations (Some prg.prg_name)); + match update_obls prg obls (pred rem) with + | Remain n when n > 0 -> + if has_dependencies obls num then + ignore(auto_solve_obligations (Some prg.prg_name)) + | _ -> ()); trace (str "Started obligation " ++ int user_num ++ str " proof: " ++ Subtac_utils.my_print_constr (Global.env ()) obl.obl_type); - Pfedit.by !default_tactic + Pfedit.by !default_tactic; + Flags.if_verbose (fun () -> msg (Printer.pr_open_subgoals ())) () | l -> pperror (str "Obligation " ++ int user_num ++ str " depends on obligation(s) " ++ str (string_of_list ", " (fun x -> string_of_int (succ x)) l)) @@ -341,7 +432,7 @@ and solve_obligation_by_tac prg obls i tac = Some _ -> false | None -> (try - if deps_remaining obls obl.obl_deps = [] then + if deps_remaining obls obl.obl_deps = [] then let obl = subst_deps_obl obls obl in let t = Subtac_utils.solve_by_tac (evar_of_obligation obl) tac in if obl.obl_opaque then @@ -349,8 +440,12 @@ and solve_obligation_by_tac prg obls i tac = else obls.(i) <- { obl with obl_body = Some t }; true - else false - with _ -> false) + else false + with + | Stdpp.Exc_located(_, Refiner.FailError (_, s)) + | Refiner.FailError (_, s) -> + user_err_loc (obl.obl_location, "solve_obligation", s) + | e -> false) and solve_prg_obligations prg tac = let obls, rem = prg.prg_obligations in @@ -381,35 +476,66 @@ and try_solve_obligation n prg tac = and try_solve_obligations n tac = try ignore (solve_obligations n tac) with NoObligations _ -> () -and auto_solve_obligations n : unit = - Options.if_verbose msgnl (str "Solving obligations automatically..."); - try_solve_obligations n !default_tactic +and auto_solve_obligations n : progress = + Flags.if_verbose msgnl (str "Solving obligations automatically..."); + try solve_obligations n !default_tactic with NoObligations _ -> Dependent -let add_definition n b t obls = - Options.if_verbose pp (str (string_of_id n) ++ str " has type-checked"); - let prg = init_prog_info n b t [] (Array.make 0 0) obls in +open Pp +let show_obligations ?(msg=true) n = + let prg = get_prog_err n in + let n = prg.prg_name in + let obls, rem = prg.prg_obligations in + if msg then msgnl (int rem ++ str " obligation(s) remaining: "); + Array.iteri (fun i x -> + match x.obl_body with + None -> msgnl (str "Obligation" ++ spc() ++ int (succ i) ++ spc () ++ str "of" ++ spc() ++ str (string_of_id n) ++ str ":" ++ spc () ++ + my_print_constr (Global.env ()) x.obl_type ++ str "." ++ fnl ()) + | Some _ -> ()) + obls + +let show_term n = + let prg = get_prog_err n in + let n = prg.prg_name in + msgnl (str (string_of_id n) ++ spc () ++ str":" ++ spc () ++ my_print_constr (Global.env ()) prg.prg_type ++ spc () ++ str ":=" ++ fnl () + ++ my_print_constr (Global.env ()) prg.prg_body) + +let add_definition n b t ?(implicits=[]) ?(kind=Global,false,Definition) ?(hook=fun x -> ()) obls = + Flags.if_verbose pp (str (string_of_id n) ++ str " has type-checked"); + let prg = init_prog_info n b t [] None [] obls implicits kind hook in let obls,_ = prg.prg_obligations in if Array.length obls = 0 then ( - Options.if_verbose ppnl (str "."); - declare_definition prg; - from_prg := ProgMap.remove prg.prg_name !from_prg) + Flags.if_verbose ppnl (str "."); + let cst = declare_definition prg in + from_prg := ProgMap.remove prg.prg_name !from_prg; + Defined cst) else ( let len = Array.length obls in - let _ = Options.if_verbose ppnl (str ", generating " ++ int len ++ str " obligation(s)") in + let _ = Flags.if_verbose ppnl (str ", generating " ++ int len ++ str " obligation(s)") in from_prg := ProgMap.add n prg !from_prg; - auto_solve_obligations (Some n)) + let res = auto_solve_obligations (Some n) in + match res with + | Remain rem when rem < 5 -> Flags.if_verbose (fun () -> show_obligations ~msg:false (Some n)) (); res + | _ -> res) -let add_mutual_definitions l nvrec = - let deps = List.map (fun (n, b, t, obls) -> n) l in +let add_mutual_definitions l ?(kind=Global,false,Definition) notations fixkind = + let deps = List.map (fun (n, b, t, imps, obls) -> n) l in let upd = List.fold_left - (fun acc (n, b, t, obls) -> - let prg = init_prog_info n b t deps nvrec obls in - ProgMap.add n prg acc) + (fun acc (n, b, t, imps, obls) -> + let prg = init_prog_info n b t deps (Some fixkind) notations obls imps kind (fun x -> ()) in + ProgMap.add n prg acc) !from_prg l in from_prg := upd; - List.iter (fun x -> auto_solve_obligations (Some x)) deps - + let _defined = + List.fold_left (fun finished x -> + if finished then finished + else + match auto_solve_obligations (Some x) with + Defined _ -> (* If one definition is turned into a constant, the whole block is defined. *) true + | _ -> false) + false deps + in () + let admit_obligations n = let prg = get_prog_err n in let obls, rem = prg.prg_obligations in @@ -417,7 +543,7 @@ let admit_obligations n = match x.obl_body with None -> let x = subst_deps_obl obls x in - let kn = Declare.declare_constant x.obl_name (ParameterEntry x.obl_type, IsAssumption Conjectural) in + let kn = Declare.declare_constant x.obl_name (ParameterEntry (x.obl_type,false), IsAssumption Conjectural) in assumption_message x.obl_name; obls.(i) <- { x with obl_body = Some (mkConst kn) } | Some _ -> ()) @@ -438,18 +564,5 @@ let next_obligation n = array_find (fun x -> x.obl_body = None && deps_remaining obls x.obl_deps = []) obls in solve_obligation prg i - -open Pp -let show_obligations n = - let prg = get_prog_err n in - let n = prg.prg_name in - let obls, rem = prg.prg_obligations in - msgnl (int rem ++ str " obligation(s) remaining: "); - Array.iteri (fun i x -> - match x.obl_body with - None -> msgnl (str "Obligation" ++ spc() ++ int (succ i) ++ spc () ++ str "of" ++ spc() ++ str (string_of_id n) ++ str ":" ++ spc () ++ - my_print_constr (Global.env ()) x.obl_type ++ str "." ++ fnl ()) - | Some _ -> ()) - obls - + let default_tactic () = !default_tactic diff --git a/contrib/subtac/subtac_obligations.mli b/contrib/subtac/subtac_obligations.mli index f015b80b..6d13e3bd 100644 --- a/contrib/subtac/subtac_obligations.mli +++ b/contrib/subtac/subtac_obligations.mli @@ -1,22 +1,42 @@ +open Names open Util +open Libnames -type obligation_info = (Names.identifier * Term.types * bool * Intset.t) array - (* ident, type, opaque or transparent, dependencies *) +type obligation_info = (Names.identifier * Term.types * loc * bool * Intset.t) array + (* ident, type, location, opaque or transparent, dependencies *) +type progress = (* Resolution status of a program *) + | Remain of int (* n obligations remaining *) + | Dependent (* Dependent on other definitions *) + | Defined of global_reference (* Defined as id *) + val set_default_tactic : Tacexpr.glob_tactic_expr -> unit val default_tactic : unit -> Proof_type.tactic +val set_proofs_transparency : bool -> unit (* true = All transparent, false = Opaque if possible *) +val get_proofs_transparency : unit -> bool + +type definition_hook = global_reference -> unit + val add_definition : Names.identifier -> Term.constr -> Term.types -> - obligation_info -> unit + ?implicits:(Topconstr.explicitation * (bool * bool)) list -> + ?kind:Decl_kinds.definition_kind -> + ?hook:definition_hook -> obligation_info -> progress + +type notations = (string * Topconstr.constr_expr * Topconstr.scope_name option) list val add_mutual_definitions : - (Names.identifier * Term.constr * Term.types * obligation_info) list -> int array -> unit + (Names.identifier * Term.constr * Term.types * + (Topconstr.explicitation * (bool * bool)) list * obligation_info) list -> + ?kind:Decl_kinds.definition_kind -> + notations -> + Command.fixpoint_kind -> unit val subtac_obligation : int * Names.identifier option * Topconstr.constr_expr option -> unit val next_obligation : Names.identifier option -> unit -val solve_obligations : Names.identifier option -> Proof_type.tactic -> int +val solve_obligations : Names.identifier option -> Proof_type.tactic -> progress (* Number of remaining obligations to be solved for this program *) val solve_all_obligations : Proof_type.tactic -> unit @@ -25,7 +45,9 @@ val try_solve_obligation : int -> Names.identifier option -> Proof_type.tactic - val try_solve_obligations : Names.identifier option -> Proof_type.tactic -> unit -val show_obligations : Names.identifier option -> unit +val show_obligations : ?msg:bool -> Names.identifier option -> unit + +val show_term : Names.identifier option -> unit val admit_obligations : Names.identifier option -> unit diff --git a/contrib/subtac/subtac_pretyping.ml b/contrib/subtac/subtac_pretyping.ml index cce9a358..0e987cf2 100644 --- a/contrib/subtac/subtac_pretyping.ml +++ b/contrib/subtac/subtac_pretyping.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: subtac_pretyping.ml 9976 2007-07-12 11:58:30Z msozeau $ *) +(* $Id: subtac_pretyping.ml 11047 2008-06-03 23:08:00Z msozeau $ *) open Global open Pp @@ -70,7 +70,12 @@ let merge_evms x y = let interp env isevars c tycon = let j = pretype tycon env isevars ([],[]) c in - let evm = evars_of !isevars in + let _ = isevars := Evarutil.nf_evar_defs !isevars in + let evd,_ = consider_remaining_unif_problems env !isevars in +(* let unevd = undefined_evars evd in *) + let unevd' = Typeclasses.resolve_typeclasses ~onlyargs:true ~fail:false env evd in + let evm = evars_of unevd' in + isevars := unevd'; nf_evar evm j.uj_val, nf_evar evm j.uj_type let find_with_index x l = @@ -98,7 +103,7 @@ let env_with_binders env isevars l = let coqdef, deftyp = interp env isevars rawdef empty_tycon in let reldecl = (name, Some coqdef, deftyp) in aux (push_rel reldecl env, reldecl :: rels) tl - | Topconstr.LocalRawAssum (bl, typ) :: tl -> + | Topconstr.LocalRawAssum (bl, k, typ) :: tl -> let rawtyp = coqintern_type !isevars env typ in let coqtyp, typtyp = interp env isevars rawtyp empty_tycon in let acc = @@ -111,46 +116,28 @@ let env_with_binders env isevars l = | [] -> acc in aux (env, []) l -let subtac_process env isevars id l c tycon = - let c = Command.abstract_constr_expr c l in -(* let env_binders, binders_rel = env_with_binders env isevars l in *) +let subtac_process env isevars id bl c tycon = +(* let bl = Implicit_quantifiers.ctx_of_class_binders (vars_of_env env) cbl @ l in *) + let c = Command.abstract_constr_expr c bl in let tycon = match tycon with None -> empty_tycon | Some t -> - let t = Command.generalize_constr_expr t l in + let t = Command.generalize_constr_expr t bl in let t = coqintern_type !isevars env t in let coqt, ttyp = interp env isevars t empty_tycon in mk_tycon coqt in let c = coqintern_constr !isevars env c in + let imps = Implicit_quantifiers.implicits_of_rawterm c in let coqc, ctyp = interp env isevars c tycon in -(* let _ = try trace (str "Interpreted term: " ++ my_print_constr env coqc ++ spc () ++ *) -(* str "Coq type: " ++ my_print_constr env ctyp) *) -(* with _ -> () *) -(* in *) -(* let _ = try trace (str "Original evar map: " ++ Evd.pr_evar_map (evars_of !isevars)) with _ -> () in *) - -(* let fullcoqc = it_mkLambda_or_LetIn coqc binders_rel *) -(* and fullctyp = it_mkProd_or_LetIn ctyp binders_rel *) -(* in *) - let fullcoqc = Evarutil.nf_evar (evars_of !isevars) coqc in - let fullctyp = Evarutil.nf_evar (evars_of !isevars) ctyp in -(* let evm = evars_of_term (evars_of !isevars) Evd.empty fullctyp in *) -(* let evm = evars_of_term (evars_of !isevars) evm fullcoqc in *) -(* let _ = try trace (str "After evar normalization remain: " ++ spc () ++ *) -(* Evd.pr_evar_map evm) *) -(* with _ -> () *) -(* in *) let evm = non_instanciated_map env isevars (evars_of !isevars) in -(* let _ = try trace (str "Non instanciated evars map: " ++ Evd.pr_evar_map evm) with _ -> () in *) - evm, fullcoqc, fullctyp + evm, coqc, (match tycon with Some (None, c) -> c | _ -> ctyp), imps open Subtac_obligations -let subtac_proof env isevars id l c tycon = - let nc = named_context env in - let nc_len = named_context_length nc in - let evm, coqc, coqt = subtac_process env isevars id l c tycon in - let evars, def = Eterm.eterm_obligations id nc_len !isevars evm 0 coqc (Some coqt) in - add_definition id def coqt evars +let subtac_proof kind env isevars id bl c tycon = + let evm, coqc, coqt, imps = subtac_process env isevars id bl c tycon in + let evm = Subtac_utils.evars_of_term evm Evd.empty coqc in + let evars, def, ty = Eterm.eterm_obligations env id !isevars evm 0 coqc coqt in + add_definition id def ty ~implicits:imps ~kind:kind evars diff --git a/contrib/subtac/subtac_pretyping.mli b/contrib/subtac/subtac_pretyping.mli index b62a8766..1d8eb250 100644 --- a/contrib/subtac/subtac_pretyping.mli +++ b/contrib/subtac/subtac_pretyping.mli @@ -5,11 +5,19 @@ open Sign open Evd open Global open Topconstr +open Implicit_quantifiers +open Impargs module Pretyping : Pretyping.S +val interp : + Environ.env -> + Evd.evar_defs ref -> + Rawterm.rawconstr -> + Evarutil.type_constraint -> Term.constr * Term.constr + val subtac_process : env -> evar_defs ref -> identifier -> local_binder list -> - constr_expr -> constr_expr option -> evar_map * constr * types + constr_expr -> constr_expr option -> evar_map * constr * types * manual_explicitation list -val subtac_proof : env -> evar_defs ref -> identifier -> local_binder list -> - constr_expr -> constr_expr option -> unit +val subtac_proof : Decl_kinds.definition_kind -> env -> evar_defs ref -> identifier -> local_binder list -> + constr_expr -> constr_expr option -> Subtac_obligations.progress diff --git a/contrib/subtac/subtac_pretyping_F.ml b/contrib/subtac/subtac_pretyping_F.ml index 53eec0b6..afa5817f 100644 --- a/contrib/subtac/subtac_pretyping_F.ml +++ b/contrib/subtac/subtac_pretyping_F.ml @@ -1,3 +1,4 @@ +(* -*- compile-command: "make -C ../.. bin/coqtop.byte" -*- *) (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* type_app (lift i) t) - (* Utilisé pour inférer le prédicat des Cases *) (* Semble exagérement fort *) (* Faudra préférer une unification entre les types de toutes les clauses *) @@ -113,7 +112,7 @@ module SubtacPretyping_F (Coercion : Coercion.S) = struct let id = strip_meta id in (* May happen in tactics defined by Grammar *) try let (n,typ) = lookup_rel_id id (rel_context env) in - { uj_val = mkRel n; uj_type = type_app (lift n) typ } + { uj_val = mkRel n; uj_type = lift n typ } with Not_found -> try List.assoc id lvar @@ -202,11 +201,11 @@ module SubtacPretyping_F (Coercion : Coercion.S) = struct | RRec (loc,fixkind,names,bl,lar,vdef) -> let rec type_bl env ctxt = function [] -> ctxt - | (na,None,ty)::bl -> + | (na,k,None,ty)::bl -> let ty' = pretype_type empty_valcon env isevars lvar ty in let dcl = (na,None,ty'.utj_val) in type_bl (push_rel dcl env) (add_rel_decl dcl ctxt) bl - | (na,Some bd,ty)::bl -> + | (na,k,Some bd,ty)::bl -> let ty' = pretype_type empty_valcon env isevars lvar ty in let bd' = pretype (mk_tycon ty'.utj_val) env isevars lvar ty in let dcl = (na,Some bd'.uj_val,ty'.utj_val) in @@ -223,43 +222,47 @@ module SubtacPretyping_F (Coercion : Coercion.S) = struct let names = Array.map (fun id -> Name id) names in (* Note: bodies are not used by push_rec_types, so [||] is safe *) let newenv = push_rec_types (names,ftys,[||]) env in + let fixi = match fixkind with RFix (vn, i) -> i | RCoFix i -> i in let vdefj = array_map2_i (fun i ctxt def -> - (* we lift nbfix times the type in tycon, because of - * the nbfix variables pushed to newenv *) - let (ctxt,ty) = - decompose_prod_n_assum (rel_context_length ctxt) - (lift nbfix ftys.(i)) in - let nenv = push_rel_context ctxt newenv in - let j = pretype (mk_tycon ty) nenv isevars lvar def in - { uj_val = it_mkLambda_or_LetIn j.uj_val ctxt; - uj_type = it_mkProd_or_LetIn j.uj_type ctxt }) + let fty = + let ty = ftys.(i) in + if i = fixi then ( + Option.iter (fun tycon -> + isevars := Coercion.inh_conv_coerces_to loc env !isevars ftys.(i) tycon) + tycon; + nf_isevar !isevars ty) + else ty + in + (* we lift nbfix times the type in tycon, because of + * the nbfix variables pushed to newenv *) + let (ctxt,ty) = + decompose_prod_n_assum (rel_context_length ctxt) + (lift nbfix fty) in + let nenv = push_rel_context ctxt newenv in + let j = pretype (mk_tycon ty) nenv isevars lvar def in + { uj_val = it_mkLambda_or_LetIn j.uj_val ctxt; + uj_type = it_mkProd_or_LetIn j.uj_type ctxt }) ctxtv vdef in evar_type_fixpoint loc env isevars names ftys vdefj; let fixj = match fixkind with | RFix (vn,i) -> - let guard_indexes = Array.mapi + (* First, let's find the guard indexes. *) + (* If recursive argument was not given by user, we try all args. + An earlier approach was to look only for inductive arguments, + but doing it properly involves delta-reduction, and it finally + doesn't seem worth the effort (except for huge mutual + fixpoints ?) *) + let possible_indexes = Array.to_list (Array.mapi (fun i (n,_) -> match n with - | Some n -> n - | None -> - (* Recursive argument was not given by the user : We - check that there is only one inductive argument *) - let ctx = ctxtv.(i) in - let isIndApp t = - isInd (fst (decompose_app (strip_head_cast t))) in - (* This could be more precise (e.g. do some delta) *) - let lb = List.rev_map (fun (_,_,t) -> isIndApp t) ctx in - try (list_unique_index true lb) - 1 - with Not_found -> - Util.user_err_loc - (loc,"pretype", - Pp.str "cannot guess decreasing argument of fix")) - vn - in - let fix = ((guard_indexes, i),(names,ftys,Array.map j_val vdefj)) in - (try check_fix env fix with e -> Stdpp.raise_with_loc loc e); - make_judge (mkFix fix) ftys.(i) + | Some n -> [n] + | None -> list_map_i (fun i _ -> i) 0 ctxtv.(i)) + vn) + in + let fixdecls = (names,ftys,Array.map j_val vdefj) in + let indexes = search_guard loc env possible_indexes fixdecls in + make_judge (mkFix ((indexes,i),fixdecls)) ftys.(i) | RCoFix i -> let cofix = (i,(names,ftys,Array.map j_val vdefj)) in (try check_cofix env cofix with e -> Stdpp.raise_with_loc loc e); @@ -292,7 +295,7 @@ module SubtacPretyping_F (Coercion : Coercion.S) = struct let value, typ = applist (j_val resj, [j_val hj]), subst1 hj.uj_val c2 in let typ' = nf_isevar !isevars typ in let tycon = - option_map + Option.map (fun (abs, ty) -> match abs with None -> @@ -308,7 +311,7 @@ module SubtacPretyping_F (Coercion : Coercion.S) = struct apply_rec env (n+1) { uj_val = nf_isevar !isevars value; uj_type = nf_isevar !isevars typ' } - (option_map (fun (abs, c) -> abs, nf_isevar !isevars c) tycon) rest + (Option.map (fun (abs, c) -> abs, nf_isevar !isevars c) tycon) rest | _ -> let hj = pretype empty_tycon env isevars lvar c in @@ -316,7 +319,7 @@ module SubtacPretyping_F (Coercion : Coercion.S) = struct (join_loc floc argloc) env (evars_of !isevars) resj [hj] in - let ftycon = option_map (lift_abstr_tycon_type (-1)) ftycon in + let ftycon = Option.map (lift_abstr_tycon_type (-1)) ftycon in let resj = j_nf_evar (evars_of !isevars) (apply_rec env 1 fj ftycon args) in let resj = match kind_of_term resj.uj_val with @@ -328,7 +331,7 @@ module SubtacPretyping_F (Coercion : Coercion.S) = struct | _ -> resj in inh_conv_coerce_to_tycon loc env isevars resj tycon - | RLambda(loc,name,c1,c2) -> + | RLambda(loc,name,k,c1,c2) -> let (name',dom,rng) = evd_comb1 (split_tycon loc env) isevars tycon in let dom_valcon = valcon_of_tycon dom in let j = pretype_type dom_valcon env isevars lvar c1 in @@ -336,7 +339,7 @@ module SubtacPretyping_F (Coercion : Coercion.S) = struct let j' = pretype rng (push_rel var env) isevars lvar c2 in judge_of_abstraction env name j j' - | RProd(loc,name,c1,c2) -> + | RProd(loc,name,k,c1,c2) -> let j = pretype_type empty_valcon env isevars lvar c1 in let var = (name,j.utj_val) in let env' = push_rel_assum var env in @@ -397,7 +400,7 @@ module SubtacPretyping_F (Coercion : Coercion.S) = struct let f = it_mkLambda_or_LetIn fj.uj_val fsign in let v = let mis,_ = dest_ind_family indf in - let ci = make_default_case_info env LetStyle mis in + let ci = make_case_info env mis LetStyle in mkCase (ci, p, cj.uj_val,[|f|]) in { uj_val = v; uj_type = substl (realargs@[cj.uj_val]) ccl } @@ -415,7 +418,7 @@ module SubtacPretyping_F (Coercion : Coercion.S) = struct let p = it_mkLambda_or_LetIn (lift (nar+1) ccl) psign in let v = let mis,_ = dest_ind_family indf in - let ci = make_default_case_info env LetStyle mis in + let ci = make_case_info env mis LetStyle in mkCase (ci, p, cj.uj_val,[|f|] ) in { uj_val = v; uj_type = ccl }) @@ -485,14 +488,14 @@ module SubtacPretyping_F (Coercion : Coercion.S) = struct let b2 = f cstrs.(1) b2 in let v = let mis,_ = dest_ind_family indf in - let ci = make_default_case_info env IfStyle mis in + let ci = make_case_info env mis IfStyle in mkCase (ci, pred, cj.uj_val, [|b1;b2|]) in { uj_val = v; uj_type = p } - | RCases (loc,po,tml,eqns) -> - Cases.compile_cases loc - ((fun vtyc env -> pretype vtyc env isevars lvar),isevars) + | RCases (loc,sty,po,tml,eqns) -> + Cases.compile_cases loc sty + ((fun vtyc env isevars -> pretype vtyc env isevars lvar),isevars) tycon env (* loc *) (po,tml,eqns) | RCast(loc,c,k) -> @@ -552,15 +555,22 @@ module SubtacPretyping_F (Coercion : Coercion.S) = struct error_unexpected_type_loc (loc_of_rawconstr c) env (evars_of !isevars) tj.utj_val v - let pretype_gen isevars env lvar kind c = + let pretype_gen_aux isevars env lvar kind c = let c' = match kind with | OfType exptyp -> let tycon = match exptyp with None -> empty_tycon | Some t -> mk_tycon t in (pretype tycon env isevars lvar c).uj_val | IsType -> (pretype_type empty_valcon env isevars lvar c).utj_val in + let evd,_ = consider_remaining_unif_problems env !isevars in + isevars:=evd; nf_evar (evars_of !isevars) c' + let pretype_gen isevars env lvar kind c = + let c = pretype_gen_aux isevars env lvar kind c in + isevars := Typeclasses.resolve_typeclasses ~onlyargs:true ~fail:false env !isevars; + nf_evar (evars_of !isevars) c + (* TODO: comment faire remonter l'information si le typage a resolu des variables du sigma original. il faudrait que la fonction de typage retourne aussi le nouveau sigma... @@ -587,11 +597,10 @@ module SubtacPretyping_F (Coercion : Coercion.S) = struct let ise_pretype_gen fail_evar sigma env lvar kind c = let isevars = ref (Evd.create_evar_defs sigma) in let c = pretype_gen isevars env lvar kind c in - let isevars,_ = consider_remaining_unif_problems env !isevars in - let c = nf_evar (evars_of isevars) c in - if fail_evar then check_evars env sigma isevars c; - isevars, c - + let evd = !isevars in + if fail_evar then check_evars env Evd.empty evd c; + evd, c + (** Entry points of the high-level type synthesis algorithm *) let understand_gen kind sigma env c = @@ -601,16 +610,23 @@ module SubtacPretyping_F (Coercion : Coercion.S) = struct snd (ise_pretype_gen true sigma env ([],[]) (OfType exptyp) c) let understand_type sigma env c = - snd (ise_pretype_gen true sigma env ([],[]) IsType c) + snd (ise_pretype_gen false sigma env ([],[]) IsType c) let understand_ltac sigma env lvar kind c = ise_pretype_gen false sigma env lvar kind c - let understand_tcc_evars isevars env kind c = - pretype_gen isevars env ([],[]) kind c - - let understand_tcc sigma env ?expected_type:exptyp c = - let ev, t = ise_pretype_gen false sigma env ([],[]) (OfType exptyp) c in + let understand_tcc_evars evdref env kind c = + pretype_gen evdref env ([],[]) kind c + + let understand_tcc ?(resolve_classes=true) sigma env ?expected_type:exptyp c = + let ev, t = + if resolve_classes then + ise_pretype_gen false sigma env ([],[]) (OfType exptyp) c + else + let isevars = ref (Evd.create_evar_defs sigma) in + let c = pretype_gen_aux isevars env ([],[]) (OfType exptyp) c in + !isevars, c + in Evd.evars_of ev, t end diff --git a/contrib/subtac/subtac_utils.ml b/contrib/subtac/subtac_utils.ml index 28fe6352..bae2731a 100644 --- a/contrib/subtac/subtac_utils.ml +++ b/contrib/subtac/subtac_utils.ml @@ -10,10 +10,10 @@ let ($) f x = f x (****************************************************************************) (* Library linking *) -let contrib_name = "subtac" +let contrib_name = "Program" let subtac_dir = [contrib_name] -let fix_sub_module = "FixSub" +let fix_sub_module = "Wf" let utils_module = "Utils" let fixsub_module = subtac_dir @ [fix_sub_module] let utils_module = subtac_dir @ [utils_module] @@ -28,8 +28,8 @@ let make_ref l s = lazy (init_reference l s) let well_founded_ref = make_ref ["Init";"Wf"] "Well_founded" let acc_ref = make_ref ["Init";"Wf"] "Acc" let acc_inv_ref = make_ref ["Init";"Wf"] "Acc_inv" -let fix_sub_ref = make_ref ["subtac";"FixSub"] "Fix_sub" -let fix_measure_sub_ref = make_ref ["subtac";"FixSub"] "Fix_measure_sub" +let fix_sub_ref = make_ref fixsub_module "Fix_sub" +let fix_measure_sub_ref = make_ref fixsub_module "Fix_measure_sub" let lt_ref = make_ref ["Init";"Peano"] "lt" let lt_wf_ref = make_ref ["Wf_nat"] "lt_wf" let refl_ref = make_ref ["Init";"Logic"] "refl_equal" @@ -64,9 +64,15 @@ let eqdep_rec = lazy (init_constant ["Logic";"Eqdep"] "eq_dep_rec") let eqdep_ind_ref = lazy (init_reference [ "Logic";"Eqdep"] "eq_dep") let eqdep_intro_ref = lazy (init_reference [ "Logic";"Eqdep"] "eq_dep_intro") -let jmeq_ind = lazy (init_constant ["Logic";"JMeq"] "JMeq") -let jmeq_rec = lazy (init_constant ["Logic";"JMeq"] "JMeq_rec") -let jmeq_refl = lazy (init_constant ["Logic";"JMeq"] "JMeq_refl") +let jmeq_ind = + lazy (check_required_library ["Coq";"Logic";"JMeq"]; + init_constant ["Logic";"JMeq"] "JMeq") +let jmeq_rec = + lazy (check_required_library ["Coq";"Logic";"JMeq"]; + init_constant ["Logic";"JMeq"] "JMeq_rec") +let jmeq_refl = + lazy (check_required_library ["Coq";"Logic";"JMeq"]; + init_constant ["Logic";"JMeq"] "JMeq_refl") let ex_ind = lazy (init_constant ["Init"; "Logic"] "ex") let ex_intro = lazy (init_reference ["Init"; "Logic"] "ex_intro") @@ -113,20 +119,20 @@ let debug_on = true let debug n s = if debug_on then - if !Options.debug && n >= debug_level then + if !Flags.debug && n >= debug_level then msgnl s else () else () let debug_msg n s = if debug_on then - if !Options.debug && n >= debug_level then s + if !Flags.debug && n >= debug_level then s else mt () else mt () let trace s = if debug_on then - if !Options.debug && debug_level > 0 then msgnl s + if !Flags.debug && debug_level > 0 then msgnl s else () else () @@ -163,7 +169,7 @@ let make_existential loc ?(opaque = true) env isevars c = let make_existential_expr loc env c = let key = Evarutil.new_untyped_evar () in - let evar = Topconstr.CEvar (loc, key) in + let evar = Topconstr.CEvar (loc, key, None) in debug 2 (str "Constructed evar " ++ int key); evar @@ -174,6 +180,8 @@ let string_of_hole_kind = function | CasesType -> "CasesType" | InternalHole -> "InternalHole" | TomatchTypeParameter _ -> "TomatchTypeParameter" + | GoalEvar -> "GoalEvar" + | ImpossibleCase -> "ImpossibleCase" let evars_of_term evc init c = let rec evrec acc c = @@ -194,7 +202,7 @@ let non_instanciated_map env evd evm = QuestionMark _ -> Evd.add evm key evi | _ -> debug 2 (str " and is an implicit"); - Pretype_errors.error_unsolvable_implicit loc env evm k) + Pretype_errors.error_unsolvable_implicit loc env evm (Evarutil.nf_evar_info evm evi) k None) Evd.empty (Evarutil.non_instantiated evm) let global_kind = Decl_kinds.IsDefinition Decl_kinds.Definition @@ -231,8 +239,8 @@ let build_dependent_sum l = (tclTHENS tac ([intros; (tclTHENSEQ - [constructor_tac (Some 1) 1 - (Rawterm.ImplicitBindings [mkVar n]); + [constructor_tac false (Some 1) 1 + (Rawterm.ImplicitBindings [inj_open (mkVar n)]); cont]); ]))) in @@ -342,29 +350,44 @@ let id_of_name = function | Anonymous -> raise (Invalid_argument "id_of_name") let definition_message id = - Options.if_verbose message ((string_of_id id) ^ " is defined") - + Nameops.pr_id id ++ str " is defined" + let recursive_message v = match Array.length v with | 0 -> error "no recursive definition" - | 1 -> (Printer.pr_global v.(0) ++ str " is recursively defined") - | _ -> hov 0 (prvect_with_sep pr_coma Printer.pr_global v ++ + | 1 -> (Printer.pr_constant (Global.env ()) v.(0) ++ str " is recursively defined") + | _ -> hov 0 (prvect_with_sep pr_coma (Printer.pr_constant (Global.env ())) v ++ spc () ++ str "are recursively defined") +let print_message m = + Flags.if_verbose ppnl m + (* Solve an obligation using tactics, return the corresponding proof term *) let solve_by_tac evi t = - debug 2 (str "Solving goal using tactics: " ++ Evd.pr_evar_info evi); let id = id_of_string "H" in - try + try Pfedit.start_proof id goal_kind evi.evar_hyps evi.evar_concl (fun _ _ -> ()); - debug 2 (str "Started proof"); Pfedit.by (tclCOMPLETE t); - let _,(const,_,_) = Pfedit.cook_proof () in + let _,(const,_,_) = Pfedit.cook_proof ignore in Pfedit.delete_current_proof (); const.Entries.const_entry_body - with e -> + with e -> Pfedit.delete_current_proof(); - raise Exit + raise e + +(* let apply_tac t goal = t goal *) + +(* let solve_by_tac evi t = *) +(* let ev = 1 in *) +(* let evm = Evd.add Evd.empty ev evi in *) +(* let goal = {it = evi; sigma = evm } in *) +(* let (res, valid) = apply_tac t goal in *) +(* if res.it = [] then *) +(* let prooftree = valid [] in *) +(* let proofterm, obls = Refiner.extract_open_proof res.sigma prooftree in *) +(* if obls = [] then proofterm *) +(* else raise Exit *) +(* else raise Exit *) let rec string_of_list sep f = function [] -> "" @@ -395,7 +418,7 @@ let pr_meta_map evd = | (mv,Clval(na,b,_)) -> hov 0 (pr_meta mv ++ pr_name na ++ str " := " ++ - print_constr b.rebus ++ fnl ()) + print_constr (fst b).rebus ++ fnl ()) in prlist pr_meta_binding ml @@ -440,11 +463,11 @@ let pr_evar_defs evd = str"METAS:"++brk(0,1)++pr_meta_map evd in v 0 (pp_evm ++ pp_met) -let subtac_utils_path = - make_dirpath (List.map id_of_string ["Utils";contrib_name;"Coq"]) -let utils_tac s = - lazy(make_kn (MPfile subtac_utils_path) (make_dirpath []) (mk_label s)) +let contrib_tactics_path = + make_dirpath (List.map id_of_string ["Tactics";contrib_name;"Coq"]) +let tactics_tac s = + lazy(make_kn (MPfile contrib_tactics_path) (make_dirpath []) (mk_label s)) -let utils_call tac args = - TacArg(TacCall(dummy_loc, ArgArg(dummy_loc, Lazy.force (utils_tac tac)),args)) +let tactics_call tac args = + TacArg(TacCall(dummy_loc, ArgArg(dummy_loc, Lazy.force (tactics_tac tac)),args)) diff --git a/contrib/subtac/subtac_utils.mli b/contrib/subtac/subtac_utils.mli index 5a5dd427..49335211 100644 --- a/contrib/subtac/subtac_utils.mli +++ b/contrib/subtac/subtac_utils.mli @@ -89,11 +89,11 @@ val string_of_hole_kind : hole_kind -> string val evars_of_term : evar_map -> evar_map -> constr -> evar_map val non_instanciated_map : env -> evar_defs ref -> evar_map -> evar_map val global_kind : logical_kind -val goal_kind : locality_flag * goal_object_kind +val goal_kind : locality * goal_object_kind val global_proof_kind : logical_kind -val goal_proof_kind : locality_flag * goal_object_kind +val goal_proof_kind : locality * goal_object_kind val global_fix_kind : logical_kind -val goal_fix_kind : locality_flag * goal_object_kind +val goal_fix_kind : locality * goal_object_kind val mkSubset : name -> constr -> constr -> constr val mkProj1 : constr -> constr -> constr -> constr @@ -115,8 +115,10 @@ val destruct_ex : constr -> constr -> constr list val id_of_name : name -> identifier -val definition_message : identifier -> unit -val recursive_message : global_reference array -> std_ppcmds +val definition_message : identifier -> std_ppcmds +val recursive_message : constant array -> std_ppcmds + +val print_message : std_ppcmds -> unit val solve_by_tac : evar_info -> Tacmach.tactic -> constr @@ -125,6 +127,6 @@ val string_of_intset : Intset.t -> string val pr_evar_defs : evar_defs -> Pp.std_ppcmds -val utils_call : string -> Tacexpr.glob_tactic_arg list -> Tacexpr.glob_tactic_expr +val tactics_call : string -> Tacexpr.glob_tactic_arg list -> Tacexpr.glob_tactic_expr val pp_list : ('a -> Pp.std_ppcmds) -> 'a list -> Pp.std_ppcmds diff --git a/contrib/subtac/test/ListDep.v b/contrib/subtac/test/ListDep.v index 97cef9a5..da612c43 100644 --- a/contrib/subtac/test/ListDep.v +++ b/contrib/subtac/test/ListDep.v @@ -1,6 +1,6 @@ (* -*- coq-prog-args: ("-emacs-U" "-debug") -*- *) Require Import List. -Require Import Coq.subtac.Utils. +Require Import Coq.Program.Program. Set Implicit Arguments. @@ -23,13 +23,13 @@ Section Map_DependentRecursor. Variable f : { x : U | In x l } -> V. Obligations Tactic := unfold sub_list in * ; - subtac_simpl ; intuition. + program_simpl ; intuition. Program Fixpoint map_rec ( l' : list U | sub_list l' l ) { measure length l' } : { r : list V | length r = length l' } := match l' with - nil => nil - | cons x tl => let tl' := map_rec tl in + | nil => nil + | cons x tl => let tl' := map_rec tl in f x :: tl' end. diff --git a/contrib/subtac/test/Mutind.v b/contrib/subtac/test/Mutind.v index 0b40ef82..ac49ca96 100644 --- a/contrib/subtac/test/Mutind.v +++ b/contrib/subtac/test/Mutind.v @@ -1,13 +1,20 @@ -Program Fixpoint f (a : nat) : nat := +Require Import List. + +Program Fixpoint f a : { x : nat | x > 0 } := match a with - | 0 => 0 + | 0 => 1 | S a' => g a a' end -with g (a b : nat) { struct b } : nat := +with g a b : { x : nat | x > 0 } := match b with - | 0 => 0 + | 0 => 1 | S b' => f b' end. Check f. -Check g. \ No newline at end of file +Check g. + + + + + diff --git a/contrib/subtac/test/euclid.v b/contrib/subtac/test/euclid.v index a5a8b85f..501aa798 100644 --- a/contrib/subtac/test/euclid.v +++ b/contrib/subtac/test/euclid.v @@ -1,20 +1,17 @@ -Require Import Coq.subtac.Utils. +Require Import Coq.Program.Program. Require Import Coq.Arith.Compare_dec. Notation "( x & y )" := (existS _ x y) : core_scope. +Require Import Omega. + Program Fixpoint euclid (a : nat) (b : { b : nat | b <> O }) {wf lt a} : { q : nat & { r : nat | a = b * q + r /\ r < b } } := if le_lt_dec b a then let (q', r) := euclid (a - b) b in (S q' & r) else (O & a). -Require Import Omega. - -Obligations. -Solve Obligations using subtac_simpl ; omega. - Next Obligation. - assert(x0 * S q' = x0 * q' + x0) by auto with arith ; omega. + assert(b * S q' = b * q' + b) by auto with arith ; omega. Defined. Program Definition test_euclid : (prod nat nat) := let (q, r) := euclid 4 2 in (q, q). diff --git a/contrib/subtac/test/measure.v b/contrib/subtac/test/measure.v index 4764037d..4f938f4f 100644 --- a/contrib/subtac/test/measure.v +++ b/contrib/subtac/test/measure.v @@ -2,7 +2,7 @@ Notation "( x & y )" := (@existS _ _ x y) : core_scope. Unset Printing All. Require Import Coq.Arith.Compare_dec. -Require Import Coq.subtac.Utils. +Require Import Coq.Program.Program. Fixpoint size (a : nat) : nat := match a with @@ -10,15 +10,11 @@ Fixpoint size (a : nat) : nat := | S n => S (size n) end. -Program Fixpoint test_measure (a : nat) {measure a size} : nat := +Program Fixpoint test_measure (a : nat) {measure size a} : nat := match a with | S (S n) => S (test_measure n) - | x => x + | 0 | S 0 => a end. -subst. -unfold n0. -auto with arith. -Qed. Check test_measure. Print test_measure. \ No newline at end of file diff --git a/contrib/subtac/test/take.v b/contrib/subtac/test/take.v new file mode 100644 index 00000000..87ab47d6 --- /dev/null +++ b/contrib/subtac/test/take.v @@ -0,0 +1,38 @@ +(* -*- coq-prog-args: ("-emacs-U" "-debug") -*- *) +Require Import JMeq. +Require Import List. +Require Import Coq.subtac.Utils. + +Set Implicit Arguments. + +Program Fixpoint take (A : Set) (l : list A) (n : nat | n <= length l) { struct l } : { l' : list A | length l' = n } := + match n with + | 0 => nil + | S p => + match l with + | cons hd tl => let rest := take tl p in cons hd rest + | nil => ! + end + end. + +Require Import Omega. + +Next Obligation. + intros. + simpl in l0. + apply le_S_n ; exact l0. +Defined. + +Next Obligation. + intros. + destruct_call take ; subtac_simpl. +Defined. + +Next Obligation. + intros. + inversion l0. +Defined. + + + + diff --git a/contrib/xml/cic2acic.ml b/contrib/xml/cic2acic.ml index 8a5967a2..1a6cb9c8 100644 --- a/contrib/xml/cic2acic.ml +++ b/contrib/xml/cic2acic.ml @@ -55,18 +55,8 @@ let remove_module_dirpath_from_dirpath ~basedir dir = let get_uri_of_var v pvars = - let module D = Declare in + let module D = Decls in let module N = Names in - let rec search_in_pvars names = - function - [] -> None - | ((name,l)::tl) -> - let names' = name::names in - if List.mem v l then - Some names' - else - search_in_pvars names' tl - in let rec search_in_open_sections = function [] -> Util.error ("Variable "^v^" not found") @@ -78,9 +68,10 @@ let get_uri_of_var v pvars = search_in_open_sections tl in let path = - match search_in_pvars [] pvars with - None -> search_in_open_sections (N.repr_dirpath (Lib.cwd ())) - | Some path -> path + if List.mem v pvars then + [] + else + search_in_open_sections (N.repr_dirpath (Lib.cwd ())) in "cic:" ^ List.fold_left @@ -241,16 +232,15 @@ let typeur sigma metamap = | T.Var id -> (try let (_,_,ty) = Environ.lookup_named id env in - T.body_of_type ty + ty with Not_found -> Util.anomaly ("type_of: variable "^(Names.string_of_id id)^" unbound")) | T.Const c -> let cb = Environ.lookup_constant c env in Typeops.type_of_constant_type env (cb.Declarations.const_type) | T.Evar ev -> Evd.existential_type sigma ev - | T.Ind ind -> T.body_of_type (Inductiveops.type_of_inductive env ind) - | T.Construct cstr -> - T.body_of_type (Inductiveops.type_of_constructor env cstr) + | T.Ind ind -> Inductiveops.type_of_inductive env ind + | T.Construct cstr -> Inductiveops.type_of_constructor env cstr | T.Case (_,p,c,lf) -> let Inductiveops.IndType(_,realargs) = try Inductiveops.find_rectype env sigma (type_of env c) @@ -273,7 +263,7 @@ let typeur sigma metamap = match sort_of env cstr with Coq_sort T.InProp -> T.mkProp | Coq_sort T.InSet -> T.mkSet - | Coq_sort T.InType -> T.mkType Univ.prop_univ (* ERROR HERE *) + | Coq_sort T.InType -> T.mkType Univ.type1_univ (* ERROR HERE *) | CProp -> T.mkConst DoubleTypeInference.cprop and sort_of env t = diff --git a/contrib/xml/doubleTypeInference.ml b/contrib/xml/doubleTypeInference.ml index cce78891..de8c540c 100644 --- a/contrib/xml/doubleTypeInference.ml +++ b/contrib/xml/doubleTypeInference.ml @@ -51,7 +51,7 @@ let type_judgment env sigma j = ;; let type_judgment_cprop env sigma j = - match Term.kind_of_term(whd_betadeltaiotacprop env sigma (Term.body_of_type j.Environ.uj_type)) with + match Term.kind_of_term(whd_betadeltaiotacprop env sigma j.Environ.uj_type) with | Term.Sort s -> Some {Environ.utj_val = j.Environ.uj_val; Environ.utj_type = s } | _ -> None (* None means the CProp constant *) ;; diff --git a/contrib/xml/dumptree.ml4 b/contrib/xml/dumptree.ml4 new file mode 100644 index 00000000..407f86b3 --- /dev/null +++ b/contrib/xml/dumptree.ml4 @@ -0,0 +1,152 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* + try + if Sign.lookup_named id osign = (id,c,ty) then sign + else raise Different + with Not_found | Different -> Environ.push_named_context_val d sign) + sign ~init:Environ.empty_named_context_val +;; + +let pr_tactic_xml = function + | TacArg (Tacexp t) -> str "" + | t -> str "" +;; + +let pr_proof_instr_xml instr = + Ppdecl_proof.pr_proof_instr (Global.env()) instr +;; + +let pr_rule_xml pr = function + | Prim r -> str "" + | Nested(cmpd, subtree) -> + hov 2 (str "" ++ fnl () ++ + begin match cmpd with + Tactic (texp, _) -> pr_tactic_xml texp + | Proof_instr (_,instr) -> pr_proof_instr_xml instr + end ++ fnl () + ++ pr subtree + ) ++ fnl () ++ str "" + | Daimon -> str "" + | Decl_proof _ -> str "" +(* | Change_evars -> str ""*) +;; + +let pr_var_decl_xml env (id,c,typ) = + let ptyp = print_constr_env env typ in + match c with + | None -> + (str "") + | Some c -> + (* Force evaluation *) + let pb = print_constr_env env c in + (str "") +;; + +let pr_rel_decl_xml env (na,c,typ) = + let pbody = match c with + | None -> mt () + | Some c -> + (* Force evaluation *) + let pb = print_constr_env env c in + (str" body=\"" ++ xmlstream pb ++ str "\"") in + let ptyp = print_constr_env env typ in + let pid = + match na with + | Anonymous -> mt () + | Name id -> str " id=\"" ++ pr_id id ++ str "\"" + in + (str "") +;; + +let pr_context_xml env = + let sign_env = + fold_named_context + (fun env d pp -> pp ++ pr_var_decl_xml env d) + env ~init:(mt ()) + in + let db_env = + fold_rel_context + (fun env d pp -> pp ++ pr_rel_decl_xml env d) + env ~init:(mt ()) + in + (sign_env ++ db_env) +;; + +let pr_subgoal_metas_xml metas env= + let pr_one (meta, typ) = + fnl () ++ str "" + in + List.fold_left (++) (mt ()) (List.map pr_one metas) +;; + +let pr_goal_xml g = + let env = try evar_env g with _ -> empty_env in + if g.evar_extra = None then + (hov 2 (str "" ++ fnl () ++ str "" ++ + (pr_context_xml env)) ++ + fnl () ++ str "") + else + (hov 2 (str "" ++ + (pr_context_xml env)) ++ + fnl () ++ str "") +;; + +let rec print_proof_xml sigma osign pf = + let hyps = Environ.named_context_of_val pf.goal.evar_hyps in + let hyps' = thin_sign osign hyps in + match pf.ref with + | None -> hov 2 (str "" ++ fnl () ++ (pr_goal_xml {pf.goal with evar_hyps=hyps'})) ++ fnl () ++ str "" + | Some(r,spfl) -> + hov 2 (str "" ++ fnl () ++ + (pr_goal_xml {pf.goal with evar_hyps=hyps'}) ++ fnl () ++ (pr_rule_xml (print_proof_xml sigma osign) r) ++ + (List.fold_left (fun x y -> x ++ fnl () ++ y) (mt ()) (List.map (print_proof_xml sigma hyps) spfl))) ++ fnl () ++ str "" +;; + +let print_proof_xml () = + let pp = print_proof_xml Evd.empty Sign.empty_named_context + (Tacmach.proof_of_pftreestate (Refiner.top_of_tree (Pfedit.get_pftreestate ()))) + in + msgnl pp +;; + +VERNAC COMMAND EXTEND DumpTree + [ "Dump" "Tree" ] -> [ print_proof_xml () ] +END diff --git a/contrib/xml/xmlcommand.ml b/contrib/xml/xmlcommand.ml index 01271323..3c4b01f5 100644 --- a/contrib/xml/xmlcommand.ml +++ b/contrib/xml/xmlcommand.ml @@ -73,11 +73,7 @@ let could_have_namesakes o sp = (* namesake = omonimo in italian *) let tag = Libobject.object_tag o in print_if_verbose ("Object tag: " ^ tag ^ "\n") ; match tag with - "CONSTANT" -> - (match D.constant_strength sp with - | DK.Local -> false (* a local definition *) - | DK.Global -> true (* a non-local one *) - ) + "CONSTANT" -> true (* constants/parameters are non global *) | "INDUCTIVE" -> true (* mutual inductive types are never local *) | "VARIABLE" -> false (* variables are local, so no namesakes *) | _ -> false (* uninteresting thing that won't be printed*) @@ -89,8 +85,7 @@ let could_have_namesakes o sp = (* namesake = omonimo in italian *) (* OF VARIABLES DECLARED IN THE i-th SUPER-SECTION OF THE CURRENT *) (* SECTION, WHOSE PATH IS namei *) -let pvars = - ref ([Names.id_of_string "",[]] : (Names.identifier * string list) list);; +let pvars = ref ([] : string list);; let cumenv = ref Environ.empty_env;; (* filter_params pvars hyps *) @@ -138,9 +133,7 @@ let add_to_pvars x = E.push_named (Names.id_of_string v, None, typ) !cumenv ; v in - match !pvars with - [] -> assert false - | ((name,l)::tl) -> pvars := (name,v::l)::tl + pvars := v::!pvars ;; (* The computation is very inefficient, but we can't do anything *) @@ -157,7 +150,7 @@ let search_variables () = | he::tl as modules -> let one_section_variables = let dirpath = N.make_dirpath (modules @ N.repr_dirpath modulepath) in - let t = List.map N.string_of_id (Declare.last_section_hyps dirpath) in + let t = List.map N.string_of_id (Decls.last_section_hyps dirpath) in [he,t] in one_section_variables @ aux tl @@ -329,14 +322,13 @@ let mk_variable_obj id body typ = let variables = search_variables () in let params = filter_params variables hyps'' in Acic.Variable - (Names.string_of_id id, unsharedbody, - (Unshare.unshare (Term.body_of_type typ)), params) + (Names.string_of_id id, unsharedbody, Unshare.unshare typ, params) ;; (* Unsharing is not performed on the body, that must be already unshared. *) (* The evar map and the type, instead, are unshared by this function. *) let mk_current_proof_obj is_a_variable id bo ty evar_map env = - let unshared_ty = Unshare.unshare (Term.body_of_type ty) in + let unshared_ty = Unshare.unshare ty in let metasenv = List.map (function @@ -384,7 +376,7 @@ let mk_current_proof_obj is_a_variable id bo ty evar_map env = let mk_constant_obj id bo ty variables hyps = let hyps = string_list_of_named_context_list hyps in - let ty = Unshare.unshare (Term.body_of_type ty) in + let ty = Unshare.unshare ty in let params = filter_params variables hyps in match bo with None -> @@ -413,7 +405,7 @@ let mk_inductive_obj sp mib packs variables nparams hyps finite = let cons = (Array.fold_right (fun (name,lc) i -> (name,lc)::i) (Array.mapi - (fun j x ->(x,Unshare.unshare (Term.body_of_type lc.(j)))) consnames) + (fun j x ->(x,Unshare.unshare lc.(j))) consnames) [] ) in @@ -447,7 +439,7 @@ let kind_of_inductive isrecord kn = let kind_of_variable id = let module DK = Decl_kinds in - match Declare.variable_kind id with + match Decls.variable_kind id with | DK.IsAssumption DK.Definitional -> "VARIABLE","Assumption" | DK.IsAssumption DK.Logical -> "VARIABLE","Hypothesis" | DK.IsAssumption DK.Conjectural -> "VARIABLE","Conjecture" @@ -458,7 +450,7 @@ let kind_of_variable id = let kind_of_constant kn = let module DK = Decl_kinds in - match Declare.constant_kind (Nametab.sp_of_global(Libnames.ConstRef kn)) with + match Decls.constant_kind kn with | DK.IsAssumption DK.Definitional -> "AXIOM","Declaration" | DK.IsAssumption DK.Logical -> "AXIOM","Axiom" | DK.IsAssumption DK.Conjectural -> @@ -492,6 +484,12 @@ let kind_of_constant kn = | DK.IsDefinition DK.IdentityCoercion -> Pp.warning "IdentityCoercion not supported in dtd (used Definition instead)"; "DEFINITION","Definition" + | DK.IsDefinition DK.Instance -> + Pp.warning "Instance not supported in dtd (used Definition instead)"; + "DEFINITION","Definition" + | DK.IsDefinition DK.Method -> + Pp.warning "Method not supported in dtd (used Definition instead)"; + "DEFINITION","Definition" | DK.IsProof (DK.Theorem|DK.Lemma|DK.Corollary|DK.Fact|DK.Remark as thm) -> "THEOREM",DK.string_of_theorem_kind thm | DK.IsProof _ -> @@ -541,11 +539,10 @@ let print internal glob_ref kind xml_library_root = let tag,obj = match glob_ref with Ln.VarRef id -> - let sp = Declare.find_section_variable id in (* this kn is fake since it is not provided by Coq *) let kn = let (mod_path,dir_path) = Lib.current_prefix () in - N.make_kn mod_path dir_path (N.label_of_id (Ln.basename sp)) + N.make_kn mod_path dir_path (N.label_of_id id) in let (_,body,typ) = G.lookup_named id in Cic2acic.Variable kn,mk_variable_obj id body typ @@ -692,11 +689,11 @@ let _ = Buffer.output_buffer ch theory_buffer ; close_out ch end ; - Util.option_iter + Option.iter (fun fn -> let coqdoc = Coq_config.bindir^"/coqdoc" in let options = " --html -s --body-only --no-index --latin1 --raw-comments" in - let dir = Util.out_some xml_library_root in + let dir = Option.get xml_library_root in let command cmd = if Sys.command cmd <> 0 then Util.anomaly ("Error executing \"" ^ cmd ^ "\"") diff --git a/dev/base_include b/dev/base_include index b7fa38ea..398f60d2 100644 --- a/dev/base_include +++ b/dev/base_include @@ -19,6 +19,7 @@ #install_printer (* identifier *) ppid;; #install_printer (* identifier *) ppidset;; +#install_printer (* Intset.t *) ppintset;; #install_printer (* label *) pplab;; #install_printer (* mod_self_id *) ppmsid;; #install_printer (* mod_bound_id *) ppmbid;; @@ -31,6 +32,9 @@ #install_printer (* constr *) print_pure_constr;; #install_printer (* patch *) ppripos;; #install_printer (* values *) ppvalues;; +#install_printer (* Idpred.t *) pp_idpred;; +#install_printer (* Cpred.t *) pp_cpred;; +#install_printer (* transparent_state *) pp_transparent_state;; #install_printer ppzipper;; #install_printer ppstack;; #install_printer ppatom;; @@ -38,6 +42,7 @@ #install_printer ppvblock;; #install_printer (* bigint *) ppbigint;; #install_printer (* loc *) pploc;; +#install_printer (* substitution *) prsubst;; (* Open main files *) @@ -63,12 +68,14 @@ open Pattern open Cbv open Classops open Pretyping +open Pretyping.Default +open Pretyping.Default.Cases open Cbv open Classops -open Pretyping open Clenv open Rawterm open Coercion +open Coercion.Default open Recordops open Detyping open Reductionops @@ -82,6 +89,7 @@ open Indrec open Typing open Inductiveops open Unification +open Matching open Constrextern open Constrintern @@ -167,7 +175,7 @@ open Declarations;; let constbody_of_string s = let b = Global.lookup_constant (Nametab.locate_constant (qualid_of_sp (path_of_string s))) in - Util.out_some b.const_body;; + Option.get b.const_body;; (* Get the current goal *) diff --git a/dev/db b/dev/db index 784e5bac..6221462a 100644 --- a/dev/db +++ b/dev/db @@ -3,6 +3,7 @@ load_printer "printers.cma" install_printer Top_printers.ppid install_printer Top_printers.ppidset +install_printer Top_printers.ppintset install_printer Top_printers.pplab install_printer Top_printers.ppmsid install_printer Top_printers.ppmbid @@ -20,6 +21,7 @@ install_printer Top_printers.pprawconstr install_printer Top_printers.ppconstr install_printer Top_printers.ppuni install_printer Top_printers.ppuniverses +install_printer Top_printers.ppconstraints install_printer Top_printers.pptype install_printer Top_printers.ppj install_printer Top_printers.ppenv @@ -27,6 +29,7 @@ install_printer Top_printers.ppenv install_printer Top_printers.ppgoal install_printer Top_printers.ppsigmagoal install_printer Top_printers.pproof +install_printer Top_printers.ppmetas install_printer Top_printers.ppevd install_printer Top_printers.ppevm install_printer Top_printers.ppclenv @@ -34,5 +37,6 @@ install_printer Top_printers.ppclenv install_printer Top_printers.pptac install_printer Top_printers.ppobj install_printer Top_printers.pploc +install_printer Top_printers.prsubst diff --git a/dev/doc/build-system.dev.txt b/dev/doc/build-system.dev.txt new file mode 100644 index 00000000..c825f088 --- /dev/null +++ b/dev/doc/build-system.dev.txt @@ -0,0 +1,70 @@ +Since July 2007, Coq features a build system overhauled by Pierre +Corbineau and Lionel Elie Mamane. + +This file documents internals of the implementation of the build +system. For what a Coq developer needs to know about the build system, +see build-system.txt . + +.ml4 files +---------- + +.ml files corresponding to .ml4 files are created to keep ocamldep +happy only. To ensure they are not used for compilation, they contain +invalid OCaml. + +multi-stage build +----------------- + +Le processus de construction est séparé en trois étapes qui correspondent +aux outils nécessaires pour calculer les dépendances de cette étape: + +stage1: ocamldep, sed , camlp4 sans fichiers de Coq +stage2: camlp4 avec grammar.cma et/ou q_constr.cmo +stage3: coqdep (.vo) + +Le Makefile a été séparé en plusieurs fichiers : + +- Makefile: coquille vide qui délègue les cibles à la bonne étape sauf + clean et les fichiers pour emacs (car ils sont en quelque sorte en + "stage0": aucun calcul de dépendance nécessaire). +- Makefile.common : définitions des variables (essentiellement des + listes de fichiers) +- Makefile.build : les règles de compilation sans inclure de + dépendances +- Makefile.stage* : fichiers qui incluent les dépendances calculables + à cette étape ainsi que Makefile.build. + +The build needs to be cut in stages because make will not take into +account one include when making another include. + +Parallélisation +--------------- + +Le découpage en étapes veut dire que le makefile est un petit peu +moins parallélisable que strictement possible en théorie: par exemple, +certaines choses faites en stage2 pourraient être faites en parallèle +avec des choses de stage1. Nous essayons de minimiser cet effet, mais +nous ne l'avons pas complètement éliminé parce que cela mènerait à un +makefile très complexe. La minimisation est principalement que si on +demande un objet spécifique (par exemple "make parsing/g_constr.cmx"), +il est fait dans l'étape la plus basse possible (simplement), mais si +un objet est fait comme dépendance de la cible demandée (par exemple +dans un "make world"), il est fait le plus tard possible (par exemple, +tout code OCaml non nécessaire pour coqdep ni grammar.cma ni +q_constr.cmo est compilé en stage3 lors d'un "make world"; cela permet +le parallélisme de compilation de code OCaml et de fichiers Coq (.v)). + +Le "(simplement)" ci-dessus veut dire que savoir si un fichier non +nécessaire pour grammar.cma/q_constr.cmo peut en fait être fait en +stage1 est compliqué avec make, alors nous retombons en général sur le +stage2. La séparation entre le stage2 et stage3 est plus facile, donc +l'optimisation ci-dessus s'y applique pleinement. + +En d'autres mots, nous avons au niveau conceptuel deux assignations +d'étape pour chaque fichier: + + - l'étape la plus petite où nous savons qu'il peut être fait. + - l'étape la plus grande où il peut être fait. + +Mais seule la première est gérée explicitement, la seconde est +implicite. diff --git a/dev/doc/build-system.txt b/dev/doc/build-system.txt new file mode 100644 index 00000000..c9571f7c --- /dev/null +++ b/dev/doc/build-system.txt @@ -0,0 +1,299 @@ +Since July 2007, Coq features a build system overhauled by Pierre +Corbineau and Lionel Elie Mamane. + +This file documents what a Coq developer needs to know about the build +system. If you want to enhance the build system itself (or are curious +about its implementation details), see build-system.dev.txt . + +The build system is not at its optimal state, see TODO section. + +Stages in build system +---------------------- + +The build system is separated into three stages, corresponding to the +tool(s) necessary to compute the dependencies necessary at this stage: + +stage1: ocamldep, sed, camlp4 without Coq extensions +stage2: camlp4 with grammar.cma and/or q_constr.cmo +stage3: coqdep (.vo) + +The file "Makefile" itself serves as minimum stage for targets that +should not need any dependency (such as *clean*). + +Changes (for old-timers) +------------------------ + +The contents of the old Makefile has been mostly split into: + + - variable declarations for file lists in Makefile.common. + + These declarations are now static (for faster Makefile execution), + so their definitions are order-dependent. + + - actual building rules and compiler flags variables in + Makefile.build + + +The handling of globals is now: the globals of FOO.v are in FOO.glob +and the global glob.dump is created by concatenation of all .glob +files. In particular, .glob files are now always created. + +See also section "cleaning targets" + +Reducing build system overhead +------------------------------ + +When you are actively working on a file in a "make a change, make to +test, make a change, make to test", etc mode, here are a few tips to +save precious time: + + - Always ask for what you want directly (e.g. bin/coqtop, + foo/bar.cmo, ...), don't do "make world" and interrupt + it when it has done what you want. This will try to minimise the + stage at which what you ask for is done (instead of maximising it + in order to maximise parallelism of the build process). + + For example, if you only want to test whether bin/coqtop still + builds (and eventually start it to test your bugfix or new + feature), don't do "make world" and interrupt it when bin/coqtop is + built. Use "make bin/coqtop" or "make coqbinaries" or something + like that. This will avoid entering the stage 3, and cut build + system overhead by 50% (1.2s instead of 2.4 on writer's machine). + + - You can turn off rebuilding of the standard library each time + bin/coqtop is rebuilt with NO_RECOMPILE_LIB=1. + + - If you want to avoid all .ml4 files being recompiled only because + grammar.cma was rebuilt, do "make ml4depclean" once and then use + NO_RECOMPILE_ML4=1. + + - The CM_STAGE1=1 option to make will build all .cm* files mentioned + as targets on the command line in stage1. Whether this will work is + your responsibility. It should work for .ml files that don't depend + (nor directly nor indirectly through transitive closure of the + dependencies) on any .ml4 file, or where those dependencies can be + safely ignored in the current situation (e.g. all these .ml4 files + don't need to be recompiled). + + This will avoid entering the stage2 (a reduction of 33% in + overhead, 0.4s on the writer's machine). + + - To jump directly into a stage (e.g. because you know nothing is to + be done in stage 1 or (1 and 2) or because you know that the target + you give can be, in this situation, done in a lower stage than the + build system dares to), use GOTO_STAGE=n. This will jump into stage + n and try to do the targets you gave in that stage. + + - To disable all dependency recalculation, use the NO_RECALC_DEPS=1 + option. It disables REcalculation of dependencies, not calculation + of dependencies. In other words, if a .d file does not exist, it is + still created, but it is not updated every time the source file + (e.g. .ml) is changed. + +General speed improvements: + + - When building both the native and bytecode versions, the + KEEP_ML4_PREPROCESSED=1 option may reduce global compilation time + by running camlp4o only once on every .ml4 file, at the expense of + readability of compilation error messages for .ml4 files. + +Dependencies +------------ + +There are no dependencies in the archive anymore, they are always +bootstrapped. The dependencies of a file FOO are in FOO.d . This +enables partial recalculation of dependencies (only the dependencies +of changed files are recomputed). + +If you add a dependency to a Coq camlp4 extension (grammar.cma or +q_constr.cmo), then see sections ".ml4 files" and "new files". + +Cleaning Targets +---------------- + +Targets for cleaning various parts: + + - distclean: clean everything; must leave only what should end up in + distribution tarball and/or is in a svn checkout. + + - clean: clean everything except effect of "./configure" and documentation. + + - cleanconfig: clean effect of "./configure" only + + - archclean: remove all architecture-dependent generated files + - indepclean: remove all architecture-independent generated files + (not documentation) + + - objclean: clean all generated files, but not Makefile meta-data + (e.g. dependencies), nor debugging/development information nor + other cruft (e.g. editor backup files), nor documentation + + - docclean: clean documentation + +.ml4 files +---------- + +The camlp4-preprocessed version of FOO.ml4 is FOO.ml4-preprocessed and +can be obtained with: + make FOO.ml4-preprocessed + +If a .ml4 file uses a grammar extension from Coq (such as grammar.cma +or q_constr.cmo), it must contain a line like: + (*i camlp4deps: "grammar.cma q_constr.cmo" i*) + +If it uses a standard grammar extension, it must contain a line like: + (*i camlp4use: "pa_ifdef.cmo" i*) + +It can naturally contain both a camlp4deps and a camlp4use line. Both +are used for preprocessing. It is thus _not_ necessary to add a +specific rule for a .ml4 file in the Makefile.build just because it +uses grammar extensions. + +By default, the build system is geared towards development that may +use the Coq grammar extensions, but not development of Coq's grammar +extensions themselves. This means that .ml4 files are compiled +directly (using ocamlc/opt's -pp option), without use of an +intermediary .ml (or .ml4-preprocessed) file. This is so that if a +compilation error occurs, the location in the error message is a +location in the .ml4 file. If you are modifying the grammar +extensions, you may be more interested in the location of the error in +the .ml4-preprocessed file, so that you can see what your new grammar +extension made wrong. In that case, use the KEEP_ML4_PREPROCESSED=1 +option. This will make compilation of a .ml4 file a two-stage process: + +1) create the .ml4-preprocessed file with camlp4o +2) compile it with straight ocamlc/opt without preprocessor + +and will instruct make not to delete .ml4-preprocessed files +automatically just because they are intermediary files, so that you +can inspect them. + +If you add a _new_ grammar extension to Coq: + + - if it can be built at stage1, that is the .ml4 file does not use a + Coq grammar extension itself, then add it, and all .cmo files it + needs to STAGE1_TARGETS and STAGE_ML4 in Makefile.common. See the + handling of grammar.cma and q_constr.cmo for an example. + + - if it cannot be built at stage1, that is the .ml4 file itself needs + to be preprocessed with a Coq camlp4 grammar extension, then, + congratulations, you need to add a new stage between stage1 and + stage2. + +New files +--------- + +For a new file, in most cases, you just have to add it to the proper +file list(s) in Makefile.common, such as ARITHVO or TACTICS. + +The list of all ml4 files is not handled manually anymore. + +Exceptions are: + + - The file is necessary at stage1, that it is necessary to build the + Coq camlp4 grammar extensions. In this case, make sure it ends up + in STAGE1_CMO and (for .ml4 files) STAGE1_ML4. See the handling of + grammar.cma and/or q_constr.cmo for an example. + + - if the file needs to be compiled with -rectypes, add it to + RECTYPESML in Makefile.common. If it is a .ml4 file, implement + RECTYPESML4 or '(*i ocamlflags i*)'; see TODO. + + - the file needs a specific Makefile entry; add it to Makefile.build + + - the files produced from the added file do not match an existing + pattern or entry in "Makefile". (All the common cases of + .ml{,i,l,y,4}, .v, .c, ... files that produces (respectively) + .cm[iox], .vo, .glob, .o, ... files with the same basename are + already covered.) In this case, see section "New targets". + +New targets +----------- + +If you want to add: + + - a new PHONY target to the build system, that is a target that is + not the name of the file it creates, + + - a normal target is not already mapped to a stage by "Makefile" + + then: + + - add the necessary rule to Makefile.build, if any + - add the target to STAGEn_TARGETS, with n being the smallest stage + it can be built at, that is: + * 1 for OCaml code that doesn't use any Coq camlp4 grammar extension + * 2 for OCaml code that uses (directly or indirectly) a Coq + camlp4 grammar extension. Indirectly means a dependency of it + does. + * 3 for Coq (.v) code. + + *or* + + add a pattern matching the target to the pattern lists for the + smallest stage it can be built at in "Makefile". + +TODO +---- + +delegate pa_extend.cmo to camlp4use statements and remove it from +standard camlp4 options. + +maybe manage compilation flags (such as -rectypes or the CoqIDE ones) +from a + (*i ocamlflags: "-rectypes" i*) +statement in the .ml(4) files themselves, like camlp4use. The CoqIDE +files could have + (*i ocamlflags: "${COQIDEFLAGS}" i*) +and COQIDEFLAGS is still defined (and exported by) the Makefile.build. + +Clean up doc/Makefile + +config/Makefile looks like it contains a lot of unused variables, +clean that up (are any maybe used by nightly scripts on +pauillac?). Also, the COQTOP variable from config/Makefile (and used +in contribs) has a very poorly chosen name, because "coqtop" is the +name of a Coq executable! For example, in the Coq makefile it is +immediately clobbered by "bin/coqtop$(EXE)"! Rename it to COQROOT or +COQTREE or COQDIR or ... + +Promote the granular .glob handling to official way of doing things +for Coq developments, that is implement it in coq_makefile and the +contribs. Here are a few hints: + +>> Les fichiers de constantes produits par -dump-glob sont maintenant +>> produits par fichier et sont ensuite concaténés dans +>> glob.dump. Ilsont produits par défaut (avec les bonnes +>> dépendances). + +> C'est une chose que l'on voulait faire aussi. + +(J'ai testé et débogué ce concept sur CoRN dans les derniers mois.) + +> Est-ce que vous sauriez modifier coq_makefile pour qu'il procède de +> la même façon + +Dans cette optique, il serait alors plus propre de changer coqdep pour +qu'il produise directement l'output que nous mettons maintenant dans +les .v.d (qui est celui de coqdoc post-processé avec sed). + +Si cette manière de gérer les glob devient le standard béni +officiellement par "the Coq development team", ne voudrions nous pas +changer coqc pour qu'il produise FOO.glob lors de la compilation de +FOO.v par défaut (sans argument "-dump-glob")? + +> et que la production de a.html par coqdoc n'ait une dépendance qu'en +> les a.v et a.glob correspondant ? + +Je crois que coqdoc exige un glob-dump unique, il convient donc de +concaténer les .glob correspondants. Soit un glob-dump global par +projet (par Makefile), soit un glob-dump global par .v(o), qui +contient son .glob et ceux de tous les .v(o) atteignables par le +graphe des dépendances. CoRN contient déjà un outil de calcul de +partie atteignable du graphe des dépendances (il y est pour un autre +usage, pour calculer les .v à mettre dans les différents tarballs sur +http://corn.cs.ru.nl/download.html; les parties partielles sont +définies par liste de fichiers .v + toutes leurs dépendances +(in)directes), il serait alors adéquat de le mettre dans les tools de +Coq. + diff --git a/dev/doc/changes.txt b/dev/doc/changes.txt index 90e29496..b7545e09 100644 --- a/dev/doc/changes.txt +++ b/dev/doc/changes.txt @@ -1,3 +1,36 @@ +========================================= += CHANGES BETWEEN COQ V8.1 AND COQ V8.2 = +========================================= + +A few differences in Coq ML interfaces between Coq V8.1 and V8.2 +================================================================ + +** Datatypes + +List of occurrences moved from "int list" to "Termops.occurrences" (an +alias to "bool * int list"). + +** Functions + +Eauto: e_resolve_constr, vernac_e_resolve_constr -> simplest_eapply +Tactics: apply_with_bindings -> apply_with_bindings_wo_evars +Eauto.simplest_apply -> Hiddentac.h_simplest_apply +Evarutil.define_evar_as_arrow -> define_evar_as_product + +** Universe names (univ.mli) + + base_univ -> type0_univ (* alias of Set is the Type hierarchy *) + prop_univ -> type1_univ (* the type of Set in the Type hierarchy *) + neutral_univ -> lower_univ (* semantic alias of Prop in the Type hierarchy *) + is_base_univ -> is_type1_univ + is_empty_univ -> is_lower_univ + +** Sort names (term.mli) + + mk_Set -> set_sort + mk_Prop -> prop_sort + type_0 -> type1_sort + ========================================= = CHANGES BETWEEN COQ V8.0 AND COQ V8.1 = ========================================= diff --git a/dev/doc/header b/dev/doc/header deleted file mode 100644 index 57945e47..00000000 --- a/dev/doc/header +++ /dev/null @@ -1,7 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* nat := + match n0 with + | O => S + | S n1 => + fun m : nat => + (fix F0 (n2 : nat) : nat := + match n2 with + | O => F n1 1 + | S n3 => F n1 (F0 n3) + end) m + end) n. + +Notation OMEGA := (ack 4 4). + +Definition f (x:nat) := x. + +(* Evaluation in tactics can somehow be controled *) +Lemma l1 : OMEGA = OMEGA. +reflexivity. (* succeed: identity *) +Qed. (* succeed: identity *) + +Lemma l2 : OMEGA = f OMEGA. +reflexivity. (* fail: conversion wants to convert OMEGA with f OMEGA *) +Abort. (* but it reduces the right side first! *) + +Lemma l3 : f OMEGA = OMEGA. +reflexivity. (* succeed: reduce left side first *) +Qed. (* succeed: expected concl (the one with f) is on the left *) + +Lemma l4 : OMEGA = OMEGA. +assert (f OMEGA = OMEGA) by reflexivity. (* succeed *) +unfold f in H. (* succeed: no type-checking *) +exact H. (* succeed: identity *) +Qed. (* fail: "f" is on the left *) + +(* This example would fail whatever the preferred side is *) +Lemma l5 : OMEGA = f OMEGA. +unfold f. +assert (f OMEGA = OMEGA) by reflexivity. +unfold f in H. +exact H. +Qed. (* needs to convert (f OMEGA = OMEGA) and (OMEGA = f OMEGA) *) + +(**********************************************************************) +(* Analysis of the inefficiency in Nijmegen/LinAlg/LinAlg/subspace_dim.v *) +(* (proof of span_ind_uninject_prop *) + +In the proof, a problem of the form (Equal S t1 t2) +is "simpl"ified, then "red"uced to (Equal S' t1 t1) +where the new t1's are surrounded by invisible coercions. +A reflexivity steps conclude the proof. + +The trick is that Equal projects the equality in the setoid S, and +that (Equal S) itself reduces to some (fun x y => Equal S' (f x) (g y)). + +At the Qed time, the problem to solve is (Equal S t1 t2) = (Equal S' t1 t1) +and the algorithm is to first compare S and S', and t1 and t2. +Unfortunately it does not work, and since t1 and t2 involve concrete +instances of algebraic structures, it takes a lot of time to realize that +it is not convertible. + +The only hope to improve this problem is to observe that S' hides +(behind two indirections) a Setoid constructor. This could be the +argument to solve the problem. + + diff --git a/dev/doc/perf-analysis b/dev/doc/perf-analysis index f4cb3bff..8e481544 100644 --- a/dev/doc/perf-analysis +++ b/dev/doc/perf-analysis @@ -1,13 +1,79 @@ -Performance analysis for V8-0 branch ------------------------------------- +Performance analysis (trunk repository) +--------------------------------------- -Oct 29, 2006: polymorphism on definitions (+ 4%) +May 21, 2008: New version of CoRN + (needs +84% more time to compile) + +Apr 25-29, 2008: Temporary attempt with delta in eauto (Matthieu) + (+28% CoRN) + +Apr 17, 2008: improvement probably due to commit 10807 or 10813 (bug + fixes, control of zeta in rewrite, auto (??)) + (-18% Buchberger, -40% PAutomata, -28% IntMap, -43% CoRN, -13% LinAlg, + but CatsInZFC -0.5% only, PiCalc stable, PersistentUnionFind -1%) + +Mar 11, 2008: + (+19% PersistentUnionFind wrt Mar 3, +21% Angles, + +270% Continuations between 7/3 and 18/4) + +Mar 7, 2008: + (-10% PersistentUnionFind wrt Mar 3) + +Feb 20, 2008: temporary 1-day slow down + (+64% LinAlg) + +Feb 14, 2008: + (-10% PersistentUnionFind, -19% Groups) + +Feb 7, 8, 2008: temporary 2-days long slow down + (+20 LinAlg, +50% BDDs) + +Feb 2, 2008: many updates of the module system + (-13% LinAlg, -50% AMM11262, -5% Goedel, -1% PersistentUnionFind, + -42% ExactRealArithmetic, -41% Icharate, -42% Kildall, -74% SquareMatrices) + +Jan 1, 2008: merge of TypeClasses branch + (+8% PersistentUnionFind, +36% LinAlg, +76% Goedel) + +Nov 16, 17, 2007: + (+18% Cantor, +4% LinAlg, +27% IEEE1394 on 2 days) + +Nov 8, 2007: + (+18% Cantor, +16% LinAlg, +55% Continuations, +200% IEEE1394, +170% CTLTCTL, + +220% SquareMatrices) + +Oct 29, V8.1 (+ 3% geometry but CoRN, Godel, Kildall, Stalmark stables) + +Between Oct 12 and Oct 27, 2007: inefficiency temporarily introduced in the + tactic interpreter (from revision 10222 to 10267) + (+22% CoRN, +10% geometry, ...) + +Sep 16, 2007: + (+16% PersistentUnionFind on 3 days, LinAlg stable, + +Sep 4, 2007: + (+26% PersistentUnionFind, LinAlg stable, + +Jun 6, 2007: optimization of the need for type unification in with-bindings + (-3.5% Stalmark, -6% Kildall) + +May 20, 21, 22, 2007: improved inference of with-bindings (including activation + of unification on types) + (+4% PICALC, +5% Stalmark, +7% Kildall) + +May 11, 2007: added primitive integers (+6% CoLoR, +7% CoRN, +5% FSets, ...) + +Between Feb 22 and March 16, 2007: bench temporarily moved on JMN's + computer (-25% CoRN, -25% Fairisle, ...) + +Oct 29 and Oct 30, 2006: abandoned attempt to add polymorphism on definitions + (+4% in general during these two days) Oct 17, 2006: improvement in new field [r9248] (QArith -3%, geometry: -2%) Oct 5, 2006: fixing wrong unification of Meta below binders - (e.g. CatsInZFC: +10%, CoRN: -2.5%, Godel: +4%, + (e.g. CatsInZFC: +10%, CoRN: -2.5%, Godel: +4%, LinAlg: +7%, DISTRIBUTED_REFERENCE_COUNTING: +10%, CoLoR: +1%) Sep 26, 2006: new field [r9178-9181] @@ -17,11 +83,17 @@ Sep 26, 2006: new field [r9178-9181] Aug 12, 2006: Rocq/AREA_METHOD added (~ 480s) May 30, 2006: Nancy/CoLoR added (~ 319s) +May 23, 2006: new, lighter version of polymorphic inductive types + (CoRN: -27%, back to Mar-24 time) + May 17, 2006: changes in List.v (DISTRIBUTED_REFERENCE_COUNTING: -) May 5, 2006: improvement in closure (array instead of lists) (e.g. CatsInZFC: -10%, CoRN: -3%, +May 23, 2006: polymorphic inductive types (precise, heavy algorithm) + (CoRN: +37%) + Dec 29, 2005: new test and use of -vm in Stalmarck Dec 27, 2005: contrib Karatsuba added (~ 30s) diff --git a/dev/header b/dev/header new file mode 100644 index 00000000..57945e47 --- /dev/null +++ b/dev/header @@ -0,0 +1,7 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* $@ +%.dot: ../../% + ocamldoc -rectypes $(MLINCLUDES) -t $* -dot -dot-reduce ../../$*/*.ml ../../$*/*.mli -o $@ %.dep.ps: %.dot dot -Tps $< -o $@ diff --git a/dev/ocamlweb-doc/interp.dep.ps b/dev/ocamlweb-doc/interp.dep.ps index b0554481..fda7a33c 100644 --- a/dev/ocamlweb-doc/interp.dep.ps +++ b/dev/ocamlweb-doc/interp.dep.ps @@ -1,9 +1,9 @@ %!PS-Adobe-2.0 -%%Creator: dot version 2.2 (Wed Jan 19 21:09:25 UTC 2005) -%%For: (herbelin) Hugo Herbelin +%%Creator: Graphviz version 2.12 (Tue Oct 23 13:46:12 UTC 2007) +%%For: (notin) Jean-Marc Notin,,, %%Title: G %%Pages: (atend) -%%BoundingBox: 35 35 577 160 +%%BoundingBox: (atend) %%EndComments save %%BeginProlog @@ -16,57 +16,7 @@ mark EncodingVector 0 ISOLatin1Encoding 0 255 getinterval putinterval - -EncodingVector - dup 306 /AE - dup 301 /Aacute - dup 302 /Acircumflex - dup 304 /Adieresis - dup 300 /Agrave - dup 305 /Aring - dup 303 /Atilde - dup 307 /Ccedilla - dup 311 /Eacute - dup 312 /Ecircumflex - dup 313 /Edieresis - dup 310 /Egrave - dup 315 /Iacute - dup 316 /Icircumflex - dup 317 /Idieresis - dup 314 /Igrave - dup 334 /Udieresis - dup 335 /Yacute - dup 376 /thorn - dup 337 /germandbls - dup 341 /aacute - dup 342 /acircumflex - dup 344 /adieresis - dup 346 /ae - dup 340 /agrave - dup 345 /aring - dup 347 /ccedilla - dup 351 /eacute - dup 352 /ecircumflex - dup 353 /edieresis - dup 350 /egrave - dup 355 /iacute - dup 356 /icircumflex - dup 357 /idieresis - dup 354 /igrave - dup 360 /dcroat - dup 361 /ntilde - dup 363 /oacute - dup 364 /ocircumflex - dup 366 /odieresis - dup 362 /ograve - dup 365 /otilde - dup 370 /oslash - dup 372 /uacute - dup 373 /ucircumflex - dup 374 /udieresis - dup 371 /ugrave - dup 375 /yacute - dup 377 /ydieresis +EncodingVector 45 /hyphen put % Set up ISO Latin 1 character encoding /starnetISO { @@ -98,8 +48,8 @@ cleartomark /InvScaleFactor 1.0 def /set_scale { - dup 1 exch div /InvScaleFactor exch def - dup scale + dup 1 exch div /InvScaleFactor exch def + scale } bind def % styles @@ -229,348 +179,359 @@ def } if %%EndSetup +setupLatin1 %%Page: 1 1 -%%PageBoundingBox: 36 36 577 160 -%%PageOrientation: Portrait +%%PageBoundingBox: 36 36 576 753 +%%PageOrientation: Landscape gsave -35 35 542 125 boxprim clip newpath -36 36 translate +36 36 576 753 boxprim clip newpath 0 0 1 beginpage -0.9343 set_scale -0 0 translate 0 rotate -0.000 0.000 0.000 graphcolor +0.985401 0.985401 set_scale 90 rotate 40.5333 -580.533 translate +0.000 0.000 1.000 graphcolor +newpath -4 -4 moveto +-4 544 lineto +724 544 lineto +724 -4 lineto +closepath fill +0.985401 setlinewidth +0.000 0.000 1.000 graphcolor +newpath -4 -4 moveto +-4 544 lineto +724 544 lineto +724 -4 lineto +closepath stroke +% Constrextern +gsave +0.502 1.000 0.820 nodecolor +172 417 49.1777 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +172 417 49.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor 14.00 /Times-Roman set_font - -% Syntax_def -gsave 10 dict begin -303 110 45 18 ellipse_path -stroke -gsave 10 dict begin -271 105 moveto -(Syntax_def) -[7.68 6.96 6.96 4.08 6.24 6.96 6.96 6.96 6.24 4.56] -xshow -end grestore -end grestore - -% Notation -gsave 10 dict begin -422 60 38 18 ellipse_path -stroke -gsave 10 dict begin -397 55 moveto -(Notation) -[9.84 6.72 4.08 6.24 3.84 3.84 6.96 6.96] -xshow -end grestore -end grestore - -% Syntax_def -> Notation -newpath 334 97 moveto -350 90 369 83 385 76 curveto +172 412 moveto 72 -0.5 (Constrextern) alignedtext +grestore +% Reserve +gsave +0.502 1.000 0.820 nodecolor +264 319 35.1777 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +264 319 35.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +264 314 moveto 44 -0.5 (Reserve) alignedtext +grestore +% Constrextern->Reserve +gsave +0.985401 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 188 400 moveto +203 384 225 361 242 343 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 245.049 344.831 moveto +249 335 lineto +239.781 340.221 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth 0.000 0.000 0.000 edgecolor -newpath 386 79 moveto -394 72 lineto -383 73 lineto -closepath -fill +newpath 245.049 344.831 moveto +249 335 lineto +239.781 340.221 lineto +closepath stroke +grestore +% Notation +gsave +0.502 1.000 0.820 nodecolor +268 122 37.1753 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +268 122 37.1753 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +268 117 moveto 49 -0.5 (Notation) alignedtext +grestore +% Constrextern->Notation +gsave +0.985401 setlinewidth 0.000 0.000 0.000 edgecolor -newpath 386 79 moveto -394 72 lineto -383 73 lineto -closepath -stroke -end grestore - -% Ppextend -gsave 10 dict begin -537 60 39 18 ellipse_path +newpath 178 399 moveto +194 349 240 209 259 150 curveto stroke -gsave 10 dict begin -511 55 moveto -(Ppextend) -[7.68 6.96 5.76 6.96 3.84 6.24 6.96 6.96] -xshow -end grestore -end grestore - -% Notation -> Ppextend -newpath 460 60 moveto -469 60 478 60 488 60 curveto -stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 262.479 150.584 moveto +262 140 lineto +255.774 148.573 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth 0.000 0.000 0.000 edgecolor -newpath 488 64 moveto -498 60 lineto -488 57 lineto -closepath -fill +newpath 262.479 150.584 moveto +262 140 lineto +255.774 148.573 lineto +closepath stroke +grestore +% Topconstr +gsave +0.502 1.000 0.820 nodecolor +82 24 41.1755 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +82 24 41.1755 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +82 19 moveto 57 -0.5 (Topconstr) alignedtext +grestore +% Notation->Topconstr +gsave +0.985401 setlinewidth 0.000 0.000 0.000 edgecolor -newpath 488 64 moveto -498 60 lineto -488 57 lineto -closepath -stroke -end grestore - -% Topconstr -gsave 10 dict begin -537 114 41 18 ellipse_path +newpath 243 109 moveto +211 91 154 62 117 43 curveto stroke -gsave 10 dict begin -509 109 moveto -(Topconstr) -[7.2 6.96 6.96 6.24 6.96 6.96 5.28 3.84 4.56] -xshow -end grestore -end grestore - -% Notation -> Topconstr -newpath 449 73 moveto -464 80 483 89 500 97 curveto -stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 118.441 39.7969 moveto +108 38 lineto +115.042 45.916 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth 0.000 0.000 0.000 edgecolor -newpath 498 100 moveto -509 101 lineto -501 94 lineto -closepath -fill +newpath 118.441 39.7969 moveto +108 38 lineto +115.042 45.916 lineto +closepath stroke +grestore +% Ppextend +gsave +0.502 1.000 0.820 nodecolor +278 24 39.1777 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +278 24 39.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +278 19 moveto 52 -0.5 (Ppextend) alignedtext +grestore +% Notation->Ppextend +gsave +0.985401 setlinewidth 0.000 0.000 0.000 edgecolor -newpath 498 100 moveto -509 101 lineto -501 94 lineto -closepath -stroke -end grestore - -% Modintern -gsave 10 dict begin -44 98 43 18 ellipse_path -stroke -gsave 10 dict begin -13 93 moveto -(Modintern) -[12.48 6.96 6.96 3.84 6.96 3.84 6.24 4.8 6.96] -xshow -end grestore -end grestore - -% Constrintern -gsave 10 dict begin -173 98 48 18 ellipse_path +newpath 270 104 moveto +272 89 273 68 275 52 curveto stroke -gsave 10 dict begin -138 93 moveto -(Constrintern) -[9.36 6.96 6.96 5.28 3.84 4.8 3.84 6.96 3.84 6.24 4.8 6.96] -xshow -end grestore -end grestore - -% Modintern -> Constrintern -newpath 88 98 moveto -97 98 106 98 115 98 curveto -stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 278.488 52.2987 moveto +276 42 lineto +271.522 51.6021 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth 0.000 0.000 0.000 edgecolor -newpath 115 102 moveto -125 98 lineto -115 95 lineto -closepath -fill +newpath 278.488 52.2987 moveto +276 42 lineto +271.522 51.6021 lineto +closepath stroke +grestore +% Constrintern +gsave +0.502 1.000 0.820 nodecolor +472 417 48.1777 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +472 417 48.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +472 412 moveto 70 -0.5 (Constrintern) alignedtext +grestore +% Constrintern->Reserve +gsave +0.985401 setlinewidth 0.000 0.000 0.000 edgecolor -newpath 115 102 moveto -125 98 lineto -115 95 lineto -closepath -stroke -end grestore - -% Constrintern -> Syntax_def -newpath 220 102 moveto -229 103 239 104 249 105 curveto +newpath 442 403 moveto +404 385 340 355 299 335 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 300.56 331.863 moveto +290 331 lineto +297.717 338.26 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth 0.000 0.000 0.000 edgecolor -newpath 249 108 moveto -259 106 lineto -249 102 lineto -closepath -fill +newpath 300.56 331.863 moveto +290 331 lineto +297.717 338.26 lineto +closepath stroke +grestore +% Implicit_quantifiers +gsave +0.502 1.000 0.820 nodecolor +508 319 69.1777 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +508 319 69.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +508 314 moveto 112 -0.5 (Implicit_quantifiers) alignedtext +grestore +% Constrintern->Implicit_quantifiers +gsave +0.985401 setlinewidth 0.000 0.000 0.000 edgecolor -newpath 249 108 moveto -259 106 lineto -249 102 lineto -closepath +newpath 479 399 moveto +484 385 492 364 498 347 curveto stroke -end grestore - -% Reserve -gsave 10 dict begin -303 56 35 18 ellipse_path -stroke -gsave 10 dict begin -280 51 moveto -(Reserve) -[9.12 6.24 5.52 6.24 4.8 6.48 6.24] -xshow -end grestore -end grestore - -% Constrintern -> Reserve -newpath 210 86 moveto -227 81 246 75 263 69 curveto -stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 501.479 347.584 moveto +501 337 lineto +494.774 345.573 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth 0.000 0.000 0.000 edgecolor -newpath 264 72 moveto -273 66 lineto -262 66 lineto -closepath -fill +newpath 501.479 347.584 moveto +501 337 lineto +494.774 345.573 lineto +closepath stroke +grestore +% Syntax_def +gsave +0.502 1.000 0.820 nodecolor +396 220 45.1777 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +396 220 45.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +396 215 moveto 64 -0.5 (Syntax_def) alignedtext +grestore +% Implicit_quantifiers->Syntax_def +gsave +0.985401 setlinewidth 0.000 0.000 0.000 edgecolor -newpath 264 72 moveto -273 66 lineto -262 66 lineto -closepath -stroke -end grestore - -% Genarg -gsave 10 dict begin -422 114 33 18 ellipse_path -stroke -gsave 10 dict begin -401 109 moveto -(Genarg) -[10.08 6.24 6.96 6.24 4.32 6.96] -xshow -end grestore -end grestore - -% Genarg -> Topconstr -newpath 456 114 moveto -465 114 476 114 486 114 curveto +newpath 488 302 moveto +469 285 442 261 422 244 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 424.546 241.596 moveto +415 237 lineto +419.596 246.546 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth 0.000 0.000 0.000 edgecolor -newpath 486 118 moveto -496 114 lineto -486 111 lineto -closepath -fill +newpath 424.546 241.596 moveto +415 237 lineto +419.596 246.546 lineto +closepath stroke +grestore +% Coqlib +gsave +0.502 1.000 0.820 nodecolor +656 515 32.1777 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +656 515 32.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +656 510 moveto 38 -0.5 (Coqlib) alignedtext +grestore +% Genarg +gsave +0.502 1.000 0.820 nodecolor +82 122 33.175 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +82 122 33.175 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +82 117 moveto 41 -0.5 (Genarg) alignedtext +grestore +% Genarg->Topconstr +gsave +0.985401 setlinewidth 0.000 0.000 0.000 edgecolor -newpath 486 118 moveto -496 114 lineto -486 111 lineto -closepath -stroke -end grestore - -% Coqlib -gsave 10 dict begin -44 21 32 18 ellipse_path -stroke -gsave 10 dict begin -24 16 moveto -(Coqlib) -[9.36 6.96 6.96 3.84 3.84 6.96] -xshow -end grestore -end grestore - -% Constrextern -gsave 10 dict begin -173 21 49 18 ellipse_path +newpath 82 104 moveto +82 89 82 69 82 52 curveto stroke -gsave 10 dict begin -137 16 moveto -(Constrextern) -[9.36 6.96 6.96 5.28 3.84 4.56 5.76 6.96 3.84 6.24 4.8 6.96] -xshow -end grestore -end grestore - -% Coqlib -> Constrextern -newpath 77 21 moveto -88 21 101 21 114 21 curveto -stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 85.5001 52 moveto +82 42 lineto +78.5001 52 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth 0.000 0.000 0.000 edgecolor -newpath 114 25 moveto -124 21 lineto -114 18 lineto -closepath -fill +newpath 85.5001 52 moveto +82 42 lineto +78.5001 52 lineto +closepath stroke +grestore +% Syntax_def->Notation +gsave +0.985401 setlinewidth 0.000 0.000 0.000 edgecolor -newpath 114 25 moveto -124 21 lineto -114 18 lineto -closepath -stroke -end grestore - -% Constrextern -> Notation -newpath 222 19 moveto -257 18 307 20 348 29 curveto -361 31 375 37 388 42 curveto +newpath 375 204 moveto +354 187 320 161 296 143 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 298.1 140.2 moveto +288 137 lineto +293.9 145.8 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth 0.000 0.000 0.000 edgecolor -newpath 386 45 moveto -397 46 lineto -389 39 lineto -closepath -fill +newpath 298.1 140.2 moveto +288 137 lineto +293.9 145.8 lineto +closepath stroke +grestore +% Modintern +gsave +0.502 1.000 0.820 nodecolor +472 515 42.1756 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +472 515 42.1756 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +472 510 moveto 59 -0.5 (Modintern) alignedtext +grestore +% Modintern->Constrintern +gsave +0.985401 setlinewidth 0.000 0.000 0.000 edgecolor -newpath 386 45 moveto -397 46 lineto -389 39 lineto -closepath +newpath 472 497 moveto +472 482 472 462 472 445 curveto stroke -end grestore - -% Constrextern -> Reserve -newpath 213 32 moveto -228 36 246 41 261 45 curveto -stroke -gsave 10 dict begin -solid -1 setlinewidth 0.000 0.000 0.000 edgecolor -newpath 260 48 moveto -271 48 lineto -262 42 lineto -closepath -fill +newpath 475.5 445 moveto +472 435 lineto +468.5 445 lineto +closepath fill +0.985401 setlinewidth +solid 0.000 0.000 0.000 edgecolor -newpath 260 48 moveto -271 48 lineto -262 42 lineto -closepath -stroke -end grestore +newpath 475.5 445 moveto +472 435 lineto +468.5 445 lineto +closepath stroke +grestore endpage showpage grestore @@ -578,6 +539,7 @@ grestore %%EndPage: 1 %%Trailer %%Pages: 1 +%%BoundingBox: 36 36 576 753 end restore %%EOF diff --git a/dev/ocamlweb-doc/kernel.dep.ps b/dev/ocamlweb-doc/kernel.dep.ps index 3c00121e..b7b4137b 100644 --- a/dev/ocamlweb-doc/kernel.dep.ps +++ b/dev/ocamlweb-doc/kernel.dep.ps @@ -1,9 +1,9 @@ %!PS-Adobe-2.0 -%%Creator: dot version 2.2 (Wed Jan 19 21:09:25 UTC 2005) -%%For: (herbelin) Hugo Herbelin +%%Creator: Graphviz version 2.12 (Tue Oct 23 13:46:12 UTC 2007) +%%For: (notin) Jean-Marc Notin,,, %%Title: G %%Pages: (atend) -%%BoundingBox: 35 35 577 127 +%%BoundingBox: (atend) %%EndComments save %%BeginProlog @@ -16,57 +16,7 @@ mark EncodingVector 0 ISOLatin1Encoding 0 255 getinterval putinterval - -EncodingVector - dup 306 /AE - dup 301 /Aacute - dup 302 /Acircumflex - dup 304 /Adieresis - dup 300 /Agrave - dup 305 /Aring - dup 303 /Atilde - dup 307 /Ccedilla - dup 311 /Eacute - dup 312 /Ecircumflex - dup 313 /Edieresis - dup 310 /Egrave - dup 315 /Iacute - dup 316 /Icircumflex - dup 317 /Idieresis - dup 314 /Igrave - dup 334 /Udieresis - dup 335 /Yacute - dup 376 /thorn - dup 337 /germandbls - dup 341 /aacute - dup 342 /acircumflex - dup 344 /adieresis - dup 346 /ae - dup 340 /agrave - dup 345 /aring - dup 347 /ccedilla - dup 351 /eacute - dup 352 /ecircumflex - dup 353 /edieresis - dup 350 /egrave - dup 355 /iacute - dup 356 /icircumflex - dup 357 /idieresis - dup 354 /igrave - dup 360 /dcroat - dup 361 /ntilde - dup 363 /oacute - dup 364 /ocircumflex - dup 366 /odieresis - dup 362 /ograve - dup 365 /otilde - dup 370 /oslash - dup 372 /uacute - dup 373 /ucircumflex - dup 374 /udieresis - dup 371 /ugrave - dup 375 /yacute - dup 377 /ydieresis +EncodingVector 45 /hyphen put % Set up ISO Latin 1 character encoding /starnetISO { @@ -98,8 +48,8 @@ cleartomark /InvScaleFactor 1.0 def /set_scale { - dup 1 exch div /InvScaleFactor exch def - dup scale + dup 1 exch div /InvScaleFactor exch def + scale } bind def % styles @@ -229,1219 +179,1245 @@ def } if %%EndSetup +setupLatin1 %%Page: 1 1 -%%PageBoundingBox: 36 36 577 127 -%%PageOrientation: Portrait +%%PageBoundingBox: 36 36 535 756 +%%PageOrientation: Landscape gsave -35 35 542 92 boxprim clip newpath -36 36 translate +36 36 535 756 boxprim clip newpath 0 0 1 beginpage -0.2845 set_scale -0 0 translate 0 rotate -0.000 0.000 0.000 graphcolor +0.393658 0.393658 set_scale 90 rotate 95.45 -1355.45 translate +0.000 0.000 1.000 graphcolor +newpath -4 -4 moveto +-4 1264 lineto +1825 1264 lineto +1825 -4 lineto +closepath fill +0.393658 setlinewidth +0.000 0.000 1.000 graphcolor +newpath -4 -4 moveto +-4 1264 lineto +1825 1264 lineto +1825 -4 lineto +closepath stroke +% Cbytecodes +gsave +0.502 1.000 0.820 nodecolor +1258 234 45.1777 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +1258 234 45.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor 14.00 /Times-Roman set_font - -% Vm -gsave 10 dict begin -801 294 27 18 ellipse_path -stroke -gsave 10 dict begin -789 289 moveto -(Vm) -[10.08 10.8] -xshow -end grestore -end grestore - -% Cemitcodes -gsave 10 dict begin -1427 200 46 18 ellipse_path -stroke -gsave 10 dict begin -1393 195 moveto -(Cemitcodes) -[9.36 6.24 10.8 3.84 3.84 6.24 6.96 6.96 6.24 5.52] -xshow -end grestore -end grestore - -% Vm -> Cemitcodes -newpath 826 287 moveto -871 276 969 254 1053 254 curveto -1053 254 1053 254 1174 254 curveto -1249 254 1332 231 1382 215 curveto +1258 229 moveto 64 -0.5 (Cbytecodes) alignedtext +grestore +% Term +gsave +0.502 1.000 0.820 nodecolor +1093 162 28.1746 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +1093 162 28.1746 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +1093 157 moveto 31 -0.5 (Term) alignedtext +grestore +% Cbytecodes->Term +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 1227 221 moveto +1198 208 1155 189 1125 176 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 1126.56 172.863 moveto +1116 172 lineto +1123.72 179.26 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 1383 218 moveto -1392 212 lineto -1381 212 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 1383 218 moveto -1392 212 lineto -1381 212 lineto -closepath -stroke -end grestore - -% Conv_oracle -gsave 10 dict begin -1053 300 48 18 ellipse_path -stroke -gsave 10 dict begin -1017 295 moveto -(Conv_oracle) -[9.36 6.96 6.48 6.96 6.96 6.96 4.56 6.24 6.24 3.84 6.24] -xshow -end grestore -end grestore - -% Vm -> Conv_oracle -newpath 828 295 moveto -868 296 942 298 995 299 curveto +0.000 0.000 0.000 edgecolor +newpath 1126.56 172.863 moveto +1116 172 lineto +1123.72 179.26 lineto +closepath stroke +grestore +% Esubst +gsave +0.502 1.000 0.820 nodecolor +1093 90 31.1748 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +1093 90 31.1748 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +1093 85 moveto 37 -0.5 (Esubst) alignedtext +grestore +% Term->Esubst +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 1093 144 moveto +1093 136 1093 127 1093 118 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 1096.5 118 moveto +1093 108 lineto +1089.5 118 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 995 303 moveto -1005 299 lineto -995 296 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 995 303 moveto -1005 299 lineto -995 296 lineto -closepath -stroke -end grestore - -% Mod_subst -gsave 10 dict begin -1556 146 45 18 ellipse_path -stroke -gsave 10 dict begin -1524 141 moveto -(Mod_subst) -[12.48 6.96 6.96 6.96 5.52 6.96 6.96 5.28 3.84] -xshow -end grestore -end grestore - -% Cemitcodes -> Mod_subst -newpath 1459 187 moveto -1476 180 1497 171 1516 163 curveto +0.000 0.000 0.000 edgecolor +newpath 1096.5 118 moveto +1093 108 lineto +1089.5 118 lineto +closepath stroke +grestore +% Univ +gsave +0.502 1.000 0.820 nodecolor +580 90 27.1777 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +580 90 27.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +580 85 moveto 28 -0.5 (Univ) alignedtext +grestore +% Term->Univ +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 1065 158 moveto +979 145 714 109 616 95 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 616.299 91.5125 moveto +606 94 lineto +615.602 98.4778 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 1517 166 moveto -1525 159 lineto -1514 160 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 1517 166 moveto -1525 159 lineto -1514 160 lineto -closepath -stroke -end grestore - -% Cbytecodes -gsave 10 dict begin -1556 200 45 18 ellipse_path -stroke -gsave 10 dict begin -1523 195 moveto -(Cbytecodes) -[9.36 6.48 6.96 3.84 6.24 6.24 6.96 6.96 6.24 5.52] -xshow -end grestore -end grestore - -% Cemitcodes -> Cbytecodes -newpath 1474 200 moveto -1482 200 1491 200 1500 200 curveto +0.000 0.000 0.000 edgecolor +newpath 616.299 91.5125 moveto +606 94 lineto +615.602 98.4778 lineto +closepath stroke +grestore +% Cbytegen +gsave +0.502 1.000 0.820 nodecolor +1148 522 39.1754 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +1148 522 39.1754 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +1148 517 moveto 53 -0.5 (Cbytegen) alignedtext +grestore +% Pre_env +gsave +0.502 1.000 0.820 nodecolor +1148 450 36.1777 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +1148 450 36.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +1148 445 moveto 46 -0.5 (Pre_env) alignedtext +grestore +% Cbytegen->Pre_env +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 1148 504 moveto +1148 496 1148 487 1148 478 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 1151.5 478 moveto +1148 468 lineto +1144.5 478 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 1500 204 moveto -1510 200 lineto -1500 197 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 1500 204 moveto -1510 200 lineto -1500 197 lineto -closepath -stroke -end grestore - -% Copcodes -gsave 10 dict begin -1556 254 41 18 ellipse_path -stroke -gsave 10 dict begin -1528 249 moveto -(Copcodes) -[9.36 6.96 6.96 6.24 6.96 6.96 6.24 5.52] -xshow -end grestore -end grestore - -% Cemitcodes -> Copcodes -newpath 1459 213 moveto -1476 221 1498 230 1517 237 curveto +0.000 0.000 0.000 edgecolor +newpath 1151.5 478 moveto +1148 468 lineto +1144.5 478 lineto +closepath stroke +grestore +% Declarations +gsave +0.502 1.000 0.820 nodecolor +1148 378 48.1777 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +1148 378 48.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +1148 373 moveto 70 -0.5 (Declarations) alignedtext +grestore +% Pre_env->Declarations +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 1148 432 moveto +1148 424 1148 415 1148 406 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 1151.5 406 moveto +1148 396 lineto +1144.5 406 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 1515 240 moveto -1526 241 lineto -1518 234 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 1515 240 moveto -1526 241 lineto -1518 234 lineto -closepath -stroke -end grestore - -% Names -gsave 10 dict begin -1865 270 33 18 ellipse_path -stroke -gsave 10 dict begin -1845 265 moveto -(Names) -[9.6 6.24 10.8 6.24 5.52] -xshow -end grestore -end grestore - -% Conv_oracle -> Names -newpath 1102 300 moveto -1151 300 1228 300 1295 300 curveto -1295 300 1295 300 1666 300 curveto -1722 300 1785 288 1825 279 curveto +0.000 0.000 0.000 edgecolor +newpath 1151.5 406 moveto +1148 396 lineto +1144.5 406 lineto +closepath stroke +grestore +% Cemitcodes +gsave +0.502 1.000 0.820 nodecolor +663 306 45.1757 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +663 306 45.1757 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +663 301 moveto 65 -0.5 (Cemitcodes) alignedtext +grestore +% Cemitcodes->Cbytecodes +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 706 301 moveto +813 287 1088 254 1205 240 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 1205.4 243.478 moveto +1215 239 lineto +1204.7 236.512 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 1826 282 moveto -1835 277 lineto -1825 276 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 1826 282 moveto -1835 277 lineto -1825 276 lineto -closepath -stroke -end grestore - -% Vconv -gsave 10 dict begin -552 202 32 18 ellipse_path -stroke -gsave 10 dict begin -533 197 moveto -(Vconv) -[10.08 6.24 6.96 6.48 6.96] -xshow -end grestore -end grestore - -% Csymtable -gsave 10 dict begin -674 202 43 18 ellipse_path -stroke -gsave 10 dict begin -643 197 moveto -(Csymtable) -[9.36 5.52 6.96 10.8 4.08 6.24 6.96 3.84 6.24] -xshow -end grestore -end grestore - -% Vconv -> Csymtable -newpath 584 202 moveto -595 202 608 202 620 202 curveto +0.000 0.000 0.000 edgecolor +newpath 1205.4 243.478 moveto +1215 239 lineto +1204.7 236.512 lineto +closepath stroke +grestore +% Copcodes +gsave +0.502 1.000 0.820 nodecolor +786 234 40.1777 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +786 234 40.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +786 229 moveto 54 -0.5 (Copcodes) alignedtext +grestore +% Cemitcodes->Copcodes +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 688 291 moveto +707 281 732 266 752 253 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 753.958 255.916 moveto +761 248 lineto +750.559 249.797 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 620 206 moveto -630 202 lineto -620 199 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 620 206 moveto -630 202 lineto -620 199 lineto -closepath -stroke -end grestore - -% Inductive -gsave 10 dict begin -674 110 39 18 ellipse_path -stroke -gsave 10 dict begin -647 105 moveto -(Inductive) -[4.56 6.96 6.96 6.96 6.24 3.84 3.84 6.48 6.24] -xshow -end grestore -end grestore - -% Vconv -> Inductive -newpath 571 187 moveto -591 172 622 149 645 132 curveto +0.000 0.000 0.000 edgecolor +newpath 753.958 255.916 moveto +761 248 lineto +750.559 249.797 lineto +closepath stroke +grestore +% Mod_subst +gsave +0.502 1.000 0.820 nodecolor +325 234 43.1756 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +325 234 43.1756 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +325 229 moveto 61 -0.5 (Mod_subst) alignedtext +grestore +% Cemitcodes->Mod_subst +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 623 298 moveto +561 284 441 259 374 244 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 374.492 240.529 moveto +364 242 lineto +373.119 247.393 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 647 135 moveto -653 126 lineto -643 129 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 647 135 moveto -653 126 lineto -643 129 lineto -closepath -stroke -end grestore - -% Csymtable -> Vm -newpath 696 218 moveto -717 234 751 258 775 275 curveto +0.000 0.000 0.000 edgecolor +newpath 374.492 240.529 moveto +364 242 lineto +373.119 247.393 lineto +closepath stroke +grestore +% Mod_subst->Term +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 367 230 moveto +502 217 925 178 1055 166 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 1055.4 169.478 moveto +1065 165 lineto +1054.7 162.512 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 773 278 moveto -783 281 lineto -777 272 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 773 278 moveto -783 281 lineto -777 272 lineto -closepath -stroke -end grestore - -% Cbytegen -gsave 10 dict begin -801 164 39 18 ellipse_path -stroke -gsave 10 dict begin -774 159 moveto -(Cbytegen) -[9.36 6.48 6.96 3.84 6.24 6.72 6.24 6.96] -xshow -end grestore -end grestore - -% Csymtable -> Cbytegen -newpath 709 191 moveto -724 187 742 181 758 177 curveto +0.000 0.000 0.000 edgecolor +newpath 1055.4 169.478 moveto +1065 165 lineto +1054.7 162.512 lineto +closepath stroke +grestore +% Closure +gsave +0.502 1.000 0.820 nodecolor +713 666 34.1751 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +713 666 34.1751 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +713 661 moveto 43 -0.5 (Closure) alignedtext +grestore +% Environ +gsave +0.502 1.000 0.820 nodecolor +1148 594 36.1777 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +1148 594 36.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +1148 589 moveto 46 -0.5 (Environ) alignedtext +grestore +% Closure->Environ +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 746 661 moveto +823 648 1016 616 1104 602 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 1104.88 605.393 moveto +1114 600 lineto +1103.51 598.529 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 759 180 moveto -768 174 lineto -757 174 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 759 180 moveto -768 174 lineto -757 174 lineto -closepath -stroke -end grestore - -% Type_errors -gsave 10 dict begin -801 110 47 18 ellipse_path -stroke -gsave 10 dict begin -767 105 moveto -(Type_errors) -[6.96 6.96 6.96 6.24 6.96 6.24 5.04 4.56 6.96 4.56 5.52] -xshow -end grestore -end grestore - -% Inductive -> Type_errors -newpath 714 110 moveto -724 110 734 110 744 110 curveto +0.000 0.000 0.000 edgecolor +newpath 1104.88 605.393 moveto +1114 600 lineto +1103.51 598.529 lineto +closepath stroke +grestore +% Environ->Cbytegen +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 1148 576 moveto +1148 568 1148 559 1148 550 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 1151.5 550 moveto +1148 540 lineto +1144.5 550 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 744 114 moveto -754 110 lineto -744 107 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 744 114 moveto -754 110 lineto -744 107 lineto -closepath -stroke -end grestore - -% Univ -gsave 10 dict begin -1763 241 27 18 ellipse_path -stroke -gsave 10 dict begin -1748 236 moveto -(Univ) -[9.6 6.96 3.84 6.96] -xshow -end grestore -end grestore - -% Univ -> Names -newpath 1788 248 moveto -1800 251 1814 255 1826 259 curveto +0.000 0.000 0.000 edgecolor +newpath 1151.5 550 moveto +1148 540 lineto +1144.5 550 lineto +closepath stroke +grestore +% Conv_oracle +gsave +0.502 1.000 0.820 nodecolor +383 522 48.1758 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +383 522 48.1758 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +383 517 moveto 71 -0.5 (Conv_oracle) alignedtext +grestore +% Names +gsave +0.502 1.000 0.820 nodecolor +288 18 32.1777 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +288 18 32.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +288 13 moveto 38 -0.5 (Names) alignedtext +grestore +% Conv_oracle->Names +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 339 515 moveto +238 497 0 449 0 378 curveto +0 378 0 378 0 162 curveto +0 53 166 26 246 20 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 246.398 23.4778 moveto +256 19 lineto +245.701 16.5125 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 1825 262 moveto -1836 262 lineto -1827 256 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 1825 262 moveto -1836 262 lineto -1827 256 lineto -closepath -stroke -end grestore - -% Typeops -gsave 10 dict begin -552 110 36 18 ellipse_path -stroke -gsave 10 dict begin -528 105 moveto -(Typeops) -[6.96 6.96 6.96 6.24 6.96 6.96 5.52] -xshow -end grestore -end grestore - -% Typeops -> Inductive -newpath 589 110 moveto -600 110 612 110 624 110 curveto +0.000 0.000 0.000 edgecolor +newpath 246.398 23.4778 moveto +256 19 lineto +245.701 16.5125 lineto +closepath stroke +grestore +% Cooking +gsave +0.502 1.000 0.820 nodecolor +960 1026 37.1777 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +960 1026 37.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +960 1021 moveto 48 -0.5 (Cooking) alignedtext +grestore +% Typeops +gsave +0.502 1.000 0.820 nodecolor +960 954 37.1777 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +960 954 37.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +960 949 moveto 48 -0.5 (Typeops) alignedtext +grestore +% Cooking->Typeops +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 960 1008 moveto +960 1000 960 991 960 982 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 963.5 982 moveto +960 972 lineto +956.5 982 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 624 114 moveto -634 110 lineto -624 107 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 624 114 moveto -634 110 lineto -624 107 lineto -closepath -stroke -end grestore - -% Entries -gsave 10 dict begin -801 56 33 18 ellipse_path -stroke -gsave 10 dict begin -780 51 moveto -(Entries) -[8.4 6.96 3.84 4.8 3.84 6.24 5.52] -xshow -end grestore -end grestore - -% Typeops -> Entries -newpath 581 99 moveto -595 93 614 87 630 83 curveto -673 73 723 66 758 61 curveto +0.000 0.000 0.000 edgecolor +newpath 963.5 982 moveto +960 972 lineto +956.5 982 lineto +closepath stroke +grestore +% Entries +gsave +0.502 1.000 0.820 nodecolor +1391 882 33.1777 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +1391 882 33.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +1391 877 moveto 40 -0.5 (Entries) alignedtext +grestore +% Typeops->Entries +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 995 948 moveto +1074 935 1265 903 1349 889 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 1349.88 892.393 moveto +1359 887 lineto +1348.51 885.529 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 758 64 moveto -768 60 lineto -758 58 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 758 64 moveto -768 60 lineto -758 58 lineto -closepath -stroke -end grestore - -% Sign -gsave 10 dict begin -1427 100 27 18 ellipse_path -stroke -gsave 10 dict begin -1414 95 moveto -(Sign) -[7.68 3.84 6.96 6.96] -xshow -end grestore -end grestore - -% Entries -> Sign -newpath 834 61 moveto -882 68 974 79 1053 79 curveto -1053 79 1053 79 1174 79 curveto -1251 79 1342 89 1390 95 curveto +0.000 0.000 0.000 edgecolor +newpath 1349.88 892.393 moveto +1359 887 lineto +1348.51 885.529 lineto +closepath stroke +grestore +% Inductive +gsave +0.502 1.000 0.820 nodecolor +837 882 39.1754 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +837 882 39.1754 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +837 877 moveto 53 -0.5 (Inductive) alignedtext +grestore +% Typeops->Inductive +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 936 940 moveto +918 929 891 914 871 901 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 872.441 897.797 moveto +862 896 lineto +869.042 903.916 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 1390 98 moveto -1400 96 lineto -1390 92 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 1390 98 moveto -1400 96 lineto -1390 92 lineto -closepath -stroke -end grestore - -% Reduction -gsave 10 dict begin -926 208 42 18 ellipse_path -stroke -gsave 10 dict begin -897 203 moveto -(Reduction) -[9.12 6.24 6.96 6.96 6.24 3.84 3.84 6.96 6.96] -xshow -end grestore -end grestore - -% Type_errors -> Reduction -newpath 829 125 moveto -836 129 842 133 848 137 curveto -868 151 887 170 902 184 curveto +0.000 0.000 0.000 edgecolor +newpath 872.441 897.797 moveto +862 896 lineto +869.042 903.916 lineto +closepath stroke +grestore +% Csymtable +gsave +0.502 1.000 0.820 nodecolor +1148 666 42.1756 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +1148 666 42.1756 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +1148 661 moveto 59 -0.5 (Csymtable) alignedtext +grestore +% Csymtable->Environ +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 1148 648 moveto +1148 640 1148 631 1148 622 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 1151.5 622 moveto +1148 612 lineto +1144.5 622 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 900 187 moveto -910 191 lineto -905 182 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 900 187 moveto -910 191 lineto -905 182 lineto -closepath -stroke -end grestore - -% Reduction -> Conv_oracle -newpath 948 224 moveto -968 239 999 261 1023 278 curveto +0.000 0.000 0.000 edgecolor +newpath 1151.5 622 moveto +1148 612 lineto +1144.5 622 lineto +closepath stroke +grestore +% Vm +gsave +0.502 1.000 0.820 nodecolor +731 594 27 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +731 594 27 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +731 589 moveto 21 -0.5 (Vm) alignedtext +grestore +% Csymtable->Vm +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 1109 659 moveto +1029 645 845 614 767 600 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 767.492 596.529 moveto +757 598 lineto +766.119 603.393 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 1021 281 moveto -1031 284 lineto -1025 275 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 1021 281 moveto -1031 284 lineto -1025 275 lineto -closepath -stroke -end grestore - -% Closure -gsave 10 dict begin -1053 208 35 18 ellipse_path -stroke -gsave 10 dict begin -1031 203 moveto -(Closure) -[9.36 3.84 6.96 5.52 6.96 4.56 6.24] -xshow -end grestore -end grestore - -% Reduction -> Closure -newpath 968 208 moveto -981 208 994 208 1008 208 curveto +0.000 0.000 0.000 edgecolor +newpath 767.492 596.529 moveto +757 598 lineto +766.119 603.393 lineto +closepath stroke +grestore +% Vm->Cemitcodes +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 727 576 moveto +716 527 684 392 669 334 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 672.393 333.119 moveto +667 324 lineto +665.529 334.492 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 1008 212 moveto -1018 208 lineto -1008 205 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 1008 212 moveto -1018 208 lineto -1008 205 lineto -closepath -stroke -end grestore - -% Term_typing -gsave 10 dict begin -313 110 49 18 ellipse_path -stroke -gsave 10 dict begin -277 105 moveto -(Term_typing) -[7.2 6.24 4.8 10.8 6.96 3.84 6.96 6.96 3.84 6.96 6.96] -xshow -end grestore -end grestore - -% Term_typing -> Cbytegen -newpath 347 123 moveto -363 128 381 134 398 137 curveto -524 161 675 165 752 165 curveto +0.000 0.000 0.000 edgecolor +newpath 672.393 333.119 moveto +667 324 lineto +665.529 334.492 lineto +closepath stroke +grestore +% Vm->Conv_oracle +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 705 589 moveto +648 577 510 549 435 533 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 435.492 529.529 moveto +425 531 lineto +434.119 536.393 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 752 169 moveto -762 165 lineto -752 162 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 752 169 moveto -762 165 lineto -752 162 lineto -closepath -stroke -end grestore - -% Cooking -gsave 10 dict begin -436 225 37 18 ellipse_path -stroke -gsave 10 dict begin -411 220 moveto -(Cooking) -[9.36 6.96 6.96 6.96 3.84 6.96 6.96] -xshow -end grestore -end grestore - -% Term_typing -> Cooking -newpath 331 127 moveto -352 147 387 179 410 202 curveto +0.000 0.000 0.000 edgecolor +newpath 435.492 529.529 moveto +425 531 lineto +434.119 536.393 lineto +closepath stroke +grestore +% Declarations->Cemitcodes +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 1103 371 moveto +1013 358 811 328 715 314 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 715.492 310.529 moveto +705 312 lineto +714.119 317.393 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 408 205 moveto -418 209 lineto -413 200 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 408 205 moveto -418 209 lineto -413 200 lineto -closepath -stroke -end grestore - -% Indtypes -gsave 10 dict begin -436 110 37 18 ellipse_path -stroke -gsave 10 dict begin -411 105 moveto -(Indtypes) -[4.56 6.96 6.96 3.84 6.96 6.96 6.24 5.52] -xshow -end grestore -end grestore - -% Term_typing -> Indtypes -newpath 362 110 moveto -370 110 379 110 388 110 curveto +0.000 0.000 0.000 edgecolor +newpath 715.492 310.529 moveto +705 312 lineto +714.119 317.393 lineto +closepath stroke +grestore +% Sign +gsave +0.502 1.000 0.820 nodecolor +1697 306 27 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +1697 306 27 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +1697 301 moveto 26 -0.5 (Sign) alignedtext +grestore +% Declarations->Sign +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 1193 372 moveto +1300 359 1563 324 1660 311 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 1660.4 314.478 moveto +1670 310 lineto +1659.7 307.512 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 388 114 moveto -398 110 lineto -388 107 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 388 114 moveto -398 110 lineto -388 107 lineto -closepath -stroke -end grestore - -% Environ -gsave 10 dict begin -1174 181 36 18 ellipse_path -stroke -gsave 10 dict begin -1151 176 moveto -(Environ) -[8.4 6.48 6.96 3.84 4.56 6.96 6.96] -xshow -end grestore -end grestore - -% Cbytegen -> Environ -newpath 841 166 moveto -911 169 1054 175 1128 179 curveto +0.000 0.000 0.000 edgecolor +newpath 1660.4 314.478 moveto +1670 310 lineto +1659.7 307.512 lineto +closepath stroke +grestore +% Retroknowledge +gsave +0.502 1.000 0.820 nodecolor +1221 306 59.1777 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +1221 306 59.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +1221 301 moveto 92 -0.5 (Retroknowledge) alignedtext +grestore +% Declarations->Retroknowledge +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 1165 361 moveto +1175 352 1186 341 1197 330 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 1199.4 332.546 moveto +1204 323 lineto +1194.45 327.596 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 1128 183 moveto -1138 179 lineto -1128 176 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 1128 183 moveto -1138 179 lineto -1128 176 lineto -closepath -stroke -end grestore - -% Cooking -> Reduction -newpath 473 227 moveto -485 228 498 229 510 229 curveto -603 231 626 233 718 229 curveto -773 226 834 220 876 214 curveto +0.000 0.000 0.000 edgecolor +newpath 1199.4 332.546 moveto +1204 323 lineto +1194.45 327.596 lineto +closepath stroke +grestore +% Sign->Term +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 1671 300 moveto +1576 277 1241 197 1130 170 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 1130.49 166.529 moveto +1120 168 lineto +1129.12 173.393 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 876 217 moveto -886 213 lineto -876 211 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 876 217 moveto -886 213 lineto -876 211 lineto -closepath -stroke -end grestore - -% Indtypes -> Typeops -newpath 474 110 moveto -484 110 495 110 505 110 curveto +0.000 0.000 0.000 edgecolor +newpath 1130.49 166.529 moveto +1120 168 lineto +1129.12 173.393 lineto +closepath stroke +grestore +% Retroknowledge->Cbytecodes +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 1230 288 moveto +1234 280 1239 270 1244 261 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 1247.2 262.441 moveto +1249 252 lineto +1241.08 259.042 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 505 114 moveto -515 110 lineto -505 107 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 505 114 moveto -515 110 lineto -505 107 lineto -closepath -stroke -end grestore - -% Term -gsave 10 dict begin -1666 173 28 18 ellipse_path -stroke -gsave 10 dict begin -1651 168 moveto -(Term) -[7.2 6.24 4.8 10.8] -xshow -end grestore -end grestore - -% Term -> Univ -newpath 1685 186 moveto -1699 196 1719 211 1736 222 curveto +0.000 0.000 0.000 edgecolor +newpath 1247.2 262.441 moveto +1249 252 lineto +1241.08 259.042 lineto +closepath stroke +grestore +% Entries->Sign +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 1411 868 moveto +1442 844 1496 795 1496 738 curveto +1496 738 1496 738 1496 450 curveto +1496 370 1604 330 1661 314 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 1661.88 317.393 moveto +1671 312 lineto +1660.51 310.529 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 1734 225 moveto -1744 228 lineto -1738 219 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 1734 225 moveto -1744 228 lineto -1738 219 lineto -closepath -stroke -end grestore - -% Esubst -gsave 10 dict begin -1763 173 32 18 ellipse_path -stroke -gsave 10 dict begin -1743 168 moveto -(Esubst) -[8.4 5.52 6.96 6.96 5.28 3.84] -xshow -end grestore -end grestore - -% Term -> Esubst -newpath 1694 173 moveto -1702 173 1711 173 1720 173 curveto +0.000 0.000 0.000 edgecolor +newpath 1661.88 317.393 moveto +1671 312 lineto +1660.51 310.529 lineto +closepath stroke +grestore +% Indtypes +gsave +0.502 1.000 0.820 nodecolor +539 1026 37.1777 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +539 1026 37.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +539 1021 moveto 48 -0.5 (Indtypes) alignedtext +grestore +% Indtypes->Typeops +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 574 1020 moveto +650 1008 831 977 915 962 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 915.881 965.393 moveto +925 960 lineto +914.508 958.529 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 1720 177 moveto -1730 173 lineto -1720 170 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 1720 177 moveto -1730 173 lineto -1720 170 lineto -closepath -stroke -end grestore - -% Subtyping -gsave 10 dict begin -552 56 42 18 ellipse_path -stroke -gsave 10 dict begin -523 51 moveto -(Subtyping) -[7.68 6.96 6.96 3.84 6.96 6.96 3.84 6.96 6.96] -xshow -end grestore -end grestore - -% Subtyping -> Inductive -newpath 581 69 moveto -597 77 618 86 636 93 curveto +0.000 0.000 0.000 edgecolor +newpath 915.881 965.393 moveto +925 960 lineto +914.508 958.529 lineto +closepath stroke +grestore +% Type_errors +gsave +0.502 1.000 0.820 nodecolor +713 810 47.1758 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +713 810 47.1758 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +713 805 moveto 69 -0.5 (Type_errors) alignedtext +grestore +% Inductive->Type_errors +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 813 868 moveto +794 858 769 843 748 830 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 749.441 826.797 moveto +739 825 lineto +746.042 832.916 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 634 96 moveto -645 97 lineto -637 90 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 634 96 moveto -645 97 lineto -637 90 lineto -closepath -stroke -end grestore - -% Modops -gsave 10 dict begin -674 18 36 18 ellipse_path -stroke -gsave 10 dict begin -650 13 moveto -(Modops) -[12.48 6.96 6.96 6.96 6.96 5.52] -xshow -end grestore -end grestore - -% Subtyping -> Modops -newpath 586 45 moveto -601 41 618 35 633 31 curveto +0.000 0.000 0.000 edgecolor +newpath 749.441 826.797 moveto +739 825 lineto +746.042 832.916 lineto +closepath stroke +grestore +% Reduction +gsave +0.502 1.000 0.820 nodecolor +713 738 41.1755 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +713 738 41.1755 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +713 733 moveto 57 -0.5 (Reduction) alignedtext +grestore +% Type_errors->Reduction +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 713 792 moveto +713 784 713 775 713 766 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 716.5 766 moveto +713 756 lineto +709.5 766 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 634 34 moveto -643 28 lineto -632 28 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 634 34 moveto -643 28 lineto -632 28 lineto -closepath -stroke -end grestore - -% Modops -> Entries -newpath 705 27 moveto -722 32 743 39 761 44 curveto +0.000 0.000 0.000 edgecolor +newpath 716.5 766 moveto +713 756 lineto +709.5 766 lineto +closepath stroke +grestore +% Modops +gsave +0.502 1.000 0.820 nodecolor +1404 954 35.1752 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +1404 954 35.1752 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +1404 949 moveto 45 -0.5 (Modops) alignedtext +grestore +% Modops->Environ +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 1439 951 moveto +1511 943 1670 914 1670 810 curveto +1670 810 1670 810 1670 738 curveto +1670 639 1322 606 1194 597 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 1194.3 593.512 moveto +1184 596 lineto +1193.6 600.478 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 760 47 moveto -771 47 lineto -762 41 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 760 47 moveto -771 47 lineto -762 41 lineto -closepath -stroke -end grestore - -% Modops -> Cbytegen -newpath 686 35 moveto -695 48 707 67 718 83 curveto -735 107 733 118 754 137 curveto -757 140 761 143 765 145 curveto +0.000 0.000 0.000 edgecolor +newpath 1194.3 593.512 moveto +1184 596 lineto +1193.6 600.478 lineto +closepath stroke +grestore +% Modops->Entries +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 1401 936 moveto +1400 928 1398 919 1396 910 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 1399.39 909.119 moveto +1394 900 lineto +1392.53 910.492 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 763 148 moveto -773 151 lineto -767 142 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 763 148 moveto -773 151 lineto -767 142 lineto -closepath -stroke -end grestore - -% Sign -> Term -newpath 1454 99 moveto -1489 98 1553 100 1602 119 curveto -1626 129 1637 135 1649 148 curveto +0.000 0.000 0.000 edgecolor +newpath 1399.39 909.119 moveto +1394 900 lineto +1392.53 910.492 lineto +closepath stroke +grestore +% Mod_typing +gsave +0.502 1.000 0.820 nodecolor +1157 1170 47.1758 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +1157 1170 47.1758 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +1157 1165 moveto 69 -0.5 (Mod_typing) alignedtext +grestore +% Subtyping +gsave +0.502 1.000 0.820 nodecolor +1404 1026 42.1777 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +1404 1026 42.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +1404 1021 moveto 58 -0.5 (Subtyping) alignedtext +grestore +% Mod_typing->Subtyping +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 1183 1155 moveto +1227 1129 1320 1075 1370 1046 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 1371.96 1048.92 moveto +1379 1041 lineto +1368.56 1042.8 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 1647 151 moveto -1656 156 lineto -1652 146 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 1647 151 moveto -1656 156 lineto -1652 146 lineto -closepath -stroke -end grestore - -% Safe_typing -gsave 10 dict begin -47 85 46 18 ellipse_path -stroke -gsave 10 dict begin -13 80 moveto -(Safe_typing) -[7.68 6.24 4.08 6.24 6.96 3.84 6.96 6.96 3.84 6.96 6.96] -xshow -end grestore -end grestore - -% Mod_typing -gsave 10 dict begin -179 85 48 18 ellipse_path -stroke -gsave 10 dict begin -143 80 moveto -(Mod_typing) -[12.48 6.96 6.96 6.96 3.84 6.96 6.96 3.84 6.96 6.96] -xshow -end grestore -end grestore - -% Safe_typing -> Mod_typing -newpath 94 85 moveto -103 85 111 85 120 85 curveto +0.000 0.000 0.000 edgecolor +newpath 1371.96 1048.92 moveto +1379 1041 lineto +1368.56 1042.8 lineto +closepath stroke +grestore +% Term_typing +gsave +0.502 1.000 0.820 nodecolor +960 1098 50.1777 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +960 1098 50.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +960 1093 moveto 74 -0.5 (Term_typing) alignedtext +grestore +% Mod_typing->Term_typing +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 1123 1157 moveto +1090 1145 1040 1127 1005 1114 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 1005.58 1110.52 moveto +995 1111 lineto +1003.57 1117.23 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 120 89 moveto -130 85 lineto -120 82 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 120 89 moveto -130 85 lineto -120 82 lineto -closepath -stroke -end grestore - -% Mod_typing -> Term_typing -newpath 223 93 moveto -235 95 248 98 260 100 curveto +0.000 0.000 0.000 edgecolor +newpath 1005.58 1110.52 moveto +995 1111 lineto +1003.57 1117.23 lineto +closepath stroke +grestore +% Subtyping->Typeops +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 1365 1020 moveto +1282 1007 1092 975 1005 962 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 1005.49 958.529 moveto +995 960 lineto +1004.12 965.393 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 260 103 moveto -270 102 lineto -261 97 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 260 103 moveto -270 102 lineto -261 97 lineto -closepath -stroke -end grestore - -% Mod_typing -> Subtyping -newpath 227 81 moveto -297 75 428 65 500 60 curveto +0.000 0.000 0.000 edgecolor +newpath 1005.49 958.529 moveto +995 960 lineto +1004.12 965.393 lineto +closepath stroke +grestore +% Subtyping->Modops +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 1404 1008 moveto +1404 1000 1404 991 1404 982 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 1407.5 982 moveto +1404 972 lineto +1400.5 982 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 500 63 moveto -510 59 lineto -500 57 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 500 63 moveto -510 59 lineto -500 57 lineto -closepath -stroke -end grestore - -% Closure -> Environ -newpath 1085 201 moveto -1099 198 1116 194 1131 190 curveto +0.000 0.000 0.000 edgecolor +newpath 1407.5 982 moveto +1404 972 lineto +1400.5 982 lineto +closepath stroke +grestore +% Term_typing->Cooking +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 960 1080 moveto +960 1072 960 1063 960 1054 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 963.5 1054 moveto +960 1044 lineto +956.5 1054 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 1132 193 moveto -1141 188 lineto -1131 187 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 1132 193 moveto -1141 188 lineto -1131 187 lineto -closepath -stroke -end grestore - -% Mod_subst -> Term -newpath 1594 155 moveto -1606 158 1618 161 1630 164 curveto +0.000 0.000 0.000 edgecolor +newpath 963.5 1054 moveto +960 1044 lineto +956.5 1054 lineto +closepath stroke +grestore +% Term_typing->Indtypes +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 915 1090 moveto +833 1077 665 1048 584 1034 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 584.492 1030.53 moveto +574 1032 lineto +583.119 1037.39 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 1630 167 moveto -1640 166 lineto -1631 161 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 1630 167 moveto -1640 166 lineto -1631 161 lineto -closepath -stroke -end grestore - -% Declarations -gsave 10 dict begin -1295 181 49 18 ellipse_path -stroke -gsave 10 dict begin -1259 176 moveto -(Declarations) -[10.08 6.24 6.24 3.84 6.24 4.56 6.24 3.84 3.84 6.96 6.96 5.52] -xshow -end grestore -end grestore - -% Environ -> Declarations -newpath 1210 181 moveto -1218 181 1227 181 1236 181 curveto +0.000 0.000 0.000 edgecolor +newpath 584.492 1030.53 moveto +574 1032 lineto +583.119 1037.39 lineto +closepath stroke +grestore +% Reduction->Closure +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 713 720 moveto +713 712 713 703 713 694 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 716.5 694 moveto +713 684 lineto +709.5 694 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 1236 185 moveto -1246 181 lineto -1236 178 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 1236 185 moveto -1246 181 lineto -1236 178 lineto -closepath -stroke -end grestore - -% Declarations -> Cemitcodes -newpath 1341 188 moveto -1351 189 1363 191 1373 192 curveto +0.000 0.000 0.000 edgecolor +newpath 716.5 694 moveto +713 684 lineto +709.5 694 lineto +closepath stroke +grestore +% Reduction->Conv_oracle +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 690 723 moveto +633 686 482 587 415 544 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 417.1 541.2 moveto +407 538 lineto +412.9 546.8 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 1373 195 moveto -1383 194 lineto -1374 189 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 1373 195 moveto -1383 194 lineto -1374 189 lineto -closepath -stroke -end grestore - -% Declarations -> Sign -newpath 1320 165 moveto -1343 152 1375 132 1398 118 curveto +0.000 0.000 0.000 edgecolor +newpath 417.1 541.2 moveto +407 538 lineto +412.9 546.8 lineto +closepath stroke +grestore +% Safe_typing +gsave +0.502 1.000 0.820 nodecolor +1157 1242 47.1777 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +1157 1242 47.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +1157 1237 moveto 68 -0.5 (Safe_typing) alignedtext +grestore +% Safe_typing->Mod_typing +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 1157 1224 moveto +1157 1216 1157 1207 1157 1198 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 1160.5 1198 moveto +1157 1188 lineto +1153.5 1198 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 1401 120 moveto -1407 112 lineto -1397 115 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 1401 120 moveto -1407 112 lineto -1397 115 lineto -closepath +0.000 0.000 0.000 edgecolor +newpath 1160.5 1198 moveto +1157 1188 lineto +1153.5 1198 lineto +closepath stroke +grestore +% Univ->Names +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 555 84 moveto +504 71 388 42 327 27 curveto stroke -end grestore - -% Cbytecodes -> Term -newpath 1595 190 moveto -1607 188 1619 185 1630 182 curveto +0.000 0.000 0.000 edgecolor +newpath 327.492 23.5292 moveto +317 25 lineto +326.119 30.3933 lineto +closepath fill +0.393658 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 327.492 23.5292 moveto +317 25 lineto +326.119 30.3933 lineto +closepath stroke +grestore +% Vconv +gsave +0.502 1.000 0.820 nodecolor +1152 810 31.1748 18 ellipse_path fill +0.393658 setlinewidth +filled +0.502 1.000 0.820 nodecolor +1152 810 31.1748 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +1152 805 moveto 37 -0.5 (Vconv) alignedtext +grestore +% Vconv->Csymtable +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 1151 792 moveto +1150 767 1149 723 1148 694 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 1151.5 694 moveto +1148 684 lineto +1144.5 694 lineto +closepath fill +0.393658 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 1631 185 moveto -1640 179 lineto -1629 179 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 1631 185 moveto -1640 179 lineto -1629 179 lineto -closepath +0.000 0.000 0.000 edgecolor +newpath 1151.5 694 moveto +1148 684 lineto +1144.5 694 lineto +closepath stroke +grestore +% Vconv->Reduction +gsave +0.393658 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 1122 805 moveto +1047 792 852 760 761 746 curveto stroke -end grestore +0.000 0.000 0.000 edgecolor +newpath 761.492 742.529 moveto +751 744 lineto +760.119 749.393 lineto +closepath fill +0.393658 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 761.492 742.529 moveto +751 744 lineto +760.119 749.393 lineto +closepath stroke +grestore endpage showpage grestore @@ -1449,6 +1425,7 @@ grestore %%EndPage: 1 %%Trailer %%Pages: 1 +%%BoundingBox: 36 36 535 756 end restore %%EOF diff --git a/dev/ocamlweb-doc/library.dep.ps b/dev/ocamlweb-doc/library.dep.ps index 1c68240e..c9bb351e 100644 --- a/dev/ocamlweb-doc/library.dep.ps +++ b/dev/ocamlweb-doc/library.dep.ps @@ -1,9 +1,9 @@ %!PS-Adobe-2.0 -%%Creator: dot version 2.2 (Wed Jan 19 21:09:25 UTC 2005) -%%For: (herbelin) Hugo Herbelin +%%Creator: Graphviz version 2.12 (Tue Oct 23 13:46:12 UTC 2007) +%%For: (notin) Jean-Marc Notin,,, %%Title: G %%Pages: (atend) -%%BoundingBox: 35 35 577 207 +%%BoundingBox: (atend) %%EndComments save %%BeginProlog @@ -16,57 +16,7 @@ mark EncodingVector 0 ISOLatin1Encoding 0 255 getinterval putinterval - -EncodingVector - dup 306 /AE - dup 301 /Aacute - dup 302 /Acircumflex - dup 304 /Adieresis - dup 300 /Agrave - dup 305 /Aring - dup 303 /Atilde - dup 307 /Ccedilla - dup 311 /Eacute - dup 312 /Ecircumflex - dup 313 /Edieresis - dup 310 /Egrave - dup 315 /Iacute - dup 316 /Icircumflex - dup 317 /Idieresis - dup 314 /Igrave - dup 334 /Udieresis - dup 335 /Yacute - dup 376 /thorn - dup 337 /germandbls - dup 341 /aacute - dup 342 /acircumflex - dup 344 /adieresis - dup 346 /ae - dup 340 /agrave - dup 345 /aring - dup 347 /ccedilla - dup 351 /eacute - dup 352 /ecircumflex - dup 353 /edieresis - dup 350 /egrave - dup 355 /iacute - dup 356 /icircumflex - dup 357 /idieresis - dup 354 /igrave - dup 360 /dcroat - dup 361 /ntilde - dup 363 /oacute - dup 364 /ocircumflex - dup 366 /odieresis - dup 362 /ograve - dup 365 /otilde - dup 370 /oslash - dup 372 /uacute - dup 373 /ucircumflex - dup 374 /udieresis - dup 371 /ugrave - dup 375 /yacute - dup 377 /ydieresis +EncodingVector 45 /hyphen put % Set up ISO Latin 1 character encoding /starnetISO { @@ -98,8 +48,8 @@ cleartomark /InvScaleFactor 1.0 def /set_scale { - dup 1 exch div /InvScaleFactor exch def - dup scale + dup 1 exch div /InvScaleFactor exch def + scale } bind def % styles @@ -229,601 +179,587 @@ def } if %%EndSetup +setupLatin1 %%Page: 1 1 -%%PageBoundingBox: 36 36 577 207 -%%PageOrientation: Portrait +%%PageBoundingBox: 36 36 576 752 +%%PageOrientation: Landscape gsave -35 35 542 172 boxprim clip newpath -36 36 translate +36 36 576 752 boxprim clip newpath 0 0 1 beginpage -0.6750 set_scale -0 0 translate 0 rotate -0.000 0.000 0.000 graphcolor +0.985401 0.985401 set_scale 90 rotate 40.5333 -580.533 translate +0.000 0.000 1.000 graphcolor +newpath -4 -4 moveto +-4 544 lineto +723 544 lineto +723 -4 lineto +closepath fill +0.985401 setlinewidth +0.000 0.000 1.000 graphcolor +newpath -4 -4 moveto +-4 544 lineto +723 544 lineto +723 -4 lineto +closepath stroke +% Declare +gsave +0.502 1.000 0.820 nodecolor +488 436 34.1751 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +488 436 34.1751 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor 14.00 /Times-Roman set_font - -% States -gsave 10 dict begin -30 18 30 18 ellipse_path -stroke -gsave 10 dict begin -13 13 moveto -(States) -[7.44 4.08 6.24 3.84 6.24 5.52] -xshow -end grestore -end grestore - -% Library -gsave 10 dict begin -132 18 34 18 ellipse_path -stroke -gsave 10 dict begin -110 13 moveto -(Library) -[8.4 3.84 6.96 4.56 6.24 4.8 6.96] -xshow -end grestore -end grestore - -% States -> Library -newpath 60 18 moveto -69 18 78 18 87 18 curveto +488 431 moveto 43 -0.5 (Declare) alignedtext +grestore +% Dischargedhypsmap +gsave +0.502 1.000 0.820 nodecolor +488 353 69.1764 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +488 353 69.1764 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +488 348 moveto 113 -0.5 (Dischargedhypsmap) alignedtext +grestore +% Declare->Dischargedhypsmap +gsave +0.985401 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 488 418 moveto +488 407 488 393 488 381 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 491.5 381 moveto +488 371 lineto +484.5 381 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 87 22 moveto -97 18 lineto -87 15 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 87 22 moveto -97 18 lineto -87 15 lineto -closepath -stroke -end grestore - -% Declaremods -gsave 10 dict begin -274 18 50 18 ellipse_path -stroke -gsave 10 dict begin -236 13 moveto -(Declaremods) -[10.08 6.24 6.24 3.84 6.24 4.56 6.24 10.8 6.96 6.96 5.52] -xshow -end grestore -end grestore - -% Library -> Declaremods -newpath 167 18 moveto -181 18 197 18 213 18 curveto +0.000 0.000 0.000 edgecolor +newpath 491.5 381 moveto +488 371 lineto +484.5 381 lineto +closepath stroke +grestore +% Impargs +gsave +0.502 1.000 0.820 nodecolor +201 353 36.1777 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +201 353 36.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +201 348 moveto 46 -0.5 (Impargs) alignedtext +grestore +% Declare->Impargs +gsave +0.985401 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 458 427 moveto +407 412 301 382 242 365 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 242.584 361.521 moveto +232 362 lineto +240.573 368.226 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 213 22 moveto -223 18 lineto -213 15 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 213 22 moveto -223 18 lineto -213 15 lineto -closepath -stroke -end grestore - -% Nametab -gsave 10 dict begin -523 134 39 18 ellipse_path -stroke -gsave 10 dict begin -497 129 moveto -(Nametab) -[9.6 6.24 10.8 6 4.08 6.24 6.96] -xshow -end grestore -end grestore - -% Libnames -gsave 10 dict begin -642 134 41 18 ellipse_path -stroke -gsave 10 dict begin -613 129 moveto -(Libnames) -[8.4 3.84 6.96 6.96 6.24 10.8 6.24 5.52] -xshow -end grestore -end grestore - -% Nametab -> Libnames -newpath 562 134 moveto -571 134 580 134 590 134 curveto +0.000 0.000 0.000 edgecolor +newpath 242.584 361.521 moveto +232 362 lineto +240.573 368.226 lineto +closepath stroke +grestore +% Decl_kinds +gsave +0.502 1.000 0.820 nodecolor +661 353 44.1757 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +661 353 44.1757 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +661 348 moveto 63 -0.5 (Decl_kinds) alignedtext +grestore +% Declare->Decl_kinds +gsave +0.985401 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 514 424 moveto +543 410 590 388 624 372 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 625.958 374.916 moveto +633 367 lineto +622.559 368.797 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 590 138 moveto -600 134 lineto -590 131 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 590 138 moveto -600 134 lineto -590 131 lineto -closepath -stroke -end grestore - -% Summary -gsave 10 dict begin -642 65 40 18 ellipse_path -stroke -gsave 10 dict begin -614 60 moveto -(Summary) -[7.68 6.96 10.8 10.8 6.24 4.8 6.96] -xshow -end grestore -end grestore - -% Nametab -> Summary -newpath 547 120 moveto -565 110 589 96 608 84 curveto +0.000 0.000 0.000 edgecolor +newpath 625.958 374.916 moveto +633 367 lineto +622.559 368.797 lineto +closepath stroke +grestore +% Lib +gsave +0.502 1.000 0.820 nodecolor +219 270 27 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +219 270 27 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +219 265 moveto 20 -0.5 (Lib) alignedtext +grestore +% Dischargedhypsmap->Lib +gsave +0.985401 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 443 339 moveto +390 323 302 296 254 281 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 254.584 277.521 moveto +244 278 lineto +252.573 284.226 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 610 87 moveto -617 79 lineto -607 81 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 610 87 moveto -617 79 lineto -607 81 lineto -closepath -stroke -end grestore - -% Nameops -gsave 10 dict begin -760 134 40 18 ellipse_path -stroke -gsave 10 dict begin -733 129 moveto -(Nameops) -[9.6 6.24 10.8 6.24 6.96 6.96 5.52] -xshow -end grestore -end grestore - -% Libnames -> Nameops -newpath 684 134 moveto -693 134 701 134 710 134 curveto +0.000 0.000 0.000 edgecolor +newpath 254.584 277.521 moveto +244 278 lineto +252.573 284.226 lineto +closepath stroke +grestore +% Global +gsave +0.502 1.000 0.820 nodecolor +82 270 32.1777 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +82 270 32.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +82 265 moveto 38 -0.5 (Global) alignedtext +grestore +% Impargs->Global +gsave +0.985401 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 180 338 moveto +161 325 132 305 110 290 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 112.1 287.2 moveto +102 284 lineto +107.9 292.8 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 710 138 moveto -720 134 lineto -710 131 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 710 138 moveto -720 134 lineto -710 131 lineto -closepath -stroke -end grestore - -% Lib -gsave 10 dict begin -413 153 27 18 ellipse_path -stroke -gsave 10 dict begin -402 148 moveto -(Lib) -[8.4 3.84 6.96] -xshow -end grestore -end grestore - -% Declaremods -> Lib -newpath 315 29 moveto -325 33 336 38 344 45 curveto -359 58 383 99 399 127 curveto +0.000 0.000 0.000 edgecolor +newpath 112.1 287.2 moveto +102 284 lineto +107.9 292.8 lineto +closepath stroke +grestore +% Impargs->Lib +gsave +0.985401 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 205 335 moveto +207 324 210 310 213 298 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 216.471 298.492 moveto +215 288 lineto +209.607 297.119 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 396 129 moveto -404 136 lineto -402 126 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 396 129 moveto -404 136 lineto -402 126 lineto -closepath -stroke -end grestore - -% Global -gsave 10 dict begin -413 65 32 18 ellipse_path -stroke -gsave 10 dict begin -393 60 moveto -(Global) -[10.08 3.84 6.96 6.96 6.24 3.84] -xshow -end grestore -end grestore - -% Declaremods -> Global -newpath 311 30 moveto -331 37 355 45 375 52 curveto +0.000 0.000 0.000 edgecolor +newpath 216.471 298.492 moveto +215 288 lineto +209.607 297.119 lineto +closepath stroke +grestore +% Declaremods +gsave +0.502 1.000 0.820 nodecolor +65 353 49.1759 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +65 353 49.1759 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +65 348 moveto 73 -0.5 (Declaremods) alignedtext +grestore +% Declaremods->Global +gsave +0.985401 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 69 335 moveto +71 324 74 310 76 298 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 79.4708 298.492 moveto +78 288 lineto +72.6067 297.119 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 374 55 moveto -385 55 lineto -376 49 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 374 55 moveto -385 55 lineto -376 49 lineto -closepath -stroke -end grestore - -% Libobject -gsave 10 dict begin -523 188 40 18 ellipse_path -stroke -gsave 10 dict begin -495 183 moveto -(Libobject) -[8.4 3.84 6.96 6.96 6.96 3.84 6.24 6.24 3.84] -xshow -end grestore -end grestore - -% Libobject -> Libnames -newpath 552 175 moveto -567 168 587 159 604 151 curveto +0.000 0.000 0.000 edgecolor +newpath 79.4708 298.492 moveto +78 288 lineto +72.6067 297.119 lineto +closepath stroke +grestore +% Declaremods->Lib +gsave +0.985401 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 93 338 moveto +120 324 161 301 189 286 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 190.958 288.916 moveto +198 281 lineto +187.559 282.797 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 605 154 moveto -613 147 lineto -602 148 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 605 154 moveto -613 147 lineto -602 148 lineto -closepath -stroke -end grestore - -% Lib -> Nametab -newpath 439 148 moveto -450 146 464 144 476 142 curveto +0.000 0.000 0.000 edgecolor +newpath 190.958 288.916 moveto +198 281 lineto +187.559 282.797 lineto +closepath stroke +grestore +% Summary +gsave +0.502 1.000 0.820 nodecolor +69 103 40.1755 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +69 103 40.1755 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +69 98 moveto 55 -0.5 (Summary) alignedtext +grestore +% Global->Summary +gsave +0.985401 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 81 252 moveto +78 223 74 166 71 131 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 74.4778 130.602 moveto +70 121 lineto +67.5125 131.299 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 477 145 moveto -486 140 lineto -476 139 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 477 145 moveto -486 140 lineto -476 139 lineto -closepath -stroke -end grestore - -% Lib -> Libobject -newpath 437 161 moveto -450 165 466 170 480 174 curveto +0.000 0.000 0.000 edgecolor +newpath 74.4778 130.602 moveto +70 121 lineto +67.5125 131.299 lineto +closepath stroke +grestore +% Libnames +gsave +0.502 1.000 0.820 nodecolor +203 103 40.1755 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +203 103 40.1755 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +203 98 moveto 55 -0.5 (Libnames) alignedtext +grestore +% Global->Libnames +gsave +0.985401 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 94 253 moveto +115 224 159 164 184 129 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 186.8 131.1 moveto +190 121 lineto +181.2 126.9 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 479 177 moveto -490 177 lineto -481 171 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 479 177 moveto -490 177 lineto -481 171 lineto -closepath -stroke -end grestore - -% Impargs -gsave 10 dict begin -274 126 36 18 ellipse_path -stroke -gsave 10 dict begin -251 121 moveto -(Impargs) -[4.56 10.56 6.96 6.24 4.32 6.96 5.52] -xshow -end grestore -end grestore - -% Impargs -> Lib -newpath 308 133 moveto -329 137 355 142 377 146 curveto +0.000 0.000 0.000 edgecolor +newpath 186.8 131.1 moveto +190 121 lineto +181.2 126.9 lineto +closepath stroke +grestore +% Nametab +gsave +0.502 1.000 0.820 nodecolor +203 186 38.1777 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +203 186 38.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +203 181 moveto 50 -0.5 (Nametab) alignedtext +grestore +% Lib->Nametab +gsave +0.985401 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 216 252 moveto +214 241 211 226 209 214 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 212.393 213.119 moveto +207 204 lineto +205.529 214.492 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 377 149 moveto -387 148 lineto -378 143 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 377 149 moveto -387 148 lineto -378 143 lineto -closepath -stroke -end grestore - -% Impargs -> Global -newpath 304 116 moveto -316 111 331 105 344 99 curveto -357 94 369 88 381 82 curveto +0.000 0.000 0.000 edgecolor +newpath 212.393 213.119 moveto +207 204 lineto +205.529 214.492 lineto +closepath stroke +grestore +% Libobject +gsave +0.502 1.000 0.820 nodecolor +329 186 40.1777 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +329 186 40.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +329 181 moveto 54 -0.5 (Libobject) alignedtext +grestore +% Lib->Libobject +gsave +0.985401 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 237 256 moveto +254 243 280 223 300 208 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 302.1 210.8 moveto +308 202 lineto +297.9 205.2 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 382 85 moveto -390 78 lineto -379 79 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 382 85 moveto -390 78 lineto -379 79 lineto -closepath -stroke -end grestore - -% Global -> Libnames -newpath 443 73 moveto -473 81 522 94 564 107 curveto -576 111 589 115 600 119 curveto +0.000 0.000 0.000 edgecolor +newpath 302.1 210.8 moveto +308 202 lineto +297.9 205.2 lineto +closepath stroke +grestore +% Nameops +gsave +0.502 1.000 0.820 nodecolor +203 20 39.1777 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +203 20 39.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +203 15 moveto 52 -0.5 (Nameops) alignedtext +grestore +% Libnames->Nameops +gsave +0.985401 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 203 85 moveto +203 74 203 60 203 48 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 206.5 48 moveto +203 38 lineto +199.5 48 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 599 122 moveto -610 122 lineto -601 116 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 599 122 moveto -610 122 lineto -601 116 lineto -closepath -stroke -end grestore - -% Global -> Summary -newpath 446 65 moveto -484 65 547 65 591 65 curveto +0.000 0.000 0.000 edgecolor +newpath 206.5 48 moveto +203 38 lineto +199.5 48 lineto +closepath stroke +grestore +% Goptions +gsave +0.502 1.000 0.820 nodecolor +322 353 38.1754 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +322 353 38.1754 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +322 348 moveto 51 -0.5 (Goptions) alignedtext +grestore +% Goptions->Lib +gsave +0.985401 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 303 337 moveto +287 324 263 305 245 291 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 246.831 287.951 moveto +237 284 lineto +242.221 293.219 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 591 69 moveto -601 65 lineto -591 62 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 591 69 moveto -601 65 lineto -591 62 lineto -closepath -stroke -end grestore - -% Goptions -gsave 10 dict begin -274 180 39 18 ellipse_path -stroke -gsave 10 dict begin -248 175 moveto -(Goptions) -[10.08 6.96 6.96 3.84 3.84 6.96 6.96 5.52] -xshow -end grestore -end grestore - -% Goptions -> Lib -newpath 310 173 moveto -331 169 356 164 377 160 curveto +0.000 0.000 0.000 edgecolor +newpath 246.831 287.951 moveto +237 284 lineto +242.221 293.219 lineto +closepath stroke +grestore +% Nametab->Summary +gsave +0.985401 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 180 172 moveto +158 159 125 138 101 123 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 102.441 119.797 moveto +92 118 lineto +99.0418 125.916 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 378 163 moveto -387 158 lineto -377 157 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 378 163 moveto -387 158 lineto -377 157 lineto -closepath -stroke -end grestore - -% Dischargedhypsmap -gsave 10 dict begin -274 234 70 18 ellipse_path -stroke -gsave 10 dict begin -217 229 moveto -(Dischargedhypsmap) -[10.08 3.84 5.52 6 6.96 6.24 4.32 6.72 6.24 6.96 6.48 6.96 6.96 5.52 10.8 6.24 6.96] -xshow -end grestore -end grestore - -% Dischargedhypsmap -> Lib -newpath 317 220 moveto -326 216 336 212 344 207 curveto -360 197 376 185 389 175 curveto +0.000 0.000 0.000 edgecolor +newpath 102.441 119.797 moveto +92 118 lineto +99.0418 125.916 lineto +closepath stroke +grestore +% Nametab->Libnames +gsave +0.985401 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 203 168 moveto +203 157 203 143 203 131 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 206.5 131 moveto +203 121 lineto +199.5 131 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 392 177 moveto -397 168 lineto -387 172 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 392 177 moveto -397 168 lineto -387 172 lineto -closepath -stroke -end grestore - -% Declare -gsave 10 dict begin -132 126 35 18 ellipse_path -stroke -gsave 10 dict begin -109 121 moveto -(Declare) -[10.08 6.24 6.24 3.84 6.24 4.56 6.24] -xshow -end grestore -end grestore - -% Declare -> Impargs -newpath 168 126 moveto -186 126 208 126 228 126 curveto +0.000 0.000 0.000 edgecolor +newpath 206.5 131 moveto +203 121 lineto +199.5 131 lineto +closepath stroke +grestore +% Libobject->Libnames +gsave +0.985401 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 306 171 moveto +286 158 256 138 235 124 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 236.262 120.635 moveto +226 118 lineto +232.379 126.459 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 228 130 moveto -238 126 lineto -228 123 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 228 130 moveto -238 126 lineto -228 123 lineto -closepath -stroke -end grestore - -% Declare -> Dischargedhypsmap -newpath 144 143 moveto -157 161 179 189 204 207 curveto -209 210 215 213 221 216 curveto +0.000 0.000 0.000 edgecolor +newpath 236.262 120.635 moveto +226 118 lineto +232.379 126.459 lineto +closepath stroke +grestore +% Library +gsave +0.502 1.000 0.820 nodecolor +65 436 34.1751 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +65 436 34.1751 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +65 431 moveto 43 -0.5 (Library) alignedtext +grestore +% Library->Declaremods +gsave +0.985401 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 65 418 moveto +65 407 65 393 65 381 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 68.5001 381 moveto +65 371 lineto +61.5001 381 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 219 219 moveto -230 220 lineto -222 213 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 219 219 moveto -230 220 lineto -222 213 lineto -closepath -stroke -end grestore - -% Decl_kinds -gsave 10 dict begin -274 72 45 18 ellipse_path -stroke -gsave 10 dict begin -241 67 moveto -(Decl_kinds) -[10.08 6.24 6.24 3.84 6.96 6.96 3.84 6.96 6.96 5.52] -xshow -end grestore -end grestore - -% Declare -> Decl_kinds -newpath 161 115 moveto -181 107 209 97 232 88 curveto +0.000 0.000 0.000 edgecolor +newpath 68.5001 381 moveto +65 371 lineto +61.5001 381 lineto +closepath stroke +grestore +% States +gsave +0.502 1.000 0.820 nodecolor +65 519 29.1747 18 ellipse_path fill +0.985401 setlinewidth +filled +0.502 1.000 0.820 nodecolor +65 519 29.1747 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +65 514 moveto 33 -0.5 (States) alignedtext +grestore +% States->Library +gsave +0.985401 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 65 501 moveto +65 490 65 476 65 464 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 68.5001 464 moveto +65 454 lineto +61.5001 464 lineto +closepath fill +0.985401 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 233 91 moveto -241 84 lineto -230 85 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 233 91 moveto -241 84 lineto -230 85 lineto -closepath -stroke -end grestore +0.000 0.000 0.000 edgecolor +newpath 68.5001 464 moveto +65 454 lineto +61.5001 464 lineto +closepath stroke +grestore endpage showpage grestore @@ -831,6 +767,7 @@ grestore %%EndPage: 1 %%Trailer %%Pages: 1 +%%BoundingBox: 36 36 576 752 end restore %%EOF diff --git a/dev/ocamlweb-doc/proofs.dep.ps b/dev/ocamlweb-doc/proofs.dep.ps index 0e78f422..4dd045ce 100644 --- a/dev/ocamlweb-doc/proofs.dep.ps +++ b/dev/ocamlweb-doc/proofs.dep.ps @@ -1,9 +1,9 @@ %!PS-Adobe-2.0 -%%Creator: dot version 2.2 (Wed Jan 19 21:09:25 UTC 2005) -%%For: (herbelin) Hugo Herbelin +%%Creator: Graphviz version 2.12 (Tue Oct 23 13:46:12 UTC 2007) +%%For: (notin) Jean-Marc Notin,,, %%Title: G %%Pages: (atend) -%%BoundingBox: 35 35 577 136 +%%BoundingBox: (atend) %%EndComments save %%BeginProlog @@ -16,57 +16,7 @@ mark EncodingVector 0 ISOLatin1Encoding 0 255 getinterval putinterval - -EncodingVector - dup 306 /AE - dup 301 /Aacute - dup 302 /Acircumflex - dup 304 /Adieresis - dup 300 /Agrave - dup 305 /Aring - dup 303 /Atilde - dup 307 /Ccedilla - dup 311 /Eacute - dup 312 /Ecircumflex - dup 313 /Edieresis - dup 310 /Egrave - dup 315 /Iacute - dup 316 /Icircumflex - dup 317 /Idieresis - dup 314 /Igrave - dup 334 /Udieresis - dup 335 /Yacute - dup 376 /thorn - dup 337 /germandbls - dup 341 /aacute - dup 342 /acircumflex - dup 344 /adieresis - dup 346 /ae - dup 340 /agrave - dup 345 /aring - dup 347 /ccedilla - dup 351 /eacute - dup 352 /ecircumflex - dup 353 /edieresis - dup 350 /egrave - dup 355 /iacute - dup 356 /icircumflex - dup 357 /idieresis - dup 354 /igrave - dup 360 /dcroat - dup 361 /ntilde - dup 363 /oacute - dup 364 /ocircumflex - dup 366 /odieresis - dup 362 /ograve - dup 365 /otilde - dup 370 /oslash - dup 372 /uacute - dup 373 /ucircumflex - dup 374 /udieresis - dup 371 /ugrave - dup 375 /yacute - dup 377 /ydieresis +EncodingVector 45 /hyphen put % Set up ISO Latin 1 character encoding /starnetISO { @@ -98,8 +48,8 @@ cleartomark /InvScaleFactor 1.0 def /set_scale { - dup 1 exch div /InvScaleFactor exch def - dup scale + dup 1 exch div /InvScaleFactor exch def + scale } bind def % styles @@ -229,403 +179,463 @@ def } if %%EndSetup +setupLatin1 %%Page: 1 1 -%%PageBoundingBox: 36 36 577 136 -%%PageOrientation: Portrait +%%PageBoundingBox: 36 36 576 753 +%%PageOrientation: Landscape gsave -35 35 542 101 boxprim clip newpath -36 36 translate +36 36 576 753 boxprim clip newpath 0 0 1 beginpage -0.6923 set_scale -0 0 translate 0 rotate -0.000 0.000 0.000 graphcolor +0.870968 0.870968 set_scale 90 rotate 45.3333 -657.333 translate +0.000 0.000 1.000 graphcolor +newpath -4 -4 moveto +-4 616 lineto +819 616 lineto +819 -4 lineto +closepath fill +0.870968 setlinewidth +0.000 0.000 1.000 graphcolor +newpath -4 -4 moveto +-4 616 lineto +819 616 lineto +819 -4 lineto +closepath stroke +% Clenvtac +gsave +0.502 1.000 0.820 nodecolor +451 522 37.1753 18 ellipse_path fill +0.870968 setlinewidth +filled +0.502 1.000 0.820 nodecolor +451 522 37.1753 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor 14.00 /Times-Roman set_font - -% Tactic_debug -gsave 10 dict begin -163 72 51 18 ellipse_path -stroke -gsave 10 dict begin -125 67 moveto -(Tactic_debug) -[7.44 6.24 6.24 3.84 3.84 6.24 6.96 6.96 6.24 6.96 6.96 6.96] -xshow -end grestore -end grestore - -% Refiner -gsave 10 dict begin -287 72 34 18 ellipse_path -stroke -gsave 10 dict begin -266 67 moveto -(Refiner) -[9.12 6.24 4.8 3.84 6.96 6.24 4.56] -xshow -end grestore -end grestore - -% Tactic_debug -> Refiner -newpath 214 72 moveto -223 72 233 72 243 72 curveto +451 517 moveto 49 -0.5 (Clenvtac) alignedtext +grestore +% Evar_refiner +gsave +0.502 1.000 0.820 nodecolor +439 450 49.1777 18 ellipse_path fill +0.870968 setlinewidth +filled +0.502 1.000 0.820 nodecolor +439 450 49.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +439 445 moveto 72 -0.5 (Evar_refiner) alignedtext +grestore +% Clenvtac->Evar_refiner +gsave +0.870968 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 448 504 moveto +447 496 445 487 444 478 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 447.393 477.119 moveto +442 468 lineto +440.529 478.492 lineto +closepath fill +0.870968 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 243 76 moveto -253 72 lineto -243 69 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 243 76 moveto -253 72 lineto -243 69 lineto -closepath -stroke -end grestore - -% Logic -gsave 10 dict begin -390 72 30 18 ellipse_path -stroke -gsave 10 dict begin -373 67 moveto -(Logic) -[8.4 6.96 6.96 3.84 6.24] -xshow -end grestore -end grestore - -% Refiner -> Logic -newpath 321 72 moveto -330 72 340 72 350 72 curveto +0.000 0.000 0.000 edgecolor +newpath 447.393 477.119 moveto +442 468 lineto +440.529 478.492 lineto +closepath stroke +grestore +% Tacmach +gsave +0.502 1.000 0.820 nodecolor +711 450 38.1754 18 ellipse_path fill +0.870968 setlinewidth +filled +0.502 1.000 0.820 nodecolor +711 450 38.1754 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +711 445 moveto 51 -0.5 (Tacmach) alignedtext +grestore +% Clenvtac->Tacmach +gsave +0.870968 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 483 513 moveto +530 500 616 476 668 462 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 669.427 465.226 moveto +678 459 lineto +667.416 458.521 lineto +closepath fill +0.870968 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 350 76 moveto -360 72 lineto -350 69 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 350 76 moveto -360 72 lineto -350 69 lineto -closepath -stroke -end grestore - -% Tacmach -gsave 10 dict begin -163 126 38 18 ellipse_path -stroke -gsave 10 dict begin -137 121 moveto -(Tacmach) -[7.44 6.24 6.24 10.8 6.24 6 6.96] -xshow -end grestore -end grestore - -% Tacmach -> Refiner -newpath 191 114 moveto -209 106 232 96 251 88 curveto +0.000 0.000 0.000 edgecolor +newpath 669.427 465.226 moveto +678 459 lineto +667.416 458.521 lineto +closepath stroke +grestore +% Refiner +gsave +0.502 1.000 0.820 nodecolor +439 378 34.1777 18 ellipse_path fill +0.870968 setlinewidth +filled +0.502 1.000 0.820 nodecolor +439 378 34.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +439 373 moveto 42 -0.5 (Refiner) alignedtext +grestore +% Evar_refiner->Refiner +gsave +0.870968 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 439 432 moveto +439 424 439 415 439 406 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 442.5 406 moveto +439 396 lineto +435.5 406 lineto +closepath fill +0.870968 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 253 91 moveto -261 84 lineto -250 84 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 253 91 moveto -261 84 lineto -250 84 lineto -closepath -stroke -end grestore - -% Redexpr -gsave 10 dict begin -287 126 36 18 ellipse_path -stroke -gsave 10 dict begin -263 121 moveto -(Redexpr) -[9.12 6.24 6.96 5.76 6.96 6.96 4.56] -xshow -end grestore -end grestore - -% Tacmach -> Redexpr -newpath 202 126 moveto -214 126 227 126 240 126 curveto +0.000 0.000 0.000 edgecolor +newpath 442.5 406 moveto +439 396 lineto +435.5 406 lineto +closepath stroke +grestore +% Tacmach->Refiner +gsave +0.870968 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 678 441 moveto +628 428 533 403 480 389 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 480.584 385.521 moveto +470 386 lineto +478.573 392.226 lineto +closepath fill +0.870968 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 240 130 moveto -250 126 lineto -240 123 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 240 130 moveto -250 126 lineto -240 123 lineto -closepath -stroke -end grestore - -% Proof_trees -gsave 10 dict begin -502 72 45 18 ellipse_path -stroke -gsave 10 dict begin -469 67 moveto -(Proof_trees) -[7.68 4.56 6.96 6.96 4.56 6.96 3.84 4.56 6.24 6.24 5.52] -xshow -end grestore -end grestore - -% Logic -> Proof_trees -newpath 420 72 moveto -428 72 437 72 446 72 curveto +0.000 0.000 0.000 edgecolor +newpath 480.584 385.521 moveto +470 386 lineto +478.573 392.226 lineto +closepath stroke +grestore +% Redexpr +gsave +0.502 1.000 0.820 nodecolor +711 378 36.1752 18 ellipse_path fill +0.870968 setlinewidth +filled +0.502 1.000 0.820 nodecolor +711 378 36.1752 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +711 373 moveto 47 -0.5 (Redexpr) alignedtext +grestore +% Tacmach->Redexpr +gsave +0.870968 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 711 432 moveto +711 424 711 415 711 406 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 714.5 406 moveto +711 396 lineto +707.5 406 lineto +closepath fill +0.870968 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 446 76 moveto -456 72 lineto -446 69 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 446 76 moveto -456 72 lineto -446 69 lineto -closepath -stroke -end grestore - -% Proof_type -gsave 10 dict begin -628 72 44 18 ellipse_path -stroke -gsave 10 dict begin -597 67 moveto -(Proof_type) -[7.68 4.56 6.96 6.96 4.56 6.96 3.84 6.96 6.96 6.24] -xshow -end grestore -end grestore - -% Tacexpr -gsave 10 dict begin -744 72 35 18 ellipse_path -stroke -gsave 10 dict begin -721 67 moveto -(Tacexpr) -[7.44 6.24 6.24 5.76 6.96 6.96 4.56] -xshow -end grestore -end grestore - -% Proof_type -> Tacexpr -newpath 672 72 moveto -680 72 689 72 698 72 curveto +0.000 0.000 0.000 edgecolor +newpath 714.5 406 moveto +711 396 lineto +707.5 406 lineto +closepath stroke +grestore +% Decl_mode +gsave +0.502 1.000 0.820 nodecolor +698 594 45.1777 18 ellipse_path fill +0.870968 setlinewidth +filled +0.502 1.000 0.820 nodecolor +698 594 45.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +698 589 moveto 64 -0.5 (Decl_mode) alignedtext +grestore +% Pfedit +gsave +0.502 1.000 0.820 nodecolor +698 522 30.1777 18 ellipse_path fill +0.870968 setlinewidth +filled +0.502 1.000 0.820 nodecolor +698 522 30.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +698 517 moveto 34 -0.5 (Pfedit) alignedtext +grestore +% Decl_mode->Pfedit +gsave +0.870968 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 698 576 moveto +698 568 698 559 698 550 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 701.5 550 moveto +698 540 lineto +694.5 550 lineto +closepath fill +0.870968 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 698 76 moveto -708 72 lineto -698 69 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 698 76 moveto -708 72 lineto -698 69 lineto -closepath -stroke -end grestore - -% Proof_trees -> Proof_type -newpath 548 72 moveto -557 72 565 72 574 72 curveto +0.000 0.000 0.000 edgecolor +newpath 701.5 550 moveto +698 540 lineto +694.5 550 lineto +closepath stroke +grestore +% Pfedit->Evar_refiner +gsave +0.870968 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 671 514 moveto +628 503 543 479 488 464 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 488.584 460.521 moveto +478 461 lineto +486.573 467.226 lineto +closepath fill +0.870968 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 574 76 moveto -584 72 lineto -574 69 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 574 76 moveto -584 72 lineto -574 69 lineto -closepath -stroke -end grestore - -% Pfedit -gsave 10 dict begin -38 112 29 18 ellipse_path -stroke -gsave 10 dict begin -21 107 moveto -(Pfedit) -[7.68 4.08 6.24 6.96 3.84 3.84] -xshow -end grestore -end grestore - -% Pfedit -> Tacmach -newpath 67 115 moveto -81 117 99 118 115 120 curveto +0.000 0.000 0.000 edgecolor +newpath 488.584 460.521 moveto +478 461 lineto +486.573 467.226 lineto +closepath stroke +grestore +% Pfedit->Tacmach +gsave +0.870968 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 701 504 moveto +702 496 704 487 706 478 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 709.471 478.492 moveto +708 468 lineto +702.607 477.119 lineto +closepath fill +0.870968 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 115 123 moveto -125 122 lineto -116 117 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 115 123 moveto -125 122 lineto -116 117 lineto -closepath -stroke -end grestore - -% Evar_refiner -gsave 10 dict begin -163 18 49 18 ellipse_path -stroke -gsave 10 dict begin -127 13 moveto -(Evar_refiner) -[8.4 6.72 6.24 4.56 6.96 4.56 6.24 4.8 3.84 6.96 6.24 4.56] -xshow -end grestore -end grestore - -% Pfedit -> Evar_refiner -newpath 53 96 moveto -67 82 90 60 112 45 curveto -116 42 120 40 124 37 curveto +0.000 0.000 0.000 edgecolor +newpath 709.471 478.492 moveto +708 468 lineto +702.607 477.119 lineto +closepath stroke +grestore +% Logic +gsave +0.502 1.000 0.820 nodecolor +439 306 29.1747 18 ellipse_path fill +0.870968 setlinewidth +filled +0.502 1.000 0.820 nodecolor +439 306 29.1747 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +439 301 moveto 33 -0.5 (Logic) alignedtext +grestore +% Refiner->Logic +gsave +0.870968 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 439 360 moveto +439 352 439 343 439 334 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 442.5 334 moveto +439 324 lineto +435.5 334 lineto +closepath fill +0.870968 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 126 40 moveto -133 32 lineto -123 34 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 126 40 moveto -133 32 lineto -123 34 lineto -closepath -stroke -end grestore - -% Evar_refiner -> Refiner -newpath 195 32 moveto -212 40 233 49 251 57 curveto +0.000 0.000 0.000 edgecolor +newpath 442.5 334 moveto +439 324 lineto +435.5 334 lineto +closepath stroke +grestore +% Proof_trees +gsave +0.502 1.000 0.820 nodecolor +439 234 45.1757 18 ellipse_path fill +0.870968 setlinewidth +filled +0.502 1.000 0.820 nodecolor +439 234 45.1757 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +439 229 moveto 65 -0.5 (Proof_trees) alignedtext +grestore +% Logic->Proof_trees +gsave +0.870968 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 439 288 moveto +439 280 439 271 439 262 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 442.5 262 moveto +439 252 lineto +435.5 262 lineto +closepath fill +0.870968 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 249 60 moveto -260 61 lineto -252 54 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 249 60 moveto -260 61 lineto -252 54 lineto -closepath -stroke -end grestore - -% Clenvtac -gsave 10 dict begin -38 45 38 18 ellipse_path -stroke -gsave 10 dict begin -13 40 moveto -(Clenvtac) -[9.36 3.84 6.24 6.48 6.96 4.08 6.24 6.24] -xshow -end grestore -end grestore - -% Clenvtac -> Tacmach -newpath 58 61 moveto -73 72 93 87 112 99 curveto -117 102 123 105 128 108 curveto +0.000 0.000 0.000 edgecolor +newpath 442.5 262 moveto +439 252 lineto +435.5 262 lineto +closepath stroke +grestore +% Proof_type +gsave +0.502 1.000 0.820 nodecolor +439 162 44.1757 18 ellipse_path fill +0.870968 setlinewidth +filled +0.502 1.000 0.820 nodecolor +439 162 44.1757 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +439 157 moveto 63 -0.5 (Proof_type) alignedtext +grestore +% Proof_trees->Proof_type +gsave +0.870968 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 439 216 moveto +439 208 439 199 439 190 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 442.5 190 moveto +439 180 lineto +435.5 190 lineto +closepath fill +0.870968 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 127 111 moveto -137 113 lineto -130 105 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 127 111 moveto -137 113 lineto -130 105 lineto -closepath +0.000 0.000 0.000 edgecolor +newpath 442.5 190 moveto +439 180 lineto +435.5 190 lineto +closepath stroke +grestore +% Decl_expr +gsave +0.502 1.000 0.820 nodecolor +439 90 42.1777 18 ellipse_path fill +0.870968 setlinewidth +filled +0.502 1.000 0.820 nodecolor +439 90 42.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +439 85 moveto 58 -0.5 (Decl_expr) alignedtext +grestore +% Proof_type->Decl_expr +gsave +0.870968 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 439 144 moveto +439 136 439 127 439 118 curveto stroke -end grestore - -% Clenvtac -> Evar_refiner -newpath 73 37 moveto -85 35 98 32 110 29 curveto +0.000 0.000 0.000 edgecolor +newpath 442.5 118 moveto +439 108 lineto +435.5 118 lineto +closepath fill +0.870968 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 442.5 118 moveto +439 108 lineto +435.5 118 lineto +closepath stroke +grestore +% Tacexpr +gsave +0.502 1.000 0.820 nodecolor +439 18 36.1777 18 ellipse_path fill +0.870968 setlinewidth +filled +0.502 1.000 0.820 nodecolor +439 18 36.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +439 13 moveto 46 -0.5 (Tacexpr) alignedtext +grestore +% Decl_expr->Tacexpr +gsave +0.870968 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 439 72 moveto +439 64 439 55 439 46 curveto stroke -gsave 10 dict begin +0.000 0.000 0.000 edgecolor +newpath 442.5 46 moveto +439 36 lineto +435.5 46 lineto +closepath fill +0.870968 setlinewidth solid -1 setlinewidth -0.000 0.000 0.000 edgecolor -newpath 111 32 moveto -120 27 lineto -110 26 lineto -closepath -fill -0.000 0.000 0.000 edgecolor -newpath 111 32 moveto -120 27 lineto -110 26 lineto -closepath +0.000 0.000 0.000 edgecolor +newpath 442.5 46 moveto +439 36 lineto +435.5 46 lineto +closepath stroke +grestore +% Tactic_debug +gsave +0.502 1.000 0.820 nodecolor +133 450 51.1777 18 ellipse_path fill +0.870968 setlinewidth +filled +0.502 1.000 0.820 nodecolor +133 450 51.1777 18 ellipse_path stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +133 445 moveto 76 -0.5 (Tactic_debug) alignedtext +grestore +% Tactic_debug->Refiner +gsave +0.870968 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 176 440 moveto +234 426 339 401 398 387 curveto stroke -end grestore +0.000 0.000 0.000 edgecolor +newpath 398.881 390.393 moveto +408 385 lineto +397.508 383.529 lineto +closepath fill +0.870968 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 398.881 390.393 moveto +408 385 lineto +397.508 383.529 lineto +closepath stroke +grestore endpage showpage grestore @@ -633,6 +643,7 @@ grestore %%EndPage: 1 %%Trailer %%Pages: 1 +%%BoundingBox: 36 36 576 753 end restore %%EOF diff --git a/dev/set_raw_db b/dev/set_raw_db new file mode 100644 index 00000000..5caff7e5 --- /dev/null +++ b/dev/set_raw_db @@ -0,0 +1 @@ +install_printer Top_printers.ppconstrdb diff --git a/dev/top_printers.ml b/dev/top_printers.ml index e1ee29e4..afae141b 100644 --- a/dev/top_printers.ml +++ b/dev/top_printers.ml @@ -32,6 +32,10 @@ open Genarg let _ = Constrextern.print_evar_arguments := true let _ = set_bool_option_value (SecondaryTable ("Printing","Matching")) false +let _ = Detyping.set_detype_anonymous (fun _ _ -> raise Not_found) + +(* std_ppcmds *) +let pppp x = pp x (* name printers *) let ppid id = pp (pr_id id) @@ -44,20 +48,26 @@ let ppcon con = pp(pr_con con) let ppkn kn = pp(pr_kn kn) let ppsp sp = pp(pr_sp sp) let ppqualid qid = pp(pr_qualid qid) +let ppclindex cl = pp(Classops.pr_cl_index cl) (* term printers *) -let ppconstr x = pp(Termops.print_constr x) +let rawdebug = ref false +let ppconstr x = pp (Termops.print_constr x) +let ppconstrdb x = pp(Flags.with_option rawdebug Termops.print_constr x) let ppterm = ppconstr let ppsconstr x = ppconstr (Declarations.force x) let ppconstr_univ x = Constrextern.with_universes ppconstr x let pprawconstr = (fun x -> pp(pr_lrawconstr x)) let pppattern = (fun x -> pp(pr_constr_pattern x)) let pptype = (fun x -> pp(pr_ltype x)) + let ppfconstr c = ppconstr (Closure.term_of_fconstr c) let ppbigint n = pp (Bigint.pr_bigint n);; -let ppidset l = pp (prlist_with_sep spc pr_id (Idset.elements l)) +let prset pr l = str "[" ++ prlist_with_sep spc pr l ++ str "]" +let ppintset l = pp (prset int (Intset.elements l)) +let ppidset l = pp (prset pr_id (Idset.elements l)) let pP s = pp (hov 0 s) @@ -81,7 +91,14 @@ let genppj f j = let (c,t) = f j in (c ++ str " : " ++ t) let ppj j = pp (genppj pr_ljudge j) +let prsubst s = pp (Mod_subst.debug_pr_subst s) + +let pp_idpred s = pp (pr_idpred s) +let pp_cpred s = pp (pr_cpred s) +let pp_transparent_state s = pp (pr_transparent_state s) + (* proof printers *) +let ppmetas metas = pp(pr_metaset metas) let ppevm evd = pp(pr_evar_map evd) let ppevd evd = pp(pr_evar_defs evd) let ppclenv clenv = pp(pr_clenv clenv) @@ -103,6 +120,8 @@ let ppuni u = pp(pr_uni u) let ppuniverses u = pp (str"[" ++ pr_universes u ++ str"]") +let ppconstraints c = pp (pr_constraints c) + let ppenv e = pp (str "[" ++ pr_named_context_of e ++ str "]" ++ spc() ++ str "[" ++ pr_rel_context e (rel_context e) ++ str "]") @@ -240,8 +259,7 @@ let print_pure_constr csr = print_string "end"; close_box() | Fix ((t,i),(lna,tl,bl)) -> - print_string "Fix" -(* "("; print_int i; print_string ")"; + print_string "Fix("; print_int i; print_string ")"; print_cut(); open_vbox 0; let rec print_fix () = @@ -253,7 +271,7 @@ let print_pure_constr csr = box_display bl.(k); close_box (); print_cut() done - in print_string"{"; print_fix(); print_string"}" *) + in print_string"{"; print_fix(); print_string"}" | CoFix(i,(lna,tl,bl)) -> print_string "CoFix("; print_int i; print_string ")"; print_cut(); @@ -404,3 +422,48 @@ let _ = (Gramext.Snterm (Pcoq.Gram.Entry.obj Constr.constr), ConstrArgType), Some "c")]] + +(* Setting printer of unbound global reference *) +open Names +open Nameops +open Libnames + +let encode_path loc prefix mpdir suffix id = + let dir = match mpdir with + | None -> [] + | Some (mp,dir) -> + (repr_dirpath (dirpath_of_string (string_of_mp mp))@ + repr_dirpath dir) in + Qualid (loc, make_qualid + (make_dirpath (List.rev (id_of_string prefix::dir@suffix))) id) + +let raw_string_of_ref loc = function + | ConstRef cst -> + let (mp,dir,id) = repr_con cst in + encode_path loc "CST" (Some (mp,dir)) [] (id_of_label id) + | IndRef (kn,i) -> + let (mp,dir,id) = repr_kn kn in + encode_path loc "IND" (Some (mp,dir)) [id_of_label id] + (id_of_string ("_"^string_of_int i)) + | ConstructRef ((kn,i),j) -> + let (mp,dir,id) = repr_kn kn in + encode_path loc "CSTR" (Some (mp,dir)) + [id_of_label id;id_of_string ("_"^string_of_int i)] + (id_of_string ("_"^string_of_int j)) + | VarRef id -> + encode_path loc "SECVAR" None [] id + +let short_string_of_ref loc = function + | VarRef id -> Ident (loc,id) + | ConstRef cst -> Ident (loc,id_of_label (pi3 (repr_con cst))) + | IndRef (kn,0) -> Ident (loc,id_of_label (pi3 (repr_kn kn))) + | IndRef (kn,i) -> + encode_path loc "IND" None [id_of_label (pi3 (repr_kn kn))] + (id_of_string ("_"^string_of_int i)) + | ConstructRef ((kn,i),j) -> + encode_path loc "CSTR" None + [id_of_label (pi3 (repr_kn kn));id_of_string ("_"^string_of_int i)] + (id_of_string ("_"^string_of_int j)) + +let _ = Constrextern.set_debug_global_reference_printer + (if !rawdebug then raw_string_of_ref else short_string_of_ref) diff --git a/dev/v8-syntax/syntax-v8.tex b/dev/v8-syntax/syntax-v8.tex index 97973df2..de68ce1e 100644 --- a/dev/v8-syntax/syntax-v8.tex +++ b/dev/v8-syntax/syntax-v8.tex @@ -748,7 +748,7 @@ Conflicts exists between integers and constrs. \nlsep \TERM{cc} %% contrib/field \nlsep \TERM{field}~\STAR{\tacconstr} -%% contrib/first-order +%% contrib/firstorder \nlsep \TERM{ground}~\OPT{\NTL{tactic}{0}} \nlsep \TERM{ground}~\OPT{\NTL{tactic}{0}}~\KWD{with}~\PLUS{\NT{reference}} \nlsep \TERM{ground}~\OPT{\NTL{tactic}{0}}~\KWD{using}~\PLUS{\NT{ident}} diff --git a/doc/Makefile b/doc/Makefile deleted file mode 100644 index 5158fbeb..00000000 --- a/doc/Makefile +++ /dev/null @@ -1,307 +0,0 @@ -# Makefile for the Coq documentation - -# COQSRC needs to be set to a coq source repository - -# To compile documentation, you need the following tools: -# Dvi: latex (latex2e), bibtex, makeindex -# Pdf: pdflatex -# Html: hevea (http://hevea.inria.fr) >= 1.05 - -include ../config/Makefile - - -LATEX=latex -BIBTEX=bibtex -min-crossrefs=10 -MAKEINDEX=makeindex -PDFLATEX=pdflatex - -HEVEALIB=/usr/local/lib/hevea:/usr/lib/hevea -TEXINPUTS=$(HEVEALIB):.: - -COQTOP=$(COQSRC)/bin/coqtop -COQTEX=$(COQSRC)/bin/coq-tex -n 72 -image $(COQTOP) -v -sl -small -COQDOC=$(COQSRC)/bin/coqdoc - -#VERSION=POSITIONNEZ-CETTE-VARIABLE - -###################################################################### -### General rules -###################################################################### - -all: all-html all-pdf all-ps - -all-html:\ - tutorial/Tutorial.v.html refman/html/index.html \ - faq/html/index.html stdlib/html/index.html RecTutorial/RecTutorial.v.html - -all-pdf:\ - tutorial/Tutorial.v.pdf refman/Reference-Manual.pdf \ - faq/FAQ.v.pdf stdlib/Library.pdf RecTutorial/RecTutorial.v.pdf - -all-ps:\ - tutorial/Tutorial.v.ps refman/Reference-Manual.ps \ - faq/FAQ.v.ps stdlib/Library.ps RecTutorial/RecTutorial.v.ps - -refman:\ - refman/html/index.html refman/Reference-Manual.ps refman/Reference-Manual.pdf - -tutorial:\ - tutorial/Tutorial.v.html tutorial/Tutorial.v.ps tutorial/Tutorial.v.pdf - -stdlib:\ - stdlib/html/index.html stdlib/Library.ps stdlib/Library.pdf - -faq:\ - faq/html/index.html faq/FAQ.v.ps faq/FAQ.v.pdf - -rectutorial:\ - RecTutorial/RecTutorial.v.html \ - RecTutorial/RecTutorial.v.ps RecTutorial/RecTutorial.v.pdf - -###################################################################### -### Implicit rules -###################################################################### - -.SUFFIXES: .dvi .tex .v.tex .ps .pdf .eps .png - -%.v.tex: %.tex - (cd `dirname $<`; $(COQTEX) `basename $<`) - -%.ps: %.dvi - (cd `dirname $<`; dvips -o `basename $@` `basename $<`) - -%.eps: %.png - pngtopnm $< | pnmtops -equalpixels -noturn -rle > $@ - -clean: - rm -f */*.dvi */*.aux */*.log */*.bbl */*.blg */*.toc \ - */*.idx */*~ */*.ilg */*.ind */*.dvi.gz */*.ps.gz */*.pdf.gz\ - */*.???idx */*.???ind */*.v.tex */*.atoc */*.lof \ - */*.hatoc */*.haux */*.hcomind */*.herrind */*.hidx */*.hind \ - */*.htacind */*.htoc */*.v.html - rm -f stdlib/index-list.html stdlib/index-body.html \ - stdlib/Library.coqdoc.tex stdlib/library.files \ - stdlib/library.files.ls - rm -f refman/euclid.ml{,i} refman/heapsort.ml{,i} - rm -f common/version.tex - rm -f refman/*.eps refman/Reference-Manual.html - -cleanall: clean - rm -f */*.ps */*.pdf - rm -rf refman/html stdlib/html faq/html tutorial/tutorial.v.html - -###################################################################### -# Common -###################################################################### - -COMMON=common/version.tex common/title.tex common/macros.tex - -### Version - -common/version.tex: Makefile - echo "\newcommand{\coqversion}{$(VERSION)}" > common/version.tex - -###################################################################### -# Reference Manual -###################################################################### - -REFMANCOQTEXFILES=\ - refman/RefMan-gal.v.tex refman/RefMan-ext.v.tex \ - refman/RefMan-mod.v.tex refman/RefMan-tac.v.tex \ - refman/RefMan-cic.v.tex refman/RefMan-lib.v.tex \ - refman/RefMan-tacex.v.tex refman/RefMan-syn.v.tex \ - refman/RefMan-oth.v.tex refman/RefMan-ltac.v.tex \ - refman/Cases.v.tex refman/Coercion.v.tex refman/Extraction.v.tex \ - refman/Program.v.tex refman/Omega.v.tex refman/Polynom.v.tex \ - refman/Setoid.v.tex refman/Helm.tex # refman/Natural.v.tex - -REFMANTEXFILES=\ - refman/headers.sty \ - refman/Reference-Manual.tex refman/RefMan-pre.tex \ - refman/RefMan-int.tex refman/RefMan-pro.tex \ - refman/RefMan-com.tex \ - refman/RefMan-uti.tex refman/RefMan-ide.tex \ - refman/RefMan-add.tex refman/RefMan-modr.tex \ - $(REFMANCOQTEXFILES) \ - -REFMANEPSFILES= refman/coqide.eps refman/coqide-queries.eps - -REFMANFILES=\ - $(REFMANTEXFILES) $(COMMON) $(REFMANEPSFILES) refman/biblio.bib - -REFMANPNGFILES=$(REFMANEPSFILES:.eps=.png) - -### Reference Manual (printable format) - -# The second LATEX compilation is necessary otherwise the pages of the index -# are not correct (don't know why...) - BB -refman/Reference-Manual.dvi: $(REFMANFILES) - (cd refman;\ - $(LATEX) Reference-Manual;\ - $(BIBTEX) Reference-Manual;\ - $(LATEX) Reference-Manual;\ - $(MAKEINDEX) Reference-Manual;\ - $(MAKEINDEX) Reference-Manual.tacidx -o Reference-Manual.tacind;\ - $(MAKEINDEX) Reference-Manual.comidx -o Reference-Manual.comind;\ - $(MAKEINDEX) Reference-Manual.erridx -o Reference-Manual.errind;\ - $(LATEX) Reference-Manual;\ - $(LATEX) Reference-Manual) - -refman/Reference-Manual.pdf: refman/Reference-Manual.tex - (cd refman; $(PDFLATEX) Reference-Manual.tex) - -### Reference Manual (browsable format) - -refman/Reference-Manual.html: refman/headers.hva refman/Reference-Manual.dvi # to ensure bbl file - (cd refman; hevea -fix -exec xxdate.exe ./Reference-Manual.tex) - -refman/html/index.html: refman/Reference-Manual.html $(REFMANPNGFILES) \ - refman/cover.html refman/index.html - - rm -rf refman/html - mkdir refman/html - cp $(REFMANPNGFILES) refman/html - (cd refman/html; hacha -o toc.html ../Reference-Manual.html) - cp refman/cover.html refman/menu.html refman/html - cp refman/index.html refman/html - -refman-quick: - (cd refman; \ - $(PDFLATEX) Reference-Manual.tex; \ - hevea -fix -exec xxdate.exe ./Reference-Manual.tex) - - -###################################################################### -# Tutorial -###################################################################### - -tutorial/Tutorial.v.dvi: common/version.tex common/title.tex tutorial/Tutorial.v.tex - (cd tutorial; $(LATEX) Tutorial.v) - -tutorial/Tutorial.v.pdf: common/version.tex common/title.tex tutorial/Tutorial.v.dvi - (cd tutorial; $(PDFLATEX) Tutorial.v.tex) - -tutorial/Tutorial.v.html: tutorial/Tutorial.v.tex - (cd tutorial; hevea -exec xxdate.exe Tutorial.v) - - -###################################################################### -# FAQ -###################################################################### - -faq/FAQ.v.dvi: common/version.tex common/title.tex faq/FAQ.v.tex - (cd faq;\ - $(LATEX) FAQ.v;\ - $(BIBTEX) FAQ.v;\ - $(LATEX) FAQ.v;\ - $(LATEX) FAQ.v) - -faq/FAQ.v.pdf: common/version.tex common/title.tex faq/FAQ.v.dvi faq/axioms.png - (cd faq; $(PDFLATEX) FAQ.v.tex) - -faq/FAQ.v.html: faq/FAQ.v.dvi # to ensure FAQ.v.bbl - (cd faq; hevea -fix FAQ.v.tex) - -faq/html/index.html: faq/FAQ.v.html - - rm -rf faq/html - mkdir faq/html - cp faq/interval_discr.v faq/axioms.png faq/html - cp faq/FAQ.v.html faq/html/index.html - -###################################################################### -# Standard library -###################################################################### - -GLOBDUMP=$(COQSRC)/glob.dump - -LIBDIRS= Logic Bool Arith ZArith QArith Reals Lists Sets Relations Sorting Wellfounded IntMap FSets - -### Standard library (browsable html format) - -stdlib/index-body.html: $(GLOBDUMP) - - rm -rf stdlib/html - mkdir stdlib/html - (cd stdlib/html;\ - $(COQDOC) -q --multi-index --html --glob-from $(GLOBDUMP)\ - -R $(COQSRC)/theories Coq $(COQSRC)/theories/*/*.v) - mv stdlib/html/index.html stdlib/index-body.html - -stdlib/index-list.html: stdlib/index-list.html.template - COQTOP=$(COQSRC) ./stdlib/make-library-index stdlib/index-list.html - -stdlib/html/index.html: stdlib/index-list.html stdlib/index-body.html stdlib/index-trailer.html - cat stdlib/index-list.html > $@ - sed -n -e '/
/,/<\/table>/p' stdlib/index-body.html >> $@ - cat stdlib/index-trailer.html >> $@ - -### Standard library (printable format - produces > 350 pages) - -stdlib/Library.coqdoc.tex: - (for dir in $(LIBDIRS) ; do \ - $(COQDOC) -q --gallina --body-only --latex --stdout \ - --coqlib_path $(COQSRC) \ - -R $(COQSRC)/theories Coq "$(COQSRC)/theories/$$dir/"*.v >> $@ ; done) - -stdlib/Library.dvi: $(COMMON) stdlib/Library.coqdoc.tex stdlib/Library.tex - (cd stdlib;\ - $(LATEX) Library;\ - $(LATEX) Library) - -stdlib/Library.pdf: $(COMMON) stdlib/Library.coqdoc.tex stdlib/Library.dvi - (cd stdlib; $(PDFLATEX) Library) - -###################################################################### -# Tutorial on inductive types -###################################################################### - -RecTutorial/RecTutorial.v.dvi: common/version.tex common/title.tex RecTutorial/RecTutorial.v.tex - (cd RecTutorial;\ - $(LATEX) RecTutorial.v;\ - $(BIBTEX) RecTutorial.v;\ - $(LATEX) RecTutorial.v;\ - $(LATEX) RecTutorial.v) - -RecTutorial/RecTutorial.v.pdf: common/version.tex common/title.tex RecTutorial/RecTutorial.v.dvi - (cd RecTutorial; $(PDFLATEX) RecTutorial.v.tex) - -RecTutorial/RecTutorial.v.html: RecTutorial/RecTutorial.v.tex - (cd RecTutorial; hevea -exec xxdate.exe RecTutorial.v) - - -###################################################################### -# Install all documentation files -###################################################################### - -COQINSTALLPREFIX= -DOCDIR=/usr/local/share/doc/coq-8.0 -FULLDOCDIR=$(COQINSTALLPREFIX)$(DOCDIR) -HTMLINSTALLDIR=$(FULLDOCDIR)/html -PRINTABLEINSTALLDIR=$(FULLDOCDIR)/ps - -install-doc: install-meta install-doc-html install-doc-printable - -install-meta: - mkdir $(DOCDIC) - cp LICENCE $(DOCDIC)/LICENCE.doc -# cp $(COQSRC)/LICENCE $(COQSRC)/CREDITS $(COQSRC)/COPYRIGHT $(DOCDIC) -# cp $(COQSRC)/README $(COQSRC)/CHANGES $(DOCDIC) - -install-doc-html: all-html - mkdir $(HTMLINSTALLDIR) - cp -r refman/html $(HTMLINSTALLDIR)/refman - cp -r stdlib/html $(HTMLINSTALLDIR)/stdlib - cp -r tutorial/tutorial.html $(HTMLINSTALLDIR)/ - cp -r RecTutorial/RecTutorial.html $(HTMLINSTALLDIR)/ - cp -r faq/html $(HTMLINSTALLDIR)/faq - -install-doc-printable: all-pdf all-ps - mkdir $(PRINTABLEINSTALLDIR) - cp -r refman/Reference-manual.pdf $(PRINTABLEINSTALLDIR) - cp -r stdlib/Library.pdf $(PRINTABLEINSTALLDIR) - cp -r tutorial/Tutorial.v.pdf $(PRINTABLEINSTALLDIR)/Tutorial.pdf - cp -r RecTutorial/RecTutorial.v.pdf $(PRINTABLEINSTALLDIR)/RecTutorial.pdf - cp -r faq/FAQ.v.pdf $(PRINTABLEINSTALLDIR)/FAQ.pdf - cp -r refman/Reference-manual.ps $(PRINTABLEINSTALLDIR) - cp -r stdlib/Library.ps $(PRINTABLEINSTALLDIR) - cp -r tutorial/Tutorial.v.ps $(PRINTABLEINSTALLDIR)/Tutorial.ps - cp -r RecTutorial/RecTutorial.v.ps $(PRINTABLEINSTALLDIR)/RecTutorial.ps - cp -r faq/FAQ.v.ps $(PRINTABLEINSTALLDIR)/FAQ.ps diff --git a/doc/stdlib/Library.tex b/doc/stdlib/Library.tex index 598943a4..f9764bea 100755 --- a/doc/stdlib/Library.tex +++ b/doc/stdlib/Library.tex @@ -3,7 +3,7 @@ \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage{fullpage} -\usepackage{coqdoc} +\usepackage{../../coqdoc} \input{../common/version} \input{../common/title} @@ -43,8 +43,10 @@ The standard library is composed of the following subdirectories: \item[Sorting] Sorted list (basic definitions and heapsort correctness). \item[Wellfounded] Well-founded relations (basic results). - \item[IntMap] Representation of finite sets by an efficient - structure of map (trees indexed by binary integers). + \item[Program] Tactics to deal with dependently-typed programs and + their proofs. + \item[Classes] Standard type class instances on relations and + Coq part of the setoid rewriting tactic. \end{description} @@ -59,4 +61,4 @@ you can access from the \Coq\ home page at \end{document} -% $Id: Library.tex 9245 2006-10-17 12:53:34Z notin $ +% $Id: Library.tex 11091 2008-06-10 18:24:52Z notin $ diff --git a/doc/stdlib/index-list.html.template b/doc/stdlib/index-list.html.template index 81ab034b..5e95a692 100644 --- a/doc/stdlib/index-list.html.template +++ b/doc/stdlib/index-list.html.template @@ -3,10 +3,9 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - - + The Coq Standard Library @@ -41,6 +40,7 @@ through the Require Import command.

Classical logic and dependent equality
+ theories/Logic/SetIsType.v theories/Logic/Classical_Pred_Set.v theories/Logic/Classical_Pred_Type.v theories/Logic/Classical_Prop.v @@ -66,12 +66,29 @@ through the Require Import command.

theories/Logic/ProofIrrelevance.v theories/Logic/ProofIrrelevanceFacts.v theories/Logic/ConstructiveEpsilon.v + theories/Logic/Description.v + theories/Logic/Epsilon.v + theories/Logic/IndefiniteDescription.v +
+ +
Bool: + Booleans (basic functions and results) +
+
+ theories/Bool/Bool.v + theories/Bool/BoolEq.v + theories/Bool/DecBool.v + theories/Bool/IfProp.v + theories/Bool/Sumbool.v + theories/Bool/Zerob.v + theories/Bool/Bvector.v
Arith: Basic Peano arithmetic
+ theories/Arith/Arith_base.v theories/Arith/Le.v theories/Arith/Lt.v theories/Arith/Plus.v @@ -86,7 +103,6 @@ through the Require Import command.

theories/Arith/Max.v theories/Arith/Compare.v theories/Arith/Div2.v - theories/Arith/Div.v theories/Arith/EqNat.v theories/Arith/Euclid.v theories/Arith/Even.v @@ -107,7 +123,7 @@ through the Require Import command.

theories/NArith/Ndigits.v theories/NArith/Ndist.v theories/NArith/Ndec.v -.
+
ZArith: Binary integers @@ -131,14 +147,19 @@ through the Require Import command.

(theories/ZArith/ZArith_base.v) theories/ZArith/Zcomplements.v theories/ZArith/Zsqrt.v + theories/ZArith/Zpow_def.v theories/ZArith/Zpower.v theories/ZArith/Zdiv.v theories/ZArith/Zlogarithm.v (theories/ZArith/ZArith.v) + theories/ZArith/Zgcd_alt.v theories/ZArith/Zwf.v theories/ZArith/Zbinary.v theories/ZArith/Znumtheory.v theories/ZArith/Int.v + theories/ZArith/ZOdiv_def.v + theories/ZArith/ZOdiv.v + theories/ZArith/Zpow_facts.v
QArith: @@ -146,72 +167,114 @@ through the Require Import command.

theories/QArith/QArith_base.v + theories/QArith/Qabs.v + theories/QArith/Qpower.v theories/QArith/Qreduction.v theories/QArith/Qring.v + theories/QArith/Qfield.v (theories/QArith/QArith.v) theories/QArith/Qreals.v theories/QArith/Qcanon.v + theories/QArith/Qround.v
- -
Reals: - Formalization of real numbers + +
Numbers: + A modular axiomatic construction for numbers +
+
+ theories/Numbers/NumPrelude.v + theories/Numbers/BigNumPrelude.v + theories/Numbers/NaryFunctions.v +
+ +
+theories/Numbers/Cyclic/Abstract/CyclicAxioms.v +theories/Numbers/Cyclic/Abstract/NZCyclic.v +theories/Numbers/Cyclic/DoubleCyclic/DoubleAdd.v +theories/Numbers/Cyclic/DoubleCyclic/DoubleBase.v +theories/Numbers/Cyclic/DoubleCyclic/DoubleCyclic.v +theories/Numbers/Cyclic/DoubleCyclic/DoubleDiv.v +theories/Numbers/Cyclic/DoubleCyclic/DoubleDivn1.v +theories/Numbers/Cyclic/DoubleCyclic/DoubleLift.v +theories/Numbers/Cyclic/DoubleCyclic/DoubleMul.v +theories/Numbers/Cyclic/DoubleCyclic/DoubleSqrt.v +theories/Numbers/Cyclic/DoubleCyclic/DoubleSub.v +theories/Numbers/Cyclic/DoubleCyclic/DoubleType.v +theories/Numbers/Cyclic/Int31/Cyclic31.v +theories/Numbers/Cyclic/Int31/Int31.v +theories/Numbers/Cyclic/ZModulo/ZModulo.v +
+ +
+ theories/Numbers/Integer/Abstract/ZAdd.v +theories/Numbers/Integer/Abstract/ZAddOrder.v +theories/Numbers/Integer/Abstract/ZAxioms.v +theories/Numbers/Integer/Abstract/ZBase.v +theories/Numbers/Integer/Abstract/ZDomain.v +theories/Numbers/Integer/Abstract/ZLt.v +theories/Numbers/Integer/Abstract/ZMul.v +theories/Numbers/Integer/Abstract/ZMulOrder.v +theories/Numbers/Integer/BigZ/BigZ.v +theories/Numbers/Integer/BigZ/ZMake.v +theories/Numbers/Integer/Binary/ZBinary.v +theories/Numbers/Integer/NatPairs/ZNatPairs.v +theories/Numbers/Integer/SpecViaZ/ZSig.v +theories/Numbers/Integer/SpecViaZ/ZSigZAxioms.v +
+ +
+theories/Numbers/NatInt/NZAdd.v +theories/Numbers/NatInt/NZAddOrder.v +theories/Numbers/NatInt/NZAxioms.v +theories/Numbers/NatInt/NZBase.v +theories/Numbers/NatInt/NZMul.v +theories/Numbers/NatInt/NZMulOrder.v +theories/Numbers/NatInt/NZOrder.v +
+ +
+theories/Numbers/Natural/Abstract/NAdd.v +theories/Numbers/Natural/Abstract/NAddOrder.v +theories/Numbers/Natural/Abstract/NAxioms.v +theories/Numbers/Natural/Abstract/NBase.v +theories/Numbers/Natural/Abstract/NDefOps.v +theories/Numbers/Natural/Abstract/NIso.v +theories/Numbers/Natural/Abstract/NMul.v +theories/Numbers/Natural/Abstract/NMulOrder.v +theories/Numbers/Natural/Abstract/NOrder.v +theories/Numbers/Natural/Abstract/NStrongRec.v +theories/Numbers/Natural/Abstract/NSub.v +theories/Numbers/Natural/BigN/BigN.v +theories/Numbers/Natural/BigN/Nbasic.v +theories/Numbers/Natural/BigN/NMake.v +theories/Numbers/Natural/Binary/NBinary.v +theories/Numbers/Natural/Binary/NBinDefs.v +theories/Numbers/Natural/Peano/NPeano.v +theories/Numbers/Natural/SpecViaZ/NSig.v +theories/Numbers/Natural/SpecViaZ/NSigNAxioms.v +
+ +
+ theories/Numbers/Rational/BigQ/BigQ.v + theories/Numbers/Rational/BigQ/Q0Make.v + theories/Numbers/Rational/BigQ/QbiMake.v + theories/Numbers/Rational/BigQ/QifMake.v + theories/Numbers/Rational/BigQ/QMake_base.v + theories/Numbers/Rational/BigQ/QpMake.v + theories/Numbers/Rational/BigQ/QvMake.v + theories/Numbers/Rational/SpecViaQ/QSig.v +
+ +
Relations: + Relations (definitions and basic results)
- theories/Reals/Rdefinitions.v - theories/Reals/Raxioms.v - theories/Reals/RIneq.v - theories/Reals/DiscrR.v - (theories/Reals/Rbase.v) - theories/Reals/RList.v - theories/Reals/Ranalysis.v - theories/Reals/Rbasic_fun.v - theories/Reals/Rderiv.v - theories/Reals/Rfunctions.v - theories/Reals/Rgeom.v - theories/Reals/R_Ifp.v - theories/Reals/Rlimit.v - theories/Reals/Rseries.v - theories/Reals/Rsigma.v - theories/Reals/R_sqr.v - theories/Reals/Rtrigo_fun.v - theories/Reals/Rtrigo.v - theories/Reals/SplitAbsolu.v - theories/Reals/SplitRmult.v - theories/Reals/Alembert.v - theories/Reals/AltSeries.v - theories/Reals/ArithProp.v - theories/Reals/Binomial.v - theories/Reals/Cauchy_prod.v - theories/Reals/Cos_plus.v - theories/Reals/Cos_rel.v - theories/Reals/Exp_prop.v - theories/Reals/Integration.v - theories/Reals/MVT.v - theories/Reals/NewtonInt.v - theories/Reals/PSeries_reg.v - theories/Reals/PartSum.v - theories/Reals/R_sqrt.v - theories/Reals/Ranalysis1.v - theories/Reals/Ranalysis2.v - theories/Reals/Ranalysis3.v - theories/Reals/Ranalysis4.v - theories/Reals/Rcomplete.v - theories/Reals/RiemannInt.v - theories/Reals/RiemannInt_SF.v - theories/Reals/Rpower.v - theories/Reals/Rprod.v - theories/Reals/Rsqrt_def.v - theories/Reals/Rtopology.v - theories/Reals/Rtrigo_alt.v - theories/Reals/Rtrigo_calc.v - theories/Reals/Rtrigo_def.v - theories/Reals/Rtrigo_reg.v - theories/Reals/SeqProp.v - theories/Reals/SeqSeries.v - theories/Reals/Sqrt_reg.v - theories/Reals/LegacyRfield.v - theories/Reals/Rpow_def.v - (theories/Reals/Reals.v) + theories/Relations/Relation_Definitions.v + theories/Relations/Relation_Operators.v + theories/Relations/Relations.v + theories/Relations/Operators_Properties.v + theories/Relations/Rstar.v + theories/Relations/Newman.v
Sets: @@ -242,51 +305,26 @@ through the Require Import command.

theories/Sets/Uniset.v -
Relations: - Relations (definitions and basic results) -
+
Classes:
- theories/Relations/Relation_Definitions.v - theories/Relations/Relation_Operators.v - theories/Relations/Relations.v - theories/Relations/Operators_Properties.v - theories/Relations/Rstar.v - theories/Relations/Newman.v + theories/Classes/Init.v + theories/Classes/RelationClasses.v + theories/Classes/Morphisms.v + theories/Classes/Morphisms_Prop.v + theories/Classes/Morphisms_Relations.v + theories/Classes/Equivalence.v + theories/Classes/EquivDec.v + theories/Classes/SetoidTactics.v + theories/Classes/SetoidClass.v + theories/Classes/SetoidDec.v + theories/Classes/SetoidAxioms.v
- -
Wellfounded: - Well-founded Relations -
-
- theories/Wellfounded/Disjoint_Union.v - theories/Wellfounded/Inclusion.v - theories/Wellfounded/Inverse_Image.v - theories/Wellfounded/Lexicographic_Exponentiation.v - theories/Wellfounded/Lexicographic_Product.v - theories/Wellfounded/Transitive_Closure.v - theories/Wellfounded/Union.v - theories/Wellfounded/Wellfounded.v - theories/Wellfounded/Well_Ordering.v -
- +
Setoids:
theories/Setoids/Setoid.v
-
Bool: - Booleans (basic functions and results) -
-
- theories/Bool/Bool.v - theories/Bool/BoolEq.v - theories/Bool/DecBool.v - theories/Bool/IfProp.v - theories/Bool/Sumbool.v - theories/Bool/Zerob.v - theories/Bool/Bvector.v -
-
Lists: Polymorphic lists, Streams (infinite sequences)
@@ -296,12 +334,40 @@ through the Require Import command.

theories/Lists/MonoList.v theories/Lists/SetoidList.v theories/Lists/Streams.v + theories/Lists/StreamMemo.v theories/Lists/TheoryList.v theories/Lists/ListTactics.v +
Sorting: + Axiomatizations of sorts +
+
+ theories/Sorting/Heap.v + theories/Sorting/Permutation.v + theories/Sorting/Sorting.v + theories/Sorting/PermutEq.v + theories/Sorting/PermutSetoid.v +
+ +
Wellfounded: + Well-founded Relations +
+
+ theories/Wellfounded/Disjoint_Union.v + theories/Wellfounded/Inclusion.v + theories/Wellfounded/Inverse_Image.v + theories/Wellfounded/Lexicographic_Exponentiation.v + theories/Wellfounded/Lexicographic_Product.v + theories/Wellfounded/Transitive_Closure.v + theories/Wellfounded/Union.v + theories/Wellfounded/Wellfounded.v + theories/Wellfounded/Well_Ordering.v +
+
FSets: - Modular implementation of finite sets/maps using lists + Modular implementation of finite sets/maps using lists or + efficient trees
theories/FSets/OrderedType.v @@ -309,67 +375,110 @@ through the Require Import command.

theories/FSets/OrderedTypeEx.v theories/FSets/FSetInterface.v theories/FSets/FSetBridge.v + theories/FSets/FSetFacts.v + theories/FSets/FSetDecide.v theories/FSets/FSetProperties.v theories/FSets/FSetEqProperties.v theories/FSets/FSetList.v + theories/FSets/FSetWeakList.v (theories/FSets/FSets.v) - theories/FSets/FSetFacts.v theories/FSets/FSetAVL.v theories/FSets/FSetToFiniteSet.v - theories/FSets/FSetWeakProperties.v - theories/FSets/FSetWeakInterface.v - theories/FSets/FSetWeakFacts.v - theories/FSets/FSetWeakList.v - theories/FSets/FSetWeak.v theories/FSets/FMapInterface.v + theories/FSets/FMapWeakList.v theories/FSets/FMapList.v theories/FSets/FMapPositive.v - theories/FSets/FMapIntMap.v theories/FSets/FMapFacts.v (theories/FSets/FMaps.v) theories/FSets/FMapAVL.v - theories/FSets/FMapWeakInterface.v - theories/FSets/FMapWeakList.v - theories/FSets/FMapWeak.v - theories/FSets/FMapWeakFacts.v + theories/FSets/FSetFullAVL.v + theories/FSets/FMapFullAVL.v
-
IntMap: - An implementation of finite sets/maps as trees indexed by addresses -
-
- theories/IntMap/Adalloc.v - theories/IntMap/Map.v - theories/IntMap/Fset.v - theories/IntMap/Mapaxioms.v - theories/IntMap/Mapiter.v - theories/IntMap/Mapcanon.v - theories/IntMap/Mapsubset.v - theories/IntMap/Lsort.v - theories/IntMap/Mapfold.v - theories/IntMap/Mapcard.v - theories/IntMap/Mapc.v - theories/IntMap/Maplists.v - theories/IntMap/Allmaps.v -
- -
Strings + + +
Reals: + Formalization of real numbers +
+
+ theories/Reals/Rdefinitions.v + theories/Reals/Raxioms.v + theories/Reals/RIneq.v + theories/Reals/DiscrR.v + (theories/Reals/Rbase.v) + theories/Reals/RList.v + theories/Reals/Ranalysis.v + theories/Reals/Rbasic_fun.v + theories/Reals/Rderiv.v + theories/Reals/Rfunctions.v + theories/Reals/Rgeom.v + theories/Reals/R_Ifp.v + theories/Reals/Rlimit.v + theories/Reals/Rseries.v + theories/Reals/Rsigma.v + theories/Reals/R_sqr.v + theories/Reals/Rtrigo_fun.v + theories/Reals/Rtrigo.v + theories/Reals/SplitAbsolu.v + theories/Reals/SplitRmult.v + theories/Reals/Alembert.v + theories/Reals/AltSeries.v + theories/Reals/ArithProp.v + theories/Reals/Binomial.v + theories/Reals/Cauchy_prod.v + theories/Reals/Cos_plus.v + theories/Reals/Cos_rel.v + theories/Reals/Exp_prop.v + theories/Reals/Integration.v + theories/Reals/MVT.v + theories/Reals/NewtonInt.v + theories/Reals/PSeries_reg.v + theories/Reals/PartSum.v + theories/Reals/R_sqrt.v + theories/Reals/Ranalysis1.v + theories/Reals/Ranalysis2.v + theories/Reals/Ranalysis3.v + theories/Reals/Ranalysis4.v + theories/Reals/Rcomplete.v + theories/Reals/RiemannInt.v + theories/Reals/RiemannInt_SF.v + theories/Reals/Rpow_def.v + theories/Reals/Rpower.v + theories/Reals/Rprod.v + theories/Reals/Rsqrt_def.v + theories/Reals/Rtopology.v + theories/Reals/Rtrigo_alt.v + theories/Reals/Rtrigo_calc.v + theories/Reals/Rtrigo_def.v + theories/Reals/Rtrigo_reg.v + theories/Reals/SeqProp.v + theories/Reals/SeqSeries.v + theories/Reals/Sqrt_reg.v + theories/Reals/Rlogic.v + theories/Reals/LegacyRfield.v + (theories/Reals/Reals.v)
-
Sorting: - Axiomatizations of sorts +
Program: + Support for dependently-typed programming.
- theories/Sorting/Heap.v - theories/Sorting/Permutation.v - theories/Sorting/Sorting.v - theories/Sorting/PermutEq.v - theories/Sorting/PermutSetoid.v + theories/Program/Basics.v + theories/Program/Wf.v + theories/Program/Subset.v + theories/Program/Equality.v + theories/Program/Tactics.v + theories/Program/Utils.v + theories/Program/Syntax.v + theories/Program/Program.v + theories/Program/FunctionalExtensionality.v + theories/Program/Combinators.v
diff --git a/doc/stdlib/make-library-files b/doc/stdlib/make-library-files index 91e3cc3f..add14a13 100755 --- a/doc/stdlib/make-library-files +++ b/doc/stdlib/make-library-files @@ -10,7 +10,7 @@ # En supposant que make fait son boulot, ca fait un tri topologique du # graphe des dépendances -LIBDIRS="Arith NArith ZArith Reals Logic Bool Lists IntMap Relations Sets Sorting Wellfounded Setoids" +LIBDIRS="Arith NArith ZArith Reals Logic Bool Lists Relations Sets Sorting Wellfounded Setoids Program Classes" rm -f library.files.ls.tmp (cd $COQTOP/theories; find $LIBDIR -name "*.v" -ls) > library.files.ls.tmp diff --git a/doc/stdlib/make-library-index b/doc/stdlib/make-library-index index ddbcd09f..04bcff91 100755 --- a/doc/stdlib/make-library-index +++ b/doc/stdlib/make-library-index @@ -7,27 +7,31 @@ FILE=$1 cp -f $FILE.template tmp echo -n Building file index-list.prehtml ... -for i in ../theories/*; do - echo $i +LIBDIRS="Init Logic Bool Arith NArith ZArith QArith Relations Sets Classes Setoids Lists Sorting Wellfounded FSets Reals Program Numbers Numbers/Natural/Abstract Numbers/Natural/Peano Numbers/Natural/Binary Numbers/Natural/BigN Numbers/Natural/SpecViaZ Numbers/Integer/Abstract Numbers/Integer/NatPairs Numbers/Integer/Binary Numbers/Integer/SpecViaZ Numbers/Integer/BigZ Numbers/NatInt Numbers/Cyclic/Abstract Numbers/Cyclic/Int31 Numbers/Cyclic/ZModulo Numbers/Cyclic/DoubleCyclic Numbers/Rational/BigQ Numbers/Rational/SpecViaQ Strings" - d=`basename $i` - if [ "$d" != "Num" -a "$d" != "CVS" ]; then - for j in $i/*.v; do - b=`basename $j .v` - rm -f tmp2 - grep -q theories/$d/$b.v tmp - a=$? - if [ $a = 0 ]; then - sed -e "s:theories/$d/$b.v:
$b:g" tmp > tmp2 - mv -f tmp2 tmp - else - echo Warning: theories/$d/$b.v is missing in the template file +for k in $LIBDIRS; do + i=theories/$k + echo $i + + d=`basename $i` + if [ "$d" != "Num" -a "$d" != "CVS" ]; then + for j in $i/*.v; do + b=`basename $j .v` + rm -f tmp2 + grep -q theories/$k/$b.v tmp + a=$? + if [ $a = 0 ]; then + p=`echo $k | sed 's:/:.:g'` + sed -e "s:theories/$k/$b.v:$b:g" tmp > tmp2 + mv -f tmp2 tmp + else + echo Warning: theories/$k/$b.v is missing in the template file + fi + done fi - done - fi - rm -f tmp2 - sed -e "s/#$d#//" tmp > tmp2 - mv -f tmp2 tmp + rm -f tmp2 + sed -e "s/#$d#//" tmp > tmp2 + mv -f tmp2 tmp done a=`grep theories tmp` if [ $? = 0 ]; then echo Warning: extra files:; echo $a; fi diff --git a/ide/command_windows.ml b/ide/command_windows.ml index 937098b7..b84b0943 100644 --- a/ide/command_windows.ml +++ b/ide/command_windows.ml @@ -6,28 +6,30 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: command_windows.ml 10197 2007-10-08 13:52:35Z notin $ *) +(* $Id: command_windows.ml 11042 2008-06-03 12:45:38Z jnarboux $ *) class command_window () = - let window = GWindow.window +(* let window = GWindow.window ~allow_grow:true ~allow_shrink:true - ~width:320 ~height:200 + ~width:500 ~height:250 ~position:`CENTER ~title:"CoqIde queries" ~show:false () - in + in *) + let frame = GBin.frame ~label:"Command Pane" ~shadow_type:`IN () in + let _ = frame#misc#hide () in let _ = GtkData.AccelGroup.create () in - let vbox = GPack.vbox ~homogeneous:false ~packing:window#add () in + let hbox = GPack.hbox ~homogeneous:false ~packing:frame#add () in let toolbar = GButton.toolbar - ~orientation:`HORIZONTAL + ~orientation:`VERTICAL ~style:`ICONS ~tooltips:true - ~packing:(vbox#pack + ~packing:(hbox#pack ~expand:false ~fill:false) () in let notebook = GPack.notebook ~scrollable:true - ~packing:(vbox#pack + ~packing:(hbox#pack ~expand:true ~fill:true ) @@ -35,39 +37,35 @@ class command_window () = in let _ = toolbar#insert_button - ~tooltip:"Hide Window" - ~text:"Hide Window" - ~icon:(Ideutils.stock_to_widget ~size:`LARGE_TOOLBAR `CLOSE) - ~callback:window#misc#hide + ~tooltip:"Hide Commands Pane" + ~text:"Hide Pane" + ~icon:(Ideutils.stock_to_widget `CLOSE) + ~callback:frame#misc#hide () in let new_page_menu = toolbar#insert_button ~tooltip:"New Page" ~text:"New Page" - ~icon:(Ideutils.stock_to_widget ~size:`LARGE_TOOLBAR `NEW) -(* - ~callback:window#misc#hide -*) + ~icon:(Ideutils.stock_to_widget `NEW) () in let _ = toolbar#insert_button - ~tooltip:"Kill Page" - ~text:"Kill Page" - ~icon:(Ideutils.stock_to_widget ~size:`LARGE_TOOLBAR `DELETE) + ~tooltip:"Delete Page" + ~text:"Delete Page" + ~icon:(Ideutils.stock_to_widget `DELETE) ~callback:(fun () -> notebook#remove_page notebook#current_page) () in object(self) - val window = window -(* - val menubar = menubar -*) + val frame = frame + + val new_page_menu = new_page_menu val notebook = notebook - method window = window + method frame = frame method new_command ?command ?term () = let appendp x = ignore (notebook#append_page x) in let frame = GBin.frame @@ -136,11 +134,11 @@ object(self) entry#misc#grab_default (); ignore (entry#connect#activate ~callback); ignore (combo#entry#connect#activate ~callback); - self#window#present () + self#frame#misc#show () initializer ignore (new_page_menu#connect#clicked self#new_command); - ignore (window#event#connect#delete (fun _ -> window#misc#hide(); true)); + (* ignore (window#event#connect#delete (fun _ -> window#misc#hide(); true));*) end let command_window = ref None diff --git a/ide/command_windows.mli b/ide/command_windows.mli index 3a5f0d60..212e5692 100644 --- a/ide/command_windows.mli +++ b/ide/command_windows.mli @@ -6,16 +6,16 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: command_windows.mli 6621 2005-01-21 17:24:37Z herbelin $ i*) +(*i $Id: command_windows.mli 11011 2008-05-28 16:22:11Z jnarboux $ i*) class command_window : unit -> object method new_command : ?command:string -> ?term:string -> unit -> unit - method window : GWindow.window + method frame : GBin.frame end -val main : unit -> unit + val main : unit -> unit val command_window : unit -> command_window diff --git a/ide/coq.ml b/ide/coq.ml index d318e339..5166fb21 100644 --- a/ide/coq.ml +++ b/ide/coq.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: coq.ml 10174 2007-10-04 13:52:23Z vsiles $ *) +(* $Id: coq.ml 11126 2008-06-13 18:45:04Z herbelin $ *) open Vernac open Vernacexpr @@ -43,33 +43,38 @@ let init () = Problem: should not hide "xx is assumed" messages *) (**) - Options.make_silent true; + Flags.make_silent true; (**) Coqtop.init_ide () let i = ref 0 -let version () = +let get_version_date () = let date = if Glib.Utf8.validate Coq_config.date then Coq_config.date else "" in - let get_version_date () = - try - let ch = open_in (Coq_config.coqtop^"/revision") in - let ver = input_line ch in - let rev = input_line ch in - (ver,rev) - with _ -> (Coq_config.version,date) in - let (rev,ver) = get_version_date () in + try + let ch = open_in (Coq_config.coqtop^"/revision") in + let ver = input_line ch in + let rev = input_line ch in + (ver,rev) + with _ -> (Coq_config.version,date) + +let short_version () = + let (ver,date) = get_version_date () in + Printf.sprintf "The Coq Proof Assistant, version %s (%s)\n" ver date + +let version () = + let (ver,date) = get_version_date () in Printf.sprintf "The Coq Proof Assistant, version %s (%s)\ \nArchitecture %s running %s operating system\ \nGtk version is %s\ \nThis is the %s version (%s is the best one for this architecture and OS)\ \n" - rev ver + ver date Coq_config.arch Sys.os_type (let x,y,z = GMain.Main.version in Printf.sprintf "%d.%d.%d" x y z) (if Mltop.get () = Mltop.Native then "native" else "bytecode") @@ -110,7 +115,310 @@ let is_in_proof_mode () = let user_error_loc l s = raise (Stdpp.Exc_located (l, Util.UserError ("CoqIde", s))) -let interp verbosely s = +type printing_state = { + mutable printing_implicit : bool; + mutable printing_coercions : bool; + mutable printing_raw_matching : bool; + mutable printing_no_notation : bool; + mutable printing_all : bool; + mutable printing_evar_instances : bool; + mutable printing_universes : bool; + mutable printing_full_all : bool +} + +let printing_state = { + printing_implicit = false; + printing_coercions = false; + printing_raw_matching = false; + printing_no_notation = false; + printing_all = false; + printing_evar_instances = false; + printing_universes = false; + printing_full_all = false; +} + +let printing_implicit_data = ["Printing";"Implicit"], false +let printing_coercions_data = ["Printing";"Coercions"], false +let printing_raw_matching_data = ["Printing";"Matching"], true +let printing_no_synth_data = ["Printing";"Synth"], true +let printing_no_notation_data = ["Printing";"Notations"], true +let printing_all_data = ["Printing";"All"], false +let printing_evar_instances_data = ["Printing";"Existential";"Instances"],false +let printing_universes_data = ["Printing";"Universes"], false + +let known_options = ref [] + +let prepare_option (l,dft) = + known_options := l :: !known_options; + let set = (String.concat " " ("Set"::l)) ^ "." in + let unset = (String.concat " " ("Unset"::l)) ^ "." in + if dft then unset,set else set,unset + +let coqide_known_option = function + | Goptions.TertiaryTable (a,b,c) -> List.mem [a;b;c] !known_options + | Goptions.SecondaryTable (a,b) -> List.mem [a;b] !known_options + | Goptions.PrimaryTable a -> List.mem [a] !known_options + +let with_printing_implicit = prepare_option printing_implicit_data +let with_printing_coercions = prepare_option printing_coercions_data +let with_printing_raw_matching = prepare_option printing_raw_matching_data +let with_printing_no_synth = prepare_option printing_no_synth_data +let with_printing_no_notation = prepare_option printing_no_notation_data +let with_printing_all = prepare_option printing_all_data +let with_printing_evar_instances = prepare_option printing_evar_instances_data +let with_printing_universes = prepare_option printing_universes_data + +let make_option_commands () = + let p = printing_state in + (if p.printing_implicit then [with_printing_implicit] else [])@ + (if p.printing_coercions then [with_printing_coercions] else [])@ + (if p.printing_raw_matching then [with_printing_raw_matching;with_printing_no_synth] else [])@ + (if p.printing_no_notation then [with_printing_no_notation] else [])@ + (if p.printing_all then [with_printing_all] else [])@ + (if p.printing_evar_instances then [with_printing_evar_instances] else [])@ + (if p.printing_universes then [with_printing_universes] else [])@ + (if p.printing_full_all then [with_printing_all;with_printing_evar_instances;with_printing_universes] else []) + +let make_option_commands () = + let l = make_option_commands () in + List.iter (fun (a,b) -> prerr_endline a; prerr_endline b) l; + l + +type command_attribute = + NavigationCommand | QueryCommand | DebugCommand | KnownOptionCommand + | OtherStatePreservingCommand | GoalStartingCommand | SolveCommand + | ProofEndingCommand + +let rec attribute_of_vernac_command = function + (* Control *) + | VernacTime com -> attribute_of_vernac_command com + | VernacList _ -> [] (* unsupported *) + | VernacLoad _ -> [] + + (* Syntax *) + | VernacTacticNotation _ -> [] + | VernacSyntaxExtension _ -> [] + | VernacDelimiters _ -> [] + | VernacBindScope _ -> [] + | VernacOpenCloseScope _ -> [] + | VernacArgumentsScope _ -> [] + | VernacInfix _ -> [] + | VernacNotation _ -> [] + + (* Gallina *) + | VernacDefinition (_,_,DefineBody _,_) -> [] + | VernacDefinition (_,_,ProveBody _,_) -> [GoalStartingCommand] + | VernacStartTheoremProof _ -> [GoalStartingCommand] + | VernacEndProof _ -> [ProofEndingCommand] + | VernacExactProof _ -> [ProofEndingCommand] + + | VernacAssumption _ -> [] + | VernacInductive _ -> [] + | VernacFixpoint _ -> [] + | VernacCoFixpoint _ -> [] + | VernacScheme _ -> [] + | VernacCombinedScheme _ -> [] + + (* Modules *) + | VernacDeclareModule _ -> [] + | VernacDefineModule _ -> [] + | VernacDeclareModuleType _ -> [] + | VernacInclude _ -> [] + + (* Gallina extensions *) + | VernacBeginSection _ -> [] + | VernacEndSegment _ -> [] + | VernacRecord _ -> [] + | VernacRequire _ -> [] + | VernacImport _ -> [] + | VernacCanonical _ -> [] + | VernacCoercion _ -> [] + | VernacIdentityCoercion _ -> [] + + (* Type classes *) + | VernacClass _ -> [] + | VernacInstance _ -> [] + | VernacContext _ -> [] + | VernacDeclareInstance _ -> [] + + (* Solving *) + | VernacSolve _ -> [SolveCommand] + | VernacSolveExistential _ -> [SolveCommand] + + (* MMode *) + | VernacDeclProof -> [] + | VernacReturn -> [] + | VernacProofInstr _ -> [] + + (* Auxiliary file and library management *) + | VernacRequireFrom _ -> [] + | VernacAddLoadPath _ -> [] + | VernacRemoveLoadPath _ -> [] + | VernacAddMLPath _ -> [] + | VernacDeclareMLModule _ -> [] + | VernacChdir _ -> [OtherStatePreservingCommand] + + (* State management *) + | VernacWriteState _ -> [] + | VernacRestoreState _ -> [] + + (* Resetting *) + | VernacRemoveName _ -> [NavigationCommand] + | VernacResetName _ -> [NavigationCommand] + | VernacResetInitial -> [NavigationCommand] + | VernacBack _ -> [NavigationCommand] + | VernacBackTo _ -> [NavigationCommand] + + (* Commands *) + | VernacDeclareTacticDefinition _ -> [] + | VernacHints _ -> [] + | VernacSyntacticDefinition _ -> [] + | VernacDeclareImplicits _ -> [] + | VernacReserve _ -> [] + | VernacSetOpacity _ -> [] + | VernacSetOption (Goptions.SecondaryTable ("Ltac","Debug"), _) -> + [DebugCommand] + | VernacSetOption (o,BoolValue true) | VernacUnsetOption o -> + if coqide_known_option o then [KnownOptionCommand] else [] + | VernacSetOption _ -> [] + | VernacRemoveOption _ -> [] + | VernacAddOption _ -> [] + | VernacMemOption _ -> [QueryCommand] + + | VernacPrintOption _ -> [QueryCommand] + | VernacCheckMayEval _ -> [QueryCommand] + | VernacGlobalCheck _ -> [QueryCommand] + | VernacPrint _ -> [QueryCommand] + | VernacSearch _ -> [QueryCommand] + | VernacLocate _ -> [QueryCommand] + + | VernacComments _ -> [OtherStatePreservingCommand] + | VernacNop -> [OtherStatePreservingCommand] + + (* Proof management *) + | VernacGoal _ -> [GoalStartingCommand] + + | VernacAbort _ -> [NavigationCommand] + | VernacAbortAll -> [NavigationCommand] + | VernacRestart -> [NavigationCommand] + | VernacSuspend -> [NavigationCommand] + | VernacResume _ -> [NavigationCommand] + | VernacUndo _ -> [NavigationCommand] + | VernacUndoTo _ -> [NavigationCommand] + | VernacBacktrack _ -> [NavigationCommand] + + | VernacFocus _ -> [SolveCommand] + | VernacUnfocus -> [SolveCommand] + | VernacGo _ -> [] + | VernacShow _ -> [OtherStatePreservingCommand] + | VernacCheckGuard -> [OtherStatePreservingCommand] + | VernacProof (Tacexpr.TacId []) -> [OtherStatePreservingCommand] + | VernacProof _ -> [] + + (* Toplevel control *) + | VernacToplevelControl _ -> [] + + (* Extensions *) + | VernacExtend ("Subtac_Obligations", _) -> [GoalStartingCommand] + | VernacExtend _ -> [] + +let is_vernac_goal_starting_command com = + List.mem GoalStartingCommand (attribute_of_vernac_command com) + +let is_vernac_navigation_command com = + List.mem NavigationCommand (attribute_of_vernac_command com) + +let is_vernac_query_command com = + List.mem QueryCommand (attribute_of_vernac_command com) + +let is_vernac_known_option_command com = + List.mem KnownOptionCommand (attribute_of_vernac_command com) + +let is_vernac_debug_command com = + List.mem DebugCommand (attribute_of_vernac_command com) + +let is_vernac_goal_printing_command com = + let attribute = attribute_of_vernac_command com in + List.mem GoalStartingCommand attribute or + List.mem SolveCommand attribute + +let is_vernac_state_preserving_command com = + let attribute = attribute_of_vernac_command com in + List.mem OtherStatePreservingCommand attribute or + List.mem QueryCommand attribute + +let is_vernac_tactic_command com = + List.mem SolveCommand (attribute_of_vernac_command com) + +let is_vernac_proof_ending_command com = + List.mem ProofEndingCommand (attribute_of_vernac_command com) + +type undo_info = identifier list + +let undo_info () = Pfedit.get_all_proof_names () + +type reset_mark = + | ResetToId of Names.identifier (* Relying on identifiers only *) + | ResetToState of Libnames.object_name (* Relying on states if any *) + +type reset_status = + | NoReset + | ResetAtSegmentStart of Names.identifier + | ResetAtRegisteredObject of reset_mark + +type reset_info = reset_status * undo_info * bool ref + + +let reset_mark id = match Lib.has_top_frozen_state () with + | Some sp -> + prerr_endline ("On top of state "^Libnames.string_of_path (fst sp)); + ResetToState sp + | None -> ResetToId id + +let compute_reset_info = function + | VernacBeginSection id + | VernacDefineModule (_,id, _, _, _) + | VernacDeclareModule (_,id, _, _) + | VernacDeclareModuleType (id, _, _) -> + ResetAtSegmentStart (snd id), undo_info(), ref true + + | VernacDefinition (_, (_,id), DefineBody _, _) + | VernacAssumption (_,_ ,(_,((_,id)::_,_))::_) + | VernacInductive (_, (((_,id),_,_,_),_) :: _) -> + ResetAtRegisteredObject (reset_mark id), undo_info(), ref true + + | com when is_vernac_proof_ending_command com -> NoReset, undo_info(), ref true + | VernacEndSegment _ -> NoReset, undo_info(), ref true + + | com when is_vernac_tactic_command com -> NoReset, undo_info(), ref true + | _ -> + (match Lib.has_top_frozen_state () with + | Some sp -> + prerr_endline ("On top of state "^Libnames.string_of_path (fst sp)); + ResetAtRegisteredObject (ResetToState sp) + | None -> NoReset), undo_info(), ref true + +let reset_initial () = + prerr_endline "Reset initial called"; flush stderr; + Vernacentries.abort_refine Lib.reset_initial () + +let reset_to = function + | ResetToId id -> + prerr_endline ("Reset called with "^(string_of_id id)); + Lib.reset_name (Util.dummy_loc,id) + | ResetToState sp -> + prerr_endline + ("Reset called with state "^(Libnames.string_of_path (fst sp))); + Lib.reset_to_state sp + +let reset_to_mod id = + prerr_endline ("Reset called to Mod/Sect with "^(string_of_id id)); + Lib.reset_mod (Util.dummy_loc,id) + +let raw_interp s = + Vernac.raw_do_vernac (Pcoq.Gram.parsable (Stream.of_string s)) + +let interp_with_options verbosely options s = prerr_endline "Starting interp..."; prerr_endline s; let pa = Pcoq.Gram.parsable (Stream.of_string s) in @@ -118,48 +426,28 @@ let interp verbosely s = match pe with | None -> assert false | Some((loc,vernac) as last) -> - match vernac with - | VernacDefinition _ | VernacStartTheoremProof _ - | VernacBeginSection _ | VernacGoal _ - | VernacDefineModule _ | VernacDeclareModuleType _ - | VernacDeclareTacticDefinition _ - when is_in_proof_mode () -> - user_error_loc loc (str "CoqIDE do not support nested goals") - | VernacSetOption (Goptions.SecondaryTable ("Ltac","Debug"), _) -> - user_error_loc loc (str "Debug mode not available within CoqIDE") - | VernacResetName _ - | VernacResetInitial - | VernacBack _ - | VernacAbort _ - | VernacAbortAll - | VernacRestart - | VernacSuspend - | VernacResume _ - | VernacUndo _ -> - user_error_loc loc (str "Use CoqIDE navigation instead") - | _ -> - begin - match vernac with - | VernacPrintOption _ - | VernacCheckMayEval _ - | VernacGlobalCheck _ - | VernacPrint _ - | VernacSearch _ - -> !flash_info - "Warning: query commands should not be inserted in scripts" - | VernacDefinition (_,_,DefineBody _,_) - | VernacInductive _ - | VernacFixpoint _ - | VernacCoFixpoint _ - | VernacEndProof _ - | VernacScheme _ - -> Options.make_silent (not verbosely) - | _ -> () - end; - Vernac.raw_do_vernac (Pcoq.Gram.parsable (Stream.of_string s)); - Options.make_silent true; - prerr_endline ("...Done with interp of : "^s); - last + if is_vernac_debug_command vernac then + user_error_loc loc (str "Debug mode not available within CoqIDE"); + if is_vernac_navigation_command vernac then + user_error_loc loc (str "Use CoqIDE navigation instead"); + if is_vernac_known_option_command vernac then + user_error_loc loc (str "Use CoqIDE display menu instead"); + if is_vernac_query_command vernac then + !flash_info + "Warning: query commands should not be inserted in scripts"; + if not (is_vernac_goal_printing_command vernac) then + (* Verbose if in small step forward and not a tactic *) + Flags.make_silent (not verbosely); + let reset_info = compute_reset_info vernac in + List.iter (fun (set_option,_) -> raw_interp set_option) options; + raw_interp s; + Flags.make_silent true; + List.iter (fun (_,unset_option) -> raw_interp unset_option) options; + prerr_endline ("...Done with interp of : "^s); + reset_info,last + +let interp verbosely phrase = + interp_with_options verbosely (make_option_commands ()) phrase let interp_and_replace s = let result = interp false s in @@ -196,11 +484,6 @@ let try_interptac s = | Stdpp.Exc_located (_,e) -> prerr_endline ("try_interp: failed ("^(Printexc.to_string e)); Failed | e -> Failed -let is_tactic = function - | VernacSolve _ -> true - | _ -> false - - let rec is_pervasive_exn = function | Out_of_memory | Stack_overflow | Sys.Break -> true | Error_in_file (_,_,e) -> is_pervasive_exn e @@ -238,7 +521,8 @@ let process_exn e = let s,loc= print_toplevel_error e in (msgnl s,loc) let interp_last last = prerr_string "*"; try - vernac_com (States.with_heavy_rollback Vernacentries.interp) last + vernac_com (States.with_heavy_rollback Vernacentries.interp) last; + Lib.add_frozen_state() with e -> let s,_ = process_exn e in prerr_endline ("Replay during undo failed because: "^s); raise e @@ -265,29 +549,25 @@ let prepare_hyps sigma env = in List.rev hyps -let prepare_goal sigma g = +let prepare_goal_main sigma g = let env = evar_env g in (prepare_hyps sigma env, (env, sigma, g.evar_concl, msg (pr_ltype_env_at_top env g.evar_concl))) -let prepare_meta sigma env (m,typ) = - env, sigma, - (msg (str " ?" ++ int m ++ str " : " ++ pr_ltype_env_at_top env typ)) - -let prepare_metas info sigma env = - List.fold_right - (fun cpl acc -> - let meta = prepare_meta sigma env cpl in meta :: acc) - info.pm_subgoals [] +let prepare_goal sigma g = + let options = make_option_commands () in + List.iter (fun (set_option,_) -> raw_interp set_option) options; + let x = prepare_goal_main sigma g in + List.iter (fun (_,unset_option) -> raw_interp unset_option) options; + x let get_current_pm_goal () = let pfts = get_pftreestate () in let gls = try nth_goal_of_pftreestate 1 pfts with _ -> raise Not_found in - let info = Decl_mode.get_info gls.it in - let env = pf_env gls in let sigma= sig_sig gls in - (prepare_hyps sigma env, - prepare_metas info sigma env) + let gl = sig_it gls in + prepare_goal sigma gl + let get_current_goals () = let pfts = get_pftreestate () in @@ -306,75 +586,6 @@ let print_no_goal () = msg (Printer.pr_subgoals (Decl_mode.get_end_command pfts) sigma gls) -type word_class = Normal | Kwd | Reserved - - -let kwd = [(* "Compile";"Inductive";"Qed";"Type";"end";"Axiom"; - "Definition";"Load";"Quit";"Variable";"in";"Cases";"FixPoint"; - "Parameter";"Set";"of";"CoFixpoint";"Grammar";"Proof";"Syntax"; - "using";"CoInductive";"Hypothesis";"Prop";"Theorem"; - *) - "Add"; "AddPath"; "Axiom"; "Chapter"; "CoFixpoint"; - "CoInductive"; "Defined"; "Definition"; - "End"; "Export"; "Fact"; "Fix"; "Fixpoint"; "Global"; "Grammar"; "Hint"; - "Hypothesis"; "Immediate"; "Implicits"; "Import"; "Inductive"; - "Infix"; "Lemma"; "Load"; "Local"; - "Match"; "Module"; "Module Type"; - "Mutual"; "Parameter"; "Print"; "Proof"; "Qed"; - "Record"; "Recursive"; "Remark"; "Require"; "Save"; "Scheme"; - "Section"; "Show"; "Syntactic"; "Syntax"; "Tactic"; "Theorem"; - "Unset"; "Variable"; "Variables"; -] - -let reserved = [] - -module SHashtbl = - Hashtbl.Make - (struct - type t = string - let equal = ( = ) - let hash = Hashtbl.hash - end) - - -let word_tbl = SHashtbl.create 37 -let _ = - List.iter (fun w -> SHashtbl.add word_tbl w Kwd) kwd; - List.iter (fun w -> SHashtbl.add word_tbl w Reserved) reserved - -let word_class s = - try - SHashtbl.find word_tbl s - with Not_found -> Normal - -type reset_info = NoReset | Reset of Names.identifier * bool ref - -let compute_reset_info = function - | VernacDefinition (_, (_,id), DefineBody _, _) - | VernacBeginSection (_,id) - | VernacDefineModule (_,(_,id), _, _, _) - | VernacDeclareModule (_,(_,id), _, _) - | VernacDeclareModuleType ((_,id), _, _) - | VernacAssumption (_, (_,((_,id)::_,_))::_) - | VernacInductive (_, (((_,id),_,_,_),_) :: _) -> - Reset (id, ref true) - | VernacDefinition (_, (_,id), ProveBody _, _) - | VernacStartTheoremProof (_, (_,id), _, _, _) -> - Reset (id, ref false) - | _ -> NoReset - -let reset_initial () = - prerr_endline "Reset initial called"; flush stderr; - Vernacentries.abort_refine Lib.reset_initial () - -let reset_to id = - prerr_endline ("Reset called with "^(string_of_id id)); - Vernacentries.abort_refine Lib.reset_name (Util.dummy_loc,id) -let reset_to_mod id = - prerr_endline ("Reset called to Mod/Sect with "^(string_of_id id)); - Vernacentries.abort_refine Lib.reset_mod (Util.dummy_loc,id) - - let hyp_menu (env, sigma, ((coqident,ident),_,ast),(s,pr_ast)) = [("clear "^ident),("clear "^ident^"."); @@ -480,21 +691,9 @@ let make_cases s = [] | _ -> raise Not_found -let is_state_preserving = function - | VernacPrint _ | VernacPrintOption _ | VernacGlobalCheck _ - | VernacCheckMayEval _ | VernacSearch _ | VernacLocate _ - | VernacShow _ | VernacMemOption _ | VernacComments _ - | VernacChdir None | VernacNop -> - prerr_endline "state preserving command found"; true - | _ -> - false - - let current_status () = let path = msg (Libnames.pr_dirpath (Lib.cwd ())) in let path = if path = "Top" then "Ready" else "Ready in " ^ String.sub path 4 (String.length path - 4) in try path ^ ", proving " ^ (Names.string_of_id (Pfedit.get_current_proof_name ())) with _ -> path - - diff --git a/ide/coq.mli b/ide/coq.mli index 4b4c3267..a1bea931 100644 --- a/ide/coq.mli +++ b/ide/coq.mli @@ -6,22 +6,59 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: coq.mli 9154 2006-09-20 17:18:18Z corbinea $ i*) +(*i $Id: coq.mli 11126 2008-06-13 18:45:04Z herbelin $ i*) open Names open Term open Environ open Evd +val short_version : unit -> string val version : unit -> string +type printing_state = { + mutable printing_implicit : bool; + mutable printing_coercions : bool; + mutable printing_raw_matching : bool; + mutable printing_no_notation : bool; + mutable printing_all : bool; + mutable printing_evar_instances : bool; + mutable printing_universes : bool; + mutable printing_full_all : bool +} + +val printing_state : printing_state + +type reset_mark = + | ResetToId of Names.identifier + | ResetToState of Libnames.object_name + +type reset_status = + | NoReset + | ResetAtSegmentStart of Names.identifier + | ResetAtRegisteredObject of reset_mark + +type undo_info = identifier list + +val undo_info : unit -> undo_info + +type reset_info = reset_status * undo_info * bool ref + +val compute_reset_info : Vernacexpr.vernac_expr -> reset_info +val reset_initial : unit -> unit +val reset_to : reset_mark -> unit +val reset_to_mod : identifier -> unit + val init : unit -> string list -val interp : bool -> string -> Util.loc * Vernacexpr.vernac_expr +val interp : bool -> string -> reset_info * (Util.loc * Vernacexpr.vernac_expr) val interp_last : Util.loc * Vernacexpr.vernac_expr -> unit -val interp_and_replace : string -> (Util.loc * Vernacexpr.vernac_expr) * string +val interp_and_replace : string -> + (reset_info * (Util.loc * Vernacexpr.vernac_expr)) * string -val is_tactic : Vernacexpr.vernac_expr -> bool -val is_state_preserving : Vernacexpr.vernac_expr -> bool +val is_vernac_tactic_command : Vernacexpr.vernac_expr -> bool +val is_vernac_state_preserving_command : Vernacexpr.vernac_expr -> bool +val is_vernac_goal_starting_command : Vernacexpr.vernac_expr -> bool +val is_vernac_proof_ending_command : Vernacexpr.vernac_expr -> bool (* type hyp = (identifier * constr option * constr) * string *) @@ -33,7 +70,7 @@ type goal = hyp list * concl val get_current_goals : unit -> goal list -val get_current_pm_goal : unit -> hyp list * meta list +val get_current_pm_goal : unit -> goal val get_current_goals_nb : unit -> int @@ -41,13 +78,6 @@ val print_no_goal : unit -> string val process_exn : exn -> string*(Util.loc option) -type reset_info = NoReset | Reset of Names.identifier * bool ref - -val compute_reset_info : Vernacexpr.vernac_expr -> reset_info -val reset_initial : unit -> unit -val reset_to : identifier -> unit -val reset_to_mod : identifier -> unit - val hyp_menu : hyp -> (string * string) list val concl_menu : concl -> (string * string) list diff --git a/ide/coq.png b/ide/coq.png index 2e5bdcd6..6ad66dbd 100644 Binary files a/ide/coq.png and b/ide/coq.png differ diff --git a/ide/coq_commands.ml b/ide/coq_commands.ml index 677c5eff..3a48fc7d 100644 --- a/ide/coq_commands.ml +++ b/ide/coq_commands.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: coq_commands.ml 9976 2007-07-12 11:58:30Z msozeau $ *) +(* $Id: coq_commands.ml 10994 2008-05-26 16:21:31Z jnarboux $ *) let commands = [ [(* "Abort"; *) @@ -109,9 +109,9 @@ let commands = [ "Set Extraction Optimize"; "Set Hyps__limit"; "Set Implicit Arguments"; - "Set Printing Coercion"; + (*"Set Printing Coercion"; "Set Printing Coercions"; - "Set Printing Synth"; + "Set Printing Synth";*) "Set Printing Wildcard"; "Set Silent."; "Set Undo"; @@ -142,9 +142,10 @@ let commands = [ "Unset Extraction Optimize"; "Unset Hyps__limit"; "Unset Implicit Arguments"; + (* "Unset Printing Coercion"; "Unset Printing Coercions"; - "Unset Printing Synth"; + "Unset Printing Synth"; *) "Unset Printing Wildcard"; "Unset Silent."; "Unset Undo";]; @@ -156,6 +157,8 @@ let commands = [ let state_preserving = [ "Check"; "Eval"; + "Eval lazy in"; + "Eval vm_compute in"; "Eval compute in"; "Extraction"; "Extraction Library"; diff --git a/ide/coqide.ml b/ide/coqide.ml index 6cee46a6..12716197 100644 --- a/ide/coqide.ml +++ b/ide/coqide.ml @@ -1,3 +1,4 @@ + (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* failwith "Internal error in out_some" | Some f -> f - let cb_ = ref None -let cb () = ((out_some !cb_):GData.clipboard) +let cb () = ((Option.get !cb_):GData.clipboard) let last_cb_content = ref "" - + let (message_view:GText.view option ref) = ref None let (proof_view:GText.view option ref) = ref None let (_notebook:GPack.notebook option ref) = ref None -let notebook () = out_some !_notebook +let notebook () = Option.get !_notebook + +let update_notebook_pos () = + let pos = + match !current.vertical_tabs, !current.opposite_tabs with + | false, false -> `TOP + | false, true -> `BOTTOM + | true , false -> `LEFT + | true , true -> `RIGHT + in + (notebook ())#set_tab_pos pos (* Tabs contain the name of the edited file and 2 status informations: Saved state + Focused proof buffer *) @@ -89,7 +97,7 @@ module Vector = struct type 'a t = ('a option) array ref let create () = ref [||] let length t = Array.length !t - let get t i = out_some (Array.get !t i) + let get t i = Option.get (Array.get !t i) let set t i v = Array.set !t i (Some v) let remove t i = Array.set !t i None let append t e = t := Array.append !t [|Some e|]; (Array.length !t)-1 @@ -101,7 +109,7 @@ module Vector = struct let exists f t = let l = Array.length !t in let rec test i = - (i < l) && (((!t.(i) <> None) && f (out_some !t.(i))) || test (i+1)) + (i < l) && (((!t.(i) <> None) && f (Option.get !t.(i))) || test (i+1)) in test 0 end @@ -175,7 +183,8 @@ object('self) method reset_initial : unit method send_to_coq : bool -> bool -> string -> - bool -> bool -> bool -> (bool*(Util.loc * Vernacexpr.vernac_expr)) option + bool -> bool -> bool -> + (bool*(reset_info*(Util.loc * Vernacexpr.vernac_expr))) option method set_message : string -> unit method show_pm_goal : unit method show_goals : unit @@ -300,7 +309,7 @@ let get_input_view i = let active_view = ref None -let get_active_view () = Vector.get input_views (out_some !active_view) +let get_active_view () = Vector.get input_views (Option.get !active_view) let set_active_view i = (match !active_view with None -> () | Some i -> @@ -451,8 +460,8 @@ let rec complete input_buffer w (offset:int) = end let get_current_word () = - let av = out_some ((get_current_view ()).analyzed_view) in - match GtkBase.Clipboard.wait_for_text (cb ())#as_clipboard with + let av = Option.get ((get_current_view ()).analyzed_view) in + match (cb ())#text with | None -> prerr_endline "None selected"; let it = av#get_insert in @@ -481,7 +490,7 @@ let with_file name ~f = type info = {start:GText.mark; stop:GText.mark; ast:Util.loc * Vernacexpr.vernac_expr; - reset_info:Coq.reset_info; + reset_info:Coq.reset_info } exception Size of int @@ -491,60 +500,118 @@ let pop () = try Stack.pop processed_stack with Stack.Empty -> raise (Size 0) let top () = try Stack.top processed_stack with Stack.Empty -> raise (Size 0) let is_empty () = Stack.is_empty processed_stack - (* push a new Coq phrase *) -let update_on_end_of_proof id = - let lookup_lemma = function - | { ast = _, ( VernacDefinition (_, _, ProveBody _, _) - | VernacDeclareTacticDefinition _ - | VernacStartTheoremProof _) ; - reset_info = Reset (_, r) } -> - if not !r then begin - prerr_endline "Toggling Reset info to true"; - r := true; raise Exit end - else begin - prerr_endline "Toggling Changing Reset id"; - r := false - end - | { ast = _, (VernacAbort _ | VernacAbortAll | VernacGoal _) } -> raise Exit - | _ -> () - in - try Stack.iter lookup_lemma processed_stack with Exit -> () - let update_on_end_of_segment id = let lookup_section = function - | { ast = _, ( VernacBeginSection id' - | VernacDefineModule (_,id',_,_,None) - | VernacDeclareModule (_,id',_,_) - | VernacDeclareModuleType (id',_,None)); - reset_info = Reset (_, r) } - when id = id' -> raise Exit - | { reset_info = Reset (_, r) } -> r := false - | _ -> () + | { reset_info = ResetAtSegmentStart id',_,_ } when id = id' -> raise Exit + | { reset_info = _,_,r } -> r := false in try Stack.iter lookup_section processed_stack with Exit -> () -let push_phrase start_of_phrase_mark end_of_phrase_mark ast = +let push_phrase reset_info start_of_phrase_mark end_of_phrase_mark ast = let x = {start = start_of_phrase_mark; stop = end_of_phrase_mark; ast = ast; - reset_info = Coq.compute_reset_info (snd ast) - } - in - push x; + reset_info = reset_info + } in + begin match snd ast with - | VernacEndProof (Proved (_, None)) -> update_on_end_of_proof () - | VernacEndSegment id -> update_on_end_of_segment id - | _ -> () + | VernacEndSegment (_,id) -> + prerr_endline "Updating on end of segment 1"; + update_on_end_of_segment id + | _ -> () + end; + push x -let repush_phrase x = - let x = { x with reset_info = Coq.compute_reset_info (snd x.ast) } in - push x; + +let repush_phrase reset_info x = + let x = { x with reset_info = reset_info } in + begin match snd x.ast with - | VernacEndProof (Proved (_, None)) -> update_on_end_of_proof () - | VernacEndSegment id -> update_on_end_of_segment id + | VernacEndSegment (_,id) -> + prerr_endline "Updating on end of segment 2"; + update_on_end_of_segment id | _ -> () + end; + push x + +type backtrack = +| BacktrackToNextActiveMark +| BacktrackToMark of reset_mark +| BacktrackToModSec of Names.identifier +| NoBacktrack + +let add_undo = function (n,a,b,p,l as x) -> if p = 0 then (n+1,a,b,p,l) else x +let add_abort = function (n,a,b,0,l) -> (0,a+1,b,0,l) | (n,a,b,p,l) -> (n,a,b,p-1,l) +let add_qed q (n,a,b,p,l) = (n,a,b,p+q,l) +let add_backtrack (n,a,b,p,l) b' = (n,a,b',p,l) + +let update_proofs (n,a,b,p,cur_lems) prev_lems = + let ncommon = List.length (Util.list_intersect cur_lems prev_lems) in + let openproofs = List.length cur_lems - ncommon in + let closedproofs = List.length prev_lems - ncommon in + let undos = (n,a,b,p,prev_lems) in + add_qed closedproofs (Util.iterate add_abort openproofs undos) + +let pop_command undos t = + let (state_info,undo_info,section_info) = t.reset_info in + let undos = + if !section_info then + let undos = update_proofs undos undo_info in + match state_info with + | _ when is_vernac_tactic_command (snd t.ast) -> + (* A tactic, active if not below a Qed *) + add_undo undos + | ResetAtRegisteredObject mark -> + add_backtrack undos (BacktrackToMark mark) + | ResetAtSegmentStart id -> + add_backtrack undos (BacktrackToModSec id) + | _ when is_vernac_state_preserving_command (snd t.ast) -> + undos + | _ -> + add_backtrack undos BacktrackToNextActiveMark + else + begin + prerr_endline "In section"; + (* An object inside a closed section *) + add_backtrack undos BacktrackToNextActiveMark + end in + ignore (pop ()); + undos + +let rec apply_backtrack l = function + | 0, BacktrackToMark mark -> reset_to mark + | 0, NoBacktrack -> () + | 0, BacktrackToModSec id -> reset_to_mod id + | p, _ -> + (* re-synchronize Coq to the current state of the stack *) + if is_empty () then + Coq.reset_initial () + else + begin + let t = top () in + let undos = (0,0,BacktrackToNextActiveMark,p,l) in + let (_,_,b,p,l) = pop_command undos t in + apply_backtrack l (p,b); + let reset_info = Coq.compute_reset_info (snd t.ast) in + interp_last t.ast; + repush_phrase reset_info t + end + +let rec apply_undos (n,a,b,p,l) = + (* Aborts *) + if a <> 0 then prerr_endline ("Applying "^string_of_int a^" aborts"); + (try Util.repeat a Pfedit.delete_current_proof () + with e -> prerr_endline "WARNING : found a closed environment"; raise e); + (* Undos *) + if n<>0 then + (prerr_endline ("Applying "^string_of_int n^" undos"); + try Pfedit.undo n + with _ -> (* Undo stack exhausted *) + apply_backtrack l (p,BacktrackToNextActiveMark)); + (* Reset *) + apply_backtrack l (p,b) (* For electric handlers *) exception Found @@ -556,11 +623,11 @@ let activate_input i = (match !active_view with | None -> () | Some n -> - let a_v = out_some (Vector.get input_views n).analyzed_view in + let a_v = Option.get (Vector.get input_views n).analyzed_view in a_v#deactivate (); a_v#reset_initial ); - let activate_function = (out_some (Vector.get input_views i).analyzed_view)#activate in + let activate_function = (Option.get (Vector.get input_views i).analyzed_view)#activate in activate_function (); set_active_view i @@ -575,13 +642,13 @@ let warning msg = class analyzed_view index = let {view = input_view_} as current_all_ = get_input_view index in - let proof_view_ = out_some !proof_view in - let message_view_ = out_some !message_view in + let proof_view_ = Option.get !proof_view in + let message_view_ = Option.get !message_view in object(self) val current_all = current_all_ val input_view = current_all_.view - val proof_view = out_some !proof_view - val message_view = out_some !message_view + val proof_view = Option.get !proof_view + val message_view = Option.get !message_view val input_buffer = input_view_#buffer val proof_buffer = proof_view_#buffer val message_buffer = message_view_#buffer @@ -794,17 +861,15 @@ object(self) proof_buffer#insert (Printf.sprintf " *** Declarative Mode ***\n"); try - let (hyps,metas) = get_current_pm_goal () in + let (hyps,concl) = get_current_pm_goal () in List.iter (fun ((_,_,_,(s,_)) as _hyp) -> proof_buffer#insert (s^"\n")) hyps; proof_buffer#insert (String.make 38 '_' ^ "\n"); - List.iter - (fun (_,_,m) -> - proof_buffer#insert (m^"\n")) - metas; + let (_,_,_,s) = concl in + proof_buffer#insert ("thesis := \n "^s^"\n"); let my_mark = `NAME "end_of_conclusion" in proof_buffer#move_mark ~where:((proof_buffer#get_iter_at_mark `INSERT)) @@ -1000,7 +1065,7 @@ object(self) self#insert_message s; message_view#misc#draw None; if localize then - (match Util.option_map Util.unloc loc with + (match Option.map Util.unloc loc with | None -> () | Some (start,stop) -> let convert_pos = byte_offset_to_char_offset phrase in @@ -1140,7 +1205,7 @@ object(self) input_view#set_editable true; !pop_info (); end in - let mark_processed complete (start,stop) ast = + let mark_processed reset_info complete (start,stop) ast = let b = input_buffer in b#move_mark ~where:stop (`NAME "start_of_input"); b#apply_tag_by_name @@ -1152,7 +1217,8 @@ object(self) end; let start_of_phrase_mark = `MARK (b#create_mark start) in let end_of_phrase_mark = `MARK (b#create_mark stop) in - push_phrase + push_phrase + reset_info start_of_phrase_mark end_of_phrase_mark ast; if display_goals then self#show_goals; @@ -1162,14 +1228,14 @@ object(self) None -> false | Some (loc,phrase) -> (match self#send_to_coq verbosely false phrase true true true with - | Some (complete,ast) -> - sync (mark_processed complete) loc ast; true + | Some (complete,(reset_info,ast)) -> + sync (mark_processed reset_info complete) loc ast; true | None -> sync remove_tag loc; false) end method insert_this_phrase_on_success show_output show_msg localize coqphrase insertphrase = - let mark_processed complete ast = + let mark_processed reset_info complete ast = let stop = self#get_start_of_input in if stop#starts_line then input_buffer#insert ~iter:stop insertphrase @@ -1182,7 +1248,7 @@ object(self) input_buffer#place_cursor stop; let start_of_phrase_mark = `MARK (input_buffer#create_mark start) in let end_of_phrase_mark = `MARK (input_buffer#create_mark stop) in - push_phrase start_of_phrase_mark end_of_phrase_mark ast; + push_phrase reset_info start_of_phrase_mark end_of_phrase_mark ast; self#show_goals; (*Auto insert save on success... try (match Coq.get_current_goals () with @@ -1203,13 +1269,15 @@ object(self) `MARK (input_buffer#create_mark start) in let end_of_phrase_mark = `MARK (input_buffer#create_mark stop) in - push_phrase start_of_phrase_mark end_of_phrase_mark ast + push_phrase + reset_info start_of_phrase_mark end_of_phrase_mark ast end | None -> ()) | _ -> ()) with _ -> ()*) in match self#send_to_coq false false coqphrase show_output show_msg localize with - | Some (complete,ast) -> sync (mark_processed complete) ast; true + | Some (complete,(reset_info,ast)) -> + sync (mark_processed reset_info complete) ast; true | None -> sync (fun _ -> self#insert_message ("Unsuccessfully tried: "^coqphrase)) @@ -1268,53 +1336,30 @@ object(self) self#clear_message)(); Coq.reset_initial () - (* backtrack Coq to the phrase preceding iterator [i] *) method backtrack_to_no_lock i = prerr_endline "Backtracking_to iter starts now."; - (* re-synchronize Coq to the current state of the stack *) - let rec synchro () = - if is_empty () then - Coq.reset_initial () - else begin - let t = pop () in - begin match t.reset_info with - | Reset (id, ({contents=true} as v)) -> v:=false; - (match snd t.ast with - | VernacBeginSection _ | VernacDefineModule _ - | VernacDeclareModule _ | VernacDeclareModuleType _ - | VernacEndSegment _ - -> reset_to_mod id - | _ -> reset_to id) - | _ -> synchro () - end; - interp_last t.ast; - repush_phrase t - end - in - let add_undo t = match t with | Some n -> Some (succ n) | None -> None - in - (* pop Coq commands until we reach iterator [i] *) + (* pop Coq commands until we reach iterator [i] *) let rec pop_commands done_smthg undos = if is_empty () then done_smthg, undos else let t = top () in - if i#compare (input_buffer#get_iter_at_mark t.stop) < 0 then begin - ignore (pop ()); - let undos = if is_tactic (snd t.ast) then add_undo undos else None in - pop_commands true undos - end else - done_smthg, undos + if i#compare (input_buffer#get_iter_at_mark t.stop) < 0 then + begin + prerr_endline "Popped top command"; + pop_commands true (pop_command undos t) + end + else + done_smthg, undos in - let done_smthg, undos = pop_commands false (Some 0) in + let undos = (0,0,NoBacktrack,0,undo_info()) in + let done_smthg, undos = pop_commands false undos in prerr_endline "Popped commands"; if done_smthg then - begin - try - (match undos with - | None -> synchro () - | Some n -> try Pfedit.undo n with _ -> synchro ()); + begin + try + apply_undos undos; sync (fun _ -> let start = if is_empty () then input_buffer#start_iter @@ -1342,7 +1387,8 @@ Please restart and report NOW."; method backtrack_to i = if Mutex.try_lock coq_may_stop then - (!push_info "Undoing...";self#backtrack_to_no_lock i ; Mutex.unlock coq_may_stop; + (!push_info "Undoing..."; + self#backtrack_to_no_lock i; Mutex.unlock coq_may_stop; !pop_info ()) else prerr_endline "backtrack_to : discarded (lock is busy)" @@ -1377,41 +1423,9 @@ Please restart and report NOW."; self#show_goals; self#clear_message in - begin match last_command with - | {ast=_, (VernacSolve _ | VernacTime (VernacSolve _))} -> - begin - try Pfedit.undo 1; ignore (pop ()); sync update_input () - with _ -> self#backtrack_to_no_lock start - end - | {ast=_,t;reset_info=Reset (id, {contents=true})} -> - ignore (pop ()); - (match t with - | VernacBeginSection _ | VernacDefineModule _ - | VernacDeclareModule _ | VernacDeclareModuleType _ - | VernacEndSegment _ - -> reset_to_mod id - | _ -> reset_to id); - sync update_input () - | { ast = _, ( VernacStartTheoremProof _ - | VernacGoal _ - | VernacDeclareTacticDefinition _ - | VernacDefinition (_,_,ProveBody _,_)); - reset_info=Reset(id,{contents=false})} -> - ignore (pop ()); - (try - Pfedit.delete_current_proof () - with e -> - begin - prerr_endline "WARNING : found a closed environment"; - raise e - end); - sync update_input () - | { ast = (_, a) } when is_state_preserving a -> - ignore (pop ()); - sync update_input () - | _ -> - self#backtrack_to_no_lock start - end; + let undo = pop_command (0,0,NoBacktrack,0,undo_info()) last_command in + apply_undos undo; + sync update_input () with | Size 0 -> (* !flash_info "Nothing to Undo"*)() ); @@ -1533,7 +1547,7 @@ Please restart and report NOW."; deact_id <- Some (input_view#event#connect#key_press self#disconnected_keypress_handler); prerr_endline "CONNECTED inactive : "; - print_id (out_some deact_id) + print_id (Option.get deact_id) method activate () = is_active <- true; @@ -1545,9 +1559,9 @@ Please restart and report NOW."; act_id <- Some (input_view#event#connect#key_press self#active_keypress_handler); prerr_endline "CONNECTED active : "; - print_id (out_some act_id); + print_id (Option.get act_id); match - (out_some ((Vector.get input_views index).analyzed_view)) #filename + (Option.get ((Vector.get input_views index).analyzed_view)) #filename with | None -> () | Some f -> let dir = Filename.dirname f in @@ -1645,7 +1659,7 @@ Please restart and report NOW."; if auto_complete_on && String.length s = 1 && s <> " " && s <> "\n" then - let v = out_some (get_current_view ()).analyzed_view + let v = Option.get (get_current_view ()).analyzed_view in let has_completed = v#complete_at_offset @@ -1662,7 +1676,7 @@ Please restart and report NOW."; (fun () -> if input_buffer#modified then set_tab_image index - ~icon:(match (out_some (current_all.analyzed_view))#filename with + ~icon:(match (Option.get (current_all.analyzed_view))#filename with | None -> `SAVE_AS | Some _ -> `SAVE ) @@ -1899,10 +1913,19 @@ let main files = | Vector.Found i -> set_current_view i | e -> !flash_info ("Load failed: "^(Printexc.to_string e)) in - let load_m = file_factory#add_item "_Open/Create" + let load_m = file_factory#add_item "_New" + ~key:GdkKeysyms._N in + let load_f () = + match select_file_for_save ~title:"Create file" () with + | None -> () + | Some f -> load f + in + ignore (load_m#connect#activate (load_f)); + + let load_m = file_factory#add_item "_Open" ~key:GdkKeysyms._O in let load_f () = - match select_file ~title:"Load file" () with + match select_file_for_open ~title:"Load file" () with | None -> () | Some f -> load f in @@ -1916,20 +1939,20 @@ let main files = let save_f () = let current = get_current_view () in try - (match (out_some current.analyzed_view)#filename with + (match (Option.get current.analyzed_view)#filename with | None -> - begin match GToolbox.select_file ~title:"Save file" () + begin match select_file_for_save ~title:"Save file" () with | None -> () | Some f -> - if (out_some current.analyzed_view)#save_as f then begin + if (Option.get current.analyzed_view)#save_as f then begin set_current_tab_label (Filename.basename f); !flash_info ("File " ^ f ^ " saved") end else warning ("Save Failed (check if " ^ f ^ " is writable)") end | Some f -> - if (out_some current.analyzed_view)#save f then + if (Option.get current.analyzed_view)#save f then !flash_info ("File " ^ f ^ " saved") else warning ("Save Failed (check if " ^ f ^ " is writable)") @@ -1944,27 +1967,27 @@ let main files = in let saveas_f () = let current = get_current_view () in - try (match (out_some current.analyzed_view)#filename with + try (match (Option.get current.analyzed_view)#filename with | None -> - begin match GToolbox.select_file ~title:"Save file as" () + begin match select_file_for_save ~title:"Save file as" () with | None -> () | Some f -> - if (out_some current.analyzed_view)#save_as f then begin + if (Option.get current.analyzed_view)#save_as f then begin set_current_tab_label (Filename.basename f); !flash_info "Saved" end else !flash_info "Save Failed" end | Some f -> - begin match GToolbox.select_file + begin match select_file_for_save ~dir:(ref (Filename.dirname f)) ~filename:(Filename.basename f) ~title:"Save file as" () with | None -> () | Some f -> - if (out_some current.analyzed_view)#save_as f then begin + if (Option.get current.analyzed_view)#save_as f then begin set_current_tab_label (Filename.basename f); !flash_info "Saved" end else !flash_info "Save Failed" @@ -1974,7 +1997,7 @@ let main files = ignore (saveas_m#connect#activate saveas_f); (* File/Save All Menu *) - let saveall_m = file_factory#add_item "Sa_ve All" in + let saveall_m = file_factory#add_item "Sa_ve all" in let saveall_f () = Vector.iter (function @@ -1997,7 +2020,7 @@ let main files = ignore (saveall_m#connect#activate saveall_f); (* File/Revert Menu *) - let revert_m = file_factory#add_item "_Revert All Buffers" in + let revert_m = file_factory#add_item "_Revert all buffers" in let revert_f () = Vector.iter (function @@ -2018,9 +2041,9 @@ let main files = (* File/Close Menu *) let close_m = - file_factory#add_item "_Close Buffer" ~key:GdkKeysyms._W in + file_factory#add_item "_Close buffer" ~key:GdkKeysyms._W in let close_f () = - let v = out_some !active_view in + let v = Option.get !active_view in let act = get_current_view_page () in if v = act then !flash_info "Cannot close an active view" else remove_current_view_page () @@ -2030,7 +2053,7 @@ let main files = (* File/Print Menu *) let print_f () = let v = get_current_view () in - let av = out_some v.analyzed_view in + let av = Option.get v.analyzed_view in match av#filename with | None -> !flash_info "Cannot print: this buffer has no name" @@ -2040,17 +2063,48 @@ let main files = !current.cmd_coqdoc ^ " -ps " ^ Filename.quote (Filename.basename f) ^ " | " ^ !current.cmd_print in - let s,_ = run_command av#insert_message cmd in - !flash_info (cmd ^ if s = Unix.WEXITED 0 then " succeeded" else " failed") + let print_window = GWindow.window + ~title:"Print" + ~modal:true + ~position:`CENTER + ~wm_class:"CodIDE" + ~wm_name: "CodIDE" () in + let vbox_print = GPack.vbox + ~spacing:10 + ~border_width:10 + ~packing:print_window#add () in + let _ = GMisc.label + ~justify:`LEFT + ~text:"Print using the following command:" + ~packing:vbox_print#add () in + let print_entry = GEdit.entry + ~text:cmd + ~editable:true + ~width_chars:80 + ~packing:vbox_print#add () in + let hbox_print = GPack.hbox + ~spacing:10 + ~packing:vbox_print#add () in + let print_cancel_button = GButton.button ~stock:`CANCEL ~label:"Cancel" ~packing:hbox_print#add () in + let print_button = GButton.button ~stock:`PRINT ~label:"Print" ~packing:hbox_print#add () in + let callback_print () = + let cmd = print_entry#text in + let s,_ = run_command av#insert_message cmd in + !flash_info (cmd ^ if s = Unix.WEXITED 0 then " succeeded" else " failed"); + print_window#destroy () + in + ignore (print_cancel_button#connect#clicked ~callback:print_window#destroy) ; + ignore (print_button#connect#clicked ~callback:callback_print); + print_window#misc#show(); in - let _ = file_factory#add_item "_Print" + let _ = file_factory#add_item "_Print..." ~key:GdkKeysyms._P ~callback:print_f in (* File/Export to Menu *) let export_f kind () = let v = get_current_view () in - let av = out_some v.analyzed_view in + let av = Option.get v.analyzed_view in match av#filename with | None -> !flash_info "Cannot print: this buffer has no name" @@ -2060,11 +2114,11 @@ let main files = let basef_we = try Filename.chop_extension basef with _ -> basef in match kind with | "latex" -> basef_we ^ ".tex" - | "dvi" | "ps" | "html" -> basef_we ^ "." ^ kind + | "dvi" | "ps" | "pdf" | "html" -> basef_we ^ "." ^ kind | _ -> assert false in let cmd = - "cd " ^ (Filename.quote (Filename.dirname f)) ^ "; " ^ + "cd " ^ Filename.quote (Filename.dirname f) ^ "; " ^ !current.cmd_coqdoc ^ " --" ^ kind ^ " -o " ^ (Filename.quote output) ^ " " ^ (Filename.quote basef) in let s,_ = run_command av#insert_message cmd in @@ -2085,6 +2139,9 @@ let main files = let _ = file_export_factory#add_item "_Dvi" ~callback:(export_f "dvi") in + let _ = + file_export_factory#add_item "_Pdf" ~callback:(export_f "pdf") + in let _ = file_export_factory#add_item "_Ps" ~callback:(export_f "ps") in @@ -2095,7 +2152,7 @@ let main files = (fun () -> Highlight.highlight_all (get_current_view()).view#buffer; - (out_some (get_current_view()).analyzed_view)#recenter_insert)); + (Option.get (get_current_view()).analyzed_view)#recenter_insert)); (* File/Quit Menu *) let quit_f () = @@ -2129,7 +2186,7 @@ let main files = ignore(edit_f#add_item "_Undo" ~key:GdkKeysyms._u ~callback: (do_if_not_computing "undo" (fun () -> - ignore ((out_some ((get_current_view()).analyzed_view))# + ignore ((Option.get ((get_current_view()).analyzed_view))# without_auto_complete (fun () -> (get_current_view()).view#undo) ())))); ignore(edit_f#add_item "_Clear Undo Stack" @@ -2203,13 +2260,15 @@ let main files = ~packing: (find_box#attach ~left:1 ~top:1 ~expand:`X) () in - let _ = + (* let _ = GButton.check_button ~label:"case sensitive" ~active:true ~packing: (find_box#attach ~left:1 ~top:2) () - in + + in + *) (* let find_backwards_check = GButton.check_button @@ -2385,7 +2444,7 @@ let main files = ~callback: (do_if_not_computing (fun b -> - let v = out_some (get_current_view ()).analyzed_view + let v = Option.get (get_current_view ()).analyzed_view in v#complete_at_offset ((v#view#buffer#get_iter `SEL_BOUND)#offset) @@ -2397,7 +2456,7 @@ let main files = ignore(edit_f#add_item "Complete Word" ~key:GdkKeysyms._slash ~callback: (fun () -> ignore ( - let av = out_some ((get_current_view()).analyzed_view) in + let av = Option.get ((get_current_view()).analyzed_view) in av#complete_at_offset (av#get_insert)#offset ))); @@ -2406,13 +2465,13 @@ let main files = let _ = edit_f#add_item "External editor" ~callback: (fun () -> - let av = out_some ((get_current_view()).analyzed_view) in + let av = Option.get ((get_current_view()).analyzed_view) in match av#filename with | None -> () | Some f -> save_f (); - let l,r = !current.cmd_editor in - let _ = run_command av#insert_message (l ^ (Filename.quote f) ^ r) in + let com = Flags.subst_command_placeholder !current.cmd_editor (Filename.quote f) in + let _ = run_command av#insert_message com in av#revert) in let _ = edit_f#add_separator () in @@ -2454,7 +2513,7 @@ let main files = let _ = edit_f#add_item "_Preferences" - ~callback:(fun () -> configure ();reset_revert_timer ()) + ~callback:(fun () -> configure ~apply:update_notebook_pos (); reset_revert_timer ()) in (* let save_prefs_m = @@ -2472,7 +2531,7 @@ let main files = in let do_or_activate f () = let current = get_current_view () in - let analyzed_view = out_some current.analyzed_view in + let analyzed_view = Option.get current.analyzed_view in if analyzed_view#is_active then ignore (f analyzed_view) else @@ -2496,7 +2555,7 @@ let main files = end; ignore (toolbar#insert_button ~tooltip - ~text:tooltip +(* ~text:tooltip*) ~icon:(stock_to_widget ~size:`LARGE_TOOLBAR icon) ~callback ()) @@ -2544,8 +2603,7 @@ let main files = ~tooltip:"Interrupt computations" ~key:GdkKeysyms._Break ~callback:break - `STOP - ; + `STOP; (* Tactics Menu *) let tactics_menu = factory#add_submenu "_Try Tactics" in @@ -2557,7 +2615,7 @@ let main files = in let do_if_active_raw f () = let current = get_current_view () in - let analyzed_view = out_some current.analyzed_view in + let analyzed_view = Option.get current.analyzed_view in if analyzed_view#is_active then ignore (f analyzed_view) in let do_if_active f = @@ -2628,6 +2686,8 @@ let main files = )) ()); + + ignore (tactics_factory#add_item "" ~key:GdkKeysyms._dollar ~callback:(do_if_active (fun a -> a#tactic_wizard @@ -2830,6 +2890,14 @@ with _ := Induction for _ Sort _.\n",61,10, Some GdkKeysyms._S); ~term ()) in + let _ = + queries_factory#add_item "_Locate" + ~callback:(fun () -> let term = get_current_word () in + (Command_windows.command_window ())#new_command + ~command:"Locate" + ~term + ()) + in let _ = queries_factory#add_item "_Whelp Locate" ~callback:(fun () -> let term = get_current_word () in @@ -2839,6 +2907,84 @@ with _ := Induction for _ Sort _.\n",61,10, Some GdkKeysyms._S); ()) in + (* Display menu *) + + let display_menu = factory#add_submenu "_Display" in + let view_factory = new GMenu.factory display_menu + ~accel_path:"/Display/" + ~accel_group + ~accel_modi:!current.modifier_for_display + in + + let _ = ignore (view_factory#add_check_item + "Display _implicit arguments" + ~key:GdkKeysyms._i + ~callback:(fun _ -> printing_state.printing_implicit <- not printing_state.printing_implicit; do_or_activate (fun a -> a#show_goals) ())) in + + let _ = ignore (view_factory#add_check_item + "Display _coercions" + ~key:GdkKeysyms._c + ~callback:(fun _ -> printing_state.printing_coercions <- not printing_state.printing_coercions; do_or_activate (fun a -> a#show_goals) ())) in + + let _ = ignore (view_factory#add_check_item + "Display raw _matching expressions" + ~key:GdkKeysyms._m + ~callback:(fun _ -> printing_state.printing_raw_matching <- not printing_state.printing_raw_matching; do_or_activate (fun a -> a#show_goals) ())) in + + let _ = ignore (view_factory#add_check_item + "Deactivate _notations display" + ~key:GdkKeysyms._n + ~callback:(fun _ -> printing_state.printing_no_notation <- not printing_state.printing_no_notation; do_or_activate (fun a -> a#show_goals) ())) in + + let _ = ignore (view_factory#add_check_item + "Display _all basic low-level contents" + ~key:GdkKeysyms._a + ~callback:(fun _ -> printing_state.printing_all <- not printing_state.printing_all; do_or_activate (fun a -> a#show_goals) ())) in + + let _ = ignore (view_factory#add_check_item + "Display _existential variable instances" + ~key:GdkKeysyms._e + ~callback:(fun _ -> printing_state.printing_evar_instances <- not printing_state.printing_evar_instances; do_or_activate (fun a -> a#show_goals) ())) in + + let _ = ignore (view_factory#add_check_item + "Display _universe levels" + ~key:GdkKeysyms._u + ~callback:(fun _ -> printing_state.printing_universes <- not printing_state.printing_universes; do_or_activate (fun a -> a#show_goals) ())) in + + let _ = ignore (view_factory#add_check_item + "Display all _low-level contents" + ~key:GdkKeysyms._l + ~callback:(fun _ -> printing_state.printing_full_all <- not printing_state.printing_full_all; do_or_activate (fun a -> a#show_goals) ())) in + + (* Unicode *) +(* + let unicode_menu = factory#add_submenu "_Unicode" in + let unicode_factory = new GMenu.factory unicode_menu + ~accel_path:"/Unicode/" + ~accel_group + ~accel_modi:[] + in + let logic_symbols_menu = unicode_factory#add_submenu "Math operators" in + let logic_factory = new GMenu.factory logic_symbols_menu + ~accel_path:"/Unicode/Math operators" + ~accel_group + ~accel_modi:[] + in + let new_unicode_item s = ignore ( + logic_factory#add_item s + ~callback:(fun () -> + let v = get_current_view () in + ignore (v.view#buffer#insert_interactive s))) + in + + for i = 0x2200 to 0x22FF do + List.iter new_unicode_item [Glib.Utf8.from_unichar i]; + + done; + +*) + + (* Externals *) let externals_menu = factory#add_submenu "_Compile" in let externals_factory = new GMenu.factory externals_menu @@ -2850,7 +2996,7 @@ with _ := Induction for _ Sort _.\n",61,10, Some GdkKeysyms._S); (* Command/Compile Menu *) let compile_f () = let v = get_current_view () in - let av = out_some v.analyzed_view in + let av = Option.get v.analyzed_view in save_f (); match av#filename with | None -> @@ -2877,21 +3023,22 @@ with _ := Induction for _ Sort _.\n",61,10, Some GdkKeysyms._S); (* Command/Make Menu *) let make_f () = let v = get_current_view () in - let av = out_some v.analyzed_view in + let av = Option.get v.analyzed_view in match av#filename with | None -> - !flash_info "Cannot print: this buffer has no name" + !flash_info "Cannot make: this buffer has no name" | Some f -> let cmd = "cd " ^ Filename.quote (Filename.dirname f) ^ "; " ^ !current.cmd_make in - (* - save_f (); - *) - av#insert_message "Command output:\n"; - let s,res = run_command av#insert_message cmd in - last_make := res; - last_make_index := 0; - !flash_info (!current.cmd_make ^ if s = Unix.WEXITED 0 then " succeeded" else " failed") + + (* + save_f (); + *) + av#insert_message "Command output:\n"; + let s,res = run_command av#insert_message cmd in + last_make := res; + last_make_index := 0; + !flash_info (!current.cmd_make ^ if s = Unix.WEXITED 0 then " succeeded" else " failed") in let _ = externals_factory#add_item "_Make" ~key:GdkKeysyms._F6 @@ -2905,7 +3052,7 @@ with _ := Induction for _ Sort _.\n",61,10, Some GdkKeysyms._S); let file,line,start,stop,error_msg = search_next_error () in load file; let v = get_current_view () in - let av = out_some v.analyzed_view in + let av = Option.get v.analyzed_view in let input_buffer = v.view#buffer in (* let init = input_buffer#start_iter in @@ -2931,7 +3078,7 @@ with _ := Induction for _ Sort _.\n",61,10, Some GdkKeysyms._S); with Not_found -> last_make_index := 0; let v = get_current_view () in - let av = out_some v.analyzed_view in + let av = Option.get v.analyzed_view in av#set_message "No more errors.\n" in let _ = @@ -2943,7 +3090,7 @@ with _ := Induction for _ Sort _.\n",61,10, Some GdkKeysyms._S); (* Command/CoqMakefile Menu*) let coq_makefile_f () = let v = get_current_view () in - let av = out_some v.analyzed_view in + let av = Option.get v.analyzed_view in match av#filename with | None -> !flash_info "Cannot make makefile: this buffer has no name" @@ -2958,20 +3105,24 @@ with _ := Induction for _ Sort _.\n",61,10, Some GdkKeysyms._S); in (* Windows Menu *) let configuration_menu = factory#add_submenu "_Windows" in - let configuration_factory = new GMenu.factory configuration_menu ~accel_path:"/Windows" ~accel_group + let configuration_factory = new GMenu.factory configuration_menu + ~accel_path:"/Windows" + ~accel_modi:[] + ~accel_group in - let _ = + let _ = configuration_factory#add_item - "Show _Query Window" - (* - ~key:GdkKeysyms._F12 - *) - ~callback:(Command_windows.command_window ())#window#present + "Show/Hide _Query Pane" + ~key:GdkKeysyms._Escape + ~callback:(fun () -> if (Command_windows.command_window ())#frame#misc#visible then + (Command_windows.command_window ())#frame#misc#hide () + else + (Command_windows.command_window ())#frame#misc#show ()) in let _ = - configuration_factory#add_item + configuration_factory#add_check_item "Show/Hide _Toolbar" - ~callback:(fun () -> + ~callback:(fun _ -> !current.show_toolbar <- not !current.show_toolbar; !show_toolbar !current.show_toolbar) in @@ -2983,8 +3134,15 @@ with _ := Induction for _ Sort _.\n",61,10, Some GdkKeysyms._S); let nb = notebook () in if nb#misc#toplevel#get_oid=w#coerce#get_oid then begin - let nw = GWindow.window ~show:true () in - let parent = out_some nb#misc#parent in + let nw = GWindow.window + ~width:(!current.window_width*2/3) + ~height:(!current.window_height*2/3) + ~position:`CENTER + ~wm_name:"CoqIde" + ~wm_class:"CoqIde" + ~title:"Script" + ~show:true () in + let parent = Option.get nb#misc#parent in ignore (nw#connect#destroy ~callback: (fun () -> nb#misc#reparent parent)); @@ -2993,6 +3151,33 @@ with _ := Induction for _ Sort _.\n",61,10, Some GdkKeysyms._S); end ))) in +(* let _ = configuration_factory#add_item + "Detach _Command Pane" + ~callback: + (do_if_not_computing "detach command pane" (sync + (fun () -> + let command_object = Command_windows.command_window() in + let queries_frame = command_object#frame in + if queries_frame#misc#toplevel#get_oid=w#coerce#get_oid then + begin + let nw = GWindow.window + ~width:(!current.window_width*2/3) + ~height:(!current.window_height*2/3) + ~wm_name:"CoqIde" + ~wm_class:"CoqIde" + ~position:`CENTER + ~title:"Queries" + ~show:true () in + let parent = Option.get queries_frame#misc#parent in + ignore (nw#connect#destroy + ~callback: + (fun () -> queries_frame#misc#reparent parent)); + queries_frame#misc#show(); + queries_frame#misc#reparent nw#coerce + end + ))) + in +*) let _ = configuration_factory#add_item "Detach _View" @@ -3002,8 +3187,9 @@ with _ := Induction for _ Sort _.\n",61,10, Some GdkKeysyms._S); match get_current_view () with | {view=v;analyzed_view=Some av} -> let w = GWindow.window ~show:true - ~width:(!current.window_width/2) - ~height:(!current.window_height) + ~width:(!current.window_width*2/3) + ~height:(!current.window_height*2/3) + ~position:`CENTER ~title:(match av#filename with | None -> "*Unnamed*" | Some f -> f) @@ -3037,17 +3223,17 @@ with _ := Induction for _ Sort _.\n",61,10, Some GdkKeysyms._S); let _ = help_factory#add_item "Browse Coq _Manual" ~callback: (fun () -> - let av = out_some ((get_current_view ()).analyzed_view) in + let av = Option.get ((get_current_view ()).analyzed_view) in browse av#insert_message (!current.doc_url ^ "main.html")) in let _ = help_factory#add_item "Browse Coq _Library" ~callback: (fun () -> - let av = out_some ((get_current_view ()).analyzed_view) in + let av = Option.get ((get_current_view ()).analyzed_view) in browse av#insert_message !current.library_url) in let _ = help_factory#add_item "Help for _keyword" ~key:GdkKeysyms._F1 ~callback:(fun () -> - let av = out_some ((get_current_view ()).analyzed_view) in + let av = Option.get ((get_current_view ()).analyzed_view) in av#help_for_keyword ()) in let _ = help_factory#add_separator () in @@ -3055,19 +3241,20 @@ with _ := Induction for _ Sort _.\n",61,10, Some GdkKeysyms._S); let faq_m = help_factory#add_item "_FAQ" in *) let about_m = help_factory#add_item "_About" in - (* End of menu *) (* The vertical Separator between Scripts and Goals *) - let hb = GPack.paned `HORIZONTAL ~border_width:5 ~packing:vbox#add () in + let queries_pane = GPack.paned `VERTICAL ~packing:(vbox#pack ~expand:true ) () in + let hb = GPack.paned `HORIZONTAL ~border_width:5 ~packing:(queries_pane#pack1 ~shrink:false ~resize:true) () in let fr_notebook = GBin.frame ~shadow_type:`IN ~packing:hb#add1 () in _notebook := Some (GPack.notebook ~border_width:2 ~show_border:false ~scrollable:true ~packing:fr_notebook#add ()); + update_notebook_pos (); let nb = notebook () in let hb2 = GPack.paned `VERTICAL ~packing:hb#add2 () in let fr_a = GBin.frame ~shadow_type:`IN ~packing:hb2#add () in - let fr_b = GBin.frame ~shadow_type:`IN ~packing:hb2#add () in + let fr_b = GBin.frame ~shadow_type:`IN ~packing:hb2#add () in let sw2 = GBin.scrolled_window ~vpolicy:`AUTOMATIC ~hpolicy:`AUTOMATIC @@ -3076,6 +3263,9 @@ with _ := Induction for _ Sort _.\n",61,10, Some GdkKeysyms._S); ~vpolicy:`AUTOMATIC ~hpolicy:`AUTOMATIC ~packing:(fr_b#add) () in + let command_object = Command_windows.command_window() in + let queries_frame = command_object#frame in + queries_pane#pack2 ~shrink:false ~resize:false (queries_frame#coerce); let lower_hbox = GPack.hbox ~homogeneous:false ~packing:vbox#pack () in let status_bar = GMisc.statusbar ~packing:(lower_hbox#pack ~expand:true) () in @@ -3312,32 +3502,46 @@ with _ := Induction for _ Sort _.\n",61,10, Some GdkKeysyms._S); (fun {view=view} -> view#misc#modify_font fd) input_views; ); - let about (b:GText.buffer) = - (try - let image = lib_ide_file "coq.png" in - let startup_image = GdkPixbuf.from_file image in - b#insert_pixbuf ~iter:b#start_iter - ~pixbuf:startup_image; - b#insert ~iter:b#start_iter "\t\t"; - with _ -> ()); - let about_string = - "\nCoqIDE: an Integrated Development Environment for Coq\n\ + let about_full_string = + "\nCoq is developed by the Coq Development Team\ + \n(INRIA - CNRS - University Paris 11 and partners)\ + \nWeb site: http://coq.inria.fr\ + \nFeature wish or bug report: http://logical.saclay.inria.fr/coq-bugs\ + \n\ + \nCredits for CoqIDE, the Integrated Development Environment for Coq:\ + \n\ \nMain author : Benjamin Monate\ \nContributors : Jean-Christophe Filliâtre\ - \n Pierre Letouzey, Claude Marché\n\ - \nFeature wish or bug report: use Web interface\n\ - \n\thttp://logical.futurs.inria.fr/coq-bugs\n\ + \n Pierre Letouzey, Claude Marché\ + \n Bruno Barras, Pierre Corbineau\ + \n Julien Narboux, Hugo Herbelin, ... \ + \n\ \nVersion information\ - \n-------------------\n" - in - if Glib.Utf8.validate about_string - then b#insert about_string; - let coq_version = Coq.version () in - if Glib.Utf8.validate coq_version - then b#insert coq_version; - + \n-------------------\ + \n" + in + let initial_about (b:GText.buffer) = + (try + let image = lib_ide_file "coq.png" in + let startup_image = GdkPixbuf.from_file image in + b#insert_pixbuf ~iter:b#start_iter ~pixbuf:startup_image; + b#insert ~iter:b#start_iter "\t\t " + with _ -> ()); + let coq_version = Coq.short_version () in + b#insert ~iter:b#start_iter "\n\n"; + if Glib.Utf8.validate coq_version then b#insert ~iter:b#start_iter coq_version; + b#insert ~iter:b#start_iter "\n " in - about tv2#buffer; + + let about (b:GText.buffer) = + if Glib.Utf8.validate about_full_string + then b#insert about_full_string; + let coq_version = Coq.version () in + if Glib.Utf8.validate coq_version + then b#insert coq_version + + in + initial_about tv2#buffer; w#add_accel_group accel_group; (* Remove default pango menu for textviews *) ignore (tv2#event#connect#button_press ~callback: @@ -3395,7 +3599,7 @@ with _ := Induction for _ Sort _.\n",61,10, Some GdkKeysyms._S); (fun _ -> if !current.contextual_menus_on_goal then begin - let w = (out_some (get_active_view ()).analyzed_view) in + let w = (Option.get (get_active_view ()).analyzed_view) in !push_info "Computing advanced goal's menus"; prerr_endline "Entering Goal Window. Computing Menus...."; w#show_goals_full; @@ -3468,6 +3672,7 @@ let start () = else failwith ("Coqide internal error: " ^ msg))); Command_windows.main (); Blaster_window.main 9; + init_stdout (); main files; if !Coq_config.with_geoproof then ignore (Thread.create check_for_geoproof_input ()); while true do @@ -3480,5 +3685,3 @@ let start () = flush stderr; crash_save 127 done - - diff --git a/ide/highlight.mll b/ide/highlight.mll index 2f099208..8cd55c97 100644 --- a/ide/highlight.mll +++ b/ide/highlight.mll @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: highlight.mll 9976 2007-07-12 11:58:30Z msozeau $ *) +(* $Id: highlight.mll 11004 2008-05-28 09:09:12Z herbelin $ *) { @@ -18,18 +18,15 @@ let comment_start = ref 0 - let is_keyword = + (* Without this table, the automaton would be too big and + ocamllex would fail *) + let is_one_word_command = let h = Hashtbl.create 97 in List.iter (fun s -> Hashtbl.add h s ()) - [ "Add" ; "Check"; "Defined" ; - "End" ; "Eval"; "Export" ; "Extraction" ; "Hint" ; "Hints" ; - "Implicits" ; "Import" ; - "Infix" ; "Load" ; "Module" ; - "Notation"; "Proof" ; "Print"; "Qed" ; - "Require" ; "Reset"; "Undo"; "Save" ; - "Section" ; "Unset" ; - "Set" ; "Notation"; - "Implicit"; "Arguments"; "Unfold"; "Resolve" + [ "Add" ; "Check"; "Eval"; "Extraction" ; + "Load" ; "Undo"; "Goal"; + "Proof" ; "Print"; "Qed" ; "Defined" ; "Save" ; + "End" ; "Section"; "Chapter"; "Transparent"; "Opaque"; "Comments" ]; Hashtbl.mem h @@ -38,20 +35,31 @@ List.iter (fun s -> Hashtbl.add h s ()) [ "forall"; "fun"; "match"; "fix"; "cofix"; "with"; "for"; "end"; "as"; "let"; "in"; "dest"; "if"; "then"; "else"; "return"; - "Prop"; "Set"; "Type"]; + "Prop"; "Set"; "Type" ]; Hashtbl.mem h - let is_declaration = + (* Without this table, the automaton would be too big and + ocamllex would fail *) + let is_one_word_declaration = let h = Hashtbl.create 97 in List.iter (fun s -> Hashtbl.add h s ()) - [ "Theorem" ; "Lemma" ; "Fact" ; "Remark" ; "Corollary" ; "Proposition" ; "Property" ; - "Definition" ; "Let" ; "Example" ; "SubClass" ; "Inductive" ; "CoInductive" ; - "Record" ; "Structure" ; "Fixpoint" ; "CoFixpoint"; + [ (* Theorems *) + "Theorem" ; "Lemma" ; "Fact" ; "Remark" ; "Corollary" ; + "Proposition" ; "Property" ; + (* Definitions *) + "Definition" ; "Let" ; "Example" ; "SubClass" ; + "Fixpoint" ; "CoFixpoint" ; "Scheme" ; + (* Assumptions *) "Hypothesis" ; "Variable" ; "Axiom" ; "Parameter" ; "Conjecture" ; - "Hypotheses" ; "Variables" ; "Axioms" ; "Parameters" + "Hypotheses" ; "Variables" ; "Axioms" ; "Parameters"; + (* Inductive *) + "Inductive" ; "CoInductive" ; "Record" ; "Structure" ; + (* Other *) + "Ltac" ; "Typeclasses"; "Instance"; "Include"; "Context"; "Class" ]; Hashtbl.mem h + let starting = ref true } let space = @@ -62,44 +70,67 @@ let identchar = ['$' 'A'-'Z' 'a'-'z' '_' '\192'-'\214' '\216'-'\246' '\248'-'\255' '\'' '0'-'9'] let ident = firstchar identchar* -let thm_token = "Theorem" | "Lemma" | "Fact" | "Remark" | "Corollary" | "Proposition" | "Property" - -let def_token = "Definition" | "Let" | "Example" | "SubClass" - -let assumption = "Hypothesis" | "Variable" | "Axiom" | "Parameter" | "Conjecture" | - "Hypotheses" | "Variables" | "Axioms" | "Parameters" - -let declaration = - "Theorem" | "Lemma" | "Fact" | "Remark" | "Corollary" | "Proposition" | "Property" | - "Definition" | "Let" | "Example" | "SubClass" | - "Inductive" | "CoInductive" | - "Record" | "Structure" | - "Fixpoint" | "CoFixpoint" - +let multiword_declaration = + "Module" (space+ "Type")? +| "Program" space+ ident +| "Existing" space+ "Instance" +| "Canonical" space+ "Structure" + +let locality = ("Local" space+)? + +let multiword_command = + "Set" (space+ ident)* +| "Unset" (space+ ident)* +| "Open" space+ locality "Scope" +| "Close" space+ locality "Scope" +| "Bind" space+ "Scope" +| "Arguments" space+ "Scope" +| "Reserved" space+ "Notation" space+ locality +| "Delimit" space+ "Scope" +| "Next" space+ "Obligation" +| "Solve" space+ "Obligations" +| "Require" space+ ("Import"|"Export")? +| "Infix" space+ locality +| "Notation" space+ locality +| "Hint" space+ locality ident +| "Reset" (space+ "Initial")? +| "Tactic" space+ "Notation" +| "Implicit" space+ "Arguments" +| "Implicit" space+ ("Type"|"Types") +| "Combined" space+ "Scheme" + +(* At least still missing: "Inline" + decl, variants of "Identity + Coercion", variants of Print, Add, ... *) + +rule next_starting_order = parse + | "(*" { comment_start := lexeme_start lexbuf; comment lexbuf } + | space+ { next_starting_order lexbuf } + | multiword_declaration + { starting:=false; lexeme_start lexbuf, lexeme_end lexbuf, "decl" } + | multiword_command + { starting:=false; lexeme_start lexbuf, lexeme_end lexbuf, "kwd" } + | ident as id + { starting:=false; + if is_one_word_command id then + lexeme_start lexbuf, lexeme_end lexbuf, "kwd" + else if is_one_word_declaration id then + lexeme_start lexbuf, lexeme_end lexbuf, "decl" + else + next_interior_order lexbuf + } + | _ { starting := false; next_interior_order lexbuf} + | eof { raise End_of_file } -rule next_order = parse +and next_interior_order = parse | "(*" { comment_start := lexeme_start lexbuf; comment lexbuf } - | "Module Type" - { lexeme_start lexbuf, lexeme_end lexbuf, "kwd" } - | "Program" space+ ident as id { lexeme_start lexbuf, lexeme_end lexbuf, "decl" } | ident as id - { if is_keyword id then - lexeme_start lexbuf, lexeme_end lexbuf, "kwd" - else - begin - if is_constr_kw id then - lexeme_start lexbuf, lexeme_end lexbuf, "kwd" - else - begin - if is_declaration id then - lexeme_start lexbuf, lexeme_end lexbuf, "decl" - else - next_order lexbuf - end - end - } - | _ { next_order lexbuf} + { if is_constr_kw id then + lexeme_start lexbuf, lexeme_end lexbuf, "kwd" + else + next_interior_order lexbuf } + | "." (" "|"\n"|"\t") { starting := true; next_starting_order lexbuf } + | _ { next_interior_order lexbuf} | eof { raise End_of_file } and comment = parse @@ -114,6 +145,7 @@ and comment = parse let highlighting = ref false let highlight_slice (input_buffer:GText.buffer) (start:GText.iter) stop = + starting := true; (* approximation: assume the beginning of a sentence *) if !highlighting then prerr_endline "Rejected highlight" else begin highlighting := true; @@ -130,7 +162,10 @@ and comment = parse let lb = Lexing.from_string s in try while true do - let b,e,o=next_order lb in + let b,e,o = + if !starting then next_starting_order lb + else next_interior_order lb in + let b,e = convert_pos b,convert_pos e in let start = input_buffer#get_iter_at_char (offset + b) in let stop = input_buffer#get_iter_at_char (offset + e) in @@ -142,7 +177,7 @@ and comment = parse highlighting := false end - let highlight_current_line input_buffer = + let highlight_current_line input_buffer = try let i = get_insert input_buffer in highlight_slice input_buffer (i#set_line_offset 0) i diff --git a/ide/ideutils.ml b/ide/ideutils.ml index df4594a7..d851dc2f 100644 --- a/ide/ideutils.ml +++ b/ide/ideutils.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: ideutils.ml 9263 2006-10-23 12:08:08Z barras $ *) +(* $Id: ideutils.ml 11093 2008-06-10 18:41:33Z barras $ *) open Preferences @@ -25,7 +25,7 @@ let set_location = ref (function s -> failwith "not ready") let pulse = ref (function () -> failwith "not ready") -let debug = Options.debug +let debug = Flags.debug let prerr_endline s = if !debug then (prerr_endline s;flush stderr) @@ -35,7 +35,7 @@ let prerr_string s = let lib_ide_file f = let coqlib = System.getenv_else "COQLIB" - (if Coq_config.local || !Options.boot then Coq_config.coqtop + (if Coq_config.local || !Flags.boot then Coq_config.coqtop else Coq_config.coqlib) in Filename.concat (Filename.concat coqlib "ide") f @@ -148,44 +148,83 @@ let set_highlight_timer f = (* Get back the standard coq out channels *) -let read_stdout,clear_stdout = +let init_stdout,read_stdout,clear_stdout = let out_buff = Buffer.create 100 in - Pp_control.std_ft := Format.formatter_of_buffer out_buff; - (fun () -> Format.pp_print_flush !Pp_control.std_ft (); + let out_ft = Format.formatter_of_buffer out_buff in + let deep_out_ft = Format.formatter_of_buffer out_buff in + let _ = Pp_control.set_gp deep_out_ft Pp_control.deep_gp in + (fun () -> + Pp_control.std_ft := out_ft; + Pp_control.err_ft := out_ft; + Pp_control.deep_ft := deep_out_ft; +), + (fun () -> Format.pp_print_flush out_ft (); let r = Buffer.contents out_buff in + prerr_endline "Output from Coq is: "; prerr_endline r; Buffer.clear out_buff; r), (fun () -> - Format.pp_print_flush !Pp_control.std_ft (); Buffer.clear out_buff) + Format.pp_print_flush out_ft (); Buffer.clear out_buff) let last_dir = ref "" -let select_file ~title ?(dir = last_dir) ?(filename="") () = - let fs = - if Filename.is_relative filename then begin - if !dir <> "" then - let filename = Filename.concat !dir filename in - GWindow.file_selection ~show_fileops:true ~modal:true ~title ~filename () - else - GWindow.file_selection ~show_fileops:true ~modal:true ~title () - end else begin - dir := Filename.dirname filename; - GWindow.file_selection ~show_fileops:true ~modal:true ~title ~filename () - end - in - fs#complete ~filter:""; - ignore (fs#connect#destroy ~callback: GMain.Main.quit); - let file = ref None in - ignore (fs#ok_button#connect#clicked ~callback: - begin fun () -> - file := Some fs#filename; - dir := Filename.dirname fs#filename; - fs#destroy () - end); - ignore (fs # cancel_button # connect#clicked ~callback:fs#destroy); - fs # show (); - GMain.Main.main (); - !file +let filter_all_files () = GFile.filter + ~name:"All" + ~patterns:["*"] () + +let filter_coq_files () = GFile.filter + ~name:"Coq source code" + ~patterns:[ "*.v"] () + +let select_file_for_open ~title ?(dir = last_dir) ?(filename="") () = + let file = ref None in + let file_chooser = GWindow.file_chooser_dialog ~action:`OPEN ~modal:true ~title () in + file_chooser#add_button_stock `CANCEL `CANCEL ; + file_chooser#add_select_button_stock `OPEN `OPEN ; + file_chooser#add_filter (filter_coq_files ()); + file_chooser#add_filter (filter_all_files ()); + file_chooser#set_default_response `OPEN; + ignore (file_chooser#set_current_folder !dir); + begin match file_chooser#run () with + | `OPEN -> + begin + file := file_chooser#filename; + match !file with + None -> () + | Some s -> dir := Filename.dirname s; + end + | `DELETE_EVENT | `CANCEL -> () + end ; + file_chooser#destroy (); + !file + + +let select_file_for_save ~title ?(dir = last_dir) ?(filename="") () = + let file = ref None in + let file_chooser = GWindow.file_chooser_dialog ~action:`SAVE ~modal:true ~title () in + file_chooser#add_button_stock `CANCEL `CANCEL ; + file_chooser#add_select_button_stock `SAVE `SAVE ; + file_chooser#add_filter (filter_coq_files ()); + file_chooser#add_filter (filter_all_files ()); + (* this line will be used when a lablgtk >= 2.10.0 is the default on most distributions + file_chooser#set_do_overwrite_confirmation true; + *) + file_chooser#set_default_response `SAVE; + ignore (file_chooser#set_current_folder !dir); + ignore (file_chooser#set_current_name filename); + + begin match file_chooser#run () with + | `SAVE -> + begin + file := file_chooser#filename; + match !file with + None -> () + | Some s -> dir := Filename.dirname s; + end + | `DELETE_EVENT | `CANCEL -> () + end ; + file_chooser#destroy (); + !file let find_tag_start (tag :GText.tag) (it:GText.iter) = let it = it#copy in @@ -252,10 +291,8 @@ let run_command f c = let buffe = String.make 127 ' ' in let n = ref 0 in let ne = ref 0 in - - while n:= input cin buff 0 127 ; ne := input cerr buffe 0 127 ; - !n+ !ne <> 0 - do + while n:= input cin buff 0 127 ; ne := input cerr buffe 0 127 ; !n+ !ne <> 0 + do let r = try_convert (String.sub buff 0 !n) in f r; Buffer.add_string result r; @@ -266,9 +303,11 @@ let run_command f c = (Unix.close_process_full (cin,cout,cerr), Buffer.contents result) let browse f url = - let l,r = !current.cmd_browse in - let (_s,_res) = run_command f (l ^ url ^ r) in - () + let com = Flags.subst_command_placeholder !current.cmd_browse url in + let s = Sys.command com in + if s = 127 then + f ("Could not execute\n\""^com^ + "\"\ncheck your preferences for setting a valid browser command\n") let url_for_keyword = let ht = Hashtbl.create 97 in @@ -293,7 +332,7 @@ let url_for_keyword = let browse_keyword f text = try let u = url_for_keyword text in browse f (!current.doc_url ^ u) - with _ -> () + with Not_found -> f ("No documentation found for "^text) let underscore = Glib.Utf8.to_unichar "_" (ref 0) diff --git a/ide/ideutils.mli b/ide/ideutils.mli index 3af80f47..48ff0fca 100644 --- a/ide/ideutils.mli +++ b/ide/ideutils.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: ideutils.mli 7608 2005-11-25 17:09:25Z barras $ i*) +(*i $Id: ideutils.mli 11006 2008-05-28 10:42:45Z jnarboux $ i*) val async : ('a -> unit) -> 'a -> unit val sync : ('a -> 'b) -> 'a -> 'b @@ -17,6 +17,7 @@ val mutex : string -> ('a -> unit) -> 'a -> unit val browse : (string -> unit) -> string -> unit val browse_keyword : (string -> unit) -> string -> unit val byte_offset_to_char_offset : string -> int -> int +val init_stdout : unit -> unit val clear_stdout : unit -> unit val debug : bool ref val disconnect_revert_timer : unit -> unit @@ -39,7 +40,10 @@ val print_id : 'a -> unit val read_stdout : unit -> string val revert_timer : GMain.Timeout.id option ref val auto_save_timer : GMain.Timeout.id option ref -val select_file : +val select_file_for_open : + title:string -> + ?dir:string ref -> ?filename:string -> unit -> string option +val select_file_for_save : title:string -> ?dir:string ref -> ?filename:string -> unit -> string option val set_highlight_timer : (unit -> 'a) -> unit diff --git a/ide/index_urls.txt b/ide/index_urls.txt deleted file mode 100644 index fea61809..00000000 --- a/ide/index_urls.txt +++ /dev/null @@ -1,563 +0,0 @@ -+,node.0.2.0.html#@default146 --,node.0.2.1.html#@default247 -2,node.1.2.9.html#@default514 -;,node.1.2.12.html#@default547 -?,node.1.0.6.html#@default358 -?,node.1.2.1.html#@default410 -&,node.0.2.0.html#@default164 -{A}+{B},node.0.2.0.html#@default174 -{x:A & (P x)},node.0.2.0.html#@default163 -{x:A | (P x)},node.0.2.0.html#@default157 -|,node.0.2.0.html#@default158 -A*B,node.0.2.0.html#@default150 -A+{B},node.0.2.0.html#@default178 -A+B,node.0.2.0.html#@default145 -Abort,node.1.1.0.html#@default385 -Absolute names,node.0.1.6.html#@default85 -Abstract,node.1.2.12.html#@default559 -Absurd,node.1.2.3.html#@default442 -Acc,node.0.2.0.html#@default215 -Acc_inv,node.0.2.0.html#@default216 -Acc_rec,node.0.2.0.html#@default217 -Add Abstract Ring,node.3.7.4.html#@default643 -Add Abstract Semi Ring,node.3.7.4.html#@default644 -Add Field,node.1.2.10.html#@default526 -Add LoadPath,node.1.0.4.html#@default338 -Add ML Path,node.1.0.4.html#@default342 -Add Morphism,node.3.8.2.html#@default647 -Add Printing If,node.0.1.1.html#@default67 -Add Printing Let,node.0.1.1.html#@default63 -Add Rec LoadPath,node.1.0.4.html#@default339 -Add Rec ML Path,node.1.0.4.html#@default343 -Add Ring,node.1.2.10.html#@default523 -Add Semi Ring,node.1.2.10.html#@default524 -Add Setoid,node.3.8.1.html#@default646 -All,node.0.2.0.html#@default110 -AllT,node.0.2.0.html#@default224 -Apply,node.1.2.2.html#@default427 -Apply ... with,node.1.2.2.html#@default428 -Arithmetical notations,node.0.2.1.html#@default244 -Arity,node.0.3.4.html#@default288 -Assert,node.1.2.2.html#@default433 -Associativity,node.2.0.1.html#@default571 -Assumption,node.1.2.2.html#@default412 -Auto,node.1.2.10.html#@default515 -AutoRewrite,node.1.2.10.html#@default528 -Axiom,node.0.0.2.html#@default24 -abstractions,node.0.0.1.html#@default16 -absurd,node.0.2.0.html#@default121 -absurd_set,node.0.2.0.html#@default188 -all,node.0.2.0.html#@default109 -allT,node.0.2.0.html#@default223 -and,node.0.2.0.html#@default99 -and_rec,node.0.2.0.html#@default189 -applications,node.0.0.1.html#@default18 -Back,node.1.0.5.html#@default348 -Bad Magic Number,node.1.0.3.html#@default331 -Begin Silent,node.1.0.7.html#@default366 -Binding list,node.1.2.2.html#@default441 -beta-reduction,node.0.3.2.html#@default274 -bool,node.0.2.0.html#@default135 -bool_choice,node.0.2.0.html#@default181 -byte-code,node.3.0.0.html#@default574 -Calculus of (Co)Inductive Constructions,node.0.3.html#@default255 -Canonical Structure,node.0.1.7.html#@default91 -Case,node.1.2.6.html#@default468 -Case ... with,node.1.2.6.html#@default469 -Cases,node.3.2.html#@default593 -Cases...of...end,node.0.0.1.html#@default21 -Cbv,node.1.2.4.html#@default445 -Cd,node.1.0.4.html#@default337 -Change,node.1.2.2.html#@default438 -Change ... in,node.1.2.2.html#@default440 -Chapter,node.0.1.3.html#@default73 -Check,node.1.0.1.html#@default308 -Choice,node.0.2.0.html#@default179 -Choice2,node.0.2.0.html#@default180 -CIC,node.0.3.html#@default254 -Clear,node.1.2.2.html#@default414 -ClearBody,node.1.2.2.html#@default415 -Coercion,node.3.3.5.html#@default601 -Coercion Local,node.3.3.5.html#@default602 -Coercions,node.0.1.8.html#@default92 -and sections,node.3.3.9.html#@default616 -classes,node.3.3.1.html#@default596 -FUNCLASS,node.3.3.2.html#@default597 -identity,node.3.3.3.html#@default599 -inheritance graph,node.3.3.4.html#@default600 -presentation,node.3.3.html#@default595 -SORTCLASS,node.3.3.2.html#@default598 -CoFixpoint,node.0.0.2.html#@default40 -CoInductive,node.0.0.2.html#@default38 -Comments,node.0.0.0.html#@default2 -Compare,node.1.2.8.html#@default489 -Compiled files,node.1.0.3.html#@default327 -Compute,node.1.2.4.html#@default447 -Connectives,node.0.2.0.html#@default94 -Constant,node.0.0.2.html#@default31 -Constructor,node.1.2.5.html#@default455 -Constructor ... with,node.1.2.5.html#@default456 -Context,node.0.3.1.html#@default263 -Contradiction,node.1.2.3.html#@default443 -Contributions,node.0.2.2.html#@default253 -Conversion rules,node.0.3.2.html#@default273 -Conversion tactics,node.1.2.4.html#@default444 -coqdep,node.3.1.1.html#@default582 -coq_Makefile,node.3.1.2.html#@default584 -coqmktop,node.3.1.0.html#@default579 -coq-tex,node.3.1.3.html#@default586 -coqweb,node.3.1.3.html#@default587 -Correctness,node.3.5.html#@default619 -Cut,node.1.2.2.html#@default434 -CutRewrite,node.1.2.7.html#@default482 -congr_eqT,node.0.2.0.html#@default241 -conj,node.0.2.0.html#@default100 -coqc,node.3.0.html#@default573 -coqtop,node.3.0.html#@default572 -Datatypes,node.0.2.0.html#@default132 -Debugger,node.3.1.0.html#@default580 -Decide Equality,node.1.2.8.html#@default488 -Declarations,node.0.0.2.html#@default23 -Declare ML Module,node.1.0.3.html#@default333 -Decompose,node.1.2.6.html#@default473 -Decompose Record,node.1.2.6.html#@default475 -Decompose Sum,node.1.2.6.html#@default474 -Defined,node.0.0.2.html#@default48 -Definition,node.0.0.2.html#@default33 -Definitions,node.0.0.2.html#@default29 -Dependencies,node.3.1.1.html#@default581 -Dependent Inversion,node.1.2.9.html#@default501 -Dependent Inversion ... with,node.1.2.9.html#@default503 -Dependent Inversion_clear,node.1.2.9.html#@default502 -Dependent Inversion_clear ... with,node.1.2.9.html#@default504 -Dependent Rewrite ->,node.1.2.8.html#@default495 -Dependent Rewrite <-,node.1.2.8.html#@default496 -Derive Dependent Inversion,node.1.2.9.html#@default511 -Derive Dependent Inversion_clear,node.1.2.9.html#@default512 -Derive Inversion,node.1.2.9.html#@default508 -Derive Inversion_clear,node.1.2.9.html#@default509 -Derive Inversion_clear ... with,node.1.2.9.html#@default510 -Destruct,node.1.2.6.html#@default466 -Discriminate,node.1.2.8.html#@default490 -DiscrR,node.0.2.1.html#@default250 -Do,node.1.2.12.html#@default542 -Double Induction,node.1.2.6.html#@default472 -Drop,node.1.0.7.html#@default365 -delta-reduction,node.0.0.2.html#@default30 -EApply,node.1.2.2.html#@default429 -EAuto,node.1.2.10.html#@default517 -Elim ... using,node.1.2.6.html#@default463 -Elim ... with,node.1.2.6.html#@default462 -Singleton elimination,node.0.3.4.html#@default294 -Elimination sorts,node.0.3.4.html#@default291 -ElimType,node.1.2.6.html#@default464 -Emacs,node.3.1.5.html#@default589 -EmptyT,node.0.2.0.html#@default233 -End,node.0.1.3.html#@default74 -End Silent,node.1.0.7.html#@default368 -Environment,node.0.0.2.html#@default32 -Environment variables,node.3.0.3.html#@default577 -Equality,node.0.2.0.html#@default118 -Eval,node.1.0.1.html#@default309 -EX,node.0.2.0.html#@default113 -EXT,node.0.2.0.html#@default229 -Ex,node.0.2.0.html#@default112 -Ex2,node.0.2.0.html#@default116 -Exact,node.1.2.1.html#@default408 -Exc,node.0.2.0.html#@default182 -Except,node.0.2.0.html#@default187 -Exists,node.1.2.5.html#@default458 -Explicitation of implicit arguments,node.0.1.7.html#@default88 -ExT,node.0.2.0.html#@default228 -ExT2,node.0.2.0.html#@default231 -Extensive grammars,node.1.0.6.html#@default362 -Extract Constant,node.3.6.1.html#@default637 -Extract Inductive,node.3.6.1.html#@default638 -Extraction,node.3.6.html#@default623 -Extraction,node.1.0.1.html#@default310 -Extraction Inline,node.3.6.1.html#@default633 -Extraction Language,node.3.6.1.html#@default628 -Extraction Module,node.3.6.0.html#@default626 -Extraction NoInline,node.3.6.1.html#@default634 -eq,node.0.2.0.html#@default119 -eq_add_S,node.0.2.0.html#@default193 -eq_ind_r,node.0.2.0.html#@default126 -eq_rec,node.0.2.0.html#@default186 -eq_rec_r,node.0.2.0.html#@default127 -eq_rect,node.0.2.0.html#@default128 -eq_rect_r,node.0.2.0.html#@default129 -eq_S,node.0.2.0.html#@default190 -eqT,node.0.2.0.html#@default236 -eqT_ind_r,node.0.2.0.html#@default242 -eqT_rec_r,node.0.2.0.html#@default243 -error,node.0.2.0.html#@default184 -ex,node.0.2.0.html#@default111 -ex2,node.0.2.0.html#@default115 -ex_intro,node.0.2.0.html#@default114 -ex_intro2,node.0.2.0.html#@default117 -exist,node.0.2.0.html#@default160 -exist2,node.0.2.0.html#@default162 -existS,node.0.2.0.html#@default166 -existS2,node.0.2.0.html#@default170 -exT,node.0.2.0.html#@default227 -exT2,node.0.2.0.html#@default232 -exT_intro,node.0.2.0.html#@default230 -Fact,node.0.0.2.html#@default44 -Fail,node.1.2.12.html#@default540 -False,node.0.2.0.html#@default97 -False_rec,node.0.2.0.html#@default185 -Field,node.1.2.10.html#@default525 -First,node.1.2.12.html#@default553 -Fix,node.0.3.4.html#@default298 -Fix_F,node.0.2.0.html#@default219 -Fix_F_eq,node.0.2.0.html#@default222 -Fix_F_inv,node.0.2.0.html#@default221 -Fixpoint,node.0.0.2.html#@default39 -Focus,node.1.1.1.html#@default392 -Fold,node.1.2.4.html#@default453 -Fourier,node.1.2.10.html#@default527 -Fst,node.0.2.0.html#@default155 -f_equal,node.0.2.0.html#@default124 -f_equali,node.0.2.0.html#@default130 -false,node.0.2.0.html#@default137 -fix_eq,node.0.2.0.html#@default220 -fst,node.0.2.0.html#@default153 -Gallina,node.0.0.html#@default0 -gallina,node.3.1.6.html#@default591 -Generalize,node.1.2.2.html#@default436 -Generalize Dependent,node.1.2.2.html#@default437 -Global Variable,node.3.5.2.html#@default620 -Goal,node.0.0.2.html#@default50 -Grammar,node.1.0.6.html#@default361 -ge,node.0.2.0.html#@default208 -gen,node.0.2.0.html#@default226 -goal,node.1.2.html#@default405 -gt,node.0.2.0.html#@default209 -Head normal form,node.0.3.2.html#@default286 -Hint,node.1.2.11.html#@default531 -Hint Rewrite,node.1.2.10.html#@default529 -Hints databases,node.1.2.11.html#@default530 -Hints Immediate,node.1.2.11.html#@default533 -Hints Resolve,node.1.2.11.html#@default532 -Hints Unfold,node.1.2.11.html#@default534 -Hnf,node.1.2.4.html#@default449 -HTML,node.3.1.4.html#@default588 -Hypothesis,node.0.0.2.html#@default28 -I,node.0.2.0.html#@default96 -Identity Coercion,node.3.3.5.html#@default605 -Idtac,node.1.2.12.html#@default538 -IF,node.0.2.0.html#@default107 -proof of,node.3.5.html#@default618 -Implicit Arguments Off,node.1.0.6.html#@default355 -Implicit Arguments On,node.1.0.6.html#@default354 -Implicits,node.1.0.6.html#@default356 -Induction,node.1.2.6.html#@default465 -Inductive,node.0.0.2.html#@default36 -Inductive definitions,node.0.0.2.html#@default35 -Infix,node.1.0.6.html#@default363 -Info,node.1.2.12.html#@default557 -Injection,node.1.2.8.html#@default492 -Inspect,node.1.0.0.html#@default305 -Intro,node.1.2.2.html#@default418 -Intro ... after,node.1.2.2.html#@default426 -Intro after,node.1.2.2.html#@default425 -Intros,node.1.2.2.html#@default422 -Intros pattern,node.1.2.6.html#@default471 -Intros until,node.1.2.2.html#@default423 -Intuition,node.1.2.10.html#@default520 -Inversion,node.1.2.9.html#@default497 -Inversion ... in,node.1.2.9.html#@default499 -Inversion ... using,node.1.2.9.html#@default505 -Inversion ... using ... in,node.1.2.9.html#@default506 -Inversion_clear,node.1.2.9.html#@default498 -Inversion_clear ... in,node.1.2.9.html#@default500 -IsSucc,node.0.2.0.html#@default195 -if ... then ... else,node.0.1.1.html#@default55 -iff,node.0.2.0.html#@default106 -implicit arguments,node.0.1.7.html#@default86 -inl,node.0.2.0.html#@default147 -inleft,node.0.2.0.html#@default176 -inr,node.0.2.0.html#@default148 -inright,node.0.2.0.html#@default177 -iota-reduction,node.0.3.2.html#@default275 -LApply,node.1.2.2.html#@default430 -Lazy,node.1.2.4.html#@default446 -Left,node.1.2.5.html#@default459 -Lemma,node.0.0.2.html#@default42 -LetTac,node.1.2.2.html#@default431 -Lexical conventions,node.0.0.0.html#@default1 -Libraries,node.0.1.5.html#@default82 -Load,node.1.0.2.html#@default325 -Load Verbose,node.1.0.2.html#@default326 -Loadpath,node.1.0.4.html#@default335 -Local,node.0.0.2.html#@default34 -Local definitions,node.0.0.1.html#@default19 -Locate,node.1.0.1.html#@default323 -Locate Library,node.1.0.4.html#@default346 -Logical paths,node.0.1.5.html#@default83 -le,node.0.2.0.html#@default204 -le_n,node.0.2.0.html#@default205 -le_S,node.0.2.0.html#@default206 -left,node.0.2.0.html#@default172 -let ... in,node.0.1.1.html#@default56 -let-in,node.0.0.1.html#@default20 -local context,node.1.1.html#@default372 -lt,node.0.2.0.html#@default207 -Makefile,node.3.1.2.html#@default583 -Man pages,node.3.1.7.html#@default592 -ML-like patterns,node.0.1.1.html#@default54 -Module,node.0.1.4.html#@default75 -Module Type,node.0.1.4.html#@default78 -Move,node.1.2.2.html#@default416 -Mutual Inductive,node.0.0.2.html#@default37 -mult,node.0.2.0.html#@default201 -mult_n_O,node.0.2.0.html#@default202 -mult_n_Sm,node.0.2.0.html#@default203 -NewDestruct,node.1.2.6.html#@default467 -NewInduction,node.1.2.6.html#@default461 -None,node.0.2.0.html#@default143 -Normal form,node.0.3.2.html#@default285 -Notation,node.2.0.0.html#@default569 -Notations for real numbers,node.0.2.1.html#@default249 -n_Sn,node.0.2.0.html#@default197 -nat,node.0.2.0.html#@default138 -nat_case,node.0.2.0.html#@default210 -nat_double_ind,node.0.2.0.html#@default211 -native code,node.3.0.0.html#@default575 -not,node.0.2.0.html#@default98 -not_eq_S,node.0.2.0.html#@default194 -notT,node.0.2.0.html#@default235 -O,node.0.2.0.html#@default139 -O_S,node.0.2.0.html#@default196 -Omega,node.1.2.10.html#@default521 -Opaque,node.1.0.1.html#@default311 -Options of the command line,node.3.0.4.html#@default578 -Orelse,node.1.2.12.html#@default544 -option,node.0.2.0.html#@default141 -or,node.0.2.0.html#@default103 -or_introl,node.0.2.0.html#@default104 -or_intror,node.0.2.0.html#@default105 -Parameter,node.0.0.2.html#@default25 -Pattern,node.1.2.4.html#@default454 -Peano's arithmetic notations,node.0.2.1.html#@default248 -Pose,node.1.2.2.html#@default432 -Positivity,node.0.3.4.html#@default287 -Precedences,node.2.0.1.html#@default570 -Pretty printing,node.1.0.6.html#@default360 -Print,node.1.0.0.html#@default302 -Print All,node.1.0.0.html#@default304 -Print Classes,node.3.3.6.html#@default606 -Print Coercion Paths,node.3.3.6.html#@default609 -Print Coercions,node.3.3.6.html#@default607 -Print Extraction Inline,node.3.6.1.html#@default635 -Print Graph,node.3.3.6.html#@default608 -Print Hint,node.1.2.11.html#@default535 -Print HintDb,node.1.2.11.html#@default536 -Print LoadPath,node.1.0.4.html#@default341 -Print ML Modules,node.1.0.3.html#@default334 -Print ML Path,node.1.0.4.html#@default344 -Print Module,node.0.1.4.html#@default80 -Print Module Type,node.0.1.4.html#@default81 -Print Modules,node.1.0.3.html#@default332 -Print Proof,node.1.0.0.html#@default303 -Print Section,node.1.0.0.html#@default306 -Print Table Printing If,node.0.1.1.html#@default70 -Print Table Printing Let,node.0.1.1.html#@default66 -Programming,node.0.2.0.html#@default131 -Prolog,node.1.2.10.html#@default518 -Prompt,node.1.1.html#@default371 -Proof,node.0.0.2.html#@default45 -Proof editing,node.1.1.html#@default370 -Proof General,node.3.1.5.html#@default590 -Proof term,node.1.1.html#@default373 -Prop,node.0.0.1.html#@default11 -Pwd,node.1.0.4.html#@default336 -pair,node.0.2.0.html#@default152 -plus,node.0.2.0.html#@default198 -plus_n_O,node.0.2.0.html#@default199 -plus_n_Sm,node.0.2.0.html#@default200 -pred,node.0.2.0.html#@default191 -pred_Sn,node.0.2.0.html#@default192 -prod,node.0.2.0.html#@default149 -products,node.0.0.1.html#@default17 -proj1,node.0.2.0.html#@default101 -proj2,node.0.2.0.html#@default102 -projS1,node.0.2.0.html#@default167 -projS2,node.0.2.0.html#@default168 -Qed,node.0.0.2.html#@default47 -Qualified identifiers,node.0.1.6.html#@default84 -Quantifiers,node.0.2.0.html#@default108 -Quit,node.1.0.7.html#@default364 -Quote,node.1.2.9.html#@default513 -?,node.0.1.7.html#@default90 -Read Module,node.1.0.3.html#@default328 -Record,node.0.1.0.html#@default52 -Recursion,node.0.2.0.html#@default213 -Recursive arguments,node.0.3.4.html#@default300 -Recursive Extraction,node.3.6.0.html#@default625 -Recursive Extraction Module,node.3.6.0.html#@default627 -Red,node.1.2.4.html#@default448 -Refine,node.1.2.1.html#@default409 -Reflexivity,node.1.2.7.html#@default484 -Remark,node.0.0.2.html#@default43 -Remove LoadPath,node.1.0.4.html#@default340 -Remove Printing If,node.0.1.1.html#@default68 -Remove Printing Let,node.0.1.1.html#@default64 -Rename,node.1.2.2.html#@default417 -Replace ... with,node.1.2.7.html#@default483 -Require,node.1.0.3.html#@default329 -Require Export,node.1.0.3.html#@default330 -Reset,node.1.0.5.html#@default347 -Reset Extraction Inline,node.3.6.1.html#@default636 -Reset Initial,node.1.0.5.html#@default350 -Resource file,node.3.0.2.html#@default576 -Restart,node.1.1.1.html#@default391 -Restore State,node.1.0.5.html#@default349 -Resume,node.1.1.0.html#@default387 -Rewrite,node.1.2.7.html#@default476 -Rewrite ->,node.1.2.7.html#@default477 -Rewrite -> ... in,node.1.2.7.html#@default480 -Rewrite <-,node.1.2.7.html#@default478 -Rewrite <- ... in,node.1.2.7.html#@default481 -Rewrite ... in,node.1.2.7.html#@default479 -Right,node.1.2.5.html#@default460 -Ring,node.1.2.10.html#@default522 -refl_eqT,node.0.2.0.html#@default237 -refl_equal,node.0.2.0.html#@default120 -right,node.0.2.0.html#@default173 -S,node.0.2.0.html#@default140 -Save,node.0.0.2.html#@default49 -Scheme,node.1.2.13.html#@default561 -Script file,node.1.0.2.html#@default324 -Search,node.1.0.1.html#@default313 -Search ... inside ...,node.1.0.1.html#@default317 -Search ... outside ...,node.1.0.1.html#@default320 -SearchAbout,node.1.0.1.html#@default314 -SearchPattern,node.1.0.1.html#@default315 -SearchPattern ... outside ...,node.1.0.1.html#@default321 -SearchRewrite,node.1.0.1.html#@default316 -SearchRewrite ... inside ...,node.1.0.1.html#@default319 -SearchRewrite ... outside ...,node.1.0.1.html#@default322 -Section,node.0.1.3.html#@default72 -Sections,node.0.1.3.html#@default71 -Set,node.0.0.1.html#@default10 -Set Extraction AutoInline,node.3.6.1.html#@default631 -Set Extraction Optimize,#@default629 -Set Hyps_limit,node.1.1.2.html#@default402 -Set Implicit Arguments,node.0.1.7.html#@default87 -Set Printing Coercion,node.3.3.7.html#@default612 -Set Printing Coercions,node.3.3.7.html#@default610 -Set Printing Synth,node.0.1.1.html#@default60 -Set Printing Wildcard,node.0.1.1.html#@default57 -Set Undo,node.1.1.1.html#@default389 -Setoid_replace,node.3.8.html#@default645 -Setoid_rewrite,node.3.8.3.html#@default649 -Show,node.1.1.2.html#@default394 -Show Conjectures,node.1.1.2.html#@default399 -Show Implicits,node.1.1.2.html#@default395 -Show Intro,node.1.1.2.html#@default400 -Show Intros,node.1.1.2.html#@default401 -Show Programs,node.3.5.2.html#@default621 -Show Proof,node.1.1.2.html#@default398 -Show Script,node.1.1.2.html#@default396 -Show Tree,node.1.1.2.html#@default397 -Silent mode,node.1.0.7.html#@default367 -Simpl,node.1.2.4.html#@default450 -Simple Inversion,node.1.2.9.html#@default507 -Simplify_eq,node.1.2.8.html#@default494 -Small inductive type,node.0.3.4.html#@default292 -Snd,node.0.2.0.html#@default156 -Solve,node.1.2.12.html#@default555 -Some,node.0.2.0.html#@default142 -Sorts,node.0.0.1.html#@default8 -Split,node.1.2.5.html#@default457 -SplitAbsolu,node.0.2.1.html#@default251 -SplitRmult,node.0.2.1.html#@default252 -Strong elimination,node.0.3.4.html#@default293 -Structure,node.3.3.8.html#@default615 -Subst,node.1.2.7.html#@default487 -Substitution,node.0.3.0.html#@default262 -Suspend,node.1.1.0.html#@default386 -Symmetry,node.1.2.7.html#@default485 -Syntactic Definition,node.0.1.7.html#@default89 -Syntax,node.1.0.6.html#@default359 -sig,node.0.2.0.html#@default159 -sig2,node.0.2.0.html#@default161 -sigS,node.0.2.0.html#@default165 -sigS2,node.0.2.0.html#@default169 -snd,node.0.2.0.html#@default154 -sort,node.0.0.1.html#@default7 -specif,node.0.0.1.html#@default14 -subgoal,node.1.2.html#@default406 -sum,node.0.2.0.html#@default144 -sum_eqT,node.0.2.0.html#@default238 -sumbool,node.0.2.0.html#@default171 -sumor,node.0.2.0.html#@default175 -sym_eq,node.0.2.0.html#@default122 -sym_not_eq,node.0.2.0.html#@default125 -sym_not_eqT,node.0.2.0.html#@default239 -Tactic Definition,node.1.2.14.html#@default563 -Tacticals,node.1.2.12.html#@default537 -Do,node.1.2.12.html#@default543 -Fail,node.1.2.12.html#@default541 -First,node.1.2.12.html#@default554 -Solve,node.1.2.12.html#@default556 -Idtac,node.1.2.12.html#@default539 -Info,node.1.2.12.html#@default558 -Orelse,node.1.2.12.html#@default545 -Repeat,node.1.2.12.html#@default546 -Try,node.1.2.12.html#@default552 -Tactics,node.1.2.html#@default404 -Tauto,node.1.2.10.html#@default519 -Terms,node.0.0.1.html#@default5 -Test Printing If,node.0.1.1.html#@default69 -Test Printing Let,node.0.1.1.html#@default65 -Test Printing Synth,node.0.1.1.html#@default62 -Test Printing Wildcard,node.0.1.1.html#@default59 -Theorem,node.0.0.2.html#@default41 -Theories,node.0.2.html#@default93 -Time,node.1.0.7.html#@default369 -Transitivity,node.1.2.7.html#@default486 -Transparent,node.1.0.1.html#@default312 -Trivial,node.1.2.10.html#@default516 -True,node.0.2.0.html#@default95 -Try,node.1.2.12.html#@default551 -Type,node.0.0.1.html#@default9 -Type of constructor,node.0.3.4.html#@default289 -Typing rules,node.0.3.1.html#@default265 -Ax,node.0.3.1.html#@default266 -Cases,node.0.3.4.html#@default296 -Const,node.0.3.1.html#@default268 -Conv,node.0.3.2.html#@default282 -Fix,node.0.3.4.html#@default299 -Lam,node.0.3.1.html#@default270 -Let,node.0.3.1.html#@default272 -Prod,node.0.3.1.html#@default269 -Var,node.0.3.1.html#@default267 -tactic macros,node.1.2.14.html#@default562 -trans_eq,node.0.2.0.html#@default123 -trans_eqT,node.0.2.0.html#@default240 -true,node.0.2.0.html#@default136 -tt,node.0.2.0.html#@default134 -Undo,node.1.1.1.html#@default388 -Unfocus,node.1.1.1.html#@default393 -Unfold,node.1.2.4.html#@default451 -Unfold ... in,node.1.2.4.html#@default452 -UnitT,node.0.2.0.html#@default234 -Unset Extraction AutoInline,node.3.6.1.html#@default632 -Unset Extraction Optimize,#@default630 -Unset Hyps_limit,node.1.1.2.html#@default403 -Unset Implicit Arguments,node.1.0.6.html#@default353 -Unset Printing Coercion,node.3.3.7.html#@default613 -Unset Printing Coercions,node.3.3.7.html#@default611 -Unset Printing Synth,node.0.1.1.html#@default61 -Unset Printing Wildcard,node.0.1.1.html#@default58 -Unset Undo,node.1.1.1.html#@default390 -unit,node.0.2.0.html#@default133 -Variable,node.0.0.2.html#@default26 -Variables,node.0.0.2.html#@default27 -value,node.0.2.0.html#@default183 -Well founded induction,node.0.2.0.html#@default214 -Well foundedness,node.0.2.0.html#@default212 -Write State,node.1.0.5.html#@default351 -well_founded,node.0.2.0.html#@default218 diff --git a/ide/preferences.ml b/ide/preferences.ml index c01fa602..444b2c2b 100644 --- a/ide/preferences.ml +++ b/ide/preferences.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: preferences.ml 9350 2006-11-07 15:04:42Z notin $ *) +(* $Id: preferences.ml 11058 2008-06-06 08:21:03Z herbelin $ *) open Configwin open Printf @@ -73,10 +73,11 @@ type pref = mutable modifier_for_navigation : Gdk.Tags.modifier list; mutable modifier_for_templates : Gdk.Tags.modifier list; mutable modifier_for_tactics : Gdk.Tags.modifier list; + mutable modifier_for_display : Gdk.Tags.modifier list; mutable modifiers_valid : Gdk.Tags.modifier list; - mutable cmd_browse : string * string; - mutable cmd_editor : string * string; + mutable cmd_browse : string; + mutable cmd_editor : string; mutable text_font : Pango.font_description; @@ -95,6 +96,8 @@ type pref = mutable auto_complete : bool; mutable stop_before : bool; mutable lax_syntax : bool; + mutable vertical_tabs : bool; + mutable opposite_tabs : bool; } let (current:pref ref) = @@ -108,7 +111,7 @@ let (current:pref ref) = global_auto_revert = false; global_auto_revert_delay = 10000; - auto_save = false; + auto_save = true; auto_save_delay = 10000; auto_save_name = "#","#"; @@ -122,16 +125,15 @@ let (current:pref ref) = modifier_for_navigation = [`CONTROL; `MOD1]; modifier_for_templates = [`CONTROL; `SHIFT]; modifier_for_tactics = [`CONTROL; `MOD1]; + modifier_for_display = [`MOD1;`SHIFT]; modifiers_valid = [`SHIFT; `CONTROL; `MOD1]; - cmd_browse = Options.browser_cmd_fmt; - cmd_editor = - if Sys.os_type = "Win32" - then "NOTEPAD ", "" - else "emacs ", ""; + cmd_browse = Flags.browser_cmd_fmt; + cmd_editor = if Sys.os_type = "Win32" then "NOTEPAD %s" else "emacs %s"; - text_font = Pango.Font.from_string "sans 12"; +(* text_font = Pango.Font.from_string "sans 12";*) + text_font = Pango.Font.from_string "Monospace 10"; doc_url = "http://coq.inria.fr/doc/"; library_url = "http://coq.inria.fr/library/"; @@ -147,7 +149,9 @@ let (current:pref ref) = *) auto_complete = false; stop_before = true; - lax_syntax = true + lax_syntax = true; + vertical_tabs = false; + opposite_tabs = false; } @@ -192,10 +196,12 @@ let save_pref () = (List.map mod_to_str p.modifier_for_templates) ++ add "modifier_for_tactics" (List.map mod_to_str p.modifier_for_tactics) ++ + add "modifier_for_display" + (List.map mod_to_str p.modifier_for_display) ++ add "modifiers_valid" (List.map mod_to_str p.modifiers_valid) ++ - add "cmd_browse" [fst p.cmd_browse; snd p.cmd_browse] ++ - add "cmd_editor" [fst p.cmd_editor; snd p.cmd_editor] ++ + add "cmd_browse" [p.cmd_browse] ++ + add "cmd_editor" [p.cmd_editor] ++ add "text_font" [Pango.Font.to_string p.text_font] ++ @@ -211,6 +217,8 @@ let save_pref () = add "auto_complete" [string_of_bool p.auto_complete] ++ add "stop_before" [string_of_bool p.stop_before] ++ add "lax_syntax" [string_of_bool p.lax_syntax] ++ + add "vertical_tabs" [string_of_bool p.vertical_tabs] ++ + add "opposite_tabs" [string_of_bool p.opposite_tabs] ++ Config_lexer.print_file pref_file with _ -> prerr_endline "Could not save preferences." @@ -226,6 +234,9 @@ let load_pref () = let set_bool k f = set_hd k (fun v -> f (bool_of_string v)) in let set_int k f = set_hd k (fun v -> f (int_of_string v)) in let set_pair k f = set k (function [v1;v2] -> f v1 v2 | _ -> raise Exit) in + let set_command_with_pair_compat k f = + set k (function [v1;v2] -> f (v1^"%s"^v2) | [v] -> f v | _ -> raise Exit) + in set_hd "cmd_coqc" (fun v -> np.cmd_coqc <- v); set_hd "cmd_make" (fun v -> np.cmd_make <- v); set_hd "cmd_coqmakefile" (fun v -> np.cmd_coqmakefile <- v); @@ -248,10 +259,12 @@ let load_pref () = (fun v -> np.modifier_for_templates <- List.map str_to_mod v); set "modifier_for_tactics" (fun v -> np.modifier_for_tactics <- List.map str_to_mod v); + set "modifier_for_display" + (fun v -> np.modifier_for_display <- List.map str_to_mod v); set "modifiers_valid" (fun v -> np.modifiers_valid <- List.map str_to_mod v); - set_pair "cmd_browse" (fun v1 v2 -> np.cmd_browse <- (v1,v2)); - set_pair "cmd_editor" (fun v1 v2 -> np.cmd_editor <- (v1,v2)); + set_command_with_pair_compat "cmd_browse" (fun v -> np.cmd_browse <- v); + set_command_with_pair_compat "cmd_editor" (fun v -> np.cmd_editor <- v); set_hd "text_font" (fun v -> np.text_font <- Pango.Font.from_string v); set_hd "doc_url" (fun v -> np.doc_url <- v); set_hd "library_url" (fun v -> np.library_url <- v); @@ -265,9 +278,11 @@ let load_pref () = set_bool "auto_complete" (fun v -> np.auto_complete <- v); set_bool "stop_before" (fun v -> np.stop_before <- v); set_bool "lax_syntax" (fun v -> np.lax_syntax <- v); + set_bool "vertical_tabs" (fun v -> np.vertical_tabs <- v); + set_bool "opposite_tabs" (fun v -> np.opposite_tabs <- v); current := np; (* - Format.printf "in laod_pref: current.text_font = %s@." (Pango.Font.to_string !current.text_font); + Format.printf "in load_pref: current.text_font = %s@." (Pango.Font.to_string !current.text_font); *) with e -> prerr_endline ("Could not load preferences ("^ @@ -281,7 +296,7 @@ let split_string_format s = pre,post with Not_found -> s,"" -let configure () = +let configure ?(apply=(fun () -> ())) () = let cmd_coqc = string ~f:(fun s -> !current.cmd_coqc <- s) @@ -405,6 +420,18 @@ let configure () = "Relax read-only constraint at end of command" !current.lax_syntax in + let vertical_tabs = + bool + ~f:(fun s -> !current.vertical_tabs <- s) + "Vertical tabs" !current.vertical_tabs + in + + let opposite_tabs = + bool + ~f:(fun s -> !current.opposite_tabs <- s) + "Tabs on opposite side" !current.opposite_tabs + in + let encodings = combo "File charset encoding " @@ -426,10 +453,14 @@ let configure () = (if !current.encoding_use_utf8 then "UTF-8" else if !current.encoding_use_locale then "LOCALE" else !current.encoding_manual) in + let help_string = + "Press a set of modifiers and an extra key together (needs then a restart to apply!)" + in let modifier_for_tactics = modifiers ~allow:!current.modifiers_valid ~f:(fun l -> !current.modifier_for_tactics <- l) + ~help:help_string "Modifiers for Tactics Menu" !current.modifier_for_tactics in @@ -437,6 +468,7 @@ let configure () = modifiers ~allow:!current.modifiers_valid ~f:(fun l -> !current.modifier_for_templates <- l) + ~help:help_string "Modifiers for Templates Menu" !current.modifier_for_templates in @@ -444,35 +476,53 @@ let configure () = modifiers ~allow:!current.modifiers_valid ~f:(fun l -> !current.modifier_for_navigation <- l) + ~help:help_string "Modifiers for Navigation Menu" !current.modifier_for_navigation in + let modifier_for_display = + modifiers + ~allow:!current.modifiers_valid + ~f:(fun l -> !current.modifier_for_display <- l) + ~help:help_string + "Modifiers for Display Menu" + !current.modifier_for_display + in let modifiers_valid = modifiers ~f:(fun l -> !current.modifiers_valid <- l) "Allowed modifiers" !current.modifiers_valid in - let mod_msg = - string - "Needs restart to apply!" - ~editable:false - "" - in - let cmd_editor = - string - ~f:(fun s -> !current.cmd_editor <- split_string_format s) + let predefined = [ "emacs %s"; "vi %s"; "NOTEPAD %s" ] in + combo ~help:"(%s for file name)" "External editor" - ((fst !current.cmd_editor)^"%s"^(snd !current.cmd_editor)) + ~f:(fun s -> !current.cmd_editor <- s) + ~new_allowed: true + (predefined@[if List.mem !current.cmd_editor predefined then "" + else !current.cmd_editor]) + !current.cmd_editor in - let cmd_browse = - string - ~f:(fun s -> !current.cmd_browse <- split_string_format s) + let cmd_browse = + let predefined = [ + "netscape -remote \"openURL(%s)\""; + "mozilla -remote \"openURL(%s)\""; + "firefox -remote \"openURL(%s,new-tab)\" || firefox %s &"; + "firefox -remote \"openURL(%s,new-windows)\" || firefox %s &"; + "seamonkey -remote \"openURL(%s)\" || seamonkey %s &"; + "C:\\PROGRA~1\\INTERN~1\\IEXPLORE %s"; + "open -a Safari %s &" + ] in + combo ~help:"(%s for url)" - " Browser" - ((fst !current.cmd_browse)^"%s"^(snd !current.cmd_browse)) + "Browser" + ~f:(fun s -> !current.cmd_browse <- s) + ~new_allowed: true + (predefined@[if List.mem !current.cmd_browse predefined then "" + else !current.cmd_browse]) + !current.cmd_browse in let doc_url = string ~f:(fun s -> !current.doc_url <- s) " Manual URL" !current.doc_url in @@ -496,7 +546,8 @@ let configure () = "Contextual menus on goal" !current.contextual_menus_on_goal in - let misc = [contextual_menus_on_goal;auto_complete;stop_before;lax_syntax] in + let misc = [contextual_menus_on_goal;auto_complete;stop_before;lax_syntax; + vertical_tabs;opposite_tabs] in (* ATTENTION !!!!! L'onglet Fonts doit etre en premier pour eviter un bug !!!! (shame on Benjamin) *) @@ -520,14 +571,14 @@ let configure () = [automatic_tactics]); Section("Shortcuts", [modifiers_valid; modifier_for_tactics; - modifier_for_templates; modifier_for_navigation;mod_msg]); + modifier_for_templates; modifier_for_display; modifier_for_navigation]); Section("Misc", misc)] in (* Format.printf "before edit: current.text_font = %s@." (Pango.Font.to_string !current.text_font); *) - let x = edit ~width:500 "Customizations" cmds in + let x = edit ~apply ~width:500 "Customizations" cmds in (* Format.printf "after edit: current.text_font = %s@." (Pango.Font.to_string !current.text_font); *) diff --git a/ide/preferences.mli b/ide/preferences.mli index c3e26f50..d7f32380 100644 --- a/ide/preferences.mli +++ b/ide/preferences.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: preferences.mli 9240 2006-10-13 17:51:11Z notin $ i*) +(*i $Id: preferences.mli 11009 2008-05-28 13:58:33Z jnarboux $ i*) type pref = { @@ -32,10 +32,11 @@ type pref = mutable modifier_for_navigation : Gdk.Tags.modifier list; mutable modifier_for_templates : Gdk.Tags.modifier list; mutable modifier_for_tactics : Gdk.Tags.modifier list; + mutable modifier_for_display : Gdk.Tags.modifier list; mutable modifiers_valid : Gdk.Tags.modifier list; - mutable cmd_browse : string * string; - mutable cmd_editor : string * string; + mutable cmd_browse : string; + mutable cmd_editor : string; mutable text_font : Pango.font_description; @@ -54,6 +55,8 @@ type pref = mutable auto_complete : bool; mutable stop_before : bool; mutable lax_syntax : bool; + mutable vertical_tabs : bool; + mutable opposite_tabs : bool; } val save_pref : unit -> unit @@ -61,7 +64,7 @@ val load_pref : unit -> unit val current : pref ref -val configure : unit -> unit +val configure : ?apply:(unit -> unit) -> unit -> unit val change_font : ( Pango.font_description -> unit) ref val show_toolbar : (bool -> unit) ref diff --git a/ide/utf8.v b/ide/utf8.v deleted file mode 100644 index 574f2e65..00000000 --- a/ide/utf8.v +++ /dev/null @@ -1,56 +0,0 @@ -(* -*- coding:utf-8 -* *) -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* y) (at level 90, right associativity): type_scope. -Notation "x ↔ y" := (x <-> y) (at level 95, no associativity): type_scope. -Notation "⌉ x" := (~x) (at level 75, right associativity) : type_scope. - - -(* Abstraction *) -(* Not nice -Notation "'λ' x : T , y" := ([x:T] y) (at level 1, x,T,y at level 10). -Notation "'λ' x := T , y" := ([x:=T] y) (at level 1, x,T,y at level 10). -*) - -(* Arithmetic *) -Notation "x ≤ y" := (le x y) (at level 70, no associativity). -Notation "x ≥ y" := (ge x y) (at level 70, no associativity). - -(* test *) -(* -Goal ∀ x, True -> (∃ y , x ≥ y + 1) ∨ x ≤ 0. -*) - -(* Integer Arithmetic *) -(* TODO -Notation "x ≤ y" := (Zle x y) (at level 1, y at level 10). -*) diff --git a/ide/utils/config_file.ml b/ide/utils/config_file.ml index 30eb0111..d972639f 100644 --- a/ide/utils/config_file.ml +++ b/ide/utils/config_file.ml @@ -23,7 +23,7 @@ (* *) (*********************************************************************************) -(* $Id: config_file.ml 8618 2006-03-08 11:44:47Z notin $ *) +(* $Id: config_file.ml 10348 2007-12-06 17:36:14Z aspiwack $ *) (* TODO *) (* section comments *) @@ -552,7 +552,7 @@ class filename_cp = string_cp (* ******************************************************************************** *) -(******************** Backward compatibility with module Options ****************** *) +(******************** Backward compatibility with module Flags.****************** *) (* ******************************************************************************** *) type 'a option_class = 'a wrappers diff --git a/ide/utils/configwin_ihm.ml b/ide/utils/configwin_ihm.ml index 240fd829..3ab3823d 100644 --- a/ide/utils/configwin_ihm.ml +++ b/ide/utils/configwin_ihm.ml @@ -364,7 +364,7 @@ class string_param_box param (tt:GData.tooltips) = let _ = dbg "string_param_box" in let hbox = GPack.hbox () in let wev = GBin.event_box ~packing: (hbox#pack ~expand: false ~padding: 2) () in - let wl = GMisc.label ~text: param.string_label ~packing: wev#add () in + let _wl = GMisc.label ~text: param.string_label ~packing: wev#add () in let we = GEdit.entry ~editable: param.string_editable ~packing: (hbox#pack ~expand: param.string_expand ~padding: 2) @@ -396,7 +396,7 @@ class combo_param_box param (tt:GData.tooltips) = let _ = dbg "combo_param_box" in let hbox = GPack.hbox () in let wev = GBin.event_box ~packing: (hbox#pack ~expand: false ~padding: 2) () in - let wl = GMisc.label ~text: param.combo_label ~packing: wev#add () in + let _wl = GMisc.label ~text: param.combo_label ~packing: wev#add () in let wc = GEdit.combo ~popdown_strings: param.combo_choices ~value_in_list: (not param.combo_new_allowed) @@ -754,9 +754,7 @@ class hotkey_param_box param (tt:GData.tooltips) = let _ = dbg "hotkey_param_box" in let hbox = GPack.hbox () in let wev = GBin.event_box ~packing: (hbox#pack ~expand: false ~padding: 2) () in - let wl = GMisc.label ~text: param.hk_label - ~packing: wev#add () - in + let _wl = GMisc.label ~text: param.hk_label ~packing: wev#add () in let we = GEdit.entry ~editable: false ~packing: (hbox#pack ~expand: param.hk_expand ~padding: 2) @@ -805,9 +803,7 @@ class hotkey_param_box param (tt:GData.tooltips) = class modifiers_param_box param = let hbox = GPack.hbox () in let wev = GBin.event_box ~packing: (hbox#pack ~expand: false ~padding: 2) () in - let wl = GMisc.label ~text: param.md_label - ~packing: wev#add () - in + let _wl = GMisc.label ~text: param.md_label ~packing: wev#add () in let we = GEdit.entry ~editable: false ~packing: (hbox#pack ~expand: param.md_expand ~padding: 2) diff --git a/ide/utils/uoptions.ml b/ide/utils/uoptions.ml index 416f5769..aa3b42cd 100644 --- a/ide/utils/uoptions.ml +++ b/ide/utils/uoptions.ml @@ -24,7 +24,7 @@ (** Simple options: This will enable very simple configuration, by a mouse-based configurator. - Options will be defined by a special function, which will also check + Flags.will be defined by a special function, which will also check if a value has been provided by the user in its .gwmlrc file. The .gwmlrc will be created by a dedicated tool, which could be used to generate both .gwmlrc and .efunsrc files. @@ -151,7 +151,7 @@ let opfile.file_rc) with Not_found -> default_value | e -> - Printf.printf "Options.define_option, for option %s: " + Printf.printf "Flags.define_option, for option %s: " (match option_name with [] -> "???" | name :: _ -> name); @@ -344,7 +344,7 @@ let value_to_string v = StringValue s -> s | IntValue i -> string_of_int i | FloatValue f -> string_of_float f - | _ -> failwith "Options: not a string option" + | _ -> failwith "Flags. not a string option" ;; let string_to_value s = StringValue s;; @@ -353,7 +353,7 @@ let value_to_int v = match v with StringValue s -> int_of_string s | IntValue i -> i - | _ -> failwith "Options: not an int option" + | _ -> failwith "Flags. not an int option" ;; let int_to_value i = IntValue i;; @@ -375,7 +375,7 @@ let value_to_bool v = StringValue s -> bool_of_string s | IntValue v when v = 0 -> false | IntValue v when v = 1 -> true - | _ -> failwith "Options: not a bool option" + | _ -> failwith "Flags. not a bool option" ;; let bool_to_value i = StringValue (string_of_bool i);; @@ -383,7 +383,7 @@ let value_to_float v = match v with StringValue s -> float_of_string s | FloatValue f -> f - | _ -> failwith "Options: not a float option" + | _ -> failwith "Flags. not a float option" ;; let float_to_value i = FloatValue i;; @@ -392,7 +392,7 @@ let value_to_string2 v = match v with List [s1; s2] | SmallList [s1;s2] -> value_to_string s1, value_to_string s2 - | _ -> failwith "Options: not a string2 option" + | _ -> failwith "Flags. not a string2 option" ;; let string2_to_value (s1, s2) = SmallList [StringValue s1; StringValue s2];; @@ -401,10 +401,10 @@ let value_to_list v2c v = match v with List l | SmallList l -> List.rev (List.rev_map v2c l) | StringValue s -> failwith (Printf.sprintf - "Options: not a list option (StringValue [%s])" s) - | FloatValue _ -> failwith "Options: not a list option (FloatValue)" - | IntValue _ -> failwith "Options: not a list option (IntValue)" - | Module _ -> failwith "Options: not a list option (Module)" + "Flags. not a list option (StringValue [%s])" s) + | FloatValue _ -> failwith "Flags. not a list option (FloatValue)" + | IntValue _ -> failwith "Flags. not a list option (IntValue)" + | Module _ -> failwith "Flags. not a list option (Module)" ;; let list_to_value c2v l = @@ -458,7 +458,7 @@ let from_value cl = cl.from_value;; let value_to_sum l v = match v with StringValue s -> List.assoc s l - | _ -> failwith "Options: not a sum option" + | _ -> failwith "Flags. not a sum option" ;; let sum_to_value l v = StringValue (List.assq v l);; @@ -659,8 +659,8 @@ let value_to_tuple2 (c1, c2) v = | List l | SmallList l -> Printf.printf "list of %d" (List.length l); print_newline (); - failwith "Options: not a tuple2 list option" - | _ -> failwith "Options: not a tuple2 option" + failwith "Flags. not a tuple2 list option" + | _ -> failwith "Flags. not a tuple2 option" ;; let tuple2_option p = @@ -675,7 +675,7 @@ let value_to_tuple3 (c1, c2, c3) v = List [v1; v2; v3] -> from_value c1 v1, from_value c2 v2, from_value c3 v3 | SmallList [v1; v2; v3] -> from_value c1 v1, from_value c2 v2, from_value c3 v3 - | _ -> failwith "Options: not a tuple3 option" + | _ -> failwith "Flags. not a tuple3 option" ;; let tuple3_option p = @@ -691,7 +691,7 @@ let value_to_tuple4 (c1, c2, c3, c4) v = (from_value c1 v1, from_value c2 v2, from_value c3 v3, from_value c4 v4) | SmallList [v1; v2; v3; v4] -> (from_value c1 v1, from_value c2 v2, from_value c3 v3, from_value c4 v4) - | _ -> failwith "Options: not a tuple4 option" + | _ -> failwith "Flags. not a tuple4 option" ;; let tuple4_option p = diff --git a/interp/constrextern.ml b/interp/constrextern.ml index b9d7694f..141e8f8a 100644 --- a/interp/constrextern.ml +++ b/interp/constrextern.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: constrextern.ml 10135 2007-09-21 14:28:12Z herbelin $ *) +(* $Id: constrextern.ml 11024 2008-05-30 12:41:39Z msozeau $ *) (*i*) open Pp @@ -44,11 +44,15 @@ let print_evar_arguments = ref false (* This governs printing of implicit arguments. When [print_implicits] is on then [print_implicits_explicit_args] tells how implicit args are printed. If on, implicit args are printed - prefixed by "!" otherwise the function and not the arguments is - prefixed by "!" *) + with the form (id:=arg) otherwise arguments are printed normally and + the function is prefixed by "@" *) let print_implicits = ref false let print_implicits_explicit_args = ref false +(* Tells if implicit arguments not known to be inferable from a rigid + position are systematically printed *) +let print_implicits_defensive = ref true + (* This forces printing of coercions *) let print_coercions = ref false @@ -63,12 +67,12 @@ let print_projections = ref false let print_meta_as_hole = ref false -let with_arguments f = Options.with_option print_arguments f -let with_implicits f = Options.with_option print_implicits f -let with_coercions f = Options.with_option print_coercions f -let with_universes f = Options.with_option print_universes f -let without_symbols f = Options.with_option print_no_symbol f -let with_meta_as_hole f = Options.with_option print_meta_as_hole f +let with_arguments f = Flags.with_option print_arguments f +let with_implicits f = Flags.with_option print_implicits f +let with_coercions f = Flags.with_option print_coercions f +let with_universes f = Flags.with_option print_universes f +let without_symbols f = Flags.with_option print_no_symbol f +let with_meta_as_hole f = Flags.with_option print_meta_as_hole f (**********************************************************************) (* Various externalisation functions *) @@ -101,30 +105,20 @@ let idopt_of_name = function | Name id -> Some id | Anonymous -> None -let extern_evar loc n = -(* - msgerrnl (str - "Warning: existential variable turned into meta-variable during externalization"); - CPatVar (loc,(false,make_ident "META" (Some n))) -*) - CEvar (loc,n) - -let raw_string_of_ref = function - | ConstRef kn -> - "CONST("^(string_of_con kn)^")" - | IndRef (kn,i) -> - "IND("^(string_of_kn kn)^","^(string_of_int i)^")" - | ConstructRef ((kn,i),j) -> - "CONSTRUCT("^ - (string_of_kn kn)^","^(string_of_int i)^","^(string_of_int j)^")" - | VarRef id -> - "SECVAR("^(string_of_id id)^")" +let extern_evar loc n l = + if !print_evar_arguments then CEvar (loc,n,l) else CEvar (loc,n,None) + +let debug_global_reference_printer = + ref (fun _ -> failwith "Cannot print a global reference") + +let set_debug_global_reference_printer f = + debug_global_reference_printer := f let extern_reference loc vars r = try Qualid (loc,shortest_qualid_of_global vars r) with Not_found -> (* happens in debugger *) - Ident (loc,id_of_string (raw_string_of_ref r)) + !debug_global_reference_printer loc r (************************************************************************) (* Equality up to location (useful for translator v8) *) @@ -183,10 +177,10 @@ let rec check_same_type ty1 ty2 = List.iter2 (fun (a1,e1) (a2,e2) -> if e1<>e2 then failwith "not same expl"; check_same_type a1 a2) al1 al2 - | CCases(_,_,a1,brl1), CCases(_,_,a2,brl2) -> + | CCases(_,_,_,a1,brl1), CCases(_,_,_,a2,brl2) -> List.iter2 (fun (tm1,_) (tm2,_) -> check_same_type tm1 tm2) a1 a2; List.iter2 (fun (_,pl1,r1) (_,pl2,r2) -> - List.iter2 (List.iter2 check_same_pattern) pl1 pl2; + List.iter2 (located_iter2 (List.iter2 check_same_pattern)) pl1 pl2; check_same_type r1 r2) brl1 brl2 | CHole _, CHole _ -> () | CPatVar(_,i1), CPatVar(_,i2) when i1=i2 -> () @@ -204,7 +198,7 @@ let rec check_same_type ty1 ty2 = | _ when ty1=ty2 -> () | _ -> failwith "not same type" -and check_same_binder (nal1,e1) (nal2,e2) = +and check_same_binder (nal1,_,e1) (nal2,_,e2) = List.iter2 (fun (_,na1) (_,na2) -> if na1<>na2 then failwith "not same name") nal1 nal2; check_same_type e1 e2 @@ -212,20 +206,15 @@ and check_same_binder (nal1,e1) (nal2,e2) = and check_same_fix_binder bl1 bl2 = List.iter2 (fun b1 b2 -> match b1,b2 with - LocalRawAssum(nal1,ty1), LocalRawAssum(nal2,ty2) -> - check_same_binder (nal1,ty1) (nal2,ty2) + LocalRawAssum(nal1,k,ty1), LocalRawAssum(nal2,k',ty2) -> + check_same_binder (nal1,k,ty1) (nal2,k',ty2) | LocalRawDef(na1,def1), LocalRawDef(na2,def2) -> - check_same_binder ([na1],def1) ([na2],def2) + check_same_binder ([na1],default_binder_kind,def1) ([na2],default_binder_kind,def2) | _ -> failwith "not same binder") bl1 bl2 let same c d = try check_same_type c d; true with _ -> false (* Idem for rawconstr *) -let option_iter2 f o1 o2 = - match o1, o2 with - Some o1, Some o2 -> f o1 o2 - | None, None -> () - | _ -> failwith "option" let array_iter2 f v1 v2 = List.iter2 f (Array.to_list v1) (Array.to_list v2) @@ -244,25 +233,25 @@ let rec same_raw c d = | RVar(_,id1), RVar(_,id2) -> if id1<>id2 then failwith "RVar" | REvar(_,e1,a1), REvar(_,e2,a2) -> if e1 <> e2 then failwith "REvar"; - option_iter2(List.iter2 same_raw) a1 a2 + Option.iter2(List.iter2 same_raw) a1 a2 | RPatVar(_,pv1), RPatVar(_,pv2) -> if pv1<>pv2 then failwith "RPatVar" | RApp(_,f1,a1), RApp(_,f2,a2) -> List.iter2 same_raw (f1::a1) (f2::a2) - | RLambda(_,na1,t1,m1), RLambda(_,na2,t2,m2) -> + | RLambda(_,na1,bk1,t1,m1), RLambda(_,na2,bk2,t2,m2) -> if na1 <> na2 then failwith "RLambda"; same_raw t1 t2; same_raw m1 m2 - | RProd(_,na1,t1,m1), RProd(_,na2,t2,m2) -> + | RProd(_,na1,bk1,t1,m1), RProd(_,na2,bk2,t2,m2) -> if na1 <> na2 then failwith "RProd"; same_raw t1 t2; same_raw m1 m2 | RLetIn(_,na1,t1,m1), RLetIn(_,na2,t2,m2) -> if na1 <> na2 then failwith "RLetIn"; same_raw t1 t2; same_raw m1 m2 - | RCases(_,_,c1,b1), RCases(_,_,c2,b2) -> + | RCases(_,_,_,c1,b1), RCases(_,_,_,c2,b2) -> List.iter2 (fun (t1,(al1,oind1)) (t2,(al2,oind2)) -> same_raw t1 t2; if al1 <> al2 then failwith "RCases"; - option_iter2(fun (_,i1,_,nl1) (_,i2,_,nl2) -> + Option.iter2(fun (_,i1,_,nl1) (_,i2,_,nl2) -> if i1<>i2 || nl1 <> nl2 then failwith "RCases") oind1 oind2) c1 c2; List.iter2 (fun (_,_,pl1,b1) (_,_,pl2,b2) -> List.iter2 same_patt pl1 pl2; @@ -276,9 +265,9 @@ let rec same_raw c d = | RRec(_,fk1,na1,bl1,ty1,def1), RRec(_,fk2,na2,bl2,ty2,def2) -> if fk1 <> fk2 || na1 <> na2 then failwith "RRec"; array_iter2 - (List.iter2 (fun (na1,bd1,ty1) (na2,bd2,ty2) -> + (List.iter2 (fun (na1,bk1,bd1,ty1) (na2,bk2,bd2,ty2) -> if na1<>na2 then failwith "RRec"; - option_iter2 same_raw bd1 bd2; + Option.iter2 same_raw bd1 bd2; same_raw ty1 ty2)) bl1 bl2; array_iter2 same_raw ty1 ty2; array_iter2 same_raw def1 def2 @@ -374,7 +363,7 @@ let rec match_cases_pattern metas sigma a1 a2 = match (a1,a2) with | r1, AVar id2 when List.mem id2 metas -> bind_env sigma id2 r1 | PatVar (_,Anonymous), AHole _ -> sigma | a, AHole _ -> sigma - | PatCstr (loc,(ind,_ as r1),args1,Anonymous), _ -> + | PatCstr (loc,(ind,_ as r1),args1,_), _ -> let nparams = (fst (Global.lookup_inductive ind)).Declarations.mind_nparams in let l2 = @@ -402,16 +391,16 @@ let match_aconstr_cases_pattern c (metas_scl,pat) = (* Better to use extern_rawconstr composed with injection/retraction ?? *) let rec extern_cases_pattern_in_scope (scopes:local_scopes) vars pat = try - if !Options.raw_print or !print_no_symbol then raise No_match; + if !Flags.raw_print or !print_no_symbol then raise No_match; let (na,sc,p) = uninterp_prim_token_cases_pattern pat in - match availability_of_prim_token sc scopes p with + match availability_of_prim_token sc scopes with | None -> raise No_match | Some key -> let loc = cases_pattern_loc pat in insert_pat_alias loc (insert_pat_delimiters loc (CPatPrim(loc,p)) key) na with No_match -> try - if !Options.raw_print or !print_no_symbol then raise No_match; + if !Flags.raw_print or !print_no_symbol then raise No_match; extern_symbol_pattern scopes vars pat (uninterp_cases_pattern_notations pat) with No_match -> @@ -429,22 +418,22 @@ and extern_symbol_pattern (tmp_scope,scopes as allscopes) vars t = function | (keyrule,pat,n as _rule)::rules -> try (* Check the number of arguments expected by the notation *) - let loc = match t,n with + let loc,na = match t,n with | PatCstr (_,f,l,_), Some n when List.length l > n -> raise No_match - | PatCstr (loc,_,_,_),_ -> loc - | PatVar (loc,_),_ -> loc in + | PatCstr (loc,_,_,na),_ -> loc,na + | PatVar (loc,na),_ -> loc,na in (* Try matching ... *) let subst = match_aconstr_cases_pattern t pat in (* Try availability of interpretation ... *) - match keyrule with + let p = match keyrule with | NotationRule (sc,ntn) -> (match availability_of_notation (sc,ntn) allscopes with (* Uninterpretation is not allowed in current context *) | None -> raise No_match (* Uninterpretation is allowed in current context *) | Some (scopt,key) -> - let scopes' = option_cons scopt scopes in + let scopes' = Option.List.cons scopt scopes in let l = List.map (fun (c,(scopt,scl)) -> extern_cases_pattern_in_scope (scopt,scl@scopes') vars c) @@ -452,7 +441,8 @@ and extern_symbol_pattern (tmp_scope,scopes as allscopes) vars t = function insert_pat_delimiters loc (make_pat_notation loc ntn l) key) | SynDefRule kn -> let qid = shortest_qualid_of_syndef vars kn in - CPatAtom (loc,Some (Qualid (loc, qid))) + CPatAtom (loc,Some (Qualid (loc, qid))) in + insert_pat_alias loc p na with No_match -> extern_symbol_pattern allscopes vars t rules @@ -468,7 +458,7 @@ let occur_name na aty = | Anonymous -> false let is_projection nargs = function - | Some r when not !Options.raw_print & !print_projections -> + | Some r when not !Flags.raw_print & !print_projections -> (try let n = Recordops.find_projection_nparams r + 1 in if n <= nargs then Some n else None @@ -488,10 +478,11 @@ let explicitize loc inctx impl (cf,f) args = | a::args, imp::impl when is_status_implicit imp -> let tail = exprec (q+1) (args,impl) in let visible = - !Options.raw_print or + !Flags.raw_print or (!print_implicits & !print_implicits_explicit_args) or - (is_significant_implicit a impl tail & - (not (is_inferable_implicit inctx n imp))) + (!print_implicits_defensive & + is_significant_implicit a impl tail & + not (is_inferable_implicit inctx n imp)) in if visible then (a,Some (dummy_loc, ExplByName (name_of_implicit imp))) :: tail @@ -526,7 +517,7 @@ let extern_app loc inctx impl (cf,f) args = extern_global loc impl f else if - ((!Options.raw_print or + ((!Flags.raw_print or (!print_implicits & not !print_implicits_explicit_args)) & List.exists is_status_implicit impl) then @@ -545,16 +536,17 @@ let rec extern_args extern scopes env args subscopes = let rec remove_coercions inctx = function | RApp (loc,RRef (_,r),args) as c - when inctx & not (!Options.raw_print or !print_coercions) + when not (!Flags.raw_print or !print_coercions) -> + let nargs = List.length args in (try match Classops.hide_coercion r with - | Some n when n < List.length args -> + | Some n when n < nargs && (inctx or n+1 < nargs) -> (* We skip a coercion *) let l = list_skipn n args in - let (a,l) = match l with a::l -> (a,l) | [] -> assert false in - let (a,l) = + let (a,l) = match l with a::l -> (a,l) | [] -> assert false in + let (a,l) = (* Recursively remove the head coercions *) - match remove_coercions inctx a with + match remove_coercions true a with | RApp (_,a,l') -> a,l'@l | a -> a,l in if l = [] then a @@ -572,7 +564,7 @@ let rec rename_rawconstr_var id0 id1 = function let rec share_fix_binders n rbl ty def = match ty,def with - RProd(_,na0,t0,b), RLambda(_,na1,t1,m) -> + RProd(_,na0,bk0,t0,b), RLambda(_,na1,bk1,t1,m) -> if not(same_rawconstr t0 t1) then List.rev rbl, ty, def else let (na,b,m) = @@ -604,7 +596,7 @@ let rec share_fix_binders n rbl ty def = let extern_possible_prim_token scopes r = try let (sc,n) = uninterp_prim_token r in - match availability_of_prim_token sc scopes n with + match availability_of_prim_token sc scopes with | None -> None | Some key -> Some (insert_delimiters (CPrim (loc_of_rawconstr r,n)) key) with No_match -> @@ -628,11 +620,11 @@ let extern_rawsort = function let rec extern inctx scopes vars r = let r' = remove_coercions inctx r in try - if !Options.raw_print or !print_no_symbol then raise No_match; + if !Flags.raw_print or !print_no_symbol then raise No_match; extern_optimal_prim_token scopes r r' with No_match -> try - if !Options.raw_print or !print_no_symbol then raise No_match; + if !Flags.raw_print or !print_no_symbol then raise No_match; extern_symbol scopes vars r' (uninterp_notations r') with No_match -> match r' with | RRef (loc,ref) -> @@ -641,11 +633,13 @@ let rec extern inctx scopes vars r = | RVar (loc,id) -> CRef (Ident (loc,id)) - | REvar (loc,n,None) when !print_meta_as_hole -> CHole loc + | REvar (loc,n,None) when !print_meta_as_hole -> CHole (loc, None) - | REvar (loc,n,_) -> (* we drop args *) extern_evar loc n + | REvar (loc,n,l) -> + extern_evar loc n (Option.map (List.map (extern false scopes vars)) l) - | RPatVar (loc,n) -> if !print_meta_as_hole then CHole loc else CPatVar (loc,n) + | RPatVar (loc,n) -> + if !print_meta_as_hole then CHole (loc, None) else CPatVar (loc,n) | RApp (loc,f,args) -> (match f with @@ -660,7 +654,7 @@ let rec extern inctx scopes vars r = explicitize loc inctx [] (None,sub_extern false scopes vars f) (List.map (sub_extern true scopes vars) args)) - | RProd (loc,Anonymous,t,c) -> + | RProd (loc,Anonymous,_,t,c) -> (* Anonymous product are never factorized *) CArrow (loc,extern_typ scopes vars t, extern_typ scopes vars c) @@ -668,31 +662,31 @@ let rec extern inctx scopes vars r = CLetIn (loc,(loc,na),sub_extern false scopes vars t, extern inctx scopes (add_vname vars na) c) - | RProd (loc,na,t,c) -> + | RProd (loc,na,bk,t,c) -> let t = extern_typ scopes vars (anonymize_if_reserved na t) in let (idl,c) = factorize_prod scopes (add_vname vars na) t c in - CProdN (loc,[(dummy_loc,na)::idl,t],c) + CProdN (loc,[(dummy_loc,na)::idl,Default bk,t],c) - | RLambda (loc,na,t,c) -> + | RLambda (loc,na,bk,t,c) -> let t = extern_typ scopes vars (anonymize_if_reserved na t) in let (idl,c) = factorize_lambda inctx scopes (add_vname vars na) t c in - CLambdaN (loc,[(dummy_loc,na)::idl,t],c) + CLambdaN (loc,[(dummy_loc,na)::idl,Default bk,t],c) - | RCases (loc,rtntypopt,tml,eqns) -> + | RCases (loc,sty,rtntypopt,tml,eqns) -> let vars' = List.fold_right (name_fold Idset.add) (cases_predicate_names tml) vars in - let rtntypopt' = option_map (extern_typ scopes vars') rtntypopt in + let rtntypopt' = Option.map (extern_typ scopes vars') rtntypopt in let tml = List.map (fun (tm,(na,x)) -> let na' = match na,tm with Anonymous, RVar (_,id) when - rtntypopt<>None & occur_rawconstr id (out_some rtntypopt) + rtntypopt<>None & occur_rawconstr id (Option.get rtntypopt) -> Some Anonymous | Anonymous, _ -> None | Name id, RVar (_,id') when id=id' -> None | Name _, _ -> Some na in (sub_extern false scopes vars tm, - (na',option_map (fun (loc,ind,n,nal) -> + (na',Option.map (fun (loc,ind,n,nal) -> let params = list_tabulate (fun _ -> RHole (dummy_loc,Evd.InternalHole)) n in let args = List.map (function @@ -701,19 +695,19 @@ let rec extern inctx scopes vars r = let t = RApp (dummy_loc,RRef (dummy_loc,IndRef ind),params@args) in (extern_typ scopes vars t)) x))) tml in let eqns = List.map (extern_eqn (rtntypopt<>None) scopes vars) eqns in - CCases (loc,rtntypopt',tml,eqns) + CCases (loc,sty,rtntypopt',tml,eqns) | RLetTuple (loc,nal,(na,typopt),tm,b) -> CLetTuple (loc,nal, - (option_map (fun _ -> na) typopt, - option_map (extern_typ scopes (add_vname vars na)) typopt), + (Option.map (fun _ -> na) typopt, + Option.map (extern_typ scopes (add_vname vars na)) typopt), sub_extern false scopes vars tm, extern false scopes (List.fold_left add_vname vars nal) b) | RIf (loc,c,(na,typopt),b1,b2) -> CIf (loc,sub_extern false scopes vars c, - (option_map (fun _ -> na) typopt, - option_map (extern_typ scopes (add_vname vars na)) typopt), + (Option.map (fun _ -> na) typopt, + Option.map (extern_typ scopes (add_vname vars na)) typopt), sub_extern false scopes vars b1, sub_extern false scopes vars b2) | RRec (loc,fk,idv,blv,tyv,bv) -> @@ -726,8 +720,13 @@ let rec extern inctx scopes vars r = let (ids,bl) = extern_local_binder scopes vars bl in let vars0 = List.fold_right (name_fold Idset.add) ids vars in let vars1 = List.fold_right (name_fold Idset.add) ids vars' in - let n, ro = fst nv.(i), extern_recursion_order scopes vars (snd nv.(i)) in - (fi, (n, ro), bl, extern_typ scopes vars0 ty, + let n = + match fst nv.(i) with + | None -> None + | Some x -> Some (dummy_loc, out_name (List.nth ids x)) + in + let ro = extern_recursion_order scopes vars (snd nv.(i)) in + ((dummy_loc, fi), (n, ro), bl, extern_typ scopes vars0 ty, extern false scopes vars1 def)) idv in CFix (loc,(loc,idv.(n)),Array.to_list listdecl) @@ -737,14 +736,14 @@ let rec extern inctx scopes vars r = let (ids,bl) = extern_local_binder scopes vars blv.(i) in let vars0 = List.fold_right (name_fold Idset.add) ids vars in let vars1 = List.fold_right (name_fold Idset.add) ids vars' in - (fi,bl,extern_typ scopes vars0 tyv.(i), + ((dummy_loc, fi),bl,extern_typ scopes vars0 tyv.(i), sub_extern false scopes vars1 bv.(i))) idv in CCoFix (loc,(loc,idv.(n)),Array.to_list listdecl)) | RSort (loc,s) -> CSort (loc,extern_rawsort s) - | RHole (loc,e) -> CHole loc + | RHole (loc,e) -> CHole (loc, Some e) | RCast (loc,c, CastConv (k,t)) -> CCast (loc,sub_extern true scopes vars c, CastConv (k,extern_typ scopes vars t)) @@ -760,10 +759,10 @@ and sub_extern inctx (_,scopes) = extern inctx (None,scopes) and factorize_prod scopes vars aty c = try - if !Options.raw_print or !print_no_symbol then raise No_match; + if !Flags.raw_print or !print_no_symbol then raise No_match; ([],extern_symbol scopes vars c (uninterp_notations c)) with No_match -> match c with - | RProd (loc,(Name id as na),ty,c) + | RProd (loc,(Name id as na),bk,ty,c) when same aty (extern_typ scopes vars (anonymize_if_reserved na ty)) & not (occur_var_constr_expr id aty) (* avoid na in ty escapes scope *) -> let (nal,c) = factorize_prod scopes (Idset.add id vars) aty c in @@ -772,10 +771,10 @@ and factorize_prod scopes vars aty c = and factorize_lambda inctx scopes vars aty c = try - if !Options.raw_print or !print_no_symbol then raise No_match; + if !Flags.raw_print or !print_no_symbol then raise No_match; ([],extern_symbol scopes vars c (uninterp_notations c)) with No_match -> match c with - | RLambda (loc,na,ty,c) + | RLambda (loc,na,bk,ty,c) when same aty (extern_typ scopes vars (anonymize_if_reserved na ty)) & not (occur_name na aty) (* To avoid na in ty' escapes scope *) -> let (nal,c) = @@ -785,27 +784,27 @@ and factorize_lambda inctx scopes vars aty c = and extern_local_binder scopes vars = function [] -> ([],[]) - | (na,Some bd,ty)::l -> + | (na,bk,Some bd,ty)::l -> let (ids,l) = extern_local_binder scopes (name_fold Idset.add na vars) l in (na::ids, LocalRawDef((dummy_loc,na), extern false scopes vars bd) :: l) - | (na,None,ty)::l -> + | (na,bk,None,ty)::l -> let ty = extern_typ scopes vars (anonymize_if_reserved na ty) in (match extern_local_binder scopes (name_fold Idset.add na vars) l with - (ids,LocalRawAssum(nal,ty')::l) + (ids,LocalRawAssum(nal,k,ty')::l) when same ty ty' & match na with Name id -> not (occur_var_constr_expr id ty') | _ -> true -> (na::ids, - LocalRawAssum((dummy_loc,na)::nal,ty')::l) + LocalRawAssum((dummy_loc,na)::nal,k,ty')::l) | (ids,l) -> (na::ids, - LocalRawAssum([(dummy_loc,na)],ty) :: l)) + LocalRawAssum([(dummy_loc,na)],Default bk,ty) :: l)) and extern_eqn inctx scopes vars (loc,ids,pl,c) = - (loc,[List.map (extern_cases_pattern_in_scope scopes vars) pl], + (loc,[loc,List.map (extern_cases_pattern_in_scope scopes vars) pl], extern inctx scopes vars c) and extern_symbol (tmp_scope,scopes as allscopes) vars t = function @@ -815,10 +814,13 @@ and extern_symbol (tmp_scope,scopes as allscopes) vars t = function try (* Adjusts to the number of arguments expected by the notation *) let (t,args) = match t,n with - | RApp (_,f,args), Some n when List.length args > n -> + | RApp (_,(RRef _ as f),args), Some n when List.length args >= n -> let args1, args2 = list_chop n args in (if n = 0 then f else RApp (dummy_loc,f,args1)), args2 - | _ -> t,[] in + | RApp (_,(RRef _ as f),args), None -> f, args + | RRef _, Some 0 -> RApp (dummy_loc,t,[]), [] + | _, None -> t,[] + | _ -> raise No_match in (* Try matching ... *) let subst = match_aconstr t pat in (* Try availability of interpretation ... *) @@ -830,7 +832,7 @@ and extern_symbol (tmp_scope,scopes as allscopes) vars t = function | None -> raise No_match (* Uninterpretation is allowed in current context *) | Some (scopt,key) -> - let scopes' = option_cons scopt scopes in + let scopes' = Option.List.cons scopt scopes in let l = List.map (fun (c,(scopt,scl)) -> extern (* assuming no overloading: *) true @@ -838,7 +840,12 @@ and extern_symbol (tmp_scope,scopes as allscopes) vars t = function subst in insert_delimiters (make_notation loc ntn l) key) | SynDefRule kn -> - CRef (Qualid (loc, shortest_qualid_of_syndef vars kn)) in + let l = + List.map (fun (c,(scopt,scl)) -> + extern true (scopt,scl@scopes) vars c, None) + subst in + let a = CRef (Qualid (loc, shortest_qualid_of_syndef vars kn)) in + if l = [] then a else CApp (loc,(None,a),l) in if args = [] then e else (* TODO: compute scopt for the extra args, in case, head is a ref *) @@ -868,7 +875,7 @@ let extern_constr_gen at_top scopt env t = let avoid = if at_top then ids_of_context env else [] in let r = Detyping.detype at_top avoid (names_of_rel_context env) t in let vars = vars_of_env env in - extern (not at_top) (scopt,[]) vars r + extern false (scopt,[]) vars r let extern_constr_in_scope at_top scope env t = extern_constr_gen at_top (Some scope) env t @@ -902,7 +909,7 @@ let rec raw_of_pat env = function | Name id -> id | Anonymous -> anomaly "rawconstr_of_pattern: index to an anonymous variable" - with Not_found -> id_of_string ("[REL "^(string_of_int n)^"]") in + with Not_found -> id_of_string ("_UNBOUND_REL_"^(string_of_int n)) in RVar (loc,id) | PMeta None -> RHole (loc,Evd.InternalHole) | PMeta (Some n) -> RPatVar (loc,(false,n)) @@ -912,11 +919,11 @@ let rec raw_of_pat env = function RApp (loc,RPatVar (loc,(true,n)), List.map (raw_of_pat env) args) | PProd (na,t,c) -> - RProd (loc,na,raw_of_pat env t,raw_of_pat (na::env) c) + RProd (loc,na,Explicit,raw_of_pat env t,raw_of_pat (na::env) c) | PLetIn (na,t,c) -> RLetIn (loc,na,raw_of_pat env t, raw_of_pat (na::env) c) | PLambda (na,t,c) -> - RLambda (loc,na,raw_of_pat env t, raw_of_pat (na::env) c) + RLambda (loc,na,Explicit,raw_of_pat env t, raw_of_pat (na::env) c) | PIf (c,b1,b2) -> RIf (loc, raw_of_pat env c, (Anonymous,None), raw_of_pat env b1, raw_of_pat env b2) @@ -924,19 +931,19 @@ let rec raw_of_pat env = function let nal,b = it_destRLambda_or_LetIn_names n (raw_of_pat env b) in RLetTuple (loc,nal,(Anonymous,None),raw_of_pat env tm,b) | PCase (_,PMeta None,tm,[||]) -> - RCases (loc,None,[raw_of_pat env tm,(Anonymous,None)],[]) + RCases (loc,RegularStyle,None,[raw_of_pat env tm,(Anonymous,None)],[]) | PCase ((_,cstr_nargs,indo,ind_nargs),p,tm,bv) -> let brs = Array.to_list (Array.map (raw_of_pat env) bv) in let brns = Array.to_list cstr_nargs in (* ind is None only if no branch and no return type *) - let ind = out_some indo in + let ind = Option.get indo in let mat = simple_cases_matrix_of_branches ind brns brs in let indnames,rtn = if p = PMeta None then (Anonymous,None),None else - let nparams,n = out_some ind_nargs in + let nparams,n = Option.get ind_nargs in return_type_of_predicate ind nparams n (raw_of_pat env p) in - RCases (loc,rtn,[raw_of_pat env tm,indnames],mat) + RCases (loc,RegularStyle,rtn,[raw_of_pat env tm,indnames],mat) | PFix f -> Detyping.detype false [] env (mkFix f) | PCoFix c -> Detyping.detype false [] env (mkCoFix c) | PSort s -> RSort (loc,s) @@ -972,3 +979,8 @@ and raw_of_eqn env constr construct_nargs branch = let extern_constr_pattern env pat = extern true (None,[]) Idset.empty (raw_of_pat env pat) + +let extern_rel_context where env sign = + let a = detype_rel_context where [] (names_of_rel_context env) sign in + let vars = vars_of_env env in + snd (extern_local_binder (None,[]) vars a) diff --git a/interp/constrextern.mli b/interp/constrextern.mli index ca145dd9..ec0a262b 100644 --- a/interp/constrextern.mli +++ b/interp/constrextern.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: constrextern.mli 8831 2006-05-19 09:29:54Z herbelin $ i*) +(*i $Id: constrextern.mli 10790 2008-04-14 22:34:19Z herbelin $ i*) (*i*) open Util @@ -42,9 +42,12 @@ val extern_constr_in_scope : bool -> scope_name -> env -> constr -> constr_expr val extern_reference : loc -> Idset.t -> global_reference -> reference val extern_type : bool -> env -> types -> constr_expr val extern_sort : sorts -> rawsort +val extern_rel_context : constr option -> env -> + rel_context -> local_binder list (* Printing options *) val print_implicits : bool ref +val print_implicits_defensive : bool ref val print_arguments : bool ref val print_evar_arguments : bool ref val print_coercions : bool ref @@ -52,6 +55,10 @@ val print_universes : bool ref val print_no_symbol : bool ref val print_projections : bool ref +(* Debug printing options *) +val set_debug_global_reference_printer : + (loc -> global_reference -> reference) -> unit + (* This governs printing of implicit arguments. If [with_implicits] is on and not [with_arguments] then implicit args are printed prefixed by "!"; if [with_implicits] and [with_arguments] are both on the diff --git a/interp/constrintern.ml b/interp/constrintern.ml index e1ee5486..9abee4d4 100644 --- a/interp/constrintern.ml +++ b/interp/constrintern.ml @@ -6,11 +6,11 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: constrintern.ml 9976 2007-07-12 11:58:30Z msozeau $ *) +(* $Id: constrintern.ml 11065 2008-06-06 22:39:43Z msozeau $ *) open Pp open Util -open Options +open Flags open Names open Nameops open Libnames @@ -32,6 +32,8 @@ type var_internalisation_data = type implicits_env = (identifier * var_internalisation_data) list type full_implicits_env = identifier list * implicits_env +type raw_binder = (name * binding_kind * rawconstr option * rawconstr) + let interning_grammar = ref false (* Historically for parsing grammar rules, but in fact used only for @@ -42,8 +44,6 @@ let for_grammar f x = interning_grammar := false; a -let variables_bind = ref false - (**********************************************************************) (* Internalisation errors *) @@ -86,7 +86,7 @@ let explain_bad_patterns_number n1 n2 = let explain_bad_explicitation_number n po = match n with - | ExplByPos n -> + | ExplByPos (n,_id) -> let s = match po with | None -> str "a regular argument" | Some p -> int p in @@ -142,15 +142,110 @@ let coqdoc_unfreeze (lt,tn,lp) = token_number := tn; last_pos := lp -let add_glob loc ref = - let sp = Nametab.sp_of_global ref in - let lib_dp = Lib.library_part ref in +open Decl_kinds + +let type_of_logical_kind = function + | IsDefinition def -> + (match def with + | Definition -> "def" + | Coercion -> "coe" + | SubClass -> "subclass" + | CanonicalStructure -> "canonstruc" + | Example -> "ex" + | Fixpoint -> "def" + | CoFixpoint -> "def" + | Scheme -> "scheme" + | StructureComponent -> "proj" + | IdentityCoercion -> "coe" + | Instance -> "inst" + | Method -> "meth") + | IsAssumption a -> + (match a with + | Definitional -> "defax" + | Logical -> "prfax" + | Conjectural -> "prfax") + | IsProof th -> + (match th with + | Theorem + | Lemma + | Fact + | Remark + | Property + | Proposition + | Corollary -> "thm") + +let type_of_global_ref gr = + if Typeclasses.is_class gr then + "class" + else + match gr with + | ConstRef cst -> + type_of_logical_kind (Decls.constant_kind cst) + | VarRef v -> + "var" ^ type_of_logical_kind (Decls.variable_kind v) + | IndRef ind -> + let (mib,oib) = Inductive.lookup_mind_specif (Global.env ()) ind in + if mib.Declarations.mind_record then + if mib.Declarations.mind_finite then "rec" + else "corec" + else if mib.Declarations.mind_finite then "ind" + else "coind" + | ConstructRef _ -> "constr" + +let remove_sections dir = + if is_dirpath_prefix_of dir (Lib.cwd ()) then + (* Not yet (fully) discharged *) + extract_dirpath_prefix (Lib.sections_depth ()) (Lib.cwd ()) + else + (* Theorem/Lemma outside its outer section of definition *) + dir + +let dump_reference loc filepath modpath ident ty = + dump_string (Printf.sprintf "R%d %s %s %s %s\n" + (fst (unloc loc)) filepath modpath ident ty) + +let add_glob_gen loc sp lib_dp ty = let mod_dp,id = repr_path sp in - let mod_dp_trunc = drop_dirpath_prefix lib_dp mod_dp in + let mod_dp = remove_sections mod_dp in + let mod_dp_trunc = drop_dirpath_prefix lib_dp mod_dp in let filepath = string_of_dirpath lib_dp in - let fullname = string_of_qualid (make_qualid mod_dp_trunc id) in - dump_string (Printf.sprintf "R%d %s %s\n" (fst (unloc loc)) filepath fullname) + let modpath = string_of_dirpath mod_dp_trunc in + let ident = string_of_id id in + dump_reference loc filepath modpath ident ty +let add_glob loc ref = + let sp = Nametab.sp_of_global ref in + let lib_dp = Lib.library_part ref in + let ty = type_of_global_ref ref in + add_glob_gen loc sp lib_dp ty + +let add_glob loc ref = + if !Flags.dump && loc <> dummy_loc then add_glob loc ref + +let mp_of_kn kn = + let mp,sec,l = repr_kn kn in + MPdot (mp,l) + +let add_glob_kn loc kn = + let sp = Nametab.sp_of_syntactic_definition kn in + let lib_dp = Lib.dp_of_mp (mp_of_kn kn) in + add_glob_gen loc sp lib_dp "syndef" + +let add_glob_kn loc ref = + if !Flags.dump && loc <> dummy_loc then add_glob_kn loc ref + +let add_local loc id = () +(* let mod_dp,id = repr_path sp in *) +(* let mod_dp = remove_sections mod_dp in *) +(* let mod_dp_trunc = drop_dirpath_prefix lib_dp mod_dp in *) +(* let filepath = string_of_dirpath lib_dp in *) +(* let modpath = string_of_dirpath mod_dp_trunc in *) +(* let ident = string_of_id id in *) +(* dump_string (Printf.sprintf "R%d %s %s %s %s\n" *) +(* (fst (unloc loc)) filepath modpath ident ty) *) + +let dump_binding loc id = () + let loc_of_notation f loc args ntn = if args=[] or ntn.[0] <> '_' then fst (unloc loc) else snd (unloc (f (List.hd args))) @@ -169,8 +264,8 @@ let dump_notation_location pos ((path,df),sc) = let loc = next (pos >= !last_pos) in last_pos := pos; let path = string_of_dirpath path in - let sc = match sc with Some sc -> " "^sc | None -> "" in - dump_string (Printf.sprintf "R%d %s \"%s\"%s\n" (fst (unloc loc)) path df sc) + let _sc = match sc with Some sc -> " "^sc | None -> "" in + dump_string (Printf.sprintf "R%d %s \"%s\" not\n" (fst (unloc loc)) path df) (**********************************************************************) (* Contracting "{ _ }" in notations *) @@ -221,18 +316,104 @@ let contract_pat_notation ntn l = (**********************************************************************) (* Remembering the parsing scope of variables in notations *) -let make_current_scope (tmp_scope,scopes) = option_cons tmp_scope scopes +let make_current_scope (tmp_scope,scopes) = Option.List.cons tmp_scope scopes let set_var_scope loc id (_,scopt,scopes) varscopes = let idscopes = List.assoc id varscopes in if !idscopes <> None & - make_current_scope (out_some !idscopes) + make_current_scope (Option.get !idscopes) <> make_current_scope (scopt,scopes) then user_err_loc (loc,"set_var_scope", pr_id id ++ str " already occurs in a different scope") else idscopes := Some (scopt,scopes) +(**********************************************************************) +(* Syntax extensions *) + +let traverse_binder subst (renaming,(ids,tmpsc,scopes as env)) id = + try + (* Binders bound in the notation are considered first-order objects *) + let _,id' = coerce_to_id (fst (List.assoc id subst)) in + (renaming,(Idset.add id' ids,tmpsc,scopes)), id' + with Not_found -> + (* Binders not bound in the notation do not capture variables *) + (* outside the notation (i.e. in the substitution) *) + let fvs1 = List.map (fun (_,(c,_)) -> free_vars_of_constr_expr c) subst in + let fvs2 = List.map snd renaming in + let fvs = List.flatten (List.map Idset.elements fvs1) @ fvs2 in + let id' = next_ident_away id fvs in + let renaming' = if id=id' then renaming else (id,id')::renaming in + (renaming',env), id' + +let decode_constrlist_value = function + | CAppExpl (_,_,l) -> l + | _ -> anomaly "Ill-formed list argument of notation" + +let rec subst_iterator y t = function + | RVar (_,id) as x -> if id = y then t else x + | x -> map_rawconstr (subst_iterator y t) x + +let rec subst_aconstr_in_rawconstr loc interp subst (renaming,(ids,_,scopes)) = + function + | AVar id -> + begin + (* subst remembers the delimiters stack in the interpretation *) + (* of the notations *) + try + let (a,(scopt,subscopes)) = List.assoc id subst in + interp (ids,scopt,subscopes@scopes) a + with Not_found -> + try + RVar (loc,List.assoc id renaming) + with Not_found -> + (* Happens for local notation joint with inductive/fixpoint defs *) + RVar (loc,id) + end + | AList (x,_,iter,terminator,lassoc) -> + (try + (* All elements of the list are in scopes (scopt,subscopes) *) + let (a,(scopt,subscopes)) = List.assoc x subst in + let termin = + subst_aconstr_in_rawconstr loc interp subst + (renaming,(ids,None,scopes)) terminator in + let l = decode_constrlist_value a in + List.fold_right (fun a t -> + subst_iterator ldots_var t + (subst_aconstr_in_rawconstr loc interp + ((x,(a,(scopt,subscopes)))::subst) + (renaming,(ids,None,scopes)) iter)) + (if lassoc then List.rev l else l) termin + with Not_found -> + anomaly "Inconsistent substitution of recursive notation") + | t -> + rawconstr_of_aconstr_with_binders loc (traverse_binder subst) + (subst_aconstr_in_rawconstr loc interp subst) + (renaming,(ids,None,scopes)) t + +let intern_notation intern (_,tmp_scope,scopes as env) loc ntn args = + let ntn,args = contract_notation ntn args in + let ((ids,c),df) = Notation.interp_notation loc ntn (tmp_scope,scopes) in + if !dump then dump_notation_location (ntn_loc loc args ntn) df; + let subst = List.map2 (fun (id,scl) a -> (id,(a,scl))) ids args in + subst_aconstr_in_rawconstr loc intern subst ([],env) c + +let set_type_scope (ids,tmp_scope,scopes) = + (ids,Some Notation.type_scope,scopes) + +let reset_tmp_scope (ids,tmp_scope,scopes) = + (ids,None,scopes) + +let rec it_mkRProd env body = + match env with + (na, bk, _, t) :: tl -> it_mkRProd tl (RProd (dummy_loc, na, bk, t, body)) + | [] -> body + +let rec it_mkRLambda env body = + match env with + (na, bk, _, t) :: tl -> it_mkRLambda tl (RLambda (dummy_loc, na, bk, t, body)) + | [] -> body + (**********************************************************************) (* Discriminating between bound variables and global references *) @@ -281,52 +462,60 @@ let find_appl_head_data (_,_,_,(_,impls)) = function | RRef (_,ref) as x -> x,implicits_of_global ref,find_arguments_scope ref,[] | x -> x,[],[],[] +let error_not_enough_arguments loc = + user_err_loc (loc,"",str "Abbreviation is not applied enough") + +let check_no_explicitation l = + let l = List.filter (fun (a,b) -> b <> None) l in + if l <> [] then + let loc = fst (Option.get (snd (List.hd l))) in + user_err_loc + (loc,"",str"Unexpected explicitation of the argument of an abbreviation") + (* Is it a global reference or a syntactic definition? *) -let intern_qualid loc qid = +let intern_qualid loc qid intern env args = try match Nametab.extended_locate qid with | TrueGlobal ref -> - if !dump then add_glob loc ref; - RRef (loc, ref) + add_glob loc ref; + RRef (loc, ref), args | SyntacticDef sp -> - Syntax_def.search_syntactic_definition loc sp + add_glob_kn loc sp; + let (ids,c) = Syntax_def.search_syntactic_definition loc sp in + let nids = List.length ids in + if List.length args < nids then error_not_enough_arguments loc; + let args1,args2 = list_chop nids args in + check_no_explicitation args1; + let subst = List.map2 (fun (id,scl) a -> (id,(fst a,scl))) ids args1 in + subst_aconstr_in_rawconstr loc intern subst ([],env) c, args2 with Not_found -> error_global_not_found_loc loc qid (* Rule out section vars since these should have been found by intern_var *) -let intern_non_secvar_qualid loc qid = - match intern_qualid loc qid with - | RRef (loc, VarRef id) -> error_global_not_found_loc loc qid +let intern_non_secvar_qualid loc qid intern env args = + match intern_qualid loc qid intern env args with + | RRef (loc, VarRef id),_ -> error_global_not_found_loc loc qid | r -> r -let intern_inductive r = - let loc,qid = qualid_of_reference r in - try match Nametab.extended_locate qid with - | TrueGlobal (IndRef ind) -> ind, [] - | TrueGlobal _ -> raise Not_found - | SyntacticDef sp -> - (match Syntax_def.search_syntactic_definition loc sp with - | RApp (_,RRef(_,IndRef ind),l) - when List.for_all (function RHole _ -> true | _ -> false) l -> - (ind, List.map (fun _ -> Anonymous) l) - | _ -> raise Not_found) - with Not_found -> - error_global_not_found_loc loc qid - -let intern_reference env lvar = function +let intern_applied_reference intern env lvar args = function | Qualid (loc, qid) -> - find_appl_head_data lvar (intern_qualid loc qid) + let r,args2 = intern_qualid loc qid intern env args in + find_appl_head_data lvar r, args2 | Ident (loc, id) -> - try intern_var env lvar loc id + try intern_var env lvar loc id, args with Not_found -> let qid = make_short_qualid id in - try find_appl_head_data lvar (intern_non_secvar_qualid loc qid) + try + let r,args2 = intern_non_secvar_qualid loc qid intern env args in + find_appl_head_data lvar r, args2 with e -> (* Extra allowance for non globalizing functions *) - if !interning_grammar then RVar (loc,id), [], [], [] + if !interning_grammar then (RVar (loc,id), [], [], []),args else raise e let interp_reference vars r = - let r,_,_,_ = intern_reference (Idset.empty,None,[]) (vars,[],[],([],[])) r + let (r,_,_,_),_ = + intern_applied_reference (fun _ -> error_not_enough_arguments dummy_loc) + (Idset.empty,None,[]) (vars,[],[],([],[])) [] r in r let apply_scope_env (ids,_,scopes) = function @@ -339,10 +528,16 @@ let rec adjust_scopes env scopes = function let (enva,scopes) = apply_scope_env env scopes in enva :: adjust_scopes env scopes args -let rec simple_adjust_scopes = function - | _,[] -> [] - | [],_::args -> None :: simple_adjust_scopes ([],args) - | sc::scopes,_::args -> sc :: simple_adjust_scopes (scopes,args) +let rec simple_adjust_scopes n = function + | [] -> if n=0 then [] else None :: simple_adjust_scopes (n-1) [] + | sc::scopes -> sc :: simple_adjust_scopes (n-1) scopes + +let find_remaining_constructor_scopes pl1 pl2 (ind,j as cstr) = + let (mib,mip) = Inductive.lookup_mind_specif (Global.env()) ind in + let npar = mib.Declarations.mind_nparams in + snd (list_chop (List.length pl1 + npar) + (simple_adjust_scopes (npar + List.length pl2) + (find_arguments_scope (ConstructRef cstr)))) (**********************************************************************) (* Cases *) @@ -368,8 +563,7 @@ let rec has_duplicate = function | x::l -> if List.mem x l then (Some x) else has_duplicate l let loc_of_lhs lhs = - join_loc (cases_pattern_expr_loc (List.hd (List.hd lhs))) - (cases_pattern_expr_loc (list_last (list_last lhs))) + join_loc (fst (List.hd lhs)) (fst (list_last lhs)) let check_linearity lhs ids = match has_duplicate ids with @@ -412,6 +606,16 @@ let message_redundant_alias (id1,id2) = (* Expanding notations *) +let error_invalid_pattern_notation loc = + user_err_loc (loc,"",str "Invalid notation for pattern") + +let chop_aconstr_constructor loc (ind,k) args = + let nparams = (fst (Global.lookup_inductive ind)).Declarations.mind_nparams in + let params,args = list_chop nparams args in + List.iter (function AHole _ -> () + | _ -> error_invalid_pattern_notation loc) params; + args + let decode_patlist_value = function | CPatCstr (_,_,l) -> l | _ -> anomaly "Ill-formed list argument of notation" @@ -445,13 +649,12 @@ let subst_cases_pattern loc alias intern subst scopes a = end | ARef (ConstructRef c) -> ([],[[], PatCstr (loc,c, [], alias)]) - | AApp (ARef (ConstructRef (ind,_ as c)),args) -> - let nparams = (fst (Global.lookup_inductive ind)).Declarations.mind_nparams in - let _,args = list_chop nparams args in + | AApp (ARef (ConstructRef cstr),args) -> + let args = chop_aconstr_constructor loc cstr args in let idslpll = List.map (aux Anonymous subst) args in let ids',pll = product_of_cases_patterns [] idslpll in let pl' = List.map (fun (subst,pl) -> - subst,PatCstr (loc,c,pl,alias)) pll in + subst,PatCstr (loc,cstr,pl,alias)) pll in ids', pl' | AList (x,_,iter,terminator,lassoc) -> (try @@ -469,65 +672,57 @@ let subst_cases_pattern loc alias intern subst scopes a = match pl with PatCstr (loc, c, pl, Anonymous) -> (subst, PatCstr (loc, c, pl, alias)) | _ -> x) v with Not_found -> anomaly "Inconsistent substitution of recursive notation") - | t -> user_err_loc (loc,"",str "Invalid notation for pattern") + | t -> error_invalid_pattern_notation loc in aux alias subst a (* Differentiating between constructors and matching variables *) type pattern_qualid_kind = - | ConstrPat of (constructor * cases_pattern list) + | ConstrPat of constructor * (identifier list * + ((identifier * identifier) list * cases_pattern) list) list | VarPat of identifier -let rec patt_of_rawterm loc cstr = - match cstr with - | RRef (_,(ConstructRef c as x)) -> - if !dump then add_glob loc x; - (c,[]) - | RApp (_,RApp(_,h,l1),l2) -> patt_of_rawterm loc (RApp(loc,h,l1@l2)) - | RApp (_,RRef(_,(ConstructRef c as x)),pl) -> - if !dump then add_glob loc x; - let (mib,_) = Inductive.lookup_mind_specif (Global.env()) (fst c) in - let npar = mib.Declarations.mind_nparams in - let (params,args) = - if List.length pl <= npar then (pl,[]) else - list_chop npar pl in - (* All parameters must be _ *) - List.iter - (function RHole _ -> () - | _ -> raise Not_found) params; - let pl' = List.map - (fun c -> - let (c,pl) = patt_of_rawterm loc c in - PatCstr(loc,c,pl,Anonymous)) args in - (c,pl') - | _ -> raise Not_found - -let find_constructor ref = +let find_constructor ref f aliases pats scopes = let (loc,qid) = qualid_of_reference ref in let gref = try extended_locate qid - with Not_found -> - raise (InternalisationError (loc,NotAConstructor ref)) in - match gref with - | SyntacticDef sp -> - let sdef = Syntax_def.search_syntactic_definition loc sp in - patt_of_rawterm loc sdef - | TrueGlobal r -> - let rec unf = function - | ConstRef cst -> - let v = Environ.constant_value (Global.env()) cst in - unf (global_of_constr v) - | ConstructRef c -> - if !dump then add_glob loc r; - c, [] - | _ -> raise Not_found - in unf r + with Not_found -> raise (InternalisationError (loc,NotAConstructor ref)) in + match gref with + | SyntacticDef sp -> + let (vars,a) = Syntax_def.search_syntactic_definition loc sp in + (match a with + | ARef (ConstructRef cstr) -> + assert (vars=[]); + cstr, [], pats + | AApp (ARef (ConstructRef cstr),args) -> + let args = chop_aconstr_constructor loc cstr args in + let nvars = List.length vars in + if List.length pats < nvars then error_not_enough_arguments loc; + let pats1,pats2 = list_chop nvars pats in + let subst = List.map2 (fun (id,scl) a -> (id,(a,scl))) vars pats1 in + let idspl1 = List.map (subst_cases_pattern loc (alias_of aliases) f subst scopes) args in + cstr, idspl1, pats2 + | _ -> raise Not_found) + + | TrueGlobal r -> + let rec unf = function + | ConstRef cst -> + let v = Environ.constant_value (Global.env()) cst in + unf (global_of_constr v) + | ConstructRef cstr -> + add_glob loc r; + cstr, [], pats + | _ -> raise Not_found + in unf r let find_pattern_variable = function | Ident (loc,id) -> id | Qualid (loc,_) as x -> raise (InternalisationError(loc,NotAConstructor x)) -let maybe_constructor ref = - try ConstrPat (find_constructor ref) +let maybe_constructor ref f aliases scopes = + try + let c,idspl1,pl2 = find_constructor ref f aliases [] scopes in + assert (pl2 = []); + ConstrPat (c,idspl1) with (* patt var does not exists globally *) | InternalisationError _ -> VarPat (find_pattern_variable ref) @@ -537,39 +732,37 @@ let maybe_constructor ref = str " is understood as a pattern variable"); VarPat (find_pattern_variable ref) -let mustbe_constructor loc ref = - try find_constructor ref +let mustbe_constructor loc ref f aliases patl scopes = + try find_constructor ref f aliases patl scopes with (Environ.NotEvaluableConst _ | Not_found) -> raise (InternalisationError (loc,NotAConstructor ref)) -let rec intern_cases_pattern genv scopes (ids,subst as aliases) tmp_scope = - function +let rec intern_cases_pattern genv scopes (ids,subst as aliases) tmp_scope pat = + let intern_pat = intern_cases_pattern genv in + match pat with | CPatAlias (loc, p, id) -> let aliases' = merge_aliases aliases id in - intern_cases_pattern genv scopes aliases' tmp_scope p + intern_pat scopes aliases' tmp_scope p | CPatCstr (loc, head, pl) -> - let c,pl0 = mustbe_constructor loc head in - let argscs = - simple_adjust_scopes (find_arguments_scope (ConstructRef c), pl) in - check_constructor_length genv loc c pl0 pl; - let idslpl = - List.map2 (intern_cases_pattern genv scopes ([],[])) argscs pl in - let (ids',pll) = product_of_cases_patterns ids idslpl in + let c,idslpl1,pl2 = mustbe_constructor loc head intern_pat aliases pl scopes in + check_constructor_length genv loc c idslpl1 pl2; + let argscs2 = find_remaining_constructor_scopes idslpl1 pl2 c in + let idslpl2 = List.map2 (intern_pat scopes ([],[])) argscs2 pl2 in + let (ids',pll) = product_of_cases_patterns ids (idslpl1@idslpl2) in let pl' = List.map (fun (subst,pl) -> - (subst, PatCstr (loc,c,pl0@pl,alias_of aliases))) pll in + (subst, PatCstr (loc,c,pl,alias_of aliases))) pll in ids',pl' | CPatNotation (loc,"- _",[CPatPrim(_,Numeral p)]) when Bigint.is_strictly_pos p -> - let np = Numeral (Bigint.neg p) in - intern_cases_pattern genv scopes aliases tmp_scope (CPatPrim(loc,np)) + intern_pat scopes aliases tmp_scope (CPatPrim(loc,Numeral(Bigint.neg p))) | CPatNotation (_,"( _ )",[a]) -> - intern_cases_pattern genv scopes aliases tmp_scope a + intern_pat scopes aliases tmp_scope a | CPatNotation (loc, ntn, args) -> let ntn,args = contract_pat_notation ntn args in let ((ids',c),df) = Notation.interp_notation loc ntn (tmp_scope,scopes) in if !dump then dump_notation_location (patntn_loc loc args ntn) df; let subst = List.map2 (fun (id,scl) a -> (id,(a,scl))) ids' args in - let ids'',pl = subst_cases_pattern loc (alias_of aliases) (intern_cases_pattern genv) subst scopes + let ids'',pl = subst_cases_pattern loc (alias_of aliases) intern_pat subst scopes c in ids@ids'', pl | CPatPrim (loc, p) -> @@ -579,13 +772,14 @@ let rec intern_cases_pattern genv scopes (ids,subst as aliases) tmp_scope = if !dump then dump_notation_location (fst (unloc loc)) df; (ids,[subst,c]) | CPatDelimiters (loc, key, e) -> - intern_cases_pattern genv (find_delimiters_scope loc key::scopes) - aliases None e + intern_pat (find_delimiters_scope loc key::scopes) aliases None e | CPatAtom (loc, Some head) -> - (match maybe_constructor head with - | ConstrPat (c,args) -> - check_constructor_length genv loc c [] []; - (ids,[subst, PatCstr (loc,c,args,alias_of aliases)]) + (match maybe_constructor head intern_pat aliases scopes with + | ConstrPat (c,idspl) -> + check_constructor_length genv loc c idspl []; + let (ids',pll) = product_of_cases_patterns ids idspl in + (ids,List.map (fun (subst,pl) -> + (subst, PatCstr (loc,c,pl,alias_of aliases))) pll) | VarPat id -> let ids,subst = merge_aliases aliases id in (ids,[subst, PatVar (loc,alias_of (ids,subst))])) @@ -593,8 +787,7 @@ let rec intern_cases_pattern genv scopes (ids,subst as aliases) tmp_scope = (ids,[subst, PatVar (loc,alias_of aliases)]) | CPatOr (loc, pl) -> assert (pl <> []); - let pl' = - List.map (intern_cases_pattern genv scopes aliases tmp_scope) pl in + let pl' = List.map (intern_pat scopes aliases tmp_scope) pl in let (idsl,pl') = List.split pl' in let ids = List.hd idsl in check_or_pat_variables loc ids (List.tl idsl); @@ -632,6 +825,44 @@ let push_name_env lvar (ids,tmpsc,scopes as env) = function check_hidden_implicit_parameters id lvar; (Idset.add id ids,tmpsc,scopes) +let push_loc_name_env lvar (ids,tmpsc,scopes as env) loc = function + | Anonymous -> env + | Name id -> + check_hidden_implicit_parameters id lvar; + dump_binding loc id; + (Idset.add id ids,tmpsc,scopes) + +let intern_typeclass_binders intern_type lvar env bl = + List.fold_left + (fun ((ids,ts,sc) as env,bl) ((loc, na), bk, ty) -> + let env = push_loc_name_env lvar env loc na in + let ty = locate_if_isevar loc na (intern_type env ty) in + (env, (na,bk,None,ty)::bl)) + env bl + +let intern_typeclass_binder intern_type lvar (env,bl) na b ty = + let ctx = (na, b, ty) in + let (fvs, bind) = Implicit_quantifiers.generalize_class_binders_raw (pi1 env) [ctx] in + let env, ifvs = intern_typeclass_binders intern_type lvar (env,bl) fvs in + intern_typeclass_binders intern_type lvar (env,ifvs) bind + +let intern_local_binder_aux intern intern_type lvar ((ids,ts,sc as env),bl) = function + | LocalRawAssum(nal,bk,ty) -> + (match bk with + | Default k -> + let (loc,na) = List.hd nal in + (* TODO: fail if several names with different implicit types *) + let ty = locate_if_isevar loc na (intern_type env ty) in + List.fold_left + (fun ((ids,ts,sc),bl) (_,na) -> + ((name_fold Idset.add na ids,ts,sc), (na,k,None,ty)::bl)) + (env,bl) nal + | TypeClass b -> + intern_typeclass_binder intern_type lvar (env,bl) (List.hd nal) b ty) + | LocalRawDef((loc,na),def) -> + ((name_fold Idset.add na ids,ts,sc), + (na,Explicit,Some(intern env def),RHole(loc,Evd.BinderType na))::bl) + (**********************************************************************) (* Utilities for application *) @@ -683,7 +914,7 @@ let extract_explicit_arg imps args = user_err_loc (loc,"",str "Argument name " ++ pr_id id ++ str " occurs more than once"); id - | ExplByPos p -> + | ExplByPos (p,_id) -> let id = try let imp = List.nth imps (p-1) in @@ -699,121 +930,54 @@ let extract_explicit_arg imps args = ((id,(loc,a))::eargs,rargs) in aux args -(**********************************************************************) -(* Syntax extensions *) - -let traverse_binder subst (renaming,(ids,tmpsc,scopes as env)) id = - try - (* Binders bound in the notation are considered first-order objects *) - let _,id' = coerce_to_id (fst (List.assoc id subst)) in - (renaming,(Idset.add id' ids,tmpsc,scopes)), id' - with Not_found -> - (* Binders not bound in the notation do not capture variables *) - (* outside the notation (i.e. in the substitution) *) - let fvs1 = List.map (fun (_,(c,_)) -> free_vars_of_constr_expr c) subst in - let fvs2 = List.map snd renaming in - let fvs = List.flatten (List.map Idset.elements fvs1) @ fvs2 in - let id' = next_ident_away id fvs in - let renaming' = if id=id' then renaming else (id,id')::renaming in - (renaming',env), id' - -let decode_constrlist_value = function - | CAppExpl (_,_,l) -> l - | _ -> anomaly "Ill-formed list argument of notation" - -let rec subst_iterator y t = function - | RVar (_,id) as x -> if id = y then t else x - | x -> map_rawconstr (subst_iterator y t) x - -let rec subst_aconstr_in_rawconstr loc interp subst (renaming,(ids,_,scopes)) = - function - | AVar id -> - begin - (* subst remembers the delimiters stack in the interpretation *) - (* of the notations *) - try - let (a,(scopt,subscopes)) = List.assoc id subst in - interp (ids,scopt,subscopes@scopes) a - with Not_found -> - try - RVar (loc,List.assoc id renaming) - with Not_found -> - (* Happens for local notation joint with inductive/fixpoint defs *) - RVar (loc,id) - end - | AList (x,_,iter,terminator,lassoc) -> - (try - (* All elements of the list are in scopes (scopt,subscopes) *) - let (a,(scopt,subscopes)) = List.assoc x subst in - let termin = - subst_aconstr_in_rawconstr loc interp subst - (renaming,(ids,None,scopes)) terminator in - let l = decode_constrlist_value a in - List.fold_right (fun a t -> - subst_iterator ldots_var t - (subst_aconstr_in_rawconstr loc interp - ((x,(a,(scopt,subscopes)))::subst) - (renaming,(ids,None,scopes)) iter)) - (if lassoc then List.rev l else l) termin - with Not_found -> - anomaly "Inconsistent substitution of recursive notation") - | t -> - rawconstr_of_aconstr_with_binders loc (traverse_binder subst) - (subst_aconstr_in_rawconstr loc interp subst) - (renaming,(ids,None,scopes)) t - -let intern_notation intern (_,tmp_scope,scopes as env) loc ntn args = - let ntn,args = contract_notation ntn args in - let ((ids,c),df) = Notation.interp_notation loc ntn (tmp_scope,scopes) in - if !dump then dump_notation_location (ntn_loc loc args ntn) df; - let subst = List.map2 (fun (id,scl) a -> (id,(a,scl))) ids args in - subst_aconstr_in_rawconstr loc intern subst ([],env) c - -let set_type_scope (ids,tmp_scope,scopes) = - (ids,Some Notation.type_scope,scopes) - -let reset_tmp_scope (ids,tmp_scope,scopes) = - (ids,None,scopes) - (**********************************************************************) (* Main loop *) -let internalise sigma globalenv env allow_soapp lvar c = +let internalise sigma globalenv env allow_patvar lvar c = let rec intern (ids,tmp_scope,scopes as env) = function | CRef ref as x -> - let (c,imp,subscopes,l) = intern_reference env lvar ref in + let (c,imp,subscopes,l),_ = + intern_applied_reference intern env lvar [] ref in (match intern_impargs c env imp subscopes l with | [] -> c | l -> RApp (constr_loc x, c, l)) | CFix (loc, (locid,iddef), dl) -> - let lf = List.map (fun (id,_,_,_,_) -> id) dl in + let lf = List.map (fun ((_, id),_,_,_,_) -> id) dl in let dl = Array.of_list dl in let n = - try - (list_index iddef lf) -1 + try list_index0 iddef lf with Not_found -> raise (InternalisationError (locid,UnboundFixName (false,iddef))) in let idl = Array.map (fun (id,(n,order),bl,ty,bd) -> let intern_ro_arg c f = - let before, after = list_chop (succ (out_some n)) bl in - let ((ids',_,_),rafter) = - List.fold_left intern_local_binder (env,[]) after in - let ro = (intern (ids', tmp_scope, scopes) c) in - f ro, List.fold_left intern_local_binder (env,rafter) before + let idx = + match n with + Some (loc, n) -> list_index0 (Name n) (List.map snd (names_of_local_assums bl)) + | None -> 0 + in + let before, after = list_chop idx bl in + let ((ids',_,_) as env',rbefore) = + List.fold_left intern_local_binder (env,[]) before in + let ro = + match c with + | None -> RStructRec + | Some c' -> f (intern (ids', tmp_scope, scopes) c') + in + let n' = Option.map (fun _ -> List.length before) n in + n', ro, List.fold_left intern_local_binder (env',rbefore) after in - let ro, ((ids',_,_),rbl) = + let n, ro, ((ids',_,_),rbl) = (match order with - CStructRec -> - RStructRec, - List.fold_left intern_local_binder (env,[]) bl - | CWfRec c -> - intern_ro_arg c (fun r -> RWfRec r) - | CMeasureRec c -> - intern_ro_arg c (fun r -> RMeasureRec r)) - in - let ids'' = List.fold_right Idset.add lf ids' in + | CStructRec -> + intern_ro_arg None (fun _ -> RStructRec) + | CWfRec c -> + intern_ro_arg (Some c) (fun r -> RWfRec r) + | CMeasureRec c -> + intern_ro_arg (Some c) (fun r -> RMeasureRec r)) + in + let ids'' = List.fold_right Idset.add lf ids' in ((n, ro), List.rev rbl, intern_type (ids',tmp_scope,scopes) ty, intern (ids'',None,scopes) bd)) dl in @@ -824,11 +988,10 @@ let internalise sigma globalenv env allow_soapp lvar c = Array.map (fun (_,_,ty,_) -> ty) idl, Array.map (fun (_,_,_,bd) -> bd) idl) | CCoFix (loc, (locid,iddef), dl) -> - let lf = List.map (fun (id,_,_,_) -> id) dl in + let lf = List.map (fun ((_, id),_,_,_) -> id) dl in let dl = Array.of_list dl in let n = - try - (list_index iddef lf) -1 + try list_index0 iddef lf with Not_found -> raise (InternalisationError (locid,UnboundFixName (true,iddef))) in @@ -846,18 +1009,18 @@ let internalise sigma globalenv env allow_soapp lvar c = Array.map (fun (_,ty,_) -> ty) idl, Array.map (fun (_,_,bd) -> bd) idl) | CArrow (loc,c1,c2) -> - RProd (loc, Anonymous, intern_type env c1, intern_type env c2) + RProd (loc, Anonymous, Explicit, intern_type env c1, intern_type env c2) | CProdN (loc,[],c2) -> intern_type env c2 - | CProdN (loc,(nal,ty)::bll,c2) -> - iterate_prod loc env ty (CProdN (loc, bll, c2)) nal + | CProdN (loc,(nal,bk,ty)::bll,c2) -> + iterate_prod loc env bk ty (CProdN (loc, bll, c2)) nal | CLambdaN (loc,[],c2) -> intern env c2 - | CLambdaN (loc,(nal,ty)::bll,c2) -> - iterate_lam loc (reset_tmp_scope env) ty (CLambdaN (loc, bll, c2)) nal - | CLetIn (loc,(_,na),c1,c2) -> + | CLambdaN (loc,(nal,bk,ty)::bll,c2) -> + iterate_lam loc (reset_tmp_scope env) bk ty (CLambdaN (loc, bll, c2)) nal + | CLetIn (loc,(loc1,na),c1,c2) -> RLetIn (loc, na, intern (reset_tmp_scope env) c1, - intern (push_name_env lvar env na) c2) + intern (push_loc_name_env lvar env loc1 na) c2) | CNotation (loc,"- _",[CPrim (_,Numeral p)]) when Bigint.is_strictly_pos p -> intern env (CPrim (loc,Numeral (Bigint.neg p))) @@ -871,22 +1034,24 @@ let internalise sigma globalenv env allow_soapp lvar c = | CDelimiters (loc, key, e) -> intern (ids,None,find_delimiters_scope loc key::scopes) e | CAppExpl (loc, (isproj,ref), args) -> - let (f,_,args_scopes,_) = intern_reference env lvar ref in + let (f,_,args_scopes,_),args = + let args = List.map (fun a -> (a,None)) args in + intern_applied_reference intern env lvar args ref in check_projection isproj (List.length args) f; - RApp (loc, f, intern_args env args_scopes args) + RApp (loc, f, intern_args env args_scopes (List.map fst args)) | CApp (loc, (isproj,f), args) -> let isproj,f,args = match f with (* Compact notations like "t.(f args') args" *) | CApp (_,(Some _,f), args') when isproj=None -> isproj,f,args'@args (* Don't compact "(f args') args" to resolve implicits separately *) | _ -> isproj,f,args in - let (c,impargs,args_scopes,l) = + let (c,impargs,args_scopes,l),args = match f with - | CRef ref -> intern_reference env lvar ref + | CRef ref -> intern_applied_reference intern env lvar args ref | CNotation (loc,ntn,[]) -> let c = intern_notation intern env loc ntn [] in - find_appl_head_data lvar c - | x -> (intern env f,[],[],[]) in + find_appl_head_data lvar c, args + | x -> (intern env f,[],[],[]), args in let args = intern_impargs c env impargs args_scopes (merge_impargs l args) in check_projection isproj (List.length args) c; @@ -894,38 +1059,36 @@ let internalise sigma globalenv env allow_soapp lvar c = (* Now compact "(f args') args" *) | RApp (loc', f', args') -> RApp (join_loc loc' loc, f',args'@args) | _ -> RApp (loc, c, args)) - | CCases (loc, rtnpo, tms, eqns) -> + | CCases (loc, sty, rtnpo, tms, eqns) -> let tms,env' = List.fold_right (fun citm (inds,env) -> let (tm,ind),nal = intern_case_item env citm in (tm,ind)::inds,List.fold_left (push_name_env lvar) env nal) tms ([],env) in - let rtnpo = option_map (intern_type env') rtnpo in + let rtnpo = Option.map (intern_type env') rtnpo in let eqns' = List.map (intern_eqn (List.length tms) env) eqns in - RCases (loc, rtnpo, tms, List.flatten eqns') + RCases (loc, sty, rtnpo, tms, List.flatten eqns') | CLetTuple (loc, nal, (na,po), b, c) -> let env' = reset_tmp_scope env in let ((b',(na',_)),ids) = intern_case_item env' (b,(na,None)) in let env'' = List.fold_left (push_name_env lvar) env ids in - let p' = option_map (intern_type env'') po in + let p' = Option.map (intern_type env'') po in RLetTuple (loc, nal, (na', p'), b', intern (List.fold_left (push_name_env lvar) env nal) c) | CIf (loc, c, (na,po), b1, b2) -> let env' = reset_tmp_scope env in let ((c',(na',_)),ids) = intern_case_item env' (c,(na,None)) in let env'' = List.fold_left (push_name_env lvar) env ids in - let p' = option_map (intern_type env'') po in + let p' = Option.map (intern_type env'') po in RIf (loc, c', (na', p'), intern env b1, intern env b2) - | CHole loc -> - RHole (loc, Evd.QuestionMark true) - | CPatVar (loc, n) when allow_soapp -> + | CHole (loc, k) -> + RHole (loc, match k with Some k -> k | None -> Evd.QuestionMark true) + | CPatVar (loc, n) when allow_patvar -> RPatVar (loc, n) - | CPatVar (loc, (false,n)) -> - error_unbound_patvar loc n | CPatVar (loc, _) -> raise (InternalisationError (loc,NegativeMetavariable)) - | CEvar (loc, n) -> - REvar (loc, n, None) + | CEvar (loc, n, l) -> + REvar (loc, n, Option.map (List.map (intern env)) l) | CSort (loc, s) -> RSort(loc,s) | CCast (loc, c1, CastConv (k, c2)) -> @@ -937,29 +1100,20 @@ let internalise sigma globalenv env allow_soapp lvar c = and intern_type env = intern (set_type_scope env) - and intern_local_binder ((ids,ts,sc as env),bl) = function - | LocalRawAssum(nal,ty) -> - let (loc,na) = List.hd nal in - (* TODO: fail if several names with different implicit types *) - let ty = locate_if_isevar loc na (intern_type env ty) in - List.fold_left - (fun ((ids,ts,sc),bl) (_,na) -> - ((name_fold Idset.add na ids,ts,sc), (na,None,ty)::bl)) - (env,bl) nal - | LocalRawDef((loc,na),def) -> - ((name_fold Idset.add na ids,ts,sc), - (na,Some(intern env def),RHole(loc,Evd.BinderType na))::bl) + and intern_local_binder env bind = + intern_local_binder_aux intern intern_type lvar env bind (* Expands a multiple pattern into a disjunction of multiple patterns *) - and intern_multiple_pattern scopes pl = + and intern_multiple_pattern scopes n (loc,pl) = let idsl_pll = List.map (intern_cases_pattern globalenv scopes ([],[]) None) pl in + check_number_of_pattern loc n pl; product_of_cases_patterns [] idsl_pll (* Expands a disjunction of multiple pattern *) - and intern_disjunctive_multiple_pattern scopes loc mpl = + and intern_disjunctive_multiple_pattern scopes loc n mpl = assert (mpl <> []); - let mpl' = List.map (intern_multiple_pattern scopes) mpl in + let mpl' = List.map (intern_multiple_pattern scopes n) mpl in let (idsl,mpl') = List.split mpl' in let ids = List.hd idsl in check_or_pat_variables loc ids (List.tl idsl); @@ -967,10 +1121,9 @@ let internalise sigma globalenv env allow_soapp lvar c = (* Expands a pattern-matching clause [lhs => rhs] *) and intern_eqn n (ids,tmp_scope,scopes) (loc,lhs,rhs) = - let eqn_ids,pll = intern_disjunctive_multiple_pattern scopes loc lhs in + let eqn_ids,pll = intern_disjunctive_multiple_pattern scopes loc n lhs in (* Linearity implies the order in ids is irrelevant *) check_linearity lhs eqn_ids; - check_number_of_pattern loc n (snd (List.hd pll)); let env_ids = List.fold_right Idset.add eqn_ids ids in List.map (fun (subst,pl) -> let rhs = replace_vars_constr_expr subst rhs in @@ -1008,23 +1161,40 @@ let internalise sigma globalenv env allow_soapp lvar c = | _, None -> Anonymous | _, Some na -> na in (tm',(na,typ)), na::ids - - and iterate_prod loc2 env ty body = function + + and iterate_prod loc2 env bk ty body nal = + let rec default env bk = function | (loc1,na)::nal -> if nal <> [] then check_capture loc1 ty na; - let body = iterate_prod loc2 (push_name_env lvar env na) ty body nal in + let body = default (push_loc_name_env lvar env loc1 na) bk nal in let ty = locate_if_isevar loc1 na (intern_type env ty) in - RProd (join_loc loc1 loc2, na, ty, body) + RProd (join_loc loc1 loc2, na, bk, ty, body) | [] -> intern_type env body - - and iterate_lam loc2 env ty body = function - | (loc1,na)::nal -> - if nal <> [] then check_capture loc1 ty na; - let body = iterate_lam loc2 (push_name_env lvar env na) ty body nal in - let ty = locate_if_isevar loc1 na (intern_type env ty) in - RLambda (join_loc loc1 loc2, na, ty, body) - | [] -> intern env body - + in + match bk with + | Default b -> default env b nal + | TypeClass b -> + let env, ibind = intern_typeclass_binder intern_type lvar + (env, []) (List.hd nal) b ty in + let body = intern_type env body in + it_mkRProd ibind body + + and iterate_lam loc2 env bk ty body nal = + let rec default env bk = function + | (loc1,na)::nal -> + if nal <> [] then check_capture loc1 ty na; + let body = default (push_loc_name_env lvar env loc1 na) bk nal in + let ty = locate_if_isevar loc1 na (intern_type env ty) in + RLambda (join_loc loc1 loc2, na, bk, ty, body) + | [] -> intern env body + in match bk with + | Default b -> default env b nal + | TypeClass b -> + let env, ibind = intern_typeclass_binder intern_type lvar + (env, []) (List.hd nal) b ty in + let body = intern env body in + it_mkRLambda ibind body + and intern_impargs c env l subscopes args = let eargs, rargs = extract_explicit_arg l args in let rec aux n impl subscopes eargs rargs = @@ -1037,10 +1207,9 @@ let internalise sigma globalenv env allow_soapp lvar c = let eargs' = List.remove_assoc id eargs in intern enva a :: aux (n+1) impl' subscopes' eargs' rargs with Not_found -> - if rargs=[] & eargs=[] & - not (List.for_all is_status_implicit impl') then - (* Less regular arguments than expected: don't complete *) - (* with implicit arguments *) + if rargs=[] & eargs=[] & not (maximal_insertion_of imp) then + (* Less regular arguments than expected: complete *) + (* with implicit arguments if maximal insertion is set *) [] else RHole (set_hole_implicit (n,get_implicit_name n l) c) :: @@ -1051,7 +1220,7 @@ let internalise sigma globalenv env allow_soapp lvar c = | (imp::impl', []) -> if eargs <> [] then (let (id,(loc,_)) = List.hd eargs in - user_err_loc (loc,"",str "Not enough non implicit + user_err_loc (loc,"",str "Not enough non implicit arguments to accept the argument bound to " ++ pr_id id)); [] | ([], rargs) -> @@ -1082,13 +1251,13 @@ let extract_ids env = Idset.empty let intern_gen isarity sigma env - ?(impls=([],[])) ?(allow_soapp=false) ?(ltacvars=([],[])) + ?(impls=([],[])) ?(allow_patvar=false) ?(ltacvars=([],[])) c = let tmp_scope = if isarity then Some Notation.type_scope else None in - internalise sigma env (extract_ids env, tmp_scope,[]) - allow_soapp (ltacvars,Environ.named_context env, [], impls) c - + internalise sigma env (extract_ids env, tmp_scope,[]) + allow_patvar (ltacvars,Environ.named_context env, [], impls) c + let intern_constr sigma env c = intern_gen false sigma env c let intern_type sigma env c = intern_gen true sigma env c @@ -1104,17 +1273,36 @@ let intern_pattern env patt = let intern_ltac isarity ltacvars sigma env c = intern_gen isarity sigma env ~ltacvars:ltacvars c +type manual_implicits = (explicitation * (bool * bool)) list + +let implicits_of_rawterm l = + let rec aux i c = + match c with + RProd (loc, na, bk, t, b) | RLambda (loc, na, bk, t, b) -> + let rest = aux (succ i) b in + if bk = Implicit then + let name = + match na with + Name id -> Some id + | Anonymous -> None + in + (ExplByPos (i, name), (true, true)) :: rest + else rest + | RLetIn (loc, na, t, b) -> aux i b + | _ -> [] + in aux 1 l + (*********************************************************************) (* Functions to parse and interpret constructions *) let interp_gen kind sigma env - ?(impls=([],[])) ?(allow_soapp=false) ?(ltacvars=([],[])) + ?(impls=([],[])) ?(allow_patvar=false) ?(ltacvars=([],[])) c = - Default.understand_gen kind sigma env - (intern_gen (kind=IsType) ~impls ~allow_soapp ~ltacvars sigma env c) + let c = intern_gen (kind=IsType) ~impls ~allow_patvar ~ltacvars sigma env c in + Default.understand_gen kind sigma env c let interp_constr sigma env c = - interp_gen (OfType None) sigma env c + interp_gen (OfType None) sigma env c let interp_type sigma env ?(impls=([],[])) c = interp_gen IsType sigma env ~impls c @@ -1128,25 +1316,46 @@ let interp_open_constr sigma env c = let interp_constr_judgment sigma env c = Default.understand_judgment sigma env (intern_constr sigma env c) - -let interp_constr_evars_gen isevars env ?(impls=([],[])) kind c = - Default.understand_tcc_evars isevars env kind - (intern_gen (kind=IsType) ~impls (Evd.evars_of !isevars) env c) - -let interp_casted_constr_evars isevars env ?(impls=([],[])) c typ = - interp_constr_evars_gen isevars env ~impls (OfType (Some typ)) c - -let interp_type_evars isevars env ?(impls=([],[])) c = - interp_constr_evars_gen isevars env IsType ~impls c - -let interp_constr_judgment_evars isevars env c = - Default.understand_judgment_tcc isevars env - (intern_constr (Evd.evars_of !isevars) env c) +let interp_constr_evars_gen_impls ?evdref + env ?(impls=([],[])) kind c = + match evdref with + | None -> + let c = intern_gen (kind=IsType) ~impls Evd.empty env c in + let imps = implicits_of_rawterm c in + Default.understand_gen kind Evd.empty env c, imps + | Some evdref -> + let c = intern_gen (kind=IsType) ~impls (Evd.evars_of !evdref) env c in + let imps = implicits_of_rawterm c in + Default.understand_tcc_evars evdref env kind c, imps + +let interp_constr_evars_gen evdref env ?(impls=([],[])) kind c = + let c = intern_gen (kind=IsType) ~impls (Evd.evars_of !evdref) env c in + Default.understand_tcc_evars evdref env kind c + +let interp_casted_constr_evars_impls ?evdref + env ?(impls=([],[])) c typ = + interp_constr_evars_gen_impls ?evdref env ~impls (OfType (Some typ)) c + +let interp_type_evars_impls ?evdref env ?(impls=([],[])) c = + interp_constr_evars_gen_impls ?evdref env IsType ~impls c + +let interp_constr_evars_impls ?evdref env ?(impls=([],[])) c = + interp_constr_evars_gen_impls ?evdref env (OfType None) ~impls c + +let interp_casted_constr_evars evdref env ?(impls=([],[])) c typ = + interp_constr_evars_gen evdref env ~impls (OfType (Some typ)) c + +let interp_type_evars evdref env ?(impls=([],[])) c = + interp_constr_evars_gen evdref env IsType ~impls c + +let interp_constr_judgment_evars evdref env c = + Default.understand_judgment_tcc evdref env + (intern_constr (Evd.evars_of !evdref) env c) type ltac_sign = identifier list * unbound_ltac_var_map let interp_constrpattern sigma env c = - pattern_of_rawconstr (intern_gen false sigma env ~allow_soapp:true c) + pattern_of_rawconstr (intern_gen false sigma env ~allow_patvar:true c) let interp_aconstr impls vars a = let env = Global.env () in @@ -1169,50 +1378,58 @@ let interp_binder sigma env na t = let t' = locate_if_isevar (loc_of_rawconstr t) na t in Default.understand_type sigma env t' -let interp_binder_evars isevars env na t = - let t = intern_gen true (Evd.evars_of !isevars) env t in +let interp_binder_evars evdref env na t = + let t = intern_gen true (Evd.evars_of !evdref) env t in let t' = locate_if_isevar (loc_of_rawconstr t) na t in - Default.understand_tcc_evars isevars env IsType t' + Default.understand_tcc_evars evdref env IsType t' open Environ open Term -let interp_context sigma env params = - List.fold_left - (fun (env,params) d -> match d with - | LocalRawAssum ([_,na],(CHole _ as t)) -> - let t = interp_binder sigma env na t in - let d = (na,None,t) in - (push_rel d env, d::params) - | LocalRawAssum (nal,t) -> - let t = interp_type sigma env t in - let ctx = list_map_i (fun i (_,na) -> (na,None,lift i t)) 0 nal in - let ctx = List.rev ctx in - (push_rel_context ctx env, ctx@params) - | LocalRawDef ((_,na),c) -> - let c = interp_constr_judgment sigma env c in - let d = (na, Some c.uj_val, c.uj_type) in - (push_rel d env,d::params)) - (env,[]) params - -let interp_context_evars isevars env params = - List.fold_left - (fun (env,params) d -> match d with - | LocalRawAssum ([_,na],(CHole _ as t)) -> - let t = interp_binder_evars isevars env na t in - let d = (na,None,t) in - (push_rel d env, d::params) - | LocalRawAssum (nal,t) -> - let t = interp_type_evars isevars env t in - let ctx = list_map_i (fun i (_,na) -> (na,None,lift i t)) 0 nal in - let ctx = List.rev ctx in - (push_rel_context ctx env, ctx@params) - | LocalRawDef ((_,na),c) -> - let c = interp_constr_judgment_evars isevars env c in - let d = (na, Some c.uj_val, c.uj_type) in - (push_rel d env,d::params)) - (env,[]) params +let my_intern_constr sigma env lvar acc c = + internalise sigma env acc false lvar c + +let my_intern_type sigma env lvar acc c = my_intern_constr sigma env lvar (set_type_scope acc) c + +let intern_context sigma env params = + let lvar = (([],[]),Environ.named_context env, [], ([], [])) in + snd (List.fold_left + (intern_local_binder_aux (my_intern_constr sigma env lvar) (my_intern_type sigma env lvar) lvar) + ((extract_ids env,None,[]), []) params) + +let interp_context_gen understand_type understand_judgment env bl = + let (env, par, _, impls) = + List.fold_left + (fun (env,params,n,impls) (na, k, b, t) -> + match b with + None -> + let t' = locate_if_isevar (loc_of_rawconstr t) na t in + let t = understand_type env t' in + let d = (na,None,t) in + let impls = + if k = Implicit then + let na = match na with Name n -> Some n | Anonymous -> None in + (ExplByPos (n, na), (true, true)) :: impls + else impls + in + (push_rel d env, d::params, succ n, impls) + | Some b -> + let c = understand_judgment env b in + let d = (na, Some c.uj_val, c.uj_type) in + (push_rel d env,d::params, succ n, impls)) + (env,[],1,[]) (List.rev bl) + in (env, par), impls +let interp_context sigma env params = + let bl = intern_context sigma env params in + interp_context_gen (Default.understand_type sigma) + (Default.understand_judgment sigma) env bl + +let interp_context_evars evdref env params = + let bl = intern_context (Evd.evars_of !evdref) env params in + interp_context_gen (fun env t -> Default.understand_tcc_evars evdref env IsType t) + (Default.understand_judgment_tcc evdref) env bl + (**********************************************************************) (* Locating reference, possibly via an abbreviation *) @@ -1221,7 +1438,7 @@ let locate_reference qid = | TrueGlobal ref -> ref | SyntacticDef kn -> match Syntax_def.search_syntactic_definition dummy_loc kn with - | Rawterm.RRef (_,ref) -> ref + | [],ARef ref -> ref | _ -> raise Not_found let is_global id = diff --git a/interp/constrintern.mli b/interp/constrintern.mli index 4479fcd4..ea7020be 100644 --- a/interp/constrintern.mli +++ b/interp/constrintern.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: constrintern.mli 9976 2007-07-12 11:58:30Z msozeau $ i*) +(*i $Id: constrintern.mli 11024 2008-05-30 12:41:39Z msozeau $ i*) (*i*) open Names @@ -45,8 +45,12 @@ type var_internalisation_data = type implicits_env = (identifier * var_internalisation_data) list type full_implicits_env = identifier list * implicits_env +type manual_implicits = (explicitation * (bool * bool)) list + type ltac_sign = identifier list * unbound_ltac_var_map +type raw_binder = (name * binding_kind * rawconstr option * rawconstr) + (*s Internalisation performs interpretation of global names and notations *) val intern_constr : evar_map -> env -> constr_expr -> rawconstr @@ -54,19 +58,21 @@ val intern_constr : evar_map -> env -> constr_expr -> rawconstr val intern_type : evar_map -> env -> constr_expr -> rawconstr val intern_gen : bool -> evar_map -> env -> - ?impls:full_implicits_env -> ?allow_soapp:bool -> ?ltacvars:ltac_sign -> + ?impls:full_implicits_env -> ?allow_patvar:bool -> ?ltacvars:ltac_sign -> constr_expr -> rawconstr val intern_pattern : env -> cases_pattern_expr -> Names.identifier list * ((Names.identifier * Names.identifier) list * Rawterm.cases_pattern) list +val intern_context : evar_map -> env -> local_binder list -> raw_binder list + (*s Composing internalisation with pretyping *) (* Main interpretation function *) val interp_gen : typing_constraint -> evar_map -> env -> - ?impls:full_implicits_env -> ?allow_soapp:bool -> ?ltacvars:ltac_sign -> + ?impls:full_implicits_env -> ?allow_patvar:bool -> ?ltacvars:ltac_sign -> constr_expr -> constr (* Particular instances *) @@ -74,14 +80,25 @@ val interp_gen : typing_constraint -> evar_map -> env -> val interp_constr : evar_map -> env -> constr_expr -> constr -val interp_casted_constr : evar_map -> env -> ?impls:full_implicits_env -> - constr_expr -> types -> constr - val interp_type : evar_map -> env -> ?impls:full_implicits_env -> constr_expr -> types val interp_open_constr : evar_map -> env -> constr_expr -> evar_map * constr +val interp_casted_constr : evar_map -> env -> ?impls:full_implicits_env -> + constr_expr -> types -> constr + +(* Accepting evars and giving back the manual implicits in addition. *) + +val interp_casted_constr_evars_impls : ?evdref:(evar_defs ref) -> env -> + ?impls:full_implicits_env -> constr_expr -> types -> constr * manual_implicits + +val interp_type_evars_impls : ?evdref:(evar_defs ref) -> env -> ?impls:full_implicits_env -> + constr_expr -> types * manual_implicits + +val interp_constr_evars_impls : ?evdref:(evar_defs ref) -> env -> ?impls:full_implicits_env -> + constr_expr -> constr * manual_implicits + val interp_casted_constr_evars : evar_defs ref -> env -> ?impls:full_implicits_env -> constr_expr -> types -> constr @@ -103,12 +120,14 @@ val interp_reference : ltac_sign -> reference -> rawconstr val interp_binder : evar_map -> env -> name -> constr_expr -> types +val interp_binder_evars : evar_defs ref -> env -> name -> constr_expr -> types + (* Interpret contexts: returns extended env and context *) -val interp_context : evar_map -> env -> local_binder list -> env * rel_context +val interp_context : evar_map -> env -> local_binder list -> (env * rel_context) * manual_implicits val interp_context_evars : - evar_defs ref -> env -> local_binder list -> env * rel_context + evar_defs ref -> env -> local_binder list -> (env * rel_context) * manual_implicits (* Locating references of constructions, possibly via a syntactic definition *) @@ -130,3 +149,5 @@ val for_grammar : ('a -> 'b) -> 'a -> 'b type coqdoc_state val coqdoc_freeze : unit -> coqdoc_state val coqdoc_unfreeze : coqdoc_state -> unit + +val add_glob : Util.loc -> global_reference -> unit diff --git a/interp/coqlib.ml b/interp/coqlib.ml index 0c3ffd0c..65e4dcd5 100644 --- a/interp/coqlib.ml +++ b/interp/coqlib.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: coqlib.ml 10067 2007-08-09 17:13:16Z msozeau $ *) +(* $Id: coqlib.ml 11072 2008-06-08 16:13:37Z herbelin $ *) open Util open Pp @@ -36,13 +36,6 @@ let coq_constant locstr dir s = constr_of_global (coq_reference locstr dir s) let gen_reference = coq_reference let gen_constant = coq_constant -let list_try_find f = - let rec try_find_f = function - | [] -> raise Not_found - | h::t -> try f h with Not_found -> try_find_f t - in - try_find_f - let has_suffix_in_dirs dirs ref = let dir = dirpath (sp_of_global ref) in List.exists (fun d -> is_dirpath_prefix_of d dir) dirs @@ -77,7 +70,7 @@ let check_required_library d = (dummy_loc,make_qualid (make_dirpath (List.rev prefix)) m) *) (* or failing ...*) - error ("Library "^(list_last d)^" has to be required first") + error ("Library "^(string_of_dirpath dir)^" has to be required first") (************************************************************************) (* Specific Coq objects *) @@ -109,13 +102,22 @@ let init_id = id_of_string "Init" let arith_id = id_of_string "Arith" let datatypes_id = id_of_string "Datatypes" -let logic_module = make_dir ["Coq";"Init";"Logic"] +let logic_module_name = ["Coq";"Init";"Logic"] +let logic_module = make_dir logic_module_name let logic_type_module = make_dir ["Coq";"Init";"Logic_Type"] let datatypes_module = make_dir ["Coq";"Init";"Datatypes"] let arith_module = make_dir ["Coq";"Arith";"Arith"] (* TODO: temporary hack *) let make_kn dir id = Libnames.encode_kn dir id +let make_con dir id = Libnames.encode_con dir id + +(** Identity *) + +let id = make_con datatypes_module (id_of_string "id") +let type_of_id = make_con datatypes_module (id_of_string "ID") + +let _ = Cases.set_impossible_default_clause (mkConst id,mkConst type_of_id) (** Natural numbers *) let nat_kn = make_kn datatypes_module (id_of_string "nat") @@ -150,8 +152,19 @@ type coq_sigma_data = { intro : constr; typ : constr } +type coq_bool_data = { + andb : constr; + andb_prop : constr; + andb_true_intro : constr} + type 'a delayed = unit -> 'a +let build_bool_type () = + { andb = init_constant ["Datatypes"] "andb"; + andb_prop = init_constant ["Datatypes"] "andb_prop"; + andb_true_intro = init_constant ["Datatypes"] "andb_true_intro" } + + let build_sigma_set () = anomaly "Use build_sigma_type" let build_sigma_type () = @@ -190,7 +203,8 @@ let coq_eq_congr = lazy_init_constant ["Logic"] "f_equal" let coq_eq_sym = lazy_init_constant ["Logic"] "sym_eq" let coq_f_equal2 = lazy_init_constant ["Logic"] "f_equal2" -let build_coq_eq_data () = { +let build_coq_eq_data () = + let _ = check_required_library logic_module_name in { eq = Lazy.force coq_eq_eq; refl = Lazy.force coq_eq_refl; ind = Lazy.force coq_eq_ind; diff --git a/interp/coqlib.mli b/interp/coqlib.mli index 7254800c..a85b6a8e 100644 --- a/interp/coqlib.mli +++ b/interp/coqlib.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: coqlib.mli 10067 2007-08-09 17:13:16Z msozeau $ i*) +(*i $Id: coqlib.mli 10180 2007-10-05 13:02:23Z vsiles $ i*) (*i*) open Names @@ -73,6 +73,7 @@ val path_of_false : constructor val glob_true : global_reference val glob_false : global_reference + (* Equality *) val glob_eq : global_reference @@ -84,6 +85,12 @@ val glob_eq : global_reference type 'a delayed = unit -> 'a +type coq_bool_data = { + andb : constr; + andb_prop : constr; + andb_true_intro : constr} +val build_bool_type : coq_bool_data delayed + (*s For Equality tactics *) type coq_sigma_data = { proj1 : constr; diff --git a/interp/genarg.ml b/interp/genarg.ml index 77ed1fe6..49c157f2 100644 --- a/interp/genarg.ml +++ b/interp/genarg.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: genarg.ml 8926 2006-06-08 20:23:17Z herbelin $ *) +(* $Id: genarg.ml 10753 2008-04-04 14:55:47Z herbelin $ *) open Pp open Util @@ -16,6 +16,7 @@ open Nametab open Rawterm open Topconstr open Term +open Evd type argument_type = (* Basic types *) @@ -44,19 +45,25 @@ type argument_type = | ExtraArgType of string type 'a and_short_name = 'a * identifier located option +type 'a or_by_notation = AN of 'a | ByNotation of loc * string + type rawconstr_and_expr = rawconstr * constr_expr option +type open_constr_expr = unit * constr_expr +type open_rawconstr = unit * rawconstr_and_expr + +type 'a with_ebindings = 'a * open_constr bindings (* Dynamics but tagged by a type expression *) -type ('a,'b) generic_argument = argument_type * Obj.t +type 'a generic_argument = argument_type * Obj.t let dyntab = ref ([] : string list) type rlevel = constr_expr type glevel = rawconstr_and_expr -type tlevel = constr +type tlevel = open_constr -type ('a,'b,'c) abstract_argument_type = argument_type +type ('a,'b) abstract_argument_type = argument_type let create_arg s = if List.mem s !dyntab then @@ -72,6 +79,8 @@ type intro_pattern_expr = | IntroWildcard | IntroIdentifier of identifier | IntroAnonymous + | IntroRewrite of bool + | IntroFresh of identifier and case_intro_pattern_expr = intro_pattern_expr list list let rec pr_intro_pattern = function @@ -79,6 +88,9 @@ let rec pr_intro_pattern = function | IntroWildcard -> str "_" | IntroIdentifier id -> pr_id id | IntroAnonymous -> str "?" + | IntroRewrite true -> str "->" + | IntroRewrite false -> str "<-" + | IntroFresh id -> str "?" ++ pr_id id and pr_case_intro_pattern = function | [pl] -> @@ -88,10 +100,6 @@ and pr_case_intro_pattern = function hv 0 (prlist_with_sep pr_bar (prlist_with_sep spc pr_intro_pattern) pll) ++ str "]" -type open_constr = Evd.evar_map * Term.constr -type open_constr_expr = unit * constr_expr -type open_rawconstr = unit * rawconstr_and_expr - let rawwit_bool = BoolArgType let globwit_bool = BoolArgType let wit_bool = BoolArgType @@ -218,7 +226,7 @@ let app_list1 f = function let app_opt f = function | (OptArgType t as u, l) -> let o = Obj.magic l in - (u, Obj.repr (option_map (fun x -> out_gen t (f (in_gen t x))) o)) + (u, Obj.repr (Option.map (fun x -> out_gen t (f (in_gen t x))) o)) | _ -> failwith "Genarg: not an opt" let app_pair f1 f2 = function diff --git a/interp/genarg.mli b/interp/genarg.mli index c4275589..3548585b 100644 --- a/interp/genarg.mli +++ b/interp/genarg.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: genarg.mli 8983 2006-06-23 13:21:49Z herbelin $ i*) +(*i $Id: genarg.mli 10753 2008-04-04 14:55:47Z herbelin $ i*) open Util open Names @@ -15,23 +15,29 @@ open Libnames open Rawterm open Topconstr open Term +open Evd type 'a and_short_name = 'a * identifier located option +type 'a or_by_notation = AN of 'a | ByNotation of loc * string + (* In globalize tactics, we need to keep the initial [constr_expr] to recompute*) (* in the environment by the effective calls to Intro, Inversion, etc *) (* The [constr_expr] field is [None] in TacDef though *) type rawconstr_and_expr = rawconstr * constr_expr option -type open_constr = Evd.evar_map * Term.constr type open_constr_expr = unit * constr_expr type open_rawconstr = unit * rawconstr_and_expr +type 'a with_ebindings = 'a * open_constr bindings + type intro_pattern_expr = | IntroOrAndPattern of case_intro_pattern_expr | IntroWildcard | IntroIdentifier of identifier | IntroAnonymous + | IntroRewrite of bool + | IntroFresh of identifier and case_intro_pattern_expr = intro_pattern_expr list list val pr_intro_pattern : intro_pattern_expr -> Pp.std_ppcmds @@ -40,21 +46,34 @@ val pr_case_intro_pattern : case_intro_pattern_expr -> Pp.std_ppcmds (* The route of a generic argument, from parsing to evaluation \begin{verbatim} - parsing in_raw out_raw - char stream ----> rawtype ----> rawconstr generic_argument ----> - | - | interp - V - type <---- constr generic_argument <---- - out in + parsing in_raw out_raw + char stream ----> rawtype ----> constr_expr generic_argument --------| + encapsulation decaps | + | + V + rawtype + | + globalization | + V + glob_type + | + encaps | + in_glob | + V + rawconstr generic_argument + | + out in out_glob | + type <--- constr generic_argument <---- type <------ rawtype <--------| + | decaps encaps interp decaps + | + V +effective use \end{verbatim} -To distinguish between the uninterpreted (raw) and the interpreted -worlds, we annotate the type [generic_argument] by a phantom argument -which is either [constr_expr] or [constr] (actually we add also a second -argument [raw_tactic_expr] and [tactic], but this is only for technical -reasons, because these types are undefined at the type of compilation -of [Genarg]). +To distinguish between the uninterpreted (raw), globalized and +interpreted worlds, we annotate the type [generic_argument] by a +phantom argument which is either [constr_expr], [rawconstr] or +[constr]. Transformation for each type : \begin{verbatim} @@ -84,147 +103,146 @@ ExtraArgType of string '_a '_b (* All of [rlevel], [glevel] and [tlevel] must be non convertible to ensure the injectivity of the type inference from type - [('co,'ta) generic_argument] to [('a,'co,'ta) abstract_argument_type] - is injective; this guarantees that, for 'b fixed, the type of + ['co generic_argument] to [('a,'co) abstract_argument_type]; + this guarantees that, for 'co fixed, the type of out_gen is monomorphic over 'a, hence type-safe *) type rlevel = constr_expr type glevel = rawconstr_and_expr -type tlevel = constr +type tlevel = open_constr -type ('a,'co,'ta) abstract_argument_type +type ('a,'co) abstract_argument_type -val rawwit_bool : (bool,rlevel,'ta) abstract_argument_type -val globwit_bool : (bool,glevel,'ta) abstract_argument_type -val wit_bool : (bool,tlevel,'ta) abstract_argument_type +val rawwit_bool : (bool,rlevel) abstract_argument_type +val globwit_bool : (bool,glevel) abstract_argument_type +val wit_bool : (bool,tlevel) abstract_argument_type -val rawwit_int : (int,rlevel,'ta) abstract_argument_type -val globwit_int : (int,glevel,'ta) abstract_argument_type -val wit_int : (int,tlevel,'ta) abstract_argument_type +val rawwit_int : (int,rlevel) abstract_argument_type +val globwit_int : (int,glevel) abstract_argument_type +val wit_int : (int,tlevel) abstract_argument_type -val rawwit_int_or_var : (int or_var,rlevel,'ta) abstract_argument_type -val globwit_int_or_var : (int or_var,glevel,'ta) abstract_argument_type -val wit_int_or_var : (int or_var,tlevel,'ta) abstract_argument_type +val rawwit_int_or_var : (int or_var,rlevel) abstract_argument_type +val globwit_int_or_var : (int or_var,glevel) abstract_argument_type +val wit_int_or_var : (int or_var,tlevel) abstract_argument_type -val rawwit_string : (string,rlevel,'ta) abstract_argument_type -val globwit_string : (string,glevel,'ta) abstract_argument_type -val wit_string : (string,tlevel,'ta) abstract_argument_type +val rawwit_string : (string,rlevel) abstract_argument_type +val globwit_string : (string,glevel) abstract_argument_type +val wit_string : (string,tlevel) abstract_argument_type -val rawwit_pre_ident : (string,rlevel,'ta) abstract_argument_type -val globwit_pre_ident : (string,glevel,'ta) abstract_argument_type -val wit_pre_ident : (string,tlevel,'ta) abstract_argument_type +val rawwit_pre_ident : (string,rlevel) abstract_argument_type +val globwit_pre_ident : (string,glevel) abstract_argument_type +val wit_pre_ident : (string,tlevel) abstract_argument_type -val rawwit_intro_pattern : (intro_pattern_expr,rlevel,'ta) abstract_argument_type -val globwit_intro_pattern : (intro_pattern_expr,glevel,'ta) abstract_argument_type -val wit_intro_pattern : (intro_pattern_expr,tlevel,'ta) abstract_argument_type +val rawwit_intro_pattern : (intro_pattern_expr,rlevel) abstract_argument_type +val globwit_intro_pattern : (intro_pattern_expr,glevel) abstract_argument_type +val wit_intro_pattern : (intro_pattern_expr,tlevel) abstract_argument_type -val rawwit_ident : (identifier,rlevel,'ta) abstract_argument_type -val globwit_ident : (identifier,glevel,'ta) abstract_argument_type -val wit_ident : (identifier,tlevel,'ta) abstract_argument_type +val rawwit_ident : (identifier,rlevel) abstract_argument_type +val globwit_ident : (identifier,glevel) abstract_argument_type +val wit_ident : (identifier,tlevel) abstract_argument_type -val rawwit_var : (identifier located,rlevel,'ta) abstract_argument_type -val globwit_var : (identifier located,glevel,'ta) abstract_argument_type -val wit_var : (identifier,tlevel,'ta) abstract_argument_type +val rawwit_var : (identifier located,rlevel) abstract_argument_type +val globwit_var : (identifier located,glevel) abstract_argument_type +val wit_var : (identifier,tlevel) abstract_argument_type -val rawwit_ref : (reference,rlevel,'ta) abstract_argument_type -val globwit_ref : (global_reference located or_var,glevel,'ta) abstract_argument_type -val wit_ref : (global_reference,tlevel,'ta) abstract_argument_type +val rawwit_ref : (reference,rlevel) abstract_argument_type +val globwit_ref : (global_reference located or_var,glevel) abstract_argument_type +val wit_ref : (global_reference,tlevel) abstract_argument_type -val rawwit_quant_hyp : (quantified_hypothesis,rlevel,'ta) abstract_argument_type -val globwit_quant_hyp : (quantified_hypothesis,glevel,'ta) abstract_argument_type -val wit_quant_hyp : (quantified_hypothesis,tlevel,'ta) abstract_argument_type +val rawwit_quant_hyp : (quantified_hypothesis,rlevel) abstract_argument_type +val globwit_quant_hyp : (quantified_hypothesis,glevel) abstract_argument_type +val wit_quant_hyp : (quantified_hypothesis,tlevel) abstract_argument_type -val rawwit_sort : (rawsort,rlevel,'ta) abstract_argument_type -val globwit_sort : (rawsort,glevel,'ta) abstract_argument_type -val wit_sort : (sorts,tlevel,'ta) abstract_argument_type +val rawwit_sort : (rawsort,rlevel) abstract_argument_type +val globwit_sort : (rawsort,glevel) abstract_argument_type +val wit_sort : (sorts,tlevel) abstract_argument_type -val rawwit_constr : (constr_expr,rlevel,'ta) abstract_argument_type -val globwit_constr : (rawconstr_and_expr,glevel,'ta) abstract_argument_type -val wit_constr : (constr,tlevel,'ta) abstract_argument_type +val rawwit_constr : (constr_expr,rlevel) abstract_argument_type +val globwit_constr : (rawconstr_and_expr,glevel) abstract_argument_type +val wit_constr : (constr,tlevel) abstract_argument_type -val rawwit_constr_may_eval : ((constr_expr,reference) may_eval,rlevel,'ta) abstract_argument_type -val globwit_constr_may_eval : ((rawconstr_and_expr,evaluable_global_reference and_short_name or_var) may_eval,glevel,'ta) abstract_argument_type -val wit_constr_may_eval : (constr,tlevel,'ta) abstract_argument_type +val rawwit_constr_may_eval : ((constr_expr,reference or_by_notation) may_eval,rlevel) abstract_argument_type +val globwit_constr_may_eval : ((rawconstr_and_expr,evaluable_global_reference and_short_name or_var) may_eval,glevel) abstract_argument_type +val wit_constr_may_eval : (constr,tlevel) abstract_argument_type -val rawwit_open_constr_gen : bool -> (open_constr_expr,rlevel,'ta) abstract_argument_type -val globwit_open_constr_gen : bool -> (open_rawconstr,glevel,'ta) abstract_argument_type -val wit_open_constr_gen : bool -> (open_constr,tlevel,'ta) abstract_argument_type +val rawwit_open_constr_gen : bool -> (open_constr_expr,rlevel) abstract_argument_type +val globwit_open_constr_gen : bool -> (open_rawconstr,glevel) abstract_argument_type +val wit_open_constr_gen : bool -> (open_constr,tlevel) abstract_argument_type -val rawwit_open_constr : (open_constr_expr,rlevel,'ta) abstract_argument_type -val globwit_open_constr : (open_rawconstr,glevel,'ta) abstract_argument_type -val wit_open_constr : (open_constr,tlevel,'ta) abstract_argument_type +val rawwit_open_constr : (open_constr_expr,rlevel) abstract_argument_type +val globwit_open_constr : (open_rawconstr,glevel) abstract_argument_type +val wit_open_constr : (open_constr,tlevel) abstract_argument_type -val rawwit_casted_open_constr : (open_constr_expr,rlevel,'ta) abstract_argument_type -val globwit_casted_open_constr : (open_rawconstr,glevel,'ta) abstract_argument_type -val wit_casted_open_constr : (open_constr,tlevel,'ta) abstract_argument_type +val rawwit_casted_open_constr : (open_constr_expr,rlevel) abstract_argument_type +val globwit_casted_open_constr : (open_rawconstr,glevel) abstract_argument_type +val wit_casted_open_constr : (open_constr,tlevel) abstract_argument_type -val rawwit_constr_with_bindings : (constr_expr with_bindings,rlevel,'ta) abstract_argument_type -val globwit_constr_with_bindings : (rawconstr_and_expr with_bindings,glevel,'ta) abstract_argument_type -val wit_constr_with_bindings : (constr with_bindings,tlevel,'ta) abstract_argument_type +val rawwit_constr_with_bindings : (constr_expr with_bindings,rlevel) abstract_argument_type +val globwit_constr_with_bindings : (rawconstr_and_expr with_bindings,glevel) abstract_argument_type +val wit_constr_with_bindings : (constr with_ebindings,tlevel) abstract_argument_type -val rawwit_bindings : (constr_expr bindings,rlevel,'ta) abstract_argument_type -val globwit_bindings : (rawconstr_and_expr bindings,glevel,'ta) abstract_argument_type -val wit_bindings : (constr bindings,tlevel,'ta) abstract_argument_type +val rawwit_bindings : (constr_expr bindings,rlevel) abstract_argument_type +val globwit_bindings : (rawconstr_and_expr bindings,glevel) abstract_argument_type +val wit_bindings : (open_constr bindings,tlevel) abstract_argument_type -val rawwit_red_expr : ((constr_expr,reference) red_expr_gen,rlevel,'ta) abstract_argument_type -val globwit_red_expr : ((rawconstr_and_expr,evaluable_global_reference and_short_name or_var) red_expr_gen,glevel,'ta) abstract_argument_type -val wit_red_expr : ((constr,evaluable_global_reference) red_expr_gen,tlevel,'ta) abstract_argument_type +val rawwit_red_expr : ((constr_expr,reference or_by_notation) red_expr_gen,rlevel) abstract_argument_type +val globwit_red_expr : ((rawconstr_and_expr,evaluable_global_reference and_short_name or_var) red_expr_gen,glevel) abstract_argument_type +val wit_red_expr : ((constr,evaluable_global_reference) red_expr_gen,tlevel) abstract_argument_type val wit_list0 : - ('a,'co,'ta) abstract_argument_type -> ('a list,'co,'ta) abstract_argument_type + ('a,'co) abstract_argument_type -> ('a list,'co) abstract_argument_type val wit_list1 : - ('a,'co,'ta) abstract_argument_type -> ('a list,'co,'ta) abstract_argument_type + ('a,'co) abstract_argument_type -> ('a list,'co) abstract_argument_type val wit_opt : - ('a,'co,'ta) abstract_argument_type -> ('a option,'co,'ta) abstract_argument_type + ('a,'co) abstract_argument_type -> ('a option,'co) abstract_argument_type val wit_pair : - ('a,'co,'ta) abstract_argument_type -> - ('b,'co,'ta) abstract_argument_type -> - ('a * 'b,'co,'ta) abstract_argument_type + ('a,'co) abstract_argument_type -> + ('b,'co) abstract_argument_type -> + ('a * 'b,'co) abstract_argument_type (* ['a generic_argument] = (Sigma t:type. t[[constr/'a]]) *) -type ('a,'b) generic_argument +type 'a generic_argument val fold_list0 : - (('a,'b) generic_argument -> 'c -> 'c) -> ('a,'b) generic_argument -> 'c -> 'c + ('a generic_argument -> 'c -> 'c) -> 'a generic_argument -> 'c -> 'c val fold_list1 : - (('a,'b) generic_argument -> 'c -> 'c) -> ('a,'b) generic_argument -> 'c -> 'c + ('a generic_argument -> 'c -> 'c) -> 'a generic_argument -> 'c -> 'c val fold_opt : - (('a,'b) generic_argument -> 'c) -> 'c -> ('a,'b) generic_argument -> 'c + ('a generic_argument -> 'c) -> 'c -> 'a generic_argument -> 'c val fold_pair : - (('a,'b) generic_argument -> ('a,'b) generic_argument -> 'c) -> - ('a,'b) generic_argument -> 'c + ('a generic_argument -> 'a generic_argument -> 'c) -> + 'a generic_argument -> 'c (* [app_list0] fails if applied to an argument not of tag [List0 t] for some [t]; it's the responsability of the caller to ensure it *) -val app_list0 : (('a,'b) generic_argument -> ('c,'d) generic_argument) -> -('a,'b) generic_argument -> ('c,'d) generic_argument +val app_list0 : ('a generic_argument -> 'b generic_argument) -> +'a generic_argument -> 'b generic_argument -val app_list1 : (('a,'b) generic_argument -> ('c,'d) generic_argument) -> -('a,'b) generic_argument -> ('c,'d) generic_argument +val app_list1 : ('a generic_argument -> 'b generic_argument) -> +'a generic_argument -> 'b generic_argument -val app_opt : (('a,'b) generic_argument -> ('c,'d) generic_argument) -> -('a,'b) generic_argument -> ('c,'d) generic_argument +val app_opt : ('a generic_argument -> 'b generic_argument) -> +'a generic_argument -> 'b generic_argument val app_pair : - (('a,'b) generic_argument -> ('c,'d) generic_argument) -> - (('a,'b) generic_argument -> ('c,'d) generic_argument) - -> ('a,'b) generic_argument -> ('c,'d) generic_argument + ('a generic_argument -> 'b generic_argument) -> + ('a generic_argument -> 'b generic_argument) + -> 'a generic_argument -> 'b generic_argument -(* Manque l'ordre supérieur, on aimerait ('co,'ta) 'a; manque aussi le - polymorphism, on aimerait que 'b et 'c restent polymorphes à l'appel - de create *) +(* create a new generic type of argument: force to associate + unique ML types at each of the three levels *) val create_arg : string -> - ('a,tlevel,'ta) abstract_argument_type - * ('globa,glevel,'globta) abstract_argument_type - * ('rawa,rlevel,'rawta) abstract_argument_type + ('a,tlevel) abstract_argument_type + * ('globa,glevel) abstract_argument_type + * ('rawa,rlevel) abstract_argument_type val exists_argtype : string -> bool @@ -254,15 +272,21 @@ type argument_type = | PairArgType of argument_type * argument_type | ExtraArgType of string -val genarg_tag : ('a,'b) generic_argument -> argument_type +val genarg_tag : 'a generic_argument -> argument_type + +val unquote : ('a,'co) abstract_argument_type -> argument_type -val unquote : ('a,'co,'ta) abstract_argument_type -> argument_type +val in_gen : + ('a,'co) abstract_argument_type -> 'a -> 'co generic_argument +val out_gen : + ('a,'co) abstract_argument_type -> 'co generic_argument -> 'a -(* We'd like - [in_generic: !b:type, !a:argument_type -> (f a) -> b generic_argument] +(* [in_generic] is used in combination with camlp4 [Gramext.action] magic - with f a = b if a is Constr, f a = c if a is Tactic, otherwise f a = |a| + [in_generic: !l:type, !a:argument_type -> |a|_l -> 'l generic_argument] + + where |a|_l is the interpretation of a at level l [in_generic] is not typable; we replace the second argument by an absurd type (with no introduction rule) @@ -270,9 +294,4 @@ val unquote : ('a,'co,'ta) abstract_argument_type -> argument_type type an_arg_of_this_type val in_generic : - argument_type -> an_arg_of_this_type -> ('a,'b) generic_argument - -val in_gen : - ('a,'co,'ta) abstract_argument_type -> 'a -> ('co,'ta) generic_argument -val out_gen : - ('a,'co,'ta) abstract_argument_type -> ('co,'ta) generic_argument -> 'a + argument_type -> an_arg_of_this_type -> 'co generic_argument diff --git a/interp/implicit_quantifiers.ml b/interp/implicit_quantifiers.ml new file mode 100644 index 00000000..d480ad39 --- /dev/null +++ b/interp/implicit_quantifiers.ml @@ -0,0 +1,285 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* true + | SyntacticDef kn -> true + +let is_global id = + try + locate_reference (make_short_qualid id) + with Not_found -> + false + +let is_freevar ids env x = + try + if Idset.mem x ids then false + else + try ignore(Environ.lookup_named x env) ; false + with _ -> not (is_global x) + with _ -> true + +(* Auxilliary functions for the inference of implicitly quantified variables. *) + +let free_vars_of_constr_expr c ?(bound=Idset.empty) l = + let found id bdvars l = + if List.mem id l then l + else if not (is_freevar bdvars (Global.env ()) id) + then l else id :: l + in + let rec aux bdvars l c = match c with + | CRef (Ident (_,id)) -> found id bdvars l + | CNotation (_, "{ _ : _ | _ }", (CRef (Ident (_, id))) :: _) when not (Idset.mem id bdvars) -> + fold_constr_expr_with_binders (fun a l -> Idset.add a l) aux (Idset.add id bdvars) l c + | c -> fold_constr_expr_with_binders (fun a l -> Idset.add a l) aux bdvars l c + in aux bound l c + +let ids_of_names l = + List.fold_left (fun acc x -> match snd x with Name na -> na :: acc | Anonymous -> acc) [] l + +let free_vars_of_binders ?(bound=Idset.empty) l (binders : local_binder list) = + let rec aux bdvars l c = match c with + ((LocalRawAssum (n, _, c)) :: tl) -> + let bound = ids_of_names n in + let l' = free_vars_of_constr_expr c ~bound:bdvars l in + aux (Idset.union (ids_of_list bound) bdvars) l' tl + + | ((LocalRawDef (n, c)) :: tl) -> + let bound = match snd n with Anonymous -> [] | Name n -> [n] in + let l' = free_vars_of_constr_expr c ~bound:bdvars l in + aux (Idset.union (ids_of_list bound) bdvars) l' tl + + | [] -> bdvars, l + in aux bound l binders + +let rec make_fresh ids env x = + if is_freevar ids env x then x else make_fresh ids env (Nameops.lift_ident x) + +let freevars_of_ids env ids = + List.filter (is_freevar env (Global.env())) ids + +let compute_constrs_freevars env constrs = + let ids = + List.rev (List.fold_left + (fun acc x -> free_vars_of_constr_expr x acc) + [] constrs) + in freevars_of_ids env ids + +(* let compute_context_freevars env ctx = *) +(* let ids = *) +(* List.rev *) +(* (List.fold_left *) +(* (fun acc (_,i,x) -> free_vars_of_constr_expr x acc) *) +(* [] constrs) *) +(* in freevars_of_ids ids *) + +let compute_constrs_freevars_binders env constrs = + let elts = compute_constrs_freevars env constrs in + List.map (fun id -> (dummy_loc, id), CHole (dummy_loc, None)) elts + +let binder_list_of_ids ids = + List.map (fun id -> LocalRawAssum ([dummy_loc, Name id], Default Implicit, CHole (dummy_loc, None))) ids + +let next_ident_away_from id avoid = make_fresh avoid (Global.env ()) id +(* let rec name_rec id = *) +(* if Idset.mem id avoid then name_rec (Nameops.lift_ident id) else id in *) +(* name_rec id *) + +let ids_of_named_context_avoiding avoid l = + List.fold_left (fun (ids, avoid) id -> + let id' = next_ident_away_from id avoid in id' :: ids, Idset.add id' avoid) + ([], avoid) (Termops.ids_of_named_context l) + +let combine_params avoid fn applied needed = + let named, applied = + List.partition + (function + (t, Some (loc, ExplByName id)) -> + if not (List.exists (fun (_, (id', _, _)) -> id = id') needed) then + user_err_loc (loc,"",str "Wrong argument name: " ++ Nameops.pr_id id); + true + | _ -> false) applied + in + let named = List.map + (fun x -> match x with (t, Some (loc, ExplByName id)) -> id, t | _ -> assert false) + named + in + let rec aux ids avoid app need = + match app, need with + [], [] -> List.rev ids, avoid + + | app, (_, (id, _, _)) :: need when List.mem_assoc id named -> + aux (List.assoc id named :: ids) avoid app need + + | (x, None) :: app, (None, (id, _, _)) :: need -> + aux (x :: ids) avoid app need + + | _, (Some cl, (id, _, _) as d) :: need -> + let t', avoid' = fn avoid d in + aux (t' :: ids) avoid' app need + + | x :: app, (None, _) :: need -> aux (fst x :: ids) avoid app need + + | [], (None, _ as decl) :: need -> + let t', avoid' = fn avoid decl in + aux (t' :: ids) avoid' app need + + | _ :: _, [] -> failwith "combine_params: overly applied typeclass" + in aux [] avoid applied needed + +let combine_params_freevar avoid applied needed = + combine_params avoid + (fun avoid (_, (id, _, _)) -> + let id' = next_ident_away_from id avoid in + (CRef (Ident (dummy_loc, id')), Idset.add id' avoid)) + applied needed + +let compute_context_vars env l = + List.fold_left (fun avoid (iid, _, c) -> + (match snd iid with Name i -> [i] | Anonymous -> []) @ (free_vars_of_constr_expr c ~bound:env avoid)) + [] l + +let destClassApp cl = + match cl with + | CApp (loc, (None,CRef ref), l) -> loc, ref, List.map fst l + | CRef ref -> loc_of_reference ref, ref, [] + | _ -> raise Not_found + +let destClassAppExpl cl = + match cl with + | CApp (loc, (None,CRef ref), l) -> loc, ref, l + | CRef ref -> loc_of_reference ref, ref, [] + | _ -> raise Not_found + +let full_class_binders env l = + let avoid = Idset.union env (ids_of_list (compute_context_vars env l)) in + let l', avoid = + List.fold_left (fun (l', avoid) (iid, bk, cl as x) -> + match bk with + Implicit -> + let (loc, id, l) = + try destClassAppExpl cl + with Not_found -> + user_err_loc (constr_loc cl, "class_binders", str"Not an applied type class") + in + let gr = Nametab.global id in + (try + let c = class_info gr in + let args, avoid = combine_params_freevar avoid l (List.rev c.cl_context) in + (iid, bk, CAppExpl (loc, (None, id), args)) :: l', avoid + with Not_found -> not_a_class (Global.env ()) (constr_of_global gr)) + | Explicit -> (x :: l', avoid)) + ([], avoid) l + in List.rev l' + +let constr_expr_of_constraint (kind, id) l = + match kind with + | Implicit -> CAppExpl (fst id, (None, Ident id), l) + | Explicit -> CApp (fst id, (None, CRef (Ident id)), + List.map (fun x -> x, None) l) + +(* | CApp of loc * (proj_flag * constr_expr) * *) +(* (constr_expr * explicitation located option) list *) + + +let constrs_of_context l = + List.map (fun (_, id, l) -> constr_expr_of_constraint id l) l + +let compute_context_freevars env ctx = + let bound, ids = + List.fold_left + (fun (bound, acc) (oid, id, x) -> + let bound = match snd oid with Name n -> Idset.add n bound | Anonymous -> bound in + bound, free_vars_of_constr_expr x ~bound acc) + (env,[]) ctx + in freevars_of_ids env (List.rev ids) + +let resolve_class_binders env l = + let ctx = full_class_binders env l in + let fv_ctx = + let elts = compute_context_freevars env ctx in + List.map (fun id -> (dummy_loc, id), CHole (dummy_loc, None)) elts + in + fv_ctx, ctx + +let generalize_class_binders env l = + let fv_ctx, cstrs = resolve_class_binders env l in + List.map (fun ((loc, id), t) -> LocalRawAssum ([loc, Name id], Default Implicit, t)) fv_ctx, + List.map (fun (iid, bk, c) -> LocalRawAssum ([iid], Default Implicit, c)) + cstrs + +let generalize_class_binders_raw env l = + let env = Idset.union env (Termops.vars_of_env (Global.env())) in + let fv_ctx, cstrs = resolve_class_binders env l in + List.map (fun ((loc, id), t) -> ((loc, Name id), Implicit, t)) fv_ctx, + List.map (fun (iid, bk, c) -> (iid, Implicit, c)) cstrs + +let ctx_of_class_binders env l = + let (x, y) = generalize_class_binders env l in x @ y + +let implicits_of_binders l = + let rec aux i l = + match l with + [] -> [] + | hd :: tl -> + let res, reslen = + match hd with + LocalRawAssum (nal, Default Implicit, t) -> + list_map_i (fun i (_,id) -> + let name = + match id with + Name id -> Some id + | Anonymous -> None + in ExplByPos (i, name), (true, true)) + i nal, List.length nal + | LocalRawAssum (nal, _, _) -> [], List.length nal + | LocalRawDef _ -> [], 1 + in res @ (aux (i + reslen) tl) + in aux 1 l + +let implicits_of_rawterm l = + let rec aux i c = + match c with + RProd (loc, na, bk, t, b) | RLambda (loc, na, bk, t, b) -> + let rest = aux (succ i) b in + if bk = Implicit then + let name = + match na with + Name id -> Some id + | Anonymous -> None + in + (ExplByPos (i, name), (true, true)) :: rest + else rest + | RLetIn (loc, na, t, b) -> aux i b + | _ -> [] + in aux 1 l diff --git a/interp/implicit_quantifiers.mli b/interp/implicit_quantifiers.mli new file mode 100644 index 00000000..ff81dc10 --- /dev/null +++ b/interp/implicit_quantifiers.mli @@ -0,0 +1,68 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Idset.t +val destClassApp : constr_expr -> loc * reference * constr_expr list +val destClassAppExpl : constr_expr -> loc * reference * (constr_expr * explicitation located option) list + +val free_vars_of_constr_expr : Topconstr.constr_expr -> + ?bound:Idset.t -> + Names.identifier list -> Names.identifier list + +val binder_list_of_ids : identifier list -> local_binder list + +val make_fresh : Names.Idset.t -> Environ.env -> identifier -> identifier + +val free_vars_of_binders : + ?bound:Idset.t -> Names.identifier list -> local_binder list -> Idset.t * Names.identifier list + +val compute_constrs_freevars : Idset.t -> constr_expr list -> identifier list +val compute_constrs_freevars_binders : Idset.t -> constr_expr list -> (identifier located * constr_expr) list +val resolve_class_binders : Idset.t -> typeclass_context -> + (identifier located * constr_expr) list * typeclass_context + +val full_class_binders : Idset.t -> typeclass_context -> typeclass_context + +val generalize_class_binders_raw : Idset.t -> typeclass_context -> + (name located * binding_kind * constr_expr) list * (name located * binding_kind * constr_expr) list + +val ctx_of_class_binders : Idset.t -> typeclass_context -> local_binder list + +val implicits_of_binders : local_binder list -> (Topconstr.explicitation * (bool * bool)) list + +val implicits_of_rawterm : Rawterm.rawconstr -> (Topconstr.explicitation * (bool * bool)) list + +val combine_params : Names.Idset.t -> + (Names.Idset.t -> (global_reference * bool) option * (Names.identifier * Term.constr option * Term.types) -> + Topconstr.constr_expr * Names.Idset.t) -> + (Topconstr.constr_expr * Topconstr.explicitation located option) list -> + ((global_reference * bool) option * Term.named_declaration) list -> + Topconstr.constr_expr list * Names.Idset.t + + +val ids_of_named_context_avoiding : Names.Idset.t -> + Sign.named_context -> Names.Idset.elt list * Names.Idset.t + diff --git a/interp/modintern.ml b/interp/modintern.ml index 71bd431d..4cc30b26 100644 --- a/interp/modintern.ml +++ b/interp/modintern.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: modintern.ml 6582 2005-01-13 14:28:56Z sacerdot $ *) +(* $Id: modintern.ml 11127 2008-06-14 15:39:46Z herbelin $ *) open Pp open Util @@ -60,20 +60,50 @@ let lookup_qualid (modtype:bool) qid = *) + +let split_modpath mp = + let rec aux = function + | MPfile dp -> dp, [] + | MPbound mbid -> + Lib.library_dp (), [id_of_mbid mbid] + | MPself msid -> Lib.library_dp (), [id_of_msid msid] + | MPdot (mp,l) -> let (mp', lab) = aux mp in + (mp', id_of_label l :: lab) + in + let (mp, l) = aux mp in + mp, l + +let dump_moddef loc mp ty = + if !Flags.dump then + let (dp, l) = split_modpath mp in + let mp = string_of_dirpath (make_dirpath l) in + Flags.dump_string (Printf.sprintf "%s %d %s %s\n" ty (fst (unloc loc)) "<>" mp) + +let rec drop_last = function [] -> assert false | hd :: [] -> [] | hd :: tl -> hd :: drop_last tl + +let dump_modref loc mp ty = + if !Flags.dump then + let (dp, l) = split_modpath mp in + let fp = string_of_dirpath dp in + let mp = string_of_dirpath (make_dirpath (drop_last l)) in + Flags.dump_string (Printf.sprintf "R%d %s %s %s %s\n" + (fst (unloc loc)) fp mp "<>" ty) + (* Search for the head of [qid] in [binders]. If found, returns the module_path/kernel_name created from the dirpath and the basename. Searches Nametab otherwise. *) - let lookup_module (loc,qid) = try - Nametab.locate_module qid + let mp = Nametab.locate_module qid in + dump_modref loc mp "modtype"; mp with | Not_found -> Modops.error_not_a_module_loc loc (string_of_qualid qid) let lookup_modtype (loc,qid) = try - Nametab.locate_modtype qid + let mp = Nametab.locate_modtype qid in + dump_modref loc mp "mod"; mp with | Not_found -> Modops.error_not_a_modtype_loc loc (string_of_qualid qid) @@ -84,20 +114,23 @@ let transl_with_decl env = function | CWith_Definition ((_,fqid),c) -> With_Definition (fqid,interp_constr Evd.empty env c) -let rec interp_modtype env = function - | CMTEident qid -> - MTEident (lookup_modtype qid) - | CMTEwith (mty,decl) -> - let mty = interp_modtype env mty in - let decl = transl_with_decl env decl in - MTEwith(mty,decl) - - let rec interp_modexpr env = function | CMEident qid -> - MEident (lookup_module qid) + MSEident (lookup_module qid) | CMEapply (me1,me2) -> let me1 = interp_modexpr env me1 in let me2 = interp_modexpr env me2 in - MEapply(me1,me2) + MSEapply(me1,me2) + +let rec interp_modtype env = function + | CMTEident qid -> + MSEident (lookup_modtype qid) + | CMTEapply (mty1,me) -> + let mty' = interp_modtype env mty1 in + let me' = interp_modexpr env me in + MSEapply(mty',me') + | CMTEwith (mty,decl) -> + let mty = interp_modtype env mty in + let decl = transl_with_decl env decl in + MSEwith(mty,decl) diff --git a/interp/modintern.mli b/interp/modintern.mli index 844450ac..c92756dc 100644 --- a/interp/modintern.mli +++ b/interp/modintern.mli @@ -6,19 +6,26 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: modintern.mli 5920 2004-07-16 20:01:26Z herbelin $ i*) +(*i $Id: modintern.mli 11065 2008-06-06 22:39:43Z msozeau $ i*) (*i*) open Declarations open Environ open Entries +open Util +open Libnames +open Names open Topconstr (*i*) (* Module expressions and module types are interpreted relatively to eventual functor or funsig arguments. *) -val interp_modtype : env -> module_type_ast -> module_type_entry +val interp_modtype : env -> module_type_ast -> module_struct_entry -val interp_modexpr : env -> module_ast -> module_expr +val interp_modexpr : env -> module_ast -> module_struct_entry +val lookup_module : qualid located -> module_path + +val dump_moddef : loc -> module_path -> string -> unit +val dump_modref : loc -> module_path -> string -> unit diff --git a/interp/notation.ml b/interp/notation.ml index 08c6f31f..98a199ad 100644 --- a/interp/notation.ml +++ b/interp/notation.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: notation.ml 9694 2007-03-09 18:09:53Z herbelin $ *) +(* $Id: notation.ml 10893 2008-05-07 09:20:43Z herbelin $ *) (*i*) open Util @@ -73,7 +73,7 @@ let init_scope_map () = let declare_scope scope = try let _ = Gmap.find scope !scope_map in () with Not_found -> -(* Options.if_verbose message ("Creating scope "^scope);*) +(* Flags.if_verbose message ("Creating scope "^scope);*) scope_map := Gmap.add scope empty_scope !scope_map let find_scope scope = @@ -133,7 +133,7 @@ let push_scopes = List.fold_right push_scope type local_scopes = tmp_scope_name option * scope_name list let make_current_scopes (tmp_scope,scopes) = - option_fold_right push_scope tmp_scope (push_scopes scopes !scope_stack) + Option.fold_right push_scope tmp_scope (push_scopes scopes !scope_stack) (**********************************************************************) (* Delimiters *) @@ -142,16 +142,16 @@ let delimiters_map = ref Gmap.empty let declare_delimiters scope key = let sc = find_scope scope in - if sc.delimiters <> None && Options.is_verbose () then begin - let old = out_some sc.delimiters in - Options.if_verbose + if sc.delimiters <> None && Flags.is_verbose () then begin + let old = Option.get sc.delimiters in + Flags.if_verbose warning ("Overwritting previous delimiting key "^old^" in scope "^scope) end; let sc = { sc with delimiters = Some key } in scope_map := Gmap.add scope sc !scope_map; if Gmap.mem key !delimiters_map then begin let oldsc = Gmap.find key !delimiters_map in - Options.if_verbose warning ("Hiding binding of key "^key^" to "^oldsc) + Flags.if_verbose warning ("Hiding binding of key "^key^" to "^oldsc) end; delimiters_map := Gmap.add key scope !delimiters_map @@ -187,10 +187,10 @@ let cases_pattern_key = function | PatCstr (_,ref,_,_) -> RefKey (ConstructRef ref) | _ -> Oth -let aconstr_key = function +let aconstr_key = function (* Rem: AApp(ARef ref,[]) stands for @ref *) | AApp (ARef ref,args) -> RefKey ref, Some (List.length args) | AList (_,_,AApp (ARef ref,args),_,_) -> RefKey ref, Some (List.length args) - | ARef ref -> RefKey ref, Some 0 + | ARef ref -> RefKey ref, None | _ -> Oth, None let pattern_key = function @@ -239,12 +239,12 @@ let delay dir int loc x = (dir, (fun () -> int loc x)) let declare_numeral_interpreter sc dir interp (patl,uninterp,inpat) = declare_prim_token_interpreter sc (fun cont loc -> function Numeral n-> delay dir interp loc n | p -> cont loc p) - (patl, (fun r -> option_map mkNumeral (uninterp r)), inpat) + (patl, (fun r -> Option.map mkNumeral (uninterp r)), inpat) let declare_string_interpreter sc dir interp (patl,uninterp,inpat) = declare_prim_token_interpreter sc (fun cont loc -> function String s -> delay dir interp loc s | p -> cont loc p) - (patl, (fun r -> option_map mkString (uninterp r)), inpat) + (patl, (fun r -> Option.map mkString (uninterp r)), inpat) let check_required_module loc sc (sp,d) = try let _ = Nametab.absolute_reference sp in () @@ -288,7 +288,7 @@ let rec find_without_delimiters find (ntn_scope,ntn) = function let declare_notation_level ntn level = if Gmap.mem ntn !notation_level_map then - error ("Notation "^ntn^" is already assigned a level"); + anomaly ("Notation "^ntn^" is already assigned a level"); notation_level_map := Gmap.add ntn level !notation_level_map let level_of_notation ntn = @@ -299,8 +299,8 @@ let level_of_notation ntn = let declare_notation_interpretation ntn scopt pat df = let scope = match scopt with Some s -> s | None -> default_scope in let sc = find_scope scope in - if Gmap.mem ntn sc.notations && Options.is_verbose () then - msg_warning (str ("Notation "^ntn^" was already used"^ + if Gmap.mem ntn sc.notations then + Flags.if_warn msg_warning (str ("Notation "^ntn^" was already used"^ (if scopt = None then "" else " in scope "^scope))); let sc = { sc with notations = Gmap.add ntn (pat,df) sc.notations } in scope_map := Gmap.add scope sc !scope_map; @@ -393,16 +393,10 @@ let uninterp_prim_token_cases_pattern c = | Some n -> (na,sc,n) with Not_found -> raise No_match -let availability_of_prim_token printer_scope local_scopes t = - let f scope = - try - (* raise Not_found if no primitive interpreter for scope *) - let interp = Hashtbl.find prim_token_interpreter_tab scope in - (* raise Not_found if no primitive interpreter for this token in scope *) - let _ = interp dummy_loc t in true - with Not_found -> false in +let availability_of_prim_token printer_scope local_scopes = + let f scope = Hashtbl.mem prim_token_interpreter_tab scope in let scopes = make_current_scopes local_scopes in - option_map snd (find_without_delimiters f (Some printer_scope,None) scopes) + Option.map snd (find_without_delimiters f (Some printer_scope,None) scopes) (* Miscellaneous *) @@ -414,6 +408,8 @@ let exists_notation_in_scope scopt ntn r = r' = r with Not_found -> false +let isAVar = function AVar _ -> true | _ -> false + (**********************************************************************) (* Mapping classes to scopes *) @@ -458,7 +454,7 @@ type arguments_scope_discharge_request = | ArgsScopeNoDischarge let load_arguments_scope _ (_,(_,r,scl)) = - List.iter (option_iter check_scope) scl; + List.iter (Option.iter check_scope) scl; arguments_scope := Refmap.add r scl !arguments_scope let cache_arguments_scope o = @@ -471,7 +467,7 @@ let discharge_arguments_scope (_,(req,r,l)) = if req = ArgsScopeNoDischarge then None else Some (req,pop_global_reference r,l) -let rebuild_arguments_scope (req,r,l) = +let rebuild_arguments_scope (_,(req,r,l)) = match req with | ArgsScopeNoDischarge -> assert false | ArgsScopeAuto -> @@ -608,21 +604,51 @@ let factorize_entries = function let is_ident s = (* Poor analysis *) String.length s <> 0 & is_letter s.[0] -let browse_notation ntn map = +let browse_notation strict ntn map = let find = if String.contains ntn ' ' then (=) ntn - else fun ntn' -> List.mem (Terminal ntn) (decompose_notation_key ntn') in + else fun ntn' -> + let toks = decompose_notation_key ntn' in + let trms = List.filter (function Terminal _ -> true | _ -> false) toks in + if strict then [Terminal ntn] = trms else List.mem (Terminal ntn) trms in let l = Gmap.fold (fun scope_name sc -> Gmap.fold (fun ntn ((_,r),df) l -> if find ntn then (ntn,(scope_name,r,df))::l else l) sc.notations) map [] in - let l = List.sort (fun x y -> Pervasives.compare (fst x) (fst y)) l in - factorize_entries l + List.sort (fun x y -> Pervasives.compare (fst x) (fst y)) l + +let global_reference_of_notation test (ntn,(sc,c,_)) = + match c with + | ARef ref when test ref -> Some (ntn,sc,ref) + | AApp (ARef ref, l) when List.for_all isAVar l & test ref -> + Some (ntn,sc,ref) + | _ -> None + +let error_ambiguous_notation loc _ntn = + user_err_loc (loc,"",str "Ambiguous notation") + +let error_notation_not_reference loc ntn = + user_err_loc (loc,"", + str "Unable to interpret " ++ quote (str ntn) ++ + str " as a reference") + +let interp_notation_as_global_reference loc test ntn = + let ntns = browse_notation true ntn !scope_map in + let refs = List.map (global_reference_of_notation test) ntns in + match Option.List.flatten refs with + | [_,_,ref] -> ref + | [] -> error_notation_not_reference loc ntn + | refs -> + let f (ntn,sc,ref) = find_default ntn !scope_stack = Some sc in + match List.filter f refs with + | [_,_,ref] -> ref + | [] -> error_notation_not_reference loc ntn + | _ -> error_ambiguous_notation loc ntn let locate_notation prraw ntn = - let ntns = browse_notation ntn !scope_map in + let ntns = factorize_entries (browse_notation false ntn !scope_map) in if ntns = [] then str "Unknown notation" else diff --git a/interp/notation.mli b/interp/notation.mli index f5c8bdac..a393aaed 100644 --- a/interp/notation.mli +++ b/interp/notation.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: notation.mli 9694 2007-03-09 18:09:53Z herbelin $ i*) +(*i $Id: notation.mli 9804 2007-04-28 13:56:03Z herbelin $ i*) (*i*) open Util @@ -93,7 +93,7 @@ val uninterp_prim_token_cases_pattern : cases_pattern -> name * scope_name * prim_token val availability_of_prim_token : - scope_name -> local_scopes -> prim_token -> delimiters option option + scope_name -> local_scopes -> delimiters option option (*s Declare and interpret back and forth a notation *) @@ -130,6 +130,9 @@ val level_of_notation : notation -> level (* raise [Not_found] if no level *) (*s** Miscellaneous *) +val interp_notation_as_global_reference : loc -> (global_reference -> bool) -> + notation -> global_reference + (* Checks for already existing notations *) val exists_notation_in_scope : scope_name option -> notation -> interpretation -> bool diff --git a/interp/reserve.ml b/interp/reserve.ml index 3ec0182b..f7496832 100644 --- a/interp/reserve.ml +++ b/interp/reserve.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: reserve.ml 9976 2007-07-12 11:58:30Z msozeau $ i*) +(*i $Id: reserve.ml 10727 2008-03-28 20:22:43Z msozeau $ i*) (* Reserved names *) @@ -54,22 +54,22 @@ open Rawterm let rec unloc = function | RVar (_,id) -> RVar (dummy_loc,id) | RApp (_,g,args) -> RApp (dummy_loc,unloc g, List.map unloc args) - | RLambda (_,na,ty,c) -> RLambda (dummy_loc,na,unloc ty,unloc c) - | RProd (_,na,ty,c) -> RProd (dummy_loc,na,unloc ty,unloc c) + | RLambda (_,na,bk,ty,c) -> RLambda (dummy_loc,na,bk,unloc ty,unloc c) + | RProd (_,na,bk,ty,c) -> RProd (dummy_loc,na,bk,unloc ty,unloc c) | RLetIn (_,na,b,c) -> RLetIn (dummy_loc,na,unloc b,unloc c) - | RCases (_,rtntypopt,tml,pl) -> - RCases (dummy_loc, - (option_map unloc rtntypopt), + | RCases (_,sty,rtntypopt,tml,pl) -> + RCases (dummy_loc,sty, + (Option.map unloc rtntypopt), List.map (fun (tm,x) -> (unloc tm,x)) tml, List.map (fun (_,idl,p,c) -> (dummy_loc,idl,p,unloc c)) pl) | RLetTuple (_,nal,(na,po),b,c) -> - RLetTuple (dummy_loc,nal,(na,option_map unloc po),unloc b,unloc c) + RLetTuple (dummy_loc,nal,(na,Option.map unloc po),unloc b,unloc c) | RIf (_,c,(na,po),b1,b2) -> - RIf (dummy_loc,unloc c,(na,option_map unloc po),unloc b1,unloc b2) + RIf (dummy_loc,unloc c,(na,Option.map unloc po),unloc b1,unloc b2) | RRec (_,fk,idl,bl,tyl,bv) -> RRec (dummy_loc,fk,idl, Array.map (List.map - (fun (na,obd,ty) -> (na,option_map unloc obd, unloc ty))) + (fun (na,k,obd,ty) -> (na,k,Option.map unloc obd, unloc ty))) bl, Array.map unloc tyl, Array.map unloc bv) @@ -85,7 +85,7 @@ let rec unloc = function let anonymize_if_reserved na t = match na with | Name id as na -> (try - if unloc t = find_reserved_type id + if not !Flags.raw_print & unloc t = find_reserved_type id then RHole (dummy_loc,Evd.BinderType na) else t with Not_found -> t) diff --git a/interp/syntax_def.ml b/interp/syntax_def.ml index 3389cd8a..884dea48 100644 --- a/interp/syntax_def.ml +++ b/interp/syntax_def.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: syntax_def.ml 7779 2006-01-03 20:33:47Z herbelin $ *) +(* $Id: syntax_def.ml 10730 2008-03-30 21:42:58Z herbelin $ *) open Util open Pp @@ -19,7 +19,7 @@ open Nameops (* Syntactic definitions. *) -let syntax_table = ref (KNmap.empty : aconstr KNmap.t) +let syntax_table = ref (KNmap.empty : interpretation KNmap.t) let _ = Summary.declare_summary "SYNTAXCONSTANT" @@ -32,28 +32,28 @@ let _ = Summary.declare_summary let add_syntax_constant kn c = syntax_table := KNmap.add kn c !syntax_table -let load_syntax_constant i ((sp,kn),(local,c,onlyparse)) = +let load_syntax_constant i ((sp,kn),(local,pat,onlyparse)) = if Nametab.exists_cci sp then errorlabstrm "cache_syntax_constant" (pr_id (basename sp) ++ str " already exists"); - add_syntax_constant kn c; + add_syntax_constant kn pat; Nametab.push_syntactic_definition (Nametab.Until i) sp kn; if not onlyparse then (* Declare it to be used as long name *) - Notation.declare_uninterpretation (Notation.SynDefRule kn) ([],c) + Notation.declare_uninterpretation (Notation.SynDefRule kn) pat -let open_syntax_constant i ((sp,kn),(_,c,onlyparse)) = +let open_syntax_constant i ((sp,kn),(_,pat,onlyparse)) = Nametab.push_syntactic_definition (Nametab.Exactly i) sp kn; if not onlyparse then (* Redeclare it to be used as (short) name in case an other (distfix) notation was declared inbetween *) - Notation.declare_uninterpretation (Notation.SynDefRule kn) ([],c) + Notation.declare_uninterpretation (Notation.SynDefRule kn) pat let cache_syntax_constant d = load_syntax_constant 1 d -let subst_syntax_constant ((sp,kn),subst,(local,c,onlyparse)) = - (local,subst_aconstr subst [] c,onlyparse) +let subst_syntax_constant ((sp,kn),subst,(local,pat,onlyparse)) = + (local,subst_interpretation subst pat,onlyparse) let classify_syntax_constant (_,(local,_,_ as o)) = if local then Dispose else Substitute o @@ -70,23 +70,30 @@ let (in_syntax_constant, out_syntax_constant) = classify_function = classify_syntax_constant; export_function = export_syntax_constant } -let declare_syntactic_definition local id onlyparse c = - let _ = add_leaf id (in_syntax_constant (local,c,onlyparse)) in () - -let rec set_loc loc _ a = - rawconstr_of_aconstr_with_binders loc (fun id e -> (id,e)) (set_loc loc) () a +let declare_syntactic_definition local id onlyparse pat = + let _ = add_leaf id (in_syntax_constant (local,pat,onlyparse)) in () let search_syntactic_definition loc kn = - set_loc loc () (KNmap.find kn !syntax_table) - -exception BoundToASyntacticDefThatIsNotARef + KNmap.find kn !syntax_table -let locate_global qid = +let locate_global_with_alias (loc,qid) = match Nametab.extended_locate qid with | TrueGlobal ref -> ref | SyntacticDef kn -> match search_syntactic_definition dummy_loc kn with - | Rawterm.RRef (_,ref) -> ref + | [],ARef ref -> ref | _ -> - errorlabstrm "" (pr_qualid qid ++ + user_err_loc (loc,"",pr_qualid qid ++ str " is bound to a notation that does not denote a reference") + +let inductive_of_reference_with_alias r = + match locate_global_with_alias (qualid_of_reference r) with + | IndRef ind -> ind + | ref -> + user_err_loc (loc_of_reference r,"global_inductive", + pr_reference r ++ spc () ++ str "is not an inductive type") + +let global_with_alias r = + let (loc,qid as lqid) = qualid_of_reference r in + try locate_global_with_alias lqid + with Not_found -> Nametab.error_global_not_found_loc loc qid diff --git a/interp/syntax_def.mli b/interp/syntax_def.mli index ac7318b5..a063caf0 100644 --- a/interp/syntax_def.mli +++ b/interp/syntax_def.mli @@ -6,27 +6,33 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: syntax_def.mli 7051 2005-05-20 15:45:51Z herbelin $ i*) +(*i $Id: syntax_def.mli 10730 2008-03-30 21:42:58Z herbelin $ i*) (*i*) open Util open Names open Topconstr open Rawterm +open Libnames (*i*) (* Syntactic definitions. *) -val declare_syntactic_definition : bool -> identifier -> bool -> aconstr +val declare_syntactic_definition : bool -> identifier -> bool -> interpretation -> unit -val search_syntactic_definition : loc -> kernel_name -> rawconstr +val search_syntactic_definition : loc -> kernel_name -> interpretation +(* [locate_global_with_alias] locates global reference possibly following + a notation if this notation has a role of aliasing; raise Not_found + if not bound in the global env; raise an error if bound to a + syntactic def that does not denote a reference *) -(* [locate_global] locates global reference possibly following a chain of - syntactic aliases; raise Not_found if not bound in the global env; - raise an error if bound to a syntactic def that does not denote a - reference *) +val locate_global_with_alias : qualid located -> global_reference -val locate_global : Libnames.qualid -> Libnames.global_reference +(* Locate a reference taking into account possible "alias" notations *) +val global_with_alias : reference -> global_reference + +(* The same for inductive types *) +val inductive_of_reference_with_alias : reference -> inductive diff --git a/interp/topconstr.ml b/interp/topconstr.ml index af147866..b858eecb 100644 --- a/interp/topconstr.ml +++ b/interp/topconstr.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: topconstr.ml 9976 2007-07-12 11:58:30Z msozeau $ *) +(* $Id: topconstr.ml 11024 2008-05-30 12:41:39Z msozeau $ *) (*i*) open Pp @@ -37,11 +37,14 @@ type aconstr = | ALambda of name * aconstr * aconstr | AProd of name * aconstr * aconstr | ALetIn of name * aconstr * aconstr - | ACases of aconstr option * + | ACases of case_style * aconstr option * (aconstr * (name * (inductive * int * name list) option)) list * (cases_pattern list * aconstr) list | ALetTuple of name list * (name * aconstr option) * aconstr * aconstr | AIf of aconstr * (name * aconstr option) * aconstr * aconstr + | ARec of fix_kind * identifier array * + (name * aconstr option * aconstr) list array * aconstr array * + aconstr array | ASort of rawsort | AHole of Evd.hole_kind | APatVar of patvar @@ -74,12 +77,12 @@ let rawconstr_of_aconstr_with_binders loc g f e = function let outerl = (ldots_var,inner)::(if swap then [x,RVar(loc,y)] else []) in subst_rawvars outerl it | ALambda (na,ty,c) -> - let e,na = name_fold_map g e na in RLambda (loc,na,f e ty,f e c) + let e,na = name_fold_map g e na in RLambda (loc,na,Explicit,f e ty,f e c) | AProd (na,ty,c) -> - let e,na = name_fold_map g e na in RProd (loc,na,f e ty,f e c) + let e,na = name_fold_map g e na in RProd (loc,na,Explicit,f e ty,f e c) | ALetIn (na,b,c) -> let e,na = name_fold_map g e na in RLetIn (loc,na,f e b,f e c) - | ACases (rtntypopt,tml,eqnl) -> + | ACases (sty,rtntypopt,tml,eqnl) -> let e',tml' = List.fold_right (fun (tm,(na,t)) (e',tml') -> let e',t' = match t with | None -> e',None @@ -94,14 +97,20 @@ let rawconstr_of_aconstr_with_binders loc g f e = function let ((idl,e),patl) = list_fold_map (cases_pattern_fold_map loc fold) ([],e) patl in (loc,idl,patl,f e rhs)) eqnl in - RCases (loc,option_map (f e') rtntypopt,tml',eqnl') + RCases (loc,sty,Option.map (f e') rtntypopt,tml',eqnl') | ALetTuple (nal,(na,po),b,c) -> let e,nal = list_fold_map (name_fold_map g) e nal in let e,na = name_fold_map g e na in - RLetTuple (loc,nal,(na,option_map (f e) po),f e b,f e c) + RLetTuple (loc,nal,(na,Option.map (f e) po),f e b,f e c) | AIf (c,(na,po),b1,b2) -> let e,na = name_fold_map g e na in - RIf (loc,f e c,(na,option_map (f e) po),f e b1,f e b2) + RIf (loc,f e c,(na,Option.map (f e) po),f e b1,f e b2) + | ARec (fk,idl,dll,tl,bl) -> + let e,idl = array_fold_map g e idl in + let e,dll = array_fold_map (list_fold_map (fun e (na,oc,b) -> + let e,na = name_fold_map g e na in + (e,(na,Explicit,Option.map (f e) oc,f e b)))) e dll in + RRec (loc,fk,idl,dll,Array.map (f e) tl,Array.map (f e) bl) | ACast (c,k) -> RCast (loc,f e c, match k with | CastConv (k,t) -> CastConv (k,f e t) @@ -131,9 +140,9 @@ let compare_rawconstr f t1 t2 = match t1,t2 with | RRef (_,r1), RRef (_,r2) -> r1 = r2 | RVar (_,v1), RVar (_,v2) -> v1 = v2 | RApp (_,f1,l1), RApp (_,f2,l2) -> f f1 f2 & List.for_all2 f l1 l2 - | RLambda (_,na1,ty1,c1), RLambda (_,na2,ty2,c2) when na1 = na2 -> + | RLambda (_,na1,bk1,ty1,c1), RLambda (_,na2,bk2,ty2,c2) when na1 = na2 && bk1 = bk2 -> f ty1 ty2 & f c1 c2 - | RProd (_,na1,ty1,c1), RProd (_,na2,ty2,c2) when na1 = na2 -> + | RProd (_,na1,bk1,ty1,c1), RProd (_,na2,bk2,ty2,c2) when na1 = na2 && bk1 = bk2 -> f ty1 ty2 & f c1 c2 | RHole _, RHole _ -> true | RSort (_,s1), RSort (_,s2) -> s1 = s2 @@ -180,25 +189,32 @@ let aconstr_and_vars_of_rawconstr a = found := ldots_var :: !found; assert lassoc; AList (x,y,AApp (AVar ldots_var,[AVar x]),aux t,lassoc) | RApp (_,g,args) -> AApp (aux g, List.map aux args) - | RLambda (_,na,ty,c) -> add_name found na; ALambda (na,aux ty,aux c) - | RProd (_,na,ty,c) -> add_name found na; AProd (na,aux ty,aux c) + | RLambda (_,na,bk,ty,c) -> add_name found na; ALambda (na,aux ty,aux c) + | RProd (_,na,bk,ty,c) -> add_name found na; AProd (na,aux ty,aux c) | RLetIn (_,na,b,c) -> add_name found na; ALetIn (na,aux b,aux c) - | RCases (_,rtntypopt,tml,eqnl) -> + | RCases (_,sty,rtntypopt,tml,eqnl) -> let f (_,idl,pat,rhs) = found := idl@(!found); (pat,aux rhs) in - ACases (option_map aux rtntypopt, + ACases (sty,Option.map aux rtntypopt, List.map (fun (tm,(na,x)) -> add_name found na; - option_iter + Option.iter (fun (_,_,_,nl) -> List.iter (add_name found) nl) x; - (aux tm,(na,option_map (fun (_,ind,n,nal) -> (ind,n,nal)) x))) tml, + (aux tm,(na,Option.map (fun (_,ind,n,nal) -> (ind,n,nal)) x))) tml, List.map f eqnl) | RLetTuple (loc,nal,(na,po),b,c) -> add_name found na; List.iter (add_name found) nal; - ALetTuple (nal,(na,option_map aux po),aux b,aux c) + ALetTuple (nal,(na,Option.map aux po),aux b,aux c) | RIf (loc,c,(na,po),b1,b2) -> add_name found na; - AIf (aux c,(na,option_map aux po),aux b1,aux b2) + AIf (aux c,(na,Option.map aux po),aux b1,aux b2) + | RRec (_,fk,idl,dll,tl,bl) -> + Array.iter (fun id -> found := id::!found) idl; + let dll = Array.map (List.map (fun (na,bk,oc,b) -> + if bk <> Explicit then + error "Binders marked as implicit not allowed in notations"; + add_name found na; (na,Option.map aux oc,aux b))) dll in + ARec (fk,idl,dll,Array.map aux tl,Array.map aux bl) | RCast (_,c,k) -> ACast (aux c, match k with CastConv (k,t) -> CastConv (k,aux t) | CastCoerce -> CastCoerce) @@ -206,9 +222,8 @@ let aconstr_and_vars_of_rawconstr a = | RHole (_,w) -> AHole w | RRef (_,r) -> ARef r | RPatVar (_,(_,n)) -> APatVar n - | RDynamic _ | RRec _ | REvar _ -> - error "Fixpoints, cofixpoints, existential variables and pattern-matching not \ -allowed in abbreviatable expressions" + | RDynamic _ | REvar _ -> + error "Existential variables not allowed in notations" (* Recognizing recursive notations *) and terminator_of_pat f1 ll1 lr1 = function @@ -304,12 +319,12 @@ let rec subst_aconstr subst bound raw = if r1' == r1 && r2' == r2 then raw else ALetIn (n,r1',r2') - | ACases (rtntypopt,rl,branches) -> - let rtntypopt' = option_smartmap (subst_aconstr subst bound) rtntypopt + | ACases (sty,rtntypopt,rl,branches) -> + let rtntypopt' = Option.smartmap (subst_aconstr subst bound) rtntypopt and rl' = list_smartmap (fun (a,(n,signopt) as x) -> let a' = subst_aconstr subst bound a in - let signopt' = option_map (fun ((indkn,i),n,nal as z) -> + let signopt' = Option.map (fun ((indkn,i),n,nal as z) -> let indkn' = subst_kn subst indkn in if indkn == indkn' then z else ((indkn',i),n,nal)) signopt in if a' == a && signopt' == signopt then x else (a',(n,signopt'))) @@ -324,23 +339,34 @@ let rec subst_aconstr subst bound raw = in if rtntypopt' == rtntypopt && rtntypopt == rtntypopt' & rl' == rl && branches' == branches then raw else - ACases (rtntypopt',rl',branches') + ACases (sty,rtntypopt',rl',branches') | ALetTuple (nal,(na,po),b,c) -> - let po' = option_smartmap (subst_aconstr subst bound) po + let po' = Option.smartmap (subst_aconstr subst bound) po and b' = subst_aconstr subst bound b and c' = subst_aconstr subst bound c in if po' == po && b' == b && c' == c then raw else ALetTuple (nal,(na,po'),b',c') | AIf (c,(na,po),b1,b2) -> - let po' = option_smartmap (subst_aconstr subst bound) po + let po' = Option.smartmap (subst_aconstr subst bound) po and b1' = subst_aconstr subst bound b1 and b2' = subst_aconstr subst bound b2 and c' = subst_aconstr subst bound c in if po' == po && b1' == b1 && b2' == b2 && c' == c then raw else AIf (c',(na,po'),b1',b2') + | ARec (fk,idl,dll,tl,bl) -> + let dll' = + array_smartmap (list_smartmap (fun (na,oc,b as x) -> + let oc' = Option.smartmap (subst_aconstr subst bound) oc in + let b' = subst_aconstr subst bound b in + if oc' == oc && b' == b then x else (na,oc',b'))) dll in + let tl' = array_smartmap (subst_aconstr subst bound) tl in + let bl' = array_smartmap (subst_aconstr subst bound) bl in + if dll' == dll && tl' == tl && bl' == bl then raw else + ARec (fk,idl,dll',tl',bl') + | APatVar _ | ASort _ -> raw | AHole (Evd.ImplicitArg (ref,i)) -> @@ -348,7 +374,8 @@ let rec subst_aconstr subst bound raw = if ref' == ref then raw else AHole (Evd.InternalHole) | AHole (Evd.BinderType _ | Evd.QuestionMark _ | Evd.CasesType - | Evd.InternalHole | Evd.TomatchTypeParameter _) -> raw + | Evd.InternalHole | Evd.TomatchTypeParameter _ | Evd.GoalEvar + | Evd.ImpossibleCase) -> raw | ACast (r1,k) -> match k with @@ -362,13 +389,15 @@ let rec subst_aconstr subst bound raw = if r1' == r1 then raw else ACast (r1',CastCoerce) +let subst_interpretation subst (metas,pat) = + (metas,subst_aconstr subst (List.map fst metas) pat) let encode_list_value l = RApp (dummy_loc,RVar (dummy_loc,ldots_var),l) (* Pattern-matching rawconstr and aconstr *) let abstract_return_type_context pi mklam tml rtno = - option_map (fun rtn -> + Option.map (fun rtn -> let nal = List.flatten (List.map (fun (_,(na,t)) -> match t with Some x -> (pi x)@[na] | None -> [na]) tml) in @@ -377,7 +406,7 @@ let abstract_return_type_context pi mklam tml rtno = let abstract_return_type_context_rawconstr = abstract_return_type_context (fun (_,_,_,nal) -> nal) - (fun na c -> RLambda(dummy_loc,na,RHole(dummy_loc,Evd.InternalHole),c)) + (fun na c -> RLambda(dummy_loc,na,Explicit,RHole(dummy_loc,Evd.InternalHole),c)) let abstract_return_type_context_aconstr = abstract_return_type_context pi3 @@ -409,6 +438,14 @@ let bind_env alp sigma var v = (* TODO: handle the case of multiple occs in different scopes *) (var,v)::sigma +let match_fix_kind fk1 fk2 = + match (fk1,fk2) with + | RCoFix n1, RCoFix n2 -> n1 = n2 + | RFix (nl1,n1), RFix (nl2,n2) -> + n1 = n2 && + array_for_all2 (fun (n1,_) (n2,_) -> n2 = None || n1 = n2) nl1 nl2 + | _ -> false + let match_opt f sigma t1 t2 = match (t1,t2) with | None, None -> sigma | Some t1, Some t2 -> f sigma t1 t2 @@ -435,29 +472,34 @@ let rec match_ alp metas sigma a1 a2 = match (a1,a2) with | RVar (_,id1), AVar id2 when alpha_var id1 id2 alp -> sigma | RRef (_,r1), ARef r2 when r1 = r2 -> sigma | RPatVar (_,(_,n1)), APatVar n2 when n1=n2 -> sigma - | RApp (_,f1,l1), AApp (f2,l2) when List.length l1 = List.length l2 -> + | RApp (loc,f1,l1), AApp (f2,l2) -> + let n1 = List.length l1 and n2 = List.length l2 in + let f1,l1,f2,l2 = + if n1 < n2 then + let l21,l22 = list_chop (n2-n1) l2 in f1,l1, AApp (f2,l21), l22 + else if n1 > n2 then + let l11,l12 = list_chop (n1-n2) l1 in RApp (loc,f1,l11),l12, f2,l2 + else f1,l1, f2, l2 in List.fold_left2 (match_ alp metas) (match_ alp metas sigma f1 f2) l1 l2 | RApp (_,f1,l1), AList (x,_,(AApp (f2,l2) as iter),termin,lassoc) when List.length l1 = List.length l2 -> match_alist alp metas sigma (f1::l1) (f2::l2) x iter termin lassoc - | RLambda (_,na1,t1,b1), ALambda (na2,t2,b2) -> + | RLambda (_,na1,_,t1,b1), ALambda (na2,t2,b2) -> match_binders alp metas na1 na2 (match_ alp metas sigma t1 t2) b1 b2 - | RProd (_,na1,t1,b1), AProd (na2,t2,b2) -> + | RProd (_,na1,_,t1,b1), AProd (na2,t2,b2) -> match_binders alp metas na1 na2 (match_ alp metas sigma t1 t2) b1 b2 | RLetIn (_,na1,t1,b1), ALetIn (na2,t2,b2) -> match_binders alp metas na1 na2 (match_ alp metas sigma t1 t2) b1 b2 - | RCases (_,rtno1,tml1,eqnl1), ACases (rtno2,tml2,eqnl2) - when List.length tml1 = List.length tml2 + | RCases (_,sty1,rtno1,tml1,eqnl1), ACases (sty2,rtno2,tml2,eqnl2) + when sty1 = sty2 + & List.length tml1 = List.length tml2 & List.length eqnl1 = List.length eqnl2 -> let rtno1' = abstract_return_type_context_rawconstr tml1 rtno1 in let rtno2' = abstract_return_type_context_aconstr tml2 rtno2 in - let sigma = option_fold_left2 (match_ alp metas) sigma rtno1' rtno2' in + let sigma = Option.fold_left2 (match_ alp metas) sigma rtno1' rtno2' in let sigma = List.fold_left2 (fun s (tm1,_) (tm2,_) -> match_ alp metas s tm1 tm2) sigma tml1 tml2 in List.fold_left2 (match_equations alp metas) sigma eqnl1 eqnl2 - | RIf (_,a1,(na1,to1),b1,c1), AIf (a2,(na2,to2),b2,c2) -> - let sigma = match_opt (match_binders alp metas na1 na2) sigma to1 to2 in - List.fold_left2 (match_ alp metas) sigma [a1;b1;c1] [a2;b2;c2] | RLetTuple (_,nal1,(na1,to1),b1,c1), ALetTuple (nal2,(na2,to2),b2,c2) when List.length nal1 = List.length nal2 -> let sigma = match_opt (match_binders alp metas na1 na2) sigma to1 to2 in @@ -465,6 +507,22 @@ let rec match_ alp metas sigma a1 a2 = match (a1,a2) with let (alp,sigma) = List.fold_left2 (match_names metas) (alp,sigma) nal1 nal2 in match_ alp metas sigma c1 c2 + | RIf (_,a1,(na1,to1),b1,c1), AIf (a2,(na2,to2),b2,c2) -> + let sigma = match_opt (match_binders alp metas na1 na2) sigma to1 to2 in + List.fold_left2 (match_ alp metas) sigma [a1;b1;c1] [a2;b2;c2] + | RRec (_,fk1,idl1,dll1,tl1,bl1), ARec (fk2,idl2,dll2,tl2,bl2) + when match_fix_kind fk1 fk2 & Array.length idl1 = Array.length idl2 & + array_for_all2 (fun l1 l2 -> List.length l1 = List.length l2) dll1 dll2 + -> + let alp,sigma = array_fold_left2 + (List.fold_left2 (fun (alp,sigma) (na1,_,oc1,b1) (na2,oc2,b2) -> + let sigma = + match_ alp metas (match_opt (match_ alp metas) sigma oc1 oc2) b1 b2 + in match_names metas (alp,sigma) na1 na2)) (alp,sigma) dll1 dll2 in + let sigma = array_fold_left2 (match_ alp metas) sigma tl1 tl2 in + let alp,sigma = array_fold_right2 (fun id1 id2 alsig -> + match_names metas alsig (Name id1) (Name id2)) idl1 idl2 (alp,sigma) in + array_fold_left2 (match_ alp metas) sigma bl1 bl2 | RCast(_,c1, CastConv(_,t1)), ACast(c2, CastConv (_,t2)) -> match_ alp metas (match_ alp metas sigma c1 c2) t1 t2 | RCast(_,c1, CastCoerce), ACast(c2, CastCoerce) -> @@ -530,7 +588,9 @@ let match_aconstr c (metas_scl,pat) = type notation = string -type explicitation = ExplByPos of int | ExplByName of identifier +type explicitation = ExplByPos of int * identifier option | ExplByName of identifier + +type binder_kind = Default of binding_kind | TypeClass of binding_kind type proj_flag = int option (* [Some n] = proj of the n-th visible argument *) @@ -550,22 +610,22 @@ type constr_expr = | CFix of loc * identifier located * fixpoint_expr list | CCoFix of loc * identifier located * cofixpoint_expr list | CArrow of loc * constr_expr * constr_expr - | CProdN of loc * (name located list * constr_expr) list * constr_expr - | CLambdaN of loc * (name located list * constr_expr) list * constr_expr + | CProdN of loc * (name located list * binder_kind * constr_expr) list * constr_expr + | CLambdaN of loc * (name located list * binder_kind * constr_expr) list * constr_expr | CLetIn of loc * name located * constr_expr * constr_expr | CAppExpl of loc * (proj_flag * reference) * constr_expr list | CApp of loc * (proj_flag * constr_expr) * (constr_expr * explicitation located option) list - | CCases of loc * constr_expr option * + | CCases of loc * case_style * constr_expr option * (constr_expr * (name option * constr_expr option)) list * - (loc * cases_pattern_expr list list * constr_expr) list + (loc * cases_pattern_expr list located list * constr_expr) list | CLetTuple of loc * name list * (name option * constr_expr option) * constr_expr * constr_expr | CIf of loc * constr_expr * (name option * constr_expr option) * constr_expr * constr_expr - | CHole of loc + | CHole of loc * Evd.hole_kind option | CPatVar of loc * (bool * patvar) - | CEvar of loc * existential_key + | CEvar of loc * existential_key * constr_expr list option | CSort of loc * rawsort | CCast of loc * constr_expr * constr_expr cast_type | CNotation of loc * notation * constr_expr list @@ -573,16 +633,19 @@ type constr_expr = | CDelimiters of loc * string * constr_expr | CDynamic of loc * Dyn.t - and fixpoint_expr = - identifier * (int option * recursion_order_expr) * local_binder list * constr_expr * constr_expr + identifier located * (identifier located option * recursion_order_expr) * local_binder list * constr_expr * constr_expr and local_binder = | LocalRawDef of name located * constr_expr - | LocalRawAssum of name located list * constr_expr + | LocalRawAssum of name located list * binder_kind * constr_expr + +and typeclass_constraint = name located * binding_kind * constr_expr + +and typeclass_context = typeclass_constraint list and cofixpoint_expr = - identifier * local_binder list * constr_expr * constr_expr + identifier located * local_binder list * constr_expr * constr_expr and recursion_order_expr = | CStructRec @@ -592,21 +655,23 @@ and recursion_order_expr = (***********************) (* For binders parsing *) +let default_binder_kind = Default Explicit + let rec local_binders_length = function | [] -> 0 | LocalRawDef _::bl -> 1 + local_binders_length bl - | LocalRawAssum (idl,_)::bl -> List.length idl + local_binders_length bl + | LocalRawAssum (idl,_,_)::bl -> List.length idl + local_binders_length bl let rec local_assums_length = function | [] -> 0 | LocalRawDef _::bl -> local_binders_length bl - | LocalRawAssum (idl,_)::bl -> List.length idl + local_binders_length bl + | LocalRawAssum (idl,_,_)::bl -> List.length idl + local_binders_length bl let names_of_local_assums bl = - List.flatten (List.map (function LocalRawAssum(l,_)->l|_->[]) bl) + List.flatten (List.map (function LocalRawAssum(l,_,_)->l|_->[]) bl) let names_of_local_binders bl = - List.flatten (List.map (function LocalRawAssum(l,_)->l|LocalRawDef(l,_)->[l]) bl) + List.flatten (List.map (function LocalRawAssum(l,_,_)->l|LocalRawDef(l,_)->[l]) bl) (**********************************************************************) (* Functions on constr_expr *) @@ -622,12 +687,12 @@ let constr_loc = function | CLetIn (loc,_,_,_) -> loc | CAppExpl (loc,_,_) -> loc | CApp (loc,_,_) -> loc - | CCases (loc,_,_,_) -> loc + | CCases (loc,_,_,_,_) -> loc | CLetTuple (loc,_,_,_,_) -> loc | CIf (loc,_,_,_,_) -> loc - | CHole loc -> loc + | CHole (loc, _) -> loc | CPatVar (loc,_) -> loc - | CEvar (loc,_) -> loc + | CEvar (loc,_,_) -> loc | CSort (loc,_) -> loc | CCast (loc,_,_) -> loc | CNotation (loc,_,_) -> loc @@ -663,8 +728,8 @@ let ids_of_cases_indtype = let ids_of_cases_tomatch tms = List.fold_right (fun (_,(ona,indnal)) l -> - option_fold_right (fun t -> (@) (ids_of_cases_indtype t)) - indnal (option_fold_right name_cons ona l)) + Option.fold_right (fun t -> (@) (ids_of_cases_indtype t)) + indnal (Option.fold_right name_cons ona l)) tms [] let is_constructor id = @@ -680,11 +745,13 @@ let rec cases_pattern_fold_names f a = function | CPatPrim _ | CPatAtom _ -> a let ids_of_pattern_list = - List.fold_left (List.fold_left (cases_pattern_fold_names Idset.add)) + List.fold_left + (located_fold_left + (List.fold_left (cases_pattern_fold_names Idset.add))) Idset.empty let rec fold_constr_expr_binders g f n acc b = function - | (nal,t)::l -> + | (nal,bk,t)::l -> let nal = snd (List.split nal) in let n' = List.fold_right (name_fold g) nal n in f n (fold_constr_expr_binders g f n' acc b l) t @@ -692,7 +759,7 @@ let rec fold_constr_expr_binders g f n acc b = function f n acc b let rec fold_local_binders g f n acc b = function - | LocalRawAssum (nal,t)::l -> + | LocalRawAssum (nal,bk,t)::l -> let nal = snd (List.split nal) in let n' = List.fold_right (name_fold g) nal n in f n (fold_local_binders g f n' acc b l) t @@ -706,28 +773,28 @@ let fold_constr_expr_with_binders g f n acc = function | CAppExpl (loc,(_,_),l) -> List.fold_left (f n) acc l | CApp (loc,(_,t),l) -> List.fold_left (f n) (f n acc t) (List.map fst l) | CProdN (_,l,b) | CLambdaN (_,l,b) -> fold_constr_expr_binders g f n acc b l - | CLetIn (_,na,a,b) -> fold_constr_expr_binders g f n acc b [[na],a] + | CLetIn (_,na,a,b) -> fold_constr_expr_binders g f n acc b [[na],default_binder_kind,a] | CCast (loc,a,CastConv(_,b)) -> f n (f n acc a) b | CCast (loc,a,CastCoerce) -> f n acc a | CNotation (_,_,l) -> List.fold_left (f n) acc l | CDelimiters (loc,_,a) -> f n acc a | CHole _ | CEvar _ | CPatVar _ | CSort _ | CPrim _ | CDynamic _ | CRef _ -> acc - | CCases (loc,rtnpo,al,bl) -> + | CCases (loc,sty,rtnpo,al,bl) -> let ids = ids_of_cases_tomatch al in - let acc = option_fold_left (f (List.fold_right g ids n)) acc rtnpo in + let acc = Option.fold_left (f (List.fold_right g ids n)) acc rtnpo in let acc = List.fold_left (f n) acc (List.map fst al) in List.fold_right (fun (loc,patl,rhs) acc -> let ids = ids_of_pattern_list patl in f (Idset.fold g ids n) acc rhs) bl acc | CLetTuple (loc,nal,(ona,po),b,c) -> let n' = List.fold_right (name_fold g) nal n in - f (option_fold_right (name_fold g) ona n') (f n acc b) c + f (Option.fold_right (name_fold g) ona n') (f n acc b) c | CIf (_,c,(ona,po),b1,b2) -> let acc = f n (f n (f n acc b1) b2) c in - option_fold_left (f (option_fold_right (name_fold g) ona n)) acc po + Option.fold_left (f (Option.fold_right (name_fold g) ona n)) acc po | CFix (loc,_,l) -> - let n' = List.fold_right (fun (id,_,_,_,_) -> g id) l n in + let n' = List.fold_right (fun ((_,id),_,_,_,_) -> g id) l n in List.fold_right (fun (_,(_,o),lb,t,c) acc -> fold_local_binders g f n' (fold_local_binders g f n acc t lb) c lb) l acc @@ -746,22 +813,40 @@ let mkIdentC id = CRef (Ident (dummy_loc, id)) let mkRefC r = CRef r let mkAppC (f,l) = CApp (dummy_loc, (None,f), List.map (fun x -> (x,None)) l) let mkCastC (a,k) = CCast (dummy_loc,a,k) -let mkLambdaC (idl,a,b) = CLambdaN (dummy_loc,[idl,a],b) +let mkLambdaC (idl,bk,a,b) = CLambdaN (dummy_loc,[idl,bk,a],b) let mkLetInC (id,a,b) = CLetIn (dummy_loc,id,a,b) -let mkProdC (idl,a,b) = CProdN (dummy_loc,[idl,a],b) +let mkProdC (idl,bk,a,b) = CProdN (dummy_loc,[idl,bk,a],b) + +let rec mkCProdN loc bll c = + match bll with + | LocalRawAssum ((loc1,_)::_ as idl,bk,t) :: bll -> + CProdN (loc,[idl,bk,t],mkCProdN (join_loc loc1 loc) bll c) + | LocalRawDef ((loc1,_) as id,b) :: bll -> + CLetIn (loc,id,b,mkCProdN (join_loc loc1 loc) bll c) + | [] -> c + | LocalRawAssum ([],_,_) :: bll -> mkCProdN loc bll c + +let rec mkCLambdaN loc bll c = + match bll with + | LocalRawAssum ((loc1,_)::_ as idl,bk,t) :: bll -> + CLambdaN (loc,[idl,bk,t],mkCLambdaN (join_loc loc1 loc) bll c) + | LocalRawDef ((loc1,_) as id,b) :: bll -> + CLetIn (loc,id,b,mkCLambdaN (join_loc loc1 loc) bll c) + | [] -> c + | LocalRawAssum ([],_,_) :: bll -> mkCLambdaN loc bll c let rec abstract_constr_expr c = function | [] -> c | LocalRawDef (x,b)::bl -> mkLetInC(x,b,abstract_constr_expr c bl) - | LocalRawAssum (idl,t)::bl -> - List.fold_right (fun x b -> mkLambdaC([x],t,b)) idl + | LocalRawAssum (idl,bk,t)::bl -> + List.fold_right (fun x b -> mkLambdaC([x],bk,t,b)) idl (abstract_constr_expr c bl) let rec prod_constr_expr c = function | [] -> c | LocalRawDef (x,b)::bl -> mkLetInC(x,b,prod_constr_expr c bl) - | LocalRawAssum (idl,t)::bl -> - List.fold_right (fun x b -> mkProdC([x],t,b)) idl + | LocalRawAssum (idl,bk,t)::bl -> + List.fold_right (fun x b -> mkProdC([x],bk,t,b)) idl (prod_constr_expr c bl) let coerce_to_id = function @@ -776,15 +861,15 @@ let map_binder g e nal = List.fold_right (fun (_,na) -> name_fold g na) nal e let map_binders f g e bl = (* TODO: avoid variable capture in [t] by some [na] in [List.tl nal] *) - let h (e,bl) (nal,t) = (map_binder g e nal,(nal,f e t)::bl) in + let h (e,bl) (nal,bk,t) = (map_binder g e nal,(nal,bk,f e t)::bl) in let (e,rbl) = List.fold_left h (e,[]) bl in (e, List.rev rbl) let map_local_binders f g e bl = (* TODO: avoid variable capture in [t] by some [na] in [List.tl nal] *) let h (e,bl) = function - LocalRawAssum(nal,ty) -> - (map_binder g e nal, LocalRawAssum(nal,f e ty)::bl) + LocalRawAssum(nal,k,ty) -> + (map_binder g e nal, LocalRawAssum(nal,k,f e ty)::bl) | LocalRawDef((loc,na),ty) -> (name_fold g na e, LocalRawDef((loc,na),f e ty)::bl) in let (e,rbl) = List.fold_left h (e,[]) bl in @@ -806,32 +891,32 @@ let map_constr_expr_with_binders g f e = function | CDelimiters (loc,s,a) -> CDelimiters (loc,s,f e a) | CHole _ | CEvar _ | CPatVar _ | CSort _ | CPrim _ | CDynamic _ | CRef _ as x -> x - | CCases (loc,rtnpo,a,bl) -> + | CCases (loc,sty,rtnpo,a,bl) -> (* TODO: apply g on the binding variables in pat... *) let bl = List.map (fun (loc,pat,rhs) -> (loc,pat,f e rhs)) bl in let ids = ids_of_cases_tomatch a in - let po = option_map (f (List.fold_right g ids e)) rtnpo in - CCases (loc, po, List.map (fun (tm,x) -> (f e tm,x)) a,bl) + let po = Option.map (f (List.fold_right g ids e)) rtnpo in + CCases (loc, sty, po, List.map (fun (tm,x) -> (f e tm,x)) a,bl) | CLetTuple (loc,nal,(ona,po),b,c) -> let e' = List.fold_right (name_fold g) nal e in - let e'' = option_fold_right (name_fold g) ona e in - CLetTuple (loc,nal,(ona,option_map (f e'') po),f e b,f e' c) + let e'' = Option.fold_right (name_fold g) ona e in + CLetTuple (loc,nal,(ona,Option.map (f e'') po),f e b,f e' c) | CIf (loc,c,(ona,po),b1,b2) -> - let e' = option_fold_right (name_fold g) ona e in - CIf (loc,f e c,(ona,option_map (f e') po),f e b1,f e b2) + let e' = Option.fold_right (name_fold g) ona e in + CIf (loc,f e c,(ona,Option.map (f e') po),f e b1,f e b2) | CFix (loc,id,dl) -> CFix (loc,id,List.map (fun (id,n,bl,t,d) -> let (e',bl') = map_local_binders f g e bl in let t' = f e' t in (* Note: fix names should be inserted before the arguments... *) - let e'' = List.fold_left (fun e (id,_,_,_,_) -> g id e) e' dl in + let e'' = List.fold_left (fun e ((_,id),_,_,_,_) -> g id e) e' dl in let d' = f e'' d in (id,n,bl',t',d')) dl) | CCoFix (loc,id,dl) -> CCoFix (loc,id,List.map (fun (id,bl,t,d) -> let (e',bl') = map_local_binders f g e bl in let t' = f e' t in - let e'' = List.fold_left (fun e (id,_,_,_) -> g id e) e' dl in + let e'' = List.fold_left (fun e ((_,id),_,_,_) -> g id e) e' dl in let d' = f e'' d in (id,bl',t',d')) dl) @@ -849,10 +934,16 @@ type with_declaration_ast = | CWith_Module of identifier list located * qualid located | CWith_Definition of identifier list located * constr_expr -type module_type_ast = - | CMTEident of qualid located - | CMTEwith of module_type_ast * with_declaration_ast type module_ast = | CMEident of qualid located | CMEapply of module_ast * module_ast + +type module_type_ast = + | CMTEident of qualid located + | CMTEapply of module_type_ast * module_ast + | CMTEwith of module_type_ast * with_declaration_ast + +type include_ast = + | CIMTE of module_type_ast + | CIME of module_ast diff --git a/interp/topconstr.mli b/interp/topconstr.mli index 3c359bd5..d4fef0dc 100644 --- a/interp/topconstr.mli +++ b/interp/topconstr.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: topconstr.mli 9976 2007-07-12 11:58:30Z msozeau $ i*) +(*i $Id: topconstr.mli 11024 2008-05-30 12:41:39Z msozeau $ i*) (*i*) open Pp @@ -33,11 +33,14 @@ type aconstr = | ALambda of name * aconstr * aconstr | AProd of name * aconstr * aconstr | ALetIn of name * aconstr * aconstr - | ACases of aconstr option * + | ACases of case_style * aconstr option * (aconstr * (name * (inductive * int * name list) option)) list * (cases_pattern list * aconstr) list | ALetTuple of name list * (name * aconstr option) * aconstr * aconstr | AIf of aconstr * (name * aconstr option) * aconstr * aconstr + | ARec of fix_kind * identifier array * + (name * aconstr option * aconstr) list array * aconstr array * + aconstr array | ASort of rawsort | AHole of Evd.hole_kind | APatVar of patvar @@ -64,11 +67,6 @@ val rawconstr_of_aconstr_with_binders : loc -> val rawconstr_of_aconstr : loc -> aconstr -> rawconstr -(**********************************************************************) -(* Substitution of kernel names, avoiding a list of bound identifiers *) - -val subst_aconstr : substitution -> identifier list -> aconstr -> aconstr - (**********************************************************************) (* [match_aconstr metas] matches a rawconstr against an aconstr with *) (* metavariables in [metas]; raise [No_match] if the matching fails *) @@ -85,12 +83,19 @@ type interpretation = val match_aconstr : rawconstr -> interpretation -> (rawconstr * (tmp_scope_name option * scope_name list)) list +(**********************************************************************) +(* Substitution of kernel names in interpretation data *) + +val subst_interpretation : substitution -> interpretation -> interpretation + (**********************************************************************) (*s Concrete syntax for terms *) type notation = string -type explicitation = ExplByPos of int | ExplByName of identifier +type explicitation = ExplByPos of int * identifier option | ExplByName of identifier + +type binder_kind = Default of binding_kind | TypeClass of binding_kind type proj_flag = int option (* [Some n] = proj of the n-th visible argument *) @@ -110,22 +115,22 @@ type constr_expr = | CFix of loc * identifier located * fixpoint_expr list | CCoFix of loc * identifier located * cofixpoint_expr list | CArrow of loc * constr_expr * constr_expr - | CProdN of loc * (name located list * constr_expr) list * constr_expr - | CLambdaN of loc * (name located list * constr_expr) list * constr_expr + | CProdN of loc * (name located list * binder_kind * constr_expr) list * constr_expr + | CLambdaN of loc * (name located list * binder_kind * constr_expr) list * constr_expr | CLetIn of loc * name located * constr_expr * constr_expr | CAppExpl of loc * (proj_flag * reference) * constr_expr list | CApp of loc * (proj_flag * constr_expr) * - (constr_expr * explicitation located option) list - | CCases of loc * constr_expr option * + (constr_expr * explicitation located option) list + | CCases of loc * case_style * constr_expr option * (constr_expr * (name option * constr_expr option)) list * - (loc * cases_pattern_expr list list * constr_expr) list + (loc * cases_pattern_expr list located list * constr_expr) list | CLetTuple of loc * name list * (name option * constr_expr option) * constr_expr * constr_expr | CIf of loc * constr_expr * (name option * constr_expr option) * constr_expr * constr_expr - | CHole of loc + | CHole of loc * Evd.hole_kind option | CPatVar of loc * (bool * patvar) - | CEvar of loc * existential_key + | CEvar of loc * existential_key * constr_expr list option | CSort of loc * rawsort | CCast of loc * constr_expr * constr_expr cast_type | CNotation of loc * notation * constr_expr list @@ -134,19 +139,24 @@ type constr_expr = | CDynamic of loc * Dyn.t and fixpoint_expr = - identifier * (int option * recursion_order_expr) * local_binder list * constr_expr * constr_expr + identifier located * (identifier located option * recursion_order_expr) * local_binder list * constr_expr * constr_expr and cofixpoint_expr = - identifier * local_binder list * constr_expr * constr_expr + identifier located * local_binder list * constr_expr * constr_expr and recursion_order_expr = | CStructRec | CWfRec of constr_expr | CMeasureRec of constr_expr +(** Anonymous defs allowed ?? *) and local_binder = | LocalRawDef of name located * constr_expr - | LocalRawAssum of name located list * constr_expr + | LocalRawAssum of name located list * binder_kind * constr_expr + +type typeclass_constraint = name located * binding_kind * constr_expr + +and typeclass_context = typeclass_constraint list (**********************************************************************) (* Utilities on constr_expr *) @@ -161,6 +171,8 @@ val replace_vars_constr_expr : val free_vars_of_constr_expr : constr_expr -> Idset.t val occur_var_constr_expr : identifier -> constr_expr -> bool +val default_binder_kind : binder_kind + (* Specific function for interning "in indtype" syntax of "match" *) val ids_of_cases_indtype : constr_expr -> identifier list @@ -168,15 +180,19 @@ val mkIdentC : identifier -> constr_expr val mkRefC : reference -> constr_expr val mkAppC : constr_expr * constr_expr list -> constr_expr val mkCastC : constr_expr * constr_expr cast_type -> constr_expr -val mkLambdaC : name located list * constr_expr * constr_expr -> constr_expr +val mkLambdaC : name located list * binder_kind * constr_expr * constr_expr -> constr_expr val mkLetInC : name located * constr_expr * constr_expr -> constr_expr -val mkProdC : name located list * constr_expr * constr_expr -> constr_expr +val mkProdC : name located list * binder_kind * constr_expr * constr_expr -> constr_expr val coerce_to_id : constr_expr -> identifier located val abstract_constr_expr : constr_expr -> local_binder list -> constr_expr val prod_constr_expr : constr_expr -> local_binder list -> constr_expr +(* Same as [abstract_constr_expr] and [prod_constr_expr], with location *) +val mkCLambdaN : loc -> local_binder list -> constr_expr -> constr_expr +val mkCProdN : loc -> local_binder list -> constr_expr -> constr_expr + (* For binders parsing *) (* Includes let binders *) @@ -191,6 +207,11 @@ val names_of_local_assums : local_binder list -> name located list (* With let binders *) val names_of_local_binders : local_binder list -> name located list +(* Used in typeclasses *) + +val fold_constr_expr_with_binders : (identifier -> 'a -> 'a) -> + ('a -> 'b -> constr_expr -> 'b) -> 'a -> 'b -> constr_expr -> 'b + (* Used in correctness and interface; absence of var capture not guaranteed *) (* in pattern-matching clauses and in binders of the form [x,y:T(x)] *) @@ -205,10 +226,17 @@ type with_declaration_ast = | CWith_Module of identifier list located * qualid located | CWith_Definition of identifier list located * constr_expr -type module_type_ast = - | CMTEident of qualid located - | CMTEwith of module_type_ast * with_declaration_ast type module_ast = | CMEident of qualid located | CMEapply of module_ast * module_ast + +type module_type_ast = + | CMTEident of qualid located + | CMTEapply of module_type_ast * module_ast + | CMTEwith of module_type_ast * with_declaration_ast + +type include_ast = + | CIMTE of module_type_ast + | CIME of module_ast + diff --git a/kernel/byterun/coq_fix_code.c b/kernel/byterun/coq_fix_code.c index affcccb3..55b907ad 100644 --- a/kernel/byterun/coq_fix_code.c +++ b/kernel/byterun/coq_fix_code.c @@ -8,6 +8,9 @@ /* */ /***********************************************************************/ +/* Arnaud Spiwack: expanded the virtual machine with operators used + for fast computation of bounded (31bits) integers */ + #include #include #include @@ -37,7 +40,13 @@ void init_arity () { arity[GETFIELD0]=arity[GETFIELD1]=arity[SETFIELD0]=arity[SETFIELD1]= arity[CONST0]=arity[CONST1]=arity[CONST2]=arity[CONST3]= arity[PUSHCONST0]=arity[PUSHCONST1]=arity[PUSHCONST2]=arity[PUSHCONST3]= - arity[ACCUMULATE]=arity[STOP]=arity[MAKEPROD]= 0; + arity[ACCUMULATE]=arity[STOP]=arity[MAKEPROD]= + arity[ADDINT31]=arity[ADDCINT31]=arity[ADDCARRYCINT31]= + arity[SUBINT31]=arity[SUBCINT31]=arity[SUBCARRYCINT31]= + arity[MULCINT31]=arity[MULINT31]=arity[COMPAREINT31]= + arity[DIV21INT31]=arity[DIVINT31]=arity[ADDMULDIVINT31]= + arity[HEAD0INT31]=arity[TAIL0INT31]= + arity[COMPINT31]=arity[DECOMPINT31]=0; /* instruction with one operand */ arity[ACC]=arity[PUSHACC]=arity[POP]=arity[ENVACC]=arity[PUSHENVACC]= arity[PUSH_RETADDR]=arity[APPLY]=arity[APPTERM1]=arity[APPTERM2]= @@ -45,9 +54,11 @@ void init_arity () { arity[PUSHOFFSETCLOSURE]=arity[GETGLOBAL]=arity[PUSHGETGLOBAL]= arity[MAKEBLOCK1]=arity[MAKEBLOCK2]=arity[MAKEBLOCK3]=arity[MAKEBLOCK4]= arity[MAKEACCU]=arity[CONSTINT]=arity[PUSHCONSTINT]=arity[GRABREC]= - arity[PUSHFIELDS]=arity[GETFIELD]=arity[SETFIELD]=arity[ACCUMULATECOND]= 1; + arity[PUSHFIELDS]=arity[GETFIELD]=arity[SETFIELD]=arity[ACCUMULATECOND]= + arity[BRANCH]=arity[ISCONST]= 1; /* instruction with two operands */ - arity[APPTERM]=arity[MAKEBLOCK]=arity[CLOSURE]=2; + arity[APPTERM]=arity[MAKEBLOCK]=arity[CLOSURE]= + arity[ARECONST]=2; /* instruction with four operands */ arity[MAKESWITCHBLOCK]=4; /* instruction with arbitrary operands */ diff --git a/kernel/byterun/coq_fix_code.h b/kernel/byterun/coq_fix_code.h index d1dac80f..00345318 100644 --- a/kernel/byterun/coq_fix_code.h +++ b/kernel/byterun/coq_fix_code.h @@ -31,4 +31,5 @@ value coq_makeaccu (value i); value coq_pushpop (value i); value coq_accucond (value i); value coq_is_accumulate_code(value code); + #endif /* _COQ_FIX_CODE_ */ diff --git a/kernel/byterun/coq_instruct.h b/kernel/byterun/coq_instruct.h index 89616c5f..8a45e973 100644 --- a/kernel/byterun/coq_instruct.h +++ b/kernel/byterun/coq_instruct.h @@ -35,7 +35,18 @@ enum instructions { CONST0, CONST1, CONST2, CONST3, CONSTINT, PUSHCONST0, PUSHCONST1, PUSHCONST2, PUSHCONST3, PUSHCONSTINT, ACCUMULATE, ACCUMULATECOND, - MAKESWITCHBLOCK, MAKEACCU, MAKEPROD, STOP + MAKESWITCHBLOCK, MAKEACCU, MAKEPROD, +/* spiwack: */ + BRANCH, + ADDINT31, ADDCINT31, ADDCARRYCINT31, + SUBINT31, SUBCINT31, SUBCARRYCINT31, + MULCINT31, MULINT31, DIV21INT31, DIVINT31, + ADDMULDIVINT31, COMPAREINT31, + HEAD0INT31, TAIL0INT31, + ISCONST, ARECONST, + COMPINT31, DECOMPINT31, +/* /spiwack */ + STOP }; #endif /* _COQ_INSTRUCT_ */ diff --git a/kernel/byterun/coq_interp.c b/kernel/byterun/coq_interp.c index 8f9c10e6..880e978a 100644 --- a/kernel/byterun/coq_interp.c +++ b/kernel/byterun/coq_interp.c @@ -10,12 +10,31 @@ /* The bytecode interpreter */ +/* Spiwack: expanded the virtual machine with operators used + for fast computation of bounded (31bits) integers */ + #include #include "coq_gc.h" #include "coq_instruct.h" #include "coq_fix_code.h" -#include "coq_memory.h" -#include "coq_values.h" +#include "coq_memory.h" +#include "coq_values.h" + +/*spiwack : imports support functions for 64-bit integers */ +#include "config.h" +#ifdef ARCH_INT64_TYPE +#include "int64_native.h" +#else +#include "int64_emul.h" +#endif + +/* spiwack: I append here a few macros for value/number manipulation */ +#define uint32_of_value(val) (((uint32)val >> 1)) +#define value_of_uint32(i) ((value)(((uint32)(i) << 1) | 1)) +#define UI64_of_uint32(lo) ((uint64)(I64_literal(0,(uint32)(lo)))) +#define UI64_of_value(val) (UI64_of_uint32(uint32_of_value(val))) +/* /spiwack */ + /* Registers for the abstract machine: @@ -61,11 +80,11 @@ sp is a local copy of the global variable extern_sp. */ # define print_int(i) #endif -/* Wrapper pour caml_modify */ -#ifdef OCAML_307 -#define CAML_MODIFY(a,b) modify(a,b) -#else -#define CAML_MODIFY(a,b) caml_modify(a,b) +/* Wrapper pour caml_modify */ +#ifdef OCAML_307 +#define CAML_MODIFY(a,b) modify(a,b) +#else +#define CAML_MODIFY(a,b) caml_modify(a,b) #endif /* GC interface */ @@ -1035,7 +1054,326 @@ value coq_interprete sp += 2; Next; } - + + /* spiwack: code for interpreting compiled integers */ + Instruct(BRANCH) { + /* unconditional branching */ + print_instr("BRANCH"); + pc += *pc; + /* pc = (code_t)(pc+*pc); */ + Next; + } + + Instruct(ADDINT31) { + /* Adds the integer in the accumulator with + the one ontop of the stack (which is poped)*/ + print_instr("ADDINT31"); + accu = + (value)((uint32) accu + (uint32) *sp++ - 1); + /* nota,unlike CaML we don't want + to have a different behavior depending on the + architecture. Thus we cast the operand to uint32 */ + Next; + } + + Instruct (ADDCINT31) { + print_instr("ADDCINT31"); + /* returns the sum with a carry */ + uint32 s; + s = (uint32)accu + (uint32)*sp++ - 1; + if( (uint32)s < (uint32)accu ) { + /* carry */ + Alloc_small(accu, 1, 2); /* ( _ , arity, tag ) */ + } + else { + /*no carry */ + Alloc_small(accu, 1, 1); + } + Field(accu, 0)=(value)s; + Next; + } + + Instruct (ADDCARRYCINT31) { + print_instr("ADDCARRYCINT31"); + /* returns the sum plus one with a carry */ + uint32 s; + s = (uint32)accu + (uint32)*sp++ + 1; + value block; + if( (uint32)s <= (uint32)accu ) { + /* carry */ + Alloc_small(accu, 1, 2); /* ( _ , arity, tag ) */ + } + else { + /*no carry */ + Alloc_small(accu, 1, 1); + } + Field(accu, 0)=(value)s; + Next; + } + + Instruct (SUBINT31) { + print_instr("SUBINT31"); + /* returns the subtraction */ + accu = + (value)((uint32) accu - (uint32) *sp++ + 1); + Next; + } + + Instruct (SUBCINT31) { + print_instr("SUBCINT31"); + /* returns the subtraction with a carry */ + uint32 b; + uint32 s; + b = (uint32)*sp++; + s = (uint32)accu - b + 1; + if( (uint32)accu < b ) { + /* carry */ + Alloc_small(accu, 1, 2); /* ( _ , arity, tag ) */ + } + else { + /*no carry */ + Alloc_small(accu, 1, 1); + } + Field(accu, 0)=(value)s; + Next; + } + + Instruct (SUBCARRYCINT31) { + print_instr("SUBCARRYCINT31"); + /* returns the subtraction minus one with a carry */ + uint32 b; + uint32 s; + b = (uint32)*sp++; + s = (value)((uint32)accu - b - 1); + if( (uint32)accu <= b ) { + /* carry */ + Alloc_small(accu, 1, 2); /* ( _ , arity, tag ) */ + } + else { + /*no carry */ + Alloc_small(accu, 1, 1); + } + Field(accu, 0)=(value)s; + Next; + } + + Instruct (MULINT31) { + /* returns the multiplication */ + print_instr("MULINT31"); + accu = + value_of_uint32((uint32_of_value(accu)) * (uint32_of_value(*sp++))); + Next; + } + + Instruct (MULCINT31) { + /*returns the multiplication on a double size word + (special case for 0) */ + print_instr("MULCINT31"); + uint64 p; + /*accu = 2v+1, *sp=2w+1 ==> p = 2v*w */ + p = I64_mul (UI64_of_value (accu), UI64_of_uint32 ((*sp++)^1)); + if ( I64_is_zero(p) ) { + accu = (value)1; + } + else { + /* the output type is supposed to have a constant constructor + and a non-constant constructor (in that order), the tag + of the non-constant constructor is then 1 */ + Alloc_small(accu, 2, 1); /* ( _ , arity, tag ) */ + /*unsigned shift*/ + Field(accu, 0) = (value)(I64_lsr(p,31)|1) ; /*higher part*/ + Field(accu, 1) = (value)(I64_to_int32(p)|1); /*lower part*/ + } + Next; + } + + Instruct (DIV21INT31) { + print_instr("DIV21INT31"); + /* spiwack: takes three int31 (the two first ones represent an + int62) and performs the euclidian division of the + int62 by the int31 */ + uint64 bigint; + bigint = UI64_of_value(accu); + bigint = I64_or(I64_lsl(bigint, 31),UI64_of_value(*sp++)); + uint64 divisor; + divisor = UI64_of_value(*sp++); + Alloc_small(accu, 2, 1); /* ( _ , arity, tag ) */ + if (I64_is_zero (divisor)) { + Field(accu, 0) = 1; /* 2*0+1 */ + Field(accu, 1) = 1; /* 2*0+1 */ + } + else { + uint64 quo, mod; + I64_udivmod(bigint, divisor, &quo, &mod); + Field(accu, 0) = value_of_uint32(I64_to_int32(quo)); + Field(accu, 1) = value_of_uint32(I64_to_int32(mod)); + } + Next; + } + + Instruct (DIVINT31) { + print_instr("DIVINT31"); + /* spiwack: a priori no need of the NON_STANDARD_DIV_MOD flag + since it probably only concerns negative number. + needs to be checked at this point */ + uint32 divisor; + divisor = uint32_of_value(*sp++); + if (divisor == 0) { + Alloc_small(accu, 2, 1); /* ( _ , arity, tag ) */ + Field(accu, 0) = 1; /* 2*0+1 */ + Field(accu, 1) = 1; /* 2*0+1 */ + } + else { + uint32 modulus; + modulus = uint32_of_value(accu); + Alloc_small(accu, 2, 1); /* ( _ , arity, tag ) */ + Field(accu, 0) = value_of_uint32(modulus/divisor); + Field(accu, 1) = value_of_uint32(modulus%divisor); + } + Next; + } + + Instruct (ADDMULDIVINT31) { + print_instr("ADDMULDIVINT31"); + /* higher level shift (does shifts and cycles and such) */ + uint32 shiftby; + shiftby = uint32_of_value(accu); + if (shiftby > 31) { + if (shiftby < 62) { + *sp++; + accu = (value)((((*sp++)^1) << (shiftby - 31)) | 1); + } + else { + accu = (value)(1); + } + } + else{ + /* *sp = 2*x+1 --> accu = 2^(shiftby+1)*x */ + accu = (value)(((*sp++)^1) << shiftby); + /* accu = 2^(shiftby+1)*x --> 2^(shifby+1)*x+2*y/2^(31-shiftby)+1 */ + accu = (value)((accu | (((uint32)(*sp++)) >> (31-shiftby)))|1); + } + Next; + } + + Instruct (COMPAREINT31) { + /* returns Eq if equal, Lt if accu is less than *sp, Gt otherwise */ + /* assumes Inudctive _ : _ := Eq | Lt | Gt */ + print_instr("COMPAREINT31"); + if ((uint32)accu == (uint32)*sp) { + accu = 1; /* 2*0+1 */ + sp++; + } + else{if ((uint32)accu < (uint32)(*sp++)) { + accu = 3; /* 2*1+1 */ + } + else{ + accu = 5; /* 2*2+1 */ + }} + Next; + } + + Instruct (HEAD0INT31) { + int r = 0; + uint32 x; + print_instr("HEAD0INT31"); + x = (uint32) accu; + if (!(x & 0xFFFF0000)) { x <<= 16; r += 16; } + if (!(x & 0xFF000000)) { x <<= 8; r += 8; } + if (!(x & 0xF0000000)) { x <<= 4; r += 4; } + if (!(x & 0xC0000000)) { x <<= 2; r += 2; } + if (!(x & 0x80000000)) { x <<=1; r += 1; } + if (!(x & 0x80000000)) { r += 1; } + accu = value_of_uint32(r); + Next; + } + + Instruct (TAIL0INT31) { + int r = 0; + uint32 x; + print_instr("TAIL0INT31"); + x = (((uint32) accu >> 1) | 0x80000000); + if (!(x & 0xFFFF)) { x >>= 16; r += 16; } + if (!(x & 0x00FF)) { x >>= 8; r += 8; } + if (!(x & 0x000F)) { x >>= 4; r += 4; } + if (!(x & 0x0003)) { x >>= 2; r += 2; } + if (!(x & 0x0001)) { x >>=1; r += 1; } + if (!(x & 0x0001)) { r += 1; } + accu = value_of_uint32(r); + Next; + } + + Instruct (ISCONST) { + /* Branches if the accu does not contain a constant + (i.e., a non-block value) */ + print_instr("ISCONST"); + if ((accu & 1) == 0) /* last bit is 0 -> it is a block */ + pc += *pc; + else + pc++; + Next; + + } + + Instruct (ARECONST) { + /* Branches if the n first values on the stack are not + all constansts */ + print_instr("ARECONST"); + int i, n, ok; + ok = 1; + n = *pc++; + for(i=0; i < n; i++) { + if ((sp[i] & 1) == 0) { + ok = 0; + break; + } + } + if(ok) pc++; else pc += *pc; + Next; + } + + Instruct (COMPINT31) { + /* makes an 31-bit integer out of the accumulator and + the 30 first values of the stack + and put it in the accumulator (the accumulator then the + topmost get to be the heavier bits) */ + print_instr("COMPINT31"); + int i; + /*accu=accu or accu = (value)((unsigned long)1-accu) if bool + is used for the bits */ + for(i=0; i < 30; i++) { + accu = (value) ((((uint32)accu-1) << 1) | *sp++); + /* -1 removes the tag bit, << 1 multiplies the value by 2, + | *sp++ pops the last value and add it (no carry involved) + not that it reintroduces a tag bit */ + /* alternative, if bool is used for the bits : + accu = (value) ((((unsigned long)accu) << 1) & !*sp++); */ + } + Next; + } + + Instruct (DECOMPINT31) { + /* builds a block out of a 31-bit integer (from the accumulator), + used before cases */ + int i; + value block; + print_instr("DECOMPINT31"); + Alloc_small(block, 31, 1); // Alloc_small(*, size, tag) + for(i = 30; i >= 0; i--) { + Field(block, i) = (value)(accu & 3); /* two last bits of the accumulator */ + //Field(block, i) = 3; + accu = (value) ((uint32)accu >> 1) | 1; /* last bit must be a one */ + }; + accu = block; + Next; + } + + + + /* /spiwack */ + + + /* Debugging and machine control */ Instruct(STOP){ diff --git a/kernel/byterun/int64_emul.h b/kernel/byterun/int64_emul.h new file mode 100644 index 00000000..0a61ad79 --- /dev/null +++ b/kernel/byterun/int64_emul.h @@ -0,0 +1,272 @@ +/***********************************************************************/ +/* */ +/* Objective Caml */ +/* */ +/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */ +/* */ +/* Copyright 2002 Institut National de Recherche en Informatique et */ +/* en Automatique. All rights reserved. This file is distributed */ +/* under the terms of the GNU Library General Public License, with */ +/* the special exception on linking described in file ../LICENSE. */ +/* */ +/***********************************************************************/ + +/* $Id: int64_emul.h 10739 2008-04-01 14:45:20Z herbelin $ */ + +/* Software emulation of 64-bit integer arithmetic, for C compilers + that do not support it. */ + +#ifndef CAML_INT64_EMUL_H +#define CAML_INT64_EMUL_H + +#include + +#ifdef ARCH_BIG_ENDIAN +#define I64_literal(hi,lo) { hi, lo } +#else +#define I64_literal(hi,lo) { lo, hi } +#endif + +/* Unsigned comparison */ +static int I64_ucompare(uint64 x, uint64 y) +{ + if (x.h > y.h) return 1; + if (x.h < y.h) return -1; + if (x.l > y.l) return 1; + if (x.l < y.l) return -1; + return 0; +} + +#define I64_ult(x, y) (I64_ucompare(x, y) < 0) + +/* Signed comparison */ +static int I64_compare(int64 x, int64 y) +{ + if ((int32)x.h > (int32)y.h) return 1; + if ((int32)x.h < (int32)y.h) return -1; + if (x.l > y.l) return 1; + if (x.l < y.l) return -1; + return 0; +} + +/* Negation */ +static int64 I64_neg(int64 x) +{ + int64 res; + res.l = -x.l; + res.h = ~x.h; + if (res.l == 0) res.h++; + return res; +} + +/* Addition */ +static int64 I64_add(int64 x, int64 y) +{ + int64 res; + res.l = x.l + y.l; + res.h = x.h + y.h; + if (res.l < x.l) res.h++; + return res; +} + +/* Subtraction */ +static int64 I64_sub(int64 x, int64 y) +{ + int64 res; + res.l = x.l - y.l; + res.h = x.h - y.h; + if (x.l < y.l) res.h--; + return res; +} + +/* Multiplication */ +static int64 I64_mul(int64 x, int64 y) +{ + int64 res; + uint32 prod00 = (x.l & 0xFFFF) * (y.l & 0xFFFF); + uint32 prod10 = (x.l >> 16) * (y.l & 0xFFFF); + uint32 prod01 = (x.l & 0xFFFF) * (y.l >> 16); + uint32 prod11 = (x.l >> 16) * (y.l >> 16); + res.l = prod00; + res.h = prod11 + (prod01 >> 16) + (prod10 >> 16); + prod01 = prod01 << 16; res.l += prod01; if (res.l < prod01) res.h++; + prod10 = prod10 << 16; res.l += prod10; if (res.l < prod10) res.h++; + res.h += x.l * y.h + x.h * y.l; + return res; +} + +#define I64_is_zero(x) (((x).l | (x).h) == 0) + +#define I64_is_negative(x) ((int32) (x).h < 0) + +/* Bitwise operations */ +static int64 I64_and(int64 x, int64 y) +{ + int64 res; + res.l = x.l & y.l; + res.h = x.h & y.h; + return res; +} + +static int64 I64_or(int64 x, int64 y) +{ + int64 res; + res.l = x.l | y.l; + res.h = x.h | y.h; + return res; +} + +static int64 I64_xor(int64 x, int64 y) +{ + int64 res; + res.l = x.l ^ y.l; + res.h = x.h ^ y.h; + return res; +} + +/* Shifts */ +static int64 I64_lsl(int64 x, int s) +{ + int64 res; + s = s & 63; + if (s == 0) return x; + if (s < 32) { + res.l = x.l << s; + res.h = (x.h << s) | (x.l >> (32 - s)); + } else { + res.l = 0; + res.h = x.l << (s - 32); + } + return res; +} + +static int64 I64_lsr(int64 x, int s) +{ + int64 res; + s = s & 63; + if (s == 0) return x; + if (s < 32) { + res.l = (x.l >> s) | (x.h << (32 - s)); + res.h = x.h >> s; + } else { + res.l = x.h >> (s - 32); + res.h = 0; + } + return res; +} + +static int64 I64_asr(int64 x, int s) +{ + int64 res; + s = s & 63; + if (s == 0) return x; + if (s < 32) { + res.l = (x.l >> s) | (x.h << (32 - s)); + res.h = (int32) x.h >> s; + } else { + res.l = (int32) x.h >> (s - 32); + res.h = (int32) x.h >> 31; + } + return res; +} + +/* Division and modulus */ + +#define I64_SHL1(x) x.h = (x.h << 1) | (x.l >> 31); x.l <<= 1 +#define I64_SHR1(x) x.l = (x.l >> 1) | (x.h << 31); x.h >>= 1 + +static void I64_udivmod(uint64 modulus, uint64 divisor, + uint64 * quo, uint64 * mod) +{ + int64 quotient, mask; + int cmp; + + quotient.h = 0; quotient.l = 0; + mask.h = 0; mask.l = 1; + while ((int32) divisor.h >= 0) { + cmp = I64_ucompare(divisor, modulus); + I64_SHL1(divisor); + I64_SHL1(mask); + if (cmp >= 0) break; + } + while (mask.l | mask.h) { + if (I64_ucompare(modulus, divisor) >= 0) { + quotient.h |= mask.h; quotient.l |= mask.l; + modulus = I64_sub(modulus, divisor); + } + I64_SHR1(mask); + I64_SHR1(divisor); + } + *quo = quotient; + *mod = modulus; +} + +static int64 I64_div(int64 x, int64 y) +{ + int64 q, r; + int32 sign; + + sign = x.h ^ y.h; + if ((int32) x.h < 0) x = I64_neg(x); + if ((int32) y.h < 0) y = I64_neg(y); + I64_udivmod(x, y, &q, &r); + if (sign < 0) q = I64_neg(q); + return q; +} + +static int64 I64_mod(int64 x, int64 y) +{ + int64 q, r; + int32 sign; + + sign = x.h; + if ((int32) x.h < 0) x = I64_neg(x); + if ((int32) y.h < 0) y = I64_neg(y); + I64_udivmod(x, y, &q, &r); + if (sign < 0) r = I64_neg(r); + return r; +} + +/* Coercions */ + +static int64 I64_of_int32(int32 x) +{ + int64 res; + res.l = x; + res.h = x >> 31; + return res; +} + +#define I64_to_int32(x) ((int32) (x).l) + +/* Note: we assume sizeof(intnat) = 4 here, which is true otherwise + autoconfiguration would have selected native 64-bit integers */ +#define I64_of_intnat I64_of_int32 +#define I64_to_intnat I64_to_int32 + +static double I64_to_double(int64 x) +{ + double res; + int32 sign = x.h; + if (sign < 0) x = I64_neg(x); + res = ldexp((double) x.h, 32) + x.l; + if (sign < 0) res = -res; + return res; +} + +static int64 I64_of_double(double f) +{ + int64 res; + double frac, integ; + int neg; + + neg = (f < 0); + f = fabs(f); + frac = modf(ldexp(f, -32), &integ); + res.h = (uint32) integ; + res.l = (uint32) ldexp(frac, 32); + if (neg) res = I64_neg(res); + return res; +} + +#endif /* CAML_INT64_EMUL_H */ diff --git a/kernel/byterun/int64_native.h b/kernel/byterun/int64_native.h new file mode 100644 index 00000000..4fc3c220 --- /dev/null +++ b/kernel/byterun/int64_native.h @@ -0,0 +1,50 @@ +/***********************************************************************/ +/* */ +/* Objective Caml */ +/* */ +/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */ +/* */ +/* Copyright 2002 Institut National de Recherche en Informatique et */ +/* en Automatique. All rights reserved. This file is distributed */ +/* under the terms of the GNU Library General Public License, with */ +/* the special exception on linking described in file ../LICENSE. */ +/* */ +/***********************************************************************/ + +/* $Id: int64_native.h 10739 2008-04-01 14:45:20Z herbelin $ */ + +/* Wrapper macros around native 64-bit integer arithmetic, + so that it has the same interface as the software emulation + provided in int64_emul.h */ + +#ifndef CAML_INT64_NATIVE_H +#define CAML_INT64_NATIVE_H + +#define I64_literal(hi,lo) ((int64)(hi) << 32 | (lo)) +#define I64_compare(x,y) (((x) > (y)) - ((x) < (y))) +#define I64_ult(x,y) ((uint64)(x) < (uint64)(y)) +#define I64_neg(x) (-(x)) +#define I64_add(x,y) ((x) + (y)) +#define I64_sub(x,y) ((x) - (y)) +#define I64_mul(x,y) ((x) * (y)) +#define I64_is_zero(x) ((x) == 0) +#define I64_is_negative(x) ((x) < 0) +#define I64_div(x,y) ((x) / (y)) +#define I64_mod(x,y) ((x) % (y)) +#define I64_udivmod(x,y,quo,rem) \ + (*(rem) = (uint64)(x) % (uint64)(y), \ + *(quo) = (uint64)(x) / (uint64)(y)) +#define I64_and(x,y) ((x) & (y)) +#define I64_or(x,y) ((x) | (y)) +#define I64_xor(x,y) ((x) ^ (y)) +#define I64_lsl(x,y) ((x) << (y)) +#define I64_asr(x,y) ((x) >> (y)) +#define I64_lsr(x,y) ((uint64)(x) >> (y)) +#define I64_to_intnat(x) ((intnat) (x)) +#define I64_of_intnat(x) ((intnat) (x)) +#define I64_to_int32(x) ((int32) (x)) +#define I64_of_int32(x) ((int64) (x)) +#define I64_to_double(x) ((double)(x)) +#define I64_of_double(x) ((int64)(x)) + +#endif /* CAML_INT64_NATIVE_H */ diff --git a/kernel/cbytecodes.ml b/kernel/cbytecodes.ml index a9b16f29..ceba6e82 100644 --- a/kernel/cbytecodes.ml +++ b/kernel/cbytecodes.ml @@ -17,6 +17,7 @@ type structured_constant = | Const_b0 of tag | Const_bn of tag * structured_constant array + type reloc_table = (tag * int) array type annot_switch = @@ -63,6 +64,43 @@ type instruction = | Ksetfield of int | Kstop | Ksequence of bytecodes * bytecodes +(* spiwack: instructions concerning integers *) + | Kbranch of Label.t (* jump to label *) + | Kaddint31 (* adds the int31 in the accu + and the one ontop of the stack *) + | Kaddcint31 (* makes the sum and keeps the carry *) + | Kaddcarrycint31 (* sum +1, keeps the carry *) + | Ksubint31 (* subtraction modulo *) + | Ksubcint31 (* subtraction, keeps the carry *) + | Ksubcarrycint31 (* subtraction -1, keeps the carry *) + | Kmulint31 (* multiplication modulo *) + | Kmulcint31 (* multiplication, result in two + int31, for exact computation *) + | Kdiv21int31 (* divides a double size integer + (represented by an int31 in the + accumulator and one on the top of + the stack) by an int31. The result + is a pair of the quotient and the + rest. + If the divisor is 0, it returns + 0. *) + | Kdivint31 (* euclidian division (returns a pair + quotient,rest) *) + | Kaddmuldivint31 (* generic operation for shifting and + cycling. Takes 3 int31 i j and s, + and returns x*2^s+y/(2^(31-s) *) + | Kcompareint31 (* unsigned comparison of int31 + cf COMPAREINT31 in + kernel/byterun/coq_interp.c + for more info *) + | Khead0int31 (* Give the numbers of 0 in head of a in31*) + | Ktail0int31 (* Give the numbers of 0 in tail of a in31 + ie low bits *) + | Kisconst of Label.t (* conditional jump *) + | Kareconst of int*Label.t (* conditional jump *) + | Kcompint31 (* dynamic compilation of int31 *) + | Kdecompint31 (* dynamic decompilation of int31 *) +(* /spiwack *) and bytecodes = instruction list @@ -70,6 +108,31 @@ type fv_elem = FVnamed of identifier | FVrel of int type fv = fv_elem array +(* spiwack: this exception is expected to be raised by function expecting + closed terms. *) +exception NotClosed + + +(*spiwack: both type have been moved from Cbytegen because I needed then + for the retroknowledge *) +type vm_env = { + size : int; (* longueur de la liste [n] *) + fv_rev : fv_elem list (* [fvn; ... ;fv1] *) + } + + +type comp_env = { + nb_stack : int; (* nbre de variables sur la pile *) + in_stack : int list; (* position dans la pile *) + nb_rec : int; (* nbre de fonctions mutuellement *) + (* recursives = nbr *) + pos_rec : instruction list; (* instruction d'acces pour les variables *) + (* de point fix ou de cofix *) + offset : int; + in_env : vm_env ref + } + + (* --- Pretty print *) open Format @@ -123,6 +186,29 @@ let rec instruction ppf = function | Kstop -> fprintf ppf "\tstop" | Ksequence (c1,c2) -> fprintf ppf "%a@ %a" instruction_list c1 instruction_list c2 +(* spiwack *) + | Kbranch lbl -> fprintf ppf "\tbranch %i" lbl + | Kaddint31 -> fprintf ppf "\taddint31" + | Kaddcint31 -> fprintf ppf "\taddcint31" + | Kaddcarrycint31 -> fprintf ppf "\taddcarrycint31" + | Ksubint31 -> fprintf ppf "\tsubint31" + | Ksubcint31 -> fprintf ppf "\tsubcint31" + | Ksubcarrycint31 -> fprintf ppf "\tsubcarrycint31" + | Kmulint31 -> fprintf ppf "\tmulint31" + | Kmulcint31 -> fprintf ppf "\tmulcint31" + | Kdiv21int31 -> fprintf ppf "\tdiv21int31" + | Kdivint31 -> fprintf ppf "\tdivint31" + | Kcompareint31 -> fprintf ppf "\tcompareint31" + | Khead0int31 -> fprintf ppf "\thead0int31" + | Ktail0int31 -> fprintf ppf "\ttail0int31" + | Kaddmuldivint31 -> fprintf ppf "\taddmuldivint31" + | Kisconst lbl -> fprintf ppf "\tisconst %i" lbl + | Kareconst(n,lbl) -> fprintf ppf "\tareconst %i %i" n lbl + | Kcompint31 -> fprintf ppf "\tcompint31" + | Kdecompint31 -> fprintf ppf "\tdecompint" + +(* /spiwack *) + and instruction_list ppf = function [] -> () @@ -130,6 +216,22 @@ and instruction_list ppf = function fprintf ppf "L%i:%a" lbl instruction_list il | instr :: il -> fprintf ppf "%a@ %a" instruction instr instruction_list il + + +(*spiwack: moved this type in this file because I needed it for + retroknowledge which can't depend from cbytegen *) +type block = + | Bconstr of constr + | Bstrconst of structured_constant + | Bmakeblock of int * block array + | Bconstruct_app of int * int * int * block array + (* tag , nparams, arity *) + | Bspecial of (comp_env -> block array -> int -> bytecodes -> bytecodes) * block array + (* spiwack: compilation given by a function *) + (* compilation function (see get_vm_constant_dynamic_info in + retroknowledge.mli for more info) , argument array *) + + let draw_instr c = fprintf std_formatter "@[%a@]" instruction_list c diff --git a/kernel/cbytecodes.mli b/kernel/cbytecodes.mli index 215b6ad4..c24b5a53 100644 --- a/kernel/cbytecodes.mli +++ b/kernel/cbytecodes.mli @@ -61,6 +61,43 @@ type instruction = | Ksetfield of int | Kstop | Ksequence of bytecodes * bytecodes +(* spiwack: instructions concerning integers *) + | Kbranch of Label.t (* jump to label, is it needed ? *) + | Kaddint31 (* adds the int31 in the accu + and the one ontop of the stack *) + | Kaddcint31 (* makes the sum and keeps the carry *) + | Kaddcarrycint31 (* sum +1, keeps the carry *) + | Ksubint31 (* subtraction modulo *) + | Ksubcint31 (* subtraction, keeps the carry *) + | Ksubcarrycint31 (* subtraction -1, keeps the carry *) + | Kmulint31 (* multiplication modulo *) + | Kmulcint31 (* multiplication, result in two + int31, for exact computation *) + | Kdiv21int31 (* divides a double size integer + (represented by an int31 in the + accumulator and one on the top of + the stack) by an int31. The result + is a pair of the quotient and the + rest. + If the divisor is 0, it returns + 0. *) + | Kdivint31 (* euclidian division (returns a pair + quotient,rest) *) + | Kaddmuldivint31 (* generic operation for shifting and + cycling. Takes 3 int31 i j and s, + and returns x*2^s+y/(2^(31-s) *) + | Kcompareint31 (* unsigned comparison of int31 + cf COMPAREINT31 in + kernel/byterun/coq_interp.c + for more info *) + | Khead0int31 (* Give the numbers of 0 in head of a in31*) + | Ktail0int31 (* Give the numbers of 0 in tail of a in31 + ie low bits *) + | Kisconst of Label.t (* conditional jump *) + | Kareconst of int*Label.t (* conditional jump *) + | Kcompint31 (* dynamic compilation of int31 *) + | Kdecompint31 (* dynamix decompilation of int31 *) +(* /spiwack *) and bytecodes = instruction list @@ -69,5 +106,41 @@ type fv_elem = FVnamed of identifier | FVrel of int type fv = fv_elem array + +(* spiwack: this exception is expected to be raised by function expecting + closed terms. *) +exception NotClosed + +(*spiwack: both type have been moved from Cbytegen because I needed then + for the retroknowledge *) +type vm_env = { + size : int; (* longueur de la liste [n] *) + fv_rev : fv_elem list (* [fvn; ... ;fv1] *) + } + + +type comp_env = { + nb_stack : int; (* nbre de variables sur la pile *) + in_stack : int list; (* position dans la pile *) + nb_rec : int; (* nbre de fonctions mutuellement *) + (* recursives = nbr *) + pos_rec : instruction list; (* instruction d'acces pour les variables *) + (* de point fix ou de cofix *) + offset : int; + in_env : vm_env ref + } + val draw_instr : bytecodes -> unit + + +(*spiwack: moved this here because I needed it for retroknowledge *) +type block = + | Bconstr of constr + | Bstrconst of structured_constant + | Bmakeblock of int * block array + | Bconstruct_app of int * int * int * block array + (* tag , nparams, arity *) + | Bspecial of (comp_env -> block array -> int -> bytecodes -> bytecodes) * block array + (* compilation function (see get_vm_constant_dynamic_info in + retroknowledge.mli for more info) , argument array *) diff --git a/kernel/cbytegen.ml b/kernel/cbytegen.ml index e1f89fad..72113425 100644 --- a/kernel/cbytegen.ml +++ b/kernel/cbytegen.ml @@ -83,24 +83,9 @@ open Pre_env (* On conserve la fct de cofix pour la conversion *) -type vm_env = { - size : int; (* longueur de la liste [n] *) - fv_rev : fv_elem list (* [fvn; ... ;fv1] *) - } - + let empty_fv = { size= 0; fv_rev = [] } - -type comp_env = { - nb_stack : int; (* nbre de variables sur la pile *) - in_stack : int list; (* position dans la pile *) - nb_rec : int; (* nbre de fonctions mutuellement *) - (* recursives = nbr *) - pos_rec : instruction list; (* instruction d'acces pour les variables *) - (* de point fix ou de cofix *) - offset : int; - in_env : vm_env ref - } - + let fv r = !(r.in_env) let empty_comp_env ()= @@ -231,17 +216,40 @@ let rec discard_dead_code cont = cont let label_code = function | Klabel lbl :: _ as cont -> (lbl, cont) + | Kbranch lbl :: _ as cont -> (lbl, cont) | cont -> let lbl = Label.create() in (lbl, Klabel lbl :: cont) (* Return a branch to the continuation. That is, an instruction that, when executed, branches to the continuation or performs what the continuation performs. We avoid generating branches to returns. *) - +(* spiwack: make_branch was only used once. Changed it back to the ZAM + one to match the appropriate semantics (old one avoided the + introduction of an unconditional branch operation, which seemed + appropriate for the 31-bit integers' code). As a memory, I leave + the former version in this comment. let make_branch cont = match cont with | (Kreturn _ as return) :: cont' -> return, cont' | Klabel lbl as b :: _ -> b, cont | _ -> let b = Klabel(Label.create()) in b,b::cont +*) + +let rec make_branch_2 lbl n cont = + function + Kreturn m :: _ -> (Kreturn (n + m), cont) + | Klabel _ :: c -> make_branch_2 lbl n cont c + | Kpop m :: c -> make_branch_2 lbl (n + m) cont c + | _ -> + match lbl with + Some lbl -> (Kbranch lbl, cont) + | None -> let lbl = Label.create() in (Kbranch lbl, Klabel lbl :: cont) + +let make_branch cont = + match cont with + (Kbranch _ as branch) :: _ -> (branch, cont) + | (Kreturn _ as return) :: _ -> (return, cont) + | Klabel lbl :: _ -> make_branch_2 (Some lbl) 0 cont cont + | _ -> make_branch_2 (None) 0 cont cont (* Check if we're in tailcall position *) @@ -315,52 +323,105 @@ let code_construct tag nparams arity cont = fun_code := [Ksequence (add_grab (nparams+arity) lbl f_cont,!fun_code)]; Kclosure(lbl,0) :: cont -type block = - | Bconstr of constr - | Bstrconst of structured_constant - | Bmakeblock of int * block array - | Bconstruct_app of int * int * int * block array - (* tag , nparams, arity *) - let get_strcst = function | Bstrconst sc -> sc | _ -> raise Not_found -let rec str_const c = + +let rec str_const c = match kind_of_term c with | Sort s -> Bstrconst (Const_sorts s) | Cast(c,_,_) -> str_const c | App(f,args) -> begin match kind_of_term f with - | Construct((kn,j),i) -> + | Construct((kn,j),i) -> (* arnaud: Construct(((kn,j),i) as cstr) -> *) + begin let oib = lookup_mind kn !global_env in let oip = oib.mind_packets.(j) in let num,arity = oip.mind_reloc_tbl.(i-1) in let nparams = oib.mind_nparams in if nparams + arity = Array.length args then - if arity = 0 then Bstrconst(Const_b0 num) - else - let rargs = Array.sub args nparams arity in - let b_args = Array.map str_const rargs in - try - let sc_args = Array.map get_strcst b_args in - Bstrconst(Const_bn(num, sc_args)) - with Not_found -> - Bmakeblock(num,b_args) + (* spiwack: *) + (* 1/ tries to compile the constructor in an optimal way, + it is supposed to work only if the arguments are + all fully constructed, fails with Cbytecodes.NotClosed. + it can also raise Not_found when there is no special + treatment for this constructor + for instance: tries to to compile an integer of the + form I31 D1 D2 ... D31 to [D1D2...D31] as + a processor number (a caml number actually) *) + try + try + Bstrconst (Retroknowledge.get_vm_constant_static_info + (!global_env).retroknowledge + (kind_of_term f) args) + with NotClosed -> + (* 2/ if the arguments are not all closed (this is + expectingly (and it is currently the case) the only + reason why this exception is raised) tries to + give a clever, run-time behavior to the constructor. + Raises Not_found if there is no special treatment + for this integer. + this is done in a lazy fashion, using the constructor + Bspecial because it needs to know the continuation + and such, which can't be done at this time. + for instance, for int31: if one of the digit is + not closed, it's not impossible that the number + gets fully instanciated at run-time, thus to ensure + uniqueness of the representation in the vm + it is necessary to try and build a caml integer + during the execution *) + let rargs = Array.sub args nparams arity in + let b_args = Array.map str_const rargs in + Bspecial ((Retroknowledge.get_vm_constant_dynamic_info + (!global_env).retroknowledge + (kind_of_term f)), + b_args) + with Not_found -> + (* 3/ if no special behavior is available, then the compiler + falls back to the normal behavior *) + if arity = 0 then Bstrconst(Const_b0 num) + else + let rargs = Array.sub args nparams arity in + let b_args = Array.map str_const rargs in + try + let sc_args = Array.map get_strcst b_args in + Bstrconst(Const_bn(num, sc_args)) + with Not_found -> + Bmakeblock(num,b_args) else - let b_args = Array.map str_const args in - Bconstruct_app(num, nparams, arity, b_args) + let b_args = Array.map str_const args in + (* spiwack: tries first to apply the run-time compilation + behavior of the constructor, as in 2/ above *) + try + Bspecial ((Retroknowledge.get_vm_constant_dynamic_info + (!global_env).retroknowledge + (kind_of_term f)), + b_args) + with Not_found -> + Bconstruct_app(num, nparams, arity, b_args) + end | _ -> Bconstr c end | Ind ind -> Bstrconst (Const_ind ind) - | Construct ((kn,j),i) -> - let oib = lookup_mind kn !global_env in - let oip = oib.mind_packets.(j) in - let num,arity = oip.mind_reloc_tbl.(i-1) in - let nparams = oib.mind_nparams in - if nparams + arity = 0 then Bstrconst(Const_b0 num) - else Bconstruct_app(num,nparams,arity,[||]) + | Construct ((kn,j),i) -> (*arnaud: Construct ((kn,j),i as cstr) -> *) + begin + (* spiwack: tries first to apply the run-time compilation + behavior of the constructor, as in 2/ above *) + try + Bspecial ((Retroknowledge.get_vm_constant_dynamic_info + (!global_env).retroknowledge + (kind_of_term c)), + [| |]) + with Not_found -> + let oib = lookup_mind kn !global_env in + let oip = oib.mind_packets.(j) in + let num,arity = oip.mind_reloc_tbl.(i-1) in + let nparams = oib.mind_nparams in + if nparams + arity = 0 then Bstrconst(Const_b0 num) + else Bconstruct_app(num,nparams,arity,[||]) + end | _ -> Bconstr c (* compilation des applications *) @@ -413,6 +474,7 @@ let rec get_allias env kn = | BCallias kn' -> get_allias env kn' | _ -> kn + (* compilation des expressions *) let rec compile_constr reloc c sz cont = @@ -424,8 +486,7 @@ let rec compile_constr reloc c sz cont = | Rel i -> pos_rel i reloc sz :: cont | Var id -> pos_named id reloc :: cont - | Const kn -> Kgetglobal (get_allias !global_env kn) :: cont - + | Const kn -> compile_const reloc kn [||] sz cont | Sort _ | Ind _ | Construct _ -> compile_str_cst reloc (str_const c) sz cont @@ -452,6 +513,7 @@ let rec compile_constr reloc c sz cont = begin match kind_of_term f with | Construct _ -> compile_str_cst reloc (str_const c) sz cont + | Const kn -> compile_const reloc kn args sz cont | _ -> comp_app compile_constr compile_constr reloc f args sz cont end | Fix ((rec_args,init),(_,type_bodies,rec_bodies)) -> @@ -569,11 +631,19 @@ let rec compile_constr reloc c sz cont = done; c := Klabel lbl_sw :: Kswitch(lbl_consts,lbl_blocks) :: !c; let code_sw = - match branch1 with - | Klabel lbl -> Kpush_retaddr lbl :: !c + match branch1 with + (* spiwack : branch1 can't be a lbl anymore it's a Branch instead + | Klabel lbl -> Kpush_retaddr lbl :: !c *) + | Kbranch lbl -> Kpush_retaddr lbl :: !c | _ -> !c in - compile_constr reloc a sz code_sw + compile_constr reloc a sz + (try + let entry = Term.Ind ind in + Retroknowledge.get_vm_before_match_info (!global_env).retroknowledge + entry code_sw + with Not_found -> + code_sw) and compile_str_cst reloc sc sz cont = match sc with @@ -588,6 +658,40 @@ and compile_str_cst reloc sc sz cont = comp_app (fun _ _ _ cont -> code_construct tag nparams arity cont) compile_str_cst reloc () args sz cont + | Bspecial (comp_fx, args) -> comp_fx reloc args sz cont + + +(* spiwack : compilation of constants with their arguments. + Makes a special treatment with 31-bit integer addition *) +and compile_const = +(*arnaud: let code_construct kn cont = + let f_cont = + let else_lbl = Label.create () in + Kareconst(2, else_lbl):: Kacc 0:: Kpop 1:: + Kaddint31:: Kreturn 0:: Klabel else_lbl:: + (* works as comp_app with nargs = 2 and tailcall cont [Kreturn 0]*) + Kgetglobal (get_allias !global_env kn):: + Kappterm(2, 2):: [] (* = discard_dead_code [Kreturn 0] *) + in + let lbl = Label.create () in + fun_code := [Ksequence (add_grab 2 lbl f_cont, !fun_code)]; + Kclosure(lbl, 0)::cont + in *) + fun reloc-> fun kn -> fun args -> fun sz -> fun cont -> + let nargs = Array.length args in + (* spiwack: checks if there is a specific way to compile the constant + if there is not, Not_found is raised, and the function + falls back on its normal behavior *) + try + Retroknowledge.get_vm_compiling_info (!global_env).retroknowledge + (kind_of_term (mkConst kn)) reloc args sz cont + with Not_found -> + if nargs = 0 then + Kgetglobal (get_allias !global_env kn) :: cont + else + comp_app (fun _ _ _ cont -> + Kgetglobal (get_allias !global_env kn) :: cont) + compile_constr reloc () args sz cont let compile env c = set_global_env env; @@ -625,3 +729,138 @@ let compile_constant_body env body opaque boxed = let to_patch = to_memory res in BCdefined (false, to_patch) + +(* spiwack: additional function which allow different part of compilation of the + 31-bit integers *) + +let make_areconst n else_lbl cont = + if n <=0 then + cont + else + Kareconst (n, else_lbl)::cont + + +(* try to compile int31 as a const_b0. Succeed if all the arguments are closed + fails otherwise by raising NotClosed*) +let compile_structured_int31 fc args = + if not fc then raise Not_found else + Const_b0 + (Array.fold_left + (fun temp_i -> fun t -> match kind_of_term t with + | Construct (_,d) -> 2*temp_i+d-1 + | _ -> raise NotClosed) + 0 args + ) + +(* this function is used for the compilation of the constructor of + the int31, it is used when it appears not fully applied, or + applied to at least one non-closed digit *) +let dynamic_int31_compilation fc reloc args sz cont = + if not fc then raise Not_found else + let nargs = Array.length args in + if nargs = 31 then + let (escape,labeled_cont) = make_branch cont in + let else_lbl = Label.create() in + comp_args compile_str_cst reloc args sz + ( Kisconst else_lbl::Kareconst(30,else_lbl)::Kcompint31::escape::Klabel else_lbl::Kmakeblock(31, 1)::labeled_cont) + else + let code_construct cont = (* spiwack: variant of the global code_construct + which handles dynamic compilation of + integers *) + let f_cont = + let else_lbl = Label.create () in + [Kacc 0; Kpop 1; Kisconst else_lbl; Kareconst(30,else_lbl); + Kcompint31; Kreturn 0; Klabel else_lbl; Kmakeblock(31, 1); Kreturn 0] + in + let lbl = Label.create() in + fun_code := [Ksequence (add_grab 31 lbl f_cont,!fun_code)]; + Kclosure(lbl,0) :: cont + in + if nargs = 0 then + code_construct cont + else + comp_app (fun _ _ _ cont -> code_construct cont) + compile_str_cst reloc () args sz cont + +(*(* template compilation for 2ary operation, it probably possible + to make a generic such function with arity abstracted *) +let op2_compilation op = + let code_construct normal cont = (*kn cont =*) + let f_cont = + let else_lbl = Label.create () in + Kareconst(2, else_lbl):: Kacc 0:: Kpop 1:: + op:: Kreturn 0:: Klabel else_lbl:: + (* works as comp_app with nargs = 2 and tailcall cont [Kreturn 0]*) + (*Kgetglobal (get_allias !global_env kn):: *) + normal:: + Kappterm(2, 2):: [] (* = discard_dead_code [Kreturn 0] *) + in + let lbl = Label.create () in + fun_code := [Ksequence (add_grab 2 lbl f_cont, !fun_code)]; + Kclosure(lbl, 0)::cont + in + fun normal fc _ reloc args sz cont -> + if not fc then raise Not_found else + let nargs = Array.length args in + if nargs=2 then (*if it is a fully applied addition*) + let (escape, labeled_cont) = make_branch cont in + let else_lbl = Label.create () in + comp_args compile_constr reloc args sz + (Kisconst else_lbl::(make_areconst 1 else_lbl + (*Kaddint31::escape::Klabel else_lbl::Kpush::*) + (op::escape::Klabel else_lbl::Kpush:: + (* works as comp_app with nargs = 2 and non-tailcall cont*) + (*Kgetglobal (get_allias !global_env kn):: *) + normal:: + Kapply 2::labeled_cont))) + else if nargs=0 then + code_construct normal cont + else + comp_app (fun _ _ _ cont -> code_construct normal cont) + compile_constr reloc () args sz cont *) + +(*template for n-ary operation, invariant: n>=1, + the operations does the following : + 1/ checks if all the arguments are constants (i.e. non-block values) + 2/ if they are, uses the "op" instruction to execute + 3/ if at least one is not, branches to the normal behavior: + Kgetglobal (get_allias !global_env kn) *) +let op_compilation n op = + let code_construct kn cont = + let f_cont = + let else_lbl = Label.create () in + Kareconst(n, else_lbl):: Kacc 0:: Kpop 1:: + op:: Kreturn 0:: Klabel else_lbl:: + (* works as comp_app with nargs = n and tailcall cont [Kreturn 0]*) + Kgetglobal (get_allias !global_env kn):: + Kappterm(n, n):: [] (* = discard_dead_code [Kreturn 0] *) + in + let lbl = Label.create () in + fun_code := [Ksequence (add_grab n lbl f_cont, !fun_code)]; + Kclosure(lbl, 0)::cont + in + fun kn fc reloc args sz cont -> + if not fc then raise Not_found else + let nargs = Array.length args in + if nargs=n then (*if it is a fully applied addition*) + let (escape, labeled_cont) = make_branch cont in + let else_lbl = Label.create () in + comp_args compile_constr reloc args sz + (Kisconst else_lbl::(make_areconst (n-1) else_lbl + (*Kaddint31::escape::Klabel else_lbl::Kpush::*) + (op::escape::Klabel else_lbl::Kpush:: + (* works as comp_app with nargs = n and non-tailcall cont*) + Kgetglobal (get_allias !global_env kn):: + Kapply n::labeled_cont))) + else if nargs=0 then + code_construct kn cont + else + comp_app (fun _ _ _ cont -> code_construct kn cont) + compile_constr reloc () args sz cont + +let int31_escape_before_match fc cont = + if not fc then + raise Not_found + else + let escape_lbl, labeled_cont = label_code cont in + (Kisconst escape_lbl)::Kdecompint31::labeled_cont diff --git a/kernel/cbytegen.mli b/kernel/cbytegen.mli index f761e4f6..dfdcb074 100644 --- a/kernel/cbytegen.mli +++ b/kernel/cbytegen.mli @@ -6,7 +6,6 @@ open Declarations open Pre_env - val compile : env -> constr -> bytecodes * bytecodes * fv (* init, fun, fv *) @@ -15,3 +14,27 @@ val compile_constant_body : (* opaque *) (* boxed *) +(* spiwack: this function contains the information needed to perform + the static compilation of int31 (trying and obtaining + a 31-bit integer in processor representation at compile time) *) +val compile_structured_int31 : bool -> constr array -> + structured_constant + +(* this function contains the information needed to perform + the dynamic compilation of int31 (trying and obtaining a + 31-bit integer in processor representation at runtime when + it failed at compile time *) +val dynamic_int31_compilation : bool -> comp_env -> + block array -> + int -> bytecodes -> bytecodes + +(*spiwack: template for the compilation n-ary operation, invariant: n>=1. + works as follow: checks if all the arguments are non-pointers + if they are applies the operation (second argument) if not + all of them are, returns to a coq definition (third argument) *) +val op_compilation : int -> instruction -> constant -> bool -> comp_env -> + constr array -> int -> bytecodes-> bytecodes + +(*spiwack: compiling function to insert dynamic decompilation before + matching integers (in case they are in processor representation) *) +val int31_escape_before_match : bool -> bytecodes -> bytecodes diff --git a/kernel/cemitcodes.ml b/kernel/cemitcodes.ml index 4e09a0ed..7617c454 100644 --- a/kernel/cemitcodes.ml +++ b/kernel/cemitcodes.ml @@ -23,6 +23,7 @@ let patch_int buff pos n = let out_buffer = ref(String.create 1024) and out_position = ref 0 + (* let out_word b1 b2 b3 b4 = let p = !out_position in @@ -38,6 +39,7 @@ let out_word b1 b2 b3 b4 = String.unsafe_set !out_buffer (p+3) (Char.unsafe_chr b4); out_position := p + 4 *) + let out_word b1 b2 b3 b4 = let p = !out_position in if p >= String.length !out_buffer then begin @@ -60,6 +62,7 @@ let out_word b1 b2 b3 b4 = String.unsafe_set !out_buffer (p+3) (Char.unsafe_chr b4); out_position := p + 4 + let out opcode = out_word opcode 0 0 0 @@ -108,7 +111,10 @@ let out_label_with_orig orig lbl = Label_defined def -> out_int((def - orig) asr 2) | Label_undefined patchlist -> - if patchlist = [] then + (* spiwack: patchlist is supposed to be non-empty all the time + thus I commented that out. If there is no problem I suggest + removing it for next release (cur: 8.1) *) + (*if patchlist = [] then *) (!label_table).(lbl) <- Label_undefined((!out_position, orig) :: patchlist); out_int 0 @@ -219,9 +225,30 @@ let emit_instr = function | Ksetfield n -> if n <= 1 then out (opSETFIELD0+n) else (out opSETFIELD;out_int n) + | Ksequence _ -> raise (Invalid_argument "Cemitcodes.emit_instr") + (* spiwack *) + | Kbranch lbl -> out opBRANCH; out_label lbl + | Kaddint31 -> out opADDINT31 + | Kaddcint31 -> out opADDCINT31 + | Kaddcarrycint31 -> out opADDCARRYCINT31 + | Ksubint31 -> out opSUBINT31 + | Ksubcint31 -> out opSUBCINT31 + | Ksubcarrycint31 -> out opSUBCARRYCINT31 + | Kmulint31 -> out opMULINT31 + | Kmulcint31 -> out opMULCINT31 + | Kdiv21int31 -> out opDIV21INT31 + | Kdivint31 -> out opDIVINT31 + | Kaddmuldivint31 -> out opADDMULDIVINT31 + | Kcompareint31 -> out opCOMPAREINT31 + | Khead0int31 -> out opHEAD0INT31 + | Ktail0int31 -> out opTAIL0INT31 + | Kisconst lbl -> out opISCONST; out_label lbl + | Kareconst(n,lbl) -> out opARECONST; out_int n; out_label lbl + | Kcompint31 -> out opCOMPINT31 + | Kdecompint31 -> out opDECOMPINT31 + (*/spiwack *) | Kstop -> out opSTOP - | Ksequence _ -> raise (Invalid_argument "Cemitcodes.emit_instr") (* Emission of a list of instructions. Include some peephole optimization. *) diff --git a/kernel/closure.ml b/kernel/closure.ml index 41fe8750..b85be204 100644 --- a/kernel/closure.ml +++ b/kernel/closure.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: closure.ml 9215 2006-10-05 15:40:31Z herbelin $ *) +(* $Id: closure.ml 10819 2008-04-20 18:14:44Z msozeau $ *) open Util open Pp @@ -165,143 +165,15 @@ let betadeltaiotanolet = mkflags [fBETA;fDELTA;fIOTA] let betaiota = mkflags [fBETA;fIOTA] let beta = mkflags [fBETA] let betaiotazeta = mkflags [fBETA;fIOTA;fZETA] + +(* Removing fZETA for finer behaviour would break many developments *) +let unfold_side_flags = [fBETA;fIOTA;fZETA] +let unfold_side_red = mkflags [fBETA;fIOTA;fZETA] let unfold_red kn = let flag = match kn with | EvalVarRef id -> fVAR id - | EvalConstRef kn -> fCONST kn - in (* Remove fZETA for finer behaviour ? *) - mkflags [fBETA;flag;fIOTA;fZETA] - -(************************* Obsolète -(* [r_const=(true,cl)] means all constants but those in [cl] *) -(* [r_const=(false,cl)] means only those in [cl] *) -type reds = { - r_beta : bool; - r_const : bool * constant_path list * identifier list; - r_zeta : bool; - r_evar : bool; - r_iota : bool } - -let betadeltaiota_red = { - r_beta = true; - r_const = true,[],[]; - r_zeta = true; - r_evar = true; - r_iota = true } - -let betaiota_red = { - r_beta = true; - r_const = false,[],[]; - r_zeta = false; - r_evar = false; - r_iota = true } - -let beta_red = { - r_beta = true; - r_const = false,[],[]; - r_zeta = false; - r_evar = false; - r_iota = false } - -let no_red = { - r_beta = false; - r_const = false,[],[]; - r_zeta = false; - r_evar = false; - r_iota = false } - -let betaiotazeta_red = { - r_beta = true; - r_const = false,[],[]; - r_zeta = true; - r_evar = false; - r_iota = true } - -let unfold_red kn = - let c = match kn with - | EvalVarRef id -> false,[],[id] - | EvalConstRef kn -> false,[kn],[] - in { - r_beta = true; - r_const = c; - r_zeta = true; (* false for finer behaviour ? *) - r_evar = false; - r_iota = true } - -(* Sets of reduction kinds. - Main rule: delta implies all consts (both global (= by - kernel_name) and local (= by Rel or Var)), all evars, and zeta (= letin's). - Rem: reduction of a Rel/Var bound to a term is Delta, but reduction of - a LetIn expression is Letin reduction *) - -type red_kind = - BETA | DELTA | ZETA | IOTA - | CONST of constant_path list | CONSTBUT of constant_path list - | VAR of identifier | VARBUT of identifier - -let rec red_add red = function - | BETA -> { red with r_beta = true } - | DELTA -> - (match red.r_const with - | _,_::_,[] | _,[],_::_ -> error "Conflict in the reduction flags" - | _ -> { red with r_const = true,[],[]; r_zeta = true; r_evar = true }) - | CONST cl -> - (match red.r_const with - | true,_,_ -> error "Conflict in the reduction flags" - | _,l1,l2 -> { red with r_const = false, list_union cl l1, l2 }) - | CONSTBUT cl -> - (match red.r_const with - | false,_::_,_ | false,_,_::_ -> - error "Conflict in the reduction flags" - | _,l1,l2 -> - { red with r_const = true, list_union cl l1, l2; - r_zeta = true; r_evar = true }) - | IOTA -> { red with r_iota = true } - | ZETA -> { red with r_zeta = true } - | VAR id -> - (match red.r_const with - | true,_,_ -> error "Conflict in the reduction flags" - | _,l1,l2 -> { red with r_const = false, l1, list_union [id] l2 }) - | VARBUT cl -> - (match red.r_const with - | false,_::_,_ | false,_,_::_ -> - error "Conflict in the reduction flags" - | _,l1,l2 -> - { red with r_const = true, l1, list_union [cl] l2; - r_zeta = true; r_evar = true }) - -let red_delta_set red = - let b,_,_ = red.r_const in b - -let red_local_const = red_delta_set - -(* to know if a redex is allowed, only a subset of red_kind is used ... *) -let red_set red = function - | BETA -> incr_cnt red.r_beta beta - | CONST [kn] -> - let (b,l,_) = red.r_const in - let c = List.mem kn l in - incr_cnt ((b & not c) or (c & not b)) delta - | VAR id -> (* En attendant d'avoir des kn pour les Var *) - let (b,_,l) = red.r_const in - let c = List.mem id l in - incr_cnt ((b & not c) or (c & not b)) delta - | ZETA -> incr_cnt red.r_zeta zeta - | EVAR -> incr_cnt red.r_zeta evar - | IOTA -> incr_cnt red.r_iota iota - | DELTA -> red_delta_set red (*Used for Rel/Var defined in context*) - (* Not for internal use *) - | CONST _ | CONSTBUT _ | VAR _ | VARBUT _ -> failwith "not implemented" - -(* Gives the constant list *) -let red_get_const red = - let b,l1,l2 = red.r_const in - let l1' = List.map (fun x -> EvalConstRef x) l1 in - let l2' = List.map (fun x -> EvalVarRef x) l2 in - b, l1' @ l2' -fin obsolète **************) -(* specification of the reduction function *) - + | EvalConstRef kn -> fCONST kn in + mkflags (flag::unfold_side_flags) (* Flags of reduction and cache of constants: 'a is a type that may be * mapped to constr. 'a infos implements a cache for constants and @@ -980,7 +852,7 @@ and knht e t stk = (************************************************************************) -(* Computes a normal form from the result of knh. *) +(* Computes a weak head normal form from the result of knh. *) let rec knr info m stk = match m.term with | FLambda(n,tys,f,e) when red_set info.i_flags fBETA -> @@ -1082,6 +954,11 @@ and norm_head info m = let fbds = Array.map (mk_clos (subs_liftn (Array.length na) e)) bds in mkCoFix(n,(na, Array.map (kl info) ftys, Array.map (kl info) fbds)) + | FFix((n,(na,tys,bds)),e) -> + let ftys = Array.map (mk_clos e) tys in + let fbds = + Array.map (mk_clos (subs_liftn (Array.length na) e)) bds in + mkFix(n,(na, Array.map (kl info) ftys, Array.map (kl info) fbds)) | FEvar(i,args) -> mkEvar(i, Array.map (kl info) args) | t -> term_of_fconstr m diff --git a/kernel/closure.mli b/kernel/closure.mli index 924da0a5..c814baad 100644 --- a/kernel/closure.mli +++ b/kernel/closure.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: closure.mli 9215 2006-10-05 15:40:31Z herbelin $ i*) +(*i $Id: closure.mli 10652 2008-03-10 21:52:06Z herbelin $ i*) (*i*) open Pp @@ -37,11 +37,7 @@ module type RedFlagsSig = sig type reds type red_kind - (* The different kind of reduction *) - (* Const/Var means the reference as argument should be unfolded *) - (* Constbut/Varbut means all references except the ones as argument - of Constbut/Varbut should be unfolded (there may be several such - Constbut/Varbut *) + (* The different kinds of reduction *) val fBETA : red_kind val fDELTA : red_kind val fIOTA : red_kind @@ -80,6 +76,7 @@ val betadeltaiota : reds val betaiotazeta : reds val betadeltaiotanolet : reds +val unfold_side_red : reds val unfold_red : evaluable_global_reference -> reds (***********************************************************************) diff --git a/kernel/conv_oracle.ml b/kernel/conv_oracle.ml index 4c692308..898a1ab3 100644 --- a/kernel/conv_oracle.ml +++ b/kernel/conv_oracle.ml @@ -6,37 +6,71 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: conv_oracle.ml 6303 2004-11-16 12:37:40Z sacerdot $ *) +(* $Id: conv_oracle.ml 10961 2008-05-21 23:26:23Z barras $ *) open Names -(* Opaque constants *) -let cst_transp = ref Cpred.full +(* Priority for the expansion of constant in the conversion test. + * Higher levels means that the expansion is less prioritary. + * (And Expand stands for -oo, and Opaque +oo.) + * The default value is [Level 100]. + *) +type level = Expand | Level of int | Opaque +let default = Level 0 +let transparent = default -let set_opaque_const kn = cst_transp := Cpred.remove kn !cst_transp -let set_transparent_const kn = cst_transp := Cpred.add kn !cst_transp +type oracle = level Idmap.t * level Cmap.t -let is_opaque_cst kn = not (Cpred.mem kn !cst_transp) +let var_opacity = ref Idmap.empty +let cst_opacity = ref Cmap.empty -(* Opaque variables *) -let var_transp = ref Idpred.full +let get_strategy = function + | VarKey id -> + (try Idmap.find id !var_opacity + with Not_found -> default) + | ConstKey c -> + (try Cmap.find c !cst_opacity + with Not_found -> default) + | RelKey _ -> Expand -let set_opaque_var kn = var_transp := Idpred.remove kn !var_transp -let set_transparent_var kn = var_transp := Idpred.add kn !var_transp +let set_strategy k l = + match k with + | VarKey id -> + var_opacity := + if l=default then Idmap.remove id !var_opacity + else Idmap.add id l !var_opacity + | ConstKey c -> + cst_opacity := + if l=default then Cmap.remove c !cst_opacity + else Cmap.add c l !cst_opacity + | RelKey _ -> Util.error "set_strategy: RelKey" -let is_opaque_var kn = not (Idpred.mem kn !var_transp) +let set_transparent_const kn = + cst_opacity := Cmap.remove kn !cst_opacity +let set_transparent_var id = + var_opacity := Idmap.remove id !var_opacity -(* Opaque reference keys *) -let is_opaque = function - | ConstKey cst -> is_opaque_cst cst - | VarKey id -> is_opaque_var id - | RelKey _ -> false +let set_opaque_const kn = set_strategy (ConstKey kn) Opaque +let set_opaque_var id = set_strategy (VarKey id) Opaque -(* Unfold the first only if it is not opaque and the second is opaque *) -let oracle_order k1 k2 = is_opaque k2 & not (is_opaque k1) +let get_transp_state () = + (Idmap.fold + (fun id l ts -> if l=Opaque then Idpred.remove id ts else ts) + !var_opacity Idpred.full, + Cmap.fold + (fun c l ts -> if l=Opaque then Cpred.remove c ts else ts) + !cst_opacity Cpred.full) + +(* Unfold the first constant only if it is "more transparent" than the + second one. In case of tie, expand the second one. *) +let oracle_order k1 k2 = + match get_strategy k1, get_strategy k2 with + | Expand, _ -> true + | Level n1, Opaque -> true + | Level n1, Level n2 -> n1 < n2 + | _ -> false (* expand k2 *) (* summary operations *) -type transparent_state = Idpred.t * Cpred.t -let init() = (cst_transp := Cpred.full; var_transp := Idpred.full) -let freeze () = (!var_transp, !cst_transp) -let unfreeze (vo,co) = (cst_transp := co; var_transp := vo) +let init() = (cst_opacity := Cmap.empty; var_opacity := Idmap.empty) +let freeze () = (!var_opacity, !cst_opacity) +let unfreeze (vo,co) = (cst_opacity := co; var_opacity := vo) diff --git a/kernel/conv_oracle.mli b/kernel/conv_oracle.mli index 966edd1d..6a774b4b 100644 --- a/kernel/conv_oracle.mli +++ b/kernel/conv_oracle.mli @@ -6,30 +6,35 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: conv_oracle.mli 6621 2005-01-21 17:24:37Z herbelin $ i*) +(*i $Id: conv_oracle.mli 10961 2008-05-21 23:26:23Z barras $ i*) open Names - (* Order on section paths for unfolding. If [oracle_order kn1 kn2] is true, then unfold kn1 first. Note: the oracle does not introduce incompleteness, it only tries to postpone unfolding of "opaque" constants. *) val oracle_order : 'a tableKey -> 'a tableKey -> bool -(* Changing the oracle *) -val set_opaque_const : constant -> unit -val set_transparent_const : constant -> unit +(* Priority for the expansion of constant in the conversion test. + * Higher levels means that the expansion is less prioritary. + * (And Expand stands for -oo, and Opaque +oo.) + * The default value (transparent constants) is [Level 0]. + *) +type level = Expand | Level of int | Opaque +val transparent : level -val set_opaque_var : identifier -> unit -val set_transparent_var : identifier -> unit +val get_strategy : 'a tableKey -> level -val is_opaque_cst : constant -> bool -val is_opaque_var : identifier -> bool +(* Sets the level of a constant. + * Level of RelKey constant cannot be set. *) +val set_strategy : 'a tableKey -> level -> unit -(*****************************) +val get_transp_state : unit -> transparent_state -(* transparent state summary operations *) +(*****************************) +(* Summary operations *) +type oracle val init : unit -> unit -val freeze : unit -> transparent_state -val unfreeze : transparent_state -> unit +val freeze : unit -> oracle +val unfreeze : oracle -> unit diff --git a/kernel/cooking.ml b/kernel/cooking.ml index 6b2a6245..e5a97897 100644 --- a/kernel/cooking.ml +++ b/kernel/cooking.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: cooking.ml 9320 2006-10-30 16:53:43Z barras $ i*) +(*i $Id: cooking.ml 10877 2008-04-30 21:58:41Z herbelin $ i*) open Pp open Util @@ -113,7 +113,7 @@ type recipe = { d_modlist : work_list } let on_body f = - option_map (fun c -> Declarations.from_val (f (Declarations.force c))) + Option.map (fun c -> Declarations.from_val (f (Declarations.force c))) let cook_constant env r = let cb = r.d_from in @@ -129,6 +129,8 @@ let cook_constant env r = | PolymorphicArity (ctx,s) -> let t = mkArity (ctx,Type s.poly_level) in let typ = abstract_constant_type (expmod_constr r.d_modlist t) hyps in - Typeops.make_polymorphic_if_arity env typ in + let j = make_judge (force (Option.get body)) typ in + Typeops.make_polymorphic_if_constant_for_ind env j + in let boxed = Cemitcodes.is_boxed cb.const_body_code in - (body, typ, cb.const_constraints, cb.const_opaque, boxed) + (body, typ, cb.const_constraints, cb.const_opaque, boxed,false) diff --git a/kernel/cooking.mli b/kernel/cooking.mli index 93c2ccc9..7596bce6 100644 --- a/kernel/cooking.mli +++ b/kernel/cooking.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: cooking.mli 9310 2006-10-28 19:35:09Z herbelin $ i*) +(*i $Id: cooking.mli 9795 2007-04-25 15:13:45Z soubiran $ i*) open Names open Term @@ -25,7 +25,8 @@ type recipe = { val cook_constant : env -> recipe -> - constr_substituted option * constant_type * constraints * bool * bool + constr_substituted option * constant_type * constraints * bool * bool + * bool (*s Utility functions used in module [Discharge]. *) diff --git a/kernel/csymtable.ml b/kernel/csymtable.ml index fc2d0925..d81b98ac 100644 --- a/kernel/csymtable.ml +++ b/kernel/csymtable.ml @@ -121,31 +121,36 @@ let rec slot_for_getglobal env kn = rk := Some pos; pos -and slot_for_fv env fv= +and slot_for_fv env fv = match fv with | FVnamed id -> - let nv = lookup_named_val id env in + let nv = Pre_env.lookup_named_val id env in begin match !nv with - | VKvalue v -> v - | VKaxiom id -> - let v = val_of_named id in - nv := VKvalue v; v - | VKdef c -> - let v = val_of_constr (env_of_named id env) c in - nv := VKvalue v; v + | VKvalue (v,_) -> v + | VKnone -> + let (_, b, _) = Sign.lookup_named id env.env_named_context in + let v,d = + match b with + | None -> (val_of_named id, Idset.empty) + | Some c -> (val_of_constr env c, Environ.global_vars_set (Environ.env_of_pre_env env) c) + in + nv := VKvalue (v,d); v end | FVrel i -> - let rv = lookup_rel_val i env in + let rv = Pre_env.lookup_rel_val i env in begin match !rv with - | VKvalue v -> v - | VKaxiom k -> - let v = val_of_rel k in - rv := VKvalue v; v - | VKdef c -> - let v = val_of_constr (env_of_rel i env) c in - rv := VKvalue v; v + | VKvalue (v, _) -> v + | VKnone -> + let (_, b, _) = Sign.lookup_rel i env.env_rel_context in + let (v, d) = + match b with + | None -> (val_of_rel i, Idset.empty) + | Some c -> let renv = env_of_rel i env in + (val_of_constr renv c, Environ.global_vars_set (Environ.env_of_pre_env renv) c) + in + rv := VKvalue (v,d); v end and eval_to_patch env (buff,pl,fv) = diff --git a/kernel/declarations.ml b/kernel/declarations.ml index e5e05eb3..6e99bf79 100644 --- a/kernel/declarations.ml +++ b/kernel/declarations.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: declarations.ml 9310 2006-10-28 19:35:09Z herbelin $ i*) +(*i $Id: declarations.ml 10664 2008-03-14 11:27:37Z soubiran $ i*) (*i*) open Util @@ -49,13 +49,14 @@ type constant_body = { const_body_code : Cemitcodes.to_patch_substituted; (* const_type_code : Cemitcodes.to_patch; *) const_constraints : constraints; - const_opaque : bool } + const_opaque : bool; + const_inline : bool} (*s Inductive types (internal representation with redundant information). *) let subst_rel_declaration sub (id,copt,t as x) = - let copt' = option_smartmap (subst_mps sub) copt in + let copt' = Option.smartmap (subst_mps sub) copt in let t' = subst_mps sub t in if copt == copt' & t == t' then x else (id,copt',t') @@ -197,12 +198,13 @@ let subst_arity sub = function (* TODO: should be changed to non-coping after Term.subst_mps *) let subst_const_body sub cb = { const_hyps = (assert (cb.const_hyps=[]); []); - const_body = option_map (subst_constr_subst sub) cb.const_body; + const_body = Option.map (subst_constr_subst sub) cb.const_body; const_type = subst_arity sub cb.const_type; const_body_code = Cemitcodes.subst_to_patch_subst sub cb.const_body_code; (*const_type_code = Cemitcodes.subst_to_patch sub cb.const_type_code;*) const_constraints = cb.const_constraints; - const_opaque = cb.const_opaque } + const_opaque = cb.const_opaque; + const_inline = cb.const_inline} let subst_arity sub = function | Monomorphic s -> @@ -239,49 +241,41 @@ let subst_mind sub mib = map_rel_context (subst_mps sub) mib.mind_params_ctxt; mind_packets = array_smartmap (subst_mind_packet sub) mib.mind_packets ; mind_constraints = mib.mind_constraints ; - mind_equiv = option_map (subst_kn sub) mib.mind_equiv } + mind_equiv = Option.map (subst_kn sub) mib.mind_equiv } (*s Modules: signature component specifications, module types, and module declarations *) -type specification_body = - | SPBconst of constant_body - | SPBmind of mutual_inductive_body - | SPBmodule of module_specification_body - | SPBmodtype of module_type_body +type structure_field_body = + | SFBconst of constant_body + | SFBmind of mutual_inductive_body + | SFBmodule of module_body + | SFBalias of module_path * constraints option + | SFBmodtype of module_type_body -and module_signature_body = (label * specification_body) list +and structure_body = (label * structure_field_body) list -and module_type_body = - | MTBident of kernel_name - | MTBfunsig of mod_bound_id * module_type_body * module_type_body - | MTBsig of mod_self_id * module_signature_body - -and module_specification_body = - { msb_modtype : module_type_body; - msb_equiv : module_path option; - msb_constraints : constraints } - -type structure_elem_body = - | SEBconst of constant_body - | SEBmind of mutual_inductive_body - | SEBmodule of module_body - | SEBmodtype of module_type_body - -and module_structure_body = (label * structure_elem_body) list - -and module_expr_body = - | MEBident of module_path - | MEBfunctor of mod_bound_id * module_type_body * module_expr_body - | MEBstruct of mod_self_id * module_structure_body - | MEBapply of module_expr_body * module_expr_body +and struct_expr_body = + | SEBident of module_path + | SEBfunctor of mod_bound_id * module_type_body * struct_expr_body + | SEBstruct of mod_self_id * structure_body + | SEBapply of struct_expr_body * struct_expr_body * constraints + | SEBwith of struct_expr_body * with_declaration_body +and with_declaration_body = + With_module_body of identifier list * module_path * constraints + | With_definition_body of identifier list * constant_body + and module_body = - { mod_expr : module_expr_body option; - mod_user_type : module_type_body option; - mod_type : module_type_body; - mod_equiv : module_path option; - mod_constraints : constraints } + { mod_expr : struct_expr_body option; + mod_type : struct_expr_body option; + mod_constraints : constraints; + mod_alias : substitution; + mod_retroknowledge : Retroknowledge.action list} +and module_type_body = + { typ_expr : struct_expr_body; + typ_strength : module_path option; + typ_alias : substitution} diff --git a/kernel/declarations.mli b/kernel/declarations.mli index 1eaeecb9..fa03a338 100644 --- a/kernel/declarations.mli +++ b/kernel/declarations.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: declarations.mli 9310 2006-10-28 19:35:09Z herbelin $ i*) +(*i $Id: declarations.mli 10664 2008-03-14 11:27:37Z soubiran $ i*) (*i*) open Names @@ -47,7 +47,8 @@ type constant_body = { const_body_code : to_patch_substituted; (*i const_type_code : to_patch;i*) const_constraints : constraints; - const_opaque : bool } + const_opaque : bool; + const_inline : bool} val subst_const_body : substitution -> constant_body -> constant_body @@ -176,50 +177,35 @@ val subst_mind : substitution -> mutual_inductive_body -> mutual_inductive_body (*s Modules: signature component specifications, module types, and module declarations *) -type specification_body = - | SPBconst of constant_body - | SPBmind of mutual_inductive_body - | SPBmodule of module_specification_body - | SPBmodtype of module_type_body - -and module_signature_body = (label * specification_body) list - -and module_type_body = - | MTBident of kernel_name - | MTBfunsig of mod_bound_id * module_type_body * module_type_body - | MTBsig of mod_self_id * module_signature_body - -and module_specification_body = - { msb_modtype : module_type_body; - msb_equiv : module_path option; - msb_constraints : constraints } - (* [type_of](equiv) <: modtype (if given) - + substyping of past [With_Module] mergers *) - - -type structure_elem_body = - | SEBconst of constant_body - | SEBmind of mutual_inductive_body - | SEBmodule of module_body - | SEBmodtype of module_type_body - -and module_structure_body = (label * structure_elem_body) list - -and module_expr_body = - | MEBident of module_path - | MEBfunctor of mod_bound_id * module_type_body * module_expr_body - | MEBstruct of mod_self_id * module_structure_body - | MEBapply of module_expr_body * module_expr_body (* (F A) *) - * constraints (* [type_of](A) <: [input_type_of](F) *) - +type structure_field_body = + | SFBconst of constant_body + | SFBmind of mutual_inductive_body + | SFBmodule of module_body + | SFBalias of module_path * constraints option + | SFBmodtype of module_type_body + +and structure_body = (label * structure_field_body) list + +and struct_expr_body = + | SEBident of module_path + | SEBfunctor of mod_bound_id * module_type_body * struct_expr_body + | SEBstruct of mod_self_id * structure_body + | SEBapply of struct_expr_body * struct_expr_body + * constraints + | SEBwith of struct_expr_body * with_declaration_body + +and with_declaration_body = + With_module_body of identifier list * module_path * constraints + | With_definition_body of identifier list * constant_body + and module_body = - { mod_expr : module_expr_body option; - mod_user_type : module_type_body option; - mod_type : module_type_body; - mod_equiv : module_path option; - mod_constraints : constraints } - (* [type_of(mod_expr)] <: [mod_user_type] (if given) *) - (* if equiv given then constraints are empty *) - - + { mod_expr : struct_expr_body option; + mod_type : struct_expr_body option; + mod_constraints : constraints; + mod_alias : substitution; + mod_retroknowledge : Retroknowledge.action list} +and module_type_body = + { typ_expr : struct_expr_body; + typ_strength : module_path option; + typ_alias : substitution} diff --git a/kernel/entries.ml b/kernel/entries.ml index 56b198c3..b6b09c64 100644 --- a/kernel/entries.ml +++ b/kernel/entries.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: entries.ml 8647 2006-03-18 15:33:09Z herbelin $ i*) +(*i $Id: entries.ml 10664 2008-03-14 11:27:37Z soubiran $ i*) (*i*) open Names @@ -62,7 +62,7 @@ type definition_entry = { const_entry_opaque : bool; const_entry_boxed : bool} -type parameter_entry = types +type parameter_entry = types*bool type constant_entry = | DefinitionEntry of definition_entry @@ -74,30 +74,23 @@ type specification_entry = SPEconst of constant_entry | SPEmind of mutual_inductive_entry | SPEmodule of module_entry - | SPEmodtype of module_type_entry + | SPEalias of module_path + | SPEmodtype of module_struct_entry -and module_type_entry = - MTEident of kernel_name - | MTEfunsig of mod_bound_id * module_type_entry * module_type_entry - | MTEsig of mod_self_id * module_signature_entry - | MTEwith of module_type_entry * with_declaration - -and module_signature_entry = (label * specification_entry) list +and module_struct_entry = + MSEident of module_path + | MSEfunctor of mod_bound_id * module_struct_entry * module_struct_entry + | MSEwith of module_struct_entry * with_declaration + | MSEapply of module_struct_entry * module_struct_entry and with_declaration = With_Module of identifier list * module_path | With_Definition of identifier list * constr -and module_expr = - MEident of module_path - | MEfunctor of mod_bound_id * module_type_entry * module_expr - | MEstruct of mod_self_id * module_structure - | MEapply of module_expr * module_expr - and module_structure = (label * specification_entry) list - and module_entry = - { mod_entry_type : module_type_entry option; - mod_entry_expr : module_expr option} + { mod_entry_type : module_struct_entry option; + mod_entry_expr : module_struct_entry option} + diff --git a/kernel/entries.mli b/kernel/entries.mli index b9a95d44..ed315ab8 100644 --- a/kernel/entries.mli +++ b/kernel/entries.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: entries.mli 8647 2006-03-18 15:33:09Z herbelin $ i*) +(*i $Id: entries.mli 10664 2008-03-14 11:27:37Z soubiran $ i*) (*i*) open Names @@ -61,7 +61,7 @@ type definition_entry = { const_entry_opaque : bool; const_entry_boxed : bool } -type parameter_entry = types +type parameter_entry = types*bool (*inline flag*) type constant_entry = | DefinitionEntry of definition_entry @@ -73,30 +73,23 @@ type specification_entry = SPEconst of constant_entry | SPEmind of mutual_inductive_entry | SPEmodule of module_entry - | SPEmodtype of module_type_entry + | SPEalias of module_path + | SPEmodtype of module_struct_entry -and module_type_entry = - MTEident of kernel_name - | MTEfunsig of mod_bound_id * module_type_entry * module_type_entry - | MTEsig of mod_self_id * module_signature_entry - | MTEwith of module_type_entry * with_declaration - -and module_signature_entry = (label * specification_entry) list +and module_struct_entry = + MSEident of module_path + | MSEfunctor of mod_bound_id * module_struct_entry * module_struct_entry + | MSEwith of module_struct_entry * with_declaration + | MSEapply of module_struct_entry * module_struct_entry and with_declaration = With_Module of identifier list * module_path | With_Definition of identifier list * constr -and module_expr = - MEident of module_path - | MEfunctor of mod_bound_id * module_type_entry * module_expr - | MEstruct of mod_self_id * module_structure - | MEapply of module_expr * module_expr - and module_structure = (label * specification_entry) list - and module_entry = - { mod_entry_type : module_type_entry option; - mod_entry_expr : module_expr option} + { mod_entry_type : module_struct_entry option; + mod_entry_expr : module_struct_entry option} + diff --git a/kernel/environ.ml b/kernel/environ.ml index 87a6e485..ad435eb5 100644 --- a/kernel/environ.ml +++ b/kernel/environ.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: environ.ml 9573 2007-01-31 20:18:18Z notin $ *) +(* $Id: environ.ml 11001 2008-05-27 16:56:07Z aspiwack $ *) open Util open Names @@ -15,7 +15,6 @@ open Univ open Term open Declarations open Pre_env -open Csymtable (* The type of environments. *) @@ -24,6 +23,7 @@ type named_context_val = Pre_env.named_context_val type env = Pre_env.env let pre_env env = env +let env_of_pre_env env = env let empty_named_context_val = empty_named_context_val @@ -58,9 +58,7 @@ let push_rel = push_rel let push_rel_context ctxt x = Sign.fold_rel_context push_rel ctxt ~init:x let push_rec_types (lna,typarray,_) env = - let ctxt = - array_map2_i - (fun i na t -> (na, None, type_app (lift i) t)) lna typarray in + let ctxt = array_map2_i (fun i na t -> (na, None, lift i t)) lna typarray in Array.fold_left (fun e assum -> push_rel assum e) env ctxt let reset_rel_context env = @@ -85,13 +83,14 @@ let fold_rel_context f env ~init = (* Named context *) let named_context_of_val = fst +let named_vals_of_val = snd (* [map_named_val f ctxt] apply [f] to the body and the type of each declarations. *** /!\ *** [f t] should be convertible with t *) let map_named_val f (ctxt,ctxtv) = let ctxt = - List.map (fun (id,body,typ) -> (id, option_map f body, f typ)) ctxt in + List.map (fun (id,body,typ) -> (id, Option.map f body, f typ)) ctxt in (ctxt,ctxtv) let empty_named_context = empty_named_context @@ -162,7 +161,7 @@ let add_constant kn cs env = (* constant_type gives the type of a constant *) let constant_type env kn = let cb = lookup_constant kn env in - cb.const_type + cb.const_type type const_evaluation_result = NoBody | Opaque @@ -245,30 +244,6 @@ let global_vars_set env constr = in filtrec Idset.empty constr -(* like [global_vars] but don't get through evars *) -let global_vars_set_drop_evar env constr = - let fold_constr_drop_evar f acc c = match kind_of_term c with - | (Rel _ | Meta _ | Var _ | Sort _ | Const _ | Ind _ - | Construct _) -> acc - | Cast (c,_,t) -> f (f acc c) t - | Prod (_,t,c) -> f (f acc t) c - | Lambda (_,t,c) -> f (f acc t) c - | LetIn (_,b,t,c) -> f (f (f acc b) t) c - | App (c,l) -> Array.fold_left f (f acc c) l - | Evar (_,l) -> acc - | Case (_,p,c,bl) -> Array.fold_left f (f (f acc p) c) bl - | Fix (_,(lna,tl,bl)) -> - let fd = array_map3 (fun na t b -> (na,t,b)) lna tl bl in - Array.fold_left (fun acc (na,t,b) -> f (f acc t) b) acc fd - | CoFix (_,(lna,tl,bl)) -> - let fd = array_map3 (fun na t b -> (na,t,b)) lna tl bl in - Array.fold_left (fun acc (na,t,b) -> f (f acc t) b) acc fd in - let rec filtrec acc c = - let vl = vars_of_global env c in - let acc = List.fold_right Idset.add vl acc in - fold_constr_drop_evar filtrec acc c - in - filtrec Idset.empty constr (* [keep_hyps env ids] keeps the part of the section context of [env] which contains the variables of the set [ids], and recursively the variables @@ -299,7 +274,7 @@ let keep_hyps env needed = (* Modules *) let add_modtype ln mtb env = - let new_modtypes = KNmap.add ln mtb env.env_globals.env_modtypes in + let new_modtypes = MPmap.add ln mtb env.env_globals.env_modtypes in let new_globals = { env.env_globals with env_modtypes = new_modtypes } in @@ -312,14 +287,33 @@ let shallow_add_module mp mb env = env_modules = new_mods } in { env with env_globals = new_globals } +let rec scrape_alias mp env = + try + let mp1 = MPmap.find mp env.env_globals.env_alias in + scrape_alias mp1 env + with + Not_found -> mp + let lookup_module mp env = - MPmap.find mp env.env_globals.env_modules + let mp = scrape_alias mp env in + MPmap.find mp env.env_globals.env_modules let lookup_modtype ln env = - KNmap.find ln env.env_globals.env_modtypes + let mp = scrape_alias ln env in + MPmap.find mp env.env_globals.env_modtypes -(*s Judgments. *) +let register_alias mp1 mp2 env = + let new_alias = MPmap.add mp1 mp2 env.env_globals.env_alias in + let new_globals = + { env.env_globals with + env_alias = new_alias } in + { env with env_globals = new_globals } + +let lookup_alias mp env = + MPmap.find mp env.env_globals.env_alias +(*s Judgments. *) + type unsafe_judgment = { uj_val : constr; uj_type : types } @@ -382,15 +376,300 @@ let insert_after_hyp (ctxt,vals) id d check = | _, _ -> assert false in aux ctxt vals + (* To be used in Logic.clear_hyps *) -let remove_hyps ids check (ctxt, vals) = +let remove_hyps ids check_context check_value (ctxt, vals) = let ctxt,vals,rmv = - List.fold_right2 (fun (id,_,_ as d) v (ctxt,vals,rmv) -> + List.fold_right2 (fun (id,_,_ as d) (id',v) (ctxt,vals,rmv) -> if List.mem id ids then (ctxt,vals,id::rmv) else - let nd = check d in - (nd::ctxt,v::vals,rmv)) + let nd = check_context d in + let nv = check_value v in + (nd::ctxt,(id',nv)::vals,rmv)) ctxt vals ([],[],[]) in ((ctxt,vals),rmv) + + + + + +(*spiwack: the following functions assemble the pieces of the retroknowledge + note that the "consistent" register function is available in the module + Safetyping, Environ only synchronizes the proactive and the reactive parts*) + +open Retroknowledge + +(* lifting of the "get" functions works also for "mem"*) +let retroknowledge f env = + f env.retroknowledge + +let registered env field = + retroknowledge mem env field + +(* spiwack: this unregistration function is not in operation yet. It should + not be used *) +(* this unregistration function assumes that no "constr" can hold two different + places in the retroknowledge. There is no reason why it shouldn't be true, + but in case someone needs it, remember to add special branches to the + unregister function *) +let unregister env field = + match field with + | KInt31 (_,Int31Type) -> + (*there is only one matching kind due to the fact that Environ.env + is abstract, and that the only function which add elements to the + retroknowledge is Environ.register which enforces this shape *) + (match retroknowledge find env field with + | Ind i31t -> let i31c = Construct (i31t, 1) in + {env with retroknowledge = + remove (retroknowledge clear_info env i31c) field} + | _ -> assert false) + |_ -> {env with retroknowledge = + try + remove (retroknowledge clear_info env + (retroknowledge find env field)) field + with Not_found -> + retroknowledge remove env field} + + + +(* the Environ.register function syncrhonizes the proactive and reactive + retroknowledge. *) +let register = + + (* subfunction used for static decompilation of int31 (after a vm_compute, + see pretyping/vnorm.ml for more information) *) + let constr_of_int31 = + let nth_digit_plus_one i n = (* calculates the nth (starting with 0) + digit of i and adds 1 to it + (nth_digit_plus_one 1 3 = 2) *) + if (land) i ((lsl) 1 n) = 0 then + 1 + else + 2 + in + fun ind -> fun digit_ind -> fun tag -> + let array_of_int i = + Array.init 31 (fun n -> mkConstruct + (digit_ind, nth_digit_plus_one i (30-n))) + in + mkApp(mkConstruct(ind, 1), array_of_int tag) + in + + (* subfunction which adds the information bound to the constructor of + the int31 type to the reactive retroknowledge *) + let add_int31c retroknowledge c = + let rk = add_vm_constant_static_info retroknowledge c + Cbytegen.compile_structured_int31 + in + add_vm_constant_dynamic_info rk c Cbytegen.dynamic_int31_compilation + in + + (* subfunction which adds the compiling information of an + int31 operation which has a specific vm instruction (associates + it to the name of the coq definition in the reactive retroknowledge) *) + let add_int31_op retroknowledge v n op kn = + add_vm_compiling_info retroknowledge v (Cbytegen.op_compilation n op kn) + in + +fun env field value -> + (* subfunction which shortens the (very often use) registration of binary + operators to the reactive retroknowledge. *) + let add_int31_binop_from_const op = + match value with + | Const kn -> retroknowledge add_int31_op env value 2 + op kn + | _ -> anomaly "Environ.register: should be a constant" + in + let add_int31_unop_from_const op = + match value with + | Const kn -> retroknowledge add_int31_op env value 1 + op kn + | _ -> anomaly "Environ.register: should be a constant" + in + (* subfunction which completes the function constr_of_int31 above + by performing the actual retroknowledge operations *) + let add_int31_decompilation_from_type rk = + (* invariant : the type of bits is registered, otherwise the function + would raise Not_found. The invariant is enforced in safe_typing.ml *) + match field with + | KInt31 (grp, Int31Type) -> + (match Retroknowledge.find rk (KInt31 (grp,Int31Bits)) with + | Ind i31bit_type -> + (match value with + | Ind i31t -> + Retroknowledge.add_vm_decompile_constant_info rk + value (constr_of_int31 i31t i31bit_type) + | _ -> anomaly "Environ.register: should be an inductive type") + | _ -> anomaly "Environ.register: Int31Bits should be an inductive type") + | _ -> anomaly "Environ.register: add_int31_decompilation_from_type called with an abnormal field" + in + {env with retroknowledge = + let retroknowledge_with_reactive_info = + match field with + | KInt31 (_, Int31Type) -> + let i31c = match value with + | Ind i31t -> (Construct (i31t, 1)) + | _ -> anomaly "Environ.register: should be an inductive type" + in + add_int31_decompilation_from_type + (add_vm_before_match_info + (retroknowledge add_int31c env i31c) + value Cbytegen.int31_escape_before_match) + | KInt31 (_, Int31Plus) -> add_int31_binop_from_const Cbytecodes.Kaddint31 + | KInt31 (_, Int31PlusC) -> add_int31_binop_from_const Cbytecodes.Kaddcint31 + | KInt31 (_, Int31PlusCarryC) -> add_int31_binop_from_const Cbytecodes.Kaddcarrycint31 + | KInt31 (_, Int31Minus) -> add_int31_binop_from_const Cbytecodes.Ksubint31 + | KInt31 (_, Int31MinusC) -> add_int31_binop_from_const Cbytecodes.Ksubcint31 + | KInt31 (_, Int31MinusCarryC) -> add_int31_binop_from_const + Cbytecodes.Ksubcarrycint31 + | KInt31 (_, Int31Times) -> add_int31_binop_from_const Cbytecodes.Kmulint31 + | KInt31 (_, Int31TimesC) -> add_int31_binop_from_const Cbytecodes.Kmulcint31 + | KInt31 (_, Int31Div21) -> (* this is a ternary operation *) + (match value with + | Const kn -> + retroknowledge add_int31_op env value 3 + Cbytecodes.Kdiv21int31 kn + | _ -> anomaly "Environ.register: should be a constant") + | KInt31 (_, Int31Div) -> add_int31_binop_from_const Cbytecodes.Kdivint31 + | KInt31 (_, Int31AddMulDiv) -> (* this is a ternary operation *) + (match value with + | Const kn -> + retroknowledge add_int31_op env value 3 + Cbytecodes.Kaddmuldivint31 kn + | _ -> anomaly "Environ.register: should be a constant") + | KInt31 (_, Int31Compare) -> add_int31_binop_from_const Cbytecodes.Kcompareint31 + | KInt31 (_, Int31Head0) -> add_int31_unop_from_const Cbytecodes.Khead0int31 + | KInt31 (_, Int31Tail0) -> add_int31_unop_from_const Cbytecodes.Ktail0int31 + | _ -> env.retroknowledge + in + Retroknowledge.add_field retroknowledge_with_reactive_info field value + } + + +(**************************************************************) +(* spiwack: the following definitions are used by the function + [assumptions] which gives as an output the set of all + axioms and sections variables on which a given term depends + in a context (expectingly the Global context) *) + +type context_object = + | Variable of identifier (* A section variable or a Let definition *) + | Axiom of constant (* An axiom or a constant. *) + + +(* Defines a set of [assumption] *) +module OrderedContextObject = +struct + type t = context_object + let compare x y = + match x , y with + | Variable i1 , Variable i2 -> id_ord i1 i2 + | Axiom k1 , Axiom k2 -> Pervasives.compare k1 k2 + (* spiwack: it would probably be cleaner + to provide a [kn_ord] function *) + | Variable _ , Axiom _ -> -1 + | Axiom _ , Variable _ -> 1 +end + +module ContextObjectSet = Set.Make (OrderedContextObject) +module ContextObjectMap = Map.Make (OrderedContextObject) + + +let assumptions (* t env *) = + (* Infix definition for chaining function that accumulate + on a and a ContextObjectSet, ContextObjectMap. *) + let ( ** ) f1 f2 s m = let (s',m') = f1 s m in f2 s' m' in + (* This function eases memoization, by checking if an object is already + stored before trying and applying a function. + If the object is there, the function is not fired (we are in a + particular case where memoized object don't need a treatment at all). + If the object isn't there, it is stored and the function is fired*) + let try_and_go o f s m = + if ContextObjectSet.mem o s then + (s,m) + else + f (ContextObjectSet.add o s) m + in + let identity2 s m = (s,m) in + (* Goes recursively into the term to see if it depends on assumptions + the 3 important cases are : - Const _ where we need to first unfold + the constant and return the needed assumptions of its body in the + environment, + - Rel _ which means the term is a variable + which has been bound earlier by a Lambda or a Prod (returns [] ), + - Var _ which means that the term refers + to a section variable or a "Let" definition, in the former it is + an assumption of [t], in the latter is must be unfolded like a Const. + The other cases are straightforward recursion. + Calls to the environment are memoized, thus avoiding to explore + the DAG of the environment as if it was a tree (can cause + exponential behavior and prevent the algorithm from terminating + in reasonable time). [s] is a set of [context_object], representing + the object already visited.*) + let rec aux t env s acc = + match kind_of_term t with + | Var id -> aux_memoize_id id env s acc + | Meta _ | Evar _ -> + Util.anomaly "Environ.assumption: does not expect a meta or an evar" + | Cast (e1,_,e2) | Prod (_,e1,e2) | Lambda (_,e1,e2) -> + ((aux e1 env)**(aux e2 env)) s acc + | LetIn (_,e1,e2,e3) -> ((aux e1 env)** + (aux e2 env)** + (aux e3 env)) + s acc + | App (e1, e_array) -> ((aux e1 env)** + (Array.fold_right + (fun e f -> (aux e env)**f) + e_array identity2)) + s acc + | Case (_,e1,e2,e_array) -> ((aux e1 env)** + (aux e2 env)** + (Array.fold_right + (fun e f -> (aux e env)**f) + e_array identity2)) + s acc + | Fix (_,(_, e1_array, e2_array)) | CoFix (_,(_,e1_array, e2_array)) -> + ((Array.fold_right + (fun e f -> (aux e env)**f) + e1_array identity2) ** + (Array.fold_right + (fun e f -> (aux e env)**f) + e2_array identity2)) + s acc + | Const kn -> aux_memoize_kn kn env s acc + | _ -> (s,acc) (* closed atomic types + rel *) + + and add_id id env s acc = + (* a Var can be either a variable, or a "Let" definition.*) + match lookup_named id env with + | (_,None,t) -> + (s,ContextObjectMap.add (Variable id) t acc) + | (_,Some bdy,_) -> aux bdy env s acc + + and aux_memoize_id id env = + try_and_go (Variable id) (add_id id env) + + and add_kn kn env s acc = + let cb = lookup_constant kn env in + match cb.Declarations.const_body with + | None -> + let ctype = + match cb.Declarations.const_type with + | PolymorphicArity (ctx,a) -> mkArity (ctx, Type a.poly_level) + | NonPolymorphicType t -> t + in + (s,ContextObjectMap.add (Axiom kn) ctype acc) + | Some body -> aux (Declarations.force body) env s acc + + and aux_memoize_kn kn env = + try_and_go (Axiom kn) (add_kn kn env) + in + fun t env -> + snd (aux t env (ContextObjectSet.empty) (ContextObjectMap.empty)) + +(* /spiwack *) + + + diff --git a/kernel/environ.mli b/kernel/environ.mli index 478357d7..30f555a4 100644 --- a/kernel/environ.mli +++ b/kernel/environ.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: environ.mli 9573 2007-01-31 20:18:18Z notin $ i*) +(*i $Id: environ.mli 11001 2008-05-27 16:56:07Z aspiwack $ i*) (*i*) open Names @@ -35,6 +35,7 @@ open Sign type env val pre_env : env -> Pre_env.env +val env_of_pre_env : Pre_env.env -> env type named_context_val val eq_named_context_val : named_context_val -> named_context_val -> bool @@ -72,6 +73,7 @@ val fold_rel_context : (* Context of variables (section variables and goal assumptions) *) val named_context_of_val : named_context_val -> named_context +val named_vals_of_val : named_context_val -> Pre_env.named_vals val val_of_named_context : named_context -> named_context_val val empty_named_context_val : named_context_val @@ -145,13 +147,17 @@ val scrape_mind : env -> mutual_inductive -> mutual_inductive (************************************************************************) (*s Modules *) -val add_modtype : kernel_name -> module_type_body -> env -> env +val add_modtype : module_path -> module_type_body -> env -> env (* [shallow_add_module] does not add module components *) val shallow_add_module : module_path -> module_body -> env -> env val lookup_module : module_path -> env -> module_body -val lookup_modtype : kernel_name -> env -> module_type_body +val lookup_modtype : module_path -> env -> module_type_body + +val register_alias : module_path -> module_path -> env -> env +val lookup_alias : module_path -> env -> module_path +val scrape_alias : module_path -> env -> module_path (************************************************************************) (*s Universe constraints *) @@ -165,7 +171,6 @@ val set_engagement : engagement -> env -> env (* [global_vars_set env c] returns the list of [id]'s occurring as [VAR id] in [c] *) val global_vars_set : env -> constr -> Idset.t -val global_vars_set_drop_evar : env -> constr -> Idset.t (* the constr must be an atomic construction *) val vars_of_global : env -> constr -> identifier list @@ -217,5 +222,35 @@ val insert_after_hyp : named_context_val -> variable -> named_declaration -> (named_context -> unit) -> named_context_val -val remove_hyps : identifier list -> (named_declaration -> named_declaration) -> named_context_val -> named_context_val * identifier list +val remove_hyps : identifier list -> (named_declaration -> named_declaration) -> (Pre_env.lazy_val -> Pre_env.lazy_val) -> named_context_val -> named_context_val * identifier list + + +(* spiwack: functions manipulating the retroknowledge *) +open Retroknowledge + +val retroknowledge : (retroknowledge->'a) -> env -> 'a + +val registered : env -> field -> bool + +val unregister : env -> field -> env + +val register : env -> field -> Retroknowledge.entry -> env + + + +(******************************************************************) +(* spiwack: a few declarations for the "Print Assumption" command *) + +type context_object = + | Variable of identifier (* A section variable or a Let definition *) + | Axiom of constant (* An axiom or a constant. *) + +(* AssumptionSet.t is a set of [assumption] *) +module OrderedContextObject : Set.OrderedType with type t = context_object +module ContextObjectMap : Map.S with type key = context_object + +(* collects all the assumptions on which a term relies (together with + their type *) +val assumptions : constr -> env -> Term.types ContextObjectMap.t + diff --git a/kernel/indtypes.ml b/kernel/indtypes.ml index a6fd6d04..7cedebbd 100644 --- a/kernel/indtypes.ml +++ b/kernel/indtypes.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: indtypes.ml 10297 2007-11-07 11:05:53Z barras $ *) +(* $Id: indtypes.ml 10920 2008-05-12 10:19:32Z herbelin $ *) open Util open Names @@ -39,10 +39,10 @@ let is_constructor_head t = type inductive_error = | NonPos of env * constr * constr | NotEnoughArgs of env * constr * constr - | NotConstructor of env * constr * constr + | NotConstructor of env * identifier * constr * constr * int * int | NonPar of env * constr * int * constr * constr | SameNamesTypes of identifier - | SameNamesConstructors of identifier * identifier + | SameNamesConstructors of identifier | SameNamesOverlap of identifier list | NotAnArity of identifier | BadEntry @@ -54,12 +54,12 @@ exception InductiveError of inductive_error of names. The name [id] is the name of the current inductive type, used when reporting the error. *) -let check_constructors_names id = +let check_constructors_names = let rec check idset = function | [] -> idset | c::cl -> if Idset.mem c idset then - raise (InductiveError (SameNamesConstructors (id,c))) + raise (InductiveError (SameNamesConstructors c)) else check (Idset.add c idset) cl in @@ -78,7 +78,7 @@ let mind_check_names mie = if Idset.mem id indset then raise (InductiveError (SameNamesTypes id)) else - let cstset' = check_constructors_names id cstset cl in + let cstset' = check_constructors_names cstset cl in check (Idset.add id indset) cstset' inds in check Idset.empty Idset.empty mie.mind_entry_inds @@ -100,7 +100,7 @@ let mind_check_arities env mie = (* Typing the arities and constructor types *) -let is_logic_type t = (t.utj_type = mk_Prop) +let is_logic_type t = (t.utj_type = prop_sort) (* [infos] is a sequence of pair [islogic,issmall] for each type in the product of a constructor or arity *) @@ -128,7 +128,7 @@ let rec infos_and_sort env t = let small = Term.is_small varj.utj_type in (logic,small) :: (infos_and_sort env1 c2) | _ when is_constructor_head t -> [] - | _ -> anomaly "infos_and_sort: not a positive constructor" + | _ -> (* don't fail if not positive, it is tested later *) [] let small_unit constrsinfos = let issmall = List.for_all is_small constrsinfos @@ -157,7 +157,7 @@ let small_unit constrsinfos = let extract_level (_,_,_,lc,lev) = (* Enforce that the level is not in Prop if more than two constructors *) - if Array.length lc >= 2 then sup base_univ lev else lev + if Array.length lc >= 2 then sup type0_univ lev else lev let inductive_levels arities inds = let levels = Array.map pi3 arities in @@ -262,7 +262,7 @@ let typecheck_inductive env mie = Inl (info,full_arity,s), enforce_geq u lev cst | Prop Pos when engagement env <> Some ImpredicativeSet -> (* Predicative set: check that the content is indeed predicative *) - if not (is_empty_univ lev) & not (is_base_univ lev) then + if not (is_type0m_univ lev) & not (is_type0_univ lev) then error "Large non-propositional inductive types must be in Type"; Inl (info,full_arity,s), cst | Prop _ -> @@ -290,7 +290,7 @@ exception IllFormedInd of ill_formed_ind let mind_extract_params = decompose_prod_n_assum -let explain_ind_err ntyp env0 nbpar c err = +let explain_ind_err id ntyp env0 nbpar c nargs err = let (lpar,c') = mind_extract_params nbpar c in let env = push_rel_context lpar env0 in match err with @@ -301,7 +301,7 @@ let explain_ind_err ntyp env0 nbpar c err = (NotEnoughArgs (env,c',mkRel (kt+nbpar)))) | LocalNotConstructor -> raise (InductiveError - (NotConstructor (env,c',mkRel (ntyp+nbpar)))) + (NotConstructor (env,id,c',mkRel (ntyp+nbpar),nbpar,nargs))) | LocalNonPar (n,l) -> raise (InductiveError (NonPar (env,c',n,mkRel (nbpar-n+1), mkRel (l+nbpar)))) @@ -386,7 +386,7 @@ let ienv_push_inductive (env, n, ntypes, ra_env) (mi,lpar) = push_rel (Anonymous,None, hnf_prod_applist env (type_of_inductive env specif) lpar) env in let ra_env' = - (Imbr mi,Rtree.mk_param 0) :: + (Imbr mi,(Rtree.mk_rec_calls 1).(0)) :: List.map (fun (r,t) -> (r,Rtree.lift 1 t)) ra_env in (* New index of the inductive types *) let newidx = n + auxntyp in @@ -397,40 +397,40 @@ let array_min nmr a = if nmr = 0 then 0 else (* The recursive function that checks positivity and builds the list of recursive arguments *) -let check_positivity_one (env, _,ntypes,_ as ienv) hyps i indlc = +let check_positivity_one (env, _,ntypes,_ as ienv) hyps i nargs lcnames indlc = let lparams = rel_context_length hyps in let nmr = rel_context_nhyps hyps in (* check the inductive types occur positively in [c] *) let rec check_pos (env, n, ntypes, ra_env as ienv) nmr c = let x,largs = decompose_app (whd_betadeltaiota env c) in - match kind_of_term x with - | Prod (na,b,d) -> - assert (largs = []); - (match weaker_noccur_between env n ntypes b with - None -> failwith_non_pos_list n ntypes [b] - | Some b -> - check_pos (ienv_push_var ienv (na, b, mk_norec)) nmr d) - | Rel k -> - (try let (ra,rarg) = List.nth ra_env (k-1) in - let nmr1 = - (match ra with - Mrec _ -> compute_rec_par ienv hyps nmr largs - | _ -> nmr) - in - if not (List.for_all (noccur_between n ntypes) largs) - then failwith_non_pos_list n ntypes largs - else (nmr1,rarg) - with Failure _ | Invalid_argument _ -> (nmr,mk_norec)) - | Ind ind_kn -> - (* If the inductive type being defined appears in a - parameter, then we have an imbricated type *) - if List.for_all (noccur_between n ntypes) largs then (nmr,mk_norec) - else check_positive_imbr ienv nmr (ind_kn, largs) - | err -> - if noccur_between n ntypes x && - List.for_all (noccur_between n ntypes) largs - then (nmr,mk_norec) - else failwith_non_pos_list n ntypes (x::largs) + match kind_of_term x with + | Prod (na,b,d) -> + assert (largs = []); + (match weaker_noccur_between env n ntypes b with + None -> failwith_non_pos_list n ntypes [b] + | Some b -> + check_pos (ienv_push_var ienv (na, b, mk_norec)) nmr d) + | Rel k -> + (try let (ra,rarg) = List.nth ra_env (k-1) in + let nmr1 = + (match ra with + Mrec _ -> compute_rec_par ienv hyps nmr largs + | _ -> nmr) + in + if not (List.for_all (noccur_between n ntypes) largs) + then failwith_non_pos_list n ntypes largs + else (nmr1,rarg) + with Failure _ | Invalid_argument _ -> (nmr,mk_norec)) + | Ind ind_kn -> + (* If the inductive type being defined appears in a + parameter, then we have an imbricated type *) + if List.for_all (noccur_between n ntypes) largs then (nmr,mk_norec) + else check_positive_imbr ienv nmr (ind_kn, largs) + | err -> + if noccur_between n ntypes x && + List.for_all (noccur_between n ntypes) largs + then (nmr,mk_norec) + else failwith_non_pos_list n ntypes (x::largs) (* accesses to the environment are not factorised, but is it worth? *) and check_positive_imbr (env,n,ntypes,ra_env as ienv) nmr (mi, largs) = @@ -439,70 +439,70 @@ let check_positivity_one (env, _,ntypes,_ as ienv) hyps i indlc = let (lpar,auxlargs) = try list_chop auxnpar largs with Failure _ -> raise (IllFormedInd (LocalNonPos n)) in - (* If the inductive appears in the args (non params) then the - definition is not positive. *) - if not (List.for_all (noccur_between n ntypes) auxlargs) then - raise (IllFormedInd (LocalNonPos n)); - (* We do not deal with imbricated mutual inductive types *) - let auxntyp = mib.mind_ntypes in - if auxntyp <> 1 then raise (IllFormedInd (LocalNonPos n)); - (* The nested inductive type with parameters removed *) - let auxlcvect = abstract_mind_lc env auxntyp auxnpar mip.mind_nf_lc in - (* Extends the environment with a variable corresponding to - the inductive def *) - let (env',_,_,_ as ienv') = ienv_push_inductive ienv (mi,lpar) in - (* Parameters expressed in env' *) - let lpar' = List.map (lift auxntyp) lpar in - let irecargs_nmr = - (* fails if the inductive type occurs non positively *) - (* when substituted *) - Array.map - (function c -> - let c' = hnf_prod_applist env' c lpar' in - check_constructors ienv' false nmr c') - auxlcvect - in - let irecargs = Array.map snd irecargs_nmr - and nmr' = array_min nmr irecargs_nmr - in - (nmr',(Rtree.mk_rec [|mk_paths (Imbr mi) irecargs|]).(0)) - + (* If the inductive appears in the args (non params) then the + definition is not positive. *) + if not (List.for_all (noccur_between n ntypes) auxlargs) then + raise (IllFormedInd (LocalNonPos n)); + (* We do not deal with imbricated mutual inductive types *) + let auxntyp = mib.mind_ntypes in + if auxntyp <> 1 then raise (IllFormedInd (LocalNonPos n)); + (* The nested inductive type with parameters removed *) + let auxlcvect = abstract_mind_lc env auxntyp auxnpar mip.mind_nf_lc in + (* Extends the environment with a variable corresponding to + the inductive def *) + let (env',_,_,_ as ienv') = ienv_push_inductive ienv (mi,lpar) in + (* Parameters expressed in env' *) + let lpar' = List.map (lift auxntyp) lpar in + let irecargs_nmr = + (* fails if the inductive type occurs non positively *) + (* when substituted *) + Array.map + (function c -> + let c' = hnf_prod_applist env' c lpar' in + check_constructors ienv' false nmr c') + auxlcvect + in + let irecargs = Array.map snd irecargs_nmr + and nmr' = array_min nmr irecargs_nmr + in + (nmr',(Rtree.mk_rec [|mk_paths (Imbr mi) irecargs|]).(0)) + (* check the inductive types occur positively in the products of C, if check_head=true, also check the head corresponds to a constructor of the ith type *) - + and check_constructors ienv check_head nmr c = let rec check_constr_rec (env,n,ntypes,ra_env as ienv) nmr lrec c = let x,largs = decompose_app (whd_betadeltaiota env c) in - match kind_of_term x with - - | Prod (na,b,d) -> - assert (largs = []); - let nmr',recarg = check_pos ienv nmr b in - let ienv' = ienv_push_var ienv (na,b,mk_norec) in - check_constr_rec ienv' nmr' (recarg::lrec) d - - | hd -> - if check_head then - if hd = Rel (n+ntypes-i-1) then - check_correct_par ienv hyps (ntypes-i) largs + match kind_of_term x with + + | Prod (na,b,d) -> + assert (largs = []); + let nmr',recarg = check_pos ienv nmr b in + let ienv' = ienv_push_var ienv (na,b,mk_norec) in + check_constr_rec ienv' nmr' (recarg::lrec) d + + | hd -> + if check_head then + if hd = Rel (n+ntypes-i-1) then + check_correct_par ienv hyps (ntypes-i) largs + else + raise (IllFormedInd LocalNotConstructor) else - raise (IllFormedInd LocalNotConstructor) - else - if not (List.for_all (noccur_between n ntypes) largs) + if not (List.for_all (noccur_between n ntypes) largs) then raise (IllFormedInd (LocalNonPos n)); - (nmr,List.rev lrec) + (nmr,List.rev lrec) in check_constr_rec ienv nmr [] c in let irecargs_nmr = - Array.map - (fun c -> + array_map2 + (fun id c -> let _,rawc = mind_extract_params lparams c in - try - check_constructors ienv true nmr rawc - with IllFormedInd err -> - explain_ind_err (ntypes-i) env lparams c err) - indlc + try + check_constructors ienv true nmr rawc + with IllFormedInd err -> + explain_ind_err id (ntypes-i) env lparams c nargs err) + (Array.of_list lcnames) indlc in let irecargs = Array.map snd irecargs_nmr and nmr' = array_min nmr irecargs_nmr @@ -510,15 +510,16 @@ let check_positivity_one (env, _,ntypes,_ as ienv) hyps i indlc = let check_positivity env_ar params inds = let ntypes = Array.length inds in - let lra_ind = - List.rev (list_tabulate (fun j -> (Mrec j, Rtree.mk_param j)) ntypes) in + let rc = Array.mapi (fun j t -> (Mrec j,t)) (Rtree.mk_rec_calls ntypes) in + let lra_ind = List.rev (Array.to_list rc) in let lparams = rel_context_length params in let nmr = rel_context_nhyps params in - let check_one i (_,_,lc,_) = + let check_one i (_,lcnames,lc,(sign,_)) = let ra_env = list_tabulate (fun _ -> (Norec,mk_norec)) lparams @ lra_ind in let ienv = (env_ar, 1+lparams, ntypes, ra_env) in - check_positivity_one ienv params i lc + let nargs = rel_context_nhyps sign - nmr in + check_positivity_one ienv params i nargs lcnames lc in let irecargs_nmr = Array.mapi check_one inds in let irecargs = Array.map snd irecargs_nmr @@ -589,61 +590,61 @@ let build_inductive env env_ar params isrecord isfinite inds nmr recargs cst = let consnrealargs = Array.map (fun (d,_) -> rel_context_length d - rel_context_length params) splayed_lc in - (* Elimination sorts *) + (* Elimination sorts *) let arkind,kelim = match ar_kind with - | Inr (param_levels,lev) -> - Polymorphic { - poly_param_levels = param_levels; - poly_level = lev; - }, all_sorts - | Inl ((issmall,isunit),ar,s) -> - let isunit = isunit && ntypes = 1 && not (is_recursive recargs.(0)) in - let kelim = allowed_sorts issmall isunit s in - Monomorphic { - mind_user_arity = ar; - mind_sort = s; - }, kelim in + | Inr (param_levels,lev) -> + Polymorphic { + poly_param_levels = param_levels; + poly_level = lev; + }, all_sorts + | Inl ((issmall,isunit),ar,s) -> + let isunit = isunit && ntypes = 1 && not (is_recursive recargs.(0)) in + let kelim = allowed_sorts issmall isunit s in + Monomorphic { + mind_user_arity = ar; + mind_sort = s; + }, kelim in let nconst, nblock = ref 0, ref 0 in let transf num = let arity = List.length (dest_subterms recarg).(num) in - if arity = 0 then - let p = (!nconst, 0) in - incr nconst; p - else - let p = (!nblock + 1, arity) in - incr nblock; p - (* les tag des constructeur constant commence a 0, - les tag des constructeur non constant a 1 (0 => accumulator) *) + if arity = 0 then + let p = (!nconst, 0) in + incr nconst; p + else + let p = (!nblock + 1, arity) in + incr nblock; p + (* les tag des constructeur constant commence a 0, + les tag des constructeur non constant a 1 (0 => accumulator) *) in let rtbl = Array.init (List.length cnames) transf in - (* Build the inductive packet *) - { mind_typename = id; - mind_arity = arkind; - mind_arity_ctxt = ar_sign; - mind_nrealargs = rel_context_nhyps ar_sign - nparamargs; - mind_kelim = kelim; - mind_consnames = Array.of_list cnames; - mind_consnrealdecls = consnrealargs; - mind_user_lc = lc; - mind_nf_lc = nf_lc; - mind_recargs = recarg; - mind_nb_constant = !nconst; - mind_nb_args = !nblock; - mind_reloc_tbl = rtbl; - } in + (* Build the inductive packet *) + { mind_typename = id; + mind_arity = arkind; + mind_arity_ctxt = ar_sign; + mind_nrealargs = rel_context_nhyps ar_sign - nparamargs; + mind_kelim = kelim; + mind_consnames = Array.of_list cnames; + mind_consnrealdecls = consnrealargs; + mind_user_lc = lc; + mind_nf_lc = nf_lc; + mind_recargs = recarg; + mind_nb_constant = !nconst; + mind_nb_args = !nblock; + mind_reloc_tbl = rtbl; + } in let packets = array_map2 build_one_packet inds recargs in - (* Build the mutual inductive *) - { mind_record = isrecord; - mind_ntypes = ntypes; - mind_finite = isfinite; - mind_hyps = hyps; - mind_nparams = nparamargs; - mind_nparams_rec = nmr; - mind_params_ctxt = params; - mind_packets = packets; - mind_constraints = cst; - mind_equiv = None; - } + (* Build the mutual inductive *) + { mind_record = isrecord; + mind_ntypes = ntypes; + mind_finite = isfinite; + mind_hyps = hyps; + mind_nparams = nparamargs; + mind_nparams_rec = nmr; + mind_params_ctxt = params; + mind_packets = packets; + mind_constraints = cst; + mind_equiv = None; + } (************************************************************************) (************************************************************************) @@ -654,5 +655,5 @@ let check_inductive env mie = (* Then check positivity conditions *) let (nmr,recargs) = check_positivity env_ar params inds in (* Build the inductive packets *) - build_inductive env env_ar params mie.mind_entry_record mie.mind_entry_finite - inds nmr recargs cst + build_inductive env env_ar params mie.mind_entry_record mie.mind_entry_finite + inds nmr recargs cst diff --git a/kernel/indtypes.mli b/kernel/indtypes.mli index 67d11f56..0477df82 100644 --- a/kernel/indtypes.mli +++ b/kernel/indtypes.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: indtypes.mli 7660 2005-12-17 21:13:48Z herbelin $ i*) +(*i $Id: indtypes.mli 10425 2008-01-05 17:04:16Z herbelin $ i*) (*i*) open Names @@ -26,10 +26,10 @@ open Typeops type inductive_error = | NonPos of env * constr * constr | NotEnoughArgs of env * constr * constr - | NotConstructor of env * constr * constr + | NotConstructor of env * identifier * constr * constr * int * int | NonPar of env * constr * int * constr * constr | SameNamesTypes of identifier - | SameNamesConstructors of identifier * identifier + | SameNamesConstructors of identifier | SameNamesOverlap of identifier list | NotAnArity of identifier | BadEntry diff --git a/kernel/inductive.ml b/kernel/inductive.ml index 00901686..9415941d 100644 --- a/kernel/inductive.ml +++ b/kernel/inductive.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: inductive.ml 10173 2007-10-04 13:02:56Z herbelin $ *) +(* $Id: inductive.ml 10920 2008-05-12 10:19:32Z herbelin $ *) open Util open Names @@ -83,7 +83,7 @@ let instantiate_params full t args sign = let instantiate_partial_params = instantiate_params false let full_inductive_instantiate mib params sign = - let dummy = mk_Prop in + let dummy = prop_sort in let t = mkArity (sign,dummy) in fst (destArity (instantiate_params true t params mib.mind_params_ctxt)) @@ -124,8 +124,8 @@ Remark: Set (predicative) is encoded as Type(0) let sort_as_univ = function | Type u -> u -| Prop Null -> neutral_univ -| Prop Pos -> base_univ +| Prop Null -> type0m_univ +| Prop Pos -> type0_univ let cons_subst u su subst = try (u, sup su (List.assoc u subst)) :: List.remove_assoc u subst @@ -179,9 +179,12 @@ let instantiate_universes env ctx ar argsorts = let ctx,subst = make_subst env (ctx,ar.poly_param_levels,args) in let level = subst_large_constraints subst ar.poly_level in ctx, - if is_empty_univ level then mk_Prop - else if is_base_univ level then mk_Set - else Type level + (* Singleton type not containing types are interpretable in Prop *) + if is_type0m_univ level then prop_sort + (* Non singleton type not containing types are interpretable in Set *) + else if is_type0_univ level then set_sort + (* This is a Type with constraints *) + else Type level let type_of_inductive_knowing_parameters env mip paramtyps = match mip.mind_arity with @@ -201,11 +204,11 @@ let type_of_inductive env (_,mip) = let cumulate_constructor_univ u = function | Prop Null -> u - | Prop Pos -> sup base_univ u + | Prop Pos -> sup type0_univ u | Type u' -> sup u u' let max_inductive_sort = - Array.fold_left cumulate_constructor_univ neutral_univ + Array.fold_left cumulate_constructor_univ type0m_univ (************************************************************************) (* Type of a constructor *) @@ -425,8 +428,8 @@ type subterm_spec = | Not_subterm let spec_of_tree t = - if t=mk_norec then Not_subterm else Subterm(Strict,t) - + if Rtree.eq_rtree (=) t mk_norec then Not_subterm else Subterm(Strict,t) + let subterm_spec_glb = let glb2 s1 s2 = match s1,s2 with @@ -435,7 +438,7 @@ let subterm_spec_glb = | Not_subterm, _ -> Not_subterm | _, Not_subterm -> Not_subterm | Subterm (a1,t1), Subterm (a2,t2) -> - if t1=t2 then Subterm (size_glb a1 a2, t1) + if Rtree.eq_rtree (=) t1 t2 then Subterm (size_glb a1 a2, t1) (* branches do not return objects with same spec *) else Not_subterm in Array.fold_left glb2 Dead_code @@ -653,7 +656,7 @@ let check_one_fix renv recpos def = (* if [t] does not make recursive calls, it is guarded: *) if noccur_with_meta renv.rel_min nfi t then () else - let (f,l) = decompose_app (whd_betaiotazeta renv.env t) in + let (f,l) = decompose_app (whd_betaiotazeta t) in match kind_of_term f with | Rel p -> (* Test if [p] is a fixpoint (recursive call) *) @@ -666,12 +669,10 @@ let check_one_fix renv recpos def = let np = recpos.(glob) in if List.length l <= np then error_partial_apply renv glob else - match list_chop np l with - (la,(z::lrest)) -> - (* Check the decreasing arg is smaller *) - if not (check_is_subterm renv z) then - error_illegal_rec_call renv glob z - | _ -> assert false + (* Check the decreasing arg is smaller *) + let z = List.nth l np in + if not (check_is_subterm renv z) then + error_illegal_rec_call renv glob z end else begin @@ -779,6 +780,8 @@ let check_one_fix renv recpos def = in check_rec_call renv def +let judgment_of_fixpoint (_, types, bodies) = + array_map2 (fun typ body -> { uj_val = body ; uj_type = typ }) types bodies let inductive_of_mutfix env ((nvect,bodynum),(names,types,bodies as recdef)) = let nbfix = Array.length bodies in @@ -790,8 +793,9 @@ let inductive_of_mutfix env ((nvect,bodynum),(names,types,bodies as recdef)) = or bodynum >= nbfix then anomaly "Ill-formed fix term"; let fixenv = push_rec_types recdef env in + let vdefj = judgment_of_fixpoint recdef in let raise_err env i err = - error_ill_formed_rec_body env err names i in + error_ill_formed_rec_body env err names i fixenv vdefj in (* Check the i-th definition with recarg k *) let find_ind i k def = (* check fi does not appear in the k+1 first abstractions, @@ -817,14 +821,15 @@ let inductive_of_mutfix env ((nvect,bodynum),(names,types,bodies as recdef)) = (Array.map fst rv, Array.map snd rv) -let check_fix env ((nvect,_),(names,_,bodies as _recdef) as fix) = +let check_fix env ((nvect,_),(names,_,bodies as recdef) as fix) = let (minds, rdef) = inductive_of_mutfix env fix in for i = 0 to Array.length bodies - 1 do let (fenv,body) = rdef.(i) in let renv = make_renv fenv minds nvect.(i) minds.(i) in try check_one_fix renv nvect body with FixGuardError (fixenv,err) -> - error_ill_formed_rec_body fixenv err names i + error_ill_formed_rec_body fixenv err names i + (push_rec_types recdef env) (judgment_of_fixpoint recdef) done (* @@ -935,5 +940,6 @@ let check_cofix env (bodynum,(names,types,bodies as recdef)) = let fixenv = push_rec_types recdef env in try check_one_cofix fixenv nbfix bodies.(i) types.(i) with CoFixGuardError (errenv,err) -> - error_ill_formed_rec_body errenv err names i + error_ill_formed_rec_body errenv err names i + fixenv (judgment_of_fixpoint recdef) done diff --git a/kernel/inductive.mli b/kernel/inductive.mli index 58343dab..c2c38d8d 100644 --- a/kernel/inductive.mli +++ b/kernel/inductive.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: inductive.mli 9421 2006-12-08 16:00:53Z barras $ i*) +(*i $Id: inductive.mli 9420 2006-12-08 15:34:09Z barras $ i*) (*i*) open Names diff --git a/kernel/mod_subst.ml b/kernel/mod_subst.ml index 2942e101..ab4b8e47 100644 --- a/kernel/mod_subst.ml +++ b/kernel/mod_subst.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: mod_subst.ml 9874 2007-06-04 13:46:11Z soubiran $ *) +(* $Id: mod_subst.ml 10849 2008-04-25 15:55:16Z soubiran $ *) open Pp open Util @@ -27,11 +27,15 @@ let apply_opt_resolver resolve kn = | Some resolve -> try List.assoc kn resolve with Not_found -> None -type substitution_domain = MSI of mod_self_id | MBI of mod_bound_id +type substitution_domain = + MSI of mod_self_id + | MBI of mod_bound_id + | MPI of module_path let string_of_subst_domain = function MSI msid -> debug_string_of_msid msid | MBI mbid -> debug_string_of_mbid mbid + | MPI mp -> string_of_mp mp module Umap = Map.Make(struct type t = substitution_domain @@ -46,9 +50,13 @@ let add_msid msid mp = Umap.add (MSI msid) (mp,None) let add_mbid mbid mp resolve = Umap.add (MBI mbid) (mp,resolve) +let add_mp mp1 mp2 = + Umap.add (MPI mp1) (mp2,None) + let map_msid msid mp = add_msid msid mp empty_subst let map_mbid mbid mp resolve = add_mbid mbid mp resolve empty_subst +let map_mp mp1 mp2 = add_mp mp1 mp2 empty_subst let list_contents sub = let one_pair uid (mp,_) l = @@ -66,6 +74,7 @@ let debug_pr_subst sub = in str "{" ++ hov 2 (prlist_with_sep pr_coma f l) ++ str "}" + let subst_mp0 sub mp = (* 's like subst *) let rec aux mp = match mp with @@ -74,13 +83,21 @@ let subst_mp0 sub mp = (* 's like subst *) mp',resolve | MPbound bid -> let mp',resolve = Umap.find (MBI bid) sub in - mp',resolve - | MPdot (mp1,l) -> - let mp1',resolve = aux mp1 in - MPdot (mp1',l),resolve + mp',resolve + | MPdot (mp1,l) as mp2 -> + begin + try + let mp',resolve = Umap.find (MPI mp2) sub in + mp',resolve + with Not_found -> + let mp1',resolve = aux mp1 in + MPdot (mp1',l),resolve + end | _ -> raise Not_found in - try Some (aux mp) with Not_found -> None + try + Some (aux mp) + with Not_found -> None let subst_mp sub mp = match subst_mp0 sub mp with @@ -130,6 +147,7 @@ let subst_evaluable_reference subst = function | EvalConstRef kn -> EvalConstRef (fst (subst_con subst kn)) + let rec map_kn f f' c = let func = map_kn f f' in match kind_of_term c with @@ -201,7 +219,6 @@ let rec map_kn f f' c = else mkCoFix (ln,(lna,tl',bl')) | _ -> c - let subst_mps sub = map_kn (subst_kn0 sub) (subst_con0 sub) @@ -223,60 +240,220 @@ let replace_mp_in_con mpfrom mpto kn = exception BothSubstitutionsAreIdentitySubstitutions exception ChangeDomain of resolver -let join (subst1 : substitution) (subst2 : substitution) = +let join (subst1 : substitution) (subst2 : substitution) = let apply_subst (sub : substitution) key (mp,resolve) = - let mp',resolve' = - match subst_mp0 sub mp with - None -> mp, None - | Some (mp',resolve') -> mp',resolve' in - let resolve'' : resolver option = - try - let res = - match resolve with - Some res -> res - | None -> - match resolve' with - None -> raise BothSubstitutionsAreIdentitySubstitutions - | Some res -> raise (ChangeDomain res) - in - Some - (List.map - (fun (kn,topt) -> - kn, - match topt with - None -> - (match key with - MSI msid -> - let kn' = replace_mp_in_con (MPself msid) mp kn in - apply_opt_resolver resolve' kn' - | MBI mbid -> - let kn' = replace_mp_in_con (MPbound mbid) mp kn in - apply_opt_resolver resolve' kn') - | Some t -> Some (subst_mps sub t)) res) - with - BothSubstitutionsAreIdentitySubstitutions -> None - | ChangeDomain res -> - let rec changeDom = function - | [] -> [] - | (kn,topt)::r -> - let key' = - match key with - MSI msid -> MPself msid - | MBI mbid -> MPbound mbid in - let kn' = replace_mp_in_con mp key' kn in - if kn==kn' then - (*the key does not appear in mp, we remove it - from the resolver that we are building*) - changeDom r - else - (kn',topt)::(changeDom r) - in - Some (changeDom res) - in - mp',resolve'' in + let mp',resolve' = + match subst_mp0 sub mp with + None -> mp, None + | Some (mp',resolve') -> mp',resolve' in + let resolve'' : resolver option = + try + let res = + match resolve with + Some res -> res + | None -> + match resolve' with + None -> raise BothSubstitutionsAreIdentitySubstitutions + | Some res -> raise (ChangeDomain res) + in + Some + (List.map + (fun (kn,topt) -> + kn, + match topt with + None -> + (match key with + MSI msid -> + let kn' = replace_mp_in_con (MPself msid) mp kn in + apply_opt_resolver resolve' kn' + | MBI mbid -> + let kn' = replace_mp_in_con (MPbound mbid) mp kn in + apply_opt_resolver resolve' kn' + | MPI mp1 -> + let kn' = replace_mp_in_con mp1 mp kn in + apply_opt_resolver resolve' kn') + | Some t -> Some (subst_mps sub t)) res) + with + BothSubstitutionsAreIdentitySubstitutions -> None + | ChangeDomain res -> + let rec changeDom = function + | [] -> [] + | (kn,topt)::r -> + let key' = + match key with + MSI msid -> MPself msid + | MBI mbid -> MPbound mbid + | MPI mp1 -> mp1 in + let kn' = replace_mp_in_con mp key' kn in + if kn==kn' then + (*the key does not appear in kn, we remove it + from the resolver that we are building*) + changeDom r + else + (kn',topt)::(changeDom r) + in + Some (changeDom res) + in + mp',resolve'' in let subst = Umap.mapi (apply_subst subst2) subst1 in - Umap.fold Umap.add subst2 subst - + (Umap.fold Umap.add subst2 subst) + +let subst_key subst1 subst2 = + let replace_in_key key (mp,resolve) sub= + let newkey = + match key with + | MPI mp1 -> + begin + match subst_mp0 subst1 mp1 with + | None -> None + | Some (mp2,_) -> Some (MPI mp2) + end + | _ -> None + in + match newkey with + | None -> Umap.add key (mp,resolve) sub + | Some mpi -> Umap.add mpi (mp,resolve) sub + in + Umap.fold replace_in_key subst2 empty_subst + +let update_subst_alias subst1 subst2 = + let subst_inv key (mp,resolve) sub = + let newmp = + match key with + | MBI msid -> MPbound msid + | MSI msid -> MPself msid + | MPI mp -> mp + in + match mp with + | MPbound mbid -> Umap.add (MBI mbid) (newmp,None) sub + | MPself msid -> Umap.add (MSI msid) (newmp,None) sub + | _ -> Umap.add (MPI mp) (newmp,None) sub + in + let subst_mbi = Umap.fold subst_inv subst2 empty_subst in + let alias_subst key (mp,resolve) sub= + let newkey = + match key with + | MPI mp1 -> + begin + match subst_mp0 subst_mbi mp1 with + | None -> None + | Some (mp2,_) -> Some (MPI mp2) + end + | _ -> None + in + match newkey with + | None -> Umap.add key (mp,resolve) sub + | Some mpi -> Umap.add mpi (mp,resolve) sub + in + Umap.fold alias_subst subst1 empty_subst + +let update_subst subst1 subst2 = + let subst_inv key (mp,resolve) l = + let newmp = + match key with + | MBI msid -> MPbound msid + | MSI msid -> MPself msid + | MPI mp -> mp + in + match mp with + | MPbound mbid -> ((MBI mbid),newmp)::l + | MPself msid -> ((MSI msid),newmp)::l + | _ -> ((MPI mp),newmp)::l + in + let subst_mbi = Umap.fold subst_inv subst2 [] in + let alias_subst key (mp,resolve) sub= + let newsetkey = + match key with + | MPI mp1 -> + let compute_set_newkey l (k,mp') = + let mp_from_key = match k with + | MBI msid -> MPbound msid + | MSI msid -> MPself msid + | MPI mp -> mp + in + let new_mp1 = replace_mp_in_mp mp_from_key mp' mp1 in + if new_mp1 == mp1 then l else (MPI new_mp1)::l + in + begin + match List.fold_left compute_set_newkey [] subst_mbi with + | [] -> None + | l -> Some (l) + end + | _ -> None + in + match newsetkey with + | None -> sub + | Some l -> + List.fold_left (fun s k -> Umap.add k (mp,resolve) s) + sub l + in + Umap.fold alias_subst subst1 empty_subst + +let join_alias (subst1 : substitution) (subst2 : substitution) = + let apply_subst (sub : substitution) key (mp,resolve) = + let mp',resolve' = + match subst_mp0 sub mp with + None -> mp, None + | Some (mp',resolve') -> mp',resolve' in + let resolve'' : resolver option = + try + let res = + match resolve with + Some res -> res + | None -> + match resolve' with + None -> raise BothSubstitutionsAreIdentitySubstitutions + | Some res -> raise (ChangeDomain res) + in + Some + (List.map + (fun (kn,topt) -> + kn, + match topt with + None -> + (match key with + MSI msid -> + let kn' = replace_mp_in_con (MPself msid) mp kn in + apply_opt_resolver resolve' kn' + | MBI mbid -> + let kn' = replace_mp_in_con (MPbound mbid) mp kn in + apply_opt_resolver resolve' kn' + | MPI mp1 -> + let kn' = replace_mp_in_con mp1 mp kn in + apply_opt_resolver resolve' kn') + | Some t -> Some (subst_mps sub t)) res) + with + BothSubstitutionsAreIdentitySubstitutions -> None + | ChangeDomain res -> + let rec changeDom = function + | [] -> [] + | (kn,topt)::r -> + let key' = + match key with + MSI msid -> MPself msid + | MBI mbid -> MPbound mbid + | MPI mp1 -> mp1 in + let kn' = replace_mp_in_con mp key' kn in + if kn==kn' then + (*the key does not appear in kn, we remove it + from the resolver that we are building*) + changeDom r + else + (kn',topt)::(changeDom r) + in + Some (changeDom res) + in + mp',resolve'' in + Umap.mapi (apply_subst subst2) subst1 + +let remove_alias subst = + let rec remove key (mp,resolve) sub = + match key with + MPI _ -> sub + | _ -> Umap.add key (mp,resolve) sub + in + Umap.fold remove subst empty_subst + let rec occur_in_path uid path = match uid,path with @@ -315,7 +492,8 @@ let force fsubst r = let subst_substituted s r = match !r with - | LSval a -> ref (LSlazy(s,a)) - | LSlazy(s',a) -> - let s'' = join s' s in - ref (LSlazy(s'',a)) + | LSval a -> ref (LSlazy(s,a)) + | LSlazy(s',a) -> + let s'' = join s' s in + ref (LSlazy(s'',a)) + diff --git a/kernel/mod_subst.mli b/kernel/mod_subst.mli index a7915a24..a2e45c52 100644 --- a/kernel/mod_subst.mli +++ b/kernel/mod_subst.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: mod_subst.mli 6621 2005-01-21 17:24:37Z herbelin $ i*) +(*i $Id: mod_subst.mli 10849 2008-04-25 15:55:16Z soubiran $ i*) (*s [Mod_subst] *) @@ -24,11 +24,15 @@ val add_msid : mod_self_id -> module_path -> substitution -> substitution val add_mbid : mod_bound_id -> module_path -> resolver option -> substitution -> substitution +val add_mp : + module_path -> module_path -> substitution -> substitution val map_msid : mod_self_id -> module_path -> substitution val map_mbid : mod_bound_id -> module_path -> resolver option -> substitution +val map_mp : + module_path -> module_path -> substitution (* sequential composition: [substitute (join sub1 sub2) t = substitute sub2 (substitute sub1 t)] @@ -78,3 +82,13 @@ val subst_mps : substitution -> constr -> constr val occur_msid : mod_self_id -> substitution -> bool val occur_mbid : mod_bound_id -> substitution -> bool + +val update_subst_alias : substitution -> substitution -> substitution + +val update_subst : substitution -> substitution -> substitution + +val subst_key : substitution -> substitution -> substitution + +val join_alias : substitution -> substitution -> substitution + +val remove_alias : substitution -> substitution diff --git a/kernel/mod_typing.ml b/kernel/mod_typing.ml index 70de3034..6840febd 100644 --- a/kernel/mod_typing.ml +++ b/kernel/mod_typing.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: mod_typing.ml 9980 2007-07-12 13:32:37Z soubiran $ i*) +(*i $Id: mod_typing.ml 11170 2008-06-25 08:31:04Z soubiran $ i*) open Util open Names @@ -22,14 +22,9 @@ open Mod_subst exception Not_path let path_of_mexpr = function - | MEident mb -> mb + | MSEident mp -> mp | _ -> raise Not_path -let rec replace_first p k = function - | [] -> [] - | h::t when p h -> k::t - | h::t -> h::(replace_first p k t) - let rec list_split_assoc k rev_before = function | [] -> raise Not_found | (k',b)::after when k=k' -> rev_before,b,after @@ -42,28 +37,89 @@ let rec list_fold_map2 f e = function let e'',t1',t2' = list_fold_map2 f e' t in e'',h1'::t1',h2'::t2' -let type_modpath env mp = - strengthen env (lookup_module mp env).mod_type mp +let rec check_with env mtb with_decl = + match with_decl with + | With_Definition (id,_) -> + let cb = check_with_aux_def env mtb with_decl in + SEBwith(mtb,With_definition_body(id,cb)),empty_subst + | With_Module (id,mp) -> + let cst,sub = check_with_aux_mod env mtb with_decl true in + SEBwith(mtb,With_module_body(id,mp,cst)),sub -let rec translate_modtype env mte = - match mte with - | MTEident ln -> MTBident ln - | MTEfunsig (arg_id,arg_e,body_e) -> - let arg_b = translate_modtype env arg_e in - let env' = - add_module (MPbound arg_id) (module_body_of_type arg_b) env in - let body_b = translate_modtype env' body_e in - MTBfunsig (arg_id,arg_b,body_b) - | MTEsig (msid,sig_e) -> - let str_b,sig_b = translate_entry_list env msid false sig_e in - MTBsig (msid,sig_b) - | MTEwith (mte, with_decl) -> - let mtb = translate_modtype env mte in - merge_with env mtb with_decl +and check_with_aux_def env mtb with_decl = + let msid,sig_b = match (eval_struct env mtb) with + | SEBstruct(msid,sig_b) -> + msid,sig_b + | _ -> error_signature_expected mtb + in + let id,idl = match with_decl with + | With_Definition (id::idl,_) | With_Module (id::idl,_) -> id,idl + | With_Definition ([],_) | With_Module ([],_) -> assert false + in + let l = label_of_id id in + try + let rev_before,spec,after = list_split_assoc l [] sig_b in + let before = List.rev rev_before in + let env' = Modops.add_signature (MPself msid) before env in + match with_decl with + | With_Definition ([],_) -> assert false + | With_Definition ([id],c) -> + let cb = match spec with + SFBconst cb -> cb + | _ -> error_not_a_constant l + in + begin + match cb.const_body with + | None -> + let (j,cst1) = Typeops.infer env' c in + let typ = Typeops.type_of_constant_type env' cb.const_type in + let cst2 = Reduction.conv_leq env' j.uj_type typ in + let cst = + Constraint.union + (Constraint.union cb.const_constraints cst1) + cst2 in + let body = Some (Declarations.from_val j.uj_val) in + let cb' = {cb with + const_body = body; + const_body_code = Cemitcodes.from_val + (compile_constant_body env' body false false); + const_constraints = cst} in + cb' + | Some b -> + let cst1 = Reduction.conv env' c (Declarations.force b) in + let cst = Constraint.union cb.const_constraints cst1 in + let body = Some (Declarations.from_val c) in + let cb' = {cb with + const_body = body; + const_body_code = Cemitcodes.from_val + (compile_constant_body env' body false false); + const_constraints = cst} in + cb' + end + | With_Definition (_::_,_) -> + let old = match spec with + SFBmodule msb -> msb + | _ -> error_not_a_module (string_of_label l) + in + begin + match old.mod_expr with + | None -> + let new_with_decl = match with_decl with + With_Definition (_,c) -> With_Definition (idl,c) + | With_Module (_,c) -> With_Module (idl,c) in + check_with_aux_def env' (type_of_mb env old) new_with_decl + | Some msb -> + error_a_generative_module_expected l + end + | _ -> anomaly "Modtyping:incorrect use of with" + with + Not_found -> error_no_such_label l + | Reduction.NotConvertible -> error_with_incorrect l -and merge_with env mtb with_decl = - let msid,sig_b = match (Modops.scrape_modtype env mtb) with - | MTBsig(msid,sig_b) -> msid,sig_b +and check_with_aux_mod env mtb with_decl now = + let initmsid,msid,sig_b = match (eval_struct env mtb) with + | SEBstruct(msid,sig_b) ->let msid'=(refresh_msid msid) in + msid,msid',(subst_signature_msid msid (MPself(msid')) sig_b) | _ -> error_signature_expected mtb in let id,idl = match with_decl with @@ -74,287 +130,251 @@ and merge_with env mtb with_decl = try let rev_before,spec,after = list_split_assoc l [] sig_b in let before = List.rev rev_before in + let rec mp_rec = function + | [] -> MPself initmsid + | i::r -> MPdot(mp_rec r,label_of_id i) + in let env' = Modops.add_signature (MPself msid) before env in - let new_spec = match with_decl with - | With_Definition ([],_) - | With_Module ([],_) -> assert false - | With_Definition ([id],c) -> - let cb = match spec with - SPBconst cb -> cb - | _ -> error_not_a_constant l - in - begin - match cb.const_body with - | None -> - let (j,cst1) = Typeops.infer env' c in - let typ = Typeops.type_of_constant_type env' cb.const_type in - let cst2 = Reduction.conv_leq env' j.uj_type typ in - let cst = - Constraint.union - (Constraint.union cb.const_constraints cst1) - cst2 in - let body = Some (Declarations.from_val j.uj_val) in - SPBconst {cb with - const_body = body; - const_body_code = Cemitcodes.from_val - (compile_constant_body env' body false false); - const_constraints = cst} - | Some b -> - let cst1 = Reduction.conv env' c (Declarations.force b) in - let cst = Constraint.union cb.const_constraints cst1 in - let body = Some (Declarations.from_val c) in - SPBconst {cb with - const_body = body; - const_body_code = Cemitcodes.from_val - (compile_constant_body env' body false false); - const_constraints = cst} - end -(* and what about msid's ????? Don't they clash ? *) - | With_Module ([id], mp) -> - let old = match spec with - SPBmodule msb -> msb - | _ -> error_not_a_module (string_of_label l) - in - let mtb = type_modpath env' mp in - (* here, using assertions in substitutions, - we check that there is no msid bound in mtb *) - begin - try - let _ = subst_modtype (map_msid msid (MPself msid)) mtb in - () - with - Circularity _ -> error_circular_with_module id - end; - let cst = - try check_subtypes env' mtb old.msb_modtype - with Failure _ -> error_with_incorrect (label_of_id id) in - let equiv = - match old.msb_equiv with - | None -> Some mp - | Some mp' -> - begin - try - check_modpath_equiv env' mp mp' - with Not_equiv_path -> error_not_equal mp mp - end; - Some mp - in - let msb = - {msb_modtype = mtb; - msb_equiv = equiv; - msb_constraints = Constraint.union old.msb_constraints cst } - in - SPBmodule msb - | With_Definition (_::_,_) - | With_Module (_::_,_) -> + match with_decl with + | With_Module ([],_) -> assert false + | With_Module ([id], mp) -> + let old,alias = match spec with + SFBmodule msb -> Some msb,None + | SFBalias (mp',cst) -> None,Some (mp',cst) + | _ -> error_not_a_module (string_of_label l) + in + let mtb' = lookup_modtype mp env' in + let cst = + match old,alias with + Some msb,None -> + begin + try Constraint.union + (check_subtypes env' mtb' (module_type_of_module None msb)) + msb.mod_constraints + with Failure _ -> error_with_incorrect (label_of_id id) + end + | None,Some (mp',None) -> + check_modpath_equiv env' mp mp'; + Constraint.empty + | None,Some (mp',Some cst) -> + check_modpath_equiv env' mp mp'; + cst + | _,_ -> + anomaly "Mod_typing:no implementation and no alias" + in + if now then + let mp' = scrape_alias mp env' in + let up_subst = update_subst mtb'.typ_alias (map_mp (mp_rec [id]) mp') in + cst, (join (map_mp (mp_rec [id]) mp') up_subst) + else + cst,empty_subst + | With_Module (_::_,mp) -> let old = match spec with - SPBmodule msb -> msb + SFBmodule msb -> msb | _ -> error_not_a_module (string_of_label l) in begin - match old.msb_equiv with - None -> - let new_with_decl = match with_decl with - With_Definition (_,c) -> With_Definition (idl,c) - | With_Module (_,c) -> With_Module (idl,c) in - let modtype = - merge_with env' old.msb_modtype new_with_decl in - let msb = - {msb_modtype = modtype; - msb_equiv = None; - msb_constraints = old.msb_constraints } - in - SPBmodule msb - | Some mp -> - error_a_generative_module_expected l + match old.mod_expr with + None -> + let new_with_decl = match with_decl with + With_Definition (_,c) -> + With_Definition (idl,c) + | With_Module (_,c) -> With_Module (idl,c) in + let cst,_ = + check_with_aux_mod env' + (type_of_mb env old) new_with_decl false in + if now then + let mtb' = lookup_modtype mp env' in + let mp' = scrape_alias mp env' in + let up_subst = update_subst + mtb'.typ_alias (map_mp (mp_rec (List.rev (id::idl))) mp') in + cst, (join (map_mp (mp_rec (List.rev (id::idl))) mp') up_subst) + else + cst,empty_subst + | Some msb -> + error_a_generative_module_expected l end - in - MTBsig(msid, before@(l,new_spec)::after) + | _ -> anomaly "Modtyping:incorrect use of with" with Not_found -> error_no_such_label l | Reduction.NotConvertible -> error_with_incorrect l - -and translate_entry_list env msid is_definition sig_e = - let mp = MPself msid in - let do_entry env (l,e) = - let kn = make_kn mp empty_dirpath l in - let con = make_con mp empty_dirpath l in - match e with - | SPEconst ce -> - let cb = translate_constant env con ce in - begin match cb.const_hyps with - | (_::_) -> error_local_context (Some l) - | [] -> - add_constant con cb env, (l, SEBconst cb), (l, SPBconst cb) - end - | SPEmind mie -> - let mib = translate_mind env mie in - begin match mib.mind_hyps with - | (_::_) -> error_local_context (Some l) - | [] -> - add_mind kn mib env, (l, SEBmind mib), (l, SPBmind mib) - end - | SPEmodule me -> - let mb = translate_module env is_definition me in - let mspec = - { msb_modtype = mb.mod_type; - msb_equiv = mb.mod_equiv; - msb_constraints = mb.mod_constraints } - in - let mp' = MPdot (mp,l) in - add_module mp' mb env, (l, SEBmodule mb), (l, SPBmodule mspec) - | SPEmodtype mte -> - let mtb = translate_modtype env mte in - add_modtype kn mtb env, (l, SEBmodtype mtb), (l, SPBmodtype mtb) - in - let _,str_b,sig_b = list_fold_map2 do_entry env sig_e - in - str_b,sig_b - -(* if [is_definition=true], [mod_entry_expr] may be any expression. - Otherwise it must be a path *) - -and translate_module env is_definition me = + +and translate_module env me = match me.mod_entry_expr, me.mod_entry_type with | None, None -> anomaly "Mod_typing.translate_module: empty type and expr in module entry" | None, Some mte -> - let mtb = translate_modtype env mte in + let mtb,sub = translate_struct_entry env mte in { mod_expr = None; - mod_user_type = Some mtb; - mod_type = mtb; - mod_equiv = None; - mod_constraints = Constraint.empty } + mod_type = Some mtb; + mod_alias = sub; + mod_constraints = Constraint.empty; + mod_retroknowledge = []} | Some mexpr, _ -> - let meq_o = (* do we have a transparent module ? *) - try (* TODO: transparent field in module_entry *) - match me.mod_entry_type with - | None -> Some (path_of_mexpr mexpr) - | Some _ -> None - with - | Not_path -> None - in - let meb,mtb1 = - if is_definition then - translate_mexpr env mexpr - else - let mp = - try - path_of_mexpr mexpr - with - | Not_path -> error_declaration_not_path mexpr - in - MEBident mp, type_modpath env mp - in - let mtb, mod_user_type, cst = + let meb,sub1 = translate_struct_entry env mexpr in + let mod_typ,sub,cst = match me.mod_entry_type with - | None -> mtb1, None, Constraint.empty + | None -> None,sub1,Constraint.empty | Some mte -> - let mtb2 = translate_modtype env mte in - let cst = check_subtypes env mtb1 mtb2 in - mtb2, Some mtb2, cst + let mtb2,sub2 = translate_struct_entry env mte in + let cst = check_subtypes env + {typ_expr = meb; + typ_strength = None; + typ_alias = sub1;} + {typ_expr = mtb2; + typ_strength = None; + typ_alias = sub2;} + in + Some mtb2,sub2,cst in - { mod_type = mtb; - mod_user_type = mod_user_type; + { mod_type = mod_typ; mod_expr = Some meb; - mod_equiv = meq_o; - mod_constraints = cst } + mod_constraints = cst; + mod_alias = sub; + mod_retroknowledge = []} (* spiwack: not so sure about that. It may + cause a bug when closing nested modules. + If it does, I don't really know how to + fix the bug.*) -(* translate_mexpr : env -> module_expr -> module_expr_body * module_type_body *) -and translate_mexpr env mexpr = match mexpr with - | MEident mp -> - MEBident mp, - type_modpath env mp - | MEfunctor (arg_id, arg_e, body_expr) -> - let arg_b = translate_modtype env arg_e in - let env' = add_module (MPbound arg_id) (module_body_of_type arg_b) env in - let (body_b,body_tb) = translate_mexpr env' body_expr in - MEBfunctor (arg_id, arg_b, body_b), - MTBfunsig (arg_id, arg_b, body_tb) - | MEapply (fexpr,mexpr) -> - let feb,ftb = translate_mexpr env fexpr in - let ftb = scrape_modtype env ftb in - let farg_id, farg_b, fbody_b = destr_functor ftb in - let meb,mtb = translate_mexpr env mexpr in - let cst = check_subtypes env mtb farg_b in - let mp = + +and translate_struct_entry env mse = match mse with + | MSEident mp -> + let mtb = lookup_modtype mp env in + SEBident mp,mtb.typ_alias + | MSEfunctor (arg_id, arg_e, body_expr) -> + let arg_b,sub = translate_struct_entry env arg_e in + let mtb = + {typ_expr = arg_b; + typ_strength = None; + typ_alias = sub} in + let env' = add_module (MPbound arg_id) (module_body_of_type mtb) env in + let body_b,sub = translate_struct_entry env' body_expr in + SEBfunctor (arg_id, mtb, body_b),sub + | MSEapply (fexpr,mexpr) -> + let feb,sub1 = translate_struct_entry env fexpr in + let feb'= eval_struct env feb + in + let farg_id, farg_b, fbody_b = destr_functor env feb' in + let mtb,mp = try - path_of_mexpr mexpr + let mp = scrape_alias (path_of_mexpr mexpr) env in + lookup_modtype mp env,mp with | Not_path -> error_application_to_not_path mexpr - (* place for nondep_supertype *) - in - let resolve = Modops.resolver_of_environment farg_id farg_b mp env in - MEBapply(feb,meb,cst), - (* This is the place where the functor formal parameter is - substituted by the given argument to compute the type of the - functor application. *) - subst_modtype - (map_mbid farg_id mp (Some resolve)) fbody_b - | MEstruct (msid,structure) -> - let structure,signature = translate_entry_list env msid true structure in - MEBstruct (msid,structure), - MTBsig (msid,signature) - - -(* is_definition is true - me.mod_entry_expr may be any expression *) -let translate_module env me = translate_module env true me + (* place for nondep_supertype *) in + let meb,sub2= translate_struct_entry env (MSEident mp) in + if sub1 = empty_subst then + let cst = check_subtypes env mtb farg_b in + SEBapply(feb,meb,cst),sub1 + else + let sub2 = match eval_struct env (SEBident mp) with + | SEBstruct (msid,sign) -> + join_alias + (subst_key (map_msid msid mp) sub2) + (map_msid msid mp) + | _ -> sub2 in + let sub3 = join_alias sub1 (map_mbid farg_id mp None) in + let sub4 = update_subst sub2 sub3 in + let cst = check_subtypes env mtb farg_b in + SEBapply(feb,meb,cst),(join sub3 sub4) + | MSEwith(mte, with_decl) -> + let mtb,sub1 = translate_struct_entry env mte in + let mtb',sub2 = check_with env mtb with_decl in + mtb',join sub1 sub2 + -let rec add_module_expr_constraints env = function - | MEBident _ -> env +let rec add_struct_expr_constraints env = function + | SEBident _ -> env - | MEBfunctor (_,mtb,meb) -> - add_module_expr_constraints (add_modtype_constraints env mtb) meb + | SEBfunctor (_,mtb,meb) -> + add_struct_expr_constraints + (add_modtype_constraints env mtb) meb - | MEBstruct (_,mod_struct_body) -> + | SEBstruct (_,structure_body) -> List.fold_left (fun env (l,item) -> add_struct_elem_constraints env item) env - mod_struct_body + structure_body - | MEBapply (meb1,meb2,cst) -> + | SEBapply (meb1,meb2,cst) -> Environ.add_constraints cst - (add_module_expr_constraints - (add_module_expr_constraints env meb1) + (add_struct_expr_constraints + (add_struct_expr_constraints env meb1) meb2) - + | SEBwith(meb,With_definition_body(_,cb))-> + Environ.add_constraints cb.const_constraints + (add_struct_expr_constraints env meb) + | SEBwith(meb,With_module_body(_,_,cst))-> + Environ.add_constraints cst + (add_struct_expr_constraints env meb) + and add_struct_elem_constraints env = function - | SEBconst cb -> Environ.add_constraints cb.const_constraints env - | SEBmind mib -> Environ.add_constraints mib.mind_constraints env - | SEBmodule mb -> add_module_constraints env mb - | SEBmodtype mtb -> add_modtype_constraints env mtb + | SFBconst cb -> Environ.add_constraints cb.const_constraints env + | SFBmind mib -> Environ.add_constraints mib.mind_constraints env + | SFBmodule mb -> add_module_constraints env mb + | SFBalias (mp,Some cst) -> Environ.add_constraints cst env + | SFBalias (mp,None) -> env + | SFBmodtype mtb -> add_modtype_constraints env mtb and add_module_constraints env mb = - (* if there is a body, the mb.mod_type is either inferred from the - body and hence uninteresting or equal to the non-empty - user_mod_type *) let env = match mb.mod_expr with - | None -> add_modtype_constraints env mb.mod_type - | Some meb -> add_module_expr_constraints env meb + | None -> env + | Some meb -> add_struct_expr_constraints env meb in - let env = match mb.mod_user_type with + let env = match mb.mod_type with | None -> env - | Some mtb -> add_modtype_constraints env mtb + | Some mtb -> + add_struct_expr_constraints env mtb in Environ.add_constraints mb.mod_constraints env -and add_modtype_constraints env = function - | MTBident _ -> env - | MTBfunsig (_,mtb1,mtb2) -> - add_modtype_constraints - (add_modtype_constraints env mtb1) - mtb2 - | MTBsig (_,mod_sig_body) -> +and add_modtype_constraints env mtb = + add_struct_expr_constraints env mtb.typ_expr + + +let rec struct_expr_constraints cst = function + | SEBident _ -> cst + + | SEBfunctor (_,mtb,meb) -> + struct_expr_constraints + (modtype_constraints cst mtb) meb + + | SEBstruct (_,structure_body) -> List.fold_left - (fun env (l,item) -> add_sig_elem_constraints env item) - env - mod_sig_body + (fun cst (l,item) -> struct_elem_constraints cst item) + cst + structure_body + + | SEBapply (meb1,meb2,cst1) -> + struct_expr_constraints + (struct_expr_constraints (Univ.Constraint.union cst1 cst) meb1) + meb2 + | SEBwith(meb,With_definition_body(_,cb))-> + struct_expr_constraints + (Univ.Constraint.union cb.const_constraints cst) meb + | SEBwith(meb,With_module_body(_,_,cst1))-> + struct_expr_constraints (Univ.Constraint.union cst1 cst) meb + +and struct_elem_constraints cst = function + | SFBconst cb -> cst + | SFBmind mib -> cst + | SFBmodule mb -> module_constraints cst mb + | SFBalias (mp,Some cst1) -> Univ.Constraint.union cst1 cst + | SFBalias (mp,None) -> cst + | SFBmodtype mtb -> modtype_constraints cst mtb -and add_sig_elem_constraints env = function - | SPBconst cb -> Environ.add_constraints cb.const_constraints env - | SPBmind mib -> Environ.add_constraints mib.mind_constraints env - | SPBmodule {msb_modtype=mtb; msb_constraints=cst} -> - add_modtype_constraints (Environ.add_constraints cst env) mtb - | SPBmodtype mtb -> add_modtype_constraints env mtb +and module_constraints cst mb = + let cst = match mb.mod_expr with + | None -> cst + | Some meb -> struct_expr_constraints cst meb in + let cst = match mb.mod_type with + | None -> cst + | Some mtb -> struct_expr_constraints cst mtb in + Univ.Constraint.union mb.mod_constraints cst +and modtype_constraints cst mtb = + struct_expr_constraints cst mtb.typ_expr + +let struct_expr_constraints = struct_expr_constraints Univ.Constraint.empty +let module_constraints = module_constraints Univ.Constraint.empty diff --git a/kernel/mod_typing.mli b/kernel/mod_typing.mli index 706c617c..b9c68a23 100644 --- a/kernel/mod_typing.mli +++ b/kernel/mod_typing.mli @@ -6,22 +6,27 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: mod_typing.mli 6621 2005-01-21 17:24:37Z herbelin $ i*) +(*i $Id: mod_typing.mli 11170 2008-06-25 08:31:04Z soubiran $ i*) (*i*) open Declarations open Environ open Entries +open Mod_subst (*i*) -val translate_modtype : env -> module_type_entry -> module_type_body - val translate_module : env -> module_entry -> module_body -val translate_mexpr : env -> module_expr -> module_expr_body * module_type_body +val translate_struct_entry : env -> module_struct_entry -> + struct_expr_body * substitution val add_modtype_constraints : env -> module_type_body -> env val add_module_constraints : env -> module_body -> env +val add_struct_expr_constraints : env -> struct_expr_body -> env + +val struct_expr_constraints : struct_expr_body -> Univ.constraints + +val module_constraints : module_body -> Univ.constraints diff --git a/kernel/modops.ml b/kernel/modops.ml index fb00cfcd..9242a757 100644 --- a/kernel/modops.ml +++ b/kernel/modops.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: modops.ml 9980 2007-07-12 13:32:37Z soubiran $ i*) +(*i $Id: modops.ml 11142 2008-06-18 15:37:31Z soubiran $ i*) (*i*) open Util @@ -20,7 +20,6 @@ open Entries open Mod_subst (*i*) -exception Circularity of string let error_existing_label l = error ("The label "^string_of_label l^" is already declared") @@ -33,11 +32,10 @@ let error_not_a_functor _ = error "Application of not a functor" let error_incompatible_modtypes _ _ = error "Incompatible module types" -let error_not_equal p1 p2 = error ((string_of_mp p1)^" and "^(string_of_mp p2)^" are not equal modules") +let error_not_equal _ _ = error "Not equal modules" + +let error_not_match l _ = error ("Signature components for label "^string_of_label l^" do not match") -let error_not_match l l1 l2 = error (l1^" is not a subtype of "^l2^": "^ - "Signature components for label "^(string_of_label l)^" do not match.") - let error_no_such_label l = error ("No such label "^string_of_label l) let error_incompatible_labels l l' = @@ -83,140 +81,332 @@ let error_local_context lo = error ("The local context of the component "^ (string_of_label l)^" is not empty") -let error_circular_with_module l = - error ("The construction \"with Module "^(string_of_id l)^":=...\" is about to create\na circular module type. Their resolution is not implemented yet.\nIf you really need that feature, please report.") - -let error_circularity_in_subtyping l l1 l2 = - error ("An occurrence of "^l^" creates a circularity\n during the subtyping verification between "^l1^" and "^l2^".") let error_no_such_label_sub l l1 l2 = - error (l1^" is not a subtype of "^l2^":"^"The field "^(string_of_label l)^" is missing in "^l1^".") + error (l1^" is not a subtype of "^l2^".\nThe field "^(string_of_label l)^" is missing in "^l1^".") -let rec scrape_modtype env = function - | MTBident kn -> scrape_modtype env (lookup_modtype kn env) - | mtb -> mtb -(* the constraints are not important here *) -let module_body_of_spec msb = - { mod_type = msb.msb_modtype; - mod_equiv = msb.msb_equiv; - mod_expr = None; - mod_user_type = None; - mod_constraints = Constraint.empty} - -let module_body_of_type mtb = - { mod_type = mtb; - mod_equiv = None; - mod_expr = None; - mod_user_type = None; - mod_constraints = Constraint.empty} +let rec list_split_assoc k rev_before = function + | [] -> raise Not_found + | (k',b)::after when k=k' -> rev_before,b,after + | h::tail -> list_split_assoc k (h::rev_before) tail +let path_of_seb = function + | SEBident mp -> mp + | _ -> anomaly "Modops: evaluation failed." -(* the constraints are not important here *) -let module_spec_of_body mb = - { msb_modtype = mb.mod_type; - msb_equiv = mb.mod_equiv; - msb_constraints = Constraint.empty} +let destr_functor env mtb = + match mtb with + | SEBfunctor (arg_id,arg_t,body_t) -> + (arg_id,arg_t,body_t) + | _ -> error_not_a_functor mtb +(* the constraints are not important here *) -let destr_functor = function - | MTBfunsig (arg_id,arg_t,body_t) -> (arg_id,arg_t,body_t) - | mtb -> error_not_a_functor mtb - -exception Not_equiv_path +let module_body_of_type mtb = + { mod_type = Some mtb.typ_expr; + mod_expr = None; + mod_constraints = Constraint.empty; + mod_alias = mtb.typ_alias; + mod_retroknowledge = []} + +let module_type_of_module mp mb = + {typ_expr = + (match mb.mod_type with + | Some expr -> expr + | None -> (match mb.mod_expr with + | Some expr -> expr + | None -> + anomaly "Modops: empty expr and type")); + typ_alias = mb.mod_alias; + typ_strength = mp + } let rec check_modpath_equiv env mp1 mp2 = if mp1=mp2 then () else - let mb1 = lookup_module mp1 env in - match mb1.mod_equiv with - | None -> - let mb2 = lookup_module mp2 env in - (match mb2.mod_equiv with - | None -> raise Not_equiv_path - | Some mp2' -> check_modpath_equiv env mp2' mp1) - | Some mp1' -> check_modpath_equiv env mp2 mp1' - - -let rec subst_modtype sub = function - (* This is the case in which I am substituting a whole module. - For instance "Module M(X). Module N := X. End M". When I apply - M to M' I must substitute M' for X in "Module N := X". *) - | MTBident ln -> MTBident (subst_kn sub ln) - | MTBfunsig (arg_id, arg_b, body_b) -> - if occur_mbid arg_id sub then raise (Circularity (string_of_mbid arg_id)); - MTBfunsig (arg_id, - subst_modtype sub arg_b, - subst_modtype sub body_b) - | MTBsig (sid1, msb) -> - if occur_msid sid1 sub then raise (Circularity (string_of_msid sid1)); - MTBsig (sid1, subst_signature sub msb) - -and subst_signature sub sign = - let subst_body = function - SPBconst cb -> - SPBconst (subst_const_body sub cb) - | SPBmind mib -> - SPBmind (subst_mind sub mib) - | SPBmodule mb -> - SPBmodule (subst_module sub mb) - | SPBmodtype mtb -> - SPBmodtype (subst_modtype sub mtb) + let mp1 = scrape_alias mp1 env in + let mp2 = scrape_alias mp2 env in + if mp1=mp2 then () + else + error_not_equal mp1 mp2 + +let subst_with_body sub = function + | With_module_body(id,mp,cst) -> + With_module_body(id,subst_mp sub mp,cst) + | With_definition_body(id,cb) -> + With_definition_body( id,subst_const_body sub cb) + +let rec subst_modtype sub mtb = + let typ_expr' = subst_struct_expr sub mtb.typ_expr in + if typ_expr'==mtb.typ_expr then + mtb + else + { mtb with + typ_expr = typ_expr'} + +and subst_structure sub sign = + let subst_body = function + SFBconst cb -> + SFBconst (subst_const_body sub cb) + | SFBmind mib -> + SFBmind (subst_mind sub mib) + | SFBmodule mb -> + SFBmodule (subst_module sub mb) + | SFBmodtype mtb -> + SFBmodtype (subst_modtype sub mtb) + | SFBalias (mp,cst) -> + SFBalias (subst_mp sub mp,cst) in List.map (fun (l,b) -> (l,subst_body b)) sign -and subst_module sub mb = - let mtb' = subst_modtype sub mb.msb_modtype in +and subst_module sub mb = + let mtb' = Option.smartmap (subst_struct_expr sub) mb.mod_type in (* This is similar to the previous case. In this case we have a module M in a signature that is knows to be equivalent to a module M' (because the signature is "K with Module M := M'") and we are substituting M' with some M''. *) - let mpo' = option_smartmap (subst_mp sub) mb.msb_equiv in - if mtb'==mb.msb_modtype && mpo'==mb.msb_equiv then mb else - { msb_modtype=mtb'; - msb_equiv=mpo'; - msb_constraints=mb.msb_constraints} + let me' = Option.smartmap (subst_struct_expr sub) mb.mod_expr in + let mb_alias = update_subst sub mb.mod_alias in + let mb_alias = if mb_alias = empty_subst then + join_alias mb.mod_alias sub + else + join mb_alias (join_alias mb.mod_alias sub) + in + if mtb'==mb.mod_type && mb.mod_expr == me' + && mb_alias == mb.mod_alias + then mb else + { mod_expr = me'; + mod_type=mtb'; + mod_constraints=mb.mod_constraints; + mod_alias = mb_alias; + mod_retroknowledge=mb.mod_retroknowledge} + + +and subst_struct_expr sub = function + | SEBident mp -> SEBident (subst_mp sub mp) + | SEBfunctor (msid, mtb, meb') -> + SEBfunctor(msid,subst_modtype sub mtb,subst_struct_expr sub meb') + | SEBstruct (msid,str)-> + SEBstruct(msid, subst_structure sub str) + | SEBapply (meb1,meb2,cst)-> + SEBapply(subst_struct_expr sub meb1, + subst_struct_expr sub meb2, + cst) + | SEBwith (meb,wdb)-> + SEBwith(subst_struct_expr sub meb, + subst_with_body sub wdb) + let subst_signature_msid msid mp = - subst_signature (map_msid msid mp) + subst_structure (map_msid msid mp) + +(* spiwack: here comes the function which takes care of importing + the retroknowledge declared in the library *) +(* lclrk : retroknowledge_action list, rkaction : retroknowledge action *) +let add_retroknowledge msid mp = + let subst = add_msid msid mp empty_subst in + let subst_and_perform rkaction env = + match rkaction with + | Retroknowledge.RKRegister (f, e) -> + Environ.register env f + (match e with + | Const kn -> kind_of_term (subst_mps subst (mkConst kn)) + | Ind ind -> kind_of_term (subst_mps subst (mkInd ind)) + | _ -> anomaly "Modops.add_retroknowledge: had to import an unsupported kind of term") + in + fun lclrk env -> + (* The order of the declaration matters, for instance (and it's at the + time this comment is being written, the only relevent instance) the + int31 type registration absolutely needs int31 bits to be registered. + Since the local_retroknowledge is stored in reverse order (each new + registration is added at the top of the list) we need a fold_right + for things to go right (the pun is not intented). So we lose + tail recursivity, but the world will have exploded before any module + imports 10 000 retroknowledge registration.*) + List.fold_right subst_and_perform lclrk env + + + +let strengthen_const env mp l cb = + match cb.const_opaque, cb.const_body with + | false, Some _ -> cb + | true, Some _ + | _, None -> + let const = mkConst (make_con mp empty_dirpath l) in + let const_subs = Some (Declarations.from_val const) in + {cb with + const_body = const_subs; + const_opaque = false; + const_body_code = Cemitcodes.from_val + (compile_constant_body env const_subs false false) + } + +let strengthen_mind env mp l mib = match mib.mind_equiv with + | Some _ -> mib + | None -> {mib with mind_equiv = Some (make_kn mp empty_dirpath l)} -(* we assume that the substitution of "mp" into "msid" is already done -(or unnecessary) *) -let rec add_signature mp sign env = + +let rec eval_struct env = function + | SEBident mp -> + begin + let mtb =lookup_modtype mp env in + match mtb.typ_expr,mtb.typ_strength with + mtb,None -> eval_struct env mtb + | mtb,Some mp -> strengthen_mtb env mp (eval_struct env mtb) + end + | SEBapply (seb1,seb2,_) -> + let svb1 = eval_struct env seb1 in + let farg_id, farg_b, fbody_b = destr_functor env svb1 in + let mp = path_of_seb seb2 in + let mp = scrape_alias mp env in + let sub_alias = (lookup_modtype mp env).typ_alias in + let sub_alias = match eval_struct env (SEBident mp) with + | SEBstruct (msid,sign) -> + join_alias + (subst_key (map_msid msid mp) sub_alias) + (map_msid msid mp) + | _ -> sub_alias in + let sub_alias1 = update_subst sub_alias + (map_mbid farg_id mp (None)) in + let resolve = resolver_of_environment farg_id farg_b mp sub_alias env in + eval_struct env (subst_struct_expr + (join sub_alias1 + (map_mbid farg_id mp (Some resolve))) fbody_b) + | SEBwith (mtb,(With_definition_body _ as wdb)) -> + let mtb',_ = merge_with env mtb wdb empty_subst in + mtb' + | SEBwith (mtb, (With_module_body (_,mp,_) as wdb)) -> + let alias_in_mp = + (lookup_modtype mp env).typ_alias in + let alias_in_mp = match eval_struct env (SEBident mp) with + | SEBstruct (msid,sign) -> subst_key (map_msid msid mp) alias_in_mp + | _ -> alias_in_mp in + let mtb',_ = merge_with env mtb wdb alias_in_mp in + mtb' +(* | SEBfunctor(mbid,mtb,body) -> + let env = add_module (MPbound mbid) (module_body_of_type mtb) env in + SEBfunctor(mbid,mtb,eval_struct env body) *) + | mtb -> mtb + +and type_of_mb env mb = + match mb.mod_type,mb.mod_expr with + None,Some b -> eval_struct env b + | Some t, _ -> eval_struct env t + | _,_ -> anomaly + "Modops: empty type and empty expr" + +and merge_with env mtb with_decl alias= + let msid,sig_b = match (eval_struct env mtb) with + | SEBstruct(msid,sig_b) -> msid,sig_b + | _ -> error_signature_expected mtb + in + let id,idl = match with_decl with + | With_definition_body (id::idl,_) | With_module_body (id::idl,_,_) -> id,idl + | With_definition_body ([],_) | With_module_body ([],_,_) -> assert false + in + let l = label_of_id id in + try + let rev_before,spec,after = list_split_assoc l [] sig_b in + let before = List.rev rev_before in + let rec mp_rec = function + | [] -> MPself msid + | i::r -> MPdot(mp_rec r,label_of_id i) + in + let new_spec,subst = match with_decl with + | With_definition_body ([],_) + | With_module_body ([],_,_) -> assert false + | With_definition_body ([id],c) -> + SFBconst c,None + | With_module_body ([id], mp,cst) -> + let mp' = scrape_alias mp env in + let new_alias = update_subst alias (map_mp (mp_rec [id]) mp') in + SFBalias (mp,Some cst), + Some(join (map_mp (mp_rec [id]) mp') new_alias) + | With_definition_body (_::_,_) + | With_module_body (_::_,_,_) -> + let old = match spec with + SFBmodule msb -> msb + | _ -> error_not_a_module (string_of_label l) + in + let new_with_decl,subst1 = + match with_decl with + With_definition_body (_,c) -> With_definition_body (idl,c),None + | With_module_body (idc,mp,cst) -> + let mp' = scrape_alias mp env in + With_module_body (idl,mp,cst), + Some(map_mp (mp_rec (List.rev idc)) mp') + in + let subst = match subst1 with + | None -> None + | Some s -> Some (join s (update_subst alias s)) in + let modtype,subst_msb = + merge_with env (type_of_mb env old) new_with_decl alias in + let msb = + { mod_expr = None; + mod_type = Some modtype; + mod_constraints = old.mod_constraints; + mod_alias = begin + match subst_msb with + |None -> empty_subst + |Some s -> s + end; + mod_retroknowledge = old.mod_retroknowledge} + in + (SFBmodule msb),subst + in + SEBstruct(msid, before@(l,new_spec):: + (Option.fold_right subst_structure subst after)),subst + with + Not_found -> error_no_such_label l + +and add_signature mp sign env = let add_one env (l,elem) = let kn = make_kn mp empty_dirpath l in let con = make_con mp empty_dirpath l in match elem with - | SPBconst cb -> Environ.add_constant con cb env - | SPBmind mib -> Environ.add_mind kn mib env - | SPBmodule mb -> - add_module (MPdot (mp,l)) (module_body_of_spec mb) env - (* adds components as well *) - | SPBmodtype mtb -> Environ.add_modtype kn mtb env + | SFBconst cb -> Environ.add_constant con cb env + | SFBmind mib -> Environ.add_mind kn mib env + | SFBmodule mb -> + add_module (MPdot (mp,l)) mb env + (* adds components as well *) + | SFBalias (mp1,cst) -> + Environ.register_alias (MPdot(mp,l)) mp1 env + | SFBmodtype mtb -> Environ.add_modtype (MPdot(mp,l)) + mtb env in List.fold_left add_one env sign - and add_module mp mb env = let env = Environ.shallow_add_module mp mb env in - match scrape_modtype env mb.mod_type with - | MTBident _ -> anomaly "scrape_modtype does not work!" - | MTBsig (msid,sign) -> - add_signature mp (subst_signature_msid msid mp sign) env - | MTBfunsig _ -> env + let env = + Environ.add_modtype mp (module_type_of_module (Some mp) mb) env + in + let mod_typ = type_of_mb env mb in + match mod_typ with + | SEBstruct (msid,sign) -> + add_retroknowledge msid mp (mb.mod_retroknowledge) + (add_signature mp (subst_signature_msid msid mp sign) env) + | SEBfunctor _ -> env + | _ -> anomaly "Modops:the evaluation of the structure failed " + -let rec constants_of_specification env mp sign = +and constants_of_specification env mp sign = let aux (env,res) (l,elem) = match elem with - | SPBconst cb -> env,((make_con mp empty_dirpath l),cb)::res - | SPBmind _ -> env,res - | SPBmodule mb -> - let new_env = add_module (MPdot (mp,l)) (module_body_of_spec mb) env in + | SFBconst cb -> env,((make_con mp empty_dirpath l),cb)::res + | SFBmind _ -> env,res + | SFBmodule mb -> + let new_env = add_module (MPdot (mp,l)) mb env in + new_env,(constants_of_modtype env (MPdot (mp,l)) + (type_of_mb env mb)) @ res + | SFBalias (mp1,cst) -> + let new_env = register_alias (MPdot (mp,l)) mp1 env in new_env,(constants_of_modtype env (MPdot (mp,l)) - (module_body_of_spec mb).mod_type) @ res - | SPBmodtype mtb -> + (eval_struct env (SEBident mp1))) @ res + | SFBmodtype mtb -> (* module type dans un module type. Il faut au moins mettre mtb dans l'environnement (avec le bon kn pour pouvoir continuer aller deplier les modules utilisant ce @@ -232,87 +422,98 @@ let rec constants_of_specification env mp sign = si on ne rajoute pas T2 dans l'environement de typage on va exploser au moment du Declare Module *) - let new_env = Environ.add_modtype (make_kn mp empty_dirpath l) mtb env in - new_env, constants_of_modtype env (MPdot(mp,l)) mtb @ res + let new_env = Environ.add_modtype (MPdot(mp,l)) mtb env in + new_env, (constants_of_modtype env (MPdot(mp,l)) mtb.typ_expr) @ res in snd (List.fold_left aux (env,[]) sign) and constants_of_modtype env mp modtype = - match scrape_modtype env modtype with - MTBident _ -> anomaly "scrape_modtype does not work!" - | MTBsig (msid,sign) -> - constants_of_specification env mp - (subst_signature_msid msid mp sign) - | MTBfunsig _ -> [] - -(* returns a resolver for kn that maps mbid to mp *) -(* Desactivated until v8.2, waiting for the integration -of "Parameter Inline". *) -let resolver_of_environment mbid modtype mp env = - let constants = constants_of_modtype env (MPbound mbid) modtype in - let _ = List.map (fun (con,_) -> con,None) constants in - Mod_subst.make_resolver [] - - -let strengthen_const env mp l cb = - match cb.const_opaque, cb.const_body with - | false, Some _ -> cb - | true, Some _ - | _, None -> - let const = mkConst (make_con mp empty_dirpath l) in - let const_subs = Some (Declarations.from_val const) in - {cb with - const_body = const_subs; - const_opaque = false; - const_body_code = Cemitcodes.from_val - (compile_constant_body env const_subs false false) - } + match (eval_struct env modtype) with + SEBstruct (msid,sign) -> + constants_of_specification env mp + (subst_signature_msid msid mp sign) + | SEBfunctor _ -> [] + | _ -> anomaly "Modops:the evaluation of the structure failed " + +(* returns a resolver for kn that maps mbid to mp. We only keep + constants that have the inline flag *) +and resolver_of_environment mbid modtype mp alias env = + let constants = constants_of_modtype env (MPbound mbid) modtype.typ_expr in + let constants = List.map (fun (l,cb) -> (l,subst_const_body alias cb)) constants in + let rec make_resolve = function + | [] -> [] + | (con,expecteddef)::r -> + let con' = replace_mp_in_con (MPbound mbid) mp con in + let con',_ = subst_con alias con' in + (* let con' = replace_mp_in_con (MPbound mbid) mp con' in *) + try + if expecteddef.Declarations.const_inline then + let constant = lookup_constant con' env in + if (not constant.Declarations.const_opaque) then + let constr = Option.map Declarations.force + constant.Declarations.const_body in + (con,constr)::(make_resolve r) + else make_resolve r + else make_resolve r + with Not_found -> error_no_such_label (con_label con') + in + let resolve = make_resolve constants in + Mod_subst.make_resolver resolve -let strengthen_mind env mp l mib = match mib.mind_equiv with - | Some _ -> mib - | None -> {mib with mind_equiv = Some (make_kn mp empty_dirpath l)} -let rec strengthen_mtb env mp mtb = match scrape_modtype env mtb with - | MTBident _ -> anomaly "scrape_modtype does not work!" - | MTBfunsig _ -> mtb - | MTBsig (msid,sign) -> MTBsig (msid,strengthen_sig env msid sign mp) - -and strengthen_mod env mp msb = - { msb_modtype = strengthen_mtb env mp msb.msb_modtype; - msb_equiv = begin match msb.msb_equiv with - | Some _ -> msb.msb_equiv - | None -> Some mp - end ; - msb_constraints = msb.msb_constraints; } - +and strengthen_mtb env mp mtb = + let mtb1 = eval_struct env mtb in + match mtb1 with + | SEBfunctor _ -> mtb1 + | SEBstruct (msid,sign) -> + SEBstruct (msid,strengthen_sig env msid sign mp) + | _ -> anomaly "Modops:the evaluation of the structure failed " + +and strengthen_mod env mp mb = + let mod_typ = type_of_mb env mb in + { mod_expr = mb.mod_expr; + mod_type = Some (strengthen_mtb env mp mod_typ); + mod_constraints = mb.mod_constraints; + mod_alias = mb.mod_alias; + mod_retroknowledge = mb.mod_retroknowledge} + and strengthen_sig env msid sign mp = match sign with | [] -> [] - | (l,SPBconst cb) :: rest -> - let item' = l,SPBconst (strengthen_const env mp l cb) in + | (l,SFBconst cb) :: rest -> + let item' = l,SFBconst (strengthen_const env mp l cb) in let rest' = strengthen_sig env msid rest mp in item'::rest' - | (l,SPBmind mib) :: rest -> - let item' = l,SPBmind (strengthen_mind env mp l mib) in + | (l,SFBmind mib) :: rest -> + let item' = l,SFBmind (strengthen_mind env mp l mib) in let rest' = strengthen_sig env msid rest mp in item'::rest' - | (l,SPBmodule mb) :: rest -> + | (l,SFBmodule mb) :: rest -> let mp' = MPdot (mp,l) in - let item' = l,SPBmodule (strengthen_mod env mp' mb) in - let env' = add_module - (MPdot (MPself msid,l)) - (module_body_of_spec mb) - env - in + let item' = l,SFBmodule (strengthen_mod env mp' mb) in + let env' = add_module + (MPdot (MPself msid,l)) mb env in + let rest' = strengthen_sig env' msid rest mp in + item':: rest' + | ((l,SFBalias (mp1,cst)) as item) :: rest -> + let env' = register_alias (MPdot(MPself msid,l)) mp1 env in let rest' = strengthen_sig env' msid rest mp in - item'::rest' - | (l,SPBmodtype mty as item) :: rest -> + item::rest' + | (l,SFBmodtype mty as item) :: rest -> let env' = add_modtype - (make_kn (MPself msid) empty_dirpath l) + (MPdot((MPself msid),l)) mty env in let rest' = strengthen_sig env' msid rest mp in item::rest' + let strengthen env mtb mp = strengthen_mtb env mp mtb + +let update_subst env mb mp = + match type_of_mb env mb with + | SEBstruct(msid,str) -> false, join_alias + (subst_key (map_msid msid mp) mb.mod_alias) + (map_msid msid mp) + | _ -> true, mb.mod_alias diff --git a/kernel/modops.mli b/kernel/modops.mli index 61761bb7..2d8b21ad 100644 --- a/kernel/modops.mli +++ b/kernel/modops.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: modops.mli 9980 2007-07-12 13:32:37Z soubiran $ i*) +(*i $Id: modops.mli 10664 2008-03-14 11:27:37Z soubiran $ i*) (*i*) open Util @@ -20,35 +20,36 @@ open Mod_subst (* Various operations on modules and module types *) -exception Circularity of string -exception Not_equiv_path - -(* recursively unfold MTBdent module types *) -val scrape_modtype : env -> module_type_body -> module_type_body - (* make the environment entry out of type *) val module_body_of_type : module_type_body -> module_body -val module_body_of_spec : module_specification_body -> module_body - -val module_spec_of_body : module_body -> module_specification_body - +val module_type_of_module : module_path option -> module_body -> + module_type_body val destr_functor : - module_type_body -> mod_bound_id * module_type_body * module_type_body - + env -> struct_expr_body -> mod_bound_id * module_type_body * struct_expr_body val subst_modtype : substitution -> module_type_body -> module_type_body +val subst_structure : substitution -> structure_body -> structure_body + +val subst_struct_expr : substitution -> struct_expr_body -> struct_expr_body val subst_signature_msid : mod_self_id -> module_path -> - module_signature_body -> module_signature_body + structure_body -> structure_body + +val subst_structure : substitution -> structure_body -> structure_body + +(* Evaluation functions *) +val eval_struct : env -> struct_expr_body -> struct_expr_body + +val type_of_mb : env -> module_body -> struct_expr_body (* [add_signature mp sign env] assumes that the substitution [msid] $\mapsto$ [mp] has already been performed (or is not necessary, like when [mp = MPself msid]) *) val add_signature : - module_path -> module_signature_body -> env -> env + module_path -> structure_body -> env -> env (* adds a module and its components, but not the constraints *) val add_module : @@ -56,22 +57,24 @@ val add_module : val check_modpath_equiv : env -> module_path -> module_path -> unit -val strengthen : env -> module_type_body -> module_path -> module_type_body +val strengthen : env -> struct_expr_body -> module_path -> struct_expr_body + +val update_subst : env -> module_body -> module_path -> bool * substitution val error_existing_label : label -> 'a -val error_declaration_not_path : module_expr -> 'a +val error_declaration_not_path : module_struct_entry -> 'a -val error_application_to_not_path : module_expr -> 'a +val error_application_to_not_path : module_struct_entry -> 'a -val error_not_a_functor : module_expr -> 'a +val error_not_a_functor : module_struct_entry -> 'a val error_incompatible_modtypes : module_type_body -> module_type_body -> 'a val error_not_equal : module_path -> module_path -> 'a -val error_not_match : label -> string -> string -> 'a +val error_not_match : label -> structure_field_body -> 'a val error_incompatible_labels : label -> label -> 'a @@ -79,7 +82,7 @@ val error_no_such_label : label -> 'a val error_result_must_be_signature : unit -> 'a -val error_signature_expected : module_type_body -> 'a +val error_signature_expected : struct_expr_body -> 'a val error_no_module_to_end : unit -> 'a @@ -99,11 +102,9 @@ val error_a_generative_module_expected : label -> 'a val error_local_context : label option -> 'a -val error_circular_with_module : identifier -> 'a - -val error_circularity_in_subtyping : string->string->string-> 'a - val error_no_such_label_sub : label->string->string->'a val resolver_of_environment : - mod_bound_id -> module_type_body -> module_path -> env -> resolver + mod_bound_id -> module_type_body -> module_path -> substitution + -> env -> resolver + diff --git a/kernel/names.ml b/kernel/names.ml index 4273fe14..26bcc2eb 100644 --- a/kernel/names.ml +++ b/kernel/names.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: names.ml 9980 2007-07-12 13:32:37Z soubiran $ *) +(* $Id: names.ml 10919 2008-05-11 22:04:26Z msozeau $ *) open Pp open Util @@ -17,7 +17,7 @@ type identifier = string let id_ord = Pervasives.compare -let id_of_string s = String.copy s +let id_of_string s = check_ident s; String.copy s let string_of_id id = String.copy id @@ -65,16 +65,15 @@ let repr_dirpath x = x let empty_dirpath = [] let string_of_dirpath = function - | [] -> "" - | sl -> - String.concat "." (List.map string_of_id (List.rev sl)) + | [] -> "<>" + | sl -> String.concat "." (List.map string_of_id (List.rev sl)) let u_number = ref 0 type uniq_ident = int * string * dir_path let make_uid dir s = incr u_number;(!u_number,String.copy s,dir) -let debug_string_of_uid (i,s,p) = - "<"(*^string_of_dirpath p ^"#"^*) ^ s ^"#"^ string_of_int i^">" + let debug_string_of_uid (i,s,p) = + "<"(*^string_of_dirpath p ^"#"^*) ^ s ^"#"^ string_of_int i^">" let string_of_uid (i,s,p) = string_of_dirpath p ^"."^s @@ -83,20 +82,24 @@ module Umap = Map.Make(struct let compare = Pervasives.compare end) +type label = string type mod_self_id = uniq_ident let make_msid = make_uid let debug_string_of_msid = debug_string_of_uid +let refresh_msid (_,s,dir) = make_uid dir s let string_of_msid = string_of_uid let id_of_msid (_,s,_) = s +let label_of_msid (_,s,_) = s type mod_bound_id = uniq_ident let make_mbid = make_uid let debug_string_of_mbid = debug_string_of_uid let string_of_mbid = string_of_uid let id_of_mbid (_,s,_) = s +let label_of_mbid (_,s,_) = s + -type label = string let mk_label l = l let string_of_label l = l @@ -181,7 +184,7 @@ module Cmap = KNmap module Cpred = KNpred module Cset = KNset -let default_module_name = id_of_string "If you see this, it's a bug" +let default_module_name = "If you see this, it's a bug" let initial_dir = make_dirpath [default_module_name] @@ -314,6 +317,11 @@ let hcons_names () = type transparent_state = Idpred.t * Cpred.t +let empty_transparent_state = (Idpred.empty, Cpred.empty) +let full_transparent_state = (Idpred.full, Cpred.full) +let var_full_transparent_state = (Idpred.full, Cpred.empty) +let cst_full_transparent_state = (Idpred.empty, Cpred.full) + type 'a tableKey = | ConstKey of constant | VarKey of identifier @@ -326,5 +334,3 @@ type inv_rel_key = int (* index in the [rel_context] part of environment type id_key = inv_rel_key tableKey - - diff --git a/kernel/names.mli b/kernel/names.mli index c9fef60a..c6f59048 100644 --- a/kernel/names.mli +++ b/kernel/names.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: names.mli 9558 2007-01-30 14:58:42Z soubiran $ i*) +(*i $Id: names.mli 10919 2008-05-11 22:04:26Z msozeau $ i*) (*s Identifiers *) @@ -42,13 +42,15 @@ val string_of_dirpath : dir_path -> string (*s Unique identifier to be used as "self" in structures and signatures - invisible for users *) - +type label type mod_self_id (* The first argument is a file name - to prevent conflict between different files *) val make_msid : dir_path -> string -> mod_self_id val id_of_msid : mod_self_id -> identifier +val label_of_msid : mod_self_id -> label +val refresh_msid : mod_self_id -> mod_self_id val debug_string_of_msid : mod_self_id -> string val string_of_msid : mod_self_id -> string @@ -57,15 +59,15 @@ type mod_bound_id val make_mbid : dir_path -> string -> mod_bound_id val id_of_mbid : mod_bound_id -> identifier +val label_of_mbid : mod_bound_id -> label val debug_string_of_mbid : mod_bound_id -> string val string_of_mbid : mod_bound_id -> string (*s Names of structure elements *) -type label + val mk_label : string -> label val string_of_label : label -> string - val label_of_id : identifier -> label val id_of_label : label -> identifier @@ -167,6 +169,11 @@ type 'a tableKey = type transparent_state = Idpred.t * Cpred.t +val empty_transparent_state : transparent_state +val full_transparent_state : transparent_state +val var_full_transparent_state : transparent_state +val cst_full_transparent_state : transparent_state + type inv_rel_key = int (* index in the [rel_context] part of environment starting by the end, {\em inverse} of de Bruijn indice *) diff --git a/kernel/pre_env.ml b/kernel/pre_env.ml index 947e4675..dd4d430a 100644 --- a/kernel/pre_env.ml +++ b/kernel/pre_env.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: pre_env.ml 8810 2006-05-12 18:50:21Z barras $ *) +(* $Id: pre_env.ml 10664 2008-03-14 11:27:37Z soubiran $ *) open Util open Names @@ -26,34 +26,31 @@ type globals = { env_constants : constant_key Cmap.t; env_inductives : mutual_inductive_body KNmap.t; env_modules : module_body MPmap.t; - env_modtypes : module_type_body KNmap.t } + env_modtypes : module_type_body MPmap.t; + env_alias : module_path MPmap.t } type stratification = { env_universes : universes; env_engagement : engagement option } -type 'a val_kind = - | VKvalue of values - | VKaxiom of 'a - | VKdef of constr +type val_kind = + | VKvalue of values * Idset.t + | VKnone -type 'a lazy_val = 'a val_kind ref +type lazy_val = val_kind ref -type rel_val = inv_rel_key lazy_val - -type named_val = identifier lazy_val - -type named_vals = (identifier * named_val) list +type named_vals = (identifier * lazy_val) list type env = { env_globals : globals; env_named_context : named_context; env_named_vals : named_vals; env_rel_context : rel_context; - env_rel_val : rel_val list; + env_rel_val : lazy_val list; env_nb_rel : int; - env_stratification : stratification } + env_stratification : stratification; + retroknowledge : Retroknowledge.retroknowledge } type named_context_val = named_context * named_vals @@ -64,7 +61,8 @@ let empty_env = { env_constants = Cmap.empty; env_inductives = KNmap.empty; env_modules = MPmap.empty; - env_modtypes = KNmap.empty }; + env_modtypes = MPmap.empty; + env_alias = MPmap.empty }; env_named_context = empty_named_context; env_named_vals = []; env_rel_context = empty_rel_context; @@ -72,24 +70,20 @@ let empty_env = { env_nb_rel = 0; env_stratification = { env_universes = initial_universes; - env_engagement = None } } + env_engagement = None }; + retroknowledge = Retroknowledge.initial_retroknowledge } (* Rel context *) let nb_rel env = env.env_nb_rel - + let push_rel d env = - let _,body,_ = d in - let rval = - match body with - | None -> ref (VKaxiom env.env_nb_rel) - | Some c -> ref (VKdef c) - in - { env with - env_rel_context = add_rel_decl d env.env_rel_context; - env_rel_val = rval :: env.env_rel_val; - env_nb_rel = env.env_nb_rel + 1 } + let rval = ref VKnone in + { env with + env_rel_context = add_rel_decl d env.env_rel_context; + env_rel_val = rval :: env.env_rel_val; + env_nb_rel = env.env_nb_rel + 1 } let lookup_rel_val n env = try List.nth env.env_rel_val (n - 1) @@ -101,16 +95,13 @@ let env_of_rel n env = env_rel_val = Util.list_skipn n env.env_rel_val; env_nb_rel = env.env_nb_rel - n } - + (* Named context *) let push_named_context_val d (ctxt,vals) = - let id,body,_ = d in - let rval = - match body with - | None -> ref (VKaxiom id) - | Some c -> ref (VKdef c) - in Sign.add_named_decl d ctxt, (id,rval)::vals + let id,_,_ = d in + let rval = ref VKnone in + Sign.add_named_decl d ctxt, (id,rval)::vals exception ASSERT of Sign.rel_context @@ -118,18 +109,14 @@ let push_named d env = (* if not (env.env_rel_context = []) then raise (ASSERT env.env_rel_context); assert (env.env_rel_context = []); *) let id,body,_ = d in - let rval = - match body with - | None -> ref (VKaxiom id) - | Some c -> ref (VKdef c) - in - { env with - env_named_context = Sign.add_named_decl d env.env_named_context; - env_named_vals = (id,rval):: env.env_named_vals } + let rval = ref VKnone in + { env with + env_named_context = Sign.add_named_decl d env.env_named_context; + env_named_vals = (id,rval):: env.env_named_vals } let lookup_named_val id env = - snd(List.find (fun (id',_) -> id = id') env.env_named_vals) - + snd(List.find (fun (id',_) -> id = id') env.env_named_vals) + (* Warning all the names should be different *) let env_of_named id env = env diff --git a/kernel/pre_env.mli b/kernel/pre_env.mli index 2642bc92..445f4e5f 100644 --- a/kernel/pre_env.mli +++ b/kernel/pre_env.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: pre_env.mli 8810 2006-05-12 18:50:21Z barras $ *) +(* $Id: pre_env.mli 10664 2008-03-14 11:27:37Z soubiran $ *) open Util open Names @@ -26,34 +26,31 @@ type globals = { env_constants : constant_key Cmap.t; env_inductives : mutual_inductive_body KNmap.t; env_modules : module_body MPmap.t; - env_modtypes : module_type_body KNmap.t } + env_modtypes : module_type_body MPmap.t; + env_alias : module_path MPmap.t } type stratification = { env_universes : universes; env_engagement : engagement option } -type 'a val_kind = - | VKvalue of values - | VKaxiom of 'a - | VKdef of constr +type val_kind = + | VKvalue of values * Idset.t + | VKnone -type 'a lazy_val = 'a val_kind ref +type lazy_val = val_kind ref -type rel_val = inv_rel_key lazy_val - -type named_val = identifier lazy_val - -type named_vals = (identifier * named_val) list +type named_vals = (identifier * lazy_val) list type env = { - env_globals : globals; - env_named_context : named_context; - env_named_vals : named_vals; - env_rel_context : rel_context; - env_rel_val : rel_val list; - env_nb_rel : int; - env_stratification : stratification } + env_globals : globals; + env_named_context : named_context; + env_named_vals : named_vals; + env_rel_context : rel_context; + env_rel_val : lazy_val list; + env_nb_rel : int; + env_stratification : stratification; + retroknowledge : Retroknowledge.retroknowledge } type named_context_val = named_context * named_vals @@ -65,14 +62,14 @@ val empty_env : env val nb_rel : env -> int val push_rel : rel_declaration -> env -> env -val lookup_rel_val : int -> env -> rel_val +val lookup_rel_val : int -> env -> lazy_val val env_of_rel : int -> env -> env (* Named context *) val push_named_context_val : named_declaration -> named_context_val -> named_context_val val push_named : named_declaration -> env -> env -val lookup_named_val : identifier -> env -> named_val +val lookup_named_val : identifier -> env -> lazy_val val env_of_named : identifier -> env -> env (* Global constants *) @@ -85,5 +82,3 @@ val lookup_mind : mutual_inductive -> env -> mutual_inductive_body (* Find the ultimate inductive in the [mind_equiv] chain *) val scrape_mind : env -> mutual_inductive -> mutual_inductive - - diff --git a/kernel/reduction.ml b/kernel/reduction.ml index 701020d0..43ef3a98 100644 --- a/kernel/reduction.ml +++ b/kernel/reduction.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: reduction.ml 9215 2006-10-05 15:40:31Z herbelin $ *) +(* $Id: reduction.ml 10930 2008-05-15 10:50:32Z barras $ *) open Util open Names @@ -17,6 +17,12 @@ open Environ open Closure open Esubst +let unfold_reference ((ids, csts), infos) k = + match k with + | VarKey id when not (Idpred.mem id ids) -> None + | ConstKey cst when not (Cpred.mem cst csts) -> None + | _ -> unfold_reference infos k + let rec is_empty_stack = function [] -> true | Zupdate _::s -> is_empty_stack s @@ -84,11 +90,11 @@ let pure_stack lfts stk = let nf_betaiota t = norm_val (create_clos_infos betaiota empty_env) (inject t) -let whd_betaiotazeta env x = +let whd_betaiotazeta x = match kind_of_term x with | (Sort _|Var _|Meta _|Evar _|Const _|Ind _|Construct _| Prod _|Lambda _|Fix _|CoFix _) -> x - | _ -> whd_val (create_clos_infos betaiotazeta env) (inject x) + | _ -> whd_val (create_clos_infos betaiotazeta empty_env) (inject x) let whd_betadeltaiota env t = match kind_of_term t with @@ -117,6 +123,7 @@ let beta_appvect c v = (* Conversion utility functions *) type 'a conversion_function = env -> 'a -> 'a -> Univ.constraints +type 'a trans_conversion_function = transparent_state -> env -> 'a -> 'a -> Univ.constraints exception NotConvertible exception NotConvertibleVect of int @@ -144,18 +151,25 @@ let compare_stacks f fmind lft1 stk1 lft2 stk2 cuniv = (* Convertibility of sorts *) +(* The sort cumulativity is + + Prop <= Set <= Type 1 <= ... <= Type i <= ... + + and this holds whatever Set is predicative or impredicative +*) + type conv_pb = | CONV | CUMUL let sort_cmp pb s0 s1 cuniv = match (s0,s1) with - | (Prop c1, Prop c2) -> if c1 = c2 then cuniv else raise NotConvertible - | (Prop c1, Type u) -> - (match pb with - CUMUL -> cuniv - | _ -> raise NotConvertible) + | (Prop c1, Prop c2) -> + if c1 = Null or c2 = Pos then cuniv (* Prop <= Set *) + else raise NotConvertible + | (Prop c1, Type u) when pb = CUMUL -> assert (is_univ_variable u); cuniv | (Type u1, Type u2) -> + assert (is_univ_variable u2); (match pb with | CONV -> enforce_eq u1 u2 cuniv | CUMUL -> enforce_geq u2 u1 cuniv) @@ -166,19 +180,60 @@ let conv_sort env s0 s1 = sort_cmp CONV s0 s1 Constraint.empty let conv_sort_leq env s0 s1 = sort_cmp CUMUL s0 s1 Constraint.empty +let rec no_arg_available = function + | [] -> true + | Zupdate _ :: stk -> no_arg_available stk + | Zshift _ :: stk -> no_arg_available stk + | Zapp v :: stk -> Array.length v = 0 && no_arg_available stk + | Zcase _ :: _ -> true + | Zfix _ :: _ -> true + +let rec no_nth_arg_available n = function + | [] -> true + | Zupdate _ :: stk -> no_nth_arg_available n stk + | Zshift _ :: stk -> no_nth_arg_available n stk + | Zapp v :: stk -> + let k = Array.length v in + if n >= k then no_nth_arg_available (n-k) stk + else false + | Zcase _ :: _ -> true + | Zfix _ :: _ -> true + +let rec no_case_available = function + | [] -> true + | Zupdate _ :: stk -> no_case_available stk + | Zshift _ :: stk -> no_case_available stk + | Zapp _ :: stk -> no_case_available stk + | Zcase _ :: _ -> false + | Zfix _ :: _ -> true + +let in_whnf (t,stk) = + match fterm_of t with + | (FLetIn _ | FCases _ | FApp _ | FCLOS _ | FLIFT _ | FCast _) -> false + | FLambda _ -> no_arg_available stk + | FConstruct _ -> no_case_available stk + | FCoFix _ -> no_case_available stk + | FFix(((ri,n),(_,_,_)),_) -> no_nth_arg_available ri.(n) stk + | (FFlex _ | FProd _ | FEvar _ | FInd _ | FAtom _ | FRel _) -> true + | FLOCKED -> assert false (* Conversion between [lft1]term1 and [lft2]term2 *) let rec ccnv cv_pb infos lft1 lft2 term1 term2 cuniv = - Util.check_for_interrupt (); - eqappr cv_pb infos - (lft1, whd_stack infos term1 []) - (lft2, whd_stack infos term2 []) - cuniv + eqappr cv_pb infos (lft1, (term1,[])) (lft2, (term2,[])) cuniv (* Conversion between [lft1](hd1 v1) and [lft2](hd2 v2) *) -and eqappr cv_pb infos appr1 appr2 cuniv = - let (lft1,(hd1,v1)) = appr1 in - let (lft2,(hd2,v2)) = appr2 in +and eqappr cv_pb infos (lft1,st1) (lft2,st2) cuniv = + Util.check_for_interrupt (); + (* First head reduce both terms *) + let rec whd_both (t1,stk1) (t2,stk2) = + let st1' = whd_stack (snd infos) t1 stk1 in + let st2' = whd_stack (snd infos) t2 stk2 in + (* Now, whd_stack on term2 might have modified st1 (due to sharing), + and st1 might not be in whnf anymore. If so, we iterate ccnv. *) + if in_whnf st1' then (st1',st2') else whd_both st1' st2' in + let ((hd1,v1),(hd2,v2)) = whd_both st1 st2 in + let appr1 = (lft1,(hd1,v1)) and appr2 = (lft2,(hd2,v2)) in + (* compute the lifts that apply to the head of the term (hd1 and hd2) *) let el1 = el_stack lft1 v1 in let el2 = el_stack lft2 v2 in match (fterm_of hd1, fterm_of hd2) with @@ -216,17 +271,17 @@ and eqappr cv_pb infos appr1 appr2 cuniv = let (app1,app2) = if Conv_oracle.oracle_order fl1 fl2 then match unfold_reference infos fl1 with - | Some def1 -> ((lft1, whd_stack infos def1 v1), appr2) + | Some def1 -> ((lft1, whd_stack (snd infos) def1 v1), appr2) | None -> (match unfold_reference infos fl2 with - | Some def2 -> (appr1, (lft2, whd_stack infos def2 v2)) + | Some def2 -> (appr1, (lft2, whd_stack (snd infos) def2 v2)) | None -> raise NotConvertible) else match unfold_reference infos fl2 with - | Some def2 -> (appr1, (lft2, whd_stack infos def2 v2)) + | Some def2 -> (appr1, (lft2, whd_stack (snd infos) def2 v2)) | None -> (match unfold_reference infos fl1 with - | Some def1 -> ((lft1, whd_stack infos def1 v1), appr2) + | Some def1 -> ((lft1, whd_stack (snd infos) def1 v1), appr2) | None -> raise NotConvertible) in eqappr cv_pb infos app1 app2 cuniv) @@ -234,16 +289,17 @@ and eqappr cv_pb infos appr1 appr2 cuniv = | (FFlex fl1, _) -> (match unfold_reference infos fl1 with | Some def1 -> - eqappr cv_pb infos (lft1, whd_stack infos def1 v1) appr2 cuniv + eqappr cv_pb infos (lft1, whd_stack (snd infos) def1 v1) appr2 cuniv | None -> raise NotConvertible) | (_, FFlex fl2) -> (match unfold_reference infos fl2 with - | Some def2 -> - eqappr cv_pb infos appr1 (lft2, whd_stack infos def2 v2) cuniv + | Some def2 -> + eqappr cv_pb infos appr1 (lft2, whd_stack (snd infos) def2 v2) cuniv | None -> raise NotConvertible) (* other constructors *) | (FLambda _, FLambda _) -> + assert (is_empty_stack v1 && is_empty_stack v2); let (_,ty1,bd1) = destFLambda mk_clos hd1 in let (_,ty2,bd2) = destFLambda mk_clos hd2 in let u1 = ccnv CONV infos el1 el2 ty1 ty2 cuniv in @@ -258,13 +314,13 @@ and eqappr cv_pb infos appr1 appr2 cuniv = (* Inductive types: MutInd MutConstruct Fix Cofix *) | (FInd ind1, FInd ind2) -> - if mind_equiv_infos infos ind1 ind2 + if mind_equiv_infos (snd infos) ind1 ind2 then convert_stacks infos lft1 lft2 v1 v2 cuniv else raise NotConvertible | (FConstruct (ind1,j1), FConstruct (ind2,j2)) -> - if j1 = j2 && mind_equiv_infos infos ind1 ind2 + if j1 = j2 && mind_equiv_infos (snd infos) ind1 ind2 then convert_stacks infos lft1 lft2 v1 v2 cuniv else raise NotConvertible @@ -299,25 +355,18 @@ and eqappr cv_pb infos appr1 appr2 cuniv = convert_stacks infos lft1 lft2 v1 v2 u2 else raise NotConvertible - (* Can happen because whd_stack on one arg may have side-effects - on the other arg and coulb be no more in hnf... *) - | ( (FLetIn _, _) | (FCases _,_) | (FApp _,_) - | (FCLOS _, _) | (FLIFT _, _)) -> - eqappr cv_pb infos (lft1, whd_stack infos hd1 v1) appr2 cuniv - - | ( (_, FLetIn _) | (_,FCases _) | (_,FApp _) - | (_,FCLOS _) | (_,FLIFT _)) -> - eqappr cv_pb infos (lft1, whd_stack infos hd1 v1) appr2 cuniv - - (* Should not happen because whd_stack unlocks references *) - | ((FLOCKED,_) | (_,FLOCKED)) -> assert false - + (* Should not happen because both (hd1,v1) and (hd2,v2) are in whnf *) + | ( (FLetIn _, _) | (FCases _,_) | (FApp _,_) | (FCLOS _,_) | (FLIFT _,_) + | (_, FLetIn _) | (_,FCases _) | (_,FApp _) | (_,FCLOS _) | (_,FLIFT _) + | (FLOCKED,_) | (_,FLOCKED) ) -> assert false + + (* In all other cases, terms are not convertible *) | _ -> raise NotConvertible and convert_stacks infos lft1 lft2 stk1 stk2 cuniv = compare_stacks (fun (l1,t1) (l2,t2) c -> ccnv CONV infos l1 l2 t1 t2 c) - (mind_equiv_infos infos) + (mind_equiv_infos (snd infos)) lft1 stk1 lft2 stk2 cuniv and convert_vect infos lft1 lft2 v1 v2 cuniv = @@ -333,13 +382,19 @@ and convert_vect infos lft1 lft2 v1 v2 cuniv = fold 0 cuniv else raise NotConvertible -let clos_fconv cv_pb env t1 t2 = - let infos = create_clos_infos betaiotazeta env in +let clos_fconv trans cv_pb env t1 t2 = + let infos = trans, create_clos_infos betaiotazeta env in ccnv cv_pb infos ELID ELID (inject t1) (inject t2) Constraint.empty -let fconv cv_pb env t1 t2 = +let trans_fconv reds cv_pb env t1 t2 = if eq_constr t1 t2 then Constraint.empty - else clos_fconv cv_pb env t1 t2 + else clos_fconv reds cv_pb env t1 t2 + +let trans_conv_cmp conv reds = trans_fconv reds conv +let trans_conv reds = trans_fconv reds CONV +let trans_conv_leq reds = trans_fconv reds CUMUL + +let fconv = trans_fconv (Idpred.full, Cpred.full) let conv_cmp = fconv let conv = fconv CONV @@ -365,7 +420,7 @@ let vm_conv cv_pb env t1 t2 = !vm_conv cv_pb env t1 t2 with Not_found | Invalid_argument _ -> (* If compilation fails, fall-back to closure conversion *) - clos_fconv cv_pb env t1 t2 + fconv cv_pb env t1 t2 let default_conv = ref fconv @@ -377,7 +432,7 @@ let default_conv cv_pb env t1 t2 = !default_conv cv_pb env t1 t2 with Not_found | Invalid_argument _ -> (* If compilation fails, fall-back to closure conversion *) - clos_fconv cv_pb env t1 t2 + fconv cv_pb env t1 t2 let default_conv_leq = default_conv CUMUL (* diff --git a/kernel/reduction.mli b/kernel/reduction.mli index a68e8697..3b9eb315 100644 --- a/kernel/reduction.mli +++ b/kernel/reduction.mli @@ -6,17 +6,18 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: reduction.mli 7639 2005-12-02 10:01:15Z gregoire $ i*) +(*i $Id: reduction.mli 10840 2008-04-23 21:29:34Z herbelin $ i*) (*i*) open Term open Environ +open Closure (*i*) (************************************************************************) (*s Reduction functions *) -val whd_betaiotazeta : env -> constr -> constr +val whd_betaiotazeta : constr -> constr val whd_betadeltaiota : env -> constr -> constr val whd_betadeltaiota_nolet : env -> constr -> constr @@ -28,6 +29,7 @@ val nf_betaiota : constr -> constr exception NotConvertible exception NotConvertibleVect of int type 'a conversion_function = env -> 'a -> 'a -> Univ.constraints +type 'a trans_conversion_function = Names.transparent_state -> env -> 'a -> 'a -> Univ.constraints type conv_pb = CONV | CUMUL @@ -37,6 +39,11 @@ val sort_cmp : val conv_sort : sorts conversion_function val conv_sort_leq : sorts conversion_function +val trans_conv_cmp : conv_pb -> constr trans_conversion_function + +val trans_conv : constr trans_conversion_function +val trans_conv_leq : types trans_conversion_function + val conv_cmp : conv_pb -> constr conversion_function val conv : constr conversion_function diff --git a/kernel/retroknowledge.ml b/kernel/retroknowledge.ml new file mode 100644 index 00000000..7a1880be --- /dev/null +++ b/kernel/retroknowledge.ml @@ -0,0 +1,279 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* continuation -> result *) + (bool->Cbytecodes.comp_env->constr array -> + int->Cbytecodes.bytecodes->Cbytecodes.bytecodes) + option; + vm_constant_static : + (*fastcomputation flag -> constructor -> args -> result*) + (bool->constr array->Cbytecodes.structured_constant) + option; + vm_constant_dynamic : + (*fastcomputation flag -> constructor -> reloc -> args -> sz -> cont -> result *) + (bool->Cbytecodes.comp_env->Cbytecodes.block array->int-> + Cbytecodes.bytecodes->Cbytecodes.bytecodes) + option; + (* fastcomputation flag -> cont -> result *) + vm_before_match : (bool -> Cbytecodes.bytecodes -> Cbytecodes.bytecodes) option; + (* tag (= compiled int for instance) -> result *) + vm_decompile_const : (int -> Term.constr) option} + + + +and reactive = reactive_end Reactive.t + +and retroknowledge = {flags : flags; proactive : proactive; reactive : reactive} + +(* This type represent an atomic action of the retroknowledge. It + is stored in the compiled libraries *) +(* As per now, there is only the possibility of registering things + the possibility of unregistering or changing the flag is under study *) +type action = + | RKRegister of field*entry + + +(*initialisation*) +let initial_flags = + {fastcomputation = true;} + +let initial_proactive = + (Proactive.empty:proactive) + +let initial_reactive = + (Reactive.empty:reactive) + +let initial_retroknowledge = + {flags = initial_flags; + proactive = initial_proactive; + reactive = initial_reactive } + +let empty_reactive_end = + { vm_compiling = None ; + vm_constant_static = None; + vm_constant_dynamic = None; + vm_before_match = None; + vm_decompile_const = None } + + + + +(* acces functions for proactive retroknowledge *) +let add_field knowledge field value = + {knowledge with proactive = Proactive.add field value knowledge.proactive} + +let mem knowledge field = + Proactive.mem field knowledge.proactive + +let remove knowledge field = + {knowledge with proactive = Proactive.remove field knowledge.proactive} + +let find knowledge field = + Proactive.find field knowledge.proactive + + + + + +(*access functions for reactive retroknowledge*) + +(* used for compiling of functions (add, mult, etc..) *) +let get_vm_compiling_info knowledge key = + match (Reactive.find key knowledge.reactive).vm_compiling + with + | None -> raise Not_found + | Some f -> f knowledge.flags.fastcomputation + +(* used for compilation of fully applied constructors *) +let get_vm_constant_static_info knowledge key = + match (Reactive.find key knowledge.reactive).vm_constant_static + with + | None -> raise Not_found + | Some f -> f knowledge.flags.fastcomputation + +(* used for compilation of partially applied constructors *) +let get_vm_constant_dynamic_info knowledge key = + match (Reactive.find key knowledge.reactive).vm_constant_dynamic + with + | None -> raise Not_found + | Some f -> f knowledge.flags.fastcomputation + +let get_vm_before_match_info knowledge key = + match (Reactive.find key knowledge.reactive).vm_before_match + with + | None -> raise Not_found + | Some f -> f knowledge.flags.fastcomputation + +let get_vm_decompile_constant_info knowledge key = + match (Reactive.find key knowledge.reactive).vm_decompile_const + with + | None -> raise Not_found + | Some f -> f + + + +(* functions manipulating reactive knowledge *) +let add_vm_compiling_info knowledge value nfo = + {knowledge with reactive = + try + Reactive.add value + {(Reactive.find value (knowledge.reactive)) with vm_compiling = Some nfo} + knowledge.reactive + with Not_found -> + Reactive.add value {empty_reactive_end with vm_compiling = Some nfo} + knowledge.reactive + } + +let add_vm_constant_static_info knowledge value nfo = + {knowledge with reactive = + try + Reactive.add value + {(Reactive.find value (knowledge.reactive)) with vm_constant_static = Some nfo} + knowledge.reactive + with Not_found -> + Reactive.add value {empty_reactive_end with vm_constant_static = Some nfo} + knowledge.reactive + } + +let add_vm_constant_dynamic_info knowledge value nfo = + {knowledge with reactive = + try + Reactive.add value + {(Reactive.find value (knowledge.reactive)) with vm_constant_dynamic = Some nfo} + knowledge.reactive + with Not_found -> + Reactive.add value {empty_reactive_end with vm_constant_dynamic = Some nfo} + knowledge.reactive + } + +let add_vm_before_match_info knowledge value nfo = + {knowledge with reactive = + try + Reactive.add value + {(Reactive.find value (knowledge.reactive)) with vm_before_match = Some nfo} + knowledge.reactive + with Not_found -> + Reactive.add value {empty_reactive_end with vm_before_match = Some nfo} + knowledge.reactive + } + +let add_vm_decompile_constant_info knowledge value nfo = + {knowledge with reactive = + try + Reactive.add value + {(Reactive.find value (knowledge.reactive)) with vm_decompile_const = Some nfo} + knowledge.reactive + with Not_found -> + Reactive.add value {empty_reactive_end with vm_decompile_const = Some nfo} + knowledge.reactive + } + +let clear_info knowledge value = + {knowledge with reactive = Reactive.remove value knowledge.reactive} diff --git a/kernel/retroknowledge.mli b/kernel/retroknowledge.mli new file mode 100644 index 00000000..ee3fccd5 --- /dev/null +++ b/kernel/retroknowledge.mli @@ -0,0 +1,154 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* entry -> Cbytecodes.comp_env -> + constr array -> + int -> Cbytecodes.bytecodes-> Cbytecodes.bytecodes +(*Given an identifier id (usually Construct _) + and its argument array, returns a function that tries an ad-hoc optimisated + compilation (in the case of the 31-bit integers it means compiling them + directly into an integer) + raises Not_found if id should be compiled as usual, and expectingly + CBytecodes.NotClosed if the term is not a closed constructor pattern + (a constant for the compiler) *) +val get_vm_constant_static_info : retroknowledge -> entry -> + constr array -> + Cbytecodes.structured_constant + +(*Given an identifier id (usually Construct _ ) + its argument array and a continuation, returns the compiled version + of id+args+cont when id has a specific treatment (in the case of + 31-bit integers, that would be the dynamic compilation into integers) + or raises Not_found if id should be compiled as usual *) +val get_vm_constant_dynamic_info : retroknowledge -> entry -> + Cbytecodes.comp_env -> + Cbytecodes.block array -> + int -> Cbytecodes.bytecodes -> Cbytecodes.bytecodes +(* Given a type identifier, this function is used before compiling a match + over this type. In the case of 31-bit integers for instance, it is used + to add the instruction sequence which would perform a dynamic decompilation + in case the argument of the match is not in coq representation *) +val get_vm_before_match_info : retroknowledge -> entry -> Cbytecodes.bytecodes + -> Cbytecodes.bytecodes + +(* Given a type identifier, this function is used by pretyping/vnorm.ml to + recover the elements of that type from their compiled form if it's non + standard (it is used (and can be used) only when the compiled form + is not a block *) +val get_vm_decompile_constant_info : retroknowledge -> entry -> int -> Term.constr + + +(* the following functions are solely used in Pre_env and Environ to implement + the functions register and unregister (and mem) of Environ *) +val add_field : retroknowledge -> field -> entry -> retroknowledge +val mem : retroknowledge -> field -> bool +val remove : retroknowledge -> field -> retroknowledge +val find : retroknowledge -> field -> entry + +(* the following function manipulate the reactive information of values + they are only used by the functions of Pre_env, and Environ to implement + the functions register and unregister of Environ *) +val add_vm_compiling_info : retroknowledge-> entry -> + (bool -> Cbytecodes.comp_env -> constr array -> int -> + Cbytecodes.bytecodes -> Cbytecodes.bytecodes) -> + retroknowledge +val add_vm_constant_static_info : retroknowledge-> entry -> + (bool->constr array-> + Cbytecodes.structured_constant) -> + retroknowledge +val add_vm_constant_dynamic_info : retroknowledge-> entry -> + (bool -> Cbytecodes.comp_env -> + Cbytecodes.block array -> int -> + Cbytecodes.bytecodes -> Cbytecodes.bytecodes) -> + retroknowledge +val add_vm_before_match_info : retroknowledge -> entry -> + (bool->Cbytecodes.bytecodes->Cbytecodes.bytecodes) -> + retroknowledge + +val add_vm_decompile_constant_info : retroknowledge -> entry -> + (int -> constr) -> retroknowledge + + +val clear_info : retroknowledge-> entry -> retroknowledge + + + diff --git a/kernel/safe_typing.ml b/kernel/safe_typing.ml index 5f01613c..6906fb29 100644 --- a/kernel/safe_typing.ml +++ b/kernel/safe_typing.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: safe_typing.ml 10276 2007-10-30 11:37:54Z barras $ *) +(* $Id: safe_typing.ml 11170 2008-06-25 08:31:04Z soubiran $ *) open Util open Names @@ -25,6 +25,7 @@ open Term_typing open Modops open Subtyping open Mod_typing +open Mod_subst type modvariant = | NONE @@ -37,7 +38,8 @@ type module_info = modpath : module_path; seed : dir_path; (* the "seed" of unique identifier generator *) label : label; - variant : modvariant} + variant : modvariant; + alias_subst : substitution} let check_label l labset = if Labset.mem l labset then error_existing_label l @@ -54,12 +56,12 @@ type safe_environment = env : env; modinfo : module_info; labset : Labset.t; - revsign : module_signature_body; - revstruct : module_structure_body; + revstruct : structure_body; univ : Univ.constraints; engagement : engagement option; imports : library_info list; - loads : (module_path * module_body) list } + loads : (module_path * module_body) list; + local_retroknowledge : Retroknowledge.action list} (* { old = senv.old; @@ -81,19 +83,75 @@ let rec empty_environment = modpath = initial_path; seed = initial_dir; label = mk_label "_"; - variant = NONE}; + variant = NONE; + alias_subst = empty_subst}; labset = Labset.empty; - revsign = []; revstruct = []; univ = Univ.Constraint.empty; engagement = None; imports = []; - loads = [] } + loads = []; + local_retroknowledge = [] } let env_of_safe_env senv = senv.env let env_of_senv = env_of_safe_env + + + + + +let add_constraints cst senv = + {senv with + env = Environ.add_constraints cst senv.env; + univ = Univ.Constraint.union cst senv.univ } + + +(*spiwack: functions for safe retroknowledge *) + +(* terms which are closed under the environnement env, i.e + terms which only depends on constant who are themselves closed *) +let closed env term = + ContextObjectMap.is_empty (assumptions env term) + +(* the set of safe terms in an environement any recursive set of + terms who are known not to prove inconsistent statement. It should + include at least all the closed terms. But it could contain other ones + like the axiom of excluded middle for instance *) +let safe = + closed + + + +(* universal lifting, used for the "get" operations mostly *) +let retroknowledge f senv = + Environ.retroknowledge f (env_of_senv senv) + +let register senv field value by_clause = + (* todo : value closed, by_clause safe, by_clause of the proper type*) + (* spiwack : updates the safe_env with the information that the register + action has to be performed (again) when the environement is imported *) + {senv with env = Environ.register senv.env field value; + local_retroknowledge = + Retroknowledge.RKRegister (field,value)::senv.local_retroknowledge + } + +(* spiwack : currently unused *) +let unregister senv field = + (*spiwack: todo: do things properly or delete *) + {senv with env = Environ.unregister senv.env field} +(* /spiwack *) + + + + + + + + + + (* Insertion of section variables. They are now typed before being added to the environment. *) @@ -111,15 +169,15 @@ let safe_push_named (id,_,_ as d) env = let push_named_def (id,b,topt) senv = let (c,typ,cst) = translate_local_def senv.env (b,topt) in - let env' = add_constraints cst senv.env in - let env'' = safe_push_named (id,Some c,typ) env' in - (cst, {senv with env=env''}) + let senv' = add_constraints cst senv in + let env'' = safe_push_named (id,Some c,typ) senv'.env in + (cst, {senv' with env=env''}) let push_named_assum (id,t) senv = let (t,cst) = translate_local_assum senv.env t in - let env' = add_constraints cst senv.env in - let env'' = safe_push_named (id,None,t) env' in - (cst, {senv with env=env''}) + let senv' = add_constraints cst senv in + let env'' = safe_push_named (id,None,t) senv'.env in + (cst, {senv' with env=env''}) (* Insertion of constants and parameters in environment. *) @@ -154,18 +212,18 @@ let add_constant dir l decl senv = let cb = translate_recipe senv.env kn r in if dir = empty_dirpath then hcons_constant_body cb else cb in - let env' = Environ.add_constraints cb.const_constraints senv.env in - let env'' = Environ.add_constant kn cb env' in - kn, { old = senv.old; + let senv' = add_constraints cb.const_constraints senv in + let env'' = Environ.add_constant kn cb senv'.env in + kn, { old = senv'.old; env = env''; - modinfo = senv.modinfo; - labset = Labset.add l senv.labset; - revsign = (l,SPBconst cb)::senv.revsign; - revstruct = (l,SEBconst cb)::senv.revstruct; - univ = senv.univ; - engagement = senv.engagement; - imports = senv.imports; - loads = senv.loads } + modinfo = senv'.modinfo; + labset = Labset.add l senv'.labset; + revstruct = (l,SFBconst cb)::senv'.revstruct; + univ = senv'.univ; + engagement = senv'.engagement; + imports = senv'.imports; + loads = senv'.loads ; + local_retroknowledge = senv'.local_retroknowledge } (* Insertion of inductive types. *) @@ -182,67 +240,99 @@ let add_mind dir l mie senv = (* TODO: when we will allow reorderings we will have to verify all labels *) let mib = translate_mind senv.env mie in - let env' = Environ.add_constraints mib.mind_constraints senv.env in + let senv' = add_constraints mib.mind_constraints senv in let kn = make_kn senv.modinfo.modpath dir l in - let env'' = Environ.add_mind kn mib env' in - kn, { old = senv.old; + let env'' = Environ.add_mind kn mib senv'.env in + kn, { old = senv'.old; env = env''; - modinfo = senv.modinfo; - labset = Labset.add l senv.labset; (* TODO: the same as above *) - revsign = (l,SPBmind mib)::senv.revsign; - revstruct = (l,SEBmind mib)::senv.revstruct; - univ = senv.univ; - engagement = senv.engagement; - imports = senv.imports; - loads = senv.loads } - + modinfo = senv'.modinfo; + labset = Labset.add l senv'.labset; (* TODO: the same as above *) + revstruct = (l,SFBmind mib)::senv'.revstruct; + univ = senv'.univ; + engagement = senv'.engagement; + imports = senv'.imports; + loads = senv'.loads; + local_retroknowledge = senv'.local_retroknowledge } (* Insertion of module types *) let add_modtype l mte senv = check_label l senv.labset; - let mtb = translate_modtype senv.env mte in - let env' = add_modtype_constraints senv.env mtb in - let kn = make_kn senv.modinfo.modpath empty_dirpath l in - let env'' = Environ.add_modtype kn mtb env' in - kn, { old = senv.old; + let mtb_expr,sub = translate_struct_entry senv.env mte in + let mtb = { typ_expr = mtb_expr; + typ_strength = None; + typ_alias = sub} in + let senv' = add_constraints + (struct_expr_constraints mtb_expr) senv in + let mp = MPdot(senv.modinfo.modpath, l) in + let env'' = Environ.add_modtype mp mtb senv'.env in + mp, { old = senv'.old; env = env''; - modinfo = senv.modinfo; - labset = Labset.add l senv.labset; - revsign = (l,SPBmodtype mtb)::senv.revsign; - revstruct = (l,SEBmodtype mtb)::senv.revstruct; - univ = senv.univ; - engagement = senv.engagement; - imports = senv.imports; - loads = senv.loads } - + modinfo = senv'.modinfo; + labset = Labset.add l senv'.labset; + revstruct = (l,SFBmodtype mtb)::senv'.revstruct; + univ = senv'.univ; + engagement = senv'.engagement; + imports = senv'.imports; + loads = senv'.loads; + local_retroknowledge = senv'.local_retroknowledge } (* full_add_module adds module with universes and constraints *) -let full_add_module mp mb env = - let env = add_module_constraints env mb in - let env = Modops.add_module mp mb env in - env - +let full_add_module mp mb senv = + let senv = add_constraints (module_constraints mb) senv in + let env = Modops.add_module mp mb senv.env in + {senv with env = env} + (* Insertion of modules *) - + let add_module l me senv = check_label l senv.labset; let mb = translate_module senv.env me in - let mspec = module_spec_of_body mb in let mp = MPdot(senv.modinfo.modpath, l) in - let env' = full_add_module mp mb senv.env in - mp, { old = senv.old; + let senv' = full_add_module mp mb senv in + let is_functor,sub = Modops.update_subst senv'.env mb mp in + mp, { old = senv'.old; + env = senv'.env; + modinfo = + if is_functor then + senv'.modinfo + else + {senv'.modinfo with + alias_subst = join senv'.modinfo.alias_subst sub}; + labset = Labset.add l senv'.labset; + revstruct = (l,SFBmodule mb)::senv'.revstruct; + univ = senv'.univ; + engagement = senv'.engagement; + imports = senv'.imports; + loads = senv'.loads; + local_retroknowledge = senv'.local_retroknowledge } + +let add_alias l mp senv = + check_label l senv.labset; + let mp' = MPdot(senv.modinfo.modpath, l) in + let mp1 = scrape_alias mp senv.env in + (* we get all updated alias substitution {mp1.K\M} that comes from mp1 *) + let _,sub = Modops.update_subst senv.env (lookup_module mp1 senv.env) mp1 in + (* transformation of {mp1.K\M} to {mp.K\M}*) + let sub = update_subst sub (map_mp mp' mp1) in + (* transformation of {mp.K\M} to {mp.K\M'} where M'=M{mp1\mp'}*) + let sub = join_alias sub (map_mp mp' mp1) in + (* we add the alias substitution *) + let sub = add_mp mp' mp1 sub in + let env' = register_alias mp' mp senv.env in + mp', { old = senv.old; env = env'; - modinfo = senv.modinfo; + modinfo = { senv.modinfo with + alias_subst = join + senv.modinfo.alias_subst sub}; labset = Labset.add l senv.labset; - revsign = (l,SPBmodule mspec)::senv.revsign; - revstruct = (l,SEBmodule mb)::senv.revstruct; + revstruct = (l,SFBalias (mp,None))::senv.revstruct; univ = senv.univ; engagement = senv.engagement; imports = senv.imports; - loads = senv.loads } - + loads = senv.loads; + local_retroknowledge = senv.local_retroknowledge } (* Interactive modules *) @@ -254,96 +344,213 @@ let start_module l senv = modpath = mp; seed = senv.modinfo.seed; label = l; - variant = STRUCT [] } + variant = STRUCT []; + alias_subst = empty_subst} in mp, { old = senv; env = senv.env; modinfo = modinfo; labset = Labset.empty; - revsign = []; revstruct = []; univ = Univ.Constraint.empty; engagement = None; imports = senv.imports; - loads = [] } + loads = []; + (* spiwack : not sure, but I hope it's correct *) + local_retroknowledge = [] } let end_module l restype senv = let oldsenv = senv.old in let modinfo = senv.modinfo in - let restype = option_map (translate_modtype senv.env) restype in - let params = + let restype = Option.map (translate_struct_entry senv.env) restype in + let params,is_functor = match modinfo.variant with | NONE | LIBRARY _ | SIG _ -> error_no_module_to_end () - | STRUCT params -> params + | STRUCT params -> params, (List.length params > 0) in if l <> modinfo.label then error_incompatible_labels l modinfo.label; if not (empty_context senv.env) then error_local_context None; - let functorize_type tb = + let functorize_struct tb = List.fold_left - (fun mtb (arg_id,arg_b) -> MTBfunsig (arg_id,arg_b,mtb)) + (fun mtb (arg_id,arg_b) -> + SEBfunctor(arg_id,arg_b,mtb)) tb params in - let auto_tb = MTBsig (modinfo.msid, List.rev senv.revsign) in - let mtb, mod_user_type, cst = + let auto_tb = + SEBstruct (modinfo.msid, List.rev senv.revstruct) + in + let mod_typ,subst,cst = match restype with - | None -> functorize_type auto_tb, None, Constraint.empty - | Some res_tb -> - let cst = check_subtypes senv.env auto_tb res_tb in - let mtb = functorize_type res_tb in - mtb, Some mtb, cst + | None -> None,modinfo.alias_subst,Constraint.empty + | Some (res_tb,subst) -> + let cst = check_subtypes senv.env + {typ_expr = auto_tb; + typ_strength = None; + typ_alias = modinfo.alias_subst} + {typ_expr = res_tb; + typ_strength = None; + typ_alias = subst} in + let mtb = functorize_struct res_tb in + Some mtb,subst,cst in + let mexpr = functorize_struct auto_tb in let cst = Constraint.union cst senv.univ in - let mexpr = - List.fold_left - (fun mtb (arg_id,arg_b) -> MEBfunctor (arg_id,arg_b,mtb)) - (MEBstruct (modinfo.msid, List.rev senv.revstruct)) - params - in let mb = { mod_expr = Some mexpr; - mod_user_type = mod_user_type; - mod_type = mtb; - mod_equiv = None; - mod_constraints = cst } - in - let mspec = - { msb_modtype = mtb; - msb_equiv = None; - msb_constraints = Constraint.empty } + mod_type = mod_typ; + mod_constraints = cst; + mod_alias = subst; + mod_retroknowledge = senv.local_retroknowledge } in let mp = MPdot (oldsenv.modinfo.modpath, l) in let newenv = oldsenv.env in let newenv = set_engagement_opt senv.engagement newenv in - let newenv = + let senv'= {senv with env=newenv} in + let senv' = List.fold_left (fun env (mp,mb) -> full_add_module mp mb env) - newenv - senv.loads + senv' + (List.rev senv'.loads) in + let newenv = Environ.add_constraints cst senv'.env in let newenv = - full_add_module mp mb newenv + Modops.add_module mp mb newenv in - mp, { old = oldsenv.old; + let is_functor,subst = Modops.update_subst newenv mb mp in + let newmodinfo = + if is_functor then + oldsenv.modinfo + else + { oldsenv.modinfo with + alias_subst = join + oldsenv.modinfo.alias_subst + subst }; + in + mp, { old = oldsenv.old; env = newenv; - modinfo = oldsenv.modinfo; + modinfo = newmodinfo; labset = Labset.add l oldsenv.labset; - revsign = (l,SPBmodule mspec)::oldsenv.revsign; - revstruct = (l,SEBmodule mb)::oldsenv.revstruct; - univ = oldsenv.univ; + revstruct = (l,SFBmodule mb)::oldsenv.revstruct; + univ = Univ.Constraint.union senv'.univ oldsenv.univ; (* engagement is propagated to the upper level *) - engagement = senv.engagement; - imports = senv.imports; - loads = senv.loads@oldsenv.loads } - - + engagement = senv'.engagement; + imports = senv'.imports; + loads = senv'.loads@oldsenv.loads; + local_retroknowledge = senv'.local_retroknowledge@oldsenv.local_retroknowledge } + + +(* Include for module and module type*) + let add_include me senv = + let struct_expr,_ = translate_struct_entry senv.env me in + let senv = add_constraints (struct_expr_constraints struct_expr) senv in + let msid,str = match (eval_struct senv.env struct_expr) with + | SEBstruct(msid,str_l) -> msid,str_l + | _ -> error ("You cannot Include a higher-order Module or Module Type" ) + in + let mp_sup = senv.modinfo.modpath in + let str1 = subst_signature_msid msid mp_sup str in + let add senv (l,elem) = + check_label l senv.labset; + match elem with + | SFBconst cb -> + let con = make_con mp_sup empty_dirpath l in + let senv' = add_constraints cb.const_constraints senv in + let env'' = Environ.add_constant con cb senv'.env in + { old = senv'.old; + env = env''; + modinfo = senv'.modinfo; + labset = Labset.add l senv'.labset; + revstruct = (l,SFBconst cb)::senv'.revstruct; + univ = senv'.univ; + engagement = senv'.engagement; + imports = senv'.imports; + loads = senv'.loads ; + local_retroknowledge = senv'.local_retroknowledge } + + | SFBmind mib -> + let kn = make_kn mp_sup empty_dirpath l in + let senv' = add_constraints mib.mind_constraints senv in + let env'' = Environ.add_mind kn mib senv'.env in + { old = senv'.old; + env = env''; + modinfo = senv'.modinfo; + labset = Labset.add l senv'.labset; + revstruct = (l,SFBmind mib)::senv'.revstruct; + univ = senv'.univ; + engagement = senv'.engagement; + imports = senv'.imports; + loads = senv'.loads; + local_retroknowledge = senv'.local_retroknowledge } + + | SFBmodule mb -> + let mp = MPdot(senv.modinfo.modpath, l) in + let is_functor,sub = Modops.update_subst senv.env mb mp in + let senv' = full_add_module mp mb senv in + { old = senv'.old; + env = senv'.env; + modinfo = + if is_functor then + senv'.modinfo + else + {senv'.modinfo with + alias_subst = join senv'.modinfo.alias_subst sub}; + labset = Labset.add l senv'.labset; + revstruct = (l,SFBmodule mb)::senv'.revstruct; + univ = senv'.univ; + engagement = senv'.engagement; + imports = senv'.imports; + loads = senv'.loads; + local_retroknowledge = senv'.local_retroknowledge } + | SFBalias (mp',cst) -> + let env' = Option.fold_right + Environ.add_constraints cst senv.env in + let mp = MPdot(senv.modinfo.modpath, l) in + let mp1 = scrape_alias mp' senv.env in + let _,sub = Modops.update_subst senv.env (lookup_module mp1 senv.env) mp1 in + let sub = update_subst sub (map_mp mp mp1) in + let sub = join_alias sub (map_mp mp mp1) in + let sub = add_mp mp mp1 sub in + let env' = register_alias mp mp' env' in + { old = senv.old; + env = env'; + modinfo = { senv.modinfo with + alias_subst = join + senv.modinfo.alias_subst sub}; + labset = Labset.add l senv.labset; + revstruct = (l,SFBalias (mp',cst))::senv.revstruct; + univ = senv.univ; + engagement = senv.engagement; + imports = senv.imports; + loads = senv.loads; + local_retroknowledge = senv.local_retroknowledge } + | SFBmodtype mtb -> + let env' = add_modtype_constraints senv.env mtb in + let mp = MPdot(senv.modinfo.modpath, l) in + let env'' = Environ.add_modtype mp mtb env' in + { old = senv.old; + env = env''; + modinfo = senv.modinfo; + labset = Labset.add l senv.labset; + revstruct = (l,SFBmodtype mtb)::senv.revstruct; + univ = senv.univ; + engagement = senv.engagement; + imports = senv.imports; + loads = senv.loads; + local_retroknowledge = senv.local_retroknowledge } + in + List.fold_left add senv str1 + (* Adding parameters to modules or module types *) let add_module_parameter mbid mte senv = - if senv.revsign <> [] or senv.revstruct <> [] or senv.loads <> [] then + if senv.revstruct <> [] or senv.loads <> [] then anomaly "Cannot add a module parameter to a non empty module"; - let mtb = translate_modtype senv.env mte in - let env = full_add_module (MPbound mbid) (module_body_of_type mtb) senv.env + let mtb_expr,sub = translate_struct_entry senv.env mte in + let mtb = {typ_expr = mtb_expr; + typ_strength = None; + typ_alias = sub} in + let senv = full_add_module (MPbound mbid) (module_body_of_type mtb) senv in let new_variant = match senv.modinfo.variant with | STRUCT params -> STRUCT ((mbid,mtb) :: params) @@ -352,15 +559,15 @@ let add_module_parameter mbid mte senv = anomaly "Module parameters can only be added to modules or signatures" in { old = senv.old; - env = env; + env = senv.env; modinfo = { senv.modinfo with variant = new_variant }; labset = senv.labset; - revsign = []; revstruct = []; univ = senv.univ; engagement = senv.engagement; imports = senv.imports; - loads = [] } + loads = []; + local_retroknowledge = senv.local_retroknowledge } (* Interactive module types *) @@ -373,18 +580,20 @@ let start_modtype l senv = modpath = mp; seed = senv.modinfo.seed; label = l; - variant = SIG [] } + variant = SIG []; + alias_subst = empty_subst } in mp, { old = senv; env = senv.env; modinfo = modinfo; labset = Labset.empty; - revsign = []; revstruct = []; univ = Univ.Constraint.empty; engagement = None; imports = senv.imports; - loads = [] } + loads = [] ; + (* spiwack: not 100% sure, but I think it should be like that *) + local_retroknowledge = []} let end_modtype l senv = let oldsenv = senv.old in @@ -396,52 +605,55 @@ let end_modtype l senv = in if l <> modinfo.label then error_incompatible_labels l modinfo.label; if not (empty_context senv.env) then error_local_context None; - let res_tb = MTBsig (modinfo.msid, List.rev senv.revsign) in - let mtb = + let auto_tb = + SEBstruct (modinfo.msid, List.rev senv.revstruct) + in + let mtb_expr = List.fold_left - (fun mtb (arg_id,arg_b) -> MTBfunsig (arg_id,arg_b,mtb)) - res_tb + (fun mtb (arg_id,arg_b) -> + SEBfunctor(arg_id,arg_b,mtb)) + auto_tb params in - let kn = make_kn oldsenv.modinfo.modpath empty_dirpath l in + let mp = MPdot (oldsenv.modinfo.modpath, l) in let newenv = oldsenv.env in (* since universes constraints cannot be stored in the modtype, they are propagated to the upper level *) - let newenv = add_constraints senv.univ newenv in + let newenv = Environ.add_constraints senv.univ newenv in let newenv = set_engagement_opt senv.engagement newenv in - let newenv = + let senv = {senv with env=newenv} in + let senv = List.fold_left (fun env (mp,mb) -> full_add_module mp mb env) - newenv - senv.loads - in - let newenv = - add_modtype_constraints newenv mtb + senv + (List.rev senv.loads) in + let subst = senv.modinfo.alias_subst in + let mtb = {typ_expr = mtb_expr; + typ_strength = None; + typ_alias = subst} in let newenv = - Environ.add_modtype kn mtb newenv + Environ.add_modtype mp mtb senv.env in - kn, { old = oldsenv.old; - env = newenv; + mp, { old = oldsenv.old; + env = newenv; modinfo = oldsenv.modinfo; labset = Labset.add l oldsenv.labset; - revsign = (l,SPBmodtype mtb)::oldsenv.revsign; - revstruct = (l,SEBmodtype mtb)::oldsenv.revstruct; + revstruct = (l,SFBmodtype mtb)::oldsenv.revstruct; univ = Univ.Constraint.union senv.univ oldsenv.univ; engagement = senv.engagement; imports = senv.imports; - loads = senv.loads@oldsenv.loads } + loads = senv.loads@oldsenv.loads; + (* spiwack : if there is a bug with retroknowledge in nested modules + it's likely to come from here *) + local_retroknowledge = + senv.local_retroknowledge@oldsenv.local_retroknowledge} let current_modpath senv = senv.modinfo.modpath let current_msid senv = senv.modinfo.msid -let add_constraints cst senv = - {senv with - env = Environ.add_constraints cst senv.env; - univ = Univ.Constraint.union cst senv.univ } - (* Check that the engagement expected by a library matches the initial one *) let check_engagement env c = match Environ.engagement env, c with @@ -460,12 +672,11 @@ let set_engagement c senv = type compiled_library = dir_path * module_body * library_info list * engagement option - (* We check that only initial state Require's were performed before [start_library] was called *) let is_empty senv = - senv.revsign = [] && + senv.revstruct = [] && senv.modinfo.msid = initial_msid && senv.modinfo.variant = NONE @@ -484,18 +695,20 @@ let start_library dir senv = modpath = mp; seed = dir; label = l; - variant = LIBRARY dir } + variant = LIBRARY dir; + alias_subst = empty_subst } in mp, { old = senv; env = senv.env; modinfo = modinfo; labset = Labset.empty; - revsign = []; revstruct = []; univ = Univ.Constraint.empty; engagement = None; imports = senv.imports; - loads = [] } + loads = []; + local_retroknowledge = [] } + let export senv dir = @@ -511,11 +724,11 @@ let export senv dir = (*if senv.modinfo.params <> [] || senv.modinfo.restype <> None then (* error_export_simple *) (); *) let mb = - { mod_expr = Some (MEBstruct (modinfo.msid, List.rev senv.revstruct)); - mod_type = MTBsig (modinfo.msid, List.rev senv.revsign); - mod_user_type = None; - mod_equiv = None; - mod_constraints = senv.univ } + { mod_expr = Some (SEBstruct (modinfo.msid, List.rev senv.revstruct)); + mod_type = None; + mod_constraints = senv.univ; + mod_alias = senv.modinfo.alias_subst; + mod_retroknowledge = senv.local_retroknowledge} in modinfo.msid, (dir,mb,senv.imports,engagement senv.env) @@ -532,6 +745,8 @@ let check_imports senv needed = in List.iter check needed + + (* we have an inefficiency: Since loaded files are added to the environment every time a module is closed, their components are calculated many times. Thic could be avoided in several ways: @@ -550,56 +765,46 @@ let import (dp,mb,depends,engmt) digest senv = check_engagement senv.env engmt; let mp = MPfile dp in let env = senv.env in + let env = Environ.add_constraints mb.mod_constraints env in + let env = Modops.add_module mp mb env in mp, { senv with - env = full_add_module mp mb env; + env = env; imports = (dp,digest)::senv.imports; loads = (mp,mb)::senv.loads } (* Remove the body of opaque constants in modules *) - -let rec lighten_module mb = + let rec lighten_module mb = { mb with - mod_expr = option_map lighten_modexpr mb.mod_expr; - mod_type = lighten_modtype mb.mod_type; - mod_user_type = option_map lighten_modtype mb.mod_user_type } - -and lighten_modtype = function - | MTBident kn as x -> x - | MTBfunsig (mbid,mtb1,mtb2) -> - MTBfunsig (mbid, lighten_modtype mtb1, lighten_modtype mtb2) - | MTBsig (msid,sign) -> MTBsig (msid, lighten_sig sign) - -and lighten_modspec ms = - { ms with msb_modtype = lighten_modtype ms.msb_modtype } - -and lighten_sig sign = - let lighten_spec (l,spec) = (l,match spec with - | SPBconst ({const_opaque=true} as x) -> SPBconst {x with const_body=None} - | (SPBconst _ | SPBmind _) as x -> x - | SPBmodule m -> SPBmodule (lighten_modspec m) - | SPBmodtype m -> SPBmodtype (lighten_modtype m)) - in - List.map lighten_spec sign - + mod_expr = Option.map lighten_modexpr mb.mod_expr; + mod_type = Option.map lighten_modexpr mb.mod_type; + } + and lighten_struct struc = let lighten_body (l,body) = (l,match body with - | SEBconst ({const_opaque=true} as x) -> SEBconst {x with const_body=None} - | (SEBconst _ | SEBmind _) as x -> x - | SEBmodule m -> SEBmodule (lighten_module m) - | SEBmodtype m -> SEBmodtype (lighten_modtype m)) + | SFBconst ({const_opaque=true} as x) -> SFBconst {x with const_body=None} + | (SFBconst _ | SFBmind _ | SFBalias _) as x -> x + | SFBmodule m -> SFBmodule (lighten_module m) + | SFBmodtype m -> SFBmodtype + ({m with + typ_expr = lighten_modexpr m.typ_expr})) in List.map lighten_body struc and lighten_modexpr = function - | MEBfunctor (mbid,mty,mexpr) -> - MEBfunctor (mbid,lighten_modtype mty,lighten_modexpr mexpr) - | MEBident mp as x -> x - | MEBstruct (msid, struc) -> - MEBstruct (msid, lighten_struct struc) - | MEBapply (mexpr,marg,u) -> - MEBapply (lighten_modexpr mexpr,lighten_modexpr marg,u) - + | SEBfunctor (mbid,mty,mexpr) -> + SEBfunctor (mbid, + ({mty with + typ_expr = lighten_modexpr mty.typ_expr}), + lighten_modexpr mexpr) + | SEBident mp as x -> x + | SEBstruct (msid, struc) -> + SEBstruct (msid, lighten_struct struc) + | SEBapply (mexpr,marg,u) -> + SEBapply (lighten_modexpr mexpr,lighten_modexpr marg,u) + | SEBwith (seb,wdcl) -> + SEBwith (lighten_modexpr seb,wdcl) + let lighten_library (dp,mb,depends,s) = (dp,lighten_module mb,depends,s) @@ -611,3 +816,6 @@ let j_type j = j.uj_type let safe_infer senv = infer (env_of_senv senv) let typing senv = Typeops.typing (env_of_senv senv) + + + diff --git a/kernel/safe_typing.mli b/kernel/safe_typing.mli index c3d0abde..6d656f8b 100644 --- a/kernel/safe_typing.mli +++ b/kernel/safe_typing.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: safe_typing.mli 8723 2006-04-16 15:51:02Z herbelin $ i*) +(*i $Id: safe_typing.mli 10664 2008-03-14 11:27:37Z soubiran $ i*) (*i*) open Names @@ -57,10 +57,14 @@ val add_module : label -> module_entry -> safe_environment -> module_path * safe_environment +(* Adding a module alias*) +val add_alias : + label -> module_path -> safe_environment + -> module_path * safe_environment (* Adding a module type *) val add_modtype : - label -> module_type_entry -> safe_environment - -> kernel_name * safe_environment + label -> module_struct_entry -> safe_environment + -> module_path * safe_environment (* Adding universe constraints *) val add_constraints : @@ -73,20 +77,21 @@ val set_engagement : engagement -> safe_environment -> safe_environment (*s Interactive module functions *) val start_module : label -> safe_environment -> module_path * safe_environment - val end_module : - label -> module_type_entry option + label -> module_struct_entry option -> safe_environment -> module_path * safe_environment val add_module_parameter : - mod_bound_id -> module_type_entry -> safe_environment -> safe_environment + mod_bound_id -> module_struct_entry -> safe_environment -> safe_environment val start_modtype : label -> safe_environment -> module_path * safe_environment val end_modtype : - label -> safe_environment -> kernel_name * safe_environment + label -> safe_environment -> module_path * safe_environment +val add_include : + module_struct_entry -> safe_environment -> safe_environment val current_modpath : safe_environment -> module_path val current_msid : safe_environment -> mod_self_id @@ -126,3 +131,12 @@ val safe_infer : safe_environment -> constr -> judgment * Univ.constraints val typing : safe_environment -> constr -> judgment + +(*spiwack: safe retroknowledge functionalities *) + +open Retroknowledge + +val retroknowledge : (retroknowledge-> 'a) -> safe_environment -> 'a + +val register : safe_environment -> field -> Retroknowledge.entry -> constr + -> safe_environment diff --git a/kernel/sign.ml b/kernel/sign.ml index b42ca581..8fa59809 100644 --- a/kernel/sign.ml +++ b/kernel/sign.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: sign.ml 9103 2006-09-01 11:02:52Z herbelin $ *) +(* $Id: sign.ml 10451 2008-01-18 17:20:28Z barras $ *) open Names open Util @@ -73,7 +73,7 @@ let fold_rel_context_reverse f ~init:x l = List.fold_left f x l let map_context f l = let map_decl (n, body_o, typ as decl) = - let body_o' = option_smartmap f body_o in + let body_o' = Option.smartmap f body_o in let typ' = f typ in if body_o' == body_o && typ' == typ then decl else (n, body_o', typ') @@ -83,8 +83,8 @@ let map_context f l = let map_rel_context = map_context let map_named_context = map_context -let iter_rel_context f = List.iter (fun (_,b,t) -> f t; option_iter f b) -let iter_named_context f = List.iter (fun (_,b,t) -> f t; option_iter f b) +let iter_rel_context f = List.iter (fun (_,b,t) -> f t; Option.iter f b) +let iter_named_context f = List.iter (fun (_,b,t) -> f t; Option.iter f b) (* Push named declarations on top of a rel context *) (* Bizarre. Should be avoided. *) @@ -92,7 +92,7 @@ let push_named_to_rel_context hyps ctxt = let rec push = function | (id,b,t) :: l -> let s, hyps = push l in - let d = (Name id, option_map (subst_vars s) b, type_app (subst_vars s) t) in + let d = (Name id, Option.map (subst_vars s) b, subst_vars s t) in id::s, d::hyps | [] -> [],[] in let s, hyps = push hyps in @@ -181,7 +181,9 @@ let decompose_prod_n_assum n = prodec_rec empty_rel_context n (* Given a positive integer n, transforms a lambda term [x1:T1]..[xn:Tn]T - into the pair ([(xn,Tn);...;(x1,T1)],T) *) + into the pair ([(xn,Tn);...;(x1,T1)],T) + Lets in between are not expanded but turn into local definitions, + but n is the actual number of destructurated lambdas. *) let decompose_lam_n_assum n = if n < 0 then error "decompose_lam_n_assum: integer parameter must be positive"; @@ -189,7 +191,7 @@ let decompose_lam_n_assum n = if n=0 then l,c else match kind_of_term c with | Lambda (x,t,c) -> lamdec_rec (add_rel_decl (x,None,t) l) (n-1) c - | LetIn (x,b,t,c) -> lamdec_rec (add_rel_decl (x,Some b,t) l) (n-1) c + | LetIn (x,b,t,c) -> lamdec_rec (add_rel_decl (x,Some b,t) l) n c | Cast (c,_,_) -> lamdec_rec l n c | c -> error "decompose_lam_n_assum: not enough abstractions" in diff --git a/kernel/subtyping.ml b/kernel/subtyping.ml index 2e6e5a34..14020c0b 100644 --- a/kernel/subtyping.ml +++ b/kernel/subtyping.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: subtyping.ml 10031 2007-07-19 18:05:46Z soubiran $ i*) +(*i $Id: subtyping.ml 11142 2008-06-18 15:37:31Z soubiran $ i*) (*i*) open Util @@ -22,16 +22,18 @@ open Mod_subst open Entries (*i*) + + (* This local type is used to subtype a constant with a constructor or an inductive type. It can also be useful to allow reorderings in inductive types *) - type namedobject = | Constant of constant_body | IndType of inductive * mutual_inductive_body | IndConstr of constructor * mutual_inductive_body - | Module of module_specification_body + | Module of module_body | Modtype of module_type_body + | Alias of module_path (* adds above information about one mutual inductive: all types and constructors *) @@ -57,11 +59,12 @@ let make_label_map mp list = let add_one (l,e) map = let add_map obj = Labmap.add l obj map in match e with - | SPBconst cb -> add_map (Constant cb) - | SPBmind mib -> + | SFBconst cb -> add_map (Constant cb) + | SFBmind mib -> add_nameobjects_of_mib (make_kn mp empty_dirpath l) mib map - | SPBmodule mb -> add_map (Module mb) - | SPBmodtype mtb -> add_map (Modtype mtb) + | SFBmodule mb -> add_map (Module mb) + | SFBmodtype mtb -> add_map (Modtype mtb) + | SFBalias (mp,cst) -> add_map (Alias mp) in List.fold_right add_one list Labmap.empty @@ -72,11 +75,9 @@ let check_conv_error error cst f env a1 a2 = NotConvertible -> error () (* for now we do not allow reorderings *) -let check_inductive cst env msid1 l info1 mib2 spec2 path1 path2 = +let check_inductive cst env msid1 l info1 mib2 spec2 = let kn = make_kn (MPself msid1) empty_dirpath l in - let error () = error_not_match l - (String.concat "." (List.map string_of_id (List.rev path1))) - (String.concat "." (List.map string_of_id (List.rev path2))) in + let error () = error_not_match l spec2 in let check_conv cst f = check_conv_error error cst f in let mib1 = match info1 with @@ -111,7 +112,7 @@ let check_inductive cst env msid1 l info1 mib2 spec2 path1 path2 = let (ctx2,s2) = dest_arity env t2 in let s1,s2 = match s1, s2 with - | Type _, Type _ -> (* shortcut here *) mk_Prop, mk_Prop + | Type _, Type _ -> (* shortcut here *) prop_sort, prop_sort | (Prop _, Type _) | (Type _,Prop _) -> error () | _ -> (s1, s2) in check_conv cst conv_leq env @@ -194,10 +195,8 @@ let check_inductive cst env msid1 l info1 mib2 spec2 path1 path2 = in cst -let check_constant cst env msid1 l info1 cb2 spec2 msid2 path1 path2 = - let error () = error_not_match l - (String.concat "." (List.map string_of_id (List.rev path1))) - (String.concat "." (List.map string_of_id (List.rev path2))) in +let check_constant cst env msid1 l info1 cb2 spec2 = + let error () = error_not_match l spec2 in let check_conv cst f = check_conv_error error cst f in let check_type cst env t1 t2 = @@ -223,13 +222,13 @@ let check_constant cst env msid1 l info1 cb2 spec2 msid2 path1 path2 = | Type u when not (is_univ_variable u) -> (* Both types are inferred, no need to recheck them. We cheat and collapse the types to Prop *) - Sign.mkArity (ctx1,mk_Prop), Sign.mkArity (ctx2,mk_Prop) + Sign.mkArity (ctx1,prop_sort), Sign.mkArity (ctx2,prop_sort) | Prop _ -> (* The type in the interface is inferred, it may be the case that the type in the implementation is smaller because the body is more reduced. We safely collapse the upper type to Prop *) - Sign.mkArity (ctx1,mk_Prop), Sign.mkArity (ctx2,mk_Prop) + Sign.mkArity (ctx1,prop_sort), Sign.mkArity (ctx2,prop_sort) | Type _ -> (* The type in the interface is inferred and the type in the implementation is not inferred or is inferred but from a @@ -255,55 +254,42 @@ let check_constant cst env msid1 l info1 cb2 spec2 msid2 path1 path2 = let cst = check_type cst env typ1 typ2 in let con = make_con (MPself msid1) empty_dirpath l in let cst = - match cb2.const_body with - | None -> cst - | Some lc2 -> - let c2 = Declarations.force lc2 in - let c1 = match cb1.const_body with - | Some lc1 -> Declarations.force lc1 - | None -> mkConst con - in - begin - match cb1.const_opaque,cb2.const_opaque with - false,false |true,true -> - check_conv cst conv env c1 c2 - | false,true -> - begin - match kind_of_term c1 with - | Const con' -> - let c1 = - match (Pre_env.lookup_constant con' - (pre_env env)).const_body with - Some c -> Declarations.force c - | None -> mkConst con' - in - check_conv cst conv env c1 c2 - | _ -> - check_conv cst conv env c1 c2 - end - | true,false-> + if cb2.const_opaque then + match cb2.const_body with + | None -> cst + | Some lc2 -> + let c2 = Declarations.force lc2 in + let c1 = match cb1.const_body with + | Some lc1 -> + let c = Declarations.force lc1 in begin - match (kind_of_term c2) with - | Const con'-> - if con' = con - then cst - else - let c2 = - match (Pre_env.lookup_constant con' - (pre_env env)).const_body with - Some c -> Declarations.force c - | None -> mkConst con' - in - check_conv cst conv env c1 c2 - | _ -> - check_conv cst conv env c1 c2 + match (kind_of_term c) with + Const n -> + let cb = lookup_constant n env in + (match cb.const_opaque, + cb.const_body with + | true, Some lc1 -> + Declarations.force lc1 + | _,_ -> c) + | _ -> c end - end - + | None -> mkConst con + in + check_conv cst conv env c1 c2 + else + match cb2.const_body with + | None -> cst + | Some lc2 -> + let c2 = Declarations.force lc2 in + let c1 = match cb1.const_body with + | Some lc1 -> Declarations.force lc1 + | None -> mkConst con + in + check_conv cst conv env c1 c2 in cst | IndType ((kn,i),mind1) -> - ignore (Util.error ( + ignore (Util.error ( "The kernel does not recognize yet that a parameter can be " ^ "instantiated by an inductive type. Hint: you can rename the " ^ "inductive type and give a definition to map the old name to the new " ^ @@ -326,38 +312,28 @@ let check_constant cst env msid1 l info1 cb2 spec2 msid2 path1 path2 = check_conv cst conv env ty1 ty2 | _ -> error () -let rec check_modules cst env msid1 l msb1 msb2 path1 path2 = +let rec check_modules cst env msid1 l msb1 msb2 alias = let mp = (MPdot(MPself msid1,l)) in - let mty1 = strengthen env msb1.msb_modtype mp in - let cst = check_modtypes cst env mty1 msb2.msb_modtype false - path1 path2 in - begin - match msb1.msb_equiv, msb2.msb_equiv with - | _, None -> () - | None, Some mp2 -> - begin - try - check_modpath_equiv env mp mp2 - with Not_equiv_path -> error_not_equal mp mp2 - end - | Some mp1, Some mp2 -> try - check_modpath_equiv env mp1 mp2 - with Not_equiv_path -> error_not_equal mp1 mp2 - end; + let mty1 = module_type_of_module (Some mp) msb1 in + let alias1,struct_expr = match eval_struct env mty1.typ_expr with + | SEBstruct (msid,sign) as str -> + update_subst alias (map_msid msid mp),str + | _ as str -> empty_subst,str in + let mty1 = {mty1 with + typ_expr = struct_expr; + typ_alias = join alias1 mty1.typ_alias } in + let mty2 = module_type_of_module None msb2 in + let cst = check_modtypes cst env mty1 mty2 false in cst -and check_signatures cst env (msid1,sig1) (msid2,sig2') path1 path2= +and check_signatures cst env (msid1,sig1) alias (msid2,sig2') = let mp1 = MPself msid1 in let env = add_signature mp1 sig1 env in - let sig2 = try - subst_signature_msid msid2 mp1 sig2' - with - | Circularity l -> - error_circularity_in_subtyping l - (String.concat "." (List.map string_of_id (List.rev path1))) - (String.concat "." (List.map string_of_id (List.rev path2))) - in + let sig1 = subst_structure alias sig1 in + let alias1 = update_subst alias (map_msid msid2 mp1) in + let sig2 = subst_structure alias1 sig2' in + let sig2 = subst_signature_msid msid2 mp1 sig2 in let map1 = make_label_map mp1 sig1 in let check_one_body cst (l,spec2) = let info1 = @@ -365,72 +341,90 @@ and check_signatures cst env (msid1,sig1) (msid2,sig2') path1 path2= Labmap.find l map1 with Not_found -> error_no_such_label_sub l - (String.concat "." (List.map string_of_id (List.rev path1))) - (String.concat "." (List.map string_of_id (List.rev path2))) + (string_of_msid msid1) (string_of_msid msid2) in match spec2 with - | SPBconst cb2 -> - check_constant cst env msid1 l info1 cb2 spec2 msid2 path1 path2 - | SPBmind mib2 -> - check_inductive cst env msid1 l info1 mib2 spec2 path1 path2 - | SPBmodule msb2 -> - let msb1 = + | SFBconst cb2 -> + check_constant cst env msid1 l info1 cb2 spec2 + | SFBmind mib2 -> + check_inductive cst env msid1 l info1 mib2 spec2 + | SFBmodule msb2 -> + begin match info1 with - | Module msb -> msb - | _ -> error_not_match l - (String.concat "." (List.map string_of_id (List.rev path1))) - (String.concat "." (List.map string_of_id (List.rev path2))) - - in - check_modules cst env msid1 l msb1 msb2 path1 path2 - | SPBmodtype mtb2 -> + | Module msb -> check_modules cst env msid1 l msb msb2 alias + | Alias mp ->let msb = + {mod_expr = Some (SEBident mp); + mod_type = Some (eval_struct env (SEBident mp)); + mod_constraints = Constraint.empty; + mod_alias = (lookup_modtype mp env).typ_alias; + mod_retroknowledge = []} in + check_modules cst env msid1 l msb msb2 alias + | _ -> error_not_match l spec2 + end + | SFBalias (mp,_) -> + begin + match info1 with + | Alias mp1 -> check_modpath_equiv env mp mp1; cst + | Module msb -> + let msb1 = + {mod_expr = Some (SEBident mp); + mod_type = Some (eval_struct env (SEBident mp)); + mod_constraints = Constraint.empty; + mod_alias = (lookup_modtype mp env).typ_alias; + mod_retroknowledge = []} in + check_modules cst env msid1 l msb msb1 alias + | _ -> error_not_match l spec2 + end + | SFBmodtype mtb2 -> let mtb1 = match info1 with | Modtype mtb -> mtb - | _ -> error_not_match l - (String.concat "." (List.map string_of_id (List.rev path1))) - (String.concat "." (List.map string_of_id (List.rev path2))) - + | _ -> error_not_match l spec2 in - check_modtypes cst env mtb1 mtb2 true path1 path2 + check_modtypes cst env mtb1 mtb2 true in List.fold_left check_one_body cst sig2 -and check_modtypes cst env mtb1 mtb2 equiv path1 path2 = + +and check_modtypes cst env mtb1 mtb2 equiv = if mtb1==mtb2 then cst else (* just in case :) *) - let mtb1' = scrape_modtype env mtb1 in - let mtb2' = scrape_modtype env mtb2 in - if mtb1'==mtb2' then cst else - match mtb1', mtb2' with - | MTBsig (msid1,list1), - MTBsig (msid2,list2) -> - let cst = check_signatures cst env (msid1,list1) (msid2,list2) - ((id_of_msid msid1)::path1) ((id_of_msid msid2)::path2) in - if equiv then - check_signatures cst env (msid2,list2) (msid1,list1) - ((id_of_msid msid2)::path2) ((id_of_msid msid1)::path1) - else - cst - | MTBfunsig (arg_id1,arg_t1,body_t1), - MTBfunsig (arg_id2,arg_t2,body_t2) -> - let cst = check_modtypes cst env arg_t2 arg_t1 equiv - [] [] in - (* contravariant *) - let env = - add_module (MPbound arg_id2) (module_body_of_type arg_t2) env - in - let body_t1' = - (* since we are just checking well-typedness we do not need - to expand any constant. Hence the identity resolver. *) - subst_modtype - (map_mbid arg_id1 (MPbound arg_id2) None) - body_t1 - in - check_modtypes cst env body_t1' body_t2 equiv - path1 path2 - | MTBident _ , _ -> anomaly "Subtyping: scrape failed" - | _ , MTBident _ -> anomaly "Subtyping: scrape failed" - | _ , _ -> error_incompatible_modtypes mtb1 mtb2 + let mtb1',mtb2'= + (match mtb1.typ_strength with + None -> eval_struct env mtb1.typ_expr, + eval_struct env mtb2.typ_expr + | Some mp -> strengthen env mtb1.typ_expr mp, + eval_struct env mtb2.typ_expr) in + let rec check_structure cst env str1 str2 equiv = + match str1, str2 with + | SEBstruct (msid1,list1), + SEBstruct (msid2,list2) -> + let cst = check_signatures cst env + (msid1,list1) mtb1.typ_alias (msid2,list2) in + if equiv then + check_signatures cst env + (msid2,list2) mtb2.typ_alias (msid1,list1) + else + cst + | SEBfunctor (arg_id1,arg_t1,body_t1), + SEBfunctor (arg_id2,arg_t2,body_t2) -> + let cst = check_modtypes cst env arg_t2 arg_t1 equiv in + (* contravariant *) + let env = + add_module (MPbound arg_id2) (module_body_of_type arg_t2) env + in + let body_t1' = + (* since we are just checking well-typedness we do not need + to expand any constant. Hence the identity resolver. *) + subst_struct_expr + (map_mbid arg_id1 (MPbound arg_id2) None) + body_t1 + in + check_structure cst env (eval_struct env body_t1') + (eval_struct env body_t2) equiv + | _ , _ -> error_incompatible_modtypes mtb1 mtb2 + in + if mtb1'== mtb2' then cst + else check_structure cst env mtb1' mtb2' equiv let check_subtypes env sup super = - check_modtypes Constraint.empty env sup super false [] [] + check_modtypes Constraint.empty env sup super false diff --git a/kernel/subtyping.mli b/kernel/subtyping.mli index 8bc25464..0445666d 100644 --- a/kernel/subtyping.mli +++ b/kernel/subtyping.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: subtyping.mli 5920 2004-07-16 20:01:26Z herbelin $ i*) +(*i $Id: subtyping.mli 10664 2008-03-14 11:27:37Z soubiran $ i*) (*i*) open Univ diff --git a/kernel/term.ml b/kernel/term.ml index 456a29e4..c920c80b 100644 --- a/kernel/term.ml +++ b/kernel/term.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: term.ml 9303 2006-10-27 21:50:17Z herbelin $ *) +(* $Id: term.ml 10859 2008-04-27 16:46:15Z herbelin $ *) (* This module instantiates the structure of generic deBruijn terms to Coq *) @@ -24,12 +24,10 @@ type metavariable = int (* This defines the strategy to use for verifiying a Cast *) (* This defines Cases annotations *) -type pattern_source = DefaultPat of int | RegularPat -type case_style = LetStyle | IfStyle | MatchStyle | RegularStyle +type case_style = LetStyle | IfStyle | LetPatternStyle | MatchStyle | RegularStyle type case_printing = { ind_nargs : int; (* number of real args of the inductive type *) - style : case_style; - source : pattern_source array } + style : case_style } type case_info = { ci_ind : inductive; ci_npar : int; @@ -45,8 +43,9 @@ type sorts = | Prop of contents (* proposition types *) | Type of universe -let mk_Set = Prop Pos -let mk_Prop = Prop Null +let prop_sort = Prop Null +let set_sort = Prop Pos +let type1_sort = Type type1_univ type sorts_family = InProp | InSet | InType @@ -390,7 +389,9 @@ let destApplication = destApp let isApp c = match kind_of_term c with App _ -> true | _ -> false -let isProd c = match kind_of_term c with | Prod(_) -> true | _ -> false +let isProd c = match kind_of_term c with | Prod _ -> true | _ -> false + +let isLambda c = match kind_of_term c with | Lambda _ -> true | _ -> false (* Destructs a constant *) let destConst c = match kind_of_term c with @@ -636,17 +637,13 @@ type types = constr type strategy = types option -let type_app f tt = f tt - -let body_of_type ty = ty - type named_declaration = identifier * constr option * types type rel_declaration = name * constr option * types -let map_named_declaration f (id, v, ty) = (id, option_map f v, f ty) +let map_named_declaration f (id, v, ty) = (id, Option.map f v, f ty) let map_rel_declaration = map_named_declaration -let fold_named_declaration f (_, v, ty) a = f ty (option_fold_right f v a) +let fold_named_declaration f (_, v, ty) a = f ty (Option.fold_right f v a) let fold_rel_declaration = fold_named_declaration (****************************************************************************) @@ -777,7 +774,7 @@ let substl laml = substnl laml 0 let subst1 lam = substl [lam] let substnl_decl laml k (id,bodyopt,typ) = - (id,option_map (substnl laml k) bodyopt,substnl laml k typ) + (id,Option.map (substnl laml k) bodyopt,substnl laml k typ) let substl_decl laml = substnl_decl laml 0 let subst1_decl lam = substl_decl [lam] let subst1_named_decl = subst1_decl @@ -834,18 +831,14 @@ let mkMeta = mkMeta let mkVar = mkVar (* Construct a type *) -let mkProp = mkSort mk_Prop -let mkSet = mkSort mk_Set +let mkProp = mkSort prop_sort +let mkSet = mkSort set_sort let mkType u = mkSort (Type u) let mkSort = function | Prop Null -> mkProp (* Easy sharing *) | Prop Pos -> mkSet | s -> mkSort s -let prop = mk_Prop -and spec = mk_Set -and type_0 = Type prop_univ - (* Constructs the term t1::t2, i.e. the term t1 casted with the type t2 *) (* (that means t2 is declared as the type of t1) *) let mkCast = mkCast @@ -1181,6 +1174,3 @@ let (hcons1_constr, hcons1_types) = hcons_constr (hcons_names()) (*******) (* Type of abstract machine values *) type values - - - diff --git a/kernel/term.mli b/kernel/term.mli index d6244f5b..6236dc39 100644 --- a/kernel/term.mli +++ b/kernel/term.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: term.mli 9303 2006-10-27 21:50:17Z herbelin $ i*) +(*i $Id: term.mli 10859 2008-04-27 16:46:15Z herbelin $ i*) (*i*) open Names @@ -21,9 +21,9 @@ type sorts = | Prop of contents (* Prop and Set *) | Type of Univ.universe (* Type *) -val mk_Set : sorts -val mk_Prop : sorts -val type_0 : sorts +val set_sort : sorts +val prop_sort : sorts +val type1_sort : sorts (*s The sorts family of CCI. *) @@ -40,12 +40,10 @@ type existential_key = int type metavariable = int (*s Case annotation *) -type pattern_source = DefaultPat of int | RegularPat -type case_style = LetStyle | IfStyle | MatchStyle | RegularStyle +type case_style = LetStyle | IfStyle | LetPatternStyle | MatchStyle | RegularStyle type case_printing = { ind_nargs : int; (* number of real args of the inductive type *) - style : case_style; - source : pattern_source array } + style : case_style } (* the integer is the number of real args, needed for reduction *) type case_info = { ci_ind : inductive; @@ -63,18 +61,13 @@ type constr and application grouping *) val eq_constr : constr -> constr -> bool -(* [types] is the same as [constr] but is intended to be used where a - {\em type} in CCI sense is expected (Rem:plurial form since [type] is a - reserved ML keyword) *) +(* [types] is the same as [constr] but is intended to be used for + documentation to indicate that such or such function specifically works + with {\em types} (i.e. terms of type a sort). + (Rem:plurial form since [type] is a reserved ML keyword) *) type types = constr -(*s Functions about [types] *) - -val type_app : (constr -> constr) -> types -> types - -val body_of_type : types -> constr - (*s Functions for dealing with constr terms. The following functions are intended to simplify and to uniform the manipulation of terms. Some of these functions may be overlapped with @@ -236,6 +229,7 @@ val isMeta : constr -> bool val isSort : constr -> bool val isCast : constr -> bool val isApp : constr -> bool +val isLambda : constr -> bool val isProd : constr -> bool val isConst : constr -> bool val isConstruct : constr -> bool @@ -445,8 +439,8 @@ val noccurn : int -> constr -> bool val noccur_between : int -> int -> constr -> bool (* Checking function for terms containing existential- or - meta-variables. The function [noccur_with_meta] considers only - meta-variable applied to some terms (intented to be its local + meta-variables. The function [noccur_with_meta] does not consider + meta-variables applied to some terms (intented to be its local context) (for existential variables, it is necessarily the case) *) val noccur_with_meta : int -> int -> constr -> bool @@ -455,7 +449,7 @@ val noccur_with_meta : int -> int -> constr -> bool (* [exliftn el c] lifts [c] with lifting [el] *) val exliftn : Esubst.lift -> constr -> constr -(* [liftn n k c] lifts by [n] indexes above [k] in [c] *) +(* [liftn n k c] lifts by [n] indexes above or equal to [k] in [c] *) val liftn : int -> int -> constr -> constr (* [lift n c] lifts by [n] the positive indexes in [c] *) @@ -479,10 +473,10 @@ val replace_vars : (identifier * constr) list -> constr -> constr val subst_var : identifier -> constr -> constr (* [subst_vars [id1;...;idn] t] substitute [VAR idj] by [Rel j] in [t] - if two names are identical, the one of least indice is keeped *) + if two names are identical, the one of least indice is kept *) val subst_vars : identifier list -> constr -> constr (* [substn_vars n [id1;...;idn] t] substitute [VAR idj] by [Rel j+n-1] in [t] - if two names are identical, the one of least indice is keeped *) + if two names are identical, the one of least indice is kept *) val substn_vars : int -> identifier list -> constr -> constr diff --git a/kernel/term_typing.ml b/kernel/term_typing.ml index 575330a4..0f649057 100644 --- a/kernel/term_typing.ml +++ b/kernel/term_typing.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: term_typing.ml 9323 2006-10-30 23:05:29Z herbelin $ *) +(* $Id: term_typing.ml 10877 2008-04-30 21:58:41Z herbelin $ *) open Util open Names @@ -24,10 +24,7 @@ open Typeops let constrain_type env j cst1 = function | None -> -(* To have definitions in Type polymorphic - make_polymorphic_if_arity env j.uj_type, cst1 -*) - NonPolymorphicType j.uj_type, cst1 + make_polymorphic_if_constant_for_ind env j, cst1 | Some t -> let (tj,cst2) = infer_type env t in let (_,cst3) = judge_of_cast env j DEFAULTcast tj in @@ -93,11 +90,11 @@ let infer_declaration env dcl = let (j,cst) = infer env c.const_entry_body in let (typ,cst) = constrain_type env j cst c.const_entry_type in Some (Declarations.from_val j.uj_val), typ, cst, - c.const_entry_opaque, c.const_entry_boxed - | ParameterEntry t -> + c.const_entry_opaque, c.const_entry_boxed, false + | ParameterEntry (t,nl) -> let (j,cst) = infer env t in None, NonPolymorphicType (Typeops.assumption_of_judgment env j), cst, - false, false + false, false, nl let global_vars_set_constant_type env = function | NonPolymorphicType t -> global_vars_set env t @@ -107,7 +104,7 @@ let global_vars_set_constant_type env = function (fun t c -> Idset.union (global_vars_set env t) c)) ctx ~init:Idset.empty -let build_constant_declaration env kn (body,typ,cst,op,boxed) = +let build_constant_declaration env kn (body,typ,cst,op,boxed,inline) = let ids = match body with | None -> global_vars_set_constant_type env typ @@ -124,7 +121,8 @@ let build_constant_declaration env kn (body,typ,cst,op,boxed) = const_body_code = tps; (* const_type_code = to_patch env typ;*) const_constraints = cst; - const_opaque = op } + const_opaque = op; + const_inline = inline} (*s Global and local constant declaration. *) diff --git a/kernel/term_typing.mli b/kernel/term_typing.mli index c102d01b..d84cfe91 100644 --- a/kernel/term_typing.mli +++ b/kernel/term_typing.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: term_typing.mli 9310 2006-10-28 19:35:09Z herbelin $ i*) +(*i $Id: term_typing.mli 9795 2007-04-25 15:13:45Z soubiran $ i*) (*i*) open Names @@ -26,10 +26,10 @@ val translate_local_assum : env -> types -> types * Univ.constraints val infer_declaration : env -> constant_entry -> - constr_substituted option * constant_type * constraints * bool * bool + constr_substituted option * constant_type * constraints * bool * bool * bool val build_constant_declaration : env -> 'a -> - constr_substituted option * constant_type * constraints * bool * bool -> + constr_substituted option * constant_type * constraints * bool * bool * bool -> constant_body val translate_constant : env -> constant -> constant_entry -> constant_body diff --git a/kernel/type_errors.ml b/kernel/type_errors.ml index 87de6698..1a49531b 100644 --- a/kernel/type_errors.ml +++ b/kernel/type_errors.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: type_errors.ml 8845 2006-05-23 07:41:58Z herbelin $ *) +(* $Id: type_errors.ml 10533 2008-02-08 16:54:47Z msozeau $ *) open Names open Term @@ -56,7 +56,7 @@ type type_error = | CantApplyBadType of (int * constr * constr) * unsafe_judgment * unsafe_judgment array | CantApplyNonFunctional of unsafe_judgment * unsafe_judgment array - | IllFormedRecBody of guard_error * name array * int + | IllFormedRecBody of guard_error * name array * int * env * unsafe_judgment array | IllTypedRecBody of int * name array * unsafe_judgment array * types array @@ -105,8 +105,8 @@ let error_cant_apply_not_functional env rator randl = let error_cant_apply_bad_type env t rator randl = raise (TypeError (env, CantApplyBadType (t,rator,randl))) -let error_ill_formed_rec_body env why lna i = - raise (TypeError (env, IllFormedRecBody (why,lna,i))) +let error_ill_formed_rec_body env why lna i fixenv vdefj = + raise (TypeError (env, IllFormedRecBody (why,lna,i,fixenv,vdefj))) let error_ill_typed_rec_body env i lna vdefj vargs = raise (TypeError (env, IllTypedRecBody (i,lna,vdefj,vargs))) diff --git a/kernel/type_errors.mli b/kernel/type_errors.mli index 138c313c..368e1723 100644 --- a/kernel/type_errors.mli +++ b/kernel/type_errors.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: type_errors.mli 8845 2006-05-23 07:41:58Z herbelin $ i*) +(*i $Id: type_errors.mli 10533 2008-02-08 16:54:47Z msozeau $ i*) (*i*) open Names @@ -58,7 +58,7 @@ type type_error = | CantApplyBadType of (int * constr * constr) * unsafe_judgment * unsafe_judgment array | CantApplyNonFunctional of unsafe_judgment * unsafe_judgment array - | IllFormedRecBody of guard_error * name array * int + | IllFormedRecBody of guard_error * name array * int * env * unsafe_judgment array | IllTypedRecBody of int * name array * unsafe_judgment array * types array @@ -96,7 +96,7 @@ val error_cant_apply_bad_type : unsafe_judgment -> unsafe_judgment array -> 'a val error_ill_formed_rec_body : - env -> guard_error -> name array -> int -> 'a + env -> guard_error -> name array -> int -> env -> unsafe_judgment array -> 'a val error_ill_typed_rec_body : env -> int -> name array -> unsafe_judgment array -> types array -> 'a diff --git a/kernel/typeops.ml b/kernel/typeops.ml index 2a0dd526..e548e6f5 100644 --- a/kernel/typeops.ml +++ b/kernel/typeops.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: typeops.ml 9314 2006-10-29 20:11:08Z herbelin $ *) +(* $Id: typeops.ml 10877 2008-04-30 21:58:41Z herbelin $ *) open Util open Names @@ -59,11 +59,11 @@ let sort_judgment env j = (type_judgment env j).utj_type let judge_of_prop = { uj_val = mkProp; - uj_type = mkSort type_0 } + uj_type = mkSort type1_sort } let judge_of_set = { uj_val = mkSet; - uj_type = mkSort type_0 } + uj_type = mkSort type1_sort } let judge_of_prop_contents = function | Null -> judge_of_prop @@ -82,7 +82,7 @@ let judge_of_relative env n = try let (_,_,typ) = lookup_rel n env in { uj_val = mkRel n; - uj_type = type_app (lift n) typ } + uj_type = lift n typ } with Not_found -> error_unbound_rel env n @@ -135,10 +135,10 @@ let extract_context_levels env = List.fold_left (fun l (_,b,p) -> if b=None then extract_level env p::l else l) [] -let make_polymorphic_if_arity env t = +let make_polymorphic_if_constant_for_ind env {uj_val = c; uj_type = t} = let params, ccl = dest_prod_assum env t in match kind_of_term ccl with - | Sort (Type u) -> + | Sort (Type u) when isInd (fst (decompose_app (whd_betadeltaiota env c))) -> let param_ccls = extract_context_levels env params in let s = { poly_param_levels = param_ccls; poly_level = u} in PolymorphicArity (params,s) @@ -192,7 +192,7 @@ let judge_of_abstraction env name var j = let judge_of_letin env name defj typj j = { uj_val = mkLetIn (name, defj.uj_val, typj.utj_val, j.uj_val) ; - uj_type = type_app (subst1 defj.uj_val) j.uj_type } + uj_type = subst1 defj.uj_val j.uj_type } (* Type of an application. *) @@ -237,9 +237,9 @@ let sort_of_product env domsort rangsort = rangsort else (* Rule is (Type_i,Set,Type_i) in the Set-predicative calculus *) - Type (sup u1 base_univ) + Type (sup u1 type0_univ) (* Product rule (Prop,Type_i,Type_i) *) - | (Prop Pos, Type u2) -> Type (sup base_univ u2) + | (Prop Pos, Type u2) -> Type (sup type0_univ u2) (* Product rule (Prop,Type_i,Type_i) *) | (Prop Null, Type _) -> rangsort (* Product rule (Type_i,Type_i,Type_i) *) diff --git a/kernel/typeops.mli b/kernel/typeops.mli index 1e73725f..c427055a 100644 --- a/kernel/typeops.mli +++ b/kernel/typeops.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: typeops.mli 9551 2007-01-29 15:13:35Z bgregoir $ i*) +(*i $Id: typeops.mli 10877 2008-04-30 21:58:41Z herbelin $ i*) (*i*) open Names @@ -105,5 +105,6 @@ val type_of_constant_knowing_parameters : env -> constant_type -> constr array -> types (* Make a type polymorphic if an arity *) -val make_polymorphic_if_arity : env -> types -> constant_type +val make_polymorphic_if_constant_for_ind : env -> unsafe_judgment -> + constant_type diff --git a/kernel/univ.ml b/kernel/univ.ml index df06e9af..3791c3e1 100644 --- a/kernel/univ.ml +++ b/kernel/univ.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: univ.ml 9507 2007-01-20 08:09:54Z herbelin $ *) +(* $Id: univ.ml 11063 2008-06-06 16:03:45Z soubiran $ *) (* Initial Caml version originates from CoC 4.8 [Dec 1988] *) (* Extension with algebraic universes by HH [Sep 2001] *) @@ -40,7 +40,7 @@ open Util *) type universe_level = - | Base + | Set | Level of Names.dir_path * int type universe = @@ -53,7 +53,7 @@ module UniverseOrdered = struct end let string_of_univ_level = function - | Base -> "0" + | Set -> "0" | Level (d,n) -> Names.string_of_dirpath d^"."^string_of_int n let make_univ (m,n) = Atom (Level (m,n)) @@ -79,7 +79,7 @@ let super = function | Atom u -> Max ([],[u]) | Max _ -> - anomaly ("Cannot take the successor of a non variable universes:\n"^ + anomaly ("Cannot take the successor of a non variable universe:\n"^ "(maybe a bugged tactic)") (* Returns the formal universe that is greater than the universes u and v. @@ -96,8 +96,6 @@ let sup u v = let gtl'' = list_union gtl gtl' in Max (list_subtract gel'' gtl'',gtl'') -let neutral_univ = Max ([],[]) - (* Comparison on this type is pointer equality *) type canonical_arc = { univ: universe_level; lt: universe_level list; le: universe_level list } @@ -126,23 +124,32 @@ let declare_univ u g = else g -(* The level of Set *) -let base_univ = Atom Base +(* The lower predicative level of the hierarchy that contains (impredicative) + Prop and singleton inductive types *) +let type0m_univ = Max ([],[]) + +let is_type0m_univ = function + | Max ([],[]) -> true + | _ -> false + +(* The level of predicative Set *) +let type0_univ = Atom Set -let is_base_univ = function - | Atom Base -> true - | Max ([Base],[]) -> warning "Non canonical Set"; true +let is_type0_univ = function + | Atom Set -> true + | Max ([Set],[]) -> warning "Non canonical Set"; true | u -> false let is_univ_variable = function - | Atom a when a<>Base -> true + | Atom a when a<>Set -> true | _ -> false (* When typing [Prop] and [Set], there is no constraint on the level, - hence the definition of [prop_univ], the type of [Prop] *) + hence the definition of [type1_univ], the type of [Prop] *) + +let type1_univ = Max ([],[Set]) let initial_universes = UniverseMap.empty -let prop_univ = Max ([],[Base]) (* Every universe_level has a unique canonical arc representative *) @@ -259,6 +266,55 @@ let compare g u v = Adding u>v is consistent iff compare(v,u) = NLE and then it is redundant iff compare(u,v) = LT *) +let compare_eq g u v = + let g = declare_univ u g in + let g = declare_univ v g in + repr g u == repr g v + + +type check_function = universes -> universe -> universe -> bool + +let incl_list cmp l1 l2 = + List.for_all (fun x1 -> List.exists (fun x2 -> cmp x1 x2) l2) l1 + +let compare_list cmp l1 l2 = + incl_list cmp l1 l2 && incl_list cmp l2 l1 + +let rec check_eq g u v = + match (u,v) with + | Atom ul, Atom vl -> compare_eq g ul vl + | Max(ule,ult), Max(vle,vlt) -> + (* TODO: remove elements of lt in le! *) + compare_list (compare_eq g) ule vle && + compare_list (compare_eq g) ult vlt + | _ -> anomaly "check_eq" (* not complete! (Atom(u) = Max([u],[]) *) + +let check_eq g u v = + check_eq g u v + +let compare_greater g strict u v = + let g = declare_univ u g in + let g = declare_univ v g in + if not strict && compare_eq g v Set then true else + match compare g v u with + | (EQ|LE) -> not strict + | LT -> true + | NLE -> false +(* +let compare_greater g strict u v = + let b = compare_greater g strict u v in + ppnl(str (if b then if strict then ">" else ">=" else "NOT >=")); + b +*) +let rec check_greater g strict u v = + match u, v with + | Atom ul, Atom vl -> compare_greater g strict ul vl + | Atom ul, Max(le,lt) -> + List.for_all (fun vl -> compare_greater g strict ul vl) le && + List.for_all (fun vl -> compare_greater g true ul vl) lt + | _ -> anomaly "check_greater" + +let check_geq g = check_greater g false (* setlt : universe_level -> universe_level -> unit *) (* forces u > v *) @@ -314,9 +370,11 @@ let merge_disc g u v = (* Universe inconsistency: error raised when trying to enforce a relation that would create a cycle in the graph of universes. *) -exception UniverseInconsistency +type order_request = Lt | Le | Eq -let error_inconsistency () = raise UniverseInconsistency +exception UniverseInconsistency of order_request * universe * universe + +let error_inconsistency o u v = raise (UniverseInconsistency (o,Atom u,Atom v)) (* enforce_univ_leq : universe_level -> universe_level -> unit *) (* enforce_univ_leq u v will force u<=v if possible, will fail otherwise *) @@ -326,7 +384,7 @@ let enforce_univ_leq u v g = match compare g u v with | NLE -> (match compare g v u with - | LT -> error_inconsistency() + | LT -> error_inconsistency Le u v | LE -> merge g v u | NLE -> setleq g u v | EQ -> anomaly "Univ.compare") @@ -339,11 +397,11 @@ let enforce_univ_eq u v g = let g = declare_univ v g in match compare g u v with | EQ -> g - | LT -> error_inconsistency() + | LT -> error_inconsistency Eq u v | LE -> merge g u v | NLE -> (match compare g v u with - | LT -> error_inconsistency() + | LT -> error_inconsistency Eq u v | LE -> merge g v u | NLE -> merge_disc g u v | EQ -> anomaly "Univ.compare") @@ -355,11 +413,11 @@ let enforce_univ_lt u v g = match compare g u v with | LT -> g | LE -> setlt g u v - | EQ -> error_inconsistency() + | EQ -> error_inconsistency Lt u v | NLE -> (match compare g v u with | NLE -> setlt g u v - | _ -> error_inconsistency()) + | _ -> error_inconsistency Lt u v) (* let enforce_univ_relation g = function @@ -401,7 +459,7 @@ type constraint_function = universe -> universe -> constraints -> constraints let constraint_add_leq v u c = - if v = Base then c else Constraint.add (v,Leq,u) c + if v = Set then c else Constraint.add (v,Leq,u) c let enforce_geq u v c = match u, v with @@ -440,10 +498,6 @@ let remove_large_constraint u = function | Atom u' as x -> if u = u' then Max ([],[]) else x | Max (le,lt) -> make_max (list_remove u le,lt) -let is_empty_univ = function - | Max ([],[]) -> true - | _ -> false - let is_direct_constraint u = function | Atom u' -> u = u' | Max (le,lt) -> List.mem u le @@ -468,7 +522,7 @@ let is_direct_sort_constraint s v = match s with let solve_constraints_system levels level_bounds = let levels = - Array.map (option_map (function Atom u -> u | _ -> anomaly "expects Atom")) + Array.map (Option.map (function Atom u -> u | _ -> anomaly "expects Atom")) levels in let v = Array.copy level_bounds in let nind = Array.length v in @@ -525,7 +579,15 @@ let pr_universes g = let graph = UniverseMap.fold (fun k a l -> (k,a)::l) g [] in prlist (function (_,a) -> pr_arc a) graph - +let pr_constraints c = + Constraint.fold (fun (u1,op,u2) pp_std -> + let op_str = match op with + | Lt -> " < " + | Leq -> " <= " + | Eq -> " = " + in pp_std ++ pr_uni_level u1 ++ str op_str ++ + pr_uni_level u2 ++ fnl () ) c (str "") + (* Dumping constrains to a file *) let dump_universes output g = @@ -556,7 +618,7 @@ module Huniv = type t = universe type u = Names.dir_path -> Names.dir_path let hash_aux hdir = function - | Base -> Base + | Set -> Set | Level (d,n) -> Level (hdir d,n) let hash_sub hdir = function | Atom u -> Atom (hash_aux hdir u) @@ -575,3 +637,4 @@ module Huniv = let hcons1_univ u = let _,_,hdir,_,_,_ = Names.hcons_names() in Hashcons.simple_hcons Huniv.f hdir u + diff --git a/kernel/univ.mli b/kernel/univ.mli index 5f562a1d..0a1a8328 100644 --- a/kernel/univ.mli +++ b/kernel/univ.mli @@ -6,18 +6,23 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: univ.mli 9507 2007-01-20 08:09:54Z herbelin $ i*) +(*i $Id: univ.mli 11063 2008-06-06 16:03:45Z soubiran $ i*) (* Universes. *) type universe -val base_univ : universe -val prop_univ : universe -val neutral_univ : universe +(* The universes hierarchy: Type 0- = Prop <= Type 0 = Set <= Type 1 <= ... *) +(* Typing of universes: Type 0-, Type 0 : Type 1; Type i : Type (i+1) if i>0 *) + +val type0m_univ : universe (* image of Prop in the universes hierarchy *) +val type0_univ : universe (* image of Set in the universes hierarchy *) +val type1_univ : universe (* the universe of the type of Prop/Set *) + val make_univ : Names.dir_path * int -> universe -val is_base_univ : universe -> bool +val is_type0_univ : universe -> bool +val is_type0m_univ : universe -> bool val is_univ_variable : universe -> bool (* The type of a universe *) @@ -30,6 +35,10 @@ val sup : universe -> universe -> universe type universes +type check_function = universes -> universe -> universe -> bool +val check_geq : check_function +val check_eq : check_function + (* The empty graph of universes *) val initial_universes : universes @@ -49,7 +58,9 @@ val enforce_eq : constraint_function universes graph. It raises the exception [UniverseInconsistency] if the constraints are not satisfiable. *) -exception UniverseInconsistency +type order_request = Lt | Le | Eq + +exception UniverseInconsistency of order_request * universe * universe val merge_constraints : constraints -> universes -> universes @@ -60,8 +71,6 @@ val fresh_local_univ : unit -> universe val solve_constraints_system : universe option array -> universe array -> universe array -val is_empty_univ : universe -> bool - val subst_large_constraint : universe -> universe -> universe -> universe val subst_large_constraints : @@ -71,6 +80,7 @@ val subst_large_constraints : val pr_uni : universe -> Pp.std_ppcmds val pr_universes : universes -> Pp.std_ppcmds +val pr_constraints : constraints -> Pp.std_ppcmds (*s Dumping to a file *) diff --git a/kernel/vm.ml b/kernel/vm.ml index c1d3ca56..4ed0592d 100644 --- a/kernel/vm.ml +++ b/kernel/vm.ml @@ -1,3 +1,13 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* bool val is_neg_or_zero : bigint -> bool val neg : bigint -> bigint +val pow : bigint -> bigint -> bigint + val pr_bigint : bigint -> std_ppcmds diff --git a/lib/bstack.ml b/lib/bstack.ml index b86dccf9..35bbf32b 100644 --- a/lib/bstack.ml +++ b/lib/bstack.ml @@ -6,19 +6,27 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: bstack.ml 5920 2004-07-16 20:01:26Z herbelin $ *) +(* $Id: bstack.ml 10441 2008-01-15 16:37:46Z lmamane $ *) (* Queues of a given length *) open Util +(* - size is the count of elements actually in the queue + - depth is the the amount of elements pushed in the queue (and not popped) + in particular, depth >= size always and depth > size if the queue overflowed + (and forgot older elements) + *) + type 'a t = {mutable pos : int; mutable size : int; + mutable depth : int; stack : 'a array} let create depth e = {pos = 0; size = 1; + depth = 1; stack = Array.create depth e} (* @@ -37,14 +45,16 @@ let decr_pos bs = let push bs e = incr_pos bs; incr_size bs; + bs.depth <- bs.depth + 1; bs.stack.(bs.pos) <- e let pop bs = if bs.size > 1 then begin bs.size <- bs.size - 1; + bs.depth <- bs.depth - 1; let oldpos = bs.pos in decr_pos bs; - (* Release the memory at oldpos, by coyping what is at new pos *) + (* Release the memory at oldpos, by copying what is at new pos *) bs.stack.(oldpos) <- bs.stack.(bs.pos) end @@ -60,4 +70,6 @@ let app_repl bs f = if bs.size = 0 then error "Nothing on the stack" else bs.stack.(bs.pos) <- f (bs.stack.(bs.pos)) -let depth bs = bs.size +let depth bs = bs.depth + +let size bs = bs.size diff --git a/lib/bstack.mli b/lib/bstack.mli index f018d155..ca2b5f02 100644 --- a/lib/bstack.mli +++ b/lib/bstack.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: bstack.mli 5920 2004-07-16 20:01:26Z herbelin $ i*) +(*i $Id: bstack.mli 10441 2008-01-15 16:37:46Z lmamane $ i*) (* Bounded stacks. If the depth is [None], then there is no depth limit. *) @@ -19,3 +19,4 @@ val app_repl : 'a t -> ('a -> 'a) -> unit val pop : 'a t -> unit val top : 'a t -> 'a val depth : 'a t -> int +val size : 'a t -> int diff --git a/lib/compat.ml4 b/lib/compat.ml4 index 372d2be3..40cffadb 100644 --- a/lib/compat.ml4 +++ b/lib/compat.ml4 @@ -6,13 +6,13 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* Compatibility file depending on ocaml version *) +(*i camlp4use: "pa_macro.cmo" i*) -(* type loc is different in 3.08 *) +(* Compatibility file depending on ocaml version *) IFDEF OCAML309 THEN DEFINE OCAML308 END -IFDEF CAMLP5 THEN +IFDEF CAMLP5 THEN module M = struct type loc = Stdpp.location let dummy_loc = Stdpp.dummy_loc @@ -45,7 +45,7 @@ type token = Token.t type lexer = Token.lexer let using l x = l.Token.using x end -ELSE +ELSE module M = struct type loc = int * int let dummy_loc = (0,0) @@ -63,8 +63,8 @@ END type loc = M.loc let dummy_loc = M.dummy_loc -let unloc = M.unloc let make_loc = M.make_loc +let unloc = M.unloc let join_loc = M.join_loc type token = M.token type lexer = M.lexer diff --git a/lib/edit.ml b/lib/edit.ml index 03420992..380abfd8 100644 --- a/lib/edit.ml +++ b/lib/edit.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: edit.ml 6947 2005-04-20 16:18:41Z coq $ *) +(* $Id: edit.ml 10441 2008-01-15 16:37:46Z lmamane $ *) open Pp open Util @@ -80,7 +80,7 @@ let undo e n = | None -> invalid_arg "Edit.undo" | Some d -> let (bs,_) = Hashtbl.find e.buf d in - if Bstack.depth bs = 1 & n > 0 then + if n >= Bstack.size bs then errorlabstrm "Edit.undo" (str"Undo stack exhausted"); repeat n Bstack.pop bs @@ -102,15 +102,16 @@ let undo_todepth e n = else () (* if there is no proof in progress, then n must be zero *) | Some d -> let (bs,_) = Hashtbl.find e.buf d in - if Bstack.depth bs < n then + let ucnt = Bstack.depth bs - n in + if ucnt >= Bstack.size bs then errorlabstrm "Edit.undo_todepth" (str"Undo stack would be exhausted"); - repeat (Bstack.depth bs - n) Bstack.pop bs + repeat ucnt Bstack.pop bs -let create e (d,b,c,udepth) = +let create e (d,b,c,usize) = if Hashtbl.mem e.buf d then errorlabstrm "Edit.create" (str"Already editing something of that name"); - let bs = Bstack.create udepth b in + let bs = Bstack.create usize b in Hashtbl.add e.buf d (bs,c) let delete e d = diff --git a/lib/flags.ml b/lib/flags.ml new file mode 100644 index 00000000..de971c7c --- /dev/null +++ b/lib/flags.ml @@ -0,0 +1,132 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* o := old; raise e + +let boot = ref false + +let batch_mode = ref false + +let debug = ref false + +let print_emacs = ref false +let print_emacs_safechar = ref false + +let term_quality = ref false + +let xml_export = ref false + +let dont_load_proofs = ref false + +let raw_print = ref false + +let unicode_syntax = ref false + +(* Translate *) +let translate = ref false +let make_translate f = translate := f +let do_translate () = !translate +let translate_file = ref false + +(* True only when interning from pp*new.ml *) +let translate_syntax = ref false + +(* Silent / Verbose *) +let silent = ref false +let make_silent flag = silent := flag; () +let is_silent () = !silent +let is_verbose () = not !silent + +let silently f x = + let oldsilent = !silent in + try + silent := true; + let rslt = f x in + silent := oldsilent; + rslt + with e -> begin + silent := oldsilent; raise e + end + +let if_silent f x = if !silent then f x +let if_verbose f x = if not !silent then f x + +let hash_cons_proofs = ref true + +let warn = ref true +let make_warn flag = warn := flag; () +let if_warn f x = if !warn then f x + +(* The number of printed hypothesis in a goal *) + +let print_hyps_limit = ref (None : int option) +let set_print_hyps_limit n = print_hyps_limit := n +let print_hyps_limit () = !print_hyps_limit + +(* A list of the areas of the system where "unsafe" operation + * has been requested *) + +let unsafe_set = ref Stringset.empty +let add_unsafe s = unsafe_set := Stringset.add s !unsafe_set +let is_unsafe s = Stringset.mem s !unsafe_set + +(* Dump of globalization (to be used by coqdoc) *) + +let dump = ref false +let dump_file = ref "" +let dump_into_file f = dump := true; dump_file := f + +let dump_buffer = Buffer.create 8192 + +let dump_string = Buffer.add_string dump_buffer + +let dump_it () = + if !dump then begin + let mode = [Open_wronly; Open_append; Open_creat] in + let c = open_out_gen mode 0o666 !dump_file in + output_string c (Buffer.contents dump_buffer); + close_out c + end + +let _ = at_exit dump_it + +(* Flags.for the virtual machine *) + +let boxed_definitions = ref true +let set_boxed_definitions b = boxed_definitions := b +let boxed_definitions _ = !boxed_definitions + +(* Flags.for external tools *) + +let subst_command_placeholder s t = + let buff = Buffer.create (String.length s + String.length t) in + let i = ref 0 in + while (!i < String.length s) do + if s.[!i] = '%' & !i+1 < String.length s & s.[!i+1] = 's' + then (Buffer.add_string buff t;incr i) + else Buffer.add_char buff s.[!i]; + incr i + done; + Buffer.contents buff + +let browser_cmd_fmt = + try + let coq_netscape_remote_var = "COQREMOTEBROWSER" in + Sys.getenv coq_netscape_remote_var + with + Not_found -> + if Sys.os_type = "Win32" + then "C:\\PROGRA~1\\INTERN~1\\IEXPLORE %s" + else "firefox -remote \"OpenURL(%s,new-tab)\" || firefox %s &" diff --git a/lib/flags.mli b/lib/flags.mli new file mode 100644 index 00000000..1fcae990 --- /dev/null +++ b/lib/flags.mli @@ -0,0 +1,77 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* unit +val do_translate : unit -> bool +val translate_file : bool ref +val translate_syntax : bool ref + +val make_silent : bool -> unit +val is_silent : unit -> bool +val is_verbose : unit -> bool +val silently : ('a -> 'b) -> 'a -> 'b +val if_silent : ('a -> unit) -> 'a -> unit +val if_verbose : ('a -> unit) -> 'a -> unit + +val make_warn : bool -> unit +val if_warn : ('a -> unit) -> 'a -> unit + +val hash_cons_proofs : bool ref + +(* Temporary activate an option ('c must be an atomic type) *) +val with_option : bool ref -> ('a -> 'b) -> 'a -> 'b + +(* If [None], no limit *) +val set_print_hyps_limit : int option -> unit +val print_hyps_limit : unit -> int option + +val add_unsafe : string -> unit +val is_unsafe : string -> bool + +(* Dump of globalization (to be used by coqdoc) *) + +val dump : bool ref +val dump_into_file : string -> unit +val dump_string : string -> unit + +(* Options for the virtual machine *) + +val set_boxed_definitions : bool -> unit +val boxed_definitions : unit -> bool + +(* Options for external tools *) + +(* Returns string format for default browser to use from Coq or CoqIDE *) +val browser_cmd_fmt : string + +(* Substitute %s in the first chain by the second chain *) +val subst_command_placeholder : string -> string -> string diff --git a/lib/gmap.ml b/lib/gmap.ml index 884305d9..7a4cb56e 100644 --- a/lib/gmap.ml +++ b/lib/gmap.ml @@ -5,7 +5,7 @@ (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: gmap.ml 7925 2006-01-24 23:20:39Z herbelin $ *) +(* $Id: gmap.ml 10250 2007-10-23 15:02:23Z aspiwack $ *) (* Maps using the generic comparison function of ocaml. Code borrowed from the ocaml standard library (Copyright 1996, INRIA). *) @@ -16,6 +16,8 @@ let empty = Empty + let is_empty = function Empty -> true | _ -> false + let height = function Empty -> 0 | Node(_,_,_,_,h) -> h diff --git a/lib/gmap.mli b/lib/gmap.mli index 79958fab..5186cff4 100644 --- a/lib/gmap.mli +++ b/lib/gmap.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: gmap.mli 5920 2004-07-16 20:01:26Z herbelin $ i*) +(*i $Id: gmap.mli 10250 2007-10-23 15:02:23Z aspiwack $ i*) (* Maps using the generic comparison function of ocaml. Same interface as the module [Map] from the ocaml standard library. *) @@ -14,6 +14,7 @@ type ('a,'b) t val empty : ('a,'b) t +val is_empty : ('a,'b) t -> bool val add : 'a -> 'b -> ('a,'b) t -> ('a,'b) t val find : 'a -> ('a,'b) t -> 'b val remove : 'a -> ('a,'b) t -> ('a,'b) t diff --git a/lib/gset.mli b/lib/gset.mli index 0f14368f..5c794381 100644 --- a/lib/gset.mli +++ b/lib/gset.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: gset.mli 5920 2004-07-16 20:01:26Z herbelin $ i*) +(*i $Id: gset.mli 10840 2008-04-23 21:29:34Z herbelin $ i*) (* Sets using the generic comparison function of ocaml. Same interface as the module [Set] from the ocaml standard library. *) @@ -26,7 +26,7 @@ val compare : 'a t -> 'a t -> int val equal : 'a t -> 'a t -> bool val subset : 'a t -> 'a t -> bool val iter : ('a -> unit) -> 'a t -> unit -val fold : ('a -> 'a -> 'a) -> 'a t -> 'a -> 'a +val fold : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b val cardinal : 'a t -> int val elements : 'a t -> 'a list val min_elt : 'a t -> 'a diff --git a/lib/option.ml b/lib/option.ml new file mode 100644 index 00000000..34749b8c --- /dev/null +++ b/lib/option.ml @@ -0,0 +1,165 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* false + | _ -> true + +exception IsNone + +(** [get x] returns [y] where [x] is [Some y]. It raises IsNone + if [x] equals [None]. *) +let get = function + | Some y -> y + | _ -> raise IsNone + +(** [make x] returns [Some x]. *) +let make x = Some x + +(** [init b x] returns [Some x] if [b] is [true] and [None] otherwise. *) +let init b x = + if b then + Some x + else + None + + +(** [flatten x] is [Some y] if [x] is [Some (Some y)] and [None] otherwise. *) +let flatten = function + | Some (Some y) -> Some y + | _ -> None + + +(** {6 "Iterators"} ***) + +(** [iter f x] executes [f y] if [x] equals [Some y]. It does nothing + otherwise. *) +let iter f = function + | Some y -> f y + | _ -> () + + +exception Heterogeneous + +(** [iter2 f x y] executes [f z w] if [x] equals [Some z] and [y] equals + [Some w]. It does nothing if both [x] and [y] are [None]. And raises + [Heterogeneous] otherwise. *) +let iter2 f x y = + match x,y with + | Some z, Some w -> f z w + | None,None -> () + | _,_ -> raise Heterogeneous + +(** [map f x] is [None] if [x] is [None] and [Some (f y)] if [x] is [Some y]. *) +let map f = function + | Some y -> Some (f y) + | _ -> None + +(** [smartmap f x] does the same as [map f x] except that it tries to share + some memory. *) +let smartmap f = function + | Some y as x -> let y' = f y in if y' == y then x else Some y' + | _ -> None + +(** [fold_left f a x] is [f a y] if [x] is [Some y], and [a] otherwise. *) +let fold_left f a = function + | Some y -> f a y + | _ -> a + +(** [fold_left2 f a x y] is [f z w] if [x] is [Some z] and [y] is [Some w]. + It is [a] if both [x] and [y] are [None]. Otherwise it raises + [Heterogeneous]. *) +let fold_left2 f a x y = + match x,y with + | Some x, Some y -> f a x y + | None, None -> a + | _ -> raise Heterogeneous + +(** [fold_right f x a] is [f y a] if [x] is [Some y], and [a] otherwise. *) +let fold_right f x a = + match x with + | Some y -> f y a + | _ -> a + + +(** {6 More Specific operations} ***) + +(** [default a x] is [y] if [x] is [Some y] and [a] otherwise. *) +let default a = function + | Some y -> y + | _ -> a + +(** [lift f x] is the same as [map f x]. *) +let lift = map + +(** [lift_right f a x] is [Some (f a y)] if [x] is [Some y], and + [None] otherwise. *) +let lift_right f a = function + | Some y -> Some (f a y) + | _ -> None + +(** [lift_left f x a] is [Some (f y a)] if [x] is [Some y], and + [None] otherwise. *) +let lift_left f x a = + match x with + | Some y -> Some (f y a) + | _ -> None + +(** [lift2 f x y] is [Some (f z w)] if [x] equals [Some z] and [y] equals + [Some w]. It is [None] otherwise. *) +let lift2 f x y = + match x,y with + | Some z, Some w -> Some (f z w) + | _,_ -> None + + + +(** {6 Operations with Lists} *) + +module List = + struct + (** [List.cons x l] equals [y::l] if [x] is [Some y] and [l] otherwise. *) + let cons x l = + match x with + | Some y -> y::l + | _ -> l + + (** [List.flatten l] is the list of all the [y]s such that [l] contains + [Some y] (in the same order). *) + let rec flatten = function + | x::l -> cons x (flatten l) + | [] -> [] +end + + + +(** {6 Miscelaneous Primitives} *) + +module Misc = + struct + (** [Misc.compare f x y] lifts the equality predicate [f] to + option types. That is, if both [x] and [y] are [None] then + it returns [true], if they are bothe [Some _] then + [f] is called. Otherwise it returns [false]. *) + let compare f x y = + match x,y with + | None, None -> true + | Some z, Some w -> f z w + | _,_ -> false +end diff --git a/lib/option.mli b/lib/option.mli new file mode 100644 index 00000000..d9c18d88 --- /dev/null +++ b/lib/option.mli @@ -0,0 +1,112 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* bool + +exception IsNone + +(** [get x] returns [y] where [x] is [Some y]. It raises IsNone + if [x] equals [None]. *) +val get : 'a option -> 'a + +(** [make x] returns [Some x]. *) +val make : 'a -> 'a option + +(** [init b x] returns [Some x] if [b] is [true] and [None] otherwise. *) +val init : bool -> 'a -> 'a option + +(** [flatten x] is [Some y] if [x] is [Some (Some y)] and [None] otherwise. *) +val flatten : 'a option option -> 'a option + + +(** {6 "Iterators"} ***) + +(** [iter f x] executes [f y] if [x] equals [Some y]. It does nothing + otherwise. *) +val iter : ('a -> unit) -> 'a option -> unit + +exception Heterogeneous + +(** [iter2 f x y] executes [f z w] if [x] equals [Some z] and [y] equals + [Some w]. It does nothing if both [x] and [y] are [None]. And raises + [Heterogeneous] otherwise. *) +val iter2 : ('a -> 'b -> unit) -> 'a option -> 'b option -> unit + +(** [map f x] is [None] if [x] is [None] and [Some (f y)] if [x] is [Some y]. *) +val map : ('a -> 'b) -> 'a option -> 'b option + +(** [smartmap f x] does the same as [map f x] except that it tries to share + some memory. *) +val smartmap : ('a -> 'a) -> 'a option -> 'a option + +(** [fold_left f a x] is [f a y] if [x] is [Some y], and [a] otherwise. *) +val fold_left : ('b -> 'a -> 'b) -> 'b -> 'a option -> 'b + +(** [fold_left2 f a x y] is [f z w] if [x] is [Some z] and [y] is [Some w]. + It is [a] if both [x] and [y] are [None]. Otherwise it raises + [Heterogeneous]. *) +val fold_left2 : ('a -> 'b -> 'c -> 'a) -> 'a -> 'b option -> 'c option -> 'a + +(** [fold_right f x a] is [f y a] if [x] is [Some y], and [a] otherwise. *) +val fold_right : ('a -> 'b -> 'b) -> 'a option -> 'b -> 'b + + +(** {6 More Specific Operations} ***) + +(** [default a x] is [y] if [x] is [Some y] and [a] otherwise. *) +val default : 'a -> 'a option -> 'a + +(** [lift] is the same as {!map}. *) +val lift : ('a -> 'b) -> 'a option -> 'b option + +(** [lift_right f a x] is [Some (f a y)] if [x] is [Some y], and + [None] otherwise. *) +val lift_right : ('a -> 'b -> 'c) -> 'a -> 'b option -> 'c option + +(** [lift_left f x a] is [Some (f y a)] if [x] is [Some y], and + [None] otherwise. *) +val lift_left : ('a -> 'b -> 'c) -> 'a option -> 'b -> 'c option + +(** [lift2 f x y] is [Some (f z w)] if [x] equals [Some z] and [y] equals + [Some w]. It is [None] otherwise. *) +val lift2 : ('a -> 'b -> 'c) -> 'a option -> 'b option -> 'c option + + +(** {6 Operations with Lists} *) + +module List : sig + (** [List.cons x l] equals [y::l] if [x] is [Some y] and [l] otherwise. *) + val cons : 'a option -> 'a list -> 'a list + + (** [List.flatten l] is the list of all the [y]s such that [l] contains + [Some y] (in the same order). *) + val flatten : 'a option list -> 'a list +end + + +(** {6 Miscelaneous Primitives} *) + +module Misc : sig + (** [Misc.compare f x y] lifts the equality predicate [f] to + option types. That is, if both [x] and [y] are [None] then + it returns [true], if they are bothe [Some _] then + [f] is called. Otherwise it returns [false]. *) + val compare : ('a -> 'a -> bool) -> 'a option -> 'a option -> bool +end + diff --git a/lib/options.ml b/lib/options.ml deleted file mode 100644 index 53a7e9cf..00000000 --- a/lib/options.ml +++ /dev/null @@ -1,124 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* o := old; raise e - -let boot = ref false - -let batch_mode = ref false - -let debug = ref false - -let print_emacs = ref false -let print_emacs_safechar = ref false - -let term_quality = ref false - -let xml_export = ref false - -let dont_load_proofs = ref false - -let raw_print = ref false - -(* Translate *) -let translate = ref false -let make_translate f = translate := f -let do_translate () = !translate -let translate_file = ref false - -(* True only when interning from pp*new.ml *) -let translate_syntax = ref false - -(* Silent / Verbose *) -let silent = ref false -let make_silent flag = silent := flag; () -let is_silent () = !silent -let is_verbose () = not !silent - -let silently f x = - let oldsilent = !silent in - try - silent := true; - let rslt = f x in - silent := oldsilent; - rslt - with e -> begin - silent := oldsilent; raise e - end - -let if_silent f x = if !silent then f x -let if_verbose f x = if not !silent then f x - -let hash_cons_proofs = ref true - -(* The number of printed hypothesis in a goal *) - -let print_hyps_limit = ref (None : int option) -let set_print_hyps_limit n = print_hyps_limit := n -let print_hyps_limit () = !print_hyps_limit - -(* A list of the areas of the system where "unsafe" operation - * has been requested *) - -let unsafe_set = ref Stringset.empty -let add_unsafe s = unsafe_set := Stringset.add s !unsafe_set -let is_unsafe s = Stringset.mem s !unsafe_set - -(* Dump of globalization (to be used by coqdoc) *) - -let dump = ref false -let dump_file = ref "" -let dump_into_file f = dump := true; dump_file := f - -let dump_buffer = Buffer.create 8192 - -let dump_string = Buffer.add_string dump_buffer - -let dump_it () = - if !dump then begin - let mode = [Open_wronly; Open_append; Open_creat] in - let c = open_out_gen mode 0o666 !dump_file in - output_string c (Buffer.contents dump_buffer); - close_out c - end - -let _ = at_exit dump_it - -(* Options for the virtual machine *) - -let boxed_definitions = ref true -let set_boxed_definitions b = boxed_definitions := b -let boxed_definitions _ = !boxed_definitions - -(* Options for external tools *) - -let browser_cmd_fmt = - try - let coq_netscape_remote_var = "COQREMOTEBROWSER" in - let coq_netscape_remote = Sys.getenv coq_netscape_remote_var in - let i = Util.string_index_from coq_netscape_remote 0 "%s" in - let pre = String.sub coq_netscape_remote 0 i in - let post = String.sub coq_netscape_remote (i + 2) - (String.length coq_netscape_remote - (i + 2)) in - if Util.string_string_contains ~where:post ~what:"%s" then - error ("The environment variable \"" ^ - coq_netscape_remote_var ^ - "\" must contain exactly one placeholder \"%s\".") - else pre,post - with - Not_found -> - if Sys.os_type = "Win32" - then "C:\\PROGRA~1\\INTERN~1\\IEXPLORE ", "" - else "firefox -remote \"OpenURL(", ")\"" diff --git a/lib/options.mli b/lib/options.mli deleted file mode 100644 index 30d585fb..00000000 --- a/lib/options.mli +++ /dev/null @@ -1,71 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* unit -val do_translate : unit -> bool -val translate_file : bool ref -val translate_syntax : bool ref - -val make_silent : bool -> unit -val is_silent : unit -> bool -val is_verbose : unit -> bool -val silently : ('a -> 'b) -> 'a -> 'b -val if_silent : ('a -> unit) -> 'a -> unit -val if_verbose : ('a -> unit) -> 'a -> unit - -val hash_cons_proofs : bool ref - -(* Temporary activate an option ('c must be an atomic type) *) -val with_option : bool ref -> ('a -> 'b) -> 'a -> 'b - -(* If [None], no limit *) -val set_print_hyps_limit : int option -> unit -val print_hyps_limit : unit -> int option - -val add_unsafe : string -> unit -val is_unsafe : string -> bool - -(* Dump of globalization (to be used by coqdoc) *) - -val dump : bool ref -val dump_into_file : string -> unit -val dump_string : string -> unit - -(* Options for the virtual machine *) - -val set_boxed_definitions : bool -> unit -val boxed_definitions : unit -> bool - -(* Options for external tools *) - -(* Returns head and tail of printf string format *) -(* ocaml doesn't allow not applied formats *) -val browser_cmd_fmt : string * string - diff --git a/lib/pp.ml4 b/lib/pp.ml4 index 88efc5f2..616302ac 100644 --- a/lib/pp.ml4 +++ b/lib/pp.ml4 @@ -6,17 +6,18 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: pp.ml4 8747 2006-04-27 16:00:49Z courtieu $ *) +(* $Id: pp.ml4 10803 2008-04-16 09:30:05Z cek $ *) open Pp_control (* This should not be used outside of this file. Use - Options.print_emacs instead. This one is updated when reading + Flags.print_emacs instead. This one is updated when reading command line options. This was the only way to make [Pp] depend on - an option without creating a circularity: [Options] -> [Util] -> - [Pp] -> [Options] *) + an option without creating a circularity: [Flags. -> [Util] -> + [Pp] -> [Flags. *) let print_emacs = ref false let make_pp_emacs() = print_emacs:=true +let make_pp_nonemacs() = print_emacs:=false (* The different kinds of blocks are: \begin{description} @@ -129,19 +130,17 @@ let align () = [< 'Ppcmd_print_break (0,0) >] let int n = str (string_of_int n) let real r = str (string_of_float r) let bool b = str (string_of_bool b) - -(* In new syntax only double quote char is escaped by repeating it *) -let rec escape_string s = - let rec escape_at s i = - if i<0 then s - else if s.[i] == '"' then - let s' = String.sub s 0 i^"\""^String.sub s i (String.length s - i) in - escape_at s' (i-1) - else escape_at s (i-1) in - escape_at s (String.length s - 1) - -let qstring s = str ("\""^escape_string s^"\"") -let qs = qstring +let strbrk s = + let rec aux p n = + if n < String.length s then + if s.[n] = ' ' then + if p=n then [< spc (); aux (n+1) (n+1) >] + else [< str (String.sub s p (n-p)); spc (); aux (n+1) (n+1) >] + else aux p (n+1) + else if p=n then [< >] else [< str (String.sub s p (n-p)) >] + in aux 0 0 + +let ismt s = try let _ = Stream.empty s in true with Stream.Failure -> false (* boxing commands *) let h n s = [< 'Ppcmd_box(Pp_hbox n,s) >] @@ -161,6 +160,41 @@ let tclose () = [< 'Ppcmd_close_tbox >] let (++) = Stream.iapp +(* In new syntax only double quote char is escaped by repeating it *) +let rec escape_string s = + let rec escape_at s i = + if i<0 then s + else if s.[i] == '"' then + let s' = String.sub s 0 i^"\""^String.sub s i (String.length s - i) in + escape_at s' (i-1) + else escape_at s (i-1) in + escape_at s (String.length s - 1) + +let qstring s = str ("\""^escape_string s^"\"") +let qs = qstring +let quote s = h 0 (str "\"" ++ s ++ str "\"") + +let rec xmlescape ppcmd = + let rec escape what withwhat (len, str) = + try + let pos = String.index str what in + let (tlen, tail) = + escape what withwhat ((len - pos - 1), + (String.sub str (pos + 1) (len - pos - 1))) + in + (pos + tlen + String.length withwhat, String.sub str 0 pos ^ withwhat ^ tail) + with Not_found -> (len, str) + in + match ppcmd with + | Ppcmd_print (len, str) -> + Ppcmd_print (escape '"' """ + (escape '<' "<" (escape '&' "&" (len, str)))) + (* In XML we always print whole content so we can npeek the whole stream *) + | Ppcmd_box (x, str) -> Ppcmd_box (x, Stream.of_list + (List.map xmlescape (Stream.npeek max_int str))) + | x -> x + + (* This flag tells if the last printed comment ends with a newline, to avoid empty lines *) let com_eol = ref false @@ -242,7 +276,7 @@ let pp_dirs ft = (* pretty print on stdout and stderr *) let pp_std_dirs = pp_dirs !std_ft -let pp_err_dirs = pp_dirs err_ft +let pp_err_dirs = pp_dirs !err_ft let ppcmds x = Ppdir_ppcmds x @@ -251,11 +285,13 @@ let emacs_warning_start_string = String.make 1 (Char.chr 254) let emacs_warning_end_string = String.make 1 (Char.chr 255) let warnstart() = - if not !print_emacs then str "" else str emacs_warning_start_string + if not !print_emacs then mt() else str emacs_warning_start_string let warnend() = - if not !print_emacs then str "" else str emacs_warning_end_string - + if not !print_emacs then mt() else str emacs_warning_end_string + +let warnbody strm = + [< warnstart() ; hov 0 (str "Warning: " ++ strm) ; warnend() >] (* pretty printing functions WITHOUT FLUSH *) let pp_with ft strm = @@ -264,15 +300,17 @@ let pp_with ft strm = let ppnl_with ft strm = pp_dirs ft [< 'Ppdir_ppcmds [< strm ; 'Ppcmd_force_newline >] >] -let warning_with ft string = - ppnl_with ft [< warnstart() ; str "Warning: " ; str string ; warnend() >] +let default_warn_with ft strm = ppnl_with ft (warnbody strm) + +let pp_warn_with = ref default_warn_with -let warn_with ft pps = - ppnl_with ft [< warnstart() ; str "Warning: " ; pps ; warnend() >] +let set_warning_function pp_warn = pp_warn_with := pp_warn -let pp_flush_with ft = - Format.pp_print_flush ft +let warn_with ft strm = !pp_warn_with ft strm +let warning_with ft string = warn_with ft (str string) + +let pp_flush_with ft = Format.pp_print_flush ft (* pretty printing functions WITH FLUSH *) let msg_with ft strm = @@ -281,25 +319,23 @@ let msg_with ft strm = let msgnl_with ft strm = pp_dirs ft [< 'Ppdir_ppcmds strm ; 'Ppdir_print_newline >] -let msg_warning_with ft strm= - pp_dirs ft [< 'Ppdir_ppcmds [< warnstart() ; str "Warning: "; strm ; warnend() >]; - 'Ppdir_print_newline >] - +let msg_warning_with ft strm = + msgnl_with ft (warnbody strm) (* pretty printing functions WITHOUT FLUSH *) -let pp x = pp_with !std_ft x +let pp x = pp_with !std_ft x let ppnl x = ppnl_with !std_ft x -let pperr = pp_with err_ft -let pperrnl = ppnl_with err_ft -let message s = ppnl (str s) -let warning x = warning_with err_ft x -let warn x = warn_with err_ft x +let pperr x = pp_with !err_ft x +let pperrnl x = ppnl_with !err_ft x +let message s = ppnl (str s) +let warning x = warning_with !err_ft x +let warn x = warn_with !err_ft x let pp_flush x = Format.pp_print_flush !std_ft x let flush_all() = flush stderr; flush stdout; pp_flush() (* pretty printing functions WITH FLUSH *) let msg x = msg_with !std_ft x let msgnl x = msgnl_with !std_ft x -let msgerr = msg_with err_ft -let msgerrnl = msgnl_with err_ft -let msg_warning x = msg_warning_with err_ft x +let msgerr x = msg_with !err_ft x +let msgerrnl x = msgnl_with !err_ft x +let msg_warning x = msg_warning_with !err_ft x diff --git a/lib/pp.mli b/lib/pp.mli index e240fd2d..85b8345d 100644 --- a/lib/pp.mli +++ b/lib/pp.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: pp.mli 8748 2006-04-27 16:01:26Z courtieu $ i*) +(*i $Id: pp.mli 10803 2008-04-16 09:30:05Z cek $ i*) (*i*) open Pp_control @@ -16,6 +16,7 @@ open Pp_control chars inserted at some places). This function should called once in module [Options], that's all. *) val make_pp_emacs:unit -> unit +val make_pp_nonemacs:unit -> unit (* Pretty-printers. *) @@ -34,6 +35,7 @@ val fnl : unit -> std_ppcmds val pifb : unit -> std_ppcmds val ws : int -> std_ppcmds val mt : unit -> std_ppcmds +val ismt : std_ppcmds -> bool val comment : int -> std_ppcmds val comments : ((int * int) * string) list ref @@ -52,6 +54,10 @@ val real : float -> std_ppcmds val bool : bool -> std_ppcmds val qstring : string -> std_ppcmds val qs : string -> std_ppcmds +val quote : std_ppcmds -> std_ppcmds +val strbrk : string -> std_ppcmds + +val xmlescape : ppcmd -> ppcmd (*s Boxing commands. *) @@ -79,6 +85,8 @@ val warning_with : Format.formatter -> string -> unit val warn_with : Format.formatter -> std_ppcmds -> unit val pp_flush_with : Format.formatter -> unit -> unit +val set_warning_function : (Format.formatter -> std_ppcmds -> unit) -> unit + (*s Pretty-printing functions \emph{with flush}. *) val msg_with : Format.formatter -> std_ppcmds -> unit diff --git a/lib/pp_control.ml b/lib/pp_control.ml index 7632d736..7aa05975 100644 --- a/lib/pp_control.ml +++ b/lib/pp_control.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: pp_control.ml 5920 2004-07-16 20:01:26Z herbelin $ *) +(* $Id: pp_control.ml 10917 2008-05-10 16:35:46Z herbelin $ *) (* Parameters of pretty-printing *) @@ -89,10 +89,11 @@ let with_output_to ch = let std_ft = ref Format.std_formatter let _ = set_dflt_gp !std_ft -let err_ft = with_output_to stderr +let err_ft = ref Format.err_formatter +let _ = set_gp !err_ft deep_gp -let deep_ft = with_output_to stdout -let _ = set_gp deep_ft deep_gp +let deep_ft = ref (with_output_to stdout) +let _ = set_gp !deep_ft deep_gp (* For parametrization through vernacular *) let default = Format.pp_get_max_boxes !std_ft () diff --git a/lib/pp_control.mli b/lib/pp_control.mli index 7e25e561..f245d942 100644 --- a/lib/pp_control.mli +++ b/lib/pp_control.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: pp_control.mli 5920 2004-07-16 20:01:26Z herbelin $ i*) +(*i $Id: pp_control.mli 10917 2008-05-10 16:35:46Z herbelin $ i*) (* Parameters of pretty-printing. *) @@ -37,8 +37,8 @@ val with_fp : 'a pp_formatter_params -> Format.formatter val with_output_to : out_channel -> Format.formatter val std_ft : Format.formatter ref -val err_ft : Format.formatter -val deep_ft : Format.formatter +val err_ft : Format.formatter ref +val deep_ft : Format.formatter ref (*s For parametrization through vernacular. *) diff --git a/lib/rtree.ml b/lib/rtree.ml index ab689be1..4742a90d 100644 --- a/lib/rtree.ml +++ b/lib/rtree.ml @@ -6,11 +6,15 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: rtree.ml 8648 2006-03-18 15:37:14Z herbelin $ i*) +(*i $Id: rtree.ml 10690 2008-03-18 13:30:04Z barras $ i*) + +open Util (* Type of regular trees: - Param denotes tree variables (like de Bruijn indices) + the first int is the depth of the occurrence, and the second int + is the index in the array of trees introduced at that depth - Node denotes the usual tree node, labelled with 'a - Rec(j,v1..vn) introduces infinite tree. It denotes v(j+1) with parameters 0..n-1 replaced by @@ -19,55 +23,87 @@ current Rec node (as usual in de Bruijn binding system) *) type 'a t = - Param of int + Param of int * int | Node of 'a * 'a t array | Rec of int * 'a t array (* Building trees *) -let mk_param i = Param i +let mk_rec_calls i = Array.init i (fun j -> Param(0,j)) let mk_node lab sons = Node (lab, sons) -(* Given a vector of n bodies, builds the n mutual recursive trees. - Recursive calls are made with parameters 0 to n-1. We check - the bodies actually build something by checking it is not - directly one of the parameters 0 to n-1. *) -let mk_rec defs = - Array.mapi - (fun i d -> - (match d with - Param k when k < Array.length defs -> failwith "invalid rec call" - | _ -> ()); - Rec(i,defs)) - defs - (* The usual lift operation *) let rec lift_rtree_rec depth n = function - Param i -> if i < depth then Param i else Param (i+n) + Param (i,j) as t -> if i < depth then t else Param (i+n,j) | Node (l,sons) -> Node (l,Array.map (lift_rtree_rec depth n) sons) | Rec(j,defs) -> - Rec(j, Array.map (lift_rtree_rec (depth+Array.length defs) n) defs) + Rec(j, Array.map (lift_rtree_rec (depth+1) n) defs) let lift n t = if n=0 then t else lift_rtree_rec 0 n t (* The usual subst operation *) let rec subst_rtree_rec depth sub = function - Param i -> - if i < depth then Param i - else if i-depth < Array.length sub then lift depth sub.(i-depth) - else Param (i-Array.length sub) + Param (i,j) as t -> + if i < depth then t + else if i-depth < Array.length sub then + lift depth sub.(i-depth).(j) + else Param (i-Array.length sub,j) | Node (l,sons) -> Node (l,Array.map (subst_rtree_rec depth sub) sons) | Rec(j,defs) -> - Rec(j, Array.map (subst_rtree_rec (depth+Array.length defs) sub) defs) + Rec(j, Array.map (subst_rtree_rec (depth+1) sub) defs) + +let subst_rtree sub t = subst_rtree_rec 0 [|sub|] t + +(* To avoid looping, we must check that every body introduces a node + or a parameter *) +let rec expand = function + | Rec(j,defs) -> + let sub = Array.init (Array.length defs) (fun i -> Rec(i,defs)) in + expand (subst_rtree sub defs.(j)) + | t -> t + +(* Given a vector of n bodies, builds the n mutual recursive trees. + Recursive calls are made with parameters (0,0) to (0,n-1). We check + the bodies actually build something by checking it is not + directly one of the parameters of depth 0. Some care is taken to + accept definitions like rec X=Y and Y=f(X,Y) *) +let mk_rec defs = + let rec check histo d = + match expand d with + Param(0,j) when List.mem j histo -> failwith "invalid rec call" + | Param(0,j) -> check (j::histo) defs.(j) + | _ -> () in + Array.mapi (fun i d -> check [i] d; Rec(i,defs)) defs +(* +let v(i,j) = lift i (mk_rec_calls(j+1)).(j);; +let r = (mk_rec[|(mk_rec[|v(1,0)|]).(0)|]).(0);; +let r = mk_rec[|v(0,1);v(1,0)|];; +the last one should be accepted +*) + +(* Tree destructors, expanding loops when necessary *) +let dest_param t = + match expand t with + Param (i,j) -> (i,j) + | _ -> failwith "Rtree.dest_param" + +let dest_node t = + match expand t with + Node (l,sons) -> (l,sons) + | _ -> failwith "Rtree.dest_node" + +let is_node t = + match expand t with + Node _ -> true + | _ -> false -let subst_rtree sub t = subst_rtree_rec 0 sub t let rec map f t = match t with - Param i -> Param i + Param(i,j) -> Param(i,j) | Node (a,sons) -> Node (f a, Array.map (map f) sons) | Rec(j,defs) -> Rec (j, Array.map (map f) defs) let rec smartmap f t = match t with - Param i -> t + Param _ -> t | Node (a,sons) -> let a'=f a and sons' = Util.array_smartmap (map f) sons in if a'==a && sons'==sons then @@ -81,43 +117,61 @@ let rec smartmap f t = match t with else Rec(j,defs') -(* To avoid looping, we must check that every body introduces a node - or a parameter *) -let rec expand_rtree = function - | Rec(j,defs) -> - let sub = Array.init (Array.length defs) (fun i -> Rec(i,defs)) in - expand_rtree (subst_rtree sub defs.(j)) - | t -> t - -(* Tree destructors, expanding loops when necessary *) -let dest_param t = - match expand_rtree t with - Param i -> i - | _ -> failwith "dest_param" - -let dest_node t = - match expand_rtree t with - Node (l,sons) -> (l,sons) - | _ -> failwith "dest_node" - -(* Tests if a given tree is infinite or not. It proceeds *) -let rec is_infinite = function - Param i -> i = (-1) - | Node(_,sons) -> Util.array_exists is_infinite sons - | Rec(j,defs) -> - let newdefs = - Array.mapi (fun i def -> if i=j then Param (-1) else def) defs in - let sub = - Array.init (Array.length defs) - (fun i -> if i=j then Param (-1) else Rec(i,newdefs)) in - is_infinite (subst_rtree sub defs.(j)) +(* Fixpoint operator on trees: + f is the body of the fixpoint. Arguments passed to f are: + - a boolean telling if the subtree has already been seen + - the current subtree + - a function to make recursive calls on subtrees + *) +let fold f t = + let rec fold histo t = + let seen = List.mem t histo in + let nhisto = if not seen then t::histo else histo in + f seen (expand t) (fold nhisto) in + fold [] t + + +(* Tests if a given tree is infinite, i.e. has an branch of infinte length. *) +let is_infinite t = fold + (fun seen t is_inf -> + seen || + (match t with + Node(_,v) -> array_exists is_inf v + | Param _ -> false + | _ -> assert false)) + t + +let fold2 f t x = + let rec fold histo t x = + let seen = List.mem (t,x) histo in + let nhisto = if not seen then (t,x)::histo else histo in + f seen (expand t) x (fold nhisto) in + fold [] t x + +let compare_rtree f = fold2 + (fun seen t1 t2 cmp -> + seen || + let b = f t1 t2 in + if b < 0 then false + else if b > 0 then true + else match expand t1, expand t2 with + Node(_,v1), Node(_,v2) when Array.length v1 = Array.length v2 -> + array_for_all2 cmp v1 v2 + | _ -> false) + +let eq_rtree cmp t1 t2 = + t1 == t2 || t1=t2 || + compare_rtree + (fun t1 t2 -> + if cmp (fst(dest_node t1)) (fst(dest_node t2)) then 0 + else (-1)) t1 t2 (* Pretty-print a tree (not so pretty) *) open Pp let rec pp_tree prl t = match t with - Param k -> str"#"++int k + Param (i,j) -> str"#"++int i++str","++int j | Node(lab,[||]) -> hov 2 (str"("++prl lab++str")") | Node(lab,v) -> hov 2 (str"("++prl lab++str","++brk(1,0)++ diff --git a/lib/rtree.mli b/lib/rtree.mli index 7be96652..b61e6965 100644 --- a/lib/rtree.mli +++ b/lib/rtree.mli @@ -6,35 +6,74 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: rtree.mli 7493 2005-11-02 22:12:16Z mohring $ i*) +(*i $Id: rtree.mli 10690 2008-03-18 13:30:04Z barras $ i*) (* Type of regular tree with nodes labelled by values of type 'a *) - +(* The implementation uses de Bruijn indices, so binding capture + is avoided by the lift operator (see example below) *) type 'a t (* Building trees *) -(* build a recursive call *) -val mk_param : int -> 'a t + (* build a node given a label and the vector of sons *) val mk_node : 'a -> 'a t array -> 'a t -(* build mutually dependent trees *) + +(* Build mutually recursive trees: + X_1 = f_1(X_1,..,X_n) ... X_n = f_n(X_1,..,X_n) + is obtained by the following pseudo-code + let vx = mk_rec_calls n in + let [|x_1;..;x_n|] = + mk_rec[|f_1(vx.(0),..,vx.(n-1);..;f_n(vx.(0),..,vx.(n-1))|] + + First example: build rec X = a(X,Y) and Y = b(X,Y,Y) + let [|vx;vy|] = mk_rec_calls 2 in + let [|x;y|] = mk_rec [|mk_node a [|vx;vy|]; mk_node b [|vx;vy;vy|]|] + + Another example: nested recursive trees rec Y = b(rec X = a(X,Y),Y,Y) + let [|vy|] = mk_rec_calls 1 in + let [|vx|] = mk_rec_calls 1 in + let [|x|] = mk_rec[|mk_node a [|vx;lift 1 vy|] + let [|y|] = mk_rec[|mk_node b [|x;vy;vy|]|] + (note the lift to avoid + *) +val mk_rec_calls : int -> 'a t array val mk_rec : 'a t array -> 'a t array (* [lift k t] increases of [k] the free parameters of [t]. Needed to avoid captures when a tree appears under [mk_rec] *) val lift : int -> 'a t -> 'a t -val map : ('a -> 'b) -> 'a t -> 'b t - -(* [(smartmap f t) == t] if [(f a) ==a ] for all nodes *) -val smartmap : ('a -> 'a) -> 'a t -> 'a t - +val is_node : 'a t -> bool (* Destructors (recursive calls are expanded) *) -val dest_param : 'a t -> int val dest_node : 'a t -> 'a * 'a t array +(* dest_param is not needed for closed trees (i.e. with no free variable) *) +val dest_param : 'a t -> int * int (* Tells if a tree has an infinite branch *) val is_infinite : 'a t -> bool +(* [compare_rtree f t1 t2] compares t1 t2 (top-down). + f is called on each node: if the result is negative then the + traversal ends on false, it is is positive then deeper nodes are + not examined, and the traversal continues on respective siblings, + and if it is 0, then the traversal continues on sons, pairwise. + In this latter case, if the nodes do not have the same number of + sons, then the traversal ends on false. + In case of loop, the traversal is successful and it resumes on + siblings. + *) +val compare_rtree : ('a t -> 'b t -> int) -> 'a t -> 'b t -> bool + +val eq_rtree : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool + +(* Iterators *) + +val map : ('a -> 'b) -> 'a t -> 'b t +(* [(smartmap f t) == t] if [(f a) ==a ] for all nodes *) +val smartmap : ('a -> 'a) -> 'a t -> 'a t +val fold : (bool -> 'a t -> ('a t -> 'b) -> 'b) -> 'a t -> 'b +val fold2 : + (bool -> 'a t -> 'b -> ('a t -> 'b -> 'c) -> 'c) -> 'a t -> 'b -> 'c + (* A rather simple minded pretty-printer *) val pp_tree : ('a -> Pp.std_ppcmds) -> 'a t -> Pp.std_ppcmds diff --git a/lib/system.ml b/lib/system.ml index c92e87f1..aa71ddfa 100644 --- a/lib/system.ml +++ b/lib/system.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: system.ml 9397 2006-11-21 21:50:54Z herbelin $ *) +(* $Id: system.ml 10437 2008-01-11 14:50:44Z bertot $ *) open Pp open Util @@ -98,15 +98,31 @@ let all_subdirs ~unix_path:root = List.rev !l let where_in_path path filename = - let rec search = function + let rec search acc = function | lpe :: rem -> let f = Filename.concat lpe filename in - if Sys.file_exists f then (lpe,f) else search rem - | [] -> - raise Not_found + if Sys.file_exists f + then (search ((lpe,f)::acc) rem) + else search acc rem + | [] -> acc in + let rec check_and_warn cont acc l = + match l with + | [] -> if cont then assert false else raise Not_found + | [ (lpe, f) ] -> + if cont then begin + warning (acc ^ (string_of_physical_path lpe) ^ " ]"); + warning ("Loading " ^ f) + end; + (lpe, f) + | (lpe, f) :: l' -> + if cont then + check_and_warn true (acc ^ (string_of_physical_path lpe) ^ "; ") l' + else + check_and_warn true + (filename ^ " has been found in [ " ^ (string_of_physical_path lpe) ^ "; ") l' in - search path - + check_and_warn false "" (search [] path) + let find_file_in_path paths filename = if not (Filename.is_implicit filename) then let root = Filename.dirname filename in @@ -199,7 +215,7 @@ let connect writefun readfun com = let pid = let ch_to' = Unix.descr_of_in_channel ch_to_in in let ch_from' = Unix.descr_of_out_channel ch_from_out in - try Unix.create_process com [||] ch_to' ch_from' Unix.stdout + try Unix.create_process com [|com|] ch_to' ch_from' Unix.stdout with Unix.Unix_error (err,_,_) -> close_in ch_to_in; close_in ch_from_in; close_out ch_from_out; unlink tmp_from; unlink tmp_to; diff --git a/lib/system.mli b/lib/system.mli index a58308a8..6d535464 100644 --- a/lib/system.mli +++ b/lib/system.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: system.mli 9397 2006-11-21 21:50:54Z herbelin $ i*) +(*i $Id: system.mli 9398 2006-11-21 21:51:18Z herbelin $ i*) (*s Files and load paths. Load path entries remember the original root given by the user. For efficiency, we keep the full path (field diff --git a/lib/util.ml b/lib/util.ml index 16d73430..9fa92f94 100644 --- a/lib/util.ml +++ b/lib/util.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (***********************************************************************) -(* $Id: util.ml 10185 2007-10-06 18:05:13Z herbelin $ *) +(* $Id: util.ml 11083 2008-06-09 22:08:14Z herbelin $ *) open Pp @@ -26,19 +26,27 @@ type loc = Compat.loc let dummy_loc = Compat.dummy_loc let unloc = Compat.unloc let make_loc = Compat.make_loc +let join_loc = Compat.join_loc (* raising located exceptions *) type 'a located = loc * 'a let anomaly_loc (loc,s,strm) = Stdpp.raise_with_loc loc (Anomaly (s,strm)) let user_err_loc (loc,s,strm) = Stdpp.raise_with_loc loc (UserError (s,strm)) let invalid_arg_loc (loc,s) = Stdpp.raise_with_loc loc (Invalid_argument s) -let join_loc = Compat.join_loc + +let located_fold_left f x (_,a) = f x a +let located_iter2 f (_,a) (_,b) = f a b (* Like Exc_located, but specifies the outermost file read, the filename associated to the location of the error, and the error itself. *) exception Error_in_file of string * (bool * string * loc) * exn +(* Mapping under pairs *) + +let on_fst f (a,b) = (f a,b) +let on_snd f (a,b) = (a,f b) + (* Projections from triplets *) let pi1 (a,_,_) = a @@ -47,15 +55,8 @@ let pi3 (_,_,a) = a (* Characters *) -let is_letter c = - (c >= 'a' && c <= 'z') or - (c >= 'A' && c <= 'Z') or - (c >= '\248' && c <= '\255') or - (c >= '\192' && c <= '\214') or - (c >= '\216' && c <= '\246') - +let is_letter c = (c >= 'a' && c <= 'z') or (c >= 'A' && c <= 'Z') let is_digit c = (c >= '0' && c <= '9') - let is_ident_tail c = is_letter c or is_digit c or c = '\'' or c = '_' @@ -99,6 +100,10 @@ let string_string_contains ~where ~what = let plural n s = if n>1 then s^"s" else s +let ordinal n = + let s = match n mod 10 with 1 -> "st" | 2 -> "nd" | 3 -> "rd" | _ -> "th" in + string_of_int n ^ s + (* string parsing *) let parse_loadpath s = @@ -119,9 +124,329 @@ module Stringset = Set.Make(struct type t = string let compare = compare end) module Stringmap = Map.Make(struct type t = string let compare = compare end) -(* Lists *) +type utf8_status = UnicodeLetter | UnicodeIdentPart | UnicodeSymbol + +exception UnsupportedUtf8 + +let classify_unicode unicode = + match unicode land 0x1F000 with + | 0x0 -> + begin match unicode with + (* utf-8 Basic Latin underscore *) + | x when x = 0x005F -> UnicodeLetter + (* utf-8 Basic Latin letters *) + | x when 0x0041 <= x & x <= 0x005A -> UnicodeLetter + | x when 0x0061 <= x & x <= 0x007A -> UnicodeLetter + (* utf-8 Basic Latin digits and quote *) + | x when 0x0030 <= x & x <= 0x0039 or x = 0x0027 -> UnicodeIdentPart + (* utf-8 Basic Latin symbols *) + | x when x <= 0x007F -> UnicodeSymbol + (* utf-8 Latin-1 non breaking space U00A0 *) + | 0x00A0 -> UnicodeLetter + (* utf-8 Latin-1 symbols U00A1-00BF *) + | x when 0x00A0 <= x & x <= 0x00BF -> UnicodeSymbol + (* utf-8 Latin-1 letters U00C0-00D6 *) + | x when 0x00C0 <= x & x <= 0x00D6 -> UnicodeLetter + (* utf-8 Latin-1 symbol U00D7 *) + | 0x00D7 -> UnicodeSymbol + (* utf-8 Latin-1 letters U00D8-00F6 *) + | x when 0x00D8 <= x & x <= 0x00F6 -> UnicodeLetter + (* utf-8 Latin-1 symbol U00F7 *) + | 0x00F7 -> UnicodeSymbol + (* utf-8 Latin-1 letters U00F8-00FF *) + | x when 0x00F8 <= x & x <= 0x00FF -> UnicodeLetter + (* utf-8 Latin Extended A U0100-017F and Latin Extended B U0180-U0241 *) + | x when 0x0100 <= x & x <= 0x0241 -> UnicodeLetter + (* utf-8 Phonetic letters U0250-02AF *) + | x when 0x0250 <= x & x <= 0x02AF -> UnicodeLetter + (* utf-8 what do to with diacritics U0300-U036F ? *) + (* utf-8 Greek letters U0380-03FF *) + | x when 0x0380 <= x & x <= 0x03FF -> UnicodeLetter + (* utf-8 Cyrillic letters U0400-0481 *) + | x when 0x0400 <= x & x <= 0x0481 -> UnicodeLetter + (* utf-8 Cyrillic symbol U0482 *) + | 0x0482 -> UnicodeSymbol + (* utf-8 what do to with diacritics U0483-U0489 \ U0487 ? *) + (* utf-8 Cyrillic letters U048A-U4F9 (Warning: 04CF) *) + | x when 0x048A <= x & x <= 0x04F9 -> UnicodeLetter + (* utf-8 Cyrillic supplement letters U0500-U050F *) + | x when 0x0500 <= x & x <= 0x050F -> UnicodeLetter + (* utf-8 Hebrew letters U05D0-05EA *) + | x when 0x05D0 <= x & x <= 0x05EA -> UnicodeLetter + (* utf-8 Arabic letters U0621-064A *) + | x when 0x0621 <= x & x <= 0x064A -> UnicodeLetter + (* utf-8 Arabic supplement letters U0750-076D *) + | x when 0x0750 <= x & x <= 0x076D -> UnicodeLetter + | _ -> raise UnsupportedUtf8 + end + | 0x1000 -> + begin match unicode with + (* utf-8 Georgian U10A0-10FF (has holes) *) + | x when 0x10A0 <= x & x <= 0x10FF -> UnicodeLetter + (* utf-8 Hangul Jamo U1100-11FF (has holes) *) + | x when 0x1100 <= x & x <= 0x11FF -> UnicodeLetter + (* utf-8 Latin additional letters U1E00-1E9B and U1EA0-1EF9 *) + | x when 0x1E00 <= x & x <= 0x1E9B -> UnicodeLetter + | x when 0x1EA0 <= x & x <= 0x1EF9 -> UnicodeLetter + | _ -> raise UnsupportedUtf8 + end + | 0x2000 -> + begin match unicode with + (* utf-8 general punctuation U2080-2089 *) + (* Hyphens *) + | x when 0x2010 <= x & x <= 0x2011 -> UnicodeLetter + (* Dashes and other symbols *) + | x when 0x2012 <= x & x <= 0x2027 -> UnicodeSymbol + (* Per mille and per ten thousand signs *) + | x when 0x2030 <= x & x <= 0x2031 -> UnicodeSymbol + (* Prime letters *) + | x when 0x2032 <= x & x <= 0x2034 or x = 0x2057 -> UnicodeIdentPart + (* Miscellaneous punctuation *) + | x when 0x2039 <= x & x <= 0x2056 -> UnicodeSymbol + | x when 0x2058 <= x & x <= 0x205E -> UnicodeSymbol + (* Invisible mathematical operators *) + | x when 0x2061 <= x & x <= 0x2063 -> UnicodeSymbol + (* utf-8 superscript U2070-207C *) + | x when 0x2070 <= x & x <= 0x207C -> UnicodeSymbol + (* utf-8 subscript U2080-2089 *) + | x when 0x2080 <= x & x <= 0x2089 -> UnicodeIdentPart + (* utf-8 letter-like U2100-214F *) + | x when 0x2100 <= x & x <= 0x214F -> UnicodeLetter + (* utf-8 number-forms U2153-2183 *) + | x when 0x2153 <= x & x <= 0x2183 -> UnicodeSymbol + (* utf-8 arrows A U2190-21FF *) + (* utf-8 mathematical operators U2200-22FF *) + (* utf-8 miscellaneous technical U2300-23FF *) + | x when 0x2190 <= x & x <= 0x23FF -> UnicodeSymbol + (* utf-8 box drawing U2500-257F has ceiling, etc. *) + (* utf-8 block elements U2580-259F *) + (* utf-8 geom. shapes U25A0-25FF (has triangles, losange, etc) *) + (* utf-8 miscellaneous symbols U2600-26FF *) + | x when 0x2500 <= x & x <= 0x26FF -> UnicodeSymbol + (* utf-8 arrows B U2900-297F *) + | x when 0x2900 <= x & x <= 0x297F -> UnicodeSymbol + (* utf-8 mathematical operators U2A00-2AFF *) + | x when 0x2A00 <= x & x <= 0x2AFF -> UnicodeSymbol + (* utf-8 bold symbols U2768-U2775 *) + | x when 0x2768 <= x & x <= 0x2775 -> UnicodeSymbol + (* utf-8 arrows and brackets U27E0-U27FF *) + | x when 0x27E0 <= x & x <= 0x27FF -> UnicodeSymbol + (* utf-8 brackets, braces and parentheses *) + | x when 0x2980 <= x & x <= 0x299F -> UnicodeSymbol + (* utf-8 miscellaneous including double-plus U29F0-U29FF *) + | x when 0x29F0 <= x & x <= 0x29FF -> UnicodeSymbol + | _ -> raise UnsupportedUtf8 + end + | _ -> + begin match unicode with + (* utf-8 Hiragana U3040-309F and Katakana U30A0-30FF *) + | x when 0x3040 <= x & x <= 0x30FF -> UnicodeLetter + (* utf-8 Unified CJK Ideographs U4E00-9FA5 *) + | x when 0x4E00 <= x & x <= 0x9FA5 -> UnicodeLetter + (* utf-8 Hangul syllables UAC00-D7AF *) + | x when 0xAC00 <= x & x <= 0xD7AF -> UnicodeLetter + (* utf-8 Gothic U10330-1034A *) + | x when 0x10330 <= x & x <= 0x1034A -> UnicodeLetter + (* utf-8 Math Alphanumeric Symbols U1D400-1D7FF (letters) (has holes) *) + | x when 0x1D400 <= x & x <= 0x1D7CB -> UnicodeLetter + (* utf-8 Math Alphanumeric Symbols U1D400-1D7FF (digits) *) + | x when 0x1D7CE <= x & x <= 0x1D7FF -> UnicodeIdentPart + | _ -> raise UnsupportedUtf8 + end -let list_add_set x l = if List.mem x l then l else x::l +exception End_of_input + +let utf8_of_unicode n = + if n < 128 then + String.make 1 (Char.chr n) + else if n < 2048 then + let s = String.make 2 (Char.chr (128 + n mod 64)) in + begin + s.[0] <- Char.chr (192 + n / 64); + s + end + else if n < 65536 then + let s = String.make 3 (Char.chr (128 + n mod 64)) in + begin + s.[1] <- Char.chr (128 + (n / 64) mod 64); + s.[0] <- Char.chr (224 + n / 4096); + s + end + else + let s = String.make 4 (Char.chr (128 + n mod 64)) in + begin + s.[2] <- Char.chr (128 + (n / 64) mod 64); + s.[1] <- Char.chr (128 + (n / 4096) mod 64); + s.[0] <- Char.chr (240 + n / 262144); + s + end + +let next_utf8 s i = + let err () = invalid_arg "utf8" in + let l = String.length s - i in + if l = 0 then raise End_of_input + else let a = Char.code s.[i] in if a <= 0x7F then + 1, a + else if a land 0x40 = 0 or l = 1 then err () + else let b = Char.code s.[i+1] in if b land 0xC0 <> 0x80 then err () + else if a land 0x20 = 0 then + 2, (a land 0x1F) lsl 6 + (b land 0x3F) + else if l = 2 then err () + else let c = Char.code s.[i+2] in if c land 0xC0 <> 0x80 then err () + else if a land 0x10 = 0 then + 3, (a land 0x0F) lsl 12 + (b land 0x3F) lsl 6 + (c land 0x3F) + else if l = 3 then err () + else let d = Char.code s.[i+3] in if d land 0xC0 <> 0x80 then err () + else if a land 0x08 = 0 then + 4, (a land 0x07) lsl 18 + (b land 0x3F) lsl 12 + + (c land 0x3F) lsl 6 + (d land 0x3F) + else err () + +(* Check the well-formedness of an identifier *) + +let check_ident s = + let i = ref 0 in + if s <> ".." then try + let j, n = next_utf8 s 0 in + match classify_unicode n with + | UnicodeLetter -> + i := !i + j; + begin try + while true do + let j, n = next_utf8 s !i in + match classify_unicode n with + | UnicodeLetter | UnicodeIdentPart -> i := !i + j + | _ -> error + ("invalid character "^(String.sub s !i j)^" in identifier "^s) + done + with End_of_input -> () end + | _ -> error (s^": an identifier should start with a letter") + with + | End_of_input -> error "The empty string is not an identifier" + | UnsupportedUtf8 -> error (s^": unsupported character in utf8 sequence") + | Invalid_argument _ -> error (s^": invalid utf8 sequence") + +let lowercase_unicode s unicode = + match unicode land 0x1F000 with + | 0x0 -> + begin match unicode with + (* utf-8 Basic Latin underscore *) + | x when x = 0x005F -> x + (* utf-8 Basic Latin letters *) + | x when 0x0041 <= x & x <= 0x005A -> x + 32 + | x when 0x0061 <= x & x <= 0x007A -> x + (* utf-8 Latin-1 non breaking space U00A0 *) + | 0x00A0 as x -> x + (* utf-8 Latin-1 letters U00C0-00D6 *) + | x when 0x00C0 <= x & x <= 0x00D6 -> x + 32 + (* utf-8 Latin-1 letters U00D8-00F6 *) + | x when 0x00D8 <= x & x <= 0x00DE -> x + 32 + | x when 0x00E0 <= x & x <= 0x00F6 -> x + (* utf-8 Latin-1 letters U00F8-00FF *) + | x when 0x00F8 <= x & x <= 0x00FF -> x + (* utf-8 Latin Extended A U0100-017F and Latin Extended B U0180-U0241 *) + | x when 0x0100 <= x & x <= 0x017F -> + if x mod 2 = 1 then x else x + 1 + | x when 0x0180 <= x & x <= 0x0241 -> + warning ("Unable to decide which lowercase letter to map to "^s); x + (* utf-8 Phonetic letters U0250-02AF *) + | x when 0x0250 <= x & x <= 0x02AF -> x + (* utf-8 what do to with diacritics U0300-U036F ? *) + (* utf-8 Greek letters U0380-03FF *) + | x when 0x0380 <= x & x <= 0x0385 -> x + | 0x0386 -> 0x03AC + | x when 0x0388 <= x & x <= 0x038A -> x + 37 + | 0x038C -> 0x03CC + | x when 0x038E <= x & x <= 0x038F -> x + 63 + | x when 0x0390 <= x & x <= 0x03AB & x <> 0x03A2 -> x + 32 + (* utf-8 Greek lowercase letters U03B0-03CE *) + | x when 0x03AC <= x & x <= 0x03CE -> x + | x when 0x03CF <= x & x <= 0x03FF -> + warning ("Unable to decide which lowercase letter to map to "^s); x + (* utf-8 Cyrillic letters U0400-0481 *) + | x when 0x0400 <= x & x <= 0x040F -> x + 80 + | x when 0x0410 <= x & x <= 0x042F -> x + 32 + | x when 0x0430 <= x & x <= 0x045F -> x + | x when 0x0460 <= x & x <= 0x0481 -> + if x mod 2 = 1 then x else x + 1 + (* utf-8 Cyrillic letters U048A-U4F9 (Warning: 04CF) *) + | x when 0x048A <= x & x <= 0x04F9 & x <> 0x04CF -> + if x mod 2 = 1 then x else x + 1 + (* utf-8 Cyrillic supplement letters U0500-U050F *) + | x when 0x0500 <= x & x <= 0x050F -> + if x mod 2 = 1 then x else x + 1 + (* utf-8 Hebrew letters U05D0-05EA *) + | x when 0x05D0 <= x & x <= 0x05EA -> x + (* utf-8 Arabic letters U0621-064A *) + | x when 0x0621 <= x & x <= 0x064A -> x + (* utf-8 Arabic supplement letters U0750-076D *) + | x when 0x0750 <= x & x <= 0x076D -> x + | _ -> raise UnsupportedUtf8 + end + | 0x1000 -> + begin match unicode with + (* utf-8 Georgian U10A0-10FF (has holes) *) + | x when 0x10A0 <= x & x <= 0x10FF -> x + (* utf-8 Hangul Jamo U1100-11FF (has holes) *) + | x when 0x1100 <= x & x <= 0x11FF -> x + (* utf-8 Latin additional letters U1E00-1E9B and U1EA0-1EF9 *) + | x when 0x1E00 <= x & x <= 0x1E95 -> + if x mod 2 = 1 then x else x + 1 + | x when 0x1E96 <= x & x <= 0x1E9B -> x + | x when 0x1EA0 <= x & x <= 0x1EF9 -> + if x mod 2 = 1 then x else x + 1 + | _ -> raise UnsupportedUtf8 + end + | 0x2000 -> + begin match unicode with + (* utf-8 general punctuation U2080-2089 *) + (* Hyphens *) + | x when 0x2010 <= x & x <= 0x2011 -> x + (* utf-8 letter-like U2100-214F *) + | 0x2102 (* double-struck C *) -> Char.code 'x' + | 0x2115 (* double-struck N *) -> Char.code 'n' + | 0x2119 (* double-struck P *) -> Char.code 'x' + | 0x211A (* double-struck Q *) -> Char.code 'x' + | 0x211D (* double-struck R *) -> Char.code 'r' + | 0x2124 (* double-struck Z *) -> Char.code 'x' + | x when 0x2100 <= x & x <= 0x214F -> + warning ("Unable to decide which lowercase letter to map to "^s); x + | _ -> raise UnsupportedUtf8 + end + | _ -> + begin match unicode with + (* utf-8 Hiragana U3040-309F and Katakana U30A0-30FF *) + | x when 0x3040 <= x & x <= 0x30FF -> x + (* utf-8 Unified CJK Ideographs U4E00-9FA5 *) + | x when 0x4E00 <= x & x <= 0x9FA5 -> x + (* utf-8 Hangul syllables UAC00-D7AF *) + | x when 0xAC00 <= x & x <= 0xD7AF -> x + (* utf-8 Gothic U10330-1034A *) + | x when 0x10330 <= x & x <= 0x1034A -> x + (* utf-8 Math Alphanumeric Symbols U1D400-1D7FF (letters) (has holes) *) + | x when 0x1D6A8 <= x & x <= 0x1D7C9 -> + let a = (x - 0x1D6A8) mod 58 in + if a <= 16 or (18 <= a & a <= 24) + then x + 26 (* all but nabla and theta symbol *) + else x + | x when 0x1D538 <= x & x <= 0x1D56B -> + (* Use ordinary lowercase in both small and capital double-struck *) + (x - 0x1D538) mod 26 + Char.code 'a' + | x when 0x1D468 <= x & x <= 0x1D6A3 -> (* General case *) + if (x - 0x1D400 / 26) mod 2 = 0 then x + 26 else x + | x when 0x1D400 <= x & x <= 0x1D7CB -> (* fallback *) + x + (* utf-8 Math Alphanumeric Symbols U1D400-1D7FF (digits) *) + | x when 0x1D7CE <= x & x <= 0x1D7FF -> x + | _ -> raise UnsupportedUtf8 + end + +let lowercase_first_char_utf8 s = + assert (s <> ""); + let j, n = next_utf8 s 0 in + utf8_of_unicode (lowercase_unicode (String.sub s 0 j) n) + +(* Lists *) let list_intersect l1 l2 = List.filter (fun x -> List.mem x l2) l1 @@ -160,6 +485,11 @@ let list_tabulate f len = in tabrec 0 +let rec list_make n v = + if n = 0 then [] + else if n < 0 then invalid_arg "list_make" + else v::list_make (n-1) v + let list_assign l n e = let rec assrec stk = function | ((h::t), 0) -> List.rev_append stk (e::t) @@ -205,6 +535,14 @@ let list_map3 f l1 l2 l3 = in map (l1,l2,l3) +let list_map4 f l1 l2 l3 l4 = + let rec map = function + | ([], [], [], []) -> [] + | ((h1::t1), (h2::t2), (h3::t3), (h4::t4)) -> let v = f h1 h2 h3 h4 in v::map (t1,t2,t3,t4) + | (_, _, _, _) -> invalid_arg "map4" + in + map (l1,l2,l3,l4) + let list_index x = let rec index_x n = function | y::l -> if x = y then n else index_x (succ n) l @@ -212,6 +550,8 @@ let list_index x = in index_x 1 +let list_index0 x l = list_index x l - 1 + let list_unique_index x = let rec index_x n = function | y::l -> @@ -222,6 +562,13 @@ let list_unique_index x = | [] -> raise Not_found in index_x 1 +let list_fold_right_i f i l = + let rec it_list_f i l a = match l with + | [] -> a + | b::l -> f (i-1) b (it_list_f (i-1) l a) + in + it_list_f (List.length l + i) l + let list_fold_left_i f = let rec it_list_f i a = function | [] -> a @@ -247,6 +594,14 @@ let rec list_fold_right_and_left f l hd = | a::l -> let hd = aux (a::tl) l in f hd a tl in aux [] l +let list_iter3 f l1 l2 l3 = + let rec iter = function + | ([], [], []) -> () + | ((h1::t1), (h2::t2), (h3::t3)) -> f h1 h2 h3; iter (t1,t2,t3) + | (_, _, _) -> invalid_arg "map3" + in + iter (l1,l2,l3) + let list_iter_i f l = list_fold_left_i (fun i _ x -> f i x) 0 () l let list_for_all_i p = @@ -265,6 +620,8 @@ let rec list_remove_first a = function | b::l -> b::list_remove_first a l | [] -> raise Not_found +let list_add_set x l = if List.mem x l then l else x::l + let list_eq_set l1 l2 = let rec aux l1 = function | [] -> l1 = [] @@ -300,14 +657,46 @@ let list_try_find f = try_find_f let list_uniquize l = + let visited = Hashtbl.create 23 in let rec aux acc = function - | [] -> List.rev acc - | h::t -> if List.mem h acc then aux acc t else aux (h::acc) t + | h::t -> if Hashtbl.mem visited h then aux acc t else + begin + Hashtbl.add visited h h; + aux (h::acc) t + end + | [] -> List.rev acc in aux [] l -let rec list_distinct = function - | h::t -> (not (List.mem h t)) && list_distinct t - | _ -> true +let rec list_distinct l = + let visited = Hashtbl.create 23 in + let rec loop = function + | h::t -> + if Hashtbl.mem visited h then false + else + begin + Hashtbl.add visited h h; + loop t + end + | [] -> true + in loop l + +let rec list_merge_uniq cmp l1 l2 = + match l1, l2 with + | [], l2 -> l2 + | l1, [] -> l1 + | h1 :: t1, h2 :: t2 -> + let c = cmp h1 h2 in + if c = 0 + then h1 :: list_merge_uniq cmp t1 t2 + else if c <= 0 + then h1 :: list_merge_uniq cmp t1 l2 + else h2 :: list_merge_uniq cmp l1 t2 + +let rec list_duplicates = function + | [] -> [] + | x::l -> + let l' = list_duplicates l in + if List.mem x l then list_add_set x l' else l' let rec list_filter2 f = function | [], [] as p -> p @@ -316,6 +705,12 @@ let rec list_filter2 f = function if f d l then d::dp', l::lp' else p | _ -> invalid_arg "list_filter2" +let rec list_map_filter f = function + | [] -> [] + | x::l -> + let l' = list_map_filter f l in + match f x with None -> l' | Some y -> y::l' + let list_subset l1 l2 = let t2 = Hashtbl.create 151 in List.iter (fun x -> Hashtbl.add t2 x ()) l2; @@ -338,6 +733,14 @@ let rec list_split3 = function | (x,y,z)::l -> let (rx, ry, rz) = list_split3 l in (x::rx, y::ry, z::rz) +let rec list_insert_in_class f a = function + | [] -> [[a]] + | (b::_ as l)::classes when f a b -> (a::l)::classes + | l::classes -> l :: list_insert_in_class f a classes + +let list_partition_by f l = + List.fold_right (list_insert_in_class f) l [] + let list_firstn n l = let rec aux acc = function | (0, l) -> List.rev acc @@ -363,6 +766,9 @@ let rec list_skipn n l = match n,l with | _, [] -> failwith "list_fromn" | n, _::l -> list_skipn (pred n) l +let rec list_addn n x l = + if n = 0 then l else x :: (list_addn (pred n) x l) + let list_prefix_of prefl l = let rec prefrec = function | (h1::t1, h2::t2) -> h1 = h2 && prefrec (t1,t2) @@ -384,6 +790,7 @@ let list_drop_prefix p l = | None -> l let list_map_append f l = List.flatten (List.map f l) +let list_join_map = list_map_append (* Alias *) let list_map_append2 f l1 l2 = List.flatten (List.map2 f l1 l2) @@ -394,8 +801,6 @@ let list_share_tails l1 l2 = in shr_rev [] (List.rev l1, List.rev l2) -let list_join_map f l = List.flatten (List.map f l) - let rec list_fold_map f e = function | [] -> (e,[]) | h::t -> @@ -419,6 +824,35 @@ let list_fold_map' f l e = let list_map_assoc f = List.map (fun (x,a) -> (x,f a)) +(* Specification: + - =p= is set equality (double inclusion) + - f such that \forall l acc, (f l acc) =p= append (f l []) acc + - let g = fun x -> f x [] in + - union_map f l acc =p= append (flatten (map g l)) acc + *) +let list_union_map f l acc = + List.fold_left + (fun x y -> f y x) + acc + l + +(* A generic cartesian product: for any operator (**), + [list_cartesian (**) [x1;x2] [y1;y2] = [x1**y1; x1**y2; x2**y1; x2**y1]], + and so on if there are more elements in the lists. *) + +let rec list_cartesian op l1 l2 = + list_map_append (fun x -> List.map (op x) l2) l1 + +(* [list_cartesians] is an n-ary cartesian product: it iterates + [list_cartesian] over a list of lists. *) + +let list_cartesians op init ll = + List.fold_right (list_cartesian op) ll [init] + +(* list_combinations [[a;b];[c;d]] gives [[a;c];[a;d];[b;c];[b;d]] *) + +let list_combinations l = list_cartesians (fun x l -> x::l) [] l + (* Arrays *) let array_exists f v = @@ -645,6 +1079,11 @@ let array_map_left_pair f a g b = r, s end +let array_iter2 f v1 v2 = + let n = Array.length v1 in + if Array.length v2 <> n then invalid_arg "array_iter2" + else for i = 0 to n - 1 do f v1.(i) v2.(i) done + let pure_functional = false let array_fold_map' f v e = @@ -659,6 +1098,11 @@ else let v' = Array.map (fun x -> let (y,e) = f x !e' in e' := e; y) v in (v',!e') +let array_fold_map f e v = + let e' = ref e in + let v' = Array.map (fun x -> let (e,y) = f !e' x in e' := e; y) v in + (!e',v') + let array_fold_map2' f v1 v2 e = let e' = ref e in let v' = @@ -677,6 +1121,12 @@ let array_distinct v = with Exit -> false +let array_union_map f a acc = + Array.fold_left + (fun x y -> f y x) + acc + a + (* Matrices *) let matrix_transpose mat = @@ -723,44 +1173,6 @@ let interval n m = in interval_n ([],m) -let in_some x = Some x - -let out_some = function - | Some x -> x - | None -> failwith "out_some" - -let option_map f = function - | None -> None - | Some x -> Some (f x) - -let option_cons a l = match a with - | Some x -> x::l - | None -> l - -let option_fold_left2 f e a b = match (a,b) with - | Some x, Some y -> f e x y - | _ -> e - -let option_fold_left f e a = match a with - | Some x -> f e x - | _ -> e - -let option_fold_right f a e = match a with - | Some x -> f x e - | _ -> e - -let option_compare f a b = match (a,b) with - | None, None -> true - | Some a', Some b' -> f a' b' - | _ -> failwith "option_compare" - -let option_iter f = function - | None -> () - | Some x -> f x - -let option_smartmap f a = match a with - | None -> a - | Some x -> let x' = f x in if x'==x then a else Some x' let map_succeed f = let rec map_f = function @@ -780,15 +1192,21 @@ let pr_semicolon () = str ";" ++ spc () let pr_bar () = str "|" ++ spc () let pr_arg pr x = spc () ++ pr x let pr_opt pr = function None -> mt () | Some x -> pr_arg pr x +let pr_opt_no_spc pr = function None -> mt () | Some x -> pr x -let pr_ord n = - let suff = match n mod 10 with 1 -> "st" | 2 -> "nd" | _ -> "th" in - int n ++ str suff +let nth n = str (ordinal n) let rec prlist elem l = match l with | [] -> mt () | h::t -> Stream.lapp (fun () -> elem h) (prlist elem t) +(* unlike all other functions below, [prlist] works lazily. + if a strict behavior is needed, use [prlist_strict] instead. *) + +let rec prlist_strict elem l = match l with + | [] -> mt () + | h::t -> (elem h)++(prlist_strict elem t) + let rec prlist_with_sep sep elem l = match l with | [] -> mt () | [h] -> elem h @@ -821,6 +1239,8 @@ let prvect_with_sep sep elem v = let n = Array.length v in if n = 0 then mt () else pr (n - 1) +let prvect elem v = prvect_with_sep mt elem v + let surround p = hov 1 (str"(" ++ p ++ str")") (*s Size of ocaml values. *) diff --git a/lib/util.mli b/lib/util.mli index cc44a677..7807bbbd 100644 --- a/lib/util.mli +++ b/lib/util.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (***********************************************************************) -(*i $Id: util.mli 9766 2007-04-13 13:26:28Z herbelin $ i*) +(*i $Id: util.mli 11083 2008-06-09 22:08:14Z herbelin $ i*) (*i*) open Pp @@ -43,6 +43,8 @@ val anomaly_loc : loc * string * std_ppcmds -> 'a val user_err_loc : loc * string * std_ppcmds -> 'a val invalid_arg_loc : loc * string -> 'a val join_loc : loc -> loc -> loc +val located_fold_left : ('a -> 'b -> 'a) -> 'a -> 'b located -> 'a +val located_iter2 : ('a -> 'b -> unit) -> 'a located -> 'b located -> unit (* Like [Exc_located], but specifies the outermost file read, the input buffer associated to the location of the error (or the module name @@ -50,6 +52,11 @@ val join_loc : loc -> loc -> loc exception Error_in_file of string * (bool * string * loc) * exn +(* Mapping under pairs *) + +val on_fst : ('a -> 'b) -> 'a * 'c -> 'b * 'c +val on_snd : ('a -> 'b) -> 'c * 'a -> 'c * 'b + (*s Projections from triplets *) val pi1 : 'a * 'b * 'c -> 'a @@ -69,12 +76,21 @@ val implode : string list -> string val string_index_from : string -> int -> string -> int val string_string_contains : where:string -> what:string -> bool val plural : int -> string -> string +val ordinal : int -> string val parse_loadpath : string -> string list module Stringset : Set.S with type elt = string module Stringmap : Map.S with type key = string +type utf8_status = UnicodeLetter | UnicodeIdentPart | UnicodeSymbol + +exception UnsupportedUtf8 + +val classify_unicode : int -> utf8_status +val check_ident : string -> unit +val lowercase_first_char_utf8 : string -> string + (*s Lists. *) val list_add_set : 'a -> 'a list -> 'a list @@ -87,10 +103,12 @@ val list_subtractq : 'a list -> 'a list -> 'a list val list_chop : int -> 'a list -> 'a list * 'a list (* [list_tabulate f n] builds [[f 0; ...; f (n-1)]] *) val list_tabulate : (int -> 'a) -> int -> 'a list +val list_make : int -> 'a -> 'a list val list_assign : 'a list -> int -> 'a -> 'a list val list_distinct : 'a list -> bool +val list_duplicates : 'a list -> 'a list val list_filter2 : ('a -> 'b -> bool) -> 'a list * 'b list -> 'a list * 'b list - +val list_map_filter : ('a -> 'b option) -> 'a list -> 'b list (* [list_smartmap f [a1...an] = List.map f [a1...an]] but if for all i [ f ai == ai], then [list_smartmap f l==l] *) val list_smartmap : ('a -> 'a) -> 'a list -> 'a list @@ -100,10 +118,17 @@ val list_map2_i : (int -> 'a -> 'b -> 'c) -> int -> 'a list -> 'b list -> 'c list val list_map3 : ('a -> 'b -> 'c -> 'd) -> 'a list -> 'b list -> 'c list -> 'd list +val list_map4 : + ('a -> 'b -> 'c -> 'd -> 'e) -> 'a list -> 'b list -> 'c list -> 'd list -> 'e list +(* [list_index] returns the 1st index of an element in a list (counting from 1) *) val list_index : 'a -> 'a list -> int (* [list_unique_index x l] returns [Not_found] if [x] doesn't occur exactly once *) val list_unique_index : 'a -> 'a list -> int +(* [list_index0] behaves as [list_index] except that it starts counting at 0 *) +val list_index0 : 'a -> 'a list -> int +val list_iter3 : ('a -> 'b -> 'c -> unit) -> 'a list -> 'b list -> 'c list -> unit val list_iter_i : (int -> 'a -> unit) -> 'a list -> unit +val list_fold_right_i : (int -> 'a -> 'b -> 'b) -> int -> 'a list -> 'b -> 'b val list_fold_left_i : (int -> 'a -> 'b -> 'a) -> int -> 'a -> 'b list -> 'a val list_fold_right_and_left : ('a -> 'b -> 'b list -> 'a) -> 'b list -> 'a -> 'a @@ -116,26 +141,41 @@ val list_sep_last : 'a list -> 'a * 'a list val list_try_find_i : (int -> 'a -> 'b) -> int -> 'a list -> 'b val list_try_find : ('a -> 'b) -> 'a list -> 'b val list_uniquize : 'a list -> 'a list +(* merges two sorted lists and preserves the uniqueness property: *) +val list_merge_uniq : ('a -> 'a -> int) -> 'a list -> 'a list -> 'a list val list_subset : 'a list -> 'a list -> bool val list_splitby : ('a -> bool) -> 'a list -> 'a list * 'a list val list_split3 : ('a * 'b * 'c) list -> 'a list * 'b list * 'c list +val list_partition_by : ('a -> 'a -> bool) -> 'a list -> 'a list list val list_firstn : int -> 'a list -> 'a list val list_last : 'a list -> 'a val list_lastn : int -> 'a list -> 'a list val list_skipn : int -> 'a list -> 'a list +val list_addn : int -> 'a -> 'a list -> 'a list val list_prefix_of : 'a list -> 'a list -> bool val list_drop_prefix : 'a list -> 'a list -> 'a list (* [map_append f [x1; ...; xn]] returns [(f x1)@(f x2)@...@(f xn)] *) val list_map_append : ('a -> 'b list) -> 'a list -> 'b list +val list_join_map : ('a -> 'b list) -> 'a list -> 'b list (* raises [Invalid_argument] if the two lists don't have the same length *) val list_map_append2 : ('a -> 'b -> 'c list) -> 'a list -> 'b list -> 'c list val list_share_tails : 'a list -> 'a list -> 'a list * 'a list * 'a list -val list_join_map : ('a -> 'b list) -> 'a list -> 'b list (* [list_fold_map f e_0 [l_1...l_n] = e_n,[k_1...k_n]] where [(e_i,k_i)=f e_{i-1} l_i] *) val list_fold_map : ('a -> 'b -> 'a * 'c) -> 'a -> 'b list -> 'a * 'c list val list_fold_map' : ('b -> 'a -> 'c * 'a) -> 'b list -> 'a -> 'c list * 'a val list_map_assoc : ('a -> 'b) -> ('c * 'a) list -> ('c * 'b) list +(* A generic cartesian product: for any operator (**), + [list_cartesian (**) [x1;x2] [y1;y2] = [x1**y1; x1**y2; x2**y1; x2**y1]], + and so on if there are more elements in the lists. *) +val list_cartesian : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list +(* [list_cartesians] is an n-ary cartesian product: it iterates + [list_cartesian] over a list of lists. *) +val list_cartesians : ('a -> 'b -> 'b) -> 'b -> 'a list list -> 'b list +(* list_combinations [[a;b];[c;d]] returns [[a;c];[a;d];[b;c];[b;d]] *) +val list_combinations : 'a list list -> 'a list list + +val list_union_map : ('a -> 'b -> 'b) -> 'a list -> 'b -> 'b (*s Arrays. *) @@ -174,10 +214,13 @@ val array_map3 : val array_map_left : ('a -> 'b) -> 'a array -> 'b array val array_map_left_pair : ('a -> 'b) -> 'a array -> ('c -> 'd) -> 'c array -> 'b array * 'd array +val array_iter2 : ('a -> 'b -> unit) -> 'a array -> 'b array -> unit val array_fold_map' : ('a -> 'c -> 'b * 'c) -> 'a array -> 'c -> 'b array * 'c +val array_fold_map : ('a -> 'b -> 'a * 'c) -> 'a -> 'b array -> 'a * 'c array val array_fold_map2' : ('a -> 'b -> 'c -> 'd * 'c) -> 'a array -> 'b array -> 'c -> 'd array * 'c val array_distinct : 'a array -> bool +val array_union_map : ('a -> 'b -> 'b) -> 'a array -> 'b -> 'b (*s Matrices *) @@ -205,17 +248,6 @@ val intmap_inv : 'a Intmap.t -> 'a -> int list val interval : int -> int -> int list -val in_some : 'a -> 'a option -val out_some : 'a option -> 'a -val option_map : ('a -> 'b) -> 'a option -> 'b option -val option_cons : 'a option -> 'a list -> 'a list -val option_fold_right : ('a -> 'b -> 'b) -> 'a option -> 'b -> 'b -val option_fold_left : ('a -> 'b -> 'a) -> 'a -> 'b option -> 'a -val option_fold_left2 : ('a -> 'b -> 'c -> 'a) -> 'a -> 'b option -> - 'c option -> 'a -val option_iter : ('a -> unit) -> 'a option -> unit -val option_compare : ('a -> 'b -> bool) -> 'a option -> 'b option -> bool -val option_smartmap : ('a -> 'a) -> 'a option -> 'a option (* In [map_succeed f l] an element [a] is removed if [f a] raises *) (* [Failure _] otherwise behaves as [List.map f l] *) @@ -231,14 +263,19 @@ val pr_str : string -> std_ppcmds val pr_coma : unit -> std_ppcmds val pr_semicolon : unit -> std_ppcmds val pr_bar : unit -> std_ppcmds -val pr_ord : int -> std_ppcmds val pr_arg : ('a -> std_ppcmds) -> 'a -> std_ppcmds val pr_opt : ('a -> std_ppcmds) -> 'a option -> std_ppcmds +val pr_opt_no_spc : ('a -> std_ppcmds) -> 'a option -> std_ppcmds +val nth : int -> std_ppcmds val prlist : ('a -> std_ppcmds) -> 'a list -> std_ppcmds -val prvecti : (int -> 'a -> std_ppcmds) -> 'a array -> std_ppcmds +(* unlike all other functions below, [prlist] works lazily. + if a strict behavior is needed, use [prlist_strict] instead. *) +val prlist_strict : ('a -> std_ppcmds) -> 'a list -> std_ppcmds val prlist_with_sep : (unit -> std_ppcmds) -> ('b -> std_ppcmds) -> 'b list -> std_ppcmds +val prvect : ('a -> std_ppcmds) -> 'a array -> std_ppcmds +val prvecti : (int -> 'a -> std_ppcmds) -> 'a array -> std_ppcmds val prvect_with_sep : (unit -> std_ppcmds) -> ('b -> std_ppcmds) -> 'b array -> std_ppcmds val pr_vertical_list : ('b -> std_ppcmds) -> 'b list -> std_ppcmds diff --git a/library/decl_kinds.ml b/library/decl_kinds.ml index af54df2f..8f2525b8 100644 --- a/library/decl_kinds.ml +++ b/library/decl_kinds.ml @@ -6,13 +6,14 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: decl_kinds.ml 7944 2006-01-29 16:01:32Z herbelin $ *) +(* $Id: decl_kinds.ml 11024 2008-05-30 12:41:39Z msozeau $ *) open Util +open Libnames (* Informal mathematical status of declarations *) -type locality_flag = (*bool (* local = true; global = false *)*) +type locality = | Local | Global @@ -38,8 +39,8 @@ type definition_object_kind = | Scheme | StructureComponent | IdentityCoercion - -type strength = locality_flag (* For compatibility *) + | Instance + | Method type assumption_object_kind = Definitional | Logical | Conjectural @@ -51,9 +52,9 @@ type assumption_object_kind = Definitional | Logical | Conjectural Logical | Hypothesis | Axiom *) -type assumption_kind = locality_flag * assumption_object_kind +type assumption_kind = locality * assumption_object_kind -type definition_kind = locality_flag * boxed_flag * definition_object_kind +type definition_kind = locality * boxed_flag * definition_object_kind (* Kinds used in proofs *) @@ -61,7 +62,7 @@ type goal_object_kind = | DefinitionBody of definition_object_kind | Proof of theorem_kind -type goal_kind = locality_flag * goal_object_kind +type goal_kind = locality * goal_object_kind (* Kinds used in library *) @@ -97,5 +98,17 @@ let string_of_definition_kind (l,boxed,d) = | Global, Example -> "Example" | Local, (CanonicalStructure|Example) -> anomaly "Unsupported local definition kind" - | _, (StructureComponent|Scheme|CoFixpoint|Fixpoint|IdentityCoercion) + | Local, Instance -> "Instance" + | Global, Instance -> "Global Instance" + | _, (StructureComponent|Scheme|CoFixpoint|Fixpoint|IdentityCoercion|Method) -> anomaly "Internal definition kind" + +(* Strength *) + +let strength_of_global = function + | VarRef _ -> Local + | IndRef _ | ConstructRef _ | ConstRef _ -> Global + +let string_of_strength = function + | Local -> "Local" + | Global -> "Global" diff --git a/library/decl_kinds.mli b/library/decl_kinds.mli new file mode 100644 index 00000000..9358c4b5 --- /dev/null +++ b/library/decl_kinds.mli @@ -0,0 +1,84 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* logical_kind +val string_of_theorem_kind : theorem_kind -> string +val string_of_definition_kind : + locality * boxed_flag * definition_object_kind -> string + +(* About locality *) + +val strength_of_global : global_reference -> locality +val string_of_strength : locality -> string diff --git a/library/declare.ml b/library/declare.ml index 02bdb1cf..07810e3c 100644 --- a/library/declare.ml +++ b/library/declare.ml @@ -6,7 +6,9 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: declare.ml 9488 2007-01-17 11:11:58Z herbelin $ *) +(* $Id: declare.ml 10840 2008-04-23 21:29:34Z herbelin $ *) + +(** This module is about the low-level declaration of logical objects *) open Pp open Util @@ -17,97 +19,58 @@ open Term open Sign open Declarations open Entries -open Inductive -open Indtypes -open Reduction -open Type_errors -open Typeops open Libobject open Lib open Impargs -open Nametab open Safe_typing +open Cooking +open Decls open Decl_kinds -(**********************************************) - -(* Strength *) - -open Nametab +(** XML output hooks *) -let strength_min (stre1,stre2) = - if stre1 = Local or stre2 = Local then Local else Global - -let string_of_strength = function - | Local -> "(local)" - | Global -> "(global)" - -(* XML output hooks *) let xml_declare_variable = ref (fun (sp:object_name) -> ()) let xml_declare_constant = ref (fun (sp:bool * constant)-> ()) let xml_declare_inductive = ref (fun (sp:bool * object_name) -> ()) -let if_xml f x = if !Options.xml_export then f x else () +let if_xml f x = if !Flags.xml_export then f x else () let set_xml_declare_variable f = xml_declare_variable := if_xml f let set_xml_declare_constant f = xml_declare_constant := if_xml f let set_xml_declare_inductive f = xml_declare_inductive := if_xml f -(* Section variables. *) +(** Declaration of section variables and local definitions *) type section_variable_entry = | SectionLocalDef of constr * types option * bool (* opacity *) - | SectionLocalAssum of types + | SectionLocalAssum of types * bool * bool (* Implicit status, Keep *) type variable_declaration = dir_path * section_variable_entry * logical_kind -type checked_section_variable = - | CheckedSectionLocalDef of constr * types * Univ.constraints * bool - | CheckedSectionLocalAssum of types * Univ.constraints - -type checked_variable_declaration = - dir_path * checked_section_variable * logical_kind - -let vartab = ref (Idmap.empty : checked_variable_declaration Idmap.t) - -let _ = Summary.declare_summary "VARIABLE" - { Summary.freeze_function = (fun () -> !vartab); - Summary.unfreeze_function = (fun ft -> vartab := ft); - Summary.init_function = (fun () -> vartab := Idmap.empty); - Summary.survive_module = false; - Summary.survive_section = false } - let cache_variable ((sp,_),o) = match o with | Inl cst -> Global.add_constraints cst | Inr (id,(p,d,mk)) -> (* Constr raisonne sur les noms courts *) - if Idmap.mem id !vartab then + if variable_exists id then errorlabstrm "cache_variable" (pr_id id ++ str " already exists"); - let vd = match d with (* Fails if not well-typed *) - | SectionLocalAssum ty -> + let impl,opaq,cst,keep = match d with (* Fails if not well-typed *) + | SectionLocalAssum (ty, impl, keep) -> let cst = Global.push_named_assum (id,ty) in - let (_,bd,ty) = Global.lookup_named id in - CheckedSectionLocalAssum (ty,cst) + impl, true, cst, (if keep then Some ty else None) | SectionLocalDef (c,t,opaq) -> let cst = Global.push_named_def (id,c,t) in - let (_,bd,ty) = Global.lookup_named id in - CheckedSectionLocalDef (out_some bd,ty,cst,opaq) in + false, opaq, cst, None in Nametab.push (Nametab.Until 1) (restrict_path 0 sp) (VarRef id); - add_section_variable id; + add_section_variable id impl keep; Dischargedhypsmap.set_discharged_hyps sp []; - vartab := Idmap.add id (p,vd,mk) !vartab - -let get_variable_constraints id = - match pi2 (Idmap.find id !vartab) with - | CheckedSectionLocalDef (c,ty,cst,opaq) -> cst - | CheckedSectionLocalAssum (ty,cst) -> cst + add_variable_data id (p,opaq,cst,mk) let discharge_variable (_,o) = match o with - | Inr (id,_) -> Some (Inl (get_variable_constraints id)) + | Inr (id,_) -> Some (Inl (variable_constraints id)) | Inl _ -> Some o -let (in_variable, out_variable) = +let (inVariable, outVariable) = declare_object { (default_object "VARIABLE") with cache_function = cache_variable; discharge_function = discharge_variable; @@ -115,25 +78,17 @@ let (in_variable, out_variable) = (* for initial declaration *) let declare_variable id obj = - let oname = add_leaf id (in_variable (Inr (id,obj))) in + let oname = add_leaf id (inVariable (Inr (id,obj))) in declare_var_implicits id; Notation.declare_ref_arguments_scope (VarRef id); + Heads.declare_head (EvalVarRef id); !xml_declare_variable oname; oname -(* Globals: constants and parameters *) +(** Declaration of constants and parameters *) type constant_declaration = constant_entry * logical_kind -let csttab = ref (Spmap.empty : logical_kind Spmap.t) - -let _ = Summary.declare_summary "CONSTANT" - { Summary.freeze_function = (fun () -> !csttab); - Summary.unfreeze_function = (fun ft -> csttab := ft); - Summary.init_function = (fun () -> csttab := Spmap.empty); - Summary.survive_module = false; - Summary.survive_section = false } - (* At load-time, the segment starting from the module name to the discharge *) (* section (if Remark or Fact) is needed to access a construction *) let load_constant i ((sp,kn),(_,_,kind)) = @@ -141,7 +96,7 @@ let load_constant i ((sp,kn),(_,_,kind)) = errorlabstrm "cache_constant" (pr_id (basename sp) ++ str " already exists"); Nametab.push (Nametab.Until i) sp (ConstRef (constant_of_kn kn)); - csttab := Spmap.add sp kind !csttab + add_constant_kind (constant_of_kn kn) kind (* Opening means making the name without its module qualification available *) let open_constant i ((sp,kn),_) = @@ -150,18 +105,14 @@ let open_constant i ((sp,kn),_) = let cache_constant ((sp,kn),(cdt,dhyps,kind)) = let id = basename sp in let _,dir,_ = repr_kn kn in - if Idmap.mem id !vartab or Nametab.exists_cci sp then + if variable_exists id or Nametab.exists_cci sp then errorlabstrm "cache_constant" (pr_id id ++ str " already exists"); let kn' = Global.add_constant dir id cdt in assert (kn' = constant_of_kn kn); Nametab.push (Nametab.Until 1) sp (ConstRef (constant_of_kn kn)); add_section_constant kn' (Global.lookup_constant kn').const_hyps; Dischargedhypsmap.set_discharged_hyps sp dhyps; - csttab := Spmap.add sp kind !csttab - -(*s Registration as global tables and rollback. *) - -open Cooking + add_constant_kind (constant_of_kn kn) kind let discharged_hyps kn sechyps = let (_,dir,_) = repr_kn kn in @@ -177,7 +128,7 @@ let discharge_constant ((sp,kn),(cdt,dhyps,kind)) = Some (GlobalRecipe recipe,(discharged_hyps kn sechyps)@dhyps,kind) (* Hack to reduce the size of .vo: we keep only what load/open needs *) -let dummy_constant_entry = ConstantEntry (ParameterEntry mkProp) +let dummy_constant_entry = ConstantEntry (ParameterEntry (mkProp,false)) let dummy_constant (ce,_,mk) = dummy_constant_entry,[],mk @@ -185,7 +136,7 @@ let export_constant cst = Some (dummy_constant cst) let classify_constant (_,cst) = Substitute (dummy_constant cst) -let (in_constant, out_constant) = +let (inConstant, outConstant) = declare_object { (default_object "CONSTANT") with cache_function = cache_constant; load_function = load_constant; @@ -196,19 +147,20 @@ let (in_constant, out_constant) = export_function = export_constant } let hcons_constant_declaration = function - | DefinitionEntry ce when !Options.hash_cons_proofs -> + | DefinitionEntry ce when !Flags.hash_cons_proofs -> let (hcons1_constr,_) = hcons_constr (hcons_names()) in DefinitionEntry { const_entry_body = hcons1_constr ce.const_entry_body; - const_entry_type = option_map hcons1_constr ce.const_entry_type; + const_entry_type = Option.map hcons1_constr ce.const_entry_type; const_entry_opaque = ce.const_entry_opaque; const_entry_boxed = ce.const_entry_boxed } | cd -> cd let declare_constant_common id dhyps (cd,kind) = - let (sp,kn) = add_leaf id (in_constant (cd,dhyps,kind)) in + let (sp,kn) = add_leaf id (inConstant (cd,dhyps,kind)) in let kn = constant_of_kn kn in declare_constant_implicits kn; + Heads.declare_head (EvalConstRef kn); Notation.declare_ref_arguments_scope (ConstRef kn); kn @@ -221,7 +173,7 @@ let declare_constant_gen internal id (cd,kind) = let declare_internal_constant = declare_constant_gen true let declare_constant = declare_constant_gen false -(* Inductives. *) +(** Declaration of inductive blocks *) let declare_inductive_argument_scopes kn mie = list_iter_i (fun i {mind_entry_consnames=lc} -> @@ -251,7 +203,7 @@ let inductive_names sp kn mie = in names let check_exists_inductive (sp,_) = - (if Idmap.mem (basename sp) !vartab then + (if variable_exists (basename sp) then errorlabstrm "" (pr_id (basename sp) ++ str " already exists")); if Nametab.exists_cci sp then @@ -301,7 +253,7 @@ let dummy_inductive_entry (_,m) = ([],{ let export_inductive x = Some (dummy_inductive_entry x) -let (in_inductive, out_inductive) = +let (inInductive, outInductive) = declare_object {(default_object "INDUCTIVE") with cache_function = cache_inductive; load_function = load_inductive; @@ -316,84 +268,9 @@ let declare_mind isrecord mie = let id = match mie.mind_entry_inds with | ind::_ -> ind.mind_entry_typename | [] -> anomaly "cannot declare an empty list of inductives" in - let (sp,kn as oname) = add_leaf id (in_inductive ([],mie)) in + let (sp,kn as oname) = add_leaf id (inInductive ([],mie)) in declare_mib_implicits kn; declare_inductive_argument_scopes kn mie; !xml_declare_inductive (isrecord,oname); oname -(*s Test and access functions. *) - -let is_constant sp = - try let _ = Spmap.find sp !csttab in true with Not_found -> false - -let constant_strength sp = Global -let constant_kind sp = Spmap.find sp !csttab - -let get_variable id = - let (p,x,_) = Idmap.find id !vartab in - match x with - | CheckedSectionLocalDef (c,ty,cst,opaq) -> (id,Some c,ty) - | CheckedSectionLocalAssum (ty,cst) -> (id,None,ty) - -let variable_strength _ = Local - -let find_section_variable id = - let (p,_,_) = Idmap.find id !vartab in Libnames.make_path p id - -let variable_opacity id = - let (_,x,_) = Idmap.find id !vartab in - match x with - | CheckedSectionLocalDef (c,ty,cst,opaq) -> opaq - | CheckedSectionLocalAssum (ty,cst) -> false (* any.. *) - -let variable_kind id = - pi3 (Idmap.find id !vartab) - -let clear_proofs sign = - List.fold_right - (fun (id,c,t as d) signv -> - let d = if variable_opacity id then (id,None,t) else d in - Environ.push_named_context_val d signv) sign Environ.empty_named_context_val - -(* Global references. *) - -let first f v = - let n = Array.length v in - let rec look_for i = - if i = n then raise Not_found; - try f i v.(i) with Not_found -> look_for (succ i) - in - look_for 0 - -let mind_oper_of_id sp id mib = - first - (fun tyi mip -> - if id = mip.mind_typename then - IndRef (sp,tyi) - else - first - (fun cj cid -> - if id = cid then - ConstructRef ((sp,tyi),succ cj) - else raise Not_found) - mip.mind_consnames) - mib.mind_packets - -let last_section_hyps dir = - fold_named_context - (fun (id,_,_) sec_ids -> - try - let (p,_,_) = Idmap.find id !vartab in - if dir=p then id::sec_ids else sec_ids - with Not_found -> sec_ids) - (Environ.named_context (Global.env())) - ~init:[] - -let is_section_variable = function - | VarRef _ -> true - | _ -> false - -let strength_of_global = function - | VarRef _ -> Local - | IndRef _ | ConstructRef _ | ConstRef _ -> Global diff --git a/library/declare.mli b/library/declare.mli index 938bfd06..78d3f027 100644 --- a/library/declare.mli +++ b/library/declare.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: declare.mli 7941 2006-01-28 23:07:59Z herbelin $ i*) +(*i $Id: declare.mli 10840 2008-04-23 21:29:34Z herbelin $ i*) (*i*) open Names @@ -34,7 +34,7 @@ open Nametab type section_variable_entry = | SectionLocalDef of constr * types option * bool (* opacity *) - | SectionLocalAssum of types + | SectionLocalAssum of types * bool * bool (* Implicit status, Keep *) type variable_declaration = dir_path * section_variable_entry * logical_kind @@ -59,26 +59,6 @@ val declare_internal_constant : the whole block (boolean must be true iff it is a record) *) val declare_mind : bool -> mutual_inductive_entry -> object_name -val strength_min : strength * strength -> strength -val string_of_strength : strength -> string - -(*s Corresponding test and access functions. *) - -val is_constant : section_path -> bool -val constant_strength : section_path -> strength -val constant_kind : section_path -> logical_kind - -val get_variable : variable -> named_declaration -val variable_strength : variable -> strength -val variable_kind : variable -> logical_kind -val find_section_variable : variable -> section_path -val last_section_hyps : dir_path -> identifier list -val clear_proofs : named_context -> Environ.named_context_val - -(*s Global references *) - -val strength_of_global : global_reference -> strength - (* hooks for XML output *) val set_xml_declare_variable : (object_name -> unit) -> unit val set_xml_declare_constant : (bool * constant -> unit) -> unit diff --git a/library/declaremods.ml b/library/declaremods.ml index aac2b599..123417a6 100644 --- a/library/declaremods.ml +++ b/library/declaremods.ml @@ -6,8 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: declaremods.ml 8752 2006-04-27 19:37:33Z herbelin $ i*) - +(*i $Id: declaremods.ml 11142 2008-06-18 15:37:31Z soubiran $ i*) open Pp open Util open Names @@ -78,22 +77,29 @@ let modtab_objects = (* currently started interactive module (if any) - its arguments (if it is a functor) and declared output type *) let openmod_info = - ref (([],None,None) : mod_bound_id list * module_type_entry option - * module_type_body option) + ref (([],None,None) : mod_bound_id list * module_struct_entry option + * struct_expr_body option) + +(* The library_cache here is needed to avoid recalculations of + substituted modules object during "reloading" of libraries *) +let library_cache = ref Dirmap.empty let _ = Summary.declare_summary "MODULE-INFO" { Summary.freeze_function = (fun () -> !modtab_substobjs, !modtab_objects, - !openmod_info); - Summary.unfreeze_function = (fun (sobjs,objs,info) -> + !openmod_info, + !library_cache); + Summary.unfreeze_function = (fun (sobjs,objs,info,libcache) -> modtab_substobjs := sobjs; modtab_objects := objs; - openmod_info := info); + openmod_info := info; + library_cache := libcache); Summary.init_function = (fun () -> modtab_substobjs := MPmap.empty; modtab_objects := MPmap.empty; - openmod_info := ([],None,None)); + openmod_info := ([],None,None); + library_cache := Dirmap.empty); Summary.survive_module = false; Summary.survive_section = false } @@ -107,6 +113,11 @@ let mp_of_kn kn = else anomaly ("Non-empty section in module name!" ^ string_of_kn kn) +let is_bound mp = + match mp with + | MPbound _ -> true + | _ -> false + let dir_of_sp sp = let dir,id = repr_path sp in extend_dirpath dir id @@ -122,29 +133,32 @@ let msid_of_prefix (_,(mp,sec)) = anomaly ("Non-empty section in module name!" ^ string_of_mp mp ^ "." ^ string_of_dirpath sec) -(* Check that a module type is not functorial *) - -let rec check_sig env = function - | MTBident kn -> check_sig env (Environ.lookup_modtype kn env) - | MTBsig _ -> () - | MTBfunsig _ -> Modops.error_result_must_be_signature () - -let rec check_sig_entry env = function - | MTEident kn -> check_sig env (Environ.lookup_modtype kn env) - | MTEsig _ -> () - | MTEfunsig _ -> Modops.error_result_must_be_signature () - | MTEwith (mte,_) -> check_sig_entry env mte +let scrape_alias mp = + Environ.scrape_alias mp (Global.env()) + (* This function checks if the type calculated for the module [mp] is a subtype of [sub_mtb]. Uses only the global environment. *) let check_subtypes mp sub_mtb = let env = Global.env () in - let mtb = (Environ.lookup_module mp env).mod_type in + let mtb = Environ.lookup_modtype mp env in + let sub_mtb = + {typ_expr = sub_mtb; + typ_strength = None; + typ_alias = empty_subst} in let _ = Environ.add_constraints (Subtyping.check_subtypes env mtb sub_mtb) in () (* The constraints are checked and forgot immediately! *) +let subst_substobjs dir mp (subst,mbids,msid,objs) = + match mbids with + | [] -> + let prefix = dir,(mp,empty_dirpath) in + let subst' = join_alias (map_msid msid mp) subst in + let subst = join subst' subst in + Some (subst_objects prefix (join (map_msid msid mp) subst) objs) + | _ -> None (* This function registers the visibility of the module and iterates through its components. It is called by plenty module functions *) @@ -176,7 +190,6 @@ let do_module exists what iter_objects i dir mp substobjs objects = iter_objects (i+1) prefix seg | None -> () - let conv_names_do_module exists what iter_objects i (sp,kn) substobjs substituted = let dir,mp = dir_of_sp sp, mp_of_kn kn in @@ -194,21 +207,25 @@ let cache_module ((sp,kn as oname),(entry,substobjs,substituted)) = | Some (me,sub_mte_o) -> let sub_mtb_o = match sub_mte_o with None -> None - | Some mte -> Some (Mod_typing.translate_modtype (Global.env()) mte) + | Some mte -> Some (Mod_typing.translate_struct_entry + (Global.env()) mte) in - + let mp = Global.add_module (basename sp) me in - if mp <> mp_of_kn kn then - anomaly "Kernel and Library names do not match"; + if mp <> mp_of_kn kn then + anomaly "Kernel and Library names do not match"; - match sub_mtb_o with - None -> () - | Some sub_mtb -> check_subtypes mp sub_mtb + match sub_mtb_o with + None -> () + | Some (sub_mtb,sub) -> + check_subtypes mp sub_mtb in conv_names_do_module false "cache" load_objects 1 oname substobjs substituted + + (* TODO: This check is not essential *) let check_empty s = function | None -> () @@ -231,18 +248,16 @@ let open_module i (oname,(entry,substobjs,substituted)) = conv_names_do_module true "open" open_objects i oname substobjs substituted -let subst_substobjs dir mp (subst,mbids,msid,objs) = - match mbids with - | [] -> - let prefix = dir,(mp,empty_dirpath) in - Some (subst_objects prefix (add_msid msid mp subst) objs) - | _ -> None - let subst_module ((sp,kn),subst,(entry,substobjs,_)) = check_empty "subst_module" entry; let dir,mp = dir_of_sp sp, mp_of_kn kn in let (sub,mbids,msid,objs) = substobjs in + let sub = subst_key subst sub in + let sub' = update_subst_alias subst sub in + let sub' = update_subst_alias sub' (map_msid msid mp) in + (* let sub = join_alias sub sub' in*) + let sub = join sub' sub in let subst' = join sub subst in (* substitutive_objects get the new substitution *) let substobjs = (subst',mbids,msid,objs) in @@ -256,6 +271,8 @@ let subst_module ((sp,kn),subst,(entry,substobjs,_)) = let classify_module (_,(_,substobjs,_)) = Substitute (None,substobjs,None) + + let (in_module,out_module) = declare_object {(default_object "MODULE") with cache_function = cache_module; @@ -266,6 +283,182 @@ let (in_module,out_module) = export_function = (fun _ -> anomaly "No modules in sections!") } +let rec replace_alias modalias_obj obj = + let rec put_alias (id_alias,obj_alias) l = + match l with + [] -> [] + | (id,o)::r + when ( object_tag o = "MODULE") -> + if id = id_alias then +(* let (entry,subst_o,substed_o) = out_module_alias obj_alias in + let (entry',subst_o',substed_o') = out_module o in + begin + match substed_o,substed_o' with + Some a,Some b -> + (id,in_module_alias + (entry,subst_o',Some (dump_alias_object a b)))::r*) + (id_alias,obj_alias)::r + (* | _,_ -> (id,o)::r + end*) + else (id,o)::(put_alias (id_alias,obj_alias) r) + | e::r -> e::(put_alias (id_alias,obj_alias) r) in + let rec choose_obj_alias list_alias list_obj = + match list_alias with + | [] -> list_obj + | o::r ->choose_obj_alias r (put_alias o list_obj) in + choose_obj_alias modalias_obj obj + +and dump_alias_object alias_obj obj = + let rec alias_in_obj seg = + match seg with + | [] -> [] + | (id,o)::r when (object_tag o = "MODULE ALIAS") -> + (id,o)::(alias_in_obj r) + | e::r -> (alias_in_obj r) in + let modalias_obj = alias_in_obj alias_obj in + replace_alias modalias_obj obj + +and do_module_alias exists what iter_objects i dir mp alias substobjs objects = + let prefix = (dir,(alias,empty_dirpath)) in + let alias_objects = + try Some (MPmap.find alias !modtab_objects) with + Not_found -> None in + let dirinfo = DirModule (dir,(mp,empty_dirpath)) in + let vis = + if exists then + if + try Nametab.locate_dir (qualid_of_dirpath dir) = dirinfo + with Not_found -> false + then + Nametab.Exactly i + else + errorlabstrm (what^"_module") + (pr_dirpath dir ++ str " should already exist!") + else + if Nametab.exists_dir dir then + errorlabstrm (what^"_module") (pr_dirpath dir ++ str " already exists") + else + Nametab.Until i + in + Nametab.push_dir vis dir dirinfo; + modtab_substobjs := MPmap.add mp substobjs !modtab_substobjs; + match alias_objects,objects with + Some (_,seg), Some seg' -> + let new_seg = dump_alias_object seg seg' in + modtab_objects := MPmap.add mp (prefix,new_seg) !modtab_objects; + iter_objects (i+1) prefix new_seg + | _,_-> () + +and cache_module_alias ((sp,kn),(entry,substobjs,substituted)) = + let dir,mp,alias = match entry with + | None -> + anomaly "You must not recache interactive modules!" + | Some (me,sub_mte_o) -> + let sub_mtb_o = match sub_mte_o with + None -> None + | Some mte -> Some (Mod_typing.translate_struct_entry + (Global.env()) mte) + in + + let mp' = match me with + | {mod_entry_type = None; + mod_entry_expr = Some (MSEident mp)} -> + Global.add_alias (basename sp) mp + | _ -> anomaly "cache module alias" + in + if mp' <> mp_of_kn kn then + anomaly "Kernel and Library names do not match"; + + let _ = match sub_mtb_o with + None -> () + | Some (sub_mtb,sub) -> + check_subtypes mp' sub_mtb in + match me with + | {mod_entry_type = None; + mod_entry_expr = Some (MSEident mp)} -> + dir_of_sp sp,mp_of_kn kn,scrape_alias mp + | _ -> anomaly "cache module alias" + in + do_module_alias false "cache" load_objects 1 dir mp alias substobjs substituted + +and load_module_alias i ((sp,kn),(entry,substobjs,substituted)) = + let dir,mp,alias= + match entry with + | Some (me,_)-> + begin + match me with + |{mod_entry_type = None; + mod_entry_expr = Some (MSEident mp)} -> + dir_of_sp sp,mp_of_kn kn,scrape_alias mp + | _ -> anomaly "Modops: Not an alias" + end + | None -> anomaly "Modops: Empty info" + in + do_module_alias false "load" load_objects i dir mp alias substobjs substituted + +and open_module_alias i ((sp,kn),(entry,substobjs,substituted)) = + let dir,mp,alias= + match entry with + | Some (me,_)-> + begin + match me with + |{mod_entry_type = None; + mod_entry_expr = Some (MSEident mp)} -> + dir_of_sp sp,mp_of_kn kn,scrape_alias mp + | _ -> anomaly "Modops: Not an alias" + end + | None -> anomaly "Modops: Empty info" + in + do_module_alias true "open" open_objects i dir mp alias substobjs substituted + +and subst_module_alias ((sp,kn),subst,(entry,substobjs,_)) = + let dir,mp = dir_of_sp sp, mp_of_kn kn in + let (sub,mbids,msid,objs) = substobjs in + let sub' = update_subst_alias subst (map_msid msid mp) in + let subst' = join sub' subst in + let subst' = join sub subst' in + (* substitutive_objects get the new substitution *) + let substobjs = (subst',mbids,msid,objs) in + (* if we are not a functor - calculate substitued. + We add "msid |-> mp" to the substitution *) + match entry with + | Some (me,sub)-> + begin + match me with + |{mod_entry_type = None; + mod_entry_expr = Some (MSEident mp')} -> + let mp' = subst_mp subst' mp' in + let mp' = scrape_alias mp' in + (Some ({mod_entry_type = None; + mod_entry_expr = + Some (MSEident mp')},sub), + substobjs, match mbids with + | [] -> + Some (subst_objects (dir,(mp',empty_dirpath)) + (join subst' (join (map_msid msid mp') + (map_mp mp mp'))) objs) + | _ -> None) + + | _ -> anomaly "Modops: Not an alias" + end + | None -> anomaly "Modops: Empty info" + +and classify_module_alias (_,(entry,substobjs,_)) = + Substitute (entry,substobjs,None) + +let (in_module_alias,out_module_alias) = + declare_object {(default_object "MODULE ALIAS") with + cache_function = cache_module_alias; + open_function = open_module_alias; + classify_function = classify_module_alias; + subst_function = subst_module_alias; + load_function = load_module_alias; + export_function = (fun _ -> anomaly "No modules in sections!") } + + + + + let cache_keep _ = anomaly "This module should not be cached!" let load_keep i ((sp,kn),seg) = @@ -298,7 +491,7 @@ let (in_modkeep,out_modkeep) = The module M gets its objects from SIG *) let modtypetab = - ref (KNmap.empty : substitutive_objects KNmap.t) + ref (MPmap.empty : substitutive_objects MPmap.t) (* currently started interactive module type. We remember its arguments if it is a functor type *) @@ -312,22 +505,20 @@ let _ = Summary.declare_summary "MODTYPE-INFO" modtypetab := fst ft; openmodtype_info := snd ft); Summary.init_function = (fun () -> - modtypetab := KNmap.empty; + modtypetab := MPmap.empty; openmodtype_info := []); Summary.survive_module = false; Summary.survive_section = true } - - let cache_modtype ((sp,kn),(entry,modtypeobjs)) = let _ = match entry with | None -> anomaly "You must not recache interactive module types!" | Some mte -> - let kn' = Global.add_modtype (basename sp) mte in - if kn' <> kn then + let mp = Global.add_modtype (basename sp) mte in + if mp <>mp_of_kn kn then anomaly "Kernel and Library names do not match" in @@ -335,9 +526,9 @@ let cache_modtype ((sp,kn),(entry,modtypeobjs)) = errorlabstrm "cache_modtype" (pr_sp sp ++ str " already exists") ; - Nametab.push_modtype (Nametab.Until 1) sp kn; + Nametab.push_modtype (Nametab.Until 1) sp (mp_of_kn kn); - modtypetab := KNmap.add kn modtypeobjs !modtypetab + modtypetab := MPmap.add (mp_of_kn kn) modtypeobjs !modtypetab let load_modtype i ((sp,kn),(entry,modtypeobjs)) = @@ -347,23 +538,22 @@ let load_modtype i ((sp,kn),(entry,modtypeobjs)) = errorlabstrm "cache_modtype" (pr_sp sp ++ str " already exists") ; - Nametab.push_modtype (Nametab.Until i) sp kn; + Nametab.push_modtype (Nametab.Until i) sp (mp_of_kn kn); - modtypetab := KNmap.add kn modtypeobjs !modtypetab + modtypetab := MPmap.add (mp_of_kn kn) modtypeobjs !modtypetab let open_modtype i ((sp,kn),(entry,_)) = check_empty "open_modtype" entry; if - try Nametab.locate_modtype (qualid_of_sp sp) <> kn + try Nametab.locate_modtype (qualid_of_sp sp) <> (mp_of_kn kn) with Not_found -> true then errorlabstrm ("open_modtype") (pr_sp sp ++ str " should already exist!"); - Nametab.push_modtype (Nametab.Exactly i) sp kn - + Nametab.push_modtype (Nametab.Exactly i) sp (mp_of_kn kn) let subst_modtype (_,subst,(entry,(subs,mbids,msid,objs))) = check_empty "subst_modtype" entry; @@ -381,77 +571,106 @@ let (in_modtype,out_modtype) = load_function = load_modtype; subst_function = subst_modtype; classify_function = classify_modtype; - export_function = in_some } + export_function = Option.make } -let rec replace_module_object idl (subst, mbids, msid, lib_stack) modobjs = - if mbids<>[] then +let rec replace_module_object idl (subst, mbids, msid, lib_stack) modobjs mp = + let rec mp_rec = function + | [] -> MPself msid + | i::r -> MPdot(mp_rec r,label_of_id i) + in + if mbids<>[] then error "Unexpected functor objects" - else - let rec replace_idl = function - | _,[] -> [] - | id::idl,(id',obj)::tail when id = id' -> - if object_tag obj = "MODULE" then - (match idl with - [] -> (id, in_module (None,modobjs,None))::tail - | _ -> - let (_,substobjs,_) = out_module obj in - let substobjs' = replace_module_object idl substobjs modobjs in - (id, in_module (None,substobjs',None))::tail - ) - else error "MODULE expected!" - | idl,lobj::tail -> lobj::replace_idl (idl,tail) - in - (subst, mbids, msid, replace_idl (idl,lib_stack)) - + else + let rec replace_idl = function + | _,[] -> [] + | id::idl,(id',obj)::tail when id = id' -> + if object_tag obj = "MODULE" then + (match idl with + [] -> (id, in_module_alias (Some + ({mod_entry_type = None; + mod_entry_expr = Some (MSEident mp)},None) + ,modobjs,None))::tail + | _ -> + let (_,substobjs,_) = out_module obj in + let substobjs' = replace_module_object idl substobjs modobjs mp in + (id, in_module (None,substobjs',None))::tail + ) + else error "MODULE expected!" + | idl,lobj::tail -> lobj::replace_idl (idl,tail) + in + (join (map_mp (mp_rec (List.rev idl)) mp) subst, mbids, msid, replace_idl (idl,lib_stack)) + let abstract_substobjs mbids1 (subst, mbids2, msid, lib_stack) = (subst, mbids1@mbids2, msid, lib_stack) - -let rec get_modtype_substobjs = function - MTEident ln -> KNmap.find ln !modtypetab - | MTEfunsig (mbid,_,mte) -> - let (subst, mbids, msid, objs) = get_modtype_substobjs mte in +let rec get_modtype_substobjs env = function + MSEident ln -> MPmap.find ln !modtypetab + | MSEfunctor (mbid,_,mte) -> + let (subst, mbids, msid, objs) = get_modtype_substobjs env mte in (subst, mbid::mbids, msid, objs) - | MTEwith (mty, With_Definition _) -> get_modtype_substobjs mty - | MTEwith (mty, With_Module (idl,mp)) -> - let substobjs = get_modtype_substobjs mty in + | MSEwith (mty, With_Definition _) -> get_modtype_substobjs env mty + | MSEwith (mty, With_Module (idl,mp)) -> + let substobjs = get_modtype_substobjs env mty in let modobjs = MPmap.find mp !modtab_substobjs in - replace_module_object idl substobjs modobjs - | MTEsig (msid,_) -> - todo "Anonymous module types"; (empty_subst, [], msid, []) + replace_module_object idl substobjs modobjs mp + | MSEapply (mexpr, MSEident mp) -> + let ftb,sub1 = Mod_typing.translate_struct_entry env mexpr in + let farg_id, farg_b, fbody_b = Modops.destr_functor env + (Modops.eval_struct env ftb) in + let mp = Environ.scrape_alias mp env in + let sub_alias = (Environ.lookup_modtype mp env).typ_alias in + let sub_alias = match Modops.eval_struct env (SEBident mp) with + | SEBstruct (msid,sign) -> join_alias + (subst_key (map_msid msid mp) sub_alias) + (map_msid msid mp) + | _ -> sub_alias in + let sub3= + if sub1 = empty_subst then + update_subst sub_alias (map_mbid farg_id mp None) + else + let sub1' = join_alias sub1 (map_mbid farg_id mp None) in + let sub_alias' = update_subst sub_alias sub1' in + join sub1' sub_alias' + in + let sub3 = join sub3 (update_subst sub_alias (map_mbid farg_id mp None)) in + let (subst, mbids, msid, objs) = get_modtype_substobjs env mexpr in + (match mbids with + | mbid::mbids -> + let resolve = + Modops.resolver_of_environment farg_id farg_b mp sub_alias env in + (* application outside the kernel, only for substitutive + objects (that are all non-logical objects) *) + ((join + (join subst (map_mbid mbid mp (Some resolve))) + sub3) + , mbids, msid, objs) + | [] -> match mexpr with + | MSEident _ -> error "Application of a non-functor" + | _ -> error "Application of a functor with too few arguments") + | MSEapply (_,mexpr) -> + Modops.error_application_to_not_path mexpr + (* push names of bound modules (and their components) to Nametab *) (* add objects associated to them *) let process_module_bindings argids args = let process_arg id (mbid,mty) = let dir = make_dirpath [id] in let mp = MPbound mbid in - let substobjs = get_modtype_substobjs mty in + let substobjs = get_modtype_substobjs (Global.env()) mty in let substituted = subst_substobjs dir mp substobjs in do_module false "start" load_objects 1 dir mp substobjs substituted in List.iter2 process_arg argids args - -let replace_module mtb id mb = todo "replace module after with"; mtb - -let rec get_some_body mty env = match mty with - MTEident kn -> Environ.lookup_modtype kn env - | MTEfunsig _ - | MTEsig _ -> anomaly "anonymous module types not supported" - | MTEwith (mty,With_Definition _) -> get_some_body mty env - | MTEwith (mty,With_Module (id,mp)) -> - replace_module (get_some_body mty env) id (Environ.lookup_module mp env) - - let intern_args interp_modtype (idl,arg) = let lib_dir = Lib.library_dp() in let mbids = List.map (fun (_,id) -> make_mbid lib_dir (string_of_id id)) idl in let mty = interp_modtype (Global.env()) arg in let dirs = List.map (fun (_,id) -> make_dirpath [id]) idl in - let substobjs = get_modtype_substobjs mty in + let substobjs = get_modtype_substobjs (Global.env()) mty in List.map2 (fun dir mbid -> Global.add_module_parameter mbid mty; @@ -472,39 +691,35 @@ let start_module interp_modtype export id args res_o = | Some (res, restricted) -> (* we translate the module here to catch errors as early as possible *) let mte = interp_modtype (Global.env()) res in - check_sig_entry (Global.env()) mte; if restricted then Some mte, None else - let mtb = Mod_typing.translate_modtype (Global.env()) mte in + let mtb,_ = Mod_typing.translate_struct_entry (Global.env()) mte in let sub_mtb = List.fold_right (fun (arg_id,arg_t) mte -> - let arg_t = Mod_typing.translate_modtype (Global.env()) arg_t - in MTBfunsig(arg_id,arg_t,mte)) + let arg_t,sub = Mod_typing.translate_struct_entry (Global.env()) arg_t + in + let arg_t = {typ_expr = arg_t; + typ_strength = None; + typ_alias = sub} in + SEBfunctor(arg_id,arg_t,mte)) arg_entries mtb in None, Some sub_mtb in let mbids = List.map fst arg_entries in - openmod_info:=(mbids,res_entry_o,sub_body_o); + openmod_info:=(mbids,res_entry_o,sub_body_o); let prefix = Lib.start_module export id mp fs in Nametab.push_dir (Nametab.Until 1) (fst prefix) (DirOpenModule prefix); - Lib.add_frozen_state () + Lib.add_frozen_state (); mp let end_module id = let oldoname,oldprefix,fs,lib_stack = Lib.end_module id in let mbids, res_o, sub_o = !openmod_info in - let mp = Global.end_module id res_o in - - begin match sub_o with - None -> () - | Some sub_mtb -> check_subtypes mp sub_mtb - end; - let substitute, keep, special = Lib.classify_segment lib_stack in let dir = fst oldprefix in @@ -514,21 +729,27 @@ let end_module id = match res_o with | None -> (empty_subst, mbids, msid, substitute), keep, special - | Some (MTEident ln) -> - abstract_substobjs mbids (KNmap.find ln (!modtypetab)), [], [] - | Some (MTEsig (msid,_)) -> - todo "Anonymous signatures not supported"; - (empty_subst, mbids, msid, []), keep, special - | Some (MTEwith _ as mty) -> - abstract_substobjs mbids (get_modtype_substobjs mty), [], [] - | Some (MTEfunsig _) -> + | Some (MSEident ln) -> + abstract_substobjs mbids (MPmap.find ln (!modtypetab)), [], [] + | Some (MSEwith _ as mty) -> + abstract_substobjs mbids (get_modtype_substobjs (Global.env()) mty), [], [] + | Some (MSEfunctor _) -> anomaly "Funsig cannot be here..." - with + | Some (MSEapply _ as mty) -> + abstract_substobjs mbids (get_modtype_substobjs (Global.env()) mty), [], [] + with Not_found -> anomaly "Module objects not found..." in - - (* must be called after get_modtype_substobjs, because of possible + (* must be called after get_modtype_substobjs, because of possible dependencies on functor arguments *) + + let mp = Global.end_module id res_o in + + begin match sub_o with + None -> () + | Some sub_mtb -> check_subtypes mp sub_mtb + end; + Summary.module_unfreeze_summaries fs; let substituted = subst_substobjs dir mp substobjs in @@ -546,7 +767,8 @@ let end_module id = if mp_of_kn (snd newoname) <> mp then anomaly "Kernel and Library names do not match"; - Lib.add_frozen_state () (* to prevent recaching *) + Lib.add_frozen_state () (* to prevent recaching *); + mp @@ -566,18 +788,13 @@ type library_objects = mod_self_id * lib_objects * lib_objects -(* The library_cache here is needed to avoid recalculations of - substituted modules object during "reloading" of libraries *) -let library_cache = Hashtbl.create 17 - - let register_library dir cenv objs digest = let mp = MPfile dir in let substobjs, objects = try ignore(Global.lookup_module mp); (* if it's in the environment, the cached objects should be correct *) - Hashtbl.find library_cache dir + Dirmap.find dir !library_cache with Not_found -> if mp <> Global.import cenv digest then @@ -585,9 +802,9 @@ let register_library dir cenv objs digest = let msid,substitute,keep = objs in let substobjs = empty_subst, [], msid, substitute in let substituted = subst_substobjs dir mp substobjs in - let objects = option_map (fun seg -> seg@keep) substituted in + let objects = Option.map (fun seg -> seg@keep) substituted in let modobjs = substobjs, objects in - Hashtbl.add library_cache dir modobjs; + library_cache := Dirmap.add dir modobjs !library_cache; modobjs in do_module false "register_library" load_objects 1 dir mp substobjs objects @@ -625,16 +842,17 @@ let classify_import (_,(export,_ as obj)) = if export then Substitute obj else Dispose let subst_import (_,subst,(export,mp as obj)) = - let mp' = subst_mp subst mp in + let subst' = remove_alias subst in + let mp' = subst_mp subst' mp in if mp'==mp then obj else (export,mp') - + let (in_import,out_import) = declare_object {(default_object "IMPORT MODULE") with - cache_function = cache_import; - open_function = (fun i o -> if i=1 then cache_import o); - subst_function = subst_import; - classify_function = classify_import } + cache_function = cache_import; + open_function = (fun i o -> if i=1 then cache_import o); + subst_function = subst_import; + classify_function = classify_import } let import_module export mp = @@ -642,7 +860,6 @@ let import_module export mp = (************************************************************************) (* module types *) - let start_modtype interp_modtype id args = let fs = Summary.freeze_summaries () in @@ -653,7 +870,7 @@ let start_modtype interp_modtype id args = openmodtype_info := mbids; let prefix = Lib.start_modtype id mp fs in Nametab.push_dir (Nametab.Until 1) (fst prefix) (DirOpenModtype prefix); - Lib.add_frozen_state () + Lib.add_frozen_state (); mp let end_modtype id = @@ -673,76 +890,202 @@ let end_modtype id = if fst oname <> fst oldoname then anomaly "Section paths generated on start_ and end_modtype do not match"; - if snd oname <> ln then + if (mp_of_kn (snd oname)) <> ln then anomaly "Kernel and Library names do not match"; - Lib.add_frozen_state ()(* to prevent recaching *) + Lib.add_frozen_state ()(* to prevent recaching *); + ln let declare_modtype interp_modtype id args mty = let fs = Summary.freeze_summaries () in - let _ = Global.start_modtype id in + try + let mmp = Global.start_modtype id in let arg_entries = List.concat (List.map (intern_args interp_modtype) args) in let base_mty = interp_modtype (Global.env()) mty in let entry = List.fold_right - (fun (arg_id,arg_t) mte -> MTEfunsig(arg_id,arg_t,mte)) + (fun (arg_id,arg_t) mte -> MSEfunctor(arg_id,arg_t,mte)) arg_entries base_mty in - let substobjs = get_modtype_substobjs entry in + let substobjs = get_modtype_substobjs (Global.env()) entry in + (* Undo the simulated interactive building of the module type *) + (* and declare the module type as a whole *) Summary.unfreeze_summaries fs; - ignore (add_leaf id (in_modtype (Some entry, substobjs))) + ignore (add_leaf id (in_modtype (Some entry, substobjs))); + mmp + with e -> + (* Something wrong: undo the whole process *) + Summary.unfreeze_summaries fs; raise e let rec get_module_substobjs env = function - | MEident mp -> MPmap.find mp !modtab_substobjs - | MEfunctor (mbid,mty,mexpr) -> + | MSEident mp -> MPmap.find mp !modtab_substobjs + | MSEfunctor (mbid,mty,mexpr) -> let (subst, mbids, msid, objs) = get_module_substobjs env mexpr in (subst, mbid::mbids, msid, objs) - | MEstruct (msid,_) -> - (empty_subst, [], msid, []) - | MEapply (mexpr, MEident mp) -> - let feb,ftb = Mod_typing.translate_mexpr env mexpr in - let ftb = Modops.scrape_modtype env ftb in - let farg_id, farg_b, fbody_b = Modops.destr_functor ftb in + | MSEapply (mexpr, MSEident mp) -> + let ftb,sub1 = Mod_typing.translate_struct_entry env mexpr in + let farg_id, farg_b, fbody_b = Modops.destr_functor env + (Modops.eval_struct env ftb) in + let mp = Environ.scrape_alias mp env in + let sub_alias = (Environ.lookup_modtype mp env).typ_alias in + let sub_alias = match Modops.eval_struct env (SEBident mp) with + | SEBstruct (msid,sign) -> join_alias + (subst_key (map_msid msid mp) sub_alias) + (map_msid msid mp) + | _ -> sub_alias in + + let sub3= + if sub1 = empty_subst then + update_subst sub_alias (map_mbid farg_id mp None) + else + let sub1' = join_alias sub1 (map_mbid farg_id mp None) in + let sub_alias' = update_subst sub_alias sub1' in + join sub1' sub_alias' + in + let sub3 = join sub3 (update_subst sub_alias (map_mbid farg_id mp None)) in let (subst, mbids, msid, objs) = get_module_substobjs env mexpr in (match mbids with | mbid::mbids -> - let resolve = - Modops.resolver_of_environment farg_id farg_b mp env in - (* application outside the kernel, only for substitutive - objects (that are all non-logical objects) *) - (add_mbid mbid mp (Some resolve) subst, mbids, msid, objs) + let resolve = + Modops.resolver_of_environment farg_id farg_b mp sub_alias env in + (* application outside the kernel, only for substitutive + objects (that are all non-logical objects) *) + ((join + (join subst (map_mbid mbid mp (Some resolve))) + sub3) + , mbids, msid, objs) | [] -> match mexpr with - | MEident _ | MEstruct _ -> error "Application of a non-functor" + | MSEident _ -> error "Application of a non-functor" | _ -> error "Application of a functor with too few arguments") - | MEapply (_,mexpr) -> + | MSEapply (_,mexpr) -> Modops.error_application_to_not_path mexpr + | MSEwith (mty, With_Definition _) -> get_module_substobjs env mty + | MSEwith (mty, With_Module (idl,mp)) -> + let substobjs = get_module_substobjs env mty in + let modobjs = MPmap.find mp !modtab_substobjs in + replace_module_object idl substobjs modobjs mp + + +(* Include *) + +let rec subst_inc_expr subst me = + match me with + | MSEident mp -> MSEident (subst_mp subst mp) + | MSEwith (me,With_Module(idl,mp)) -> + MSEwith (subst_inc_expr subst me, + With_Module(idl,subst_mp subst mp)) + | MSEwith (me,With_Definition(idl,const))-> + let const1 = Mod_subst.from_val const in + let force = Mod_subst.force subst_mps in + MSEwith (subst_inc_expr subst me, + With_Definition(idl,force (subst_substituted + subst const1))) + | MSEapply (me1,me2) -> + MSEapply (subst_inc_expr subst me1, + subst_inc_expr subst me2) + | _ -> anomaly "You cannot Include a high-order structure" + +let lift_oname (sp,kn) = + let mp,_,_ = Names.repr_kn kn in + let dir,_ = Libnames.repr_path sp in + (dir,mp) + +let cache_include (oname,((me,is_mod),substobjs,substituted)) = + let dir,mp1 = lift_oname oname in + let prefix = (dir,(mp1,empty_dirpath)) in + Global.add_include me; + match substituted with + Some seg -> + load_objects 1 prefix seg; + open_objects 1 prefix seg; + | None -> () + +let load_include i (oname,((me,is_mod),substobjs,substituted)) = + let dir,mp1 = lift_oname oname in + let prefix = (dir,(mp1,empty_dirpath)) in + match substituted with + Some seg -> + load_objects i prefix seg + | None -> () +let open_include i (oname,((me,is_mod),substobjs,substituted)) = + let dir,mp1 = lift_oname oname in + let prefix = (dir,(mp1,empty_dirpath)) in + match substituted with + Some seg -> + if is_mod then + open_objects i prefix seg + else + if i = 1 then + open_objects i prefix seg + | None -> () +let subst_include (oname,subst,((me,is_mod),substobj,_)) = + let dir,mp1 = lift_oname oname in + let (sub,mbids,msid,objs) = substobj in + let subst' = join sub subst in + let substobjs = (subst',mbids,msid,objs) in + let substituted = subst_substobjs dir mp1 substobjs in + ((subst_inc_expr subst' me,is_mod),substobjs,substituted) + +let classify_include (_,((me,is_mod),substobjs,_)) = + Substitute ((me,is_mod),substobjs,None) + +let (in_include,out_include) = + declare_object {(default_object "INCLUDE") with + cache_function = cache_include; + load_function = load_include; + open_function = open_include; + subst_function = subst_include; + classify_function = classify_include; + export_function = (fun _ -> anomaly "No modules in section!") } + +let rec update_include (sub,mbids,msid,objs) = + let rec replace_include = function + | [] -> [] + | (id,obj)::tail -> + if object_tag obj = "INCLUDE" then + let ((me,is_mod),substobjs,substituted) = out_include obj in + if not (is_mod) then + let substobjs' = update_include substobjs in + (id, in_include ((me,true),substobjs',substituted)):: + (replace_include tail) + else + (id,obj)::(replace_include tail) + else + (id,obj)::(replace_include tail) + in + (sub,mbids,msid,replace_include objs) + + + let declare_module interp_modtype interp_modexpr id args mty_o mexpr_o = + let fs = Summary.freeze_summaries () in - let _ = Global.start_module id in + try + let mmp = Global.start_module id in let arg_entries = List.concat (List.map (intern_args interp_modtype) args) in let mty_entry_o, mty_sub_o = match mty_o with None -> None, None | (Some (mty, true)) -> Some (List.fold_right - (fun (arg_id,arg_t) mte -> MTEfunsig(arg_id,arg_t,mte)) + (fun (arg_id,arg_t) mte -> MSEfunctor(arg_id,arg_t,mte)) arg_entries (interp_modtype (Global.env()) mty)), None | (Some (mty, false)) -> None, Some (List.fold_right - (fun (arg_id,arg_t) mte -> MTEfunsig(arg_id,arg_t,mte)) + (fun (arg_id,arg_t) mte -> MSEfunctor(arg_id,arg_t,mte)) arg_entries (interp_modtype (Global.env()) mty)) in @@ -750,7 +1093,7 @@ let declare_module interp_modtype interp_modexpr id args mty_o mexpr_o = None -> None | Some mexpr -> Some (List.fold_right - (fun (mbid,mte) me -> MEfunctor(mbid,mte,me)) + (fun (mbid,mte) me -> MSEfunctor(mbid,mte,me)) arg_entries (interp_modexpr (Global.env()) mexpr)) in @@ -761,22 +1104,75 @@ let declare_module interp_modtype interp_modexpr id args mty_o mexpr_o = let env = Global.env() in let substobjs = match entry with - | {mod_entry_type = Some mte} -> get_modtype_substobjs mte + | {mod_entry_type = Some mte} -> get_modtype_substobjs env mte | {mod_entry_expr = Some mexpr} -> get_module_substobjs env mexpr | _ -> anomaly "declare_module: No type, no body ..." in + let substobjs = update_include substobjs in + (* Undo the simulated interactive building of the module *) + (* and declare the module as a whole *) Summary.unfreeze_summaries fs; + match entry with + |{mod_entry_type = None; + mod_entry_expr = Some (MSEident mp) } -> + let dir,mp' = dir_of_sp (Lib.make_path id), mp_of_kn (Lib.make_kn id) in + let (sub,mbids,msid,objs) = substobjs in + let mp1 = Environ.scrape_alias mp env in + let prefix = dir,(mp1,empty_dirpath) in + let substituted = + match mbids with + | [] -> + Some (subst_objects prefix + (join sub (join (map_msid msid mp1) (map_mp mp' mp1))) objs) + | _ -> None in + ignore (add_leaf + id + (in_module_alias (Some ({mod_entry_type = None; + mod_entry_expr = Some (MSEident mp1) }, mty_sub_o), + substobjs, substituted))); + mmp + | _ -> + let dir,mp = dir_of_sp (Lib.make_path id), mp_of_kn (Lib.make_kn id) in + let (sub,mbids,msid,objs) = substobjs in + let sub' = subst_key (map_msid msid mp) sub in + let substobjs = (join sub sub',mbids,msid,objs) in + let substituted = subst_substobjs dir mp substobjs in + ignore (add_leaf + id + (in_module (Some (entry, mty_sub_o), substobjs, substituted))); + mmp + + with e -> + (* Something wrong: undo the whole process *) + Summary.unfreeze_summaries fs; raise e + + +let declare_include interp_struct me_ast is_mod = - let dir,mp = dir_of_sp (Lib.make_path id), mp_of_kn (Lib.make_kn id) in - let substituted = subst_substobjs dir mp substobjs in - - ignore (add_leaf - id - (in_module (Some (entry, mty_sub_o), substobjs, substituted))) - + let fs = Summary.freeze_summaries () in + try + let env = Global.env() in + let me = interp_struct env me_ast in + let substobjs = + if is_mod then + get_module_substobjs env me + else + get_modtype_substobjs env me in + let mp1,_ = current_prefix () in + let dir = dir_of_sp (Lib.path_of_include()) in + let substituted = subst_substobjs dir mp1 substobjs in + let id = current_mod_id() in + + ignore (add_leaf id + (in_include ((me,is_mod), substobjs, substituted))) + with e -> + (* Something wrong: undo the whole process *) + Summary.unfreeze_summaries fs; raise e + + (*s Iterators. *) - + let iter_all_segments f = let _ = MPmap.iter diff --git a/library/declaremods.mli b/library/declaremods.mli index 481809fc..9c295451 100644 --- a/library/declaremods.mli +++ b/library/declaremods.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: declaremods.mli 6758 2005-02-20 18:13:28Z herbelin $ i*) +(*i $Id: declaremods.mli 11065 2008-06-06 22:39:43Z msozeau $ i*) (*i*) open Util @@ -37,28 +37,28 @@ open Lib *) val declare_module : - (env -> 'modtype -> module_type_entry) -> (env -> 'modexpr -> module_expr) -> + (env -> 'modtype -> module_struct_entry) -> (env -> 'modexpr -> module_struct_entry) -> identifier -> (identifier located list * 'modtype) list -> ('modtype * bool) option -> - 'modexpr option -> unit + 'modexpr option -> module_path -val start_module : (env -> 'modtype -> module_type_entry) -> +val start_module : (env -> 'modtype -> module_struct_entry) -> bool option -> identifier -> (identifier located list * 'modtype) list -> - ('modtype * bool) option -> unit + ('modtype * bool) option -> module_path -val end_module : identifier -> unit +val end_module : identifier -> module_path (*s Module types *) -val declare_modtype : (env -> 'modtype -> module_type_entry) -> - identifier -> (identifier located list * 'modtype) list -> 'modtype -> unit +val declare_modtype : (env -> 'modtype -> module_struct_entry) -> + identifier -> (identifier located list * 'modtype) list -> 'modtype -> module_path -val start_modtype : (env -> 'modtype -> module_type_entry) -> - identifier -> (identifier located list * 'modtype) list -> unit +val start_modtype : (env -> 'modtype -> module_struct_entry) -> + identifier -> (identifier located list * 'modtype) list -> module_path -val end_modtype : identifier -> unit +val end_modtype : identifier -> module_path (*s Objects of a module. They come in two lists: the substitutive ones @@ -95,6 +95,10 @@ val really_import_module : module_path -> unit val import_module : bool -> module_path -> unit +(* Include *) + +val declare_include : (env -> 'struct_expr -> module_struct_entry) -> + 'struct_expr -> bool -> unit (*s [iter_all_segments] iterate over all segments, the modules' segments first and then the current segment. Modules are presented @@ -110,4 +114,5 @@ val debug_print_modtab : unit -> Pp.std_ppcmds (* For translator *) val process_module_bindings : module_ident list -> - (mod_bound_id * module_type_entry) list -> unit + (mod_bound_id * module_struct_entry) list -> unit + diff --git a/library/decls.ml b/library/decls.ml new file mode 100644 index 00000000..12808310 --- /dev/null +++ b/library/decls.ml @@ -0,0 +1,76 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* !vartab); + Summary.unfreeze_function = (fun ft -> vartab := ft); + Summary.init_function = (fun () -> vartab := Idmap.empty); + Summary.survive_module = false; + Summary.survive_section = false } + +let add_variable_data id o = vartab := Idmap.add id o !vartab + +let variable_path id = let (p,_,_,_) = Idmap.find id !vartab in p +let variable_opacity id = let (_,opaq,_,_) = Idmap.find id !vartab in opaq +let variable_kind id = let (_,_,_,k) = Idmap.find id !vartab in k +let variable_constraints id = let (_,_,cst,_) = Idmap.find id !vartab in cst + +let variable_exists id = Idmap.mem id !vartab + +(** Datas associated to global parameters and constants *) + +let csttab = ref (Cmap.empty : logical_kind Cmap.t) + +let _ = Summary.declare_summary "CONSTANT" + { Summary.freeze_function = (fun () -> !csttab); + Summary.unfreeze_function = (fun ft -> csttab := ft); + Summary.init_function = (fun () -> csttab := Cmap.empty); + Summary.survive_module = false; + Summary.survive_section = false } + +let add_constant_kind kn k = csttab := Cmap.add kn k !csttab + +let constant_kind kn = Cmap.find kn !csttab + +(** Miscellaneous functions. *) + +let clear_proofs sign = + List.fold_right + (fun (id,c,t as d) signv -> + let d = if variable_opacity id then (id,None,t) else d in + Environ.push_named_context_val d signv) sign Environ.empty_named_context_val + +let last_section_hyps dir = + fold_named_context + (fun (id,_,_) sec_ids -> + try if dir=variable_path id then id::sec_ids else sec_ids + with Not_found -> sec_ids) + (Environ.named_context (Global.env())) + ~init:[] + +let is_section_variable = function + | VarRef _ -> true + | _ -> false diff --git a/library/decls.mli b/library/decls.mli new file mode 100644 index 00000000..39d258b3 --- /dev/null +++ b/library/decls.mli @@ -0,0 +1,47 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* variable_data -> unit +val variable_kind : variable -> logical_kind +val variable_opacity : variable -> bool +val variable_constraints : variable -> Univ.constraints +val variable_exists : variable -> bool + +(** Registration and access to the table of constants *) + +val add_constant_kind : constant -> logical_kind -> unit +val constant_kind : constant -> logical_kind + +(** Miscellaneous functions *) + +val last_section_hyps : dir_path -> identifier list +val clear_proofs : named_context -> Environ.named_context_val diff --git a/library/dischargedhypsmap.ml b/library/dischargedhypsmap.ml index f515dcb0..c7ccb3ae 100644 --- a/library/dischargedhypsmap.ml +++ b/library/dischargedhypsmap.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: dischargedhypsmap.ml 9903 2007-06-21 17:02:07Z herbelin $ *) +(* $Id: dischargedhypsmap.ml 9902 2007-06-21 17:01:21Z herbelin $ *) open Util open Libnames diff --git a/library/global.ml b/library/global.ml index ab5d8956..b2f9e127 100644 --- a/library/global.ml +++ b/library/global.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: global.ml 9310 2006-10-28 19:35:09Z herbelin $ *) +(* $Id: global.ml 10664 2008-03-14 11:27:37Z soubiran $ *) open Util open Names @@ -68,11 +68,14 @@ let add_constant = add_thing add_constant let add_mind = add_thing add_mind let add_modtype = add_thing (fun _ -> add_modtype) () let add_module = add_thing (fun _ -> add_module) () +let add_alias = add_thing (fun _ -> add_alias) () let add_constraints c = global_env := add_constraints c !global_env let set_engagement c = global_env := set_engagement c !global_env +let add_include me = global_env := add_include me !global_env + let start_module id = let l = label_of_id id in let mp,newenv = start_module l !global_env in @@ -151,3 +154,10 @@ let type_of_reference env = function Inductive.type_of_constructor cstr specif let type_of_global t = type_of_reference (env ()) t + + +(* spiwack: register/unregister functions for retroknowledge *) +let register field value by_clause = + let entry = kind_of_term value in + let senv = Safe_typing.register !global_env field entry by_clause in + global_env := senv diff --git a/library/global.mli b/library/global.mli index 96965465..cb717cdf 100644 --- a/library/global.mli +++ b/library/global.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: global.mli 8723 2006-04-16 15:51:02Z herbelin $ i*) +(*i $Id: global.mli 10664 2008-03-14 11:27:37Z soubiran $ i*) (*i*) open Names @@ -50,7 +50,9 @@ val add_mind : dir_path -> identifier -> mutual_inductive_entry -> kernel_name val add_module : identifier -> module_entry -> module_path -val add_modtype : identifier -> module_type_entry -> kernel_name +val add_modtype : identifier -> module_struct_entry -> module_path +val add_include : module_struct_entry -> unit +val add_alias : identifier -> module_path -> module_path val add_constraints : constraints -> unit @@ -64,12 +66,13 @@ val set_engagement : engagement -> unit of the started module / module type *) val start_module : identifier -> module_path -val end_module : identifier -> module_type_entry option -> module_path +val end_module : identifier -> module_struct_entry option -> module_path -val add_module_parameter : mod_bound_id -> module_type_entry -> unit +val add_module_parameter : mod_bound_id -> module_struct_entry -> unit val start_modtype : identifier -> module_path -val end_modtype : identifier -> kernel_name +val end_modtype : identifier -> module_path + (* Queries *) @@ -78,7 +81,7 @@ val lookup_constant : constant -> constant_body val lookup_inductive : inductive -> mutual_inductive_body * one_inductive_body val lookup_mind : mutual_inductive -> mutual_inductive_body val lookup_module : module_path -> module_body -val lookup_modtype : kernel_name -> module_type_body +val lookup_modtype : module_path -> module_type_body (* Compiled modules *) val start_library : dir_path -> module_path @@ -91,3 +94,6 @@ val import : compiled_library -> Digest.t -> module_path val type_of_global : Libnames.global_reference -> types val env_of_context : Environ.named_context_val -> Environ.env + +(* spiwack: register/unregister function for retroknowledge *) +val register : Retroknowledge.field -> constr -> constr -> unit diff --git a/library/goptions.ml b/library/goptions.ml index 4d36e1c5..a9b33235 100644 --- a/library/goptions.ml +++ b/library/goptions.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: goptions.ml 9060 2006-07-27 15:30:35Z notin $ *) +(* $Id: goptions.ml 10348 2007-12-06 17:36:14Z aspiwack $ *) (* This module manages customization parameters at the vernacular level *) @@ -25,10 +25,12 @@ open Mod_subst type option_name = | PrimaryTable of string | SecondaryTable of string * string + | TertiaryTable of string * string * string let nickname = function | PrimaryTable s -> s | SecondaryTable (s1,s2) -> s1^" "^s2 + | TertiaryTable (s1,s2,s3) -> s1^" "^s2^" "^s3 let error_undeclared_key key = error ((nickname key)^": no table or option of this type") @@ -206,7 +208,7 @@ module MakeRefTable = functor (A : RefConvertArg) -> MakeTable (RefConvert(A)) (****************************************************************************) -(* 2- Options *) +(* 2- Flags. *) type 'a option_sig = { optsync : bool; diff --git a/library/goptions.mli b/library/goptions.mli index 16744ec4..e076a396 100644 --- a/library/goptions.mli +++ b/library/goptions.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: goptions.mli 6304 2004-11-16 15:49:08Z sacerdot $ i*) +(*i $Id: goptions.mli 9810 2007-04-29 09:44:58Z herbelin $ i*) (* This module manages customization parameters at the vernacular level *) @@ -68,6 +68,7 @@ open Mod_subst type option_name = | PrimaryTable of string | SecondaryTable of string * string + | TertiaryTable of string * string * string val error_undeclared_key : option_name -> 'a diff --git a/library/heads.ml b/library/heads.ml new file mode 100644 index 00000000..626f1795 --- /dev/null +++ b/library/heads.ml @@ -0,0 +1,190 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* phi(x))] where [g] is [fun f => g O] does not launch + the evaluation of [phi(0)] and the head of [h] is declared unknown). *) + +type rigid_head_kind = +| RigidParameter of constant (* a Const without body *) +| RigidVar of variable (* a Var without body *) +| RigidType (* an inductive, a product or a sort *) + +type head_approximation = +| RigidHead of rigid_head_kind +| ConstructorHead +| FlexibleHead of int * int * int * bool (* [true] if a surrounding case *) +| NotImmediatelyComputableHead + +(** Registration as global tables and rollback. *) + +module Evalreford = struct + type t = evaluable_global_reference + let compare = Pervasives.compare +end + +module Evalrefmap = Map.Make(Evalreford) + +let head_map = ref Evalrefmap.empty + +let init () = head_map := Evalrefmap.empty + +let freeze () = !head_map + +let unfreeze hm = head_map := hm + +let _ = + Summary.declare_summary "Head_decl" + { Summary.freeze_function = freeze; + Summary.unfreeze_function = unfreeze; + Summary.init_function = init; + Summary.survive_module = true; + Summary.survive_section = false } + +let variable_head id = Evalrefmap.find (EvalVarRef id) !head_map +let constant_head cst = Evalrefmap.find (EvalConstRef cst) !head_map + +let kind_of_head env t = + let rec aux k l t b = match kind_of_term (Reduction.whd_betaiotazeta t) with + | Rel n when n > k -> NotImmediatelyComputableHead + | Rel n -> FlexibleHead (k,k+1-n,List.length l,b) + | Var id -> + (try on_subterm k l b (variable_head id) + with Not_found -> + (* a goal variable *) + match pi2 (lookup_named id env) with + | Some c -> aux k l c b + | None -> NotImmediatelyComputableHead) + | Const cst -> on_subterm k l b (constant_head cst) + | Construct _ | CoFix _ -> + if b then NotImmediatelyComputableHead else ConstructorHead + | Sort _ | Ind _ | Prod _ -> RigidHead RigidType + | Cast (c,_,_) -> aux k l c b + | Lambda (_,_,c) when l = [] -> assert (not b); aux (k+1) [] c b + | Lambda (_,_,c) -> aux (k+1) (List.tl l) (subst1 (List.hd l) c) b + | LetIn _ -> assert false + | Meta _ | Evar _ -> NotImmediatelyComputableHead + | App (c,al) -> aux k (Array.to_list al @ l) c b + | Case (_,_,c,_) -> aux k [] c true + | Fix ((i,j),_) -> + let n = i.(j) in + try aux k [] (List.nth l n) true + with Failure _ -> FlexibleHead (k + n + 1, k + n + 1, 0, true) + and on_subterm k l with_case = function + | FlexibleHead (n,i,q,with_subcase) -> + let m = List.length l in + let k',rest,a = + if n > m then + (* eta-expansion *) + let a = + if i <= m then + (* we pick the head in the existing arguments *) + lift (n-m) (List.nth l (i-1)) + else + (* we pick the head in the added arguments *) + mkRel (n-i+1) in + k+n-m,[],a + else + (* enough arguments to [cst] *) + k,list_skipn n l,List.nth l (i-1) in + let l' = list_tabulate (fun _ -> mkMeta 0) q @ rest in + aux k' l' a (with_subcase or with_case) + | ConstructorHead when with_case -> NotImmediatelyComputableHead + | x -> x + in aux 0 [] t false + +let compute_head = function +| EvalConstRef cst -> + (match constant_opt_value (Global.env()) cst with + | None -> RigidHead (RigidParameter cst) + | Some c -> kind_of_head (Global.env()) c) +| EvalVarRef id -> + (match pi2 (Global.lookup_named id) with + | Some c when not (Decls.variable_opacity id) -> + kind_of_head (Global.env()) c + | _ -> + RigidHead (RigidVar id)) + +let is_rigid env t = + match kind_of_head env t with + | RigidHead _ | ConstructorHead -> true + | _ -> false + +(** Registration of heads as an object *) + +let load_head _ (_,(ref,(k:head_approximation))) = + head_map := Evalrefmap.add ref k !head_map + +let cache_head o = + load_head 1 o + +let subst_head_approximation subst = function + | RigidHead (RigidParameter cst) as k -> + let cst,c = subst_con subst cst in + if c = mkConst cst then + (* A change of the prefix of the constant *) + k + else + (* A substitution of the constant by a functor argument *) + kind_of_head (Global.env()) c + | x -> x + +let subst_head (_,subst,(ref,k)) = + (subst_evaluable_reference subst ref, subst_head_approximation subst k) + +let discharge_head (_,(ref,k)) = + match ref with + | EvalConstRef cst -> Some (EvalConstRef (pop_con cst), k) + | EvalVarRef id -> None + +let rebuild_head (info,(ref,k)) = + (ref, compute_head ref) + +let export_head o = Some o + +let (inHead, _) = + declare_object {(default_object "HEAD") with + cache_function = cache_head; + load_function = load_head; + subst_function = subst_head; + classify_function = (fun (_,x) -> Substitute x); + discharge_function = discharge_head; + rebuild_function = rebuild_head; + export_function = export_head } + +let declare_head c = + let hd = compute_head c in + add_anonymous_leaf (inHead (c,hd)) + +(** Printing *) + +let pr_head = function +| RigidHead (RigidParameter cst) -> str "rigid constant " ++ pr_con cst +| RigidHead (RigidType) -> str "rigid type" +| RigidHead (RigidVar id) -> str "rigid variable " ++ pr_id id +| ConstructorHead -> str "constructor" +| FlexibleHead (k,n,p,b) -> int n ++ str "th of " ++ int k ++ str " binders applied to " ++ int p ++ str " arguments" ++ (if b then str " (with case)" else mt()) +| NotImmediatelyComputableHead -> str "unknown" + + diff --git a/library/heads.mli b/library/heads.mli new file mode 100644 index 00000000..52270b49 --- /dev/null +++ b/library/heads.mli @@ -0,0 +1,28 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* unit + +(* [is_rigid] tells if some term is known to ultimately reduce to a term + with a rigid head symbol *) + +val is_rigid : env -> constr -> bool diff --git a/library/impargs.ml b/library/impargs.ml index 8cea4737..cae1986e 100644 --- a/library/impargs.ml +++ b/library/impargs.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: impargs.ml 9488 2007-01-17 11:11:58Z herbelin $ *) +(* $Id: impargs.ml 10796 2008-04-15 12:00:50Z herbelin $ *) open Util open Names @@ -25,49 +25,67 @@ open Topconstr (*s Flags governing the computation of implicit arguments *) +type implicits_flags = { + main : bool; + strict : bool; (* true = strict *) + strongly_strict : bool; (* true = strongly strict *) + reversible_pattern : bool; + contextual : bool; (* true = contextual *) + maximal : bool +} + (* les implicites sont stricts par défaut en v8 *) -let implicit_args = ref false -let strict_implicit_args = ref true -let contextual_implicit_args = ref false + +let implicit_args = ref { + main = false; + strict = true; + strongly_strict = false; + reversible_pattern = false; + contextual = false; + maximal = false; +} let make_implicit_args flag = - implicit_args := flag + implicit_args := { !implicit_args with main = flag } let make_strict_implicit_args flag = - strict_implicit_args := flag + implicit_args := { !implicit_args with strict = flag } -let make_contextual_implicit_args flag = - contextual_implicit_args := flag +let make_strongly_strict_implicit_args flag = + implicit_args := { !implicit_args with strongly_strict = flag } + +let make_reversible_pattern_implicit_args flag = + implicit_args := { !implicit_args with reversible_pattern = flag } -let is_implicit_args () = !implicit_args -let is_strict_implicit_args () = !strict_implicit_args -let is_contextual_implicit_args () = !contextual_implicit_args +let make_contextual_implicit_args flag = + implicit_args := { !implicit_args with contextual = flag } -type implicits_flags = bool * bool * bool +let make_maximal_implicit_args flag = + implicit_args := { !implicit_args with maximal = flag } -let implicit_flags () = - (!implicit_args, !strict_implicit_args, !contextual_implicit_args) +let is_implicit_args () = !implicit_args.main +let is_strict_implicit_args () = !implicit_args.strict +let is_strongly_strict_implicit_args () = !implicit_args.strongly_strict +let is_reversible_pattern_implicit_args () = !implicit_args.reversible_pattern +let is_contextual_implicit_args () = !implicit_args.contextual +let is_maximal_implicit_args () = !implicit_args.maximal -let with_implicits (a,b,c) f x = - let oa = !implicit_args in - let ob = !strict_implicit_args in - let oc = !contextual_implicit_args in +let with_implicits flags f x = + let oflags = !implicit_args in try - implicit_args := a; - strict_implicit_args := b; - contextual_implicit_args := c; - let rslt = f x in - implicit_args := oa; - strict_implicit_args := ob; - contextual_implicit_args := oc; + implicit_args := flags; + let rslt = f x in + implicit_args := oflags; rslt with e -> begin - implicit_args := oa; - strict_implicit_args := ob; - contextual_implicit_args := oc; + implicit_args := oflags; raise e end +let set_maximality imps b = + (* Force maximal insertion on ending implicits (compatibility) *) + b || List.for_all ((<>) None) imps + (*s Computation of implicit arguments *) (* We remember various information about why an argument is (automatically) @@ -99,7 +117,7 @@ type implicit_explanation = | DepRigid of argument_position | DepFlex of argument_position | DepFlexAndRigid of (*flex*) argument_position * (*rig*) argument_position - | Manual + | Manual of bool let argument_less = function | Hyp n, Hyp n' -> n if argument_less (pos,fpos) or pos=fpos then DepRigid pos else DepFlexAndRigid (fpos,pos) - | Some Manual -> assert false + | Some (Manual _) -> assert false else match st with | None -> DepFlex pos @@ -129,7 +147,7 @@ let update pos rig (na,st) = if argument_less (pos,fpos) then DepFlexAndRigid (pos,rpos) else x | Some (DepFlex fpos as x) -> if argument_less (pos,fpos) then DepFlex pos else x - | Some Manual -> assert false + | Some (Manual _) -> assert false in na, Some e (* modified is_rigid_reference with a truncated env *) @@ -148,18 +166,30 @@ let is_flexible_reference env bound depth f = let push_lift d (e,n) = (push_rel d e,n+1) +let is_reversible_pattern bound depth f l = + isRel f & let n = destRel f in (n < bound+depth) & (n >= depth) & + array_for_all (fun c -> isRel c & destRel c < depth) l & + array_distinct l + (* Precondition: rels in env are for inductive types only *) -let add_free_rels_until strict bound env m pos acc = +let add_free_rels_until strict strongly_strict revpat bound env m pos acc = let rec frec rig (env,depth as ed) c = - match kind_of_term (whd_betadeltaiota env c) with + let hd = if strict then whd_betadeltaiota env c else c in + let c = if strongly_strict then hd else c in + match kind_of_term hd with | Rel n when (n < bound+depth) & (n >= depth) -> - acc.(bound+depth-n-1) <- update pos rig (acc.(bound+depth-n-1)) + let i = bound + depth - n - 1 in + acc.(i) <- update pos rig acc.(i) + | App (f,l) when revpat & is_reversible_pattern bound depth f l -> + let i = bound + depth - destRel f - 1 in + acc.(i) <- update pos rig acc.(i) | App (f,_) when rig & is_flexible_reference env bound depth f -> if strict then () else iter_constr_with_full_binders push_lift (frec false) ed c | Case _ when rig -> if strict then () else iter_constr_with_full_binders push_lift (frec false) ed c + | Evar _ -> () | _ -> iter_constr_with_full_binders push_lift (frec rig) ed c in @@ -167,74 +197,127 @@ let add_free_rels_until strict bound env m pos acc = (* calcule la liste des arguments implicites *) -let compute_implicits_gen strict contextual env t = +let concrete_name avoid_flags l env_names n all c = + if n = Anonymous & noccurn 1 c then + (Anonymous,l) + else + let fresh_id = next_name_not_occuring avoid_flags n l env_names c in + let idopt = if not all && noccurn 1 c then Anonymous else Name fresh_id in + (idopt, fresh_id::l) + +let compute_implicits_gen strict strongly_strict revpat contextual all env t = let rec aux env avoid n names t = let t = whd_betadeltaiota env t in match kind_of_term t with | Prod (na,a,b) -> - let na',avoid' = Termops.concrete_name false avoid names na b in - add_free_rels_until strict n env a (Hyp (n+1)) + let na',avoid' = concrete_name None avoid names na all b in + add_free_rels_until strict strongly_strict revpat n env a (Hyp (n+1)) (aux (push_rel (na',None,a) env) avoid' (n+1) (na'::names) b) | _ -> let names = List.rev names in let v = Array.map (fun na -> na,None) (Array.of_list names) in - if contextual then add_free_rels_until strict n env t Conclusion v + if contextual then + add_free_rels_until strict strongly_strict revpat n env t Conclusion v else v in match kind_of_term (whd_betadeltaiota env t) with | Prod (na,a,b) -> - let na',avoid = Termops.concrete_name false [] [] na b in + let na',avoid = concrete_name None [] [] na all b in let v = aux (push_rel (na',None,a) env) avoid 1 [na'] b in Array.to_list v | _ -> [] -let compute_implicits_auto env (_,strict,contextual) t = - let l = compute_implicits_gen strict contextual env t in - List.map (function - | (Name id, Some imp) -> Some (id,imp) - | (Anonymous, Some _) -> anomaly "Unnamed implicit" - | _ -> None) l - -let compute_implicits env t = compute_implicits_auto env (implicit_flags()) t - -let set_implicit id imp = - Some (id,match imp with None -> Manual | Some imp -> imp) - -let compute_manual_implicits flags ref l = - let t = Global.type_of_global ref in - let autoimps = compute_implicits_gen false true (Global.env()) t in +let rec prepare_implicits f = function + | [] -> [] + | (Anonymous, Some _)::_ -> anomaly "Unnamed implicit" + | (Name id, Some imp)::imps -> + let imps' = prepare_implicits f imps in + Some (id,imp,set_maximality imps' f.maximal) :: imps' + | _::imps -> None :: prepare_implicits f imps + +let compute_implicits_flags env f all t = + compute_implicits_gen + (f.strict or f.strongly_strict) f.strongly_strict + f.reversible_pattern f.contextual all env t + +let set_implicit id imp insmax = + (id,(match imp with None -> Manual false | Some imp -> imp),insmax) + +let merge_imps f = function + None -> Some (Manual f) + | x -> x + +let rec assoc_by_pos k = function + (ExplByPos (k', x), b) :: tl when k = k' -> (x,b), tl + | hd :: tl -> let (x, tl) = assoc_by_pos k tl in x, hd :: tl + | [] -> raise Not_found + +let compute_manual_implicits env flags t enriching l = + let autoimps = + if enriching then compute_implicits_flags env flags true t + else compute_implicits_gen false false false true true env t in let n = List.length autoimps in + let try_forced k l = + try + let (id, (b, f)), l' = assoc_by_pos k l in + if f then + let id = match id with Some id -> id | None -> id_of_string ("arg_" ^ string_of_int k) in + l', Some (id,Manual f,b) + else l, None + with Not_found -> l, None + in if not (list_distinct l) then error ("Some parameters are referred more than once"); (* Compare with automatic implicits to recover printing data and names *) let rec merge k l = function - | (Name id,imp)::imps -> - let l',imp = - try list_remove_first (ExplByPos k) l, set_implicit id imp - with Not_found -> - try list_remove_first (ExplByName id) l, set_implicit id imp - with Not_found -> - l, None in - imp :: merge (k+1) l' imps - | (Anonymous,imp)::imps -> - None :: merge (k+1) l imps - | [] when l = [] -> [] - | _ -> - match List.hd l with - | ExplByName id -> - error ("Wrong or not dependent implicit argument name: "^(string_of_id id)) - | ExplByPos i -> + | (Name id,imp)::imps -> + let l',imp,m = + try + let (b, f) = List.assoc (ExplByName id) l in + List.remove_assoc (ExplByName id) l, merge_imps f imp,Some b + with Not_found -> + try + let (id, (b, f)), l' = assoc_by_pos k l in + l', merge_imps f imp,Some b + with Not_found -> + l,imp, if enriching && imp <> None then Some flags.maximal else None + in + let imps' = merge (k+1) l' imps in + let m = Option.map (set_maximality imps') m in + Option.map (set_implicit id imp) m :: imps' + | (Anonymous,imp)::imps -> + let l', forced = try_forced k l in + forced :: merge (k+1) l' imps + | [] when l = [] -> [] + | [] -> + List.iter (function + | ExplByName id,(b,forced) -> + if not forced then + error ("Wrong or not dependent implicit argument name: "^(string_of_id id)) + | ExplByPos (i,_id),_t -> if i<1 or i>n then error ("Bad implicit argument number: "^(string_of_int i)) else errorlabstrm "" (str "Cannot set implicit argument number " ++ int i ++ - str ": it has no name") in + str ": it has no name")) + l; [] + in merge 1 l autoimps +let compute_implicits_auto env f manual t = + match manual with + [] -> let l = compute_implicits_flags env f false t in + prepare_implicits f l + | _ -> compute_manual_implicits env f t true manual + +let compute_implicits env t = compute_implicits_auto env !implicit_args [] t + +type maximal_insertion = bool (* true = maximal contextual insertion *) + type implicit_status = (* None = Not implicit *) - (identifier * implicit_explanation) option + (identifier * implicit_explanation * maximal_insertion) option type implicits_list = implicit_status list @@ -244,18 +327,26 @@ let is_status_implicit = function let name_of_implicit = function | None -> anomaly "Not an implicit argument" - | Some (id,_) -> id + | Some (id,_,_) -> id -(* [in_ctx] means we now the expected type, [n] is the index of the argument *) +let maximal_insertion_of = function + | Some (_,_,b) -> b + | None -> anomaly "Not an implicit argument" + +let forced_implicit = function + | Some (_,Manual b,_) -> b + | _ -> false + +(* [in_ctx] means we know the expected type, [n] is the index of the argument *) let is_inferable_implicit in_ctx n = function | None -> false - | Some (_,DepRigid (Hyp p)) -> n >= p - | Some (_,DepFlex (Hyp p)) -> false - | Some (_,DepFlexAndRigid (_,Hyp q)) -> n >= q - | Some (_,DepRigid Conclusion) -> in_ctx - | Some (_,DepFlex Conclusion) -> false - | Some (_,DepFlexAndRigid (_,Conclusion)) -> false - | Some (_,Manual) -> true + | Some (_,DepRigid (Hyp p),_) -> in_ctx or n >= p + | Some (_,DepFlex (Hyp p),_) -> false + | Some (_,DepFlexAndRigid (_,Hyp q),_) -> in_ctx or n >= q + | Some (_,DepRigid Conclusion,_) -> in_ctx + | Some (_,DepFlex Conclusion,_) -> false + | Some (_,DepFlexAndRigid (_,Conclusion),_) -> in_ctx + | Some (_,Manual _,_) -> true let positions_of_implicits = let rec aux n = function @@ -264,21 +355,18 @@ let positions_of_implicits = | None :: l -> aux (n+1) l in aux 1 -type strict_flag = bool (* true = strict *) -type contextual_flag = bool (* true = contextual *) - (*s Constants. *) -let compute_constant_implicits flags cst = +let compute_constant_implicits flags manual cst = let env = Global.env () in - compute_implicits_auto env flags (Typeops.type_of_constant env cst) + compute_implicits_auto env flags manual (Typeops.type_of_constant env cst) (*s Inductives and constructors. Their implicit arguments are stored in an array, indexed by the inductive number, of pairs $(i,v)$ where $i$ are the implicit arguments of the inductive and $v$ the array of implicit arguments of the constructors. *) -let compute_mib_implicits flags kn = +let compute_mib_implicits flags manual kn = let env = Global.env () in let mib = lookup_mind kn env in let ar = @@ -291,41 +379,56 @@ let compute_mib_implicits flags kn = let imps_one_inductive i mip = let ind = (kn,i) in let ar = type_of_inductive env (mib,mip) in - ((IndRef ind,compute_implicits_auto env flags ar), + ((IndRef ind,compute_implicits_auto env flags manual ar), Array.mapi (fun j c -> - (ConstructRef (ind,j+1),compute_implicits_auto env_ar flags c)) + (ConstructRef (ind,j+1),compute_implicits_auto env_ar flags manual c)) mip.mind_nf_lc) in Array.mapi imps_one_inductive mib.mind_packets -let compute_all_mib_implicits flags kn = - let imps = compute_mib_implicits flags kn in +let compute_all_mib_implicits flags manual kn = + let imps = compute_mib_implicits flags manual kn in List.flatten (array_map_to_list (fun (ind,cstrs) -> ind::Array.to_list cstrs) imps) (*s Variables. *) -let compute_var_implicits flags id = +let compute_var_implicits flags manual id = let env = Global.env () in let (_,_,ty) = lookup_named id env in - compute_implicits_auto env flags ty + compute_implicits_auto env flags manual ty (* Implicits of a global reference. *) -let compute_global_implicits flags = function - | VarRef id -> compute_var_implicits flags id - | ConstRef kn -> compute_constant_implicits flags kn +let compute_global_implicits flags manual = function + | VarRef id -> compute_var_implicits flags manual id + | ConstRef kn -> compute_constant_implicits flags manual kn | IndRef (kn,i) -> - let ((_,imps),_) = (compute_mib_implicits flags kn).(i) in imps + let ((_,imps),_) = (compute_mib_implicits flags manual kn).(i) in imps | ConstructRef ((kn,i),j) -> - let (_,cimps) = (compute_mib_implicits flags kn).(i) in snd cimps.(j-1) + let (_,cimps) = (compute_mib_implicits flags manual kn).(i) in snd cimps.(j-1) + +(* Merge a manual explicitation with an implicit_status list *) + +let list_split_at index l = + let rec aux i acc = function + tl when i = index -> (List.rev acc), tl + | hd :: tl -> aux (succ i) (hd :: acc) tl + | [] -> failwith "list_split_at: Invalid argument" + in aux 0 [] l + +let merge_impls oimpls impls = + let oimpls, _ = list_split_at (List.length oimpls - List.length impls) oimpls in + oimpls @ impls (* Caching implicits *) -type implicit_interactive_request = ImplAuto | ImplManual of explicitation list +type implicit_interactive_request = + | ImplAuto + | ImplManual of implicit_status list type implicit_discharge_request = - | ImplNoDischarge + | ImplLocal | ImplConstant of constant * implicits_flags | ImplMutualInductive of kernel_name * implicits_flags | ImplInteractive of global_reference * implicits_flags * @@ -348,11 +451,11 @@ let subst_implicits_decl subst (r,imps as o) = let r' = fst (subst_global subst r) in if r==r' then o else (r',imps) let subst_implicits (_,subst,(req,l)) = - (ImplNoDischarge,list_smartmap (subst_implicits_decl subst) l) + (ImplLocal,list_smartmap (subst_implicits_decl subst) l) let discharge_implicits (_,(req,l)) = match req with - | ImplNoDischarge -> None + | ImplLocal -> None | ImplInteractive (ref,flags,exp) -> Some (ImplInteractive (pop_global_reference ref,flags,exp),l) | ImplConstant (con,flags) -> @@ -360,20 +463,28 @@ let discharge_implicits (_,(req,l)) = | ImplMutualInductive (kn,flags) -> Some (ImplMutualInductive (pop_kn kn,flags),l) -let rebuild_implicits (req,l) = +let rebuild_implicits (info,(req,l)) = + let manual = List.fold_left (fun acc (id, impl, keep) -> + if impl then (ExplByName id, (true, true)) :: acc else acc) + [] info + in let l' = match req with - | ImplNoDischarge -> assert false + | ImplLocal -> assert false | ImplConstant (con,flags) -> - [ConstRef con,compute_constant_implicits flags con] + [ConstRef con, compute_constant_implicits flags manual con] | ImplMutualInductive (kn,flags) -> - compute_all_mib_implicits flags kn + compute_all_mib_implicits flags manual kn | ImplInteractive (ref,flags,o) -> match o with - | ImplAuto -> [ref,compute_global_implicits flags ref] - | ImplManual l -> - error "Discharge of global manually given implicit arguments not implemented" in - (req,l') + | ImplAuto -> [ref,compute_global_implicits flags manual ref] + | ImplManual l -> + let auto = compute_global_implicits flags manual ref in +(* let auto = if flags.main then auto else List.map (fun _ -> None) auto in *) + let l' = merge_impls auto l in [ref,l'] + in (req,l') +let export_implicits (req,_ as x) = + if req = ImplLocal then None else Some x let (inImplicits, _) = declare_object {(default_object "IMPLICITS") with @@ -383,46 +494,56 @@ let (inImplicits, _) = classify_function = (fun (_,x) -> Substitute x); discharge_function = discharge_implicits; rebuild_function = rebuild_implicits; - export_function = (fun x -> Some x) } + export_function = export_implicits } let declare_implicits_gen req flags ref = - let imps = compute_global_implicits flags ref in + let imps = compute_global_implicits flags [] ref in add_anonymous_leaf (inImplicits (req,[ref,imps])) let declare_implicits local ref = - let flags = (true,!strict_implicit_args,!contextual_implicit_args) in + let flags = { !implicit_args with main = true } in let req = - if local then ImplNoDischarge else ImplInteractive(ref,flags,ImplAuto) in + if local then ImplLocal else ImplInteractive(ref,flags,ImplAuto) in declare_implicits_gen req flags ref let declare_var_implicits id = - if !implicit_args then - declare_implicits_gen ImplNoDischarge (implicit_flags ()) (VarRef id) + if !implicit_args.main then + declare_implicits_gen ImplLocal !implicit_args (VarRef id) let declare_constant_implicits con = - if !implicit_args then - let flags = implicit_flags () in + if !implicit_args.main then + let flags = !implicit_args in declare_implicits_gen (ImplConstant (con,flags)) flags (ConstRef con) let declare_mib_implicits kn = - if !implicit_args then - let flags = implicit_flags () in + if !implicit_args.main then + let flags = !implicit_args in let imps = array_map_to_list (fun (ind,cstrs) -> ind::(Array.to_list cstrs)) - (compute_mib_implicits flags kn) in + (compute_mib_implicits flags [] kn) in add_anonymous_leaf (inImplicits (ImplMutualInductive (kn,flags),List.flatten imps)) (* Declare manual implicits *) +type manual_explicitation = Topconstr.explicitation * (bool * bool) + +let compute_implicits_with_manual env typ enriching l = + compute_manual_implicits env !implicit_args typ enriching l -let declare_manual_implicits local ref l = - let flags = !implicit_args,!strict_implicit_args,!contextual_implicit_args in - let l' = compute_manual_implicits flags ref l in +let declare_manual_implicits local ref enriching l = + let flags = !implicit_args in + let env = Global.env () in + let t = Global.type_of_global ref in + let l' = compute_manual_implicits env flags t enriching l in let req = - if local or isVarRef ref then ImplNoDischarge - else ImplInteractive(ref,flags,ImplManual l) + if local or isVarRef ref then ImplLocal + else ImplInteractive(ref,flags,ImplManual l') in - add_anonymous_leaf (inImplicits (req,[ref,l'])) + add_anonymous_leaf (inImplicits (req,[ref,l'])) + +let maybe_declare_manual_implicits local ref enriching l = + if l = [] then () + else declare_manual_implicits local ref enriching l (*s Registration as global tables *) diff --git a/library/impargs.mli b/library/impargs.mli index 64ce0360..5b55af82 100644 --- a/library/impargs.mli +++ b/library/impargs.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: impargs.mli 9488 2007-01-17 11:11:58Z herbelin $ i*) +(*i $Id: impargs.mli 10741 2008-04-02 15:47:07Z msozeau $ i*) (*i*) open Names @@ -21,11 +21,17 @@ open Nametab val make_implicit_args : bool -> unit val make_strict_implicit_args : bool -> unit +val make_strongly_strict_implicit_args : bool -> unit +val make_reversible_pattern_implicit_args : bool -> unit val make_contextual_implicit_args : bool -> unit +val make_maximal_implicit_args : bool -> unit val is_implicit_args : unit -> bool val is_strict_implicit_args : unit -> bool +val is_strongly_strict_implicit_args : unit -> bool +val is_reversible_pattern_implicit_args : unit -> bool val is_contextual_implicit_args : unit -> bool +val is_maximal_implicit_args : unit -> bool type implicits_flags val with_implicits : implicits_flags -> ('a -> 'b) -> 'a -> 'b @@ -35,9 +41,13 @@ val with_implicits : implicits_flags -> ('a -> 'b) -> 'a -> 'b type implicit_status type implicits_list = implicit_status list +type implicit_explanation + val is_status_implicit : implicit_status -> bool val is_inferable_implicit : bool -> int -> implicit_status -> bool val name_of_implicit : implicit_status -> identifier +val maximal_insertion_of : implicit_status -> bool +val forced_implicit : implicit_status -> bool val positions_of_implicits : implicits_list -> int list @@ -45,6 +55,13 @@ val positions_of_implicits : implicits_list -> int list for an object of the given type in the given env *) val compute_implicits : env -> types -> implicits_list +(* A [manual_explicitation] is a tuple of a positional or named explicitation with + maximal insertion and forcing flags. *) +type manual_explicitation = Topconstr.explicitation * (bool * bool) + +val compute_implicits_with_manual : env -> types -> bool -> + manual_explicitation list -> implicits_list + (*s Computation of implicits (done using the global environment). *) val declare_var_implicits : variable -> unit @@ -53,8 +70,16 @@ val declare_mib_implicits : mutual_inductive -> unit val declare_implicits : bool -> global_reference -> unit -(* Manual declaration of which arguments are expected implicit *) -val declare_manual_implicits : bool -> global_reference -> - Topconstr.explicitation list -> unit +(* [declare_manual_implicits local ref enriching l] + Manual declaration of which arguments are expected implicit. + Unsets implicits if [l] is empty. *) + +val declare_manual_implicits : bool -> global_reference -> bool -> + manual_explicitation list -> unit + +(* If the list is empty, do nothing, otherwise declare the implicits. *) + +val maybe_declare_manual_implicits : bool -> global_reference -> bool -> + manual_explicitation list -> unit val implicits_of_global : global_reference -> implicits_list diff --git a/library/lib.ml b/library/lib.ml index 4a4e90c1..ce3d2520 100644 --- a/library/lib.ml +++ b/library/lib.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: lib.ml 10269 2007-10-29 11:09:43Z notin $ *) +(* $Id: lib.ml 10982 2008-05-24 14:32:25Z herbelin $ *) open Pp open Util @@ -22,9 +22,11 @@ type node = | Leaf of obj | CompilingLibrary of object_prefix | OpenedModule of bool option * object_prefix * Summary.frozen + | ClosedModule of library_segment | OpenedModtype of object_prefix * Summary.frozen + | ClosedModtype of library_segment | OpenedSection of object_prefix * Summary.frozen - | ClosedSection + | ClosedSection of library_segment | FrozenState of Summary.frozen and library_entry = object_name * node @@ -60,7 +62,11 @@ let classify_segment seg = clean ((id,o')::substl, keepl, anticipl) stk | Anticipate o' -> clean (substl, keepl, o'::anticipl) stk) - | (oname,ClosedSection) :: stk -> clean acc stk + | (_,ClosedSection _) :: stk -> clean acc stk + (* LEM; TODO: Understand what this does and see if what I do is the + correct thing for ClosedMod(ule|type) *) + | (_,ClosedModule _) :: stk -> clean acc stk + | (_,ClosedModtype _) :: stk -> clean acc stk | (_,OpenedSection _) :: _ -> error "there are still opened sections" | (_,OpenedModule _) :: _ -> error "there are still opened modules" | (_,OpenedModtype _) :: _ -> error "there are still opened module types" @@ -92,11 +98,15 @@ let library_dp () = module path and relative section path *) let path_prefix = ref initial_prefix - let cwd () = fst !path_prefix let make_path id = Libnames.make_path (cwd ()) id +let path_of_include () = + let dir = Names.repr_dirpath (cwd ()) in + let new_dir = List.tl dir in + let id = List.hd dir in + Libnames.make_path (Names.make_dirpath new_dir) id let current_prefix () = snd !path_prefix @@ -150,18 +160,32 @@ let find_split_p p = in find !lib_stk -let split_lib sp = +let split_lib_gen test = let rec collect after equal = function - | ((sp',_) as hd)::before -> - if sp = sp' then collect after (hd::equal) before else after,equal,hd::before - | [] -> after,equal,[] + | hd::strict_before as before -> + if test hd then collect after (hd::equal) strict_before else after,equal,before + | [] as before -> after,equal,before in let rec findeq after = function - | ((sp',_) as hd)::before -> - if sp = sp' then collect after [hd] before else findeq (hd::after) before - | [] -> error "no such entry" - in - findeq [] !lib_stk + | hd :: before -> + if test hd + then Some (collect after [hd] before) + else (match hd with + | (sp,ClosedModule seg) + | (sp,ClosedModtype seg) + | (sp,ClosedSection seg) -> + (match findeq after seg with + | None -> findeq (hd::after) before + | Some (sub_after,sub_equal,sub_before) -> + Some (sub_after, sub_equal, (List.append sub_before before))) + | _ -> findeq (hd::after) before) + | [] -> None + in + match findeq [] !lib_stk with + | None -> error "no such entry" + | Some r -> r + +let split_lib sp = split_lib_gen (fun x -> (fst x) = sp) (* Adding operations. *) @@ -190,9 +214,9 @@ let add_leaf id obj = add_entry oname (Leaf obj); oname -let add_discharged_leaf id obj = +let add_discharged_leaf id varinfo obj = let oname = make_oname id in - let newobj = rebuild_object obj in + let newobj = rebuild_object (varinfo, obj) in cache_object (oname,newobj); add_entry oname (Leaf newobj) @@ -216,12 +240,25 @@ let add_frozen_state () = (* Modules. *) + let is_something_opened = function (_,OpenedSection _) -> true | (_,OpenedModule _) -> true | (_,OpenedModtype _) -> true | _ -> false + +let current_mod_id () = + try match find_entry_p is_something_opened with + | oname,OpenedModule (_,_,nametab) -> + basename (fst oname) + | oname,OpenedModtype (_,nametab) -> + basename (fst oname) + | _ -> error "you are not in a module" + with Not_found -> + error "no opened modules" + + let start_module export id mp nametab = let dir = extend_dirpath (fst !path_prefix) id in let prefix = dir,(mp,empty_dirpath) in @@ -253,9 +290,15 @@ let end_module id = with Not_found -> error "no opened modules" in - let (after,_,before) = split_lib oname in + let (after,modopening,before) = split_lib oname in lib_stk := before; + add_entry (make_oname id) (ClosedModule (List.rev_append after (List.rev modopening))); let prefix = !path_prefix in + (* LEM: This module business seems more complicated than sections; + shouldn't a backtrack into a closed module also do something + with global.ml, given that closing a module does? + TODO + *) recalc_path_prefix (); (* add_frozen_state must be called after processing the module, because we cannot recache interactive modules *) @@ -292,8 +335,9 @@ let end_modtype id = with Not_found -> error "no opened module types" in - let (after,_,before) = split_lib sp in + let (after,modtypeopening,before) = split_lib sp in lib_stk := before; + add_entry (make_oname id) (ClosedModtype (List.rev_append after (List.rev modtypeopening))); let dir = !path_prefix in recalc_path_prefix (); (* add_frozen_state must be called after processing the module type. @@ -396,18 +440,19 @@ let what_is_opened () = find_entry_p is_something_opened type abstr_list = Sign.named_context Cmap.t * Sign.named_context KNmap.t let sectab = - ref ([] : (identifier list * Cooking.work_list * abstr_list) list) + ref ([] : ((identifier * bool * Term.types option) list * Cooking.work_list * abstr_list) list) let add_section () = sectab := ([],(Cmap.empty,KNmap.empty),(Cmap.empty,KNmap.empty)) :: !sectab -let add_section_variable id = +let add_section_variable id impl keep = match !sectab with | [] -> () (* because (Co-)Fixpoint temporarily uses local vars *) - | (vars,repl,abs)::sl -> sectab := (id::vars,repl,abs)::sl + | (vars,repl,abs)::sl -> sectab := ((id,impl,keep)::vars,repl,abs)::sl let rec extract_hyps = function - | (id::idl,(id',_,_ as d)::hyps) when id=id' -> d :: extract_hyps (idl,hyps) + | ((id,impl,keep)::idl,(id',_,_ as d)::hyps) when id=id' -> d :: extract_hyps (idl,hyps) + | ((id,impl,Some ty)::idl,hyps) -> (id,None,ty) :: extract_hyps (idl,hyps) | (id::idl,hyps) -> extract_hyps (idl,hyps) | [], _ -> [] @@ -429,6 +474,8 @@ let add_section_constant kn = let replacement_context () = pi2 (List.hd !sectab) +let variables_context () = pi1 (List.hd !sectab) + let section_segment_of_constant con = Cmap.find con (fst (pi3 (List.hd !sectab))) @@ -442,15 +489,15 @@ let section_instance = function | IndRef (kn,_) | ConstructRef ((kn,_),_) -> KNmap.find kn (snd (pi2 (List.hd !sectab))) -let init () = sectab := [] -let freeze () = !sectab -let unfreeze s = sectab := s +let init_sectab () = sectab := [] +let freeze_sectab () = !sectab +let unfreeze_sectab s = sectab := s let _ = Summary.declare_summary "section-context" - { Summary.freeze_function = freeze; - Summary.unfreeze_function = unfreeze; - Summary.init_function = init; + { Summary.freeze_function = freeze_sectab; + Summary.unfreeze_function = unfreeze_sectab; + Summary.init_function = init_sectab; Summary.survive_module = false; Summary.survive_section = false } @@ -476,7 +523,7 @@ let open_section id = (*Pushed for the lifetime of the section: removed by unfrozing the summary*) Nametab.push_dir (Nametab.Until 1) dir (DirOpenSection prefix); path_prefix := prefix; - if !Options.xml_export then !xml_open_section id; + if !Flags.xml_export then !xml_open_section id; add_section () @@ -486,9 +533,9 @@ let open_section id = let discharge_item ((sp,_ as oname),e) = match e with | Leaf lobj -> - option_map (fun o -> (basename sp,o)) (discharge_object (oname,lobj)) + Option.map (fun o -> (basename sp,o)) (discharge_object (oname,lobj)) | FrozenState _ -> None - | ClosedSection -> None + | ClosedSection _ | ClosedModtype _ | ClosedModule _ -> None | OpenedSection _ | OpenedModtype _ | OpenedModule _ | CompilingLibrary _ -> anomaly "discharge_item" @@ -504,21 +551,29 @@ let close_section id = with Not_found -> error "no opened section" in - let (secdecls,_,before) = split_lib oname in + let var_info = List.map + (fun (x, y, z) -> (x, y, match z with Some _ -> true | None -> false)) + (variables_context ()) + in + let (secdecls,secopening,before) = split_lib oname in lib_stk := before; let full_olddir = fst !path_prefix in pop_path_prefix (); - add_entry (make_oname id) ClosedSection; - if !Options.xml_export then !xml_close_section id; + add_entry (make_oname id) (ClosedSection (List.rev_append secdecls (List.rev secopening))); + if !Flags.xml_export then !xml_close_section id; let newdecls = List.map discharge_item secdecls in Summary.section_unfreeze_summaries fs; - List.iter (option_iter (fun (id,o) -> add_discharged_leaf id o)) newdecls; + List.iter (Option.iter (fun (id,o) -> add_discharged_leaf id var_info o)) newdecls; Cooking.clear_cooking_sharing (); Nametab.push_dir (Nametab.Until 1) full_olddir (DirClosedSection full_olddir) (*****************) (* Backtracking. *) +let (inLabel,outLabel) = + declare_object {(default_object "DOT") with + classify_function = (fun _ -> Dispose)} + let recache_decl = function | (sp, Leaf o) -> cache_object (sp,o) | (_,OpenedSection _) -> add_section () @@ -529,16 +584,58 @@ let recache_context ctx = let is_frozen_state = function (_,FrozenState _) -> true | _ -> false -let reset_to sp = - let (_,_,before) = split_lib sp in - lib_stk := before; +let has_top_frozen_state () = + let rec aux = function + | (sp, FrozenState _)::_ -> Some sp + | (sp, Leaf o)::t when object_tag o = "DOT" -> aux t + | _ -> None + in aux !lib_stk + +let set_lib_stk new_lib_stk = + lib_stk := new_lib_stk; recalc_path_prefix (); let spf = match find_entry_p is_frozen_state with | (sp, FrozenState f) -> unfreeze_summaries f; sp | _ -> assert false in let (after,_,_) = split_lib spf in - recache_context after + try + recache_context after + with + | Not_found -> error "Tried to set environment to an incoherent state." + +let reset_to_gen test = + let (_,_,before) = split_lib_gen test in + set_lib_stk before + +let reset_to sp = reset_to_gen (fun x -> (fst x) = sp) + +let reset_to_state sp = + let (_,eq,before) = split_lib sp in + (* if eq a frozen state, we'll reset to it *) + match eq with + | [_,FrozenState f] -> lib_stk := eq@before; unfreeze_summaries f + | _ -> error "Not a frozen state" + + +(* LEM: TODO + * We will need to muck with frozen states in after, too! + * Not only FrozenState, but also those embedded in Opened(Section|Module|Modtype) + *) +let delete_gen test = + let (after,equal,before) = split_lib_gen test in + let rec chop_at_dot = function + | [] as l -> l + | (_, Leaf o)::t when object_tag o = "DOT" -> t + | _::t -> chop_at_dot t + and chop_before_dot = function + | [] as l -> l + | (_, Leaf o)::t as l when object_tag o = "DOT" -> l + | _::t -> chop_before_dot t + in + set_lib_stk (List.rev_append (chop_at_dot after) (chop_before_dot before)) + +let delete sp = delete_gen (fun x -> (fst x) = sp) let reset_name (loc,id) = let (sp,_) = @@ -549,10 +646,20 @@ let reset_name (loc,id) = in reset_to sp +let remove_name (loc,id) = + let (sp,_) = + try + find_entry_p (fun (sp,_) -> let (_,spi) = repr_path (fst sp) in id = spi) + with Not_found -> + user_err_loc (loc,"remove_name",pr_id id ++ str ": no such entry") + in + delete sp + let is_mod_node = function | OpenedModule _ | OpenedModtype _ | OpenedSection _ - | ClosedSection -> true - | Leaf o -> let t = object_tag o in t = "MODULE" || t = "MODULE TYPE" + | ClosedModule _ | ClosedModtype _ | ClosedSection _ -> true + | Leaf o -> let t = object_tag o in t = "MODULE" || t = "MODULE TYPE" + || t = "MODULE ALIAS" | _ -> false (* Reset on a module or section name in order to bypass constants with @@ -567,19 +674,7 @@ let reset_mod (loc,id) = with Not_found -> user_err_loc (loc,"reset_mod",pr_id id ++ str ": no such entry") in - lib_stk := before; - recalc_path_prefix (); - let spf = match find_entry_p is_frozen_state with - | (sp, FrozenState f) -> unfreeze_summaries f; sp - | _ -> assert false - in - let (after,_,_) = split_lib spf in - recache_context after - - -let (inLabel,outLabel) = - declare_object {(default_object "DOT") with - classify_function = (fun _ -> Dispose)} + set_lib_stk before let mark_end_of_command, current_command_label, set_command_label = let n = ref 0 in @@ -590,17 +685,23 @@ let mark_end_of_command, current_command_label, set_command_label = (fun () -> !n), (fun x -> n:=x) -let rec reset_label_stk n stk = - match stk with - (sp,Leaf o)::tail when object_tag o = "DOT" && n = outLabel o -> sp - | _::tail -> reset_label_stk n tail - | [] -> error "Unknown state number" +let is_label_n n x = + match x with + | (sp,Leaf o) when object_tag o = "DOT" && n = outLabel o -> true + | _ -> false +(* Reset the label registered by [mark_end_of_command()] with number n. *) let reset_label n = - let res = reset_label_stk n !lib_stk in - set_command_label (n-1); (* forget state numbers after n only if reset succeeded *) - reset_to res - + let current = current_command_label() in + if n < current then + let res = reset_to_gen (is_label_n n) in + set_command_label (n-1); (* forget state numbers after n only if reset succeeded *) + res + else (* optimisation to avoid recaching when not necessary (why is it so long??) *) + match !lib_stk with + | [] -> () + | x :: ls -> (lib_stk := ls;set_command_label (n-1)) + let rec back_stk n stk = match stk with (sp,Leaf o)::tail when object_tag o = "DOT" -> @@ -688,6 +789,14 @@ let remove_section_part ref = (************************) (* Discharging names *) +let pop_kn kn = + let (mp,dir,l) = Names.repr_kn kn in + Names.make_kn mp (dirpath_prefix dir) l + +let pop_con con = + let (mp,dir,l) = Names.repr_con con in + Names.make_con mp (dirpath_prefix dir) l + let con_defined_in_sec kn = let _,dir,_ = repr_con kn in dir <> empty_dirpath && fst (split_dirpath dir) = snd (current_prefix ()) diff --git a/library/lib.mli b/library/lib.mli index ec896de5..64074cfd 100644 --- a/library/lib.mli +++ b/library/lib.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: lib.mli 9488 2007-01-17 11:11:58Z herbelin $ i*) +(*i $Id: lib.mli 11046 2008-06-03 22:48:06Z msozeau $ i*) (*i*) open Util @@ -25,9 +25,11 @@ type node = | Leaf of obj | CompilingLibrary of object_prefix | OpenedModule of bool option * object_prefix * Summary.frozen + | ClosedModule of library_segment | OpenedModtype of object_prefix * Summary.frozen + | ClosedModtype of library_segment | OpenedSection of object_prefix * Summary.frozen - | ClosedSection + | ClosedSection of library_segment | FrozenState of Summary.frozen and library_segment = (object_name * node) list @@ -65,8 +67,14 @@ val add_anonymous_leaf : obj -> unit val add_leaves : identifier -> obj list -> object_name val add_frozen_state : unit -> unit + +(* Adds a "dummy" entry in lib_stk with a unique new label number. *) val mark_end_of_command : unit -> unit +(* Returns the current label number *) val current_command_label : unit -> int +(* [reset_label n ] resets [lib_stk] to the label n registered by + [mark_end_of_command()]. That is it forgets the label and anything + registered after it. *) val reset_label : int -> unit (*s The function [contents_after] returns the current library segment, @@ -80,6 +88,7 @@ val contents_after : object_name option -> library_segment (* User-side names *) val cwd : unit -> dir_path val make_path : identifier -> section_path +val path_of_include : unit -> section_path (* Kernel-side names *) val current_prefix : unit -> module_path * dir_path @@ -93,7 +102,7 @@ val sections_depth : unit -> int (* Are we inside an opened module type *) val is_modtype : unit -> bool val is_module : unit -> bool - +val current_mod_id : unit -> module_ident (* Returns the most recent OpenedThing node *) val what_is_opened : unit -> object_name * node @@ -122,6 +131,7 @@ val end_compilation : dir_path -> object_prefix * library_segment val library_dp : unit -> dir_path (* Extract the library part of a name even if in a section *) +val dp_of_mp : module_path -> dir_path val library_part : global_reference -> dir_path val remove_section_part : global_reference -> dir_path @@ -134,7 +144,11 @@ val close_section : identifier -> unit val reset_to : object_name -> unit val reset_name : identifier located -> unit +val remove_name : identifier located -> unit val reset_mod : identifier located -> unit +val reset_to_state : object_name -> unit + +val has_top_frozen_state : unit -> object_name option (* [back n] resets to the place corresponding to the $n$-th call of [mark_end_of_command] (counting backwards) *) @@ -165,7 +179,7 @@ val section_segment_of_mutual_inductive: mutual_inductive -> Sign.named_context val section_instance : global_reference -> identifier array -val add_section_variable : identifier -> unit +val add_section_variable : identifier -> bool -> Term.types option -> unit val add_section_constant : constant -> Sign.named_context -> unit val add_section_kn : kernel_name -> Sign.named_context -> unit val replacement_context : unit -> diff --git a/library/libnames.ml b/library/libnames.ml index 07c9ad23..31822da4 100644 --- a/library/libnames.ml +++ b/library/libnames.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: libnames.ml 9488 2007-01-17 11:11:58Z herbelin $ i*) +(*i $Id: libnames.ml 10580 2008-02-22 13:39:13Z lmamane $ i*) open Pp open Util @@ -15,6 +15,7 @@ open Nameops open Term open Mod_subst +(*s Global reference is a kernel side type for all references together *) type global_reference = | VarRef of variable | ConstRef of constant diff --git a/library/libnames.mli b/library/libnames.mli index 9bf6918e..d4942061 100644 --- a/library/libnames.mli +++ b/library/libnames.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: libnames.mli 9488 2007-01-17 11:11:58Z herbelin $ i*) +(*i $Id: libnames.mli 10308 2007-11-09 09:40:21Z herbelin $ i*) (*i*) open Pp diff --git a/library/libobject.ml b/library/libobject.ml index eaaa1be1..ff78f527 100644 --- a/library/libobject.ml +++ b/library/libobject.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: libobject.ml 9488 2007-01-17 11:11:58Z herbelin $ *) +(* $Id: libobject.ml 10741 2008-04-02 15:47:07Z msozeau $ *) open Util open Names @@ -28,6 +28,7 @@ let relax b = relax_flag := b;; type 'a substitutivity = Dispose | Substitute of 'a | Keep of 'a | Anticipate of 'a +type discharge_info = (identifier * bool * bool) list type 'a object_declaration = { object_name : string; @@ -37,7 +38,7 @@ type 'a object_declaration = { classify_function : object_name * 'a -> 'a substitutivity; subst_function : object_name * substitution * 'a -> 'a; discharge_function : object_name * 'a -> 'a option; - rebuild_function : 'a -> 'a; + rebuild_function : discharge_info * 'a -> 'a; export_function : 'a -> 'a option } let yell s = anomaly s @@ -51,7 +52,7 @@ let default_object s = { yell ("The object "^s^" does not know how to substitute!")); classify_function = (fun (_,obj) -> Keep obj); discharge_function = (fun _ -> None); - rebuild_function = (fun x -> x); + rebuild_function = (fun (_,x) -> x); export_function = (fun _ -> None)} @@ -77,7 +78,7 @@ type dynamic_object_declaration = { dyn_subst_function : object_name * substitution * obj -> obj; dyn_classify_function : object_name * obj -> obj substitutivity; dyn_discharge_function : object_name * obj -> obj option; - dyn_rebuild_function : obj -> obj; + dyn_rebuild_function : discharge_info * obj -> obj; dyn_export_function : obj -> obj option } let object_tag lobj = Dyn.tag lobj @@ -112,15 +113,15 @@ let declare_object odecl = anomaly "somehow we got the wrong dynamic object in the classifyfun" and discharge (oname,lobj) = if Dyn.tag lobj = na then - option_map infun (odecl.discharge_function (oname,outfun lobj)) + Option.map infun (odecl.discharge_function (oname,outfun lobj)) else anomaly "somehow we got the wrong dynamic object in the dischargefun" - and rebuild lobj = - if Dyn.tag lobj = na then infun (odecl.rebuild_function (outfun lobj)) + and rebuild (varinfo,lobj) = + if Dyn.tag lobj = na then infun (odecl.rebuild_function (varinfo,outfun lobj)) else anomaly "somehow we got the wrong dynamic object in the rebuildfun" and exporter lobj = if Dyn.tag lobj = na then - option_map infun (odecl.export_function (outfun lobj)) + Option.map infun (odecl.export_function (outfun lobj)) else anomaly "somehow we got the wrong dynamic object in the exportfun" @@ -173,8 +174,8 @@ let classify_object ((_,lobj) as node) = let discharge_object ((_,lobj) as node) = apply_dyn_fun None (fun d -> d.dyn_discharge_function node) lobj -let rebuild_object lobj = - apply_dyn_fun lobj (fun d -> d.dyn_rebuild_function lobj) lobj +let rebuild_object ((_,lobj) as node) = + apply_dyn_fun lobj (fun d -> d.dyn_rebuild_function node) lobj let export_object lobj = apply_dyn_fun None (fun d -> d.dyn_export_function lobj) lobj diff --git a/library/libobject.mli b/library/libobject.mli index 376da1f5..5f6cf13b 100644 --- a/library/libobject.mli +++ b/library/libobject.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: libobject.mli 9488 2007-01-17 11:11:58Z herbelin $ i*) +(*i $Id: libobject.mli 10840 2008-04-23 21:29:34Z herbelin $ i*) (*i*) open Names @@ -51,6 +51,14 @@ open Mod_subst this function should be declared for substitutive objects only (see obove) + * a discharge function, that is applied at section closing time to + collect the data necessary to rebuild the discharged form of the + non volatile objects + + * a rebuild function, that is applied after section closing to + rebuild the non volatile content of a section from the data + collected by the discharge function + * an export function, to enable optional writing of its contents to disk (.vo). This function is also the oportunity to remove redundant information in order to keep .vo size small @@ -63,6 +71,8 @@ open Mod_subst type 'a substitutivity = Dispose | Substitute of 'a | Keep of 'a | Anticipate of 'a +type discharge_info = (identifier * bool * bool) list + type 'a object_declaration = { object_name : string; cache_function : object_name * 'a -> unit; @@ -71,7 +81,7 @@ type 'a object_declaration = { classify_function : object_name * 'a -> 'a substitutivity; subst_function : object_name * substitution * 'a -> 'a; discharge_function : object_name * 'a -> 'a option; - rebuild_function : 'a -> 'a; + rebuild_function : discharge_info * 'a -> 'a; export_function : 'a -> 'a option } (* The default object is a "Keep" object with empty methods. @@ -106,5 +116,5 @@ val subst_object : object_name * substitution * obj -> obj val classify_object : object_name * obj -> obj substitutivity val export_object : obj -> obj option val discharge_object : object_name * obj -> obj option -val rebuild_object : obj -> obj +val rebuild_object : discharge_info * obj -> obj val relax : bool -> unit diff --git a/library/library.ml b/library/library.ml index 3a3328ad..2904edc2 100644 --- a/library/library.ml +++ b/library/library.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: library.ml 9525 2007-01-24 08:43:01Z herbelin $ *) +(* $Id: library.ml 11181 2008-06-27 07:35:45Z notin $ *) open Pp open Util @@ -86,10 +86,10 @@ let add_load_path (phys_path,coq_path) = begin (* Assume the user is concerned by library naming *) if dir <> Nameops.default_root_prefix then - (Options.if_verbose warning (phys_path^" was previously bound to " - ^(string_of_dirpath dir) - ^("\nIt is remapped to "^(string_of_dirpath coq_path))); - flush_all ()); + Flags.if_warn msg_warning + (str phys_path ++ strbrk " was previously bound to " ++ + pr_dirpath dir ++ strbrk "; it is remapped to " ++ + pr_dirpath coq_path); remove_load_path phys_path; load_paths := (phys_path::fst !load_paths, coq_path::snd !load_paths) end @@ -122,7 +122,6 @@ type library_disk = { type library_t = { library_name : compilation_unit_name; - library_filename : System.physical_path; library_compiled : compiled_library; library_objects : library_objects; library_deps : (compilation_unit_name * Digest.t) list; @@ -138,10 +137,15 @@ module LibraryOrdered = end module LibraryMap = Map.Make(LibraryOrdered) +module LibraryFilenameMap = Map.Make(LibraryOrdered) (* This is a map from names to loaded libraries *) let libraries_table = ref LibraryMap.empty +(* This is the map of loaded libraries filename *) +(* (not synchronized so as not to be caught in the states on disk) *) +let libraries_filename_table = ref LibraryFilenameMap.empty + (* These are the _ordered_ sets of loaded, imported and exported libraries *) let libraries_loaded_list = ref [] let libraries_imports_list = ref [] @@ -183,7 +187,15 @@ let try_find_library dir = with Not_found -> error ("Unknown library " ^ (string_of_dirpath dir)) -let library_full_filename dir = (find_library dir).library_filename +let register_library_filename dir f = + (* Not synchronized: overwrite the previous binding if one existed *) + (* from a previous play of the session *) + libraries_filename_table := + LibraryFilenameMap.add dir f !libraries_filename_table + +let library_full_filename dir = + try LibraryFilenameMap.find dir !libraries_filename_table + with Not_found -> "" let library_is_loaded dir = try let _ = find_library dir in true @@ -300,7 +312,7 @@ let (in_import, out_import) = (*s Loading from disk to cache (preparation phase) *) -let vo_magic_number = 080992 (* V8.1 beta2 *) +let vo_magic_number = 08193 (* v8.2beta3 *) let (raw_extern_library, raw_intern_library) = System.raw_extern_intern vo_magic_number ".vo" @@ -309,7 +321,7 @@ let with_magic_number_check f a = try f a with System.Bad_magic_number fname -> errorlabstrm "with_magic_number_check" - (str"file " ++ str fname ++ spc () ++ str"has bad magic number." ++ + (str"File " ++ str fname ++ spc () ++ str"has bad magic number." ++ spc () ++ str"It is corrupted" ++ spc () ++ str"or was compiled with another version of Coq.") @@ -331,9 +343,9 @@ let locate_absolute_library dir = (dir, file) with Not_found -> (* Last chance, removed from the file system but still in memory *) - try + if library_is_loaded dir then (dir, library_full_filename dir) - with Not_found -> + else raise LibNotFound let locate_qualified_library qid = @@ -351,10 +363,9 @@ let locate_qualified_library qid = let path, file = System.where_in_path loadpath name in let dir = extend_dirpath (find_logical_path path) base in (* Look if loaded *) - try - (LibLoaded, dir, library_full_filename dir) - with Not_found -> - (LibInPath, dir, file) + if library_is_loaded dir then (LibLoaded, dir, library_full_filename dir) + (* Otherwise, look for it in the file system *) + else (LibInPath, dir, file) with Not_found -> raise LibNotFound let explain_locate_library_error qid = function @@ -386,11 +397,10 @@ let try_locate_qualified_library (loc,qid) = (* Internalise libraries *) let lighten_library m = - if !Options.dont_load_proofs then lighten_library m else m + if !Flags.dont_load_proofs then lighten_library m else m -let mk_library md f digest = { +let mk_library md digest = { library_name = md.md_name; - library_filename = f; library_compiled = lighten_library md.md_compiled; library_objects = md.md_objects; library_deps = md.md_deps; @@ -402,7 +412,8 @@ let intern_from_file f = let md = System.marshal_in ch in let digest = System.marshal_in ch in close_in ch; - mk_library md f digest + register_library_filename md.md_name f; + mk_library md digest let rec intern_library needed (dir, f) = (* Look if in the current logical environment *) @@ -426,9 +437,9 @@ and intern_library_deps needed dir m = and intern_mandatory_library caller needed (dir,d) = let m,needed = intern_library needed (try_locate_absolute_library dir) in if d <> m.library_digest then - error ("compiled library "^(string_of_dirpath caller)^ - " makes inconsistent assumptions over library " - ^(string_of_dirpath dir)); + errorlabstrm "" (strbrk ("Compiled library "^(string_of_dirpath caller)^ + ".vo makes inconsistent assumptions over library " + ^(string_of_dirpath dir))); needed let rec_intern_library needed mref = @@ -443,17 +454,18 @@ let check_library_short_name f dir = function | _ -> () let rec_intern_by_filename_only id f = - let m = intern_from_file f in + let m = try intern_from_file f with Sys_error s -> error s in (* Only the base name is expected to match *) check_library_short_name f m.library_name id; (* We check no other file containing same library is loaded *) - try - let m' = find_library m.library_name in - Options.if_verbose warning - ((string_of_dirpath m.library_name)^" is already loaded from file "^ - m'.library_filename); - m.library_name, [] - with Not_found -> + if library_is_loaded m.library_name then + begin + Flags.if_verbose warning + ((string_of_dirpath m.library_name)^" is already loaded from file "^ + library_full_filename m.library_name); + m.library_name, [] + end + else let needed = intern_library_deps [] m.library_name m in m.library_name, needed @@ -496,7 +508,7 @@ let register_library (dir,m) = (* [needed] is the ordered list of libraries not already loaded *) let cache_require (_,(needed,modl,export)) = List.iter register_library needed; - option_iter (fun exp -> open_libraries exp (List.map find_library modl)) + Option.iter (fun exp -> open_libraries exp (List.map find_library modl)) export let load_require _ (_,(needed,modl,_)) = @@ -530,13 +542,17 @@ let require_library qidl export = let modrefl = List.map fst modrefl in if Lib.is_modtype () || Lib.is_module () then begin add_anonymous_leaf (in_require (needed,modrefl,None)); - option_iter (fun exp -> + Option.iter (fun exp -> List.iter (fun dir -> add_anonymous_leaf (in_import(dir,exp))) modrefl) export end else add_anonymous_leaf (in_require (needed,modrefl,export)); - if !Options.xml_export then List.iter !xml_require modrefl; + if !Flags.dump then List.iter2 (fun (loc, _) dp -> + Flags.dump_string (Printf.sprintf "R%d %s <> <> %s\n" + (fst (unloc loc)) (string_of_dirpath dp) "lib")) + qidl modrefl; + if !Flags.xml_export then List.iter !xml_require modrefl; add_frozen_state () let require_library_from_file idopt file export = @@ -544,12 +560,12 @@ let require_library_from_file idopt file export = let needed = List.rev needed in if Lib.is_modtype () || Lib.is_module () then begin add_anonymous_leaf (in_require (needed,[modref],None)); - option_iter (fun exp -> add_anonymous_leaf (in_import (modref,exp))) + Option.iter (fun exp -> add_anonymous_leaf (in_import (modref,exp))) export end else add_anonymous_leaf (in_require (needed,[modref],export)); - if !Options.xml_export then !xml_require modref; + if !Flags.xml_export then !xml_require modref; add_frozen_state () (* the function called by Vernacentries.vernac_import *) @@ -614,7 +630,7 @@ let save_library_to dir f = let di = Digest.file f' in System.marshal_out ch di; close_out ch - with e -> (warning ("Removed file "^f'); close_out ch; Sys.remove f'; raise e) + with e -> warning ("Removed file "^f'); close_out ch; Sys.remove f'; raise e (************************************************************************) (*s Display the memory use of a library. *) diff --git a/library/nameops.ml b/library/nameops.ml index 6d0ad8ef..df9aa95d 100644 --- a/library/nameops.ml +++ b/library/nameops.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: nameops.ml 9429 2006-12-12 08:01:03Z herbelin $ *) +(* $Id: nameops.ml 9433 2006-12-12 09:38:53Z herbelin $ *) open Pp open Util diff --git a/library/nameops.mli b/library/nameops.mli index 25c4ea56..b6a39c20 100644 --- a/library/nameops.mli +++ b/library/nameops.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: nameops.mli 9429 2006-12-12 08:01:03Z herbelin $ i*) +(*i $Id: nameops.mli 9433 2006-12-12 09:38:53Z herbelin $ i*) open Names diff --git a/library/nametab.ml b/library/nametab.ml index 4e4e9b91..2c794fae 100644 --- a/library/nametab.ml +++ b/library/nametab.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: nametab.ml 10270 2007-10-29 14:48:33Z notin $ *) +(* $Id: nametab.ml 10664 2008-03-14 11:27:37Z soubiran $ *) open Util open Pp @@ -107,7 +107,7 @@ struct | Absolute (n,_) -> (* This is an absolute name, we must keep it otherwise it may become unaccessible forever *) - Options.if_verbose + Flags.if_verbose warning ("Trying to mask the absolute name \"" ^ U.to_string n ^ "\"!"); current @@ -147,7 +147,7 @@ let rec push_exactly uname o level (current,dirmap) = function | Absolute (n,_) -> (* This is an absolute name, we must keep it otherwise it may become unaccessible forever *) - Options.if_verbose + Flags.if_verbose warning ("Trying to mask the absolute name \"" ^ U.to_string n ^ "\"!"); current @@ -263,9 +263,11 @@ type ccitab = extended_global_reference SpTab.t let the_ccitab = ref (SpTab.empty : ccitab) type kntab = kernel_name SpTab.t -let the_modtypetab = ref (SpTab.empty : kntab) let the_tactictab = ref (SpTab.empty : kntab) +type mptab = module_path SpTab.t +let the_modtypetab = ref (SpTab.empty : mptab) + type objtab = unit SpTab.t let the_objtab = ref (SpTab.empty : objtab) @@ -299,8 +301,10 @@ let the_globrevtab = ref (Globrevtab.empty : globrevtab) type mprevtab = dir_path MPmap.t let the_modrevtab = ref (MPmap.empty : mprevtab) +type mptrevtab = section_path MPmap.t +let the_modtyperevtab = ref (MPmap.empty : mptrevtab) + type knrevtab = section_path KNmap.t -let the_modtyperevtab = ref (KNmap.empty : knrevtab) let the_tacticrevtab = ref (KNmap.empty : knrevtab) @@ -314,7 +318,10 @@ let push_xref visibility sp xref = the_ccitab := SpTab.push visibility sp xref !the_ccitab; match visibility with | Until _ -> - the_globrevtab := Globrevtab.add xref sp !the_globrevtab + if Globrevtab.mem xref !the_globrevtab then + () + else + the_globrevtab := Globrevtab.add xref sp !the_globrevtab | _ -> () let push_cci visibility sp ref = @@ -328,7 +335,7 @@ let push = push_cci let push_modtype vis sp kn = the_modtypetab := SpTab.push vis sp kn !the_modtypetab; - the_modtyperevtab := KNmap.add kn sp !the_modtyperevtab + the_modtyperevtab := MPmap.add kn sp !the_modtyperevtab (* This is for tactic definition names *) @@ -427,7 +434,7 @@ let global r = | TrueGlobal ref -> ref | SyntacticDef _ -> user_err_loc (loc,"global", - str "Unexpected reference to a syntactic definition: " ++ + str "Unexpected reference to a notation: " ++ pr_qualid qid) with Not_found -> error_global_not_found_loc loc qid @@ -483,7 +490,7 @@ let shortest_qualid_of_module mp = DirTab.shortest_qualid Idset.empty dir !the_dirtab let shortest_qualid_of_modtype kn = - let sp = KNmap.find kn !the_modtyperevtab in + let sp = MPmap.find kn !the_modtyperevtab in SpTab.shortest_qualid Idset.empty sp !the_modtypetab let shortest_qualid_of_tactic kn = @@ -497,13 +504,14 @@ let pr_global_env env ref = let s = string_of_qualid (shortest_qualid_of_global env ref) in (str s) -let global_inductive r = +let inductive_of_reference r = match global r with | IndRef ind -> ind | ref -> user_err_loc (loc_of_reference r,"global_inductive", pr_reference r ++ spc () ++ str "is not an inductive type") + (********************************************************************) (********************************************************************) @@ -520,10 +528,11 @@ let init () = the_tactictab := SpTab.empty; the_globrevtab := Globrevtab.empty; the_modrevtab := MPmap.empty; - the_modtyperevtab := KNmap.empty; + the_modtyperevtab := MPmap.empty; the_tacticrevtab := KNmap.empty + let freeze () = !the_ccitab, !the_dirtab, diff --git a/library/nametab.mli b/library/nametab.mli index a05b7415..71ea0aa5 100755 --- a/library/nametab.mli +++ b/library/nametab.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: nametab.mli 7596 2005-11-21 09:17:07Z herbelin $ i*) +(*i $Id: nametab.mli 10497 2008-02-01 12:18:37Z soubiran $ i*) (*i*) open Util @@ -73,7 +73,7 @@ type visibility = Until of int | Exactly of int val push : visibility -> section_path -> global_reference -> unit val push_syntactic_definition : visibility -> section_path -> kernel_name -> unit -val push_modtype : visibility -> section_path -> kernel_name -> unit +val push_modtype : visibility -> section_path -> module_path -> unit val push_dir : visibility -> dir_path -> global_dir_reference -> unit val push_object : visibility -> section_path -> unit val push_tactic : visibility -> section_path -> kernel_name -> unit @@ -89,9 +89,9 @@ val locate : qualid -> global_reference val global : reference -> global_reference (* The same for inductive types *) -val global_inductive : reference -> inductive +val inductive_of_reference : reference -> inductive -(* This locates also syntactic definitions *) +(* This locates also syntactic definitions; raise [Not_found] if not found *) val extended_locate : qualid -> extended_global_reference (* This locates all names with a given suffix, if qualid is valid as @@ -106,7 +106,7 @@ val locate_obj : qualid -> section_path val locate_constant : qualid -> constant val locate_mind : qualid -> mutual_inductive val locate_section : qualid -> dir_path -val locate_modtype : qualid -> kernel_name +val locate_modtype : qualid -> module_path val locate_syntactic_definition : qualid -> kernel_name type ltac_constant = kernel_name @@ -161,7 +161,7 @@ val pr_global_env : Idset.t -> global_reference -> std_ppcmds Coq.A.B.x that denotes the same object. *) val shortest_qualid_of_module : module_path -> qualid -val shortest_qualid_of_modtype : kernel_name -> qualid +val shortest_qualid_of_modtype : module_path -> qualid (* diff --git a/parsing/argextend.ml4 b/parsing/argextend.ml4 index 2731fc90..57e88133 100644 --- a/parsing/argextend.ml4 +++ b/parsing/argextend.ml4 @@ -6,7 +6,9 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: argextend.ml4 10185 2007-10-06 18:05:13Z herbelin $ *) +(*i camlp4use: "pa_extend.cmo q_MLast.cmo" i*) + +(* $Id: argextend.ml4 10122 2007-09-15 10:35:59Z letouzey $ *) open Genarg open Q_util diff --git a/parsing/egrammar.ml b/parsing/egrammar.ml index 07a0a65f..9416bff2 100644 --- a/parsing/egrammar.ml +++ b/parsing/egrammar.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: egrammar.ml 9333 2006-11-02 13:59:14Z barras $ *) +(* $Id: egrammar.ml 10987 2008-05-26 12:28:36Z herbelin $ *) open Pp open Util @@ -73,7 +73,7 @@ let make_constr_action make ((p,CPrim (dummy_loc,Numeral v)) :: env) tl) | Some (p, ETConstrList _) :: tl -> Gramext.action (fun (v:constr_expr list) -> - let dummyid = Ident (dummy_loc,id_of_string "") in + let dummyid = Ident (dummy_loc,id_of_string "_") in make ((p,CAppExpl (dummy_loc,(None,dummyid),v)) :: env) tl) | Some (p, ETPattern) :: tl -> failwith "Unexpected entry of type cases pattern" in @@ -99,7 +99,7 @@ let make_cases_pattern_action make ((p,CPatPrim (dummy_loc,Numeral v)) :: env) tl) | Some (p, ETConstrList _) :: tl -> Gramext.action (fun (v:cases_pattern_expr list) -> - let dummyid = Ident (dummy_loc,id_of_string "") in + let dummyid = Ident (dummy_loc,id_of_string "_") in make ((p,CPatCstr (dummy_loc,dummyid,v)) :: env) tl) | Some (p, (ETPattern | ETOther _)) :: tl -> failwith "Unexpected entry of type cases pattern or other" in @@ -111,24 +111,29 @@ let make_constr_prod_item univ assoc from forpat = function let eobj = symbol_of_production assoc from forpat nt in (eobj, ovar) -let extend_constr entry (n,assoc,pos,p4assoc,name) mkact (forpat,pt) = +let prepare_empty_levels entry (pos,p4assoc,name,reinit) = + grammar_extend entry pos reinit [(name, p4assoc, [])] + +let extend_constr entry (n,assoc,pos,p4assoc,name,reinit) mkact (forpat,pt) = let univ = get_univ "constr" in let pil = List.map (make_constr_prod_item univ assoc n forpat) pt in let (symbs,ntl) = List.split pil in - grammar_extend entry pos [(name, p4assoc, [symbs, mkact ntl])] + let needed_levels = register_empty_levels forpat symbs in + List.iter (prepare_empty_levels entry) needed_levels; + grammar_extend entry pos reinit [(name, p4assoc, [symbs, mkact ntl])] let extend_constr_notation (n,assoc,ntn,rule) = (* Add the notation in constr *) let mkact loc env = CNotation (loc,ntn,List.map snd env) in - let (e,level,keepassoc) = get_constr_entry false (ETConstr (n,())) in - let pos,p4assoc,name = find_position false keepassoc assoc level in - extend_constr e (ETConstr(n,()),assoc,pos,p4assoc,name) + let (e,level) = get_constr_entry false (ETConstr (n,())) in + let pos,p4assoc,name,reinit = find_position false assoc level in + extend_constr e (ETConstr(n,()),assoc,pos,p4assoc,name,reinit) (make_constr_action mkact) (false,rule); (* Add the notation in cases_pattern *) let mkact loc env = CPatNotation (loc,ntn,List.map snd env) in - let (e,level,keepassoc) = get_constr_entry true (ETConstr (n,())) in - let pos,p4assoc,name = find_position true keepassoc assoc level in - extend_constr e (ETConstr (n,()),assoc,pos,p4assoc,name) + let (e,level) = get_constr_entry true (ETConstr (n,())) in + let pos,p4assoc,name,reinit = find_position true assoc level in + extend_constr e (ETConstr (n,()),assoc,pos,p4assoc,name,reinit) (make_cases_pattern_action mkact) (true,rule) (**********************************************************************) @@ -160,7 +165,7 @@ type grammar_tactic_production = let make_prod_item = function | TacTerm s -> (Gramext.Stoken (Lexer.terminal s), None) - | TacNonTerm (_,(nont,t), po) -> (nont, option_map (fun p -> (p,t)) po) + | TacNonTerm (_,(nont,t), po) -> (nont, Option.map (fun p -> (p,t)) po) (* Tactic grammar extensions *) @@ -194,7 +199,7 @@ let extend_vernac_command_grammar s gl = let find_index s t = let t,n = repr_ident (id_of_string t) in if s <> t or n = None then raise Not_found; - out_some n + Option.get n let rec interp_entry_name up_level s = let l = String.length s in @@ -233,7 +238,7 @@ let make_vprod_item n = function | VTerm s -> (Gramext.Stoken (Lexer.terminal s), None) | VNonTerm (loc, nt, po) -> let (etyp, e) = interp_entry_name n nt in - e, option_map (fun p -> (p,etyp)) po + e, Option.map (fun p -> (p,etyp)) po let get_tactic_entry n = if n = 0 then @@ -265,8 +270,8 @@ let add_tactic_entry (key,lev,prods,tac) = let mkact s tac loc l = (TacAtom(loc,TacAlias(loc,s,l,tac)):raw_tactic_expr) in make_rule univ (mkact key tac) mkprod prods in - let _ = find_position true true None None (* to synchronise with remove *) in - grammar_extend entry pos [(None, None, List.rev [rules])] + synchronize_level_positions (); + grammar_extend entry pos None [(None, None, List.rev [rules])] (**********************************************************************) (** State of the grammar extensions *) diff --git a/parsing/egrammar.mli b/parsing/egrammar.mli index 4216899b..d2d912d1 100644 --- a/parsing/egrammar.mli +++ b/parsing/egrammar.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: egrammar.mli 10185 2007-10-06 18:05:13Z herbelin $ i*) +(*i $Id: egrammar.mli 10122 2007-09-15 10:35:59Z letouzey $ i*) (*i*) open Util diff --git a/parsing/g_ascii_syntax.ml b/parsing/g_ascii_syntax.ml index ac54fc63..b262b978 100644 --- a/parsing/g_ascii_syntax.ml +++ b/parsing/g_ascii_syntax.ml @@ -6,6 +6,8 @@ (* * GNU Lesser General Public License Version 2.1 *) (***********************************************************************) +(*i $Id: g_ascii_syntax.ml 10744 2008-04-03 14:09:56Z herbelin $ i*) + open Pp open Util open Names @@ -72,7 +74,7 @@ let make_ascii_string n = if n>=32 && n<=126 then String.make 1 (char_of_int n) else Printf.sprintf "%03d" n -let uninterp_ascii_string r = option_map make_ascii_string (uninterp_ascii r) +let uninterp_ascii_string r = Option.map make_ascii_string (uninterp_ascii r) let _ = Notation.declare_string_interpreter "char_scope" diff --git a/parsing/g_constr.ml4 b/parsing/g_constr.ml4 index 1cde66e2..ba61eb61 100644 --- a/parsing/g_constr.ml4 +++ b/parsing/g_constr.ml4 @@ -6,7 +6,9 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: g_constr.ml4 9976 2007-07-12 11:58:30Z msozeau $ *) +(*i camlp4use: "pa_extend.cmo" i*) + +(* $Id: g_constr.ml4 11024 2008-05-30 12:41:39Z msozeau $ *) open Pcoq open Constr @@ -21,7 +23,7 @@ open Util let constr_kw = [ "forall"; "fun"; "match"; "fix"; "cofix"; "with"; "in"; "for"; - "end"; "as"; "let"; "dest"; "if"; "then"; "else"; "return"; + "end"; "as"; "let"; "if"; "then"; "else"; "return"; "Prop"; "Set"; "Type"; ".("; "_"; ".." ] let _ = List.iter (fun s -> Lexer.add_token("",s)) constr_kw @@ -35,54 +37,35 @@ let mk_lam = function | (bl,c) -> CLambdaN(constr_loc c, bl,c) let loc_of_binder_let = function - | LocalRawAssum ((loc,_)::_,_)::_ -> loc + | LocalRawAssum ((loc,_)::_,_,_)::_ -> loc | LocalRawDef ((loc,_),_)::_ -> loc | _ -> dummy_loc -let rec mkCProdN loc bll c = - match bll with - | LocalRawAssum ((loc1,_)::_ as idl,t) :: bll -> - CProdN (loc,[idl,t],mkCProdN (join_loc loc1 loc) bll c) - | LocalRawDef ((loc1,_) as id,b) :: bll -> - CLetIn (loc,id,b,mkCProdN (join_loc loc1 loc) bll c) - | [] -> c - | LocalRawAssum ([],_) :: bll -> mkCProdN loc bll c - -let rec mkCLambdaN loc bll c = - match bll with - | LocalRawAssum ((loc1,_)::_ as idl,t) :: bll -> - CLambdaN (loc,[idl,t],mkCLambdaN (join_loc loc1 loc) bll c) - | LocalRawDef ((loc1,_) as id,b) :: bll -> - CLetIn (loc,id,b,mkCLambdaN (join_loc loc1 loc) bll c) - | [] -> c - | LocalRawAssum ([],_) :: bll -> mkCLambdaN loc bll c - let rec index_and_rec_order_of_annot loc bl ann = match names_of_local_assums bl,ann with - | [_], (None, r) -> Some 0, r - | lids, (Some x, ro) -> - let ids = List.map snd lids in - (try Some (list_index (snd x) ids - 1), ro - with Not_found -> - user_err_loc(fst x,"index_of_annot", Pp.str"no such fix variable")) + | [loc,Name id], (None, r) -> Some (loc, id), r + | lids, (Some (loc, n), ro) -> + if List.exists (fun (_, x) -> x = Name n) lids then + Some (loc, n), ro + else user_err_loc(loc,"index_of_annot", Pp.str"no such fix variable") | _, (None, r) -> None, r let mk_fixb (id,bl,ann,body,(loc,tyc)) = let n,ro = index_and_rec_order_of_annot (fst id) bl ann in let ty = match tyc with Some ty -> ty - | None -> CHole loc in - (snd id,(n,ro),bl,ty,body) + | None -> CHole (loc, None) in + (id,(n,ro),bl,ty,body) let mk_cofixb (id,bl,ann,body,(loc,tyc)) = - let _ = option_map (fun (aloc,_) -> + let _ = Option.map (fun (aloc,_) -> Util.user_err_loc (aloc,"Constr:mk_cofixb", Pp.str"Annotation forbidden in cofix expression")) (fst ann) in let ty = match tyc with Some ty -> ty - | None -> CHole loc in - (snd id,bl,ty,body) + | None -> CHole (loc, None) in + (id,bl,ty,body) let mk_fix(loc,kw,id,dcls) = if kw then @@ -115,10 +98,39 @@ let lpar_id_coloneq = | _ -> raise Stream.Failure) | _ -> raise Stream.Failure) +let impl_ident = + Gram.Entry.of_parser "impl_ident" + (fun strm -> + match Stream.npeek 1 strm with + | [(_,"{")] -> + (match Stream.npeek 2 strm with + | [_;("IDENT",("wf"|"struct"|"measure"))] -> + raise Stream.Failure + | [_;("IDENT",s)] -> + Stream.junk strm; Stream.junk strm; + Names.id_of_string s + | _ -> raise Stream.Failure) + | _ -> raise Stream.Failure) + +let ident_colon = + Gram.Entry.of_parser "ident_colon" + (fun strm -> + match Stream.npeek 1 strm with + | [("IDENT",s)] -> + (match Stream.npeek 2 strm with + | [_; ("", ":")] -> + Stream.junk strm; Stream.junk strm; + Names.id_of_string s + | _ -> raise Stream.Failure) + | _ -> raise Stream.Failure) + +let aliasvar = function CPatAlias (_, _, id) -> Some (Name id) | _ -> None GEXTEND Gram GLOBAL: binder_constr lconstr constr operconstr sort global - constr_pattern lconstr_pattern Constr.ident binder binder_let pattern; + constr_pattern lconstr_pattern Constr.ident + binder binder_let binders_let + binders_let_fixannot typeclass_constraint pattern appl_arg; Constr.ident: [ [ id = Prim.ident -> id @@ -129,10 +141,7 @@ GEXTEND Gram [ [ "_" -> (loc, Anonymous) ] ] ; global: - [ [ r = Prim.reference -> r - - (* This is used in quotations *) - | id = METAIDENT -> Ident (loc,id_of_string id) ] ] + [ [ r = Prim.reference -> r ] ] ; constr_pattern: [ [ c = constr -> c ] ] @@ -149,7 +158,8 @@ GEXTEND Gram [ [ c = operconstr LEVEL "200" -> c ] ] ; constr: - [ [ c = operconstr LEVEL "9" -> c ] ] + [ [ c = operconstr LEVEL "8" -> c + | "@"; f=global -> CAppExpl(loc,(None,f),[]) ] ] ; operconstr: [ "200" RIGHTA @@ -171,10 +181,14 @@ GEXTEND Gram | c1 = operconstr; "->"; c2 = SELF -> CArrow(loc,c1,c2)] | "10" LEFTA [ f=operconstr; args=LIST1 appl_arg -> CApp(loc,(None,f),args) - | "@"; f=global; args=LIST0 NEXT -> CAppExpl(loc,(None,f),args) ] + | "@"; f=global; args=LIST0 NEXT -> CAppExpl(loc,(None,f),args) + | "@"; (locid,id) = pattern_identref; args=LIST1 identref -> + let args = List.map (fun x -> CRef (Ident x), None) args in + CApp(loc,(None,CPatVar(locid,(true,id))),args) ] | "9" [ ".."; c = operconstr LEVEL "0"; ".." -> CAppExpl (loc,(None,Ident (loc,Topconstr.ldots_var)),[c]) ] + | "8" [ ] | "1" LEFTA [ c=operconstr; ".("; f=global; args=LIST0 appl_arg; ")" -> CApp(loc,(Some (List.length args+1),CRef f),args@[c,None]) @@ -191,12 +205,22 @@ GEXTEND Gram CNotation(loc,"( _ )",[c]) | _ -> c) ] ] ; + forall: + [ [ "forall" -> () + | IDENT "Π" -> () + ] ] + ; + lambda: + [ [ "fun" -> () + | IDENT "λ" -> () + ] ] + ; binder_constr: - [ [ "forall"; bl = binder_list; ","; c = operconstr LEVEL "200" -> + [ [ forall; bl = binder_list; ","; c = operconstr LEVEL "200" -> mkCProdN loc bl c - | "fun"; bl = binder_list; "=>"; c = operconstr LEVEL "200" -> + | lambda; bl = binder_list; [ "=>" | "," ]; c = operconstr LEVEL "200" -> mkCLambdaN loc bl c - | "let"; id=name; bl = LIST0 binder_let; ty = type_cstr; ":="; + | "let"; id=name; bl = binders_let; ty = type_cstr; ":="; c1 = operconstr LEVEL "200"; "in"; c2 = operconstr LEVEL "200" -> let loc1 = loc_of_binder_let bl in CLetIn(loc,id,mkCLambdaN loc1 bl (mk_cast(c1,ty)),c2) @@ -212,10 +236,16 @@ GEXTEND Gram ":="; c1 = operconstr LEVEL "200"; "in"; c2 = operconstr LEVEL "200" -> CLetTuple (loc,List.map snd lb,po,c1,c2) - | "dest"; c1 = operconstr LEVEL "200"; "as"; p=pattern; + | "let"; "'"; p=pattern; ":="; c1 = operconstr LEVEL "200"; "in"; c2 = operconstr LEVEL "200" -> - CCases (loc, None, [(c1, (None, None))], - [loc, [[p]], c2]) + CCases (loc, LetPatternStyle, None, [(c1,(None,None))], [(loc, [(loc,[p])], c2)]) + | "let"; "'"; p=pattern; ":="; c1 = operconstr LEVEL "200"; + rt = case_type; "in"; c2 = operconstr LEVEL "200" -> + CCases (loc, LetPatternStyle, Some rt, [(c1, (aliasvar p, None))], [(loc, [(loc, [p])], c2)]) + | "let"; "'"; p=pattern; "in"; t = operconstr LEVEL "200"; + ":="; c1 = operconstr LEVEL "200"; rt = case_type; + "in"; c2 = operconstr LEVEL "200" -> + CCases (loc, LetPatternStyle, Some rt, [(c1, (aliasvar p, Some t))], [(loc, [(loc, [p])], c2)]) | "if"; c=operconstr LEVEL "200"; po = return_type; "then"; b1=operconstr LEVEL "200"; "else"; b2=operconstr LEVEL "200" -> @@ -225,15 +255,15 @@ GEXTEND Gram appl_arg: [ [ id = lpar_id_coloneq; c=lconstr; ")" -> (c,Some (loc,ExplByName id)) - | c=constr -> (c,None) ] ] + | c=operconstr LEVEL "9" -> (c,None) ] ] ; atomic_constr: [ [ g=global -> CRef g | s=sort -> CSort (loc,s) | n=INT -> CPrim (loc, Numeral (Bigint.of_string n)) | s=string -> CPrim (loc, String s) - | "_" -> CHole loc - | "?"; id=ident -> CPatVar(loc,(false,id)) ] ] + | "_" -> CHole (loc, None) + | id=pattern_ident -> CPatVar(loc,(false,id)) ] ] ; fix_constr: [ [ fx1=single_fix -> mk_single_fix fx1 @@ -250,19 +280,12 @@ GEXTEND Gram | "cofix" -> false ] ] ; fix_decl: - [ [ id=identref; bl=LIST0 binder_let; ann=fixannot; ty=type_cstr; ":="; - c=operconstr LEVEL "200" -> (id,bl,ann,c,ty) ] ] - ; - fixannot: - [ [ "{"; IDENT "struct"; id=name; "}" -> (Some id, CStructRec) - | "{"; IDENT "wf"; rel=constr; id=name; "}" -> (Some id, CWfRec rel) - | "{"; IDENT "measure"; rel=constr; id=name; "}" -> (Some id, CMeasureRec rel) - | -> (None, CStructRec) - ] ] + [ [ id=identref; bl=binders_let_fixannot; ty=type_cstr; ":="; + c=operconstr LEVEL "200" -> (id,fst bl,snd bl,c,ty) ] ] ; match_constr: [ [ "match"; ci=LIST1 case_item SEP ","; ty=OPT case_type; "with"; - br=branches; "end" -> CCases(loc,ty,ci,br) ] ] + br=branches; "end" -> CCases(loc,RegularStyle,ty,ci,br) ] ] ; case_item: [ [ c=operconstr LEVEL "100"; p=pred_pattern -> (c,p) ] ] @@ -285,8 +308,11 @@ GEXTEND Gram branches: [ [ OPT"|"; br=LIST0 eqn SEP "|" -> br ] ] ; + mult_pattern: + [ [ pl = LIST1 pattern LEVEL "99" SEP "," -> (loc,pl) ] ] + ; eqn: - [ [ pll = LIST0 LIST1 pattern LEVEL "99" SEP "," SEP "|"; + [ [ pll = LIST1 mult_pattern SEP "|"; "=>"; rhs = lconstr -> (loc,pll,rhs) ] ] ; pattern: @@ -317,30 +343,86 @@ GEXTEND Gram | s = string -> CPatPrim (loc, String s) ] ] ; binder_list: - [ [ idl=LIST1 name; bl=LIST0 binder_let -> - LocalRawAssum (idl,CHole loc)::bl - | idl=LIST1 name; ":"; c=lconstr -> - [LocalRawAssum (idl,c)] - | "("; idl=LIST1 name; ":"; c=lconstr; ")"; bl=LIST0 binder_let -> - LocalRawAssum (idl,c)::bl ] ] + [ [ idl=LIST1 name; bl=binders_let -> + LocalRawAssum (idl,Default Explicit,CHole (loc, Some (Evd.BinderType (snd (List.hd idl)))))::bl + | idl=LIST1 name; ":"; c=lconstr -> + [LocalRawAssum (idl,Default Explicit,c)] + | cl = binders_let -> cl + ] ] + ; + binder_assum: + [ [ "}" -> fun id -> LocalRawAssum([id], Default Implicit, CHole(loc, None)) + | idl=LIST1 name; ":"; c=lconstr; "}" -> + (fun id -> LocalRawAssum (id::idl,Default Implicit,c)) + | idl=LIST1 name; "}" -> + (fun id -> LocalRawAssum (id::idl,Default Implicit,CHole (loc, None))) + | ":"; c=lconstr; "}" -> + (fun id -> LocalRawAssum ([id],Default Implicit,c)) + ] ] + ; + fixannot: + [ [ "{"; IDENT "struct"; id=identref; "}" -> (Some id, CStructRec) + | "{"; IDENT "wf"; rel=constr; id=OPT identref; "}" -> (id, CWfRec rel) + | "{"; IDENT "measure"; rel=constr; id=OPT identref; "}" -> (id, CMeasureRec rel) + ] ] + ; + binders_let_fixannot: + [ [ id=impl_ident; assum=binder_assum; bl = binders_let_fixannot -> + (assum (loc, Name id) :: fst bl), snd bl + | f = fixannot -> [], f + | b = binder_let; bl = binders_let_fixannot -> + b @ fst bl, snd bl + | -> [], (None, CStructRec) + ] ] + ; + binders_let: + [ [ b = binder_let; bl = binders_let -> b @ bl + | -> [] ] ] ; binder_let: [ [ id=name -> - LocalRawAssum ([id],CHole loc) - | "("; id=name; idl=LIST1 name; ":"; c=lconstr; ")" -> - LocalRawAssum (id::idl,c) - | "("; id=name; ":"; c=lconstr; ")" -> - LocalRawAssum ([id],c) - | "("; id=name; ":="; c=lconstr; ")" -> - LocalRawDef (id,c) - | "("; id=name; ":"; t=lconstr; ":="; c=lconstr; ")" -> - LocalRawDef (id,CCast (join_loc (constr_loc t) loc,c, CastConv (DEFAULTcast,t))) + [LocalRawAssum ([id],Default Explicit,CHole (loc, None))] + | "("; id=name; idl=LIST1 name; ":"; c=lconstr; ")" -> + [LocalRawAssum (id::idl,Default Explicit,c)] + | "("; id=name; ":"; c=lconstr; ")" -> + [LocalRawAssum ([id],Default Explicit,c)] + | "("; id=name; ":="; c=lconstr; ")" -> + [LocalRawDef (id,c)] + | "("; id=name; ":"; t=lconstr; ":="; c=lconstr; ")" -> + [LocalRawDef (id,CCast (join_loc (constr_loc t) loc,c, CastConv (DEFAULTcast,t)))] + | "{"; id=name; "}" -> + [LocalRawAssum ([id],Default Implicit,CHole (loc, None))] + | "{"; id=name; idl=LIST1 name; ":"; c=lconstr; "}" -> + [LocalRawAssum (id::idl,Default Implicit,c)] + | "{"; id=name; ":"; c=lconstr; "}" -> + [LocalRawAssum ([id],Default Implicit,c)] + | "{"; id=name; idl=LIST1 name; "}" -> + List.map (fun id -> LocalRawAssum ([id],Default Implicit,CHole (loc, None))) (id::idl) + | "["; tc = LIST1 typeclass_constraint_binder SEP ","; "]" -> tc ] ] ; binder: - [ [ id=name -> ([id],CHole loc) - | "("; idl=LIST1 name; ":"; c=lconstr; ")" -> (idl,c) ] ] + [ [ id=name -> ([id],Default Explicit,CHole (loc, None)) + | "("; idl=LIST1 name; ":"; c=lconstr; ")" -> (idl,Default Explicit,c) + | "{"; idl=LIST1 name; ":"; c=lconstr; "}" -> (idl,Default Implicit,c) + ] ] + ; + typeclass_constraint_binder: + [ [ tc = typeclass_constraint -> + let (n,bk,t) = tc in + LocalRawAssum ([n], TypeClass bk, t) + ] ] + ; + + typeclass_constraint: + [ [ "!" ; c = operconstr LEVEL "200" -> (loc, Anonymous), Explicit, c + | iid=ident_colon ; expl = [ "!" -> Explicit | -> Implicit ] ; c = operconstr LEVEL "200" -> + (loc, Name iid), expl, c + | c = operconstr LEVEL "200" -> + (loc, Anonymous), Implicit, c + ] ] ; + type_cstr: [ [ c=OPT [":"; c=lconstr -> c] -> (loc,c) ] ] ; diff --git a/parsing/g_decl_mode.ml4 b/parsing/g_decl_mode.ml4 index 5c7b40af..61c3474d 100644 --- a/parsing/g_decl_mode.ml4 +++ b/parsing/g_decl_mode.ml4 @@ -6,8 +6,11 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id$ *) (*i camlp4deps: "parsing/grammar.cma" i*) +(*i camlp4use: "pa_extend.cmo q_MLast.cmo" i*) + +(* $Id: g_decl_mode.ml4 10739 2008-04-01 14:45:20Z herbelin $ *) + open Decl_expr open Names @@ -28,7 +31,6 @@ GLOBAL: proof_instr; thesis : [[ "thesis" -> Plain | "thesis"; "for"; i=ident -> (For i) - | "thesis"; "["; n=INT ;"]" -> (Sub (int_of_string n)) ]]; statement : [[ i=ident ; ":" ; c=constr -> {st_label=Name i;st_it=c} diff --git a/parsing/g_intsyntax.ml b/parsing/g_intsyntax.ml new file mode 100644 index 00000000..6ab8f99c --- /dev/null +++ b/parsing/g_intsyntax.ml @@ -0,0 +1,342 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* + ConstructRef ((bigN_id "t_",0), + if less_than i n_inlined then + (to_int i)+1 + else + (to_int n_inlined)+1 + ) + +(*bigZ stuff*) +let bigZ_module = ["Coq"; "Numbers"; "Integer"; "BigZ"; "BigZ" ] +let bigZ_path = make_path (bigZ_module@["BigZ"]) "t" +(* big ugly hack bis *) +let bigZ_id id = (Obj.magic ((Names.MPdot ((Names.MPfile (make_dir bigZ_module)), + Names.mk_label "BigZ")), + [], Names.id_of_string id) : Names.kernel_name) +let bigZ_scope = "bigZ_scope" + +let bigZ_pos = ConstructRef ((bigZ_id "t_",0),1) +let bigZ_neg = ConstructRef ((bigZ_id "t_",0),2) + + +(*bigQ stuff*) +let bigQ_module = ["Coq"; "Numbers"; "Rational"; "BigQ"; "BigQ"] +let qmake_module = ["Coq"; "Numbers"; "Rational"; "BigQ"; "QMake_base"] +let bigQ_path = make_path (bigQ_module@["BigQ"]) "t" +(* big ugly hack bis *) +let bigQ_id = make_kn qmake_module +let bigQ_scope = "bigQ_scope" + +let bigQ_z = ConstructRef ((bigQ_id "q_type",0),1) + + +(*** Definition of the Non_closed exception, used in the pretty printing ***) +exception Non_closed + +(*** Parsing for int31 in digital notation ***) + +(* parses a *non-negative* integer (from bigint.ml) into an int31 + wraps modulo 2^31 *) +let int31_of_pos_bigint dloc n = + let ref_construct = RRef (dloc, int31_construct) in + let ref_0 = RRef (dloc, int31_0) in + let ref_1 = RRef (dloc, int31_1) in + let rec args counter n = + if counter <= 0 then + [] + else + let (q,r) = div2_with_rest n in + (if r then ref_1 else ref_0)::(args (counter-1) q) + in + RApp (dloc, ref_construct, List.rev (args 31 n)) + +let error_negative dloc = + Util.user_err_loc (dloc, "interp_int31", Pp.str "int31 are only non-negative numbers") + +let interp_int31 dloc n = + if is_pos_or_zero n then + int31_of_pos_bigint dloc n + else + error_negative dloc + +(* Pretty prints an int31 *) + +let bigint_of_int31 = + let rec args_parsing args cur = + match args with + | [] -> cur + | (RRef (_,b))::l when b = int31_0 -> args_parsing l (mult_2 cur) + | (RRef (_,b))::l when b = int31_1 -> args_parsing l (add_1 (mult_2 cur)) + | _ -> raise Non_closed + in + function + | RApp (_, RRef (_, c), args) when c=int31_construct -> args_parsing args zero + | _ -> raise Non_closed + +let uninterp_int31 i = + try + Some (bigint_of_int31 i) + with Non_closed -> + None + +(* Actually declares the interpreter for int31 *) +let _ = Notation.declare_numeral_interpreter int31_scope + (int31_path, int31_module) + interp_int31 + ([RRef (Util.dummy_loc, int31_construct)], + uninterp_int31, + true) + + +(*** Parsing for bigN in digital notation ***) +(* the base for bigN (in Coq) that is 2^31 in our case *) +let base = pow two (of_string "31") + +(* base of the bigN of height N : *) +let rank n = pow base (pow two n) + +(* splits a number bi at height n, that is the rest needs 2^n int31 to be stored + it is expected to be used only when the quotient would also need 2^n int31 to be + stored *) +let split_at n bi = + euclid bi (rank (sub_1 n)) + +(* search the height of the Coq bigint needed to represent the integer bi *) +let height bi = + let rec height_aux n = + if less_than bi (rank n) then + n + else + height_aux (add_1 n) + in + height_aux zero + + +(* n must be a non-negative integer (from bigint.ml) *) +let word_of_pos_bigint dloc hght n = + let ref_W0 = RRef (dloc, zn2z_W0) in + let ref_WW = RRef (dloc, zn2z_WW) in + let rec decomp hgt n = + if is_neg_or_zero hgt then + int31_of_pos_bigint dloc n + else if equal n zero then + RApp (dloc, ref_W0, [RHole (dloc, Evd.InternalHole)]) + else + let (h,l) = split_at hgt n in + RApp (dloc, ref_WW, [RHole (dloc, Evd.InternalHole); + decomp (sub_1 hgt) h; + decomp (sub_1 hgt) l]) + in + decomp hght n + +let bigN_of_pos_bigint dloc n = + let ref_constructor i = RRef (dloc, bigN_constructor i) in + let result h word = RApp (dloc, ref_constructor h, if less_than h n_inlined then + [word] + else + [G_natsyntax.nat_of_int dloc (sub h n_inlined); + word]) + in + let hght = height n in + result hght (word_of_pos_bigint dloc hght n) + +let bigN_error_negative dloc = + Util.user_err_loc (dloc, "interp_bigN", Pp.str "bigN are only non-negative numbers") + +let interp_bigN dloc n = + if is_pos_or_zero n then + bigN_of_pos_bigint dloc n + else + bigN_error_negative dloc + + +(* Pretty prints a bigN *) + +let bigint_of_word = + let rec get_height rc = + match rc with + | RApp (_,RRef(_,c), [_;lft;rght]) when c = zn2z_WW -> + let hleft = get_height lft in + let hright = get_height rght in + add_1 + (if less_than hleft hright then + hright + else + hleft) + | _ -> zero + in + let rec transform hght rc = + match rc with + | RApp (_,RRef(_,c),_) when c = zn2z_W0-> zero + | RApp (_,RRef(_,c), [_;lft;rght]) when c=zn2z_WW-> let new_hght = sub_1 hght in + add (mult (rank new_hght) + (transform (new_hght) lft)) + (transform (new_hght) rght) + | _ -> bigint_of_int31 rc + in + fun rc -> + let hght = get_height rc in + transform hght rc + +let bigint_of_bigN rc = + match rc with + | RApp (_,_,[one_arg]) -> bigint_of_word one_arg + | RApp (_,_,[_;second_arg]) -> bigint_of_word second_arg + | _ -> raise Non_closed + +let uninterp_bigN rc = + try + Some (bigint_of_bigN rc) + with Non_closed -> + None + + +(* declare the list of constructors of bigN used in the declaration of the + numeral interpreter *) + +let bigN_list_of_constructors = + let rec build i = + if less_than i (add_1 n_inlined) then + RRef (Util.dummy_loc, bigN_constructor i)::(build (add_1 i)) + else + [] + in + build zero + +(* Actually declares the interpreter for bigN *) +let _ = Notation.declare_numeral_interpreter bigN_scope + (bigN_path, bigN_module) + interp_bigN + (bigN_list_of_constructors, + uninterp_bigN, + true) + + +(*** Parsing for bigZ in digital notation ***) +let interp_bigZ dloc n = + let ref_pos = RRef (dloc, bigZ_pos) in + let ref_neg = RRef (dloc, bigZ_neg) in + if is_pos_or_zero n then + RApp (dloc, ref_pos, [bigN_of_pos_bigint dloc n]) + else + RApp (dloc, ref_neg, [bigN_of_pos_bigint dloc (neg n)]) + +(* pretty printing functions for bigZ *) +let bigint_of_bigZ = function + | RApp (_, RRef(_,c), [one_arg]) when c = bigZ_pos -> bigint_of_bigN one_arg + | RApp (_, RRef(_,c), [one_arg]) when c = bigZ_neg -> + let opp_val = bigint_of_bigN one_arg in + if equal opp_val zero then + raise Non_closed + else + neg opp_val + | _ -> raise Non_closed + + +let uninterp_bigZ rc = + try + Some (bigint_of_bigZ rc) + with Non_closed -> + None + +(* Actually declares the interpreter for bigN *) +let _ = Notation.declare_numeral_interpreter bigZ_scope + (bigZ_path, bigZ_module) + interp_bigZ + ([RRef (Util.dummy_loc, bigZ_pos); + RRef (Util.dummy_loc, bigZ_neg)], + uninterp_bigZ, + true) + +(*** Parsing for bigQ in digital notation ***) +let interp_bigQ dloc n = + let ref_z = RRef (dloc, bigQ_z) in + let ref_pos = RRef (dloc, bigZ_pos) in + let ref_neg = RRef (dloc, bigZ_neg) in + if is_pos_or_zero n then + RApp (dloc, ref_z, + [RApp (dloc, ref_pos, [bigN_of_pos_bigint dloc n])]) + else + RApp (dloc, ref_z, + [RApp (dloc, ref_neg, [bigN_of_pos_bigint dloc (neg n)])]) + +let uninterp_bigQ rc = None + + +(* Actually declares the interpreter for bigQ *) +let _ = Notation.declare_numeral_interpreter bigQ_scope + (bigQ_path, bigQ_module) + interp_bigQ + ([], uninterp_bigQ, + true) diff --git a/parsing/g_intsyntax.mli b/parsing/g_intsyntax.mli new file mode 100644 index 00000000..c74ae578 --- /dev/null +++ b/parsing/g_intsyntax.mli @@ -0,0 +1,13 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* user_err_loc (loc, "", (str "Syntax Error")) - | LETCLAUSE (id,c,d) -> (id,c,d) - -let make_letin_clause loc = List.map (out_letin_clause loc) - let arg_of_expr = function TacArg a -> a | e -> Tacexp (e:raw_tactic_expr) - -let tacarg_of_expr = function - | TacArg (Reference r) -> TacCall (dummy_loc,r,[]) - | TacArg a -> a - | e -> Tacexp (e:raw_tactic_expr) (* Tactics grammar rules *) @@ -46,16 +32,31 @@ GEXTEND Gram GLOBAL: tactic Vernac_.command tactic_expr binder_tactic tactic_arg constr_may_eval; + tactic_then_last: + [ [ "|"; lta = LIST0 OPT tactic_expr SEP "|" -> + Array.map (function None -> TacId [] | Some t -> t) (Array.of_list lta) + | -> [||] + ] ] + ; + tactic_then_gen: + [ [ ta = tactic_expr; "|"; (first,last) = tactic_then_gen -> (ta::first, last) + | ta = tactic_expr; ".."; l = tactic_then_last -> ([], Some (ta, l)) + | ".."; l = tactic_then_last -> ([], Some (TacId [], l)) + | ta = tactic_expr -> ([ta], None) + | "|"; (first,last) = tactic_then_gen -> (TacId [] :: first, last) + | -> ([TacId []], None) + ] ] + ; tactic_expr: [ "5" RIGHTA [ te = binder_tactic -> te ] | "4" LEFTA - [ ta0 = tactic_expr; ";"; ta1 = binder_tactic -> TacThen (ta0, ta1) - | ta0 = tactic_expr; ";"; ta1 = tactic_expr -> TacThen (ta0, ta1) - | ta = tactic_expr; ";"; - "["; lta = LIST0 OPT tactic_expr SEP "|"; "]" -> - let lta = List.map (function None -> TacId [] | Some t -> t) lta in - TacThens (ta, lta) ] + [ ta0 = tactic_expr; ";"; ta1 = binder_tactic -> TacThen (ta0, [||], ta1, [||]) + | ta0 = tactic_expr; ";"; ta1 = tactic_expr -> TacThen (ta0, [||], ta1, [||]) + | ta0 = tactic_expr; ";"; "["; (first,tail) = tactic_then_gen; "]" -> + match tail with + | Some (t,last) -> TacThen (ta0, Array.of_list first, t, last) + | None -> TacThens (ta0,first) ] | "3" RIGHTA [ IDENT "try"; ta = tactic_expr -> TacTry ta | IDENT "do"; n = int_or_var; ta = tactic_expr -> TacDo (n,ta) @@ -89,13 +90,14 @@ GEXTEND Gram TacArg (TacExternal (loc,com,req,la)) | st = simple_tactic -> TacAtom (loc,st) | a = may_eval_arg -> TacArg(a) + | IDENT "constr"; ":"; id = METAIDENT -> + TacArg(MetaIdArg (loc,false,id)) | IDENT "constr"; ":"; c = Constr.constr -> TacArg(ConstrMayEval(ConstrTerm c)) | IDENT "ipattern"; ":"; ipat = simple_intropattern -> TacArg(IntroPattern ipat) - | r = reference; la = LIST1 tactic_arg -> - TacArg(TacCall (loc,r,la)) - | r = reference -> TacArg (Reference r) ] + | r = reference; la = LIST0 tactic_arg -> + TacArg(TacCall (loc,r,la)) ] | "0" [ "("; a = tactic_expr; ")" -> a | a = tactic_atom -> TacArg a ] ] @@ -105,20 +107,22 @@ GEXTEND Gram [ RIGHTA [ "fun"; it = LIST1 input_fun ; "=>"; body = tactic_expr LEVEL "5" -> TacFun (it,body) - | "let"; IDENT "rec"; rcl = LIST1 rec_clause SEP "with"; "in"; - body = tactic_expr LEVEL "5" -> TacLetRecIn (rcl,body) - | "let"; llc = LIST1 let_clause SEP "with"; "in"; - u = tactic_expr LEVEL "5" -> TacLetIn (make_letin_clause loc llc,u) + | "let"; isrec = [IDENT "rec" -> true | -> false]; + llc = LIST1 let_clause SEP "with"; "in"; + body = tactic_expr LEVEL "5" -> TacLetIn (isrec,llc,body) | IDENT "info"; tc = tactic_expr LEVEL "5" -> TacInfo tc ] ] ; (* Tactic arguments *) tactic_arg: - [ [ IDENT "ltac"; ":"; a = tactic_expr LEVEL "0" -> tacarg_of_expr a + [ [ IDENT "ltac"; ":"; a = tactic_expr LEVEL "0" -> arg_of_expr a + | IDENT "ltac"; ":"; n = natural -> Integer n | IDENT "ipattern"; ":"; ipat = simple_intropattern -> IntroPattern ipat | a = may_eval_arg -> a | r = reference -> Reference r - | a = tactic_atom -> a - | c = Constr.constr -> ConstrMayEval (ConstrTerm c) ] ] + | c = Constr.constr -> ConstrMayEval (ConstrTerm c) + (* Unambigous entries: tolerated w/o "ltac:" modifier *) + | id = METAIDENT -> MetaIdArg (loc,true,id) + | "()" -> TacVoid ] ] ; may_eval_arg: [ [ c = constr_eval -> ConstrMayEval c @@ -140,7 +144,9 @@ GEXTEND Gram | c = Constr.constr -> ConstrTerm c ] ] ; tactic_atom: - [ [ id = METAIDENT -> MetaIdArg (loc,id) + [ [ id = METAIDENT -> MetaIdArg (loc,true,id) + | n = integer -> Integer n + | r = reference -> TacCall (loc,r,[]) | "()" -> TacVoid ] ] ; match_key: @@ -152,13 +158,9 @@ GEXTEND Gram ; let_clause: [ [ id = identref; ":="; te = tactic_expr -> - LETCLAUSE (id, None, arg_of_expr te) + (id, arg_of_expr te) | id = identref; args = LIST1 input_fun; ":="; te = tactic_expr -> - LETCLAUSE (id, None, arg_of_expr (TacFun(args,te))) ] ] - ; - rec_clause: - [ [ name = identref; it = LIST1 input_fun; ":="; body = tactic_expr -> - (name,(it,body)) ] ] + (id, arg_of_expr (TacFun(args,te))) ] ] ; match_pattern: [ [ IDENT "context"; oid = OPT Constr.ident; @@ -194,12 +196,17 @@ GEXTEND Gram | n = integer -> MsgInt n ] ] ; + ltac_def_kind: + [ [ ":=" -> false + | "::=" -> true ] ] + ; + (* Definitions for tactics *) tacdef_body: - [ [ name = identref; it=LIST1 input_fun; ":="; body = tactic_expr -> - (name, TacFun (it, body)) - | name = identref; ":="; body = tactic_expr -> - (name, body) ] ] + [ [ name = Constr.global; it=LIST1 input_fun; redef = ltac_def_kind; body = tactic_expr -> + (name, redef, TacFun (it, body)) + | name = Constr.global; redef = ltac_def_kind; body = tactic_expr -> + (name, redef, body) ] ] ; tactic: [ [ tac = tactic_expr -> tac ] ] diff --git a/parsing/g_minicoq.ml4 b/parsing/g_minicoq.ml4 index ed8dda5c..a9275cf9 100644 --- a/parsing/g_minicoq.ml4 +++ b/parsing/g_minicoq.ml4 @@ -6,7 +6,9 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: g_minicoq.ml4 5920 2004-07-16 20:01:26Z herbelin $ *) +(*i camlp4use: "pa_extend.cmo" i*) + +(* $Id: g_minicoq.ml4 10007 2007-07-16 09:18:44Z corbinea $ *) open Pp open Util diff --git a/parsing/g_natsyntax.ml b/parsing/g_natsyntax.ml index f764bc28..8804d81a 100644 --- a/parsing/g_natsyntax.ml +++ b/parsing/g_natsyntax.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: g_natsyntax.ml 7988 2006-02-04 20:28:29Z herbelin $ *) +(* $Id: g_natsyntax.ml 10348 2007-12-06 17:36:14Z aspiwack $ *) (* This file defines the printer for natural numbers in [nat] *) @@ -32,11 +32,12 @@ open Names let nat_of_int dloc n = if is_pos_or_zero n then begin - if less_than (of_string "5000") n & Options.is_verbose () then begin - warning ("You may experience stack overflow and segmentation fault\ - \nwhile parsing numbers in nat greater than 5000"); - flush_all () - end; + if less_than (of_string "5000") n then + Flags.if_warn msg_warning + (strbrk "Stack overflow or segmentation fault happens when " ++ + strbrk "working with large numbers in nat (observed threshold " ++ + strbrk "may vary from 5000 to 70000 depending on your system " ++ + strbrk "limits and on the command executed)."); let ref_O = RRef (dloc, glob_O) in let ref_S = RRef (dloc, glob_S) in let rec mk_nat acc n = diff --git a/parsing/g_natsyntax.mli b/parsing/g_natsyntax.mli index 174be771..09095959 100644 --- a/parsing/g_natsyntax.mli +++ b/parsing/g_natsyntax.mli @@ -6,6 +6,10 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: g_natsyntax.mli 5920 2004-07-16 20:01:26Z herbelin $ i*) +(*i $Id: g_natsyntax.mli 11087 2008-06-10 13:29:52Z letouzey $ i*) (* Nice syntax for naturals. *) + +open Notation + +val nat_of_int : Bigint.bigint prim_token_interpreter diff --git a/parsing/g_prim.ml4 b/parsing/g_prim.ml4 index d5ca5e0c..c3792d65 100644 --- a/parsing/g_prim.ml4 +++ b/parsing/g_prim.ml4 @@ -6,7 +6,9 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: g_prim.ml4 7922 2006-01-23 19:11:11Z herbelin $ i*) +(*i camlp4use: "pa_extend.cmo" i*) + +(*i $Id: g_prim.ml4 10155 2007-09-28 22:36:35Z glondu $ i*) open Pcoq open Names @@ -25,13 +27,19 @@ GEXTEND Gram GLOBAL: bigint natural integer identref name ident var preident fullyqualid qualid reference dirpath - ne_string string; + ne_string string pattern_ident pattern_identref; preident: [ [ s = IDENT -> s ] ] ; ident: [ [ s = IDENT -> id_of_string s ] ] ; + pattern_ident: + [ [ s = PATTERNIDENT -> id_of_string s ] ] + ; + pattern_identref: + [ [ id = pattern_ident -> (loc, id) ] ] + ; var: (* as identref, but interpret as a term identifier in ltac *) [ [ id = ident -> (loc,id) ] ] ; diff --git a/parsing/g_proofs.ml4 b/parsing/g_proofs.ml4 index 0a48748f..05878e97 100644 --- a/parsing/g_proofs.ml4 +++ b/parsing/g_proofs.ml4 @@ -6,7 +6,10 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: g_proofs.ml4 9976 2007-07-12 11:58:30Z msozeau $ *) +(*i camlp4use: "pa_extend.cmo" i*) + +(* $Id: g_proofs.ml4 10628 2008-03-06 14:56:08Z msozeau $ *) + open Pcoq open Pp @@ -59,6 +62,7 @@ GEXTEND Gram | IDENT "Proof"; c = lconstr -> VernacExactProof c | IDENT "Undo" -> VernacUndo 1 | IDENT "Undo"; n = natural -> VernacUndo n + | IDENT "Undo"; IDENT "To"; n = natural -> VernacUndoTo n | IDENT "Focus" -> VernacFocus None | IDENT "Focus"; n = natural -> VernacFocus (Some n) | IDENT "Unfocus" -> VernacUnfocus @@ -101,7 +105,8 @@ GEXTEND Gram [ [ IDENT "Local" -> true | -> false ] ] ; hint: - [ [ IDENT "Resolve"; lc = LIST1 constr -> HintsResolve lc + [ [ IDENT "Resolve"; lc = LIST1 constr; n = OPT [ n = natural -> n ] -> + HintsResolve (List.map (fun x -> (n, x)) lc) | IDENT "Immediate"; lc = LIST1 constr -> HintsImmediate lc | IDENT "Unfold"; lqid = LIST1 global -> HintsUnfold lqid | IDENT "Constructors"; lc = LIST1 global -> HintsConstructors lc diff --git a/parsing/g_rsyntax.ml b/parsing/g_rsyntax.ml index 45647903..b3425899 100644 --- a/parsing/g_rsyntax.ml +++ b/parsing/g_rsyntax.ml @@ -6,6 +6,8 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) +(*i $Id: g_rsyntax.ml 10739 2008-04-01 14:45:20Z herbelin $ i*) + open Pp open Util open Names diff --git a/parsing/g_string_syntax.ml b/parsing/g_string_syntax.ml index 6d879fb2..6a650987 100644 --- a/parsing/g_string_syntax.ml +++ b/parsing/g_string_syntax.ml @@ -6,6 +6,8 @@ (* * GNU Lesser General Public License Version 2.1 *) (***********************************************************************) +(*i $Id: g_string_syntax.ml 10739 2008-04-01 14:45:20Z herbelin $ i*) + open Pp open Util open Names diff --git a/parsing/g_tactic.ml4 b/parsing/g_tactic.ml4 index a80d3075..c0a4ba5b 100644 --- a/parsing/g_tactic.ml4 +++ b/parsing/g_tactic.ml4 @@ -6,7 +6,9 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: g_tactic.ml4 9551 2007-01-29 15:13:35Z bgregoir $ *) +(*i camlp4use: "pa_extend.cmo" i*) + +(* $Id: g_tactic.ml4 11094 2008-06-10 19:35:23Z herbelin $ *) open Pp open Pcoq @@ -15,8 +17,9 @@ open Tacexpr open Rawterm open Genarg open Topconstr +open Libnames -let compute = Cbv all_flags +let all_with delta = make_red_flag [FBeta;FIota;FZeta;delta] let tactic_kw = [ "->"; "<-" ] let _ = List.iter (fun s -> Lexer.add_token("",s)) tactic_kw @@ -68,6 +71,30 @@ let lpar_id_colon = | _ -> raise Stream.Failure) | _ -> raise Stream.Failure) +(* idem for (x1..xn:t) [n^2 complexity but exceptional use] *) +let check_for_coloneq = + Gram.Entry.of_parser "lpar_id_colon" + (fun strm -> + let rec skip_to_rpar n = + match list_last (Stream.npeek n strm) with + | ("",")") -> n+1 + | ("",".") -> raise Stream.Failure + | _ -> skip_to_rpar (n+1) in + let rec skip_names n = + match list_last (Stream.npeek n strm) with + | ("IDENT",_) | ("","_") -> skip_names (n+1) + | ("",":") -> skip_to_rpar (n+1) (* skip a constr *) + | _ -> raise Stream.Failure in + let rec skip_binders n = + match list_last (Stream.npeek n strm) with + | ("","(") -> skip_binders (skip_names (n+1)) + | ("IDENT",_) | ("","_") -> skip_binders (n+1) + | ("",":=") -> () + | _ -> raise Stream.Failure in + match Stream.npeek 1 strm with + | [("","(")] -> skip_binders 2 + | _ -> raise Stream.Failure) + let guess_lpar_ipat s strm = match Stream.npeek 1 strm with | [("","(")] -> @@ -86,6 +113,13 @@ let guess_lpar_coloneq = let guess_lpar_colon = Gram.Entry.of_parser "guess_lpar_colon" (guess_lpar_ipat ":") +let lookup_at_as_coma = + Gram.Entry.of_parser "lookup_at_as_coma" + (fun strm -> + match Stream.npeek 1 strm with + | [("",(","|"at"|"as"))] -> () + | _ -> raise Stream.Failure) + open Constr open Prim open Tactic @@ -93,25 +127,44 @@ open Tactic let mk_fix_tac (loc,id,bl,ann,ty) = let n = match bl,ann with - [([_],_)], None -> 1 + [([_],_,_)], None -> 1 | _, Some x -> - let ids = List.map snd (List.flatten (List.map fst bl)) in + let ids = List.map snd (List.flatten (List.map pi1 bl)) in (try list_index (snd x) ids with Not_found -> error "no such fix variable") | _ -> error "cannot guess decreasing argument of fix" in (id,n,CProdN(loc,bl,ty)) let mk_cofix_tac (loc,id,bl,ann,ty) = - let _ = option_map (fun (aloc,_) -> + let _ = Option.map (fun (aloc,_) -> Util.user_err_loc (aloc,"Constr:mk_cofix_tac", Pp.str"Annotation forbidden in cofix expression")) ann in (id,CProdN(loc,bl,ty)) (* Functions overloaded by quotifier *) -let induction_arg_of_constr c = - try ElimOnIdent (constr_loc c,snd(coerce_to_id c)) - with _ -> ElimOnConstr c +let induction_arg_of_constr (c,lbind as clbind) = + if lbind = NoBindings then + try ElimOnIdent (constr_loc c,snd(coerce_to_id c)) + with _ -> ElimOnConstr clbind + else ElimOnConstr clbind + +let rec mkCLambdaN_simple_loc loc bll c = + match bll with + | ((loc1,_)::_ as idl,bk,t) :: bll -> + CLambdaN (loc,[idl,bk,t],mkCLambdaN_simple_loc (join_loc loc1 loc) bll c) + | ([],_,_) :: bll -> mkCLambdaN_simple_loc loc bll c + | [] -> c + +let mkCLambdaN_simple bl c = + if bl=[] then c + else + let loc = join_loc (fst (List.hd (pi1 (List.hd bl)))) (constr_loc c) in + mkCLambdaN_simple_loc loc bl c + +let map_int_or_var f = function + | Rawterm.ArgArg x -> Rawterm.ArgArg (f x) + | Rawterm.ArgVar _ as y -> y (* Auxiliary grammar rules *) @@ -124,6 +177,10 @@ GEXTEND Gram [ [ n = integer -> Rawterm.ArgArg n | id = identref -> Rawterm.ArgVar id ] ] ; + nat_or_var: + [ [ n = natural -> Rawterm.ArgArg n + | id = identref -> Rawterm.ArgVar id ] ] + ; (* An identifier or a quotation meta-variable *) id_or_meta: [ [ id = identref -> AI id @@ -145,7 +202,7 @@ GEXTEND Gram ; induction_arg: [ [ n = natural -> ElimOnAnonHyp n - | c = constr -> induction_arg_of_constr c + | c = constr_with_bindings -> induction_arg_of_constr c ] ] ; quantified_hypothesis: @@ -154,30 +211,52 @@ GEXTEND Gram ; conversion: [ [ c = constr -> (None, c) - | c1 = constr; "with"; c2 = constr -> (Some ([],c1), c2) - | c1 = constr; "at"; nl = LIST1 int_or_var; "with"; c2 = constr -> - (Some (nl,c1), c2) ] ] - ; - occurrences: - [ [ "at"; nl = LIST1 int_or_var -> nl - | -> [] ] ] + | c1 = constr; "with"; c2 = constr -> (Some (all_occurrences_expr,c1),c2) + | c1 = constr; "at"; occs = occs_nums; "with"; c2 = constr -> + (Some (occs,c1), c2) ] ] + ; + smart_global: + [ [ c = global -> AN c + | s = ne_string -> ByNotation (loc,s) ] ] + ; + occs_nums: + [ [ nl = LIST1 nat_or_var -> no_occurrences_expr_but nl + | "-"; n = nat_or_var; nl = LIST0 int_or_var -> + (* have used int_or_var instead of nat_or_var for compatibility *) + all_occurrences_expr_but (List.map (map_int_or_var abs) (n::nl)) ] ] + ; + occs: + [ [ "at"; occs = occs_nums -> occs | -> all_occurrences_expr_but [] ] ] ; pattern_occ: - [ [ c = constr; nl = occurrences -> (nl,c) ] ] + [ [ c = constr; nl = occs -> (nl,c) ] ] ; unfold_occ: - [ [ c = global; nl = occurrences -> (nl,c) ] ] + [ [ c = smart_global; nl = occs -> (nl,c) ] ] ; intropatterns: [ [ l = LIST0 simple_intropattern -> l ]] ; simple_intropattern: [ [ "["; tc = LIST1 intropatterns SEP "|" ; "]" -> IntroOrAndPattern tc - | "("; tc = LIST0 simple_intropattern SEP "," ; ")" -> IntroOrAndPattern [tc] | "()" -> IntroOrAndPattern [[]] + | "("; si = simple_intropattern; ")" -> IntroOrAndPattern [[si]] + | "("; si = simple_intropattern; ","; + tc = LIST1 simple_intropattern SEP "," ; ")" -> + IntroOrAndPattern [si::tc] + | "("; si = simple_intropattern; "&"; + tc = LIST1 simple_intropattern SEP "&" ; ")" -> + (* (A & B & C) is translated into (A,(B,C)) *) + let rec pairify = function + | ([]|[_]|[_;_]) as l -> IntroOrAndPattern [l] + | t::q -> IntroOrAndPattern [[t;pairify q]] + in pairify (si::tc) | "_" -> IntroWildcard + | prefix = pattern_ident -> IntroFresh prefix | "?" -> IntroAnonymous | id = ident -> IntroIdentifier id + | "->" -> IntroRewrite true + | "<-" -> IntroRewrite false ] ] ; simple_binding: @@ -189,6 +268,9 @@ GEXTEND Gram ExplicitBindings bl | bl = LIST1 constr -> ImplicitBindings bl ] ] ; + opt_bindings: + [ [ bl = bindings -> bl | -> NoBindings ] ] + ; constr_with_bindings: [ [ c = constr; l = with_bindings -> (c, l) ] ] ; @@ -197,37 +279,46 @@ GEXTEND Gram ; red_flag: [ [ IDENT "beta" -> FBeta - | IDENT "delta" -> FDeltaBut [] | IDENT "iota" -> FIota | IDENT "zeta" -> FZeta - | IDENT "delta"; "["; idl = LIST1 global; "]" -> FConst idl - | IDENT "delta"; "-"; "["; idl = LIST1 global; "]" -> FDeltaBut idl + | IDENT "delta"; d = delta_flag -> d + ] ] + ; + delta_flag: + [ [ "-"; "["; idl = LIST1 smart_global; "]" -> FDeltaBut idl + | "["; idl = LIST1 smart_global; "]" -> FConst idl + | -> FDeltaBut [] + ] ] + ; + strategy_flag: + [ [ s = LIST1 red_flag -> make_red_flag s + | d = delta_flag -> all_with d ] ] ; red_tactic: [ [ IDENT "red" -> Red false | IDENT "hnf" -> Hnf | IDENT "simpl"; po = OPT pattern_occ -> Simpl po - | IDENT "cbv"; s = LIST1 red_flag -> Cbv (make_red_flag s) - | IDENT "lazy"; s = LIST1 red_flag -> Lazy (make_red_flag s) - | IDENT "compute" -> compute + | IDENT "cbv"; s = strategy_flag -> Cbv s + | IDENT "lazy"; s = strategy_flag -> Lazy s + | IDENT "compute"; delta = delta_flag -> Cbv (all_with delta) | IDENT "vm_compute" -> CbvVm | IDENT "unfold"; ul = LIST1 unfold_occ SEP "," -> Unfold ul | IDENT "fold"; cl = LIST1 constr -> Fold cl - | IDENT "pattern"; pl = LIST1 pattern_occ SEP","-> Pattern pl ] ] + | IDENT "pattern"; pl = LIST1 pattern_occ SEP"," -> Pattern pl ] ] ; (* This is [red_tactic] including possible extensions *) red_expr: [ [ IDENT "red" -> Red false | IDENT "hnf" -> Hnf | IDENT "simpl"; po = OPT pattern_occ -> Simpl po - | IDENT "cbv"; s = LIST1 red_flag -> Cbv (make_red_flag s) - | IDENT "lazy"; s = LIST1 red_flag -> Lazy (make_red_flag s) - | IDENT "compute" -> compute + | IDENT "cbv"; s = strategy_flag -> Cbv s + | IDENT "lazy"; s = strategy_flag -> Lazy s + | IDENT "compute"; delta = delta_flag -> Cbv (all_with delta) | IDENT "vm_compute" -> CbvVm | IDENT "unfold"; ul = LIST1 unfold_occ -> Unfold ul | IDENT "fold"; cl = LIST1 constr -> Fold cl - | IDENT "pattern"; pl = LIST1 pattern_occ -> Pattern pl + | IDENT "pattern"; pl = LIST1 pattern_occ SEP"," -> Pattern pl | s = IDENT -> ExtraRedExpr s ] ] ; hypident: @@ -240,22 +331,33 @@ GEXTEND Gram ] ] ; hypident_occ: - [ [ (id,l)=hypident; occs=occurrences -> ((occs,id),l) ] ] - ; - clause: - [ [ "in"; "*"; occs=occurrences -> - {onhyps=None;onconcl=true;concl_occs=occs} - | "in"; "*"; "|-"; (b,occs)=concl_occ -> - {onhyps=None; onconcl=b; concl_occs=occs} - | "in"; hl=LIST0 hypident_occ SEP","; "|-"; (b,occs)=concl_occ -> - {onhyps=Some hl; onconcl=b; concl_occs=occs} - | "in"; hl=LIST0 hypident_occ SEP"," -> - {onhyps=Some hl; onconcl=false; concl_occs=[]} - | -> {onhyps=Some[];onconcl=true; concl_occs=[]} ] ] + [ [ (id,l)=hypident; occs=occs -> ((occs,id),l) ] ] + ; + in_clause: + [ [ "*"; occs=occs -> + {onhyps=None; concl_occs=occs} + | "*"; "|-"; occs=concl_occ -> + {onhyps=None; concl_occs=occs} + | hl=LIST0 hypident_occ SEP","; "|-"; occs=concl_occ -> + {onhyps=Some hl; concl_occs=occs} + | hl=LIST0 hypident_occ SEP"," -> + {onhyps=Some hl; concl_occs=no_occurrences_expr} ] ] + ; + clause_dft_concl: + [ [ "in"; cl = in_clause -> cl + | occs=occs -> {onhyps=Some[]; concl_occs=occs} + | -> {onhyps=Some[]; concl_occs=all_occurrences_expr} ] ] + ; + clause_dft_all: + [ [ "in"; cl = in_clause -> cl + | -> {onhyps=None; concl_occs=all_occurrences_expr} ] ] + ; + opt_clause: + [ [ "in"; cl = in_clause -> Some cl | -> None ] ] ; concl_occ: - [ [ "*"; occs = occurrences -> (true,occs) - | -> (false, []) ] ] + [ [ "*"; occs = occs -> occs + | -> no_occurrences_expr ] ] ; simple_clause: [ [ "in"; idl = LIST1 id_or_meta -> idl @@ -265,15 +367,28 @@ GEXTEND Gram [ [ "->" -> true | "<-" -> false | -> true ]] - ; + ; + simple_binder: + [ [ na=name -> ([na],Default Explicit,CHole (loc, None)) + | "("; nal=LIST1 name; ":"; c=lconstr; ")" -> (nal,Default Explicit,c) + ] ] + ; fixdecl: - [ [ "("; id = ident; bl=LIST0 Constr.binder; ann=fixannot; + [ [ "("; id = ident; bl=LIST0 simple_binder; ann=fixannot; ":"; ty=lconstr; ")" -> (loc,id,bl,ann,ty) ] ] ; fixannot: [ [ "{"; IDENT "struct"; id=name; "}" -> Some id | -> None ] ] ; + cofixdecl: + [ [ "("; id = ident; bl=LIST0 simple_binder; ":"; ty=lconstr; ")" -> + (loc,id,bl,None,ty) ] ] + ; + bindings_with_parameters: + [ [ check_for_coloneq; "("; id = ident; bl = LIST0 simple_binder; + ":="; c = lconstr; ")" -> (id, mkCLambdaN_simple bl c) ] ] + ; hintbases: [ [ "with"; "*" -> None | "with"; l = LIST1 IDENT -> Some l @@ -289,10 +404,41 @@ GEXTEND Gram with_names: [ [ "as"; ipat = simple_intropattern -> ipat | -> IntroAnonymous ] ] ; + as_name: + [ [ "as"; id = ident -> Names.Name id | -> Names.Anonymous ] ] + ; by_tactic: [ [ IDENT "by"; tac = tactic_expr LEVEL "3" -> TacComplete tac | -> TacId [] ] ] ; + opt_by_tactic: + [ [ IDENT "by"; tac = tactic_expr LEVEL "3" -> Some tac + | -> None ] ] + ; + rename : + [ [ id1 = id_or_meta; IDENT "into"; id2 = id_or_meta -> (id1,id2) ] ] + ; + rewriter : + [ [ + (* hack for allowing "rewrite ?t" and "rewrite NN?t" that normally + produce a pattern_ident *) + c = pattern_ident -> + let c = (CRef (Ident (loc,c)), NoBindings) in + (RepeatStar, c) + | n = natural; c = pattern_ident -> + let c = (CRef (Ident (loc,c)), NoBindings) in + (UpTo n, c) + | "!"; c = constr_with_bindings -> (RepeatPlus,c) + | "?"; c = constr_with_bindings -> (RepeatStar,c) + | n = natural; "!"; c = constr_with_bindings -> (Precisely n,c) + | n = natural; "?"; c = constr_with_bindings -> (UpTo n,c) + | n = natural; c = constr_with_bindings -> (Precisely n,c) + | c = constr_with_bindings -> (Precisely 1, c) + ] ] + ; + oriented_rewriter : + [ [ b = orient; p = rewriter -> let (m,c) = p in (b,m,c) ] ] + ; simple_tactic: [ [ (* Basic tactics *) @@ -311,29 +457,39 @@ GEXTEND Gram | IDENT "exact_no_check"; c = constr -> TacExactNoCheck c | IDENT "vm_cast_no_check"; c = constr -> TacVmCastNoCheck c - | IDENT "apply"; cl = constr_with_bindings -> TacApply cl + | IDENT "apply"; cl = constr_with_bindings -> TacApply (true,false,cl) + | IDENT "eapply"; cl = constr_with_bindings -> TacApply (true,true,cl) + | IDENT "simple"; IDENT "apply"; cl = constr_with_bindings -> + TacApply (false,false,cl) + | IDENT "simple"; IDENT "eapply"; cl = constr_with_bindings -> + TacApply (false, true,cl) | IDENT "elim"; cl = constr_with_bindings; el = OPT eliminator -> - TacElim (cl,el) + TacElim (false,cl,el) + | IDENT "eelim"; cl = constr_with_bindings; el = OPT eliminator -> + TacElim (true,cl,el) | IDENT "elimtype"; c = constr -> TacElimType c - | IDENT "case"; cl = constr_with_bindings -> TacCase cl + | IDENT "case"; cl = constr_with_bindings -> TacCase (false,cl) + | IDENT "ecase"; cl = constr_with_bindings -> TacCase (true,cl) | IDENT "casetype"; c = constr -> TacCaseType c | "fix"; n = natural -> TacFix (None,n) | "fix"; id = ident; n = natural -> TacFix (Some id,n) | "fix"; id = ident; n = natural; "with"; fd = LIST1 fixdecl -> - TacMutualFix (id,n,List.map mk_fix_tac fd) + TacMutualFix (false,id,n,List.map mk_fix_tac fd) | "cofix" -> TacCofix None | "cofix"; id = ident -> TacCofix (Some id) - | "cofix"; id = ident; "with"; fd = LIST1 fixdecl -> - TacMutualCofix (id,List.map mk_cofix_tac fd) - - | IDENT "pose"; id = lpar_id_coloneq; b = lconstr; ")" -> - TacLetTac (Names.Name id,b,nowhere) - | IDENT "pose"; b = constr -> - TacLetTac (Names.Anonymous,b,nowhere) - | IDENT "set"; id = lpar_id_coloneq; c = lconstr; ")"; p = clause -> - TacLetTac (Names.Name id,c,p) - | IDENT "set"; c = constr; p = clause -> - TacLetTac (Names.Anonymous,c,p) + | "cofix"; id = ident; "with"; fd = LIST1 cofixdecl -> + TacMutualCofix (false,id,List.map mk_cofix_tac fd) + + | IDENT "pose"; (id,b) = bindings_with_parameters -> + TacLetTac (Names.Name id,b,nowhere,true) + | IDENT "pose"; b = constr; na = as_name -> + TacLetTac (na,b,nowhere,true) + | IDENT "set"; (id,c) = bindings_with_parameters; p = clause_dft_concl -> + TacLetTac (Names.Name id,c,p,true) + | IDENT "set"; c = constr; na = as_name; p = clause_dft_concl -> + TacLetTac (na,c,p,true) + | IDENT "remember"; c = constr; na = as_name; p = clause_dft_all -> + TacLetTac (na,c,p,false) (* Begin compatibility *) | IDENT "assert"; id = lpar_id_coloneq; c = lconstr; ")" -> @@ -348,14 +504,16 @@ GEXTEND Gram TacAssert (None,ipat,c) | IDENT "cut"; c = constr -> TacCut c - | IDENT "generalize"; lc = LIST1 constr -> TacGeneralize lc + | IDENT "generalize"; c = constr -> + TacGeneralize [((all_occurrences_expr,c),Names.Anonymous)] + | IDENT "generalize"; c = constr; l = LIST1 constr -> + let gen_everywhere c = ((all_occurrences_expr,c),Names.Anonymous) in + TacGeneralize (List.map gen_everywhere (c::l)) + | IDENT "generalize"; c = constr; lookup_at_as_coma; nl = occs; + na = as_name; + l = LIST0 [","; c = pattern_occ; na = as_name -> (c,na)] -> + TacGeneralize (((nl,c),na)::l) | IDENT "generalize"; IDENT "dependent"; c = constr -> TacGeneralizeDep c - (* | IDENT "instantiate"; "("; n = natural; ":="; c = lconstr; ")"; "in"; - hid = hypident -> - let (id,(hloc,_)) = hid in - TacInstantiate (n,c,HypLocation (id,hloc)) - | IDENT "instantiate"; "("; n = natural; ":="; c = lconstr; ")" -> - TacInstantiate (n,c,ConclLocation ()) *) | IDENT "specialize"; n = OPT natural; lcb = constr_with_bindings -> TacSpecialize (n,lcb) @@ -365,16 +523,24 @@ GEXTEND Gram | IDENT "simple"; IDENT"induction"; h = quantified_hypothesis -> TacSimpleInduction h | IDENT "induction"; lc = LIST1 induction_arg; ids = with_names; - el = OPT eliminator -> TacNewInduction (lc,el,ids) + el = OPT eliminator; cl = opt_clause -> + TacNewInduction (false,lc,el,ids,cl) + | IDENT "einduction"; lc = LIST1 induction_arg; ids = with_names; + el = OPT eliminator; cl = opt_clause -> + TacNewInduction (true,lc,el,ids,cl) | IDENT "double"; IDENT "induction"; h1 = quantified_hypothesis; h2 = quantified_hypothesis -> TacDoubleInduction (h1,h2) - | IDENT "simple"; IDENT"destruct"; h = quantified_hypothesis -> + | IDENT "simple"; IDENT "destruct"; h = quantified_hypothesis -> TacSimpleDestruct h | IDENT "destruct"; lc = LIST1 induction_arg; ids = with_names; - el = OPT eliminator -> TacNewDestruct (lc,el,ids) + el = OPT eliminator; cl = opt_clause -> + TacNewDestruct (false,lc,el,ids,cl) + | IDENT "edestruct"; lc = LIST1 induction_arg; ids = with_names; + el = OPT eliminator; cl = opt_clause -> + TacNewDestruct (true,lc,el,ids,cl) | IDENT "decompose"; IDENT "record" ; c = constr -> TacDecomposeAnd c | IDENT "decompose"; IDENT "sum"; c = constr -> TacDecomposeOr c - | IDENT "decompose"; "["; l = LIST1 global; "]"; c = constr + | IDENT "decompose"; "["; l = LIST1 smart_global; "]"; c = constr -> TacDecompose (l,c) (* Automation tactic *) @@ -390,8 +556,10 @@ GEXTEND Gram | IDENT "dconcl" -> TacDestructConcl | IDENT "superauto"; l = autoargs -> TacSuperAuto l *) - | IDENT "auto"; n = OPT int_or_var; IDENT "decomp"; p = OPT natural -> - TacDAuto (n, p) + | IDENT "auto"; IDENT "decomp"; p = OPT natural; + lems = auto_using -> TacDAuto (None,p,lems) + | IDENT "auto"; n = OPT int_or_var; IDENT "decomp"; p = OPT natural; + lems = auto_using -> TacDAuto (n,p,lems) (* Context management *) | IDENT "clear"; "-"; l = LIST1 id_or_meta -> TacClear (true, l) @@ -399,27 +567,35 @@ GEXTEND Gram | IDENT "clearbody"; l = LIST1 id_or_meta -> TacClearBody l | IDENT "move"; id1 = id_or_meta; IDENT "after"; id2 = id_or_meta -> TacMove (true,id1,id2) - | IDENT "rename"; id1 = id_or_meta; IDENT "into"; id2 = id_or_meta -> - TacRename (id1,id2) + | IDENT "rename"; l = LIST1 rename SEP "," -> TacRename l + | IDENT "revert"; l = LIST1 id_or_meta -> TacRevert l (* Constructors *) - | IDENT "left"; bl = with_bindings -> TacLeft bl - | IDENT "right"; bl = with_bindings -> TacRight bl - | IDENT "split"; bl = with_bindings -> TacSplit (false,bl) - | "exists"; bl = bindings -> TacSplit (true,bl) - | "exists" -> TacSplit (true,NoBindings) + | IDENT "left"; bl = with_bindings -> TacLeft (false,bl) + | IDENT "eleft"; bl = with_bindings -> TacLeft (true,bl) + | IDENT "right"; bl = with_bindings -> TacRight (false,bl) + | IDENT "eright"; bl = with_bindings -> TacRight (true,bl) + | IDENT "split"; bl = with_bindings -> TacSplit (false,false,bl) + | IDENT "esplit"; bl = with_bindings -> TacSplit (true,false,bl) + | "exists"; bl = opt_bindings -> TacSplit (false,true,bl) + | IDENT "eexists"; bl = opt_bindings -> TacSplit (true,true,bl) | IDENT "constructor"; n = num_or_meta; l = with_bindings -> - TacConstructor (n,l) - | IDENT "constructor"; t = OPT tactic -> TacAnyConstructor t + TacConstructor (false,n,l) + | IDENT "econstructor"; n = num_or_meta; l = with_bindings -> + TacConstructor (true,n,l) + | IDENT "constructor"; t = OPT tactic -> TacAnyConstructor (false,t) + | IDENT "econstructor"; t = OPT tactic -> TacAnyConstructor (true,t) (* Equivalence relations *) | IDENT "reflexivity" -> TacReflexivity - | IDENT "symmetry"; cls = clause -> TacSymmetry cls + | IDENT "symmetry"; cl = clause_dft_concl -> TacSymmetry cl | IDENT "transitivity"; c = constr -> TacTransitivity c (* Equality and inversion *) - | IDENT "rewrite"; b = orient; c = constr_with_bindings ; cl = clause -> - TacRewrite (b,c,cl) + | IDENT "rewrite"; l = LIST1 oriented_rewriter SEP ","; + cl = clause_dft_concl; t=opt_by_tactic -> TacRewrite (false,l,cl,t) + | IDENT "erewrite"; l = LIST1 oriented_rewriter SEP ","; + cl = clause_dft_concl; t=opt_by_tactic -> TacRewrite (true,l,cl,t) | IDENT "dependent"; k = [ IDENT "simple"; IDENT "inversion" -> SimpleInversion | IDENT "inversion" -> FullInversion @@ -441,9 +617,10 @@ GEXTEND Gram TacInversion (InversionUsing (c,cl), hyp) (* Conversion *) - | r = red_tactic; cl = clause -> TacReduce (r, cl) + | r = red_tactic; cl = clause_dft_concl -> TacReduce (r, cl) (* Change ne doit pas s'appliquer dans un Definition t := Eval ... *) - | IDENT "change"; (oc,c) = conversion; cl = clause -> TacChange (oc,c,cl) + | IDENT "change"; (oc,c) = conversion; cl = clause_dft_concl -> + TacChange (oc,c,cl) ] ] ; END;; diff --git a/parsing/g_vernac.ml4 b/parsing/g_vernac.ml4 index cdd484e7..00469ad5 100644 --- a/parsing/g_vernac.ml4 +++ b/parsing/g_vernac.ml4 @@ -6,8 +6,11 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: g_vernac.ml4 10067 2007-08-09 17:13:16Z msozeau $ *) (*i camlp4deps: "parsing/grammar.cma" i*) +(*i camlp4use: "pa_extend.cmo" i*) + +(* $Id: g_vernac.ml4 11083 2008-06-09 22:08:14Z herbelin $ *) + open Pp open Util @@ -43,6 +46,8 @@ let noedit_mode = Gram.Entry.create "vernac:noedit_command" let class_rawexpr = Gram.Entry.create "vernac:class_rawexpr" let thm_token = Gram.Entry.create "vernac:thm_token" let def_body = Gram.Entry.create "vernac:def_body" +let typeclass_context = Gram.Entry.create "vernac:typeclass_context" +let of_type_with_opt_coercion = Gram.Entry.create "vernac:of_type_with_opt_coercion" let get_command_entry () = match Decl_mode.get_current_mode () with @@ -102,7 +107,7 @@ END let test_plurial_form = function | [(_,([_],_))] -> - Options.if_verbose warning + Flags.if_verbose warning "Keywords Variables/Hypotheses/Parameters expect more than one assumption" | _ -> () @@ -113,18 +118,21 @@ let no_coercion loc (c,x) = (* Gallina declarations *) GEXTEND Gram - GLOBAL: gallina gallina_ext thm_token def_body; + GLOBAL: gallina gallina_ext thm_token def_body of_type_with_opt_coercion + typeclass_context typeclass_constraint; gallina: (* Definition, Theorem, Variable, Axiom, ... *) - [ [ thm = thm_token; id = identref; bl = LIST0 binder_let; ":"; - c = lconstr -> - VernacStartTheoremProof (thm, id, (bl, c), false, no_hook) - | stre = assumption_token; bl = assum_list -> - VernacAssumption (stre, bl) - | stre = assumptions_token; bl = assum_list -> + [ [ thm = thm_token; id = identref; bl = binders_let; ":"; c = lconstr; + l = LIST0 + [ "with"; id = identref; bl = binders_let; ":"; c = lconstr -> + (Some id,(bl,c)) ] -> + VernacStartTheoremProof (thm,(Some id,(bl,c))::l, false, no_hook) + | stre = assumption_token; nl = inline; bl = assum_list -> + VernacAssumption (stre, nl, bl) + | stre = assumptions_token; nl = inline; bl = assum_list -> test_plurial_form bl; - VernacAssumption (stre, bl) + VernacAssumption (stre, nl, bl) | IDENT "Boxed";"Definition";id = identref; b = def_body -> VernacDefinition ((Global,true,Definition), id, b, no_hook) | IDENT "Unboxed";"Definition";id = identref; b = def_body -> @@ -140,7 +148,7 @@ GEXTEND Gram | IDENT "Unboxed";"Fixpoint"; recs = LIST1 rec_definition SEP "with" -> VernacFixpoint (recs,false) | "Fixpoint"; recs = LIST1 rec_definition SEP "with" -> - VernacFixpoint (recs,Options.boxed_definitions()) + VernacFixpoint (recs,Flags.boxed_definitions()) | "CoFixpoint"; corecs = LIST1 corec_definition SEP "with" -> VernacCoFixpoint (corecs,false) | IDENT "Scheme"; l = LIST1 scheme SEP "with" -> VernacScheme l @@ -149,8 +157,9 @@ GEXTEND Gram ; gallina_ext: [ [ b = record_token; oc = opt_coercion; name = identref; - ps = LIST0 binder_let; ":"; - s = lconstr; ":="; cstr = OPT identref; "{"; + ps = binders_let; + s = [ ":"; s = lconstr -> s | -> CSort (loc,Rawterm.RType None) ]; + ":="; cstr = OPT identref; "{"; fs = LIST0 record_field SEP ";"; "}" -> VernacRecord (b,(oc,name),ps,s,cstr,fs) (* Non porté ? @@ -160,6 +169,10 @@ GEXTEND Gram *) ] ] ; + typeclass_context: + [ [ "["; l=LIST1 typeclass_constraint SEP ","; "]" -> l + | -> [] ] ] + ; thm_token: [ [ "Theorem" -> Theorem | IDENT "Lemma" -> Lemma @@ -171,11 +184,11 @@ GEXTEND Gram ; def_token: [ [ "Definition" -> - no_hook, (Global, Options.boxed_definitions(), Definition) + no_hook, (Global, Flags.boxed_definitions(), Definition) | IDENT "Let" -> - no_hook, (Local, Options.boxed_definitions(), Definition) + no_hook, (Local, Flags.boxed_definitions(), Definition) | IDENT "Example" -> - no_hook, (Global, Options.boxed_definitions(), Example) + no_hook, (Global, Flags.boxed_definitions(), Example) | IDENT "SubClass" -> Class.add_subclass_hook, (Global, false, SubClass) | IDENT "Local"; IDENT "SubClass" -> Class.add_subclass_hook, (Local, false, SubClass) ] ] @@ -193,6 +206,9 @@ GEXTEND Gram | IDENT "Axioms" -> (Global, Logical) | IDENT "Parameters" -> (Global, Definitional) ] ] ; + inline: + [ ["Inline" -> true | -> false] ] + ; finite_token: [ [ "Inductive" -> true | "CoInductive" -> false ] ] @@ -202,14 +218,14 @@ GEXTEND Gram ; (* Simple definitions *) def_body: - [ [ bl = LIST0 binder_let; ":="; red = reduce; c = lconstr -> + [ [ bl = binders_let; ":="; red = reduce; c = lconstr -> (match c with CCast(_,c, Rawterm.CastConv (k,t)) -> DefineBody (bl, red, c, Some t) | _ -> DefineBody (bl, red, c, None)) - | bl = LIST0 binder_let; ":"; t = lconstr; ":="; red = reduce; c = lconstr -> - DefineBody (bl, red, c, Some t) - | bl = LIST0 binder_let; ":"; t = lconstr -> - ProveBody (bl, t) ] ] + | bl = binders_let; ":"; t = lconstr; ":="; red = reduce; c = lconstr -> + DefineBody (bl, red, c, Some t) + | bl = binders_let; ":"; t = lconstr -> + ProveBody (bl, t) ] ] ; reduce: [ [ IDENT "Eval"; r = Tactic.red_expr; "in" -> Some r @@ -221,7 +237,8 @@ GEXTEND Gram ; (* Inductives and records *) inductive_definition: - [ [ id = identref; indpar = LIST0 binder_let; ":"; c = lconstr; + [ [ id = identref; indpar = binders_let; + c = [ ":"; c = lconstr -> c | -> CSort (loc,Rawterm.RType None) ]; ":="; lc = constructor_list; ntn = decl_notation -> ((id,indpar,c,lc),ntn) ] ] ; @@ -241,49 +258,49 @@ GEXTEND Gram ; (* (co)-fixpoints *) rec_definition: - [ [ id = ident; bl = LIST1 binder_let; - annot = rec_annotation; ty = type_cstr; + [ [ id = identref; + bl = binders_let_fixannot; + ty = type_cstr; ":="; def = lconstr; ntn = decl_notation -> - let names = List.map snd (names_of_local_assums bl) in + let bl, annot = bl in + let names = names_of_local_assums bl in let ni = match fst annot with - Some id -> - (try Some (list_index (Name id) names - 1) - with Not_found -> Util.user_err_loc - (loc,"Fixpoint", + Some (loc, id) -> + (if List.exists (fun (_, id') -> Name id = id') names then + Some (loc, id) + else Util.user_err_loc + (loc,"Fixpoint", Pp.str "No argument named " ++ Nameops.pr_id id)) | None -> (* If there is only one argument, it is the recursive one, otherwise, we search the recursive index later *) - if List.length names = 1 then Some 0 else None + match names with + | [(loc, Name na)] -> Some (loc, na) + | _ -> None in ((id,(ni,snd annot),bl,ty,def),ntn) ] ] ; corec_definition: - [ [ id = ident; bl = LIST0 binder_let; ty = type_cstr; ":="; + [ [ id = identref; bl = binders_let; ty = type_cstr; ":="; def = lconstr; ntn = decl_notation -> ((id,bl,ty,def),ntn) ] ] ; - rec_annotation: - [ [ "{"; IDENT "struct"; id=IDENT; "}" -> (Some (id_of_string id), CStructRec) - | "{"; IDENT "wf"; rel=constr; id=OPT IDENT; "}" -> (option_map id_of_string id, CWfRec rel) - | "{"; IDENT "measure"; rel=constr; id=OPT IDENT; "}" -> (option_map id_of_string id, CMeasureRec rel) - | -> (None, CStructRec) - ] ] - ; type_cstr: [ [ ":"; c=lconstr -> c - | -> CHole loc ] ] + | -> CHole (loc, None) ] ] ; (* Inductive schemes *) scheme: - [ [ id = identref; ":="; dep = dep_scheme; "for"; ind = global; - IDENT "Sort"; s = sort -> - (id,dep,ind,s) ] ] + [ [ kind = scheme_kind -> (None,kind) + | id = identref; ":="; kind = scheme_kind -> (Some id,kind) ] ] ; - dep_scheme: - [ [ IDENT "Induction" -> true - | IDENT "Minimality" -> false ] ] + scheme_kind: + [ [ IDENT "Induction"; "for"; ind = global; + IDENT "Sort"; s = sort-> InductionScheme(true,ind,s) + | IDENT "Minimality"; "for"; ind = global; + IDENT "Sort"; s = sort-> InductionScheme(false,ind,s) + | IDENT "Equality"; "for" ; ind = global -> EqualityScheme(ind) ] ] ; (* Various Binders *) (* @@ -299,7 +316,7 @@ GEXTEND Gram *) (* ... with coercions *) record_field: - [ [ id = name -> (false,AssumExpr(id,CHole loc)) + [ [ id = name -> (false,AssumExpr(id,CHole (loc, None))) | id = name; oc = of_type_with_opt_coercion; t = lconstr -> (oc,AssumExpr (id,t)) | id = name; oc = of_type_with_opt_coercion; @@ -320,11 +337,11 @@ GEXTEND Gram (oc,(idl,c)) ] ] ; constructor: - [ [ id = identref; l = LIST0 binder_let; + [ [ id = identref; l = binders_let; coe = of_type_with_opt_coercion; c = lconstr -> - (coe,(id,G_constr.mkCProdN loc l c)) - | id = identref; l = LIST0 binder_let -> - (false,(id,G_constr.mkCProdN loc l (CHole loc))) ] ] + (coe,(id,mkCProdN loc l c)) + | id = identref; l = binders_let -> + (false,(id,mkCProdN loc l (CHole (loc, None)))) ] ] ; of_type_with_opt_coercion: [ [ ":>" -> true @@ -360,25 +377,20 @@ GEXTEND Gram | IDENT "End"; id = identref -> VernacEndSegment id (* Requiring an already compiled module *) - | IDENT "Require"; export = export_token; specif = specif_token; - qidl = LIST1 global -> - VernacRequire (export, specif, qidl) - | IDENT "Require"; export = export_token; specif = specif_token; - filename = ne_string -> - VernacRequireFrom (export, specif, filename) + | IDENT "Require"; export = export_token; qidl = LIST1 global -> + VernacRequire (export, None, qidl) + | IDENT "Require"; export = export_token; filename = ne_string -> + VernacRequireFrom (export, None, filename) | IDENT "Import"; qidl = LIST1 global -> VernacImport (false,qidl) - | IDENT "Export"; qidl = LIST1 global -> VernacImport (true,qidl) ] ] + | IDENT "Export"; qidl = LIST1 global -> VernacImport (true,qidl) + | IDENT "Include"; expr = module_expr -> VernacInclude(CIME(expr)) + | IDENT "Include"; "Type"; expr = module_type -> VernacInclude(CIMTE(expr)) ] ] ; export_token: [ [ IDENT "Import" -> Some false | IDENT "Export" -> Some true | -> None ] ] ; - specif_token: - [ [ IDENT "Implementation" -> Some false - | IDENT "Specification" -> Some true - | -> None ] ] - ; of_module_type: [ [ ":"; mty = module_type -> (mty, true) | "<:"; mty = module_type -> (mty, false) ] ] @@ -398,12 +410,13 @@ GEXTEND Gram (* Module expressions *) module_expr: - [ [ qid = qualid -> CMEident qid - | me1 = module_expr; me2 = module_expr -> CMEapply (me1,me2) - | "("; me = module_expr; ")" -> me -(* ... *) + [ [ me = module_expr_atom -> me + | me1 = module_expr; me2 = module_expr_atom -> CMEapply (me1,me2) ] ] ; + module_expr_atom: + [ [ qid = qualid -> CMEident qid | "("; me = module_expr; ")" -> me ] ] + ; with_declaration: [ [ "Definition"; fqid = fullyqualid; ":="; c = Constr.lconstr -> CWith_Definition (fqid,c) @@ -414,8 +427,9 @@ GEXTEND Gram module_type: [ [ qid = qualid -> CMTEident qid (* ... *) - | mty = module_type; "with"; decl = with_declaration -> - CMTEwith (mty,decl) ] ] + | mty = module_type; me = module_expr_atom -> CMTEapply (mty,me) + | mty = module_type; "with"; decl = with_declaration -> CMTEwith (mty,decl) + ] ] ; END @@ -425,9 +439,16 @@ GEXTEND Gram gallina_ext: [ [ (* Transparent and Opaque *) - IDENT "Transparent"; l = LIST1 global -> VernacSetOpacity (false, l) - | IDENT "Opaque"; l = LIST1 global -> VernacSetOpacity (true, l) - + IDENT "Transparent"; l = LIST1 global -> + VernacSetOpacity (true,[Conv_oracle.transparent,l]) + | IDENT "Opaque"; l = LIST1 global -> + VernacSetOpacity (true,[Conv_oracle.Opaque, l]) + | IDENT "Strategy"; l = + LIST1 [ lev=strategy_level; "["; q=LIST1 global; "]" -> (lev,q)] -> + VernacSetOpacity (false,l) + | IDENT "Local"; IDENT "Strategy"; l = + LIST1 [ lev=strategy_level; "["; q=LIST1 global; "]" -> (lev,q)] -> + VernacSetOpacity (true,l) (* Canonical structure *) | IDENT "Canonical"; IDENT "Structure"; qid = global -> VernacCanonical qid @@ -457,15 +478,77 @@ GEXTEND Gram t = class_rawexpr -> VernacCoercion (Global, qid, s, t) + (* Type classes, new syntax without artificial sup. *) + | IDENT "Class"; qid = identref; pars = binders_let; + s = [ ":"; c = sort -> Some (loc, c) | -> None ]; + props = typeclass_field_types -> + VernacClass (qid, pars, s, [], props) + + (* Type classes *) + | IDENT "Class"; sup = OPT [ l = binders_let; "=>" -> l ]; + qid = identref; pars = binders_let; + s = [ ":"; c = sort -> Some (loc, c) | -> None ]; + props = typeclass_field_types -> + VernacClass (qid, pars, s, (match sup with None -> [] | Some l -> l), props) + + | IDENT "Context"; c = typeclass_context -> + VernacContext c + + | global = [ IDENT "Global" -> true | -> false ]; + IDENT "Instance"; name = identref; sup = OPT binders_let; ":"; + expl = [ "!" -> Rawterm.Implicit | -> Rawterm.Explicit ] ; t = operconstr LEVEL "200"; + pri = OPT [ "|"; i = natural -> i ] ; props = typeclass_field_defs -> + let sup = + match sup with + None -> [] + | Some l -> l + in + let n = + let (loc, id) = name in + (loc, Name id) + in + VernacInstance (global, sup, (n, expl, t), props, pri) + + | IDENT "Existing"; IDENT "Instance"; is = identref -> VernacDeclareInstance is + (* Implicit *) - | IDENT "Implicit"; IDENT "Arguments"; qid = global; - pos = OPT [ "["; l = LIST0 ident; "]" -> l ] -> - let pos = option_map (List.map (fun id -> ExplByName id)) pos in - VernacDeclareImplicits (true,qid,pos) + | IDENT "Implicit"; IDENT "Arguments"; + local = [ IDENT "Global" -> false | IDENT "Local" -> true | -> Lib.sections_are_opened () ]; + qid = global; + pos = OPT [ "["; l = LIST0 implicit_name; "]" -> + List.map (fun (id,b,f) -> (ExplByName id,b,f)) l ] -> + VernacDeclareImplicits (local,qid,pos) | IDENT "Implicit"; ["Type" | IDENT "Types"]; idl = LIST1 identref; ":"; c = lconstr -> VernacReserve (idl,c) ] ] ; + implicit_name: + [ [ "!"; id = ident -> (id, false, true) + | id = ident -> (id,false,false) + | "["; "!"; id = ident; "]" -> (id,true,true) + | "["; id = ident; "]" -> (id,true, false) ] ] + ; + typeclass_field_type: + [ [ id = identref; oc = of_type_with_opt_coercion; t = lconstr -> id, oc, t ] ] + ; + typeclass_field_def: + [ [ id = identref; params = LIST0 identref; ":="; t = lconstr -> id, params, t ] ] + ; + typeclass_field_types: + [ [ ":="; l = LIST1 typeclass_field_type SEP ";" -> l + | -> [] ] ] + ; + typeclass_field_defs: + [ [ ":="; l = LIST1 typeclass_field_def SEP ";" -> l + | -> [] ] ] + ; + strategy_level: + [ [ IDENT "expand" -> Conv_oracle.Expand + | IDENT "opaque" -> Conv_oracle.Opaque + | n=INT -> Conv_oracle.Level (int_of_string n) + | "-"; n=INT -> Conv_oracle.Level (- int_of_string n) + | IDENT "transparent" -> Conv_oracle.transparent ] ] + ; END GEXTEND Gram @@ -544,48 +627,35 @@ GEXTEND Gram VernacAddMLPath (true, dir) (* Pour intervenir sur les tables de paramètres *) - | "Set"; table = IDENT; field = IDENT; v = option_value -> - VernacSetOption (SecondaryTable (table,field),v) - | "Set"; table = IDENT; field = IDENT; lv = LIST1 option_ref_value -> - VernacAddOption (SecondaryTable (table,field),lv) - | "Set"; table = IDENT; field = IDENT -> - VernacSetOption (SecondaryTable (table,field),BoolValue true) - | IDENT "Unset"; table = IDENT; field = IDENT -> - VernacUnsetOption (SecondaryTable (table,field)) - | IDENT "Unset"; table = IDENT; field = IDENT; lv = LIST1 option_ref_value -> - VernacRemoveOption (SecondaryTable (table,field),lv) - | "Set"; table = IDENT; value = option_value -> - VernacSetOption (PrimaryTable table, value) - | "Set"; table = IDENT -> - VernacSetOption (PrimaryTable table, BoolValue true) - | IDENT "Unset"; table = IDENT -> - VernacUnsetOption (PrimaryTable table) - - | IDENT "Print"; IDENT "Table"; table = IDENT; field = IDENT -> - VernacPrintOption (SecondaryTable (table,field)) - | IDENT "Print"; IDENT "Table"; table = IDENT -> - VernacPrintOption (PrimaryTable table) + | "Set"; table = option_table; v = option_value -> + VernacSetOption (table,v) + | "Set"; table = option_table -> + VernacSetOption (table,BoolValue true) + | IDENT "Unset"; table = option_table -> + VernacUnsetOption table + + | IDENT "Print"; IDENT "Table"; table = option_table -> + VernacPrintOption table | IDENT "Add"; table = IDENT; field = IDENT; v = LIST1 option_ref_value -> VernacAddOption (SecondaryTable (table,field), v) - (* Un value global ci-dessous va être caché par un field au dessus! *) + (* En fait, on donne priorité aux tables secondaires *) + (* Pas de syntaxe pour les tables tertiaires pour cause de conflit *) + (* (mais de toutes façons, pas utilisées) *) | IDENT "Add"; table = IDENT; v = LIST1 option_ref_value -> VernacAddOption (PrimaryTable table, v) - | IDENT "Test"; table = IDENT; field = IDENT; v = LIST1 option_ref_value - -> VernacMemOption (SecondaryTable (table,field), v) - | IDENT "Test"; table = IDENT; field = IDENT -> - VernacPrintOption (SecondaryTable (table,field)) - | IDENT "Test"; table = IDENT; v = LIST1 option_ref_value -> - VernacMemOption (PrimaryTable table, v) - | IDENT "Test"; table = IDENT -> - VernacPrintOption (PrimaryTable table) + | IDENT "Test"; table = option_table; "for"; v = LIST1 option_ref_value + -> VernacMemOption (table, v) + | IDENT "Test"; table = option_table -> + VernacPrintOption table | IDENT "Remove"; table = IDENT; field = IDENT; v= LIST1 option_ref_value -> VernacRemoveOption (SecondaryTable (table,field), v) | IDENT "Remove"; table = IDENT; v = LIST1 option_ref_value -> VernacRemoveOption (PrimaryTable table, v) + | IDENT "proof" -> VernacDeclProof | "return" -> VernacReturn ]] ; @@ -601,14 +671,18 @@ GEXTEND Gram | IDENT "Section"; s = global -> PrintSectionContext s | IDENT "Grammar"; ent = IDENT -> (* This should be in "syntax" section but is here for factorization*) - PrintGrammar ("", ent) + PrintGrammar ent | IDENT "LoadPath" -> PrintLoadPath - | IDENT "Modules" -> PrintModules + | IDENT "Modules" -> + error "Print Modules is obsolete; use Print Libraries instead" + | IDENT "Libraries" -> PrintModules | IDENT "ML"; IDENT "Path" -> PrintMLLoadPath | IDENT "ML"; IDENT "Modules" -> PrintMLModules | IDENT "Graph" -> PrintGraph | IDENT "Classes" -> PrintClasses + | IDENT "TypeClasses" -> PrintTypeClasses + | IDENT "Instances"; qid = global -> PrintInstances qid | IDENT "Ltac"; qid = global -> PrintLtac qid | IDENT "Coercions" -> PrintCoercions | IDENT "Coercion"; IDENT "Paths"; s = class_rawexpr; t = class_rawexpr @@ -628,7 +702,8 @@ GEXTEND Gram | IDENT "Scope"; s = IDENT -> PrintScope s | IDENT "Visibility"; s = OPT IDENT -> PrintVisibility s | IDENT "Implicit"; qid = global -> PrintImplicit qid - | IDENT "Universes"; fopt = OPT ne_string -> PrintUniverses fopt ] ] + | IDENT "Universes"; fopt = OPT ne_string -> PrintUniverses fopt + | IDENT "Assumptions"; qid = global -> PrintAssumptions qid ] ] ; class_rawexpr: [ [ IDENT "Funclass" -> FunClass @@ -650,6 +725,11 @@ GEXTEND Gram [ [ id = global -> QualidRefValue id | s = STRING -> StringRefValue s ] ] ; + option_table: + [ [ f1 = IDENT; f2 = IDENT; f3 = IDENT -> TertiaryTable (f1,f2,f3) + | f1 = IDENT; f2 = IDENT -> SecondaryTable (f1,f2) + | f1 = IDENT -> PrimaryTable f1 ] ] + ; as_dirpath: [ [ d = OPT [ "as"; d = dirpath -> d ] -> d ] ] ; @@ -676,6 +756,7 @@ GEXTEND Gram (* Resetting *) | IDENT "Reset"; id = identref -> VernacResetName id + | IDENT "Delete"; id = identref -> VernacRemoveName id | IDENT "Reset"; IDENT "Initial" -> VernacResetInitial | IDENT "Back" -> VernacBack 1 | IDENT "Back"; n = natural -> VernacBack n @@ -712,17 +793,18 @@ GEXTEND Gram | IDENT "Bind"; IDENT "Scope"; sc = IDENT; "with"; refl = LIST1 class_rawexpr -> VernacBindScope (sc,refl) - | IDENT "Arguments"; IDENT "Scope"; qid = global; - "["; scl = LIST0 opt_scope; "]" -> VernacArgumentsScope (true,qid,scl) + | IDENT "Arguments"; IDENT "Scope"; local = non_globality; qid = global; + "["; scl = LIST0 opt_scope; "]" -> VernacArgumentsScope (local,qid,scl) | IDENT "Infix"; local = locality; op = ne_string; ":="; p = global; modl = [ "("; l = LIST1 syntax_modifier SEP ","; ")" -> l | -> [] ]; sc = OPT [ ":"; sc = IDENT -> sc ] -> VernacInfix (local,(op,modl),p,sc) - | IDENT "Notation"; local = locality; id = ident; ":="; c = constr; + | IDENT "Notation"; local = locality; id = identref; idl = LIST0 ident; + ":="; c = constr; b = [ "("; IDENT "only"; IDENT "parsing"; ")" -> true | -> false ] -> - VernacSyntacticDefinition (id,c,local,b) + VernacSyntacticDefinition (id,(idl,c),local,b) | IDENT "Notation"; local = locality; s = ne_string; ":="; c = constr; modl = [ "("; l = LIST1 syntax_modifier SEP ","; ")" -> l | -> [] ]; sc = OPT [ ":"; sc = IDENT -> sc ] -> @@ -744,7 +826,10 @@ GEXTEND Gram [ [ "("; "at"; IDENT "level"; n = natural; ")" -> n | -> 0 ] ] ; locality: - [ [ IDENT "Local" -> true | -> false ] ] + [ [ IDENT "Global" -> false | IDENT "Local" -> true | -> false ] ] + ; + non_globality: + [ [ IDENT "Global" -> false | IDENT "Local" -> true | -> true ] ] ; level: [ [ IDENT "level"; n = natural -> NumLevel n diff --git a/parsing/g_xml.ml4 b/parsing/g_xml.ml4 index ce284454..5b2d8668 100644 --- a/parsing/g_xml.ml4 +++ b/parsing/g_xml.ml4 @@ -6,7 +6,9 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: g_xml.ml4 10090 2007-08-24 10:53:53Z herbelin $ *) +(*i camlp4use: "pa_extend.cmo" i*) + +(* $Id: g_xml.ml4 10727 2008-03-28 20:22:43Z msozeau $ *) open Pp open Util @@ -139,12 +141,12 @@ let rec interp_xml_constr = function | XmlTag (loc,"LAMBDA",al,(_::_ as xl)) -> let body,decls = list_sep_last xl in let ctx = List.map interp_xml_decl decls in - List.fold_right (fun (na,t) b -> RLambda (loc, na, t, b)) + List.fold_right (fun (na,t) b -> RLambda (loc, na, Explicit, t, b)) ctx (interp_xml_target body) | XmlTag (loc,"PROD",al,(_::_ as xl)) -> let body,decls = list_sep_last xl in let ctx = List.map interp_xml_decl decls in - List.fold_right (fun (na,t) b -> RProd (loc, na, t, b)) + List.fold_right (fun (na,t) b -> RProd (loc, na, Explicit, t, b)) ctx (interp_xml_target body) | XmlTag (loc,"LETIN",al,(_::_ as xl)) -> let body,defs = list_sep_last xl in @@ -169,7 +171,7 @@ let rec interp_xml_constr = function let mat = simple_cases_matrix_of_branches ind brns brs in let nparams,n = compute_inductive_nargs ind in let nal,rtn = return_type_of_predicate ind nparams n p in - RCases (loc,rtn,[tm,nal],mat) + RCases (loc,RegularStyle,rtn,[tm,nal],mat) | XmlTag (loc,"MUTIND",al,[]) -> RRef (loc, IndRef (get_xml_inductive al)) | XmlTag (loc,"MUTCONSTRUCT",al,[]) -> diff --git a/parsing/g_zsyntax.ml b/parsing/g_zsyntax.ml index 554040d1..aab266c0 100644 --- a/parsing/g_zsyntax.ml +++ b/parsing/g_zsyntax.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: g_zsyntax.ml 7988 2006-02-04 20:28:29Z herbelin $ *) +(* $Id: g_zsyntax.ml 10806 2008-04-16 23:51:06Z letouzey $ *) open Pcoq open Pp diff --git a/parsing/lexer.ml4 b/parsing/lexer.ml4 index 80eaf7f0..c1e4cfc6 100644 --- a/parsing/lexer.ml4 +++ b/parsing/lexer.ml4 @@ -6,9 +6,15 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: lexer.ml4 9015 2006-07-05 17:19:22Z herbelin $ i*) +(*i $Id: lexer.ml4 11059 2008-06-06 09:29:20Z herbelin $ i*) + + +(*i camlp4use: "pr_o.cmo" i*) +(* Add pr_o.cmo to circumvent a useless-warning bug when preprocessed with + * ast-based camlp4 *) open Pp +open Util open Token (* Dictionaries: trees annotated with string options, each node being a map @@ -71,8 +77,10 @@ let bad_token str = raise (Error (Bad_token str)) (* Lexer conventions on tokens *) -type utf8_token = - Utf8Letter of int | Utf8IdentPart of int | Utf8Symbol | AsciiChar +type token_kind = + | Utf8Token of (utf8_status * int) + | AsciiChar + | EmptyStream let error_unsupported_unicode_character n cs = let bp = Stream.count cs in @@ -80,6 +88,7 @@ let error_unsupported_unicode_character n cs = let error_utf8 cs = let bp = Stream.count cs in + Stream.junk cs; (* consume the char to avoid read it and fail again *) err (bp, bp+1) Illegal_character let njunk n = Util.repeat n Stream.junk @@ -115,114 +124,14 @@ let lookup_utf8_tail c cs = (Char.code c3 land 0x3F) lsl 6 + (Char.code c4 land 0x3F) | _ -> error_utf8 cs in - match unicode land 0x1F000 with - | 0x0 -> - begin match unicode with - (* utf-8 Latin-1 non breaking space U00A0 *) - | 0x00A0 -> Utf8Letter n - (* utf-8 Latin-1 symbols U00A1-00BF *) - | x when 0x00A0 <= x & x <= 0x00BF -> Utf8Symbol - (* utf-8 Latin-1 letters U00C0-00D6 *) - | x when 0x00C0 <= x & x <= 0x00D6 -> Utf8Letter n - (* utf-8 Latin-1 symbol U00D7 *) - | 0x00D7 -> Utf8Symbol - (* utf-8 Latin-1 letters U00D8-00F6 *) - | x when 0x00D8 <= x & x <= 0x00F6 -> Utf8Letter n - (* utf-8 Latin-1 symbol U00F7 *) - | 0x00F7 -> Utf8Symbol - (* utf-8 Latin-1 letters U00F8-00FF *) - | x when 0x00F8 <= x & x <= 0x00FF -> Utf8Letter n - (* utf-8 Latin Extended A U0100-017F and Latin Extended B U0180-U0241 *) - | x when 0x0100 <= x & x <= 0x0241 -> Utf8Letter n - (* utf-8 Phonetic letters U0250-02AF *) - | x when 0x0250 <= x & x <= 0x02AF -> Utf8Letter n - (* utf-8 what do to with diacritics U0300-U036F ? *) - (* utf-8 Greek letters U0380-03FF *) - | x when 0x0380 <= x & x <= 0x03FF -> Utf8Letter n - (* utf-8 Cyrillic letters U0400-0481 *) - | x when 0x0400 <= x & x <= 0x0481 -> Utf8Letter n - (* utf-8 Cyrillic symbol U0482 *) - | 0x0482 -> Utf8Symbol - (* utf-8 what do to with diacritics U0483-U0489 \ U0487 ? *) - (* utf-8 Cyrillic letters U048A-U4F9 (Warning: 04CF) *) - | x when 0x048A <= x & x <= 0x04F9 -> Utf8Letter n - (* utf-8 Cyrillic supplement letters U0500-U050F *) - | x when 0x0500 <= x & x <= 0x050F -> Utf8Letter n - (* utf-8 Hebrew letters U05D0-05EA *) - | x when 0x05D0 <= x & x <= 0x05EA -> Utf8Letter n - (* utf-8 Arabic letters U0621-064A *) - | x when 0x0621 <= x & x <= 0x064A -> Utf8Letter n - (* utf-8 Arabic supplement letters U0750-076D *) - | x when 0x0750 <= x & x <= 0x076D -> Utf8Letter n - | _ -> error_unsupported_unicode_character n cs - end - | 0x1000 -> - begin match unicode with - (* utf-8 Georgian U10A0-10FF (has holes) *) - | x when 0x10A0 <= x & x <= 0x10FF -> Utf8Letter n - (* utf-8 Hangul Jamo U1100-11FF (has holes) *) - | x when 0x1100 <= x & x <= 0x11FF -> Utf8Letter n - (* utf-8 Latin additional letters U1E00-1E9B and U1EA0-1EF9 *) - | x when 0x1E00 <= x & x <= 0x1E9B -> Utf8Letter n - | x when 0x1EA0 <= x & x <= 0x1EF9 -> Utf8Letter n - | _ -> error_unsupported_unicode_character n cs - end - | 0x2000 -> - begin match unicode with - (* utf-8 general punctuation U2080-2089 *) - (* Hyphens *) - | x when 0x2010 <= x & x <= 0x2011 -> Utf8Letter n - (* Dashes and other symbols *) - | x when 0x2012 <= x & x <= 0x2027 -> Utf8Symbol - (* Per mille and per ten thousand signs *) - | x when 0x2030 <= x & x <= 0x2031 -> Utf8Symbol - (* Prime letters *) - | x when 0x2032 <= x & x <= 0x2034 or x = 0x2057 -> Utf8IdentPart n - (* Miscellaneous punctuation *) - | x when 0x2039 <= x & x <= 0x2056 -> Utf8Symbol - | x when 0x2058 <= x & x <= 0x205E -> Utf8Symbol - (* Invisible mathematical operators *) - | x when 0x2061 <= x & x <= 0x2063 -> Utf8Symbol - - (* utf-8 subscript U2080-2089 *) - | x when 0x2080 <= x & x <= 0x2089 -> Utf8IdentPart n - (* utf-8 letter-like U2100-214F *) - | x when 0x2100 <= x & x <= 0x214F -> Utf8Letter n - (* utf-8 number-forms U2153-2183 *) - | x when 0x2153 <= x & x <= 0x2183 -> Utf8Symbol - (* utf-8 arrows A U2190-21FF *) - (* utf-8 mathematical operators U2200-22FF *) - (* utf-8 miscellaneous technical U2300-23FF *) - | x when 0x2190 <= x & x <= 0x23FF -> Utf8Symbol - (* utf-8 box drawing U2500-257F has ceiling, etc. *) - (* utf-8 block elements U2580-259F *) - (* utf-8 geom. shapes U25A0-25FF (has triangles, losange, etc) *) - (* utf-8 miscellaneous symbols U2600-26FF *) - | x when 0x2500 <= x & x <= 0x26FF -> Utf8Symbol - (* utf-8 arrows B U2900-297F *) - | x when 0x2900 <= x & x <= 0x297F -> Utf8Symbol - (* utf-8 mathematical operators U2A00-2AFF *) - | x when 0x2A00 <= x & x <= 0x2AFF -> Utf8Symbol - | _ -> error_unsupported_unicode_character n cs - end - | _ -> - begin match unicode with - (* utf-8 Hiragana U3040-309F and Katakana U30A0-30FF *) - | x when 0x3040 <= x & x <= 0x30FF -> Utf8Letter n - (* utf-8 Unified CJK Ideographs U4E00-9FA5 *) - | x when 0x4E00 <= x & x <= 0x9FA5 -> Utf8Letter n - (* utf-8 Hangul syllables UAC00-D7AF *) - | x when 0xAC00 <= x & x <= 0xD7AF -> Utf8Letter n - (* utf-8 Gothic U10330-1034A *) - | x when 0x10330 <= x & x <= 0x1034A -> Utf8Letter n - | _ -> error_unsupported_unicode_character n cs - end + try classify_unicode unicode, n + with UnsupportedUtf8 -> error_unsupported_unicode_character n cs let lookup_utf8 cs = match Stream.peek cs with - | Some ('\x00'..'\x7F') -> Some AsciiChar - | Some ('\x80'..'\xFF' as c) -> Some (lookup_utf8_tail c cs) - | None -> None + | Some ('\x00'..'\x7F') -> AsciiChar + | Some ('\x80'..'\xFF' as c) -> Utf8Token (lookup_utf8_tail c cs) + | None -> EmptyStream let check_special_token str = let rec loop_symb = parser @@ -234,16 +143,16 @@ let check_special_token str = let check_ident str = let rec loop_id intail = parser - | [< ' ('$' | 'a'..'z' | 'A'..'Z' | '_'); s >] -> + | [< ' ('a'..'z' | 'A'..'Z' | '_'); s >] -> loop_id true s | [< ' ('0'..'9' | ''') when intail; s >] -> loop_id true s | [< s >] -> match lookup_utf8 s with - | Some (Utf8Letter n) -> njunk n s; loop_id true s - | Some (Utf8IdentPart n) when intail -> njunk n s; loop_id true s - | Some _ -> bad_token str - | None -> () + | Utf8Token (UnicodeLetter, n) -> njunk n s; loop_id true s + | Utf8Token (UnicodeIdentPart, n) when intail -> njunk n s; loop_id true s + | EmptyStream -> () + | Utf8Token _ | AsciiChar -> bad_token str in loop_id false (Stream.of_string str) @@ -266,7 +175,7 @@ let add_keyword str = (* Adding a new token (keyword or special token). *) let add_token (con, str) = match con with | "" -> add_keyword str - | "METAIDENT" | "IDENT" | "FIELD" | "INT" | "STRING" | "EOI" + | "METAIDENT" | "PATTERNIDENT" | "IDENT" | "FIELD" | "INT" | "STRING" | "EOI" -> () | _ -> raise (Token.Error ("\ @@ -308,7 +217,7 @@ let rec ident_tail len = parser ident_tail (store len c) s | [< s >] -> match lookup_utf8 s with - | Some (Utf8IdentPart n | Utf8Letter n) -> + | Utf8Token ((UnicodeIdentPart | UnicodeLetter), n) -> ident_tail (nstore n len s) s | _ -> len @@ -368,10 +277,10 @@ let null_comment s = let comment_stop ep = let current_s = Buffer.contents current in - if !Options.xml_export && Buffer.length current > 0 && + if !Flags.xml_export && Buffer.length current > 0 && (!between_com || not(null_comment current_s)) then !xml_output_comment current_s; - (if Options.do_translate() && Buffer.length current > 0 && + (if Flags.do_translate() && Buffer.length current > 0 && (!between_com || not(null_comment current_s)) then let bp = match !comment_begin with Some bp -> bp @@ -406,7 +315,7 @@ let rec comment bp = parser bp2 | [< '')' >] -> push_string "*)"; | [< s >] -> real_push_char '*'; comment bp s >] -> () | [< ''"'; s >] -> - if Options.do_translate() then (push_string"\"";comm_string bp2 s) + if Flags.do_translate() then (push_string"\"";comm_string bp2 s) else ignore (string bp2 0 s); comment bp s | [< _ = Stream.empty >] ep -> err (bp, ep) Unterminated_comment @@ -457,27 +366,30 @@ let process_chars bp c cs = | Some t -> (("", t), (bp, ep)) | None -> err (bp, ep) Undefined_token -(* Parse what follows a dot *) -let parse_after_dot bp c = parser +(* Parse what follows a dot/question mark *) +let parse_after_dot bp c = + let constructor = if c = '?' then "PATTERNIDENT" else "FIELD" in + parser | [< ' ('a'..'z' | 'A'..'Z' | '_' as c); len = ident_tail (store 0 c) >] -> - ("FIELD", get_buff len) + (constructor, get_buff len) | [< s >] -> match lookup_utf8 s with - | Some (Utf8Letter n) -> - ("FIELD", get_buff (ident_tail (nstore n 0 s) s)) - | Some (Utf8IdentPart _ | AsciiChar | Utf8Symbol) | None -> + | Utf8Token (UnicodeLetter, n) -> + (constructor, get_buff (ident_tail (nstore n 0 s) s)) + | AsciiChar | Utf8Token _ | EmptyStream -> fst (process_chars bp c s) (* Parse a token in a char stream *) let rec next_token = parser bp | [< '' ' | '\t' | '\n' |'\r' as c; s >] -> comm_loc bp; push_char c; next_token s - | [< ''$'; len = ident_tail (store 0 '$') >] ep -> + | [< ''$'; ' ('a'..'z' | 'A'..'Z' | '_' as c); + len = ident_tail (store 0 c) >] ep -> comment_stop bp; (("METAIDENT", get_buff len), (bp,ep)) - | [< ''.' as c; t = parse_after_dot bp c >] ep -> + | [< ' ('.' | '?') as c; t = parse_after_dot bp c >] ep -> comment_stop bp; - if Options.do_translate() & t=("",".") then between_com := true; + if Flags.do_translate() & t=("",".") then between_com := true; (t, (bp,ep)) | [< ' ('a'..'z' | 'A'..'Z' | '_' as c); len = ident_tail (store 0 c) >] ep -> @@ -501,16 +413,16 @@ let rec next_token = parser bp t | [< s >] -> match lookup_utf8 s with - | Some (Utf8Letter n) -> + | Utf8Token (UnicodeLetter, n) -> let len = ident_tail (nstore n 0 s) s in let id = get_buff len in let ep = Stream.count s in comment_stop bp; (try ("",find_keyword id) with Not_found -> ("IDENT",id)), (bp, ep) - | Some (Utf8Symbol | AsciiChar | Utf8IdentPart _) -> + | AsciiChar | Utf8Token ((UnicodeSymbol | UnicodeIdentPart), _) -> let t = process_chars bp (Stream.next s) s in comment_stop bp; t - | None -> + | EmptyStream -> comment_stop bp; (("EOI", ""), (bp, bp + 1)) (* Location table system for creating tables associating a token count diff --git a/parsing/pcoq.ml4 b/parsing/pcoq.ml4 index bf3cb084..70a41ddc 100644 --- a/parsing/pcoq.ml4 +++ b/parsing/pcoq.ml4 @@ -6,7 +6,9 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: pcoq.ml4 10185 2007-10-06 18:05:13Z herbelin $ i*) +(*i camlp4use: "pa_extend.cmo pa_macro.cmo" i*) + +(*i $Id: pcoq.ml4 10987 2008-05-26 12:28:36Z herbelin $ i*) open Pp open Util @@ -70,11 +72,27 @@ module G = Grammar.Make(L) END -let grammar_delete e rls = +let grammar_delete e pos reinit rls = List.iter - (fun (_,_,lev) -> - List.iter (fun (pil,_) -> G.delete_rule e pil) (List.rev lev)) - (List.rev rls) + (fun (n,ass,lev) -> + + (* Caveat: deletion is not the converse of extension: when an + empty level is extended, deletion removes the level instead + of keeping it empty. This has an effect on the empty levels 8, + 99 and 200. We didn't find a good solution to this problem + (e.g. using G.extend to know if the level exists results in a + printed error message as side effect). As a consequence an + extension at 99 or 8 (and for pattern 200 too) inside a section + corrupts the parser. *) + + List.iter (fun (pil,_) -> G.delete_rule e pil) (List.rev lev)) + (List.rev rls); + if reinit <> None then + let lev = match pos with Some (Gramext.Level n) -> n | _ -> assert false in + let pos = + if lev = "200" then Gramext.First + else Gramext.After (string_of_int (int_of_string lev + 1)) in + G.extend e (Some pos) [Some lev,reinit,[]]; (* grammar_object is the superclass of all grammar entries *) module type Gramobj = @@ -120,7 +138,8 @@ type ext_kind = | ByGrammar of grammar_object G.Entry.e * Gramext.position option * (string option * Gramext.g_assoc option * - (Compat.token Gramext.g_symbol list * Gramext.g_action) list) list + (Compat.token Gramext.g_symbol list * Gramext.g_action) list) list * + Gramext.g_assoc option | ByGEXTEND of (unit -> unit) * (unit -> unit) let camlp4_state = ref [] @@ -132,7 +151,7 @@ module Gram = include G let extend e pos rls = camlp4_state := - (ByGEXTEND ((fun () -> grammar_delete e rls), + (ByGEXTEND ((fun () -> grammar_delete e pos None rls), (fun () -> G.extend e pos rls))) :: !camlp4_state; G.extend e pos rls @@ -149,9 +168,9 @@ let camlp4_verbosity silent f x = (* This extension command is used by the Grammar constr *) -let grammar_extend te pos rls = - camlp4_state := ByGrammar (Gramobj.weaken_entry te,pos,rls) :: !camlp4_state; - camlp4_verbosity (Options.is_verbose ()) (G.extend te pos) rls +let grammar_extend te pos reinit rls = + camlp4_state := ByGrammar (weaken_entry te,pos,rls,reinit) :: !camlp4_state; + camlp4_verbosity (Flags.is_verbose ()) (G.extend te pos) rls (* n is the number of extended entries (not the number of Grammar commands!) to remove. *) @@ -159,8 +178,8 @@ let rec remove_grammars n = if n>0 then (match !camlp4_state with | [] -> anomaly "Pcoq.remove_grammars: too many rules to remove" - | ByGrammar(g,_,rls)::t -> - grammar_delete g rls; + | ByGrammar(g,pos,rls,reinit)::t -> + grammar_delete g pos reinit rls; camlp4_state := t; remove_grammars (n-1) | ByGEXTEND (undo,redo)::t -> @@ -388,6 +407,8 @@ module Prim = let name = Gram.Entry.create "Prim.name" let identref = Gram.Entry.create "Prim.identref" + let pattern_ident = Gram.Entry.create "pattern_ident" + let pattern_identref = Gram.Entry.create "pattern_identref" (* A synonym of ident - maybe ident will be located one day *) let base_ident = Gram.Entry.create "Prim.base_ident" @@ -421,6 +442,10 @@ module Constr = let lconstr_pattern = gec_constr "lconstr_pattern" let binder = Gram.Entry.create "constr:binder" let binder_let = Gram.Entry.create "constr:binder_let" + let binders_let = Gram.Entry.create "constr:binders_let" + let binders_let_fixannot = Gram.Entry.create "constr:binders_let_fixannot" + let typeclass_constraint = Gram.Entry.create "constr:typeclass_constraint" + let appl_arg = Gram.Entry.create "constr:appl_arg" end module Module = @@ -501,27 +526,32 @@ END left border and into "constr LEVEL n" elsewhere), to the level below (to be translated into "NEXT") or to an below wrt associativity (to be translated in camlp4 into "constr" without level) or to another level - (to be translated into "constr LEVEL n") *) + (to be translated into "constr LEVEL n") + + The boolean is true if the entry was existing _and_ empty; this to + circumvent a weakness of camlp4/camlp5 whose undo mechanism is not the + converse of the extension mechanism *) let constr_level = string_of_int let default_levels = - [200,Gramext.RightA; - 100,Gramext.RightA; - 99,Gramext.RightA; - 90,Gramext.RightA; - 10,Gramext.RightA; - 9,Gramext.RightA; - 1,Gramext.LeftA; - 0,Gramext.RightA] + [200,Gramext.RightA,false; + 100,Gramext.RightA,false; + 99,Gramext.RightA,true; + 90,Gramext.RightA,false; + 10,Gramext.RightA,false; + 9,Gramext.RightA,false; + 8,Gramext.RightA,true; + 1,Gramext.LeftA,false; + 0,Gramext.RightA,false] let default_pattern_levels = - [200,Gramext.RightA; - 100,Gramext.RightA; - 99,Gramext.RightA; - 10,Gramext.LeftA; - 1,Gramext.LeftA; - 0,Gramext.RightA] + [200,Gramext.RightA,true; + 100,Gramext.RightA,false; + 99,Gramext.RightA,true; + 10,Gramext.LeftA,false; + 1,Gramext.LeftA,false; + 0,Gramext.RightA,false] let level_stack = ref [(default_levels, default_pattern_levels)] @@ -550,40 +580,69 @@ let error_level_assoc p current expected = pr_assoc current ++ str " associative while it is now expected to be " ++ pr_assoc expected ++ str " associative") -let find_position forpat other assoc lev = - let ccurrent,pcurrent as current = List.hd !level_stack in +let find_position_gen forpat ensure assoc lev = + let ccurrent,pcurrent as current = List.hd !level_stack in match lev with | None -> level_stack := current :: !level_stack; - None, (if other then assoc else None), None + None, None, None, None | Some n -> let after = ref None in + let init = ref None in let rec add_level q = function - | (p,_ as pa)::l when p > n -> pa :: add_level (Some p) l - | (p,a)::l when p = n -> - if admissible_assoc (a,assoc) then raise Exit; - error_level_assoc p a (out_some assoc) - | l -> after := q; (n,create_assoc assoc)::l + | (p,_,_ as pa)::l when p > n -> pa :: add_level (Some p) l + | (p,a,reinit)::l when p = n -> + if reinit then + let a' = create_assoc assoc in (init := Some a'; (p,a',false)::l) + else if admissible_assoc (a,assoc) then + raise Exit + else + error_level_assoc p a (Option.get assoc) + | l -> after := q; (n,create_assoc assoc,ensure)::l in try - (* Create the entry *) let updated = if forpat then (ccurrent, add_level None pcurrent) else (add_level None ccurrent, pcurrent) in level_stack := updated:: !level_stack; let assoc = create_assoc assoc in - (if !after = None then Some Gramext.First - else Some (Gramext.After (constr_level (out_some !after)))), - Some assoc, Some (constr_level n) + if !init = None then + (* Create the entry *) + (if !after = None then Some Gramext.First + else Some (Gramext.After (constr_level (Option.get !after)))), + Some assoc, Some (constr_level n), None + else + (* The reinit flag has been updated *) + Some (Gramext.Level (constr_level n)), None, None, !init with + (* Nothing has changed *) Exit -> level_stack := current :: !level_stack; (* Just inherit the existing associativity and name (None) *) - Some (Gramext.Level (constr_level n)), None, None + Some (Gramext.Level (constr_level n)), None, None, None let remove_levels n = level_stack := list_skipn n !level_stack +let rec list_mem_assoc_triple x = function + | [] -> false + | (a,b,c) :: l -> a = x or list_mem_assoc_triple x l + +let register_empty_levels forpat symbs = + map_succeed (function + | Gramext.Snterml (_,n) when + let levels = (if forpat then snd else fst) (List.hd !level_stack) in + not (list_mem_assoc_triple (int_of_string n) levels) -> + find_position_gen forpat true None (Some (int_of_string n)) + | _ -> failwith "") symbs + +let find_position forpat assoc level = + find_position_gen forpat false assoc level + +(* Synchronise the stack of level updates *) +let synchronize_level_positions () = + let _ = find_position true None None in () + (* Camlp4 levels do not treat NonA: use RightA with a NEXT on the left *) let camlp4_assoc = function | Some Gramext.NonA | Some Gramext.RightA -> Gramext.RightA @@ -647,9 +706,10 @@ let compute_entry allow_create adjust forpat = function (* This computes the name of the level where to add a new rule *) let get_constr_entry forpat = function | ETConstr(200,()) when not forpat -> - weaken_entry Constr.binder_constr, None, false + weaken_entry Constr.binder_constr, None | e -> - compute_entry true (fun (n,()) -> Some n) forpat e + let (e,level,_) = compute_entry true (fun (n,()) -> Some n) forpat e in + (e, level) (* This computes the name to give to a production knowing the name and associativity of the level where it must be added *) diff --git a/parsing/pcoq.mli b/parsing/pcoq.mli index 681a6b2c..44a3686e 100644 --- a/parsing/pcoq.mli +++ b/parsing/pcoq.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: pcoq.mli 10185 2007-10-06 18:05:13Z herbelin $ i*) +(*i $Id: pcoq.mli 10987 2008-05-26 12:28:36Z herbelin $ i*) open Util open Names @@ -37,10 +37,11 @@ val object_of_typed_entry : typed_entry -> grammar_object Gram.Entry.e val weaken_entry : 'a Gram.Entry.e -> grammar_object Gram.Entry.e val get_constr_entry : - bool -> constr_entry -> grammar_object Gram.Entry.e * int option * bool + bool -> constr_entry -> grammar_object Gram.Entry.e * int option val grammar_extend : - grammar_object Gram.Entry.e -> Gramext.position option -> + grammar_object Gram.Entry.e -> Gramext.position option -> + (* for reinitialization if ever: *) Gramext.g_assoc option -> (string option * Gramext.g_assoc option * (Compat.token Gramext.g_symbol list * Gramext.g_action) list) list -> unit @@ -77,7 +78,7 @@ val force_entry_type : val create_constr_entry : string * gram_universe -> string -> constr_expr Gram.Entry.e -val create_generic_entry : string -> ('a, rlevel,raw_tactic_expr) abstract_argument_type -> 'a Gram.Entry.e +val create_generic_entry : string -> ('a, rlevel) abstract_argument_type -> 'a Gram.Entry.e val get_generic_entry : string -> grammar_object Gram.Entry.e val get_generic_entry_type : string * gram_universe -> string -> Genarg.argument_type @@ -85,33 +86,33 @@ val get_generic_entry_type : string * gram_universe -> string -> Genarg.argument val tactic_main_level : int -val rawwit_tactic : int -> (raw_tactic_expr,rlevel,raw_tactic_expr) abstract_argument_type -val globwit_tactic : int -> (glob_tactic_expr,glevel,glob_tactic_expr) abstract_argument_type -val wit_tactic : int -> (glob_tactic_expr,tlevel,glob_tactic_expr) abstract_argument_type +val rawwit_tactic : int -> (raw_tactic_expr,rlevel) abstract_argument_type +val globwit_tactic : int -> (glob_tactic_expr,glevel) abstract_argument_type +val wit_tactic : int -> (glob_tactic_expr,tlevel) abstract_argument_type -val rawwit_tactic0 : (raw_tactic_expr,rlevel,raw_tactic_expr) abstract_argument_type -val globwit_tactic0 : (glob_tactic_expr,glevel,glob_tactic_expr) abstract_argument_type -val wit_tactic0 : (glob_tactic_expr,tlevel,glob_tactic_expr) abstract_argument_type +val rawwit_tactic0 : (raw_tactic_expr,rlevel) abstract_argument_type +val globwit_tactic0 : (glob_tactic_expr,glevel) abstract_argument_type +val wit_tactic0 : (glob_tactic_expr,tlevel) abstract_argument_type -val rawwit_tactic1 : (raw_tactic_expr,rlevel,raw_tactic_expr) abstract_argument_type -val globwit_tactic1 : (glob_tactic_expr,glevel,glob_tactic_expr) abstract_argument_type -val wit_tactic1 : (glob_tactic_expr,tlevel,glob_tactic_expr) abstract_argument_type +val rawwit_tactic1 : (raw_tactic_expr,rlevel) abstract_argument_type +val globwit_tactic1 : (glob_tactic_expr,glevel) abstract_argument_type +val wit_tactic1 : (glob_tactic_expr,tlevel) abstract_argument_type -val rawwit_tactic2 : (raw_tactic_expr,rlevel,raw_tactic_expr) abstract_argument_type -val globwit_tactic2 : (glob_tactic_expr,glevel,glob_tactic_expr) abstract_argument_type -val wit_tactic2 : (glob_tactic_expr,tlevel,glob_tactic_expr) abstract_argument_type +val rawwit_tactic2 : (raw_tactic_expr,rlevel) abstract_argument_type +val globwit_tactic2 : (glob_tactic_expr,glevel) abstract_argument_type +val wit_tactic2 : (glob_tactic_expr,tlevel) abstract_argument_type -val rawwit_tactic3 : (raw_tactic_expr,rlevel,raw_tactic_expr) abstract_argument_type -val globwit_tactic3 : (glob_tactic_expr,glevel,glob_tactic_expr) abstract_argument_type -val wit_tactic3 : (glob_tactic_expr,tlevel,glob_tactic_expr) abstract_argument_type +val rawwit_tactic3 : (raw_tactic_expr,rlevel) abstract_argument_type +val globwit_tactic3 : (glob_tactic_expr,glevel) abstract_argument_type +val wit_tactic3 : (glob_tactic_expr,tlevel) abstract_argument_type -val rawwit_tactic4 : (raw_tactic_expr,rlevel,raw_tactic_expr) abstract_argument_type -val globwit_tactic4 : (glob_tactic_expr,glevel,glob_tactic_expr) abstract_argument_type -val wit_tactic4 : (glob_tactic_expr,tlevel,glob_tactic_expr) abstract_argument_type +val rawwit_tactic4 : (raw_tactic_expr,rlevel) abstract_argument_type +val globwit_tactic4 : (glob_tactic_expr,glevel) abstract_argument_type +val wit_tactic4 : (glob_tactic_expr,tlevel) abstract_argument_type -val rawwit_tactic5 : (raw_tactic_expr,rlevel,raw_tactic_expr) abstract_argument_type -val globwit_tactic5 : (glob_tactic_expr,glevel,glob_tactic_expr) abstract_argument_type -val wit_tactic5 : (glob_tactic_expr,tlevel,glob_tactic_expr) abstract_argument_type +val rawwit_tactic5 : (raw_tactic_expr,rlevel) abstract_argument_type +val globwit_tactic5 : (glob_tactic_expr,glevel) abstract_argument_type +val wit_tactic5 : (glob_tactic_expr,tlevel) abstract_argument_type val is_tactic_genarg : argument_type -> bool @@ -132,6 +133,8 @@ module Prim : val ident : identifier Gram.Entry.e val name : name located Gram.Entry.e val identref : identifier located Gram.Entry.e + val pattern_ident : identifier Gram.Entry.e + val pattern_identref : identifier located Gram.Entry.e val base_ident : identifier Gram.Entry.e val natural : int Gram.Entry.e val bigint : Bigint.bigint Gram.Entry.e @@ -159,8 +162,12 @@ module Constr : val annot : constr_expr Gram.Entry.e val constr_pattern : constr_expr Gram.Entry.e val lconstr_pattern : constr_expr Gram.Entry.e - val binder : (name located list * constr_expr) Gram.Entry.e - val binder_let : local_binder Gram.Entry.e + val binder : (name located list * binder_kind * constr_expr) Gram.Entry.e + val binder_let : local_binder list Gram.Entry.e + val binders_let : local_binder list Gram.Entry.e + val binders_let_fixannot : (local_binder list * (identifier located option * recursion_order_expr)) Gram.Entry.e + val typeclass_constraint : (name located * binding_kind * constr_expr) Gram.Entry.e + val appl_arg : (constr_expr * explicitation located option) Gram.Entry.e end module Module : @@ -176,7 +183,7 @@ module Tactic : val casted_open_constr : open_constr_expr Gram.Entry.e val constr_with_bindings : constr_expr with_bindings Gram.Entry.e val bindings : constr_expr bindings Gram.Entry.e - val constr_may_eval : (constr_expr,reference) may_eval Gram.Entry.e + val constr_may_eval : (constr_expr,reference or_by_notation) may_eval Gram.Entry.e val quantified_hypothesis : quantified_hypothesis Gram.Entry.e val int_or_var : int or_var Gram.Entry.e val red_expr : raw_red_expr Gram.Entry.e @@ -215,8 +222,16 @@ val symbol_of_production : Gramext.g_assoc option -> constr_entry -> (* Registering/resetting the level of an entry *) val find_position : - bool -> bool -> Gramext.g_assoc option -> int option -> - Gramext.position option * Gramext.g_assoc option * string option + bool (* true if for creation in pattern entry; false if in constr entry *) -> + Gramext.g_assoc option -> int option -> + Gramext.position option * Gramext.g_assoc option * string option * + (* for reinitialization: *) Gramext.g_assoc option + +val synchronize_level_positions : unit -> unit + +val register_empty_levels : bool -> Compat.token Gramext.g_symbol list -> + (Gramext.position option * Gramext.g_assoc option * + string option * Gramext.g_assoc option) list val remove_levels : int -> unit diff --git a/parsing/ppconstr.ml b/parsing/ppconstr.ml index 92c6715e..985396f5 100644 --- a/parsing/ppconstr.ml +++ b/parsing/ppconstr.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: ppconstr.ml 10087 2007-08-24 10:39:30Z herbelin $ *) +(* $Id: ppconstr.ml 11094 2008-06-10 19:35:23Z herbelin $ *) (*i*) open Util @@ -36,6 +36,7 @@ let lprod = 200 let llambda = 200 let lif = 200 let lletin = 200 +let lletpattern = 200 let lfix = 200 let larrow = 90 let lcast = 100 @@ -96,13 +97,13 @@ let pr_delimiters key strm = strm ++ str ("%"^key) let pr_located pr (loc,x) = - if Options.do_translate() && loc<>dummy_loc then + if Flags.do_translate() && loc<>dummy_loc then let (b,e) = unloc loc in comment b ++ pr x ++ comment e else pr x let pr_com_at n = - if Options.do_translate() && n <> 0 then comment n + if Flags.do_translate() && n <> 0 then comment n else mt() let pr_with_comments loc pp = pr_located (fun x -> x) (loc,pp) @@ -129,7 +130,7 @@ let pr_qualid = pr_qualid let pr_expl_args pr (a,expl) = match expl with | None -> pr (lapp,L) a - | Some (_,ExplByPos n) -> + | Some (_,ExplByPos (n,_id)) -> anomaly("Explicitation by position not implemented") | Some (_,ExplByName id) -> str "(" ++ pr_id id ++ str ":=" ++ pr ltop a ++ str ")" @@ -160,6 +161,16 @@ let pr_prim_token = function | Numeral n -> Bigint.pr_bigint n | String s -> qs s +let pr_evar pr n l = + hov 0 (str (Evd.string_of_existential n) ++ + (match l with + | Some l -> + spc () ++ pr_in_comment + (fun l -> + str"[" ++ hov 0 (prlist_with_sep pr_coma (pr ltop) l) ++ str"]") + (List.rev l) + | None -> mt())) + let las = lapp let lpator = 100 @@ -187,6 +198,7 @@ let rec pr_patt sep inh p = let pr_patt = pr_patt mt let pr_eqn pr (loc,pl,rhs) = + let pl = List.map snd pl in spc() ++ hov 4 (pr_with_comments loc (str "| " ++ @@ -196,30 +208,41 @@ let pr_eqn pr (loc,pl,rhs) = let begin_of_binder = function LocalRawDef((loc,_),_) -> fst (unloc loc) - | LocalRawAssum((loc,_)::_,_) -> fst (unloc loc) + | LocalRawAssum((loc,_)::_,_,_) -> fst (unloc loc) | _ -> assert false let begin_of_binders = function | b::_ -> begin_of_binder b | _ -> 0 -let pr_binder many pr (nal,t) = +let surround_binder k p = + match k with + Default Explicit -> hov 1 (str"(" ++ p ++ str")") + | Default Implicit -> hov 1 (str"{" ++ p ++ str"}") + | TypeClass b -> hov 1 (str"[" ++ p ++ str"]") + +let surround_implicit k p = + match k with + Default Explicit -> p + | Default Implicit -> (str"{" ++ p ++ str"}") + | TypeClass b -> (str"[" ++ p ++ str"]") + +let pr_binder many pr (nal,k,t) = match t with | CHole _ -> prlist_with_sep spc pr_lname nal | _ -> let s = prlist_with_sep spc pr_lname nal ++ str" : " ++ pr t in - hov 1 (if many then surround s else s) + hov 1 (if many then surround_binder k s else surround_implicit k s) let pr_binder_among_many pr_c = function - | LocalRawAssum (nal,t) -> - pr_binder true pr_c (nal,t) + | LocalRawAssum (nal,k,t) -> + pr_binder true pr_c (nal,k,t) | LocalRawDef (na,c) -> let c,topt = match c with | CCast(_,c, CastConv (_,t)) -> c, t - | _ -> c, CHole dummy_loc in - hov 1 (surround - (pr_lname na ++ pr_opt_type pr_c topt ++ - str":=" ++ cut() ++ pr_c c)) + | _ -> c, CHole (dummy_loc, None) in + hov 1 (pr_lname na ++ pr_opt_type pr_c topt ++ + str":=" ++ cut() ++ pr_c c) let pr_undelimited_binders pr_c = prlist_with_sep spc (pr_binder_among_many pr_c) @@ -227,25 +250,21 @@ let pr_undelimited_binders pr_c = let pr_delimited_binders kw pr_c bl = let n = begin_of_binders bl in match bl with - | [LocalRawAssum (nal,t)] -> - pr_com_at n ++ kw() ++ pr_binder false pr_c (nal,t) + | [LocalRawAssum (nal,k,t)] -> + pr_com_at n ++ kw() ++ pr_binder false pr_c (nal,k,t) | LocalRawAssum _ :: _ as bdl -> pr_com_at n ++ kw() ++ pr_undelimited_binders pr_c bdl | _ -> assert false -let pr_let_binder pr x a = - hov 0 (hov 0 (pr_name x ++ brk(0,1) ++ str ":=") ++ - pr_sep_com (fun () -> brk(0,1)) (pr ltop) a) - let rec extract_prod_binders = function (* | CLetIn (loc,na,b,c) as x -> let bl,c = extract_prod_binders c in if bl = [] then [], x else LocalRawDef (na,b) :: bl, c*) | CProdN (loc,[],c) -> extract_prod_binders c - | CProdN (loc,(nal,t)::bl,c) -> + | CProdN (loc,(nal,bk,t)::bl,c) -> let bl,c = extract_prod_binders (CProdN(loc,bl,c)) in - LocalRawAssum (nal,t) :: bl, c + LocalRawAssum (nal,bk,t) :: bl, c | c -> [], c let rec extract_lam_binders = function @@ -254,15 +273,15 @@ let rec extract_lam_binders = function if bl = [] then [], x else LocalRawDef (na,b) :: bl, c*) | CLambdaN (loc,[],c) -> extract_lam_binders c - | CLambdaN (loc,(nal,t)::bl,c) -> + | CLambdaN (loc,(nal,bk,t)::bl,c) -> let bl,c = extract_lam_binders (CLambdaN(loc,bl,c)) in - LocalRawAssum (nal,t) :: bl, c + LocalRawAssum (nal,bk,t) :: bl, c | c -> [], c let split_lambda = function - | CLambdaN (loc,[[na],t],c) -> (na,t,c) - | CLambdaN (loc,([na],t)::bl,c) -> (na,t,CLambdaN(loc,bl,c)) - | CLambdaN (loc,(na::nal,t)::bl,c) -> (na,t,CLambdaN(loc,(nal,t)::bl,c)) + | CLambdaN (loc,[[na],bk,t],c) -> (na,t,c) + | CLambdaN (loc,([na],bk,t)::bl,c) -> (na,t,CLambdaN(loc,bl,c)) + | CLambdaN (loc,(na::nal,bk,t)::bl,c) -> (na,t,CLambdaN(loc,(nal,bk,t)::bl,c)) | _ -> anomaly "ill-formed fixpoint body" let rename na na' t c = @@ -273,13 +292,13 @@ let rename na na' t c = let split_product na' = function | CArrow (loc,t,c) -> (na',t,c) - | CProdN (loc,[[na],t],c) -> rename na na' t c - | CProdN (loc,([na],t)::bl,c) -> rename na na' t (CProdN(loc,bl,c)) - | CProdN (loc,(na::nal,t)::bl,c) -> - rename na na' t (CProdN(loc,(nal,t)::bl,c)) + | CProdN (loc,[[na],bk,t],c) -> rename na na' t c + | CProdN (loc,([na],bk,t)::bl,c) -> rename na na' t (CProdN(loc,bl,c)) + | CProdN (loc,(na::nal,bk,t)::bl,c) -> + rename na na' t (CProdN(loc,(nal,bk,t)::bl,c)) | _ -> anomaly "ill-formed fixpoint body" -let merge_binders (na1,ty1) cofun (na2,ty2) codom = +let merge_binders (na1,bk1,ty1) cofun (na2,bk2,ty2) codom = let na = match snd na1, snd na2 with Anonymous, Name id -> @@ -300,42 +319,42 @@ let merge_binders (na1,ty1) cofun (na2,ty2) codom = | _ -> Constrextern.check_same_type ty1 ty2; ty2 in - (LocalRawAssum ([na],ty), codom) + (LocalRawAssum ([na],bk1,ty), codom) let rec strip_domain bvar cofun c = match c with | CArrow(loc,a,b) -> - merge_binders bvar cofun ((dummy_loc,Anonymous),a) b - | CProdN(loc,[([na],ty)],c') -> - merge_binders bvar cofun (na,ty) c' - | CProdN(loc,([na],ty)::bl,c') -> - merge_binders bvar cofun (na,ty) (CProdN(loc,bl,c')) - | CProdN(loc,(na::nal,ty)::bl,c') -> - merge_binders bvar cofun (na,ty) (CProdN(loc,(nal,ty)::bl,c')) + merge_binders bvar cofun ((dummy_loc,Anonymous),default_binder_kind,a) b + | CProdN(loc,[([na],bk,ty)],c') -> + merge_binders bvar cofun (na,bk,ty) c' + | CProdN(loc,([na],bk,ty)::bl,c') -> + merge_binders bvar cofun (na,bk,ty) (CProdN(loc,bl,c')) + | CProdN(loc,(na::nal,bk,ty)::bl,c') -> + merge_binders bvar cofun (na,bk,ty) (CProdN(loc,(nal,bk,ty)::bl,c')) | _ -> failwith "not a product" (* Note: binder sharing is lost *) -let rec strip_domains (nal,ty) cofun c = +let rec strip_domains (nal,bk,ty) cofun c = match nal with [] -> assert false | [na] -> - let bnd, c' = strip_domain (na,ty) cofun c in + let bnd, c' = strip_domain (na,bk,ty) cofun c in ([bnd],None,c') | na::nal -> - let f = CLambdaN(dummy_loc,[(nal,ty)],cofun) in - let bnd, c1 = strip_domain (na,ty) f c in + let f = CLambdaN(dummy_loc,[(nal,bk,ty)],cofun) in + let bnd, c1 = strip_domain (na,bk,ty) f c in (try - let bl, rest, c2 = strip_domains (nal,ty) cofun c1 in + let bl, rest, c2 = strip_domains (nal,bk,ty) cofun c1 in (bnd::bl, rest, c2) - with Failure _ -> ([bnd],Some (nal,ty), c1)) + with Failure _ -> ([bnd],Some (nal,bk,ty), c1)) (* Re-share binders *) let rec factorize_binders = function | ([] | [_] as l) -> l - | LocalRawAssum (nal,ty) as d :: (LocalRawAssum (nal',ty')::l as l') -> + | LocalRawAssum (nal,k,ty) as d :: (LocalRawAssum (nal',k',ty')::l as l') -> (try let _ = Constrextern.check_same_type ty ty' in - factorize_binders (LocalRawAssum (nal@nal',ty)::l) + factorize_binders (LocalRawAssum (nal@nal',k,ty)::l) with _ -> d :: factorize_binders l') | d :: l -> d :: factorize_binders l @@ -364,7 +383,7 @@ let rec split_fix n typ def = let (na,_,def) = split_lambda def in let (na,t,typ) = split_product na typ in let (bl,typ,def) = split_fix (n-1) typ def in - (LocalRawAssum ([na],t)::bl,typ,def) + (LocalRawAssum ([na],default_binder_kind,t)::bl,typ,def) let pr_recursive_decl pr pr_dangling dangling_with_for id bl annot t c = let pr_body = @@ -374,22 +393,21 @@ let pr_recursive_decl pr pr_dangling dangling_with_for id bl annot t c = pr_opt_type_spc pr t ++ str " :=" ++ pr_sep_com (fun () -> brk(1,2)) (pr_body ltop) c -let pr_fixdecl pr prd dangling_with_for (id,(n,ro),bl,t,c) = +let pr_fixdecl pr prd dangling_with_for ((_,id),(n,ro),bl,t,c) = let annot = - let ids = names_of_local_assums bl in - match ro with - CStructRec -> - if List.length ids > 1 && n <> None then - spc() ++ str "{struct " ++ pr_name (snd (List.nth ids (out_some n))) ++ str"}" - else mt() - | CWfRec c -> - spc () ++ str "{wf " ++ pr lsimple c ++ pr_name (snd (List.nth ids (out_some n))) ++ str"}" - | CMeasureRec c -> - spc () ++ str "{measure " ++ pr lsimple c ++ pr_name (snd (List.nth ids (out_some n))) ++ str"}" + match ro with + CStructRec -> + if List.length bl > 1 && n <> None then + spc() ++ str "{struct " ++ pr_id (snd (Option.get n)) ++ str"}" + else mt() + | CWfRec c -> + spc () ++ str "{wf " ++ pr lsimple c ++ pr_id (snd (Option.get n)) ++ str"}" + | CMeasureRec c -> + spc () ++ str "{measure " ++ pr lsimple c ++ pr_id (snd (Option.get n)) ++ str"}" in pr_recursive_decl pr prd dangling_with_for id bl annot t c -let pr_cofixdecl pr prd dangling_with_for (id,bl,t,c) = +let pr_cofixdecl pr prd dangling_with_for ((_,id),bl,t,c) = pr_recursive_decl pr prd dangling_with_for id bl (mt()) t c let pr_recursive pr_decl id = function @@ -415,27 +433,16 @@ let tm_clash = function -> Some id | _ -> None -let pr_case_item pr (tm,(na,indnalopt)) = - hov 0 (pr (lcast,E) tm ++ -(* - (match na with - | Name id when not (is_var id tm) -> spc () ++ str "as " ++ pr_id id - | Anonymous when tm_clash (tm,indnalopt) <> None -> - (* hide [tm] name to avoid conflicts *) - spc () ++ str "as _" (* ++ pr_id (out_some (tm_clash (tm,indnalopt)))*) - | _ -> mt ()) ++ -*) +let pr_asin pr (na,indnalopt) = (match na with (* Decision of printing "_" or not moved to constrextern.ml *) | Some na -> spc () ++ str "as " ++ pr_name na | None -> mt ()) ++ (match indnalopt with | None -> mt () -(* - | Some (_,ind,nal) -> - spc () ++ str "in " ++ - hov 0 (pr_reference ind ++ prlist (pr_arg pr_name) nal)) -*) - | Some t -> spc () ++ str "in " ++ pr lsimple t)) + | Some t -> spc () ++ str "in " ++ pr lsimple t) + +let pr_case_item pr (tm,asin) = + hov 0 (pr (lcast,E) tm ++ pr_asin pr asin) let pr_case_type pr po = match po with @@ -465,6 +472,16 @@ let pr_app pr a l = pr (lapp,L) a ++ prlist (fun a -> spc () ++ pr_expl_args pr a) l) +let pr_forall () = + if !Flags.unicode_syntax then str"Π" ++ spc () + else str"forall" ++ spc () + +let pr_fun () = + if !Flags.unicode_syntax then str"λ" ++ spc () + else str"fun" ++ spc () + +let pr_fun_sep = lazy (if !Flags.unicode_syntax then str "," else str " =>") + let rec pr sep inherited a = let (strm,prec) = match a with | CRef r -> pr_reference r, latom @@ -485,17 +502,16 @@ let rec pr sep inherited a = | CProdN _ -> let (bl,a) = extract_prod_binders a in hov 0 ( - hov 2 (pr_delimited_binders (fun () -> str"forall" ++ spc()) + hov 2 (pr_delimited_binders pr_forall (pr mt ltop) bl) ++ str "," ++ pr spc ltop a), lprod | CLambdaN _ -> let (bl,a) = extract_lam_binders a in hov 0 ( - hov 2 (pr_delimited_binders (fun () -> str"fun" ++ spc()) - (pr mt ltop) bl) ++ - - str " =>" ++ pr spc ltop a), + hov 2 (pr_delimited_binders pr_fun + (pr mt ltop) bl) ++ + Lazy.force pr_fun_sep ++ pr spc ltop a), llambda | CLetIn (_,(_,Name x),(CFix(_,(_,x'),[_])|CCoFix(_,(_,x'),[_]) as fx), b) when x=x' -> @@ -532,15 +548,24 @@ let rec pr sep inherited a = else p, lproj | CApp (_,(None,a),l) -> pr_app (pr mt) a l, lapp - | CCases (_,rtntypopt,c,eqns) -> + | CCases (_,LetPatternStyle,rtntypopt,[c,asin],[(_,[(loc,[p])],b)]) -> + hv 0 ( + str "let '" ++ + hov 0 (pr_patt ltop p ++ + pr_asin (pr_dangling_with_for mt) asin ++ + str " :=" ++ pr spc ltop c ++ + pr_case_type (pr_dangling_with_for mt) rtntypopt ++ + str " in" ++ pr spc ltop b)), + lletpattern + | CCases(_,_,rtntypopt,c,eqns) -> v 0 (hv 0 (str "match" ++ brk (1,2) ++ - hov 0 ( - prlist_with_sep sep_v - (pr_case_item (pr_dangling_with_for mt)) c - ++ pr_case_type (pr_dangling_with_for mt) rtntypopt) ++ - spc () ++ str "with") ++ - prlist (pr_eqn (pr mt)) eqns ++ spc() ++ str "end"), + hov 0 ( + prlist_with_sep sep_v + (pr_case_item (pr_dangling_with_for mt)) c + ++ pr_case_type (pr_dangling_with_for mt) rtntypopt) ++ + spc () ++ str "with") ++ + prlist (pr_eqn (pr mt)) eqns ++ spc() ++ str "end"), latom | CLetTuple (_,nal,(na,po),c,b) -> hv 0 ( @@ -553,8 +578,8 @@ let rec pr sep inherited a = pr spc ltop b), lletin | CIf (_,c,(na,po),b1,b2) -> - (* On force les parenthèses autour d'un "if" sous-terme (même si le - parsing est lui plus tolérant) *) + (* On force les parenthèses autour d'un "if" sous-terme (même si le + parsing est lui plus tolérant) *) hv 0 ( hov 1 (str "if " ++ pr mt ltop c ++ pr_simple_return_type (pr mt) na po) ++ spc () ++ @@ -563,7 +588,7 @@ let rec pr sep inherited a = lif | CHole _ -> str "_", latom - | CEvar (_,n) -> str (Evd.string_of_existential n), latom + | CEvar (_,n,l) -> pr_evar (pr mt) n l, latom | CPatVar (_,(_,p)) -> str "?" ++ pr_patvar p, latom | CSort (_,s) -> pr_rawsort s, latom | CCast (_,a,CastConv (k,b)) -> @@ -595,46 +620,70 @@ let rec strip_context n iscast t = if n = 0 then [], if iscast then match t with CCast (_,c,_) -> c | _ -> t else t else match t with - | CLambdaN (loc,(nal,t)::bll,c) -> + | CLambdaN (loc,(nal,bk,t)::bll,c) -> let n' = List.length nal in if n' > n then let nal1,nal2 = list_chop n nal in - [LocalRawAssum (nal1,t)], CLambdaN (loc,(nal2,t)::bll,c) + [LocalRawAssum (nal1,bk,t)], CLambdaN (loc,(nal2,bk,t)::bll,c) else let bl', c = strip_context (n-n') iscast (if bll=[] then c else CLambdaN (loc,bll,c)) in - LocalRawAssum (nal,t) :: bl', c - | CProdN (loc,(nal,t)::bll,c) -> + LocalRawAssum (nal,bk,t) :: bl', c + | CProdN (loc,(nal,bk,t)::bll,c) -> let n' = List.length nal in if n' > n then let nal1,nal2 = list_chop n nal in - [LocalRawAssum (nal1,t)], CProdN (loc,(nal2,t)::bll,c) + [LocalRawAssum (nal1,bk,t)], CProdN (loc,(nal2,bk,t)::bll,c) else let bl', c = strip_context (n-n') iscast (if bll=[] then c else CProdN (loc,bll,c)) in - LocalRawAssum (nal,t) :: bl', c + LocalRawAssum (nal,bk,t) :: bl', c | CArrow (loc,t,c) -> let bl', c = strip_context (n-1) iscast c in - LocalRawAssum ([loc,Anonymous],t) :: bl', c + LocalRawAssum ([loc,Anonymous],default_binder_kind,t) :: bl', c | CCast (_,c,_) -> strip_context n false c | CLetIn (_,na,b,c) -> let bl', c = strip_context (n-1) iscast c in LocalRawDef (na,b) :: bl', c | _ -> anomaly "strip_context" -let pr_constr_expr c = pr lsimple c -let pr_lconstr_expr c = pr ltop c -let pr_pattern_expr c = pr lsimple c -let pr_lpattern_expr c = pr ltop c +type term_pr = { + pr_constr_expr : constr_expr -> std_ppcmds; + pr_lconstr_expr : constr_expr -> std_ppcmds; + pr_pattern_expr : Tacexpr.pattern_expr -> std_ppcmds; + pr_lpattern_expr : Tacexpr.pattern_expr -> std_ppcmds +} + +let default_term_pr = { + pr_constr_expr = pr lsimple; + pr_lconstr_expr = pr ltop; + pr_pattern_expr = pr lsimple; + pr_lpattern_expr = pr ltop +} + +let term_pr = ref default_term_pr + +let set_term_pr = (:=) term_pr + +let pr_constr_expr c = !term_pr.pr_constr_expr c +let pr_lconstr_expr c = !term_pr.pr_lconstr_expr c +let pr_pattern_expr c = !term_pr.pr_pattern_expr c +let pr_lpattern_expr c = !term_pr.pr_lpattern_expr c let pr_cases_pattern_expr = pr_patt ltop let pr_binders = pr_undelimited_binders (pr ltop) -let pr_with_occurrences pr = function - ([],c) -> pr c - | (nl,c) -> hov 1 (pr c ++ spc() ++ str"at " ++ - hov 0 (prlist_with_sep spc (pr_or_var int) nl)) +let pr_with_occurrences_with_trailer pr occs trailer = + match occs with + ((false,[]),c) -> pr c ++ trailer + | ((nowhere_except_in,nl),c) -> + hov 1 (pr c ++ spc() ++ str"at " ++ + (if nowhere_except_in then mt() else str "- ") ++ + hov 0 (prlist_with_sep spc (pr_or_var int) nl) ++ trailer) + +let pr_with_occurrences pr occs = + pr_with_occurrences_with_trailer pr occs (mt()) let pr_red_flag pr r = (if r.rBeta then pr_arg str "beta" else mt ()) ++ diff --git a/parsing/ppconstr.mli b/parsing/ppconstr.mli index 8f965d9b..a0eb4ad9 100644 --- a/parsing/ppconstr.mli +++ b/parsing/ppconstr.mli @@ -7,7 +7,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: ppconstr.mli 8878 2006-05-30 16:44:25Z herbelin $ i*) +(*i $Id: ppconstr.mli 11094 2008-06-10 19:35:23Z herbelin $ i*) open Pp open Environ @@ -55,6 +55,8 @@ val pr_qualid : qualid -> std_ppcmds val pr_with_occurrences : ('a -> std_ppcmds) -> 'a with_occurrences -> std_ppcmds +val pr_with_occurrences_with_trailer : + ('a -> std_ppcmds) -> 'a with_occurrences -> std_ppcmds -> std_ppcmds val pr_red_expr : ('a -> std_ppcmds) * ('a -> std_ppcmds) * ('b -> std_ppcmds) -> ('a,'b) red_expr_gen -> std_ppcmds @@ -70,3 +72,13 @@ val pr_lpattern_expr : Tacexpr.pattern_expr -> std_ppcmds val pr_constr_expr : constr_expr -> std_ppcmds val pr_lconstr_expr : constr_expr -> std_ppcmds val pr_cases_pattern_expr : cases_pattern_expr -> std_ppcmds + +type term_pr = { + pr_constr_expr : constr_expr -> std_ppcmds; + pr_lconstr_expr : constr_expr -> std_ppcmds; + pr_pattern_expr : Tacexpr.pattern_expr -> std_ppcmds; + pr_lpattern_expr : Tacexpr.pattern_expr -> std_ppcmds +} + +val set_term_pr : term_pr -> unit +val default_term_pr : term_pr diff --git a/parsing/ppdecl_proof.ml b/parsing/ppdecl_proof.ml index bb0662da..3b9a002f 100644 --- a/parsing/ppdecl_proof.ml +++ b/parsing/ppdecl_proof.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id$ *) +(* $Id: ppdecl_proof.ml 10739 2008-04-01 14:45:20Z herbelin $ *) open Util open Pp @@ -32,7 +32,7 @@ let pr_justification_items env = function let pr_justification_method env = function None -> mt () | Some tac -> - spc () ++ str "using" ++ pr_tac env tac + spc () ++ str "using" ++ spc () ++ pr_tac env tac let pr_statement pr_it env st = pr_label st.st_label ++ pr_it env st.st_it @@ -41,7 +41,6 @@ let pr_or_thesis pr_this env = function Thesis Plain -> str "thesis" | Thesis (For id) -> str "thesis" ++ spc() ++ str "for" ++ spc () ++ pr_id id - | Thesis (Sub n) -> str "thesis[" ++ int n ++ str "]" | This c -> pr_this env c let pr_cut pr_it env c = @@ -156,7 +155,7 @@ let rec pr_bare_proof_instr _then _thus env = function | Pcast (id,typ) -> str "reconsider" ++ spc () ++ pr_or_thesis (fun _ -> pr_id) env id ++ spc () ++ - str "as" ++ (pr_constr env typ) + str "as" ++ spc () ++ (pr_constr env typ) | Psuppose hyps -> str "suppose" ++ print_hyps pr_constr _I env false false "we have" hyps diff --git a/parsing/pptactic.ml b/parsing/pptactic.ml index c68a2d6f..f955d83b 100644 --- a/parsing/pptactic.ml +++ b/parsing/pptactic.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: pptactic.ml 9551 2007-01-29 15:13:35Z bgregoir $ *) +(* $Id: pptactic.ml 11094 2008-06-10 19:35:23Z herbelin $ *) open Pp open Names @@ -77,6 +77,10 @@ let pr_or_metaid pr = function let pr_and_short_name pr (c,_) = pr c +let pr_or_by_notation f = function + | AN v -> f v + | ByNotation (_,s) -> str s + let pr_located pr (loc,x) = pr x let pr_evaluable_reference = function @@ -129,7 +133,14 @@ let rec pr_message_token prid = function let pr_fresh_ids = prlist (fun s -> spc() ++ pr_or_var qs s) -let rec pr_raw_generic prc prlc prtac prref (x:(Genarg.rlevel, Tacexpr.raw_tactic_expr) Genarg.generic_argument) = +let with_evars ev s = if ev then "e" ^ s else s + +let out_bindings = function + | ImplicitBindings l -> ImplicitBindings (List.map snd l) + | ExplicitBindings l -> ExplicitBindings (List.map (fun (loc,id,c) -> (loc,id,snd c)) l) + | NoBindings -> NoBindings + +let rec pr_raw_generic prc prlc prtac prref (x:Genarg.rlevel Genarg.generic_argument) = match Genarg.genarg_tag x with | BoolArgType -> pr_arg str (if out_gen rawwit_bool x then "true" else "false") | IntArgType -> pr_arg int (out_gen rawwit_int x) @@ -144,11 +155,13 @@ let rec pr_raw_generic prc prlc prtac prref (x:(Genarg.rlevel, Tacexpr.raw_tacti | SortArgType -> pr_arg pr_rawsort (out_gen rawwit_sort x) | ConstrArgType -> pr_arg prc (out_gen rawwit_constr x) | ConstrMayEvalArgType -> - pr_arg (pr_may_eval prc prlc prref) (out_gen rawwit_constr_may_eval x) + pr_arg (pr_may_eval prc prlc (pr_or_by_notation prref)) + (out_gen rawwit_constr_may_eval x) | QuantHypArgType -> pr_arg pr_quantified_hypothesis (out_gen rawwit_quant_hyp x) | RedExprArgType -> - pr_arg (pr_red_expr (prc,prlc,prref)) (out_gen rawwit_red_expr x) + pr_arg (pr_red_expr (prc,prlc,pr_or_by_notation prref)) + (out_gen rawwit_red_expr x) | OpenConstrArgType b -> pr_arg prc (snd (out_gen (rawwit_open_constr_gen b) x)) | ConstrWithBindingsArgType -> pr_arg (pr_with_bindings prc prlc) (out_gen rawwit_constr_with_bindings x) @@ -238,10 +251,12 @@ let rec pr_generic prc prlc prtac x = pr_arg (pr_red_expr (prc,prlc,pr_evaluable_reference)) (out_gen wit_red_expr x) | OpenConstrArgType b -> pr_arg prc (snd (out_gen (wit_open_constr_gen b) x)) - | ConstrWithBindingsArgType -> - pr_arg (pr_with_bindings prc prlc) (out_gen wit_constr_with_bindings x) + | ConstrWithBindingsArgType -> + let (c,b) = out_gen wit_constr_with_bindings x in + pr_arg (pr_with_bindings prc prlc) (c,out_bindings b) | BindingsArgType -> - pr_arg (pr_bindings_no_with prc prlc) (out_gen wit_bindings x) + pr_arg (pr_bindings_no_with prc prlc) + (out_bindings (out_gen wit_bindings x)) | List0ArgType _ -> hov 0 (fold_list0 (fun x a -> pr_generic prc prlc prtac x ++ a) x (mt())) | List1ArgType _ -> @@ -277,7 +292,7 @@ let pr_raw_extend prc prlc prtac = let pr_glob_extend prc prlc prtac = pr_extend_gen (pr_glob_generic prc prlc prtac) let pr_extend prc prlc prtac = - pr_extend_gen (pr_generic prc prlc prtac) + pr_extend_gen (pr_generic (fun c -> prc (Evd.empty,c)) (fun c -> prlc (Evd.empty,c)) prtac) (**********************************************************************) (* The tactic printer *) @@ -289,9 +304,10 @@ let strip_prod_binders_expr n ty = match ty with Topconstr.CProdN(_,bll,a) -> let nb = - List.fold_left (fun i (nal,_) -> i + List.length nal) 0 bll in - if nb >= n then (List.rev (bll@acc), a) - else strip_ty (bll@acc) (n-nb) a + List.fold_left (fun i (nal,_,_) -> i + List.length nal) 0 bll in + let bll = List.map (fun (x, _, y) -> x, y) bll in + if nb >= n then (List.rev (bll@acc)), a + else strip_ty (bll@acc) (n-nb) a | Topconstr.CArrow(_,a,b) -> if n=1 then (List.rev (([(dummy_loc,Anonymous)],a)::acc), b) @@ -354,6 +370,13 @@ let pr_with_names = function | IntroAnonymous -> mt () | ipat -> spc () ++ hov 1 (str "as" ++ spc () ++ pr_intro_pattern ipat) +let pr_as_name = function + | Anonymous -> mt () + | Name id -> str "as " ++ pr_lident (dummy_loc,id) + +let pr_pose_as_style prc na c = + spc() ++ prc c ++ pr_as_name na + let pr_pose prlc prc na c = match na with | Anonymous -> spc() ++ prc c | Name id -> spc() ++ surround (pr_id id ++ str " :=" ++ spc() ++ prlc c) @@ -394,14 +417,14 @@ let pr_simple_clause pr_id = function | l -> pr_in (spc () ++ prlist_with_sep spc pr_id l) let pr_clauses pr_id = function - { onhyps=None; onconcl=true; concl_occs=nl } -> - pr_in (pr_with_occurrences (fun () -> str " *") (nl,())) - | { onhyps=None; onconcl=false } -> pr_in (str " * |-") - | { onhyps=Some l; onconcl=true; concl_occs=nl } -> - pr_in (prlist_with_sep (fun () -> str",") (pr_hyp_location pr_id) l - ++ pr_with_occurrences (fun () -> str" |- *") (nl,())) - | { onhyps=Some l; onconcl=false } -> - pr_in (prlist_with_sep (fun()->str",") (pr_hyp_location pr_id) l) + | { onhyps=None; concl_occs=occs } -> + if occs = no_occurrences_expr then pr_in (str " * |-") + else pr_in (pr_with_occurrences (fun () -> str " *") (occs,())) + | { onhyps=Some l; concl_occs=occs } -> + pr_in + (prlist_with_sep (fun () -> str",") (pr_hyp_location pr_id) l ++ + (if occs = no_occurrences_expr then mt () + else pr_with_occurrences (fun () -> str" |- *") (occs,()))) let pr_clause_pattern pr_id = function | (None, []) -> mt () @@ -414,8 +437,15 @@ let pr_clause_pattern pr_id = function let pr_orient b = if b then mt () else str " <-" -let pr_induction_arg prc = function - | ElimOnConstr c -> prc c +let pr_multi = function + | Precisely 1 -> mt () + | Precisely n -> pr_int n ++ str "!" + | UpTo n -> pr_int n ++ str "?" + | RepeatStar -> str "?" + | RepeatPlus -> str "!" + +let pr_induction_arg prlc prc = function + | ElimOnConstr c -> pr_with_bindings prlc prc c | ElimOnIdent (loc,id) -> pr_with_comments loc (pr_id id) | ElimOnAnonHyp n -> int n @@ -459,34 +489,32 @@ let pr_funvar = function | None -> spc () ++ str "_" | Some id -> spc () ++ pr_id id -let pr_let_clause k pr = function - | (id,None,t) -> - hov 0 (str k ++ pr_lident id ++ str " :=" ++ brk (1,1) ++ - pr (TacArg t)) - | (id,Some c,t) -> - hv 0 (str k ++ pr_lident id ++ str" :" ++ brk(1,2) ++ - pr c ++ - str " :=" ++ brk (1,1) ++ pr (TacArg t)) +let pr_let_clause k pr (id,t) = + hov 0 (str k ++ pr_lident id ++ str " :=" ++ brk (1,1) ++ pr (TacArg t)) -let pr_let_clauses pr = function +let pr_let_clauses recflag pr = function | hd::tl -> hv 0 - (pr_let_clause "let " pr hd ++ + (pr_let_clause (if recflag then "let rec " else "let ") pr hd ++ prlist (fun t -> spc () ++ pr_let_clause "with " pr t) tl) | [] -> anomaly "LetIn must declare at least one binding" -let pr_rec_clause pr (id,(l,t)) = - hov 0 - (pr_lident id ++ prlist pr_funvar l ++ str " :=") ++ spc () ++ pr t - -let pr_rec_clauses pr l = - prlist_with_sep (fun () -> fnl () ++ str "with ") (pr_rec_clause pr) l - let pr_seq_body pr tl = hv 0 (str "[ " ++ prlist_with_sep (fun () -> spc () ++ str "| ") pr tl ++ str " ]") +let pr_opt_tactic pr = function + | TacId [] -> mt () + | t -> pr t + +let pr_then_gen pr tf tm tl = + hv 0 (str "[ " ++ + prvect_with_sep mt (fun t -> pr t ++ spc () ++ str "| ") tf ++ + pr_opt_tactic pr tm ++ str ".." ++ + prvect_with_sep mt (fun t -> spc () ++ str "| " ++ pr t) tl ++ + str " ]") + let pr_hintbases = function | None -> spc () ++ str "with *" | Some [] -> mt () @@ -618,7 +646,8 @@ let rec pr_atom0 = function | TacIntroPattern [] -> str "intros" | TacIntroMove (None,None) -> str "intro" | TacAssumption -> str "assumption" - | TacAnyConstructor None -> str "constructor" + | TacAnyConstructor (false,None) -> str "constructor" + | TacAnyConstructor (true,None) -> str "econstructor" | TacTrivial ([],Some []) -> str "trivial" | TacAuto (None,[],Some []) -> str "auto" | TacReflexivity -> str "reflexivity" @@ -653,19 +682,25 @@ and pr_atom1 = function | TacExact c -> hov 1 (str "exact" ++ pr_constrarg c) | TacExactNoCheck c -> hov 1 (str "exact_no_check" ++ pr_constrarg c) | TacVmCastNoCheck c -> hov 1 (str "vm_cast_no_check" ++ pr_constrarg c) - | TacApply cb -> hov 1 (str "apply" ++ spc () ++ pr_with_bindings cb) - | TacElim (cb,cbo) -> - hov 1 (str "elim" ++ pr_arg pr_with_bindings cb ++ + | TacApply (a,ev,cb) -> + hov 1 ((if a then mt() else str "simple ") ++ + str (with_evars ev "apply") ++ spc () ++ + pr_with_bindings cb) + | TacElim (ev,cb,cbo) -> + hov 1 (str (with_evars ev "elim") ++ pr_arg pr_with_bindings cb ++ pr_opt pr_eliminator cbo) | TacElimType c -> hov 1 (str "elimtype" ++ pr_constrarg c) - | TacCase cb -> hov 1 (str "case" ++ spc () ++ pr_with_bindings cb) + | TacCase (ev,cb) -> + hov 1 (str (with_evars ev "case") ++ spc () ++ pr_with_bindings cb) | TacCaseType c -> hov 1 (str "casetype" ++ pr_constrarg c) | TacFix (ido,n) -> hov 1 (str "fix" ++ pr_opt pr_id ido ++ pr_intarg n) - | TacMutualFix (id,n,l) -> + | TacMutualFix (hidden,id,n,l) -> + if hidden then str "idtac" (* should caught before! *) else hov 1 (str "fix" ++ spc () ++ pr_id id ++ pr_intarg n ++ spc() ++ str"with " ++ prlist_with_sep spc pr_fix_tac l) | TacCofix ido -> hov 1 (str "cofix" ++ pr_opt pr_id ido) - | TacMutualCofix (id,l) -> + | TacMutualCofix (hidden,id,l) -> + if hidden then str "idtac" (* should be caught before! *) else hov 1 (str "cofix" ++ spc () ++ pr_id id ++ spc() ++ str"with " ++ prlist_with_sep spc pr_cofix_tac l) | TacCut c -> hov 1 (str "cut" ++ pr_constrarg c) @@ -678,14 +713,18 @@ and pr_atom1 = function pr_assertion pr_lconstr pr_constr ipat c) | TacGeneralize l -> hov 1 (str "generalize" ++ spc () ++ - prlist_with_sep spc pr_constr l) + prlist_with_sep pr_coma (fun (cl,na) -> + pr_with_occurrences pr_constr cl ++ pr_as_name na) + l) | TacGeneralizeDep c -> hov 1 (str "generalize" ++ spc () ++ str "dependent" ++ pr_constrarg c) - | TacLetTac (na,c,cl) when cl = nowhere -> + | TacLetTac (na,c,cl,true) when cl = nowhere -> hov 1 (str "pose" ++ pr_pose pr_lconstr pr_constr na c) - | TacLetTac (na,c,cl) -> - hov 1 (str "set" ++ pr_pose pr_lconstr pr_constr na c ++ + | TacLetTac (na,c,cl,b) -> + hov 1 ((if b then str "set" else str "remember") ++ + (if b then pr_pose pr_lconstr else pr_pose_as_style) + pr_constr na c ++ pr_clauses pr_ident cl) (* | TacInstantiate (n,c,ConclLocation ()) -> hov 1 (str "instantiate" ++ spc() ++ @@ -700,18 +739,20 @@ and pr_atom1 = function (* Derived basic tactics *) | TacSimpleInduction h -> hov 1 (str "simple induction" ++ pr_arg pr_quantified_hypothesis h) - | TacNewInduction (h,e,ids) -> - hov 1 (str "induction" ++ spc () ++ - prlist_with_sep spc (pr_induction_arg pr_constr) h ++ + | TacNewInduction (ev,h,e,ids,cl) -> + hov 1 (str (with_evars ev "induction") ++ spc () ++ + prlist_with_sep spc (pr_induction_arg pr_lconstr pr_constr) h ++ pr_with_names ids ++ - pr_opt pr_eliminator e) + pr_opt pr_eliminator e ++ + pr_opt_no_spc (pr_clauses pr_ident) cl) | TacSimpleDestruct h -> hov 1 (str "simple destruct" ++ pr_arg pr_quantified_hypothesis h) - | TacNewDestruct (h,e,ids) -> - hov 1 (str "destruct" ++ spc () ++ - prlist_with_sep spc (pr_induction_arg pr_constr) h ++ + | TacNewDestruct (ev,h,e,ids,cl) -> + hov 1 (str (with_evars ev "destruct") ++ spc () ++ + prlist_with_sep spc (pr_induction_arg pr_lconstr pr_constr) h ++ pr_with_names ids ++ - pr_opt pr_eliminator e) + pr_opt pr_eliminator e ++ + pr_opt_no_spc (pr_clauses pr_ident) cl) | TacDoubleInduction (h1,h2) -> hov 1 (str "double induction" ++ @@ -740,8 +781,9 @@ and pr_atom1 = function | TacAuto (n,lems,db) -> hov 0 (str "auto" ++ pr_opt (pr_or_var int) n ++ pr_auto_using pr_constr lems ++ pr_hintbases db) - | TacDAuto (n,p) -> - hov 1 (str "auto" ++ pr_opt (pr_or_var int) n ++ str "decomp" ++ pr_opt int p) + | TacDAuto (n,p,lems) -> + hov 1 (str "auto" ++ pr_opt (pr_or_var int) n ++ str "decomp" ++ + pr_opt int p ++ pr_auto_using pr_constr lems) (* Context management *) | TacClear (true,[]) as t -> pr_atom0 t @@ -756,21 +798,28 @@ and pr_atom1 = function hov 1 (str "move" ++ brk (1,1) ++ pr_ident id1 ++ spc () ++ str "after" ++ brk (1,1) ++ pr_ident id2) - | TacRename (id1,id2) -> + | TacRename l -> hov 1 - (str "rename" ++ brk (1,1) ++ pr_ident id1 ++ spc () ++ - str "into" ++ brk (1,1) ++ pr_ident id2) + (str "rename" ++ brk (1,1) ++ + prlist_with_sep + (fun () -> str "," ++ brk (1,1)) + (fun (i1,i2) -> + pr_ident i1 ++ spc () ++ str "into" ++ spc () ++ pr_ident i2) + l) + | TacRevert l -> + hov 1 (str "revert" ++ spc () ++ prlist_with_sep spc pr_ident l) (* Constructors *) - | TacLeft l -> hov 1 (str "left" ++ pr_bindings l) - | TacRight l -> hov 1 (str "right" ++ pr_bindings l) - | TacSplit (false,l) -> hov 1 (str "split" ++ pr_bindings l) - | TacSplit (true,l) -> hov 1 (str "exists" ++ pr_ex_bindings l) - | TacAnyConstructor (Some t) -> - hov 1 (str "constructor" ++ pr_arg (pr_tac_level (latom,E)) t) - | TacAnyConstructor None as t -> pr_atom0 t - | TacConstructor (n,l) -> - hov 1 (str "constructor" ++ pr_or_metaid pr_intarg n ++ pr_bindings l) + | TacLeft (ev,l) -> hov 1 (str (with_evars ev "left") ++ pr_bindings l) + | TacRight (ev,l) -> hov 1 (str (with_evars ev "right") ++ pr_bindings l) + | TacSplit (ev,false,l) -> hov 1 (str (with_evars ev "split") ++ pr_bindings l) + | TacSplit (ev,true,l) -> hov 1 (str (with_evars ev "exists") ++ pr_ex_bindings l) + | TacAnyConstructor (ev,Some t) -> + hov 1 (str (with_evars ev "constructor") ++ pr_arg (pr_tac_level (latom,E)) t) + | TacAnyConstructor (ev,None) as t -> pr_atom0 t + | TacConstructor (ev,n,l) -> + hov 1 (str (with_evars ev "constructor") ++ + pr_or_metaid pr_intarg n ++ pr_bindings l) (* Conversion *) | TacReduce (r,h) -> @@ -780,12 +829,9 @@ and pr_atom1 = function hov 1 (str "change" ++ brk (1,1) ++ (match occ with None -> mt() - | Some([],c1) -> hov 1 (pr_constr c1 ++ spc() ++ str "with ") - | Some(ocl,c1) -> - hov 1 (pr_constr c1 ++ spc() ++ - str "at " ++ prlist_with_sep spc (pr_or_var int) ocl) ++ - spc() ++ - str "with ") ++ + | Some occlc -> + pr_with_occurrences_with_trailer pr_constr occlc + (spc () ++ str "with ")) ++ pr_constr c ++ pr_clauses pr_ident h) (* Equivalence relations *) @@ -794,9 +840,15 @@ and pr_atom1 = function | TacTransitivity c -> str "transitivity" ++ pr_constrarg c (* Equality and inversion *) - | TacRewrite (b,c,cl) -> - hov 1 (str "rewrite" ++ pr_orient b ++ spc() ++ pr_with_bindings c ++ - pr_clauses pr_ident cl) + | TacRewrite (ev,l,cl,by) -> + hov 1 (str (with_evars ev "rewrite") ++ + prlist_with_sep + (fun () -> str ","++spc()) + (fun (b,m,c) -> + pr_orient b ++ spc() ++ pr_multi m ++ pr_with_bindings c) + l + ++ pr_clauses pr_ident cl + ++ (match by with Some by -> pr_by_tactic (pr_tac_level ltop) by | None -> mt())) | TacInversion (DepInversion (k,c,ids),hyp) -> hov 1 (str "dependent " ++ pr_induction_kind k ++ spc () ++ pr_quantified_hypothesis hyp ++ @@ -821,15 +873,9 @@ let rec pr_tac inherited tac = (str "abstract (" ++ pr_tac (labstract,L) t ++ str")" ++ spc () ++ str "using " ++ pr_id s), labstract - | TacLetRecIn (l,t) -> - hv 0 - (str "let rec " ++ pr_rec_clauses (pr_tac ltop) l ++ str " in" ++ - fnl () ++ pr_tac (llet,E) t), - llet - | TacLetIn (llc,u) -> + | TacLetIn (recflag,llc,u) -> v 0 - (hv 0 (pr_let_clauses (pr_tac ltop) llc - ++ str " in") ++ + (hv 0 (pr_let_clauses recflag (pr_tac ltop) llc ++ str " in") ++ fnl () ++ pr_tac (llet,E) u), llet | TacMatch (lz,t,lrul) -> @@ -858,10 +904,14 @@ let rec pr_tac inherited tac = hov 1 (pr_tac (lseq,E) t ++ pr_then () ++ spc () ++ pr_seq_body (pr_tac ltop) tl), lseq - | TacThen (t1,t2) -> + | TacThen (t1,[||],t2,[||]) -> hov 1 (pr_tac (lseq,E) t1 ++ pr_then () ++ spc () ++ pr_tac (lseq,L) t2), lseq + | TacThen (t1,tf,t2,tl) -> + hov 1 (pr_tac (lseq,E) t1 ++ pr_then () ++ spc () ++ + pr_then_gen (pr_tac ltop) tf t2 tl), + lseq | TacTry t -> hov 1 (str "try" ++ spc () ++ pr_tac (ltactical,E) t), ltactical @@ -906,6 +956,7 @@ let rec pr_tac inherited tac = pr_may_eval pr_constr pr_lconstr pr_cst c, leval | TacArg(TacFreshId l) -> str "fresh" ++ pr_fresh_ids l, latom | TacArg(Integer n) -> int n, latom + | TacArg(TacCall(loc,f,[])) -> pr_ref f, latom | TacArg(TacCall(loc,f,l)) -> pr_with_comments loc (hov 1 (pr_ref f ++ spc () ++ @@ -919,7 +970,8 @@ let rec pr_tac inherited tac = and pr_tacarg = function | TacDynamic (loc,t) -> pr_with_comments loc (str ("")) - | MetaIdArg (loc,s) -> pr_with_comments loc (str ("$" ^ s)) + | MetaIdArg (loc,true,s) -> pr_with_comments loc (str ("$" ^ s)) + | MetaIdArg (loc,false,s) -> pr_with_comments loc (str ("constr: $" ^ s)) | IntroPattern ipat -> str "ipattern:" ++ pr_intro_pattern ipat | TacVoid -> str "()" | Reference r -> pr_ref r @@ -938,17 +990,17 @@ let strip_prod_binders_rawterm n (ty,_) = let rec strip_ty acc n ty = if n=0 then (List.rev acc, (ty,None)) else match ty with - Rawterm.RProd(loc,na,a,b) -> + Rawterm.RProd(loc,na,Explicit,a,b) -> strip_ty (([dummy_loc,na],(a,None))::acc) (n-1) b | _ -> error "Cannot translate fix tactic: not enough products" in strip_ty [] n ty -let strip_prod_binders_constr n ty = +let strip_prod_binders_constr n (sigma,ty) = let rec strip_ty acc n ty = - if n=0 then (List.rev acc, ty) else + if n=0 then (List.rev acc, (sigma,ty)) else match Term.kind_of_term ty with Term.Prod(na,a,b) -> - strip_ty (([dummy_loc,na],a)::acc) (n-1) b + strip_ty (([dummy_loc,na],(sigma,a))::acc) (n-1) b | _ -> error "Cannot translate fix tactic: not enough products" in strip_ty [] n ty @@ -959,8 +1011,8 @@ let rec raw_printers = drop_env pr_constr_expr, drop_env pr_lconstr_expr, pr_lpattern_expr, - drop_env pr_reference, - drop_env pr_reference, + drop_env (pr_or_by_notation pr_reference), + drop_env (pr_or_by_notation pr_reference), pr_reference, pr_or_metaid pr_lident, pr_raw_extend, @@ -994,8 +1046,8 @@ and pr_glob_match_rule env t = let typed_printers = (pr_glob_tactic_level, - pr_constr_env, - pr_lconstr_env, + pr_open_constr_env, + pr_open_lconstr_env, pr_lconstr_pattern, pr_evaluable_reference_env, pr_inductive, diff --git a/parsing/pptactic.mli b/parsing/pptactic.mli index ccdf3776..e5162dae 100644 --- a/parsing/pptactic.mli +++ b/parsing/pptactic.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: pptactic.mli 7937 2006-01-28 19:58:11Z herbelin $ i*) +(*i $Id: pptactic.mli 9842 2007-05-20 17:44:23Z herbelin $ i*) open Pp open Genarg @@ -17,10 +17,12 @@ open Topconstr open Rawterm open Ppextend open Environ +open Evd val pr_or_var : ('a -> std_ppcmds) -> 'a or_var -> std_ppcmds val pr_or_metaid : ('a -> std_ppcmds) -> 'a or_metaid -> std_ppcmds val pr_and_short_name : ('a -> std_ppcmds) -> 'a and_short_name -> std_ppcmds +val pr_or_by_notation : ('a -> std_ppcmds) -> 'a or_by_notation -> std_ppcmds type 'a raw_extra_genarg_printer = (constr_expr -> std_ppcmds) -> @@ -44,7 +46,7 @@ type 'a extra_genarg_printer = val declare_extra_genarg_pprule : ('c raw_abstract_argument_type * 'c raw_extra_genarg_printer) -> ('a glob_abstract_argument_type * 'a glob_extra_genarg_printer) -> - ('b closed_abstract_argument_type * 'b extra_genarg_printer) -> unit + ('b typed_abstract_argument_type * 'b extra_genarg_printer) -> unit type grammar_terminals = string option list @@ -58,9 +60,8 @@ val pr_raw_generic : (constr_expr -> std_ppcmds) -> (constr_expr -> std_ppcmds) -> (tolerability -> raw_tactic_expr -> std_ppcmds) -> - (Libnames.reference -> std_ppcmds) -> - (constr_expr, raw_tactic_expr) generic_argument -> - std_ppcmds + (Libnames.reference -> std_ppcmds) -> constr_expr generic_argument -> + std_ppcmds val pr_raw_extend: (constr_expr -> std_ppcmds) -> (constr_expr -> std_ppcmds) -> @@ -73,9 +74,9 @@ val pr_glob_extend: string -> glob_generic_argument list -> std_ppcmds val pr_extend : - (Term.constr -> std_ppcmds) -> (Term.constr -> std_ppcmds) -> + (open_constr -> std_ppcmds) -> (open_constr -> std_ppcmds) -> (tolerability -> glob_tactic_expr -> std_ppcmds) -> int -> - string -> closed_generic_argument list -> std_ppcmds + string -> typed_generic_argument list -> std_ppcmds val pr_raw_tactic : env -> raw_tactic_expr -> std_ppcmds @@ -88,3 +89,7 @@ val pr_tactic : env -> Proof_type.tactic_expr -> std_ppcmds val pr_hintbases : string list option -> std_ppcmds val pr_auto_using : ('constr -> std_ppcmds) -> 'constr list -> std_ppcmds + +val pr_bindings : + ('constr -> std_ppcmds) -> + ('constr -> std_ppcmds) -> 'constr bindings -> std_ppcmds diff --git a/parsing/ppvernac.ml b/parsing/ppvernac.ml index 77f0d5cb..ac2adde2 100644 --- a/parsing/ppvernac.ml +++ b/parsing/ppvernac.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: ppvernac.ml 10087 2007-08-24 10:39:30Z herbelin $ *) +(* $Id: ppvernac.ml 11059 2008-06-06 09:29:20Z herbelin $ *) open Pp open Names @@ -50,7 +50,7 @@ let pr_lname = function (loc,Name id) -> pr_lident (loc,id) | lna -> pr_located pr_name lna -let pr_ltac_id = Nameops.pr_id +let pr_ltac_id = Libnames.pr_reference let pr_module = Libnames.pr_reference @@ -144,10 +144,14 @@ let pr_search a b pr_p = match a with | SearchAbout sl -> str"SearchAbout" ++ spc() ++ str "[" ++ prlist_with_sep spc pr_search_about sl ++ str "]" ++ pr_in_out_modules b let pr_locality local = if local then str "Local " else str "" +let pr_non_globality local = if local then str "" else str "Global " -let pr_explanation imps = function - | ExplByPos n -> pr_id (Impargs.name_of_implicit (List.nth imps (n-1))) - | ExplByName id -> pr_id id +let pr_explanation (e,b,f) = + let a = match e with + | ExplByPos (n,_) -> anomaly "No more supported" + | ExplByName id -> pr_id id in + let a = if f then str"!" ++ a else a in + if b then str "[" ++ a ++ str "]" else a let pr_class_rawexpr = function | FunClass -> str"Funclass" @@ -161,6 +165,9 @@ let pr_option_ref_value = function let pr_printoption a b = match a with | Goptions.PrimaryTable table -> str table ++ pr_opt (prlist_with_sep sep pr_option_ref_value) b | Goptions.SecondaryTable (table,field) -> str table ++ spc() ++ str field ++ pr_opt (prlist_with_sep sep pr_option_ref_value) b + | Goptions.TertiaryTable (table,field1,field2) -> str table ++ spc() ++ + str field1 ++ spc() ++ str field2 ++ + pr_opt (prlist_with_sep sep pr_option_ref_value) b let pr_set_option a b = let pr_opt_value = function @@ -184,7 +191,10 @@ let pr_hints local db h pr_c pr_pat = let pph = match h with | HintsResolve l -> - str "Resolve " ++ prlist_with_sep sep pr_c l + str "Resolve " ++ prlist_with_sep sep + (fun (pri, c) -> pr_c c ++ + match pri with Some x -> spc () ++ str"(" ++ int x ++ str")" | None -> mt ()) + l | HintsImmediate l -> str"Immediate" ++ spc() ++ prlist_with_sep sep pr_c l | HintsUnfold l -> @@ -215,6 +225,18 @@ let rec pr_module_type pr_c = function let m = pr_module_type pr_c mty in let p = pr_with_declaration pr_c decl in m ++ spc() ++ str"with" ++ spc() ++ p + | CMTEapply (fexpr,mexpr)-> + let f = pr_module_type pr_c fexpr in + let m = pr_module_expr mexpr in + f ++ spc () ++ m + +and pr_module_expr = function + | CMEident qid -> pr_located pr_qualid qid + | CMEapply (me1,(CMEident _ as me2)) -> + pr_module_expr me1 ++ spc() ++ pr_module_expr me2 + | CMEapply (me1,me2) -> + pr_module_expr me1 ++ spc() ++ + hov 1 (str"(" ++ pr_module_expr me2 ++ str")") let pr_of_module_type prc (mty,b) = str (if b then ":" else "<:") ++ @@ -247,16 +269,8 @@ let pr_module_binders l pr_c = let pr_module_binders_list l pr_c = pr_module_binders l pr_c -let rec pr_module_expr = function - | CMEident qid -> pr_located pr_qualid qid - | CMEapply (me1,(CMEident _ as me2)) -> - pr_module_expr me1 ++ spc() ++ pr_module_expr me2 - | CMEapply (me1,me2) -> - pr_module_expr me1 ++ spc() ++ - hov 1 (str"(" ++ pr_module_expr me2 ++ str")") - let pr_type_option pr_c = function - | CHole loc -> mt() + | CHole (loc, k) -> mt() | _ as c -> brk(0,2) ++ str":" ++ pr_c c let pr_decl_notation prc = @@ -273,11 +287,23 @@ let pr_binders_arg = let pr_and_type_binders_arg bl = pr_binders_arg bl -let pr_onescheme (id,dep,ind,s) = - hov 0 (pr_lident id ++ str" :=") ++ spc() ++ - hov 0 ((if dep then str"Induction for" else str"Minimality for") - ++ spc() ++ pr_reference ind) ++ spc() ++ - hov 0 (str"Sort" ++ spc() ++ pr_rawsort s) +let pr_onescheme (idop,schem) = + match schem with + | InductionScheme (dep,ind,s) -> + (match idop with + | Some id -> hov 0 (pr_lident id ++ str" :=") ++ spc() + | None -> spc () + ) ++ + hov 0 ((if dep then str"Induction for" else str"Minimality for") + ++ spc() ++ pr_reference ind) ++ spc() ++ + hov 0 (str"Sort" ++ spc() ++ pr_rawsort s) + | EqualityScheme ind -> + (match idop with + | Some id -> hov 0 (pr_lident id ++ str" :=") ++ spc() + | None -> spc() + ) ++ + hov 0 (str"Equality for") + ++ spc() ++ pr_reference ind let begin_of_inductive = function [] -> 0 @@ -376,6 +402,12 @@ let make_pr_vernac pr_constr pr_lconstr = let pr_constrarg c = spc () ++ pr_constr c in let pr_lconstrarg c = spc () ++ pr_lconstr c in let pr_intarg n = spc () ++ int n in +let pr_lident_constr sep (i,c) = pr_lident i ++ sep ++ pr_constrarg c in +let pr_lname_lident_constr (oi,bk,a) = + (match snd oi with Anonymous -> mt () | Name id -> pr_lident (fst oi, id) ++ spc () ++ str":" ++ spc ()) + ++ pr_lconstr a in +let pr_instance_def sep (i,l,c) = pr_lident i ++ prlist_with_sep spc pr_lident l + ++ sep ++ pr_constrarg c in let rec pr_vernac = function @@ -388,6 +420,7 @@ let rec pr_vernac = function | VernacAbort id -> str"Abort" ++ pr_opt pr_lident id | VernacResume id -> str"Resume" ++ pr_opt pr_lident id | VernacUndo i -> if i=1 then str"Undo" else str"Undo" ++ pr_intarg i + | VernacUndoTo i -> str"Undo" ++ spc() ++ str"To" ++ pr_intarg i | VernacBacktrack (i,j,k) -> str "Backtrack" ++ spc() ++ prlist_with_sep sep int [i;j;k] | VernacFocus i -> str"Focus" ++ pr_opt int i @@ -417,6 +450,7 @@ let rec pr_vernac = function | VernacCheckGuard -> str"Guarded" (* Resetting *) + | VernacRemoveName id -> str"Remove" ++ spc() ++ pr_lident id | VernacResetName id -> str"Reset" ++ spc() ++ pr_lident id | VernacResetInitial -> str"Reset Initial" | VernacBack i -> if i=1 then str"Back" else str"Back" ++ pr_intarg i @@ -434,7 +468,6 @@ let rec pr_vernac = function | VernacLoad (f,s) -> str"Load" ++ if f then (spc() ++ str"Verbose" ++ spc()) else spc() ++ qs s | VernacTime v -> str"Time" ++ spc() ++ pr_vernac v - | VernacVar id -> pr_lident id (* Syntax *) | VernacTacticNotation (n,r,e) -> pr_grammar_tactic_rule n ("",r,e) @@ -450,7 +483,8 @@ let rec pr_vernac = function | VernacArgumentsScope (local,q,scl) -> let pr_opt_scope = function | None -> str"_" | Some sc -> str sc in - str"Arguments Scope" ++ spc() ++ pr_reference q ++ spc() ++ str"[" ++ prlist_with_sep sep pr_opt_scope scl ++ str"]" + str"Arguments Scope" ++ spc() ++ pr_non_globality local ++ pr_reference q + ++ spc() ++ str"[" ++ prlist_with_sep sep pr_opt_scope scl ++ str"]" | VernacInfix (local,(s,mv),q,sn) -> (* A Verifier *) hov 0 (hov 0 (str"Infix " ++ pr_locality local ++ qs s ++ str " :=" ++ spc() ++ pr_reference q) ++ @@ -482,7 +516,7 @@ let rec pr_vernac = function | None -> mt() | Some r -> str"Eval" ++ spc() ++ - pr_red_expr (pr_constr, pr_lconstr, pr_reference) r ++ + pr_red_expr (pr_constr, pr_lconstr, pr_or_by_notation pr_reference) r ++ str" in" ++ spc() in let pr_def_body = function | DefineBody (bl,red,body,d) -> @@ -499,12 +533,15 @@ let rec pr_vernac = function | None -> mt() | Some cc -> str" :=" ++ spc() ++ cc)) - | VernacStartTheoremProof (ki,id,(bl,c),b,d) -> - hov 1 (pr_thm_token ki ++ spc() ++ pr_lident id ++ spc() ++ - (match bl with - | [] -> mt() - | _ -> pr_binders bl ++ spc()) - ++ str":" ++ pr_spc_lconstr c) + | VernacStartTheoremProof (ki,l,_,_) -> + let pr_statement head (id,(bl,c)) = + hov 0 + (head ++ spc () ++ pr_opt pr_lident id ++ spc() ++ + (match bl with [] -> mt() | _ -> pr_binders bl ++ spc()) ++ + str":" ++ pr_spc_lconstr c) in + hov 1 (pr_statement (pr_thm_token ki) (List.hd l) ++ + prlist (pr_statement (str "with ")) (List.tl l)) + | VernacEndProof Admitted -> str"Admitted" | VernacEndProof (Proved (opac,o)) -> (match o with | None -> if opac then str"Qed" else str"Defined" @@ -513,7 +550,7 @@ let rec pr_vernac = function | Some tok -> str"Save" ++ spc() ++ pr_thm_token tok ++ spc() ++ pr_lident id)) | VernacExactProof c -> hov 2 (str"Proof" ++ pr_lconstrarg c) - | VernacAssumption (stre,l) -> + | VernacAssumption (stre,_,l) -> let n = List.length (List.flatten (List.map fst (List.map snd l))) in hov 2 (pr_assumption_token (n > 1) stre ++ spc() ++ @@ -546,35 +583,30 @@ let rec pr_vernac = function | VernacFixpoint (recs,b) -> let name_of_binder = function - | LocalRawAssum (nal,_) -> nal + | LocalRawAssum (nal,_,_) -> nal | LocalRawDef (_,_) -> [] in let pr_onerec = function - | (id,(n,ro),bl,type_,def),ntn -> + | ((loc,id),(n,ro),bl,type_,def),ntn -> let (bl',def,type_) = - if Options.do_translate() then extract_def_binders def type_ + if Flags.do_translate() then extract_def_binders def type_ else ([],def,type_) in let bl = bl @ bl' in let ids = List.flatten (List.map name_of_binder bl) in let annot = match n with | None -> mt () - | Some n -> - let name = - try snd (List.nth ids n) - with Failure _ -> - warn (str "non-printable fixpoint \""++pr_id id++str"\""); - Anonymous in + | Some (loc, id) -> match (ro : Topconstr.recursion_order_expr) with CStructRec -> if List.length ids > 1 then - spc() ++ str "{struct " ++ pr_name name ++ str"}" + spc() ++ str "{struct " ++ pr_id id ++ str"}" else mt() | CWfRec c -> spc() ++ str "{wf " ++ pr_lconstr_expr c ++ spc() ++ - pr_name name ++ str"}" + pr_id id ++ str"}" | CMeasureRec c -> spc() ++ str "{measure " ++ pr_lconstr_expr c ++ spc() ++ - pr_name name ++ str"}" + pr_id id ++ str"}" in pr_id id ++ pr_binders_arg bl ++ annot ++ spc() ++ pr_type_option (fun c -> spc() ++ pr_lconstr_expr c) type_ @@ -586,9 +618,9 @@ let rec pr_vernac = function prlist_with_sep (fun _ -> fnl() ++ fnl() ++ str"with ") pr_onerec recs) | VernacCoFixpoint (corecs,b) -> - let pr_onecorec ((id,bl,c,def),ntn) = + let pr_onecorec (((loc,id),bl,c,def),ntn) = let (bl',def,c) = - if Options.do_translate() then extract_def_binders def c + if Flags.do_translate() then extract_def_binders def c else ([],def,c) in let bl = bl @ bl' in pr_id id ++ spc() ++ pr_binders bl ++ spc() ++ str":" ++ @@ -660,23 +692,64 @@ let rec pr_vernac = function spc() ++ str":" ++ spc() ++ pr_class_rawexpr c1 ++ spc() ++ str">->" ++ spc() ++ pr_class_rawexpr c2) + + | VernacClass (id, par, ar, sup, props) -> + hov 1 ( + str"Class" ++ spc () ++ pr_lident id ++ +(* prlist_with_sep (spc) (pr_lident_constr (spc() ++ str ":" ++ spc())) par ++ *) + pr_and_type_binders_arg par ++ + (match ar with Some ar -> spc () ++ str":" ++ spc() ++ pr_rawsort (snd ar) | None -> mt()) ++ + spc () ++ str"where" ++ spc () ++ + prlist_with_sep (fun () -> str";" ++ spc()) + (fun (lid,oc,c) -> pr_lident_constr ((if oc then str" :>" else str" :") ++ spc()) (lid,c)) props ) + + | VernacInstance (glob, sup, (instid, bk, cl), props, pri) -> + hov 1 ( + pr_non_globality (not glob) ++ + str"Instance" ++ spc () ++ + pr_and_type_binders_arg sup ++ + str"=>" ++ spc () ++ + (match snd instid with Name id -> pr_lident (fst instid, id) ++ spc () ++ str":" ++ spc () | Anonymous -> mt ()) ++ + pr_constr_expr cl ++ spc () ++ + spc () ++ str"where" ++ spc () ++ + prlist_with_sep (fun () -> str";" ++ spc()) (pr_instance_def (spc () ++ str":=" ++ spc())) props) + + | VernacContext l -> + hov 1 ( + str"Context" ++ spc () ++ str"[" ++ spc () ++ + prlist_with_sep (fun () -> str"," ++ spc()) pr_lname_lident_constr l ++ + spc () ++ str "]") + + + | VernacDeclareInstance id -> + hov 1 (str"Instance" ++ spc () ++ pr_lident id) + (* Modules and Module Types *) | VernacDefineModule (export,m,bl,ty,bd) -> let b = pr_module_binders_list bl pr_lconstr in hov 2 (str"Module" ++ spc() ++ pr_require_token export ++ - pr_lident m ++ b ++ - pr_opt (pr_of_module_type pr_lconstr) ty ++ - pr_opt (fun me -> str ":= " ++ pr_module_expr me) bd) + pr_lident m ++ b ++ + pr_opt (pr_of_module_type pr_lconstr) ty ++ + pr_opt (fun me -> str ":= " ++ pr_module_expr me) bd) | VernacDeclareModule (export,id,bl,m1) -> let b = pr_module_binders_list bl pr_lconstr in - hov 2 (str"Declare Module" ++ spc() ++ pr_require_token export ++ + hov 2 (str"Declare Module" ++ spc() ++ pr_require_token export ++ pr_lident id ++ b ++ pr_of_module_type pr_lconstr m1) | VernacDeclareModuleType (id,bl,m) -> let b = pr_module_binders_list bl pr_lconstr in - hov 2 (str"Module Type " ++ pr_lident id ++ b ++ - pr_opt (fun mt -> str ":= " ++ pr_module_type pr_lconstr mt) m) - + hov 2 (str"Module Type " ++ pr_lident id ++ b ++ + pr_opt (fun mt -> str ":= " ++ pr_module_type pr_lconstr mt) m) + | VernacInclude (in_ast) -> + begin + match in_ast with + | CIMTE mty -> + hov 2 (str"Include" ++ + (fun mt -> str " " ++ pr_module_type pr_lconstr mt) mty) + | CIME mexpr -> + hov 2 (str"Include" ++ + (fun me -> str " " ++ pr_module_expr me) mexpr) + end (* Solving *) | VernacSolve (i,tac,deftac) -> (if i = 1 then mt() else int i ++ str ": ") ++ @@ -719,49 +792,62 @@ let rec pr_vernac = function (* Commands *) | VernacDeclareTacticDefinition (rc,l) -> - let pr_tac_body (id, body) = + let pr_tac_body (id, redef, body) = let idl, body = match body with | Tacexpr.TacFun (idl,b) -> idl,b | _ -> [], body in - pr_located pr_ltac_id id ++ + pr_ltac_id id ++ prlist (function None -> str " _" | Some id -> spc () ++ pr_id id) idl - ++ str" :=" ++ brk(1,1) ++ - let idl = List.map out_some (List.filter (fun x -> not (x=None)) idl)in + ++ (if redef then str" ::=" else str" :=") ++ brk(1,1) ++ + let idl = List.map Option.get (List.filter (fun x -> not (x=None)) idl)in pr_raw_tactic_env - (idl @ List.map snd (List.map fst l)) + (idl @ List.map coerce_global_to_id + (List.map (fun (x, _, _) -> x) (List.filter (fun (_, redef, _) -> not redef) l))) (Global.env()) body in hov 1 - (((*if !Options.p1 then + (((*if !Flags.p1 then (if rc then str "Recursive " else mt()) ++ str "Tactic Definition " else*) (* Rec by default *) str "Ltac ") ++ prlist_with_sep (fun () -> fnl() ++ str"with ") pr_tac_body l) | VernacHints (local,dbnames,h) -> pr_hints local dbnames h pr_constr pr_pattern_expr - | VernacSyntacticDefinition (id,c,local,onlyparsing) -> + | VernacSyntacticDefinition (id,(ids,c),local,onlyparsing) -> hov 2 - (str"Notation " ++ pr_locality local ++ pr_id id ++ str" :=" ++ - pr_constrarg c ++ + (str"Notation " ++ pr_locality local ++ pr_lident id ++ + prlist_with_sep spc pr_id ids ++ str" :=" ++ pr_constrarg c ++ pr_syntax_modifiers (if onlyparsing then [SetOnlyParsing] else [])) | VernacDeclareImplicits (local,q,None) -> hov 2 (str"Implicit Arguments" ++ spc() ++ pr_reference q) - | VernacDeclareImplicits (local,q,Some l) -> - let r = Nametab.global q in - Impargs.declare_manual_implicits local r l; - let imps = Impargs.implicits_of_global r in - hov 1 (str"Implicit Arguments" ++ spc() ++ pr_reference q ++ spc() ++ - str"[" ++ prlist_with_sep sep (pr_explanation imps) l ++ str"]") + | VernacDeclareImplicits (local,q,Some imps) -> + hov 1 (str"Implicit Arguments " ++ pr_non_globality local ++ + spc() ++ pr_reference q ++ spc() ++ + str"[" ++ prlist_with_sep sep pr_explanation imps ++ str"]") | VernacReserve (idl,c) -> hov 1 (str"Implicit Type" ++ str (if List.length idl > 1 then "s " else " ") ++ prlist_with_sep spc pr_lident idl ++ str " :" ++ spc () ++ pr_lconstr c) - | VernacSetOpacity (fl,l) -> - hov 1 ((if fl then str"Opaque" else str"Transparent") ++ + | VernacSetOpacity(true,[k,l]) when k=Conv_oracle.transparent -> + hov 1 (str"Transparent" ++ + spc() ++ prlist_with_sep sep pr_reference l) + | VernacSetOpacity(true,[Conv_oracle.Opaque,l]) -> + hov 1 (str"Opaque" ++ spc() ++ prlist_with_sep sep pr_reference l) + | VernacSetOpacity (local,l) -> + let pr_lev = function + Conv_oracle.Opaque -> str"opaque" + | Conv_oracle.Expand -> str"expand" + | l when l = Conv_oracle.transparent -> str"transparent" + | Conv_oracle.Level n -> int n in + let pr_line (l,q) = + hov 2 (pr_lev l ++ spc() ++ + str"[" ++ prlist_with_sep sep pr_reference q ++ str"]") in + hov 1 (pr_locality local ++ str"Strategy" ++ spc() ++ + hv 0 (prlist_with_sep sep pr_line l)) | VernacUnsetOption na -> hov 1 (str"Unset" ++ spc() ++ pr_printoption na None) | VernacSetOption (na,v) -> hov 2 (str"Set" ++ spc() ++ pr_set_option na v) @@ -773,11 +859,11 @@ let rec pr_vernac = function let pr_mayeval r c = match r with | Some r0 -> hov 2 (str"Eval" ++ spc() ++ - pr_red_expr (pr_constr,pr_lconstr,pr_reference) r0 ++ + pr_red_expr (pr_constr,pr_lconstr,pr_or_by_notation pr_reference) r0 ++ spc() ++ str"in" ++ spc () ++ pr_constr c) | None -> hov 2 (str"Check" ++ spc() ++ pr_constr c) in - (if io = None then mt() else int (out_some io) ++ str ": ") ++ + (if io = None then mt() else int (Option.get io) ++ str ": ") ++ pr_mayeval r c | VernacGlobalCheck c -> hov 2 (str"Type" ++ pr_constrarg c) | VernacPrint p -> @@ -785,8 +871,7 @@ let rec pr_vernac = function | PrintFullContext -> str"Print All" | PrintSectionContext s -> str"Print Section" ++ spc() ++ Libnames.pr_reference s - | PrintGrammar (uni,ent) -> - msgerrnl (str "warning: no direct translation of Print Grammar entry"); + | PrintGrammar ent -> str"Print Grammar" ++ spc() ++ str ent | PrintLoadPath -> str"Print LoadPath" | PrintModules -> str"Print Modules" @@ -794,6 +879,8 @@ let rec pr_vernac = function | PrintMLModules -> str"Print ML Modules" | PrintGraph -> str"Print Graph" | PrintClasses -> str"Print Classes" + | PrintTypeClasses -> str"Print TypeClasses" + | PrintInstances qid -> str"Print Instances" ++ spc () ++ pr_reference qid | PrintLtac qid -> str"Print Ltac" ++ spc() ++ pr_reference qid | PrintCoercions -> str"Print Coercions" | PrintCoercionPaths (s,t) -> str"Print Coercion Paths" ++ spc() ++ pr_class_rawexpr s ++ spc() ++ pr_class_rawexpr t @@ -810,12 +897,15 @@ let rec pr_vernac = function | PrintModuleType qid -> str"Print Module Type" ++ spc() ++ pr_reference qid | PrintModule qid -> str"Print Module" ++ spc() ++ pr_reference qid | PrintInspect n -> str"Inspect" ++ spc() ++ int n - | PrintSetoids -> str"Print Setoids" + | PrintSetoids -> str"Print Setoids" | PrintScopes -> str"Print Scopes" | PrintScope s -> str"Print Scope" ++ spc() ++ str s | PrintVisibility s -> str"Print Visibility" ++ pr_opt str s | PrintAbout qid -> str"About" ++ spc() ++ pr_reference qid | PrintImplicit qid -> str"Print Implicit" ++ spc() ++ pr_reference qid +(* spiwack: command printing all the axioms and section variables used in a + term *) + | PrintAssumptions qid -> str"Print Assumptions"++spc()++pr_reference qid in pr_printable p | VernacSearch (sea,sea_r) -> pr_search sea sea_r pr_pattern_expr | VernacLocate loc -> diff --git a/parsing/prettyp.ml b/parsing/prettyp.ml index 57028469..401ef7fe 100644 --- a/parsing/prettyp.ml +++ b/parsing/prettyp.ml @@ -6,7 +6,11 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: prettyp.ml 9314 2006-10-29 20:11:08Z herbelin $ *) +(* Changed by (and thus parts copyright ©) by Lionel Elie Mamane + * on May-June 2006 for implementation of abstraction of pretty-printing of objects. + *) + +(* $Id: prettyp.ml 10971 2008-05-22 17:12:11Z barras $ *) open Pp open Util @@ -29,6 +33,24 @@ open Libnames open Nametab open Recordops +type object_pr = { + print_inductive : mutual_inductive -> std_ppcmds; + print_constant_with_infos : constant -> std_ppcmds; + print_section_variable : variable -> std_ppcmds; + print_syntactic_def : kernel_name -> std_ppcmds; + print_module : bool -> Names.module_path -> std_ppcmds; + print_modtype : module_path -> std_ppcmds; + print_named_decl : identifier * constr option * types -> std_ppcmds; + print_leaf_entry : bool -> Libnames.object_name * Libobject.obj -> Pp.std_ppcmds; + print_library_entry : bool -> (object_name * Lib.node) -> std_ppcmds option; + print_context : bool -> int option -> Lib.library_segment -> std_ppcmds; + print_typed_value_in_env : Environ.env -> Term.constr * Term.types -> Pp.std_ppcmds; + print_eval : Reductionops.reduction_function -> env -> Evd.evar_map -> Topconstr.constr_expr -> unsafe_judgment -> std_ppcmds; +} + +let gallina_print_module = print_module +let gallina_print_modtype = print_modtype + (*********************) (** Basic printing *) @@ -36,29 +58,29 @@ let print_basename sp = pr_global (ConstRef sp) let print_closed_sections = ref false +let with_line_skip p = if ismt p then mt() else (fnl () ++ p) + (********************************) (** Printing implicit arguments *) -let print_impl_args_by_pos = function - | [] -> mt () - | [i] -> str"Position [" ++ int i ++ str"] is implicit" ++ fnl() - | l -> - str"Positions [" ++ - prlist_with_sep (fun () -> str "; ") int l ++ - str"] are implicit" ++ fnl() +let conjugate_to_be = function [_] -> "is" | _ -> "are" -let print_impl_args_by_name = function +let pr_implicit imp = pr_id (name_of_implicit imp) + +let print_impl_args_by_name max = function | [] -> mt () - | [i] -> str"Argument " ++ pr_id (name_of_implicit i) ++ str" is implicit" ++ - fnl() - | l -> - str"Arguments " ++ - prlist_with_sep (fun () -> str ", ") - (fun imp -> pr_id (name_of_implicit imp)) l ++ - str" are implicit" ++ fnl() + | impls -> + hov 0 (str (plural (List.length impls) "Argument") ++ spc() ++ + prlist_with_sep pr_coma pr_implicit impls ++ spc() ++ + str (conjugate_to_be impls) ++ str" implicit" ++ + (if max then strbrk " and maximally inserted" else mt())) ++ fnl() let print_impl_args l = - print_impl_args_by_name (List.filter is_status_implicit l) + let imps = List.filter is_status_implicit l in + let maximps = List.filter Impargs.maximal_insertion_of imps in + let nonmaximps = list_subtract imps maximps in + print_impl_args_by_name false nonmaximps ++ + print_impl_args_by_name true maximps (*********************) (** Printing Scopes *) @@ -90,16 +112,17 @@ let need_expansion impl ref = type opacity = | FullyOpaque - | TransparentMaybeOpacified of bool + | TransparentMaybeOpacified of Conv_oracle.level let opacity env = function | VarRef v when pi2 (Environ.lookup_named v env) <> None -> - Some (TransparentMaybeOpacified (Conv_oracle.is_opaque_var v)) + Some(TransparentMaybeOpacified (Conv_oracle.get_strategy(VarKey v))) | ConstRef cst -> let cb = Environ.lookup_constant cst env in if cb.const_body = None then None else if cb.const_opaque then Some FullyOpaque - else Some (TransparentMaybeOpacified (Conv_oracle.is_opaque_cst cst)) + else Some + (TransparentMaybeOpacified (Conv_oracle.get_strategy(ConstKey cst))) | _ -> None let print_opacity ref = @@ -108,8 +131,14 @@ let print_opacity ref = | Some s -> pr_global ref ++ str " is " ++ str (match s with | FullyOpaque -> "opaque" - | TransparentMaybeOpacified true -> "basically transparent but considered opaque for reduction" - | TransparentMaybeOpacified false -> "transparent") ++ fnl() + | TransparentMaybeOpacified Conv_oracle.Opaque -> + "basically transparent but considered opaque for reduction" + | TransparentMaybeOpacified lev when lev = Conv_oracle.transparent -> + "transparent" + | TransparentMaybeOpacified (Conv_oracle.Level n) -> + "transparent (with expansion weight "^string_of_int n^")" + | TransparentMaybeOpacified Conv_oracle.Expand -> + "transparent (with minimal expansion weight)") ++ fnl() let print_name_infos ref = let impl = implicits_of_global ref in @@ -120,12 +149,7 @@ let print_name_infos ref = str "Expanded type for implicit arguments" ++ fnl () ++ print_ref true ref ++ fnl() else mt() in - (if (List.filter is_status_implicit impl<>[]) - or not (List.for_all ((=) None) scopes) - then fnl() - else mt()) - ++ type_for_implicit - ++ print_impl_args impl ++ print_argument_scopes scopes + type_for_implicit ++ print_impl_args impl ++ print_argument_scopes scopes let print_id_args_data test pr id l = if List.exists test l then @@ -158,7 +182,7 @@ type logical_name = | Term of global_reference | Dir of global_dir_reference | Syntactic of kernel_name - | ModuleType of qualid * kernel_name + | ModuleType of qualid * module_path | Undefined of qualid let locate_any_name ref = @@ -223,21 +247,12 @@ let print_located_qualid ref = (******************************************) (**** Printing declarations and judgments *) +(**** Gallina layer *****) -let print_typed_value_in_env env (trm,typ) = +let gallina_print_typed_value_in_env env (trm,typ) = (pr_lconstr_env env trm ++ fnl () ++ str " : " ++ pr_ltype_env env typ ++ fnl ()) -let print_typed_value x = print_typed_value_in_env (Global.env ()) x - -let print_judgment env {uj_val=trm;uj_type=typ} = - print_typed_value_in_env env (trm, typ) - -let print_safe_judgment env j = - let trm = Safe_typing.j_val j in - let typ = Safe_typing.j_type j in - print_typed_value_in_env env (trm, typ) - (* To be improved; the type should be used to provide the types in the abstractions. This should be done recursively inside pr_lconstr, so that the pretty-print of a proposition (P:(nat->nat)->Prop)(P [u]u) @@ -250,12 +265,12 @@ let print_named_def name body typ = (str "*** [" ++ str name ++ str " " ++ hov 0 (str ":=" ++ brk (1,2) ++ pbody ++ spc () ++ str ":" ++ brk (1,2) ++ ptyp) ++ - str "]" ++ fnl ()) + str "]") let print_named_assum name typ = - (str "*** [" ++ str name ++ str " : " ++ pr_ltype typ ++ str "]" ++ fnl ()) + str "*** [" ++ str name ++ str " : " ++ pr_ltype typ ++ str "]" -let print_named_decl (id,c,typ) = +let gallina_print_named_decl (id,c,typ) = let s = string_of_id id in match c with | Some body -> print_named_def s body typ @@ -307,28 +322,64 @@ let pr_mutual_inductive finite indl = hov 0 ( str (if finite then "Inductive " else "CoInductive ") ++ prlist_with_sep (fun () -> fnl () ++ str" with ") - print_one_inductive indl) ++ - fnl () + print_one_inductive indl) + +let get_fields = + let rec prodec_rec l subst c = + match kind_of_term c with + | Prod (na,t,c) -> + let id = match na with Name id -> id | Anonymous -> id_of_string "_" in + prodec_rec ((id,true,substl subst t)::l) (mkVar id::subst) c + | LetIn (na,b,_,c) -> + let id = match na with Name id -> id | Anonymous -> id_of_string "_" in + prodec_rec ((id,false,substl subst b)::l) (mkVar id::subst) c + | _ -> List.rev l + in + prodec_rec [] [] -let print_mutual sp = +let pr_record (sp,tyi) = + let (ref, params, arity, cstrnames, cstrtypes) = build_inductive sp tyi in + let env = Global.env () in + let envpar = push_rel_context params env in + let fields = get_fields cstrtypes.(0) in + hov 0 ( + hov 0 ( + str "Record " ++ pr_global (IndRef (sp,tyi)) ++ brk(1,4) ++ + print_params env params ++ + str ": " ++ pr_lconstr_env envpar arity ++ brk(1,2) ++ + str ":= " ++ pr_id cstrnames.(0)) ++ + brk(1,2) ++ + hv 2 (str "{ " ++ + prlist_with_sep (fun () -> str "; " ++ brk(1,0)) + (fun (id,b,c) -> + pr_id id ++ str (if b then " : " else " := ") ++ + pr_lconstr_env envpar c) fields) ++ str" }") + +let gallina_print_inductive sp = let (mib,mip) = Global.lookup_inductive (sp,0) in let mipv = mib.mind_packets in let names = list_tabulate (fun x -> (sp,x)) (Array.length mipv) in - pr_mutual_inductive mib.mind_finite names ++ - print_inductive_implicit_args sp mipv ++ - print_inductive_argument_scopes sp mipv + (if mib.mind_record & not !Flags.raw_print then + pr_record (List.hd names) + else + pr_mutual_inductive mib.mind_finite names) ++ fnl () ++ + with_line_skip + (print_inductive_implicit_args sp mipv ++ + print_inductive_argument_scopes sp mipv) + +let print_named_decl id = + gallina_print_named_decl (Global.lookup_named id) ++ fnl () -let print_section_variable sp = - let d = get_variable sp in - print_named_decl d ++ - print_name_infos (VarRef sp) +let gallina_print_section_variable id = + print_named_decl id ++ + with_line_skip (print_name_infos (VarRef id)) let print_body = function | Some lc -> pr_lconstr (Declarations.force lc) | None -> (str"") let print_typed_body (val_0,typ) = - (print_body val_0 ++ fnl () ++ str " : " ++ pr_ltype typ ++ fnl ()) + (print_body val_0 ++ fnl () ++ str " : " ++ pr_ltype typ) let ungeneralized_type_of_constant_type = function | PolymorphicArity (ctx,a) -> mkArity (ctx, Type a.poly_level) @@ -343,84 +394,190 @@ let print_constant with_values sep sp = | None -> str"*** [ " ++ print_basename sp ++ str " : " ++ cut () ++ pr_ltype typ ++ - str" ]" ++ fnl () + str" ]" | _ -> print_basename sp ++ str sep ++ cut () ++ - (if with_values then print_typed_body (val_0,typ) else pr_ltype typ) ++ - fnl ()) - -let print_constant_with_infos sp = - print_constant true " = " sp ++ print_name_infos (ConstRef sp) - -let print_inductive sp = (print_mutual sp) - -let print_syntactic_def sep kn = - let qid = Nametab.shortest_qualid_of_syndef Idset.empty kn in - let c = Syntax_def.search_syntactic_definition dummy_loc kn in - str "Notation " ++ pr_qualid qid ++ str sep ++ + (if with_values then print_typed_body (val_0,typ) else pr_ltype typ)) + ++ fnl () + +let gallina_print_constant_with_infos sp = + print_constant true " = " sp ++ + with_line_skip (print_name_infos (ConstRef sp)) + +let gallina_print_syntactic_def kn = + let sep = " := " + and qid = Nametab.shortest_qualid_of_syndef Idset.empty kn + and (vars,a) = Syntax_def.search_syntactic_definition dummy_loc kn in + let c = Topconstr.rawconstr_of_aconstr dummy_loc a in + str "Notation " ++ pr_qualid qid ++ + prlist_with_sep spc pr_id (List.map fst vars) ++ str sep ++ Constrextern.without_symbols pr_lrawconstr c ++ fnl () -let print_leaf_entry with_values sep ((sp,kn as oname),lobj) = - let tag = object_tag lobj in - match (oname,tag) with - | (_,"VARIABLE") -> - (* Outside sections, VARIABLES still exist but only with universes - constraints *) - (try Some(print_section_variable (basename sp)) with Not_found -> None) - | (_,"CONSTANT") -> - Some (print_constant with_values sep (constant_of_kn kn)) - | (_,"INDUCTIVE") -> - Some (print_inductive kn) - | (_,"MODULE") -> - let (mp,_,l) = repr_kn kn in - Some (print_module with_values (MPdot (mp,l))) - | (_,"MODULE TYPE") -> - Some (print_modtype kn) - | (_,("AUTOHINT"|"GRAMMAR"|"SYNTAXCONSTANT"|"PPSYNTAX"|"TOKEN"|"CLASS"| - "COERCION"|"REQUIRE"|"END-SECTION"|"STRUCTURE")) -> None - (* To deal with forgotten cases... *) - | (_,s) -> None -(* - | (_,s) -> - (str(string_of_path sp) ++ str" : " ++ - str"Unrecognized object " ++ str s ++ fnl ()) -*) - -let rec print_library_entry with_values ent = - let sep = if with_values then " = " else " : " in +let gallina_print_leaf_entry with_values ((sp,kn as oname),lobj) = + let sep = if with_values then " = " else " : " + and tag = object_tag lobj in + match (oname,tag) with + | (_,"VARIABLE") -> + (* Outside sections, VARIABLES still exist but only with universes + constraints *) + (try Some(print_named_decl (basename sp)) with Not_found -> None) + | (_,"CONSTANT") -> + Some (print_constant with_values sep (constant_of_kn kn)) + | (_,"INDUCTIVE") -> + Some (gallina_print_inductive kn) + | (_,"MODULE") -> + let (mp,_,l) = repr_kn kn in + Some (print_module with_values (MPdot (mp,l))) + | (_,"MODULE TYPE") -> + let (mp,_,l) = repr_kn kn in + Some (print_modtype (MPdot (mp,l))) + | (_,("AUTOHINT"|"GRAMMAR"|"SYNTAXCONSTANT"|"PPSYNTAX"|"TOKEN"|"CLASS"| + "COERCION"|"REQUIRE"|"END-SECTION"|"STRUCTURE")) -> None + (* To deal with forgotten cases... *) + | (_,s) -> None + +let gallina_print_library_entry with_values ent = let pr_name (sp,_) = pr_id (basename sp) in match ent with | (oname,Lib.Leaf lobj) -> - print_leaf_entry with_values sep (oname,lobj) + gallina_print_leaf_entry with_values (oname,lobj) | (oname,Lib.OpenedSection (dir,_)) -> Some (str " >>>>>>> Section " ++ pr_name oname) - | (oname,Lib.ClosedSection) -> + | (oname,Lib.ClosedSection _) -> Some (str " >>>>>>> Closed Section " ++ pr_name oname) | (_,Lib.CompilingLibrary (dir,_)) -> Some (str " >>>>>>> Library " ++ pr_dirpath dir) | (oname,Lib.OpenedModule _) -> Some (str " >>>>>>> Module " ++ pr_name oname) + | (oname,Lib.ClosedModule _) -> + Some (str " >>>>>>> Closed Module " ++ pr_name oname) | (oname,Lib.OpenedModtype _) -> Some (str " >>>>>>> Module Type " ++ pr_name oname) + | (oname,Lib.ClosedModtype _) -> + Some (str " >>>>>>> Closed Module Type " ++ pr_name oname) | (_,Lib.FrozenState _) -> None - -let print_context with_values = + +let gallina_print_leaf_entry with_values c = + match gallina_print_leaf_entry with_values c with + | None -> mt () + | Some pp -> pp ++ fnl() + +let gallina_print_context with_values = let rec prec n = function - | h::rest when n = None or out_some n > 0 -> - (match print_library_entry with_values h with + | h::rest when n = None or Option.get n > 0 -> + (match gallina_print_library_entry with_values h with | None -> prec n rest - | Some pp -> prec (option_map ((+) (-1)) n) rest ++ pp ++ fnl ()) + | Some pp -> prec (Option.map ((+) (-1)) n) rest ++ pp ++ fnl ()) | _ -> mt () in prec +let gallina_print_eval red_fun env evmap _ {uj_val=trm;uj_type=typ} = + let ntrm = red_fun env evmap trm in + (str " = " ++ gallina_print_typed_value_in_env env (ntrm,typ)) + +(******************************************) +(**** Printing abstraction layer *) + +let default_object_pr = { + print_inductive = gallina_print_inductive; + print_constant_with_infos = gallina_print_constant_with_infos; + print_section_variable = gallina_print_section_variable; + print_syntactic_def = gallina_print_syntactic_def; + print_module = gallina_print_module; + print_modtype = gallina_print_modtype; + print_named_decl = gallina_print_named_decl; + print_leaf_entry = gallina_print_leaf_entry; + print_library_entry = gallina_print_library_entry; + print_context = gallina_print_context; + print_typed_value_in_env = gallina_print_typed_value_in_env; + print_eval = gallina_print_eval; +} + +let object_pr = ref default_object_pr +let set_object_pr = (:=) object_pr + +let print_inductive x = !object_pr.print_inductive x +let print_constant_with_infos c = !object_pr.print_constant_with_infos c +let print_section_variable c = !object_pr.print_section_variable c +let print_syntactic_def x = !object_pr.print_syntactic_def x +let print_module x = !object_pr.print_module x +let print_modtype x = !object_pr.print_modtype x +let print_named_decl x = !object_pr.print_named_decl x +let print_leaf_entry x = !object_pr.print_leaf_entry x +let print_library_entry x = !object_pr.print_library_entry x +let print_context x = !object_pr.print_context x +let print_typed_value_in_env x = !object_pr.print_typed_value_in_env x +let print_eval x = !object_pr.print_eval x + +(******************************************) +(**** Printing declarations and judgments *) +(**** Abstract layer *****) + +let print_typed_value x = print_typed_value_in_env (Global.env ()) x + +let print_judgment env {uj_val=trm;uj_type=typ} = + print_typed_value_in_env env (trm, typ) + +let print_safe_judgment env j = + let trm = Safe_typing.j_val j in + let typ = Safe_typing.j_type j in + print_typed_value_in_env env (trm, typ) + +(*********************) +(* *) + let print_full_context () = print_context true None (Lib.contents_after None) let print_full_context_typ () = print_context false None (Lib.contents_after None) +let print_full_pure_context () = + let rec prec = function + | ((_,kn),Lib.Leaf lobj)::rest -> + let pp = match object_tag lobj with + | "CONSTANT" -> + let con = constant_of_kn kn in + let cb = Global.lookup_constant con in + let val_0 = cb.const_body in + let typ = ungeneralized_type_of_constant_type cb.const_type in + hov 0 ( + match val_0 with + | None -> + str (if cb.const_opaque then "Axiom " else "Parameter ") ++ + print_basename con ++ str " : " ++ cut () ++ pr_ltype typ + | Some v -> + if cb.const_opaque then + str "Theorem " ++ print_basename con ++ cut () ++ + str " : " ++ pr_ltype typ ++ str "." ++ fnl () ++ + str "Proof " ++ print_body val_0 + else + str "Definition " ++ print_basename con ++ cut () ++ + str " : " ++ pr_ltype typ ++ cut () ++ str " := " ++ + print_body val_0) ++ str "." ++ fnl () ++ fnl () + | "INDUCTIVE" -> + let (mib,mip) = Global.lookup_inductive (kn,0) in + let mipv = mib.mind_packets in + let names = list_tabulate (fun x -> (kn,x)) (Array.length mipv) in + pr_mutual_inductive mib.mind_finite names ++ str "." ++ + fnl () ++ fnl () + | "MODULE" -> + (* TODO: make it reparsable *) + let (mp,_,l) = repr_kn kn in + print_module true (MPdot (mp,l)) ++ str "." ++ fnl () ++ fnl () + | "MODULE TYPE" -> + (* TODO: make it reparsable *) + (* TODO: make it reparsable *) + let (mp,_,l) = repr_kn kn in + print_modtype (MPdot (mp,l)) ++ str "." ++ fnl () ++ fnl () + | _ -> mt () in + prec rest ++ pp + | _::rest -> prec rest + | _ -> mt () in + prec (Lib.contents_after None) + (* For printing an inductive definition with its constructors and elimination, assume that the declaration of constructors and eliminations @@ -446,8 +603,9 @@ let read_sec_context r = let rec get_cxt in_cxt = function | (_,Lib.OpenedSection ((dir',_),_) as hd)::rest -> if dir = dir' then (hd::in_cxt) else get_cxt (hd::in_cxt) rest - | (_,Lib.ClosedSection)::rest -> + | (_,Lib.ClosedSection _)::rest -> error "Cannot print the contents of a closed section" + (* LEM: Actually, we could if we wanted to. *) | [] -> [] | hd::rest -> get_cxt (hd::in_cxt) rest in @@ -460,17 +618,13 @@ let print_sec_context sec = let print_sec_context_typ sec = print_context false None (read_sec_context sec) -let print_eval red_fun env {uj_val=trm;uj_type=typ} = - let ntrm = red_fun env Evd.empty trm in - (str " = " ++ print_judgment env {uj_val = ntrm; uj_type = typ}) - let print_name ref = match locate_any_name ref with | Term (ConstRef sp) -> print_constant_with_infos sp | Term (IndRef (sp,_)) -> print_inductive sp | Term (ConstructRef ((sp,_),_)) -> print_inductive sp | Term (VarRef sp) -> print_section_variable sp - | Syntactic kn -> print_syntactic_def " := " kn + | Syntactic kn -> print_syntactic_def kn | Dir (DirModule(dirpath,(mp,_))) -> print_module (printable_body dirpath) mp | Dir _ -> mt () | ModuleType (_,kn) -> print_modtype kn @@ -491,9 +645,7 @@ let print_name ref = | Lib.Leaf obj -> (oname,obj) | _ -> raise Not_found in - match print_leaf_entry true " = " (oname,lobj) with - | None -> mt () - | Some pp -> pp ++ fnl() + print_leaf_entry true (oname,lobj) with Not_found -> errorlabstrm "print_name" (pr_qualid qid ++ spc () ++ str "not a defined object") @@ -508,7 +660,7 @@ let print_opaque_name qid = else error "not a defined constant" | IndRef (sp,_) -> - print_mutual sp + print_inductive sp | ConstructRef cstr -> let ty = Inductiveops.type_of_constructor env cstr in print_typed_value (mkConstruct cstr, ty) @@ -519,10 +671,11 @@ let print_opaque_name qid = let print_about ref = let k = locate_any_name ref in begin match k with - | Term ref -> - print_ref false ref ++ print_name_infos ref ++ print_opacity ref + | Term ref -> + print_ref false ref ++ fnl () ++ print_name_infos ref ++ + print_opacity ref | Syntactic kn -> - print_syntactic_def " := " kn + print_syntactic_def kn | Dir _ | ModuleType _ | Undefined _ -> mt () end ++ @@ -597,9 +750,40 @@ let print_path_between cls clt = in print_path ((i,j),p) +let pr_cs_pattern = function + Const_cs c -> pr_global c + | Prod_cs -> str "_ -> _" + | Default_cs -> str "_" + | Sort_cs s -> pr_sort_family s + let print_canonical_projections () = - prlist_with_sep pr_fnl (fun ((r1,r2),o) -> - pr_global r2 ++ str " <- " ++ pr_global r1 ++ str " ( " ++ pr_lconstr o.o_DEF ++ str " )") + prlist_with_sep pr_fnl + (fun ((r1,r2),o) -> pr_cs_pattern r2 ++ + str " <- " ++ + pr_global r1 ++ str " ( " ++ pr_lconstr o.o_DEF ++ str " )") (canonical_projections ()) (*************************************************************************) + +(*************************************************************************) +(* Pretty-printing functions for type classes *) + +open Typeclasses + +let pr_typeclass env t = + print_ref false t.cl_impl + +let print_typeclasses () = + let env = Global.env () in + prlist_with_sep fnl (pr_typeclass env) (typeclasses ()) + +let pr_instance env i = + (* gallina_print_constant_with_infos i.is_impl *) + (* lighter *) + print_ref false (ConstRef (instance_impl i)) + +let print_instances r = + let env = Global.env () in + let inst = instances r in + prlist_with_sep fnl (pr_instance env) inst + diff --git a/parsing/prettyp.mli b/parsing/prettyp.mli index 13c11db7..a487ef62 100644 --- a/parsing/prettyp.mli +++ b/parsing/prettyp.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: prettyp.mli 7740 2005-12-26 20:07:21Z herbelin $ i*) +(*i $Id: prettyp.mli 10697 2008-03-19 17:58:43Z msozeau $ i*) (*i*) open Pp @@ -30,16 +30,16 @@ val print_context : bool -> int option -> Lib.library_segment -> std_ppcmds val print_library_entry : bool -> (object_name * Lib.node) -> std_ppcmds option val print_full_context : unit -> std_ppcmds val print_full_context_typ : unit -> std_ppcmds +val print_full_pure_context : unit -> std_ppcmds val print_sec_context : reference -> std_ppcmds val print_sec_context_typ : reference -> std_ppcmds val print_judgment : env -> unsafe_judgment -> std_ppcmds val print_safe_judgment : env -> Safe_typing.judgment -> std_ppcmds val print_eval : - reduction_function -> env -> unsafe_judgment -> std_ppcmds + reduction_function -> env -> Evd.evar_map -> Topconstr.constr_expr -> unsafe_judgment -> std_ppcmds (* This function is exported for the graphical user-interface pcoq *) val build_inductive : mutual_inductive -> int -> global_reference * rel_context * types * identifier array * types array -val print_mutual : mutual_inductive -> std_ppcmds val print_name : reference -> std_ppcmds val print_opaque_name : reference -> std_ppcmds val print_about : reference -> std_ppcmds @@ -58,7 +58,30 @@ val print_coercions : unit -> std_ppcmds val print_path_between : Classops.cl_typ -> Classops.cl_typ -> std_ppcmds val print_canonical_projections : unit -> std_ppcmds +(* Pretty-printing functions for type classes and instances *) +val print_typeclasses : unit -> std_ppcmds +val print_instances : global_reference -> std_ppcmds + + val inspect : int -> std_ppcmds (* Locate *) val print_located_qualid : reference -> std_ppcmds + +type object_pr = { + print_inductive : mutual_inductive -> std_ppcmds; + print_constant_with_infos : constant -> std_ppcmds; + print_section_variable : variable -> std_ppcmds; + print_syntactic_def : kernel_name -> std_ppcmds; + print_module : bool -> Names.module_path -> std_ppcmds; + print_modtype : module_path -> std_ppcmds; + print_named_decl : identifier * constr option * types -> std_ppcmds; + print_leaf_entry : bool -> Libnames.object_name * Libobject.obj -> Pp.std_ppcmds; + print_library_entry : bool -> (object_name * Lib.node) -> std_ppcmds option; + print_context : bool -> int option -> Lib.library_segment -> std_ppcmds; + print_typed_value_in_env : Environ.env -> Term.constr * Term.types -> Pp.std_ppcmds; + print_eval : reduction_function -> env -> Evd.evar_map -> Topconstr.constr_expr -> unsafe_judgment -> std_ppcmds +} + +val set_object_pr : object_pr -> unit +val default_object_pr : object_pr diff --git a/parsing/printer.ml b/parsing/printer.ml index 6fb492ae..6a19cb0a 100644 --- a/parsing/printer.ml +++ b/parsing/printer.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: printer.ml 9573 2007-01-31 20:18:18Z notin $ *) +(* $Id: printer.ml 11001 2008-05-27 16:56:07Z aspiwack $ *) open Pp open Util @@ -30,7 +30,7 @@ open Ppconstr open Constrextern let emacs_str s alts = - match !Options.print_emacs, !Options.print_emacs_safechar with + match !Flags.print_emacs, !Flags.print_emacs_safechar with | true, true -> alts | true , false -> s | false,_ -> "" @@ -48,10 +48,16 @@ let pr_lconstr_env_at_top env = pr_lconstr_core true env let pr_lconstr_env env = pr_lconstr_core false env let pr_constr_env env = pr_constr_core false env +let pr_open_lconstr_env env (_,c) = pr_lconstr_env env c +let pr_open_constr_env env (_,c) = pr_constr_env env c + (* NB do not remove the eta-redexes! Global.env() has side-effects... *) let pr_lconstr t = pr_lconstr_env (Global.env()) t let pr_constr t = pr_constr_env (Global.env()) t +let pr_open_lconstr (_,c) = pr_lconstr c +let pr_open_constr (_,c) = pr_constr c + let pr_type_core at_top env t = pr_constr_expr (extern_type at_top env t) let pr_ltype_core at_top env t = @@ -165,15 +171,7 @@ let pr_named_context env ne_context = ne_context ~init:(mt ())) let pr_rel_context env rel_context = - let rec prec env = function - | [] -> (mt ()) - | [b] -> str "(" ++ pr_rel_decl env b ++ str")" - | b::rest -> - let pb = pr_rel_decl env b in - let penvtl = prec (push_rel b env) rest in - str "(" ++ pb ++ str")" ++ spc () ++ penvtl - in - hov 0 (prec env (List.rev rel_context)) + pr_binders (extern_rel_context None env rel_context) let pr_rel_context_of env = pr_rel_context env (rel_context env) @@ -229,12 +227,39 @@ let pr_context_limit n env = in (sign_env ++ db_env) -let pr_context_of env = match Options.print_hyps_limit () with +let pr_context_of env = match Flags.print_hyps_limit () with | None -> hv 0 (pr_context_unlimited env) | Some n -> hv 0 (pr_context_limit n env) (* display goal parts (Proof mode) *) +let pr_restricted_named_context among env = + hv 0 (fold_named_context + (fun env ((id,_,_) as d) pps -> + if true || Idset.mem id among then + pps ++ + fnl () ++ str (emacs_str (String.make 1 (Char.chr 253)) "") ++ + pr_var_decl env d + else + pps) + env ~init:(mt ())) + + +let pr_predicate pr_elt (b, elts) = + let pr_elts = prlist_with_sep spc pr_elt elts in + if b then + str"all" ++ + (if elts = [] then mt () else str" except: " ++ pr_elts) + else + if elts = [] then str"none" else pr_elts + +let pr_cpred p = pr_predicate pr_con (Cpred.elements p) +let pr_idpred p = pr_predicate Nameops.pr_id (Idpred.elements p) + +let pr_transparent_state (ids, csts) = + hv 0 (str"VARIABLES: " ++ pr_idpred ids ++ fnl () ++ + str"CONSTANTS: " ++ pr_cpred csts ++ fnl ()) + let pr_subgoal_metas metas env= let pr_one (meta,typ) = str "?" ++ int meta ++ str " : " ++ @@ -243,25 +268,24 @@ let pr_subgoal_metas metas env= hv 0 (prlist_with_sep mt pr_one metas) (* display complete goal *) - -let pr_goal g = - let env = evar_env g in - let preamb,penv,pc = +let default_pr_goal g = + let env = evar_unfiltered_env g in + let preamb,thesis,penv,pc = if g.evar_extra = None then - mt (), + mt (), mt (), pr_context_of env, pr_ltype_env_at_top env g.evar_concl else - let {pm_subgoals=metas} = get_info g in - (str " *** Declarative Mode ***" ++ fnl ()++fnl ()), - pr_context_of env, - pr_subgoal_metas metas env + (str " *** Declarative Mode ***" ++ fnl ()++fnl ()), + (str"thesis := " ++ fnl ()), + pr_context_of env, + pr_ltype_env_at_top env g.evar_concl in preamb ++ str" " ++ hv 0 (penv ++ fnl () ++ str (emacs_str (String.make 1 (Char.chr 253)) "") ++ str "============================" ++ fnl () ++ - str" " ++ pc) ++ fnl () + thesis ++ str " " ++ pc) ++ fnl () (* display the conclusion of a goal *) let pr_concl n g = @@ -270,12 +294,17 @@ let pr_concl n g = str (emacs_str (String.make 1 (Char.chr 253)) "") ++ str "subgoal " ++ int n ++ str " is:" ++ cut () ++ str" " ++ pc - (* display evar type: a context and a type *) let pr_evgl_sign gl = - let ps = pr_named_context_of (evar_env gl) in + let ps = pr_named_context_of (evar_unfiltered_env gl) in + let _,l = list_filter2 (fun b c -> not b) (evar_filter gl,evar_context gl) in + let ids = List.rev (List.map pi1 l) in + let warn = + if ids = [] then mt () else + (str "(" ++ prlist_with_sep pr_coma pr_id ids ++ str " cannot be used)") + in let pc = pr_lconstr gl.evar_concl in - hov 0 (str"[" ++ ps ++ spc () ++ str"|- " ++ pc ++ str"]") + hov 0 (str"[" ++ ps ++ spc () ++ str"|- " ++ pc ++ str"]" ++ spc () ++ warn) (* Print an enumerated list of existential variables *) let rec pr_evars_int i = function @@ -287,12 +316,12 @@ let rec pr_evars_int i = function str (string_of_existential ev) ++ str " : " ++ pegl)) ++ fnl () ++ pei -let pr_subgoal n = +let default_pr_subgoal n = let rec prrec p = function | [] -> error "No such goal" | g::rest -> if p = 1 then - let pg = pr_goal g in + let pg = default_pr_goal g in v 0 (str "subgoal " ++ int n ++ str " is:" ++ cut () ++ pg) else prrec (p-1) rest @@ -300,7 +329,7 @@ let pr_subgoal n = prrec n (* Print open subgoals. Checks for uninstantiated existential variables *) -let pr_subgoals close_cmd sigma = function +let default_pr_subgoals close_cmd sigma = function | [] -> begin match close_cmd with @@ -317,7 +346,7 @@ let pr_subgoals close_cmd sigma = function str "variables :" ++fnl () ++ (hov 0 pei)) end | [g] -> - let pg = pr_goal g in + let pg = default_pr_goal g in v 0 (str ("1 "^"subgoal") ++cut () ++ pg) | g1::rest -> let rec pr_rec n = function @@ -327,11 +356,39 @@ let pr_subgoals close_cmd sigma = function let prest = pr_rec (n+1) rest in (cut () ++ pc ++ prest) in - let pg1 = pr_goal g1 in + let pg1 = default_pr_goal g1 in let prest = pr_rec 2 rest in v 0 (int(List.length rest+1) ++ str" subgoals" ++ cut () ++ pg1 ++ prest ++ fnl ()) + +(**********************************************************************) +(* Abstraction layer *) + + +type printer_pr = { + pr_subgoals : string option -> evar_map -> goal list -> std_ppcmds; + pr_subgoal : int -> goal list -> std_ppcmds; + pr_goal : goal -> std_ppcmds; +} + +let default_printer_pr = { + pr_subgoals = default_pr_subgoals; + pr_subgoal = default_pr_subgoal; + pr_goal = default_pr_goal; +} + +let printer_pr = ref default_printer_pr + +let set_printer_pr = (:=) printer_pr + +let pr_subgoals x = !printer_pr.pr_subgoals x +let pr_subgoal x = !printer_pr.pr_subgoal x +let pr_goal x = !printer_pr.pr_goal x + +(* End abstraction layer *) +(**********************************************************************) + let pr_subgoals_of_pfts pfts = let close_cmd = Decl_mode.get_end_command pfts in let gls = fst (Refiner.frontier (proof_of_pftreestate pfts)) in @@ -350,6 +407,7 @@ let pr_open_subgoals () = if List.length gls < 2 then pr_subgoal n gls else + (* LEM TODO: this way of saying how many subgoals has to be abstracted out*) v 0 (int(List.length gls) ++ str" subgoals" ++ cut () ++ pr_subgoal n gls) @@ -430,3 +488,42 @@ let pr_prim_rule = function let prterm = pr_lconstr + +(* spiwack: printer function for sets of Environ.assumption. + It is used primarily by the Print Assumption command. *) +let pr_assumptionset env s = + if (Environ.ContextObjectMap.is_empty s) then + str "Closed under the global context" + else + let (vars,axioms) = + Environ.ContextObjectMap.fold (fun o typ r -> + let (v,a) = r in + match o with + | Variable id -> ( Some ( + Option.default (fnl ()) v + ++ str (string_of_id id) + ++ str " : " + ++ pr_ltype typ + ++ fnl () + ) + , + a ) + | Axiom kn -> ( v , + Some ( + Option.default (fnl ()) a + ++ (pr_constant env kn) + ++ str " : " + ++ pr_ltype typ + ++ fnl () + ) + ) + ) + s (None,None) + in + let (vars,axioms) = + ( Option.map (fun p -> str "Section Variables:" ++ p) vars , + Option.map (fun p -> str "Axioms:" ++ p) axioms + ) + in + (Option.default (mt ()) vars) ++ (Option.default (mt ()) axioms) + diff --git a/parsing/printer.mli b/parsing/printer.mli index 86af523f..935fca12 100644 --- a/parsing/printer.mli +++ b/parsing/printer.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: printer.mli 9385 2006-11-17 15:14:14Z courtieu $ i*) +(*i $Id: printer.mli 11001 2008-05-27 16:56:07Z aspiwack $ i*) (*i*) open Pp @@ -35,6 +35,12 @@ val pr_lconstr : constr -> std_ppcmds val pr_constr_env : env -> constr -> std_ppcmds val pr_constr : constr -> std_ppcmds +val pr_open_constr_env : env -> open_constr -> std_ppcmds +val pr_open_constr : open_constr -> std_ppcmds + +val pr_open_lconstr_env : env -> open_constr -> std_ppcmds +val pr_open_lconstr : open_constr -> std_ppcmds + val pr_ltype_env_at_top : env -> types -> std_ppcmds val pr_ltype_env : env -> types -> std_ppcmds val pr_ltype : types -> std_ppcmds @@ -85,6 +91,13 @@ val pr_rel_context : env -> rel_context -> std_ppcmds val pr_rel_context_of : env -> std_ppcmds val pr_context_of : env -> std_ppcmds +(* Predicates *) + +val pr_predicate : ('a -> std_ppcmds) -> (bool * 'a list) -> std_ppcmds +val pr_cpred : Cpred.t -> std_ppcmds +val pr_idpred : Idpred.t -> std_ppcmds +val pr_transparent_state : transparent_state -> std_ppcmds + (* Proofs *) val pr_goal : goal -> std_ppcmds @@ -107,3 +120,20 @@ val emacs_str : string -> string -> string (* Backwards compatibility *) val prterm : constr -> std_ppcmds (* = pr_lconstr *) + + +(* spiwack: printer function for sets of Environ.assumption. + It is used primarily by the Print Assumption command. *) +val pr_assumptionset : env -> Term.types Environ.ContextObjectMap.t ->std_ppcmds + + +type printer_pr = { + pr_subgoals : string option -> evar_map -> goal list -> std_ppcmds; + pr_subgoal : int -> goal list -> std_ppcmds; + pr_goal : goal -> std_ppcmds; +};; + +val set_printer_pr : printer_pr -> unit + +val default_printer_pr : printer_pr + diff --git a/parsing/printmod.ml b/parsing/printmod.ml index aaf4a662..0bdae7c7 100644 --- a/parsing/printmod.ml +++ b/parsing/printmod.ml @@ -42,73 +42,98 @@ let print_kn locals kn = pr_qualid qid with Not_found -> - let (mp,_,l) = repr_kn kn in - print_local_modpath locals mp ++ str"." ++ pr_lab l + try + print_local_modpath locals kn + with + Not_found -> print_modpath locals kn let rec flatten_app mexpr l = match mexpr with - | MEBapply (mexpr,marg,_) -> flatten_app mexpr (marg::l) + | SEBapply (mexpr,marg,_) -> flatten_app mexpr (marg::l) | mexpr -> mexpr::l let rec print_module name locals with_body mb = - let body = match mb.mod_equiv, with_body, mb.mod_expr with - | None, false, _ - | None, true, None -> mt() - | None, true, Some mexpr -> + let body = match with_body, mb.mod_expr with + | false, _ + | true, None -> mt() + | true, Some mexpr -> spc () ++ str ":= " ++ print_modexpr locals mexpr - | Some mp, _, _ -> str " == " ++ print_modpath locals mp in - hv 2 (str "Module " ++ name ++ spc () ++ str": " ++ - print_modtype locals mb.mod_type ++ body) - -and print_modtype locals mty = match mty with - | MTBident kn -> print_kn locals kn - | MTBfunsig (mbid,mtb1,mtb2) -> -(* let env' = Modops.add_module (MPbid mbid) (Modops.body_of_type mtb) env - in *) - let locals' = (mbid, get_new_id locals (id_of_mbid mbid))::locals in - hov 2 (str "Funsig" ++ spc () ++ str "(" ++ - pr_id (id_of_mbid mbid) ++ str " : " ++ print_modtype locals mtb1 ++ - str ")" ++ spc() ++ print_modtype locals' mtb2) - | MTBsig (msid,sign) -> + let modtype = match mb.mod_type with + None -> str "" + | Some t -> str": " ++ + print_modtype locals t + in + hv 2 (str "Module " ++ name ++ spc () ++ modtype ++ body) + +and print_modtype locals mty = + match mty with + | SEBident kn -> print_kn locals kn + | SEBfunctor (mbid,mtb1,mtb2) -> + (* let env' = Modops.add_module (MPbid mbid) + (Modops.body_of_type mtb) env + in *) + let locals' = (mbid, get_new_id locals (id_of_mbid mbid)) + ::locals in + hov 2 (str "Funsig" ++ spc () ++ str "(" ++ + pr_id (id_of_mbid mbid) ++ str " : " ++ + print_modtype locals mtb1.typ_expr ++ + str ")" ++ spc() ++ print_modtype locals' mtb2) + | SEBstruct (msid,sign) -> hv 2 (str "Sig" ++ spc () ++ print_sig locals msid sign ++ brk (1,-2) ++ str "End") + | SEBapply (mexpr,marg,_) -> + let lapp = flatten_app mexpr [marg] in + let fapp = List.hd lapp in + let mapp = List.tl lapp in + hov 3 (str"(" ++ (print_modtype locals fapp) ++ spc () ++ + prlist_with_sep spc (print_modexpr locals) mapp ++ str")") + | SEBwith(seb,With_definition_body(idl,cb))-> + let s = (String.concat "." (List.map string_of_id idl)) in + hov 2 (print_modtype locals seb ++ spc() ++ str "with" ++ spc() ++ + str "Definition"++ spc() ++ str s ++ spc() ++ str ":="++ spc()) + | SEBwith(seb,With_module_body(idl,mp,_))-> + let s =(String.concat "." (List.map string_of_id idl)) in + hov 2 (print_modtype locals seb ++ spc() ++ str "with" ++ spc() ++ + str "Module"++ spc() ++ str s ++ spc() ++ str ":="++ spc()) and print_sig locals msid sign = let print_spec (l,spec) = (match spec with - | SPBconst {const_body=Some _; const_opaque=false} -> str "Definition " - | SPBconst {const_body=None} - | SPBconst {const_opaque=true} -> str "Parameter " - | SPBmind _ -> str "Inductive " - | SPBmodule _ -> str "Module " - | SPBmodtype _ -> str "Module Type ") ++ str (string_of_label l) + | SFBconst {const_body=Some _; const_opaque=false} -> str "Definition " + | SFBconst {const_body=None} + | SFBconst {const_opaque=true} -> str "Parameter " + | SFBmind _ -> str "Inductive " + | SFBmodule _ -> str "Module " + | SFBalias (mp,_) -> str "Module" + | SFBmodtype _ -> str "Module Type ") ++ str (string_of_label l) in prlist_with_sep spc print_spec sign and print_struct locals msid struc = let print_body (l,body) = (match body with - | SEBconst {const_body=Some _; const_opaque=false} -> str "Definition " - | SEBconst {const_body=Some _; const_opaque=true} -> str "Theorem " - | SEBconst {const_body=None} -> str "Parameter " - | SEBmind _ -> str "Inductive " - | SEBmodule _ -> str "Module " - | SEBmodtype _ -> str "Module Type ") ++ str (string_of_label l) + | SFBconst {const_body=Some _; const_opaque=false} -> str "Definition " + | SFBconst {const_body=Some _; const_opaque=true} -> str "Theorem " + | SFBconst {const_body=None} -> str "Parameter " + | SFBmind _ -> str "Inductive " + | SFBmodule _ -> str "Module " + | SFBalias (mp,_) -> str "Module" + | SFBmodtype _ -> str "Module Type ") ++ str (string_of_label l) in prlist_with_sep spc print_body struc and print_modexpr locals mexpr = match mexpr with - | MEBident mp -> print_modpath locals mp - | MEBfunctor (mbid,mty,mexpr) -> + | SEBident mp -> print_modpath locals mp + | SEBfunctor (mbid,mty,mexpr) -> (* let env' = Modops.add_module (MPbid mbid) (Modops.body_of_type mtb) env in *) let locals' = (mbid, get_new_id locals (id_of_mbid mbid))::locals in hov 2 (str "Functor" ++ spc() ++ str"[" ++ pr_id(id_of_mbid mbid) ++ - str ":" ++ print_modtype locals mty ++ + str ":" ++ print_modtype locals mty.typ_expr ++ str "]" ++ spc () ++ print_modexpr locals' mexpr) - | MEBstruct (msid, struc) -> + | SEBstruct (msid, struc) -> hv 2 (str "Struct" ++ spc () ++ print_struct locals msid struc ++ brk (1,-2) ++ str "End") - | MEBapply (mexpr,marg,_) -> + | SEBapply (mexpr,marg,_) -> let lapp = flatten_app mexpr [marg] in hov 3 (str"(" ++ prlist_with_sep spc (print_modexpr locals) lapp ++ str")") - + | SEBwith (_,_)-> anomaly "Not avaible yet" let rec printable_body dir = @@ -128,6 +153,7 @@ let print_module with_body mp = print_module name [] with_body (Global.lookup_module mp) ++ fnl () let print_modtype kn = + let mtb = Global.lookup_modtype kn in let name = print_kn [] kn in - str "Module Type " ++ name ++ str " = " ++ - print_modtype [] (Global.lookup_modtype kn) ++ fnl () + str "Module Type " ++ name ++ str " = " ++ + print_modtype [] mtb.typ_expr ++ fnl () diff --git a/parsing/printmod.mli b/parsing/printmod.mli index 2df0581c..a3a16e8e 100644 --- a/parsing/printmod.mli +++ b/parsing/printmod.mli @@ -14,4 +14,4 @@ val printable_body : dir_path -> bool val print_module : bool -> module_path -> std_ppcmds -val print_modtype : kernel_name -> std_ppcmds +val print_modtype : module_path -> std_ppcmds diff --git a/parsing/q_constr.ml4 b/parsing/q_constr.ml4 index 21c851df..72d81051 100644 --- a/parsing/q_constr.ml4 +++ b/parsing/q_constr.ml4 @@ -6,7 +6,9 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: g_constr.ml4,v 1.58 2005/12/30 10:55:32 herbelin Exp $ *) +(*i camlp4use: "pa_extend.cmo q_MLast.cmo" i*) + +(* $Id: q_constr.ml4 10739 2008-04-01 14:45:20Z herbelin $ *) open Rawterm open Term @@ -47,9 +49,9 @@ EXTEND constr: [ "200" RIGHTA [ LIDENT "forall"; id = ident; ":"; c1 = constr; ","; c2 = constr -> - <:expr< Rawterm.RProd ($dloc$,Name $id$,$c1$,$c2$) >> + <:expr< Rawterm.RProd ($dloc$,Name $id$,Rawterm.Explicit,$c1$,$c2$) >> | "fun"; id = ident; ":"; c1 = constr; "=>"; c2 = constr -> - <:expr< Rawterm.RLambda ($dloc$,Name $id$,$c1$,$c2$) >> + <:expr< Rawterm.RLambda ($dloc$,Name $id$,Rawterm.Explicit,$c1$,$c2$) >> | "let"; id = ident; ":="; c1 = constr; "in"; c2 = constr -> <:expr< Rawterm.RLetin ($dloc$,Name $id$,$c1$,$c2$) >> (* fix todo *) @@ -59,7 +61,7 @@ EXTEND <:expr< Rawterm.RCast($dloc$,$c1$,DEFAULTcast,$c2$) >> ] | "90" RIGHTA [ c1 = constr; "->"; c2 = SELF -> - <:expr< Rawterm.RProd ($dloc$,Anonymous,$c1$,$c2$) >> ] + <:expr< Rawterm.RProd ($dloc$,Anonymous,Rawterm.Explicit,$c1$,$c2$) >> ] | "75" RIGHTA [ "~"; c = constr -> apply_ref <:expr< coq_not_ref >> [c] ] diff --git a/parsing/q_coqast.ml4 b/parsing/q_coqast.ml4 index 9f828c96..24562459 100644 --- a/parsing/q_coqast.ml4 +++ b/parsing/q_coqast.ml4 @@ -6,7 +6,9 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: q_coqast.ml4 10185 2007-10-06 18:05:13Z herbelin $ *) +(*i camlp4use: "q_MLast.cmo pa_macro.cmo" i*) + +(* $Id: q_coqast.ml4 11094 2008-06-10 19:35:23Z herbelin $ *) open Util open Names @@ -60,12 +62,18 @@ let mlexpr_of_reference = function | Libnames.Qualid (loc,qid) -> <:expr< Libnames.Qualid $dloc$ $mlexpr_of_qualid qid$ >> | Libnames.Ident (loc,id) -> <:expr< Libnames.Ident $dloc$ $mlexpr_of_ident id$ >> +let mlexpr_of_by_notation f = function + | Genarg.AN x -> <:expr< Genarg.AN $f x$ >> + | Genarg.ByNotation (loc,s) -> <:expr< Genarg.ByNotation $dloc$ $str:s$ >> + let mlexpr_of_intro_pattern = function - | Genarg.IntroOrAndPattern _ -> failwith "mlexpr_of_intro_pattern: TODO" | Genarg.IntroWildcard -> <:expr< Genarg.IntroWildcard >> | Genarg.IntroAnonymous -> <:expr< Genarg.IntroAnonymous >> + | Genarg.IntroFresh id -> <:expr< Genarg.IntroFresh (mlexpr_of_ident $dloc$ id) >> | Genarg.IntroIdentifier id -> <:expr< Genarg.IntroIdentifier (mlexpr_of_ident $dloc$ id) >> + | Genarg.IntroOrAndPattern _ | Genarg.IntroRewrite _ -> + failwith "mlexpr_of_intro_pattern: TODO" let mlexpr_of_ident_option = mlexpr_of_option (mlexpr_of_ident) @@ -87,7 +95,9 @@ let mlexpr_of_or_var f = function let mlexpr_of_hyp = mlexpr_of_or_metaid (mlexpr_of_located mlexpr_of_ident) -let mlexpr_of_occs = mlexpr_of_list (mlexpr_of_or_var mlexpr_of_int) +let mlexpr_of_occs = + mlexpr_of_pair + mlexpr_of_bool (mlexpr_of_list (mlexpr_of_or_var mlexpr_of_int)) let mlexpr_of_occurrences f = mlexpr_of_pair mlexpr_of_occs f @@ -103,7 +113,6 @@ let mlexpr_of_clause cl = <:expr< {Tacexpr.onhyps= $mlexpr_of_option (mlexpr_of_list mlexpr_of_hyp_location) cl.Tacexpr.onhyps$; - Tacexpr.onconcl= $mlexpr_of_bool cl.Tacexpr.onconcl$; Tacexpr.concl_occs= $mlexpr_of_occs cl.Tacexpr.concl_occs$} >> let mlexpr_of_red_flags { @@ -117,13 +126,21 @@ let mlexpr_of_red_flags { Rawterm.rIota = $mlexpr_of_bool bi$; Rawterm.rZeta = $mlexpr_of_bool bz$; Rawterm.rDelta = $mlexpr_of_bool bd$; - Rawterm.rConst = $mlexpr_of_list mlexpr_of_reference l$ + Rawterm.rConst = $mlexpr_of_list (mlexpr_of_by_notation mlexpr_of_reference) l$ } >> let mlexpr_of_explicitation = function | Topconstr.ExplByName id -> <:expr< Topconstr.ExplByName $mlexpr_of_ident id$ >> - | Topconstr.ExplByPos n -> <:expr< Topconstr.ExplByPos $mlexpr_of_int n$ >> + | Topconstr.ExplByPos (n,_id) -> <:expr< Topconstr.ExplByPos $mlexpr_of_int n$ >> +let mlexpr_of_binding_kind = function + | Rawterm.Implicit -> <:expr< Rawterm.Implicit >> + | Rawterm.Explicit -> <:expr< Rawterm.Explicit >> + +let mlexpr_of_binder_kind = function + | Topconstr.Default b -> <:expr< Topconstr.Default $mlexpr_of_binding_kind b$ >> + | Topconstr.TypeClass b -> <:expr< Topconstr.TypeClass $mlexpr_of_binding_kind b$ >> + let rec mlexpr_of_constr = function | Topconstr.CRef (Libnames.Ident (loc,id)) when is_meta (string_of_id id) -> anti loc (string_of_id id) @@ -132,13 +149,15 @@ let rec mlexpr_of_constr = function | Topconstr.CCoFix (loc,_,_) -> failwith "mlexpr_of_constr: TODO" | Topconstr.CArrow (loc,a,b) -> <:expr< Topconstr.CArrow $dloc$ $mlexpr_of_constr a$ $mlexpr_of_constr b$ >> - | Topconstr.CProdN (loc,l,a) -> <:expr< Topconstr.CProdN $dloc$ $mlexpr_of_list (mlexpr_of_pair (mlexpr_of_list (mlexpr_of_pair (fun _ -> dloc) mlexpr_of_name)) mlexpr_of_constr) l$ $mlexpr_of_constr a$ >> - | Topconstr.CLambdaN (loc,l,a) -> <:expr< Topconstr.CLambdaN $dloc$ $mlexpr_of_list (mlexpr_of_pair (mlexpr_of_list (mlexpr_of_pair (fun _ -> dloc) mlexpr_of_name)) mlexpr_of_constr) l$ $mlexpr_of_constr a$ >> + | Topconstr.CProdN (loc,l,a) -> <:expr< Topconstr.CProdN $dloc$ $mlexpr_of_list + (mlexpr_of_triple (mlexpr_of_list (mlexpr_of_pair (fun _ -> dloc) mlexpr_of_name)) mlexpr_of_binder_kind mlexpr_of_constr) l$ $mlexpr_of_constr a$ >> + | Topconstr.CLambdaN (loc,l,a) -> <:expr< Topconstr.CLambdaN $dloc$ $mlexpr_of_list (mlexpr_of_triple (mlexpr_of_list (mlexpr_of_pair (fun _ -> dloc) mlexpr_of_name)) mlexpr_of_binder_kind mlexpr_of_constr) l$ $mlexpr_of_constr a$ >> | Topconstr.CLetIn (loc,_,_,_) -> failwith "mlexpr_of_constr: TODO" | Topconstr.CAppExpl (loc,a,l) -> <:expr< Topconstr.CAppExpl $dloc$ $mlexpr_of_pair (mlexpr_of_option mlexpr_of_int) mlexpr_of_reference a$ $mlexpr_of_list mlexpr_of_constr l$ >> | Topconstr.CApp (loc,a,l) -> <:expr< Topconstr.CApp $dloc$ $mlexpr_of_pair (mlexpr_of_option mlexpr_of_int) mlexpr_of_constr a$ $mlexpr_of_list (mlexpr_of_pair mlexpr_of_constr (mlexpr_of_option (mlexpr_of_located mlexpr_of_explicitation))) l$ >> - | Topconstr.CCases (loc,_,_,_) -> failwith "mlexpr_of_constr: TODO" - | Topconstr.CHole loc -> <:expr< Topconstr.CHole $dloc$ >> + | Topconstr.CCases (loc,_,_,_,_) -> failwith "mlexpr_of_constr: TODO" + | Topconstr.CHole (loc, None) -> <:expr< Topconstr.CHole $dloc$ None >> + | Topconstr.CHole (loc, Some _) -> failwith "mlexpr_of_constr: TODO CHole (Some _)" | Topconstr.CNotation(_,ntn,l) -> <:expr< Topconstr.CNotation $dloc$ $mlexpr_of_string ntn$ $mlexpr_of_list mlexpr_of_constr l$ >> @@ -147,8 +166,7 @@ let rec mlexpr_of_constr = function | _ -> failwith "mlexpr_of_constr: TODO" let mlexpr_of_occ_constr = - mlexpr_of_pair (mlexpr_of_list (mlexpr_of_or_var mlexpr_of_int)) - mlexpr_of_constr + mlexpr_of_occurrences mlexpr_of_constr let mlexpr_of_red_expr = function | Rawterm.Red b -> <:expr< Rawterm.Red $mlexpr_of_bool b$ >> @@ -159,9 +177,8 @@ let mlexpr_of_red_expr = function | Rawterm.Lazy f -> <:expr< Rawterm.Lazy $mlexpr_of_red_flags f$ >> | Rawterm.Unfold l -> - let f1 = mlexpr_of_list (mlexpr_of_or_var mlexpr_of_int) in - let f2 = mlexpr_of_reference in - let f = mlexpr_of_list (mlexpr_of_pair f1 f2) in + let f1 = mlexpr_of_by_notation mlexpr_of_reference in + let f = mlexpr_of_list (mlexpr_of_occurrences f1) in <:expr< Rawterm.Unfold $f l$ >> | Rawterm.Fold l -> <:expr< Rawterm.Fold $mlexpr_of_list mlexpr_of_constr l$ >> @@ -220,19 +237,19 @@ let mlexpr_of_binding_kind = function | Rawterm.NoBindings -> <:expr< Rawterm.NoBindings >> +let mlexpr_of_binding = mlexpr_of_pair mlexpr_of_binding_kind mlexpr_of_constr + +let mlexpr_of_constr_with_binding = + mlexpr_of_pair mlexpr_of_constr mlexpr_of_binding_kind + let mlexpr_of_induction_arg = function | Tacexpr.ElimOnConstr c -> - <:expr< Tacexpr.ElimOnConstr $mlexpr_of_constr c$ >> + <:expr< Tacexpr.ElimOnConstr $mlexpr_of_constr_with_binding c$ >> | Tacexpr.ElimOnIdent (_,id) -> <:expr< Tacexpr.ElimOnIdent $dloc$ $mlexpr_of_ident id$ >> | Tacexpr.ElimOnAnonHyp n -> <:expr< Tacexpr.ElimOnAnonHyp $mlexpr_of_int n$ >> -let mlexpr_of_binding = mlexpr_of_pair mlexpr_of_binding_kind mlexpr_of_constr - -let mlexpr_of_constr_with_binding = - mlexpr_of_pair mlexpr_of_constr mlexpr_of_binding_kind - let mlexpr_of_clause_pattern _ = failwith "mlexpr_of_clause_pattern: TODO" let mlexpr_of_pattern_ast = mlexpr_of_constr @@ -278,37 +295,39 @@ let rec mlexpr_of_atomic_tactic = function <:expr< Tacexpr.TacExactNoCheck $mlexpr_of_constr c$ >> | Tacexpr.TacVmCastNoCheck c -> <:expr< Tacexpr.TacVmCastNoCheck $mlexpr_of_constr c$ >> - | Tacexpr.TacApply cb -> - <:expr< Tacexpr.TacApply $mlexpr_of_constr_with_binding cb$ >> - | Tacexpr.TacElim (cb,cbo) -> + | Tacexpr.TacApply (b,false,cb) -> + <:expr< Tacexpr.TacApply $mlexpr_of_bool b$ False $mlexpr_of_constr_with_binding cb$ >> + | Tacexpr.TacElim (false,cb,cbo) -> let cb = mlexpr_of_constr_with_binding cb in let cbo = mlexpr_of_option mlexpr_of_constr_with_binding cbo in - <:expr< Tacexpr.TacElim $cb$ $cbo$ >> + <:expr< Tacexpr.TacElim False $cb$ $cbo$ >> | Tacexpr.TacElimType c -> <:expr< Tacexpr.TacElimType $mlexpr_of_constr c$ >> - | Tacexpr.TacCase cb -> + | Tacexpr.TacCase (false,cb) -> let cb = mlexpr_of_constr_with_binding cb in - <:expr< Tacexpr.TacCase $cb$ >> + <:expr< Tacexpr.TacCase False $cb$ >> | Tacexpr.TacCaseType c -> <:expr< Tacexpr.TacCaseType $mlexpr_of_constr c$ >> | Tacexpr.TacFix (ido,n) -> let ido = mlexpr_of_ident_option ido in let n = mlexpr_of_int n in <:expr< Tacexpr.TacFix $ido$ $n$ >> - | Tacexpr.TacMutualFix (id,n,l) -> + | Tacexpr.TacMutualFix (b,id,n,l) -> + let b = mlexpr_of_bool b in let id = mlexpr_of_ident id in let n = mlexpr_of_int n in let f =mlexpr_of_triple mlexpr_of_ident mlexpr_of_int mlexpr_of_constr in let l = mlexpr_of_list f l in - <:expr< Tacexpr.TacMutualFix $id$ $n$ $l$ >> + <:expr< Tacexpr.TacMutualFix $b$ $id$ $n$ $l$ >> | Tacexpr.TacCofix ido -> let ido = mlexpr_of_ident_option ido in <:expr< Tacexpr.TacCofix $ido$ >> - | Tacexpr.TacMutualCofix (id,l) -> + | Tacexpr.TacMutualCofix (b,id,l) -> + let b = mlexpr_of_bool b in let id = mlexpr_of_ident id in let f = mlexpr_of_pair mlexpr_of_ident mlexpr_of_constr in let l = mlexpr_of_list f l in - <:expr< Tacexpr.TacMutualCofix $id$ $l$ >> + <:expr< Tacexpr.TacMutualCofix $b$ $id$ $l$ >> | Tacexpr.TacCut c -> <:expr< Tacexpr.TacCut $mlexpr_of_constr c$ >> @@ -317,29 +336,30 @@ let rec mlexpr_of_atomic_tactic = function <:expr< Tacexpr.TacAssert $mlexpr_of_option mlexpr_of_tactic t$ $ipat$ $mlexpr_of_constr c$ >> | Tacexpr.TacGeneralize cl -> - <:expr< Tacexpr.TacGeneralize $mlexpr_of_list mlexpr_of_constr cl$ >> + <:expr< Tacexpr.TacGeneralize + $mlexpr_of_list + (mlexpr_of_pair mlexpr_of_occ_constr mlexpr_of_name) cl$ >> | Tacexpr.TacGeneralizeDep c -> <:expr< Tacexpr.TacGeneralizeDep $mlexpr_of_constr c$ >> - | Tacexpr.TacLetTac (na,c,cl) -> + | Tacexpr.TacLetTac (na,c,cl,b) -> let na = mlexpr_of_name na in let cl = mlexpr_of_clause_pattern cl in - <:expr< Tacexpr.TacLetTac $na$ $mlexpr_of_constr c$ $cl$ >> + <:expr< Tacexpr.TacLetTac $na$ $mlexpr_of_constr c$ $cl$ + $mlexpr_of_bool b$ >> (* Derived basic tactics *) | Tacexpr.TacSimpleInduction h -> <:expr< Tacexpr.TacSimpleInduction ($mlexpr_of_quantified_hypothesis h$) >> - | Tacexpr.TacNewInduction (cl,cbo,ids) -> + | Tacexpr.TacNewInduction (false,cl,cbo,ids,cls) -> let cbo = mlexpr_of_option mlexpr_of_constr_with_binding cbo in let ids = mlexpr_of_intro_pattern ids in -(* let ids = mlexpr_of_option mlexpr_of_intro_pattern ids in *) -(* <:expr< Tacexpr.TacNewInduction $mlexpr_of_induction_arg c$ $cbo$ $ids$>> *) - <:expr< Tacexpr.TacNewInduction $mlexpr_of_list mlexpr_of_induction_arg cl$ $cbo$ $ids$>> + <:expr< Tacexpr.TacNewInduction False $mlexpr_of_list mlexpr_of_induction_arg cl$ $cbo$ $ids$ $mlexpr_of_option mlexpr_of_clause cls$ >> | Tacexpr.TacSimpleDestruct h -> <:expr< Tacexpr.TacSimpleDestruct $mlexpr_of_quantified_hypothesis h$ >> - | Tacexpr.TacNewDestruct (c,cbo,ids) -> + | Tacexpr.TacNewDestruct (false,c,cbo,ids,cls) -> let cbo = mlexpr_of_option mlexpr_of_constr_with_binding cbo in let ids = mlexpr_of_intro_pattern ids in - <:expr< Tacexpr.TacNewDestruct $mlexpr_of_list mlexpr_of_induction_arg c$ $cbo$ $ids$ >> + <:expr< Tacexpr.TacNewDestruct False $mlexpr_of_list mlexpr_of_induction_arg c$ $cbo$ $ids$ $mlexpr_of_option mlexpr_of_clause cls$ >> (* Context management *) | Tacexpr.TacClear (b,l) -> @@ -354,18 +374,18 @@ let rec mlexpr_of_atomic_tactic = function $mlexpr_of_hyp id2$ >> (* Constructors *) - | Tacexpr.TacLeft l -> - <:expr< Tacexpr.TacLeft $mlexpr_of_binding_kind l$>> - | Tacexpr.TacRight l -> - <:expr< Tacexpr.TacRight $mlexpr_of_binding_kind l$>> - | Tacexpr.TacSplit (b,l) -> + | Tacexpr.TacLeft (ev,l) -> + <:expr< Tacexpr.TacLeft $mlexpr_of_bool ev$ $mlexpr_of_binding_kind l$>> + | Tacexpr.TacRight (ev,l) -> + <:expr< Tacexpr.TacRight $mlexpr_of_bool ev$ $mlexpr_of_binding_kind l$>> + | Tacexpr.TacSplit (ev,b,l) -> <:expr< Tacexpr.TacSplit - ($mlexpr_of_bool b$,$mlexpr_of_binding_kind l$)>> - | Tacexpr.TacAnyConstructor t -> - <:expr< Tacexpr.TacAnyConstructor $mlexpr_of_option mlexpr_of_tactic t$>> - | Tacexpr.TacConstructor (n,l) -> + ($mlexpr_of_bool ev$,$mlexpr_of_bool b$,$mlexpr_of_binding_kind l$)>> + | Tacexpr.TacAnyConstructor (ev,t) -> + <:expr< Tacexpr.TacAnyConstructor $mlexpr_of_bool ev$ $mlexpr_of_option mlexpr_of_tactic t$>> + | Tacexpr.TacConstructor (ev,n,l) -> let n = mlexpr_of_or_metaid mlexpr_of_int n in - <:expr< Tacexpr.TacConstructor $n$ $mlexpr_of_binding_kind l$>> + <:expr< Tacexpr.TacConstructor $mlexpr_of_bool ev$ $n$ $mlexpr_of_binding_kind l$>> (* Conversion *) | Tacexpr.TacReduce (r,cl) -> @@ -403,8 +423,8 @@ let rec mlexpr_of_atomic_tactic = function and mlexpr_of_tactic : (Tacexpr.raw_tactic_expr -> MLast.expr) = function | Tacexpr.TacAtom (loc,t) -> <:expr< Tacexpr.TacAtom $dloc$ $mlexpr_of_atomic_tactic t$ >> - | Tacexpr.TacThen (t1,t2) -> - <:expr< Tacexpr.TacThen $mlexpr_of_tactic t1$ $mlexpr_of_tactic t2$ >> + | Tacexpr.TacThen (t1,[||],t2,[||]) -> + <:expr< Tacexpr.TacThen $mlexpr_of_tactic t1$ [||] $mlexpr_of_tactic t2$ [||]>> | Tacexpr.TacThens (t,tl) -> <:expr< Tacexpr.TacThens $mlexpr_of_tactic t$ $mlexpr_of_list mlexpr_of_tactic tl$>> | Tacexpr.TacFirst tl -> @@ -431,13 +451,12 @@ and mlexpr_of_tactic : (Tacexpr.raw_tactic_expr -> MLast.expr) = function | Tacexpr.TacRec (id,(idl,t)) -> TacRec (loc,(id,(idl,f t))) | Tacexpr.TacRecIn (l,t) -> TacRecIn(loc,List.map (fun (id,t) -> (id,f t)) l,f t) *) - | Tacexpr.TacLetIn (l,t) -> + | Tacexpr.TacLetIn (isrec,l,t) -> let f = - mlexpr_of_triple + mlexpr_of_pair (mlexpr_of_pair (fun _ -> dloc) mlexpr_of_ident) - (mlexpr_of_option mlexpr_of_tactic) mlexpr_of_tactic_arg in - <:expr< Tacexpr.TacLetIn $mlexpr_of_list f l$ $mlexpr_of_tactic t$ >> + <:expr< Tacexpr.TacLetIn $mlexpr_of_bool isrec$ $mlexpr_of_list f l$ $mlexpr_of_tactic t$ >> | Tacexpr.TacMatch (lz,t,l) -> <:expr< Tacexpr.TacMatch $mlexpr_of_bool lz$ @@ -453,19 +472,15 @@ and mlexpr_of_tactic : (Tacexpr.raw_tactic_expr -> MLast.expr) = function <:expr< Tacexpr.TacFun ($mlexpr_of_list mlexpr_of_ident_option idol$, $mlexpr_of_tactic body$) >> -(* - | Tacexpr.TacFunRec of $dloc$ * identifier * tactic_fun_ast -*) -(* - | Tacexpr.TacArg (Tacexpr.AstTacArg (Coqast.Nmeta $dloc$ id)) -> anti loc id -*) - | Tacexpr.TacArg (Tacexpr.MetaIdArg (_,id)) -> anti loc id + | Tacexpr.TacArg (Tacexpr.MetaIdArg (_,true,id)) -> anti loc id | Tacexpr.TacArg t -> <:expr< Tacexpr.TacArg $mlexpr_of_tactic_arg t$ >> | _ -> failwith "Quotation of tactic expressions: TODO" and mlexpr_of_tactic_arg = function - | Tacexpr.MetaIdArg (loc,id) -> anti loc id + | Tacexpr.MetaIdArg (loc,true,id) -> anti loc id + | Tacexpr.MetaIdArg (loc,false,id) -> + <:expr< Tacexpr.ConstrMayEval (Rawterm.ConstrTerm $anti loc id$) >> | Tacexpr.TacCall (loc,t,tl) -> <:expr< Tacexpr.TacCall $dloc$ $mlexpr_of_reference t$ $mlexpr_of_list mlexpr_of_tactic_arg tl$>> | Tacexpr.Tacexp t -> diff --git a/parsing/q_util.ml4 b/parsing/q_util.ml4 index 552c144a..da78e287 100644 --- a/parsing/q_util.ml4 +++ b/parsing/q_util.ml4 @@ -6,7 +6,9 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: q_util.ml4 10087 2007-08-24 10:39:30Z herbelin $ *) +(*i camlp4use: "q_MLast.cmo" i*) + +(* $Id: q_util.ml4 10091 2007-08-24 10:57:37Z herbelin $ *) (* This file defines standard combinators to build ml expressions *) diff --git a/parsing/search.ml b/parsing/search.ml index 28362d72..c375826c 100644 --- a/parsing/search.ml +++ b/parsing/search.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: search.ml 9310 2006-10-28 19:35:09Z herbelin $ *) +(* $Id: search.ml 10840 2008-04-23 21:29:34Z herbelin $ *) open Pp open Util @@ -50,17 +50,17 @@ let gen_crible refopt (fn : global_reference -> env -> constr -> unit) = let crible_rec (sp,_) lobj = match object_tag lobj with | "VARIABLE" -> (try - let (idc,_,typ) = get_variable (basename sp) in + let (id,_,typ) = Global.lookup_named (basename sp) in if refopt = None - || head_const typ = constr_of_global (out_some refopt) + || head_const typ = constr_of_global (Option.get refopt) then - fn (VarRef idc) env typ + fn (VarRef id) env typ with Not_found -> (* we are in a section *) ()) | "CONSTANT" -> let cst = locate_constant (qualid_of_sp sp) in let typ = Typeops.type_of_constant env cst in if refopt = None - || head_const typ = constr_of_global (out_some refopt) + || head_const typ = constr_of_global (Option.get refopt) then fn (ConstRef cst) env typ | "INDUCTIVE" -> @@ -214,7 +214,8 @@ let search_about_item (itemref,typ) = function let raw_search_about filter_modules display_function l = let filter ref' env typ = filter_modules ref' env typ && - List.for_all (search_about_item (ref',typ)) l + List.for_all (search_about_item (ref',typ)) l && + not (string_string_contains (name_of_reference ref') "_subproof") in gen_filtered_search filter display_function diff --git a/parsing/tacextend.ml4 b/parsing/tacextend.ml4 index 2dfe489e..3d71af84 100644 --- a/parsing/tacextend.ml4 +++ b/parsing/tacextend.ml4 @@ -6,7 +6,9 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: tacextend.ml4 10089 2007-08-24 10:49:43Z herbelin $ *) +(*i camlp4use: "pa_extend.cmo q_MLast.cmo" i*) + +(* $Id: tacextend.ml4 10091 2007-08-24 10:57:37Z herbelin $ *) open Util open Genarg @@ -64,7 +66,7 @@ let rec extract_signature = function let check_unicity s l = let l' = List.map (fun (l,_) -> extract_signature l) l in if not (Util.list_distinct l') then - Pp.warning_with Pp_control.err_ft + Pp.warning_with !Pp_control.err_ft ("Two distinct rules of tactic entry "^s^" have the same\n"^ "non-terminals in the same order: put them in distinct tactic entries") diff --git a/parsing/tactic_printer.ml b/parsing/tactic_printer.ml index 1fef688c..c5b77774 100644 --- a/parsing/tactic_printer.ml +++ b/parsing/tactic_printer.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: tactic_printer.ml 9593 2007-02-05 13:58:52Z corbinea $ *) +(* $Id: tactic_printer.ml 11146 2008-06-19 08:26:38Z corbinea $ *) open Pp open Util @@ -34,7 +34,7 @@ let pr_rule = function | Nested(cmpd,_) -> begin match cmpd with - Tactic (texp,_) -> hov 0 (pr_tactic texp) + | Tactic (texp,_) -> hov 0 (pr_tactic texp) | Proof_instr (_,instr) -> hov 0 (pr_proof_instr instr) end | Daimon -> str "" @@ -46,10 +46,20 @@ let uses_default_tac = function (* Does not print change of evars *) let pr_rule_dot = function - | Prim Change_evars -> mt () + | Prim Change_evars ->str "PC: ch_evars" ++ mt () + (* PC: this might be redundant *) | r -> pr_rule r ++ if uses_default_tac r then str "..." else str"." +let pr_rule_dot_fnl = function + | Nested (Tactic (TacAtom (_,(TacMutualFix (true,_,_,_) + | TacMutualCofix (true,_,_))),_),_) -> + (* Very big hack to not display hidden tactics in "Theorem with" *) + (* (would not scale!) *) + mt () + | Prim Change_evars -> mt () + | r -> pr_rule_dot r ++ fnl () + exception Different (* We remove from the var context of env what is already in osign *) @@ -88,40 +98,39 @@ let rec print_decl_script tac_printer nochange sigma pf = else pr_change pf.goal) ++ fnl () - | Some (Daimon,[]) -> mt () - | Some (Prim Change_evars,[next]) -> - (* ignore evar changes *) - print_decl_script tac_printer nochange sigma next + | Some (Daimon,[]) -> str "(* Some proof has been skipped here *)" + | Some (Prim Change_evars,[subpf]) -> + print_decl_script tac_printer nochange sigma subpf | Some (Nested(Proof_instr (opened,instr),_) as rule,subprfs) -> begin match instr.instr,subprfs with Pescape,[{ref=Some(_,subsubprfs)}] -> hov 7 - (pr_rule_dot rule ++ fnl () ++ + (pr_rule_dot_fnl rule ++ prlist_with_sep pr_fnl tac_printer subsubprfs) ++ fnl () ++ if opened then mt () else str "return." | Pclaim _,[body;cont] -> hov 2 - (pr_rule_dot rule ++ fnl () ++ + (pr_rule_dot_fnl rule ++ print_decl_script tac_printer nochange sigma body) ++ fnl () ++ if opened then mt () else str "end claim." ++ fnl () ++ print_decl_script tac_printer nochange sigma cont | Pfocus _,[body;cont] -> hov 2 - (pr_rule_dot rule ++ fnl () ++ + (pr_rule_dot_fnl rule ++ print_decl_script tac_printer nochange sigma body) ++ fnl () ++ if opened then mt () else str "end focus." ++ fnl () ++ print_decl_script tac_printer nochange sigma cont | (Psuppose _ |Pcase (_,_,_)),[body;cont] -> hov 2 - (pr_rule_dot rule ++ fnl () ++ + (pr_rule_dot_fnl rule ++ print_decl_script tac_printer nochange sigma body) ++ fnl () ++ print_decl_script tac_printer nochange sigma cont | _,[next] -> - pr_rule_dot rule ++ fnl () ++ + pr_rule_dot_fnl rule ++ print_decl_script tac_printer nochange sigma next | _,[] -> pr_rule_dot rule @@ -156,30 +165,28 @@ let rec print_script nochange sigma pf = (print_script nochange sigma) spfl ) | Some(rule,spfl) -> ((if nochange then (mt ()) else (pr_change pf.goal ++ fnl ())) ++ - pr_rule_dot rule ++ fnl () ++ + pr_rule_dot_fnl rule ++ prlist_with_sep pr_fnl (print_script nochange sigma) spfl ) (* printed by Show Script command *) let print_treescript nochange sigma pf = - let rec aux top pf = + let rec aux pf = match pf.ref with | None -> if nochange then - if pf.goal.evar_extra=None then - (str"") - else (str"") - else - (pr_change pf.goal) + if pf.goal.evar_extra=None then str"" + else str"" + else pr_change pf.goal | Some(Decl_proof opened,script) -> assert (List.length script = 1); begin - if nochange then (mt ()) else (pr_change pf.goal ++ fnl ()) + if nochange then mt () else pr_change pf.goal ++ fnl () end ++ hov 0 begin str "proof." ++ fnl () ++ - print_decl_script (aux false) + print_decl_script aux nochange sigma (List.hd script) end ++ fnl () ++ begin @@ -190,22 +197,10 @@ let print_treescript nochange sigma pf = prlist_with_sep pr_fnl (print_script nochange sigma) spfl ) | Some(r,spfl) -> + let indent = if List.length spfl >= 2 then 1 else 0 in (if nochange then mt () else (pr_change pf.goal ++ fnl ())) ++ - pr_rule_dot r ++ - begin - if List.length spfl > 1 then - fnl () ++ - str " " ++ hov 0 (aux false (List.hd spfl)) ++ fnl () ++ - hov 0 (prlist_with_sep fnl (aux false) (List.tl spfl)) - else - match spfl with - | [] -> mt () - | [spf] -> fnl () ++ - (if top then mt () else str " ") ++ aux top spf - | _ -> fnl () ++ str " " ++ - hov 0 (prlist_with_sep fnl (aux false) spfl) - end - in hov 0 (aux true pf) + hv indent (pr_rule_dot_fnl r ++ prlist_with_sep mt aux spfl) + in hov 0 (aux pf) let rec print_info_script sigma osign pf = let {evar_hyps=sign; evar_concl=cl} = pf.goal in diff --git a/parsing/tactic_printer.mli b/parsing/tactic_printer.mli index b1f6d41c..676dbdf2 100644 --- a/parsing/tactic_printer.mli +++ b/parsing/tactic_printer.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: tactic_printer.mli 9154 2006-09-20 17:18:18Z corbinea $ i*) +(*i $Id: tactic_printer.mli 10580 2008-02-22 13:39:13Z lmamane $ i*) (*i*) open Pp @@ -21,6 +21,7 @@ open Proof_type val print_proof : evar_map -> named_context -> proof_tree -> std_ppcmds val pr_rule : rule -> std_ppcmds val pr_tactic : tactic_expr -> std_ppcmds +val pr_proof_instr : Decl_expr.proof_instr -> Pp.std_ppcmds val print_script : bool -> evar_map -> proof_tree -> std_ppcmds val print_treescript : diff --git a/parsing/vernacextend.ml4 b/parsing/vernacextend.ml4 index 4847f385..d12ca098 100644 --- a/parsing/vernacextend.ml4 +++ b/parsing/vernacextend.ml4 @@ -6,7 +6,9 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: vernacextend.ml4 10089 2007-08-24 10:49:43Z herbelin $ *) +(*i camlp4use: "pa_extend.cmo q_MLast.cmo" i*) + +(* $Id: vernacextend.ml4 10091 2007-08-24 10:57:37Z herbelin $ *) open Util open Genarg @@ -56,7 +58,7 @@ let rec extract_signature = function let check_unicity s l = let l' = List.map (fun (_,l,_) -> extract_signature l) l in if not (Util.list_distinct l') then - Pp.warning_with Pp_control.err_ft + Pp.warning_with !Pp_control.err_ft ("Two distinct rules of entry "^s^" have the same\n"^ "non-terminals in the same order: put them in distinct vernac entries") diff --git a/pretyping/cases.ml b/pretyping/cases.ml index 1f7bdad3..1d7da3f3 100644 --- a/pretyping/cases.ml +++ b/pretyping/cases.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: cases.ml 10071 2007-08-10 15:34:41Z herbelin $ *) +(* $Id: cases.ml 11085 2008-06-10 08:54:43Z herbelin $ *) open Util open Names @@ -20,12 +20,12 @@ open Sign open Reductionops open Typeops open Type_errors - open Rawterm open Retyping open Pretype_errors open Evarutil open Evarconv +open Evd (* Pattern-matching errors *) @@ -63,16 +63,48 @@ let error_wrong_predicate_arity_loc loc env c n1 n2 = let error_needs_inversion env x t = raise (PatternMatchingError (env, NeedsInversion (x,t))) +(**********************************************************************) +(* Functions to deal with impossible cases *) + +let impossible_default_case = ref None + +let set_impossible_default_clause c = impossible_default_case := Some c + +let coq_unit_judge = + let na1 = Name (id_of_string "A") in + let na2 = Name (id_of_string "H") in + fun () -> + match !impossible_default_case with + | Some (id,type_of_id) -> + make_judge id type_of_id + | None -> + (* In case the constants id/ID are not defined *) + make_judge (mkLambda (na1,mkProp,mkLambda(na2,mkRel 1,mkRel 1))) + (mkProd (na1,mkProp,mkArrow (mkRel 1) (mkRel 2))) + +(**********************************************************************) + module type S = sig val compile_cases : - loc -> - (type_constraint -> env -> rawconstr -> unsafe_judgment) * - Evd.evar_defs ref -> + loc -> case_style -> + (type_constraint -> env -> evar_defs ref -> rawconstr -> unsafe_judgment) * evar_defs ref -> type_constraint -> - env -> rawconstr option * tomatch_tuple * cases_clauses -> + env -> rawconstr option * tomatch_tuples * cases_clauses -> unsafe_judgment end +let rec list_try_compile f = function + | [a] -> f a + | [] -> anomaly "try_find_f" + | h::t -> + try f h + with UserError _ | TypeError _ | PretypeError _ + | Stdpp.Exc_located (_,(UserError _ | TypeError _ | PretypeError _)) -> + list_try_compile f t + +let force_name = + let nx = Name (id_of_string "x") in function Anonymous -> nx | na -> na + (************************************************************************) (* Pattern-matching compilation (Cases) *) (************************************************************************) @@ -86,8 +118,8 @@ let mssg_may_need_inversion () = str "Found a matching with no clauses on a term unknown to have an empty inductive type" (* Utils *) -let make_anonymous_patvars = - list_tabulate (fun _ -> PatVar (dummy_loc,Anonymous)) +let make_anonymous_patvars n = + list_make n (PatVar (dummy_loc,Anonymous)) (* Environment management *) let push_rels vars env = List.fold_right push_rel vars env @@ -112,77 +144,53 @@ type alias_constr = let mkSpecialLetInJudge j (na,(deppat,nondeppat,d,t)) = { uj_val = - (match d with - | DepAlias -> mkLetIn (na,deppat,t,j.uj_val) - | NonDepAlias -> - if (not (dependent (mkRel 1) j.uj_type)) - or (* A leaf: *) isRel deppat - then - (* The body of pat is not needed to type j - see *) - (* insert_aliases - and both deppat and nondeppat have the *) - (* same type, then one can freely substitute one by the other *) - subst1 nondeppat j.uj_val - else - (* The body of pat is not needed to type j but its value *) - (* is dependent in the type of j; our choice is to *) - (* enforce this dependency *) - mkLetIn (na,deppat,t,j.uj_val)); + if + isRel deppat or not (dependent (mkRel 1) j.uj_val) or + d = NonDepAlias & not (dependent (mkRel 1) j.uj_type) + then + (* The body of pat is not needed to type j - see *) + (* insert_aliases - and both deppat and nondeppat have the *) + (* same type, then one can freely substitute one by the other *) + subst1 nondeppat j.uj_val + else + (* The body of pat is not needed to type j but its value *) + (* is dependent in the type of j; our choice is to *) + (* enforce this dependency *) + mkLetIn (na,deppat,t,j.uj_val); uj_type = subst1 deppat j.uj_type } (**********************************************************************) (* Structures used in compiling pattern-matching *) -type 'a lifted = int * 'a - -let insert_lifted a = (0,a);; -type rhs = +type 'a rhs = { rhs_env : env; + rhs_vars : identifier list; avoid_ids : identifier list; - rhs_lift : int; - it : rawconstr } + it : 'a option} -type equation = - { dependencies : constr lifted list; - patterns : cases_pattern list; - rhs : rhs; +type 'a equation = + { patterns : cases_pattern list; + rhs : 'a rhs; alias_stack : name list; eqn_loc : loc; - used : bool ref; - tag : pattern_source } + used : bool ref } + +type 'a matrix = 'a equation list -type matrix = equation list +type dep_status = KnownDep | KnownNotDep | DepUnknown (* 1st argument of IsInd is the original ind before extracting the summary *) type tomatch_type = - | IsInd of types * inductive_type + | IsInd of types * inductive_type * name list | NotInd of constr option * types type tomatch_status = - | Pushed of ((constr * tomatch_type) * int list) + | Pushed of ((constr * tomatch_type) * int list * (name * dep_status)) | Alias of (constr * constr * alias_constr * constr) | Abstract of rel_declaration type tomatch_stack = tomatch_status list -(* The type [predicate_signature] types the terms to match and the rhs: - - - [PrLetIn (names,dep,pred)] types a pushed term ([Pushed]), - if dep<>Anonymous, the term is dependent, let n=|names|, if - n<>0 then the type of the pushed term is necessarily an - inductive with n real arguments. Otherwise, it may be - non inductive, or inductive without real arguments, or inductive - originating from a subterm in which case real args are not dependent; - it accounts for n+1 binders if dep or n binders if not dep - - [PrProd] types abstracted term ([Abstract]); it accounts for one binder - - [PrCcl] types the right-hand-side - - Aliases [Alias] have no trace in [predicate_signature] -*) - -type predicate_signature = - | PrLetIn of (name list * name) * predicate_signature - | PrProd of predicate_signature - | PrCcl of constr - (* We keep a constr for aliases and a cases_pattern for error message *) type alias_builder = @@ -251,7 +259,7 @@ let push_history_pattern n current cont = (* A pattern-matching problem has the following form: - env, isevars |- Cases tomatch of mat end + env, evd |- Cases tomatch of mat end where tomatch is some sequence of "instructions" (t1 ... tn) @@ -281,15 +289,17 @@ let push_history_pattern n current cont = of variables). *) -type pattern_matching_problem = - { env : env; - isevars : Evd.evar_defs ref; - pred : predicate_signature option; - tomatch : tomatch_stack; - history : pattern_continuation; - mat : matrix; - caseloc : loc; - typing_function: type_constraint -> env -> rawconstr -> unsafe_judgment } + +type 'a pattern_matching_problem = + { env : env; + evdref : evar_defs ref; + pred : constr; + tomatch : tomatch_stack; + history : pattern_continuation; + mat : 'a matrix; + caseloc : loc; + casestyle : case_style; + typing_function: type_constraint -> env -> evar_defs ref -> 'a option -> unsafe_judgment } (*--------------------------------------------------------------------------* * A few functions to infer the inductive type from the patterns instead of * @@ -312,123 +322,129 @@ let rec find_row_ind = function | PatVar _ :: l -> find_row_ind l | PatCstr(loc,c,_,_) :: _ -> Some (loc,c) -let inductive_template isevars env tmloc ind = +let inductive_template evdref env tmloc ind = let arsign = get_full_arity_sign env ind in let hole_source = match tmloc with - | Some loc -> fun i -> (loc, Evd.TomatchTypeParameter (ind,i)) - | None -> fun _ -> (dummy_loc, Evd.InternalHole) in + | Some loc -> fun i -> (loc, TomatchTypeParameter (ind,i)) + | None -> fun _ -> (dummy_loc, InternalHole) in let (_,evarl,_) = List.fold_right (fun (na,b,ty) (subst,evarl,n) -> match b with | None -> let ty' = substl subst ty in - let e = e_new_evar isevars env ~src:(hole_source n) ty' in + let e = e_new_evar evdref env ~src:(hole_source n) ty' in (e::subst,e::evarl,n+1) | Some b -> (b::subst,evarl,n+1)) arsign ([],[],1) in applist (mkInd ind,List.rev evarl) -let inh_coerce_to_ind isevars env ty tyi = - let expected_typ = inductive_template isevars env None tyi in - (* devrait être indifférent d'exiger leq ou pas puisque pour - un inductif cela doit être égal *) - let _ = e_cumul env isevars expected_typ ty in () +let try_find_ind env sigma typ realnames = + let (IndType(_,realargs) as ind) = find_rectype env sigma typ in + let names = + match realnames with + | Some names -> names + | None -> list_make (List.length realargs) Anonymous in + IsInd (typ,ind,names) -let unify_tomatch_with_patterns isevars env loc typ pats = + +let inh_coerce_to_ind evdref env ty tyi = + let expected_typ = inductive_template evdref env None tyi in + (* devrait être indifférent d'exiger leq ou pas puisque pour + un inductif cela doit être égal *) + let _ = e_cumul env evdref expected_typ ty in () + +let unify_tomatch_with_patterns evdref env loc typ pats realnames = match find_row_ind pats with | None -> NotInd (None,typ) | Some (_,(ind,_)) -> - inh_coerce_to_ind isevars env typ ind; - try IsInd (typ,find_rectype env (Evd.evars_of !isevars) typ) + inh_coerce_to_ind evdref env typ ind; + try try_find_ind env (evars_of !evdref) typ realnames with Not_found -> NotInd (None,typ) -let find_tomatch_tycon isevars env loc = function +let find_tomatch_tycon evdref env loc = function (* Try if some 'in I ...' is present and can be used as a constraint *) - | Some (_,ind,_,_) -> mk_tycon (inductive_template isevars env loc ind) - | None -> empty_tycon + | Some (_,ind,_,realnal) -> + mk_tycon (inductive_template evdref env loc ind),Some (List.rev realnal) + | None -> + empty_tycon,None -let coerce_row typing_fun isevars env pats (tomatch,(_,indopt)) = +let coerce_row typing_fun evdref env pats (tomatch,(_,indopt)) = let loc = Some (loc_of_rawconstr tomatch) in - let tycon = find_tomatch_tycon isevars env loc indopt in - let j = typing_fun tycon env tomatch in - let typ = nf_evar (Evd.evars_of !isevars) j.uj_type in + let tycon,realnames = find_tomatch_tycon evdref env loc indopt in + let j = typing_fun tycon env evdref tomatch in + let typ = nf_evar (evars_of !evdref) j.uj_type in let t = - try IsInd (typ,find_rectype env (Evd.evars_of !isevars) typ) + try try_find_ind env (evars_of !evdref) typ realnames with Not_found -> - unify_tomatch_with_patterns isevars env loc typ pats in + unify_tomatch_with_patterns evdref env loc typ pats realnames in (j.uj_val,t) -let coerce_to_indtype typing_fun isevars env matx tomatchl = +let coerce_to_indtype typing_fun evdref env matx tomatchl = let pats = List.map (fun r -> r.patterns) matx in let matx' = match matrix_transpose pats with | [] -> List.map (fun _ -> []) tomatchl (* no patterns at all *) | m -> m in - List.map2 (coerce_row typing_fun isevars env) matx' tomatchl + List.map2 (coerce_row typing_fun evdref env) matx' tomatchl (************************************************************************) (* Utils *) -let mkExistential env ?(src=(dummy_loc,Evd.InternalHole)) isevars = - e_new_evar isevars env ~src:src (new_Type ()) +let mkExistential env ?(src=(dummy_loc,InternalHole)) evdref = + e_new_evar evdref env ~src:src (new_Type ()) -let evd_comb2 f isevars x y = - let (evd',y) = f !isevars x y in - isevars := evd'; +let evd_comb2 f evdref x y = + let (evd',y) = f !evdref x y in + evdref := evd'; y module Cases_F(Coercion : Coercion.S) : S = struct -let adjust_tomatch_to_pattern pb ((current,typ),deps) = +let adjust_tomatch_to_pattern pb ((current,typ),deps,dep) = (* Ideally, we could find a common inductive type to which both the term to match and the patterns coerce *) (* In practice, we coerce the term to match if it is not already an inductive type and it is not dependent; moreover, we use only the first pattern type and forget about the others *) - let typ = match typ with IsInd (t,_) -> t | NotInd (_,t) -> t in + let typ,names = + match typ with IsInd(t,_,names) -> t,Some names | NotInd(_,t) -> t,None in let typ = - try IsInd (typ,find_rectype pb.env (Evd.evars_of !(pb.isevars)) typ) + try try_find_ind pb.env (evars_of !(pb.evdref)) typ names with Not_found -> NotInd (None,typ) in - let tomatch = ((current,typ),deps) in + let tomatch = ((current,typ),deps,dep) in match typ with | NotInd (None,typ) -> let tm1 = List.map (fun eqn -> List.hd eqn.patterns) pb.mat in (match find_row_ind tm1 with | None -> tomatch | Some (_,(ind,_)) -> - let indt = inductive_template pb.isevars pb.env None ind in + let indt = inductive_template pb.evdref pb.env None ind in let current = if deps = [] & isEvar typ then (* Don't insert coercions if dependent; only solve evars *) - let _ = e_cumul pb.env pb.isevars indt typ in + let _ = e_cumul pb.env pb.evdref indt typ in current else (evd_comb2 (Coercion.inh_conv_coerce_to dummy_loc pb.env) - pb.isevars (make_judge current typ) (mk_tycon_type indt)).uj_val in - let sigma = Evd.evars_of !(pb.isevars) in - let typ = IsInd (indt,find_rectype pb.env sigma indt) in - ((current,typ),deps)) + pb.evdref (make_judge current typ) (mk_tycon_type indt)).uj_val in + let sigma = evars_of !(pb.evdref) in + let typ = try_find_ind pb.env sigma indt names in + ((current,typ),deps,dep)) | _ -> tomatch - (* extract some ind from [t], possibly coercing from constructors in [tm] *) -let to_mutind env isevars tm c t = -(* match c with - | Some body -> *) NotInd (c,t) -(* | None -> unify_tomatch_with_patterns isevars env t tm*) - let type_of_tomatch = function - | IsInd (t,_) -> t + | IsInd (t,_,_) -> t | NotInd (_,t) -> t let mkDeclTomatch na = function - | IsInd (t,_) -> (na,None,t) + | IsInd (t,_,_) -> (na,None,t) | NotInd (c,t) -> (na,c,t) let map_tomatch_type f = function - | IsInd (t,ind) -> IsInd (f t,map_inductive_type f ind) - | NotInd (c,t) -> NotInd (option_map f c, f t) + | IsInd (t,ind,names) -> IsInd (f t,map_inductive_type f ind,names) + | NotInd (c,t) -> NotInd (Option.map f c, f t) let liftn_tomatch_type n depth = map_tomatch_type (liftn n depth) let lift_tomatch_type n = liftn_tomatch_type n 1 @@ -464,25 +480,6 @@ let remove_current_pattern eqn = let prepend_pattern tms eqn = {eqn with patterns = tms@eqn.patterns } -(**********************************************************************) -(* Dealing with regular and default patterns *) -let is_regular eqn = eqn.tag = RegularPat - -let lower_pattern_status = function - | RegularPat -> DefaultPat 0 - | DefaultPat n -> DefaultPat (n+1) - -let pattern_status pats = - if array_exists ((=) RegularPat) pats then RegularPat - else - let min = - Array.fold_right - (fun pat n -> match pat with - | DefaultPat i when i i - | _ -> n) - pats 0 in - DefaultPat min - (**********************************************************************) (* Well-formedness tests *) (* Partial check on patterns *) @@ -541,7 +538,7 @@ let extract_rhs pb = | [] -> errorlabstrm "build_leaf" (mssg_may_need_inversion()) | eqn::_ -> set_used_pattern eqn; - eqn.tag, eqn.rhs + eqn.rhs (**********************************************************************) (* Functions to deal with matrix factorization *) @@ -549,23 +546,35 @@ let extract_rhs pb = let occur_in_rhs na rhs = match na with | Anonymous -> false - | Name id -> occur_rawconstr id rhs.it + | Name id -> List.mem id rhs.rhs_vars -let is_dep_patt eqn = function +let is_dep_patt_in eqn = function | PatVar (_,name) -> occur_in_rhs name eqn.rhs | PatCstr _ -> true -let dependencies_in_rhs nargs eqns = - if eqns = [] then list_tabulate (fun _ -> false) nargs (* Only "_" patts *) - else - let deps = List.map (fun (tms,eqn) -> List.map (is_dep_patt eqn) tms) eqns in - let columns = matrix_transpose deps in - List.map (List.exists ((=) true)) columns +let mk_dep_patt_row (pats,eqn) = + List.map (is_dep_patt_in eqn) pats + +let dependencies_in_pure_rhs nargs eqns = + if eqns = [] then list_make nargs false (* Only "_" patts *) else + let deps_rows = List.map mk_dep_patt_row eqns in + let deps_columns = matrix_transpose deps_rows in + List.map (List.exists ((=) true)) deps_columns let dependent_decl a = function | (na,None,t) -> dependent a t | (na,Some c,t) -> dependent a t || dependent a c +let rec dep_in_tomatch n = function + | (Pushed _ | Alias _) :: l -> dep_in_tomatch n l + | Abstract d :: l -> dependent_decl (mkRel n) d or dep_in_tomatch (n+1) l + | [] -> false + +let dependencies_in_rhs nargs current tms eqns = + match kind_of_term current with + | Rel n when dep_in_tomatch n tms -> list_make nargs true + | _ -> dependencies_in_pure_rhs nargs eqns + (* Computing the matrix of dependencies *) (* We are in context d1...dn |- and [find_dependencies k 1 nextlist] @@ -609,36 +618,41 @@ let find_dependencies_signature deps_in_rhs typs = let regeneralize_index_tomatch n = let rec genrec depth = function - | [] -> [] - | Pushed ((c,tm),l)::rest -> + | [] -> + [] + | Pushed ((c,tm),l,dep) :: rest -> let c = regeneralize_index n depth c in let tm = map_tomatch_type (regeneralize_index n depth) tm in let l = List.map (regeneralize_rel n depth) l in - Pushed ((c,tm),l)::(genrec depth rest) - | Alias (c1,c2,d,t)::rest -> - Alias (regeneralize_index n depth c1,c2,d,t)::(genrec depth rest) - | Abstract d::rest -> + Pushed ((c,tm),l,dep) :: genrec depth rest + | Alias (c1,c2,d,t) :: rest -> + Alias (regeneralize_index n depth c1,c2,d,t) :: genrec depth rest + | Abstract d :: rest -> Abstract (map_rel_declaration (regeneralize_index n depth) d) - ::(genrec (depth+1) rest) in + :: genrec (depth+1) rest in genrec 0 let rec replace_term n c k t = if t = mkRel (n+k) then lift k c else map_constr_with_binders succ (replace_term n c) k t +let length_of_tomatch_type_sign (dep,_) = function + | NotInd _ -> if dep<>Anonymous then 1 else 0 + | IsInd (_,_,names) -> List.length names + if dep<>Anonymous then 1 else 0 + let replace_tomatch n c = let rec replrec depth = function | [] -> [] - | Pushed ((b,tm),l)::rest -> + | Pushed ((b,tm),l,dep) :: rest -> let b = replace_term n c depth b in let tm = map_tomatch_type (replace_term n c depth) tm in List.iter (fun i -> if i=n+depth then anomaly "replace_tomatch") l; - Pushed ((b,tm),l)::(replrec depth rest) - | Alias (c1,c2,d,t)::rest -> - Alias (replace_term n c depth c1,c2,d,t)::(replrec depth rest) - | Abstract d::rest -> + Pushed ((b,tm),l,dep) :: replrec depth rest + | Alias (c1,c2,d,t) :: rest -> + Alias (replace_term n c depth c1,c2,d,t) :: replrec depth rest + | Abstract d :: rest -> Abstract (map_rel_declaration (replace_term n c depth) d) - ::(replrec (depth+1) rest) in + :: replrec (depth+1) rest in replrec 0 let liftn_rel_declaration n k = map_rel_declaration (liftn n k) @@ -646,11 +660,11 @@ let substnl_rel_declaration sigma k = map_rel_declaration (substnl sigma k) let rec liftn_tomatch_stack n depth = function | [] -> [] - | Pushed ((c,tm),l)::rest -> + | Pushed ((c,tm),l,dep)::rest -> let c = liftn n depth c in let tm = liftn_tomatch_type n depth tm in let l = List.map (fun i -> if i Alias (liftn n depth c1,liftn n depth c2,d,liftn n depth t) ::(liftn_tomatch_stack n depth rest) @@ -658,7 +672,6 @@ let rec liftn_tomatch_stack n depth = function Abstract (map_rel_declaration (liftn n depth) d) ::(liftn_tomatch_stack n (depth+1) rest) - let lift_tomatch_stack n = liftn_tomatch_stack n 1 (* if [current] has type [I(p1...pn u1...um)] and we consider the case @@ -686,7 +699,7 @@ let merge_name get_name obj = function let merge_names get_name = List.map2 (merge_name get_name) let get_names env sign eqns = - let names1 = list_tabulate (fun _ -> Anonymous) (List.length sign) in + let names1 = list_make (List.length sign) Anonymous in (* If any, we prefer names used in pats, from top to bottom *) let names2 = List.fold_right @@ -753,17 +766,17 @@ let insert_aliases_eqn sign eqnnames alias_rest eqn = rhs = {eqn.rhs with rhs_env = push_rels thissign eqn.rhs.rhs_env } } let insert_aliases env sigma alias eqns = - (* Là, y a une faiblesse, si un alias est utilisé dans un cas par *) - (* défaut présent mais inutile, ce qui est le cas général, l'alias *) - (* est introduit même s'il n'est pas utilisé dans les cas réguliers *) + (* Là, y a une faiblesse, si un alias est utilisé dans un cas par *) + (* défaut présent mais inutile, ce qui est le cas général, l'alias *) + (* est introduit même s'il n'est pas utilisé dans les cas réguliers *) let eqnsnames = List.map (fun eqn -> List.hd eqn.alias_stack) eqns in let alias_rests = List.map (fun eqn -> List.tl eqn.alias_stack) eqns in - (* names2 takes the meet of all needed aliases *) - let names2 = + (* name2 takes the meet of all needed aliases *) + let name2 = List.fold_right (merge_name (fun x -> x)) eqnsnames Anonymous in (* Only needed aliases are kept by build_aliases_context *) let eqnsnames, sign1, sign2, env = - build_aliases_context env sigma [names2] eqnsnames [alias] in + build_aliases_context env sigma [name2] eqnsnames [alias] in let eqns = list_map3 (insert_aliases_eqn sign1) eqnsnames alias_rests eqns in sign2, env, eqns @@ -771,28 +784,13 @@ let insert_aliases env sigma alias eqns = (* Functions to deal with elimination predicate *) exception Occur -let noccur_between_without_evar n m term = +let noccur_between_without_evar n m term = let rec occur_rec n c = match kind_of_term c with | Rel p -> if n<=p && p () | _ -> iter_constr_with_binders succ occur_rec n c in - try occur_rec n term; true with Occur -> false - -(* Infering the predicate *) -let prepare_unif_pb typ cs = - let n = List.length (assums_of_rel_context cs.cs_args) in - - (* We may need to invert ci if its parameters occur in typ *) - let typ' = - if noccur_between_without_evar 1 n typ then lift (-n) typ - else (* TODO4-1 *) - error "Unable to infer return clause of this pattern-matching problem" in - let args = extended_rel_list (-n) cs.cs_args in - let ci = applist (mkConstruct cs.cs_cstr, cs.cs_params@args) in - - (* This is the problem: finding P s.t. cs_args |- (P realargs ci) = typ' *) - (Array.map (lift (-n)) cs.cs_concl_realargs, ci, typ') + (m = 0) or (try occur_rec n term; true with Occur -> false) (* Infering the predicate *) @@ -823,8 +821,9 @@ the following n+1 equations: Some hints: -- Clearly, if xij occurs in Ti, then, a "match z with (Ci xi1..xipi) => ..." - should be inserted somewhere in Ti. +- Clearly, if xij occurs in Ti, then, a "match z with (Ci xi1..xipi) + => ..." or a "psi(yk)", with psi extracting xij from uik, should be + inserted somewhere in Ti. - If T is undefined, an easy solution is to insert a "match z with (Ci xi1..xipi) => ..." in front of each Ti @@ -834,111 +833,21 @@ Some hints: - The main problem is what to do when an existential variables is encountered -let prepare_unif_pb typ cs = - let n = cs.cs_nargs in - let _,p = decompose_prod_n n typ in - let ci = build_dependent_constructor cs in - (* This is the problem: finding P s.t. cs_args |- (P realargs ci) = p *) - (n, cs.cs_concl_realargs, ci, p) - -let eq_operator_lift k (n,n') = function - | OpRel p, OpRel p' when p > k & p' > k -> - if p < k+n or p' < k+n' then false else p - n = p' - n' - | op, op' -> op = op' - -let rec transpose_args n = - if n=0 then [] - else - (Array.map (fun l -> List.hd l) lv):: - (transpose_args (m-1) (Array.init (fun l -> List.tl l))) - -let shift_operator k = function OpLambda _ | OpProd _ -> k+1 | _ -> k - -let reloc_operator (k,n) = function OpRel p when p > k -> -let rec unify_clauses k pv = - let pv'= Array.map (fun (n,sign,_,p) -> n,splay_constr (whd_betaiotaevar (push_rels (List.rev sign) env) (Evd.evars_of isevars)) p) pv in - let n1,op1 = let (n1,(op1,args1)) = pv'.(0) in n1,op1 in - if Array.for_all (fun (ni,(opi,_)) -> eq_operator_lift k (n1,ni) (op1,opi)) pv' - then - let argvl = transpose_args (List.length args1) pv' in - let k' = shift_operator k op1 in - let argl = List.map (unify_clauses k') argvl in - gather_constr (reloc_operator (k,n1) op1) argl -*) - -let abstract_conclusion typ cs = - let n = List.length (assums_of_rel_context cs.cs_args) in - let (sign,p) = decompose_prod_n n typ in - lam_it p sign - -let infer_predicate loc env isevars typs cstrs indf = - (* Il faudra substituer les isevars a un certain moment *) - if Array.length cstrs = 0 then (* "TODO4-3" *) - error "Inference of annotation for empty inductive types not implemented" - else - (* Empiric normalization: p may depend in a irrelevant way on args of the*) - (* cstr as in [c:{_:Alpha & Beta}] match c with (existS a b)=>(a,b) end *) - let typs = - Array.map (local_strong (whd_betaevar empty_env (Evd.evars_of !isevars))) typs - in - let eqns = array_map2 prepare_unif_pb typs cstrs in - (* First strategy: no dependencies at all *) -(* - let (mis,_) = dest_ind_family indf in - let (cclargs,_,typn) = eqns.(mis_nconstr mis -1) in -*) - let (sign,_) = get_arity env indf in - let mtyp = - if array_exists is_Type typs then - (* Heuristic to avoid comparison between non-variables algebric univs*) - new_Type () - else - mkExistential env ~src:(loc, Evd.CasesType) isevars - in - if array_for_all (fun (_,_,typ) -> e_cumul env isevars typ mtyp) eqns - then - (* Non dependent case -> turn it into a (dummy) dependent one *) - let sign = (Anonymous,None,build_dependent_inductive env indf)::sign in - let pred = it_mkLambda_or_LetIn (lift (List.length sign) mtyp) sign in - (true,pred) (* true = dependent -- par défaut *) - else -(* - let s = get_sort_of env (evars_of isevars) typs.(0) in - let predpred = it_mkLambda_or_LetIn (mkSort s) sign in - let caseinfo = make_default_case_info mis in - let brs = array_map2 abstract_conclusion typs cstrs in - let predbody = mkCase (caseinfo, (nf_betaiota predpred), mkRel 1, brs) in - let pred = it_mkLambda_or_LetIn (lift (List.length sign) mtyp) sign in -*) - (* "TODO4-2" *) - (* We skip parameters *) - let cis = - Array.map - (fun cs -> - applist (mkConstruct cs.cs_cstr, extended_rel_list 0 cs.cs_args)) - cstrs in - let ct = array_map2 (fun ci (_,_,t) -> (ci,t)) cis eqns in - raise_pattern_matching_error (loc,env, CannotInferPredicate ct) -(* - (true,pred) *) (* Propagation of user-provided predicate through compilation steps *) -let rec map_predicate f k = function - | PrCcl ccl -> PrCcl (f k ccl) - | PrProd pred -> - PrProd (map_predicate f (k+1) pred) - | PrLetIn ((names,dep as tm),pred) -> - let k' = List.length names + (if dep<>Anonymous then 1 else 0) in - PrLetIn (tm, map_predicate f (k+k') pred) - -let rec noccurn_predicate k = function - | PrCcl ccl -> noccurn k ccl - | PrProd pred -> noccurn_predicate (k+1) pred - | PrLetIn ((names,dep),pred) -> - let k' = List.length names + (if dep<>Anonymous then 1 else 0) in - noccurn_predicate (k+k') pred +let rec map_predicate f k ccl = function + | [] -> f k ccl + | Pushed ((_,tm),_,dep) :: rest -> + let k' = length_of_tomatch_type_sign dep tm in + map_predicate f (k+k') ccl rest + | Alias _ :: rest -> + map_predicate f k ccl rest + | Abstract _ :: rest -> + map_predicate f (k+1) ccl rest + +let noccurn_predicate = map_predicate noccurn let liftn_predicate n = map_predicate (liftn n) @@ -949,26 +858,19 @@ let regeneralize_index_predicate n = map_predicate (regeneralize_index n) 0 let substnl_predicate sigma = map_predicate (substnl sigma) (* This is parallel bindings *) -let subst_predicate (args,copt) pred = +let subst_predicate (args,copt) ccl tms = let sigma = match copt with | None -> List.rev args | Some c -> c::(List.rev args) in - substnl_predicate sigma 0 pred - -let specialize_predicate_var (cur,typ) = function - | PrProd _ | PrCcl _ -> - anomaly "specialize_predicate_var: a pattern-variable must be pushed" - | PrLetIn (([],dep),pred) -> - subst_predicate ([],if dep<>Anonymous then Some cur else None) pred - | PrLetIn ((_,dep),pred) -> - (match typ with - | IsInd (_,IndType (_,realargs)) -> - subst_predicate (realargs,if dep<>Anonymous then Some cur else None) pred - | _ -> anomaly "specialize_predicate_var") - -let ungeneralize_predicate = function - | PrLetIn _ | PrCcl _ -> anomaly "ungeneralize_predicate: expects a product" - | PrProd pred -> pred + substnl_predicate sigma 0 ccl tms + +let specialize_predicate_var (cur,typ,dep) tms ccl = + let c = if dep<>Anonymous then Some cur else None in + let l = + match typ with + | IsInd (_,IndType(_,realargs),names) -> if names<>[] then realargs else [] + | NotInd _ -> [] in + subst_predicate (l,c) ccl tms (*****************************************************************************) (* We have pred = [X:=realargs;x:=c]P typed in Gamma1, x:I(realargs), Gamma2 *) @@ -979,85 +881,77 @@ let ungeneralize_predicate = function (* We first need to lift t(x) s.t. it is typed in Gamma, X:=rargs, x' *) (* then we have to replace x by x' in t(x) and y by y' in P *) (*****************************************************************************) -let generalize_predicate c ny d = function - | PrLetIn ((names,dep as tm),pred) -> - if dep=Anonymous then anomaly "Undetected dependency"; - let p = List.length names + 1 in - let pred = lift_predicate 1 pred in - let pred = regeneralize_index_predicate (ny+p+1) pred in - PrLetIn (tm, PrProd pred) - | PrProd _ | PrCcl _ -> - anomaly "generalize_predicate: expects a non trivial pattern" - -let rec extract_predicate l = function - | pred, Alias (deppat,nondeppat,_,_)::tms -> +let generalize_predicate (names,(nadep,_)) ny d tms ccl = + if nadep=Anonymous then anomaly "Undetected dependency"; + let p = List.length names + 1 in + let ccl = lift_predicate 1 ccl tms in + regeneralize_index_predicate (ny+p+1) ccl tms + +let rec extract_predicate l ccl = function + | Alias (deppat,nondeppat,_,_)::tms -> let tms' = match kind_of_term nondeppat with | Rel i -> replace_tomatch i deppat tms | _ -> (* initial terms are not dependent *) tms in - extract_predicate l (pred,tms') - | PrProd pred, Abstract d'::tms -> + extract_predicate l ccl tms' + | Abstract d'::tms -> let d' = map_rel_declaration (lift (List.length l)) d' in - substl l (mkProd_or_LetIn d' (extract_predicate [] (pred,tms))) - | PrLetIn (([],dep),pred), Pushed ((cur,_),_)::tms -> - extract_predicate (if dep<>Anonymous then cur::l else l) (pred,tms) - | PrLetIn ((_,dep),pred), Pushed ((cur,IsInd (_,(IndType(_,realargs)))),_)::tms -> + substl l (mkProd_or_LetIn d' (extract_predicate [] ccl tms)) + | Pushed ((cur,NotInd _),_,(dep,_))::tms -> + extract_predicate (if dep<>Anonymous then cur::l else l) ccl tms + | Pushed ((cur,IsInd (_,IndType(_,realargs),_)),_,(dep,_))::tms -> let l = List.rev realargs@l in - extract_predicate (if dep<>Anonymous then cur::l else l) (pred,tms) - | PrCcl ccl, [] -> + extract_predicate (if dep<>Anonymous then cur::l else l) ccl tms + | [] -> substl l ccl - | _ -> anomaly"extract_predicate: predicate inconsistent with terms to match" - -let abstract_predicate env sigma indf cur tms = function - | (PrProd _ | PrCcl _) -> anomaly "abstract_predicate: must be some LetIn" - | PrLetIn ((names,dep),pred) -> - let sign = make_arity_signature env true indf in - (* n is the number of real args + 1 *) - let n = List.length sign in - let tms = lift_tomatch_stack n tms in - let tms = - match kind_of_term cur with - | Rel i -> regeneralize_index_tomatch (i+n) tms - | _ -> (* Initial case *) tms in - (* Depending on whether the predicate is dependent or not, and has real - args or not, we lift it to make room for [sign] *) - (* Even if not intrinsically dep, we move the predicate into a dep one *) - let sign,q = - if names = [] & n <> 1 then - (* Real args were not considered *) - (if dep<>Anonymous then - (let (_,c,t) = List.hd sign in (dep,c,t)::List.tl sign) - else - sign),n - else - (* Real args are OK *) - (List.map2 (fun na (_,c,t) -> (na,c,t)) (dep::names) sign,1) in - let q,k = if dep <> Anonymous then (q-1,2) else (q,1) in - let pred = liftn_predicate q k pred in - let pred = extract_predicate [] (pred,tms) in - (true, it_mkLambda_or_LetIn_name env pred sign) - -let rec known_dependent = function - | None -> false - | Some (PrLetIn ((_,dep),_)) -> dep<>Anonymous - | Some (PrCcl _) -> false - | Some (PrProd _) -> - anomaly "known_dependent: can only be used when patterns remain" + +let abstract_predicate env sigma indf cur (names,(nadep,_)) tms ccl = + let sign = make_arity_signature env true indf in + (* n is the number of real args + 1 *) + let n = List.length sign in + let tms = lift_tomatch_stack n tms in + let tms = + match kind_of_term cur with + | Rel i -> regeneralize_index_tomatch (i+n) tms + | _ -> (* Initial case *) tms in + let sign = List.map2 (fun na (_,c,t) -> (na,c,t)) (nadep::names) sign in + let ccl = if nadep <> Anonymous then ccl else lift_predicate 1 ccl tms in + let pred = extract_predicate [] ccl tms in + it_mkLambda_or_LetIn_name env pred sign + +let known_dependent (_,dep) = (dep = KnownDep) (* [expand_arg] is used by [specialize_predicate] it replaces gamma, x1...xn, x1...xk |- pred by gamma, x1...xn, x1...xk-1 |- [X=realargs,xk=xk]pred (if dep) or by gamma, x1...xn, x1...xk-1 |- [X=realargs]pred (if not dep) *) -let expand_arg n alreadydep (na,t) deps (k,pred) = - (* current can occur in pred even if the original problem is not dependent *) - let dep = - if alreadydep<>Anonymous then alreadydep - else if deps = [] && noccurn_predicate 1 pred then Anonymous - else Name (id_of_string "x") in - let pred = if dep<>Anonymous then pred else lift_predicate (-1) pred in - (* There is no dependency in realargs for subpattern *) - (k-1, PrLetIn (([],dep), pred)) +let expand_arg tms ccl ((_,t),_,na) = + let k = length_of_tomatch_type_sign na t in + lift_predicate (k-1) ccl tms +let adjust_impossible_cases pb pred tomatch submat = + if submat = [] then + match kind_of_term (whd_evar (evars_of !(pb.evdref)) pred) with + | Evar (evk,_) when snd (evar_source evk !(pb.evdref)) = ImpossibleCase -> + let default = (coq_unit_judge ()).uj_type in + pb.evdref := Evd.evar_define evk default !(pb.evdref); + (* we add an "assert false" case *) + let pats = List.map (fun _ -> PatVar (dummy_loc,Anonymous)) tomatch in + let aliasnames = + map_succeed (function Alias _ -> Anonymous | _ -> failwith"") tomatch + in + [ { patterns = pats; + rhs = { rhs_env = pb.env; + rhs_vars = []; + avoid_ids = []; + it = None }; + alias_stack = Anonymous::aliasnames; + eqn_loc = dummy_loc; + used = ref false } ] + | _ -> + submat + else + submat (*****************************************************************************) (* pred = [X:=realargs;x:=c]P types the following problem: *) @@ -1073,37 +967,35 @@ let expand_arg n alreadydep (na,t) deps (k,pred) = (* s.t Gamma,x1'..xn' |- match Pushed(x1')..Pushed(xn') rest with..end :pred'*) (* *) (*****************************************************************************) -let specialize_predicate tomatchs deps cs = function - | (PrProd _ | PrCcl _) -> - anomaly "specialize_predicate: a matched pattern must be pushed" - | PrLetIn ((names,isdep),pred) -> - (* Assume some gamma st: gamma, (X,x:=realargs,copt) |- pred *) - let nrealargs = List.length names in - let k = nrealargs + (if isdep<>Anonymous then 1 else 0) in - (* We adjust pred st: gamma, x1..xn, (X,x:=realargs,copt) |- pred' *) - let n = cs.cs_nargs in - let pred' = liftn_predicate n (k+1) pred in - let argsi = if nrealargs <> 0 then Array.to_list cs.cs_concl_realargs else [] in - let copti = if isdep<>Anonymous then Some (build_dependent_constructor cs) else None in - (* The substituends argsi, copti are all defined in gamma, x1...xn *) - (* We need _parallel_ bindings to get gamma, x1...xn |- pred'' *) - let pred'' = subst_predicate (argsi, copti) pred' in - (* We adjust pred st: gamma, x1..xn, x1..xn |- pred'' *) - let pred''' = liftn_predicate n (n+1) pred'' in - (* We finally get gamma,x1..xn |- [X1,x1:=R1,x1]..[Xn,xn:=Rn,xn]pred'''*) - snd (List.fold_right2 (expand_arg n isdep) tomatchs deps (n,pred''')) - -let find_predicate loc env isevars p typs cstrs current - (IndType (indf,realargs)) tms = - let (dep,pred) = - match p with - | Some p -> abstract_predicate env (Evd.evars_of !isevars) indf current tms p - | None -> infer_predicate loc env isevars typs cstrs indf in - let typ = whd_beta (applist (pred, realargs)) in - if dep then - (pred, whd_beta (applist (typ, [current])), new_Type ()) - else - (pred, typ, new_Type ()) +let specialize_predicate newtomatchs (names,(depna,_)) cs tms ccl = + (* Assume some gamma st: gamma, (X,x:=realargs,copt), tms |- ccl *) + let nrealargs = List.length names in + let k = nrealargs + (if depna<>Anonymous then 1 else 0) in + (* We adjust pred st: gamma, x1..xn, (X,x:=realargs,copt), tms |- ccl' *) + let n = cs.cs_nargs in + let ccl' = liftn_predicate n (k+1) ccl tms in + let argsi = if nrealargs <> 0 then Array.to_list cs.cs_concl_realargs else [] in + let copti = if depna<>Anonymous then Some (build_dependent_constructor cs) else None in + (* The substituends argsi, copti are all defined in gamma, x1...xn *) + (* We need _parallel_ bindings to get gamma, x1...xn, tms |- ccl'' *) + let ccl'' = whd_betaiota (subst_predicate (argsi, copti) ccl' tms) in + (* We adjust ccl st: gamma, x1..xn, x1..xn, tms |- ccl'' *) + let ccl''' = liftn_predicate n (n+1) ccl'' tms in + (* We finally get gamma,x1..xn |- [X1,x1:=R1,x1]..[Xn,xn:=Rn,xn]pred'''*) + List.fold_left (expand_arg tms) ccl''' newtomatchs + +let find_predicate loc env evdref p current (IndType (indf,realargs)) dep tms = + let pred= abstract_predicate env (evars_of !evdref) indf current dep tms p in + (pred, whd_betaiota (applist (pred, realargs@[current])), new_Type ()) + +let adjust_predicate_from_tomatch ((_,oldtyp),_,(nadep,_)) typ pb = + match typ, oldtyp with + | IsInd (_,_,names), NotInd _ -> + let k = if nadep <> Anonymous then 2 else 1 in + let n = List.length names in + { pb with pred = liftn_predicate n k pb.pred pb.tomatch } + | _ -> + pb (************************************************************************) (* Sorting equations by constructor *) @@ -1144,7 +1036,6 @@ let group_equations pb ind current cstrs mat = (* This is a default clause that we expand *) for i=1 to Array.length cstrs do let args = make_anonymous_patvars cstrs.(i-1).cs_nargs in - let rest = {rest with tag = lower_pattern_status rest.tag} in brs.(i-1) <- (args, rest) :: brs.(i-1) done | PatCstr (loc,((_,i)),args,_) -> @@ -1157,40 +1048,37 @@ let group_equations pb ind current cstrs mat = (* Here starts the pattern-matching compilation algorithm *) (* Abstracting over dependent subterms to match *) -let rec generalize_problem pb current = function +let rec generalize_problem names pb = function | [] -> pb | i::l -> let d = map_rel_declaration (lift i) (Environ.lookup_rel i pb.env) in - let pb' = generalize_problem pb current l in + let pb' = generalize_problem names pb l in let tomatch = lift_tomatch_stack 1 pb'.tomatch in let tomatch = regeneralize_index_tomatch (i+1) tomatch in - { pb with + { pb' with tomatch = Abstract d :: tomatch; - pred = option_map (generalize_predicate current i d) pb'.pred } + pred = generalize_predicate names i d pb.tomatch pb'.pred } (* No more patterns: typing the right-hand-side of equations *) let build_leaf pb = - let tag, rhs = extract_rhs pb in - let tycon = match pb.pred with - | None -> empty_tycon - | Some (PrCcl typ) -> mk_tycon typ - | Some _ -> anomaly "not all parameters of pred have been consumed" in - tag, pb.typing_function tycon rhs.rhs_env rhs.it + let rhs = extract_rhs pb in + let j = pb.typing_function (mk_tycon pb.pred) rhs.rhs_env pb.evdref rhs.it in + j_nf_evar (evars_of !(pb.evdref)) j (* Building the sub-problem when all patterns are variables *) -let shift_problem (current,t) pb = +let shift_problem ((current,t),_,(nadep,_)) pb = {pb with tomatch = Alias (current,current,NonDepAlias,type_of_tomatch t)::pb.tomatch; - pred = option_map (specialize_predicate_var (current,t)) pb.pred; + pred = specialize_predicate_var (current,t,nadep) pb.tomatch pb.pred; history = push_history_pattern 0 AliasLeaf pb.history; mat = List.map remove_current_pattern pb.mat } (* Building the sub-pattern-matching problem for a given branch *) -let build_branch current deps pb eqns const_info = +let build_branch current deps (realnames,dep) pb eqns const_info = (* We remember that we descend through a constructor *) let alias_type = if Array.length const_info.cs_concl_realargs = 0 - & not (known_dependent pb.pred) & deps = [] + & not (known_dependent dep) & deps = [] then NonDepAlias else @@ -1202,24 +1090,21 @@ let build_branch current deps pb eqns const_info = pb.history in (* We find matching clauses *) - let cs_args = (*assums_of_rel_context*) const_info.cs_args in + let cs_args = const_info.cs_args in let names = get_names pb.env cs_args eqns in let submat = List.map (fun (tms,eqn) -> prepend_pattern tms eqn) eqns in - if submat = [] then - raise_pattern_matching_error - (dummy_loc, pb.env, NonExhaustive (complete_history history)); let typs = List.map2 (fun (_,c,t) na -> (na,c,t)) cs_args names in let _,typs',_ = List.fold_right (fun (na,c,t as d) (env,typs,tms) -> - let tm1 = List.map List.hd tms in let tms = List.map List.tl tms in - (push_rel d env, (na,to_mutind env pb.isevars tm1 c t)::typs,tms)) + (push_rel d env, (na,NotInd(c,t))::typs,tms)) typs (pb.env,[],List.map fst eqns) in let dep_sign = find_dependencies_signature - (dependencies_in_rhs const_info.cs_nargs eqns) (List.rev typs) in + (dependencies_in_rhs const_info.cs_nargs current pb.tomatch eqns) + (List.rev typs) in (* The dependent term to subst in the types of the remaining UnPushed terms is relative to the current context enriched by topushs *) @@ -1231,11 +1116,25 @@ let build_branch current deps pb eqns const_info = (* into "Gamma; typs; curalias |- tms" *) let tomatch = lift_tomatch_stack const_info.cs_nargs pb.tomatch in - let currents = + let typs'' = list_map2_i - (fun i (na,t) deps -> Pushed ((mkRel i, lift_tomatch_type i t), deps)) + (fun i (na,t) deps -> + let dep = match dep with + | Name _ as na',k -> (if na <> Anonymous then na else na'),k + | Anonymous,KnownNotDep -> + if deps = [] && noccurn_predicate 1 pb.pred tomatch then + (Anonymous,KnownNotDep) + else + (force_name na,KnownDep) + | _,_ -> anomaly "Inconsistent dependency" in + ((mkRel i, lift_tomatch_type i t),deps,dep)) 1 typs' (List.rev dep_sign) in + let pred = + specialize_predicate typs'' (realnames,dep) const_info tomatch pb.pred in + + let currents = List.map (fun x -> Pushed x) typs'' in + let sign = List.map (fun (na,t) -> mkDeclTomatch na t) typs' in let ind = @@ -1246,12 +1145,18 @@ let build_branch current deps pb eqns const_info = let cur_alias = lift (List.length sign) current in let currents = Alias (ci,cur_alias,alias_type,ind) :: currents in + let tomatch = List.rev_append currents tomatch in + + let submat = adjust_impossible_cases pb pred tomatch submat in + if submat = [] then + raise_pattern_matching_error + (dummy_loc, pb.env, NonExhaustive (complete_history history)); sign, { pb with env = push_rels sign pb.env; - tomatch = List.rev_append currents tomatch; - pred = option_map (specialize_predicate (List.rev typs') dep_sign const_info) pb.pred; + tomatch = tomatch; + pred = pred; history = history; mat = List.map (push_rels_eqn_with_names sign) submat } @@ -1264,9 +1169,6 @@ let build_branch current deps pb eqns const_info = "Pushed" terms and types are relative to env "Abstract" types are relative to env enriched by the previous terms to match - Concretely, each term "c" or type "T" comes with a delayed lift - index, but it works as if the lifting were effective. - *) (**********************************************************************) @@ -1279,12 +1181,13 @@ let rec compile pb = | [] -> build_leaf pb and match_current pb tomatch = - let ((current,typ as ct),deps) = adjust_tomatch_to_pattern pb tomatch in + let ((current,typ),deps,dep as ct) = adjust_tomatch_to_pattern pb tomatch in + let pb = adjust_predicate_from_tomatch tomatch typ pb in match typ with | NotInd (_,typ) -> check_all_variables typ pb.mat; compile (shift_problem ct pb) - | IsInd (_,(IndType(indf,realargs) as indt)) -> + | IsInd (_,(IndType(indf,realargs) as indt),names) -> let mind,_ = dest_ind_family indf in let cstrs = get_constructors pb.env indf in let eqns,onlydflt = group_equations pb mind current cstrs pb.mat in @@ -1294,46 +1197,41 @@ and match_current pb tomatch = let _constraints = Array.map (solve_constraints indt) cstrs in (* We generalize over terms depending on current term to match *) - let pb = generalize_problem pb current deps in + let pb = generalize_problem (names,dep) pb deps in (* We compile branches *) - let brs = array_map2 (compile_branch current deps pb) eqns cstrs in + let brs = array_map2 (compile_branch current (names,dep) deps pb) eqns cstrs in (* We build the (elementary) case analysis *) - let tags = Array.map (fun (t,_,_) -> t) brs in - let brvals = Array.map (fun (_,v,_) -> v) brs in - let brtyps = Array.map (fun (_,_,t) -> t) brs in + let brvals = Array.map (fun (v,_) -> v) brs in let (pred,typ,s) = - find_predicate pb.caseloc pb.env pb.isevars - pb.pred brtyps cstrs current indt pb.tomatch in - let ci = make_case_info pb.env mind RegularStyle tags in + find_predicate pb.caseloc pb.env pb.evdref + pb.pred current indt (names,dep) pb.tomatch in + let ci = make_case_info pb.env mind pb.casestyle in let case = mkCase (ci,nf_betaiota pred,current,brvals) in let inst = List.map mkRel deps in - pattern_status tags, { uj_val = applist (case, inst); uj_type = substl inst typ } -and compile_branch current deps pb eqn cstr = - let sign, pb = build_branch current deps pb eqn cstr in - let tag, j = compile pb in - (tag, it_mkLambda_or_LetIn j.uj_val sign, j.uj_type) +and compile_branch current names deps pb eqn cstr = + let sign, pb = build_branch current deps names pb eqn cstr in + let j = compile pb in + (it_mkLambda_or_LetIn j.uj_val sign, j.uj_type) and compile_generalization pb d rest = let pb = { pb with env = push_rel d pb.env; tomatch = rest; - pred = option_map ungeneralize_predicate pb.pred; mat = List.map (push_rels_eqn [d]) pb.mat } in - let patstat,j = compile pb in - patstat, + let j = compile pb in { uj_val = mkLambda_or_LetIn d j.uj_val; uj_type = mkProd_or_LetIn d j.uj_type } and compile_alias pb (deppat,nondeppat,d,t) rest = let history = simplify_history pb.history in let sign, newenv, mat = - insert_aliases pb.env (Evd.evars_of !(pb.isevars)) (deppat,nondeppat,d,t) pb.mat in + insert_aliases pb.env (evars_of !(pb.evdref)) (deppat,nondeppat,d,t) pb.mat in let n = List.length sign in (* We had Gamma1; x:current; Gamma2 |- tomatch(x) and we rebind x to get *) @@ -1349,15 +1247,14 @@ and compile_alias pb (deppat,nondeppat,d,t) rest = {pb with env = newenv; tomatch = tomatch; - pred = option_map (lift_predicate n) pb.pred; + pred = lift_predicate n pb.pred tomatch; history = history; mat = mat } in - let patstat,j = compile pb in - patstat, + let j = compile pb in List.fold_left mkSpecialLetInJudge j sign (* pour les alias des initiaux, enrichir les env de ce qu'il faut et -substituer après par les initiaux *) +substituer après par les initiaux *) (**************************************************************************) (* Preparation of the pattern-matching problem *) @@ -1371,12 +1268,10 @@ let matx_of_eqns env tomatchl eqns = let initial_rhs = rhs in let rhs = { rhs_env = env; + rhs_vars = free_rawvars initial_rhs; avoid_ids = ids@(ids_of_named_context (named_context env)); - rhs_lift = 0; - it = initial_rhs } in - { dependencies = []; - patterns = initial_lpat; - tag = RegularPat; + it = Some initial_rhs } in + { patterns = initial_lpat; alias_stack = []; eqn_loc = loc; used = ref false; @@ -1386,9 +1281,9 @@ let matx_of_eqns env tomatchl eqns = (************************************************************************) (* preparing the elimination predicate if any *) -let build_expected_arity env isevars isdep tomatchl = +let build_expected_arity env evdref isdep tomatchl = let cook n = function - | _,IsInd (_,IndType(indf,_)) -> + | _,IsInd (_,IndType(indf,_),_) -> let indf' = lift_inductive_family n indf in Some (build_dependent_inductive env indf', fst (get_arity env indf')) | _,NotInd _ -> None @@ -1415,7 +1310,7 @@ let build_expected_arity env isevars isdep tomatchl = let extract_predicate_conclusion isdep tomatchl pred = let cook = function - | _,IsInd (_,IndType(_,args)) -> Some (List.length args) + | _,IsInd (_,IndType(_,args),_) -> Some (List.length args) | _,NotInd _ -> None in let rec decomp_lam_force n l p = if n=0 then (l,p) else @@ -1445,9 +1340,9 @@ let set_arity_signature dep n arsign tomatchl pred x = let rec decomp_lam_force n avoid l p = if n = 0 then (List.rev l,p,avoid) else match p with - | RLambda (_,(Name id as na),_,c) -> + | RLambda (_,(Name id as na),_,_,c) -> decomp_lam_force (n-1) (id::avoid) (na::l) c - | RLambda (_,(Anonymous as na),_,c) -> decomp_lam_force (n-1) avoid (na::l) c + | RLambda (_,(Anonymous as na),_,_,c) -> decomp_lam_force (n-1) avoid (na::l) c | _ -> let x = next_ident_away (id_of_string "x") avoid in decomp_lam_force (n-1) (x::avoid) (Name x :: l) @@ -1458,7 +1353,7 @@ let set_arity_signature dep n arsign tomatchl pred x = | _ -> (RApp (dummy_loc,p,[a]))) in let rec decomp_block avoid p = function | ([], _) -> x := Some p - | ((_,IsInd (_,IndType(indf,realargs)))::l),(y::l') -> + | ((_,IsInd (_,IndType(indf,realargs),_))::l),(y::l') -> let (ind,params) = dest_ind_family indf in let (nal,p,avoid') = decomp_lam_force (List.length realargs) avoid [] p in @@ -1479,9 +1374,240 @@ let set_arity_signature dep n arsign tomatchl pred x = in decomp_block [] pred (tomatchl,arsign) -let prepare_predicate_from_tycon loc dep env isevars tomatchs sign c = +(***************** Building an inversion predicate ************************) + +(* Let "match t1 in I1 u11..u1n_1 ... tm in Im um1..umn_m with ... end : T" + be a pattern-matching problem. We assume that the each uij can be + decomposed under the form pij(vij1..vijq_ij) where pij(aij1..aijq_ij) + is a pattern depending on some variables aijk and the vijk are + instances of these variables. We also assume that each ti has the + form of a pattern qi(wi1..wiq_i) where qi(bi1..biq_i) is a pattern + depending on some variables bik and the wik are instances of these + variables (in practice, there is no reason that ti is already + constructed and the qi will be degenerated). + + We then look for a type U(..a1jk..b1 .. ..amjk..bm) so that + T = U(..v1jk..t1 .. ..vmjk..tm). This a higher-order matching + problem with a priori different solution (one of them if T itself!). + + We finally invert the uij and the ti and build the return clause + + phi(x11..x1n_1y1..xm1..xmn_mym) = + match x11..x1n_1 y1 .. xm1..xmn_m ym with + | p11..p1n_1 q1 .. pm1..pmn_m qm => U(..a1jk..b1 .. ..amjk..bm) + | _ .. _ _ .. _ .. _ _ => True + end + + so that "phi(u11..u1n_1t1..um1..umn_mtm) = T" (note that the clause + returning True never happens and any inhabited type can be put instead). +*) + +let adjust_to_extended_env_and_remove_deps env extenv subst t = + let n = rel_context_length (rel_context env) in + let n' = rel_context_length (rel_context extenv) in + (* We first remove the bindings that are dependently typed (they are + difficult to manage and it is not sure these are so useful in practice); + Notes: + - [subst] is made of pairs [(id,u)] where id is a name in [extenv] and + [u] a term typed in [env]; + - [subst0] is made of items [(p,u,(u,ty))] where [ty] is the type of [u] + and both are adjusted to [extenv] while [p] is the index of [id] in + [extenv] (after expansion of the aliases) *) + let subst0 = map_succeed (fun (x,u) -> + (* d1 ... dn dn+1 ... dn'-p+1 ... dn' *) + (* \--env-/ (= x:ty) *) + (* \--------------extenv------------/ *) + let (p,_) = lookup_rel_id x (rel_context extenv) in + let rec aux n (_,b,ty) = + match b with + | Some c -> + assert (isRel c); + let p = n + destRel c in aux p (lookup_rel p (rel_context extenv)) + | None -> + (n,ty) in + let (p,ty) = aux p (lookup_rel p (rel_context extenv)) in + if noccur_between_without_evar 1 (n'-p-n+1) ty + then + let u = lift (n'-n) u in + (p,u,(expand_vars_in_term extenv u,lift p ty)) + else + failwith "") subst in + let t0 = lift (n'-n) t in + (subst0,t0) + +(* Let vijk and ti be a set of dependent terms and T a type, all + * defined in some environment env. The vijk and ti are supposed to be + * instances for variables aijk and bi. + * + * [abstract_tycon Gamma0 Sigma subst T Gamma] looks for U(..v1jk..t1 .. ..vmjk..tm) + * defined in some extended context + * "Gamma0, ..a1jk:V1jk.. b1:W1 .. ..amjk:Vmjk.. bm:Wm" + * such that env |- T = U(..v1jk..t1 .. ..vmjk..tm). To not commit to + * a particular solution, we replace each subterm t in T that unifies with + * a subset u1..ul of the vijk and ti by a special evar + * ?id(x=t;c1:=c1,..,cl=cl) defined in context Gamma0,x,c1,...,cl |- ?id + * (where the c1..cl are the aijk and bi matching the u1..ul), and + * similarly for each ti. +*) + +let abstract_tycon loc env evdref subst _tycon extenv t = + let t = nf_betaiota t in (* it helps in some cases to remove K-redex... *) + let sigma = evars_of !evdref in + let subst0,t0 = adjust_to_extended_env_and_remove_deps env extenv subst t in + (* We traverse the type T of the original problem Xi looking for subterms + that match the non-constructor part of the constraints (this part + is in subst); these subterms are the "good" subterms and we replace them + by an evar that may depend (and only depend) on the corresponding + convertible subterms of the substitution *) + let rec aux (k,env,subst as x) t = + let good = List.filter (fun (_,u,_) -> is_conv_leq env sigma t u) subst in + if good <> [] then + let (u,ty) = pi3 (List.hd good) in + let vl = List.map pi1 good in + let inst = + list_map_i + (fun i _ -> if List.mem i vl then u else mkRel i) 1 + (rel_context extenv) in + let rel_filter = + List.map (fun a -> not (isRel a) or dependent a u) inst in + let named_filter = + List.map (fun (id,_,_) -> dependent (mkVar id) u) + (named_context extenv) in + let filter = rel_filter@named_filter in + let ev = + e_new_evar evdref extenv ~src:(loc, CasesType) ~filter:filter ty in + evdref := add_conv_pb (Reduction.CONV,extenv,substl inst ev,u) !evdref; + lift k ev + else + map_constr_with_full_binders + (fun d (k,env,subst) -> + k+1, + push_rel d env, + List.map (fun (na,u,d) -> (na,lift 1 u,d)) subst) + aux x t in + aux (0,extenv,subst0) t0 + +let build_tycon loc env tycon_env subst tycon extenv evdref t = + let t = match t with + | None -> + (* This is the situation we are building a return predicate and + we are in an impossible branch *) + let n = rel_context_length (rel_context env) in + let n' = rel_context_length (rel_context tycon_env) in + let impossible_case_type = + e_new_evar evdref env ~src:(loc,ImpossibleCase) (new_Type ()) in + lift (n'-n) impossible_case_type + | Some t -> abstract_tycon loc tycon_env evdref subst tycon extenv t in + get_judgment_of extenv (evars_of !evdref) t + +(* For a multiple pattern-matching problem Xi on t1..tn with return + * type T, [build_inversion_problem Gamma Sigma (t1..tn) T] builds a return + * predicate for Xi that is itself made by an auxiliary + * pattern-matching problem of which the first clause reveals the + * pattern structure of the constraints on the inductive types of the t1..tn, + * and the second clause is a wildcard clause for catching the + * impossible cases. See above "Building an inversion predicate" for + * further explanations + *) + +let build_inversion_problem loc env evdref tms t = + let sigma = evars_of !evdref in + let make_patvar t (subst,avoid) = + let id = next_name_away (named_hd env t Anonymous) avoid in + PatVar (dummy_loc,Name id), ((id,t)::subst, id::avoid) in + let rec reveal_pattern t (subst,avoid as acc) = + match kind_of_term (whd_betadeltaiota env sigma t) with + | Construct cstr -> PatCstr (dummy_loc,cstr,[],Anonymous), acc + | App (f,v) when isConstruct f -> + let cstr = destConstruct f in + let n = constructor_nrealargs env cstr in + let l = list_lastn n (Array.to_list v) in + let l,acc = list_fold_map' reveal_pattern l acc in + PatCstr (dummy_loc,cstr,l,Anonymous), acc + | _ -> make_patvar t acc in + let rec aux n env acc_sign tms acc = + match tms with + | [] -> [], acc_sign, acc + | (t, IsInd (_,IndType(indf,realargs),_)) :: tms -> + let patl,acc = list_fold_map' reveal_pattern realargs acc in + let pat,acc = make_patvar t acc in + let indf' = lift_inductive_family n indf in + let sign = make_arity_signature env true indf' in + let p = List.length realargs in + let env' = push_rels sign env in + let patl',acc_sign,acc = aux (n+p+1) env' (sign@acc_sign) tms acc in + patl@pat::patl',acc_sign,acc + | (t, NotInd (bo,typ)) :: tms -> + aux n env acc_sign tms acc in + let avoid0 = ids_of_context env in + (* [patl] is a list of patterns revealing the substructure of + constructors present in the constraints on the type of the + multiple terms t1..tn that are matched in the original problem; + [subst] is the substitution of the free pattern variables in + [patl] that returns the non-constructor parts of the constraints. + Especially, if the ti has type I ui1..uin_i, and the patterns associated + to ti are pi1..pin_i, then subst(pij) is uij; the substitution is + useful to recognize which subterms of the whole type T of the original + problem have to be abstracted *) + let patl,sign,(subst,avoid) = aux 0 env [] tms ([],avoid0) in + let n = List.length sign in + let (pb_env,_),sub_tms = + list_fold_map (fun (env,i) (na,b,t as d) -> + let typ = + if b<>None then NotInd(None,t) else + try try_find_ind env sigma t None + with Not_found -> NotInd (None,t) in + let ty = lift_tomatch_type (n-i) typ in + let tm = Pushed ((mkRel (n-i),ty),[],(Anonymous,KnownNotDep)) in + ((push_rel d env,i+1),tm)) + (env,0) (List.rev sign) in + let subst = List.map (fun (na,t) -> (na,lift n t)) subst in + (* [eqn1] is the first clause of the auxiliary pattern-matching that + serves as skeleton for the return type: [patl] is the + substructure of constructors extracted from the list of + constraints on the inductive types of the multiple terms matched + in the original pattern-matching problem Xi *) + let eqn1 = + { patterns = patl; + alias_stack = []; + eqn_loc = dummy_loc; + used = ref false; + rhs = { rhs_env = pb_env; + (* we assume all vars are used; in practice we discard dependent + vars so that the field rhs_vars is normally not used *) + rhs_vars = List.map fst subst; + avoid_ids = avoid; + it = Some (lift n t) } } in + (* [eqn2] is the default clause of the auxiliary pattern-matching: it will + catch the clauses of the original pattern-matching problem Xi whose + type constraints are incompatible with the constraints on the + inductive types of the multiple terms matched in Xi *) + let eqn2 = + { patterns = List.map (fun _ -> PatVar (dummy_loc,Anonymous)) patl; + alias_stack = []; + eqn_loc = dummy_loc; + used = ref false; + rhs = { rhs_env = pb_env; + rhs_vars = []; + avoid_ids = avoid0; + it = None } } in + (* [pb] is the auxiliary pattern-matching serving as skeleton for the + return type of the original problem Xi *) + let pb = + { env = pb_env; + evdref = evdref; + pred = new_Type(); + tomatch = sub_tms; + history = start_history n; + mat = [eqn1;eqn2]; + caseloc = loc; + casestyle = RegularStyle; + typing_function = build_tycon loc env pb_env subst} in + (compile pb).uj_val + +let prepare_predicate_from_tycon loc dep env evdref tomatchs sign c = let cook (n, l, env, signs) = function - | c,IsInd (_,IndType(indf,realargs)) -> + | c,IsInd (_,IndType(indf,realargs),_) -> let indf' = lift_inductive_family n indf in let sign = make_arity_signature env dep indf' in let p = List.length realargs in @@ -1489,59 +1615,47 @@ let prepare_predicate_from_tycon loc dep env isevars tomatchs sign c = (n + p + 1, c::(List.rev realargs)@l, push_rels sign env,sign::signs) else (n + p, (List.rev realargs)@l, push_rels sign env,sign::signs) - | c,NotInd _ -> - (n, l, env, []::signs) in - let n, allargs, env, signs = List.fold_left cook (0, [], env, []) tomatchs in + | c,NotInd (bo,typ) -> + let sign = [Anonymous,Option.map (lift n) bo,lift n typ] in + let sign = name_context env sign in + (n + 1, c::l, push_rels sign env, sign::signs) in + let n,allargs,env',signs = List.fold_left cook (0, [], env, []) tomatchs in let names = List.rev (List.map (List.map pi1) signs) in - let allargs = - List.map (fun c -> lift n (nf_betadeltaiota env (Evd.evars_of !isevars) c)) allargs in - let rec build_skeleton env c = - (* Don't put into normal form, it has effects on the synthesis of evars *) - (* let c = whd_betadeltaiota env (evars_of isevars) c in *) - (* We turn all subterms possibly dependent into an evar with maximum ctxt*) - if isEvar c or List.exists (eq_constr c) allargs then - e_new_evar isevars env ~src:(loc, Evd.CasesType) - (Retyping.get_type_of env (Evd.evars_of !isevars) c) - else - map_constr_with_full_binders push_rel build_skeleton env c - in - names, build_skeleton env (lift n c) + names, build_inversion_problem loc env evdref tomatchs c (* Here, [pred] is assumed to be in the context built from all *) (* realargs and terms to match *) -let build_initial_predicate isdep allnames pred = +let build_initial_predicate knowndep allnames pred = let nar = List.fold_left (fun n names -> List.length names + n) 0 allnames in - let rec buildrec n pred = function - | [] -> PrCcl pred + let rec buildrec n pred nal = function + | [] -> List.rev nal,pred | names::lnames -> - let names' = if isdep then List.tl names else names in + let names' = List.tl names in let n' = n + List.length names' in - let pred, p, user_p = - if isdep then - if dependent (mkRel (nar-n')) pred then pred, 1, 1 - else liftn (-1) (nar-n') pred, 0, 1 - else pred, 0, 0 in + let pred, p = + if dependent (mkRel (nar-n')) pred then pred, 1 + else liftn (-1) (nar-n') pred, 0 in let na = if p=1 then let na = List.hd names in - if na = Anonymous then - (* peut arriver en raison des evars *) + ((if na = Anonymous then + (* can happen if evars occur in the return clause *) Name (id_of_string "x") (*Hum*) - else na - else Anonymous in - PrLetIn ((names',na), buildrec (n'+user_p) pred lnames) - in buildrec 0 pred allnames + else na),knowndep) + else (Anonymous,KnownNotDep) in + buildrec (n'+1) pred (na::nal) lnames + in buildrec 0 pred [] allnames let extract_arity_signature env0 tomatchl tmsign = let get_one_sign n tm (na,t) = match tm with | NotInd (bo,typ) -> (match t with - | None -> [na,option_map (lift n) bo,lift n typ] + | None -> [na,Option.map (lift n) bo,lift n typ] | Some (loc,_,_,_) -> user_err_loc (loc,"", str "Unexpected type annotation for a term of non inductive type")) - | IsInd (_,IndType(indf,realargs)) -> + | IsInd (term,IndType(indf,realargs),_) -> let indf' = lift_inductive_family n indf in let (ind,params) = dest_ind_family indf' in let nrealargs = List.length realargs in @@ -1554,8 +1668,16 @@ let extract_arity_signature env0 tomatchl tmsign = or nrealargs <> List.length realnal then anomaly "Ill-formed 'in' clause in cases"; List.rev realnal - | None -> list_tabulate (fun _ -> Anonymous) nrealargs in + | None -> list_make nrealargs Anonymous in let arsign = fst (get_arity env0 indf') in +(* let na = *) +(* match na with *) +(* | Name _ -> na *) +(* | Anonymous -> *) +(* match kind_of_term term with *) +(* | Rel n -> pi1 (lookup_rel n (Environ.rel_context env0)) *) +(* | _ -> Anonymous *) +(* in *) (na,None,build_dependent_inductive env0 indf') ::(List.map2 (fun x (_,c,t) ->(x,c,t)) realnal arsign) in let rec buildrec n = function @@ -1566,14 +1688,55 @@ let extract_arity_signature env0 tomatchl tmsign = | _ -> assert false in List.rev (buildrec 0 (tomatchl,tmsign)) -let inh_conv_coerce_to_tycon loc env isevars j tycon = +let inh_conv_coerce_to_tycon loc env evdref j tycon = match tycon with | Some p -> - let (evd',j) = Coercion.inh_conv_coerce_to loc env !isevars j p in - isevars := evd'; + let (evd',j) = Coercion.inh_conv_coerce_to loc env !evdref j p in + evdref := evd'; j | None -> j +(* We put the tycon inside the arity signature, possibly discovering dependencies. *) + +let prepare_predicate_from_arsign_tycon loc env tomatchs sign arsign c = + let nar = List.fold_left (fun n sign -> List.length sign + n) 0 arsign in + let subst, len = + List.fold_left2 (fun (subst, len) (tm, tmtype) sign -> + let signlen = List.length sign in + match kind_of_term tm with + | Rel n when dependent tm c + && signlen = 1 (* The term to match is not of a dependent type itself *) -> + ((n, len) :: subst, len - signlen) + | Rel _ when not (dependent tm c) + && signlen > 1 (* The term is of a dependent type but does not appear in + the tycon, maybe some variable in its type does. *) -> + (match tmtype with + NotInd _ -> (* len - signlen, subst*) assert false (* signlen > 1 *) + | IsInd (_, IndType(indf,realargs),_) -> + List.fold_left + (fun (subst, len) arg -> + match kind_of_term arg with + | Rel n when dependent arg c -> + ((n, len) :: subst, pred len) + | _ -> (subst, pred len)) + (subst, len) realargs) + | _ -> (subst, len - signlen)) + ([], nar) tomatchs arsign + in + let rec predicate lift c = + match kind_of_term c with + | Rel n when n > lift -> + (try + (* Make the predicate dependent on the matched variable *) + let idx = List.assoc (n - lift) subst in + mkRel (idx + lift) + with Not_found -> + (* A variable that is not matched, lift over the arsign. *) + mkRel (n + nar)) + | _ -> + map_constr_with_binders succ predicate lift c + in predicate 0 c + (* Builds the predicate. If the predicate is dependent, its context is * made of 1+nrealargs assumptions for each matched term in an inductive @@ -1582,18 +1745,58 @@ let inh_conv_coerce_to_tycon loc env isevars j tycon = * Each matched terms are independently considered dependent or not. - * A type constraint but no annotation case: it is assumed non dependent. + * A type constraint but no annotation case: we try to specialize the + * tycon to make the predicate if it is not closed. *) -let prepare_predicate loc typing_fun isevars env tomatchs sign tycon = function +let is_dependent_on_rel x t = + match kind_of_term x with + Rel n -> not (noccur_with_meta n n t) + | _ -> false + +let prepare_predicate loc typing_fun evdref env tomatchs sign tycon pred = + match pred with (* No type annotation *) | None -> (match tycon with + | Some (None, t) when not (noccur_with_meta 0 max_int t) -> + (* If the tycon is not closed w.r.t real variables *) + (* We try two different strategies *) + let evdref2 = ref !evdref in + let arsign = extract_arity_signature env tomatchs sign in + let env' = List.fold_right push_rels arsign env in + (* First strategy: we abstract the tycon wrt to the dependencies *) + let names1 = List.rev (List.map (List.map pi1) arsign) in + let pred1 = prepare_predicate_from_arsign_tycon loc env' tomatchs sign arsign t in + let nal1,pred1 = build_initial_predicate KnownDep names1 pred1 in + (* Second strategy: we build an "inversion" predicate *) + let names2,pred2 = + prepare_predicate_from_tycon loc true env evdref2 tomatchs sign t + in + let nal2,pred2 = build_initial_predicate DepUnknown names2 pred2 in + [evdref, nal1, pred1; evdref2, nal2, pred2] | Some (None, t) -> + (* Only one strategy: we build an "inversion" predicate *) let names,pred = - prepare_predicate_from_tycon loc false env isevars tomatchs sign t - in Some (build_initial_predicate false names pred) - | _ -> None) + prepare_predicate_from_tycon loc true env evdref tomatchs sign t + in + let nal,pred = build_initial_predicate DepUnknown names pred in + [evdref, nal, pred] + | _ -> + (* No type constaints: we use two strategies *) + let evdref2 = ref !evdref in + let t1 = mkExistential env ~src:(loc, CasesType) evdref in + (* First strategy: we pose a possibly dependent "inversion" evar *) + let names1,pred1 = + prepare_predicate_from_tycon loc true env evdref tomatchs sign t1 + in + let nal1,pred1 = build_initial_predicate DepUnknown names1 pred1 in + (* Second strategy: we pose a non dependent evar *) + let t2 = mkExistential env ~src:(loc, CasesType) evdref2 in + let arsign = extract_arity_signature env tomatchs sign in + let names2 = List.rev (List.map (List.map pi1) arsign) in + let nal2,pred2 = build_initial_predicate KnownNotDep names2 t2 in + [evdref, nal1, pred1; evdref2, nal2, pred2]) (* Some type annotation *) | Some rtntyp -> @@ -1601,50 +1804,69 @@ let prepare_predicate loc typing_fun isevars env tomatchs sign tycon = function let arsign = extract_arity_signature env tomatchs sign in let env = List.fold_right push_rels arsign env in let allnames = List.rev (List.map (List.map pi1) arsign) in - let predcclj = typing_fun (mk_tycon (new_Type ())) env rtntyp in + let predcclj = typing_fun (mk_tycon (new_Type ())) env evdref rtntyp in let _ = - option_map (fun tycon -> - isevars := Coercion.inh_conv_coerces_to loc env !isevars predcclj.uj_val + Option.map (fun tycon -> + evdref := Coercion.inh_conv_coerces_to loc env !evdref predcclj.uj_val (lift_tycon_type (List.length arsign) tycon)) tycon in - let predccl = (j_nf_isevar !isevars predcclj).uj_val in - Some (build_initial_predicate true allnames predccl) + let predccl = (j_nf_isevar !evdref predcclj).uj_val in + let nal,pred = build_initial_predicate KnownDep allnames predccl in + [evdref, nal, pred] (**************************************************************************) (* Main entry of the matching compilation *) -let compile_cases loc (typing_fun, isevars) (tycon : Evarutil.type_constraint) env (predopt, tomatchl, eqns)= - +let compile_cases loc style (typing_fun, evdref) tycon env (predopt, tomatchl, eqns) = + (* We build the matrix of patterns and right-hand-side *) let matx = matx_of_eqns env tomatchl eqns in (* We build the vector of terms to match consistently with the *) (* constructors found in patterns *) - let tomatchs = coerce_to_indtype typing_fun isevars env matx tomatchl in - - (* We build the elimination predicate if any and check its consistency *) - (* with the type of arguments to match *) - let tmsign = List.map snd tomatchl in - let pred = prepare_predicate loc typing_fun isevars env tomatchs tmsign tycon predopt in - - (* We push the initial terms to match and push their alias to rhs' envs *) - (* names of aliases will be recovered from patterns (hence Anonymous here) *) - let initial_pushed = List.map (fun tm -> Pushed (tm,[])) tomatchs in + let tomatchs = coerce_to_indtype typing_fun evdref env matx tomatchl in - let pb = - { env = env; - isevars = isevars; - pred = pred; - tomatch = initial_pushed; - history = start_history (List.length initial_pushed); - mat = matx; - caseloc = loc; - typing_function = typing_fun } in + (* If an elimination predicate is provided, we check it is compatible + with the type of arguments to match; if none is provided, we + build alternative possible predicates *) + let sign = List.map snd tomatchl in + let preds = prepare_predicate loc typing_fun evdref env tomatchs sign tycon predopt in - let _, j = compile pb in - (* We check for unused patterns *) - List.iter (check_unused_pattern env) matx; - inh_conv_coerce_to_tycon loc env isevars j tycon + let compile_for_one_predicate (myevdref,nal,pred) = + (* We push the initial terms to match and push their alias to rhs' envs *) + (* names of aliases will be recovered from patterns (hence Anonymous *) + (* here) *) + let initial_pushed = List.map2 (fun tm na -> Pushed(tm,[],na)) tomatchs nal in + + (* A typing function that provides with a canonical term for absurd cases*) + let typing_fun tycon env evdref = function + | Some t -> typing_fun tycon env evdref t + | None -> coq_unit_judge () in + + let pb = + { env = env; + evdref = myevdref; + pred = pred; + tomatch = initial_pushed; + history = start_history (List.length initial_pushed); + mat = matx; + caseloc = loc; + casestyle = style; + typing_function = typing_fun } in + + let j = compile pb in + evdref := !myevdref; + j in + + (* Return the term compiled with the first possible elimination *) + (* predicate for which the compilation succeeds *) + let j = list_try_compile compile_for_one_predicate preds in + + (* We check for unused patterns *) + List.iter (check_unused_pattern env) matx; + + (* We coerce to the tycon (if an elim predicate was provided) *) + inh_conv_coerce_to_tycon loc env evdref j tycon + end - diff --git a/pretyping/cases.mli b/pretyping/cases.mli index 30f68083..98923b2a 100644 --- a/pretyping/cases.mli +++ b/pretyping/cases.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: cases.mli 9976 2007-07-12 11:58:30Z msozeau $ i*) +(*i $Id: cases.mli 11014 2008-05-28 19:09:32Z herbelin $ i*) (*i*) open Util @@ -46,14 +46,27 @@ val error_wrong_predicate_arity_loc : loc -> env -> constr -> constr -> constr - val error_needs_inversion : env -> constr -> types -> 'a +val set_impossible_default_clause : constr * types -> unit (*s Compilation of pattern-matching. *) +type alias_constr = + | DepAlias + | NonDepAlias +type dep_status = KnownDep | KnownNotDep | DepUnknown +type tomatch_type = + | IsInd of types * inductive_type * name list + | NotInd of constr option * types +type tomatch_status = + | Pushed of ((constr * tomatch_type) * int list * (name * dep_status)) + | Alias of (constr * constr * alias_constr * constr) + | Abstract of rel_declaration + module type S = sig val compile_cases : - loc -> - (type_constraint -> env -> rawconstr -> unsafe_judgment) * evar_defs ref -> + loc -> case_style -> + (type_constraint -> env -> evar_defs ref -> rawconstr -> unsafe_judgment) * evar_defs ref -> type_constraint -> - env -> rawconstr option * tomatch_tuple * cases_clauses -> + env -> rawconstr option * tomatch_tuples * cases_clauses -> unsafe_judgment end diff --git a/pretyping/classops.ml b/pretyping/classops.ml index bbad005c..83ba05bb 100644 --- a/pretyping/classops.ml +++ b/pretyping/classops.ml @@ -6,11 +6,11 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: classops.ml 9257 2006-10-21 17:28:28Z herbelin $ *) +(* $Id: classops.ml 10840 2008-04-23 21:29:34Z herbelin $ *) open Util open Pp -open Options +open Flags open Names open Libnames open Nametab @@ -44,7 +44,7 @@ type coe_typ = global_reference type coe_info_typ = { coe_value : constr; coe_type : types; - coe_strength : strength; + coe_strength : locality; coe_is_identity : bool; coe_param : int } @@ -290,7 +290,7 @@ let add_coercion_in_graph (ic,source,target) = if (!ambig_paths <> []) && is_verbose () then ppnl (message_ambig !ambig_paths) -type coercion = coe_typ * strength * bool * cl_typ * cl_typ * int +type coercion = coe_typ * locality * bool * cl_typ * cl_typ * int (* Calcul de l'arité d'une classe *) @@ -304,7 +304,7 @@ let class_params = function | CL_SECVAR sp -> reference_arity_length (VarRef sp) | CL_IND sp -> reference_arity_length (IndRef sp) -(* add_class : cl_typ -> strength option -> bool -> unit *) +(* add_class : cl_typ -> locality_flag option -> bool -> unit *) let add_class cl = add_new_class cl { cl_param = class_params cl } @@ -366,12 +366,14 @@ let coercion_identity v = v.coe_is_identity (* For printing purpose *) let get_coercion_value v = v.coe_value +let pr_cl_index n = int n + let classes () = Bijint.dom !class_tab let coercions () = Gmap.rng !coercion_tab let inheritance_graph () = Gmap.to_list !inheritance_graph -let coercion_of_qualid qid = - let ref = Nametab.global qid in +let coercion_of_reference r = + let ref = Nametab.global r in if not (coercion_exists ref) then errorlabstrm "try_add_coercion" (Nametab.pr_global_env Idset.empty ref ++ str" is not a coercion"); @@ -380,7 +382,7 @@ let coercion_of_qualid qid = module CoercionPrinting = struct type t = coe_typ - let encode = coercion_of_qualid + let encode = coercion_of_reference let subst = subst_coe_typ let printer x = pr_global_env Idset.empty x let key = Goptions.SecondaryTable ("Printing","Coercion") diff --git a/pretyping/classops.mli b/pretyping/classops.mli index 276b14d1..1436a11b 100644 --- a/pretyping/classops.mli +++ b/pretyping/classops.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: classops.mli 6748 2005-02-18 22:17:50Z herbelin $ i*) +(*i $Id: classops.mli 10840 2008-04-23 21:29:34Z herbelin $ i*) (*i*) open Names @@ -66,7 +66,7 @@ val class_args_of : constr -> constr list (*s [declare_coercion] adds a coercion in the graph of coercion paths *) val declare_coercion : - coe_typ -> strength -> isid:bool -> + coe_typ -> locality -> isid:bool -> src:cl_typ -> target:cl_typ -> params:int -> unit (*s Access to coercions infos *) @@ -90,6 +90,7 @@ val install_path_printer : (*s This is for printing purpose *) val string_of_class : cl_typ -> string val pr_class : cl_typ -> std_ppcmds +val pr_cl_index : cl_index -> std_ppcmds val get_coercion_value : coe_index -> constr val inheritance_graph : unit -> ((cl_index * cl_index) * inheritance_path) list val classes : unit -> cl_typ list diff --git a/pretyping/clenv.ml b/pretyping/clenv.ml index 29dbe83d..03f84809 100644 --- a/pretyping/clenv.ml +++ b/pretyping/clenv.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: clenv.ml 9665 2007-02-21 17:08:10Z herbelin $ *) +(* $Id: clenv.ml 11166 2008-06-22 13:23:35Z herbelin $ *) open Pp open Util @@ -21,18 +21,14 @@ open Reduction open Reductionops open Rawterm open Pattern -open Tacexpr open Tacred open Pretype_errors open Evarutil open Unification open Mod_subst +open Coercion.Default -(* *) -let w_coerce env c ctyp target evd = - let j = make_judge c ctyp in - let (evd',j') = Coercion.Default.inh_conv_coerce_to dummy_loc env evd j (mk_tycon_type target) in - (evd',j'.uj_val) +(* Abbreviations *) let pf_env gls = Global.env_of_context gls.it.evar_hyps let pf_type_of gls c = Typing.type_of (pf_env gls) gls.sigma c @@ -43,36 +39,31 @@ let pf_concl gl = gl.it.evar_concl (* Clausal environments *) type clausenv = { - templenv : env; - env : evar_defs; + env : env; + evd : evar_defs; templval : constr freelisted; templtyp : constr freelisted } -let cl_env ce = ce.templenv -let cl_sigma ce = evars_of ce.env +let cl_env ce = ce.env +let cl_sigma ce = evars_of ce.evd let subst_clenv sub clenv = { templval = map_fl (subst_mps sub) clenv.templval; templtyp = map_fl (subst_mps sub) clenv.templtyp; - env = subst_evar_defs_light sub clenv.env; - templenv = clenv.templenv } + evd = subst_evar_defs_light sub clenv.evd; + env = clenv.env } -let clenv_nf_meta clenv c = nf_meta clenv.env c -let clenv_meta_type clenv mv = Typing.meta_type clenv.env mv -let clenv_value clenv = meta_instance clenv.env clenv.templval -let clenv_type clenv = meta_instance clenv.env clenv.templtyp +let clenv_nf_meta clenv c = nf_meta clenv.evd c +let clenv_term clenv c = meta_instance clenv.evd c +let clenv_meta_type clenv mv = Typing.meta_type clenv.evd mv +let clenv_value clenv = meta_instance clenv.evd clenv.templval +let clenv_type clenv = meta_instance clenv.evd clenv.templtyp let clenv_hnf_constr ce t = hnf_constr (cl_env ce) (cl_sigma ce) t let clenv_get_type_of ce c = - let metamap = - List.map - (function - | (n,Clval(_,_,typ)) -> (n,typ.rebus) - | (n,Cltyp (_,typ)) -> (n,typ.rebus)) - (meta_list ce.env) in - Retyping.get_type_of_with_meta (cl_env ce) (cl_sigma ce) metamap c + Retyping.get_type_of_with_meta (cl_env ce) (cl_sigma ce) (metas_of ce.evd) c exception NotExtensibleClause @@ -84,62 +75,76 @@ let clenv_push_prod cl = let mv = new_meta () in let dep = dependent (mkRel 1) u in let na' = if dep then na else Anonymous in - let e' = meta_declare mv t ~name:na' cl.env in + let e' = meta_declare mv t ~name:na' cl.evd in let concl = if dep then subst1 (mkMeta mv) u else u in let def = applist (cl.templval.rebus,[mkMeta mv]) in { templval = mk_freelisted def; templtyp = mk_freelisted concl; - env = e'; - templenv = cl.templenv } + evd = e'; + env = cl.env } | _ -> raise NotExtensibleClause in clrec typ -let clenv_environments evd bound c = - let rec clrec (e,metas) n c = - match n, kind_of_term c with - | (Some 0, _) -> (e, List.rev metas, c) - | (n, Cast (c,_,_)) -> clrec (e,metas) n c - | (n, Prod (na,c1,c2)) -> +(* Instantiate the first [bound] products of [t] with metas (all products if + [bound] is [None]; unfold local defs *) + +let clenv_environments evd bound t = + let rec clrec (e,metas) n t = + match n, kind_of_term t with + | (Some 0, _) -> (e, List.rev metas, t) + | (n, Cast (t,_,_)) -> clrec (e,metas) n t + | (n, Prod (na,t1,t2)) -> let mv = new_meta () in - let dep = dependent (mkRel 1) c2 in + let dep = dependent (mkRel 1) t2 in let na' = if dep then na else Anonymous in - let e' = meta_declare mv c1 ~name:na' e in - clrec (e', (mkMeta mv)::metas) (option_map ((+) (-1)) n) - (if dep then (subst1 (mkMeta mv) c2) else c2) - | (n, LetIn (na,b,_,c)) -> - clrec (e,metas) (option_map ((+) (-1)) n) (subst1 b c) - | (n, _) -> (e, List.rev metas, c) + let e' = meta_declare mv t1 ~name:na' e in + clrec (e', (mkMeta mv)::metas) (Option.map ((+) (-1)) n) + (if dep then (subst1 (mkMeta mv) t2) else t2) + | (n, LetIn (na,b,_,t)) -> clrec (e,metas) n (subst1 b t) + | (n, _) -> (e, List.rev metas, t) in - clrec (evd,[]) bound c - -let clenv_environments_evars env evd bound c = - let rec clrec (e,ts) n c = - match n, kind_of_term c with - | (Some 0, _) -> (e, List.rev ts, c) - | (n, Cast (c,_,_)) -> clrec (e,ts) n c - | (n, Prod (na,c1,c2)) -> - let e',constr = Evarutil.new_evar e env c1 in - let dep = dependent (mkRel 1) c2 in - clrec (e', constr::ts) (option_map ((+) (-1)) n) - (if dep then (subst1 constr c2) else c2) - | (n, LetIn (na,b,_,c)) -> - clrec (e,ts) (option_map ((+) (-1)) n) (subst1 b c) - | (n, _) -> (e, List.rev ts, c) + clrec (evd,[]) bound t + +(* Instantiate the first [bound] products of [t] with evars (all products if + [bound] is [None]; unfold local defs *) + +let clenv_environments_evars env evd bound t = + let rec clrec (e,ts) n t = + match n, kind_of_term t with + | (Some 0, _) -> (e, List.rev ts, t) + | (n, Cast (t,_,_)) -> clrec (e,ts) n t + | (n, Prod (na,t1,t2)) -> + let e',constr = Evarutil.new_evar e env t1 in + let dep = dependent (mkRel 1) t2 in + clrec (e', constr::ts) (Option.map ((+) (-1)) n) + (if dep then (subst1 constr t2) else t2) + | (n, LetIn (na,b,_,t)) -> clrec (e,ts) n (subst1 b t) + | (n, _) -> (e, List.rev ts, t) in - clrec (evd,[]) bound c - -let mk_clenv_from_n gls n (c,cty) = - let evd = create_evar_defs gls.sigma in + clrec (evd,[]) bound t + +let clenv_conv_leq env sigma t c bound = + let ty = Retyping.get_type_of env sigma c in + let evd = Evd.create_goal_evar_defs sigma in + let evars,args,_ = clenv_environments_evars env evd (Some bound) ty in + let evars = Evarconv.the_conv_x_leq env t (applist (c,args)) evars in + let evars,_ = Evarconv.consider_remaining_unif_problems env evars in + let args = List.map (whd_evar (Evd.evars_of evars)) args in + check_evars env sigma evars (applist (c,args)); + args + +let mk_clenv_from_env environ sigma n (c,cty) = + let evd = create_goal_evar_defs sigma in let (env,args,concl) = clenv_environments evd n cty in { templval = mk_freelisted (match args with [] -> c | _ -> applist (c,args)); templtyp = mk_freelisted concl; - env = env; - templenv = Global.env_of_context gls.it.evar_hyps } + evd = env; + env = environ } -let mk_clenv_from gls = mk_clenv_from_n gls None +let mk_clenv_from_n gls n (c,cty) = + mk_clenv_from_env (Global.env_of_context gls.it.evar_hyps) gls.sigma n (c, cty) -let mk_clenv_rename_from gls (c,t) = - mk_clenv_from gls (c,rename_bound_var (pf_env gls) [] t) +let mk_clenv_from gls = mk_clenv_from_n gls None let mk_clenv_rename_from_n gls n (c,t) = mk_clenv_from_n gls n (c,rename_bound_var (pf_env gls) [] t) @@ -156,15 +161,17 @@ let mentions clenv mv0 = let rec menrec mv1 = mv0 = mv1 || let mlist = - try (meta_fvalue clenv.env mv1).freemetas - with Anomaly _ | Not_found -> Metaset.empty in + try match meta_opt_fvalue clenv.evd mv1 with + | Some (b,_) -> b.freemetas + | None -> Metaset.empty + with Not_found -> Metaset.empty in meta_exists menrec mlist in menrec -let clenv_defined clenv mv = meta_defined clenv.env mv +let clenv_defined clenv mv = meta_defined clenv.evd mv let error_incompatible_inst clenv mv = - let na = meta_name clenv.env mv in + let na = meta_name clenv.evd mv in match na with Name id -> errorlabstrm "clenv_assign" @@ -179,17 +186,19 @@ let clenv_assign mv rhs clenv = if meta_exists (mentions clenv mv) rhs_fls.freemetas then error "clenv_assign: circularity in unification"; try - if meta_defined clenv.env mv then - if not (eq_constr (meta_fvalue clenv.env mv).rebus rhs) then + if meta_defined clenv.evd mv then + if not (eq_constr (fst (meta_fvalue clenv.evd mv)).rebus rhs) then error_incompatible_inst clenv mv else clenv - else {clenv with env = meta_assign mv rhs_fls.rebus clenv.env} + else + let st = (ConvUpToEta 0,TypeNotProcessed) in + {clenv with evd = meta_assign mv (rhs_fls.rebus,st) clenv.evd} with Not_found -> error "clenv_assign: undefined meta" -let clenv_wtactic f clenv = {clenv with env = f clenv.env } +let clenv_wtactic f clenv = {clenv with evd = f clenv.evd } (* [clenv_dependent hyps_only clenv] @@ -200,74 +209,108 @@ let clenv_wtactic f clenv = {clenv with env = f clenv.env } * type of clenv. * If [hyps_only] then metavariables occurring in the type are _excluded_ *) -(* collects all metavar occurences, in left-to-right order, preserving - * repetitions and all. *) - -let collect_metas c = - let rec collrec acc c = - match kind_of_term c with - | Meta mv -> mv::acc - | _ -> fold_constr collrec acc c - in - List.rev (collrec [] c) - (* [clenv_metavars clenv mv] * returns a list of the metavars which appear in the type of * the metavar mv. The list is unordered. *) -let clenv_metavars clenv mv = (meta_ftype clenv mv).freemetas +let clenv_metavars evd mv = + (mk_freelisted (meta_instance evd (meta_ftype evd mv))).freemetas let dependent_metas clenv mvs conclmetas = List.fold_right (fun mv deps -> - Metaset.union deps (clenv_metavars clenv.env mv)) + Metaset.union deps (clenv_metavars clenv.evd mv)) mvs conclmetas +let duplicated_metas c = + let rec collrec (one,more as acc) c = + match kind_of_term c with + | Meta mv -> if List.mem mv one then (one,mv::more) else (mv::one,more) + | _ -> fold_constr collrec acc c + in + snd (collrec ([],[]) c) + let clenv_dependent hyps_only clenv = - let mvs = collect_metas (clenv_value clenv) in + let mvs = undefined_metas clenv.evd in let ctyp_mvs = (mk_freelisted (clenv_type clenv)).freemetas in let deps = dependent_metas clenv mvs ctyp_mvs in + let nonlinear = duplicated_metas (clenv_value clenv) in + (* Make the assumption that duplicated metas have internal dependencies *) List.filter - (fun mv -> Metaset.mem mv deps && - not (hyps_only && Metaset.mem mv ctyp_mvs)) + (fun mv -> (Metaset.mem mv deps && + not (hyps_only && Metaset.mem mv ctyp_mvs)) + or List.mem mv nonlinear) mvs let clenv_missing ce = clenv_dependent true ce (******************************************************************) -let clenv_unify allow_K cv_pb t1 t2 clenv = - { clenv with env = w_unify allow_K clenv.templenv cv_pb t1 t2 clenv.env } +let clenv_unify allow_K ?(flags=default_unify_flags) cv_pb t1 t2 clenv = + { clenv with + evd = w_unify allow_K ~flags:flags clenv.env cv_pb t1 t2 clenv.evd } -let clenv_unique_resolver allow_K clause gl = - clenv_unify allow_K CUMUL (clenv_type clause) (pf_concl gl) clause +let clenv_unify_meta_types ?(flags=default_unify_flags) clenv = + { clenv with evd = w_unify_meta_types ~flags:flags clenv.env clenv.evd } +let clenv_unique_resolver allow_K ?(flags=default_unify_flags) clenv gl = + if isMeta (fst (whd_stack clenv.templtyp.rebus)) then + clenv_unify allow_K CUMUL ~flags:flags (clenv_type clenv) (pf_concl gl) + (clenv_unify_meta_types ~flags:flags clenv) + else + clenv_unify allow_K CUMUL ~flags:flags + (meta_reducible_instance clenv.evd clenv.templtyp) (pf_concl gl) clenv -(* [clenv_pose_dependent_evars clenv] +(* [clenv_pose_metas_as_evars clenv dep_mvs] * For each dependent evar in the clause-env which does not have a value, * pose a value for it by constructing a fresh evar. We do this in * left-to-right order, so that every evar's type is always closed w.r.t. - * metas. *) -let clenv_pose_dependent_evars clenv = - let dep_mvs = clenv_dependent false clenv in - List.fold_left - (fun clenv mv -> - let ty = clenv_meta_type clenv mv in - let (evd,evar) = new_evar clenv.env (cl_env clenv) ty in - clenv_assign mv evar {clenv with env=evd}) - clenv - dep_mvs + * metas. + + * Node added 14/4/08 [HH]: before this date, evars were collected in + clenv_dependent by collect_metas in the fold_constr order which is + (almost) the left-to-right order of dependencies in term. However, + due to K-redexes, collect_metas was sometimes missing some metas. + The call to collect_metas has been replaced by a call to + undefined_metas, but then the order was the one of definition of + the metas (numbers in increasing order) which is _not_ the + dependency order when a clenv_fchain occurs (because clenv_fchain + plugs a term with a list of consecutive metas in place of a - a priori - + arbitrary metavariable belonging to another sequence of consecutive metas: + e.g., clenv_fchain may plug (H ?1 ?2) at the position ?6 of + (nat_ind ?3 ?4 ?5 ?6), leading to a dependency order 3<4<5<1<2). + To ensure the dependency order, we check that the type of each meta + to pose is already meta-free, otherwise we postpone the transformation, + hoping that no cycle may happen. + + Another approach could have been to use decimal numbers for metas so that + in the example above, (H ?1 ?2) would have been renumbered (H ?6.1 ?6.2) + then making the numeric order match the dependency order. +*) -let evar_clenv_unique_resolver clenv gls = - clenv_pose_dependent_evars (clenv_unique_resolver false clenv gls) +let clenv_pose_metas_as_evars clenv dep_mvs = + let rec fold clenv = function + | [] -> clenv + | mv::mvs -> + let ty = clenv_meta_type clenv mv in + (* Postpone the evar-ization if dependent on another meta *) + (* This assumes no cycle in the dependencies - is it correct ? *) + if occur_meta ty then fold clenv (mvs@[mv]) + else + let (evd,evar) = + new_evar clenv.evd (cl_env clenv) ~src:(dummy_loc,GoalEvar) ty in + let clenv = clenv_assign mv evar {clenv with evd=evd} in + fold clenv mvs in + fold clenv dep_mvs +let evar_clenv_unique_resolver = clenv_unique_resolver (******************************************************************) let connect_clenv gls clenv = { clenv with - env = evars_reset_evd gls.sigma clenv.env; - templenv = Global.env_of_context gls.it.evar_hyps } + evd = evars_reset_evd gls.sigma clenv.evd; + env = Global.env_of_context gls.it.evar_hyps } (* [clenv_fchain mv clenv clenv'] * @@ -292,29 +335,30 @@ let connect_clenv gls clenv = In particular, it assumes that [env'] and [sigma'] extend [env] and [sigma]. *) -let clenv_fchain mv clenv nextclenv = +let clenv_fchain ?(allow_K=true) ?(flags=default_unify_flags) mv clenv nextclenv = (* Add the metavars of [nextclenv] to [clenv], with their name-environment *) let clenv' = { templval = clenv.templval; templtyp = clenv.templtyp; - env = meta_merge clenv.env nextclenv.env; - templenv = nextclenv.templenv } in + evd = + evar_merge (meta_merge clenv.evd nextclenv.evd) (evars_of clenv.evd); + env = nextclenv.env } in (* unify the type of the template of [nextclenv] with the type of [mv] *) let clenv'' = - clenv_unify true CUMUL - (clenv_nf_meta clenv' nextclenv.templtyp.rebus) + clenv_unify allow_K ~flags:flags CUMUL + (clenv_term clenv' nextclenv.templtyp) (clenv_meta_type clenv' mv) clenv' in (* assign the metavar *) let clenv''' = - clenv_assign mv (clenv_nf_meta clenv' nextclenv.templval.rebus) clenv'' + clenv_assign mv (clenv_term clenv' nextclenv.templval) clenv'' in clenv''' (***************************************************************) (* Bindings *) -type arg_bindings = (int * constr) list +type arg_bindings = open_constr explicit_bindings (* [clenv_independent clenv] * returns a list of metavariables which appear in the term cval, @@ -328,119 +372,87 @@ let clenv_independent clenv = let deps = dependent_metas clenv mvs ctyp_mvs in List.filter (fun mv -> not (Metaset.mem mv deps)) mvs -let meta_of_binder clause loc b t mvs = - match b with - | NamedHyp s -> - if List.exists (fun (_,b',_) -> b=b') t then - errorlabstrm "clenv_match_args" - (str "The variable " ++ pr_id s ++ - str " occurs more than once in binding"); - meta_with_name clause.env s - | AnonHyp n -> - if List.exists (fun (_,b',_) -> b=b') t then - errorlabstrm "clenv_match_args" - (str "The position " ++ int n ++ - str " occurs more than once in binding"); - try List.nth mvs (n-1) - with (Failure _|Invalid_argument _) -> - errorlabstrm "clenv_match_args" (str "No such binder") +let check_bindings bl = + match list_duplicates (List.map pi2 bl) with + | NamedHyp s :: _ -> + errorlabstrm "" + (str "The variable " ++ pr_id s ++ + str " occurs more than once in binding list"); + | AnonHyp n :: _ -> + errorlabstrm "" + (str "The position " ++ int n ++ + str " occurs more than once in binding list") + | [] -> () + +let meta_of_binder clause loc mvs = function + | NamedHyp s -> meta_with_name clause.evd s + | AnonHyp n -> + try List.nth mvs (n-1) + with (Failure _|Invalid_argument _) -> + errorlabstrm "" (str "No such binder") let error_already_defined b = match b with - NamedHyp id -> - errorlabstrm "clenv_match_args" + | NamedHyp id -> + errorlabstrm "" (str "Binder name \"" ++ pr_id id ++ str"\" already defined with incompatible value") | AnonHyp n -> - anomalylabstrm "clenv_match_args" + anomalylabstrm "" (str "Position " ++ int n ++ str" already defined") -let clenv_match_args s clause = - let mvs = clenv_independent clause in - let rec matchrec clause = function - | [] -> clause - | (loc,b,c)::t -> - let k = meta_of_binder clause loc b t mvs in - if meta_defined clause.env k then - if eq_constr (meta_fvalue clause.env k).rebus c then - matchrec clause t +let clenv_unify_binding_type clenv c t u = + if isMeta (fst (whd_stack u)) then + (* Not enough information to know if some subtyping is needed *) + CoerceToType, clenv, c + else + (* Enough information so as to try a coercion now *) + try + let evd,c = w_coerce_to_type (cl_env clenv) clenv.evd c t u in + TypeProcessed, { clenv with evd = evd }, c + with e when precatchable_exception e -> + TypeNotProcessed, clenv, c + +let clenv_assign_binding clenv k (sigma,c) = + let k_typ = clenv_hnf_constr clenv (clenv_meta_type clenv k) in + let clenv' = { clenv with evd = evar_merge clenv.evd sigma} in + let c_typ = nf_betaiota (clenv_get_type_of clenv' c) in + let status,clenv'',c = clenv_unify_binding_type clenv' c c_typ k_typ in + { clenv'' with evd = meta_assign k (c,(UserGiven,status)) clenv''.evd } + +let clenv_match_args bl clenv = + if bl = [] then + clenv + else + let mvs = clenv_independent clenv in + check_bindings bl; + List.fold_left + (fun clenv (loc,b,(sigma,c as sc)) -> + let k = meta_of_binder clenv loc mvs b in + if meta_defined clenv.evd k then + if eq_constr (fst (meta_fvalue clenv.evd k)).rebus c then clenv else error_already_defined b else - let k_typ = clenv_hnf_constr clause (clenv_meta_type clause k) - (* nf_betaiota was before in type_of - useful to reduce - types like (x:A)([x]P u) *) - and c_typ = - clenv_hnf_constr clause - (nf_betaiota (clenv_get_type_of clause c)) in - let cl = - (* Try to infer some Meta/Evar from the type of [c] *) - try clenv_assign k c (clenv_unify true CUMUL c_typ k_typ clause) - with e when precatchable_exception e -> - (* Try to coerce to the type of [k]; cannot merge with the - previous case because Coercion does not handle Meta *) - let (_,c') = w_coerce (cl_env clause) c c_typ k_typ clause.env in - try clenv_unify true CONV (mkMeta k) c' clause - with PretypeError (env,CannotUnify (m,n)) -> - Stdpp.raise_with_loc loc - (PretypeError (env,CannotUnifyBindingType (m,n))) - in matchrec cl t - in - matchrec clause s - - -let clenv_constrain_with_bindings bl clause = - if bl = [] then - clause - else - let all_mvs = collect_metas clause.templval.rebus in - let rec matchrec clause = function - | [] -> clause - | (n,c)::t -> - let k = - (try - if n > 0 then - List.nth all_mvs (n-1) - else if n < 0 then - List.nth (List.rev all_mvs) (-n-1) - else error "clenv_constrain_with_bindings" - with Failure _ -> - errorlabstrm "clenv_constrain_with_bindings" - (str"Clause did not have " ++ int n ++ str"-th" ++ - str" absolute argument")) in - let k_typ = nf_betaiota (clenv_meta_type clause k) in - let c_typ = nf_betaiota (clenv_get_type_of clause c) in - matchrec - (clenv_assign k c (clenv_unify true CUMUL c_typ k_typ clause)) t - in - matchrec clause bl - - -(* not exported: maybe useful ? *) -let clenv_constrain_dep_args hyps_only clause = function - | [] -> clause - | mlist -> - let occlist = clenv_dependent hyps_only clause in - if List.length occlist = List.length mlist then - List.fold_left2 - (fun clenv k c -> - try - let k_typ = - clenv_hnf_constr clause (clenv_meta_type clause k) in - let c_typ = - clenv_hnf_constr clause (clenv_get_type_of clause c) in - (* faire quelque chose avec le sigma retourne ? *) - let (_,c') = w_coerce (cl_env clenv) c c_typ k_typ clenv.env in - clenv_unify true CONV (mkMeta k) c' clenv - with _ -> - clenv_unify true CONV (mkMeta k) c clenv) - clause occlist mlist - else - error ("Not the right number of missing arguments (expected " - ^(string_of_int (List.length occlist))^")") - -let clenv_constrain_missing_args mlist clause = - clenv_constrain_dep_args true clause mlist - + clenv_assign_binding clenv k sc) + clenv bl + +let clenv_constrain_last_binding c clenv = + let all_mvs = collect_metas clenv.templval.rebus in + let k = + try list_last all_mvs + with Failure _ -> error "clenv_constrain_with_bindings" in + clenv_assign_binding clenv k (Evd.empty,c) + +let clenv_constrain_dep_args hyps_only bl clenv = + if bl = [] then + clenv + else + let occlist = clenv_dependent hyps_only clenv in + if List.length occlist = List.length bl then + List.fold_left2 clenv_assign_binding clenv occlist bl + else + error ("Not the right number of missing arguments (expected " + ^(string_of_int (List.length occlist))^")") (****************************************************************) (* Clausal environment for an application *) @@ -448,7 +460,7 @@ let clenv_constrain_missing_args mlist clause = let make_clenv_binding_gen hyps_only n gls (c,t) = function | ImplicitBindings largs -> let clause = mk_clenv_from_n gls n (c,t) in - clenv_constrain_dep_args hyps_only clause largs + clenv_constrain_dep_args hyps_only largs clause | ExplicitBindings lbind -> let clause = mk_clenv_rename_from_n gls n (c,t) in clenv_match_args lbind clause @@ -465,4 +477,4 @@ let pr_clenv clenv = h 0 (str"TEMPL: " ++ print_constr clenv.templval.rebus ++ str" : " ++ print_constr clenv.templtyp.rebus ++ fnl () ++ - pr_evar_defs clenv.env) + pr_evar_defs clenv.evd) diff --git a/pretyping/clenv.mli b/pretyping/clenv.mli index b5433cac..9b2d6e29 100644 --- a/pretyping/clenv.mli +++ b/pretyping/clenv.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: clenv.mli 9277 2006-10-25 13:02:22Z herbelin $ i*) +(*i $Id: clenv.mli 10856 2008-04-27 16:15:34Z herbelin $ i*) (*i*) open Util @@ -18,22 +18,21 @@ open Evd open Evarutil open Mod_subst open Rawterm +open Unification (*i*) (***************************************************************) (* The Type of Constructions clausale environments. *) -(* [templenv] is the typing context - * [env] is the mapping from metavar and evar numbers to their types +(* [env] is the typing context + * [evd] is the mapping from metavar and evar numbers to their types * and values. * [templval] is the template which we are trying to fill out. * [templtyp] is its type. - * [namenv] is a mapping from metavar numbers to names, for - * use in instantiating metavars by name. *) type clausenv = { - templenv : env; - env : evar_defs; + env : env; + evd : evar_defs; templval : constr freelisted; templtyp : constr freelisted } @@ -54,48 +53,53 @@ val clenv_meta_type : clausenv -> metavariable -> types val mk_clenv_from : evar_info sigma -> constr * types -> clausenv val mk_clenv_from_n : evar_info sigma -> int option -> constr * types -> clausenv -val mk_clenv_rename_from : evar_info sigma -> constr * types -> clausenv -val mk_clenv_rename_from_n : - evar_info sigma -> int option -> constr * types -> clausenv val mk_clenv_type_of : evar_info sigma -> constr -> clausenv +val mk_clenv_from_env : env -> evar_map -> int option -> constr * types -> clausenv (***************************************************************) (* linking of clenvs *) val connect_clenv : evar_info sigma -> clausenv -> clausenv -val clenv_fchain : metavariable -> clausenv -> clausenv -> clausenv +val clenv_fchain : + ?allow_K:bool -> ?flags:unify_flags -> metavariable -> clausenv -> clausenv -> clausenv (***************************************************************) (* Unification with clenvs *) (* Unifies two terms in a clenv. The boolean is [allow_K] (see [Unification]) *) val clenv_unify : - bool -> conv_pb -> constr -> constr -> clausenv -> clausenv + bool -> ?flags:unify_flags -> conv_pb -> constr -> constr -> clausenv -> clausenv (* unifies the concl of the goal with the type of the clenv *) val clenv_unique_resolver : - bool -> clausenv -> evar_info sigma -> clausenv + bool -> ?flags:unify_flags -> clausenv -> evar_info sigma -> clausenv (* same as above ([allow_K=false]) but replaces remaining metas - with fresh evars *) + with fresh evars if [evars_flag] is [true] *) val evar_clenv_unique_resolver : - clausenv -> evar_info sigma -> clausenv + bool -> ?flags:unify_flags -> clausenv -> evar_info sigma -> clausenv + +val clenv_dependent : bool -> clausenv -> metavariable list + +val clenv_pose_metas_as_evars : clausenv -> metavariable list -> clausenv (***************************************************************) (* Bindings *) +type arg_bindings = open_constr explicit_bindings + (* bindings where the key is the position in the template of the clenv (dependent or not). Positions can be negative meaning to start from the rightmost argument of the template. *) -type arg_bindings = (int * constr) list - val clenv_independent : clausenv -> metavariable list val clenv_missing : clausenv -> metavariable list +val clenv_constrain_last_binding : constr -> clausenv -> clausenv + (* defines metas corresponding to the name of the bindings *) -val clenv_match_args : - constr explicit_bindings -> clausenv -> clausenv -val clenv_constrain_with_bindings : arg_bindings -> clausenv -> clausenv +val clenv_match_args : arg_bindings -> clausenv -> clausenv + +val clenv_unify_meta_types : ?flags:unify_flags -> clausenv -> clausenv (* start with a clenv to refine with a given term with bindings *) @@ -103,10 +107,10 @@ val clenv_constrain_with_bindings : arg_bindings -> clausenv -> clausenv (* the optional int tells how many prods of the lemma have to be used *) (* use all of them if None *) val make_clenv_binding_apply : - evar_info sigma -> int option -> constr * constr -> constr bindings -> + evar_info sigma -> int option -> constr * constr -> open_constr bindings -> clausenv val make_clenv_binding : - evar_info sigma -> constr * constr -> constr bindings -> clausenv + evar_info sigma -> constr * constr -> open_constr bindings -> clausenv (* [clenv_environments sigma n t] returns [sigma',lmeta,ccl] where [lmetas] is a list of metas to be applied to a proof of [t] so that @@ -125,6 +129,10 @@ val clenv_environments : val clenv_environments_evars : env -> evar_defs -> int option -> types -> evar_defs * constr list * types +(* [clenv_conv_leq env sigma t c n] looks for c1...cn s.t. [t <= c c1...cn] *) +val clenv_conv_leq : + env -> evar_map -> types -> constr -> int -> constr list + (* if the clause is a product, add an extra meta for this product *) exception NotExtensibleClause val clenv_push_prod : clausenv -> clausenv diff --git a/pretyping/coercion.ml b/pretyping/coercion.ml index cc74b0ad..3c37a49f 100644 --- a/pretyping/coercion.ml +++ b/pretyping/coercion.ml @@ -5,7 +5,7 @@ (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: coercion.ml 9257 2006-10-21 17:28:28Z herbelin $ *) +(* $Id: coercion.ml 10883 2008-05-05 13:55:24Z herbelin $ *) open Util open Names @@ -25,38 +25,40 @@ open Termops module type S = sig (*s Coercions. *) - (* [inh_app_fun env isevars j] coerces [j] to a function; i.e. it + (* [inh_app_fun env evd j] coerces [j] to a function; i.e. it inserts a coercion into [j], if needed, in such a way it gets as type a product; it returns [j] if no coercion is applicable *) val inh_app_fun : env -> evar_defs -> unsafe_judgment -> evar_defs * unsafe_judgment - (* [inh_coerce_to_sort env isevars j] coerces [j] to a type; i.e. it + (* [inh_coerce_to_sort env evd j] coerces [j] to a type; i.e. it inserts a coercion into [j], if needed, in such a way it gets as type a sort; it fails if no coercion is applicable *) val inh_coerce_to_sort : loc -> env -> evar_defs -> unsafe_judgment -> evar_defs * unsafe_type_judgment - (* [inh_coerce_to_base env isevars j] coerces [j] to its base type; i.e. it + (* [inh_coerce_to_base env evd j] coerces [j] to its base type; i.e. it inserts a coercion into [j], if needed, in such a way it gets as type its base type (the notion depends on the coercion system) *) val inh_coerce_to_base : loc -> env -> evar_defs -> unsafe_judgment -> evar_defs * unsafe_judgment - (* [inh_conv_coerce_to loc env isevars j t] coerces [j] to an object of type + (* [inh_conv_coerce_to loc env evd j t] coerces [j] to an object of type [t]; i.e. it inserts a coercion into [j], if needed, in such a way [t] and [j.uj_type] are convertible; it fails if no coercion is applicable *) val inh_conv_coerce_to : loc -> env -> evar_defs -> unsafe_judgment -> type_constraint_type -> evar_defs * unsafe_judgment - - (* [inh_conv_coerces_to loc env isevars t t'] checks if an object of type [t] + val inh_conv_coerce_rigid_to : loc -> + env -> evar_defs -> unsafe_judgment -> type_constraint_type -> evar_defs * unsafe_judgment + + (* [inh_conv_coerces_to loc env evd t t'] checks if an object of type [t] is coercible to an object of type [t'] adding evar constraints if needed; it fails if no coercion exists *) val inh_conv_coerces_to : loc -> env -> evar_defs -> types -> type_constraint_type -> evar_defs - (* [inh_pattern_coerce_to loc env isevars pat ind1 ind2] coerces the Cases + (* [inh_pattern_coerce_to loc env evd pat ind1 ind2] coerces the Cases pattern [pat] typed in [ind1] into a pattern typed in [ind2]; raises [Not_found] if no coercion found *) val inh_pattern_coerce_to : @@ -72,8 +74,8 @@ module Default = struct | App (f,l) -> mkApp (whd_evar sigma f,l) | _ -> whd_evar sigma t - let class_of1 env isevars t = - let sigma = evars_of isevars in + let class_of1 env evd t = + let sigma = evars_of evd in class_of env sigma (whd_app_evar sigma t) (* Here, funj is a coercion therefore already typed in global context *) @@ -122,47 +124,51 @@ module Default = struct (hj,typ_cl) p) with _ -> anomaly "apply_coercion" - let inh_app_fun env isevars j = - let t = whd_betadeltaiota env (evars_of isevars) j.uj_type in + let inh_app_fun env evd j = + let t = whd_betadeltaiota env (evars_of evd) j.uj_type in match kind_of_term t with - | Prod (_,_,_) -> (isevars,j) + | Prod (_,_,_) -> (evd,j) | Evar ev -> - let (isevars',t) = define_evar_as_arrow isevars ev in - (isevars',{ uj_val = j.uj_val; uj_type = t }) + let (evd',t) = define_evar_as_product evd ev in + (evd',{ uj_val = j.uj_val; uj_type = t }) | _ -> (try - let t,i1 = class_of1 env isevars j.uj_type in + let t,i1 = class_of1 env evd j.uj_type in let p = lookup_path_to_fun_from i1 in - (isevars,apply_coercion env p j t) - with Not_found -> (isevars,j)) + (evd,apply_coercion env p j t) + with Not_found -> (evd,j)) - let inh_tosort_force loc env isevars j = + let inh_tosort_force loc env evd j = try - let t,i1 = class_of1 env isevars j.uj_type in + let t,i1 = class_of1 env evd j.uj_type in let p = lookup_path_to_sort_from i1 in let j1 = apply_coercion env p j t in - let j2 = on_judgment_type (whd_evar (evars_of isevars)) j1 in - (isevars,type_judgment env j2) + let j2 = on_judgment_type (whd_evar (evars_of evd)) j1 in + (evd,type_judgment env j2) with Not_found -> - error_not_a_type_loc loc env (evars_of isevars) j + error_not_a_type_loc loc env (evars_of evd) j - let inh_coerce_to_sort loc env isevars j = - let typ = whd_betadeltaiota env (evars_of isevars) j.uj_type in + let inh_coerce_to_sort loc env evd j = + let typ = whd_betadeltaiota env (evars_of evd) j.uj_type in match kind_of_term typ with - | Sort s -> (isevars,{ utj_val = j.uj_val; utj_type = s }) - | Evar ev when not (is_defined_evar isevars ev) -> - let (isevars',s) = define_evar_as_sort isevars ev in - (isevars',{ utj_val = j.uj_val; utj_type = s }) + | Sort s -> (evd,{ utj_val = j.uj_val; utj_type = s }) + | Evar ev when not (is_defined_evar evd ev) -> + let (evd',s) = define_evar_as_sort evd ev in + (evd',{ utj_val = j.uj_val; utj_type = s }) | _ -> - inh_tosort_force loc env isevars j + inh_tosort_force loc env evd j - let inh_coerce_to_base loc env isevars j = (isevars, j) + let inh_coerce_to_base loc env evd j = (evd, j) - let inh_coerce_to_fail env isevars c1 v t = + let inh_coerce_to_fail env evd rigidonly v t c1 = + if rigidonly & not (Heads.is_rigid env c1 && Heads.is_rigid env t) + then + raise NoCoercion + else let v', t' = try - let t1,i1 = class_of1 env isevars c1 in - let t2,i2 = class_of1 env isevars t in + let t1,i1 = class_of1 env evd c1 in + let t2,i2 = class_of1 env evd t in let p = lookup_path_between (i2,i1) in match v with Some v -> @@ -171,86 +177,57 @@ module Default = struct | None -> None, t with Not_found -> raise NoCoercion in - try (the_conv_x_leq env t' c1 isevars, v', t') + try (the_conv_x_leq env t' c1 evd, v') with Reduction.NotConvertible -> raise NoCoercion - let rec inh_conv_coerce_to_fail loc env isevars v t c1 = - try (the_conv_x_leq env t c1 isevars, v, t) + let rec inh_conv_coerce_to_fail loc env evd rigidonly v t c1 = + try (the_conv_x_leq env t c1 evd, v) with Reduction.NotConvertible -> - try inh_coerce_to_fail env isevars c1 v t + try inh_coerce_to_fail env evd rigidonly v t c1 with NoCoercion -> match - kind_of_term (whd_betadeltaiota env (evars_of isevars) t), - kind_of_term (whd_betadeltaiota env (evars_of isevars) c1) + kind_of_term (whd_betadeltaiota env (evars_of evd) t), + kind_of_term (whd_betadeltaiota env (evars_of evd) c1) with - | Prod (_,t1,t2), Prod (name,u1,u2) -> - let v' = option_map (whd_betadeltaiota env (evars_of isevars)) v in - let (evd',b) = - match v' with - | Some v' -> - (match kind_of_term v' with - | Lambda (x,v1,v2) -> - (* sous-typage non contravariant: pas de "leq v1 u1" *) - (try the_conv_x env v1 u1 isevars, Some (x, v1, v2) - with Reduction.NotConvertible -> (isevars, None)) - | _ -> (isevars, None)) - | None -> (isevars, None) - in - (match b with - | Some (x, v1, v2) -> - let env1 = push_rel (x,None,v1) env in - let (evd'', v2', t2') = inh_conv_coerce_to_fail loc env1 evd' - (Some v2) t2 u2 in - (evd'', option_map (fun v2' -> mkLambda (x, v1, v2')) v2', - mkProd (x, v1, t2')) - | None -> - (* Mismatch on t1 and u1 or not a lambda: we eta-expand *) - (* we look for a coercion c:u1->t1 s.t. [name:u1](v' (c x)) *) - (* has type (name:u1)u2 (with v' recursively obtained) *) - let name = match name with - | Anonymous -> Name (id_of_string "x") - | _ -> name - in - let env1 = push_rel (name,None,u1) env in - let (evd', v1', t1') = - inh_conv_coerce_to_fail loc env1 isevars - (Some (mkRel 1)) (lift 1 u1) (lift 1 t1) - in - let (evd'', v2', t2') = - let v2 = - match v with - | Some v -> option_map (fun x -> mkApp(lift 1 v,[|x|])) v1' - | None -> None - and evd', t2 = - match v1' with - | Some v1' -> evd', subst_term v1' t2 - | None -> - let evd', ev = - new_evar evd' env ~src:(loc, InternalHole) t1' in - evd', subst_term ev t2 - in - inh_conv_coerce_to_fail loc env1 evd' v2 t2 u2 - in - (evd'', option_map (fun v2' -> mkLambda (name, u1, v2')) v2', - mkProd (name, u1, t2'))) + | Prod (name,t1,t2), Prod (_,u1,u2) -> + (* Conversion did not work, we may succeed with a coercion. *) + (* We eta-expand (hence possibly modifying the original term!) *) + (* and look for a coercion c:u1->t1 s.t. fun x:u1 => v' (c x)) *) + (* has type forall (x:u1), u2 (with v' recursively obtained) *) + let name = match name with + | Anonymous -> Name (id_of_string "x") + | _ -> name in + let env1 = push_rel (name,None,u1) env in + let (evd', v1) = + inh_conv_coerce_to_fail loc env1 evd rigidonly + (Some (mkRel 1)) (lift 1 u1) (lift 1 t1) in + let v1 = Option.get v1 in + let v2 = Option.map (fun v -> beta_applist (lift 1 v,[v1])) v in + let t2 = subst_term v1 t2 in + let (evd'',v2') = inh_conv_coerce_to_fail loc env1 evd' rigidonly v2 t2 u2 in + (evd'', Option.map (fun v2' -> mkLambda (name, u1, v2')) v2') | _ -> raise NoCoercion (* Look for cj' obtained from cj by inserting coercions, s.t. cj'.typ = t *) - let inh_conv_coerce_to loc env isevars cj (n, t) = + let inh_conv_coerce_to_gen rigidonly loc env evd cj (n, t) = match n with None -> - let (evd', val', type') = + let (evd', val') = try - inh_conv_coerce_to_fail loc env isevars (Some cj.uj_val) cj.uj_type t + inh_conv_coerce_to_fail loc env evd rigidonly (Some cj.uj_val) cj.uj_type t with NoCoercion -> - let sigma = evars_of isevars in + let sigma = evars_of evd in error_actual_type_loc loc env sigma cj t in let val' = match val' with Some v -> v | None -> assert(false) in (evd',{ uj_val = val'; uj_type = t }) - | Some (init, cur) -> (isevars, cj) + | Some (init, cur) -> (evd, cj) + + let inh_conv_coerce_to = inh_conv_coerce_to_gen false + let inh_conv_coerce_rigid_to = inh_conv_coerce_to_gen true + - let inh_conv_coerces_to loc env (isevars : evar_defs) t (abs, t') = isevars + let inh_conv_coerces_to loc env (evd : evar_defs) t (abs, t') = evd (* Still problematic, as it changes unification let nabsinit, nabs = match abs with @@ -262,7 +239,7 @@ module Default = struct (* a little more effort to get products is needed *) try decompose_prod_n nabs t with _ -> - if !Options.debug then + if !Flags.debug then msg_warning (str "decompose_prod_n failed"); raise (Invalid_argument "Coercion.inh_conv_coerces_to") in @@ -274,11 +251,11 @@ module Default = struct env', rng, lift nabs t' in try - pi1 (inh_conv_coerce_to_fail loc env' isevars None t t') + pi1 (inh_conv_coerce_to_fail loc env' evd None t t') with NoCoercion -> - isevars) (* Maybe not enough information to unify *) - (*let sigma = evars_of isevars in + evd) (* Maybe not enough information to unify *) + (*let sigma = evars_of evd in error_cannot_coerce env' sigma (t, t'))*) - else isevars - with Invalid_argument _ -> isevars *) + else evd + with Invalid_argument _ -> evd *) end diff --git a/pretyping/coercion.mli b/pretyping/coercion.mli index 42ce27fd..b1c8e893 100644 --- a/pretyping/coercion.mli +++ b/pretyping/coercion.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: coercion.mli 8875 2006-05-29 19:59:11Z msozeau $ i*) +(*i $Id: coercion.mli 10840 2008-04-23 21:29:34Z herbelin $ i*) (*i*) open Util @@ -45,6 +45,9 @@ module type S = sig [j.uj_type] are convertible; it fails if no coercion is applicable *) val inh_conv_coerce_to : loc -> env -> evar_defs -> unsafe_judgment -> type_constraint_type -> evar_defs * unsafe_judgment + + val inh_conv_coerce_rigid_to : loc -> + env -> evar_defs -> unsafe_judgment -> type_constraint_type -> evar_defs * unsafe_judgment (* [inh_conv_coerces_to loc env isevars t t'] checks if an object of type [t] is coercible to an object of type [t'] adding evar constraints if needed; diff --git a/pretyping/detyping.ml b/pretyping/detyping.ml index 29ec7904..81bb41ef 100644 --- a/pretyping/detyping.ml +++ b/pretyping/detyping.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: detyping.ml 10135 2007-09-21 14:28:12Z herbelin $ *) +(* $Id: detyping.ml 11073 2008-06-08 20:24:51Z herbelin $ *) open Pp open Util @@ -31,8 +31,8 @@ let dl = dummy_loc (****************************************************************************) (* Tools for printing of Cases *) -let encode_inductive qid = - let indsp = global_inductive qid in +let encode_inductive r = + let indsp = inductive_of_reference r in let constr_lengths = mis_constr_nargs indsp in (indsp,constr_lengths) @@ -108,14 +108,7 @@ module PrintingCasesLet = module PrintingIf = Goptions.MakeRefTable(PrintingCasesIf) module PrintingLet = Goptions.MakeRefTable(PrintingCasesLet) -let force_let ci = - let indsp = ci.ci_ind in - let lc = mis_constr_nargs indsp in PrintingLet.active (indsp,lc) -let force_if ci = - let indsp = ci.ci_ind in - let lc = mis_constr_nargs indsp in PrintingIf.active (indsp,lc) - -(* Options for printing or not wildcard and synthetisable types *) +(* Flags.for printing or not wildcard and synthetisable types *) open Goptions @@ -174,17 +167,18 @@ let computable p k = let _,ccl = decompose_lam p in noccur_between 1 (k+1) ccl - +let avoid_flag isgoal = if isgoal then Some true else None + let lookup_name_as_renamed env t s = let rec lookup avoid env_names n c = match kind_of_term c with | Prod (name,_,c') -> - (match concrete_name true avoid env_names name c' with + (match concrete_name (Some true) avoid env_names name c' with | (Name id,avoid') -> if id=s then (Some n) else lookup avoid' (add_name (Name id) env_names) (n+1) c' | (Anonymous,avoid') -> lookup avoid' env_names (n+1) (pop c')) | LetIn (name,_,_,c') -> - (match concrete_name true avoid env_names name c' with + (match concrete_name (Some true) avoid env_names name c' with | (Name id,avoid') -> if id=s then (Some n) else lookup avoid' (add_name (Name id) env_names) (n+1) c' @@ -196,15 +190,28 @@ let lookup_name_as_renamed env t s = let lookup_index_as_renamed env t n = let rec lookup n d c = match kind_of_term c with | Prod (name,_,c') -> - (match concrete_name true [] empty_names_context name c' with + (match concrete_name (Some true) [] empty_names_context name c' with (Name _,_) -> lookup n (d+1) c' - | (Anonymous,_) -> if n=1 then Some d else lookup (n-1) (d+1) c') + | (Anonymous,_) -> + if n=0 then + Some (d-1) + else if n=1 then + Some d + else + lookup (n-1) (d+1) c') | LetIn (name,_,_,c') -> - (match concrete_name true [] empty_names_context name c' with + (match concrete_name (Some true) [] empty_names_context name c' with | (Name _,_) -> lookup n (d+1) c' - | (Anonymous,_) -> if n=1 then Some d else lookup (n-1) (d+1) c') + | (Anonymous,_) -> + if n=0 then + Some (d-1) + else if n=1 then + Some d + else + lookup (n-1) (d+1) c' + ) | Cast (c,_,_) -> lookup n d c - | _ -> None + | _ -> if n=0 then Some (d-1) else None in lookup n 1 t (**********************************************************************) @@ -227,7 +234,7 @@ let rec decomp_branch n nal b (avoid,env as e) c = | _ -> Name (id_of_string "x"),(applist (lift 1 c, [mkRel 1])), concrete_name in - let na',avoid' = f b avoid env na c in + let na',avoid' = f (Some b) avoid env na c in decomp_branch (n-1) (na'::nal) b (avoid',add_name na' env) c let rec build_tree na isgoal e ci cl = @@ -266,15 +273,15 @@ and contract_branch isgoal e (cn,mkpat,b) = let is_nondep_branch c n = try - let _,ccl = decompose_lam_n_assum n c in - noccur_between 1 n ccl + let sign,ccl = decompose_lam_n_assum n c in + noccur_between 1 (rel_context_length sign) ccl with _ -> (* Not eta-expanded or not reduced *) false let extract_nondep_branches test c b n = let rec strip n r = if n=0 then r else match r with - | RLambda (_,_,_,t) -> strip (n-1) t + | RLambda (_,_,_,_,t) -> strip (n-1) t | RLetIn (_,_,_,t) -> strip (n-1) t | _ -> assert false in if test c n then Some (strip n b) else None @@ -282,12 +289,14 @@ let extract_nondep_branches test c b n = let it_destRLambda_or_LetIn_names n c = let rec aux n nal c = if n=0 then (List.rev nal,c) else match c with - | RLambda (_,na,_,c) -> aux (n-1) (na::nal) c + | RLambda (_,na,_,_,c) -> aux (n-1) (na::nal) c | RLetIn (_,na,_,c) -> aux (n-1) (na::nal) c | _ -> (* eta-expansion *) let rec next l = let x = Nameops.next_ident_away (id_of_string "x") l in + (* Not efficient but unusual and no function to get free rawvars *) +(* if occur_rawconstr x c then next (x::l) else x in *) x in let x = next (free_rawvars c) in @@ -303,16 +312,16 @@ let detype_case computable detype detype_eqns testdep avoid data p c bl = let synth_type = synthetize_type () in let tomatch = detype c in let alias, aliastyp, pred= - if (not !Options.raw_print) & synth_type & computable & Array.length bl<>0 + if (not !Flags.raw_print) & synth_type & computable & Array.length bl<>0 then Anonymous, None, None else - match option_map detype p with + match Option.map detype p with | None -> Anonymous, None, None | Some p -> let nl,typ = it_destRLambda_or_LetIn_names k p in let n,typ = match typ with - | RLambda (_,x,t,c) -> x, c + | RLambda (_,x,_,t,c) -> x, c | _ -> Anonymous, typ in let aliastyp = if List.for_all ((=) Anonymous) nl then None @@ -323,8 +332,10 @@ let detype_case computable detype detype_eqns testdep avoid data p c bl = let eqnl = detype_eqns constructs consnargsl bl in let tag = try - if !Options.raw_print then + if !Flags.raw_print then RegularStyle + else if st = LetPatternStyle then + st else if PrintingLet.active (indsp,consnargsl) then LetStyle else if PrintingIf.active (indsp,consnargsl) then @@ -344,11 +355,11 @@ let detype_case computable detype detype_eqns testdep avoid data p c bl = array_map3 (extract_nondep_branches testdep) bl bl' consnargsl in if array_for_all ((<>) None) nondepbrs then RIf (dl,tomatch,(alias,pred), - out_some nondepbrs.(0),out_some nondepbrs.(1)) + Option.get nondepbrs.(0),Option.get nondepbrs.(1)) else - RCases (dl,pred,[tomatch,(alias,aliastyp)],eqnl) + RCases (dl,tag,pred,[tomatch,(alias,aliastyp)],eqnl) | _ -> - RCases (dl,pred,[tomatch,(alias,aliastyp)],eqnl) + RCases (dl,tag,pred,[tomatch,(alias,aliastyp)],eqnl) let detype_sort = function | Prop c -> RProp c @@ -448,14 +459,14 @@ and share_names isgoal n l avoid env c t = let t = detype isgoal avoid env t in let id = next_name_away na avoid in let avoid = id::avoid and env = add_name (Name id) env in - share_names isgoal (n-1) ((Name id,None,t)::l) avoid env c c' + share_names isgoal (n-1) ((Name id,Explicit,None,t)::l) avoid env c c' (* May occur for fix built interactively *) | LetIn (na,b,t',c), _ when n > 0 -> let t' = detype isgoal avoid env t' in let b = detype isgoal avoid env b in let id = next_name_away na avoid in let avoid = id::avoid and env = add_name (Name id) env in - share_names isgoal n ((Name id,Some b,t')::l) avoid env c t + share_names isgoal n ((Name id,Explicit,Some b,t')::l) avoid env c t (* Only if built with the f/n notation or w/o let-expansion in types *) | _, LetIn (_,b,_,t) when n > 0 -> share_names isgoal n l avoid env c (subst1 b t) @@ -465,7 +476,7 @@ and share_names isgoal n l avoid env c t = let id = next_name_away na' avoid in let avoid = id::avoid and env = add_name (Name id) env in let appc = mkApp (lift 1 c,[|mkRel 1|]) in - share_names isgoal (n-1) ((Name id,None,t')::l) avoid env appc c' + share_names isgoal (n-1) ((Name id,Explicit,None,t')::l) avoid env appc c' (* If built with the f/n notation: we renounce to share names *) | _ -> if n>0 then warning "Detyping.detype: cannot factorize fix enough"; @@ -475,7 +486,7 @@ and share_names isgoal n l avoid env c t = and detype_eqns isgoal avoid env ci computable constructs consnargsl bl = try - if !Options.raw_print or not (reverse_matching ()) then raise Exit; + if !Flags.raw_print or not (reverse_matching ()) then raise Exit; let mat = build_tree Anonymous isgoal (avoid,env) ci bl in List.map (fun (pat,((avoid,env),c)) -> (dl,[],[pat],detype isgoal avoid env c)) mat @@ -488,7 +499,7 @@ and detype_eqn isgoal avoid env constr construct_nargs branch = if force_wildcard () & noccurn 1 b then PatVar (dl,Anonymous),avoid,(add_name Anonymous env),ids else - let id = next_name_away_with_default "x" x avoid in + let id = next_name_away_in_cases_pattern x avoid in PatVar (dl,Name id),id::avoid,(add_name (Name id) env),id::ids in let rec buildrec ids patlist avoid env n b = @@ -523,15 +534,31 @@ and detype_eqn isgoal avoid env constr construct_nargs branch = and detype_binder isgoal bk avoid env na ty c = let na',avoid' = if bk = BLetIn then - concrete_let_name isgoal avoid env na c + concrete_let_name (avoid_flag isgoal) avoid env na c else - concrete_name isgoal avoid env na c in + concrete_name (avoid_flag isgoal) avoid env na c in let r = detype isgoal avoid' (add_name na' env) c in match bk with - | BProd -> RProd (dl, na',detype isgoal avoid env ty, r) - | BLambda -> RLambda (dl, na',detype isgoal avoid env ty, r) + | BProd -> RProd (dl, na',Explicit,detype isgoal avoid env ty, r) + | BLambda -> RLambda (dl, na',Explicit,detype isgoal avoid env ty, r) | BLetIn -> RLetIn (dl, na',detype isgoal avoid env ty, r) +let rec detype_rel_context where avoid env sign = + let where = Option.map (fun c -> it_mkLambda_or_LetIn c sign) where in + let rec aux avoid env = function + | [] -> [] + | (na,b,t)::rest -> + let na',avoid' = + match where with + | None -> na,avoid + | Some c -> + if b<>None then concrete_let_name None avoid env na c + else concrete_name None avoid env na c in + let b = Option.map (detype false avoid env) b in + let t = detype false avoid env t in + (na',Explicit,b,t) :: aux avoid' (add_name na' env) rest + in aux avoid env (List.rev sign) + (**********************************************************************) (* Module substitution: relies on detyping *) @@ -561,27 +588,27 @@ let rec subst_rawconstr subst raw = if r' == r && rl' == rl then raw else RApp(loc,r',rl') - | RLambda (loc,n,r1,r2) -> + | RLambda (loc,n,bk,r1,r2) -> let r1' = subst_rawconstr subst r1 and r2' = subst_rawconstr subst r2 in if r1' == r1 && r2' == r2 then raw else - RLambda (loc,n,r1',r2') + RLambda (loc,n,bk,r1',r2') - | RProd (loc,n,r1,r2) -> + | RProd (loc,n,bk,r1,r2) -> let r1' = subst_rawconstr subst r1 and r2' = subst_rawconstr subst r2 in if r1' == r1 && r2' == r2 then raw else - RProd (loc,n,r1',r2') + RProd (loc,n,bk,r1',r2') | RLetIn (loc,n,r1,r2) -> let r1' = subst_rawconstr subst r1 and r2' = subst_rawconstr subst r2 in if r1' == r1 && r2' == r2 then raw else RLetIn (loc,n,r1',r2') - | RCases (loc,rtno,rl,branches) -> - let rtno' = option_smartmap (subst_rawconstr subst) rtno + | RCases (loc,sty,rtno,rl,branches) -> + let rtno' = Option.smartmap (subst_rawconstr subst) rtno and rl' = list_smartmap (fun (a,x as y) -> let a' = subst_rawconstr subst a in let (n,topt) = x in - let topt' = option_smartmap + let topt' = Option.smartmap (fun (loc,(sp,i),x,y as t) -> let sp' = subst_kn subst sp in if sp == sp' then t else (loc,(sp',i),x,y)) topt in @@ -596,17 +623,17 @@ let rec subst_rawconstr subst raw = branches in if rtno' == rtno && rl' == rl && branches' == branches then raw else - RCases (loc,rtno',rl',branches') + RCases (loc,sty,rtno',rl',branches') | RLetTuple (loc,nal,(na,po),b,c) -> - let po' = option_smartmap (subst_rawconstr subst) po + let po' = Option.smartmap (subst_rawconstr subst) po and b' = subst_rawconstr subst b and c' = subst_rawconstr subst c in if po' == po && b' == b && c' == c then raw else RLetTuple (loc,nal,(na,po'),b',c') - + | RIf (loc,c,(na,po),b1,b2) -> - let po' = option_smartmap (subst_rawconstr subst) po + let po' = Option.smartmap (subst_rawconstr subst) po and b1' = subst_rawconstr subst b1 and b2' = subst_rawconstr subst b2 and c' = subst_rawconstr subst c in @@ -617,10 +644,10 @@ let rec subst_rawconstr subst raw = let ra1' = array_smartmap (subst_rawconstr subst) ra1 and ra2' = array_smartmap (subst_rawconstr subst) ra2 in let bl' = array_smartmap - (list_smartmap (fun (na,obd,ty as dcl) -> + (list_smartmap (fun (na,k,obd,ty as dcl) -> let ty' = subst_rawconstr subst ty in - let obd' = option_smartmap (subst_rawconstr subst) obd in - if ty'==ty & obd'==obd then dcl else (na,obd',ty'))) + let obd' = Option.smartmap (subst_rawconstr subst) obd in + if ty'==ty & obd'==obd then dcl else (na,k,obd',ty'))) bl in if ra1' == ra1 && ra2' == ra2 && bl'==bl then raw else RRec (loc,fix,ida,bl',ra1',ra2') @@ -631,8 +658,8 @@ let rec subst_rawconstr subst raw = let ref',_ = subst_global subst ref in if ref' == ref then raw else RHole (loc,InternalHole) - | RHole (loc, (BinderType _ | QuestionMark _ | CasesType | - InternalHole | TomatchTypeParameter _)) -> raw + | RHole (loc, (BinderType _ | QuestionMark _ | CasesType | InternalHole | + TomatchTypeParameter _ | GoalEvar | ImpossibleCase)) -> raw | RCast (loc,r1,k) -> (match k with diff --git a/pretyping/detyping.mli b/pretyping/detyping.mli index 7ac7162f..23090858 100644 --- a/pretyping/detyping.mli +++ b/pretyping/detyping.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: detyping.mli 9976 2007-07-12 11:58:30Z msozeau $ i*) +(*i $Id: detyping.mli 10410 2007-12-31 13:11:55Z msozeau $ i*) (*i*) open Util @@ -40,6 +40,9 @@ val detype_case : val detype_sort : sorts -> rawsort +val detype_rel_context : constr option -> identifier list -> names_context -> + rel_context -> rawdecl list + (* look for the index of a named var or a nondep var as it is renamed *) val lookup_name_as_renamed : env -> constr -> identifier -> int option val lookup_index_as_renamed : env -> constr -> int -> int option @@ -47,8 +50,6 @@ val lookup_index_as_renamed : env -> constr -> int -> int option val set_detype_anonymous : (loc -> int -> rawconstr) -> unit val force_wildcard : unit -> bool val synthetize_type : unit -> bool -val force_if : case_info -> bool -val force_let : case_info -> bool (* Utilities to transform kernel cases to simple pattern-matching problem *) @@ -57,4 +58,3 @@ val simple_cases_matrix_of_branches : inductive -> int list -> rawconstr list -> cases_clauses val return_type_of_predicate : inductive -> int -> int -> rawconstr -> predicate_pattern * rawconstr option - diff --git a/pretyping/evarconv.ml b/pretyping/evarconv.ml index 2764633b..58951302 100644 --- a/pretyping/evarconv.ml +++ b/pretyping/evarconv.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: evarconv.ml 9665 2007-02-21 17:08:10Z herbelin $ *) +(* $Id: evarconv.ml 11157 2008-06-21 10:45:51Z herbelin $ *) open Pp open Util @@ -43,55 +43,28 @@ let eval_flexible_term env c = match kind_of_term c with | Const c -> constant_opt_value env c | Rel n -> - (try let (_,v,_) = lookup_rel n env in option_map (lift n) v + (try let (_,v,_) = lookup_rel n env in Option.map (lift n) v with Not_found -> None) | Var id -> (try let (_,v,_) = lookup_named id env in v with Not_found -> None) | LetIn (_,b,_,c) -> Some (subst1 b c) | Lambda _ -> Some c | _ -> assert false -(* -let rec apprec_nobeta env sigma s = - let (t,stack as s) = whd_state s in - match kind_of_term (fst s) with - | Case (ci,p,d,lf) -> - let (cr,crargs) = whd_betadeltaiota_stack env sigma d in - let rslt = mkCase (ci, p, applist (cr,crargs), lf) in - if reducible_mind_case cr then - apprec_nobeta env sigma (rslt, stack) - else - s - | Fix fix -> - (match reduce_fix (whd_betadeltaiota_state env sigma) fix stack with - | Reduced s -> apprec_nobeta env sigma s - | NotReducible -> s) - | _ -> s - -let evar_apprec_nobeta env isevars stack c = - let rec aux s = - let (t,stack as s') = apprec_nobeta env (evars_of isevars) s in - match kind_of_term t with - | Evar (n,_ as ev) when Evd.is_defined (evars_of isevars) n -> - aux (Evd.existential_value (evars_of isevars) ev, stack) - | _ -> (t, list_of_stack stack) - in aux (c, append_stack (Array.of_list stack) empty_stack) -*) -let evar_apprec env isevars stack c = - let sigma = evars_of isevars in +let evar_apprec env evd stack c = + let sigma = evars_of evd in let rec aux s = - let (t,stack) = Reductionops.apprec env sigma s in + let (t,stack) = whd_betaiota_deltazeta_for_iota_state env sigma s in match kind_of_term t with - | Evar (n,_ as ev) when Evd.is_defined sigma n -> + | Evar (evk,_ as ev) when Evd.is_defined sigma evk -> aux (Evd.existential_value sigma ev, stack) | _ -> (t, list_of_stack stack) in aux (c, append_stack_list stack empty_stack) -let apprec_nohdbeta env isevars c = - let (t,stack as s) = Reductionops.whd_stack c in - match kind_of_term t with - | (Case _ | Fix _) -> evar_apprec env isevars [] c - | _ -> s +let apprec_nohdbeta env evd c = + match kind_of_term (fst (Reductionops.whd_stack c)) with + | (Case _ | Fix _) -> applist (evar_apprec env evd [] c) + | _ -> c (* [check_conv_record (t1,l1) (t2,l2)] tries to decompose the problem (t1 l1) = (t2 l2) into a problem @@ -116,84 +89,96 @@ let apprec_nohdbeta env isevars c = let check_conv_record (t1,l1) (t2,l2) = try let proji = global_of_constr t1 in - let cstr = global_of_constr t2 in - let { o_DEF = c; o_TABS = bs; o_TPARAMS = params; o_TCOMPS = us } = - lookup_canonical_conversion (proji, cstr) in + let canon_s,l2_effective = + try + match kind_of_term t2 with + Prod (_,a,b) -> (* assert (l2=[]); *) + if dependent (mkRel 1) b then raise Not_found + else lookup_canonical_conversion (proji, Prod_cs),[a;pop b] + | Sort s -> + lookup_canonical_conversion + (proji, Sort_cs (family_of_sort s)),[] + | _ -> + let c2 = try global_of_constr t2 with _ -> raise Not_found in + lookup_canonical_conversion (proji, Const_cs c2),l2 + with Not_found -> + lookup_canonical_conversion (proji,Default_cs),[] + in + let { o_DEF = c; o_INJ=n; o_TABS = bs; o_TPARAMS = params; o_TCOMPS = us } + = canon_s in let params1, c1, extra_args1 = match list_chop (List.length params) l1 with | params1, c1::extra_args1 -> params1, c1, extra_args1 | _ -> assert false in - let us2,extra_args2 = list_chop (List.length us) l2 in - c,bs,(params,params1),(us,us2),(extra_args1,extra_args2),c1 + let us2,extra_args2 = list_chop (List.length us) l2_effective in + c,bs,(params,params1),(us,us2),(extra_args1,extra_args2),c1, + (n,applist(t2,l2)) with _ -> raise Not_found (* Precondition: one of the terms of the pb is an uninstantiated evar, * possibly applied to arguments. *) -let rec ise_try isevars = function +let rec ise_try evd = function [] -> assert false - | [f] -> f isevars + | [f] -> f evd | f1::l -> - let (isevars',b) = f1 isevars in - if b then (isevars',b) else ise_try isevars l + let (evd',b) = f1 evd in + if b then (evd',b) else ise_try evd l -let ise_and isevars l = +let ise_and evd l = let rec ise_and i = function [] -> assert false | [f] -> f i | f1::l -> let (i',b) = f1 i in - if b then ise_and i' l else (isevars,false) in - ise_and isevars l + if b then ise_and i' l else (evd,false) in + ise_and evd l -let ise_list2 isevars f l1 l2 = +let ise_list2 evd f l1 l2 = let rec ise_list2 i l1 l2 = match l1,l2 with [], [] -> (i, true) | [x], [y] -> f i x y | x::l1, y::l2 -> let (i',b) = f i x y in - if b then ise_list2 i' l1 l2 else (isevars,false) - | _ -> (isevars, false) in - ise_list2 isevars l1 l2 + if b then ise_list2 i' l1 l2 else (evd,false) + | _ -> (evd, false) in + ise_list2 evd l1 l2 -let ise_array2 isevars f v1 v2 = +let ise_array2 evd f v1 v2 = let rec allrec i = function | -1 -> (i,true) | n -> let (i',b) = f i v1.(n) v2.(n) in - if b then allrec i' (n-1) else (isevars,false) + if b then allrec i' (n-1) else (evd,false) in let lv1 = Array.length v1 in - if lv1 = Array.length v2 then allrec isevars (pred lv1) - else (isevars,false) + if lv1 = Array.length v2 then allrec evd (pred lv1) + else (evd,false) -let rec evar_conv_x env isevars pbty term1 term2 = - let sigma = evars_of isevars in +let rec evar_conv_x env evd pbty term1 term2 = + let sigma = evars_of evd in let term1 = whd_castappevar sigma term1 in let term2 = whd_castappevar sigma term2 in -(* - if eq_constr term1 term2 then - true - else -*) (* Maybe convertible but since reducing can erase evars which [evar_apprec] could have found, we do it only if the terms are free of evar. Note: incomplete heuristic... *) - if is_ground_term isevars term1 && is_ground_term isevars term2 & - is_fconv pbty env (evars_of isevars) term1 term2 then - (isevars,true) - else if is_undefined_evar isevars term1 then - solve_simple_eqn evar_conv_x env isevars (pbty,destEvar term1,term2) - else if is_undefined_evar isevars term2 then - solve_simple_eqn evar_conv_x env isevars (pbty,destEvar term2,term1) - else - let (t1,l1) = apprec_nohdbeta env isevars term1 in - let (t2,l2) = apprec_nohdbeta env isevars term2 in - evar_eqappr_x env isevars pbty (t1,l1) (t2,l2) - -and evar_eqappr_x env isevars pbty (term1,l1 as appr1) (term2,l2 as appr2) = + if is_ground_term evd term1 && is_ground_term evd term2 & + is_fconv pbty env (evars_of evd) term1 term2 + then + (evd,true) + else + let term1 = apprec_nohdbeta env evd term1 in + let term2 = apprec_nohdbeta env evd term2 in + if is_undefined_evar evd term1 then + solve_simple_eqn evar_conv_x env evd (pbty,destEvar term1,term2) + else if is_undefined_evar evd term2 then + solve_simple_eqn evar_conv_x env evd (pbty,destEvar term2,term1) + else + evar_eqappr_x env evd pbty (decompose_app term1) (decompose_app term2) + +and evar_eqappr_x env evd pbty (term1,l1 as appr1) (term2,l2 as appr2) = (* Evar must be undefined since we have whd_ised *) match (flex_kind_of_term term1 l1, flex_kind_of_term term2 l2) with | Flexible (sp1,al1 as ev1), Flexible (sp2,al2 as ev2) -> @@ -215,25 +200,25 @@ and evar_eqappr_x env isevars pbty (term1,l1 as appr1) (term2,l2 as appr2) = and f2 i = if sp1 = sp2 then ise_and i - [(fun i -> ise_array2 i - (fun i -> evar_conv_x env i CONV) al1 al2); - (fun i -> ise_list2 i - (fun i -> evar_conv_x env i CONV) l1 l2)] + [(fun i -> ise_list2 i + (fun i -> evar_conv_x env i CONV) l1 l2); + (fun i -> solve_refl evar_conv_x env i sp1 al1 al2, + true)] else (i,false) in - ise_try isevars [f1; f2] + ise_try evd [f1; f2] | Flexible ev1, MaybeFlexible flex2 -> let f1 i = if - is_unification_pattern_evar ev1 l1 & - not (occur_evar (fst ev1) (applist (term2,l2))) + is_unification_pattern_evar env ev1 l1 & + not (occur_evar (fst ev1) (applist appr2)) then (* Miller-Pfenning's patterns unification *) (* Preserve generality (except that CCI has no eta-conversion) *) - let t2 = nf_evar (evars_of isevars) (applist(term2,l2)) in + let t2 = nf_evar (evars_of evd) (applist appr2) in let t2 = solve_pattern_eqn env l1 t2 in - solve_simple_eqn evar_conv_x env isevars (pbty,ev1,t2) + solve_simple_eqn evar_conv_x env evd (pbty,ev1,t2) else if List.length l1 <= List.length l2 then @@ -253,19 +238,19 @@ and evar_eqappr_x env isevars pbty (term1,l1 as appr1) (term2,l2 as appr2) = evar_eqappr_x env i pbty appr1 (evar_apprec env i l2 v2) | None -> (i,false) in - ise_try isevars [f1; f4] + ise_try evd [f1; f4] | MaybeFlexible flex1, Flexible ev2 -> let f1 i = if - is_unification_pattern_evar ev2 l2 & - not (occur_evar (fst ev2) (applist (term1,l1))) + is_unification_pattern_evar env ev2 l2 & + not (occur_evar (fst ev2) (applist appr1)) then (* Miller-Pfenning's patterns unification *) (* Preserve generality (except that CCI has no eta-conversion) *) - let t1 = nf_evar (evars_of isevars) (applist(term1,l1)) in + let t1 = nf_evar (evars_of evd) (applist appr1) in let t1 = solve_pattern_eqn env l2 t1 in - solve_simple_eqn evar_conv_x env isevars (pbty,ev2,t1) + solve_simple_eqn evar_conv_x env evd (pbty,ev2,t1) else if List.length l2 <= List.length l1 then @@ -284,7 +269,7 @@ and evar_eqappr_x env isevars pbty (term1,l1 as appr1) (term2,l2 as appr2) = evar_eqappr_x env i pbty (evar_apprec env i l1 v1) appr2 | None -> (i,false) in - ise_try isevars [f1; f4] + ise_try evd [f1; f4] | MaybeFlexible flex1, MaybeFlexible flex2 -> let f2 i = @@ -313,36 +298,36 @@ and evar_eqappr_x env isevars pbty (term1,l1 as appr1) (term2,l2 as appr2) = evar_eqappr_x env i pbty (evar_apprec env i l1 v1) appr2 | None -> (i,false) in - ise_try isevars [f2; f3; f4] + ise_try evd [f2; f3; f4] | Flexible ev1, Rigid _ -> if - is_unification_pattern_evar ev1 l1 & - not (occur_evar (fst ev1) (applist (term2,l2))) + is_unification_pattern_evar env ev1 l1 & + not (occur_evar (fst ev1) (applist appr2)) then (* Miller-Pfenning's patterns unification *) (* Preserve generality (except that CCI has no eta-conversion) *) - let t2 = nf_evar (evars_of isevars) (applist(term2,l2)) in + let t2 = nf_evar (evars_of evd) (applist appr2) in let t2 = solve_pattern_eqn env l1 t2 in - solve_simple_eqn evar_conv_x env isevars (pbty,ev1,t2) + solve_simple_eqn evar_conv_x env evd (pbty,ev1,t2) else (* Postpone the use of an heuristic *) - add_conv_pb (pbty,env,applist(term1,l1),applist(term2,l2)) isevars, + add_conv_pb (pbty,env,applist appr1,applist appr2) evd, true | Rigid _, Flexible ev2 -> if - is_unification_pattern_evar ev2 l2 & - not (occur_evar (fst ev2) (applist (term1,l1))) + is_unification_pattern_evar env ev2 l2 & + not (occur_evar (fst ev2) (applist appr1)) then (* Miller-Pfenning's patterns unification *) (* Preserve generality (except that CCI has no eta-conversion) *) - let t1 = nf_evar (evars_of isevars) (applist(term1,l1)) in + let t1 = nf_evar (evars_of evd) (applist appr1) in let t1 = solve_pattern_eqn env l2 t1 in - solve_simple_eqn evar_conv_x env isevars (pbty,ev2,t1) + solve_simple_eqn evar_conv_x env evd (pbty,ev2,t1) else (* Postpone the use of an heuristic *) - add_conv_pb (pbty,env,applist(term1,l1),applist(term2,l2)) isevars, + add_conv_pb (pbty,env,applist appr1,applist appr2) evd, true | MaybeFlexible flex1, Rigid _ -> @@ -355,7 +340,7 @@ and evar_eqappr_x env isevars pbty (term1,l1 as appr1) (term2,l2 as appr2) = evar_eqappr_x env i pbty (evar_apprec env i l1 v1) appr2 | None -> (i,false) in - ise_try isevars [f3; f4] + ise_try evd [f3; f4] | Rigid _ , MaybeFlexible flex2 -> let f3 i = @@ -367,19 +352,19 @@ and evar_eqappr_x env isevars pbty (term1,l1 as appr1) (term2,l2 as appr2) = evar_eqappr_x env i pbty appr1 (evar_apprec env i l2 v2) | None -> (i,false) in - ise_try isevars [f3; f4] + ise_try evd [f3; f4] | Rigid c1, Rigid c2 -> match kind_of_term c1, kind_of_term c2 with - | Cast (c1,_,_), _ -> evar_eqappr_x env isevars pbty (c1,l1) appr2 + | Cast (c1,_,_), _ -> evar_eqappr_x env evd pbty (c1,l1) appr2 - | _, Cast (c2,_,_) -> evar_eqappr_x env isevars pbty appr1 (c2,l2) + | _, Cast (c2,_,_) -> evar_eqappr_x env evd pbty appr1 (c2,l2) | Sort s1, Sort s2 when l1=[] & l2=[] -> - (isevars,base_sort_cmp pbty s1 s2) + (evd,base_sort_cmp pbty s1 s2) | Lambda (na,c1,c'1), Lambda (_,c2,c'2) when l1=[] & l2=[] -> - ise_and isevars + ise_and evd [(fun i -> evar_conv_x env i CONV c1 c2); (fun i -> let c = nf_evar (evars_of i) c1 in @@ -400,18 +385,18 @@ and evar_eqappr_x env isevars pbty (term1,l1 as appr1) (term2,l2 as appr2) = and appr2 = evar_apprec env i l2 (subst1 b2 c'2) in evar_eqappr_x env i pbty appr1 appr2 in - ise_try isevars [f1; f2] + ise_try evd [f1; f2] | LetIn (_,b1,_,c'1), _ ->(* On fait commuter les args avec le Let *) - let appr1 = evar_apprec env isevars l1 (subst1 b1 c'1) - in evar_eqappr_x env isevars pbty appr1 appr2 + let appr1 = evar_apprec env evd l1 (subst1 b1 c'1) + in evar_eqappr_x env evd pbty appr1 appr2 | _, LetIn (_,b2,_,c'2) -> - let appr2 = evar_apprec env isevars l2 (subst1 b2 c'2) - in evar_eqappr_x env isevars pbty appr1 appr2 + let appr2 = evar_apprec env evd l2 (subst1 b2 c'2) + in evar_eqappr_x env evd pbty appr1 appr2 | Prod (n,c1,c'1), Prod (_,c2,c'2) when l1=[] & l2=[] -> - ise_and isevars + ise_and evd [(fun i -> evar_conv_x env i CONV c1 c2); (fun i -> let c = nf_evar (evars_of i) c1 in @@ -419,16 +404,16 @@ and evar_eqappr_x env isevars pbty (term1,l1 as appr1) (term2,l2 as appr2) = | Ind sp1, Ind sp2 -> if sp1=sp2 then - ise_list2 isevars (fun i -> evar_conv_x env i CONV) l1 l2 - else (isevars, false) + ise_list2 evd (fun i -> evar_conv_x env i CONV) l1 l2 + else (evd, false) | Construct sp1, Construct sp2 -> if sp1=sp2 then - ise_list2 isevars (fun i -> evar_conv_x env i CONV) l1 l2 - else (isevars, false) + ise_list2 evd (fun i -> evar_conv_x env i CONV) l1 l2 + else (evd, false) | Case (_,p1,c1,cl1), Case (_,p2,c2,cl2) -> - ise_and isevars + ise_and evd [(fun i -> evar_conv_x env i CONV p1 p2); (fun i -> evar_conv_x env i CONV c1 c2); (fun i -> ise_array2 i @@ -437,7 +422,7 @@ and evar_eqappr_x env isevars pbty (term1,l1 as appr1) (term2,l2 as appr2) = | Fix (li1,(_,tys1,bds1 as recdef1)), Fix (li2,(_,tys2,bds2)) -> if li1=li2 then - ise_and isevars + ise_and evd [(fun i -> ise_array2 i (fun i -> evar_conv_x env i CONV) tys1 tys2); (fun i -> ise_array2 i @@ -445,10 +430,10 @@ and evar_eqappr_x env isevars pbty (term1,l1 as appr1) (term2,l2 as appr2) = bds1 bds2); (fun i -> ise_list2 i (fun i -> evar_conv_x env i CONV) l1 l2)] - else (isevars,false) + else (evd,false) | CoFix (i1,(_,tys1,bds1 as recdef1)), CoFix (i2,(_,tys2,bds2)) -> if i1=i2 then - ise_and isevars + ise_and evd [(fun i -> ise_array2 i (fun i -> evar_conv_x env i CONV) tys1 tys2); (fun i -> ise_array2 i @@ -456,30 +441,31 @@ and evar_eqappr_x env isevars pbty (term1,l1 as appr1) (term2,l2 as appr2) = bds1 bds2); (fun i -> ise_list2 i (fun i -> evar_conv_x env i CONV) l1 l2)] - else (isevars,false) + else (evd,false) - | (Meta _ | Lambda _), _ -> (isevars,false) - | _, (Meta _ | Lambda _) -> (isevars,false) + | (Meta _ | Lambda _), _ -> (evd,false) + | _, (Meta _ | Lambda _) -> (evd,false) - | (Ind _ | Construct _ | Sort _ | Prod _), _ -> (isevars,false) - | _, (Ind _ | Construct _ | Sort _ | Prod _) -> (isevars,false) + | (Ind _ | Construct _ | Sort _ | Prod _), _ -> (evd,false) + | _, (Ind _ | Construct _ | Sort _ | Prod _) -> (evd,false) | (App _ | Case _ | Fix _ | CoFix _), - (App _ | Case _ | Fix _ | CoFix _) -> (isevars,false) + (App _ | Case _ | Fix _ | CoFix _) -> (evd,false) | (Rel _ | Var _ | Const _ | Evar _), _ -> assert false | _, (Rel _ | Var _ | Const _ | Evar _) -> assert false -and conv_record env isevars (c,bs,(params,params1),(us,us2),(ts,ts1),c1) = - let (isevars',ks) = +and conv_record env evd (c,bs,(params,params1),(us,us2),(ts,ts1),c1,(n,t2)) = + let (evd',ks,_) = List.fold_left - (fun (i,ks) b -> + (fun (i,ks,m) b -> + if m=0 then (i,t2::ks, n-1) else let dloc = (dummy_loc,InternalHole) in let (i',ev) = new_evar i env ~src:dloc (substl ks b) in - (i', ev :: ks)) - (isevars,[]) bs + (i', ev :: ks, n - 1)) + (evd,[],n) bs in - ise_and isevars' + ise_and evd' [(fun i -> ise_list2 i (fun i u1 u -> evar_conv_x env i CONV u1 (substl ks u)) @@ -491,65 +477,80 @@ and conv_record env isevars (c,bs,(params,params1),(us,us2),(ts,ts1),c1) = (fun i -> ise_list2 i (fun i -> evar_conv_x env i CONV) ts ts1); (fun i -> evar_conv_x env i CONV c1 (applist (c,(List.rev ks))))] -let first_order_unification env isevars pbty (term1,l1) (term2,l2) = +(* We assume here |l1| <= |l2| *) + +let first_order_unification env evd (ev1,l1) (term2,l2) = + let (deb2,rest2) = list_chop (List.length l2-List.length l1) l2 in + ise_and evd + (* First compare extra args for better failure message *) + [(fun i -> ise_list2 i (fun i -> evar_conv_x env i CONV) rest2 l1); + (fun i -> + (* Then instantiate evar unless already done by unifying args *) + let t2 = applist(term2,deb2) in + if is_defined_evar i ev1 then + evar_conv_x env i CONV t2 (mkEvar ev1) + else + solve_simple_eqn evar_conv_x env i (CONV,ev1,t2))] + +let choose_less_dependent_instance evk evd term args = + let evi = Evd.find (evars_of evd) evk in + let subst = make_pure_subst evi args in + let subst' = List.filter (fun (id,c) -> c = term) subst in + if subst' = [] then error "Too complex unification problem" else + Evd.evar_define evk (mkVar (fst (List.hd subst'))) evd + +let apply_conversion_problem_heuristic env evd pbty t1 t2 = + let t1 = apprec_nohdbeta env evd (whd_castappevar (evars_of evd) t1) in + let t2 = apprec_nohdbeta env evd (whd_castappevar (evars_of evd) t2) in + let (term1,l1 as appr1) = decompose_app t1 in + let (term2,l2 as appr2) = decompose_app t2 in match kind_of_term term1, kind_of_term term2 with - | Evar ev1,_ when List.length l1 <= List.length l2 -> - let (deb2,rest2) = list_chop (List.length l2-List.length l1) l2 in - ise_and isevars - (* First compare extra args for better failure message *) - [(fun i -> ise_list2 i (fun i -> evar_conv_x env i CONV) rest2 l1); - (fun i -> - (* Then instantiate evar unless already done by unifying args *) - let t2 = applist(term2,deb2) in - if is_defined_evar i ev1 then - evar_conv_x env i pbty t2 (mkEvar ev1) - else - solve_simple_eqn evar_conv_x env i (pbty,ev1,t2))] - | _,Evar ev2 when List.length l2 <= List.length l1 -> - let (deb1,rest1) = list_chop (List.length l1-List.length l2) l1 in - ise_and isevars - (* First compare extra args for better failure message *) - [(fun i -> ise_list2 i (fun i -> evar_conv_x env i CONV) rest1 l2); - (fun i -> - (* Then instantiate evar unless already done by unifying args *) - let t1 = applist(term1,deb1) in - if is_defined_evar i ev2 then - evar_conv_x env i pbty t1 (mkEvar ev2) - else - solve_simple_eqn evar_conv_x env i (pbty,ev2,t1))] - | _ -> - (* Some head evar have been instantiated *) - evar_conv_x env isevars pbty (applist(term1,l1)) (applist(term2,l2)) - -let consider_remaining_unif_problems env isevars = - let (isevars,pbs) = get_conv_pbs isevars (fun _ -> true) in + | Evar (evk1,args1), (Rel _|Var _) when l1 = [] & l2 = [] -> + (* The typical kind of constraint coming from patter-matching return + type inference *) + assert (array_for_all (fun a -> a = term2 or isEvar a) args1); + choose_less_dependent_instance evk1 evd term2 args1, true + | (Rel _|Var _), Evar (evk2,args2) when l1 = [] & l2 = [] -> + (* The typical kind of constraint coming from patter-matching return + type inference *) + assert (array_for_all ((=) term1) args2); + choose_less_dependent_instance evk2 evd term1 args2, true + | Evar ev1,_ when List.length l1 <= List.length l2 -> + (* On "?n t1 .. tn = u u1 .. u(n+p)", try first-order unification *) + first_order_unification env evd (ev1,l1) appr2 + | _,Evar ev2 when List.length l2 <= List.length l1 -> + (* On "u u1 .. u(n+p) = ?n t1 .. tn", try first-order unification *) + first_order_unification env evd (ev2,l2) appr1 + | _ -> + (* Some head evar have been instantiated, or unknown kind of problem *) + evar_conv_x env evd pbty t1 t2 + +let consider_remaining_unif_problems env evd = + let (evd,pbs) = extract_all_conv_pbs evd in List.fold_left - (fun (isevars,b as p) (pbty,env,t1,t2) -> - if b then first_order_unification env isevars pbty - (apprec_nohdbeta env isevars (whd_castappevar (evars_of isevars) t1)) - (apprec_nohdbeta env isevars (whd_castappevar (evars_of isevars) t2)) - else p) - (isevars,true) + (fun (evd,b as p) (pbty,env,t1,t2) -> + if b then apply_conversion_problem_heuristic env evd pbty t1 t2 else p) + (evd,true) pbs (* Main entry points *) -let the_conv_x env t1 t2 isevars = - match evar_conv_x env isevars CONV t1 t2 with +let the_conv_x env t1 t2 evd = + match evar_conv_x env evd CONV t1 t2 with (evd',true) -> evd' | _ -> raise Reduction.NotConvertible -let the_conv_x_leq env t1 t2 isevars = - match evar_conv_x env isevars CUMUL t1 t2 with +let the_conv_x_leq env t1 t2 evd = + match evar_conv_x env evd CUMUL t1 t2 with (evd', true) -> evd' | _ -> raise Reduction.NotConvertible -let e_conv env isevars t1 t2 = - match evar_conv_x env !isevars CONV t1 t2 with - (evd',true) -> isevars := evd'; true +let e_conv env evd t1 t2 = + match evar_conv_x env !evd CONV t1 t2 with + (evd',true) -> evd := evd'; true | _ -> false -let e_cumul env isevars t1 t2 = - match evar_conv_x env !isevars CUMUL t1 t2 with - (evd',true) -> isevars := evd'; true +let e_cumul env evd t1 t2 = + match evar_conv_x env !evd CUMUL t1 t2 with + (evd',true) -> evd := evd'; true | _ -> false diff --git a/pretyping/evarutil.ml b/pretyping/evarutil.ml index 16059d94..fafce268 100644 --- a/pretyping/evarutil.ml +++ b/pretyping/evarutil.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: evarutil.ml 10374 2007-12-13 13:16:52Z notin $ *) +(* $Id: evarutil.ml 11127 2008-06-14 15:39:46Z herbelin $ *) open Util open Pp @@ -16,10 +16,12 @@ open Univ open Term open Termops open Sign +open Pre_env open Environ open Evd open Reductionops open Pretype_errors +open Retyping (* Expanding existential variables (pretyping.ml) *) (* 1- whd_ise fails if an existential is undefined *) @@ -28,10 +30,10 @@ exception Uninstantiated_evar of existential_key let rec whd_ise sigma c = match kind_of_term c with - | Evar (ev,args) when Evd.mem sigma ev -> - if Evd.is_defined sigma ev then - whd_ise sigma (existential_value sigma (ev,args)) - else raise (Uninstantiated_evar ev) + | Evar (evk,args as ev) when Evd.mem sigma evk -> + if Evd.is_defined sigma evk then + whd_ise sigma (existential_value sigma ev) + else raise (Uninstantiated_evar evk) | _ -> c @@ -39,8 +41,8 @@ let rec whd_ise sigma c = let whd_castappevar_stack sigma c = let rec whrec (c, l as s) = match kind_of_term c with - | Evar (ev,args) when Evd.mem sigma ev & Evd.is_defined sigma ev -> - whrec (existential_value sigma (ev,args), l) + | Evar (evk,args as ev) when Evd.mem sigma evk & Evd.is_defined sigma evk + -> whrec (existential_value sigma ev, l) | Cast (c,_,_) -> whrec (c, l) | App (f,args) -> whrec (f, Array.fold_right (fun a l -> a::l) args l) | _ -> s @@ -55,6 +57,17 @@ let jl_nf_evar = Pretype_errors.jl_nf_evar let jv_nf_evar = Pretype_errors.jv_nf_evar let tj_nf_evar = Pretype_errors.tj_nf_evar +let nf_named_context_evar sigma ctx = + Sign.map_named_context (Reductionops.nf_evar sigma) ctx + +let nf_rel_context_evar sigma ctx = + Sign.map_rel_context (Reductionops.nf_evar sigma) ctx + +let nf_env_evar sigma env = + let nc' = nf_named_context_evar sigma (Environ.named_context env) in + let rel' = nf_rel_context_evar sigma (Environ.rel_context env) in + push_rel_context rel' (reset_with_named_context (val_of_named_context nc') env) + let nf_evar_info evc info = { info with evar_concl = Reductionops.nf_evar evc info.evar_concl; @@ -63,13 +76,13 @@ let nf_evar_info evc info = let nf_evars evm = Evd.fold (fun ev evi evm' -> Evd.add evm' ev (nf_evar_info evm evi)) evm Evd.empty -let nf_evar_defs isevars = Evd.evars_reset_evd (nf_evars (Evd.evars_of isevars)) isevars +let nf_evar_defs evd = Evd.evars_reset_evd (nf_evars (Evd.evars_of evd)) evd -let nf_isevar isevars = nf_evar (Evd.evars_of isevars) -let j_nf_isevar isevars = j_nf_evar (Evd.evars_of isevars) -let jl_nf_isevar isevars = jl_nf_evar (Evd.evars_of isevars) -let jv_nf_isevar isevars = jv_nf_evar (Evd.evars_of isevars) -let tj_nf_isevar isevars = tj_nf_evar (Evd.evars_of isevars) +let nf_isevar evd = nf_evar (Evd.evars_of evd) +let j_nf_isevar evd = j_nf_evar (Evd.evars_of evd) +let jl_nf_isevar evd = jl_nf_evar (Evd.evars_of evd) +let jv_nf_isevar evd = jv_nf_evar (Evd.evars_of evd) +let tj_nf_isevar evd = tj_nf_evar (Evd.evars_of evd) (**********************) (* Creating new metas *) @@ -85,8 +98,8 @@ let mk_new_meta () = mkMeta(new_meta()) let collect_evars emap c = let rec collrec acc c = match kind_of_term c with - | Evar (k,_) -> - if Evd.mem emap k & not (Evd.is_defined emap k) then k::acc + | Evar (evk,_) -> + if Evd.mem emap evk & not (Evd.is_defined emap evk) then evk::acc else (* No recursion on the evar instantiation *) acc | _ -> fold_constr collrec acc c in @@ -111,7 +124,7 @@ let evars_to_metas sigma (emap, c) = mkCast (mkMeta n, DEFAULTcast, ty) in let rec replace c = match kind_of_term c with - Evar (k,_ as ev) when Evd.mem emap' k -> change_exist ev + | Evar (evk,_ as ev) when Evd.mem emap' evk -> change_exist ev | _ -> map_constr replace c in (sigma', replace c) @@ -120,35 +133,11 @@ let evars_to_metas sigma (emap, c) = let non_instantiated sigma = let listev = to_list sigma in List.fold_left - (fun l (ev,evd) -> - if evd.evar_body = Evar_empty then - ((ev,nf_evar_info sigma evd)::l) else l) + (fun l (ev,evi) -> + if evi.evar_body = Evar_empty then + ((ev,nf_evar_info sigma evi)::l) else l) [] listev -(*************************************) -(* Metas *) - -let meta_value evd mv = - let rec valrec mv = - try - let b = meta_fvalue evd mv in - instance - (List.map (fun mv' -> (mv',valrec mv')) (Metaset.elements b.freemetas)) - b.rebus - with Anomaly _ | Not_found -> - mkMeta mv - in - valrec mv - -let meta_instance env b = - let c_sigma = - List.map - (fun mv -> (mv,meta_value env mv)) (Metaset.elements b.freemetas) - in - instance c_sigma b.rebus - -let nf_meta env c = meta_instance env (mk_freelisted c) - (**********************) (* Creating new evars *) (**********************) @@ -162,63 +151,108 @@ let new_untyped_evar = * functional operations on evar sets * *------------------------------------*) -(* All ids of sign must be distincts! *) -let new_evar_instance sign evd typ ?(src=(dummy_loc,InternalHole)) instance = - let ctxt = named_context_of_val sign in - assert (List.length instance = named_context_length ctxt); - if not (list_distinct (ids_of_named_context ctxt)) then - anomaly "new_evar_instance: two vars have the same name"; - let newev = new_untyped_evar() in - (evar_declare sign newev typ ~src:src evd, - mkEvar (newev,Array.of_list instance)) - -let make_evar_instance_with_rel env = - let n = rel_context_length (rel_context env) in - let vars = - fold_named_context - (fun env (id,b,_) l -> (* if b=None then *) mkVar id :: l (*else l*)) - env ~init:[] in - snd (fold_rel_context - (fun env (_,b,_) (i,l) -> - (i-1, (*if b=None then *) mkRel i :: l (*else l*))) - env ~init:(n,vars)) - -let make_subst env args = - snd (fold_named_context - (fun env (id,b,c) (args,l) -> - match b, args with - | (* None *) _ , a::rest -> (rest, (id,a)::l) -(* | Some _, _ -> g*) - | _ -> anomaly "Instance does not match its signature") - env ~init:(List.rev args,[])) - -(* [new_isevar] declares a new existential in an env env with type typ *) +let new_evar_instance sign evd typ ?(src=(dummy_loc,InternalHole)) ?filter instance = + let instance = + match filter with + | None -> instance + | Some filter -> snd (list_filter2 (fun b c -> b) (filter,instance)) in + assert + (let ctxt = named_context_of_val sign in + list_distinct (ids_of_named_context ctxt)); + let newevk = new_untyped_evar() in + let evd = evar_declare sign newevk typ ~src:src ?filter evd in + (evd,mkEvar (newevk,Array.of_list instance)) + +(* Knowing that [Gamma |- ev : T] and that [ev] is applied to [args], + * [make_projectable_subst ev args] builds the substitution [Gamma:=args]. + * If a variable and an alias of it are bound to the same instance, we skip + * the alias (we just use eq_constr -- instead of conv --, since anyway, + * only instances that are variables -- or evars -- are later considered; + * morever, we can bet that similar instances came at some time from + * the very same substitution. The removal of aliased duplicates is + * useful to ensure the uniqueness of a projection. +*) + +let make_projectable_subst sigma evi args = + let sign = evar_filtered_context evi in + let rec alias_of_var id = + match pi2 (Sign.lookup_named id sign) with + | Some t when isVar t -> alias_of_var (destVar t) + | _ -> id in + snd (List.fold_right + (fun (id,b,c) (args,l) -> + match b,args with + | Some c, a::rest when + isVar c & (try eq_constr a (snd (List.assoc (destVar c) l)) with Not_found -> false) -> (rest,l) + | _, a::rest -> (rest, (id, (alias_of_var id,whd_evar sigma a))::l) + | _ -> anomaly "Instance does not match its signature") + sign (List.rev (Array.to_list args),[])) + +let make_pure_subst evi args = + snd (List.fold_right + (fun (id,b,c) (args,l) -> + match args with + | a::rest -> (rest, (id,a)::l) + | _ -> anomaly "Instance does not match its signature") + (evar_filtered_context evi) (List.rev (Array.to_list args),[])) + +(* [push_rel_context_to_named_context] builds the defining context and the + * initial instance of an evar. If the evar is to be used in context + * + * Gamma = a1 ... an xp ... x1 + * \- named part -/ \- de Bruijn part -/ + * + * then the x1...xp are turned into variables so that the evar is declared in + * context + * + * a1 ... an xp ... x1 + * \----------- named part ------------/ + * + * but used applied to the initial instance "a1 ... an Rel(p) ... Rel(1)" + * so that ev[a1:=a1 ... an:=an xp:=Rel(p) ... x1:=Rel(1)] is correctly typed + * in context Gamma. + * + * Remark 1: The instance is reverted in practice (i.e. Rel(1) comes first) + * Remark 2: If some of the ai or xj are definitions, we keep them in the + * instance. This is necessary so that no unfolding of local definitions + * happens when inferring implicit arguments (consider e.g. the problem + * "x:nat; x':=x; f:forall x, x=x -> Prop |- f _ (refl_equal x')" + * we want the hole to be instantiated by x', not by x (which would have the + * case in [invert_instance] if x' had disappear of the instance). + * Note that at any time, if, in some context env, the instance of + * declaration x:A is t and the instance of definition x':=phi(x) is u, then + * we have the property that u and phi(t) are convertible in env. + *) + +let push_rel_context_to_named_context env typ = + (* compute the instances relative to the named context and rel_context *) + let ids = List.map pi1 (named_context env) in + let inst_vars = List.map mkVar ids in + let inst_rels = List.rev (rel_list 0 (nb_rel env)) in + (* move the rel context to a named context and extend the named instance *) + (* with vars of the rel context *) + (* We do keep the instances corresponding to local definition (see above) *) + let (subst, _, env) = + Sign.fold_rel_context + (fun (na,c,t) (subst, avoid, env) -> + let id = next_name_away na avoid in + let d = (id,Option.map (substl subst) c,substl subst t) in + (mkVar id :: subst, id::avoid, push_named d env)) + (rel_context env) ~init:([], ids, env) in + (named_context_val env, substl subst typ, inst_rels@inst_vars) + +(* [new_evar] declares a new existential in an env env with type typ *) (* Converting the env into the sign of the evar to define *) -let push_rel_context_to_named_context env = - let (subst,_,env) = - Sign.fold_rel_context - (fun (na,c,t) (subst,avoid,env) -> - let id = next_name_away na avoid in - ((mkVar id)::subst, - id::avoid, - push_named (id,option_map (substl subst) c, - type_app (substl subst) t) - env)) - (rel_context env) ~init:([],ids_of_named_context (named_context env),env) - in (subst, (named_context_val env)) - -let new_evar evd env ?(src=(dummy_loc,InternalHole)) typ = - let subst,sign = push_rel_context_to_named_context env in - let typ' = substl subst typ in - let instance = make_evar_instance_with_rel env in - new_evar_instance sign evd typ' ~src:src instance +let new_evar evd env ?(src=(dummy_loc,InternalHole)) ?filter typ = + let sign,typ',instance = push_rel_context_to_named_context env typ in + new_evar_instance sign evd typ' ~src:src ?filter instance (* The same using side-effect *) -let e_new_evar evd env ?(src=(dummy_loc,InternalHole)) ty = - let (evd',ev) = new_evar !evd env ~src:src ty in - evd := evd'; - ev +let e_new_evar evdref env ?(src=(dummy_loc,InternalHole)) ?filter ty = + let (evd',ev) = new_evar !evdref env ~src:src ?filter ty in + evdref := evd'; + ev (*------------------------------------* * operations on the evar constraints * @@ -234,7 +268,7 @@ let is_pattern inst = let evar_well_typed_body evd ev evi body = try - let env = evar_env evi in + let env = evar_unfiltered_env evi in let ty = evi.evar_concl in Typing.check env (evars_of evd) body ty; true @@ -246,92 +280,111 @@ let evar_well_typed_body evd ev evi body = print_constr body); false -let strict_inverse = false - -let inverse_instance env isevars ev evi inst rhs = - let subst = make_subst (evar_env evi) (Array.to_list inst) in - let subst = List.map (fun (x,y) -> (y,mkVar x)) subst in - let evd = ref isevars in - let error () = - error_not_clean env (evars_of !evd) ev rhs (evar_source ev !evd) in - let rec subs rigid k t = - match kind_of_term t with - | Rel i -> - if i<=k then t - else - (try List.assoc (mkRel (i-k)) subst - with Not_found -> - if rigid then error() - else if strict_inverse then - failwith "cannot solve pb yet" - else t) - | Var id -> - (try List.assoc t subst - with Not_found -> - if rigid then error() - else if - not strict_inverse && - List.exists (fun (id',_,_) -> id=id') (evar_context evi) - then - failwith "cannot solve pb yet" - else t) - | Evar (ev,args) -> - if Evd.is_defined_evar !evd (ev,args) then - subs rigid k (existential_value (evars_of !evd) (ev,args)) - else - let args' = Array.map (subs false k) args in - mkEvar (ev,args') - | _ -> map_constr_with_binders succ (subs rigid) k t in - let body = subs true 0 (nf_evar (evars_of isevars) rhs) in - (!evd,body) - - -let is_defined_equation env evd (ev,inst) rhs = - is_pattern inst && - not (occur_evar ev rhs) && - try - let evi = Evd.find (evars_of evd) ev in - let (evd',body) = inverse_instance env evd ev evi inst rhs in - evar_well_typed_body evd' ev evi body - with Failure _ -> false +(* We have x1..xq |- ?e1 and had to solve something like + * Σ; Γ |- ?e1[u1..uq] = (...\y1 ... \yk ... c), where c is typically some + * ?e2[v1..vn], hence flexible. We had to go through k binders and now + * virtually have x1..xq, y1..yk | ?e1' and the equation + * Γ, y1..yk |- ?e1'[u1..uq y1..yk] = c. + * What we do is to formally introduce ?e1' in context x1..xq, Γ, y1..yk, + * but forbidding it to use the variables of Γ (otherwise said, + * Γ is here only for ensuring the correct typing of ?e1'). + * + * In fact, we optimize a little and try to compute a maximum + * common subpart of x1..xq and Γ. This is done by detecting the + * longest subcontext x1..xp such that Γ = x1'..xp' z1..zm and + * u1..up = x1'..xp'. + * + * At the end, we return ?e1'[x1..xn z1..zm y1..yk] so that ?e1 can be + * instantiated by (...\y1 ... \yk ... ?e1[x1..xn z1..zm y1..yk]) and the + * new problem is Σ; Γ, y1..yk |- ?e1'[u1..un z1..zm y1..yk] = c, + * making the z1..zm unavailable. + * + * This is what [extend_evar Γ evd k (?e1[u1..uq]) c] does. + *) +let shrink_context env subst ty = + let rev_named_sign = List.rev (named_context env) in + let rel_sign = rel_context env in + (* We merge the contexts (optimization) *) + let rec shrink_rel i subst rel_subst rev_rel_sign = + match subst,rev_rel_sign with + | (id,c)::subst,_::rev_rel_sign when c = mkRel i -> + shrink_rel (i-1) subst (mkVar id::rel_subst) rev_rel_sign + | _ -> + substl_rel_context rel_subst (List.rev rev_rel_sign), + substl rel_subst ty + in + let rec shrink_named subst named_subst rev_named_sign = + match subst,rev_named_sign with + | (id,c)::subst,(id',b',t')::rev_named_sign when c = mkVar id' -> + shrink_named subst ((id',mkVar id)::named_subst) rev_named_sign + | _::_, [] -> + let nrel = List.length rel_sign in + let rel_sign, ty = shrink_rel nrel subst [] (List.rev rel_sign) in + [], map_rel_context (replace_vars named_subst) rel_sign, + replace_vars named_subst ty + | _ -> + map_named_context (replace_vars named_subst) (List.rev rev_named_sign), + rel_sign, ty + in + shrink_named subst [] rev_named_sign + +let extend_evar env evdref k (evk1,args1) c = + let ty = get_type_of env (evars_of !evdref) c in + let overwrite_first v1 v2 = + let v = Array.copy v1 in + let n = Array.length v - Array.length v2 in + for i = 0 to Array.length v2 - 1 do v.(n+i) <- v2.(i) done; + v in + let evi1 = Evd.find (evars_of !evdref) evk1 in + let named_sign',rel_sign',ty = + if k = 0 then [], [], ty + else shrink_context env (List.rev (make_pure_subst evi1 args1)) ty in + let extenv = + List.fold_right push_rel rel_sign' + (List.fold_right push_named named_sign' (evar_unfiltered_env evi1)) in + let nb_to_hide = rel_context_length rel_sign' - k in + let rel_filter = list_map_i (fun i _ -> i > nb_to_hide) 1 rel_sign' in + let named_filter1 = List.map (fun _ -> true) (evar_context evi1) in + let named_filter2 = List.map (fun _ -> false) named_sign' in + let filter = rel_filter@named_filter2@named_filter1 in + let evar1' = e_new_evar evdref extenv ~filter:filter ty in + let evk1',args1'_in_env = destEvar evar1' in + let args1'_in_extenv = Array.map (lift k) (overwrite_first args1'_in_env args1) in + (evar1',(evk1',args1'_in_extenv)) + +let subfilter p filter l = + let (filter,_,l) = + List.fold_left (fun (filter,l,newl) b -> + if b then + let a,l' = match l with a::args -> a,args | _ -> assert false in + if p a then (true::filter,l',a::newl) else (false::filter,l',newl) + else (false::filter,l,newl)) + ([],l,[]) filter in + (List.rev filter,List.rev l) + +let restrict_upon_filter evd evi evk p args = + let filter = evar_filter evi in + let newfilter,newargs = subfilter p filter args in + if newfilter <> filter then + let (evd,newev) = new_evar evd (evar_unfiltered_env evi) ~src:(evar_source evk evd) + ~filter:newfilter evi.evar_concl in + let evd = Evd.evar_define evk newev evd in + evd,fst (destEvar newev),newargs + else + evd,evk,args -(* Redefines an evar with a smaller context (i.e. it may depend on less - * variables) such that c becomes closed. - * Example: in [x:?1; y:(list ?2)] x=y /\ x=(nil bool) - * ?3 <-- ?1 no pb: env of ?3 is larger than ?1's - * ?1 <-- (list ?2) pb: ?2 may depend on x, but not ?1. - * What we do is that ?2 is defined by a new evar ?4 whose context will be - * a prefix of ?2's env, included in ?1's env. +exception Dependency_error of identifier - Concretely, the assumptions are "env |- ev : T" and "Gamma |- - ev[hyps:=args]" for some Gamma whose de Bruijn context has length k. - We create "env' |- ev' : T" for some env' <= env and define ev:=ev' -*) +module EvkOrd = +struct + type t = Term.existential_key + let compare = Pervasives.compare +end -let do_restrict_hyps env k evd ev args = - let args = Array.to_list args in - let evi = Evd.find (evars_of !evd) ev in - let hyps = evar_context evi in - let (hyps',ncargs) = list_filter2 (fun _ a -> closedn k a) (hyps,args) in - (* No care is taken in case the evar type uses vars filtered out! - Assuming that the restriction comes from a well-typed Flex/Flex - unification problem (see real_clean), the type of the evar cannot - depend on variables that are not in the scope of the other evar, - since this other evar has the same type (up to unification). - Since moreover, the evar contexts uses names only, the - restriction raise no de Bruijn reallocation problem *) - let env' = - Sign.fold_named_context push_named hyps' ~init:(reset_context env) in - let nc = e_new_evar evd env' ~src:(evar_source ev !evd) evi.evar_concl in - evd := Evd.evar_define ev nc !evd; - let (evn,_) = destEvar nc in - mkEvar(evn,Array.of_list ncargs) - +module EvkSet = Set.Make(EvkOrd) -exception Dependency_error of identifier - -let rec check_and_clear_in_constr evd c ids hist = +let rec check_and_clear_in_constr evdref c ids hist = (* returns a new constr where all the evars have been 'cleaned' (ie the hypotheses ids have been removed from the contexts of evars *) @@ -341,234 +394,542 @@ let rec check_and_clear_in_constr evd c ids hist = in match kind_of_term c with | ( Rel _ | Meta _ | Sort _ ) -> c + | ( Const _ | Ind _ | Construct _ ) -> let vars = Environ.vars_of_global (Global.env()) c in List.iter check vars; c + | Var id' -> check id'; mkVar id' - | Evar (e,l) -> - if (List.mem e hist) then + + | Evar (evk,l as ev) -> + if Evd.is_defined_evar !evdref ev then + (* If evk is already defined we replace it by its definition *) + let nc = nf_evar (evars_of !evdref) c in + (check_and_clear_in_constr evdref nc ids hist) + else if EvkSet.mem evk hist then + (* Loop detection => do nothing *) c - else - begin - if Evd.is_defined_evar !evd (e,l) then - (* If e is already defined we replace it by its definition *) - let nc = nf_evar (evars_of !evd) c in - (check_and_clear_in_constr evd nc ids hist) - else - (* We check for dependencies to elements of ids in the - evar_info corresponding to e and in the instance of - arguments. Concurrently, we build a new evar - corresponding to e where hypotheses of ids have been - removed *) - let evi = Evd.find (evars_of !evd) e in - let nconcl = check_and_clear_in_constr evd (evar_concl evi) ids (e::hist) in - let (nhyps,nargs) = - List.fold_right2 - (fun (id,ob,c) i (hy,ar) -> - if List.mem id ids then - (hy,ar) - else - let d' = (id, - (match ob with - None -> None - | Some b -> Some (check_and_clear_in_constr evd b ids (e::hist))), - check_and_clear_in_constr evd c ids (e::hist)) in - let i' = check_and_clear_in_constr evd i ids (e::hist) in - (d'::hy, i'::ar) - ) - (evar_context evi) (Array.to_list l) ([],[]) in - let env = Sign.fold_named_context push_named nhyps ~init:(empty_env) in - let ev'= e_new_evar evd env ~src:(evar_source e !evd) nconcl in - evd := Evd.evar_define e ev' !evd; - let (e',_) = destEvar ev' in - mkEvar(e', Array.of_list nargs) - end - | _ -> map_constr (fun c -> check_and_clear_in_constr evd c ids hist) c - -and clear_hyps_in_evi evd evi ids = - (* clear_evar_hyps erases hypotheses ids in evi, checking if some + else + (* We check for dependencies to elements of ids in the + evar_info corresponding to e and in the instance of + arguments. Concurrently, we build a new evar + corresponding to e where hypotheses of ids have been + removed *) + let evi = Evd.find (evars_of !evdref) evk in + let ctxt = Evd.evar_filtered_context evi in + let (nhyps,nargs,rids) = + List.fold_right2 + (fun (rid,ob,c as h) a (hy,ar,ri) -> + match kind_of_term a with + | Var id -> if List.mem id ids then (hy,ar,id::ri) else (h::hy,a::ar,ri) + | _ -> (h::hy,a::ar,ri) + ) + ctxt (Array.to_list l) ([],[],[]) in + (* nconcl must be computed ids (non instanciated hyps) *) + let nconcl = check_and_clear_in_constr evdref (evar_concl evi) rids (EvkSet.add evk hist) in + + let env = Sign.fold_named_context push_named nhyps ~init:(empty_env) in + let ev'= e_new_evar evdref env ~src:(evar_source evk !evdref) nconcl in + evdref := Evd.evar_define evk ev' !evdref; + let (evk',_) = destEvar ev' in + mkEvar(evk', Array.of_list nargs) + + | _ -> map_constr (fun c -> check_and_clear_in_constr evdref c ids hist) c + +let clear_hyps_in_evi evdref hyps concl ids = + (* clear_evar_hyps erases hypotheses ids in hyps, checking if some hypothesis does not depend on a element of ids, and erases ids in the contexts of the evars occuring in evi *) - let nconcl = try check_and_clear_in_constr evd (evar_concl evi) ids [] + let nconcl = try check_and_clear_in_constr evdref concl ids EvkSet.empty with Dependency_error id' -> error (string_of_id id' ^ " is used in conclusion") in let (nhyps,_) = - let aux (id,ob,c) = + let check_context (id,ob,c) = try (id, (match ob with None -> None - | Some b -> Some (check_and_clear_in_constr evd b ids [])), - check_and_clear_in_constr evd c ids []) + | Some b -> Some (check_and_clear_in_constr evdref b ids EvkSet.empty)), + check_and_clear_in_constr evdref c ids EvkSet.empty) with Dependency_error id' -> error (string_of_id id' ^ " is used in hypothesis " - ^ string_of_id id) + ^ string_of_id id) in - remove_hyps ids aux (evar_hyps evi) - in - { evi with - evar_concl = nconcl; - evar_hyps = nhyps} - + let check_value vk = + match !vk with + | VKnone -> vk + | VKvalue (v,d) -> + if (List.for_all (fun e -> not (Idset.mem e d)) ids) then + (* v does depend on any of ids, it's ok *) + vk + else + (* v depends on one of the cleared hyps: we forget the computed value *) + ref VKnone + in + remove_hyps ids check_context check_value hyps + in + (nhyps,nconcl) + +(* Expand rels and vars that are bound to other rels or vars so that + dependencies in variables are canonically associated to the most ancient + variable in its family of aliased variables *) + +let rec expand_var env x = match kind_of_term x with + | Rel n -> + begin try match pi2 (lookup_rel n env) with + | Some t when isRel t -> expand_var env (lift n t) + | _ -> x + with Not_found -> x + end + | Var id -> + begin match pi2 (lookup_named id env) with + | Some t when isVar t -> expand_var env t + | _ -> x + end + | _ -> x + +let rec expand_vars_in_term env t = match kind_of_term t with + | Rel _ | Var _ -> expand_var env t + | _ -> map_constr_with_full_binders push_rel expand_vars_in_term env t + +(* [find_projectable_vars env sigma y subst] finds all vars of [subst] + * that project on [y]. It is able to find solutions to the following + * two kinds of problems: + * + * - ?n[...;x:=y;...] = y + * - ?n[...;x:=?m[args];...] = y with ?m[args] = y recursively solvable + * + * (see test-suite/success/Fixpoint.v for an example of application of + * the second kind of problem). + * + * The seek for [y] is up to variable aliasing. In case of solutions that + * differ only up to aliasing, the binding that requires the less + * steps of alias reduction is kept. At the end, only one solution up + * to aliasing is kept. + * + * [find_projectable_vars] also unifies against evars that themselves mention + * [y] and recursively. + * + * In short, the following situations give the following solutions: + * + * problem evar ctxt soluce remark + * z1; z2:=z1 |- ?ev[z1;z2] = z1 y1:A; y2:=y1 y1 \ thanks to defs kept in + * z1; z2:=z1 |- ?ev[z1;z2] = z2 y1:A; y2:=y1 y2 / subst and preferring = + * z1; z2:=z1 |- ?ev[z1] = z2 y1:A y1 thanks to expand_var + * z1; z2:=z1 |- ?ev[z2] = z1 y1:A y1 thanks to expand_var + * z3 |- ?ev[z3;z3] = z3 y1:A; y2:=y1 y2 see make_projectable_subst + * + * Remark: [find_projectable_vars] assumes that identical instances of + * variables in the same set of aliased variables are already removed (see + * [make_projectable_subst]) + *) -let need_restriction k args = not (array_for_all (closedn k) args) +exception NotUnique + +type evar_projection = +| ProjectVar +| ProjectEvar of existential * evar_info * identifier * evar_projection + +let rec find_projectable_vars env sigma y subst = + let is_projectable (id,(idc,y')) = + let y' = whd_evar sigma y' in + if y = y' or expand_var env y = expand_var env y' + then (idc,(y'=y,(id,ProjectVar))) + else if isEvar y' then + let (evk,argsv as t) = destEvar y' in + let evi = Evd.find sigma evk in + let subst = make_projectable_subst sigma evi argsv in + let l = find_projectable_vars env sigma y subst in + match l with + | [id',p] -> (idc,(true,(id,ProjectEvar (t,evi,id',p)))) + | _ -> failwith "" + else failwith "" in + let l = map_succeed is_projectable subst in + let l = list_partition_by (fun (idc,_) (idc',_) -> idc = idc') l in + let l = List.map (List.map snd) l in + List.map (fun l -> try List.assoc true l with Not_found -> snd (List.hd l)) l + +(* [filter_solution] checks if one and only one possible projection exists + * among a set of solutions to a projection problem *) + +let filter_solution = function + | [] -> raise Not_found + | (id,p)::_::_ -> raise NotUnique + | [id,p] -> (mkVar id, p) + +let project_with_effects env sigma effects t subst = + let c, p = filter_solution (find_projectable_vars env sigma t subst) in + effects := p :: !effects; + c + +(* In case the solution to a projection problem requires the instantiation of + * subsidiary evars, [do_projection_effects] performs them; it + * also try to instantiate the type of those subsidiary evars if their + * type is an evar too. + * + * Note: typing creates new evar problems, which induces a recursive dependency + * with [evar_define]. To avoid a too large set of recursive functions, we + * pass [evar_define] to [do_projection_effects] as a parameter. + *) -(* We try to instantiate the evar assuming the body won't depend - * on arguments that are not Rels or Vars, or appearing several times - * (i.e. we tackle only Miller-Pfenning patterns unification) +let rec do_projection_effects define_fun env ty evd = function + | ProjectVar -> evd + | ProjectEvar ((evk,argsv),evi,id,p) -> + let evd = Evd.evar_define evk (mkVar id) evd in + (* TODO: simplify constraints involving evk *) + let evd = do_projection_effects define_fun env ty evd p in + let ty = whd_betadeltaiota env (evars_of evd) (Lazy.force ty) in + if not (isSort ty) then + (* Don't try to instantiate if a sort because if evar_concl is an + evar it may commit to a univ level which is not the right + one (however, regarding coercions, because t is obtained by + unif, we know that no coercion can be inserted) *) + let subst = make_pure_subst evi argsv in + let ty' = replace_vars subst evi.evar_concl in + let ty' = whd_evar (evars_of evd) ty' in + if isEvar ty' then define_fun env (destEvar ty') ty evd else evd + else + evd + +(* Assuming Σ; Γ, y1..yk |- c, [invert_subst Γ k Σ [x1:=u1;...;xn:=un] c] + * tries to return φ(x1..xn) such that equation φ(u1..un) = c is valid. + * The strategy is to imitate the structure of c and then to invert + * the variables of c (i.e. rels or vars of Γ) using the algorithm + * implemented by project_with_effects/find_projectable_vars. + * It returns either a unique solution or says whether 0 or more than + * 1 solutions is found. + * + * Precondition: Σ; Γ, y1..yk |- c /\ Σ; Γ |- u1..un + * Postcondition: if φ(x1..xn) is returned then + * Σ; Γ, y1..yk |- φ(u1..un) = c /\ x1..xn |- φ(x1..xn) + * + * The effects correspond to evars instantiated while trying to project. + * + * [invert_subst] is used on instances of evars. Since the evars are flexible, + * these instances are potentially erasable. This is why we don't investigate + * whether evars in the instances of evars are unifiable, to the contrary of + * [invert_definition]. + *) - * 1) Let a unification problem "env |- ev[hyps:=args] = rhs" - * 2) We limit it to a patterns unification problem "env |- ev[subst] = rhs" - * where only Rel's and Var's are relevant in subst - * 3) We recur on rhs, "imitating" the term failing if some Rel/Var not in scope +type projectibility_kind = + | NoUniqueProjection + | UniqueProjection of constr * evar_projection list - * Note: we don't assume rhs in normal form, it may fail while it would - * have succeeded after some reductions +type projectibility_status = + | CannotInvert + | Invertible of projectibility_kind + +let invert_arg_from_subst env k sigma subst_in_env c_in_env_extended_with_k_binders = + let effects = ref [] in + let rec aux k t = + let t = whd_evar sigma t in + match kind_of_term t with + | Rel i when i>k -> + project_with_effects env sigma effects (mkRel (i-k)) subst_in_env + | Var id -> + project_with_effects env sigma effects t subst_in_env + | _ -> + map_constr_with_binders succ aux k t in + try + let c = aux k c_in_env_extended_with_k_binders in + Invertible (UniqueProjection (c,!effects)) + with + | Not_found -> CannotInvert + | NotUnique -> Invertible NoUniqueProjection + +let invert_arg env k sigma (evk,args_in_env) c_in_env_extended_with_k_binders = + let subst_in_env = make_projectable_subst sigma (Evd.find sigma evk) args_in_env in + invert_arg_from_subst env k sigma subst_in_env c_in_env_extended_with_k_binders + +let effective_projections = + map_succeed (function Invertible c -> c | _ -> failwith"") + +let instance_of_projection f env t evd projs = + let ty = lazy (Retyping.get_type_of env (evars_of evd) t) in + match projs with + | NoUniqueProjection -> raise NotUnique + | UniqueProjection (c,effects) -> + (List.fold_left (do_projection_effects f env ty) evd effects, c) + +let filter_of_projection = function CannotInvert -> false | _ -> true + +let filter_along f projs v = + let l = Array.to_list v in + let _,l = list_filter2 (fun b c -> f b) (projs,l) in + Array.of_list l + +(* Redefines an evar with a smaller context (i.e. it may depend on less + * variables) such that c becomes closed. + * Example: in "fun (x:?1) (y:list ?2[x]) => x = y :> ?3[x,y] /\ x = nil bool" + * ?3 <-- ?1 no pb: env of ?3 is larger than ?1's + * ?1 <-- list ?2 pb: ?2 may depend on x, but not ?1. + * What we do is that ?2 is defined by a new evar ?4 whose context will be + * a prefix of ?2's env, included in ?1's env. + * + * If "hyps |- ?e : T" and "filter" selects a subset hyps' of hyps then + * [do_restrict_hyps evd ?e filter] sets ?e:=?e'[hyps'] and returns ?e' + * such that "hyps' |- ?e : T" *) -(* Note: error_not_clean should not be an error: it simply means that the - * conversion test that lead to the faulty call to [real_clean] should return - * false. The problem is that we won't get the right error message. + +let do_restrict_hyps_virtual evd evk filter = + (* What to do with dependencies? + Assume we have x:A, y:B(x), z:C(x,y) |- ?e:T(x,y,z) and restrict on y. + - If y is in a non-erasable position in C(x,y) (i.e. it is not below an + occurrence of x in the hnf of C), then z should be removed too. + - If y is in a non-erasable position in T(x,y,z) then the problem is + unsolvable. + Computing whether y is erasable or not may be costly and the + interest for this early detection in practice is not obvious. We let + it for future work. Anyway, thanks to the use of filters, the whole + context remains consistent. *) + let evi = Evd.find (evars_of evd) evk in + let env = evar_unfiltered_env evi in + let oldfilter = evar_filter evi in + let filter,_ = List.fold_right (fun oldb (l,filter) -> + if oldb then List.hd filter::l,List.tl filter else (false::l,filter)) + oldfilter ([],List.rev filter) in + new_evar evd env ~src:(evar_source evk evd) + ~filter:filter evi.evar_concl + +let do_restrict_hyps evd evk projs = + let filter = List.map filter_of_projection projs in + if List.for_all (fun x -> x) filter then + evd,evk + else + let evd,nc = do_restrict_hyps_virtual evd evk filter in + let evd = Evd.evar_define evk nc evd in + let evk',_ = destEvar nc in + evd,evk' + +(* [postpone_evar_term] postpones an equation of the form ?e[σ] = c *) + +let postpone_evar_term env evd (evk,argsv) rhs = + let rhs = expand_vars_in_term env rhs in + let evi = Evd.find (evars_of evd) evk in + let evd,evk,args = + restrict_upon_filter evd evi evk + (* Keep only variables that depends in rhs *) + (* This is not safe: is the variable is a local def, its body *) + (* may contain references to variables that are removed, leading to *) + (* a ill-formed context. We would actually need a notion of filter *) + (* that says that the body is hidden. Note that expand_vars_in_term *) + (* expands only rels and vars aliases, not rels or vars bound to an *) + (* arbitrary complex term *) + (fun a -> not (isRel a || isVar a) || dependent a rhs) + (Array.to_list argsv) in + let args = Array.of_list args in + let pb = (Reduction.CONV,env,mkEvar(evk,args),rhs) in + Evd.add_conv_pb pb evd + +(* [postpone_evar_evar] postpones an equation of the form ?e1[σ1] = ?e2[σ2] *) + +let postpone_evar_evar env evd projs1 (evk1,args1) projs2 (evk2,args2) = + (* Leave an equation between (restrictions of) ev1 andv ev2 *) + let args1' = filter_along filter_of_projection projs1 args1 in + let evd,evk1' = do_restrict_hyps evd evk1 projs1 in + let args2' = filter_along filter_of_projection projs2 args2 in + let evd,evk2' = do_restrict_hyps evd evk2 projs2 in + let pb = (Reduction.CONV,env,mkEvar(evk1',args1'),mkEvar (evk2',args2')) in + add_conv_pb pb evd + +(* [solve_evar_evar f Γ Σ ?e1[u1..un] ?e2[v1..vp]] applies an heuristic + * to solve the equation Σ; Γ ⊢ ?e1[u1..un] = ?e2[v1..vp]: + * - if there are at most one φj for each vj s.t. vj = φj(u1..un), + * we first restrict ?2 to the subset v_k1..v_kq of the vj that are + * inversible and we set ?1[x1..xn] := ?2[φk1(x1..xn)..φkp(x1..xn)] + * - symmetrically if there are at most one ψj for each uj s.t. + * uj = ψj(v1..vp), + * - otherwise, each position i s.t. ui does not occur in v1..vp has to + * be restricted and similarly for the vi, and we leave the equation + * as an open equation (performed by [postpone_evar]) + * + * Warning: the notion of unique φj is relative to some given class + * of unification problems + * + * Note: argument f is the function used to instantiate evars. *) -exception NotClean of constr +exception CannotProject of projectibility_status list -let real_clean env isevars ev evi args rhs = - let evd = ref isevars in - let subst = List.map (fun (x,y) -> (y,mkVar x)) (list_uniquize args) in - let rec subs rigid k t = - match kind_of_term t with - | Rel i -> - if i<=k then t - else - (* Flex/Rel problem: unifiable as a pattern iff Rel in ev scope *) - (try List.assoc (mkRel (i-k)) subst - with Not_found -> if rigid then raise (NotClean t) else t) - | Evar (ev,args) -> - if Evd.is_defined_evar !evd (ev,args) then - subs rigid k (existential_value (evars_of !evd) (ev,args)) - else - (* Flex/Flex problem: restriction to a common scope *) - let args' = Array.map (subs false k) args in - if need_restriction k args' then - do_restrict_hyps (reset_context env) k evd ev args' - else - mkEvar (ev,args') - | Var id -> - (* Flex/Var problem: unifiable as a pattern iff Var in scope of ev *) - (try List.assoc t subst - with Not_found -> - if - not rigid - (* I don't understand this line: vars from evar_context evi - are private (especially some of them are freshly - generated in push_rel_context_to_named_context). They - have a priori nothing to do with the vars in env. I - remove the test [HH 25/8/06] - - or List.exists (fun (id',_,_) -> id=id') (evar_context evi) - *) - then t - else raise (NotClean t)) - - | _ -> - (* Flex/Rigid problem (or assimilated if not normal): we "imitate" *) - map_constr_with_binders succ (subs rigid) k t - in - let rhs = nf_evar (evars_of isevars) rhs in - let rhs = whd_beta rhs (* heuristic *) in - let body = - try subs true 0 rhs - with NotClean t -> - error_not_clean env (evars_of !evd) ev t (evar_source ev !evd) in - (!evd,body) - -(* [evar_define] solves the problem lhs = rhs when lhs is an uninstantiated - * evar, i.e. tries to find the body ?sp for lhs=mkEvar (sp,args) - * ?sp [ sp.hyps \ args ] unifies to rhs - * ?sp must be a closed term, not referring to itself. - * Not so trivial because some terms of args may be terms that are not - * variables. In this case, the non-var-or-Rels arguments are replaced - * by . [clean_rhs] will ignore this part of the subtitution. - * This leads to incompleteness (we don't deal with pbs that require - * inference of dependent types), but it seems sensible. +let solve_evar_evar_l2r f env evd (evk1,args1) (evk2,_ as ev2) = + let proj1 = array_map_to_list (invert_arg env 0 (evars_of evd) ev2) args1 in + try + (* Instantiate ev2 with (a restriction of) ev1 if uniquely projectable *) + let proj1' = effective_projections proj1 in + let evd,args1' = + list_fold_map (instance_of_projection f env (mkEvar ev2)) evd proj1' in + let evd,evk1' = do_restrict_hyps evd evk1 proj1 in + Evd.evar_define evk2 (mkEvar(evk1',Array.of_list args1')) evd + with NotUnique -> + raise (CannotProject proj1) + +let solve_evar_evar f env evd ev1 ev2 = + try solve_evar_evar_l2r f env evd ev1 ev2 + with CannotProject projs1 -> + try solve_evar_evar_l2r f env evd ev2 ev1 + with CannotProject projs2 -> + postpone_evar_evar env evd projs1 ev1 projs2 ev2 + +let expand_rhs env sigma subst rhs = + let d = (named_hd env rhs Anonymous,Some rhs,get_type_of env sigma rhs) in + let rhs' = lift 1 rhs in + let f (id,(idc,t)) = (id,(idc,replace_term rhs' (mkRel 1) (lift 1 t))) in + push_rel d env, List.map f subst, mkRel 1 + +(* We try to instantiate the evar assuming the body won't depend + * on arguments that are not Rels or Vars, or appearing several times + * (i.e. we tackle a generalization of Miller-Pfenning patterns unification) * - * If after cleaning, some free vars still occur, the function [restrict_hyps] - * tries to narrow the env of the evars that depend on Rels. + * 1) Let "env |- ?ev[hyps:=args] = rhs" be the unification problem + * 2) We limit it to a patterns unification problem "env |- ev[subst] = rhs" + * where only Rel's and Var's are relevant in subst + * 3) We recur on rhs, "imitating" the term, and failing if some Rel/Var is + * not in the scope of ?ev. For instance, the problem + * "y:nat |- ?x[] = y" where "|- ?1:nat" is not satisfiable because + * ?1 would be instantiated by y which is not in the scope of ?1. + * 4) We try to "project" the term if the process of imitation fails + * and that only one projection is possible * - * If after that free Rels still occur it means that the instantiation - * cannot be done, as in [x:?1; y:nat; z:(le y y)] x=z - * ?1 would be instantiated by (le y y) but y is not in the scope of ?1 + * Note: we don't assume rhs in normal form, it may fail while it would + * have succeeded after some reductions. + * + * This is the work of [invert_definition Γ Σ ?ev[hyps:=args] + * Precondition: Σ; Γ, y1..yk |- c /\ Σ; Γ |- u1..un + * Postcondition: if φ(x1..xn) is returned then + * Σ; Γ, y1..yk |- φ(u1..un) = c /\ x1..xn |- φ(x1..xn) *) -(* env needed for error messages... *) -let evar_define env (ev,argsv) rhs isevars = - if occur_evar ev rhs - then error_occur_check env (evars_of isevars) ev rhs; - let args = Array.to_list argsv in - let evi = Evd.find (evars_of isevars) ev in - (* the bindings to invert *) - let worklist = make_subst (evar_env evi) args in - let (isevars',body) = real_clean env isevars ev evi worklist rhs in - if occur_meta body then error "Meta cannot occur in evar body" - else +exception NotInvertibleUsingOurAlgorithm of constr +exception NotEnoughInformationToProgress + +let rec invert_definition env evd (evk,argsv as ev) rhs = + let evdref = ref evd in + let progress = ref false in + let evi = Evd.find (evars_of evd) evk in + let subst = make_projectable_subst (evars_of evd) evi argsv in + + (* Projection *) + let project_variable t = + (* Evar/Var problem: unifiable iff variable projectable from ev subst *) + try + let sols = find_projectable_vars env (evars_of !evdref) t subst in + let c, p = filter_solution sols in + let ty = lazy (Retyping.get_type_of env (evars_of !evdref) t) in + let evd = do_projection_effects evar_define env ty !evdref p in + evdref := evd; + c + with + | Not_found -> raise (NotInvertibleUsingOurAlgorithm t) + | NotUnique -> + if not !progress then raise NotEnoughInformationToProgress; + (* No unique projection but still restrict to where it is possible *) + let filter = array_map_to_list (fun c -> isEvar c or c = t) argsv in + let args' = filter_along (fun x -> x) filter argsv in + let evd,evar = do_restrict_hyps_virtual !evdref evk filter in + let evk',_ = destEvar evar in + let pb = (Reduction.CONV,env,mkEvar(evk',args'),t) in + evdref := Evd.add_conv_pb pb evd; + evar in + + let rec imitate (env',k as envk) t = + let t = whd_evar (evars_of !evdref) t in + match kind_of_term t with + | Rel i when i>k -> project_variable (mkRel (i-k)) + | Var id -> project_variable t + | Evar (evk',args' as ev') -> + if evk = evk' then error_occur_check env (evars_of evd) evk rhs; + (* Evar/Evar problem (but left evar is virtual) *) + let projs' = + array_map_to_list + (invert_arg_from_subst env k (evars_of !evdref) subst) args' + in + (try + (* Try to project (a restriction of) the right evar *) + let eprojs' = effective_projections projs' in + let evd,args' = + list_fold_map (instance_of_projection evar_define env' t) + !evdref eprojs' in + let evd,evk' = do_restrict_hyps evd evk' projs' in + evdref := evd; + mkEvar (evk',Array.of_list args') + with NotUnique -> + assert !progress; + (* Make the virtual left evar real *) + let (evar'',ev'') = extend_evar env' evdref k ev t in + let evd = + (* Try to project (a restriction of) the left evar ... *) + try solve_evar_evar_l2r evar_define env' !evdref ev'' ev' + with CannotProject projs'' -> + (* ... or postpone the problem *) + postpone_evar_evar env' !evdref projs'' ev'' projs' ev' in + evdref := evd; + evar'') + | _ -> + progress := true; + (* Evar/Rigid problem (or assimilated if not normal): we "imitate" *) + map_constr_with_full_binders (fun d (env,k) -> push_rel d env, k+1) + imitate envk t in + + let rhs = whd_beta rhs (* heuristic *) in + let body = imitate (env,0) rhs in + (!evdref,body) + +(* [evar_define] tries to solve the problem "?ev[args] = rhs" when "?ev" is + * an (uninstantiated) evar such that "hyps |- ?ev : typ". Otherwise said, + * [evar_define] tries to find an instance lhs such that + * "lhs [hyps:=args]" unifies to rhs. The term "lhs" must be closed in + * context "hyps" and not referring to itself. + *) + +and evar_define env (evk,_ as ev) rhs evd = + try + let (evd',body) = invert_definition env evd ev rhs in + if occur_meta body then error "Meta cannot occur in evar body"; + (* invert_definition may have instantiate some evars of rhs with evk *) + (* so we recheck acyclicity *) + if occur_evar evk body then error_occur_check env (evars_of evd) evk body; (* needed only if an inferred type *) let body = refresh_universes body in (* Cannot strictly type instantiations since the unification algorithm - * does not unifies applications from left to right. + * does not unify applications from left to right. * e.g problem f x == g y yields x==y and f==g (in that order) * Another problem is that type variables are evars of type Type let _ = try let env = evar_env evi in let ty = evi.evar_concl in - Typing.check env (evars_of isevars') body ty + Typing.check env (evars_of evd') body ty with e -> pperrnl (str "Ill-typed evar instantiation: " ++ fnl() ++ - pr_evar_defs isevars' ++ fnl() ++ + pr_evar_defs evd' ++ fnl() ++ str "----> " ++ int ev ++ str " := " ++ print_constr body); raise e in*) - let isevars'' = Evd.evar_define ev body isevars' in - isevars'',[ev] - - + Evd.evar_define evk body evd' + with + | NotEnoughInformationToProgress -> + postpone_evar_term env evd ev rhs + | NotInvertibleUsingOurAlgorithm t -> + error_not_clean env (evars_of evd) evk t (evar_source evk evd) (*-------------------*) (* Auxiliary functions for the conversion algorithms modulo evars *) -let has_undefined_evars isevars t = - try let _ = local_strong (whd_ise (evars_of isevars)) t in false +let has_undefined_evars evd t = + try let _ = local_strong (whd_ise (evars_of evd)) t in false with Uninstantiated_evar _ -> true -let is_ground_term isevars t = - not (has_undefined_evars isevars t) - -let head_is_evar isevars = - let rec hrec k = match kind_of_term k with - | Evar n -> not (Evd.is_defined_evar isevars n) - | App (f,_) -> hrec f - | Cast (c,_,_) -> hrec c - | _ -> false - in - hrec - -let rec is_eliminator c = match kind_of_term c with - | App _ -> true - | Case _ -> true - | Cast (c,_,_) -> is_eliminator c - | _ -> false - -let head_is_embedded_evar isevars c = - (head_is_evar isevars c) & (is_eliminator c) +let is_ground_term evd t = + not (has_undefined_evars evd t) let head_evar = let rec hrec c = match kind_of_term c with - | Evar (ev,_) -> ev + | Evar (evk,_) -> evk | Case (_,_,c,_) -> hrec c - | App (c,_) -> hrec c - | Cast (c,_,_) -> hrec c - | _ -> failwith "headconstant" + | App (c,_) -> hrec c + | Cast (c,_,_) -> hrec c + | _ -> failwith "headconstant" in hrec @@ -576,20 +937,22 @@ let head_evar = that we don't care whether args itself contains Rel's or even Rel's distinct from the ones in l *) -let is_unification_pattern_evar (_,args) l = +let is_unification_pattern_evar env (_,args) l = let l' = Array.to_list args @ l in + let l' = List.map (expand_var env) l' in List.for_all (fun a -> isRel a or isVar a) l' & list_distinct l' -let is_unification_pattern f l = +let is_unification_pattern env f l = match kind_of_term f with | Meta _ -> array_for_all isRel l & array_distinct l - | Evar ev -> is_unification_pattern_evar ev (Array.to_list l) + | Evar ev -> is_unification_pattern_evar env ev (Array.to_list l) | _ -> false (* From a unification problem "?X l1 = term1 l2" such that l1 is made of distinct rel's, build "\x1...xn.(term1 l2)" (patterns unification) *) let solve_pattern_eqn env l1 c = + let l1 = List.map (expand_var env) l1 in let c' = List.fold_right (fun a c -> let c' = subst_term (lift 1 a) (lift 1 c) in match kind_of_term a with @@ -598,6 +961,8 @@ let solve_pattern_eqn env l1 c = | Var id -> let (id,_,t) = lookup_named id env in mkNamedLambda id t c' | _ -> assert false) l1 c in + (* Warning: we may miss some opportunity to eta-reduce more since c' + is not in normal form *) whd_eta c' (* This code (i.e. solve_pb, etc.) takes a unification @@ -637,28 +1002,19 @@ let status_changed lev (pbty,_,t1,t2) = * that don't unify are discarded (i.e. ?i is redefined so that it does not * depend on these args). *) -let solve_refl conv_algo env isevars ev argsv1 argsv2 = - if argsv1 = argsv2 then (isevars,[]) else - let evd = Evd.find (evars_of isevars) ev in - let hyps = evar_context evd in - let (isevars',_,rsign) = - array_fold_left2 - (fun (isevars,sgn,rsgn) a1 a2 -> - let (isevars',b) = conv_algo env isevars Reduction.CONV a1 a2 in - if b then - (isevars',List.tl sgn, add_named_decl (List.hd sgn) rsgn) - else - (isevars,List.tl sgn, rsgn)) - (isevars,hyps,[]) argsv1 argsv2 - in - let nsign = List.rev rsign in - let (evd',newev) = - let env = - Sign.fold_named_context push_named nsign ~init:(reset_context env) in - new_evar isevars env ~src:(evar_source ev isevars) evd.evar_concl in - let evd'' = Evd.evar_define ev newev evd' in - evd'', [ev] - +let solve_refl conv_algo env evd evk argsv1 argsv2 = + if argsv1 = argsv2 then evd else + let evi = Evd.find (evars_of evd) evk in + (* Filter and restrict if needed *) + let evd,evk,args = + restrict_upon_filter evd evi evk + (fun (a1,a2) -> snd (conv_algo env evd Reduction.CONV a1 a2)) + (List.combine (Array.to_list argsv1) (Array.to_list argsv2)) in + (* Leave a unification problem *) + let args1,args2 = List.split args in + let argsv1 = Array.of_list args1 and argsv2 = Array.of_list args2 in + let pb = (Reduction.CONV,env,mkEvar(evk,argsv1),mkEvar(evk,argsv2)) in + Evd.add_conv_pb pb evd (* Tries to solve problem t1 = t2. * Precondition: t1 is an uninstantiated evar @@ -666,45 +1022,57 @@ let solve_refl conv_algo env isevars ev argsv1 argsv2 = * if the problem couldn't be solved. *) (* Rq: uncomplete algorithm if pbty = CONV_X_LEQ ! *) -let solve_simple_eqn conv_algo env isevars (pbty,(n1,args1 as ev1),t2) = +let solve_simple_eqn conv_algo env evd (pbty,(evk1,args1 as ev1),t2) = try - let t2 = nf_evar (evars_of isevars) t2 in - let (isevars,lsp) = match kind_of_term t2 with - | Evar (n2,args2 as ev2) -> - if n1 = n2 then - solve_refl conv_algo env isevars n1 args1 args2 + let t2 = whd_evar (evars_of evd) t2 in + let evd = match kind_of_term t2 with + | Evar (evk2,args2 as ev2) -> + if evk1 = evk2 then + solve_refl conv_algo env evd evk1 args1 args2 else - (try evar_define env ev1 t2 isevars - with e when precatchable_exception e -> - evar_define env ev2 (mkEvar ev1) isevars) -(* if Array.length args1 < Array.length args2 then - evar_define env ev2 (mkEvar ev1) isevars - else - evar_define env ev1 t2 isevars*) + if pbty = Reduction.CONV + then solve_evar_evar evar_define env evd ev1 ev2 + else add_conv_pb (pbty,env,mkEvar ev1,t2) evd | _ -> - evar_define env ev1 t2 isevars in - let (isevars,pbs) = get_conv_pbs isevars (status_changed lsp) in + evar_define env ev1 t2 evd in + let (evd,pbs) = extract_changed_conv_pbs evd status_changed in List.fold_left - (fun (isevars,b as p) (pbty,env,t1,t2) -> - if b then conv_algo env isevars pbty t1 t2 else p) (isevars,true) + (fun (evd,b as p) (pbty,env,t1,t2) -> + if b then conv_algo env evd pbty t1 t2 else p) (evd,true) pbs with e when precatchable_exception e -> - (isevars,false) + (evd,false) (* [check_evars] fails if some unresolved evar remains *) (* it assumes that the defined existentials have already been substituted *) -let check_evars env initial_sigma isevars c = - let sigma = evars_of isevars in +let check_evars env initial_sigma evd c = + let sigma = evars_of evd in let c = nf_evar sigma c in let rec proc_rec c = match kind_of_term c with - | Evar (ev,args) -> - assert (Evd.mem sigma ev); - if not (Evd.mem initial_sigma ev) then - let (loc,k) = evar_source ev isevars in - error_unsolvable_implicit loc env sigma k + | Evar (evk,args) -> + assert (Evd.mem sigma evk); + if not (Evd.mem initial_sigma evk) then + let (loc,k) = evar_source evk evd in + let evi = nf_evar_info sigma (Evd.find sigma evk) in + let explain = + let f (_,_,t1,t2) = + (try head_evar t1 = evk with Failure _ -> false) + or (try head_evar t2 = evk with Failure _ -> false) in + let check_several c inst = + let _,argsv = destEvar c in + let l = List.filter (eq_constr inst) (Array.to_list argsv) in + let n = List.length l in + (* Maybe should we select one instead of failing ... *) + if n >= 2 then Some (SeveralInstancesFound n) else None in + match List.filter f (snd (extract_all_conv_pbs evd)) with + | (_,_,t1,t2)::_ -> + if isEvar t2 then check_several t2 t1 + else check_several t1 t2 + | [] -> None + in error_unsolvable_implicit loc env sigma evi k explain | _ -> iter_constr proc_rec c in proc_rec c @@ -754,14 +1122,15 @@ let mk_valcon c = Some c It is, but that's not too bad *) let define_evar_as_abstraction abs evd (ev,args) = let evi = Evd.find (evars_of evd) ev in - let evenv = evar_env evi in - let (evd1,dom) = new_evar evd evenv (new_Type()) in + let evenv = evar_unfiltered_env evi in + let (evd1,dom) = new_evar evd evenv (new_Type()) ~filter:(evar_filter evi) in let nvar = next_ident_away (id_of_string "x") (ids_of_named_context (evar_context evi)) in let newenv = push_named (nvar, None, dom) evenv in let (evd2,rng) = - new_evar evd1 newenv ~src:(evar_source ev evd1) (new_Type()) in + new_evar evd1 newenv ~src:(evar_source ev evd1) (new_Type()) + ~filter:(true::evar_filter evi) in let prod = abs (Name nvar, dom, subst_var nvar rng) in let evd3 = Evd.evar_define ev prod evd2 in let evdom = fst (destEvar dom), args in @@ -770,15 +1139,15 @@ let define_evar_as_abstraction abs evd (ev,args) = let prod' = abs (Name nvar, mkEvar evdom, mkEvar evrng) in (evd3,prod') -let define_evar_as_arrow evd (ev,args) = +let define_evar_as_product evd (ev,args) = define_evar_as_abstraction (fun t -> mkProd t) evd (ev,args) let define_evar_as_lambda evd (ev,args) = define_evar_as_abstraction (fun t -> mkLambda t) evd (ev,args) -let define_evar_as_sort isevars (ev,args) = +let define_evar_as_sort evd (ev,args) = let s = new_Type () in - Evd.evar_define ev s isevars, destSort s + Evd.evar_define ev s evd, destSort s (* We don't try to guess in which sort the type should be defined, since @@ -791,33 +1160,33 @@ let judge_of_new_Type () = Typeops.judge_of_type (new_univ ()) constraint on its domain and codomain. If the input constraint is an evar instantiate it with the product of 2 new evars. *) -let split_tycon loc env isevars tycon = +let split_tycon loc env evd tycon = let rec real_split c = - let sigma = evars_of isevars in + let sigma = evars_of evd in let t = whd_betadeltaiota env sigma c in match kind_of_term t with - | Prod (na,dom,rng) -> isevars, (na, dom, rng) - | Evar ev when not (Evd.is_defined_evar isevars ev) -> - let (isevars',prod) = define_evar_as_arrow isevars ev in + | Prod (na,dom,rng) -> evd, (na, dom, rng) + | Evar ev when not (Evd.is_defined_evar evd ev) -> + let (evd',prod) = define_evar_as_product evd ev in let (_,dom,rng) = destProd prod in - isevars',(Anonymous, dom, rng) + evd',(Anonymous, dom, rng) | _ -> error_not_product_loc loc env sigma c in match tycon with - | None -> isevars,(Anonymous,None,None) + | None -> evd,(Anonymous,None,None) | Some (abs, c) -> (match abs with None -> - let isevars', (n, dom, rng) = real_split c in - isevars', (n, mk_tycon dom, mk_tycon rng) + let evd', (n, dom, rng) = real_split c in + evd', (n, mk_tycon dom, mk_tycon rng) | Some (init, cur) -> if cur = 0 then - let isevars', (x, dom, rng) = real_split c in - isevars, (Anonymous, + let evd', (x, dom, rng) = real_split c in + evd, (Anonymous, Some (Some (init, 0), dom), Some (Some (init, 0), rng)) else - isevars, (Anonymous, None, Some (Some (init, pred cur), c))) + evd, (Anonymous, None, Some (Some (init, pred cur), c))) let valcon_of_tycon x = match x with @@ -833,7 +1202,7 @@ let lift_abstr_tycon_type n (abs, t) = else (Some (init, abs'), t) let lift_tycon_type n (abs, t) = (abs, lift n t) -let lift_tycon n = option_map (lift_tycon_type n) +let lift_tycon n = Option.map (lift_tycon_type n) let pr_tycon_type env (abs, t) = match abs with diff --git a/pretyping/evarutil.mli b/pretyping/evarutil.mli index 896bf26c..c915d4b0 100644 --- a/pretyping/evarutil.mli +++ b/pretyping/evarutil.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: evarutil.mli 9573 2007-01-31 20:18:18Z notin $ i*) +(*i $Id: evarutil.mli 11136 2008-06-18 10:41:34Z herbelin $ i*) (*i*) open Util @@ -34,10 +34,10 @@ val new_untyped_evar : unit -> existential_key (***********************************************************) (* Creating a fresh evar given their type and context *) val new_evar : - evar_defs -> env -> ?src:loc * hole_kind -> types -> evar_defs * constr + evar_defs -> env -> ?src:loc * hole_kind -> ?filter:bool list -> types -> evar_defs * constr (* the same with side-effects *) val e_new_evar : - evar_defs ref -> env -> ?src:loc * hole_kind -> types -> constr + evar_defs ref -> env -> ?src:loc * hole_kind -> ?filter:bool list -> types -> constr (* Create a fresh evar in a context different from its definition context: [new_evar_instance sign evd ty inst] creates a new evar of context @@ -46,16 +46,18 @@ val e_new_evar : of [inst] are typed in the occurrence context and their type (seen as a telescope) is [sign] *) val new_evar_instance : - named_context_val -> evar_defs -> types -> ?src:loc * hole_kind -> - constr list -> evar_defs * constr + named_context_val -> evar_defs -> types -> ?src:loc * hole_kind -> ?filter:bool list -> constr list -> evar_defs * constr -(***********************************************************) -(* Instanciate evars *) +val make_pure_subst : evar_info -> constr array -> (identifier * constr) list -(* suspicious env ? *) -val evar_define : - env -> existential -> constr -> evar_defs -> evar_defs * evar list +(***********************************************************) +(* Instantiate evars *) +(* [evar_define env ev c] try to instantiate [ev] with [c] (typed in [env]), + possibly solving related unification problems, possibly leaving open + some problems that cannot be solved in a unique way; + failed if the instance is not valid for the given [ev] *) +val evar_define : env -> existential -> constr -> evar_defs -> evar_defs (***********************************************************) (* Evars/Metas switching... *) @@ -71,8 +73,10 @@ val non_instantiated : evar_map -> (evar * evar_info) list (* Unification utils *) val is_ground_term : evar_defs -> constr -> bool -val is_eliminator : constr -> bool -val head_is_embedded_evar : evar_defs -> constr -> bool +val solve_refl : + (env -> evar_defs -> conv_pb -> constr -> constr -> evar_defs * bool) + -> env -> evar_defs -> existential_key -> constr array -> constr array -> + evar_defs val solve_simple_eqn : (env -> evar_defs -> conv_pb -> constr -> constr -> evar_defs * bool) -> env -> evar_defs -> conv_pb * existential * constr -> @@ -82,12 +86,12 @@ val solve_simple_eqn : new unresolved evar remains in [c] *) val check_evars : env -> evar_map -> evar_defs -> constr -> unit -val define_evar_as_arrow : evar_defs -> existential -> evar_defs * types +val define_evar_as_product : evar_defs -> existential -> evar_defs * types val define_evar_as_lambda : evar_defs -> existential -> evar_defs * types val define_evar_as_sort : evar_defs -> existential -> evar_defs * sorts -val is_unification_pattern_evar : existential -> constr list -> bool -val is_unification_pattern : constr -> constr array -> bool +val is_unification_pattern_evar : env -> existential -> constr list -> bool +val is_unification_pattern : env -> constr -> constr array -> bool val solve_pattern_eqn : env -> constr list -> constr -> constr (***********************************************************) @@ -136,6 +140,10 @@ val tj_nf_evar : val nf_evar_info : evar_map -> evar_info -> evar_info val nf_evars : evar_map -> evar_map +val nf_named_context_evar : evar_map -> named_context -> named_context +val nf_rel_context_evar : evar_map -> rel_context -> rel_context +val nf_env_evar : evar_map -> env -> env + (* Same for evar defs *) val nf_isevar : evar_defs -> constr -> constr val j_nf_isevar : evar_defs -> unsafe_judgment -> unsafe_judgment @@ -153,6 +161,10 @@ exception Uninstantiated_evar of existential_key val whd_ise : evar_map -> constr -> constr val whd_castappevar : evar_map -> constr -> constr +(* Replace the vars and rels that are aliases to other vars and rels by *) +(* their representative that is most ancient in the context *) +val expand_vars_in_term : env -> constr -> constr + (*********************************************************************) (* debug pretty-printer: *) @@ -162,4 +174,5 @@ val pr_tycon : env -> type_constraint -> Pp.std_ppcmds (**********************************) (* Removing hyps in evars'context *) -val clear_hyps_in_evi : evar_defs ref -> evar_info -> identifier list -> evar_info +val clear_hyps_in_evi : evar_defs ref -> named_context_val -> types -> + identifier list -> named_context_val * types diff --git a/pretyping/evd.ml b/pretyping/evd.ml index 69d4352f..76a5ff26 100644 --- a/pretyping/evd.ml +++ b/pretyping/evd.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: evd.ml 9976 2007-07-12 11:58:30Z msozeau $ *) +(* $Id: evd.ml 11166 2008-06-22 13:23:35Z herbelin $ *) open Pp open Util @@ -31,9 +31,28 @@ type evar_info = { evar_concl : constr; evar_hyps : named_context_val; evar_body : evar_body; + evar_filter : bool list; evar_extra : Dyn.t option} +let make_evar hyps ccl = { + evar_concl = ccl; + evar_hyps = hyps; + evar_body = Evar_empty; + evar_filter = List.map (fun _ -> true) (named_context_of_val hyps); + evar_extra = None +} + +let evar_concl evi = evi.evar_concl +let evar_hyps evi = evi.evar_hyps let evar_context evi = named_context_of_val evi.evar_hyps +let evar_body evi = evi.evar_body +let evar_filter evi = evi.evar_filter +let evar_unfiltered_env evi = Global.env_of_context evi.evar_hyps +let evar_filtered_context evi = + snd (list_filter2 (fun b c -> b) (evar_filter evi,evar_context evi)) +let evar_env evi = + List.fold_right push_named (evar_filtered_context evi) + (reset_context (Global.env())) let eq_evar_info ei1 ei2 = ei1 == ei2 || @@ -49,42 +68,37 @@ let empty = Evarmap.empty let to_list evc = (* Workaround for change in Map.fold behavior *) let l = ref [] in - Evarmap.iter (fun ev x -> l:=(ev,x)::!l) evc; - !l + Evarmap.iter (fun evk x -> l := (evk,x)::!l) evc; + !l -let dom evc = Evarmap.fold (fun ev _ acc -> ev::acc) evc [] +let dom evc = Evarmap.fold (fun evk _ acc -> evk::acc) evc [] let find evc k = Evarmap.find k evc let remove evc k = Evarmap.remove k evc let mem evc k = Evarmap.mem k evc let fold = Evarmap.fold -let add evd ev newinfo = Evarmap.add ev newinfo evd +let add evd evk newinfo = Evarmap.add evk newinfo evd -let define evd ev body = +let define evd evk body = let oldinfo = - try find evd ev + try find evd evk with Not_found -> error "Evd.define: cannot define undeclared evar" in let newinfo = { oldinfo with evar_body = Evar_defined body } in match oldinfo.evar_body with - | Evar_empty -> Evarmap.add ev newinfo evd - | _ -> anomaly "Evd.define: cannot define an isevar twice" - -let is_evar sigma ev = mem sigma ev + | Evar_empty -> Evarmap.add evk newinfo evd + | _ -> anomaly "Evd.define: cannot define an evar twice" -let is_defined sigma ev = - let info = find sigma ev in - not (info.evar_body = Evar_empty) +let is_evar sigma evk = mem sigma evk -let evar_concl ev = ev.evar_concl -let evar_hyps ev = ev.evar_hyps -let evar_body ev = ev.evar_body -let evar_env evd = Global.env_of_context evd.evar_hyps +let is_defined sigma evk = + let info = find sigma evk in + not (info.evar_body = Evar_empty) -let string_of_existential ev = "?" ^ string_of_int ev +let string_of_existential evk = "?" ^ string_of_int evk -let existential_of_int ev = ev +let existential_of_int evk = evk (*******************************************************************) (* Formerly Instantiate module *) @@ -120,14 +134,14 @@ let existential_type sigma (n,args) = try find sigma n with Not_found -> anomaly ("Evar "^(string_of_existential n)^" was not declared") in - let hyps = evar_context info in + let hyps = evar_filtered_context info in instantiate_evar hyps info.evar_concl (Array.to_list args) exception NotInstantiatedEvar let existential_value sigma (n,args) = let info = find sigma n in - let hyps = evar_context info in + let hyps = evar_filtered_context info in match evar_body info with | Evar_defined c -> instantiate_evar hyps c (Array.to_list args) @@ -287,6 +301,8 @@ let existential_value (sigma,_) = existential_value sigma let existential_type (sigma,_) = existential_type sigma let existential_opt_value (sigma,_) = existential_opt_value sigma +let merge e e' = fold (fun n v sigma -> add sigma n v) e' e + (*******************************************************************) type open_constr = evar_map * constr @@ -325,16 +341,45 @@ let mk_freelisted c = let map_fl f cfl = { cfl with rebus=f cfl.rebus } +(* Status of an instance found by unification wrt to the meta it solves: + - a supertype of the meta (e.g. the solution to ?X <= T is a supertype of ?X) + - a subtype of the meta (e.g. the solution to T <= ?X is a supertype of ?X) + - a term that can be eta-expanded n times while still being a solution + (e.g. the solution [P] to [?X u v = P u v] can be eta-expanded twice) +*) + +type instance_constraint = + IsSuperType | IsSubType | ConvUpToEta of int | UserGiven + +(* Status of the unification of the type of an instance against the type of + the meta it instantiates: + - CoerceToType means that the unification of types has not been done + and that a coercion can still be inserted: the meta should not be + substituted freely (this happens for instance given via the + "with" binding clause). + - TypeProcessed means that the information obtainable from the + unification of types has been extracted. + - TypeNotProcessed means that the unification of types has not been + done but it is known that no coercion may be inserted: the meta + can be substituted freely. +*) + +type instance_typing_status = + CoerceToType | TypeNotProcessed | TypeProcessed + +(* Status of an instance together with the status of its type unification *) + +type instance_status = instance_constraint * instance_typing_status (* Clausal environments *) type clbinding = | Cltyp of name * constr freelisted - | Clval of name * constr freelisted * constr freelisted + | Clval of name * (constr freelisted * instance_status) * constr freelisted let map_clb f = function | Cltyp (na,cfl) -> Cltyp (na,map_fl f cfl) - | Clval (na,cfl1,cfl2) -> Clval (na,map_fl f cfl1,map_fl f cfl2) + | Clval (na,(cfl1,pb),cfl2) -> Clval (na,(map_fl f cfl1,pb),map_fl f cfl2) (* name of defined is erased (but it is pretty-printed) *) let clb_name = function @@ -362,12 +407,15 @@ type hole_kind = | CasesType | InternalHole | TomatchTypeParameter of inductive * int + | GoalEvar + | ImpossibleCase type conv_pb = Reduction.conv_pb type evar_constraint = conv_pb * Environ.env * constr * constr type evar_defs = { evars : evar_map; conv_pbs : evar_constraint list; + last_mods : existential_key list; history : (existential_key * (loc * hole_kind)) list; metas : clbinding Metamap.t } @@ -378,46 +426,61 @@ let subst_evar_defs_light sub evd = metas = Metamap.map (map_clb (subst_mps sub)) evd.metas } let create_evar_defs sigma = - { evars=sigma; conv_pbs=[]; history=[]; metas=Metamap.empty } + { evars=sigma; conv_pbs=[]; last_mods = []; history=[]; metas=Metamap.empty } +let create_goal_evar_defs sigma = + let h = fold (fun mv _ l -> (mv,(dummy_loc,GoalEvar))::l) sigma [] in + { evars=sigma; conv_pbs=[]; last_mods = []; history=h; metas=Metamap.empty } +let empty_evar_defs = create_evar_defs empty let evars_of d = d.evars let evars_reset_evd evd d = {d with evars = evd} let reset_evd (sigma,mmap) d = {d with evars = sigma; metas=mmap} let add_conv_pb pb d = {d with conv_pbs = pb::d.conv_pbs} -let evar_source ev d = - try List.assoc ev d.history +let evar_source evk d = + try List.assoc evk d.history with Not_found -> (dummy_loc, InternalHole) (* define the existential of section path sp as the constr body *) -let evar_define sp body isevars = - {isevars with evars = define isevars.evars sp body} - -let evar_declare hyps evn ty ?(src=(dummy_loc,InternalHole)) evd = +let evar_define evk body evd = { evd with - evars = add evd.evars evn - {evar_hyps=hyps; - evar_concl=ty; - evar_body=Evar_empty; - evar_extra=None}; - history = (evn,src)::evd.history } + evars = define evd.evars evk body; + last_mods = evk :: evd.last_mods } + +let evar_declare hyps evk ty ?(src=(dummy_loc,InternalHole)) ?filter evd = + let filter = + if filter = None then + List.map (fun _ -> true) (named_context_of_val hyps) + else + (let filter = Option.get filter in + assert (List.length filter = List.length (named_context_of_val hyps)); + filter) + in + { evd with + evars = add evd.evars evk + {evar_hyps = hyps; + evar_concl = ty; + evar_body = Evar_empty; + evar_filter = filter; + evar_extra = None}; + history = (evk,src)::evd.history } -let is_defined_evar isevars (n,_) = is_defined isevars.evars n +let is_defined_evar evd (evk,_) = is_defined evd.evars evk (* Does k corresponds to an (un)defined existential ? *) -let is_undefined_evar isevars c = match kind_of_term c with - | Evar ev -> not (is_defined_evar isevars ev) +let is_undefined_evar evd c = match kind_of_term c with + | Evar ev -> not (is_defined_evar evd ev) | _ -> false -let undefined_evars isevars = - let evd = - fold (fun ev evi sigma -> if evi.evar_body = Evar_empty then - add sigma ev evi else sigma) - isevars.evars empty +let undefined_evars evd = + let evars = + fold (fun evk evi sigma -> if evi.evar_body = Evar_empty then + add sigma evk evi else sigma) + evd.evars empty in - { isevars with evars = evd } + { evd with evars = evars } (* extracts conversion problems that satisfy predicate p *) (* Note: conv_pbs not satisying p are stored back in reverse order *) -let get_conv_pbs isevars p = +let extract_conv_pbs evd p = let (pbs,pbs1) = List.fold_left (fun (pbs,pbs1) pb -> @@ -426,11 +489,19 @@ let get_conv_pbs isevars p = else (pbs,pb::pbs1)) ([],[]) - isevars.conv_pbs + evd.conv_pbs in - {isevars with conv_pbs = pbs1}, + {evd with conv_pbs = pbs1; last_mods = []}, pbs +let extract_changed_conv_pbs evd p = + extract_conv_pbs evd (p evd.last_mods) + +let extract_all_conv_pbs evd = + extract_conv_pbs evd (fun _ -> true) + +let evar_merge evd evars = + { evd with evars = merge evd.evars evars } (**********************************************************) (* Sort variables *) @@ -452,11 +523,35 @@ let pr_sort_constraints (_,sm) = pr_sort_cstrs sm let meta_list evd = metamap_to_list evd.metas +let undefined_metas evd = + List.sort Pervasives.compare (map_succeed (function + | (n,Clval(_,_,typ)) -> failwith "" + | (n,Cltyp (_,typ)) -> n) + (meta_list evd)) + +let metas_of evd = + List.map (function + | (n,Clval(_,_,typ)) -> (n,typ.rebus) + | (n,Cltyp (_,typ)) -> (n,typ.rebus)) + (meta_list evd) + +let map_metas_fvalue f evd = + { evd with metas = + Metamap.map + (function + | Clval(id,(c,s),typ) -> Clval(id,(mk_freelisted (f c.rebus),s),typ) + | x -> x) evd.metas } + +let meta_opt_fvalue evd mv = + match Metamap.find mv evd.metas with + | Clval(_,b,_) -> Some b + | Cltyp _ -> None + let meta_defined evd mv = match Metamap.find mv evd.metas with | Clval _ -> true | Cltyp _ -> false - + let meta_fvalue evd mv = match Metamap.find mv evd.metas with | Clval(_,b,_) -> b @@ -470,12 +565,19 @@ let meta_ftype evd mv = let meta_declare mv v ?(name=Anonymous) evd = { evd with metas = Metamap.add mv (Cltyp(name,mk_freelisted v)) evd.metas } -let meta_assign mv v evd = +let meta_assign mv (v,pb) evd = + match Metamap.find mv evd.metas with + | Cltyp(na,ty) -> + { evd with + metas = Metamap.add mv (Clval(na,(mk_freelisted v,pb),ty)) evd.metas } + | _ -> anomaly "meta_assign: already defined" + +let meta_reassign mv (v,pb) evd = match Metamap.find mv evd.metas with - Cltyp(na,ty) -> - { evd with - metas = Metamap.add mv (Clval(na,mk_freelisted v, ty)) evd.metas } - | _ -> anomaly "meta_assign: already defined" + | Clval(na,_,ty) -> + { evd with + metas = Metamap.add mv (Clval(na,(mk_freelisted v,pb),ty)) evd.metas } + | _ -> anomaly "meta_reassign: not yet defined" (* If the meta is defined then forget its name *) let meta_name evd mv = @@ -510,10 +612,51 @@ let meta_merge evd1 evd2 = metas = List.fold_left (fun m (n,v) -> Metamap.add n v m) evd2.metas (metamap_to_list evd1.metas) } +type metabinding = metavariable * constr * instance_status + +let retract_coercible_metas evd = + let mc,ml = + Metamap.fold (fun n v (mc,ml) -> + match v with + | Clval (na,(b,(UserGiven,CoerceToType as s)),typ) -> + (n,b.rebus,s)::mc, Metamap.add n (Cltyp (na,typ)) ml + | v -> + mc, Metamap.add n v ml) + evd.metas ([],Metamap.empty) in + mc, { evd with metas = ml } + +let rec list_assoc_in_triple x = function + [] -> raise Not_found + | (a,b,_)::l -> if compare a x = 0 then b else list_assoc_in_triple x l + +let subst_defined_metas bl c = + let rec substrec c = match kind_of_term c with + | Meta i -> substrec (list_assoc_in_triple i bl) + | _ -> map_constr substrec c + in try Some (substrec c) with Not_found -> None + +(**********************************************************) +(* Failure explanation *) + +type unsolvability_explanation = SeveralInstancesFound of int (**********************************************************) (* Pretty-printing *) +let pr_instance_status (sc,typ) = + begin match sc with + | IsSubType -> str " [or a subtype of it]" + | IsSuperType -> str " [or a supertype of it]" + | ConvUpToEta 0 -> mt () + | UserGiven -> mt () + | ConvUpToEta n -> str" [or an eta-expansion up to " ++ int n ++ str" of it]" + end ++ + begin match typ with + | CoerceToType -> str " [up to coercion]" + | TypeNotProcessed -> mt () + | TypeProcessed -> str " [type is checked]" + end + let pr_meta_map mmap = let pr_name = function Name id -> str"[" ++ pr_id id ++ str"]" @@ -523,17 +666,22 @@ let pr_meta_map mmap = hov 0 (pr_meta mv ++ pr_name na ++ str " : " ++ print_constr b.rebus ++ fnl ()) - | (mv,Clval(na,b,_)) -> + | (mv,Clval(na,(b,s),_)) -> hov 0 (pr_meta mv ++ pr_name na ++ str " := " ++ - print_constr b.rebus ++ fnl ()) + print_constr b.rebus ++ spc () ++ pr_instance_status s ++ fnl ()) in prlist pr_meta_binding (metamap_to_list mmap) -let pr_idl idl = prlist_with_sep pr_spc pr_id idl +let pr_decl ((id,b,_),ok) = + match b with + | None -> if ok then pr_id id else (str "{" ++ pr_id id ++ str "}") + | Some c -> str (if ok then "(" else "{") ++ pr_id id ++ str ":=" ++ + print_constr c ++ str (if ok then ")" else "}") let pr_evar_info evi = - let phyps = pr_idl (List.rev (ids_of_named_context (evar_context evi))) in + let decls = List.combine (evar_context evi) (evar_filter evi) in + let phyps = prlist_with_sep pr_spc pr_decl (List.rev decls) in let pty = print_constr evi.evar_concl in let pb = match evi.evar_body with @@ -568,3 +716,6 @@ let pr_evar_defs evd = if evd.metas = Metamap.empty then mt() else str"METAS:"++brk(0,1)++pr_meta_map evd.metas in v 0 (pp_evm ++ cstrs ++ pp_met) + +let pr_metaset metas = + str "[" ++ prlist_with_sep spc pr_meta (Metaset.elements metas) ++ str "]" diff --git a/pretyping/evd.mli b/pretyping/evd.mli index ef6a3d7b..1acc811b 100644 --- a/pretyping/evd.mli +++ b/pretyping/evd.mli @@ -1,3 +1,4 @@ + (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* evar_info -> bool + +val make_evar : named_context_val -> types -> evar_info +val evar_concl : evar_info -> constr val evar_context : evar_info -> named_context +val evar_filtered_context : evar_info -> named_context +val evar_hyps : evar_info -> named_context_val +val evar_body : evar_info -> evar_body +val evar_filter : evar_info -> bool list +val evar_unfiltered_env : evar_info -> env +val evar_env : evar_info -> env + type evar_map val empty : evar_map @@ -50,17 +64,14 @@ val mem : evar_map -> evar -> bool val to_list : evar_map -> (evar * evar_info) list val fold : (evar -> evar_info -> 'a -> 'a) -> evar_map -> 'a -> 'a +val merge : evar_map -> evar_map -> evar_map + val define : evar_map -> evar -> constr -> evar_map val is_evar : evar_map -> evar -> bool val is_defined : evar_map -> evar -> bool -val evar_concl : evar_info -> constr -val evar_hyps : evar_info -> Environ.named_context_val -val evar_body : evar_info -> evar_body -val evar_env : evar_info -> Environ.env - val string_of_existential : evar -> string val existential_of_int : int -> evar @@ -101,9 +112,41 @@ val metavars_of : constr -> Metaset.t val mk_freelisted : constr -> constr freelisted val map_fl : ('a -> 'b) -> 'a freelisted -> 'b freelisted +(* Status of an instance found by unification wrt to the meta it solves: + - a supertype of the meta (e.g. the solution to ?X <= T is a supertype of ?X) + - a subtype of the meta (e.g. the solution to T <= ?X is a supertype of ?X) + - a term that can be eta-expanded n times while still being a solution + (e.g. the solution [P] to [?X u v = P u v] can be eta-expanded twice) +*) + +type instance_constraint = + IsSuperType | IsSubType | ConvUpToEta of int | UserGiven + +(* Status of the unification of the type of an instance against the type of + the meta it instantiates: + - CoerceToType means that the unification of types has not been done + and that a coercion can still be inserted: the meta should not be + substituted freely (this happens for instance given via the + "with" binding clause). + - TypeProcessed means that the information obtainable from the + unification of types has been extracted. + - TypeNotProcessed means that the unification of types has not been + done but it is known that no coercion may be inserted: the meta + can be substituted freely. +*) + +type instance_typing_status = + CoerceToType | TypeNotProcessed | TypeProcessed + +(* Status of an instance together with the status of its type unification *) + +type instance_status = instance_constraint * instance_typing_status + +(* Clausal environments *) + type clbinding = | Cltyp of name * constr freelisted - | Clval of name * constr freelisted * constr freelisted + | Clval of name * (constr freelisted * instance_status) * constr freelisted val map_clb : (constr -> constr) -> clbinding -> clbinding @@ -115,7 +158,9 @@ type evar_defs val subst_evar_defs_light : substitution -> evar_defs -> evar_defs (* create an [evar_defs] with empty meta map: *) -val create_evar_defs : evar_map -> evar_defs +val create_evar_defs : evar_map -> evar_defs +val create_goal_evar_defs : evar_map -> evar_defs +val empty_evar_defs : evar_defs val evars_of : evar_defs -> evar_map val evars_reset_evd : evar_map -> evar_defs -> evar_defs @@ -127,38 +172,57 @@ type hole_kind = | CasesType | InternalHole | TomatchTypeParameter of inductive * int + | GoalEvar + | ImpossibleCase val is_defined_evar : evar_defs -> existential -> bool val is_undefined_evar : evar_defs -> constr -> bool val undefined_evars : evar_defs -> evar_defs val evar_declare : - Environ.named_context_val -> evar -> types -> ?src:loc * hole_kind -> - evar_defs -> evar_defs + named_context_val -> evar -> types -> ?src:loc * hole_kind -> + ?filter:bool list -> evar_defs -> evar_defs val evar_define : evar -> constr -> evar_defs -> evar_defs val evar_source : existential_key -> evar_defs -> loc * hole_kind +(* [evar_merge evd evars] extends the evars of [evd] with [evars] *) +val evar_merge : evar_defs -> evar_map -> evar_defs + (* Unification constraints *) type conv_pb = Reduction.conv_pb -type evar_constraint = conv_pb * Environ.env * constr * constr +type evar_constraint = conv_pb * env * constr * constr val add_conv_pb : evar_constraint -> evar_defs -> evar_defs -val get_conv_pbs : evar_defs -> (evar_constraint -> bool) -> - evar_defs * evar_constraint list +val extract_changed_conv_pbs : evar_defs -> + (existential_key list -> evar_constraint -> bool) -> + evar_defs * evar_constraint list +val extract_all_conv_pbs : evar_defs -> evar_defs * evar_constraint list + (* Metas *) val meta_list : evar_defs -> (metavariable * clbinding) list val meta_defined : evar_defs -> metavariable -> bool (* [meta_fvalue] raises [Not_found] if meta not in map or [Anomaly] if meta has no value *) -val meta_fvalue : evar_defs -> metavariable -> constr freelisted +val meta_fvalue : evar_defs -> metavariable -> constr freelisted * instance_status +val meta_opt_fvalue : evar_defs -> metavariable -> (constr freelisted * instance_status) option val meta_ftype : evar_defs -> metavariable -> constr freelisted val meta_name : evar_defs -> metavariable -> name val meta_with_name : evar_defs -> identifier -> metavariable val meta_declare : metavariable -> types -> ?name:name -> evar_defs -> evar_defs -val meta_assign : metavariable -> constr -> evar_defs -> evar_defs +val meta_assign : metavariable -> constr * instance_status -> evar_defs -> evar_defs +val meta_reassign : metavariable -> constr * instance_status -> evar_defs -> evar_defs (* [meta_merge evd1 evd2] returns [evd2] extended with the metas of [evd1] *) val meta_merge : evar_defs -> evar_defs -> evar_defs +val undefined_metas : evar_defs -> metavariable list +val metas_of : evar_defs -> metamap +val map_metas_fvalue : (constr -> constr) -> evar_defs -> evar_defs + +type metabinding = metavariable * constr * instance_status + +val retract_coercible_metas : evar_defs -> metabinding list * evar_defs +val subst_defined_metas : metabinding list -> constr -> constr option + (**********************************************************) (* Sort variables *) @@ -168,6 +232,11 @@ val whd_sort_variable : evar_map -> constr -> constr val set_leq_sort_variable : evar_map -> sorts -> sorts -> evar_map val define_sort_variable : evar_map -> sorts -> sorts -> evar_map +(**********************************************************) +(* Failure explanation *) + +type unsolvability_explanation = SeveralInstancesFound of int + (*********************************************************************) (* debug pretty-printer: *) @@ -175,3 +244,4 @@ val pr_evar_info : evar_info -> Pp.std_ppcmds val pr_evar_map : evar_map -> Pp.std_ppcmds val pr_evar_defs : evar_defs -> Pp.std_ppcmds val pr_sort_constraints : evar_map -> Pp.std_ppcmds +val pr_metaset : Metaset.t -> Pp.std_ppcmds diff --git a/pretyping/indrec.ml b/pretyping/indrec.ml index eeddcb64..2325baec 100644 --- a/pretyping/indrec.ml +++ b/pretyping/indrec.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: indrec.ml 9519 2007-01-22 18:13:29Z notin $ *) +(* $Id: indrec.ml 10410 2007-12-31 13:11:55Z msozeau $ *) open Pp open Util @@ -31,7 +31,7 @@ open Sign type recursion_scheme_error = | NotAllowedCaseAnalysis of bool * sorts * inductive | BadInduction of bool * identifier * sorts - | NotMutualInScheme + | NotMutualInScheme of inductive * inductive exception RecursionSchemeError of recursion_scheme_error @@ -78,7 +78,7 @@ let mis_make_case_com depopt env sigma ind (mib,mip as specif) kind = let depind = build_dependent_inductive env indf' in let deparsign = (Anonymous,None,depind)::arsign in - let ci = make_default_case_info env RegularStyle ind in + let ci = make_case_info env ind RegularStyle in let pbody = appvect (mkRel (ndepar + nbprod), @@ -157,7 +157,7 @@ let type_rec_branch is_rec dep env sigma (vargs,depPvect,decP) tyi cs recargs = (match dest_recarg ra with | Mrec j when is_rec -> (depPvect.(j),rest) | Imbr _ -> - Options.if_verbose warning "Ignoring recursive call"; + Flags.if_verbose warning "Ignoring recursive call"; (None,rest) | _ -> (None, rest)) in @@ -275,19 +275,18 @@ let mis_make_indrec env sigma listdepkind mib = Array.create mib.mind_ntypes (None : (bool * constr) option) in let _ = let rec - assign k = function - | [] -> () - | (indi,mibi,mipi,dep,_)::rest -> - (Array.set depPvec (snd indi) (Some(dep,mkRel k)); - assign (k-1) rest) + assign k = function + | [] -> () + | (indi,mibi,mipi,dep,_)::rest -> + (Array.set depPvec (snd indi) (Some(dep,mkRel k)); + assign (k-1) rest) in - assign nrec listdepkind in + assign nrec listdepkind in let recargsvec = Array.map (fun mip -> mip.mind_recargs) mib.mind_packets in - (* recarg information for non recursive parameters *) + (* recarg information for non recursive parameters *) let rec recargparn l n = - if n = 0 then l else recargparn (mk_norec::l) (n-1) - in + if n = 0 then l else recargparn (mk_norec::l) (n-1) in let recargpar = recargparn [] (nparams-nparrec) in let make_one_rec p = let makefix nbconstruct = @@ -296,97 +295,97 @@ let mis_make_indrec env sigma listdepkind mib = let tyi = snd indi in let nctyi = Array.length mipi.mind_consnames in (* nb constructeurs du type*) - + (* arity in the context of the fixpoint, i.e. - P1..P_nrec f1..f_nbconstruct *) + P1..P_nrec f1..f_nbconstruct *) let args = extended_rel_list (nrec+nbconstruct) lnamesparrec in let indf = make_ind_family(indi,args) in - + let arsign,_ = get_arity env indf in let depind = build_dependent_inductive env indf in let deparsign = (Anonymous,None,depind)::arsign in - + let nonrecpar = rel_context_length lnonparrec in let larsign = rel_context_length deparsign in let ndepar = larsign - nonrecpar in let dect = larsign+nrec+nbconstruct in - - (* constructors in context of the Cases expr, i.e. - P1..P_nrec f1..f_nbconstruct F_1..F_nrec a_1..a_nar x:I *) + + (* constructors in context of the Cases expr, i.e. + P1..P_nrec f1..f_nbconstruct F_1..F_nrec a_1..a_nar x:I *) let args' = extended_rel_list (dect+nrec) lnamesparrec in let args'' = extended_rel_list ndepar lnonparrec in let indf' = make_ind_family(indi,args'@args'') in - + let branches = let constrs = get_constructors env indf' in let fi = rel_vect (dect-i-nctyi) nctyi in let vecfi = Array.map - (fun f -> appvect (f,extended_rel_vect ndepar lnonparrec)) - fi + (fun f -> appvect (f,extended_rel_vect ndepar lnonparrec)) + fi in - array_map3 - (make_rec_branch_arg env sigma - (nparrec,depPvec,larsign)) - vecfi constrs (dest_subterms recargsvec.(tyi)) + array_map3 + (make_rec_branch_arg env sigma + (nparrec,depPvec,larsign)) + vecfi constrs (dest_subterms recargsvec.(tyi)) in - + let j = (match depPvec.(tyi) with - | Some (_,c) when isRel c -> destRel c - | _ -> assert false) + | Some (_,c) when isRel c -> destRel c + | _ -> assert false) in - - (* Predicate in the context of the case *) - + + (* Predicate in the context of the case *) + let depind' = build_dependent_inductive env indf' in let arsign',_ = get_arity env indf' in let deparsign' = (Anonymous,None,depind')::arsign' in - + let pargs = let nrpar = extended_rel_list (2*ndepar) lnonparrec and nrar = if dep then extended_rel_list 0 deparsign' - else extended_rel_list 1 arsign' + else extended_rel_list 1 arsign' in nrpar@nrar - + in - (* body of i-th component of the mutual fixpoint *) + (* body of i-th component of the mutual fixpoint *) let deftyi = - let ci = make_default_case_info env RegularStyle indi in + let ci = make_case_info env indi RegularStyle in let concl = applist (mkRel (dect+j+ndepar),pargs) in let pred = it_mkLambda_or_LetIn_name env ((if dep then mkLambda_name env else mkLambda) - (Anonymous,depind',concl)) + (Anonymous,depind',concl)) arsign' in - it_mkLambda_or_LetIn_name env - (mkCase (ci, pred, - mkRel 1, - branches)) - (lift_rel_context nrec deparsign) + it_mkLambda_or_LetIn_name env + (mkCase (ci, pred, + mkRel 1, + branches)) + (lift_rel_context nrec deparsign) in - + (* type of i-th component of the mutual fixpoint *) - + let typtyi = - let concl = - let pargs = if dep then extended_rel_vect 0 deparsign - else extended_rel_vect 1 arsign - in appvect (mkRel (nbconstruct+ndepar+nonrecpar+j),pargs) - in it_mkProd_or_LetIn_name env + let concl = + let pargs = if dep then extended_rel_vect 0 deparsign + else extended_rel_vect 1 arsign + in appvect (mkRel (nbconstruct+ndepar+nonrecpar+j),pargs) + in it_mkProd_or_LetIn_name env concl deparsign in - mrec (i+nctyi) (rel_context_nhyps arsign ::ln) (typtyi::ltyp) - (deftyi::ldef) rest + mrec (i+nctyi) (rel_context_nhyps arsign ::ln) (typtyi::ltyp) + (deftyi::ldef) rest | [] -> let fixn = Array.of_list (List.rev ln) in let fixtyi = Array.of_list (List.rev ltyp) in let fixdef = Array.of_list (List.rev ldef) in let names = Array.create nrec (Name(id_of_string "F")) in - mkFix ((fixn,p),(names,fixtyi,fixdef)) + mkFix ((fixn,p),(names,fixtyi,fixdef)) in - mrec 0 [] [] [] + mrec 0 [] [] [] in let rec make_branch env i = function | (indi,mibi,mipi,dep,_)::rest -> @@ -404,27 +403,28 @@ let mis_make_indrec env sigma listdepkind mib = type_rec_branch true dep env sigma (vargs,depPvec,i+j) tyi cs recarg in - mkLambda_string "f" p_0 - (onerec (push_rel (Anonymous,None,p_0) env) (j+1)) + mkLambda_string "f" p_0 + (onerec (push_rel (Anonymous,None,p_0) env) (j+1)) in onerec env 0 | [] -> makefix i listdepkind - in + in let rec put_arity env i = function | (indi,_,_,dep,kinds)::rest -> let indf = make_ind_family (indi,extended_rel_list i lnamesparrec) in let typP = make_arity env dep indf (new_sort_in_family kinds) in - mkLambda_string "P" typP - (put_arity (push_rel (Anonymous,None,typP) env) (i+1) rest) + mkLambda_string "P" typP + (put_arity (push_rel (Anonymous,None,typP) env) (i+1) rest) | [] -> make_branch env 0 listdepkind - in - - (* Body on make_one_rec *) + in + + (* Body on make_one_rec *) let (indi,mibi,mipi,dep,kind) = List.nth listdepkind p in + if (mis_is_recursive_subset - (List.map (fun (indi,_,_,_,_) -> snd indi) listdepkind) - mipi.mind_recargs) + (List.map (fun (indi,_,_,_,_) -> snd indi) listdepkind) + mipi.mind_recargs) then let env' = push_rel_context lnamesparrec env in it_mkLambda_or_LetIn_name env (put_arity env' 0 listdepkind) @@ -432,15 +432,15 @@ let mis_make_indrec env sigma listdepkind mib = else mis_make_case_com (Some dep) env sigma indi (mibi,mipi) kind in - (* Body of mis_make_indrec *) - list_tabulate make_one_rec nrec + (* Body of mis_make_indrec *) + list_tabulate make_one_rec nrec (**********************************************************************) (* This builds elimination predicate for Case tactic *) let make_case_com depopt env sigma ity kind = let (mib,mip) = lookup_mind_specif env ity in - mis_make_case_com depopt env sigma ity (mib,mip) kind + mis_make_case_com depopt env sigma ity (mib,mip) kind let make_case_dep env = make_case_com (Some true) env let make_case_nodep env = make_case_com (Some false) env @@ -459,7 +459,7 @@ let change_sort_arity sort = | Sort _ -> mkSort sort | _ -> assert false in - drec + drec (* [npar] is the number of expected arguments (then excluding letin's) *) let instantiate_indrec_scheme sort = @@ -501,13 +501,13 @@ let instantiate_type_indrec_scheme sort npars term = let check_arities listdepkind = let _ = List.fold_left - (fun ln ((_,ni),mibi,mipi,dep,kind) -> + (fun ln ((_,ni as mind),mibi,mipi,dep,kind) -> let id = mipi.mind_typename in let kelim = elim_sorts (mibi,mipi) in if not (List.exists ((=) kind) kelim) then raise (RecursionSchemeError (BadInduction (dep,id,new_sort_in_family kind))) else if List.mem ni ln then raise - (RecursionSchemeError NotMutualInScheme) + (RecursionSchemeError (NotMutualInScheme (mind,mind))) else ni::ln) [] listdepkind in true @@ -520,11 +520,11 @@ let build_mutual_indrec env sigma = function (List.map (function (mind',mibi',mipi',dep',s') -> let (sp',_) = mind' in - if sp=sp' then + if sp=sp' then let (mibi',mipi') = lookup_mind_specif env mind' in - (mind',mibi',mipi',dep',s') - else - raise (RecursionSchemeError NotMutualInScheme)) + (mind',mibi',mipi',dep',s') + else + raise (RecursionSchemeError (NotMutualInScheme (mind,mind')))) lrecspec) in let _ = check_arities listdepkind in @@ -535,7 +535,7 @@ let build_indrec env sigma ind = let (mib,mip) = lookup_mind_specif env ind in let kind = inductive_sort_family mip in let dep = kind <> InProp in - List.hd (mis_make_indrec env sigma [(ind,mib,mip,dep,kind)] mib) + List.hd (mis_make_indrec env sigma [(ind,mib,mip,dep,kind)] mib) (**********************************************************************) (* To handle old Case/Match syntax in Pretyping *) diff --git a/pretyping/indrec.mli b/pretyping/indrec.mli index e5eb07f5..6f177474 100644 --- a/pretyping/indrec.mli +++ b/pretyping/indrec.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: indrec.mli 7660 2005-12-17 21:13:48Z herbelin $ i*) +(*i $Id: indrec.mli 9831 2007-05-17 18:55:42Z herbelin $ i*) (*i*) open Names @@ -22,7 +22,7 @@ open Evd type recursion_scheme_error = | NotAllowedCaseAnalysis of bool * sorts * inductive | BadInduction of bool * identifier * sorts - | NotMutualInScheme + | NotMutualInScheme of inductive * inductive exception RecursionSchemeError of recursion_scheme_error diff --git a/pretyping/inductiveops.ml b/pretyping/inductiveops.ml index 14136f61..0daff713 100644 --- a/pretyping/inductiveops.ml +++ b/pretyping/inductiveops.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: inductiveops.ml 9310 2006-10-28 19:35:09Z herbelin $ *) +(* $Id: inductiveops.ml 10114 2007-09-06 07:36:14Z herbelin $ *) open Util open Names @@ -131,21 +131,16 @@ let allowed_sorts env (kn,i as ind) = mip.mind_kelim (* Annotation for cases *) -let make_case_info env ind style pats_source = +let make_case_info env ind style = let (mib,mip) = Inductive.lookup_mind_specif env ind in - let print_info = - { ind_nargs = mip.mind_nrealargs; - style = style; - source = pats_source } in + let print_info = { ind_nargs = mip.mind_nrealargs; style = style } in { ci_ind = ind; ci_npar = mib.mind_nparams; ci_cstr_nargs = mip.mind_consnrealdecls; ci_pp_info = print_info } let make_default_case_info env style ind = - let (mib,mip) = Inductive.lookup_mind_specif env ind in make_case_info env ind style - (Array.map (fun _ -> RegularPat) mip.mind_consnames) (*s Useful functions *) @@ -398,30 +393,19 @@ let arity_of_case_predicate env (ind,params) dep k = (* A function which checks that a term well typed verifies both syntactic conditions *) -let control_only_guard env = - let rec control_rec c = match kind_of_term c with - | Rel _ | Var _ -> () - | Sort _ | Meta _ -> () - | Ind _ -> () - | Construct _ -> () - | Const _ -> () - | CoFix (_,(_,tys,bds) as cofix) -> - Inductive.check_cofix env cofix; - Array.iter control_rec tys; - Array.iter control_rec bds; - | Fix (_,(_,tys,bds) as fix) -> - Inductive.check_fix env fix; - Array.iter control_rec tys; - Array.iter control_rec bds; - | Case(_,p,c,b) -> control_rec p;control_rec c;Array.iter control_rec b - | Evar (_,cl) -> Array.iter control_rec cl - | App (c,cl) -> control_rec c; Array.iter control_rec cl - | Cast (c1,_, c2) -> control_rec c1; control_rec c2 - | Prod (_,c1,c2) -> control_rec c1; control_rec c2 - | Lambda (_,c1,c2) -> control_rec c1; control_rec c2 - | LetIn (_,c1,c2,c3) -> control_rec c1; control_rec c2; control_rec c3 - in - control_rec +let control_only_guard env c = + let check_fix_cofix e c = match kind_of_term c with + | CoFix (_,(_,_,_) as cofix) -> + Inductive.check_cofix e cofix + | Fix (_,(_,_,_) as fix) -> + Inductive.check_fix e fix + | _ -> () + in + let rec iter env c = + check_fix_cofix env c; + iter_constr_with_full_binders push_rel iter env c + in + iter env c let subst_inductive subst (kn,i as ind) = let kn' = Mod_subst.subst_kn subst kn in diff --git a/pretyping/inductiveops.mli b/pretyping/inductiveops.mli index d49b64d9..9e370fec 100644 --- a/pretyping/inductiveops.mli +++ b/pretyping/inductiveops.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: inductiveops.mli 9194 2006-10-01 09:25:19Z herbelin $ i*) +(*i $Id: inductiveops.mli 9707 2007-03-15 16:36:15Z herbelin $ i*) open Names open Term @@ -105,9 +105,11 @@ val arity_of_case_predicate : val type_case_branches_with_names : env -> inductive * constr list -> unsafe_judgment -> constr -> types array * types -val make_case_info : - env -> inductive -> case_style -> pattern_source array -> case_info +val make_case_info : env -> inductive -> case_style -> case_info + +(*i Compatibility val make_default_case_info : env -> case_style -> inductive -> case_info +i*) (********************) val control_only_guard : env -> types -> unit diff --git a/pretyping/matching.ml b/pretyping/matching.ml index 65ce2ef4..aaa4c3f0 100644 --- a/pretyping/matching.ml +++ b/pretyping/matching.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: matching.ml 9280 2006-10-25 21:37:37Z herbelin $ *) +(* $Id: matching.ml 10451 2008-01-18 17:20:28Z barras $ *) (*i*) open Util @@ -153,7 +153,7 @@ let matches_core convert allow_partial_app pat c = sorec ((na2,t2)::stk) (sorec stk sigma c1 c2) d1 d2 | PRef (ConstRef _ as ref), _ when convert <> None -> - let (env,evars) = out_some convert in + let (env,evars) = Option.get convert in let c = constr_of_global ref in if is_conv env evars c cT then sigma else raise PatternMatchingFailure @@ -161,7 +161,8 @@ let matches_core convert allow_partial_app pat c = | PIf (a1,b1,b1'), Case (ci,_,a2,[|b2;b2'|]) -> let ctx,b2 = decompose_lam_n_assum ci.ci_cstr_nargs.(0) b2 in let ctx',b2' = decompose_lam_n_assum ci.ci_cstr_nargs.(1) b2' in - let n = List.length ctx and n' = List.length ctx' in + let n = rel_context_length ctx in + let n' = rel_context_length ctx' in if noccur_between 1 n b2 & noccur_between 1 n' b2' then let s = List.fold_left (fun l (na,_,t) -> (na,t)::l) stk ctx in let s' = List.fold_left (fun l (na,_,t) -> (na,t)::l) stk ctx' in diff --git a/pretyping/pattern.ml b/pretyping/pattern.ml index 3060ee03..5df5c9fb 100644 --- a/pretyping/pattern.ml +++ b/pretyping/pattern.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: pattern.ml 9976 2007-07-12 11:58:30Z msozeau $ *) +(* $Id: pattern.ml 10785 2008-04-13 21:41:54Z herbelin $ *) open Util open Names @@ -92,7 +92,7 @@ let head_of_constr_reference c = match kind_of_term c with let rec pattern_of_constr t = match kind_of_term t with | Rel n -> PRel n - | Meta n -> PMeta (Some (id_of_string (string_of_int n))) + | Meta n -> PMeta (Some (id_of_string ("META" ^ string_of_int n))) | Var id -> PVar id | Sort (Prop c) -> PSort (RProp c) | Sort (Type _) -> PSort (RType None) @@ -185,7 +185,7 @@ let rec subst_pattern subst pat = match pat with if c' == c && c1' == c1 && c2' == c2 then pat else PIf (c',c1',c2') | PCase ((a,b,ind,n as cs),typ,c,branches) -> - let ind' = option_smartmap (Inductiveops.subst_inductive subst) ind in + let ind' = Option.smartmap (Inductiveops.subst_inductive subst) ind in let typ' = subst_pattern subst typ in let c' = subst_pattern subst c in let branches' = array_smartmap (subst_pattern subst) branches in @@ -216,14 +216,14 @@ let rec pat_of_raw metas vars = function PRef r (* Hack pour ne pas réécrire une interprétation complète des patterns*) | RApp (_, RPatVar (_,(true,n)), cl) -> - PSoApp (n, List.map (pat_of_raw metas vars) cl) + metas := n::!metas; PSoApp (n, List.map (pat_of_raw metas vars) cl) | RApp (_,c,cl) -> PApp (pat_of_raw metas vars c, Array.of_list (List.map (pat_of_raw metas vars) cl)) - | RLambda (_,na,c1,c2) -> + | RLambda (_,na,bk,c1,c2) -> PLambda (na, pat_of_raw metas vars c1, pat_of_raw metas (na::vars) c2) - | RProd (_,na,c1,c2) -> + | RProd (_,na,bk,c1,c2) -> PProd (na, pat_of_raw metas vars c1, pat_of_raw metas (na::vars) c2) | RLetIn (_,na,c1,c2) -> @@ -234,18 +234,18 @@ let rec pat_of_raw metas vars = function | RHole _ -> PMeta None | RCast (_,c,_) -> - Options.if_verbose + Flags.if_verbose Pp.warning "Cast not taken into account in constr pattern"; pat_of_raw metas vars c | RIf (_,c,(_,None),b1,b2) -> PIf (pat_of_raw metas vars c, pat_of_raw metas vars b1,pat_of_raw metas vars b2) | RLetTuple (loc,nal,(_,None),b,c) -> - let mkRLambda c na = RLambda (loc,na,RHole (loc,Evd.InternalHole),c) in + let mkRLambda c na = RLambda (loc,na,Explicit,RHole (loc,Evd.InternalHole),c) in let c = List.fold_left mkRLambda c nal in PCase ((LetStyle,[|1|],None,None),PMeta None,pat_of_raw metas vars b, [|pat_of_raw metas vars c|]) - | RCases (loc,p,[c,(na,indnames)],brs) -> + | RCases (loc,sty,p,[c,(na,indnames)],brs) -> let pred,ind_nargs, ind = match p,indnames with | Some p, Some (_,ind,n,nal) -> rev_it_mkPLambda nal (mkPLambda na (pat_of_raw metas vars p)), @@ -259,7 +259,7 @@ let rec pat_of_raw metas vars = function Array.init (List.length brs) (pat_of_raw_branch loc metas vars ind brs) in let cstr_nargs,brs = (Array.map fst cbrs, Array.map snd cbrs) in - PCase ((RegularStyle,cstr_nargs,ind,ind_nargs), pred, + PCase ((sty,cstr_nargs,ind,ind_nargs), pred, pat_of_raw metas vars c, brs) | r -> diff --git a/pretyping/pretype_errors.ml b/pretyping/pretype_errors.ml index 59cdad04..a513d558 100644 --- a/pretyping/pretype_errors.ml +++ b/pretyping/pretype_errors.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: pretype_errors.ml 9217 2006-10-05 17:31:23Z notin $ *) +(* $Id: pretype_errors.ml 10860 2008-04-27 21:39:08Z herbelin $ *) open Util open Stdpp @@ -25,12 +25,14 @@ type pretype_error = (* Unification *) | OccurCheck of existential_key * constr | NotClean of existential_key * constr * Evd.hole_kind - | UnsolvableImplicit of Evd.hole_kind + | UnsolvableImplicit of Evd.evar_info * Evd.hole_kind * + Evd.unsolvability_explanation option | CannotUnify of constr * constr - | CannotUnifyLocal of Environ.env * constr * constr * constr + | CannotUnifyLocal of constr * constr * constr | CannotUnifyBindingType of constr * constr | CannotGeneralize of constr - | NoOccurrenceFound of constr + | NoOccurrenceFound of constr * identifier option + | CannotFindWellTypedAbstraction of constr * constr list (* Pretyping *) | VarNotFound of identifier | UnexpectedType of constr * constr @@ -51,7 +53,7 @@ let j_nf_evar sigma j = let jl_nf_evar sigma jl = List.map (j_nf_evar sigma) jl let jv_nf_evar sigma = Array.map (j_nf_evar sigma) let tj_nf_evar sigma {utj_val=v;utj_type=t} = - {utj_val=type_app (nf_evar sigma) v;utj_type=t} + {utj_val=nf_evar sigma v;utj_type=t} let env_ise sigma env = let sign = named_context_val env in @@ -60,7 +62,7 @@ let env_ise sigma env = Sign.fold_rel_context (fun (na,b,ty) e -> push_rel - (na, option_map (nf_evar sigma) b, nf_evar sigma ty) + (na, Option.map (nf_evar sigma) b, nf_evar sigma ty) e) ctxt ~init:env0 @@ -76,7 +78,7 @@ let contract env lc = env | _ -> let t' = substl !l t in - let c' = option_map (substl !l) c in + let c' = Option.map (substl !l) c in let na' = named_hd env t' na in l := (mkRel 1) :: List.map (lift 1) !l; push_rel (na',c',t') env in @@ -152,18 +154,22 @@ let error_not_clean env sigma ev c (loc,k) = raise_with_loc loc (PretypeError (env_ise sigma env, NotClean (ev,c,k))) -let error_unsolvable_implicit loc env sigma e = - raise_with_loc loc (PretypeError (env_ise sigma env, UnsolvableImplicit e)) +let error_unsolvable_implicit loc env sigma evi e explain = + raise_with_loc loc + (PretypeError (env_ise sigma env, UnsolvableImplicit (evi, e, explain))) let error_cannot_unify env sigma (m,n) = raise (PretypeError (env_ise sigma env,CannotUnify (m,n))) -let error_cannot_unify_local env sigma (e,m,n,sn) = - raise (PretypeError (env_ise sigma env,CannotUnifyLocal (e,m,n,sn))) +let error_cannot_unify_local env sigma (m,n,sn) = + raise (PretypeError (env_ise sigma env,CannotUnifyLocal (m,n,sn))) let error_cannot_coerce env sigma (m,n) = raise (PretypeError (env_ise sigma env,CannotUnify (m,n))) +let error_cannot_find_well_typed_abstraction env sigma p l = + raise (PretypeError (env_ise sigma env,CannotFindWellTypedAbstraction (p,l))) + (*s Ml Case errors *) let error_cant_find_case_type_loc loc env sigma expr = diff --git a/pretyping/pretype_errors.mli b/pretyping/pretype_errors.mli index 137ef639..6ad2793f 100644 --- a/pretyping/pretype_errors.mli +++ b/pretyping/pretype_errors.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: pretype_errors.mli 9217 2006-10-05 17:31:23Z notin $ i*) +(*i $Id: pretype_errors.mli 10860 2008-04-27 21:39:08Z herbelin $ i*) (*i*) open Pp @@ -27,12 +27,14 @@ type pretype_error = (* Unification *) | OccurCheck of existential_key * constr | NotClean of existential_key * constr * Evd.hole_kind - | UnsolvableImplicit of Evd.hole_kind + | UnsolvableImplicit of Evd.evar_info * Evd.hole_kind * + Evd.unsolvability_explanation option | CannotUnify of constr * constr - | CannotUnifyLocal of Environ.env * constr * constr * constr + | CannotUnifyLocal of constr * constr * constr | CannotUnifyBindingType of constr * constr | CannotGeneralize of constr - | NoOccurrenceFound of constr + | NoOccurrenceFound of constr * identifier option + | CannotFindWellTypedAbstraction of constr * constr list (* Pretyping *) | VarNotFound of identifier | UnexpectedType of constr * constr @@ -93,11 +95,15 @@ val error_not_clean : env -> Evd.evar_map -> existential_key -> constr -> loc * Evd.hole_kind -> 'b val error_unsolvable_implicit : - loc -> env -> Evd.evar_map -> Evd.hole_kind -> 'b + loc -> env -> Evd.evar_map -> Evd.evar_info -> Evd.hole_kind -> + Evd.unsolvability_explanation option -> 'b val error_cannot_unify : env -> Evd.evar_map -> constr * constr -> 'b -val error_cannot_unify_local : env -> Evd.evar_map -> Environ.env * constr * constr * constr -> 'b +val error_cannot_unify_local : env -> Evd.evar_map -> constr * constr * constr -> 'b + +val error_cannot_find_well_typed_abstraction : env -> Evd.evar_map -> + constr -> constr list -> 'b (*s Ml Case errors *) diff --git a/pretyping/pretyping.ml b/pretyping/pretyping.ml index 0db64a52..5f0999cb 100644 --- a/pretyping/pretyping.ml +++ b/pretyping/pretyping.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: pretyping.ml 9976 2007-07-12 11:58:30Z msozeau $ *) +(* $Id: pretyping.ml 11047 2008-06-03 23:08:00Z msozeau $ *) open Pp open Util @@ -43,6 +43,34 @@ open Inductiveops (************************************************************************) +(* An auxiliary function for searching for fixpoint guard indexes *) + +exception Found of int array + +let search_guard loc env possible_indexes fixdefs = + (* Standard situation with only one possibility for each fix. *) + (* We treat it separately in order to get proper error msg. *) + if List.for_all (fun l->1=List.length l) possible_indexes then + let indexes = Array.of_list (List.map List.hd possible_indexes) in + let fix = ((indexes, 0),fixdefs) in + (try check_fix env fix with + | e -> if loc = dummy_loc then raise e else Stdpp.raise_with_loc loc e); + indexes + else + (* we now search recursively amoungst all combinations *) + (try + List.iter + (fun l -> + let indexes = Array.of_list l in + let fix = ((indexes, 0),fixdefs) in + try check_fix env fix; raise (Found indexes) + with TypeError _ -> ()) + (list_combinations possible_indexes); + let errmsg = "cannot guess decreasing argument of fix" in + if loc = dummy_loc then error errmsg else + user_err_loc (loc,"search_guard", Pp.str errmsg) + with Found indexes -> indexes) + (* To embed constr in rawconstr *) let ((constr_in : constr -> Dyn.t), (constr_out : Dyn.t -> constr)) = create "constr" @@ -70,7 +98,7 @@ sig unresolved holes as evars and returning the typing contexts of these evars. Work as [understand_gen] for the rest. *) - val understand_tcc : + val understand_tcc : ?resolve_classes:bool -> evar_map -> env -> ?expected_type:types -> rawconstr -> open_constr val understand_tcc_evars : @@ -129,7 +157,7 @@ sig rawconstr -> unsafe_type_judgment val pretype_gen : - evar_defs ref -> env -> + evar_defs ref -> env -> var_map * (identifier * identifier option) list -> typing_constraint -> rawconstr -> constr @@ -143,90 +171,83 @@ module Pretyping_F (Coercion : Coercion.S) = struct (* Allow references to syntaxically inexistent variables (i.e., if applied on an inductive) *) let allow_anonymous_refs = ref false - let evd_comb0 f isevars = - let (evd',x) = f !isevars in - isevars := evd'; + let evd_comb0 f evdref = + let (evd',x) = f !evdref in + evdref := evd'; x - let evd_comb1 f isevars x = - let (evd',y) = f !isevars x in - isevars := evd'; + let evd_comb1 f evdref x = + let (evd',y) = f !evdref x in + evdref := evd'; y - let evd_comb2 f isevars x y = - let (evd',z) = f !isevars x y in - isevars := evd'; + let evd_comb2 f evdref x y = + let (evd',z) = f !evdref x y in + evdref := evd'; z - let evd_comb3 f isevars x y z = - let (evd',t) = f !isevars x y z in - isevars := evd'; + let evd_comb3 f evdref x y z = + let (evd',t) = f !evdref x y z in + evdref := evd'; t let mt_evd = Evd.empty - let vect_lift_type = Array.mapi (fun i t -> type_app (lift i) t) - (* Utilisé pour inférer le prédicat des Cases *) (* Semble exagérement fort *) (* Faudra préférer une unification entre les types de toutes les clauses *) (* et autoriser des ? à rester dans le résultat de l'unification *) - let evar_type_fixpoint loc env isevars lna lar vdefj = + let evar_type_fixpoint loc env evdref lna lar vdefj = let lt = Array.length vdefj in if Array.length lar = lt then for i = 0 to lt-1 do - if not (e_cumul env isevars (vdefj.(i)).uj_type + if not (e_cumul env evdref (vdefj.(i)).uj_type (lift lt lar.(i))) then - error_ill_typed_rec_body_loc loc env (evars_of !isevars) + error_ill_typed_rec_body_loc loc env (evars_of !evdref) i lna vdefj lar done - let check_branches_message loc env isevars c (explft,lft) = + let check_branches_message loc env evdref c (explft,lft) = for i = 0 to Array.length explft - 1 do - if not (e_cumul env isevars lft.(i) explft.(i)) then - let sigma = evars_of !isevars in + if not (e_cumul env evdref lft.(i) explft.(i)) then + let sigma = evars_of !evdref in error_ill_formed_branch_loc loc env sigma c i lft.(i) explft.(i) done (* coerce to tycon if any *) - let inh_conv_coerce_to_tycon loc env isevars j = function + let inh_conv_coerce_to_tycon loc env evdref j = function | None -> j - | Some t -> evd_comb2 (Coercion.inh_conv_coerce_to loc env) isevars j t + | Some t -> evd_comb2 (Coercion.inh_conv_coerce_to loc env) evdref j t let push_rels vars env = List.fold_right push_rel vars env - (* - let evar_type_case isevars env ct pt lft p c = - let (mind,bty,rslty) = type_case_branches env (evars_of isevars) ct pt p c - in check_branches_message isevars env (c,ct) (bty,lft); (mind,rslty) - *) + (* used to enforce a name in Lambda when the type constraints itself + is named, hence possibly dependent *) - let strip_meta id = (* For Grammar v7 compatibility *) - let s = string_of_id id in - if s.[0]='$' then id_of_string (String.sub s 1 (String.length s - 1)) - else id + let orelse_name name name' = match name with + | Anonymous -> name' + | _ -> name let pretype_id loc env (lvar,unbndltacvars) id = - let id = strip_meta id in (* May happen in tactics defined by Grammar *) - try - let (n,typ) = lookup_rel_id id (rel_context env) in - { uj_val = mkRel n; uj_type = type_app (lift n) typ } - with Not_found -> - try - List.assoc id lvar - with Not_found -> - try - let (_,_,typ) = lookup_named id env in - { uj_val = mkVar id; uj_type = typ } - with Not_found -> - try (* To build a nicer ltac error message *) - match List.assoc id unbndltacvars with - | None -> user_err_loc (loc,"", - str "variable " ++ pr_id id ++ str " should be bound to a term") - | Some id0 -> Pretype_errors.error_var_not_found_loc loc id0 - with Not_found -> - error_var_not_found_loc loc id + try + let (n,typ) = lookup_rel_id id (rel_context env) in + { uj_val = mkRel n; uj_type = lift n typ } + with Not_found -> + try + List.assoc id lvar + with Not_found -> + try + let (_,_,typ) = lookup_named id env in + { uj_val = mkVar id; uj_type = typ } + with Not_found -> + try (* To build a nicer ltac error message *) + match List.assoc id unbndltacvars with + | None -> user_err_loc (loc,"", + str "variable " ++ pr_id id ++ str " should be bound to a term") + | Some id0 -> Pretype_errors.error_var_not_found_loc loc id0 + with Not_found -> + error_var_not_found_loc loc id (* make a dependent predicate from an undependent one *) @@ -251,7 +272,7 @@ module Pretyping_F (Coercion : Coercion.S) = struct (*************************************************************************) (* Main pretyping function *) - let pretype_ref isevars env ref = + let pretype_ref evdref env ref = let c = constr_of_global ref in make_judge c (Retyping.get_type_of env Evd.empty c) @@ -259,30 +280,32 @@ module Pretyping_F (Coercion : Coercion.S) = struct | RProp c -> judge_of_prop_contents c | RType _ -> judge_of_new_Type () - (* [pretype tycon env isevars lvar lmeta cstr] attempts to type [cstr] *) - (* in environment [env], with existential variables [(evars_of isevars)] and *) + exception Found of fixpoint + + (* [pretype tycon env evdref lvar lmeta cstr] attempts to type [cstr] *) + (* in environment [env], with existential variables [evdref] and *) (* the type constraint tycon *) - let rec pretype (tycon : type_constraint) env isevars lvar = function + let rec pretype (tycon : type_constraint) env evdref lvar = function | RRef (loc,ref) -> - inh_conv_coerce_to_tycon loc env isevars - (pretype_ref isevars env ref) + inh_conv_coerce_to_tycon loc env evdref + (pretype_ref evdref env ref) tycon | RVar (loc, id) -> - inh_conv_coerce_to_tycon loc env isevars + inh_conv_coerce_to_tycon loc env evdref (pretype_id loc env lvar id) tycon - | REvar (loc, ev, instopt) -> + | REvar (loc, evk, instopt) -> (* Ne faudrait-il pas s'assurer que hyps est bien un sous-contexte du contexte courant, et qu'il n'y a pas de Rel "caché" *) - let hyps = evar_context (Evd.find (evars_of !isevars) ev) in + let hyps = evar_filtered_context (Evd.find (evars_of !evdref) evk) in let args = match instopt with | None -> instance_from_named_context hyps | Some inst -> failwith "Evar subtitutions not implemented" in - let c = mkEvar (ev, args) in - let j = (Retyping.get_judgment_of env (evars_of !isevars) c) in - inh_conv_coerce_to_tycon loc env isevars j tycon + let c = mkEvar (evk, args) in + let j = (Retyping.get_judgment_of env (evars_of !evdref) c) in + inh_conv_coerce_to_tycon loc env evdref j tycon | RPatVar (loc,(someta,n)) -> anomaly "Found a pattern variable in a rawterm to type" @@ -292,26 +315,26 @@ module Pretyping_F (Coercion : Coercion.S) = struct match tycon with | Some (None, ty) -> ty | None | Some _ -> - e_new_evar isevars env ~src:(loc,InternalHole) (new_Type ()) in - { uj_val = e_new_evar isevars env ~src:(loc,k) ty; uj_type = ty } + e_new_evar evdref env ~src:(loc,InternalHole) (new_Type ()) in + { uj_val = e_new_evar evdref env ~src:(loc,k) ty; uj_type = ty } | RRec (loc,fixkind,names,bl,lar,vdef) -> let rec type_bl env ctxt = function [] -> ctxt - | (na,None,ty)::bl -> - let ty' = pretype_type empty_valcon env isevars lvar ty in + | (na,bk,None,ty)::bl -> + let ty' = pretype_type empty_valcon env evdref lvar ty in let dcl = (na,None,ty'.utj_val) in type_bl (push_rel dcl env) (add_rel_decl dcl ctxt) bl - | (na,Some bd,ty)::bl -> - let ty' = pretype_type empty_valcon env isevars lvar ty in - let bd' = pretype (mk_tycon ty'.utj_val) env isevars lvar ty in + | (na,bk,Some bd,ty)::bl -> + let ty' = pretype_type empty_valcon env evdref lvar ty in + let bd' = pretype (mk_tycon ty'.utj_val) env evdref lvar ty in let dcl = (na,Some bd'.uj_val,ty'.utj_val) in type_bl (push_rel dcl env) (add_rel_decl dcl ctxt) bl in let ctxtv = Array.map (type_bl env empty_rel_context) bl in let larj = array_map2 (fun e ar -> - pretype_type empty_valcon (push_rel_context e env) isevars lvar ar) + pretype_type empty_valcon (push_rel_context e env) evdref lvar ar) ctxtv lar in let lara = Array.map (fun a -> a.utj_val) larj in let ftys = array_map2 (fun e a -> it_mkProd_or_LetIn a e) ctxtv lara in @@ -328,115 +351,111 @@ module Pretyping_F (Coercion : Coercion.S) = struct decompose_prod_n_assum (rel_context_length ctxt) (lift nbfix ftys.(i)) in let nenv = push_rel_context ctxt newenv in - let j = pretype (mk_tycon ty) nenv isevars lvar def in + let j = pretype (mk_tycon ty) nenv evdref lvar def in { uj_val = it_mkLambda_or_LetIn j.uj_val ctxt; uj_type = it_mkProd_or_LetIn j.uj_type ctxt }) ctxtv vdef in - evar_type_fixpoint loc env isevars names ftys vdefj; + evar_type_fixpoint loc env evdref names ftys vdefj; let fixj = match fixkind with | RFix (vn,i) -> - let guard_indexes = Array.mapi + (* First, let's find the guard indexes. *) + (* If recursive argument was not given by user, we try all args. + An earlier approach was to look only for inductive arguments, + but doing it properly involves delta-reduction, and it finally + doesn't seem worth the effort (except for huge mutual + fixpoints ?) *) + let possible_indexes = Array.to_list (Array.mapi (fun i (n,_) -> match n with - | Some n -> n - | None -> - (* Recursive argument was not given by the user : We - check that there is only one inductive argument *) - let ctx = ctxtv.(i) in - let isIndApp t = - isInd (fst (decompose_app (strip_head_cast t))) in - (* This could be more precise (e.g. do some delta) *) - let lb = List.rev_map (fun (_,_,t) -> isIndApp t) ctx in - try (list_unique_index true lb) - 1 - with Not_found -> - Util.user_err_loc - (loc,"pretype", - Pp.str "cannot guess decreasing argument of fix")) - vn - in - let fix = ((guard_indexes, i),(names,ftys,Array.map j_val vdefj)) in - (try check_fix env fix with e -> Stdpp.raise_with_loc loc e); - make_judge (mkFix fix) ftys.(i) - | RCoFix i -> + | Some n -> [n] + | None -> list_map_i (fun i _ -> i) 0 ctxtv.(i)) + vn) + in + let fixdecls = (names,ftys,Array.map j_val vdefj) in + let indexes = search_guard loc env possible_indexes fixdecls in + make_judge (mkFix ((indexes,i),fixdecls)) ftys.(i) + | RCoFix i -> let cofix = (i,(names,ftys,Array.map j_val vdefj)) in (try check_cofix env cofix with e -> Stdpp.raise_with_loc loc e); make_judge (mkCoFix cofix) ftys.(i) in - inh_conv_coerce_to_tycon loc env isevars fixj tycon + inh_conv_coerce_to_tycon loc env evdref fixj tycon | RSort (loc,s) -> - inh_conv_coerce_to_tycon loc env isevars (pretype_sort s) tycon + inh_conv_coerce_to_tycon loc env evdref (pretype_sort s) tycon | RApp (loc,f,args) -> - let fj = pretype empty_tycon env isevars lvar f in + let fj = pretype empty_tycon env evdref lvar f in let floc = loc_of_rawconstr f in let rec apply_rec env n resj = function | [] -> resj | c::rest -> let argloc = loc_of_rawconstr c in - let resj = evd_comb1 (Coercion.inh_app_fun env) isevars resj in - let resty = whd_betadeltaiota env (evars_of !isevars) resj.uj_type in + let resj = evd_comb1 (Coercion.inh_app_fun env) evdref resj in + let resty = whd_betadeltaiota env (evars_of !evdref) resj.uj_type in match kind_of_term resty with | Prod (na,c1,c2) -> - let hj = pretype (mk_tycon c1) env isevars lvar c in + let hj = pretype (mk_tycon c1) env evdref lvar c in let value, typ = applist (j_val resj, [j_val hj]), subst1 hj.uj_val c2 in apply_rec env (n+1) { uj_val = value; uj_type = typ } rest | _ -> - let hj = pretype empty_tycon env isevars lvar c in + let hj = pretype empty_tycon env evdref lvar c in error_cant_apply_not_functional_loc - (join_loc floc argloc) env (evars_of !isevars) + (join_loc floc argloc) env (evars_of !evdref) resj [hj] in let resj = apply_rec env 1 fj args in let resj = - match evar_kind_of_term !isevars resj.uj_val with + match evar_kind_of_term !evdref resj.uj_val with | App (f,args) -> - let f = whd_evar (Evd.evars_of !isevars) f in + let f = whd_evar (Evd.evars_of !evdref) f in begin match kind_of_term f with - | Ind _ (* | Const _ *) -> - let sigma = evars_of !isevars in + | Ind _ | Const _ + when isInd f or has_polymorphic_type (destConst f) + -> + let sigma = evars_of !evdref in let c = mkApp (f,Array.map (whd_evar sigma) args) in let t = Retyping.get_type_of env sigma c in make_judge c t | _ -> resj end | _ -> resj in - inh_conv_coerce_to_tycon loc env isevars resj tycon + inh_conv_coerce_to_tycon loc env evdref resj tycon - | RLambda(loc,name,c1,c2) -> - let (name',dom,rng) = evd_comb1 (split_tycon loc env) isevars tycon in + | RLambda(loc,name,bk,c1,c2) -> + let (name',dom,rng) = evd_comb1 (split_tycon loc env) evdref tycon in let dom_valcon = valcon_of_tycon dom in - let j = pretype_type dom_valcon env isevars lvar c1 in + let j = pretype_type dom_valcon env evdref lvar c1 in let var = (name,None,j.utj_val) in - let j' = pretype rng (push_rel var env) isevars lvar c2 in - judge_of_abstraction env name j j' + let j' = pretype rng (push_rel var env) evdref lvar c2 in + judge_of_abstraction env (orelse_name name name') j j' - | RProd(loc,name,c1,c2) -> - let j = pretype_type empty_valcon env isevars lvar c1 in + | RProd(loc,name,bk,c1,c2) -> + let j = pretype_type empty_valcon env evdref lvar c1 in let var = (name,j.utj_val) in let env' = push_rel_assum var env in - let j' = pretype_type empty_valcon env' isevars lvar c2 in + let j' = pretype_type empty_valcon env' evdref lvar c2 in let resj = try judge_of_product env name j j' with TypeError _ as e -> Stdpp.raise_with_loc loc e in - inh_conv_coerce_to_tycon loc env isevars resj tycon + inh_conv_coerce_to_tycon loc env evdref resj tycon | RLetIn(loc,name,c1,c2) -> - let j = pretype empty_tycon env isevars lvar c1 in + let j = pretype empty_tycon env evdref lvar c1 in let t = refresh_universes j.uj_type in let var = (name,Some j.uj_val,t) in let tycon = lift_tycon 1 tycon in - let j' = pretype tycon (push_rel var env) isevars lvar c2 in + let j' = pretype tycon (push_rel var env) evdref lvar c2 in { uj_val = mkLetIn (name, j.uj_val, t, j'.uj_val) ; uj_type = subst1 j.uj_val j'.uj_type } | RLetTuple (loc,nal,(na,po),c,d) -> - let cj = pretype empty_tycon env isevars lvar c in + let cj = pretype empty_tycon env evdref lvar c in let (IndType (indf,realargs)) = - try find_rectype env (evars_of !isevars) cj.uj_type + try find_rectype env (evars_of !evdref) cj.uj_type with Not_found -> let cloc = loc_of_rawconstr c in - error_case_not_inductive_loc cloc env (evars_of !isevars) cj + error_case_not_inductive_loc cloc env (evars_of !evdref) cj in let cstrs = get_constructors env indf in if Array.length cstrs <> 1 then @@ -459,50 +478,50 @@ module Pretyping_F (Coercion : Coercion.S) = struct (match po with | Some p -> let env_p = push_rels psign env in - let pj = pretype_type empty_valcon env_p isevars lvar p in - let ccl = nf_isevar !isevars pj.utj_val in + let pj = pretype_type empty_valcon env_p evdref lvar p in + let ccl = nf_isevar !evdref pj.utj_val in let psign = make_arity_signature env true indf in (* with names *) let p = it_mkLambda_or_LetIn ccl psign in let inst = (Array.to_list cs.cs_concl_realargs) @[build_dependent_constructor cs] in let lp = lift cs.cs_nargs p in - let fty = hnf_lam_applist env (evars_of !isevars) lp inst in - let fj = pretype (mk_tycon fty) env_f isevars lvar d in + let fty = hnf_lam_applist env (evars_of !evdref) lp inst in + let fj = pretype (mk_tycon fty) env_f evdref lvar d in let f = it_mkLambda_or_LetIn fj.uj_val fsign in let v = let mis,_ = dest_ind_family indf in - let ci = make_default_case_info env LetStyle mis in + let ci = make_case_info env mis LetStyle in mkCase (ci, p, cj.uj_val,[|f|]) in { uj_val = v; uj_type = substl (realargs@[cj.uj_val]) ccl } | None -> let tycon = lift_tycon cs.cs_nargs tycon in - let fj = pretype tycon env_f isevars lvar d in + let fj = pretype tycon env_f evdref lvar d in let f = it_mkLambda_or_LetIn fj.uj_val fsign in - let ccl = nf_isevar !isevars fj.uj_type in + let ccl = nf_isevar !evdref fj.uj_type in let ccl = if noccur_between 1 cs.cs_nargs ccl then lift (- cs.cs_nargs) ccl else - error_cant_find_case_type_loc loc env (evars_of !isevars) + error_cant_find_case_type_loc loc env (evars_of !evdref) cj.uj_val in let ccl = refresh_universes ccl in let p = it_mkLambda_or_LetIn (lift (nar+1) ccl) psign in let v = let mis,_ = dest_ind_family indf in - let ci = make_default_case_info env LetStyle mis in + let ci = make_case_info env mis LetStyle in mkCase (ci, p, cj.uj_val,[|f|] ) in { uj_val = v; uj_type = ccl }) | RIf (loc,c,(na,po),b1,b2) -> - let cj = pretype empty_tycon env isevars lvar c in + let cj = pretype empty_tycon env evdref lvar c in let (IndType (indf,realargs)) = - try find_rectype env (evars_of !isevars) cj.uj_type + try find_rectype env (evars_of !evdref) cj.uj_type with Not_found -> let cloc = loc_of_rawconstr c in - error_case_not_inductive_loc cloc env (evars_of !isevars) cj in + error_case_not_inductive_loc cloc env (evars_of !evdref) cj in let cstrs = get_constructors env indf in if Array.length cstrs <> 2 then user_err_loc (loc,"", @@ -520,11 +539,11 @@ module Pretyping_F (Coercion : Coercion.S) = struct let pred,p = match po with | Some p -> let env_p = push_rels psign env in - let pj = pretype_type empty_valcon env_p isevars lvar p in - let ccl = nf_evar (evars_of !isevars) pj.utj_val in + let pj = pretype_type empty_valcon env_p evdref lvar p in + let ccl = nf_evar (evars_of !evdref) pj.utj_val in let pred = it_mkLambda_or_LetIn ccl psign in let typ = lift (- nar) (beta_applist (pred,[cj.uj_val])) in - let jtyp = inh_conv_coerce_to_tycon loc env isevars {uj_val = pred; + let jtyp = inh_conv_coerce_to_tycon loc env evdref {uj_val = pred; uj_type = typ} tycon in jtyp.uj_val, jtyp.uj_type @@ -532,11 +551,11 @@ module Pretyping_F (Coercion : Coercion.S) = struct let p = match tycon with | Some (None, ty) -> ty | None | Some _ -> - e_new_evar isevars env ~src:(loc,InternalHole) (new_Type ()) + e_new_evar evdref env ~src:(loc,InternalHole) (new_Type ()) in it_mkLambda_or_LetIn (lift (nar+1) p) psign, p in - let pred = nf_evar (evars_of !isevars) pred in - let p = nf_evar (evars_of !isevars) p in + let pred = nf_evar (evars_of !evdref) pred in + let p = nf_evar (evars_of !evdref) p in (* msgnl (str "Pred is: " ++ Termops.print_constr_env env pred);*) let f cs b = let n = rel_context_length cs.cs_args in @@ -555,118 +574,129 @@ module Pretyping_F (Coercion : Coercion.S) = struct in let env_c = push_rels csgn env in (* msgnl (str "Pi is: " ++ Termops.print_constr_env env_c pi); *) - let bj = pretype (mk_tycon pi) env_c isevars lvar b in + let bj = pretype (mk_tycon pi) env_c evdref lvar b in it_mkLambda_or_LetIn bj.uj_val cs.cs_args in let b1 = f cstrs.(0) b1 in let b2 = f cstrs.(1) b2 in let v = let mis,_ = dest_ind_family indf in - let ci = make_default_case_info env IfStyle mis in + let ci = make_case_info env mis IfStyle in mkCase (ci, pred, cj.uj_val, [|b1;b2|]) in { uj_val = v; uj_type = p } - - | RCases (loc,po,tml,eqns) -> - Cases.compile_cases loc - ((fun vtyc env -> pretype vtyc env isevars lvar),isevars) + + | RCases (loc,sty,po,tml,eqns) -> + Cases.compile_cases loc sty + ((fun vtyc env evdref -> pretype vtyc env evdref lvar),evdref) tycon env (* loc *) (po,tml,eqns) | RCast (loc,c,k) -> let cj = match k with CastCoerce -> - let cj = pretype empty_tycon env isevars lvar c in - evd_comb1 (Coercion.inh_coerce_to_base loc env) isevars cj + let cj = pretype empty_tycon env evdref lvar c in + evd_comb1 (Coercion.inh_coerce_to_base loc env) evdref cj | CastConv (k,t) -> - let tj = pretype_type empty_valcon env isevars lvar t in - let cj = pretype (mk_tycon tj.utj_val) env isevars lvar c in + let tj = pretype_type empty_valcon env evdref lvar t in + let cj = pretype (mk_tycon tj.utj_val) env evdref lvar c in (* User Casts are for helping pretyping, experimentally not to be kept*) (* ... except for Correctness *) let v = mkCast (cj.uj_val, k, tj.utj_val) in { uj_val = v; uj_type = tj.utj_val } in - inh_conv_coerce_to_tycon loc env isevars cj tycon + inh_conv_coerce_to_tycon loc env evdref cj tycon | RDynamic (loc,d) -> if (tag d) = "constr" then let c = constr_out d in - let j = (Retyping.get_judgment_of env (evars_of !isevars) c) in + let j = (Retyping.get_judgment_of env (evars_of !evdref) c) in j - (*inh_conv_coerce_to_tycon loc env isevars j tycon*) + (*inh_conv_coerce_to_tycon loc env evdref j tycon*) else user_err_loc (loc,"pretype",(str "Not a constr tagged Dynamic")) - (* [pretype_type valcon env isevars lvar c] coerces [c] into a type *) - and pretype_type valcon env isevars lvar = function + (* [pretype_type valcon env evdref lvar c] coerces [c] into a type *) + and pretype_type valcon env evdref lvar = function | RHole loc -> (match valcon with | Some v -> let s = - let sigma = evars_of !isevars in + let sigma = evars_of !evdref in let t = Retyping.get_type_of env sigma v in match kind_of_term (whd_betadeltaiota env sigma t) with | Sort s -> s - | Evar v when is_Type (existential_type sigma v) -> - evd_comb1 (define_evar_as_sort) isevars v + | Evar ev when is_Type (existential_type sigma ev) -> + evd_comb1 (define_evar_as_sort) evdref ev | _ -> anomaly "Found a type constraint which is not a type" in { utj_val = v; utj_type = s } | None -> let s = new_Type_sort () in - { utj_val = e_new_evar isevars env ~src:loc (mkSort s); + { utj_val = e_new_evar evdref env ~src:loc (mkSort s); utj_type = s}) | c -> - let j = pretype empty_tycon env isevars lvar c in + let j = pretype empty_tycon env evdref lvar c in let loc = loc_of_rawconstr c in - let tj = evd_comb1 (Coercion.inh_coerce_to_sort loc env) isevars j in + let tj = evd_comb1 (Coercion.inh_coerce_to_sort loc env) evdref j in match valcon with | None -> tj | Some v -> - if e_cumul env isevars v tj.utj_val then tj + if e_cumul env evdref v tj.utj_val then tj else error_unexpected_type_loc - (loc_of_rawconstr c) env (evars_of !isevars) tj.utj_val v + (loc_of_rawconstr c) env (evars_of !evdref) tj.utj_val v - let pretype_gen isevars env lvar kind c = + let pretype_gen_aux evdref env lvar kind c = let c' = match kind with | OfType exptyp -> let tycon = match exptyp with None -> empty_tycon | Some t -> mk_tycon t in - (pretype tycon env isevars lvar c).uj_val + (pretype tycon env evdref lvar c).uj_val | IsType -> - (pretype_type empty_valcon env isevars lvar c).utj_val in - nf_evar (evars_of !isevars) c' - + (pretype_type empty_valcon env evdref lvar c).utj_val in + let evd,_ = consider_remaining_unif_problems env !evdref in + evdref := evd; c' + + let pretype_gen evdref env lvar kind c = + let c = pretype_gen_aux evdref env lvar kind c in + evdref := Typeclasses.resolve_typeclasses ~onlyargs:true ~fail:false env !evdref; + nf_evar (evars_of !evdref) c + (* TODO: comment faire remonter l'information si le typage a resolu des variables du sigma original. il faudrait que la fonction de typage retourne aussi le nouveau sigma... *) let understand_judgment sigma env c = - let isevars = ref (create_evar_defs sigma) in - let j = pretype empty_tycon env isevars ([],[]) c in - let isevars,_ = consider_remaining_unif_problems env !isevars in - let j = j_nf_evar (evars_of isevars) j in - check_evars env sigma isevars (mkCast(j.uj_val,DEFAULTcast, j.uj_type)); - j - - let understand_judgment_tcc isevars env c = - let j = pretype empty_tycon env isevars ([],[]) c in - let sigma = evars_of !isevars in + let evdref = ref (create_evar_defs sigma) in + let j = pretype empty_tycon env evdref ([],[]) c in + let evd,_ = consider_remaining_unif_problems env !evdref in + let j = j_nf_evar (evars_of evd) j in + let evd = Typeclasses.resolve_typeclasses ~onlyargs:true ~fail:true env evd in + let j = j_nf_evar (evars_of evd) j in + check_evars env sigma evd (mkCast(j.uj_val,DEFAULTcast, j.uj_type)); + j + + let understand_judgment_tcc evdref env c = + let j = pretype empty_tycon env evdref ([],[]) c in + let sigma = evars_of !evdref in let j = j_nf_evar sigma j in - j + j (* Raw calls to the unsafe inference machine: boolean says if we must fail on unresolved evars; the unsafe_judgment list allows us to extend env with some bindings *) let ise_pretype_gen fail_evar sigma env lvar kind c = - let isevars = ref (Evd.create_evar_defs sigma) in - let c = pretype_gen isevars env lvar kind c in - let isevars,_ = consider_remaining_unif_problems env !isevars in - let c = nf_evar (evars_of isevars) c in - if fail_evar then check_evars env sigma isevars c; - isevars, c + let evdref = ref (Evd.create_evar_defs sigma) in + let c = pretype_gen evdref env lvar kind c in + let evd,_ = consider_remaining_unif_problems env !evdref in + if fail_evar then + let evd = Typeclasses.resolve_typeclasses ~onlyargs:false ~fail:true env evd in + let c = Evarutil.nf_isevar evd c in + check_evars env Evd.empty evd c; + evd, c + else evd, c (** Entry points of the high-level type synthesis algorithm *) @@ -682,12 +712,19 @@ module Pretyping_F (Coercion : Coercion.S) = struct let understand_ltac sigma env lvar kind c = ise_pretype_gen false sigma env lvar kind c - let understand_tcc_evars isevars env kind c = - pretype_gen isevars env ([],[]) kind c - - let understand_tcc sigma env ?expected_type:exptyp c = - let ev, t = ise_pretype_gen false sigma env ([],[]) (OfType exptyp) c in - Evd.evars_of ev, t + let understand_tcc_evars evdref env kind c = + pretype_gen evdref env ([],[]) kind c + + let understand_tcc ?(resolve_classes=true) sigma env ?expected_type:exptyp c = + let evd, t = + if resolve_classes then + ise_pretype_gen false sigma env ([],[]) (OfType exptyp) c + else + let evdref = ref (Evd.create_evar_defs sigma) in + let c = pretype_gen_aux evdref env ([],[]) (OfType exptyp) c in + !evdref, nf_isevar !evdref c + in + Evd.evars_of evd, t end module Default : S = Pretyping_F(Coercion.Default) diff --git a/pretyping/pretyping.mli b/pretyping/pretyping.mli index b1ed20c2..4f116053 100644 --- a/pretyping/pretyping.mli +++ b/pretyping/pretyping.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: pretyping.mli 9141 2006-09-15 10:07:01Z herbelin $ i*) +(*i $Id: pretyping.mli 11047 2008-06-03 23:08:00Z msozeau $ i*) (*i*) open Names @@ -18,6 +18,11 @@ open Rawterm open Evarutil (*i*) +(* An auxiliary function for searching for fixpoint guard indexes *) + +val search_guard : + Util.loc -> env -> int list list -> rec_declaration -> int array + type typing_constraint = OfType of types option | IsType type var_map = (identifier * unsafe_judgment) list @@ -35,7 +40,7 @@ sig unresolved holes as evars and returning the typing contexts of these evars. Work as [understand_gen] for the rest. *) - val understand_tcc : + val understand_tcc : ?resolve_classes:bool -> evar_map -> env -> ?expected_type:types -> rawconstr -> open_constr val understand_tcc_evars : diff --git a/pretyping/rawterm.ml b/pretyping/rawterm.ml index aaf9e63d..62798a45 100644 --- a/pretyping/rawterm.ml +++ b/pretyping/rawterm.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: rawterm.ml 9976 2007-07-12 11:58:30Z msozeau $ *) +(* $Id: rawterm.ml 11094 2008-06-10 19:35:23Z herbelin $ *) (*i*) open Util @@ -36,6 +36,8 @@ type rawsort = RProp of Term.contents | RType of Univ.universe option type binder_kind = BProd | BLambda | BLetIn +type binding_kind = Explicit | Implicit + type quantified_hypothesis = AnonHyp of int | NamedHyp of identifier type 'a explicit_bindings = (loc * quantified_hypothesis * 'a) list @@ -57,10 +59,10 @@ type rawconstr = | REvar of loc * existential_key * rawconstr list option | RPatVar of loc * (bool * patvar) (* Used for patterns only *) | RApp of loc * rawconstr * rawconstr list - | RLambda of loc * name * rawconstr * rawconstr - | RProd of loc * name * rawconstr * rawconstr + | RLambda of loc * name * binding_kind * rawconstr * rawconstr + | RProd of loc * name * binding_kind * rawconstr * rawconstr | RLetIn of loc * name * rawconstr * rawconstr - | RCases of loc * rawconstr option * tomatch_tuple * cases_clauses + | RCases of loc * case_style * rawconstr option * tomatch_tuples * cases_clauses | RLetTuple of loc * name list * (name * rawconstr option) * rawconstr * rawconstr | RIf of loc * rawconstr * (name * rawconstr option) * rawconstr * rawconstr @@ -71,7 +73,7 @@ type rawconstr = | RCast of loc * rawconstr * rawconstr cast_type | RDynamic of loc * Dyn.t -and rawdecl = name * rawconstr option * rawconstr +and rawdecl = name * binding_kind * rawconstr option * rawconstr and fix_recursion_order = RStructRec | RWfRec of rawconstr | RMeasureRec of rawconstr @@ -82,10 +84,13 @@ and fix_kind = and predicate_pattern = name * (loc * inductive * int * name list) option -and tomatch_tuple = (rawconstr * predicate_pattern) list +and tomatch_tuple = (rawconstr * predicate_pattern) + +and tomatch_tuples = tomatch_tuple list + +and cases_clause = (loc * identifier list * cases_pattern list * rawconstr) -and cases_clauses = - (loc * identifier list * cases_pattern list * rawconstr) list +and cases_clauses = cases_clause list let cases_predicate_names tml = List.flatten (List.map (function @@ -101,22 +106,22 @@ let cases_predicate_names tml = - boolean in POldCase means it is recursive i*) -let map_rawdecl f (na,obd,ty) = (na,option_map f obd,f ty) +let map_rawdecl f (na,k,obd,ty) = (na,k,Option.map f obd,f ty) let map_rawconstr f = function | RVar (loc,id) -> RVar (loc,id) | RApp (loc,g,args) -> RApp (loc,f g, List.map f args) - | RLambda (loc,na,ty,c) -> RLambda (loc,na,f ty,f c) - | RProd (loc,na,ty,c) -> RProd (loc,na,f ty,f c) + | RLambda (loc,na,bk,ty,c) -> RLambda (loc,na,bk,f ty,f c) + | RProd (loc,na,bk,ty,c) -> RProd (loc,na,bk,f ty,f c) | RLetIn (loc,na,b,c) -> RLetIn (loc,na,f b,f c) - | RCases (loc,rtntypopt,tml,pl) -> - RCases (loc,option_map f rtntypopt, + | RCases (loc,sty,rtntypopt,tml,pl) -> + RCases (loc,sty,Option.map f rtntypopt, List.map (fun (tm,x) -> (f tm,x)) tml, List.map (fun (loc,idl,p,c) -> (loc,idl,p,f c)) pl) | RLetTuple (loc,nal,(na,po),b,c) -> - RLetTuple (loc,nal,(na,option_map f po),f b,f c) + RLetTuple (loc,nal,(na,Option.map f po),f b,f c) | RIf (loc,c,(na,po),b1,b2) -> - RIf (loc,f c,(na,option_map f po),f b1,f b2) + RIf (loc,f c,(na,Option.map f po),f b1,f b2) | RRec (loc,fk,idl,bl,tyl,bv) -> RRec (loc,fk,idl,Array.map (List.map (map_rawdecl f)) bl, Array.map f tyl,Array.map f bv) @@ -149,7 +154,7 @@ let map_rawconstr_with_binders_loc loc g f e = function let g' id e = snd (g id e) in let h (_,idl,p,c) = (loc,idl,p,f (List.fold_right g' idl e) c) in RCases - (loc,option_map (f e) tyopt,List.map (f e) tml, List.map h pl) + (loc,Option.map (f e) tyopt,List.map (f e) tml, List.map h pl) | RRec (_,fk,idl,tyl,bv) -> let idl',e' = fold_ident g idl e in RRec (loc,fk,idl',Array.map (f e) tyl,Array.map (f e') bv) @@ -166,10 +171,10 @@ let occur_rawconstr id = let rec occur = function | RVar (loc,id') -> id = id' | RApp (loc,f,args) -> (occur f) or (List.exists occur args) - | RLambda (loc,na,ty,c) -> (occur ty) or ((na <> Name id) & (occur c)) - | RProd (loc,na,ty,c) -> (occur ty) or ((na <> Name id) & (occur c)) + | RLambda (loc,na,bk,ty,c) -> (occur ty) or ((na <> Name id) & (occur c)) + | RProd (loc,na,bk,ty,c) -> (occur ty) or ((na <> Name id) & (occur c)) | RLetIn (loc,na,b,c) -> (occur b) or ((na <> Name id) & (occur c)) - | RCases (loc,rtntypopt,tml,pl) -> + | RCases (loc,sty,rtntypopt,tml,pl) -> (occur_option rtntypopt) or (List.exists (fun (tm,_) -> occur tm) tml) or (List.exists occur_pattern pl) @@ -182,7 +187,7 @@ let occur_rawconstr id = not (array_for_all4 (fun fid bl ty bd -> let rec occur_fix = function [] -> not (occur ty) && (fid=id or not(occur bd)) - | (na,bbd,bty)::bl -> + | (na,k,bbd,bty)::bl -> not (occur bty) && (match bbd with Some bd -> not (occur bd) @@ -211,11 +216,11 @@ let free_rawvars = let rec vars bounded vs = function | RVar (loc,id') -> if Idset.mem id' bounded then vs else Idset.add id' vs | RApp (loc,f,args) -> List.fold_left (vars bounded) vs (f::args) - | RLambda (loc,na,ty,c) | RProd (loc,na,ty,c) | RLetIn (loc,na,ty,c) -> + | RLambda (loc,na,_,ty,c) | RProd (loc,na,_,ty,c) | RLetIn (loc,na,ty,c) -> let vs' = vars bounded vs ty in let bounded' = add_name_to_ids bounded na in vars bounded' vs' c - | RCases (loc,rtntypopt,tml,pl) -> + | RCases (loc,sty,rtntypopt,tml,pl) -> let vs1 = vars_option bounded vs rtntypopt in let vs2 = List.fold_left (fun vs (tm,_) -> vars bounded vs tm) vs1 tml in List.fold_left (vars_pattern bounded) vs2 pl @@ -234,7 +239,7 @@ let free_rawvars = let vars_fix i vs fid = let vs1,bounded1 = List.fold_left - (fun (vs,bounded) (na,bbd,bty) -> + (fun (vs,bounded) (na,k,bbd,bty) -> let vs' = vars_option bounded vs bbd in let vs'' = vars bounded vs' bty in let bounded' = add_name_to_ids bounded na in @@ -272,10 +277,10 @@ let loc_of_rawconstr = function | REvar (loc,_,_) -> loc | RPatVar (loc,_) -> loc | RApp (loc,_,_) -> loc - | RLambda (loc,_,_,_) -> loc - | RProd (loc,_,_,_) -> loc + | RLambda (loc,_,_,_,_) -> loc + | RProd (loc,_,_,_,_) -> loc | RLetIn (loc,_,_,_) -> loc - | RCases (loc,_,_,_) -> loc + | RCases (loc,_,_,_,_) -> loc | RLetTuple (loc,_,_,_,_) -> loc | RIf (loc,_,_,_,_) -> loc | RRec (loc,_,_,_,_,_) -> loc @@ -330,7 +335,14 @@ let all_flags = type 'a or_var = ArgArg of 'a | ArgVar of identifier located -type 'a with_occurrences = int or_var list * 'a +type occurrences_expr = bool * int or_var list + +let all_occurrences_expr_but l = (false,l) +let no_occurrences_expr_but l = (true,l) +let all_occurrences_expr = (false,[]) +let no_occurrences_expr = (true,[]) + +type 'a with_occurrences = occurrences_expr * 'a type ('a,'b) red_expr_gen = | Red of bool diff --git a/pretyping/rawterm.mli b/pretyping/rawterm.mli index 546b36b0..2ba8022f 100644 --- a/pretyping/rawterm.mli +++ b/pretyping/rawterm.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: rawterm.mli 9976 2007-07-12 11:58:30Z msozeau $ i*) +(*i $Id: rawterm.mli 11094 2008-06-10 19:35:23Z herbelin $ i*) (*i*) open Util @@ -40,6 +40,8 @@ type rawsort = RProp of Term.contents | RType of Univ.universe option type binder_kind = BProd | BLambda | BLetIn +type binding_kind = Explicit | Implicit + type quantified_hypothesis = AnonHyp of int | NamedHyp of identifier type 'a explicit_bindings = (loc * quantified_hypothesis * 'a) list @@ -61,10 +63,10 @@ type rawconstr = | REvar of loc * existential_key * rawconstr list option | RPatVar of loc * (bool * patvar) (* Used for patterns only *) | RApp of loc * rawconstr * rawconstr list - | RLambda of loc * name * rawconstr * rawconstr - | RProd of loc * name * rawconstr * rawconstr + | RLambda of loc * name * binding_kind * rawconstr * rawconstr + | RProd of loc * name * binding_kind * rawconstr * rawconstr | RLetIn of loc * name * rawconstr * rawconstr - | RCases of loc * rawconstr option * tomatch_tuple * cases_clauses + | RCases of loc * case_style * rawconstr option * tomatch_tuples * cases_clauses | RLetTuple of loc * name list * (name * rawconstr option) * rawconstr * rawconstr | RIf of loc * rawconstr * (name * rawconstr option) * rawconstr * rawconstr @@ -75,7 +77,7 @@ type rawconstr = | RCast of loc * rawconstr * rawconstr cast_type | RDynamic of loc * Dyn.t -and rawdecl = name * rawconstr option * rawconstr +and rawdecl = name * binding_kind * rawconstr option * rawconstr and fix_recursion_order = RStructRec | RWfRec of rawconstr | RMeasureRec of rawconstr @@ -86,12 +88,15 @@ and fix_kind = and predicate_pattern = name * (loc * inductive * int * name list) option -and tomatch_tuple = (rawconstr * predicate_pattern) list +and tomatch_tuple = (rawconstr * predicate_pattern) + +and tomatch_tuples = tomatch_tuple list + +and cases_clause = (loc * identifier list * cases_pattern list * rawconstr) -and cases_clauses = - (loc * identifier list * cases_pattern list * rawconstr) list +and cases_clauses = cases_clause list -val cases_predicate_names : tomatch_tuple -> name list +val cases_predicate_names : tomatch_tuples -> name list (*i - if PRec (_, names, arities, bodies) is in env then arities are typed in env too and bodies are typed in env enriched by the @@ -141,7 +146,14 @@ val all_flags : 'a raw_red_flag type 'a or_var = ArgArg of 'a | ArgVar of identifier located -type 'a with_occurrences = int or_var list * 'a +type occurrences_expr = bool * int or_var list + +val all_occurrences_expr_but : int or_var list -> occurrences_expr +val no_occurrences_expr_but : int or_var list -> occurrences_expr +val all_occurrences_expr : occurrences_expr +val no_occurrences_expr : occurrences_expr + +type 'a with_occurrences = occurrences_expr * 'a type ('a,'b) red_expr_gen = | Red of bool diff --git a/pretyping/recordops.ml b/pretyping/recordops.ml index 5bbaa207..bd73740f 100644 --- a/pretyping/recordops.ml +++ b/pretyping/recordops.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: recordops.ml 9166 2006-09-23 11:20:06Z herbelin $ *) +(* $Id: recordops.ml 10577 2008-02-19 10:18:19Z corbinea $ *) open Util open Pp @@ -40,15 +40,13 @@ type struc_typ = { let structure_table = ref (Indmap.empty : struc_typ Indmap.t) let projection_table = ref Cmap.empty -let option_fold_right f p e = match p with Some a -> f a e | None -> e - let load_structure i (_,(ind,id,kl,projs)) = let n = (fst (Global.lookup_inductive ind)).Declarations.mind_nparams in let struc = { s_CONST = id; s_EXPECTEDPARAM = n; s_PROJ = projs; s_PROJKIND = kl } in structure_table := Indmap.add ind struc !structure_table; projection_table := - List.fold_right (option_fold_right (fun proj -> Cmap.add proj struc)) + List.fold_right (Option.fold_right (fun proj -> Cmap.add proj struc)) projs !projection_table let cache_structure o = @@ -60,7 +58,7 @@ let subst_structure (_,subst,((kn,i),id,kl,projs as obj)) = (* invariant: struc.s_PROJ is an evaluable reference. Thus we can take *) (* the first component of subst_con. *) list_smartmap - (option_smartmap (fun kn -> fst (subst_con subst kn))) + (Option.smartmap (fun kn -> fst (subst_con subst kn))) projs in if projs' == projs && kn' == kn then obj else @@ -68,7 +66,7 @@ let subst_structure (_,subst,((kn,i),id,kl,projs as obj)) = let discharge_structure (_,(ind,id,kl,projs)) = Some (Lib.discharge_inductive ind, id, kl, - List.map (option_map Lib.discharge_con) projs) + List.map (Option.map Lib.discharge_con) projs) let (inStruc,outStruc) = declare_object {(default_object "STRUCTURE") with @@ -117,12 +115,19 @@ that maps the pair (Li,ci) to the following data type obj_typ = { o_DEF : constr; + o_INJ : int; (* position of trivial argument (negative= none) *) o_TABS : constr list; (* ordered *) o_TPARAMS : constr list; (* ordered *) o_TCOMPS : constr list } (* ordered *) +type cs_pattern = + Const_cs of global_reference + | Prod_cs + | Sort_cs of sorts_family + | Default_cs + let object_table = - (ref [] : ((global_reference * global_reference) * obj_typ) list ref) + (ref [] : ((global_reference * cs_pattern) * obj_typ) list ref) let canonical_projections () = !object_table @@ -130,14 +135,31 @@ let keep_true_projections projs kinds = map_succeed (function (p,true) -> p | _ -> failwith "") (List.combine projs kinds) -(* Intended to always success *) +let cs_pattern_of_constr t = + match kind_of_term t with + App (f,vargs) -> + begin + try Const_cs (global_of_constr f) , -1, Array.to_list vargs with + _ -> raise Not_found + end + | Rel n -> Default_cs, pred n, [] + | Prod (_,a,b) when not (dependent (mkRel 1) b) -> Prod_cs, -1, [a;pop b] + | Sort s -> Sort_cs (family_of_sort s), -1, [] + | _ -> + begin + try Const_cs (global_of_constr t) , -1, [] with + _ -> raise Not_found + end + +(* Intended to always succeed *) let compute_canonical_projections (con,ind) = let v = mkConst con in let c = Environ.constant_value (Global.env()) con in let lt,t = Reductionops.splay_lambda (Global.env()) Evd.empty c in let lt = List.rev (List.map snd lt) in let args = snd (decompose_app t) in - let { s_EXPECTEDPARAM = p; s_PROJ = lpj; s_PROJKIND = kl } = lookup_structure ind in + let { s_EXPECTEDPARAM = p; s_PROJ = lpj; s_PROJKIND = kl } = + lookup_structure ind in let params, projs = list_chop p args in let lpj = keep_true_projections lpj kl in let lps = List.combine lpj projs in @@ -146,13 +168,16 @@ let compute_canonical_projections (con,ind) = (fun l (spopt,t) -> (* comp=components *) match spopt with | Some proji_sp -> - let c, args = decompose_app t in - (try (ConstRef proji_sp, global_of_constr c, args) :: l - with Not_found -> l) + begin + try + let patt, n , args = cs_pattern_of_constr t in + ((ConstRef proji_sp, patt, n, args) :: l) + with Not_found -> l + end | _ -> l) [] lps in - List.map (fun (refi,c,argj) -> - (refi,c),{o_DEF=v; o_TABS=lt; o_TPARAMS=params; o_TCOMPS=argj}) + List.map (fun (refi,c,inj,argj) -> + (refi,c),{o_DEF=v; o_INJ=inj; o_TABS=lt; o_TPARAMS=params; o_TCOMPS=argj}) comp let open_canonical_structure i (_,o) = diff --git a/pretyping/recordops.mli b/pretyping/recordops.mli index 0a05aef6..7a7d941d 100755 --- a/pretyping/recordops.mli +++ b/pretyping/recordops.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: recordops.mli 9082 2006-08-24 17:03:28Z herbelin $ i*) +(*i $Id: recordops.mli 10577 2008-02-19 10:18:19Z corbinea $ i*) (*i*) open Names @@ -36,13 +36,22 @@ val find_projection_nparams : global_reference -> int (* the effective components of a structure and the projections of the *) (* structure *) +type cs_pattern = + Const_cs of global_reference + | Prod_cs + | Sort_cs of sorts_family + | Default_cs + type obj_typ = { o_DEF : constr; + o_INJ : int; (* position of trivial argument *) o_TABS : constr list; (* ordered *) o_TPARAMS : constr list; (* ordered *) o_TCOMPS : constr list } (* ordered *) - -val lookup_canonical_conversion : (global_reference * global_reference) -> obj_typ + +val cs_pattern_of_constr : constr -> cs_pattern * int * constr list + +val lookup_canonical_conversion : (global_reference * cs_pattern) -> obj_typ val declare_canonical_structure : global_reference -> unit val canonical_projections : unit -> - ((global_reference * global_reference) * obj_typ) list + ((global_reference * cs_pattern) * obj_typ) list diff --git a/pretyping/reductionops.ml b/pretyping/reductionops.ml index 19f515d0..6fc30aae 100644 --- a/pretyping/reductionops.ml +++ b/pretyping/reductionops.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: reductionops.ml 9106 2006-09-01 11:18:17Z herbelin $ *) +(* $Id: reductionops.ml 11010 2008-05-28 15:25:19Z barras $ *) open Pp open Util @@ -601,6 +601,9 @@ let fakey = Profile.declare_profile "fhnf_apply";; let fhnf_apply info k h a = Profile.profile4 fakey fhnf_apply info k h a;; *) +let is_transparent k = + Conv_oracle.get_strategy k <> Conv_oracle.Opaque + (* Conversion utility functions *) type conversion_test = constraints -> constraints @@ -611,26 +614,7 @@ let pb_equal = function | CUMUL -> CONV | CONV -> CONV -let sort_cmp pb s0 s1 cuniv = - match (s0,s1) with - | (Prop c1, Prop c2) -> if c1 = c2 then cuniv else raise NotConvertible - | (Prop c1, Type u) -> - (match pb with - CUMUL -> cuniv - | _ -> raise NotConvertible) - | (Type u1, Type u2) -> - (match pb with - | CONV -> enforce_eq u1 u2 cuniv - | CUMUL -> enforce_geq u2 u1 cuniv) - | (_, _) -> raise NotConvertible - -let base_sort_cmp pb s0 s1 = - match (s0,s1) with - | (Prop c1, Prop c2) -> c1 = c2 - | (Prop c1, Type u) -> pb = CUMUL - | (Type u1, Type u2) -> true - | (_, _) -> false - +let sort_cmp = sort_cmp let test_conversion f env sigma x y = try let _ = f env (nf_evar sigma x) (nf_evar sigma y) in true @@ -640,6 +624,14 @@ let is_conv env sigma = test_conversion Reduction.conv env sigma let is_conv_leq env sigma = test_conversion Reduction.conv_leq env sigma let is_fconv = function | CONV -> is_conv | CUMUL -> is_conv_leq +let test_trans_conversion f reds env sigma x y = + try let _ = f reds env (nf_evar sigma x) (nf_evar sigma y) in true + with NotConvertible -> false + +let is_trans_conv env sigma = test_trans_conversion Reduction.trans_conv env sigma +let is_trans_conv_leq env sigma = test_trans_conversion Reduction.trans_conv_leq env sigma +let is_trans_fconv = function | CONV -> is_trans_conv | CUMUL -> is_trans_conv_leq + (********************************************************************) (* Special-Purpose Reduction *) (********************************************************************) @@ -675,10 +667,42 @@ let plain_instance s c = in if s = [] then c else irec c -(* Pourquoi ne fait-on pas nf_betaiota si s=[] ? *) -let instance s c = - if s = [] then c else local_strong whd_betaiota (plain_instance s c) - +(* [instance] is used for [res_pf]; the call to [local_strong whd_betaiota] + has (unfortunately) different subtle side effects: + + - ** Order of subgoals ** + If the lemma is a case analysis with parameters, it will move the + parameters as first subgoals (e.g. "case H" applied on + "H:D->A/\B|-C" will present the subgoal |-D first while w/o + betaiota the subgoal |-D would have come last). + + - ** Betaiota-contraction in statement ** + If the lemma has a parameter which is a function and this + function is applied in the lemma, then the _strong_ betaiota will + contract the application of the function to its argument (e.g. + "apply (H (fun x => x))" in "H:forall f, f 0 = 0 |- 0=0" will + result in applying the lemma 0=0 in which "(fun x => x) 0" has + been contracted). A goal to rewrite may then fail or succeed + differently. + + - ** Naming of hypotheses ** + If a lemma is a function of the form "fun H:(forall a:A, P a) + => .. F H .." where the expected type of H is "forall b:A, P b", + then, without reduction, the application of the lemma will + generate a subgoal "forall a:A, P a" (and intro will use name + "a"), while with reduction, it will generate a subgoal "forall + b:A, P b" (and intro will use name "b"). + + - ** First-order pattern-matching ** + If a lemma has the type "(fun x => p) t" then rewriting t may fail + if the type of the lemma is first beta-reduced (this typically happens + when rewriting a single variable and the type of the lemma is obtained + by meta_instance (with empty map) which itself call instance with this + empty map. + *) + +let instance s c = + (* if s = [] then c else *) local_strong whd_betaiota (plain_instance s c) (* pseudo-reduction rule: * [hnf_prod_app env s (Prod(_,B)) N --> B[N] @@ -777,21 +801,23 @@ let is_sort env sigma arity = (* reduction to head-normal-form allowing delta/zeta only in argument of case/fix (heuristic used by evar_conv) *) -let rec apprec env sigma s = - let (t, stack as s) = whd_betaiota_state s in - match kind_of_term t with +let whd_betaiota_deltazeta_for_iota_state env sigma s = + let rec whrec s = + let (t, stack as s) = whd_betaiota_state s in + match kind_of_term t with | Case (ci,p,d,lf) -> let (cr,crargs) = whd_betadeltaiota_stack env sigma d in let rslt = mkCase (ci, p, applist (cr,crargs), lf) in if reducible_mind_case cr then - apprec env sigma (rslt, stack) + whrec (rslt, stack) else s | Fix fix -> (match reduce_fix (whd_betadeltaiota_state env sigma) fix stack with - | Reduced s -> apprec env sigma s + | Reduced s -> whrec s | NotReducible -> s) | _ -> s + in whrec s (* A reduction function like whd_betaiota but which keeps casts * and does not reduce redexes containing existential variables. @@ -861,13 +887,12 @@ let is_arity env sigma c = let meta_value evd mv = let rec valrec mv = - try - let b = meta_fvalue evd mv in + match meta_opt_fvalue evd mv with + | Some (b,_) -> instance (List.map (fun mv' -> (mv',valrec mv')) (Metaset.elements b.freemetas)) b.rebus - with Anomaly _ | Not_found -> - mkMeta mv + | None -> mkMeta mv in valrec mv @@ -876,6 +901,55 @@ let meta_instance env b = List.map (fun mv -> (mv,meta_value env mv)) (Metaset.elements b.freemetas) in - instance c_sigma b.rebus + if c_sigma = [] then b.rebus else instance c_sigma b.rebus let nf_meta env c = meta_instance env (mk_freelisted c) + +(* Instantiate metas that create beta/iota redexes *) + +let meta_value evd mv = + let rec valrec mv = + match meta_opt_fvalue evd mv with + | Some (b,_) -> + instance + (List.map (fun mv' -> (mv',valrec mv')) (Metaset.elements b.freemetas)) + b.rebus + | None -> mkMeta mv + in + valrec mv + +let meta_reducible_instance evd b = + let fm = Metaset.elements b.freemetas in + let metas = List.fold_left (fun l mv -> + match (try meta_opt_fvalue evd mv with Not_found -> None) with + | Some (g,(_,s)) -> (mv,(g.rebus,s))::l + | None -> l) [] fm in + let rec irec u = + let u = whd_betaiota u in + match kind_of_term u with + | Case (ci,p,c,bl) when isMeta c or isCast c & isMeta (pi1 (destCast c)) -> + let m = try destMeta c with _ -> destMeta (pi1 (destCast c)) in + (match + try + let g,s = List.assoc m metas in + if isConstruct g or s <> CoerceToType then Some g else None + with Not_found -> None + with + | Some g -> irec (mkCase (ci,p,g,bl)) + | None -> mkCase (ci,irec p,c,Array.map irec bl)) + | App (f,l) when isMeta f or isCast f & isMeta (pi1 (destCast f)) -> + let m = try destMeta f with _ -> destMeta (pi1 (destCast f)) in + (match + try + let g,s = List.assoc m metas in + if isLambda g or s <> CoerceToType then Some g else None + with Not_found -> None + with + | Some g -> irec (mkApp (g,l)) + | None -> mkApp (f,Array.map irec l)) + | Meta m -> + (try let g,s = List.assoc m metas in if s<>CoerceToType then irec g else u + with Not_found -> u) + | _ -> map_constr irec u + in + if fm = [] then (* nf_betaiota? *) b.rebus else irec b.rebus diff --git a/pretyping/reductionops.mli b/pretyping/reductionops.mli index 1e9b3b5b..d48055cf 100644 --- a/pretyping/reductionops.mli +++ b/pretyping/reductionops.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: reductionops.mli 9106 2006-09-01 11:18:17Z herbelin $ i*) +(*i $Id: reductionops.mli 11010 2008-05-28 15:25:19Z barras $ i*) (*i*) open Names @@ -181,7 +181,8 @@ val is_arity : env -> evar_map -> constr -> bool val whd_programs : reduction_function -(* [reduce_fix] contracts a fix redex if it is actually reducible *) +(* [reduce_fix redfun fix stk] contracts [fix stk] if it is actually + reducible; the structural argument is reduced by [redfun] *) type fix_reduction_result = NotReducible | Reduced of state @@ -189,6 +190,9 @@ val fix_recarg : fixpoint -> constr stack -> (int * constr) option val reduce_fix : local_state_reduction_function -> fixpoint -> constr stack -> fix_reduction_result +(*s Querying the kernel conversion oracle: opaque/transparent constants *) +val is_transparent : 'a tableKey -> bool + (*s Conversion Functions (uses closures, lazy strategy) *) type conversion_test = constraints -> constraints @@ -197,12 +201,15 @@ val pb_is_equal : conv_pb -> bool val pb_equal : conv_pb -> conv_pb val sort_cmp : conv_pb -> sorts -> sorts -> conversion_test -val base_sort_cmp : conv_pb -> sorts -> sorts -> bool val is_conv : env -> evar_map -> constr -> constr -> bool val is_conv_leq : env -> evar_map -> constr -> constr -> bool val is_fconv : conv_pb -> env -> evar_map -> constr -> constr -> bool +val is_trans_conv : transparent_state -> env -> evar_map -> constr -> constr -> bool +val is_trans_conv_leq : transparent_state -> env -> evar_map -> constr -> constr -> bool +val is_trans_fconv : conv_pb -> transparent_state -> env -> evar_map -> constr -> constr -> bool + (*s Special-Purpose Reduction Functions *) val whd_meta : (metavariable * constr) list -> constr -> constr @@ -211,8 +218,9 @@ val instance : (metavariable * constr) list -> constr -> constr (*s Heuristic for Conversion with Evar *) -val apprec : state_reduction_function +val whd_betaiota_deltazeta_for_iota_state : state_reduction_function (*s Meta-related reduction functions *) val meta_instance : evar_defs -> constr freelisted -> constr val nf_meta : evar_defs -> constr -> constr +val meta_reducible_instance : evar_defs -> constr freelisted -> constr diff --git a/pretyping/retyping.ml b/pretyping/retyping.ml index ecead438..82c2668c 100644 --- a/pretyping/retyping.ml +++ b/pretyping/retyping.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: retyping.ml 9314 2006-10-29 20:11:08Z herbelin $ *) +(* $Id: retyping.ml 11077 2008-06-09 11:26:32Z herbelin $ *) open Util open Term @@ -44,7 +44,7 @@ let type_of_var env id = with Not_found -> anomaly ("type_of: variable "^(string_of_id id)^" unbound") -let typeur sigma metamap = +let retype sigma metamap = let rec type_of env cstr= match kind_of_term cstr with | Meta n -> @@ -84,7 +84,7 @@ let typeur sigma metamap = and sort_of env t = match kind_of_term t with | Cast (c,_, s) when isSort s -> destSort s - | Sort (Prop c) -> type_0 + | Sort (Prop c) -> type1_sort | Sort (Type u) -> Type (Univ.super u) | Prod (name,t,c2) -> (match (sort_of env t, sort_of (push_rel (name,None,t) env) c2) with @@ -92,10 +92,12 @@ let typeur sigma metamap = | Prop _, (Prop Pos as s) -> s | Type _, (Prop Pos as s) when Environ.engagement env = Some ImpredicativeSet -> s - | Type u1, Prop Pos -> Type (Univ.sup u1 Univ.base_univ) - | Prop Pos, (Type u2) -> Type (Univ.sup Univ.base_univ u2) + | (Type _, _) | (_, Type _) -> new_Type_sort () +(* + | Type u1, Prop Pos -> Type (Univ.sup u1 Univ.type0_univ) + | Prop Pos, (Type u2) -> Type (Univ.sup Univ.type0_univ u2) | Prop Null, (Type _ as s) -> s - | Type u1, Type u2 -> Type (Univ.sup u1 u2)) + | Type u1, Type u2 -> Type (Univ.sup u1 u2)*)) | App(f,args) when isGlobalRef f -> let t = type_of_global_reference_knowing_parameters env f args in sort_of_atomic_type env sigma t args @@ -132,14 +134,18 @@ let typeur sigma metamap = in type_of, sort_of, sort_family_of, type_of_global_reference_knowing_parameters -let get_type_of env sigma c = let f,_,_,_ = typeur sigma [] in f env c -let get_sort_of env sigma t = let _,f,_,_ = typeur sigma [] in f env t -let get_sort_family_of env sigma c = let _,_,f,_ = typeur sigma [] in f env c +let get_sort_of env sigma t = let _,f,_,_ = retype sigma [] in f env t +let get_sort_family_of env sigma c = let _,_,f,_ = retype sigma [] in f env c let type_of_global_reference_knowing_parameters env sigma c args = - let _,_,_,f = typeur sigma [] in f env c args + let _,_,_,f = retype sigma [] in f env c args -let get_type_of_with_meta env sigma metamap = - let f,_,_,_ = typeur sigma metamap in f env +(* We are outside the kernel: we take fresh universes *) +(* to avoid tactics and co to refresh universes themselves *) +let get_type_of env sigma c = + let f,_,_,_ = retype sigma [] in refresh_universes (f env c) + +let get_type_of_with_meta env sigma metamap c = + let f,_,_,_ = retype sigma metamap in refresh_universes (f env c) (* Makes an assumption from a constr *) let get_assumption_of env evc c = c diff --git a/pretyping/tacred.ml b/pretyping/tacred.ml index 64e9ebec..50401502 100644 --- a/pretyping/tacred.ml +++ b/pretyping/tacred.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: tacred.ml 10135 2007-09-21 14:28:12Z herbelin $ *) +(* $Id: tacred.ml 11094 2008-06-10 19:35:23Z herbelin $ *) open Pp open Util @@ -35,18 +35,23 @@ exception ReductionTacticError of reduction_tactic_error exception Elimconst exception Redelimination -let is_evaluable env ref = - match ref with - EvalConstRef kn -> - let (ids,kns) = Conv_oracle.freeze() in - Cpred.mem kn kns & - let cb = Environ.lookup_constant kn env in - cb.const_body <> None & not cb.const_opaque - | EvalVarRef id -> - let (ids,sps) = Conv_oracle.freeze() in - Idpred.mem id ids & - let (_,value,_) = Environ.lookup_named id env in - value <> None +let is_evaluable env = function + | EvalConstRef kn -> + is_transparent (ConstKey kn) && + let cb = Environ.lookup_constant kn env in + cb.const_body <> None & not cb.const_opaque + | EvalVarRef id -> + is_transparent (VarKey id) && + let (_,value,_) = Environ.lookup_named id env in + value <> None + +let value_of_evaluable_ref env = function + | EvalConstRef con -> constant_value env con + | EvalVarRef id -> Option.get (pi2 (lookup_named id env)) + +let constr_of_evaluable_ref = function + | EvalConstRef con -> mkConst con + | EvalVarRef id -> mkVar id type evaluable_reference = | EvalConst of constant @@ -80,7 +85,7 @@ let reference_opt_value sigma env = function v | EvalRel n -> let (_,v,_) = lookup_rel n env in - option_map (lift n) v + Option.map (lift n) v | EvalEvar ev -> Evd.existential_opt_value sigma ev exception NotEvaluable @@ -90,8 +95,8 @@ let reference_value sigma env c = | Some d -> d (************************************************************************) -(* Reduction of constant hiding fixpoints (e.g. for Simpl). The trick *) -(* is to reuse the name of the function after reduction of the fixpoint *) +(* Reduction of constants hiding a fixpoint (e.g. for "simpl" tactic). *) +(* One reuses the name of the function after reduction of the fixpoint *) type constant_evaluation = | EliminationFix of int * (int * (int * constr) list * int) @@ -103,7 +108,6 @@ type constant_evaluation = (* We use a cache registered as a global table *) - module CstOrdered = struct type t = constant @@ -325,20 +329,18 @@ let make_elim_fun (names,(nbfix,lv,n)) largs = list_fold_left_i (fun q (* j from comment is n+1-q *) c (ij,tij) -> let subst = List.map (lift (-q)) (list_firstn (n-ij) la) in let tij' = substl (List.rev subst) tij in - mkLambda (x,tij',c) - ) 1 body (List.rev lv) + mkLambda (x,tij',c)) 1 body (List.rev lv) in Some g -(* [f] is convertible to [Fix(recindices,bodynum),bodyvect)] make - the reduction using this extra information *) +(* [f] is convertible to [Fix(recindices,bodynum),bodyvect)]: + do so that the reduction uses this extra information *) let contract_fix_use_function f - ((recindices,bodynum),(types,names,bodies as typedbodies)) = + ((recindices,bodynum),(_names,_types,bodies as typedbodies)) = let nbodies = Array.length recindices in let make_Fi j = match f j with | None -> mkFix((recindices,j),typedbodies) | Some c -> c in -(* match List.nth names j with Name id -> f id | _ -> assert false in*) let lbodies = list_tabulate make_Fi nbodies in substl (List.rev lbodies) bodies.(bodynum) @@ -378,7 +380,7 @@ let reduce_mind_case_use_function func env mia = fun i -> if i = bodynum then Some func else match names.(i) with - | Anonymous -> None + | Anonymous -> None | Name id -> (* In case of a call to another component of a block of mutual inductive, try to reuse the global name if @@ -419,20 +421,23 @@ let special_red_case sigma env whfun (ci, p, c, lf) = in redrec (c, empty_stack) +(* [red_elim_const] contracts iota/fix/cofix redexes hidden behind + constants by keeping the name of the constants in the recursive calls; + it fails if no redex is around *) let rec red_elim_const env sigma ref largs = match reference_eval sigma env ref with | EliminationCases n when stack_args_size largs >= n -> let c = reference_value sigma env ref in let c', lrest = whd_betadelta_state env sigma (c,largs) in - (special_red_case sigma env (construct_const env sigma) (destCase c'), - lrest) + let whfun = whd_simpl_state env sigma in + (special_red_case sigma env whfun (destCase c'), lrest) | EliminationFix (min,infos) when stack_args_size largs >=min -> let c = reference_value sigma env ref in let d, lrest = whd_betadelta_state env sigma (c,largs) in let f = make_elim_fun ([|Some ref|],infos) largs in - let co = construct_const env sigma in - (match reduce_fix_use_function f co (destFix d) lrest with + let whfun = whd_construct_state env sigma in + (match reduce_fix_use_function f whfun (destFix d) lrest with | NotReducible -> raise Redelimination | Reduced (c,rest) -> (nf_beta c, rest)) | EliminationMutualFix (min,refgoal,refinfos) @@ -447,53 +452,65 @@ let rec red_elim_const env sigma ref largs = let (_, midargs as s) = descend ref largs in let d, lrest = whd_betadelta_state env sigma s in let f = make_elim_fun refinfos midargs in - let co = construct_const env sigma in - (match reduce_fix_use_function f co (destFix d) lrest with + let whfun = whd_construct_state env sigma in + (match reduce_fix_use_function f whfun (destFix d) lrest with | NotReducible -> raise Redelimination | Reduced (c,rest) -> (nf_beta c, rest)) | _ -> raise Redelimination -and construct_const env sigma = - let rec hnfstack (x, stack as s) = +(* reduce to whd normal form or to an applied constant that does not hide + a reducible iota/fix/cofix redex (the "simpl" tactic) *) + +and whd_simpl_state env sigma s = + let rec redrec (x, stack as s) = match kind_of_term x with - | Cast (c,_,_) -> hnfstack (c, stack) - | App (f,cl) -> hnfstack (f, append_stack cl stack) - | Lambda (id,t,c) -> + | Lambda (na,t,c) -> (match decomp_stack stack with - | None -> assert false - | Some (c',rest) -> - stacklam hnfstack [c'] c rest) - | LetIn (n,b,t,c) -> stacklam hnfstack [b] c stack + | None -> s + | Some (a,rest) -> stacklam redrec [a] c rest) + | LetIn (n,b,t,c) -> stacklam redrec [b] c stack + | App (f,cl) -> redrec (f, append_stack cl stack) + | Cast (c,_,_) -> redrec (c, stack) | Case (ci,p,c,lf) -> - hnfstack - (special_red_case sigma env - (construct_const env sigma) (ci,p,c,lf), stack) - | Construct _ -> s - | CoFix _ -> s - | Fix fix -> - (match reduce_fix hnfstack fix stack with - | Reduced s' -> hnfstack s' - | NotReducible -> raise Redelimination) + (try + redrec (special_red_case sigma env redrec (ci,p,c,lf), stack) + with + Redelimination -> s) + | Fix fix -> + (try match reduce_fix (whd_construct_state env sigma) fix stack with + | Reduced s' -> redrec s' + | NotReducible -> s + with Redelimination -> s) | _ when isEvalRef env x -> let ref = destEvalRef x in (try - hnfstack (red_elim_const env sigma ref stack) + redrec (red_elim_const env sigma ref stack) with Redelimination -> - (match reference_opt_value sigma env ref with - | Some cval -> - (match kind_of_term cval with - | CoFix _ -> s - | _ -> hnfstack (cval, stack)) - | None -> - raise Redelimination)) - | _ -> raise Redelimination + s) + | _ -> s in - hnfstack + redrec s + +(* reduce until finding an applied constructor or fail *) + +and whd_construct_state env sigma s = + let (constr, cargs as s') = whd_simpl_state env sigma s in + if reducible_mind_case constr then s' + else if isEvalRef env constr then + let ref = destEvalRef constr in + match reference_opt_value sigma env ref with + | None -> raise Redelimination + | Some gvalue -> whd_construct_state env sigma (gvalue, cargs) + else + raise Redelimination (************************************************************************) (* Special Purpose Reduction Strategies *) -(* Red reduction tactic: reduction to a product *) +(* Red reduction tactic: one step of delta reduction + full + beta-iota-fix-cofix-zeta-cast at the head of the conclusion of a + sequence of products; fails if no delta redex is around +*) let try_red_product env sigma c = let simpfun = clos_norm_flags betaiotazeta env sigma in @@ -528,97 +545,105 @@ let red_product env sigma c = try try_red_product env sigma c with Redelimination -> error "Not reducible" -let hnf_constr env sigma c = - let rec redrec (x, largs as s) = +(* +(* This old version of hnf uses betadeltaiota instead of itself (resp + whd_construct_state) to reduce the argument of Case (resp Fix); + The new version uses the "simpl" strategy instead. For instance, + + Variable n:nat. + Eval hnf in match (plus (S n) O) with S n => n | _ => O end. + + returned + + (fix plus (n m : nat) {struct n} : nat := + match n with + | O => m + | S p => S (plus p m) + end) n 0 + + while the new version returns (plus n O) + *) + +let whd_simpl_orelse_delta_but_fix_old env sigma c = + let whd_all = whd_betadeltaiota_state env sigma in + let rec redrec (x, stack as s) = match kind_of_term x with - | Lambda (n,t,c) -> - (match decomp_stack largs with - | None -> app_stack s - | Some (a,rest) -> - stacklam redrec [a] c rest) - | LetIn (n,b,t,c) -> stacklam redrec [b] c largs - | App (f,cl) -> redrec (f, append_stack cl largs) - | Cast (c,_,_) -> redrec (c, largs) - | Case (ci,p,c,lf) -> + | Lambda (na,t,c) -> + (match decomp_stack stack with + | None -> s + | Some (a,rest) -> stacklam redrec [a] c rest) + | LetIn (n,b,t,c) -> stacklam redrec [b] c stack + | App (f,cl) -> redrec (f, append_stack cl stack) + | Cast (c,_,_) -> redrec (c, stack) + | Case (ci,p,d,lf) -> (try - redrec - (special_red_case sigma env (whd_betadeltaiota_state env sigma) - (ci, p, c, lf), largs) + redrec (special_red_case sigma env whd_all (ci,p,d,lf), stack) with Redelimination -> - app_stack s) + s) | Fix fix -> - (match reduce_fix (whd_betadeltaiota_state env sigma) fix largs with + (match reduce_fix whd_all fix stack with | Reduced s' -> redrec s' - | NotReducible -> app_stack s) + | NotReducible -> s) | _ when isEvalRef env x -> let ref = destEvalRef x in (try - let (c',lrest) = red_elim_const env sigma ref largs in - redrec (c', lrest) + redrec (red_elim_const env sigma ref stack) with Redelimination -> match reference_opt_value sigma env ref with | Some c -> (match kind_of_term (snd (decompose_lam c)) with - | CoFix _ | Fix _ -> app_stack (x,largs) - | _ -> redrec (c, largs)) - | None -> app_stack s) - | _ -> app_stack s - in - redrec (c, empty_stack) + | CoFix _ | Fix _ -> s + | _ -> redrec (c, stack)) + | None -> s) + | _ -> s + in app_stack (redrec (c, empty_stack)) +*) -(* Simpl reduction tactic: same as simplify, but also reduces - elimination constants *) +(* Same as [whd_simpl] but also reduces constants that do not hide a + reducible fix, but does this reduction of constants only until it + it immediately hides a non reducible fix or a cofix *) -let whd_nf env sigma c = - let rec nf_app (c, stack as s) = - match kind_of_term c with - | Lambda (name,c1,c2) -> - (match decomp_stack stack with - | None -> (c,empty_stack) - | Some (a1,rest) -> - stacklam nf_app [a1] c2 rest) - | LetIn (n,b,t,c) -> stacklam nf_app [b] c stack - | App (f,cl) -> nf_app (f, append_stack cl stack) - | Cast (c,_,_) -> nf_app (c, stack) - | Case (ci,p,d,lf) -> - (try - nf_app (special_red_case sigma env nf_app (ci,p,d,lf), stack) - with Redelimination -> - s) - | Fix fix -> - (match reduce_fix nf_app fix stack with - | Reduced s' -> nf_app s' - | NotReducible -> s) - | _ when isEvalRef env c -> - (try - nf_app (red_elim_const env sigma (destEvalRef c) stack) - with Redelimination -> - s) - | _ -> s - in - app_stack (nf_app (c, empty_stack)) +let whd_simpl_orelse_delta_but_fix env sigma c = + let rec redrec s = + let (constr, stack as s') = whd_simpl_state env sigma s in + if isEvalRef env constr then + match reference_opt_value sigma env (destEvalRef constr) with + | Some c -> + (match kind_of_term (snd (decompose_lam c)) with + | CoFix _ | Fix _ -> s' + | _ -> redrec (c, stack)) + | None -> s' + else s' + in app_stack (redrec (c, empty_stack)) + +let hnf_constr = whd_simpl_orelse_delta_but_fix + +(* The "simpl" reduction tactic *) + +let whd_simpl env sigma c = + app_stack (whd_simpl_state env sigma (c, empty_stack)) -let nf env sigma c = strong whd_nf env sigma c +let simpl env sigma c = strong whd_simpl env sigma c + +let nf = simpl (* Compatibility *) + +(* Reduction at specific subterms *) let is_head c t = match kind_of_term t with | App (f,_) -> f = c | _ -> false -let contextually byhead (locs,c) f env sigma t = +let contextually byhead ((nowhere_except_in,locs),c) f env sigma t = let maxocc = List.fold_right max locs 0 in let pos = ref 1 in - let except = List.exists (fun n -> n<0) locs in - if except & (List.exists (fun n -> n>=0) locs) - then error "mixing of positive and negative occurences" - else - let rec traverse (env,c as envc) t = - if locs <> [] & (not except) & (!pos > maxocc) then t + let rec traverse (env,c as envc) t = + if nowhere_except_in & (!pos > maxocc) then t else if (not byhead & eq_constr c t) or (byhead & is_head c t) then let ok = - if except then not (List.mem (- !pos) locs) - else (locs = [] or List.mem !pos locs) in + if nowhere_except_in then List.mem !pos locs + else not (List.mem !pos locs) in incr pos; if ok then f env sigma t @@ -634,110 +659,34 @@ let contextually byhead (locs,c) f env sigma t = traverse envc t in let t' = traverse (env,c) t in - if locs <> [] & List.exists (fun o -> o >= !pos or o <= - !pos) locs then - error_invalid_occurrence locs; + if List.exists (fun o -> o >= !pos) locs then error_invalid_occurrence locs; t' (* linear bindings (following pretty-printer) of the value of name in c. * n is the number of the next occurence of name. * ol is the occurence list to find. *) -let rec substlin env name n ol c = - match kind_of_term c with - | Const kn when EvalConstRef kn = name -> - if List.hd ol = n then - try - (n+1, List.tl ol, constant_value env kn) - with - NotEvaluableConst _ -> - errorlabstrm "substlin" - (pr_con kn ++ str " is not a defined constant") - else - ((n+1), ol, c) - - | Var id when EvalVarRef id = name -> - if List.hd ol = n then - match lookup_named id env with - | (_,Some c,_) -> (n+1, List.tl ol, c) - | _ -> - errorlabstrm "substlin" - (pr_id id ++ str " is not a defined constant") - else - ((n+1), ol, c) - - (* INEFFICIENT: OPTIMIZE *) - | App (c1,cl) -> - Array.fold_left - (fun (n1,ol1,c1') c2 -> - (match ol1 with - | [] -> (n1,[],applist(c1',[c2])) - | _ -> - let (n2,ol2,c2') = substlin env name n1 ol1 c2 in - (n2,ol2,applist(c1',[c2'])))) - (substlin env name n ol c1) cl - - | Lambda (na,c1,c2) -> - let (n1,ol1,c1') = substlin env name n ol c1 in - (match ol1 with - | [] -> (n1,[],mkLambda (na,c1',c2)) - | _ -> - let (n2,ol2,c2') = substlin env name n1 ol1 c2 in - (n2,ol2,mkLambda (na,c1',c2'))) - - | LetIn (na,c1,t,c2) -> - let (n1,ol1,c1') = substlin env name n ol c1 in - (match ol1 with - | [] -> (n1,[],mkLetIn (na,c1',t,c2)) - | _ -> - let (n2,ol2,c2') = substlin env name n1 ol1 c2 in - (n2,ol2,mkLetIn (na,c1',t,c2'))) - - | Prod (na,c1,c2) -> - let (n1,ol1,c1') = substlin env name n ol c1 in - (match ol1 with - | [] -> (n1,[],mkProd (na,c1',c2)) - | _ -> - let (n2,ol2,c2') = substlin env name n1 ol1 c2 in - (n2,ol2,mkProd (na,c1',c2'))) - - | Case (ci,p,d,llf) -> - let rec substlist nn oll = function - | [] -> (nn,oll,[]) - | f::lfe -> - let (nn1,oll1,f') = substlin env name nn oll f in - (match oll1 with - | [] -> (nn1,[],f'::lfe) - | _ -> - let (nn2,oll2,lfe') = substlist nn1 oll1 lfe in - (nn2,oll2,f'::lfe')) - in - (* p is printed after d in v8 syntax *) - let (n1,ol1,d') = substlin env name n ol d in - (match ol1 with - | [] -> (n1,[],mkCase (ci, p, d', llf)) - | _ -> - let (n2,ol2,p') = substlin env name n1 ol1 p in - (match ol2 with - | [] -> (n2,[],mkCase (ci, p', d', llf)) - | _ -> - let (n3,ol3,lf') = substlist n2 ol2 (Array.to_list llf) - in (n3,ol3,mkCase (ci, p', d', Array.of_list lf')))) - - | Cast (c1,k,c2) -> - let (n1,ol1,c1') = substlin env name n ol c1 in - (match ol1 with - | [] -> (n1,[],mkCast (c1',k,c2)) - | _ -> - let (n2,ol2,c2') = substlin env name n1 ol1 c2 in - (n2,ol2,mkCast (c1',k,c2'))) - - | Fix _ -> - (warning "do not consider occurrences inside fixpoints"; (n,ol,c)) - - | CoFix _ -> - (warning "do not consider occurrences inside cofixpoints"; (n,ol,c)) - | (Rel _|Meta _|Var _|Sort _ - |Evar _|Const _|Ind _|Construct _) -> (n,ol,c) +let substlin env evalref n (nowhere_except_in,locs) c = + let maxocc = List.fold_right max locs 0 in + let pos = ref n in + assert (List.for_all (fun x -> x >= 0) locs); + let value = value_of_evaluable_ref env evalref in + let term = constr_of_evaluable_ref evalref in + let rec substrec () c = + if nowhere_except_in & !pos > maxocc then c + else if c = term then + let ok = + if nowhere_except_in then List.mem !pos locs + else not (List.mem !pos locs) in + incr pos; + if ok then value else c + else + map_constr_with_binders_left_to_right + (fun _ () -> ()) + substrec () c + in + let t' = substrec () c in + (!pos, t') let string_of_evaluable_ref env = function | EvalVarRef id -> string_of_id id @@ -755,16 +704,15 @@ let unfold env sigma name = * Unfolds the constant name in a term c following a list of occurrences occl. * at the occurrences of occ_list. If occ_list is empty, unfold all occurences. * Performs a betaiota reduction after unfolding. *) -let unfoldoccs env sigma (occl,name) c = - match occl with - | [] -> unfold env sigma name c - | l -> - match substlin env name 1 (Sort.list (<) l) c with - | (_,[],uc) -> nf_betaiota uc - | (1,_,_) -> - error ((string_of_evaluable_ref env name)^" does not occur") - | (_,l,_) -> - error_invalid_occurrence l +let unfoldoccs env sigma ((nowhere_except_in,locs as plocs),name) c = + if locs = [] then if nowhere_except_in then c else unfold env sigma name c + else + let (nbocc,uc) = substlin env name 1 plocs c in + if nbocc = 1 then + error ((string_of_evaluable_ref env name)^" does not occur"); + let rest = List.filter (fun o -> o >= nbocc) locs in + if rest <> [] then error_invalid_occurrence rest; + nf_betaiota uc (* Unfold reduction tactic: *) let unfoldn loccname env sigma c = @@ -775,7 +723,17 @@ let fold_one_com com env sigma c = let rcom = try red_product env sigma com with Redelimination -> error "Not reducible" in - subst1 com (subst_term rcom c) + (* Reason first on the beta-iota-zeta normal form of the constant as + unfold produces it, so that the "unfold f; fold f" configuration works + to refold fix expressions *) + let a = subst_term (clos_norm_flags unfold_side_red env sigma rcom) c in + if not (eq_constr a c) then + subst1 com a + else + (* Then reason on the non beta-iota-zeta form for compatibility - + even if it is probably a useless configuration *) + let a = subst_term rcom c in + subst1 com a let fold_commands cl env sigma c = List.fold_right (fun com -> fold_one_com com env sigma) (List.rev cl) c @@ -815,70 +773,81 @@ let pattern_occs loccs_trm env sigma c = (* Used in several tactics. *) +(* put t as t'=(x1:A1)..(xn:An)B with B an inductive definition of name name + return name, B and t' *) + +let reduce_to_ind_gen allow_product env sigma t = + let rec elimrec env t l = + let t = hnf_constr env sigma t in + match kind_of_term (fst (decompose_app t)) with + | Ind ind-> (ind, it_mkProd_or_LetIn t l) + | Prod (n,ty,t') -> + if allow_product then + elimrec (push_rel (n,None,ty) env) t' ((n,None,ty)::l) + else + errorlabstrm "" (str"Not an inductive definition") + | _ -> + (* Last chance: we allow to bypass the Opaque flag (as it + was partially the case between V5.10 and V8.1 *) + let t' = whd_betadeltaiota env sigma t in + match kind_of_term (fst (decompose_app t')) with + | Ind ind-> (ind, it_mkProd_or_LetIn t' l) + | _ -> errorlabstrm "" (str"Not an inductive product") + in + elimrec env t [] + +let reduce_to_quantified_ind x = reduce_to_ind_gen true x +let reduce_to_atomic_ind x = reduce_to_ind_gen false x + +(* Reduce the weak-head redex [beta,iota/fix/cofix[all],cast,zeta,simpl/delta] + or raise [NotStepReducible] if not a weak-head redex *) + exception NotStepReducible let one_step_reduce env sigma c = - let rec redrec (x, largs) = + let rec redrec (x, stack) = match kind_of_term x with | Lambda (n,t,c) -> - (match decomp_stack largs with + (match decomp_stack stack with | None -> raise NotStepReducible | Some (a,rest) -> (subst1 a c, rest)) - | App (f,cl) -> redrec (f, append_stack cl largs) - | LetIn (_,f,_,cl) -> (subst1 f cl,largs) + | App (f,cl) -> redrec (f, append_stack cl stack) + | LetIn (_,f,_,cl) -> (subst1 f cl,stack) + | Cast (c,_,_) -> redrec (c,stack) | Case (ci,p,c,lf) -> (try - (special_red_case sigma env (whd_betadeltaiota_state env sigma) - (ci,p,c,lf), largs) + (special_red_case sigma env (whd_simpl_state env sigma) + (ci,p,c,lf), stack) with Redelimination -> raise NotStepReducible) | Fix fix -> - (match reduce_fix (whd_betadeltaiota_state env sigma) fix largs with + (match reduce_fix (whd_construct_state env sigma) fix stack with | Reduced s' -> s' | NotReducible -> raise NotStepReducible) - | Cast (c,_,_) -> redrec (c,largs) | _ when isEvalRef env x -> - let ref = - try destEvalRef x - with Redelimination -> raise NotStepReducible in + let ref = destEvalRef x in (try - red_elim_const env sigma ref largs + red_elim_const env sigma ref stack with Redelimination -> match reference_opt_value sigma env ref with - | Some d -> d, largs + | Some d -> d, stack | None -> raise NotStepReducible) | _ -> raise NotStepReducible in app_stack (redrec (c, empty_stack)) -(* put t as t'=(x1:A1)..(xn:An)B with B an inductive definition of name name - return name, B and t' *) +let isIndRef = function IndRef _ -> true | _ -> false -let reduce_to_ind_gen allow_product env sigma t = - let rec elimrec env t l = - let c, _ = Reductionops.whd_stack t in - match kind_of_term c with - | Ind (mind,args) -> ((mind,args),it_mkProd_or_LetIn t l) - | Prod (n,ty,t') -> - if allow_product then - elimrec (push_rel (n,None,t) env) t' ((n,None,ty)::l) - else - errorlabstrm "tactics__reduce_to_mind" - (str"Not an inductive definition") - | _ -> - (try - let t' = nf_betaiota (one_step_reduce env sigma t) in - elimrec env t' l - with NotStepReducible -> - errorlabstrm "tactics__reduce_to_mind" - (str"Not an inductive product")) - in - elimrec env t [] - -let reduce_to_quantified_ind x = reduce_to_ind_gen true x -let reduce_to_atomic_ind x = reduce_to_ind_gen false x - -let reduce_to_ref_gen allow_product env sigma ref t = +let reduce_to_ref_gen allow_product env sigma ref t = + if isIndRef ref then + let (mind,t) = reduce_to_ind_gen allow_product env sigma t in + if IndRef mind <> ref then + errorlabstrm "" (str "Cannot recognize a statement based on " ++ + Nametab.pr_global_env Idset.empty ref) + else + t + else + (* lazily reduces to match the head of [t] with the expected [ref] *) let rec elimrec env t l = let c, _ = Reductionops.whd_stack t in match kind_of_term c with @@ -886,8 +855,9 @@ let reduce_to_ref_gen allow_product env sigma ref t = if allow_product then elimrec (push_rel (n,None,t) env) t' ((n,None,ty)::l) else - errorlabstrm "Tactics.reduce_to_ref_gen" - (str"Not an induction object of atomic type") + errorlabstrm "" + (str "Cannot recognize an atomic statement based on " ++ + Nametab.pr_global_env Idset.empty ref) | _ -> try if global_of_constr c = ref @@ -899,8 +869,8 @@ let reduce_to_ref_gen allow_product env sigma ref t = elimrec env t' l with NotStepReducible -> errorlabstrm "" - (str "Not a statement of conclusion " ++ - Nametab.pr_global_env Idset.empty ref) + (str "Cannot recognize a statement based on " ++ + Nametab.pr_global_env Idset.empty ref) in elimrec env t [] diff --git a/pretyping/tacred.mli b/pretyping/tacred.mli index 691fdf01..e12d6ad2 100644 --- a/pretyping/tacred.mli +++ b/pretyping/tacred.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: tacred.mli 8878 2006-05-30 16:44:25Z herbelin $ i*) +(*i $Id: tacred.mli 11094 2008-06-10 19:35:23Z herbelin $ i*) (*i*) open Names @@ -16,6 +16,7 @@ open Evd open Reductionops open Closure open Rawterm +open Termops (*i*) type reduction_tactic_error = @@ -35,21 +36,25 @@ val red_product : reduction_function (* Red (raise Redelimination if nothing reducible) *) val try_red_product : reduction_function -(* Hnf *) -val hnf_constr : reduction_function - (* Simpl *) -val nf : reduction_function +val simpl : reduction_function + +(* Simpl only at the head *) +val whd_simpl : reduction_function + +(* Hnf: like whd_simpl but force delta-reduction of constants that do + not immediately hide a non reducible fix or cofix *) +val hnf_constr : reduction_function (* Unfold *) val unfoldn : - (int list * evaluable_global_reference) list -> reduction_function + (occurrences * evaluable_global_reference) list -> reduction_function (* Fold *) val fold_commands : constr list -> reduction_function (* Pattern *) -val pattern_occs : (int list * constr) list -> reduction_function +val pattern_occs : (occurrences * constr) list -> reduction_function (* Rem: Lazy strategies are defined in Reduction *) (* Call by value strategy (uses Closures) *) @@ -77,5 +82,10 @@ val reduce_to_quantified_ref : val reduce_to_atomic_ref : env -> evar_map -> Libnames.global_reference -> types -> types -val contextually : bool -> int list * constr -> reduction_function +val contextually : bool -> occurrences * constr -> reduction_function -> reduction_function + +(* Compatibility *) +(* use [simpl] instead of [nf] *) +val nf : reduction_function + diff --git a/pretyping/termops.ml b/pretyping/termops.ml index 6b7e1fb7..e31024bb 100644 --- a/pretyping/termops.ml +++ b/pretyping/termops.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: termops.ml 9429 2006-12-12 08:01:03Z herbelin $ *) +(* $Id: termops.ml 11166 2008-06-22 13:23:35Z herbelin $ *) open Pp open Util @@ -160,18 +160,22 @@ let new_Type_sort () = Type (new_univ ()) (* This refreshes universes in types; works only for inferred types (i.e. for types of the form (x1:A1)...(xn:An)B with B a sort or an atom in head normal form) *) -let refresh_universes t = +let refresh_universes_gen strict t = let modified = ref false in let rec refresh t = match kind_of_term t with - | Sort (Type _) -> modified := true; new_Type () + | Sort (Type u) when strict or u <> Univ.type0m_univ -> + modified := true; new_Type () | Prod (na,u,v) -> mkProd (na,u,refresh v) | _ -> t in let t' = refresh t in if !modified then t' else t +let refresh_universes = refresh_universes_gen false +let refresh_universes_strict = refresh_universes_gen true + let new_sort_in_family = function - | InProp -> mk_Prop - | InSet -> mk_Set + | InProp -> prop_sort + | InSet -> set_sort | InType -> Type (new_univ ()) @@ -214,7 +218,7 @@ let push_named_rec_types (lna,typarray,_) env = array_map2_i (fun i na t -> match na with - | Name id -> (id, None, type_app (lift i) t) + | Name id -> (id, None, lift i t) | Anonymous -> anomaly "Fix declarations must be named") lna typarray in Array.fold_left @@ -271,6 +275,11 @@ let rec strip_head_cast c = match kind_of_term c with | Cast (c,_,_) -> strip_head_cast c | _ -> c +(* Get the last arg of an application *) +let last_arg c = match kind_of_term c with + | App (f,cl) -> array_last cl + | _ -> anomaly "last_arg" + (* [map_constr_with_named_binders g f l c] maps [f l] on the immediate subterms of [c]; it carries an extra data [l] (typically a name list) which is processed by [g na] (which typically cons [na] to @@ -305,11 +314,8 @@ let map_constr_with_named_binders g f l c = match kind_of_term c with (co-)fixpoint) *) let fold_rec_types g (lna,typarray,_) e = - let ctxt = - array_map2_i - (fun i na t -> (na, None, type_app (lift i) t)) lna typarray in - Array.fold_left - (fun e assum -> g assum e) e ctxt + let ctxt = array_map2_i (fun i na t -> (na, None, lift i t)) lna typarray in + Array.fold_left (fun e assum -> g assum e) e ctxt let map_constr_with_binders_left_to_right g f l c = match kind_of_term c with @@ -514,6 +520,16 @@ let free_rels m = in frec 1 Intset.empty m +(* collects all metavar occurences, in left-to-right order, preserving + * repetitions and all. *) + +let collect_metas c = + let rec collrec acc c = + match kind_of_term c with + | Meta mv -> list_add_set mv acc + | _ -> fold_constr collrec acc c + in + List.rev (collrec [] c) (* (dependent M N) is true iff M is eq_term with a subterm of N M is appropriately lifted through abstractions of N *) @@ -610,32 +626,34 @@ let subst_term = subst_term_gen eq_constr let replace_term = replace_term_gen eq_constr -(* Substitute only a list of locations locs, the empty list is - interpreted as substitute all, if 0 is in the list then no - bindings is done. The list may contain only negative occurrences - that will not be substituted. *) +(* Substitute only at a list of locations or excluding a list of + locations; in the occurrences list (b,l), b=true means no + occurrence except the ones in l and b=false, means all occurrences + except the ones in l *) + +type occurrences = bool * int list +let all_occurrences = (false,[]) +let no_occurrences_in_set = (true,[]) let error_invalid_occurrence l = + let l = list_uniquize (List.sort Pervasives.compare l) in errorlabstrm "" (str ("Invalid occurrence " ^ plural (List.length l) "number" ^": ") ++ prlist_with_sep spc int l) -let subst_term_occ_gen locs occ c t = +let subst_term_occ_gen (nowhere_except_in,locs) occ c t = let maxocc = List.fold_right max locs 0 in let pos = ref occ in - let except = List.exists (fun n -> n<0) locs in - if except & (List.exists (fun n -> n>=0) locs) - then error "mixing of positive and negative occurences" - else - let rec substrec (k,c as kc) t = - if (not except) & (!pos > maxocc) then t + assert (List.for_all (fun x -> x >= 0) locs); + let rec substrec (k,c as kc) t = + if nowhere_except_in & !pos > maxocc then t else if eq_constr c t then let r = - if except then - if List.mem (- !pos) locs then t else (mkRel k) - else + if nowhere_except_in then if List.mem !pos locs then (mkRel k) else t + else + if List.mem !pos locs then t else (mkRel k) in incr pos; r else map_constr_with_binders_left_to_right @@ -645,40 +663,33 @@ let subst_term_occ_gen locs occ c t = let t' = substrec (1,c) t in (!pos, t') -let subst_term_occ locs c t = - if locs = [] then subst_term c t - else if List.mem 0 locs then - t +let subst_term_occ (nowhere_except_in,locs as plocs) c t = + if locs = [] then if nowhere_except_in then t else subst_term c t else - let (nbocc,t') = subst_term_occ_gen locs 1 c t in - let rest = List.filter (fun o -> o >= nbocc or o <= -nbocc) locs in + let (nbocc,t') = subst_term_occ_gen plocs 1 c t in + let rest = List.filter (fun o -> o >= nbocc) locs in if rest <> [] then error_invalid_occurrence rest; t' -let subst_term_occ_decl locs c (id,bodyopt,typ as d) = +let subst_term_occ_decl (nowhere_except_in,locs as plocs) c (id,bodyopt,typ as d) = match bodyopt with - | None -> (id,None,subst_term_occ locs c typ) + | None -> (id,None,subst_term_occ plocs c typ) | Some body -> if locs = [] then - (id,Some (subst_term c body),type_app (subst_term c) typ) - else if List.mem 0 locs then - d + if nowhere_except_in then d + else (id,Some (subst_term c body),subst_term c typ) else - let (nbocc,body') = subst_term_occ_gen locs 1 c body in - let (nbocc',t') = subst_term_occ_gen locs nbocc c typ in - let rest = List.filter (fun o -> o >= nbocc' or o <= -nbocc') locs in + let (nbocc,body') = subst_term_occ_gen plocs 1 c body in + let (nbocc',t') = subst_term_occ_gen plocs nbocc c typ in + let rest = List.filter (fun o -> o >= nbocc') locs in if rest <> [] then error_invalid_occurrence rest; (id,Some body',t') (* First character of a constr *) -let first_char id = - let id = string_of_id id in - assert (id <> ""); - String.make 1 id.[0] - -let lowercase_first_char id = String.lowercase (first_char id) +let lowercase_first_char id = + lowercase_first_char_utf8 (string_of_id id) let vars_of_env env = let s = @@ -707,8 +718,7 @@ let hdchar env c = | Cast (c,_,_) -> hdrec k c | App (f,l) -> hdrec k f | Const kn -> - let c = lowercase_first_char (id_of_label (con_label kn)) in - if c = "?" then "y" else c + lowercase_first_char (id_of_label (con_label kn)) | Ind ((kn,i) as x) -> if i=0 then lowercase_first_char (id_of_label (label kn)) @@ -743,20 +753,18 @@ let named_hd env a = function | Anonymous -> Name (id_of_string (hdchar env a)) | x -> x -let named_hd_type env a = named_hd env (body_of_type a) - -let mkProd_name env (n,a,b) = mkProd (named_hd_type env a n, a, b) -let mkLambda_name env (n,a,b) = mkLambda (named_hd_type env a n, a, b) +let mkProd_name env (n,a,b) = mkProd (named_hd env a n, a, b) +let mkLambda_name env (n,a,b) = mkLambda (named_hd env a n, a, b) let lambda_name = mkLambda_name let prod_name = mkProd_name -let prod_create env (a,b) = mkProd (named_hd_type env a Anonymous, a, b) -let lambda_create env (a,b) = mkLambda (named_hd_type env a Anonymous, a, b) +let prod_create env (a,b) = mkProd (named_hd env a Anonymous, a, b) +let lambda_create env (a,b) = mkLambda (named_hd env a Anonymous, a, b) let name_assumption env (na,c,t) = match c with - | None -> (named_hd_type env t na, None, t) + | None -> (named_hd env t na, None, t) | Some body -> (named_hd env body na, c, t) let name_context env hyps = @@ -834,6 +842,14 @@ let is_global id = with Not_found -> false +let is_constructor id = + try + match locate (make_short_qualid id) with + | ConstructRef _ as ref -> not (is_imported_ref ref) + | _ -> false + with Not_found -> + false + let is_section_variable id = try let _ = Global.lookup_named id in true with Not_found -> false @@ -860,6 +876,11 @@ let isGlobalRef c = | Const _ | Ind _ | Construct _ | Var _ -> true | _ -> false +let has_polymorphic_type c = + match (Global.lookup_constant c).Declarations.const_type with + | Declarations.PolymorphicArity _ -> true + | _ -> false + (* nouvelle version de renommage des variables (DEC 98) *) (* This is the algorithm to display distinct bound variables @@ -898,11 +919,19 @@ let occur_id nenv id0 c = with Occur -> true | Not_found -> false (* Case when a global is not in the env *) -let next_name_not_occuring is_goal_ccl name l env_names t = +type avoid_flags = bool option + +let next_name_not_occuring avoid_flags name l env_names t = let rec next id = if List.mem id l or occur_id env_names id t or - (* To be consistent with intro mechanism *) - (is_goal_ccl & is_global id & not (is_section_variable id)) + (* Further restrictions ? *) + match avoid_flags with None -> false | Some not_only_cstr -> + (if not_only_cstr then + (* To be consistent with the intro mechanism *) + is_global id & not (is_section_variable id) + else + (* To avoid constructors in pattern-matchings *) + is_constructor id) then next (lift_ident id) else id in @@ -914,6 +943,22 @@ let next_name_not_occuring is_goal_ccl name l env_names t = (* invent a valid name *) next (id_of_string "H") +let base_sort_cmp pb s0 s1 = + match (s0,s1) with + | (Prop c1, Prop c2) -> c1 = Null or c2 = Pos (* Prop <= Set *) + | (Prop c1, Type u) -> pb = Reduction.CUMUL + | (Type u1, Type u2) -> true + | _ -> false + +(* eq_constr extended with universe erasure *) +let rec constr_cmp cv_pb t1 t2 = + (match kind_of_term t1, kind_of_term t2 with + Sort s1, Sort s2 -> base_sort_cmp cv_pb s1 s2 + | _ -> false) + || compare_constr (constr_cmp cv_pb) t1 t2 + +let eq_constr = constr_cmp Reduction.CONV + (* On reduit une serie d'eta-redex de tete ou rien du tout *) (* [x1:c1;...;xn:cn]@(f;a1...an;x1;...;xn) --> @(f;a1...an) *) (* Remplace 2 versions précédentes buggées *) @@ -939,6 +984,7 @@ let rec eta_reduce_head c = | _ -> c) | _ -> c + (* alpha-eta conversion : ignore print names and casts *) let eta_eq_constr = let rec aux t1 t2 = @@ -963,14 +1009,18 @@ let assums_of_rel_context sign = | None -> (na, t)::l) sign ~init:[] -let lift_rel_context n sign = - let rec liftrec k = function - | (na,c,t)::sign -> - (na,option_map (liftn n k) c,type_app (liftn n k) t) - ::(liftrec (k-1) sign) +let map_rel_context_with_binders f sign = + let rec aux k = function + | d::sign -> map_rel_declaration (f k) d :: aux (k-1) sign | [] -> [] in - liftrec (rel_context_length sign) sign + aux (rel_context_length sign) sign + +let substl_rel_context l = + map_rel_context_with_binders (fun k -> substnl l (k-1)) + +let lift_rel_context n = + map_rel_context_with_binders (liftn n) let fold_named_context_both_sides f l ~init = list_fold_right_and_left f l init @@ -996,34 +1046,42 @@ let global_vars_set_of_decl env = function Idset.union (global_vars_set env t) (global_vars_set env c) +let default_x = id_of_string "x" + +let rec next_name_away_in_cases_pattern id avoid = + let id = match id with Name id -> id | Anonymous -> default_x in + let rec next id = + if List.mem id avoid or is_constructor id then next (lift_ident id) + else id in + next id + (* Remark: Anonymous var may be dependent in Evar's contexts *) -let concrete_name is_goal_ccl l env_names n c = +let concrete_name avoid_flags l env_names n c = if n = Anonymous & noccurn 1 c then (Anonymous,l) else - let fresh_id = next_name_not_occuring is_goal_ccl n l env_names c in + let fresh_id = next_name_not_occuring avoid_flags n l env_names c in let idopt = if noccurn 1 c then Anonymous else Name fresh_id in (idopt, fresh_id::l) -let concrete_let_name is_goal_ccl l env_names n c = - let fresh_id = next_name_not_occuring is_goal_ccl n l env_names c in +let concrete_let_name avoid_flags l env_names n c = + let fresh_id = next_name_not_occuring avoid_flags n l env_names c in (Name fresh_id, fresh_id::l) -let rec rename_bound_var env l c = - match kind_of_term c with - | Prod (Name s,c1,c2) -> - if noccurn 1 c2 then - let env' = push_rel (Name s,None,c1) env in - mkProd (Name s, c1, rename_bound_var env' l c2) - else - let s' = next_ident_away s (global_vars env c2@l) in - let env' = push_rel (Name s',None,c1) env in - mkProd (Name s', c1, rename_bound_var env' (s'::l) c2) - | Prod (Anonymous,c1,c2) -> - let env' = push_rel (Anonymous,None,c1) env in - mkProd (Anonymous, c1, rename_bound_var env' l c2) - | Cast (c,k,t) -> mkCast (rename_bound_var env l c, k,t) - | x -> c +let rec rename_bound_var env avoid c = + let env_names = names_of_rel_context env in + let rec rename avoid c = + match kind_of_term c with + | Prod (na,c1,c2) -> + let na',avoid' = concrete_name None avoid env_names na c2 in + mkProd (na', c1, rename avoid' c2) + | LetIn (na,c1,t,c2) -> + let na',avoid' = concrete_let_name None avoid env_names na c2 in + mkLetIn (na',c1,t, rename avoid' c2) + | Cast (c,k,t) -> mkCast (rename avoid c, k,t) + | _ -> c + in + rename avoid c (* Combinators on judgments *) @@ -1031,3 +1089,13 @@ let on_judgment f j = { uj_val = f j.uj_val; uj_type = f j.uj_type } let on_judgment_value f j = { j with uj_val = f j.uj_val } let on_judgment_type f j = { j with uj_type = f j.uj_type } +(* Cut a context ctx in 2 parts (ctx1,ctx2) with ctx1 containing k + variables *) +let context_chop k ctx = + let rec chop_aux acc = function + | (0, l2) -> (List.rev acc, l2) + | (n, ((_,Some _,_ as h)::t)) -> chop_aux (h::acc) (n, t) + | (n, (h::t)) -> chop_aux (h::acc) (pred n, t) + | (_, []) -> anomaly "context_chop" + in chop_aux [] (k,ctx) + diff --git a/pretyping/termops.mli b/pretyping/termops.mli index e406b148..94aff66f 100644 --- a/pretyping/termops.mli +++ b/pretyping/termops.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: termops.mli 9314 2006-10-29 20:11:08Z herbelin $ i*) +(*i $Id: termops.mli 11166 2008-06-22 13:23:35Z herbelin $ i*) open Util open Pp @@ -21,6 +21,7 @@ val new_sort_in_family : sorts_family -> sorts val new_Type : unit -> types val new_Type_sort : unit -> sorts val refresh_universes : types -> types +val refresh_universes_strict : types -> types (* printers *) val print_sort : sorts -> std_ppcmds @@ -30,6 +31,7 @@ val set_print_constr : (env -> constr -> std_ppcmds) -> unit val print_constr : constr -> std_ppcmds val print_constr_env : env -> constr -> std_ppcmds val print_named_context : env -> std_ppcmds +val pr_rel_decl : env -> rel_declaration -> std_ppcmds val print_rel_context : env -> std_ppcmds val print_env : env -> std_ppcmds @@ -100,7 +102,8 @@ val occur_var_in_decl : identifier -> 'a * types option * types -> bool val occur_term : constr -> constr -> bool val free_rels : constr -> Intset.t - +val dependent : constr -> constr -> bool +val collect_metas : constr -> int list (* Substitution of metavariables *) type metamap = (metavariable * constr) list val subst_meta : metamap -> constr -> constr @@ -108,37 +111,62 @@ val subst_meta : metamap -> constr -> constr (* [pop c] lifts by -1 the positive indexes in [c] *) val pop : constr -> constr -(* bindings of an arbitrary large term. Uses equality modulo +(*s Substitution of an arbitrary large term. Uses equality modulo reduction of let *) -val dependent : constr -> constr -> bool + +(* [subst_term_gen eq d c] replaces [Rel 1] by [d] in [c] using [eq] + as equality *) val subst_term_gen : (constr -> constr -> bool) -> constr -> constr -> constr + +(* [replace_term_gen eq d e c] replaces [d] by [e] in [c] using [eq] + as equality *) val replace_term_gen : (constr -> constr -> bool) -> constr -> constr -> constr -> constr + +(* [subst_term d c] replaces [Rel 1] by [d] in [c] *) val subst_term : constr -> constr -> constr + +(* [replace_term d e c] replaces [d] by [e] in [c] *) val replace_term : constr -> constr -> constr -> constr -val subst_term_occ_gen : - int list -> int -> constr -> types -> int * types -val subst_term_occ : int list -> constr -> types -> types + +(* In occurrences sets, false = everywhere except and true = nowhere except *) +type occurrences = bool * int list +val all_occurrences : occurrences +val no_occurrences_in_set : occurrences + +(* [subst_term_occ_gen occl n c d] replaces occurrences of [c] at + positions [occl], counting from [n], by [Rel 1] in [d] *) +val subst_term_occ_gen : + occurrences -> int -> constr -> types -> int * types + +(* [subst_term_occ occl c d] replaces occurrences of [c] at + positions [occl] by [Rel 1] in [d] (see also Note OCC) *) +val subst_term_occ : occurrences -> constr -> constr -> constr + +(* [subst_term_occ_decl occl c decl] replaces occurrences of [c] at + positions [occl] by [Rel 1] in [decl] *) val subst_term_occ_decl : - int list -> constr -> named_declaration -> named_declaration + occurrences -> constr -> named_declaration -> named_declaration val error_invalid_occurrence : int list -> 'a (* Alternative term equalities *) +val base_sort_cmp : Reduction.conv_pb -> sorts -> sorts -> bool +val constr_cmp : Reduction.conv_pb -> constr -> constr -> bool +val eq_constr : constr -> constr -> bool + val eta_reduce_head : constr -> constr val eta_eq_constr : constr -> constr -> bool (* finding "intuitive" names to hypotheses *) -val first_char : identifier -> string val lowercase_first_char : identifier -> string val sort_hdchar : sorts -> string val hdchar : env -> types -> string val id_of_name_using_hdchar : env -> types -> name -> identifier val named_hd : env -> types -> name -> name -val named_hd_type : env -> types -> name -> name val mkProd_name : env -> name * types * types -> types val mkLambda_name : env -> name * types * constr -> constr @@ -157,6 +185,9 @@ val mkLambda_or_LetIn_name : env -> constr -> rel_declaration -> constr val it_mkProd_or_LetIn_name : env -> types -> rel_context -> types val it_mkLambda_or_LetIn_name : env -> constr -> rel_context -> constr +(* Get the last arg of a constr intended to be nn application *) +val last_arg : constr -> constr + (* name contexts *) type names_context = name list val add_name : name -> names_context -> names_context @@ -168,6 +199,8 @@ val ids_of_named_context : named_context -> identifier list val ids_of_context : env -> identifier list val names_of_rel_context : env -> names_context +val context_chop : int -> rel_context -> (rel_context*rel_context) + (* Set of local names *) val vars_of_env: env -> Idset.t val add_vname : Idset.t -> name -> Idset.t @@ -177,21 +210,31 @@ type used_idents = identifier list val occur_rel : int -> name list -> identifier -> bool val occur_id : name list -> identifier -> constr -> bool +type avoid_flags = bool option + (* Some true = avoid all globals (as in intro); + Some false = avoid only global constructors; None = don't avoid globals *) + +val next_name_away_in_cases_pattern : + name -> identifier list -> identifier val next_global_ident_away : (*allow section vars:*) bool -> identifier -> identifier list -> identifier val next_name_not_occuring : - bool -> name -> identifier list -> name list -> constr -> identifier + avoid_flags -> name -> identifier list -> name list -> constr -> identifier val concrete_name : - bool -> identifier list -> name list -> name -> constr -> + avoid_flags -> identifier list -> name list -> name -> constr -> name * identifier list val concrete_let_name : - bool -> identifier list -> name list -> name -> constr -> name * identifier list + avoid_flags -> identifier list -> name list -> name -> constr -> + name * identifier list val rename_bound_var : env -> identifier list -> types -> types (* other signature iterators *) val process_rel_context : (rel_declaration -> env -> env) -> env -> env val assums_of_rel_context : rel_context -> (name * constr) list val lift_rel_context : int -> rel_context -> rel_context +val substl_rel_context : constr list -> rel_context -> rel_context +val map_rel_context_with_binders : + (int -> constr -> constr) -> rel_context -> rel_context val fold_named_context_both_sides : ('a -> named_declaration -> named_declaration list -> 'a) -> named_context -> init:'a -> 'a @@ -206,6 +249,8 @@ val is_section_variable : identifier -> bool val isGlobalRef : constr -> bool +val has_polymorphic_type : constant -> bool + (* Combinators on judgments *) val on_judgment : (types -> types) -> unsafe_judgment -> unsafe_judgment diff --git a/pretyping/typeclasses.ml b/pretyping/typeclasses.ml new file mode 100644 index 00000000..a2392033 --- /dev/null +++ b/pretyping/typeclasses.ml @@ -0,0 +1,457 @@ +(* -*- compile-command: "make -C .. bin/coqtop.byte" -*- *) +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Gmap.add k v acc) old ne + +let cmap_union = Cmap.fold Cmap.add + +let gmap_cmap_merge old ne = + let ne' = + Gmap.fold (fun cl insts acc -> + let oldinsts = try Gmap.find cl old with Not_found -> Cmap.empty in + Gmap.add cl (cmap_union oldinsts insts) acc) + Gmap.empty ne + in + Gmap.fold (fun cl insts acc -> + if Gmap.mem cl ne' then acc + else Gmap.add cl insts acc) + ne' old + +let add_instance_hint_ref = ref (fun id pri -> assert false) +let register_add_instance_hint = + (:=) add_instance_hint_ref +let add_instance_hint id = !add_instance_hint_ref id + +let cache (_, (cl, m, inst)) = + classes := cl; + methods := m; + instances := inst + +let load (_, (cl, m, inst)) = + classes := gmap_merge !classes cl; + methods := gmap_merge !methods m; + instances := gmap_cmap_merge !instances inst + +open Libobject + +let subst (_,subst,(cl,m,inst)) = + let do_subst_con c = fst (Mod_subst.subst_con subst c) + and do_subst c = Mod_subst.subst_mps subst c + and do_subst_gr gr = fst (subst_global subst gr) + in + let do_subst_named ctx = + list_smartmap (fun (na, b, t) -> + (na, Option.smartmap do_subst b, do_subst t)) + ctx + in + let do_subst_ctx ctx = + list_smartmap (fun (cl, (na, b, t)) -> + (Option.smartmap (fun (gr,b) -> do_subst_gr gr, b) cl, + (na, Option.smartmap do_subst b, do_subst t))) + ctx + in + let do_subst_projs projs = list_smartmap (fun (x, y) -> (x, do_subst_con y)) projs in + let subst_class k cl classes = + let k = do_subst_gr k in + let cl' = { cl with cl_impl = k; + cl_context = do_subst_ctx cl.cl_context; + cl_props = do_subst_named cl.cl_props; + cl_projs = do_subst_projs cl.cl_projs; } + in + let cl' = if cl' = cl then cl else cl' in + Gmap.add k cl' classes + in + let classes = Gmap.fold subst_class cl Gmap.empty in + let subst_inst k insts instances = + let k = do_subst_gr k in + let insts' = + Cmap.fold (fun cst is acc -> + let cst = do_subst_con cst in + let is' = { is with is_class = k; is_impl = cst } in + Cmap.add cst (if is' = is then is else is') acc) insts Cmap.empty + in Gmap.add k insts' instances + in + let instances = Gmap.fold subst_inst inst Gmap.empty in + (classes, m, instances) + +let discharge (_,(cl,m,inst)) = + let discharge_named (cl, r) = + Option.smartmap (fun (gr, b) -> Lib.discharge_global gr, b) cl, r + in + let abs_context cl = + match cl.cl_impl with + | VarRef _ | ConstructRef _ -> assert false + | ConstRef cst -> Lib.section_segment_of_constant cst + | IndRef (ind,_) -> Lib.section_segment_of_mutual_inductive ind + in + let subst_class k cl acc = + let cl_impl' = Lib.discharge_global cl.cl_impl in + let cl' = + if cl_impl' == cl.cl_impl then cl + else + { cl with cl_impl = cl_impl'; + cl_context = + List.map (fun x -> None, x) (abs_context cl) @ + (list_smartmap discharge_named cl.cl_context); + cl_projs = list_smartmap (fun (x, y) -> x, Lib.discharge_con y) cl.cl_projs } + in Gmap.add cl_impl' cl' acc + in + let classes = Gmap.fold subst_class cl Gmap.empty in + let subst_inst k insts acc = + let k' = Lib.discharge_global k in + let insts' = + Cmap.fold (fun k is acc -> + let impl = Lib.discharge_con is.is_impl in + let is = { is with is_class = k'; is_impl = impl } in + Cmap.add impl is acc) + insts Cmap.empty + in Gmap.add k' insts' acc + in + let instances = Gmap.fold subst_inst inst Gmap.empty in + Some (classes, m, instances) + +let rebuild (_,(cl,m,inst)) = + let inst = + Gmap.map (fun insts -> + Cmap.fold (fun k is insts -> + match is.is_global with + | None -> insts + | Some 0 -> Cmap.add k is insts + | Some n -> + add_instance_hint is.is_impl is.is_pri; + let is' = { is with is_global = Some (pred n) } + in Cmap.add k is' insts) insts Cmap.empty) + inst + in (cl, m, inst) + +let (input,output) = + declare_object + { (default_object "type classes state") with + cache_function = cache; + load_function = (fun _ -> load); + open_function = (fun _ -> load); + classify_function = (fun (_,x) -> Substitute x); + discharge_function = discharge; + rebuild_function = rebuild; + subst_function = subst; + export_function = (fun x -> Some x) } + +let update () = + Lib.add_anonymous_leaf (input (!classes, !methods, !instances)) + +let add_class c = + classes := Gmap.add c.cl_impl c !classes; + methods := List.fold_left (fun acc x -> Gmap.add (snd x) c.cl_impl acc) !methods c.cl_projs; + update () + +let class_info c = + try Gmap.find c !classes + with _ -> not_a_class (Global.env()) (constr_of_global c) + +let instance_constructor cl args = + let pars = fst (list_chop (List.length cl.cl_context) args) in + match cl.cl_impl with + | IndRef ind -> applistc (mkConstruct (ind, 1)) args, + applistc (mkInd ind) pars + | ConstRef cst -> list_last args, applistc (mkConst cst) pars + | _ -> assert false + +let typeclasses () = Gmap.fold (fun _ l c -> l :: c) !classes [] + +let cmapl_add x y m = + try + let l = Gmap.find x m in + Gmap.add x (Cmap.add y.is_impl y l) m + with Not_found -> + Gmap.add x (Cmap.add y.is_impl y Cmap.empty) m + +let cmap_elements c = Cmap.fold (fun k v acc -> v :: acc) c [] + +let instances_of c = + try cmap_elements (Gmap.find c.cl_impl !instances) with Not_found -> [] + +let add_instance i = + let cl = class_info i.is_class in + instances := cmapl_add cl.cl_impl i !instances; + add_instance_hint i.is_impl i.is_pri; + update () + +let instances r = + let cl = class_info r in instances_of cl + +let solve_instanciation_problem = ref (fun _ _ _ _ -> assert false) +let solve_instanciations_problem = ref (fun _ _ _ _ _ -> assert false) + +let resolve_typeclass env ev evi (evd, defined as acc) = + try + assert(evi.evar_body = Evar_empty); + !solve_instanciation_problem env evd ev evi + with Exit -> acc + +let resolve_one_typeclass env types = + try + let evi = Evd.make_evar (Environ.named_context_val env) types in + let ev = 1 in + let evm = Evd.add Evd.empty ev evi in + let evd = Evd.create_evar_defs evm in + let evd', b = !solve_instanciation_problem env evd ev evi in + if b then + let evm' = Evd.evars_of evd' in + match Evd.evar_body (Evd.find evm' ev) with + Evar_empty -> raise Not_found + | Evar_defined c -> c + else raise Not_found + with Exit -> raise Not_found + +let resolve_one_typeclass_evd env evd types = + try + let ev = Evarutil.e_new_evar evd env types in + let (ev,_) = destEvar ev in + let evd', b = + !solve_instanciation_problem env !evd ev (Evd.find (Evd.evars_of !evd) ev) + in + evd := evd'; + if b then + let evm' = Evd.evars_of evd' in + match Evd.evar_body (Evd.find evm' ev) with + Evar_empty -> raise Not_found + | Evar_defined c -> Evarutil.nf_evar evm' c + else raise Not_found + with Exit -> raise Not_found + +let method_typeclass ref = + match ref with + | ConstRef c -> + class_info (Gmap.find c !methods) + | _ -> raise Not_found + +let is_class gr = + Gmap.fold (fun k v acc -> acc || v.cl_impl = gr) !classes false + +let is_method c = + Gmap.mem c !methods + +let is_instance = function + | ConstRef c -> + (match Decls.constant_kind c with + | IsDefinition Instance -> true + | _ -> false) + | VarRef v -> + (match Decls.variable_kind v with + | IsDefinition Instance -> true + | _ -> false) + | _ -> false + +let is_implicit_arg k = + match k with + ImplicitArg (ref, (n, id)) -> true + | InternalHole -> true + | _ -> false + +let destClassApp c = + match kind_of_term c with + | App (ki, args) when isInd ki -> + Some (destInd ki, args) + | _ when isInd c -> Some (destInd c, [||]) + | _ -> None + +let is_independent evm ev = + Evd.fold (fun ev' evi indep -> indep && + (ev = ev' || + evi.evar_body <> Evar_empty || + not (Termops.occur_evar ev evi.evar_concl))) + evm true + + +(* try !solve_instanciations_problem env (Evarutil.nf_evar_defs evd) *) +(* with _ -> *) +(* let evm = Evd.evars_of evd in *) +(* let tc_evars = *) +(* let f ev evi acc = *) +(* let (l, k) = Evd.evar_source ev evd in *) +(* if not check || is_implicit_arg k then *) +(* match destClassApp evi.evar_concl with *) +(* | Some (i, args) when is_class i -> *) +(* Evd.add acc ev evi *) +(* | _ -> acc *) +(* else acc *) +(* in Evd.fold f evm Evd.empty *) +(* in *) +(* let rec sat evars = *) +(* let evm = Evd.evars_of evars in *) +(* let (evars', progress) = *) +(* Evd.fold *) +(* (fun ev evi acc -> *) +(* if (Evd.mem tc_evars ev || not (Evd.mem evm ev)) *) +(* && evi.evar_body = Evar_empty then *) +(* resolve_typeclass env ev evi acc *) +(* else acc) *) +(* evm (evars, false) *) +(* in *) +(* if not progress then evars' *) +(* else *) +(* sat (Evarutil.nf_evar_defs evars') *) +(* in sat (Evarutil.nf_evar_defs evd) *) + +let class_of_constr c = + let extract_cl c = + try Some (class_info (global_of_constr c)) with _ -> None + in + match kind_of_term c with + App (c, _) -> extract_cl c + | _ -> extract_cl c + +let dest_class_app c = + let cl c = class_info (global_of_constr c) in + match kind_of_term c with + App (c, args) -> cl c, args + | _ -> cl c, [||] + +(* To embed a boolean for resolvability status. + This is essentially a hack to mark which evars correspond to + goals and do not need to be resolved when we have nested [resolve_all_evars] + calls (e.g. when doing apply in an External hint in typeclass_instances). + Would be solved by having real evars-as-goals. *) + +let ((bool_in : bool -> Dyn.t), + (bool_out : Dyn.t -> bool)) = Dyn.create "bool" + +let bool_false = bool_in false + +let is_resolvable evi = + match evi.evar_extra with + Some t -> if Dyn.tag t = "bool" then bool_out t else true + | None -> true + +let mark_unresolvable evi = + { evi with evar_extra = Some bool_false } + +let mark_unresolvables sigma = + Evd.fold (fun ev evi evs -> + Evd.add evs ev (mark_unresolvable evi)) + sigma Evd.empty + +let has_typeclasses evd = + Evd.fold (fun ev evi has -> has || + (evi.evar_body = Evar_empty && class_of_constr evi.evar_concl <> None + && is_resolvable evi)) + evd false + +let resolve_typeclasses ?(onlyargs=false) ?(split=true) ?(fail=true) env evd = + if not (has_typeclasses (Evd.evars_of evd)) then evd + else + !solve_instanciations_problem env (Evarutil.nf_evar_defs evd) onlyargs split fail + +type substitution = (identifier * constr) list + +let substitution_of_named_context isevars env id n subst l = + List.fold_right + (fun (na, _, t) subst -> + let t' = replace_vars subst t in + let b = Evarutil.e_new_evar isevars env ~src:(dummy_loc, ImplicitArg (VarRef id, (n, Some na))) t' in + (na, b) :: subst) + l subst + +let nf_substitution sigma subst = + List.map (function (na, c) -> na, Reductionops.nf_evar sigma c) subst diff --git a/pretyping/typeclasses.mli b/pretyping/typeclasses.mli new file mode 100644 index 00000000..a3118053 --- /dev/null +++ b/pretyping/typeclasses.mli @@ -0,0 +1,105 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* constant + +val new_instance : typeclass -> int option -> bool -> constant -> instance + +val instances : global_reference -> instance list +val typeclasses : unit -> typeclass list +val add_class : typeclass -> unit +val add_instance : instance -> unit + +val register_add_instance_hint : (constant -> int option -> unit) -> unit +val add_instance_hint : constant -> int option -> unit + +val class_info : global_reference -> typeclass (* raises a UserError if not a class *) +val is_class : global_reference -> bool +val class_of_constr : constr -> typeclass option +val dest_class_app : constr -> typeclass * constr array (* raises a UserError if not a class *) + +val is_instance : global_reference -> bool +val is_method : constant -> bool + +(* Returns the term and type for the given instance of the parameters and fields + of the type class. *) +val instance_constructor : typeclass -> constr list -> constr * types + +val resolve_one_typeclass : env -> types -> types (* Raises Not_found *) +val resolve_one_typeclass_evd : env -> evar_defs ref -> types -> types (* Raises Not_found *) +val resolve_typeclass : env -> evar -> evar_info -> evar_defs * bool -> evar_defs * bool + +(* Use evar_extra for marking resolvable evars. *) +val bool_in : bool -> Dyn.t +val bool_out : Dyn.t -> bool + +val is_resolvable : evar_info -> bool +val mark_unresolvable : evar_info -> evar_info +val mark_unresolvables : evar_map -> evar_map + +val resolve_typeclasses : ?onlyargs:bool -> ?split:bool -> ?fail:bool -> env -> evar_defs -> evar_defs + +val solve_instanciation_problem : (env -> evar_defs -> existential_key -> evar_info -> evar_defs * bool) ref +val solve_instanciations_problem : (env -> evar_defs -> bool -> bool -> bool -> evar_defs) ref + +type substitution = (identifier * constr) list + +val substitution_of_named_context : + evar_defs ref -> env -> identifier -> int -> + substitution -> named_context -> substitution + +val nf_substitution : evar_map -> substitution -> substitution + +val is_implicit_arg : hole_kind -> bool + +(* debug *) + +(* val subst : *) +(* 'a * Mod_subst.substitution * *) +(* ((Libnames.global_reference, typeclass) Gmap.t * 'b * *) +(* ('c, instance list) Gmap.t) -> *) +(* (Libnames.global_reference, typeclass) Gmap.t * 'b * *) +(* ('c, instance list) Gmap.t *) + diff --git a/pretyping/typeclasses_errors.ml b/pretyping/typeclasses_errors.ml new file mode 100644 index 00000000..9faac94d --- /dev/null +++ b/pretyping/typeclasses_errors.ml @@ -0,0 +1,55 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* + raise (TypeClassError (env, UnsatisfiableConstraints (evd, None))) + | Some ev -> + let evi = Evd.find (Evd.evars_of evd) ev in + let loc, kind = Evd.evar_source ev evd in + raise (Stdpp.Exc_located (loc, TypeClassError + (env, UnsatisfiableConstraints (evd, Some (evi, kind))))) + +let mismatched_ctx_inst env c n m = typeclass_error env (MismatchedContextInstance (c, n, m)) diff --git a/pretyping/typeclasses_errors.mli b/pretyping/typeclasses_errors.mli new file mode 100644 index 00000000..6491372f --- /dev/null +++ b/pretyping/typeclasses_errors.mli @@ -0,0 +1,44 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* constr -> 'a + +val unbound_method : env -> global_reference -> identifier located -> 'a + +val no_instance : env -> identifier located -> constr list -> 'a + +val unsatisfiable_constraints : env -> evar_defs -> evar option -> 'a + +val mismatched_ctx_inst : env -> contexts -> constr_expr list -> named_context -> 'a diff --git a/pretyping/typing.ml b/pretyping/typing.ml index 6fa05fa5..43e19ca7 100644 --- a/pretyping/typing.ml +++ b/pretyping/typing.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: typing.ml 9511 2007-01-22 08:27:31Z herbelin $ *) +(* $Id: typing.ml 10785 2008-04-13 21:41:54Z herbelin $ *) open Util open Names @@ -20,14 +20,11 @@ open Inductiveops open Typeops open Evd -let meta_type env mv = +let meta_type evd mv = let ty = - try Evd.meta_ftype env mv - with Not_found -> error ("unknown meta ?"^string_of_int mv) in - meta_instance env ty - -let vect_lift = Array.mapi lift -let vect_lift_type = Array.mapi (fun i t -> type_app (lift i) t) + try Evd.meta_ftype evd mv + with Not_found -> anomaly ("unknown meta ?"^Nameops.string_of_meta mv) in + meta_instance evd ty let constant_type_knowing_parameters env cst jl = let paramstyp = Array.map (fun j -> j.uj_type) jl in @@ -169,8 +166,9 @@ let mcheck env evd c t = let mtype_of env evd c = let j = execute env evd (nf_evar (evars_of evd) c) in - (* No normalization: it breaks Pattern! *) - (*nf_betaiota*) (body_of_type j.uj_type) + (* We are outside the kernel: we take fresh universes *) + (* to avoid tactics and co to refresh universes themselves *) + Termops.refresh_universes j.uj_type let msort_of env evd c = let j = execute env evd (nf_evar (evars_of evd) c) in diff --git a/pretyping/unification.ml b/pretyping/unification.ml index 5fb8054f..fc812594 100644 --- a/pretyping/unification.ml +++ b/pretyping/unification.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: unification.ml 9517 2007-01-22 17:37:58Z herbelin $ *) +(* $Id: unification.ml 11157 2008-06-21 10:45:51Z herbelin $ *) open Pp open Util @@ -23,6 +23,8 @@ open Rawterm open Pattern open Evarutil open Pretype_errors +open Retyping +open Coercion.Default (* if lname_typ is [xn,An;..;x1,A1] and l is a list of terms, gives [x1:A1]..[xn:An]c' such that c converts to ([x1:A1]..[xn:An]c' l) *) @@ -31,31 +33,69 @@ let abstract_scheme env c l lname_typ = List.fold_left2 (fun t (locc,a) (na,_,ta) -> let na = match kind_of_term a with Var id -> Name id | _ -> na in +(* [occur_meta ta] test removed for support of eelim/ecase but consequences + are unclear... if occur_meta ta then error "cannot find a type for the generalisation" - else if occur_meta a then lambda_name env (na,ta,t) + else *) if occur_meta a then lambda_name env (na,ta,t) else lambda_name env (na,ta,subst_term_occ locc a t)) c (List.rev l) lname_typ -let abstract_list_all env sigma typ c l = - let ctxt,_ = decomp_n_prod env sigma (List.length l) typ in - let p = abstract_scheme env c (List.map (function a -> [],a) l) ctxt in +let abstract_list_all env evd typ c l = + let ctxt,_ = decomp_n_prod env (evars_of evd) (List.length l) typ in + let l_with_all_occs = List.map (function a -> (all_occurrences,a)) l in + let p = abstract_scheme env c l_with_all_occs ctxt in try - if is_conv_leq env sigma (Typing.type_of env sigma p) typ then p + if is_conv_leq env (evars_of evd) (Typing.mtype_of env evd p) typ then p else error "abstract_list_all" - with UserError _ -> - raise (PretypeError (env,CannotGeneralize typ)) + with UserError _ | Type_errors.TypeError _ -> + error_cannot_find_well_typed_abstraction env (evars_of evd) p l (**) +(* A refinement of [conv_pb]: the integers tells how many arguments + were applied in the context of the conversion problem; if the number + is non zero, steps of eta-expansion will be allowed +*) + +type conv_pb_up_to_eta = Cumul | ConvUnderApp of int * int + +let topconv = ConvUnderApp (0,0) +let of_conv_pb = function CONV -> topconv | CUMUL -> Cumul +let conv_pb_of = function ConvUnderApp _ -> CONV | Cumul -> CUMUL +let prod_pb = function ConvUnderApp _ -> topconv | pb -> pb + +let opp_status = function + | IsSuperType -> IsSubType + | IsSubType -> IsSuperType + | ConvUpToEta _ | UserGiven as x -> x + +let add_type_status (x,y) = ((x,TypeNotProcessed),(y,TypeNotProcessed)) + +let extract_instance_status = function + | Cumul -> add_type_status (IsSubType, IsSuperType) + | ConvUnderApp (n1,n2) -> add_type_status (ConvUpToEta n1, ConvUpToEta n2) + +let rec assoc_pair x = function + [] -> raise Not_found + | (a,b,_)::l -> if compare a x = 0 then b else assoc_pair x l + +let rec subst_meta_instances bl c = + match kind_of_term c with + | Meta i -> (try assoc_pair i bl with Not_found -> c) + | _ -> map_constr (subst_meta_instances bl) c + let solve_pattern_eqn_array env f l c (metasubst,evarsubst) = match kind_of_term f with | Meta k -> - (k,solve_pattern_eqn env (Array.to_list l) c)::metasubst,evarsubst + let c = solve_pattern_eqn env (Array.to_list l) c in + let n = Array.length l - List.length (fst (decompose_lam c)) in + let pb = (ConvUpToEta n,TypeNotProcessed) in + (k,c,pb)::metasubst,evarsubst | Evar ev -> (* Currently unused: incompatible with eauto/eassumption backtracking *) - metasubst,(f,solve_pattern_eqn env (Array.to_list l) c)::evarsubst + metasubst,(ev,solve_pattern_eqn env (Array.to_list l) c)::evarsubst | _ -> assert false (*******************************) @@ -78,79 +118,207 @@ let unify_r2l x = x let sort_eqns = unify_r2l *) -let unify_0 env sigma cv_pb mod_delta m n = - let trivial_unify pb substn m n = - if (not(occur_meta m)) && - (if mod_delta then is_fconv pb env sigma m n else eq_constr m n) - then substn - else error_cannot_unify env sigma (m,n) in - let rec unirec_rec curenv pb ((metasubst,evarsubst) as substn) curm curn = +type unify_flags = { + modulo_conv_on_closed_terms : Names.transparent_state option; + use_metas_eagerly : bool; + modulo_delta : Names.transparent_state; +} + +let default_unify_flags = { + modulo_conv_on_closed_terms = Some full_transparent_state; + use_metas_eagerly = true; + modulo_delta = full_transparent_state; +} + +let default_no_delta_unify_flags = { + modulo_conv_on_closed_terms = Some full_transparent_state; + use_metas_eagerly = true; + modulo_delta = empty_transparent_state; +} + +let expand_constant env flags c = + match kind_of_term c with + | Const cst when is_transparent (ConstKey cst) && + Cpred.mem cst (snd flags.modulo_delta) -> + constant_opt_value env cst + | Var id when is_transparent (VarKey id) && + Idpred.mem id (fst flags.modulo_delta) -> + named_body id env + | _ -> None + +let unify_0_with_initial_metas subst conv_at_top env sigma cv_pb flags m n = + let nb = nb_rel env in + let trivial_unify pb (metasubst,_) m n = + let subst = if flags.use_metas_eagerly then metasubst else fst subst in + match subst_defined_metas subst m with + | Some m -> + (match flags.modulo_conv_on_closed_terms with + Some flags -> + is_trans_fconv (conv_pb_of pb) flags env sigma m n + | None -> constr_cmp (conv_pb_of cv_pb) m n) + | _ -> constr_cmp (conv_pb_of cv_pb) m n in + let rec unirec_rec curenv pb b ((metasubst,evarsubst) as substn) curm curn = let cM = Evarutil.whd_castappevar sigma curm and cN = Evarutil.whd_castappevar sigma curn in match (kind_of_term cM,kind_of_term cN) with | Meta k1, Meta k2 -> + let stM,stN = extract_instance_status pb in if k1 < k2 - then (k1,cN)::metasubst,evarsubst - else if k1 = k2 then substn else (k2,cM)::metasubst,evarsubst + then (k1,cN,stN)::metasubst,evarsubst + else if k1 = k2 then substn + else (k2,cM,stM)::metasubst,evarsubst | Meta k, _ -> (* Here we check that [cN] does not contain any local variables *) - if (closedn (nb_rel env) cN) - then (k,cN)::metasubst,evarsubst - else error_cannot_unify_local curenv sigma (curenv,m,n,cN) + if (closedn nb cN) + then (k,cN,snd (extract_instance_status pb))::metasubst,evarsubst + else error_cannot_unify_local curenv sigma (m,n,cN) | _, Meta k -> (* Here we check that [cM] does not contain any local variables *) - if (closedn (nb_rel env) cM) - then (k,cM)::metasubst,evarsubst - else error_cannot_unify_local curenv sigma (curenv,m,n,cM) - | Evar _, _ -> metasubst,((cM,cN)::evarsubst) - | _, Evar _ -> metasubst,((cN,cM)::evarsubst) + if (closedn nb cM) + then (k,cM,fst (extract_instance_status pb))::metasubst,evarsubst + else error_cannot_unify_local curenv sigma (m,n,cM) + | Evar ev, _ -> metasubst,((ev,cN)::evarsubst) + | _, Evar ev -> metasubst,((ev,cM)::evarsubst) | Lambda (na,t1,c1), Lambda (_,t2,c2) -> - unirec_rec (push_rel_assum (na,t1) curenv) CONV - (unirec_rec curenv CONV substn t1 t2) c1 c2 + unirec_rec (push_rel_assum (na,t1) curenv) topconv true + (unirec_rec curenv topconv true substn t1 t2) c1 c2 | Prod (na,t1,c1), Prod (_,t2,c2) -> - unirec_rec (push_rel_assum (na,t1) curenv) pb - (unirec_rec curenv CONV substn t1 t2) c1 c2 - | LetIn (_,b,_,c), _ -> unirec_rec curenv pb substn (subst1 b c) cN - | _, LetIn (_,b,_,c) -> unirec_rec curenv pb substn cM (subst1 b c) + unirec_rec (push_rel_assum (na,t1) curenv) (prod_pb pb) true + (unirec_rec curenv topconv true substn t1 t2) c1 c2 + | LetIn (_,a,_,c), _ -> unirec_rec curenv pb b substn (subst1 a c) cN + | _, LetIn (_,a,_,c) -> unirec_rec curenv pb b substn cM (subst1 a c) + | Case (_,p1,c1,cl1), Case (_,p2,c2,cl2) -> + array_fold_left2 (unirec_rec curenv topconv true) + (unirec_rec curenv topconv true + (unirec_rec curenv topconv true substn p1 p2) c1 c2) cl1 cl2 + | App (f1,l1), _ when - isMeta f1 & is_unification_pattern f1 l1 & not (dependent f1 cN) -> + isMeta f1 & is_unification_pattern curenv f1 l1 & + not (dependent f1 cN) -> solve_pattern_eqn_array curenv f1 l1 cN substn | _, App (f2,l2) when - isMeta f2 & is_unification_pattern f2 l2 & not (dependent f2 cM) -> + isMeta f2 & is_unification_pattern curenv f2 l2 & + not (dependent f2 cM) -> solve_pattern_eqn_array curenv f2 l2 cM substn | App (f1,l1), App (f2,l2) -> let len1 = Array.length l1 and len2 = Array.length l2 in - let (f1,l1,f2,l2) = - if len1 = len2 then (f1,l1,f2,l2) - else if len1 < len2 then - let extras,restl2 = array_chop (len2-len1) l2 in - (f1, l1, appvect (f2,extras), restl2) - else - let extras,restl1 = array_chop (len1-len2) l1 in - (appvect (f1,extras), restl1, f2, l2) in - (try - array_fold_left2 (unirec_rec curenv CONV) - (unirec_rec curenv CONV substn f1 f2) l1 l2 - with ex when precatchable_exception ex -> - trivial_unify pb substn cM cN) - | Case (_,p1,c1,cl1), Case (_,p2,c2,cl2) -> - array_fold_left2 (unirec_rec curenv CONV) - (unirec_rec curenv CONV - (unirec_rec curenv CONV substn p1 p2) c1 c2) cl1 cl2 - | _ -> trivial_unify pb substn cM cN + (try + let (f1,l1,f2,l2) = + if len1 = len2 then (f1,l1,f2,l2) + else if len1 < len2 then + let extras,restl2 = array_chop (len2-len1) l2 in + (f1, l1, appvect (f2,extras), restl2) + else + let extras,restl1 = array_chop (len1-len2) l1 in + (appvect (f1,extras), restl1, f2, l2) in + let pb = ConvUnderApp (len1,len2) in + array_fold_left2 (unirec_rec curenv topconv true) + (unirec_rec curenv pb true substn f1 f2) l1 l2 + with ex when precatchable_exception ex -> + expand curenv pb b substn cM f1 l1 cN f2 l2) + + | _ -> + let (f1,l1) = + match kind_of_term cM with App (f,l) -> (f,l) | _ -> (cM,[||]) in + let (f2,l2) = + match kind_of_term cN with App (f,l) -> (f,l) | _ -> (cN,[||]) in + expand curenv pb b substn cM f1 l1 cN f2 l2 + + and expand curenv pb b substn cM f1 l1 cN f2 l2 = + if trivial_unify pb substn cM cN then substn + else if b then + match expand_constant curenv flags f1 with + | Some c -> + unirec_rec curenv pb b substn (whd_betaiotazeta (mkApp(c,l1))) cN + | None -> + match expand_constant curenv flags f2 with + | Some c -> + unirec_rec curenv pb b substn cM (whd_betaiotazeta (mkApp(c,l2))) + | None -> + error_cannot_unify env sigma (cM,cN) + else + error_cannot_unify env sigma (cM,cN) + in if (not(occur_meta m)) && - (if mod_delta then is_fconv cv_pb env sigma m n else eq_constr m n) + (match flags.modulo_conv_on_closed_terms with + Some flags -> + is_trans_fconv (conv_pb_of cv_pb) flags env sigma m n + | None -> constr_cmp (conv_pb_of cv_pb) m n) then - ([],[]) + subst else - let (mc,ec) = unirec_rec env cv_pb ([],[]) m n in - ((*sort_eqns*) mc, (*sort_eqns*) ec) + unirec_rec env cv_pb conv_at_top subst m n + +let unify_0 = unify_0_with_initial_metas ([],[]) true +let left = true +let right = false + +let pop k = if k=0 then 0 else k-1 + +let rec unify_with_eta keptside flags env sigma k1 k2 c1 c2 = + (* Reason up to limited eta-expansion: ci is allowed to start with ki lam *) + (* Question: try whd_betadeltaiota on ci if ki>0 ? *) + match kind_of_term c1, kind_of_term c2 with + | (Lambda (na,t1,c1'), Lambda (_,t2,c2')) -> + let env' = push_rel_assum (na,t1) env in + let metas,evars = unify_0 env sigma topconv flags t1 t2 in + let side,status,(metas',evars') = + unify_with_eta keptside flags env' sigma (pop k1) (pop k2) c1' c2' + in (side,status,(metas@metas',evars@evars')) + | (Lambda (na,t,c1'),_) when k2 > 0 -> + let env' = push_rel_assum (na,t) env in + let side = left in (* expansion on the right: we keep the left side *) + unify_with_eta side flags env' sigma (pop k1) (k2-1) + c1' (mkApp (lift 1 c2,[|mkRel 1|])) + | (_,Lambda (na,t,c2')) when k1 > 0 -> + let env' = push_rel_assum (na,t) env in + let side = right in (* expansion on the left: we keep the right side *) + unify_with_eta side flags env' sigma (k1-1) (pop k2) + (mkApp (lift 1 c1,[|mkRel 1|])) c2' + | _ -> + (keptside,ConvUpToEta(min k1 k2), + unify_0 env sigma topconv flags c1 c2) + +(* We solved problems [?n =_pb u] (i.e. [u =_(opp pb) ?n]) and [?n =_pb' u'], + we now compute the problem on [u =? u'] and decide which of u or u' is kept + + Rem: the upper constraint is lost in case u <= ?n <= u' (and symmetrically + in the case u' <= ?n <= u) + *) + +let merge_instances env sigma flags st1 st2 c1 c2 = + match (opp_status st1, st2) with + | (UserGiven, ConvUpToEta n2) -> + unify_with_eta left flags env sigma 0 n2 c1 c2 + | (ConvUpToEta n1, UserGiven) -> + unify_with_eta right flags env sigma n1 0 c1 c2 + | (ConvUpToEta n1, ConvUpToEta n2) -> + let side = left (* arbitrary choice, but agrees with compatibility *) in + unify_with_eta side flags env sigma n1 n2 c1 c2 + | ((IsSubType | ConvUpToEta _ | UserGiven as oppst1), + (IsSubType | ConvUpToEta _ | UserGiven)) -> + let res = unify_0 env sigma Cumul flags c2 c1 in + if oppst1=st2 then (* arbitrary choice *) (left, st1, res) + else if st2=IsSubType or st1=UserGiven then (left, st1, res) + else (right, st2, res) + | ((IsSuperType | ConvUpToEta _ | UserGiven as oppst1), + (IsSuperType | ConvUpToEta _ | UserGiven)) -> + let res = unify_0 env sigma Cumul flags c1 c2 in + if oppst1=st2 then (* arbitrary choice *) (left, st1, res) + else if st2=IsSuperType or st1=UserGiven then (left, st1, res) + else (right, st2, res) + | (IsSuperType,IsSubType) -> + (try (left, IsSubType, unify_0 env sigma Cumul flags c2 c1) + with _ -> (right, IsSubType, unify_0 env sigma Cumul flags c1 c2)) + | (IsSubType,IsSuperType) -> + (try (left, IsSuperType, unify_0 env sigma Cumul flags c1 c2) + with _ -> (right, IsSuperType, unify_0 env sigma Cumul flags c2 c1)) (* Unification * @@ -208,7 +376,8 @@ let applyHead env evd n c = else match kind_of_term (whd_betadeltaiota env (evars_of evd) cty) with | Prod (_,c1,c2) -> - let (evd',evar) = Evarutil.new_evar evd env c1 in + let (evd',evar) = + Evarutil.new_evar evd env ~src:(dummy_loc,GoalEvar) c1 in apprec (n-1) (mkApp(c,[|evar|])) (subst1 evar c2) evd' | _ -> error "Apply_Head_Then" in @@ -218,94 +387,167 @@ let is_mimick_head f = match kind_of_term f with (Const _|Var _|Rel _|Construct _|Ind _) -> true | _ -> false - + +let pose_all_metas_as_evars env evd t = + let evdref = ref evd in + let rec aux t = match kind_of_term t with + | Meta mv -> + (match Evd.meta_opt_fvalue !evdref mv with + | Some ({rebus=c},_) -> c + | None -> + let {rebus=ty;freemetas=mvs} = Evd.meta_ftype evd mv in + let ty = if mvs = Evd.Metaset.empty then ty else aux ty in + let ev = Evarutil.e_new_evar evdref env ~src:(dummy_loc,GoalEvar) ty in + evdref := meta_assign mv (ev,(ConvUpToEta 0,TypeNotProcessed)) !evdref; + ev) + | _ -> + map_constr aux t in + let c = aux t in + (* side-effect *) + (!evdref, c) + +let try_to_coerce env evd c cty tycon = + let j = make_judge c cty in + let (evd',j') = inh_conv_coerce_rigid_to dummy_loc env evd j tycon in + let (evd',b) = Evarconv.consider_remaining_unif_problems env evd' in + if b then + let evd' = Evd.map_metas_fvalue (nf_evar (evars_of evd')) evd' in + (evd',j'.uj_val) + else + error "Cannot solve unification constraints" + +let w_coerce_to_type env evd c cty mvty = + let evd,mvty = pose_all_metas_as_evars env evd mvty in + let tycon = mk_tycon_type mvty in + try try_to_coerce env evd c cty tycon + with e when precatchable_exception e -> + (* inh_conv_coerce_rigid_to should have reasoned modulo reduction + but there are cases where it though it was not rigid (like in + fst (nat,nat)) and stops while it could have seen that it is rigid *) + let cty = Tacred.hnf_constr env (evars_of evd) cty in + try_to_coerce env evd c cty tycon + +let w_coerce env evd mv c = + let cty = get_type_of env (evars_of evd) c in + let mvty = Typing.meta_type evd mv in + w_coerce_to_type env evd c cty mvty + +let unify_to_type env evd flags c u = + let sigma = evars_of evd in + let c = refresh_universes c in + let t = get_type_of_with_meta env sigma (metas_of evd) c in + let t = Tacred.hnf_constr env sigma (nf_betaiota (nf_meta evd t)) in + let u = Tacred.hnf_constr env sigma u in + try unify_0 env sigma Cumul flags t u + with e when precatchable_exception e -> ([],[]) + +let unify_type env evd flags mv c = + let mvty = Typing.meta_type evd mv in + if occur_meta mvty then + unify_to_type env evd flags c mvty + else ([],[]) + +(* Move metas that may need coercion at the end of the list of instances *) + +let order_metas metas = + let rec order latemetas = function + | [] -> List.rev latemetas + | (_,_,(status,to_type) as meta)::metas -> + if to_type = CoerceToType then order (meta::latemetas) metas + else meta :: order latemetas metas + in order [] metas + +(* Solve an equation ?n[x1=u1..xn=un] = t where ?n is an evar *) + +let solve_simple_evar_eqn env evd ev rhs = + let evd,b = solve_simple_eqn Evarconv.evar_conv_x env evd (CONV,ev,rhs) in + if not b then error_cannot_unify env (evars_of evd) (mkEvar ev,rhs); + let (evd,b) = Evarconv.consider_remaining_unif_problems env evd in + if not b then error "Cannot solve unification constraints"; + evd + (* [w_merge env sigma b metas evars] merges common instances in metas or in evars, possibly generating new unification problems; if [b] is true, unification of types of metas is required *) -let w_merge env with_types mod_delta metas evars evd = - let ty_metas = ref [] in - let ty_evars = ref [] in - let rec w_merge_rec evd metas evars = - match (evars,metas) with - | ([], []) -> evd - - | ((lhs,rhs)::t, metas) -> - (match kind_of_term rhs with - - | Meta k -> w_merge_rec evd ((k,lhs)::metas) t - - | krhs -> - (match kind_of_term lhs with - - | Evar (evn,_ as ev) -> - if is_defined_evar evd ev then - let (metas',evars') = - unify_0 env (evars_of evd) CONV mod_delta rhs lhs in - w_merge_rec evd (metas'@metas) (evars'@t) - else begin - let rhs' = - if occur_meta rhs then subst_meta metas rhs else rhs - in - if occur_evar evn rhs' then - error "w_merge: recursive equation"; - match krhs with - | App (f,cl) when is_mimick_head f -> - (try - w_merge_rec (fst (evar_define env ev rhs' evd)) metas t - with ex when precatchable_exception ex -> - let evd' = - mimick_evar evd mod_delta f (Array.length cl) evn in - w_merge_rec evd' metas evars) - | _ -> - (* ensure tail recursion in non-mimickable case! *) - w_merge_rec (fst (evar_define env ev rhs' evd)) metas t - end - - | _ -> anomaly "w_merge_rec")) - - | ([], (mv,n)::t) -> - if meta_defined evd mv then - let (metas',evars') = - unify_0 env (evars_of evd) CONV mod_delta - (meta_fvalue evd mv).rebus n in - w_merge_rec evd (metas'@t) evars' - else - begin - if with_types (* or occur_meta mvty *) then - (let mvty = Typing.meta_type evd mv in - try - let sigma = evars_of evd in - (* why not typing with the metamap ? *) - let nty = Typing.type_of env sigma (nf_meta evd n) in - let (mc,ec) = unify_0 env sigma CUMUL mod_delta nty mvty in - ty_metas := mc @ !ty_metas; - ty_evars := ec @ !ty_evars - with e when precatchable_exception e -> ()); - let evd' = meta_assign mv n evd in - w_merge_rec evd' t [] - end - - and mimick_evar evd mod_delta hdc nargs sp = +let w_merge env with_types flags (metas,evars) evd = + let rec w_merge_rec evd metas evars eqns = + + (* Process evars *) + match evars with + | ((evn,_ as ev),rhs)::evars' -> + if is_defined_evar evd ev then + let v = Evd.existential_value (evars_of evd) ev in + let (metas',evars'') = + unify_0 env (evars_of evd) topconv flags rhs v in + w_merge_rec evd (metas'@metas) (evars''@evars') eqns + else begin + let rhs' = subst_meta_instances metas rhs in + match kind_of_term rhs with + | App (f,cl) when is_mimick_head f & occur_meta rhs' -> + if occur_evar evn rhs' then + error_occur_check env (evars_of evd) evn rhs'; + let evd' = mimick_evar evd flags f (Array.length cl) evn in + w_merge_rec evd' metas evars eqns + | _ -> + w_merge_rec (solve_simple_evar_eqn env evd ev rhs') + metas evars' eqns + end + | [] -> + + (* Process metas *) + match metas with + | (mv,c,(status,to_type))::metas -> + let ((evd,c),(metas'',evars'')),eqns = + if with_types & to_type <> TypeProcessed then + if to_type = CoerceToType then + (* Some coercion may have to be inserted *) + (w_coerce env evd mv c,([],[])),[] + else + (* No coercion needed: delay the unification of types *) + ((evd,c),([],[])),(mv,c)::eqns + else + ((evd,c),([],[])),eqns in + if meta_defined evd mv then + let {rebus=c'},(status',_) = meta_fvalue evd mv in + let (take_left,st,(metas',evars')) = + merge_instances env (evars_of evd) flags status' status c' c + in + let evd' = + if take_left then evd + else meta_reassign mv (c,(st,TypeProcessed)) evd + in + w_merge_rec evd' (metas'@metas@metas'') (evars'@evars'') eqns + else + let evd' = meta_assign mv (c,(status,TypeProcessed)) evd in + w_merge_rec evd' (metas@metas'') evars'' eqns + | [] -> + + (* Process type eqns *) + match eqns with + | (mv,c)::eqns -> + let (metas,evars) = unify_type env evd flags mv c in + w_merge_rec evd metas evars eqns + | [] -> evd + + and mimick_evar evd flags hdc nargs sp = let ev = Evd.find (evars_of evd) sp in let sp_env = Global.env_of_context ev.evar_hyps in let (evd', c) = applyHead sp_env evd nargs hdc in let (mc,ec) = - unify_0 sp_env (evars_of evd') CUMUL mod_delta + unify_0 sp_env (evars_of evd') Cumul flags (Retyping.get_type_of sp_env (evars_of evd') c) ev.evar_concl in - let evd'' = w_merge_rec evd' mc ec in + let evd'' = w_merge_rec evd' mc ec [] in if (evars_of evd') == (evars_of evd'') then Evd.evar_define sp c evd'' else Evd.evar_define sp (Evarutil.nf_evar (evars_of evd'') c) evd'' in (* merge constraints *) - let evd' = w_merge_rec evd metas evars in - if with_types then - (* merge constraints about types: if they fail, don't worry *) - try w_merge_rec evd' !ty_metas !ty_evars - with e when precatchable_exception e -> evd' - else - evd' + w_merge_rec evd (order_metas metas) evars [] + +let w_unify_meta_types env ?(flags=default_unify_flags) evd = + let metas,evd = retract_coercible_metas evd in + w_merge env true flags (metas,[]) evd (* [w_unify env evd M N] performs a unification of M and N, generating a bunch of @@ -317,9 +559,22 @@ let w_merge env with_types mod_delta metas evars evd = [clenv_typed_unify M N clenv] expects in addition that expected types of metavars are unifiable with the types of their instances *) -let w_unify_core_0 env with_types cv_pb mod_delta m n evd = - let (mc,ec) = unify_0 env (evars_of evd) cv_pb mod_delta m n in - w_merge env with_types mod_delta mc ec evd +let check_types env evd subst m n = + if isEvar (fst (whd_stack m)) or isEvar (fst (whd_stack n)) then + unify_0_with_initial_metas subst true env (evars_of evd) topconv + default_unify_flags + (Retyping.get_type_of_with_meta env (evars_of evd) (metas_of evd) m) + (Retyping.get_type_of_with_meta env (evars_of evd) (metas_of evd) n) + else + subst + +let w_unify_core_0 env with_types cv_pb flags m n evd = + let (mc1,evd') = retract_coercible_metas evd in + let subst1 = check_types env evd (mc1,[]) m n in + let subst2 = + unify_0_with_initial_metas subst1 true env (evars_of evd') cv_pb flags m n + in + w_merge env with_types flags subst2 evd' let w_unify_0 env = w_unify_core_0 env false let w_typed_unify env = w_unify_core_0 env true @@ -341,12 +596,12 @@ let iter_fail f a = (* Tries to find an instance of term [cl] in term [op]. Unifies [cl] to every subterm of [op] until it finds a match. Fails if no match is found *) -let w_unify_to_subterm env ?(mod_delta=true) (op,cl) evd = +let w_unify_to_subterm env ?(flags=default_unify_flags) (op,cl) evd = let rec matchrec cl = let cl = strip_outer_cast cl in (try if closed0 cl - then w_unify_0 env CONV mod_delta op cl evd,cl + then w_unify_0 env topconv flags op cl evd,cl else error "Bound 1" with ex when precatchable_exception ex -> (match kind_of_term cl with @@ -396,9 +651,9 @@ let w_unify_to_subterm env ?(mod_delta=true) (op,cl) evd = in try matchrec cl with ex when precatchable_exception ex -> - raise (PretypeError (env,NoOccurrenceFound op)) + raise (PretypeError (env,NoOccurrenceFound (op, None))) -let w_unify_to_subterm_list env mod_delta allow_K oplist t evd = +let w_unify_to_subterm_list env flags allow_K oplist t evd = List.fold_right (fun op (evd,l) -> if isMeta op then @@ -408,7 +663,7 @@ let w_unify_to_subterm_list env mod_delta allow_K oplist t evd = let (evd',cl) = try (* This is up to delta for subterms w/o metas ... *) - w_unify_to_subterm env ~mod_delta (strip_outer_cast op,t) evd + w_unify_to_subterm env ~flags (strip_outer_cast op,t) evd with PretypeError (env,NoOccurrenceFound _) when allow_K -> (evd,op) in (evd',cl::l) @@ -416,37 +671,37 @@ let w_unify_to_subterm_list env mod_delta allow_K oplist t evd = (evd,op::l) else (* This is not up to delta ... *) - raise (PretypeError (env,NoOccurrenceFound op))) + raise (PretypeError (env,NoOccurrenceFound (op, None)))) oplist (evd,[]) -let secondOrderAbstraction env mod_delta allow_K typ (p, oplist) evd = - let sigma = evars_of evd in +let secondOrderAbstraction env flags allow_K typ (p, oplist) evd = + (* Remove delta when looking for a subterm *) + let flags = { flags with modulo_delta = (fst flags.modulo_delta, Cpred.empty) } in let (evd',cllist) = - w_unify_to_subterm_list env mod_delta allow_K oplist typ evd in + w_unify_to_subterm_list env flags allow_K oplist typ evd in let typp = Typing.meta_type evd' p in - let pred = abstract_list_all env sigma typp typ cllist in - w_unify_0 env CONV mod_delta (mkMeta p) pred evd' + let pred = abstract_list_all env evd' typp typ cllist in + w_merge env false flags ([p,pred,(ConvUpToEta 0,TypeProcessed)],[]) evd' -let w_unify2 env mod_delta allow_K cv_pb ty1 ty2 evd = +let w_unify2 env flags allow_K cv_pb ty1 ty2 evd = let c1, oplist1 = whd_stack ty1 in let c2, oplist2 = whd_stack ty2 in match kind_of_term c1, kind_of_term c2 with | Meta p1, _ -> (* Find the predicate *) let evd' = - secondOrderAbstraction env mod_delta allow_K ty2 (p1,oplist1) evd in + secondOrderAbstraction env flags allow_K ty2 (p1,oplist1) evd in (* Resume first order unification *) - w_unify_0 env cv_pb mod_delta (nf_meta evd' ty1) ty2 evd' + w_unify_0 env cv_pb flags (nf_meta evd' ty1) ty2 evd' | _, Meta p2 -> (* Find the predicate *) let evd' = - secondOrderAbstraction env mod_delta allow_K ty1 (p2, oplist2) evd in + secondOrderAbstraction env flags allow_K ty1 (p2, oplist2) evd in (* Resume first order unification *) - w_unify_0 env cv_pb mod_delta ty1 (nf_meta evd' ty2) evd' + w_unify_0 env cv_pb flags ty1 (nf_meta evd' ty2) evd' | _ -> error "w_unify2" - (* The unique unification algorithm works like this: If the pattern is flexible, and the goal has a lambda-abstraction at the head, then we do a first-order unification. @@ -467,7 +722,8 @@ let w_unify2 env mod_delta allow_K cv_pb ty1 ty2 evd = Before, second-order was used if the type of Meta(1) and [x:A]t was convertible and first-order otherwise. But if failed if e.g. the type of Meta(1) had meta-variables in it. *) -let w_unify allow_K env cv_pb ?(mod_delta=true) ty1 ty2 evd = +let w_unify allow_K env cv_pb ?(flags=default_unify_flags) ty1 ty2 evd = + let cv_pb = of_conv_pb cv_pb in let hd1,l1 = whd_stack ty1 in let hd2,l2 = whd_stack ty2 in match kind_of_term hd1, l1<>[], kind_of_term hd2, l2<>[] with @@ -475,25 +731,22 @@ let w_unify allow_K env cv_pb ?(mod_delta=true) ty1 ty2 evd = | (Meta _, true, Lambda _, _ | Lambda _, _, Meta _, true) when List.length l1 = List.length l2 -> (try - w_typed_unify env cv_pb mod_delta ty1 ty2 evd + w_typed_unify env cv_pb flags ty1 ty2 evd with ex when precatchable_exception ex -> try - w_unify2 env mod_delta allow_K cv_pb ty1 ty2 evd - with PretypeError (env,NoOccurrenceFound c) as e -> raise e - | ex when precatchable_exception ex -> - error "Cannot solve a second-order unification problem") + w_unify2 env flags allow_K cv_pb ty1 ty2 evd + with PretypeError (env,NoOccurrenceFound _) as e -> raise e) (* Second order case *) | (Meta _, true, _, _ | _, _, Meta _, true) -> (try - w_unify2 env mod_delta allow_K cv_pb ty1 ty2 evd - with PretypeError (env,NoOccurrenceFound c) as e -> raise e + w_unify2 env flags allow_K cv_pb ty1 ty2 evd + with PretypeError (env,NoOccurrenceFound _) as e -> raise e | ex when precatchable_exception ex -> try - w_typed_unify env cv_pb mod_delta ty1 ty2 evd - with ex when precatchable_exception ex -> - error "Cannot solve a second-order unification problem") + w_typed_unify env cv_pb flags ty1 ty2 evd + with ex' when precatchable_exception ex' -> + raise ex) (* General case: try first order *) - | _ -> w_unify_0 env cv_pb mod_delta ty1 ty2 evd - + | _ -> w_typed_unify env cv_pb flags ty1 ty2 evd diff --git a/pretyping/unification.mli b/pretyping/unification.mli index 6be530be..89280631 100644 --- a/pretyping/unification.mli +++ b/pretyping/unification.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: unification.mli 6142 2004-09-27 19:33:01Z sacerdot $ i*) +(*i $Id: unification.mli 10856 2008-04-27 16:15:34Z herbelin $ i*) (*i*) open Term @@ -14,20 +14,36 @@ open Environ open Evd (*i*) +type unify_flags = { + modulo_conv_on_closed_terms : Names.transparent_state option; + use_metas_eagerly : bool; + modulo_delta : Names.transparent_state; +} + +val default_unify_flags : unify_flags +val default_no_delta_unify_flags : unify_flags + (* The "unique" unification fonction *) val w_unify : - bool -> env -> conv_pb -> ?mod_delta:bool -> constr -> constr -> evar_defs -> evar_defs + bool -> env -> conv_pb -> ?flags:unify_flags -> constr -> constr -> evar_defs -> evar_defs (* [w_unify_to_subterm env (c,t) m] performs unification of [c] with a subterm of [t]. Constraints are added to [m] and the matched subterm of [t] is also returned. *) val w_unify_to_subterm : - env -> ?mod_delta:bool -> constr * constr -> evar_defs -> evar_defs * constr + env -> ?flags:unify_flags -> constr * constr -> evar_defs -> evar_defs * constr + +val w_unify_meta_types : env -> ?flags:unify_flags -> evar_defs -> evar_defs + +(* [w_coerce_to_type env evd c ctyp typ] tries to coerce [c] of type + [ctyp] so that its gets type [typ]; [typ] may contain metavariables *) +val w_coerce_to_type : env -> evar_defs -> constr -> types -> types -> + evar_defs * constr (*i This should be in another module i*) -(* [abstract_list_all env sigma t c l] *) +(* [abstract_list_all env evd t c l] *) (* abstracts the terms in l over c to get a term of type t *) (* (exported for inv.ml) *) val abstract_list_all : - env -> evar_map -> constr -> constr -> constr list -> constr + env -> evar_defs -> constr -> constr -> constr list -> constr diff --git a/pretyping/vnorm.ml b/pretyping/vnorm.ml index 46d67406..465c062b 100644 --- a/pretyping/vnorm.ml +++ b/pretyping/vnorm.ml @@ -1,3 +1,13 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* + let mib,mip = lookup_mind_specif env ind in + let nparams = mib.mind_nparams in + let i = invert_tag const tag mip.mind_reloc_tbl in + let params = Array.sub allargs 0 nparams in + let ctyp = type_constructor mind mib (mip.mind_nf_lc.(i-1)) params in + (mkApp(mkConstruct(ind,i), params), ctyp) let construct_of_constr_const env tag typ = fst (construct_of_constr true env tag typ) @@ -196,7 +220,8 @@ and nf_predicate env ind mip params v pT = let name = Name (id_of_string "c") in let n = mip.mind_nrealargs in let rargs = Array.init n (fun i -> mkRel (n-i)) in - let dom = mkApp(mkApp(mkInd ind,params),rargs) in + let params = if n=0 then params else Array.map (lift n) params in + let dom = mkApp(mkInd ind,Array.append params rargs) in let body = nf_vtype (push_rel (name,None,dom) env) vb in true, mkLambda(name,dom,body) | _, _ -> false, nf_val env v crazy_type diff --git a/proofs/clenvtac.ml b/proofs/clenvtac.ml index 71538614..92794ac3 100644 --- a/proofs/clenvtac.ml +++ b/proofs/clenvtac.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: clenvtac.ml 8023 2006-02-10 18:34:51Z coq $ *) +(* $Id: clenvtac.ml 11166 2008-06-22 13:23:35Z herbelin $ *) open Pp open Util @@ -49,7 +49,7 @@ let clenv_cast_meta clenv = match kind_of_term (strip_outer_cast u) with | Meta mv -> (try - let b = Typing.meta_type clenv.env mv in + let b = Typing.meta_type clenv.evd mv in if occur_meta b then u else mkCast (mkMeta mv, DEFAULTcast, b) with Not_found -> u) @@ -60,25 +60,35 @@ let clenv_cast_meta clenv = in crec -let clenv_refine clenv gls = +let clenv_value_cast_meta clenv = + clenv_cast_meta clenv (clenv_value clenv) + +let clenv_pose_dependent_evars with_evars clenv = + let dep_mvs = clenv_dependent false clenv in + if dep_mvs <> [] & not with_evars then + raise + (RefinerError (UnresolvedBindings (List.map (meta_name clenv.evd) dep_mvs))); + clenv_pose_metas_as_evars clenv dep_mvs + + +let clenv_refine with_evars clenv gls = + let clenv = clenv_pose_dependent_evars with_evars clenv in tclTHEN - (tclEVARS (evars_of clenv.env)) + (tclEVARS (evars_of clenv.evd)) (refine (clenv_cast_meta clenv (clenv_value clenv))) gls +let dft = Unification.default_unify_flags -let res_pf clenv ?(allow_K=false) gls = - clenv_refine (clenv_unique_resolver allow_K clenv gls) gls +let res_pf clenv ?(with_evars=false) ?(allow_K=false) ?(flags=dft) gls = + clenv_refine with_evars + (clenv_unique_resolver allow_K ~flags:flags clenv gls) gls -let elim_res_pf_THEN_i clenv tac gls = +let elim_res_pf_THEN_i clenv tac gls = let clenv' = (clenv_unique_resolver true clenv gls) in - tclTHENLASTn (clenv_refine clenv') (tac clenv') gls - - -let e_res_pf clenv gls = - clenv_refine (evar_clenv_unique_resolver clenv gls) gls - + tclTHENLASTn (clenv_refine false clenv') (tac clenv') gls +let e_res_pf clenv = res_pf clenv ~with_evars:true ~allow_K:false ~flags:dft (* [unifyTerms] et [unify] ne semble pas gérer les Meta, en @@ -86,11 +96,19 @@ let e_res_pf clenv gls = d'une même Meta sont compatibles. D'ailleurs le "fst" jette les metas provenant de w_Unify. (Utilisé seulement dans prolog.ml) *) +open Unification + +let fail_quick_unif_flags = { + modulo_conv_on_closed_terms = Some full_transparent_state; + use_metas_eagerly = false; + modulo_delta = empty_transparent_state; +} + (* let unifyTerms m n = walking (fun wc -> fst (w_Unify CONV m n [] wc)) *) let unifyTerms m n gls = let env = pf_env gls in - let evd = create_evar_defs (project gls) in - let evd' = Unification.w_unify false env CONV m n evd in + let evd = create_goal_evar_defs (project gls) in + let evd' = w_unify false env CONV ~flags:fail_quick_unif_flags m n evd in tclIDTAC {it = gls.it; sigma = evars_of evd'} let unify m gls = diff --git a/proofs/clenvtac.mli b/proofs/clenvtac.mli index 505826fa..29442ded 100644 --- a/proofs/clenvtac.mli +++ b/proofs/clenvtac.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: clenvtac.mli 6099 2004-09-12 11:38:09Z barras $ i*) +(*i $Id: clenvtac.mli 11166 2008-06-22 13:23:35Z herbelin $ i*) (*i*) open Util @@ -16,11 +16,18 @@ open Sign open Evd open Clenv open Proof_type +open Tacexpr +open Unification (*i*) (* Tactics *) val unify : constr -> tactic -val clenv_refine : clausenv -> tactic -val res_pf : clausenv -> ?allow_K:bool -> tactic -val e_res_pf : clausenv -> tactic +val clenv_refine : evars_flag -> clausenv -> tactic +val res_pf : clausenv -> ?with_evars:evars_flag -> ?allow_K:bool -> ?flags:unify_flags -> tactic val elim_res_pf_THEN_i : clausenv -> (clausenv -> tactic array) -> tactic + +val clenv_pose_dependent_evars : evars_flag -> clausenv -> clausenv +val clenv_value_cast_meta : clausenv -> constr + +(* Compatibility, use res_pf ?with_evars:true instead *) +val e_res_pf : clausenv -> tactic diff --git a/proofs/decl_expr.mli b/proofs/decl_expr.mli index a8b7c0d6..22752eda 100644 --- a/proofs/decl_expr.mli +++ b/proofs/decl_expr.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id$ *) +(* $Id: decl_expr.mli 10739 2008-04-01 14:45:20Z herbelin $ *) open Names open Util @@ -18,7 +18,6 @@ type 'it statement = type thesis_kind = Plain - | Sub of int | For of identifier type 'this or_thesis = diff --git a/proofs/decl_mode.ml b/proofs/decl_mode.ml index 8d8fb745..f8fc4e87 100644 --- a/proofs/decl_mode.ml +++ b/proofs/decl_mode.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id$ *) +(*i $Id: decl_mode.ml 10739 2008-04-01 14:45:20Z herbelin $ i*) open Names open Term @@ -41,16 +41,19 @@ let check_not_proof_mode str = error str type split_tree= - Push of (Idset.t * split_tree) - | Split of (Idset.t * inductive * (Idset.t * split_tree) option array) - | Pop of split_tree - | End_of_branch of (identifier * int) + Skip_patt of Idset.t * split_tree + | Split_patt of Idset.t * inductive * + (bool array * (Idset.t * split_tree) option) array + | Close_patt of split_tree + | End_patt of (identifier * int) type elim_kind = EK_dep of split_tree | EK_nodep | EK_unknown +type recpath = int option*Declarations.wf_paths + type per_info = {per_casee:constr; per_ctype:types; @@ -58,7 +61,8 @@ type per_info = per_pred:constr; per_args:constr list; per_params:constr list; - per_nparams:int} + per_nparams:int; + per_wf:recpath} type stack_info = Per of Decl_expr.elim_type * per_info * elim_kind * identifier list @@ -67,10 +71,7 @@ type stack_info = | Focus_claim type pm_info = - { pm_last: (Names.identifier * bool) option (* anonymous if none *); - pm_partial_goal : constr; (* partial goal construction *) - pm_subgoals : (metavariable*constr) list; - pm_stack : stack_info list} + { pm_stack : stack_info list} let pm_in,pm_out = Dyn.create "pm_info" @@ -118,3 +119,8 @@ let get_end_command pts = end | Mode_none -> error "no proof in progress" + +let get_last env = + try + let (id,_,_) = List.hd (Environ.named_context env) in id + with Invalid_argument _ -> error "no previous statement to use" diff --git a/proofs/decl_mode.mli b/proofs/decl_mode.mli index 81fab168..77bee313 100644 --- a/proofs/decl_mode.mli +++ b/proofs/decl_mode.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id$ *) +(* $Id: decl_mode.mli 10739 2008-04-01 14:45:20Z herbelin $ *) open Names open Term @@ -29,16 +29,18 @@ val get_current_mode : unit -> command_mode val check_not_proof_mode : string -> unit type split_tree= - Push of (Idset.t * split_tree) - | Split of (Idset.t * inductive * (Idset.t*split_tree) option array) - | Pop of split_tree - | End_of_branch of (identifier * int) + Skip_patt of Idset.t * split_tree + | Split_patt of Idset.t * inductive * + (bool array * (Idset.t * split_tree) option) array + | Close_patt of split_tree + | End_patt of (identifier * int) type elim_kind = EK_dep of split_tree | EK_nodep | EK_unknown +type recpath = int option*Declarations.wf_paths type per_info = {per_casee:constr; @@ -47,7 +49,8 @@ type per_info = per_pred:constr; per_args:constr list; per_params:constr list; - per_nparams:int} + per_nparams:int; + per_wf:recpath} type stack_info = Per of Decl_expr.elim_type * per_info * elim_kind * Names.identifier list @@ -56,10 +59,7 @@ type stack_info = | Focus_claim type pm_info = - { pm_last: (Names.identifier * bool) option (* anonymous if none *); - pm_partial_goal : constr ; (* partial goal construction *) - pm_subgoals : (metavariable*constr) list; - pm_stack : stack_info list } + {pm_stack : stack_info list } val pm_in : pm_info -> Dyn.t @@ -70,3 +70,5 @@ val get_end_command : pftreestate -> string option val get_stack : pftreestate -> stack_info list val get_top_stack : pftreestate -> stack_info list + +val get_last: Environ.env -> identifier diff --git a/proofs/evar_refiner.ml b/proofs/evar_refiner.ml index 132fa2b9..99ab7ef1 100644 --- a/proofs/evar_refiner.ml +++ b/proofs/evar_refiner.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: evar_refiner.ml 9583 2007-02-01 19:35:03Z notin $ *) +(* $Id: evar_refiner.ml 11047 2008-06-03 23:08:00Z msozeau $ *) open Util open Names @@ -28,8 +28,8 @@ let w_refine ev rawc evd = let e_info = Evd.find (evars_of evd) ev in let env = Evd.evar_env e_info in let sigma,typed_c = - try Pretyping.Default.understand_tcc (evars_of evd) env - ~expected_type:e_info.evar_concl rawc + try Pretyping.Default.understand_tcc ~resolve_classes:false + (evars_of evd) env ~expected_type:e_info.evar_concl rawc with _ -> error ("The term is not well-typed in the environment of " ^ string_of_existential ev) in @@ -41,12 +41,16 @@ let instantiate_pf_com n com pfts = let gls = top_goal_of_pftreestate pfts in let sigma = gls.sigma in let (sp,evi) (* as evc *) = - try - List.nth (Evarutil.non_instantiated sigma) (n-1) - with Failure _ -> - error "not so many uninstantiated existential variables" in + let evl = Evarutil.non_instantiated sigma in + if (n <= 0) then + error "incorrect existential variable index" + else if List.length evl < n then + error "not so many uninstantiated existential variables" + else + List.nth evl (n-1) + in let env = Evd.evar_env evi in let rawc = Constrintern.intern_constr sigma env com in - let evd = create_evar_defs sigma in + let evd = create_goal_evar_defs sigma in let evd' = w_refine sp rawc evd in - change_constraints_pftreestate (evars_of evd') pfts + change_constraints_pftreestate (evars_of evd') pfts diff --git a/proofs/logic.ml b/proofs/logic.ml index 0846997e..6e78f134 100644 --- a/proofs/logic.ml +++ b/proofs/logic.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: logic.ml 9805 2007-04-28 21:28:37Z herbelin $ *) +(* $Id: logic.ml 10877 2008-04-30 21:58:41Z herbelin $ *) open Pp open Util @@ -32,8 +32,7 @@ type refiner_error = (* Errors raised by the refiner *) | BadType of constr * constr * constr - | OccurMeta of constr - | OccurMetaGoal of constr + | UnresolvedBindings of name list | CannotApply of constr * constr | NotWellTyped of constr | NonLinearProof of constr @@ -52,14 +51,15 @@ let rec catchable_exception = function | RefinerError _ | Indrec.RecursionSchemeError _ | Nametab.GlobalizationError _ | PretypeError (_,VarNotFound _) (* unification errors *) - | PretypeError(_,(CannotUnify _|CannotGeneralize _|NoOccurrenceFound _| - CannotUnifyBindingType _|NotClean _)) -> true + | PretypeError(_,(CannotUnify _|CannotUnifyLocal _|CannotGeneralize _ + |NoOccurrenceFound _|CannotUnifyBindingType _|NotClean _ + |CannotFindWellTypedAbstraction _)) -> true | _ -> false (* Tells if the refiner should check that the submitted rules do not produce invalid subgoals *) let check = ref false -let with_check = Options.with_option check +let with_check = Flags.with_option check (************************************************************************) (************************************************************************) @@ -69,10 +69,12 @@ let with_check = Options.with_option check (* The Clear tactic: it scans the context for hypotheses to be removed (instead of iterating on the list of identifier to be removed, which forces the user to give them in order). *) + let clear_hyps sigma ids gl = - let evd = ref (Evd.create_evar_defs sigma) in - let ngl = Evarutil.clear_hyps_in_evi evd gl ids in - (ngl, evars_of !evd) + let evdref = ref (Evd.create_goal_evar_defs sigma) in + let (hyps,concl) = + Evarutil.clear_hyps_in_evi evdref gl.evar_hyps gl.evar_concl ids in + (mk_goal hyps concl gl.evar_extra, evars_of !evdref) (* The ClearBody tactic *) @@ -264,8 +266,8 @@ let rec mk_refgoals sigma goal goalacc conclty trm = *) match kind_of_term trm with | Meta _ -> - if occur_meta conclty then - raise (RefinerError (OccurMetaGoal conclty)); + if !check && occur_meta conclty then + anomaly "refined called with a dependent meta"; (mk_goal hyps (nf_betaiota conclty))::goalacc, conclty | Cast (t,_, ty) -> @@ -276,8 +278,10 @@ let rec mk_refgoals sigma goal goalacc conclty trm = | App (f,l) -> let (acc',hdty) = match kind_of_term f with - | (Ind _ (* needed if defs in Type are polymorphic: | Const _*)) - when not (array_exists occur_meta l) (* we could be finer *) -> + | Ind _ | Const _ + when not (array_exists occur_meta l) (* we could be finer *) + & (isInd f or has_polymorphic_type (destConst f)) + -> (* Sort-polymorphism of definition and inductive types *) goalacc, type_of_global_reference_knowing_parameters env sigma f l @@ -300,7 +304,8 @@ let rec mk_refgoals sigma goal goalacc conclty trm = (acc'',conclty') | _ -> - if occur_meta trm then raise (RefinerError (OccurMeta trm)); + if occur_meta trm then + anomaly "refiner called with a meta in non app/case subterm"; let t'ty = goal_type_of env sigma trm in check_conv_leq_goal env sigma trm t'ty conclty; (goalacc,t'ty) @@ -340,7 +345,10 @@ and mk_hdgoals sigma goal goalacc trm = in (acc'',conclty') - | _ -> goalacc, goal_type_of env sigma trm + | _ -> + if !check && occur_meta trm then + anomaly "refined called with a dependent meta"; + goalacc, goal_type_of env sigma trm and mk_arggoals sigma goal goalacc funty = function | [] -> goalacc,funty @@ -378,7 +386,7 @@ let convert_hyp sign sigma (id,b,bt as d) = let env = Global.env_of_context sign in if !check && not (is_conv env sigma bt ct) then error ("Incorrect change of the type of "^(string_of_id id)); - if !check && not (option_compare (is_conv env sigma) b c) then + if !check && not (Option.Misc.compare (is_conv env sigma) b c) then error ("Incorrect change of the body of "^(string_of_id id)); d) diff --git a/proofs/logic.mli b/proofs/logic.mli index 2b6c6b4a..def02c8c 100644 --- a/proofs/logic.mli +++ b/proofs/logic.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: logic.mli 9573 2007-01-31 20:18:18Z notin $ i*) +(*i $Id: logic.mli 10785 2008-04-13 21:41:54Z herbelin $ i*) (*i*) open Names @@ -50,8 +50,7 @@ type refiner_error = (*i Errors raised by the refiner i*) | BadType of constr * constr * constr - | OccurMeta of constr - | OccurMetaGoal of constr + | UnresolvedBindings of name list | CannotApply of constr * constr | NotWellTyped of constr | NonLinearProof of constr diff --git a/proofs/pfedit.ml b/proofs/pfedit.ml index 565c9547..6d8f09ea 100644 --- a/proofs/pfedit.ml +++ b/proofs/pfedit.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: pfedit.ml 9154 2006-09-20 17:18:18Z corbinea $ *) +(* $Id: pfedit.ml 10850 2008-04-25 18:07:44Z herbelin $ *) open Pp open Util @@ -33,6 +33,7 @@ open Safe_typing type proof_topstate = { mutable top_end_tac : tactic option; + top_init_tac : tactic option; top_goal : goal; top_strength : Decl_kinds.goal_kind; top_hook : declaration_hook } @@ -118,8 +119,6 @@ let delete_proof (loc,id) = user_err_loc (loc,"Pfedit.delete_proof",str"No such proof" ++ msg_proofs false) -let init_proofs () = Edit.clear proof_edits - let mutate f = try Edit.mutate proof_edits (fun _ pfs -> f pfs) @@ -128,7 +127,8 @@ let mutate f = (str"No focused proof" ++ msg_proofs true) let start (na,ts) = - let pfs = mk_pftreestate ts.top_goal in + let pfs = mk_pftreestate ts.top_goal in + let pfs = Option.fold_right solve_pftreestate ts.top_init_tac pfs in add_proof(na,pfs,ts) let restart_proof () = @@ -204,13 +204,14 @@ let current_proof_depth() = let xml_cook_proof = ref (fun _ -> ()) let set_xml_cook_proof f = xml_cook_proof := f -let cook_proof () = +let cook_proof k = let (pfs,ts) = get_state() and ident = get_current_proof_name () in let {evar_concl=concl} = ts.top_goal and strength = ts.top_strength in let pfterm = extract_pftreestate pfs in !xml_cook_proof (strength,pfs); + k pfs; (ident, ({ const_entry_body = pfterm; const_entry_type = Some concl; @@ -237,7 +238,7 @@ let check_no_pending_proofs () = let delete_current_proof () = delete_proof_gen (get_current_proof_name ()) -let delete_all_proofs = init_proofs +let delete_all_proofs () = Edit.clear proof_edits (*********************************************************************) (* Modifying the end tactic of the current profftree *) @@ -250,10 +251,11 @@ let set_end_tac tac = (* Modifying the current prooftree *) (*********************************************************************) -let start_proof na str sign concl hook = +let start_proof na str sign concl ?init_tac hook = let top_goal = mk_goal sign concl None in let ts = { top_end_tac = None; + top_init_tac = init_tac; top_goal = top_goal; top_strength = str; top_hook = hook} diff --git a/proofs/pfedit.mli b/proofs/pfedit.mli index 8c0c7f55..42c24081 100644 --- a/proofs/pfedit.mli +++ b/proofs/pfedit.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: pfedit.mli 9154 2006-09-20 17:18:18Z corbinea $ i*) +(*i $Id: pfedit.mli 10850 2008-04-25 18:07:44Z herbelin $ i*) (*i*) open Util @@ -71,13 +71,16 @@ val current_proof_depth: unit -> int val set_undo : int option -> unit val get_undo : unit -> int option -(*s [start_proof s str env t hook] starts a proof of name [s] and conclusion - [t]; [hook] is optionally a function to be applied at proof end (e.g. to - declare the built constructions as a coercion or a setoid morphism) *) +(*s [start_proof s str env t hook tac] starts a proof of name [s] and + conclusion [t]; [hook] is optionally a function to be applied at + proof end (e.g. to declare the built constructions as a coercion + or a setoid morphism); init_tac is possibly a tactic to + systematically apply at initialization time (e.g. to start the + proof of mutually dependent theorems) *) val start_proof : - identifier -> goal_kind -> named_context_val -> constr - -> declaration_hook -> unit + identifier -> goal_kind -> named_context_val -> constr -> + ?init_tac:tactic -> declaration_hook -> unit (* [restart_proof ()] restarts the current focused proof from the beginning or fails if no proof is focused *) @@ -103,7 +106,7 @@ val suspend_proof : unit -> unit a constant with its name, kind and possible hook (see [start_proof]); it fails if there is no current proof of if it is not completed *) -val cook_proof : unit -> +val cook_proof : (Refiner.pftreestate -> unit) -> identifier * (Entries.definition_entry * goal_kind * declaration_hook) (* To export completed proofs to xml *) diff --git a/proofs/proof_trees.ml b/proofs/proof_trees.ml index 9d70d012..99a1e506 100644 --- a/proofs/proof_trees.ml +++ b/proofs/proof_trees.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: proof_trees.ml 9154 2006-09-20 17:18:18Z corbinea $ *) +(* $Id: proof_trees.ml 10124 2007-09-17 18:40:21Z herbelin $ *) open Closure open Util @@ -35,6 +35,7 @@ let is_bind = function let mk_goal hyps cl extra = { evar_hyps = hyps; evar_concl = cl; + evar_filter = List.map (fun _ -> true) (named_context_of_val hyps); evar_body = Evar_empty; evar_extra = extra } (* Functions on proof trees *) diff --git a/proofs/proof_type.ml b/proofs/proof_type.ml index 6f8b0686..dbe40780 100644 --- a/proofs/proof_type.ml +++ b/proofs/proof_type.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: proof_type.ml 9573 2007-01-31 20:18:18Z notin $ *) +(*i $Id: proof_type.ml 9842 2007-05-20 17:44:23Z herbelin $ *) (*i*) open Environ @@ -63,7 +63,7 @@ and tactic = goal sigma -> (goal list sigma * validation) and validation = (proof_tree list -> proof_tree) and tactic_expr = - (constr, + (open_constr, constr_pattern, evaluable_global_reference, inductive, @@ -73,7 +73,7 @@ and tactic_expr = Tacexpr.gen_tactic_expr and atomic_tactic_expr = - (constr, + (open_constr, constr_pattern, evaluable_global_reference, inductive, @@ -83,7 +83,7 @@ and atomic_tactic_expr = Tacexpr.gen_atomic_tactic_expr and tactic_arg = - (constr, + (open_constr, constr_pattern, evaluable_global_reference, inductive, diff --git a/proofs/proof_type.mli b/proofs/proof_type.mli index 26d9eb2e..4fbcda4c 100644 --- a/proofs/proof_type.mli +++ b/proofs/proof_type.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: proof_type.mli 9573 2007-01-31 20:18:18Z notin $ i*) +(*i $Id: proof_type.mli 9842 2007-05-20 17:44:23Z herbelin $ i*) (*i*) open Environ @@ -98,7 +98,7 @@ and tactic = goal sigma -> (goal list sigma * validation) and validation = (proof_tree list -> proof_tree) and tactic_expr = - (constr, + (open_constr, constr_pattern, evaluable_global_reference, inductive, @@ -108,7 +108,7 @@ and tactic_expr = Tacexpr.gen_tactic_expr and atomic_tactic_expr = - (constr, + (open_constr, constr_pattern, evaluable_global_reference, inductive, @@ -118,7 +118,7 @@ and atomic_tactic_expr = Tacexpr.gen_atomic_tactic_expr and tactic_arg = - (constr, + (open_constr, constr_pattern, evaluable_global_reference, inductive, diff --git a/proofs/redexpr.ml b/proofs/redexpr.ml index ad277caa..072a38b6 100644 --- a/proofs/redexpr.ml +++ b/proofs/redexpr.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: redexpr.ml 9058 2006-07-22 17:42:45Z bgregoir $ *) +(* $Id: redexpr.ml 11094 2008-06-10 19:35:23Z herbelin $ *) open Pp open Util @@ -19,7 +19,7 @@ open Reductionops open Tacred open Closure open RedFlags - +open Libobject (* call by value normalisation function using the virtual machine *) let cbv_vm env _ c = @@ -27,22 +27,79 @@ let cbv_vm env _ c = Vnorm.cbv_vm env c ctyp -let set_opaque_const sp = - Conv_oracle.set_opaque_const sp; - Csymtable.set_opaque_const sp - -let set_transparent_const sp = - let cb = Global.lookup_constant sp in - if cb.const_body <> None & cb.const_opaque then - errorlabstrm "set_transparent_const" - (str "Cannot make" ++ spc () ++ - Nametab.pr_global_env Idset.empty (ConstRef sp) ++ - spc () ++ str "transparent because it was declared opaque."); - Conv_oracle.set_transparent_const sp; - Csymtable.set_transparent_const sp - -let set_opaque_var = Conv_oracle.set_opaque_var -let set_transparent_var = Conv_oracle.set_transparent_var +let set_strategy_one ref l = + let k = + match ref with + | EvalConstRef sp -> ConstKey sp + | EvalVarRef id -> VarKey id in + Conv_oracle.set_strategy k l; + match k,l with + ConstKey sp, Conv_oracle.Opaque -> + Csymtable.set_opaque_const sp + | ConstKey sp, _ -> + let cb = Global.lookup_constant sp in + if cb.const_body <> None & cb.const_opaque then + errorlabstrm "set_transparent_const" + (str "Cannot make" ++ spc () ++ + Nametab.pr_global_env Idset.empty (ConstRef sp) ++ + spc () ++ str "transparent because it was declared opaque."); + Csymtable.set_transparent_const sp + | _ -> () + +let cache_strategy str = + List.iter + (fun (lev,ql) -> List.iter (fun q -> set_strategy_one q lev) ql) + str + +let subst_strategy (_,subs,obj) = + list_smartmap + (fun (k,ql as entry) -> + let ql' = list_smartmap (Mod_subst.subst_evaluable_reference subs) ql in + if ql==ql' then entry else (k,ql')) + obj + + +let map_strategy f l = + let l' = List.fold_right + (fun (lev,ql) str -> + let ql' = List.fold_right + (fun q ql -> + match f q with + Some q' -> q' :: ql + | None -> ql) ql [] in + if ql'=[] then str else (lev,ql')::str) l [] in + if l'=[] then None else Some l' + +let export_strategy obj = + map_strategy (function + EvalVarRef _ -> None + | EvalConstRef _ as q -> Some q) obj + +let classify_strategy (_,obj) = Substitute obj + +let disch_ref ref = + match ref with + EvalConstRef c -> + let c' = Lib.discharge_con c in + if c==c' then Some ref else Some (EvalConstRef c') + | _ -> Some ref + +let discharge_strategy (_,obj) = + map_strategy disch_ref obj + +let (inStrategy,outStrategy) = + declare_object {(default_object "STRATEGY") with + cache_function = (fun (_,obj) -> cache_strategy obj); + load_function = (fun _ (_,obj) -> cache_strategy obj); + subst_function = subst_strategy; + discharge_function = discharge_strategy; + classify_function = classify_strategy; + export_function = export_strategy } + + +let set_strategy local str = + if local then cache_strategy str + else Lib.add_anonymous_leaf (inStrategy str) let _ = Summary.declare_summary "Transparent constants and variables" @@ -70,7 +127,7 @@ let make_flag f = let red = if f.rDelta then (* All but rConst *) let red = red_add red fDELTA in - let red = red_add_transparent red (Conv_oracle.freeze ()) in + let red = red_add_transparent red (Conv_oracle.get_transp_state()) in List.fold_right (fun v red -> red_sub red (make_flag_constant v)) f.rConst red @@ -97,8 +154,8 @@ let out_arg = function | ArgVar _ -> anomaly "Unevaluated or_var variable" | ArgArg x -> x -let out_with_occurrences (l,c) = - (List.map out_arg l, c) +let out_with_occurrences ((b,l),c) = + ((b,List.map out_arg l), c) let reduction_of_red_expr = function | Red internal -> @@ -106,8 +163,8 @@ let reduction_of_red_expr = function else (red_product,DEFAULTcast) | Hnf -> (hnf_constr,DEFAULTcast) | Simpl (Some (_,c as lp)) -> - (contextually (is_reference c) (out_with_occurrences lp) nf,DEFAULTcast) - | Simpl None -> (nf,DEFAULTcast) + (contextually (is_reference c) (out_with_occurrences lp) simpl,DEFAULTcast) + | Simpl None -> (simpl,DEFAULTcast) | Cbv f -> (cbv_norm_flags (make_flag f),DEFAULTcast) | Lazy f -> (clos_norm_flags (make_flag f),DEFAULTcast) | Unfold ubinds -> (unfoldn (List.map out_with_occurrences ubinds),DEFAULTcast) diff --git a/proofs/redexpr.mli b/proofs/redexpr.mli index cbac180a..d72ff182 100644 --- a/proofs/redexpr.mli +++ b/proofs/redexpr.mli @@ -6,18 +6,19 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: redexpr.mli 8878 2006-05-30 16:44:25Z herbelin $ i*) +(*i $Id: redexpr.mli 11094 2008-06-10 19:35:23Z herbelin $ i*) open Names open Term open Closure open Rawterm open Reductionops +open Termops type red_expr = (constr, evaluable_global_reference) red_expr_gen -val out_with_occurrences : 'a with_occurrences -> int list * 'a +val out_with_occurrences : 'a with_occurrences -> occurrences * 'a val reduction_of_red_expr : red_expr -> reduction_function * cast_kind (* [true] if we should use the vm to verify the reduction *) @@ -25,13 +26,12 @@ val reduction_of_red_expr : red_expr -> reduction_function * cast_kind val declare_red_expr : string -> reduction_function -> unit (* Opaque and Transparent commands. *) -val set_opaque_const : constant -> unit -val set_transparent_const : constant -> unit - -val set_opaque_var : identifier -> unit -val set_transparent_var : identifier -> unit - +(* Sets the expansion strategy of a constant. When the boolean is + true, the effect is non-synchronous (i.e. it does not survive + section and module closure). *) +val set_strategy : + bool -> (Conv_oracle.level * evaluable_global_reference list) list -> unit (* call by value normalisation function using the virtual machine *) val cbv_vm : reduction_function diff --git a/proofs/refiner.ml b/proofs/refiner.ml index a1d7e011..172a7d70 100644 --- a/proofs/refiner.ml +++ b/proofs/refiner.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: refiner.ml 9573 2007-01-31 20:18:18Z notin $ *) +(* $Id: refiner.ml 11021 2008-05-29 16:48:18Z barras $ *) open Pp open Util @@ -108,13 +108,23 @@ let rec frontier p = open_subgoals = and_status (List.map pf_status pfl'); ref = Some(r,pfl')})) +(* TODO LEM: I might have to make sure that these hooks are called + only when called from solve_nth_pftreestate; I can build the hook + call into the "f", then. + *) +let solve_hook = ref ignore +let set_solve_hook = (:=) solve_hook let rec frontier_map_rec f n p = if n < 1 || n > p.open_subgoals then p else match p.ref with | None -> let p' = f p in - if Evd.eq_evar_info p'.goal p.goal then p' + if Evd.eq_evar_info p'.goal p.goal then + begin + !solve_hook p'; + p' + end else errorlabstrm "Refiner.frontier_map" (str"frontier_map was handed back a ill-formed proof.") @@ -140,7 +150,11 @@ let rec frontier_mapi_rec f i p = match p.ref with | None -> let p' = f i p in - if Evd.eq_evar_info p'.goal p.goal then p' + if Evd.eq_evar_info p'.goal p.goal then + begin + !solve_hook p'; + p' + end else errorlabstrm "Refiner.frontier_mapi" (str"frontier_mapi was handed back a ill-formed proof.") @@ -223,9 +237,7 @@ let refiner = function ref = Some(Daimon,[])}) -let local_Constraints gl = refiner (Prim Change_evars) gl - -let norm_evar_tac = local_Constraints +let norm_evar_tac gl = refiner (Prim Change_evars) gl let norm_evar_proof sigma pf = let nf_subgoal i sgl = @@ -312,6 +324,9 @@ let idtac_valid = function (* [goal_goal_list : goal sigma -> goal list sigma] *) let goal_goal_list gls = {it=[gls.it];sigma=gls.sigma} +(* forces propagation of evar constraints *) +let tclNORMEVAR = norm_evar_tac + (* identity tactic without any message *) let tclIDTAC gls = (goal_goal_list gls, idtac_valid) @@ -334,29 +349,25 @@ let start_tac gls = let finish_tac (sigr,gl,p) = (repackage sigr gl, p) -(* Apply [taci.(i)] on the first n-th subgoals and [tac] on the others *) -let thensf_tac taci tac (sigr,gs,p) = - let n = Array.length taci in - let nsg = List.length gs in - if nsg apply_sig_tac sigr (if i + apply_sig_tac sigr (if i=ng-nl then tacli.(nl-ng+i) else tac)) 0 gs) in (sigr, List.flatten gll, compose p (mapshape (List.map List.length gll) pl)) -(* Apply [taci.(i)] on the last n-th subgoals and [tac] on the others *) -let thensl_tac tac taci (sigr,gs,p) = - let n = Array.length taci in - let nsg = List.length gs in - if nsg apply_sig_tac sigr (if i<0 then tac else taci.(i))) - (n-nsg) gs) in - (sigr, List.flatten gll, - compose p (mapshape (List.map List.length gll) pl)) +(* Apply [taci.(i)] on the first n subgoals and [tac] on the others *) +let thensf_tac taci tac = thens3parts_tac taci tac [||] + +(* Apply [taci.(i)] on the last n subgoals and [tac] on the others *) +let thensl_tac tac taci = thens3parts_tac [||] tac taci (* Apply [tac i] on the ith subgoal (no subgoals number check) *) let thensi_tac tac (sigr,gs,p) = @@ -382,19 +393,25 @@ let theni_tac i tac ((_,gl,_) as subgoals) = subgoals else non_existent_goal k +(* [tclTHENS3PARTS tac1 [|t1 ; ... ; tn|] tac2 [|t'1 ; ... ; t'm|] gls] + applies the tactic [tac1] to [gls] then, applies [t1], ..., [tn] to + the first [n] resulting subgoals, [t'1], ..., [t'm] to the last [m] + subgoals and [tac2] to the rest of the subgoals in the middle. Raises an + error if the number of resulting subgoals is strictly less than [n+m] *) +let tclTHENS3PARTS tac1 tacfi tac tacli gls = + finish_tac (thens3parts_tac tacfi tac tacli (then_tac tac1 (start_tac gls))) + (* [tclTHENSFIRSTn tac1 [|t1 ; ... ; tn|] tac2 gls] applies the tactic [tac1] - to [gls] and applies [t1], ..., [tn] to the [n] first resulting + to [gls] and applies [t1], ..., [tn] to the first [n] resulting subgoals, and [tac2] to the others subgoals. Raises an error if the number of resulting subgoals is strictly less than [n] *) -let tclTHENSFIRSTn tac1 taci tac gls = - finish_tac (thensf_tac taci tac (then_tac tac1 (start_tac gls))) +let tclTHENSFIRSTn tac1 taci tac = tclTHENS3PARTS tac1 taci tac [||] (* [tclTHENSLASTn tac1 tac2 [|t1 ;...; tn|] gls] applies the tactic [tac1] - to [gls] and applies [t1], ..., [tn] to the [n] last resulting + to [gls] and applies [t1], ..., [tn] to the last [n] resulting subgoals, and [tac2] to the other subgoals. Raises an error if the number of resulting subgoals is strictly less than [n] *) -let tclTHENSLASTn tac1 tac taci gls = - finish_tac (thensl_tac tac taci (then_tac tac1 (start_tac gls))) +let tclTHENSLASTn tac1 tac taci = tclTHENS3PARTS tac1 [||] tac taci (* [tclTHEN_i tac taci gls] applies the tactic [tac] to [gls] and applies [(taci i)] to the i_th resulting subgoal (starting from 1), whatever the @@ -407,13 +424,13 @@ let tclTHENFIRSTn tac1 taci = tclTHENSFIRSTn tac1 taci tclIDTAC (* [tclTHEN tac1 tac2 gls] applies the tactic [tac1] to [gls] and applies [tac2] to every resulting subgoals *) -let tclTHEN tac1 tac2 = tclTHENSFIRSTn tac1 [||] tac2 +let tclTHEN tac1 tac2 = tclTHENS3PARTS tac1 [||] tac2 [||] (* [tclTHENSV tac1 [t1 ; ... ; tn] gls] applies the tactic [tac1] to [gls] and applies [t1],..., [tn] to the [n] resulting subgoals. Raises an error if the number of resulting subgoals is not [n] *) let tclTHENSV tac1 tac2v = - tclTHENSFIRSTn tac1 tac2v (tclFAIL_s "Wrong number of tactics.") + tclTHENS3PARTS tac1 tac2v (tclFAIL_s "Wrong number of tactics.") [||] let tclTHENS tac1 tac2l = tclTHENSV tac1 (Array.of_list tac2l) @@ -425,7 +442,6 @@ let tclTHENLAST tac1 tac2 = tclTHENSLASTn tac1 tclIDTAC [|tac2|] to the first resulting subgoal *) let tclTHENFIRST tac1 tac2 = tclTHENSFIRSTn tac1 [|tac2|] tclIDTAC - (* [tclTHENLIST [t1;..;tn]] applies [t1] then [t2] ... then [tn]. More convenient than [tclTHEN] when [n] is large. *) let rec tclTHENLIST = function @@ -437,18 +453,17 @@ let rec tclTHENLIST = function (* various progress criterions *) let same_goal gl subgoal = - eq_named_context_val (hypotheses subgoal) (hypotheses gl) && - eq_constr (conclusion subgoal) (conclusion gl) + eq_constr (conclusion subgoal) (conclusion gl) && + eq_named_context_val (hypotheses subgoal) (hypotheses gl) let weak_progress gls ptree = - (List.length gls.it <> 1) or + (List.length gls.it <> 1) || (not (same_goal (List.hd gls.it) ptree.it)) -(* Il y avait ici un ts_eq ........ *) let progress gls ptree = - (weak_progress gls ptree) or - (not (ptree.sigma == gls.sigma)) + (not (ptree.sigma == gls.sigma)) || + (weak_progress gls ptree) (* PROGRESS tac ptree applies tac to the goal ptree and fails if tac leaves @@ -476,24 +491,39 @@ let tclNOTSAMEGOAL (tac : tactic) goal = (str"Tactic generated a subgoal identical to the original goal.") else rslt - +let catch_failerror = function + | e when catchable_exception e -> check_for_interrupt () + | FailError (0,_) | Stdpp.Exc_located(_, FailError (0,_)) -> + check_for_interrupt () + | FailError (lvl,s) -> raise (FailError (lvl - 1, s)) + | Stdpp.Exc_located (s,FailError (lvl,s')) -> + raise (Stdpp.Exc_located (s,FailError (lvl - 1, s'))) + | e -> raise e (* ORELSE0 t1 t2 tries to apply t1 and if it fails, applies t2 *) let tclORELSE0 t1 t2 g = try t1 g with (* Breakpoint *) - | e when catchable_exception e -> check_for_interrupt (); t2 g - | FailError (0,_) | Stdpp.Exc_located(_, FailError (0,_)) -> - check_for_interrupt (); t2 g - | FailError (lvl,s) -> raise (FailError (lvl - 1, s)) - | Stdpp.Exc_located (s,FailError (lvl,s')) -> - raise (Stdpp.Exc_located (s,FailError (lvl - 1, s'))) + | e -> catch_failerror e; t2 g (* ORELSE t1 t2 tries to apply t1 and if it fails or does not progress, then applies t2 *) let tclORELSE t1 t2 = tclORELSE0 (tclPROGRESS t1) t2 +(* applies t1;t2then if t1 succeeds or t2else if t1 fails + t2* are called in terminal position (unless t1 produces more than + 1 subgoal!) *) +let tclORELSE_THEN t1 t2then t2else gls = + match + try Some(tclPROGRESS t1 gls) + with e -> catch_failerror e; None + with + | None -> t2else gls + | Some (sgl,v) -> + let (sigr,gl) = unpackage sgl in + finish_tac (then_tac t2then (sigr,gl,v)) + (* TRY f tries to apply f, and if it fails, leave the goal unchanged *) let tclTRY f = (tclORELSE0 f tclIDTAC) @@ -558,9 +588,10 @@ let tclDO n t = in dorec n + (* Beware: call by need of CAML, g is needed *) let rec tclREPEAT t g = - (tclORELSE (tclTHEN t (tclREPEAT t)) tclIDTAC) g + tclORELSE_THEN t (tclREPEAT t) tclIDTAC g let tclAT_LEAST_ONCE t = (tclTHEN t (tclREPEAT t)) @@ -847,6 +878,7 @@ let prev_unproven pts = let rec top_of_tree pts = if is_top_pftreestate pts then pts else top_of_tree(traverse 0 pts) +(* FIXME: cette fonction n'est (as of October 2007) appelée nulle part *) let change_rule f pts = let mark_top _ pt = match pt.ref with diff --git a/proofs/refiner.mli b/proofs/refiner.mli index d8b13dba..95130ac5 100644 --- a/proofs/refiner.mli +++ b/proofs/refiner.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: refiner.mli 9244 2006-10-16 17:11:44Z barras $ i*) +(*i $Id: refiner.mli 10879 2008-05-01 22:14:20Z msozeau $ i*) (*i*) open Term @@ -28,7 +28,7 @@ val pf_hyps : goal sigma -> named_context val unpackage : 'a sigma -> evar_map ref * 'a val repackage : evar_map ref -> 'a -> 'a sigma val apply_sig_tac : - evar_map ref -> ('a sigma -> 'b sigma * 'c) -> 'a -> 'b * 'c + evar_map ref -> (goal sigma -> (goal list) sigma * validation) -> goal -> (goal list) * validation type transformation_tactic = proof_tree -> (goal list * validation) @@ -40,15 +40,16 @@ val abstract_operation : compound_rule -> tactic -> tactic val abstract_tactic : ?dflt:bool -> atomic_tactic_expr -> tactic -> tactic val abstract_tactic_expr : ?dflt:bool -> tactic_expr -> tactic -> tactic val abstract_extended_tactic : - ?dflt:bool -> string -> closed_generic_argument list -> tactic -> tactic + ?dflt:bool -> string -> typed_generic_argument list -> tactic -> tactic val refiner : rule -> tactic val frontier : transformation_tactic val list_pf : proof_tree -> goal list val unTAC : tactic -> goal sigma -> proof_tree sigma -val local_Constraints : tactic +(* Install a hook frontier_map and frontier_mapi call on the new node they create *) +val set_solve_hook : (Proof_type.proof_tree -> unit) -> unit (* [frontier_map f n p] applies f on the n-th open subgoal of p and rebuilds proof-tree. n=1 for first goal, n negative counts from the right *) @@ -61,6 +62,9 @@ val frontier_mapi : (*s Tacticals. *) +(* [tclNORMEVAR] forces propagation of evar constraints *) +val tclNORMEVAR : tactic + (* [tclIDTAC] is the identity tactic without message printing*) val tclIDTAC : tactic val tclIDTAC_MESSAGE : Pp.std_ppcmds -> tactic @@ -100,6 +104,13 @@ val tclTHENS : tactic -> tactic list -> tactic val tclTHENST : tactic -> tactic array -> tactic -> tactic *) +(* [tclTHENS3PARTS tac1 [|t1 ; ... ; tn|] tac2 [|t'1 ; ... ; t'm|] gls] + applies the tactic [tac1] to [gls] then, applies [t1], ..., [tn] to + the first [n] resulting subgoals, [t'1], ..., [t'm] to the last [m] + subgoals and [tac2] to the rest of the subgoals in the middle. Raises an + error if the number of resulting subgoals is strictly less than [n+m] *) +val tclTHENS3PARTS : tactic -> tactic array -> tactic -> tactic array -> tactic + (* [tclTHENSLASTn tac1 [t1 ; ... ; tn] tac2 gls] applies [t1],...,[tn] on the last [n] resulting subgoals and [tac2] on the remaining first subgoals *) val tclTHENSLASTn : tactic -> tactic -> tactic array -> tactic @@ -122,6 +133,10 @@ val tclTHENFIRSTn : tactic -> tactic array -> tactic (* A special exception for levels for the Fail tactic *) exception FailError of int * Pp.std_ppcmds +(* Takes an exception and either raise it at the next + level or do nothing. *) +val catch_failerror : exn -> unit + val tclORELSE : tactic -> tactic -> tactic val tclREPEAT : tactic -> tactic val tclREPEAT_MAIN : tactic -> tactic @@ -189,6 +204,7 @@ val solve_pftreestate : tactic -> pftreestate -> pftreestate val weak_undo_pftreestate : pftreestate -> pftreestate val mk_pftreestate : goal -> pftreestate +val extract_open_proof : evar_map -> proof_tree -> constr * (int * types) list val extract_open_pftreestate : pftreestate -> constr * Termops.metamap val extract_pftreestate : pftreestate -> constr val first_unproven : pftreestate -> pftreestate diff --git a/proofs/tacexpr.ml b/proofs/tacexpr.ml index 0bcc7d16..d0789980 100644 --- a/proofs/tacexpr.ml +++ b/proofs/tacexpr.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: tacexpr.ml 9551 2007-01-29 15:13:35Z bgregoir $ i*) +(*i $Id: tacexpr.ml 11100 2008-06-11 11:10:31Z herbelin $ i*) open Names open Topconstr @@ -16,18 +16,25 @@ open Rawterm open Util open Genarg open Pattern +open Decl_kinds type 'a or_metaid = AI of 'a | MetaId of loc * string type direction_flag = bool (* true = Left-to-right false = right-to-right *) type lazy_flag = bool (* true = lazy false = eager *) +type evars_flag = bool (* true = pose evars false = fail on evars *) +type rec_flag = bool (* true = recursive false = not recursive *) +type advanced_flag = bool (* true = advanced false = basic *) +type split_flag = bool (* true = exists false = split *) +type hidden_flag = bool (* true = internal use false = user-level *) +type letin_flag = bool (* true = use local def false = use Leibniz *) type raw_red_flag = | FBeta | FIota | FZeta - | FConst of reference list - | FDeltaBut of reference list + | FConst of reference or_by_notation list + | FDeltaBut of reference or_by_notation list let make_red_flag = let rec add_flag red = function @@ -87,15 +94,23 @@ type 'id gsimple_clause = ('id raw_hyp_location) option [Some l] means on hypothesis belonging to l *) type 'id gclause = { onhyps : 'id raw_hyp_location list option; - onconcl : bool; - concl_occs : int or_var list } + concl_occs : bool * int or_var list } -let nowhere = {onhyps=Some[]; onconcl=false; concl_occs=[]} +let nowhere = {onhyps=Some[]; concl_occs=no_occurrences_expr} let simple_clause_of = function - { onhyps = Some[scl]; onconcl = false } -> Some scl - | { onhyps = Some []; onconcl = true; concl_occs=[] } -> None - | _ -> error "not a simple clause (one hypothesis or conclusion)" +| { onhyps = Some [scl]; concl_occs = occs } when occs = no_occurrences_expr -> + Some scl +| { onhyps = Some []; concl_occs = occs } when occs = all_occurrences_expr -> + None +| _ -> + error "not a simple clause (one hypothesis or conclusion)" + +type multi = + | Precisely of int + | UpTo of int + | RepeatStar + | RepeatPlus type pattern_expr = constr_expr @@ -122,29 +137,30 @@ type ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_atomic_tactic_expr = | TacExact of 'constr | TacExactNoCheck of 'constr | TacVmCastNoCheck of 'constr - | TacApply of 'constr with_bindings - | TacElim of 'constr with_bindings * 'constr with_bindings option + | TacApply of advanced_flag * evars_flag * 'constr with_bindings + | TacElim of evars_flag * 'constr with_bindings * + 'constr with_bindings option | TacElimType of 'constr - | TacCase of 'constr with_bindings + | TacCase of evars_flag * 'constr with_bindings | TacCaseType of 'constr | TacFix of identifier option * int - | TacMutualFix of identifier * int * (identifier * int * 'constr) list + | TacMutualFix of hidden_flag * identifier * int * (identifier * int * + 'constr) list | TacCofix of identifier option - | TacMutualCofix of identifier * (identifier * 'constr) list + | TacMutualCofix of hidden_flag * identifier * (identifier * 'constr) list | TacCut of 'constr | TacAssert of 'tac option * intro_pattern_expr * 'constr - | TacGeneralize of 'constr list + | TacGeneralize of ('constr with_occurrences * name) list | TacGeneralizeDep of 'constr - | TacLetTac of name * 'constr * 'id gclause -(* | TacInstantiate of int * 'constr * (('id * hyp_location_flag,unit) location) *) + | TacLetTac of name * 'constr * 'id gclause * letin_flag (* Derived basic tactics *) | TacSimpleInduction of quantified_hypothesis - | TacNewInduction of 'constr induction_arg list * 'constr with_bindings option - * intro_pattern_expr + | TacNewInduction of evars_flag * 'constr with_bindings induction_arg list * + 'constr with_bindings option * intro_pattern_expr * 'id gclause option | TacSimpleDestruct of quantified_hypothesis - | TacNewDestruct of 'constr induction_arg list * 'constr with_bindings option - * intro_pattern_expr + | TacNewDestruct of evars_flag * 'constr with_bindings induction_arg list * + 'constr with_bindings option * intro_pattern_expr * 'id gclause option | TacDoubleInduction of quantified_hypothesis * quantified_hypothesis | TacDecomposeAnd of 'constr @@ -160,20 +176,21 @@ type ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_atomic_tactic_expr = | TacDestructHyp of (bool * identifier located) | TacDestructConcl | TacSuperAuto of (int option * reference list * bool * bool) - | TacDAuto of int or_var option * int option + | TacDAuto of int or_var option * int option * 'constr list (* Context management *) | TacClear of bool * 'id list | TacClearBody of 'id list | TacMove of bool * 'id * 'id - | TacRename of 'id * 'id + | TacRename of ('id *'id) list + | TacRevert of 'id list (* Constructors *) - | TacLeft of 'constr bindings - | TacRight of 'constr bindings - | TacSplit of bool * 'constr bindings - | TacAnyConstructor of 'tac option - | TacConstructor of int or_metaid * 'constr bindings + | TacLeft of evars_flag * 'constr bindings + | TacRight of evars_flag * 'constr bindings + | TacSplit of evars_flag * split_flag * 'constr bindings + | TacAnyConstructor of evars_flag * 'tac option + | TacConstructor of evars_flag * int or_metaid * 'constr bindings (* Conversion *) | TacReduce of ('constr,'cst) red_expr_gen * 'id gclause @@ -185,21 +202,26 @@ type ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_atomic_tactic_expr = | TacTransitivity of 'constr (* Equality and inversion *) - | TacRewrite of bool * 'constr with_bindings * 'id gclause + | TacRewrite of + evars_flag * (bool * multi * 'constr with_bindings) list * 'id gclause * 'tac option | TacInversion of ('constr,'id) inversion_strength * quantified_hypothesis (* For ML extensions *) - | TacExtend of loc * string * ('constr,'tac) generic_argument list + | TacExtend of loc * string * 'constr generic_argument list (* For syntax extensions *) | TacAlias of loc * string * - (identifier * ('constr,'tac) generic_argument) list + (identifier * 'constr generic_argument) list * (dir_path * glob_tactic_expr) and ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr = | TacAtom of loc * ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_atomic_tactic_expr - | TacThen of ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr * ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr - | TacThens of ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr * ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr list + | TacThen of ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr * + ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr array * + ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr * + ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr array + | TacThens of ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr * + ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr list | TacFirst of ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr list | TacComplete of ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr | TacSolve of ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr list @@ -212,8 +234,7 @@ and ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr = | TacId of 'id message_token list | TacFail of int or_var * 'id message_token list | TacInfo of ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr - | TacLetRecIn of (identifier located * ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_fun_ast) list * ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr - | TacLetIn of (identifier located * ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr option * ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_arg) list * ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr + | TacLetIn of rec_flag * (identifier located * ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_arg) list * ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr | TacMatch of lazy_flag * ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr * ('pat,('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr) match_rule list | TacMatchContext of lazy_flag * direction_flag * ('pat,('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr) match_rule list | TacFun of ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_fun_ast @@ -222,11 +243,11 @@ and ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr = and ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_fun_ast = identifier option list * ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr - (* These are possible arguments of a tactic definition *) + (* These are the possible arguments of a tactic definition *) and ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_arg = | TacDynamic of loc * Dyn.t | TacVoid - | MetaIdArg of loc * string + | MetaIdArg of loc * bool * string | ConstrMayEval of ('constr,'cst) may_eval | IntroPattern of intro_pattern_expr | Reference of 'ref @@ -251,8 +272,8 @@ and glob_tactic_expr = type raw_tactic_expr = (constr_expr, pattern_expr, - reference, - reference, + reference or_by_notation, + reference or_by_notation, reference, identifier located or_metaid, raw_tactic_expr) gen_tactic_expr @@ -260,8 +281,8 @@ type raw_tactic_expr = type raw_atomic_tactic_expr = (constr_expr, (* constr *) pattern_expr, (* pattern *) - reference, (* evaluable reference *) - reference, (* inductive *) + reference or_by_notation, (* evaluable reference *) + reference or_by_notation, (* inductive *) reference, (* ltac reference *) identifier located or_metaid, (* identifier *) raw_tactic_expr) gen_atomic_tactic_expr @@ -269,16 +290,15 @@ type raw_atomic_tactic_expr = type raw_tactic_arg = (constr_expr, pattern_expr, - reference, - reference, + reference or_by_notation, + reference or_by_notation, reference, identifier located or_metaid, raw_tactic_expr) gen_tactic_arg -type raw_generic_argument = - (constr_expr,raw_tactic_expr) generic_argument +type raw_generic_argument = constr_expr generic_argument -type raw_red_expr = (constr_expr, reference) red_expr_gen +type raw_red_expr = (constr_expr, reference or_by_notation) red_expr_gen type glob_atomic_tactic_expr = (rawconstr_and_expr, @@ -298,28 +318,17 @@ type glob_tactic_arg = identifier located, glob_tactic_expr) gen_tactic_arg -type glob_generic_argument = - (rawconstr_and_expr,glob_tactic_expr) generic_argument +type glob_generic_argument = rawconstr_and_expr generic_argument type glob_red_expr = (rawconstr_and_expr, evaluable_global_reference or_var) red_expr_gen -type closed_raw_generic_argument = - (constr_expr,raw_tactic_expr) generic_argument - -type 'a raw_abstract_argument_type = - ('a,rlevel,raw_tactic_expr) abstract_argument_type - -type 'a glob_abstract_argument_type = - ('a,glevel,glob_tactic_expr) abstract_argument_type +type typed_generic_argument = Evd.open_constr generic_argument -type open_generic_argument = - (Term.constr,glob_tactic_expr) generic_argument +type 'a raw_abstract_argument_type = ('a,rlevel) abstract_argument_type -type closed_generic_argument = - (Term.constr,glob_tactic_expr) generic_argument +type 'a glob_abstract_argument_type = ('a,glevel) abstract_argument_type -type 'a closed_abstract_argument_type = - ('a,Term.constr,glob_tactic_expr) abstract_argument_type +type 'a typed_abstract_argument_type = ('a,tlevel) abstract_argument_type -type declaration_hook = Decl_kinds.strength -> global_reference -> unit +type declaration_hook = locality -> global_reference -> unit diff --git a/proofs/tacmach.ml b/proofs/tacmach.ml index baf8c859..213cc13f 100644 --- a/proofs/tacmach.ml +++ b/proofs/tacmach.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: tacmach.ml 9511 2007-01-22 08:27:31Z herbelin $ *) +(* $Id: tacmach.ml 10544 2008-02-09 11:31:35Z herbelin $ *) open Util open Names @@ -205,8 +205,11 @@ let thin_body_no_check ids gl = let move_hyp_no_check with_dep id1 id2 gl = refiner (Prim (Move (with_dep,id1,id2))) gl -let rename_hyp_no_check id1 id2 gl = - refiner (Prim (Rename (id1,id2))) gl +let rec rename_hyp_no_check l gl = match l with + | [] -> tclIDTAC gl + | (id1,id2)::l -> + tclTHEN (refiner (Prim (Rename (id1,id2)))) + (rename_hyp_no_check l) gl let mutual_fix f n others gl = with_check (refiner (Prim (FixRule (f,n,others)))) gl @@ -214,14 +217,6 @@ let mutual_fix f n others gl = let mutual_cofix f others gl = with_check (refiner (Prim (Cofix (f,others)))) gl -let rename_bound_var_goal gls = - let { evar_hyps = sign; evar_concl = cl } = sig_it gls in - let ids = ids_of_named_context (named_context_of_val sign) in - convert_concl_no_check - (rename_bound_var (Global.env()) ids cl) DEFAULTcast gls - - - (* Versions with consistency checks *) let introduction id = with_check (introduction_no_check id) @@ -234,8 +229,8 @@ let convert_hyp d = with_check (convert_hyp_no_check d) let thin l = with_check (thin_no_check l) let thin_body c = with_check (thin_body_no_check c) let move_hyp b id id' = with_check (move_hyp_no_check b id id') -let rename_hyp id id' = with_check (rename_hyp_no_check id id') - +let rename_hyp l = with_check (rename_hyp_no_check l) + (* Pretty-printers *) open Pp diff --git a/proofs/tacmach.mli b/proofs/tacmach.mli index 9352cb5d..8b0053a4 100644 --- a/proofs/tacmach.mli +++ b/proofs/tacmach.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: tacmach.mli 7639 2005-12-02 10:01:15Z gregoire $ i*) +(*i $Id: tacmach.mli 11094 2008-06-10 19:35:23Z herbelin $ i*) (*i*) open Names @@ -37,7 +37,7 @@ val re_sig : 'a -> evar_map -> 'a sigma val unpackage : 'a sigma -> evar_map ref * 'a val repackage : evar_map ref -> 'a -> 'a sigma val apply_sig_tac : - evar_map ref -> ('a sigma -> 'b sigma * 'c) -> 'a -> 'b * 'c + evar_map ref -> (goal sigma -> (goal list) sigma * validation) -> goal -> (goal list) * validation val pf_concl : goal sigma -> types val pf_env : goal sigma -> env @@ -79,7 +79,7 @@ val pf_nf_betaiota : goal sigma -> constr -> constr val pf_reduce_to_quantified_ind : goal sigma -> types -> inductive * types val pf_reduce_to_atomic_ind : goal sigma -> types -> inductive * types val pf_compute : goal sigma -> constr -> constr -val pf_unfoldn : (int list * evaluable_global_reference) list +val pf_unfoldn : (Termops.occurrences * evaluable_global_reference) list -> goal sigma -> constr -> constr val pf_const_value : goal sigma -> constant -> constr @@ -132,11 +132,10 @@ val convert_hyp_no_check : named_declaration -> tactic val thin_no_check : identifier list -> tactic val thin_body_no_check : identifier list -> tactic val move_hyp_no_check : bool -> identifier -> identifier -> tactic -val rename_hyp_no_check : identifier -> identifier -> tactic +val rename_hyp_no_check : (identifier*identifier) list -> tactic val mutual_fix : identifier -> int -> (identifier * int * constr) list -> tactic val mutual_cofix : identifier -> (identifier * constr) list -> tactic -val rename_bound_var_goal : tactic (*s The most primitive tactics with consistency and type checking *) @@ -150,7 +149,7 @@ val convert_hyp : named_declaration -> tactic val thin : identifier list -> tactic val thin_body : identifier list -> tactic val move_hyp : bool -> identifier -> identifier -> tactic -val rename_hyp : identifier -> identifier -> tactic +val rename_hyp : (identifier*identifier) list -> tactic (*s Tactics handling a list of goals. *) diff --git a/proofs/tactic_debug.ml b/proofs/tactic_debug.ml index 96df8f64..2e19011f 100644 --- a/proofs/tactic_debug.ml +++ b/proofs/tactic_debug.ml @@ -6,6 +6,8 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) +(*i $Id: tactic_debug.ml 10739 2008-04-01 14:45:20Z herbelin $ i*) + open Names open Constrextern open Pp diff --git a/scripts/coqc.ml b/scripts/coqc.ml index cbcb6b4c..41fb0803 100644 --- a/scripts/coqc.ml +++ b/scripts/coqc.ml @@ -158,13 +158,13 @@ let parse_args () = | "-unboxed-values" | "-unboxed-definitions" | "-draw-vm-instr" as o) :: rem -> parse (cfiles,o::args) rem - | ("-v"|"--version") :: _ -> - Usage.version () | "-where" :: _ -> - let coqlib = + let coqlib = try Sys.getenv "COQLIB" with Not_found -> Coq_config.coqlib in print_endline coqlib; exit 0 + | ("-v"|"--version") :: _ -> + Usage.version () | f :: rem -> if Sys.file_exists f then parse (f::cfiles,args) rem diff --git a/scripts/coqmktop.ml b/scripts/coqmktop.ml index 3cb3c11b..850cc961 100644 --- a/scripts/coqmktop.ml +++ b/scripts/coqmktop.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: coqmktop.ml 10192 2007-10-08 00:33:39Z letouzey $ *) +(* $Id: coqmktop.ml 10947 2008-05-19 19:10:40Z herbelin $ *) (* coqmktop is a script to link Coq, analogous to ocamlmktop. The command line contains options specific to coqmktop, options for the @@ -17,7 +17,7 @@ open Unix (* Objects to link *) (* 1. Core objects *) -let ocamlobjs = ["unix.cma"] +let ocamlobjs = ["unix.cma";"nums.cma"] let dynobjs = ["dynlink.cma"] let camlp4objs = ["gramlib.cma"] let libobjs = ocamlobjs @ camlp4objs @@ -33,7 +33,7 @@ let ide = split_list Tolink.ide (* 3. Toplevel objects *) let camlp4topobjs = if Coq_config.camlp4 = "camlp5" then - ["camlp5_top.cma"; "camlp5o.cma"; "pa_o.cmo"; "pa_op.cmo"; "pa_extend.cmo"] + ["camlp5_top.cma"; "pa_o.cmo"; "pa_extend.cmo"] else ["camlp4_top.cma"; "pa_o.cmo"; "pa_op.cmo"; "pa_extend.cmo"] let topobjs = camlp4topobjs @@ -52,9 +52,6 @@ let searchisos = ref false let coqide = ref false let echo = ref false -(* Caml inline flag *) -let caml_inline_0 = ref false - let src_dirs () = [ []; ["kernel";"byterun"]; [ "config" ]; [ "toplevel" ] ] @ if !coqide then [[ "ide" ]] else [] @@ -105,7 +102,7 @@ let files_to_link userfiles = ((List.map native_suffix objs) @ userfiles, (List.map native_suffix libs) @ userfiles) else - (objs @ userfiles ,libs @ userfiles ) + (objs @ userfiles, libs @ userfiles ) in let modules = List.map module_of_file objstolink in (modules, libstolink) @@ -137,7 +134,7 @@ let all_subdirs dir = (* usage *) let usage () = prerr_endline "Usage: coqmktop files -Options are: +Flags.are: -srcdir dir Specify where the Coq source files are -o exec-file Specify the name of the resulting toplevel -opt Compile in native code @@ -145,8 +142,7 @@ Options are: -top Build Coq on a ocaml toplevel (incompatible with -opt) -searchisos Build a toplevel for SearchIsos -ide Build a toplevel for the Coq IDE - -R dir Specify recursively directories for Ocaml - -v8 Link with V8 grammar\n"; + -R dir Specify recursively directories for Ocaml\n"; exit 1 (* parsing of the command line *) @@ -160,7 +156,9 @@ let parse_args () = | "-top" :: rem -> top := true ; parse (op,fl) rem | "-ide" :: rem -> coqide := true; parse (op,fl) rem - | "-v8" :: rem -> parse (op,fl) rem + | "-v8" :: rem -> + Printf.eprintf "warning: option -v8 deprecated"; + parse (op,fl) rem | "-echo" :: rem -> echo := true ; parse (op,fl) rem | ("-cclib"|"-ccopt"|"-I"|"-o"|"-w" as o) :: rem' -> begin @@ -174,7 +172,6 @@ let parse_args () = | "-R" :: [] -> usage () | ("-noassert"|"-compact"|"-g"|"-p"|"-thread"|"-dtypes" as o) :: rem -> parse (o::op,fl) rem - | "-inline" :: p :: rem -> caml_inline_0 := true; parse (op,fl) rem | ("-h"|"--help") :: _ -> usage () | f :: rem -> if Filename.check_suffix f ".ml" @@ -283,25 +280,24 @@ let main () = let (options, userfiles) = parse_args () in (* which ocaml command to invoke *) let prog = - if !opt then - begin - (* native code *) - if !top then failwith "no custom toplevel in native code !"; - let ocamloptexec = Filename.concat Coq_config.camldir "ocamlopt" in - (if !caml_inline_0 then ocamloptexec^" -linkall"^" -inline 0" else ocamloptexec^" -linkall") - end else + if !opt then begin + (* native code *) + if !top then failwith "no custom toplevel in native code !"; + let ocamloptexec = Filename.concat Coq_config.camldir "ocamlopt" in + ocamloptexec^" -linkall" + end else (* bytecode (we shunt ocamlmktop script which fails on win32) *) let ocamlmktoplib = " toplevellib.cma" in let ocamlcexec = Filename.concat Coq_config.camldir "ocamlc" in let ocamlccustom = ocamlcexec^" -custom -linkall" in - (if !top then ocamlccustom^ocamlmktoplib else ocamlccustom) + (if !top then ocamlccustom^ocamlmktoplib else ocamlccustom) in - (* files to link *) + (* files to link *) let (modules, tolink) = files_to_link userfiles in - (*file for dynlink *) + (*file for dynlink *) let dynlink= if not (!opt || !top) then - [tmp_dynlink()] + [(print_int 2; tmp_dynlink())] else [] in @@ -322,6 +318,7 @@ let main () = (string_of_int (String.length command)) ^ " characters)"); flush Pervasives.stdout end; + print_string command; let retcode = Sys.command command in clean main_file; (* command gives the exit code in HSB, and signal in LSB !!! *) diff --git a/tactics/auto.ml b/tactics/auto.ml index 3cd1591d..2a5bb95c 100644 --- a/tactics/auto.ml +++ b/tactics/auto.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: auto.ml 9154 2006-09-20 17:18:18Z corbinea $ *) +(* $Id: auto.ml 11094 2008-06-10 19:35:23Z herbelin $ *) open Pp open Util @@ -93,8 +93,8 @@ let empty_se = ([],[],Btermdn.create ()) let add_tac t (l,l',dn) = match t.pat with - None -> (insert t l, l', dn) - | Some pat -> (l, insert t l', Btermdn.add dn (pat,t)) + None -> if not (List.mem t l) then (insert t l, l', dn) else (l, l', dn) + | Some pat -> if not (List.mem t l') then (l, insert t l', Btermdn.add dn (pat,t)) else (l, l', dn) let lookup_tacs (hdc,c) (l,l',dn) = @@ -137,14 +137,16 @@ end module Hintdbmap = Gmap -type frozen_hint_db_table = (string,Hint_db.t) Hintdbmap.t +type hint_db = Names.transparent_state * Hint_db.t -type hint_db_table = (string,Hint_db.t) Hintdbmap.t ref +type frozen_hint_db_table = (string,hint_db) Hintdbmap.t + +type hint_db_table = (string,hint_db) Hintdbmap.t ref type hint_db_name = string let searchtable = (ref Hintdbmap.empty : hint_db_table) - + let searchtable_map name = Hintdbmap.find name !searchtable let searchtable_add (name,db) = @@ -182,23 +184,20 @@ let try_head_pattern c = try head_pattern_bound c with BoundPattern -> error "Bound head variable" -let make_exact_entry (c,cty) = +let make_exact_entry pri (c,cty) = let cty = strip_outer_cast cty in match kind_of_term cty with | Prod (_,_,_) -> failwith "make_exact_entry" | _ -> (head_of_constr_reference (List.hd (head_constr cty)), - { pri=0; pat=None; code=Give_exact c }) + { pri=(match pri with Some pri -> pri | None -> 0); pat=None; code=Give_exact c }) -let dummy_goal = - {it={evar_hyps=empty_named_context_val; - evar_concl=mkProp; - evar_body=Evar_empty; - evar_extra=None}; - sigma=Evd.empty} +let dummy_goal = + {it = make_evar empty_named_context_val mkProp; + sigma = empty} -let make_apply_entry env sigma (eapply,verbose) (c,cty) = +let make_apply_entry env sigma (eapply,verbose) pri (c,cty) = let cty = hnf_constr env sigma cty in match kind_of_term cty with | Prod _ -> @@ -207,45 +206,47 @@ let make_apply_entry env sigma (eapply,verbose) (c,cty) = let pat = Pattern.pattern_of_constr c' in let hd = (try head_pattern_bound pat with BoundPattern -> failwith "make_apply_entry") in - let nmiss = List.length (clenv_missing ce) - in - if eapply & (nmiss <> 0) then begin - if verbose then + let nmiss = List.length (clenv_missing ce) in + if nmiss = 0 then + (hd, + { pri = (match pri with None -> nb_hyp cty | Some p -> p); + pat = Some pat; + code = Res_pf(c,{ce with env=empty_env}) }) + else begin + if not eapply then failwith "make_apply_entry"; + if verbose then warn (str "the hint: eapply " ++ pr_lconstr c ++ - str " will only be used by eauto"); + str " will only be used by eauto"); (hd, - { pri = nb_hyp cty + nmiss; - pat = Some pat; - code = ERes_pf(c,{ce with templenv=empty_env}) }) - end else - (hd, - { pri = nb_hyp cty; - pat = Some pat; - code = Res_pf(c,{ce with templenv=empty_env}) }) + { pri = (match pri with None -> nb_hyp cty + nmiss | Some p -> p); + pat = Some pat; + code = ERes_pf(c,{ce with env=empty_env}) }) + end | _ -> failwith "make_apply_entry" -(* eap is (e,v) with e=true if eapply and v=true if verbose +(* flags is (e,v) with e=true if eapply and v=true if verbose c is a constr cty is the type of constr *) -let make_resolves env sigma eap c = +let make_resolves env sigma flags pri c = let cty = type_of env sigma c in let ents = map_succeed (fun f -> f (c,cty)) - [make_exact_entry; make_apply_entry env sigma (eap,Options.is_verbose())] + [make_exact_entry pri; make_apply_entry env sigma flags pri] in if ents = [] then errorlabstrm "Hint" - (pr_lconstr c ++ spc() ++ str"cannot be used as a hint"); + (pr_lconstr c ++ spc() ++ + (if fst flags then str"cannot be used as a hint" + else str "can be used as a hint only for eauto")); ents - (* used to add an hypothesis to the local hint database *) let make_resolve_hyp env sigma (hname,_,htyp) = try - [make_apply_entry env sigma (true, false) - (mkVar hname, htyp)] + [make_apply_entry env sigma (true, false) None + (mkVar hname, htyp)] with | Failure _ -> [] | e when Logic.catchable_exception e -> anomaly "make_resolve_hyp" @@ -270,7 +271,7 @@ let make_trivial env sigma c = let ce = mk_clenv_from dummy_goal (c,t) in (hd, { pri=1; pat = Some (Pattern.pattern_of_constr (clenv_type ce)); - code=Res_pf_THEN_trivial_fail(c,{ce with templenv=empty_env}) }) + code=Res_pf_THEN_trivial_fail(c,{ce with env=empty_env}) }) open Vernacexpr @@ -278,18 +279,32 @@ open Vernacexpr (* declaration of the AUTOHINT library object *) (**************************************************************************) +let add_hint_list hintlist (st,db) = + let db' = Hint_db.add_list hintlist db in + let st' = + List.fold_left + (fun (ids, csts as st) (_, hint) -> + match hint.code with + | Unfold_nth egr -> + (match egr with + | EvalVarRef id -> (Idpred.add id ids, csts) + | EvalConstRef cst -> (ids, Cpred.add cst csts)) + | _ -> st) + st hintlist + in (st', db') + (* If the database does not exist, it is created *) (* TODO: should a warning be printed in this case ?? *) let add_hint dbname hintlist = try let db = searchtable_map dbname in - let db' = Hint_db.add_list hintlist db in + let db' = add_hint_list hintlist db in searchtable_add (dbname,db') with Not_found -> - let db = Hint_db.add_list hintlist Hint_db.empty in + let db = add_hint_list hintlist (empty_transparent_state, Hint_db.empty) in searchtable_add (dbname,db) -let cache_autohint (_,(local,name,hintlist)) = add_hint name hintlist +let cache_autohint (_,(local,name,hints)) = add_hint name hints let forward_subst_tactic = ref (fun _ -> failwith "subst_tactic is not installed for auto") @@ -300,7 +315,7 @@ let subst_autohint (_,subst,(local,name,hintlist as obj)) = let trans_clenv clenv = Clenv.subst_clenv subst clenv in let trans_data data code = { data with - pat = option_smartmap (subst_pattern subst) data.pat ; + pat = Option.smartmap (subst_pattern subst) data.pat ; code = code ; } in @@ -367,7 +382,8 @@ let add_resolves env sigma clist local dbnames = Lib.add_anonymous_leaf (inAutoHint (local,dbname, - List.flatten (List.map (make_resolves env sigma true) clist)))) + List.flatten (List.map (fun (x, y) -> + make_resolves env sigma (true,Flags.is_verbose()) x y) clist)))) dbnames @@ -411,29 +427,30 @@ let add_hints local dbnames0 h = let f = Constrintern.interp_constr sigma env in match h with | HintsResolve lhints -> - add_resolves env sigma (List.map f lhints) local dbnames + add_resolves env sigma (List.map (fun (pri, x) -> pri, f x) lhints) local dbnames | HintsImmediate lhints -> add_trivials env sigma (List.map f lhints) local dbnames | HintsUnfold lhints -> - let f qid = - let r = Nametab.global qid in - let r' = match r with + let f r = + let gr = Syntax_def.global_with_alias r in + let r' = match gr with | ConstRef c -> EvalConstRef c | VarRef c -> EvalVarRef c | _ -> errorlabstrm "evalref_of_ref" - (str "Cannot coerce" ++ spc () ++ pr_global r ++ spc () ++ + (str "Cannot coerce" ++ spc () ++ pr_global gr ++ spc () ++ str "to an evaluable reference") in - (r,r') in + if !Flags.dump then Constrintern.add_glob (loc_of_reference r) gr; + (gr,r') in add_unfolds (List.map f lhints) local dbnames | HintsConstructors lqid -> let add_one qid = let env = Global.env() and sigma = Evd.empty in - let isp = global_inductive qid in + let isp = inductive_of_reference qid in let consnames = (snd (Global.lookup_inductive isp)).mind_consnames in let lcons = list_tabulate - (fun i -> mkConstruct (isp,i+1)) (Array.length consnames) in + (fun i -> None, mkConstruct (isp,i+1)) (Array.length consnames) in add_resolves env sigma lcons local dbnames in List.iter add_one lqid | HintsExtern (pri, patcom, tacexp) -> @@ -476,7 +493,7 @@ let fmt_hint_list_for_head c = let dbs = Hintdbmap.to_list !searchtable in let valid_dbs = map_succeed - (fun (name,db) -> (name,db,Hint_db.map_all c db)) + (fun (name,(_,db)) -> (name,db,Hint_db.map_all c db)) dbs in if valid_dbs = [] then @@ -502,11 +519,11 @@ let fmt_hint_term cl = let valid_dbs = if occur_existential cl then map_succeed - (fun (name, db) -> (name, db, Hint_db.map_all hd db)) + (fun (name, (_, db)) -> (name, db, Hint_db.map_all hd db)) dbs else map_succeed - (fun (name, db) -> + (fun (name, (_, db)) -> (name, db, Hint_db.map_auto (hd,applist(hdc,args)) db)) dbs in @@ -527,7 +544,10 @@ let print_applicable_hint () = print_hint_term (pf_concl gl) (* displays the whole hint database db *) -let print_hint_db db = +let print_hint_db ((ids, csts),db) = + msg (hov 0 + (str"Unfoldable variable definitions: " ++ pr_idpred ids ++ fnl () ++ + str"Unfoldable constant definitions: " ++ pr_cpred csts ++ fnl ())); Hint_db.iter (fun head hintlist -> msg (hov 0 @@ -559,22 +579,38 @@ let print_searchtable () = let priority l = List.map snd (List.filter (fun (pr,_) -> pr = 0) l) +(* tell auto not to reuse already instantiated metas in unification (for + compatibility, since otherwise, apply succeeds oftener) *) + +open Unification + +let auto_unif_flags = { + modulo_conv_on_closed_terms = Some full_transparent_state; + use_metas_eagerly = false; + modulo_delta = empty_transparent_state; +} (* Try unification with the precompiled clause, then use registered Apply *) -let unify_resolve (c,clenv) gls = +let unify_resolve_nodelta (c,clenv) gls = let clenv' = connect_clenv gls clenv in - let _ = clenv_unique_resolver false clenv' gls in + let _ = clenv_unique_resolver false ~flags:auto_unif_flags clenv' gls in h_simplest_apply c gls +let unify_resolve flags (c,clenv) gls = + let clenv' = connect_clenv gls clenv in + let _ = clenv_unique_resolver false ~flags clenv' gls in + h_apply true false (c,NoBindings) gls + + (* builds a hint database from a constr signature *) (* typically used with (lid, ltyp) = pf_hyps_types *) -let make_local_hint_db lems g = +let make_local_hint_db eapply lems g = let sign = pf_hyps g in let hintlist = list_map_append (pf_apply make_resolve_hyp g) sign in - let hintlist' = list_map_append (pf_apply make_resolves g true) lems in - Hint_db.add_list hintlist' (Hint_db.add_list hintlist Hint_db.empty) + let hintlist' = list_map_append (pf_apply make_resolves g (eapply,false) None) lems in + (empty_transparent_state, Hint_db.add_list hintlist' (Hint_db.add_list hintlist Hint_db.empty)) (* Serait-ce possible de compiler d'abord la tactique puis de faire la substitution sans passer par bdize dont l'objectif est de préparer un @@ -607,47 +643,90 @@ let conclPattern concl pat tac gl = (* Papageno : cette fonction a été pas mal simplifiée depuis que la base de Hint impérative a été remplacée par plusieurs bases fonctionnelles *) -let rec trivial_fail_db db_list local_db gl = +let rec trivial_fail_db mod_delta db_list local_db gl = let intro_tac = tclTHEN intro (fun g'-> let hintl = make_resolve_hyp (pf_env g') (project g') (pf_last_hyp g') - in trivial_fail_db db_list (Hint_db.add_list hintl local_db) g') + in trivial_fail_db mod_delta db_list (add_hint_list hintl local_db) g') in tclFIRST (assumption::intro_tac:: (List.map tclCOMPLETE - (trivial_resolve db_list local_db (pf_concl gl)))) gl + (trivial_resolve mod_delta db_list local_db (pf_concl gl)))) gl -and my_find_search db_list local_db hdc concl = +and my_find_search_nodelta db_list local_db hdc concl = let tacl = if occur_existential concl then - list_map_append (fun db -> Hint_db.map_all hdc db) (local_db::db_list) - else - list_map_append (fun db -> Hint_db.map_auto (hdc,concl) db) + list_map_append + (fun (st, db) -> (Hint_db.map_all hdc db)) + (local_db::db_list) + else + list_map_append (fun (_, db) -> + Hint_db.map_auto (hdc,concl) db) (local_db::db_list) in - List.map - (fun {pri=b; pat=p; code=t} -> - (b, + List.map + (fun {pri=b; pat=p; code=t} -> + (b, match t with - | Res_pf (term,cl) -> unify_resolve (term,cl) + | Res_pf (term,cl) -> unify_resolve_nodelta (term,cl) | ERes_pf (_,c) -> (fun gl -> error "eres_pf") | Give_exact c -> exact_check c | Res_pf_THEN_trivial_fail (term,cl) -> tclTHEN - (unify_resolve (term,cl)) - (trivial_fail_db db_list local_db) - | Unfold_nth c -> unfold_in_concl [[],c] + (unify_resolve_nodelta (term,cl)) + (trivial_fail_db false db_list local_db) + | Unfold_nth c -> unfold_in_concl [all_occurrences,c] | Extern tacast -> - conclPattern concl (out_some p) tacast)) + conclPattern concl (Option.get p) tacast)) tacl -and trivial_resolve db_list local_db cl = +and my_find_search mod_delta = + if mod_delta then my_find_search_delta + else my_find_search_nodelta + +and my_find_search_delta db_list local_db hdc concl = + let flags = {auto_unif_flags with use_metas_eagerly = true} in + let tacl = + if occur_existential concl then + list_map_append + (fun (st, db) -> + let st = {flags with modulo_delta = st} in + List.map (fun x -> (st,x)) (Hint_db.map_all hdc db)) + (local_db::db_list) + else + list_map_append (fun ((ids, csts as st), db) -> + let st, l = + let l = + if (Idpred.is_empty ids && Cpred.is_empty csts) + then Hint_db.map_auto (hdc,concl) db + else Hint_db.map_all hdc db + in {flags with modulo_delta = st}, l + in List.map (fun x -> (st,x)) l) + (local_db::db_list) + in + List.map + (fun (st, {pri=b; pat=p; code=t}) -> + (b, + match t with + | Res_pf (term,cl) -> unify_resolve st (term,cl) + | ERes_pf (_,c) -> (fun gl -> error "eres_pf") + | Give_exact c -> exact_check c + | Res_pf_THEN_trivial_fail (term,cl) -> + tclTHEN + (unify_resolve st (term,cl)) + (trivial_fail_db true db_list local_db) + | Unfold_nth c -> unfold_in_concl [all_occurrences,c] + | Extern tacast -> + conclPattern concl (Option.get p) tacast)) + tacl + +and trivial_resolve mod_delta db_list local_db cl = try let hdconstr = List.hd (head_constr_bound cl []) in priority - (my_find_search db_list local_db (head_of_constr_reference hdconstr) cl) + (my_find_search mod_delta db_list local_db (head_of_constr_reference hdconstr) cl) with Bound | Not_found -> [] @@ -661,30 +740,33 @@ let trivial lems dbnames gl = error ("trivial: "^x^": No such Hint database")) ("core"::dbnames) in - tclTRY (trivial_fail_db db_list (make_local_hint_db lems gl)) gl + tclTRY (trivial_fail_db false db_list (make_local_hint_db false lems gl)) gl let full_trivial lems gl = let dbnames = Hintdbmap.dom !searchtable in let dbnames = list_subtract dbnames ["v62"] in let db_list = List.map (fun x -> searchtable_map x) dbnames in - tclTRY (trivial_fail_db db_list (make_local_hint_db lems gl)) gl + tclTRY (trivial_fail_db false db_list (make_local_hint_db false lems gl)) gl let gen_trivial lems = function | None -> full_trivial lems | Some l -> trivial lems l +let inj_open c = (Evd.empty,c) + let h_trivial lems l = - Refiner.abstract_tactic (TacTrivial (lems,l)) (gen_trivial lems l) + Refiner.abstract_tactic (TacTrivial (List.map inj_open lems,l)) + (gen_trivial lems l) (**************************************************************************) (* The classical Auto tactic *) (**************************************************************************) -let possible_resolve db_list local_db cl = +let possible_resolve mod_delta db_list local_db cl = try let hdconstr = List.hd (head_constr_bound cl []) in List.map snd - (my_find_search db_list local_db (head_of_constr_reference hdconstr) cl) + (my_find_search mod_delta db_list local_db (head_of_constr_reference hdconstr) cl) with Bound | Not_found -> [] @@ -710,7 +792,7 @@ let decomp_empty_term c gls = (* n is the max depth of search *) (* local_db contains the local Hypotheses *) -let rec search_gen decomp n db_list local_db extra_sign goal = +let rec search_gen decomp n mod_delta db_list local_db extra_sign goal = if n=0 then error "BOUND 2"; let decomp_tacs = match decomp with | 0 -> [] @@ -721,7 +803,7 @@ let rec search_gen decomp n db_list local_db extra_sign goal = (fun id -> tclTHENSEQ [decomp_unary_term (mkVar id); clear [id]; - search_gen decomp p db_list local_db []]) + search_gen decomp p mod_delta db_list local_db []]) (pf_ids_of_hyps goal)) in let intro_tac = @@ -731,18 +813,18 @@ let rec search_gen decomp n db_list local_db extra_sign goal = let hintl = try [make_apply_entry (pf_env g') (project g') - (true,false) + (true,false) None (mkVar hid, htyp)] with Failure _ -> [] in - search_gen decomp n db_list (Hint_db.add_list hintl local_db) [d] g') + search_gen decomp n mod_delta db_list (add_hint_list hintl local_db) [d] g') in let rec_tacs = List.map (fun ntac -> tclTHEN ntac - (search_gen decomp (n-1) db_list local_db empty_named_context)) - (possible_resolve db_list local_db (pf_concl goal)) + (search_gen decomp (n-1) mod_delta db_list local_db empty_named_context)) + (possible_resolve mod_delta db_list local_db (pf_concl goal)) in tclFIRST (assumption::(decomp_tacs@(intro_tac::rec_tacs))) goal @@ -751,7 +833,7 @@ let search = search_gen 0 let default_search_depth = ref 5 -let auto n lems dbnames gl = +let delta_auto mod_delta n lems dbnames gl = let db_list = List.map (fun x -> @@ -762,17 +844,24 @@ let auto n lems dbnames gl = ("core"::dbnames) in let hyps = pf_hyps gl in - tclTRY (search n db_list (make_local_hint_db lems gl) hyps) gl + tclTRY (search n mod_delta db_list (make_local_hint_db false lems gl) hyps) gl + +let auto = delta_auto false + +let new_auto = delta_auto true let default_auto = auto !default_search_depth [] [] -let full_auto n lems gl = +let delta_full_auto mod_delta n lems gl = let dbnames = Hintdbmap.dom !searchtable in let dbnames = list_subtract dbnames ["v62"] in let db_list = List.map (fun x -> searchtable_map x) dbnames in let hyps = pf_hyps gl in - tclTRY (search n db_list (make_local_hint_db lems gl) hyps) gl - + tclTRY (search n mod_delta db_list (make_local_hint_db false lems gl) hyps) gl + +let full_auto = delta_full_auto false +let new_full_auto = delta_full_auto true + let default_full_auto gl = full_auto !default_search_depth [] gl let gen_auto n lems dbnames = @@ -781,10 +870,11 @@ let gen_auto n lems dbnames = | None -> full_auto n lems | Some l -> auto n lems l -let inj_or_var = option_map (fun n -> ArgArg n) +let inj_or_var = Option.map (fun n -> ArgArg n) let h_auto n lems l = - Refiner.abstract_tactic (TacAuto (inj_or_var n,lems,l)) (gen_auto n lems l) + Refiner.abstract_tactic (TacAuto (inj_or_var n,List.map inj_open lems,l)) + (gen_auto n lems l) (**************************************************************************) (* The "destructing Auto" from Eduardo *) @@ -796,23 +886,23 @@ let h_auto n lems l = l'instant *) let default_search_decomp = ref 1 -let destruct_auto des_opt n gl = +let destruct_auto des_opt lems n gl = let hyps = pf_hyps gl in - search_gen des_opt n [searchtable_map "core"] - (make_local_hint_db [] gl) hyps gl + search_gen des_opt n false (List.map searchtable_map ["core";"extcore"]) + (make_local_hint_db false lems gl) hyps gl -let dautomatic des_opt n = tclTRY (destruct_auto des_opt n) +let dautomatic des_opt lems n = tclTRY (destruct_auto des_opt lems n) -let default_dauto = dautomatic !default_search_decomp !default_search_depth +let dauto (n,p) lems = + let p = match p with Some p -> p | None -> !default_search_decomp in + let n = match n with Some n -> n | None -> !default_search_depth in + dautomatic p lems n -let dauto = function - | None, None -> default_dauto - | Some n, None -> dautomatic !default_search_decomp n - | Some n, Some p -> dautomatic p n - | None, Some p -> dautomatic p !default_search_depth +let default_dauto = dauto (None,None) [] -let h_dauto (n,p) = - Refiner.abstract_tactic (TacDAuto (inj_or_var n,p)) (dauto (n,p)) +let h_dauto (n,p) lems = + Refiner.abstract_tactic (TacDAuto (inj_or_var n,p,List.map inj_open lems)) + (dauto (n,p) lems) (***************************************) (*** A new formulation of Auto *********) @@ -822,7 +912,7 @@ let make_resolve_any_hyp env sigma (id,_,ty) = let ents = map_succeed (fun f -> f (mkVar id,ty)) - [make_exact_entry; make_apply_entry env sigma (true,false)] + [make_exact_entry None; make_apply_entry env sigma (true,false) None] in ents @@ -866,14 +956,14 @@ let rec super_search n db_list local_db argl goal = (tclTHEN intro (fun g -> let hintl = pf_apply make_resolve_any_hyp g (pf_last_hyp g) in - super_search n db_list (Hint_db.add_list hintl local_db) + super_search n db_list (add_hint_list hintl local_db) argl g)) :: ((List.map (fun ntac -> tclTHEN ntac (super_search (n-1) db_list local_db argl)) - (possible_resolve db_list local_db (pf_concl goal))) + (possible_resolve false db_list local_db (pf_concl goal))) @ (compileAutoArgList (super_search (n-1) db_list local_db argl) argl))) goal @@ -884,7 +974,7 @@ let search_superauto n to_add argl g = (fun (id,c) -> add_named_decl (id, None, pf_type_of g c)) to_add empty_named_context in let db0 = list_map_append (make_resolve_hyp (pf_env g) (project g)) sigma in - let db = Hint_db.add_list db0 (make_local_hint_db [] g) in + let db = add_hint_list db0 (make_local_hint_db false [] g) in super_search n [Hintdbmap.find "core" !searchtable] db argl g let superauto n to_add argl = @@ -892,8 +982,8 @@ let superauto n to_add argl = let default_superauto g = superauto !default_search_depth [] [] g -let interp_to_add gl locqid = - let r = Nametab.global locqid in +let interp_to_add gl r = + let r = Syntax_def.locate_global_with_alias (qualid_of_reference r) in let id = id_of_global r in (next_ident_away id (pf_ids_of_hyps gl), constr_of_global r) diff --git a/tactics/auto.mli b/tactics/auto.mli index ecd20f0d..37406a30 100644 --- a/tactics/auto.mli +++ b/tactics/auto.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: auto.mli 7937 2006-01-28 19:58:11Z herbelin $ i*) +(*i $Id: auto.mli 10868 2008-04-29 12:30:25Z msozeau $ i*) (*i*) open Util @@ -58,10 +58,14 @@ module Hint_db : type hint_db_name = string -val searchtable_map : hint_db_name -> Hint_db.t +type hint_db = transparent_state * Hint_db.t + +val searchtable_map : hint_db_name -> hint_db val current_db_names : unit -> hint_db_name list +val add_hint_list : (global_reference * pri_auto_tactic) list -> hint_db -> hint_db + val add_hints : locality_flag -> hint_db_name list -> hints -> unit val print_searchtable : unit -> unit @@ -72,19 +76,19 @@ val print_hint_ref : global_reference -> unit val print_hint_db_by_name : hint_db_name -> unit -(* [make_exact_entry hint_name (c, ctyp)]. +(* [make_exact_entry pri (c, ctyp)]. [c] is the term given as an exact proof to solve the goal; - [ctyp] is the type of [hc]. *) + [ctyp] is the type of [c]. *) -val make_exact_entry : constr * constr -> global_reference * pri_auto_tactic +val make_exact_entry : int option -> constr * constr -> global_reference * pri_auto_tactic -(* [make_apply_entry (eapply,verbose) (c,cty)]. +(* [make_apply_entry (eapply,verbose) pri (c,cty)]. [eapply] is true if this hint will be used only with EApply; [c] is the term given as an exact proof to solve the goal; [cty] is the type of [hc]. *) val make_apply_entry : - env -> evar_map -> bool * bool -> constr * constr + env -> evar_map -> bool * bool -> int option -> constr * constr -> global_reference * pri_auto_tactic (* A constr which is Hint'ed will be: @@ -95,7 +99,7 @@ val make_apply_entry : has missing arguments. *) val make_resolves : - env -> evar_map -> bool -> constr -> + env -> evar_map -> bool * bool -> int option -> constr -> (global_reference * pri_auto_tactic) list (* [make_resolve_hyp hname htyp]. @@ -125,16 +129,21 @@ val set_extern_subst_tactic : -> unit (* Create a Hint database from the pairs (name, constr). - Useful to take the current goal hypotheses as hints *) + Useful to take the current goal hypotheses as hints; + Boolean tells if lemmas with evars are allowed *) -val make_local_hint_db : constr list -> goal sigma -> Hint_db.t +val make_local_hint_db : bool -> constr list -> goal sigma -> hint_db val priority : (int * 'a) list -> 'a list val default_search_depth : int ref +val auto_unif_flags : Unification.unify_flags + (* Try unification with the precompiled clause, then use registered Apply *) -val unify_resolve : (constr * clausenv) -> tactic +val unify_resolve_nodelta : (constr * clausenv) -> tactic + +val unify_resolve : Unification.unify_flags -> (constr * clausenv) -> tactic (* [ConclPattern concl pat tacast]: if the term concl matches the pattern pat, (in sense of @@ -147,12 +156,20 @@ val conclPattern : constr -> constr_pattern -> Tacexpr.glob_tactic_expr -> tacti val auto : int -> constr list -> hint_db_name list -> tactic +(* Auto with more delta. *) + +val new_auto : int -> constr list -> hint_db_name list -> tactic + (* auto with default search depth and with the hint database "core" *) val default_auto : tactic (* auto with all hint databases except the "v62" compatibility database *) val full_auto : int -> constr list -> tactic +(* auto with all hint databases except the "v62" compatibility database + and doing delta *) +val new_full_auto : int -> constr list -> tactic + (* auto with default search depth and with all hint databases except the "v62" compatibility database *) val default_full_auto : tactic @@ -174,11 +191,11 @@ val fmt_autotactic : auto_tactic -> Pp.std_ppcmds (*s The following is not yet up to date -- Papageno. *) (* DAuto *) -val dauto : int option * int option -> tactic +val dauto : int option * int option -> constr list -> tactic val default_search_decomp : int ref val default_dauto : tactic -val h_dauto : int option * int option -> tactic +val h_dauto : int option * int option -> constr list -> tactic (* SuperAuto *) type autoArguments = diff --git a/tactics/autorewrite.ml b/tactics/autorewrite.ml index 872b8697..1d096ec7 100644 --- a/tactics/autorewrite.ml +++ b/tactics/autorewrite.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: autorewrite.ml 9157 2006-09-21 15:10:08Z herbelin $ *) +(* $Id: autorewrite.ml 11094 2008-06-10 19:35:23Z herbelin $ *) open Equality open Hipattern @@ -17,7 +17,9 @@ open Tacticals open Tacinterp open Tactics open Term +open Termops open Util +open Rawterm open Vernacinterp open Tacexpr open Mod_subst @@ -80,9 +82,12 @@ let one_base general_rewrite_maybe_in tac_main bas = let autorewrite tac_main lbas = tclREPEAT_MAIN (tclPROGRESS (List.fold_left (fun tac bas -> - tclTHEN tac (one_base general_rewrite tac_main bas)) tclIDTAC lbas)) + tclTHEN tac + (one_base (fun dir -> general_rewrite dir all_occurrences) + tac_main bas)) + tclIDTAC lbas)) -let autorewrite_mutlti_in idl tac_main lbas : tactic = +let autorewrite_multi_in idl tac_main lbas : tactic = fun gl -> (* let's check at once if id exists (to raise the appropriate error) *) let _ = List.map (Tacmach.pf_get_hyp gl) idl in @@ -96,7 +101,7 @@ let autorewrite_mutlti_in idl tac_main lbas : tactic = | _ -> (* even the hypothesis id is missing *) error ("No such hypothesis : " ^ (string_of_id !id)) in - let gl' = general_rewrite_in dir !id cstr gl in + let gl' = general_rewrite_in dir all_occurrences !id cstr false gl in let gls = (fst gl').Evd.it in match gls with g::_ -> @@ -126,13 +131,15 @@ let autorewrite_mutlti_in idl tac_main lbas : tactic = tclTHEN tac (one_base (general_rewrite_in id) tac_main bas)) tclIDTAC lbas))) idl gl -let autorewrite_in id = autorewrite_mutlti_in [id] +let autorewrite_in id = autorewrite_multi_in [id] let gen_auto_multi_rewrite tac_main lbas cl = let try_do_hyps treat_id l = - autorewrite_mutlti_in (List.map treat_id l) tac_main lbas + autorewrite_multi_in (List.map treat_id l) tac_main lbas in - if cl.concl_occs <> [] then + if cl.concl_occs <> all_occurrences_expr & + cl.concl_occs <> no_occurrences_expr + then error "The \"at\" syntax isn't available yet for the autorewrite tactic" else let compose_tac t1 t2 = @@ -141,7 +148,7 @@ let gen_auto_multi_rewrite tac_main lbas cl = | _ -> tclTHENFIRST t1 t2 in compose_tac - (if cl.onconcl then autorewrite tac_main lbas else tclIDTAC) + (if cl.concl_occs <> no_occurrences_expr then autorewrite tac_main lbas else tclIDTAC) (match cl.onhyps with | Some l -> try_do_hyps (fun ((_,id),_) -> id) l | None -> @@ -153,11 +160,12 @@ let gen_auto_multi_rewrite tac_main lbas cl = let auto_multi_rewrite = gen_auto_multi_rewrite Refiner.tclIDTAC -let auto_multi_rewrite_with tac_main lbas cl gl = - match cl.Tacexpr.onconcl,cl.Tacexpr.onhyps with +let auto_multi_rewrite_with tac_main lbas cl gl = + let onconcl = cl.Tacexpr.concl_occs <> no_occurrences_expr in + match onconcl,cl.Tacexpr.onhyps with | false,Some [_] | true,Some [] | false,Some [] -> (* autorewrite with .... in clause using tac n'est sur que - si clause reprensente soit le but soit UNE hypothse + si clause represente soit le but soit UNE hypothese *) gen_auto_multi_rewrite tac_main lbas cl gl | _ -> @@ -207,7 +215,7 @@ let classify_hintrewrite (_,x) = Libobject.Substitute x (* Declaration of the Hint Rewrite library object *) -let (in_hintrewrite,out_hintrewrite)= +let (inHintRewrite,outHintRewrite)= Libobject.declare_object {(Libobject.default_object "HINT_REWRITE") with Libobject.cache_function = cache_hintrewrite; Libobject.load_function = (fun _ -> cache_hintrewrite); @@ -223,4 +231,4 @@ let add_rew_rules base lrul = (c,mkProp (* dummy value *), b,Tacinterp.glob_tactic t) ) lrul in - Lib.add_anonymous_leaf (in_hintrewrite (base,lrul)) + Lib.add_anonymous_leaf (inHintRewrite (base,lrul)) diff --git a/tactics/class_tactics.ml4 b/tactics/class_tactics.ml4 new file mode 100644 index 00000000..9a1a3042 --- /dev/null +++ b/tactics/class_tactics.ml4 @@ -0,0 +1,1692 @@ +(* -*- compile-command: "make -C .. bin/coqtop.byte" -*- *) +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* + let d = pf_last_hyp g' in + let hintl = make_resolve_hyp (pf_env g') (project g') d in + (e_trivial_fail_db db_list + (add_hint_list hintl local_db) g'))) :: + (List.map pi1 (e_trivial_resolve db_list local_db (pf_concl goal)) ) + in + tclFIRST (List.map tclCOMPLETE tacl) goal + +and e_my_find_search db_list local_db hdc concl = + let hdc = head_of_constr_reference hdc in + let hintl = + if occur_existential concl then + list_map_append + (fun (st, db) -> List.map (fun x -> (st, x)) (Hint_db.map_all hdc db)) + (local_db::db_list) + else + list_map_append + (fun (st, db) -> List.map (fun x -> (st, x)) (Hint_db.map_auto (hdc,concl) db)) + (local_db::db_list) + in + let tac_of_hint = + fun (st, {pri=b; pat = p; code=t}) -> + let tac = + match t with + | Res_pf (term,cl) -> unify_resolve st (term,cl) + | ERes_pf (term,cl) -> unify_e_resolve st (term,cl) + | Give_exact (c) -> e_give_exact c + | Res_pf_THEN_trivial_fail (term,cl) -> + tclTHEN (unify_e_resolve st (term,cl)) + (e_trivial_fail_db db_list local_db) + | Unfold_nth c -> unfold_in_concl [all_occurrences,c] + | Extern tacast -> conclPattern concl + (Option.get p) tacast + in + (tac,b,fmt_autotactic t) + in + List.map tac_of_hint hintl + +and e_trivial_resolve db_list local_db gl = + try + e_my_find_search db_list local_db + (List.hd (head_constr_bound gl [])) gl + with Bound | Not_found -> [] + +let e_possible_resolve db_list local_db gl = + try + e_my_find_search db_list local_db + (List.hd (head_constr_bound gl [])) gl + with Bound | Not_found -> [] + +let find_first_goal gls = + try first_goal gls with UserError _ -> assert false + + +type search_state = { + depth : int; (*r depth of search before failing *) + tacres : goal list sigma * validation; + pri : int; + last_tactic : std_ppcmds; + dblist : Auto.hint_db list; + localdb : Auto.hint_db list } + +let filter_hyp t = + match kind_of_term t with + | Evar _ | Meta _ | Sort _ -> false + | _ -> true + +let rec catchable = function + | Refiner.FailError _ -> true + | Stdpp.Exc_located (_, e) -> catchable e + | e -> Logic.catchable_exception e + +module SearchProblem = struct + + type state = search_state + + let debug = ref false + + let success s = (sig_it (fst s.tacres)) = [] + + let pr_ev evs ev = Printer.pr_constr_env (Evd.evar_env ev) (Evarutil.nf_evar evs ev.Evd.evar_concl) + + let pr_goals gls = + let evars = Evarutil.nf_evars (Refiner.project gls) in + prlist (pr_ev evars) (sig_it gls) + + let filter_tactics (glls,v) l = +(* if !debug then *) +(* (let _ = Proof_trees.db_pr_goal (List.hd (sig_it glls)) in *) +(* let evars = Evarutil.nf_evars (Refiner.project glls) in *) +(* msg (str"Goal: " ++ pr_ev evars (List.hd (sig_it glls)) ++ str"\n")); *) + let rec aux = function + | [] -> [] + | (tac,pri,pptac) :: tacl -> + try +(* if !debug then msg (str"\nTrying tactic: " ++ pptac ++ str"\n"); *) + let (lgls,ptl) = apply_tac_list tac glls in + let v' p = v (ptl p) in +(* if !debug then *) +(* begin *) +(* let evars = Evarutil.nf_evars (Refiner.project glls) in *) +(* msg (str"\nOn goal: " ++ pr_ev evars (List.hd (sig_it glls)) ++ str"\n"); *) +(* msg (hov 1 (pptac ++ str" gives: \n" ++ pr_goals lgls ++ str"\n")) *) +(* end; *) + ((lgls,v'),pri,pptac) :: aux tacl + with e when catchable e -> aux tacl + in aux l + + let nb_empty_evars s = + Evd.fold (fun ev evi acc -> if evi.evar_body = Evar_empty then succ acc else acc) s 0 + + (* Ordering of states is lexicographic on depth (greatest first) then + priority (lowest pri means higher priority), then number of remaining goals. *) + let compare s s' = + let d = s'.depth - s.depth in + let nbgoals s = + List.length (sig_it (fst s.tacres)) + + nb_empty_evars (sig_sig (fst s.tacres)) + in + if d <> 0 && d <> 1 then d else + let pri = s.pri - s'.pri in + if pri <> 0 then pri + else nbgoals s - nbgoals s' + + let branching s = + if s.depth = 0 then + [] + else + let lg = fst s.tacres in + let nbgl = List.length (sig_it lg) in + assert (nbgl > 0); + let g = find_first_goal lg in + let assumption_tacs = + let l = + filter_tactics s.tacres + (List.map + (fun id -> (Eauto.e_give_exact_constr (mkVar id), 0, + (str "exact" ++ spc () ++ pr_id id))) + (List.filter (fun id -> filter_hyp (pf_get_hyp_typ g id)) + (pf_ids_of_hyps g))) + in + List.map (fun (res,pri,pp) -> { s with tacres = res; pri = 0; + last_tactic = pp; localdb = List.tl s.localdb }) l + in +(* let intro_tac = *) +(* List.map *) +(* (fun ((lgls,_) as res,pri,pp) -> *) +(* let g' = first_goal lgls in *) +(* let hintl = *) +(* make_resolve_hyp (pf_env g') (project g') (pf_last_hyp g') *) +(* in *) +(* let ldb = Hint_db.add_list hintl (match s.localdb with [] -> assert false | hd :: _ -> hd) in *) +(* { s with tacres = res; *) +(* last_tactic = pp; *) +(* pri = pri; *) +(* localdb = ldb :: List.tl s.localdb }) *) +(* (filter_tactics s.tacres [Tactics.intro,1,(str "intro")]) *) +(* in *) + let possible_resolve ((lgls,_) as res, pri, pp) = + let nbgl' = List.length (sig_it lgls) in + if nbgl' < nbgl then + { s with tacres = res; last_tactic = pp; pri = pri; + localdb = List.tl s.localdb } + else + { s with + depth = pred s.depth; tacres = res; + last_tactic = pp; pri = pri; + localdb = + list_addn (nbgl'-nbgl) (List.hd s.localdb) s.localdb } + in + let rec_tacs = + let l = + filter_tactics s.tacres (e_possible_resolve s.dblist (List.hd s.localdb) (pf_concl g)) + in + List.map possible_resolve l + in + List.sort compare (assumption_tacs (* @intro_tac @ custom_tac *) @ rec_tacs) + + let pp s = + msg (hov 0 (str " depth=" ++ int s.depth ++ spc () ++ + s.last_tactic ++ str "\n")) + +end + +module Search = Explore.Make(SearchProblem) + + +let filter_pat c = + try + let morg = Nametab.global (Qualid (dummy_loc, qualid_of_string "Coq.Classes.Morphisms.Morphism")) in + let morc = constr_of_global morg in + match kind_of_term c with + | App(morph, [| t; r; m |]) when eq_constr morph morc -> + (fun y -> + (match y.pat with + Some (PApp (PRef mor, [| t'; r'; m' |])) when mor = morg -> + (match m' with + | PRef c -> if isConst m then eq_constr (constr_of_global c) m else false + | _ -> true) + | _ -> true)) + | _ -> fun _ -> true + with _ -> fun _ -> true + +let morphism_class = + lazy (class_info (Nametab.global (Qualid (dummy_loc, qualid_of_string "Coq.Classes.Morphisms.Morphism")))) + +let morphism_proxy_class = + lazy (class_info (Nametab.global (Qualid (dummy_loc, qualid_of_string "Coq.Classes.Morphisms.MorphismProxy")))) + +let filter c = + try let morc = constr_of_global (Nametab.global (Qualid (dummy_loc, qualid_of_string "Coq.Classes.Morphisms.Morphism"))) in + match kind_of_term c with + | App(morph, [| t; r; m |]) when eq_constr morph morc -> + (fun y -> + let (_, r) = decompose_prod y in + (match kind_of_term r with + App (morph', [| t'; r'; m' |]) when eq_constr morph' morc -> + (match kind_of_term m' with + | Rel n -> true + | Const c -> eq_constr m m' + | App _ -> true + | _ -> false) + | _ -> false)) + | _ -> fun _ -> true + with _ -> fun _ -> true + +let make_initial_state n gls dblist localdbs = + { depth = n; + tacres = gls; + pri = 0; + last_tactic = (mt ()); + dblist = dblist; + localdb = localdbs } + +let e_depth_search debug s = + let tac = if debug then + (SearchProblem.debug := true; Search.debug_depth_first) else Search.depth_first in + let s = tac s in + s.tacres + +let e_breadth_search debug s = + try + let tac = + if debug then Search.debug_breadth_first else Search.breadth_first + in let s = tac s in s.tacres + with Not_found -> error "EAuto: breadth first search failed" + +let e_search_auto debug (in_depth,p) lems db_list gls = + let sigma = Evd.sig_sig (fst gls) and gls' = Evd.sig_it (fst gls) in + let local_dbs = List.map (fun gl -> make_local_hint_db true lems ({it = gl; sigma = sigma})) gls' in + let state = make_initial_state p gls db_list local_dbs in + if in_depth then + e_depth_search debug state + else + e_breadth_search debug state + +let full_eauto debug n lems gls = + let dbnames = current_db_names () in + let dbnames = list_subtract dbnames ["v62"] in + let db_list = List.map searchtable_map dbnames in + e_search_auto debug n lems db_list gls + +let nf_goal (gl, valid) = + { gl with sigma = Evarutil.nf_evars gl.sigma }, valid + +let typeclasses_eauto debug n lems gls = + let dbnames = [typeclasses_db] in + let db_list = List.map + (fun x -> + try searchtable_map x + with Not_found -> (empty_transparent_state, Hint_db.empty)) + dbnames + in + e_search_auto debug n lems db_list gls + +exception Found of evar_map + +let valid goals p res_sigma l = + let evm = + List.fold_left2 + (fun sigma (ev, evi) prf -> + let cstr, obls = Refiner.extract_open_proof !res_sigma prf in + if not (Evd.is_defined sigma ev) then + Evd.define sigma ev cstr + else sigma) + !res_sigma goals l + in raise (Found evm) + +let resolve_all_evars_once debug (mode, depth) env p evd = + let evm = Evd.evars_of evd in + let goals, evm' = + Evd.fold + (fun ev evi (gls, evm) -> + if evi.evar_body = Evar_empty + && Typeclasses.is_resolvable evi + && p ev evi then ((ev,evi) :: gls, Evd.add evm ev (Typeclasses.mark_unresolvable evi)) else + (gls, Evd.add evm ev evi)) + evm ([], Evd.empty) + in + let goals = List.rev goals in + let gls = { it = List.map snd goals; sigma = evm' } in + let res_sigma = ref evm' in + let gls', valid' = typeclasses_eauto debug (mode, depth) [] (gls, valid goals p res_sigma) in + res_sigma := Evarutil.nf_evars (sig_sig gls'); + try ignore(valid' []); assert(false) + with Found evm' -> Evarutil.nf_evar_defs (Evd.evars_reset_evd evm' evd) + +exception FoundTerm of constr + +let resolve_one_typeclass env gl = + let gls = { it = [ Evd.make_evar (Environ.named_context_val env) gl ] ; sigma = Evd.empty } in + let valid x = raise (FoundTerm (fst (Refiner.extract_open_proof Evd.empty (List.hd x)))) in + let gls', valid' = typeclasses_eauto false (true, default_eauto_depth) [] (gls, valid) in + try ignore(valid' []); assert false with FoundTerm t -> + let term = Evarutil.nf_evar (sig_sig gls') t in + if occur_existential term then raise Not_found else term + +let has_undefined p oevd evd = + Evd.fold (fun ev evi has -> has || + (evi.evar_body = Evar_empty && p ev evi && + (try Typeclasses.is_resolvable (Evd.find oevd ev) with _ -> true))) + (Evd.evars_of evd) false + +let evars_of_term init c = + let rec evrec acc c = + match kind_of_term c with + | Evar (n, _) -> Intset.add n acc + | _ -> fold_constr evrec acc c + in + evrec init c + +let intersects s t = + Intset.exists (fun el -> Intset.mem el t) s + +let rec merge_deps deps = function + | [] -> [deps] + | hd :: tl -> + if intersects deps hd then + merge_deps (Intset.union deps hd) tl + else hd :: merge_deps deps tl + +let split_evars evm = + Evd.fold (fun ev evi acc -> + let deps = evars_of_term (Intset.singleton ev) evi.evar_concl in + merge_deps deps acc) + evm [] + +let select_evars evs evm = + Evd.fold (fun ev evi acc -> + if Intset.mem ev evs then Evd.add acc ev evi else acc) + evm Evd.empty + +let resolve_all_evars debug m env p oevd do_split fail = + let oevm = Evd.evars_of oevd in + let split = if do_split then split_evars (Evd.evars_of (Evd.undefined_evars oevd)) else [Intset.empty] in + let p = if do_split then + fun comp ev evi -> (Intset.mem ev comp || not (Evd.mem oevm ev)) && p ev evi + else fun _ -> p + in + let rec aux n p evd = + if has_undefined p oevm evd then + if n > 0 then + let evd' = resolve_all_evars_once debug m env p evd in + aux (pred n) p evd' + else None + else Some evd + in + let rec docomp evd = function + | [] -> evd + | comp :: comps -> + let res = try aux 3 (p comp) evd with Not_found -> None in + match res with + | None -> + if fail then + (* Unable to satisfy the constraints. *) + let evm = Evd.evars_of evd in + let evm = if do_split then select_evars comp evm else evm in + let _, ev = Evd.fold + (fun ev evi (b,acc) -> + (* focus on one instance if only one was searched for *) + if class_of_constr evi.evar_concl <> None then + if not b then + true, Some ev + else b, None + else b, acc) evm (false, None) + in + Typeclasses_errors.unsatisfiable_constraints env (Evd.evars_reset_evd evm evd) ev + else (* Best effort: do nothing *) oevd + | Some evd' -> docomp evd' comps + in docomp oevd split + +(* let resolve_all_evars debug m env p oevd = *) +(* let oevm = Evd.evars_of oevd in *) +(* try *) +(* let rec aux n evd = *) +(* if has_undefined p oevm evd then *) +(* if n > 0 then *) +(* let evd' = resolve_all_evars_once debug m env p evd in *) +(* aux (pred n) evd' *) +(* else None *) +(* else Some evd *) +(* in aux 3 oevd *) +(* with Not_found -> None *) + +VERNAC COMMAND EXTEND Typeclasses_Unfold_Settings +| [ "Typeclasses" "unfold" reference_list(cl) ] -> [ + add_hints false [typeclasses_db] (Vernacexpr.HintsUnfold cl) + ] +END + +(** Typeclass-based rewriting. *) + +let respect_proj = lazy (mkConst (snd (List.hd (Lazy.force morphism_class).cl_projs))) + +let make_dir l = make_dirpath (List.map id_of_string (List.rev l)) + +let try_find_reference dir s = + let sp = Libnames.make_path (make_dir ("Coq"::dir)) (id_of_string s) in + constr_of_global (Nametab.absolute_reference sp) + +let gen_constant dir s = Coqlib.gen_constant "Class_setoid" dir s +let coq_proj1 = lazy(gen_constant ["Init"; "Logic"] "proj1") +let coq_proj2 = lazy(gen_constant ["Init"; "Logic"] "proj2") +let iff = lazy (gen_constant ["Init"; "Logic"] "iff") +let coq_all = lazy (gen_constant ["Init"; "Logic"] "all") +let impl = lazy (gen_constant ["Program"; "Basics"] "impl") +let arrow = lazy (gen_constant ["Program"; "Basics"] "arrow") +let coq_id = lazy (gen_constant ["Program"; "Basics"] "id") + +let reflexive_type = lazy (try_find_reference ["Classes"; "RelationClasses"] "Reflexive") +let reflexive_proof = lazy (try_find_reference ["Classes"; "RelationClasses"] "reflexivity") + +let symmetric_type = lazy (try_find_reference ["Classes"; "RelationClasses"] "Symmetric") +let symmetric_proof = lazy (try_find_reference ["Classes"; "RelationClasses"] "symmetry") + +let transitive_type = lazy (try_find_reference ["Classes"; "RelationClasses"] "Transitive") +let transitive_proof = lazy (try_find_reference ["Classes"; "RelationClasses"] "transitivity") + +let coq_inverse = lazy (gen_constant (* ["Classes"; "RelationClasses"] "inverse" *) + ["Program"; "Basics"] "flip") + +let inverse car rel = mkApp (Lazy.force coq_inverse, [| car ; car; mkProp; rel |]) + +let complement = lazy (gen_constant ["Classes"; "RelationClasses"] "complement") +let pointwise_relation = lazy (gen_constant ["Classes"; "RelationClasses"] "pointwise_relation") + +let respectful_dep = lazy (gen_constant ["Classes"; "Morphisms"] "respectful_dep") +let respectful = lazy (gen_constant ["Classes"; "Morphisms"] "respectful") + +let equivalence = lazy (gen_constant ["Classes"; "RelationClasses"] "Equivalence") +let default_relation = lazy (gen_constant ["Classes"; "SetoidTactics"] "DefaultRelation") + +let coq_relation = lazy (gen_constant ["Relations";"Relation_Definitions"] "relation") +let mk_relation a = mkApp (Lazy.force coq_relation, [| a |]) +let coq_relationT = lazy (gen_constant ["Classes";"Relations"] "relationT") + +let setoid_refl_proj = lazy (gen_constant ["Classes"; "SetoidClass"] "Equivalence_Reflexive") + +let setoid_equiv = lazy (gen_constant ["Classes"; "SetoidClass"] "equiv") +let setoid_morphism = lazy (gen_constant ["Classes"; "SetoidClass"] "setoid_morphism") +let setoid_refl_proj = lazy (gen_constant ["Classes"; "SetoidClass"] "Equivalence_Reflexive") + +let arrow_morphism a b = + if isprop a && isprop b then + Lazy.force impl + else + mkApp(Lazy.force arrow, [|a;b|]) + +let setoid_refl pars x = + applistc (Lazy.force setoid_refl_proj) (pars @ [x]) + +let morphism_type = lazy (constr_of_global (Lazy.force morphism_class).cl_impl) + +let morphism_proxy_type = lazy (constr_of_global (Lazy.force morphism_proxy_class).cl_impl) + +exception Found of (constr * constr * (types * types) list * constr * constr array * + (constr * (constr * constr * constr * constr)) option array) + +let is_equiv env sigma t = + isConst t && Reductionops.is_conv env sigma (Lazy.force setoid_equiv) t + +let split_head = function + hd :: tl -> hd, tl + | [] -> assert(false) + +exception DependentMorphism + +let build_signature isevars env m (cstrs : 'a option list) (finalcstr : 'a Lazy.t option) (f : 'a -> constr) = + let new_evar isevars env t = + Evarutil.e_new_evar isevars env + (* ~src:(dummy_loc, ImplicitArg (ConstRef (Lazy.force respectful), (n, Some na))) *) t + in + let mk_relty ty obj = + match obj with + | None -> + let relty = mk_relation ty in + new_evar isevars env relty + | Some x -> f x + in + let rec aux env ty l = + let t = Reductionops.whd_betadeltaiota env (Evd.evars_of !isevars) ty in + match kind_of_term t, l with + | Prod (na, ty, b), obj :: cstrs -> + if dependent (mkRel 1) ty then raise DependentMorphism; + let (b, arg, evars) = aux (Environ.push_rel (na, None, ty) env) b cstrs in + let ty = Reductionops.nf_betaiota ty in + let relty = mk_relty ty obj in + let arg' = mkApp (Lazy.force respectful, [| ty ; b ; relty ; arg |]) in + mkProd(na, ty, b), arg', (ty, relty) :: evars + | _, obj :: _ -> anomaly "build_signature: not enough products" + | _, [] -> + (match finalcstr with + None -> + let t = Reductionops.nf_betaiota ty in + let rel = mk_relty t None in + t, rel, [t, rel] + | Some codom -> let (t, rel) = Lazy.force codom in + t, rel, [t, rel]) + in aux env m cstrs + +let morphism_proof env evars carrier relation x = + let goal = + mkApp (Lazy.force morphism_proxy_type, [| carrier ; relation; x |]) + in Evarutil.e_new_evar evars env goal + +let find_class_proof proof_type proof_method env carrier relation = + try + let goal = + mkApp (Lazy.force proof_type, [| carrier ; relation |]) + in + let inst = resolve_one_typeclass env goal in + mkApp (Lazy.force proof_method, [| carrier ; relation ; inst |]) + with e when Logic.catchable_exception e -> raise Not_found + +let reflexive_proof env = find_class_proof reflexive_type reflexive_proof env +let symmetric_proof env = find_class_proof symmetric_type symmetric_proof env +let transitive_proof env = find_class_proof transitive_type transitive_proof env + +exception FoundInt of int + +let array_find (arr: 'a array) (pred: int -> 'a -> bool): int = + try + for i=0 to Array.length arr - 1 do if pred i (arr.(i)) then raise (FoundInt i) done; + raise Not_found + with FoundInt i -> i + +let resolve_morphism env sigma oldt m ?(fnewt=fun x -> x) args args' cstr evars = + let morph_instance, proj, sigargs, m', args, args' = + let first = try (array_find args' (fun i b -> b <> None)) with Not_found -> raise (Invalid_argument "resolve_morphism") in + let morphargs, morphobjs = array_chop first args in + let morphargs', morphobjs' = array_chop first args' in + let appm = mkApp(m, morphargs) in + let appmtype = Typing.type_of env sigma appm in + let cstrs = List.map (function None -> None | Some (_, (a, r, _, _)) -> Some (a, r)) (Array.to_list morphobjs') in + let appmtype', signature, sigargs = build_signature evars env appmtype cstrs cstr (fun (a, r) -> r) in + let cl_args = [| appmtype' ; signature ; appm |] in + let app = mkApp (Lazy.force morphism_type, cl_args) in + let morph = Evarutil.e_new_evar evars env app in + let proj = + mkApp (Lazy.force respect_proj, + Array.append cl_args [|morph|]) + in + morph, proj, sigargs, appm, morphobjs, morphobjs' + in + let projargs, respars, typeargs = + array_fold_left2 + (fun (acc, sigargs, typeargs') x y -> + let (carrier, relation), sigargs = split_head sigargs in + match y with + None -> + let proof = morphism_proof env evars carrier relation x in + [ proof ; x ; x ] @ acc, sigargs, x :: typeargs' + | Some (p, (_, _, _, t')) -> + [ p ; t'; x ] @ acc, sigargs, t' :: typeargs') + ([], sigargs, []) args args' + in + let proof = applistc proj (List.rev projargs) in + let newt = applistc m' (List.rev typeargs) in + match respars with + [ a, r ] -> (proof, (a, r, oldt, fnewt newt)) + | _ -> assert(false) + +(* Adapted from setoid_replace. *) + +type hypinfo = { + cl : clausenv; + prf : constr; + car : constr; + rel : constr; + l2r : bool; + c1 : constr; + c2 : constr; + c : constr option; + abs : (constr * types) option; +} + +let evd_convertible env evd x y = + try ignore(Evarconv.the_conv_x env x y evd); true + with _ -> false + +let decompose_setoid_eqhyp env sigma c left2right = + let ctype = Typing.type_of env sigma c in + let eqclause = Clenv.mk_clenv_from_env env sigma None (c,ctype) in + let (equiv, args) = decompose_app (Clenv.clenv_type eqclause) in + let rec split_last_two = function + | [c1;c2] -> [],(c1, c2) + | x::y::z -> + let l,res = split_last_two (y::z) in x::l, res + | _ -> error "The term provided is not an applied relation" in + let others,(c1,c2) = split_last_two args in + let ty1, ty2 = + Typing.mtype_of env eqclause.evd c1, Typing.mtype_of env eqclause.evd c2 + in + if not (evd_convertible env eqclause.evd ty1 ty2) then + error "The term does not end with an applied homogeneous relation" + else + { cl=eqclause; prf=(Clenv.clenv_value eqclause); + car=ty1; rel=mkApp (equiv, Array.of_list others); + l2r=left2right; c1=c1; c2=c2; c=Some c; abs=None } + +let rewrite_unif_flags = { + Unification.modulo_conv_on_closed_terms = None; + Unification.use_metas_eagerly = true; + Unification.modulo_delta = empty_transparent_state; +} + +let conv_transparent_state = (Idpred.empty, Cpred.full) + +let rewrite2_unif_flags = { + Unification.modulo_conv_on_closed_terms = Some conv_transparent_state; + Unification.use_metas_eagerly = true; + Unification.modulo_delta = empty_transparent_state; +} + +let convertible env evd x y = + Reductionops.is_conv env (Evd.evars_of evd) x y + +let allowK = true + +let refresh_hypinfo env sigma hypinfo = + if !hypinfo.abs = None then + let {l2r=l2r; c = c} = !hypinfo in + match c with + | Some c -> + (* Refresh the clausenv to not get the same meta twice in the goal. *) + hypinfo := decompose_setoid_eqhyp env sigma c l2r; + | _ -> () + else () + +let unify_eqn env sigma hypinfo t = + try + let {cl=cl; prf=prf; car=car; rel=rel; l2r=l2r; c1=c1; c2=c2; c=c; abs=abs} = !hypinfo in + let env', prf, c1, c2, car, rel = + let left = if l2r then c1 else c2 in + match abs with + Some (absprf, absprfty) -> + (*if convertible env cl.evd left t then + cl, prf, c1, c2, car, rel + else raise Not_found*) + let env' = clenv_unify allowK ~flags:rewrite2_unif_flags CONV left t cl in + let env' = + let mvs = clenv_dependent false env' in + clenv_pose_metas_as_evars env' mvs + in + let c1 = Clenv.clenv_nf_meta env' c1 + and c2 = Clenv.clenv_nf_meta env' c2 + and car = Clenv.clenv_nf_meta env' car + and rel = Clenv.clenv_nf_meta env' rel in + hypinfo := { !hypinfo with + cl = env'; + abs = Some (Clenv.clenv_value env', Clenv.clenv_type env') }; + env', prf, c1, c2, car, rel + | None -> + let env' = + try clenv_unify allowK ~flags:rewrite_unif_flags + CONV left t cl + with Pretype_errors.PretypeError _ -> + (* For Ring essentially, only when doing setoid_rewrite *) + clenv_unify allowK ~flags:rewrite2_unif_flags + CONV left t cl + in + let env' = + let mvs = clenv_dependent false env' in + clenv_pose_metas_as_evars env' mvs + in + let c1 = Clenv.clenv_nf_meta env' c1 + and c2 = Clenv.clenv_nf_meta env' c2 + and car = Clenv.clenv_nf_meta env' car + and rel = Clenv.clenv_nf_meta env' rel in + let prf = Clenv.clenv_value env' in + let ty1 = Typing.mtype_of env'.env env'.evd c1 + and ty2 = Typing.mtype_of env'.env env'.evd c2 + in + if convertible env env'.evd ty1 ty2 then ( + if occur_meta prf then refresh_hypinfo env sigma hypinfo; + env', prf, c1, c2, car, rel) + else raise Reduction.NotConvertible + in + let res = + if l2r then (prf, (car, rel, c1, c2)) + else + try (mkApp (symmetric_proof env car rel, [| c1 ; c2 ; prf |]), (car, rel, c2, c1)) + with Not_found -> + (prf, (car, inverse car rel, c2, c1)) + in Some (env', res) + with _ -> None + +let unfold_impl t = + match kind_of_term t with + | App (arrow, [| a; b |])(* when eq_constr arrow (Lazy.force impl) *) -> + mkProd (Anonymous, a, lift 1 b) + | _ -> assert false + +let unfold_id t = + match kind_of_term t with + | App (id, [| a; b |]) (* when eq_constr id (Lazy.force coq_id) *) -> b + | _ -> assert false + +let unfold_all t = + match kind_of_term t with + | App (id, [| a; b |]) (* when eq_constr id (Lazy.force coq_all) *) -> + (match kind_of_term b with + | Lambda (n, ty, b) -> mkProd (n, ty, b) + | _ -> assert false) + | _ -> assert false + +let decomp_prod env evm n c = + snd (Reductionops.decomp_n_prod env evm n c) + +let rec decomp_pointwise n c = + if n = 0 then c + else + match kind_of_term c with + | App (pointwise, [| a; b; relb |]) -> decomp_pointwise (pred n) relb + | _ -> raise Not_found + +let lift_cstr env sigma evars args cstr = + let cstr () = + let start = + match cstr with + | Some codom -> Lazy.force codom + | None -> let car = Evarutil.e_new_evar evars env (new_Type ()) in + let rel = Evarutil.e_new_evar evars env (mk_relation car) in + (car, rel) + in + Array.fold_right + (fun arg (car, rel) -> + let ty = Typing.type_of env sigma arg in + let car' = mkProd (Anonymous, ty, car) in + let rel' = mkApp (Lazy.force pointwise_relation, [| ty; car; rel |]) in + (car', rel')) + args start + in Some (Lazy.lazy_from_fun cstr) + +let unlift_cstr env sigma = function + | None -> None + | Some codom -> + let cstr () = + let car, rel = Lazy.force codom in + decomp_prod env sigma 1 car, decomp_pointwise 1 rel + in Some (Lazy.lazy_from_fun cstr) + +type rewrite_flags = { under_lambdas : bool; on_morphisms : bool } + +let default_flags = { under_lambdas = true; on_morphisms = true; } + +let build_new gl env sigma flags loccs hypinfo concl cstr evars = + let (nowhere_except_in,occs) = loccs in + let is_occ occ = + if nowhere_except_in then List.mem occ occs else not (List.mem occ occs) in + let rec aux env t occ cstr = + let unif = unify_eqn env sigma hypinfo t in + let occ = if unif = None then occ else succ occ in + match unif with + | Some (env', (prf, hypinfo as x)) when is_occ occ -> + begin + evars := Evd.evar_merge !evars + (Evd.evars_of (Evd.undefined_evars (Evarutil.nf_evar_defs env'.evd))); + match cstr with + | None -> Some x, occ + | Some _ -> + let (car, r, orig, dest) = hypinfo in + let res = + resolve_morphism env sigma t ~fnewt:unfold_id + (mkApp (Lazy.force coq_id, [| car |])) + [| orig |] [| Some x |] cstr evars + in Some res, occ + end + | _ -> + match kind_of_term t with + | App (m, args) -> + let rewrite_args occ = + let args', occ = + Array.fold_left + (fun (acc, occ) arg -> let res, occ = aux env arg occ None in (res :: acc, occ)) + ([], occ) args + in + let res = + if List.for_all (fun x -> x = None) args' then None + else + let args' = Array.of_list (List.rev args') in + (Some (resolve_morphism env sigma t m args args' cstr evars)) + in res, occ + in + if flags.on_morphisms then + let m', occ = aux env m occ (lift_cstr env sigma evars args cstr) in + match m' with + | None -> rewrite_args occ (* Standard path, try rewrite on arguments *) + | Some (prf, (car, rel, c1, c2)) -> + (* We rewrote the function and get a proof of pointwise rel for the arguments. + We just apply it. *) + let nargs = Array.length args in + let res = + mkApp (prf, args), + (decomp_prod env (Evd.evars_of !evars) nargs car, + decomp_pointwise nargs rel, mkApp(c1, args), mkApp(c2, args)) + in Some res, occ + else rewrite_args occ + + | Prod (n, x, b) when not (dependent (mkRel 1) b) -> + let x', occ = aux env x occ None in +(* if x' = None && flags.under_lambdas then *) +(* let lam = mkLambda (n, x, b) in *) +(* let lam', occ = aux env lam occ None in *) +(* let res = *) +(* match lam' with *) +(* | None -> None *) +(* | Some (prf, (car, rel, c1, c2)) -> *) +(* Some (resolve_morphism env sigma t *) +(* ~fnewt:unfold_all *) +(* (Lazy.force coq_all) [| x ; lam |] [| None; lam' |] *) +(* cstr evars) *) +(* in res, occ *) +(* else *) + let b = subst1 mkProp b in + let b', occ = aux env b occ None in + let res = + if x' = None && b' = None then None + else + Some (resolve_morphism env sigma t + ~fnewt:unfold_impl + (arrow_morphism (Typing.type_of env sigma x) (Typing.type_of env sigma b)) + [| x ; b |] [| x' ; b' |] + cstr evars) + in res, occ + + | Prod (n, ty, b) -> + let lam = mkLambda (n, ty, b) in + let lam', occ = aux env lam occ None in + let res = + match lam' with + | None -> None + | Some (prf, (car, rel, c1, c2)) -> + Some (resolve_morphism env sigma t + ~fnewt:unfold_all + (Lazy.force coq_all) [| ty ; lam |] [| None; lam' |] + cstr evars) + in res, occ + + | Lambda (n, t, b) when flags.under_lambdas -> + let env' = Environ.push_rel (n, None, t) env in + refresh_hypinfo env' sigma hypinfo; + let b', occ = aux env' b occ (unlift_cstr env sigma cstr) in + let res = + match b' with + | None -> None + | Some (prf, (car, rel, c1, c2)) -> + let prf' = mkLambda (n, t, prf) in + let car' = mkProd (n, t, car) in + let rel' = mkApp (Lazy.force pointwise_relation, [| t; car; rel |]) in + let c1' = mkLambda(n, t, c1) and c2' = mkLambda (n, t, c2) in + Some (prf', (car', rel', c1', c2')) + in res, occ + | _ -> None, occ + in + let eq,nbocc_min_1 = aux env concl 0 cstr in + let rest = List.filter (fun o -> o > nbocc_min_1) occs in + if rest <> [] then error_invalid_occurrence rest; + eq + +let resolve_typeclass_evars d p env evd onlyargs split fail = + let pred = + if onlyargs then + (fun ev evi -> Typeclasses.is_implicit_arg (snd (Evd.evar_source ev evd)) && + class_of_constr evi.Evd.evar_concl <> None) + else + (fun ev evi -> class_of_constr evi.Evd.evar_concl <> None) + in resolve_all_evars d p env pred evd split fail + +let cl_rewrite_clause_aux ?(flags=default_flags) hypinfo goal_meta occs clause gl = + let concl, is_hyp = + match clause with + Some ((_, id), _) -> pf_get_hyp_typ gl id, Some id + | None -> pf_concl gl, None + in + let cstr = + match is_hyp with + None -> (mkProp, inverse mkProp (Lazy.force impl)) + | Some _ -> (mkProp, Lazy.force impl) + in + let evars = ref (Evd.create_evar_defs Evd.empty) in + let env = pf_env gl in + let sigma = project gl in + let eq = build_new gl env sigma flags occs hypinfo concl (Some (Lazy.lazy_from_val cstr)) evars + in + match eq with + | Some (p, (_, _, oldt, newt)) -> + (try + evars := Typeclasses.resolve_typeclasses env ~split:false ~fail:true !evars; + let p = Evarutil.nf_isevar !evars p in + let newt = Evarutil.nf_isevar !evars newt in + let undef = Evd.undefined_evars !evars in + let abs = Option.map (fun (x, y) -> Evarutil.nf_isevar !evars x, + Evarutil.nf_isevar !evars y) !hypinfo.abs in + let rewtac = + match is_hyp with + | Some id -> + let term = + match abs with + | None -> p + | Some (t, ty) -> + mkApp (mkLambda (Name (id_of_string "lemma"), ty, p), [| t |]) + in + cut_replacing id newt + (fun x -> Tactics.refine (mkApp (term, [| mkVar id |]))) + | None -> + (match abs with + | None -> + let name = next_name_away_with_default "H" Anonymous (pf_ids_of_hyps gl) in + tclTHENLAST + (Tacmach.internal_cut_no_check name newt) + (tclTHEN (Tactics.revert [name]) (Tactics.refine p)) + | Some (t, ty) -> + Tactics.refine + (mkApp (mkLambda (Name (id_of_string "newt"), newt, + mkLambda (Name (id_of_string "lemma"), ty, + mkApp (p, [| mkRel 2 |]))), + [| mkMeta goal_meta; t |]))) + in + let evartac = + let evd = Evd.evars_of undef in + if not (evd = Evd.empty) then Refiner.tclEVARS (Evd.merge sigma evd) + else tclIDTAC + in tclTHENLIST [evartac; rewtac] gl + with + | Stdpp.Exc_located (_, TypeClassError (env, (UnsatisfiableConstraints _ as e))) + | TypeClassError (env, (UnsatisfiableConstraints _ as e)) -> + tclFAIL 0 (str" setoid rewrite failed: unable to satisfy the rewriting constraints." + ++ fnl () ++ Himsg.explain_typeclass_error env e) gl) + (* | Not_found -> *) + (* tclFAIL 0 (str" setoid rewrite failed: unable to satisfy the rewriting constraints.") gl) *) + | None -> + let {l2r=l2r; c1=x; c2=y} = !hypinfo in + raise (Pretype_errors.PretypeError + (pf_env gl, + Pretype_errors.NoOccurrenceFound ((if l2r then x else y), is_hyp))) + (* tclFAIL 1 (str"setoid rewrite failed") gl *) + +let cl_rewrite_clause_aux ?(flags=default_flags) hypinfo goal_meta occs clause gl = + try cl_rewrite_clause_aux ~flags hypinfo goal_meta occs clause gl + with DependentMorphism -> tclFAIL 0 (str " setoid rewrite failed: cannot handle dependent morphisms") gl + +let cl_rewrite_clause c left2right occs clause gl = + init_setoid (); + let meta = Evarutil.new_meta() in + let gl = { gl with sigma = Typeclasses.mark_unresolvables gl.sigma } in + let hypinfo = ref (decompose_setoid_eqhyp (pf_env gl) (project gl) c left2right) in + cl_rewrite_clause_aux hypinfo meta occs clause gl + +open Genarg +open Extraargs + +let occurrences_of = function + | n::_ as nl when n < 0 -> (false,List.map abs nl) + | nl -> + if List.exists (fun n -> n < 0) nl then + error "Illegal negative occurrence number"; + (true,nl) + +TACTIC EXTEND class_rewrite +| [ "clrewrite" orient(o) constr(c) "in" hyp(id) "at" occurrences(occ) ] -> [ cl_rewrite_clause c o (occurrences_of occ) (Some (([],id), [])) ] +| [ "clrewrite" orient(o) constr(c) "at" occurrences(occ) "in" hyp(id) ] -> [ cl_rewrite_clause c o (occurrences_of occ) (Some (([],id), [])) ] +| [ "clrewrite" orient(o) constr(c) "in" hyp(id) ] -> [ cl_rewrite_clause c o all_occurrences (Some (([],id), [])) ] +| [ "clrewrite" orient(o) constr(c) "at" occurrences(occ) ] -> [ cl_rewrite_clause c o (occurrences_of occ) None ] +| [ "clrewrite" orient(o) constr(c) ] -> [ cl_rewrite_clause c o all_occurrences None ] +END + + +let clsubstitute o c = + let is_tac id = match kind_of_term c with Var id' when id' = id -> true | _ -> false in + Tacticals.onAllClauses + (fun cl -> + match cl with + | Some ((_,id),_) when is_tac id -> tclIDTAC + | _ -> tclTRY (cl_rewrite_clause c o all_occurrences cl)) + +TACTIC EXTEND substitute +| [ "substitute" orient(o) constr(c) ] -> [ clsubstitute o c ] +END + +let pr_debug _prc _prlc _prt b = + if b then Pp.str "debug" else Pp.mt() + +ARGUMENT EXTEND debug TYPED AS bool PRINTED BY pr_debug +| [ "debug" ] -> [ true ] +| [ ] -> [ false ] +END + +let pr_mode _prc _prlc _prt m = + match m with + Some b -> + if b then Pp.str "depth-first" else Pp.str "breadth-fist" + | None -> Pp.mt() + +ARGUMENT EXTEND search_mode TYPED AS bool option PRINTED BY pr_mode +| [ "dfs" ] -> [ Some true ] +| [ "bfs" ] -> [ Some false ] +| [] -> [ None ] +END + +let pr_depth _prc _prlc _prt = function + Some i -> Util.pr_int i + | None -> Pp.mt() + +ARGUMENT EXTEND depth TYPED AS int option PRINTED BY pr_depth +| [ int_or_var_opt(v) ] -> [ match v with Some (ArgArg i) -> Some i | _ -> None ] +END + +let solve_inst debug mode depth env evd onlyargs split fail = + resolve_typeclass_evars debug (mode, depth) env evd onlyargs split fail + +let _ = + Typeclasses.solve_instanciations_problem := + solve_inst false true default_eauto_depth + +VERNAC COMMAND EXTEND Typeclasses_Settings + | [ "Typeclasses" "eauto" ":=" debug(d) search_mode(s) depth(depth) ] -> [ + let mode = match s with Some t -> t | None -> true in + let depth = match depth with Some i -> i | None -> default_eauto_depth in + Typeclasses.solve_instanciations_problem := + solve_inst d mode depth + ] +END + +TACTIC EXTEND typeclasses_eauto +| [ "typeclasses" "eauto" debug(d) search_mode(s) depth(depth) ] -> [ + let mode = match s with Some t -> t | None -> true in + let depth = match depth with Some i -> i | None -> default_eauto_depth in + fun gl -> + let gls = {it = [sig_it gl]; sigma = project gl} in + let vals v = List.hd v in + typeclasses_eauto d (mode, depth) [] (gls, vals) ] +END + + +(* fun gl -> *) +(* let env = pf_env gl in *) +(* let sigma = project gl in *) +(* let proj = sig_it gl in *) +(* let evd = Evd.create_evar_defs (Evd.add Evd.empty 1 proj) in *) +(* let mode = match s with Some t -> t | None -> true in *) +(* let depth = match depth with Some i -> i | None -> default_eauto_depth in *) +(* match resolve_typeclass_evars d (mode, depth) env evd false with *) +(* | Some evd' -> *) +(* let goal = Evd.find (Evd.evars_of evd') 1 in *) +(* (match goal.evar_body with *) +(* | Evar_empty -> tclIDTAC gl *) +(* | Evar_defined b -> refine b gl) *) +(* | None -> tclIDTAC gl *) +(* ] *) + +let _ = + Classes.refine_ref := Refine.refine + +(* Compatibility with old Setoids *) + +TACTIC EXTEND setoid_rewrite + [ "setoid_rewrite" orient(o) constr(c) ] + -> [ cl_rewrite_clause c o all_occurrences None ] + | [ "setoid_rewrite" orient(o) constr(c) "in" hyp(id) ] -> + [ cl_rewrite_clause c o all_occurrences (Some (([],id), []))] + | [ "setoid_rewrite" orient(o) constr(c) "at" occurrences(occ) ] -> + [ cl_rewrite_clause c o (occurrences_of occ) None] + | [ "setoid_rewrite" orient(o) constr(c) "at" occurrences(occ) "in" hyp(id)] -> + [ cl_rewrite_clause c o (occurrences_of occ) (Some (([],id), []))] + | [ "setoid_rewrite" orient(o) constr(c) "in" hyp(id) "at" occurrences(occ)] -> + [ cl_rewrite_clause c o (occurrences_of occ) (Some (([],id), []))] +END + +(* let solve_obligation lemma = *) +(* tclTHEN (Tacinterp.interp (Tacexpr.TacAtom (dummy_loc, Tacexpr.TacAnyConstructor None))) *) +(* (eapply_with_bindings (Constrintern.interp_constr Evd.empty (Global.env()) lemma, NoBindings)) *) + +let mkappc s l = CAppExpl (dummy_loc,(None,(Libnames.Ident (dummy_loc,id_of_string s))),l) + +let declare_an_instance n s args = + ((dummy_loc,Name n), Explicit, + CAppExpl (dummy_loc, (None, Qualid (dummy_loc, qualid_of_string s)), + args)) + +let declare_instance a aeq n s = declare_an_instance n s [a;aeq] + +let anew_instance binders instance fields = + new_instance binders instance fields + ~on_free_vars:Classes.fail_on_free_vars + None + +let require_library dirpath = + let qualid = (dummy_loc, Libnames.qualid_of_dirpath (Libnames.dirpath_of_string dirpath)) in + Library.require_library [qualid] (Some false) + +let declare_instance_refl binders a aeq n lemma = + let instance = declare_instance a aeq (add_suffix n "_Reflexive") "Coq.Classes.RelationClasses.Reflexive" + in anew_instance binders instance + [((dummy_loc,id_of_string "reflexivity"),[],lemma)] + +let declare_instance_sym binders a aeq n lemma = + let instance = declare_instance a aeq (add_suffix n "_Symmetric") "Coq.Classes.RelationClasses.Symmetric" + in anew_instance binders instance + [((dummy_loc,id_of_string "symmetry"),[],lemma)] + +let declare_instance_trans binders a aeq n lemma = + let instance = declare_instance a aeq (add_suffix n "_Transitive") "Coq.Classes.RelationClasses.Transitive" + in anew_instance binders instance + [((dummy_loc,id_of_string "transitivity"),[],lemma)] + +let constr_tac = Tacinterp.interp (Tacexpr.TacAtom (dummy_loc, Tacexpr.TacAnyConstructor (false,None))) + +let declare_relation ?(binders=[]) a aeq n refl symm trans = + init_setoid (); + match (refl,symm,trans) with + (None, None, None) -> + let instance = declare_instance a aeq n "Coq.Classes.SetoidTactics.DefaultRelation" + in ignore(anew_instance binders instance []) + | (Some lemma1, None, None) -> + ignore (declare_instance_refl binders a aeq n lemma1) + | (None, Some lemma2, None) -> + ignore (declare_instance_sym binders a aeq n lemma2) + | (None, None, Some lemma3) -> + ignore (declare_instance_trans binders a aeq n lemma3) + | (Some lemma1, Some lemma2, None) -> + ignore (declare_instance_refl binders a aeq n lemma1); + ignore (declare_instance_sym binders a aeq n lemma2) + | (Some lemma1, None, Some lemma3) -> + let _lemma_refl = declare_instance_refl binders a aeq n lemma1 in + let _lemma_trans = declare_instance_trans binders a aeq n lemma3 in + let instance = declare_instance a aeq n "Coq.Classes.RelationClasses.PreOrder" + in ignore( + anew_instance binders instance + [((dummy_loc,id_of_string "PreOrder_Reflexive"), [], lemma1); + ((dummy_loc,id_of_string "PreOrder_Transitive"),[], lemma3)]) + | (None, Some lemma2, Some lemma3) -> + let _lemma_sym = declare_instance_sym binders a aeq n lemma2 in + let _lemma_trans = declare_instance_trans binders a aeq n lemma3 in + let instance = declare_instance a aeq n "Coq.Classes.RelationClasses.PER" + in ignore( + anew_instance binders instance + [((dummy_loc,id_of_string "PER_Symmetric"), [], lemma2); + ((dummy_loc,id_of_string "PER_Transitive"),[], lemma3)]) + | (Some lemma1, Some lemma2, Some lemma3) -> + let _lemma_refl = declare_instance_refl binders a aeq n lemma1 in + let _lemma_sym = declare_instance_sym binders a aeq n lemma2 in + let _lemma_trans = declare_instance_trans binders a aeq n lemma3 in + let instance = declare_instance a aeq n "Coq.Classes.RelationClasses.Equivalence" + in ignore( + anew_instance binders instance + [((dummy_loc,id_of_string "Equivalence_Reflexive"), [], lemma1); + ((dummy_loc,id_of_string "Equivalence_Symmetric"), [], lemma2); + ((dummy_loc,id_of_string "Equivalence_Transitive"),[], lemma3)]) + +type 'a binders_let_argtype = (local_binder list, 'a) Genarg.abstract_argument_type + +let (wit_binders_let : Genarg.tlevel binders_let_argtype), + (globwit_binders_let : Genarg.glevel binders_let_argtype), + (rawwit_binders_let : Genarg.rlevel binders_let_argtype) = + Genarg.create_arg "binders_let" + +open Pcoq.Constr + +VERNAC COMMAND EXTEND AddRelation + | [ "Add" "Relation" constr(a) constr(aeq) "reflexivity" "proved" "by" constr(lemma1) + "symmetry" "proved" "by" constr(lemma2) "as" ident(n) ] -> + [ declare_relation a aeq n (Some lemma1) (Some lemma2) None ] + + | [ "Add" "Relation" constr(a) constr(aeq) "reflexivity" "proved" "by" constr(lemma1) + "as" ident(n) ] -> + [ declare_relation a aeq n (Some lemma1) None None ] + | [ "Add" "Relation" constr(a) constr(aeq) "as" ident(n) ] -> + [ declare_relation a aeq n None None None ] +END + +VERNAC COMMAND EXTEND AddRelation2 + [ "Add" "Relation" constr(a) constr(aeq) "symmetry" "proved" "by" constr(lemma2) + "as" ident(n) ] -> + [ declare_relation a aeq n None (Some lemma2) None ] + | [ "Add" "Relation" constr(a) constr(aeq) "symmetry" "proved" "by" constr(lemma2) "transitivity" "proved" "by" constr(lemma3) "as" ident(n) ] -> + [ declare_relation a aeq n None (Some lemma2) (Some lemma3) ] +END + +VERNAC COMMAND EXTEND AddRelation3 + [ "Add" "Relation" constr(a) constr(aeq) "reflexivity" "proved" "by" constr(lemma1) + "transitivity" "proved" "by" constr(lemma3) "as" ident(n) ] -> + [ declare_relation a aeq n (Some lemma1) None (Some lemma3) ] + | [ "Add" "Relation" constr(a) constr(aeq) "reflexivity" "proved" "by" constr(lemma1) + "symmetry" "proved" "by" constr(lemma2) "transitivity" "proved" "by" constr(lemma3) + "as" ident(n) ] -> + [ declare_relation a aeq n (Some lemma1) (Some lemma2) (Some lemma3) ] + | [ "Add" "Relation" constr(a) constr(aeq) "transitivity" "proved" "by" constr(lemma3) + "as" ident(n) ] -> + [ declare_relation a aeq n None None (Some lemma3) ] +END + +VERNAC COMMAND EXTEND AddParametricRelation + | [ "Add" "Parametric" "Relation" binders_let(b) ":" constr(a) constr(aeq) + "reflexivity" "proved" "by" constr(lemma1) + "symmetry" "proved" "by" constr(lemma2) "as" ident(n) ] -> + [ declare_relation ~binders:b a aeq n (Some lemma1) (Some lemma2) None ] + | [ "Add" "Parametric" "Relation" binders_let(b) ":" constr(a) constr(aeq) + "reflexivity" "proved" "by" constr(lemma1) + "as" ident(n) ] -> + [ declare_relation ~binders:b a aeq n (Some lemma1) None None ] + | [ "Add" "Parametric" "Relation" binders_let(b) ":" constr(a) constr(aeq) "as" ident(n) ] -> + [ declare_relation ~binders:b a aeq n None None None ] +END + +VERNAC COMMAND EXTEND AddParametricRelation2 + [ "Add" "Parametric" "Relation" binders_let(b) ":" constr(a) constr(aeq) "symmetry" "proved" "by" constr(lemma2) + "as" ident(n) ] -> + [ declare_relation ~binders:b a aeq n None (Some lemma2) None ] + | [ "Add" "Parametric" "Relation" binders_let(b) ":" constr(a) constr(aeq) "symmetry" "proved" "by" constr(lemma2) "transitivity" "proved" "by" constr(lemma3) "as" ident(n) ] -> + [ declare_relation ~binders:b a aeq n None (Some lemma2) (Some lemma3) ] +END + +VERNAC COMMAND EXTEND AddParametricRelation3 + [ "Add" "Parametric" "Relation" binders_let(b) ":" constr(a) constr(aeq) "reflexivity" "proved" "by" constr(lemma1) + "transitivity" "proved" "by" constr(lemma3) "as" ident(n) ] -> + [ declare_relation ~binders:b a aeq n (Some lemma1) None (Some lemma3) ] + | [ "Add" "Parametric" "Relation" binders_let(b) ":" constr(a) constr(aeq) "reflexivity" "proved" "by" constr(lemma1) + "symmetry" "proved" "by" constr(lemma2) "transitivity" "proved" "by" constr(lemma3) + "as" ident(n) ] -> + [ declare_relation ~binders:b a aeq n (Some lemma1) (Some lemma2) (Some lemma3) ] + | [ "Add" "Parametric" "Relation" binders_let(b) ":" constr(a) constr(aeq) "transitivity" "proved" "by" constr(lemma3) + "as" ident(n) ] -> + [ declare_relation ~binders:b a aeq n None None (Some lemma3) ] +END + +let mk_qualid s = + Libnames.Qualid (dummy_loc, Libnames.qualid_of_string s) + +let cHole = CHole (dummy_loc, None) + +open Entries +open Libnames + +let respect_projection r ty = + let ctx, inst = Sign.decompose_prod_assum ty in + let mor, args = destApp inst in + let instarg = mkApp (r, rel_vect 0 (List.length ctx)) in + let app = mkApp (Lazy.force respect_proj, + Array.append args [| instarg |]) in + it_mkLambda_or_LetIn app ctx + +let declare_projection n instance_id r = + let ty = Global.type_of_global r in + let c = constr_of_global r in + let term = respect_projection c ty in + let typ = Typing.type_of (Global.env ()) Evd.empty term in + let ctx, typ = Sign.decompose_prod_assum typ in + let typ = + let n = + let rec aux t = + match kind_of_term t with + App (f, [| a ; a' ; rel; rel' |]) when eq_constr f (Lazy.force respectful) -> + succ (aux rel') + | _ -> 0 + in + let init = + match kind_of_term typ with + App (f, args) when eq_constr f (Lazy.force respectful) -> + mkApp (f, fst (array_chop (Array.length args - 2) args)) + | _ -> typ + in aux init + in + let ctx,ccl = Reductionops.decomp_n_prod (Global.env()) Evd.empty (3 * n) typ + in it_mkProd_or_LetIn ccl ctx + in + let typ = it_mkProd_or_LetIn typ ctx in + let cst = + { const_entry_body = term; + const_entry_type = Some typ; + const_entry_opaque = false; + const_entry_boxed = false } + in + ignore(Declare.declare_constant n (Entries.DefinitionEntry cst, Decl_kinds.IsDefinition Decl_kinds.Definition)) + +let build_morphism_signature m = + let env = Global.env () in + let m = Constrintern.interp_constr Evd.empty env m in + let t = Typing.type_of env Evd.empty m in + let isevars = ref (Evd.create_evar_defs Evd.empty) in + let cstrs = + let rec aux t = + match kind_of_term t with + | Prod (na, a, b) -> + None :: aux b + | _ -> [] + in aux t + in + let t', sig_, evars = build_signature isevars env t cstrs None snd in + let _ = List.iter + (fun (ty, rel) -> + let default = mkApp (Lazy.force default_relation, [| ty; rel |]) in + ignore (Evarutil.e_new_evar isevars env default)) + evars + in + let morph = + mkApp (Lazy.force morphism_type, [| t; sig_; m |]) + in + let evd = + Typeclasses.resolve_typeclasses ~fail:true ~onlyargs:false env !isevars in + let m = Evarutil.nf_isevar evd morph in + Evarutil.check_evars env Evd.empty evd m; m + +let default_morphism sign m = + let env = Global.env () in + let isevars = ref (Evd.create_evar_defs Evd.empty) in + let t = Typing.type_of env Evd.empty m in + let _, sign, evars = + try build_signature isevars env t (fst sign) (snd sign) (fun (ty, rel) -> rel) + with DependentMorphism -> error "Cannot infer the signature of dependent morphisms" + in + let morph = + mkApp (Lazy.force morphism_type, [| t; sign; m |]) + in + let mor = resolve_one_typeclass env morph in + mor, respect_projection mor morph + +let add_setoid binders a aeq t n = + init_setoid (); + let _lemma_refl = declare_instance_refl binders a aeq n (mkappc "Seq_refl" [a;aeq;t]) in + let _lemma_sym = declare_instance_sym binders a aeq n (mkappc "Seq_sym" [a;aeq;t]) in + let _lemma_trans = declare_instance_trans binders a aeq n (mkappc "Seq_trans" [a;aeq;t]) in + let instance = declare_instance a aeq n "Coq.Classes.RelationClasses.Equivalence" + in ignore( + anew_instance binders instance + [((dummy_loc,id_of_string "Equivalence_Reflexive"), [], mkappc "Seq_refl" [a;aeq;t]); + ((dummy_loc,id_of_string "Equivalence_Symmetric"), [], mkappc "Seq_sym" [a;aeq;t]); + ((dummy_loc,id_of_string "Equivalence_Transitive"),[], mkappc "Seq_trans" [a;aeq;t])]) + +let add_morphism_infer m n = + init_setoid (); + let instance_id = add_suffix n "_Morphism" in + let instance = try build_morphism_signature m + with DependentMorphism -> error "Cannot infer the signature of dependent morphisms" + in + if Lib.is_modtype () then + let cst = Declare.declare_internal_constant instance_id + (Entries.ParameterEntry (instance,false), Decl_kinds.IsAssumption Decl_kinds.Logical) + in + add_instance (Typeclasses.new_instance (Lazy.force morphism_class) None false cst); + declare_projection n instance_id (ConstRef cst) + else + let kind = Decl_kinds.Global, Decl_kinds.DefinitionBody Decl_kinds.Instance in + Flags.silently + (fun () -> + Command.start_proof instance_id kind instance + (fun _ -> function + Libnames.ConstRef cst -> + add_instance (Typeclasses.new_instance (Lazy.force morphism_class) None false cst); + declare_projection n instance_id (ConstRef cst) + | _ -> assert false); + Pfedit.by (Tacinterp.interp <:tactic< Coq.Classes.SetoidTactics.add_morphism_tactic>>)) (); + Flags.if_verbose (fun x -> msg (Printer.pr_open_subgoals x)) () + +let add_morphism binders m s n = + init_setoid (); + let instance_id = add_suffix n "_Morphism" in + let instance = + ((dummy_loc,Name instance_id), Explicit, + CAppExpl (dummy_loc, + (None, Qualid (dummy_loc, Libnames.qualid_of_string "Coq.Classes.Morphisms.Morphism")), + [cHole; s; m])) + in + let tac = Tacinterp.interp <:tactic> in + ignore(new_instance binders instance [] + ~on_free_vars:Classes.fail_on_free_vars + ~tac ~hook:(fun cst -> declare_projection n instance_id (ConstRef cst)) + None) + +VERNAC COMMAND EXTEND AddSetoid1 + [ "Add" "Setoid" constr(a) constr(aeq) constr(t) "as" ident(n) ] -> + [ add_setoid [] a aeq t n ] + | [ "Add" "Parametric" "Setoid" binders_let(binders) ":" constr(a) constr(aeq) constr(t) "as" ident(n) ] -> + [ add_setoid binders a aeq t n ] + | [ "Add" "Morphism" constr(m) ":" ident(n) ] -> + [ add_morphism_infer m n ] + | [ "Add" "Morphism" constr(m) "with" "signature" lconstr(s) "as" ident(n) ] -> + [ add_morphism [] m s n ] + | [ "Add" "Parametric" "Morphism" binders_let(binders) ":" constr(m) "with" "signature" lconstr(s) "as" ident(n) ] -> + [ add_morphism binders m s n ] +END + +(** Bind to "rewrite" too *) + +(** Taken from original setoid_replace, to emulate the old rewrite semantics where + lemmas are first instantiated and then rewrite proceeds. *) + +let check_evar_map_of_evars_defs evd = + let metas = Evd.meta_list evd in + let check_freemetas_is_empty rebus = + Evd.Metaset.iter + (fun m -> + if Evd.meta_defined evd m then () else + raise + (Logic.RefinerError (Logic.UnresolvedBindings [Evd.meta_name evd m]))) + in + List.iter + (fun (_,binding) -> + match binding with + Evd.Cltyp (_,{Evd.rebus=rebus; Evd.freemetas=freemetas}) -> + check_freemetas_is_empty rebus freemetas + | Evd.Clval (_,({Evd.rebus=rebus1; Evd.freemetas=freemetas1},_), + {Evd.rebus=rebus2; Evd.freemetas=freemetas2}) -> + check_freemetas_is_empty rebus1 freemetas1 ; + check_freemetas_is_empty rebus2 freemetas2 + ) metas + +let unification_rewrite l2r c1 c2 cl car rel but gl = + let (env',c') = + try + (* ~flags:(false,true) to allow to mark occurrences that must not be + rewritten simply by replacing them with let-defined definitions + in the context *) + Unification.w_unify_to_subterm ~flags:rewrite_unif_flags (pf_env gl) ((if l2r then c1 else c2),but) cl.evd + with + Pretype_errors.PretypeError _ -> + (* ~flags:(true,true) to make Ring work (since it really + exploits conversion) *) + Unification.w_unify_to_subterm ~flags:rewrite2_unif_flags + (pf_env gl) ((if l2r then c1 else c2),but) cl.evd + in + let cl' = {cl with evd = env'} in + let c1 = Clenv.clenv_nf_meta cl' c1 + and c2 = Clenv.clenv_nf_meta cl' c2 in + check_evar_map_of_evars_defs env'; + let prf = Clenv.clenv_value cl' in + let prfty = Clenv.clenv_type cl' in + let cl' = { cl' with templval = mk_freelisted prf ; templtyp = mk_freelisted prfty } in + {cl=cl'; prf=(mkRel 1); car=car; rel=rel; l2r=l2r; c1=c1; c2=c2; c=None; abs=Some (prf, prfty)} + +let get_hyp gl c clause l2r = + let hi = decompose_setoid_eqhyp (pf_env gl) (project gl) c l2r in + let but = match clause with Some id -> pf_get_hyp_typ gl id | None -> pf_concl gl in + unification_rewrite hi.l2r hi.c1 hi.c2 hi.cl hi.car hi.rel but gl + +let general_rewrite_flags = { under_lambdas = false; on_morphisms = false } + +let general_s_rewrite l2r occs c ~new_goals gl = + let meta = Evarutil.new_meta() in + let hypinfo = ref (get_hyp gl c None l2r) in + cl_rewrite_clause_aux ~flags:general_rewrite_flags hypinfo meta occs None gl + +let general_s_rewrite_in id l2r occs c ~new_goals gl = + let meta = Evarutil.new_meta() in + let hypinfo = ref (get_hyp gl c (Some id) l2r) in + cl_rewrite_clause_aux ~flags:general_rewrite_flags hypinfo meta occs (Some (([],id), [])) gl + +let general_s_rewrite_clause x = + init_setoid (); + match x with + | None -> general_s_rewrite + | Some id -> general_s_rewrite_in id + +let _ = Equality.register_general_setoid_rewrite_clause general_s_rewrite_clause + +(* [setoid_]{reflexivity,symmetry,transitivity} tactics *) + +let relation_of_constr c = + match kind_of_term c with + | App (f, args) when Array.length args >= 2 -> + let relargs, args = array_chop (Array.length args - 2) args in + mkApp (f, relargs), args + | _ -> error "Not an applied relation" + +let is_loaded d = + let d' = List.map id_of_string d in + let dir = make_dirpath (List.rev d') in + Library.library_is_loaded dir + +let try_loaded f gl = + if is_loaded ["Coq";"Classes";"RelationClasses"] then f gl + else tclFAIL 0 (str"You need to require Coq.Classes.RelationClasses first") gl + +let setoid_reflexivity gl = + let env = pf_env gl in + let rel, args = relation_of_constr (pf_concl gl) in + try + apply (reflexive_proof env (pf_type_of gl args.(0)) rel) gl + with Not_found -> + tclFAIL 0 (str" The relation " ++ Printer.pr_constr_env env rel ++ str" is not a declared reflexive relation") + gl + +let setoid_symmetry gl = + let env = pf_env gl in + let rel, args = relation_of_constr (pf_concl gl) in + try + apply (symmetric_proof env (pf_type_of gl args.(0)) rel) gl + with Not_found -> + tclFAIL 0 (str" The relation " ++ Printer.pr_constr_env env rel ++ str" is not a declared symmetric relation") + gl + +let setoid_transitivity c gl = + let env = pf_env gl in + let rel, args = relation_of_constr (pf_concl gl) in + try + apply_with_bindings + ((transitive_proof env (pf_type_of gl args.(0)) rel), + Rawterm.ExplicitBindings [ dummy_loc, Rawterm.NamedHyp (id_of_string "y"), c ]) gl + with Not_found -> + tclFAIL 0 + (str" The relation " ++ Printer.pr_constr_env env rel ++ str" is not a declared transitive relation") gl + +let setoid_symmetry_in id gl = + let ctype = pf_type_of gl (mkVar id) in + let binders,concl = Sign.decompose_prod_assum ctype in + let (equiv, args) = decompose_app concl in + let rec split_last_two = function + | [c1;c2] -> [],(c1, c2) + | x::y::z -> let l,res = split_last_two (y::z) in x::l, res + | _ -> error "The term provided is not an equivalence" + in + let others,(c1,c2) = split_last_two args in + let he,c1,c2 = mkApp (equiv, Array.of_list others),c1,c2 in + let new_hyp' = mkApp (he, [| c2 ; c1 |]) in + let new_hyp = it_mkProd_or_LetIn new_hyp' binders in + tclTHENS (cut new_hyp) + [ intro_replacing id; + tclTHENLIST [ intros; setoid_symmetry; apply (mkVar id); Tactics.assumption ] ] + gl + +let _ = Tactics.register_setoid_reflexivity setoid_reflexivity +let _ = Tactics.register_setoid_symmetry setoid_symmetry +let _ = Tactics.register_setoid_symmetry_in setoid_symmetry_in +let _ = Tactics.register_setoid_transitivity setoid_transitivity + +TACTIC EXTEND setoid_symmetry + [ "setoid_symmetry" ] -> [ setoid_symmetry ] + | [ "setoid_symmetry" "in" hyp(n) ] -> [ setoid_symmetry_in n ] +END + +TACTIC EXTEND setoid_reflexivity + [ "setoid_reflexivity" ] -> [ setoid_reflexivity ] +END + +TACTIC EXTEND setoid_transitivity + [ "setoid_transitivity" constr(t) ] -> [ setoid_transitivity t ] +END + +let try_classes t gls = + try t gls + with (Pretype_errors.PretypeError _) as e -> raise e + +TACTIC EXTEND try_classes + [ "try_classes" tactic(t) ] -> [ try_classes (snd t) ] +END + +open Rawterm + +let constrexpr = Pcoq.Tactic.open_constr +type 'a constr_expr_argtype = (open_constr_expr, 'a) Genarg.abstract_argument_type + +let (wit_constrexpr : Genarg.tlevel constr_expr_argtype), + (globwit_constrexpr : Genarg.glevel constr_expr_argtype), + (rawwit_const_expr : Genarg.rlevel constr_expr_argtype) = + Genarg.create_arg "constrexpr" + +open Environ +open Refiner + +TACTIC EXTEND apply_typeclasses + [ "typeclass_app" raw(t) ] -> [ fun gl -> + let nprod = nb_prod (pf_concl gl) in + let env = pf_env gl in + let evars = ref (create_evar_defs (project gl)) in + let j = Pretyping.Default.understand_judgment_tcc evars env t in + let n = nb_prod j.uj_type - nprod in + if n<0 then error "Apply_tc: theorem has not enough premisses."; + Refiner.tclTHEN (Refiner.tclEVARS (Evd.evars_of !evars)) + (fun gl -> + let clause = make_clenv_binding_apply gl (Some n) (j.uj_val,j.uj_type) NoBindings in + let cl' = evar_clenv_unique_resolver true ~flags:default_unify_flags clause gl in + let evd' = Typeclasses.resolve_typeclasses cl'.env ~fail:true cl'.evd in + Clenvtac.clenv_refine true {cl' with evd = evd'} gl) gl + ] +END diff --git a/tactics/contradiction.ml b/tactics/contradiction.ml index eca16066..a2c840a1 100644 --- a/tactics/contradiction.ml +++ b/tactics/contradiction.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: contradiction.ml 9269 2006-10-24 13:01:55Z herbelin $ *) +(* $Id: contradiction.ml 10169 2007-10-03 12:31:45Z herbelin $ *) open Util open Term @@ -24,7 +24,7 @@ open Rawterm let absurd c gls = let env = pf_env gls and sigma = project gls in let _,j = Coercion.Default.inh_coerce_to_sort dummy_loc env - (Evd.create_evar_defs sigma) (Retyping.get_judgment_of env sigma c) in + (Evd.create_goal_evar_defs sigma) (Retyping.get_judgment_of env sigma c) in let c = j.Environ.utj_val in (tclTHENS (tclTHEN (elim_type (build_coq_False ())) (cut c)) @@ -77,7 +77,7 @@ let contradiction_term (c,lbind as cl) gl = let typ = pf_type_of gl c in let _, ccl = splay_prod env sigma typ in if is_empty_type ccl then - tclTHEN (elim cl None) (tclTRY assumption) gl + tclTHEN (elim false cl None) (tclTRY assumption) gl else try if lbind = NoBindings then diff --git a/tactics/contradiction.mli b/tactics/contradiction.mli index d94a1ef2..e417f500 100644 --- a/tactics/contradiction.mli +++ b/tactics/contradiction.mli @@ -6,14 +6,15 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: contradiction.mli 5920 2004-07-16 20:01:26Z herbelin $ i*) +(*i $Id: contradiction.mli 9842 2007-05-20 17:44:23Z herbelin $ i*) (*i*) open Names open Term open Proof_type open Rawterm +open Genarg (*i*) val absurd : constr -> tactic -val contradiction : constr with_bindings option -> tactic +val contradiction : constr with_ebindings option -> tactic diff --git a/tactics/decl_interp.ml b/tactics/decl_interp.ml index 87a47200..d96fa720 100644 --- a/tactics/decl_interp.ml +++ b/tactics/decl_interp.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id$ *) +(*i $Id: decl_interp.ml 10739 2008-04-01 14:45:20Z herbelin $ i*) open Util open Names @@ -25,10 +25,10 @@ open Pp let raw_app (loc,hd,args) = if args =[] then hd else RApp(loc,hd,args) let intern_justification_items globs = - option_map (List.map (intern_constr globs)) + Option.map (List.map (intern_constr globs)) let intern_justification_method globs = - option_map (intern_tactic globs) + Option.map (intern_tactic globs) let intern_statement intern_it globs st = {st_label=st.st_label; @@ -52,7 +52,7 @@ let add_name nam globs= let intern_hyp iconstr globs = function Hvar (loc,(id,topt)) -> add_var id globs, - Hvar (loc,(id,option_map (intern_constr globs) topt)) + Hvar (loc,(id,Option.map (intern_constr globs) topt)) | Hprop st -> add_name st.st_label globs, Hprop (intern_statement iconstr globs st) @@ -73,7 +73,7 @@ let intern_casee globs = function let intern_hyp_list args globs = let intern_one globs (loc,(id,opttyp)) = (add_var id globs), - (loc,(id,option_map (intern_constr globs) opttyp)) in + (loc,(id,Option.map (intern_constr globs) opttyp)) in list_fold_map intern_one globs args let intern_suffices_clause globs (hyps,c) = @@ -141,7 +141,7 @@ let rec intern_proof_instr globs instr= (* INTERP *) let interp_justification_items sigma env = - option_map (List.map (fun c ->understand sigma env (fst c))) + Option.map (List.map (fun c ->understand sigma env (fst c))) let interp_constr check_sort sigma env c = if check_sort then @@ -153,7 +153,7 @@ let special_whd env = let infos=Closure.create_clos_infos Closure.betadeltaiota env in (fun t -> Closure.whd_val infos (Closure.inject t)) -let _eq = Libnames.constr_of_reference (Coqlib.glob_eq) +let _eq = Libnames.constr_of_global (Coqlib.glob_eq) let decompose_eq env id = let typ = Environ.named_type id env in @@ -166,11 +166,7 @@ let decompose_eq env id = | _ -> error "previous step is not an equality" let get_eq_typ info env = - let last_id = - match info.pm_last with - None -> error "no previous equality" - | Some (id,_) -> id in - let typ = decompose_eq env last_id in + let typ = decompose_eq env (get_last env) in typ let interp_constr_in_type typ sigma env c = @@ -186,17 +182,17 @@ let interp_constr_or_thesis check_sort sigma env = function let type_tester_var body typ = raw_app(dummy_loc, - RLambda(dummy_loc,Anonymous,typ, + RLambda(dummy_loc,Anonymous,Explicit,typ, RSort (dummy_loc,RProp Null)),body) let abstract_one_hyp inject h raw = match h with Hvar (loc,(id,None)) -> - RProd (dummy_loc,Name id, RHole (loc,Evd.BinderType (Name id)), raw) + RProd (dummy_loc,Name id, Explicit, RHole (loc,Evd.BinderType (Name id)), raw) | Hvar (loc,(id,Some typ)) -> - RProd (dummy_loc,Name id,fst typ, raw) + RProd (dummy_loc,Name id, Explicit, fst typ, raw) | Hprop st -> - RProd (dummy_loc,st.st_label,inject st.st_it, raw) + RProd (dummy_loc,st.st_label, Explicit, inject st.st_it, raw) let rawconstr_of_hyps inject hyps head = List.fold_right (abstract_one_hyp inject) hyps head @@ -258,18 +254,18 @@ let rec raw_of_pat = let prod_one_hyp = function (loc,(id,None)) -> (fun raw -> - RProd (dummy_loc,Name id, + RProd (dummy_loc,Name id, Explicit, RHole (loc,Evd.BinderType (Name id)), raw)) | (loc,(id,Some typ)) -> (fun raw -> - RProd (dummy_loc,Name id,fst typ, raw)) + RProd (dummy_loc,Name id, Explicit, fst typ, raw)) let prod_one_id (loc,id) raw = - RProd (dummy_loc,Name id, + RProd (dummy_loc,Name id, Explicit, RHole (loc,Evd.BinderType (Name id)), raw) let let_in_one_alias (id,pat) raw = - RLetIn (dummy_loc,Name id,raw_of_pat pat, raw) + RLetIn (dummy_loc,Name id, raw_of_pat pat, raw) let rec bind_primary_aliases map pat = match pat with @@ -352,8 +348,6 @@ let interp_cases info sigma env params (pat:cases_pattern_expr) hyps = let pat_vars,aliases,patt = interp_pattern env pat in let inject = function Thesis (Plain) -> Rawterm.RSort(dummy_loc,RProp Null) - | Thesis (Sub n) -> - error "thesis[_] is not allowed here" | Thesis (For rec_occ) -> if not (List.mem rec_occ pat_vars) then errorlabstrm "suppose it is" @@ -405,7 +399,7 @@ let interp_suffices_clause sigma env (hyps,cot)= This (c,_) -> let nhyps,nc = interp_hyps_gen fst (fun x _ -> x) sigma env hyps c in nhyps,This nc - | Thesis (Plain| Sub _) as th -> interp_hyps sigma env hyps,th + | Thesis Plain as th -> interp_hyps sigma env hyps,th | Thesis (For n) -> error "\"thesis for\" is not applicable here" in let push_one hyp env0 = match hyp with @@ -423,11 +417,11 @@ let interp_casee sigma env = function let abstract_one_arg = function (loc,(id,None)) -> (fun raw -> - RLambda (dummy_loc,Name id, + RLambda (dummy_loc,Name id, Explicit, RHole (loc,Evd.BinderType (Name id)), raw)) | (loc,(id,Some typ)) -> (fun raw -> - RLambda (dummy_loc,Name id,fst typ, raw)) + RLambda (dummy_loc,Name id, Explicit, fst typ, raw)) let rawconstr_of_fun args body = List.fold_right abstract_one_arg args (fst body) diff --git a/tactics/decl_interp.mli b/tactics/decl_interp.mli index bd085938..59b3b530 100644 --- a/tactics/decl_interp.mli +++ b/tactics/decl_interp.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id$ *) +(* $Id: decl_interp.mli 10739 2008-04-01 14:45:20Z herbelin $ *) open Tacinterp open Decl_expr diff --git a/tactics/decl_proof_instr.ml b/tactics/decl_proof_instr.ml index a34446d8..895b97fe 100644 --- a/tactics/decl_proof_instr.ml +++ b/tactics/decl_proof_instr.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id$ *) +(* $Id: decl_proof_instr.ml 11072 2008-06-08 16:13:37Z herbelin $ *) open Util open Pp @@ -22,6 +22,7 @@ open Decl_mode open Decl_interp open Rawterm open Names +open Nameops open Declarations open Tactics open Tacticals @@ -30,6 +31,7 @@ open Termops open Reductionops open Goptions + (* Strictness option *) let get_its_info gls = get_info gls.it @@ -81,42 +83,34 @@ let check_not_per pts = Please \"suppose\" something or \"end\" it now." | _ -> () -let get_thesis gls0 = - let info = get_its_info gls0 in - match info.pm_subgoals with - [m,thesis] -> thesis - | _ -> error "Thesis is split" - let mk_evd metalist gls = - let evd0= create_evar_defs (sig_sig gls) in + let evd0= create_goal_evar_defs (sig_sig gls) in let add_one (meta,typ) evd = meta_declare meta typ evd in List.fold_right add_one metalist evd0 -let set_last cpl gls = - let info = get_its_info gls in - tclTHEN - begin - match info.pm_last with - Some (lid,false) when - not (occur_id [] lid info.pm_partial_goal) -> - tclTRY (clear [lid]) - | _ -> tclIDTAC - end - begin - tcl_change_info - {info with - pm_last=Some cpl } - end gls - +let is_tmp id = (string_of_id id).[0] = '_' + +let tmp_ids gls = + let ctx = pf_hyps gls in + match ctx with + [] -> [] + | _::q -> List.filter is_tmp (ids_of_named_context q) + +let clean_tmp gls = + let clean_id id0 gls0 = + tclTRY (clear [id0]) gls0 in + let rec clean_all = function + [] -> tclIDTAC + | id :: rest -> tclTHEN (clean_id id) (clean_all rest) + in + clean_all (tmp_ids gls) gls + (* start a proof *) let start_proof_tac gls= let gl=sig_it gls in - let info={pm_last=None; - pm_partial_goal=mkMeta 1; - pm_subgoals= [1,gl.evar_concl]; - pm_stack=[]} in + let info={pm_stack=[]} in {it=[{gl with evar_extra=Some (pm_in info)}];sigma=sig_sig gls}, function [pftree] -> @@ -267,7 +261,8 @@ let add_justification_hyps keep items gls = | _ -> let id=pf_get_new_id local_hyp_prefix gls in keep:=Idset.add id !keep; - letin_tac false (Names.Name id) c Tacexpr.nowhere gls in + tclTHEN (letin_tac None (Names.Name id) c Tacexpr.nowhere) + (thin_body [id]) gls in tclMAP add_aux items gls let prepare_goal items gls = @@ -292,14 +287,36 @@ let justification tac gls= error "insufficient justification" else begin - msgnl (str "Warning: insufficient justification"); + msg_warning (str "insufficient justification"); daimon_tac gls end) gls let default_justification elems gls= justification (tclTHEN (prepare_goal elems) automation_tac) gls -(* code for have/then/thus/hence *) +(* code for conclusion refining *) + +let constant dir s = lazy (Coqlib.gen_constant "Declarative" dir s) + +let _and = constant ["Init";"Logic"] "and" + +let _and_rect = constant ["Init";"Logic"] "and_rect" + +let _prod = constant ["Init";"Datatypes"] "prod" + +let _prod_rect = constant ["Init";"Datatypes"] "prod_rect" + +let _ex = constant ["Init";"Logic"] "ex" + +let _ex_ind = constant ["Init";"Logic"] "ex_ind" + +let _sig = constant ["Init";"Specif"] "sig" + +let _sig_rect = constant ["Init";"Specif"] "sig_rect" + +let _sigT = constant ["Init";"Specif"] "sigT" + +let _sigT_rect = constant ["Init";"Specif"] "sigT_rect" type stackd_elt = {se_meta:metavariable; @@ -336,7 +353,8 @@ let enstack_subsubgoals env se stack gls= let (nlast,holes,nmetas) = meta_aux se.se_last_meta [] (List.rev rc) in let refiner = applist (appterm,List.rev holes) in - let evd = meta_assign se.se_meta refiner se.se_evd in + let evd = meta_assign se.se_meta + (refiner,(ConvUpToEta 0,TypeProcessed (* ? *))) se.se_evd in let ncreated = replace_in_list se.se_meta nmetas se.se_meta_list in let evd0 = List.fold_left @@ -352,19 +370,28 @@ let enstack_subsubgoals env se stack gls= Array.iteri process gentypes | _ -> () -let find_subsubgoal env c ctyp skip evd metas submetas gls = +let rec nf_list evd = + function + [] -> [] + | (m,typ)::others -> + if meta_defined evd m then + nf_list evd others + else + (m,nf_meta evd typ)::nf_list evd others + +let find_subsubgoal c ctyp skip submetas gls = + let env= pf_env gls in + let concl = pf_concl gls in + let evd = mk_evd ((0,concl)::submetas) gls in let stack = Stack.create () in let max_meta = - let tmp = List.fold_left (fun a (m,_) -> max a m) 0 metas in - List.fold_left (fun a (m,_) -> max a m) tmp submetas in - let _ = - List.iter (fun (m,typ) -> - Stack.push - {se_meta=m; - se_type=typ; - se_last_meta=max_meta; - se_meta_list=metas; - se_evd=evd} stack) (List.rev metas) in + List.fold_left (fun a (m,_) -> max a m) 0 submetas in + let _ = Stack.push + {se_meta=0; + se_type=concl; + se_last_meta=max_meta; + se_meta_list=[0,concl]; + se_evd=evd} stack in let rec dfs n = let se = Stack.pop stack in try @@ -372,10 +399,11 @@ let find_subsubgoal env c ctyp skip evd metas submetas gls = Unification.w_unify true env Reduction.CUMUL ctyp se.se_type se.se_evd in if n <= 0 then - {se with - se_evd=meta_assign se.se_meta c unifier; - se_meta_list=replace_in_list - se.se_meta submetas se.se_meta_list} + {se with + se_evd=meta_assign se.se_meta + (c,(ConvUpToEta 0,TypeNotProcessed (* ?? *))) unifier; + se_meta_list=replace_in_list + se.se_meta submetas se.se_meta_list} else dfs (pred n) with _ -> @@ -384,85 +412,86 @@ let find_subsubgoal env c ctyp skip evd metas submetas gls = dfs n end in let nse= try dfs skip with Stack.Empty -> raise Not_found in - nse.se_meta_list,nse.se_evd - -let rec nf_list evd = - function - [] -> [] - | (m,typ)::others -> - if meta_defined evd m then - nf_list evd others - else - (m,nf_meta evd typ)::nf_list evd others - -let rec max_linear_context meta_one c = - if !meta_one = None then - if isMeta c then - begin - meta_one:= Some c; - mkMeta 1 - end - else - try - map_constr (max_linear_context meta_one) c - with Not_found -> - begin - meta_one:= Some c; - mkMeta 1 - end - else - if isMeta c then - raise Not_found - else - map_constr (max_linear_context meta_one) c + nf_list nse.se_evd nse.se_meta_list,nf_meta nse.se_evd (mkMeta 0) + +let concl_refiner metas body gls = + let concl = pf_concl gls in + let evd = sig_sig gls in + let env = pf_env gls in + let sort = family_of_sort (Typing.sort_of env evd concl) in + let rec aux env avoid subst = function + [] -> anomaly "concl_refiner: cannot happen" + | (n,typ)::rest -> + let _A = subst_meta subst typ in + let x = id_of_name_using_hdchar env _A Anonymous in + let _x = fresh_id avoid x gls in + let nenv = Environ.push_named (_x,None,_A) env in + let asort = family_of_sort (Typing.sort_of nenv evd _A) in + let nsubst = (n,mkVar _x)::subst in + if rest = [] then + asort,_A,mkNamedLambda _x _A (subst_meta nsubst body) + else + let bsort,_B,nbody = + aux nenv (_x::avoid) ((n,mkVar _x)::subst) rest in + let body = mkNamedLambda _x _A nbody in + if occur_term (mkVar _x) _B then + begin + let _P = mkNamedLambda _x _A _B in + match bsort,sort with + InProp,InProp -> + let _AxB = mkApp(Lazy.force _ex,[|_A;_P|]) in + InProp,_AxB, + mkApp(Lazy.force _ex_ind,[|_A;_P;concl;body|]) + | InProp,_ -> + let _AxB = mkApp(Lazy.force _sig,[|_A;_P|]) in + let _P0 = mkLambda(Anonymous,_AxB,concl) in + InType,_AxB, + mkApp(Lazy.force _sig_rect,[|_A;_P;_P0;body|]) + | _,_ -> + let _AxB = mkApp(Lazy.force _sigT,[|_A;_P|]) in + let _P0 = mkLambda(Anonymous,_AxB,concl) in + InType,_AxB, + mkApp(Lazy.force _sigT_rect,[|_A;_P;_P0;body|]) + end + else + begin + match asort,bsort with + InProp,InProp -> + let _AxB = mkApp(Lazy.force _and,[|_A;_B|]) in + InProp,_AxB, + mkApp(Lazy.force _and_rect,[|_A;_B;concl;body|]) + |_,_ -> + let _AxB = mkApp(Lazy.force _prod,[|_A;_B|]) in + let _P0 = mkLambda(Anonymous,_AxB,concl) in + InType,_AxB, + mkApp(Lazy.force _prod_rect,[|_A;_B;_P0;body|]) + end + in + let (_,_,prf) = aux env [] [] metas in + mkApp(prf,[|mkMeta 1|]) let thus_tac c ctyp submetas gls = - let info = get_its_info gls in - let evd0 = mk_evd (info.pm_subgoals@submetas) gls in - let list,evd = + let list,proof = try - find_subsubgoal (pf_env gls) c ctyp 0 evd0 info.pm_subgoals submetas gls + find_subsubgoal c ctyp 0 submetas gls with Not_found -> error "I could not relate this statement to the thesis" in - let nflist = nf_list evd list in - let nfgoal = nf_meta evd info.pm_partial_goal in -(* let _ = msgnl (str "Partial goal : " ++ - print_constr_env (pf_env gls) nfgoal) in *) - let rgl = ref None in - let refiner = max_linear_context rgl nfgoal in - match !rgl with - None -> exact_check refiner gls - | Some pgl when not (isMeta refiner) -> - let ninfo={info with - pm_partial_goal = pgl; - pm_subgoals = nflist} in - tclTHEN - (Tactics.refine refiner) - (tcl_change_info ninfo) - gls - | _ -> - let ninfo={info with - pm_partial_goal = nfgoal; - pm_subgoals = nflist} in - tcl_change_info ninfo gls + if list = [] then + exact_check proof gls + else + let refiner = concl_refiner list proof gls in + Tactics.refine refiner gls -let anon_id_base = id_of_string "__" +(* general forward step *) -let mk_stat_or_thesis info = function +let anon_id_base = id_of_string "__" + +let mk_stat_or_thesis info gls = function This c -> c | Thesis (For _ ) -> error "\"thesis for ...\" is not applicable here" - | Thesis (Sub n) -> - begin - try List.assoc n info.pm_subgoals - with Not_found -> error "No such part in thesis." - end - | Thesis Plain -> - match info.pm_subgoals with - [_,c] -> c - | _ -> error - "\"thesis\" is split, please specify which part you refer to." + | Thesis Plain -> pf_concl gls let just_tac _then cut info gls0 = let items_tac gls = @@ -470,11 +499,10 @@ let just_tac _then cut info gls0 = None -> tclIDTAC gls | Some items -> let items_ = - if _then then - match info.pm_last with - None -> error "no previous statement to use" - | Some (id,_) -> (mkVar id)::items - else items + if _then then + let last_id = get_last (pf_env gls) in + (mkVar last_id)::items + else items in prepare_goal items_ gls in let method_tac gls = match cut.cut_using with @@ -487,23 +515,23 @@ let just_tac _then cut info gls0 = let instr_cut mkstat _thus _then cut gls0 = let info = get_its_info gls0 in let stat = cut.cut_stat in - let (c_id,_) as cpl = match stat.st_label with + let (c_id,_) = match stat.st_label with Anonymous -> pf_get_new_id (id_of_string "_fact") gls0,false | Name id -> id,true in - let c_stat = mkstat info stat.st_it in + let c_stat = mkstat info gls0 stat.st_it in let thus_tac gls= if _thus then thus_tac (mkVar c_id) c_stat [] gls else tclIDTAC gls in tclTHENS (internal_cut c_id c_stat) [tclTHEN tcl_erase_info (just_tac _then cut info); - tclTHEN (set_last cpl) thus_tac] gls0 + thus_tac] gls0 (* iterated equality *) -let _eq = Libnames.constr_of_reference (Coqlib.glob_eq) +let _eq = Libnames.constr_of_global (Coqlib.glob_eq) let decompose_eq id gls = let typ = pf_get_hyp_typ gls id in @@ -518,11 +546,8 @@ let decompose_eq id gls = | _ -> error "previous step is not an equality" let instr_rew _thus rew_side cut gls0 = - let info = get_its_info gls0 in - let last_id = - match info.pm_last with - None -> error "no previous equality" - | Some (id,_) -> id in + let last_id = + try get_last (pf_env gls0) with _ -> error "no previous equality" in let typ,lhs,rhs = decompose_eq last_id gls0 in let items_tac gls = match cut.cut_by with @@ -536,7 +561,7 @@ let instr_rew _thus rew_side cut gls0 = (Tacinterp.eval_tactic tac) gls in let just_tac gls = justification (tclTHEN items_tac method_tac) gls in - let (c_id,_) as cpl = match cut.cut_stat.st_label with + let (c_id,_) = match cut.cut_stat.st_label with Anonymous -> pf_get_new_id (id_of_string "_eq") gls0,false | Name id -> id,true in @@ -551,14 +576,14 @@ let instr_rew _thus rew_side cut gls0 = [tclTHEN tcl_erase_info (tclTHENS (transitivity lhs) [just_tac;exact_check (mkVar last_id)]); - tclTHEN (set_last cpl) (thus_tac new_eq)] gls0 + thus_tac new_eq] gls0 | Rhs -> let new_eq = mkApp(_eq,[|typ;lhs;cut.cut_stat.st_it|]) in tclTHENS (internal_cut c_id new_eq) [tclTHEN tcl_erase_info (tclTHENS (transitivity rhs) [exact_check (mkVar last_id);just_tac]); - tclTHEN (set_last cpl) (thus_tac new_eq)] gls0 + thus_tac new_eq] gls0 @@ -566,48 +591,29 @@ let instr_rew _thus rew_side cut gls0 = let instr_claim _thus st gls0 = let info = get_its_info gls0 in - let (id,_) as cpl = match st.st_label with + let (id,_) = match st.st_label with Anonymous -> pf_get_new_id (id_of_string "_claim") gls0,false | Name id -> id,true in let thus_tac gls= if _thus then thus_tac (mkVar id) st.st_it [] gls else tclIDTAC gls in - let ninfo1 = {info with - pm_stack= - (if _thus then Focus_claim else Claim)::info.pm_stack; - pm_partial_goal=mkMeta 1; - pm_subgoals = [1,st.st_it]} in + let ninfo1 = {pm_stack= + (if _thus then Focus_claim else Claim)::info.pm_stack} in tclTHENS (internal_cut id st.st_it) [tcl_change_info ninfo1; - tclTHEN (set_last cpl) thus_tac] gls0 + thus_tac] gls0 (* tactics for assume *) -let reset_concl gls = - let info = get_its_info gls in - tcl_change_info - {info with - pm_partial_goal=mkMeta 1; - pm_subgoals= [1,gls.it.evar_concl]} gls - - -let intro_pm id gls= - let info = get_its_info gls in - match info.pm_subgoals with - [(_,typ)] -> - tclTHEN (intro_mustbe_force id) reset_concl gls - | _ -> error "Goal is split" - let push_intro_tac coerce nam gls = - let (hid,_) as cpl = + let (hid,_) = match nam with Anonymous -> pf_get_new_id (id_of_string "_hyp") gls,false | Name id -> id,true in tclTHENLIST - [intro_pm hid; - coerce hid; - set_last cpl] + [intro_mustbe_force hid; + coerce hid] gls let assume_tac hyps gls = @@ -652,10 +658,6 @@ let assume_st_letin hyps gls = (* suffices *) -let free_meta info = - let max_next (i,_) j = if j <= i then succ i else j in - List.fold_right max_next info.pm_subgoals 1 - let rec metas_from n hyps = match hyps with _ :: q -> n :: metas_from (succ n) q @@ -683,31 +685,21 @@ let instr_suffices _then cut gls0 = let info = get_its_info gls0 in let c_id = pf_get_new_id (id_of_string "_cofact") gls0 in let ctx,hd = cut.cut_stat in - let c_stat = build_product ctx (mk_stat_or_thesis info hd) in - let metas = metas_from (free_meta info) ctx in + let c_stat = build_product ctx (mk_stat_or_thesis info gls0 hd) in + let metas = metas_from 1 ctx in let c_ctx,c_head = build_applist c_stat metas in let c_term = applist (mkVar c_id,List.map mkMeta metas) in let thus_tac gls= thus_tac c_term c_head c_ctx gls in tclTHENS (internal_cut c_id c_stat) [tclTHENLIST - [ tcl_change_info - {info with - pm_partial_goal=mkMeta 1; - pm_subgoals=[1,c_stat]}; - assume_tac ctx; + [ assume_tac ctx; tcl_erase_info; just_tac _then cut info]; - tclTHEN (set_last (c_id,false)) thus_tac] gls0 + thus_tac] gls0 (* tactics for consider/given *) -let update_goal_info gls = - let info = get_its_info gls in - match info.pm_subgoals with - [m,_] -> tcl_change_info {info with pm_subgoals =[m,pf_concl gls]} gls - | _ -> error "thesis is split" - let conjunction_arity id gls = let typ = pf_get_hyp_typ gls id in let hd,params = decompose_app (special_whd gls typ) in @@ -726,30 +718,18 @@ let conjunction_arity id gls = let rec intron_then n ids ltac gls = if n<=0 then - tclTHEN - (fun gls -> - if List.exists (fun id -> occur_id [] id (pf_concl gls)) ids then - update_goal_info gls - else - tclIDTAC gls) - (ltac ids) - gls + ltac ids gls else let id = pf_get_new_id (id_of_string "_tmp") gls in tclTHEN (intro_mustbe_force id) (intron_then (pred n) (id::ids) ltac) gls -let pm_rename_hyp id hid gls = - if occur_id [] id (pf_concl gls) then - tclTHEN (rename_hyp id hid) update_goal_info gls - else - rename_hyp id hid gls let rec consider_match may_intro introduced available expected gls = match available,expected with [],[] -> - set_last (List.hd introduced) gls + tclIDTAC gls | _,[] -> error "last statements do not match a complete hypothesis" (* should tell which ones *) | [],hyps -> @@ -757,7 +737,7 @@ let rec consider_match may_intro introduced available expected gls = begin let id = pf_get_new_id (id_of_string "_tmp") gls in tclIFTHENELSE - (intro_pm id) + (intro_mustbe_force id) (consider_match true [] [id] hyps) (fun _ -> error "not enough sub-hypotheses to match statements") @@ -774,7 +754,7 @@ let rec consider_match may_intro introduced available expected gls = consider_match may_intro ((id,false)::introduced) rest_ids rest | Name hid -> tclTHENLIST - [pm_rename_hyp id hid; + [rename_hyp [id,hid]; consider_match may_intro ((hid,true)::introduced) rest_ids rest] end begin @@ -783,7 +763,7 @@ let rec consider_match may_intro introduced available expected gls = try conjunction_arity id gls with Not_found -> error "matching hypothesis not found" in tclTHENLIST - [general_case_analysis (mkVar id,NoBindings); + [general_case_analysis false (mkVar id,NoBindings); intron_then nhyps [] (fun l -> consider_match may_intro introduced (List.rev_append l rest_ids) expected)] gls) @@ -828,49 +808,74 @@ let rec build_function args body = let define_tac id args body gls = let t = build_function args body in - letin_tac true (Name id) t Tacexpr.nowhere gls + letin_tac None (Name id) t Tacexpr.nowhere gls (* tactics for reconsider *) let cast_tac id_or_thesis typ gls = - let info = get_its_info gls in match id_or_thesis with This id -> let (_,body,_) = pf_get_hyp gls id in convert_hyp (id,body,typ) gls | Thesis (For _ ) -> error "\"thesis for ...\" is not applicable here" - | Thesis (Sub n) -> - begin - let old_typ = - try List.assoc n info.pm_subgoals - with Not_found -> error "No such part in thesis." in - if is_conv_leq (pf_env gls) (sig_sig gls) typ old_typ then - let new_sg = List.merge - (fun (n,_) (p,_) -> Pervasives.compare n p) - [n,typ] (List.remove_assoc n info.pm_subgoals) in - tcl_change_info {info with pm_subgoals=new_sg} gls - else - error "not convertible" - end - | Thesis Plain -> - match info.pm_subgoals with - [m,c] -> - tclTHEN - (convert_concl typ DEFAULTcast) - (tcl_change_info {info with pm_subgoals= [m,typ]}) gls - | _ -> error - "\"thesis\" is split, please specify which part you refer to." - + | Thesis Plain -> + convert_concl typ DEFAULTcast gls (* per cases *) -let start_tree env ind = - let constrs = (snd (Inductive.lookup_mind_specif env ind)).mind_consnames in - Split (Idset.empty,ind,Array.map (fun _ -> None) constrs) +let is_rec_pos (main_ind,wft) = + match main_ind with + None -> false + | Some index -> + match fst (Rtree.dest_node wft) with + Mrec i when i = index -> true + | _ -> false + +let rec constr_trees (main_ind,wft) ind = + match Rtree.dest_node wft with + Norec,_ -> + let itree = + (snd (Global.lookup_inductive ind)).mind_recargs in + constr_trees (None,itree) ind + | _,constrs -> main_ind,constrs + +let constr_args rp constr = + let main_ind,constrs = constr_trees rp (fst constr) in + let ctree = constrs.(pred (snd constr)) in + array_map_to_list (fun t -> main_ind,t) + (snd (Rtree.dest_node ctree)) + +let ind_args rp ind = + let main_ind,constrs = constr_trees rp ind in + let args ctree = + Array.map (fun t -> main_ind,t) (snd (Rtree.dest_node ctree)) in + Array.map args constrs + +let init_tree ids ind rp nexti = + let indargs = ind_args rp ind in + let do_i i arp = (Array.map is_rec_pos arp),nexti i arp in + Split_patt (ids,ind,Array.mapi do_i indargs) + +let map_tree_rp rp id_fun mapi = function + Split_patt (ids,ind,branches) -> + let indargs = ind_args rp ind in + let do_i i (recargs,bri) = recargs,mapi i indargs.(i) bri in + Split_patt (id_fun ids,ind,Array.mapi do_i branches) + | _ -> failwith "map_tree_rp: not a splitting node" + +let map_tree id_fun mapi = function + Split_patt (ids,ind,branches) -> + let do_i i (recargs,bri) = recargs,mapi i bri in + Split_patt (id_fun ids,ind,Array.mapi do_i branches) + | _ -> failwith "map_tree: not a splitting node" + + +let start_tree env ind rp = + init_tree Idset.empty ind rp (fun _ _ -> None) let build_per_info etype casee gls = - let concl=get_thesis gls in + let concl=pf_concl gls in let env=pf_env gls in let ctyp=pf_type_of gls casee in let is_dep = dependent casee concl in @@ -880,11 +885,11 @@ let build_per_info etype casee gls = destInd hd with _ -> error "Case analysis must be done on an inductive object" in - let nparams = - let mind = fst (Global.lookup_inductive ind) in - match etype with - ET_Induction -> mind.mind_nparams_rec - | _ -> mind.mind_nparams in + let mind,oind = Global.lookup_inductive ind in + let nparams,index = + match etype with + ET_Induction -> mind.mind_nparams_rec,Some (snd ind) + | _ -> mind.mind_nparams,None in let params,real_args = list_chop nparams args in let abstract_obj c body = let typ=pf_type_of gls c in @@ -898,7 +903,8 @@ let build_per_info etype casee gls = per_pred=pred; per_args=real_args; per_params=params; - per_nparams=nparams} + per_nparams=nparams; + per_wf=index,oind.mind_recargs} let per_tac etype casee gls= let env=pf_env gls in @@ -908,25 +914,24 @@ let per_tac etype casee gls= let is_dep,per_info = build_per_info etype c gls in let ek = if is_dep then - EK_dep (start_tree env per_info.per_ind) + EK_dep (start_tree env per_info.per_ind per_info.per_wf) else EK_unknown in tcl_change_info - {info with - pm_stack= + {pm_stack= Per(etype,per_info,ek,[])::info.pm_stack} gls | Virtual cut -> assert (cut.cut_stat.st_label=Anonymous); - let id = pf_get_new_id (id_of_string "_matched") gls in + let id = pf_get_new_id (id_of_string "anonymous_matched") gls in let c = mkVar id in let modified_cut = {cut with cut_stat={cut.cut_stat with st_label=Name id}} in tclTHEN - (instr_cut (fun _ c -> c) false false modified_cut) + (instr_cut (fun _ _ c -> c) false false modified_cut) (fun gls0 -> let is_dep,per_info = build_per_info etype c gls0 in assert (not is_dep); tcl_change_info - {info with pm_stack= + {pm_stack= Per(etype,per_info,EK_unknown,[])::info.pm_stack} gls0) gls @@ -944,16 +949,12 @@ let register_nodep_subcase id= function let suppose_tac hyps gls0 = let info = get_its_info gls0 in - let thesis = get_thesis gls0 in - let id = pf_get_new_id (id_of_string "_subcase") gls0 in + let thesis = pf_concl gls0 in + let id = pf_get_new_id (id_of_string "subcase_") gls0 in let clause = build_product hyps thesis in - let ninfo1 = {info with - pm_stack=Suppose_case::info.pm_stack; - pm_partial_goal=mkMeta 1; - pm_subgoals = [1,clause]} in + let ninfo1 = {pm_stack=Suppose_case::info.pm_stack} in let old_clauses,stack = register_nodep_subcase id info.pm_stack in - let ninfo2 = {info with - pm_stack=stack} in + let ninfo2 = {pm_stack=stack} in tclTHENS (internal_cut id clause) [tclTHENLIST [tcl_change_info ninfo1; assume_tac hyps; @@ -964,120 +965,109 @@ let suppose_tac hyps gls0 = (* pattern matching compiling *) -let rec nb_prod_after n c= - match kind_of_term c with - | Prod (_,_,b) ->if n>0 then nb_prod_after (n-1) b else - 1+(nb_prod_after 0 b) - | _ -> 0 - -let constructor_arities env ind = - let nparams = (fst (Global.lookup_inductive ind)).mind_nparams in - let constr_types = Inductiveops.arities_of_constructors env ind in - let hyp = nb_prod_after nparams in - Array.map hyp constr_types - -let rec n_push rest ids n = - if n<=0 then Pop rest else Push (ids,n_push rest ids (pred n)) - -let explode_branches ids env ind rest= - Array.map (fun n -> Some (Idset.empty,n_push rest ids n)) (constructor_arities env ind) +let rec skip_args rest ids n = + if n <= 0 then + Close_patt rest + else + Skip_patt (ids,skip_args rest ids (pred n)) -let rec tree_of_pats env ((id,_) as cpl) pats = +let rec tree_of_pats ((id,_) as cpl) pats = match pats with - [] -> End_of_branch cpl + [] -> End_patt cpl | args::stack -> match args with - [] -> Pop (tree_of_pats env cpl stack) - | patt :: rest_args -> + [] -> Close_patt (tree_of_pats cpl stack) + | (patt,rp) :: rest_args -> match patt with PatVar (_,v) -> - Push (Idset.singleton id, - tree_of_pats env cpl (rest_args::stack)) - | PatCstr (_,(ind,cnum),args,nam) -> - let _,mind = Inductive.lookup_mind_specif env ind in - let br= Array.map (fun _ -> None) mind.mind_consnames in - br.(pred cnum) <- - Some (Idset.singleton id, - tree_of_pats env cpl (args::rest_args::stack)); - Split(Idset.empty,ind,br) - -let rec add_branch env ((id,_) as cpl) pats tree= + Skip_patt (Idset.singleton id, + tree_of_pats cpl (rest_args::stack)) + | PatCstr (_,(ind,cnum),args,nam) -> + let nexti i ati = + if i = pred cnum then + let nargs = + list_map_i (fun j a -> (a,ati.(j))) 0 args in + Some (Idset.singleton id, + tree_of_pats cpl (nargs::rest_args::stack)) + else None + in init_tree Idset.empty ind rp nexti + +let rec add_branch ((id,_) as cpl) pats tree= match pats with [] -> begin match tree with - End_of_branch cpl0 -> End_of_branch cpl0 - (* this ensures precedence *) + End_patt cpl0 -> End_patt cpl0 + (* this ensures precedence for overlapping patterns *) | _ -> anomaly "tree is expected to end here" end | args::stack -> match args with [] -> begin - match tree with - Pop t -> Pop (add_branch env cpl stack t) + match tree with + Close_patt t -> + Close_patt (add_branch cpl stack t) | _ -> anomaly "we should pop here" end - | patt :: rest_args -> + | (patt,rp) :: rest_args -> match patt with PatVar (_,v) -> begin match tree with - Push (ids,t) -> - Push (Idset.add id ids, - add_branch env cpl (rest_args::stack) t) - | Split (ids,ind,br) -> - Split (Idset.add id ids, - ind,array_map2 - (append_branch env cpl 1 - (rest_args::stack)) - (constructor_arities env ind) br) + Skip_patt (ids,t) -> + Skip_patt (Idset.add id ids, + add_branch cpl (rest_args::stack) t) + | Split_patt (_,_,_) -> + map_tree (Idset.add id) + (fun i bri -> + append_branch cpl 1 (rest_args::stack) bri) + tree | _ -> anomaly "No pop/stop expected here" end | PatCstr (_,(ind,cnum),args,nam) -> - match tree with - Push (ids,t) -> - let br = explode_branches ids env ind t in - let _ = - br.(pred cnum)<- - option_map - (fun (ids,tree) -> - Idset.add id ids, - add_branch env cpl - (args::rest_args::stack) tree) - br.(pred cnum) in - Split (ids,ind,br) - | Split (ids,ind0,br0) -> + match tree with + Skip_patt (ids,t) -> + let nexti i ati = + if i = pred cnum then + let nargs = + list_map_i (fun j a -> (a,ati.(j))) 0 args in + Some (Idset.add id ids, + add_branch cpl (nargs::rest_args::stack) + (skip_args t ids (Array.length ati))) + else + Some (ids, + skip_args t ids (Array.length ati)) + in init_tree ids ind rp nexti + | Split_patt (_,ind0,_) -> if (ind <> ind0) then error (* this can happen with coercions *) - "Case pattern belongs to wrong inductive type"; - let br=Array.copy br0 in - let ca = constructor_arities env ind in - let _= br.(pred cnum)<- - append_branch env cpl 0 (args::rest_args::stack) - ca.(pred cnum) br.(pred cnum) in - Split (ids,ind,br) + "Case pattern belongs to wrong inductive type"; + let mapi i ati bri = + if i = pred cnum then + let nargs = + list_map_i (fun j a -> (a,ati.(j))) 0 args in + append_branch cpl 0 + (nargs::rest_args::stack) bri + else bri in + map_tree_rp rp (fun ids -> ids) mapi tree | _ -> anomaly "No pop/stop expected here" -and append_branch env ((id,_) as cpl) depth pats nargs = function +and append_branch ((id,_) as cpl) depth pats = function Some (ids,tree) -> - Some (Idset.add id ids,append_tree env cpl depth pats tree) + Some (Idset.add id ids,append_tree cpl depth pats tree) | None -> - Some (* (n_push (tree_of_pats env cpl pats) - (Idset.singleton id) nargs) *) - (Idset.singleton id,tree_of_pats env cpl pats) -and append_tree env ((id,_) as cpl) depth pats tree = - if depth<=0 then add_branch env cpl pats tree + Some (Idset.singleton id,tree_of_pats cpl pats) +and append_tree ((id,_) as cpl) depth pats tree = + if depth<=0 then add_branch cpl pats tree else match tree with - Pop t -> Pop (append_tree env cpl (pred depth) pats t) - | Push (ids,t) -> Push (Idset.add id ids, - append_tree env cpl depth pats t) - | End_of_branch _ -> anomaly "Premature end of branch" - | Split (ids,ind,branches) -> - Split (Idset.add id ids,ind, - array_map2 - (append_branch env cpl (succ depth) pats) - (constructor_arities env ind) - branches) + Close_patt t -> + Close_patt (append_tree cpl (pred depth) pats t) + | Skip_patt (ids,t) -> + Skip_patt (Idset.add id ids,append_tree cpl depth pats t) + | End_patt _ -> anomaly "Premature end of branch" + | Split_patt (_,_,_) -> + map_tree (Idset.add id) + (fun i bri -> append_branch cpl (succ depth) pats bri) tree (* suppose it is *) @@ -1129,8 +1119,7 @@ let rec build_product_dep pat_info per_info args body gls = with Not_found -> snd (st_assoc (Name id) pat_info.pat_aliases) in thesis_for obj typ per_info (pf_env gls) - | Plain -> get_thesis gls - | Sub n -> anomaly "Subthesis in cases" in + | Plain -> pf_concl gls in mkProd (st.st_label,ptyp,lbody) | [] -> body @@ -1156,26 +1145,22 @@ let rec register_dep_subcase id env per_info pat = function EK_nodep -> error "Only \"suppose it is\" can be used here." | EK_unknown -> register_dep_subcase id env per_info pat - (EK_dep (start_tree env per_info.per_ind)) - | EK_dep tree -> EK_dep (add_branch env id [[pat]] tree) + (EK_dep (start_tree env per_info.per_ind per_info.per_wf)) + | EK_dep tree -> EK_dep (add_branch id [[pat,per_info.per_wf]] tree) let case_tac params pat_info hyps gls0 = let info = get_its_info gls0 in - let id = pf_get_new_id (id_of_string "_subcase") gls0 in + let id = pf_get_new_id (id_of_string "subcase_") gls0 in let et,per_info,ek,old_clauses,rest = match info.pm_stack with Per (et,pi,ek,old_clauses)::rest -> (et,pi,ek,old_clauses,rest) | _ -> anomaly "wrong place for cases" in let clause = build_dep_clause params pat_info per_info hyps gls0 in - let ninfo1 = {info with - pm_stack=Suppose_case::info.pm_stack; - pm_partial_goal=mkMeta 1; - pm_subgoals = [1,clause]} in + let ninfo1 = {pm_stack=Suppose_case::info.pm_stack} in let nek = register_dep_subcase (id,List.length hyps) (pf_env gls0) per_info pat_info.pat_pat ek in - let ninfo2 = {info with - pm_stack=Per(et,per_info,nek,id::old_clauses)::rest} in + let ninfo2 = {pm_stack=Per(et,per_info,nek,id::old_clauses)::rest} in tclTHENS (internal_cut id clause) [tclTHENLIST [tcl_change_info ninfo1; @@ -1188,181 +1173,152 @@ let case_tac params pat_info hyps gls0 = (* end cases *) type instance_stack = - (constr option*bool*(constr list) list) list + (constr option*(constr list) list) list let initial_instance_stack ids = - List.map (fun id -> id,[None,false,[]]) ids + List.map (fun id -> id,[None,[]]) ids let push_one_arg arg = function [] -> anomaly "impossible" - | (head,is_rec,args) :: ctx -> - ((head,is_rec,(arg::args)) :: ctx) + | (head,args) :: ctx -> + ((head,(arg::args)) :: ctx) let push_arg arg stacks = List.map (fun (id,stack) -> (id,push_one_arg arg stack)) stacks -let push_one_head c is_rec ids (id,stack) = +let push_one_head c ids (id,stack) = let head = if Idset.mem id ids then Some c else None in - id,(head,is_rec,[]) :: stack + id,(head,[]) :: stack -let push_head c is_rec ids stacks = - List.map (push_one_head c is_rec ids) stacks +let push_head c ids stacks = + List.map (push_one_head c ids) stacks -let pop_one rec_flag (id,stack) = +let pop_one (id,stack) = let nstack= match stack with [] -> anomaly "impossible" | [c] as l -> l - | (Some head,is_rec,args)::(head0,is_rec0,args0)::ctx -> + | (Some head,args)::(head0,args0)::ctx -> let arg = applist (head,(List.rev args)) in - rec_flag:= !rec_flag || is_rec; - (head0,is_rec0,(arg::args0))::ctx - | (None,is_rec,args)::(head0,is_rec0,args0)::ctx -> - rec_flag:= !rec_flag || is_rec; - (head0,is_rec0,(args@args0))::ctx + (head0,(arg::args0))::ctx + | (None,args)::(head0,args0)::ctx -> + (head0,(args@args0))::ctx in id,nstack let pop_stacks stacks = - let rec_flag= ref false in - let nstacks = List.map (pop_one rec_flag) stacks in - !rec_flag , nstacks + List.map pop_one stacks let patvar_base = id_of_string "__" -let test_fun (str:string) = () - -let hrec_for obj_id fix_id per_info gls= +let hrec_for fix_id per_info gls obj_id = let obj=mkVar obj_id in let typ=pf_get_hyp_typ gls obj_id in let rc,hd1=decompose_prod typ in let cind,all_args=decompose_app typ in - match kind_of_term cind with - Ind ind when ind=per_info.per_ind -> - let params,args= list_chop per_info.per_nparams all_args in - if try - (List.for_all2 eq_constr params per_info.per_params) - with Invalid_argument _ -> false then - let hd2 = applist (mkVar fix_id,args@[obj]) in - Some (compose_lam rc (whd_beta hd2)) - else None - | _ -> None - - -(* custom elim performs the case analysis of hypothesis id from the local -context, - -- generalizing hypotheses below id -- computing the elimination predicate (abstract inductive predicate) -- build case analysis term -- generalize rec_calls (use wf_paths) -- vector of introduced identifiers per branch - -match id in t return p with - C1 ... => ?1 -|C2 ... => ?2 -... -end*) - - - - - - - - - -let rec execute_cases at_top fix_name per_info kont0 stacks tree gls = - match tree with - Pop t -> - let is_rec,nstacks = pop_stacks stacks in - if is_rec then - let _ = test_fun "is_rec=true" in - let c_id = pf_get_new_id (id_of_string "_hrec") gls in - tclTHEN - (intro_mustbe_force c_id) - (execute_cases false fix_name per_info kont0 nstacks t) gls - else - execute_cases false fix_name per_info kont0 nstacks t gls - | Push (_,t) -> - let id = pf_get_new_id patvar_base gls in - let nstacks = push_arg (mkVar id) stacks in - let kont = execute_cases false fix_name per_info kont0 nstacks t in - tclTHEN - (intro_mustbe_force id) - begin - match fix_name with - Anonymous -> kont - | Name fix_id -> - (fun gls -> - if at_top then - kont gls - else - match hrec_for id fix_id per_info gls with - None -> kont gls - | Some c_obj -> - let c_id = - pf_get_new_id (id_of_string "_hrec") gls in - tclTHENLIST - [generalize [c_obj]; - intro_mustbe_force c_id; - kont] gls) - end gls - | Split(ids,ind,br) -> - let (_,typ,_)= - try destProd (pf_concl gls) with Invalid_argument _ -> - anomaly "Sub-object not found." in - let hd,args=decompose_app (special_whd gls typ) in - if try ind <> destInd hd with Invalid_argument _ -> true then - (* argument of an inductive family : intro + discard *) - tclTHEN intro - (execute_cases at_top fix_name per_info kont0 stacks tree) gls - else - begin - let nparams = (fst (Global.lookup_inductive ind)).mind_nparams in - let params = list_firstn nparams args in - let constr i =applist (mkConstruct(ind,succ i),params) in - let next_tac is_rec i = function - Some (sub_ids,tree) -> - let br_stacks = - List.filter (fun (id,_) -> Idset.mem id sub_ids) stacks in - let p_stacks = - push_head (constr i) is_rec ids br_stacks in - execute_cases false fix_name per_info kont0 p_stacks tree - | None -> - msgnl (str "Warning : missing case"); - kont0 (mkMeta 1) - in - let id = pf_get_new_id patvar_base gls in - let kont is_rec = - tclTHENSV - (general_case_analysis (mkVar id,NoBindings)) - (Array.mapi (next_tac is_rec) br) in - tclTHEN - (intro_mustbe_force id) - begin - match fix_name with - Anonymous -> kont false - | Name fix_id -> - (fun gls -> - if at_top then - kont false gls - else - match hrec_for id fix_id per_info gls with - None -> kont false gls - | Some c_obj -> - tclTHENLIST - [generalize [c_obj]; - kont true] gls) - end gls - end - | End_of_branch (id,nhyps) -> - match List.assoc id stacks with - [None,_,args] -> - let metas = list_tabulate (fun n -> mkMeta (succ n)) nhyps in - kont0 (applist (mkVar id,List.rev_append args metas)) gls - | _ -> anomaly "wrong stack size" - + let ind = destInd cind in assert (ind=per_info.per_ind); + let params,args= list_chop per_info.per_nparams all_args in + assert begin + try List.for_all2 eq_constr params per_info.per_params with + Invalid_argument _ -> false end; + let hd2 = applist (mkVar fix_id,args@[obj]) in + compose_lam rc (whd_beta hd2) + +let rec execute_cases fix_name per_info tacnext args objs nhrec tree gls = + match tree, objs with + Close_patt t,_ -> + let args0 = pop_stacks args in + execute_cases fix_name per_info tacnext args0 objs nhrec t gls + | Skip_patt (_,t),skipped::next_objs -> + let args0 = push_arg skipped args in + execute_cases fix_name per_info tacnext args0 next_objs nhrec t gls + | End_patt (id,nhyps),[] -> + begin + match List.assoc id args with + [None,br_args] -> + let metas = + list_tabulate (fun n -> mkMeta (succ n)) nhyps in + tclTHEN + (tclDO nhrec introf) + (tacnext + (applist (mkVar id,List.rev_append br_args metas))) gls + | _ -> anomaly "wrong stack size" + end + | Split_patt (ids,ind,br), casee::next_objs -> + let (mind,oind) as spec = Global.lookup_inductive ind in + let nparams = mind.mind_nparams in + let concl=pf_concl gls in + let env=pf_env gls in + let ctyp=pf_type_of gls casee in + let hd,all_args = decompose_app (special_whd gls ctyp) in + let _ = assert (destInd hd = ind) in (* just in case *) + let params,real_args = list_chop nparams all_args in + let abstract_obj c body = + let typ=pf_type_of gls c in + lambda_create env (typ,subst_term c body) in + let elim_pred = List.fold_right abstract_obj + real_args (lambda_create env (ctyp,subst_term casee concl)) in + let case_info = Inductiveops.make_case_info env ind RegularStyle in + let gen_arities = Inductive.arities_of_constructors ind spec in + let f_ids typ = + let sign = + fst (Sign.decompose_prod_assum (Term.prod_applist typ params)) in + find_intro_names sign gls in + let constr_args_ids = Array.map f_ids gen_arities in + let case_term = + mkCase(case_info,elim_pred,casee, + Array.mapi (fun i _ -> mkMeta (succ i)) constr_args_ids) in + let branch_tac i (recargs,bro) gls0 = + let args_ids = constr_args_ids.(i) in + let rec aux n = function + [] -> + assert (n=Array.length recargs); + next_objs,[],nhrec + | id :: q -> + let objs,recs,nrec = aux (succ n) q in + if recargs.(n) + then (mkVar id::objs),(id::recs),succ nrec + else (mkVar id::objs),recs,nrec in + let objs,recs,nhrec = aux 0 args_ids in + tclTHENLIST + [tclMAP intro_mustbe_force args_ids; + begin + fun gls1 -> + let hrecs = + List.map + (fun id -> + hrec_for (out_name fix_name) per_info gls1 id) + recs in + generalize hrecs gls1 + end; + match bro with + None -> + msg_warning (str "missing case"); + tacnext (mkMeta 1) + | Some (sub_ids,tree) -> + let br_args = + List.filter + (fun (id,_) -> Idset.mem id sub_ids) args in + let construct = + applist (mkConstruct(ind,succ i),params) in + let p_args = + push_head construct ids br_args in + execute_cases fix_name per_info tacnext + p_args objs nhrec tree] gls0 in + tclTHENSV + (refine case_term) + (Array.mapi branch_tac br) gls + | Split_patt (_, _, _) , [] -> + anomaly "execute_cases : Nothing to split" + | Skip_patt _ , [] -> + anomaly "execute_cases : Nothing to skip" + | End_patt (_,_) , _ :: _ -> + anomaly "execute_cases : End of branch with garbage left" + + + +(* end focus/claim *) + let end_tac et2 gls = let info = get_its_info gls in let et1,pi,ek,clauses = @@ -1392,7 +1348,7 @@ let end_tac et2 gls = tclSOLVE [simplest_elim pi.per_casee] | ET_Case_analysis,EK_nodep -> tclTHEN - (general_case_analysis (pi.per_casee,NoBindings)) + (general_case_analysis false (pi.per_casee,NoBindings)) (default_justification (List.map mkVar clauses)) | ET_Induction,EK_nodep -> tclTHENLIST @@ -1400,31 +1356,35 @@ let end_tac et2 gls = simple_induct (AnonHyp (succ (List.length pi.per_args))); default_justification (List.map mkVar clauses)] | ET_Case_analysis,EK_dep tree -> - tclTHENLIST - [generalize (pi.per_args@[pi.per_casee]); - execute_cases true Anonymous pi + execute_cases Anonymous pi (fun c -> tclTHENLIST [refine c; clear clauses; justification assumption]) - (initial_instance_stack clauses) tree] + (initial_instance_stack clauses) [pi.per_casee] 0 tree | ET_Induction,EK_dep tree -> - tclTHEN (generalize (pi.per_args@[pi.per_casee])) - begin - fun gls0 -> - let fix_id = pf_get_new_id (id_of_string "_fix") gls0 in - tclTHEN - (fix (Some fix_id) (succ (List.length pi.per_args))) - (execute_cases true (Name fix_id) pi - (fun c -> - tclTHENLIST - [clear [fix_id]; - refine c; - clear clauses; - justification assumption - (* justification automation_tac *)]) - (initial_instance_stack clauses) tree) gls0 - end + let nargs = (List.length pi.per_args) in + tclTHEN (generalize (pi.per_args@[pi.per_casee])) + begin + fun gls0 -> + let fix_id = + pf_get_new_id (id_of_string "_fix") gls0 in + let c_id = + pf_get_new_id (id_of_string "_main_arg") gls0 in + tclTHENLIST + [fix (Some fix_id) (succ nargs); + tclDO nargs introf; + intro_mustbe_force c_id; + execute_cases (Name fix_id) pi + (fun c -> + tclTHENLIST + [clear [fix_id]; + refine c; + clear clauses; + justification assumption]) + (initial_instance_stack clauses) + [mkVar c_id] 0 tree] gls0 + end end gls (* escape *) @@ -1432,25 +1392,13 @@ let end_tac et2 gls = let rec abstract_metas n avoid head = function [] -> 1,head,[] | (meta,typ)::rest -> - let id = Nameops.next_ident_away (id_of_string "_sbgl") avoid in + let id = next_ident_away (id_of_string "_sbgl") avoid in let p,term,args = abstract_metas (succ n) (id::avoid) head rest in succ p,mkLambda(Name id,typ,subst_meta [meta,mkRel p] term), (mkMeta n)::args -let build_refining_context gls = - let info = get_its_info gls in - let avoid=pf_ids_of_hyps gls in - let _,fn,args=abstract_metas 1 avoid info.pm_partial_goal info.pm_subgoals in - applist (fn,args) -let escape_command pts = - let pts1 = nth_unproven 1 pts in - let gls = top_goal_of_pftreestate pts1 in - let term = build_refining_context gls in - let tac = tclTHEN - (abstract_operation (Proof_instr (true,{emph=0;instr=Pescape})) tcl_erase_info) - (Tactics.refine term) in - traverse 1 (solve_pftreestate tac pts1) +let escape_tac gls = tcl_erase_info gls (* General instruction engine *) @@ -1485,7 +1433,8 @@ let rec do_proof_instr_gen _thus _then instr = | Psuppose hyps -> suppose_tac hyps | Pcase (params,pat_info,hyps) -> case_tac params pat_info hyps | Pend (B_elim et) -> end_tac et - | Pend _ | Pescape -> anomaly "Not applicable" + | Pend _ -> anomaly "Not applicable" + | Pescape -> escape_tac let eval_instr {instr=instr} = do_proof_instr_gen false false instr @@ -1500,7 +1449,7 @@ let rec preprocess pts instr = true,pts | Pescape -> check_not_per pts; - false,pts + true,pts | Pcase _ | Psuppose _ | Pend (B_elim _) -> true,close_previous_case pts | Pend bt -> @@ -1511,8 +1460,8 @@ let rec postprocess pts instr = Phence i | Pthus i | Pthen i -> postprocess pts i | Pcut _ | Psuffices _ | Passume _ | Plet _ | Pconsider (_,_) | Pcast (_,_) | Pgiven _ | Ptake _ | Pdefine (_,_,_) | Prew (_,_) -> pts - | Pclaim _ | Pfocus _ | Psuppose _ | Pcase _ | Pper _ -> nth_unproven 1 pts - | Pescape -> escape_command pts + | Pclaim _ | Pfocus _ | Psuppose _ | Pcase _ | Pper _ + | Pescape -> nth_unproven 1 pts | Pend (B_elim ET_Induction) -> begin let pf = proof_of_pftreestate pts in @@ -1523,7 +1472,7 @@ let rec postprocess pts instr = goto_current_focus_or_top (mark_as_done pts) with Type_errors.TypeError(env, - Type_errors.IllFormedRecBody(_,_,_)) -> + Type_errors.IllFormedRecBody(_,_,_,_,_)) -> anomaly "\"end induction\" generated an ill-formed fixpoint" end | Pend _ -> @@ -1544,7 +1493,7 @@ let do_instr raw_instr pts = let lock_focus = is_focussing_instr instr.instr in let marker= Proof_instr (lock_focus,instr) in solve_nth_pftreestate 1 - (abstract_operation marker (eval_instr instr)) pts1 + (abstract_operation marker (tclTHEN (eval_instr instr) clean_tmp)) pts1 else pts1 in postprocess pts2 raw_instr.instr diff --git a/tactics/decl_proof_instr.mli b/tactics/decl_proof_instr.mli index 642f2755..2e235a01 100644 --- a/tactics/decl_proof_instr.mli +++ b/tactics/decl_proof_instr.mli @@ -6,12 +6,13 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id$ *) +(* $Id: decl_proof_instr.mli 10739 2008-04-01 14:45:20Z herbelin $ *) open Refiner open Names open Term open Tacmach +open Decl_mode val go_to_proof_mode: unit -> unit val return_from_tactic_mode: unit -> unit @@ -22,6 +23,8 @@ val automation_tac : tactic val daimon_subtree: pftreestate -> pftreestate +val concl_refiner: Termops.metamap -> constr -> Proof_type.goal sigma -> constr + val do_instr: Decl_expr.raw_proof_instr -> pftreestate -> pftreestate val proof_instr: Decl_expr.raw_proof_instr -> unit @@ -31,37 +34,29 @@ val mark_proof_tree_as_done : Proof_type.proof_tree -> Proof_type.proof_tree val mark_as_done : pftreestate -> pftreestate -val execute_cases : bool -> +val execute_cases : Names.name -> Decl_mode.per_info -> (Term.constr -> Proof_type.tactic) -> - (Names.Idset.elt * (Term.constr option * bool * Term.constr list) list) - list -> - Decl_mode.split_tree -> Proof_type.tactic + (Names.Idset.elt * (Term.constr option * Term.constr list) list) list -> + Term.constr list -> int -> Decl_mode.split_tree -> Proof_type.tactic + +val tree_of_pats : + identifier * int -> (Rawterm.cases_pattern*recpath) list list -> + split_tree + +val add_branch : + identifier * int -> (Rawterm.cases_pattern*recpath) list list -> + split_tree -> split_tree -val tree_of_pats : - Environ.env -> - Names.Idset.elt * int -> - Rawterm.cases_pattern list list -> Decl_mode.split_tree -val add_branch : - Environ.env -> - Names.Idset.elt * int -> - Rawterm.cases_pattern list list -> - Decl_mode.split_tree -> Decl_mode.split_tree val append_branch : - Environ.env -> - Names.Idset.elt * int -> - int -> - Rawterm.cases_pattern list list -> - int -> - (Names.Idset.t * Decl_mode.split_tree) option -> - (Names.Idset.t * Decl_mode.split_tree) option - -val append_tree : Environ.env -> - Names.Idset.elt * int -> - int -> - Rawterm.cases_pattern list list -> - Decl_mode.split_tree -> Decl_mode.split_tree + identifier * int -> int -> (Rawterm.cases_pattern*recpath) list list -> + (Names.Idset.t * Decl_mode.split_tree) option -> + (Names.Idset.t * Decl_mode.split_tree) option + +val append_tree : + identifier * int -> int -> (Rawterm.cases_pattern*recpath) list list -> + split_tree -> split_tree val build_dep_clause : Term.types Decl_expr.statement list -> Decl_expr.proof_pattern -> @@ -80,35 +75,29 @@ val thesis_for : Term.constr -> val close_previous_case : pftreestate -> pftreestate -val test_fun : string -> unit - - val pop_stacks : (Names.identifier * - (Term.constr option * bool * Term.constr list) list) list -> - bool * - (Names.identifier * - (Term.constr option * bool * Term.constr list) list) list - + (Term.constr option * Term.constr list) list) list -> + (Names.identifier * + (Term.constr option * Term.constr list) list) list val push_head : Term.constr -> - bool -> Names.Idset.t -> (Names.identifier * - (Term.constr option * bool * Term.constr list) list) list -> + (Term.constr option * Term.constr list) list) list -> (Names.identifier * - (Term.constr option * bool * Term.constr list) list) list + (Term.constr option * Term.constr list) list) list val push_arg : Term.constr -> (Names.identifier * - (Term.constr option * bool * Term.constr list) list) list -> + (Term.constr option * Term.constr list) list) list -> (Names.identifier * - (Term.constr option * bool * Term.constr list) list) list + (Term.constr option * Term.constr list) list) list val hrec_for: Names.identifier -> - Names.identifier -> - Decl_mode.per_info -> Proof_type.goal Tacmach.sigma -> Term.constr option + Decl_mode.per_info -> Proof_type.goal Tacmach.sigma -> + Names.identifier -> Term.constr val consider_match : bool -> @@ -117,10 +106,12 @@ val consider_match : (Term.types Decl_expr.statement, Term.types) Decl_expr.hyp list -> Proof_type.tactic -val thus_tac : constr -> constr -> (metavariable * types) list -> - tactic - -val build_applist : Term.types -> - Term.metavariable list -> - (Term.metavariable * Term.types) list * Term.types +val init_tree: + Names.Idset.t -> + Names.inductive -> + int option * Declarations.wf_paths -> + (int -> + (int option * Declarations.recarg Rtree.t) array -> + (Names.Idset.t * Decl_mode.split_tree) option) -> + Decl_mode.split_tree diff --git a/tactics/dhyp.ml b/tactics/dhyp.ml index f82b1f82..5dd7f5fd 100644 --- a/tactics/dhyp.ml +++ b/tactics/dhyp.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: dhyp.ml 8878 2006-05-30 16:44:25Z herbelin $ *) +(* $Id: dhyp.ml 11094 2008-06-10 19:35:23Z herbelin $ *) (* Chet's comments about this tactic : @@ -261,11 +261,13 @@ let add_destructor_hint local na loc pat pri code = (inDD (local,na,{ d_pat = pat; d_pri=pri; d_code=code })) let match_dpat dp cls gls = + let onconcl = cls.concl_occs <> no_occurrences_expr in match (cls,dp) with - | ({onhyps=lo;onconcl=false},HypLocation(_,hypd,concld)) -> + | ({onhyps=lo},HypLocation(_,hypd,concld)) when not onconcl -> let hl = match lo with Some l -> l - | None -> List.map (fun id -> (([],id),InHyp)) (pf_ids_of_hyps gls) in + | None -> List.map (fun id -> ((all_occurrences_expr,id),InHyp)) + (pf_ids_of_hyps gls) in if not (List.for_all (fun ((_,id),hl) -> @@ -278,7 +280,7 @@ let match_dpat dp cls gls = (is_matching concld.d_sort (pf_type_of gls cl))) hl) then error "No match" - | ({onhyps=Some[];onconcl=true},ConclLocation concld) -> + | ({onhyps=Some[]},ConclLocation concld) when onconcl -> let cl = pf_concl gls in if not ((is_matching concld.d_typ cl) & @@ -300,7 +302,7 @@ let applyDestructor cls discard dd gls = | Some ((_,id),_), (Some x, tac) -> let arg = ConstrMayEval(ConstrTerm (RRef(dummy_loc,VarRef id),None)) in - TacLetIn ([(dummy_loc, x), None, arg], tac) + TacLetIn (false, [(dummy_loc, x), arg], tac) | None, (None, tac) -> tac | _, (Some _,_) -> error "Destructor expects an hypothesis" | _, (None,_) -> error "Destructor is for conclusion") diff --git a/tactics/eauto.ml4 b/tactics/eauto.ml4 index 6da0dd49..2effe103 100644 --- a/tactics/eauto.ml4 +++ b/tactics/eauto.ml4 @@ -8,7 +8,7 @@ (*i camlp4deps: "parsing/grammar.cma" i*) -(* $Id: eauto.ml4 9277 2006-10-25 13:02:22Z herbelin $ *) +(* $Id: eauto.ml4 11094 2008-06-10 19:35:23Z herbelin $ *) open Pp open Util @@ -29,6 +29,7 @@ open Pattern open Clenv open Auto open Rawterm +open Hiddentac let e_give_exact c gl = let t1 = (pf_type_of gl c) and t2 = pf_concl gl in if occur_existential t1 or occur_existential t2 then @@ -44,13 +45,6 @@ TACTIC EXTEND eassumption | [ "eassumption" ] -> [ e_assumption ] END -let e_resolve_with_bindings_tac (c,lbind) gl = - let t = pf_hnf_constr gl (pf_type_of gl c) in - let clause = make_clenv_binding_apply gl None (c,t) lbind in - Clenvtac.e_res_pf clause gl - -let e_resolve_constr c gls = e_resolve_with_bindings_tac (c,NoBindings) gls - TACTIC EXTEND eexact | [ "eexact" constr(c) ] -> [ e_give_exact c ] END @@ -61,84 +55,14 @@ let registered_e_assumption gl = tclFIRST (List.map (fun id gl -> e_give_exact_constr (mkVar id) gl) (pf_ids_of_hyps gl)) gl -(* This automatically define h_eApply (among other things) *) -TACTIC EXTEND eapply - [ "eapply" constr_with_bindings(c) ] -> [ e_resolve_with_bindings_tac c ] -END - -let vernac_e_resolve_constr c = h_eapply (c,NoBindings) - -let e_constructor_tac boundopt i lbind gl = - let cl = pf_concl gl in - let (mind,redcl) = pf_reduce_to_quantified_ind gl cl in - let nconstr = - Array.length (snd (Global.lookup_inductive mind)).mind_consnames in - if i=0 then error "The constructors are numbered starting from 1"; - if i > nconstr then error "Not enough constructors"; - begin match boundopt with - | Some expctdnum -> - if expctdnum <> nconstr then - error "Not the expected number of constructors" - | None -> () - end; - let cons = mkConstruct (ith_constructor_of_inductive mind i) in - let apply_tac = e_resolve_with_bindings_tac (cons,lbind) in - (tclTHENLIST [convert_concl_no_check redcl DEFAULTcast -; intros; apply_tac]) gl - -let e_one_constructor i = e_constructor_tac None i - -let e_any_constructor tacopt gl = - let t = match tacopt with None -> tclIDTAC | Some t -> t in - let mind = fst (pf_reduce_to_quantified_ind gl (pf_concl gl)) in - let nconstr = - Array.length (snd (Global.lookup_inductive mind)).mind_consnames in - if nconstr = 0 then error "The type has no constructors"; - tclFIRST (List.map (fun i -> tclTHEN (e_one_constructor i NoBindings) t) - (interval 1 nconstr)) gl - -let e_left = e_constructor_tac (Some 2) 1 - -let e_right = e_constructor_tac (Some 2) 2 - -let e_split = e_constructor_tac (Some 1) 1 - -(* This automatically define h_econstructor (among other things) *) -TACTIC EXTEND econstructor - [ "econstructor" integer(n) "with" bindings(c) ] -> [ e_constructor_tac None n c ] -| [ "econstructor" integer(n) ] -> [ e_constructor_tac None n NoBindings ] -| [ "econstructor" tactic_opt(t) ] -> [ e_any_constructor (option_map Tacinterp.eval_tactic t) ] - END - -TACTIC EXTEND eleft - [ "eleft" "with" bindings(l) ] -> [e_left l] -| [ "eleft"] -> [e_left NoBindings] -END - -TACTIC EXTEND eright - [ "eright" "with" bindings(l) ] -> [e_right l] -| [ "eright" ] -> [e_right NoBindings] -END - -TACTIC EXTEND esplit - [ "esplit" "with" bindings(l) ] -> [e_split l] -| [ "esplit"] -> [e_split NoBindings] -END - - -TACTIC EXTEND eexists - [ "eexists" bindings(l) ] -> [e_split l] -END - - (************************************************************************) (* PROLOG tactic *) (************************************************************************) let one_step l gl = [Tactics.intro] - @ (List.map e_resolve_constr (List.map mkVar (pf_ids_of_hyps gl))) - @ (List.map e_resolve_constr l) + @ (List.map h_simplest_eapply (List.map mkVar (pf_ids_of_hyps gl))) + @ (List.map h_simplest_eapply l) @ (List.map assumption (pf_ids_of_hyps gl)) let rec prolog l n gl = @@ -161,51 +85,103 @@ TACTIC EXTEND prolog END open Auto +open Unification (***************************************************************************) (* A tactic similar to Auto, but using EApply, Assumption and e_give_exact *) (***************************************************************************) -let unify_e_resolve (c,clenv) gls = +(* no delta yet *) + +let unify_e_resolve flags (c,clenv) gls = + let clenv' = connect_clenv gls clenv in + let _ = clenv_unique_resolver false ~flags clenv' gls in + h_simplest_eapply c gls + +let unify_e_resolve_nodelta (c,clenv) gls = let clenv' = connect_clenv gls clenv in let _ = clenv_unique_resolver false clenv' gls in - vernac_e_resolve_constr c gls + h_simplest_eapply c gls -let rec e_trivial_fail_db db_list local_db goal = +let rec e_trivial_fail_db mod_delta db_list local_db goal = let tacl = registered_e_assumption :: (tclTHEN Tactics.intro (function g'-> let d = pf_last_hyp g' in let hintl = make_resolve_hyp (pf_env g') (project g') d in - (e_trivial_fail_db db_list - (Hint_db.add_list hintl local_db) g'))) :: - (List.map fst (e_trivial_resolve db_list local_db (pf_concl goal)) ) + (e_trivial_fail_db mod_delta db_list + (add_hint_list hintl local_db) g'))) :: + (List.map fst (e_trivial_resolve mod_delta db_list local_db (pf_concl goal)) ) in tclFIRST (List.map tclCOMPLETE tacl) goal -and e_my_find_search db_list local_db hdc concl = +and e_my_find_search mod_delta = + if mod_delta then e_my_find_search_delta + else e_my_find_search_nodelta + +and e_my_find_search_nodelta db_list local_db hdc concl = let hdc = head_of_constr_reference hdc in let hintl = if occur_existential concl then - list_map_append (Hint_db.map_all hdc) (local_db::db_list) + list_map_append (fun (st, db) -> Hint_db.map_all hdc db) (local_db::db_list) else - list_map_append (Hint_db.map_auto (hdc,concl)) (local_db::db_list) + list_map_append (fun (st, db) -> + Hint_db.map_auto (hdc,concl) db) (local_db::db_list) in let tac_of_hint = fun {pri=b; pat = p; code=t} -> (b, let tac = match t with - | Res_pf (term,cl) -> unify_resolve (term,cl) - | ERes_pf (term,cl) -> unify_e_resolve (term,cl) + | Res_pf (term,cl) -> unify_resolve_nodelta (term,cl) + | ERes_pf (term,cl) -> unify_e_resolve_nodelta (term,cl) | Give_exact (c) -> e_give_exact_constr c | Res_pf_THEN_trivial_fail (term,cl) -> - tclTHEN (unify_e_resolve (term,cl)) - (e_trivial_fail_db db_list local_db) - | Unfold_nth c -> unfold_in_concl [[],c] + tclTHEN (unify_e_resolve_nodelta (term,cl)) + (e_trivial_fail_db false db_list local_db) + | Unfold_nth c -> unfold_in_concl [all_occurrences,c] | Extern tacast -> conclPattern concl - (out_some p) tacast + (Option.get p) tacast + in + (tac,fmt_autotactic t)) + (*i + fun gls -> pPNL (fmt_autotactic t); Format.print_flush (); + try tac gls + with e when Logic.catchable_exception(e) -> + (Format.print_string "Fail\n"; + Format.print_flush (); + raise e) + i*) + in + List.map tac_of_hint hintl + +and e_my_find_search_delta db_list local_db hdc concl = + let hdc = head_of_constr_reference hdc in + let hintl = + if occur_existential concl then + list_map_append (fun (st, db) -> + let flags = {auto_unif_flags with modulo_delta = st} in + List.map (fun x -> flags, x) (Hint_db.map_all hdc db)) (local_db::db_list) + else + list_map_append (fun (st, db) -> + let flags = {auto_unif_flags with modulo_delta = st} in + List.map (fun x -> flags, x) (Hint_db.map_auto (hdc,concl) db)) (local_db::db_list) + in + let tac_of_hint = + fun (st, {pri=b; pat = p; code=t}) -> + (b, + let tac = + match t with + | Res_pf (term,cl) -> unify_resolve st (term,cl) + | ERes_pf (term,cl) -> unify_e_resolve st (term,cl) + | Give_exact (c) -> e_give_exact_constr c + | Res_pf_THEN_trivial_fail (term,cl) -> + tclTHEN (unify_e_resolve st (term,cl)) + (e_trivial_fail_db true db_list local_db) + | Unfold_nth c -> unfold_in_concl [all_occurrences,c] + | Extern tacast -> conclPattern concl + (Option.get p) tacast in (tac,fmt_autotactic t)) (*i @@ -219,16 +195,17 @@ and e_my_find_search db_list local_db hdc concl = in List.map tac_of_hint hintl -and e_trivial_resolve db_list local_db gl = +and e_trivial_resolve mod_delta db_list local_db gl = try Auto.priority - (e_my_find_search db_list local_db + (e_my_find_search mod_delta db_list local_db (List.hd (head_constr_bound gl [])) gl) with Bound | Not_found -> [] -let e_possible_resolve db_list local_db gl = - try List.map snd (e_my_find_search db_list local_db - (List.hd (head_constr_bound gl [])) gl) +let e_possible_resolve mod_delta db_list local_db gl = + try List.map snd + (e_my_find_search mod_delta db_list local_db + (List.hd (head_constr_bound gl [])) gl) with Bound | Not_found -> [] let assumption_tac_list id = apply_tac_list (e_give_exact_constr (mkVar id)) @@ -238,31 +215,42 @@ let find_first_goal gls = (*s The following module [SearchProblem] is used to instantiate the generic exploration functor [Explore.Make]. *) - + +type search_state = { + depth : int; (*r depth of search before failing *) + tacres : goal list sigma * validation; + last_tactic : std_ppcmds; + dblist : Auto.hint_db list; + localdb : Auto.hint_db list } + module SearchProblem = struct + + type state = search_state - type state = { - depth : int; (*r depth of search before failing *) - tacres : goal list sigma * validation; - last_tactic : std_ppcmds; - dblist : Auto.Hint_db.t list; - localdb : Auto.Hint_db.t list } - let success s = (sig_it (fst s.tacres)) = [] - let rec filter_tactics (glls,v) = function - | [] -> [] - | (tac,pptac) :: tacl -> - try - let (lgls,ptl) = apply_tac_list tac glls in - let v' p = v (ptl p) in - ((lgls,v'),pptac) :: filter_tactics (glls,v) tacl - with e when Logic.catchable_exception e -> - filter_tactics (glls,v) tacl - - let rec list_addn n x l = - if n = 0 then l else x :: (list_addn (pred n) x l) - + let pr_ev evs ev = Printer.pr_constr_env (Evd.evar_env ev) (Evarutil.nf_evar evs ev.Evd.evar_concl) + + let pr_goals gls = + let evars = Evarutil.nf_evars (Refiner.project gls) in + prlist (pr_ev evars) (sig_it gls) + + let filter_tactics (glls,v) l = +(* let _ = Proof_trees.db_pr_goal (List.hd (sig_it glls)) in *) +(* let evars = Evarutil.nf_evars (Refiner.project glls) in *) +(* msg (str"Goal:" ++ pr_ev evars (List.hd (sig_it glls)) ++ str"\n"); *) + let rec aux = function + | [] -> [] + | (tac,pptac) :: tacl -> + try + let (lgls,ptl) = apply_tac_list tac glls in + let v' p = v (ptl p) in +(* let gl = Proof_trees.db_pr_goal (List.hd (sig_it glls)) in *) +(* msg (hov 1 (pptac ++ str" gives: \n" ++ pr_goals lgls ++ str"\n")); *) + ((lgls,v'),pptac) :: aux tacl + with e -> Refiner.catch_failerror e; aux tacl + in aux l + (* Ordering of states is lexicographic on depth (greatest first) then number of remaining goals. *) let compare s s' = @@ -297,7 +285,8 @@ module SearchProblem = struct let hintl = make_resolve_hyp (pf_env g') (project g') (pf_last_hyp g') in - let ldb = Hint_db.add_list hintl (List.hd s.localdb) in + + let ldb = add_hint_list hintl (List.hd s.localdb) in { depth = s.depth; tacres = res; last_tactic = pp; dblist = s.dblist; localdb = ldb :: List.tl s.localdb }) @@ -305,8 +294,7 @@ module SearchProblem = struct in let rec_tacs = let l = - filter_tactics s.tacres - (e_possible_resolve s.dblist (List.hd s.localdb) (pf_concl g)) + filter_tactics s.tacres (e_possible_resolve false s.dblist (List.hd s.localdb) (pf_concl g)) in List.map (fun ((lgls,_) as res, pp) -> @@ -332,17 +320,19 @@ end module Search = Explore.Make(SearchProblem) let make_initial_state n gl dblist localdb = - { SearchProblem.depth = n; - SearchProblem.tacres = tclIDTAC gl; - SearchProblem.last_tactic = (mt ()); - SearchProblem.dblist = dblist; - SearchProblem.localdb = [localdb] } + { depth = n; + tacres = tclIDTAC gl; + last_tactic = (mt ()); + dblist = dblist; + localdb = [localdb] } + +let debug_depth_first = Search.debug_depth_first let e_depth_search debug p db_list local_db gl = try let tac = if debug then Search.debug_depth_first else Search.depth_first in let s = tac (make_initial_state p gl db_list local_db) in - s.SearchProblem.tacres + s.tacres with Not_found -> error "EAuto: depth first search failed" let e_breadth_search debug n db_list local_db gl = @@ -351,17 +341,22 @@ let e_breadth_search debug n db_list local_db gl = if debug then Search.debug_breadth_first else Search.breadth_first in let s = tac (make_initial_state n gl db_list local_db) in - s.SearchProblem.tacres + s.tacres with Not_found -> error "EAuto: breadth first search failed" let e_search_auto debug (in_depth,p) lems db_list gl = - let local_db = make_local_hint_db lems gl in + let local_db = make_local_hint_db true lems gl in if in_depth then e_depth_search debug p db_list local_db gl else e_breadth_search debug p db_list local_db gl -let eauto debug np lems dbnames = +open Evd + +let eauto_with_bases debug np lems db_list = + tclTRY (e_search_auto debug np lems db_list) + +let eauto debug np lems dbnames = let db_list = List.map (fun x -> @@ -370,7 +365,7 @@ let eauto debug np lems dbnames = ("core"::dbnames) in tclTRY (e_search_auto debug np lems db_list) - + let full_eauto debug n lems gl = let dbnames = current_db_names () in let dbnames = list_subtract dbnames ["v62"] in @@ -428,3 +423,41 @@ TACTIC EXTEND eauto hintbases(db) ] -> [ gen_eauto false (make_dimension n p) lems db ] END + +TACTIC EXTEND new_eauto +| [ "new" "auto" int_or_var_opt(n) auto_using(lems) + hintbases(db) ] -> + [ match db with + | None -> new_full_auto (make_depth n) lems + | Some l -> + new_auto (make_depth n) lems l ] +END + +TACTIC EXTEND debug_eauto +| [ "debug" "eauto" int_or_var_opt(n) int_or_var_opt(p) auto_using(lems) + hintbases(db) ] -> + [ gen_eauto true (make_dimension n p) lems db ] +END + +TACTIC EXTEND dfs_eauto +| [ "dfs" "eauto" int_or_var_opt(p) auto_using(lems) + hintbases(db) ] -> + [ gen_eauto false (true, make_depth p) lems db ] +END + +let autosimpl db cl = + let unfold_of_elts constr (b, elts) = + if not b then + List.map (fun c -> all_occurrences, constr c) elts + else [] + in + let unfolds = List.concat (List.map (fun dbname -> + let ((ids, csts), _) = searchtable_map dbname in + unfold_of_elts (fun x -> EvalConstRef x) (Cpred.elements csts) @ + unfold_of_elts (fun x -> EvalVarRef x) (Idpred.elements ids)) db) + in unfold_option unfolds cl + +TACTIC EXTEND autosimpl +| [ "autosimpl" hintbases(db) ] -> + [ autosimpl (match db with None -> ["core"] | Some x -> "core"::x) None ] +END diff --git a/tactics/eauto.mli b/tactics/eauto.mli index 4621088e..1c6f9920 100644 --- a/tactics/eauto.mli +++ b/tactics/eauto.mli @@ -12,6 +12,9 @@ open Proof_type open Tacexpr open Auto open Topconstr +open Evd +open Environ +open Explore (*i*) val rawwit_hintbases : hint_db_name list option raw_abstract_argument_type @@ -22,12 +25,13 @@ val e_assumption : tactic val registered_e_assumption : tactic -val e_resolve_constr : constr -> tactic - -val vernac_e_resolve_constr : constr -> tactic - val e_give_exact_constr : constr -> tactic val gen_eauto : bool -> bool * int -> constr list -> hint_db_name list option -> tactic + +val eauto_with_bases : + bool -> + bool * int -> + Term.constr list -> Auto.hint_db list -> Proof_type.tactic diff --git a/tactics/elim.ml b/tactics/elim.ml index 2e079567..889ead5e 100644 --- a/tactics/elim.ml +++ b/tactics/elim.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: elim.ml 7538 2005-11-08 17:14:52Z herbelin $ *) +(* $Id: elim.ml 9842 2007-05-20 17:44:23Z herbelin $ *) open Pp open Util @@ -136,14 +136,16 @@ let decompose_or c gls = (fun (_,t) -> is_disjunction t) c gls +let inj_open c = (Evd.empty,c) + let h_decompose l c = - Refiner.abstract_tactic (TacDecompose (l,c)) (decompose_these c l) + Refiner.abstract_tactic (TacDecompose (l,inj_open c)) (decompose_these c l) let h_decompose_or c = - Refiner.abstract_tactic (TacDecomposeOr c) (decompose_or c) + Refiner.abstract_tactic (TacDecomposeOr (inj_open c)) (decompose_or c) let h_decompose_and c = - Refiner.abstract_tactic (TacDecomposeAnd c) (decompose_and c) + Refiner.abstract_tactic (TacDecomposeAnd (inj_open c)) (decompose_and c) (* The tactic Double performs a double induction *) diff --git a/tactics/eqdecide.ml4 b/tactics/eqdecide.ml4 index 0a33164e..8e0b2ca3 100644 --- a/tactics/eqdecide.ml4 +++ b/tactics/eqdecide.ml4 @@ -14,7 +14,7 @@ (*i camlp4deps: "parsing/grammar.cma" i*) -(* $Id: eqdecide.ml4 8780 2006-05-02 21:58:58Z letouzey $ *) +(* $Id: eqdecide.ml4 11166 2008-06-22 13:23:35Z herbelin $ *) open Util open Names @@ -75,7 +75,7 @@ let mkBranches c1 c2 = let solveNoteqBranch side = tclTHEN (choose_noteq side) (tclTHEN (intro_force true) - (onLastHyp (fun id -> Extratactics.h_discrHyp (Rawterm.NamedHyp id)))) + (onLastHyp (fun id -> Extratactics.h_discrHyp id))) let h_solveNoteqBranch side = Refiner.abstract_extended_tactic "solveNoteqBranch" [] @@ -115,7 +115,7 @@ let diseqCase eqonleft = (tclTHEN red_in_concl (tclTHEN (intro_using absurd) (tclTHEN (h_simplest_apply (mkVar diseq)) - (tclTHEN (Extratactics.h_injHyp (Rawterm.NamedHyp absurd)) + (tclTHEN (Extratactics.h_injHyp absurd) (full_trivial []))))))) let solveArg eqonleft op a1 a2 tac g = diff --git a/tactics/equality.ml b/tactics/equality.ml index 24a7e34e..a475b392 100644 --- a/tactics/equality.ml +++ b/tactics/equality.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: equality.ml 9835 2007-05-17 22:23:03Z jforest $ *) +(* $Id: equality.ml 11166 2008-06-22 13:23:35Z herbelin $ *) open Pp open Util @@ -40,6 +40,9 @@ open Vernacexpr open Setoid_replace open Declarations open Indrec +open Printer +open Clenv +open Clenvtac (* Rewriting tactics *) @@ -51,20 +54,22 @@ open Indrec -- Eduardo (19/8/97) *) -let general_s_rewrite_clause = function - | None -> general_s_rewrite - | Some id -> general_s_rewrite_in id - (* Ad hoc asymmetric general_elim_clause *) -let general_elim_clause cls c elim = match cls with - | None -> - (* was tclWEAK_PROGRESS which only fails for tactics generating one - subgoal and did not fail for useless conditional rewritings generating - an extra condition *) - tclNOTSAMEGOAL (general_elim c elim ~allow_K:false) - | Some id -> - general_elim_in id c elim - +let general_elim_clause with_evars cls c elim = + try + (match cls with + | None -> + (* was tclWEAK_PROGRESS which only fails for tactics generating one + subgoal and did not fail for useless conditional rewritings generating + an extra condition *) + tclNOTSAMEGOAL (general_elim with_evars c elim ~allow_K:false) + | Some id -> + general_elim_in with_evars id c elim) + with Pretype_errors.PretypeError (env, + (Pretype_errors.NoOccurrenceFound (c', _))) -> + raise (Pretype_errors.PretypeError + (env, (Pretype_errors.NoOccurrenceFound (c', cls)))) + let elimination_sort_of_clause = function | None -> elimination_sort_of_goal | Some id -> elimination_sort_of_hyp id @@ -81,14 +86,21 @@ let elimination_sort_of_clause = function else back to the old approach *) -let general_rewrite_bindings_clause cls lft2rgt (c,l) gl = +let general_s_rewrite_clause = function + | None -> general_s_rewrite + | Some id -> general_s_rewrite_in id + +let general_setoid_rewrite_clause = ref general_s_rewrite_clause +let register_general_setoid_rewrite_clause = (:=) general_setoid_rewrite_clause + +let general_rewrite_ebindings_clause cls lft2rgt occs (c,l) with_evars gl = let ctype = pf_apply get_type_of gl c in (* A delta-reduction would be here too strong, since it would break search for a defined setoid relation in head position. *) let t = snd (decompose_prod (whd_betaiotazeta ctype)) in let head = if isApp t then fst (destApp t) else t in if relation_table_mem head && l = NoBindings then - general_s_rewrite_clause cls lft2rgt c [] gl + !general_setoid_rewrite_clause cls lft2rgt occs c ~new_goals:[] gl else (* Original code. In particular, [splay_prod] performs delta-reduction. *) let env = pf_env gl in @@ -97,80 +109,128 @@ let general_rewrite_bindings_clause cls lft2rgt (c,l) gl = match match_with_equation t with | None -> if l = NoBindings - then general_s_rewrite_clause cls lft2rgt c [] gl + then !general_setoid_rewrite_clause cls lft2rgt occs c ~new_goals:[] gl else error "The term provided does not end with an equation" | Some (hdcncl,_) -> - let hdcncls = string_of_inductive hdcncl in - let suffix = elimination_suffix (elimination_sort_of_clause cls gl) in - let dir = if cls=None then lft2rgt else not lft2rgt in - let rwr_thm = if dir then hdcncls^suffix^"_r" else hdcncls^suffix in - let elim = - try pf_global gl (id_of_string rwr_thm) - with Not_found -> - error ("Cannot find rewrite principle "^rwr_thm) - in - general_elim_clause cls (c,l) (elim,NoBindings) gl - -let general_rewrite_bindings = general_rewrite_bindings_clause None -let general_rewrite l2r c = general_rewrite_bindings l2r (c,NoBindings) - -let general_rewrite_bindings_in l2r id = - general_rewrite_bindings_clause (Some id) l2r -let general_rewrite_in l2r id c = - general_rewrite_bindings_clause (Some id) l2r (c,NoBindings) - -let general_multi_rewrite l2r c cl = - if cl.concl_occs <> [] then - error "The \"at\" syntax isn't available yet for the rewrite/replace tactic" - else match cl.onhyps with + if occs <> all_occurrences then ( + !general_setoid_rewrite_clause cls lft2rgt occs c ~new_goals:[] gl) + else + let hdcncls = string_of_inductive hdcncl in + let suffix = elimination_suffix (elimination_sort_of_clause cls gl) in + let dir = if cls=None then lft2rgt else not lft2rgt in + let rwr_thm = if dir then hdcncls^suffix^"_r" else hdcncls^suffix in + let elim = + try pf_global gl (id_of_string rwr_thm) + with Not_found -> + error ("Cannot find rewrite principle "^rwr_thm) + in + try general_elim_clause with_evars cls (c,l) (elim,NoBindings) gl + with e -> + let eq = build_coq_eq () in + if not (eq_constr eq head) then + try !general_setoid_rewrite_clause cls lft2rgt occs c ~new_goals:[] gl + with _ -> raise e + else raise e + +let general_rewrite_ebindings = + general_rewrite_ebindings_clause None +let general_rewrite_bindings l2r occs (c,bl) = + general_rewrite_ebindings_clause None l2r occs (c,inj_ebindings bl) + +let general_rewrite l2r occs c = + general_rewrite_bindings l2r occs (c,NoBindings) false + +let general_rewrite_ebindings_in l2r occs id = + general_rewrite_ebindings_clause (Some id) l2r occs +let general_rewrite_bindings_in l2r occs id (c,bl) = + general_rewrite_ebindings_clause (Some id) l2r occs (c,inj_ebindings bl) +let general_rewrite_in l2r occs id c = + general_rewrite_ebindings_clause (Some id) l2r occs (c,NoBindings) + +let general_multi_rewrite l2r with_evars c cl = + let occs_of = on_snd (List.fold_left + (fun acc -> + function ArgArg x -> x :: acc | ArgVar _ -> acc) + []) + in + match cl.onhyps with | Some l -> (* If a precise list of locations is given, success is mandatory for each of these locations. *) let rec do_hyps = function | [] -> tclIDTAC - | ((_,id),_) :: l -> - tclTHENFIRST (general_rewrite_bindings_in l2r id c) (do_hyps l) + | ((occs,id),_) :: l -> + tclTHENFIRST + (general_rewrite_ebindings_in l2r (occs_of occs) id c with_evars) + (do_hyps l) in - if not cl.onconcl then do_hyps l - else tclTHENFIRST (general_rewrite_bindings l2r c) (do_hyps l) + if cl.concl_occs = no_occurrences_expr then do_hyps l else + tclTHENFIRST + (general_rewrite_ebindings l2r (occs_of cl.concl_occs) c with_evars) + (do_hyps l) | None -> (* Otherwise, if we are told to rewrite in all hypothesis via the syntax "* |-", we fail iff all the different rewrites fail *) let rec do_hyps_atleastonce = function | [] -> (fun gl -> error "Nothing to rewrite.") | id :: l -> - tclIFTHENTRYELSEMUST - (general_rewrite_bindings_in l2r id c) - (do_hyps_atleastonce l) + tclIFTHENTRYELSEMUST + (general_rewrite_ebindings_in l2r all_occurrences id c with_evars) + (do_hyps_atleastonce l) in let do_hyps gl = - (* If the term to rewrite is an hypothesis, don't rewrite in itself *) - let ids = match kind_of_term (fst c) with - | Var id -> list_remove id (pf_ids_of_hyps gl) - | _ -> pf_ids_of_hyps gl + (* If the term to rewrite uses an hypothesis H, don't rewrite in H *) + let ids = + let ids_in_c = Environ.global_vars_set (Global.env()) (fst c) in + Idset.fold (fun id l -> list_remove id l) ids_in_c (pf_ids_of_hyps gl) in do_hyps_atleastonce ids gl in - if not cl.onconcl then do_hyps - else tclIFTHENTRYELSEMUST (general_rewrite_bindings l2r c) do_hyps + if cl.concl_occs = no_occurrences_expr then do_hyps else + tclIFTHENTRYELSEMUST + (general_rewrite_ebindings l2r (occs_of cl.concl_occs) c with_evars) + do_hyps + +let general_multi_multi_rewrite with_evars l cl tac = + let do1 l2r c = + match tac with + None -> general_multi_rewrite l2r with_evars c cl + | Some tac -> tclTHENSFIRSTn (general_multi_rewrite l2r with_evars c cl) + [|tclIDTAC|] (tclCOMPLETE tac) + in + let rec doN l2r c = function + | Precisely n when n <= 0 -> tclIDTAC + | Precisely 1 -> do1 l2r c + | Precisely n -> tclTHENFIRST (do1 l2r c) (doN l2r c (Precisely (n-1))) + | RepeatStar -> tclREPEAT_MAIN (do1 l2r c) + | RepeatPlus -> tclTHENFIRST (do1 l2r c) (doN l2r c RepeatStar) + | UpTo n when n<=0 -> tclIDTAC + | UpTo n -> tclTHENFIRST (tclTRY (do1 l2r c)) (doN l2r c (UpTo (n-1))) + in + let rec loop = function + | [] -> tclIDTAC + | (l2r,m,c)::l -> tclTHENFIRST (doN l2r c m) (loop l) + in loop l (* Conditional rewriting, the success of a rewriting is related to the resolution of the conditions by a given tactic *) let conditional_rewrite lft2rgt tac (c,bl) = - tclTHENSFIRSTn (general_rewrite_bindings lft2rgt (c,bl)) + tclTHENSFIRSTn + (general_rewrite_ebindings lft2rgt all_occurrences (c,bl) false) [|tclIDTAC|] (tclCOMPLETE tac) -let rewriteLR_bindings = general_rewrite_bindings true -let rewriteRL_bindings = general_rewrite_bindings false +let rewriteLR_bindings = general_rewrite_bindings true all_occurrences +let rewriteRL_bindings = general_rewrite_bindings false all_occurrences -let rewriteLR = general_rewrite true -let rewriteRL = general_rewrite false +let rewriteLR = general_rewrite true all_occurrences +let rewriteRL = general_rewrite false all_occurrences -let rewriteLRin_bindings = general_rewrite_bindings_in true -let rewriteRLin_bindings = general_rewrite_bindings_in false +let rewriteLRin_bindings = general_rewrite_bindings_in true all_occurrences +let rewriteRLin_bindings = general_rewrite_bindings_in false all_occurrences let conditional_rewrite_in lft2rgt id tac (c,bl) = - tclTHENSFIRSTn (general_rewrite_bindings_in lft2rgt id (c,bl)) + tclTHENSFIRSTn + (general_rewrite_ebindings_in lft2rgt all_occurrences id (c,bl) false) [|tclIDTAC|] (tclCOMPLETE tac) let rewriteRL_clause = function @@ -189,7 +249,7 @@ let multi_replace clause c2 c1 unsafe try_prove_eq_opt gl = let try_prove_eq = match try_prove_eq_opt with | None -> tclIDTAC - | Some tac -> tclTRY (tclCOMPLETE tac) + | Some tac -> tclCOMPLETE tac in let t1 = pf_apply get_type_of gl c1 and t2 = pf_apply get_type_of gl c2 in @@ -200,7 +260,7 @@ let multi_replace clause c2 c1 unsafe try_prove_eq_opt gl = tclTHENS (assert_tac false Anonymous eq) [onLastHyp (fun id -> tclTHEN - (tclTRY (general_multi_rewrite false (mkVar id,NoBindings) clause)) + (tclTRY (general_multi_rewrite false false (mkVar id,NoBindings) clause)) (clear [id])); tclFIRST [assumption; @@ -319,7 +379,6 @@ let injectable env sigma t1 t2 = | Inr _ -> true - (* Once we have found a position, we need to project down to it. If we are discriminating, then we need to produce False on one of the branches of the discriminator, and True on the other one. So the @@ -404,7 +463,7 @@ let descend_then sigma env head dirn = let brl = List.map build_branch (interval 1 (Array.length mip.mind_consnames)) in - let ci = make_default_case_info env RegularStyle ind in + let ci = make_case_info env ind RegularStyle in mkCase (ci, p, head, Array.of_list brl))) (* Now we need to construct the discriminator, given a discriminable @@ -447,7 +506,7 @@ let construct_discriminator sigma env dirn c sort = it_mkLambda_or_LetIn endpt cstrs.(i-1).cs_args in let brl = List.map build_branch(interval 1 (Array.length mip.mind_consnames)) in - let ci = make_default_case_info env RegularStyle ind in + let ci = make_case_info env ind RegularStyle in mkCase (ci, p, c, Array.of_list brl) let rec build_discriminator sigma env dirn c sort = function @@ -494,66 +553,83 @@ exception NotDiscriminable let eq_baseid = id_of_string "e" -let discr_positions env sigma (lbeq,(t,t1,t2)) id cpath dirn sort = +let apply_on_clause (f,t) clause = + let sigma = Evd.evars_of clause.evd in + let f_clause = mk_clenv_from_env clause.env sigma None (f,t) in + let argmv = + (match kind_of_term (last_arg f_clause.templval.Evd.rebus) with + | Meta mv -> mv + | _ -> errorlabstrm "" (str "Ill-formed clause applicator")) in + clenv_fchain argmv f_clause clause + +let discr_positions env sigma (lbeq,(t,t1,t2)) eq_clause cpath dirn sort = let e = next_ident_away eq_baseid (ids_of_context env) in let e_env = push_named (e,None,t) env in + let eqn = mkApp(lbeq.eq,[|t;t1;t2|]) in let discriminator = build_discriminator sigma e_env dirn (mkVar e) sort cpath in let (pf, absurd_term) = discrimination_pf e (t,t1,t2) discriminator lbeq in - tclCOMPLETE - ((tclTHENS (cut_intro absurd_term) - [onLastHyp gen_absurdity; - refine (mkApp (pf,[|mkVar id|]))])) - -let discrEq (lbeq,(t,t1,t2) as u) id gls = - let sigma = project gls in + let pf_ty = mkArrow eqn absurd_term in + let absurd_clause = apply_on_clause (pf,pf_ty) eq_clause in + let pf = clenv_value_cast_meta absurd_clause in + tclTHENS (cut_intro absurd_term) + [onLastHyp gen_absurdity; refine pf] + +let discrEq (lbeq,(t,t1,t2) as u) eq_clause gls = + let sigma = Evd.evars_of eq_clause.evd in let env = pf_env gls in match find_positions env sigma t1 t2 with | Inr _ -> - errorlabstrm "discr" (str" Not a discriminable equality") + errorlabstrm "discr" (str"Not a discriminable equality") | Inl (cpath, (_,dirn), _) -> let sort = pf_apply get_type_of gls (pf_concl gls) in - discr_positions env sigma u id cpath dirn sort gls - -let onEquality tac id gls = - let eqn = pf_whd_betadeltaiota gls (pf_get_hyp_typ gls id) in + discr_positions env sigma u eq_clause cpath dirn sort gls + +let onEquality with_evars tac (c,lbindc) gls = + let t = pf_type_of gls c in + let t' = try snd (pf_reduce_to_quantified_ind gls t) with UserError _ -> t in + let eq_clause = make_clenv_binding gls (c,t') lbindc in + let eq_clause' = clenv_pose_dependent_evars with_evars eq_clause in + let eqn = clenv_type eq_clause' in let eq = try find_eq_data_decompose eqn with PatternMatchingFailure -> - errorlabstrm "" (pr_id id ++ str": not a primitive equality") - in tac eq id gls + errorlabstrm "" (str"No primitive equality found") in + tclTHEN + (Refiner.tclEVARS (Evd.evars_of eq_clause'.evd)) + (tac eq eq_clause') gls -let onNegatedEquality tac gls = +let onNegatedEquality with_evars tac gls = let ccl = pf_concl gls in - let eq = - try match kind_of_term (hnf_constr (pf_env gls) (project gls) ccl) with - | Prod (_,t,u) when is_empty_type u -> - find_eq_data_decompose (pf_whd_betadeltaiota gls t) - | _ -> raise PatternMatchingFailure - with PatternMatchingFailure -> + match kind_of_term (hnf_constr (pf_env gls) (project gls) ccl) with + | Prod (_,t,u) when is_empty_type u -> + tclTHEN introf + (onLastHyp (fun id -> + onEquality with_evars tac (mkVar id,NoBindings))) gls + | _ -> errorlabstrm "" (str "Not a negated primitive equality") - in tclTHEN introf (onLastHyp (tac eq)) gls -let discrSimpleClause = function - | None -> onNegatedEquality discrEq - | Some ((_,id),_) -> onEquality discrEq id +let discrSimpleClause with_evars = function + | None -> onNegatedEquality with_evars discrEq + | Some ((_,id),_) -> onEquality with_evars discrEq (mkVar id,NoBindings) -let discr = onEquality discrEq +let discr with_evars = onEquality with_evars discrEq -let discrClause = onClauses discrSimpleClause +let discrClause with_evars = onClauses (discrSimpleClause with_evars) -let discrEverywhere = +let discrEverywhere with_evars = tclORELSE - (Tacticals.tryAllClauses discrSimpleClause) + (Tacticals.tryAllClauses + (fun cl -> tclCOMPLETE (discrSimpleClause with_evars cl))) (fun gls -> errorlabstrm "DiscrEverywhere" (str"No discriminable equalities")) -let discr_tac = function - | None -> discrEverywhere - | Some id -> try_intros_until discr id +let discr_tac with_evars = function + | None -> discrEverywhere with_evars + | Some c -> onInductionArg (discr with_evars) c -let discrConcl gls = discrClause onConcl gls -let discrHyp id gls = discrClause (onHyp id) gls +let discrConcl gls = discrClause false onConcl gls +let discrHyp id gls = discrClause false (onHyp id) gls (* returns the sigma type (sigS, sigT) with the respective constructor depending on the sort *) @@ -585,18 +661,20 @@ let make_tuple env sigma (rterm,rty) lind = applist(sig_term,[a;p])) (* check that the free-references of the type of [c] are contained in - the free-references of the normal-form of that type. If the normal - form of the type contains fewer references, we want to return that - instead. *) + the free-references of the normal-form of that type. Strictly + computing the exact set of free rels would require full + normalization but this is not reasonable (e.g. in presence of + records that contains proofs). We restrict ourself to a "simpl" + normalization *) let minimal_free_rels env sigma (c,cty) = let cty_rels = free_rels cty in - let nf_cty = nf_betadeltaiota env sigma cty in - let nf_rels = free_rels nf_cty in - if Intset.subset cty_rels nf_rels then + let cty' = simpl env sigma cty in + let rels' = free_rels cty' in + if Intset.subset cty_rels rels' then (cty,cty_rels) else - (nf_cty,nf_rels) + (cty',rels') (* [sig_clausal_form siglen ty] @@ -636,13 +714,13 @@ let minimal_free_rels env sigma (c,cty) = let sig_clausal_form env sigma sort_of_ty siglen ty dflt = let { intro = exist_term } = find_sigma_data sort_of_ty in - let isevars = ref (Evd.create_evar_defs sigma) in + let evdref = ref (Evd.create_goal_evar_defs sigma) in let rec sigrec_clausal_form siglen p_i = if siglen = 0 then (* is the default value typable with the expected type *) let dflt_typ = type_of env sigma dflt in - if Evarconv.e_cumul env isevars dflt_typ p_i then - (* the_conv_x had a side-effect on isevars *) + if Evarconv.e_cumul env evdref dflt_typ p_i then + (* the_conv_x had a side-effect on evdref *) dflt else error "Cannot solve an unification problem" @@ -650,18 +728,18 @@ let sig_clausal_form env sigma sort_of_ty siglen ty dflt = let (a,p_i_minus_1) = match whd_beta_stack p_i with | (_sigS,[a;p]) -> (a,p) | _ -> anomaly "sig_clausal_form: should be a sigma type" in - let ev = Evarutil.e_new_evar isevars env a in + let ev = Evarutil.e_new_evar evdref env a in let rty = beta_applist(p_i_minus_1,[ev]) in let tuple_tail = sigrec_clausal_form (siglen-1) rty in match - Evd.existential_opt_value (Evd.evars_of !isevars) + Evd.existential_opt_value (Evd.evars_of !evdref) (destEvar ev) with | Some w -> applist(exist_term,[a;p_i_minus_1;w;tuple_tail]) | None -> anomaly "Not enough components to build the dependent tuple" in let scf = sigrec_clausal_form siglen ty in - Evarutil.nf_evar (Evd.evars_of !isevars) scf + Evarutil.nf_evar (Evd.evars_of !evdref) scf (* The problem is to build a destructor (a generalization of the predecessor) which, when applied to a term made of constructors @@ -770,7 +848,7 @@ let simplify_args env sigma t = | eq, [t1;c1;t2;c2] -> applist (eq,[t1;nf env sigma c1;t2;nf env sigma c2]) | _ -> t -let inject_at_positions env sigma (eq,(t,t1,t2)) id posns = +let inject_at_positions env sigma (eq,(t,t1,t2)) eq_clause posns = let e = next_ident_away eq_baseid (ids_of_context env) in let e_env = push_named (e,None,t) env in let injectors = @@ -779,8 +857,11 @@ let inject_at_positions env sigma (eq,(t,t1,t2)) id posns = (* arbitrarily take t1' as the injector default value *) let (injbody,resty) = build_injector sigma e_env t1' (mkVar e) cpath in let injfun = mkNamedLambda e t injbody in - let pf = applist(eq.congr,[t;resty;injfun;t1;t2;mkVar id]) in - let ty = simplify_args env sigma (get_type_of env sigma pf) in + let pf = applist(eq.congr,[t;resty;injfun;t1;t2]) in + let pf_typ = get_type_of env sigma pf in + let inj_clause = apply_on_clause (pf,pf_typ) eq_clause in + let pf = clenv_value_cast_meta inj_clause in + let ty = simplify_args env sigma (clenv_type inj_clause) in (pf,ty)) posns in if injectors = [] then @@ -789,14 +870,16 @@ let inject_at_positions env sigma (eq,(t,t1,t2)) id posns = (fun (pf,ty) -> tclTHENS (cut ty) [tclIDTAC; refine pf]) injectors -let injEq ipats (eq,(t,t1,t2)) id gls = - let sigma = project gls in - let env = pf_env gls in +exception Not_dep_pair + + +let injEq ipats (eq,(t,t1,t2)) eq_clause = + let sigma = Evd.evars_of eq_clause.evd in + let env = eq_clause.env in match find_positions env sigma t1 t2 with | Inl _ -> errorlabstrm "Inj" - (str (string_of_id id) ++ - str" is not a projectable equality but a discriminable one") + (str"Not a projectable equality but a discriminable one") | Inr [] -> errorlabstrm "Equality.inj" (str"Nothing to do, it is an equality between convertible terms") @@ -805,40 +888,73 @@ let injEq ipats (eq,(t,t1,t2)) id gls = let t1 = try_delta_expand env sigma t1 in let t2 = try_delta_expand env sigma t2 in *) - tclTHEN - (inject_at_positions env sigma (eq,(t,t1,t2)) id posns) + try ( +(* fetch the informations of the pair *) + let ceq = constr_of_global Coqlib.glob_eq in + let sigTconstr () = (Coqlib.build_sigma_type()).Coqlib.typ in + let eqTypeDest = fst (destApp t) in + let _,ar1 = destApp t1 and + _,ar2 = destApp t2 in + let ind = destInd ar1.(0) in + let inj2 = Coqlib.coq_constant "inj_pair2_eq_dec is missing" + ["Logic";"Eqdep_dec"] "inj_pair2_eq_dec" in +(* check whether the equality deals with dep pairs or not *) +(* if yes, check if the user has declared the dec principle *) +(* and compare the fst arguments of the dep pair *) + let new_eq_args = [|type_of env sigma (ar1.(3));ar1.(3);ar2.(3)|] in + if ( (eqTypeDest = sigTconstr()) && + (Ind_tables.check_dec_proof ind=true) && + (is_conv env sigma (ar1.(2)) (ar2.(2)) = true)) + then ( +(* Require Import Eqdec_dec copied from vernac_require in vernacentries.ml*) + let qidl = qualid_of_reference + (Ident (dummy_loc,id_of_string "Eqdep_dec")) in + Library.require_library [qidl] (Some false); +(* cut with the good equality and prove the requested goal *) + tclTHENS (cut (mkApp (ceq,new_eq_args)) ) + [tclIDTAC; tclTHEN (apply ( + mkApp(inj2, + [|ar1.(0);Ind_tables.find_eq_dec_proof ind; + ar1.(1);ar1.(2);ar1.(3);ar2.(3)|]) + )) (Auto.trivial [] []) + ] +(* not a dep eq or no decidable type found *) + ) else (raise Not_dep_pair) + ) with _ -> + tclTHEN + (inject_at_positions env sigma (eq,(t,t1,t2)) eq_clause posns) (intros_pattern None ipats) - gls -let inj ipats = onEquality (injEq ipats) +let inj ipats with_evars = onEquality with_evars (injEq ipats) -let injClause ipats = function - | None -> onNegatedEquality (injEq ipats) - | Some id -> try_intros_until (inj ipats) id +let injClause ipats with_evars = function + | None -> onNegatedEquality with_evars (injEq ipats) + | Some c -> onInductionArg (inj ipats with_evars) c -let injConcl gls = injClause [] None gls -let injHyp id gls = injClause [] (Some id) gls +let injConcl gls = injClause [] false None gls +let injHyp id gls = injClause [] false (Some (ElimOnIdent (dummy_loc,id))) gls -let decompEqThen ntac (lbeq,(t,t1,t2) as u) id gls = +let decompEqThen ntac (lbeq,(t,t1,t2) as u) clause gls = let sort = pf_apply get_type_of gls (pf_concl gls) in - let sigma = project gls in + let sigma = Evd.evars_of clause.evd in let env = pf_env gls in match find_positions env sigma t1 t2 with | Inl (cpath, (_,dirn), _) -> - discr_positions env sigma u id cpath dirn sort gls + discr_positions env sigma u clause cpath dirn sort gls | Inr [] -> (* Change: do not fail, simplify clear this trivial hyp *) ntac 0 gls | Inr posns -> tclTHEN - (inject_at_positions env sigma (lbeq,(t,t1,t2)) id (List.rev posns)) + (inject_at_positions env sigma (lbeq,(t,t1,t2)) clause + (List.rev posns)) (ntac (List.length posns)) gls -let dEqThen ntac = function - | None -> onNegatedEquality (decompEqThen ntac) - | Some id -> try_intros_until (onEquality (decompEqThen ntac)) id +let dEqThen with_evars ntac = function + | None -> onNegatedEquality with_evars (decompEqThen ntac) + | Some c -> onInductionArg (onEquality with_evars (decompEqThen ntac)) c -let dEq = dEqThen (fun x -> tclIDTAC) +let dEq with_evars = dEqThen with_evars (fun x -> tclIDTAC) let rewrite_msg = function | None -> str "passed term is not a primitive equality" @@ -1031,7 +1147,8 @@ let unfold_body x gl = | _ -> errorlabstrm "unfold_body" (pr_id x ++ str" is not a defined hypothesis") in let aft = afterHyp x gl in - let hl = List.fold_right (fun (y,yval,_) cl -> (([],y),InHyp) :: cl) aft [] in + let hl = List.fold_right + (fun (y,yval,_) cl -> ((all_occurrences_expr,y),InHyp) :: cl) aft [] in let xvar = mkVar x in let rfun _ _ c = replace_term xvar xval c in tclTHENLIST @@ -1088,7 +1205,7 @@ let subst_one x gl = let introtac = function (id,None,_) -> intro_using id | (id,Some hval,htyp) -> - letin_tac true (Name id) + letin_tac None (Name id) (mkCast(replace_term varx rhs hval,DEFAULTcast, replace_term varx rhs htyp)) nowhere in @@ -1144,14 +1261,14 @@ let cond_eq_term c t gl = else failwith "not convertible" with PatternMatchingFailure -> failwith "not an equality" -let rewrite_mutli_assumption_cond cond_eq_term cl gl = +let rewrite_multi_assumption_cond cond_eq_term cl gl = let rec arec = function | [] -> error "No such assumption" | (id,_,t) ::rest -> begin try let dir = cond_eq_term t gl in - general_multi_rewrite dir (mkVar id,NoBindings) cl gl + general_multi_rewrite dir false (mkVar id,NoBindings) cl gl with | Failure _ | UserError _ -> arec rest end in @@ -1164,7 +1281,7 @@ let replace_multi_term dir_opt c = | Some true -> cond_eq_term_left c | Some false -> cond_eq_term_right c in - rewrite_mutli_assumption_cond cond_eq_fun + rewrite_multi_assumption_cond cond_eq_fun (* JF. old version let rewrite_assumption_cond faildir gl = @@ -1221,3 +1338,4 @@ let replace_term_in t hyp = replace_multi_term None t (Tacticals.onHyp hyp) let _ = Setoid_replace.register_replace (fun tac_opt c2 c1 gl -> replace_in_clause_maybe_by c2 c1 onConcl tac_opt gl) let _ = Setoid_replace.register_general_rewrite general_rewrite +let _ = Tactics.register_general_multi_rewrite general_multi_rewrite diff --git a/tactics/equality.mli b/tactics/equality.mli index 93cf53bd..42c502be 100644 --- a/tactics/equality.mli +++ b/tactics/equality.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: equality.mli 9835 2007-05-17 22:23:03Z jforest $ i*) +(*i $Id: equality.mli 11166 2008-06-22 13:23:35Z herbelin $ i*) (*i*) open Names @@ -21,12 +21,15 @@ open Pattern open Tacticals open Tactics open Tacexpr +open Termops open Rawterm open Genarg (*i*) -val general_rewrite_bindings : bool -> constr with_bindings -> tactic -val general_rewrite : bool -> constr -> tactic +val general_rewrite_bindings : + bool -> occurrences -> constr with_bindings -> evars_flag -> tactic +val general_rewrite : + bool -> occurrences -> constr -> tactic (* Obsolete, use [general_rewrite_bindings l2r] [val rewriteLR_bindings : constr with_bindings -> tactic] @@ -39,17 +42,24 @@ val rewriteRL : constr -> tactic (* Warning: old [general_rewrite_in] is now [general_rewrite_bindings_in] *) +val register_general_setoid_rewrite_clause : + (identifier option -> bool -> + occurrences -> constr -> new_goals:constr list -> tactic) -> unit + val general_rewrite_bindings_in : - bool -> identifier -> constr with_bindings -> tactic + bool -> occurrences -> identifier -> constr with_bindings -> evars_flag -> tactic val general_rewrite_in : - bool -> identifier -> constr -> tactic + bool -> occurrences -> identifier -> constr -> evars_flag -> tactic val general_multi_rewrite : - bool -> constr with_bindings -> clause -> tactic + bool -> evars_flag -> constr with_ebindings -> clause -> tactic +val general_multi_multi_rewrite : + evars_flag -> (bool * multi * constr with_ebindings) list -> clause -> + tactic option -> tactic -val conditional_rewrite : bool -> tactic -> constr with_bindings -> tactic +val conditional_rewrite : bool -> tactic -> constr with_ebindings -> tactic val conditional_rewrite_in : - bool -> identifier -> tactic -> constr with_bindings -> tactic + bool -> identifier -> tactic -> constr with_ebindings -> tactic val replace_in_clause_maybe_by : constr -> constr -> clause -> tactic option -> tactic val replace : constr -> constr -> tactic @@ -57,18 +67,22 @@ val replace_in : identifier -> constr -> constr -> tactic val replace_by : constr -> constr -> tactic -> tactic val replace_in_by : identifier -> constr -> constr -> tactic -> tactic -val discr : identifier -> tactic +val discr : evars_flag -> constr with_ebindings -> tactic val discrConcl : tactic -val discrClause : clause -> tactic +val discrClause : evars_flag -> clause -> tactic val discrHyp : identifier -> tactic -val discrEverywhere : tactic -val discr_tac : quantified_hypothesis option -> tactic -val inj : intro_pattern_expr list -> identifier -> tactic -val injClause : intro_pattern_expr list -> quantified_hypothesis option -> - tactic - -val dEq : quantified_hypothesis option -> tactic -val dEqThen : (int -> tactic) -> quantified_hypothesis option -> tactic +val discrEverywhere : evars_flag -> tactic +val discr_tac : evars_flag -> + constr with_ebindings induction_arg option -> tactic +val inj : intro_pattern_expr list -> evars_flag -> + constr with_ebindings -> tactic +val injClause : intro_pattern_expr list -> evars_flag -> + constr with_ebindings induction_arg option -> tactic +val injHyp : identifier -> tactic +val injConcl : tactic + +val dEq : evars_flag -> constr with_ebindings induction_arg option -> tactic +val dEqThen : evars_flag -> (int -> tactic) -> constr with_ebindings induction_arg option -> tactic val make_iterated_tuple : env -> evar_map -> constr -> (constr * types) -> constr * constr * constr diff --git a/tactics/evar_tactics.ml b/tactics/evar_tactics.ml index ed40af1c..b4a39a24 100644 --- a/tactics/evar_tactics.ml +++ b/tactics/evar_tactics.ml @@ -6,13 +6,14 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: evar_tactics.ml 9154 2006-09-20 17:18:18Z corbinea $ *) +(* $Id: evar_tactics.ml 11072 2008-06-08 16:13:37Z herbelin $ *) open Term open Util open Evar_refiner open Tacmach open Tacexpr +open Refiner open Proof_type open Evd open Sign @@ -38,21 +39,24 @@ let instantiate n rawc ido gl = match hloc with InHyp -> (match decl with - (_,None,typ) -> evar_list sigma typ - | _ -> error - "please be more specific : in type or value ?") + (_,None,typ) -> evar_list sigma typ + | _ -> error + "please be more specific : in type or value ?") | InHypTypeOnly -> let (_, _, typ) = decl in evar_list sigma typ | InHypValueOnly -> (match decl with - (_,Some body,_) -> evar_list sigma body - | _ -> error "not a let .. in hypothesis") in + (_,Some body,_) -> evar_list sigma body + | _ -> error "not a let .. in hypothesis") in if List.length evl < n then error "not enough uninstantiated existential variables"; if n <= 0 then error "incorrect existential variable index"; let ev,_ = destEvar (List.nth evl (n-1)) in - let evd' = w_refine ev rawc (create_evar_defs sigma) in - Refiner.tclEVARS (evars_of evd') gl + let evd' = w_refine ev rawc (create_goal_evar_defs sigma) in + tclTHEN + (tclEVARS (evars_of evd')) + tclNORMEVAR + gl (* let pfic gls c = @@ -68,8 +72,8 @@ let instantiate_tac = function *) let let_evar name typ gls = - let evd = Evd.create_evar_defs gls.sigma in + let evd = Evd.create_goal_evar_defs gls.sigma in let evd',evar = Evarutil.new_evar evd (pf_env gls) typ in Refiner.tclTHEN (Refiner.tclEVARS (evars_of evd')) - (Tactics.letin_tac true name evar nowhere) gls + (Tactics.letin_tac None name evar nowhere) gls diff --git a/tactics/extraargs.ml4 b/tactics/extraargs.ml4 index 3c7d76b2..a0230b28 100644 --- a/tactics/extraargs.ml4 +++ b/tactics/extraargs.ml4 @@ -8,7 +8,7 @@ (*i camlp4deps: "parsing/grammar.cma" i*) -(* $Id: extraargs.ml4 9076 2006-08-23 15:05:54Z jforest $ *) +(* $Id: extraargs.ml4 11094 2008-06-10 19:35:23Z herbelin $ *) open Pp open Pcoq @@ -33,6 +33,70 @@ ARGUMENT EXTEND orient TYPED AS bool PRINTED BY pr_orient | [ ] -> [ true ] END +let pr_int_list _prc _prlc _prt l = + let rec aux = function + | i :: l -> Pp.int i ++ Pp.spc () ++ aux l + | [] -> Pp.mt() + in aux l + +ARGUMENT EXTEND int_nelist + TYPED AS int list + PRINTED BY pr_int_list + RAW_TYPED AS int list + RAW_PRINTED BY pr_int_list + GLOB_TYPED AS int list + GLOB_PRINTED BY pr_int_list +| [ integer(x) int_nelist(l) ] -> [x::l] +| [ integer(x) ] -> [ [x] ] +END + +open Rawterm + +let pr_occurrences _prc _prlc _prt l = + match l with + | ArgArg x -> pr_int_list _prc _prlc _prt x + | ArgVar (loc, id) -> Nameops.pr_id id + +let coerce_to_int = function + | VInteger n -> n + | v -> raise (CannotCoerceTo "an integer") + +let int_list_of_VList = function + | VList l -> List.map (fun n -> coerce_to_int n) l + | _ -> raise Not_found + +let interp_occs ist gl l = + match l with + | ArgArg x -> x + | ArgVar (_,id as locid) -> + (try int_list_of_VList (List.assoc id ist.lfun) + with Not_found | CannotCoerceTo _ -> [interp_int ist locid]) + +let glob_occs ist l = l + +let subst_occs evm l = l + +type occurrences_or_var = int list or_var +type occurrences = int list + +ARGUMENT EXTEND occurrences + TYPED AS occurrences + PRINTED BY pr_int_list + + INTERPRETED BY interp_occs + GLOBALIZED BY glob_occs + SUBSTITUTED BY subst_occs + + RAW_TYPED AS occurrences_or_var + RAW_PRINTED BY pr_occurrences + + GLOB_TYPED AS occurrences_or_var + GLOB_PRINTED BY pr_occurrences + +| [ int_nelist(l) ] -> [ ArgArg l ] +| [ var(id) ] -> [ ArgVar id ] +END + (* For Setoid rewrite *) let pr_morphism_signature _ _ _ s = spc () ++ Setoid_replace.pr_morphism_signature s @@ -221,18 +285,126 @@ END let gen_in_arg_hyp_to_clause trad_id (hyps ,concl) : Tacticals.clause = {Tacexpr.onhyps= - Util.option_map + Option.map (fun l -> List.map - (fun id -> ( ([],trad_id id) ,Tacexpr.InHyp)) + (fun id -> ( (all_occurrences_expr,trad_id id) ,Tacexpr.InHyp)) l ) hyps; - Tacexpr.onconcl=concl; - Tacexpr.concl_occs = []} + Tacexpr.concl_occs = if concl then all_occurrences_expr else no_occurrences_expr} let raw_in_arg_hyp_to_clause = gen_in_arg_hyp_to_clause snd let glob_in_arg_hyp_to_clause = gen_in_arg_hyp_to_clause (fun x -> x) +(* spiwack argument for the commands of the retroknowledge *) + +let (wit_r_nat_field, globwit_r_nat_field, rawwit_r_nat_field) = + Genarg.create_arg "r_nat_field" +let (wit_r_n_field, globwit_r_n_field, rawwit_r_n_field) = + Genarg.create_arg "r_n_field" +let (wit_r_int31_field, globwit_r_int31_field, rawwit_r_int31_field) = + Genarg.create_arg "r_int31_field" +let (wit_r_field, globwit_r_field, rawwit_r_field) = + Genarg.create_arg "r_field" + +(* spiwack: the print functions are incomplete, but I don't know what they are + used for *) +let pr_r_nat_field _ _ _ natf = + str "nat " ++ + match natf with + | Retroknowledge.NatType -> str "type" + | Retroknowledge.NatPlus -> str "plus" + | Retroknowledge.NatTimes -> str "times" + +let pr_r_n_field _ _ _ nf = + str "binary N " ++ + match nf with + | Retroknowledge.NPositive -> str "positive" + | Retroknowledge.NType -> str "type" + | Retroknowledge.NTwice -> str "twice" + | Retroknowledge.NTwicePlusOne -> str "twice plus one" + | Retroknowledge.NPhi -> str "phi" + | Retroknowledge.NPhiInv -> str "phi inv" + | Retroknowledge.NPlus -> str "plus" + | Retroknowledge.NTimes -> str "times" + +let pr_r_int31_field _ _ _ i31f = + str "int31 " ++ + match i31f with + | Retroknowledge.Int31Bits -> str "bits" + | Retroknowledge.Int31Type -> str "type" + | Retroknowledge.Int31Twice -> str "twice" + | Retroknowledge.Int31TwicePlusOne -> str "twice plus one" + | Retroknowledge.Int31Phi -> str "phi" + | Retroknowledge.Int31PhiInv -> str "phi inv" + | Retroknowledge.Int31Plus -> str "plus" + | Retroknowledge.Int31Times -> str "times" + | _ -> assert false + +let pr_retroknowledge_field _ _ _ f = + match f with + (* | Retroknowledge.KEq -> str "equality" + | Retroknowledge.KNat natf -> pr_r_nat_field () () () natf + | Retroknowledge.KN nf -> pr_r_n_field () () () nf *) + | Retroknowledge.KInt31 (group, i31f) -> (pr_r_int31_field () () () i31f) ++ + str "in " ++ str group + +ARGUMENT EXTEND retroknowledge_nat +TYPED AS r_nat_field +PRINTED BY pr_r_nat_field +| [ "nat" "type" ] -> [ Retroknowledge.NatType ] +| [ "nat" "plus" ] -> [ Retroknowledge.NatPlus ] +| [ "nat" "times" ] -> [ Retroknowledge.NatTimes ] +END + + +ARGUMENT EXTEND retroknowledge_binary_n +TYPED AS r_n_field +PRINTED BY pr_r_n_field +| [ "binary" "N" "positive" ] -> [ Retroknowledge.NPositive ] +| [ "binary" "N" "type" ] -> [ Retroknowledge.NType ] +| [ "binary" "N" "twice" ] -> [ Retroknowledge.NTwice ] +| [ "binary" "N" "twice" "plus" "one" ] -> [ Retroknowledge.NTwicePlusOne ] +| [ "binary" "N" "phi" ] -> [ Retroknowledge.NPhi ] +| [ "binary" "N" "phi" "inv" ] -> [ Retroknowledge.NPhiInv ] +| [ "binary" "N" "plus" ] -> [ Retroknowledge.NPlus ] +| [ "binary" "N" "times" ] -> [ Retroknowledge.NTimes ] +END + +ARGUMENT EXTEND retroknowledge_int31 +TYPED AS r_int31_field +PRINTED BY pr_r_int31_field +| [ "int31" "bits" ] -> [ Retroknowledge.Int31Bits ] +| [ "int31" "type" ] -> [ Retroknowledge.Int31Type ] +| [ "int31" "twice" ] -> [ Retroknowledge.Int31Twice ] +| [ "int31" "twice" "plus" "one" ] -> [ Retroknowledge.Int31TwicePlusOne ] +| [ "int31" "phi" ] -> [ Retroknowledge.Int31Phi ] +| [ "int31" "phi" "inv" ] -> [ Retroknowledge.Int31PhiInv ] +| [ "int31" "plus" ] -> [ Retroknowledge.Int31Plus ] +| [ "int31" "plusc" ] -> [ Retroknowledge.Int31PlusC ] +| [ "int31" "pluscarryc" ] -> [ Retroknowledge.Int31PlusCarryC ] +| [ "int31" "minus" ] -> [ Retroknowledge.Int31Minus ] +| [ "int31" "minusc" ] -> [ Retroknowledge.Int31MinusC ] +| [ "int31" "minuscarryc" ] -> [ Retroknowledge.Int31MinusCarryC ] +| [ "int31" "times" ] -> [ Retroknowledge.Int31Times ] +| [ "int31" "timesc" ] -> [ Retroknowledge.Int31TimesC ] +| [ "int31" "div21" ] -> [ Retroknowledge.Int31Div21 ] +| [ "int31" "div" ] -> [ Retroknowledge.Int31Div ] +| [ "int31" "addmuldiv" ] -> [ Retroknowledge.Int31AddMulDiv ] +| [ "int31" "compare" ] -> [ Retroknowledge.Int31Compare ] +| [ "int31" "head0" ] -> [ Retroknowledge.Int31Head0 ] +| [ "int31" "tail0" ] -> [ Retroknowledge.Int31Tail0 ] + +END + +ARGUMENT EXTEND retroknowledge_field +TYPED AS r_field +PRINTED BY pr_retroknowledge_field +(*| [ "equality" ] -> [ Retroknowledge.KEq ] +| [ retroknowledge_nat(n)] -> [ Retroknowledge.KNat n ] +| [ retroknowledge_binary_n (n)] -> [ Retroknowledge.KN n ]*) +| [ retroknowledge_int31 (i) "in" string(g)] -> [ Retroknowledge.KInt31(g,i) ] +END diff --git a/tactics/extraargs.mli b/tactics/extraargs.mli index 4a9a0c5f..74296ab0 100644 --- a/tactics/extraargs.mli +++ b/tactics/extraargs.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: extraargs.mli 9076 2006-08-23 15:05:54Z jforest $ i*) +(*i $Id: extraargs.mli 10820 2008-04-20 18:18:49Z msozeau $ i*) open Tacexpr open Term @@ -16,18 +16,22 @@ open Topconstr open Rawterm val rawwit_orient : bool raw_abstract_argument_type -val wit_orient : bool closed_abstract_argument_type +val wit_orient : bool typed_abstract_argument_type val orient : bool Pcoq.Gram.Entry.e +val occurrences : (int list or_var) Pcoq.Gram.Entry.e +val rawwit_occurrences : (int list or_var) raw_abstract_argument_type +val wit_occurrences : (int list) typed_abstract_argument_type + val rawwit_morphism_signature : Setoid_replace.morphism_signature raw_abstract_argument_type val wit_morphism_signature : - Setoid_replace.morphism_signature closed_abstract_argument_type + Setoid_replace.morphism_signature typed_abstract_argument_type val morphism_signature : Setoid_replace.morphism_signature Pcoq.Gram.Entry.e val rawwit_raw : constr_expr raw_abstract_argument_type -val wit_raw : rawconstr closed_abstract_argument_type +val wit_raw : rawconstr typed_abstract_argument_type val raw : constr_expr Pcoq.Gram.Entry.e type 'id gen_place= ('id * hyp_location_flag,unit) location @@ -36,17 +40,25 @@ type loc_place = identifier Util.located gen_place type place = identifier gen_place val rawwit_hloc : loc_place raw_abstract_argument_type -val wit_hloc : place closed_abstract_argument_type +val wit_hloc : place typed_abstract_argument_type val hloc : loc_place Pcoq.Gram.Entry.e val in_arg_hyp: (Names.identifier Util.located list option * bool) Pcoq.Gram.Entry.e val rawwit_in_arg_hyp : (Names.identifier Util.located list option * bool) raw_abstract_argument_type -val wit_in_arg_hyp : (Names.identifier list option * bool) closed_abstract_argument_type +val wit_in_arg_hyp : (Names.identifier list option * bool) typed_abstract_argument_type val raw_in_arg_hyp_to_clause : (Names.identifier Util.located list option * bool) -> Tacticals.clause val glob_in_arg_hyp_to_clause : (Names.identifier list option * bool) -> Tacticals.clause val by_arg_tac : Tacexpr.raw_tactic_expr option Pcoq.Gram.Entry.e val rawwit_by_arg_tac : raw_tactic_expr option raw_abstract_argument_type -val wit_by_arg_tac : glob_tactic_expr option closed_abstract_argument_type +val wit_by_arg_tac : glob_tactic_expr option typed_abstract_argument_type + + + +(* Spiwack: Primitive for retroknowledge registration *) + +val retroknowledge_field : Retroknowledge.field Pcoq.Gram.Entry.e +val rawwit_retroknowledge_field : Retroknowledge.field raw_abstract_argument_type +val wit_retroknowledge_field : Retroknowledge.field typed_abstract_argument_type diff --git a/tactics/extratactics.ml4 b/tactics/extratactics.ml4 index d6de2666..885138e4 100644 --- a/tactics/extratactics.ml4 +++ b/tactics/extratactics.ml4 @@ -8,7 +8,7 @@ (*i camlp4deps: "parsing/grammar.cma" i*) -(* $Id: extratactics.ml4 9430 2006-12-12 08:25:19Z herbelin $ *) +(* $Id: extratactics.ml4 11166 2008-06-22 13:23:35Z herbelin $ *) open Pp open Pcoq @@ -16,6 +16,8 @@ open Genarg open Extraargs open Mod_subst open Names +open Tacexpr +open Rawterm (* Equality *) open Equality @@ -23,7 +25,7 @@ open Equality TACTIC EXTEND replace ["replace" constr(c1) "with" constr(c2) in_arg_hyp(in_hyp) by_arg_tac(tac) ] --> [ replace_in_clause_maybe_by c1 c2 (glob_in_arg_hyp_to_clause in_hyp) (Util.option_map Tacinterp.eval_tactic tac) ] +-> [ replace_in_clause_maybe_by c1 c2 (glob_in_arg_hyp_to_clause in_hyp) (Option.map Tacinterp.eval_tactic tac) ] END TACTIC EXTEND replace_term_left @@ -41,25 +43,93 @@ TACTIC EXTEND replace_term -> [ replace_multi_term None c (glob_in_arg_hyp_to_clause in_hyp) ] END +let induction_arg_of_quantified_hyp = function + | AnonHyp n -> ElimOnAnonHyp n + | NamedHyp id -> ElimOnIdent (Util.dummy_loc,id) + +(* Versions *_main must come first!! so that "1" is interpreted as a + ElimOnAnonHyp and not as a "constr", and "id" is interpreted as a + ElimOnIdent and not as "constr" *) + +TACTIC EXTEND simplify_eq_main +| [ "simplify_eq" constr_with_bindings(c) ] -> + [ dEq false (Some (ElimOnConstr c)) ] +END TACTIC EXTEND simplify_eq - [ "simplify_eq" quantified_hypothesis_opt(h) ] -> [ dEq h ] + [ "simplify_eq" ] -> [ dEq false None ] +| [ "simplify_eq" quantified_hypothesis(h) ] -> + [ dEq false (Some (induction_arg_of_quantified_hyp h)) ] +END +TACTIC EXTEND esimplify_eq_main +| [ "esimplify_eq" constr_with_bindings(c) ] -> + [ dEq true (Some (ElimOnConstr c)) ] +END +TACTIC EXTEND esimplify_eq +| [ "esimplify_eq" ] -> [ dEq true None ] +| [ "esimplify_eq" quantified_hypothesis(h) ] -> + [ dEq true (Some (induction_arg_of_quantified_hyp h)) ] END +TACTIC EXTEND discriminate_main +| [ "discriminate" constr_with_bindings(c) ] -> + [ discr_tac false (Some (ElimOnConstr c)) ] +END TACTIC EXTEND discriminate - [ "discriminate" quantified_hypothesis_opt(h) ] -> [ discr_tac h ] +| [ "discriminate" ] -> [ discr_tac false None ] +| [ "discriminate" quantified_hypothesis(h) ] -> + [ discr_tac false (Some (induction_arg_of_quantified_hyp h)) ] +END +TACTIC EXTEND ediscriminate_main +| [ "ediscriminate" constr_with_bindings(c) ] -> + [ discr_tac true (Some (ElimOnConstr c)) ] +END +TACTIC EXTEND ediscriminate +| [ "ediscriminate" ] -> [ discr_tac true None ] +| [ "ediscriminate" quantified_hypothesis(h) ] -> + [ discr_tac true (Some (induction_arg_of_quantified_hyp h)) ] END -let h_discrHyp id = h_discriminate (Some id) +let h_discrHyp id = h_discriminate_main (Term.mkVar id,NoBindings) +TACTIC EXTEND injection_main +| [ "injection" constr_with_bindings(c) ] -> + [ injClause [] false (Some (ElimOnConstr c)) ] +END TACTIC EXTEND injection - [ "injection" quantified_hypothesis_opt(h) ] -> [ injClause [] h ] +| [ "injection" ] -> [ injClause [] false None ] +| [ "injection" quantified_hypothesis(h) ] -> + [ injClause [] false (Some (induction_arg_of_quantified_hyp h)) ] +END +TACTIC EXTEND einjection_main +| [ "einjection" constr_with_bindings(c) ] -> + [ injClause [] true (Some (ElimOnConstr c)) ] +END +TACTIC EXTEND einjection +| [ "einjection" ] -> [ injClause [] true None ] +| [ "einjection" quantified_hypothesis(h) ] -> [ injClause [] true (Some (induction_arg_of_quantified_hyp h)) ] +END +TACTIC EXTEND injection_as_main +| [ "injection" constr_with_bindings(c) "as" simple_intropattern_list(ipat)] -> + [ injClause ipat false (Some (ElimOnConstr c)) ] END TACTIC EXTEND injection_as - [ "injection" quantified_hypothesis_opt(h) - "as" simple_intropattern_list(ipat)] -> [ injClause ipat h ] +| [ "injection" "as" simple_intropattern_list(ipat)] -> + [ injClause ipat false None ] +| [ "injection" quantified_hypothesis(h) "as" simple_intropattern_list(ipat) ] -> + [ injClause ipat false (Some (induction_arg_of_quantified_hyp h)) ] +END +TACTIC EXTEND einjection_as_main +| [ "einjection" constr_with_bindings(c) "as" simple_intropattern_list(ipat)] -> + [ injClause ipat true (Some (ElimOnConstr c)) ] +END +TACTIC EXTEND einjection_as +| [ "einjection" "as" simple_intropattern_list(ipat)] -> + [ injClause ipat true None ] +| [ "einjection" quantified_hypothesis(h) "as" simple_intropattern_list(ipat) ] -> + [ injClause ipat true (Some (induction_arg_of_quantified_hyp h)) ] END -let h_injHyp id = h_injection (Some id) +let h_injHyp id = h_injection_main (Term.mkVar id,NoBindings) TACTIC EXTEND conditional_rewrite | [ "conditional" tactic(tac) "rewrite" orient(b) constr_with_bindings(c) ] @@ -150,82 +220,82 @@ let refine_tac = h_refine open Setoid_replace -TACTIC EXTEND setoid_replace - [ "setoid_replace" constr(c1) "with" constr(c2) by_arg_tac(tac)] -> - [ setoid_replace (Util.option_map Tacinterp.eval_tactic tac) None c1 c2 ~new_goals:[] ] - | [ "setoid_replace" constr(c1) "with" constr(c2) "using" "relation" constr(rel) by_arg_tac(tac)] -> - [ setoid_replace (Util.option_map Tacinterp.eval_tactic tac) (Some rel) c1 c2 ~new_goals:[] ] - | [ "setoid_replace" constr(c1) "with" constr(c2) "generate" "side" "conditions" constr_list(l) by_arg_tac(tac) ] -> - [ setoid_replace (Util.option_map Tacinterp.eval_tactic tac) None c1 c2 ~new_goals:l ] - | [ "setoid_replace" constr(c1) "with" constr(c2) "using" "relation" constr(rel) "generate" "side" "conditions" constr_list(l) by_arg_tac(tac) ] -> - [ setoid_replace (Util.option_map Tacinterp.eval_tactic tac) (Some rel) c1 c2 ~new_goals:l ] - | [ "setoid_replace" constr(c1) "with" constr(c2) "in" hyp(h) by_arg_tac(tac) ] -> - [ setoid_replace_in (Util.option_map Tacinterp.eval_tactic tac) h None c1 c2 ~new_goals:[] ] - | [ "setoid_replace" constr(c1) "with" constr(c2) "in" hyp(h) "using" "relation" constr(rel) by_arg_tac(tac)] -> - [ setoid_replace_in (Util.option_map Tacinterp.eval_tactic tac) h (Some rel) c1 c2 ~new_goals:[] ] - | [ "setoid_replace" constr(c1) "with" constr(c2) "in" hyp(h) "generate" "side" "conditions" constr_list(l) by_arg_tac(tac)] -> - [ setoid_replace_in (Util.option_map Tacinterp.eval_tactic tac) h None c1 c2 ~new_goals:l ] - | [ "setoid_replace" constr(c1) "with" constr(c2) "in" hyp(h) "using" "relation" constr(rel) "generate" "side" "conditions" constr_list(l) by_arg_tac(tac)] -> - [ setoid_replace_in (Util.option_map Tacinterp.eval_tactic tac) h (Some rel) c1 c2 ~new_goals:l ] -END - -TACTIC EXTEND setoid_rewrite - [ "setoid_rewrite" orient(b) constr(c) ] - -> [ general_s_rewrite b c ~new_goals:[] ] - | [ "setoid_rewrite" orient(b) constr(c) "generate" "side" "conditions" constr_list(l) ] - -> [ general_s_rewrite b c ~new_goals:l ] - | [ "setoid_rewrite" orient(b) constr(c) "in" hyp(h) ] -> - [ general_s_rewrite_in h b c ~new_goals:[] ] - | [ "setoid_rewrite" orient(b) constr(c) "in" hyp(h) "generate" "side" "conditions" constr_list(l) ] -> - [ general_s_rewrite_in h b c ~new_goals:l ] -END - -VERNAC COMMAND EXTEND AddSetoid1 - [ "Add" "Setoid" constr(a) constr(aeq) constr(t) "as" ident(n) ] -> - [ add_setoid n a aeq t ] -| [ "Add" "Morphism" constr(m) ":" ident(n) ] -> - [ new_named_morphism n m None ] -| [ "Add" "Morphism" constr(m) "with" "signature" morphism_signature(s) "as" ident(n) ] -> - [ new_named_morphism n m (Some s)] -END - -VERNAC COMMAND EXTEND AddRelation1 - [ "Add" "Relation" constr(a) constr(aeq) "reflexivity" "proved" "by" constr(t) "symmetry" "proved" "by" constr(t') "as" ident(n) ] -> - [ add_relation n a aeq (Some t) (Some t') None ] -| [ "Add" "Relation" constr(a) constr(aeq) "reflexivity" "proved" "by" constr(t) "as" ident(n) ] -> - [ add_relation n a aeq (Some t) None None ] -| [ "Add" "Relation" constr(a) constr(aeq) "as" ident(n) ] -> - [ add_relation n a aeq None None None ] -END - -VERNAC COMMAND EXTEND AddRelation2 - [ "Add" "Relation" constr(a) constr(aeq) "symmetry" "proved" "by" constr(t') "as" ident(n) ] -> - [ add_relation n a aeq None (Some t') None ] -| [ "Add" "Relation" constr(a) constr(aeq) "symmetry" "proved" "by" constr(t') "transitivity" "proved" "by" constr(t'') "as" ident(n) ] -> - [ add_relation n a aeq None (Some t') (Some t'') ] -END - -VERNAC COMMAND EXTEND AddRelation3 - [ "Add" "Relation" constr(a) constr(aeq) "reflexivity" "proved" "by" constr(t) "transitivity" "proved" "by" constr(t') "as" ident(n) ] -> - [ add_relation n a aeq (Some t) None (Some t') ] -| [ "Add" "Relation" constr(a) constr(aeq) "reflexivity" "proved" "by" constr(t) "symmetry" "proved" "by" constr(t') "transitivity" "proved" "by" constr(t'') "as" ident(n) ] -> - [ add_relation n a aeq (Some t) (Some t') (Some t'') ] -| [ "Add" "Relation" constr(a) constr(aeq) "transitivity" "proved" "by" constr(t) "as" ident(n) ] -> - [ add_relation n a aeq None None (Some t) ] -END - -TACTIC EXTEND setoid_symmetry - [ "setoid_symmetry" ] -> [ setoid_symmetry ] - | [ "setoid_symmetry" "in" hyp(n) ] -> [ setoid_symmetry_in n ] -END - -TACTIC EXTEND setoid_reflexivity - [ "setoid_reflexivity" ] -> [ setoid_reflexivity ] -END - -TACTIC EXTEND setoid_transitivity - [ "setoid_transitivity" constr(t) ] -> [ setoid_transitivity t ] -END +(* TACTIC EXTEND setoid_replace *) +(* [ "setoid_replace" constr(c1) "with" constr(c2) by_arg_tac(tac)] -> *) +(* [ setoid_replace (Option.map Tacinterp.eval_tactic tac) None c1 c2 ~new_goals:[] ] *) +(* | [ "setoid_replace" constr(c1) "with" constr(c2) "using" "relation" constr(rel) by_arg_tac(tac)] -> *) +(* [ setoid_replace (Option.map Tacinterp.eval_tactic tac) (Some rel) c1 c2 ~new_goals:[] ] *) +(* | [ "setoid_replace" constr(c1) "with" constr(c2) "generate" "side" "conditions" constr_list(l) by_arg_tac(tac) ] -> *) +(* [ setoid_replace (Option.map Tacinterp.eval_tactic tac) None c1 c2 ~new_goals:l ] *) +(* | [ "setoid_replace" constr(c1) "with" constr(c2) "using" "relation" constr(rel) "generate" "side" "conditions" constr_list(l) by_arg_tac(tac) ] -> *) +(* [ setoid_replace (Option.map Tacinterp.eval_tactic tac) (Some rel) c1 c2 ~new_goals:l ] *) +(* | [ "setoid_replace" constr(c1) "with" constr(c2) "in" hyp(h) by_arg_tac(tac) ] -> *) +(* [ setoid_replace_in (Option.map Tacinterp.eval_tactic tac) h None c1 c2 ~new_goals:[] ] *) +(* | [ "setoid_replace" constr(c1) "with" constr(c2) "in" hyp(h) "using" "relation" constr(rel) by_arg_tac(tac)] -> *) +(* [ setoid_replace_in (Option.map Tacinterp.eval_tactic tac) h (Some rel) c1 c2 ~new_goals:[] ] *) +(* | [ "setoid_replace" constr(c1) "with" constr(c2) "in" hyp(h) "generate" "side" "conditions" constr_list(l) by_arg_tac(tac)] -> *) +(* [ setoid_replace_in (Option.map Tacinterp.eval_tactic tac) h None c1 c2 ~new_goals:l ] *) +(* | [ "setoid_replace" constr(c1) "with" constr(c2) "in" hyp(h) "using" "relation" constr(rel) "generate" "side" "conditions" constr_list(l) by_arg_tac(tac)] -> *) +(* [ setoid_replace_in (Option.map Tacinterp.eval_tactic tac) h (Some rel) c1 c2 ~new_goals:l ] *) +(* END *) + +(* TACTIC EXTEND setoid_rewrite *) +(* [ "setoid_rewrite" orient(b) constr(c) ] *) +(* -> [ general_s_rewrite b c ~new_goals:[] ] *) +(* | [ "setoid_rewrite" orient(b) constr(c) "generate" "side" "conditions" constr_list(l) ] *) +(* -> [ general_s_rewrite b c ~new_goals:l ] *) +(* | [ "setoid_rewrite" orient(b) constr(c) "in" hyp(h) ] -> *) +(* [ general_s_rewrite_in h b c ~new_goals:[] ] *) +(* | [ "setoid_rewrite" orient(b) constr(c) "in" hyp(h) "generate" "side" "conditions" constr_list(l) ] -> *) +(* [ general_s_rewrite_in h b c ~new_goals:l ] *) +(* END *) + +(* VERNAC COMMAND EXTEND AddSetoid1 *) +(* [ "Add" "Setoid" constr(a) constr(aeq) constr(t) "as" ident(n) ] -> *) +(* [ add_setoid n a aeq t ] *) +(* | [ "Add" "Morphism" constr(m) ":" ident(n) ] -> *) +(* [ new_named_morphism n m None ] *) +(* | [ "Add" "Morphism" constr(m) "with" "signature" morphism_signature(s) "as" ident(n) ] -> *) +(* [ new_named_morphism n m (Some s)] *) +(* END *) + +(* VERNAC COMMAND EXTEND AddRelation1 *) +(* [ "Add" "Relation" constr(a) constr(aeq) "reflexivity" "proved" "by" constr(t) "symmetry" "proved" "by" constr(t') "as" ident(n) ] -> *) +(* [ add_relation n a aeq (Some t) (Some t') None ] *) +(* | [ "Add" "Relation" constr(a) constr(aeq) "reflexivity" "proved" "by" constr(t) "as" ident(n) ] -> *) +(* [ add_relation n a aeq (Some t) None None ] *) +(* | [ "Add" "Relation" constr(a) constr(aeq) "as" ident(n) ] -> *) +(* [ add_relation n a aeq None None None ] *) +(* END *) + +(* VERNAC COMMAND EXTEND AddRelation2 *) +(* [ "Add" "Relation" constr(a) constr(aeq) "symmetry" "proved" "by" constr(t') "as" ident(n) ] -> *) +(* [ add_relation n a aeq None (Some t') None ] *) +(* | [ "Add" "Relation" constr(a) constr(aeq) "symmetry" "proved" "by" constr(t') "transitivity" "proved" "by" constr(t'') "as" ident(n) ] -> *) +(* [ add_relation n a aeq None (Some t') (Some t'') ] *) +(* END *) + +(* VERNAC COMMAND EXTEND AddRelation3 *) +(* [ "Add" "Relation" constr(a) constr(aeq) "reflexivity" "proved" "by" constr(t) "transitivity" "proved" "by" constr(t') "as" ident(n) ] -> *) +(* [ add_relation n a aeq (Some t) None (Some t') ] *) +(* | [ "Add" "Relation" constr(a) constr(aeq) "reflexivity" "proved" "by" constr(t) "symmetry" "proved" "by" constr(t') "transitivity" "proved" "by" constr(t'') "as" ident(n) ] -> *) +(* [ add_relation n a aeq (Some t) (Some t') (Some t'') ] *) +(* | [ "Add" "Relation" constr(a) constr(aeq) "transitivity" "proved" "by" constr(t) "as" ident(n) ] -> *) +(* [ add_relation n a aeq None None (Some t) ] *) +(* END *) + +(* TACTIC EXTEND setoid_symmetry *) +(* [ "setoid_symmetry" ] -> [ setoid_symmetry ] *) +(* | [ "setoid_symmetry" "in" hyp(n) ] -> [ setoid_symmetry_in n ] *) +(* END *) + +(* TACTIC EXTEND setoid_reflexivity *) +(* [ "setoid_reflexivity" ] -> [ setoid_reflexivity ] *) +(* END *) + +(* TACTIC EXTEND setoid_transitivity *) +(* [ "setoid_transitivity" constr(t) ] -> [ setoid_transitivity t ] *) +(* END *) (* Inversion lemmas (Leminv) *) @@ -234,10 +304,10 @@ open Leminv VERNAC COMMAND EXTEND DeriveInversionClear [ "Derive" "Inversion_clear" ident(na) hyp(id) ] - -> [ inversion_lemma_from_goal 1 na id Term.mk_Prop false inv_clear_tac ] + -> [ inversion_lemma_from_goal 1 na id Term.prop_sort false inv_clear_tac ] | [ "Derive" "Inversion_clear" natural(n) ident(na) hyp(id) ] - -> [ inversion_lemma_from_goal n na id Term.mk_Prop false inv_clear_tac ] + -> [ inversion_lemma_from_goal n na id Term.prop_sort false inv_clear_tac ] | [ "Derive" "Inversion_clear" ident(na) "with" constr(c) "Sort" sort(s) ] -> [ add_inversion_lemma_exn na c s false inv_clear_tac ] @@ -257,10 +327,10 @@ VERNAC COMMAND EXTEND DeriveInversion -> [ add_inversion_lemma_exn na c (RProp Null) false inv_tac ] | [ "Derive" "Inversion" ident(na) hyp(id) ] - -> [ inversion_lemma_from_goal 1 na id Term.mk_Prop false inv_tac ] + -> [ inversion_lemma_from_goal 1 na id Term.prop_sort false inv_tac ] | [ "Derive" "Inversion" natural(n) ident(na) hyp(id) ] - -> [ inversion_lemma_from_goal n na id Term.mk_Prop false inv_tac ] + -> [ inversion_lemma_from_goal n na id Term.prop_sort false inv_tac ] END VERNAC COMMAND EXTEND DeriveDependentInversion @@ -290,16 +360,17 @@ TACTIC EXTEND evar END open Tacexpr +open Tacticals TACTIC EXTEND instantiate [ "instantiate" "(" integer(i) ":=" raw(c) ")" hloc(hl) ] -> [instantiate i c hl ] +| [ "instantiate" ] -> [ tclNORMEVAR ] END (** Nijmegen "step" tactic for setoid rewriting *) -open Tacticals open Tactics open Tactics open Libnames @@ -400,8 +471,36 @@ VERNAC COMMAND EXTEND ImplicitTactic [ Tacinterp.declare_implicit_tactic (Tacinterp.interp tac) ] END + + + +(*spiwack : Vernac commands for retroknowledge *) + +VERNAC COMMAND EXTEND RetroknowledgeRegister + | [ "Register" constr(c) "as" retroknowledge_field(f) "by" constr(b)] -> + [ let tc = Constrintern.interp_constr Evd.empty (Global.env ()) c in + let tb = Constrintern.interp_constr Evd.empty (Global.env ()) b in + Global.register f tc tb ] +END + + + TACTIC EXTEND apply_in -| ["apply" constr_with_bindings(c) "in" hyp(id) ] -> [ apply_in id [c] ] +| ["apply" constr_with_bindings(c) "in" hyp(id) ] -> [ apply_in false id [c] ] | ["apply" constr_with_bindings(c) "," constr_with_bindings_list_sep(cl,",") - "in" hyp(id) ] -> [ apply_in id (c::cl) ] + "in" hyp(id) ] -> [ apply_in false id (c::cl) ] END + + +TACTIC EXTEND eapply_in +| ["eapply" constr_with_bindings(c) "in" hyp(id) ] -> [ apply_in true id [c] ] +| ["epply" constr_with_bindings(c) "," constr_with_bindings_list_sep(cl,",") + "in" hyp(id) ] -> [ apply_in true id (c::cl) ] +END + +(* sozeau: abs/gen for induction on instantiated dependent inductives, using "Ford" induction as + defined by Conor McBride *) +TACTIC EXTEND generalize_eqs +| ["generalize_eqs" hyp(id) ] -> [ abstract_generalize id ] +END + diff --git a/tactics/extratactics.mli b/tactics/extratactics.mli index 234c0161..d43e4581 100644 --- a/tactics/extratactics.mli +++ b/tactics/extratactics.mli @@ -6,19 +6,12 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: extratactics.mli 9073 2006-08-22 08:54:29Z jforest $ i*) +(*i $Id: extratactics.mli 11166 2008-06-22 13:23:35Z herbelin $ i*) -open Util -open Names -open Term open Proof_type -open Rawterm -open Tacexpr -open Topconstr -open Genarg -val h_discrHyp : quantified_hypothesis -> tactic -val h_injHyp : quantified_hypothesis -> tactic +val h_discrHyp : Names.identifier -> tactic +val h_injHyp : Names.identifier -> tactic -val refine_tac : Genarg.open_constr -> tactic +val refine_tac : Evd.open_constr -> tactic diff --git a/tactics/hiddentac.ml b/tactics/hiddentac.ml index 4133a3f6..190a7ba2 100644 --- a/tactics/hiddentac.ml +++ b/tactics/hiddentac.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: hiddentac.ml 9551 2007-01-29 15:13:35Z bgregoir $ *) +(* $Id: hiddentac.ml 11094 2008-06-10 19:35:23Z herbelin $ *) open Term open Proof_type @@ -20,34 +20,58 @@ open Tactics open Util let inj_id id = (dummy_loc,id) +let inj_open c = (Evd.empty,c) +let inj_open_wb (c,b) = ((Evd.empty,c),b) +let inj_ia = function + | ElimOnConstr c -> ElimOnConstr (inj_open_wb c) + | ElimOnIdent id -> ElimOnIdent id + | ElimOnAnonHyp n -> ElimOnAnonHyp n +let inj_occ (occ,c) = (occ,inj_open c) (* Basic tactics *) let h_intro_move x y = - abstract_tactic (TacIntroMove (x, option_map inj_id y)) (intro_move x y) + abstract_tactic (TacIntroMove (x, Option.map inj_id y)) (intro_move x y) let h_intro x = h_intro_move (Some x) None let h_intros_until x = abstract_tactic (TacIntrosUntil x) (intros_until x) let h_assumption = abstract_tactic TacAssumption assumption -let h_exact c = abstract_tactic (TacExact c) (exact_check c) -let h_exact_no_check c = abstract_tactic (TacExactNoCheck c) (exact_no_check c) +let h_exact c = abstract_tactic (TacExact (inj_open c)) (exact_check c) +let h_exact_no_check c = + abstract_tactic (TacExactNoCheck (inj_open c)) (exact_no_check c) let h_vm_cast_no_check c = - abstract_tactic (TacVmCastNoCheck c) (vm_cast_no_check c) -let h_apply cb = abstract_tactic (TacApply cb) (apply_with_bindings cb) -let h_elim cb cbo = abstract_tactic (TacElim (cb,cbo)) (elim cb cbo) -let h_elim_type c = abstract_tactic (TacElimType c) (elim_type c) -let h_case cb = abstract_tactic (TacCase cb) (general_case_analysis cb) -let h_case_type c = abstract_tactic (TacCaseType c) (case_type c) + abstract_tactic (TacVmCastNoCheck (inj_open c)) (vm_cast_no_check c) +let h_apply simple ev cb = + abstract_tactic (TacApply (simple,ev,inj_open_wb cb)) + (apply_with_ebindings_gen simple ev cb) +let h_elim ev cb cbo = + abstract_tactic (TacElim (ev,inj_open_wb cb,Option.map inj_open_wb cbo)) + (elim ev cb cbo) +let h_elim_type c = abstract_tactic (TacElimType (inj_open c)) (elim_type c) +let h_case ev cb = abstract_tactic (TacCase (ev,inj_open_wb cb)) (general_case_analysis ev cb) +let h_case_type c = abstract_tactic (TacCaseType (inj_open c)) (case_type c) let h_fix ido n = abstract_tactic (TacFix (ido,n)) (fix ido n) -let h_mutual_fix id n l = - abstract_tactic (TacMutualFix (id,n,l)) (mutual_fix id n l) +let h_mutual_fix b id n l = + abstract_tactic + (TacMutualFix (b,id,n,List.map (fun (id,n,c) -> (id,n,inj_open c)) l)) + (mutual_fix id n l) + let h_cofix ido = abstract_tactic (TacCofix ido) (cofix ido) -let h_mutual_cofix id l = - abstract_tactic (TacMutualCofix (id,l)) (mutual_cofix id l) +let h_mutual_cofix b id l = + abstract_tactic + (TacMutualCofix (b,id,List.map (fun (id,c) -> (id,inj_open c)) l)) + (mutual_cofix id l) -let h_cut c = abstract_tactic (TacCut c) (cut c) -let h_generalize cl = abstract_tactic (TacGeneralize cl) (generalize cl) -let h_generalize_dep c = abstract_tactic (TacGeneralizeDep c)(generalize_dep c) -let h_let_tac na c cl = - abstract_tactic (TacLetTac (na,c,cl)) (letin_tac true na c cl) +let h_cut c = abstract_tactic (TacCut (inj_open c)) (cut c) +let h_generalize_gen cl = + abstract_tactic (TacGeneralize (List.map (on_fst inj_occ) cl)) + (generalize_gen (List.map (on_fst Redexpr.out_with_occurrences) cl)) +let h_generalize cl = + h_generalize_gen (List.map (fun c -> ((all_occurrences_expr,c),Names.Anonymous)) + cl) +let h_generalize_dep c = + abstract_tactic (TacGeneralizeDep (inj_open c))(generalize_dep c) +let h_let_tac b na c cl = + let with_eq = if b then None else Some true in + abstract_tactic (TacLetTac (na,inj_open c,cl,b)) (letin_tac with_eq na c cl) let h_instantiate n c ido = (Evar_tactics.instantiate n c ido) (* abstract_tactic (TacInstantiate (n,c,cls)) @@ -58,12 +82,14 @@ let h_simple_induction h = abstract_tactic (TacSimpleInduction h) (simple_induct h) let h_simple_destruct h = abstract_tactic (TacSimpleDestruct h) (simple_destruct h) -let h_new_induction c e idl = - abstract_tactic (TacNewInduction (c,e,idl)) (new_induct c e idl) -let h_new_destruct c e idl = - abstract_tactic (TacNewDestruct (c,e,idl)) (new_destruct c e idl) -let h_specialize n d = abstract_tactic (TacSpecialize (n,d)) (new_hyp n d) -let h_lapply c = abstract_tactic (TacLApply c) (cut_and_apply c) +let h_new_induction ev c e idl cl = + abstract_tactic (TacNewInduction (ev,List.map inj_ia c,Option.map inj_open_wb e,idl,cl)) + (new_induct ev c e idl cl) +let h_new_destruct ev c e idl cl = + abstract_tactic (TacNewDestruct (ev,List.map inj_ia c,Option.map inj_open_wb e,idl,cl)) + (new_destruct ev c e idl cl) +let h_specialize n d = abstract_tactic (TacSpecialize (n,inj_open_wb d)) (specialize n d) +let h_lapply c = abstract_tactic (TacLApply (inj_open c)) (cut_and_apply c) (* Context management *) let h_clear b l = abstract_tactic (TacClear (b,l)) @@ -71,38 +97,41 @@ let h_clear b l = abstract_tactic (TacClear (b,l)) let h_clear_body l = abstract_tactic (TacClearBody l) (clear_body l) let h_move dep id1 id2 = abstract_tactic (TacMove (dep,id1,id2)) (move_hyp dep id1 id2) -let h_rename id1 id2 = - abstract_tactic (TacRename (id1,id2)) (rename_hyp id1 id2) +let h_rename l = + abstract_tactic (TacRename l) (rename_hyp l) +let h_revert l = abstract_tactic (TacRevert l) (revert l) (* Constructors *) -let h_left l = abstract_tactic (TacLeft l) (left l) -let h_right l = abstract_tactic (TacLeft l) (right l) -let h_split l = abstract_tactic (TacSplit (false,l)) (split l) -(* Moved to tacinterp because of dependence in Tacinterp.interp +let h_left ev l = abstract_tactic (TacLeft (ev,l)) (left_with_ebindings ev l) +let h_right ev l = abstract_tactic (TacLeft (ev,l)) (right_with_ebindings ev l) +let h_split ev l = abstract_tactic (TacSplit (ev,false,l)) (split_with_ebindings ev l) +(* Moved to tacinterp because of dependencies in Tacinterp.interp let h_any_constructor t = abstract_tactic (TacAnyConstructor t) (any_constructor t) *) -let h_constructor n l = - abstract_tactic (TacConstructor(AI n,l))(constructor_tac None n l) -let h_one_constructor n = h_constructor n NoBindings -let h_simplest_left = h_left NoBindings -let h_simplest_right = h_right NoBindings +let h_constructor ev n l = + abstract_tactic (TacConstructor(ev,AI n,l))(constructor_tac ev None n l) +let h_one_constructor n = h_constructor false n NoBindings +let h_simplest_left = h_left false NoBindings +let h_simplest_right = h_right false NoBindings (* Conversion *) -let h_reduce r cl = abstract_tactic (TacReduce (r,cl)) (reduce r cl) +let h_reduce r cl = + abstract_tactic (TacReduce (inj_red_expr r,cl)) (reduce r cl) let h_change oc c cl = - abstract_tactic (TacChange (oc,c,cl)) - (change (option_map Redexpr.out_with_occurrences oc) c cl) + abstract_tactic (TacChange (Option.map inj_occ oc,inj_open c,cl)) + (change (Option.map Redexpr.out_with_occurrences oc) c cl) (* Equivalence relations *) let h_reflexivity = abstract_tactic TacReflexivity intros_reflexivity let h_symmetry c = abstract_tactic (TacSymmetry c) (intros_symmetry c) let h_transitivity c = - abstract_tactic (TacTransitivity c) (intros_transitivity c) + abstract_tactic (TacTransitivity (inj_open c)) (intros_transitivity c) -let h_simplest_apply c = h_apply (c,NoBindings) -let h_simplest_elim c = h_elim (c,NoBindings) None -let h_simplest_case c = h_case (c,NoBindings) +let h_simplest_apply c = h_apply false false (c,NoBindings) +let h_simplest_eapply c = h_apply false true (c,NoBindings) +let h_simplest_elim c = h_elim false (c,NoBindings) None +let h_simplest_case c = h_case false (c,NoBindings) let h_intro_patterns l = abstract_tactic (TacIntroPattern l) (intro_patterns l) diff --git a/tactics/hiddentac.mli b/tactics/hiddentac.mli index 1456601b..eed3b1da 100644 --- a/tactics/hiddentac.mli +++ b/tactics/hiddentac.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: hiddentac.mli 9551 2007-01-29 15:13:35Z bgregoir $ i*) +(*i $Id: hiddentac.mli 11072 2008-06-08 16:13:37Z herbelin $ i*) (*i*) open Names @@ -16,6 +16,8 @@ open Tacmach open Genarg open Tacexpr open Rawterm +open Evd +open Clenv (*i*) (* Tactics for the interpreter. They left a trace in the proof tree @@ -32,24 +34,28 @@ val h_exact : constr -> tactic val h_exact_no_check : constr -> tactic val h_vm_cast_no_check : constr -> tactic -val h_apply : constr with_bindings -> tactic +val h_apply : advanced_flag -> evars_flag -> + constr with_ebindings -> tactic -val h_elim : constr with_bindings -> - constr with_bindings option -> tactic +val h_elim : evars_flag -> constr with_ebindings -> + constr with_ebindings option -> tactic val h_elim_type : constr -> tactic -val h_case : constr with_bindings -> tactic +val h_case : evars_flag -> constr with_ebindings -> tactic val h_case_type : constr -> tactic -val h_mutual_fix : identifier -> int -> +val h_mutual_fix : hidden_flag -> identifier -> int -> (identifier * int * constr) list -> tactic val h_fix : identifier option -> int -> tactic -val h_mutual_cofix : identifier -> (identifier * constr) list -> tactic +val h_mutual_cofix : hidden_flag -> identifier -> + (identifier * constr) list -> tactic val h_cofix : identifier option -> tactic val h_cut : constr -> tactic val h_generalize : constr list -> tactic +val h_generalize_gen : (constr with_occurrences * name) list -> tactic val h_generalize_dep : constr -> tactic -val h_let_tac : name -> constr -> Tacticals.clause -> tactic +val h_let_tac : letin_flag -> name -> constr -> + Tacticals.clause -> tactic val h_instantiate : int -> Rawterm.rawconstr -> (identifier * hyp_location_flag, unit) location -> tactic @@ -58,12 +64,14 @@ val h_instantiate : int -> Rawterm.rawconstr -> val h_simple_induction : quantified_hypothesis -> tactic val h_simple_destruct : quantified_hypothesis -> tactic val h_new_induction : - constr induction_arg list -> constr with_bindings option -> - intro_pattern_expr -> tactic + evars_flag -> constr with_ebindings induction_arg list -> + constr with_ebindings option -> intro_pattern_expr -> + Tacticals.clause option -> tactic val h_new_destruct : - constr induction_arg list -> constr with_bindings option -> - intro_pattern_expr -> tactic -val h_specialize : int option -> constr with_bindings -> tactic + evars_flag -> constr with_ebindings induction_arg list -> + constr with_ebindings option -> intro_pattern_expr -> + Tacticals.clause option -> tactic +val h_specialize : int option -> constr with_ebindings -> tactic val h_lapply : constr -> tactic (* Automation tactic : see Auto *) @@ -73,14 +81,14 @@ val h_lapply : constr -> tactic val h_clear : bool -> identifier list -> tactic val h_clear_body : identifier list -> tactic val h_move : bool -> identifier -> identifier -> tactic -val h_rename : identifier -> identifier -> tactic - +val h_rename : (identifier*identifier) list -> tactic +val h_revert : identifier list -> tactic (* Constructors *) -val h_constructor : int -> constr bindings -> tactic -val h_left : constr bindings -> tactic -val h_right : constr bindings -> tactic -val h_split : constr bindings -> tactic +val h_constructor : evars_flag -> int -> open_constr bindings -> tactic +val h_left : evars_flag -> open_constr bindings -> tactic +val h_right : evars_flag -> open_constr bindings -> tactic +val h_split : evars_flag -> open_constr bindings -> tactic val h_one_constructor : int -> tactic val h_simplest_left : tactic @@ -98,6 +106,7 @@ val h_symmetry : Tacticals.clause -> tactic val h_transitivity : constr -> tactic val h_simplest_apply : constr -> tactic +val h_simplest_eapply : constr -> tactic val h_simplest_elim : constr -> tactic val h_simplest_case : constr -> tactic diff --git a/tactics/inv.ml b/tactics/inv.ml index c48a90ac..8bd10a4d 100644 --- a/tactics/inv.ml +++ b/tactics/inv.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: inv.ml 7880 2006-01-16 13:59:08Z herbelin $ *) +(* $Id: inv.ml 11166 2008-06-22 13:23:35Z herbelin $ *) open Pp open Util @@ -47,7 +47,7 @@ let collect_meta_variables c = let check_no_metas clenv ccl = if occur_meta ccl then let metas = List.filter (fun na -> na<>Anonymous) - (List.map (Evd.meta_name clenv.env) (collect_meta_variables ccl)) in + (List.map (Evd.meta_name clenv.evd) (collect_meta_variables ccl)) in errorlabstrm "inversion" (str ("Cannot find an instantiation for variable"^ (if List.length metas = 1 then " " else "s ")) ++ @@ -111,12 +111,13 @@ let make_inv_predicate env sigma indf realargs id status concl = | None -> let sort = get_sort_of env sigma concl in let p = make_arity env true indf sort in - Unification.abstract_list_all env sigma p concl (realargs@[mkVar id]) in + Unification.abstract_list_all env (Evd.create_evar_defs sigma) + p concl (realargs@[mkVar id]) in let hyps,bodypred = decompose_lam_n_assum (nrealargs+1) pred in (* We lift to make room for the equations *) (hyps,lift nrealargs bodypred) in - let nhyps = List.length hyps in + let nhyps = rel_context_length hyps in let env' = push_rel_context hyps env in let realargs' = List.map (lift nhyps) realargs in let pairs = list_map_i (compute_eqn env' sigma nhyps) 0 realargs' in @@ -330,7 +331,7 @@ let projectAndApply thin id eqname names depids gls = substHypIfVariable (* If no immediate variable in the equation, try to decompose it *) (* and apply a trailer which again try to substitute *) - (fun id -> dEqThen (deq_trailer id) (Some (NamedHyp id))) + (fun id -> dEqThen false (deq_trailer id) (Some (ElimOnIdent (dummy_loc,id)))) id gls @@ -379,10 +380,14 @@ let rec get_names allow_conj = function error "Discarding pattern not allowed for inversion equations" | IntroAnonymous -> error "Anonymous pattern not allowed for inversion equations" + | IntroFresh _-> + error "Fresh pattern not allowed for inversion equations" + | IntroRewrite _-> + error "Rewriting pattern not allowed for inversion equations" | IntroOrAndPattern [l] -> if allow_conj then if l = [] then (None,[]) else - let l = List.map (fun id -> out_some (fst (get_names false id))) l in + let l = List.map (fun id -> Option.get (fst (get_names false id))) l in (Some (List.hd l), l) else error "Nested conjunctive patterns not allowed for inversion equations" @@ -441,20 +446,18 @@ let rewrite_equations_tac (gene, othin) id neqns names ba = tac -let raw_inversion inv_kind indbinding id status names gl = +let raw_inversion inv_kind id status names gl = let env = pf_env gl and sigma = project gl in let c = mkVar id in - let t = strong_prodspine (pf_whd_betadeltaiota gl) (pf_type_of gl c) in - let indclause = mk_clenv_from gl (c,t) in - let indclause' = clenv_constrain_with_bindings indbinding indclause in - let newc = clenv_value indclause' in - let ccl = clenv_type indclause' in - check_no_metas indclause' ccl; - let IndType (indf,realargs) = - try find_rectype env sigma ccl - with Not_found -> + let (ind,t) = + try pf_reduce_to_atomic_ind gl (pf_type_of gl c) + with UserError _ -> errorlabstrm "raw_inversion" (str ("The type of "^(string_of_id id)^" is not inductive")) in + let indclause = mk_clenv_from gl (c,t) in + let ccl = clenv_type indclause in + check_no_metas indclause ccl; + let IndType (indf,realargs) = find_rectype env sigma ccl in let (elim_predicate,neqns) = make_inv_predicate env sigma indf realargs id status (pf_concl gl) in let (cut_concl,case_tac) = @@ -469,7 +472,7 @@ let raw_inversion inv_kind indbinding id status names gl = (true_cut Anonymous cut_concl) [case_tac names (introCaseAssumsThen (rewrite_equations_tac inv_kind id neqns)) - (Some elim_predicate) ([],[]) newc; + (Some elim_predicate) ([],[]) ind indclause; onLastHyp (fun id -> (tclTHEN @@ -503,13 +506,13 @@ let wrap_inv_error id = function | UserError ("Case analysis",s) -> errorlabstrm "Inv needs Nodep Prop Set" s | UserError("mind_specif_of_mind",_) -> not_inductive_here id | UserError (a,b) -> errorlabstrm "Inv" b - | Invalid_argument (*"it_list2"*) "List.fold_left2" -> dep_prop_prop_message id + | Invalid_argument "List.fold_left2" -> dep_prop_prop_message id | Not_found -> errorlabstrm "Inv" (not_found_message [id]) | e -> raise e (* The most general inversion tactic *) let inversion inv_kind status names id gls = - try (raw_inversion inv_kind [] id status names) gls + try (raw_inversion inv_kind id status names) gls with e -> wrap_inv_error id e (* Specializing it... *) diff --git a/tactics/leminv.ml b/tactics/leminv.ml index 9507ce5f..70e8c375 100644 --- a/tactics/leminv.ml +++ b/tactics/leminv.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: leminv.ml 9154 2006-09-20 17:18:18Z corbinea $ *) +(* $Id: leminv.ml 10348 2007-12-06 17:36:14Z aspiwack $ *) open Pp open Util @@ -249,7 +249,7 @@ let add_inversion_lemma name env sigma t sort dep inv_op = { const_entry_body = invProof; const_entry_type = None; const_entry_opaque = false; - const_entry_boxed = true && (Options.boxed_definitions())}, + const_entry_boxed = true && (Flags.boxed_definitions())}, IsProof Lemma) in () @@ -292,7 +292,7 @@ let add_inversion_lemma_exn na com comsort bool tac = let lemInv id c gls = try let clause = mk_clenv_type_of gls c in - let clause = clenv_constrain_with_bindings [(-1,mkVar id)] clause in + let clause = clenv_constrain_last_binding (mkVar id) clause in Clenvtac.res_pf clause ~allow_K:true gls with | UserError (a,b) -> diff --git a/tactics/nbtermdn.ml b/tactics/nbtermdn.ml index 554ce2e9..d9d0a799 100644 --- a/tactics/nbtermdn.ml +++ b/tactics/nbtermdn.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: nbtermdn.ml 8752 2006-04-27 19:37:33Z herbelin $ *) +(* $Id: nbtermdn.ml 10346 2007-12-05 21:11:19Z aspiwack $ *) open Util open Names @@ -43,14 +43,14 @@ let get_dn dnm hkey = try Gmap.find hkey dnm with Not_found -> Btermdn.create () let add dn (na,(pat,valu)) = - let hkey = option_map fst (Termdn.constr_pat_discr pat) in + let hkey = Option.map fst (Termdn.constr_pat_discr pat) in dn.table <- Gmap.add na (pat,valu) dn.table; let dnm = dn.patterns in dn.patterns <- Gmap.add hkey (Btermdn.add (get_dn dnm hkey) (pat,valu)) dnm let rmv dn na = let (pat,valu) = Gmap.find na dn.table in - let hkey = option_map fst (Termdn.constr_pat_discr pat) in + let hkey = Option.map fst (Termdn.constr_pat_discr pat) in dn.table <- Gmap.remove na dn.table; let dnm = dn.patterns in dn.patterns <- Gmap.add hkey (Btermdn.rmv (get_dn dnm hkey) (pat,valu)) dnm @@ -62,7 +62,7 @@ let remap ndn na (pat,valu) = add ndn (na,(pat,valu)) let lookup dn valu = - let hkey = option_map fst (Termdn.constr_val_discr valu) in + let hkey = Option.map fst (Termdn.constr_val_discr valu) in try Btermdn.lookup (Gmap.find hkey dn.patterns) valu with Not_found -> [] let app f dn = Gmap.iter f dn.table diff --git a/tactics/refine.ml b/tactics/refine.ml index 5b162729..84e9dccc 100644 --- a/tactics/refine.ml +++ b/tactics/refine.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: refine.ml 9364 2006-11-11 11:59:42Z herbelin $ *) +(* $Id: refine.ml 9841 2007-05-19 21:13:42Z herbelin $ *) (* JCF -- 6 janvier 1998 EXPERIMENTAL *) @@ -125,7 +125,7 @@ let replace_in_array keep_length env sigma a = v',mm,sgp let fresh env n = - let id = match n with Name x -> x | _ -> id_of_string "_" in + let id = match n with Name x -> x | _ -> id_of_string "_H" in next_global_ident_away true id (ids_of_named_context (named_context env)) let rec compute_metamap env sigma c = match kind_of_term c with @@ -158,17 +158,22 @@ let rec compute_metamap env sigma c = match kind_of_term c with end | LetIn (name, c1, t1, c2) -> - if occur_meta c1 then - error "Refine: body of let-in cannot contain existentials"; let v = fresh env name in + let th1 = compute_metamap env sigma c1 in let env' = push_named (v,Some c1,t1) env in - begin match compute_metamap env' sigma (subst1 (mkVar v) c2) with + let th2 = compute_metamap env' sigma (subst1 (mkVar v) c2) in + begin match th1,th2 with (* terme de preuve complet *) - | TH (_,_,[]) -> TH (c,[],[]) + | TH (_,_,[]), TH (_,_,[]) -> TH (c,[],[]) (* terme de preuve incomplet *) - | th -> - let m,mm,sgp = replace_by_meta env' sigma th in - TH (mkLetIn (Name v,c1,t1,m), mm, sgp) + | TH (c1,mm1,sgp1), TH (c2,mm2,sgp2) -> + let m1,mm1,sgp1 = + if sgp1=[] then (c1,mm1,[]) + else replace_by_meta env sigma th1 in + let m2,mm2,sgp2 = + if sgp2=[] then (c2,mm2,[]) + else replace_by_meta env' sigma th2 in + TH (mkNamedLetIn v m1 t1 m2, mm1@mm2, sgp1@sgp2) end (* 4. Application *) @@ -267,7 +272,8 @@ let rec tcc_aux subst (TH (c,mm,sgp) as _th) gl = refine c gl (* abstraction => intro *) - | Lambda (Name id,_,m), _ when isMeta (strip_outer_cast m) -> + | Lambda (Name id,_,m), _ -> + assert (isMeta (strip_outer_cast m)); begin match sgp with | [None] -> introduction id gl | [Some th] -> @@ -275,12 +281,23 @@ let rec tcc_aux subst (TH (c,mm,sgp) as _th) gl = (onLastHyp (fun id -> tcc_aux (mkVar id::subst) th)) gl | _ -> assert false end - - | Lambda _, _ -> - anomaly "invalid lambda passed to function tcc_aux" - (* let in *) - | LetIn (Name id,c1,t1,c2), _ when isMeta (strip_outer_cast c2) -> + | Lambda (Anonymous,_,m), _ -> (* if anon vars are allowed in evars *) + assert (isMeta (strip_outer_cast m)); + begin match sgp with + | [None] -> tclTHEN intro (onLastHyp (fun id -> clear [id])) gl + | [Some th] -> + tclTHEN + intro + (onLastHyp (fun id -> + tclTHEN + (clear [id]) + (tcc_aux (mkVar (*dummy*) id::subst) th))) gl + | _ -> assert false + end + + (* let in without holes in the body => possibly dependent intro *) + | LetIn (Name id,c1,t1,c2), _ when not (isMeta (strip_outer_cast c1)) -> let c = pf_concl gl in let newc = mkNamedLetIn id c1 t1 c in tclTHEN @@ -293,8 +310,21 @@ let rec tcc_aux subst (TH (c,mm,sgp) as _th) gl = | _ -> assert false) gl - | LetIn _, _ -> - anomaly "invalid let-in passed to function tcc_aux" + (* let in with holes in the body => unable to handle dependency + because of evars limitation, use non dependent assert instead *) + | LetIn (Name id,c1,t1,c2), _ -> + tclTHENS + (assert_tac true (Name id) t1) + [(match List.hd sgp with + | None -> tclIDTAC + | Some th -> onLastHyp (fun id -> tcc_aux (mkVar id::subst) th)); + (match List.tl sgp with + | [] -> refine (subst1 (mkVar id) c2) (* a complete proof *) + | [None] -> tclIDTAC (* a meta *) + | [Some th] -> (* a partial proof *) + onLastHyp (fun id -> tcc_aux (mkVar id::subst) th) + | _ -> assert false)] + gl (* fix => tactique Fix *) | Fix ((ni,_),(fi,ai,_)) , _ -> diff --git a/tactics/setoid_replace.ml b/tactics/setoid_replace.ml index 9c23dda5..95d56f11 100644 --- a/tactics/setoid_replace.ml +++ b/tactics/setoid_replace.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: setoid_replace.ml 10213 2007-10-10 13:05:59Z letouzey $ *) +(* $Id: setoid_replace.ml 11094 2008-06-10 19:35:23Z herbelin $ *) open Tacmach open Proof_type @@ -85,7 +85,7 @@ type morphism_class = let subst_mps_in_relation_class subst = function Relation t -> Relation (subst_mps subst t) - | Leibniz t -> Leibniz (option_map (subst_mps subst) t) + | Leibniz t -> Leibniz (Option.map (subst_mps subst) t) let subst_mps_in_argument_class subst (variance,rel) = variance, subst_mps_in_relation_class subst rel @@ -108,7 +108,9 @@ let current_constant id = try global_reference id with Not_found -> - anomaly ("Setoid: cannot find " ^ (string_of_id id)) + anomalylabstrm "" + (str "Setoid: cannot find " ++ pr_id id ++ + str "(if loading Setoid.v under coqtop, use option \"-top Coq.Setoids.Setoid_tac\")") (* From Setoid.v *) @@ -121,69 +123,69 @@ let coq_transitive = let coq_relation = lazy(gen_constant ["Relations"; "Relation_Definitions"] "relation") -let coq_Relation_Class = lazy(constant ["Setoid"] "Relation_Class") -let coq_Argument_Class = lazy(constant ["Setoid"] "Argument_Class") +let coq_Relation_Class = lazy(constant ["Setoid_tac"] "Relation_Class") +let coq_Argument_Class = lazy(constant ["Setoid_tac"] "Argument_Class") let coq_Setoid_Theory = lazy(constant ["Setoid"] "Setoid_Theory") -let coq_Morphism_Theory = lazy(constant ["Setoid"] "Morphism_Theory") -let coq_Build_Morphism_Theory= lazy(constant ["Setoid"] "Build_Morphism_Theory") -let coq_Compat = lazy(constant ["Setoid"] "Compat") +let coq_Morphism_Theory = lazy(constant ["Setoid_tac"] "Morphism_Theory") +let coq_Build_Morphism_Theory= lazy(constant ["Setoid_tac"] "Build_Morphism_Theory") +let coq_Compat = lazy(constant ["Setoid_tac"] "Compat") -let coq_AsymmetricReflexive = lazy(constant ["Setoid"] "AsymmetricReflexive") -let coq_SymmetricReflexive = lazy(constant ["Setoid"] "SymmetricReflexive") -let coq_SymmetricAreflexive = lazy(constant ["Setoid"] "SymmetricAreflexive") -let coq_AsymmetricAreflexive = lazy(constant ["Setoid"] "AsymmetricAreflexive") -let coq_Leibniz = lazy(constant ["Setoid"] "Leibniz") +let coq_AsymmetricReflexive = lazy(constant ["Setoid_tac"] "AsymmetricReflexive") +let coq_SymmetricReflexive = lazy(constant ["Setoid_tac"] "SymmetricReflexive") +let coq_SymmetricAreflexive = lazy(constant ["Setoid_tac"] "SymmetricAreflexive") +let coq_AsymmetricAreflexive = lazy(constant ["Setoid_tac"] "AsymmetricAreflexive") +let coq_Leibniz = lazy(constant ["Setoid_tac"] "Leibniz") -let coq_RAsymmetric = lazy(constant ["Setoid"] "RAsymmetric") -let coq_RSymmetric = lazy(constant ["Setoid"] "RSymmetric") -let coq_RLeibniz = lazy(constant ["Setoid"] "RLeibniz") +let coq_RAsymmetric = lazy(constant ["Setoid_tac"] "RAsymmetric") +let coq_RSymmetric = lazy(constant ["Setoid_tac"] "RSymmetric") +let coq_RLeibniz = lazy(constant ["Setoid_tac"] "RLeibniz") -let coq_ASymmetric = lazy(constant ["Setoid"] "ASymmetric") -let coq_AAsymmetric = lazy(constant ["Setoid"] "AAsymmetric") +let coq_ASymmetric = lazy(constant ["Setoid_tac"] "ASymmetric") +let coq_AAsymmetric = lazy(constant ["Setoid_tac"] "AAsymmetric") let coq_seq_refl = lazy(constant ["Setoid"] "Seq_refl") let coq_seq_sym = lazy(constant ["Setoid"] "Seq_sym") let coq_seq_trans = lazy(constant ["Setoid"] "Seq_trans") -let coq_variance = lazy(constant ["Setoid"] "variance") -let coq_Covariant = lazy(constant ["Setoid"] "Covariant") -let coq_Contravariant = lazy(constant ["Setoid"] "Contravariant") -let coq_Left2Right = lazy(constant ["Setoid"] "Left2Right") -let coq_Right2Left = lazy(constant ["Setoid"] "Right2Left") -let coq_MSNone = lazy(constant ["Setoid"] "MSNone") -let coq_MSCovariant = lazy(constant ["Setoid"] "MSCovariant") -let coq_MSContravariant = lazy(constant ["Setoid"] "MSContravariant") +let coq_variance = lazy(constant ["Setoid_tac"] "variance") +let coq_Covariant = lazy(constant ["Setoid_tac"] "Covariant") +let coq_Contravariant = lazy(constant ["Setoid_tac"] "Contravariant") +let coq_Left2Right = lazy(constant ["Setoid_tac"] "Left2Right") +let coq_Right2Left = lazy(constant ["Setoid_tac"] "Right2Left") +let coq_MSNone = lazy(constant ["Setoid_tac"] "MSNone") +let coq_MSCovariant = lazy(constant ["Setoid_tac"] "MSCovariant") +let coq_MSContravariant = lazy(constant ["Setoid_tac"] "MSContravariant") -let coq_singl = lazy(constant ["Setoid"] "singl") -let coq_cons = lazy(constant ["Setoid"] "necons") +let coq_singl = lazy(constant ["Setoid_tac"] "singl") +let coq_cons = lazy(constant ["Setoid_tac"] "necons") let coq_equality_morphism_of_asymmetric_areflexive_transitive_relation = - lazy(constant ["Setoid"] + lazy(constant ["Setoid_tac"] "equality_morphism_of_asymmetric_areflexive_transitive_relation") let coq_equality_morphism_of_symmetric_areflexive_transitive_relation = - lazy(constant ["Setoid"] + lazy(constant ["Setoid_tac"] "equality_morphism_of_symmetric_areflexive_transitive_relation") let coq_equality_morphism_of_asymmetric_reflexive_transitive_relation = - lazy(constant ["Setoid"] + lazy(constant ["Setoid_tac"] "equality_morphism_of_asymmetric_reflexive_transitive_relation") let coq_equality_morphism_of_symmetric_reflexive_transitive_relation = - lazy(constant ["Setoid"] + lazy(constant ["Setoid_tac"] "equality_morphism_of_symmetric_reflexive_transitive_relation") let coq_make_compatibility_goal = - lazy(constant ["Setoid"] "make_compatibility_goal") + lazy(constant ["Setoid_tac"] "make_compatibility_goal") let coq_make_compatibility_goal_eval_ref = - lazy(eval_reference ["Setoid"] "make_compatibility_goal") + lazy(eval_reference ["Setoid_tac"] "make_compatibility_goal") let coq_make_compatibility_goal_aux_eval_ref = - lazy(eval_reference ["Setoid"] "make_compatibility_goal_aux") + lazy(eval_reference ["Setoid_tac"] "make_compatibility_goal_aux") -let coq_App = lazy(constant ["Setoid"] "App") -let coq_ToReplace = lazy(constant ["Setoid"] "ToReplace") -let coq_ToKeep = lazy(constant ["Setoid"] "ToKeep") -let coq_ProperElementToKeep = lazy(constant ["Setoid"] "ProperElementToKeep") -let coq_fcl_singl = lazy(constant ["Setoid"] "fcl_singl") -let coq_fcl_cons = lazy(constant ["Setoid"] "fcl_cons") +let coq_App = lazy(constant ["Setoid_tac"] "App") +let coq_ToReplace = lazy(constant ["Setoid_tac"] "ToReplace") +let coq_ToKeep = lazy(constant ["Setoid_tac"] "ToKeep") +let coq_ProperElementToKeep = lazy(constant ["Setoid_tac"] "ProperElementToKeep") +let coq_fcl_singl = lazy(constant ["Setoid_tac"] "fcl_singl") +let coq_fcl_cons = lazy(constant ["Setoid_tac"] "fcl_cons") -let coq_setoid_rewrite = lazy(constant ["Setoid"] "setoid_rewrite") +let coq_setoid_rewrite = lazy(constant ["Setoid_tac"] "setoid_rewrite") let coq_proj1 = lazy(gen_constant ["Init"; "Logic"] "proj1") let coq_proj2 = lazy(gen_constant ["Init"; "Logic"] "proj2") let coq_unit = lazy(gen_constant ["Init"; "Datatypes"] "unit") @@ -191,24 +193,26 @@ let coq_tt = lazy(gen_constant ["Init"; "Datatypes"] "tt") let coq_eq = lazy(gen_constant ["Init"; "Logic"] "eq") let coq_morphism_theory_of_function = - lazy(constant ["Setoid"] "morphism_theory_of_function") + lazy(constant ["Setoid_tac"] "morphism_theory_of_function") let coq_morphism_theory_of_predicate = - lazy(constant ["Setoid"] "morphism_theory_of_predicate") + lazy(constant ["Setoid_tac"] "morphism_theory_of_predicate") let coq_relation_of_relation_class = - lazy(eval_reference ["Setoid"] "relation_of_relation_class") + lazy(eval_reference ["Setoid_tac"] "relation_of_relation_class") let coq_directed_relation_of_relation_class = - lazy(eval_reference ["Setoid"] "directed_relation_of_relation_class") -let coq_interp = lazy(eval_reference ["Setoid"] "interp") + lazy(eval_reference ["Setoid_tac"] "directed_relation_of_relation_class") +let coq_interp = lazy(eval_reference ["Setoid_tac"] "interp") let coq_Morphism_Context_rect2 = - lazy(eval_reference ["Setoid"] "Morphism_Context_rect2") + lazy(eval_reference ["Setoid_tac"] "Morphism_Context_rect2") let coq_iff = lazy(gen_constant ["Init";"Logic"] "iff") -let coq_impl = lazy(constant ["Setoid"] "impl") +let coq_impl = lazy(constant ["Setoid_tac"] "impl") (************************* Table of declared relations **********************) -(* Relations are stored in a table which is synchronised with the Reset mechanism. *) +(* Relations are stored in a table which is synchronised with the + Reset mechanism. The table maps the term denoting the relation to + the data of type relation that characterises the relation *) let relation_table = ref Gmap.empty @@ -257,8 +261,8 @@ let default_relation_for_carrier ?(filter=fun _ -> true) a = [] -> Leibniz (Some a) | relation::tl -> if tl <> [] then - ppnl - (str "Warning: There are several relations on the carrier \"" ++ + Flags.if_warn msg_warning + (str "There are several relations on the carrier \"" ++ pr_lconstr a ++ str "\". The relation " ++ prrelation relation ++ str " is chosen.") ; Relation relation @@ -295,9 +299,9 @@ let relation_morphism_of_constr_morphism = let subst_relation subst relation = let rel_a' = subst_mps subst relation.rel_a in let rel_aeq' = subst_mps subst relation.rel_aeq in - let rel_refl' = option_map (subst_mps subst) relation.rel_refl in - let rel_sym' = option_map (subst_mps subst) relation.rel_sym in - let rel_trans' = option_map (subst_mps subst) relation.rel_trans in + let rel_refl' = Option.map (subst_mps subst) relation.rel_refl in + let rel_sym' = Option.map (subst_mps subst) relation.rel_sym in + let rel_trans' = Option.map (subst_mps subst) relation.rel_trans in let rel_X_relation_class' = subst_mps subst relation.rel_X_relation_class in let rel_Xreflexive_relation_class' = subst_mps subst relation.rel_Xreflexive_relation_class @@ -345,29 +349,29 @@ let (relation_to_obj, obj_to_relation)= match th.rel_sym with None -> old_relation.rel_sym | Some t -> Some t} in - ppnl - (str "Warning: The relation " ++ prrelation th' ++ - str " is redeclared. The new declaration" ++ + Flags.if_warn msg_warning + (strbrk "The relation " ++ prrelation th' ++ + strbrk " is redeclared. The new declaration" ++ (match th'.rel_refl with - None -> str "" - | Some t -> str " (reflevity proved by " ++ pr_lconstr t) ++ + None -> mt () + | Some t -> strbrk " (reflexivity proved by " ++ pr_lconstr t) ++ (match th'.rel_sym with - None -> str "" + None -> mt () | Some t -> - (if th'.rel_refl = None then str " (" else str " and ") ++ - str "symmetry proved by " ++ pr_lconstr t) ++ + (if th'.rel_refl = None then strbrk " (" else strbrk " and ") + ++ strbrk "symmetry proved by " ++ pr_lconstr t) ++ (if th'.rel_refl <> None && th'.rel_sym <> None then str ")" else str "") ++ - str " replaces the old declaration" ++ + strbrk " replaces the old declaration" ++ (match old_relation.rel_refl with None -> str "" - | Some t -> str " (reflevity proved by " ++ pr_lconstr t) ++ + | Some t -> strbrk " (reflexivity proved by " ++ pr_lconstr t) ++ (match old_relation.rel_sym with None -> str "" | Some t -> (if old_relation.rel_refl = None then - str " (" else str " and ") ++ - str "symmetry proved by " ++ pr_lconstr t) ++ + strbrk " (" else strbrk " and ") ++ + strbrk "symmetry proved by " ++ pr_lconstr t) ++ (if old_relation.rel_refl <> None && old_relation.rel_sym <> None then str ")" else str "") ++ str "."); @@ -410,12 +414,12 @@ let morphism_table_add (m,c) = List.find (function mor -> mor.args = c.args && mor.output = c.output) old in - ppnl - (str "Warning: The morphism " ++ prmorphism m old_morph ++ - str " is redeclared. " ++ - str "The new declaration whose compatibility is proved by " ++ - pr_lconstr c.lem ++ str " replaces the old declaration whose" ++ - str " compatibility was proved by " ++ + Flags.if_warn msg_warning + (strbrk "The morphism " ++ prmorphism m old_morph ++ + strbrk " is redeclared. " ++ + strbrk "The new declaration whose compatibility is proved by " ++ + pr_lconstr c.lem ++ strbrk " replaces the old declaration whose" ++ + strbrk " compatibility was proved by " ++ pr_lconstr old_morph.lem ++ str ".") with Not_found -> morphism_table := Gmap.add m (c::old) !morphism_table @@ -425,10 +429,10 @@ let default_morphism ?(filter=fun _ -> true) m = [] -> raise Not_found | m1::ml -> if ml <> [] then - ppnl - (str "Warning: There are several morphisms associated to \"" ++ - pr_lconstr m ++ str"\". Morphism " ++ prmorphism m m1 ++ - str " is randomly chosen."); + Flags.if_warn msg_warning + (strbrk "There are several morphisms associated to \"" ++ + pr_lconstr m ++ strbrk "\". Morphism " ++ prmorphism m m1 ++ + strbrk " is randomly chosen."); relation_morphism_of_constr_morphism m1 let subst_morph subst morph = @@ -638,9 +642,9 @@ let apply_to_relation subst rel = assert (new_quantifiers_no >= 0) ; { rel_a = mkApp (rel.rel_a, subst) ; rel_aeq = mkApp (rel.rel_aeq, subst) ; - rel_refl = option_map (fun c -> mkApp (c,subst)) rel.rel_refl ; - rel_sym = option_map (fun c -> mkApp (c,subst)) rel.rel_sym; - rel_trans = option_map (fun c -> mkApp (c,subst)) rel.rel_trans; + rel_refl = Option.map (fun c -> mkApp (c,subst)) rel.rel_refl ; + rel_sym = Option.map (fun c -> mkApp (c,subst)) rel.rel_sym; + rel_trans = Option.map (fun c -> mkApp (c,subst)) rel.rel_trans; rel_quantifiers_no = new_quantifiers_no; rel_X_relation_class = mkApp (rel.rel_X_relation_class, subst); rel_Xreflexive_relation_class = @@ -687,7 +691,7 @@ let add_morphism lemma_infos mor_name (m,quantifiers_rev,args,output) = apply_to_rels mext quantifiers_rev |])); const_entry_type = None; const_entry_opaque = false; - const_entry_boxed = Options.boxed_definitions()}, + const_entry_boxed = Flags.boxed_definitions()}, IsDefinition Definition)) ; mext in @@ -703,17 +707,18 @@ let add_morphism lemma_infos mor_name (m,quantifiers_rev,args,output) = output = output_constr; lem = lem; morphism_theory = mmor })); - Options.if_verbose ppnl (pr_lconstr m ++ str " is registered as a morphism") + Flags.if_verbose ppnl (pr_lconstr m ++ str " is registered as a morphism") + +let error_cannot_unify_signature env k t t' = + errorlabstrm "New Morphism" + (str "One morphism argument or its output has type" ++ spc() ++ + pr_lconstr_env env t ++ strbrk " but the signature requires an argument" ++ + (if k = 0 then strbrk " of type " else + strbrk "whose type is an instance of ") ++ pr_lconstr_env env t' ++ + str ".") (* first order matching with a bit of conversion *) let unify_relation_carrier_with_type env rel t = - let raise_error quantifiers_no = - errorlabstrm "New Morphism" - (str "One morphism argument or its output has type " ++ - pr_lconstr_env env t ++ - str " but the signature requires an argument of type \"" ++ - pr_lconstr_env env rel.rel_a ++ prvect_with_sep mt (fun _ -> str " ?") - (Array.make quantifiers_no 0) ++ str "\"") in let args = match kind_of_term t with App (he',args') -> @@ -723,31 +728,15 @@ let unify_relation_carrier_with_type env rel t = if is_conv env Evd.empty rel.rel_a (mkApp (he',args1)) then args2 else - raise_error rel.rel_quantifiers_no + error_cannot_unify_signature env rel.rel_quantifiers_no t rel.rel_a | _ -> - if rel.rel_quantifiers_no = 0 && is_conv env Evd.empty rel.rel_a t then - [||] - else - begin - let evars,args,instantiated_rel_a = - let ty = Typing.type_of env Evd.empty rel.rel_a in - let evd = Evd.create_evar_defs Evd.empty in - let evars,args,concl = - Clenv.clenv_environments_evars env evd - (Some rel.rel_quantifiers_no) ty - in - evars, args, - nf_betaiota - (match args with [] -> rel.rel_a | _ -> applist (rel.rel_a,args)) - in - let evars' = - w_unify true (*??? or false? *) env Reduction.CONV (*??? or cumul? *) - ~mod_delta:true (*??? or true? *) t instantiated_rel_a evars in - let args' = - List.map (Reductionops.nf_evar (Evd.evars_of evars')) args - in - Array.of_list args' - end + try + let args = + Clenv.clenv_conv_leq env Evd.empty t rel.rel_a rel.rel_quantifiers_no + in + Array.of_list args + with Reduction.NotConvertible -> + error_cannot_unify_signature env rel.rel_quantifiers_no t rel.rel_a in apply_to_relation args rel @@ -757,11 +746,7 @@ let unify_relation_class_carrier_with_type env rel t = if is_conv env Evd.empty t t' then rel else - errorlabstrm "New Morphism" - (str "One morphism argument or its output has type " ++ - pr_lconstr_env env t ++ - str " but the signature requires an argument of type " ++ - pr_lconstr_env env t') + error_cannot_unify_signature env 0 t t' | Leibniz None -> Leibniz (Some t) | Relation rel -> Relation (unify_relation_carrier_with_type env rel t) @@ -863,7 +848,7 @@ let new_morphism m signature id hook = if number_of_quantifiers < 0 then errorlabstrm "New Morphism" (str "The morphism " ++ pr_lconstr m ++ str " has type " ++ - pr_lconstr typeofm ++ str " that attends at most " ++ int args_ty_len ++ + pr_lconstr typeofm ++ str " that expects at most " ++ int args_ty_len ++ str " arguments. The signature that you specified requires " ++ int number_of_arguments ++ str " arguments.") else @@ -922,12 +907,12 @@ let new_morphism m signature id hook = (Closure.unfold_red(Lazy.force coq_make_compatibility_goal_aux_eval_ref)) env Evd.empty lem in (* "simpl" *) - let lem = Tacred.nf env Evd.empty lem in + let lem = Tacred.simpl env Evd.empty lem in if Lib.is_modtype () then begin ignore (Declare.declare_internal_constant id - (ParameterEntry lem, IsAssumption Logical)) ; + (ParameterEntry (lem,false), IsAssumption Logical)) ; let mor_name = morphism_theory_id_of_morphism_proof_id id in let lemma_infos = Some (id,argsconstr,outputconstr) in add_morphism lemma_infos mor_name @@ -938,9 +923,9 @@ let new_morphism m signature id hook = new_edited id (m,args_ty_quantifiers_rev,args,argsconstr,output,outputconstr); Pfedit.start_proof id (Global, Proof Lemma) - (Declare.clear_proofs (Global.named_context ())) + (Decls.clear_proofs (Global.named_context ())) lem hook; - Options.if_verbose msg (Printer.pr_open_subgoals ()); + Flags.if_verbose msg (Printer.pr_open_subgoals ()); end let morphism_hook _ ref = @@ -960,6 +945,7 @@ type morphism_signature = (bool option * Topconstr.constr_expr) list * Topconstr.constr_expr let new_named_morphism id m sign = + Coqlib.check_required_library ["Coq";"Setoids";"Setoid_tac"]; let sign = match sign with None -> None @@ -1028,9 +1014,9 @@ let int_add_relation id a aeq refl sym trans = let env = Global.env () in let a_quantifiers_rev = check_a env a in check_eq env a_quantifiers_rev a aeq ; - option_iter (check_refl env a_quantifiers_rev a aeq) refl ; - option_iter (check_sym env a_quantifiers_rev a aeq) sym ; - option_iter (check_trans env a_quantifiers_rev a aeq) trans ; + Option.iter (check_refl env a_quantifiers_rev a aeq) refl ; + Option.iter (check_sym env a_quantifiers_rev a aeq) sym ; + Option.iter (check_trans env a_quantifiers_rev a aeq) trans ; let quantifiers_no = List.length a_quantifiers_rev in let aeq_rel = { rel_a = a; @@ -1059,7 +1045,7 @@ let int_add_relation id a aeq refl sym trans = a_quantifiers_rev); const_entry_type = None; const_entry_opaque = false; - const_entry_boxed = Options.boxed_definitions()}, + const_entry_boxed = Flags.boxed_definitions()}, IsDefinition Definition) in let id_precise = id_of_string (string_of_id id ^ "_precise_relation_class") in let xreflexive_relation_class = @@ -1076,14 +1062,14 @@ let int_add_relation id a aeq refl sym trans = Sign.it_mkLambda_or_LetIn xreflexive_relation_class a_quantifiers_rev; const_entry_type = None; const_entry_opaque = false; - const_entry_boxed = Options.boxed_definitions() }, + const_entry_boxed = Flags.boxed_definitions() }, IsDefinition Definition) in let aeq_rel = { aeq_rel with rel_X_relation_class = current_constant id; rel_Xreflexive_relation_class = current_constant id_precise } in Lib.add_anonymous_leaf (relation_to_obj (aeq, aeq_rel)) ; - Options.if_verbose ppnl (pr_lconstr aeq ++ str " is registered as a relation"); + Flags.if_verbose ppnl (pr_lconstr aeq ++ str " is registered as a relation"); match trans with None -> () | Some trans -> @@ -1091,9 +1077,9 @@ let int_add_relation id a aeq refl sym trans = let a_instance = apply_to_rels a a_quantifiers_rev in let aeq_instance = apply_to_rels aeq a_quantifiers_rev in let sym_instance = - option_map (fun x -> apply_to_rels x a_quantifiers_rev) sym in + Option.map (fun x -> apply_to_rels x a_quantifiers_rev) sym in let refl_instance = - option_map (fun x -> apply_to_rels x a_quantifiers_rev) refl in + Option.map (fun x -> apply_to_rels x a_quantifiers_rev) refl in let trans_instance = apply_to_rels trans a_quantifiers_rev in let aeq_rel_class_and_var1, aeq_rel_class_and_var2, lemma, output = match sym_instance, refl_instance with @@ -1136,7 +1122,7 @@ let int_add_relation id a aeq refl sym trans = {const_entry_body = Sign.it_mkLambda_or_LetIn lemma a_quantifiers_rev; const_entry_type = None; const_entry_opaque = false; - const_entry_boxed = Options.boxed_definitions()}, + const_entry_boxed = Flags.boxed_definitions()}, IsDefinition Definition) in let a_quantifiers_rev = @@ -1147,21 +1133,23 @@ let int_add_relation id a aeq refl sym trans = (* The vernac command "Add Relation ..." *) let add_relation id a aeq refl sym trans = - int_add_relation id (constr_of a) (constr_of aeq) (option_map constr_of refl) - (option_map constr_of sym) (option_map constr_of trans) + Coqlib.check_required_library ["Coq";"Setoids";"Setoid_tac"]; + int_add_relation id (constr_of a) (constr_of aeq) (Option.map constr_of refl) + (Option.map constr_of sym) (Option.map constr_of trans) (************************ Add Setoid ******************************************) (* The vernac command "Add Setoid" *) let add_setoid id a aeq th = - let a = constr_of a in - let aeq = constr_of aeq in - let th = constr_of th in - let env = Global.env () in - let a_quantifiers_rev = check_a env a in + Coqlib.check_required_library ["Coq";"Setoids";"Setoid_tac"]; + let a = constr_of a in + let aeq = constr_of aeq in + let th = constr_of th in + let env = Global.env () in + let a_quantifiers_rev = check_a env a in check_eq env a_quantifiers_rev a aeq ; check_setoid_theory env a_quantifiers_rev a aeq th ; - let a_instance = apply_to_rels a a_quantifiers_rev in + let a_instance = apply_to_rels a a_quantifiers_rev in let aeq_instance = apply_to_rels aeq a_quantifiers_rev in let th_instance = apply_to_rels th a_quantifiers_rev in let refl = @@ -1478,12 +1466,9 @@ let mark_occur gl ~new_goals t in_c input_relation input_direction = (MApp (func,mor,a,output_direction))) output_directions @ res ) [] a' - | (he::tl) as a-> + | (he::tl) -> let typnf = Reduction.whd_betadeltaiota env typ in match kind_of_term typnf with - Cast (typ,_,_) -> - find_non_dependent_function env c c_args_rev typ - f_args_rev a_rev a | Prod (name,s,t) -> let env' = push_rel (name,None,s) env in let he = @@ -1578,12 +1563,12 @@ let mark_occur gl ~new_goals t in_c input_relation input_direction = match res' with [] when res = [] -> errorlabstrm "Setoid_rewrite" - (str "Either the term " ++ pr_lconstr t ++ str " that must be " ++ - str "rewritten occurs in a covariant position or the goal is not " ++ - str "made of morphism applications only. You can replace only " ++ - str "occurrences that are in a contravariant position and such that " ++ - str "the context obtained by abstracting them is made of morphism " ++ - str "applications only.") + (strbrk "Either the term " ++ pr_lconstr t ++ strbrk " that must be " ++ + strbrk "rewritten occurs in a covariant position or the goal is not" ++ + strbrk " made of morphism applications only. You can replace only " ++ + strbrk "occurrences that are in a contravariant position and such " ++ + strbrk "that the context obtained by abstracting them is made of " ++ + strbrk "morphism applications only.") | [] -> errorlabstrm "Setoid_rewrite" (str "No generated set of side conditions is a superset of those " ++ @@ -1594,16 +1579,16 @@ let mark_occur gl ~new_goals t in_c input_relation input_direction = (fun i (_,_,mc) -> pr_new_goals i mc) res) | [he] -> he | he::_ -> - ppnl - (str "Warning: The application of the tactic is subject to one of " ++ - str "the \nfollowing set of side conditions that the user needs " ++ - str "to prove:" ++ + Flags.if_warn msg_warning + (strbrk "The application of the tactic is subject to one of " ++ + strbrk "the following set of side conditions that the user needs " ++ + strbrk "to prove:" ++ pr_fnl () ++ prlist_with_sepi pr_fnl (fun i (_,_,mc) -> pr_new_goals i mc) res' ++ pr_fnl () ++ - str "The first set is randomly chosen. Use the syntax " ++ - str "\"setoid_rewrite ... generate side conditions ...\" to choose " ++ - str "a different set.") ; + strbrk "The first set is randomly chosen. Use the syntax " ++ + strbrk "\"setoid_rewrite ... generate side conditions ...\" to choose " ++ + strbrk "a different set.") ; he let cic_morphism_context_list_of_list hole_relation hole_direction out_direction @@ -1727,14 +1712,14 @@ let check_evar_map_of_evars_defs evd = Evd.Metaset.iter (fun m -> if Evd.meta_defined evd m then () else - raise (Logic.RefinerError (Logic.OccurMetaGoal rebus))) + raise (Logic.RefinerError (Logic.UnresolvedBindings [Evd.meta_name evd m]))) in List.iter (fun (_,binding) -> match binding with Evd.Cltyp (_,{Evd.rebus=rebus; Evd.freemetas=freemetas}) -> check_freemetas_is_empty rebus freemetas - | Evd.Clval (_,{Evd.rebus=rebus1; Evd.freemetas=freemetas1}, + | Evd.Clval (_,({Evd.rebus=rebus1; Evd.freemetas=freemetas1},_), {Evd.rebus=rebus2; Evd.freemetas=freemetas2}) -> check_freemetas_is_empty rebus1 freemetas1 ; check_freemetas_is_empty rebus2 freemetas2 @@ -1746,20 +1731,33 @@ let check_evar_map_of_evars_defs evd = (* [unification_rewrite] searchs a match for [c1] in [but] and then returns the modified objects (in particular [c1] and [c2]) *) +let rewrite_unif_flags = { + modulo_conv_on_closed_terms = None; + use_metas_eagerly = true; + modulo_delta = empty_transparent_state; +} + +let rewrite2_unif_flags = { + modulo_conv_on_closed_terms = Some full_transparent_state; + use_metas_eagerly = true; + modulo_delta = empty_transparent_state; +} + let unification_rewrite c1 c2 cl but gl = let (env',c1) = try - (* ~mod_delta:false to allow to mark occurences that must not be + (* ~flags:(false,true) to allow to mark occurences that must not be rewritten simply by replacing them with let-defined definitions in the context *) - w_unify_to_subterm ~mod_delta:false (pf_env gl) (c1,but) cl.env + w_unify_to_subterm ~flags:rewrite_unif_flags (pf_env gl) (c1,but) cl.evd with Pretype_errors.PretypeError _ -> - (* ~mod_delta:true to make Ring work (since it really + (* ~flags:(true,true) to make Ring work (since it really exploits conversion) *) - w_unify_to_subterm ~mod_delta:true (pf_env gl) (c1,but) cl.env + w_unify_to_subterm ~flags:rewrite2_unif_flags + (pf_env gl) (c1,but) cl.evd in - let cl' = {cl with env = env' } in + let cl' = {cl with evd = env' } in let c2 = Clenv.clenv_nf_meta cl' c2 in check_evar_map_of_evars_defs env' ; env',Clenv.clenv_value cl', c1, c2 @@ -1808,7 +1806,7 @@ let relation_rewrite_no_unif c1 c2 hyp ~new_goals sigma gl = if_output_relation_is_if gl with Optimize -> - !general_rewrite (fst hyp = Left2Right) (snd hyp) gl + !general_rewrite (fst hyp = Left2Right) all_occurrences (snd hyp) gl let relation_rewrite c1 c2 (input_direction,cl) ~new_goals gl = let (sigma,cl,c1,c2) = unification_rewrite c1 c2 cl (pf_concl gl) gl in @@ -1826,7 +1824,9 @@ let analyse_hypothesis gl c = let others,(c1,c2) = split_last_two args in eqclause,mkApp (equiv, Array.of_list others),c1,c2 -let general_s_rewrite lft2rgt c ~new_goals gl = +let general_s_rewrite lft2rgt occs c ~new_goals gl = + if occs <> all_occurrences then + warning "Rewriting at selected occurrences not supported"; let eqclause,_,c1,c2 = analyse_hypothesis gl c in if lft2rgt then relation_rewrite c1 c2 (Left2Right,eqclause) ~new_goals gl @@ -1863,7 +1863,9 @@ let relation_rewrite_in id c1 c2 (direction,eqclause) ~new_goals gl = (relation_rewrite_no_unif c2 c1 (oppdir,cl) ~new_goals sigma)))) gl -let general_s_rewrite_in id lft2rgt c ~new_goals gl = +let general_s_rewrite_in id lft2rgt occs c ~new_goals gl = + if occs <> all_occurrences then + warning "Rewriting at selected occurrences not supported"; let eqclause,_,c1,c2 = analyse_hypothesis gl c in if lft2rgt then relation_rewrite_in id c1 c2 (Left2Right,eqclause) ~new_goals gl @@ -1918,7 +1920,7 @@ let general_setoid_replace rewrite_tac try_prove_eq_tac_opt relation c1 c2 ~new_ tclTHENS (assert_tac false Anonymous eq) [onLastHyp (fun id -> tclTHEN - (rewrite_tac dir (mkVar id) ~new_goals) + (rewrite_tac dir all_occurrences (mkVar id) ~new_goals) (clear [id])); try_prove_eq_tac] in @@ -1930,7 +1932,7 @@ let general_setoid_replace rewrite_tac try_prove_eq_tac_opt relation c1 c2 ~new_ tclTHENS (assert_tac false Anonymous eq) [onLastHyp (fun id -> tclTHEN - (rewrite_tac false (mkVar id) ~new_goals) + (rewrite_tac false all_occurrences (mkVar id) ~new_goals) (clear [id])); try_prove_eq_tac] gl @@ -2019,7 +2021,3 @@ let setoid_transitivity c gl = Optimize -> transitivity_red true c gl ;; -Tactics.register_setoid_reflexivity setoid_reflexivity;; -Tactics.register_setoid_symmetry setoid_symmetry;; -Tactics.register_setoid_symmetry_in setoid_symmetry_in;; -Tactics.register_setoid_transitivity setoid_transitivity;; diff --git a/tactics/setoid_replace.mli b/tactics/setoid_replace.mli index eb71f68e..6d736a0a 100644 --- a/tactics/setoid_replace.mli +++ b/tactics/setoid_replace.mli @@ -6,12 +6,13 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: setoid_replace.mli 9073 2006-08-22 08:54:29Z jforest $ i*) +(*i $Id: setoid_replace.mli 11094 2008-06-10 19:35:23Z herbelin $ i*) open Term open Proof_type open Topconstr open Names +open Termops type relation = { rel_a: constr ; @@ -40,7 +41,7 @@ type morphism_signature = (bool option * constr_expr) list * constr_expr val pr_morphism_signature : morphism_signature -> Pp.std_ppcmds val register_replace : (tactic option -> constr -> constr -> tactic) -> unit -val register_general_rewrite : (bool -> constr -> tactic) -> unit +val register_general_rewrite : (bool -> occurrences -> constr -> tactic) -> unit val print_setoids : unit -> unit @@ -58,9 +59,10 @@ val setoid_replace_in : identifier -> constr option -> constr -> constr -> new_goals:constr list -> tactic -val general_s_rewrite : bool -> constr -> new_goals:constr list -> tactic +val general_s_rewrite : + bool -> occurrences -> constr -> new_goals:constr list -> tactic val general_s_rewrite_in : - identifier -> bool -> constr -> new_goals:constr list -> tactic + identifier -> bool -> occurrences -> constr -> new_goals:constr list -> tactic val setoid_reflexivity : tactic val setoid_symmetry : tactic @@ -79,3 +81,5 @@ val new_named_morphism : val relation_table_find : constr -> relation val relation_table_mem : constr -> bool + +val prrelation : relation -> Pp.std_ppcmds diff --git a/tactics/tacinterp.ml b/tactics/tacinterp.ml index 37b3cbcb..f4547930 100644 --- a/tactics/tacinterp.ml +++ b/tactics/tacinterp.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: tacinterp.ml 10135 2007-09-21 14:28:12Z herbelin $ *) +(* $Id: tacinterp.ml 11166 2008-06-22 13:23:35Z herbelin $ *) open Constrintern open Closure @@ -59,6 +59,8 @@ let error_syntactic_metavariables_not_allowed loc = (loc,"out_ident", str "Syntactic metavariables allowed only in quotations") +let error_global_not_found_loc (loc,qid) = error_global_not_found_loc loc qid + let skip_metaid = function | AI x -> x | MetaId (loc,_) -> error_syntactic_metavariables_not_allowed loc @@ -82,7 +84,7 @@ type value = | VConstr of constr (* includes idents known to be bound and references *) | VConstr_context of constr | VList of value list - | VRec of value ref + | VRec of (identifier*value) list ref * glob_tactic_expr let locate_tactic_call loc = function | VTactic (_,t) -> VTactic (loc,t) @@ -101,8 +103,11 @@ let catch_error loc tac g = (* Signature for interpretation: val_interp and interpretation functions *) type interp_sign = - { lfun : (identifier * value) list; - debug : debug_info } + { lfun : (identifier * value) list; + avoid_ids : identifier list; (* ids inherited from the call context + (needed to get fresh ids) *) + debug : debug_info; + last_loc : loc } let check_is_value = function | VRTactic _ -> (* These are goals produced by Match *) @@ -199,7 +204,7 @@ let add_primitive_tactic s tac = atomic_mactab := Idmap.add id tac !atomic_mactab let _ = - let nocl = {onhyps=Some[];onconcl=true; concl_occs=[]} in + let nocl = {onhyps=Some[];concl_occs=all_occurrences_expr} in List.iter (fun (s,t) -> add_primitive_tactic s (TacAtom(dloc,t))) [ "red", TacReduce(Red false,nocl); @@ -212,10 +217,14 @@ let _ = "cofix", TacCofix None; "trivial", TacTrivial ([],None); "auto", TacAuto(None,[],None); - "left", TacLeft NoBindings; - "right", TacRight NoBindings; - "split", TacSplit(false,NoBindings); - "constructor", TacAnyConstructor None; + "left", TacLeft(false,NoBindings); + "eleft", TacLeft(true,NoBindings); + "right", TacRight(false,NoBindings); + "eright", TacRight(true,NoBindings); + "split", TacSplit(false,false,NoBindings); + "esplit", TacSplit(true,false,NoBindings); + "constructor", TacAnyConstructor (false,None); + "econstructor", TacAnyConstructor (true,None); "reflexivity", TacReflexivity; "symmetry", TacSymmetry nocl ]; @@ -227,10 +236,9 @@ let _ = ] let lookup_atomic id = Idmap.find id !atomic_mactab -let is_atomic id = Idmap.mem id !atomic_mactab let is_atomic_kn kn = let (_,_,l) = repr_kn kn in - is_atomic (id_of_label l) + Idmap.mem (id_of_label l) !atomic_mactab (* Summary and Object declaration *) let mactab = ref Gmap.empty @@ -288,7 +296,7 @@ type glob_sign = { type interp_genarg_type = (glob_sign -> raw_generic_argument -> glob_generic_argument) * (interp_sign -> goal sigma -> glob_generic_argument -> - closed_generic_argument) * + typed_generic_argument) * (substitution -> glob_generic_argument -> glob_generic_argument) let extragenargtab = @@ -305,7 +313,6 @@ let lookup_genarg_subst id = let (_,_,f) = lookup_genarg id in f (* Dynamically check that an argument is a tactic, possibly unboxing VRec *) let coerce_to_tactic loc id = function - | VRec v -> !v | VTactic _ | VFun _ | VRTactic _ as a -> a | _ -> user_err_loc (loc, "", str "variable " ++ pr_id id ++ str " should be bound to a tactic") @@ -373,52 +380,105 @@ let intern_or_var ist = function | ArgVar locid -> ArgVar (intern_hyp ist locid) | ArgArg _ as x -> x +let loc_of_by_notation f = function + | AN c -> f c + | ByNotation (loc,s) -> loc + +let destIndRef = function IndRef ind -> ind | _ -> failwith "destIndRef" + +let intern_inductive_or_by_notation = function + | AN r -> Nametab.inductive_of_reference r + | ByNotation (loc,ntn) -> + destIndRef (Notation.interp_notation_as_global_reference loc + (function IndRef ind -> true | _ -> false) ntn) + let intern_inductive ist = function - | Ident (loc,id) when find_var id ist -> ArgVar (loc,id) - | r -> ArgArg (Nametab.global_inductive r) + | AN (Ident (loc,id)) when find_var id ist -> ArgVar (loc,id) + | r -> ArgArg (intern_inductive_or_by_notation r) let intern_global_reference ist = function | Ident (loc,id) when find_var id ist -> ArgVar (loc,id) | r -> - let loc,qid = qualid_of_reference r in - try ArgArg (loc,locate_global qid) - with _ -> - error_global_not_found_loc loc qid + let loc,_ as lqid = qualid_of_reference r in + try ArgArg (loc,locate_global_with_alias lqid) + with Not_found -> + error_global_not_found_loc lqid -let intern_tac_ref ist = function - | Ident (loc,id) when find_ltacvar id ist -> ArgVar (loc,id) +let intern_ltac_variable ist = function | Ident (loc,id) -> - ArgArg (loc, - try find_recvar id ist - with Not_found -> locate_tactic (make_short_qualid id)) - | r -> - let (loc,qid) = qualid_of_reference r in - ArgArg (loc,locate_tactic qid) - -let intern_tactic_reference ist r = - try intern_tac_ref ist r - with Not_found -> - let (loc,qid) = qualid_of_reference r in - error_global_not_found_loc loc qid + if find_ltacvar id ist then + (* A local variable of any type *) + ArgVar (loc,id) + else + (* A recursive variable *) + ArgArg (loc,find_recvar id ist) + | _ -> + raise Not_found let intern_constr_reference strict ist = function | Ident (_,id) when (not strict & find_hyp id ist) or find_ctxvar id ist -> RVar (dloc,id), None | r -> - let loc,qid = qualid_of_reference r in - RRef (loc,locate_global qid), if strict then None else Some (CRef r) - -let intern_reference strict ist r = - (try Reference (intern_tac_ref ist r) - with Not_found -> - (try ConstrMayEval (ConstrTerm (intern_constr_reference strict ist r)) - with Not_found -> - (match r with - | Ident (loc,id) when is_atomic id -> Tacexp (lookup_atomic id) - | Ident (loc,id) when not strict -> IntroPattern (IntroIdentifier id) - | _ -> - let (loc,qid) = qualid_of_reference r in - error_global_not_found_loc loc qid))) + let loc,_ as lqid = qualid_of_reference r in + RRef (loc,locate_global_with_alias lqid), if strict then None else Some (CRef r) + +(* Internalize an isolated reference in position of tactic *) + +let intern_isolated_global_tactic_reference r = + let (loc,qid) = qualid_of_reference r in + try TacCall (loc,ArgArg (loc,locate_tactic qid),[]) + with Not_found -> + match r with + | Ident (_,id) -> Tacexp (lookup_atomic id) + | _ -> raise Not_found + +let intern_isolated_tactic_reference ist r = + (* An ltac reference *) + try Reference (intern_ltac_variable ist r) + with Not_found -> + (* A global tactic *) + try intern_isolated_global_tactic_reference r + with Not_found -> + (* Tolerance for compatibility, allow not to use "constr:" *) + try ConstrMayEval (ConstrTerm (intern_constr_reference true ist r)) + with Not_found -> + (* Reference not found *) + error_global_not_found_loc (qualid_of_reference r) + +(* Internalize an applied tactic reference *) + +let intern_applied_global_tactic_reference r = + let (loc,qid) = qualid_of_reference r in + ArgArg (loc,locate_tactic qid) + +let intern_applied_tactic_reference ist r = + (* An ltac reference *) + try intern_ltac_variable ist r + with Not_found -> + (* A global tactic *) + try intern_applied_global_tactic_reference r + with Not_found -> + (* Reference not found *) + error_global_not_found_loc (qualid_of_reference r) + +(* Intern a reference parsed in a non-tactic entry *) + +let intern_non_tactic_reference strict ist r = + (* An ltac reference *) + try Reference (intern_ltac_variable ist r) + with Not_found -> + (* A constr reference *) + try ConstrMayEval (ConstrTerm (intern_constr_reference strict ist r)) + with Not_found -> + (* Tolerance for compatibility, allow not to use "ltac:" *) + try intern_isolated_global_tactic_reference r + with Not_found -> + (* By convention, use IntroIdentifier for unbound ident, when not in a def *) + match r with + | Ident (_,id) when not strict -> IntroPattern (IntroIdentifier id) + | _ -> + (* Reference not found *) + error_global_not_found_loc (qualid_of_reference r) let intern_message_token ist = function | (MsgString _ | MsgInt _ as x) -> x @@ -431,7 +491,7 @@ let rec intern_intro_pattern lf ist = function IntroOrAndPattern (intern_case_intro_pattern lf ist l) | IntroIdentifier id -> IntroIdentifier (intern_ident lf ist id) - | IntroWildcard | IntroAnonymous as x -> x + | IntroWildcard | IntroAnonymous | IntroFresh _ | IntroRewrite _ as x -> x and intern_case_intro_pattern lf ist = List.map (List.map (intern_intro_pattern lf ist)) @@ -478,53 +538,64 @@ let intern_clause_pattern ist (l,occl) = (* TODO: catch ltac vars *) let intern_induction_arg ist = function - | ElimOnConstr c -> ElimOnConstr (intern_constr ist c) + | ElimOnConstr c -> ElimOnConstr (intern_constr_with_bindings ist c) | ElimOnAnonHyp n as x -> x | ElimOnIdent (loc,id) -> if !strict_check then (* If in a defined tactic, no intros-until *) - ElimOnConstr (intern_constr ist (CRef (Ident (dloc,id)))) + ElimOnConstr (intern_constr ist (CRef (Ident (dloc,id))),NoBindings) else ElimOnIdent (loc,id) +let evaluable_of_global_reference = function + | ConstRef c -> EvalConstRef c + | VarRef c -> EvalVarRef c + | r -> error_not_evaluable (pr_global r) + +let short_name = function + | AN (Ident (loc,id)) when not !strict_check -> Some (loc,id) + | _ -> None + +let interp_global_reference r = + let lqid = qualid_of_reference r in + try locate_global_with_alias lqid + with Not_found -> + match r with + | Ident (loc,id) when not !strict_check -> VarRef id + | _ -> error_global_not_found_loc lqid + +let intern_evaluable_reference_or_by_notation = function + | AN r -> evaluable_of_global_reference (interp_global_reference r) + | ByNotation (loc,ntn) -> + evaluable_of_global_reference + (Notation.interp_notation_as_global_reference loc + (function ConstRef _ | VarRef _ -> true | _ -> false) ntn) + (* Globalizes a reduction expression *) let intern_evaluable ist = function - | Ident (loc,id) when find_ltacvar id ist -> ArgVar (loc,id) - | Ident (_,id) when + | AN (Ident (loc,id)) when find_ltacvar id ist -> ArgVar (loc,id) + | AN (Ident (_,id)) when (not !strict_check & find_hyp id ist) or find_ctxvar id ist -> ArgArg (EvalVarRef id, None) | r -> - let loc,qid = qualid_of_reference r in - try - let e = match locate_global qid with - | ConstRef c -> EvalConstRef c - | VarRef c -> EvalVarRef c - | _ -> error_not_evaluable (pr_reference r) in - let short_name = match r with - | Ident (loc,id) when not !strict_check -> Some (loc,id) - | _ -> None in - ArgArg (e,short_name) - with - | Not_found -> - match r with - | Ident (loc,id) when not !strict_check -> - ArgArg (EvalVarRef id, Some (loc,id)) - | _ -> error_global_not_found_loc loc qid + let e = intern_evaluable_reference_or_by_notation r in + let na = short_name r in + ArgArg (e,na) let intern_unfold ist (l,qid) = (l,intern_evaluable ist qid) let intern_flag ist red = { red with rConst = List.map (intern_evaluable ist) red.rConst } -let intern_constr_occurrence ist (l,c) = (l,intern_constr ist c) +let intern_constr_with_occurrences ist (l,c) = (l,intern_constr ist c) let intern_red_expr ist = function | Unfold l -> Unfold (List.map (intern_unfold ist) l) | Fold l -> Fold (List.map (intern_constr ist) l) | Cbv f -> Cbv (intern_flag ist f) | Lazy f -> Lazy (intern_flag ist f) - | Pattern l -> Pattern (List.map (intern_constr_occurrence ist) l) - | Simpl o -> Simpl (option_map (intern_constr_occurrence ist) o) + | Pattern l -> Pattern (List.map (intern_constr_with_occurrences ist) l) + | Simpl o -> Simpl (Option.map (intern_constr_with_occurrences ist) o) | (Red _ | Hnf | ExtraRedExpr _ | CbvVm as r ) -> r @@ -533,27 +604,27 @@ let intern_inversion_strength lf ist = function NonDepInversion (k,List.map (intern_hyp_or_metaid ist) idl, intern_intro_pattern lf ist ids) | DepInversion (k,copt,ids) -> - DepInversion (k, option_map (intern_constr ist) copt, + DepInversion (k, Option.map (intern_constr ist) copt, intern_intro_pattern lf ist ids) | InversionUsing (c,idl) -> InversionUsing (intern_constr ist c, List.map (intern_hyp_or_metaid ist) idl) (* Interprets an hypothesis name *) -let intern_hyp_location ist ((occs,id),hl) = - ((List.map (intern_or_var ist) occs,intern_hyp ist (skip_metaid id)), hl) +let intern_hyp_location ist (((b,occs),id),hl) = + (((b,List.map (intern_or_var ist) occs),intern_hyp ist (skip_metaid id)), hl) -let interp_constrpattern_gen sigma env ltacvar c = - let c = intern_gen false ~allow_soapp:true ~ltacvars:(ltacvar,[]) +let interp_constrpattern_gen sigma env ?(as_type=false) ltacvar c = + let c = intern_gen as_type ~allow_patvar:true ~ltacvars:(ltacvar,[]) sigma env c in pattern_of_rawconstr c (* Reads a pattern *) -let intern_pattern sigma env lfun = function +let intern_pattern sigma env ?(as_type=false) lfun = function | Subterm (ido,pc) -> let (metas,pat) = interp_constrpattern_gen sigma env lfun pc in ido, metas, Subterm (ido,pat) | Term pc -> - let (metas,pat) = interp_constrpattern_gen sigma env lfun pc in + let (metas,pat) = interp_constrpattern_gen sigma env ~as_type lfun pc in None, metas, Term pat let intern_constr_may_eval ist = function @@ -584,30 +655,16 @@ let extern_request ch req gl la = (* Reads the hypotheses of a Match Context rule *) let rec intern_match_context_hyps sigma env lfun = function | (Hyp ((_,na) as locna,mp))::tl -> - let ido, metas1, pat = intern_pattern sigma env lfun mp in + let ido, metas1, pat = intern_pattern sigma env ~as_type:true lfun mp in let lfun, metas2, hyps = intern_match_context_hyps sigma env lfun tl in - let lfun' = name_cons na (option_cons ido lfun) in + let lfun' = name_cons na (Option.List.cons ido lfun) in lfun', metas1@metas2, Hyp (locna,pat)::hyps | [] -> lfun, [], [] (* Utilities *) -let rec filter_some = function - | None :: l -> filter_some l - | Some a :: l -> a :: filter_some l - | [] -> [] - -let extract_names lrc = - List.fold_right - (fun ((loc,name),_) l -> - if List.mem name l then - user_err_loc - (loc, "intern_tactic", str "This variable is bound several times"); - name::l) - lrc [] - let extract_let_names lrc = List.fold_right - (fun ((loc,name),_,_) l -> + (fun ((loc,name),_) l -> if List.mem name l then user_err_loc (loc, "glob_tactic", str "This variable is bound several times"); @@ -615,10 +672,10 @@ let extract_let_names lrc = lrc [] let clause_app f = function - { onhyps=None; onconcl=b;concl_occs=nl } -> - { onhyps=None; onconcl=b; concl_occs=nl } - | { onhyps=Some l; onconcl=b;concl_occs=nl } -> - { onhyps=Some(List.map f l); onconcl=b;concl_occs=nl} + { onhyps=None; concl_occs=nl } -> + { onhyps=None; concl_occs=nl } + | { onhyps=Some l; concl_occs=nl } -> + { onhyps=Some(List.map f l); concl_occs=nl} (* Globalizes tactics : raw_tactic_expr -> glob_tactic_expr *) let rec intern_atomic lf ist x = @@ -628,70 +685,70 @@ let rec intern_atomic lf ist x = TacIntroPattern (List.map (intern_intro_pattern lf ist) l) | TacIntrosUntil hyp -> TacIntrosUntil (intern_quantified_hypothesis ist hyp) | TacIntroMove (ido,ido') -> - TacIntroMove (option_map (intern_ident lf ist) ido, - option_map (intern_hyp ist) ido') + TacIntroMove (Option.map (intern_ident lf ist) ido, + Option.map (intern_hyp ist) ido') | TacAssumption -> TacAssumption | TacExact c -> TacExact (intern_constr ist c) | TacExactNoCheck c -> TacExactNoCheck (intern_constr ist c) | TacVmCastNoCheck c -> TacVmCastNoCheck (intern_constr ist c) - | TacApply cb -> TacApply (intern_constr_with_bindings ist cb) - | TacElim (cb,cbo) -> - TacElim (intern_constr_with_bindings ist cb, - option_map (intern_constr_with_bindings ist) cbo) + | TacApply (a,ev,cb) -> TacApply (a,ev,intern_constr_with_bindings ist cb) + | TacElim (ev,cb,cbo) -> + TacElim (ev,intern_constr_with_bindings ist cb, + Option.map (intern_constr_with_bindings ist) cbo) | TacElimType c -> TacElimType (intern_type ist c) - | TacCase cb -> TacCase (intern_constr_with_bindings ist cb) + | TacCase (ev,cb) -> TacCase (ev,intern_constr_with_bindings ist cb) | TacCaseType c -> TacCaseType (intern_type ist c) - | TacFix (idopt,n) -> TacFix (option_map (intern_ident lf ist) idopt,n) - | TacMutualFix (id,n,l) -> + | TacFix (idopt,n) -> TacFix (Option.map (intern_ident lf ist) idopt,n) + | TacMutualFix (b,id,n,l) -> let f (id,n,c) = (intern_ident lf ist id,n,intern_type ist c) in - TacMutualFix (intern_ident lf ist id, n, List.map f l) - | TacCofix idopt -> TacCofix (option_map (intern_ident lf ist) idopt) - | TacMutualCofix (id,l) -> + TacMutualFix (b,intern_ident lf ist id, n, List.map f l) + | TacCofix idopt -> TacCofix (Option.map (intern_ident lf ist) idopt) + | TacMutualCofix (b,id,l) -> let f (id,c) = (intern_ident lf ist id,intern_type ist c) in - TacMutualCofix (intern_ident lf ist id, List.map f l) + TacMutualCofix (b,intern_ident lf ist id, List.map f l) | TacCut c -> TacCut (intern_type ist c) | TacAssert (otac,ipat,c) -> - TacAssert (option_map (intern_tactic ist) otac, + TacAssert (Option.map (intern_tactic ist) otac, intern_intro_pattern lf ist ipat, intern_constr_gen (otac<>None) ist c) - | TacGeneralize cl -> TacGeneralize (List.map (intern_constr ist) cl) + | TacGeneralize cl -> + TacGeneralize (List.map (fun (c,na) -> + intern_constr_with_occurrences ist c, + intern_name lf ist na) cl) | TacGeneralizeDep c -> TacGeneralizeDep (intern_constr ist c) - | TacLetTac (na,c,cls) -> + | TacLetTac (na,c,cls,b) -> let na = intern_name lf ist na in TacLetTac (na,intern_constr ist c, - (clause_app (intern_hyp_location ist) cls)) -(* | TacInstantiate (n,c,idh) -> - TacInstantiate (n,intern_constr ist c, - (match idh with - ConclLocation () -> ConclLocation () - | HypLocation (id,hloc) -> - HypLocation(intern_hyp_or_metaid ist id,hloc))) -*) + (clause_app (intern_hyp_location ist) cls),b) (* Automation tactics *) | TacTrivial (lems,l) -> TacTrivial (List.map (intern_constr ist) lems,l) | TacAuto (n,lems,l) -> - TacAuto (option_map (intern_or_var ist) n, + TacAuto (Option.map (intern_or_var ist) n, List.map (intern_constr ist) lems,l) | TacAutoTDB n -> TacAutoTDB n | TacDestructHyp (b,id) -> TacDestructHyp(b,intern_hyp ist id) | TacDestructConcl -> TacDestructConcl | TacSuperAuto (n,l,b1,b2) -> TacSuperAuto (n,l,b1,b2) - | TacDAuto (n,p) -> TacDAuto (option_map (intern_or_var ist) n,p) + | TacDAuto (n,p,lems) -> + TacDAuto (Option.map (intern_or_var ist) n,p, + List.map (intern_constr ist) lems) (* Derived basic tactics *) | TacSimpleInduction h -> TacSimpleInduction (intern_quantified_hypothesis ist h) - | TacNewInduction (lc,cbo,ids) -> - TacNewInduction (List.map (intern_induction_arg ist) lc, - option_map (intern_constr_with_bindings ist) cbo, - (intern_intro_pattern lf ist ids)) + | TacNewInduction (ev,lc,cbo,ids,cls) -> + TacNewInduction (ev,List.map (intern_induction_arg ist) lc, + Option.map (intern_constr_with_bindings ist) cbo, + intern_intro_pattern lf ist ids, + Option.map (clause_app (intern_hyp_location ist)) cls) | TacSimpleDestruct h -> TacSimpleDestruct (intern_quantified_hypothesis ist h) - | TacNewDestruct (c,cbo,ids) -> - TacNewDestruct (List.map (intern_induction_arg ist) c, - option_map (intern_constr_with_bindings ist) cbo, - (intern_intro_pattern lf ist ids)) + | TacNewDestruct (ev,c,cbo,ids,cls) -> + TacNewDestruct (ev,List.map (intern_induction_arg ist) c, + Option.map (intern_constr_with_bindings ist) cbo, + intern_intro_pattern lf ist ids, + Option.map (clause_app (intern_hyp_location ist)) cls) | TacDoubleInduction (h1,h2) -> let h1 = intern_quantified_hypothesis ist h1 in let h2 = intern_quantified_hypothesis ist h2 in @@ -708,21 +765,28 @@ let rec intern_atomic lf ist x = | TacClearBody l -> TacClearBody (List.map (intern_hyp_or_metaid ist) l) | TacMove (dep,id1,id2) -> TacMove (dep,intern_hyp_or_metaid ist id1,intern_hyp_or_metaid ist id2) - | TacRename (id1,id2) -> TacRename (intern_hyp_or_metaid ist id1, intern_hyp_or_metaid ist id2) - + | TacRename l -> + TacRename (List.map (fun (id1,id2) -> + intern_hyp_or_metaid ist id1, + intern_hyp_or_metaid ist id2) l) + | TacRevert l -> TacRevert (List.map (intern_hyp_or_metaid ist) l) + (* Constructors *) - | TacLeft bl -> TacLeft (intern_bindings ist bl) - | TacRight bl -> TacRight (intern_bindings ist bl) - | TacSplit (b,bl) -> TacSplit (b,intern_bindings ist bl) - | TacAnyConstructor t -> TacAnyConstructor (option_map (intern_tactic ist) t) - | TacConstructor (n,bl) -> TacConstructor (n, intern_bindings ist bl) + | TacLeft (ev,bl) -> TacLeft (ev,intern_bindings ist bl) + | TacRight (ev,bl) -> TacRight (ev,intern_bindings ist bl) + | TacSplit (ev,b,bl) -> TacSplit (ev,b,intern_bindings ist bl) + | TacAnyConstructor (ev,t) -> TacAnyConstructor (ev,Option.map (intern_tactic ist) t) + | TacConstructor (ev,n,bl) -> TacConstructor (ev,n,intern_bindings ist bl) (* Conversion *) | TacReduce (r,cl) -> TacReduce (intern_red_expr ist r, clause_app (intern_hyp_location ist) cl) | TacChange (occl,c,cl) -> - TacChange (option_map (intern_constr_occurrence ist) occl, - (if occl = None then intern_type ist c else intern_constr ist c), + TacChange (Option.map (intern_constr_with_occurrences ist) occl, + (if occl = None & (cl.onhyps = None or cl.onhyps = Some []) & + (cl.concl_occs = all_occurrences_expr or + cl.concl_occs = no_occurrences_expr) + then intern_type ist c else intern_constr ist c), clause_app (intern_hyp_location ist) cl) (* Equivalence relations *) @@ -732,9 +796,12 @@ let rec intern_atomic lf ist x = | TacTransitivity c -> TacTransitivity (intern_constr ist c) (* Equality and inversion *) - | TacRewrite (b,c,cl) -> - TacRewrite (b,intern_constr_with_bindings ist c, - clause_app (intern_hyp_location ist) cl) + | TacRewrite (ev,l,cl,by) -> + TacRewrite + (ev, + List.map (fun (b,m,c) -> (b,m,intern_constr_with_bindings ist c)) l, + clause_app (intern_hyp_location ist) cl, + Option.map (intern_tactic ist) by) | TacInversion (inv,hyp) -> TacInversion (intern_inversion_strength lf ist inv, intern_quantified_hypothesis ist hyp) @@ -756,19 +823,12 @@ and intern_tactic_seq ist = function let t = intern_atomic lf ist t in !lf, TacAtom (adjust_loc loc, t) | TacFun tacfun -> ist.ltacvars, TacFun (intern_tactic_fun ist tacfun) - | TacLetRecIn (lrc,u) -> - let names = extract_names lrc in + | TacLetIn (isrec,l,u) -> let (l1,l2) = ist.ltacvars in - let ist = { ist with ltacvars = (names@l1,l2) } in - let lrc = List.map (fun (n,b) -> (n,intern_tactic_fun ist b)) lrc in - ist.ltacvars, TacLetRecIn (lrc,intern_tactic ist u) - | TacLetIn (l,u) -> - let l = List.map - (fun (n,c,b) -> - (n,option_map (intern_tactic ist) c, intern_tacarg !strict_check ist b)) l in - let (l1,l2) = ist.ltacvars in - let ist' = { ist with ltacvars = ((extract_let_names l)@l1,l2) } in - ist.ltacvars, TacLetIn (l,intern_tactic ist' u) + let ist' = { ist with ltacvars = (extract_let_names l @ l1, l2) } in + let l = List.map (fun (n,b) -> + (n,intern_tacarg !strict_check (if isrec then ist' else ist) b)) l in + ist.ltacvars, TacLetIn (isrec,l,intern_tactic ist' u) | TacMatchContext (lz,lr,lmr) -> ist.ltacvars, TacMatchContext(lz,lr, intern_match_rule ist lmr) | TacMatch (lz,c,lmr) -> @@ -778,15 +838,21 @@ and intern_tactic_seq ist = function ist.ltacvars, TacFail (intern_or_var ist n,intern_message ist l) | TacProgress tac -> ist.ltacvars, TacProgress (intern_tactic ist tac) | TacAbstract (tac,s) -> ist.ltacvars, TacAbstract (intern_tactic ist tac,s) - | TacThen (t1,t2) -> + | TacThen (t1,[||],t2,[||]) -> let lfun', t1 = intern_tactic_seq ist t1 in let lfun'', t2 = intern_tactic_seq { ist with ltacvars = lfun' } t2 in - lfun'', TacThen (t1,t2) + lfun'', TacThen (t1,[||],t2,[||]) + | TacThen (t1,tf,t2,tl) -> + let lfun', t1 = intern_tactic_seq ist t1 in + let ist' = { ist with ltacvars = lfun' } in + (* Que faire en cas de (tac complexe avec Match et Thens; tac2) ?? *) + lfun', TacThen (t1,Array.map (intern_tactic ist') tf,intern_tactic ist' t2, + Array.map (intern_tactic ist') tl) | TacThens (t,tl) -> let lfun', t = intern_tactic_seq ist t in + let ist' = { ist with ltacvars = lfun' } in (* Que faire en cas de (tac complexe avec Match et Thens; tac2) ?? *) - lfun', - TacThens (t, List.map (intern_tactic { ist with ltacvars = lfun' }) tl) + lfun', TacThens (t, List.map (intern_tactic ist') tl) | TacDo (n,tac) -> ist.ltacvars, TacDo (intern_or_var ist n,intern_tactic ist tac) | TacTry tac -> ist.ltacvars, TacTry (intern_tactic ist tac) @@ -801,25 +867,28 @@ and intern_tactic_seq ist = function and intern_tactic_fun ist (var,body) = let (l1,l2) = ist.ltacvars in - let lfun' = List.rev_append (filter_some var) l1 in + let lfun' = List.rev_append (Option.List.flatten var) l1 in (var,intern_tactic { ist with ltacvars = (lfun',l2) } body) and intern_tacarg strict ist = function | TacVoid -> TacVoid - | Reference r -> intern_reference strict ist r + | Reference r -> intern_non_tactic_reference strict ist r | IntroPattern ipat -> let lf = ref([],[]) in (*How to know what names the intropattern binds?*) IntroPattern (intern_intro_pattern lf ist ipat) | Integer n -> Integer n | ConstrMayEval c -> ConstrMayEval (intern_constr_may_eval ist c) - | MetaIdArg (loc,s) -> + | MetaIdArg (loc,istac,s) -> (* $id can occur in Grammar tactic... *) let id = id_of_string s in - if find_ltacvar id ist then Reference (ArgVar (adjust_loc loc,id)) + if find_ltacvar id ist then + if istac then Reference (ArgVar (adjust_loc loc,id)) + else ConstrMayEval (ConstrTerm (RVar (adjust_loc loc,id), None)) else error_syntactic_metavariables_not_allowed loc + | TacCall (loc,f,[]) -> intern_isolated_tactic_reference ist f | TacCall (loc,f,l) -> TacCall (loc, - intern_tactic_reference ist f, + intern_applied_tactic_reference ist f, List.map (intern_tacarg !strict_check ist) l) | TacExternal (loc,com,req,la) -> TacExternal (loc,com,req,List.map (intern_tacarg !strict_check ist) la) @@ -840,7 +909,7 @@ and intern_match_rule ist = function let lfun',metas1,hyps = intern_match_context_hyps sigma env lfun rl in let ido,metas2,pat = intern_pattern sigma env lfun mp in let metas = list_uniquize (metas1@metas2) in - let ist' = { ist with ltacvars = (metas@(option_cons ido lfun'),l2) } in + let ist' = { ist with ltacvars = (metas@(Option.List.cons ido lfun'),l2) } in Pat (hyps,pat,intern_tactic ist' tc) :: (intern_match_rule ist tl) | [] -> [] @@ -1026,10 +1095,23 @@ let set_debug pos = debug := pos (* Gives the state of debug *) let get_debug () = !debug +let debugging_step ist pp = + match ist.debug with + | DebugOn lev -> + safe_msgnl (str "Level " ++ int lev ++ str": " ++ pp () ++ fnl()) + | _ -> () + +let debugging_exception_step ist signal_anomaly e pp = + let explain_exc = + if signal_anomaly then explain_logic_error + else explain_logic_error_no_anomaly in + debugging_step ist (fun () -> + pp() ++ spc() ++ str "raised the exception" ++ fnl() ++ !explain_exc e) + let error_ltac_variable loc id env v s = user_err_loc (loc, "", str "Ltac variable " ++ pr_id id ++ str " is bound to" ++ spc () ++ pr_value env v ++ spc () ++ - str "which cannot be coerced to " ++ str s) + strbrk "which cannot be coerced to " ++ str s) exception CannotCoerceTo of string @@ -1043,22 +1125,25 @@ let interp_ltac_var coerce ist env locid = with Not_found -> anomaly "Detected as ltac var at interning time" (* Interprets an identifier which must be fresh *) -let coerce_to_ident env = function +let coerce_to_ident fresh env = function | VIntroPattern (IntroIdentifier id) -> id - | VConstr c when isVar c & not (is_variable env (destVar c)) -> - (* This happens e.g. in definitions like "Tac H = clear H; intro H" *) + | VConstr c when isVar c & not (fresh & is_variable env (destVar c)) -> + (* We need it fresh for intro e.g. in "Tac H = clear H; intro H" *) destVar c | v -> raise (CannotCoerceTo "a fresh identifier") -let interp_ident ist gl id = +let interp_ident_gen fresh ist gl id = let env = pf_env gl in - try try_interp_ltac_var (coerce_to_ident env) ist (Some env) (dloc,id) + try try_interp_ltac_var (coerce_to_ident fresh env) ist (Some env) (dloc,id) with Not_found -> id +let interp_ident = interp_ident_gen false +let interp_fresh_ident = interp_ident_gen true + (* Interprets an optional identifier which must be fresh *) -let interp_name ist gl = function +let interp_fresh_name ist gl = function | Anonymous -> Anonymous - | Name id -> Name (interp_ident ist gl id) + | Name id -> Name (interp_fresh_ident ist gl id) let coerce_to_intro_pattern env = function | VIntroPattern ipat -> ipat @@ -1086,7 +1171,8 @@ let coerce_to_int = function let interp_int ist locid = try try_interp_ltac_var coerce_to_int ist None locid - with Not_found -> user_err_loc(fst locid,"interp_int",str "Unbound variable") + with Not_found -> user_err_loc(fst locid,"interp_int", + str "Unbound variable" ++ pr_id (snd locid)) let interp_int_or_var ist = function | ArgVar locid -> interp_int ist locid @@ -1196,13 +1282,15 @@ let interp_evaluable ist env = function interp_ltac_var (coerce_to_evaluable_ref env) ist (Some env) locid (* Interprets an hypothesis name *) +let interp_occurrences ist (b,occs) = + (b,interp_int_or_var_list ist occs) + let interp_hyp_location ist gl ((occs,id),hl) = - ((interp_int_or_var_list ist occs,interp_hyp ist gl id),hl) + ((interp_occurrences ist occs,interp_hyp ist gl id),hl) -let interp_clause ist gl { onhyps=ol; onconcl=b; concl_occs=occs } = - { onhyps=option_map(List.map (interp_hyp_location ist gl)) ol; - onconcl=b; - concl_occs=interp_int_or_var_list ist occs } +let interp_clause ist gl { onhyps=ol; concl_occs=occs } = + { onhyps=Option.map(List.map (interp_hyp_location ist gl)) ol; + concl_occs=interp_occurrences ist occs } (* Interpretation of constructions *) @@ -1220,12 +1308,12 @@ let rec constr_list_aux env = function let constr_list ist env = constr_list_aux env ist.lfun -(*Extract the identifier list from lfun: join all branches (what to do else?)*) +(* Extract the identifier list from lfun: join all branches (what to do else?)*) let rec intropattern_ids = function | IntroIdentifier id -> [id] | IntroOrAndPattern ll -> List.flatten (List.map intropattern_ids (List.flatten ll)) - | IntroWildcard | IntroAnonymous -> [] + | IntroWildcard | IntroAnonymous | IntroFresh _ | IntroRewrite _ -> [] let rec extract_ids ids = function | (id,VIntroPattern ipat)::tl when not (List.mem id ids) -> @@ -1237,13 +1325,16 @@ let default_fresh_id = id_of_string "H" let interp_fresh_id ist gl l = let ids = map_succeed (function ArgVar(_,id) -> id | _ -> failwith "") l in - let avoid = extract_ids ids ist.lfun in + let avoid = (extract_ids ids ist.lfun) @ ist.avoid_ids in let id = if l = [] then default_fresh_id else - id_of_string (String.concat "" (List.map (function - | ArgArg s -> s - | ArgVar (_,id) -> string_of_id (interp_ident ist gl id)) l)) in + let s = + String.concat "" (List.map (function + | ArgArg s -> s + | ArgVar (_,id) -> string_of_id (interp_ident ist gl id)) l) in + let s = if Lexer.is_keyword s then s^"0" else s in + id_of_string s in Tactics.fresh_id avoid id gl (* To retype a list of key*constr with undefined key *) @@ -1270,7 +1361,7 @@ let solvable_by_tactic env evi (ev,args) src = begin try by (tclCOMPLETE tac); - let _,(const,_,_) = cook_proof () in + let _,(const,_,_) = cook_proof ignore in delete_current_proof (); const.const_entry_body with e when Logic.catchable_exception e -> delete_current_proof(); @@ -1278,20 +1369,20 @@ let solvable_by_tactic env evi (ev,args) src = end | _ -> raise Exit -let solve_remaining_evars env initial_sigma evars c = - let isevars = ref evars in +let solve_remaining_evars env initial_sigma evd c = + let evdref = ref (Typeclasses.resolve_typeclasses ~fail:true env evd) in let rec proc_rec c = - match kind_of_term (Reductionops.whd_evar (evars_of !isevars) c) with + match kind_of_term (Reductionops.whd_evar (evars_of !evdref) c) with | Evar (ev,args as k) when not (Evd.mem initial_sigma ev) -> - let (loc,src) = evar_source ev !isevars in - let sigma = evars_of !isevars in + let (loc,src) = evar_source ev !evdref in + let sigma = evars_of !evdref in + let evi = Evd.find sigma ev in (try - let evi = Evd.find sigma ev in let c = solvable_by_tactic env evi k src in - isevars := Evd.evar_define ev c !isevars; + evdref := Evd.evar_define ev c !evdref; c with Exit -> - Pretype_errors.error_unsolvable_implicit loc env sigma src) + Pretype_errors.error_unsolvable_implicit loc env sigma evi src None) | _ -> map_constr proc_rec c in proc_rec c @@ -1318,8 +1409,8 @@ let interp_econstr kind ist sigma env cc = (* Interprets an open constr *) let interp_open_constr ccl ist sigma env cc = - let isevars,c = interp_gen (OfType ccl) ist sigma env cc in - (evars_of isevars,c) + let evd,c = interp_gen (OfType ccl) ist sigma env cc in + (evars_of evd,c) let interp_constr = interp_econstr (OfType None) @@ -1341,32 +1432,82 @@ let pf_interp_constr ist gl = let constr_list_of_VList env = function | VList l -> List.map (constr_of_value env) l | _ -> raise Not_found - + +let pf_interp_constr_in_compound_list inj_fun dest_fun interp_fun ist gl l = + let env = pf_env gl in + let try_expand_ltac_var x = + try match dest_fun x with + | RVar (_,id), _ -> + List.map inj_fun (constr_list_of_VList env (List.assoc id ist.lfun)) + | _ -> + raise Not_found + with Not_found -> + (*all of dest_fun, List.assoc, constr_list_of_VList may raise Not_found*) + [interp_fun ist gl x] in + List.flatten (List.map try_expand_ltac_var l) + +let pf_interp_constr_list = + pf_interp_constr_in_compound_list (fun x -> x) (fun x -> x) + (fun ist gl -> interp_constr ist (project gl) (pf_env gl)) + +(* let pf_interp_constr_list_as_list ist gl (c,_ as x) = match c with | RVar (_,id) -> (try constr_list_of_VList (pf_env gl) (List.assoc id ist.lfun) - with Not_found -> [interp_constr ist (project gl) (pf_env gl) x]) + with Not_found -> []) | _ -> [interp_constr ist (project gl) (pf_env gl) x] let pf_interp_constr_list ist gl l = List.flatten (List.map (pf_interp_constr_list_as_list ist gl) l) +*) + +let inj_open c = (Evd.empty,c) + +let pf_interp_open_constr_list = + pf_interp_constr_in_compound_list inj_open (fun x -> x) + (fun ist gl -> interp_open_constr None ist (project gl) (pf_env gl)) + +(* +let pf_interp_open_constr_list_as_list ist gl (c,_ as x) = + match c with + | RVar (_,id) -> + (try List.map inj_open + (constr_list_of_VList (pf_env gl) (List.assoc id ist.lfun)) + with Not_found -> + [interp_open_constr None ist (project gl) (pf_env gl) x]) + | _ -> + [interp_open_constr None ist (project gl) (pf_env gl) x] + +let pf_interp_open_constr_list ist gl l = + List.flatten (List.map (pf_interp_open_constr_list_as_list ist gl) l) +*) (* Interprets a type expression *) let pf_interp_type ist gl = interp_type ist (project gl) (pf_env gl) (* Interprets a reduction expression *) -let interp_unfold ist env (l,qid) = - (interp_int_or_var_list ist l,interp_evaluable ist env qid) +let interp_unfold ist env (occs,qid) = + (interp_occurrences ist occs,interp_evaluable ist env qid) let interp_flag ist env red = { red with rConst = List.map (interp_evaluable ist env) red.rConst } -let interp_pattern ist sigma env (l,c) = - (interp_int_or_var_list ist l, interp_constr ist sigma env c) +let interp_pattern ist sigma env (occs,c) = + (interp_occurrences ist occs, interp_constr ist sigma env c) + +let pf_interp_constr_with_occurrences ist gl = + interp_pattern ist (project gl) (pf_env gl) -let pf_interp_pattern ist gl = interp_pattern ist (project gl) (pf_env gl) +let pf_interp_constr_with_occurrences_and_name_as_list = + pf_interp_constr_in_compound_list + (fun c -> ((all_occurrences_expr,c),Anonymous)) + (function ((occs,c),Anonymous) when occs = all_occurrences_expr -> c + | _ -> raise Not_found) + (fun ist gl (occ_c,na) -> + (interp_pattern ist (project gl) (pf_env gl) occ_c, + interp_fresh_name ist gl na)) let interp_red_expr ist sigma env = function | Unfold l -> Unfold (List.map (interp_unfold ist env) l) @@ -1374,7 +1515,7 @@ let interp_red_expr ist sigma env = function | Cbv f -> Cbv (interp_flag ist env f) | Lazy f -> Lazy (interp_flag ist env f) | Pattern l -> Pattern (List.map (interp_pattern ist sigma env) l) - | Simpl o -> Simpl (option_map (interp_pattern ist sigma env) o) + | Simpl o -> Simpl (Option.map (interp_pattern ist sigma env) o) | (Red _ | Hnf | ExtraRedExpr _ | CbvVm as r) -> r let pf_interp_red_expr ist gl = interp_red_expr ist (project gl) (pf_env gl) @@ -1396,34 +1537,18 @@ let interp_may_eval f ist gl = function | ConstrTerm c -> try f ist gl c - with e -> - begin - match ist.debug with - DebugOn lev -> - safe_msgnl (str "Level " ++ int lev ++ - str ": interpretation of term " ++ - Printer.pr_rawconstr_env (pf_env gl) (fst c) ++ - str " raised an exception" ++ - fnl() ++ - !Tactic_debug.explain_logic_error_no_anomaly e) - | _ -> () - end; - raise e + with e -> + debugging_exception_step ist false e (fun () -> + str"interpretation of term " ++ pr_rawconstr_env (pf_env gl) (fst c)); + raise e (* Interprets a constr expression possibly to first evaluate *) let interp_constr_may_eval ist gl c = let csr = try interp_may_eval pf_interp_constr ist gl c - with e -> - begin match ist.debug with - DebugOn lev -> - safe_msgnl (str "Level " ++ int lev ++ - str ": evaluation of term raised an exception" ++ - fnl() ++ - !Tactic_debug.explain_logic_error_no_anomaly e) - | _ -> () - end; + with e -> + debugging_exception_step ist false e (fun () -> str"evaluation of term"); raise e in begin @@ -1431,6 +1556,12 @@ let interp_constr_may_eval ist gl c = csr end +let inj_may_eval = function + | ConstrTerm c -> ConstrTerm (inj_open c) + | ConstrEval (r,c) -> ConstrEval (Tactics.inj_red_expr r,inj_open c) + | ConstrContext (id,c) -> ConstrContext (id,inj_open c) + | ConstrTypeOf c -> ConstrTypeOf (inj_open c) + let message_of_value = function | VVoid -> str "()" | VInteger n -> int n @@ -1456,7 +1587,7 @@ let rec interp_message_nl ist = function let rec interp_intro_pattern ist gl = function | IntroOrAndPattern l -> IntroOrAndPattern (interp_case_intro_pattern ist gl l) | IntroIdentifier id -> interp_intro_pattern_var ist (pf_env gl) id - | IntroWildcard | IntroAnonymous as x -> x + | IntroWildcard | IntroAnonymous | IntroFresh _ | IntroRewrite _ as x -> x and interp_case_intro_pattern ist gl = List.map (List.map (interp_intro_pattern ist gl)) @@ -1472,8 +1603,7 @@ let interp_quantified_hypothesis ist = function | AnonHyp n -> AnonHyp n | NamedHyp id -> try try_interp_ltac_var coerce_to_quantified_hypothesis ist None(dloc,id) - with Not_found | Stdpp.Exc_located (_, UserError _) | UserError _ - -> NamedHyp id + with Not_found -> NamedHyp id let interp_binding_name ist = function | AnonHyp n -> AnonHyp n @@ -1482,8 +1612,7 @@ let interp_binding_name ist = function (* user has to use other names for variables if these ones clash with *) (* a name intented to be used as a (non-variable) identifier *) try try_interp_ltac_var coerce_to_quantified_hypothesis ist None(dloc,id) - with Not_found | Stdpp.Exc_located (_, UserError _) | UserError _ - -> NamedHyp id + with Not_found -> NamedHyp id (* Quantified named or numbered hypothesis or hypothesis in context *) (* (as in Inversion) *) @@ -1502,25 +1631,29 @@ let interp_declared_or_quantified_hypothesis ist gl = function (coerce_to_decl_or_quant_hyp env) ist (Some env) (dloc,id) with Not_found -> NamedHyp id -let interp_induction_arg ist gl = function - | ElimOnConstr c -> ElimOnConstr (pf_interp_constr ist gl c) - | ElimOnAnonHyp n as x -> x - | ElimOnIdent (loc,id) -> - if Tactics.is_quantified_hypothesis id gl then ElimOnIdent (loc,id) - else ElimOnConstr - (pf_interp_constr ist gl (RVar (loc,id),Some (CRef (Ident (loc,id))))) - let interp_binding ist gl (loc,b,c) = - (loc,interp_binding_name ist b,pf_interp_constr ist gl c) + (loc,interp_binding_name ist b,pf_interp_open_constr false ist gl c) let interp_bindings ist gl = function | NoBindings -> NoBindings -| ImplicitBindings l -> ImplicitBindings (pf_interp_constr_list ist gl l) +| ImplicitBindings l -> ImplicitBindings (pf_interp_open_constr_list ist gl l) | ExplicitBindings l -> ExplicitBindings (List.map (interp_binding ist gl) l) let interp_constr_with_bindings ist gl (c,bl) = (pf_interp_constr ist gl c, interp_bindings ist gl bl) +let interp_open_constr_with_bindings ist gl (c,bl) = + (pf_interp_open_constr false ist gl c, interp_bindings ist gl bl) + +let interp_induction_arg ist gl = function + | ElimOnConstr c -> ElimOnConstr (interp_constr_with_bindings ist gl c) + | ElimOnAnonHyp n as x -> x + | ElimOnIdent (loc,id) -> + if Tactics.is_quantified_hypothesis id gl then ElimOnIdent (loc,id) + else ElimOnConstr + (pf_interp_constr ist gl (RVar (loc,id),Some (CRef (Ident (loc,id)))), + NoBindings) + let mk_constr_value ist gl c = VConstr (pf_interp_constr ist gl c) let mk_hyp_value ist gl c = VConstr (mkVar (interp_hyp ist gl c)) let mk_int_or_var_value ist c = VInteger (interp_int_or_var ist c) @@ -1531,15 +1664,13 @@ let rec val_interp ist gl (tac:glob_tactic_expr) = let value_interp ist = match tac with (* Immediate evaluation *) | TacFun (it,body) -> VFun (ist.lfun,it,body) - | TacLetRecIn (lrc,u) -> letrec_interp ist gl lrc u - | TacLetIn (l,u) -> - let addlfun = interp_letin ist gl l in - val_interp { ist with lfun=addlfun@ist.lfun } gl u + | TacLetIn (true,l,u) -> interp_letrec ist gl l u + | TacLetIn (false,l,u) -> interp_letin ist gl l u | TacMatchContext (lz,lr,lmr) -> interp_match_context ist gl lz lr lmr | TacMatch (lz,c,lmr) -> interp_match ist gl lz c lmr | TacArg a -> interp_tacarg ist gl a (* Delayed evaluation *) - | t -> VTactic (dloc,eval_tactic ist t) + | t -> VTactic (ist.last_loc,eval_tactic ist t) in check_for_interrupt (); match ist.debug with @@ -1549,18 +1680,28 @@ let rec val_interp ist gl (tac:glob_tactic_expr) = and eval_tactic ist = function | TacAtom (loc,t) -> fun gl -> catch_error loc (interp_atomic ist gl t) gl - | TacFun _ | TacLetRecIn _ | TacLetIn _ -> assert false + | TacFun _ | TacLetIn _ -> assert false | TacMatchContext _ | TacMatch _ -> assert false | TacId s -> tclIDTAC_MESSAGE (interp_message_nl ist s) | TacFail (n,s) -> tclFAIL (interp_int_or_var ist n) (interp_message ist s) | TacProgress tac -> tclPROGRESS (interp_tactic ist tac) - | TacAbstract (tac,s) -> Tactics.tclABSTRACT s (interp_tactic ist tac) - | TacThen (t1,t2) -> tclTHEN (interp_tactic ist t1) (interp_tactic ist t2) - | TacThens (t,tl) -> - tclTHENS (interp_tactic ist t) (List.map (interp_tactic ist) tl) + | TacAbstract (tac,ido) -> + fun gl -> Tactics.tclABSTRACT + (Option.map (interp_ident ist gl) ido) (interp_tactic ist tac) gl + | TacThen (t1,tf,t,tl) -> + tclTHENS3PARTS (interp_tactic ist t1) + (Array.map (interp_tactic ist) tf) (interp_tactic ist t) (Array.map (interp_tactic ist) tl) + | TacThens (t1,tl) -> tclTHENS (interp_tactic ist t1) (List.map (interp_tactic ist) tl) | TacDo (n,tac) -> tclDO (interp_int_or_var ist n) (interp_tactic ist tac) | TacTry tac -> tclTRY (interp_tactic ist tac) - | TacInfo tac -> tclINFO (interp_tactic ist tac) + | TacInfo tac -> + let t = (interp_tactic ist tac) in + tclINFO + begin + match tac with + TacAtom (_,_) -> t + | _ -> abstract_tactic_expr (TacArg (Tacexp tac)) t + end | TacRepeat tac -> tclREPEAT (interp_tactic ist tac) | TacOrelse (tac1,tac2) -> tclORELSE (interp_tactic ist tac1) (interp_tactic ist tac2) @@ -1569,13 +1710,21 @@ and eval_tactic ist = function | TacComplete tac -> tclCOMPLETE (interp_tactic ist tac) | TacArg a -> assert false +and force_vrec ist gl = function + | VRec (lfun,body) -> val_interp {ist with lfun = !lfun} gl body + | v -> v + and interp_ltac_reference isapplied mustbetac ist gl = function | ArgVar (loc,id) -> let v = List.assoc id ist.lfun in + let v = force_vrec ist gl v in if mustbetac then coerce_to_tactic loc id v else v | ArgArg (loc,r) -> - let v = val_interp {lfun=[];debug=ist.debug} gl (lookup r) in - if isapplied then v else locate_tactic_call loc v + let ids = extract_ids [] ist.lfun in + let ist = + { lfun=[]; debug=ist.debug; avoid_ids=ids; + last_loc = if isapplied then ist.last_loc else loc } in + val_interp ist gl (lookup r) and interp_tacarg ist gl = function | TacVoid -> VVoid @@ -1583,7 +1732,7 @@ and interp_tacarg ist gl = function | Integer n -> VInteger n | IntroPattern ipat -> VIntroPattern (interp_intro_pattern ist gl ipat) | ConstrMayEval c -> VConstr (interp_constr_may_eval ist gl c) - | MetaIdArg (loc,id) -> assert false + | MetaIdArg (loc,_,id) -> assert false | TacCall (loc,r,[]) -> interp_ltac_reference false true ist gl r | TacCall (loc,f,l) -> let fv = interp_ltac_reference true true ist gl f @@ -1620,32 +1769,15 @@ and interp_app ist gl fv largs loc = let (newlfun,lvar,lval)=head_with_value (var,largs) in if lvar=[] then let v = - let res = - try - val_interp { ist with lfun=newlfun@olfun } gl body - with e -> - begin match ist.debug with - DebugOn lev -> - safe_msgnl - (str "Level " ++ int lev ++ - str ": evaluation raises an exception" ++ - fnl() ++ - !Tactic_debug.explain_logic_error_no_anomaly e) - | _ -> () - end; - raise e - in - (match ist.debug with - DebugOn lev -> - safe_msgnl (str "Level " ++ int lev ++ - str ": evaluation returns" ++ fnl() ++ - pr_value (Some (pf_env gl)) res) - | _ -> ()); - res - in - - if lval=[] then locate_tactic_call loc v - else interp_app ist gl v lval loc + try + let lloc = if lval=[] then loc else ist.last_loc in + val_interp { ist with lfun=newlfun@olfun; last_loc=lloc } gl body + with e -> + debugging_exception_step ist false e (fun () -> str "evaluation"); + raise e in + debugging_step ist (fun () -> + str "evaluation returns" ++ fnl() ++ pr_value (Some (pf_env gl)) v); + if lval=[] then v else interp_app ist gl v lval loc else VFun(newlfun@olfun,lvar,body) | _ -> @@ -1674,47 +1806,20 @@ and eval_with_fail ist is_lazy goal tac = | FailError (lvl,s) -> raise (FailError (lvl - 1, s)) -(* Interprets recursive expressions *) -and letrec_interp ist gl lrc u = - let lref = Array.to_list (Array.make (List.length lrc) (ref VVoid)) in - let lenv = - List.fold_right2 (fun ((loc,name),_) vref l -> (name,VRec vref)::l) - lrc lref [] in - let lve = List.map (fun ((loc,name),(var,body)) -> - (name,VFun(lenv@ist.lfun,var,body))) lrc in - begin - List.iter2 (fun vref (_,ve) -> vref:=ve) lref lve; - val_interp { ist with lfun=lve@ist.lfun } gl u - end +(* Interprets the clauses of a recursive LetIn *) +and interp_letrec ist gl llc u = + let lref = ref ist.lfun in + let lve = list_map_left (fun ((_,id),b) -> (id,VRec (lref,TacArg b))) llc in + lref := lve@ist.lfun; + let ist = { ist with lfun = lve@ist.lfun } in + val_interp ist gl u (* Interprets the clauses of a LetIn *) -and interp_letin ist gl = function - | [] -> [] - | ((loc,id),None,t)::tl -> - let v = interp_tacarg ist gl t in - check_is_value v; - (id,v):: (interp_letin ist gl tl) - | ((loc,id),Some com,tce)::tl -> - let env = pf_env gl in - let typ = constr_of_value env (val_interp ist gl com) - and v = interp_tacarg ist gl tce in - let csr = - try - constr_of_value env v - with Not_found -> - try - let t = tactic_of_value v in - let ndc = Environ.named_context_val env in - start_proof id (Local,Proof Lemma) ndc typ (fun _ _ -> ()); - by t; - let (_,({const_entry_body = pft},_,_)) = cook_proof () in - delete_proof (dloc,id); - pft - with | NotTactic -> - delete_proof (dloc,id); - errorlabstrm "Tacinterp.interp_letin" - (str "Term or fully applied tactic expected in Let") - in (id,VConstr (mkCast (csr,DEFAULTcast, typ)))::(interp_letin ist gl tl) +and interp_letin ist gl llc u = + let lve = list_map_left (fun ((_,id),body) -> + let v = interp_tacarg ist gl body in check_is_value v; (id,v)) llc in + let ist = { ist with lfun = lve@ist.lfun } in + val_interp ist gl u (* Interprets the Match Context expressions *) and interp_match_context ist g lz lr lmr = @@ -1761,7 +1866,7 @@ and interp_match_context ist g lz lr lmr = errorlabstrm "Tacinterp.apply_match_context" (v 0 (str "No matching clauses for match goal" ++ (if ist.debug=DebugOff then - fnl() ++ str "(use \"Debug On\" for more info)" + fnl() ++ str "(use \"Set Ltac Debug\" for more info)" else mt()))) end in let env = pf_env g in @@ -1811,7 +1916,8 @@ and interp_genarg ist gl x = in_gen wit_intro_pattern (interp_intro_pattern ist gl (out_gen globwit_intro_pattern x)) | IdentArgType -> - in_gen wit_ident (interp_ident ist gl (out_gen globwit_ident x)) + in_gen wit_ident + (interp_fresh_ident ist gl (out_gen globwit_ident x)) | VarArgType -> in_gen wit_var (interp_hyp ist gl (out_gen globwit_var x)) | RefArgType -> @@ -1892,34 +1998,25 @@ and interp_match ist g lz constr lmr = (try eval_with_fail ist lz g t with e when is_match_catchable e -> apply_match ist csr []) | (Pat ([],Term c,mt))::tl -> - (try let lm = - (try matches c csr with - e -> - (match ist.debug with - DebugOn lev -> - safe_msgnl (str "Level " ++ int lev ++ - str ": matching with pattern" ++ fnl() ++ - Printer.pr_constr_pattern_env (pf_env g) c ++ fnl() ++ - str "raised the exception" ++ fnl() ++ - !Tactic_debug.explain_logic_error_no_anomaly e) - | _ -> ()); raise e) in - (try let lm = List.map (fun (id,c) -> (id,VConstr c)) lm in - eval_with_fail { ist with lfun=lm@ist.lfun } lz g mt + (try + let lm = + try matches c csr + with e -> + debugging_exception_step ist false e (fun () -> + str "matching with pattern" ++ fnl () ++ + pr_constr_pattern_env (pf_env g) c); + raise e in + try + let lm = List.map (fun (id,c) -> (id,VConstr c)) lm in + eval_with_fail { ist with lfun=lm@ist.lfun } lz g mt with e -> - (match ist.debug with - DebugOn lev -> - safe_msgnl (str "rule body for pattern" ++ fnl() ++ - Printer.pr_constr_pattern_env (pf_env g) c ++ fnl() ++ - str "raised the exception" ++ fnl() ++ - !Tactic_debug.explain_logic_error_no_anomaly e) - | _ -> ()); raise e) + debugging_exception_step ist false e (fun () -> + str "rule body for pattern" ++ + pr_constr_pattern_env (pf_env g) c); + raise e with e when is_match_catchable e -> - (match ist.debug with - DebugOn lev -> - safe_msgnl (str "Level " ++ int lev ++ - str ":switching to the next rule"); - | DebugOff -> ()); - apply_match ist csr tl) + debugging_step ist (fun () -> str "switching to the next rule"); + apply_match ist csr tl) | (Pat ([],Subterm (id,c),mt))::tl -> (try apply_match_subterm ist 0 (id,c) csr mt @@ -1928,49 +2025,33 @@ and interp_match ist g lz constr lmr = errorlabstrm "Tacinterp.apply_match" (str "No matching clauses for match") in let csr = - try interp_ltac_constr ist g constr with - e -> (match ist.debug with - DebugOn lev -> - safe_msgnl (str "Level " ++ int lev ++ - str ": evaluation of the matched expression raised " ++ - str "the exception" ++ fnl() ++ - !Tactic_debug.explain_logic_error e) - | _ -> ()); raise e in + try interp_ltac_constr ist g constr with e -> + debugging_exception_step ist true e + (fun () -> str "evaluation of the matched expression"); + raise e in let ilr = read_match_rule (fst (constr_list ist (pf_env g))) lmr in let res = - try apply_match ist csr ilr with - e -> - begin match ist.debug with - DebugOn lev -> - safe_msgnl (str "Level " ++ int lev ++ - str ": match expression failed with error" ++ fnl() ++ - !Tactic_debug.explain_logic_error e) - | _ -> () - end; - raise e in - (if ist.debug <> DebugOff then - safe_msgnl (str "match expression returns " ++ - pr_value (Some (pf_env g)) res)); - res + try apply_match ist csr ilr with e -> + debugging_exception_step ist true e (fun () -> str "match expression"); + raise e in + debugging_step ist (fun () -> + str "match expression returns " ++ pr_value (Some (pf_env g)) res); + res (* Interprets tactic expressions : returns a "constr" *) and interp_ltac_constr ist gl e = let result = - try (val_interp ist gl e) with Not_found -> - begin match ist.debug with - DebugOn lev -> - safe_msgnl (str "Level " ++ int lev ++ - str ": evaluation failed for" ++ fnl() ++ - Pptactic.pr_glob_tactic (pf_env gl) e) - | _ -> () - end; + try val_interp ist gl e with Not_found -> + debugging_step ist (fun () -> + str "evaluation failed for" ++ fnl() ++ + Pptactic.pr_glob_tactic (pf_env gl) e); raise Not_found in - try let cresult = constr_of_value (pf_env gl) result in - (if !debug <> DebugOff then - safe_msgnl (Pptactic.pr_glob_tactic (pf_env gl) e ++ fnl() ++ - str " has value " ++ fnl() ++ print_constr_env (pf_env gl) cresult); - cresult) - + try + let cresult = constr_of_value (pf_env gl) result in + debugging_step ist (fun () -> + Pptactic.pr_glob_tactic (pf_env gl) e ++ fnl() ++ + str " has value " ++ fnl() ++ print_constr_env (pf_env gl) cresult); + cresult with Not_found -> errorlabstrm "" (str "Must evaluate to a term" ++ fnl() ++ @@ -2016,72 +2097,72 @@ and interp_atomic ist gl = function | TacIntrosUntil hyp -> h_intros_until (interp_quantified_hypothesis ist hyp) | TacIntroMove (ido,ido') -> - h_intro_move (option_map (interp_ident ist gl) ido) - (option_map (interp_hyp ist gl) ido') + h_intro_move (Option.map (interp_fresh_ident ist gl) ido) + (Option.map (interp_hyp ist gl) ido') | TacAssumption -> h_assumption | TacExact c -> h_exact (pf_interp_casted_constr ist gl c) | TacExactNoCheck c -> h_exact_no_check (pf_interp_constr ist gl c) | TacVmCastNoCheck c -> h_vm_cast_no_check (pf_interp_constr ist gl c) - | TacApply cb -> h_apply (interp_constr_with_bindings ist gl cb) - | TacElim (cb,cbo) -> - h_elim (interp_constr_with_bindings ist gl cb) - (option_map (interp_constr_with_bindings ist gl) cbo) + | TacApply (a,ev,cb) -> h_apply a ev (interp_constr_with_bindings ist gl cb) + | TacElim (ev,cb,cbo) -> + h_elim ev (interp_constr_with_bindings ist gl cb) + (Option.map (interp_constr_with_bindings ist gl) cbo) | TacElimType c -> h_elim_type (pf_interp_type ist gl c) - | TacCase cb -> h_case (interp_constr_with_bindings ist gl cb) + | TacCase (ev,cb) -> h_case ev (interp_constr_with_bindings ist gl cb) | TacCaseType c -> h_case_type (pf_interp_type ist gl c) - | TacFix (idopt,n) -> h_fix (option_map (interp_ident ist gl) idopt) n - | TacMutualFix (id,n,l) -> - let f (id,n,c) = (interp_ident ist gl id,n,pf_interp_type ist gl c) in - h_mutual_fix (interp_ident ist gl id) n (List.map f l) - | TacCofix idopt -> h_cofix (option_map (interp_ident ist gl) idopt) - | TacMutualCofix (id,l) -> - let f (id,c) = (interp_ident ist gl id,pf_interp_type ist gl c) in - h_mutual_cofix (interp_ident ist gl id) (List.map f l) + | TacFix (idopt,n) -> h_fix (Option.map (interp_fresh_ident ist gl) idopt) n + | TacMutualFix (b,id,n,l) -> + let f (id,n,c) = (interp_fresh_ident ist gl id,n,pf_interp_type ist gl c) + in h_mutual_fix b (interp_fresh_ident ist gl id) n (List.map f l) + | TacCofix idopt -> h_cofix (Option.map (interp_fresh_ident ist gl) idopt) + | TacMutualCofix (b,id,l) -> + let f (id,c) = (interp_fresh_ident ist gl id,pf_interp_type ist gl c) in + h_mutual_cofix b (interp_fresh_ident ist gl id) (List.map f l) | TacCut c -> h_cut (pf_interp_type ist gl c) | TacAssert (t,ipat,c) -> let c = (if t=None then pf_interp_constr else pf_interp_type) ist gl c in - abstract_tactic (TacAssert (t,ipat,c)) - (Tactics.forward (option_map (interp_tactic ist) t) + abstract_tactic (TacAssert (t,ipat,inj_open c)) + (Tactics.forward (Option.map (interp_tactic ist) t) (interp_intro_pattern ist gl ipat) c) - | TacGeneralize cl -> h_generalize (pf_interp_constr_list ist gl cl) + | TacGeneralize cl -> + h_generalize_gen + (pf_interp_constr_with_occurrences_and_name_as_list ist gl cl) | TacGeneralizeDep c -> h_generalize_dep (pf_interp_constr ist gl c) - | TacLetTac (na,c,clp) -> + | TacLetTac (na,c,clp,b) -> let clp = interp_clause ist gl clp in - h_let_tac (interp_name ist gl na) (pf_interp_constr ist gl c) clp -(* | TacInstantiate (n,c,idh) -> h_instantiate n (fst c) - (* pf_interp_constr ist gl c *) - (match idh with - ConclLocation () -> ConclLocation () - | HypLocation (id,hloc) -> - HypLocation(interp_hyp ist gl id,hloc)) -*) + h_let_tac b (interp_fresh_name ist gl na) (pf_interp_constr ist gl c) clp + (* Automation tactics *) | TacTrivial (lems,l) -> Auto.h_trivial (pf_interp_constr_list ist gl lems) - (option_map (List.map (interp_hint_base ist)) l) + (Option.map (List.map (interp_hint_base ist)) l) | TacAuto (n,lems,l) -> - Auto.h_auto (option_map (interp_int_or_var ist) n) + Auto.h_auto (Option.map (interp_int_or_var ist) n) (pf_interp_constr_list ist gl lems) - (option_map (List.map (interp_hint_base ist)) l) + (Option.map (List.map (interp_hint_base ist)) l) | TacAutoTDB n -> Dhyp.h_auto_tdb n | TacDestructHyp (b,id) -> Dhyp.h_destructHyp b (interp_hyp ist gl id) | TacDestructConcl -> Dhyp.h_destructConcl | TacSuperAuto (n,l,b1,b2) -> Auto.h_superauto n l b1 b2 - | TacDAuto (n,p) -> Auto.h_dauto (option_map (interp_int_or_var ist) n,p) + | TacDAuto (n,p,lems) -> + Auto.h_dauto (Option.map (interp_int_or_var ist) n,p) + (pf_interp_constr_list ist gl lems) (* Derived basic tactics *) | TacSimpleInduction h -> h_simple_induction (interp_quantified_hypothesis ist h) - | TacNewInduction (lc,cbo,ids) -> - h_new_induction (List.map (interp_induction_arg ist gl) lc) - (option_map (interp_constr_with_bindings ist gl) cbo) + | TacNewInduction (ev,lc,cbo,ids,cls) -> + h_new_induction ev (List.map (interp_induction_arg ist gl) lc) + (Option.map (interp_constr_with_bindings ist gl) cbo) (interp_intro_pattern ist gl ids) + (Option.map (interp_clause ist gl) cls) | TacSimpleDestruct h -> h_simple_destruct (interp_quantified_hypothesis ist h) - | TacNewDestruct (c,cbo,ids) -> - h_new_destruct (List.map (interp_induction_arg ist gl) c) - (option_map (interp_constr_with_bindings ist gl) cbo) + | TacNewDestruct (ev,c,cbo,ids,cls) -> + h_new_destruct ev (List.map (interp_induction_arg ist gl) c) + (Option.map (interp_constr_with_bindings ist gl) cbo) (interp_intro_pattern ist gl ids) + (Option.map (interp_clause ist gl) cls) | TacDoubleInduction (h1,h2) -> let h1 = interp_quantified_hypothesis ist h1 in let h2 = interp_quantified_hypothesis ist h2 in @@ -2100,25 +2181,31 @@ and interp_atomic ist gl = function | TacClearBody l -> h_clear_body (interp_hyp_list ist gl l) | TacMove (dep,id1,id2) -> h_move dep (interp_hyp ist gl id1) (interp_hyp ist gl id2) - | TacRename (id1,id2) -> - h_rename (interp_hyp ist gl id1) (interp_ident ist gl (snd id2)) + | TacRename l -> + h_rename (List.map (fun (id1,id2) -> + interp_hyp ist gl id1, + interp_fresh_ident ist gl (snd id2)) l) + | TacRevert l -> h_revert (interp_hyp_list ist gl l) (* Constructors *) - | TacLeft bl -> h_left (interp_bindings ist gl bl) - | TacRight bl -> h_right (interp_bindings ist gl bl) - | TacSplit (_,bl) -> h_split (interp_bindings ist gl bl) - | TacAnyConstructor t -> - abstract_tactic (TacAnyConstructor t) - (Tactics.any_constructor (option_map (interp_tactic ist) t)) - | TacConstructor (n,bl) -> - h_constructor (skip_metaid n) (interp_bindings ist gl bl) + | TacLeft (ev,bl) -> h_left ev (interp_bindings ist gl bl) + | TacRight (ev,bl) -> h_right ev (interp_bindings ist gl bl) + | TacSplit (ev,_,bl) -> h_split ev (interp_bindings ist gl bl) + | TacAnyConstructor (ev,t) -> + abstract_tactic (TacAnyConstructor (ev,t)) + (Tactics.any_constructor ev (Option.map (interp_tactic ist) t)) + | TacConstructor (ev,n,bl) -> + h_constructor ev (skip_metaid n) (interp_bindings ist gl bl) (* Conversion *) | TacReduce (r,cl) -> h_reduce (pf_interp_red_expr ist gl r) (interp_clause ist gl cl) | TacChange (occl,c,cl) -> - h_change (option_map (pf_interp_pattern ist gl) occl) - (if occl = None then pf_interp_type ist gl c + h_change (Option.map (pf_interp_constr_with_occurrences ist gl) occl) + (if occl = None & (cl.onhyps = None or cl.onhyps = Some []) & + (cl.concl_occs = all_occurrences_expr or + cl.concl_occs = no_occurrences_expr) + then pf_interp_type ist gl c else pf_interp_constr ist gl c) (interp_clause ist gl cl) @@ -2128,12 +2215,13 @@ and interp_atomic ist gl = function | TacTransitivity c -> h_transitivity (pf_interp_constr ist gl c) (* Equality and inversion *) - | TacRewrite (b,c,cl) -> - Equality.general_multi_rewrite b - (interp_constr_with_bindings ist gl c) + | TacRewrite (ev,l,cl,by) -> + Equality.general_multi_multi_rewrite ev + (List.map (fun (b,m,c) -> (b,m,interp_constr_with_bindings ist gl c)) l) (interp_clause ist gl cl) + (Option.map (interp_tactic ist) by) | TacInversion (DepInversion (k,c,ids),hyp) -> - Inv.dinv k (option_map (pf_interp_constr ist gl) c) + Inv.dinv k (Option.map (pf_interp_constr ist gl) c) (interp_intro_pattern ist gl ids) (interp_declared_or_quantified_hypothesis ist gl hyp) | TacInversion (NonDepInversion (k,idl,ids),hyp) -> @@ -2165,7 +2253,8 @@ and interp_atomic ist gl = function (interp_intro_pattern ist gl (out_gen globwit_intro_pattern x)) | IdentArgType -> VIntroPattern - (IntroIdentifier (interp_ident ist gl (out_gen globwit_ident x))) + (IntroIdentifier + (interp_fresh_ident ist gl (out_gen globwit_ident x))) | VarArgType -> mk_hyp_value ist gl (out_gen globwit_var x) | RefArgType -> @@ -2181,7 +2270,7 @@ and interp_atomic ist gl = function | ExtraArgType s when tactic_genarg_level s <> None -> (* Special treatment of tactic arguments *) val_interp ist gl - (out_gen (globwit_tactic (out_some (tactic_genarg_level s))) x) + (out_gen (globwit_tactic (Option.get (tactic_genarg_level s))) x) | List0ArgType ConstrArgType -> let wit = wit_list0 globwit_constr in VList (List.map (mk_constr_value ist gl) (out_gen wit x)) @@ -2226,18 +2315,21 @@ let make_empty_glob_sign () = gsigma = Evd.empty; genv = Global.env() } (* Initial call for interpretation *) -let interp_tac_gen lfun debug t gl = - interp_tactic { lfun=lfun; debug=debug } +let interp_tac_gen lfun avoid_ids debug t gl = + interp_tactic { lfun=lfun; avoid_ids=avoid_ids; debug=debug; last_loc=dloc } (intern_tactic { ltacvars = (List.map fst lfun, []); ltacrecvars = []; gsigma = project gl; genv = pf_env gl } t) gl -let eval_tactic t gls = interp_tactic { lfun=[]; debug=get_debug() } t gls +let eval_tactic t gls = + interp_tactic { lfun=[]; avoid_ids=[]; debug=get_debug(); last_loc=dloc } + t gls -let interp t = interp_tac_gen [] (get_debug()) t +let interp t = interp_tac_gen [] [] (get_debug()) t let eval_ltac_constr gl t = - interp_ltac_constr { lfun=[]; debug=get_debug() } gl + interp_ltac_constr + { lfun=[]; avoid_ids=[]; debug=get_debug(); last_loc=dloc } gl (intern_tactic (make_empty_glob_sign ()) t ) (* Hides interpretation for pretty-print *) @@ -2276,7 +2368,7 @@ let subst_raw_with_bindings subst (c,bl) = (subst_rawconstr subst c, subst_bindings subst bl) let subst_induction_arg subst = function - | ElimOnConstr c -> ElimOnConstr (subst_rawconstr subst c) + | ElimOnConstr c -> ElimOnConstr (subst_raw_with_bindings subst c) | ElimOnAnonHyp n as x -> x | ElimOnIdent id as x -> x @@ -2317,15 +2409,15 @@ let subst_unfold subst (l,e) = let subst_flag subst red = { red with rConst = List.map (subst_evaluable subst) red.rConst } -let subst_constr_occurrence subst (l,c) = (l,subst_rawconstr subst c) +let subst_constr_with_occurrences subst (l,c) = (l,subst_rawconstr subst c) let subst_redexp subst = function | Unfold l -> Unfold (List.map (subst_unfold subst) l) | Fold l -> Fold (List.map (subst_rawconstr subst) l) | Cbv f -> Cbv (subst_flag subst f) | Lazy f -> Lazy (subst_flag subst f) - | Pattern l -> Pattern (List.map (subst_constr_occurrence subst) l) - | Simpl o -> Simpl (option_map (subst_constr_occurrence subst) o) + | Pattern l -> Pattern (List.map (subst_constr_with_occurrences subst) l) + | Simpl o -> Simpl (Option.map (subst_constr_with_occurrences subst) o) | (Red _ | Hnf | ExtraRedExpr _ | CbvVm as r) -> r let subst_raw_may_eval subst = function @@ -2351,27 +2443,27 @@ let rec subst_atomic subst (t:glob_atomic_tactic_expr) = match t with | TacExact c -> TacExact (subst_rawconstr subst c) | TacExactNoCheck c -> TacExactNoCheck (subst_rawconstr subst c) | TacVmCastNoCheck c -> TacVmCastNoCheck (subst_rawconstr subst c) - | TacApply cb -> TacApply (subst_raw_with_bindings subst cb) - | TacElim (cb,cbo) -> - TacElim (subst_raw_with_bindings subst cb, - option_map (subst_raw_with_bindings subst) cbo) + | TacApply (a,ev,cb) -> TacApply (a,ev,subst_raw_with_bindings subst cb) + | TacElim (ev,cb,cbo) -> + TacElim (ev,subst_raw_with_bindings subst cb, + Option.map (subst_raw_with_bindings subst) cbo) | TacElimType c -> TacElimType (subst_rawconstr subst c) - | TacCase cb -> TacCase (subst_raw_with_bindings subst cb) + | TacCase (ev,cb) -> TacCase (ev,subst_raw_with_bindings subst cb) | TacCaseType c -> TacCaseType (subst_rawconstr subst c) | TacFix (idopt,n) as x -> x - | TacMutualFix (id,n,l) -> - TacMutualFix(id,n,List.map (fun (id,n,c) -> (id,n,subst_rawconstr subst c)) l) + | TacMutualFix (b,id,n,l) -> + TacMutualFix(b,id,n,List.map (fun (id,n,c) -> (id,n,subst_rawconstr subst c)) l) | TacCofix idopt as x -> x - | TacMutualCofix (id,l) -> - TacMutualCofix (id, List.map (fun (id,c) -> (id,subst_rawconstr subst c)) l) + | TacMutualCofix (b,id,l) -> + TacMutualCofix (b,id, List.map (fun (id,c) -> (id,subst_rawconstr subst c)) l) | TacCut c -> TacCut (subst_rawconstr subst c) | TacAssert (b,na,c) -> - TacAssert (option_map (subst_tactic subst) b,na,subst_rawconstr subst c) - | TacGeneralize cl -> TacGeneralize (List.map (subst_rawconstr subst) cl) + TacAssert (Option.map (subst_tactic subst) b,na,subst_rawconstr subst c) + | TacGeneralize cl -> + TacGeneralize (List.map (on_fst (subst_constr_with_occurrences subst))cl) | TacGeneralizeDep c -> TacGeneralizeDep (subst_rawconstr subst c) - | TacLetTac (id,c,clp) -> TacLetTac (id,subst_rawconstr subst c,clp) -(*| TacInstantiate (n,c,ido) -> TacInstantiate (n,subst_rawconstr subst c,ido) -*) + | TacLetTac (id,c,clp,b) -> TacLetTac (id,subst_rawconstr subst c,clp,b) + (* Automation tactics *) | TacTrivial (lems,l) -> TacTrivial (List.map (subst_rawconstr subst) lems,l) | TacAuto (n,lems,l) -> TacAuto (n,List.map (subst_rawconstr subst) lems,l) @@ -2379,17 +2471,17 @@ let rec subst_atomic subst (t:glob_atomic_tactic_expr) = match t with | TacDestructHyp (b,id) -> TacDestructHyp(b,id) | TacDestructConcl -> TacDestructConcl | TacSuperAuto (n,l,b1,b2) -> TacSuperAuto (n,l,b1,b2) - | TacDAuto (n,p) -> TacDAuto (n,p) + | TacDAuto (n,p,lems) -> TacDAuto (n,p,List.map (subst_rawconstr subst) lems) (* Derived basic tactics *) | TacSimpleInduction h as x -> x - | TacNewInduction (lc,cbo,ids) -> (* Pierre C. est-ce correct? *) - TacNewInduction (List.map (subst_induction_arg subst) lc, - option_map (subst_raw_with_bindings subst) cbo, ids) + | TacNewInduction (ev,lc,cbo,ids,cls) -> + TacNewInduction (ev,List.map (subst_induction_arg subst) lc, + Option.map (subst_raw_with_bindings subst) cbo, ids, cls) | TacSimpleDestruct h as x -> x - | TacNewDestruct (c,cbo,ids) -> - TacNewDestruct (List.map (subst_induction_arg subst) c, (* Julien F. est-ce correct? *) - option_map (subst_raw_with_bindings subst) cbo, ids) + | TacNewDestruct (ev,c,cbo,ids,cls) -> + TacNewDestruct (ev,List.map (subst_induction_arg subst) c, + Option.map (subst_raw_with_bindings subst) cbo, ids, cls) | TacDoubleInduction (h1,h2) as x -> x | TacDecomposeAnd c -> TacDecomposeAnd (subst_rawconstr subst c) | TacDecomposeOr c -> TacDecomposeOr (subst_rawconstr subst c) @@ -2403,19 +2495,20 @@ let rec subst_atomic subst (t:glob_atomic_tactic_expr) = match t with | TacClear _ as x -> x | TacClearBody l as x -> x | TacMove (dep,id1,id2) as x -> x - | TacRename (id1,id2) as x -> x + | TacRename l as x -> x + | TacRevert _ as x -> x (* Constructors *) - | TacLeft bl -> TacLeft (subst_bindings subst bl) - | TacRight bl -> TacRight (subst_bindings subst bl) - | TacSplit (b,bl) -> TacSplit (b,subst_bindings subst bl) - | TacAnyConstructor t -> TacAnyConstructor (option_map (subst_tactic subst) t) - | TacConstructor (n,bl) -> TacConstructor (n, subst_bindings subst bl) + | TacLeft (ev,bl) -> TacLeft (ev,subst_bindings subst bl) + | TacRight (ev,bl) -> TacRight (ev,subst_bindings subst bl) + | TacSplit (ev,b,bl) -> TacSplit (ev,b,subst_bindings subst bl) + | TacAnyConstructor (ev,t) -> TacAnyConstructor (ev,Option.map (subst_tactic subst) t) + | TacConstructor (ev,n,bl) -> TacConstructor (ev,n,subst_bindings subst bl) (* Conversion *) | TacReduce (r,cl) -> TacReduce (subst_redexp subst r, cl) | TacChange (occl,c,cl) -> - TacChange (option_map (subst_constr_occurrence subst) occl, + TacChange (Option.map (subst_constr_with_occurrences subst) occl, subst_rawconstr subst c, cl) (* Equivalence relations *) @@ -2423,9 +2516,13 @@ let rec subst_atomic subst (t:glob_atomic_tactic_expr) = match t with | TacTransitivity c -> TacTransitivity (subst_rawconstr subst c) (* Equality and inversion *) - | TacRewrite (b,c,cl) -> TacRewrite (b, subst_raw_with_bindings subst c,cl) + | TacRewrite (ev,l,cl,by) -> + TacRewrite (ev, + List.map (fun (b,m,c) -> + b,m,subst_raw_with_bindings subst c) l, + cl,Option.map (subst_tactic subst) by) | TacInversion (DepInversion (k,c,l),hyp) -> - TacInversion (DepInversion (k,option_map (subst_rawconstr subst) c,l),hyp) + TacInversion (DepInversion (k,Option.map (subst_rawconstr subst) c,l),hyp) | TacInversion (NonDepInversion _,_) as x -> x | TacInversion (InversionUsing (c,cl),hyp) -> TacInversion (InversionUsing (subst_rawconstr subst c,cl),hyp) @@ -2440,12 +2537,9 @@ let rec subst_atomic subst (t:glob_atomic_tactic_expr) = match t with and subst_tactic subst (t:glob_tactic_expr) = match t with | TacAtom (_loc,t) -> TacAtom (dloc, subst_atomic subst t) | TacFun tacfun -> TacFun (subst_tactic_fun subst tacfun) - | TacLetRecIn (lrc,u) -> - let lrc = List.map (fun (n,b) -> (n,subst_tactic_fun subst b)) lrc in - TacLetRecIn (lrc,(subst_tactic subst u:glob_tactic_expr)) - | TacLetIn (l,u) -> - let l = List.map (fun (n,c,b) -> (n,option_map (subst_tactic subst) c,subst_tacarg subst b)) l in - TacLetIn (l,subst_tactic subst u) + | TacLetIn (r,l,u) -> + let l = List.map (fun (n,b) -> (n,subst_tacarg subst b)) l in + TacLetIn (r,l,subst_tactic subst u) | TacMatchContext (lz,lr,lmr) -> TacMatchContext(lz,lr, subst_match_rule subst lmr) | TacMatch (lz,c,lmr) -> @@ -2453,8 +2547,9 @@ and subst_tactic subst (t:glob_tactic_expr) = match t with | TacId _ | TacFail _ as x -> x | TacProgress tac -> TacProgress (subst_tactic subst tac:glob_tactic_expr) | TacAbstract (tac,s) -> TacAbstract (subst_tactic subst tac,s) - | TacThen (t1,t2) -> - TacThen (subst_tactic subst t1,subst_tactic subst t2) + | TacThen (t1,tf,t2,tl) -> + TacThen (subst_tactic subst t1,Array.map (subst_tactic subst) tf, + subst_tactic subst t2,Array.map (subst_tactic subst) tl) | TacThens (t,tl) -> TacThens (subst_tactic subst t, List.map (subst_tactic subst) tl) | TacDo (n,tac) -> TacDo (n,subst_tactic subst tac) @@ -2473,7 +2568,7 @@ and subst_tactic_fun subst (var,body) = (var,subst_tactic subst body) and subst_tacarg subst = function | Reference r -> Reference (subst_reference subst r) | ConstrMayEval c -> ConstrMayEval (subst_raw_may_eval subst c) - | MetaIdArg (_loc,_) -> assert false + | MetaIdArg (_loc,_,_) -> assert false | TacCall (_loc,f,l) -> TacCall (_loc, subst_reference subst f, List.map (subst_tacarg subst) l) | TacExternal (_loc,com,req,la) -> @@ -2558,27 +2653,46 @@ let bad_tactic_args s = (* Declaration of the TAC-DEFINITION object *) let add (kn,td) = mactab := Gmap.add kn td !mactab +type tacdef_kind = | NewTac of identifier + | UpdateTac of ltac_constant + let load_md i ((sp,kn),defs) = let dp,_ = repr_path sp in let mp,dir,_ = repr_kn kn in List.iter (fun (id,t) -> - let sp = Libnames.make_path dp id in - let kn = Names.make_kn mp dir (label_of_id id) in - Nametab.push_tactic (Until i) sp kn; - add (kn,t)) defs - + match id with + NewTac id -> + let sp = Libnames.make_path dp id in + let kn = Names.make_kn mp dir (label_of_id id) in + Nametab.push_tactic (Until i) sp kn; + add (kn,t) + | UpdateTac kn -> + mactab := Gmap.remove kn !mactab; + add (kn,t)) defs + let open_md i((sp,kn),defs) = let dp,_ = repr_path sp in let mp,dir,_ = repr_kn kn in List.iter (fun (id,t) -> - let sp = Libnames.make_path dp id in - let kn = Names.make_kn mp dir (label_of_id id) in - Nametab.push_tactic (Exactly i) sp kn) defs + match id with + NewTac id -> + let sp = Libnames.make_path dp id in + let kn = Names.make_kn mp dir (label_of_id id) in + Nametab.push_tactic (Exactly i) sp kn + | UpdateTac kn -> + let (path, id) = decode_kn kn in + let sp = Libnames.make_path path id in + Nametab.push_tactic (Exactly i) sp kn) defs let cache_md x = load_md 1 x +let subst_kind subst id = + match id with + | NewTac _ -> id + | UpdateTac kn -> UpdateTac (Mod_subst.subst_kn subst kn) + let subst_md (_,subst,defs) = - List.map (fun (id,t) -> (id,subst_tactic subst t)) defs + List.map (fun (id,t) -> (subst_kind subst id,subst_tactic subst t)) defs let (inMD,outMD) = declare_object {(default_object "TAC-DEFINITION") with @@ -2600,28 +2714,61 @@ let print_ltac id = errorlabstrm "print_ltac" (pr_qualid id ++ spc() ++ str "is not a user defined tactic") +open Libnames + (* Adds a definition for tactics in the table *) -let make_absolute_name (loc,id) = - let kn = Lib.make_kn id in - if Gmap.mem kn !mactab or is_atomic_kn kn then +let make_absolute_name ident repl = + let loc = loc_of_reference ident in + try + let id, kn = + if repl then None, Nametab.locate_tactic (snd (qualid_of_reference ident)) + else let id = Pcoq.coerce_global_to_id ident in + Some id, Lib.make_kn id + in + if Gmap.mem kn !mactab then + if repl then id, kn + else + user_err_loc (loc,"Tacinterp.add_tacdef", + str "There is already an Ltac named " ++ pr_reference ident) + else if is_atomic_kn kn then + user_err_loc (loc,"Tacinterp.add_tacdef", + str "Reserved Ltac name " ++ pr_reference ident) + else id, kn + with Not_found -> user_err_loc (loc,"Tacinterp.add_tacdef", - str "There is already an Ltac named " ++ pr_id id); - kn - + str "There is no Ltac named " ++ pr_reference ident) + +let rec filter_map f l = + let rec aux acc = function + [] -> acc + | hd :: tl -> + match f hd with + Some x -> aux (x :: acc) tl + | None -> aux acc tl + in aux [] l + let add_tacdef isrec tacl = -(* let isrec = if !Options.p1 then isrec else true in*) - let rfun = List.map (fun ((loc,id as locid),_) -> (id,make_absolute_name locid)) tacl in + let rfun = List.map (fun (ident, b, _) -> make_absolute_name ident b) tacl in let ist = - {(make_empty_glob_sign()) with ltacrecvars = if isrec then rfun else []} in + {(make_empty_glob_sign()) with ltacrecvars = + if isrec then filter_map + (function (Some id, qid) -> Some (id, qid) | (None, _) -> None) rfun + else []} in let gtacl = - List.map (fun ((_,id),def) -> - (id,Options.with_option strict_check (intern_tactic ist) def)) - tacl in + List.map2 (fun (_,b,def) (id, qid) -> + let k = if b then UpdateTac qid else NewTac (Option.get id) in + let t = Flags.with_option strict_check (intern_tactic ist) def in + (k, t)) + tacl rfun in let id0 = fst (List.hd rfun) in - let _ = Lib.add_leaf id0 (inMD gtacl) in + let _ = match id0 with Some id0 -> ignore(Lib.add_leaf id0 (inMD gtacl)) + | _ -> Lib.add_anonymous_leaf (inMD gtacl) in List.iter - (fun (id,_) -> Options.if_verbose msgnl (pr_id id ++ str " is defined")) - rfun + (fun (id,b,_) -> + Flags.if_verbose msgnl (Libnames.pr_reference id ++ + (if b then str " is redefined" + else str " is defined"))) + tacl (***************************************************************************) (* Other entry points *) @@ -2629,13 +2776,13 @@ let add_tacdef isrec tacl = let glob_tactic x = intern_tactic (make_empty_glob_sign ()) x let glob_tactic_env l env x = - Options.with_option strict_check + Flags.with_option strict_check (intern_tactic { ltacvars = (l,[]); ltacrecvars = []; gsigma = Evd.empty; genv = env }) x let interp_redexp env sigma r = - let ist = { lfun=[]; debug=get_debug () } in + let ist = { lfun=[]; avoid_ids=[]; debug=get_debug (); last_loc=dloc } in let gist = {(make_empty_glob_sign ()) with genv = env; gsigma = sigma } in interp_red_expr ist sigma env (intern_red_expr gist r) @@ -2645,10 +2792,10 @@ let interp_redexp env sigma r = let _ = Auto.set_extern_interp (fun l -> let l = List.map (fun (id,c) -> (id,VConstr c)) l in - interp_tactic {lfun=l;debug=get_debug()}) + interp_tactic {lfun=l;avoid_ids=[];debug=get_debug(); last_loc=dloc}) let _ = Auto.set_extern_intern_tac (fun l -> - Options.with_option strict_check + Flags.with_option strict_check (intern_tactic {(make_empty_glob_sign()) with ltacvars=(l,[])})) let _ = Auto.set_extern_subst_tactic subst_tactic let _ = Dhyp.set_extern_interp eval_tactic diff --git a/tactics/tacinterp.mli b/tactics/tacinterp.mli index 01e7750a..87aa85dc 100644 --- a/tactics/tacinterp.mli +++ b/tactics/tacinterp.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: tacinterp.mli 9178 2006-09-26 11:18:22Z barras $ i*) +(*i $Id: tacinterp.mli 10919 2008-05-11 22:04:26Z msozeau $ i*) (*i*) open Dyn @@ -35,12 +35,14 @@ type value = | VConstr of constr | VConstr_context of constr | VList of value list - | VRec of value ref + | VRec of (identifier*value) list ref * glob_tactic_expr (* Signature for interpretation: val\_interp and interpretation functions *) and interp_sign = { lfun : (identifier * value) list; - debug : debug_info } + avoid_ids : identifier list; + debug : debug_info; + last_loc : loc } (* Transforms an id into a constr if possible *) val constr_of_id : Environ.env -> identifier -> constr @@ -61,16 +63,16 @@ val get_debug : unit -> debug_info (* Adds a definition for tactics in the table *) val add_tacdef : - bool -> (identifier Util.located * raw_tactic_expr) list -> unit + bool -> (Libnames.reference * bool * raw_tactic_expr) list -> unit val add_primitive_tactic : string -> glob_tactic_expr -> unit (* Tactic extensions *) val add_tactic : - string -> (closed_generic_argument list -> tactic) -> unit + string -> (typed_generic_argument list -> tactic) -> unit val overwriting_add_tactic : - string -> (closed_generic_argument list -> tactic) -> unit + string -> (typed_generic_argument list -> tactic) -> unit val lookup_tactic : - string -> (closed_generic_argument list) -> tactic + string -> (typed_generic_argument list) -> tactic (* Adds an interpretation function for extra generic arguments *) type glob_sign = { @@ -83,12 +85,12 @@ val add_interp_genarg : string -> (glob_sign -> raw_generic_argument -> glob_generic_argument) * (interp_sign -> goal sigma -> glob_generic_argument -> - closed_generic_argument) * + typed_generic_argument) * (substitution -> glob_generic_argument -> glob_generic_argument) -> unit val interp_genarg : - interp_sign -> goal sigma -> glob_generic_argument -> closed_generic_argument + interp_sign -> goal sigma -> glob_generic_argument -> typed_generic_argument val intern_genarg : glob_sign -> raw_generic_argument -> glob_generic_argument @@ -119,7 +121,7 @@ val interp_ltac_constr : interp_sign -> goal sigma -> glob_tactic_expr -> val interp_redexp : Environ.env -> Evd.evar_map -> raw_red_expr -> red_expr (* Interprets tactic expressions *) -val interp_tac_gen : (identifier * value) list -> +val interp_tac_gen : (identifier * value) list -> identifier list -> debug_info -> raw_tactic_expr -> tactic val interp_hyp : interp_sign -> goal sigma -> identifier located -> identifier @@ -150,3 +152,14 @@ val declare_xml_printer : (* printing *) val print_ltac : Libnames.qualid -> std_ppcmds + +(* Internals that can be useful for syntax extensions. *) + +exception CannotCoerceTo of string + +val interp_ltac_var : (value -> 'a) -> interp_sign -> Environ.env option -> identifier located -> 'a + +val interp_int : interp_sign -> identifier located -> int + +val error_ltac_variable : loc -> identifier -> Environ.env option -> value -> string -> 'a + diff --git a/tactics/tacticals.ml b/tactics/tacticals.ml index 06289169..eeca6301 100644 --- a/tactics/tacticals.ml +++ b/tactics/tacticals.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: tacticals.ml 9211 2006-10-05 12:38:33Z letouzey $ *) +(* $Id: tacticals.ml 11166 2008-06-22 13:23:35Z herbelin $ *) open Pp open Util @@ -23,6 +23,7 @@ open Refiner open Tacmach open Clenv open Clenvtac +open Rawterm open Pattern open Matching open Evar_refiner @@ -37,6 +38,7 @@ open Tacexpr (* Tacticals re-exported from the Refiner module.*) (*************************************************) +let tclNORMEVAR = tclNORMEVAR let tclIDTAC = tclIDTAC let tclIDTAC_MESSAGE = tclIDTAC_MESSAGE let tclORELSE = tclORELSE @@ -90,6 +92,10 @@ let tclNTH_HYP m (tac : constr->tactic) gl = let tclLAST_HYP = tclNTH_HYP 1 +let tclLAST_NHYPS n tac gl = + tac (try list_firstn n (pf_ids_of_hyps gl) + with Failure _ -> error "No such assumptions") gl + let tclTRY_sign (tac : constr->tactic) sign gl = let rec arec = function | [] -> tclFAIL 0 (str "no applicable hypothesis") @@ -118,17 +124,21 @@ let tclTRY_HYPS (tac : constr->tactic) gl = type simple_clause = identifier gsimple_clause type clause = identifier gclause -let allClauses = { onhyps=None; onconcl=true; concl_occs=[] } -let allHyps = { onhyps=None; onconcl=false; concl_occs=[] } -let onHyp id = { onhyps=Some[(([],id),InHyp)]; onconcl=false; concl_occs=[] } -let onConcl = { onhyps=Some[]; onconcl=true; concl_occs=[] } +let allClauses = { onhyps=None; concl_occs=all_occurrences_expr } +let allHyps = { onhyps=None; concl_occs=no_occurrences_expr } +let onConcl = { onhyps=Some[]; concl_occs=all_occurrences_expr } +let onHyp id = + { onhyps=Some[((all_occurrences_expr,id),InHyp)]; concl_occs=no_occurrences_expr } let simple_clause_list_of cl gls = let hyps = match cl.onhyps with - None -> List.map (fun id -> Some(([],id),InHyp)) (pf_ids_of_hyps gls) - | Some l -> List.map (fun h -> Some h) l in - if cl.onconcl then None::hyps else hyps + | None -> + let f id = Some((all_occurrences_expr,id),InHyp) in + List.map f (pf_ids_of_hyps gls) + | Some l -> + List.map (fun h -> Some h) l in + if cl.concl_occs = all_occurrences_expr then None::hyps else hyps (* OR-branch *) @@ -315,16 +325,12 @@ let elimination_sort_of_hyp id gl = (* Find the right elimination suffix corresponding to the sort of the goal *) (* c should be of type A1->.. An->B with B an inductive definition *) -let last_arg c = match kind_of_term c with - | App (f,cl) -> array_last cl - | _ -> anomaly "last_arg" - -let general_elim_then_using - elim isrec allnames tac predicate (indbindings,elimbindings) c gl = - let (ity,t) = pf_reduce_to_quantified_ind gl (pf_type_of gl c) in +let general_elim_then_using mk_elim + isrec allnames tac predicate (indbindings,elimbindings) + ind indclause gl = + let elim = mk_elim ind gl in (* applying elimination_scheme just a little modified *) - let indclause = mk_clenv_from gl (c,t) in - let indclause' = clenv_constrain_with_bindings indbindings indclause in + let indclause' = clenv_match_args indbindings indclause in let elimclause = mk_clenv_from gl (elim,pf_type_of gl elim) in let indmv = match kind_of_term (last_arg elimclause.templval.Evd.rebus) with @@ -345,8 +351,8 @@ let general_elim_then_using error ("The elimination combinator " ^ name_elim ^ " is not known") in let elimclause' = clenv_fchain indmv elimclause indclause' in - let elimclause' = clenv_constrain_with_bindings elimbindings elimclause' in - let branchsigns = compute_construtor_signatures isrec ity in + let elimclause' = clenv_match_args elimbindings elimclause' in + let branchsigns = compute_construtor_signatures isrec ind in let brnames = compute_induction_names (Array.length branchsigns) allnames in let after_tac ce i gl = let (hd,largs) = decompose_app ce.templtyp.Evd.rebus in @@ -357,7 +363,7 @@ let general_elim_then_using (fun acc b -> if b then acc+2 else acc+1) 0 branchsigns.(i); branchnum = i+1; - ity = ity; + ity = ind; largs = List.map (clenv_nf_meta ce) largs; pred = clenv_nf_meta ce hd } in @@ -372,37 +378,32 @@ let general_elim_then_using in elim_res_pf_THEN_i elimclause' branchtacs gl +(* computing the case/elim combinators *) + +let gl_make_elim ind gl = + Indrec.lookup_eliminator ind (elimination_sort_of_goal gl) + +let gl_make_case_dep ind gl = + pf_apply Indrec.make_case_dep gl ind (elimination_sort_of_goal gl) -let elimination_then_using tac predicate (indbindings,elimbindings) c gl = +let gl_make_case_nodep ind gl = + pf_apply Indrec.make_case_nodep gl ind (elimination_sort_of_goal gl) + +let elimination_then_using tac predicate bindings c gl = let (ind,t) = pf_reduce_to_quantified_ind gl (pf_type_of gl c) in - let elim = - Indrec.lookup_eliminator ind (elimination_sort_of_goal gl) in - general_elim_then_using - elim true IntroAnonymous tac predicate (indbindings,elimbindings) c gl + let indclause = mk_clenv_from gl (c,t) in + general_elim_then_using gl_make_elim + true IntroAnonymous tac predicate bindings ind indclause gl +let case_then_using = + general_elim_then_using gl_make_case_dep false + +let case_nodep_then_using = + general_elim_then_using gl_make_case_nodep false let elimination_then tac = elimination_then_using tac None let simple_elimination_then tac = elimination_then tac ([],[]) -let case_then_using allnames tac predicate (indbindings,elimbindings) c gl = - (* finding the case combinator *) - let (ity,t) = pf_reduce_to_quantified_ind gl (pf_type_of gl c) in - let sigma = project gl in - let sort = elimination_sort_of_goal gl in - let elim = Indrec.make_case_dep (pf_env gl) sigma ity sort in - general_elim_then_using - elim false allnames tac predicate (indbindings,elimbindings) c gl - -let case_nodep_then_using allnames tac predicate (indbindings,elimbindings) - c gl = - (* finding the case combinator *) - let (ity,t) = pf_reduce_to_quantified_ind gl (pf_type_of gl c) in - let sigma = project gl in - let sort = elimination_sort_of_goal gl in - let elim = Indrec.make_case_nodep (pf_env gl) sigma ity sort in - general_elim_then_using - elim false allnames tac predicate (indbindings,elimbindings) c gl - let make_elim_branch_assumptions ba gl = let rec makerec (assums,cargs,constargs,recargs,indargs) lb lc = diff --git a/tactics/tacticals.mli b/tactics/tacticals.mli index 458ab732..e97abe9f 100644 --- a/tactics/tacticals.mli +++ b/tactics/tacticals.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: tacticals.mli 9211 2006-10-05 12:38:33Z letouzey $ i*) +(*i $Id: tacticals.mli 10785 2008-04-13 21:41:54Z herbelin $ i*) (*i*) open Pp @@ -24,6 +24,7 @@ open Tacexpr (* Tacticals i.e. functions from tactics to tactics. *) +val tclNORMEVAR : tactic val tclIDTAC : tactic val tclIDTAC_MESSAGE : std_ppcmds -> tactic val tclORELSE : tactic -> tactic -> tactic @@ -57,6 +58,7 @@ val tclTHENTRY : tactic -> tactic -> tactic val tclNTH_HYP : int -> (constr -> tactic) -> tactic val tclMAP : ('a -> tactic) -> 'a list -> tactic val tclLAST_HYP : (constr -> tactic) -> tactic +val tclLAST_NHYPS : int -> (identifier list -> tactic) -> tactic val tclTRY_sign : (constr -> tactic) -> named_context -> tactic val tclTRY_HYPS : (constr -> tactic) -> tactic @@ -136,9 +138,9 @@ val elimination_sort_of_goal : goal sigma -> sorts_family val elimination_sort_of_hyp : identifier -> goal sigma -> sorts_family val general_elim_then_using : - constr -> (* isrec: *) bool -> intro_pattern_expr -> + (inductive -> goal sigma -> constr) -> rec_flag -> intro_pattern_expr -> (branch_args -> tactic) -> constr option -> - (arg_bindings * arg_bindings) -> constr -> tactic + (arg_bindings * arg_bindings) -> inductive -> clausenv -> tactic val elimination_then_using : (branch_args -> tactic) -> constr option -> @@ -150,11 +152,13 @@ val elimination_then : val case_then_using : intro_pattern_expr -> (branch_args -> tactic) -> - constr option -> (arg_bindings * arg_bindings) -> constr -> tactic + constr option -> (arg_bindings * arg_bindings) -> + inductive -> clausenv -> tactic val case_nodep_then_using : intro_pattern_expr -> (branch_args -> tactic) -> - constr option -> (arg_bindings * arg_bindings) -> constr -> tactic + constr option -> (arg_bindings * arg_bindings) -> + inductive -> clausenv -> tactic val simple_elimination_then : (branch_args -> tactic) -> constr -> tactic diff --git a/tactics/tactics.ml b/tactics/tactics.ml index c863a453..88274ef6 100644 --- a/tactics/tactics.ml +++ b/tactics/tactics.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: tactics.ml 9853 2007-05-23 14:25:47Z letouzey $ *) +(* $Id: tactics.ml 11166 2008-06-22 13:23:35Z herbelin $ *) open Pp open Util @@ -42,6 +42,8 @@ open Tacexpr open Decl_kinds open Evarutil open Indrec +open Pretype_errors +open Unification exception Bound @@ -54,6 +56,25 @@ let rec nb_prod x = | _ -> n in count 0 x +let inj_with_occurrences e = (all_occurrences_expr,e) + +let inj_open c = (Evd.empty,c) + +let inj_occ (occ,c) = (occ,inj_open c) + +let inj_red_expr = function + | Simpl lo -> Simpl (Option.map inj_occ lo) + | Fold l -> Fold (List.map inj_open l) + | Pattern l -> Pattern (List.map inj_occ l) + | (ExtraRedExpr _ | CbvVm | Red _ | Hnf | Cbv _ | Lazy _ | Unfold _ as c) + -> c + +let inj_ebindings = function + | NoBindings -> NoBindings + | ImplicitBindings l -> ImplicitBindings (List.map inj_open l) + | ExplicitBindings l -> + ExplicitBindings (List.map (fun (l,id,c) -> (l,id,inj_open c)) l) + (*********************************************) (* Tactics *) (*********************************************) @@ -149,7 +170,7 @@ let reduct_in_concl (redfun,sty) gl = let reduct_in_hyp redfun ((_,id),where) gl = let (_,c, ty) = pf_get_hyp gl id in - let redfun' = (*under_casts*) (pf_reduce redfun gl) in + let redfun' = pf_reduce redfun gl in match c with | None -> if where = InHypValueOnly then @@ -195,7 +216,8 @@ let change_option occl t = function let change occl c cls = (match cls, occl with - ({onhyps=(Some(_::_::_)|None)}|{onhyps=Some(_::_);onconcl=true}), + ({onhyps=(Some(_::_::_)|None)} + |{onhyps=Some(_::_);concl_occs=((false,_)|(true,_::_))}), Some _ -> error "No occurrences expected when changing several hypotheses" | _ -> ()); @@ -208,9 +230,9 @@ let red_option = reduct_option (red_product,DEFAULTcast) let hnf_in_concl = reduct_in_concl (hnf_constr,DEFAULTcast) let hnf_in_hyp = reduct_in_hyp hnf_constr let hnf_option = reduct_option (hnf_constr,DEFAULTcast) -let simpl_in_concl = reduct_in_concl (nf,DEFAULTcast) -let simpl_in_hyp = reduct_in_hyp nf -let simpl_option = reduct_option (nf,DEFAULTcast) +let simpl_in_concl = reduct_in_concl (simpl,DEFAULTcast) +let simpl_in_hyp = reduct_in_hyp simpl +let simpl_option = reduct_option (simpl,DEFAULTcast) let normalise_in_concl = reduct_in_concl (compute,DEFAULTcast) let normalise_in_hyp = reduct_in_hyp compute let normalise_option = reduct_option (compute,DEFAULTcast) @@ -237,8 +259,8 @@ let reduce redexp cl goal = (* Unfolding occurrences of a constant *) let unfold_constr = function - | ConstRef sp -> unfold_in_concl [[],EvalConstRef sp] - | VarRef id -> unfold_in_concl [[],EvalVarRef id] + | ConstRef sp -> unfold_in_concl [all_occurrences,EvalConstRef sp] + | VarRef id -> unfold_in_concl [all_occurrences,EvalVarRef id] | _ -> errorlabstrm "unfold_constr" (str "Cannot unfold a non-constant.") (*******************************************) @@ -340,7 +362,7 @@ let intros = tclREPEAT (intro_force false) let intro_erasing id = tclTHEN (thin [id]) (introduction id) -let intros_replacing ids gls = +let intros_replacing ids gl = let rec introrec = function | [] -> tclIDTAC | id::tl -> @@ -349,7 +371,7 @@ let intros_replacing ids gls = (intro_using id))) (introrec tl)) in - introrec ids gls + introrec ids gl (* User-level introduction tactics *) @@ -381,7 +403,7 @@ let is_quantified_hypothesis id g = let msg_quantified_hypothesis = function | NamedHyp id -> - str "hypothesis " ++ pr_id id + str "quantified hypothesis named " ++ pr_id id | AnonHyp n -> int n ++ str (match n with 1 -> "st" | 2 -> "nd" | _ -> "th") ++ str " non dependent hypothesis" @@ -392,8 +414,8 @@ let depth_of_quantified_hypothesis red h gl = | None -> errorlabstrm "lookup_quantified_hypothesis" (str "No " ++ msg_quantified_hypothesis h ++ - str " in current goal" ++ - if red then str " even after head-reduction" else mt ()) + strbrk " in current goal" ++ + if red then strbrk " even after head-reduction" else mt ()) let intros_until_gen red h g = tclDO (depth_of_quantified_hypothesis red h g) intro g @@ -447,6 +469,21 @@ let rec intros_rmove = function move_to_rhyp destopt; intros_rmove rest ] +(* Apply a tactic on a quantified hypothesis, an hypothesis in context + or a term with bindings *) + +let onInductionArg tac = function + | ElimOnConstr (c,lbindc as cbl) -> + if isVar c & lbindc = NoBindings then + tclTHEN (tclTRY (intros_until_id (destVar c))) (tac cbl) + else + tac cbl + | ElimOnAnonHyp n -> + tclTHEN (intros_until_n n) (tclLAST_HYP (fun c -> tac (c,NoBindings))) + | ElimOnIdent (_,id) -> + (*Identifier apart because id can be quantified in goal and not typable*) + tclTHEN (tclTRY (intros_until_id id)) (tac (mkVar id,NoBindings)) + (**************************) (* Refinement tactics *) (**************************) @@ -504,55 +541,228 @@ let cut_in_parallel l = prec (List.rev l) let error_uninstantiated_metas t clenv = - let na = meta_name clenv.env (List.hd (Metaset.elements (metavars_of t))) in + let na = meta_name clenv.evd (List.hd (Metaset.elements (metavars_of t))) in let id = match na with Name id -> id | _ -> anomaly "unnamed dependent meta" in errorlabstrm "" (str "cannot find an instance for " ++ pr_id id) -let clenv_refine_in id clenv gl = +let clenv_refine_in with_evars id clenv gl = + let clenv = clenv_pose_dependent_evars with_evars clenv in let new_hyp_typ = clenv_type clenv in - if occur_meta new_hyp_typ then error_uninstantiated_metas new_hyp_typ clenv; + if not with_evars & occur_meta new_hyp_typ then + error_uninstantiated_metas new_hyp_typ clenv; let new_hyp_prf = clenv_value clenv in tclTHEN - (tclEVARS (evars_of clenv.env)) + (tclEVARS (evars_of clenv.evd)) (cut_replacing id new_hyp_typ (fun x gl -> refine_no_check new_hyp_prf gl)) gl + +(********************************************) +(* Elimination tactics *) +(********************************************) + +let last_arg c = match kind_of_term c with + | App (f,cl) -> + array_last cl + | _ -> anomaly "last_arg" + +let elim_flags = { + modulo_conv_on_closed_terms = Some full_transparent_state; + use_metas_eagerly = true; + modulo_delta = empty_transparent_state; +} + +let elimination_clause_scheme with_evars allow_K elimclause indclause gl = + let indmv = + (match kind_of_term (last_arg elimclause.templval.rebus) with + | Meta mv -> mv + | _ -> errorlabstrm "elimination_clause" + (str "The type of elimination clause is not well-formed")) + in + let elimclause' = clenv_fchain indmv elimclause indclause in + res_pf elimclause' ~with_evars:with_evars ~allow_K:allow_K ~flags:elim_flags + gl + +(* cast added otherwise tactics Case (n1,n2) generates (?f x y) and + * refine fails *) + +let type_clenv_binding wc (c,t) lbind = + clenv_type (make_clenv_binding wc (c,t) lbind) + +(* + * Elimination tactic with bindings and using an arbitrary + * elimination constant called elimc. This constant should end + * with a clause (x:I)(P .. ), where P is a bound variable. + * The term c is of type t, which is a product ending with a type + * matching I, lbindc are the expected terms for c arguments + *) + +let general_elim_clause elimtac (c,lbindc) (elimc,lbindelimc) gl = + let ct = pf_type_of gl c in + let t = try snd (pf_reduce_to_quantified_ind gl ct) with UserError _ -> ct in + let indclause = make_clenv_binding gl (c,t) lbindc in + let elimt = pf_type_of gl elimc in + let elimclause = make_clenv_binding gl (elimc,elimt) lbindelimc in + elimtac elimclause indclause gl + +let general_elim with_evars c e ?(allow_K=true) = + general_elim_clause (elimination_clause_scheme with_evars allow_K) c e + +(* Elimination tactic with bindings but using the default elimination + * constant associated with the type. *) + +let find_eliminator c gl = + let (ind,t) = pf_reduce_to_quantified_ind gl (pf_type_of gl c) in + lookup_eliminator ind (elimination_sort_of_goal gl) + +let default_elim with_evars (c,_ as cx) gl = + general_elim with_evars cx (find_eliminator c gl,NoBindings) gl + +let elim_in_context with_evars c = function + | Some elim -> general_elim with_evars c elim ~allow_K:true + | None -> default_elim with_evars c + +let elim with_evars (c,lbindc as cx) elim = + match kind_of_term c with + | Var id when lbindc = NoBindings -> + tclTHEN (tclTRY (intros_until_id id)) + (elim_in_context with_evars cx elim) + | _ -> elim_in_context with_evars cx elim + +(* The simplest elimination tactic, with no substitutions at all. *) + +let simplest_elim c = default_elim false (c,NoBindings) + +(* Elimination in hypothesis *) +(* Typically, elimclause := (eq_ind ?x ?P ?H ?y ?Heq : ?P ?y) + indclause : forall ..., hyps -> a=b (to take place of ?Heq) + id : phi(a) (to take place of ?H) + and the result is to overwrite id with the proof of phi(b) + + but this generalizes to any elimination scheme with one constructor + (e.g. it could replace id:A->B->C by id:C, knowing A/\B) +*) + +let elimination_in_clause_scheme with_evars id elimclause indclause gl = + let (hypmv,indmv) = + match clenv_independent elimclause with + [k1;k2] -> (k1,k2) + | _ -> errorlabstrm "elimination_clause" + (str "The type of elimination clause is not well-formed") in + let elimclause' = clenv_fchain indmv elimclause indclause in + let hyp = mkVar id in + let hyp_typ = pf_type_of gl hyp in + let hypclause = mk_clenv_from_n gl (Some 0) (hyp, hyp_typ) in + let elimclause'' = + clenv_fchain ~allow_K:false ~flags:elim_flags hypmv elimclause' hypclause in + let new_hyp_typ = clenv_type elimclause'' in + if eq_constr hyp_typ new_hyp_typ then + errorlabstrm "general_rewrite_in" + (str "Nothing to rewrite in " ++ pr_id id); + clenv_refine_in with_evars id elimclause'' gl + +let general_elim_in with_evars id = + general_elim_clause (elimination_in_clause_scheme with_evars id) + +(* Case analysis tactics *) + +let general_case_analysis_in_context with_evars (c,lbindc) gl = + let (mind,_) = pf_reduce_to_quantified_ind gl (pf_type_of gl c) in + let sort = elimination_sort_of_goal gl in + let case = + if occur_term c (pf_concl gl) then make_case_dep else make_case_gen in + let elim = pf_apply case gl mind sort in + general_elim with_evars (c,lbindc) (elim,NoBindings) gl + +let general_case_analysis with_evars (c,lbindc as cx) = + match kind_of_term c with + | Var id when lbindc = NoBindings -> + tclTHEN (tclTRY (intros_until_id id)) + (general_case_analysis_in_context with_evars cx) + | _ -> + general_case_analysis_in_context with_evars cx + +let simplest_case c = general_case_analysis false (c,NoBindings) + (****************************************************) (* Resolution tactics *) (****************************************************) (* Resolution with missing arguments *) -let apply_with_bindings (c,lbind) gl = +let general_apply with_delta with_destruct with_evars (c,lbind) gl = + let flags = + if with_delta then default_unify_flags else default_no_delta_unify_flags in (* The actual type of the theorem. It will be matched against the goal. If this fails, then the head constant will be unfolded step by step. *) + let concl_nprod = nb_prod (pf_concl gl) in + let rec try_main_apply c gl = let thm_ty0 = nf_betaiota (pf_type_of gl c) in - let rec try_apply thm_ty = - try - let n = nb_prod thm_ty - nb_prod (pf_concl gl) in - if n<0 then error "Apply: theorem has not enough premisses."; - let clause = make_clenv_binding_apply gl (Some n) (c,thm_ty) lbind in - Clenvtac.res_pf clause gl - with (Pretype_errors.PretypeError _|RefinerError _|UserError _|Failure _) as exn -> - let red_thm = - try red_product (pf_env gl) (project gl) thm_ty - with (Redelimination | UserError _) -> raise exn in - try_apply red_thm in - try try_apply thm_ty0 - with (Pretype_errors.PretypeError _|RefinerError _|UserError _|Failure _) -> - (* Last chance: if the head is a variable, apply may try - second order unification *) - let clause = make_clenv_binding_apply gl None (c,thm_ty0) lbind in - Clenvtac.res_pf clause gl - -let apply c = apply_with_bindings (c,NoBindings) + let try_apply thm_ty nprod = + let n = nb_prod thm_ty - nprod in + if n<0 then error "Apply: theorem has not enough premisses."; + let clause = make_clenv_binding_apply gl (Some n) (c,thm_ty) lbind in + Clenvtac.res_pf clause ~with_evars:with_evars ~flags:flags gl in + try try_apply thm_ty0 concl_nprod + with PretypeError _|RefinerError _|UserError _|Failure _ as exn -> + let rec try_red_apply thm_ty = + try + (* Try to head-reduce the conclusion of the theorem *) + let red_thm = try_red_product (pf_env gl) (project gl) thm_ty in + try try_apply red_thm concl_nprod + with PretypeError _|RefinerError _|UserError _|Failure _ -> + try_red_apply red_thm + with Redelimination -> + (* Last chance: if the head is a variable, apply may try + second order unification *) + try if concl_nprod <> 0 then try_apply thm_ty 0 else raise Exit + with PretypeError _|RefinerError _|UserError _|Failure _|Exit -> + if with_destruct then + try + let (mind,t) = pf_reduce_to_quantified_ind gl (pf_type_of gl c) in + match match_with_conjunction (snd (decompose_prod t)) with + | Some _ -> + let n = (mis_constr_nargs mind).(0) in + let sort = elimination_sort_of_goal gl in + let elim = pf_apply make_case_gen gl mind sort in + tclTHENLAST + (general_elim with_evars (c,NoBindings) (elim,NoBindings)) + (tclTHENLIST [ + tclDO n intro; + tclLAST_NHYPS n (fun l -> + tclFIRST + (List.map (fun id -> + tclTHEN (try_main_apply (mkVar id)) (thin l)) l)) + ]) gl + | None -> + raise Exit + with RefinerError _|UserError _|Exit -> raise exn + else + raise exn + in + try_red_apply thm_ty0 in + try_main_apply c gl + +let apply_with_ebindings_gen b = general_apply b b + +let apply_with_ebindings = apply_with_ebindings_gen false false +let eapply_with_ebindings = apply_with_ebindings_gen false true + +let apply_with_bindings (c,bl) = + apply_with_ebindings (c,inj_ebindings bl) + +let eapply_with_bindings (c,bl) = + apply_with_ebindings_gen false true (c,inj_ebindings bl) + +let apply c = + apply_with_ebindings (c,NoBindings) let apply_list = function | c::l -> apply_with_bindings (c,ImplicitBindings l) | _ -> assert false -(* Resolution with no reduction on the type *) +(* Resolution with no reduction on the type (used ?) *) let apply_without_reduce c gl = let clause = mk_clenv_type_of gl c in @@ -576,20 +786,27 @@ let find_matching_clause unifier clause = with NotExtensibleClause -> failwith "Cannot apply" in find clause -let apply_in_once gls innerclause (d,lbind) = - let thm = nf_betaiota (pf_type_of gls d) in - let clause = make_clenv_binding gls (d,thm) lbind in +let progress_with_clause innerclause clause = let ordered_metas = List.rev (clenv_independent clause) in if ordered_metas = [] then error "Statement without assumptions"; let f mv = find_matching_clause (clenv_fchain mv clause) innerclause in try list_try_find f ordered_metas with Failure _ -> error "Unable to unify" -let apply_in id lemmas gls = - let t' = pf_get_hyp_typ gls id in - let innermostclause = mk_clenv_from_n gls (Some 0) (mkVar id,t') in - let clause = List.fold_left (apply_in_once gls) innermostclause lemmas in - clenv_refine_in id clause gls +let apply_in_once gl innerclause (d,lbind) = + let thm = nf_betaiota (pf_type_of gl d) in + let rec aux clause = + try progress_with_clause innerclause clause + with err -> + try aux (clenv_push_prod clause) + with NotExtensibleClause -> raise err + in aux (make_clenv_binding gl (d,thm) lbind) + +let apply_in with_evars id lemmas gl = + let t' = pf_get_hyp_typ gl id in + let innermostclause = mk_clenv_from_n gl (Some 0) (mkVar id,t') in + let clause = List.fold_left (apply_in_once gl) innermostclause lemmas in + clenv_refine_in with_evars id clause gl (* A useful resolution tactic which, if c:A->B, transforms |- C into |- B -> C and |- A @@ -612,7 +829,6 @@ let cut_and_apply c gl = let goal_constr = pf_concl gl in match kind_of_term (pf_hnf_constr gl (pf_type_of gl c)) with | Prod (_,c1,c2) when not (dependent (mkRel 1) c2) -> - let c2 = refresh_universes c2 in tclTHENLAST (apply_type (mkProd (Anonymous,c2,goal_constr)) [mkMeta(new_meta())]) (apply_term c [mkMeta (new_meta())]) gl @@ -681,21 +897,43 @@ let rec intros_clearing = function tclTHENLIST [ intro; onLastHyp (fun id -> clear [id]); intros_clearing tl] -(* Adding new hypotheses *) - -let new_hyp mopt (c,lbind) g = - let clause = make_clenv_binding g (c,pf_type_of g c) lbind in - let (thd,tstack) = whd_stack (clenv_value clause) in - let nargs = List.length tstack in - let cut_pf = - applist(thd, - match mopt with - | Some m -> if m < nargs then list_firstn m tstack else tstack - | None -> tstack) - in - (tclTHENLAST (tclTHEN (tclEVARS (evars_of clause.env)) - (cut (pf_type_of g cut_pf))) - ((tclORELSE (apply cut_pf) (exact_no_check cut_pf)))) g +(* Modifying/Adding an hypothesis *) + +let specialize mopt (c,lbind) g = + let evars, term = + if lbind = NoBindings then None, c + else + let clause = make_clenv_binding g (c,pf_type_of g c) lbind in + let clause = clenv_unify_meta_types clause in + let (thd,tstack) = whd_stack (clenv_value clause) in + let nargs = List.length tstack in + let tstack = match mopt with + | Some m -> + if m < nargs then list_firstn m tstack else tstack + | None -> + let rec chk = function + | [] -> [] + | t::l -> if occur_meta t then [] else t :: chk l + in chk tstack + in + let term = applist(thd,tstack) in + if occur_meta term then + errorlabstrm "" (str "Cannot infer an instance for " ++ + pr_name (meta_name clause.evd (List.hd (collect_metas term)))); + Some (evars_of clause.evd), term + in + tclTHEN + (match evars with Some e -> tclEVARS e | _ -> tclIDTAC) + (match kind_of_term (fst (decompose_app c)) with + | Var id when List.exists (fun (i,_,_)-> i=id) (pf_hyps g) -> + let id' = fresh_id [] id g in + tclTHENS (fun g -> internal_cut id' (pf_type_of g term) g) + [ exact_no_check term; + tclTHEN (clear [id]) (rename_hyp [id',id]) ] + | _ -> tclTHENLAST + (fun g -> cut (pf_type_of g term) g) + (exact_no_check term)) + g (* Keeping only a few hypotheses *) @@ -716,180 +954,112 @@ let keep hyps gl = (* Introduction tactics *) (************************) -let constructor_tac boundopt i lbind gl = +let check_number_of_constructors expctdnumopt i nconstr = + if i=0 then error "The constructors are numbered starting from 1"; + begin match expctdnumopt with + | Some n when n <> nconstr -> + error ("Not an inductive goal with "^ + string_of_int n^plural n " constructor") + | _ -> () + end; + if i > nconstr then error "Not enough constructors" + +let constructor_tac with_evars expctdnumopt i lbind gl = let cl = pf_concl gl in let (mind,redcl) = pf_reduce_to_quantified_ind gl cl in let nconstr = Array.length (snd (Global.lookup_inductive mind)).mind_consnames in - if i=0 then error "The constructors are numbered starting from 1"; - if i > nconstr then error "Not enough constructors"; - begin match boundopt with - | Some expctdnum -> - if expctdnum <> nconstr then - error "Not the expected number of constructors" - | None -> () - end; + check_number_of_constructors expctdnumopt i nconstr; let cons = mkConstruct (ith_constructor_of_inductive mind i) in - let apply_tac = apply_with_bindings (cons,lbind) in + let apply_tac = general_apply true false with_evars (cons,lbind) in (tclTHENLIST [convert_concl_no_check redcl DEFAULTcast; intros; apply_tac]) gl -let one_constructor i = constructor_tac None i +let one_constructor i = constructor_tac false None i (* Try to apply the constructor of the inductive definition followed by a tactic t given as an argument. Should be generalize in Constructor (Fun c : I -> tactic) *) -let any_constructor tacopt gl = +let any_constructor with_evars tacopt gl = let t = match tacopt with None -> tclIDTAC | Some t -> t in let mind = fst (pf_reduce_to_quantified_ind gl (pf_concl gl)) in let nconstr = Array.length (snd (Global.lookup_inductive mind)).mind_consnames in if nconstr = 0 then error "The type has no constructors"; - tclFIRST (List.map (fun i -> tclTHEN (one_constructor i NoBindings) t) - (interval 1 nconstr)) gl + tclFIRST + (List.map + (fun i -> tclTHEN (constructor_tac with_evars None i NoBindings) t) + (interval 1 nconstr)) gl -let left = constructor_tac (Some 2) 1 -let simplest_left = left NoBindings +let left_with_ebindings with_evars = constructor_tac with_evars (Some 2) 1 +let right_with_ebindings with_evars = constructor_tac with_evars (Some 2) 2 +let split_with_ebindings with_evars = constructor_tac with_evars (Some 1) 1 -let right = constructor_tac (Some 2) 2 -let simplest_right = right NoBindings +let left l = left_with_ebindings false (inj_ebindings l) +let simplest_left = left NoBindings -let split = constructor_tac (Some 1) 1 -let simplest_split = split NoBindings +let right l = right_with_ebindings false (inj_ebindings l) +let simplest_right = right NoBindings -(********************************************) -(* Elimination tactics *) -(********************************************) - -let last_arg c = match kind_of_term c with - | App (f,cl) -> - array_last cl - | _ -> anomaly "last_arg" - -let elimination_clause_scheme allow_K elimclause indclause gl = - let indmv = - (match kind_of_term (last_arg elimclause.templval.rebus) with - | Meta mv -> mv - | _ -> errorlabstrm "elimination_clause" - (str "The type of elimination clause is not well-formed")) - in - let elimclause' = clenv_fchain indmv elimclause indclause in - res_pf elimclause' ~allow_K:allow_K gl +let split l = split_with_ebindings false (inj_ebindings l) +let simplest_split = split NoBindings -(* cast added otherwise tactics Case (n1,n2) generates (?f x y) and - * refine fails *) - -let type_clenv_binding wc (c,t) lbind = - clenv_type (make_clenv_binding wc (c,t) lbind) - -(* - * Elimination tactic with bindings and using an arbitrary - * elimination constant called elimc. This constant should end - * with a clause (x:I)(P .. ), where P is a bound variable. - * The term c is of type t, which is a product ending with a type - * matching I, lbindc are the expected terms for c arguments - *) - -let general_elim_clause elimtac (c,lbindc) (elimc,lbindelimc) gl = - let ct = pf_type_of gl c in - let t = try snd (pf_reduce_to_quantified_ind gl ct) with UserError _ -> ct in - let indclause = make_clenv_binding gl (c,t) lbindc in - let elimt = pf_type_of gl elimc in - let elimclause = make_clenv_binding gl (elimc,elimt) lbindelimc in - elimtac elimclause indclause gl - -let general_elim c e ?(allow_K=true) = - general_elim_clause (elimination_clause_scheme allow_K) c e - -(* Elimination tactic with bindings but using the default elimination - * constant associated with the type. *) - -let find_eliminator c gl = - let (ind,t) = pf_reduce_to_quantified_ind gl (pf_type_of gl c) in - lookup_eliminator ind (elimination_sort_of_goal gl) - -let default_elim (c,_ as cx) gl = - general_elim cx (find_eliminator c gl,NoBindings) gl - -let elim_in_context c = function - | Some elim -> general_elim c elim ~allow_K:true - | None -> default_elim c - -let elim (c,lbindc as cx) elim = - match kind_of_term c with - | Var id when lbindc = NoBindings -> - tclTHEN (tclTRY (intros_until_id id)) (elim_in_context cx elim) - | _ -> elim_in_context cx elim - -(* The simplest elimination tactic, with no substitutions at all. *) - -let simplest_elim c = default_elim (c,NoBindings) - -(* Elimination in hypothesis *) -(* Typically, elimclause := (eq_ind ?x ?P ?H ?y ?Heq : ?P ?y) - indclause : forall ..., hyps -> a=b (to take place of ?Heq) - id : phi(a) (to take place of ?H) - and the result is to overwrite id with the proof of phi(b) - - but this generalizes to any elimination scheme with one constructor - (e.g. it could replace id:A->B->C by id:C, knowing A/\B) -*) - -let elimination_in_clause_scheme id elimclause indclause gl = - let (hypmv,indmv) = - match clenv_independent elimclause with - [k1;k2] -> (k1,k2) - | _ -> errorlabstrm "elimination_clause" - (str "The type of elimination clause is not well-formed") in - let elimclause' = clenv_fchain indmv elimclause indclause in - let hyp = mkVar id in - let hyp_typ = pf_type_of gl hyp in - let hypclause = mk_clenv_from_n gl (Some 0) (hyp, hyp_typ) in - let elimclause'' = clenv_fchain hypmv elimclause' hypclause in - let new_hyp_typ = clenv_type elimclause'' in - if eq_constr hyp_typ new_hyp_typ then - errorlabstrm "general_rewrite_in" - (str "Nothing to rewrite in " ++ pr_id id); - clenv_refine_in id elimclause'' gl - -let general_elim_in id = - general_elim_clause (elimination_in_clause_scheme id) - -(* Case analysis tactics *) - -let general_case_analysis_in_context (c,lbindc) gl = - let (mind,_) = pf_reduce_to_quantified_ind gl (pf_type_of gl c) in - let sort = elimination_sort_of_goal gl in - let case = - if occur_term c (pf_concl gl) then make_case_dep else make_case_gen in - let elim = pf_apply case gl mind sort in - general_elim (c,lbindc) (elim,NoBindings) gl - -let general_case_analysis (c,lbindc as cx) = - match kind_of_term c with - | Var id when lbindc = NoBindings -> - tclTHEN (tclTRY (intros_until_id id)) - (general_case_analysis_in_context cx) - | _ -> - general_case_analysis_in_context cx - -let simplest_case c = general_case_analysis (c,NoBindings) (*****************************) (* Decomposing introductions *) (*****************************) +let forward_general_multi_rewrite = + ref (fun _ -> failwith "general_multi_rewrite undefined") + +let register_general_multi_rewrite f = + forward_general_multi_rewrite := f + let clear_last = tclLAST_HYP (fun c -> (clear [destVar c])) let case_last = tclLAST_HYP simplest_case +let fix_empty_case nv l = + (* The syntax does not distinguish between "[ ]" for one clause with no names + and "[ ]" for no clause at all; so we are a bit liberal here *) + if Array.length nv = 0 & l = [[]] then [] else l + +let intro_or_and_pattern ll l' tac = + tclLAST_HYP (fun c gl -> + let ind,_ = pf_reduce_to_quantified_ind gl (pf_type_of gl c) in + let nv = mis_constr_nargs ind in + let rec adjust_names_length tail n = function + | [] when n = 0 or tail -> [] + | [] -> IntroAnonymous :: adjust_names_length tail (n-1) [] + | _ :: _ as l when n = 0 -> + if tail then l else error "Too many names in some branch" + | ip :: l -> ip :: adjust_names_length tail (n-1) l in + let ll = fix_empty_case nv ll in + if List.length ll <> Array.length nv then + error "Not the right number of patterns"; + tclTHENLASTn + (tclTHEN case_last clear_last) + (array_map2 (fun n l -> tac ((adjust_names_length (l'=[]) n l)@l')) + nv (Array.of_list ll)) + gl) + +let clear_if_atomic l2r id gl = + let eq = pf_type_of gl (mkVar id) in + let (_,lhs,rhs) = snd (find_eq_data_decompose eq) in + if l2r & isVar lhs then tclTRY (clear [destVar lhs;id]) gl + else if not l2r & isVar rhs then tclTRY (clear [destVar rhs;id]) gl + else tclIDTAC gl + let rec explicit_intro_names = function -| (IntroWildcard | IntroAnonymous) :: l -> explicit_intro_names l -| IntroIdentifier id :: l -> id :: explicit_intro_names l +| IntroIdentifier id :: l -> + id :: explicit_intro_names l +| (IntroWildcard | IntroAnonymous | IntroFresh _ | IntroRewrite _) :: l -> + explicit_intro_names l | IntroOrAndPattern ll :: l' -> List.flatten (List.map (fun l -> explicit_intro_names (l@l')) ll) -| [] -> [] +| [] -> + [] (* We delay thinning until the completion of the whole intros tactic to ensure that dependent hypotheses are cleared in the right @@ -911,12 +1081,23 @@ let rec intros_patterns avoid thin destopt = function tclTHEN (intro_gen (IntroAvoid (avoid@explicit_intro_names l)) destopt true) (intros_patterns avoid thin destopt l) + | IntroFresh id :: l -> + tclTHEN + (intro_gen (IntroBasedOn (id, avoid@explicit_intro_names l)) destopt true) + (intros_patterns avoid thin destopt l) | IntroOrAndPattern ll :: l' -> tclTHEN introf - (tclTHENS - (tclTHEN case_last clear_last) - (List.map (fun l -> intros_patterns avoid thin destopt (l@l')) ll)) + (intro_or_and_pattern ll l' (intros_patterns avoid thin destopt)) + | IntroRewrite l2r :: l -> + tclTHEN + (intro_gen (IntroAvoid (avoid@explicit_intro_names l)) None true) + (onLastHyp (fun id -> + tclTHENLIST [ + !forward_general_multi_rewrite l2r false (mkVar id,NoBindings) + allClauses; + clear_if_atomic l2r id; + intros_patterns avoid thin destopt l ])) | [] -> clear thin let intros_pattern = intros_patterns [] [] @@ -938,8 +1119,12 @@ let make_id s = fresh_id [] (match s with Prop _ -> hid | Type _ -> xid) let prepare_intros s ipat gl = match ipat with | IntroAnonymous -> make_id s gl, tclIDTAC + | IntroFresh id -> fresh_id [] id gl, tclIDTAC | IntroWildcard -> let id = make_id s gl in id, thin [id] | IntroIdentifier id -> id, tclIDTAC + | IntroRewrite l2r -> + let id = make_id s gl in + id, !forward_general_multi_rewrite l2r false (mkVar id,NoBindings) allClauses | IntroOrAndPattern ll -> make_id s gl, (tclTHENS (tclTHEN case_last clear_last) @@ -964,24 +1149,28 @@ let true_cut = assert_tac true (* Generalize tactics *) (**************************) -let generalize_goal gl c cl = - let t = refresh_universes (pf_type_of gl c) in - match kind_of_term c with - | Var id -> - (* The choice of remembering or not a non dependent name has an impact - on the future Intro naming strategy! *) - (* if dependent c cl then mkNamedProd id t cl - else mkProd (Anonymous,t,cl) *) - mkNamedProd id t cl - | _ -> - let cl' = subst_term c cl in - if noccurn 1 cl' then - mkProd (Anonymous,t,cl) - (* On ne se casse pas la tete : on prend pour nom de variable - la premiere lettre du type, meme si "ci" est une - constante et qu'on pourrait prendre directement son nom *) - else - prod_name (Global.env()) (Anonymous, t, cl') +let generalized_name c t cl = function + | Name id as na -> na + | Anonymous -> + match kind_of_term c with + | Var id -> + (* Keep the name even if not occurring: may be used by intros later *) + Name id + | _ -> + if noccurn 1 cl then Anonymous else + (* On ne s'etait pas casse la tete : on avait pris pour nom de + variable la premiere lettre du type, meme si "c" avait ete une + constante dont on aurait pu prendre directement le nom *) + named_hd (Global.env()) t Anonymous + +let generalize_goal gl i ((occs,c),na) cl = + let t = pf_type_of gl c in + let decls,cl = decompose_prod_n_assum i cl in + let dummy_prod = it_mkProd_or_LetIn mkProp decls in + let newdecls,_ = decompose_prod_n_assum i (subst_term c dummy_prod) in + let cl' = subst_term_occ occs c (it_mkProd_or_LetIn cl newdecls) in + let na = generalized_name c t cl' na in + mkProd (na,t,cl') let generalize_dep c gl = let env = pf_env gl in @@ -1004,16 +1193,23 @@ let generalize_dep c gl = | _ -> tothin in let cl' = it_mkNamedProd_or_LetIn (pf_concl gl) to_quantify in - let cl'' = generalize_goal gl c cl' in + let cl'' = generalize_goal gl 0 ((all_occurrences,c),Anonymous) cl' in let args = Array.to_list (instance_from_named_context to_quantify_rev) in tclTHEN (apply_type cl'' (c::args)) (thin (List.rev tothin')) gl - -let generalize lconstr gl = - let newcl = List.fold_right (generalize_goal gl) lconstr (pf_concl gl) in - apply_type newcl lconstr gl + +let generalize_gen lconstr gl = + let newcl = + list_fold_right_i (generalize_goal gl) 0 lconstr (pf_concl gl) in + apply_type newcl (List.map (fun ((_,c),_) -> c) lconstr) gl + +let generalize l = + generalize_gen (List.map (fun c -> ((all_occurrences,c),Anonymous)) l) + +let revert hyps gl = + tclTHEN (generalize (List.map mkVar hyps)) (clear hyps) gl (* Faudra-t-il une version avec plusieurs args de generalize_dep ? Cela peut-être troublant de faire "Generalize Dependent H n" dans @@ -1033,7 +1229,7 @@ let quantify lconstr = [letin_tac b na c (occ_hyp,occ_ccl) gl] transforms [...x1:T1(c),...,x2:T2(c),... |- G(c)] into - [...x:T;x1:T1(x),...,x2:T2(x),... |- G(x)] if [b] is false or + [...x:T;Heqx:(x=c);x1:T1(x),...,x2:T2(x),... |- G(x)] if [b] is false or [...x:=c:T;x1:T1(x),...,x2:T2(x),... |- G(x)] if [b] is true [occ_hyp,occ_ccl] tells which occurrences of [c] have to be substituted; @@ -1058,14 +1254,15 @@ let out_arg = function let occurrences_of_hyp id cls = let rec hyp_occ = function [] -> None - | ((occs,id'),hl)::_ when id=id' -> Some (List.map out_arg occs) + | (((b,occs),id'),hl)::_ when id=id' -> Some (b,List.map out_arg occs) | _::l -> hyp_occ l in match cls.onhyps with - None -> Some [] + None -> Some (all_occurrences) | Some l -> hyp_occ l let occurrences_of_goal cls = - if cls.onconcl then Some (List.map out_arg cls.concl_occs) else None + if cls.concl_occs = no_occurrences_expr then None + else Some (on_snd (List.map out_arg) cls.concl_occs) let in_every_hyp cls = (cls.onhyps=None) @@ -1134,7 +1331,7 @@ let letin_abstract id c occs gl = | None -> depdecls | Some occ -> let newdecl = subst_term_occ_decl occ c d in - if occ = [] & d = newdecl then + if occ = all_occurrences & d = newdecl then if not (in_every_hyp occs) then raise (RefinerError (DoesNotOccurIn (c,hyp))) else depdecls @@ -1154,23 +1351,62 @@ let letin_tac with_eq name c occs gl = if not (mem_named_context x (pf_hyps gl)) then x else error ("The variable "^(string_of_id x)^" is already declared") in let (depdecls,lastlhyp,ccl)= letin_abstract id c occs gl in - let t = refresh_universes (pf_type_of gl c) in - let newcl = mkNamedLetIn id c t ccl in + let t = pf_type_of gl c in + let newcl,eq_tac = match with_eq with + | Some lr -> + let heq = fresh_id [] (add_prefix "Heq" id) gl in + let eqdata = build_coq_eq_data () in + let args = if lr then [t;mkVar id;c] else [t;c;mkVar id]in + let eq = applist (eqdata.eq,args) in + let refl = applist (eqdata.refl, [t;mkVar id]) in + mkNamedLetIn id c t (mkLetIn (Name heq, refl, eq, ccl)), + tclTHEN (intro_gen (IntroMustBe heq) lastlhyp true) (thin_body [heq;id]) + | None -> + mkNamedLetIn id c t ccl, tclIDTAC in tclTHENLIST [ convert_concl_no_check newcl DEFAULTcast; intro_gen (IntroMustBe id) lastlhyp true; - if with_eq then tclIDTAC else thin_body [id]; + eq_tac; tclMAP convert_hyp_no_check depdecls ] gl (* Tactics "pose proof" (usetac=None) and "assert" (otherwise) *) let forward usetac ipat c gl = match usetac with | None -> - let t = refresh_universes (pf_type_of gl c) in + let t = pf_type_of gl c in tclTHENFIRST (assert_as true ipat t) (exact_no_check c) gl | Some tac -> tclTHENFIRST (assert_as true ipat c) tac gl +(*****************************) +(* Ad hoc unfold *) +(*****************************) + +(* The two following functions should already exist, but found nowhere *) +(* Unfolds x by its definition everywhere *) +let unfold_body x gl = + let hyps = pf_hyps gl in + let xval = + match Sign.lookup_named x hyps with + (_,Some xval,_) -> xval + | _ -> errorlabstrm "unfold_body" + (pr_id x ++ str" is not a defined hypothesis") in + let aft = afterHyp x gl in + let hl = List.fold_right (fun (y,yval,_) cl -> (([],y),InHyp) :: cl) aft [] in + let xvar = mkVar x in + let rfun _ _ c = replace_term xvar xval c in + tclTHENLIST + [tclMAP (fun h -> reduct_in_hyp rfun h) hl; + reduct_in_concl (rfun,DEFAULTcast)] gl + +(* Unfolds x by its definition everywhere and clear x. This may raise + an error if x is not defined. *) +let unfold_all x gl = + let (_,xval,_) = pf_get_hyp gl x in + (* If x has a body, simply replace x with body and clear x *) + if xval <> None then tclTHEN (unfold_body x) (clear [x]) gl + else tclIDTAC gl + (*****************************) (* High-level induction *) (*****************************) @@ -1208,7 +1444,7 @@ let forward usetac ipat c gl = *) let check_unused_names names = - if names <> [] & Options.is_verbose () then + if names <> [] & Flags.is_verbose () then let s = if List.tl names = [] then " " else "s " in msg_warning (str"Unused introduction pattern" ++ str s ++ @@ -1219,8 +1455,9 @@ let rec first_name_buggy = function | IntroOrAndPattern ([]::l) -> first_name_buggy (IntroOrAndPattern l) | IntroOrAndPattern ((p::_)::_) -> first_name_buggy p | IntroWildcard -> None + | IntroRewrite _ -> None | IntroIdentifier id -> Some id - | IntroAnonymous -> assert false + | IntroAnonymous | IntroFresh _ -> assert false let consume_pattern avoid id gl = function | [] -> (IntroIdentifier (fresh_id avoid id gl), []) @@ -1306,14 +1543,14 @@ let atomize_param_of_ind (indref,nparams) hyp0 gl = | Var id -> let x = fresh_id [] id gl in tclTHEN - (letin_tac true (Name x) (mkVar id) allClauses) + (letin_tac None (Name x) (mkVar id) allClauses) (atomize_one (i-1) ((mkVar x)::avoid)) gl | _ -> let id = id_of_name_using_hdchar (Global.env()) (pf_type_of gl c) Anonymous in let x = fresh_id [] id gl in tclTHEN - (letin_tac true (Name x) c allClauses) + (letin_tac None (Name x) c allClauses) (atomize_one (i-1) ((mkVar x)::avoid)) gl else tclIDTAC gl @@ -1484,7 +1721,7 @@ let cook_sign hyp0_opt indvars_init env = (* [rel_contexts] and [rel_declaration] actually contain triples, and lists are actually in reverse order to fit [compose_prod]. *) type elim_scheme = { - elimc: (Term.constr * constr Rawterm.bindings) option; + elimc: constr with_ebindings option; elimt: types; indref: global_reference option; params: rel_context; (* (prm1,tprm1);(prm2,tprm2)...(prmp,tprmp) *) @@ -1525,16 +1762,15 @@ let empty_scheme = (* Unification between ((elimc:elimt) ?i ?j ?k ?l ... ?m) and the hypothesis on which the induction is made *) -let induction_tac varname typ scheme (*(elimc,lbindelimc),elimt*) gl = +let induction_tac with_evars (varname,lbind) typ scheme gl = let elimc,lbindelimc = match scheme.elimc with | Some x -> x | None -> error "No definition of the principle" in let elimt = scheme.elimt in - let c = mkVar varname in - let indclause = make_clenv_binding gl (c,typ) NoBindings in + let indclause = make_clenv_binding gl (mkVar varname,typ) lbind in let elimclause = make_clenv_binding gl (mkCast (elimc,DEFAULTcast, elimt),elimt) lbindelimc in - elimination_clause_scheme true elimclause indclause gl + elimination_clause_scheme with_evars true elimclause indclause gl let make_base n id = if n=0 or n=1 then id @@ -1549,13 +1785,14 @@ let make_base n id = let make_up_names n ind_opt cname = let is_hyp = atompart_of_id cname = "H" in let base = string_of_id (make_base n cname) in + let ind_prefix = "IH" in let base_ind = if is_hyp then match ind_opt with - | None -> id_of_string "" - | Some ind_id -> Nametab.id_of_global ind_id - else cname in - let hyprecname = add_prefix "IH" (make_base n base_ind) in + | None -> id_of_string ind_prefix + | Some ind_id -> add_prefix ind_prefix (Nametab.id_of_global ind_id) + else add_prefix ind_prefix cname in + let hyprecname = make_base n base_ind in let avoid = if n=1 (* Only one recursive argument *) or n=0 then [] else @@ -1590,7 +1827,151 @@ let error_ind_scheme s = let s = if s <> "" then s^" " else s in error ("Cannot recognise "^s^"an induction schema") +let mkEq t x y = + mkApp (build_coq_eq (), [| t; x; y |]) + +let mkRefl t x = + mkApp ((build_coq_eq_data ()).refl, [| t; x |]) + +let mkHEq t x u y = + mkApp (coq_constant "mkHEq" ["Logic";"JMeq"] "JMeq", + [| t; x; u; y |]) + +let mkHRefl t x = + mkApp (coq_constant "mkHEq" ["Logic";"JMeq"] "JMeq_refl", + [| t; x |]) +let mkCoe a x p px y eq = + mkApp (Option.get (build_coq_eq_data ()).rect, [| a; x; p; px; y; eq |]) + +let lift_togethern n l = + let l', _ = + List.fold_right + (fun x (acc, n) -> + (lift n x :: acc, succ n)) + l ([], n) + in l' + +let lift_together l = lift_togethern 0 l + +let lift_list l = List.map (lift 1) l + +let ids_of_constr vars c = + let rec aux vars c = + match kind_of_term c with + | Var id -> if List.mem id vars then vars else id :: vars + | _ -> fold_constr aux vars c + in aux vars c + +let make_abstract_generalize gl id concl dep ctx c eqs args refls = + let meta = Evarutil.new_meta() in + let cstr = + (* Abstract by equalitites *) + let eqs = lift_togethern 1 eqs in + let abseqs = it_mkProd_or_LetIn ~init:concl (List.map (fun x -> (Anonymous, None, x)) eqs) in + (* Abstract by the "generalized" hypothesis and its equality proof *) + let term, typ = mkVar id, pf_get_hyp_typ gl id in + let abshyp = + let abshypeq = + if dep then + mkProd (Anonymous, mkHEq (lift 1 c) (mkRel 1) typ term, lift 1 abseqs) + else abseqs + in + mkProd (Name id, c, abshypeq) + in + (* Abstract by the extension of the context *) + let genctyp = it_mkProd_or_LetIn ~init:abshyp ctx in + (* The goal will become this product. *) + let genc = mkCast (mkMeta meta, DEFAULTcast, genctyp) in + (* Apply the old arguments giving the proper instantiation of the hyp *) + let instc = mkApp (genc, Array.of_list args) in + (* Then apply to the original instanciated hyp. *) + let newc = mkApp (instc, [| mkVar id |]) in + (* Apply the reflexivity proof for the original hyp. *) + let newc = if dep then mkApp (newc, [| mkHRefl typ term |]) else newc in + (* Finaly, apply the remaining reflexivity proofs on the index, to get a term of type gl again *) + let appeqs = mkApp (newc, Array.of_list refls) in + appeqs + in cstr + +let abstract_args gl id = + let c = pf_get_hyp_typ gl id in + let sigma = project gl in + let env = pf_env gl in + let concl = pf_concl gl in + let dep = dependent (mkVar id) concl in + let avoid = ref [] in + let get_id name = + let id = fresh_id !avoid (match name with Name n -> n | Anonymous -> id_of_string "gen_x") gl in + avoid := id :: !avoid; id + in + match kind_of_term c with + App (f, args) -> + (* Build application generalized w.r.t. the argument plus the necessary eqs. + From env |- c : forall G, T and args : G we build + (T[G'], G' : ctx, env ; G' |- args' : G, eqs := G'_i = G_i, refls : G' = G, vars to generalize) + + eqs are not lifted w.r.t. each other yet. (* will be needed when going to dependent indexes *) + *) + let aux (prod, ctx, ctxenv, c, args, eqs, refls, vars, env) arg = + let (name, _, ty), arity = + let rel, c = Reductionops.decomp_n_prod env sigma 1 prod in + List.hd rel, c + in + let argty = pf_type_of gl arg in + let liftargty = lift (List.length ctx) argty in + let convertible = Reductionops.is_conv_leq ctxenv sigma liftargty ty in + match kind_of_term arg with + | Var _ | Rel _ | Ind _ when convertible -> + (subst1 arg arity, ctx, ctxenv, mkApp (c, [|arg|]), args, eqs, refls, vars, env) + | _ -> + let name = get_id name in + let decl = (Name name, None, ty) in + let ctx = decl :: ctx in + let c' = mkApp (lift 1 c, [|mkRel 1|]) in + let args = arg :: args in + let liftarg = lift (List.length ctx) arg in + let eq, refl = + if convertible then + mkEq (lift 1 ty) (mkRel 1) liftarg, mkRefl argty arg + else + mkHEq (lift 1 ty) (mkRel 1) liftargty liftarg, mkHRefl argty arg + in + let eqs = eq :: lift_list eqs in + let refls = refl :: refls in + let vars = ids_of_constr vars arg in + (arity, ctx, push_rel decl ctxenv, c', args, eqs, refls, vars, env) + in + let arity, ctx, ctxenv, c', args, eqs, refls, vars, env = + Array.fold_left aux (pf_type_of gl f,[],env,f,[],[],[],[],env) args + in + let args, refls = List.rev args, List.rev refls in + Some (make_abstract_generalize gl id concl dep ctx c' eqs args refls, + dep, succ (List.length ctx), vars) + | _ -> None + +let abstract_generalize id gl = + Coqlib.check_required_library ["Coq";"Logic";"JMeq"]; +(* let qualid = (dummy_loc, qualid_of_dirpath (dirpath_of_string "Coq.Logic.JMeq")) in *) +(* Library.require_library [qualid] None; *) + let oldid = pf_get_new_id id gl in + let newc = abstract_args gl id in + match newc with + | None -> tclIDTAC gl + | Some (newc, dep, n, vars) -> + if dep then + tclTHENLIST [refine newc; + rename_hyp [(id, oldid)]; + tclDO n intro; + generalize_dep (mkVar oldid); + tclMAP (fun id -> tclTRY (generalize_dep (mkVar id))) vars] + gl + else + tclTHENLIST [refine newc; + clear [id]; + tclDO n intro; + tclMAP (fun id -> tclTRY (generalize_dep (mkVar id))) vars] + gl let occur_rel n c = @@ -1680,6 +2061,23 @@ let exchange_hd_app subst_hd t = let hd,args= decompose_app t in mkApp (subst_hd,Array.of_list args) + +(* [rebuild_elimtype_from_scheme scheme] rebuilds the type of an + eliminator from its [scheme_info]. The idea is to build variants of + eliminator by modifying there scheme_info, then rebuild the + eliminator type, then prove it (with tactics). *) +let rebuild_elimtype_from_scheme (scheme:elim_scheme): types = + let hiconcl = + match scheme.indarg with + | None -> scheme.concl + | Some x -> mkProd_or_LetIn x scheme.concl in + let xihiconcl = it_mkProd_or_LetIn hiconcl scheme.args in + let brconcl = it_mkProd_or_LetIn xihiconcl scheme.branches in + let predconcl = it_mkProd_or_LetIn brconcl scheme.predicates in + let paramconcl = it_mkProd_or_LetIn predconcl scheme.params in + paramconcl + + exception NoLastArg exception NoLastArgCcl @@ -1708,13 +2106,13 @@ let compute_elim_sig ?elimc elimt = let nparams = Intset.cardinal (free_rels concl_with_args) in let preds,params = cut_list (List.length params_preds - nparams) params_preds in - (* A first approximation, further anlysis will tweak it *) + (* A first approximation, further analysis will tweak it *) let res = ref { empty_scheme with (* This fields are ok: *) elimc = elimc; elimt = elimt; concl = conclusion; predicates = preds; npredicates = List.length preds; branches = branches; nbranches = List.length branches; - farg_in_concl = (try isApp (last_arg ccl) with _ -> false); + farg_in_concl = isApp ccl && isApp (last_arg ccl); params = params; nparams = nparams; (* all other fields are unsure at this point. Including these:*) args = args_indargs; nargs = List.length args_indargs; } in @@ -1876,7 +2274,7 @@ let mapi f l = mapi_aux f 0 l -(* Instanciate all meta variables of elimclause using lid, some elts +(* Instantiate all meta variables of elimclause using lid, some elts of lid are parameters (first ones), the other are arguments. Returns the clause obtained. *) let recolle_clenv scheme lid elimclause gl = @@ -1919,13 +2317,11 @@ let recolle_clenv scheme lid elimclause gl = (List.rev clauses) elimclause - - (* Unification of the goal and the principle applied to meta variables: (elimc ?i ?j ?k...?l). This solves partly meta variables (and may produce new ones). Then refine with the resulting term with holes. *) -let induction_tac_felim indvars (* (elimc,lbindelimc) elimt *) scheme gl = +let induction_tac_felim with_evars indvars (* (elimc,lbindelimc) elimt *) scheme gl = let elimt = scheme.elimt in let elimc,lbindelimc = match scheme.elimc with | Some x -> x | None -> error "No definition of the principle" in @@ -1936,7 +2332,7 @@ let induction_tac_felim indvars (* (elimc,lbindelimc) elimt *) scheme gl = let elimclause' = recolle_clenv scheme indvars elimclause gl in (* one last resolution (useless?) *) let resolved = clenv_unique_resolver true elimclause' gl in - clenv_refine resolved gl + clenv_refine with_evars resolved gl (* Induction with several induction arguments, main differences with induction_from_context is that there is no main induction argument, @@ -1944,7 +2340,7 @@ let induction_tac_felim indvars (* (elimc,lbindelimc) elimt *) scheme gl = all args and params must be given, so we help a bit the unifier by making the "pattern" by hand before calling induction_tac_felim FIXME: REUNIF AVEC induction_tac_felim? *) -let induction_from_context_l isrec elim_info lid names gl = +let induction_from_context_l isrec with_evars elim_info lid names gl = let indsign,scheme = elim_info in (* number of all args, counting farg and indarg if present. *) let nargs_indarg_farg = scheme.nargs @@ -1986,14 +2382,14 @@ let induction_from_context_l isrec elim_info lid names gl = if deps = [] then tclIDTAC else apply_type tmpcl deps_cstr; thin dephyps; (* clear dependent hyps *) (* pattern to make the predicate appear. *) - reduce (Pattern (List.map (fun e -> ([],e)) lidcstr)) onConcl; + reduce (Pattern (List.map inj_with_occurrences lidcstr)) onConcl; (* FIXME: Tester ca avec un principe dependant et non-dependant *) (if isrec then tclTHENFIRSTn else tclTHENLASTn) (tclTHENLIST [ (* Induction by "refine (indscheme ?i ?j ?k...)" + resolution of all possible holes using arguments given by the user (but the functional one). *) - induction_tac_felim realindvars scheme; + induction_tac_felim with_evars realindvars scheme; tclTRY (thin (List.rev (indhyps))); ]) (array_map2 @@ -2003,13 +2399,8 @@ let induction_from_context_l isrec elim_info lid names gl = -let induction_from_context isrec elim_info hyp0 names gl = - (*test suivant sans doute inutile car refait par le letin_tac*) - if List.mem hyp0 (ids_of_named_context (Global.named_context())) then - errorlabstrm "induction" - (str "Cannot generalize a global variable"); +let induction_from_context isrec with_evars elim_info (hyp0,lbind) names gl = let indsign,scheme = elim_info in - let indref = match scheme.indref with | None -> assert false | Some x -> x in let tmptyp0 = pf_get_hyp_typ gl hyp0 in let typ0 = pf_apply reduce_to_quantified_ref gl indref tmptyp0 in @@ -2038,8 +2429,8 @@ let induction_from_context isrec elim_info hyp0 names gl = thin dephyps; (if isrec then tclTHENFIRSTn else tclTHENLASTn) (tclTHENLIST - [ induction_tac hyp0 typ0 scheme (*scheme.elimc,scheme.elimt*); - thin [hyp0]; + [ induction_tac with_evars (hyp0,lbind) typ0 scheme; + tclTHEN (tclTRY (unfold_body hyp0)) (thin [hyp0]); tclTRY (thin indhyps) ]) (array_map2 (induct_discharge statlists lhyp0 (List.rev dephyps)) indsign names) @@ -2050,22 +2441,22 @@ let induction_from_context isrec elim_info hyp0 names gl = exception TryNewInduct of exn -let induction_with_atomization_of_ind_arg isrec elim names hyp0 gl = +let induction_with_atomization_of_ind_arg isrec with_evars elim names (hyp0,lbind) gl = let (indsign,scheme as elim_info) = find_elim_signature isrec elim hyp0 gl in if scheme.indarg = None then (* This is not a standard induction scheme (the argument is probably a parameter) So try the more general induction mechanism. *) - induction_from_context_l isrec elim_info [hyp0] names gl + induction_from_context_l isrec with_evars elim_info [hyp0] names gl else let indref = match scheme.indref with | None -> assert false | Some x -> x in tclTHEN (atomize_param_of_ind (indref,scheme.nparams) hyp0) - (induction_from_context isrec elim_info hyp0 names) gl + (induction_from_context isrec with_evars elim_info (hyp0,lbind) names) gl (* Induction on a list of induction arguments. Analyse the elim scheme (which is mandatory for multiple ind args), check that all parameters and arguments are given (mandatory too). *) -let induction_without_atomization isrec elim names lid gl = +let induction_without_atomization isrec with_evars elim names lid gl = let (indsign,scheme as elim_info) = find_elim_signature isrec elim (List.hd lid) gl in let awaited_nargs = @@ -2076,52 +2467,30 @@ let induction_without_atomization isrec elim names lid gl = let nlid = List.length lid in if nlid <> awaited_nargs then error "Not the right number of induction arguments" - else induction_from_context_l isrec elim_info lid names gl + else induction_from_context_l isrec with_evars elim_info lid names gl -let new_induct_gen isrec elim names c gl = +let new_induct_gen isrec with_evars elim names (c,lbind) cls gl = match kind_of_term c with - | Var id when not (mem_named_context id (Global.named_context())) -> - induction_with_atomization_of_ind_arg isrec elim names id gl + | Var id when not (mem_named_context id (Global.named_context())) + & lbind = NoBindings & not with_evars & cls = None -> + induction_with_atomization_of_ind_arg + isrec with_evars elim names (id,lbind) gl | _ -> let x = id_of_name_using_hdchar (Global.env()) (pf_type_of gl c) Anonymous in let id = fresh_id [] x gl in + let with_eq = if cls <> None then Some (not (isVar c)) else None in tclTHEN - (letin_tac true (Name id) c allClauses) - (induction_with_atomization_of_ind_arg isrec elim names id) gl - -(* The two following functions should already exist, but found nowhere *) -(* Unfolds x by its definition everywhere *) -let unfold_body x gl = - let hyps = pf_hyps gl in - let xval = - match Sign.lookup_named x hyps with - (_,Some xval,_) -> xval - | _ -> errorlabstrm "unfold_body" - (pr_id x ++ str" is not a defined hypothesis") in - let aft = afterHyp x gl in - let hl = List.fold_right (fun (y,yval,_) cl -> (([],y),InHyp) :: cl) aft [] in - let xvar = mkVar x in - let rfun _ _ c = replace_term xvar xval c in - tclTHENLIST - [tclMAP (fun h -> reduct_in_hyp rfun h) hl; - reduct_in_concl (rfun,DEFAULTcast)] gl - -(* Unfolds x by its definition everywhere and clear x. This may raise - an error if x is not defined. *) -let unfold_all x gl = - let (_,xval,_) = pf_get_hyp gl x in - (* If x has a body, simply replace x with body and clear x *) - if xval <> None then tclTHEN (unfold_body x) (clear [x]) gl - else tclIDTAC gl - + (letin_tac with_eq (Name id) c (Option.default allClauses cls)) + (induction_with_atomization_of_ind_arg + isrec with_evars elim names (id,lbind)) gl (* Induction on a list of arguments. First make induction arguments atomic (using letins), then do induction. The specificity here is that all arguments and parameters of the scheme are given (mandatory for the moment), so we don't need to deal with parameters of the inductive type as in new_induct_gen. *) -let new_induct_gen_l isrec elim names lc gl = +let new_induct_gen_l isrec with_evars elim names lc gl = let newlc = ref [] in let letids = ref [] in let rec atomize_list l gl = @@ -2129,7 +2498,8 @@ let new_induct_gen_l isrec elim names lc gl = | [] -> tclIDTAC gl | c::l' -> match kind_of_term c with - | Var id when not (mem_named_context id (Global.named_context())) -> + | Var id when not (mem_named_context id (Global.named_context())) + & not with_evars -> let _ = newlc:= id::!newlc in atomize_list l' gl @@ -2142,13 +2512,13 @@ let new_induct_gen_l isrec elim names lc gl = let _ = newlc:=id::!newlc in let _ = letids:=id::!letids in tclTHEN - (letin_tac true (Name id) c allClauses) + (letin_tac None (Name id) c allClauses) (atomize_list newl') gl in tclTHENLIST [ (atomize_list lc); (fun gl' -> (* recompute each time to have the new value of newlc *) - induction_without_atomization isrec elim names !newlc gl') ; + induction_without_atomization isrec with_evars elim names !newlc gl') ; (* after induction, try to unfold all letins created by atomize_list FIXME: unfold_all does not exist anywhere else? *) (fun gl' -> (* recompute each time to have the new value of letids *) @@ -2157,10 +2527,10 @@ let new_induct_gen_l isrec elim names lc gl = gl -let induct_destruct_l isrec lc elim names = +let induct_destruct_l isrec with_evars lc elim names cls = (* Several induction hyps: induction scheme is mandatory *) let _ = - if elim = None + if elim = None then error ("Induction scheme must be given when several induction hypothesis.\n" ^ "Example: induction x1 x2 x3 using my_scheme.") in @@ -2168,35 +2538,32 @@ let induct_destruct_l isrec lc elim names = List.map (fun x -> match x with (* FIXME: should we deal with ElimOnIdent? *) - | ElimOnConstr x -> x + | ElimOnConstr (x,NoBindings) -> x | _ -> error "don't know where to find some argument") lc in - new_induct_gen_l isrec elim names newlc - + if cls <> None then + error + "'in' clause not supported when several induction hypothesis are given"; + new_induct_gen_l isrec with_evars elim names newlc (* Induction either over a term, over a quantified premisse, or over several quantified premisses (like with functional induction principles). TODO: really unify induction with one and induction with several args *) -let induct_destruct isrec lc elim names = +let induct_destruct isrec with_evars lc elim names cls = assert (List.length lc > 0); (* ensured by syntax, but if called inside caml? *) if List.length lc = 1 then (* induction on one arg: use old mechanism *) - try - let c = List.hd lc in - match c with - | ElimOnConstr c -> new_induct_gen isrec elim names c - | ElimOnAnonHyp n -> - tclTHEN (intros_until_n n) - (tclLAST_HYP (new_induct_gen isrec elim names)) - (* Identifier apart because id can be quantified in goal and not typable *) - | ElimOnIdent (_,id) -> - tclTHEN (tclTRY (intros_until_id id)) - (new_induct_gen isrec elim names (mkVar id)) + try + onInductionArg + (fun c -> new_induct_gen isrec with_evars elim names c cls) + (List.hd lc) with (* If this fails, try with new mechanism but if it fails too, then the exception is the first one. *) - | x -> (try induct_destruct_l isrec lc elim names with _ -> raise x) - else induct_destruct_l isrec lc elim names + | x -> + (try induct_destruct_l isrec with_evars lc elim names cls + with _ -> raise x) + else induct_destruct_l isrec with_evars lc elim names cls @@ -2477,9 +2844,9 @@ let interpretable_as_section_decl d1 d2 = match d1,d2 with | (_,Some b1,t1), (_,Some b2,t2) -> eq_constr b1 b2 & eq_constr t1 t2 | (_,None,t1), (_,_,t2) -> eq_constr t1 t2 -let abstract_subproof name tac gls = +let abstract_subproof name tac gl = let current_sign = Global.named_context() - and global_sign = pf_hyps gls in + and global_sign = pf_hyps gl in let sign,secsign = List.fold_right (fun (id,_,_ as d) (s1,s2) -> @@ -2488,8 +2855,8 @@ let abstract_subproof name tac gls = then (s1,push_named_context_val d s2) else (add_named_decl d s1,s2)) global_sign (empty_named_context,empty_named_context_val) in - let na = next_global_ident_away false name (pf_ids_of_hyps gls) in - let concl = it_mkNamedProd_or_LetIn (pf_concl gls) sign in + let na = next_global_ident_away false name (pf_ids_of_hyps gl) in + let concl = it_mkNamedProd_or_LetIn (pf_concl gl) sign in if occur_existential concl then error "\"abstract\" cannot handle existentials"; let lemme = @@ -2497,10 +2864,11 @@ let abstract_subproof name tac gls = let _,(const,kind,_) = try by (tclCOMPLETE (tclTHEN (tclDO (List.length sign) intro) tac)); - let r = cook_proof () in + let r = cook_proof ignore in delete_current_proof (); r - with e -> - (delete_current_proof(); raise e) + with + e -> + (delete_current_proof(); raise e) in (* Faudrait un peu fonctionnaliser cela *) let cd = Entries.DefinitionEntry const in let con = Declare.declare_internal_constant na (cd,IsProof Lemma) in @@ -2509,19 +2877,19 @@ let abstract_subproof name tac gls = exact_no_check (applist (lemme, List.rev (Array.to_list (instance_from_named_context sign)))) - gls + gl -let tclABSTRACT name_op tac gls = +let tclABSTRACT name_op tac gl = let s = match name_op with | Some s -> s | None -> add_suffix (get_current_proof_name ()) "_subproof" in - abstract_subproof s tac gls + abstract_subproof s tac gl -let admit_as_an_axiom gls = +let admit_as_an_axiom gl = let current_sign = Global.named_context() - and global_sign = pf_hyps gls in + and global_sign = pf_hyps gl in let sign,secsign = List.fold_right (fun (id,_,_ as d) (s1,s2) -> @@ -2531,15 +2899,15 @@ let admit_as_an_axiom gls = else (add_named_decl d s1,s2)) global_sign (empty_named_context,empty_named_context) in let name = add_suffix (get_current_proof_name ()) "_admitted" in - let na = next_global_ident_away false name (pf_ids_of_hyps gls) in - let concl = it_mkNamedProd_or_LetIn (pf_concl gls) sign in + let na = next_global_ident_away false name (pf_ids_of_hyps gl) in + let concl = it_mkNamedProd_or_LetIn (pf_concl gl) sign in if occur_existential concl then error "\"admit\" cannot handle existentials"; let axiom = - let cd = Entries.ParameterEntry concl in + let cd = Entries.ParameterEntry (concl,false) in let con = Declare.declare_internal_constant na (cd,IsAssumption Logical) in constr_of_global (ConstRef con) in exact_no_check (applist (axiom, List.rev (Array.to_list (instance_from_named_context sign)))) - gls + gl diff --git a/tactics/tactics.mli b/tactics/tactics.mli index bb71afb9..b7ab31c4 100644 --- a/tactics/tactics.mli +++ b/tactics/tactics.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: tactics.mli 9853 2007-05-23 14:25:47Z letouzey $ i*) +(*i $Id: tactics.mli 11166 2008-06-22 13:23:35Z herbelin $ i*) (*i*) open Names @@ -26,14 +26,19 @@ open Genarg open Tacexpr open Nametab open Rawterm +open Termops (*i*) +val inj_open : constr -> open_constr +val inj_red_expr : red_expr -> (open_constr, evaluable_global_reference) red_expr_gen +val inj_ebindings : constr bindings -> open_constr bindings + (* Main tactics. *) (*s General functions. *) val type_clenv_binding : goal sigma -> - constr * constr -> constr bindings -> constr + constr * constr -> open_constr bindings -> constr val string_of_inductive : constr -> string val head_constr : constr -> constr list @@ -96,6 +101,13 @@ val intros_clearing : bool list -> tactic val try_intros_until : (identifier -> tactic) -> quantified_hypothesis -> tactic +(* Apply a tactic on a quantified hypothesis, an hypothesis in context + or a term with bindings *) + +val onInductionArg : + (constr with_ebindings -> tactic) -> + constr with_ebindings induction_arg -> tactic + (*s Introduction tactics with eliminations. *) val intro_pattern : identifier option -> intro_pattern_expr -> tactic @@ -117,9 +129,9 @@ type tactic_reduction = env -> evar_map -> constr -> constr val reduct_in_hyp : tactic_reduction -> hyp_location -> tactic val reduct_option : tactic_reduction * cast_kind -> simple_clause -> tactic val reduct_in_concl : tactic_reduction * cast_kind -> tactic -val change_in_concl : (int list * constr) option -> constr -> tactic -val change_in_hyp : (int list * constr) option -> constr -> hyp_location -> - tactic +val change_in_concl : (occurrences * constr) option -> constr -> tactic +val change_in_hyp : (occurrences * constr) option -> constr -> + hyp_location -> tactic val red_in_concl : tactic val red_in_hyp : hyp_location -> tactic val red_option : simple_clause -> tactic @@ -133,18 +145,19 @@ val normalise_in_concl : tactic val normalise_in_hyp : hyp_location -> tactic val normalise_option : simple_clause -> tactic val normalise_vm_in_concl : tactic -val unfold_in_concl : (int list * evaluable_global_reference) list -> tactic +val unfold_in_concl : + (occurrences * evaluable_global_reference) list -> tactic val unfold_in_hyp : - (int list * evaluable_global_reference) list -> hyp_location -> tactic + (occurrences * evaluable_global_reference) list -> hyp_location -> tactic val unfold_option : - (int list * evaluable_global_reference) list -> simple_clause + (occurrences * evaluable_global_reference) list -> simple_clause -> tactic -val reduce : red_expr -> clause -> tactic val change : - (int list * constr) option -> constr -> clause -> tactic - + (occurrences * constr) option -> constr -> clause -> tactic +val pattern_option : + (occurrences * constr) list -> simple_clause -> tactic +val reduce : red_expr -> clause -> tactic val unfold_constr : global_reference -> tactic -val pattern_option : (int list * constr) list -> simple_clause -> tactic (*s Modification of the local context. *) @@ -152,10 +165,12 @@ val clear : identifier list -> tactic val clear_body : identifier list -> tactic val keep : identifier list -> tactic -val new_hyp : int option -> constr with_bindings -> tactic +val specialize : int option -> constr with_ebindings -> tactic val move_hyp : bool -> identifier -> identifier -> tactic -val rename_hyp : identifier -> identifier -> tactic +val rename_hyp : (identifier * identifier) list -> tactic + +val revert : identifier list -> tactic (*s Resolution tactics. *) @@ -166,11 +181,19 @@ val bring_hyps : named_context -> tactic val apply : constr -> tactic val apply_without_reduce : constr -> tactic val apply_list : constr list -> tactic + +val apply_with_ebindings_gen : + advanced_flag -> evars_flag -> constr with_ebindings -> tactic + val apply_with_bindings : constr with_bindings -> tactic +val eapply_with_bindings : constr with_bindings -> tactic + +val apply_with_ebindings : constr with_ebindings -> tactic +val eapply_with_ebindings : constr with_ebindings -> tactic val cut_and_apply : constr -> tactic -val apply_in : identifier -> constr with_bindings list -> tactic +val apply_in : evars_flag -> identifier -> constr with_ebindings list -> tactic (*s Elimination tactics. *) @@ -201,7 +224,7 @@ val apply_in : identifier -> constr with_bindings list -> tactic (* [rel_contexts] and [rel_declaration] actually contain triples, and lists are actually in reverse order to fit [compose_prod]. *) type elim_scheme = { - elimc: (Term.constr * constr Rawterm.bindings) option; + elimc: constr with_ebindings option; elimt: types; indref: global_reference option; params: rel_context; (* (prm1,tprm1);(prm2,tprm2)...(prmp,tprmp) *) @@ -221,29 +244,32 @@ type elim_scheme = { } -val compute_elim_sig : ?elimc: (Term.constr * constr Rawterm.bindings) -> types -> elim_scheme +val compute_elim_sig : ?elimc: constr with_ebindings -> types -> elim_scheme +val rebuild_elimtype_from_scheme: elim_scheme -> types -val general_elim : - constr with_bindings -> constr with_bindings -> ?allow_K:bool -> tactic -val general_elim_in : - identifier -> constr with_bindings -> constr with_bindings -> tactic +val general_elim : evars_flag -> + constr with_ebindings -> constr with_ebindings -> ?allow_K:bool -> tactic +val general_elim_in : evars_flag -> + identifier -> constr with_ebindings -> constr with_ebindings -> tactic -val default_elim : constr with_bindings -> tactic +val default_elim : evars_flag -> constr with_ebindings -> tactic val simplest_elim : constr -> tactic -val elim : constr with_bindings -> constr with_bindings option -> tactic +val elim : + evars_flag -> constr with_ebindings -> constr with_ebindings option -> tactic + val simple_induct : quantified_hypothesis -> tactic -val new_induct : constr induction_arg list -> constr with_bindings option -> - intro_pattern_expr -> tactic +val new_induct : evars_flag -> constr with_ebindings induction_arg list -> + constr with_ebindings option -> intro_pattern_expr -> clause option -> tactic (*s Case analysis tactics. *) -val general_case_analysis : constr with_bindings -> tactic +val general_case_analysis : evars_flag -> constr with_ebindings -> tactic val simplest_case : constr -> tactic val simple_destruct : quantified_hypothesis -> tactic -val new_destruct : constr induction_arg list -> constr with_bindings option -> - intro_pattern_expr -> tactic +val new_destruct : evars_flag -> constr with_ebindings induction_arg list -> + constr with_ebindings option -> intro_pattern_expr -> clause option -> tactic (*s Eliminations giving the type instead of the proof. *) @@ -262,16 +288,22 @@ val dorE : bool -> clause ->tactic (*s Introduction tactics. *) -val constructor_tac : int option -> int -> - constr bindings -> tactic -val one_constructor : int -> constr bindings -> tactic -val any_constructor : tactic option -> tactic -val left : constr bindings -> tactic -val simplest_left : tactic -val right : constr bindings -> tactic -val simplest_right : tactic -val split : constr bindings -> tactic -val simplest_split : tactic +val constructor_tac : evars_flag -> int option -> int -> + open_constr bindings -> tactic +val any_constructor : evars_flag -> tactic option -> tactic +val one_constructor : int -> open_constr bindings -> tactic + +val left : constr bindings -> tactic +val right : constr bindings -> tactic +val split : constr bindings -> tactic + +val left_with_ebindings : evars_flag -> open_constr bindings -> tactic +val right_with_ebindings : evars_flag -> open_constr bindings -> tactic +val split_with_ebindings : evars_flag -> open_constr bindings -> tactic + +val simplest_left : tactic +val simplest_right : tactic +val simplest_split : tactic (*s Logical connective tactics. *) @@ -300,14 +332,18 @@ val cut_in_parallel : constr list -> tactic val assert_as : bool -> intro_pattern_expr -> constr -> tactic val forward : tactic option -> intro_pattern_expr -> constr -> tactic - +val letin_tac : bool option -> name -> constr -> clause -> tactic val true_cut : name -> constr -> tactic -val letin_tac : bool -> name -> constr -> clause -> tactic val assert_tac : bool -> name -> constr -> tactic -val generalize : constr list -> tactic -val generalize_dep : constr -> tactic +val generalize : constr list -> tactic +val generalize_gen : ((occurrences * constr) * name) list -> tactic +val generalize_dep : constr -> tactic val tclABSTRACT : identifier option -> tactic -> tactic val admit_as_an_axiom : tactic +val abstract_generalize : identifier -> tactic + +val register_general_multi_rewrite : + (bool -> evars_flag -> constr with_ebindings -> clause -> tactic) -> unit diff --git a/tactics/tauto.ml4 b/tactics/tauto.ml4 index c91038fc..54094d99 100644 --- a/tactics/tauto.ml4 +++ b/tactics/tauto.ml4 @@ -8,7 +8,7 @@ (*i camlp4deps: "parsing/grammar.cma" i*) -(*i $Id: tauto.ml4 7732 2005-12-26 13:51:24Z herbelin $ i*) +(*i $Id: tauto.ml4 10731 2008-03-30 22:30:44Z herbelin $ i*) open Hipattern open Names @@ -23,7 +23,7 @@ open Util let assoc_last ist = match List.assoc (Names.id_of_string "X1") ist.lfun with | VConstr c -> c - | _ -> failwith "Tauto: anomaly" + | _ -> failwith "tauto: anomaly" let is_empty ist = if is_empty_type (assoc_last ist) then @@ -165,7 +165,7 @@ let tauto g = try intuition_gen (interp <:tactic>) g with Refiner.FailError _ | UserError _ -> - errorlabstrm "tauto" [< str "Tauto failed" >] + errorlabstrm "tauto" [< str "tauto failed" >] let default_intuition_tac = interp <:tactic< auto with * >> diff --git a/test-suite/bugs/closed/1519.v b/test-suite/bugs/closed/1519.v new file mode 100644 index 00000000..98e3e214 --- /dev/null +++ b/test-suite/bugs/closed/1519.v @@ -0,0 +1,23 @@ +Section S. + + Variable A:Prop. + Variable W:A. + + Remark T: A -> A. + intro Z. + rename W into Z_. + rename Z into W. + rename Z_ into Z. + exact Z. + Qed. + + (* bug : + Error: + Unbound reference: In environment + A : Prop + W : A + Z : A + The reference 2 is free + *) + +End S. diff --git a/test-suite/bugs/closed/1780.v b/test-suite/bugs/closed/1780.v new file mode 100644 index 00000000..3929fbae --- /dev/null +++ b/test-suite/bugs/closed/1780.v @@ -0,0 +1,12 @@ + +Definition bug := Eval vm_compute in eq_rect. +(* bug: +Error: Illegal application (Type Error): +The term "eq" of type "forall A : Type, A -> A -> Prop" +cannot be applied to the terms + "x" : "A" + "P" : "A -> Type" + "x0" : "A" +The 1st term has type "A" which should be coercible to +"Type". +*) diff --git a/test-suite/bugs/closed/1787.v b/test-suite/bugs/closed/1787.v new file mode 100644 index 00000000..8e1024e6 --- /dev/null +++ b/test-suite/bugs/closed/1787.v @@ -0,0 +1,11 @@ +Parameter P : nat -> nat -> Prop. +Parameter Q : nat -> nat -> Prop. +Axiom A : forall x x' x'', P x x' -> Q x'' x' -> P x x''. + +Goal (P 1 3) -> (Q 1 3) -> (P 1 1). +intros H H'. +refine ((fun H1 : P 1 _ => let H2 := (_:Q 1 _) in A _ _ _ H1 H2) _). +clear. +Admitted. + + diff --git a/test-suite/bugs/closed/shouldfail/1703.v b/test-suite/bugs/closed/shouldfail/1703.v new file mode 100644 index 00000000..6b5198cc --- /dev/null +++ b/test-suite/bugs/closed/shouldfail/1703.v @@ -0,0 +1,7 @@ +(* Check correct binding of intros until used in Ltac *) + +Ltac intros_until n := intros until n. + +Goal forall i j m n : nat, i = 0 /\ j = 0 /\ m = 0 /\ n = 0. +intro i. +intros until i. diff --git a/test-suite/bugs/closed/shouldsucceed/1041.v b/test-suite/bugs/closed/shouldsucceed/1041.v new file mode 100644 index 00000000..a5de82e0 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1041.v @@ -0,0 +1,13 @@ +Goal Prop. + +pose (P:=(fun x y :Prop => y)). +evar (Q: (forall X Y,P X Y -> Prop)) . + +instantiate (1:= fun _ => _ ) in (Value of Q). +instantiate (1:= fun _ => _ ) in (Value of Q). +instantiate (1:= fun _ => _ ) in (Value of Q). + +instantiate (1:=H) in (Value of Q). + +Admitted. + diff --git a/test-suite/bugs/closed/shouldsucceed/1100.v b/test-suite/bugs/closed/shouldsucceed/1100.v new file mode 100644 index 00000000..6d619c74 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1100.v @@ -0,0 +1,12 @@ +Require Import Setoid. + +Parameter P : nat -> Prop. +Parameter Q : nat -> Prop. +Parameter PQ : forall n, P n <-> Q n. + +Lemma PQ2 : forall n, P n -> Q n. + intros. + rewrite PQ in H. + trivial. +Qed. + diff --git a/test-suite/bugs/closed/shouldsucceed/121.v b/test-suite/bugs/closed/shouldsucceed/121.v new file mode 100644 index 00000000..d193aa73 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/121.v @@ -0,0 +1,17 @@ +Require Import Setoid. + +Section Setoid_Bug. + +Variable X:Type -> Type. +Variable Xeq : forall A, (X A) -> (X A) -> Prop. +Hypothesis Xst : forall A, Equivalence (X A) (Xeq A). + +Variable map : forall A B, (A -> B) -> X A -> X B. + +Implicit Arguments map [A B]. + +Goal forall A B (a b:X (B -> A)) (c:X A) (f:A -> B -> A), Xeq _ a b -> Xeq _ b (map f c) -> Xeq _ a (map f c). +intros A B a b c f Hab Hbc. +rewrite Hab. +assumption. +Qed. diff --git a/test-suite/bugs/closed/shouldsucceed/1243.v b/test-suite/bugs/closed/shouldsucceed/1243.v new file mode 100644 index 00000000..7d6781db --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1243.v @@ -0,0 +1,12 @@ +Require Import ZArith. +Require Import Arith. +Open Scope Z_scope. + +Theorem r_ex : (forall x y:nat, x + y = x + y)%nat. +Admitted. + +Theorem r_ex' : forall x y:nat, (x + y = x + y)%nat. +Admitted. + + + diff --git a/test-suite/bugs/closed/shouldsucceed/1302.v b/test-suite/bugs/closed/shouldsucceed/1302.v new file mode 100644 index 00000000..e94dfcfb --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1302.v @@ -0,0 +1,22 @@ +Module Type T. + +Parameter A : Type. + +Inductive L : Type := +| L0 : L (* without this constructor, it works right *) +| L1 : A -> L. + +End T. + +Axiom Tp : Type. + +Module TT : T. + +Definition A : Type := Tp. + +Inductive L : Type := +| L0 : L +| L1 : A -> L. + +End TT. + diff --git a/test-suite/bugs/closed/shouldsucceed/1322.v b/test-suite/bugs/closed/shouldsucceed/1322.v new file mode 100644 index 00000000..7e21aa7c --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1322.v @@ -0,0 +1,24 @@ +Require Import Setoid. + +Section transition_gen. + +Variable I : Type. +Variable I_eq :I -> I -> Prop. +Variable I_eq_equiv : Setoid_Theory I I_eq. + +(* Add Relation I I_eq + reflexivity proved by I_eq_equiv.(Seq_refl I I_eq) + symmetry proved by I_eq_equiv.(Seq_sym I I_eq) + transitivity proved by I_eq_equiv.(Seq_trans I I_eq) +as I_eq_relation. *) + +Add Setoid I I_eq I_eq_equiv as I_with_eq. + +Variable F : I -> Type. +Variable F_morphism : forall i j, I_eq i j -> F i = F j. + + +Add Morphism F with signature I_eq ==> (@eq _) as F_morphism2. +Admitted. + +End transition_gen. diff --git a/test-suite/bugs/closed/shouldsucceed/1411.v b/test-suite/bugs/closed/shouldsucceed/1411.v new file mode 100644 index 00000000..e330d46f --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1411.v @@ -0,0 +1,35 @@ +Require Import List. +Require Import Program. + +Inductive Tree : Set := +| Br : Tree -> Tree -> Tree +| No : nat -> Tree +. + +(* given a tree, we want to know which lists can + be used to navigate exactly to a node *) +Inductive Exact : Tree -> list bool -> Prop := +| exDone n : Exact (No n) nil +| exLeft l r p: Exact l p -> Exact (Br l r) (true::p) +| exRight l r p: Exact r p -> Exact (Br l r) (false::p) +. + +Definition unreachable A : False -> A. +intros. +destruct H. +Defined. + +Program Fixpoint fetch t p (x:Exact t p) {struct t} := + match t, p with + | No p' , nil => p' + | No p' , _::_ => unreachable nat _ + | Br l r, nil => unreachable nat _ + | Br l r, true::t => fetch l t _ + | Br l r, false::t => fetch r t _ + end. + +Next Obligation. inversion x. Qed. +Next Obligation. inversion x. Qed. +Next Obligation. inversion x; trivial. Qed. +Next Obligation. inversion x; trivial. Qed. + diff --git a/test-suite/bugs/closed/shouldsucceed/1414.v b/test-suite/bugs/closed/shouldsucceed/1414.v new file mode 100644 index 00000000..d3c00808 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1414.v @@ -0,0 +1,41 @@ +Require Import ZArith Coq.Program.Wf Coq.Program.Utils. + +Parameter data:Set. + +Inductive t : Set := + | Leaf : t + | Node : t -> data -> t -> Z -> t. + +Parameter avl : t -> Prop. +Parameter bst : t -> Prop. +Parameter In : data -> t -> Prop. +Parameter cardinal : t -> nat. +Definition card2 (s:t*t) := let (s1,s2) := s in cardinal s1 + cardinal s2. + +Parameter split : data -> t -> t*(bool*t). +Parameter join : t -> data -> t -> t. +Parameter add : data -> t -> t. + +Program Fixpoint union + (s:t*t) + (hb1: bst (fst s))(ha1: avl (fst s))(hb2: bst (snd s))(hb2: avl (snd s)) + { measure card2 s } : + {s' : t | bst s' /\ avl s' /\ forall x, In x s' <-> In x (fst s) \/ In x (snd +s)} := + match s with + | (Leaf,t2) => t2 + | (t1,Leaf) => t1 + | (Node l1 v1 r1 h1, Node l2 v2 r2 h2) => + if (Z_ge_lt_dec h1 h2) then + if (Z_eq_dec h2 1) + then add v2 (fst s) + else + let (l2', r2') := split v1 (snd s) in + join (union (l1,l2') _ _ _ _) v1 (union (r1,snd r2') _ _ _ _) + else + if (Z_eq_dec h1 1) + then add v1 (snd s) + else + let (l1', r1') := split v2 (fst s) in + join (union (l1',l2) _ _ _ _) v2 (union (snd r1',r2) _ _ _ _) + end. diff --git a/test-suite/bugs/closed/shouldsucceed/1419.v b/test-suite/bugs/closed/shouldsucceed/1419.v new file mode 100644 index 00000000..d021107d --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1419.v @@ -0,0 +1,8 @@ +Goal True. + set(a := 0). + set(b := a). + unfold a in b. + clear a. + Eval vm_compute in b. + trivial. +Qed. diff --git a/test-suite/bugs/closed/shouldsucceed/1425.v b/test-suite/bugs/closed/shouldsucceed/1425.v new file mode 100644 index 00000000..8e26209a --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1425.v @@ -0,0 +1,19 @@ +Require Import Setoid. + +Parameter recursion : forall A : Set, A -> (nat -> A -> A) -> nat -> A. + +Axiom recursion_S : + forall (A : Set) (EA : relation A) (a : A) (f : nat -> A -> A) (n : nat), + EA (recursion A a f (S n)) (f n (recursion A a f n)). + +Goal forall n : nat, recursion nat 0 (fun _ _ => 1) (S n) = 1. +intro n. +rewrite recursion_S. +reflexivity. +Qed. + +Goal forall n : nat, recursion nat 0 (fun _ _ => 1) (S n) = 1. +intro n. +setoid_rewrite recursion_S. +reflexivity. +Qed. \ No newline at end of file diff --git a/test-suite/bugs/closed/shouldsucceed/1446.v b/test-suite/bugs/closed/shouldsucceed/1446.v new file mode 100644 index 00000000..d4e7cea8 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1446.v @@ -0,0 +1,20 @@ +Lemma not_true_eq_false : forall (b:bool), b <> true -> b = false. +Proof. + destruct b;intros;trivial. + elim H. + exact (refl_equal true). +Qed. + +Section BUG. + + Variable b : bool. + Hypothesis H : b <> true. + Hypothesis H0 : b = true. + Hypothesis H1 : b <> true. + + Goal False. + rewrite (not_true_eq_false _ H) in * |-. + contradiction. + Qed. + +End BUG. diff --git a/test-suite/bugs/closed/shouldsucceed/1448.v b/test-suite/bugs/closed/shouldsucceed/1448.v new file mode 100644 index 00000000..fe3b4c8b --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1448.v @@ -0,0 +1,28 @@ +Require Import Relations. +Require Import Setoid. +Require Import Ring_theory. +Require Import Ring_base. + + +Variable R : Type. +Variable Rone Rzero : R. +Variable Rplus Rmult Rminus : R -> R -> R. +Variable Rneg : R -> R. + +Lemma my_ring_theory : @ring_theory R Rzero Rone Rplus Rmult Rminus Rneg (@eq +R). +Admitted. + +Variable Req : R -> R -> Prop. + +Hypothesis Req_refl : reflexive _ Req. +Hypothesis Req_sym : symmetric _ Req. +Hypothesis Req_trans : transitive _ Req. + +Add Relation R Req + reflexivity proved by Req_refl + symmetry proved by Req_sym + transitivity proved by Req_trans + as Req_rel. + +Add Ring my_ring : my_ring_theory (abstract). diff --git a/test-suite/bugs/closed/shouldsucceed/1477.v b/test-suite/bugs/closed/shouldsucceed/1477.v new file mode 100644 index 00000000..dfc8c328 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1477.v @@ -0,0 +1,18 @@ +Inductive I : Set := + | A : nat -> nat -> I + | B : nat -> nat -> I. + +Definition foo1 (x:I) : nat := + match x with + | A a b | B a b => S b + end. + +Definition foo2 (x:I) : nat := + match x with + | A _ b | B b _ => S b + end. + +Definition foo (x:I) : nat := + match x with + | A a b | B b a => S b + end. diff --git a/test-suite/bugs/closed/shouldsucceed/1483.v b/test-suite/bugs/closed/shouldsucceed/1483.v new file mode 100644 index 00000000..a3d7f168 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1483.v @@ -0,0 +1,10 @@ +Require Import BinPos. + +Definition P := (fun x : positive => x = xH). + +Goal forall (p q : positive), P q -> q = p -> P p. +intros; congruence. +Qed. + + + diff --git a/test-suite/bugs/closed/shouldsucceed/1507.v b/test-suite/bugs/closed/shouldsucceed/1507.v new file mode 100644 index 00000000..b484c7dc --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1507.v @@ -0,0 +1,121 @@ +(* + Implementing reals a la Stolzenberg + + Danko Ilik, March 2007 + svn revision: $Id: 1507.v 10068 2007-08-10 12:06:59Z notin $ + + XField.v -- (unfinished) axiomatisation of the theories of real and + rational intervals. +*) + +Definition associative (A:Type)(op:A->A->A) := + forall x y z:A, op (op x y) z = op x (op y z). + +Definition commutative (A:Type)(op:A->A->A) := + forall x y:A, op x y = op y x. + +Definition trichotomous (A:Type)(R:A->A->Prop) := + forall x y:A, R x y \/ x=y \/ R y x. + +Definition relation (A:Type) := A -> A -> Prop. +Definition reflexive (A:Type)(R:relation A) := forall x:A, R x x. +Definition transitive (A:Type)(R:relation A) := + forall x y z:A, R x y -> R y z -> R x z. +Definition symmetric (A:Type)(R:relation A) := forall x y:A, R x y -> R y x. + +Record interval (X:Set)(le:X->X->Prop) : Set := + interval_make { + interval_left : X; + interval_right : X; + interval_nonempty : le interval_left interval_right + }. + +Record I (grnd:Set)(le:grnd->grnd->Prop) : Type := Imake { + Icar := interval grnd le; + Iplus : Icar -> Icar -> Icar; + Imult : Icar -> Icar -> Icar; + Izero : Icar; + Ione : Icar; + Iopp : Icar -> Icar; + Iinv : Icar -> Icar; + Ic : Icar -> Icar -> Prop; (* consistency *) + (* monoids *) + Iplus_assoc : associative Icar Iplus; + Imult_assoc : associative Icar Imult; + (* abelian groups *) + Iplus_comm : commutative Icar Iplus; + Imult_comm : commutative Icar Imult; + Iplus_0_l : forall x:Icar, Ic (Iplus Izero x) x; + Iplus_0_r : forall x:Icar, Ic (Iplus x Izero) x; + Imult_0_l : forall x:Icar, Ic (Imult Ione x) x; + Imult_0_r : forall x:Icar, Ic (Imult x Ione) x; + Iplus_opp_r : forall x:Icar, Ic (Iplus x (Iopp x)) (Izero); + Imult_inv_r : forall x:Icar, ~(Ic x Izero) -> Ic (Imult x (Iinv x)) Ione; + (* distributive laws *) + Imult_plus_distr_l : forall x x' y y' z z' z'', + Ic x x' -> Ic y y' -> Ic z z' -> Ic z z'' -> + Ic (Imult (Iplus x y) z) (Iplus (Imult x' z') (Imult y' z'')); + (* order and lattice structure *) + Ilt : Icar -> Icar -> Prop; + Ilc := fun (x y:Icar) => Ilt x y \/ Ic x y; + Isup : Icar -> Icar -> Icar; + Iinf : Icar -> Icar -> Icar; + Ilt_trans : transitive _ lt; + Ilt_trich : forall x y:Icar, Ilt x y \/ Ic x y \/ Ilt y x; + Isup_lub : forall x y z:Icar, Ilc x z -> Ilc y z -> Ilc (Isup x y) z; + Iinf_glb : forall x y z:Icar, Ilc x y -> Ilc x z -> Ilc x (Iinf y z); + (* order preserves operations? *) + (* properties of Ic *) + Ic_refl : reflexive _ Ic; + Ic_sym : symmetric _ Ic +}. + +Definition interval_set (X:Set)(le:X->X->Prop) := + (interval X le) -> Prop. (* can be Set as well *) +Check interval_set. +Check Ic. +Definition consistent (X:Set)(le:X->X->Prop)(TI:I X le)(p:interval_set X le) := + forall I J:interval X le, p I -> p J -> (Ic X le TI) I J. +Check consistent. +(* define 'fine' *) + +Record N (grnd:Set)(le:grnd->grnd->Prop)(grndI:I grnd le) : Type := Nmake { + Ncar := interval_set grnd le; + Nplus : Ncar -> Ncar -> Ncar; + Nmult : Ncar -> Ncar -> Ncar; + Nzero : Ncar; + None : Ncar; + Nopp : Ncar -> Ncar; + Ninv : Ncar -> Ncar; + Nc : Ncar -> Ncar -> Prop; (* Ncistency *) + (* monoids *) + Nplus_assoc : associative Ncar Nplus; + Nmult_assoc : associative Ncar Nmult; + (* abelian groups *) + Nplus_comm : commutative Ncar Nplus; + Nmult_comm : commutative Ncar Nmult; + Nplus_0_l : forall x:Ncar, Nc (Nplus Nzero x) x; + Nplus_0_r : forall x:Ncar, Nc (Nplus x Nzero) x; + Nmult_0_l : forall x:Ncar, Nc (Nmult None x) x; + Nmult_0_r : forall x:Ncar, Nc (Nmult x None) x; + Nplus_opp_r : forall x:Ncar, Nc (Nplus x (Nopp x)) (Nzero); + Nmult_inv_r : forall x:Ncar, ~(Nc x Nzero) -> Nc (Nmult x (Ninv x)) None; + (* distributive laws *) + Nmult_plus_distr_l : forall x x' y y' z z' z'', + Nc x x' -> Nc y y' -> Nc z z' -> Nc z z'' -> + Nc (Nmult (Nplus x y) z) (Nplus (Nmult x' z') (Nmult y' z'')); + (* order and lattice structure *) + Nlt : Ncar -> Ncar -> Prop; + Nlc := fun (x y:Ncar) => Nlt x y \/ Nc x y; + Nsup : Ncar -> Ncar -> Ncar; + Ninf : Ncar -> Ncar -> Ncar; + Nlt_trans : transitive _ lt; + Nlt_trich : forall x y:Ncar, Nlt x y \/ Nc x y \/ Nlt y x; + Nsup_lub : forall x y z:Ncar, Nlc x z -> Nlc y z -> Nlc (Nsup x y) z; + Ninf_glb : forall x y z:Ncar, Nlc x y -> Nlc x z -> Nlc x (Ninf y z); + (* order preserves operations? *) + (* properties of Nc *) + Nc_refl : reflexive _ Nc; + Nc_sym : symmetric _ Nc +}. + diff --git a/test-suite/bugs/closed/shouldsucceed/1519.v b/test-suite/bugs/closed/shouldsucceed/1519.v new file mode 100644 index 00000000..66bab241 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1519.v @@ -0,0 +1,14 @@ +Section S. + + Variable A:Prop. + Variable W:A. + + Remark T: A -> A. + intro Z. + rename W into Z_. + rename Z into W. + rename Z_ into Z. + exact Z. + Qed. + +End S. diff --git a/test-suite/bugs/closed/shouldsucceed/1568.v b/test-suite/bugs/closed/shouldsucceed/1568.v new file mode 100644 index 00000000..9f10f749 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1568.v @@ -0,0 +1,13 @@ +CoInductive A: Set := + mk_A: B -> A +with B: Set := + mk_B: A -> B. + +CoFixpoint a:A := mk_A b +with b:B := mk_B a. + +Goal b = match a with mk_A a1 => a1 end. + simpl. reflexivity. +Qed. + + diff --git a/test-suite/bugs/closed/shouldsucceed/1576.v b/test-suite/bugs/closed/shouldsucceed/1576.v new file mode 100644 index 00000000..c9ebbd14 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1576.v @@ -0,0 +1,38 @@ +Module Type TA. +Parameter t : Set. +End TA. + +Module Type TB. +Declare Module A: TA. +End TB. + +Module Type TC. +Declare Module B : TB. +End TC. + +Module Type TD. + +Declare Module B: TB . +Declare Module C: TC + with Module B := B . +End TD. + +Module Type TE. +Declare Module D : TD. +End TE. + +Module Type TF. +Declare Module E: TE. +End TF. + +Module G (D: TD). +Module B' := D.C.B. +End G. + +Module H (F: TF). +Module I := G(F.E.D). +End H. + +Declare Module F: TF. +Module K := H(F). + diff --git a/test-suite/bugs/closed/shouldsucceed/1582.v b/test-suite/bugs/closed/shouldsucceed/1582.v new file mode 100644 index 00000000..47953a66 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1582.v @@ -0,0 +1,15 @@ +Require Import Peano_dec. + +Definition fact_F : + forall (n:nat), + (forall m, m nat) -> + nat. +refine + (fun n fact_rec => + if eq_nat_dec n 0 then + 1 + else + let fn := fact_rec (n-1) _ in + n * fn). +Admitted. + diff --git a/test-suite/bugs/closed/shouldsucceed/1604.v b/test-suite/bugs/closed/shouldsucceed/1604.v new file mode 100644 index 00000000..22c3df82 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1604.v @@ -0,0 +1,7 @@ +Require Import Setoid. + +Parameter F : nat -> nat. +Axiom F_id : forall n : nat, n = F n. +Goal forall n : nat, F n = n. +intro n. setoid_rewrite F_id at 3. reflexivity. +Qed. diff --git a/test-suite/bugs/closed/shouldsucceed/1614.v b/test-suite/bugs/closed/shouldsucceed/1614.v new file mode 100644 index 00000000..6bc165d4 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1614.v @@ -0,0 +1,21 @@ +Require Import Ring. +Require Import ArithRing. + +Fixpoint eq_nat_bool (x y : nat) {struct x} : bool := +match x, y with +| 0, 0 => true +| S x', S y' => eq_nat_bool x' y' +| _, _ => false +end. + +Theorem eq_nat_bool_implies_eq : forall x y, eq_nat_bool x y = true -> x = y. +Proof. +induction x; destruct y; simpl; intro H; try (reflexivity || inversion H). +apply IHx in H; rewrite H; reflexivity. +Qed. + +Add Ring MyNatSRing : natSRth (decidable eq_nat_bool_implies_eq). + +Goal 0 = 0. + ring. +Qed. diff --git a/test-suite/bugs/closed/shouldsucceed/1618.v b/test-suite/bugs/closed/shouldsucceed/1618.v new file mode 100644 index 00000000..a90290bf --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1618.v @@ -0,0 +1,23 @@ +Inductive A: Set := +| A1: nat -> A. + +Definition A_size (a: A) : nat := + match a with + | A1 n => 0 + end. + +Require Import Recdef. + +Function n3 (P: A -> Prop) (f: forall n, P (A1 n)) (a: A) {struct a} : P a := + match a return (P a) with + | A1 n => f n + end. + + +Function n1 (P: A -> Prop) (f: forall n, P (A1 n)) (a: A) {measure A_size a} : +P +a := + match a return (P a) with + | A1 n => f n + end. + diff --git a/test-suite/bugs/closed/shouldsucceed/1634.v b/test-suite/bugs/closed/shouldsucceed/1634.v new file mode 100644 index 00000000..e0c540f3 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1634.v @@ -0,0 +1,24 @@ +Require Export Relation_Definitions. +Require Export Setoid. + +Variable A : Type. +Variable S : A -> Type. +Variable Seq : forall {a:A}, relation (S a). + +Hypothesis Seq_refl : forall {a:A} (x : S a), Seq x x. +Hypothesis Seq_sym : forall {a:A} (x y : S a), Seq x y -> Seq y x. +Hypothesis Seq_trans : forall {a:A} (x y z : S a), Seq x y -> Seq y z -> +Seq x z. + +Add Parametric Relation a : (S a) Seq + reflexivity proved by Seq_refl + symmetry proved by Seq_sym + transitivity proved by Seq_trans + as S_Setoid. + +Goal forall (a : A) (x y : S a), Seq x y -> Seq x y. + intros a x y H. + setoid_replace x with y. + reflexivity. + trivial. +Qed. diff --git a/test-suite/bugs/closed/shouldsucceed/1643.v b/test-suite/bugs/closed/shouldsucceed/1643.v new file mode 100644 index 00000000..4114987d --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1643.v @@ -0,0 +1,21 @@ +(* Check some aspects of that the algorithm used to possibly reuse a + global name in the recursive calls (coinductive case) *) + +CoInductive Str : Set := Cons (h:nat) (t:Str). + +Definition decomp_func (s:Str) := + match s with + | Cons h t => Cons h t + end. + +Theorem decomp s: s = decomp_func s. +Proof. + intros s. + case s; simpl; reflexivity. +Qed. + +Definition zeros := (cofix z : Str := Cons 0 z). +Lemma zeros_rw : zeros = Cons 0 zeros. + rewrite (decomp zeros). + simpl. +Admitted. diff --git a/test-suite/bugs/closed/shouldsucceed/1680.v b/test-suite/bugs/closed/shouldsucceed/1680.v new file mode 100644 index 00000000..524c7bab --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1680.v @@ -0,0 +1,9 @@ +Ltac int1 := let h := fresh in intro h. + +Goal nat -> nat -> True. + let h' := fresh in (let h := fresh in intro h); intro h'. + Restart. let h' := fresh in int1; intro h'. + trivial. +Qed. + + diff --git a/test-suite/bugs/closed/shouldsucceed/1683.v b/test-suite/bugs/closed/shouldsucceed/1683.v new file mode 100644 index 00000000..1571ee20 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1683.v @@ -0,0 +1,42 @@ +Require Import Setoid. + +Section SetoidBug. + +Variable ms : Type. +Variable ms_type : ms -> Type. +Variable ms_eq : forall (A:ms), relation (ms_type A). + +Variable CR : ms. + +Record Ring : Type := +{Ring_type : Type}. + +Variable foo : forall (A:Ring), nat -> Ring_type A. +Variable IR : Ring. +Variable IRasCR : Ring_type IR -> ms_type CR. + +Definition CRasCRing : Ring := Build_Ring (ms_type CR). + +Hypothesis ms_refl : forall A x, ms_eq A x x. +Hypothesis ms_sym : forall A x y, ms_eq A x y -> ms_eq A y x. +Hypothesis ms_trans : forall A x y z, ms_eq A x y -> ms_eq A y z -> ms_eq A x z. + +Add Parametric Relation A : (ms_type A) (ms_eq A) + reflexivity proved by (ms_refl A) + symmetry proved by (ms_sym A) + transitivity proved by (ms_trans A) + as ms_Setoid. + +Hypothesis foobar : forall n, ms_eq CR (IRasCR (foo IR n)) (foo CRasCRing n). + +Goal forall (b:ms_type CR), + ms_eq CR (IRasCR (foo IR O)) b -> + ms_eq CR (IRasCR (foo IR O)) b. +intros b H. +rewrite foobar. +rewrite foobar in H. +assumption. +Qed. + + + diff --git a/test-suite/bugs/closed/shouldsucceed/1696.v b/test-suite/bugs/closed/shouldsucceed/1696.v new file mode 100644 index 00000000..0826428a --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1696.v @@ -0,0 +1,16 @@ +Require Import Setoid. + +Inductive mynat := z : mynat | s : mynat -> mynat. + +Parameter E : mynat -> mynat -> Prop. +Axiom E_equiv : equiv mynat E. + +Add Relation mynat E + reflexivity proved by (proj1 E_equiv) + symmetry proved by (proj2 (proj2 E_equiv)) + transitivity proved by (proj1 (proj2 E_equiv)) +as E_rel. + +Notation "x == y" := (E x y) (at level 70). + +Goal z == s z -> s z == z. intros H. setoid_rewrite H at 2. reflexivity. Qed. diff --git a/test-suite/bugs/closed/shouldsucceed/1704.v b/test-suite/bugs/closed/shouldsucceed/1704.v new file mode 100644 index 00000000..4b02d5f9 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1704.v @@ -0,0 +1,17 @@ + +Require Import Setoid. +Parameter E : nat -> nat -> Prop. +Axiom E_equiv : equiv nat E. +Add Relation nat E +reflexivity proved by (proj1 E_equiv) +symmetry proved by (proj2 (proj2 E_equiv)) +transitivity proved by (proj1 (proj2 E_equiv)) +as E_rel. +Notation "x == y" := (E x y) (at level 70, no associativity). +Axiom r : False -> 0 == 1. +Goal 0 == 0. +Proof. +rewrite r. +reflexivity. +admit. +Qed. diff --git a/test-suite/bugs/closed/shouldsucceed/1718.v b/test-suite/bugs/closed/shouldsucceed/1718.v new file mode 100644 index 00000000..715fa941 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1718.v @@ -0,0 +1,9 @@ +(* lazy delta unfolding used to miss delta on rels and vars (fixed in 10172) *) + +Check + let g := fun _ => 0 in + fix f (n : nat) := + match n with + | 0 => g f + | S n' => 0 + end. diff --git a/test-suite/bugs/closed/shouldsucceed/1738.v b/test-suite/bugs/closed/shouldsucceed/1738.v new file mode 100644 index 00000000..0deed366 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1738.v @@ -0,0 +1,30 @@ +Require Import FSets. + +Module SomeSetoids (Import M:FSetInterface.S). + +Lemma Equal_refl : forall s, s[=]s. +Proof. red; split; auto. Qed. + +Add Relation t Equal + reflexivity proved by Equal_refl + symmetry proved by eq_sym + transitivity proved by eq_trans + as EqualSetoid. + +Add Morphism Empty with signature Equal ==> iff as Empty_m. +Proof. +unfold Equal, Empty; firstorder. +Qed. + +End SomeSetoids. + +Module Test (Import M:FSetInterface.S). + Module A:=SomeSetoids M. + Module B:=SomeSetoids M. (* lots of warning *) + + Lemma Test : forall s s', s[=]s' -> Empty s -> Empty s'. + intros. + rewrite H in H0. + assumption. +Qed. +End Test. \ No newline at end of file diff --git a/test-suite/bugs/closed/shouldsucceed/1740.v b/test-suite/bugs/closed/shouldsucceed/1740.v new file mode 100644 index 00000000..d9ce546a --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1740.v @@ -0,0 +1,23 @@ +(* Check that expansion of alias in pattern-matching compilation is no + longer dependent of whether the pattern-matching problem occurs in a + typed context or at toplevel (solved from revision 10883) *) + +Definition f := + fun n m : nat => + match n, m with + | O, _ => O + | n, O => n + | _, _ => O + end. + +Goal f = + fun n m : nat => + match n, m with + | O, _ => O + | n, O => n + | _, _ => O + end. + unfold f. + reflexivity. +Qed. + diff --git a/test-suite/bugs/closed/shouldsucceed/1754.v b/test-suite/bugs/closed/shouldsucceed/1754.v new file mode 100644 index 00000000..06b8dce8 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1754.v @@ -0,0 +1,24 @@ +Axiom hp : Set. +Axiom cont : nat -> hp -> Prop. +Axiom sconj : (hp -> Prop) -> (hp -> Prop) -> hp -> Prop. +Axiom sconjImpl : forall h A B, + (sconj A B) h -> forall (A' B': hp -> Prop), + (forall h', A h' -> A' h') -> + (forall h', B h' -> B' h') -> + (sconj A' B') h. + +Definition cont' (h:hp) := exists y, cont y h. + +Lemma foo : forall h x y A, + (sconj (cont x) (sconj (cont y) A)) h -> + (sconj cont' (sconj cont' A)) h. +Proof. + intros h x y A H. + eapply sconjImpl. + 2:intros h' Hp'; econstructor; apply Hp'. + 2:intros h' Hp'; eapply sconjImpl. + 3:intros h'' Hp''; econstructor; apply Hp''. + 3:intros h'' Hp''; apply Hp''. + 2:apply Hp'. + clear H. +Admitted. diff --git a/test-suite/bugs/closed/shouldsucceed/1773.v b/test-suite/bugs/closed/shouldsucceed/1773.v new file mode 100644 index 00000000..211af89b --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1773.v @@ -0,0 +1,9 @@ +(* An occur-check test was done too early *) + +Goal forall B C : nat -> nat -> Prop, forall k, + (exists A, (forall k', C A k' -> B A k') -> B A k). +Proof. + intros B C k. + econstructor. + intros X. + apply X. (* used to fail here *) diff --git a/test-suite/bugs/closed/shouldsucceed/1774.v b/test-suite/bugs/closed/shouldsucceed/1774.v new file mode 100644 index 00000000..4c24b481 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1774.v @@ -0,0 +1,18 @@ +Axiom pl : (nat -> Prop) -> (nat -> Prop) -> (nat -> Prop). +Axiom plImp : forall k P Q, + pl P Q k -> forall (P':nat -> Prop), + (forall k', P k' -> P' k') -> forall (Q':nat -> Prop), + (forall k', Q k' -> Q' k') -> + pl P' Q' k. + +Definition nexists (P:nat -> nat -> Prop) : nat -> Prop := + fun k' => exists k, P k k'. + +Goal forall k (A:nat -> nat -> Prop) (B:nat -> Prop), + pl (nexists A) B k. +intros. +eapply plImp. +2:intros m' M'; econstructor; apply M'. +2:intros m' M'; apply M'. +simpl. +Admitted. diff --git a/test-suite/bugs/closed/shouldsucceed/1775.v b/test-suite/bugs/closed/shouldsucceed/1775.v new file mode 100644 index 00000000..dab4120b --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1775.v @@ -0,0 +1,39 @@ +Axiom pair : nat -> nat -> nat -> Prop. +Axiom pl : (nat -> Prop) -> (nat -> Prop) -> (nat -> Prop). +Axiom plImp : forall k P Q, + pl P Q k -> forall (P':nat -> Prop), + (forall k', P k' -> P' k') -> forall (Q':nat -> Prop), + (forall k', Q k' -> Q' k') -> + pl P' Q' k. + +Definition nexists (P:nat -> nat -> Prop) : nat -> Prop := + fun k' => exists k, P k k'. + +Goal forall s k k' m, + (pl k' (nexists (fun w => (nexists (fun b => pl (pair w w) + (pl (pair s b) + (nexists (fun w0 => (nexists (fun a => pl (pair b w0) + (nexists (fun w1 => (nexists (fun c => pl + (pair a w1) (pl (pair a c) k))))))))))))))) m. +intros. +eapply plImp; [ | eauto | intros ]. +2:econstructor. +2:econstructor. +2:eapply plImp; [ | eauto | intros ]. +3:eapply plImp; [ | eauto | intros ]. +4:econstructor. +4:econstructor. +4:eapply plImp; [ | eauto | intros ]. +5:econstructor. +5:econstructor. +5:eauto. +4:eauto. +3:eauto. +2:eauto. + +assert (X := 1). +clear X. (* very slow! *) + +simpl. (* exception Not_found *) + +Admitted. diff --git a/test-suite/bugs/closed/shouldsucceed/1776.v b/test-suite/bugs/closed/shouldsucceed/1776.v new file mode 100644 index 00000000..abf85455 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1776.v @@ -0,0 +1,22 @@ +Axiom pair : nat -> nat -> nat -> Prop. +Axiom pl : (nat -> Prop) -> (nat -> Prop) -> (nat -> Prop). +Axiom plImpR : forall k P Q, + pl P Q k -> forall (Q':nat -> Prop), + (forall k', Q k' -> Q' k') -> + pl P Q' k. + +Definition nexists (P:nat -> nat -> Prop) : nat -> Prop := + fun k' => exists k, P k k'. + +Goal forall a A m, + True -> + (pl A (nexists (fun x => (nexists + (fun y => pl (pair a (S x)) (pair a (S y))))))) m. +Proof. + intros. + eapply plImpR; [ | intros; econstructor; econstructor; eauto]. + clear H; + match goal with + | |- (pl _ (pl (pair _ ?x) _)) _ => replace x with 0 + end. +Admitted. diff --git a/test-suite/bugs/closed/shouldsucceed/1779.v b/test-suite/bugs/closed/shouldsucceed/1779.v new file mode 100644 index 00000000..95bb66b9 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1779.v @@ -0,0 +1,25 @@ +Require Import Div2. + +Lemma double_div2: forall n, div2 (double n) = n. +exact (fun n => let _subcase := + let _cofact := fun _ : 0 = 0 => refl_equal 0 in + _cofact (let _fact := refl_equal 0 in _fact) in + let _subcase0 := + fun (m : nat) (Hrec : div2 (double m) = m) => + let _fact := f_equal div2 (double_S m) in + let _eq := trans_eq _fact (refl_equal (S (div2 (double m)))) in + let _eq0 := + trans_eq _eq + (trans_eq + (f_equal (fun f : nat -> nat => f (div2 (double m))) + (refl_equal S)) (f_equal S Hrec)) in + _eq0 in + (fix _fix (__ : nat) : div2 (double __) = __ := + match __ as n return (div2 (double n) = n) with + | 0 => _subcase + | S __0 => + (fun _hrec : div2 (double __0) = __0 => _subcase0 __0 _hrec) + (_fix __0) + end) n). +Guarded. +Defined. diff --git a/test-suite/bugs/closed/shouldsucceed/1784.v b/test-suite/bugs/closed/shouldsucceed/1784.v new file mode 100644 index 00000000..616dd26f --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1784.v @@ -0,0 +1,101 @@ +Require Import List. +Require Import ZArith. +Require String. Open Scope string_scope. +Ltac Case s := let c := fresh "case" in set (c := s). + +Set Implicit Arguments. +Unset Strict Implicit. + +Inductive sv : Set := +| I : Z -> sv +| S : list sv -> sv. + +Section sv_induction. + +Variables + (VP: sv -> Prop) + (LP: list sv -> Prop) + + (VPint: forall n, VP (I n)) + (VPset: forall vs, LP vs -> VP (S vs)) + (lpcons: forall v vs, VP v -> LP vs -> LP (v::vs)) + (lpnil: LP nil). + +Fixpoint setl_value_indp (x:sv) {struct x}: VP x := + match x as x return VP x with + | I n => VPint n + | S vs => + VPset + ((fix values_indp (vs:list sv) {struct vs}: (LP vs) := + match vs as vs return LP vs with + | nil => lpnil + | v::vs => lpcons (setl_value_indp v) (values_indp vs) + end) vs) + end. +End sv_induction. + +Inductive slt : sv -> sv -> Prop := +| IC : forall z, slt (I z) (I z) +| IS : forall vs vs', slist_in vs vs' -> slt (S vs) (S vs') + +with sin : sv -> list sv -> Prop := +| Ihd : forall s s' sv', slt s s' -> sin s (s'::sv') +| Itl : forall s s' sv', sin s sv' -> sin s (s'::sv') + +with slist_in : list sv -> list sv -> Prop := +| Inil : forall sv', + slist_in nil sv' +| Icons : forall s sv sv', + sin s sv' -> + slist_in sv sv' -> + slist_in (s::sv) sv'. + +Hint Constructors sin slt slist_in. + +Require Import Program. + +Program Fixpoint lt_dec (x y:sv) { struct x } : {slt x y}+{~slt x y} := + match x with + | I x => + match y with + | I y => if (Z_eq_dec x y) then in_left else in_right + | S ys => in_right + end + | S xs => + match y with + | I y => in_right + | S ys => + let fix list_in (xs ys:list sv) {struct xs} : + {slist_in xs ys} + {~slist_in xs ys} := + match xs with + | nil => in_left + | x::xs => + let fix elem_in (ys:list sv) : {sin x ys}+{~sin x ys} := + match ys with + | nil => in_right + | y::ys => if lt_dec x y then in_left else if elem_in + ys then in_left else in_right + end + in + if elem_in ys then + if list_in xs ys then in_left else in_right + else in_right + end + in if list_in xs ys then in_left else in_right + end + end. + +Next Obligation. apply H; inversion H0; subst; trivial. Defined. +Next Obligation. inversion H. Defined. +Next Obligation. inversion H. Defined. +Next Obligation. inversion H; subst. Defined. +Next Obligation. + contradict H. inversion H1; subst. assumption. + contradict H0; assumption. Defined. +Next Obligation. + contradict H0. inversion H1; subst. assumption. Defined. +Next Obligation. + contradict H. inversion H0; subst. assumption. Defined. +Next Obligation. + contradict H. inversion H0; subst; auto. Defined. + diff --git a/test-suite/bugs/closed/shouldsucceed/1844.v b/test-suite/bugs/closed/shouldsucceed/1844.v new file mode 100644 index 00000000..545f2615 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1844.v @@ -0,0 +1,217 @@ +Require Import ZArith. + +Definition zeq := Z_eq_dec. + +Definition update (A: Set) (x: Z) (v: A) (s: Z -> A) : Z -> A := + fun y => if zeq x y then v else s y. + +Implicit Arguments update [A]. + +Definition ident := Z. +Parameter operator: Set. +Parameter value: Set. +Parameter is_true: value -> Prop. +Definition label := Z. + +Inductive expr : Set := + | Evar: ident -> expr + | Econst: value -> expr + | Eop: operator -> expr -> expr -> expr. + +Inductive stmt : Set := + | Sskip: stmt + | Sassign: ident -> expr -> stmt + | Scall: ident -> ident -> expr -> stmt (* x := f(e) *) + | Sreturn: expr -> stmt + | Sseq: stmt -> stmt -> stmt + | Sifthenelse: expr -> stmt -> stmt -> stmt + | Sloop: stmt -> stmt + | Sblock: stmt -> stmt + | Sexit: nat -> stmt + | Slabel: label -> stmt -> stmt + | Sgoto: label -> stmt. + +Record function : Set := mkfunction { + fn_param: ident; + fn_body: stmt +}. + +Parameter program: ident -> option function. + +Parameter main_function: ident. + +Definition store := ident -> value. + +Parameter empty_store : store. + +Parameter eval_op: operator -> value -> value -> option value. + +Fixpoint eval_expr (st: store) (e: expr) {struct e} : option value := + match e with + | Evar v => Some (st v) + | Econst v => Some v + | Eop op e1 e2 => + match eval_expr st e1, eval_expr st e2 with + | Some v1, Some v2 => eval_op op v1 v2 + | _, _ => None + end + end. + +Inductive outcome: Set := + | Onormal: outcome + | Oexit: nat -> outcome + | Ogoto: label -> outcome + | Oreturn: value -> outcome. + +Definition outcome_block (out: outcome) : outcome := + match out with + | Onormal => Onormal + | Oexit O => Onormal + | Oexit (S m) => Oexit m + | Ogoto lbl => Ogoto lbl + | Oreturn v => Oreturn v + end. + +Fixpoint label_defined (lbl: label) (s: stmt) {struct s}: Prop := + match s with + | Sskip => False + | Sassign id e => False + | Scall id fn e => False + | Sreturn e => False + | Sseq s1 s2 => label_defined lbl s1 \/ label_defined lbl s2 + | Sifthenelse e s1 s2 => label_defined lbl s1 \/ label_defined lbl s2 + | Sloop s1 => label_defined lbl s1 + | Sblock s1 => label_defined lbl s1 + | Sexit n => False + | Slabel lbl1 s1 => lbl1 = lbl \/ label_defined lbl s1 + | Sgoto lbl => False + end. + +Inductive exec : stmt -> store -> outcome -> store -> Prop := + | exec_skip: forall st, + exec Sskip st Onormal st + | exec_assign: forall id e st v, + eval_expr st e = Some v -> + exec (Sassign id e) st Onormal (update id v st) + | exec_call: forall id fn e st v1 f v2 st', + eval_expr st e = Some v1 -> + program fn = Some f -> + exec_function f (update f.(fn_param) v1 empty_store) v2 st' -> + exec (Scall id fn e) st Onormal (update id v2 st) + | exec_return: forall e st v, + eval_expr st e = Some v -> + exec (Sreturn e) st (Oreturn v) st + | exec_seq_2: forall s1 s2 st st1 out' st', + exec s1 st Onormal st1 -> exec s2 st1 out' st' -> + exec (Sseq s1 s2) st out' st' + | exec_seq_1: forall s1 s2 st out st', + exec s1 st out st' -> out <> Onormal -> + exec (Sseq s1 s2) st out st' + | exec_ifthenelse_true: forall e s1 s2 st out st' v, + eval_expr st e = Some v -> is_true v -> exec s1 st out st' -> + exec (Sifthenelse e s1 s2) st out st' + | exec_ifthenelse_false: forall e s1 s2 st out st' v, + eval_expr st e = Some v -> ~is_true v -> exec s2 st out st' -> + exec (Sifthenelse e s1 s2) st out st' + | exec_loop_loop: forall s st st1 out' st', + exec s st Onormal st1 -> + exec (Sloop s) st1 out' st' -> + exec (Sloop s) st out' st' + | exec_loop_stop: forall s st st' out, + exec s st out st' -> out <> Onormal -> + exec (Sloop s) st out st' + | exec_block: forall s st out st', + exec s st out st' -> + exec (Sblock s) st (outcome_block out) st' + | exec_exit: forall n st, + exec (Sexit n) st (Oexit n) st + | exec_label: forall s lbl st st' out, + exec s st out st' -> + exec (Slabel lbl s) st out st' + | exec_goto: forall st lbl, + exec (Sgoto lbl) st (Ogoto lbl) st + +(** [execg lbl stmt st out st'] starts executing at label [lbl] within [s], + in initial store [st]. The result of the execution is the outcome + [out] with final store [st']. *) + +with execg: label -> stmt -> store -> outcome -> store -> Prop := + | execg_left_seq_2: forall lbl s1 s2 st st1 out' st', + execg lbl s1 st Onormal st1 -> exec s2 st1 out' st' -> + execg lbl (Sseq s1 s2) st out' st' + | execg_left_seq_1: forall lbl s1 s2 st out st', + execg lbl s1 st out st' -> out <> Onormal -> + execg lbl (Sseq s1 s2) st out st' + | execg_right_seq: forall lbl s1 s2 st out st', + ~(label_defined lbl s1) -> + execg lbl s2 st out st' -> + execg lbl (Sseq s1 s2) st out st' + | execg_ifthenelse_left: forall lbl e s1 s2 st out st', + execg lbl s1 st out st' -> + execg lbl (Sifthenelse e s1 s2) st out st' + | execg_ifthenelse_right: forall lbl e s1 s2 st out st', + ~(label_defined lbl s1) -> + execg lbl s2 st out st' -> + execg lbl (Sifthenelse e s1 s2) st out st' + | execg_loop_loop: forall lbl s st st1 out' st', + execg lbl s st Onormal st1 -> + exec (Sloop s) st1 out' st' -> + execg lbl (Sloop s) st out' st' + | execg_loop_stop: forall lbl s st st' out, + execg lbl s st out st' -> out <> Onormal -> + execg lbl (Sloop s) st out st' + | execg_block: forall lbl s st out st', + execg lbl s st out st' -> + execg lbl (Sblock s) st (outcome_block out) st' + | execg_label_found: forall lbl s st st' out, + exec s st out st' -> + execg lbl (Slabel lbl s) st out st' + | execg_label_notfound: forall lbl s lbl' st st' out, + lbl' <> lbl -> + execg lbl s st out st' -> + execg lbl (Slabel lbl' s) st out st' + +(** [exec_finish out st st'] takes the outcome [out] and the store [st] + at the end of the evaluation of the program. If [out] is a [goto], + execute again the program starting at the corresponding label. + Iterate this way until [out] is [Onormal]. *) + +with exec_finish: function -> outcome -> store -> value -> store -> Prop := + | exec_finish_normal: forall f st v, + exec_finish f (Oreturn v) st v st + | exec_finish_goto: forall f lbl st out v st1 st', + execg lbl f.(fn_body) st out st1 -> + exec_finish f out st1 v st' -> + exec_finish f (Ogoto lbl) st v st' + +(** Execution of a function *) + +with exec_function: function -> store -> value -> store -> Prop := + | exec_function_intro: forall f st out st1 v st', + exec f.(fn_body) st out st1 -> + exec_finish f out st1 v st' -> + exec_function f st v st'. + +Scheme exec_ind4:= Minimality for exec Sort Prop + with execg_ind4:= Minimality for execg Sort Prop + with exec_finish_ind4 := Minimality for exec_finish Sort Prop + with exec_function_ind4 := Minimality for exec_function Sort Prop. + +Scheme exec_dind4:= Induction for exec Sort Prop + with execg_dind4:= Minimality for execg Sort Prop + with exec_finish_dind4 := Induction for exec_finish Sort Prop + with exec_function_dind4 := Induction for exec_function Sort Prop. + +Combined Scheme exec_inductiond from exec_dind4, execg_dind4, exec_finish_dind4, + exec_function_dind4. + +Scheme exec_dind4' := Induction for exec Sort Prop + with execg_dind4' := Induction for execg Sort Prop + with exec_finish_dind4' := Induction for exec_finish Sort Prop + with exec_function_dind4' := Induction for exec_function Sort Prop. + +Combined Scheme exec_induction from exec_ind4, execg_ind4, exec_finish_ind4, + exec_function_ind4. + +Combined Scheme exec_inductiond' from exec_dind4', execg_dind4', exec_finish_dind4', + exec_function_dind4'. diff --git a/test-suite/bugs/closed/shouldsucceed/1865.v b/test-suite/bugs/closed/shouldsucceed/1865.v new file mode 100644 index 00000000..17c19989 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1865.v @@ -0,0 +1,18 @@ +(* Check that tactics (here dependent inversion) do not generate + conversion problems T <= U with sup's of universes in U *) + +(* Submitted by David Nowak *) + +Inductive list (A:Set) : nat -> Set := +| nil : list A O +| cons : forall n, A -> list A n -> list A (S n). + +Definition f (n:nat) : Type := + match n with + | O => bool + | _ => unit + end. + +Goal forall A n, list A n -> f n. +intros A n. +dependent inversion n. diff --git a/test-suite/bugs/closed/shouldsucceed/348.v b/test-suite/bugs/closed/shouldsucceed/348.v new file mode 100644 index 00000000..28cc5cb1 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/348.v @@ -0,0 +1,13 @@ +Module Type S. + Parameter empty: Set. +End S. + +Module D (M:S). + Import M. + Definition empty:=nat. +End D. + +Module D' (M:S). + Import M. + Definition empty:Set. exact nat. Save. +End D'. diff --git a/test-suite/bugs/closed/shouldsucceed/38.v b/test-suite/bugs/closed/shouldsucceed/38.v new file mode 100644 index 00000000..7bc04b1f --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/38.v @@ -0,0 +1,22 @@ +Require Import Setoid. + +Variable A : Set. + +Inductive liste : Set := +| vide : liste +| c : A -> liste -> liste. + +Inductive e : A -> liste -> Prop := +| ec : forall (x : A) (l : liste), e x (c x l) +| ee : forall (x y : A) (l : liste), e x l -> e x (c y l). + +Definition same := fun (l m : liste) => forall (x : A), e x l <-> e x m. + +Definition same_refl (x:liste) : (same x x). + unfold same; split; intros; trivial. +Save. + +Goal forall (x:liste), (same x x). + intro. + apply (same_refl x). +Qed. diff --git a/test-suite/bugs/closed/shouldsucceed/545.v b/test-suite/bugs/closed/shouldsucceed/545.v new file mode 100644 index 00000000..926af7dd --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/545.v @@ -0,0 +1,5 @@ +Require Export Reals. + +Parameter toto : nat -> nat -> nat. + +Notation " e # f " := (toto e f) (at level 30, f at level 0). diff --git a/test-suite/bugs/closed/shouldsucceed/846.v b/test-suite/bugs/closed/shouldsucceed/846.v new file mode 100644 index 00000000..a963b225 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/846.v @@ -0,0 +1,213 @@ +Set Implicit Arguments. + +Open Scope type_scope. + +Inductive One : Set := inOne: One. + +Definition maybe: forall A B:Set,(A -> B) -> One + A -> One + B. +Proof. + intros A B f c. + case c. + left; assumption. + right; apply f; assumption. +Defined. + +Definition id (A:Set)(a:A):=a. + +Definition LamF (X: Set -> Set)(A:Set) :Set := + A + (X A)*(X A) + X(One + A). + +Definition LamF' (X: Set -> Set)(A:Set) :Set := + LamF X A. + +Require Import List. +Require Import Bool. + +Definition index := list bool. + +Inductive L (A:Set) : index -> Set := + initL: A -> L A nil + | pluslL: forall l:index, One -> L A (false::l) + | plusrL: forall l:index, L A l -> L A (false::l) + | varL: forall l:index, L A l -> L A (true::l) + | appL: forall l:index, L A (true::l) -> L A (true::l) -> L A (true::l) + | absL: forall l:index, L A (true::false::l) -> L A (true::l). + +Scheme L_rec_simp := Minimality for L Sort Set. + +Definition Lam' (A:Set) := L A (true::nil). + +Definition aczelapp: forall (l1 l2: index)(A:Set), L (L A l2) l1 -> L A + (l1++l2). +Proof. + intros l1 l2 A. + generalize l1. + clear l1. + (* Check (fun i:index => L A (i++l2)). *) + apply (L_rec_simp (A:=L A l2) (fun i:index => L A (i++l2))). + trivial. + intros l o. + simpl app. + apply pluslL; assumption. + intros l _ t. + simpl app. + apply plusrL; assumption. + intros l _ t. + simpl app. + apply varL; assumption. + intros l _ t1 _ t2. + simpl app in *|-*. + Check 0. + apply appL; [exact t1| exact t2]. + intros l _ t. + simpl app in *|-*. + Check 0. + apply absL; assumption. +Defined. + +Definition monL: forall (l:index)(A:Set)(B:Set), (A->B) -> L A l -> L B l. +Proof. + intros l A B f. + intro t. + elim t. + intro a. + exact (initL (f a)). + intros i u. + exact (pluslL _ _ u). + intros i _ r. + exact (plusrL r). + intros i _ r. + exact (varL r). + intros i _ r1 _ r2. + exact (appL r1 r2). + intros i _ r. + exact (absL r). +Defined. + +Definition lam': forall (A B:Set), (A -> B) -> Lam' A -> Lam' B. +Proof. + intros A B f t. + unfold Lam' in *|-*. + Check 0. + exact (monL f t). +Defined. + +Definition inLam': forall A:Set, LamF' Lam' A -> Lam' A. +Proof. + intros A [[a|[t1 t2]]|r]. + unfold Lam'. + exact (varL (initL a)). + exact (appL t1 t2). + unfold Lam' in * |- *. + Check 0. + apply absL. + change (L A ((true::nil) ++ (false::nil))). + apply aczelapp. + (* Check (fun x:One + A => (match (maybe (fun a:A => initL a) x) with + | inl u => pluslL _ _ u + | inr t' => plusrL t' end)). *) + exact (monL (fun x:One + A => + (match (maybe (fun a:A => initL a) x) with + | inl u => pluslL _ _ u + | inr t' => plusrL t' end)) r). +Defined. + +Section minimal. + +Definition sub1 (F G: Set -> Set):= forall A:Set, F A->G A. +Hypothesis G: Set -> Set. +Hypothesis step: sub1 (LamF' G) G. + +Fixpoint L'(A:Set)(i:index){struct i} : Set := + match i with + nil => A + | false::l => One + L' A l + | true::l => G (L' A l) + end. + +Definition LinL': forall (A:Set)(i:index), L A i -> L' A i. +Proof. + intros A i t. + elim t. + intro a. + unfold L'. + assumption. + intros l u. + left; assumption. + intros l _ r. + right; assumption. + intros l _ r. + apply (step (A:=L' A l)). + exact (inl _ (inl _ r)). + intros l _ r1 _ r2. + apply (step (A:=L' A l)). + (* unfold L' in * |- *. + Check 0. *) + exact (inl _ (inr _ (pair r1 r2))). + intros l _ r. + apply (step (A:=L' A l)). + exact (inr _ r). +Defined. + +Definition L'inG: forall A: Set, L' A (true::nil) -> G A. +Proof. + intros A t. + unfold L' in t. + assumption. +Defined. + +Definition Itbasic: sub1 Lam' G. +Proof. + intros A t. + apply L'inG. + unfold Lam' in t. + exact (LinL' t). +Defined. + +End minimal. + +Definition recid := Itbasic inLam'. + +Definition L'Lam'inL: forall (i:index)(A:Set), L' Lam' A i -> L A i. +Proof. + intros i A t. + induction i. + unfold L' in t. + apply initL. + assumption. + induction a. + simpl L' in t. + apply (aczelapp (l1:=true::nil) (l2:=i)). + exact (lam' IHi t). + simpl L' in t. + induction t. + exact (pluslL _ _ a). + exact (plusrL (IHi b)). +Defined. + + +Lemma recidgen: forall(A:Set)(i:index)(t:L A i), L'Lam'inL i A (LinL' inLam' t) + = t. +Proof. + intros A i t. + induction t. + trivial. + trivial. + simpl. + rewrite IHt. + trivial. + simpl L'Lam'inL. + rewrite IHt. + trivial. + simpl L'Lam'inL. + simpl L'Lam'inL in IHt1. + unfold lam' in IHt1. + simpl L'Lam'inL in IHt2. + unfold lam' in IHt2. + + (* going on. This fails for the original solution. *) + rewrite IHt1. + rewrite IHt2. + trivial. +Abort. (* one goal still left *) + diff --git a/test-suite/bugs/closed/shouldsucceed/931.v b/test-suite/bugs/closed/shouldsucceed/931.v new file mode 100644 index 00000000..21f15e72 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/931.v @@ -0,0 +1,7 @@ +Parameter P : forall n : nat, n=n -> Prop. + +Goal Prop. + refine (P _ _). + instantiate (1:=0). + trivial. +Qed. diff --git a/test-suite/bugs/opened/1773.v b/test-suite/bugs/opened/1773.v new file mode 100644 index 00000000..4aabf19c --- /dev/null +++ b/test-suite/bugs/opened/1773.v @@ -0,0 +1,10 @@ +Goal forall B C : nat -> nat -> Prop, forall k, C 0 k -> + (exists A, (forall k', C A k' -> B A k') -> B A k). +Proof. + intros B C k H. + econstructor. + intros X. + apply X. + apply H. +Qed. + diff --git a/test-suite/bugs/opened/shouldnotfail/1338.v-disabled b/test-suite/bugs/opened/shouldnotfail/1338.v-disabled new file mode 100644 index 00000000..f383d534 --- /dev/null +++ b/test-suite/bugs/opened/shouldnotfail/1338.v-disabled @@ -0,0 +1,12 @@ +Require Import Omega. + +Goal forall x, 0 <= x -> x <= 20 -> +x <> 0 + -> x <> 1 -> x <> 2 -> x <> 3 -> x <>4 -> x <> 5 -> x <> 6 -> x <> 7 -> x <> 8 +-> x <> 9 -> x <> 10 + -> x <> 11 -> x <> 12 -> x <> 13 -> x <> 14 -> x <> 15 -> x <> 16 -> x <> 17 +-> x <> 18 -> x <> 19 -> x <> 20 -> False. +Proof. + intros. + omega. +Qed. diff --git a/test-suite/bugs/opened/shouldnotfail/1416.v b/test-suite/bugs/opened/shouldnotfail/1416.v new file mode 100644 index 00000000..c6f4302d --- /dev/null +++ b/test-suite/bugs/opened/shouldnotfail/1416.v @@ -0,0 +1,27 @@ +Set Implicit Arguments. + +Record Place (Env A: Type) : Type := { + read: Env -> A ; + write: Env -> A -> Env ; + write_read: forall (e:Env), (write e (read e))=e +}. + +Hint Rewrite -> write_read: placeeq. + +Record sumPl (Env A B: Type) (vL:(Place Env A)) (vR:(Place Env B)) : Type := + { + mkEnv: A -> B -> Env ; + mkEnv2writeL: forall (e:Env) (x:A), (mkEnv x (read vR e))=(write vL e x) + }. + +(* when the following line is commented, the bug does not appear *) +Hint Rewrite -> mkEnv2writeL: placeeq. + +Lemma autorewrite_raise_anomaly: forall (Env A:Type) (e: Env) (p:Place Env A), + (exists e1:Env, e=(write p e1 (read p e))). +Proof. + intros Env A e p; eapply ex_intro. + autorewrite with placeeq. (* Here is the bug *) + auto. +Qed. + diff --git a/test-suite/bugs/opened/shouldnotfail/1501.v b/test-suite/bugs/opened/shouldnotfail/1501.v new file mode 100644 index 00000000..85c09dbd --- /dev/null +++ b/test-suite/bugs/opened/shouldnotfail/1501.v @@ -0,0 +1,93 @@ +Set Implicit Arguments. + + +Require Export Relation_Definitions. +Require Export Setoid. + + +Section Essais. + +(* Parametrized Setoid *) +Parameter K : Type -> Type. +Parameter equiv : forall A : Type, K A -> K A -> Prop. +Parameter equiv_refl : forall (A : Type) (x : K A), equiv x x. +Parameter equiv_sym : forall (A : Type) (x y : K A), equiv x y -> equiv y x. +Parameter equiv_trans : forall (A : Type) (x y z : K A), equiv x y -> equiv y z +-> equiv x z. + +(* basic operations *) +Parameter val : forall A : Type, A -> K A. +Parameter bind : forall A B : Type, K A -> (A -> K B) -> K B. + +Parameter + bind_compat : + forall (A B : Type) (m1 m2 : K A) (f1 f2 : A -> K B), + equiv m1 m2 -> + (forall x : A, equiv (f1 x) (f2 x)) -> equiv (bind m1 f1) (bind m2 f2). + +(* monad axioms *) +Parameter + bind_val_l : + forall (A B : Type) (a : A) (f : A -> K B), equiv (bind (val a) f) (f a). +Parameter + bind_val_r : + forall (A : Type) (m : K A), equiv (bind m (fun a => val a)) m. +Parameter + bind_assoc : + forall (A B C : Type) (m : K A) (f : A -> K B) (g : B -> K C), + equiv (bind (bind m f) g) (bind m (fun a => bind (f a) g)). + + +Hint Resolve equiv_refl equiv_sym equiv_trans: monad. + +Add Relation K equiv + reflexivity proved by (@equiv_refl) + symmetry proved by (@equiv_sym) + transitivity proved by (@equiv_trans) + as equiv_rel. + +Definition fequiv (A B: Type) (f g: A -> K B) := forall (x:A), (equiv (f x) (g +x)). + +Lemma fequiv_refl : forall (A B: Type) (f : A -> K B), fequiv f f. +Proof. + unfold fequiv; auto with monad. +Qed. + +Lemma fequiv_sym : forall (A B: Type) (x y : A -> K B), fequiv x y -> fequiv y +x. +Proof. + unfold fequiv; auto with monad. +Qed. + +Lemma fequiv_trans : forall (A B: Type) (x y z : A -> K B), fequiv x y -> +fequiv +y z -> fequiv x z. +Proof. + unfold fequiv; intros; eapply equiv_trans; auto with monad. +Qed. + +Add Relation (fun (A B:Type) => A -> K B) fequiv + reflexivity proved by (@fequiv_refl) + symmetry proved by (@fequiv_sym) + transitivity proved by (@fequiv_trans) + as fequiv_rel. + +Add Morphism bind + with signature equiv ==> fequiv ==> equiv + as bind_mor. +Proof. + unfold fequiv; intros; apply bind_compat; auto. +Qed. + +Lemma test: + forall (A B: Type) (m1 m2 m3: K A) (f: A -> A -> K B), + (equiv m1 m2) -> (equiv m2 m3) -> + equiv (bind m1 (fun a => bind m2 (fun a' => f a a'))) + (bind m2 (fun a => bind m3 (fun a' => f a a'))). +Proof. + intros A B m1 m2 m3 f H1 H2. + setoid_rewrite H1. (* this works *) + setoid_rewrite H2. + trivial by equiv_refl. +Qed. diff --git a/test-suite/bugs/opened/shouldnotfail/1596.v b/test-suite/bugs/opened/shouldnotfail/1596.v new file mode 100644 index 00000000..766bf524 --- /dev/null +++ b/test-suite/bugs/opened/shouldnotfail/1596.v @@ -0,0 +1,242 @@ + +Require Import Relations. +Require Import FSets. +Require Import Arith. + +Lemma Bool_elim_bool : forall (b:bool),b=true \/ b=false. + destruct b;try tauto. +Qed. + +Module OrderedPair (X:OrderedType) (Y:OrderedType) <: OrderedType with +Definition t := (X.t * Y.t)%type. + Definition t := (X.t * Y.t)%type. + + Definition eq (xy1:t) (xy2:t) := + let (x1,y1) := xy1 in + let (x2,y2) := xy2 in + (X.eq x1 x2) /\ (Y.eq y1 y2). + + Definition lt (xy1:t) (xy2:t) := + let (x1,y1) := xy1 in + let (x2,y2) := xy2 in + (X.lt x1 x2) \/ ((X.eq x1 x2) /\ (Y.lt y1 y2)). + + Lemma eq_refl : forall (x:t),(eq x x). + destruct x. + unfold eq. + split;[apply X.eq_refl | apply Y.eq_refl]. + Qed. + + Lemma eq_sym : forall (x y:t),(eq x y)->(eq y x). + destruct x;destruct y;unfold eq;intro. + elim H;clear H;intros. + split;[apply X.eq_sym | apply Y.eq_sym];trivial. + Qed. + + Lemma eq_trans : forall (x y z:t),(eq x y)->(eq y z)->(eq x z). + unfold eq;destruct x;destruct y;destruct z;intros. + elim H;clear H;intros. + elim H0;clear H0;intros. + split;[eapply X.eq_trans | eapply Y.eq_trans];eauto. + Qed. + + Lemma lt_trans : forall (x y z:t),(lt x y)->(lt y z)->(lt x z). + unfold lt;destruct x;destruct y;destruct z;intros. + case H;clear H;intro. + case H0;clear H0;intro. + left. + eapply X.lt_trans;eauto. + elim H0;clear H0;intros. + left. + case (X.compare t0 t4);trivial;intros. + generalize (X.eq_sym H0);intro. + generalize (X.eq_trans e H2);intro. + elim (X.lt_not_eq H H3). + generalize (X.lt_trans l H);intro. + generalize (X.eq_sym H0);intro. + elim (X.lt_not_eq H2 H3). + elim H;clear H;intros. + case H0;clear H0;intro. + left. + case (X.compare t0 t4);trivial;intros. + generalize (X.eq_sym H);intro. + generalize (X.eq_trans H2 e);intro. + elim (X.lt_not_eq H0 H3). + generalize (X.lt_trans H0 l);intro. + generalize (X.eq_sym H);intro. + elim (X.lt_not_eq H2 H3). + elim H0;clear H0;intros. + right. + split. + eauto. + eauto. + Qed. + + Lemma lt_not_eq : forall (x y:t),(lt x y)->~(eq x y). + unfold lt, eq;destruct x;destruct y;intro;intro. + elim H0;clear H0;intros. + case H. + intro. + apply (X.lt_not_eq H2 H0). + intro. + elim H2;clear H2;intros. + apply (Y.lt_not_eq H3 H1). + Qed. + + Definition compare : forall (x y:t),(Compare lt eq x y). + destruct x;destruct y. + case (X.compare t0 t2);intro. + apply LT. + left;trivial. + case (Y.compare t1 t3);intro. + apply LT. + right. + tauto. + apply EQ. + split;trivial. + apply GT. + right;auto. + apply GT. + left;trivial. + Defined. + + Hint Immediate eq_sym. + Hint Resolve eq_refl eq_trans lt_not_eq lt_trans. +End OrderedPair. + +Module MessageSpi. + Inductive message : Set := + | MNam : nat -> message. + + Definition t := message. + + Fixpoint message_lt (m n:message) {struct m} : Prop := + match (m,n) with + | (MNam n1,MNam n2) => n1 < n2 + end. + + Module Ord <: OrderedType with Definition t := message with Definition eq := +@eq message. + Definition t := message. + Definition eq := @eq message. + Definition lt := message_lt. + + Lemma eq_refl : forall (x:t),eq x x. + unfold eq;auto. + Qed. + + Lemma eq_sym : forall (x y:t),(eq x y )->(eq y x). + unfold eq;auto. + Qed. + + Lemma eq_trans : forall (x y z:t),(eq x y)->(eq y z)->(eq x z). + unfold eq;auto;intros;congruence. + Qed. + + Lemma lt_trans : forall (x y z:t),(lt x y)->(lt y z)->(lt x z). + unfold lt. + induction x;destruct y;simpl;try tauto;destruct z;try tauto;intros. + omega. + Qed. + + Lemma lt_not_eq : forall (x y:t),(lt x y)->~(eq x y). + unfold eq;unfold lt. + induction x;destruct y;simpl;try tauto;intro;red;intro;try (discriminate +H0);injection H0;intros. + elim (lt_irrefl n);try omega. + Qed. + + Definition compare : forall (x y:t),(Compare lt eq x y). + unfold lt, eq. + induction x;destruct y;intros;try (apply LT;simpl;trivial;fail);try +(apply +GT;simpl;trivial;fail). + case (lt_eq_lt_dec n n0);intros;try (case s;clear s;intros). + apply LT;trivial. + apply EQ;trivial. + rewrite e;trivial. + apply GT;trivial. + Defined. + + Hint Immediate eq_sym. + Hint Resolve eq_refl eq_trans lt_not_eq lt_trans. + End Ord. + + Theorem eq_dec : forall (m n:message),{m=n}+{~(m=n)}. + intros. + case (Ord.compare m n);intro;[right | left | right];try (red;intro). + elim (Ord.lt_not_eq m n);auto. + rewrite e;auto. + elim (Ord.lt_not_eq n m);auto. + Defined. +End MessageSpi. + +Module MessagePair := OrderedPair MessageSpi.Ord MessageSpi.Ord. + +Module Type Hedge := FSetInterface.S with Module E := MessagePair. + +Module A (H:Hedge). + Definition hedge := H.t. + + Definition message_relation := relation MessageSpi.message. + + Definition relation_of_hedge (h:hedge) (m n:MessageSpi.message) := H.In (m,n) +h. + + Inductive hedge_synthesis_relation (h:message_relation) : message_relation := + | SynInc : forall (m n:MessageSpi.message),(h m +n)->(hedge_synthesis_relation h m n). + + Fixpoint hedge_in_synthesis (h:hedge) (m:MessageSpi.message) +(n:MessageSpi.message) {struct m} : bool := + if H.mem (m,n) h + then true + else false. + + Definition hedge_synthesis_spec (h:hedge) := hedge_synthesis_relation +(relation_of_hedge h). + + Lemma hedge_in_synthesis_impl_hedge_synthesis_spec : forall (h:hedge),forall +(m n:MessageSpi.message),(hedge_in_synthesis h m n)=true->(hedge_synthesis_spec +h m n). + unfold hedge_synthesis_spec;unfold relation_of_hedge. + induction m;simpl;intro. + elim (Bool_elim_bool (H.mem (MessageSpi.MNam n,n0) h));intros. + apply SynInc;apply H.mem_2;trivial. + rewrite H in H0. (* !! possible here !! *) + discriminate H0. + Qed. +End A. + +Module B (H:Hedge). + Definition hedge := H.t. + + Definition message_relation := relation MessageSpi.t. + + Definition relation_of_hedge (h:hedge) (m n:MessageSpi.t) := H.In (m,n) h. + + Inductive hedge_synthesis_relation (h:message_relation) : message_relation := + | SynInc : forall (m n:MessageSpi.t),(h m n)->(hedge_synthesis_relation h m +n). + + Fixpoint hedge_in_synthesis (h:hedge) (m:MessageSpi.t) (n:MessageSpi.t) +{struct m} : bool := + if H.mem (m,n) h + then true + else false. + + Definition hedge_synthesis_spec (h:hedge) := hedge_synthesis_relation +(relation_of_hedge h). + + Lemma hedge_in_synthesis_impl_hedge_synthesis_spec : forall (h:hedge),forall +(m n:MessageSpi.t),(hedge_in_synthesis h m n)=true->(hedge_synthesis_spec h m +n). + unfold hedge_synthesis_spec;unfold relation_of_hedge. + induction m;simpl;intro. + elim (Bool_elim_bool (H.mem (MessageSpi.MNam n,n0) h));intros. + apply SynInc;apply H.mem_2;trivial. + + rewrite H in H0. (* !! impossible here !! *) + discriminate H0. + Qed. +End B. \ No newline at end of file diff --git a/test-suite/bugs/opened/shouldnotfail/1811.v b/test-suite/bugs/opened/shouldnotfail/1811.v new file mode 100644 index 00000000..037b7cb2 --- /dev/null +++ b/test-suite/bugs/opened/shouldnotfail/1811.v @@ -0,0 +1,9 @@ +Require Export Bool. + +Lemma neg2xor : forall b, xorb true b = negb b. +Proof. auto. Qed. + +Goal forall b1 b2, (negb b1 = b2) -> xorb true b1 = b2. +Proof. + intros b1 b2. + rewrite neg2xor. \ No newline at end of file diff --git a/test-suite/bugs/opened/shouldnotfail/743.v b/test-suite/bugs/opened/shouldnotfail/743.v new file mode 100644 index 00000000..f1eee6c1 --- /dev/null +++ b/test-suite/bugs/opened/shouldnotfail/743.v @@ -0,0 +1,12 @@ +Require Import Omega. + +Lemma foo : forall n m : Z, (n >= 0)%Z -> (n * m >= 0)%Z -> (n <= n + n * m)%Z. +Proof. + intros. omega. +Qed. + +Lemma foo' : forall n m : nat, n <= n + n * m. +Proof. + intros. omega. +Qed. + diff --git a/test-suite/check b/test-suite/check index 504e96cc..f2307d40 100755 --- a/test-suite/check +++ b/test-suite/check @@ -106,6 +106,7 @@ test_interactive() { # La fonction suivante teste en interactif # It expects a line "(* Expected time < XXX.YYs *)" in the .v file # with exactly two digits after the dot +# The reference for time is a 6120 bogomips cpu test_complexity() { if [ -f /proc/cpuinfo ]; then if grep -q bogomips /proc/cpuinfo; then # i386, ppc @@ -145,28 +146,119 @@ test_complexity() { fi } +test_bugs () { + # Process verifications concerning submitted bugs. A message is + # printed for all opened bugs (still active or seems to be closed). + # For closed bugs that behave as expected, no message is printed + + # All files are assumed to have <# of the bug>.v as a name + + echo "Testing opened bugs..." + # We first test opened bugs that should not succeed + files=`/bin/ls -1 $1/opened/shoulnotsucceed/*.v 2> /dev/null` + for f in $files; do + nbtests=`expr $nbtests + 1` + printf " "$f"..." + $command $f $2 > /dev/null 2>&1 + if [ $? = 0 ]; then + echo "still active" + nbtestsok=`expr $nbtestsok + 1` + else + echo "Error! (bug seems to be closed, please check)" + fi + done + + # And opened bugs that should not fail + files=`/bin/ls -1 $1/opened/shouldnotfail/*.v 2> /dev/null` + for f in $files; do + nbtests=`expr $nbtests + 1` + printf " "$f"..." + $command $f > /dev/null 2>&1 + if [ $? != 0 ]; then + echo "still active" + nbtestsok=`expr $nbtestsok + 1` + else + echo "Error! (bug seems to be closed, please check)" + fi + done + + echo "Testing closed bugs..." + # Then closed bugs that should succeed + files=`/bin/ls -1 $1/closed/shouldsucceed/*.v 2> /dev/null` + for f in $files; do + nbtests=`expr $nbtests + 1` + printf " "$f"..." + $command $f $2 > /dev/null 2>&1 + if [ $? = 0 ]; then + echo "Ok" + nbtestsok=`expr $nbtestsok + 1` + else + echo "Error! (bug seems to be opened, please check)" + fi + done + + + # At last, we test closed bugs that should fail + files=`/bin/ls -1 $1/closed/shouldfail/*.v 2> /dev/null` + for f in $files; do + nbtests=`expr $nbtests + 1` + printf " "$f"..." + $command $f > /dev/null 2>&1 + if [ $? != 0 ]; then + echo "Ok" + nbtestsok=`expr $nbtestsok + 1` + else + echo "Error! (bug seems to be opened, please check)" + fi + done + +} + +test_features () { + # Process verifications concerning submitted bugs. A message is + # printed for all opened bugs (still active or seem to be closed. + # For closed bugs that behave as expected, no message is printed + + echo "Testing wishes..." + files=`/bin/ls -1 $1/*.v 2> /dev/null` + for f in $files; do + nbtests=`expr $nbtests + 1` + printf " "$f"..." + $command $f $2 > /dev/null 2>&1 + if [ $? != 0 ]; then + echo "still wished" + nbtestsok=`expr $nbtestsok + 1` + else + echo "Good news! (wish seems to be granted, please check)" + fi + done +} + # Programme principal echo "Success tests" test_success success echo "Failure tests" test_failure failure +echo "Bugs tests" +test_bugs bugs echo "Output tests" test_output output echo "Parser tests" test_parser parser echo "Interactive tests" test_interactive interactive +echo "Micromega tests" +test_success micromega echo "Complexity tests" test_complexity complexity echo "Module tests" $coqtop -compile modules/Nat $coqtop -compile modules/plik test_success modules "-I modules -impredicative-set" +#echo "Ideal-features tests" +#test_features ideal-features pourcentage=`expr 100 \* $nbtestsok / $nbtests` echo echo "$nbtestsok tests passed over $nbtests, i.e. $pourcentage %" - -#echo "Ideal-features tests" -#test_success ideal-features diff --git a/test-suite/complexity/injection.v b/test-suite/complexity/injection.v new file mode 100644 index 00000000..eb01133e --- /dev/null +++ b/test-suite/complexity/injection.v @@ -0,0 +1,113 @@ +(* This example, submitted by A. Appel, checks the efficiency of + injection (see bug #1173) *) +(* Expected time < 1.50s *) + +Set Implicit Arguments. + +Record joinable (t: Type) : Type := Joinable { + is_empty: t -> Prop; + join: t -> t -> t -> Prop; + join_com: forall a b c, join a b c -> join b a c; + join_empty: forall e a b, is_empty e -> join e a b -> a=b; + exists_empty: forall a, exists e, is_empty e /\ join e a a; + join_empty2: forall a b c, join a b c -> is_empty c -> is_empty a; + join_empty3: forall e a, join e a a -> is_empty e; + join_assoc: forall a b c d e, join a b d -> join d c e -> + exists f, join b c f /\ join a f e; + join_eq: forall x y z z', join x y z -> join x y z' -> z = z'; + cancellation: forall a1 a2 b c, join a1 b c -> join a2 b c -> a1=a2 +}. + +Record joinmap (key: Type) (t: Type) (j : joinable t) : Type + := Joinmap { + jm_t : Type; + jm_j : joinable jm_t; + lookup: jm_t -> key -> t; + prim : forall (f: key -> t) (e: t), + (forall k, j.(join) e (f k) (f k)) -> + jm_t; + join_rule: forall s1 s2 s, + jm_j.(join) s1 s2 s <-> + forall x, j.(join) (lookup s1 x) (lookup s2 x) (lookup s x); + empty_rule: forall e x, jm_j.(is_empty) e -> j.(is_empty) (lookup e x); + prim_rule: forall f e pf k, lookup (prim f e pf) k = f k; + ext: forall s1 s2, + (forall x, lookup s1 x = lookup s2 x) <-> s1 = s2; + can_join: forall s1 s2, + (forall x, exists v, + j.(join) (lookup s1 x) (lookup s2 x) v) -> + exists s3, jm_j.(join) s1 s2 s3; + can_split: forall s1 s3, + (forall x, exists v, + j.(join) (lookup s1 x) v (lookup s3 x)) -> + exists s2, jm_j.(join) s1 s2 s3 +}. + +Parameter mkJoinmap : forall (key: Type) (t: Type) (j: joinable t), +joinmap key j. + +Parameter ADMIT: forall p: Prop, p. +Implicit Arguments ADMIT [p]. + +Module Share. +Parameter jb : joinable bool. +Definition jm: joinmap nat jb := mkJoinmap nat jb. +Definition t := jm.(jm_t). +Definition j := jm.(jm_j). +Parameter nonempty: t -> Prop. +End Share. + +Section Own. + +Variable inv : Type. + +Inductive own : Type := + | NO + | VAL' : forall sh, Share.nonempty sh -> own + | LK : forall sh, Share.nonempty sh -> Share.t -> inv -> own + | CT : forall sh, Share.nonempty sh -> own + | FUN: forall sh, Share.nonempty sh -> inv -> own. + +Definition own_join (a b c: own) : Prop := + match a , b , c with + | NO , _ , _ => b=c + | _ , NO , _ => a=c + | VAL' sa _ , VAL' sb _, VAL' sc _ => Share.j.(join) sa sb sc + | LK sa pa ha fa, LK sb pb hb fb, LK sc pc hc fc => + Share.j.(join) sa sb sc /\ + Share.j.(join) ha hb hc /\ + fa=fc /\ + fb=fc + | CT sa pa , CT sb pb, CT sc pc => Share.j.(join) sa sb sc + | FUN sa pa fa, FUN sb pb fb, FUN sc pc fc => + Share.j.(join) sa sb sc /\ fa=fc /\ fb=fc + | _ , _ , _ => False + end. + +Definition own_is_empty (a: own) := a=NO. + +Definition jown : joinable own := + Joinable own_is_empty own_join + ADMIT ADMIT ADMIT ADMIT ADMIT ADMIT ADMIT ADMIT . +End Own. + +Fixpoint sinv (n: nat) : Type := + match n with + | O => unit + | S n => prodT (sinv n) (own (sinv n) -> unit -> Prop) + end. + +Parameter address: Set. + +Definition jm (n: nat) := mkJoinmap address (jown (sinv n)). + +Definition worldfun (n: nat) := (jm n).(jm_t). + +Inductive world : Type := + mk_world: forall n, worldfun n -> world. + +Lemma test: forall n1 w1 n2 w2, mk_world n1 w1 = mk_world n2 w2 -> + n1 = n2. +Proof. +intros. +Time injection H. diff --git a/test-suite/complexity/ring.v b/test-suite/complexity/ring.v new file mode 100644 index 00000000..5a541bc2 --- /dev/null +++ b/test-suite/complexity/ring.v @@ -0,0 +1,7 @@ +(* This example, checks the efficiency of the abstract machine used by ring *) +(* Expected time < 1.00s *) + +Require Import ZArith. +Open Scope Z_scope. +Goal forall a, a+a+a+a+a+a+a+a+a+a+a+a+a = a*13. +Time intro; ring. diff --git a/test-suite/complexity/ring2.v b/test-suite/complexity/ring2.v new file mode 100644 index 00000000..9f9685dd --- /dev/null +++ b/test-suite/complexity/ring2.v @@ -0,0 +1,51 @@ +(* This example, checks the efficiency of the abstract machine used by ring *) +(* Expected time < 1.00s *) + +Require Import BinInt. + +Definition Zplus x y := +match x with +| 0%Z => y +| Zpos x' => + match y with + | 0%Z => x + | Zpos y' => Zpos (x' + y') + | Zneg y' => + match (x' ?= y')%positive Eq with + | Eq => 0%Z + | Lt => Zneg (y' - x') + | Gt => Zpos (x' - y') + end + end +| Zneg x' => + match y with + | 0%Z => x + | Zpos y' => + match (x' ?= y')%positive Eq with + | Eq => 0%Z + | Lt => Zpos (y' - x') + | Gt => Zneg (x' - y') + end + | Zneg y' => Zneg (x' + y') + end +end. + +Require Import Ring. + +Lemma Zth : ring_theory Z0 (Zpos xH) Zplus Zmult Zminus Zopp (@eq Z). +Admitted. + +Ltac Zcst t := + match isZcst t with + true => t + | _ => constr:NotConstant + end. + +Add Ring Zr : Zth + (decidable Zeqb_ok, constants [Zcst]). + +Open Scope Z_scope. +Infix "+" := Zplus : Z_scope. + +Goal forall a, a+a+a+a+a+a+a+a+a+a+a+a+a = a*13. +Time intro; ring. diff --git a/test-suite/csdp.cache b/test-suite/csdp.cache new file mode 100644 index 00000000..59ff450c --- /dev/null +++ b/test-suite/csdp.cache @@ -0,0 +1,106548 @@ +*** REQUEST *** +"" +3 +3 +4 1 1 +0.10485760000000000000e7 -0.52428800000000000000e6 0.52428800000000000000e6 +0 1 1 2 -0.52428800000000000000e6 +0 1 1 4 0.52428800000000000000e6 +0 1 2 2 -0.10485760000000000000e7 +0 1 4 4 0.10485760000000000000e7 +0 2 1 1 -0.10485760000000000000e7 +1 1 1 1 0.10485760000000000000e7 +1 1 1 2 0.52428800000000000000e6 +1 1 1 4 -0.52428800000000000000e6 +1 1 2 2 0.10485760000000000000e7 +1 1 4 4 -0.10485760000000000000e7 +1 2 1 1 0.10485760000000000000e7 +2 1 1 3 0.10485760000000000000e7 +2 1 1 4 -0.52428800000000000000e6 +2 1 4 4 -0.10485760000000000000e7 +3 1 1 2 -0.52428800000000000000e6 +3 1 1 4 0.52428800000000000000e6 +3 3 1 1 0.10485760000000000000e7 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +8 +4 +4 1 4 1 +-0.52428800000000000000e6 0.10485760000000000000e7 -0.52428800000000000000e6 0.0 -0.10485760000000000000e7 0.52428800000000000000e6 0.0 0.10485760000000000000e7 +0 1 1 2 -0.26214400000000000000e6 +0 1 1 4 0.26214400000000000000e6 +0 2 1 1 -0.52428800000000000000e6 +0 3 1 2 -0.26214400000000000000e6 +0 3 1 4 -0.26214400000000000000e6 +1 1 2 3 0.52428800000000000000e6 +1 1 3 4 -0.52428800000000000000e6 +1 3 1 4 -0.26214400000000000000e6 +1 3 4 4 -0.52428800000000000000e6 +2 1 1 1 0.52428800000000000000e6 +2 1 1 2 0.26214400000000000000e6 +2 1 1 4 -0.26214400000000000000e6 +2 2 1 1 0.52428800000000000000e6 +2 3 1 2 0.26214400000000000000e6 +2 3 1 4 0.26214400000000000000e6 +3 1 1 3 0.52428800000000000000e6 +3 1 1 4 -0.26214400000000000000e6 +3 1 4 4 -0.52428800000000000000e6 +4 1 2 2 0.52428800000000000000e6 +4 1 4 4 -0.52428800000000000000e6 +4 3 1 2 -0.26214400000000000000e6 +4 3 1 4 -0.26214400000000000000e6 +5 1 2 4 0.52428800000000000000e6 +5 1 4 4 -0.10485760000000000000e7 +5 3 1 4 -0.52428800000000000000e6 +6 1 1 2 -0.26214400000000000000e6 +6 1 1 4 0.26214400000000000000e6 +6 3 1 1 0.52428800000000000000e6 +7 1 2 3 -0.52428800000000000000e6 +7 1 3 4 0.52428800000000000000e6 +7 3 1 3 0.52428800000000000000e6 +8 1 1 2 0.26214400000000000000e6 +8 1 1 4 -0.26214400000000000000e6 +8 1 2 3 -0.52428800000000000000e6 +8 1 3 4 0.52428800000000000000e6 +8 3 1 2 0.26214400000000000000e6 +8 3 2 2 0.52428800000000000000e6 +8 4 1 1 0.52428800000000000000e6 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +51 +4 +10 4 4 1 +0.52428800000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.10485760000000000000e7 0.0 0.0 -0.10485760000000000000e7 0.0 0.10485760000000000000e7 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.10485760000000000000e7 0.0 0.0 0.0 0.0 0.52428800000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 -0.10485760000000000000e7 0.10485760000000000000e7 0.0 0.52428800000000000000e6 0.0 0.10485760000000000000e7 0.0 0.10485760000000000000e7 0.0 -0.10485760000000000000e7 0.52428800000000000000e6 0.0 0.0 0.52428800000000000000e6 0.52428800000000000000e6 +0 1 1 2 -0.13107200000000000000e6 +0 1 1 4 0.26214400000000000000e6 +0 1 1 8 -0.13107200000000000000e6 +0 2 1 1 -0.26214400000000000000e6 +0 3 1 2 -0.13107200000000000000e6 +1 1 2 9 -0.26214400000000000000e6 +1 1 7 10 0.13107200000000000000e6 +1 1 10 10 0.26214400000000000000e6 +1 3 3 4 0.26214400000000000000e6 +2 1 2 9 0.13107200000000000000e6 +2 1 6 7 -0.26214400000000000000e6 +2 1 9 10 0.13107200000000000000e6 +2 3 3 4 -0.13107200000000000000e6 +3 1 2 9 -0.26214400000000000000e6 +3 1 7 8 0.13107200000000000000e6 +3 1 8 10 0.13107200000000000000e6 +4 1 2 9 0.26214400000000000000e6 +4 1 3 10 -0.13107200000000000000e6 +4 1 4 7 -0.26214400000000000000e6 +4 1 7 8 -0.13107200000000000000e6 +4 1 7 10 0.13107200000000000000e6 +4 2 4 4 -0.26214400000000000000e6 +4 3 3 4 -0.26214400000000000000e6 +5 1 1 6 -0.13107200000000000000e6 +5 1 3 6 -0.13107200000000000000e6 +5 1 4 5 -0.13107200000000000000e6 +5 1 6 7 0.13107200000000000000e6 +5 1 9 9 0.26214400000000000000e6 +5 2 3 3 -0.26214400000000000000e6 +6 1 2 9 0.13107200000000000000e6 +6 1 4 5 -0.26214400000000000000e6 +6 1 8 9 0.13107200000000000000e6 +7 1 1 6 -0.26214400000000000000e6 +7 1 2 9 0.13107200000000000000e6 +7 1 4 7 0.13107200000000000000e6 +7 3 3 4 -0.13107200000000000000e6 +8 1 1 8 -0.13107200000000000000e6 +8 1 2 5 -0.26214400000000000000e6 +8 1 2 9 0.26214400000000000000e6 +8 1 3 8 -0.13107200000000000000e6 +8 1 3 10 0.13107200000000000000e6 +8 2 2 4 -0.13107200000000000000e6 +9 1 1 4 0.26214400000000000000e6 +9 1 1 6 -0.52428800000000000000e6 +9 1 1 8 0.13107200000000000000e6 +9 1 2 5 0.26214400000000000000e6 +9 1 7 8 0.13107200000000000000e6 +9 2 1 3 0.26214400000000000000e6 +10 1 1 2 0.13107200000000000000e6 +10 1 1 6 -0.52428800000000000000e6 +10 1 1 8 0.13107200000000000000e6 +10 1 2 3 0.13107200000000000000e6 +10 1 2 5 0.26214400000000000000e6 +10 1 3 8 0.13107200000000000000e6 +10 1 3 10 -0.13107200000000000000e6 +10 1 4 7 0.26214400000000000000e6 +10 1 7 8 -0.13107200000000000000e6 +10 2 1 3 0.26214400000000000000e6 +10 2 2 4 0.13107200000000000000e6 +10 2 4 4 -0.26214400000000000000e6 +10 3 1 2 0.13107200000000000000e6 +10 3 3 4 -0.26214400000000000000e6 +10 4 1 1 0.26214400000000000000e6 +11 1 1 1 0.26214400000000000000e6 +11 1 1 2 0.13107200000000000000e6 +11 1 1 4 -0.26214400000000000000e6 +11 1 1 8 0.13107200000000000000e6 +11 2 1 1 0.26214400000000000000e6 +11 3 1 2 0.13107200000000000000e6 +12 1 1 3 0.26214400000000000000e6 +12 1 1 8 -0.26214400000000000000e6 +12 3 1 2 -0.26214400000000000000e6 +13 1 1 4 0.26214400000000000000e6 +13 1 1 5 0.26214400000000000000e6 +13 1 1 6 -0.52428800000000000000e6 +13 1 2 5 0.26214400000000000000e6 +13 2 1 3 0.26214400000000000000e6 +14 1 1 2 -0.26214400000000000000e6 +14 1 1 4 -0.52428800000000000000e6 +14 1 1 6 0.10485760000000000000e7 +14 1 1 7 0.26214400000000000000e6 +14 1 1 8 -0.26214400000000000000e6 +14 1 2 3 -0.26214400000000000000e6 +14 1 2 5 -0.52428800000000000000e6 +14 1 2 9 0.52428800000000000000e6 +14 1 3 8 -0.26214400000000000000e6 +14 1 4 7 -0.52428800000000000000e6 +14 2 1 3 -0.52428800000000000000e6 +14 2 2 4 -0.26214400000000000000e6 +14 3 1 2 -0.26214400000000000000e6 +14 4 1 1 -0.52428800000000000000e6 +15 1 1 9 0.26214400000000000000e6 +15 1 4 7 -0.26214400000000000000e6 +16 1 1 10 0.26214400000000000000e6 +16 1 2 9 -0.52428800000000000000e6 +16 1 3 10 0.26214400000000000000e6 +16 1 7 8 0.26214400000000000000e6 +16 2 4 4 0.52428800000000000000e6 +16 3 3 4 0.52428800000000000000e6 +17 1 1 8 -0.13107200000000000000e6 +17 1 2 2 0.26214400000000000000e6 +17 3 1 2 -0.13107200000000000000e6 +18 1 1 4 0.26214400000000000000e6 +18 1 1 6 -0.52428800000000000000e6 +18 1 2 4 0.26214400000000000000e6 +18 1 2 5 0.26214400000000000000e6 +18 2 1 3 0.26214400000000000000e6 +19 1 2 6 0.26214400000000000000e6 +19 1 4 5 -0.26214400000000000000e6 +20 1 1 8 -0.26214400000000000000e6 +20 1 2 7 0.26214400000000000000e6 +21 1 1 8 0.26214400000000000000e6 +21 1 2 8 0.26214400000000000000e6 +21 1 2 9 -0.52428800000000000000e6 +21 1 3 8 0.26214400000000000000e6 +21 2 2 4 0.26214400000000000000e6 +22 1 2 10 0.26214400000000000000e6 +22 1 7 8 -0.26214400000000000000e6 +23 1 1 8 0.13107200000000000000e6 +23 1 2 3 0.13107200000000000000e6 +23 1 2 5 -0.26214400000000000000e6 +23 1 3 3 0.26214400000000000000e6 +23 2 2 2 0.26214400000000000000e6 +23 3 1 2 0.13107200000000000000e6 +24 1 2 5 -0.26214400000000000000e6 +24 1 3 4 0.26214400000000000000e6 +25 1 1 4 -0.26214400000000000000e6 +25 1 1 6 0.52428800000000000000e6 +25 1 3 5 0.26214400000000000000e6 +25 1 4 5 -0.52428800000000000000e6 +25 2 1 3 -0.26214400000000000000e6 +25 2 2 3 0.26214400000000000000e6 +26 1 1 8 0.26214400000000000000e6 +26 1 2 9 -0.52428800000000000000e6 +26 1 3 7 0.26214400000000000000e6 +26 1 3 8 0.26214400000000000000e6 +26 2 2 4 0.26214400000000000000e6 +27 1 3 9 0.26214400000000000000e6 +27 1 5 8 -0.26214400000000000000e6 +28 1 1 6 -0.13107200000000000000e6 +28 1 4 4 0.26214400000000000000e6 +29 1 1 6 -0.13107200000000000000e6 +29 1 3 6 -0.13107200000000000000e6 +29 1 4 5 -0.13107200000000000000e6 +29 1 4 6 0.26214400000000000000e6 +29 2 3 3 -0.26214400000000000000e6 +30 1 2 9 -0.26214400000000000000e6 +30 1 4 8 0.26214400000000000000e6 +31 1 4 9 0.26214400000000000000e6 +31 1 6 7 -0.26214400000000000000e6 +32 1 2 9 -0.26214400000000000000e6 +32 1 4 10 0.26214400000000000000e6 +32 3 3 4 0.26214400000000000000e6 +33 1 3 6 -0.13107200000000000000e6 +33 1 5 5 0.26214400000000000000e6 +34 1 2 9 -0.26214400000000000000e6 +34 1 5 7 0.26214400000000000000e6 +35 1 5 10 0.26214400000000000000e6 +35 1 8 9 -0.26214400000000000000e6 +36 1 5 9 -0.26214400000000000000e6 +36 1 6 8 0.26214400000000000000e6 +37 1 6 10 0.26214400000000000000e6 +37 1 9 9 -0.52428800000000000000e6 +38 1 2 9 -0.26214400000000000000e6 +38 1 3 10 0.13107200000000000000e6 +38 1 7 7 0.26214400000000000000e6 +38 1 7 8 0.13107200000000000000e6 +38 2 4 4 0.26214400000000000000e6 +38 3 3 4 0.26214400000000000000e6 +39 1 2 9 -0.26214400000000000000e6 +39 1 7 9 0.26214400000000000000e6 +39 3 3 4 0.26214400000000000000e6 +40 1 3 10 -0.13107200000000000000e6 +40 1 8 8 0.26214400000000000000e6 +41 1 1 2 0.26214400000000000000e6 +41 1 1 4 0.52428800000000000000e6 +41 1 1 6 -0.10485760000000000000e7 +41 1 1 8 0.26214400000000000000e6 +41 1 2 3 0.26214400000000000000e6 +41 1 2 5 0.52428800000000000000e6 +41 2 1 2 0.26214400000000000000e6 +41 2 1 3 0.52428800000000000000e6 +41 3 1 2 0.26214400000000000000e6 +42 1 1 2 0.26214400000000000000e6 +42 1 1 4 0.52428800000000000000e6 +42 1 1 6 -0.10485760000000000000e7 +42 1 1 8 0.26214400000000000000e6 +42 1 2 3 0.26214400000000000000e6 +42 1 2 5 0.52428800000000000000e6 +42 2 1 3 0.52428800000000000000e6 +42 2 1 4 0.26214400000000000000e6 +42 3 1 2 0.26214400000000000000e6 +42 4 1 1 0.52428800000000000000e6 +43 1 2 9 0.26214400000000000000e6 +43 1 4 7 0.26214400000000000000e6 +43 1 5 8 0.26214400000000000000e6 +43 1 6 7 -0.52428800000000000000e6 +43 2 3 4 0.26214400000000000000e6 +44 1 1 4 0.26214400000000000000e6 +44 1 1 6 -0.52428800000000000000e6 +44 1 1 8 0.13107200000000000000e6 +44 1 2 3 0.13107200000000000000e6 +44 1 2 5 0.26214400000000000000e6 +44 1 2 9 -0.26214400000000000000e6 +44 1 3 8 0.13107200000000000000e6 +44 1 4 7 0.26214400000000000000e6 +44 2 1 3 0.26214400000000000000e6 +44 2 2 4 0.13107200000000000000e6 +44 3 1 1 0.26214400000000000000e6 +44 3 1 2 0.13107200000000000000e6 +44 4 1 1 0.26214400000000000000e6 +45 1 1 4 0.26214400000000000000e6 +45 1 1 6 -0.52428800000000000000e6 +45 1 2 5 0.26214400000000000000e6 +45 1 4 7 0.26214400000000000000e6 +45 2 1 3 0.26214400000000000000e6 +45 3 1 3 0.26214400000000000000e6 +46 1 1 8 -0.26214400000000000000e6 +46 1 2 9 0.52428800000000000000e6 +46 1 3 10 -0.26214400000000000000e6 +46 1 7 8 -0.26214400000000000000e6 +46 2 4 4 -0.52428800000000000000e6 +46 3 1 4 0.26214400000000000000e6 +46 3 3 4 -0.52428800000000000000e6 +47 1 1 8 -0.13107200000000000000e6 +47 1 2 3 -0.13107200000000000000e6 +47 1 2 9 0.26214400000000000000e6 +47 1 3 8 -0.13107200000000000000e6 +47 2 2 4 -0.13107200000000000000e6 +47 3 2 2 0.26214400000000000000e6 +48 1 2 5 -0.26214400000000000000e6 +48 1 2 9 0.26214400000000000000e6 +48 3 2 3 0.26214400000000000000e6 +49 1 1 8 0.26214400000000000000e6 +49 1 2 9 -0.52428800000000000000e6 +49 1 3 8 0.26214400000000000000e6 +49 1 7 8 0.26214400000000000000e6 +49 2 2 4 0.26214400000000000000e6 +49 3 2 4 0.26214400000000000000e6 +50 1 4 5 -0.13107200000000000000e6 +50 1 6 7 0.13107200000000000000e6 +50 3 3 3 0.26214400000000000000e6 +51 1 7 8 -0.13107200000000000000e6 +51 1 7 10 0.13107200000000000000e6 +51 3 4 4 0.26214400000000000000e6 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +96 +4 +10 4 10 4 +-0.52428800000000000000e6 0.0 -0.52428800000000000000e6 -0.52428800000000000000e6 0.0 0.26214400000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.26214400000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.52428800000000000000e6 0.10485760000000000000e7 0.0 0.0 0.0 -0.10485760000000000000e7 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 -0.52428800000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.10485760000000000000e7 0.52428800000000000000e6 0.0 0.0 0.10485760000000000000e7 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.10485760000000000000e7 0.0 0.10485760000000000000e7 0.0 0.0 0.10485760000000000000e7 0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.0 0.0 0.10485760000000000000e7 0.0 0.0 0.0 -0.10485760000000000000e7 0.52428800000000000000e6 0.0 0.10485760000000000000e7 0.0 0.0 0.0 0.10485760000000000000e7 0.0 -0.52428800000000000000e6 +0 1 1 2 -0.26214400000000000000e6 +0 1 1 4 0.52428800000000000000e6 +0 1 1 8 -0.26214400000000000000e6 +0 2 1 1 -0.52428800000000000000e6 +0 3 1 2 -0.26214400000000000000e6 +1 1 5 8 0.52428800000000000000e6 +1 1 9 10 -0.52428800000000000000e6 +1 3 7 8 -0.26214400000000000000e6 +1 3 7 10 -0.26214400000000000000e6 +1 3 8 10 -0.26214400000000000000e6 +1 3 10 10 -0.52428800000000000000e6 +2 1 5 8 0.52428800000000000000e6 +2 1 8 9 -0.52428800000000000000e6 +2 3 7 8 -0.26214400000000000000e6 +2 3 8 10 -0.26214400000000000000e6 +3 1 1 10 -0.26214400000000000000e6 +3 2 4 4 -0.52428800000000000000e6 +3 3 1 10 -0.26214400000000000000e6 +3 3 7 8 -0.26214400000000000000e6 +3 3 7 10 -0.26214400000000000000e6 +4 1 5 6 0.52428800000000000000e6 +4 1 6 9 -0.52428800000000000000e6 +4 3 4 9 -0.26214400000000000000e6 +4 3 9 9 -0.52428800000000000000e6 +5 1 8 9 0.26214400000000000000e6 +5 1 9 10 -0.26214400000000000000e6 +5 3 4 9 -0.52428800000000000000e6 +5 3 9 10 0.26214400000000000000e6 +6 1 1 10 0.13107200000000000000e6 +6 1 3 10 0.13107200000000000000e6 +6 1 6 7 -0.52428800000000000000e6 +6 1 7 10 0.13107200000000000000e6 +6 1 9 10 0.26214400000000000000e6 +6 2 4 4 0.26214400000000000000e6 +6 3 1 10 0.13107200000000000000e6 +7 1 2 9 -0.52428800000000000000e6 +7 1 3 10 0.26214400000000000000e6 +7 1 7 10 0.26214400000000000000e6 +7 3 1 10 0.26214400000000000000e6 +7 3 7 8 -0.26214400000000000000e6 +8 1 1 10 0.26214400000000000000e6 +8 1 4 7 -0.52428800000000000000e6 +8 1 7 10 0.26214400000000000000e6 +9 1 1 4 -0.13107200000000000000e6 +9 1 2 5 -0.13107200000000000000e6 +9 1 4 7 -0.13107200000000000000e6 +9 2 1 3 -0.13107200000000000000e6 +9 2 3 3 -0.52428800000000000000e6 +9 3 1 4 -0.13107200000000000000e6 +9 3 1 6 -0.26214400000000000000e6 +9 3 4 5 -0.26214400000000000000e6 +9 3 4 9 -0.26214400000000000000e6 +10 1 5 8 0.26214400000000000000e6 +10 1 9 10 -0.26214400000000000000e6 +10 3 4 5 -0.52428800000000000000e6 +10 3 4 9 -0.52428800000000000000e6 +10 3 5 10 0.26214400000000000000e6 +10 3 9 10 0.26214400000000000000e6 +11 1 2 9 0.26214400000000000000e6 +11 1 6 7 -0.52428800000000000000e6 +11 1 8 9 0.26214400000000000000e6 +11 3 1 6 -0.52428800000000000000e6 +12 1 1 4 -0.26214400000000000000e6 +12 1 1 10 0.13107200000000000000e6 +12 1 2 5 -0.26214400000000000000e6 +12 1 3 10 0.13107200000000000000e6 +12 1 7 10 0.13107200000000000000e6 +12 2 1 3 -0.26214400000000000000e6 +12 2 4 4 0.26214400000000000000e6 +12 3 1 4 -0.26214400000000000000e6 +12 3 1 10 0.13107200000000000000e6 +13 1 1 8 -0.26214400000000000000e6 +13 1 2 9 0.52428800000000000000e6 +13 1 3 10 -0.26214400000000000000e6 +13 1 7 10 -0.26214400000000000000e6 +13 1 8 9 0.52428800000000000000e6 +13 1 9 10 -0.52428800000000000000e6 +13 2 2 4 -0.26214400000000000000e6 +13 3 1 10 -0.52428800000000000000e6 +13 3 2 7 -0.26214400000000000000e6 +13 3 3 4 -0.52428800000000000000e6 +13 3 7 8 -0.26214400000000000000e6 +13 4 4 4 -0.52428800000000000000e6 +14 1 2 5 -0.52428800000000000000e6 +14 1 3 10 0.26214400000000000000e6 +14 1 7 10 0.26214400000000000000e6 +14 3 1 10 0.26214400000000000000e6 +14 3 2 7 0.26214400000000000000e6 +15 1 1 8 0.26214400000000000000e6 +15 1 4 7 -0.52428800000000000000e6 +15 1 7 10 0.26214400000000000000e6 +15 3 1 4 -0.52428800000000000000e6 +15 3 1 10 0.26214400000000000000e6 +16 1 1 2 0.26214400000000000000e6 +16 1 1 4 -0.52428800000000000000e6 +16 1 1 10 0.26214400000000000000e6 +16 1 2 3 0.26214400000000000000e6 +16 1 7 10 -0.26214400000000000000e6 +16 3 1 2 0.26214400000000000000e6 +16 3 1 4 -0.52428800000000000000e6 +16 3 1 10 -0.26214400000000000000e6 +16 3 2 7 -0.26214400000000000000e6 +16 4 1 1 0.52428800000000000000e6 +17 1 1 1 0.52428800000000000000e6 +17 1 1 2 0.26214400000000000000e6 +17 1 1 4 -0.52428800000000000000e6 +17 1 1 8 0.26214400000000000000e6 +17 2 1 1 0.52428800000000000000e6 +17 3 1 2 0.26214400000000000000e6 +18 1 1 3 0.52428800000000000000e6 +18 1 1 8 -0.52428800000000000000e6 +18 3 1 2 -0.52428800000000000000e6 +19 1 1 5 0.52428800000000000000e6 +19 1 4 7 -0.52428800000000000000e6 +19 3 1 4 -0.52428800000000000000e6 +20 1 1 4 -0.26214400000000000000e6 +20 1 1 6 0.52428800000000000000e6 +20 1 2 5 -0.26214400000000000000e6 +20 1 4 7 -0.26214400000000000000e6 +20 2 1 3 -0.26214400000000000000e6 +20 3 1 4 -0.26214400000000000000e6 +21 1 1 2 -0.52428800000000000000e6 +21 1 1 7 0.52428800000000000000e6 +21 1 2 3 -0.52428800000000000000e6 +21 1 7 10 0.52428800000000000000e6 +21 3 1 2 -0.52428800000000000000e6 +21 3 1 4 0.10485760000000000000e7 +21 3 1 10 0.52428800000000000000e6 +21 3 2 7 0.52428800000000000000e6 +21 4 1 1 -0.10485760000000000000e7 +22 1 1 9 0.52428800000000000000e6 +22 1 4 7 -0.52428800000000000000e6 +23 1 1 8 -0.26214400000000000000e6 +23 1 2 2 0.52428800000000000000e6 +23 3 1 2 -0.26214400000000000000e6 +24 1 2 4 0.52428800000000000000e6 +24 1 4 7 -0.52428800000000000000e6 +24 3 1 4 -0.52428800000000000000e6 +25 1 2 6 0.52428800000000000000e6 +25 1 6 7 -0.52428800000000000000e6 +25 3 1 6 -0.52428800000000000000e6 +26 1 1 8 -0.52428800000000000000e6 +26 1 2 7 0.52428800000000000000e6 +27 1 2 8 0.52428800000000000000e6 +27 1 7 10 -0.52428800000000000000e6 +27 3 1 10 -0.52428800000000000000e6 +27 3 2 7 -0.52428800000000000000e6 +28 1 2 10 0.52428800000000000000e6 +28 1 7 10 -0.52428800000000000000e6 +28 3 1 10 -0.52428800000000000000e6 +29 1 1 8 0.26214400000000000000e6 +29 1 2 9 -0.52428800000000000000e6 +29 1 3 3 0.52428800000000000000e6 +29 1 7 10 0.26214400000000000000e6 +29 2 2 4 0.26214400000000000000e6 +29 3 1 10 0.26214400000000000000e6 +29 3 2 3 -0.26214400000000000000e6 +29 3 2 7 0.26214400000000000000e6 +30 1 2 5 -0.52428800000000000000e6 +30 1 3 4 0.52428800000000000000e6 +31 1 3 5 0.52428800000000000000e6 +31 1 5 8 -0.52428800000000000000e6 +31 3 3 4 -0.52428800000000000000e6 +32 1 3 7 0.52428800000000000000e6 +32 1 7 10 -0.52428800000000000000e6 +32 3 1 10 -0.52428800000000000000e6 +32 3 2 7 -0.52428800000000000000e6 +33 1 1 8 0.52428800000000000000e6 +33 1 2 9 -0.10485760000000000000e7 +33 1 3 8 0.52428800000000000000e6 +33 1 7 10 0.52428800000000000000e6 +33 2 2 4 0.52428800000000000000e6 +33 3 1 10 0.52428800000000000000e6 +33 3 2 7 0.52428800000000000000e6 +34 1 3 9 0.52428800000000000000e6 +34 1 5 8 -0.52428800000000000000e6 +35 1 1 4 -0.13107200000000000000e6 +35 1 2 5 -0.13107200000000000000e6 +35 1 4 4 0.52428800000000000000e6 +35 1 4 7 -0.13107200000000000000e6 +35 2 1 3 -0.13107200000000000000e6 +35 3 1 4 -0.13107200000000000000e6 +36 1 4 5 0.52428800000000000000e6 +36 1 6 7 -0.52428800000000000000e6 +36 3 1 6 -0.52428800000000000000e6 +37 1 1 4 -0.13107200000000000000e6 +37 1 2 5 -0.13107200000000000000e6 +37 1 3 6 -0.26214400000000000000e6 +37 1 4 6 0.52428800000000000000e6 +37 1 4 7 -0.13107200000000000000e6 +37 1 6 7 -0.26214400000000000000e6 +37 2 1 3 -0.13107200000000000000e6 +37 2 3 3 -0.52428800000000000000e6 +37 3 1 4 -0.13107200000000000000e6 +37 3 1 6 -0.26214400000000000000e6 +38 1 2 9 -0.52428800000000000000e6 +38 1 4 8 0.52428800000000000000e6 +39 1 4 9 0.52428800000000000000e6 +39 1 6 7 -0.52428800000000000000e6 +40 1 1 10 -0.26214400000000000000e6 +40 1 3 10 -0.26214400000000000000e6 +40 1 4 10 0.52428800000000000000e6 +40 1 7 10 -0.26214400000000000000e6 +40 2 4 4 -0.52428800000000000000e6 +40 3 1 10 -0.26214400000000000000e6 +41 1 3 6 -0.26214400000000000000e6 +41 1 5 5 0.52428800000000000000e6 +42 1 2 9 -0.52428800000000000000e6 +42 1 5 7 0.52428800000000000000e6 +43 1 3 6 -0.52428800000000000000e6 +43 1 5 9 0.52428800000000000000e6 +43 3 4 5 0.52428800000000000000e6 +44 1 5 10 0.52428800000000000000e6 +44 1 8 9 -0.52428800000000000000e6 +45 1 3 6 -0.52428800000000000000e6 +45 1 6 8 0.52428800000000000000e6 +45 3 4 5 0.52428800000000000000e6 +46 1 3 6 -0.52428800000000000000e6 +46 1 6 10 0.52428800000000000000e6 +46 3 4 5 0.52428800000000000000e6 +46 3 4 9 0.52428800000000000000e6 +47 1 1 10 -0.26214400000000000000e6 +47 1 7 7 0.52428800000000000000e6 +48 1 7 8 0.52428800000000000000e6 +48 1 7 10 -0.52428800000000000000e6 +48 3 1 10 -0.52428800000000000000e6 +49 1 1 10 -0.26214400000000000000e6 +49 1 3 10 -0.26214400000000000000e6 +49 1 7 9 0.52428800000000000000e6 +49 1 7 10 -0.26214400000000000000e6 +49 2 4 4 -0.52428800000000000000e6 +49 3 1 10 -0.26214400000000000000e6 +50 1 3 10 -0.26214400000000000000e6 +50 1 8 8 0.52428800000000000000e6 +51 1 3 10 -0.52428800000000000000e6 +51 1 8 10 0.52428800000000000000e6 +51 3 7 8 0.52428800000000000000e6 +52 1 3 6 -0.26214400000000000000e6 +52 1 9 9 0.52428800000000000000e6 +52 3 4 5 0.26214400000000000000e6 +52 3 4 9 0.26214400000000000000e6 +53 1 3 10 -0.26214400000000000000e6 +53 1 10 10 0.52428800000000000000e6 +53 3 7 8 0.26214400000000000000e6 +53 3 7 10 0.26214400000000000000e6 +54 1 1 2 0.52428800000000000000e6 +54 1 1 8 0.52428800000000000000e6 +54 1 2 3 0.52428800000000000000e6 +54 1 4 7 -0.10485760000000000000e7 +54 2 1 2 0.52428800000000000000e6 +54 3 1 2 0.52428800000000000000e6 +54 3 1 4 -0.10485760000000000000e7 +55 1 1 2 0.52428800000000000000e6 +55 1 1 8 0.52428800000000000000e6 +55 1 2 3 0.52428800000000000000e6 +55 1 4 7 -0.10485760000000000000e7 +55 2 1 4 0.52428800000000000000e6 +55 3 1 2 0.52428800000000000000e6 +55 3 1 4 -0.10485760000000000000e7 +55 4 1 1 0.10485760000000000000e7 +56 1 2 3 0.26214400000000000000e6 +56 1 2 5 -0.52428800000000000000e6 +56 1 2 9 0.52428800000000000000e6 +56 1 7 10 -0.26214400000000000000e6 +56 2 2 2 0.52428800000000000000e6 +56 2 2 4 -0.26214400000000000000e6 +56 3 1 2 0.26214400000000000000e6 +56 3 1 10 -0.26214400000000000000e6 +56 3 2 3 0.26214400000000000000e6 +56 3 2 7 -0.26214400000000000000e6 +57 1 2 5 0.52428800000000000000e6 +57 1 4 7 0.52428800000000000000e6 +57 1 5 8 0.52428800000000000000e6 +57 1 6 7 -0.10485760000000000000e7 +57 2 2 3 0.52428800000000000000e6 +57 3 1 4 0.52428800000000000000e6 +57 3 1 6 -0.10485760000000000000e7 +57 3 3 4 0.52428800000000000000e6 +58 1 2 9 0.52428800000000000000e6 +58 1 4 7 0.52428800000000000000e6 +58 1 5 8 0.52428800000000000000e6 +58 1 6 7 -0.10485760000000000000e7 +58 2 3 4 0.52428800000000000000e6 +59 1 2 3 0.26214400000000000000e6 +59 1 7 10 -0.26214400000000000000e6 +59 3 1 1 0.52428800000000000000e6 +59 3 1 2 0.26214400000000000000e6 +59 3 1 4 -0.52428800000000000000e6 +59 3 1 10 -0.26214400000000000000e6 +59 3 2 7 -0.26214400000000000000e6 +59 4 1 1 0.52428800000000000000e6 +60 1 2 3 -0.52428800000000000000e6 +60 1 7 10 0.52428800000000000000e6 +60 3 1 3 0.52428800000000000000e6 +60 3 1 10 0.52428800000000000000e6 +60 3 2 7 0.52428800000000000000e6 +61 1 2 5 -0.52428800000000000000e6 +61 1 2 9 0.52428800000000000000e6 +61 3 1 5 0.52428800000000000000e6 +62 1 1 8 -0.52428800000000000000e6 +62 1 1 10 0.52428800000000000000e6 +62 3 1 7 0.52428800000000000000e6 +63 3 1 8 0.52428800000000000000e6 +63 3 2 7 -0.52428800000000000000e6 +64 1 1 10 0.26214400000000000000e6 +64 1 2 9 -0.52428800000000000000e6 +64 1 3 10 0.26214400000000000000e6 +64 1 7 10 0.26214400000000000000e6 +64 2 4 4 0.52428800000000000000e6 +64 3 1 9 0.52428800000000000000e6 +64 3 1 10 0.26214400000000000000e6 +65 1 2 3 -0.26214400000000000000e6 +65 1 7 10 0.26214400000000000000e6 +65 3 1 10 0.26214400000000000000e6 +65 3 2 2 0.52428800000000000000e6 +65 3 2 7 0.26214400000000000000e6 +66 1 2 5 -0.52428800000000000000e6 +66 1 2 9 0.52428800000000000000e6 +66 3 2 4 0.52428800000000000000e6 +67 3 2 5 0.52428800000000000000e6 +67 3 3 4 -0.52428800000000000000e6 +68 3 2 6 0.52428800000000000000e6 +68 3 4 5 -0.52428800000000000000e6 +69 1 1 8 0.52428800000000000000e6 +69 1 2 9 -0.10485760000000000000e7 +69 1 3 10 0.52428800000000000000e6 +69 1 7 10 0.52428800000000000000e6 +69 2 2 4 0.52428800000000000000e6 +69 3 1 10 0.52428800000000000000e6 +69 3 2 7 0.52428800000000000000e6 +69 3 2 8 0.52428800000000000000e6 +70 1 5 8 -0.52428800000000000000e6 +70 1 8 9 0.52428800000000000000e6 +70 3 2 9 0.52428800000000000000e6 +71 3 2 10 0.52428800000000000000e6 +71 3 7 8 -0.52428800000000000000e6 +72 1 2 3 0.26214400000000000000e6 +72 1 7 10 -0.26214400000000000000e6 +72 3 1 10 -0.26214400000000000000e6 +72 3 2 3 0.26214400000000000000e6 +72 3 2 7 -0.26214400000000000000e6 +72 3 3 3 0.52428800000000000000e6 +72 3 3 4 -0.52428800000000000000e6 +72 4 2 2 0.52428800000000000000e6 +73 1 2 5 0.52428800000000000000e6 +73 1 2 9 -0.52428800000000000000e6 +73 3 3 4 0.52428800000000000000e6 +73 3 3 5 0.52428800000000000000e6 +73 3 4 5 -0.10485760000000000000e7 +73 4 2 3 0.52428800000000000000e6 +74 1 5 6 -0.10485760000000000000e7 +74 1 6 9 0.10485760000000000000e7 +74 3 1 6 0.52428800000000000000e6 +74 3 3 6 0.52428800000000000000e6 +74 3 4 5 0.52428800000000000000e6 +74 4 3 3 0.10485760000000000000e7 +75 1 1 8 0.52428800000000000000e6 +75 1 2 9 -0.10485760000000000000e7 +75 1 3 10 0.52428800000000000000e6 +75 1 7 10 0.52428800000000000000e6 +75 2 2 4 0.52428800000000000000e6 +75 3 1 10 0.52428800000000000000e6 +75 3 2 7 0.52428800000000000000e6 +75 3 3 7 0.52428800000000000000e6 +76 3 3 9 0.52428800000000000000e6 +76 3 5 8 -0.52428800000000000000e6 +77 1 8 9 -0.10485760000000000000e7 +77 1 9 10 0.10485760000000000000e7 +77 3 1 10 0.52428800000000000000e6 +77 3 3 10 0.52428800000000000000e6 +77 3 7 8 0.52428800000000000000e6 +77 4 4 4 0.10485760000000000000e7 +78 3 1 6 -0.26214400000000000000e6 +78 3 4 4 0.52428800000000000000e6 +79 1 5 6 -0.52428800000000000000e6 +79 1 6 9 0.52428800000000000000e6 +79 3 4 6 0.52428800000000000000e6 +80 1 1 10 0.26214400000000000000e6 +80 1 2 9 -0.52428800000000000000e6 +80 1 3 10 0.26214400000000000000e6 +80 1 7 10 0.26214400000000000000e6 +80 2 4 4 0.52428800000000000000e6 +80 3 1 10 0.26214400000000000000e6 +80 3 4 7 0.52428800000000000000e6 +81 1 5 8 -0.52428800000000000000e6 +81 1 8 9 0.52428800000000000000e6 +81 3 4 8 0.52428800000000000000e6 +82 1 8 9 -0.52428800000000000000e6 +82 1 9 10 0.52428800000000000000e6 +82 3 4 10 0.52428800000000000000e6 +83 1 5 6 -0.52428800000000000000e6 +83 1 6 9 0.52428800000000000000e6 +83 3 1 6 0.26214400000000000000e6 +83 3 4 5 0.26214400000000000000e6 +83 3 5 5 0.52428800000000000000e6 +83 4 3 3 0.52428800000000000000e6 +84 1 5 8 -0.52428800000000000000e6 +84 1 8 9 0.52428800000000000000e6 +84 3 5 7 0.52428800000000000000e6 +85 3 5 9 0.52428800000000000000e6 +85 3 6 8 -0.52428800000000000000e6 +86 3 4 9 -0.52428800000000000000e6 +86 3 6 7 0.52428800000000000000e6 +87 3 6 10 0.52428800000000000000e6 +87 3 9 9 -0.10485760000000000000e7 +88 3 1 10 -0.26214400000000000000e6 +88 3 7 7 0.52428800000000000000e6 +89 1 8 9 -0.52428800000000000000e6 +89 1 9 10 0.52428800000000000000e6 +89 3 7 9 0.52428800000000000000e6 +90 1 8 9 -0.52428800000000000000e6 +90 1 9 10 0.52428800000000000000e6 +90 3 1 10 0.26214400000000000000e6 +90 3 7 8 0.26214400000000000000e6 +90 3 8 8 0.52428800000000000000e6 +90 4 4 4 0.52428800000000000000e6 +91 3 5 10 -0.52428800000000000000e6 +91 3 8 9 0.52428800000000000000e6 +92 1 2 3 0.52428800000000000000e6 +92 1 2 5 -0.10485760000000000000e7 +92 1 2 9 0.10485760000000000000e7 +92 1 7 10 -0.52428800000000000000e6 +92 3 1 2 0.52428800000000000000e6 +92 3 1 10 -0.52428800000000000000e6 +92 3 2 3 0.52428800000000000000e6 +92 3 2 7 -0.52428800000000000000e6 +92 4 1 2 0.52428800000000000000e6 +93 1 2 5 0.52428800000000000000e6 +93 1 2 9 -0.52428800000000000000e6 +93 3 1 4 0.52428800000000000000e6 +93 3 1 6 -0.10485760000000000000e7 +93 3 3 4 0.52428800000000000000e6 +93 4 1 3 0.52428800000000000000e6 +94 2 2 4 -0.52428800000000000000e6 +94 2 4 4 0.10485760000000000000e7 +94 4 1 4 0.52428800000000000000e6 +95 1 1 8 -0.52428800000000000000e6 +95 1 2 9 0.10485760000000000000e7 +95 1 3 10 -0.52428800000000000000e6 +95 1 5 8 -0.10485760000000000000e7 +95 1 7 10 -0.52428800000000000000e6 +95 1 8 9 0.10485760000000000000e7 +95 2 2 4 -0.52428800000000000000e6 +95 3 1 10 -0.52428800000000000000e6 +95 3 3 8 0.52428800000000000000e6 +95 4 2 4 0.52428800000000000000e6 +96 1 1 10 -0.26214400000000000000e6 +96 1 2 9 0.52428800000000000000e6 +96 1 3 10 -0.26214400000000000000e6 +96 1 5 8 0.52428800000000000000e6 +96 1 7 10 -0.26214400000000000000e6 +96 1 8 9 -0.52428800000000000000e6 +96 2 4 4 -0.52428800000000000000e6 +96 3 1 10 -0.26214400000000000000e6 +96 3 4 9 -0.10485760000000000000e7 +96 3 5 8 0.52428800000000000000e6 +96 4 3 4 0.52428800000000000000e6 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +281 +4 +20 10 10 4 +0.52428800000000000000e6 0.0 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 0.52428800000000000000e6 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 -0.52428800000000000000e6 -0.65536000000000000000e6 0.0 -0.26214400000000000000e6 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.10485760000000000000e7 0.10485760000000000000e7 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.10485760000000000000e7 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.10485760000000000000e7 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.10485760000000000000e7 0.52428800000000000000e6 0.0 0.0 0.0 0.10485760000000000000e7 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.10485760000000000000e7 0.10485760000000000000e7 0.52428800000000000000e6 0.0 0.0 -0.52428800000000000000e6 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.10485760000000000000e7 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.39321600000000000000e6 -0.65536000000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.10485760000000000000e7 0.0 0.0 0.0 0.0 0.0 0.0 0.10485760000000000000e7 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.10485760000000000000e7 0.0 0.10485760000000000000e7 0.0 0.0 -0.10485760000000000000e7 0.10485760000000000000e7 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.52428800000000000000e6 0.0 -0.10485760000000000000e7 0.10485760000000000000e7 0.0 0.52428800000000000000e6 0.0 -0.10485760000000000000e7 -0.52428800000000000000e6 0.0 0.0 0.0 -0.10485760000000000000e7 0.52428800000000000000e6 -0.10485760000000000000e7 0.0 -0.10485760000000000000e7 0.0 0.0 0.0 0.0 -0.10485760000000000000e7 0.0 0.0 -0.10485760000000000000e7 0.52428800000000000000e6 -0.10485760000000000000e7 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.10485760000000000000e7 0.0 0.52428800000000000000e6 0.0 0.10485760000000000000e7 0.0 0.0 0.0 -0.10485760000000000000e7 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.10485760000000000000e7 0.0 0.0 0.0 0.0 0.10485760000000000000e7 0.52428800000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 -0.10485760000000000000e7 0.10485760000000000000e7 0.0 -0.10485760000000000000e7 0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 0.10485760000000000000e7 0.0 0.0 0.0 +0 1 1 4 0.26214400000000000000e6 +0 1 2 17 -0.26214400000000000000e6 +0 1 4 11 0.13107200000000000000e6 +0 1 5 12 -0.26214400000000000000e6 +0 1 11 14 0.26214400000000000000e6 +0 1 11 18 -0.13107200000000000000e6 +0 2 1 1 -0.26214400000000000000e6 +0 2 1 3 0.13107200000000000000e6 +0 2 1 9 -0.26214400000000000000e6 +0 2 2 4 0.26214400000000000000e6 +0 2 7 7 -0.26214400000000000000e6 +0 3 1 2 0.13107200000000000000e6 +0 3 1 6 -0.52428800000000000000e6 +0 3 2 3 0.13107200000000000000e6 +0 3 2 7 -0.13107200000000000000e6 +0 3 3 4 0.26214400000000000000e6 +0 3 7 8 -0.13107200000000000000e6 +0 4 1 1 0.26214400000000000000e6 +1 1 12 19 -0.26214400000000000000e6 +1 1 17 20 0.13107200000000000000e6 +1 1 20 20 0.26214400000000000000e6 +1 3 9 10 0.26214400000000000000e6 +2 1 12 19 0.13107200000000000000e6 +2 1 16 17 -0.26214400000000000000e6 +2 1 19 20 0.13107200000000000000e6 +2 3 9 10 -0.13107200000000000000e6 +3 1 5 20 -0.26214400000000000000e6 +3 1 12 19 0.26214400000000000000e6 +3 1 13 20 -0.13107200000000000000e6 +3 1 17 18 -0.13107200000000000000e6 +3 1 17 20 0.13107200000000000000e6 +3 2 10 10 -0.26214400000000000000e6 +3 3 9 10 -0.26214400000000000000e6 +4 1 10 17 -0.26214400000000000000e6 +4 1 16 17 0.13107200000000000000e6 +4 1 19 19 0.26214400000000000000e6 +5 1 12 19 0.13107200000000000000e6 +5 1 14 15 -0.26214400000000000000e6 +5 1 18 19 0.13107200000000000000e6 +6 1 2 9 -0.26214400000000000000e6 +6 1 5 20 0.13107200000000000000e6 +6 1 12 19 0.13107200000000000000e6 +6 3 4 5 0.26214400000000000000e6 +6 3 4 9 0.26214400000000000000e6 +6 3 9 10 -0.13107200000000000000e6 +7 1 1 20 -0.13107200000000000000e6 +7 1 2 9 -0.52428800000000000000e6 +7 1 2 17 0.13107200000000000000e6 +7 1 3 18 0.13107200000000000000e6 +7 1 5 20 0.26214400000000000000e6 +7 1 11 14 0.26214400000000000000e6 +7 1 13 20 0.13107200000000000000e6 +7 2 4 10 0.26214400000000000000e6 +7 3 4 5 0.52428800000000000000e6 +7 3 4 9 0.52428800000000000000e6 +7 3 7 8 0.13107200000000000000e6 +7 4 4 4 0.26214400000000000000e6 +8 1 2 9 -0.52428800000000000000e6 +8 1 11 14 0.26214400000000000000e6 +8 1 11 18 0.13107200000000000000e6 +8 1 12 19 0.26214400000000000000e6 +8 1 17 18 0.13107200000000000000e6 +8 2 4 10 0.26214400000000000000e6 +8 3 4 5 0.52428800000000000000e6 +8 3 4 9 0.52428800000000000000e6 +8 3 5 10 0.26214400000000000000e6 +9 1 1 20 0.13107200000000000000e6 +9 1 11 14 -0.26214400000000000000e6 +9 1 12 19 0.26214400000000000000e6 +9 1 13 20 -0.13107200000000000000e6 +9 1 17 18 -0.13107200000000000000e6 +9 2 10 10 -0.26214400000000000000e6 +9 3 9 10 -0.26214400000000000000e6 +10 1 8 15 -0.26214400000000000000e6 +10 1 9 20 0.13107200000000000000e6 +10 1 14 15 0.13107200000000000000e6 +11 1 2 9 0.13107200000000000000e6 +11 1 5 16 -0.26214400000000000000e6 +11 1 16 17 0.13107200000000000000e6 +11 3 4 5 -0.13107200000000000000e6 +11 3 4 9 -0.13107200000000000000e6 +12 1 7 14 -0.26214400000000000000e6 +12 1 12 19 0.13107200000000000000e6 +12 1 15 18 0.13107200000000000000e6 +12 3 5 10 0.13107200000000000000e6 +13 1 11 14 -0.13107200000000000000e6 +13 2 4 10 -0.13107200000000000000e6 +13 3 4 9 -0.26214400000000000000e6 +13 3 5 10 -0.13107200000000000000e6 +14 1 1 16 -0.26214400000000000000e6 +14 1 5 20 0.13107200000000000000e6 +14 1 11 14 0.13107200000000000000e6 +15 1 1 20 0.13107200000000000000e6 +15 1 2 9 0.52428800000000000000e6 +15 1 2 17 -0.13107200000000000000e6 +15 1 5 20 -0.26214400000000000000e6 +15 1 6 13 -0.26214400000000000000e6 +15 1 11 14 -0.26214400000000000000e6 +15 1 11 18 -0.13107200000000000000e6 +15 2 4 10 -0.26214400000000000000e6 +15 2 8 10 -0.13107200000000000000e6 +15 3 4 5 -0.52428800000000000000e6 +15 3 4 9 -0.52428800000000000000e6 +15 3 5 10 -0.26214400000000000000e6 +15 3 7 8 -0.13107200000000000000e6 +15 4 4 4 -0.26214400000000000000e6 +16 1 1 20 -0.13107200000000000000e6 +16 1 2 9 -0.52428800000000000000e6 +16 1 4 11 -0.13107200000000000000e6 +16 1 5 20 0.26214400000000000000e6 +16 1 11 14 0.26214400000000000000e6 +16 1 11 18 0.13107200000000000000e6 +16 1 12 19 0.26214400000000000000e6 +16 2 2 8 -0.13107200000000000000e6 +16 2 4 10 0.26214400000000000000e6 +16 3 2 7 -0.13107200000000000000e6 +16 3 3 8 -0.13107200000000000000e6 +16 3 4 5 0.52428800000000000000e6 +16 3 4 9 0.52428800000000000000e6 +16 3 5 10 0.26214400000000000000e6 +16 3 7 8 0.26214400000000000000e6 +16 4 4 4 0.26214400000000000000e6 +17 1 2 17 0.13107200000000000000e6 +17 1 5 12 -0.26214400000000000000e6 +17 1 11 18 0.13107200000000000000e6 +18 1 1 16 -0.52428800000000000000e6 +18 1 1 20 0.13107200000000000000e6 +18 1 3 18 0.13107200000000000000e6 +18 1 4 11 0.13107200000000000000e6 +18 1 5 12 0.26214400000000000000e6 +18 1 11 14 0.26214400000000000000e6 +18 1 11 18 -0.13107200000000000000e6 +18 2 1 9 0.26214400000000000000e6 +18 2 2 8 0.13107200000000000000e6 +18 2 7 7 -0.26214400000000000000e6 +18 3 2 7 0.13107200000000000000e6 +18 3 3 8 0.13107200000000000000e6 +18 3 7 8 -0.13107200000000000000e6 +19 1 3 10 -0.65536000000000000000e5 +19 1 5 8 -0.65536000000000000000e5 +19 1 5 16 -0.65536000000000000000e5 +19 1 6 7 -0.32768000000000000000e5 +19 1 7 10 -0.13107200000000000000e6 +19 1 7 14 0.32768000000000000000e5 +19 1 8 9 -0.13107200000000000000e6 +19 1 10 17 0.65536000000000000000e5 +19 1 10 19 0.13107200000000000000e6 +19 1 16 19 0.65536000000000000000e5 +19 2 4 6 -0.65536000000000000000e5 +19 2 6 6 -0.26214400000000000000e6 +19 3 1 6 -0.32768000000000000000e5 +19 3 4 5 -0.32768000000000000000e5 +19 4 3 3 -0.65536000000000000000e5 +20 1 8 9 -0.26214400000000000000e6 +20 1 8 15 0.13107200000000000000e6 +20 1 15 16 0.13107200000000000000e6 +21 1 3 10 -0.13107200000000000000e6 +21 1 5 8 -0.13107200000000000000e6 +21 1 6 7 -0.65536000000000000000e5 +21 1 7 14 0.65536000000000000000e5 +21 1 10 17 0.13107200000000000000e6 +21 2 4 6 -0.13107200000000000000e6 +21 3 1 6 -0.65536000000000000000e5 +21 3 4 5 -0.65536000000000000000e5 +21 4 3 3 -0.13107200000000000000e6 +22 1 3 10 -0.26214400000000000000e6 +22 1 7 14 0.13107200000000000000e6 +22 1 13 16 0.13107200000000000000e6 +23 1 2 9 0.13107200000000000000e6 +23 1 5 16 -0.26214400000000000000e6 +23 1 6 7 -0.13107200000000000000e6 +23 1 7 14 0.13107200000000000000e6 +23 1 14 15 0.13107200000000000000e6 +23 3 1 6 -0.13107200000000000000e6 +23 3 4 5 -0.26214400000000000000e6 +23 4 3 3 -0.26214400000000000000e6 +24 1 1 16 0.13107200000000000000e6 +24 1 2 9 0.13107200000000000000e6 +24 1 5 8 -0.26214400000000000000e6 +24 3 4 5 -0.13107200000000000000e6 +24 3 4 9 -0.13107200000000000000e6 +25 1 4 19 0.13107200000000000000e6 +25 1 6 7 -0.26214400000000000000e6 +25 1 6 13 0.13107200000000000000e6 +26 1 2 9 -0.26214400000000000000e6 +26 1 2 17 0.65536000000000000000e5 +26 1 3 18 0.65536000000000000000e5 +26 1 4 11 0.65536000000000000000e5 +26 1 12 19 0.13107200000000000000e6 +26 2 2 8 0.65536000000000000000e5 +26 3 2 7 0.65536000000000000000e5 +26 3 3 8 0.65536000000000000000e5 +26 3 5 10 0.13107200000000000000e6 +27 1 1 16 -0.26214400000000000000e6 +27 1 2 9 0.26214400000000000000e6 +27 1 5 12 0.13107200000000000000e6 +27 1 11 14 -0.13107200000000000000e6 +27 1 12 19 -0.13107200000000000000e6 +27 2 4 10 -0.13107200000000000000e6 +27 3 1 6 -0.26214400000000000000e6 +27 3 4 5 -0.26214400000000000000e6 +27 3 4 9 -0.26214400000000000000e6 +27 3 5 10 -0.13107200000000000000e6 +28 1 1 8 -0.26214400000000000000e6 +28 1 1 16 0.26214400000000000000e6 +28 1 2 17 -0.65536000000000000000e5 +28 1 3 18 -0.65536000000000000000e5 +28 1 4 11 -0.65536000000000000000e5 +28 1 5 12 -0.13107200000000000000e6 +28 1 11 14 0.13107200000000000000e6 +28 2 1 9 -0.13107200000000000000e6 +28 2 2 8 -0.65536000000000000000e5 +28 3 2 7 -0.65536000000000000000e5 +28 3 3 8 -0.65536000000000000000e5 +29 1 2 17 0.13107200000000000000e6 +29 1 3 18 0.13107200000000000000e6 +29 1 4 7 0.26214400000000000000e6 +29 1 4 11 0.13107200000000000000e6 +29 1 6 7 -0.52428800000000000000e6 +29 1 11 18 -0.13107200000000000000e6 +29 1 12 19 0.26214400000000000000e6 +29 2 2 8 0.13107200000000000000e6 +29 2 3 5 0.26214400000000000000e6 +29 2 8 8 -0.26214400000000000000e6 +29 3 2 7 0.13107200000000000000e6 +29 3 3 4 0.26214400000000000000e6 +29 3 3 8 0.26214400000000000000e6 +29 3 5 10 0.26214400000000000000e6 +29 3 7 8 -0.13107200000000000000e6 +30 1 2 17 -0.13107200000000000000e6 +30 2 2 8 -0.13107200000000000000e6 +30 3 2 7 -0.13107200000000000000e6 +30 3 3 4 -0.26214400000000000000e6 +30 3 3 8 -0.13107200000000000000e6 +31 1 1 16 -0.52428800000000000000e6 +31 1 2 5 0.26214400000000000000e6 +31 1 2 17 0.26214400000000000000e6 +31 1 3 18 0.13107200000000000000e6 +31 1 4 11 0.13107200000000000000e6 +31 1 11 18 0.13107200000000000000e6 +31 2 2 4 0.26214400000000000000e6 +31 2 2 8 0.13107200000000000000e6 +31 3 1 6 -0.52428800000000000000e6 +31 3 2 7 0.26214400000000000000e6 +31 3 3 4 0.26214400000000000000e6 +31 3 3 8 0.13107200000000000000e6 +31 3 7 8 0.13107200000000000000e6 +32 1 1 4 -0.13107200000000000000e6 +32 1 1 16 0.52428800000000000000e6 +32 1 2 5 -0.52428800000000000000e6 +32 1 3 18 -0.13107200000000000000e6 +32 1 4 11 -0.26214400000000000000e6 +32 2 1 3 -0.13107200000000000000e6 +32 2 2 4 -0.26214400000000000000e6 +32 2 2 8 -0.13107200000000000000e6 +32 3 1 2 -0.13107200000000000000e6 +32 3 1 6 0.52428800000000000000e6 +32 3 2 3 -0.13107200000000000000e6 +32 3 2 7 -0.13107200000000000000e6 +32 3 3 4 -0.26214400000000000000e6 +32 3 3 8 -0.13107200000000000000e6 +33 1 1 1 0.26214400000000000000e6 +33 1 1 4 -0.26214400000000000000e6 +33 1 2 17 0.26214400000000000000e6 +33 1 4 11 -0.13107200000000000000e6 +33 1 5 12 0.26214400000000000000e6 +33 1 11 14 -0.26214400000000000000e6 +33 1 11 18 0.13107200000000000000e6 +33 2 1 1 0.26214400000000000000e6 +33 2 1 3 -0.13107200000000000000e6 +33 2 1 9 0.26214400000000000000e6 +33 2 2 4 -0.26214400000000000000e6 +33 2 7 7 0.26214400000000000000e6 +33 3 1 2 -0.13107200000000000000e6 +33 3 1 6 0.52428800000000000000e6 +33 3 2 3 -0.13107200000000000000e6 +33 3 2 7 0.13107200000000000000e6 +33 3 3 4 -0.26214400000000000000e6 +33 3 7 8 0.13107200000000000000e6 +33 4 1 1 -0.26214400000000000000e6 +34 1 1 2 0.26214400000000000000e6 +34 1 1 16 0.10485760000000000000e7 +34 1 2 5 -0.10485760000000000000e7 +34 1 2 17 -0.26214400000000000000e6 +34 1 3 18 -0.26214400000000000000e6 +34 1 4 11 -0.52428800000000000000e6 +34 2 1 3 -0.26214400000000000000e6 +34 2 1 7 0.26214400000000000000e6 +34 2 2 4 -0.52428800000000000000e6 +34 2 2 8 -0.26214400000000000000e6 +34 3 1 6 0.10485760000000000000e7 +34 3 2 3 -0.26214400000000000000e6 +34 3 2 7 -0.26214400000000000000e6 +34 3 3 4 -0.52428800000000000000e6 +34 3 3 8 -0.26214400000000000000e6 +34 4 1 1 0.52428800000000000000e6 +35 1 1 3 0.26214400000000000000e6 +35 1 1 4 0.26214400000000000000e6 +35 1 1 16 -0.10485760000000000000e7 +35 1 2 5 0.52428800000000000000e6 +35 1 2 17 0.26214400000000000000e6 +35 1 3 18 0.26214400000000000000e6 +35 1 4 11 0.52428800000000000000e6 +35 2 1 3 0.26214400000000000000e6 +35 2 2 4 0.52428800000000000000e6 +35 2 2 8 0.26214400000000000000e6 +35 3 1 6 -0.10485760000000000000e7 +35 3 2 3 0.26214400000000000000e6 +35 3 2 7 0.26214400000000000000e6 +35 3 3 4 0.52428800000000000000e6 +35 3 3 8 0.26214400000000000000e6 +36 1 1 4 -0.13107200000000000000e6 +36 1 1 5 0.26214400000000000000e6 +36 1 2 5 -0.26214400000000000000e6 +36 1 2 17 0.26214400000000000000e6 +36 1 4 11 -0.13107200000000000000e6 +36 1 5 12 0.26214400000000000000e6 +36 1 11 14 -0.26214400000000000000e6 +36 1 11 18 0.13107200000000000000e6 +36 2 1 3 -0.13107200000000000000e6 +36 2 1 7 0.13107200000000000000e6 +36 2 1 9 0.26214400000000000000e6 +36 2 2 4 -0.26214400000000000000e6 +36 2 7 7 0.26214400000000000000e6 +36 3 1 2 -0.13107200000000000000e6 +36 3 1 6 0.52428800000000000000e6 +36 3 2 3 -0.13107200000000000000e6 +36 3 2 7 0.13107200000000000000e6 +36 3 3 4 -0.26214400000000000000e6 +36 3 7 8 0.13107200000000000000e6 +37 1 1 6 0.26214400000000000000e6 +37 1 2 5 -0.26214400000000000000e6 +38 1 1 7 0.26214400000000000000e6 +38 1 1 16 -0.52428800000000000000e6 +38 1 2 5 0.26214400000000000000e6 +38 1 2 17 0.13107200000000000000e6 +38 1 3 18 0.13107200000000000000e6 +38 1 4 11 0.13107200000000000000e6 +38 2 2 4 0.26214400000000000000e6 +38 2 2 8 0.13107200000000000000e6 +38 3 1 6 -0.52428800000000000000e6 +38 3 2 7 0.13107200000000000000e6 +38 3 3 4 0.26214400000000000000e6 +38 3 3 8 0.13107200000000000000e6 +39 1 1 9 0.26214400000000000000e6 +39 1 1 16 -0.26214400000000000000e6 +39 3 1 6 -0.26214400000000000000e6 +40 1 1 10 0.26214400000000000000e6 +40 1 5 8 -0.26214400000000000000e6 +41 1 1 4 -0.26214400000000000000e6 +41 1 1 11 0.26214400000000000000e6 +41 1 2 5 -0.52428800000000000000e6 +41 1 2 17 0.26214400000000000000e6 +41 1 4 11 -0.26214400000000000000e6 +41 1 5 12 0.52428800000000000000e6 +41 2 1 3 -0.26214400000000000000e6 +41 2 1 7 0.26214400000000000000e6 +41 2 1 9 0.52428800000000000000e6 +41 2 2 4 -0.52428800000000000000e6 +41 3 1 2 -0.26214400000000000000e6 +41 3 1 6 0.10485760000000000000e7 +41 3 2 3 -0.26214400000000000000e6 +41 3 2 7 0.26214400000000000000e6 +41 3 3 4 -0.52428800000000000000e6 +42 1 1 4 0.26214400000000000000e6 +42 1 1 12 0.26214400000000000000e6 +42 1 1 16 -0.10485760000000000000e7 +42 1 2 5 0.52428800000000000000e6 +42 1 2 17 0.26214400000000000000e6 +42 1 3 18 0.26214400000000000000e6 +42 1 4 11 0.52428800000000000000e6 +42 2 1 3 0.26214400000000000000e6 +42 2 2 4 0.52428800000000000000e6 +42 2 2 8 0.26214400000000000000e6 +42 3 1 2 0.26214400000000000000e6 +42 3 1 6 -0.10485760000000000000e7 +42 3 2 3 0.26214400000000000000e6 +42 3 2 7 0.26214400000000000000e6 +42 3 3 4 0.52428800000000000000e6 +42 3 3 8 0.26214400000000000000e6 +43 1 1 13 0.26214400000000000000e6 +43 1 2 17 -0.26214400000000000000e6 +43 3 2 7 -0.26214400000000000000e6 +44 1 1 14 0.26214400000000000000e6 +44 1 1 16 -0.52428800000000000000e6 +44 1 2 17 0.13107200000000000000e6 +44 1 3 18 0.13107200000000000000e6 +44 1 4 11 0.13107200000000000000e6 +44 1 5 12 0.26214400000000000000e6 +44 2 1 9 0.26214400000000000000e6 +44 2 2 8 0.13107200000000000000e6 +44 3 2 7 0.13107200000000000000e6 +44 3 3 8 0.13107200000000000000e6 +45 1 1 15 0.26214400000000000000e6 +45 1 5 12 -0.26214400000000000000e6 +46 1 1 17 0.26214400000000000000e6 +46 1 2 17 0.26214400000000000000e6 +46 1 11 14 -0.52428800000000000000e6 +46 1 11 18 0.26214400000000000000e6 +46 2 7 7 0.52428800000000000000e6 +46 3 7 8 0.26214400000000000000e6 +47 1 1 18 0.26214400000000000000e6 +47 1 2 17 -0.26214400000000000000e6 +48 1 1 19 0.26214400000000000000e6 +48 1 11 14 -0.26214400000000000000e6 +49 1 1 4 0.13107200000000000000e6 +49 1 1 16 -0.52428800000000000000e6 +49 1 2 2 0.26214400000000000000e6 +49 1 2 5 0.26214400000000000000e6 +49 1 2 17 0.13107200000000000000e6 +49 1 3 18 0.13107200000000000000e6 +49 1 4 11 0.26214400000000000000e6 +49 2 1 3 0.13107200000000000000e6 +49 2 2 4 0.26214400000000000000e6 +49 2 2 8 0.13107200000000000000e6 +49 3 1 6 -0.52428800000000000000e6 +49 3 2 3 0.13107200000000000000e6 +49 3 2 7 0.13107200000000000000e6 +49 3 3 4 0.26214400000000000000e6 +49 3 3 8 0.13107200000000000000e6 +50 1 1 4 -0.26214400000000000000e6 +50 1 2 3 0.26214400000000000000e6 +51 1 2 4 0.26214400000000000000e6 +51 1 4 11 -0.26214400000000000000e6 +51 3 2 3 -0.26214400000000000000e6 +52 1 1 16 -0.52428800000000000000e6 +52 1 2 5 0.26214400000000000000e6 +52 1 2 6 0.26214400000000000000e6 +52 1 2 17 0.13107200000000000000e6 +52 1 3 18 0.13107200000000000000e6 +52 1 4 11 0.13107200000000000000e6 +52 2 2 4 0.26214400000000000000e6 +52 2 2 8 0.13107200000000000000e6 +52 3 1 6 -0.52428800000000000000e6 +52 3 2 7 0.13107200000000000000e6 +52 3 3 4 0.26214400000000000000e6 +52 3 3 8 0.13107200000000000000e6 +53 1 2 7 0.26214400000000000000e6 +53 1 2 17 -0.13107200000000000000e6 +53 1 3 18 -0.13107200000000000000e6 +53 1 4 11 -0.13107200000000000000e6 +53 2 2 8 -0.13107200000000000000e6 +53 3 2 7 -0.13107200000000000000e6 +53 3 3 4 -0.26214400000000000000e6 +53 3 3 8 -0.13107200000000000000e6 +54 1 1 16 -0.26214400000000000000e6 +54 1 2 8 0.26214400000000000000e6 +54 3 1 6 -0.26214400000000000000e6 +55 1 2 10 0.26214400000000000000e6 +55 1 5 16 -0.26214400000000000000e6 +55 1 6 7 -0.13107200000000000000e6 +55 1 7 14 0.13107200000000000000e6 +55 3 1 6 -0.13107200000000000000e6 +55 3 4 5 -0.13107200000000000000e6 +55 4 3 3 -0.26214400000000000000e6 +56 1 1 4 0.26214400000000000000e6 +56 1 1 16 -0.10485760000000000000e7 +56 1 2 5 0.52428800000000000000e6 +56 1 2 11 0.26214400000000000000e6 +56 1 2 17 0.26214400000000000000e6 +56 1 3 18 0.26214400000000000000e6 +56 1 4 11 0.52428800000000000000e6 +56 2 1 3 0.26214400000000000000e6 +56 2 2 4 0.52428800000000000000e6 +56 2 2 8 0.26214400000000000000e6 +56 3 1 2 0.26214400000000000000e6 +56 3 1 6 -0.10485760000000000000e7 +56 3 2 3 0.26214400000000000000e6 +56 3 2 7 0.26214400000000000000e6 +56 3 3 4 0.52428800000000000000e6 +56 3 3 8 0.26214400000000000000e6 +57 1 2 12 0.26214400000000000000e6 +57 1 2 17 -0.26214400000000000000e6 +57 3 2 7 -0.26214400000000000000e6 +58 1 2 13 0.26214400000000000000e6 +58 1 4 11 -0.26214400000000000000e6 +59 1 2 14 0.26214400000000000000e6 +59 1 5 12 -0.26214400000000000000e6 +60 1 2 15 0.26214400000000000000e6 +60 1 2 17 -0.13107200000000000000e6 +60 1 3 18 -0.13107200000000000000e6 +60 1 4 11 -0.13107200000000000000e6 +60 2 2 8 -0.13107200000000000000e6 +60 3 2 7 -0.13107200000000000000e6 +60 3 3 8 -0.13107200000000000000e6 +61 1 2 9 -0.26214400000000000000e6 +61 1 2 16 0.26214400000000000000e6 +61 3 4 5 0.26214400000000000000e6 +62 1 2 18 0.26214400000000000000e6 +62 1 11 18 -0.26214400000000000000e6 +62 3 7 8 -0.26214400000000000000e6 +63 1 2 9 -0.52428800000000000000e6 +63 1 2 19 0.26214400000000000000e6 +63 1 11 14 0.26214400000000000000e6 +63 1 12 19 0.26214400000000000000e6 +63 2 4 10 0.26214400000000000000e6 +63 3 4 5 0.52428800000000000000e6 +63 3 4 9 0.52428800000000000000e6 +63 3 5 10 0.26214400000000000000e6 +64 1 2 20 0.26214400000000000000e6 +64 1 11 18 -0.26214400000000000000e6 +65 1 3 3 0.26214400000000000000e6 +65 1 4 11 -0.13107200000000000000e6 +65 3 2 3 -0.13107200000000000000e6 +66 1 1 4 0.26214400000000000000e6 +66 1 2 17 -0.26214400000000000000e6 +66 1 3 4 0.26214400000000000000e6 +66 1 3 18 -0.26214400000000000000e6 +66 3 2 3 0.26214400000000000000e6 +66 3 2 7 -0.26214400000000000000e6 +66 3 3 4 -0.52428800000000000000e6 +66 3 3 8 -0.26214400000000000000e6 +66 4 2 2 0.52428800000000000000e6 +67 1 1 16 -0.52428800000000000000e6 +67 1 2 5 0.26214400000000000000e6 +67 1 2 17 0.13107200000000000000e6 +67 1 3 5 0.26214400000000000000e6 +67 1 3 18 0.13107200000000000000e6 +67 1 4 11 0.13107200000000000000e6 +67 2 2 4 0.26214400000000000000e6 +67 2 2 8 0.13107200000000000000e6 +67 3 1 6 -0.52428800000000000000e6 +67 3 2 7 0.13107200000000000000e6 +67 3 3 4 0.26214400000000000000e6 +67 3 3 8 0.13107200000000000000e6 +68 1 2 17 -0.13107200000000000000e6 +68 1 3 6 0.26214400000000000000e6 +68 1 3 18 -0.13107200000000000000e6 +68 1 4 11 -0.13107200000000000000e6 +68 2 2 8 -0.13107200000000000000e6 +68 3 2 7 -0.13107200000000000000e6 +68 3 3 4 -0.26214400000000000000e6 +68 3 3 8 -0.13107200000000000000e6 +69 1 2 17 0.13107200000000000000e6 +69 1 3 7 0.26214400000000000000e6 +69 1 3 18 0.13107200000000000000e6 +69 1 4 7 0.26214400000000000000e6 +69 1 4 11 0.13107200000000000000e6 +69 1 6 7 -0.52428800000000000000e6 +69 2 2 8 0.13107200000000000000e6 +69 2 3 5 0.26214400000000000000e6 +69 3 2 7 0.13107200000000000000e6 +69 3 3 4 0.26214400000000000000e6 +69 3 3 8 0.13107200000000000000e6 +70 1 2 9 -0.26214400000000000000e6 +70 1 3 8 0.26214400000000000000e6 +71 1 3 9 0.26214400000000000000e6 +71 1 6 7 -0.26214400000000000000e6 +72 1 2 17 -0.26214400000000000000e6 +72 1 3 11 0.26214400000000000000e6 +72 3 2 7 -0.26214400000000000000e6 +73 1 3 12 0.26214400000000000000e6 +73 1 4 11 -0.26214400000000000000e6 +74 1 3 13 0.26214400000000000000e6 +74 1 3 18 -0.26214400000000000000e6 +74 3 3 8 -0.26214400000000000000e6 +75 1 2 17 -0.13107200000000000000e6 +75 1 3 14 0.26214400000000000000e6 +75 1 3 18 -0.13107200000000000000e6 +75 1 4 11 -0.13107200000000000000e6 +75 2 2 8 -0.13107200000000000000e6 +75 3 2 7 -0.13107200000000000000e6 +75 3 3 8 -0.13107200000000000000e6 +76 1 3 15 0.26214400000000000000e6 +76 1 6 13 -0.26214400000000000000e6 +77 1 3 16 0.26214400000000000000e6 +77 1 7 14 -0.26214400000000000000e6 +78 1 3 17 0.26214400000000000000e6 +78 1 11 18 -0.26214400000000000000e6 +78 3 7 8 -0.26214400000000000000e6 +79 1 3 19 0.26214400000000000000e6 +79 1 12 19 -0.26214400000000000000e6 +79 3 5 10 -0.26214400000000000000e6 +80 1 1 20 0.26214400000000000000e6 +80 1 2 9 0.10485760000000000000e7 +80 1 2 17 -0.26214400000000000000e6 +80 1 3 18 -0.26214400000000000000e6 +80 1 3 20 0.26214400000000000000e6 +80 1 5 20 -0.52428800000000000000e6 +80 1 11 14 -0.52428800000000000000e6 +80 1 12 19 -0.52428800000000000000e6 +80 2 4 10 -0.52428800000000000000e6 +80 3 4 5 -0.10485760000000000000e7 +80 3 4 9 -0.10485760000000000000e7 +80 3 5 10 -0.52428800000000000000e6 +80 3 7 8 -0.26214400000000000000e6 +80 4 4 4 -0.52428800000000000000e6 +81 1 1 4 -0.13107200000000000000e6 +81 1 2 17 0.26214400000000000000e6 +81 1 3 18 0.26214400000000000000e6 +81 1 4 4 0.26214400000000000000e6 +81 1 4 7 0.26214400000000000000e6 +81 1 4 11 0.26214400000000000000e6 +81 1 6 7 -0.52428800000000000000e6 +81 2 2 8 0.13107200000000000000e6 +81 2 3 3 0.26214400000000000000e6 +81 2 3 5 0.26214400000000000000e6 +81 3 2 7 0.26214400000000000000e6 +81 3 3 4 0.52428800000000000000e6 +81 3 3 8 0.26214400000000000000e6 +81 4 2 2 -0.26214400000000000000e6 +82 1 2 17 -0.13107200000000000000e6 +82 1 3 18 -0.13107200000000000000e6 +82 1 4 5 0.26214400000000000000e6 +82 1 4 11 -0.13107200000000000000e6 +82 2 2 8 -0.13107200000000000000e6 +82 3 2 7 -0.13107200000000000000e6 +82 3 3 4 -0.26214400000000000000e6 +82 3 3 8 -0.13107200000000000000e6 +83 1 2 17 0.13107200000000000000e6 +83 1 3 18 0.13107200000000000000e6 +83 1 4 6 0.26214400000000000000e6 +83 1 4 7 0.26214400000000000000e6 +83 1 4 11 0.13107200000000000000e6 +83 1 6 7 -0.52428800000000000000e6 +83 2 2 8 0.13107200000000000000e6 +83 2 3 5 0.26214400000000000000e6 +83 3 2 7 0.13107200000000000000e6 +83 3 3 4 0.26214400000000000000e6 +83 3 3 8 0.13107200000000000000e6 +84 1 4 8 0.26214400000000000000e6 +84 1 6 7 -0.26214400000000000000e6 +85 1 2 9 0.26214400000000000000e6 +85 1 3 10 -0.52428800000000000000e6 +85 1 4 9 0.26214400000000000000e6 +85 1 6 7 0.26214400000000000000e6 +85 2 5 5 0.52428800000000000000e6 +86 1 3 10 0.26214400000000000000e6 +86 1 4 10 0.26214400000000000000e6 +86 1 5 16 0.26214400000000000000e6 +86 1 6 7 0.13107200000000000000e6 +86 1 7 14 -0.13107200000000000000e6 +86 1 8 9 -0.52428800000000000000e6 +86 2 5 6 0.26214400000000000000e6 +86 3 1 6 0.13107200000000000000e6 +86 3 4 5 0.13107200000000000000e6 +86 4 3 3 0.26214400000000000000e6 +87 1 3 18 -0.26214400000000000000e6 +87 1 4 12 0.26214400000000000000e6 +87 3 3 8 -0.26214400000000000000e6 +88 1 4 14 0.26214400000000000000e6 +88 1 6 13 -0.26214400000000000000e6 +89 1 2 17 0.13107200000000000000e6 +89 1 3 18 0.13107200000000000000e6 +89 1 4 11 0.13107200000000000000e6 +89 1 4 15 0.26214400000000000000e6 +89 1 6 13 0.26214400000000000000e6 +89 1 7 14 -0.52428800000000000000e6 +89 2 2 8 0.13107200000000000000e6 +89 2 3 9 0.26214400000000000000e6 +89 3 2 7 0.13107200000000000000e6 +89 3 3 8 0.13107200000000000000e6 +90 1 2 9 0.26214400000000000000e6 +90 1 4 16 0.26214400000000000000e6 +90 1 7 14 0.26214400000000000000e6 +90 1 8 15 -0.52428800000000000000e6 +90 2 6 8 0.26214400000000000000e6 +90 3 4 5 -0.26214400000000000000e6 +91 1 3 18 -0.26214400000000000000e6 +91 1 4 17 0.26214400000000000000e6 +92 1 3 18 0.26214400000000000000e6 +92 1 4 18 0.26214400000000000000e6 +92 1 11 18 0.26214400000000000000e6 +92 1 12 19 -0.52428800000000000000e6 +92 2 8 8 0.52428800000000000000e6 +92 3 5 10 -0.52428800000000000000e6 +92 3 7 8 0.26214400000000000000e6 +93 1 1 20 -0.26214400000000000000e6 +93 1 2 9 -0.10485760000000000000e7 +93 1 2 17 0.26214400000000000000e6 +93 1 3 18 0.26214400000000000000e6 +93 1 4 20 0.26214400000000000000e6 +93 1 5 20 0.52428800000000000000e6 +93 1 11 14 0.52428800000000000000e6 +93 1 11 18 0.26214400000000000000e6 +93 2 4 10 0.52428800000000000000e6 +93 2 8 10 0.26214400000000000000e6 +93 3 4 5 0.10485760000000000000e7 +93 3 4 9 0.10485760000000000000e7 +93 3 5 10 0.52428800000000000000e6 +93 3 7 8 0.26214400000000000000e6 +93 4 4 4 0.52428800000000000000e6 +94 1 1 8 -0.13107200000000000000e6 +94 1 5 5 0.26214400000000000000e6 +95 1 1 16 -0.26214400000000000000e6 +95 1 5 6 0.26214400000000000000e6 +95 3 1 6 -0.26214400000000000000e6 +96 1 2 9 -0.26214400000000000000e6 +96 1 5 7 0.26214400000000000000e6 +97 1 5 9 0.26214400000000000000e6 +97 1 5 16 -0.26214400000000000000e6 +97 1 6 7 -0.13107200000000000000e6 +97 1 7 14 0.13107200000000000000e6 +97 3 1 6 -0.13107200000000000000e6 +97 3 4 5 -0.13107200000000000000e6 +97 4 3 3 -0.26214400000000000000e6 +98 1 3 10 -0.13107200000000000000e6 +98 1 5 8 -0.13107200000000000000e6 +98 1 5 10 0.26214400000000000000e6 +98 1 5 16 -0.13107200000000000000e6 +98 1 6 7 -0.65536000000000000000e5 +98 1 7 14 0.65536000000000000000e5 +98 2 4 6 -0.13107200000000000000e6 +98 3 1 6 -0.65536000000000000000e5 +98 3 4 5 -0.65536000000000000000e5 +98 4 3 3 -0.13107200000000000000e6 +99 1 1 16 -0.52428800000000000000e6 +99 1 2 17 0.13107200000000000000e6 +99 1 3 18 0.13107200000000000000e6 +99 1 4 11 0.13107200000000000000e6 +99 1 5 11 0.26214400000000000000e6 +99 1 5 12 0.26214400000000000000e6 +99 2 1 9 0.26214400000000000000e6 +99 2 2 8 0.13107200000000000000e6 +99 3 2 7 0.13107200000000000000e6 +99 3 3 8 0.13107200000000000000e6 +100 1 2 17 -0.13107200000000000000e6 +100 1 3 18 -0.13107200000000000000e6 +100 1 4 11 -0.13107200000000000000e6 +100 1 5 13 0.26214400000000000000e6 +100 2 2 8 -0.13107200000000000000e6 +100 3 2 7 -0.13107200000000000000e6 +100 3 3 8 -0.13107200000000000000e6 +101 1 1 16 -0.26214400000000000000e6 +101 1 5 14 0.26214400000000000000e6 +102 1 2 9 -0.26214400000000000000e6 +102 1 5 15 0.26214400000000000000e6 +102 3 4 5 0.26214400000000000000e6 +103 1 5 17 0.26214400000000000000e6 +103 1 11 14 -0.26214400000000000000e6 +104 1 2 9 -0.52428800000000000000e6 +104 1 5 18 0.26214400000000000000e6 +104 1 11 14 0.26214400000000000000e6 +104 1 12 19 0.26214400000000000000e6 +104 2 4 10 0.26214400000000000000e6 +104 3 4 5 0.52428800000000000000e6 +104 3 4 9 0.52428800000000000000e6 +104 3 5 10 0.26214400000000000000e6 +105 1 2 9 -0.26214400000000000000e6 +105 1 5 19 0.26214400000000000000e6 +105 3 4 5 0.26214400000000000000e6 +105 3 4 9 0.26214400000000000000e6 +106 1 2 9 -0.13107200000000000000e6 +106 1 6 6 0.26214400000000000000e6 +107 1 5 16 -0.26214400000000000000e6 +107 1 6 7 -0.13107200000000000000e6 +107 1 6 8 0.26214400000000000000e6 +107 1 7 14 0.13107200000000000000e6 +107 3 1 6 -0.13107200000000000000e6 +107 3 4 5 -0.13107200000000000000e6 +107 4 3 3 -0.26214400000000000000e6 +108 1 3 10 -0.26214400000000000000e6 +108 1 6 9 0.26214400000000000000e6 +109 1 6 10 0.26214400000000000000e6 +109 1 8 9 -0.26214400000000000000e6 +110 1 5 12 -0.26214400000000000000e6 +110 1 6 11 0.26214400000000000000e6 +111 1 2 17 -0.13107200000000000000e6 +111 1 3 18 -0.13107200000000000000e6 +111 1 4 11 -0.13107200000000000000e6 +111 1 6 12 0.26214400000000000000e6 +111 2 2 8 -0.13107200000000000000e6 +111 3 2 7 -0.13107200000000000000e6 +111 3 3 8 -0.13107200000000000000e6 +112 1 2 9 -0.26214400000000000000e6 +112 1 6 14 0.26214400000000000000e6 +112 3 4 5 0.26214400000000000000e6 +113 1 6 15 0.26214400000000000000e6 +113 1 7 14 -0.26214400000000000000e6 +114 1 6 16 0.26214400000000000000e6 +114 1 8 15 -0.26214400000000000000e6 +115 1 2 9 -0.52428800000000000000e6 +115 1 6 17 0.26214400000000000000e6 +115 1 11 14 0.26214400000000000000e6 +115 1 12 19 0.26214400000000000000e6 +115 2 4 10 0.26214400000000000000e6 +115 3 4 5 0.52428800000000000000e6 +115 3 4 9 0.52428800000000000000e6 +115 3 5 10 0.26214400000000000000e6 +116 1 6 18 0.26214400000000000000e6 +116 1 12 19 -0.26214400000000000000e6 +116 3 5 10 -0.26214400000000000000e6 +117 1 6 19 0.26214400000000000000e6 +117 1 14 15 -0.26214400000000000000e6 +118 1 6 20 0.26214400000000000000e6 +118 1 12 19 -0.26214400000000000000e6 +119 1 2 9 0.13107200000000000000e6 +119 1 3 10 -0.26214400000000000000e6 +119 1 6 7 0.13107200000000000000e6 +119 1 7 7 0.26214400000000000000e6 +119 2 5 5 0.26214400000000000000e6 +120 1 3 10 -0.26214400000000000000e6 +120 1 7 8 0.26214400000000000000e6 +121 1 3 10 0.26214400000000000000e6 +121 1 5 16 0.26214400000000000000e6 +121 1 6 7 0.13107200000000000000e6 +121 1 7 9 0.26214400000000000000e6 +121 1 7 14 -0.13107200000000000000e6 +121 1 8 9 -0.52428800000000000000e6 +121 2 5 6 0.26214400000000000000e6 +121 3 1 6 0.13107200000000000000e6 +121 3 4 5 0.13107200000000000000e6 +121 4 3 3 0.26214400000000000000e6 +122 1 2 17 -0.13107200000000000000e6 +122 1 3 18 -0.13107200000000000000e6 +122 1 4 11 -0.13107200000000000000e6 +122 1 7 11 0.26214400000000000000e6 +122 2 2 8 -0.13107200000000000000e6 +122 3 2 7 -0.13107200000000000000e6 +122 3 3 8 -0.13107200000000000000e6 +123 1 6 13 -0.26214400000000000000e6 +123 1 7 12 0.26214400000000000000e6 +124 1 2 17 0.13107200000000000000e6 +124 1 3 18 0.13107200000000000000e6 +124 1 4 11 0.13107200000000000000e6 +124 1 6 13 0.26214400000000000000e6 +124 1 7 13 0.26214400000000000000e6 +124 1 7 14 -0.52428800000000000000e6 +124 2 2 8 0.13107200000000000000e6 +124 2 3 9 0.26214400000000000000e6 +124 3 2 7 0.13107200000000000000e6 +124 3 3 8 0.13107200000000000000e6 +125 1 2 9 0.26214400000000000000e6 +125 1 7 14 0.26214400000000000000e6 +125 1 7 15 0.26214400000000000000e6 +125 1 8 15 -0.52428800000000000000e6 +125 2 6 8 0.26214400000000000000e6 +125 3 4 5 -0.26214400000000000000e6 +126 1 7 16 0.26214400000000000000e6 +126 1 10 13 -0.26214400000000000000e6 +127 1 7 17 0.26214400000000000000e6 +127 1 12 19 -0.26214400000000000000e6 +127 3 5 10 -0.26214400000000000000e6 +128 1 4 19 -0.26214400000000000000e6 +128 1 7 18 0.26214400000000000000e6 +129 1 7 19 0.26214400000000000000e6 +129 1 13 16 -0.26214400000000000000e6 +130 1 7 20 0.26214400000000000000e6 +130 1 15 18 -0.26214400000000000000e6 +131 1 3 10 -0.65536000000000000000e5 +131 1 5 8 -0.65536000000000000000e5 +131 1 5 16 -0.65536000000000000000e5 +131 1 6 7 -0.32768000000000000000e5 +131 1 7 14 0.32768000000000000000e5 +131 1 8 8 0.26214400000000000000e6 +131 2 4 6 -0.65536000000000000000e5 +131 3 1 6 -0.32768000000000000000e5 +131 3 4 5 -0.32768000000000000000e5 +131 4 3 3 -0.65536000000000000000e5 +132 1 3 10 -0.65536000000000000000e5 +132 1 5 8 -0.65536000000000000000e5 +132 1 5 16 -0.65536000000000000000e5 +132 1 6 7 -0.32768000000000000000e5 +132 1 7 10 -0.13107200000000000000e6 +132 1 7 14 0.32768000000000000000e5 +132 1 8 9 -0.13107200000000000000e6 +132 1 8 10 0.26214400000000000000e6 +132 2 4 6 -0.65536000000000000000e5 +132 2 6 6 -0.26214400000000000000e6 +132 3 1 6 -0.32768000000000000000e5 +132 3 4 5 -0.32768000000000000000e5 +132 4 3 3 -0.65536000000000000000e5 +133 1 1 16 -0.26214400000000000000e6 +133 1 8 11 0.26214400000000000000e6 +134 1 2 9 -0.26214400000000000000e6 +134 1 8 12 0.26214400000000000000e6 +134 3 4 5 0.26214400000000000000e6 +135 1 7 14 -0.26214400000000000000e6 +135 1 8 13 0.26214400000000000000e6 +136 1 5 16 -0.26214400000000000000e6 +136 1 8 14 0.26214400000000000000e6 +137 1 8 16 0.26214400000000000000e6 +137 1 10 17 -0.13107200000000000000e6 +137 1 16 19 -0.13107200000000000000e6 +138 1 2 9 -0.26214400000000000000e6 +138 1 8 17 0.26214400000000000000e6 +138 3 4 5 0.26214400000000000000e6 +138 3 4 9 0.26214400000000000000e6 +139 1 8 18 0.26214400000000000000e6 +139 1 14 15 -0.26214400000000000000e6 +140 1 8 19 0.26214400000000000000e6 +140 1 10 17 -0.26214400000000000000e6 +141 1 8 20 0.26214400000000000000e6 +141 1 16 17 -0.26214400000000000000e6 +142 1 7 10 -0.13107200000000000000e6 +142 1 9 9 0.26214400000000000000e6 +143 1 2 9 -0.26214400000000000000e6 +143 1 9 11 0.26214400000000000000e6 +143 3 4 5 0.26214400000000000000e6 +144 1 7 14 -0.26214400000000000000e6 +144 1 9 12 0.26214400000000000000e6 +145 1 2 9 0.26214400000000000000e6 +145 1 7 14 0.26214400000000000000e6 +145 1 8 15 -0.52428800000000000000e6 +145 1 9 13 0.26214400000000000000e6 +145 2 6 8 0.26214400000000000000e6 +145 3 4 5 -0.26214400000000000000e6 +146 1 8 15 -0.26214400000000000000e6 +146 1 9 14 0.26214400000000000000e6 +147 1 9 15 0.26214400000000000000e6 +147 1 10 13 -0.26214400000000000000e6 +148 1 9 17 0.26214400000000000000e6 +148 1 14 15 -0.26214400000000000000e6 +149 1 9 18 0.26214400000000000000e6 +149 1 13 16 -0.26214400000000000000e6 +150 1 9 19 0.26214400000000000000e6 +150 1 15 16 -0.26214400000000000000e6 +151 1 5 16 -0.26214400000000000000e6 +151 1 10 11 0.26214400000000000000e6 +152 1 8 15 -0.26214400000000000000e6 +152 1 10 12 0.26214400000000000000e6 +153 1 10 14 0.26214400000000000000e6 +153 1 10 17 -0.13107200000000000000e6 +153 1 16 19 -0.13107200000000000000e6 +154 1 9 16 -0.26214400000000000000e6 +154 1 10 15 0.26214400000000000000e6 +155 1 10 18 0.26214400000000000000e6 +155 1 15 16 -0.26214400000000000000e6 +156 1 10 20 0.26214400000000000000e6 +156 1 16 19 -0.26214400000000000000e6 +157 1 2 17 0.13107200000000000000e6 +157 1 11 11 0.26214400000000000000e6 +157 1 11 14 -0.26214400000000000000e6 +157 1 11 18 0.13107200000000000000e6 +157 2 7 7 0.26214400000000000000e6 +157 3 7 8 0.13107200000000000000e6 +158 1 2 17 -0.26214400000000000000e6 +158 1 11 12 0.26214400000000000000e6 +159 1 11 13 0.26214400000000000000e6 +159 1 11 18 -0.26214400000000000000e6 +159 3 7 8 -0.26214400000000000000e6 +160 1 2 9 -0.52428800000000000000e6 +160 1 11 14 0.26214400000000000000e6 +160 1 11 15 0.26214400000000000000e6 +160 1 12 19 0.26214400000000000000e6 +160 2 4 10 0.26214400000000000000e6 +160 3 4 5 0.52428800000000000000e6 +160 3 4 9 0.52428800000000000000e6 +160 3 5 10 0.26214400000000000000e6 +161 1 2 9 -0.26214400000000000000e6 +161 1 11 16 0.26214400000000000000e6 +161 3 4 5 0.26214400000000000000e6 +161 3 4 9 0.26214400000000000000e6 +162 1 1 20 -0.26214400000000000000e6 +162 1 11 17 0.26214400000000000000e6 +163 1 5 20 -0.26214400000000000000e6 +163 1 11 19 0.26214400000000000000e6 +164 1 11 20 0.26214400000000000000e6 +164 1 12 19 -0.52428800000000000000e6 +164 1 13 20 0.26214400000000000000e6 +164 1 17 18 0.26214400000000000000e6 +164 2 10 10 0.52428800000000000000e6 +164 3 9 10 0.52428800000000000000e6 +165 1 11 18 -0.13107200000000000000e6 +165 1 12 12 0.26214400000000000000e6 +165 3 7 8 -0.13107200000000000000e6 +166 1 3 18 -0.26214400000000000000e6 +166 1 12 13 0.26214400000000000000e6 +167 1 2 9 -0.52428800000000000000e6 +167 1 11 14 0.26214400000000000000e6 +167 1 12 14 0.26214400000000000000e6 +167 1 12 19 0.26214400000000000000e6 +167 2 4 10 0.26214400000000000000e6 +167 3 4 5 0.52428800000000000000e6 +167 3 4 9 0.52428800000000000000e6 +167 3 5 10 0.26214400000000000000e6 +168 1 12 15 0.26214400000000000000e6 +168 1 12 19 -0.26214400000000000000e6 +168 3 5 10 -0.26214400000000000000e6 +169 1 12 16 0.26214400000000000000e6 +169 1 14 15 -0.26214400000000000000e6 +170 1 11 18 -0.26214400000000000000e6 +170 1 12 17 0.26214400000000000000e6 +171 1 1 20 0.26214400000000000000e6 +171 1 2 9 0.10485760000000000000e7 +171 1 2 17 -0.26214400000000000000e6 +171 1 3 18 -0.26214400000000000000e6 +171 1 5 20 -0.52428800000000000000e6 +171 1 11 14 -0.52428800000000000000e6 +171 1 12 18 0.26214400000000000000e6 +171 1 12 19 -0.52428800000000000000e6 +171 2 4 10 -0.52428800000000000000e6 +171 3 4 5 -0.10485760000000000000e7 +171 3 4 9 -0.10485760000000000000e7 +171 3 5 10 -0.52428800000000000000e6 +171 3 7 8 -0.26214400000000000000e6 +171 4 4 4 -0.52428800000000000000e6 +172 1 12 20 0.26214400000000000000e6 +172 1 17 18 -0.26214400000000000000e6 +173 1 3 18 0.13107200000000000000e6 +173 1 11 18 0.13107200000000000000e6 +173 1 12 19 -0.26214400000000000000e6 +173 1 13 13 0.26214400000000000000e6 +173 2 8 8 0.26214400000000000000e6 +173 3 5 10 -0.26214400000000000000e6 +173 3 7 8 0.13107200000000000000e6 +174 1 12 19 -0.26214400000000000000e6 +174 1 13 14 0.26214400000000000000e6 +174 3 5 10 -0.26214400000000000000e6 +175 1 4 19 -0.26214400000000000000e6 +175 1 13 15 0.26214400000000000000e6 +176 1 1 20 0.26214400000000000000e6 +176 1 2 9 0.10485760000000000000e7 +176 1 2 17 -0.26214400000000000000e6 +176 1 3 18 -0.26214400000000000000e6 +176 1 5 20 -0.52428800000000000000e6 +176 1 11 14 -0.52428800000000000000e6 +176 1 12 19 -0.52428800000000000000e6 +176 1 13 17 0.26214400000000000000e6 +176 2 4 10 -0.52428800000000000000e6 +176 3 4 5 -0.10485760000000000000e7 +176 3 4 9 -0.10485760000000000000e7 +176 3 5 10 -0.52428800000000000000e6 +176 3 7 8 -0.26214400000000000000e6 +176 4 4 4 -0.52428800000000000000e6 +177 1 1 20 -0.26214400000000000000e6 +177 1 2 9 -0.10485760000000000000e7 +177 1 2 17 0.26214400000000000000e6 +177 1 3 18 0.26214400000000000000e6 +177 1 5 20 0.52428800000000000000e6 +177 1 11 14 0.52428800000000000000e6 +177 1 11 18 0.26214400000000000000e6 +177 1 13 18 0.26214400000000000000e6 +177 2 4 10 0.52428800000000000000e6 +177 2 8 10 0.26214400000000000000e6 +177 3 4 5 0.10485760000000000000e7 +177 3 4 9 0.10485760000000000000e7 +177 3 5 10 0.52428800000000000000e6 +177 3 7 8 0.26214400000000000000e6 +177 4 4 4 0.52428800000000000000e6 +178 1 13 19 0.26214400000000000000e6 +178 1 15 18 -0.26214400000000000000e6 +179 1 2 9 -0.13107200000000000000e6 +179 1 14 14 0.26214400000000000000e6 +179 3 4 5 0.13107200000000000000e6 +179 3 4 9 0.13107200000000000000e6 +180 1 10 17 -0.26214400000000000000e6 +180 1 14 16 0.26214400000000000000e6 +181 1 5 20 -0.26214400000000000000e6 +181 1 14 17 0.26214400000000000000e6 +182 1 12 19 -0.26214400000000000000e6 +182 1 14 18 0.26214400000000000000e6 +183 1 14 19 0.26214400000000000000e6 +183 1 16 17 -0.26214400000000000000e6 +184 1 12 19 -0.26214400000000000000e6 +184 1 14 20 0.26214400000000000000e6 +184 3 9 10 0.26214400000000000000e6 +185 1 13 16 -0.13107200000000000000e6 +185 1 15 15 0.26214400000000000000e6 +186 1 12 19 -0.26214400000000000000e6 +186 1 15 17 0.26214400000000000000e6 +187 1 9 20 -0.26214400000000000000e6 +187 1 15 19 0.26214400000000000000e6 +188 1 15 20 0.26214400000000000000e6 +188 1 18 19 -0.26214400000000000000e6 +189 1 10 19 -0.13107200000000000000e6 +189 1 16 16 0.26214400000000000000e6 +190 1 9 20 -0.26214400000000000000e6 +190 1 16 18 0.26214400000000000000e6 +191 1 16 20 0.26214400000000000000e6 +191 1 19 19 -0.52428800000000000000e6 +192 1 12 19 -0.26214400000000000000e6 +192 1 13 20 0.13107200000000000000e6 +192 1 17 17 0.26214400000000000000e6 +192 1 17 18 0.13107200000000000000e6 +192 2 10 10 0.26214400000000000000e6 +192 3 9 10 0.26214400000000000000e6 +193 1 12 19 -0.26214400000000000000e6 +193 1 17 19 0.26214400000000000000e6 +193 3 9 10 0.26214400000000000000e6 +194 1 13 20 -0.13107200000000000000e6 +194 1 18 18 0.26214400000000000000e6 +195 1 12 19 -0.52428800000000000000e6 +195 1 17 18 0.26214400000000000000e6 +195 1 18 20 0.26214400000000000000e6 +196 2 1 2 0.26214400000000000000e6 +196 2 1 7 -0.26214400000000000000e6 +196 4 1 1 -0.52428800000000000000e6 +197 1 1 4 0.13107200000000000000e6 +197 1 1 8 -0.52428800000000000000e6 +197 1 1 16 0.52428800000000000000e6 +197 1 2 5 0.26214400000000000000e6 +197 1 2 17 -0.39321600000000000000e6 +197 1 3 18 -0.13107200000000000000e6 +197 1 5 12 -0.26214400000000000000e6 +197 1 11 14 0.26214400000000000000e6 +197 1 11 18 -0.13107200000000000000e6 +197 2 1 3 0.13107200000000000000e6 +197 2 1 4 0.26214400000000000000e6 +197 2 1 7 -0.13107200000000000000e6 +197 2 1 9 -0.26214400000000000000e6 +197 2 2 8 -0.13107200000000000000e6 +197 2 7 7 -0.26214400000000000000e6 +197 3 1 2 0.13107200000000000000e6 +197 3 2 3 0.13107200000000000000e6 +197 3 2 7 -0.26214400000000000000e6 +197 3 3 8 -0.13107200000000000000e6 +197 3 7 8 -0.13107200000000000000e6 +198 2 1 5 0.26214400000000000000e6 +198 2 2 4 -0.26214400000000000000e6 +199 1 1 8 0.26214400000000000000e6 +199 1 1 16 0.26214400000000000000e6 +199 1 2 9 0.26214400000000000000e6 +199 1 5 8 -0.52428800000000000000e6 +199 2 1 6 0.26214400000000000000e6 +199 3 1 6 0.26214400000000000000e6 +200 1 1 4 -0.26214400000000000000e6 +200 1 1 16 0.10485760000000000000e7 +200 1 2 5 -0.52428800000000000000e6 +200 1 3 18 -0.26214400000000000000e6 +200 1 4 11 -0.26214400000000000000e6 +200 1 5 12 -0.52428800000000000000e6 +200 2 1 3 -0.26214400000000000000e6 +200 2 1 8 0.26214400000000000000e6 +200 2 2 4 -0.52428800000000000000e6 +200 2 2 8 -0.26214400000000000000e6 +200 3 1 2 -0.26214400000000000000e6 +200 3 1 6 0.10485760000000000000e7 +200 3 2 3 -0.26214400000000000000e6 +200 3 3 4 -0.52428800000000000000e6 +200 3 3 8 -0.26214400000000000000e6 +201 2 1 10 0.26214400000000000000e6 +201 2 7 7 -0.52428800000000000000e6 +202 2 1 3 -0.13107200000000000000e6 +202 2 2 2 0.26214400000000000000e6 +203 2 2 3 0.26214400000000000000e6 +203 2 2 8 -0.26214400000000000000e6 +203 4 2 2 -0.52428800000000000000e6 +204 1 1 16 0.52428800000000000000e6 +204 1 2 5 -0.26214400000000000000e6 +204 1 2 9 -0.52428800000000000000e6 +204 1 2 17 -0.13107200000000000000e6 +204 1 3 18 -0.13107200000000000000e6 +204 1 4 7 -0.26214400000000000000e6 +204 1 4 11 -0.13107200000000000000e6 +204 1 6 7 0.52428800000000000000e6 +204 2 2 4 -0.26214400000000000000e6 +204 2 2 5 0.26214400000000000000e6 +204 2 2 8 -0.13107200000000000000e6 +204 2 3 5 -0.26214400000000000000e6 +204 3 1 6 0.52428800000000000000e6 +204 3 2 7 -0.13107200000000000000e6 +204 3 3 4 -0.26214400000000000000e6 +204 3 3 8 -0.13107200000000000000e6 +205 1 1 16 0.26214400000000000000e6 +205 1 2 9 0.26214400000000000000e6 +205 1 5 16 -0.52428800000000000000e6 +205 1 7 14 0.26214400000000000000e6 +205 2 2 6 0.26214400000000000000e6 +205 3 4 5 -0.26214400000000000000e6 +205 4 3 3 -0.52428800000000000000e6 +206 1 1 4 -0.26214400000000000000e6 +206 1 1 16 0.10485760000000000000e7 +206 1 2 5 -0.52428800000000000000e6 +206 1 3 18 -0.26214400000000000000e6 +206 1 4 11 -0.26214400000000000000e6 +206 1 5 12 -0.52428800000000000000e6 +206 2 1 3 -0.26214400000000000000e6 +206 2 2 4 -0.52428800000000000000e6 +206 2 2 7 0.26214400000000000000e6 +206 2 2 8 -0.26214400000000000000e6 +206 3 1 2 -0.26214400000000000000e6 +206 3 1 6 0.10485760000000000000e7 +206 3 2 3 -0.26214400000000000000e6 +206 3 3 4 -0.52428800000000000000e6 +206 3 3 8 -0.26214400000000000000e6 +207 1 2 9 -0.52428800000000000000e6 +207 1 2 17 0.13107200000000000000e6 +207 1 3 18 0.13107200000000000000e6 +207 1 4 11 0.13107200000000000000e6 +207 1 5 12 0.26214400000000000000e6 +207 1 6 13 0.26214400000000000000e6 +207 2 2 8 0.13107200000000000000e6 +207 2 2 9 0.26214400000000000000e6 +207 3 2 7 0.13107200000000000000e6 +207 3 3 8 0.13107200000000000000e6 +207 3 4 5 0.52428800000000000000e6 +208 1 2 9 -0.10485760000000000000e7 +208 1 2 17 0.26214400000000000000e6 +208 1 3 18 0.26214400000000000000e6 +208 1 11 14 0.52428800000000000000e6 +208 1 11 18 0.26214400000000000000e6 +208 1 12 19 0.52428800000000000000e6 +208 2 2 10 0.26214400000000000000e6 +208 2 4 10 0.52428800000000000000e6 +208 3 4 5 0.10485760000000000000e7 +208 3 4 9 0.10485760000000000000e7 +208 3 5 10 0.52428800000000000000e6 +208 3 7 8 0.26214400000000000000e6 +209 1 1 16 0.52428800000000000000e6 +209 1 2 5 -0.26214400000000000000e6 +209 1 2 9 -0.52428800000000000000e6 +209 1 2 17 -0.13107200000000000000e6 +209 1 3 18 -0.13107200000000000000e6 +209 1 4 7 -0.26214400000000000000e6 +209 1 4 11 -0.13107200000000000000e6 +209 1 6 7 0.52428800000000000000e6 +209 2 2 4 -0.26214400000000000000e6 +209 2 2 8 -0.13107200000000000000e6 +209 2 3 4 0.26214400000000000000e6 +209 2 3 5 -0.26214400000000000000e6 +209 3 1 6 0.52428800000000000000e6 +209 3 2 7 -0.13107200000000000000e6 +209 3 3 4 -0.26214400000000000000e6 +209 3 3 8 -0.13107200000000000000e6 +210 2 3 6 0.26214400000000000000e6 +210 2 5 5 -0.52428800000000000000e6 +211 2 2 8 -0.26214400000000000000e6 +211 2 3 7 0.26214400000000000000e6 +212 1 3 18 0.26214400000000000000e6 +212 1 4 11 0.26214400000000000000e6 +212 1 4 13 0.26214400000000000000e6 +212 1 6 13 -0.52428800000000000000e6 +212 2 3 8 0.26214400000000000000e6 +212 3 3 8 0.26214400000000000000e6 +213 2 3 10 0.26214400000000000000e6 +213 2 8 8 -0.52428800000000000000e6 +214 1 1 8 0.13107200000000000000e6 +214 1 1 16 0.13107200000000000000e6 +214 1 2 9 0.13107200000000000000e6 +214 1 5 8 -0.26214400000000000000e6 +214 2 4 4 0.26214400000000000000e6 +214 3 1 6 0.13107200000000000000e6 +215 1 1 16 0.26214400000000000000e6 +215 1 2 9 0.26214400000000000000e6 +215 1 5 16 -0.52428800000000000000e6 +215 1 7 14 0.26214400000000000000e6 +215 2 4 5 0.26214400000000000000e6 +215 3 4 5 -0.26214400000000000000e6 +215 4 3 3 -0.52428800000000000000e6 +216 2 1 9 -0.26214400000000000000e6 +216 2 4 7 0.26214400000000000000e6 +217 1 2 9 -0.52428800000000000000e6 +217 1 2 17 0.13107200000000000000e6 +217 1 3 18 0.13107200000000000000e6 +217 1 4 11 0.13107200000000000000e6 +217 1 5 12 0.26214400000000000000e6 +217 1 6 13 0.26214400000000000000e6 +217 2 2 8 0.13107200000000000000e6 +217 2 4 8 0.26214400000000000000e6 +217 3 2 7 0.13107200000000000000e6 +217 3 3 8 0.13107200000000000000e6 +217 3 4 5 0.52428800000000000000e6 +218 1 1 16 0.26214400000000000000e6 +218 1 2 9 0.26214400000000000000e6 +218 1 5 16 -0.52428800000000000000e6 +218 1 7 14 0.26214400000000000000e6 +218 2 4 9 0.26214400000000000000e6 +218 3 4 5 -0.26214400000000000000e6 +219 1 2 9 -0.52428800000000000000e6 +219 1 2 17 0.13107200000000000000e6 +219 1 3 18 0.13107200000000000000e6 +219 1 4 11 0.13107200000000000000e6 +219 1 5 12 0.26214400000000000000e6 +219 1 6 13 0.26214400000000000000e6 +219 2 2 8 0.13107200000000000000e6 +219 2 5 7 0.26214400000000000000e6 +219 3 2 7 0.13107200000000000000e6 +219 3 3 8 0.13107200000000000000e6 +219 3 4 5 0.52428800000000000000e6 +220 2 3 9 -0.26214400000000000000e6 +220 2 5 8 0.26214400000000000000e6 +221 2 5 9 0.26214400000000000000e6 +221 2 6 8 -0.26214400000000000000e6 +222 1 2 9 0.52428800000000000000e6 +222 1 4 19 0.26214400000000000000e6 +222 1 11 14 -0.26214400000000000000e6 +222 1 14 15 -0.52428800000000000000e6 +222 2 4 10 -0.26214400000000000000e6 +222 2 5 10 0.26214400000000000000e6 +222 3 4 5 -0.52428800000000000000e6 +222 3 4 9 -0.52428800000000000000e6 +223 1 1 16 0.26214400000000000000e6 +223 1 2 9 0.26214400000000000000e6 +223 1 5 16 -0.52428800000000000000e6 +223 1 7 14 0.26214400000000000000e6 +223 2 6 7 0.26214400000000000000e6 +223 3 4 5 -0.26214400000000000000e6 +224 1 5 16 0.26214400000000000000e6 +224 1 8 15 0.26214400000000000000e6 +224 1 10 13 0.26214400000000000000e6 +224 1 10 17 -0.26214400000000000000e6 +224 1 16 19 -0.26214400000000000000e6 +224 2 6 9 0.26214400000000000000e6 +225 1 2 9 0.26214400000000000000e6 +225 1 10 17 -0.52428800000000000000e6 +225 1 13 16 0.26214400000000000000e6 +225 1 14 15 0.26214400000000000000e6 +225 2 6 10 0.26214400000000000000e6 +225 3 4 5 -0.26214400000000000000e6 +225 3 4 9 -0.26214400000000000000e6 +226 1 2 9 -0.10485760000000000000e7 +226 1 2 17 0.26214400000000000000e6 +226 1 3 18 0.26214400000000000000e6 +226 1 11 14 0.52428800000000000000e6 +226 1 11 18 0.26214400000000000000e6 +226 1 12 19 0.52428800000000000000e6 +226 2 4 10 0.52428800000000000000e6 +226 2 7 8 0.26214400000000000000e6 +226 3 4 5 0.10485760000000000000e7 +226 3 4 9 0.10485760000000000000e7 +226 3 5 10 0.52428800000000000000e6 +226 3 7 8 0.26214400000000000000e6 +227 2 4 10 -0.26214400000000000000e6 +227 2 7 9 0.26214400000000000000e6 +228 1 2 9 -0.10485760000000000000e7 +228 1 2 17 0.26214400000000000000e6 +228 1 3 18 0.26214400000000000000e6 +228 1 11 14 0.52428800000000000000e6 +228 1 11 18 0.26214400000000000000e6 +228 1 12 19 0.52428800000000000000e6 +228 2 4 10 0.52428800000000000000e6 +228 2 7 10 0.26214400000000000000e6 +228 3 4 5 0.10485760000000000000e7 +228 3 4 9 0.10485760000000000000e7 +228 3 5 10 0.52428800000000000000e6 +228 3 7 8 0.26214400000000000000e6 +228 4 4 4 0.52428800000000000000e6 +229 1 2 9 0.52428800000000000000e6 +229 1 4 19 0.26214400000000000000e6 +229 1 11 14 -0.26214400000000000000e6 +229 1 14 15 -0.52428800000000000000e6 +229 2 4 10 -0.26214400000000000000e6 +229 2 8 9 0.26214400000000000000e6 +229 3 4 5 -0.52428800000000000000e6 +229 3 4 9 -0.52428800000000000000e6 +230 1 2 9 0.13107200000000000000e6 +230 1 10 17 -0.26214400000000000000e6 +230 1 13 16 0.13107200000000000000e6 +230 1 14 15 0.13107200000000000000e6 +230 2 9 9 0.26214400000000000000e6 +230 3 4 5 -0.13107200000000000000e6 +230 3 4 9 -0.13107200000000000000e6 +231 1 5 20 0.26214400000000000000e6 +231 1 12 19 0.26214400000000000000e6 +231 1 15 18 0.26214400000000000000e6 +231 1 16 17 -0.52428800000000000000e6 +231 2 9 10 0.26214400000000000000e6 +232 1 1 4 0.13107200000000000000e6 +232 1 1 16 0.52428800000000000000e6 +232 1 2 5 -0.26214400000000000000e6 +232 1 2 17 -0.26214400000000000000e6 +232 1 3 18 -0.13107200000000000000e6 +232 1 4 11 -0.13107200000000000000e6 +232 1 5 12 -0.26214400000000000000e6 +232 2 1 9 -0.26214400000000000000e6 +232 2 2 8 -0.13107200000000000000e6 +232 3 1 1 0.26214400000000000000e6 +232 3 1 2 0.13107200000000000000e6 +232 3 2 7 -0.26214400000000000000e6 +232 3 3 8 -0.13107200000000000000e6 +232 4 1 1 0.26214400000000000000e6 +233 1 1 4 -0.26214400000000000000e6 +233 1 2 17 0.26214400000000000000e6 +233 3 1 3 0.26214400000000000000e6 +233 3 2 7 0.26214400000000000000e6 +234 1 1 16 0.52428800000000000000e6 +234 1 2 5 -0.26214400000000000000e6 +234 1 2 17 -0.13107200000000000000e6 +234 1 3 18 -0.13107200000000000000e6 +234 1 4 11 -0.13107200000000000000e6 +234 1 5 12 -0.26214400000000000000e6 +234 2 1 9 -0.26214400000000000000e6 +234 2 2 8 -0.13107200000000000000e6 +234 3 1 4 0.26214400000000000000e6 +234 3 2 7 -0.13107200000000000000e6 +234 3 3 8 -0.13107200000000000000e6 +235 1 1 16 -0.52428800000000000000e6 +235 1 2 5 0.26214400000000000000e6 +235 1 2 17 0.13107200000000000000e6 +235 1 3 18 0.13107200000000000000e6 +235 1 4 11 0.13107200000000000000e6 +235 1 5 12 0.26214400000000000000e6 +235 2 2 4 0.26214400000000000000e6 +235 2 2 8 0.13107200000000000000e6 +235 3 1 5 0.26214400000000000000e6 +235 3 1 6 -0.52428800000000000000e6 +235 3 2 7 0.13107200000000000000e6 +235 3 3 4 0.26214400000000000000e6 +235 3 3 8 0.13107200000000000000e6 +236 1 1 4 0.26214400000000000000e6 +236 1 1 16 -0.10485760000000000000e7 +236 1 2 5 0.52428800000000000000e6 +236 1 3 18 0.26214400000000000000e6 +236 1 4 11 0.52428800000000000000e6 +236 1 11 14 0.52428800000000000000e6 +236 1 11 18 -0.26214400000000000000e6 +236 2 1 3 0.26214400000000000000e6 +236 2 2 4 0.52428800000000000000e6 +236 2 2 8 0.26214400000000000000e6 +236 2 7 7 -0.52428800000000000000e6 +236 3 1 2 0.26214400000000000000e6 +236 3 1 6 -0.10485760000000000000e7 +236 3 1 7 0.26214400000000000000e6 +236 3 2 3 0.26214400000000000000e6 +236 3 2 7 0.26214400000000000000e6 +236 3 3 4 0.52428800000000000000e6 +236 3 3 8 0.26214400000000000000e6 +236 3 7 8 -0.26214400000000000000e6 +237 3 1 8 0.26214400000000000000e6 +237 3 2 7 -0.26214400000000000000e6 +238 1 5 12 -0.26214400000000000000e6 +238 1 11 14 0.26214400000000000000e6 +238 3 1 9 0.26214400000000000000e6 +239 1 1 20 0.26214400000000000000e6 +239 1 2 17 -0.26214400000000000000e6 +239 3 1 10 0.26214400000000000000e6 +240 1 1 4 -0.13107200000000000000e6 +240 1 2 17 0.13107200000000000000e6 +240 3 2 2 0.26214400000000000000e6 +240 3 2 7 0.13107200000000000000e6 +241 1 1 16 -0.52428800000000000000e6 +241 1 2 5 0.26214400000000000000e6 +241 1 2 17 0.13107200000000000000e6 +241 1 3 18 0.13107200000000000000e6 +241 1 4 11 0.13107200000000000000e6 +241 1 5 12 0.26214400000000000000e6 +241 2 2 4 0.26214400000000000000e6 +241 2 2 8 0.13107200000000000000e6 +241 3 1 6 -0.52428800000000000000e6 +241 3 2 4 0.26214400000000000000e6 +241 3 2 7 0.13107200000000000000e6 +241 3 3 4 0.26214400000000000000e6 +241 3 3 8 0.13107200000000000000e6 +242 3 2 5 0.26214400000000000000e6 +242 3 3 4 -0.26214400000000000000e6 +243 3 2 6 0.26214400000000000000e6 +243 3 4 5 -0.26214400000000000000e6 +244 1 4 11 -0.26214400000000000000e6 +244 1 11 18 0.26214400000000000000e6 +244 3 2 8 0.26214400000000000000e6 +244 3 7 8 0.26214400000000000000e6 +245 1 2 9 0.52428800000000000000e6 +245 1 2 17 -0.13107200000000000000e6 +245 1 3 18 -0.13107200000000000000e6 +245 1 4 11 -0.13107200000000000000e6 +245 1 11 14 -0.26214400000000000000e6 +245 1 12 19 -0.26214400000000000000e6 +245 2 2 8 -0.13107200000000000000e6 +245 2 4 10 -0.26214400000000000000e6 +245 3 2 7 -0.13107200000000000000e6 +245 3 2 9 0.26214400000000000000e6 +245 3 3 8 -0.13107200000000000000e6 +245 3 4 5 -0.52428800000000000000e6 +245 3 4 9 -0.52428800000000000000e6 +245 3 5 10 -0.26214400000000000000e6 +246 3 2 10 0.26214400000000000000e6 +246 3 7 8 -0.26214400000000000000e6 +247 1 1 4 0.13107200000000000000e6 +247 1 2 17 -0.13107200000000000000e6 +247 3 2 3 0.13107200000000000000e6 +247 3 2 7 -0.13107200000000000000e6 +247 3 3 3 0.26214400000000000000e6 +247 3 3 4 -0.26214400000000000000e6 +247 4 2 2 0.26214400000000000000e6 +248 1 2 17 0.13107200000000000000e6 +248 1 3 18 0.13107200000000000000e6 +248 1 4 7 0.26214400000000000000e6 +248 1 4 11 0.13107200000000000000e6 +248 1 6 7 -0.52428800000000000000e6 +248 1 6 13 0.26214400000000000000e6 +248 2 2 8 0.13107200000000000000e6 +248 2 3 5 0.26214400000000000000e6 +248 3 2 7 0.13107200000000000000e6 +248 3 3 4 0.26214400000000000000e6 +248 3 3 5 0.26214400000000000000e6 +248 3 3 8 0.13107200000000000000e6 +249 1 6 7 -0.26214400000000000000e6 +249 1 7 14 0.26214400000000000000e6 +249 3 3 6 0.26214400000000000000e6 +250 1 4 11 -0.26214400000000000000e6 +250 1 11 18 0.26214400000000000000e6 +250 3 3 7 0.26214400000000000000e6 +250 3 7 8 0.26214400000000000000e6 +251 1 6 13 -0.26214400000000000000e6 +251 1 12 19 0.26214400000000000000e6 +251 3 3 9 0.26214400000000000000e6 +251 3 5 10 0.26214400000000000000e6 +252 1 1 20 -0.26214400000000000000e6 +252 1 2 9 -0.10485760000000000000e7 +252 1 2 17 0.26214400000000000000e6 +252 1 5 20 0.52428800000000000000e6 +252 1 11 14 0.52428800000000000000e6 +252 1 12 19 0.52428800000000000000e6 +252 2 4 10 0.52428800000000000000e6 +252 3 3 10 0.26214400000000000000e6 +252 3 4 5 0.10485760000000000000e7 +252 3 4 9 0.10485760000000000000e7 +252 3 5 10 0.52428800000000000000e6 +252 3 7 8 0.26214400000000000000e6 +252 4 4 4 0.52428800000000000000e6 +253 3 1 6 -0.13107200000000000000e6 +253 3 4 4 0.26214400000000000000e6 +254 1 6 7 -0.13107200000000000000e6 +254 1 7 14 0.13107200000000000000e6 +254 3 1 6 -0.13107200000000000000e6 +254 3 4 5 -0.13107200000000000000e6 +254 3 4 6 0.26214400000000000000e6 +254 4 3 3 -0.26214400000000000000e6 +255 1 5 12 -0.26214400000000000000e6 +255 1 11 14 0.26214400000000000000e6 +255 3 4 7 0.26214400000000000000e6 +256 1 2 9 0.52428800000000000000e6 +256 1 2 17 -0.13107200000000000000e6 +256 1 3 18 -0.13107200000000000000e6 +256 1 4 11 -0.13107200000000000000e6 +256 1 11 14 -0.26214400000000000000e6 +256 1 12 19 -0.26214400000000000000e6 +256 2 2 8 -0.13107200000000000000e6 +256 2 4 10 -0.26214400000000000000e6 +256 3 2 7 -0.13107200000000000000e6 +256 3 3 8 -0.13107200000000000000e6 +256 3 4 5 -0.52428800000000000000e6 +256 3 4 8 0.26214400000000000000e6 +256 3 4 9 -0.52428800000000000000e6 +256 3 5 10 -0.26214400000000000000e6 +257 1 2 9 -0.52428800000000000000e6 +257 1 5 20 0.26214400000000000000e6 +257 1 11 14 0.26214400000000000000e6 +257 1 12 19 0.26214400000000000000e6 +257 2 4 10 0.26214400000000000000e6 +257 3 4 5 0.52428800000000000000e6 +257 3 4 9 0.52428800000000000000e6 +257 3 4 10 0.26214400000000000000e6 +257 3 5 10 0.26214400000000000000e6 +258 1 6 7 -0.13107200000000000000e6 +258 1 7 14 0.13107200000000000000e6 +258 3 5 5 0.26214400000000000000e6 +259 1 3 10 -0.26214400000000000000e6 +259 1 8 15 0.26214400000000000000e6 +259 3 5 6 0.26214400000000000000e6 +260 1 2 9 0.52428800000000000000e6 +260 1 2 17 -0.13107200000000000000e6 +260 1 3 18 -0.13107200000000000000e6 +260 1 4 11 -0.13107200000000000000e6 +260 1 11 14 -0.26214400000000000000e6 +260 1 12 19 -0.26214400000000000000e6 +260 2 2 8 -0.13107200000000000000e6 +260 2 4 10 -0.26214400000000000000e6 +260 3 2 7 -0.13107200000000000000e6 +260 3 3 8 -0.13107200000000000000e6 +260 3 4 5 -0.52428800000000000000e6 +260 3 4 9 -0.52428800000000000000e6 +260 3 5 7 0.26214400000000000000e6 +260 3 5 10 -0.26214400000000000000e6 +261 1 6 13 -0.26214400000000000000e6 +261 1 12 19 0.26214400000000000000e6 +261 3 5 8 0.26214400000000000000e6 +261 3 5 10 0.26214400000000000000e6 +262 1 7 14 -0.26214400000000000000e6 +262 1 14 15 0.26214400000000000000e6 +262 3 5 9 0.26214400000000000000e6 +263 1 8 9 -0.13107200000000000000e6 +263 1 10 17 0.65536000000000000000e5 +263 1 16 19 0.65536000000000000000e5 +263 3 6 6 0.26214400000000000000e6 +264 3 4 9 -0.26214400000000000000e6 +264 3 6 7 0.26214400000000000000e6 +265 1 7 14 -0.26214400000000000000e6 +265 1 14 15 0.26214400000000000000e6 +265 3 6 8 0.26214400000000000000e6 +266 1 8 15 -0.26214400000000000000e6 +266 1 10 17 0.26214400000000000000e6 +266 3 6 9 0.26214400000000000000e6 +267 1 14 15 -0.26214400000000000000e6 +267 1 16 17 0.26214400000000000000e6 +267 3 6 10 0.26214400000000000000e6 +268 1 1 20 0.13107200000000000000e6 +268 1 2 17 -0.13107200000000000000e6 +268 3 7 7 0.26214400000000000000e6 +269 1 2 9 -0.52428800000000000000e6 +269 1 5 20 0.26214400000000000000e6 +269 1 11 14 0.26214400000000000000e6 +269 1 12 19 0.26214400000000000000e6 +269 2 4 10 0.26214400000000000000e6 +269 3 4 5 0.52428800000000000000e6 +269 3 4 9 0.52428800000000000000e6 +269 3 5 10 0.26214400000000000000e6 +269 3 7 9 0.26214400000000000000e6 +270 1 11 18 -0.26214400000000000000e6 +270 1 12 19 0.52428800000000000000e6 +270 1 13 20 -0.26214400000000000000e6 +270 1 17 18 -0.26214400000000000000e6 +270 2 10 10 -0.52428800000000000000e6 +270 3 7 10 0.26214400000000000000e6 +270 3 9 10 -0.52428800000000000000e6 +271 1 1 20 -0.13107200000000000000e6 +271 1 2 9 -0.52428800000000000000e6 +271 1 2 17 0.13107200000000000000e6 +271 1 5 20 0.26214400000000000000e6 +271 1 11 14 0.26214400000000000000e6 +271 1 12 19 0.26214400000000000000e6 +271 2 4 10 0.26214400000000000000e6 +271 3 4 5 0.52428800000000000000e6 +271 3 4 9 0.52428800000000000000e6 +271 3 5 10 0.26214400000000000000e6 +271 3 7 8 0.13107200000000000000e6 +271 3 8 8 0.26214400000000000000e6 +271 4 4 4 0.26214400000000000000e6 +272 3 5 10 -0.26214400000000000000e6 +272 3 8 9 0.26214400000000000000e6 +273 1 1 20 0.26214400000000000000e6 +273 1 2 9 0.10485760000000000000e7 +273 1 2 17 -0.26214400000000000000e6 +273 1 3 18 -0.26214400000000000000e6 +273 1 5 20 -0.52428800000000000000e6 +273 1 11 14 -0.52428800000000000000e6 +273 1 12 19 -0.52428800000000000000e6 +273 1 17 18 0.26214400000000000000e6 +273 2 4 10 -0.52428800000000000000e6 +273 3 4 5 -0.10485760000000000000e7 +273 3 4 9 -0.10485760000000000000e7 +273 3 5 10 -0.52428800000000000000e6 +273 3 7 8 -0.26214400000000000000e6 +273 3 8 10 0.26214400000000000000e6 +273 4 4 4 -0.52428800000000000000e6 +274 1 14 15 -0.13107200000000000000e6 +274 1 16 17 0.13107200000000000000e6 +274 3 9 9 0.26214400000000000000e6 +275 1 17 18 -0.13107200000000000000e6 +275 1 17 20 0.13107200000000000000e6 +275 3 10 10 0.26214400000000000000e6 +276 1 1 4 0.26214400000000000000e6 +276 1 1 16 -0.10485760000000000000e7 +276 1 2 5 0.52428800000000000000e6 +276 1 3 18 0.26214400000000000000e6 +276 1 4 11 0.26214400000000000000e6 +276 1 5 12 0.52428800000000000000e6 +276 2 2 4 0.52428800000000000000e6 +276 2 2 8 0.26214400000000000000e6 +276 3 1 2 0.26214400000000000000e6 +276 3 1 6 -0.10485760000000000000e7 +276 3 2 3 0.26214400000000000000e6 +276 3 3 4 0.52428800000000000000e6 +276 3 3 8 0.26214400000000000000e6 +276 4 1 2 0.26214400000000000000e6 +277 2 1 9 0.26214400000000000000e6 +277 2 2 4 -0.26214400000000000000e6 +277 4 1 3 0.26214400000000000000e6 +278 1 1 4 -0.26214400000000000000e6 +278 1 1 16 0.10485760000000000000e7 +278 1 2 5 -0.52428800000000000000e6 +278 1 3 18 -0.26214400000000000000e6 +278 1 4 11 -0.26214400000000000000e6 +278 1 5 12 -0.52428800000000000000e6 +278 2 1 3 -0.26214400000000000000e6 +278 2 2 4 -0.52428800000000000000e6 +278 2 2 8 -0.26214400000000000000e6 +278 2 7 7 0.52428800000000000000e6 +278 3 1 2 -0.26214400000000000000e6 +278 3 1 6 0.10485760000000000000e7 +278 3 2 3 -0.26214400000000000000e6 +278 3 3 4 -0.52428800000000000000e6 +278 3 3 8 -0.26214400000000000000e6 +278 4 1 4 0.26214400000000000000e6 +279 1 1 16 0.52428800000000000000e6 +279 1 2 5 -0.26214400000000000000e6 +279 1 2 17 -0.26214400000000000000e6 +279 1 3 18 -0.26214400000000000000e6 +279 1 4 7 -0.26214400000000000000e6 +279 1 4 11 -0.26214400000000000000e6 +279 1 5 12 -0.26214400000000000000e6 +279 1 6 7 0.52428800000000000000e6 +279 1 6 13 -0.26214400000000000000e6 +279 2 2 4 -0.26214400000000000000e6 +279 2 2 8 -0.26214400000000000000e6 +279 2 3 5 -0.26214400000000000000e6 +279 3 1 6 0.52428800000000000000e6 +279 3 2 7 -0.26214400000000000000e6 +279 3 3 4 -0.26214400000000000000e6 +279 3 3 8 -0.26214400000000000000e6 +279 3 4 5 -0.52428800000000000000e6 +279 4 2 3 0.26214400000000000000e6 +280 1 2 9 0.10485760000000000000e7 +280 1 2 17 -0.26214400000000000000e6 +280 1 3 18 -0.26214400000000000000e6 +280 1 11 14 -0.52428800000000000000e6 +280 1 11 18 -0.26214400000000000000e6 +280 1 12 19 -0.52428800000000000000e6 +280 2 2 8 -0.26214400000000000000e6 +280 2 4 10 -0.52428800000000000000e6 +280 3 4 5 -0.10485760000000000000e7 +280 3 4 9 -0.10485760000000000000e7 +280 3 5 10 -0.52428800000000000000e6 +280 3 7 8 -0.26214400000000000000e6 +280 4 2 4 0.26214400000000000000e6 +281 1 2 9 -0.52428800000000000000e6 +281 1 2 17 0.13107200000000000000e6 +281 1 3 18 0.13107200000000000000e6 +281 1 4 11 0.13107200000000000000e6 +281 1 5 12 0.26214400000000000000e6 +281 1 6 13 0.26214400000000000000e6 +281 2 2 8 0.13107200000000000000e6 +281 2 4 10 0.26214400000000000000e6 +281 3 2 7 0.13107200000000000000e6 +281 3 3 8 0.13107200000000000000e6 +281 3 4 5 0.52428800000000000000e6 +281 4 3 4 0.26214400000000000000e6 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +468 +4 +20 10 20 10 +-0.26214400000000000000e6 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.26214400000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 -0.78643200000000000000e6 0.26214400000000000000e6 0.26214400000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.78643200000000000000e6 -0.26214400000000000000e6 0.26214400000000000000e6 0.0 -0.26214400000000000000e6 -0.26214400000000000000e6 -0.32768000000000000000e6 0.0 0.0 -0.13107200000000000000e6 -0.26214400000000000000e6 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 -0.78643200000000000000e6 -0.26214400000000000000e6 0.0 0.0 0.0 0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 -0.26214400000000000000e6 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.19660800000000000000e6 -0.32768000000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.10485760000000000000e7 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.78643200000000000000e6 -0.52428800000000000000e6 0.0 0.26214400000000000000e6 0.0 0.26214400000000000000e6 0.26214400000000000000e6 -0.52428800000000000000e6 -0.26214400000000000000e6 0.0 0.0 0.0 -0.52428800000000000000e6 0.26214400000000000000e6 -0.52428800000000000000e6 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 -0.52428800000000000000e6 0.26214400000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.26214400000000000000e6 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.10485760000000000000e7 0.26214400000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.52428800000000000000e6 0.0 0.0 -0.10485760000000000000e7 0.0 0.0 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.52428800000000000000e6 0.0 0.10485760000000000000e7 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.78643200000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.0 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 -0.52428800000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.0 -0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.0 -0.52428800000000000000e6 0.26214400000000000000e6 0.0 +0 1 1 4 0.13107200000000000000e6 +0 1 1 16 0.26214400000000000000e6 +0 1 2 5 -0.13107200000000000000e6 +0 1 2 17 -0.13107200000000000000e6 +0 1 4 11 0.65536000000000000000e5 +0 1 4 19 0.13107200000000000000e6 +0 1 5 12 -0.13107200000000000000e6 +0 1 6 13 0.13107200000000000000e6 +0 1 7 14 -0.26214400000000000000e6 +0 1 11 18 -0.65536000000000000000e5 +0 2 1 1 -0.13107200000000000000e6 +0 2 1 3 0.65536000000000000000e5 +0 2 1 9 -0.13107200000000000000e6 +0 2 3 9 0.13107200000000000000e6 +0 2 7 7 -0.13107200000000000000e6 +0 3 1 2 0.65536000000000000000e5 +0 3 1 6 -0.13107200000000000000e6 +0 3 1 14 -0.13107200000000000000e6 +0 3 2 3 0.65536000000000000000e5 +0 3 2 11 -0.65536000000000000000e5 +0 3 7 12 0.13107200000000000000e6 +0 3 11 12 -0.65536000000000000000e5 +0 4 1 1 0.13107200000000000000e6 +1 1 4 19 0.13107200000000000000e6 +1 1 19 20 -0.13107200000000000000e6 +1 3 13 14 -0.13107200000000000000e6 +1 3 17 18 -0.65536000000000000000e5 +1 3 17 20 -0.65536000000000000000e5 +1 3 18 20 -0.65536000000000000000e5 +1 3 20 20 -0.13107200000000000000e6 +2 1 18 19 -0.65536000000000000000e5 +2 1 19 20 0.65536000000000000000e5 +2 3 14 19 0.13107200000000000000e6 +2 3 19 20 -0.65536000000000000000e5 +3 1 4 19 0.13107200000000000000e6 +3 1 18 19 -0.13107200000000000000e6 +3 3 13 14 -0.13107200000000000000e6 +3 3 17 18 -0.65536000000000000000e5 +3 3 18 20 -0.65536000000000000000e5 +4 1 6 13 -0.13107200000000000000e6 +4 1 13 20 0.65536000000000000000e5 +4 1 17 20 0.65536000000000000000e5 +4 3 2 15 0.13107200000000000000e6 +4 3 5 18 0.13107200000000000000e6 +4 3 5 20 0.13107200000000000000e6 +4 3 17 18 -0.65536000000000000000e5 +4 3 17 20 -0.65536000000000000000e5 +5 1 10 13 0.13107200000000000000e6 +5 1 16 19 -0.13107200000000000000e6 +5 3 6 19 -0.65536000000000000000e5 +5 3 9 20 -0.65536000000000000000e5 +5 3 14 19 -0.65536000000000000000e5 +5 3 19 19 -0.13107200000000000000e6 +6 1 6 13 0.65536000000000000000e5 +6 1 7 14 -0.13107200000000000000e6 +6 1 19 20 0.65536000000000000000e5 +6 3 5 18 -0.65536000000000000000e5 +6 3 5 20 -0.65536000000000000000e5 +6 3 6 11 0.65536000000000000000e5 +6 3 7 12 0.65536000000000000000e5 +6 3 11 16 0.13107200000000000000e6 +6 4 4 8 0.65536000000000000000e5 +7 1 1 20 -0.65536000000000000000e5 +7 1 2 17 0.65536000000000000000e5 +7 1 3 18 0.65536000000000000000e5 +7 1 4 19 0.13107200000000000000e6 +7 1 5 20 0.13107200000000000000e6 +7 1 7 14 -0.26214400000000000000e6 +7 1 13 20 0.65536000000000000000e5 +7 2 3 9 0.13107200000000000000e6 +7 3 2 15 0.13107200000000000000e6 +7 3 5 18 0.13107200000000000000e6 +7 3 6 11 0.13107200000000000000e6 +7 3 7 12 0.13107200000000000000e6 +7 3 11 12 0.65536000000000000000e5 +7 3 12 17 -0.65536000000000000000e5 +7 3 17 18 -0.65536000000000000000e5 +7 4 7 7 0.13107200000000000000e6 +8 1 1 20 0.65536000000000000000e5 +8 1 2 17 -0.65536000000000000000e5 +8 1 3 18 -0.65536000000000000000e5 +8 1 4 19 -0.13107200000000000000e6 +8 1 5 20 -0.26214400000000000000e6 +8 1 7 14 0.26214400000000000000e6 +8 1 13 20 -0.65536000000000000000e5 +8 1 17 20 0.65536000000000000000e5 +8 2 3 9 -0.13107200000000000000e6 +8 2 10 10 -0.13107200000000000000e6 +8 3 2 15 -0.13107200000000000000e6 +8 3 5 18 -0.13107200000000000000e6 +8 3 5 20 -0.13107200000000000000e6 +8 3 6 11 -0.13107200000000000000e6 +8 3 7 12 -0.13107200000000000000e6 +8 3 11 12 -0.65536000000000000000e5 +8 3 12 17 0.65536000000000000000e5 +8 4 7 7 -0.13107200000000000000e6 +9 1 9 16 0.13107200000000000000e6 +9 1 10 13 -0.65536000000000000000e5 +9 1 10 19 -0.13107200000000000000e6 +9 1 16 19 0.65536000000000000000e5 +9 3 9 14 0.65536000000000000000e5 +9 3 16 19 -0.65536000000000000000e5 +10 3 6 19 -0.65536000000000000000e5 +10 3 9 14 0.13107200000000000000e6 +10 3 9 20 -0.65536000000000000000e5 +11 1 2 9 -0.65536000000000000000e5 +11 1 3 10 0.13107200000000000000e6 +11 1 10 17 -0.13107200000000000000e6 +11 2 6 8 -0.65536000000000000000e5 +11 3 2 15 -0.32768000000000000000e5 +11 3 3 8 -0.65536000000000000000e5 +11 3 3 16 -0.65536000000000000000e5 +11 3 6 7 -0.65536000000000000000e5 +11 3 6 11 -0.32768000000000000000e5 +11 3 6 19 -0.65536000000000000000e5 +11 3 7 12 -0.32768000000000000000e5 +11 3 11 16 -0.65536000000000000000e5 +11 3 14 19 -0.65536000000000000000e5 +11 4 2 6 -0.65536000000000000000e5 +11 4 4 8 -0.32768000000000000000e5 +12 1 4 19 0.65536000000000000000e5 +12 1 18 19 -0.65536000000000000000e5 +12 3 6 19 -0.13107200000000000000e6 +12 3 13 14 -0.65536000000000000000e5 +12 3 15 20 0.65536000000000000000e5 +13 1 6 13 0.65536000000000000000e5 +13 1 7 14 -0.13107200000000000000e6 +13 1 18 19 0.65536000000000000000e5 +13 3 5 18 -0.65536000000000000000e5 +13 3 6 11 0.65536000000000000000e5 +13 3 7 12 0.65536000000000000000e5 +13 4 4 8 0.65536000000000000000e5 +14 1 4 19 0.65536000000000000000e5 +14 1 5 12 -0.65536000000000000000e5 +14 1 5 20 0.65536000000000000000e5 +14 1 6 13 0.65536000000000000000e5 +14 1 7 14 -0.13107200000000000000e6 +14 2 3 9 0.65536000000000000000e5 +14 2 4 10 -0.65536000000000000000e5 +14 3 1 14 0.65536000000000000000e5 +14 3 5 18 -0.65536000000000000000e5 +14 3 5 20 -0.65536000000000000000e5 +14 3 6 11 0.65536000000000000000e5 +14 3 7 12 0.65536000000000000000e5 +15 1 1 20 0.13107200000000000000e6 +15 1 2 17 -0.13107200000000000000e6 +15 1 3 18 -0.13107200000000000000e6 +15 1 4 19 -0.26214400000000000000e6 +15 1 5 20 -0.26214400000000000000e6 +15 1 6 13 -0.13107200000000000000e6 +15 1 7 14 0.52428800000000000000e6 +15 1 11 18 -0.65536000000000000000e5 +15 1 13 20 -0.65536000000000000000e5 +15 1 17 20 0.65536000000000000000e5 +15 1 18 19 0.13107200000000000000e6 +15 1 19 20 -0.13107200000000000000e6 +15 2 3 9 -0.26214400000000000000e6 +15 2 8 10 -0.65536000000000000000e5 +15 3 2 15 -0.13107200000000000000e6 +15 3 5 18 -0.13107200000000000000e6 +15 3 6 11 -0.26214400000000000000e6 +15 3 7 12 -0.26214400000000000000e6 +15 3 11 12 -0.13107200000000000000e6 +15 3 12 17 0.65536000000000000000e5 +15 3 13 14 -0.13107200000000000000e6 +15 3 17 18 -0.65536000000000000000e5 +15 4 7 7 -0.26214400000000000000e6 +15 4 10 10 -0.13107200000000000000e6 +16 1 1 20 -0.65536000000000000000e5 +16 1 2 17 0.65536000000000000000e5 +16 1 3 18 0.65536000000000000000e5 +16 1 4 19 0.13107200000000000000e6 +16 1 5 20 0.13107200000000000000e6 +16 1 7 14 -0.26214400000000000000e6 +16 1 13 20 0.65536000000000000000e5 +16 2 3 9 0.13107200000000000000e6 +16 3 2 15 0.13107200000000000000e6 +16 3 6 11 0.13107200000000000000e6 +16 3 7 12 0.13107200000000000000e6 +16 3 11 12 0.65536000000000000000e5 +16 4 7 7 0.13107200000000000000e6 +17 1 1 20 -0.65536000000000000000e5 +17 1 2 17 0.65536000000000000000e5 +17 1 3 18 0.65536000000000000000e5 +17 1 4 19 0.26214400000000000000e6 +17 1 5 20 0.13107200000000000000e6 +17 1 6 13 0.26214400000000000000e6 +17 1 7 14 -0.52428800000000000000e6 +17 1 11 18 0.65536000000000000000e5 +17 2 3 9 0.26214400000000000000e6 +17 3 6 11 0.26214400000000000000e6 +17 3 7 12 0.26214400000000000000e6 +17 3 11 12 0.65536000000000000000e5 +17 3 12 17 -0.65536000000000000000e5 +17 4 7 7 0.13107200000000000000e6 +18 1 1 20 0.13107200000000000000e6 +18 1 2 17 -0.65536000000000000000e5 +18 1 3 18 -0.65536000000000000000e5 +18 1 4 19 -0.13107200000000000000e6 +18 1 5 12 -0.13107200000000000000e6 +18 1 5 20 -0.13107200000000000000e6 +18 1 7 14 0.26214400000000000000e6 +18 1 13 20 -0.65536000000000000000e5 +18 2 3 9 -0.13107200000000000000e6 +18 2 10 10 -0.13107200000000000000e6 +18 3 1 14 0.13107200000000000000e6 +18 3 2 15 -0.13107200000000000000e6 +18 3 5 18 -0.13107200000000000000e6 +18 3 5 20 -0.13107200000000000000e6 +18 3 6 11 -0.13107200000000000000e6 +18 3 7 12 -0.13107200000000000000e6 +18 3 11 12 -0.65536000000000000000e5 +18 3 12 17 0.65536000000000000000e5 +18 4 7 7 -0.13107200000000000000e6 +19 1 8 9 -0.13107200000000000000e6 +19 1 10 17 0.65536000000000000000e5 +19 1 16 19 0.65536000000000000000e5 +19 3 5 10 0.13107200000000000000e6 +20 1 2 9 -0.65536000000000000000e5 +20 1 3 10 0.13107200000000000000e6 +20 1 8 15 -0.13107200000000000000e6 +20 2 6 8 -0.65536000000000000000e5 +20 3 2 15 -0.32768000000000000000e5 +20 3 3 8 -0.65536000000000000000e5 +20 3 3 16 -0.65536000000000000000e5 +20 3 6 7 -0.65536000000000000000e5 +20 3 6 11 -0.32768000000000000000e5 +20 3 6 19 -0.65536000000000000000e5 +20 3 7 12 -0.32768000000000000000e5 +20 4 2 6 -0.65536000000000000000e5 +20 4 4 8 -0.32768000000000000000e5 +21 1 4 19 -0.32768000000000000000e5 +21 1 5 12 0.32768000000000000000e5 +21 1 5 16 -0.13107200000000000000e6 +21 1 7 14 0.13107200000000000000e6 +21 2 3 9 -0.32768000000000000000e5 +21 2 4 10 0.32768000000000000000e5 +21 3 1 14 -0.32768000000000000000e5 +21 3 2 15 -0.65536000000000000000e5 +21 3 6 11 -0.65536000000000000000e5 +21 3 7 12 -0.65536000000000000000e5 +21 3 11 16 -0.65536000000000000000e5 +21 4 4 8 -0.32768000000000000000e5 +22 1 4 19 0.65536000000000000000e5 +22 1 18 19 -0.65536000000000000000e5 +22 3 3 16 -0.13107200000000000000e6 +22 3 6 19 -0.13107200000000000000e6 +22 3 7 20 0.65536000000000000000e5 +22 3 15 20 0.65536000000000000000e5 +23 1 4 19 0.65536000000000000000e5 +23 1 6 13 0.65536000000000000000e5 +23 1 7 14 -0.13107200000000000000e6 +23 3 2 15 -0.65536000000000000000e5 +23 3 13 14 -0.65536000000000000000e5 +24 1 2 9 -0.13107200000000000000e6 +24 1 3 10 0.26214400000000000000e6 +24 1 4 19 -0.65536000000000000000e5 +24 1 7 14 0.13107200000000000000e6 +24 1 8 15 -0.26214400000000000000e6 +24 2 3 9 -0.65536000000000000000e5 +24 3 2 15 -0.65536000000000000000e5 +24 3 3 8 -0.13107200000000000000e6 +24 3 5 18 -0.65536000000000000000e5 +24 3 6 7 -0.13107200000000000000e6 +24 3 6 11 -0.65536000000000000000e5 +24 3 7 12 -0.65536000000000000000e5 +24 4 2 6 -0.13107200000000000000e6 +25 1 1 16 -0.13107200000000000000e6 +25 1 5 12 0.65536000000000000000e5 +25 1 5 20 0.65536000000000000000e5 +25 3 1 14 -0.65536000000000000000e5 +26 1 1 20 0.13107200000000000000e6 +26 1 2 17 -0.13107200000000000000e6 +26 1 3 18 -0.13107200000000000000e6 +26 1 4 19 -0.26214400000000000000e6 +26 1 5 20 -0.26214400000000000000e6 +26 1 6 13 -0.13107200000000000000e6 +26 1 7 14 0.52428800000000000000e6 +26 1 11 18 -0.65536000000000000000e5 +26 1 13 20 -0.65536000000000000000e5 +26 1 17 20 0.65536000000000000000e5 +26 1 18 19 0.13107200000000000000e6 +26 1 19 20 -0.13107200000000000000e6 +26 2 3 9 -0.26214400000000000000e6 +26 2 8 10 -0.65536000000000000000e5 +26 3 2 15 -0.13107200000000000000e6 +26 3 4 17 0.65536000000000000000e5 +26 3 5 18 -0.13107200000000000000e6 +26 3 6 11 -0.26214400000000000000e6 +26 3 7 12 -0.39321600000000000000e6 +26 3 11 12 -0.13107200000000000000e6 +26 3 12 17 0.65536000000000000000e5 +26 3 13 14 -0.13107200000000000000e6 +26 3 13 18 0.65536000000000000000e5 +26 3 17 18 -0.65536000000000000000e5 +26 4 7 7 -0.26214400000000000000e6 +26 4 10 10 -0.13107200000000000000e6 +27 1 1 20 0.65536000000000000000e5 +27 1 2 17 -0.65536000000000000000e5 +27 1 4 19 -0.13107200000000000000e6 +27 1 5 20 -0.13107200000000000000e6 +27 1 6 13 -0.13107200000000000000e6 +27 1 7 14 0.26214400000000000000e6 +27 1 11 18 -0.65536000000000000000e5 +27 2 3 9 -0.13107200000000000000e6 +27 2 8 10 -0.65536000000000000000e5 +27 3 2 15 -0.13107200000000000000e6 +27 3 5 18 -0.13107200000000000000e6 +27 3 6 11 -0.13107200000000000000e6 +27 3 7 12 -0.13107200000000000000e6 +27 3 11 12 -0.65536000000000000000e5 +27 4 7 7 -0.13107200000000000000e6 +28 1 1 20 -0.65536000000000000000e5 +28 1 2 17 0.65536000000000000000e5 +28 1 3 18 0.65536000000000000000e5 +28 1 4 19 0.26214400000000000000e6 +28 1 5 20 0.13107200000000000000e6 +28 1 6 13 0.26214400000000000000e6 +28 1 7 14 -0.52428800000000000000e6 +28 1 11 18 0.65536000000000000000e5 +28 2 3 9 0.26214400000000000000e6 +28 3 6 11 0.13107200000000000000e6 +28 3 7 12 0.26214400000000000000e6 +28 3 11 12 0.13107200000000000000e6 +28 4 7 7 0.13107200000000000000e6 +29 1 2 17 0.65536000000000000000e5 +29 1 5 12 -0.13107200000000000000e6 +29 1 11 18 0.65536000000000000000e5 +30 1 1 16 -0.26214400000000000000e6 +30 1 1 20 0.65536000000000000000e5 +30 1 2 17 -0.65536000000000000000e5 +30 1 4 19 -0.13107200000000000000e6 +30 1 5 12 0.26214400000000000000e6 +30 1 6 13 -0.13107200000000000000e6 +30 1 7 14 0.26214400000000000000e6 +30 1 11 18 -0.65536000000000000000e5 +30 2 1 9 0.13107200000000000000e6 +30 2 3 9 -0.13107200000000000000e6 +30 2 7 7 -0.13107200000000000000e6 +30 3 1 14 -0.13107200000000000000e6 +30 3 7 12 -0.13107200000000000000e6 +30 3 11 12 -0.65536000000000000000e5 +31 1 9 16 0.65536000000000000000e5 +31 1 10 19 -0.65536000000000000000e5 +31 3 5 10 -0.65536000000000000000e5 +31 3 7 10 -0.65536000000000000000e5 +31 3 8 9 -0.65536000000000000000e5 +31 3 10 19 0.65536000000000000000e5 +31 4 6 6 -0.13107200000000000000e6 +32 1 1 16 0.16384000000000000000e5 +32 1 2 5 -0.81920000000000000000e4 +32 1 3 10 -0.98304000000000000000e5 +32 1 4 19 0.81920000000000000000e4 +32 1 5 8 -0.32768000000000000000e5 +32 1 5 12 -0.81920000000000000000e4 +32 1 5 16 -0.32768000000000000000e5 +32 1 6 13 0.81920000000000000000e4 +32 1 7 14 -0.16384000000000000000e5 +32 1 8 15 0.65536000000000000000e5 +32 1 9 16 -0.65536000000000000000e5 +32 1 10 19 0.65536000000000000000e5 +32 2 2 4 -0.81920000000000000000e4 +32 2 3 9 0.81920000000000000000e4 +32 2 4 6 -0.32768000000000000000e5 +32 2 6 6 -0.13107200000000000000e6 +32 3 2 7 0.81920000000000000000e4 +32 3 3 8 0.16384000000000000000e5 +32 3 5 10 -0.65536000000000000000e5 +32 3 6 7 0.32768000000000000000e5 +32 3 7 12 0.81920000000000000000e4 +32 3 8 9 -0.65536000000000000000e5 +32 4 1 5 0.81920000000000000000e4 +32 4 2 6 0.32768000000000000000e5 +32 4 4 4 -0.32768000000000000000e5 +33 3 8 9 -0.13107200000000000000e6 +33 3 9 14 0.65536000000000000000e5 +33 3 15 16 0.65536000000000000000e5 +34 1 8 9 -0.13107200000000000000e6 +34 1 8 15 0.65536000000000000000e5 +34 1 10 13 0.65536000000000000000e5 +34 3 9 14 -0.65536000000000000000e5 +35 1 1 16 0.32768000000000000000e5 +35 1 2 5 -0.16384000000000000000e5 +35 1 3 10 -0.19660800000000000000e6 +35 1 4 19 0.16384000000000000000e5 +35 1 5 8 -0.65536000000000000000e5 +35 1 5 12 -0.16384000000000000000e5 +35 1 6 13 0.16384000000000000000e5 +35 1 7 14 -0.32768000000000000000e5 +35 1 8 15 0.13107200000000000000e6 +35 1 10 17 0.65536000000000000000e5 +35 2 2 4 -0.16384000000000000000e5 +35 2 3 9 0.16384000000000000000e5 +35 2 4 6 -0.65536000000000000000e5 +35 3 2 7 0.16384000000000000000e5 +35 3 3 8 0.32768000000000000000e5 +35 3 6 7 0.65536000000000000000e5 +35 3 7 12 0.16384000000000000000e5 +35 4 1 5 0.16384000000000000000e5 +35 4 2 6 0.65536000000000000000e5 +35 4 4 4 -0.65536000000000000000e5 +36 1 10 13 0.13107200000000000000e6 +36 1 16 19 -0.13107200000000000000e6 +36 3 3 8 -0.65536000000000000000e5 +36 3 3 16 0.65536000000000000000e5 +36 3 4 9 -0.65536000000000000000e5 +36 3 6 7 -0.65536000000000000000e5 +36 3 6 19 -0.65536000000000000000e5 +36 3 9 14 -0.13107200000000000000e6 +36 3 11 16 -0.65536000000000000000e5 +36 4 5 5 -0.13107200000000000000e6 +36 4 6 10 -0.65536000000000000000e5 +37 1 2 9 -0.65536000000000000000e5 +37 2 6 8 -0.65536000000000000000e5 +37 3 3 8 -0.65536000000000000000e5 +37 3 3 16 -0.65536000000000000000e5 +37 3 6 7 -0.65536000000000000000e5 +37 4 2 6 -0.65536000000000000000e5 +38 1 1 16 0.65536000000000000000e5 +38 1 2 5 -0.32768000000000000000e5 +38 1 2 9 0.65536000000000000000e5 +38 1 3 10 -0.39321600000000000000e6 +38 1 4 19 0.32768000000000000000e5 +38 1 5 12 -0.32768000000000000000e5 +38 1 5 16 -0.13107200000000000000e6 +38 1 6 13 0.32768000000000000000e5 +38 1 8 15 0.39321600000000000000e6 +38 2 2 4 -0.32768000000000000000e5 +38 2 3 9 0.32768000000000000000e5 +38 3 2 7 0.32768000000000000000e5 +38 3 2 15 -0.32768000000000000000e5 +38 3 3 8 0.13107200000000000000e6 +38 3 6 7 0.19660800000000000000e6 +38 3 6 11 -0.32768000000000000000e5 +38 4 1 5 0.32768000000000000000e5 +38 4 2 6 0.19660800000000000000e6 +38 4 4 4 -0.13107200000000000000e6 +38 4 4 8 -0.32768000000000000000e5 +39 1 1 16 0.65536000000000000000e5 +39 1 4 19 -0.32768000000000000000e5 +39 1 5 8 -0.13107200000000000000e6 +39 1 5 12 0.32768000000000000000e5 +39 1 7 14 0.65536000000000000000e5 +39 2 3 9 -0.32768000000000000000e5 +39 2 4 10 0.32768000000000000000e5 +39 3 1 14 -0.32768000000000000000e5 +39 3 2 15 -0.32768000000000000000e5 +39 3 6 11 -0.32768000000000000000e5 +39 3 7 12 -0.32768000000000000000e5 +40 1 4 19 0.65536000000000000000e5 +40 1 18 19 -0.65536000000000000000e5 +40 3 3 16 -0.13107200000000000000e6 +40 3 4 19 0.65536000000000000000e5 +40 3 6 7 -0.13107200000000000000e6 +40 3 6 19 -0.13107200000000000000e6 +40 3 7 12 0.65536000000000000000e5 +40 3 7 20 0.65536000000000000000e5 +40 3 15 20 0.65536000000000000000e5 +41 1 4 19 0.65536000000000000000e5 +41 1 6 13 0.65536000000000000000e5 +41 1 7 14 -0.13107200000000000000e6 +41 3 3 8 -0.13107200000000000000e6 +42 1 2 9 -0.13107200000000000000e6 +42 1 4 19 -0.65536000000000000000e5 +42 1 7 14 0.13107200000000000000e6 +42 2 3 9 -0.65536000000000000000e5 +42 3 2 15 -0.65536000000000000000e5 +42 3 7 12 -0.65536000000000000000e5 +43 1 2 5 -0.65536000000000000000e5 +43 1 3 10 -0.26214400000000000000e6 +43 1 8 15 0.26214400000000000000e6 +43 2 2 4 -0.65536000000000000000e5 +43 3 2 7 0.65536000000000000000e5 +43 3 3 8 0.13107200000000000000e6 +43 3 6 7 0.13107200000000000000e6 +43 3 6 11 -0.65536000000000000000e5 +43 4 1 5 0.65536000000000000000e5 +43 4 2 6 0.13107200000000000000e6 +44 1 1 8 -0.13107200000000000000e6 +44 1 1 16 0.13107200000000000000e6 +44 1 4 19 0.65536000000000000000e5 +44 1 6 13 0.65536000000000000000e5 +44 1 7 14 -0.13107200000000000000e6 +44 2 1 9 -0.65536000000000000000e5 +44 2 3 9 0.65536000000000000000e5 +44 3 1 14 -0.65536000000000000000e5 +44 3 7 12 0.65536000000000000000e5 +45 1 1 20 0.65536000000000000000e5 +45 1 3 18 -0.65536000000000000000e5 +45 1 4 7 -0.13107200000000000000e6 +45 1 4 19 0.13107200000000000000e6 +45 1 5 20 -0.13107200000000000000e6 +45 1 6 13 0.13107200000000000000e6 +45 1 13 20 -0.65536000000000000000e5 +45 1 17 20 0.65536000000000000000e5 +45 1 18 19 0.13107200000000000000e6 +45 1 19 20 -0.13107200000000000000e6 +45 2 2 8 0.65536000000000000000e5 +45 2 8 10 -0.65536000000000000000e5 +45 3 2 11 0.65536000000000000000e5 +45 3 5 18 -0.13107200000000000000e6 +45 3 6 11 -0.13107200000000000000e6 +45 3 12 17 0.65536000000000000000e5 +45 3 13 18 0.65536000000000000000e5 +45 3 17 18 -0.65536000000000000000e5 +45 4 3 7 -0.65536000000000000000e5 +45 4 7 7 -0.13107200000000000000e6 +45 4 8 8 -0.13107200000000000000e6 +45 4 10 10 -0.13107200000000000000e6 +46 1 1 20 0.65536000000000000000e5 +46 1 2 17 -0.13107200000000000000e6 +46 1 3 18 -0.65536000000000000000e5 +46 1 4 11 -0.65536000000000000000e5 +46 1 4 19 -0.26214400000000000000e6 +46 1 5 20 -0.13107200000000000000e6 +46 1 6 13 -0.26214400000000000000e6 +46 1 7 14 0.52428800000000000000e6 +46 1 11 18 -0.65536000000000000000e5 +46 2 2 8 -0.65536000000000000000e5 +46 2 3 9 -0.26214400000000000000e6 +46 2 8 10 -0.65536000000000000000e5 +46 3 2 7 -0.13107200000000000000e6 +46 3 2 11 -0.65536000000000000000e5 +46 3 2 15 -0.13107200000000000000e6 +46 3 4 17 0.65536000000000000000e5 +46 3 5 18 -0.13107200000000000000e6 +46 3 6 11 -0.13107200000000000000e6 +46 3 7 12 -0.26214400000000000000e6 +46 3 11 12 -0.65536000000000000000e5 +46 4 7 7 -0.13107200000000000000e6 +47 1 3 10 -0.52428800000000000000e6 +47 1 3 18 0.65536000000000000000e5 +47 1 4 11 0.65536000000000000000e5 +47 1 4 19 0.13107200000000000000e6 +47 1 6 13 0.13107200000000000000e6 +47 1 7 14 -0.26214400000000000000e6 +47 1 8 15 0.52428800000000000000e6 +47 2 3 9 0.13107200000000000000e6 +47 3 1 6 0.13107200000000000000e6 +47 3 2 7 0.13107200000000000000e6 +47 3 3 8 0.26214400000000000000e6 +47 3 6 7 0.26214400000000000000e6 +47 3 7 12 0.13107200000000000000e6 +47 4 1 5 0.13107200000000000000e6 +47 4 2 6 0.26214400000000000000e6 +48 1 2 17 0.65536000000000000000e5 +48 1 5 12 -0.13107200000000000000e6 +48 1 11 18 0.65536000000000000000e5 +48 3 1 6 -0.13107200000000000000e6 +48 3 2 11 0.65536000000000000000e5 +48 3 11 12 0.65536000000000000000e5 +49 1 1 4 -0.65536000000000000000e5 +49 1 2 5 -0.13107200000000000000e6 +49 1 2 17 0.65536000000000000000e5 +49 1 4 11 -0.65536000000000000000e5 +49 1 5 12 0.13107200000000000000e6 +49 2 1 3 -0.65536000000000000000e5 +49 3 1 2 -0.65536000000000000000e5 +49 3 1 6 0.13107200000000000000e6 +49 3 2 3 -0.65536000000000000000e5 +50 1 1 1 0.13107200000000000000e6 +50 1 1 4 -0.13107200000000000000e6 +50 1 1 16 -0.26214400000000000000e6 +50 1 2 5 0.13107200000000000000e6 +50 1 2 17 0.13107200000000000000e6 +50 1 4 11 -0.65536000000000000000e5 +50 1 4 19 -0.13107200000000000000e6 +50 1 5 12 0.13107200000000000000e6 +50 1 6 13 -0.13107200000000000000e6 +50 1 7 14 0.26214400000000000000e6 +50 1 11 18 0.65536000000000000000e5 +50 2 1 1 0.13107200000000000000e6 +50 2 1 3 -0.65536000000000000000e5 +50 2 1 9 0.13107200000000000000e6 +50 2 3 9 -0.13107200000000000000e6 +50 2 7 7 0.13107200000000000000e6 +50 3 1 2 -0.65536000000000000000e5 +50 3 1 6 0.13107200000000000000e6 +50 3 1 14 0.13107200000000000000e6 +50 3 2 3 -0.65536000000000000000e5 +50 3 2 11 0.65536000000000000000e5 +50 3 7 12 -0.13107200000000000000e6 +50 3 11 12 0.65536000000000000000e5 +50 4 1 1 -0.13107200000000000000e6 +51 1 1 2 0.13107200000000000000e6 +51 1 2 5 -0.26214400000000000000e6 +51 1 4 11 -0.13107200000000000000e6 +51 1 5 12 0.26214400000000000000e6 +51 2 1 3 -0.13107200000000000000e6 +51 2 1 7 0.13107200000000000000e6 +51 3 1 6 0.26214400000000000000e6 +51 3 2 3 -0.13107200000000000000e6 +51 4 1 1 0.26214400000000000000e6 +52 1 1 3 0.13107200000000000000e6 +52 1 1 4 0.13107200000000000000e6 +52 1 4 11 0.13107200000000000000e6 +52 1 5 12 -0.26214400000000000000e6 +52 2 1 3 0.13107200000000000000e6 +52 3 1 6 -0.26214400000000000000e6 +52 3 2 3 0.13107200000000000000e6 +53 1 1 4 -0.65536000000000000000e5 +53 1 1 5 0.13107200000000000000e6 +53 1 1 16 -0.26214400000000000000e6 +53 1 2 17 0.13107200000000000000e6 +53 1 4 11 -0.65536000000000000000e5 +53 1 4 19 -0.13107200000000000000e6 +53 1 5 12 0.13107200000000000000e6 +53 1 6 13 -0.13107200000000000000e6 +53 1 7 14 0.26214400000000000000e6 +53 1 11 18 0.65536000000000000000e5 +53 2 1 3 -0.65536000000000000000e5 +53 2 1 7 0.65536000000000000000e5 +53 2 1 9 0.13107200000000000000e6 +53 2 3 9 -0.13107200000000000000e6 +53 2 7 7 0.13107200000000000000e6 +53 3 1 2 -0.65536000000000000000e5 +53 3 1 6 0.13107200000000000000e6 +53 3 1 14 0.13107200000000000000e6 +53 3 2 3 -0.65536000000000000000e5 +53 3 2 11 0.65536000000000000000e5 +53 3 7 12 -0.13107200000000000000e6 +53 3 11 12 0.65536000000000000000e5 +54 1 1 6 0.13107200000000000000e6 +54 1 2 5 -0.13107200000000000000e6 +55 1 1 7 0.13107200000000000000e6 +55 1 5 12 -0.13107200000000000000e6 +55 3 1 6 -0.13107200000000000000e6 +56 1 1 9 0.13107200000000000000e6 +56 1 2 5 -0.65536000000000000000e5 +56 1 3 10 -0.26214400000000000000e6 +56 1 4 19 0.65536000000000000000e5 +56 1 5 12 -0.65536000000000000000e5 +56 1 6 13 0.65536000000000000000e5 +56 1 7 14 -0.13107200000000000000e6 +56 1 8 15 0.26214400000000000000e6 +56 2 2 4 -0.65536000000000000000e5 +56 2 3 9 0.65536000000000000000e5 +56 3 2 7 0.65536000000000000000e5 +56 3 3 8 0.13107200000000000000e6 +56 3 6 7 0.13107200000000000000e6 +56 3 7 12 0.65536000000000000000e5 +56 4 1 5 0.65536000000000000000e5 +56 4 2 6 0.13107200000000000000e6 +57 1 1 10 0.13107200000000000000e6 +57 1 5 8 -0.13107200000000000000e6 +58 1 1 4 -0.13107200000000000000e6 +58 1 1 11 0.13107200000000000000e6 +58 1 1 16 -0.52428800000000000000e6 +58 1 2 17 0.13107200000000000000e6 +58 1 4 11 -0.13107200000000000000e6 +58 1 4 19 -0.26214400000000000000e6 +58 1 5 12 0.52428800000000000000e6 +58 1 6 13 -0.26214400000000000000e6 +58 1 7 14 0.52428800000000000000e6 +58 2 1 3 -0.13107200000000000000e6 +58 2 1 7 0.13107200000000000000e6 +58 2 1 9 0.26214400000000000000e6 +58 2 3 9 -0.26214400000000000000e6 +58 3 1 2 -0.13107200000000000000e6 +58 3 1 6 0.26214400000000000000e6 +58 3 2 3 -0.13107200000000000000e6 +58 3 2 11 0.13107200000000000000e6 +58 3 7 12 -0.26214400000000000000e6 +59 1 1 4 0.13107200000000000000e6 +59 1 1 12 0.13107200000000000000e6 +59 1 4 11 0.13107200000000000000e6 +59 1 5 12 -0.26214400000000000000e6 +59 2 1 3 0.13107200000000000000e6 +59 3 1 2 0.13107200000000000000e6 +59 3 1 6 -0.26214400000000000000e6 +59 3 2 3 0.13107200000000000000e6 +60 1 1 13 0.13107200000000000000e6 +60 1 2 17 -0.13107200000000000000e6 +60 3 2 11 -0.13107200000000000000e6 +61 1 1 14 0.13107200000000000000e6 +61 1 1 16 -0.26214400000000000000e6 +61 1 4 19 -0.13107200000000000000e6 +61 1 5 12 0.13107200000000000000e6 +61 1 6 13 -0.13107200000000000000e6 +61 1 7 14 0.26214400000000000000e6 +61 2 1 9 0.13107200000000000000e6 +61 2 3 9 -0.13107200000000000000e6 +61 3 7 12 -0.13107200000000000000e6 +62 1 1 15 0.13107200000000000000e6 +62 1 5 12 -0.13107200000000000000e6 +63 1 1 17 0.13107200000000000000e6 +63 1 2 17 0.13107200000000000000e6 +63 1 5 12 -0.26214400000000000000e6 +63 1 11 18 0.13107200000000000000e6 +63 2 7 7 0.26214400000000000000e6 +63 3 1 14 0.26214400000000000000e6 +63 3 11 12 0.13107200000000000000e6 +64 1 1 18 0.13107200000000000000e6 +64 1 2 17 -0.13107200000000000000e6 +65 1 1 19 0.13107200000000000000e6 +65 1 5 12 -0.13107200000000000000e6 +65 3 1 14 0.13107200000000000000e6 +66 1 1 4 0.65536000000000000000e5 +66 1 2 2 0.13107200000000000000e6 +66 1 4 11 0.65536000000000000000e5 +66 1 5 12 -0.13107200000000000000e6 +66 2 1 3 0.65536000000000000000e5 +66 3 1 6 -0.13107200000000000000e6 +66 3 2 3 0.65536000000000000000e5 +67 1 1 4 -0.13107200000000000000e6 +67 1 2 3 0.13107200000000000000e6 +68 1 2 4 0.13107200000000000000e6 +68 1 4 11 -0.13107200000000000000e6 +68 3 2 3 -0.13107200000000000000e6 +69 1 2 6 0.13107200000000000000e6 +69 1 5 12 -0.13107200000000000000e6 +69 3 1 6 -0.13107200000000000000e6 +70 1 2 7 0.13107200000000000000e6 +70 1 3 10 -0.52428800000000000000e6 +70 1 4 19 0.13107200000000000000e6 +70 1 6 13 0.13107200000000000000e6 +70 1 7 14 -0.26214400000000000000e6 +70 1 8 15 0.52428800000000000000e6 +70 2 3 9 0.13107200000000000000e6 +70 3 1 6 0.13107200000000000000e6 +70 3 2 7 0.13107200000000000000e6 +70 3 3 8 0.26214400000000000000e6 +70 3 6 7 0.26214400000000000000e6 +70 3 7 12 0.13107200000000000000e6 +70 4 1 5 0.13107200000000000000e6 +70 4 2 6 0.26214400000000000000e6 +71 1 2 5 -0.65536000000000000000e5 +71 1 2 8 0.13107200000000000000e6 +71 1 3 10 -0.26214400000000000000e6 +71 1 4 19 0.65536000000000000000e5 +71 1 5 12 -0.65536000000000000000e5 +71 1 6 13 0.65536000000000000000e5 +71 1 7 14 -0.13107200000000000000e6 +71 1 8 15 0.26214400000000000000e6 +71 2 2 4 -0.65536000000000000000e5 +71 2 3 9 0.65536000000000000000e5 +71 3 2 7 0.65536000000000000000e5 +71 3 3 8 0.13107200000000000000e6 +71 3 6 7 0.13107200000000000000e6 +71 3 7 12 0.65536000000000000000e5 +71 4 1 5 0.65536000000000000000e5 +71 4 2 6 0.13107200000000000000e6 +72 1 1 16 0.65536000000000000000e5 +72 1 2 5 -0.32768000000000000000e5 +72 1 2 10 0.13107200000000000000e6 +72 1 3 10 -0.26214400000000000000e6 +72 1 4 19 0.32768000000000000000e5 +72 1 5 12 -0.32768000000000000000e5 +72 1 5 16 -0.13107200000000000000e6 +72 1 6 13 0.32768000000000000000e5 +72 1 7 14 -0.65536000000000000000e5 +72 1 8 15 0.26214400000000000000e6 +72 2 2 4 -0.32768000000000000000e5 +72 2 3 9 0.32768000000000000000e5 +72 3 2 7 0.32768000000000000000e5 +72 3 3 8 0.65536000000000000000e5 +72 3 6 7 0.13107200000000000000e6 +72 3 7 12 0.32768000000000000000e5 +72 4 1 5 0.32768000000000000000e5 +72 4 2 6 0.13107200000000000000e6 +72 4 4 4 -0.13107200000000000000e6 +73 1 1 4 0.13107200000000000000e6 +73 1 2 11 0.13107200000000000000e6 +73 1 4 11 0.13107200000000000000e6 +73 1 5 12 -0.26214400000000000000e6 +73 2 1 3 0.13107200000000000000e6 +73 3 1 2 0.13107200000000000000e6 +73 3 1 6 -0.26214400000000000000e6 +73 3 2 3 0.13107200000000000000e6 +74 1 2 12 0.13107200000000000000e6 +74 1 2 17 -0.13107200000000000000e6 +74 3 2 11 -0.13107200000000000000e6 +75 1 2 13 0.13107200000000000000e6 +75 1 4 11 -0.13107200000000000000e6 +76 1 2 14 0.13107200000000000000e6 +76 1 5 12 -0.13107200000000000000e6 +77 1 2 15 0.13107200000000000000e6 +77 1 4 19 0.13107200000000000000e6 +77 1 6 13 0.13107200000000000000e6 +77 1 7 14 -0.26214400000000000000e6 +77 2 3 9 0.13107200000000000000e6 +77 3 7 12 0.13107200000000000000e6 +78 1 2 9 -0.13107200000000000000e6 +78 1 2 16 0.13107200000000000000e6 +78 1 3 10 0.26214400000000000000e6 +78 1 8 15 -0.26214400000000000000e6 +78 3 3 8 -0.13107200000000000000e6 +78 3 6 7 -0.13107200000000000000e6 +78 4 2 6 -0.13107200000000000000e6 +79 1 2 18 0.13107200000000000000e6 +79 1 11 18 -0.13107200000000000000e6 +79 3 11 12 -0.13107200000000000000e6 +80 1 2 19 0.13107200000000000000e6 +80 1 4 19 0.13107200000000000000e6 +80 1 6 13 0.13107200000000000000e6 +80 1 7 14 -0.26214400000000000000e6 +80 2 3 9 0.13107200000000000000e6 +80 3 6 11 0.13107200000000000000e6 +80 3 7 12 0.13107200000000000000e6 +81 1 2 20 0.13107200000000000000e6 +81 1 11 18 -0.13107200000000000000e6 +82 1 3 3 0.13107200000000000000e6 +82 1 4 11 -0.65536000000000000000e5 +82 3 2 3 -0.65536000000000000000e5 +83 1 1 4 0.13107200000000000000e6 +83 1 3 4 0.13107200000000000000e6 +83 1 3 10 -0.10485760000000000000e7 +83 1 4 11 0.13107200000000000000e6 +83 1 4 19 0.26214400000000000000e6 +83 1 6 13 0.26214400000000000000e6 +83 1 7 14 -0.52428800000000000000e6 +83 1 8 15 0.10485760000000000000e7 +83 2 2 8 0.13107200000000000000e6 +83 2 3 9 0.26214400000000000000e6 +83 3 1 6 0.26214400000000000000e6 +83 3 2 3 0.13107200000000000000e6 +83 3 2 7 0.26214400000000000000e6 +83 3 3 8 0.52428800000000000000e6 +83 3 6 7 0.52428800000000000000e6 +83 3 7 12 0.26214400000000000000e6 +83 4 1 5 0.26214400000000000000e6 +83 4 2 2 0.26214400000000000000e6 +83 4 2 6 0.52428800000000000000e6 +84 1 3 5 0.13107200000000000000e6 +84 1 5 12 -0.13107200000000000000e6 +84 3 1 6 -0.13107200000000000000e6 +85 1 3 6 0.13107200000000000000e6 +85 1 3 10 -0.52428800000000000000e6 +85 1 4 19 0.13107200000000000000e6 +85 1 6 13 0.13107200000000000000e6 +85 1 7 14 -0.26214400000000000000e6 +85 1 8 15 0.52428800000000000000e6 +85 2 3 9 0.13107200000000000000e6 +85 3 1 6 0.13107200000000000000e6 +85 3 2 7 0.13107200000000000000e6 +85 3 3 8 0.26214400000000000000e6 +85 3 6 7 0.26214400000000000000e6 +85 3 7 12 0.13107200000000000000e6 +85 4 1 5 0.13107200000000000000e6 +85 4 2 6 0.26214400000000000000e6 +86 1 3 7 0.13107200000000000000e6 +86 1 6 13 -0.13107200000000000000e6 +86 3 2 7 -0.13107200000000000000e6 +87 1 2 9 -0.13107200000000000000e6 +87 1 3 8 0.13107200000000000000e6 +88 1 3 9 0.13107200000000000000e6 +88 1 7 14 -0.13107200000000000000e6 +88 3 3 8 -0.13107200000000000000e6 +89 1 2 17 -0.13107200000000000000e6 +89 1 3 11 0.13107200000000000000e6 +89 3 2 11 -0.13107200000000000000e6 +90 1 3 12 0.13107200000000000000e6 +90 1 4 11 -0.13107200000000000000e6 +91 1 2 17 0.13107200000000000000e6 +91 1 3 13 0.13107200000000000000e6 +91 1 4 11 0.13107200000000000000e6 +91 1 4 19 0.26214400000000000000e6 +91 1 6 13 0.26214400000000000000e6 +91 1 7 14 -0.52428800000000000000e6 +91 2 2 8 0.13107200000000000000e6 +91 2 3 9 0.26214400000000000000e6 +91 3 2 11 0.13107200000000000000e6 +91 3 7 12 0.26214400000000000000e6 +92 1 3 14 0.13107200000000000000e6 +92 1 4 19 0.13107200000000000000e6 +92 1 6 13 0.13107200000000000000e6 +92 1 7 14 -0.26214400000000000000e6 +92 2 3 9 0.13107200000000000000e6 +92 3 7 12 0.13107200000000000000e6 +93 1 3 15 0.13107200000000000000e6 +93 1 6 13 -0.13107200000000000000e6 +94 1 3 16 0.13107200000000000000e6 +94 1 7 14 -0.13107200000000000000e6 +95 1 3 17 0.13107200000000000000e6 +95 1 11 18 -0.13107200000000000000e6 +95 3 11 12 -0.13107200000000000000e6 +96 1 3 19 0.13107200000000000000e6 +96 1 6 13 -0.13107200000000000000e6 +96 3 2 15 0.13107200000000000000e6 +97 1 1 20 0.13107200000000000000e6 +97 1 2 17 -0.13107200000000000000e6 +97 1 3 18 -0.13107200000000000000e6 +97 1 3 20 0.13107200000000000000e6 +97 1 4 19 -0.26214400000000000000e6 +97 1 5 20 -0.26214400000000000000e6 +97 1 6 13 -0.26214400000000000000e6 +97 1 7 14 0.52428800000000000000e6 +97 2 3 9 -0.26214400000000000000e6 +97 3 6 11 -0.26214400000000000000e6 +97 3 7 12 -0.26214400000000000000e6 +97 3 11 12 -0.13107200000000000000e6 +97 4 7 7 -0.26214400000000000000e6 +98 1 1 20 -0.65536000000000000000e5 +98 1 4 4 0.13107200000000000000e6 +98 1 5 20 0.13107200000000000000e6 +98 1 6 13 -0.13107200000000000000e6 +98 2 2 8 -0.65536000000000000000e5 +98 2 8 10 0.65536000000000000000e5 +98 3 2 11 -0.65536000000000000000e5 +98 3 3 4 -0.65536000000000000000e5 +98 3 4 17 -0.65536000000000000000e5 +98 3 5 18 0.13107200000000000000e6 +98 3 6 11 0.13107200000000000000e6 +98 4 3 7 0.65536000000000000000e5 +98 4 7 7 0.13107200000000000000e6 +99 1 3 10 -0.52428800000000000000e6 +99 1 4 5 0.13107200000000000000e6 +99 1 4 19 0.13107200000000000000e6 +99 1 6 13 0.13107200000000000000e6 +99 1 7 14 -0.26214400000000000000e6 +99 1 8 15 0.52428800000000000000e6 +99 2 3 9 0.13107200000000000000e6 +99 3 1 6 0.13107200000000000000e6 +99 3 2 7 0.13107200000000000000e6 +99 3 3 8 0.26214400000000000000e6 +99 3 6 7 0.26214400000000000000e6 +99 3 7 12 0.13107200000000000000e6 +99 4 1 5 0.13107200000000000000e6 +99 4 2 6 0.26214400000000000000e6 +100 1 4 6 0.13107200000000000000e6 +100 1 6 13 -0.13107200000000000000e6 +100 3 2 7 -0.13107200000000000000e6 +101 1 4 8 0.13107200000000000000e6 +101 1 7 14 -0.13107200000000000000e6 +101 3 3 8 -0.13107200000000000000e6 +102 1 2 9 0.13107200000000000000e6 +102 1 3 10 -0.26214400000000000000e6 +102 1 4 9 0.13107200000000000000e6 +102 1 7 14 0.13107200000000000000e6 +102 2 6 8 0.13107200000000000000e6 +102 3 3 8 0.13107200000000000000e6 +102 4 2 6 0.13107200000000000000e6 +103 1 4 10 0.13107200000000000000e6 +103 1 10 13 -0.13107200000000000000e6 +103 3 3 8 -0.65536000000000000000e5 +103 3 4 9 -0.65536000000000000000e5 +103 3 6 7 -0.65536000000000000000e5 +103 4 5 5 -0.13107200000000000000e6 +104 1 2 17 0.13107200000000000000e6 +104 1 4 11 0.13107200000000000000e6 +104 1 4 12 0.13107200000000000000e6 +104 1 4 19 0.26214400000000000000e6 +104 1 6 13 0.26214400000000000000e6 +104 1 7 14 -0.52428800000000000000e6 +104 2 2 8 0.13107200000000000000e6 +104 2 3 9 0.26214400000000000000e6 +104 3 2 11 0.13107200000000000000e6 +104 3 7 12 0.26214400000000000000e6 +105 1 1 20 -0.13107200000000000000e6 +105 1 4 13 0.13107200000000000000e6 +105 1 5 20 0.26214400000000000000e6 +105 1 6 13 -0.26214400000000000000e6 +105 2 2 8 -0.13107200000000000000e6 +105 2 8 10 0.13107200000000000000e6 +105 3 2 11 -0.13107200000000000000e6 +105 3 4 17 -0.13107200000000000000e6 +105 3 5 18 0.26214400000000000000e6 +105 3 6 11 0.26214400000000000000e6 +105 4 3 7 0.13107200000000000000e6 +105 4 7 7 0.26214400000000000000e6 +106 1 4 14 0.13107200000000000000e6 +106 1 6 13 -0.13107200000000000000e6 +107 1 4 15 0.13107200000000000000e6 +107 1 4 19 -0.13107200000000000000e6 +107 3 7 12 -0.13107200000000000000e6 +108 1 2 9 0.13107200000000000000e6 +108 1 3 10 -0.26214400000000000000e6 +108 1 4 16 0.13107200000000000000e6 +108 1 7 14 0.13107200000000000000e6 +108 2 6 8 0.13107200000000000000e6 +108 3 3 8 0.13107200000000000000e6 +108 3 6 7 0.13107200000000000000e6 +108 4 2 6 0.13107200000000000000e6 +109 1 3 18 -0.13107200000000000000e6 +109 1 4 17 0.13107200000000000000e6 +110 1 1 20 -0.13107200000000000000e6 +110 1 2 17 0.13107200000000000000e6 +110 1 3 18 0.13107200000000000000e6 +110 1 4 18 0.13107200000000000000e6 +110 1 4 19 0.26214400000000000000e6 +110 1 5 20 0.26214400000000000000e6 +110 1 7 14 -0.52428800000000000000e6 +110 1 11 18 0.13107200000000000000e6 +110 2 3 9 0.26214400000000000000e6 +110 2 8 10 0.13107200000000000000e6 +110 3 2 15 0.26214400000000000000e6 +110 3 4 17 -0.13107200000000000000e6 +110 3 5 18 0.26214400000000000000e6 +110 3 6 11 0.26214400000000000000e6 +110 3 7 12 0.26214400000000000000e6 +110 3 11 12 0.13107200000000000000e6 +110 4 7 7 0.26214400000000000000e6 +111 1 1 20 -0.13107200000000000000e6 +111 1 2 17 0.13107200000000000000e6 +111 1 3 18 0.13107200000000000000e6 +111 1 4 19 0.26214400000000000000e6 +111 1 4 20 0.13107200000000000000e6 +111 1 5 20 0.26214400000000000000e6 +111 1 7 14 -0.52428800000000000000e6 +111 1 11 18 0.13107200000000000000e6 +111 2 3 9 0.26214400000000000000e6 +111 2 8 10 0.13107200000000000000e6 +111 3 2 15 0.26214400000000000000e6 +111 3 5 18 0.26214400000000000000e6 +111 3 6 11 0.26214400000000000000e6 +111 3 7 12 0.26214400000000000000e6 +111 3 11 12 0.13107200000000000000e6 +111 4 7 7 0.26214400000000000000e6 +112 1 1 8 -0.65536000000000000000e5 +112 1 5 5 0.13107200000000000000e6 +113 1 2 5 -0.65536000000000000000e5 +113 1 3 10 -0.26214400000000000000e6 +113 1 4 19 0.65536000000000000000e5 +113 1 5 6 0.13107200000000000000e6 +113 1 5 12 -0.65536000000000000000e5 +113 1 6 13 0.65536000000000000000e5 +113 1 7 14 -0.13107200000000000000e6 +113 1 8 15 0.26214400000000000000e6 +113 2 2 4 -0.65536000000000000000e5 +113 2 3 9 0.65536000000000000000e5 +113 3 2 7 0.65536000000000000000e5 +113 3 3 8 0.13107200000000000000e6 +113 3 6 7 0.13107200000000000000e6 +113 3 7 12 0.65536000000000000000e5 +113 4 1 5 0.65536000000000000000e5 +113 4 2 6 0.13107200000000000000e6 +114 1 2 9 -0.13107200000000000000e6 +114 1 5 7 0.13107200000000000000e6 +115 1 1 16 0.65536000000000000000e5 +115 1 2 5 -0.32768000000000000000e5 +115 1 3 10 -0.26214400000000000000e6 +115 1 4 19 0.32768000000000000000e5 +115 1 5 9 0.13107200000000000000e6 +115 1 5 12 -0.32768000000000000000e5 +115 1 5 16 -0.13107200000000000000e6 +115 1 6 13 0.32768000000000000000e5 +115 1 7 14 -0.65536000000000000000e5 +115 1 8 15 0.26214400000000000000e6 +115 2 2 4 -0.32768000000000000000e5 +115 2 3 9 0.32768000000000000000e5 +115 3 2 7 0.32768000000000000000e5 +115 3 3 8 0.65536000000000000000e5 +115 3 6 7 0.13107200000000000000e6 +115 3 7 12 0.32768000000000000000e5 +115 4 1 5 0.32768000000000000000e5 +115 4 2 6 0.13107200000000000000e6 +115 4 4 4 -0.13107200000000000000e6 +116 1 1 16 0.32768000000000000000e5 +116 1 2 5 -0.16384000000000000000e5 +116 1 3 10 -0.19660800000000000000e6 +116 1 4 19 0.16384000000000000000e5 +116 1 5 8 -0.65536000000000000000e5 +116 1 5 10 0.13107200000000000000e6 +116 1 5 12 -0.16384000000000000000e5 +116 1 5 16 -0.65536000000000000000e5 +116 1 6 13 0.16384000000000000000e5 +116 1 7 14 -0.32768000000000000000e5 +116 1 8 15 0.13107200000000000000e6 +116 2 2 4 -0.16384000000000000000e5 +116 2 3 9 0.16384000000000000000e5 +116 2 4 6 -0.65536000000000000000e5 +116 3 2 7 0.16384000000000000000e5 +116 3 3 8 0.32768000000000000000e5 +116 3 6 7 0.65536000000000000000e5 +116 3 7 12 0.16384000000000000000e5 +116 4 1 5 0.16384000000000000000e5 +116 4 2 6 0.65536000000000000000e5 +116 4 4 4 -0.65536000000000000000e5 +117 1 1 16 -0.26214400000000000000e6 +117 1 4 19 -0.13107200000000000000e6 +117 1 5 11 0.13107200000000000000e6 +117 1 5 12 0.13107200000000000000e6 +117 1 6 13 -0.13107200000000000000e6 +117 1 7 14 0.26214400000000000000e6 +117 2 1 9 0.13107200000000000000e6 +117 2 3 9 -0.13107200000000000000e6 +117 3 7 12 -0.13107200000000000000e6 +118 1 4 19 0.13107200000000000000e6 +118 1 5 13 0.13107200000000000000e6 +118 1 6 13 0.13107200000000000000e6 +118 1 7 14 -0.26214400000000000000e6 +118 2 3 9 0.13107200000000000000e6 +118 3 7 12 0.13107200000000000000e6 +119 1 1 16 -0.13107200000000000000e6 +119 1 5 14 0.13107200000000000000e6 +120 1 2 9 -0.13107200000000000000e6 +120 1 3 10 0.26214400000000000000e6 +120 1 5 15 0.13107200000000000000e6 +120 1 8 15 -0.26214400000000000000e6 +120 3 3 8 -0.13107200000000000000e6 +120 3 6 7 -0.13107200000000000000e6 +120 4 2 6 -0.13107200000000000000e6 +121 1 5 12 -0.13107200000000000000e6 +121 1 5 17 0.13107200000000000000e6 +121 3 1 14 0.13107200000000000000e6 +122 1 4 19 0.13107200000000000000e6 +122 1 5 18 0.13107200000000000000e6 +122 1 6 13 0.13107200000000000000e6 +122 1 7 14 -0.26214400000000000000e6 +122 2 3 9 0.13107200000000000000e6 +122 3 6 11 0.13107200000000000000e6 +122 3 7 12 0.13107200000000000000e6 +123 1 4 19 0.65536000000000000000e5 +123 1 5 12 -0.65536000000000000000e5 +123 1 5 19 0.13107200000000000000e6 +123 1 7 14 -0.13107200000000000000e6 +123 2 3 9 0.65536000000000000000e5 +123 2 4 10 -0.65536000000000000000e5 +123 3 1 14 0.65536000000000000000e5 +123 3 2 15 0.65536000000000000000e5 +123 3 6 11 0.65536000000000000000e5 +123 3 7 12 0.65536000000000000000e5 +124 1 2 9 -0.65536000000000000000e5 +124 1 6 6 0.13107200000000000000e6 +125 1 6 7 0.13107200000000000000e6 +125 1 7 14 -0.13107200000000000000e6 +125 3 3 8 -0.13107200000000000000e6 +126 1 1 16 0.65536000000000000000e5 +126 1 2 5 -0.32768000000000000000e5 +126 1 3 10 -0.26214400000000000000e6 +126 1 4 19 0.32768000000000000000e5 +126 1 5 12 -0.32768000000000000000e5 +126 1 5 16 -0.13107200000000000000e6 +126 1 6 8 0.13107200000000000000e6 +126 1 6 13 0.32768000000000000000e5 +126 1 7 14 -0.65536000000000000000e5 +126 1 8 15 0.26214400000000000000e6 +126 2 2 4 -0.32768000000000000000e5 +126 2 3 9 0.32768000000000000000e5 +126 3 2 7 0.32768000000000000000e5 +126 3 3 8 0.65536000000000000000e5 +126 3 6 7 0.13107200000000000000e6 +126 3 7 12 0.32768000000000000000e5 +126 4 1 5 0.32768000000000000000e5 +126 4 2 6 0.13107200000000000000e6 +126 4 4 4 -0.13107200000000000000e6 +127 1 3 10 -0.13107200000000000000e6 +127 1 6 9 0.13107200000000000000e6 +128 1 6 10 0.13107200000000000000e6 +128 1 8 9 -0.13107200000000000000e6 +129 1 5 12 -0.13107200000000000000e6 +129 1 6 11 0.13107200000000000000e6 +130 1 4 19 0.13107200000000000000e6 +130 1 6 12 0.13107200000000000000e6 +130 1 6 13 0.13107200000000000000e6 +130 1 7 14 -0.26214400000000000000e6 +130 2 3 9 0.13107200000000000000e6 +130 3 7 12 0.13107200000000000000e6 +131 1 2 9 -0.13107200000000000000e6 +131 1 3 10 0.26214400000000000000e6 +131 1 6 14 0.13107200000000000000e6 +131 1 8 15 -0.26214400000000000000e6 +131 3 3 8 -0.13107200000000000000e6 +131 3 6 7 -0.13107200000000000000e6 +131 4 2 6 -0.13107200000000000000e6 +132 1 6 15 0.13107200000000000000e6 +132 1 7 14 -0.13107200000000000000e6 +133 1 6 16 0.13107200000000000000e6 +133 1 8 15 -0.13107200000000000000e6 +134 1 4 19 0.13107200000000000000e6 +134 1 6 13 0.13107200000000000000e6 +134 1 6 17 0.13107200000000000000e6 +134 1 7 14 -0.26214400000000000000e6 +134 2 3 9 0.13107200000000000000e6 +134 3 6 11 0.13107200000000000000e6 +134 3 7 12 0.13107200000000000000e6 +135 1 6 13 -0.13107200000000000000e6 +135 1 6 18 0.13107200000000000000e6 +135 3 2 15 0.13107200000000000000e6 +136 1 6 19 0.13107200000000000000e6 +136 1 7 14 -0.13107200000000000000e6 +136 3 2 15 0.65536000000000000000e5 +136 3 6 11 0.65536000000000000000e5 +136 3 7 12 0.65536000000000000000e5 +136 4 4 8 0.65536000000000000000e5 +137 1 6 13 -0.13107200000000000000e6 +137 1 6 20 0.13107200000000000000e6 +137 3 2 15 0.13107200000000000000e6 +137 3 5 18 0.13107200000000000000e6 +138 1 2 9 0.65536000000000000000e5 +138 1 3 10 -0.13107200000000000000e6 +138 1 7 7 0.13107200000000000000e6 +138 1 7 14 0.65536000000000000000e5 +138 2 6 8 0.65536000000000000000e5 +138 3 3 8 0.65536000000000000000e5 +138 4 2 6 0.65536000000000000000e5 +139 1 3 10 -0.13107200000000000000e6 +139 1 7 8 0.13107200000000000000e6 +140 1 7 9 0.13107200000000000000e6 +140 1 10 13 -0.13107200000000000000e6 +140 3 3 8 -0.65536000000000000000e5 +140 3 4 9 -0.65536000000000000000e5 +140 3 6 7 -0.65536000000000000000e5 +140 4 5 5 -0.13107200000000000000e6 +141 1 7 10 0.13107200000000000000e6 +141 1 9 16 -0.13107200000000000000e6 +141 3 8 9 -0.13107200000000000000e6 +142 1 4 19 0.13107200000000000000e6 +142 1 6 13 0.13107200000000000000e6 +142 1 7 11 0.13107200000000000000e6 +142 1 7 14 -0.26214400000000000000e6 +142 2 3 9 0.13107200000000000000e6 +142 3 7 12 0.13107200000000000000e6 +143 1 6 13 -0.13107200000000000000e6 +143 1 7 12 0.13107200000000000000e6 +144 1 4 19 -0.13107200000000000000e6 +144 1 7 13 0.13107200000000000000e6 +144 3 7 12 -0.13107200000000000000e6 +145 1 2 9 0.13107200000000000000e6 +145 1 3 10 -0.26214400000000000000e6 +145 1 7 14 0.13107200000000000000e6 +145 1 7 15 0.13107200000000000000e6 +145 2 6 8 0.13107200000000000000e6 +145 3 3 8 0.13107200000000000000e6 +145 3 6 7 0.13107200000000000000e6 +145 4 2 6 0.13107200000000000000e6 +146 1 7 16 0.13107200000000000000e6 +146 1 10 13 -0.13107200000000000000e6 +147 1 6 13 -0.13107200000000000000e6 +147 1 7 17 0.13107200000000000000e6 +147 3 2 15 0.13107200000000000000e6 +148 1 4 19 -0.13107200000000000000e6 +148 1 7 18 0.13107200000000000000e6 +149 1 2 9 0.13107200000000000000e6 +149 1 3 10 -0.26214400000000000000e6 +149 1 7 14 0.13107200000000000000e6 +149 1 7 19 0.13107200000000000000e6 +149 2 6 8 0.13107200000000000000e6 +149 3 3 8 0.13107200000000000000e6 +149 3 3 16 0.13107200000000000000e6 +149 3 6 7 0.13107200000000000000e6 +149 4 2 6 0.13107200000000000000e6 +150 1 4 19 -0.13107200000000000000e6 +150 1 7 20 0.13107200000000000000e6 +150 3 13 14 0.13107200000000000000e6 +151 1 1 16 0.16384000000000000000e5 +151 1 2 5 -0.81920000000000000000e4 +151 1 3 10 -0.98304000000000000000e5 +151 1 4 19 0.81920000000000000000e4 +151 1 5 8 -0.32768000000000000000e5 +151 1 5 12 -0.81920000000000000000e4 +151 1 5 16 -0.32768000000000000000e5 +151 1 6 13 0.81920000000000000000e4 +151 1 7 14 -0.16384000000000000000e5 +151 1 8 8 0.13107200000000000000e6 +151 1 8 15 0.65536000000000000000e5 +151 2 2 4 -0.81920000000000000000e4 +151 2 3 9 0.81920000000000000000e4 +151 2 4 6 -0.32768000000000000000e5 +151 3 2 7 0.81920000000000000000e4 +151 3 3 8 0.16384000000000000000e5 +151 3 6 7 0.32768000000000000000e5 +151 3 7 12 0.81920000000000000000e4 +151 4 1 5 0.81920000000000000000e4 +151 4 2 6 0.32768000000000000000e5 +151 4 4 4 -0.32768000000000000000e5 +152 1 1 16 0.16384000000000000000e5 +152 1 2 5 -0.81920000000000000000e4 +152 1 3 10 -0.98304000000000000000e5 +152 1 4 19 0.81920000000000000000e4 +152 1 5 8 -0.32768000000000000000e5 +152 1 5 12 -0.81920000000000000000e4 +152 1 5 16 -0.32768000000000000000e5 +152 1 6 13 0.81920000000000000000e4 +152 1 7 14 -0.16384000000000000000e5 +152 1 8 9 -0.65536000000000000000e5 +152 1 8 10 0.13107200000000000000e6 +152 1 8 15 0.65536000000000000000e5 +152 1 9 16 -0.65536000000000000000e5 +152 2 2 4 -0.81920000000000000000e4 +152 2 3 9 0.81920000000000000000e4 +152 2 4 6 -0.32768000000000000000e5 +152 2 6 6 -0.13107200000000000000e6 +152 3 2 7 0.81920000000000000000e4 +152 3 3 8 0.16384000000000000000e5 +152 3 6 7 0.32768000000000000000e5 +152 3 7 12 0.81920000000000000000e4 +152 3 8 9 -0.65536000000000000000e5 +152 4 1 5 0.81920000000000000000e4 +152 4 2 6 0.32768000000000000000e5 +152 4 4 4 -0.32768000000000000000e5 +153 1 1 16 -0.13107200000000000000e6 +153 1 8 11 0.13107200000000000000e6 +154 1 2 9 -0.13107200000000000000e6 +154 1 3 10 0.26214400000000000000e6 +154 1 8 12 0.13107200000000000000e6 +154 1 8 15 -0.26214400000000000000e6 +154 3 3 8 -0.13107200000000000000e6 +154 3 6 7 -0.13107200000000000000e6 +154 4 2 6 -0.13107200000000000000e6 +155 1 7 14 -0.13107200000000000000e6 +155 1 8 13 0.13107200000000000000e6 +156 1 5 16 -0.13107200000000000000e6 +156 1 8 14 0.13107200000000000000e6 +157 1 8 9 -0.13107200000000000000e6 +157 1 8 16 0.13107200000000000000e6 +157 3 5 10 0.13107200000000000000e6 +158 1 4 19 0.65536000000000000000e5 +158 1 5 12 -0.65536000000000000000e5 +158 1 7 14 -0.13107200000000000000e6 +158 1 8 17 0.13107200000000000000e6 +158 2 3 9 0.65536000000000000000e5 +158 2 4 10 -0.65536000000000000000e5 +158 3 1 14 0.65536000000000000000e5 +158 3 2 15 0.65536000000000000000e5 +158 3 6 11 0.65536000000000000000e5 +158 3 7 12 0.65536000000000000000e5 +159 1 7 14 -0.13107200000000000000e6 +159 1 8 18 0.13107200000000000000e6 +159 3 2 15 0.65536000000000000000e5 +159 3 6 11 0.65536000000000000000e5 +159 3 7 12 0.65536000000000000000e5 +159 4 4 8 0.65536000000000000000e5 +160 1 8 19 0.13107200000000000000e6 +160 1 10 17 -0.13107200000000000000e6 +161 1 7 14 -0.13107200000000000000e6 +161 1 8 20 0.13107200000000000000e6 +161 3 2 15 0.65536000000000000000e5 +161 3 6 11 0.65536000000000000000e5 +161 3 7 12 0.65536000000000000000e5 +161 3 11 16 0.13107200000000000000e6 +161 4 4 8 0.65536000000000000000e5 +162 1 9 9 0.13107200000000000000e6 +162 1 9 16 -0.65536000000000000000e5 +162 3 8 9 -0.65536000000000000000e5 +163 1 2 9 -0.13107200000000000000e6 +163 1 3 10 0.26214400000000000000e6 +163 1 8 15 -0.26214400000000000000e6 +163 1 9 11 0.13107200000000000000e6 +163 3 3 8 -0.13107200000000000000e6 +163 3 6 7 -0.13107200000000000000e6 +163 4 2 6 -0.13107200000000000000e6 +164 1 7 14 -0.13107200000000000000e6 +164 1 9 12 0.13107200000000000000e6 +165 1 2 9 0.13107200000000000000e6 +165 1 3 10 -0.26214400000000000000e6 +165 1 7 14 0.13107200000000000000e6 +165 1 9 13 0.13107200000000000000e6 +165 2 6 8 0.13107200000000000000e6 +165 3 3 8 0.13107200000000000000e6 +165 3 6 7 0.13107200000000000000e6 +165 4 2 6 0.13107200000000000000e6 +166 1 8 15 -0.13107200000000000000e6 +166 1 9 14 0.13107200000000000000e6 +167 1 9 15 0.13107200000000000000e6 +167 1 10 13 -0.13107200000000000000e6 +168 1 7 14 -0.13107200000000000000e6 +168 1 9 17 0.13107200000000000000e6 +168 3 2 15 0.65536000000000000000e5 +168 3 6 11 0.65536000000000000000e5 +168 3 7 12 0.65536000000000000000e5 +168 4 4 8 0.65536000000000000000e5 +169 1 2 9 0.13107200000000000000e6 +169 1 3 10 -0.26214400000000000000e6 +169 1 7 14 0.13107200000000000000e6 +169 1 9 18 0.13107200000000000000e6 +169 2 6 8 0.13107200000000000000e6 +169 3 3 8 0.13107200000000000000e6 +169 3 3 16 0.13107200000000000000e6 +169 3 6 7 0.13107200000000000000e6 +169 4 2 6 0.13107200000000000000e6 +170 1 9 19 0.13107200000000000000e6 +170 1 10 13 -0.13107200000000000000e6 +170 3 9 14 0.13107200000000000000e6 +171 1 2 9 0.13107200000000000000e6 +171 1 3 10 -0.26214400000000000000e6 +171 1 7 14 0.13107200000000000000e6 +171 1 9 20 0.13107200000000000000e6 +171 2 6 8 0.13107200000000000000e6 +171 3 3 8 0.13107200000000000000e6 +171 3 3 16 0.13107200000000000000e6 +171 3 6 7 0.13107200000000000000e6 +171 3 6 19 0.13107200000000000000e6 +171 4 2 6 0.13107200000000000000e6 +172 1 5 16 -0.13107200000000000000e6 +172 1 10 11 0.13107200000000000000e6 +173 1 8 15 -0.13107200000000000000e6 +173 1 10 12 0.13107200000000000000e6 +174 1 8 9 -0.13107200000000000000e6 +174 1 10 14 0.13107200000000000000e6 +174 3 5 10 0.13107200000000000000e6 +175 1 9 16 -0.13107200000000000000e6 +175 1 10 15 0.13107200000000000000e6 +176 1 9 10 -0.13107200000000000000e6 +176 1 10 16 0.13107200000000000000e6 +176 3 5 10 0.65536000000000000000e5 +176 3 7 10 0.65536000000000000000e5 +176 3 8 9 0.65536000000000000000e5 +176 4 6 6 0.13107200000000000000e6 +177 1 10 13 -0.13107200000000000000e6 +177 1 10 18 0.13107200000000000000e6 +177 3 9 14 0.13107200000000000000e6 +178 1 10 20 0.13107200000000000000e6 +178 1 16 19 -0.13107200000000000000e6 +179 1 2 17 0.65536000000000000000e5 +179 1 5 12 -0.13107200000000000000e6 +179 1 11 11 0.13107200000000000000e6 +179 1 11 18 0.65536000000000000000e5 +179 2 7 7 0.13107200000000000000e6 +179 3 1 14 0.13107200000000000000e6 +179 3 11 12 0.65536000000000000000e5 +180 1 2 17 -0.13107200000000000000e6 +180 1 11 12 0.13107200000000000000e6 +181 1 11 13 0.13107200000000000000e6 +181 1 11 18 -0.13107200000000000000e6 +181 3 11 12 -0.13107200000000000000e6 +182 1 5 12 -0.13107200000000000000e6 +182 1 11 14 0.13107200000000000000e6 +182 3 1 14 0.13107200000000000000e6 +183 1 4 19 0.13107200000000000000e6 +183 1 6 13 0.13107200000000000000e6 +183 1 7 14 -0.26214400000000000000e6 +183 1 11 15 0.13107200000000000000e6 +183 2 3 9 0.13107200000000000000e6 +183 3 6 11 0.13107200000000000000e6 +183 3 7 12 0.13107200000000000000e6 +184 1 4 19 0.65536000000000000000e5 +184 1 5 12 -0.65536000000000000000e5 +184 1 7 14 -0.13107200000000000000e6 +184 1 11 16 0.13107200000000000000e6 +184 2 3 9 0.65536000000000000000e5 +184 2 4 10 -0.65536000000000000000e5 +184 3 1 14 0.65536000000000000000e5 +184 3 2 15 0.65536000000000000000e5 +184 3 6 11 0.65536000000000000000e5 +184 3 7 12 0.65536000000000000000e5 +185 1 1 20 -0.13107200000000000000e6 +185 1 11 17 0.13107200000000000000e6 +186 1 5 20 -0.13107200000000000000e6 +186 1 11 19 0.13107200000000000000e6 +187 1 1 20 -0.13107200000000000000e6 +187 1 2 17 0.13107200000000000000e6 +187 1 3 18 0.13107200000000000000e6 +187 1 4 19 0.26214400000000000000e6 +187 1 5 20 0.26214400000000000000e6 +187 1 7 14 -0.52428800000000000000e6 +187 1 11 20 0.13107200000000000000e6 +187 1 13 20 0.13107200000000000000e6 +187 2 3 9 0.26214400000000000000e6 +187 2 10 10 0.26214400000000000000e6 +187 3 2 15 0.26214400000000000000e6 +187 3 5 18 0.26214400000000000000e6 +187 3 5 20 0.26214400000000000000e6 +187 3 6 11 0.26214400000000000000e6 +187 3 7 12 0.26214400000000000000e6 +187 3 11 12 0.13107200000000000000e6 +187 3 12 17 -0.13107200000000000000e6 +187 4 7 7 0.26214400000000000000e6 +188 1 11 18 -0.65536000000000000000e5 +188 1 12 12 0.13107200000000000000e6 +188 3 11 12 -0.65536000000000000000e5 +189 1 3 18 -0.13107200000000000000e6 +189 1 12 13 0.13107200000000000000e6 +190 1 4 19 0.13107200000000000000e6 +190 1 6 13 0.13107200000000000000e6 +190 1 7 14 -0.26214400000000000000e6 +190 1 12 14 0.13107200000000000000e6 +190 2 3 9 0.13107200000000000000e6 +190 3 6 11 0.13107200000000000000e6 +190 3 7 12 0.13107200000000000000e6 +191 1 6 13 -0.13107200000000000000e6 +191 1 12 15 0.13107200000000000000e6 +191 3 2 15 0.13107200000000000000e6 +192 1 7 14 -0.13107200000000000000e6 +192 1 12 16 0.13107200000000000000e6 +192 3 2 15 0.65536000000000000000e5 +192 3 6 11 0.65536000000000000000e5 +192 3 7 12 0.65536000000000000000e5 +192 4 4 8 0.65536000000000000000e5 +193 1 11 18 -0.13107200000000000000e6 +193 1 12 17 0.13107200000000000000e6 +194 1 1 20 0.13107200000000000000e6 +194 1 2 17 -0.13107200000000000000e6 +194 1 3 18 -0.13107200000000000000e6 +194 1 4 19 -0.26214400000000000000e6 +194 1 5 20 -0.26214400000000000000e6 +194 1 6 13 -0.26214400000000000000e6 +194 1 7 14 0.52428800000000000000e6 +194 1 12 18 0.13107200000000000000e6 +194 2 3 9 -0.26214400000000000000e6 +194 3 6 11 -0.26214400000000000000e6 +194 3 7 12 -0.26214400000000000000e6 +194 3 11 12 -0.13107200000000000000e6 +194 4 7 7 -0.26214400000000000000e6 +195 1 6 13 -0.13107200000000000000e6 +195 1 12 19 0.13107200000000000000e6 +195 3 2 15 0.13107200000000000000e6 +195 3 5 18 0.13107200000000000000e6 +196 1 1 20 0.13107200000000000000e6 +196 1 2 17 -0.13107200000000000000e6 +196 1 3 18 -0.13107200000000000000e6 +196 1 4 19 -0.26214400000000000000e6 +196 1 5 20 -0.26214400000000000000e6 +196 1 6 13 -0.26214400000000000000e6 +196 1 7 14 0.52428800000000000000e6 +196 1 12 20 0.13107200000000000000e6 +196 2 3 9 -0.26214400000000000000e6 +196 3 6 11 -0.26214400000000000000e6 +196 3 7 12 -0.26214400000000000000e6 +196 3 11 12 -0.13107200000000000000e6 +196 3 12 17 0.13107200000000000000e6 +196 4 7 7 -0.26214400000000000000e6 +197 1 1 20 -0.65536000000000000000e5 +197 1 2 17 0.65536000000000000000e5 +197 1 3 18 0.65536000000000000000e5 +197 1 4 19 0.13107200000000000000e6 +197 1 5 20 0.13107200000000000000e6 +197 1 7 14 -0.26214400000000000000e6 +197 1 11 18 0.65536000000000000000e5 +197 1 13 13 0.13107200000000000000e6 +197 2 3 9 0.13107200000000000000e6 +197 2 8 10 0.65536000000000000000e5 +197 3 2 15 0.13107200000000000000e6 +197 3 4 17 -0.65536000000000000000e5 +197 3 5 18 0.13107200000000000000e6 +197 3 6 11 0.13107200000000000000e6 +197 3 7 12 0.13107200000000000000e6 +197 3 11 12 0.65536000000000000000e5 +197 4 7 7 0.13107200000000000000e6 +198 1 6 13 -0.13107200000000000000e6 +198 1 13 14 0.13107200000000000000e6 +198 3 2 15 0.13107200000000000000e6 +199 1 4 19 -0.13107200000000000000e6 +199 1 13 15 0.13107200000000000000e6 +200 1 2 9 0.13107200000000000000e6 +200 1 3 10 -0.26214400000000000000e6 +200 1 7 14 0.13107200000000000000e6 +200 1 13 16 0.13107200000000000000e6 +200 2 6 8 0.13107200000000000000e6 +200 3 3 8 0.13107200000000000000e6 +200 3 3 16 0.13107200000000000000e6 +200 3 6 7 0.13107200000000000000e6 +200 4 2 6 0.13107200000000000000e6 +201 1 1 20 0.13107200000000000000e6 +201 1 2 17 -0.13107200000000000000e6 +201 1 3 18 -0.13107200000000000000e6 +201 1 4 19 -0.26214400000000000000e6 +201 1 5 20 -0.26214400000000000000e6 +201 1 6 13 -0.26214400000000000000e6 +201 1 7 14 0.52428800000000000000e6 +201 1 13 17 0.13107200000000000000e6 +201 2 3 9 -0.26214400000000000000e6 +201 3 6 11 -0.26214400000000000000e6 +201 3 7 12 -0.26214400000000000000e6 +201 3 11 12 -0.13107200000000000000e6 +201 4 7 7 -0.26214400000000000000e6 +202 1 1 20 -0.13107200000000000000e6 +202 1 2 17 0.13107200000000000000e6 +202 1 3 18 0.13107200000000000000e6 +202 1 4 19 0.26214400000000000000e6 +202 1 5 20 0.26214400000000000000e6 +202 1 7 14 -0.52428800000000000000e6 +202 1 11 18 0.13107200000000000000e6 +202 1 13 18 0.13107200000000000000e6 +202 2 3 9 0.26214400000000000000e6 +202 2 8 10 0.13107200000000000000e6 +202 3 2 15 0.26214400000000000000e6 +202 3 5 18 0.26214400000000000000e6 +202 3 6 11 0.26214400000000000000e6 +202 3 7 12 0.26214400000000000000e6 +202 3 11 12 0.13107200000000000000e6 +202 4 7 7 0.26214400000000000000e6 +203 1 4 19 -0.13107200000000000000e6 +203 1 13 19 0.13107200000000000000e6 +203 3 13 14 0.13107200000000000000e6 +204 1 4 19 0.32768000000000000000e5 +204 1 5 12 -0.32768000000000000000e5 +204 1 7 14 -0.65536000000000000000e5 +204 1 14 14 0.13107200000000000000e6 +204 2 3 9 0.32768000000000000000e5 +204 2 4 10 -0.32768000000000000000e5 +204 3 1 14 0.32768000000000000000e5 +204 3 2 15 0.32768000000000000000e5 +204 3 6 11 0.32768000000000000000e5 +204 3 7 12 0.32768000000000000000e5 +205 1 7 14 -0.13107200000000000000e6 +205 1 14 15 0.13107200000000000000e6 +205 3 2 15 0.65536000000000000000e5 +205 3 6 11 0.65536000000000000000e5 +205 3 7 12 0.65536000000000000000e5 +205 4 4 8 0.65536000000000000000e5 +206 1 10 17 -0.13107200000000000000e6 +206 1 14 16 0.13107200000000000000e6 +207 1 5 20 -0.13107200000000000000e6 +207 1 14 17 0.13107200000000000000e6 +208 1 6 13 -0.13107200000000000000e6 +208 1 14 18 0.13107200000000000000e6 +208 3 2 15 0.13107200000000000000e6 +208 3 5 18 0.13107200000000000000e6 +209 1 7 14 -0.13107200000000000000e6 +209 1 14 19 0.13107200000000000000e6 +209 3 2 15 0.65536000000000000000e5 +209 3 6 11 0.65536000000000000000e5 +209 3 7 12 0.65536000000000000000e5 +209 3 11 16 0.13107200000000000000e6 +209 4 4 8 0.65536000000000000000e5 +210 1 6 13 -0.13107200000000000000e6 +210 1 14 20 0.13107200000000000000e6 +210 3 2 15 0.13107200000000000000e6 +210 3 5 18 0.13107200000000000000e6 +210 3 5 20 0.13107200000000000000e6 +211 1 2 9 0.65536000000000000000e5 +211 1 3 10 -0.13107200000000000000e6 +211 1 7 14 0.65536000000000000000e5 +211 1 15 15 0.13107200000000000000e6 +211 2 6 8 0.65536000000000000000e5 +211 3 3 8 0.65536000000000000000e5 +211 3 3 16 0.65536000000000000000e5 +211 3 6 7 0.65536000000000000000e5 +211 4 2 6 0.65536000000000000000e5 +212 1 10 13 -0.13107200000000000000e6 +212 1 15 16 0.13107200000000000000e6 +212 3 9 14 0.13107200000000000000e6 +213 1 6 13 -0.13107200000000000000e6 +213 1 15 17 0.13107200000000000000e6 +213 3 2 15 0.13107200000000000000e6 +213 3 5 18 0.13107200000000000000e6 +214 1 4 19 -0.13107200000000000000e6 +214 1 15 18 0.13107200000000000000e6 +214 3 13 14 0.13107200000000000000e6 +215 1 2 9 0.13107200000000000000e6 +215 1 3 10 -0.26214400000000000000e6 +215 1 7 14 0.13107200000000000000e6 +215 1 15 19 0.13107200000000000000e6 +215 2 6 8 0.13107200000000000000e6 +215 3 3 8 0.13107200000000000000e6 +215 3 3 16 0.13107200000000000000e6 +215 3 6 7 0.13107200000000000000e6 +215 3 6 19 0.13107200000000000000e6 +215 4 2 6 0.13107200000000000000e6 +216 1 15 20 0.13107200000000000000e6 +216 1 18 19 -0.13107200000000000000e6 +217 1 10 19 -0.65536000000000000000e5 +217 1 16 16 0.13107200000000000000e6 +218 1 7 14 -0.13107200000000000000e6 +218 1 16 17 0.13107200000000000000e6 +218 3 2 15 0.65536000000000000000e5 +218 3 6 11 0.65536000000000000000e5 +218 3 7 12 0.65536000000000000000e5 +218 3 11 16 0.13107200000000000000e6 +218 4 4 8 0.65536000000000000000e5 +219 1 2 9 0.13107200000000000000e6 +219 1 3 10 -0.26214400000000000000e6 +219 1 7 14 0.13107200000000000000e6 +219 1 16 18 0.13107200000000000000e6 +219 2 6 8 0.13107200000000000000e6 +219 3 3 8 0.13107200000000000000e6 +219 3 3 16 0.13107200000000000000e6 +219 3 6 7 0.13107200000000000000e6 +219 3 6 19 0.13107200000000000000e6 +219 4 2 6 0.13107200000000000000e6 +220 1 2 9 0.13107200000000000000e6 +220 1 3 10 -0.26214400000000000000e6 +220 1 7 14 0.13107200000000000000e6 +220 1 16 20 0.13107200000000000000e6 +220 2 6 8 0.13107200000000000000e6 +220 3 3 8 0.13107200000000000000e6 +220 3 3 16 0.13107200000000000000e6 +220 3 6 7 0.13107200000000000000e6 +220 3 6 19 0.13107200000000000000e6 +220 3 14 19 0.13107200000000000000e6 +220 4 2 6 0.13107200000000000000e6 +221 1 1 20 -0.65536000000000000000e5 +221 1 2 17 0.65536000000000000000e5 +221 1 3 18 0.65536000000000000000e5 +221 1 4 19 0.13107200000000000000e6 +221 1 5 20 0.13107200000000000000e6 +221 1 7 14 -0.26214400000000000000e6 +221 1 13 20 0.65536000000000000000e5 +221 1 17 17 0.13107200000000000000e6 +221 2 3 9 0.13107200000000000000e6 +221 2 10 10 0.13107200000000000000e6 +221 3 2 15 0.13107200000000000000e6 +221 3 5 18 0.13107200000000000000e6 +221 3 5 20 0.13107200000000000000e6 +221 3 6 11 0.13107200000000000000e6 +221 3 7 12 0.13107200000000000000e6 +221 3 11 12 0.65536000000000000000e5 +221 3 12 17 -0.65536000000000000000e5 +221 4 7 7 0.13107200000000000000e6 +222 1 1 20 0.13107200000000000000e6 +222 1 2 17 -0.13107200000000000000e6 +222 1 3 18 -0.13107200000000000000e6 +222 1 4 19 -0.26214400000000000000e6 +222 1 5 20 -0.26214400000000000000e6 +222 1 6 13 -0.26214400000000000000e6 +222 1 7 14 0.52428800000000000000e6 +222 1 17 18 0.13107200000000000000e6 +222 2 3 9 -0.26214400000000000000e6 +222 3 6 11 -0.26214400000000000000e6 +222 3 7 12 -0.26214400000000000000e6 +222 3 11 12 -0.13107200000000000000e6 +222 3 12 17 0.13107200000000000000e6 +222 4 7 7 -0.26214400000000000000e6 +223 1 6 13 -0.13107200000000000000e6 +223 1 17 19 0.13107200000000000000e6 +223 3 2 15 0.13107200000000000000e6 +223 3 5 18 0.13107200000000000000e6 +223 3 5 20 0.13107200000000000000e6 +224 1 13 20 -0.65536000000000000000e5 +224 1 18 18 0.13107200000000000000e6 +225 1 13 20 -0.13107200000000000000e6 +225 1 18 20 0.13107200000000000000e6 +225 3 17 18 0.13107200000000000000e6 +226 1 2 9 0.65536000000000000000e5 +226 1 3 10 -0.13107200000000000000e6 +226 1 7 14 0.65536000000000000000e5 +226 1 19 19 0.13107200000000000000e6 +226 2 6 8 0.65536000000000000000e5 +226 3 3 8 0.65536000000000000000e5 +226 3 3 16 0.65536000000000000000e5 +226 3 6 7 0.65536000000000000000e5 +226 3 6 19 0.65536000000000000000e5 +226 3 14 19 0.65536000000000000000e5 +226 4 2 6 0.65536000000000000000e5 +227 1 13 20 -0.65536000000000000000e5 +227 1 20 20 0.13107200000000000000e6 +227 3 17 18 0.65536000000000000000e5 +227 3 17 20 0.65536000000000000000e5 +228 2 1 2 0.13107200000000000000e6 +228 2 1 7 -0.13107200000000000000e6 +228 4 1 1 -0.26214400000000000000e6 +229 1 1 4 0.65536000000000000000e5 +229 1 1 8 -0.26214400000000000000e6 +229 1 1 16 0.26214400000000000000e6 +229 1 2 5 0.13107200000000000000e6 +229 1 2 17 -0.13107200000000000000e6 +229 1 4 11 0.65536000000000000000e5 +229 1 4 19 0.13107200000000000000e6 +229 1 6 13 0.13107200000000000000e6 +229 1 7 14 -0.26214400000000000000e6 +229 1 11 18 -0.65536000000000000000e5 +229 2 1 3 0.65536000000000000000e5 +229 2 1 4 0.13107200000000000000e6 +229 2 1 7 -0.65536000000000000000e5 +229 2 1 9 -0.13107200000000000000e6 +229 2 3 9 0.13107200000000000000e6 +229 2 7 7 -0.13107200000000000000e6 +229 3 1 2 0.65536000000000000000e5 +229 3 1 14 -0.13107200000000000000e6 +229 3 2 3 0.65536000000000000000e5 +229 3 2 11 -0.65536000000000000000e5 +229 3 7 12 0.13107200000000000000e6 +229 3 11 12 -0.65536000000000000000e5 +230 2 1 5 0.13107200000000000000e6 +230 2 2 4 -0.13107200000000000000e6 +231 1 1 8 0.13107200000000000000e6 +231 1 2 5 0.65536000000000000000e5 +231 1 2 9 0.13107200000000000000e6 +231 1 3 10 0.26214400000000000000e6 +231 1 4 19 -0.65536000000000000000e5 +231 1 5 8 -0.26214400000000000000e6 +231 1 5 12 0.65536000000000000000e5 +231 1 6 13 -0.65536000000000000000e5 +231 1 7 14 0.13107200000000000000e6 +231 1 8 15 -0.26214400000000000000e6 +231 2 1 6 0.13107200000000000000e6 +231 2 2 4 0.65536000000000000000e5 +231 2 3 9 -0.65536000000000000000e5 +231 3 2 7 -0.65536000000000000000e5 +231 3 3 8 -0.13107200000000000000e6 +231 3 6 7 -0.13107200000000000000e6 +231 3 7 12 -0.65536000000000000000e5 +231 4 1 5 -0.65536000000000000000e5 +231 4 2 6 -0.13107200000000000000e6 +232 1 1 4 -0.13107200000000000000e6 +232 1 2 17 0.13107200000000000000e6 +232 2 1 3 -0.13107200000000000000e6 +232 2 1 8 0.13107200000000000000e6 +232 3 1 2 -0.13107200000000000000e6 +232 3 1 6 0.26214400000000000000e6 +232 3 2 3 -0.13107200000000000000e6 +232 3 2 11 0.13107200000000000000e6 +233 2 1 10 0.13107200000000000000e6 +233 2 7 7 -0.26214400000000000000e6 +234 2 1 3 -0.65536000000000000000e5 +234 2 2 2 0.13107200000000000000e6 +235 2 2 3 0.13107200000000000000e6 +235 2 2 8 -0.13107200000000000000e6 +235 4 2 2 -0.26214400000000000000e6 +236 1 2 9 -0.26214400000000000000e6 +236 1 3 10 0.52428800000000000000e6 +236 1 4 19 -0.13107200000000000000e6 +236 1 5 12 0.13107200000000000000e6 +236 1 7 14 0.26214400000000000000e6 +236 1 8 15 -0.52428800000000000000e6 +236 2 2 5 0.13107200000000000000e6 +236 2 3 9 -0.13107200000000000000e6 +236 3 3 8 -0.26214400000000000000e6 +236 3 6 7 -0.26214400000000000000e6 +236 3 7 12 -0.13107200000000000000e6 +236 4 1 5 -0.13107200000000000000e6 +236 4 2 6 -0.26214400000000000000e6 +237 1 1 16 0.13107200000000000000e6 +237 1 2 9 0.13107200000000000000e6 +237 1 3 10 -0.26214400000000000000e6 +237 1 5 16 -0.26214400000000000000e6 +237 1 7 14 0.13107200000000000000e6 +237 1 8 15 0.26214400000000000000e6 +237 2 2 6 0.13107200000000000000e6 +237 3 3 8 0.13107200000000000000e6 +237 3 6 7 0.13107200000000000000e6 +237 4 2 6 0.13107200000000000000e6 +237 4 4 4 -0.26214400000000000000e6 +238 1 1 4 -0.13107200000000000000e6 +238 1 2 17 0.13107200000000000000e6 +238 2 1 3 -0.13107200000000000000e6 +238 2 2 7 0.13107200000000000000e6 +238 3 1 2 -0.13107200000000000000e6 +238 3 1 6 0.26214400000000000000e6 +238 3 2 3 -0.13107200000000000000e6 +238 3 2 11 0.13107200000000000000e6 +239 1 2 9 -0.26214400000000000000e6 +239 1 3 10 0.52428800000000000000e6 +239 1 4 19 -0.13107200000000000000e6 +239 1 5 12 0.13107200000000000000e6 +239 1 7 14 0.26214400000000000000e6 +239 1 8 15 -0.52428800000000000000e6 +239 2 2 9 0.13107200000000000000e6 +239 2 3 9 -0.13107200000000000000e6 +239 3 3 8 -0.26214400000000000000e6 +239 3 6 7 -0.26214400000000000000e6 +239 3 7 12 -0.13107200000000000000e6 +239 4 2 6 -0.26214400000000000000e6 +240 1 2 17 0.13107200000000000000e6 +240 1 3 18 0.13107200000000000000e6 +240 1 4 19 0.26214400000000000000e6 +240 1 6 13 0.26214400000000000000e6 +240 1 7 14 -0.52428800000000000000e6 +240 1 11 18 0.13107200000000000000e6 +240 2 2 10 0.13107200000000000000e6 +240 2 3 9 0.26214400000000000000e6 +240 3 6 11 0.26214400000000000000e6 +240 3 7 12 0.26214400000000000000e6 +240 3 11 12 0.13107200000000000000e6 +241 1 1 4 -0.65536000000000000000e5 +241 1 1 20 0.65536000000000000000e5 +241 1 3 10 0.52428800000000000000e6 +241 1 4 19 -0.13107200000000000000e6 +241 1 5 20 -0.13107200000000000000e6 +241 1 6 13 -0.13107200000000000000e6 +241 1 7 14 0.26214400000000000000e6 +241 1 8 15 -0.52428800000000000000e6 +241 2 3 3 0.13107200000000000000e6 +241 2 3 9 -0.13107200000000000000e6 +241 2 8 10 -0.65536000000000000000e5 +241 3 1 6 -0.13107200000000000000e6 +241 3 2 7 -0.26214400000000000000e6 +241 3 2 11 0.65536000000000000000e5 +241 3 3 4 0.65536000000000000000e5 +241 3 3 8 -0.26214400000000000000e6 +241 3 4 17 0.65536000000000000000e5 +241 3 5 18 -0.13107200000000000000e6 +241 3 6 7 -0.26214400000000000000e6 +241 3 6 11 -0.13107200000000000000e6 +241 3 7 12 -0.13107200000000000000e6 +241 4 1 5 -0.13107200000000000000e6 +241 4 2 2 -0.13107200000000000000e6 +241 4 2 6 -0.26214400000000000000e6 +241 4 3 7 -0.65536000000000000000e5 +241 4 7 7 -0.13107200000000000000e6 +242 1 2 9 -0.26214400000000000000e6 +242 1 3 10 0.52428800000000000000e6 +242 1 4 19 -0.13107200000000000000e6 +242 1 5 12 0.13107200000000000000e6 +242 1 7 14 0.26214400000000000000e6 +242 1 8 15 -0.52428800000000000000e6 +242 2 3 4 0.13107200000000000000e6 +242 2 3 9 -0.13107200000000000000e6 +242 3 3 8 -0.26214400000000000000e6 +242 3 6 7 -0.26214400000000000000e6 +242 3 7 12 -0.13107200000000000000e6 +242 4 1 5 -0.13107200000000000000e6 +242 4 2 6 -0.26214400000000000000e6 +243 1 3 10 0.52428800000000000000e6 +243 1 4 7 0.13107200000000000000e6 +243 1 4 19 -0.13107200000000000000e6 +243 1 8 15 -0.52428800000000000000e6 +243 2 3 5 0.13107200000000000000e6 +243 2 3 9 -0.13107200000000000000e6 +243 3 1 6 -0.13107200000000000000e6 +243 3 3 8 -0.52428800000000000000e6 +243 3 6 7 -0.26214400000000000000e6 +243 3 7 12 -0.13107200000000000000e6 +243 4 1 5 -0.13107200000000000000e6 +243 4 2 6 -0.26214400000000000000e6 +244 2 3 6 0.13107200000000000000e6 +244 2 6 8 -0.13107200000000000000e6 +244 4 2 6 -0.13107200000000000000e6 +245 2 2 8 -0.13107200000000000000e6 +245 2 3 7 0.13107200000000000000e6 +246 1 1 20 0.13107200000000000000e6 +246 1 2 17 -0.13107200000000000000e6 +246 1 4 19 -0.26214400000000000000e6 +246 1 5 20 -0.26214400000000000000e6 +246 1 6 13 -0.26214400000000000000e6 +246 1 7 14 0.52428800000000000000e6 +246 2 3 8 0.13107200000000000000e6 +246 2 3 9 -0.26214400000000000000e6 +246 2 8 10 -0.13107200000000000000e6 +246 3 4 17 0.13107200000000000000e6 +246 3 5 18 -0.26214400000000000000e6 +246 3 6 11 -0.26214400000000000000e6 +246 3 7 12 -0.26214400000000000000e6 +246 4 3 7 -0.13107200000000000000e6 +246 4 7 7 -0.26214400000000000000e6 +247 1 1 20 0.13107200000000000000e6 +247 1 2 17 -0.13107200000000000000e6 +247 1 4 19 -0.26214400000000000000e6 +247 1 5 20 -0.26214400000000000000e6 +247 1 6 13 -0.26214400000000000000e6 +247 1 7 14 0.52428800000000000000e6 +247 2 3 9 -0.26214400000000000000e6 +247 2 3 10 0.13107200000000000000e6 +247 2 8 10 -0.13107200000000000000e6 +247 3 4 17 0.13107200000000000000e6 +247 3 5 18 -0.26214400000000000000e6 +247 3 6 11 -0.26214400000000000000e6 +247 3 7 12 -0.26214400000000000000e6 +247 4 7 7 -0.26214400000000000000e6 +248 1 1 8 0.65536000000000000000e5 +248 1 2 5 0.32768000000000000000e5 +248 1 2 9 0.65536000000000000000e5 +248 1 3 10 0.13107200000000000000e6 +248 1 4 19 -0.32768000000000000000e5 +248 1 5 8 -0.13107200000000000000e6 +248 1 5 12 0.32768000000000000000e5 +248 1 6 13 -0.32768000000000000000e5 +248 1 7 14 0.65536000000000000000e5 +248 1 8 15 -0.13107200000000000000e6 +248 2 2 4 0.32768000000000000000e5 +248 2 3 9 -0.32768000000000000000e5 +248 2 4 4 0.13107200000000000000e6 +248 3 2 7 -0.32768000000000000000e5 +248 3 3 8 -0.65536000000000000000e5 +248 3 6 7 -0.65536000000000000000e5 +248 3 7 12 -0.32768000000000000000e5 +248 4 1 5 -0.32768000000000000000e5 +248 4 2 6 -0.65536000000000000000e5 +249 1 1 16 0.13107200000000000000e6 +249 1 2 9 0.13107200000000000000e6 +249 1 3 10 -0.26214400000000000000e6 +249 1 5 16 -0.26214400000000000000e6 +249 1 7 14 0.13107200000000000000e6 +249 1 8 15 0.26214400000000000000e6 +249 2 4 5 0.13107200000000000000e6 +249 3 3 8 0.13107200000000000000e6 +249 3 6 7 0.13107200000000000000e6 +249 4 2 6 0.13107200000000000000e6 +249 4 4 4 -0.26214400000000000000e6 +250 2 1 9 -0.13107200000000000000e6 +250 2 4 7 0.13107200000000000000e6 +251 1 2 9 -0.26214400000000000000e6 +251 1 3 10 0.52428800000000000000e6 +251 1 4 19 -0.13107200000000000000e6 +251 1 5 12 0.13107200000000000000e6 +251 1 7 14 0.26214400000000000000e6 +251 1 8 15 -0.52428800000000000000e6 +251 2 3 9 -0.13107200000000000000e6 +251 2 4 8 0.13107200000000000000e6 +251 3 3 8 -0.26214400000000000000e6 +251 3 6 7 -0.26214400000000000000e6 +251 3 7 12 -0.13107200000000000000e6 +251 4 2 6 -0.26214400000000000000e6 +252 1 1 16 0.13107200000000000000e6 +252 1 2 9 0.13107200000000000000e6 +252 1 3 10 -0.26214400000000000000e6 +252 1 5 16 -0.26214400000000000000e6 +252 1 7 14 0.13107200000000000000e6 +252 1 8 15 0.26214400000000000000e6 +252 2 4 9 0.13107200000000000000e6 +252 3 3 8 0.13107200000000000000e6 +252 3 6 7 0.13107200000000000000e6 +252 4 2 6 0.13107200000000000000e6 +253 2 5 5 0.13107200000000000000e6 +253 2 6 8 -0.65536000000000000000e5 +253 4 2 6 -0.65536000000000000000e5 +254 1 1 16 -0.65536000000000000000e5 +254 1 2 5 0.32768000000000000000e5 +254 1 3 10 0.39321600000000000000e6 +254 1 4 19 -0.32768000000000000000e5 +254 1 5 12 0.32768000000000000000e5 +254 1 5 16 0.13107200000000000000e6 +254 1 6 13 -0.32768000000000000000e5 +254 1 7 14 0.65536000000000000000e5 +254 1 8 9 -0.26214400000000000000e6 +254 1 8 15 -0.26214400000000000000e6 +254 1 10 13 0.13107200000000000000e6 +254 2 2 4 0.32768000000000000000e5 +254 2 3 9 -0.32768000000000000000e5 +254 2 5 6 0.13107200000000000000e6 +254 3 2 7 -0.32768000000000000000e5 +254 3 4 9 0.65536000000000000000e5 +254 3 6 7 -0.65536000000000000000e5 +254 3 7 12 -0.32768000000000000000e5 +254 4 1 5 -0.32768000000000000000e5 +254 4 2 6 -0.13107200000000000000e6 +254 4 4 4 0.13107200000000000000e6 +254 4 5 5 0.13107200000000000000e6 +255 1 2 9 -0.26214400000000000000e6 +255 1 3 10 0.52428800000000000000e6 +255 1 4 19 -0.13107200000000000000e6 +255 1 5 12 0.13107200000000000000e6 +255 1 7 14 0.26214400000000000000e6 +255 1 8 15 -0.52428800000000000000e6 +255 2 3 9 -0.13107200000000000000e6 +255 2 5 7 0.13107200000000000000e6 +255 3 3 8 -0.26214400000000000000e6 +255 3 6 7 -0.26214400000000000000e6 +255 3 7 12 -0.13107200000000000000e6 +255 4 2 6 -0.26214400000000000000e6 +256 2 3 9 -0.13107200000000000000e6 +256 2 5 8 0.13107200000000000000e6 +257 2 5 9 0.13107200000000000000e6 +257 2 6 8 -0.13107200000000000000e6 +258 2 3 9 -0.13107200000000000000e6 +258 2 5 10 0.13107200000000000000e6 +258 4 4 8 0.13107200000000000000e6 +259 1 1 16 0.13107200000000000000e6 +259 1 2 9 0.13107200000000000000e6 +259 1 3 10 -0.26214400000000000000e6 +259 1 5 16 -0.26214400000000000000e6 +259 1 7 14 0.13107200000000000000e6 +259 1 8 15 0.26214400000000000000e6 +259 2 6 7 0.13107200000000000000e6 +259 3 3 8 0.13107200000000000000e6 +259 3 6 7 0.13107200000000000000e6 +259 4 2 6 0.13107200000000000000e6 +260 1 5 16 0.13107200000000000000e6 +260 1 8 9 -0.26214400000000000000e6 +260 1 8 15 0.13107200000000000000e6 +260 1 10 13 0.13107200000000000000e6 +260 2 6 9 0.13107200000000000000e6 +260 3 5 10 0.26214400000000000000e6 +261 1 2 9 -0.13107200000000000000e6 +261 1 3 10 0.26214400000000000000e6 +261 1 4 19 -0.65536000000000000000e5 +261 1 5 12 0.65536000000000000000e5 +261 1 7 14 0.13107200000000000000e6 +261 1 10 17 -0.26214400000000000000e6 +261 2 3 9 -0.65536000000000000000e5 +261 2 4 10 0.65536000000000000000e5 +261 2 6 8 -0.13107200000000000000e6 +261 2 6 10 0.13107200000000000000e6 +261 3 1 14 -0.65536000000000000000e5 +261 3 2 15 -0.13107200000000000000e6 +261 3 3 8 -0.13107200000000000000e6 +261 3 3 16 -0.13107200000000000000e6 +261 3 6 7 -0.13107200000000000000e6 +261 3 6 11 -0.13107200000000000000e6 +261 3 7 12 -0.13107200000000000000e6 +261 4 2 6 -0.13107200000000000000e6 +261 4 4 8 -0.65536000000000000000e5 +262 1 2 17 0.13107200000000000000e6 +262 1 3 18 0.13107200000000000000e6 +262 1 4 19 0.26214400000000000000e6 +262 1 6 13 0.26214400000000000000e6 +262 1 7 14 -0.52428800000000000000e6 +262 1 11 18 0.13107200000000000000e6 +262 2 3 9 0.26214400000000000000e6 +262 2 7 8 0.13107200000000000000e6 +262 3 6 11 0.26214400000000000000e6 +262 3 7 12 0.26214400000000000000e6 +262 3 11 12 0.13107200000000000000e6 +263 2 4 10 -0.13107200000000000000e6 +263 2 7 9 0.13107200000000000000e6 +264 1 2 17 0.13107200000000000000e6 +264 1 3 18 0.13107200000000000000e6 +264 1 4 19 0.26214400000000000000e6 +264 1 6 13 0.26214400000000000000e6 +264 1 7 14 -0.52428800000000000000e6 +264 1 11 18 0.13107200000000000000e6 +264 2 3 9 0.26214400000000000000e6 +264 2 7 10 0.13107200000000000000e6 +264 3 6 11 0.26214400000000000000e6 +264 3 7 12 0.26214400000000000000e6 +264 3 11 12 0.13107200000000000000e6 +264 4 7 7 0.26214400000000000000e6 +265 1 1 20 0.65536000000000000000e5 +265 1 2 17 -0.65536000000000000000e5 +265 1 4 19 -0.13107200000000000000e6 +265 1 5 20 -0.13107200000000000000e6 +265 1 6 13 -0.13107200000000000000e6 +265 1 7 14 0.26214400000000000000e6 +265 2 3 9 -0.13107200000000000000e6 +265 2 8 8 0.13107200000000000000e6 +265 2 8 10 -0.65536000000000000000e5 +265 3 4 17 0.65536000000000000000e5 +265 3 5 18 -0.13107200000000000000e6 +265 3 6 11 -0.13107200000000000000e6 +265 3 7 12 -0.13107200000000000000e6 +265 4 7 7 -0.13107200000000000000e6 +266 2 3 9 -0.13107200000000000000e6 +266 2 8 9 0.13107200000000000000e6 +266 4 4 8 0.13107200000000000000e6 +267 1 2 9 -0.65536000000000000000e5 +267 1 3 10 0.13107200000000000000e6 +267 1 4 19 -0.32768000000000000000e5 +267 1 5 12 0.32768000000000000000e5 +267 1 7 14 0.65536000000000000000e5 +267 1 10 17 -0.13107200000000000000e6 +267 2 3 9 -0.32768000000000000000e5 +267 2 4 10 0.32768000000000000000e5 +267 2 6 8 -0.65536000000000000000e5 +267 2 9 9 0.13107200000000000000e6 +267 3 1 14 -0.32768000000000000000e5 +267 3 2 15 -0.65536000000000000000e5 +267 3 3 8 -0.65536000000000000000e5 +267 3 3 16 -0.65536000000000000000e5 +267 3 6 7 -0.65536000000000000000e5 +267 3 6 11 -0.65536000000000000000e5 +267 3 7 12 -0.65536000000000000000e5 +267 4 2 6 -0.65536000000000000000e5 +267 4 4 8 -0.32768000000000000000e5 +268 1 4 19 0.13107200000000000000e6 +268 1 5 20 0.13107200000000000000e6 +268 1 6 13 0.13107200000000000000e6 +268 1 7 14 -0.26214400000000000000e6 +268 2 9 10 0.13107200000000000000e6 +268 3 5 18 -0.13107200000000000000e6 +268 3 6 11 0.13107200000000000000e6 +268 3 7 12 0.13107200000000000000e6 +268 3 11 16 0.26214400000000000000e6 +268 3 13 14 -0.13107200000000000000e6 +268 4 4 8 0.13107200000000000000e6 +269 1 1 4 0.65536000000000000000e5 +269 1 1 16 0.26214400000000000000e6 +269 1 2 5 -0.13107200000000000000e6 +269 1 2 17 -0.65536000000000000000e5 +269 1 4 19 0.13107200000000000000e6 +269 1 5 12 -0.13107200000000000000e6 +269 1 6 13 0.13107200000000000000e6 +269 1 7 14 -0.26214400000000000000e6 +269 2 1 9 -0.13107200000000000000e6 +269 2 3 9 0.13107200000000000000e6 +269 3 1 1 0.13107200000000000000e6 +269 3 1 2 0.65536000000000000000e5 +269 3 2 11 -0.65536000000000000000e5 +269 3 7 12 0.13107200000000000000e6 +269 4 1 1 0.13107200000000000000e6 +270 1 1 4 -0.13107200000000000000e6 +270 1 2 17 0.13107200000000000000e6 +270 3 1 3 0.13107200000000000000e6 +270 3 2 11 0.13107200000000000000e6 +271 3 1 4 0.13107200000000000000e6 +271 3 2 3 -0.13107200000000000000e6 +272 1 1 16 0.26214400000000000000e6 +272 1 2 5 -0.13107200000000000000e6 +272 1 4 19 0.13107200000000000000e6 +272 1 5 12 -0.13107200000000000000e6 +272 1 6 13 0.13107200000000000000e6 +272 1 7 14 -0.26214400000000000000e6 +272 2 1 9 -0.13107200000000000000e6 +272 2 3 9 0.13107200000000000000e6 +272 3 1 5 0.13107200000000000000e6 +272 3 7 12 0.13107200000000000000e6 +273 1 3 10 -0.52428800000000000000e6 +273 1 8 15 0.52428800000000000000e6 +273 3 1 6 0.13107200000000000000e6 +273 3 1 7 0.13107200000000000000e6 +273 3 2 7 0.13107200000000000000e6 +273 3 3 8 0.26214400000000000000e6 +273 3 6 7 0.26214400000000000000e6 +273 4 1 5 0.13107200000000000000e6 +273 4 2 6 0.26214400000000000000e6 +274 1 1 16 0.13107200000000000000e6 +274 1 2 5 -0.65536000000000000000e5 +274 1 3 10 -0.26214400000000000000e6 +274 1 4 19 0.65536000000000000000e5 +274 1 5 12 -0.65536000000000000000e5 +274 1 6 13 0.65536000000000000000e5 +274 1 7 14 -0.13107200000000000000e6 +274 1 8 15 0.26214400000000000000e6 +274 2 2 4 -0.65536000000000000000e5 +274 2 3 9 0.65536000000000000000e5 +274 3 1 8 0.13107200000000000000e6 +274 3 2 7 0.65536000000000000000e5 +274 3 3 8 0.13107200000000000000e6 +274 3 6 7 0.13107200000000000000e6 +274 3 7 12 0.65536000000000000000e5 +274 4 1 5 0.65536000000000000000e5 +274 4 2 6 0.13107200000000000000e6 +275 1 3 10 -0.26214400000000000000e6 +275 1 8 15 0.26214400000000000000e6 +275 3 1 9 0.13107200000000000000e6 +275 3 3 8 0.13107200000000000000e6 +275 3 6 7 0.13107200000000000000e6 +275 4 2 6 0.13107200000000000000e6 +276 1 1 16 0.65536000000000000000e5 +276 1 2 5 -0.32768000000000000000e5 +276 1 3 10 -0.26214400000000000000e6 +276 1 4 19 0.32768000000000000000e5 +276 1 5 12 -0.32768000000000000000e5 +276 1 6 13 0.32768000000000000000e5 +276 1 7 14 -0.65536000000000000000e5 +276 1 8 15 0.26214400000000000000e6 +276 2 2 4 -0.32768000000000000000e5 +276 2 3 9 0.32768000000000000000e5 +276 3 1 10 0.13107200000000000000e6 +276 3 2 7 0.32768000000000000000e5 +276 3 3 8 0.65536000000000000000e5 +276 3 6 7 0.13107200000000000000e6 +276 3 7 12 0.32768000000000000000e5 +276 4 1 5 0.32768000000000000000e5 +276 4 2 6 0.13107200000000000000e6 +276 4 4 4 -0.13107200000000000000e6 +277 1 1 4 0.13107200000000000000e6 +277 1 2 17 -0.13107200000000000000e6 +277 1 4 11 0.13107200000000000000e6 +277 1 11 18 -0.13107200000000000000e6 +277 2 1 3 0.13107200000000000000e6 +277 2 7 7 -0.26214400000000000000e6 +277 3 1 2 0.13107200000000000000e6 +277 3 1 6 -0.26214400000000000000e6 +277 3 1 11 0.13107200000000000000e6 +277 3 1 14 -0.26214400000000000000e6 +277 3 2 3 0.13107200000000000000e6 +277 3 11 12 -0.13107200000000000000e6 +278 3 1 12 0.13107200000000000000e6 +278 3 2 11 -0.13107200000000000000e6 +279 1 4 11 -0.13107200000000000000e6 +279 1 11 18 0.13107200000000000000e6 +279 3 1 13 0.13107200000000000000e6 +279 3 11 12 0.13107200000000000000e6 +280 3 1 15 0.13107200000000000000e6 +280 3 6 11 -0.13107200000000000000e6 +281 1 2 9 -0.13107200000000000000e6 +281 1 3 10 0.26214400000000000000e6 +281 1 4 19 -0.65536000000000000000e5 +281 1 5 12 0.65536000000000000000e5 +281 1 7 14 0.13107200000000000000e6 +281 1 8 15 -0.26214400000000000000e6 +281 2 3 9 -0.65536000000000000000e5 +281 2 4 10 0.65536000000000000000e5 +281 3 1 14 -0.65536000000000000000e5 +281 3 1 16 0.13107200000000000000e6 +281 3 2 15 -0.65536000000000000000e5 +281 3 3 8 -0.13107200000000000000e6 +281 3 6 7 -0.13107200000000000000e6 +281 3 6 11 -0.65536000000000000000e5 +281 3 7 12 -0.65536000000000000000e5 +281 4 2 6 -0.13107200000000000000e6 +282 1 1 20 0.13107200000000000000e6 +282 1 2 17 -0.13107200000000000000e6 +282 3 1 17 0.13107200000000000000e6 +283 3 1 18 0.13107200000000000000e6 +283 3 11 12 -0.13107200000000000000e6 +284 1 4 19 0.13107200000000000000e6 +284 1 5 20 0.13107200000000000000e6 +284 1 6 13 0.13107200000000000000e6 +284 1 7 14 -0.26214400000000000000e6 +284 2 3 9 0.13107200000000000000e6 +284 3 1 19 0.13107200000000000000e6 +284 3 6 11 0.13107200000000000000e6 +284 3 7 12 0.13107200000000000000e6 +285 1 1 20 0.13107200000000000000e6 +285 1 2 17 -0.13107200000000000000e6 +285 1 3 18 -0.13107200000000000000e6 +285 1 4 19 -0.26214400000000000000e6 +285 1 5 20 -0.26214400000000000000e6 +285 1 7 14 0.52428800000000000000e6 +285 1 11 18 -0.13107200000000000000e6 +285 1 13 20 -0.13107200000000000000e6 +285 2 3 9 -0.26214400000000000000e6 +285 2 10 10 -0.26214400000000000000e6 +285 3 1 20 0.13107200000000000000e6 +285 3 2 15 -0.26214400000000000000e6 +285 3 5 18 -0.26214400000000000000e6 +285 3 5 20 -0.26214400000000000000e6 +285 3 6 11 -0.26214400000000000000e6 +285 3 7 12 -0.26214400000000000000e6 +285 3 11 12 -0.13107200000000000000e6 +285 3 12 17 0.13107200000000000000e6 +285 4 7 7 -0.26214400000000000000e6 +286 1 1 4 -0.65536000000000000000e5 +286 1 2 17 0.65536000000000000000e5 +286 3 2 2 0.13107200000000000000e6 +286 3 2 11 0.65536000000000000000e5 +287 1 1 4 0.13107200000000000000e6 +287 1 2 17 -0.13107200000000000000e6 +287 1 3 10 -0.10485760000000000000e7 +287 1 8 15 0.10485760000000000000e7 +287 3 1 6 0.26214400000000000000e6 +287 3 2 3 0.13107200000000000000e6 +287 3 2 4 0.13107200000000000000e6 +287 3 2 7 0.26214400000000000000e6 +287 3 2 11 -0.13107200000000000000e6 +287 3 3 8 0.52428800000000000000e6 +287 3 6 7 0.52428800000000000000e6 +287 4 1 5 0.26214400000000000000e6 +287 4 2 2 0.26214400000000000000e6 +287 4 2 6 0.52428800000000000000e6 +288 3 1 6 -0.13107200000000000000e6 +288 3 2 5 0.13107200000000000000e6 +289 1 3 10 -0.52428800000000000000e6 +289 1 8 15 0.52428800000000000000e6 +289 3 1 6 0.13107200000000000000e6 +289 3 2 6 0.13107200000000000000e6 +289 3 2 7 0.13107200000000000000e6 +289 3 3 8 0.26214400000000000000e6 +289 3 6 7 0.26214400000000000000e6 +289 4 1 5 0.13107200000000000000e6 +289 4 2 6 0.26214400000000000000e6 +290 1 3 10 -0.26214400000000000000e6 +290 1 8 15 0.26214400000000000000e6 +290 3 2 8 0.13107200000000000000e6 +290 3 3 8 0.13107200000000000000e6 +290 3 6 7 0.13107200000000000000e6 +290 4 2 6 0.13107200000000000000e6 +291 3 2 9 0.13107200000000000000e6 +291 3 3 8 -0.13107200000000000000e6 +292 1 3 10 -0.13107200000000000000e6 +292 1 8 15 0.13107200000000000000e6 +292 3 2 10 0.13107200000000000000e6 +293 1 4 11 -0.13107200000000000000e6 +293 1 11 18 0.13107200000000000000e6 +293 3 2 12 0.13107200000000000000e6 +293 3 11 12 0.13107200000000000000e6 +294 1 2 17 0.13107200000000000000e6 +294 1 3 18 0.13107200000000000000e6 +294 1 4 11 0.13107200000000000000e6 +294 1 4 19 0.26214400000000000000e6 +294 1 6 13 0.26214400000000000000e6 +294 1 7 14 -0.52428800000000000000e6 +294 2 2 8 0.13107200000000000000e6 +294 2 3 9 0.26214400000000000000e6 +294 3 2 11 0.13107200000000000000e6 +294 3 2 13 0.13107200000000000000e6 +294 3 7 12 0.26214400000000000000e6 +295 3 2 14 0.13107200000000000000e6 +295 3 6 11 -0.13107200000000000000e6 +296 3 2 15 -0.65536000000000000000e5 +296 3 2 16 0.13107200000000000000e6 +296 3 6 11 -0.65536000000000000000e5 +296 3 7 12 -0.65536000000000000000e5 +296 4 4 8 -0.65536000000000000000e5 +297 3 2 17 0.13107200000000000000e6 +297 3 11 12 -0.13107200000000000000e6 +298 1 1 20 -0.13107200000000000000e6 +298 1 2 17 0.13107200000000000000e6 +298 1 4 19 0.26214400000000000000e6 +298 1 5 20 0.26214400000000000000e6 +298 1 6 13 0.26214400000000000000e6 +298 1 7 14 -0.52428800000000000000e6 +298 2 3 9 0.26214400000000000000e6 +298 3 2 18 0.13107200000000000000e6 +298 3 6 11 0.26214400000000000000e6 +298 3 7 12 0.26214400000000000000e6 +298 3 11 12 0.13107200000000000000e6 +298 4 7 7 0.26214400000000000000e6 +299 3 2 19 0.13107200000000000000e6 +299 3 5 18 -0.13107200000000000000e6 +300 3 2 20 0.13107200000000000000e6 +300 3 12 17 -0.13107200000000000000e6 +301 1 1 4 0.65536000000000000000e5 +301 1 2 17 -0.65536000000000000000e5 +301 1 3 10 -0.52428800000000000000e6 +301 1 8 15 0.52428800000000000000e6 +301 3 1 6 0.13107200000000000000e6 +301 3 2 3 0.65536000000000000000e5 +301 3 2 7 0.13107200000000000000e6 +301 3 2 11 -0.65536000000000000000e5 +301 3 3 3 0.13107200000000000000e6 +301 3 3 8 0.26214400000000000000e6 +301 3 6 7 0.26214400000000000000e6 +301 4 1 5 0.13107200000000000000e6 +301 4 2 2 0.13107200000000000000e6 +301 4 2 6 0.26214400000000000000e6 +302 1 3 10 -0.52428800000000000000e6 +302 1 8 15 0.52428800000000000000e6 +302 3 1 6 0.13107200000000000000e6 +302 3 2 7 0.13107200000000000000e6 +302 3 3 5 0.13107200000000000000e6 +302 3 3 8 0.26214400000000000000e6 +302 3 6 7 0.26214400000000000000e6 +302 4 1 5 0.13107200000000000000e6 +302 4 2 6 0.26214400000000000000e6 +303 3 2 7 -0.13107200000000000000e6 +303 3 3 6 0.13107200000000000000e6 +304 1 4 7 -0.13107200000000000000e6 +304 1 4 19 0.13107200000000000000e6 +304 3 3 7 0.13107200000000000000e6 +304 3 7 12 0.13107200000000000000e6 +305 3 3 9 0.13107200000000000000e6 +305 3 6 7 -0.13107200000000000000e6 +306 3 3 8 -0.65536000000000000000e5 +306 3 3 10 0.13107200000000000000e6 +306 3 4 9 -0.65536000000000000000e5 +306 3 6 7 -0.65536000000000000000e5 +306 4 5 5 -0.13107200000000000000e6 +307 1 4 11 -0.13107200000000000000e6 +307 1 11 18 0.13107200000000000000e6 +307 3 3 11 0.13107200000000000000e6 +307 3 11 12 0.13107200000000000000e6 +308 1 2 17 0.13107200000000000000e6 +308 1 3 18 0.13107200000000000000e6 +308 1 4 11 0.13107200000000000000e6 +308 1 4 19 0.26214400000000000000e6 +308 1 6 13 0.26214400000000000000e6 +308 1 7 14 -0.52428800000000000000e6 +308 2 2 8 0.13107200000000000000e6 +308 2 3 9 0.26214400000000000000e6 +308 3 2 11 0.13107200000000000000e6 +308 3 3 12 0.13107200000000000000e6 +308 3 7 12 0.26214400000000000000e6 +309 1 2 17 -0.13107200000000000000e6 +309 1 3 18 -0.13107200000000000000e6 +309 1 4 19 -0.26214400000000000000e6 +309 1 6 13 -0.26214400000000000000e6 +309 1 7 14 0.52428800000000000000e6 +309 1 11 18 -0.13107200000000000000e6 +309 2 2 8 -0.13107200000000000000e6 +309 2 3 9 -0.26214400000000000000e6 +309 3 2 11 -0.13107200000000000000e6 +309 3 2 15 -0.26214400000000000000e6 +309 3 3 13 0.13107200000000000000e6 +309 3 7 12 -0.26214400000000000000e6 +309 3 11 12 -0.13107200000000000000e6 +309 4 3 7 0.13107200000000000000e6 +310 3 2 15 -0.13107200000000000000e6 +310 3 3 14 0.13107200000000000000e6 +311 3 3 15 0.13107200000000000000e6 +311 3 7 12 -0.13107200000000000000e6 +312 1 1 20 -0.13107200000000000000e6 +312 1 2 17 0.13107200000000000000e6 +312 1 4 19 0.26214400000000000000e6 +312 1 5 20 0.26214400000000000000e6 +312 1 6 13 0.26214400000000000000e6 +312 1 7 14 -0.52428800000000000000e6 +312 2 3 9 0.26214400000000000000e6 +312 3 3 17 0.13107200000000000000e6 +312 3 6 11 0.26214400000000000000e6 +312 3 7 12 0.26214400000000000000e6 +312 3 11 12 0.13107200000000000000e6 +312 4 7 7 0.26214400000000000000e6 +313 3 3 18 0.13107200000000000000e6 +313 3 4 17 -0.13107200000000000000e6 +314 3 3 19 0.13107200000000000000e6 +314 3 13 14 -0.13107200000000000000e6 +315 1 1 20 -0.13107200000000000000e6 +315 1 2 17 0.13107200000000000000e6 +315 1 3 18 0.13107200000000000000e6 +315 1 4 19 0.26214400000000000000e6 +315 1 5 20 0.26214400000000000000e6 +315 1 7 14 -0.52428800000000000000e6 +315 1 11 18 0.13107200000000000000e6 +315 1 13 20 0.13107200000000000000e6 +315 2 3 9 0.26214400000000000000e6 +315 2 8 10 0.13107200000000000000e6 +315 3 2 15 0.26214400000000000000e6 +315 3 3 20 0.13107200000000000000e6 +315 3 5 18 0.26214400000000000000e6 +315 3 6 11 0.26214400000000000000e6 +315 3 7 12 0.26214400000000000000e6 +315 3 11 12 0.13107200000000000000e6 +315 4 7 7 0.26214400000000000000e6 +316 1 1 4 -0.65536000000000000000e5 +316 1 2 17 0.65536000000000000000e5 +316 1 3 10 0.52428800000000000000e6 +316 1 4 7 -0.13107200000000000000e6 +316 1 4 19 0.13107200000000000000e6 +316 1 8 15 -0.52428800000000000000e6 +316 3 1 6 -0.13107200000000000000e6 +316 3 2 3 -0.65536000000000000000e5 +316 3 2 7 -0.13107200000000000000e6 +316 3 2 11 0.65536000000000000000e5 +316 3 3 4 0.65536000000000000000e5 +316 3 3 8 -0.26214400000000000000e6 +316 3 4 4 0.13107200000000000000e6 +316 3 6 7 -0.26214400000000000000e6 +316 3 7 12 0.13107200000000000000e6 +316 4 1 5 -0.13107200000000000000e6 +316 4 2 2 -0.13107200000000000000e6 +316 4 2 6 -0.26214400000000000000e6 +316 4 3 3 0.13107200000000000000e6 +317 3 2 7 -0.13107200000000000000e6 +317 3 4 5 0.13107200000000000000e6 +318 1 4 7 -0.13107200000000000000e6 +318 1 4 19 0.13107200000000000000e6 +318 3 4 6 0.13107200000000000000e6 +318 3 7 12 0.13107200000000000000e6 +319 3 4 8 0.13107200000000000000e6 +319 3 6 7 -0.13107200000000000000e6 +320 1 2 17 0.13107200000000000000e6 +320 1 3 18 0.13107200000000000000e6 +320 1 4 11 0.13107200000000000000e6 +320 1 4 19 0.26214400000000000000e6 +320 1 6 13 0.26214400000000000000e6 +320 1 7 14 -0.52428800000000000000e6 +320 2 2 8 0.13107200000000000000e6 +320 2 3 9 0.26214400000000000000e6 +320 3 2 11 0.13107200000000000000e6 +320 3 4 11 0.13107200000000000000e6 +320 3 7 12 0.26214400000000000000e6 +321 1 2 17 -0.13107200000000000000e6 +321 1 3 18 -0.13107200000000000000e6 +321 1 4 19 -0.26214400000000000000e6 +321 1 6 13 -0.26214400000000000000e6 +321 1 7 14 0.52428800000000000000e6 +321 1 11 18 -0.13107200000000000000e6 +321 2 2 8 -0.13107200000000000000e6 +321 2 3 9 -0.26214400000000000000e6 +321 3 2 11 -0.13107200000000000000e6 +321 3 2 15 -0.26214400000000000000e6 +321 3 4 12 0.13107200000000000000e6 +321 3 7 12 -0.26214400000000000000e6 +321 3 11 12 -0.13107200000000000000e6 +321 4 3 7 0.13107200000000000000e6 +322 3 4 14 0.13107200000000000000e6 +322 3 7 12 -0.13107200000000000000e6 +323 3 2 15 0.13107200000000000000e6 +323 3 3 16 -0.26214400000000000000e6 +323 3 4 15 0.13107200000000000000e6 +323 3 7 12 0.13107200000000000000e6 +323 4 3 9 0.13107200000000000000e6 +324 3 2 15 0.65536000000000000000e5 +324 3 3 16 0.13107200000000000000e6 +324 3 4 16 0.13107200000000000000e6 +324 3 6 11 0.65536000000000000000e5 +324 3 7 12 0.65536000000000000000e5 +324 3 9 14 -0.26214400000000000000e6 +324 4 4 8 0.65536000000000000000e5 +324 4 5 9 0.13107200000000000000e6 +325 1 1 20 0.13107200000000000000e6 +325 1 2 17 -0.13107200000000000000e6 +325 1 4 19 -0.26214400000000000000e6 +325 1 5 20 -0.26214400000000000000e6 +325 1 6 13 -0.26214400000000000000e6 +325 1 7 14 0.52428800000000000000e6 +325 2 3 9 -0.26214400000000000000e6 +325 3 4 17 0.13107200000000000000e6 +325 3 4 18 0.13107200000000000000e6 +325 3 6 11 -0.26214400000000000000e6 +325 3 7 12 -0.26214400000000000000e6 +325 3 11 12 -0.13107200000000000000e6 +325 3 13 14 -0.26214400000000000000e6 +325 4 7 7 -0.26214400000000000000e6 +325 4 8 8 0.26214400000000000000e6 +326 3 4 20 0.13107200000000000000e6 +326 3 13 18 -0.13107200000000000000e6 +327 1 1 16 0.65536000000000000000e5 +327 1 2 5 -0.32768000000000000000e5 +327 1 3 10 -0.13107200000000000000e6 +327 1 4 19 0.32768000000000000000e5 +327 1 5 12 -0.32768000000000000000e5 +327 1 6 13 0.32768000000000000000e5 +327 1 7 14 -0.65536000000000000000e5 +327 1 8 15 0.13107200000000000000e6 +327 2 2 4 -0.32768000000000000000e5 +327 2 3 9 0.32768000000000000000e5 +327 3 2 7 0.32768000000000000000e5 +327 3 3 8 0.65536000000000000000e5 +327 3 5 5 0.13107200000000000000e6 +327 3 6 7 0.65536000000000000000e5 +327 3 7 12 0.32768000000000000000e5 +327 4 1 5 0.32768000000000000000e5 +327 4 2 6 0.65536000000000000000e5 +328 1 3 10 -0.26214400000000000000e6 +328 1 8 15 0.26214400000000000000e6 +328 3 3 8 0.13107200000000000000e6 +328 3 5 6 0.13107200000000000000e6 +328 3 6 7 0.13107200000000000000e6 +328 4 2 6 0.13107200000000000000e6 +329 3 3 8 -0.13107200000000000000e6 +329 3 5 7 0.13107200000000000000e6 +330 1 1 16 0.65536000000000000000e5 +330 1 2 5 -0.32768000000000000000e5 +330 1 3 10 -0.26214400000000000000e6 +330 1 4 19 0.32768000000000000000e5 +330 1 5 12 -0.32768000000000000000e5 +330 1 6 13 0.32768000000000000000e5 +330 1 7 14 -0.65536000000000000000e5 +330 1 8 15 0.26214400000000000000e6 +330 2 2 4 -0.32768000000000000000e5 +330 2 3 9 0.32768000000000000000e5 +330 3 2 7 0.32768000000000000000e5 +330 3 3 8 0.65536000000000000000e5 +330 3 5 8 0.13107200000000000000e6 +330 3 6 7 0.13107200000000000000e6 +330 3 7 12 0.32768000000000000000e5 +330 4 1 5 0.32768000000000000000e5 +330 4 2 6 0.13107200000000000000e6 +330 4 4 4 -0.13107200000000000000e6 +331 1 3 10 -0.13107200000000000000e6 +331 1 8 15 0.13107200000000000000e6 +331 3 5 9 0.13107200000000000000e6 +332 3 1 14 -0.13107200000000000000e6 +332 3 5 11 0.13107200000000000000e6 +333 3 5 12 0.13107200000000000000e6 +333 3 6 11 -0.13107200000000000000e6 +334 3 2 15 -0.13107200000000000000e6 +334 3 5 13 0.13107200000000000000e6 +335 1 2 9 -0.13107200000000000000e6 +335 1 3 10 0.26214400000000000000e6 +335 1 4 19 -0.65536000000000000000e5 +335 1 5 12 0.65536000000000000000e5 +335 1 7 14 0.13107200000000000000e6 +335 1 8 15 -0.26214400000000000000e6 +335 2 3 9 -0.65536000000000000000e5 +335 2 4 10 0.65536000000000000000e5 +335 3 1 14 -0.65536000000000000000e5 +335 3 2 15 -0.65536000000000000000e5 +335 3 3 8 -0.13107200000000000000e6 +335 3 5 14 0.13107200000000000000e6 +335 3 6 7 -0.13107200000000000000e6 +335 3 6 11 -0.65536000000000000000e5 +335 3 7 12 -0.65536000000000000000e5 +335 4 2 6 -0.13107200000000000000e6 +336 3 2 15 -0.65536000000000000000e5 +336 3 5 15 0.13107200000000000000e6 +336 3 6 11 -0.65536000000000000000e5 +336 3 7 12 -0.65536000000000000000e5 +336 4 4 8 -0.65536000000000000000e5 +337 1 8 15 -0.13107200000000000000e6 +337 1 10 17 0.13107200000000000000e6 +337 3 5 16 0.13107200000000000000e6 +338 1 4 19 0.13107200000000000000e6 +338 1 5 20 0.13107200000000000000e6 +338 1 6 13 0.13107200000000000000e6 +338 1 7 14 -0.26214400000000000000e6 +338 2 3 9 0.13107200000000000000e6 +338 3 5 17 0.13107200000000000000e6 +338 3 6 11 0.13107200000000000000e6 +338 3 7 12 0.13107200000000000000e6 +339 3 5 19 0.13107200000000000000e6 +339 3 11 16 -0.13107200000000000000e6 +340 3 3 8 -0.65536000000000000000e5 +340 3 6 6 0.13107200000000000000e6 +341 1 3 10 -0.13107200000000000000e6 +341 1 8 15 0.13107200000000000000e6 +341 3 6 8 0.13107200000000000000e6 +342 3 3 8 -0.65536000000000000000e5 +342 3 4 9 -0.65536000000000000000e5 +342 3 6 7 -0.65536000000000000000e5 +342 3 6 9 0.13107200000000000000e6 +342 4 5 5 -0.13107200000000000000e6 +343 3 6 10 0.13107200000000000000e6 +343 3 8 9 -0.13107200000000000000e6 +344 3 2 15 -0.13107200000000000000e6 +344 3 6 12 0.13107200000000000000e6 +345 3 6 13 0.13107200000000000000e6 +345 3 7 12 -0.13107200000000000000e6 +346 3 2 15 -0.65536000000000000000e5 +346 3 6 11 -0.65536000000000000000e5 +346 3 6 14 0.13107200000000000000e6 +346 3 7 12 -0.65536000000000000000e5 +346 4 4 8 -0.65536000000000000000e5 +347 3 3 16 -0.13107200000000000000e6 +347 3 6 15 0.13107200000000000000e6 +348 3 6 16 0.13107200000000000000e6 +348 3 9 14 -0.13107200000000000000e6 +349 3 5 18 -0.13107200000000000000e6 +349 3 6 17 0.13107200000000000000e6 +350 3 6 18 0.13107200000000000000e6 +350 3 13 14 -0.13107200000000000000e6 +351 1 4 19 -0.13107200000000000000e6 +351 1 18 19 0.13107200000000000000e6 +351 3 6 20 0.13107200000000000000e6 +351 3 13 14 0.13107200000000000000e6 +352 3 4 9 -0.65536000000000000000e5 +352 3 7 7 0.13107200000000000000e6 +353 3 3 8 -0.65536000000000000000e5 +353 3 4 9 -0.65536000000000000000e5 +353 3 6 7 -0.65536000000000000000e5 +353 3 7 8 0.13107200000000000000e6 +353 4 5 5 -0.13107200000000000000e6 +354 3 4 10 -0.13107200000000000000e6 +354 3 7 9 0.13107200000000000000e6 +355 3 2 15 -0.13107200000000000000e6 +355 3 7 11 0.13107200000000000000e6 +356 3 2 15 0.13107200000000000000e6 +356 3 3 16 -0.26214400000000000000e6 +356 3 7 12 0.13107200000000000000e6 +356 3 7 13 0.13107200000000000000e6 +356 4 3 9 0.13107200000000000000e6 +357 3 3 16 -0.13107200000000000000e6 +357 3 7 14 0.13107200000000000000e6 +358 3 2 15 0.65536000000000000000e5 +358 3 3 16 0.13107200000000000000e6 +358 3 6 11 0.65536000000000000000e5 +358 3 7 12 0.65536000000000000000e5 +358 3 7 15 0.13107200000000000000e6 +358 3 9 14 -0.26214400000000000000e6 +358 4 4 8 0.65536000000000000000e5 +358 4 5 9 0.13107200000000000000e6 +359 3 7 17 0.13107200000000000000e6 +359 3 13 14 -0.13107200000000000000e6 +360 3 4 19 -0.13107200000000000000e6 +360 3 7 18 0.13107200000000000000e6 +361 1 10 13 -0.26214400000000000000e6 +361 1 16 19 0.26214400000000000000e6 +361 3 6 19 0.13107200000000000000e6 +361 3 7 19 0.13107200000000000000e6 +361 3 9 14 0.26214400000000000000e6 +361 3 11 16 0.13107200000000000000e6 +361 4 6 10 0.13107200000000000000e6 +362 3 5 10 -0.65536000000000000000e5 +362 3 8 8 0.13107200000000000000e6 +363 3 5 10 -0.65536000000000000000e5 +363 3 7 10 -0.65536000000000000000e5 +363 3 8 9 -0.65536000000000000000e5 +363 3 8 10 0.13107200000000000000e6 +363 4 6 6 -0.13107200000000000000e6 +364 1 2 9 -0.13107200000000000000e6 +364 1 3 10 0.26214400000000000000e6 +364 1 4 19 -0.65536000000000000000e5 +364 1 5 12 0.65536000000000000000e5 +364 1 7 14 0.13107200000000000000e6 +364 1 8 15 -0.26214400000000000000e6 +364 2 3 9 -0.65536000000000000000e5 +364 2 4 10 0.65536000000000000000e5 +364 3 1 14 -0.65536000000000000000e5 +364 3 2 15 -0.65536000000000000000e5 +364 3 3 8 -0.13107200000000000000e6 +364 3 6 7 -0.13107200000000000000e6 +364 3 6 11 -0.65536000000000000000e5 +364 3 7 12 -0.65536000000000000000e5 +364 3 8 11 0.13107200000000000000e6 +364 4 2 6 -0.13107200000000000000e6 +365 3 2 15 -0.65536000000000000000e5 +365 3 6 11 -0.65536000000000000000e5 +365 3 7 12 -0.65536000000000000000e5 +365 3 8 12 0.13107200000000000000e6 +365 4 4 8 -0.65536000000000000000e5 +366 3 3 16 -0.13107200000000000000e6 +366 3 8 13 0.13107200000000000000e6 +367 1 8 15 -0.13107200000000000000e6 +367 1 10 17 0.13107200000000000000e6 +367 3 8 14 0.13107200000000000000e6 +368 3 8 15 0.13107200000000000000e6 +368 3 9 14 -0.13107200000000000000e6 +369 1 9 16 -0.13107200000000000000e6 +369 1 10 19 0.13107200000000000000e6 +369 3 8 16 0.13107200000000000000e6 +370 3 8 17 0.13107200000000000000e6 +370 3 11 16 -0.13107200000000000000e6 +371 3 6 19 -0.13107200000000000000e6 +371 3 8 18 0.13107200000000000000e6 +372 1 10 13 -0.13107200000000000000e6 +372 1 16 19 0.13107200000000000000e6 +372 3 8 19 0.13107200000000000000e6 +372 3 9 14 0.13107200000000000000e6 +373 3 8 20 0.13107200000000000000e6 +373 3 14 19 -0.13107200000000000000e6 +374 3 7 10 -0.65536000000000000000e5 +374 3 9 9 0.13107200000000000000e6 +375 3 2 15 -0.65536000000000000000e5 +375 3 6 11 -0.65536000000000000000e5 +375 3 7 12 -0.65536000000000000000e5 +375 3 9 11 0.13107200000000000000e6 +375 4 4 8 -0.65536000000000000000e5 +376 3 3 16 -0.13107200000000000000e6 +376 3 9 12 0.13107200000000000000e6 +377 3 2 15 0.65536000000000000000e5 +377 3 3 16 0.13107200000000000000e6 +377 3 6 11 0.65536000000000000000e5 +377 3 7 12 0.65536000000000000000e5 +377 3 9 13 0.13107200000000000000e6 +377 3 9 14 -0.26214400000000000000e6 +377 4 4 8 0.65536000000000000000e5 +377 4 5 9 0.13107200000000000000e6 +378 3 7 16 -0.13107200000000000000e6 +378 3 9 15 0.13107200000000000000e6 +379 3 9 16 0.13107200000000000000e6 +379 3 10 15 -0.13107200000000000000e6 +380 3 6 19 -0.13107200000000000000e6 +380 3 9 17 0.13107200000000000000e6 +381 1 10 13 -0.26214400000000000000e6 +381 1 16 19 0.26214400000000000000e6 +381 3 6 19 0.13107200000000000000e6 +381 3 9 14 0.26214400000000000000e6 +381 3 9 18 0.13107200000000000000e6 +381 3 11 16 0.13107200000000000000e6 +381 4 6 10 0.13107200000000000000e6 +382 3 9 19 0.13107200000000000000e6 +382 3 15 16 -0.13107200000000000000e6 +383 1 8 15 -0.13107200000000000000e6 +383 1 10 17 0.13107200000000000000e6 +383 3 10 11 0.13107200000000000000e6 +384 3 9 14 -0.13107200000000000000e6 +384 3 10 12 0.13107200000000000000e6 +385 3 7 16 -0.13107200000000000000e6 +385 3 10 13 0.13107200000000000000e6 +386 1 9 16 -0.13107200000000000000e6 +386 1 10 19 0.13107200000000000000e6 +386 3 10 14 0.13107200000000000000e6 +387 1 10 13 -0.13107200000000000000e6 +387 1 16 19 0.13107200000000000000e6 +387 3 9 14 0.13107200000000000000e6 +387 3 10 17 0.13107200000000000000e6 +388 3 10 18 0.13107200000000000000e6 +388 3 15 16 -0.13107200000000000000e6 +389 3 10 20 0.13107200000000000000e6 +389 3 16 19 -0.13107200000000000000e6 +390 1 1 20 0.65536000000000000000e5 +390 1 2 17 -0.65536000000000000000e5 +390 3 11 11 0.13107200000000000000e6 +391 1 1 20 -0.13107200000000000000e6 +391 1 2 17 0.13107200000000000000e6 +391 1 4 19 0.26214400000000000000e6 +391 1 5 20 0.26214400000000000000e6 +391 1 6 13 0.26214400000000000000e6 +391 1 7 14 -0.52428800000000000000e6 +391 2 3 9 0.26214400000000000000e6 +391 3 6 11 0.26214400000000000000e6 +391 3 7 12 0.26214400000000000000e6 +391 3 11 12 0.13107200000000000000e6 +391 3 11 13 0.13107200000000000000e6 +391 4 7 7 0.26214400000000000000e6 +392 1 4 19 0.13107200000000000000e6 +392 1 5 20 0.13107200000000000000e6 +392 1 6 13 0.13107200000000000000e6 +392 1 7 14 -0.26214400000000000000e6 +392 2 3 9 0.13107200000000000000e6 +392 3 6 11 0.13107200000000000000e6 +392 3 7 12 0.13107200000000000000e6 +392 3 11 14 0.13107200000000000000e6 +393 3 5 18 -0.13107200000000000000e6 +393 3 11 15 0.13107200000000000000e6 +394 1 1 20 0.13107200000000000000e6 +394 1 2 17 -0.13107200000000000000e6 +394 1 3 18 -0.13107200000000000000e6 +394 1 4 19 -0.26214400000000000000e6 +394 1 5 20 -0.26214400000000000000e6 +394 1 7 14 0.52428800000000000000e6 +394 1 11 18 -0.13107200000000000000e6 +394 1 13 20 -0.13107200000000000000e6 +394 2 3 9 -0.26214400000000000000e6 +394 2 10 10 -0.26214400000000000000e6 +394 3 2 15 -0.26214400000000000000e6 +394 3 5 18 -0.26214400000000000000e6 +394 3 5 20 -0.26214400000000000000e6 +394 3 6 11 -0.26214400000000000000e6 +394 3 7 12 -0.26214400000000000000e6 +394 3 11 12 -0.13107200000000000000e6 +394 3 11 17 0.13107200000000000000e6 +394 3 12 17 0.13107200000000000000e6 +394 4 7 7 -0.26214400000000000000e6 +395 3 11 18 0.13107200000000000000e6 +395 3 12 17 -0.13107200000000000000e6 +396 3 5 20 -0.13107200000000000000e6 +396 3 11 19 0.13107200000000000000e6 +397 1 1 20 0.13107200000000000000e6 +397 1 2 17 -0.13107200000000000000e6 +397 1 3 18 -0.13107200000000000000e6 +397 1 4 19 -0.26214400000000000000e6 +397 1 5 20 -0.26214400000000000000e6 +397 1 6 13 -0.26214400000000000000e6 +397 1 7 14 0.52428800000000000000e6 +397 1 17 20 0.13107200000000000000e6 +397 2 3 9 -0.26214400000000000000e6 +397 3 6 11 -0.26214400000000000000e6 +397 3 7 12 -0.26214400000000000000e6 +397 3 11 12 -0.13107200000000000000e6 +397 3 11 20 0.13107200000000000000e6 +397 3 12 17 0.13107200000000000000e6 +397 4 7 7 -0.26214400000000000000e6 +398 1 1 20 -0.65536000000000000000e5 +398 1 2 17 0.65536000000000000000e5 +398 1 4 19 0.13107200000000000000e6 +398 1 5 20 0.13107200000000000000e6 +398 1 6 13 0.13107200000000000000e6 +398 1 7 14 -0.26214400000000000000e6 +398 2 3 9 0.13107200000000000000e6 +398 3 6 11 0.13107200000000000000e6 +398 3 7 12 0.13107200000000000000e6 +398 3 11 12 0.65536000000000000000e5 +398 3 12 12 0.13107200000000000000e6 +398 4 7 7 0.13107200000000000000e6 +399 3 4 17 -0.13107200000000000000e6 +399 3 12 13 0.13107200000000000000e6 +400 3 5 18 -0.13107200000000000000e6 +400 3 12 14 0.13107200000000000000e6 +401 3 12 15 0.13107200000000000000e6 +401 3 13 14 -0.13107200000000000000e6 +402 3 6 19 -0.13107200000000000000e6 +402 3 12 16 0.13107200000000000000e6 +403 1 1 20 -0.13107200000000000000e6 +403 1 2 17 0.13107200000000000000e6 +403 1 3 18 0.13107200000000000000e6 +403 1 4 19 0.26214400000000000000e6 +403 1 5 20 0.26214400000000000000e6 +403 1 7 14 -0.52428800000000000000e6 +403 1 11 18 0.13107200000000000000e6 +403 1 13 20 0.13107200000000000000e6 +403 2 3 9 0.26214400000000000000e6 +403 2 8 10 0.13107200000000000000e6 +403 3 2 15 0.26214400000000000000e6 +403 3 5 18 0.26214400000000000000e6 +403 3 6 11 0.26214400000000000000e6 +403 3 7 12 0.26214400000000000000e6 +403 3 11 12 0.13107200000000000000e6 +403 3 12 18 0.13107200000000000000e6 +403 4 7 7 0.26214400000000000000e6 +404 1 4 19 -0.13107200000000000000e6 +404 1 18 19 0.13107200000000000000e6 +404 3 12 19 0.13107200000000000000e6 +404 3 13 14 0.13107200000000000000e6 +405 3 12 20 0.13107200000000000000e6 +405 3 17 18 -0.13107200000000000000e6 +406 1 1 20 0.65536000000000000000e5 +406 1 2 17 -0.65536000000000000000e5 +406 1 4 19 -0.13107200000000000000e6 +406 1 5 20 -0.13107200000000000000e6 +406 1 6 13 -0.13107200000000000000e6 +406 1 7 14 0.26214400000000000000e6 +406 2 3 9 -0.13107200000000000000e6 +406 3 4 17 0.65536000000000000000e5 +406 3 6 11 -0.13107200000000000000e6 +406 3 7 12 -0.13107200000000000000e6 +406 3 11 12 -0.65536000000000000000e5 +406 3 13 13 0.13107200000000000000e6 +406 3 13 14 -0.13107200000000000000e6 +406 4 7 7 -0.13107200000000000000e6 +406 4 8 8 0.13107200000000000000e6 +407 3 4 19 -0.13107200000000000000e6 +407 3 13 15 0.13107200000000000000e6 +408 1 10 13 -0.26214400000000000000e6 +408 1 16 19 0.26214400000000000000e6 +408 3 6 19 0.13107200000000000000e6 +408 3 9 14 0.26214400000000000000e6 +408 3 11 16 0.13107200000000000000e6 +408 3 13 16 0.13107200000000000000e6 +408 4 6 10 0.13107200000000000000e6 +409 1 1 20 -0.13107200000000000000e6 +409 1 2 17 0.13107200000000000000e6 +409 1 3 18 0.13107200000000000000e6 +409 1 4 19 0.26214400000000000000e6 +409 1 5 20 0.26214400000000000000e6 +409 1 7 14 -0.52428800000000000000e6 +409 1 11 18 0.13107200000000000000e6 +409 1 13 20 0.13107200000000000000e6 +409 2 3 9 0.26214400000000000000e6 +409 2 8 10 0.13107200000000000000e6 +409 3 2 15 0.26214400000000000000e6 +409 3 5 18 0.26214400000000000000e6 +409 3 6 11 0.26214400000000000000e6 +409 3 7 12 0.26214400000000000000e6 +409 3 11 12 0.13107200000000000000e6 +409 3 13 17 0.13107200000000000000e6 +409 4 7 7 0.26214400000000000000e6 +410 3 7 20 -0.13107200000000000000e6 +410 3 13 19 0.13107200000000000000e6 +411 1 1 20 -0.13107200000000000000e6 +411 1 2 17 0.13107200000000000000e6 +411 1 3 18 0.13107200000000000000e6 +411 1 4 19 0.26214400000000000000e6 +411 1 5 20 0.26214400000000000000e6 +411 1 6 13 0.26214400000000000000e6 +411 1 7 14 -0.52428800000000000000e6 +411 1 17 20 -0.13107200000000000000e6 +411 1 18 19 -0.26214400000000000000e6 +411 1 19 20 0.26214400000000000000e6 +411 2 3 9 0.26214400000000000000e6 +411 3 6 11 0.26214400000000000000e6 +411 3 7 12 0.26214400000000000000e6 +411 3 11 12 0.13107200000000000000e6 +411 3 12 17 -0.13107200000000000000e6 +411 3 13 20 0.13107200000000000000e6 +411 3 17 18 0.13107200000000000000e6 +411 4 7 7 0.26214400000000000000e6 +411 4 10 10 0.26214400000000000000e6 +412 3 11 16 -0.65536000000000000000e5 +412 3 14 14 0.13107200000000000000e6 +413 3 6 19 -0.13107200000000000000e6 +413 3 14 15 0.13107200000000000000e6 +414 1 10 13 -0.13107200000000000000e6 +414 1 16 19 0.13107200000000000000e6 +414 3 9 14 0.13107200000000000000e6 +414 3 14 16 0.13107200000000000000e6 +415 3 5 20 -0.13107200000000000000e6 +415 3 14 17 0.13107200000000000000e6 +416 1 4 19 -0.13107200000000000000e6 +416 1 18 19 0.13107200000000000000e6 +416 3 13 14 0.13107200000000000000e6 +416 3 14 18 0.13107200000000000000e6 +417 1 18 19 -0.13107200000000000000e6 +417 1 19 20 0.13107200000000000000e6 +417 3 14 20 0.13107200000000000000e6 +418 1 10 13 -0.13107200000000000000e6 +418 1 16 19 0.13107200000000000000e6 +418 3 6 19 0.65536000000000000000e5 +418 3 9 14 0.13107200000000000000e6 +418 3 11 16 0.65536000000000000000e5 +418 3 15 15 0.13107200000000000000e6 +418 4 6 10 0.65536000000000000000e5 +419 1 4 19 -0.13107200000000000000e6 +419 1 18 19 0.13107200000000000000e6 +419 3 13 14 0.13107200000000000000e6 +419 3 15 17 0.13107200000000000000e6 +420 3 7 20 -0.13107200000000000000e6 +420 3 15 18 0.13107200000000000000e6 +421 3 9 20 -0.13107200000000000000e6 +421 3 15 19 0.13107200000000000000e6 +422 3 10 19 -0.65536000000000000000e5 +422 3 16 16 0.13107200000000000000e6 +423 3 14 19 -0.13107200000000000000e6 +423 3 16 17 0.13107200000000000000e6 +424 3 9 20 -0.13107200000000000000e6 +424 3 16 18 0.13107200000000000000e6 +425 3 16 20 0.13107200000000000000e6 +425 3 19 19 -0.26214400000000000000e6 +426 1 1 20 0.65536000000000000000e5 +426 1 2 17 -0.65536000000000000000e5 +426 1 3 18 -0.65536000000000000000e5 +426 1 4 19 -0.13107200000000000000e6 +426 1 5 20 -0.13107200000000000000e6 +426 1 6 13 -0.13107200000000000000e6 +426 1 7 14 0.26214400000000000000e6 +426 1 17 20 0.65536000000000000000e5 +426 2 3 9 -0.13107200000000000000e6 +426 3 6 11 -0.13107200000000000000e6 +426 3 7 12 -0.13107200000000000000e6 +426 3 11 12 -0.65536000000000000000e5 +426 3 12 17 0.65536000000000000000e5 +426 3 17 17 0.13107200000000000000e6 +426 4 7 7 -0.13107200000000000000e6 +427 1 18 19 -0.13107200000000000000e6 +427 1 19 20 0.13107200000000000000e6 +427 3 17 19 0.13107200000000000000e6 +428 1 1 20 -0.65536000000000000000e5 +428 1 2 17 0.65536000000000000000e5 +428 1 3 18 0.65536000000000000000e5 +428 1 4 19 0.13107200000000000000e6 +428 1 5 20 0.13107200000000000000e6 +428 1 6 13 0.13107200000000000000e6 +428 1 7 14 -0.26214400000000000000e6 +428 1 17 20 -0.65536000000000000000e5 +428 1 18 19 -0.13107200000000000000e6 +428 1 19 20 0.13107200000000000000e6 +428 2 3 9 0.13107200000000000000e6 +428 3 6 11 0.13107200000000000000e6 +428 3 7 12 0.13107200000000000000e6 +428 3 11 12 0.65536000000000000000e5 +428 3 12 17 -0.65536000000000000000e5 +428 3 17 18 0.65536000000000000000e5 +428 3 18 18 0.13107200000000000000e6 +428 4 7 7 0.13107200000000000000e6 +428 4 10 10 0.13107200000000000000e6 +429 3 15 20 -0.13107200000000000000e6 +429 3 18 19 0.13107200000000000000e6 +430 1 1 4 0.13107200000000000000e6 +430 1 2 17 -0.13107200000000000000e6 +430 3 1 2 0.13107200000000000000e6 +430 3 1 6 -0.26214400000000000000e6 +430 3 2 3 0.13107200000000000000e6 +430 3 2 11 -0.13107200000000000000e6 +430 4 1 2 0.13107200000000000000e6 +431 4 1 3 0.13107200000000000000e6 +431 4 2 2 -0.26214400000000000000e6 +432 2 1 9 0.13107200000000000000e6 +432 2 2 4 -0.13107200000000000000e6 +432 4 1 4 0.13107200000000000000e6 +433 4 1 6 0.13107200000000000000e6 +433 4 4 4 -0.26214400000000000000e6 +434 1 1 4 -0.13107200000000000000e6 +434 1 2 17 0.13107200000000000000e6 +434 2 1 3 -0.13107200000000000000e6 +434 2 7 7 0.26214400000000000000e6 +434 3 1 2 -0.13107200000000000000e6 +434 3 1 6 0.26214400000000000000e6 +434 3 2 3 -0.13107200000000000000e6 +434 3 2 11 0.13107200000000000000e6 +434 4 1 7 0.13107200000000000000e6 +435 1 2 17 -0.13107200000000000000e6 +435 1 3 18 -0.13107200000000000000e6 +435 1 4 19 -0.26214400000000000000e6 +435 1 6 13 -0.26214400000000000000e6 +435 1 7 14 0.52428800000000000000e6 +435 1 11 18 -0.13107200000000000000e6 +435 2 2 8 -0.13107200000000000000e6 +435 2 3 9 -0.26214400000000000000e6 +435 3 6 11 -0.26214400000000000000e6 +435 3 7 12 -0.26214400000000000000e6 +435 3 11 12 -0.13107200000000000000e6 +435 4 1 8 0.13107200000000000000e6 +436 1 2 9 -0.26214400000000000000e6 +436 1 3 10 0.52428800000000000000e6 +436 1 4 19 -0.13107200000000000000e6 +436 1 5 12 0.13107200000000000000e6 +436 1 7 14 0.26214400000000000000e6 +436 1 8 15 -0.52428800000000000000e6 +436 2 3 9 -0.13107200000000000000e6 +436 2 4 10 0.13107200000000000000e6 +436 3 3 8 -0.26214400000000000000e6 +436 3 6 7 -0.26214400000000000000e6 +436 3 7 12 -0.13107200000000000000e6 +436 4 1 9 0.13107200000000000000e6 +436 4 2 6 -0.26214400000000000000e6 +437 4 1 10 0.13107200000000000000e6 +437 4 7 7 -0.26214400000000000000e6 +438 1 1 4 -0.13107200000000000000e6 +438 1 2 17 0.13107200000000000000e6 +438 1 3 10 0.10485760000000000000e7 +438 1 8 15 -0.10485760000000000000e7 +438 3 1 6 -0.26214400000000000000e6 +438 3 2 7 -0.52428800000000000000e6 +438 3 2 11 0.13107200000000000000e6 +438 3 3 4 0.13107200000000000000e6 +438 3 3 8 -0.52428800000000000000e6 +438 3 6 7 -0.52428800000000000000e6 +438 4 1 5 -0.26214400000000000000e6 +438 4 2 2 -0.26214400000000000000e6 +438 4 2 3 0.13107200000000000000e6 +438 4 2 6 -0.52428800000000000000e6 +439 4 1 5 -0.13107200000000000000e6 +439 4 2 4 0.13107200000000000000e6 +440 1 3 10 0.52428800000000000000e6 +440 1 4 7 0.13107200000000000000e6 +440 1 4 19 -0.13107200000000000000e6 +440 1 8 15 -0.52428800000000000000e6 +440 3 1 6 -0.13107200000000000000e6 +440 3 3 8 -0.52428800000000000000e6 +440 3 6 7 -0.26214400000000000000e6 +440 3 7 12 -0.13107200000000000000e6 +440 4 1 5 -0.13107200000000000000e6 +440 4 2 5 0.13107200000000000000e6 +440 4 2 6 -0.26214400000000000000e6 +441 1 2 17 -0.13107200000000000000e6 +441 1 3 18 -0.13107200000000000000e6 +441 1 4 19 -0.26214400000000000000e6 +441 1 6 13 -0.26214400000000000000e6 +441 1 7 14 0.52428800000000000000e6 +441 1 11 18 -0.13107200000000000000e6 +441 2 2 8 -0.13107200000000000000e6 +441 2 3 9 -0.26214400000000000000e6 +441 3 6 11 -0.26214400000000000000e6 +441 3 7 12 -0.26214400000000000000e6 +441 3 11 12 -0.13107200000000000000e6 +441 4 2 7 0.13107200000000000000e6 +442 4 2 8 0.13107200000000000000e6 +442 4 3 7 -0.13107200000000000000e6 +443 4 2 9 0.13107200000000000000e6 +443 4 4 8 -0.13107200000000000000e6 +444 1 1 20 0.13107200000000000000e6 +444 1 2 17 -0.13107200000000000000e6 +444 1 4 19 -0.26214400000000000000e6 +444 1 5 20 -0.26214400000000000000e6 +444 1 6 13 -0.26214400000000000000e6 +444 1 7 14 0.52428800000000000000e6 +444 2 3 9 -0.26214400000000000000e6 +444 3 4 17 0.13107200000000000000e6 +444 3 5 18 -0.26214400000000000000e6 +444 3 6 11 -0.26214400000000000000e6 +444 3 7 12 -0.26214400000000000000e6 +444 4 2 10 0.13107200000000000000e6 +444 4 7 7 -0.26214400000000000000e6 +445 1 3 10 0.52428800000000000000e6 +445 1 4 7 0.13107200000000000000e6 +445 1 4 19 -0.13107200000000000000e6 +445 1 8 15 -0.52428800000000000000e6 +445 3 1 6 -0.13107200000000000000e6 +445 3 3 8 -0.52428800000000000000e6 +445 3 6 7 -0.26214400000000000000e6 +445 3 7 12 -0.13107200000000000000e6 +445 4 1 5 -0.13107200000000000000e6 +445 4 2 6 -0.26214400000000000000e6 +445 4 3 4 0.13107200000000000000e6 +446 1 4 7 0.13107200000000000000e6 +446 1 4 19 -0.13107200000000000000e6 +446 3 2 7 0.13107200000000000000e6 +446 3 4 7 0.13107200000000000000e6 +446 3 6 7 -0.26214400000000000000e6 +446 3 7 12 -0.13107200000000000000e6 +446 4 3 5 0.13107200000000000000e6 +447 4 3 6 0.13107200000000000000e6 +447 4 5 5 -0.26214400000000000000e6 +448 1 4 11 -0.13107200000000000000e6 +448 1 11 18 0.13107200000000000000e6 +448 3 2 15 0.26214400000000000000e6 +448 3 4 13 0.13107200000000000000e6 +448 3 7 12 -0.26214400000000000000e6 +448 3 11 12 0.13107200000000000000e6 +448 4 3 7 -0.13107200000000000000e6 +448 4 3 8 0.13107200000000000000e6 +449 4 3 10 0.13107200000000000000e6 +449 4 8 8 -0.26214400000000000000e6 +450 4 2 6 -0.13107200000000000000e6 +450 4 4 5 0.13107200000000000000e6 +451 1 1 16 -0.65536000000000000000e5 +451 1 2 5 0.32768000000000000000e5 +451 1 3 10 0.39321600000000000000e6 +451 1 4 19 -0.32768000000000000000e5 +451 1 5 12 0.32768000000000000000e5 +451 1 6 13 -0.32768000000000000000e5 +451 1 7 14 0.65536000000000000000e5 +451 1 8 15 -0.39321600000000000000e6 +451 2 2 4 0.32768000000000000000e5 +451 2 3 9 -0.32768000000000000000e5 +451 3 2 7 -0.32768000000000000000e5 +451 3 4 9 0.65536000000000000000e5 +451 3 5 10 -0.26214400000000000000e6 +451 3 6 7 -0.65536000000000000000e5 +451 3 7 12 -0.32768000000000000000e5 +451 4 1 5 -0.32768000000000000000e5 +451 4 2 6 -0.13107200000000000000e6 +451 4 4 4 0.13107200000000000000e6 +451 4 4 6 0.13107200000000000000e6 +451 4 5 5 0.13107200000000000000e6 +452 1 2 9 -0.26214400000000000000e6 +452 1 3 10 0.52428800000000000000e6 +452 1 4 19 -0.13107200000000000000e6 +452 1 5 12 0.13107200000000000000e6 +452 1 7 14 0.26214400000000000000e6 +452 1 8 15 -0.52428800000000000000e6 +452 2 3 9 -0.13107200000000000000e6 +452 2 4 10 0.13107200000000000000e6 +452 3 3 8 -0.26214400000000000000e6 +452 3 6 7 -0.26214400000000000000e6 +452 3 7 12 -0.13107200000000000000e6 +452 4 2 6 -0.26214400000000000000e6 +452 4 4 7 0.13107200000000000000e6 +453 1 2 9 0.13107200000000000000e6 +453 1 3 10 -0.26214400000000000000e6 +453 1 4 19 0.65536000000000000000e5 +453 1 5 12 -0.65536000000000000000e5 +453 1 7 14 -0.13107200000000000000e6 +453 1 10 17 0.26214400000000000000e6 +453 2 3 9 0.65536000000000000000e5 +453 2 4 10 -0.65536000000000000000e5 +453 3 1 14 0.65536000000000000000e5 +453 3 2 15 0.13107200000000000000e6 +453 3 3 8 0.13107200000000000000e6 +453 3 3 16 0.13107200000000000000e6 +453 3 6 7 0.13107200000000000000e6 +453 3 6 11 0.13107200000000000000e6 +453 3 7 12 0.13107200000000000000e6 +453 4 2 6 0.13107200000000000000e6 +453 4 4 8 0.65536000000000000000e5 +453 4 4 9 0.13107200000000000000e6 +454 1 4 19 -0.13107200000000000000e6 +454 1 5 20 -0.13107200000000000000e6 +454 1 6 13 -0.13107200000000000000e6 +454 1 7 14 0.26214400000000000000e6 +454 2 3 9 -0.13107200000000000000e6 +454 3 5 18 0.13107200000000000000e6 +454 3 6 11 -0.13107200000000000000e6 +454 3 7 12 -0.13107200000000000000e6 +454 3 11 16 -0.26214400000000000000e6 +454 3 13 14 0.13107200000000000000e6 +454 4 4 10 0.13107200000000000000e6 +455 1 3 10 0.13107200000000000000e6 +455 1 8 15 -0.13107200000000000000e6 +455 3 3 8 0.65536000000000000000e5 +455 3 4 9 0.65536000000000000000e5 +455 3 4 10 0.13107200000000000000e6 +455 3 6 7 0.65536000000000000000e5 +455 3 8 9 -0.26214400000000000000e6 +455 4 5 5 0.13107200000000000000e6 +455 4 5 6 0.13107200000000000000e6 +456 4 4 8 -0.13107200000000000000e6 +456 4 5 7 0.13107200000000000000e6 +457 4 3 9 -0.13107200000000000000e6 +457 4 5 8 0.13107200000000000000e6 +458 3 4 19 0.13107200000000000000e6 +458 3 5 18 0.13107200000000000000e6 +458 3 6 19 -0.26214400000000000000e6 +458 3 13 14 0.13107200000000000000e6 +458 4 5 10 0.13107200000000000000e6 +459 1 2 9 0.13107200000000000000e6 +459 1 3 10 -0.26214400000000000000e6 +459 1 4 19 0.65536000000000000000e5 +459 1 5 12 -0.65536000000000000000e5 +459 1 7 14 -0.13107200000000000000e6 +459 1 10 17 0.26214400000000000000e6 +459 2 3 9 0.65536000000000000000e5 +459 2 4 10 -0.65536000000000000000e5 +459 3 1 14 0.65536000000000000000e5 +459 3 2 15 0.13107200000000000000e6 +459 3 3 8 0.13107200000000000000e6 +459 3 3 16 0.13107200000000000000e6 +459 3 6 7 0.13107200000000000000e6 +459 3 6 11 0.13107200000000000000e6 +459 3 7 12 0.13107200000000000000e6 +459 4 2 6 0.13107200000000000000e6 +459 4 4 8 0.65536000000000000000e5 +459 4 6 7 0.13107200000000000000e6 +460 4 5 9 -0.13107200000000000000e6 +460 4 6 8 0.13107200000000000000e6 +461 1 8 15 0.13107200000000000000e6 +461 1 9 16 -0.26214400000000000000e6 +461 1 10 17 -0.13107200000000000000e6 +461 1 10 19 0.26214400000000000000e6 +461 3 7 16 0.13107200000000000000e6 +461 3 9 14 0.13107200000000000000e6 +461 4 6 9 0.13107200000000000000e6 +462 1 1 20 0.13107200000000000000e6 +462 1 2 17 -0.13107200000000000000e6 +462 1 4 19 -0.26214400000000000000e6 +462 1 5 20 -0.26214400000000000000e6 +462 1 6 13 -0.26214400000000000000e6 +462 1 7 14 0.52428800000000000000e6 +462 2 3 9 -0.26214400000000000000e6 +462 3 4 17 0.13107200000000000000e6 +462 3 5 18 -0.26214400000000000000e6 +462 3 6 11 -0.26214400000000000000e6 +462 3 7 12 -0.26214400000000000000e6 +462 4 7 7 -0.26214400000000000000e6 +462 4 7 8 0.13107200000000000000e6 +463 1 4 19 -0.13107200000000000000e6 +463 1 5 20 -0.13107200000000000000e6 +463 1 6 13 -0.13107200000000000000e6 +463 1 7 14 0.26214400000000000000e6 +463 2 3 9 -0.13107200000000000000e6 +463 3 5 18 0.13107200000000000000e6 +463 3 6 11 -0.13107200000000000000e6 +463 3 7 12 -0.13107200000000000000e6 +463 3 11 16 -0.26214400000000000000e6 +463 3 13 14 0.13107200000000000000e6 +463 4 7 9 0.13107200000000000000e6 +464 2 8 10 -0.13107200000000000000e6 +464 2 10 10 0.26214400000000000000e6 +464 4 7 10 0.13107200000000000000e6 +465 3 4 19 0.13107200000000000000e6 +465 3 5 18 0.13107200000000000000e6 +465 3 6 19 -0.26214400000000000000e6 +465 3 13 14 0.13107200000000000000e6 +465 4 8 9 0.13107200000000000000e6 +466 1 1 20 0.13107200000000000000e6 +466 1 2 17 -0.13107200000000000000e6 +466 1 3 18 -0.13107200000000000000e6 +466 1 4 19 -0.52428800000000000000e6 +466 1 5 20 -0.26214400000000000000e6 +466 1 7 14 0.52428800000000000000e6 +466 1 11 18 -0.13107200000000000000e6 +466 1 13 20 -0.13107200000000000000e6 +466 1 18 19 0.26214400000000000000e6 +466 2 3 9 -0.26214400000000000000e6 +466 2 8 10 -0.13107200000000000000e6 +466 3 2 15 -0.26214400000000000000e6 +466 3 5 18 -0.26214400000000000000e6 +466 3 6 11 -0.26214400000000000000e6 +466 3 7 12 -0.26214400000000000000e6 +466 3 11 12 -0.13107200000000000000e6 +466 3 12 17 0.13107200000000000000e6 +466 3 13 14 0.26214400000000000000e6 +466 3 13 18 0.13107200000000000000e6 +466 4 7 7 -0.26214400000000000000e6 +466 4 8 10 0.13107200000000000000e6 +467 4 6 10 -0.65536000000000000000e5 +467 4 9 9 0.13107200000000000000e6 +468 1 4 19 0.13107200000000000000e6 +468 1 18 19 -0.13107200000000000000e6 +468 3 5 20 0.13107200000000000000e6 +468 3 7 20 0.13107200000000000000e6 +468 3 13 14 -0.13107200000000000000e6 +468 3 14 19 -0.26214400000000000000e6 +468 4 9 10 0.13107200000000000000e6 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +1024 +4 +35 20 20 10 +0.13107200000000000000e6 0.0 0.0 -0.13107200000000000000e6 0.13107200000000000000e6 0.0 0.0 0.13107200000000000000e6 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 -0.13107200000000000000e6 0.13107200000000000000e6 0.0 -0.13107200000000000000e6 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.13107200000000000000e6 0.65536000000000000000e5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.65536000000000000000e5 0.0 0.0 0.0 -0.26214400000000000000e6 -0.13107200000000000000e6 0.0 0.0 0.0 -0.13107200000000000000e6 -0.52428800000000000000e6 -0.32768000000000000000e5 0.0 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.65536000000000000000e5 0.0 0.0 0.0 0.26214400000000000000e6 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.39321600000000000000e6 -0.26214400000000000000e6 0.26214400000000000000e6 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.26214400000000000000e6 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 -0.13107200000000000000e6 -0.65536000000000000000e5 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.98304000000000000000e5 -0.16384000000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.13107200000000000000e6 -0.26214400000000000000e6 0.0 0.0 0.0 0.13107200000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.26214400000000000000e6 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.13107200000000000000e6 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 -0.26214400000000000000e6 0.26214400000000000000e6 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.13107200000000000000e6 0.0 -0.26214400000000000000e6 0.26214400000000000000e6 0.0 0.13107200000000000000e6 -0.10485760000000000000e7 -0.26214400000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 -0.26214400000000000000e6 0.0 0.13107200000000000000e6 -0.78643200000000000000e6 0.26214400000000000000e6 0.0 0.0 0.26214400000000000000e6 -0.26214400000000000000e6 -0.26214400000000000000e6 0.0 0.0 0.13107200000000000000e6 -0.26214400000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.13107200000000000000e6 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 -0.13107200000000000000e6 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 -0.13107200000000000000e6 0.0 0.13107200000000000000e6 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.13107200000000000000e6 -0.13107200000000000000e6 -0.26214400000000000000e6 0.0 0.13107200000000000000e6 -0.26214400000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.13107200000000000000e6 -0.26214400000000000000e6 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.13107200000000000000e6 -0.13107200000000000000e6 -0.13107200000000000000e6 -0.26214400000000000000e6 0.0 0.0 -0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.13107200000000000000e6 0.0 0.13107200000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 -0.26214400000000000000e6 -0.26214400000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 -0.26214400000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 -0.13107200000000000000e6 0.0 0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.13107200000000000000e6 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 -0.26214400000000000000e6 0.26214400000000000000e6 0.0 -0.26214400000000000000e6 0.13107200000000000000e6 0.13107200000000000000e6 -0.26214400000000000000e6 -0.26214400000000000000e6 0.52428800000000000000e6 0.0 -0.26214400000000000000e6 0.52428800000000000000e6 0.26214400000000000000e6 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.13107200000000000000e6 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.13107200000000000000e6 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 -0.13107200000000000000e6 0.0 0.13107200000000000000e6 0.0 +0 1 1 2 -0.32768000000000000000e5 +0 1 1 6 0.65536000000000000000e5 +0 1 1 8 -0.13107200000000000000e6 +0 1 2 5 -0.32768000000000000000e5 +0 1 2 9 -0.65536000000000000000e5 +0 1 3 10 0.13107200000000000000e6 +0 2 1 1 -0.65536000000000000000e5 +0 2 1 3 0.32768000000000000000e5 +0 2 1 7 -0.65536000000000000000e5 +0 2 2 12 -0.32768000000000000000e5 +0 4 2 2 -0.65536000000000000000e5 +1 1 2 9 0.65536000000000000000e5 +1 1 3 34 0.65536000000000000000e5 +1 1 7 22 -0.13107200000000000000e6 +1 1 32 35 0.32768000000000000000e5 +1 1 35 35 0.65536000000000000000e5 +1 2 6 20 0.65536000000000000000e5 +1 3 2 7 -0.65536000000000000000e5 +1 3 2 15 -0.65536000000000000000e5 +1 3 3 16 0.13107200000000000000e6 +1 3 5 18 -0.65536000000000000000e5 +1 3 6 19 0.13107200000000000000e6 +1 3 7 20 0.65536000000000000000e5 +1 3 15 20 0.65536000000000000000e5 +1 3 19 20 0.65536000000000000000e5 +2 1 2 9 -0.32768000000000000000e5 +2 1 3 34 -0.32768000000000000000e5 +2 1 7 22 0.65536000000000000000e5 +2 1 31 32 -0.65536000000000000000e5 +2 1 34 35 0.32768000000000000000e5 +2 2 6 20 -0.32768000000000000000e5 +2 3 2 7 0.32768000000000000000e5 +2 3 2 15 0.32768000000000000000e5 +2 3 3 16 -0.65536000000000000000e5 +2 3 5 18 0.32768000000000000000e5 +2 3 6 19 -0.65536000000000000000e5 +2 3 7 20 -0.32768000000000000000e5 +2 3 15 20 -0.32768000000000000000e5 +2 3 19 20 -0.32768000000000000000e5 +3 1 2 9 0.65536000000000000000e5 +3 1 3 34 0.65536000000000000000e5 +3 1 7 22 -0.13107200000000000000e6 +3 1 32 33 0.32768000000000000000e5 +3 1 33 35 0.32768000000000000000e5 +3 2 6 20 0.65536000000000000000e5 +3 3 2 7 -0.65536000000000000000e5 +3 3 2 15 -0.65536000000000000000e5 +3 3 3 16 0.13107200000000000000e6 +3 3 5 18 -0.65536000000000000000e5 +3 3 6 19 0.13107200000000000000e6 +3 3 7 20 0.65536000000000000000e5 +3 3 15 20 0.65536000000000000000e5 +4 1 2 9 -0.65536000000000000000e5 +4 1 3 34 -0.65536000000000000000e5 +4 1 7 22 0.13107200000000000000e6 +4 1 20 35 -0.65536000000000000000e5 +4 1 28 35 -0.32768000000000000000e5 +4 1 32 33 -0.32768000000000000000e5 +4 1 32 35 0.32768000000000000000e5 +4 2 6 20 -0.65536000000000000000e5 +4 2 20 20 -0.65536000000000000000e5 +4 3 2 7 0.65536000000000000000e5 +4 3 2 15 0.65536000000000000000e5 +4 3 3 16 -0.13107200000000000000e6 +4 3 5 18 0.65536000000000000000e5 +4 3 6 19 -0.13107200000000000000e6 +4 3 7 20 -0.65536000000000000000e5 +4 3 15 20 -0.65536000000000000000e5 +4 3 19 20 -0.65536000000000000000e5 +5 1 25 32 -0.65536000000000000000e5 +5 1 31 32 0.32768000000000000000e5 +5 1 34 34 0.65536000000000000000e5 +6 1 2 9 -0.32768000000000000000e5 +6 1 3 34 -0.32768000000000000000e5 +6 1 7 22 0.65536000000000000000e5 +6 1 29 30 -0.65536000000000000000e5 +6 1 33 34 0.32768000000000000000e5 +6 2 6 20 -0.32768000000000000000e5 +6 3 2 7 0.32768000000000000000e5 +6 3 2 15 0.32768000000000000000e5 +6 3 3 16 -0.65536000000000000000e5 +6 3 5 18 0.32768000000000000000e5 +6 3 6 19 -0.65536000000000000000e5 +6 3 7 20 -0.32768000000000000000e5 +6 3 15 20 -0.32768000000000000000e5 +7 1 2 9 -0.32768000000000000000e5 +7 1 3 34 -0.32768000000000000000e5 +7 1 20 35 0.32768000000000000000e5 +7 2 6 20 -0.32768000000000000000e5 +7 3 2 7 0.32768000000000000000e5 +7 3 2 15 0.32768000000000000000e5 +7 3 5 18 0.32768000000000000000e5 +7 3 7 20 -0.32768000000000000000e5 +7 3 14 19 0.65536000000000000000e5 +7 3 15 20 -0.32768000000000000000e5 +7 3 19 20 -0.32768000000000000000e5 +8 1 4 35 0.32768000000000000000e5 +8 1 7 22 -0.13107200000000000000e6 +8 1 16 35 -0.32768000000000000000e5 +8 1 17 32 0.32768000000000000000e5 +8 1 20 35 0.65536000000000000000e5 +8 1 26 29 0.65536000000000000000e5 +8 1 28 35 0.32768000000000000000e5 +8 2 14 20 0.65536000000000000000e5 +8 3 3 16 0.13107200000000000000e6 +8 3 6 19 0.13107200000000000000e6 +8 3 14 19 0.13107200000000000000e6 +8 3 17 18 0.32768000000000000000e5 +8 4 10 10 0.65536000000000000000e5 +9 1 2 9 -0.65536000000000000000e5 +9 1 3 34 -0.65536000000000000000e5 +9 1 26 29 0.65536000000000000000e5 +9 1 26 33 0.32768000000000000000e5 +9 1 32 33 0.32768000000000000000e5 +9 2 6 20 -0.65536000000000000000e5 +9 2 14 20 0.65536000000000000000e5 +9 3 2 7 0.65536000000000000000e5 +9 3 2 15 0.65536000000000000000e5 +9 3 5 18 0.65536000000000000000e5 +9 3 7 20 -0.65536000000000000000e5 +9 3 14 19 0.13107200000000000000e6 +10 1 2 9 -0.65536000000000000000e5 +10 1 3 34 -0.65536000000000000000e5 +10 1 7 22 0.13107200000000000000e6 +10 1 16 35 0.32768000000000000000e5 +10 1 26 29 -0.65536000000000000000e5 +10 1 28 35 -0.32768000000000000000e5 +10 1 32 33 -0.32768000000000000000e5 +10 2 6 20 -0.65536000000000000000e5 +10 2 20 20 -0.65536000000000000000e5 +10 3 2 7 0.65536000000000000000e5 +10 3 2 15 0.65536000000000000000e5 +10 3 3 16 -0.13107200000000000000e6 +10 3 5 18 0.65536000000000000000e5 +10 3 6 19 -0.13107200000000000000e6 +10 3 7 20 -0.65536000000000000000e5 +10 3 15 20 -0.65536000000000000000e5 +10 3 19 20 -0.65536000000000000000e5 +11 1 14 29 -0.65536000000000000000e5 +11 1 25 32 0.32768000000000000000e5 +11 1 31 34 0.32768000000000000000e5 +11 3 10 19 0.65536000000000000000e5 +12 1 23 30 -0.65536000000000000000e5 +12 1 24 35 0.32768000000000000000e5 +12 1 29 30 0.32768000000000000000e5 +13 1 7 22 0.32768000000000000000e5 +13 1 8 23 -0.65536000000000000000e5 +13 1 11 26 0.32768000000000000000e5 +13 1 12 27 0.32768000000000000000e5 +13 1 16 31 -0.32768000000000000000e5 +13 1 22 29 -0.32768000000000000000e5 +13 1 31 32 0.32768000000000000000e5 +13 3 3 16 -0.32768000000000000000e5 +13 3 9 14 0.65536000000000000000e5 +13 3 14 19 -0.32768000000000000000e5 +13 4 6 10 0.32768000000000000000e5 +14 1 2 9 -0.32768000000000000000e5 +14 1 3 34 -0.32768000000000000000e5 +14 1 7 22 0.65536000000000000000e5 +14 1 22 29 -0.65536000000000000000e5 +14 1 30 33 0.32768000000000000000e5 +14 2 6 20 -0.32768000000000000000e5 +14 3 2 7 0.32768000000000000000e5 +14 3 2 15 0.32768000000000000000e5 +14 3 3 16 -0.65536000000000000000e5 +14 3 5 18 0.32768000000000000000e5 +14 3 6 19 -0.65536000000000000000e5 +14 3 7 20 -0.32768000000000000000e5 +15 1 26 29 -0.32768000000000000000e5 +15 2 14 20 -0.32768000000000000000e5 +15 3 14 19 -0.65536000000000000000e5 +15 3 15 20 -0.32768000000000000000e5 +16 1 16 31 -0.65536000000000000000e5 +16 1 20 35 0.32768000000000000000e5 +16 1 26 29 0.32768000000000000000e5 +17 1 2 9 0.65536000000000000000e5 +17 1 3 34 0.65536000000000000000e5 +17 1 16 35 0.32768000000000000000e5 +17 1 17 32 -0.32768000000000000000e5 +17 1 20 35 -0.65536000000000000000e5 +17 1 26 29 -0.65536000000000000000e5 +17 1 26 33 -0.32768000000000000000e5 +17 2 6 20 0.65536000000000000000e5 +17 2 14 20 -0.65536000000000000000e5 +17 2 18 20 -0.32768000000000000000e5 +17 3 2 7 -0.65536000000000000000e5 +17 3 2 15 -0.65536000000000000000e5 +17 3 5 18 -0.65536000000000000000e5 +17 3 14 19 -0.13107200000000000000e6 +17 3 15 20 -0.65536000000000000000e5 +17 3 17 18 -0.32768000000000000000e5 +17 4 10 10 -0.65536000000000000000e5 +18 1 2 9 -0.65536000000000000000e5 +18 1 3 34 -0.13107200000000000000e6 +18 1 4 35 0.32768000000000000000e5 +18 1 16 35 -0.32768000000000000000e5 +18 1 17 32 0.32768000000000000000e5 +18 1 20 35 0.65536000000000000000e5 +18 1 26 29 0.65536000000000000000e5 +18 1 26 33 0.32768000000000000000e5 +18 2 6 20 -0.65536000000000000000e5 +18 2 14 20 0.65536000000000000000e5 +18 3 2 7 0.65536000000000000000e5 +18 3 2 15 0.65536000000000000000e5 +18 3 5 18 0.65536000000000000000e5 +18 3 7 20 -0.65536000000000000000e5 +18 3 14 19 0.13107200000000000000e6 +18 3 17 18 0.65536000000000000000e5 +18 4 10 10 0.65536000000000000000e5 +19 1 2 9 -0.65536000000000000000e5 +19 1 17 32 0.32768000000000000000e5 +19 1 26 33 0.32768000000000000000e5 +19 3 2 7 0.65536000000000000000e5 +19 3 2 15 0.65536000000000000000e5 +19 3 5 18 0.65536000000000000000e5 +20 1 1 32 -0.32768000000000000000e5 +20 1 2 33 -0.32768000000000000000e5 +20 1 3 26 -0.32768000000000000000e5 +20 1 16 35 0.32768000000000000000e5 +20 1 17 32 -0.32768000000000000000e5 +20 1 26 29 0.65536000000000000000e5 +20 1 26 33 -0.32768000000000000000e5 +20 2 11 17 -0.32768000000000000000e5 +20 2 17 17 -0.65536000000000000000e5 +20 3 11 12 0.32768000000000000000e5 +20 3 17 18 -0.32768000000000000000e5 +21 1 7 22 -0.81920000000000000000e4 +21 1 8 23 -0.16384000000000000000e5 +21 1 11 26 -0.81920000000000000000e4 +21 1 13 28 -0.16384000000000000000e5 +21 1 16 23 -0.81920000000000000000e4 +21 1 22 25 -0.32768000000000000000e5 +21 1 25 34 0.32768000000000000000e5 +21 2 5 19 -0.81920000000000000000e4 +21 2 14 16 -0.16384000000000000000e5 +21 2 16 16 -0.65536000000000000000e5 +21 3 3 16 0.81920000000000000000e4 +21 3 9 14 0.16384000000000000000e5 +21 3 10 19 -0.32768000000000000000e5 +22 1 14 29 -0.65536000000000000000e5 +22 1 23 30 0.32768000000000000000e5 +22 1 30 31 0.32768000000000000000e5 +23 1 7 22 -0.16384000000000000000e5 +23 1 11 26 -0.32768000000000000000e5 +23 1 12 27 -0.16384000000000000000e5 +23 1 13 28 -0.32768000000000000000e5 +23 1 16 23 -0.16384000000000000000e5 +23 1 16 31 0.16384000000000000000e5 +23 1 22 29 0.16384000000000000000e5 +23 1 25 32 0.32768000000000000000e5 +23 2 5 19 -0.16384000000000000000e5 +23 2 14 16 -0.32768000000000000000e5 +23 3 3 16 0.16384000000000000000e5 +23 3 6 19 -0.16384000000000000000e5 +23 4 6 10 -0.16384000000000000000e5 +24 1 12 35 0.32768000000000000000e5 +24 1 13 28 -0.65536000000000000000e5 +24 1 22 29 0.32768000000000000000e5 +25 1 7 22 0.32768000000000000000e5 +25 1 8 23 -0.65536000000000000000e5 +25 1 29 30 0.32768000000000000000e5 +25 3 3 16 -0.32768000000000000000e5 +25 3 6 19 -0.32768000000000000000e5 +25 3 9 14 0.65536000000000000000e5 +26 1 11 26 -0.32768000000000000000e5 +26 1 16 23 -0.32768000000000000000e5 +26 1 16 31 0.32768000000000000000e5 +26 2 5 19 -0.32768000000000000000e5 +26 3 6 19 -0.32768000000000000000e5 +26 3 14 19 -0.32768000000000000000e5 +27 1 2 9 -0.32768000000000000000e5 +27 1 3 34 -0.32768000000000000000e5 +27 1 7 22 0.65536000000000000000e5 +27 1 12 27 -0.65536000000000000000e5 +27 1 19 34 0.32768000000000000000e5 +27 2 6 20 -0.32768000000000000000e5 +27 3 2 7 0.32768000000000000000e5 +27 3 2 15 0.32768000000000000000e5 +27 3 3 16 -0.65536000000000000000e5 +27 3 5 18 0.32768000000000000000e5 +27 3 6 19 -0.65536000000000000000e5 +28 1 2 9 -0.32768000000000000000e5 +28 2 6 20 -0.32768000000000000000e5 +28 3 2 7 0.32768000000000000000e5 +28 3 2 15 0.32768000000000000000e5 +28 3 5 18 0.32768000000000000000e5 +28 3 6 19 -0.65536000000000000000e5 +28 3 7 20 -0.32768000000000000000e5 +29 1 2 9 0.65536000000000000000e5 +29 1 3 34 0.32768000000000000000e5 +29 1 11 26 -0.65536000000000000000e5 +29 1 26 29 -0.32768000000000000000e5 +29 2 6 20 0.32768000000000000000e5 +29 2 14 20 -0.32768000000000000000e5 +29 3 2 7 -0.65536000000000000000e5 +29 3 2 15 -0.65536000000000000000e5 +29 3 5 18 -0.65536000000000000000e5 +29 3 7 20 0.32768000000000000000e5 +29 3 14 19 -0.65536000000000000000e5 +30 1 1 32 0.16384000000000000000e5 +30 1 2 33 0.16384000000000000000e5 +30 1 3 26 0.16384000000000000000e5 +30 1 16 23 -0.65536000000000000000e5 +30 1 26 29 0.32768000000000000000e5 +30 2 11 17 0.16384000000000000000e5 +30 3 11 12 -0.16384000000000000000e5 +31 1 1 8 -0.65536000000000000000e5 +31 1 2 33 0.32768000000000000000e5 +31 1 3 26 -0.32768000000000000000e5 +31 1 3 34 -0.13107200000000000000e6 +31 1 4 35 0.32768000000000000000e5 +31 1 5 28 -0.32768000000000000000e5 +31 1 6 21 0.13107200000000000000e6 +31 1 7 22 0.13107200000000000000e6 +31 1 11 26 -0.13107200000000000000e6 +31 1 26 33 -0.32768000000000000000e5 +31 2 1 15 -0.65536000000000000000e5 +31 2 3 17 -0.32768000000000000000e5 +31 2 4 18 -0.32768000000000000000e5 +31 2 6 12 0.65536000000000000000e5 +31 2 6 20 -0.65536000000000000000e5 +31 2 12 18 0.65536000000000000000e5 +31 2 18 18 -0.65536000000000000000e5 +31 3 1 6 0.65536000000000000000e5 +31 3 2 15 -0.65536000000000000000e5 +31 3 3 16 -0.13107200000000000000e6 +31 3 4 17 -0.32768000000000000000e5 +31 3 5 18 0.65536000000000000000e5 +31 3 6 11 -0.65536000000000000000e5 +31 3 6 19 -0.13107200000000000000e6 +31 3 7 20 -0.65536000000000000000e5 +31 3 13 18 0.65536000000000000000e5 +31 3 17 18 -0.32768000000000000000e5 +31 4 4 8 -0.65536000000000000000e5 +31 4 8 8 0.65536000000000000000e5 +32 1 1 8 -0.65536000000000000000e5 +32 1 2 33 -0.32768000000000000000e5 +32 1 3 34 0.65536000000000000000e5 +32 1 6 21 0.13107200000000000000e6 +32 1 11 26 -0.13107200000000000000e6 +32 2 1 15 -0.65536000000000000000e5 +32 2 6 12 0.65536000000000000000e5 +32 2 12 18 -0.32768000000000000000e5 +32 3 1 6 0.65536000000000000000e5 +32 3 2 15 -0.65536000000000000000e5 +32 3 6 11 -0.65536000000000000000e5 +32 3 13 18 -0.32768000000000000000e5 +32 4 4 8 -0.65536000000000000000e5 +33 1 2 9 -0.65536000000000000000e5 +33 1 2 33 0.32768000000000000000e5 +33 1 26 33 0.32768000000000000000e5 +33 3 2 7 0.65536000000000000000e5 +33 3 2 15 0.65536000000000000000e5 +33 3 17 18 0.32768000000000000000e5 +34 1 1 8 0.65536000000000000000e5 +34 1 2 9 0.65536000000000000000e5 +34 1 3 26 0.32768000000000000000e5 +34 1 6 21 -0.13107200000000000000e6 +34 1 17 32 0.32768000000000000000e5 +34 2 1 15 0.65536000000000000000e5 +34 3 1 6 -0.65536000000000000000e5 +34 3 2 7 -0.65536000000000000000e5 +34 3 6 11 0.65536000000000000000e5 +34 3 11 12 -0.32768000000000000000e5 +35 1 1 8 -0.65536000000000000000e5 +35 1 1 32 0.32768000000000000000e5 +35 1 17 32 -0.32768000000000000000e5 +35 1 26 29 0.65536000000000000000e5 +35 1 26 33 -0.32768000000000000000e5 +35 2 17 17 -0.65536000000000000000e5 +35 3 1 6 0.65536000000000000000e5 +35 3 1 14 0.65536000000000000000e5 +35 3 17 18 -0.32768000000000000000e5 +36 1 7 22 0.40960000000000000000e4 +36 1 8 15 -0.32768000000000000000e5 +36 1 8 23 0.81920000000000000000e4 +36 1 10 25 -0.32768000000000000000e5 +36 1 11 26 0.40960000000000000000e4 +36 1 13 28 0.81920000000000000000e4 +36 1 14 29 0.16384000000000000000e5 +36 1 15 22 -0.32768000000000000000e5 +36 1 15 34 0.32768000000000000000e5 +36 1 16 23 0.40960000000000000000e4 +36 1 22 25 0.16384000000000000000e5 +36 2 5 19 0.40960000000000000000e4 +36 2 10 16 -0.32768000000000000000e5 +36 2 14 16 0.81920000000000000000e4 +36 2 16 16 0.32768000000000000000e5 +36 3 3 16 -0.40960000000000000000e4 +36 3 9 10 0.32768000000000000000e5 +36 3 9 14 -0.81920000000000000000e4 +37 1 8 15 -0.65536000000000000000e5 +37 1 14 29 0.32768000000000000000e5 +37 1 24 31 0.32768000000000000000e5 +37 3 9 10 0.65536000000000000000e5 +38 1 7 22 0.81920000000000000000e4 +38 1 8 23 0.16384000000000000000e5 +38 1 10 25 -0.65536000000000000000e5 +38 1 11 26 0.81920000000000000000e4 +38 1 13 28 0.16384000000000000000e5 +38 1 14 29 0.32768000000000000000e5 +38 1 16 23 0.81920000000000000000e4 +38 2 5 19 0.81920000000000000000e4 +38 2 14 16 0.16384000000000000000e5 +38 3 3 16 -0.81920000000000000000e4 +38 3 9 14 -0.16384000000000000000e5 +38 3 10 19 -0.32768000000000000000e5 +39 1 13 28 0.32768000000000000000e5 +39 1 14 21 -0.65536000000000000000e5 +39 1 25 28 0.32768000000000000000e5 +40 1 1 8 0.81920000000000000000e4 +40 1 5 20 -0.81920000000000000000e4 +40 1 6 21 -0.32768000000000000000e5 +40 1 7 22 -0.16384000000000000000e5 +40 1 8 23 0.32768000000000000000e5 +40 1 9 24 0.32768000000000000000e5 +40 1 14 21 -0.65536000000000000000e5 +40 1 23 30 0.32768000000000000000e5 +40 2 1 15 0.81920000000000000000e4 +40 2 2 16 -0.16384000000000000000e5 +40 2 6 12 -0.81920000000000000000e4 +40 2 9 15 0.32768000000000000000e5 +40 2 10 12 -0.32768000000000000000e5 +40 3 1 6 -0.81920000000000000000e4 +40 3 9 14 -0.32768000000000000000e5 +41 1 7 22 0.16384000000000000000e5 +41 1 8 23 0.32768000000000000000e5 +41 1 12 27 -0.16384000000000000000e5 +41 1 13 20 -0.65536000000000000000e5 +41 1 16 23 0.16384000000000000000e5 +41 1 16 31 0.16384000000000000000e5 +41 1 22 29 0.16384000000000000000e5 +41 2 5 19 0.16384000000000000000e5 +41 3 3 16 -0.16384000000000000000e5 +41 3 6 19 -0.16384000000000000000e5 +41 3 9 14 -0.32768000000000000000e5 +41 4 6 10 -0.16384000000000000000e5 +42 1 7 22 -0.32768000000000000000e5 +42 1 8 23 0.65536000000000000000e5 +42 1 9 24 0.65536000000000000000e5 +42 1 12 27 0.32768000000000000000e5 +42 1 14 21 -0.13107200000000000000e6 +42 1 22 29 -0.32768000000000000000e5 +42 1 23 30 0.65536000000000000000e5 +42 2 9 15 0.65536000000000000000e5 +42 2 16 18 -0.32768000000000000000e5 +42 3 3 16 0.32768000000000000000e5 +42 3 6 19 0.32768000000000000000e5 +43 1 7 22 0.32768000000000000000e5 +43 1 8 23 -0.65536000000000000000e5 +43 1 22 29 0.32768000000000000000e5 +43 3 3 16 -0.32768000000000000000e5 +44 1 1 8 0.16384000000000000000e5 +44 1 5 20 -0.16384000000000000000e5 +44 1 6 21 -0.65536000000000000000e5 +44 1 11 26 0.32768000000000000000e5 +44 2 1 15 0.16384000000000000000e5 +44 2 2 16 -0.32768000000000000000e5 +44 2 6 12 -0.16384000000000000000e5 +44 3 1 6 -0.16384000000000000000e5 +44 3 3 16 -0.32768000000000000000e5 +44 3 6 19 -0.32768000000000000000e5 +45 1 1 8 -0.16384000000000000000e5 +45 1 5 20 0.16384000000000000000e5 +45 1 6 21 0.65536000000000000000e5 +45 1 7 22 0.32768000000000000000e5 +45 1 8 23 0.65536000000000000000e5 +45 1 13 20 -0.13107200000000000000e6 +45 1 16 23 0.32768000000000000000e5 +45 1 16 31 0.32768000000000000000e5 +45 2 1 15 -0.16384000000000000000e5 +45 2 2 16 0.32768000000000000000e5 +45 2 6 12 0.16384000000000000000e5 +45 2 8 14 0.65536000000000000000e5 +45 3 1 6 0.16384000000000000000e5 +46 1 2 33 -0.16384000000000000000e5 +46 1 3 26 0.16384000000000000000e5 +46 1 3 34 0.32768000000000000000e5 +46 1 4 35 -0.16384000000000000000e5 +46 1 5 20 0.32768000000000000000e5 +46 1 5 28 0.16384000000000000000e5 +46 1 7 22 -0.65536000000000000000e5 +46 1 12 27 -0.65536000000000000000e5 +46 1 22 29 0.65536000000000000000e5 +46 2 3 17 0.16384000000000000000e5 +46 2 4 18 0.16384000000000000000e5 +46 2 6 20 0.32768000000000000000e5 +46 2 12 18 -0.32768000000000000000e5 +46 2 13 19 -0.32768000000000000000e5 +46 3 2 15 0.32768000000000000000e5 +46 3 3 16 0.13107200000000000000e6 +46 3 4 17 0.16384000000000000000e5 +46 3 5 18 -0.32768000000000000000e5 +46 3 6 11 0.32768000000000000000e5 +46 3 6 19 0.65536000000000000000e5 +46 3 9 14 -0.13107200000000000000e6 +46 3 13 18 -0.16384000000000000000e5 +46 4 4 8 0.32768000000000000000e5 +46 4 5 9 0.65536000000000000000e5 +46 4 8 8 -0.32768000000000000000e5 +47 1 1 8 0.32768000000000000000e5 +47 1 2 9 -0.32768000000000000000e5 +47 1 3 34 -0.32768000000000000000e5 +47 1 6 21 -0.65536000000000000000e5 +47 1 11 26 0.65536000000000000000e5 +47 2 1 15 0.32768000000000000000e5 +47 2 6 12 -0.32768000000000000000e5 +47 2 6 20 -0.32768000000000000000e5 +47 3 1 6 -0.32768000000000000000e5 +47 3 2 7 0.32768000000000000000e5 +47 3 2 15 0.65536000000000000000e5 +47 3 3 16 -0.65536000000000000000e5 +47 3 5 18 0.32768000000000000000e5 +47 3 6 11 0.32768000000000000000e5 +47 3 6 19 -0.65536000000000000000e5 +47 4 4 8 0.32768000000000000000e5 +48 1 1 8 0.32768000000000000000e5 +48 1 2 9 0.32768000000000000000e5 +48 1 3 34 0.32768000000000000000e5 +48 1 5 20 -0.32768000000000000000e5 +48 1 6 21 -0.65536000000000000000e5 +48 2 1 15 0.32768000000000000000e5 +48 2 6 12 -0.32768000000000000000e5 +48 3 1 6 -0.32768000000000000000e5 +48 3 2 7 -0.32768000000000000000e5 +48 3 2 15 -0.32768000000000000000e5 +49 1 1 8 -0.32768000000000000000e5 +49 2 1 15 -0.32768000000000000000e5 +49 3 1 6 0.32768000000000000000e5 +49 3 2 15 -0.32768000000000000000e5 +49 3 5 18 -0.32768000000000000000e5 +49 3 6 11 -0.32768000000000000000e5 +50 1 1 8 -0.32768000000000000000e5 +50 1 1 32 0.16384000000000000000e5 +50 1 2 33 0.16384000000000000000e5 +50 1 3 26 0.16384000000000000000e5 +50 1 5 20 0.65536000000000000000e5 +50 1 6 21 0.26214400000000000000e6 +50 1 7 22 0.65536000000000000000e5 +50 1 8 23 0.13107200000000000000e6 +50 1 13 20 -0.26214400000000000000e6 +50 2 1 15 -0.65536000000000000000e5 +50 2 2 8 0.65536000000000000000e5 +50 2 2 16 0.65536000000000000000e5 +50 2 6 12 0.65536000000000000000e5 +50 2 8 14 0.13107200000000000000e6 +50 2 11 17 0.16384000000000000000e5 +50 3 1 6 0.32768000000000000000e5 +50 3 1 14 -0.32768000000000000000e5 +50 3 11 12 -0.16384000000000000000e5 +50 4 4 4 -0.13107200000000000000e6 +51 1 1 8 0.65536000000000000000e5 +51 1 2 9 -0.65536000000000000000e5 +51 1 2 33 0.32768000000000000000e5 +51 1 3 26 0.32768000000000000000e5 +51 1 3 34 -0.13107200000000000000e6 +51 1 5 20 0.65536000000000000000e5 +51 1 6 21 -0.13107200000000000000e6 +51 1 11 26 0.13107200000000000000e6 +51 2 1 15 0.65536000000000000000e5 +51 2 3 17 0.32768000000000000000e5 +51 2 4 14 0.65536000000000000000e5 +51 2 4 20 -0.32768000000000000000e5 +51 2 6 12 -0.65536000000000000000e5 +51 2 6 20 -0.65536000000000000000e5 +51 3 1 6 -0.65536000000000000000e5 +51 3 2 7 0.65536000000000000000e5 +51 3 2 15 0.19660800000000000000e6 +51 3 3 16 -0.13107200000000000000e6 +51 3 5 18 0.65536000000000000000e5 +51 3 6 11 0.65536000000000000000e5 +51 3 6 19 -0.13107200000000000000e6 +51 4 4 8 0.65536000000000000000e5 +51 4 8 8 -0.65536000000000000000e5 +52 1 2 33 -0.32768000000000000000e5 +52 1 3 34 0.65536000000000000000e5 +52 1 5 20 -0.65536000000000000000e5 +52 2 12 18 -0.32768000000000000000e5 +52 3 4 17 0.32768000000000000000e5 +53 1 3 26 -0.32768000000000000000e5 +53 2 3 17 -0.32768000000000000000e5 +53 3 2 15 -0.65536000000000000000e5 +53 3 4 17 -0.32768000000000000000e5 +54 1 1 8 0.65536000000000000000e5 +54 1 2 9 0.65536000000000000000e5 +54 1 2 33 0.32768000000000000000e5 +54 1 3 26 0.32768000000000000000e5 +54 1 6 21 -0.13107200000000000000e6 +54 2 1 15 0.65536000000000000000e5 +54 3 1 6 -0.65536000000000000000e5 +54 3 2 7 -0.65536000000000000000e5 +55 1 1 8 -0.13107200000000000000e6 +55 1 2 9 -0.13107200000000000000e6 +55 1 2 33 -0.32768000000000000000e5 +55 1 3 26 0.32768000000000000000e5 +55 1 3 34 0.65536000000000000000e5 +55 1 4 35 -0.32768000000000000000e5 +55 1 6 21 0.13107200000000000000e6 +55 2 1 15 -0.65536000000000000000e5 +55 2 3 17 0.32768000000000000000e5 +55 2 11 17 -0.32768000000000000000e5 +55 2 12 18 -0.32768000000000000000e5 +55 3 1 6 0.13107200000000000000e6 +55 3 2 7 0.13107200000000000000e6 +55 3 2 15 0.65536000000000000000e5 +55 3 4 17 0.32768000000000000000e5 +55 3 6 11 -0.65536000000000000000e5 +55 3 11 12 -0.32768000000000000000e5 +55 3 13 18 -0.32768000000000000000e5 +55 4 7 7 -0.65536000000000000000e5 +56 1 1 32 0.32768000000000000000e5 +56 1 2 9 0.65536000000000000000e5 +56 1 2 33 0.32768000000000000000e5 +56 1 3 26 -0.32768000000000000000e5 +56 1 3 34 -0.65536000000000000000e5 +56 1 4 35 0.32768000000000000000e5 +56 1 5 20 0.13107200000000000000e6 +56 1 6 21 0.52428800000000000000e6 +56 1 7 22 0.13107200000000000000e6 +56 1 8 23 0.26214400000000000000e6 +56 1 13 20 -0.52428800000000000000e6 +56 2 1 15 -0.13107200000000000000e6 +56 2 2 8 0.13107200000000000000e6 +56 2 2 16 0.13107200000000000000e6 +56 2 3 17 -0.32768000000000000000e5 +56 2 5 11 0.65536000000000000000e5 +56 2 6 12 0.13107200000000000000e6 +56 2 8 14 0.26214400000000000000e6 +56 2 11 11 -0.65536000000000000000e5 +56 2 11 17 0.32768000000000000000e5 +56 2 12 18 0.32768000000000000000e5 +56 3 1 14 -0.65536000000000000000e5 +56 3 2 7 -0.65536000000000000000e5 +56 3 2 15 -0.65536000000000000000e5 +56 3 4 17 -0.32768000000000000000e5 +56 3 6 11 0.65536000000000000000e5 +56 3 13 18 0.32768000000000000000e5 +56 4 4 4 -0.26214400000000000000e6 +56 4 7 7 0.65536000000000000000e5 +57 1 1 8 -0.10240000000000000000e4 +57 1 4 15 -0.81920000000000000000e4 +57 1 5 20 0.10240000000000000000e4 +57 1 6 21 0.40960000000000000000e4 +57 1 7 14 -0.81920000000000000000e4 +57 1 7 22 0.20480000000000000000e4 +57 1 9 24 -0.40960000000000000000e4 +57 1 10 13 -0.16384000000000000000e5 +57 1 12 15 -0.32768000000000000000e5 +57 1 13 14 -0.32768000000000000000e5 +57 1 14 21 0.16384000000000000000e5 +57 1 15 22 0.16384000000000000000e5 +57 1 25 25 0.65536000000000000000e5 +57 2 1 15 -0.10240000000000000000e4 +57 2 2 16 0.20480000000000000000e4 +57 2 6 12 0.10240000000000000000e4 +57 2 8 10 -0.16384000000000000000e5 +57 2 9 15 -0.40960000000000000000e4 +57 2 10 10 -0.65536000000000000000e5 +57 2 10 12 0.40960000000000000000e4 +57 2 10 16 0.16384000000000000000e5 +57 3 1 6 0.10240000000000000000e4 +57 3 5 10 -0.81920000000000000000e4 +57 3 9 10 -0.16384000000000000000e5 +57 4 6 6 -0.16384000000000000000e5 +58 1 8 15 0.32768000000000000000e5 +58 1 13 14 -0.65536000000000000000e5 +58 1 15 30 0.32768000000000000000e5 +58 3 9 10 -0.32768000000000000000e5 +59 1 1 8 -0.20480000000000000000e4 +59 1 4 15 -0.16384000000000000000e5 +59 1 5 20 0.20480000000000000000e4 +59 1 6 21 0.81920000000000000000e4 +59 1 7 14 -0.16384000000000000000e5 +59 1 7 22 0.81920000000000000000e4 +59 1 8 15 -0.32768000000000000000e5 +59 1 8 23 0.81920000000000000000e4 +59 1 9 24 -0.81920000000000000000e4 +59 1 10 13 -0.32768000000000000000e5 +59 1 11 26 0.40960000000000000000e4 +59 1 13 28 0.81920000000000000000e4 +59 1 14 21 0.32768000000000000000e5 +59 1 14 29 0.16384000000000000000e5 +59 1 16 23 0.40960000000000000000e4 +59 1 22 25 0.16384000000000000000e5 +59 2 1 15 -0.20480000000000000000e4 +59 2 2 16 0.40960000000000000000e4 +59 2 5 19 0.40960000000000000000e4 +59 2 6 12 0.20480000000000000000e4 +59 2 8 10 -0.32768000000000000000e5 +59 2 9 15 -0.81920000000000000000e4 +59 2 10 12 0.81920000000000000000e4 +59 2 14 16 0.81920000000000000000e4 +59 2 16 16 0.32768000000000000000e5 +59 3 1 6 0.20480000000000000000e4 +59 3 3 16 -0.40960000000000000000e4 +59 3 5 10 -0.16384000000000000000e5 +59 3 9 14 -0.81920000000000000000e4 +59 4 6 6 -0.32768000000000000000e5 +60 1 8 15 -0.65536000000000000000e5 +60 1 14 21 0.32768000000000000000e5 +60 1 22 25 0.32768000000000000000e5 +61 1 1 8 -0.81920000000000000000e4 +61 1 4 15 -0.32768000000000000000e5 +61 1 5 20 0.81920000000000000000e4 +61 1 6 21 0.32768000000000000000e5 +61 1 7 14 -0.32768000000000000000e5 +61 1 7 22 0.16384000000000000000e5 +61 1 9 24 -0.32768000000000000000e5 +61 1 10 25 -0.65536000000000000000e5 +61 1 14 21 0.98304000000000000000e5 +61 1 14 29 0.32768000000000000000e5 +61 2 1 15 -0.81920000000000000000e4 +61 2 2 16 0.16384000000000000000e5 +61 2 6 12 0.81920000000000000000e4 +61 2 9 15 -0.32768000000000000000e5 +61 2 10 12 0.32768000000000000000e5 +61 3 1 6 0.81920000000000000000e4 +61 3 5 10 -0.32768000000000000000e5 +61 4 6 6 -0.65536000000000000000e5 +62 1 7 22 0.81920000000000000000e4 +62 1 8 23 0.16384000000000000000e5 +62 1 10 13 -0.65536000000000000000e5 +62 1 11 26 0.81920000000000000000e4 +62 1 13 20 0.32768000000000000000e5 +62 1 13 28 0.16384000000000000000e5 +62 1 16 23 0.81920000000000000000e4 +62 2 5 19 0.81920000000000000000e4 +62 2 14 16 0.16384000000000000000e5 +62 3 3 16 -0.81920000000000000000e4 +62 3 9 14 -0.16384000000000000000e5 +63 1 4 15 -0.65536000000000000000e5 +63 1 8 23 -0.65536000000000000000e5 +63 1 9 24 -0.32768000000000000000e5 +63 1 13 28 -0.32768000000000000000e5 +63 1 14 21 0.65536000000000000000e5 +63 1 14 29 0.65536000000000000000e5 +63 2 9 15 -0.32768000000000000000e5 +63 2 9 19 -0.32768000000000000000e5 +63 3 9 14 0.32768000000000000000e5 +64 1 7 14 -0.65536000000000000000e5 +64 1 8 23 0.32768000000000000000e5 +64 1 13 28 0.32768000000000000000e5 +65 1 1 8 -0.81920000000000000000e4 +65 1 5 20 0.81920000000000000000e4 +65 1 6 21 0.32768000000000000000e5 +65 1 7 22 0.16384000000000000000e5 +65 1 8 23 0.32768000000000000000e5 +65 1 13 20 -0.65536000000000000000e5 +65 2 1 15 -0.81920000000000000000e4 +65 2 2 16 0.16384000000000000000e5 +65 2 6 12 0.81920000000000000000e4 +65 3 1 6 0.81920000000000000000e4 +65 3 5 10 -0.65536000000000000000e5 +65 3 9 14 -0.32768000000000000000e5 +66 1 1 8 0.81920000000000000000e4 +66 1 5 20 -0.81920000000000000000e4 +66 1 6 13 -0.65536000000000000000e5 +66 1 6 21 -0.32768000000000000000e5 +66 1 8 23 -0.32768000000000000000e5 +66 1 11 26 0.16384000000000000000e5 +66 1 13 20 0.65536000000000000000e5 +66 1 16 23 0.16384000000000000000e5 +66 2 1 15 0.81920000000000000000e4 +66 2 2 16 -0.16384000000000000000e5 +66 2 5 19 0.16384000000000000000e5 +66 2 6 12 -0.81920000000000000000e4 +66 2 8 14 -0.32768000000000000000e5 +66 3 1 6 -0.81920000000000000000e4 +66 3 3 16 -0.16384000000000000000e5 +67 1 1 8 0.16384000000000000000e5 +67 1 4 11 0.32768000000000000000e5 +67 1 4 15 -0.13107200000000000000e6 +67 1 5 20 -0.16384000000000000000e5 +67 1 6 21 -0.32768000000000000000e5 +67 1 7 22 -0.32768000000000000000e5 +67 1 9 12 0.65536000000000000000e5 +67 1 11 26 0.65536000000000000000e5 +67 1 12 27 0.32768000000000000000e5 +67 1 13 28 0.65536000000000000000e5 +67 2 1 15 0.16384000000000000000e5 +67 2 3 9 0.32768000000000000000e5 +67 2 4 10 0.65536000000000000000e5 +67 2 6 12 -0.16384000000000000000e5 +67 2 15 15 -0.65536000000000000000e5 +67 3 1 6 -0.16384000000000000000e5 +67 3 3 8 0.32768000000000000000e5 +67 3 3 16 -0.32768000000000000000e5 +67 3 4 9 0.32768000000000000000e5 +67 3 9 14 0.13107200000000000000e6 +67 4 5 9 -0.65536000000000000000e5 +68 1 4 11 -0.32768000000000000000e5 +68 1 7 22 0.32768000000000000000e5 +68 1 11 26 -0.32768000000000000000e5 +68 2 3 9 -0.32768000000000000000e5 +68 3 3 8 -0.32768000000000000000e5 +68 3 3 16 0.32768000000000000000e5 +68 3 4 9 -0.32768000000000000000e5 +68 3 9 14 -0.65536000000000000000e5 +68 4 5 9 0.32768000000000000000e5 +69 1 3 10 -0.32768000000000000000e5 +69 1 4 11 -0.32768000000000000000e5 +69 1 7 22 0.32768000000000000000e5 +69 2 2 16 -0.32768000000000000000e5 +69 3 3 8 -0.32768000000000000000e5 +69 3 3 16 -0.32768000000000000000e5 +69 4 2 6 -0.32768000000000000000e5 +70 1 1 8 -0.16384000000000000000e5 +70 1 3 10 0.32768000000000000000e5 +70 1 4 11 0.65536000000000000000e5 +70 1 5 20 0.16384000000000000000e5 +70 1 6 21 0.65536000000000000000e5 +70 1 11 26 0.65536000000000000000e5 +70 1 12 27 0.32768000000000000000e5 +70 1 13 20 -0.13107200000000000000e6 +70 2 1 15 -0.16384000000000000000e5 +70 2 2 16 0.32768000000000000000e5 +70 2 3 9 0.32768000000000000000e5 +70 2 6 8 0.65536000000000000000e5 +70 2 6 12 0.16384000000000000000e5 +70 3 1 6 0.16384000000000000000e5 +70 3 3 8 0.65536000000000000000e5 +70 3 3 16 -0.32768000000000000000e5 +70 3 4 9 0.32768000000000000000e5 +70 3 5 10 -0.13107200000000000000e6 +70 3 9 14 0.65536000000000000000e5 +70 4 2 6 0.32768000000000000000e5 +70 4 5 9 -0.32768000000000000000e5 +71 1 1 10 -0.32768000000000000000e5 +71 1 3 10 0.32768000000000000000e5 +71 1 4 11 0.65536000000000000000e5 +71 1 6 21 -0.65536000000000000000e5 +71 1 7 22 -0.32768000000000000000e5 +71 1 8 23 -0.65536000000000000000e5 +71 1 11 26 0.32768000000000000000e5 +71 1 12 27 0.32768000000000000000e5 +71 1 16 23 0.32768000000000000000e5 +71 2 3 9 0.32768000000000000000e5 +71 2 5 5 -0.65536000000000000000e5 +71 2 6 8 0.65536000000000000000e5 +71 2 8 14 -0.65536000000000000000e5 +71 3 3 8 0.98304000000000000000e5 +71 3 3 16 -0.32768000000000000000e5 +71 3 4 9 0.32768000000000000000e5 +71 3 5 10 -0.13107200000000000000e6 +71 3 9 14 0.65536000000000000000e5 +71 4 2 6 0.32768000000000000000e5 +71 4 4 4 0.65536000000000000000e5 +71 4 5 9 -0.32768000000000000000e5 +72 1 1 8 -0.32768000000000000000e5 +72 1 2 9 -0.32768000000000000000e5 +72 1 6 21 0.65536000000000000000e5 +72 1 7 22 0.65536000000000000000e5 +72 1 11 26 -0.65536000000000000000e5 +72 1 12 27 -0.65536000000000000000e5 +72 1 19 22 0.32768000000000000000e5 +72 2 1 15 -0.32768000000000000000e5 +72 2 4 14 -0.32768000000000000000e5 +72 2 6 12 0.32768000000000000000e5 +72 3 1 6 0.32768000000000000000e5 +72 3 2 7 0.32768000000000000000e5 +72 3 3 16 0.65536000000000000000e5 +72 3 4 9 -0.65536000000000000000e5 +72 3 9 14 -0.13107200000000000000e6 +72 4 5 9 0.65536000000000000000e5 +73 1 1 8 0.32768000000000000000e5 +73 1 2 9 -0.32768000000000000000e5 +73 1 2 33 -0.16384000000000000000e5 +73 1 3 26 0.16384000000000000000e5 +73 1 3 34 0.32768000000000000000e5 +73 1 4 11 -0.65536000000000000000e5 +73 1 4 35 -0.16384000000000000000e5 +73 1 5 20 0.32768000000000000000e5 +73 1 5 28 0.16384000000000000000e5 +73 1 6 21 -0.65536000000000000000e5 +73 1 11 26 0.65536000000000000000e5 +73 2 1 15 0.32768000000000000000e5 +73 2 3 17 0.16384000000000000000e5 +73 2 4 18 0.16384000000000000000e5 +73 2 6 12 -0.32768000000000000000e5 +73 2 12 18 -0.32768000000000000000e5 +73 3 1 6 -0.32768000000000000000e5 +73 3 2 7 0.32768000000000000000e5 +73 3 2 15 0.65536000000000000000e5 +73 3 4 17 0.16384000000000000000e5 +73 3 6 11 0.32768000000000000000e5 +73 3 13 18 -0.16384000000000000000e5 +73 4 4 8 0.32768000000000000000e5 +73 4 8 8 -0.32768000000000000000e5 +74 1 1 8 0.65536000000000000000e5 +74 1 2 9 0.32768000000000000000e5 +74 1 5 20 -0.32768000000000000000e5 +74 1 6 21 -0.13107200000000000000e6 +74 1 11 26 0.65536000000000000000e5 +74 2 1 15 0.65536000000000000000e5 +74 2 6 12 -0.65536000000000000000e5 +74 3 1 6 -0.65536000000000000000e5 +74 3 2 7 -0.32768000000000000000e5 +74 3 2 15 0.32768000000000000000e5 +74 3 3 8 -0.65536000000000000000e5 +74 3 6 11 0.32768000000000000000e5 +74 4 4 8 0.32768000000000000000e5 +75 1 1 8 -0.32768000000000000000e5 +75 1 3 10 -0.65536000000000000000e5 +75 1 6 21 0.65536000000000000000e5 +75 2 1 15 -0.32768000000000000000e5 +75 3 1 6 0.32768000000000000000e5 +75 3 2 15 -0.32768000000000000000e5 +76 1 1 8 -0.65536000000000000000e5 +76 1 2 9 -0.32768000000000000000e5 +76 1 3 10 0.13107200000000000000e6 +76 1 4 11 0.13107200000000000000e6 +76 1 5 20 0.65536000000000000000e5 +76 1 6 21 0.19660800000000000000e6 +76 1 11 26 0.65536000000000000000e5 +76 1 12 27 0.65536000000000000000e5 +76 1 13 20 -0.26214400000000000000e6 +76 2 1 15 -0.98304000000000000000e5 +76 2 2 8 0.65536000000000000000e5 +76 2 2 16 0.65536000000000000000e5 +76 2 3 9 0.65536000000000000000e5 +76 2 6 8 0.13107200000000000000e6 +76 2 6 12 0.65536000000000000000e5 +76 3 1 6 0.65536000000000000000e5 +76 3 2 7 0.32768000000000000000e5 +76 3 3 8 0.19660800000000000000e6 +76 3 3 16 -0.65536000000000000000e5 +76 3 4 9 0.65536000000000000000e5 +76 3 5 10 -0.26214400000000000000e6 +76 3 6 11 -0.32768000000000000000e5 +76 3 9 14 0.13107200000000000000e6 +76 4 2 6 0.65536000000000000000e5 +76 4 5 9 -0.65536000000000000000e5 +77 1 1 8 0.98304000000000000000e5 +77 1 1 10 -0.65536000000000000000e5 +77 1 2 9 0.32768000000000000000e5 +77 1 5 20 -0.65536000000000000000e5 +77 1 6 21 -0.32768000000000000000e6 +77 1 7 22 -0.65536000000000000000e5 +77 1 8 23 -0.13107200000000000000e6 +77 1 13 20 0.26214400000000000000e6 +77 2 1 15 0.98304000000000000000e5 +77 2 2 8 -0.65536000000000000000e5 +77 2 2 16 -0.65536000000000000000e5 +77 2 5 11 -0.32768000000000000000e5 +77 2 6 12 -0.65536000000000000000e5 +77 2 8 14 -0.13107200000000000000e6 +77 3 1 6 -0.98304000000000000000e5 +77 3 1 14 -0.32768000000000000000e5 +77 3 2 7 -0.32768000000000000000e5 +77 4 4 4 0.13107200000000000000e6 +78 1 4 19 0.32768000000000000000e5 +78 1 5 8 -0.65536000000000000000e5 +78 1 5 28 0.32768000000000000000e5 +79 1 1 8 0.13107200000000000000e6 +79 1 2 9 0.13107200000000000000e6 +79 1 2 17 0.32768000000000000000e5 +79 1 3 26 0.32768000000000000000e5 +79 1 4 11 -0.13107200000000000000e6 +79 1 5 8 0.65536000000000000000e5 +79 1 6 21 -0.26214400000000000000e6 +79 1 11 26 0.13107200000000000000e6 +79 2 1 15 0.13107200000000000000e6 +79 2 2 12 0.32768000000000000000e5 +79 2 4 6 0.65536000000000000000e5 +79 2 6 12 -0.65536000000000000000e5 +79 2 12 18 -0.32768000000000000000e5 +79 3 1 6 -0.13107200000000000000e6 +79 3 2 7 -0.65536000000000000000e5 +79 3 2 15 0.13107200000000000000e6 +79 3 6 11 0.65536000000000000000e5 +79 4 3 7 -0.32768000000000000000e5 +79 4 4 8 0.65536000000000000000e5 +79 4 8 8 -0.65536000000000000000e5 +80 1 2 9 -0.65536000000000000000e5 +80 1 2 33 -0.32768000000000000000e5 +80 1 3 18 0.32768000000000000000e5 +80 1 3 34 0.65536000000000000000e5 +80 1 4 35 -0.32768000000000000000e5 +80 2 12 18 -0.32768000000000000000e5 +80 3 4 17 0.32768000000000000000e5 +80 3 13 18 -0.32768000000000000000e5 +81 1 2 9 0.65536000000000000000e5 +81 1 2 17 -0.32768000000000000000e5 +81 1 2 33 0.32768000000000000000e5 +81 1 3 10 -0.13107200000000000000e6 +81 1 3 18 -0.32768000000000000000e5 +81 1 3 26 -0.32768000000000000000e5 +81 1 3 34 -0.65536000000000000000e5 +81 1 4 35 0.32768000000000000000e5 +81 1 6 21 0.13107200000000000000e6 +81 2 1 7 0.65536000000000000000e5 +81 2 1 15 -0.65536000000000000000e5 +81 2 2 12 -0.32768000000000000000e5 +81 2 3 17 -0.32768000000000000000e5 +81 2 12 18 0.32768000000000000000e5 +81 3 1 6 0.65536000000000000000e5 +81 3 2 15 -0.65536000000000000000e5 +81 3 4 17 -0.32768000000000000000e5 +81 3 13 18 0.32768000000000000000e5 +82 1 1 8 -0.65536000000000000000e5 +82 1 2 17 0.32768000000000000000e5 +82 1 3 26 0.32768000000000000000e5 +83 1 1 2 -0.32768000000000000000e5 +83 1 1 8 -0.65536000000000000000e5 +83 1 1 16 0.32768000000000000000e5 +83 1 2 5 0.65536000000000000000e5 +83 1 2 9 -0.13107200000000000000e6 +83 1 2 33 -0.32768000000000000000e5 +83 1 3 10 -0.26214400000000000000e6 +83 1 3 18 -0.32768000000000000000e5 +83 1 3 34 0.65536000000000000000e5 +83 1 4 35 -0.32768000000000000000e5 +83 1 5 20 0.13107200000000000000e6 +83 1 6 21 0.91750400000000000000e6 +83 1 7 22 0.13107200000000000000e6 +83 1 8 23 0.26214400000000000000e6 +83 1 13 20 -0.52428800000000000000e6 +83 2 1 3 -0.32768000000000000000e5 +83 2 1 7 0.13107200000000000000e6 +83 2 1 15 -0.32768000000000000000e6 +83 2 2 8 0.13107200000000000000e6 +83 2 2 12 0.32768000000000000000e5 +83 2 2 16 0.13107200000000000000e6 +83 2 3 17 0.32768000000000000000e5 +83 2 5 11 0.65536000000000000000e5 +83 2 6 12 0.13107200000000000000e6 +83 2 8 14 0.26214400000000000000e6 +83 2 11 17 -0.32768000000000000000e5 +83 2 12 18 -0.32768000000000000000e5 +83 3 1 2 -0.65536000000000000000e5 +83 3 1 6 0.26214400000000000000e6 +83 3 2 3 0.32768000000000000000e5 +83 3 2 7 0.26214400000000000000e6 +83 3 2 15 0.65536000000000000000e5 +83 3 4 17 0.32768000000000000000e5 +83 3 6 11 -0.65536000000000000000e5 +83 3 13 18 -0.32768000000000000000e5 +83 4 1 1 -0.65536000000000000000e5 +83 4 2 2 0.13107200000000000000e6 +83 4 4 4 -0.26214400000000000000e6 +83 4 7 7 -0.65536000000000000000e5 +84 1 1 6 -0.65536000000000000000e5 +84 1 1 8 0.13107200000000000000e6 +84 1 1 16 0.32768000000000000000e5 +84 1 2 9 0.13107200000000000000e6 +84 1 2 33 0.32768000000000000000e5 +84 1 3 26 -0.32768000000000000000e5 +84 1 3 34 -0.65536000000000000000e5 +84 1 4 35 0.32768000000000000000e5 +84 1 6 21 -0.13107200000000000000e6 +84 2 1 15 0.65536000000000000000e5 +84 2 3 17 -0.32768000000000000000e5 +84 2 11 11 -0.65536000000000000000e5 +84 2 11 17 0.32768000000000000000e5 +84 2 12 18 0.32768000000000000000e5 +84 3 1 6 -0.13107200000000000000e6 +84 3 1 14 -0.65536000000000000000e5 +84 3 2 7 -0.13107200000000000000e6 +84 3 2 15 -0.65536000000000000000e5 +84 3 4 17 -0.32768000000000000000e5 +84 3 6 11 0.65536000000000000000e5 +84 3 13 18 0.32768000000000000000e5 +84 4 7 7 0.65536000000000000000e5 +85 1 1 1 0.65536000000000000000e5 +85 1 1 2 0.32768000000000000000e5 +85 1 1 6 -0.65536000000000000000e5 +85 1 1 8 0.13107200000000000000e6 +85 1 2 5 0.32768000000000000000e5 +85 1 2 9 0.65536000000000000000e5 +85 1 3 10 -0.13107200000000000000e6 +85 2 1 1 0.65536000000000000000e5 +85 2 1 3 -0.32768000000000000000e5 +85 2 1 7 0.65536000000000000000e5 +85 2 2 12 0.32768000000000000000e5 +85 4 2 2 0.65536000000000000000e5 +86 1 1 3 0.65536000000000000000e5 +86 1 1 8 -0.26214400000000000000e6 +86 1 2 5 -0.65536000000000000000e5 +86 1 2 9 -0.13107200000000000000e6 +86 1 3 10 0.26214400000000000000e6 +86 2 1 3 0.65536000000000000000e5 +86 2 1 7 -0.13107200000000000000e6 +86 2 2 12 -0.65536000000000000000e5 +86 4 2 2 -0.13107200000000000000e6 +87 1 1 4 0.65536000000000000000e5 +87 1 2 5 0.65536000000000000000e5 +87 1 2 17 -0.65536000000000000000e5 +87 1 3 10 -0.26214400000000000000e6 +87 1 3 18 -0.65536000000000000000e5 +87 1 6 21 0.26214400000000000000e6 +87 2 1 7 0.13107200000000000000e6 +87 2 1 15 -0.13107200000000000000e6 +87 3 1 6 0.13107200000000000000e6 +87 3 2 3 0.65536000000000000000e5 +87 3 2 7 0.13107200000000000000e6 +87 4 2 2 0.13107200000000000000e6 +88 1 1 5 0.65536000000000000000e5 +88 1 1 8 0.13107200000000000000e6 +88 1 2 9 0.13107200000000000000e6 +88 1 2 17 0.65536000000000000000e5 +88 1 3 18 0.65536000000000000000e5 +88 1 6 21 -0.26214400000000000000e6 +88 2 1 15 0.13107200000000000000e6 +88 2 2 12 0.65536000000000000000e5 +88 3 1 6 -0.13107200000000000000e6 +88 3 2 3 -0.65536000000000000000e5 +88 3 2 7 -0.13107200000000000000e6 +89 1 1 2 -0.32768000000000000000e5 +89 1 1 7 0.65536000000000000000e5 +89 1 1 8 -0.13107200000000000000e6 +89 1 1 16 0.32768000000000000000e5 +89 1 2 5 0.32768000000000000000e5 +89 1 2 9 -0.65536000000000000000e5 +89 1 3 10 -0.13107200000000000000e6 +89 1 3 18 -0.32768000000000000000e5 +89 1 5 20 0.13107200000000000000e6 +89 1 6 21 0.78643200000000000000e6 +89 1 7 22 0.13107200000000000000e6 +89 1 8 23 0.26214400000000000000e6 +89 1 13 20 -0.52428800000000000000e6 +89 2 1 7 0.65536000000000000000e5 +89 2 1 15 -0.26214400000000000000e6 +89 2 2 8 0.13107200000000000000e6 +89 2 2 16 0.13107200000000000000e6 +89 2 5 11 0.65536000000000000000e5 +89 2 6 12 0.13107200000000000000e6 +89 2 8 14 0.26214400000000000000e6 +89 3 1 2 -0.32768000000000000000e5 +89 3 1 6 0.19660800000000000000e6 +89 3 2 3 0.32768000000000000000e5 +89 3 2 7 0.13107200000000000000e6 +89 4 1 1 -0.65536000000000000000e5 +89 4 2 2 0.65536000000000000000e5 +89 4 4 4 -0.26214400000000000000e6 +90 1 1 8 0.65536000000000000000e5 +90 1 1 9 0.65536000000000000000e5 +90 1 2 9 0.65536000000000000000e5 +90 1 3 10 -0.13107200000000000000e6 +90 2 1 7 0.65536000000000000000e5 +91 1 1 8 -0.65536000000000000000e5 +91 1 1 11 0.65536000000000000000e5 +91 1 3 10 0.13107200000000000000e6 +91 1 4 11 0.13107200000000000000e6 +91 1 5 20 0.65536000000000000000e5 +91 1 6 21 0.13107200000000000000e6 +91 1 11 26 0.65536000000000000000e5 +91 1 12 27 0.65536000000000000000e5 +91 1 13 20 -0.26214400000000000000e6 +91 2 1 15 -0.65536000000000000000e5 +91 2 2 8 0.65536000000000000000e5 +91 2 2 16 0.65536000000000000000e5 +91 2 3 9 0.65536000000000000000e5 +91 2 6 8 0.13107200000000000000e6 +91 2 6 12 0.65536000000000000000e5 +91 3 1 6 0.65536000000000000000e5 +91 3 3 8 0.19660800000000000000e6 +91 3 3 16 -0.65536000000000000000e5 +91 3 4 9 0.65536000000000000000e5 +91 3 5 10 -0.26214400000000000000e6 +91 3 9 14 0.13107200000000000000e6 +91 4 2 6 0.65536000000000000000e5 +91 4 5 9 -0.65536000000000000000e5 +92 1 1 12 0.65536000000000000000e5 +92 1 3 10 -0.65536000000000000000e5 +93 1 1 8 -0.32768000000000000000e5 +93 1 1 10 -0.32768000000000000000e5 +93 1 1 13 0.65536000000000000000e5 +93 1 3 10 0.32768000000000000000e5 +93 1 4 11 0.65536000000000000000e5 +93 1 5 20 0.32768000000000000000e5 +93 1 6 21 0.65536000000000000000e5 +93 1 11 26 0.32768000000000000000e5 +93 1 12 27 0.32768000000000000000e5 +93 1 13 20 -0.13107200000000000000e6 +93 2 1 15 -0.32768000000000000000e5 +93 2 2 8 0.32768000000000000000e5 +93 2 2 16 0.32768000000000000000e5 +93 2 3 9 0.32768000000000000000e5 +93 2 5 5 -0.65536000000000000000e5 +93 2 6 8 0.65536000000000000000e5 +93 2 6 12 0.32768000000000000000e5 +93 3 1 6 0.32768000000000000000e5 +93 3 3 8 0.98304000000000000000e5 +93 3 3 16 -0.32768000000000000000e5 +93 3 4 9 0.32768000000000000000e5 +93 3 5 10 -0.13107200000000000000e6 +93 3 9 14 0.65536000000000000000e5 +93 4 2 6 0.32768000000000000000e5 +93 4 5 9 -0.32768000000000000000e5 +94 1 1 8 -0.16384000000000000000e5 +94 1 1 14 0.65536000000000000000e5 +94 1 3 10 0.32768000000000000000e5 +94 1 4 11 0.65536000000000000000e5 +94 1 5 20 0.16384000000000000000e5 +94 1 6 21 0.32768000000000000000e5 +94 1 11 26 0.32768000000000000000e5 +94 1 12 27 0.32768000000000000000e5 +94 1 13 20 -0.13107200000000000000e6 +94 2 1 15 -0.16384000000000000000e5 +94 2 2 16 0.32768000000000000000e5 +94 2 3 9 0.32768000000000000000e5 +94 2 6 8 0.65536000000000000000e5 +94 2 6 12 0.16384000000000000000e5 +94 3 1 6 0.16384000000000000000e5 +94 3 3 8 0.65536000000000000000e5 +94 3 3 16 -0.32768000000000000000e5 +94 3 4 9 0.32768000000000000000e5 +94 3 5 10 -0.13107200000000000000e6 +94 3 9 14 0.65536000000000000000e5 +94 4 2 6 0.32768000000000000000e5 +94 4 5 9 -0.32768000000000000000e5 +95 1 1 15 0.65536000000000000000e5 +95 1 6 13 -0.65536000000000000000e5 +96 1 1 8 -0.26214400000000000000e6 +96 1 1 17 0.65536000000000000000e5 +96 1 2 5 -0.65536000000000000000e5 +96 1 2 9 -0.13107200000000000000e6 +96 1 3 10 0.26214400000000000000e6 +96 2 1 3 0.65536000000000000000e5 +96 2 1 7 -0.13107200000000000000e6 +96 2 2 12 -0.65536000000000000000e5 +96 3 1 2 0.65536000000000000000e5 +96 4 2 2 -0.13107200000000000000e6 +97 1 1 18 0.65536000000000000000e5 +97 1 2 17 -0.65536000000000000000e5 +98 1 1 8 0.13107200000000000000e6 +98 1 1 19 0.65536000000000000000e5 +98 1 2 9 0.13107200000000000000e6 +98 1 2 17 0.65536000000000000000e5 +98 1 3 18 0.65536000000000000000e5 +98 1 6 21 -0.26214400000000000000e6 +98 2 1 15 0.13107200000000000000e6 +98 2 2 12 0.65536000000000000000e5 +98 3 1 6 -0.13107200000000000000e6 +98 3 2 7 -0.13107200000000000000e6 +99 1 1 8 -0.13107200000000000000e6 +99 1 1 20 0.65536000000000000000e5 +99 1 2 9 -0.65536000000000000000e5 +99 1 5 20 0.13107200000000000000e6 +99 1 6 21 0.65536000000000000000e6 +99 1 7 22 0.13107200000000000000e6 +99 1 8 23 0.26214400000000000000e6 +99 1 13 20 -0.52428800000000000000e6 +99 2 1 15 -0.19660800000000000000e6 +99 2 2 8 0.13107200000000000000e6 +99 2 2 16 0.13107200000000000000e6 +99 2 5 11 0.65536000000000000000e5 +99 2 6 12 0.13107200000000000000e6 +99 2 8 14 0.26214400000000000000e6 +99 3 1 6 0.13107200000000000000e6 +99 3 2 7 0.65536000000000000000e5 +99 4 4 4 -0.26214400000000000000e6 +100 1 1 8 -0.65536000000000000000e5 +100 1 1 21 0.65536000000000000000e5 +100 3 1 6 0.65536000000000000000e5 +101 1 1 8 0.65536000000000000000e5 +101 1 1 22 0.65536000000000000000e5 +101 1 2 9 0.65536000000000000000e5 +101 1 6 21 -0.13107200000000000000e6 +101 2 1 15 0.65536000000000000000e5 +101 3 1 6 -0.65536000000000000000e5 +101 3 2 7 -0.65536000000000000000e5 +102 1 1 8 -0.65536000000000000000e5 +102 1 1 23 0.65536000000000000000e5 +102 1 5 20 0.65536000000000000000e5 +102 1 6 21 0.26214400000000000000e6 +102 1 7 22 0.65536000000000000000e5 +102 1 8 23 0.13107200000000000000e6 +102 1 13 20 -0.26214400000000000000e6 +102 2 1 15 -0.65536000000000000000e5 +102 2 2 8 0.65536000000000000000e5 +102 2 2 16 0.65536000000000000000e5 +102 2 6 12 0.65536000000000000000e5 +102 2 8 14 0.13107200000000000000e6 +102 3 1 6 0.65536000000000000000e5 +102 4 4 4 -0.13107200000000000000e6 +103 1 1 24 0.65536000000000000000e5 +103 1 6 21 -0.65536000000000000000e5 +104 1 1 8 -0.16384000000000000000e5 +104 1 1 25 0.65536000000000000000e5 +104 1 5 20 0.16384000000000000000e5 +104 1 6 21 0.65536000000000000000e5 +104 1 7 22 0.32768000000000000000e5 +104 1 8 23 0.65536000000000000000e5 +104 1 13 20 -0.13107200000000000000e6 +104 2 1 15 -0.16384000000000000000e5 +104 2 2 16 0.32768000000000000000e5 +104 2 6 12 0.16384000000000000000e5 +104 2 8 14 0.65536000000000000000e5 +104 3 1 6 0.16384000000000000000e5 +105 1 1 8 -0.26214400000000000000e6 +105 1 1 26 0.65536000000000000000e5 +105 1 2 9 -0.26214400000000000000e6 +105 1 2 33 -0.65536000000000000000e5 +105 1 3 26 0.65536000000000000000e5 +105 1 3 34 0.13107200000000000000e6 +105 1 4 35 -0.65536000000000000000e5 +105 1 6 21 0.26214400000000000000e6 +105 2 1 15 -0.13107200000000000000e6 +105 2 3 17 0.65536000000000000000e5 +105 2 11 11 0.13107200000000000000e6 +105 2 11 17 -0.65536000000000000000e5 +105 2 12 18 -0.65536000000000000000e5 +105 3 1 6 0.26214400000000000000e6 +105 3 1 14 0.13107200000000000000e6 +105 3 2 7 0.26214400000000000000e6 +105 3 2 15 0.13107200000000000000e6 +105 3 4 17 0.65536000000000000000e5 +105 3 6 11 -0.13107200000000000000e6 +105 3 13 18 -0.65536000000000000000e5 +105 4 7 7 -0.13107200000000000000e6 +106 1 1 8 0.13107200000000000000e6 +106 1 1 27 0.65536000000000000000e5 +106 1 2 9 0.26214400000000000000e6 +106 1 2 33 0.65536000000000000000e5 +106 1 3 34 -0.13107200000000000000e6 +106 1 4 35 0.65536000000000000000e5 +106 1 6 21 -0.26214400000000000000e6 +106 2 1 15 0.13107200000000000000e6 +106 2 3 17 -0.65536000000000000000e5 +106 2 11 17 0.65536000000000000000e5 +106 2 12 18 0.65536000000000000000e5 +106 3 1 6 -0.13107200000000000000e6 +106 3 2 7 -0.26214400000000000000e6 +106 3 2 15 -0.13107200000000000000e6 +106 3 4 17 -0.65536000000000000000e5 +106 3 6 11 0.13107200000000000000e6 +106 3 13 18 0.65536000000000000000e5 +106 4 7 7 0.13107200000000000000e6 +107 1 1 28 0.65536000000000000000e5 +107 1 3 26 -0.65536000000000000000e5 +108 1 1 8 -0.65536000000000000000e5 +108 1 1 29 0.65536000000000000000e5 +108 3 1 6 0.65536000000000000000e5 +108 3 1 14 0.65536000000000000000e5 +109 1 1 8 0.65536000000000000000e5 +109 1 1 30 0.65536000000000000000e5 +109 1 2 9 0.65536000000000000000e5 +109 1 6 21 -0.13107200000000000000e6 +109 2 1 15 0.65536000000000000000e5 +109 3 1 6 -0.65536000000000000000e5 +109 3 2 7 -0.65536000000000000000e5 +109 3 6 11 0.65536000000000000000e5 +110 1 1 31 0.65536000000000000000e5 +110 1 16 23 -0.65536000000000000000e5 +111 1 1 33 0.65536000000000000000e5 +111 1 3 26 -0.65536000000000000000e5 +111 3 11 12 0.65536000000000000000e5 +112 1 1 32 -0.32768000000000000000e5 +112 1 1 34 0.65536000000000000000e5 +112 1 2 33 -0.32768000000000000000e5 +112 1 3 26 -0.32768000000000000000e5 +112 2 11 17 -0.32768000000000000000e5 +112 3 11 12 0.32768000000000000000e5 +113 1 1 35 0.65536000000000000000e5 +113 1 17 32 0.65536000000000000000e5 +113 1 26 29 -0.13107200000000000000e6 +113 1 26 33 0.65536000000000000000e5 +113 2 17 17 0.13107200000000000000e6 +113 3 17 18 0.65536000000000000000e5 +114 1 1 8 -0.13107200000000000000e6 +114 1 2 2 0.65536000000000000000e5 +114 1 2 5 -0.32768000000000000000e5 +114 1 2 9 -0.65536000000000000000e5 +114 1 3 10 0.13107200000000000000e6 +114 2 1 3 0.32768000000000000000e5 +114 2 1 7 -0.65536000000000000000e5 +114 2 2 12 -0.32768000000000000000e5 +114 4 2 2 -0.65536000000000000000e5 +115 1 2 3 0.65536000000000000000e5 +115 1 2 5 0.65536000000000000000e5 +115 1 2 17 -0.65536000000000000000e5 +115 1 3 10 -0.26214400000000000000e6 +115 1 3 18 -0.65536000000000000000e5 +115 1 6 21 0.26214400000000000000e6 +115 2 1 7 0.13107200000000000000e6 +115 2 1 15 -0.13107200000000000000e6 +115 3 1 6 0.13107200000000000000e6 +115 3 2 3 0.65536000000000000000e5 +115 3 2 7 0.13107200000000000000e6 +115 4 2 2 0.13107200000000000000e6 +116 1 1 8 0.13107200000000000000e6 +116 1 2 4 0.65536000000000000000e5 +116 1 2 9 0.13107200000000000000e6 +116 1 2 17 0.65536000000000000000e5 +116 1 3 18 0.65536000000000000000e5 +116 1 6 21 -0.26214400000000000000e6 +116 2 1 15 0.13107200000000000000e6 +116 2 2 12 0.65536000000000000000e5 +116 3 1 6 -0.13107200000000000000e6 +116 3 2 3 -0.65536000000000000000e5 +116 3 2 7 -0.13107200000000000000e6 +117 1 1 2 -0.32768000000000000000e5 +117 1 1 8 -0.13107200000000000000e6 +117 1 1 16 0.32768000000000000000e5 +117 1 2 5 0.32768000000000000000e5 +117 1 2 6 0.65536000000000000000e5 +117 1 2 9 -0.65536000000000000000e5 +117 1 3 10 -0.13107200000000000000e6 +117 1 3 18 -0.32768000000000000000e5 +117 1 5 20 0.13107200000000000000e6 +117 1 6 21 0.78643200000000000000e6 +117 1 7 22 0.13107200000000000000e6 +117 1 8 23 0.26214400000000000000e6 +117 1 13 20 -0.52428800000000000000e6 +117 2 1 7 0.65536000000000000000e5 +117 2 1 15 -0.26214400000000000000e6 +117 2 2 8 0.13107200000000000000e6 +117 2 2 16 0.13107200000000000000e6 +117 2 5 11 0.65536000000000000000e5 +117 2 6 12 0.13107200000000000000e6 +117 2 8 14 0.26214400000000000000e6 +117 3 1 2 -0.32768000000000000000e5 +117 3 1 6 0.19660800000000000000e6 +117 3 2 3 0.32768000000000000000e5 +117 3 2 7 0.13107200000000000000e6 +117 4 1 1 -0.65536000000000000000e5 +117 4 2 2 0.65536000000000000000e5 +117 4 4 4 -0.26214400000000000000e6 +118 1 1 8 -0.65536000000000000000e5 +118 1 2 7 0.65536000000000000000e5 +119 1 1 8 0.65536000000000000000e5 +119 1 2 8 0.65536000000000000000e5 +119 1 2 9 0.65536000000000000000e5 +119 1 3 10 -0.13107200000000000000e6 +119 2 1 7 0.65536000000000000000e5 +120 1 1 8 -0.65536000000000000000e5 +120 1 2 10 0.65536000000000000000e5 +120 1 3 10 0.13107200000000000000e6 +120 1 4 11 0.13107200000000000000e6 +120 1 5 20 0.65536000000000000000e5 +120 1 6 21 0.13107200000000000000e6 +120 1 11 26 0.65536000000000000000e5 +120 1 12 27 0.65536000000000000000e5 +120 1 13 20 -0.26214400000000000000e6 +120 2 1 15 -0.65536000000000000000e5 +120 2 2 8 0.65536000000000000000e5 +120 2 2 16 0.65536000000000000000e5 +120 2 3 9 0.65536000000000000000e5 +120 2 6 8 0.13107200000000000000e6 +120 2 6 12 0.65536000000000000000e5 +120 3 1 6 0.65536000000000000000e5 +120 3 3 8 0.19660800000000000000e6 +120 3 3 16 -0.65536000000000000000e5 +120 3 4 9 0.65536000000000000000e5 +120 3 5 10 -0.26214400000000000000e6 +120 3 9 14 0.13107200000000000000e6 +120 4 2 6 0.65536000000000000000e5 +120 4 5 9 -0.65536000000000000000e5 +121 1 2 11 0.65536000000000000000e5 +121 1 3 10 -0.65536000000000000000e5 +122 1 1 8 0.32768000000000000000e5 +122 1 2 12 0.65536000000000000000e5 +122 1 5 20 -0.32768000000000000000e5 +122 1 6 21 -0.65536000000000000000e5 +122 2 1 15 0.32768000000000000000e5 +122 2 6 12 -0.32768000000000000000e5 +122 3 1 6 -0.32768000000000000000e5 +122 3 3 8 -0.65536000000000000000e5 +123 1 1 8 -0.16384000000000000000e5 +123 1 2 13 0.65536000000000000000e5 +123 1 3 10 0.32768000000000000000e5 +123 1 4 11 0.65536000000000000000e5 +123 1 5 20 0.16384000000000000000e5 +123 1 6 21 0.32768000000000000000e5 +123 1 11 26 0.32768000000000000000e5 +123 1 12 27 0.32768000000000000000e5 +123 1 13 20 -0.13107200000000000000e6 +123 2 1 15 -0.16384000000000000000e5 +123 2 2 16 0.32768000000000000000e5 +123 2 3 9 0.32768000000000000000e5 +123 2 6 8 0.65536000000000000000e5 +123 2 6 12 0.16384000000000000000e5 +123 3 1 6 0.16384000000000000000e5 +123 3 3 8 0.65536000000000000000e5 +123 3 3 16 -0.32768000000000000000e5 +123 3 4 9 0.32768000000000000000e5 +123 3 5 10 -0.13107200000000000000e6 +123 3 9 14 0.65536000000000000000e5 +123 4 2 6 0.32768000000000000000e5 +123 4 5 9 -0.32768000000000000000e5 +124 1 1 8 0.16384000000000000000e5 +124 1 2 14 0.65536000000000000000e5 +124 1 3 10 -0.32768000000000000000e5 +124 1 4 11 -0.32768000000000000000e5 +124 1 5 20 -0.16384000000000000000e5 +124 1 6 21 -0.32768000000000000000e5 +124 2 1 15 0.16384000000000000000e5 +124 2 2 16 -0.32768000000000000000e5 +124 2 6 12 -0.16384000000000000000e5 +124 3 1 6 -0.16384000000000000000e5 +124 3 3 8 -0.32768000000000000000e5 +124 4 2 6 -0.32768000000000000000e5 +125 1 2 15 0.65536000000000000000e5 +125 1 13 20 -0.65536000000000000000e5 +125 3 5 10 -0.65536000000000000000e5 +126 1 1 8 -0.26214400000000000000e6 +126 1 2 5 -0.65536000000000000000e5 +126 1 2 9 -0.13107200000000000000e6 +126 1 2 16 0.65536000000000000000e5 +126 1 3 10 0.26214400000000000000e6 +126 2 1 3 0.65536000000000000000e5 +126 2 1 7 -0.13107200000000000000e6 +126 2 2 12 -0.65536000000000000000e5 +126 3 1 2 0.65536000000000000000e5 +126 4 2 2 -0.13107200000000000000e6 +127 1 1 8 0.13107200000000000000e6 +127 1 2 9 0.13107200000000000000e6 +127 1 2 17 0.65536000000000000000e5 +127 1 2 18 0.65536000000000000000e5 +127 1 3 18 0.65536000000000000000e5 +127 1 6 21 -0.26214400000000000000e6 +127 2 1 15 0.13107200000000000000e6 +127 2 2 12 0.65536000000000000000e5 +127 3 1 6 -0.13107200000000000000e6 +127 3 2 7 -0.13107200000000000000e6 +128 1 2 19 0.65536000000000000000e5 +128 1 3 18 -0.65536000000000000000e5 +129 1 1 8 -0.65536000000000000000e5 +129 1 2 20 0.65536000000000000000e5 +129 3 1 6 0.65536000000000000000e5 +130 1 1 8 0.65536000000000000000e5 +130 1 2 9 0.65536000000000000000e5 +130 1 2 21 0.65536000000000000000e5 +130 1 6 21 -0.13107200000000000000e6 +130 2 1 15 0.65536000000000000000e5 +130 3 1 6 -0.65536000000000000000e5 +130 3 2 7 -0.65536000000000000000e5 +131 1 2 9 -0.65536000000000000000e5 +131 1 2 22 0.65536000000000000000e5 +131 3 2 7 0.65536000000000000000e5 +132 1 2 23 0.65536000000000000000e5 +132 1 6 21 -0.65536000000000000000e5 +133 1 1 8 0.32768000000000000000e5 +133 1 2 24 0.65536000000000000000e5 +133 1 5 20 -0.32768000000000000000e5 +133 1 6 21 -0.65536000000000000000e5 +133 2 1 15 0.32768000000000000000e5 +133 2 6 12 -0.32768000000000000000e5 +133 3 1 6 -0.32768000000000000000e5 +134 1 1 8 0.16384000000000000000e5 +134 1 2 25 0.65536000000000000000e5 +134 1 5 20 -0.16384000000000000000e5 +134 1 6 21 -0.65536000000000000000e5 +134 1 7 22 -0.32768000000000000000e5 +134 2 1 15 0.16384000000000000000e5 +134 2 2 16 -0.32768000000000000000e5 +134 2 6 12 -0.16384000000000000000e5 +134 3 1 6 -0.16384000000000000000e5 +135 1 1 8 0.13107200000000000000e6 +135 1 2 9 0.26214400000000000000e6 +135 1 2 26 0.65536000000000000000e5 +135 1 2 33 0.65536000000000000000e5 +135 1 3 34 -0.13107200000000000000e6 +135 1 4 35 0.65536000000000000000e5 +135 1 6 21 -0.26214400000000000000e6 +135 2 1 15 0.13107200000000000000e6 +135 2 3 17 -0.65536000000000000000e5 +135 2 11 17 0.65536000000000000000e5 +135 2 12 18 0.65536000000000000000e5 +135 3 1 6 -0.13107200000000000000e6 +135 3 2 7 -0.26214400000000000000e6 +135 3 2 15 -0.13107200000000000000e6 +135 3 4 17 -0.65536000000000000000e5 +135 3 6 11 0.13107200000000000000e6 +135 3 13 18 0.65536000000000000000e5 +135 4 7 7 0.13107200000000000000e6 +136 1 2 27 0.65536000000000000000e5 +136 1 3 26 -0.65536000000000000000e5 +137 1 2 9 -0.13107200000000000000e6 +137 1 2 28 0.65536000000000000000e5 +137 1 2 33 -0.65536000000000000000e5 +137 1 3 26 0.65536000000000000000e5 +137 1 3 34 0.13107200000000000000e6 +137 1 4 35 -0.65536000000000000000e5 +137 2 3 17 0.65536000000000000000e5 +137 2 12 18 -0.65536000000000000000e5 +137 3 2 7 0.13107200000000000000e6 +137 3 2 15 0.13107200000000000000e6 +137 3 4 17 0.65536000000000000000e5 +137 3 13 18 -0.65536000000000000000e5 +138 1 1 8 0.65536000000000000000e5 +138 1 2 9 0.65536000000000000000e5 +138 1 2 29 0.65536000000000000000e5 +138 1 6 21 -0.13107200000000000000e6 +138 2 1 15 0.65536000000000000000e5 +138 3 1 6 -0.65536000000000000000e5 +138 3 2 7 -0.65536000000000000000e5 +138 3 6 11 0.65536000000000000000e5 +139 1 2 9 -0.65536000000000000000e5 +139 1 2 30 0.65536000000000000000e5 +139 3 2 7 0.65536000000000000000e5 +139 3 2 15 0.65536000000000000000e5 +140 1 2 31 0.65536000000000000000e5 +140 1 11 26 -0.65536000000000000000e5 +141 1 2 32 0.65536000000000000000e5 +141 1 3 26 -0.65536000000000000000e5 +141 3 11 12 0.65536000000000000000e5 +142 1 2 9 -0.65536000000000000000e5 +142 1 2 34 0.65536000000000000000e5 +142 3 2 7 0.65536000000000000000e5 +142 3 2 15 0.65536000000000000000e5 +142 3 5 18 0.65536000000000000000e5 +143 1 2 35 0.65536000000000000000e5 +143 1 17 32 -0.65536000000000000000e5 +144 1 1 8 0.65536000000000000000e5 +144 1 2 9 0.65536000000000000000e5 +144 1 2 17 0.32768000000000000000e5 +144 1 3 3 0.65536000000000000000e5 +144 1 3 18 0.32768000000000000000e5 +144 1 6 21 -0.13107200000000000000e6 +144 2 1 15 0.65536000000000000000e5 +144 2 2 12 0.32768000000000000000e5 +144 3 1 6 -0.65536000000000000000e5 +144 3 2 3 -0.32768000000000000000e5 +144 3 2 7 -0.65536000000000000000e5 +145 1 2 5 -0.65536000000000000000e5 +145 1 3 4 0.65536000000000000000e5 +146 1 1 8 -0.13107200000000000000e6 +146 1 2 5 0.65536000000000000000e5 +146 1 2 9 -0.26214400000000000000e6 +146 1 2 17 -0.65536000000000000000e5 +146 1 3 5 0.65536000000000000000e5 +146 1 3 18 -0.65536000000000000000e5 +146 1 6 21 0.26214400000000000000e6 +146 2 1 15 -0.13107200000000000000e6 +146 2 2 4 0.65536000000000000000e5 +146 2 2 12 -0.65536000000000000000e5 +146 3 1 6 0.13107200000000000000e6 +146 3 2 3 0.65536000000000000000e5 +146 3 2 7 0.13107200000000000000e6 +147 1 1 8 -0.65536000000000000000e5 +147 1 3 6 0.65536000000000000000e5 +148 1 1 8 0.65536000000000000000e5 +148 1 2 9 0.65536000000000000000e5 +148 1 3 7 0.65536000000000000000e5 +148 1 3 10 -0.13107200000000000000e6 +148 2 1 7 0.65536000000000000000e5 +149 1 2 9 -0.65536000000000000000e5 +149 1 3 8 0.65536000000000000000e5 +150 1 2 9 0.65536000000000000000e5 +150 1 3 9 0.65536000000000000000e5 +150 1 4 11 -0.13107200000000000000e6 +150 1 5 8 0.65536000000000000000e5 +150 2 4 6 0.65536000000000000000e5 +151 1 1 8 0.32768000000000000000e5 +151 1 3 11 0.65536000000000000000e5 +151 1 5 20 -0.32768000000000000000e5 +151 1 6 21 -0.65536000000000000000e5 +151 2 1 15 0.32768000000000000000e5 +151 2 6 12 -0.32768000000000000000e5 +151 3 1 6 -0.32768000000000000000e5 +151 3 3 8 -0.65536000000000000000e5 +152 1 3 12 0.65536000000000000000e5 +152 1 4 11 -0.65536000000000000000e5 +153 1 1 8 0.16384000000000000000e5 +153 1 3 10 -0.32768000000000000000e5 +153 1 3 13 0.65536000000000000000e5 +153 1 4 11 -0.32768000000000000000e5 +153 1 5 20 -0.16384000000000000000e5 +153 1 6 21 -0.32768000000000000000e5 +153 2 1 15 0.16384000000000000000e5 +153 2 2 16 -0.32768000000000000000e5 +153 2 6 12 -0.16384000000000000000e5 +153 3 1 6 -0.16384000000000000000e5 +153 3 3 8 -0.32768000000000000000e5 +153 4 2 6 -0.32768000000000000000e5 +154 1 3 14 0.65536000000000000000e5 +154 1 4 11 -0.32768000000000000000e5 +154 1 11 26 -0.32768000000000000000e5 +154 1 12 27 -0.32768000000000000000e5 +154 2 3 9 -0.32768000000000000000e5 +154 3 3 8 -0.32768000000000000000e5 +154 3 3 16 0.32768000000000000000e5 +154 3 4 9 -0.32768000000000000000e5 +154 3 9 14 -0.65536000000000000000e5 +154 4 5 9 0.32768000000000000000e5 +155 1 3 15 0.65536000000000000000e5 +155 1 7 14 -0.65536000000000000000e5 +156 1 2 17 -0.65536000000000000000e5 +156 1 3 16 0.65536000000000000000e5 +157 1 1 8 0.13107200000000000000e6 +157 1 2 9 0.13107200000000000000e6 +157 1 2 17 0.65536000000000000000e5 +157 1 3 17 0.65536000000000000000e5 +157 1 3 18 0.65536000000000000000e5 +157 1 6 21 -0.26214400000000000000e6 +157 2 1 15 0.13107200000000000000e6 +157 2 2 12 0.65536000000000000000e5 +157 3 1 6 -0.13107200000000000000e6 +157 3 2 7 -0.13107200000000000000e6 +158 1 1 8 -0.13107200000000000000e6 +158 1 2 9 -0.26214400000000000000e6 +158 1 2 17 -0.65536000000000000000e5 +158 1 3 19 0.65536000000000000000e5 +158 1 6 21 0.26214400000000000000e6 +158 2 1 15 -0.13107200000000000000e6 +158 2 2 12 -0.65536000000000000000e5 +158 2 3 17 0.65536000000000000000e5 +158 3 1 6 0.13107200000000000000e6 +158 3 2 7 0.26214400000000000000e6 +158 4 3 7 0.65536000000000000000e5 +159 1 1 8 0.65536000000000000000e5 +159 1 2 9 0.65536000000000000000e5 +159 1 3 20 0.65536000000000000000e5 +159 1 6 21 -0.13107200000000000000e6 +159 2 1 15 0.65536000000000000000e5 +159 3 1 6 -0.65536000000000000000e5 +159 3 2 7 -0.65536000000000000000e5 +160 1 2 9 -0.65536000000000000000e5 +160 1 3 21 0.65536000000000000000e5 +160 3 2 7 0.65536000000000000000e5 +161 1 3 22 0.65536000000000000000e5 +161 1 5 20 -0.65536000000000000000e5 +162 1 1 8 0.32768000000000000000e5 +162 1 3 23 0.65536000000000000000e5 +162 1 5 20 -0.32768000000000000000e5 +162 1 6 21 -0.65536000000000000000e5 +162 2 1 15 0.32768000000000000000e5 +162 2 6 12 -0.32768000000000000000e5 +162 3 1 6 -0.32768000000000000000e5 +163 1 3 24 0.65536000000000000000e5 +163 1 7 22 -0.65536000000000000000e5 +164 1 3 25 0.65536000000000000000e5 +164 1 8 23 -0.65536000000000000000e5 +165 1 2 9 -0.13107200000000000000e6 +165 1 2 33 -0.65536000000000000000e5 +165 1 3 26 0.65536000000000000000e5 +165 1 3 27 0.65536000000000000000e5 +165 1 3 34 0.13107200000000000000e6 +165 1 4 35 -0.65536000000000000000e5 +165 2 3 17 0.65536000000000000000e5 +165 2 12 18 -0.65536000000000000000e5 +165 3 2 7 0.13107200000000000000e6 +165 3 2 15 0.13107200000000000000e6 +165 3 4 17 0.65536000000000000000e5 +165 3 13 18 -0.65536000000000000000e5 +166 1 2 33 0.65536000000000000000e5 +166 1 3 28 0.65536000000000000000e5 +166 1 3 34 -0.13107200000000000000e6 +166 1 4 35 0.65536000000000000000e5 +166 2 12 18 0.65536000000000000000e5 +166 3 4 17 -0.65536000000000000000e5 +166 3 13 18 0.65536000000000000000e5 +167 1 2 9 -0.65536000000000000000e5 +167 1 3 29 0.65536000000000000000e5 +167 3 2 7 0.65536000000000000000e5 +167 3 2 15 0.65536000000000000000e5 +168 1 1 8 -0.65536000000000000000e5 +168 1 3 30 0.65536000000000000000e5 +168 1 6 21 0.13107200000000000000e6 +168 1 11 26 -0.13107200000000000000e6 +168 2 1 15 -0.65536000000000000000e5 +168 2 6 12 0.65536000000000000000e5 +168 3 1 6 0.65536000000000000000e5 +168 3 2 15 -0.65536000000000000000e5 +168 3 6 11 -0.65536000000000000000e5 +168 4 4 8 -0.65536000000000000000e5 +169 1 3 31 0.65536000000000000000e5 +169 1 7 22 -0.65536000000000000000e5 +169 3 3 16 0.65536000000000000000e5 +170 1 2 33 -0.65536000000000000000e5 +170 1 3 32 0.65536000000000000000e5 +171 1 2 33 0.65536000000000000000e5 +171 1 3 33 0.65536000000000000000e5 +171 1 3 34 -0.13107200000000000000e6 +171 1 4 35 0.65536000000000000000e5 +171 2 12 18 0.65536000000000000000e5 +171 3 13 18 0.65536000000000000000e5 +172 1 3 35 0.65536000000000000000e5 +172 1 26 33 -0.65536000000000000000e5 +172 3 17 18 -0.65536000000000000000e5 +173 1 1 8 -0.65536000000000000000e5 +173 1 2 5 0.32768000000000000000e5 +173 1 2 9 -0.13107200000000000000e6 +173 1 2 17 -0.32768000000000000000e5 +173 1 3 18 -0.32768000000000000000e5 +173 1 4 4 0.65536000000000000000e5 +173 1 6 21 0.13107200000000000000e6 +173 2 1 15 -0.65536000000000000000e5 +173 2 2 4 0.32768000000000000000e5 +173 2 2 12 -0.32768000000000000000e5 +173 3 1 6 0.65536000000000000000e5 +173 3 2 3 0.32768000000000000000e5 +173 3 2 7 0.65536000000000000000e5 +174 1 2 9 0.13107200000000000000e6 +174 1 4 5 0.65536000000000000000e5 +174 1 4 11 -0.26214400000000000000e6 +174 1 4 19 -0.65536000000000000000e5 +174 1 5 8 0.13107200000000000000e6 +174 1 5 20 0.13107200000000000000e6 +174 2 2 4 -0.65536000000000000000e5 +174 2 3 17 0.65536000000000000000e5 +174 2 4 6 0.13107200000000000000e6 +174 3 2 3 -0.65536000000000000000e5 +174 3 2 7 0.13107200000000000000e6 +174 4 3 3 0.13107200000000000000e6 +174 4 3 7 0.65536000000000000000e5 +175 1 1 8 0.65536000000000000000e5 +175 1 2 9 0.65536000000000000000e5 +175 1 3 10 -0.13107200000000000000e6 +175 1 4 6 0.65536000000000000000e5 +175 2 1 7 0.65536000000000000000e5 +176 1 2 9 -0.65536000000000000000e5 +176 1 4 7 0.65536000000000000000e5 +177 1 2 9 0.65536000000000000000e5 +177 1 4 8 0.65536000000000000000e5 +177 1 4 11 -0.13107200000000000000e6 +177 1 5 8 0.65536000000000000000e5 +177 2 4 6 0.65536000000000000000e5 +178 1 4 9 0.65536000000000000000e5 +178 1 5 8 -0.65536000000000000000e5 +179 1 1 8 0.32768000000000000000e5 +179 1 4 10 0.65536000000000000000e5 +179 1 5 20 -0.32768000000000000000e5 +179 1 6 21 -0.65536000000000000000e5 +179 2 1 15 0.32768000000000000000e5 +179 2 6 12 -0.32768000000000000000e5 +179 3 1 6 -0.32768000000000000000e5 +179 3 3 8 -0.65536000000000000000e5 +180 1 1 8 -0.32768000000000000000e5 +180 1 4 12 0.65536000000000000000e5 +180 1 5 20 0.32768000000000000000e5 +180 1 6 21 0.65536000000000000000e5 +180 1 11 26 -0.65536000000000000000e5 +180 1 12 27 -0.65536000000000000000e5 +180 2 1 15 -0.32768000000000000000e5 +180 2 6 12 0.32768000000000000000e5 +180 3 1 6 0.32768000000000000000e5 +180 3 3 16 0.65536000000000000000e5 +180 3 4 9 -0.65536000000000000000e5 +180 3 9 14 -0.13107200000000000000e6 +180 4 5 9 0.65536000000000000000e5 +181 1 4 11 -0.32768000000000000000e5 +181 1 4 13 0.65536000000000000000e5 +181 1 11 26 -0.32768000000000000000e5 +181 1 12 27 -0.32768000000000000000e5 +181 2 3 9 -0.32768000000000000000e5 +181 3 3 8 -0.32768000000000000000e5 +181 3 3 16 0.32768000000000000000e5 +181 3 4 9 -0.32768000000000000000e5 +181 3 9 14 -0.65536000000000000000e5 +181 4 5 9 0.32768000000000000000e5 +182 1 4 11 0.32768000000000000000e5 +182 1 4 14 0.65536000000000000000e5 +182 1 4 15 -0.13107200000000000000e6 +182 1 9 12 0.65536000000000000000e5 +182 1 11 26 0.32768000000000000000e5 +182 1 12 27 0.32768000000000000000e5 +182 2 3 9 0.32768000000000000000e5 +182 2 4 10 0.65536000000000000000e5 +182 3 3 8 0.32768000000000000000e5 +182 3 3 16 -0.32768000000000000000e5 +182 3 4 9 0.32768000000000000000e5 +182 3 9 14 0.65536000000000000000e5 +182 4 5 9 -0.32768000000000000000e5 +183 1 1 8 0.13107200000000000000e6 +183 1 2 9 0.13107200000000000000e6 +183 1 2 17 0.65536000000000000000e5 +183 1 3 18 0.65536000000000000000e5 +183 1 4 16 0.65536000000000000000e5 +183 1 6 21 -0.26214400000000000000e6 +183 2 1 15 0.13107200000000000000e6 +183 2 2 12 0.65536000000000000000e5 +183 3 1 6 -0.13107200000000000000e6 +183 3 2 7 -0.13107200000000000000e6 +184 1 3 18 -0.65536000000000000000e5 +184 1 4 17 0.65536000000000000000e5 +185 1 1 8 -0.13107200000000000000e6 +185 1 2 9 -0.26214400000000000000e6 +185 1 2 17 -0.65536000000000000000e5 +185 1 4 18 0.65536000000000000000e5 +185 1 6 21 0.26214400000000000000e6 +185 2 1 15 -0.13107200000000000000e6 +185 2 2 12 -0.65536000000000000000e5 +185 2 3 17 0.65536000000000000000e5 +185 3 1 6 0.13107200000000000000e6 +185 3 2 7 0.26214400000000000000e6 +185 4 3 7 0.65536000000000000000e5 +186 1 2 9 -0.65536000000000000000e5 +186 1 4 20 0.65536000000000000000e5 +186 3 2 7 0.65536000000000000000e5 +187 1 4 21 0.65536000000000000000e5 +187 1 5 20 -0.65536000000000000000e5 +188 1 2 9 0.65536000000000000000e5 +188 1 4 22 0.65536000000000000000e5 +188 1 5 20 0.65536000000000000000e5 +188 1 7 22 -0.13107200000000000000e6 +188 2 4 14 0.65536000000000000000e5 +188 3 2 7 -0.65536000000000000000e5 +189 1 4 23 0.65536000000000000000e5 +189 1 7 22 -0.65536000000000000000e5 +190 1 1 8 -0.32768000000000000000e5 +190 1 4 24 0.65536000000000000000e5 +190 1 5 20 0.32768000000000000000e5 +190 1 6 21 0.65536000000000000000e5 +190 1 11 26 -0.65536000000000000000e5 +190 1 12 27 -0.65536000000000000000e5 +190 2 1 15 -0.32768000000000000000e5 +190 2 6 12 0.32768000000000000000e5 +190 3 1 6 0.32768000000000000000e5 +190 3 3 16 0.65536000000000000000e5 +190 3 9 14 -0.13107200000000000000e6 +190 4 5 9 0.65536000000000000000e5 +191 1 4 25 0.65536000000000000000e5 +191 1 8 23 0.65536000000000000000e5 +191 1 9 24 0.65536000000000000000e5 +191 1 14 21 -0.13107200000000000000e6 +191 2 9 15 0.65536000000000000000e5 +192 1 2 9 -0.13107200000000000000e6 +192 1 2 33 -0.65536000000000000000e5 +192 1 3 26 0.65536000000000000000e5 +192 1 3 34 0.13107200000000000000e6 +192 1 4 26 0.65536000000000000000e5 +192 1 4 35 -0.65536000000000000000e5 +192 2 3 17 0.65536000000000000000e5 +192 2 12 18 -0.65536000000000000000e5 +192 3 2 7 0.13107200000000000000e6 +192 3 2 15 0.13107200000000000000e6 +192 3 4 17 0.65536000000000000000e5 +192 3 13 18 -0.65536000000000000000e5 +193 1 2 33 0.65536000000000000000e5 +193 1 3 34 -0.13107200000000000000e6 +193 1 4 27 0.65536000000000000000e5 +193 1 4 35 0.65536000000000000000e5 +193 2 12 18 0.65536000000000000000e5 +193 3 4 17 -0.65536000000000000000e5 +193 3 13 18 0.65536000000000000000e5 +194 1 1 8 -0.13107200000000000000e6 +194 1 2 9 0.13107200000000000000e6 +194 1 3 26 -0.65536000000000000000e5 +194 1 4 28 0.65536000000000000000e5 +194 1 6 21 0.26214400000000000000e6 +194 1 11 26 -0.26214400000000000000e6 +194 2 1 15 -0.13107200000000000000e6 +194 2 3 17 -0.65536000000000000000e5 +194 2 6 12 0.13107200000000000000e6 +194 2 12 18 0.65536000000000000000e5 +194 3 1 6 0.13107200000000000000e6 +194 3 2 7 -0.13107200000000000000e6 +194 3 2 15 -0.26214400000000000000e6 +194 3 6 11 -0.13107200000000000000e6 +194 4 4 8 -0.13107200000000000000e6 +194 4 8 8 0.13107200000000000000e6 +195 1 1 8 -0.65536000000000000000e5 +195 1 4 29 0.65536000000000000000e5 +195 1 6 21 0.13107200000000000000e6 +195 1 11 26 -0.13107200000000000000e6 +195 2 1 15 -0.65536000000000000000e5 +195 2 6 12 0.65536000000000000000e5 +195 3 1 6 0.65536000000000000000e5 +195 3 2 15 -0.65536000000000000000e5 +195 3 6 11 -0.65536000000000000000e5 +195 4 4 8 -0.65536000000000000000e5 +196 1 1 8 -0.65536000000000000000e5 +196 1 2 9 0.65536000000000000000e5 +196 1 2 33 0.32768000000000000000e5 +196 1 3 26 -0.32768000000000000000e5 +196 1 3 34 -0.65536000000000000000e5 +196 1 4 30 0.65536000000000000000e5 +196 1 4 35 0.32768000000000000000e5 +196 1 5 28 -0.32768000000000000000e5 +196 1 6 21 0.13107200000000000000e6 +196 1 11 26 -0.13107200000000000000e6 +196 2 1 15 -0.65536000000000000000e5 +196 2 3 17 -0.32768000000000000000e5 +196 2 4 18 -0.32768000000000000000e5 +196 2 6 12 0.65536000000000000000e5 +196 2 12 18 0.65536000000000000000e5 +196 3 1 6 0.65536000000000000000e5 +196 3 2 7 -0.65536000000000000000e5 +196 3 2 15 -0.13107200000000000000e6 +196 3 4 17 -0.32768000000000000000e5 +196 3 6 11 -0.65536000000000000000e5 +196 3 13 18 0.32768000000000000000e5 +196 4 4 8 -0.65536000000000000000e5 +196 4 8 8 0.65536000000000000000e5 +197 1 4 31 0.65536000000000000000e5 +197 1 12 27 -0.65536000000000000000e5 +198 1 2 33 0.65536000000000000000e5 +198 1 3 34 -0.13107200000000000000e6 +198 1 4 32 0.65536000000000000000e5 +198 1 4 35 0.65536000000000000000e5 +198 2 12 18 0.65536000000000000000e5 +198 3 13 18 0.65536000000000000000e5 +199 1 4 33 0.65536000000000000000e5 +199 1 4 35 -0.65536000000000000000e5 +199 3 13 18 -0.65536000000000000000e5 +200 1 2 9 0.65536000000000000000e5 +200 1 3 34 0.65536000000000000000e5 +200 1 4 34 0.65536000000000000000e5 +200 1 7 22 -0.13107200000000000000e6 +200 2 6 20 0.65536000000000000000e5 +200 3 2 7 -0.65536000000000000000e5 +200 3 2 15 -0.65536000000000000000e5 +200 3 3 16 0.13107200000000000000e6 +200 3 5 18 -0.65536000000000000000e5 +200 3 6 19 0.13107200000000000000e6 +201 1 1 8 0.65536000000000000000e5 +201 1 2 5 -0.32768000000000000000e5 +201 1 2 9 0.65536000000000000000e5 +201 1 2 17 0.32768000000000000000e5 +201 1 3 18 0.32768000000000000000e5 +201 1 4 11 0.13107200000000000000e6 +201 1 4 19 0.32768000000000000000e5 +201 1 5 5 0.65536000000000000000e5 +201 1 5 8 -0.13107200000000000000e6 +201 1 5 20 -0.65536000000000000000e5 +201 1 6 21 -0.13107200000000000000e6 +201 2 1 15 0.65536000000000000000e5 +201 2 2 12 0.32768000000000000000e5 +201 2 3 17 -0.32768000000000000000e5 +201 2 4 4 0.65536000000000000000e5 +201 2 4 6 -0.65536000000000000000e5 +201 3 1 6 -0.65536000000000000000e5 +201 3 2 7 -0.13107200000000000000e6 +201 4 3 3 -0.65536000000000000000e5 +201 4 3 7 -0.32768000000000000000e5 +202 1 2 9 -0.65536000000000000000e5 +202 1 5 6 0.65536000000000000000e5 +203 1 2 9 0.65536000000000000000e5 +203 1 4 11 -0.13107200000000000000e6 +203 1 5 7 0.65536000000000000000e5 +203 1 5 8 0.65536000000000000000e5 +203 2 4 6 0.65536000000000000000e5 +204 1 1 8 -0.65536000000000000000e5 +204 1 2 9 -0.65536000000000000000e5 +204 1 4 11 0.13107200000000000000e6 +204 1 5 9 0.65536000000000000000e5 +204 1 5 20 0.65536000000000000000e5 +204 1 6 21 0.13107200000000000000e6 +204 1 11 26 -0.13107200000000000000e6 +204 1 12 27 -0.13107200000000000000e6 +204 2 1 15 -0.65536000000000000000e5 +204 2 4 6 -0.65536000000000000000e5 +204 2 4 7 0.65536000000000000000e5 +204 2 6 12 0.65536000000000000000e5 +204 3 1 6 0.65536000000000000000e5 +204 3 3 16 0.13107200000000000000e6 +204 3 4 9 -0.13107200000000000000e6 +204 3 9 14 -0.26214400000000000000e6 +204 4 5 9 0.13107200000000000000e6 +205 1 4 11 -0.65536000000000000000e5 +205 1 5 10 0.65536000000000000000e5 +206 1 1 8 -0.32768000000000000000e5 +206 1 5 11 0.65536000000000000000e5 +206 1 5 20 0.32768000000000000000e5 +206 1 6 21 0.65536000000000000000e5 +206 1 11 26 -0.65536000000000000000e5 +206 1 12 27 -0.65536000000000000000e5 +206 2 1 15 -0.32768000000000000000e5 +206 2 6 12 0.32768000000000000000e5 +206 3 1 6 0.32768000000000000000e5 +206 3 3 16 0.65536000000000000000e5 +206 3 4 9 -0.65536000000000000000e5 +206 3 9 14 -0.13107200000000000000e6 +206 4 5 9 0.65536000000000000000e5 +207 1 4 11 0.32768000000000000000e5 +207 1 4 15 -0.13107200000000000000e6 +207 1 5 13 0.65536000000000000000e5 +207 1 9 12 0.65536000000000000000e5 +207 1 11 26 0.32768000000000000000e5 +207 1 12 27 0.32768000000000000000e5 +207 2 3 9 0.32768000000000000000e5 +207 2 4 10 0.65536000000000000000e5 +207 3 3 8 0.32768000000000000000e5 +207 3 3 16 -0.32768000000000000000e5 +207 3 4 9 0.32768000000000000000e5 +207 3 9 14 0.65536000000000000000e5 +207 4 5 9 -0.32768000000000000000e5 +208 1 5 14 0.65536000000000000000e5 +208 1 9 12 -0.65536000000000000000e5 +209 1 4 15 0.65536000000000000000e5 +209 1 5 15 0.65536000000000000000e5 +209 1 7 14 0.65536000000000000000e5 +209 1 8 15 -0.13107200000000000000e6 +209 2 9 9 0.13107200000000000000e6 +210 1 3 18 -0.65536000000000000000e5 +210 1 5 16 0.65536000000000000000e5 +211 1 1 8 -0.13107200000000000000e6 +211 1 2 9 -0.26214400000000000000e6 +211 1 2 17 -0.65536000000000000000e5 +211 1 5 17 0.65536000000000000000e5 +211 1 6 21 0.26214400000000000000e6 +211 2 1 15 -0.13107200000000000000e6 +211 2 2 12 -0.65536000000000000000e5 +211 2 3 17 0.65536000000000000000e5 +211 3 1 6 0.13107200000000000000e6 +211 3 2 7 0.26214400000000000000e6 +211 4 3 7 0.65536000000000000000e5 +212 1 4 19 -0.65536000000000000000e5 +212 1 5 18 0.65536000000000000000e5 +213 1 1 8 0.13107200000000000000e6 +213 1 2 9 0.39321600000000000000e6 +213 1 2 17 0.65536000000000000000e5 +213 1 4 19 0.65536000000000000000e5 +213 1 5 19 0.65536000000000000000e5 +213 1 5 20 0.13107200000000000000e6 +213 1 6 21 -0.26214400000000000000e6 +213 1 7 22 -0.26214400000000000000e6 +213 2 1 15 0.13107200000000000000e6 +213 2 2 12 0.65536000000000000000e5 +213 2 3 17 -0.65536000000000000000e5 +213 2 4 13 0.65536000000000000000e5 +213 2 4 14 0.13107200000000000000e6 +213 3 1 6 -0.13107200000000000000e6 +213 3 2 7 -0.39321600000000000000e6 +213 4 3 7 -0.65536000000000000000e5 +214 1 2 9 0.65536000000000000000e5 +214 1 5 20 0.65536000000000000000e5 +214 1 5 21 0.65536000000000000000e5 +214 1 7 22 -0.13107200000000000000e6 +214 2 4 14 0.65536000000000000000e5 +214 3 2 7 -0.65536000000000000000e5 +215 1 1 8 -0.65536000000000000000e5 +215 1 2 9 -0.65536000000000000000e5 +215 1 5 20 0.65536000000000000000e5 +215 1 5 22 0.65536000000000000000e5 +215 1 6 21 0.13107200000000000000e6 +215 1 7 22 0.13107200000000000000e6 +215 1 11 26 -0.13107200000000000000e6 +215 1 12 27 -0.13107200000000000000e6 +215 2 1 15 -0.65536000000000000000e5 +215 2 4 14 -0.65536000000000000000e5 +215 2 6 12 0.65536000000000000000e5 +215 2 7 13 0.65536000000000000000e5 +215 3 1 6 0.65536000000000000000e5 +215 3 2 7 0.65536000000000000000e5 +215 3 3 16 0.13107200000000000000e6 +215 3 9 14 -0.26214400000000000000e6 +215 4 5 9 0.13107200000000000000e6 +216 1 1 8 -0.32768000000000000000e5 +216 1 5 20 0.32768000000000000000e5 +216 1 5 23 0.65536000000000000000e5 +216 1 6 21 0.65536000000000000000e5 +216 1 11 26 -0.65536000000000000000e5 +216 1 12 27 -0.65536000000000000000e5 +216 2 1 15 -0.32768000000000000000e5 +216 2 6 12 0.32768000000000000000e5 +216 3 1 6 0.32768000000000000000e5 +216 3 3 16 0.65536000000000000000e5 +216 3 9 14 -0.13107200000000000000e6 +216 4 5 9 0.65536000000000000000e5 +217 1 5 24 0.65536000000000000000e5 +217 1 12 19 -0.65536000000000000000e5 +218 1 5 25 0.65536000000000000000e5 +218 1 9 24 -0.65536000000000000000e5 +219 1 2 33 0.65536000000000000000e5 +219 1 3 34 -0.13107200000000000000e6 +219 1 4 35 0.65536000000000000000e5 +219 1 5 26 0.65536000000000000000e5 +219 2 12 18 0.65536000000000000000e5 +219 3 4 17 -0.65536000000000000000e5 +219 3 13 18 0.65536000000000000000e5 +220 1 1 8 -0.13107200000000000000e6 +220 1 2 9 0.13107200000000000000e6 +220 1 3 26 -0.65536000000000000000e5 +220 1 5 27 0.65536000000000000000e5 +220 1 6 21 0.26214400000000000000e6 +220 1 11 26 -0.26214400000000000000e6 +220 2 1 15 -0.13107200000000000000e6 +220 2 3 17 -0.65536000000000000000e5 +220 2 6 12 0.13107200000000000000e6 +220 2 12 18 0.65536000000000000000e5 +220 3 1 6 0.13107200000000000000e6 +220 3 2 7 -0.13107200000000000000e6 +220 3 2 15 -0.26214400000000000000e6 +220 3 6 11 -0.13107200000000000000e6 +220 4 4 8 -0.13107200000000000000e6 +220 4 8 8 0.13107200000000000000e6 +221 1 1 8 -0.65536000000000000000e5 +221 1 2 9 0.65536000000000000000e5 +221 1 2 33 0.32768000000000000000e5 +221 1 3 26 -0.32768000000000000000e5 +221 1 3 34 -0.65536000000000000000e5 +221 1 4 35 0.32768000000000000000e5 +221 1 5 28 -0.32768000000000000000e5 +221 1 5 29 0.65536000000000000000e5 +221 1 6 21 0.13107200000000000000e6 +221 1 11 26 -0.13107200000000000000e6 +221 2 1 15 -0.65536000000000000000e5 +221 2 3 17 -0.32768000000000000000e5 +221 2 4 18 -0.32768000000000000000e5 +221 2 6 12 0.65536000000000000000e5 +221 2 12 18 0.65536000000000000000e5 +221 3 1 6 0.65536000000000000000e5 +221 3 2 7 -0.65536000000000000000e5 +221 3 2 15 -0.13107200000000000000e6 +221 3 4 17 -0.32768000000000000000e5 +221 3 6 11 -0.65536000000000000000e5 +221 3 13 18 0.32768000000000000000e5 +221 4 4 8 -0.65536000000000000000e5 +221 4 8 8 0.65536000000000000000e5 +222 1 5 30 0.65536000000000000000e5 +222 1 19 22 -0.65536000000000000000e5 +223 1 5 31 0.65536000000000000000e5 +223 1 7 22 0.65536000000000000000e5 +223 1 12 27 0.65536000000000000000e5 +223 1 13 28 -0.13107200000000000000e6 +223 2 15 15 0.13107200000000000000e6 +223 3 3 16 -0.65536000000000000000e5 +224 1 4 35 -0.65536000000000000000e5 +224 1 5 32 0.65536000000000000000e5 +224 3 13 18 -0.65536000000000000000e5 +225 1 2 9 0.13107200000000000000e6 +225 1 2 33 -0.65536000000000000000e5 +225 1 3 34 0.26214400000000000000e6 +225 1 5 33 0.65536000000000000000e5 +225 1 7 22 -0.26214400000000000000e6 +225 2 4 20 0.65536000000000000000e5 +225 2 6 20 0.13107200000000000000e6 +225 2 12 18 -0.65536000000000000000e5 +225 3 2 7 -0.13107200000000000000e6 +225 3 2 15 -0.13107200000000000000e6 +225 3 3 16 0.26214400000000000000e6 +225 3 5 18 -0.13107200000000000000e6 +225 3 6 19 0.26214400000000000000e6 +226 1 2 9 -0.65536000000000000000e5 +226 1 5 34 0.65536000000000000000e5 +226 1 7 22 0.13107200000000000000e6 +226 1 22 29 -0.13107200000000000000e6 +226 2 6 20 -0.65536000000000000000e5 +226 2 13 19 0.65536000000000000000e5 +226 3 2 7 0.65536000000000000000e5 +226 3 2 15 0.65536000000000000000e5 +226 3 3 16 -0.13107200000000000000e6 +226 3 5 18 0.65536000000000000000e5 +226 3 6 19 -0.13107200000000000000e6 +227 1 2 9 0.13107200000000000000e6 +227 1 3 34 0.13107200000000000000e6 +227 1 4 35 0.65536000000000000000e5 +227 1 5 35 0.65536000000000000000e5 +227 1 7 22 -0.26214400000000000000e6 +227 1 26 33 0.65536000000000000000e5 +227 2 6 20 0.13107200000000000000e6 +227 2 18 18 0.13107200000000000000e6 +227 3 2 7 -0.13107200000000000000e6 +227 3 2 15 -0.13107200000000000000e6 +227 3 3 16 0.26214400000000000000e6 +227 3 5 18 -0.13107200000000000000e6 +227 3 6 19 0.26214400000000000000e6 +227 3 7 20 0.13107200000000000000e6 +227 3 17 18 0.65536000000000000000e5 +228 1 1 10 -0.32768000000000000000e5 +228 1 6 6 0.65536000000000000000e5 +229 1 1 8 -0.65536000000000000000e5 +229 1 3 10 0.13107200000000000000e6 +229 1 4 11 0.13107200000000000000e6 +229 1 5 20 0.65536000000000000000e5 +229 1 6 7 0.65536000000000000000e5 +229 1 6 21 0.13107200000000000000e6 +229 1 11 26 0.65536000000000000000e5 +229 1 12 27 0.65536000000000000000e5 +229 1 13 20 -0.26214400000000000000e6 +229 2 1 15 -0.65536000000000000000e5 +229 2 2 8 0.65536000000000000000e5 +229 2 2 16 0.65536000000000000000e5 +229 2 3 9 0.65536000000000000000e5 +229 2 6 8 0.13107200000000000000e6 +229 2 6 12 0.65536000000000000000e5 +229 3 1 6 0.65536000000000000000e5 +229 3 3 8 0.19660800000000000000e6 +229 3 3 16 -0.65536000000000000000e5 +229 3 4 9 0.65536000000000000000e5 +229 3 5 10 -0.26214400000000000000e6 +229 3 9 14 0.13107200000000000000e6 +229 4 2 6 0.65536000000000000000e5 +229 4 5 9 -0.65536000000000000000e5 +230 1 3 10 -0.65536000000000000000e5 +230 1 6 8 0.65536000000000000000e5 +231 1 1 8 0.32768000000000000000e5 +231 1 5 20 -0.32768000000000000000e5 +231 1 6 9 0.65536000000000000000e5 +231 1 6 21 -0.65536000000000000000e5 +231 2 1 15 0.32768000000000000000e5 +231 2 6 12 -0.32768000000000000000e5 +231 3 1 6 -0.32768000000000000000e5 +231 3 3 8 -0.65536000000000000000e5 +232 1 1 8 -0.32768000000000000000e5 +232 1 1 10 -0.32768000000000000000e5 +232 1 3 10 0.32768000000000000000e5 +232 1 4 11 0.65536000000000000000e5 +232 1 5 20 0.32768000000000000000e5 +232 1 6 10 0.65536000000000000000e5 +232 1 6 21 0.65536000000000000000e5 +232 1 11 26 0.32768000000000000000e5 +232 1 12 27 0.32768000000000000000e5 +232 1 13 20 -0.13107200000000000000e6 +232 2 1 15 -0.32768000000000000000e5 +232 2 2 8 0.32768000000000000000e5 +232 2 2 16 0.32768000000000000000e5 +232 2 3 9 0.32768000000000000000e5 +232 2 5 5 -0.65536000000000000000e5 +232 2 6 8 0.65536000000000000000e5 +232 2 6 12 0.32768000000000000000e5 +232 3 1 6 0.32768000000000000000e5 +232 3 3 8 0.98304000000000000000e5 +232 3 3 16 -0.32768000000000000000e5 +232 3 4 9 0.32768000000000000000e5 +232 3 5 10 -0.13107200000000000000e6 +232 3 9 14 0.65536000000000000000e5 +232 4 2 6 0.32768000000000000000e5 +232 4 5 9 -0.32768000000000000000e5 +233 1 1 8 -0.16384000000000000000e5 +233 1 3 10 0.32768000000000000000e5 +233 1 4 11 0.65536000000000000000e5 +233 1 5 20 0.16384000000000000000e5 +233 1 6 11 0.65536000000000000000e5 +233 1 6 21 0.32768000000000000000e5 +233 1 11 26 0.32768000000000000000e5 +233 1 12 27 0.32768000000000000000e5 +233 1 13 20 -0.13107200000000000000e6 +233 2 1 15 -0.16384000000000000000e5 +233 2 2 16 0.32768000000000000000e5 +233 2 3 9 0.32768000000000000000e5 +233 2 6 8 0.65536000000000000000e5 +233 2 6 12 0.16384000000000000000e5 +233 3 1 6 0.16384000000000000000e5 +233 3 3 8 0.65536000000000000000e5 +233 3 3 16 -0.32768000000000000000e5 +233 3 4 9 0.32768000000000000000e5 +233 3 5 10 -0.13107200000000000000e6 +233 3 9 14 0.65536000000000000000e5 +233 4 2 6 0.32768000000000000000e5 +233 4 5 9 -0.32768000000000000000e5 +234 1 1 8 0.16384000000000000000e5 +234 1 3 10 -0.32768000000000000000e5 +234 1 4 11 -0.32768000000000000000e5 +234 1 5 20 -0.16384000000000000000e5 +234 1 6 12 0.65536000000000000000e5 +234 1 6 21 -0.32768000000000000000e5 +234 2 1 15 0.16384000000000000000e5 +234 2 2 16 -0.32768000000000000000e5 +234 2 6 12 -0.16384000000000000000e5 +234 3 1 6 -0.16384000000000000000e5 +234 3 3 8 -0.32768000000000000000e5 +234 4 2 6 -0.32768000000000000000e5 +235 1 6 14 0.65536000000000000000e5 +235 1 13 20 -0.65536000000000000000e5 +235 3 5 10 -0.65536000000000000000e5 +236 1 6 15 0.65536000000000000000e5 +236 1 10 13 -0.65536000000000000000e5 +237 1 1 8 -0.13107200000000000000e6 +237 1 2 9 -0.65536000000000000000e5 +237 1 5 20 0.13107200000000000000e6 +237 1 6 16 0.65536000000000000000e5 +237 1 6 21 0.65536000000000000000e6 +237 1 7 22 0.13107200000000000000e6 +237 1 8 23 0.26214400000000000000e6 +237 1 13 20 -0.52428800000000000000e6 +237 2 1 15 -0.19660800000000000000e6 +237 2 2 8 0.13107200000000000000e6 +237 2 2 16 0.13107200000000000000e6 +237 2 5 11 0.65536000000000000000e5 +237 2 6 12 0.13107200000000000000e6 +237 2 8 14 0.26214400000000000000e6 +237 3 1 6 0.13107200000000000000e6 +237 3 2 7 0.65536000000000000000e5 +237 4 4 4 -0.26214400000000000000e6 +238 1 1 8 -0.65536000000000000000e5 +238 1 6 17 0.65536000000000000000e5 +238 3 1 6 0.65536000000000000000e5 +239 1 1 8 0.65536000000000000000e5 +239 1 2 9 0.65536000000000000000e5 +239 1 6 18 0.65536000000000000000e5 +239 1 6 21 -0.13107200000000000000e6 +239 2 1 15 0.65536000000000000000e5 +239 3 1 6 -0.65536000000000000000e5 +239 3 2 7 -0.65536000000000000000e5 +240 1 2 9 -0.65536000000000000000e5 +240 1 6 19 0.65536000000000000000e5 +240 3 2 7 0.65536000000000000000e5 +241 1 1 8 -0.65536000000000000000e5 +241 1 5 20 0.65536000000000000000e5 +241 1 6 20 0.65536000000000000000e5 +241 1 6 21 0.26214400000000000000e6 +241 1 7 22 0.65536000000000000000e5 +241 1 8 23 0.13107200000000000000e6 +241 1 13 20 -0.26214400000000000000e6 +241 2 1 15 -0.65536000000000000000e5 +241 2 2 8 0.65536000000000000000e5 +241 2 2 16 0.65536000000000000000e5 +241 2 6 12 0.65536000000000000000e5 +241 2 8 14 0.13107200000000000000e6 +241 3 1 6 0.65536000000000000000e5 +241 4 4 4 -0.13107200000000000000e6 +242 1 1 8 0.32768000000000000000e5 +242 1 5 20 -0.32768000000000000000e5 +242 1 6 21 -0.65536000000000000000e5 +242 1 6 22 0.65536000000000000000e5 +242 2 1 15 0.32768000000000000000e5 +242 2 6 12 -0.32768000000000000000e5 +242 3 1 6 -0.32768000000000000000e5 +243 1 1 8 -0.16384000000000000000e5 +243 1 5 20 0.16384000000000000000e5 +243 1 6 21 0.65536000000000000000e5 +243 1 6 23 0.65536000000000000000e5 +243 1 7 22 0.32768000000000000000e5 +243 1 8 23 0.65536000000000000000e5 +243 1 13 20 -0.13107200000000000000e6 +243 2 1 15 -0.16384000000000000000e5 +243 2 2 16 0.32768000000000000000e5 +243 2 6 12 0.16384000000000000000e5 +243 2 8 14 0.65536000000000000000e5 +243 3 1 6 0.16384000000000000000e5 +244 1 1 8 0.16384000000000000000e5 +244 1 5 20 -0.16384000000000000000e5 +244 1 6 21 -0.65536000000000000000e5 +244 1 6 24 0.65536000000000000000e5 +244 1 7 22 -0.32768000000000000000e5 +244 2 1 15 0.16384000000000000000e5 +244 2 2 16 -0.32768000000000000000e5 +244 2 6 12 -0.16384000000000000000e5 +244 3 1 6 -0.16384000000000000000e5 +245 1 6 25 0.65536000000000000000e5 +245 1 13 20 -0.65536000000000000000e5 +246 1 1 8 -0.65536000000000000000e5 +246 1 6 26 0.65536000000000000000e5 +246 3 1 6 0.65536000000000000000e5 +246 3 1 14 0.65536000000000000000e5 +247 1 1 8 0.65536000000000000000e5 +247 1 2 9 0.65536000000000000000e5 +247 1 6 21 -0.13107200000000000000e6 +247 1 6 27 0.65536000000000000000e5 +247 2 1 15 0.65536000000000000000e5 +247 3 1 6 -0.65536000000000000000e5 +247 3 2 7 -0.65536000000000000000e5 +247 3 6 11 0.65536000000000000000e5 +248 1 2 9 -0.65536000000000000000e5 +248 1 6 28 0.65536000000000000000e5 +248 3 2 7 0.65536000000000000000e5 +248 3 2 15 0.65536000000000000000e5 +249 1 6 29 0.65536000000000000000e5 +249 1 16 23 -0.65536000000000000000e5 +250 1 6 30 0.65536000000000000000e5 +250 1 11 26 -0.65536000000000000000e5 +251 1 6 31 0.65536000000000000000e5 +251 1 7 22 -0.32768000000000000000e5 +251 1 11 26 -0.32768000000000000000e5 +251 1 16 23 -0.32768000000000000000e5 +251 2 5 19 -0.32768000000000000000e5 +251 3 3 16 0.32768000000000000000e5 +252 1 1 32 -0.32768000000000000000e5 +252 1 2 33 -0.32768000000000000000e5 +252 1 3 26 -0.32768000000000000000e5 +252 1 6 32 0.65536000000000000000e5 +252 2 11 17 -0.32768000000000000000e5 +252 3 11 12 0.32768000000000000000e5 +253 1 2 9 -0.65536000000000000000e5 +253 1 6 33 0.65536000000000000000e5 +253 3 2 7 0.65536000000000000000e5 +253 3 2 15 0.65536000000000000000e5 +253 3 5 18 0.65536000000000000000e5 +254 1 6 34 0.65536000000000000000e5 +254 1 16 31 -0.65536000000000000000e5 +255 1 6 35 0.65536000000000000000e5 +255 1 26 29 -0.65536000000000000000e5 +256 1 3 10 -0.32768000000000000000e5 +256 1 7 7 0.65536000000000000000e5 +257 1 1 8 0.32768000000000000000e5 +257 1 5 20 -0.32768000000000000000e5 +257 1 6 21 -0.65536000000000000000e5 +257 1 7 8 0.65536000000000000000e5 +257 2 1 15 0.32768000000000000000e5 +257 2 6 12 -0.32768000000000000000e5 +257 3 1 6 -0.32768000000000000000e5 +257 3 3 8 -0.65536000000000000000e5 +258 1 4 11 -0.65536000000000000000e5 +258 1 7 9 0.65536000000000000000e5 +259 1 1 8 -0.16384000000000000000e5 +259 1 3 10 0.32768000000000000000e5 +259 1 4 11 0.65536000000000000000e5 +259 1 5 20 0.16384000000000000000e5 +259 1 6 21 0.32768000000000000000e5 +259 1 7 10 0.65536000000000000000e5 +259 1 11 26 0.32768000000000000000e5 +259 1 12 27 0.32768000000000000000e5 +259 1 13 20 -0.13107200000000000000e6 +259 2 1 15 -0.16384000000000000000e5 +259 2 2 16 0.32768000000000000000e5 +259 2 3 9 0.32768000000000000000e5 +259 2 6 8 0.65536000000000000000e5 +259 2 6 12 0.16384000000000000000e5 +259 3 1 6 0.16384000000000000000e5 +259 3 3 8 0.65536000000000000000e5 +259 3 3 16 -0.32768000000000000000e5 +259 3 4 9 0.32768000000000000000e5 +259 3 5 10 -0.13107200000000000000e6 +259 3 9 14 0.65536000000000000000e5 +259 4 2 6 0.32768000000000000000e5 +259 4 5 9 -0.32768000000000000000e5 +260 1 1 8 0.16384000000000000000e5 +260 1 3 10 -0.32768000000000000000e5 +260 1 4 11 -0.32768000000000000000e5 +260 1 5 20 -0.16384000000000000000e5 +260 1 6 21 -0.32768000000000000000e5 +260 1 7 11 0.65536000000000000000e5 +260 2 1 15 0.16384000000000000000e5 +260 2 2 16 -0.32768000000000000000e5 +260 2 6 12 -0.16384000000000000000e5 +260 3 1 6 -0.16384000000000000000e5 +260 3 3 8 -0.32768000000000000000e5 +260 4 2 6 -0.32768000000000000000e5 +261 1 4 11 -0.32768000000000000000e5 +261 1 7 12 0.65536000000000000000e5 +261 1 11 26 -0.32768000000000000000e5 +261 1 12 27 -0.32768000000000000000e5 +261 2 3 9 -0.32768000000000000000e5 +261 3 3 8 -0.32768000000000000000e5 +261 3 3 16 0.32768000000000000000e5 +261 3 4 9 -0.32768000000000000000e5 +261 3 9 14 -0.65536000000000000000e5 +261 4 5 9 0.32768000000000000000e5 +262 1 7 13 0.65536000000000000000e5 +262 1 13 20 -0.65536000000000000000e5 +262 3 5 10 -0.65536000000000000000e5 +263 1 1 8 -0.40960000000000000000e4 +263 1 4 15 -0.32768000000000000000e5 +263 1 5 20 0.40960000000000000000e4 +263 1 6 21 0.16384000000000000000e5 +263 1 7 14 -0.32768000000000000000e5 +263 1 7 15 0.65536000000000000000e5 +263 1 7 22 0.81920000000000000000e4 +263 1 9 24 -0.16384000000000000000e5 +263 1 10 25 -0.65536000000000000000e5 +263 1 14 21 0.65536000000000000000e5 +263 2 1 15 -0.40960000000000000000e4 +263 2 2 16 0.81920000000000000000e4 +263 2 6 12 0.40960000000000000000e4 +263 2 9 15 -0.16384000000000000000e5 +263 2 10 12 0.16384000000000000000e5 +263 3 1 6 0.40960000000000000000e4 +263 3 5 10 -0.32768000000000000000e5 +263 4 6 6 -0.65536000000000000000e5 +264 1 1 8 -0.65536000000000000000e5 +264 1 7 16 0.65536000000000000000e5 +264 3 1 6 0.65536000000000000000e5 +265 1 1 8 0.65536000000000000000e5 +265 1 2 9 0.65536000000000000000e5 +265 1 6 21 -0.13107200000000000000e6 +265 1 7 17 0.65536000000000000000e5 +265 2 1 15 0.65536000000000000000e5 +265 3 1 6 -0.65536000000000000000e5 +265 3 2 7 -0.65536000000000000000e5 +266 1 2 9 -0.65536000000000000000e5 +266 1 7 18 0.65536000000000000000e5 +266 3 2 7 0.65536000000000000000e5 +267 1 5 20 -0.65536000000000000000e5 +267 1 7 19 0.65536000000000000000e5 +268 1 6 21 -0.65536000000000000000e5 +268 1 7 20 0.65536000000000000000e5 +269 1 1 8 0.32768000000000000000e5 +269 1 5 20 -0.32768000000000000000e5 +269 1 6 21 -0.65536000000000000000e5 +269 1 7 21 0.65536000000000000000e5 +269 2 1 15 0.32768000000000000000e5 +269 2 6 12 -0.32768000000000000000e5 +269 3 1 6 -0.32768000000000000000e5 +270 1 1 8 0.16384000000000000000e5 +270 1 5 20 -0.16384000000000000000e5 +270 1 6 21 -0.65536000000000000000e5 +270 1 7 22 -0.32768000000000000000e5 +270 1 7 23 0.65536000000000000000e5 +270 2 1 15 0.16384000000000000000e5 +270 2 2 16 -0.32768000000000000000e5 +270 2 6 12 -0.16384000000000000000e5 +270 3 1 6 -0.16384000000000000000e5 +271 1 7 24 0.65536000000000000000e5 +271 1 8 23 -0.65536000000000000000e5 +272 1 1 8 0.81920000000000000000e4 +272 1 5 20 -0.81920000000000000000e4 +272 1 6 21 -0.32768000000000000000e5 +272 1 7 22 -0.16384000000000000000e5 +272 1 7 25 0.65536000000000000000e5 +272 1 9 24 0.32768000000000000000e5 +272 1 14 21 -0.65536000000000000000e5 +272 2 1 15 0.81920000000000000000e4 +272 2 2 16 -0.16384000000000000000e5 +272 2 6 12 -0.81920000000000000000e4 +272 2 9 15 0.32768000000000000000e5 +272 2 10 12 -0.32768000000000000000e5 +272 3 1 6 -0.81920000000000000000e4 +273 1 1 8 0.65536000000000000000e5 +273 1 2 9 0.65536000000000000000e5 +273 1 6 21 -0.13107200000000000000e6 +273 1 7 26 0.65536000000000000000e5 +273 2 1 15 0.65536000000000000000e5 +273 3 1 6 -0.65536000000000000000e5 +273 3 2 7 -0.65536000000000000000e5 +273 3 6 11 0.65536000000000000000e5 +274 1 2 9 -0.65536000000000000000e5 +274 1 7 27 0.65536000000000000000e5 +274 3 2 7 0.65536000000000000000e5 +274 3 2 15 0.65536000000000000000e5 +275 1 1 8 -0.65536000000000000000e5 +275 1 6 21 0.13107200000000000000e6 +275 1 7 28 0.65536000000000000000e5 +275 1 11 26 -0.13107200000000000000e6 +275 2 1 15 -0.65536000000000000000e5 +275 2 6 12 0.65536000000000000000e5 +275 3 1 6 0.65536000000000000000e5 +275 3 2 15 -0.65536000000000000000e5 +275 3 6 11 -0.65536000000000000000e5 +275 4 4 8 -0.65536000000000000000e5 +276 1 7 29 0.65536000000000000000e5 +276 1 11 26 -0.65536000000000000000e5 +277 1 7 22 -0.65536000000000000000e5 +277 1 7 30 0.65536000000000000000e5 +277 3 3 16 0.65536000000000000000e5 +278 1 7 31 0.65536000000000000000e5 +278 1 8 23 -0.65536000000000000000e5 +278 3 9 14 0.65536000000000000000e5 +279 1 2 9 -0.65536000000000000000e5 +279 1 7 32 0.65536000000000000000e5 +279 3 2 7 0.65536000000000000000e5 +279 3 2 15 0.65536000000000000000e5 +279 3 5 18 0.65536000000000000000e5 +280 1 3 34 -0.65536000000000000000e5 +280 1 7 33 0.65536000000000000000e5 +281 1 7 22 -0.65536000000000000000e5 +281 1 7 34 0.65536000000000000000e5 +281 3 3 16 0.65536000000000000000e5 +281 3 6 19 0.65536000000000000000e5 +282 1 2 9 -0.65536000000000000000e5 +282 1 3 34 -0.65536000000000000000e5 +282 1 7 35 0.65536000000000000000e5 +282 1 26 29 0.65536000000000000000e5 +282 2 6 20 -0.65536000000000000000e5 +282 2 14 20 0.65536000000000000000e5 +282 3 2 7 0.65536000000000000000e5 +282 3 2 15 0.65536000000000000000e5 +282 3 5 18 0.65536000000000000000e5 +282 3 7 20 -0.65536000000000000000e5 +282 3 14 19 0.13107200000000000000e6 +283 1 4 11 -0.32768000000000000000e5 +283 1 8 8 0.65536000000000000000e5 +284 1 1 8 -0.32768000000000000000e5 +284 1 5 20 0.32768000000000000000e5 +284 1 6 21 0.65536000000000000000e5 +284 1 8 9 0.65536000000000000000e5 +284 1 11 26 -0.65536000000000000000e5 +284 1 12 27 -0.65536000000000000000e5 +284 2 1 15 -0.32768000000000000000e5 +284 2 6 12 0.32768000000000000000e5 +284 3 1 6 0.32768000000000000000e5 +284 3 3 16 0.65536000000000000000e5 +284 3 4 9 -0.65536000000000000000e5 +284 3 9 14 -0.13107200000000000000e6 +284 4 5 9 0.65536000000000000000e5 +285 1 1 8 0.16384000000000000000e5 +285 1 3 10 -0.32768000000000000000e5 +285 1 4 11 -0.32768000000000000000e5 +285 1 5 20 -0.16384000000000000000e5 +285 1 6 21 -0.32768000000000000000e5 +285 1 8 10 0.65536000000000000000e5 +285 2 1 15 0.16384000000000000000e5 +285 2 2 16 -0.32768000000000000000e5 +285 2 6 12 -0.16384000000000000000e5 +285 3 1 6 -0.16384000000000000000e5 +285 3 3 8 -0.32768000000000000000e5 +285 4 2 6 -0.32768000000000000000e5 +286 1 4 11 -0.32768000000000000000e5 +286 1 8 11 0.65536000000000000000e5 +286 1 11 26 -0.32768000000000000000e5 +286 1 12 27 -0.32768000000000000000e5 +286 2 3 9 -0.32768000000000000000e5 +286 3 3 8 -0.32768000000000000000e5 +286 3 3 16 0.32768000000000000000e5 +286 3 4 9 -0.32768000000000000000e5 +286 3 9 14 -0.65536000000000000000e5 +286 4 5 9 0.32768000000000000000e5 +287 1 4 11 0.32768000000000000000e5 +287 1 4 15 -0.13107200000000000000e6 +287 1 8 12 0.65536000000000000000e5 +287 1 9 12 0.65536000000000000000e5 +287 1 11 26 0.32768000000000000000e5 +287 1 12 27 0.32768000000000000000e5 +287 2 3 9 0.32768000000000000000e5 +287 2 4 10 0.65536000000000000000e5 +287 3 3 8 0.32768000000000000000e5 +287 3 3 16 -0.32768000000000000000e5 +287 3 4 9 0.32768000000000000000e5 +287 3 9 14 0.65536000000000000000e5 +287 4 5 9 -0.32768000000000000000e5 +288 1 7 14 -0.65536000000000000000e5 +288 1 8 13 0.65536000000000000000e5 +289 1 4 15 -0.65536000000000000000e5 +289 1 8 14 0.65536000000000000000e5 +290 1 1 8 0.65536000000000000000e5 +290 1 2 9 0.65536000000000000000e5 +290 1 6 21 -0.13107200000000000000e6 +290 1 8 16 0.65536000000000000000e5 +290 2 1 15 0.65536000000000000000e5 +290 3 1 6 -0.65536000000000000000e5 +290 3 2 7 -0.65536000000000000000e5 +291 1 2 9 -0.65536000000000000000e5 +291 1 8 17 0.65536000000000000000e5 +291 3 2 7 0.65536000000000000000e5 +292 1 5 20 -0.65536000000000000000e5 +292 1 8 18 0.65536000000000000000e5 +293 1 2 9 0.65536000000000000000e5 +293 1 5 20 0.65536000000000000000e5 +293 1 7 22 -0.13107200000000000000e6 +293 1 8 19 0.65536000000000000000e5 +293 2 4 14 0.65536000000000000000e5 +293 3 2 7 -0.65536000000000000000e5 +294 1 1 8 0.32768000000000000000e5 +294 1 5 20 -0.32768000000000000000e5 +294 1 6 21 -0.65536000000000000000e5 +294 1 8 20 0.65536000000000000000e5 +294 2 1 15 0.32768000000000000000e5 +294 2 6 12 -0.32768000000000000000e5 +294 3 1 6 -0.32768000000000000000e5 +295 1 7 22 -0.65536000000000000000e5 +295 1 8 21 0.65536000000000000000e5 +296 1 1 8 -0.32768000000000000000e5 +296 1 5 20 0.32768000000000000000e5 +296 1 6 21 0.65536000000000000000e5 +296 1 8 22 0.65536000000000000000e5 +296 1 11 26 -0.65536000000000000000e5 +296 1 12 27 -0.65536000000000000000e5 +296 2 1 15 -0.32768000000000000000e5 +296 2 6 12 0.32768000000000000000e5 +296 3 1 6 0.32768000000000000000e5 +296 3 3 16 0.65536000000000000000e5 +296 3 9 14 -0.13107200000000000000e6 +296 4 5 9 0.65536000000000000000e5 +297 1 8 23 0.65536000000000000000e5 +297 1 8 24 0.65536000000000000000e5 +297 1 9 24 0.65536000000000000000e5 +297 1 14 21 -0.13107200000000000000e6 +297 2 9 15 0.65536000000000000000e5 +298 1 8 25 0.65536000000000000000e5 +298 1 14 21 -0.65536000000000000000e5 +299 1 2 9 -0.65536000000000000000e5 +299 1 8 26 0.65536000000000000000e5 +299 3 2 7 0.65536000000000000000e5 +299 3 2 15 0.65536000000000000000e5 +300 1 1 8 -0.65536000000000000000e5 +300 1 6 21 0.13107200000000000000e6 +300 1 8 27 0.65536000000000000000e5 +300 1 11 26 -0.13107200000000000000e6 +300 2 1 15 -0.65536000000000000000e5 +300 2 6 12 0.65536000000000000000e5 +300 3 1 6 0.65536000000000000000e5 +300 3 2 15 -0.65536000000000000000e5 +300 3 6 11 -0.65536000000000000000e5 +300 4 4 8 -0.65536000000000000000e5 +301 1 1 8 -0.65536000000000000000e5 +301 1 2 9 0.65536000000000000000e5 +301 1 2 33 0.32768000000000000000e5 +301 1 3 26 -0.32768000000000000000e5 +301 1 3 34 -0.65536000000000000000e5 +301 1 4 35 0.32768000000000000000e5 +301 1 5 28 -0.32768000000000000000e5 +301 1 6 21 0.13107200000000000000e6 +301 1 8 28 0.65536000000000000000e5 +301 1 11 26 -0.13107200000000000000e6 +301 2 1 15 -0.65536000000000000000e5 +301 2 3 17 -0.32768000000000000000e5 +301 2 4 18 -0.32768000000000000000e5 +301 2 6 12 0.65536000000000000000e5 +301 2 12 18 0.65536000000000000000e5 +301 3 1 6 0.65536000000000000000e5 +301 3 2 7 -0.65536000000000000000e5 +301 3 2 15 -0.13107200000000000000e6 +301 3 4 17 -0.32768000000000000000e5 +301 3 6 11 -0.65536000000000000000e5 +301 3 13 18 0.32768000000000000000e5 +301 4 4 8 -0.65536000000000000000e5 +301 4 8 8 0.65536000000000000000e5 +302 1 7 22 -0.65536000000000000000e5 +302 1 8 29 0.65536000000000000000e5 +302 3 3 16 0.65536000000000000000e5 +303 1 8 30 0.65536000000000000000e5 +303 1 12 27 -0.65536000000000000000e5 +304 1 8 31 0.65536000000000000000e5 +304 1 13 28 -0.65536000000000000000e5 +305 1 3 34 -0.65536000000000000000e5 +305 1 8 32 0.65536000000000000000e5 +306 1 2 9 0.65536000000000000000e5 +306 1 3 34 0.65536000000000000000e5 +306 1 7 22 -0.13107200000000000000e6 +306 1 8 33 0.65536000000000000000e5 +306 2 6 20 0.65536000000000000000e5 +306 3 2 7 -0.65536000000000000000e5 +306 3 2 15 -0.65536000000000000000e5 +306 3 3 16 0.13107200000000000000e6 +306 3 5 18 -0.65536000000000000000e5 +306 3 6 19 0.13107200000000000000e6 +307 1 8 34 0.65536000000000000000e5 +307 1 22 29 -0.65536000000000000000e5 +308 1 2 9 0.65536000000000000000e5 +308 1 3 34 0.65536000000000000000e5 +308 1 7 22 -0.13107200000000000000e6 +308 1 8 35 0.65536000000000000000e5 +308 2 6 20 0.65536000000000000000e5 +308 3 2 7 -0.65536000000000000000e5 +308 3 2 15 -0.65536000000000000000e5 +308 3 3 16 0.13107200000000000000e6 +308 3 5 18 -0.65536000000000000000e5 +308 3 6 19 0.13107200000000000000e6 +308 3 7 20 0.65536000000000000000e5 +309 1 5 12 -0.32768000000000000000e5 +309 1 9 9 0.65536000000000000000e5 +310 1 4 11 -0.32768000000000000000e5 +310 1 9 10 0.65536000000000000000e5 +310 1 11 26 -0.32768000000000000000e5 +310 1 12 27 -0.32768000000000000000e5 +310 2 3 9 -0.32768000000000000000e5 +310 3 3 8 -0.32768000000000000000e5 +310 3 3 16 0.32768000000000000000e5 +310 3 4 9 -0.32768000000000000000e5 +310 3 9 14 -0.65536000000000000000e5 +310 4 5 9 0.32768000000000000000e5 +311 1 4 11 0.32768000000000000000e5 +311 1 4 15 -0.13107200000000000000e6 +311 1 9 11 0.65536000000000000000e5 +311 1 9 12 0.65536000000000000000e5 +311 1 11 26 0.32768000000000000000e5 +311 1 12 27 0.32768000000000000000e5 +311 2 3 9 0.32768000000000000000e5 +311 2 4 10 0.65536000000000000000e5 +311 3 3 8 0.32768000000000000000e5 +311 3 3 16 -0.32768000000000000000e5 +311 3 4 9 0.32768000000000000000e5 +311 3 9 14 0.65536000000000000000e5 +311 4 5 9 -0.32768000000000000000e5 +312 1 4 15 -0.65536000000000000000e5 +312 1 9 13 0.65536000000000000000e5 +313 1 4 15 0.65536000000000000000e5 +313 1 7 14 0.65536000000000000000e5 +313 1 8 15 -0.13107200000000000000e6 +313 1 9 14 0.65536000000000000000e5 +313 2 9 9 0.13107200000000000000e6 +314 1 9 15 0.65536000000000000000e5 +314 1 12 14 -0.65536000000000000000e5 +315 1 2 9 -0.65536000000000000000e5 +315 1 9 16 0.65536000000000000000e5 +315 3 2 7 0.65536000000000000000e5 +316 1 5 20 -0.65536000000000000000e5 +316 1 9 17 0.65536000000000000000e5 +317 1 2 9 0.65536000000000000000e5 +317 1 5 20 0.65536000000000000000e5 +317 1 7 22 -0.13107200000000000000e6 +317 1 9 18 0.65536000000000000000e5 +317 2 4 14 0.65536000000000000000e5 +317 3 2 7 -0.65536000000000000000e5 +318 1 1 8 -0.65536000000000000000e5 +318 1 2 9 -0.65536000000000000000e5 +318 1 5 20 0.65536000000000000000e5 +318 1 6 21 0.13107200000000000000e6 +318 1 7 22 0.13107200000000000000e6 +318 1 9 19 0.65536000000000000000e5 +318 1 11 26 -0.13107200000000000000e6 +318 1 12 27 -0.13107200000000000000e6 +318 2 1 15 -0.65536000000000000000e5 +318 2 4 14 -0.65536000000000000000e5 +318 2 6 12 0.65536000000000000000e5 +318 2 7 13 0.65536000000000000000e5 +318 3 1 6 0.65536000000000000000e5 +318 3 2 7 0.65536000000000000000e5 +318 3 3 16 0.13107200000000000000e6 +318 3 9 14 -0.26214400000000000000e6 +318 4 5 9 0.13107200000000000000e6 +319 1 7 22 -0.65536000000000000000e5 +319 1 9 20 0.65536000000000000000e5 +320 1 1 8 -0.32768000000000000000e5 +320 1 5 20 0.32768000000000000000e5 +320 1 6 21 0.65536000000000000000e5 +320 1 9 21 0.65536000000000000000e5 +320 1 11 26 -0.65536000000000000000e5 +320 1 12 27 -0.65536000000000000000e5 +320 2 1 15 -0.32768000000000000000e5 +320 2 6 12 0.32768000000000000000e5 +320 3 1 6 0.32768000000000000000e5 +320 3 3 16 0.65536000000000000000e5 +320 3 9 14 -0.13107200000000000000e6 +320 4 5 9 0.65536000000000000000e5 +321 1 9 22 0.65536000000000000000e5 +321 1 12 19 -0.65536000000000000000e5 +322 1 8 23 0.65536000000000000000e5 +322 1 9 23 0.65536000000000000000e5 +322 1 9 24 0.65536000000000000000e5 +322 1 14 21 -0.13107200000000000000e6 +322 2 9 15 0.65536000000000000000e5 +323 1 1 8 -0.65536000000000000000e5 +323 1 6 21 0.13107200000000000000e6 +323 1 9 26 0.65536000000000000000e5 +323 1 11 26 -0.13107200000000000000e6 +323 2 1 15 -0.65536000000000000000e5 +323 2 6 12 0.65536000000000000000e5 +323 3 1 6 0.65536000000000000000e5 +323 3 2 15 -0.65536000000000000000e5 +323 3 6 11 -0.65536000000000000000e5 +323 4 4 8 -0.65536000000000000000e5 +324 1 1 8 -0.65536000000000000000e5 +324 1 2 9 0.65536000000000000000e5 +324 1 2 33 0.32768000000000000000e5 +324 1 3 26 -0.32768000000000000000e5 +324 1 3 34 -0.65536000000000000000e5 +324 1 4 35 0.32768000000000000000e5 +324 1 5 28 -0.32768000000000000000e5 +324 1 6 21 0.13107200000000000000e6 +324 1 9 27 0.65536000000000000000e5 +324 1 11 26 -0.13107200000000000000e6 +324 2 1 15 -0.65536000000000000000e5 +324 2 3 17 -0.32768000000000000000e5 +324 2 4 18 -0.32768000000000000000e5 +324 2 6 12 0.65536000000000000000e5 +324 2 12 18 0.65536000000000000000e5 +324 3 1 6 0.65536000000000000000e5 +324 3 2 7 -0.65536000000000000000e5 +324 3 2 15 -0.13107200000000000000e6 +324 3 4 17 -0.32768000000000000000e5 +324 3 6 11 -0.65536000000000000000e5 +324 3 13 18 0.32768000000000000000e5 +324 4 4 8 -0.65536000000000000000e5 +324 4 8 8 0.65536000000000000000e5 +325 1 9 28 0.65536000000000000000e5 +325 1 19 22 -0.65536000000000000000e5 +326 1 9 29 0.65536000000000000000e5 +326 1 12 27 -0.65536000000000000000e5 +327 1 7 22 0.65536000000000000000e5 +327 1 9 30 0.65536000000000000000e5 +327 1 12 27 0.65536000000000000000e5 +327 1 13 28 -0.13107200000000000000e6 +327 2 15 15 0.13107200000000000000e6 +327 3 3 16 -0.65536000000000000000e5 +328 1 8 23 0.65536000000000000000e5 +328 1 9 31 0.65536000000000000000e5 +328 1 13 28 0.65536000000000000000e5 +328 1 14 29 -0.13107200000000000000e6 +328 2 9 19 0.65536000000000000000e5 +328 3 9 14 -0.65536000000000000000e5 +329 1 2 9 0.65536000000000000000e5 +329 1 3 34 0.65536000000000000000e5 +329 1 7 22 -0.13107200000000000000e6 +329 1 9 32 0.65536000000000000000e5 +329 2 6 20 0.65536000000000000000e5 +329 3 2 7 -0.65536000000000000000e5 +329 3 2 15 -0.65536000000000000000e5 +329 3 3 16 0.13107200000000000000e6 +329 3 5 18 -0.65536000000000000000e5 +329 3 6 19 0.13107200000000000000e6 +330 1 2 9 -0.65536000000000000000e5 +330 1 7 22 0.13107200000000000000e6 +330 1 9 33 0.65536000000000000000e5 +330 1 22 29 -0.13107200000000000000e6 +330 2 6 20 -0.65536000000000000000e5 +330 2 13 19 0.65536000000000000000e5 +330 3 2 7 0.65536000000000000000e5 +330 3 2 15 0.65536000000000000000e5 +330 3 3 16 -0.13107200000000000000e6 +330 3 5 18 0.65536000000000000000e5 +330 3 6 19 -0.13107200000000000000e6 +331 1 7 22 0.65536000000000000000e5 +331 1 9 34 0.65536000000000000000e5 +331 1 22 29 0.65536000000000000000e5 +331 1 23 30 -0.13107200000000000000e6 +331 2 16 18 0.65536000000000000000e5 +331 3 3 16 -0.65536000000000000000e5 +331 3 6 19 -0.65536000000000000000e5 +332 1 9 35 0.65536000000000000000e5 +332 1 19 34 -0.65536000000000000000e5 +333 1 6 13 -0.32768000000000000000e5 +333 1 10 10 0.65536000000000000000e5 +334 1 10 11 0.65536000000000000000e5 +334 1 13 20 -0.65536000000000000000e5 +334 3 5 10 -0.65536000000000000000e5 +335 1 7 14 -0.65536000000000000000e5 +335 1 10 12 0.65536000000000000000e5 +336 1 1 8 -0.40960000000000000000e4 +336 1 4 15 -0.32768000000000000000e5 +336 1 5 20 0.40960000000000000000e4 +336 1 6 21 0.16384000000000000000e5 +336 1 7 14 -0.32768000000000000000e5 +336 1 7 22 0.81920000000000000000e4 +336 1 9 24 -0.16384000000000000000e5 +336 1 10 14 0.65536000000000000000e5 +336 1 10 25 -0.65536000000000000000e5 +336 1 14 21 0.65536000000000000000e5 +336 2 1 15 -0.40960000000000000000e4 +336 2 2 16 0.81920000000000000000e4 +336 2 6 12 0.40960000000000000000e4 +336 2 9 15 -0.16384000000000000000e5 +336 2 10 12 0.16384000000000000000e5 +336 3 1 6 0.40960000000000000000e4 +336 3 5 10 -0.32768000000000000000e5 +336 4 6 6 -0.65536000000000000000e5 +337 1 1 8 -0.20480000000000000000e4 +337 1 4 15 -0.16384000000000000000e5 +337 1 5 20 0.20480000000000000000e4 +337 1 6 21 0.81920000000000000000e4 +337 1 7 14 -0.16384000000000000000e5 +337 1 7 22 0.40960000000000000000e4 +337 1 8 15 -0.32768000000000000000e5 +337 1 9 24 -0.81920000000000000000e4 +337 1 10 13 -0.32768000000000000000e5 +337 1 10 15 0.65536000000000000000e5 +337 1 10 25 -0.32768000000000000000e5 +337 1 14 21 0.32768000000000000000e5 +337 2 1 15 -0.20480000000000000000e4 +337 2 2 16 0.40960000000000000000e4 +337 2 6 12 0.20480000000000000000e4 +337 2 8 10 -0.32768000000000000000e5 +337 2 9 15 -0.81920000000000000000e4 +337 2 10 12 0.81920000000000000000e4 +337 3 1 6 0.20480000000000000000e4 +337 3 5 10 -0.16384000000000000000e5 +337 4 6 6 -0.32768000000000000000e5 +338 1 1 8 -0.65536000000000000000e5 +338 1 5 20 0.65536000000000000000e5 +338 1 6 21 0.26214400000000000000e6 +338 1 7 22 0.65536000000000000000e5 +338 1 8 23 0.13107200000000000000e6 +338 1 10 16 0.65536000000000000000e5 +338 1 13 20 -0.26214400000000000000e6 +338 2 1 15 -0.65536000000000000000e5 +338 2 2 8 0.65536000000000000000e5 +338 2 2 16 0.65536000000000000000e5 +338 2 6 12 0.65536000000000000000e5 +338 2 8 14 0.13107200000000000000e6 +338 3 1 6 0.65536000000000000000e5 +338 4 4 4 -0.13107200000000000000e6 +339 1 6 21 -0.65536000000000000000e5 +339 1 10 17 0.65536000000000000000e5 +340 1 1 8 0.32768000000000000000e5 +340 1 5 20 -0.32768000000000000000e5 +340 1 6 21 -0.65536000000000000000e5 +340 1 10 18 0.65536000000000000000e5 +340 2 1 15 0.32768000000000000000e5 +340 2 6 12 -0.32768000000000000000e5 +340 3 1 6 -0.32768000000000000000e5 +341 1 7 22 -0.65536000000000000000e5 +341 1 10 19 0.65536000000000000000e5 +342 1 1 8 -0.16384000000000000000e5 +342 1 5 20 0.16384000000000000000e5 +342 1 6 21 0.65536000000000000000e5 +342 1 7 22 0.32768000000000000000e5 +342 1 8 23 0.65536000000000000000e5 +342 1 10 20 0.65536000000000000000e5 +342 1 13 20 -0.13107200000000000000e6 +342 2 1 15 -0.16384000000000000000e5 +342 2 2 16 0.32768000000000000000e5 +342 2 6 12 0.16384000000000000000e5 +342 2 8 14 0.65536000000000000000e5 +342 3 1 6 0.16384000000000000000e5 +343 1 1 8 0.16384000000000000000e5 +343 1 5 20 -0.16384000000000000000e5 +343 1 6 21 -0.65536000000000000000e5 +343 1 7 22 -0.32768000000000000000e5 +343 1 10 21 0.65536000000000000000e5 +343 2 1 15 0.16384000000000000000e5 +343 2 2 16 -0.32768000000000000000e5 +343 2 6 12 -0.16384000000000000000e5 +343 3 1 6 -0.16384000000000000000e5 +344 1 8 23 -0.65536000000000000000e5 +344 1 10 22 0.65536000000000000000e5 +345 1 10 23 0.65536000000000000000e5 +345 1 13 20 -0.65536000000000000000e5 +346 1 1 8 0.81920000000000000000e4 +346 1 5 20 -0.81920000000000000000e4 +346 1 6 21 -0.32768000000000000000e5 +346 1 7 22 -0.16384000000000000000e5 +346 1 9 24 0.32768000000000000000e5 +346 1 10 24 0.65536000000000000000e5 +346 1 14 21 -0.65536000000000000000e5 +346 2 1 15 0.81920000000000000000e4 +346 2 2 16 -0.16384000000000000000e5 +346 2 6 12 -0.81920000000000000000e4 +346 2 9 15 0.32768000000000000000e5 +346 2 10 12 -0.32768000000000000000e5 +346 3 1 6 -0.81920000000000000000e4 +347 1 10 26 0.65536000000000000000e5 +347 1 16 23 -0.65536000000000000000e5 +348 1 10 27 0.65536000000000000000e5 +348 1 11 26 -0.65536000000000000000e5 +349 1 7 22 -0.65536000000000000000e5 +349 1 10 28 0.65536000000000000000e5 +349 3 3 16 0.65536000000000000000e5 +350 1 7 22 -0.32768000000000000000e5 +350 1 10 29 0.65536000000000000000e5 +350 1 11 26 -0.32768000000000000000e5 +350 1 16 23 -0.32768000000000000000e5 +350 2 5 19 -0.32768000000000000000e5 +350 3 3 16 0.32768000000000000000e5 +351 1 8 23 -0.65536000000000000000e5 +351 1 10 30 0.65536000000000000000e5 +351 3 9 14 0.65536000000000000000e5 +352 1 7 22 -0.16384000000000000000e5 +352 1 8 23 -0.32768000000000000000e5 +352 1 10 31 0.65536000000000000000e5 +352 1 11 26 -0.16384000000000000000e5 +352 1 13 28 -0.32768000000000000000e5 +352 1 16 23 -0.16384000000000000000e5 +352 2 5 19 -0.16384000000000000000e5 +352 2 14 16 -0.32768000000000000000e5 +352 3 3 16 0.16384000000000000000e5 +352 3 9 14 0.32768000000000000000e5 +353 1 10 32 0.65536000000000000000e5 +353 1 16 31 -0.65536000000000000000e5 +354 1 7 22 -0.65536000000000000000e5 +354 1 10 33 0.65536000000000000000e5 +354 3 3 16 0.65536000000000000000e5 +354 3 6 19 0.65536000000000000000e5 +355 1 8 23 -0.65536000000000000000e5 +355 1 10 34 0.65536000000000000000e5 +355 1 11 26 0.32768000000000000000e5 +355 1 12 27 0.32768000000000000000e5 +355 1 16 31 -0.32768000000000000000e5 +355 1 22 29 -0.32768000000000000000e5 +355 3 6 19 0.32768000000000000000e5 +355 3 9 14 0.65536000000000000000e5 +355 4 6 10 0.32768000000000000000e5 +356 1 7 22 -0.65536000000000000000e5 +356 1 10 35 0.65536000000000000000e5 +356 3 3 16 0.65536000000000000000e5 +356 3 6 19 0.65536000000000000000e5 +356 3 14 19 0.65536000000000000000e5 +357 1 7 14 -0.32768000000000000000e5 +357 1 11 11 0.65536000000000000000e5 +358 1 4 15 -0.65536000000000000000e5 +358 1 11 12 0.65536000000000000000e5 +359 1 1 8 -0.40960000000000000000e4 +359 1 4 15 -0.32768000000000000000e5 +359 1 5 20 0.40960000000000000000e4 +359 1 6 21 0.16384000000000000000e5 +359 1 7 14 -0.32768000000000000000e5 +359 1 7 22 0.81920000000000000000e4 +359 1 9 24 -0.16384000000000000000e5 +359 1 10 25 -0.65536000000000000000e5 +359 1 11 13 0.65536000000000000000e5 +359 1 14 21 0.65536000000000000000e5 +359 2 1 15 -0.40960000000000000000e4 +359 2 2 16 0.81920000000000000000e4 +359 2 6 12 0.40960000000000000000e4 +359 2 9 15 -0.16384000000000000000e5 +359 2 10 12 0.16384000000000000000e5 +359 3 1 6 0.40960000000000000000e4 +359 3 5 10 -0.32768000000000000000e5 +359 4 6 6 -0.65536000000000000000e5 +360 1 8 15 -0.65536000000000000000e5 +360 1 11 14 0.65536000000000000000e5 +361 1 11 15 0.65536000000000000000e5 +361 1 13 14 -0.65536000000000000000e5 +362 1 6 21 -0.65536000000000000000e5 +362 1 11 16 0.65536000000000000000e5 +363 1 1 8 0.32768000000000000000e5 +363 1 5 20 -0.32768000000000000000e5 +363 1 6 21 -0.65536000000000000000e5 +363 1 11 17 0.65536000000000000000e5 +363 2 1 15 0.32768000000000000000e5 +363 2 6 12 -0.32768000000000000000e5 +363 3 1 6 -0.32768000000000000000e5 +364 1 7 22 -0.65536000000000000000e5 +364 1 11 18 0.65536000000000000000e5 +365 1 1 8 -0.32768000000000000000e5 +365 1 5 20 0.32768000000000000000e5 +365 1 6 21 0.65536000000000000000e5 +365 1 11 19 0.65536000000000000000e5 +365 1 11 26 -0.65536000000000000000e5 +365 1 12 27 -0.65536000000000000000e5 +365 2 1 15 -0.32768000000000000000e5 +365 2 6 12 0.32768000000000000000e5 +365 3 1 6 0.32768000000000000000e5 +365 3 3 16 0.65536000000000000000e5 +365 3 9 14 -0.13107200000000000000e6 +365 4 5 9 0.65536000000000000000e5 +366 1 1 8 0.16384000000000000000e5 +366 1 5 20 -0.16384000000000000000e5 +366 1 6 21 -0.65536000000000000000e5 +366 1 7 22 -0.32768000000000000000e5 +366 1 11 20 0.65536000000000000000e5 +366 2 1 15 0.16384000000000000000e5 +366 2 2 16 -0.32768000000000000000e5 +366 2 6 12 -0.16384000000000000000e5 +366 3 1 6 -0.16384000000000000000e5 +367 1 8 23 -0.65536000000000000000e5 +367 1 11 21 0.65536000000000000000e5 +368 1 8 23 0.65536000000000000000e5 +368 1 9 24 0.65536000000000000000e5 +368 1 11 22 0.65536000000000000000e5 +368 1 14 21 -0.13107200000000000000e6 +368 2 9 15 0.65536000000000000000e5 +369 1 1 8 0.81920000000000000000e4 +369 1 5 20 -0.81920000000000000000e4 +369 1 6 21 -0.32768000000000000000e5 +369 1 7 22 -0.16384000000000000000e5 +369 1 9 24 0.32768000000000000000e5 +369 1 11 23 0.65536000000000000000e5 +369 1 14 21 -0.65536000000000000000e5 +369 2 1 15 0.81920000000000000000e4 +369 2 2 16 -0.16384000000000000000e5 +369 2 6 12 -0.81920000000000000000e4 +369 2 9 15 0.32768000000000000000e5 +369 2 10 12 -0.32768000000000000000e5 +369 3 1 6 -0.81920000000000000000e4 +370 1 11 24 0.65536000000000000000e5 +370 1 14 21 -0.65536000000000000000e5 +371 1 8 15 -0.65536000000000000000e5 +371 1 11 25 0.65536000000000000000e5 +371 3 9 10 0.65536000000000000000e5 +372 1 7 22 -0.65536000000000000000e5 +372 1 11 27 0.65536000000000000000e5 +372 3 3 16 0.65536000000000000000e5 +373 1 11 28 0.65536000000000000000e5 +373 1 12 27 -0.65536000000000000000e5 +374 1 8 23 -0.65536000000000000000e5 +374 1 11 29 0.65536000000000000000e5 +374 3 9 14 0.65536000000000000000e5 +375 1 11 30 0.65536000000000000000e5 +375 1 13 28 -0.65536000000000000000e5 +376 1 11 31 0.65536000000000000000e5 +376 1 14 29 -0.65536000000000000000e5 +377 1 7 22 -0.65536000000000000000e5 +377 1 11 32 0.65536000000000000000e5 +377 3 3 16 0.65536000000000000000e5 +377 3 6 19 0.65536000000000000000e5 +378 1 11 33 0.65536000000000000000e5 +378 1 22 29 -0.65536000000000000000e5 +379 1 11 34 0.65536000000000000000e5 +379 1 23 30 -0.65536000000000000000e5 +380 1 11 35 0.65536000000000000000e5 +380 1 29 30 -0.65536000000000000000e5 +381 1 4 15 0.32768000000000000000e5 +381 1 7 14 0.32768000000000000000e5 +381 1 8 15 -0.65536000000000000000e5 +381 1 12 12 0.65536000000000000000e5 +381 2 9 9 0.65536000000000000000e5 +382 1 8 15 -0.65536000000000000000e5 +382 1 12 13 0.65536000000000000000e5 +383 1 1 8 0.32768000000000000000e5 +383 1 5 20 -0.32768000000000000000e5 +383 1 6 21 -0.65536000000000000000e5 +383 1 12 16 0.65536000000000000000e5 +383 2 1 15 0.32768000000000000000e5 +383 2 6 12 -0.32768000000000000000e5 +383 3 1 6 -0.32768000000000000000e5 +384 1 7 22 -0.65536000000000000000e5 +384 1 12 17 0.65536000000000000000e5 +385 1 1 8 -0.32768000000000000000e5 +385 1 5 20 0.32768000000000000000e5 +385 1 6 21 0.65536000000000000000e5 +385 1 11 26 -0.65536000000000000000e5 +385 1 12 18 0.65536000000000000000e5 +385 1 12 27 -0.65536000000000000000e5 +385 2 1 15 -0.32768000000000000000e5 +385 2 6 12 0.32768000000000000000e5 +385 3 1 6 0.32768000000000000000e5 +385 3 3 16 0.65536000000000000000e5 +385 3 9 14 -0.13107200000000000000e6 +385 4 5 9 0.65536000000000000000e5 +386 1 8 23 -0.65536000000000000000e5 +386 1 12 20 0.65536000000000000000e5 +387 1 8 23 0.65536000000000000000e5 +387 1 9 24 0.65536000000000000000e5 +387 1 12 21 0.65536000000000000000e5 +387 1 14 21 -0.13107200000000000000e6 +387 2 9 15 0.65536000000000000000e5 +388 1 9 24 -0.65536000000000000000e5 +388 1 12 22 0.65536000000000000000e5 +389 1 12 23 0.65536000000000000000e5 +389 1 14 21 -0.65536000000000000000e5 +390 1 9 25 -0.65536000000000000000e5 +390 1 12 24 0.65536000000000000000e5 +391 1 12 25 0.65536000000000000000e5 +391 1 15 22 -0.65536000000000000000e5 +392 1 7 22 -0.65536000000000000000e5 +392 1 12 26 0.65536000000000000000e5 +392 3 3 16 0.65536000000000000000e5 +393 1 7 22 0.65536000000000000000e5 +393 1 12 27 0.65536000000000000000e5 +393 1 12 28 0.65536000000000000000e5 +393 1 13 28 -0.13107200000000000000e6 +393 2 15 15 0.13107200000000000000e6 +393 3 3 16 -0.65536000000000000000e5 +394 1 12 29 0.65536000000000000000e5 +394 1 13 28 -0.65536000000000000000e5 +395 1 8 23 0.65536000000000000000e5 +395 1 12 30 0.65536000000000000000e5 +395 1 13 28 0.65536000000000000000e5 +395 1 14 29 -0.13107200000000000000e6 +395 2 9 19 0.65536000000000000000e5 +395 3 9 14 -0.65536000000000000000e5 +396 1 12 31 0.65536000000000000000e5 +396 1 22 25 -0.65536000000000000000e5 +397 1 12 32 0.65536000000000000000e5 +397 1 22 29 -0.65536000000000000000e5 +398 1 7 22 0.65536000000000000000e5 +398 1 12 33 0.65536000000000000000e5 +398 1 22 29 0.65536000000000000000e5 +398 1 23 30 -0.13107200000000000000e6 +398 2 16 18 0.65536000000000000000e5 +398 3 3 16 -0.65536000000000000000e5 +398 3 6 19 -0.65536000000000000000e5 +399 1 12 34 0.65536000000000000000e5 +399 1 25 28 -0.65536000000000000000e5 +400 1 1 8 -0.10240000000000000000e4 +400 1 4 15 -0.81920000000000000000e4 +400 1 5 20 0.10240000000000000000e4 +400 1 6 21 0.40960000000000000000e4 +400 1 7 14 -0.81920000000000000000e4 +400 1 7 22 0.20480000000000000000e4 +400 1 8 15 -0.16384000000000000000e5 +400 1 9 24 -0.40960000000000000000e4 +400 1 10 13 -0.16384000000000000000e5 +400 1 10 25 -0.16384000000000000000e5 +400 1 13 13 0.65536000000000000000e5 +400 1 14 21 0.16384000000000000000e5 +400 2 1 15 -0.10240000000000000000e4 +400 2 2 16 0.20480000000000000000e4 +400 2 6 12 0.10240000000000000000e4 +400 2 8 10 -0.16384000000000000000e5 +400 2 9 15 -0.40960000000000000000e4 +400 2 10 12 0.40960000000000000000e4 +400 3 1 6 0.10240000000000000000e4 +400 3 5 10 -0.81920000000000000000e4 +400 4 6 6 -0.16384000000000000000e5 +401 1 1 8 -0.10240000000000000000e4 +401 1 4 15 -0.81920000000000000000e4 +401 1 5 20 0.10240000000000000000e4 +401 1 6 21 0.40960000000000000000e4 +401 1 7 14 -0.81920000000000000000e4 +401 1 7 22 0.20480000000000000000e4 +401 1 8 15 -0.16384000000000000000e5 +401 1 9 24 -0.40960000000000000000e4 +401 1 10 13 -0.16384000000000000000e5 +401 1 10 25 -0.16384000000000000000e5 +401 1 12 15 -0.32768000000000000000e5 +401 1 13 14 -0.32768000000000000000e5 +401 1 13 15 0.65536000000000000000e5 +401 1 14 21 0.16384000000000000000e5 +401 2 1 15 -0.10240000000000000000e4 +401 2 2 16 0.20480000000000000000e4 +401 2 6 12 0.10240000000000000000e4 +401 2 8 10 -0.16384000000000000000e5 +401 2 9 15 -0.40960000000000000000e4 +401 2 10 10 -0.65536000000000000000e5 +401 2 10 12 0.40960000000000000000e4 +401 3 1 6 0.10240000000000000000e4 +401 3 5 10 -0.81920000000000000000e4 +401 4 6 6 -0.16384000000000000000e5 +402 1 1 8 -0.16384000000000000000e5 +402 1 5 20 0.16384000000000000000e5 +402 1 6 21 0.65536000000000000000e5 +402 1 7 22 0.32768000000000000000e5 +402 1 8 23 0.65536000000000000000e5 +402 1 13 16 0.65536000000000000000e5 +402 1 13 20 -0.13107200000000000000e6 +402 2 1 15 -0.16384000000000000000e5 +402 2 2 16 0.32768000000000000000e5 +402 2 6 12 0.16384000000000000000e5 +402 2 8 14 0.65536000000000000000e5 +402 3 1 6 0.16384000000000000000e5 +403 1 1 8 0.16384000000000000000e5 +403 1 5 20 -0.16384000000000000000e5 +403 1 6 21 -0.65536000000000000000e5 +403 1 7 22 -0.32768000000000000000e5 +403 1 13 17 0.65536000000000000000e5 +403 2 1 15 0.16384000000000000000e5 +403 2 2 16 -0.32768000000000000000e5 +403 2 6 12 -0.16384000000000000000e5 +403 3 1 6 -0.16384000000000000000e5 +404 1 8 23 -0.65536000000000000000e5 +404 1 13 18 0.65536000000000000000e5 +405 1 8 23 0.65536000000000000000e5 +405 1 9 24 0.65536000000000000000e5 +405 1 13 19 0.65536000000000000000e5 +405 1 14 21 -0.13107200000000000000e6 +405 2 9 15 0.65536000000000000000e5 +406 1 1 8 0.81920000000000000000e4 +406 1 5 20 -0.81920000000000000000e4 +406 1 6 21 -0.32768000000000000000e5 +406 1 7 22 -0.16384000000000000000e5 +406 1 9 24 0.32768000000000000000e5 +406 1 13 21 0.65536000000000000000e5 +406 1 14 21 -0.65536000000000000000e5 +406 2 1 15 0.81920000000000000000e4 +406 2 2 16 -0.16384000000000000000e5 +406 2 6 12 -0.81920000000000000000e4 +406 2 9 15 0.32768000000000000000e5 +406 2 10 12 -0.32768000000000000000e5 +406 3 1 6 -0.81920000000000000000e4 +407 1 13 22 0.65536000000000000000e5 +407 1 14 21 -0.65536000000000000000e5 +408 1 10 25 -0.65536000000000000000e5 +408 1 13 23 0.65536000000000000000e5 +409 1 8 15 -0.65536000000000000000e5 +409 1 13 24 0.65536000000000000000e5 +409 3 9 10 0.65536000000000000000e5 +410 1 8 15 -0.32768000000000000000e5 +410 1 10 25 -0.32768000000000000000e5 +410 1 13 25 0.65536000000000000000e5 +410 1 15 22 -0.32768000000000000000e5 +410 2 10 16 -0.32768000000000000000e5 +410 3 9 10 0.32768000000000000000e5 +411 1 7 22 -0.32768000000000000000e5 +411 1 11 26 -0.32768000000000000000e5 +411 1 13 26 0.65536000000000000000e5 +411 1 16 23 -0.32768000000000000000e5 +411 2 5 19 -0.32768000000000000000e5 +411 3 3 16 0.32768000000000000000e5 +412 1 8 23 -0.65536000000000000000e5 +412 1 13 27 0.65536000000000000000e5 +412 3 9 14 0.65536000000000000000e5 +413 1 7 22 -0.16384000000000000000e5 +413 1 8 23 -0.32768000000000000000e5 +413 1 11 26 -0.16384000000000000000e5 +413 1 13 28 -0.32768000000000000000e5 +413 1 13 29 0.65536000000000000000e5 +413 1 16 23 -0.16384000000000000000e5 +413 2 5 19 -0.16384000000000000000e5 +413 2 14 16 -0.32768000000000000000e5 +413 3 3 16 0.16384000000000000000e5 +413 3 9 14 0.32768000000000000000e5 +414 1 13 30 0.65536000000000000000e5 +414 1 14 29 -0.65536000000000000000e5 +415 1 7 22 -0.81920000000000000000e4 +415 1 8 23 -0.16384000000000000000e5 +415 1 11 26 -0.81920000000000000000e4 +415 1 13 28 -0.16384000000000000000e5 +415 1 13 31 0.65536000000000000000e5 +415 1 14 29 -0.32768000000000000000e5 +415 1 16 23 -0.81920000000000000000e4 +415 1 22 25 -0.32768000000000000000e5 +415 2 5 19 -0.81920000000000000000e4 +415 2 14 16 -0.16384000000000000000e5 +415 2 16 16 -0.65536000000000000000e5 +415 3 3 16 0.81920000000000000000e4 +415 3 9 14 0.16384000000000000000e5 +416 1 8 23 -0.65536000000000000000e5 +416 1 11 26 0.32768000000000000000e5 +416 1 12 27 0.32768000000000000000e5 +416 1 13 32 0.65536000000000000000e5 +416 1 16 31 -0.32768000000000000000e5 +416 1 22 29 -0.32768000000000000000e5 +416 3 6 19 0.32768000000000000000e5 +416 3 9 14 0.65536000000000000000e5 +416 4 6 10 0.32768000000000000000e5 +417 1 13 33 0.65536000000000000000e5 +417 1 23 30 -0.65536000000000000000e5 +418 1 13 34 0.65536000000000000000e5 +418 1 14 29 -0.65536000000000000000e5 +418 3 10 19 0.65536000000000000000e5 +419 1 13 35 0.65536000000000000000e5 +419 1 25 32 -0.65536000000000000000e5 +420 1 12 15 -0.32768000000000000000e5 +420 1 14 14 0.65536000000000000000e5 +421 1 1 8 0.16384000000000000000e5 +421 1 5 20 -0.16384000000000000000e5 +421 1 6 21 -0.65536000000000000000e5 +421 1 7 22 -0.32768000000000000000e5 +421 1 14 16 0.65536000000000000000e5 +421 2 1 15 0.16384000000000000000e5 +421 2 2 16 -0.32768000000000000000e5 +421 2 6 12 -0.16384000000000000000e5 +421 3 1 6 -0.16384000000000000000e5 +422 1 8 23 -0.65536000000000000000e5 +422 1 14 17 0.65536000000000000000e5 +423 1 8 23 0.65536000000000000000e5 +423 1 9 24 0.65536000000000000000e5 +423 1 14 18 0.65536000000000000000e5 +423 1 14 21 -0.13107200000000000000e6 +423 2 9 15 0.65536000000000000000e5 +424 1 9 24 -0.65536000000000000000e5 +424 1 14 19 0.65536000000000000000e5 +425 1 1 8 0.81920000000000000000e4 +425 1 5 20 -0.81920000000000000000e4 +425 1 6 21 -0.32768000000000000000e5 +425 1 7 22 -0.16384000000000000000e5 +425 1 9 24 0.32768000000000000000e5 +425 1 14 20 0.65536000000000000000e5 +425 1 14 21 -0.65536000000000000000e5 +425 2 1 15 0.81920000000000000000e4 +425 2 2 16 -0.16384000000000000000e5 +425 2 6 12 -0.81920000000000000000e4 +425 2 9 15 0.32768000000000000000e5 +425 2 10 12 -0.32768000000000000000e5 +425 3 1 6 -0.81920000000000000000e4 +426 1 9 25 -0.65536000000000000000e5 +426 1 14 22 0.65536000000000000000e5 +427 1 8 15 -0.65536000000000000000e5 +427 1 14 23 0.65536000000000000000e5 +427 3 9 10 0.65536000000000000000e5 +428 1 14 24 0.65536000000000000000e5 +428 1 15 22 -0.65536000000000000000e5 +429 1 8 23 -0.65536000000000000000e5 +429 1 14 26 0.65536000000000000000e5 +429 3 9 14 0.65536000000000000000e5 +430 1 13 28 -0.65536000000000000000e5 +430 1 14 27 0.65536000000000000000e5 +431 1 8 23 0.65536000000000000000e5 +431 1 13 28 0.65536000000000000000e5 +431 1 14 28 0.65536000000000000000e5 +431 1 14 29 -0.13107200000000000000e6 +431 2 9 19 0.65536000000000000000e5 +431 3 9 14 -0.65536000000000000000e5 +432 1 14 30 0.65536000000000000000e5 +432 1 22 25 -0.65536000000000000000e5 +433 1 14 31 0.65536000000000000000e5 +433 1 15 30 -0.65536000000000000000e5 +434 1 14 32 0.65536000000000000000e5 +434 1 23 30 -0.65536000000000000000e5 +435 1 14 33 0.65536000000000000000e5 +435 1 25 28 -0.65536000000000000000e5 +436 1 14 34 0.65536000000000000000e5 +436 1 24 31 -0.65536000000000000000e5 +437 1 14 35 0.65536000000000000000e5 +437 1 30 31 -0.65536000000000000000e5 +438 1 13 20 -0.65536000000000000000e5 +438 1 15 16 0.65536000000000000000e5 +439 1 1 8 0.81920000000000000000e4 +439 1 5 20 -0.81920000000000000000e4 +439 1 6 21 -0.32768000000000000000e5 +439 1 7 22 -0.16384000000000000000e5 +439 1 9 24 0.32768000000000000000e5 +439 1 14 21 -0.65536000000000000000e5 +439 1 15 17 0.65536000000000000000e5 +439 2 1 15 0.81920000000000000000e4 +439 2 2 16 -0.16384000000000000000e5 +439 2 6 12 -0.81920000000000000000e4 +439 2 9 15 0.32768000000000000000e5 +439 2 10 12 -0.32768000000000000000e5 +439 3 1 6 -0.81920000000000000000e4 +440 1 14 21 -0.65536000000000000000e5 +440 1 15 18 0.65536000000000000000e5 +441 1 9 25 -0.65536000000000000000e5 +441 1 15 19 0.65536000000000000000e5 +442 1 10 25 -0.65536000000000000000e5 +442 1 15 20 0.65536000000000000000e5 +443 1 8 15 -0.65536000000000000000e5 +443 1 15 21 0.65536000000000000000e5 +443 3 9 10 0.65536000000000000000e5 +444 1 8 15 -0.32768000000000000000e5 +444 1 10 25 -0.32768000000000000000e5 +444 1 15 22 -0.32768000000000000000e5 +444 1 15 23 0.65536000000000000000e5 +444 2 10 16 -0.32768000000000000000e5 +444 3 9 10 0.32768000000000000000e5 +445 1 14 25 -0.65536000000000000000e5 +445 1 15 24 0.65536000000000000000e5 +446 1 7 22 -0.16384000000000000000e5 +446 1 8 23 -0.32768000000000000000e5 +446 1 11 26 -0.16384000000000000000e5 +446 1 13 28 -0.32768000000000000000e5 +446 1 15 26 0.65536000000000000000e5 +446 1 16 23 -0.16384000000000000000e5 +446 2 5 19 -0.16384000000000000000e5 +446 2 14 16 -0.32768000000000000000e5 +446 3 3 16 0.16384000000000000000e5 +446 3 9 14 0.32768000000000000000e5 +447 1 14 29 -0.65536000000000000000e5 +447 1 15 27 0.65536000000000000000e5 +448 1 15 28 0.65536000000000000000e5 +448 1 22 25 -0.65536000000000000000e5 +449 1 7 22 -0.81920000000000000000e4 +449 1 8 23 -0.16384000000000000000e5 +449 1 11 26 -0.81920000000000000000e4 +449 1 13 28 -0.16384000000000000000e5 +449 1 14 29 -0.32768000000000000000e5 +449 1 15 29 0.65536000000000000000e5 +449 1 16 23 -0.81920000000000000000e4 +449 1 22 25 -0.32768000000000000000e5 +449 2 5 19 -0.81920000000000000000e4 +449 2 14 16 -0.16384000000000000000e5 +449 2 16 16 -0.65536000000000000000e5 +449 3 3 16 0.81920000000000000000e4 +449 3 9 14 0.16384000000000000000e5 +450 1 15 31 0.65536000000000000000e5 +450 1 25 25 -0.13107200000000000000e6 +451 1 14 29 -0.65536000000000000000e5 +451 1 15 32 0.65536000000000000000e5 +451 3 10 19 0.65536000000000000000e5 +452 1 15 33 0.65536000000000000000e5 +452 1 24 31 -0.65536000000000000000e5 +453 1 15 35 0.65536000000000000000e5 +453 1 25 34 -0.65536000000000000000e5 +454 1 1 8 -0.13107200000000000000e6 +454 1 2 9 -0.13107200000000000000e6 +454 1 2 33 -0.32768000000000000000e5 +454 1 3 26 0.32768000000000000000e5 +454 1 3 34 0.65536000000000000000e5 +454 1 4 35 -0.32768000000000000000e5 +454 1 6 21 0.13107200000000000000e6 +454 1 16 16 0.65536000000000000000e5 +454 2 1 15 -0.65536000000000000000e5 +454 2 3 17 0.32768000000000000000e5 +454 2 11 11 0.65536000000000000000e5 +454 2 11 17 -0.32768000000000000000e5 +454 2 12 18 -0.32768000000000000000e5 +454 3 1 6 0.13107200000000000000e6 +454 3 1 14 0.65536000000000000000e5 +454 3 2 7 0.13107200000000000000e6 +454 3 2 15 0.65536000000000000000e5 +454 3 4 17 0.32768000000000000000e5 +454 3 6 11 -0.65536000000000000000e5 +454 3 13 18 -0.32768000000000000000e5 +454 4 7 7 -0.65536000000000000000e5 +455 1 1 8 0.13107200000000000000e6 +455 1 2 9 0.26214400000000000000e6 +455 1 2 33 0.65536000000000000000e5 +455 1 3 34 -0.13107200000000000000e6 +455 1 4 35 0.65536000000000000000e5 +455 1 6 21 -0.26214400000000000000e6 +455 1 16 17 0.65536000000000000000e5 +455 2 1 15 0.13107200000000000000e6 +455 2 3 17 -0.65536000000000000000e5 +455 2 11 17 0.65536000000000000000e5 +455 2 12 18 0.65536000000000000000e5 +455 3 1 6 -0.13107200000000000000e6 +455 3 2 7 -0.26214400000000000000e6 +455 3 2 15 -0.13107200000000000000e6 +455 3 4 17 -0.65536000000000000000e5 +455 3 6 11 0.13107200000000000000e6 +455 3 13 18 0.65536000000000000000e5 +455 4 7 7 0.13107200000000000000e6 +456 1 3 26 -0.65536000000000000000e5 +456 1 16 18 0.65536000000000000000e5 +457 1 2 9 -0.13107200000000000000e6 +457 1 2 33 -0.65536000000000000000e5 +457 1 3 26 0.65536000000000000000e5 +457 1 3 34 0.13107200000000000000e6 +457 1 4 35 -0.65536000000000000000e5 +457 1 16 19 0.65536000000000000000e5 +457 2 3 17 0.65536000000000000000e5 +457 2 12 18 -0.65536000000000000000e5 +457 3 2 7 0.13107200000000000000e6 +457 3 2 15 0.13107200000000000000e6 +457 3 4 17 0.65536000000000000000e5 +457 3 13 18 -0.65536000000000000000e5 +458 1 1 8 -0.65536000000000000000e5 +458 1 16 20 0.65536000000000000000e5 +458 3 1 6 0.65536000000000000000e5 +458 3 1 14 0.65536000000000000000e5 +459 1 1 8 0.65536000000000000000e5 +459 1 2 9 0.65536000000000000000e5 +459 1 6 21 -0.13107200000000000000e6 +459 1 16 21 0.65536000000000000000e5 +459 2 1 15 0.65536000000000000000e5 +459 3 1 6 -0.65536000000000000000e5 +459 3 2 7 -0.65536000000000000000e5 +459 3 6 11 0.65536000000000000000e5 +460 1 2 9 -0.65536000000000000000e5 +460 1 16 22 0.65536000000000000000e5 +460 3 2 7 0.65536000000000000000e5 +460 3 2 15 0.65536000000000000000e5 +461 1 11 26 -0.65536000000000000000e5 +461 1 16 24 0.65536000000000000000e5 +462 1 7 22 -0.32768000000000000000e5 +462 1 11 26 -0.32768000000000000000e5 +462 1 16 23 -0.32768000000000000000e5 +462 1 16 25 0.65536000000000000000e5 +462 2 5 19 -0.32768000000000000000e5 +462 3 3 16 0.32768000000000000000e5 +463 1 1 32 -0.65536000000000000000e5 +463 1 16 26 0.65536000000000000000e5 +464 1 3 26 -0.65536000000000000000e5 +464 1 16 27 0.65536000000000000000e5 +464 3 11 12 0.65536000000000000000e5 +465 1 2 33 -0.65536000000000000000e5 +465 1 16 28 0.65536000000000000000e5 +466 1 1 32 -0.32768000000000000000e5 +466 1 2 33 -0.32768000000000000000e5 +466 1 3 26 -0.32768000000000000000e5 +466 1 16 29 0.65536000000000000000e5 +466 2 11 17 -0.32768000000000000000e5 +466 3 11 12 0.32768000000000000000e5 +467 1 2 9 -0.65536000000000000000e5 +467 1 16 30 0.65536000000000000000e5 +467 3 2 7 0.65536000000000000000e5 +467 3 2 15 0.65536000000000000000e5 +467 3 5 18 0.65536000000000000000e5 +468 1 16 32 0.65536000000000000000e5 +468 1 17 32 0.65536000000000000000e5 +468 1 26 29 -0.13107200000000000000e6 +468 1 26 33 0.65536000000000000000e5 +468 2 17 17 0.13107200000000000000e6 +468 3 17 18 0.65536000000000000000e5 +469 1 16 33 0.65536000000000000000e5 +469 1 17 32 -0.65536000000000000000e5 +470 1 16 34 0.65536000000000000000e5 +470 1 26 29 -0.65536000000000000000e5 +471 1 3 26 -0.32768000000000000000e5 +471 1 17 17 0.65536000000000000000e5 +472 1 2 9 -0.13107200000000000000e6 +472 1 2 33 -0.65536000000000000000e5 +472 1 3 26 0.65536000000000000000e5 +472 1 3 34 0.13107200000000000000e6 +472 1 4 35 -0.65536000000000000000e5 +472 1 17 18 0.65536000000000000000e5 +472 2 3 17 0.65536000000000000000e5 +472 2 12 18 -0.65536000000000000000e5 +472 3 2 7 0.13107200000000000000e6 +472 3 2 15 0.13107200000000000000e6 +472 3 4 17 0.65536000000000000000e5 +472 3 13 18 -0.65536000000000000000e5 +473 1 2 33 0.65536000000000000000e5 +473 1 3 34 -0.13107200000000000000e6 +473 1 4 35 0.65536000000000000000e5 +473 1 17 19 0.65536000000000000000e5 +473 2 12 18 0.65536000000000000000e5 +473 3 4 17 -0.65536000000000000000e5 +473 3 13 18 0.65536000000000000000e5 +474 1 1 8 0.65536000000000000000e5 +474 1 2 9 0.65536000000000000000e5 +474 1 6 21 -0.13107200000000000000e6 +474 1 17 20 0.65536000000000000000e5 +474 2 1 15 0.65536000000000000000e5 +474 3 1 6 -0.65536000000000000000e5 +474 3 2 7 -0.65536000000000000000e5 +474 3 6 11 0.65536000000000000000e5 +475 1 2 9 -0.65536000000000000000e5 +475 1 17 21 0.65536000000000000000e5 +475 3 2 7 0.65536000000000000000e5 +475 3 2 15 0.65536000000000000000e5 +476 1 1 8 -0.65536000000000000000e5 +476 1 6 21 0.13107200000000000000e6 +476 1 11 26 -0.13107200000000000000e6 +476 1 17 22 0.65536000000000000000e5 +476 2 1 15 -0.65536000000000000000e5 +476 2 6 12 0.65536000000000000000e5 +476 3 1 6 0.65536000000000000000e5 +476 3 2 15 -0.65536000000000000000e5 +476 3 6 11 -0.65536000000000000000e5 +476 4 4 8 -0.65536000000000000000e5 +477 1 11 26 -0.65536000000000000000e5 +477 1 17 23 0.65536000000000000000e5 +478 1 7 22 -0.65536000000000000000e5 +478 1 17 24 0.65536000000000000000e5 +478 3 3 16 0.65536000000000000000e5 +479 1 8 23 -0.65536000000000000000e5 +479 1 17 25 0.65536000000000000000e5 +479 3 9 14 0.65536000000000000000e5 +480 1 3 26 -0.65536000000000000000e5 +480 1 17 26 0.65536000000000000000e5 +480 3 11 12 0.65536000000000000000e5 +481 1 2 33 -0.65536000000000000000e5 +481 1 17 27 0.65536000000000000000e5 +482 1 2 33 0.65536000000000000000e5 +482 1 3 34 -0.13107200000000000000e6 +482 1 4 35 0.65536000000000000000e5 +482 1 17 28 0.65536000000000000000e5 +482 2 12 18 0.65536000000000000000e5 +482 3 13 18 0.65536000000000000000e5 +483 1 2 9 -0.65536000000000000000e5 +483 1 17 29 0.65536000000000000000e5 +483 3 2 7 0.65536000000000000000e5 +483 3 2 15 0.65536000000000000000e5 +483 3 5 18 0.65536000000000000000e5 +484 1 3 34 -0.65536000000000000000e5 +484 1 17 30 0.65536000000000000000e5 +485 1 7 22 -0.65536000000000000000e5 +485 1 17 31 0.65536000000000000000e5 +485 3 3 16 0.65536000000000000000e5 +485 3 6 19 0.65536000000000000000e5 +486 1 17 33 0.65536000000000000000e5 +486 1 26 33 -0.65536000000000000000e5 +486 3 17 18 -0.65536000000000000000e5 +487 1 2 9 -0.65536000000000000000e5 +487 1 3 34 -0.65536000000000000000e5 +487 1 17 34 0.65536000000000000000e5 +487 1 26 29 0.65536000000000000000e5 +487 2 6 20 -0.65536000000000000000e5 +487 2 14 20 0.65536000000000000000e5 +487 3 2 7 0.65536000000000000000e5 +487 3 2 15 0.65536000000000000000e5 +487 3 5 18 0.65536000000000000000e5 +487 3 7 20 -0.65536000000000000000e5 +487 3 14 19 0.13107200000000000000e6 +488 1 17 35 0.65536000000000000000e5 +488 1 26 33 -0.65536000000000000000e5 +489 1 2 33 0.32768000000000000000e5 +489 1 3 34 -0.65536000000000000000e5 +489 1 4 35 0.32768000000000000000e5 +489 1 18 18 0.65536000000000000000e5 +489 2 12 18 0.32768000000000000000e5 +489 3 4 17 -0.32768000000000000000e5 +489 3 13 18 0.32768000000000000000e5 +490 1 1 8 -0.13107200000000000000e6 +490 1 2 9 0.13107200000000000000e6 +490 1 3 26 -0.65536000000000000000e5 +490 1 6 21 0.26214400000000000000e6 +490 1 11 26 -0.26214400000000000000e6 +490 1 18 19 0.65536000000000000000e5 +490 2 1 15 -0.13107200000000000000e6 +490 2 3 17 -0.65536000000000000000e5 +490 2 6 12 0.13107200000000000000e6 +490 2 12 18 0.65536000000000000000e5 +490 3 1 6 0.13107200000000000000e6 +490 3 2 7 -0.13107200000000000000e6 +490 3 2 15 -0.26214400000000000000e6 +490 3 6 11 -0.13107200000000000000e6 +490 4 4 8 -0.13107200000000000000e6 +490 4 8 8 0.13107200000000000000e6 +491 1 2 9 -0.65536000000000000000e5 +491 1 18 20 0.65536000000000000000e5 +491 3 2 7 0.65536000000000000000e5 +491 3 2 15 0.65536000000000000000e5 +492 1 1 8 -0.65536000000000000000e5 +492 1 6 21 0.13107200000000000000e6 +492 1 11 26 -0.13107200000000000000e6 +492 1 18 21 0.65536000000000000000e5 +492 2 1 15 -0.65536000000000000000e5 +492 2 6 12 0.65536000000000000000e5 +492 3 1 6 0.65536000000000000000e5 +492 3 2 15 -0.65536000000000000000e5 +492 3 6 11 -0.65536000000000000000e5 +492 4 4 8 -0.65536000000000000000e5 +493 1 1 8 -0.65536000000000000000e5 +493 1 2 9 0.65536000000000000000e5 +493 1 2 33 0.32768000000000000000e5 +493 1 3 26 -0.32768000000000000000e5 +493 1 3 34 -0.65536000000000000000e5 +493 1 4 35 0.32768000000000000000e5 +493 1 5 28 -0.32768000000000000000e5 +493 1 6 21 0.13107200000000000000e6 +493 1 11 26 -0.13107200000000000000e6 +493 1 18 22 0.65536000000000000000e5 +493 2 1 15 -0.65536000000000000000e5 +493 2 3 17 -0.32768000000000000000e5 +493 2 4 18 -0.32768000000000000000e5 +493 2 6 12 0.65536000000000000000e5 +493 2 12 18 0.65536000000000000000e5 +493 3 1 6 0.65536000000000000000e5 +493 3 2 7 -0.65536000000000000000e5 +493 3 2 15 -0.13107200000000000000e6 +493 3 4 17 -0.32768000000000000000e5 +493 3 6 11 -0.65536000000000000000e5 +493 3 13 18 0.32768000000000000000e5 +493 4 4 8 -0.65536000000000000000e5 +493 4 8 8 0.65536000000000000000e5 +494 1 7 22 -0.65536000000000000000e5 +494 1 18 23 0.65536000000000000000e5 +494 3 3 16 0.65536000000000000000e5 +495 1 12 27 -0.65536000000000000000e5 +495 1 18 24 0.65536000000000000000e5 +496 1 13 28 -0.65536000000000000000e5 +496 1 18 25 0.65536000000000000000e5 +497 1 2 33 -0.65536000000000000000e5 +497 1 18 26 0.65536000000000000000e5 +498 1 2 33 0.65536000000000000000e5 +498 1 3 34 -0.13107200000000000000e6 +498 1 4 35 0.65536000000000000000e5 +498 1 18 27 0.65536000000000000000e5 +498 2 12 18 0.65536000000000000000e5 +498 3 13 18 0.65536000000000000000e5 +499 1 4 35 -0.65536000000000000000e5 +499 1 18 28 0.65536000000000000000e5 +499 3 13 18 -0.65536000000000000000e5 +500 1 3 34 -0.65536000000000000000e5 +500 1 18 29 0.65536000000000000000e5 +501 1 2 9 0.65536000000000000000e5 +501 1 3 34 0.65536000000000000000e5 +501 1 7 22 -0.13107200000000000000e6 +501 1 18 30 0.65536000000000000000e5 +501 2 6 20 0.65536000000000000000e5 +501 3 2 7 -0.65536000000000000000e5 +501 3 2 15 -0.65536000000000000000e5 +501 3 3 16 0.13107200000000000000e6 +501 3 5 18 -0.65536000000000000000e5 +501 3 6 19 0.13107200000000000000e6 +502 1 18 31 0.65536000000000000000e5 +502 1 22 29 -0.65536000000000000000e5 +503 1 18 32 0.65536000000000000000e5 +503 1 26 33 -0.65536000000000000000e5 +503 3 17 18 -0.65536000000000000000e5 +504 1 4 35 -0.65536000000000000000e5 +504 1 18 33 0.65536000000000000000e5 +505 1 2 9 0.65536000000000000000e5 +505 1 3 34 0.65536000000000000000e5 +505 1 7 22 -0.13107200000000000000e6 +505 1 18 34 0.65536000000000000000e5 +505 2 6 20 0.65536000000000000000e5 +505 3 2 7 -0.65536000000000000000e5 +505 3 2 15 -0.65536000000000000000e5 +505 3 3 16 0.13107200000000000000e6 +505 3 5 18 -0.65536000000000000000e5 +505 3 6 19 0.13107200000000000000e6 +505 3 7 20 0.65536000000000000000e5 +506 1 2 9 0.13107200000000000000e6 +506 1 3 34 0.13107200000000000000e6 +506 1 4 35 -0.65536000000000000000e5 +506 1 16 35 0.65536000000000000000e5 +506 1 17 32 -0.65536000000000000000e5 +506 1 18 35 0.65536000000000000000e5 +506 1 20 35 -0.13107200000000000000e6 +506 1 26 29 -0.13107200000000000000e6 +506 2 6 20 0.13107200000000000000e6 +506 2 14 20 -0.13107200000000000000e6 +506 3 2 7 -0.13107200000000000000e6 +506 3 2 15 -0.13107200000000000000e6 +506 3 5 18 -0.13107200000000000000e6 +506 3 7 20 0.13107200000000000000e6 +506 3 14 19 -0.26214400000000000000e6 +506 3 17 18 -0.65536000000000000000e5 +506 4 10 10 -0.13107200000000000000e6 +507 1 5 28 -0.32768000000000000000e5 +507 1 19 19 0.65536000000000000000e5 +508 1 1 8 -0.65536000000000000000e5 +508 1 6 21 0.13107200000000000000e6 +508 1 11 26 -0.13107200000000000000e6 +508 1 19 20 0.65536000000000000000e5 +508 2 1 15 -0.65536000000000000000e5 +508 2 6 12 0.65536000000000000000e5 +508 3 1 6 0.65536000000000000000e5 +508 3 2 15 -0.65536000000000000000e5 +508 3 6 11 -0.65536000000000000000e5 +508 4 4 8 -0.65536000000000000000e5 +509 1 1 8 -0.65536000000000000000e5 +509 1 2 9 0.65536000000000000000e5 +509 1 2 33 0.32768000000000000000e5 +509 1 3 26 -0.32768000000000000000e5 +509 1 3 34 -0.65536000000000000000e5 +509 1 4 35 0.32768000000000000000e5 +509 1 5 28 -0.32768000000000000000e5 +509 1 6 21 0.13107200000000000000e6 +509 1 11 26 -0.13107200000000000000e6 +509 1 19 21 0.65536000000000000000e5 +509 2 1 15 -0.65536000000000000000e5 +509 2 3 17 -0.32768000000000000000e5 +509 2 4 18 -0.32768000000000000000e5 +509 2 6 12 0.65536000000000000000e5 +509 2 12 18 0.65536000000000000000e5 +509 3 1 6 0.65536000000000000000e5 +509 3 2 7 -0.65536000000000000000e5 +509 3 2 15 -0.13107200000000000000e6 +509 3 4 17 -0.32768000000000000000e5 +509 3 6 11 -0.65536000000000000000e5 +509 3 13 18 0.32768000000000000000e5 +509 4 4 8 -0.65536000000000000000e5 +509 4 8 8 0.65536000000000000000e5 +510 1 12 27 -0.65536000000000000000e5 +510 1 19 23 0.65536000000000000000e5 +511 1 7 22 0.65536000000000000000e5 +511 1 12 27 0.65536000000000000000e5 +511 1 13 28 -0.13107200000000000000e6 +511 1 19 24 0.65536000000000000000e5 +511 2 15 15 0.13107200000000000000e6 +511 3 3 16 -0.65536000000000000000e5 +512 1 8 23 0.65536000000000000000e5 +512 1 13 28 0.65536000000000000000e5 +512 1 14 29 -0.13107200000000000000e6 +512 1 19 25 0.65536000000000000000e5 +512 2 9 19 0.65536000000000000000e5 +512 3 9 14 -0.65536000000000000000e5 +513 1 2 33 0.65536000000000000000e5 +513 1 3 34 -0.13107200000000000000e6 +513 1 4 35 0.65536000000000000000e5 +513 1 19 26 0.65536000000000000000e5 +513 2 12 18 0.65536000000000000000e5 +513 3 13 18 0.65536000000000000000e5 +514 1 4 35 -0.65536000000000000000e5 +514 1 19 27 0.65536000000000000000e5 +514 3 13 18 -0.65536000000000000000e5 +515 1 2 9 0.13107200000000000000e6 +515 1 2 33 -0.65536000000000000000e5 +515 1 3 34 0.26214400000000000000e6 +515 1 7 22 -0.26214400000000000000e6 +515 1 19 28 0.65536000000000000000e5 +515 2 4 20 0.65536000000000000000e5 +515 2 6 20 0.13107200000000000000e6 +515 2 12 18 -0.65536000000000000000e5 +515 3 2 7 -0.13107200000000000000e6 +515 3 2 15 -0.13107200000000000000e6 +515 3 3 16 0.26214400000000000000e6 +515 3 5 18 -0.13107200000000000000e6 +515 3 6 19 0.26214400000000000000e6 +516 1 2 9 0.65536000000000000000e5 +516 1 3 34 0.65536000000000000000e5 +516 1 7 22 -0.13107200000000000000e6 +516 1 19 29 0.65536000000000000000e5 +516 2 6 20 0.65536000000000000000e5 +516 3 2 7 -0.65536000000000000000e5 +516 3 2 15 -0.65536000000000000000e5 +516 3 3 16 0.13107200000000000000e6 +516 3 5 18 -0.65536000000000000000e5 +516 3 6 19 0.13107200000000000000e6 +517 1 2 9 -0.65536000000000000000e5 +517 1 7 22 0.13107200000000000000e6 +517 1 19 30 0.65536000000000000000e5 +517 1 22 29 -0.13107200000000000000e6 +517 2 6 20 -0.65536000000000000000e5 +517 2 13 19 0.65536000000000000000e5 +517 3 2 7 0.65536000000000000000e5 +517 3 2 15 0.65536000000000000000e5 +517 3 3 16 -0.13107200000000000000e6 +517 3 5 18 0.65536000000000000000e5 +517 3 6 19 -0.13107200000000000000e6 +518 1 7 22 0.65536000000000000000e5 +518 1 19 31 0.65536000000000000000e5 +518 1 22 29 0.65536000000000000000e5 +518 1 23 30 -0.13107200000000000000e6 +518 2 16 18 0.65536000000000000000e5 +518 3 3 16 -0.65536000000000000000e5 +518 3 6 19 -0.65536000000000000000e5 +519 1 4 35 -0.65536000000000000000e5 +519 1 19 32 0.65536000000000000000e5 +520 1 2 9 0.13107200000000000000e6 +520 1 3 34 0.13107200000000000000e6 +520 1 4 35 0.65536000000000000000e5 +520 1 7 22 -0.26214400000000000000e6 +520 1 19 33 0.65536000000000000000e5 +520 1 26 33 0.65536000000000000000e5 +520 2 6 20 0.13107200000000000000e6 +520 2 18 18 0.13107200000000000000e6 +520 3 2 7 -0.13107200000000000000e6 +520 3 2 15 -0.13107200000000000000e6 +520 3 3 16 0.26214400000000000000e6 +520 3 5 18 -0.13107200000000000000e6 +520 3 6 19 0.26214400000000000000e6 +520 3 7 20 0.13107200000000000000e6 +520 3 17 18 0.65536000000000000000e5 +521 1 4 35 0.65536000000000000000e5 +521 1 7 22 -0.26214400000000000000e6 +521 1 16 35 -0.65536000000000000000e5 +521 1 17 32 0.65536000000000000000e5 +521 1 19 35 0.65536000000000000000e5 +521 1 20 35 0.13107200000000000000e6 +521 1 26 29 0.13107200000000000000e6 +521 1 26 33 0.65536000000000000000e5 +521 2 14 20 0.13107200000000000000e6 +521 2 18 20 0.65536000000000000000e5 +521 3 3 16 0.26214400000000000000e6 +521 3 6 19 0.26214400000000000000e6 +521 3 14 19 0.26214400000000000000e6 +521 3 15 20 0.13107200000000000000e6 +521 3 17 18 0.65536000000000000000e5 +521 4 10 10 0.13107200000000000000e6 +522 1 16 23 -0.32768000000000000000e5 +522 1 20 20 0.65536000000000000000e5 +523 1 11 26 -0.65536000000000000000e5 +523 1 20 21 0.65536000000000000000e5 +524 1 7 22 -0.65536000000000000000e5 +524 1 20 22 0.65536000000000000000e5 +524 3 3 16 0.65536000000000000000e5 +525 1 7 22 -0.32768000000000000000e5 +525 1 11 26 -0.32768000000000000000e5 +525 1 16 23 -0.32768000000000000000e5 +525 1 20 23 0.65536000000000000000e5 +525 2 5 19 -0.32768000000000000000e5 +525 3 3 16 0.32768000000000000000e5 +526 1 8 23 -0.65536000000000000000e5 +526 1 20 24 0.65536000000000000000e5 +526 3 9 14 0.65536000000000000000e5 +527 1 7 22 -0.16384000000000000000e5 +527 1 8 23 -0.32768000000000000000e5 +527 1 11 26 -0.16384000000000000000e5 +527 1 13 28 -0.32768000000000000000e5 +527 1 16 23 -0.16384000000000000000e5 +527 1 20 25 0.65536000000000000000e5 +527 2 5 19 -0.16384000000000000000e5 +527 2 14 16 -0.32768000000000000000e5 +527 3 3 16 0.16384000000000000000e5 +527 3 9 14 0.32768000000000000000e5 +528 1 1 32 -0.32768000000000000000e5 +528 1 2 33 -0.32768000000000000000e5 +528 1 3 26 -0.32768000000000000000e5 +528 1 20 26 0.65536000000000000000e5 +528 2 11 17 -0.32768000000000000000e5 +528 3 11 12 0.32768000000000000000e5 +529 1 2 9 -0.65536000000000000000e5 +529 1 20 27 0.65536000000000000000e5 +529 3 2 7 0.65536000000000000000e5 +529 3 2 15 0.65536000000000000000e5 +529 3 5 18 0.65536000000000000000e5 +530 1 3 34 -0.65536000000000000000e5 +530 1 20 28 0.65536000000000000000e5 +531 1 16 31 -0.65536000000000000000e5 +531 1 20 29 0.65536000000000000000e5 +532 1 7 22 -0.65536000000000000000e5 +532 1 20 30 0.65536000000000000000e5 +532 3 3 16 0.65536000000000000000e5 +532 3 6 19 0.65536000000000000000e5 +533 1 8 23 -0.65536000000000000000e5 +533 1 11 26 0.32768000000000000000e5 +533 1 12 27 0.32768000000000000000e5 +533 1 16 31 -0.32768000000000000000e5 +533 1 20 31 0.65536000000000000000e5 +533 1 22 29 -0.32768000000000000000e5 +533 3 6 19 0.32768000000000000000e5 +533 3 9 14 0.65536000000000000000e5 +533 4 6 10 0.32768000000000000000e5 +534 1 20 32 0.65536000000000000000e5 +534 1 26 29 -0.65536000000000000000e5 +535 1 2 9 -0.65536000000000000000e5 +535 1 3 34 -0.65536000000000000000e5 +535 1 20 33 0.65536000000000000000e5 +535 1 26 29 0.65536000000000000000e5 +535 2 6 20 -0.65536000000000000000e5 +535 2 14 20 0.65536000000000000000e5 +535 3 2 7 0.65536000000000000000e5 +535 3 2 15 0.65536000000000000000e5 +535 3 5 18 0.65536000000000000000e5 +535 3 7 20 -0.65536000000000000000e5 +535 3 14 19 0.13107200000000000000e6 +536 1 7 22 -0.65536000000000000000e5 +536 1 20 34 0.65536000000000000000e5 +536 3 3 16 0.65536000000000000000e5 +536 3 6 19 0.65536000000000000000e5 +536 3 14 19 0.65536000000000000000e5 +537 1 7 22 -0.32768000000000000000e5 +537 1 21 21 0.65536000000000000000e5 +537 3 3 16 0.32768000000000000000e5 +538 1 12 27 -0.65536000000000000000e5 +538 1 21 22 0.65536000000000000000e5 +539 1 8 23 -0.65536000000000000000e5 +539 1 21 23 0.65536000000000000000e5 +539 3 9 14 0.65536000000000000000e5 +540 1 13 28 -0.65536000000000000000e5 +540 1 21 24 0.65536000000000000000e5 +541 1 14 29 -0.65536000000000000000e5 +541 1 21 25 0.65536000000000000000e5 +542 1 2 9 -0.65536000000000000000e5 +542 1 21 26 0.65536000000000000000e5 +542 3 2 7 0.65536000000000000000e5 +542 3 2 15 0.65536000000000000000e5 +542 3 5 18 0.65536000000000000000e5 +543 1 3 34 -0.65536000000000000000e5 +543 1 21 27 0.65536000000000000000e5 +544 1 2 9 0.65536000000000000000e5 +544 1 3 34 0.65536000000000000000e5 +544 1 7 22 -0.13107200000000000000e6 +544 1 21 28 0.65536000000000000000e5 +544 2 6 20 0.65536000000000000000e5 +544 3 2 7 -0.65536000000000000000e5 +544 3 2 15 -0.65536000000000000000e5 +544 3 3 16 0.13107200000000000000e6 +544 3 5 18 -0.65536000000000000000e5 +544 3 6 19 0.13107200000000000000e6 +545 1 7 22 -0.65536000000000000000e5 +545 1 21 29 0.65536000000000000000e5 +545 3 3 16 0.65536000000000000000e5 +545 3 6 19 0.65536000000000000000e5 +546 1 21 30 0.65536000000000000000e5 +546 1 22 29 -0.65536000000000000000e5 +547 1 21 31 0.65536000000000000000e5 +547 1 23 30 -0.65536000000000000000e5 +548 1 2 9 -0.65536000000000000000e5 +548 1 3 34 -0.65536000000000000000e5 +548 1 21 32 0.65536000000000000000e5 +548 1 26 29 0.65536000000000000000e5 +548 2 6 20 -0.65536000000000000000e5 +548 2 14 20 0.65536000000000000000e5 +548 3 2 7 0.65536000000000000000e5 +548 3 2 15 0.65536000000000000000e5 +548 3 5 18 0.65536000000000000000e5 +548 3 7 20 -0.65536000000000000000e5 +548 3 14 19 0.13107200000000000000e6 +549 1 2 9 0.65536000000000000000e5 +549 1 3 34 0.65536000000000000000e5 +549 1 7 22 -0.13107200000000000000e6 +549 1 21 33 0.65536000000000000000e5 +549 2 6 20 0.65536000000000000000e5 +549 3 2 7 -0.65536000000000000000e5 +549 3 2 15 -0.65536000000000000000e5 +549 3 3 16 0.13107200000000000000e6 +549 3 5 18 -0.65536000000000000000e5 +549 3 6 19 0.13107200000000000000e6 +549 3 7 20 0.65536000000000000000e5 +550 1 21 34 0.65536000000000000000e5 +550 1 29 30 -0.65536000000000000000e5 +551 1 2 9 0.65536000000000000000e5 +551 1 3 34 0.65536000000000000000e5 +551 1 7 22 -0.13107200000000000000e6 +551 1 21 35 0.65536000000000000000e5 +551 2 6 20 0.65536000000000000000e5 +551 3 2 7 -0.65536000000000000000e5 +551 3 2 15 -0.65536000000000000000e5 +551 3 3 16 0.13107200000000000000e6 +551 3 5 18 -0.65536000000000000000e5 +551 3 6 19 0.13107200000000000000e6 +551 3 7 20 0.65536000000000000000e5 +551 3 15 20 0.65536000000000000000e5 +552 1 7 22 0.32768000000000000000e5 +552 1 12 27 0.32768000000000000000e5 +552 1 13 28 -0.65536000000000000000e5 +552 1 22 22 0.65536000000000000000e5 +552 2 15 15 0.65536000000000000000e5 +552 3 3 16 -0.32768000000000000000e5 +553 1 13 28 -0.65536000000000000000e5 +553 1 22 23 0.65536000000000000000e5 +554 1 8 23 0.65536000000000000000e5 +554 1 13 28 0.65536000000000000000e5 +554 1 14 29 -0.13107200000000000000e6 +554 1 22 24 0.65536000000000000000e5 +554 2 9 19 0.65536000000000000000e5 +554 3 9 14 -0.65536000000000000000e5 +555 1 3 34 -0.65536000000000000000e5 +555 1 22 26 0.65536000000000000000e5 +556 1 2 9 0.65536000000000000000e5 +556 1 3 34 0.65536000000000000000e5 +556 1 7 22 -0.13107200000000000000e6 +556 1 22 27 0.65536000000000000000e5 +556 2 6 20 0.65536000000000000000e5 +556 3 2 7 -0.65536000000000000000e5 +556 3 2 15 -0.65536000000000000000e5 +556 3 3 16 0.13107200000000000000e6 +556 3 5 18 -0.65536000000000000000e5 +556 3 6 19 0.13107200000000000000e6 +557 1 2 9 -0.65536000000000000000e5 +557 1 7 22 0.13107200000000000000e6 +557 1 22 28 0.65536000000000000000e5 +557 1 22 29 -0.13107200000000000000e6 +557 2 6 20 -0.65536000000000000000e5 +557 2 13 19 0.65536000000000000000e5 +557 3 2 7 0.65536000000000000000e5 +557 3 2 15 0.65536000000000000000e5 +557 3 3 16 -0.13107200000000000000e6 +557 3 5 18 0.65536000000000000000e5 +557 3 6 19 -0.13107200000000000000e6 +558 1 7 22 0.65536000000000000000e5 +558 1 22 29 0.65536000000000000000e5 +558 1 22 30 0.65536000000000000000e5 +558 1 23 30 -0.13107200000000000000e6 +558 2 16 18 0.65536000000000000000e5 +558 3 3 16 -0.65536000000000000000e5 +558 3 6 19 -0.65536000000000000000e5 +559 1 22 31 0.65536000000000000000e5 +559 1 25 28 -0.65536000000000000000e5 +560 1 2 9 0.65536000000000000000e5 +560 1 3 34 0.65536000000000000000e5 +560 1 7 22 -0.13107200000000000000e6 +560 1 22 32 0.65536000000000000000e5 +560 2 6 20 0.65536000000000000000e5 +560 3 2 7 -0.65536000000000000000e5 +560 3 2 15 -0.65536000000000000000e5 +560 3 3 16 0.13107200000000000000e6 +560 3 5 18 -0.65536000000000000000e5 +560 3 6 19 0.13107200000000000000e6 +560 3 7 20 0.65536000000000000000e5 +561 1 19 34 -0.65536000000000000000e5 +561 1 22 33 0.65536000000000000000e5 +562 1 12 35 -0.65536000000000000000e5 +562 1 22 34 0.65536000000000000000e5 +563 1 22 35 0.65536000000000000000e5 +563 1 30 33 -0.65536000000000000000e5 +564 1 7 22 -0.81920000000000000000e4 +564 1 8 23 -0.16384000000000000000e5 +564 1 11 26 -0.81920000000000000000e4 +564 1 13 28 -0.16384000000000000000e5 +564 1 16 23 -0.81920000000000000000e4 +564 1 23 23 0.65536000000000000000e5 +564 2 5 19 -0.81920000000000000000e4 +564 2 14 16 -0.16384000000000000000e5 +564 3 3 16 0.81920000000000000000e4 +564 3 9 14 0.16384000000000000000e5 +565 1 14 29 -0.65536000000000000000e5 +565 1 23 24 0.65536000000000000000e5 +566 1 7 22 -0.81920000000000000000e4 +566 1 8 23 -0.16384000000000000000e5 +566 1 11 26 -0.81920000000000000000e4 +566 1 13 28 -0.16384000000000000000e5 +566 1 14 29 -0.32768000000000000000e5 +566 1 16 23 -0.81920000000000000000e4 +566 1 22 25 -0.32768000000000000000e5 +566 1 23 25 0.65536000000000000000e5 +566 2 5 19 -0.81920000000000000000e4 +566 2 14 16 -0.16384000000000000000e5 +566 2 16 16 -0.65536000000000000000e5 +566 3 3 16 0.81920000000000000000e4 +566 3 9 14 0.16384000000000000000e5 +567 1 16 31 -0.65536000000000000000e5 +567 1 23 26 0.65536000000000000000e5 +568 1 7 22 -0.65536000000000000000e5 +568 1 23 27 0.65536000000000000000e5 +568 3 3 16 0.65536000000000000000e5 +568 3 6 19 0.65536000000000000000e5 +569 1 22 29 -0.65536000000000000000e5 +569 1 23 28 0.65536000000000000000e5 +570 1 8 23 -0.65536000000000000000e5 +570 1 11 26 0.32768000000000000000e5 +570 1 12 27 0.32768000000000000000e5 +570 1 16 31 -0.32768000000000000000e5 +570 1 22 29 -0.32768000000000000000e5 +570 1 23 29 0.65536000000000000000e5 +570 3 6 19 0.32768000000000000000e5 +570 3 9 14 0.65536000000000000000e5 +570 4 6 10 0.32768000000000000000e5 +571 1 14 29 -0.65536000000000000000e5 +571 1 23 31 0.65536000000000000000e5 +571 3 10 19 0.65536000000000000000e5 +572 1 7 22 -0.65536000000000000000e5 +572 1 23 32 0.65536000000000000000e5 +572 3 3 16 0.65536000000000000000e5 +572 3 6 19 0.65536000000000000000e5 +572 3 14 19 0.65536000000000000000e5 +573 1 23 33 0.65536000000000000000e5 +573 1 29 30 -0.65536000000000000000e5 +574 1 23 34 0.65536000000000000000e5 +574 1 25 32 -0.65536000000000000000e5 +575 1 23 35 0.65536000000000000000e5 +575 1 31 32 -0.65536000000000000000e5 +576 1 22 25 -0.32768000000000000000e5 +576 1 24 24 0.65536000000000000000e5 +577 1 15 30 -0.65536000000000000000e5 +577 1 24 25 0.65536000000000000000e5 +578 1 7 22 -0.65536000000000000000e5 +578 1 24 26 0.65536000000000000000e5 +578 3 3 16 0.65536000000000000000e5 +578 3 6 19 0.65536000000000000000e5 +579 1 22 29 -0.65536000000000000000e5 +579 1 24 27 0.65536000000000000000e5 +580 1 7 22 0.65536000000000000000e5 +580 1 22 29 0.65536000000000000000e5 +580 1 23 30 -0.13107200000000000000e6 +580 1 24 28 0.65536000000000000000e5 +580 2 16 18 0.65536000000000000000e5 +580 3 3 16 -0.65536000000000000000e5 +580 3 6 19 -0.65536000000000000000e5 +581 1 23 30 -0.65536000000000000000e5 +581 1 24 29 0.65536000000000000000e5 +582 1 24 30 0.65536000000000000000e5 +582 1 25 28 -0.65536000000000000000e5 +583 1 24 32 0.65536000000000000000e5 +583 1 29 30 -0.65536000000000000000e5 +584 1 12 35 -0.65536000000000000000e5 +584 1 24 33 0.65536000000000000000e5 +585 1 24 34 0.65536000000000000000e5 +585 1 30 31 -0.65536000000000000000e5 +586 1 8 23 -0.65536000000000000000e5 +586 1 11 26 0.32768000000000000000e5 +586 1 12 27 0.32768000000000000000e5 +586 1 16 31 -0.32768000000000000000e5 +586 1 22 29 -0.32768000000000000000e5 +586 1 25 26 0.65536000000000000000e5 +586 3 6 19 0.32768000000000000000e5 +586 3 9 14 0.65536000000000000000e5 +586 4 6 10 0.32768000000000000000e5 +587 1 23 30 -0.65536000000000000000e5 +587 1 25 27 0.65536000000000000000e5 +588 1 14 29 -0.65536000000000000000e5 +588 1 25 29 0.65536000000000000000e5 +588 3 10 19 0.65536000000000000000e5 +589 1 24 31 -0.65536000000000000000e5 +589 1 25 30 0.65536000000000000000e5 +590 1 15 34 -0.65536000000000000000e5 +590 1 25 31 0.65536000000000000000e5 +591 1 25 33 0.65536000000000000000e5 +591 1 30 31 -0.65536000000000000000e5 +592 1 25 35 0.65536000000000000000e5 +592 1 31 34 -0.65536000000000000000e5 +593 1 17 32 0.32768000000000000000e5 +593 1 26 26 0.65536000000000000000e5 +593 1 26 29 -0.65536000000000000000e5 +593 1 26 33 0.32768000000000000000e5 +593 2 17 17 0.65536000000000000000e5 +593 3 17 18 0.32768000000000000000e5 +594 1 17 32 -0.65536000000000000000e5 +594 1 26 27 0.65536000000000000000e5 +595 1 26 28 0.65536000000000000000e5 +595 1 26 33 -0.65536000000000000000e5 +595 3 17 18 -0.65536000000000000000e5 +596 1 2 9 -0.65536000000000000000e5 +596 1 3 34 -0.65536000000000000000e5 +596 1 26 29 0.65536000000000000000e5 +596 1 26 30 0.65536000000000000000e5 +596 2 6 20 -0.65536000000000000000e5 +596 2 14 20 0.65536000000000000000e5 +596 3 2 7 0.65536000000000000000e5 +596 3 2 15 0.65536000000000000000e5 +596 3 5 18 0.65536000000000000000e5 +596 3 7 20 -0.65536000000000000000e5 +596 3 14 19 0.13107200000000000000e6 +597 1 7 22 -0.65536000000000000000e5 +597 1 26 31 0.65536000000000000000e5 +597 3 3 16 0.65536000000000000000e5 +597 3 6 19 0.65536000000000000000e5 +597 3 14 19 0.65536000000000000000e5 +598 1 16 35 -0.65536000000000000000e5 +598 1 26 32 0.65536000000000000000e5 +599 1 20 35 -0.65536000000000000000e5 +599 1 26 34 0.65536000000000000000e5 +600 1 2 9 0.13107200000000000000e6 +600 1 3 34 0.13107200000000000000e6 +600 1 7 22 -0.26214400000000000000e6 +600 1 26 35 0.65536000000000000000e5 +600 1 28 35 0.65536000000000000000e5 +600 1 32 33 0.65536000000000000000e5 +600 2 6 20 0.13107200000000000000e6 +600 2 20 20 0.13107200000000000000e6 +600 3 2 7 -0.13107200000000000000e6 +600 3 2 15 -0.13107200000000000000e6 +600 3 3 16 0.26214400000000000000e6 +600 3 5 18 -0.13107200000000000000e6 +600 3 6 19 0.26214400000000000000e6 +600 3 7 20 0.13107200000000000000e6 +600 3 15 20 0.13107200000000000000e6 +600 3 19 20 0.13107200000000000000e6 +601 1 26 33 -0.32768000000000000000e5 +601 1 27 27 0.65536000000000000000e5 +601 3 17 18 -0.32768000000000000000e5 +602 1 4 35 -0.65536000000000000000e5 +602 1 27 28 0.65536000000000000000e5 +603 1 2 9 -0.65536000000000000000e5 +603 1 3 34 -0.65536000000000000000e5 +603 1 26 29 0.65536000000000000000e5 +603 1 27 29 0.65536000000000000000e5 +603 2 6 20 -0.65536000000000000000e5 +603 2 14 20 0.65536000000000000000e5 +603 3 2 7 0.65536000000000000000e5 +603 3 2 15 0.65536000000000000000e5 +603 3 5 18 0.65536000000000000000e5 +603 3 7 20 -0.65536000000000000000e5 +603 3 14 19 0.13107200000000000000e6 +604 1 2 9 0.65536000000000000000e5 +604 1 3 34 0.65536000000000000000e5 +604 1 7 22 -0.13107200000000000000e6 +604 1 27 30 0.65536000000000000000e5 +604 2 6 20 0.65536000000000000000e5 +604 3 2 7 -0.65536000000000000000e5 +604 3 2 15 -0.65536000000000000000e5 +604 3 3 16 0.13107200000000000000e6 +604 3 5 18 -0.65536000000000000000e5 +604 3 6 19 0.13107200000000000000e6 +604 3 7 20 0.65536000000000000000e5 +605 1 27 31 0.65536000000000000000e5 +605 1 29 30 -0.65536000000000000000e5 +606 1 26 33 -0.65536000000000000000e5 +606 1 27 32 0.65536000000000000000e5 +607 1 2 9 0.13107200000000000000e6 +607 1 3 34 0.13107200000000000000e6 +607 1 4 35 -0.65536000000000000000e5 +607 1 16 35 0.65536000000000000000e5 +607 1 17 32 -0.65536000000000000000e5 +607 1 20 35 -0.13107200000000000000e6 +607 1 26 29 -0.13107200000000000000e6 +607 1 27 33 0.65536000000000000000e5 +607 2 6 20 0.13107200000000000000e6 +607 2 14 20 -0.13107200000000000000e6 +607 3 2 7 -0.13107200000000000000e6 +607 3 2 15 -0.13107200000000000000e6 +607 3 5 18 -0.13107200000000000000e6 +607 3 7 20 0.13107200000000000000e6 +607 3 14 19 -0.26214400000000000000e6 +607 3 17 18 -0.65536000000000000000e5 +607 4 10 10 -0.13107200000000000000e6 +608 1 2 9 0.65536000000000000000e5 +608 1 3 34 0.65536000000000000000e5 +608 1 7 22 -0.13107200000000000000e6 +608 1 27 34 0.65536000000000000000e5 +608 2 6 20 0.65536000000000000000e5 +608 3 2 7 -0.65536000000000000000e5 +608 3 2 15 -0.65536000000000000000e5 +608 3 3 16 0.13107200000000000000e6 +608 3 5 18 -0.65536000000000000000e5 +608 3 6 19 0.13107200000000000000e6 +608 3 7 20 0.65536000000000000000e5 +608 3 15 20 0.65536000000000000000e5 +609 1 27 35 0.65536000000000000000e5 +609 1 32 33 -0.65536000000000000000e5 +610 1 2 9 0.65536000000000000000e5 +610 1 3 34 0.65536000000000000000e5 +610 1 4 35 0.32768000000000000000e5 +610 1 7 22 -0.13107200000000000000e6 +610 1 26 33 0.32768000000000000000e5 +610 1 28 28 0.65536000000000000000e5 +610 2 6 20 0.65536000000000000000e5 +610 2 18 18 0.65536000000000000000e5 +610 3 2 7 -0.65536000000000000000e5 +610 3 2 15 -0.65536000000000000000e5 +610 3 3 16 0.13107200000000000000e6 +610 3 5 18 -0.65536000000000000000e5 +610 3 6 19 0.13107200000000000000e6 +610 3 7 20 0.65536000000000000000e5 +610 3 17 18 0.32768000000000000000e5 +611 1 2 9 0.65536000000000000000e5 +611 1 3 34 0.65536000000000000000e5 +611 1 7 22 -0.13107200000000000000e6 +611 1 28 29 0.65536000000000000000e5 +611 2 6 20 0.65536000000000000000e5 +611 3 2 7 -0.65536000000000000000e5 +611 3 2 15 -0.65536000000000000000e5 +611 3 3 16 0.13107200000000000000e6 +611 3 5 18 -0.65536000000000000000e5 +611 3 6 19 0.13107200000000000000e6 +611 3 7 20 0.65536000000000000000e5 +612 1 19 34 -0.65536000000000000000e5 +612 1 28 30 0.65536000000000000000e5 +613 1 12 35 -0.65536000000000000000e5 +613 1 28 31 0.65536000000000000000e5 +614 1 2 9 0.13107200000000000000e6 +614 1 3 34 0.13107200000000000000e6 +614 1 4 35 -0.65536000000000000000e5 +614 1 16 35 0.65536000000000000000e5 +614 1 17 32 -0.65536000000000000000e5 +614 1 20 35 -0.13107200000000000000e6 +614 1 26 29 -0.13107200000000000000e6 +614 1 28 32 0.65536000000000000000e5 +614 2 6 20 0.13107200000000000000e6 +614 2 14 20 -0.13107200000000000000e6 +614 3 2 7 -0.13107200000000000000e6 +614 3 2 15 -0.13107200000000000000e6 +614 3 5 18 -0.13107200000000000000e6 +614 3 7 20 0.13107200000000000000e6 +614 3 14 19 -0.26214400000000000000e6 +614 3 17 18 -0.65536000000000000000e5 +614 4 10 10 -0.13107200000000000000e6 +615 1 4 35 0.65536000000000000000e5 +615 1 7 22 -0.26214400000000000000e6 +615 1 16 35 -0.65536000000000000000e5 +615 1 17 32 0.65536000000000000000e5 +615 1 20 35 0.13107200000000000000e6 +615 1 26 29 0.13107200000000000000e6 +615 1 26 33 0.65536000000000000000e5 +615 1 28 33 0.65536000000000000000e5 +615 2 14 20 0.13107200000000000000e6 +615 2 18 20 0.65536000000000000000e5 +615 3 3 16 0.26214400000000000000e6 +615 3 6 19 0.26214400000000000000e6 +615 3 14 19 0.26214400000000000000e6 +615 3 15 20 0.13107200000000000000e6 +615 3 17 18 0.65536000000000000000e5 +615 4 10 10 0.13107200000000000000e6 +616 1 28 34 0.65536000000000000000e5 +616 1 30 33 -0.65536000000000000000e5 +617 1 7 22 -0.32768000000000000000e5 +617 1 29 29 0.65536000000000000000e5 +617 3 3 16 0.32768000000000000000e5 +617 3 6 19 0.32768000000000000000e5 +617 3 14 19 0.32768000000000000000e5 +618 1 25 32 -0.65536000000000000000e5 +618 1 29 31 0.65536000000000000000e5 +619 1 20 35 -0.65536000000000000000e5 +619 1 29 32 0.65536000000000000000e5 +620 1 2 9 0.65536000000000000000e5 +620 1 3 34 0.65536000000000000000e5 +620 1 7 22 -0.13107200000000000000e6 +620 1 29 33 0.65536000000000000000e5 +620 2 6 20 0.65536000000000000000e5 +620 3 2 7 -0.65536000000000000000e5 +620 3 2 15 -0.65536000000000000000e5 +620 3 3 16 0.13107200000000000000e6 +620 3 5 18 -0.65536000000000000000e5 +620 3 6 19 0.13107200000000000000e6 +620 3 7 20 0.65536000000000000000e5 +620 3 15 20 0.65536000000000000000e5 +621 1 29 34 0.65536000000000000000e5 +621 1 31 32 -0.65536000000000000000e5 +622 1 2 9 0.65536000000000000000e5 +622 1 3 34 0.65536000000000000000e5 +622 1 7 22 -0.13107200000000000000e6 +622 1 29 35 0.65536000000000000000e5 +622 2 6 20 0.65536000000000000000e5 +622 3 2 7 -0.65536000000000000000e5 +622 3 2 15 -0.65536000000000000000e5 +622 3 3 16 0.13107200000000000000e6 +622 3 5 18 -0.65536000000000000000e5 +622 3 6 19 0.13107200000000000000e6 +622 3 7 20 0.65536000000000000000e5 +622 3 15 20 0.65536000000000000000e5 +622 3 19 20 0.65536000000000000000e5 +623 1 12 35 -0.32768000000000000000e5 +623 1 30 30 0.65536000000000000000e5 +624 1 2 9 0.65536000000000000000e5 +624 1 3 34 0.65536000000000000000e5 +624 1 7 22 -0.13107200000000000000e6 +624 1 30 32 0.65536000000000000000e5 +624 2 6 20 0.65536000000000000000e5 +624 3 2 7 -0.65536000000000000000e5 +624 3 2 15 -0.65536000000000000000e5 +624 3 3 16 0.13107200000000000000e6 +624 3 5 18 -0.65536000000000000000e5 +624 3 6 19 0.13107200000000000000e6 +624 3 7 20 0.65536000000000000000e5 +624 3 15 20 0.65536000000000000000e5 +625 1 24 35 -0.65536000000000000000e5 +625 1 30 34 0.65536000000000000000e5 +626 1 30 35 0.65536000000000000000e5 +626 1 33 34 -0.65536000000000000000e5 +627 1 25 34 -0.32768000000000000000e5 +627 1 31 31 0.65536000000000000000e5 +628 1 24 35 -0.65536000000000000000e5 +628 1 31 33 0.65536000000000000000e5 +629 1 31 35 0.65536000000000000000e5 +629 1 34 34 -0.13107200000000000000e6 +630 1 2 9 0.65536000000000000000e5 +630 1 3 34 0.65536000000000000000e5 +630 1 7 22 -0.13107200000000000000e6 +630 1 28 35 0.32768000000000000000e5 +630 1 32 32 0.65536000000000000000e5 +630 1 32 33 0.32768000000000000000e5 +630 2 6 20 0.65536000000000000000e5 +630 2 20 20 0.65536000000000000000e5 +630 3 2 7 -0.65536000000000000000e5 +630 3 2 15 -0.65536000000000000000e5 +630 3 3 16 0.13107200000000000000e6 +630 3 5 18 -0.65536000000000000000e5 +630 3 6 19 0.13107200000000000000e6 +630 3 7 20 0.65536000000000000000e5 +630 3 15 20 0.65536000000000000000e5 +630 3 19 20 0.65536000000000000000e5 +631 1 2 9 0.65536000000000000000e5 +631 1 3 34 0.65536000000000000000e5 +631 1 7 22 -0.13107200000000000000e6 +631 1 32 34 0.65536000000000000000e5 +631 2 6 20 0.65536000000000000000e5 +631 3 2 7 -0.65536000000000000000e5 +631 3 2 15 -0.65536000000000000000e5 +631 3 3 16 0.13107200000000000000e6 +631 3 5 18 -0.65536000000000000000e5 +631 3 6 19 0.13107200000000000000e6 +631 3 7 20 0.65536000000000000000e5 +631 3 15 20 0.65536000000000000000e5 +631 3 19 20 0.65536000000000000000e5 +632 1 28 35 -0.32768000000000000000e5 +632 1 33 33 0.65536000000000000000e5 +633 1 1 16 0.65536000000000000000e5 +633 1 2 5 0.65536000000000000000e5 +633 1 2 17 0.65536000000000000000e5 +633 1 3 10 -0.26214400000000000000e6 +633 1 5 20 0.26214400000000000000e6 +633 1 6 21 0.13107200000000000000e7 +633 1 7 22 0.26214400000000000000e6 +633 1 8 23 0.52428800000000000000e6 +633 1 13 20 -0.10485760000000000000e7 +633 2 1 2 0.65536000000000000000e5 +633 2 1 3 -0.65536000000000000000e5 +633 2 1 7 0.13107200000000000000e6 +633 2 1 15 -0.39321600000000000000e6 +633 2 2 8 0.26214400000000000000e6 +633 2 2 12 0.65536000000000000000e5 +633 2 2 16 0.26214400000000000000e6 +633 2 5 11 0.13107200000000000000e6 +633 2 6 12 0.26214400000000000000e6 +633 2 8 14 0.52428800000000000000e6 +633 3 1 2 -0.65536000000000000000e5 +633 3 1 6 0.26214400000000000000e6 +633 3 2 7 0.13107200000000000000e6 +633 4 1 1 -0.13107200000000000000e6 +633 4 2 2 0.13107200000000000000e6 +633 4 4 4 -0.52428800000000000000e6 +634 2 1 4 0.65536000000000000000e5 +634 2 2 12 -0.65536000000000000000e5 +634 4 2 2 -0.13107200000000000000e6 +635 1 1 2 0.32768000000000000000e5 +635 1 1 6 0.65536000000000000000e5 +635 1 1 8 0.19660800000000000000e6 +635 1 1 10 -0.13107200000000000000e6 +635 1 1 16 -0.32768000000000000000e5 +635 1 2 5 -0.32768000000000000000e5 +635 1 2 9 0.65536000000000000000e5 +635 1 3 10 0.13107200000000000000e6 +635 1 3 18 0.32768000000000000000e5 +635 1 5 20 -0.13107200000000000000e6 +635 1 6 21 -0.78643200000000000000e6 +635 1 7 22 -0.13107200000000000000e6 +635 1 8 23 -0.26214400000000000000e6 +635 1 13 20 0.52428800000000000000e6 +635 2 1 5 0.65536000000000000000e5 +635 2 1 7 -0.65536000000000000000e5 +635 2 1 15 0.26214400000000000000e6 +635 2 2 8 -0.13107200000000000000e6 +635 2 2 16 -0.13107200000000000000e6 +635 2 5 11 -0.65536000000000000000e5 +635 2 6 12 -0.13107200000000000000e6 +635 2 8 14 -0.26214400000000000000e6 +635 3 1 2 0.32768000000000000000e5 +635 3 1 6 -0.19660800000000000000e6 +635 3 2 3 -0.32768000000000000000e5 +635 3 2 7 -0.13107200000000000000e6 +635 4 1 1 0.65536000000000000000e5 +635 4 2 2 -0.65536000000000000000e5 +635 4 4 4 0.26214400000000000000e6 +636 1 1 2 0.32768000000000000000e5 +636 1 1 16 -0.32768000000000000000e5 +636 1 2 5 -0.32768000000000000000e5 +636 1 3 10 0.52428800000000000000e6 +636 1 3 18 0.32768000000000000000e5 +636 1 4 11 0.26214400000000000000e6 +636 1 6 21 -0.52428800000000000000e6 +636 1 7 22 -0.13107200000000000000e6 +636 1 8 23 -0.26214400000000000000e6 +636 1 11 26 0.13107200000000000000e6 +636 1 12 27 0.13107200000000000000e6 +636 2 1 6 0.65536000000000000000e5 +636 2 1 7 -0.13107200000000000000e6 +636 2 1 15 0.13107200000000000000e6 +636 2 3 9 0.13107200000000000000e6 +636 2 5 11 -0.65536000000000000000e5 +636 2 6 8 0.26214400000000000000e6 +636 2 8 14 -0.26214400000000000000e6 +636 3 1 2 0.32768000000000000000e5 +636 3 1 6 -0.65536000000000000000e5 +636 3 2 3 -0.32768000000000000000e5 +636 3 2 7 -0.13107200000000000000e6 +636 3 3 8 0.39321600000000000000e6 +636 3 3 16 -0.13107200000000000000e6 +636 3 4 9 0.13107200000000000000e6 +636 3 5 10 -0.52428800000000000000e6 +636 3 9 14 0.26214400000000000000e6 +636 4 1 1 0.65536000000000000000e5 +636 4 2 2 -0.65536000000000000000e5 +636 4 2 6 0.13107200000000000000e6 +636 4 4 4 0.26214400000000000000e6 +636 4 5 9 -0.13107200000000000000e6 +637 2 1 8 0.65536000000000000000e5 +637 2 5 5 -0.13107200000000000000e6 +638 2 1 9 0.65536000000000000000e5 +638 2 2 8 -0.65536000000000000000e5 +639 1 1 8 0.32768000000000000000e5 +639 1 1 10 0.32768000000000000000e5 +639 1 3 10 -0.32768000000000000000e5 +639 1 4 11 -0.98304000000000000000e5 +639 1 5 20 -0.32768000000000000000e5 +639 1 6 13 -0.13107200000000000000e6 +639 1 6 21 -0.65536000000000000000e5 +639 1 11 26 -0.65536000000000000000e5 +639 1 12 27 -0.65536000000000000000e5 +639 1 13 20 0.26214400000000000000e6 +639 2 1 10 0.65536000000000000000e5 +639 2 1 15 0.32768000000000000000e5 +639 2 2 8 -0.32768000000000000000e5 +639 2 2 16 -0.32768000000000000000e5 +639 2 3 9 -0.65536000000000000000e5 +639 2 5 5 0.65536000000000000000e5 +639 2 6 8 -0.13107200000000000000e6 +639 2 6 12 -0.32768000000000000000e5 +639 3 1 6 -0.32768000000000000000e5 +639 3 3 8 -0.13107200000000000000e6 +639 3 3 16 0.65536000000000000000e5 +639 3 4 9 -0.65536000000000000000e5 +639 3 5 10 0.26214400000000000000e6 +639 3 9 14 -0.13107200000000000000e6 +639 4 2 6 -0.32768000000000000000e5 +639 4 5 9 0.65536000000000000000e5 +640 1 1 16 0.65536000000000000000e5 +640 1 2 5 0.65536000000000000000e5 +640 1 2 17 0.65536000000000000000e5 +640 1 3 10 -0.26214400000000000000e6 +640 1 5 20 0.26214400000000000000e6 +640 1 6 21 0.13107200000000000000e7 +640 1 7 22 0.26214400000000000000e6 +640 1 8 23 0.52428800000000000000e6 +640 1 13 20 -0.10485760000000000000e7 +640 2 1 3 -0.65536000000000000000e5 +640 2 1 7 0.13107200000000000000e6 +640 2 1 11 0.65536000000000000000e5 +640 2 1 15 -0.39321600000000000000e6 +640 2 2 8 0.26214400000000000000e6 +640 2 2 12 0.65536000000000000000e5 +640 2 2 16 0.26214400000000000000e6 +640 2 5 11 0.13107200000000000000e6 +640 2 6 12 0.26214400000000000000e6 +640 2 8 14 0.52428800000000000000e6 +640 3 1 2 -0.65536000000000000000e5 +640 3 1 6 0.26214400000000000000e6 +640 3 2 7 0.13107200000000000000e6 +640 4 2 2 0.13107200000000000000e6 +640 4 4 4 -0.52428800000000000000e6 +641 1 2 5 0.65536000000000000000e5 +641 1 3 10 -0.26214400000000000000e6 +641 1 3 18 -0.65536000000000000000e5 +641 1 6 21 0.26214400000000000000e6 +641 2 1 3 -0.65536000000000000000e5 +641 2 1 7 0.13107200000000000000e6 +641 2 1 12 0.65536000000000000000e5 +641 2 1 15 -0.13107200000000000000e6 +641 3 1 2 -0.65536000000000000000e5 +641 3 1 6 0.26214400000000000000e6 +641 3 2 7 0.13107200000000000000e6 +641 4 2 2 0.13107200000000000000e6 +642 2 1 13 0.65536000000000000000e5 +642 2 2 12 -0.65536000000000000000e5 +643 2 1 14 0.65536000000000000000e5 +643 2 5 11 -0.65536000000000000000e5 +644 2 1 16 0.65536000000000000000e5 +644 2 2 8 -0.65536000000000000000e5 +644 4 4 4 0.13107200000000000000e6 +645 2 1 17 0.65536000000000000000e5 +645 2 11 11 -0.13107200000000000000e6 +646 2 1 18 0.65536000000000000000e5 +646 2 11 17 -0.65536000000000000000e5 +646 4 7 7 -0.13107200000000000000e6 +647 1 6 21 0.13107200000000000000e6 +647 1 16 23 -0.13107200000000000000e6 +647 2 1 15 -0.65536000000000000000e5 +647 2 1 19 0.65536000000000000000e5 +647 3 1 14 -0.65536000000000000000e5 +647 3 2 15 -0.65536000000000000000e5 +647 3 6 11 -0.65536000000000000000e5 +648 2 1 20 0.65536000000000000000e5 +648 2 11 17 -0.65536000000000000000e5 +649 2 1 3 -0.32768000000000000000e5 +649 2 2 2 0.65536000000000000000e5 +650 2 2 3 0.65536000000000000000e5 +650 2 2 12 -0.65536000000000000000e5 +650 4 2 2 -0.13107200000000000000e6 +651 1 1 2 0.32768000000000000000e5 +651 1 1 16 -0.32768000000000000000e5 +651 1 2 5 -0.32768000000000000000e5 +651 1 3 10 0.52428800000000000000e6 +651 1 3 18 0.32768000000000000000e5 +651 1 4 11 0.26214400000000000000e6 +651 1 6 21 -0.52428800000000000000e6 +651 1 7 22 -0.13107200000000000000e6 +651 1 8 23 -0.26214400000000000000e6 +651 1 11 26 0.13107200000000000000e6 +651 1 12 27 0.13107200000000000000e6 +651 2 1 7 -0.13107200000000000000e6 +651 2 1 15 0.13107200000000000000e6 +651 2 2 5 0.65536000000000000000e5 +651 2 3 9 0.13107200000000000000e6 +651 2 5 11 -0.65536000000000000000e5 +651 2 6 8 0.26214400000000000000e6 +651 2 8 14 -0.26214400000000000000e6 +651 3 1 2 0.32768000000000000000e5 +651 3 1 6 -0.65536000000000000000e5 +651 3 2 3 -0.32768000000000000000e5 +651 3 2 7 -0.13107200000000000000e6 +651 3 3 8 0.39321600000000000000e6 +651 3 3 16 -0.13107200000000000000e6 +651 3 4 9 0.13107200000000000000e6 +651 3 5 10 -0.52428800000000000000e6 +651 3 9 14 0.26214400000000000000e6 +651 4 1 1 0.65536000000000000000e5 +651 4 2 2 -0.65536000000000000000e5 +651 4 2 6 0.13107200000000000000e6 +651 4 4 4 0.26214400000000000000e6 +651 4 5 9 -0.13107200000000000000e6 +652 2 1 7 -0.65536000000000000000e5 +652 2 2 6 0.65536000000000000000e5 +653 1 2 9 -0.65536000000000000000e5 +653 1 3 10 0.13107200000000000000e6 +653 1 4 11 0.13107200000000000000e6 +653 1 5 8 -0.65536000000000000000e5 +653 1 5 20 -0.65536000000000000000e5 +653 1 6 21 -0.13107200000000000000e6 +653 2 1 7 -0.65536000000000000000e5 +653 2 1 15 0.65536000000000000000e5 +653 2 2 7 0.65536000000000000000e5 +653 2 4 6 -0.65536000000000000000e5 +653 2 6 12 -0.65536000000000000000e5 +653 3 1 6 -0.65536000000000000000e5 +653 3 3 8 -0.13107200000000000000e6 +654 2 2 9 0.65536000000000000000e5 +654 2 2 16 -0.65536000000000000000e5 +654 4 2 6 -0.65536000000000000000e5 +655 2 2 10 0.65536000000000000000e5 +655 2 6 8 -0.65536000000000000000e5 +656 1 2 5 0.65536000000000000000e5 +656 1 3 10 -0.26214400000000000000e6 +656 1 3 18 -0.65536000000000000000e5 +656 1 6 21 0.26214400000000000000e6 +656 2 1 3 -0.65536000000000000000e5 +656 2 1 7 0.13107200000000000000e6 +656 2 1 15 -0.13107200000000000000e6 +656 2 2 11 0.65536000000000000000e5 +656 3 1 2 -0.65536000000000000000e5 +656 3 1 6 0.26214400000000000000e6 +656 3 2 7 0.13107200000000000000e6 +656 4 2 2 0.13107200000000000000e6 +657 2 2 13 0.65536000000000000000e5 +657 2 3 17 -0.65536000000000000000e5 +657 4 3 7 -0.65536000000000000000e5 +658 2 1 15 -0.65536000000000000000e5 +658 2 2 14 0.65536000000000000000e5 +659 2 2 15 0.65536000000000000000e5 +659 2 6 12 -0.65536000000000000000e5 +660 2 2 17 0.65536000000000000000e5 +660 2 11 17 -0.65536000000000000000e5 +660 4 7 7 -0.13107200000000000000e6 +661 2 2 18 0.65536000000000000000e5 +661 2 3 17 -0.65536000000000000000e5 +662 2 2 19 0.65536000000000000000e5 +662 2 6 12 -0.65536000000000000000e5 +662 4 4 8 0.65536000000000000000e5 +663 1 2 9 -0.13107200000000000000e6 +663 1 3 26 0.65536000000000000000e5 +663 1 3 34 0.13107200000000000000e6 +663 1 4 35 -0.65536000000000000000e5 +663 2 2 20 0.65536000000000000000e5 +663 2 12 18 -0.65536000000000000000e5 +663 3 2 7 0.13107200000000000000e6 +663 3 2 15 0.13107200000000000000e6 +663 3 5 18 0.13107200000000000000e6 +663 3 11 12 -0.65536000000000000000e5 +663 3 13 18 -0.65536000000000000000e5 +664 2 2 4 -0.32768000000000000000e5 +664 2 3 3 0.65536000000000000000e5 +665 1 1 8 0.13107200000000000000e6 +665 1 2 9 0.26214400000000000000e6 +665 1 2 17 0.65536000000000000000e5 +665 1 3 18 0.65536000000000000000e5 +665 1 4 19 0.65536000000000000000e5 +665 1 5 20 -0.13107200000000000000e6 +665 1 6 21 -0.26214400000000000000e6 +665 2 1 15 0.13107200000000000000e6 +665 2 2 12 0.65536000000000000000e5 +665 2 3 4 0.65536000000000000000e5 +665 2 3 17 -0.65536000000000000000e5 +665 3 1 6 -0.13107200000000000000e6 +665 3 2 7 -0.26214400000000000000e6 +665 4 3 3 -0.13107200000000000000e6 +665 4 3 7 -0.65536000000000000000e5 +666 2 1 7 -0.65536000000000000000e5 +666 2 3 5 0.65536000000000000000e5 +667 1 2 9 -0.65536000000000000000e5 +667 1 3 10 0.13107200000000000000e6 +667 1 4 11 0.13107200000000000000e6 +667 1 5 8 -0.65536000000000000000e5 +667 1 5 20 -0.65536000000000000000e5 +667 1 6 21 -0.13107200000000000000e6 +667 2 1 7 -0.65536000000000000000e5 +667 2 1 15 0.65536000000000000000e5 +667 2 3 6 0.65536000000000000000e5 +667 2 4 6 -0.65536000000000000000e5 +667 2 6 12 -0.65536000000000000000e5 +667 3 1 6 -0.65536000000000000000e5 +667 3 3 8 -0.13107200000000000000e6 +668 2 3 7 0.65536000000000000000e5 +668 2 4 6 -0.65536000000000000000e5 +669 2 2 16 -0.65536000000000000000e5 +669 2 3 8 0.65536000000000000000e5 +669 4 2 6 -0.65536000000000000000e5 +670 1 1 8 -0.16384000000000000000e5 +670 1 3 10 0.32768000000000000000e5 +670 1 4 11 0.32768000000000000000e5 +670 1 4 15 0.13107200000000000000e6 +670 1 5 20 0.16384000000000000000e5 +670 1 6 21 0.32768000000000000000e5 +670 1 7 14 -0.13107200000000000000e6 +670 1 9 12 -0.65536000000000000000e5 +670 2 1 15 -0.16384000000000000000e5 +670 2 2 16 0.32768000000000000000e5 +670 2 3 10 0.65536000000000000000e5 +670 2 4 10 -0.65536000000000000000e5 +670 2 6 12 0.16384000000000000000e5 +670 3 1 6 0.16384000000000000000e5 +670 3 3 8 0.32768000000000000000e5 +670 4 2 6 0.32768000000000000000e5 +671 2 2 12 -0.65536000000000000000e5 +671 2 3 11 0.65536000000000000000e5 +672 2 3 12 0.65536000000000000000e5 +672 2 3 17 -0.65536000000000000000e5 +672 4 3 7 -0.65536000000000000000e5 +673 1 1 8 0.13107200000000000000e6 +673 1 2 9 0.26214400000000000000e6 +673 1 2 17 0.65536000000000000000e5 +673 1 3 18 0.65536000000000000000e5 +673 1 4 19 0.65536000000000000000e5 +673 1 5 20 -0.13107200000000000000e6 +673 1 6 21 -0.26214400000000000000e6 +673 2 1 15 0.13107200000000000000e6 +673 2 2 12 0.65536000000000000000e5 +673 2 3 13 0.65536000000000000000e5 +673 2 3 17 -0.65536000000000000000e5 +673 3 1 6 -0.13107200000000000000e6 +673 3 2 7 -0.26214400000000000000e6 +673 4 3 7 -0.65536000000000000000e5 +674 2 3 14 0.65536000000000000000e5 +674 2 6 12 -0.65536000000000000000e5 +675 2 3 15 0.65536000000000000000e5 +675 2 4 14 -0.65536000000000000000e5 +676 1 7 22 0.65536000000000000000e5 +676 1 8 23 -0.13107200000000000000e6 +676 1 11 26 0.65536000000000000000e5 +676 1 12 27 0.65536000000000000000e5 +676 2 3 16 0.65536000000000000000e5 +676 3 3 16 -0.65536000000000000000e5 +676 3 9 14 0.13107200000000000000e6 +676 4 5 9 -0.65536000000000000000e5 +677 2 3 18 0.65536000000000000000e5 +677 2 12 18 -0.65536000000000000000e5 +677 4 8 8 -0.13107200000000000000e6 +678 1 1 8 0.13107200000000000000e6 +678 1 2 33 -0.32768000000000000000e5 +678 1 3 26 0.32768000000000000000e5 +678 1 3 34 0.65536000000000000000e5 +678 1 4 35 -0.32768000000000000000e5 +678 1 5 28 0.32768000000000000000e5 +678 1 6 21 -0.26214400000000000000e6 +678 1 7 22 -0.13107200000000000000e6 +678 1 11 26 0.26214400000000000000e6 +678 2 1 15 0.13107200000000000000e6 +678 2 3 17 0.32768000000000000000e5 +678 2 3 19 0.65536000000000000000e5 +678 2 4 18 0.32768000000000000000e5 +678 2 6 12 -0.13107200000000000000e6 +678 2 12 18 -0.65536000000000000000e5 +678 3 1 6 -0.13107200000000000000e6 +678 3 2 15 0.13107200000000000000e6 +678 3 3 16 0.13107200000000000000e6 +678 3 4 17 0.32768000000000000000e5 +678 3 6 11 0.13107200000000000000e6 +678 3 13 18 -0.32768000000000000000e5 +678 4 4 8 0.13107200000000000000e6 +678 4 8 8 -0.65536000000000000000e5 +679 2 3 20 0.65536000000000000000e5 +679 2 12 18 -0.65536000000000000000e5 +680 1 2 9 -0.65536000000000000000e5 +680 1 3 10 0.13107200000000000000e6 +680 1 4 11 0.13107200000000000000e6 +680 1 5 8 -0.65536000000000000000e5 +680 1 5 20 -0.65536000000000000000e5 +680 1 6 21 -0.13107200000000000000e6 +680 2 1 7 -0.65536000000000000000e5 +680 2 1 15 0.65536000000000000000e5 +680 2 4 5 0.65536000000000000000e5 +680 2 4 6 -0.65536000000000000000e5 +680 2 6 12 -0.65536000000000000000e5 +680 3 1 6 -0.65536000000000000000e5 +680 3 3 8 -0.13107200000000000000e6 +681 2 3 9 -0.65536000000000000000e5 +681 2 4 8 0.65536000000000000000e5 +682 1 1 8 0.32768000000000000000e5 +682 1 4 11 0.13107200000000000000e6 +682 1 4 15 -0.26214400000000000000e6 +682 1 5 12 0.65536000000000000000e5 +682 1 5 20 -0.32768000000000000000e5 +682 1 6 21 -0.65536000000000000000e5 +682 1 9 12 0.13107200000000000000e6 +682 1 11 26 0.13107200000000000000e6 +682 1 12 27 0.13107200000000000000e6 +682 2 1 15 0.32768000000000000000e5 +682 2 3 9 0.65536000000000000000e5 +682 2 4 9 0.65536000000000000000e5 +682 2 4 10 0.13107200000000000000e6 +682 2 6 12 -0.32768000000000000000e5 +682 3 1 6 -0.32768000000000000000e5 +682 3 3 8 0.65536000000000000000e5 +682 3 3 16 -0.13107200000000000000e6 +682 3 4 9 0.13107200000000000000e6 +682 3 9 14 0.26214400000000000000e6 +682 4 5 9 -0.13107200000000000000e6 +683 2 3 17 -0.65536000000000000000e5 +683 2 4 11 0.65536000000000000000e5 +683 4 3 7 -0.65536000000000000000e5 +684 1 1 8 0.13107200000000000000e6 +684 1 2 9 0.26214400000000000000e6 +684 1 2 17 0.65536000000000000000e5 +684 1 3 18 0.65536000000000000000e5 +684 1 4 19 0.65536000000000000000e5 +684 1 5 20 -0.13107200000000000000e6 +684 1 6 21 -0.26214400000000000000e6 +684 2 1 15 0.13107200000000000000e6 +684 2 2 12 0.65536000000000000000e5 +684 2 3 17 -0.65536000000000000000e5 +684 2 4 12 0.65536000000000000000e5 +684 3 1 6 -0.13107200000000000000e6 +684 3 2 7 -0.26214400000000000000e6 +684 4 3 7 -0.65536000000000000000e5 +685 2 4 15 0.65536000000000000000e5 +685 2 7 13 -0.65536000000000000000e5 +686 1 1 8 0.32768000000000000000e5 +686 1 5 20 -0.32768000000000000000e5 +686 1 6 21 -0.65536000000000000000e5 +686 1 7 22 0.65536000000000000000e5 +686 1 8 23 0.13107200000000000000e6 +686 1 9 24 0.13107200000000000000e6 +686 1 11 26 0.65536000000000000000e5 +686 1 12 19 0.65536000000000000000e5 +686 1 12 27 0.65536000000000000000e5 +686 1 14 21 -0.26214400000000000000e6 +686 2 1 15 0.32768000000000000000e5 +686 2 4 16 0.65536000000000000000e5 +686 2 6 12 -0.32768000000000000000e5 +686 2 9 15 0.13107200000000000000e6 +686 3 1 6 -0.32768000000000000000e5 +686 3 3 16 -0.65536000000000000000e5 +686 3 9 14 0.13107200000000000000e6 +686 4 5 9 -0.65536000000000000000e5 +687 2 4 17 0.65536000000000000000e5 +687 2 12 18 -0.65536000000000000000e5 +687 4 8 8 -0.13107200000000000000e6 +688 1 1 8 0.13107200000000000000e6 +688 1 2 9 -0.65536000000000000000e5 +688 1 2 33 -0.32768000000000000000e5 +688 1 3 26 0.32768000000000000000e5 +688 1 3 34 0.65536000000000000000e5 +688 1 4 35 -0.32768000000000000000e5 +688 1 5 28 0.32768000000000000000e5 +688 1 6 21 -0.26214400000000000000e6 +688 1 11 26 0.26214400000000000000e6 +688 1 12 27 -0.13107200000000000000e6 +688 1 19 22 0.65536000000000000000e5 +688 2 1 15 0.13107200000000000000e6 +688 2 3 17 0.32768000000000000000e5 +688 2 4 18 0.32768000000000000000e5 +688 2 4 19 0.65536000000000000000e5 +688 2 6 12 -0.13107200000000000000e6 +688 2 12 18 -0.65536000000000000000e5 +688 3 1 6 -0.13107200000000000000e6 +688 3 2 7 0.65536000000000000000e5 +688 3 2 15 0.19660800000000000000e6 +688 3 4 17 0.32768000000000000000e5 +688 3 6 11 0.13107200000000000000e6 +688 3 13 18 -0.32768000000000000000e5 +688 4 4 8 0.13107200000000000000e6 +688 4 8 8 -0.65536000000000000000e5 +689 2 2 8 -0.65536000000000000000e5 +689 2 5 6 0.65536000000000000000e5 +690 2 2 16 -0.65536000000000000000e5 +690 2 5 7 0.65536000000000000000e5 +690 4 2 6 -0.65536000000000000000e5 +691 1 1 8 0.32768000000000000000e5 +691 1 1 10 0.32768000000000000000e5 +691 1 3 10 -0.32768000000000000000e5 +691 1 4 11 -0.98304000000000000000e5 +691 1 5 20 -0.32768000000000000000e5 +691 1 6 13 -0.13107200000000000000e6 +691 1 6 21 -0.65536000000000000000e5 +691 1 11 26 -0.65536000000000000000e5 +691 1 12 27 -0.65536000000000000000e5 +691 1 13 20 0.26214400000000000000e6 +691 2 1 15 0.32768000000000000000e5 +691 2 2 8 -0.32768000000000000000e5 +691 2 2 16 -0.32768000000000000000e5 +691 2 3 9 -0.65536000000000000000e5 +691 2 5 5 0.65536000000000000000e5 +691 2 5 8 0.65536000000000000000e5 +691 2 6 8 -0.13107200000000000000e6 +691 2 6 12 -0.32768000000000000000e5 +691 3 1 6 -0.32768000000000000000e5 +691 3 3 8 -0.13107200000000000000e6 +691 3 3 16 0.65536000000000000000e5 +691 3 4 9 -0.65536000000000000000e5 +691 3 5 10 0.26214400000000000000e6 +691 3 9 14 -0.13107200000000000000e6 +691 4 2 6 -0.32768000000000000000e5 +691 4 5 9 0.65536000000000000000e5 +692 2 5 9 0.65536000000000000000e5 +692 2 6 8 -0.65536000000000000000e5 +693 1 6 13 0.65536000000000000000e5 +693 1 7 14 0.65536000000000000000e5 +693 1 10 13 -0.13107200000000000000e6 +693 1 13 20 0.65536000000000000000e5 +693 2 5 10 0.65536000000000000000e5 +693 3 5 10 0.65536000000000000000e5 +694 2 1 15 -0.65536000000000000000e5 +694 2 5 12 0.65536000000000000000e5 +695 2 5 13 0.65536000000000000000e5 +695 2 6 12 -0.65536000000000000000e5 +696 2 2 8 -0.65536000000000000000e5 +696 2 5 14 0.65536000000000000000e5 +696 4 4 4 0.13107200000000000000e6 +697 2 2 16 -0.65536000000000000000e5 +697 2 5 15 0.65536000000000000000e5 +698 2 5 16 0.65536000000000000000e5 +698 2 8 14 -0.65536000000000000000e5 +699 1 6 21 0.13107200000000000000e6 +699 1 16 23 -0.13107200000000000000e6 +699 2 1 15 -0.65536000000000000000e5 +699 2 5 17 0.65536000000000000000e5 +699 3 1 14 -0.65536000000000000000e5 +699 3 2 15 -0.65536000000000000000e5 +699 3 6 11 -0.65536000000000000000e5 +700 2 5 18 0.65536000000000000000e5 +700 2 6 12 -0.65536000000000000000e5 +700 4 4 8 0.65536000000000000000e5 +701 1 1 32 0.32768000000000000000e5 +701 1 2 9 0.65536000000000000000e5 +701 1 2 33 0.32768000000000000000e5 +701 1 3 26 0.32768000000000000000e5 +701 1 3 34 0.65536000000000000000e5 +701 1 16 31 -0.13107200000000000000e6 +701 2 5 20 0.65536000000000000000e5 +701 2 11 17 0.32768000000000000000e5 +701 3 2 7 -0.65536000000000000000e5 +701 3 2 15 -0.65536000000000000000e5 +701 3 5 18 -0.65536000000000000000e5 +701 3 11 12 -0.32768000000000000000e5 +702 2 2 16 -0.32768000000000000000e5 +702 2 6 6 0.65536000000000000000e5 +702 4 2 6 -0.32768000000000000000e5 +703 2 3 9 -0.65536000000000000000e5 +703 2 6 7 0.65536000000000000000e5 +704 1 1 8 -0.16384000000000000000e5 +704 1 3 10 0.32768000000000000000e5 +704 1 4 11 0.32768000000000000000e5 +704 1 4 15 0.13107200000000000000e6 +704 1 5 20 0.16384000000000000000e5 +704 1 6 21 0.32768000000000000000e5 +704 1 7 14 -0.13107200000000000000e6 +704 1 9 12 -0.65536000000000000000e5 +704 2 1 15 -0.16384000000000000000e5 +704 2 2 16 0.32768000000000000000e5 +704 2 4 10 -0.65536000000000000000e5 +704 2 6 9 0.65536000000000000000e5 +704 2 6 12 0.16384000000000000000e5 +704 3 1 6 0.16384000000000000000e5 +704 3 3 8 0.32768000000000000000e5 +704 4 2 6 0.32768000000000000000e5 +705 1 1 8 -0.81920000000000000000e4 +705 1 5 20 0.81920000000000000000e4 +705 1 6 21 0.32768000000000000000e5 +705 1 7 22 0.16384000000000000000e5 +705 1 9 24 -0.32768000000000000000e5 +705 1 10 25 -0.13107200000000000000e6 +705 1 13 20 0.65536000000000000000e5 +705 1 14 21 0.13107200000000000000e6 +705 2 1 15 -0.81920000000000000000e4 +705 2 2 16 0.16384000000000000000e5 +705 2 6 10 0.65536000000000000000e5 +705 2 6 12 0.81920000000000000000e4 +705 2 9 15 -0.32768000000000000000e5 +705 2 10 12 0.32768000000000000000e5 +705 3 1 6 0.81920000000000000000e4 +705 4 6 6 -0.13107200000000000000e6 +706 2 1 15 -0.65536000000000000000e5 +706 2 6 11 0.65536000000000000000e5 +707 2 4 14 -0.65536000000000000000e5 +707 2 6 13 0.65536000000000000000e5 +708 2 2 16 -0.65536000000000000000e5 +708 2 6 14 0.65536000000000000000e5 +709 1 7 22 0.65536000000000000000e5 +709 1 8 23 -0.13107200000000000000e6 +709 1 11 26 0.65536000000000000000e5 +709 1 12 27 0.65536000000000000000e5 +709 2 6 15 0.65536000000000000000e5 +709 3 3 16 -0.65536000000000000000e5 +709 3 9 14 0.13107200000000000000e6 +709 4 5 9 -0.65536000000000000000e5 +710 2 6 16 0.65536000000000000000e5 +710 2 10 12 -0.65536000000000000000e5 +711 2 6 12 -0.65536000000000000000e5 +711 2 6 17 0.65536000000000000000e5 +711 4 4 8 0.65536000000000000000e5 +712 1 1 8 0.13107200000000000000e6 +712 1 2 33 -0.32768000000000000000e5 +712 1 3 26 0.32768000000000000000e5 +712 1 3 34 0.65536000000000000000e5 +712 1 4 35 -0.32768000000000000000e5 +712 1 5 28 0.32768000000000000000e5 +712 1 6 21 -0.26214400000000000000e6 +712 1 7 22 -0.13107200000000000000e6 +712 1 11 26 0.26214400000000000000e6 +712 2 1 15 0.13107200000000000000e6 +712 2 3 17 0.32768000000000000000e5 +712 2 4 18 0.32768000000000000000e5 +712 2 6 12 -0.13107200000000000000e6 +712 2 6 18 0.65536000000000000000e5 +712 2 12 18 -0.65536000000000000000e5 +712 3 1 6 -0.13107200000000000000e6 +712 3 2 15 0.13107200000000000000e6 +712 3 3 16 0.13107200000000000000e6 +712 3 4 17 0.32768000000000000000e5 +712 3 6 11 0.13107200000000000000e6 +712 3 13 18 -0.32768000000000000000e5 +712 4 4 8 0.13107200000000000000e6 +712 4 8 8 -0.65536000000000000000e5 +713 1 7 22 0.65536000000000000000e5 +713 1 8 23 -0.13107200000000000000e6 +713 1 11 26 0.65536000000000000000e5 +713 1 12 27 0.65536000000000000000e5 +713 2 6 19 0.65536000000000000000e5 +713 3 3 16 -0.65536000000000000000e5 +713 3 9 14 0.13107200000000000000e6 +714 1 1 8 0.16384000000000000000e5 +714 1 4 11 0.65536000000000000000e5 +714 1 4 15 -0.13107200000000000000e6 +714 1 5 12 0.32768000000000000000e5 +714 1 5 20 -0.16384000000000000000e5 +714 1 6 21 -0.32768000000000000000e5 +714 1 9 12 0.65536000000000000000e5 +714 1 11 26 0.65536000000000000000e5 +714 1 12 27 0.65536000000000000000e5 +714 2 1 15 0.16384000000000000000e5 +714 2 3 9 0.32768000000000000000e5 +714 2 4 10 0.65536000000000000000e5 +714 2 6 12 -0.16384000000000000000e5 +714 2 7 7 0.65536000000000000000e5 +714 3 1 6 -0.16384000000000000000e5 +714 3 3 8 0.32768000000000000000e5 +714 3 3 16 -0.65536000000000000000e5 +714 3 4 9 0.65536000000000000000e5 +714 3 9 14 0.13107200000000000000e6 +714 4 5 9 -0.65536000000000000000e5 +715 1 1 8 -0.16384000000000000000e5 +715 1 3 10 0.32768000000000000000e5 +715 1 4 11 0.32768000000000000000e5 +715 1 4 15 0.13107200000000000000e6 +715 1 5 20 0.16384000000000000000e5 +715 1 6 21 0.32768000000000000000e5 +715 1 7 14 -0.13107200000000000000e6 +715 1 9 12 -0.65536000000000000000e5 +715 2 1 15 -0.16384000000000000000e5 +715 2 2 16 0.32768000000000000000e5 +715 2 4 10 -0.65536000000000000000e5 +715 2 6 12 0.16384000000000000000e5 +715 2 7 8 0.65536000000000000000e5 +715 3 1 6 0.16384000000000000000e5 +715 3 3 8 0.32768000000000000000e5 +715 4 2 6 0.32768000000000000000e5 +716 2 4 10 -0.65536000000000000000e5 +716 2 7 9 0.65536000000000000000e5 +717 2 7 10 0.65536000000000000000e5 +717 2 9 9 -0.13107200000000000000e6 +718 2 6 12 -0.65536000000000000000e5 +718 2 7 11 0.65536000000000000000e5 +719 2 4 14 -0.65536000000000000000e5 +719 2 7 12 0.65536000000000000000e5 +720 1 7 22 0.65536000000000000000e5 +720 1 8 23 -0.13107200000000000000e6 +720 1 11 26 0.65536000000000000000e5 +720 1 12 27 0.65536000000000000000e5 +720 2 7 14 0.65536000000000000000e5 +720 3 3 16 -0.65536000000000000000e5 +720 3 9 14 0.13107200000000000000e6 +720 4 5 9 -0.65536000000000000000e5 +721 1 1 8 0.32768000000000000000e5 +721 1 5 20 -0.32768000000000000000e5 +721 1 6 21 -0.65536000000000000000e5 +721 1 7 22 0.65536000000000000000e5 +721 1 8 23 0.13107200000000000000e6 +721 1 9 24 0.13107200000000000000e6 +721 1 11 26 0.65536000000000000000e5 +721 1 12 19 0.65536000000000000000e5 +721 1 12 27 0.65536000000000000000e5 +721 1 14 21 -0.26214400000000000000e6 +721 2 1 15 0.32768000000000000000e5 +721 2 6 12 -0.32768000000000000000e5 +721 2 7 15 0.65536000000000000000e5 +721 2 9 15 0.13107200000000000000e6 +721 3 1 6 -0.32768000000000000000e5 +721 3 3 16 -0.65536000000000000000e5 +721 3 9 14 0.13107200000000000000e6 +721 4 5 9 -0.65536000000000000000e5 +722 2 7 16 0.65536000000000000000e5 +722 2 9 15 -0.65536000000000000000e5 +723 1 1 8 0.13107200000000000000e6 +723 1 2 33 -0.32768000000000000000e5 +723 1 3 26 0.32768000000000000000e5 +723 1 3 34 0.65536000000000000000e5 +723 1 4 35 -0.32768000000000000000e5 +723 1 5 28 0.32768000000000000000e5 +723 1 6 21 -0.26214400000000000000e6 +723 1 7 22 -0.13107200000000000000e6 +723 1 11 26 0.26214400000000000000e6 +723 2 1 15 0.13107200000000000000e6 +723 2 3 17 0.32768000000000000000e5 +723 2 4 18 0.32768000000000000000e5 +723 2 6 12 -0.13107200000000000000e6 +723 2 7 17 0.65536000000000000000e5 +723 2 12 18 -0.65536000000000000000e5 +723 3 1 6 -0.13107200000000000000e6 +723 3 2 15 0.13107200000000000000e6 +723 3 3 16 0.13107200000000000000e6 +723 3 4 17 0.32768000000000000000e5 +723 3 6 11 0.13107200000000000000e6 +723 3 13 18 -0.32768000000000000000e5 +723 4 4 8 0.13107200000000000000e6 +723 4 8 8 -0.65536000000000000000e5 +724 1 1 8 0.13107200000000000000e6 +724 1 2 9 -0.65536000000000000000e5 +724 1 2 33 -0.32768000000000000000e5 +724 1 3 26 0.32768000000000000000e5 +724 1 3 34 0.65536000000000000000e5 +724 1 4 35 -0.32768000000000000000e5 +724 1 5 28 0.32768000000000000000e5 +724 1 6 21 -0.26214400000000000000e6 +724 1 11 26 0.26214400000000000000e6 +724 1 12 27 -0.13107200000000000000e6 +724 1 19 22 0.65536000000000000000e5 +724 2 1 15 0.13107200000000000000e6 +724 2 3 17 0.32768000000000000000e5 +724 2 4 18 0.32768000000000000000e5 +724 2 6 12 -0.13107200000000000000e6 +724 2 7 18 0.65536000000000000000e5 +724 2 12 18 -0.65536000000000000000e5 +724 3 1 6 -0.13107200000000000000e6 +724 3 2 7 0.65536000000000000000e5 +724 3 2 15 0.19660800000000000000e6 +724 3 4 17 0.32768000000000000000e5 +724 3 6 11 0.13107200000000000000e6 +724 3 13 18 -0.32768000000000000000e5 +724 4 4 8 0.13107200000000000000e6 +724 4 8 8 -0.65536000000000000000e5 +725 2 7 19 0.65536000000000000000e5 +725 2 15 15 -0.13107200000000000000e6 +726 2 7 20 0.65536000000000000000e5 +726 2 13 19 -0.65536000000000000000e5 +727 1 6 13 0.32768000000000000000e5 +727 1 7 14 0.32768000000000000000e5 +727 1 10 13 -0.65536000000000000000e5 +727 1 13 20 0.32768000000000000000e5 +727 2 8 8 0.65536000000000000000e5 +727 3 5 10 0.32768000000000000000e5 +728 1 1 8 -0.81920000000000000000e4 +728 1 5 20 0.81920000000000000000e4 +728 1 6 21 0.32768000000000000000e5 +728 1 7 22 0.16384000000000000000e5 +728 1 9 24 -0.32768000000000000000e5 +728 1 10 25 -0.13107200000000000000e6 +728 1 13 20 0.65536000000000000000e5 +728 1 14 21 0.13107200000000000000e6 +728 2 1 15 -0.81920000000000000000e4 +728 2 2 16 0.16384000000000000000e5 +728 2 6 12 0.81920000000000000000e4 +728 2 8 9 0.65536000000000000000e5 +728 2 9 15 -0.32768000000000000000e5 +728 2 10 12 0.32768000000000000000e5 +728 3 1 6 0.81920000000000000000e4 +728 4 6 6 -0.13107200000000000000e6 +729 2 2 8 -0.65536000000000000000e5 +729 2 8 11 0.65536000000000000000e5 +729 4 4 4 0.13107200000000000000e6 +730 2 2 16 -0.65536000000000000000e5 +730 2 8 12 0.65536000000000000000e5 +731 1 7 22 0.65536000000000000000e5 +731 1 8 23 -0.13107200000000000000e6 +731 1 11 26 0.65536000000000000000e5 +731 1 12 27 0.65536000000000000000e5 +731 2 8 13 0.65536000000000000000e5 +731 3 3 16 -0.65536000000000000000e5 +731 3 9 14 0.13107200000000000000e6 +731 4 5 9 -0.65536000000000000000e5 +732 2 8 15 0.65536000000000000000e5 +732 2 10 12 -0.65536000000000000000e5 +733 1 1 8 -0.81920000000000000000e4 +733 1 5 20 0.81920000000000000000e4 +733 1 6 21 0.32768000000000000000e5 +733 1 7 22 0.16384000000000000000e5 +733 1 9 24 -0.32768000000000000000e5 +733 1 10 25 -0.13107200000000000000e6 +733 1 13 20 0.65536000000000000000e5 +733 1 14 21 0.13107200000000000000e6 +733 2 1 15 -0.81920000000000000000e4 +733 2 2 16 0.16384000000000000000e5 +733 2 6 12 0.81920000000000000000e4 +733 2 8 16 0.65536000000000000000e5 +733 2 9 15 -0.32768000000000000000e5 +733 2 10 12 0.32768000000000000000e5 +733 3 1 6 0.81920000000000000000e4 +734 2 5 19 -0.65536000000000000000e5 +734 2 8 17 0.65536000000000000000e5 +735 1 7 22 0.65536000000000000000e5 +735 1 8 23 -0.13107200000000000000e6 +735 1 11 26 0.65536000000000000000e5 +735 1 12 27 0.65536000000000000000e5 +735 2 8 18 0.65536000000000000000e5 +735 3 3 16 -0.65536000000000000000e5 +735 3 9 14 0.13107200000000000000e6 +736 2 8 19 0.65536000000000000000e5 +736 2 14 16 -0.65536000000000000000e5 +737 1 7 22 0.65536000000000000000e5 +737 1 8 23 -0.13107200000000000000e6 +737 1 11 26 0.65536000000000000000e5 +737 1 12 27 0.65536000000000000000e5 +737 2 8 20 0.65536000000000000000e5 +737 3 3 16 -0.65536000000000000000e5 +737 3 9 14 0.13107200000000000000e6 +737 4 6 10 0.65536000000000000000e5 +738 1 1 8 0.40960000000000000000e4 +738 1 4 15 0.32768000000000000000e5 +738 1 5 20 -0.40960000000000000000e4 +738 1 6 21 -0.16384000000000000000e5 +738 1 7 14 0.32768000000000000000e5 +738 1 7 22 -0.81920000000000000000e4 +738 1 8 15 0.65536000000000000000e5 +738 1 9 24 0.16384000000000000000e5 +738 1 10 25 0.65536000000000000000e5 +738 1 12 14 0.65536000000000000000e5 +738 1 13 14 -0.13107200000000000000e6 +738 1 14 21 -0.65536000000000000000e5 +738 2 1 15 0.40960000000000000000e4 +738 2 2 16 -0.81920000000000000000e4 +738 2 6 12 -0.40960000000000000000e4 +738 2 9 10 0.65536000000000000000e5 +738 2 9 15 0.16384000000000000000e5 +738 2 10 12 -0.16384000000000000000e5 +738 3 1 6 -0.40960000000000000000e4 +738 3 5 10 0.32768000000000000000e5 +738 4 6 6 0.65536000000000000000e5 +739 2 2 16 -0.65536000000000000000e5 +739 2 9 11 0.65536000000000000000e5 +740 1 7 22 0.65536000000000000000e5 +740 1 8 23 -0.13107200000000000000e6 +740 1 11 26 0.65536000000000000000e5 +740 1 12 27 0.65536000000000000000e5 +740 2 9 12 0.65536000000000000000e5 +740 3 3 16 -0.65536000000000000000e5 +740 3 9 14 0.13107200000000000000e6 +740 4 5 9 -0.65536000000000000000e5 +741 1 1 8 0.32768000000000000000e5 +741 1 5 20 -0.32768000000000000000e5 +741 1 6 21 -0.65536000000000000000e5 +741 1 7 22 0.65536000000000000000e5 +741 1 8 23 0.13107200000000000000e6 +741 1 9 24 0.13107200000000000000e6 +741 1 11 26 0.65536000000000000000e5 +741 1 12 19 0.65536000000000000000e5 +741 1 12 27 0.65536000000000000000e5 +741 1 14 21 -0.26214400000000000000e6 +741 2 1 15 0.32768000000000000000e5 +741 2 6 12 -0.32768000000000000000e5 +741 2 9 13 0.65536000000000000000e5 +741 2 9 15 0.13107200000000000000e6 +741 3 1 6 -0.32768000000000000000e5 +741 3 3 16 -0.65536000000000000000e5 +741 3 9 14 0.13107200000000000000e6 +741 4 5 9 -0.65536000000000000000e5 +742 2 9 14 0.65536000000000000000e5 +742 2 10 12 -0.65536000000000000000e5 +743 1 1 8 -0.81920000000000000000e4 +743 1 5 20 0.81920000000000000000e4 +743 1 6 21 0.32768000000000000000e5 +743 1 7 22 0.16384000000000000000e5 +743 1 8 15 -0.13107200000000000000e6 +743 1 9 24 -0.32768000000000000000e5 +743 1 9 25 0.65536000000000000000e5 +743 1 14 21 0.13107200000000000000e6 +743 2 1 15 -0.81920000000000000000e4 +743 2 2 16 0.16384000000000000000e5 +743 2 6 12 0.81920000000000000000e4 +743 2 9 15 -0.32768000000000000000e5 +743 2 9 16 0.65536000000000000000e5 +743 2 10 12 0.32768000000000000000e5 +743 3 1 6 0.81920000000000000000e4 +743 3 9 10 0.13107200000000000000e6 +744 1 7 22 0.65536000000000000000e5 +744 1 8 23 -0.13107200000000000000e6 +744 1 11 26 0.65536000000000000000e5 +744 1 12 27 0.65536000000000000000e5 +744 2 9 17 0.65536000000000000000e5 +744 3 3 16 -0.65536000000000000000e5 +744 3 9 14 0.13107200000000000000e6 +745 2 9 18 0.65536000000000000000e5 +745 2 15 15 -0.13107200000000000000e6 +746 2 9 20 0.65536000000000000000e5 +746 2 16 18 -0.65536000000000000000e5 +747 2 8 14 -0.65536000000000000000e5 +747 2 10 11 0.65536000000000000000e5 +748 2 9 15 -0.65536000000000000000e5 +748 2 10 13 0.65536000000000000000e5 +749 1 1 8 -0.81920000000000000000e4 +749 1 5 20 0.81920000000000000000e4 +749 1 6 21 0.32768000000000000000e5 +749 1 7 22 0.16384000000000000000e5 +749 1 9 24 -0.32768000000000000000e5 +749 1 10 25 -0.13107200000000000000e6 +749 1 13 20 0.65536000000000000000e5 +749 1 14 21 0.13107200000000000000e6 +749 2 1 15 -0.81920000000000000000e4 +749 2 2 16 0.16384000000000000000e5 +749 2 6 12 0.81920000000000000000e4 +749 2 9 15 -0.32768000000000000000e5 +749 2 10 12 0.32768000000000000000e5 +749 2 10 14 0.65536000000000000000e5 +749 3 1 6 0.81920000000000000000e4 +750 1 1 8 -0.81920000000000000000e4 +750 1 5 20 0.81920000000000000000e4 +750 1 6 21 0.32768000000000000000e5 +750 1 7 22 0.16384000000000000000e5 +750 1 8 15 -0.13107200000000000000e6 +750 1 9 24 -0.32768000000000000000e5 +750 1 9 25 0.65536000000000000000e5 +750 1 14 21 0.13107200000000000000e6 +750 2 1 15 -0.81920000000000000000e4 +750 2 2 16 0.16384000000000000000e5 +750 2 6 12 0.81920000000000000000e4 +750 2 9 15 -0.32768000000000000000e5 +750 2 10 12 0.32768000000000000000e5 +750 2 10 15 0.65536000000000000000e5 +750 3 1 6 0.81920000000000000000e4 +750 3 9 10 0.13107200000000000000e6 +751 2 10 17 0.65536000000000000000e5 +751 2 14 16 -0.65536000000000000000e5 +752 2 9 19 -0.65536000000000000000e5 +752 2 10 18 0.65536000000000000000e5 +753 2 10 19 0.65536000000000000000e5 +753 2 16 16 -0.13107200000000000000e6 +754 1 8 23 0.65536000000000000000e5 +754 1 11 26 -0.32768000000000000000e5 +754 1 12 27 -0.32768000000000000000e5 +754 1 14 29 -0.13107200000000000000e6 +754 1 16 31 0.32768000000000000000e5 +754 1 22 29 0.32768000000000000000e5 +754 1 23 30 0.65536000000000000000e5 +754 1 25 28 0.65536000000000000000e5 +754 2 10 20 0.65536000000000000000e5 +754 3 6 19 -0.32768000000000000000e5 +754 3 9 14 -0.65536000000000000000e5 +754 3 10 19 0.13107200000000000000e6 +754 4 6 10 -0.32768000000000000000e5 +755 2 11 12 0.65536000000000000000e5 +755 2 11 17 -0.65536000000000000000e5 +755 4 7 7 -0.13107200000000000000e6 +756 2 3 17 -0.65536000000000000000e5 +756 2 11 13 0.65536000000000000000e5 +757 1 6 21 0.13107200000000000000e6 +757 1 16 23 -0.13107200000000000000e6 +757 2 1 15 -0.65536000000000000000e5 +757 2 11 14 0.65536000000000000000e5 +757 3 1 14 -0.65536000000000000000e5 +757 3 2 15 -0.65536000000000000000e5 +757 3 6 11 -0.65536000000000000000e5 +758 2 6 12 -0.65536000000000000000e5 +758 2 11 15 0.65536000000000000000e5 +758 4 4 8 0.65536000000000000000e5 +759 2 5 19 -0.65536000000000000000e5 +759 2 11 16 0.65536000000000000000e5 +760 1 2 9 -0.13107200000000000000e6 +760 1 3 26 0.65536000000000000000e5 +760 1 3 34 0.13107200000000000000e6 +760 1 4 35 -0.65536000000000000000e5 +760 2 11 18 0.65536000000000000000e5 +760 2 12 18 -0.65536000000000000000e5 +760 3 2 7 0.13107200000000000000e6 +760 3 2 15 0.13107200000000000000e6 +760 3 5 18 0.13107200000000000000e6 +760 3 11 12 -0.65536000000000000000e5 +760 3 13 18 -0.65536000000000000000e5 +761 1 1 32 0.32768000000000000000e5 +761 1 2 9 0.65536000000000000000e5 +761 1 2 33 0.32768000000000000000e5 +761 1 3 26 0.32768000000000000000e5 +761 1 3 34 0.65536000000000000000e5 +761 1 16 31 -0.13107200000000000000e6 +761 2 11 17 0.32768000000000000000e5 +761 2 11 19 0.65536000000000000000e5 +761 3 2 7 -0.65536000000000000000e5 +761 3 2 15 -0.65536000000000000000e5 +761 3 5 18 -0.65536000000000000000e5 +761 3 11 12 -0.32768000000000000000e5 +762 2 11 20 0.65536000000000000000e5 +762 2 17 17 -0.13107200000000000000e6 +763 2 3 17 -0.32768000000000000000e5 +763 2 12 12 0.65536000000000000000e5 +764 2 12 13 0.65536000000000000000e5 +764 2 12 18 -0.65536000000000000000e5 +764 4 8 8 -0.13107200000000000000e6 +765 2 6 12 -0.65536000000000000000e5 +765 2 12 14 0.65536000000000000000e5 +765 4 4 8 0.65536000000000000000e5 +766 1 1 8 0.13107200000000000000e6 +766 1 2 33 -0.32768000000000000000e5 +766 1 3 26 0.32768000000000000000e5 +766 1 3 34 0.65536000000000000000e5 +766 1 4 35 -0.32768000000000000000e5 +766 1 5 28 0.32768000000000000000e5 +766 1 6 21 -0.26214400000000000000e6 +766 1 7 22 -0.13107200000000000000e6 +766 1 11 26 0.26214400000000000000e6 +766 2 1 15 0.13107200000000000000e6 +766 2 3 17 0.32768000000000000000e5 +766 2 4 18 0.32768000000000000000e5 +766 2 6 12 -0.13107200000000000000e6 +766 2 12 15 0.65536000000000000000e5 +766 2 12 18 -0.65536000000000000000e5 +766 3 1 6 -0.13107200000000000000e6 +766 3 2 15 0.13107200000000000000e6 +766 3 3 16 0.13107200000000000000e6 +766 3 4 17 0.32768000000000000000e5 +766 3 6 11 0.13107200000000000000e6 +766 3 13 18 -0.32768000000000000000e5 +766 4 4 8 0.13107200000000000000e6 +766 4 8 8 -0.65536000000000000000e5 +767 1 7 22 0.65536000000000000000e5 +767 1 8 23 -0.13107200000000000000e6 +767 1 11 26 0.65536000000000000000e5 +767 1 12 27 0.65536000000000000000e5 +767 2 12 16 0.65536000000000000000e5 +767 3 3 16 -0.65536000000000000000e5 +767 3 9 14 0.13107200000000000000e6 +768 1 2 9 -0.13107200000000000000e6 +768 1 3 26 0.65536000000000000000e5 +768 1 3 34 0.13107200000000000000e6 +768 1 4 35 -0.65536000000000000000e5 +768 2 12 17 0.65536000000000000000e5 +768 2 12 18 -0.65536000000000000000e5 +768 3 2 7 0.13107200000000000000e6 +768 3 2 15 0.13107200000000000000e6 +768 3 5 18 0.13107200000000000000e6 +768 3 11 12 -0.65536000000000000000e5 +768 3 13 18 -0.65536000000000000000e5 +769 2 6 20 -0.65536000000000000000e5 +769 2 12 19 0.65536000000000000000e5 +770 1 2 9 -0.13107200000000000000e6 +770 1 3 34 -0.13107200000000000000e6 +770 1 4 35 0.65536000000000000000e5 +770 1 17 32 0.65536000000000000000e5 +770 1 26 29 0.13107200000000000000e6 +770 1 26 33 0.65536000000000000000e5 +770 2 6 20 -0.13107200000000000000e6 +770 2 12 20 0.65536000000000000000e5 +770 2 14 20 0.13107200000000000000e6 +770 3 2 7 0.13107200000000000000e6 +770 3 2 15 0.13107200000000000000e6 +770 3 5 18 0.13107200000000000000e6 +770 3 7 20 -0.13107200000000000000e6 +770 3 14 19 0.26214400000000000000e6 +770 3 17 18 0.65536000000000000000e5 +771 2 4 18 -0.32768000000000000000e5 +771 2 13 13 0.65536000000000000000e5 +772 1 1 8 0.13107200000000000000e6 +772 1 2 33 -0.32768000000000000000e5 +772 1 3 26 0.32768000000000000000e5 +772 1 3 34 0.65536000000000000000e5 +772 1 4 35 -0.32768000000000000000e5 +772 1 5 28 0.32768000000000000000e5 +772 1 6 21 -0.26214400000000000000e6 +772 1 7 22 -0.13107200000000000000e6 +772 1 11 26 0.26214400000000000000e6 +772 2 1 15 0.13107200000000000000e6 +772 2 3 17 0.32768000000000000000e5 +772 2 4 18 0.32768000000000000000e5 +772 2 6 12 -0.13107200000000000000e6 +772 2 12 18 -0.65536000000000000000e5 +772 2 13 14 0.65536000000000000000e5 +772 3 1 6 -0.13107200000000000000e6 +772 3 2 15 0.13107200000000000000e6 +772 3 3 16 0.13107200000000000000e6 +772 3 4 17 0.32768000000000000000e5 +772 3 6 11 0.13107200000000000000e6 +772 3 13 18 -0.32768000000000000000e5 +772 4 4 8 0.13107200000000000000e6 +772 4 8 8 -0.65536000000000000000e5 +773 1 1 8 0.13107200000000000000e6 +773 1 2 9 -0.65536000000000000000e5 +773 1 2 33 -0.32768000000000000000e5 +773 1 3 26 0.32768000000000000000e5 +773 1 3 34 0.65536000000000000000e5 +773 1 4 35 -0.32768000000000000000e5 +773 1 5 28 0.32768000000000000000e5 +773 1 6 21 -0.26214400000000000000e6 +773 1 11 26 0.26214400000000000000e6 +773 1 12 27 -0.13107200000000000000e6 +773 1 19 22 0.65536000000000000000e5 +773 2 1 15 0.13107200000000000000e6 +773 2 3 17 0.32768000000000000000e5 +773 2 4 18 0.32768000000000000000e5 +773 2 6 12 -0.13107200000000000000e6 +773 2 12 18 -0.65536000000000000000e5 +773 2 13 15 0.65536000000000000000e5 +773 3 1 6 -0.13107200000000000000e6 +773 3 2 7 0.65536000000000000000e5 +773 3 2 15 0.19660800000000000000e6 +773 3 4 17 0.32768000000000000000e5 +773 3 6 11 0.13107200000000000000e6 +773 3 13 18 -0.32768000000000000000e5 +773 4 4 8 0.13107200000000000000e6 +773 4 8 8 -0.65536000000000000000e5 +774 2 13 16 0.65536000000000000000e5 +774 2 15 15 -0.13107200000000000000e6 +775 2 12 18 -0.65536000000000000000e5 +775 2 13 17 0.65536000000000000000e5 +776 2 4 20 -0.65536000000000000000e5 +776 2 13 18 0.65536000000000000000e5 +777 2 13 20 0.65536000000000000000e5 +777 2 18 18 -0.13107200000000000000e6 +778 2 5 19 -0.32768000000000000000e5 +778 2 14 14 0.65536000000000000000e5 +779 1 7 22 0.65536000000000000000e5 +779 1 8 23 -0.13107200000000000000e6 +779 1 11 26 0.65536000000000000000e5 +779 1 12 27 0.65536000000000000000e5 +779 2 14 15 0.65536000000000000000e5 +779 3 3 16 -0.65536000000000000000e5 +779 3 9 14 0.13107200000000000000e6 +780 1 1 32 0.32768000000000000000e5 +780 1 2 9 0.65536000000000000000e5 +780 1 2 33 0.32768000000000000000e5 +780 1 3 26 0.32768000000000000000e5 +780 1 3 34 0.65536000000000000000e5 +780 1 16 31 -0.13107200000000000000e6 +780 2 11 17 0.32768000000000000000e5 +780 2 14 17 0.65536000000000000000e5 +780 3 2 7 -0.65536000000000000000e5 +780 3 2 15 -0.65536000000000000000e5 +780 3 5 18 -0.65536000000000000000e5 +780 3 11 12 -0.32768000000000000000e5 +781 2 6 20 -0.65536000000000000000e5 +781 2 14 18 0.65536000000000000000e5 +782 1 7 22 0.65536000000000000000e5 +782 1 8 23 -0.13107200000000000000e6 +782 1 11 26 0.65536000000000000000e5 +782 1 12 27 0.65536000000000000000e5 +782 2 14 19 0.65536000000000000000e5 +782 3 3 16 -0.65536000000000000000e5 +782 3 9 14 0.13107200000000000000e6 +782 4 6 10 0.65536000000000000000e5 +783 2 9 19 -0.65536000000000000000e5 +783 2 15 16 0.65536000000000000000e5 +784 2 6 20 -0.65536000000000000000e5 +784 2 15 17 0.65536000000000000000e5 +785 2 13 19 -0.65536000000000000000e5 +785 2 15 18 0.65536000000000000000e5 +786 2 15 19 0.65536000000000000000e5 +786 2 16 18 -0.65536000000000000000e5 +787 1 7 22 0.13107200000000000000e6 +787 1 19 34 0.65536000000000000000e5 +787 1 26 29 -0.65536000000000000000e5 +787 1 29 30 -0.13107200000000000000e6 +787 2 14 20 -0.65536000000000000000e5 +787 2 15 20 0.65536000000000000000e5 +787 3 3 16 -0.13107200000000000000e6 +787 3 6 19 -0.13107200000000000000e6 +787 3 14 19 -0.13107200000000000000e6 +788 1 7 22 0.65536000000000000000e5 +788 1 8 23 -0.13107200000000000000e6 +788 1 11 26 0.65536000000000000000e5 +788 1 12 27 0.65536000000000000000e5 +788 2 16 17 0.65536000000000000000e5 +788 3 3 16 -0.65536000000000000000e5 +788 3 9 14 0.13107200000000000000e6 +788 4 6 10 0.65536000000000000000e5 +789 1 8 23 0.65536000000000000000e5 +789 1 11 26 -0.32768000000000000000e5 +789 1 12 27 -0.32768000000000000000e5 +789 1 14 29 -0.13107200000000000000e6 +789 1 16 31 0.32768000000000000000e5 +789 1 22 29 0.32768000000000000000e5 +789 1 23 30 0.65536000000000000000e5 +789 1 25 28 0.65536000000000000000e5 +789 2 16 19 0.65536000000000000000e5 +789 3 6 19 -0.32768000000000000000e5 +789 3 9 14 -0.65536000000000000000e5 +789 3 10 19 0.13107200000000000000e6 +789 4 6 10 -0.32768000000000000000e5 +790 1 7 22 0.65536000000000000000e5 +790 1 12 35 0.65536000000000000000e5 +790 1 25 32 -0.13107200000000000000e6 +790 1 29 30 0.65536000000000000000e5 +790 2 16 20 0.65536000000000000000e5 +790 3 3 16 -0.65536000000000000000e5 +790 3 6 19 -0.65536000000000000000e5 +790 3 14 19 -0.65536000000000000000e5 +791 1 2 9 -0.13107200000000000000e6 +791 1 3 34 -0.13107200000000000000e6 +791 1 4 35 0.65536000000000000000e5 +791 1 17 32 0.65536000000000000000e5 +791 1 26 29 0.13107200000000000000e6 +791 1 26 33 0.65536000000000000000e5 +791 2 6 20 -0.13107200000000000000e6 +791 2 14 20 0.13107200000000000000e6 +791 2 17 18 0.65536000000000000000e5 +791 3 2 7 0.13107200000000000000e6 +791 3 2 15 0.13107200000000000000e6 +791 3 5 18 0.13107200000000000000e6 +791 3 7 20 -0.13107200000000000000e6 +791 3 14 19 0.26214400000000000000e6 +791 3 17 18 0.65536000000000000000e5 +792 2 14 20 -0.65536000000000000000e5 +792 2 17 19 0.65536000000000000000e5 +793 1 2 9 -0.13107200000000000000e6 +793 1 3 34 -0.13107200000000000000e6 +793 1 4 35 0.65536000000000000000e5 +793 1 17 32 0.65536000000000000000e5 +793 1 26 29 0.13107200000000000000e6 +793 1 26 33 0.65536000000000000000e5 +793 2 6 20 -0.13107200000000000000e6 +793 2 14 20 0.13107200000000000000e6 +793 2 17 20 0.65536000000000000000e5 +793 3 2 7 0.13107200000000000000e6 +793 3 2 15 0.13107200000000000000e6 +793 3 5 18 0.13107200000000000000e6 +793 3 7 20 -0.13107200000000000000e6 +793 3 14 19 0.26214400000000000000e6 +793 3 17 18 0.65536000000000000000e5 +793 4 10 10 0.13107200000000000000e6 +794 1 7 22 0.13107200000000000000e6 +794 1 19 34 0.65536000000000000000e5 +794 1 26 29 -0.65536000000000000000e5 +794 1 29 30 -0.13107200000000000000e6 +794 2 14 20 -0.65536000000000000000e5 +794 2 18 19 0.65536000000000000000e5 +794 3 3 16 -0.13107200000000000000e6 +794 3 6 19 -0.13107200000000000000e6 +794 3 14 19 -0.13107200000000000000e6 +795 1 7 22 0.32768000000000000000e5 +795 1 12 35 0.32768000000000000000e5 +795 1 25 32 -0.65536000000000000000e5 +795 1 29 30 0.32768000000000000000e5 +795 2 19 19 0.65536000000000000000e5 +795 3 3 16 -0.32768000000000000000e5 +795 3 6 19 -0.32768000000000000000e5 +795 3 14 19 -0.32768000000000000000e5 +796 1 2 9 -0.65536000000000000000e5 +796 1 3 34 -0.65536000000000000000e5 +796 1 7 22 0.13107200000000000000e6 +796 1 20 35 0.65536000000000000000e5 +796 1 30 33 0.65536000000000000000e5 +796 1 31 32 -0.13107200000000000000e6 +796 2 6 20 -0.65536000000000000000e5 +796 2 19 20 0.65536000000000000000e5 +796 3 2 7 0.65536000000000000000e5 +796 3 2 15 0.65536000000000000000e5 +796 3 3 16 -0.13107200000000000000e6 +796 3 5 18 0.65536000000000000000e5 +796 3 6 19 -0.13107200000000000000e6 +796 3 7 20 -0.65536000000000000000e5 +796 3 15 20 -0.65536000000000000000e5 +797 1 1 2 -0.32768000000000000000e5 +797 1 1 16 0.32768000000000000000e5 +797 3 1 1 0.65536000000000000000e5 +798 1 2 5 0.65536000000000000000e5 +798 1 3 10 -0.26214400000000000000e6 +798 1 3 18 -0.65536000000000000000e5 +798 1 6 21 0.26214400000000000000e6 +798 2 1 7 0.13107200000000000000e6 +798 2 1 15 -0.13107200000000000000e6 +798 3 1 3 0.65536000000000000000e5 +798 3 1 6 0.13107200000000000000e6 +798 3 2 3 0.65536000000000000000e5 +798 3 2 7 0.13107200000000000000e6 +798 4 2 2 0.13107200000000000000e6 +799 3 1 4 0.65536000000000000000e5 +799 3 2 3 -0.65536000000000000000e5 +800 1 1 2 -0.32768000000000000000e5 +800 1 1 16 0.32768000000000000000e5 +800 1 2 5 0.32768000000000000000e5 +800 1 3 10 -0.13107200000000000000e6 +800 1 3 18 -0.32768000000000000000e5 +800 1 6 21 0.13107200000000000000e6 +800 2 1 7 0.65536000000000000000e5 +800 2 1 15 -0.65536000000000000000e5 +800 3 1 2 -0.32768000000000000000e5 +800 3 1 5 0.65536000000000000000e5 +800 3 1 6 0.65536000000000000000e5 +800 3 2 3 0.32768000000000000000e5 +800 3 2 7 0.65536000000000000000e5 +800 4 1 1 -0.65536000000000000000e5 +800 4 2 2 0.65536000000000000000e5 +801 1 3 10 -0.13107200000000000000e6 +801 1 6 21 0.13107200000000000000e6 +801 2 1 7 0.65536000000000000000e5 +801 2 1 15 -0.65536000000000000000e5 +801 3 1 6 0.65536000000000000000e5 +801 3 1 7 0.65536000000000000000e5 +801 3 2 7 0.65536000000000000000e5 +802 1 3 10 0.13107200000000000000e6 +802 1 4 11 0.13107200000000000000e6 +802 1 6 21 -0.13107200000000000000e6 +802 1 7 22 -0.65536000000000000000e5 +802 1 8 23 -0.13107200000000000000e6 +802 1 11 26 0.65536000000000000000e5 +802 1 12 27 0.65536000000000000000e5 +802 2 3 9 0.65536000000000000000e5 +802 2 6 8 0.13107200000000000000e6 +802 2 8 14 -0.13107200000000000000e6 +802 3 1 8 0.65536000000000000000e5 +802 3 3 8 0.19660800000000000000e6 +802 3 3 16 -0.65536000000000000000e5 +802 3 4 9 0.65536000000000000000e5 +802 3 5 10 -0.26214400000000000000e6 +802 3 9 14 0.13107200000000000000e6 +802 4 2 6 0.65536000000000000000e5 +802 4 4 4 0.13107200000000000000e6 +802 4 5 9 -0.65536000000000000000e5 +803 1 3 10 -0.65536000000000000000e5 +803 1 6 21 0.65536000000000000000e5 +803 3 1 9 0.65536000000000000000e5 +804 1 3 10 0.32768000000000000000e5 +804 1 4 11 0.65536000000000000000e5 +804 1 6 21 -0.32768000000000000000e5 +804 1 7 22 -0.32768000000000000000e5 +804 1 8 23 -0.65536000000000000000e5 +804 1 11 26 0.32768000000000000000e5 +804 1 12 27 0.32768000000000000000e5 +804 2 3 9 0.32768000000000000000e5 +804 2 6 8 0.65536000000000000000e5 +804 2 8 14 -0.65536000000000000000e5 +804 3 1 10 0.65536000000000000000e5 +804 3 3 8 0.65536000000000000000e5 +804 3 3 16 -0.32768000000000000000e5 +804 3 4 9 0.32768000000000000000e5 +804 3 5 10 -0.13107200000000000000e6 +804 3 9 14 0.65536000000000000000e5 +804 4 2 6 0.32768000000000000000e5 +804 4 5 9 -0.32768000000000000000e5 +805 1 2 5 -0.65536000000000000000e5 +805 1 2 9 0.13107200000000000000e6 +805 1 2 33 0.65536000000000000000e5 +805 1 3 10 0.26214400000000000000e6 +805 1 3 26 -0.65536000000000000000e5 +805 1 3 34 -0.13107200000000000000e6 +805 1 4 35 0.65536000000000000000e5 +805 1 6 21 -0.26214400000000000000e6 +805 2 1 3 0.65536000000000000000e5 +805 2 1 7 -0.13107200000000000000e6 +805 2 1 15 0.13107200000000000000e6 +805 2 2 12 -0.65536000000000000000e5 +805 2 3 17 -0.65536000000000000000e5 +805 2 11 11 -0.13107200000000000000e6 +805 2 11 17 0.65536000000000000000e5 +805 2 12 18 0.65536000000000000000e5 +805 3 1 2 0.65536000000000000000e5 +805 3 1 6 -0.26214400000000000000e6 +805 3 1 11 0.65536000000000000000e5 +805 3 1 14 -0.13107200000000000000e6 +805 3 2 7 -0.26214400000000000000e6 +805 3 2 15 -0.13107200000000000000e6 +805 3 4 17 -0.65536000000000000000e5 +805 3 6 11 0.13107200000000000000e6 +805 3 13 18 0.65536000000000000000e5 +805 4 2 2 -0.13107200000000000000e6 +805 4 7 7 0.13107200000000000000e6 +806 1 1 8 -0.13107200000000000000e6 +806 1 2 9 -0.26214400000000000000e6 +806 1 2 17 -0.65536000000000000000e5 +806 1 2 33 -0.65536000000000000000e5 +806 1 3 34 0.13107200000000000000e6 +806 1 4 35 -0.65536000000000000000e5 +806 1 6 21 0.26214400000000000000e6 +806 2 1 15 -0.13107200000000000000e6 +806 2 3 17 0.65536000000000000000e5 +806 2 11 17 -0.65536000000000000000e5 +806 2 12 18 -0.65536000000000000000e5 +806 3 1 6 0.13107200000000000000e6 +806 3 1 12 0.65536000000000000000e5 +806 3 2 7 0.26214400000000000000e6 +806 3 2 15 0.13107200000000000000e6 +806 3 4 17 0.65536000000000000000e5 +806 3 6 11 -0.13107200000000000000e6 +806 3 13 18 -0.65536000000000000000e5 +806 4 7 7 -0.13107200000000000000e6 +807 1 1 8 0.13107200000000000000e6 +807 1 2 9 0.13107200000000000000e6 +807 1 2 17 0.65536000000000000000e5 +807 1 3 18 0.65536000000000000000e5 +807 1 3 26 0.65536000000000000000e5 +807 1 6 21 -0.26214400000000000000e6 +807 2 1 15 0.13107200000000000000e6 +807 2 2 12 0.65536000000000000000e5 +807 3 1 6 -0.13107200000000000000e6 +807 3 1 13 0.65536000000000000000e5 +807 3 2 7 -0.13107200000000000000e6 +808 3 1 15 0.65536000000000000000e5 +808 3 6 11 -0.65536000000000000000e5 +809 1 6 21 -0.65536000000000000000e5 +809 1 16 23 0.65536000000000000000e5 +809 3 1 16 0.65536000000000000000e5 +810 1 1 8 0.13107200000000000000e6 +810 1 1 32 0.65536000000000000000e5 +810 1 2 9 0.26214400000000000000e6 +810 1 2 33 0.65536000000000000000e5 +810 1 3 34 -0.13107200000000000000e6 +810 1 4 35 0.65536000000000000000e5 +810 1 6 21 -0.26214400000000000000e6 +810 2 1 15 0.13107200000000000000e6 +810 2 3 17 -0.65536000000000000000e5 +810 2 11 17 0.65536000000000000000e5 +810 2 12 18 0.65536000000000000000e5 +810 3 1 6 -0.13107200000000000000e6 +810 3 1 17 0.65536000000000000000e5 +810 3 2 7 -0.26214400000000000000e6 +810 3 2 15 -0.13107200000000000000e6 +810 3 4 17 -0.65536000000000000000e5 +810 3 6 11 0.13107200000000000000e6 +810 3 13 18 0.65536000000000000000e5 +810 4 7 7 0.13107200000000000000e6 +811 3 1 18 0.65536000000000000000e5 +811 3 11 12 -0.65536000000000000000e5 +812 1 1 8 0.65536000000000000000e5 +812 1 1 32 0.32768000000000000000e5 +812 1 2 9 0.65536000000000000000e5 +812 1 2 33 0.32768000000000000000e5 +812 1 3 26 0.32768000000000000000e5 +812 1 6 21 -0.13107200000000000000e6 +812 2 1 15 0.65536000000000000000e5 +812 2 11 17 0.32768000000000000000e5 +812 3 1 6 -0.65536000000000000000e5 +812 3 1 19 0.65536000000000000000e5 +812 3 2 7 -0.65536000000000000000e5 +812 3 6 11 0.65536000000000000000e5 +812 3 11 12 -0.32768000000000000000e5 +813 1 3 26 -0.65536000000000000000e5 +813 1 17 32 -0.65536000000000000000e5 +813 1 26 29 0.13107200000000000000e6 +813 1 26 33 -0.65536000000000000000e5 +813 2 17 17 -0.13107200000000000000e6 +813 3 1 20 0.65536000000000000000e5 +813 3 11 12 0.65536000000000000000e5 +813 3 17 18 -0.65536000000000000000e5 +814 1 2 5 0.32768000000000000000e5 +814 1 3 10 -0.13107200000000000000e6 +814 1 3 18 -0.32768000000000000000e5 +814 1 6 21 0.13107200000000000000e6 +814 2 1 7 0.65536000000000000000e5 +814 2 1 15 -0.65536000000000000000e5 +814 3 1 6 0.65536000000000000000e5 +814 3 2 2 0.65536000000000000000e5 +814 3 2 3 0.32768000000000000000e5 +814 3 2 7 0.65536000000000000000e5 +814 4 2 2 0.65536000000000000000e5 +815 1 2 5 -0.65536000000000000000e5 +815 1 3 18 0.65536000000000000000e5 +815 3 2 4 0.65536000000000000000e5 +816 3 1 6 -0.65536000000000000000e5 +816 3 2 5 0.65536000000000000000e5 +817 1 3 10 -0.13107200000000000000e6 +817 1 6 21 0.13107200000000000000e6 +817 2 1 7 0.65536000000000000000e5 +817 2 1 15 -0.65536000000000000000e5 +817 3 1 6 0.65536000000000000000e5 +817 3 2 6 0.65536000000000000000e5 +817 3 2 7 0.65536000000000000000e5 +818 1 3 10 -0.65536000000000000000e5 +818 1 6 21 0.65536000000000000000e5 +818 3 2 8 0.65536000000000000000e5 +819 3 2 9 0.65536000000000000000e5 +819 3 3 8 -0.65536000000000000000e5 +820 1 3 10 -0.32768000000000000000e5 +820 1 4 11 -0.32768000000000000000e5 +820 1 6 21 0.32768000000000000000e5 +820 1 7 22 0.32768000000000000000e5 +820 3 2 10 0.65536000000000000000e5 +820 3 3 8 -0.32768000000000000000e5 +820 4 2 6 -0.32768000000000000000e5 +821 1 1 8 -0.13107200000000000000e6 +821 1 2 9 -0.26214400000000000000e6 +821 1 2 17 -0.65536000000000000000e5 +821 1 2 33 -0.65536000000000000000e5 +821 1 3 34 0.13107200000000000000e6 +821 1 4 35 -0.65536000000000000000e5 +821 1 6 21 0.26214400000000000000e6 +821 2 1 15 -0.13107200000000000000e6 +821 2 3 17 0.65536000000000000000e5 +821 2 11 17 -0.65536000000000000000e5 +821 2 12 18 -0.65536000000000000000e5 +821 3 1 6 0.13107200000000000000e6 +821 3 2 7 0.26214400000000000000e6 +821 3 2 11 0.65536000000000000000e5 +821 3 2 15 0.13107200000000000000e6 +821 3 4 17 0.65536000000000000000e5 +821 3 6 11 -0.13107200000000000000e6 +821 3 13 18 -0.65536000000000000000e5 +821 4 7 7 -0.13107200000000000000e6 +822 1 1 8 0.13107200000000000000e6 +822 1 2 9 0.13107200000000000000e6 +822 1 2 17 0.65536000000000000000e5 +822 1 3 18 0.65536000000000000000e5 +822 1 3 26 0.65536000000000000000e5 +822 1 6 21 -0.26214400000000000000e6 +822 2 1 15 0.13107200000000000000e6 +822 2 2 12 0.65536000000000000000e5 +822 3 1 6 -0.13107200000000000000e6 +822 3 2 7 -0.13107200000000000000e6 +822 3 2 12 0.65536000000000000000e5 +823 1 2 9 0.13107200000000000000e6 +823 1 2 33 0.65536000000000000000e5 +823 1 3 18 -0.65536000000000000000e5 +823 1 3 26 -0.65536000000000000000e5 +823 1 3 34 -0.13107200000000000000e6 +823 1 4 35 0.65536000000000000000e5 +823 2 3 17 -0.65536000000000000000e5 +823 2 12 18 0.65536000000000000000e5 +823 3 2 7 -0.13107200000000000000e6 +823 3 2 13 0.65536000000000000000e5 +823 3 2 15 -0.13107200000000000000e6 +823 3 4 17 -0.65536000000000000000e5 +823 3 13 18 0.65536000000000000000e5 +824 3 2 14 0.65536000000000000000e5 +824 3 6 11 -0.65536000000000000000e5 +825 1 1 8 0.32768000000000000000e5 +825 1 5 20 -0.32768000000000000000e5 +825 1 6 21 -0.65536000000000000000e5 +825 1 11 26 0.65536000000000000000e5 +825 2 1 15 0.32768000000000000000e5 +825 2 6 12 -0.32768000000000000000e5 +825 3 1 6 -0.32768000000000000000e5 +825 3 2 16 0.65536000000000000000e5 +826 3 2 17 0.65536000000000000000e5 +826 3 11 12 -0.65536000000000000000e5 +827 1 2 9 -0.13107200000000000000e6 +827 1 3 26 0.65536000000000000000e5 +827 1 3 34 0.13107200000000000000e6 +827 1 4 35 -0.65536000000000000000e5 +827 2 3 17 0.65536000000000000000e5 +827 2 12 18 -0.65536000000000000000e5 +827 3 2 7 0.13107200000000000000e6 +827 3 2 15 0.13107200000000000000e6 +827 3 2 18 0.65536000000000000000e5 +827 3 4 17 0.65536000000000000000e5 +827 3 13 18 -0.65536000000000000000e5 +828 3 2 19 0.65536000000000000000e5 +828 3 5 18 -0.65536000000000000000e5 +829 1 2 33 -0.65536000000000000000e5 +829 1 17 32 0.65536000000000000000e5 +829 3 2 20 0.65536000000000000000e5 +830 1 2 5 -0.32768000000000000000e5 +830 1 3 18 0.32768000000000000000e5 +830 3 3 3 0.65536000000000000000e5 +831 1 2 5 0.65536000000000000000e5 +831 1 3 18 -0.65536000000000000000e5 +831 2 2 4 0.65536000000000000000e5 +831 2 3 17 -0.65536000000000000000e5 +831 3 2 3 0.65536000000000000000e5 +831 3 2 7 -0.13107200000000000000e6 +831 3 3 4 0.65536000000000000000e5 +831 4 3 7 -0.65536000000000000000e5 +832 1 3 10 -0.13107200000000000000e6 +832 1 6 21 0.13107200000000000000e6 +832 2 1 7 0.65536000000000000000e5 +832 2 1 15 -0.65536000000000000000e5 +832 3 1 6 0.65536000000000000000e5 +832 3 2 7 0.65536000000000000000e5 +832 3 3 5 0.65536000000000000000e5 +833 3 2 7 -0.65536000000000000000e5 +833 3 3 6 0.65536000000000000000e5 +834 1 2 9 0.65536000000000000000e5 +834 1 4 11 -0.13107200000000000000e6 +834 1 5 8 0.65536000000000000000e5 +834 1 5 20 0.65536000000000000000e5 +834 2 4 6 0.65536000000000000000e5 +834 3 3 7 0.65536000000000000000e5 +835 1 4 11 -0.65536000000000000000e5 +835 1 7 22 0.65536000000000000000e5 +835 3 3 9 0.65536000000000000000e5 +836 1 4 11 -0.32768000000000000000e5 +836 1 8 23 0.65536000000000000000e5 +836 1 11 26 -0.32768000000000000000e5 +836 1 12 27 -0.32768000000000000000e5 +836 2 3 9 -0.32768000000000000000e5 +836 3 3 8 -0.32768000000000000000e5 +836 3 3 10 0.65536000000000000000e5 +836 3 3 16 0.32768000000000000000e5 +836 3 4 9 -0.32768000000000000000e5 +836 3 9 14 -0.65536000000000000000e5 +836 4 5 9 0.32768000000000000000e5 +837 1 1 8 0.13107200000000000000e6 +837 1 2 9 0.13107200000000000000e6 +837 1 2 17 0.65536000000000000000e5 +837 1 3 18 0.65536000000000000000e5 +837 1 3 26 0.65536000000000000000e5 +837 1 6 21 -0.26214400000000000000e6 +837 2 1 15 0.13107200000000000000e6 +837 2 2 12 0.65536000000000000000e5 +837 3 1 6 -0.13107200000000000000e6 +837 3 2 7 -0.13107200000000000000e6 +837 3 3 11 0.65536000000000000000e5 +838 1 2 9 0.13107200000000000000e6 +838 1 2 33 0.65536000000000000000e5 +838 1 3 18 -0.65536000000000000000e5 +838 1 3 26 -0.65536000000000000000e5 +838 1 3 34 -0.13107200000000000000e6 +838 1 4 35 0.65536000000000000000e5 +838 2 3 17 -0.65536000000000000000e5 +838 2 12 18 0.65536000000000000000e5 +838 3 2 7 -0.13107200000000000000e6 +838 3 2 15 -0.13107200000000000000e6 +838 3 3 12 0.65536000000000000000e5 +838 3 4 17 -0.65536000000000000000e5 +838 3 13 18 0.65536000000000000000e5 +839 1 1 8 -0.13107200000000000000e6 +839 1 2 9 -0.26214400000000000000e6 +839 1 2 17 -0.65536000000000000000e5 +839 1 2 33 -0.65536000000000000000e5 +839 1 3 34 0.13107200000000000000e6 +839 1 4 35 -0.65536000000000000000e5 +839 1 6 21 0.26214400000000000000e6 +839 2 1 15 -0.13107200000000000000e6 +839 2 2 12 -0.65536000000000000000e5 +839 2 3 17 0.65536000000000000000e5 +839 2 12 18 -0.65536000000000000000e5 +839 3 1 6 0.13107200000000000000e6 +839 3 2 7 0.26214400000000000000e6 +839 3 3 13 0.65536000000000000000e5 +839 3 4 17 0.65536000000000000000e5 +839 3 13 18 -0.65536000000000000000e5 +839 4 3 7 0.65536000000000000000e5 +840 3 2 15 -0.65536000000000000000e5 +840 3 3 14 0.65536000000000000000e5 +841 1 1 8 0.65536000000000000000e5 +841 1 5 20 -0.65536000000000000000e5 +841 1 6 21 -0.13107200000000000000e6 +841 1 11 26 0.13107200000000000000e6 +841 2 1 15 0.65536000000000000000e5 +841 2 6 12 -0.65536000000000000000e5 +841 3 1 6 -0.65536000000000000000e5 +841 3 2 15 0.65536000000000000000e5 +841 3 3 15 0.65536000000000000000e5 +841 3 6 11 0.65536000000000000000e5 +841 4 4 8 0.65536000000000000000e5 +842 1 2 9 -0.13107200000000000000e6 +842 1 3 26 0.65536000000000000000e5 +842 1 3 34 0.13107200000000000000e6 +842 1 4 35 -0.65536000000000000000e5 +842 2 3 17 0.65536000000000000000e5 +842 2 12 18 -0.65536000000000000000e5 +842 3 2 7 0.13107200000000000000e6 +842 3 2 15 0.13107200000000000000e6 +842 3 3 17 0.65536000000000000000e5 +842 3 4 17 0.65536000000000000000e5 +842 3 13 18 -0.65536000000000000000e5 +843 3 3 18 0.65536000000000000000e5 +843 3 4 17 -0.65536000000000000000e5 +844 1 1 8 -0.65536000000000000000e5 +844 1 3 34 0.65536000000000000000e5 +844 1 6 21 0.13107200000000000000e6 +844 1 11 26 -0.13107200000000000000e6 +844 2 1 15 -0.65536000000000000000e5 +844 2 6 12 0.65536000000000000000e5 +844 3 1 6 0.65536000000000000000e5 +844 3 2 15 -0.65536000000000000000e5 +844 3 3 19 0.65536000000000000000e5 +844 3 6 11 -0.65536000000000000000e5 +844 4 4 8 -0.65536000000000000000e5 +845 1 2 33 0.65536000000000000000e5 +845 1 3 34 -0.13107200000000000000e6 +845 1 4 35 0.65536000000000000000e5 +845 1 26 33 0.65536000000000000000e5 +845 2 12 18 0.65536000000000000000e5 +845 3 3 20 0.65536000000000000000e5 +845 3 13 18 0.65536000000000000000e5 +845 3 17 18 0.65536000000000000000e5 +846 1 2 9 0.65536000000000000000e5 +846 1 4 11 -0.13107200000000000000e6 +846 1 5 8 0.65536000000000000000e5 +846 1 5 20 0.65536000000000000000e5 +846 2 2 4 -0.32768000000000000000e5 +846 2 3 17 0.32768000000000000000e5 +846 2 4 6 0.65536000000000000000e5 +846 3 2 3 -0.32768000000000000000e5 +846 3 2 7 0.65536000000000000000e5 +846 3 4 4 0.65536000000000000000e5 +846 4 3 3 0.65536000000000000000e5 +846 4 3 7 0.32768000000000000000e5 +847 3 2 7 -0.65536000000000000000e5 +847 3 4 5 0.65536000000000000000e5 +848 1 2 9 0.65536000000000000000e5 +848 1 4 11 -0.13107200000000000000e6 +848 1 5 8 0.65536000000000000000e5 +848 1 5 20 0.65536000000000000000e5 +848 2 4 6 0.65536000000000000000e5 +848 3 4 6 0.65536000000000000000e5 +849 1 2 9 -0.65536000000000000000e5 +849 1 5 8 -0.65536000000000000000e5 +849 1 5 20 -0.65536000000000000000e5 +849 1 7 22 0.13107200000000000000e6 +849 2 4 14 -0.65536000000000000000e5 +849 3 2 7 0.65536000000000000000e5 +849 3 4 7 0.65536000000000000000e5 +850 1 4 11 -0.65536000000000000000e5 +850 1 7 22 0.65536000000000000000e5 +850 3 4 8 0.65536000000000000000e5 +851 1 4 11 0.32768000000000000000e5 +851 1 4 15 -0.13107200000000000000e6 +851 1 8 23 -0.65536000000000000000e5 +851 1 9 12 0.65536000000000000000e5 +851 1 9 24 -0.65536000000000000000e5 +851 1 11 26 0.32768000000000000000e5 +851 1 12 27 0.32768000000000000000e5 +851 1 14 21 0.13107200000000000000e6 +851 2 3 9 0.32768000000000000000e5 +851 2 4 10 0.65536000000000000000e5 +851 2 9 15 -0.65536000000000000000e5 +851 3 3 8 0.32768000000000000000e5 +851 3 3 16 -0.32768000000000000000e5 +851 3 4 9 0.32768000000000000000e5 +851 3 4 10 0.65536000000000000000e5 +851 3 9 14 0.65536000000000000000e5 +851 4 5 9 -0.32768000000000000000e5 +852 1 2 9 0.13107200000000000000e6 +852 1 2 33 0.65536000000000000000e5 +852 1 3 18 -0.65536000000000000000e5 +852 1 3 26 -0.65536000000000000000e5 +852 1 3 34 -0.13107200000000000000e6 +852 1 4 35 0.65536000000000000000e5 +852 2 3 17 -0.65536000000000000000e5 +852 2 12 18 0.65536000000000000000e5 +852 3 2 7 -0.13107200000000000000e6 +852 3 2 15 -0.13107200000000000000e6 +852 3 4 11 0.65536000000000000000e5 +852 3 4 17 -0.65536000000000000000e5 +852 3 13 18 0.65536000000000000000e5 +853 1 1 8 -0.13107200000000000000e6 +853 1 2 9 -0.26214400000000000000e6 +853 1 2 17 -0.65536000000000000000e5 +853 1 2 33 -0.65536000000000000000e5 +853 1 3 34 0.13107200000000000000e6 +853 1 4 35 -0.65536000000000000000e5 +853 1 6 21 0.26214400000000000000e6 +853 2 1 15 -0.13107200000000000000e6 +853 2 2 12 -0.65536000000000000000e5 +853 2 3 17 0.65536000000000000000e5 +853 2 12 18 -0.65536000000000000000e5 +853 3 1 6 0.13107200000000000000e6 +853 3 2 7 0.26214400000000000000e6 +853 3 4 12 0.65536000000000000000e5 +853 3 4 17 0.65536000000000000000e5 +853 3 13 18 -0.65536000000000000000e5 +853 4 3 7 0.65536000000000000000e5 +854 1 1 8 0.13107200000000000000e6 +854 1 2 9 -0.13107200000000000000e6 +854 1 3 26 0.65536000000000000000e5 +854 1 4 19 -0.65536000000000000000e5 +854 1 6 21 -0.26214400000000000000e6 +854 1 11 26 0.26214400000000000000e6 +854 2 1 15 0.13107200000000000000e6 +854 2 3 17 0.65536000000000000000e5 +854 2 6 12 -0.13107200000000000000e6 +854 2 12 18 -0.65536000000000000000e5 +854 3 1 6 -0.13107200000000000000e6 +854 3 2 7 0.13107200000000000000e6 +854 3 2 15 0.26214400000000000000e6 +854 3 4 13 0.65536000000000000000e5 +854 3 6 11 0.13107200000000000000e6 +854 4 4 8 0.13107200000000000000e6 +854 4 8 8 -0.13107200000000000000e6 +855 1 1 8 0.65536000000000000000e5 +855 1 5 20 -0.65536000000000000000e5 +855 1 6 21 -0.13107200000000000000e6 +855 1 11 26 0.13107200000000000000e6 +855 2 1 15 0.65536000000000000000e5 +855 2 6 12 -0.65536000000000000000e5 +855 3 1 6 -0.65536000000000000000e5 +855 3 2 15 0.65536000000000000000e5 +855 3 4 14 0.65536000000000000000e5 +855 3 6 11 0.65536000000000000000e5 +855 4 4 8 0.65536000000000000000e5 +856 1 1 8 0.65536000000000000000e5 +856 1 2 33 -0.32768000000000000000e5 +856 1 3 26 0.32768000000000000000e5 +856 1 3 34 0.65536000000000000000e5 +856 1 4 35 -0.32768000000000000000e5 +856 1 5 20 0.65536000000000000000e5 +856 1 5 28 0.32768000000000000000e5 +856 1 6 21 -0.13107200000000000000e6 +856 1 7 22 -0.13107200000000000000e6 +856 1 11 26 0.13107200000000000000e6 +856 2 1 15 0.65536000000000000000e5 +856 2 3 17 0.32768000000000000000e5 +856 2 4 14 0.65536000000000000000e5 +856 2 4 18 0.32768000000000000000e5 +856 2 6 12 -0.65536000000000000000e5 +856 2 12 18 -0.65536000000000000000e5 +856 3 1 6 -0.65536000000000000000e5 +856 3 2 15 0.13107200000000000000e6 +856 3 4 15 0.65536000000000000000e5 +856 3 4 17 0.32768000000000000000e5 +856 3 6 11 0.65536000000000000000e5 +856 3 13 18 -0.32768000000000000000e5 +856 4 4 8 0.65536000000000000000e5 +856 4 8 8 -0.65536000000000000000e5 +857 1 1 8 -0.32768000000000000000e5 +857 1 5 20 0.32768000000000000000e5 +857 1 6 21 0.65536000000000000000e5 +857 1 11 26 -0.65536000000000000000e5 +857 2 1 15 -0.32768000000000000000e5 +857 2 6 12 0.32768000000000000000e5 +857 3 1 6 0.32768000000000000000e5 +857 3 3 16 0.65536000000000000000e5 +857 3 4 16 0.65536000000000000000e5 +857 3 9 14 -0.13107200000000000000e6 +857 4 5 9 0.65536000000000000000e5 +858 1 1 8 -0.13107200000000000000e6 +858 1 2 9 0.13107200000000000000e6 +858 1 3 26 -0.65536000000000000000e5 +858 1 4 35 0.65536000000000000000e5 +858 1 6 21 0.26214400000000000000e6 +858 1 11 26 -0.26214400000000000000e6 +858 2 1 15 -0.13107200000000000000e6 +858 2 3 17 -0.65536000000000000000e5 +858 2 6 12 0.13107200000000000000e6 +858 2 12 18 0.65536000000000000000e5 +858 3 1 6 0.13107200000000000000e6 +858 3 2 7 -0.13107200000000000000e6 +858 3 2 15 -0.26214400000000000000e6 +858 3 4 18 0.65536000000000000000e5 +858 3 6 11 -0.13107200000000000000e6 +858 3 13 18 0.65536000000000000000e5 +858 4 4 8 -0.13107200000000000000e6 +858 4 8 8 0.13107200000000000000e6 +859 1 1 8 -0.65536000000000000000e5 +859 1 2 33 0.32768000000000000000e5 +859 1 3 26 -0.32768000000000000000e5 +859 1 3 34 -0.13107200000000000000e6 +859 1 4 35 0.32768000000000000000e5 +859 1 5 28 -0.32768000000000000000e5 +859 1 6 21 0.13107200000000000000e6 +859 1 7 22 0.13107200000000000000e6 +859 1 11 26 -0.13107200000000000000e6 +859 2 1 15 -0.65536000000000000000e5 +859 2 3 17 -0.32768000000000000000e5 +859 2 4 18 -0.32768000000000000000e5 +859 2 6 12 0.65536000000000000000e5 +859 2 6 20 -0.65536000000000000000e5 +859 2 12 18 0.65536000000000000000e5 +859 3 1 6 0.65536000000000000000e5 +859 3 2 15 -0.65536000000000000000e5 +859 3 3 16 -0.13107200000000000000e6 +859 3 4 17 -0.32768000000000000000e5 +859 3 4 19 0.65536000000000000000e5 +859 3 5 18 0.65536000000000000000e5 +859 3 6 11 -0.65536000000000000000e5 +859 3 6 19 -0.13107200000000000000e6 +859 3 13 18 0.32768000000000000000e5 +859 4 4 8 -0.65536000000000000000e5 +859 4 8 8 0.65536000000000000000e5 +860 3 4 20 0.65536000000000000000e5 +860 3 13 18 -0.65536000000000000000e5 +861 1 3 10 0.65536000000000000000e5 +861 1 4 11 0.65536000000000000000e5 +861 1 6 21 -0.65536000000000000000e5 +861 1 7 22 -0.32768000000000000000e5 +861 1 8 23 -0.65536000000000000000e5 +861 1 11 26 0.32768000000000000000e5 +861 1 12 27 0.32768000000000000000e5 +861 2 3 9 0.32768000000000000000e5 +861 2 6 8 0.65536000000000000000e5 +861 2 8 14 -0.65536000000000000000e5 +861 3 3 8 0.98304000000000000000e5 +861 3 3 16 -0.32768000000000000000e5 +861 3 4 9 0.32768000000000000000e5 +861 3 5 5 0.65536000000000000000e5 +861 3 5 10 -0.13107200000000000000e6 +861 3 9 14 0.65536000000000000000e5 +861 4 2 6 0.32768000000000000000e5 +861 4 4 4 0.65536000000000000000e5 +861 4 5 9 -0.32768000000000000000e5 +862 1 3 10 -0.65536000000000000000e5 +862 1 6 21 0.65536000000000000000e5 +862 3 5 6 0.65536000000000000000e5 +863 3 3 8 -0.65536000000000000000e5 +863 3 5 7 0.65536000000000000000e5 +864 1 3 10 0.32768000000000000000e5 +864 1 4 11 0.65536000000000000000e5 +864 1 6 21 -0.32768000000000000000e5 +864 1 7 22 -0.32768000000000000000e5 +864 1 8 23 -0.65536000000000000000e5 +864 1 11 26 0.32768000000000000000e5 +864 1 12 27 0.32768000000000000000e5 +864 2 3 9 0.32768000000000000000e5 +864 2 6 8 0.65536000000000000000e5 +864 2 8 14 -0.65536000000000000000e5 +864 3 3 8 0.65536000000000000000e5 +864 3 3 16 -0.32768000000000000000e5 +864 3 4 9 0.32768000000000000000e5 +864 3 5 8 0.65536000000000000000e5 +864 3 5 10 -0.13107200000000000000e6 +864 3 9 14 0.65536000000000000000e5 +864 4 2 6 0.32768000000000000000e5 +864 4 5 9 -0.32768000000000000000e5 +865 1 3 10 -0.32768000000000000000e5 +865 1 4 11 -0.32768000000000000000e5 +865 1 6 21 0.32768000000000000000e5 +865 1 7 22 0.32768000000000000000e5 +865 3 3 8 -0.32768000000000000000e5 +865 3 5 9 0.65536000000000000000e5 +865 4 2 6 -0.32768000000000000000e5 +866 3 1 14 -0.65536000000000000000e5 +866 3 5 11 0.65536000000000000000e5 +867 3 5 12 0.65536000000000000000e5 +867 3 6 11 -0.65536000000000000000e5 +868 3 2 15 -0.65536000000000000000e5 +868 3 5 13 0.65536000000000000000e5 +869 1 6 21 -0.65536000000000000000e5 +869 1 16 23 0.65536000000000000000e5 +869 3 5 14 0.65536000000000000000e5 +870 1 1 8 0.32768000000000000000e5 +870 1 5 20 -0.32768000000000000000e5 +870 1 6 21 -0.65536000000000000000e5 +870 1 11 26 0.65536000000000000000e5 +870 2 1 15 0.32768000000000000000e5 +870 2 6 12 -0.32768000000000000000e5 +870 3 1 6 -0.32768000000000000000e5 +870 3 5 15 0.65536000000000000000e5 +871 1 1 8 0.16384000000000000000e5 +871 1 5 20 -0.16384000000000000000e5 +871 1 6 21 -0.65536000000000000000e5 +871 1 11 26 0.32768000000000000000e5 +871 1 16 23 0.32768000000000000000e5 +871 2 1 15 0.16384000000000000000e5 +871 2 2 16 -0.32768000000000000000e5 +871 2 5 19 0.32768000000000000000e5 +871 2 6 12 -0.16384000000000000000e5 +871 3 1 6 -0.16384000000000000000e5 +871 3 3 16 -0.32768000000000000000e5 +871 3 5 16 0.65536000000000000000e5 +872 1 1 8 0.65536000000000000000e5 +872 1 1 32 0.32768000000000000000e5 +872 1 2 9 0.65536000000000000000e5 +872 1 2 33 0.32768000000000000000e5 +872 1 3 26 0.32768000000000000000e5 +872 1 6 21 -0.13107200000000000000e6 +872 2 1 15 0.65536000000000000000e5 +872 2 11 17 0.32768000000000000000e5 +872 3 1 6 -0.65536000000000000000e5 +872 3 2 7 -0.65536000000000000000e5 +872 3 5 17 0.65536000000000000000e5 +872 3 6 11 0.65536000000000000000e5 +872 3 11 12 -0.32768000000000000000e5 +873 1 11 26 -0.65536000000000000000e5 +873 1 16 31 0.65536000000000000000e5 +873 3 5 19 0.65536000000000000000e5 +874 1 2 9 -0.65536000000000000000e5 +874 1 26 29 0.65536000000000000000e5 +874 3 2 7 0.65536000000000000000e5 +874 3 2 15 0.65536000000000000000e5 +874 3 5 18 0.65536000000000000000e5 +874 3 5 20 0.65536000000000000000e5 +875 3 3 8 -0.32768000000000000000e5 +875 3 6 6 0.65536000000000000000e5 +876 1 4 11 -0.65536000000000000000e5 +876 1 7 22 0.65536000000000000000e5 +876 3 6 7 0.65536000000000000000e5 +877 1 3 10 -0.32768000000000000000e5 +877 1 4 11 -0.32768000000000000000e5 +877 1 6 21 0.32768000000000000000e5 +877 1 7 22 0.32768000000000000000e5 +877 3 3 8 -0.32768000000000000000e5 +877 3 6 8 0.65536000000000000000e5 +877 4 2 6 -0.32768000000000000000e5 +878 1 4 11 -0.32768000000000000000e5 +878 1 8 23 0.65536000000000000000e5 +878 1 11 26 -0.32768000000000000000e5 +878 1 12 27 -0.32768000000000000000e5 +878 2 3 9 -0.32768000000000000000e5 +878 3 3 8 -0.32768000000000000000e5 +878 3 3 16 0.32768000000000000000e5 +878 3 4 9 -0.32768000000000000000e5 +878 3 6 9 0.65536000000000000000e5 +878 3 9 14 -0.65536000000000000000e5 +878 4 5 9 0.32768000000000000000e5 +879 1 1 8 -0.81920000000000000000e4 +879 1 5 20 0.81920000000000000000e4 +879 1 6 21 0.32768000000000000000e5 +879 1 7 14 -0.65536000000000000000e5 +879 1 7 22 0.16384000000000000000e5 +879 1 9 24 -0.32768000000000000000e5 +879 1 14 21 0.65536000000000000000e5 +879 2 1 15 -0.81920000000000000000e4 +879 2 2 16 0.16384000000000000000e5 +879 2 6 12 0.81920000000000000000e4 +879 2 9 15 -0.32768000000000000000e5 +879 2 10 12 0.32768000000000000000e5 +879 3 1 6 0.81920000000000000000e4 +879 3 6 10 0.65536000000000000000e5 +880 3 2 15 -0.65536000000000000000e5 +880 3 6 12 0.65536000000000000000e5 +881 1 1 8 0.65536000000000000000e5 +881 1 5 20 -0.65536000000000000000e5 +881 1 6 21 -0.13107200000000000000e6 +881 1 11 26 0.13107200000000000000e6 +881 2 1 15 0.65536000000000000000e5 +881 2 6 12 -0.65536000000000000000e5 +881 3 1 6 -0.65536000000000000000e5 +881 3 2 15 0.65536000000000000000e5 +881 3 6 11 0.65536000000000000000e5 +881 3 6 13 0.65536000000000000000e5 +881 4 4 8 0.65536000000000000000e5 +882 1 1 8 0.32768000000000000000e5 +882 1 5 20 -0.32768000000000000000e5 +882 1 6 21 -0.65536000000000000000e5 +882 1 11 26 0.65536000000000000000e5 +882 2 1 15 0.32768000000000000000e5 +882 2 6 12 -0.32768000000000000000e5 +882 3 1 6 -0.32768000000000000000e5 +882 3 6 14 0.65536000000000000000e5 +883 3 3 16 -0.65536000000000000000e5 +883 3 6 15 0.65536000000000000000e5 +884 3 6 16 0.65536000000000000000e5 +884 3 9 14 -0.65536000000000000000e5 +885 3 5 18 -0.65536000000000000000e5 +885 3 6 17 0.65536000000000000000e5 +886 1 1 8 -0.65536000000000000000e5 +886 1 3 34 0.65536000000000000000e5 +886 1 6 21 0.13107200000000000000e6 +886 1 11 26 -0.13107200000000000000e6 +886 2 1 15 -0.65536000000000000000e5 +886 2 6 12 0.65536000000000000000e5 +886 3 1 6 0.65536000000000000000e5 +886 3 2 15 -0.65536000000000000000e5 +886 3 6 11 -0.65536000000000000000e5 +886 3 6 18 0.65536000000000000000e5 +886 4 4 8 -0.65536000000000000000e5 +887 1 2 9 0.65536000000000000000e5 +887 1 26 29 -0.65536000000000000000e5 +887 2 6 20 0.65536000000000000000e5 +887 2 14 20 -0.65536000000000000000e5 +887 3 2 7 -0.65536000000000000000e5 +887 3 2 15 -0.65536000000000000000e5 +887 3 5 18 -0.65536000000000000000e5 +887 3 6 20 0.65536000000000000000e5 +887 3 7 20 0.65536000000000000000e5 +887 3 14 19 -0.13107200000000000000e6 +888 3 4 9 -0.32768000000000000000e5 +888 3 7 7 0.65536000000000000000e5 +889 1 4 11 -0.32768000000000000000e5 +889 1 8 23 0.65536000000000000000e5 +889 1 11 26 -0.32768000000000000000e5 +889 1 12 27 -0.32768000000000000000e5 +889 2 3 9 -0.32768000000000000000e5 +889 3 3 8 -0.32768000000000000000e5 +889 3 3 16 0.32768000000000000000e5 +889 3 4 9 -0.32768000000000000000e5 +889 3 7 8 0.65536000000000000000e5 +889 3 9 14 -0.65536000000000000000e5 +889 4 5 9 0.32768000000000000000e5 +890 1 4 11 0.32768000000000000000e5 +890 1 4 15 -0.13107200000000000000e6 +890 1 8 23 -0.65536000000000000000e5 +890 1 9 12 0.65536000000000000000e5 +890 1 9 24 -0.65536000000000000000e5 +890 1 11 26 0.32768000000000000000e5 +890 1 12 27 0.32768000000000000000e5 +890 1 14 21 0.13107200000000000000e6 +890 2 3 9 0.32768000000000000000e5 +890 2 4 10 0.65536000000000000000e5 +890 2 9 15 -0.65536000000000000000e5 +890 3 3 8 0.32768000000000000000e5 +890 3 3 16 -0.32768000000000000000e5 +890 3 4 9 0.32768000000000000000e5 +890 3 7 9 0.65536000000000000000e5 +890 3 9 14 0.65536000000000000000e5 +890 4 5 9 -0.32768000000000000000e5 +891 1 4 15 -0.65536000000000000000e5 +891 1 14 21 0.65536000000000000000e5 +891 3 7 10 0.65536000000000000000e5 +892 3 2 15 -0.65536000000000000000e5 +892 3 7 11 0.65536000000000000000e5 +893 1 1 8 0.65536000000000000000e5 +893 1 5 20 -0.65536000000000000000e5 +893 1 6 21 -0.13107200000000000000e6 +893 1 11 26 0.13107200000000000000e6 +893 2 1 15 0.65536000000000000000e5 +893 2 6 12 -0.65536000000000000000e5 +893 3 1 6 -0.65536000000000000000e5 +893 3 2 15 0.65536000000000000000e5 +893 3 6 11 0.65536000000000000000e5 +893 3 7 12 0.65536000000000000000e5 +893 4 4 8 0.65536000000000000000e5 +894 1 1 8 0.65536000000000000000e5 +894 1 2 33 -0.32768000000000000000e5 +894 1 3 26 0.32768000000000000000e5 +894 1 3 34 0.65536000000000000000e5 +894 1 4 35 -0.32768000000000000000e5 +894 1 5 20 0.65536000000000000000e5 +894 1 5 28 0.32768000000000000000e5 +894 1 6 21 -0.13107200000000000000e6 +894 1 7 22 -0.13107200000000000000e6 +894 1 11 26 0.13107200000000000000e6 +894 2 1 15 0.65536000000000000000e5 +894 2 3 17 0.32768000000000000000e5 +894 2 4 14 0.65536000000000000000e5 +894 2 4 18 0.32768000000000000000e5 +894 2 6 12 -0.65536000000000000000e5 +894 2 12 18 -0.65536000000000000000e5 +894 3 1 6 -0.65536000000000000000e5 +894 3 2 15 0.13107200000000000000e6 +894 3 4 17 0.32768000000000000000e5 +894 3 6 11 0.65536000000000000000e5 +894 3 7 13 0.65536000000000000000e5 +894 3 13 18 -0.32768000000000000000e5 +894 4 4 8 0.65536000000000000000e5 +894 4 8 8 -0.65536000000000000000e5 +895 3 3 16 -0.65536000000000000000e5 +895 3 7 14 0.65536000000000000000e5 +896 1 1 8 -0.32768000000000000000e5 +896 1 5 20 0.32768000000000000000e5 +896 1 6 21 0.65536000000000000000e5 +896 1 11 26 -0.65536000000000000000e5 +896 2 1 15 -0.32768000000000000000e5 +896 2 6 12 0.32768000000000000000e5 +896 3 1 6 0.32768000000000000000e5 +896 3 3 16 0.65536000000000000000e5 +896 3 7 15 0.65536000000000000000e5 +896 3 9 14 -0.13107200000000000000e6 +896 4 5 9 0.65536000000000000000e5 +897 1 8 23 0.65536000000000000000e5 +897 1 9 24 0.65536000000000000000e5 +897 1 13 28 0.65536000000000000000e5 +897 1 14 21 -0.13107200000000000000e6 +897 2 9 15 0.65536000000000000000e5 +897 3 7 16 0.65536000000000000000e5 +898 1 1 8 -0.65536000000000000000e5 +898 1 3 34 0.65536000000000000000e5 +898 1 6 21 0.13107200000000000000e6 +898 1 11 26 -0.13107200000000000000e6 +898 2 1 15 -0.65536000000000000000e5 +898 2 6 12 0.65536000000000000000e5 +898 3 1 6 0.65536000000000000000e5 +898 3 2 15 -0.65536000000000000000e5 +898 3 6 11 -0.65536000000000000000e5 +898 3 7 17 0.65536000000000000000e5 +898 4 4 8 -0.65536000000000000000e5 +899 1 1 8 -0.65536000000000000000e5 +899 1 2 33 0.32768000000000000000e5 +899 1 3 26 -0.32768000000000000000e5 +899 1 3 34 -0.13107200000000000000e6 +899 1 4 35 0.32768000000000000000e5 +899 1 5 28 -0.32768000000000000000e5 +899 1 6 21 0.13107200000000000000e6 +899 1 7 22 0.13107200000000000000e6 +899 1 11 26 -0.13107200000000000000e6 +899 2 1 15 -0.65536000000000000000e5 +899 2 3 17 -0.32768000000000000000e5 +899 2 4 18 -0.32768000000000000000e5 +899 2 6 12 0.65536000000000000000e5 +899 2 6 20 -0.65536000000000000000e5 +899 2 12 18 0.65536000000000000000e5 +899 3 1 6 0.65536000000000000000e5 +899 3 2 15 -0.65536000000000000000e5 +899 3 3 16 -0.13107200000000000000e6 +899 3 4 17 -0.32768000000000000000e5 +899 3 5 18 0.65536000000000000000e5 +899 3 6 11 -0.65536000000000000000e5 +899 3 6 19 -0.13107200000000000000e6 +899 3 7 18 0.65536000000000000000e5 +899 3 13 18 0.32768000000000000000e5 +899 4 4 8 -0.65536000000000000000e5 +899 4 8 8 0.65536000000000000000e5 +900 1 12 27 -0.65536000000000000000e5 +900 1 22 29 0.65536000000000000000e5 +900 3 7 19 0.65536000000000000000e5 +901 3 5 10 -0.32768000000000000000e5 +901 3 8 8 0.65536000000000000000e5 +902 1 1 8 -0.81920000000000000000e4 +902 1 5 20 0.81920000000000000000e4 +902 1 6 21 0.32768000000000000000e5 +902 1 7 14 -0.65536000000000000000e5 +902 1 7 22 0.16384000000000000000e5 +902 1 9 24 -0.32768000000000000000e5 +902 1 14 21 0.65536000000000000000e5 +902 2 1 15 -0.81920000000000000000e4 +902 2 2 16 0.16384000000000000000e5 +902 2 6 12 0.81920000000000000000e4 +902 2 9 15 -0.32768000000000000000e5 +902 2 10 12 0.32768000000000000000e5 +902 3 1 6 0.81920000000000000000e4 +902 3 8 9 0.65536000000000000000e5 +903 1 1 8 -0.40960000000000000000e4 +903 1 4 15 -0.32768000000000000000e5 +903 1 5 20 0.40960000000000000000e4 +903 1 6 21 0.16384000000000000000e5 +903 1 7 14 -0.32768000000000000000e5 +903 1 7 22 0.81920000000000000000e4 +903 1 9 24 -0.16384000000000000000e5 +903 1 14 21 0.65536000000000000000e5 +903 2 1 15 -0.40960000000000000000e4 +903 2 2 16 0.81920000000000000000e4 +903 2 6 12 0.40960000000000000000e4 +903 2 9 15 -0.16384000000000000000e5 +903 2 10 12 0.16384000000000000000e5 +903 3 1 6 0.40960000000000000000e4 +903 3 5 10 -0.32768000000000000000e5 +903 3 8 10 0.65536000000000000000e5 +903 4 6 6 -0.65536000000000000000e5 +904 1 6 21 -0.65536000000000000000e5 +904 1 16 23 0.65536000000000000000e5 +904 3 8 11 0.65536000000000000000e5 +905 1 1 8 0.32768000000000000000e5 +905 1 5 20 -0.32768000000000000000e5 +905 1 6 21 -0.65536000000000000000e5 +905 1 11 26 0.65536000000000000000e5 +905 2 1 15 0.32768000000000000000e5 +905 2 6 12 -0.32768000000000000000e5 +905 3 1 6 -0.32768000000000000000e5 +905 3 8 12 0.65536000000000000000e5 +906 3 3 16 -0.65536000000000000000e5 +906 3 8 13 0.65536000000000000000e5 +907 1 1 8 0.16384000000000000000e5 +907 1 5 20 -0.16384000000000000000e5 +907 1 6 21 -0.65536000000000000000e5 +907 1 11 26 0.32768000000000000000e5 +907 1 16 23 0.32768000000000000000e5 +907 2 1 15 0.16384000000000000000e5 +907 2 2 16 -0.32768000000000000000e5 +907 2 5 19 0.32768000000000000000e5 +907 2 6 12 -0.16384000000000000000e5 +907 3 1 6 -0.16384000000000000000e5 +907 3 3 16 -0.32768000000000000000e5 +907 3 8 14 0.65536000000000000000e5 +908 3 8 15 0.65536000000000000000e5 +908 3 9 14 -0.65536000000000000000e5 +909 1 1 8 0.81920000000000000000e4 +909 1 5 20 -0.81920000000000000000e4 +909 1 6 21 -0.32768000000000000000e5 +909 1 8 23 0.32768000000000000000e5 +909 1 9 24 0.32768000000000000000e5 +909 1 11 26 0.16384000000000000000e5 +909 1 13 28 0.32768000000000000000e5 +909 1 14 21 -0.65536000000000000000e5 +909 1 16 23 0.16384000000000000000e5 +909 2 1 15 0.81920000000000000000e4 +909 2 2 16 -0.16384000000000000000e5 +909 2 5 19 0.16384000000000000000e5 +909 2 6 12 -0.81920000000000000000e4 +909 2 9 15 0.32768000000000000000e5 +909 2 10 12 -0.32768000000000000000e5 +909 2 14 16 0.32768000000000000000e5 +909 3 1 6 -0.81920000000000000000e4 +909 3 3 16 -0.16384000000000000000e5 +909 3 8 16 0.65536000000000000000e5 +909 3 9 14 -0.32768000000000000000e5 +910 1 11 26 -0.65536000000000000000e5 +910 1 16 31 0.65536000000000000000e5 +910 3 8 17 0.65536000000000000000e5 +911 3 6 19 -0.65536000000000000000e5 +911 3 8 18 0.65536000000000000000e5 +912 1 11 26 -0.32768000000000000000e5 +912 1 12 27 -0.32768000000000000000e5 +912 1 16 31 0.32768000000000000000e5 +912 1 22 29 0.32768000000000000000e5 +912 3 6 19 -0.32768000000000000000e5 +912 3 8 19 0.65536000000000000000e5 +912 4 6 10 -0.32768000000000000000e5 +913 3 8 20 0.65536000000000000000e5 +913 3 14 19 -0.65536000000000000000e5 +914 1 4 15 -0.32768000000000000000e5 +914 1 14 21 0.32768000000000000000e5 +914 3 9 9 0.65536000000000000000e5 +915 1 1 8 0.32768000000000000000e5 +915 1 5 20 -0.32768000000000000000e5 +915 1 6 21 -0.65536000000000000000e5 +915 1 11 26 0.65536000000000000000e5 +915 2 1 15 0.32768000000000000000e5 +915 2 6 12 -0.32768000000000000000e5 +915 3 1 6 -0.32768000000000000000e5 +915 3 9 11 0.65536000000000000000e5 +916 3 3 16 -0.65536000000000000000e5 +916 3 9 12 0.65536000000000000000e5 +917 1 1 8 -0.32768000000000000000e5 +917 1 5 20 0.32768000000000000000e5 +917 1 6 21 0.65536000000000000000e5 +917 1 11 26 -0.65536000000000000000e5 +917 2 1 15 -0.32768000000000000000e5 +917 2 6 12 0.32768000000000000000e5 +917 3 1 6 0.32768000000000000000e5 +917 3 3 16 0.65536000000000000000e5 +917 3 9 13 0.65536000000000000000e5 +917 3 9 14 -0.13107200000000000000e6 +917 4 5 9 0.65536000000000000000e5 +918 1 8 23 0.65536000000000000000e5 +918 1 9 24 0.65536000000000000000e5 +918 1 13 28 0.65536000000000000000e5 +918 1 14 21 -0.13107200000000000000e6 +918 2 9 15 0.65536000000000000000e5 +918 3 9 15 0.65536000000000000000e5 +919 1 14 21 -0.65536000000000000000e5 +919 1 14 29 0.65536000000000000000e5 +919 3 9 16 0.65536000000000000000e5 +920 3 6 19 -0.65536000000000000000e5 +920 3 9 17 0.65536000000000000000e5 +921 1 12 27 -0.65536000000000000000e5 +921 1 22 29 0.65536000000000000000e5 +921 3 9 18 0.65536000000000000000e5 +922 1 13 28 -0.65536000000000000000e5 +922 1 23 30 0.65536000000000000000e5 +922 3 9 19 0.65536000000000000000e5 +923 1 22 29 -0.65536000000000000000e5 +923 1 29 30 0.65536000000000000000e5 +923 3 9 20 0.65536000000000000000e5 +924 1 8 15 0.16384000000000000000e5 +924 1 10 25 0.16384000000000000000e5 +924 1 13 14 -0.32768000000000000000e5 +924 1 15 22 0.16384000000000000000e5 +924 2 10 16 0.16384000000000000000e5 +924 3 9 10 -0.16384000000000000000e5 +924 3 10 10 0.65536000000000000000e5 +925 1 1 8 0.16384000000000000000e5 +925 1 5 20 -0.16384000000000000000e5 +925 1 6 21 -0.65536000000000000000e5 +925 1 11 26 0.32768000000000000000e5 +925 1 16 23 0.32768000000000000000e5 +925 2 1 15 0.16384000000000000000e5 +925 2 2 16 -0.32768000000000000000e5 +925 2 5 19 0.32768000000000000000e5 +925 2 6 12 -0.16384000000000000000e5 +925 3 1 6 -0.16384000000000000000e5 +925 3 3 16 -0.32768000000000000000e5 +925 3 10 11 0.65536000000000000000e5 +926 3 9 14 -0.65536000000000000000e5 +926 3 10 12 0.65536000000000000000e5 +927 1 8 23 0.65536000000000000000e5 +927 1 9 24 0.65536000000000000000e5 +927 1 13 28 0.65536000000000000000e5 +927 1 14 21 -0.13107200000000000000e6 +927 2 9 15 0.65536000000000000000e5 +927 3 10 13 0.65536000000000000000e5 +928 1 1 8 0.81920000000000000000e4 +928 1 5 20 -0.81920000000000000000e4 +928 1 6 21 -0.32768000000000000000e5 +928 1 8 23 0.32768000000000000000e5 +928 1 9 24 0.32768000000000000000e5 +928 1 11 26 0.16384000000000000000e5 +928 1 13 28 0.32768000000000000000e5 +928 1 14 21 -0.65536000000000000000e5 +928 1 16 23 0.16384000000000000000e5 +928 2 1 15 0.81920000000000000000e4 +928 2 2 16 -0.16384000000000000000e5 +928 2 5 19 0.16384000000000000000e5 +928 2 6 12 -0.81920000000000000000e4 +928 2 9 15 0.32768000000000000000e5 +928 2 10 12 -0.32768000000000000000e5 +928 2 14 16 0.32768000000000000000e5 +928 3 1 6 -0.81920000000000000000e4 +928 3 3 16 -0.16384000000000000000e5 +928 3 9 14 -0.32768000000000000000e5 +928 3 10 14 0.65536000000000000000e5 +929 1 14 21 -0.65536000000000000000e5 +929 1 14 29 0.65536000000000000000e5 +929 3 10 15 0.65536000000000000000e5 +930 1 7 22 0.81920000000000000000e4 +930 1 8 15 -0.65536000000000000000e5 +930 1 8 23 0.16384000000000000000e5 +930 1 11 26 0.81920000000000000000e4 +930 1 13 28 0.16384000000000000000e5 +930 1 14 29 0.32768000000000000000e5 +930 1 16 23 0.81920000000000000000e4 +930 1 22 25 0.32768000000000000000e5 +930 2 5 19 0.81920000000000000000e4 +930 2 14 16 0.16384000000000000000e5 +930 2 16 16 0.65536000000000000000e5 +930 3 3 16 -0.81920000000000000000e4 +930 3 9 10 0.65536000000000000000e5 +930 3 9 14 -0.16384000000000000000e5 +930 3 10 16 0.65536000000000000000e5 +931 1 11 26 -0.32768000000000000000e5 +931 1 12 27 -0.32768000000000000000e5 +931 1 16 31 0.32768000000000000000e5 +931 1 22 29 0.32768000000000000000e5 +931 3 6 19 -0.32768000000000000000e5 +931 3 10 17 0.65536000000000000000e5 +931 4 6 10 -0.32768000000000000000e5 +932 1 13 28 -0.65536000000000000000e5 +932 1 23 30 0.65536000000000000000e5 +932 3 10 18 0.65536000000000000000e5 +933 1 23 30 -0.65536000000000000000e5 +933 1 25 32 0.65536000000000000000e5 +933 3 10 20 0.65536000000000000000e5 +934 1 1 8 0.65536000000000000000e5 +934 1 1 32 0.32768000000000000000e5 +934 1 2 9 0.13107200000000000000e6 +934 1 2 33 0.32768000000000000000e5 +934 1 3 34 -0.65536000000000000000e5 +934 1 4 35 0.32768000000000000000e5 +934 1 6 21 -0.13107200000000000000e6 +934 2 1 15 0.65536000000000000000e5 +934 2 3 17 -0.32768000000000000000e5 +934 2 11 17 0.32768000000000000000e5 +934 2 12 18 0.32768000000000000000e5 +934 3 1 6 -0.65536000000000000000e5 +934 3 2 7 -0.13107200000000000000e6 +934 3 2 15 -0.65536000000000000000e5 +934 3 4 17 -0.32768000000000000000e5 +934 3 6 11 0.65536000000000000000e5 +934 3 11 11 0.65536000000000000000e5 +934 3 13 18 0.32768000000000000000e5 +934 4 7 7 0.65536000000000000000e5 +935 1 2 9 -0.13107200000000000000e6 +935 1 3 26 0.65536000000000000000e5 +935 1 3 34 0.13107200000000000000e6 +935 1 4 35 -0.65536000000000000000e5 +935 2 3 17 0.65536000000000000000e5 +935 2 12 18 -0.65536000000000000000e5 +935 3 2 7 0.13107200000000000000e6 +935 3 2 15 0.13107200000000000000e6 +935 3 4 17 0.65536000000000000000e5 +935 3 11 13 0.65536000000000000000e5 +935 3 13 18 -0.65536000000000000000e5 +936 1 1 8 0.65536000000000000000e5 +936 1 1 32 0.32768000000000000000e5 +936 1 2 9 0.65536000000000000000e5 +936 1 2 33 0.32768000000000000000e5 +936 1 3 26 0.32768000000000000000e5 +936 1 6 21 -0.13107200000000000000e6 +936 2 1 15 0.65536000000000000000e5 +936 2 11 17 0.32768000000000000000e5 +936 3 1 6 -0.65536000000000000000e5 +936 3 2 7 -0.65536000000000000000e5 +936 3 6 11 0.65536000000000000000e5 +936 3 11 12 -0.32768000000000000000e5 +936 3 11 14 0.65536000000000000000e5 +937 3 5 18 -0.65536000000000000000e5 +937 3 11 15 0.65536000000000000000e5 +938 1 11 26 -0.65536000000000000000e5 +938 1 16 31 0.65536000000000000000e5 +938 3 11 16 0.65536000000000000000e5 +939 1 3 26 -0.65536000000000000000e5 +939 1 17 32 -0.65536000000000000000e5 +939 1 26 29 0.13107200000000000000e6 +939 1 26 33 -0.65536000000000000000e5 +939 2 17 17 -0.13107200000000000000e6 +939 3 11 12 0.65536000000000000000e5 +939 3 11 17 0.65536000000000000000e5 +939 3 17 18 -0.65536000000000000000e5 +940 1 2 33 -0.65536000000000000000e5 +940 1 17 32 0.65536000000000000000e5 +940 3 11 18 0.65536000000000000000e5 +941 1 2 9 -0.65536000000000000000e5 +941 1 26 29 0.65536000000000000000e5 +941 3 2 7 0.65536000000000000000e5 +941 3 2 15 0.65536000000000000000e5 +941 3 5 18 0.65536000000000000000e5 +941 3 11 19 0.65536000000000000000e5 +942 1 16 35 0.65536000000000000000e5 +942 1 17 32 -0.65536000000000000000e5 +942 3 11 20 0.65536000000000000000e5 +943 1 2 9 -0.65536000000000000000e5 +943 1 3 26 0.32768000000000000000e5 +943 1 3 34 0.65536000000000000000e5 +943 1 4 35 -0.32768000000000000000e5 +943 2 3 17 0.32768000000000000000e5 +943 2 12 18 -0.32768000000000000000e5 +943 3 2 7 0.65536000000000000000e5 +943 3 2 15 0.65536000000000000000e5 +943 3 4 17 0.32768000000000000000e5 +943 3 12 12 0.65536000000000000000e5 +943 3 13 18 -0.32768000000000000000e5 +944 3 4 17 -0.65536000000000000000e5 +944 3 12 13 0.65536000000000000000e5 +945 3 5 18 -0.65536000000000000000e5 +945 3 12 14 0.65536000000000000000e5 +946 1 1 8 -0.65536000000000000000e5 +946 1 3 34 0.65536000000000000000e5 +946 1 6 21 0.13107200000000000000e6 +946 1 11 26 -0.13107200000000000000e6 +946 2 1 15 -0.65536000000000000000e5 +946 2 6 12 0.65536000000000000000e5 +946 3 1 6 0.65536000000000000000e5 +946 3 2 15 -0.65536000000000000000e5 +946 3 6 11 -0.65536000000000000000e5 +946 3 12 15 0.65536000000000000000e5 +946 4 4 8 -0.65536000000000000000e5 +947 3 6 19 -0.65536000000000000000e5 +947 3 12 16 0.65536000000000000000e5 +948 1 2 33 -0.65536000000000000000e5 +948 1 17 32 0.65536000000000000000e5 +948 3 12 17 0.65536000000000000000e5 +949 1 2 33 0.65536000000000000000e5 +949 1 3 34 -0.13107200000000000000e6 +949 1 4 35 0.65536000000000000000e5 +949 1 26 33 0.65536000000000000000e5 +949 2 12 18 0.65536000000000000000e5 +949 3 12 18 0.65536000000000000000e5 +949 3 13 18 0.65536000000000000000e5 +949 3 17 18 0.65536000000000000000e5 +950 1 2 9 0.65536000000000000000e5 +950 1 26 29 -0.65536000000000000000e5 +950 2 6 20 0.65536000000000000000e5 +950 2 14 20 -0.65536000000000000000e5 +950 3 2 7 -0.65536000000000000000e5 +950 3 2 15 -0.65536000000000000000e5 +950 3 5 18 -0.65536000000000000000e5 +950 3 7 20 0.65536000000000000000e5 +950 3 12 19 0.65536000000000000000e5 +950 3 14 19 -0.13107200000000000000e6 +951 3 12 20 0.65536000000000000000e5 +951 3 17 18 -0.65536000000000000000e5 +952 1 1 8 -0.65536000000000000000e5 +952 1 2 9 0.65536000000000000000e5 +952 1 3 26 -0.32768000000000000000e5 +952 1 4 35 0.32768000000000000000e5 +952 1 6 21 0.13107200000000000000e6 +952 1 11 26 -0.13107200000000000000e6 +952 2 1 15 -0.65536000000000000000e5 +952 2 3 17 -0.32768000000000000000e5 +952 2 6 12 0.65536000000000000000e5 +952 2 12 18 0.32768000000000000000e5 +952 3 1 6 0.65536000000000000000e5 +952 3 2 7 -0.65536000000000000000e5 +952 3 2 15 -0.13107200000000000000e6 +952 3 6 11 -0.65536000000000000000e5 +952 3 13 13 0.65536000000000000000e5 +952 3 13 18 0.32768000000000000000e5 +952 4 4 8 -0.65536000000000000000e5 +952 4 8 8 0.65536000000000000000e5 +953 1 1 8 -0.65536000000000000000e5 +953 1 3 34 0.65536000000000000000e5 +953 1 6 21 0.13107200000000000000e6 +953 1 11 26 -0.13107200000000000000e6 +953 2 1 15 -0.65536000000000000000e5 +953 2 6 12 0.65536000000000000000e5 +953 3 1 6 0.65536000000000000000e5 +953 3 2 15 -0.65536000000000000000e5 +953 3 6 11 -0.65536000000000000000e5 +953 3 13 14 0.65536000000000000000e5 +953 4 4 8 -0.65536000000000000000e5 +954 1 1 8 -0.65536000000000000000e5 +954 1 2 33 0.32768000000000000000e5 +954 1 3 26 -0.32768000000000000000e5 +954 1 3 34 -0.13107200000000000000e6 +954 1 4 35 0.32768000000000000000e5 +954 1 5 28 -0.32768000000000000000e5 +954 1 6 21 0.13107200000000000000e6 +954 1 7 22 0.13107200000000000000e6 +954 1 11 26 -0.13107200000000000000e6 +954 2 1 15 -0.65536000000000000000e5 +954 2 3 17 -0.32768000000000000000e5 +954 2 4 18 -0.32768000000000000000e5 +954 2 6 12 0.65536000000000000000e5 +954 2 6 20 -0.65536000000000000000e5 +954 2 12 18 0.65536000000000000000e5 +954 3 1 6 0.65536000000000000000e5 +954 3 2 15 -0.65536000000000000000e5 +954 3 3 16 -0.13107200000000000000e6 +954 3 4 17 -0.32768000000000000000e5 +954 3 5 18 0.65536000000000000000e5 +954 3 6 11 -0.65536000000000000000e5 +954 3 6 19 -0.13107200000000000000e6 +954 3 13 15 0.65536000000000000000e5 +954 3 13 18 0.32768000000000000000e5 +954 4 4 8 -0.65536000000000000000e5 +954 4 8 8 0.65536000000000000000e5 +955 1 12 27 -0.65536000000000000000e5 +955 1 22 29 0.65536000000000000000e5 +955 3 13 16 0.65536000000000000000e5 +956 1 2 33 0.65536000000000000000e5 +956 1 3 34 -0.13107200000000000000e6 +956 1 4 35 0.65536000000000000000e5 +956 1 26 33 0.65536000000000000000e5 +956 2 12 18 0.65536000000000000000e5 +956 3 13 17 0.65536000000000000000e5 +956 3 13 18 0.65536000000000000000e5 +956 3 17 18 0.65536000000000000000e5 +957 3 7 20 -0.65536000000000000000e5 +957 3 13 19 0.65536000000000000000e5 +958 1 2 9 -0.13107200000000000000e6 +958 1 3 34 -0.13107200000000000000e6 +958 1 16 35 -0.65536000000000000000e5 +958 1 17 32 0.65536000000000000000e5 +958 1 20 35 0.13107200000000000000e6 +958 1 26 29 0.13107200000000000000e6 +958 2 6 20 -0.13107200000000000000e6 +958 2 14 20 0.13107200000000000000e6 +958 3 2 7 0.13107200000000000000e6 +958 3 2 15 0.13107200000000000000e6 +958 3 5 18 0.13107200000000000000e6 +958 3 7 20 -0.13107200000000000000e6 +958 3 13 20 0.65536000000000000000e5 +958 3 14 19 0.26214400000000000000e6 +958 3 17 18 0.65536000000000000000e5 +958 4 10 10 0.13107200000000000000e6 +959 1 11 26 -0.32768000000000000000e5 +959 1 16 31 0.32768000000000000000e5 +959 3 14 14 0.65536000000000000000e5 +960 3 6 19 -0.65536000000000000000e5 +960 3 14 15 0.65536000000000000000e5 +961 1 11 26 -0.32768000000000000000e5 +961 1 12 27 -0.32768000000000000000e5 +961 1 16 31 0.32768000000000000000e5 +961 1 22 29 0.32768000000000000000e5 +961 3 6 19 -0.32768000000000000000e5 +961 3 14 16 0.65536000000000000000e5 +961 4 6 10 -0.32768000000000000000e5 +962 1 2 9 -0.65536000000000000000e5 +962 1 26 29 0.65536000000000000000e5 +962 3 2 7 0.65536000000000000000e5 +962 3 2 15 0.65536000000000000000e5 +962 3 5 18 0.65536000000000000000e5 +962 3 14 17 0.65536000000000000000e5 +963 1 2 9 0.65536000000000000000e5 +963 1 26 29 -0.65536000000000000000e5 +963 2 6 20 0.65536000000000000000e5 +963 2 14 20 -0.65536000000000000000e5 +963 3 2 7 -0.65536000000000000000e5 +963 3 2 15 -0.65536000000000000000e5 +963 3 5 18 -0.65536000000000000000e5 +963 3 7 20 0.65536000000000000000e5 +963 3 14 18 0.65536000000000000000e5 +963 3 14 19 -0.13107200000000000000e6 +964 1 2 9 -0.65536000000000000000e5 +964 1 3 34 -0.65536000000000000000e5 +964 1 20 35 0.65536000000000000000e5 +964 1 26 29 0.65536000000000000000e5 +964 2 6 20 -0.65536000000000000000e5 +964 2 14 20 0.65536000000000000000e5 +964 3 2 7 0.65536000000000000000e5 +964 3 2 15 0.65536000000000000000e5 +964 3 5 18 0.65536000000000000000e5 +964 3 7 20 -0.65536000000000000000e5 +964 3 14 19 0.13107200000000000000e6 +964 3 14 20 0.65536000000000000000e5 +965 1 12 27 -0.32768000000000000000e5 +965 1 22 29 0.32768000000000000000e5 +965 3 15 15 0.65536000000000000000e5 +966 1 13 28 -0.65536000000000000000e5 +966 1 23 30 0.65536000000000000000e5 +966 3 15 16 0.65536000000000000000e5 +967 1 2 9 0.65536000000000000000e5 +967 1 26 29 -0.65536000000000000000e5 +967 2 6 20 0.65536000000000000000e5 +967 2 14 20 -0.65536000000000000000e5 +967 3 2 7 -0.65536000000000000000e5 +967 3 2 15 -0.65536000000000000000e5 +967 3 5 18 -0.65536000000000000000e5 +967 3 7 20 0.65536000000000000000e5 +967 3 14 19 -0.13107200000000000000e6 +967 3 15 17 0.65536000000000000000e5 +968 3 7 20 -0.65536000000000000000e5 +968 3 15 18 0.65536000000000000000e5 +969 1 22 29 -0.65536000000000000000e5 +969 1 29 30 0.65536000000000000000e5 +969 3 15 19 0.65536000000000000000e5 +970 3 10 19 -0.32768000000000000000e5 +970 3 16 16 0.65536000000000000000e5 +971 3 14 19 -0.65536000000000000000e5 +971 3 16 17 0.65536000000000000000e5 +972 1 22 29 -0.65536000000000000000e5 +972 1 29 30 0.65536000000000000000e5 +972 3 16 18 0.65536000000000000000e5 +973 1 23 30 -0.65536000000000000000e5 +973 1 25 32 0.65536000000000000000e5 +973 3 16 19 0.65536000000000000000e5 +974 1 29 30 -0.65536000000000000000e5 +974 1 31 32 0.65536000000000000000e5 +974 3 16 20 0.65536000000000000000e5 +975 1 16 35 0.32768000000000000000e5 +975 1 17 32 -0.32768000000000000000e5 +975 3 17 17 0.65536000000000000000e5 +976 1 2 9 -0.65536000000000000000e5 +976 1 3 34 -0.65536000000000000000e5 +976 1 20 35 0.65536000000000000000e5 +976 1 26 29 0.65536000000000000000e5 +976 2 6 20 -0.65536000000000000000e5 +976 2 14 20 0.65536000000000000000e5 +976 3 2 7 0.65536000000000000000e5 +976 3 2 15 0.65536000000000000000e5 +976 3 5 18 0.65536000000000000000e5 +976 3 7 20 -0.65536000000000000000e5 +976 3 14 19 0.13107200000000000000e6 +976 3 17 19 0.65536000000000000000e5 +977 1 2 9 -0.13107200000000000000e6 +977 1 3 34 -0.13107200000000000000e6 +977 1 7 22 0.26214400000000000000e6 +977 1 26 33 -0.65536000000000000000e5 +977 1 28 35 -0.65536000000000000000e5 +977 1 32 33 -0.65536000000000000000e5 +977 2 6 20 -0.13107200000000000000e6 +977 2 20 20 -0.13107200000000000000e6 +977 3 2 7 0.13107200000000000000e6 +977 3 2 15 0.13107200000000000000e6 +977 3 3 16 -0.26214400000000000000e6 +977 3 5 18 0.13107200000000000000e6 +977 3 6 19 -0.26214400000000000000e6 +977 3 7 20 -0.13107200000000000000e6 +977 3 15 20 -0.13107200000000000000e6 +977 3 17 20 0.65536000000000000000e5 +977 3 19 20 -0.13107200000000000000e6 +978 1 2 9 -0.65536000000000000000e5 +978 1 3 34 -0.65536000000000000000e5 +978 1 16 35 -0.32768000000000000000e5 +978 1 17 32 0.32768000000000000000e5 +978 1 20 35 0.65536000000000000000e5 +978 1 26 29 0.65536000000000000000e5 +978 2 6 20 -0.65536000000000000000e5 +978 2 14 20 0.65536000000000000000e5 +978 3 2 7 0.65536000000000000000e5 +978 3 2 15 0.65536000000000000000e5 +978 3 5 18 0.65536000000000000000e5 +978 3 7 20 -0.65536000000000000000e5 +978 3 14 19 0.13107200000000000000e6 +978 3 17 18 0.32768000000000000000e5 +978 3 18 18 0.65536000000000000000e5 +978 4 10 10 0.65536000000000000000e5 +979 3 15 20 -0.65536000000000000000e5 +979 3 18 19 0.65536000000000000000e5 +980 1 2 9 0.13107200000000000000e6 +980 1 3 34 0.13107200000000000000e6 +980 1 4 35 -0.65536000000000000000e5 +980 1 16 35 0.65536000000000000000e5 +980 1 17 32 -0.65536000000000000000e5 +980 1 20 35 -0.13107200000000000000e6 +980 1 26 29 -0.13107200000000000000e6 +980 1 32 33 0.65536000000000000000e5 +980 2 6 20 0.13107200000000000000e6 +980 2 14 20 -0.13107200000000000000e6 +980 3 2 7 -0.13107200000000000000e6 +980 3 2 15 -0.13107200000000000000e6 +980 3 5 18 -0.13107200000000000000e6 +980 3 7 20 0.13107200000000000000e6 +980 3 14 19 -0.26214400000000000000e6 +980 3 17 18 -0.65536000000000000000e5 +980 3 18 20 0.65536000000000000000e5 +980 4 10 10 -0.13107200000000000000e6 +981 1 29 30 -0.32768000000000000000e5 +981 1 31 32 0.32768000000000000000e5 +981 3 19 19 0.65536000000000000000e5 +982 1 32 33 -0.32768000000000000000e5 +982 1 32 35 0.32768000000000000000e5 +982 3 20 20 0.65536000000000000000e5 +983 1 2 5 -0.65536000000000000000e5 +983 1 3 10 0.26214400000000000000e6 +983 1 3 18 0.65536000000000000000e5 +983 1 6 21 -0.26214400000000000000e6 +983 2 1 7 -0.13107200000000000000e6 +983 2 1 15 0.13107200000000000000e6 +983 3 1 2 0.65536000000000000000e5 +983 3 1 6 -0.26214400000000000000e6 +983 3 2 7 -0.13107200000000000000e6 +983 4 1 2 0.65536000000000000000e5 +983 4 2 2 -0.13107200000000000000e6 +984 4 1 3 0.65536000000000000000e5 +984 4 2 2 -0.13107200000000000000e6 +985 1 1 2 0.32768000000000000000e5 +985 1 1 16 -0.32768000000000000000e5 +985 1 2 5 -0.32768000000000000000e5 +985 1 3 10 0.52428800000000000000e6 +985 1 3 18 0.32768000000000000000e5 +985 1 4 11 0.26214400000000000000e6 +985 1 6 21 -0.52428800000000000000e6 +985 1 7 22 -0.13107200000000000000e6 +985 1 8 23 -0.26214400000000000000e6 +985 1 11 26 0.13107200000000000000e6 +985 1 12 27 0.13107200000000000000e6 +985 2 1 7 -0.13107200000000000000e6 +985 2 1 15 0.13107200000000000000e6 +985 2 3 9 0.13107200000000000000e6 +985 2 6 8 0.26214400000000000000e6 +985 2 8 14 -0.26214400000000000000e6 +985 3 1 2 0.32768000000000000000e5 +985 3 1 6 -0.65536000000000000000e5 +985 3 2 3 -0.32768000000000000000e5 +985 3 2 7 -0.13107200000000000000e6 +985 3 3 8 0.39321600000000000000e6 +985 3 3 16 -0.13107200000000000000e6 +985 3 4 9 0.13107200000000000000e6 +985 3 5 10 -0.52428800000000000000e6 +985 3 9 14 0.26214400000000000000e6 +985 4 1 1 0.65536000000000000000e5 +985 4 1 4 0.65536000000000000000e5 +985 4 2 2 -0.65536000000000000000e5 +985 4 2 6 0.13107200000000000000e6 +985 4 4 4 0.26214400000000000000e6 +985 4 5 9 -0.13107200000000000000e6 +986 2 1 7 -0.65536000000000000000e5 +986 2 1 15 0.65536000000000000000e5 +986 4 1 5 0.65536000000000000000e5 +987 4 1 6 0.65536000000000000000e5 +987 4 4 4 -0.13107200000000000000e6 +988 1 2 5 0.65536000000000000000e5 +988 1 3 10 -0.26214400000000000000e6 +988 1 3 18 -0.65536000000000000000e5 +988 1 6 21 0.26214400000000000000e6 +988 2 1 3 -0.65536000000000000000e5 +988 2 1 7 0.13107200000000000000e6 +988 2 1 15 -0.13107200000000000000e6 +988 2 11 11 0.13107200000000000000e6 +988 3 1 2 -0.65536000000000000000e5 +988 3 1 6 0.26214400000000000000e6 +988 3 2 7 0.13107200000000000000e6 +988 4 1 7 0.65536000000000000000e5 +988 4 2 2 0.13107200000000000000e6 +989 2 2 12 -0.65536000000000000000e5 +989 2 11 17 0.65536000000000000000e5 +989 4 1 8 0.65536000000000000000e5 +989 4 7 7 0.13107200000000000000e6 +990 1 6 21 -0.13107200000000000000e6 +990 1 16 23 0.13107200000000000000e6 +990 3 1 14 0.65536000000000000000e5 +990 3 2 15 0.65536000000000000000e5 +990 3 6 11 0.65536000000000000000e5 +990 4 1 9 0.65536000000000000000e5 +991 4 1 10 0.65536000000000000000e5 +991 4 7 7 -0.13107200000000000000e6 +992 2 2 4 -0.65536000000000000000e5 +992 2 3 17 0.65536000000000000000e5 +992 4 2 3 0.65536000000000000000e5 +992 4 3 7 0.65536000000000000000e5 +993 2 1 7 -0.65536000000000000000e5 +993 2 1 15 0.65536000000000000000e5 +993 4 2 4 0.65536000000000000000e5 +994 1 2 9 -0.65536000000000000000e5 +994 1 3 10 0.13107200000000000000e6 +994 1 4 11 0.13107200000000000000e6 +994 1 5 8 -0.65536000000000000000e5 +994 1 5 20 -0.65536000000000000000e5 +994 1 6 21 -0.13107200000000000000e6 +994 2 1 7 -0.65536000000000000000e5 +994 2 1 15 0.65536000000000000000e5 +994 2 4 6 -0.65536000000000000000e5 +994 3 1 6 -0.65536000000000000000e5 +994 3 3 8 -0.13107200000000000000e6 +994 4 2 5 0.65536000000000000000e5 +995 2 2 12 -0.65536000000000000000e5 +995 2 11 17 0.65536000000000000000e5 +995 4 2 7 0.65536000000000000000e5 +995 4 7 7 0.13107200000000000000e6 +996 4 2 8 0.65536000000000000000e5 +996 4 3 7 -0.65536000000000000000e5 +997 4 2 9 0.65536000000000000000e5 +997 4 4 8 -0.65536000000000000000e5 +998 1 2 9 0.13107200000000000000e6 +998 1 3 26 -0.65536000000000000000e5 +998 1 3 34 -0.13107200000000000000e6 +998 1 4 35 0.65536000000000000000e5 +998 2 3 17 -0.65536000000000000000e5 +998 2 12 18 0.65536000000000000000e5 +998 3 2 7 -0.13107200000000000000e6 +998 3 2 15 -0.13107200000000000000e6 +998 3 5 18 -0.13107200000000000000e6 +998 3 11 12 0.65536000000000000000e5 +998 3 13 18 0.65536000000000000000e5 +998 4 2 10 0.65536000000000000000e5 +999 1 2 9 -0.65536000000000000000e5 +999 1 3 10 0.13107200000000000000e6 +999 1 4 11 0.13107200000000000000e6 +999 1 5 8 -0.65536000000000000000e5 +999 1 5 20 -0.65536000000000000000e5 +999 1 6 21 -0.13107200000000000000e6 +999 2 1 7 -0.65536000000000000000e5 +999 2 1 15 0.65536000000000000000e5 +999 2 4 6 -0.65536000000000000000e5 +999 3 1 6 -0.65536000000000000000e5 +999 3 3 8 -0.13107200000000000000e6 +999 4 3 4 0.65536000000000000000e5 +1000 2 4 6 -0.65536000000000000000e5 +1000 2 4 14 0.65536000000000000000e5 +1000 4 3 5 0.65536000000000000000e5 +1001 1 7 22 -0.65536000000000000000e5 +1001 1 8 23 0.13107200000000000000e6 +1001 1 11 26 -0.65536000000000000000e5 +1001 1 12 27 -0.65536000000000000000e5 +1001 2 3 9 -0.65536000000000000000e5 +1001 3 3 16 0.65536000000000000000e5 +1001 3 9 14 -0.13107200000000000000e6 +1001 4 3 6 0.65536000000000000000e5 +1001 4 5 9 0.65536000000000000000e5 +1002 1 1 8 0.13107200000000000000e6 +1002 1 2 9 0.26214400000000000000e6 +1002 1 2 17 0.65536000000000000000e5 +1002 1 3 18 0.65536000000000000000e5 +1002 1 4 19 0.65536000000000000000e5 +1002 1 5 20 -0.13107200000000000000e6 +1002 1 6 21 -0.26214400000000000000e6 +1002 2 1 15 0.13107200000000000000e6 +1002 2 2 12 0.65536000000000000000e5 +1002 2 3 17 -0.65536000000000000000e5 +1002 2 12 18 0.65536000000000000000e5 +1002 3 1 6 -0.13107200000000000000e6 +1002 3 2 7 -0.26214400000000000000e6 +1002 4 3 7 -0.65536000000000000000e5 +1002 4 3 8 0.65536000000000000000e5 +1002 4 8 8 0.13107200000000000000e6 +1003 1 1 8 -0.13107200000000000000e6 +1003 1 2 33 0.32768000000000000000e5 +1003 1 3 26 -0.32768000000000000000e5 +1003 1 3 34 -0.65536000000000000000e5 +1003 1 4 35 0.32768000000000000000e5 +1003 1 5 28 -0.32768000000000000000e5 +1003 1 6 21 0.26214400000000000000e6 +1003 1 7 22 0.13107200000000000000e6 +1003 1 11 26 -0.26214400000000000000e6 +1003 2 1 15 -0.13107200000000000000e6 +1003 2 3 17 -0.32768000000000000000e5 +1003 2 4 14 -0.65536000000000000000e5 +1003 2 4 18 -0.32768000000000000000e5 +1003 2 6 12 0.13107200000000000000e6 +1003 2 12 18 0.65536000000000000000e5 +1003 3 1 6 0.13107200000000000000e6 +1003 3 2 15 -0.13107200000000000000e6 +1003 3 3 16 -0.13107200000000000000e6 +1003 3 4 17 -0.32768000000000000000e5 +1003 3 6 11 -0.13107200000000000000e6 +1003 3 13 18 0.32768000000000000000e5 +1003 4 3 9 0.65536000000000000000e5 +1003 4 4 8 -0.13107200000000000000e6 +1003 4 8 8 0.65536000000000000000e5 +1004 4 3 10 0.65536000000000000000e5 +1004 4 8 8 -0.13107200000000000000e6 +1005 4 2 6 -0.65536000000000000000e5 +1005 4 4 5 0.65536000000000000000e5 +1006 2 6 8 -0.65536000000000000000e5 +1006 2 8 14 0.65536000000000000000e5 +1006 4 4 6 0.65536000000000000000e5 +1007 1 6 21 -0.13107200000000000000e6 +1007 1 16 23 0.13107200000000000000e6 +1007 3 1 14 0.65536000000000000000e5 +1007 3 2 15 0.65536000000000000000e5 +1007 3 6 11 0.65536000000000000000e5 +1007 4 4 7 0.65536000000000000000e5 +1008 2 2 16 -0.65536000000000000000e5 +1008 2 5 19 0.65536000000000000000e5 +1008 4 4 9 0.65536000000000000000e5 +1009 1 1 32 -0.32768000000000000000e5 +1009 1 2 9 -0.65536000000000000000e5 +1009 1 2 33 -0.32768000000000000000e5 +1009 1 3 26 -0.32768000000000000000e5 +1009 1 3 34 -0.65536000000000000000e5 +1009 1 16 31 0.13107200000000000000e6 +1009 2 6 12 -0.65536000000000000000e5 +1009 2 11 17 -0.32768000000000000000e5 +1009 3 2 7 0.65536000000000000000e5 +1009 3 2 15 0.65536000000000000000e5 +1009 3 5 18 0.65536000000000000000e5 +1009 3 11 12 0.32768000000000000000e5 +1009 4 4 8 0.65536000000000000000e5 +1009 4 4 10 0.65536000000000000000e5 +1010 1 7 22 -0.32768000000000000000e5 +1010 1 8 23 0.65536000000000000000e5 +1010 1 11 26 -0.32768000000000000000e5 +1010 1 12 27 -0.32768000000000000000e5 +1010 2 3 9 -0.32768000000000000000e5 +1010 3 3 16 0.32768000000000000000e5 +1010 3 9 14 -0.65536000000000000000e5 +1010 4 5 5 0.65536000000000000000e5 +1010 4 5 9 0.32768000000000000000e5 +1011 1 1 8 -0.16384000000000000000e5 +1011 1 3 10 0.32768000000000000000e5 +1011 1 4 11 0.32768000000000000000e5 +1011 1 4 15 0.13107200000000000000e6 +1011 1 5 20 0.16384000000000000000e5 +1011 1 6 21 0.32768000000000000000e5 +1011 1 7 14 -0.13107200000000000000e6 +1011 1 9 12 -0.65536000000000000000e5 +1011 2 1 15 -0.16384000000000000000e5 +1011 2 2 16 0.32768000000000000000e5 +1011 2 4 10 -0.65536000000000000000e5 +1011 2 6 12 0.16384000000000000000e5 +1011 2 10 12 0.65536000000000000000e5 +1011 3 1 6 0.16384000000000000000e5 +1011 3 3 8 0.32768000000000000000e5 +1011 4 2 6 0.32768000000000000000e5 +1011 4 5 6 0.65536000000000000000e5 +1012 4 4 8 -0.65536000000000000000e5 +1012 4 5 7 0.65536000000000000000e5 +1013 1 1 8 -0.13107200000000000000e6 +1013 1 2 33 0.32768000000000000000e5 +1013 1 3 26 -0.32768000000000000000e5 +1013 1 3 34 -0.65536000000000000000e5 +1013 1 4 35 0.32768000000000000000e5 +1013 1 5 28 -0.32768000000000000000e5 +1013 1 6 21 0.26214400000000000000e6 +1013 1 7 22 0.13107200000000000000e6 +1013 1 11 26 -0.26214400000000000000e6 +1013 2 1 15 -0.13107200000000000000e6 +1013 2 3 17 -0.32768000000000000000e5 +1013 2 4 14 -0.65536000000000000000e5 +1013 2 4 18 -0.32768000000000000000e5 +1013 2 6 12 0.13107200000000000000e6 +1013 2 12 18 0.65536000000000000000e5 +1013 3 1 6 0.13107200000000000000e6 +1013 3 2 15 -0.13107200000000000000e6 +1013 3 3 16 -0.13107200000000000000e6 +1013 3 4 17 -0.32768000000000000000e5 +1013 3 6 11 -0.13107200000000000000e6 +1013 3 13 18 0.32768000000000000000e5 +1013 4 4 8 -0.13107200000000000000e6 +1013 4 5 8 0.65536000000000000000e5 +1013 4 8 8 0.65536000000000000000e5 +1014 1 1 8 0.13107200000000000000e6 +1014 1 2 33 -0.32768000000000000000e5 +1014 1 3 26 0.32768000000000000000e5 +1014 1 3 34 0.65536000000000000000e5 +1014 1 4 35 -0.32768000000000000000e5 +1014 1 5 28 0.32768000000000000000e5 +1014 1 6 21 -0.26214400000000000000e6 +1014 1 7 22 -0.13107200000000000000e6 +1014 1 11 26 0.26214400000000000000e6 +1014 2 1 15 0.13107200000000000000e6 +1014 2 3 17 0.32768000000000000000e5 +1014 2 4 18 0.32768000000000000000e5 +1014 2 6 12 -0.13107200000000000000e6 +1014 2 6 20 0.65536000000000000000e5 +1014 2 12 18 -0.65536000000000000000e5 +1014 3 1 6 -0.13107200000000000000e6 +1014 3 2 15 0.13107200000000000000e6 +1014 3 3 16 0.13107200000000000000e6 +1014 3 4 17 0.32768000000000000000e5 +1014 3 6 11 0.13107200000000000000e6 +1014 3 13 18 -0.32768000000000000000e5 +1014 4 4 8 0.13107200000000000000e6 +1014 4 5 10 0.65536000000000000000e5 +1014 4 8 8 -0.65536000000000000000e5 +1015 2 2 16 -0.65536000000000000000e5 +1015 2 5 19 0.65536000000000000000e5 +1015 4 6 7 0.65536000000000000000e5 +1016 4 5 9 -0.65536000000000000000e5 +1016 4 6 8 0.65536000000000000000e5 +1017 2 10 12 -0.65536000000000000000e5 +1017 2 14 16 0.65536000000000000000e5 +1017 4 6 9 0.65536000000000000000e5 +1018 1 2 9 0.13107200000000000000e6 +1018 1 3 26 -0.65536000000000000000e5 +1018 1 3 34 -0.13107200000000000000e6 +1018 1 4 35 0.65536000000000000000e5 +1018 2 3 17 -0.65536000000000000000e5 +1018 2 12 18 0.65536000000000000000e5 +1018 3 2 7 -0.13107200000000000000e6 +1018 3 2 15 -0.13107200000000000000e6 +1018 3 5 18 -0.13107200000000000000e6 +1018 3 11 12 0.65536000000000000000e5 +1018 3 13 18 0.65536000000000000000e5 +1018 4 7 8 0.65536000000000000000e5 +1019 1 1 32 -0.32768000000000000000e5 +1019 1 2 9 -0.65536000000000000000e5 +1019 1 2 33 -0.32768000000000000000e5 +1019 1 3 26 -0.32768000000000000000e5 +1019 1 3 34 -0.65536000000000000000e5 +1019 1 16 31 0.13107200000000000000e6 +1019 2 6 12 -0.65536000000000000000e5 +1019 2 11 17 -0.32768000000000000000e5 +1019 3 2 7 0.65536000000000000000e5 +1019 3 2 15 0.65536000000000000000e5 +1019 3 5 18 0.65536000000000000000e5 +1019 3 11 12 0.32768000000000000000e5 +1019 4 4 8 0.65536000000000000000e5 +1019 4 7 9 0.65536000000000000000e5 +1020 1 2 9 -0.13107200000000000000e6 +1020 1 3 26 0.65536000000000000000e5 +1020 1 3 34 0.13107200000000000000e6 +1020 1 4 35 -0.65536000000000000000e5 +1020 2 12 18 -0.65536000000000000000e5 +1020 2 17 17 0.13107200000000000000e6 +1020 3 2 7 0.13107200000000000000e6 +1020 3 2 15 0.13107200000000000000e6 +1020 3 5 18 0.13107200000000000000e6 +1020 3 11 12 -0.65536000000000000000e5 +1020 3 13 18 -0.65536000000000000000e5 +1020 4 7 10 0.65536000000000000000e5 +1021 1 1 8 0.13107200000000000000e6 +1021 1 2 33 -0.32768000000000000000e5 +1021 1 3 26 0.32768000000000000000e5 +1021 1 3 34 0.65536000000000000000e5 +1021 1 4 35 -0.32768000000000000000e5 +1021 1 5 28 0.32768000000000000000e5 +1021 1 6 21 -0.26214400000000000000e6 +1021 1 7 22 -0.13107200000000000000e6 +1021 1 11 26 0.26214400000000000000e6 +1021 2 1 15 0.13107200000000000000e6 +1021 2 3 17 0.32768000000000000000e5 +1021 2 4 18 0.32768000000000000000e5 +1021 2 6 12 -0.13107200000000000000e6 +1021 2 6 20 0.65536000000000000000e5 +1021 2 12 18 -0.65536000000000000000e5 +1021 3 1 6 -0.13107200000000000000e6 +1021 3 2 15 0.13107200000000000000e6 +1021 3 3 16 0.13107200000000000000e6 +1021 3 4 17 0.32768000000000000000e5 +1021 3 6 11 0.13107200000000000000e6 +1021 3 13 18 -0.32768000000000000000e5 +1021 4 4 8 0.13107200000000000000e6 +1021 4 8 8 -0.65536000000000000000e5 +1021 4 8 9 0.65536000000000000000e5 +1022 1 2 9 0.13107200000000000000e6 +1022 1 3 34 0.13107200000000000000e6 +1022 1 4 35 -0.65536000000000000000e5 +1022 1 17 32 -0.65536000000000000000e5 +1022 1 26 29 -0.13107200000000000000e6 +1022 1 26 33 -0.65536000000000000000e5 +1022 2 6 20 0.13107200000000000000e6 +1022 2 12 18 -0.65536000000000000000e5 +1022 2 14 20 -0.13107200000000000000e6 +1022 3 2 7 -0.13107200000000000000e6 +1022 3 2 15 -0.13107200000000000000e6 +1022 3 5 18 -0.13107200000000000000e6 +1022 3 7 20 0.13107200000000000000e6 +1022 3 14 19 -0.26214400000000000000e6 +1022 3 17 18 -0.65536000000000000000e5 +1022 4 8 10 0.65536000000000000000e5 +1023 4 6 10 -0.32768000000000000000e5 +1023 4 9 9 0.65536000000000000000e5 +1024 2 6 20 -0.65536000000000000000e5 +1024 2 14 20 0.65536000000000000000e5 +1024 4 9 10 0.65536000000000000000e5 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +1582 +4 +35 20 35 20 +-0.26214400000000000000e6 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 -0.32768000000000000000e6 0.0 -0.13107200000000000000e6 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.78643200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.78643200000000000000e6 0.0 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 -0.26214400000000000000e6 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.19660800000000000000e6 0.0 -0.32768000000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.26214400000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.26214400000000000000e6 0.0 0.26214400000000000000e6 0.26214400000000000000e6 0.0 -0.52428800000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.0 0.26214400000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 -0.52428800000000000000e6 -0.52428800000000000000e6 0.0 0.26214400000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.26214400000000000000e6 0.0 0.26214400000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.52428800000000000000e6 0.0 -0.52428800000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.10485760000000000000e7 0.52428800000000000000e6 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.52428800000000000000e6 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.26214400000000000000e6 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.26214400000000000000e6 0.0 +0 1 1 6 0.32768000000000000000e5 +0 1 1 8 -0.32768000000000000000e5 +0 1 1 16 -0.16384000000000000000e5 +0 1 2 5 -0.32768000000000000000e5 +0 1 2 17 0.16384000000000000000e5 +0 1 3 18 0.16384000000000000000e5 +0 1 4 27 -0.16384000000000000000e5 +0 1 9 16 0.32768000000000000000e5 +0 2 1 1 -0.32768000000000000000e5 +0 2 1 3 0.16384000000000000000e5 +0 2 3 17 -0.16384000000000000000e5 +0 3 1 2 0.16384000000000000000e5 +0 3 1 6 -0.32768000000000000000e5 +0 3 2 3 -0.16384000000000000000e5 +0 3 2 7 0.65536000000000000000e5 +0 3 4 17 -0.16384000000000000000e5 +0 4 1 1 0.32768000000000000000e5 +0 4 1 13 -0.16384000000000000000e5 +0 4 2 2 -0.65536000000000000000e5 +1 1 30 33 0.32768000000000000000e5 +1 1 34 35 -0.32768000000000000000e5 +1 3 32 33 -0.16384000000000000000e5 +1 3 32 35 -0.16384000000000000000e5 +1 3 33 35 -0.16384000000000000000e5 +1 3 35 35 -0.32768000000000000000e5 +2 1 3 34 -0.49152000000000000000e5 +2 1 5 20 0.16384000000000000000e5 +2 1 13 28 0.65536000000000000000e5 +2 1 19 34 -0.16384000000000000000e5 +2 1 20 35 0.32768000000000000000e5 +2 1 25 32 -0.65536000000000000000e5 +2 1 34 35 0.16384000000000000000e5 +2 2 6 20 -0.16384000000000000000e5 +2 2 14 20 0.16384000000000000000e5 +2 3 2 31 -0.32768000000000000000e5 +2 3 4 25 0.65536000000000000000e5 +2 3 5 34 -0.16384000000000000000e5 +2 3 6 19 -0.16384000000000000000e5 +2 3 6 35 0.32768000000000000000e5 +2 3 8 21 -0.32768000000000000000e5 +2 3 9 22 -0.32768000000000000000e5 +2 3 16 29 -0.16384000000000000000e5 +2 3 17 22 0.16384000000000000000e5 +2 3 17 30 -0.32768000000000000000e5 +2 3 18 23 -0.65536000000000000000e5 +2 3 19 34 -0.16384000000000000000e5 +2 3 21 34 0.32768000000000000000e5 +2 3 22 27 -0.32768000000000000000e5 +2 3 22 35 -0.16384000000000000000e5 +2 3 29 34 0.32768000000000000000e5 +2 3 30 35 -0.16384000000000000000e5 +2 3 34 35 -0.16384000000000000000e5 +2 4 4 16 -0.32768000000000000000e5 +2 4 6 18 0.16384000000000000000e5 +2 4 8 20 -0.32768000000000000000e5 +2 4 12 16 -0.32768000000000000000e5 +2 4 14 18 -0.16384000000000000000e5 +3 1 30 33 0.32768000000000000000e5 +3 1 33 34 -0.32768000000000000000e5 +3 3 32 33 -0.16384000000000000000e5 +3 3 33 35 -0.16384000000000000000e5 +4 1 3 34 0.32768000000000000000e5 +4 1 17 24 -0.65536000000000000000e5 +4 1 20 27 0.32768000000000000000e5 +4 1 28 35 0.16384000000000000000e5 +4 1 32 35 0.16384000000000000000e5 +4 2 6 20 0.32768000000000000000e5 +4 3 2 31 0.65536000000000000000e5 +4 3 17 30 0.32768000000000000000e5 +4 3 20 33 0.32768000000000000000e5 +4 3 20 35 0.32768000000000000000e5 +4 3 32 33 -0.16384000000000000000e5 +4 3 32 35 -0.16384000000000000000e5 +5 1 9 24 0.32768000000000000000e5 +5 1 31 34 -0.32768000000000000000e5 +5 3 4 25 -0.32768000000000000000e5 +5 3 14 27 -0.32768000000000000000e5 +5 3 21 34 -0.16384000000000000000e5 +5 3 24 35 -0.16384000000000000000e5 +5 3 29 34 -0.16384000000000000000e5 +5 3 34 34 -0.32768000000000000000e5 +6 1 3 34 -0.49152000000000000000e5 +6 1 5 20 0.16384000000000000000e5 +6 1 13 28 0.65536000000000000000e5 +6 1 19 34 -0.16384000000000000000e5 +6 1 20 35 0.32768000000000000000e5 +6 1 25 32 -0.65536000000000000000e5 +6 1 33 34 0.16384000000000000000e5 +6 2 6 20 -0.16384000000000000000e5 +6 2 14 20 0.16384000000000000000e5 +6 3 2 31 -0.32768000000000000000e5 +6 3 4 25 0.65536000000000000000e5 +6 3 5 34 -0.16384000000000000000e5 +6 3 6 19 -0.16384000000000000000e5 +6 3 6 35 0.32768000000000000000e5 +6 3 8 21 -0.32768000000000000000e5 +6 3 9 22 -0.32768000000000000000e5 +6 3 16 29 -0.16384000000000000000e5 +6 3 17 22 0.16384000000000000000e5 +6 3 17 30 -0.32768000000000000000e5 +6 3 18 23 -0.65536000000000000000e5 +6 3 19 34 -0.16384000000000000000e5 +6 3 21 34 0.32768000000000000000e5 +6 3 22 27 -0.32768000000000000000e5 +6 3 22 35 -0.16384000000000000000e5 +6 3 30 35 -0.16384000000000000000e5 +6 4 4 16 -0.32768000000000000000e5 +6 4 6 18 0.16384000000000000000e5 +6 4 8 20 -0.32768000000000000000e5 +6 4 12 16 -0.32768000000000000000e5 +6 4 14 18 -0.16384000000000000000e5 +7 1 12 27 -0.32768000000000000000e5 +7 1 17 24 0.32768000000000000000e5 +7 1 20 27 -0.16384000000000000000e5 +7 1 20 35 -0.16384000000000000000e5 +7 1 34 35 0.16384000000000000000e5 +7 2 6 20 -0.16384000000000000000e5 +7 3 2 31 -0.32768000000000000000e5 +7 3 6 35 -0.16384000000000000000e5 +7 3 18 23 0.32768000000000000000e5 +7 3 20 33 -0.16384000000000000000e5 +7 3 20 35 -0.16384000000000000000e5 +7 3 22 27 0.16384000000000000000e5 +7 3 26 31 0.32768000000000000000e5 +7 4 14 18 0.16384000000000000000e5 +8 1 3 34 0.32768000000000000000e5 +8 1 4 27 0.16384000000000000000e5 +8 1 4 35 0.16384000000000000000e5 +8 1 17 24 -0.65536000000000000000e5 +8 1 20 27 0.32768000000000000000e5 +8 1 26 33 -0.16384000000000000000e5 +8 1 28 35 0.16384000000000000000e5 +8 2 4 18 0.16384000000000000000e5 +8 2 6 20 0.32768000000000000000e5 +8 2 18 20 -0.16384000000000000000e5 +8 3 2 31 0.65536000000000000000e5 +8 3 3 32 -0.16384000000000000000e5 +8 3 5 26 0.16384000000000000000e5 +8 3 17 22 -0.32768000000000000000e5 +8 3 17 30 0.32768000000000000000e5 +8 3 18 19 0.16384000000000000000e5 +8 3 19 32 0.16384000000000000000e5 +8 3 27 32 -0.16384000000000000000e5 +8 3 32 33 -0.16384000000000000000e5 +8 4 13 17 -0.16384000000000000000e5 +9 1 3 34 -0.32768000000000000000e5 +9 1 4 27 -0.16384000000000000000e5 +9 1 4 35 -0.16384000000000000000e5 +9 1 17 24 0.65536000000000000000e5 +9 1 20 27 -0.32768000000000000000e5 +9 1 20 35 -0.32768000000000000000e5 +9 1 26 33 0.16384000000000000000e5 +9 1 28 35 -0.16384000000000000000e5 +9 1 32 35 0.16384000000000000000e5 +9 2 4 18 -0.16384000000000000000e5 +9 2 6 20 -0.32768000000000000000e5 +9 2 18 20 0.16384000000000000000e5 +9 2 20 20 -0.32768000000000000000e5 +9 3 2 31 -0.65536000000000000000e5 +9 3 3 32 0.16384000000000000000e5 +9 3 5 26 -0.16384000000000000000e5 +9 3 17 22 0.32768000000000000000e5 +9 3 17 30 -0.32768000000000000000e5 +9 3 18 19 -0.16384000000000000000e5 +9 3 19 32 -0.16384000000000000000e5 +9 3 20 35 -0.32768000000000000000e5 +9 3 27 32 0.16384000000000000000e5 +9 4 13 17 0.16384000000000000000e5 +10 1 9 24 -0.16384000000000000000e5 +10 1 31 34 0.16384000000000000000e5 +10 3 4 25 0.16384000000000000000e5 +10 3 13 34 0.32768000000000000000e5 +10 3 14 27 0.16384000000000000000e5 +10 3 24 29 0.16384000000000000000e5 +10 3 31 34 -0.16384000000000000000e5 +11 3 21 34 -0.16384000000000000000e5 +11 3 24 29 0.32768000000000000000e5 +11 3 24 35 -0.16384000000000000000e5 +12 1 3 34 0.81920000000000000000e4 +12 1 12 19 0.16384000000000000000e5 +12 1 12 27 0.16384000000000000000e5 +12 1 13 28 -0.32768000000000000000e5 +12 1 20 35 -0.81920000000000000000e4 +12 2 6 20 0.81920000000000000000e4 +12 2 14 20 -0.81920000000000000000e4 +12 3 2 31 0.16384000000000000000e5 +12 3 4 25 -0.32768000000000000000e5 +12 3 6 35 -0.81920000000000000000e4 +12 3 8 21 0.16384000000000000000e5 +12 3 9 22 0.16384000000000000000e5 +12 3 16 29 0.81920000000000000000e4 +12 3 17 30 0.81920000000000000000e4 +12 3 21 34 -0.16384000000000000000e5 +12 3 26 31 -0.16384000000000000000e5 +12 3 29 34 -0.16384000000000000000e5 +12 4 4 16 0.16384000000000000000e5 +12 4 8 20 0.16384000000000000000e5 +12 4 12 16 0.16384000000000000000e5 +13 1 3 34 -0.49152000000000000000e5 +13 1 5 20 0.16384000000000000000e5 +13 1 13 28 0.65536000000000000000e5 +13 1 19 34 -0.16384000000000000000e5 +13 1 20 35 0.32768000000000000000e5 +13 1 25 32 -0.65536000000000000000e5 +13 1 30 33 0.16384000000000000000e5 +13 2 6 20 -0.16384000000000000000e5 +13 2 14 20 0.16384000000000000000e5 +13 3 2 31 -0.32768000000000000000e5 +13 3 4 25 0.65536000000000000000e5 +13 3 5 34 -0.16384000000000000000e5 +13 3 6 19 -0.16384000000000000000e5 +13 3 6 35 0.32768000000000000000e5 +13 3 8 21 -0.32768000000000000000e5 +13 3 9 22 -0.32768000000000000000e5 +13 3 16 29 -0.16384000000000000000e5 +13 3 17 22 0.16384000000000000000e5 +13 3 17 30 -0.32768000000000000000e5 +13 3 18 23 -0.65536000000000000000e5 +13 3 19 34 -0.16384000000000000000e5 +13 3 22 27 -0.32768000000000000000e5 +13 3 22 35 -0.16384000000000000000e5 +13 4 4 16 -0.32768000000000000000e5 +13 4 6 18 0.16384000000000000000e5 +13 4 8 20 -0.32768000000000000000e5 +13 4 12 16 -0.32768000000000000000e5 +13 4 14 18 -0.16384000000000000000e5 +14 1 12 27 -0.32768000000000000000e5 +14 1 17 24 0.32768000000000000000e5 +14 1 20 27 -0.16384000000000000000e5 +14 1 20 35 -0.16384000000000000000e5 +14 1 33 34 0.16384000000000000000e5 +14 2 6 20 -0.16384000000000000000e5 +14 3 2 31 -0.32768000000000000000e5 +14 3 6 35 -0.16384000000000000000e5 +14 3 18 23 0.32768000000000000000e5 +14 3 20 33 -0.16384000000000000000e5 +14 3 22 27 0.16384000000000000000e5 +14 4 14 18 0.16384000000000000000e5 +15 1 20 27 -0.16384000000000000000e5 +15 2 14 20 -0.16384000000000000000e5 +15 3 6 35 -0.16384000000000000000e5 +15 3 16 29 0.16384000000000000000e5 +15 3 20 33 -0.16384000000000000000e5 +15 3 20 35 -0.16384000000000000000e5 +16 1 3 34 -0.32768000000000000000e5 +16 1 4 27 -0.32768000000000000000e5 +16 1 4 35 -0.32768000000000000000e5 +16 1 17 24 0.65536000000000000000e5 +16 1 19 34 -0.32768000000000000000e5 +16 1 20 27 -0.32768000000000000000e5 +16 1 26 33 0.16384000000000000000e5 +16 1 28 35 -0.16384000000000000000e5 +16 1 30 33 0.32768000000000000000e5 +16 1 32 35 0.16384000000000000000e5 +16 1 33 34 0.32768000000000000000e5 +16 1 34 35 -0.32768000000000000000e5 +16 2 4 18 -0.32768000000000000000e5 +16 2 6 20 -0.32768000000000000000e5 +16 2 18 20 0.16384000000000000000e5 +16 3 2 31 -0.65536000000000000000e5 +16 3 3 32 0.32768000000000000000e5 +16 3 5 26 -0.32768000000000000000e5 +16 3 17 22 0.65536000000000000000e5 +16 3 17 30 -0.32768000000000000000e5 +16 3 18 19 -0.32768000000000000000e5 +16 3 19 32 -0.32768000000000000000e5 +16 3 20 33 0.32768000000000000000e5 +16 3 27 32 0.16384000000000000000e5 +16 3 32 33 -0.16384000000000000000e5 +16 4 13 17 0.32768000000000000000e5 +16 4 20 20 -0.32768000000000000000e5 +17 1 3 34 0.32768000000000000000e5 +17 1 4 27 0.16384000000000000000e5 +17 1 4 35 0.16384000000000000000e5 +17 1 17 24 -0.65536000000000000000e5 +17 1 20 27 0.32768000000000000000e5 +17 1 26 33 -0.16384000000000000000e5 +17 1 28 35 0.16384000000000000000e5 +17 2 4 18 0.16384000000000000000e5 +17 2 6 20 0.32768000000000000000e5 +17 2 18 20 -0.16384000000000000000e5 +17 3 2 31 0.65536000000000000000e5 +17 3 3 32 -0.16384000000000000000e5 +17 3 5 26 0.16384000000000000000e5 +17 3 17 22 -0.32768000000000000000e5 +17 3 17 30 0.32768000000000000000e5 +17 3 18 19 0.16384000000000000000e5 +17 3 19 32 0.16384000000000000000e5 +17 3 20 33 -0.32768000000000000000e5 +17 4 13 17 -0.16384000000000000000e5 +18 1 4 27 0.16384000000000000000e5 +18 1 4 35 0.16384000000000000000e5 +18 1 20 35 -0.32768000000000000000e5 +18 2 4 18 0.16384000000000000000e5 +18 2 18 20 -0.16384000000000000000e5 +18 3 3 32 -0.16384000000000000000e5 +18 3 5 26 0.16384000000000000000e5 +18 3 6 35 -0.32768000000000000000e5 +18 3 17 22 -0.32768000000000000000e5 +18 3 18 19 0.16384000000000000000e5 +18 3 19 32 0.16384000000000000000e5 +18 3 20 33 -0.32768000000000000000e5 +18 3 27 32 -0.16384000000000000000e5 +18 4 13 17 -0.16384000000000000000e5 +19 1 2 33 -0.16384000000000000000e5 +19 1 4 27 -0.32768000000000000000e5 +19 1 4 35 -0.32768000000000000000e5 +19 1 17 24 0.65536000000000000000e5 +19 1 17 32 0.16384000000000000000e5 +19 1 20 27 -0.65536000000000000000e5 +19 1 26 33 0.16384000000000000000e5 +19 1 28 35 -0.16384000000000000000e5 +19 2 4 18 -0.32768000000000000000e5 +19 2 6 20 -0.32768000000000000000e5 +19 2 12 18 -0.16384000000000000000e5 +19 2 18 20 0.32768000000000000000e5 +19 2 20 20 -0.32768000000000000000e5 +19 3 2 31 -0.65536000000000000000e5 +19 3 3 32 0.32768000000000000000e5 +19 3 4 33 0.16384000000000000000e5 +19 3 5 26 -0.32768000000000000000e5 +19 3 6 35 -0.32768000000000000000e5 +19 3 16 29 0.32768000000000000000e5 +19 3 17 22 0.65536000000000000000e5 +19 3 17 30 -0.65536000000000000000e5 +19 3 18 19 -0.32768000000000000000e5 +19 3 19 32 -0.32768000000000000000e5 +19 3 20 33 0.32768000000000000000e5 +19 3 20 35 -0.32768000000000000000e5 +19 3 27 32 0.16384000000000000000e5 +19 4 13 17 0.49152000000000000000e5 +19 4 17 17 0.32768000000000000000e5 +20 1 15 22 0.32768000000000000000e5 +20 1 15 30 -0.32768000000000000000e5 +20 3 13 34 -0.16384000000000000000e5 +20 3 15 28 0.16384000000000000000e5 +20 3 20 25 0.16384000000000000000e5 +20 3 25 30 -0.16384000000000000000e5 +20 3 25 34 -0.16384000000000000000e5 +20 4 16 16 0.32768000000000000000e5 +21 1 14 29 -0.32768000000000000000e5 +21 1 25 32 0.16384000000000000000e5 +21 1 31 34 0.16384000000000000000e5 +21 3 20 25 0.32768000000000000000e5 +22 1 3 34 -0.81920000000000000000e4 +22 1 12 19 0.16384000000000000000e5 +22 1 12 27 0.16384000000000000000e5 +22 1 13 28 -0.32768000000000000000e5 +22 1 20 35 0.81920000000000000000e4 +22 3 2 31 0.16384000000000000000e5 +22 3 4 25 -0.32768000000000000000e5 +22 3 6 35 0.81920000000000000000e4 +22 3 8 21 0.16384000000000000000e5 +22 3 9 22 0.16384000000000000000e5 +22 3 17 30 -0.81920000000000000000e4 +22 3 18 31 -0.16384000000000000000e5 +22 3 21 34 -0.16384000000000000000e5 +22 3 22 27 -0.81920000000000000000e4 +22 4 4 16 0.16384000000000000000e5 +22 4 12 16 0.16384000000000000000e5 +22 4 14 18 -0.81920000000000000000e4 +23 1 3 34 -0.16384000000000000000e5 +23 1 7 22 0.16384000000000000000e5 +23 1 8 23 -0.32768000000000000000e5 +23 1 12 27 0.16384000000000000000e5 +23 1 20 35 0.16384000000000000000e5 +23 2 6 20 -0.81920000000000000000e4 +23 2 14 20 0.81920000000000000000e4 +23 3 2 31 -0.16384000000000000000e5 +23 3 6 35 0.16384000000000000000e5 +23 3 7 20 0.16384000000000000000e5 +23 3 8 21 0.16384000000000000000e5 +23 3 13 26 0.32768000000000000000e5 +23 3 16 29 -0.81920000000000000000e4 +23 3 17 30 -0.16384000000000000000e5 +23 3 18 23 -0.16384000000000000000e5 +23 3 22 27 -0.81920000000000000000e4 +23 3 26 31 -0.16384000000000000000e5 +23 4 8 12 0.16384000000000000000e5 +23 4 14 18 -0.81920000000000000000e4 +24 1 3 34 -0.49152000000000000000e5 +24 1 5 20 0.16384000000000000000e5 +24 1 13 28 0.65536000000000000000e5 +24 1 20 35 0.32768000000000000000e5 +24 1 25 32 -0.65536000000000000000e5 +24 2 6 20 -0.16384000000000000000e5 +24 2 14 20 0.16384000000000000000e5 +24 3 2 31 -0.32768000000000000000e5 +24 3 4 25 0.65536000000000000000e5 +24 3 5 34 -0.16384000000000000000e5 +24 3 6 19 -0.16384000000000000000e5 +24 3 6 35 0.32768000000000000000e5 +24 3 8 21 -0.32768000000000000000e5 +24 3 9 22 -0.32768000000000000000e5 +24 3 16 29 -0.16384000000000000000e5 +24 3 17 22 0.16384000000000000000e5 +24 3 17 30 -0.32768000000000000000e5 +24 3 18 23 -0.65536000000000000000e5 +24 3 18 31 -0.32768000000000000000e5 +24 3 19 34 -0.16384000000000000000e5 +24 3 22 27 -0.32768000000000000000e5 +24 4 4 16 -0.32768000000000000000e5 +24 4 6 18 0.16384000000000000000e5 +24 4 8 20 -0.32768000000000000000e5 +24 4 12 16 -0.32768000000000000000e5 +24 4 14 18 -0.16384000000000000000e5 +25 1 3 34 -0.16384000000000000000e5 +25 1 12 27 -0.32768000000000000000e5 +25 1 17 24 0.32768000000000000000e5 +25 1 20 27 -0.16384000000000000000e5 +25 1 30 33 0.16384000000000000000e5 +25 2 6 20 -0.16384000000000000000e5 +25 3 2 31 -0.32768000000000000000e5 +25 3 17 30 -0.16384000000000000000e5 +25 3 18 23 0.32768000000000000000e5 +26 1 3 34 -0.16384000000000000000e5 +26 1 20 27 -0.16384000000000000000e5 +26 1 20 35 0.16384000000000000000e5 +26 2 6 20 -0.16384000000000000000e5 +26 3 6 35 0.16384000000000000000e5 +26 3 17 30 -0.16384000000000000000e5 +26 3 20 33 -0.16384000000000000000e5 +27 1 16 31 -0.32768000000000000000e5 +27 1 20 27 0.16384000000000000000e5 +27 1 20 35 0.16384000000000000000e5 +27 3 16 29 -0.16384000000000000000e5 +28 1 3 34 -0.32768000000000000000e5 +28 1 4 27 -0.32768000000000000000e5 +28 1 4 35 -0.32768000000000000000e5 +28 1 17 24 0.65536000000000000000e5 +28 1 19 34 -0.32768000000000000000e5 +28 1 20 27 -0.32768000000000000000e5 +28 1 26 33 0.16384000000000000000e5 +28 1 28 35 -0.16384000000000000000e5 +28 1 30 33 0.32768000000000000000e5 +28 1 32 35 0.16384000000000000000e5 +28 1 33 34 0.32768000000000000000e5 +28 1 34 35 -0.32768000000000000000e5 +28 2 4 18 -0.32768000000000000000e5 +28 2 6 20 -0.32768000000000000000e5 +28 2 18 20 0.16384000000000000000e5 +28 3 2 31 -0.65536000000000000000e5 +28 3 3 32 0.32768000000000000000e5 +28 3 5 26 -0.32768000000000000000e5 +28 3 17 22 0.65536000000000000000e5 +28 3 17 30 -0.32768000000000000000e5 +28 3 18 19 -0.32768000000000000000e5 +28 3 19 32 -0.16384000000000000000e5 +28 3 20 33 0.32768000000000000000e5 +28 3 22 27 -0.32768000000000000000e5 +28 3 27 32 0.16384000000000000000e5 +28 3 28 33 0.16384000000000000000e5 +28 3 32 33 -0.16384000000000000000e5 +28 4 13 17 0.32768000000000000000e5 +28 4 20 20 -0.32768000000000000000e5 +29 1 4 27 -0.16384000000000000000e5 +29 2 4 18 -0.16384000000000000000e5 +29 3 3 32 0.16384000000000000000e5 +29 3 5 26 -0.16384000000000000000e5 +29 3 17 22 0.32768000000000000000e5 +29 3 17 30 -0.32768000000000000000e5 +29 3 18 19 -0.16384000000000000000e5 +29 3 19 32 -0.16384000000000000000e5 +29 4 13 17 0.16384000000000000000e5 +30 1 2 33 -0.16384000000000000000e5 +30 1 4 27 0.16384000000000000000e5 +30 1 26 33 -0.16384000000000000000e5 +30 2 4 18 0.16384000000000000000e5 +30 2 12 18 -0.16384000000000000000e5 +30 2 18 20 -0.16384000000000000000e5 +30 3 3 32 -0.16384000000000000000e5 +30 3 4 33 0.16384000000000000000e5 +30 3 5 26 0.16384000000000000000e5 +30 3 17 22 -0.32768000000000000000e5 +30 3 17 30 -0.32768000000000000000e5 +30 3 18 19 0.16384000000000000000e5 +30 3 19 32 0.16384000000000000000e5 +30 3 20 33 -0.32768000000000000000e5 +31 1 17 32 0.16384000000000000000e5 +31 1 20 27 -0.32768000000000000000e5 +31 1 26 33 0.16384000000000000000e5 +32 1 3 34 0.32768000000000000000e5 +32 1 4 27 -0.16384000000000000000e5 +32 1 16 31 -0.65536000000000000000e5 +32 1 20 27 0.65536000000000000000e5 +32 2 4 18 -0.16384000000000000000e5 +32 2 6 12 0.32768000000000000000e5 +32 2 17 17 -0.32768000000000000000e5 +32 2 18 20 0.16384000000000000000e5 +32 3 3 32 0.16384000000000000000e5 +32 3 5 26 -0.16384000000000000000e5 +32 3 6 35 -0.32768000000000000000e5 +32 3 16 29 -0.32768000000000000000e5 +32 3 17 22 0.32768000000000000000e5 +32 3 18 19 -0.16384000000000000000e5 +32 3 19 32 -0.16384000000000000000e5 +32 3 20 33 0.32768000000000000000e5 +32 4 2 14 -0.32768000000000000000e5 +32 4 5 17 -0.32768000000000000000e5 +32 4 13 17 0.16384000000000000000e5 +32 4 17 17 0.32768000000000000000e5 +33 1 14 21 0.81920000000000000000e4 +33 1 14 29 -0.81920000000000000000e4 +33 1 22 25 -0.81920000000000000000e4 +33 1 24 31 0.81920000000000000000e4 +33 3 10 23 0.81920000000000000000e4 +33 3 11 24 0.81920000000000000000e4 +33 3 12 25 0.16384000000000000000e5 +33 3 13 14 0.32768000000000000000e5 +33 3 15 28 -0.81920000000000000000e4 +33 3 15 34 -0.16384000000000000000e5 +33 3 20 25 -0.81920000000000000000e4 +33 3 24 25 -0.16384000000000000000e5 +33 4 10 14 0.81920000000000000000e4 +33 4 10 16 0.16384000000000000000e5 +33 4 16 16 -0.16384000000000000000e5 +34 1 15 22 0.32768000000000000000e5 +34 1 15 30 -0.32768000000000000000e5 +34 1 22 25 -0.16384000000000000000e5 +34 1 24 31 0.16384000000000000000e5 +34 3 25 30 -0.16384000000000000000e5 +35 1 8 15 -0.32768000000000000000e5 +35 1 14 21 0.16384000000000000000e5 +35 1 24 31 0.16384000000000000000e5 +35 3 2 15 0.16384000000000000000e5 +35 3 8 13 0.16384000000000000000e5 +35 3 10 23 0.16384000000000000000e5 +35 3 11 12 0.16384000000000000000e5 +35 3 11 24 0.16384000000000000000e5 +35 3 13 34 -0.16384000000000000000e5 +35 3 20 25 -0.16384000000000000000e5 +35 4 6 10 0.16384000000000000000e5 +35 4 10 14 0.16384000000000000000e5 +36 1 22 25 -0.32768000000000000000e5 +36 1 24 31 0.32768000000000000000e5 +36 3 14 35 0.16384000000000000000e5 +36 3 24 29 0.16384000000000000000e5 +37 1 3 34 0.81920000000000000000e4 +37 1 9 24 0.16384000000000000000e5 +37 1 14 29 -0.32768000000000000000e5 +37 1 20 35 -0.81920000000000000000e4 +37 1 25 32 0.16384000000000000000e5 +37 2 6 20 0.40960000000000000000e4 +37 2 14 20 -0.40960000000000000000e4 +37 3 4 25 -0.16384000000000000000e5 +37 3 6 35 -0.81920000000000000000e4 +37 3 14 27 -0.16384000000000000000e5 +37 3 16 29 0.40960000000000000000e4 +37 3 17 30 0.81920000000000000000e4 +37 3 18 31 0.81920000000000000000e4 +37 3 22 27 0.40960000000000000000e4 +37 3 24 29 -0.16384000000000000000e5 +37 4 8 20 0.81920000000000000000e4 +37 4 14 18 0.40960000000000000000e4 +38 1 7 14 -0.32768000000000000000e5 +38 1 7 22 -0.81920000000000000000e4 +38 1 8 23 0.16384000000000000000e5 +38 1 17 24 0.81920000000000000000e4 +38 1 25 32 0.16384000000000000000e5 +38 3 2 15 0.32768000000000000000e5 +38 3 7 20 -0.81920000000000000000e4 +38 3 8 21 -0.81920000000000000000e4 +38 3 10 23 0.32768000000000000000e5 +38 3 13 26 -0.16384000000000000000e5 +38 4 8 12 -0.81920000000000000000e4 +39 1 9 24 0.32768000000000000000e5 +39 1 31 34 -0.32768000000000000000e5 +39 3 4 25 -0.32768000000000000000e5 +39 3 14 27 -0.65536000000000000000e5 +39 3 18 31 0.16384000000000000000e5 +39 3 21 34 -0.16384000000000000000e5 +39 3 24 29 -0.32768000000000000000e5 +39 3 26 31 -0.16384000000000000000e5 +39 4 16 20 -0.16384000000000000000e5 +40 1 3 34 0.16384000000000000000e5 +40 1 12 19 0.16384000000000000000e5 +40 1 12 27 0.16384000000000000000e5 +40 1 13 28 -0.65536000000000000000e5 +40 1 20 35 -0.16384000000000000000e5 +40 1 25 32 0.32768000000000000000e5 +40 2 6 20 0.81920000000000000000e4 +40 2 14 20 -0.81920000000000000000e4 +40 3 2 31 0.16384000000000000000e5 +40 3 4 25 -0.32768000000000000000e5 +40 3 6 35 -0.16384000000000000000e5 +40 3 8 21 0.16384000000000000000e5 +40 3 9 22 0.16384000000000000000e5 +40 3 16 29 0.81920000000000000000e4 +40 3 17 30 0.16384000000000000000e5 +40 3 22 27 0.81920000000000000000e4 +40 4 4 16 0.16384000000000000000e5 +40 4 8 20 0.16384000000000000000e5 +40 4 12 16 0.16384000000000000000e5 +40 4 14 18 0.81920000000000000000e4 +41 1 3 34 -0.81920000000000000000e4 +41 1 7 22 0.16384000000000000000e5 +41 1 8 23 -0.32768000000000000000e5 +41 1 12 27 0.16384000000000000000e5 +41 1 20 35 0.81920000000000000000e4 +41 3 2 31 -0.16384000000000000000e5 +41 3 6 35 0.81920000000000000000e4 +41 3 7 20 0.16384000000000000000e5 +41 3 8 21 0.16384000000000000000e5 +41 3 17 30 -0.81920000000000000000e4 +41 3 18 23 -0.16384000000000000000e5 +41 3 22 27 -0.81920000000000000000e4 +41 4 8 12 0.16384000000000000000e5 +41 4 14 18 -0.81920000000000000000e4 +42 1 3 34 -0.81920000000000000000e4 +42 1 11 26 -0.16384000000000000000e5 +42 1 16 23 -0.16384000000000000000e5 +42 1 16 31 0.16384000000000000000e5 +42 1 20 35 0.81920000000000000000e4 +42 2 5 19 -0.16384000000000000000e5 +42 2 6 20 -0.81920000000000000000e4 +42 2 14 20 0.81920000000000000000e4 +42 3 2 31 -0.16384000000000000000e5 +42 3 6 35 0.81920000000000000000e4 +42 3 16 29 -0.81920000000000000000e4 +42 3 17 30 -0.81920000000000000000e4 +43 1 3 34 -0.16384000000000000000e5 +43 1 5 20 0.16384000000000000000e5 +43 3 4 25 0.65536000000000000000e5 +43 3 5 34 -0.16384000000000000000e5 +43 3 6 19 -0.16384000000000000000e5 +43 3 8 21 -0.32768000000000000000e5 +43 3 9 22 -0.32768000000000000000e5 +43 3 17 22 0.16384000000000000000e5 +43 3 18 23 -0.32768000000000000000e5 +43 4 4 16 -0.32768000000000000000e5 +43 4 6 18 0.16384000000000000000e5 +44 1 3 34 -0.16384000000000000000e5 +44 1 12 27 -0.32768000000000000000e5 +44 1 17 24 0.32768000000000000000e5 +44 1 19 34 0.16384000000000000000e5 +44 1 20 27 -0.16384000000000000000e5 +44 2 6 20 -0.16384000000000000000e5 +44 3 2 31 -0.32768000000000000000e5 +45 1 20 27 -0.16384000000000000000e5 +45 2 6 20 -0.16384000000000000000e5 +45 3 2 31 -0.32768000000000000000e5 +45 3 17 30 -0.16384000000000000000e5 +46 1 11 26 -0.32768000000000000000e5 +46 1 20 27 0.16384000000000000000e5 +46 1 20 35 0.16384000000000000000e5 +46 3 6 35 0.16384000000000000000e5 +47 1 3 34 -0.16384000000000000000e5 +47 1 16 23 -0.32768000000000000000e5 +47 1 16 31 0.32768000000000000000e5 +47 2 6 12 -0.16384000000000000000e5 +47 3 16 29 -0.16384000000000000000e5 +47 4 2 14 0.16384000000000000000e5 +47 4 5 17 0.16384000000000000000e5 +48 1 3 34 -0.65536000000000000000e5 +48 1 4 27 -0.16384000000000000000e5 +48 1 4 35 -0.32768000000000000000e5 +48 1 5 20 0.32768000000000000000e5 +48 1 17 24 0.65536000000000000000e5 +48 1 20 27 -0.32768000000000000000e5 +48 1 28 35 -0.16384000000000000000e5 +48 1 32 35 0.16384000000000000000e5 +48 1 33 34 0.32768000000000000000e5 +48 1 34 35 -0.32768000000000000000e5 +48 2 4 18 -0.16384000000000000000e5 +48 2 6 20 -0.32768000000000000000e5 +48 3 2 31 -0.65536000000000000000e5 +48 3 3 32 0.16384000000000000000e5 +48 3 4 33 0.16384000000000000000e5 +48 3 5 26 -0.16384000000000000000e5 +48 3 6 19 -0.32768000000000000000e5 +48 3 17 22 0.65536000000000000000e5 +48 3 17 30 -0.32768000000000000000e5 +48 3 18 19 -0.16384000000000000000e5 +48 3 18 23 -0.65536000000000000000e5 +48 3 19 32 -0.16384000000000000000e5 +48 3 22 27 -0.32768000000000000000e5 +48 3 27 32 0.16384000000000000000e5 +48 3 28 33 0.16384000000000000000e5 +48 3 32 33 -0.16384000000000000000e5 +48 4 6 18 0.32768000000000000000e5 +48 4 13 17 0.16384000000000000000e5 +48 4 18 18 -0.32768000000000000000e5 +48 4 20 20 -0.32768000000000000000e5 +49 1 4 27 -0.16384000000000000000e5 +49 2 4 18 -0.16384000000000000000e5 +49 3 4 33 -0.16384000000000000000e5 +49 3 5 26 -0.16384000000000000000e5 +49 3 18 19 -0.16384000000000000000e5 +50 1 2 33 -0.16384000000000000000e5 +50 1 3 34 0.32768000000000000000e5 +50 1 5 20 -0.32768000000000000000e5 +50 2 12 18 -0.16384000000000000000e5 +50 3 3 32 0.16384000000000000000e5 +50 3 4 33 0.16384000000000000000e5 +50 3 6 19 0.32768000000000000000e5 +50 3 17 30 -0.32768000000000000000e5 +50 4 13 17 0.16384000000000000000e5 +51 1 3 34 0.32768000000000000000e5 +51 1 4 35 -0.16384000000000000000e5 +51 1 20 27 -0.32768000000000000000e5 +51 2 12 18 -0.16384000000000000000e5 +51 3 1 30 -0.32768000000000000000e5 +51 3 4 33 0.16384000000000000000e5 +51 3 17 30 -0.32768000000000000000e5 +51 4 13 17 0.16384000000000000000e5 +52 1 1 32 -0.16384000000000000000e5 +52 1 2 33 -0.16384000000000000000e5 +52 1 3 34 -0.32768000000000000000e5 +52 1 5 20 0.32768000000000000000e5 +52 1 11 26 -0.65536000000000000000e5 +52 1 16 31 0.65536000000000000000e5 +52 1 17 32 0.16384000000000000000e5 +52 2 11 17 -0.16384000000000000000e5 +52 3 1 30 0.32768000000000000000e5 +52 3 6 19 -0.32768000000000000000e5 +52 4 5 17 0.32768000000000000000e5 +53 1 1 32 0.16384000000000000000e5 +53 1 2 33 0.16384000000000000000e5 +53 1 3 34 -0.32768000000000000000e5 +53 1 4 35 0.16384000000000000000e5 +53 1 5 20 -0.32768000000000000000e5 +53 1 11 26 0.65536000000000000000e5 +53 1 16 23 -0.65536000000000000000e5 +53 1 17 32 -0.16384000000000000000e5 +53 1 20 27 0.32768000000000000000e5 +53 2 1 19 0.32768000000000000000e5 +53 2 6 12 -0.32768000000000000000e5 +53 2 12 18 0.16384000000000000000e5 +53 2 17 17 -0.32768000000000000000e5 +53 3 4 33 -0.16384000000000000000e5 +53 3 6 19 0.32768000000000000000e5 +53 3 16 29 -0.32768000000000000000e5 +53 3 17 30 0.32768000000000000000e5 +53 4 2 14 0.32768000000000000000e5 +53 4 13 17 -0.16384000000000000000e5 +54 1 14 21 -0.40960000000000000000e4 +54 1 14 29 0.40960000000000000000e4 +54 1 15 22 -0.81920000000000000000e4 +54 1 15 30 0.81920000000000000000e4 +54 3 10 15 0.16384000000000000000e5 +54 3 10 23 -0.40960000000000000000e4 +54 3 11 24 -0.40960000000000000000e4 +54 3 12 15 0.16384000000000000000e5 +54 3 12 25 -0.81920000000000000000e4 +54 3 13 14 0.16384000000000000000e5 +54 3 25 25 -0.32768000000000000000e5 +54 4 10 10 0.32768000000000000000e5 +54 4 10 14 -0.40960000000000000000e4 +54 4 10 16 -0.81920000000000000000e4 +55 1 15 22 -0.16384000000000000000e5 +55 1 15 30 0.16384000000000000000e5 +55 3 13 14 0.32768000000000000000e5 +55 3 24 25 -0.16384000000000000000e5 +56 1 10 25 -0.16384000000000000000e5 +56 1 14 21 -0.81920000000000000000e4 +56 1 14 29 0.81920000000000000000e4 +56 1 15 22 -0.16384000000000000000e5 +56 1 15 30 0.16384000000000000000e5 +56 1 22 25 -0.81920000000000000000e4 +56 1 24 31 0.81920000000000000000e4 +56 2 10 16 -0.16384000000000000000e5 +56 3 10 23 -0.81920000000000000000e4 +56 3 11 24 -0.81920000000000000000e4 +56 3 15 28 -0.81920000000000000000e4 +56 3 20 25 -0.81920000000000000000e4 +56 4 10 14 -0.81920000000000000000e4 +56 4 16 16 -0.16384000000000000000e5 +57 1 8 15 -0.32768000000000000000e5 +57 1 14 29 0.16384000000000000000e5 +57 1 24 31 0.16384000000000000000e5 +57 3 2 15 0.16384000000000000000e5 +57 3 8 13 0.16384000000000000000e5 +57 3 11 12 0.16384000000000000000e5 +57 4 6 10 0.16384000000000000000e5 +58 1 7 14 0.16384000000000000000e5 +58 1 10 25 -0.32768000000000000000e5 +58 1 14 29 0.16384000000000000000e5 +58 3 2 15 -0.16384000000000000000e5 +58 3 10 23 -0.16384000000000000000e5 +58 3 20 25 -0.16384000000000000000e5 +59 1 22 25 -0.32768000000000000000e5 +59 1 24 31 0.32768000000000000000e5 +59 3 11 24 -0.32768000000000000000e5 +59 3 14 27 0.16384000000000000000e5 +59 3 14 35 0.16384000000000000000e5 +59 3 22 31 0.16384000000000000000e5 +59 3 24 29 0.16384000000000000000e5 +60 1 9 24 0.16384000000000000000e5 +60 1 13 28 0.16384000000000000000e5 +60 1 14 21 -0.32768000000000000000e5 +60 3 4 25 -0.16384000000000000000e5 +60 3 14 27 -0.16384000000000000000e5 +61 1 3 34 0.81920000000000000000e4 +61 1 7 14 -0.32768000000000000000e5 +61 1 7 22 -0.81920000000000000000e4 +61 1 8 23 0.16384000000000000000e5 +61 1 17 24 0.81920000000000000000e4 +61 1 20 35 -0.81920000000000000000e4 +61 1 25 32 0.16384000000000000000e5 +61 2 6 20 0.40960000000000000000e4 +61 2 14 20 -0.40960000000000000000e4 +61 3 2 15 0.32768000000000000000e5 +61 3 6 35 -0.81920000000000000000e4 +61 3 7 20 -0.81920000000000000000e4 +61 3 8 21 -0.81920000000000000000e4 +61 3 16 29 0.40960000000000000000e4 +61 3 17 30 0.81920000000000000000e4 +61 3 18 31 0.81920000000000000000e4 +61 3 22 27 0.40960000000000000000e4 +61 4 8 12 -0.81920000000000000000e4 +61 4 8 20 0.81920000000000000000e4 +61 4 14 18 0.40960000000000000000e4 +62 1 7 22 -0.81920000000000000000e4 +62 1 8 23 0.16384000000000000000e5 +62 1 11 26 0.81920000000000000000e4 +62 1 13 20 -0.32768000000000000000e5 +62 1 16 23 0.81920000000000000000e4 +62 1 17 24 0.16384000000000000000e5 +62 2 5 19 0.81920000000000000000e4 +62 3 7 20 -0.81920000000000000000e4 +62 3 8 21 -0.81920000000000000000e4 +62 3 13 26 -0.16384000000000000000e5 +62 4 8 12 -0.81920000000000000000e4 +63 1 3 34 -0.24576000000000000000e5 +63 1 9 24 0.32768000000000000000e5 +63 1 13 28 0.32768000000000000000e5 +63 1 20 35 0.24576000000000000000e5 +63 1 25 32 -0.32768000000000000000e5 +63 1 31 34 -0.32768000000000000000e5 +63 2 6 20 -0.81920000000000000000e4 +63 2 14 20 0.81920000000000000000e4 +63 3 2 31 -0.16384000000000000000e5 +63 3 4 25 -0.65536000000000000000e5 +63 3 6 35 0.24576000000000000000e5 +63 3 14 27 -0.65536000000000000000e5 +63 3 16 29 -0.81920000000000000000e4 +63 3 17 30 -0.24576000000000000000e5 +63 3 18 23 -0.16384000000000000000e5 +63 3 18 31 -0.16384000000000000000e5 +63 3 21 34 -0.16384000000000000000e5 +63 3 22 27 -0.16384000000000000000e5 +63 3 26 31 -0.16384000000000000000e5 +63 4 8 20 -0.16384000000000000000e5 +63 4 12 16 -0.16384000000000000000e5 +63 4 14 18 -0.16384000000000000000e5 +63 4 15 19 -0.16384000000000000000e5 +63 4 16 20 -0.16384000000000000000e5 +64 1 3 34 0.16384000000000000000e5 +64 1 12 19 0.16384000000000000000e5 +64 1 12 27 0.16384000000000000000e5 +64 1 13 28 -0.65536000000000000000e5 +64 1 20 35 -0.16384000000000000000e5 +64 1 25 32 0.32768000000000000000e5 +64 2 6 20 0.81920000000000000000e4 +64 2 14 20 -0.81920000000000000000e4 +64 3 2 31 0.16384000000000000000e5 +64 3 4 25 -0.32768000000000000000e5 +64 3 6 35 -0.16384000000000000000e5 +64 3 8 21 0.16384000000000000000e5 +64 3 9 22 0.16384000000000000000e5 +64 3 13 18 -0.32768000000000000000e5 +64 3 16 29 0.81920000000000000000e4 +64 3 17 30 0.16384000000000000000e5 +64 3 18 23 0.16384000000000000000e5 +64 3 18 31 0.16384000000000000000e5 +64 3 22 27 0.81920000000000000000e4 +64 4 4 16 0.16384000000000000000e5 +64 4 8 20 0.16384000000000000000e5 +64 4 12 16 0.16384000000000000000e5 +64 4 14 18 0.81920000000000000000e4 +65 1 8 23 -0.32768000000000000000e5 +65 1 12 27 0.16384000000000000000e5 +65 1 17 24 0.16384000000000000000e5 +65 3 18 23 -0.16384000000000000000e5 +66 1 6 21 -0.16384000000000000000e5 +66 1 7 22 -0.16384000000000000000e5 +66 1 17 24 0.16384000000000000000e5 +66 2 2 16 -0.16384000000000000000e5 +66 3 2 31 -0.16384000000000000000e5 +66 3 7 20 -0.16384000000000000000e5 +67 1 6 21 0.16384000000000000000e5 +67 1 7 22 0.16384000000000000000e5 +67 1 8 23 0.32768000000000000000e5 +67 1 11 26 0.16384000000000000000e5 +67 1 13 20 -0.65536000000000000000e5 +67 1 16 23 0.16384000000000000000e5 +67 1 16 31 0.16384000000000000000e5 +67 2 2 16 0.16384000000000000000e5 +67 2 8 14 0.32768000000000000000e5 +67 3 7 20 0.16384000000000000000e5 +68 1 3 34 -0.16384000000000000000e5 +68 1 12 27 -0.32768000000000000000e5 +68 1 17 24 0.32768000000000000000e5 +68 1 19 34 0.16384000000000000000e5 +68 1 20 27 -0.16384000000000000000e5 +68 2 6 20 -0.16384000000000000000e5 +68 3 2 31 -0.32768000000000000000e5 +68 3 8 21 -0.32768000000000000000e5 +68 3 17 22 0.16384000000000000000e5 +68 3 22 27 0.16384000000000000000e5 +69 1 3 34 -0.16384000000000000000e5 +69 1 5 20 0.16384000000000000000e5 +69 1 7 22 -0.32768000000000000000e5 +69 1 17 24 0.32768000000000000000e5 +69 1 20 27 -0.16384000000000000000e5 +69 2 6 20 -0.16384000000000000000e5 +69 3 2 31 -0.32768000000000000000e5 +69 3 6 19 -0.16384000000000000000e5 +70 1 3 34 0.16384000000000000000e5 +70 1 11 26 -0.32768000000000000000e5 +70 1 20 27 0.16384000000000000000e5 +70 3 1 30 0.16384000000000000000e5 +70 3 7 20 -0.32768000000000000000e5 +71 1 5 20 -0.16384000000000000000e5 +71 1 6 21 -0.32768000000000000000e5 +71 1 11 26 0.32768000000000000000e5 +71 2 6 12 -0.16384000000000000000e5 +71 3 1 30 -0.16384000000000000000e5 +71 3 6 19 0.16384000000000000000e5 +71 4 2 14 0.16384000000000000000e5 +72 1 1 8 0.32768000000000000000e5 +72 1 2 9 0.16384000000000000000e5 +72 1 3 34 -0.16384000000000000000e5 +72 1 4 11 -0.65536000000000000000e5 +72 1 5 12 -0.32768000000000000000e5 +72 1 5 20 -0.16384000000000000000e5 +72 1 6 21 -0.32768000000000000000e5 +72 1 7 10 -0.65536000000000000000e5 +72 1 7 22 0.32768000000000000000e5 +72 1 8 23 0.65536000000000000000e5 +72 1 9 16 -0.16384000000000000000e5 +72 1 11 26 0.32768000000000000000e5 +72 1 12 19 0.32768000000000000000e5 +72 1 12 27 -0.32768000000000000000e5 +72 1 16 23 0.32768000000000000000e5 +72 1 16 31 0.32768000000000000000e5 +72 1 20 27 -0.16384000000000000000e5 +72 2 1 7 0.16384000000000000000e5 +72 2 1 15 0.16384000000000000000e5 +72 2 1 19 -0.16384000000000000000e5 +72 2 2 8 0.32768000000000000000e5 +72 2 3 9 -0.32768000000000000000e5 +72 2 6 12 -0.32768000000000000000e5 +72 3 1 6 0.16384000000000000000e5 +72 3 1 14 -0.65536000000000000000e5 +72 3 2 7 0.32768000000000000000e5 +72 3 2 15 0.13107200000000000000e6 +72 3 5 10 -0.65536000000000000000e5 +72 3 6 19 -0.16384000000000000000e5 +72 3 7 20 0.65536000000000000000e5 +72 3 8 21 -0.32768000000000000000e5 +72 4 1 5 0.16384000000000000000e5 +72 4 4 8 -0.32768000000000000000e5 +72 4 5 9 -0.65536000000000000000e5 +72 4 5 17 0.16384000000000000000e5 +73 1 3 34 -0.65536000000000000000e5 +73 1 4 27 -0.16384000000000000000e5 +73 1 4 35 -0.32768000000000000000e5 +73 1 5 20 0.32768000000000000000e5 +73 1 7 22 0.65536000000000000000e5 +73 1 9 16 -0.32768000000000000000e5 +73 1 28 35 -0.16384000000000000000e5 +73 1 32 35 0.16384000000000000000e5 +73 1 33 34 0.32768000000000000000e5 +73 1 34 35 -0.32768000000000000000e5 +73 2 4 18 -0.16384000000000000000e5 +73 2 6 20 -0.32768000000000000000e5 +73 3 1 30 0.32768000000000000000e5 +73 3 2 31 -0.65536000000000000000e5 +73 3 3 32 0.32768000000000000000e5 +73 3 4 33 0.16384000000000000000e5 +73 3 5 26 -0.16384000000000000000e5 +73 3 6 19 -0.32768000000000000000e5 +73 3 8 21 -0.65536000000000000000e5 +73 3 17 22 0.65536000000000000000e5 +73 3 17 30 -0.65536000000000000000e5 +73 3 18 23 -0.65536000000000000000e5 +73 3 19 32 -0.16384000000000000000e5 +73 3 27 32 0.16384000000000000000e5 +73 3 28 33 0.16384000000000000000e5 +73 3 32 33 -0.16384000000000000000e5 +73 4 3 15 0.32768000000000000000e5 +73 4 4 20 -0.16384000000000000000e5 +73 4 6 18 0.32768000000000000000e5 +73 4 7 11 -0.32768000000000000000e5 +73 4 13 17 0.32768000000000000000e5 +73 4 18 18 -0.32768000000000000000e5 +73 4 20 20 -0.32768000000000000000e5 +74 1 4 27 -0.16384000000000000000e5 +74 1 7 22 -0.65536000000000000000e5 +74 1 9 16 0.32768000000000000000e5 +74 1 17 24 0.65536000000000000000e5 +74 1 20 27 -0.32768000000000000000e5 +74 2 4 18 -0.16384000000000000000e5 +74 3 1 30 -0.32768000000000000000e5 +74 3 6 19 0.32768000000000000000e5 +74 3 18 19 -0.16384000000000000000e5 +74 4 7 11 0.32768000000000000000e5 +75 1 4 27 0.16384000000000000000e5 +75 1 4 35 0.16384000000000000000e5 +75 1 5 20 -0.32768000000000000000e5 +75 3 3 32 -0.16384000000000000000e5 +75 3 4 33 -0.16384000000000000000e5 +75 3 17 30 0.32768000000000000000e5 +75 4 13 17 -0.16384000000000000000e5 +76 1 2 33 -0.16384000000000000000e5 +76 1 3 18 0.16384000000000000000e5 +76 1 3 34 0.32768000000000000000e5 +76 1 4 35 -0.16384000000000000000e5 +76 1 9 16 -0.65536000000000000000e5 +76 1 20 27 0.32768000000000000000e5 +76 2 12 18 -0.16384000000000000000e5 +76 3 1 30 0.32768000000000000000e5 +76 3 3 16 0.16384000000000000000e5 +76 3 3 32 0.16384000000000000000e5 +76 3 4 17 0.16384000000000000000e5 +76 3 4 33 0.16384000000000000000e5 +76 3 17 30 -0.32768000000000000000e5 +76 4 1 13 0.16384000000000000000e5 +76 4 13 17 0.16384000000000000000e5 +77 1 2 33 0.16384000000000000000e5 +77 1 3 18 -0.16384000000000000000e5 +77 1 4 27 -0.16384000000000000000e5 +77 1 5 20 0.32768000000000000000e5 +77 1 9 16 0.65536000000000000000e5 +77 1 11 26 -0.65536000000000000000e5 +77 2 3 17 -0.16384000000000000000e5 +77 2 6 12 0.32768000000000000000e5 +77 3 3 16 -0.16384000000000000000e5 +77 3 4 17 -0.16384000000000000000e5 +77 3 7 20 -0.65536000000000000000e5 +77 4 1 13 -0.16384000000000000000e5 +78 1 1 32 -0.16384000000000000000e5 +78 1 2 33 -0.16384000000000000000e5 +78 1 3 34 -0.32768000000000000000e5 +78 1 4 27 0.16384000000000000000e5 +78 1 5 20 -0.65536000000000000000e5 +78 1 6 21 -0.65536000000000000000e5 +78 1 11 26 0.13107200000000000000e6 +78 1 16 31 0.65536000000000000000e5 +78 1 20 27 -0.98304000000000000000e5 +78 2 1 15 0.32768000000000000000e5 +78 2 3 17 0.16384000000000000000e5 +78 2 6 12 -0.98304000000000000000e5 +78 2 11 17 -0.32768000000000000000e5 +78 3 1 30 -0.65536000000000000000e5 +78 3 6 19 0.32768000000000000000e5 +78 3 7 20 0.65536000000000000000e5 +78 4 2 14 0.65536000000000000000e5 +78 4 5 17 0.32768000000000000000e5 +78 4 11 11 -0.32768000000000000000e5 +79 1 1 8 0.65536000000000000000e5 +79 1 1 32 0.16384000000000000000e5 +79 1 2 9 0.32768000000000000000e5 +79 1 3 18 0.16384000000000000000e5 +79 1 4 11 -0.13107200000000000000e6 +79 1 5 12 -0.65536000000000000000e5 +79 1 7 10 -0.13107200000000000000e6 +79 1 7 22 0.65536000000000000000e5 +79 1 8 23 0.13107200000000000000e6 +79 1 9 16 -0.98304000000000000000e5 +79 1 12 19 0.65536000000000000000e5 +79 1 12 27 -0.65536000000000000000e5 +79 1 16 23 0.65536000000000000000e5 +79 1 20 27 0.65536000000000000000e5 +79 2 1 7 0.32768000000000000000e5 +79 2 1 19 -0.32768000000000000000e5 +79 2 2 8 0.65536000000000000000e5 +79 2 3 9 -0.65536000000000000000e5 +79 2 5 11 0.32768000000000000000e5 +79 2 11 11 -0.32768000000000000000e5 +79 2 11 17 0.16384000000000000000e5 +79 3 1 6 0.32768000000000000000e5 +79 3 1 14 -0.13107200000000000000e6 +79 3 1 30 0.65536000000000000000e5 +79 3 2 7 0.65536000000000000000e5 +79 3 2 15 0.26214400000000000000e6 +79 3 3 16 0.16384000000000000000e5 +79 3 4 17 0.16384000000000000000e5 +79 3 5 10 -0.13107200000000000000e6 +79 3 6 19 -0.65536000000000000000e5 +79 3 7 20 0.13107200000000000000e6 +79 3 8 21 -0.65536000000000000000e5 +79 4 1 5 0.32768000000000000000e5 +79 4 1 13 0.16384000000000000000e5 +79 4 2 14 -0.65536000000000000000e5 +79 4 4 8 -0.65536000000000000000e5 +79 4 5 9 -0.13107200000000000000e6 +79 4 11 11 0.32768000000000000000e5 +80 1 4 11 0.10240000000000000000e4 +80 1 5 12 0.10240000000000000000e4 +80 1 6 21 -0.10240000000000000000e4 +80 1 7 10 -0.20480000000000000000e4 +80 1 7 22 -0.20480000000000000000e4 +80 1 8 15 -0.81920000000000000000e4 +80 1 8 23 -0.20480000000000000000e4 +80 1 10 13 -0.81920000000000000000e4 +80 1 10 25 -0.81920000000000000000e4 +80 1 11 26 -0.10240000000000000000e4 +80 1 12 19 -0.10240000000000000000e4 +80 1 13 20 0.40960000000000000000e4 +80 1 14 21 -0.40960000000000000000e4 +80 1 14 29 0.40960000000000000000e4 +80 1 15 22 -0.81920000000000000000e4 +80 1 15 30 0.81920000000000000000e4 +80 2 2 16 -0.10240000000000000000e4 +80 2 6 8 -0.20480000000000000000e4 +80 2 8 10 -0.81920000000000000000e4 +80 2 10 10 -0.32768000000000000000e5 +80 3 2 15 -0.81920000000000000000e4 +80 3 5 10 0.10240000000000000000e4 +80 3 7 20 -0.10240000000000000000e4 +80 3 8 13 -0.40960000000000000000e4 +80 3 10 15 -0.16384000000000000000e5 +80 3 10 23 -0.40960000000000000000e4 +80 3 11 24 -0.40960000000000000000e4 +80 3 12 25 -0.81920000000000000000e4 +80 3 13 14 -0.16384000000000000000e5 +80 4 4 8 0.10240000000000000000e4 +80 4 5 9 0.20480000000000000000e4 +80 4 8 8 -0.81920000000000000000e4 +80 4 10 14 -0.40960000000000000000e4 +80 4 10 16 -0.81920000000000000000e4 +81 1 10 25 -0.16384000000000000000e5 +81 1 15 22 -0.16384000000000000000e5 +81 1 15 30 0.16384000000000000000e5 +81 2 10 16 -0.16384000000000000000e5 +81 3 10 15 -0.32768000000000000000e5 +82 1 4 11 0.20480000000000000000e4 +82 1 5 12 0.20480000000000000000e4 +82 1 6 21 -0.20480000000000000000e4 +82 1 7 10 -0.40960000000000000000e4 +82 1 7 22 -0.40960000000000000000e4 +82 1 8 23 -0.40960000000000000000e4 +82 1 10 13 -0.16384000000000000000e5 +82 1 11 26 -0.20480000000000000000e4 +82 1 12 19 -0.20480000000000000000e4 +82 1 13 20 0.81920000000000000000e4 +82 1 14 21 -0.81920000000000000000e4 +82 1 14 29 0.81920000000000000000e4 +82 2 2 16 -0.20480000000000000000e4 +82 2 6 8 -0.40960000000000000000e4 +82 2 8 10 -0.16384000000000000000e5 +82 3 2 15 -0.24576000000000000000e5 +82 3 5 10 0.20480000000000000000e4 +82 3 7 20 -0.20480000000000000000e4 +82 3 8 13 -0.16384000000000000000e5 +82 3 10 23 -0.81920000000000000000e4 +82 3 11 12 -0.81920000000000000000e4 +82 3 11 24 -0.81920000000000000000e4 +82 4 4 8 0.20480000000000000000e4 +82 4 5 9 0.40960000000000000000e4 +82 4 6 10 -0.81920000000000000000e4 +82 4 8 8 -0.16384000000000000000e5 +82 4 10 14 -0.81920000000000000000e4 +83 3 11 24 0.16384000000000000000e5 +83 3 12 13 -0.32768000000000000000e5 +83 3 15 28 0.16384000000000000000e5 +84 1 8 15 -0.32768000000000000000e5 +84 1 14 21 0.16384000000000000000e5 +84 1 22 25 0.16384000000000000000e5 +85 1 4 11 0.40960000000000000000e4 +85 1 5 12 0.40960000000000000000e4 +85 1 6 21 -0.40960000000000000000e4 +85 1 7 10 -0.81920000000000000000e4 +85 1 7 14 0.16384000000000000000e5 +85 1 7 22 -0.81920000000000000000e4 +85 1 8 23 -0.81920000000000000000e4 +85 1 10 25 -0.32768000000000000000e5 +85 1 11 26 -0.40960000000000000000e4 +85 1 12 19 -0.40960000000000000000e4 +85 1 13 20 0.16384000000000000000e5 +85 1 14 29 0.16384000000000000000e5 +85 2 2 16 -0.40960000000000000000e4 +85 2 6 8 -0.81920000000000000000e4 +85 3 2 15 -0.49152000000000000000e5 +85 3 5 10 0.40960000000000000000e4 +85 3 7 20 -0.40960000000000000000e4 +85 3 8 13 -0.16384000000000000000e5 +85 4 4 8 0.40960000000000000000e4 +85 4 5 9 0.81920000000000000000e4 +85 4 8 8 -0.32768000000000000000e5 +86 1 7 14 0.16384000000000000000e5 +86 1 10 13 -0.32768000000000000000e5 +86 1 13 20 0.16384000000000000000e5 +86 3 2 15 -0.16384000000000000000e5 +86 3 10 23 -0.16384000000000000000e5 +87 1 3 34 0.81920000000000000000e4 +87 1 13 28 -0.16384000000000000000e5 +87 1 20 35 -0.81920000000000000000e4 +87 1 25 32 0.16384000000000000000e5 +87 2 6 20 0.40960000000000000000e4 +87 2 14 20 -0.40960000000000000000e4 +87 3 4 25 0.16384000000000000000e5 +87 3 6 35 -0.81920000000000000000e4 +87 3 11 12 -0.32768000000000000000e5 +87 3 11 24 -0.32768000000000000000e5 +87 3 14 35 0.16384000000000000000e5 +87 3 16 29 0.40960000000000000000e4 +87 3 17 30 0.81920000000000000000e4 +87 3 18 31 0.81920000000000000000e4 +87 3 22 27 0.40960000000000000000e4 +87 3 22 31 0.16384000000000000000e5 +87 3 24 29 0.16384000000000000000e5 +87 4 8 20 0.81920000000000000000e4 +87 4 10 18 -0.16384000000000000000e5 +87 4 14 18 0.40960000000000000000e4 +88 1 9 24 0.16384000000000000000e5 +88 1 13 28 0.16384000000000000000e5 +88 1 14 21 -0.32768000000000000000e5 +88 3 4 25 -0.16384000000000000000e5 +88 3 8 13 -0.32768000000000000000e5 +88 3 13 18 0.16384000000000000000e5 +89 1 7 14 -0.32768000000000000000e5 +89 1 8 23 0.16384000000000000000e5 +89 1 13 28 0.16384000000000000000e5 +90 1 4 11 0.81920000000000000000e4 +90 1 5 12 0.81920000000000000000e4 +90 1 7 10 -0.16384000000000000000e5 +90 1 7 22 -0.16384000000000000000e5 +90 1 12 19 -0.81920000000000000000e4 +90 1 17 24 0.81920000000000000000e4 +90 2 6 8 -0.16384000000000000000e5 +90 3 2 15 -0.32768000000000000000e5 +90 3 5 10 0.81920000000000000000e4 +90 3 7 20 -0.81920000000000000000e4 +90 3 8 21 -0.81920000000000000000e4 +90 4 4 8 0.81920000000000000000e4 +90 4 5 9 0.16384000000000000000e5 +90 4 8 12 -0.81920000000000000000e4 +91 1 6 13 -0.32768000000000000000e5 +91 1 6 21 -0.81920000000000000000e4 +91 1 7 22 -0.81920000000000000000e4 +91 1 8 23 -0.16384000000000000000e5 +91 1 13 20 0.32768000000000000000e5 +91 1 16 23 0.81920000000000000000e4 +91 1 17 24 0.81920000000000000000e4 +91 2 2 16 -0.81920000000000000000e4 +91 2 5 19 0.81920000000000000000e4 +91 2 8 14 -0.16384000000000000000e5 +91 3 7 20 -0.81920000000000000000e4 +92 1 3 34 -0.81920000000000000000e4 +92 1 8 23 0.32768000000000000000e5 +92 1 9 24 0.65536000000000000000e5 +92 1 13 28 0.32768000000000000000e5 +92 1 14 21 -0.65536000000000000000e5 +92 1 20 35 0.81920000000000000000e4 +92 1 31 34 -0.32768000000000000000e5 +92 2 4 10 0.32768000000000000000e5 +92 3 1 14 -0.32768000000000000000e5 +92 3 2 15 0.65536000000000000000e5 +92 3 4 25 -0.32768000000000000000e5 +92 3 6 35 0.81920000000000000000e4 +92 3 8 13 -0.65536000000000000000e5 +92 3 8 21 -0.16384000000000000000e5 +92 3 9 22 -0.16384000000000000000e5 +92 3 13 18 0.32768000000000000000e5 +92 3 14 27 -0.32768000000000000000e5 +92 3 17 30 -0.81920000000000000000e4 +92 3 18 23 -0.16384000000000000000e5 +92 3 21 34 -0.16384000000000000000e5 +92 3 22 27 -0.81920000000000000000e4 +92 3 26 31 -0.16384000000000000000e5 +92 4 4 16 -0.16384000000000000000e5 +92 4 5 9 -0.32768000000000000000e5 +92 4 7 19 -0.16384000000000000000e5 +92 4 14 18 -0.81920000000000000000e4 +92 4 15 19 -0.16384000000000000000e5 +92 4 16 20 -0.16384000000000000000e5 +93 1 4 11 -0.16384000000000000000e5 +93 1 5 12 -0.16384000000000000000e5 +93 1 7 22 0.16384000000000000000e5 +93 1 12 19 0.32768000000000000000e5 +93 1 12 27 0.16384000000000000000e5 +93 1 13 28 -0.32768000000000000000e5 +93 3 4 25 -0.32768000000000000000e5 +93 3 5 10 -0.16384000000000000000e5 +93 3 8 21 0.32768000000000000000e5 +93 3 9 22 0.16384000000000000000e5 +93 3 13 18 -0.32768000000000000000e5 +93 4 4 8 -0.16384000000000000000e5 +93 4 4 16 0.16384000000000000000e5 +94 1 4 11 0.16384000000000000000e5 +94 1 5 12 0.16384000000000000000e5 +94 1 8 23 -0.32768000000000000000e5 +94 1 12 19 -0.16384000000000000000e5 +94 1 12 27 0.16384000000000000000e5 +94 3 1 14 0.32768000000000000000e5 +94 3 2 15 -0.65536000000000000000e5 +94 3 5 10 0.16384000000000000000e5 +94 4 4 8 0.16384000000000000000e5 +94 4 5 9 0.32768000000000000000e5 +95 1 6 21 -0.16384000000000000000e5 +95 1 7 22 -0.16384000000000000000e5 +95 1 17 24 0.16384000000000000000e5 +95 2 2 16 -0.16384000000000000000e5 +95 3 1 14 -0.32768000000000000000e5 +96 1 6 21 0.16384000000000000000e5 +96 1 7 10 -0.32768000000000000000e5 +96 1 11 26 0.16384000000000000000e5 +97 1 1 8 -0.16384000000000000000e5 +97 1 1 10 -0.16384000000000000000e5 +97 1 2 9 -0.81920000000000000000e4 +97 1 5 20 0.16384000000000000000e5 +97 1 6 21 0.16384000000000000000e5 +97 1 9 16 0.81920000000000000000e4 +97 1 11 26 -0.32768000000000000000e5 +97 1 16 23 0.16384000000000000000e5 +97 2 1 7 -0.81920000000000000000e4 +97 2 1 15 -0.81920000000000000000e4 +97 2 5 5 -0.32768000000000000000e5 +97 2 6 12 0.16384000000000000000e5 +97 3 1 6 -0.81920000000000000000e4 +97 3 2 7 -0.16384000000000000000e5 +97 3 7 20 -0.32768000000000000000e5 +97 4 1 5 -0.81920000000000000000e4 +98 1 5 12 -0.32768000000000000000e5 +98 1 7 22 -0.32768000000000000000e5 +98 1 9 16 0.16384000000000000000e5 +98 1 12 19 0.32768000000000000000e5 +98 1 17 24 0.32768000000000000000e5 +98 1 20 27 -0.16384000000000000000e5 +98 3 1 30 -0.16384000000000000000e5 +98 3 5 30 0.16384000000000000000e5 +98 3 8 21 0.32768000000000000000e5 +98 4 3 15 -0.16384000000000000000e5 +98 4 7 11 0.16384000000000000000e5 +99 1 5 20 -0.16384000000000000000e5 +99 1 7 22 0.32768000000000000000e5 +99 1 9 16 -0.16384000000000000000e5 +99 1 12 27 -0.32768000000000000000e5 +99 1 19 34 0.16384000000000000000e5 +99 2 6 20 -0.16384000000000000000e5 +99 3 1 30 0.16384000000000000000e5 +99 3 2 31 -0.32768000000000000000e5 +99 3 5 10 -0.32768000000000000000e5 +99 3 8 21 -0.32768000000000000000e5 +99 3 18 23 0.32768000000000000000e5 +99 3 22 27 0.16384000000000000000e5 +99 4 6 18 -0.16384000000000000000e5 +99 4 7 11 -0.16384000000000000000e5 +100 1 3 34 -0.16384000000000000000e5 +100 1 4 11 -0.32768000000000000000e5 +100 1 5 20 0.16384000000000000000e5 +100 1 17 24 0.32768000000000000000e5 +100 1 20 27 -0.16384000000000000000e5 +100 2 6 20 -0.16384000000000000000e5 +100 3 2 31 -0.32768000000000000000e5 +100 3 17 22 0.16384000000000000000e5 +101 1 4 11 0.65536000000000000000e5 +101 1 5 12 0.32768000000000000000e5 +101 1 5 20 0.16384000000000000000e5 +101 1 7 22 -0.32768000000000000000e5 +101 1 8 23 -0.65536000000000000000e5 +101 1 9 16 0.16384000000000000000e5 +101 1 12 19 -0.32768000000000000000e5 +101 1 12 27 0.32768000000000000000e5 +101 2 3 9 0.32768000000000000000e5 +101 3 1 14 0.65536000000000000000e5 +101 3 2 15 -0.13107200000000000000e6 +101 3 5 10 0.65536000000000000000e5 +101 3 6 19 -0.16384000000000000000e5 +101 3 8 21 0.32768000000000000000e5 +101 4 4 8 0.32768000000000000000e5 +101 4 5 9 0.65536000000000000000e5 +102 1 1 8 -0.16384000000000000000e5 +102 1 2 9 -0.16384000000000000000e5 +102 1 20 27 0.16384000000000000000e5 +102 2 1 7 -0.16384000000000000000e5 +102 3 1 30 0.16384000000000000000e5 +102 3 2 7 -0.16384000000000000000e5 +103 1 1 8 0.16384000000000000000e5 +103 1 2 9 0.16384000000000000000e5 +103 1 4 11 -0.65536000000000000000e5 +103 1 5 12 -0.32768000000000000000e5 +103 1 5 20 -0.16384000000000000000e5 +103 1 6 21 0.32768000000000000000e5 +103 1 7 10 -0.65536000000000000000e5 +103 1 7 22 0.32768000000000000000e5 +103 1 8 23 0.65536000000000000000e5 +103 1 9 16 -0.16384000000000000000e5 +103 1 11 26 0.32768000000000000000e5 +103 1 12 19 0.32768000000000000000e5 +103 1 12 27 -0.32768000000000000000e5 +103 1 20 27 -0.16384000000000000000e5 +103 2 1 7 0.16384000000000000000e5 +103 2 1 15 -0.16384000000000000000e5 +103 2 2 8 0.32768000000000000000e5 +103 2 3 9 -0.32768000000000000000e5 +103 2 6 12 -0.16384000000000000000e5 +103 3 1 14 -0.65536000000000000000e5 +103 3 1 30 -0.16384000000000000000e5 +103 3 2 7 0.16384000000000000000e5 +103 3 2 15 0.13107200000000000000e6 +103 3 5 10 -0.65536000000000000000e5 +103 3 6 19 0.16384000000000000000e5 +103 3 8 21 -0.32768000000000000000e5 +103 4 2 14 0.16384000000000000000e5 +103 4 4 8 -0.32768000000000000000e5 +103 4 5 9 -0.65536000000000000000e5 +104 1 1 8 -0.32768000000000000000e5 +104 1 1 10 -0.32768000000000000000e5 +104 1 2 9 -0.16384000000000000000e5 +104 1 4 11 0.65536000000000000000e5 +104 1 5 12 0.32768000000000000000e5 +104 1 5 20 0.49152000000000000000e5 +104 1 7 10 0.65536000000000000000e5 +104 1 7 22 -0.32768000000000000000e5 +104 1 8 23 -0.65536000000000000000e5 +104 1 9 16 0.32768000000000000000e5 +104 1 11 26 -0.98304000000000000000e5 +104 1 12 19 -0.32768000000000000000e5 +104 1 12 27 0.32768000000000000000e5 +104 1 16 23 0.32768000000000000000e5 +104 2 1 7 -0.16384000000000000000e5 +104 2 1 19 -0.16384000000000000000e5 +104 2 2 8 -0.32768000000000000000e5 +104 2 3 9 0.32768000000000000000e5 +104 2 5 11 -0.16384000000000000000e5 +104 2 6 12 0.49152000000000000000e5 +104 3 1 6 -0.16384000000000000000e5 +104 3 1 14 0.65536000000000000000e5 +104 3 2 7 -0.32768000000000000000e5 +104 3 2 15 -0.13107200000000000000e6 +104 3 5 10 0.65536000000000000000e5 +104 3 6 19 -0.16384000000000000000e5 +104 3 7 20 -0.65536000000000000000e5 +104 3 8 21 0.32768000000000000000e5 +104 4 1 5 -0.16384000000000000000e5 +104 4 2 14 -0.16384000000000000000e5 +104 4 4 8 0.32768000000000000000e5 +104 4 5 9 0.65536000000000000000e5 +105 1 3 34 -0.32768000000000000000e5 +105 1 4 27 -0.16384000000000000000e5 +105 1 4 35 -0.32768000000000000000e5 +105 1 7 22 0.65536000000000000000e5 +105 1 9 16 -0.32768000000000000000e5 +105 1 28 35 -0.16384000000000000000e5 +105 1 32 35 0.16384000000000000000e5 +105 1 33 34 0.32768000000000000000e5 +105 1 34 35 -0.32768000000000000000e5 +105 2 4 18 -0.16384000000000000000e5 +105 2 6 20 -0.32768000000000000000e5 +105 3 1 30 0.32768000000000000000e5 +105 3 2 31 -0.65536000000000000000e5 +105 3 3 32 0.32768000000000000000e5 +105 3 4 9 -0.32768000000000000000e5 +105 3 4 33 0.16384000000000000000e5 +105 3 5 18 0.16384000000000000000e5 +105 3 5 26 -0.32768000000000000000e5 +105 3 8 21 -0.65536000000000000000e5 +105 3 17 22 0.32768000000000000000e5 +105 3 17 30 -0.65536000000000000000e5 +105 3 18 19 -0.16384000000000000000e5 +105 3 19 32 -0.16384000000000000000e5 +105 3 27 32 0.16384000000000000000e5 +105 3 28 33 0.16384000000000000000e5 +105 3 32 33 -0.16384000000000000000e5 +105 4 3 15 0.32768000000000000000e5 +105 4 4 20 -0.16384000000000000000e5 +105 4 7 11 -0.32768000000000000000e5 +105 4 13 13 -0.32768000000000000000e5 +105 4 13 17 0.32768000000000000000e5 +105 4 18 18 -0.32768000000000000000e5 +105 4 20 20 -0.32768000000000000000e5 +106 1 2 9 -0.32768000000000000000e5 +106 1 4 11 -0.13107200000000000000e6 +106 1 4 19 0.16384000000000000000e5 +106 1 4 27 -0.16384000000000000000e5 +106 1 4 35 -0.16384000000000000000e5 +106 1 5 12 -0.65536000000000000000e5 +106 1 8 23 0.13107200000000000000e6 +106 1 9 16 0.65536000000000000000e5 +106 1 11 26 -0.65536000000000000000e5 +106 1 12 19 0.65536000000000000000e5 +106 1 12 27 -0.65536000000000000000e5 +106 1 17 24 0.65536000000000000000e5 +106 1 20 27 -0.32768000000000000000e5 +106 2 3 9 -0.65536000000000000000e5 +106 2 4 18 -0.16384000000000000000e5 +106 3 1 14 -0.13107200000000000000e6 +106 3 1 30 -0.32768000000000000000e5 +106 3 2 7 -0.32768000000000000000e5 +106 3 2 15 0.26214400000000000000e6 +106 3 3 32 0.16384000000000000000e5 +106 3 4 9 0.32768000000000000000e5 +106 3 4 33 0.16384000000000000000e5 +106 3 5 10 -0.19660800000000000000e6 +106 3 5 26 -0.16384000000000000000e5 +106 3 6 19 0.32768000000000000000e5 +106 3 7 20 -0.65536000000000000000e5 +106 3 8 21 -0.65536000000000000000e5 +106 3 17 30 -0.32768000000000000000e5 +106 4 2 6 -0.32768000000000000000e5 +106 4 3 7 0.32768000000000000000e5 +106 4 4 8 -0.65536000000000000000e5 +106 4 5 9 -0.13107200000000000000e6 +106 4 7 11 0.32768000000000000000e5 +106 4 13 17 0.16384000000000000000e5 +107 1 2 9 0.32768000000000000000e5 +107 1 4 11 0.13107200000000000000e6 +107 1 4 27 0.16384000000000000000e5 +107 1 4 35 0.16384000000000000000e5 +107 1 5 12 0.65536000000000000000e5 +107 1 5 20 -0.32768000000000000000e5 +107 1 7 22 -0.65536000000000000000e5 +107 1 8 23 -0.13107200000000000000e6 +107 1 9 16 -0.32768000000000000000e5 +107 1 11 26 0.65536000000000000000e5 +107 1 12 19 -0.65536000000000000000e5 +107 1 12 27 0.65536000000000000000e5 +107 2 3 9 0.65536000000000000000e5 +107 3 1 14 0.13107200000000000000e6 +107 3 2 7 0.32768000000000000000e5 +107 3 2 15 -0.26214400000000000000e6 +107 3 3 32 -0.16384000000000000000e5 +107 3 4 17 0.16384000000000000000e5 +107 3 4 33 -0.16384000000000000000e5 +107 3 5 10 0.13107200000000000000e6 +107 3 5 26 0.16384000000000000000e5 +107 3 7 20 0.65536000000000000000e5 +107 3 8 21 0.65536000000000000000e5 +107 3 17 30 0.32768000000000000000e5 +107 4 2 6 0.32768000000000000000e5 +107 4 4 8 0.65536000000000000000e5 +107 4 5 9 0.13107200000000000000e6 +107 4 13 17 -0.16384000000000000000e5 +108 1 2 9 -0.32768000000000000000e5 +108 1 3 18 0.16384000000000000000e5 +108 1 4 27 0.16384000000000000000e5 +109 1 4 27 -0.16384000000000000000e5 +109 1 5 20 0.32768000000000000000e5 +109 1 9 16 0.32768000000000000000e5 +109 1 11 26 -0.65536000000000000000e5 +109 1 20 27 0.32768000000000000000e5 +109 2 3 17 -0.16384000000000000000e5 +109 2 6 12 0.32768000000000000000e5 +109 3 1 30 0.32768000000000000000e5 +109 3 2 7 -0.32768000000000000000e5 +109 3 3 16 0.16384000000000000000e5 +109 3 7 20 -0.65536000000000000000e5 +110 1 1 8 -0.32768000000000000000e5 +110 1 2 17 0.16384000000000000000e5 +110 1 3 18 -0.16384000000000000000e5 +110 1 4 27 -0.16384000000000000000e5 +110 1 9 16 0.32768000000000000000e5 +110 2 3 17 -0.16384000000000000000e5 +110 3 3 16 -0.16384000000000000000e5 +110 3 4 17 -0.16384000000000000000e5 +110 4 1 13 -0.16384000000000000000e5 +111 1 1 8 0.98304000000000000000e5 +111 1 2 5 0.16384000000000000000e5 +111 1 2 9 0.32768000000000000000e5 +111 1 2 17 -0.16384000000000000000e5 +111 1 4 11 -0.13107200000000000000e6 +111 1 4 27 0.32768000000000000000e5 +111 1 5 12 -0.65536000000000000000e5 +111 1 5 20 -0.98304000000000000000e5 +111 1 7 10 -0.13107200000000000000e6 +111 1 7 22 0.65536000000000000000e5 +111 1 8 23 0.13107200000000000000e6 +111 1 9 16 -0.98304000000000000000e5 +111 1 11 26 0.19660800000000000000e6 +111 1 12 19 0.65536000000000000000e5 +111 1 12 27 -0.65536000000000000000e5 +111 1 20 27 -0.65536000000000000000e5 +111 2 1 3 -0.16384000000000000000e5 +111 2 1 7 0.32768000000000000000e5 +111 2 2 8 0.65536000000000000000e5 +111 2 3 9 -0.65536000000000000000e5 +111 2 3 17 0.32768000000000000000e5 +111 2 5 11 0.32768000000000000000e5 +111 2 6 12 -0.98304000000000000000e5 +111 2 11 17 -0.16384000000000000000e5 +111 3 1 2 -0.16384000000000000000e5 +111 3 1 14 -0.13107200000000000000e6 +111 3 1 30 -0.65536000000000000000e5 +111 3 2 7 0.32768000000000000000e5 +111 3 2 15 0.26214400000000000000e6 +111 3 4 17 0.16384000000000000000e5 +111 3 5 10 -0.13107200000000000000e6 +111 3 6 19 0.32768000000000000000e5 +111 3 7 20 0.13107200000000000000e6 +111 3 8 21 -0.65536000000000000000e5 +111 4 1 5 0.32768000000000000000e5 +111 4 1 13 0.16384000000000000000e5 +111 4 2 2 0.32768000000000000000e5 +111 4 2 14 0.32768000000000000000e5 +111 4 4 8 -0.65536000000000000000e5 +111 4 5 9 -0.13107200000000000000e6 +111 4 11 11 -0.32768000000000000000e5 +112 1 1 6 -0.32768000000000000000e5 +112 1 1 16 0.16384000000000000000e5 +112 1 3 18 0.16384000000000000000e5 +112 1 5 20 0.65536000000000000000e5 +112 1 9 16 -0.32768000000000000000e5 +112 1 11 26 -0.13107200000000000000e6 +112 1 16 23 0.65536000000000000000e5 +112 1 20 27 0.65536000000000000000e5 +112 2 1 19 -0.32768000000000000000e5 +112 2 6 12 0.65536000000000000000e5 +112 2 11 11 -0.32768000000000000000e5 +112 2 11 17 0.16384000000000000000e5 +112 3 1 30 0.65536000000000000000e5 +112 3 3 16 0.16384000000000000000e5 +112 3 4 17 0.16384000000000000000e5 +112 3 6 19 -0.65536000000000000000e5 +112 4 1 13 0.16384000000000000000e5 +112 4 2 14 -0.65536000000000000000e5 +112 4 11 11 0.32768000000000000000e5 +113 1 1 1 0.32768000000000000000e5 +113 1 1 6 -0.32768000000000000000e5 +113 1 1 8 0.32768000000000000000e5 +113 1 1 16 0.16384000000000000000e5 +113 1 2 5 0.32768000000000000000e5 +113 1 2 17 -0.16384000000000000000e5 +113 1 3 18 -0.16384000000000000000e5 +113 1 4 27 0.16384000000000000000e5 +113 1 9 16 -0.32768000000000000000e5 +113 2 1 1 0.32768000000000000000e5 +113 2 1 3 -0.16384000000000000000e5 +113 2 3 17 0.16384000000000000000e5 +113 3 1 2 -0.16384000000000000000e5 +113 3 1 6 0.32768000000000000000e5 +113 3 2 3 0.16384000000000000000e5 +113 3 2 7 -0.65536000000000000000e5 +113 3 4 17 0.16384000000000000000e5 +113 4 1 1 -0.32768000000000000000e5 +113 4 1 13 0.16384000000000000000e5 +113 4 2 2 0.65536000000000000000e5 +114 1 1 2 0.32768000000000000000e5 +114 1 1 16 -0.32768000000000000000e5 +114 1 2 5 -0.32768000000000000000e5 +114 1 3 18 0.32768000000000000000e5 +114 3 1 2 0.32768000000000000000e5 +114 3 1 6 -0.65536000000000000000e5 +114 3 2 3 -0.32768000000000000000e5 +114 3 2 7 0.65536000000000000000e5 +114 4 1 1 0.65536000000000000000e5 +114 4 2 2 -0.65536000000000000000e5 +115 1 1 3 0.32768000000000000000e5 +115 1 1 8 -0.65536000000000000000e5 +115 1 2 5 -0.32768000000000000000e5 +115 1 2 17 0.32768000000000000000e5 +115 1 4 27 -0.32768000000000000000e5 +115 1 9 16 0.65536000000000000000e5 +115 2 1 3 0.32768000000000000000e5 +115 2 3 17 -0.32768000000000000000e5 +115 3 2 7 0.65536000000000000000e5 +115 3 4 17 -0.32768000000000000000e5 +115 4 1 13 -0.32768000000000000000e5 +115 4 2 2 -0.65536000000000000000e5 +116 1 1 4 0.32768000000000000000e5 +116 1 2 5 0.32768000000000000000e5 +116 1 2 17 -0.32768000000000000000e5 +116 1 3 18 -0.32768000000000000000e5 +116 3 2 3 0.32768000000000000000e5 +116 3 2 7 -0.65536000000000000000e5 +116 4 2 2 0.65536000000000000000e5 +117 1 1 5 0.32768000000000000000e5 +117 1 3 18 0.32768000000000000000e5 +117 1 4 27 0.32768000000000000000e5 +117 1 9 16 -0.65536000000000000000e5 +117 2 3 17 0.32768000000000000000e5 +117 3 2 3 -0.32768000000000000000e5 +117 3 4 17 0.32768000000000000000e5 +117 4 1 13 0.32768000000000000000e5 +118 1 1 7 0.32768000000000000000e5 +118 1 1 8 0.65536000000000000000e5 +118 1 2 9 0.32768000000000000000e5 +118 1 4 11 -0.13107200000000000000e6 +118 1 5 12 -0.65536000000000000000e5 +118 1 5 20 -0.65536000000000000000e5 +118 1 7 10 -0.13107200000000000000e6 +118 1 7 22 0.65536000000000000000e5 +118 1 8 23 0.13107200000000000000e6 +118 1 9 16 -0.65536000000000000000e5 +118 1 11 26 0.13107200000000000000e6 +118 1 12 19 0.65536000000000000000e5 +118 1 12 27 -0.65536000000000000000e5 +118 2 1 7 0.32768000000000000000e5 +118 2 2 8 0.65536000000000000000e5 +118 2 3 9 -0.65536000000000000000e5 +118 2 5 11 0.32768000000000000000e5 +118 2 6 12 -0.65536000000000000000e5 +118 3 1 14 -0.13107200000000000000e6 +118 3 2 7 0.65536000000000000000e5 +118 3 2 15 0.26214400000000000000e6 +118 3 5 10 -0.13107200000000000000e6 +118 3 7 20 0.13107200000000000000e6 +118 3 8 21 -0.65536000000000000000e5 +118 4 1 5 0.32768000000000000000e5 +118 4 4 8 -0.65536000000000000000e5 +118 4 5 9 -0.13107200000000000000e6 +119 1 1 9 0.32768000000000000000e5 +119 1 5 20 0.32768000000000000000e5 +119 1 9 16 0.32768000000000000000e5 +119 1 11 26 -0.65536000000000000000e5 +119 2 6 12 0.32768000000000000000e5 +119 3 2 7 -0.32768000000000000000e5 +119 3 7 20 -0.65536000000000000000e5 +120 1 1 8 0.16384000000000000000e5 +120 1 1 11 0.32768000000000000000e5 +120 1 2 9 0.16384000000000000000e5 +120 1 4 11 -0.65536000000000000000e5 +120 1 5 12 -0.32768000000000000000e5 +120 1 5 20 -0.16384000000000000000e5 +120 1 7 10 -0.65536000000000000000e5 +120 1 7 22 0.32768000000000000000e5 +120 1 8 23 0.65536000000000000000e5 +120 1 9 16 -0.16384000000000000000e5 +120 1 11 26 0.32768000000000000000e5 +120 1 12 19 0.32768000000000000000e5 +120 1 12 27 -0.32768000000000000000e5 +120 2 1 7 0.16384000000000000000e5 +120 2 2 8 0.32768000000000000000e5 +120 2 3 9 -0.32768000000000000000e5 +120 2 6 12 -0.16384000000000000000e5 +120 3 1 14 -0.65536000000000000000e5 +120 3 2 7 0.16384000000000000000e5 +120 3 2 15 0.13107200000000000000e6 +120 3 5 10 -0.65536000000000000000e5 +120 3 7 20 0.32768000000000000000e5 +120 3 8 21 -0.32768000000000000000e5 +120 4 4 8 -0.32768000000000000000e5 +120 4 5 9 -0.65536000000000000000e5 +121 1 1 8 -0.16384000000000000000e5 +121 1 1 12 0.32768000000000000000e5 +121 1 2 9 -0.16384000000000000000e5 +121 1 5 20 0.16384000000000000000e5 +121 1 9 16 0.16384000000000000000e5 +121 1 11 26 -0.32768000000000000000e5 +121 2 1 7 -0.16384000000000000000e5 +121 2 6 12 0.16384000000000000000e5 +121 3 2 7 -0.16384000000000000000e5 +121 3 7 20 -0.32768000000000000000e5 +122 1 1 10 -0.16384000000000000000e5 +122 1 1 13 0.32768000000000000000e5 +122 1 4 11 -0.32768000000000000000e5 +122 1 5 12 -0.16384000000000000000e5 +122 1 7 10 -0.32768000000000000000e5 +122 1 7 22 0.16384000000000000000e5 +122 1 8 23 0.32768000000000000000e5 +122 1 12 19 0.16384000000000000000e5 +122 1 12 27 -0.16384000000000000000e5 +122 2 2 8 0.16384000000000000000e5 +122 2 3 9 -0.16384000000000000000e5 +122 2 5 5 -0.32768000000000000000e5 +122 3 1 14 -0.32768000000000000000e5 +122 3 2 15 0.65536000000000000000e5 +122 3 5 10 -0.32768000000000000000e5 +122 3 8 21 -0.16384000000000000000e5 +122 4 4 8 -0.16384000000000000000e5 +122 4 5 9 -0.32768000000000000000e5 +123 1 1 14 0.32768000000000000000e5 +123 1 7 10 -0.32768000000000000000e5 +124 1 1 15 0.32768000000000000000e5 +124 1 6 13 -0.32768000000000000000e5 +125 1 1 8 -0.65536000000000000000e5 +125 1 1 17 0.32768000000000000000e5 +125 1 2 5 -0.32768000000000000000e5 +125 1 2 17 0.32768000000000000000e5 +125 1 4 27 -0.32768000000000000000e5 +125 1 9 16 0.65536000000000000000e5 +125 2 1 3 0.32768000000000000000e5 +125 2 3 17 -0.32768000000000000000e5 +125 3 1 2 0.32768000000000000000e5 +125 3 2 7 0.65536000000000000000e5 +125 3 4 17 -0.32768000000000000000e5 +125 4 1 13 -0.32768000000000000000e5 +125 4 2 2 -0.65536000000000000000e5 +126 1 1 18 0.32768000000000000000e5 +126 1 2 17 -0.32768000000000000000e5 +127 1 1 19 0.32768000000000000000e5 +127 1 3 18 0.32768000000000000000e5 +127 1 4 27 0.32768000000000000000e5 +127 1 9 16 -0.65536000000000000000e5 +127 2 3 17 0.32768000000000000000e5 +127 3 4 17 0.32768000000000000000e5 +127 4 1 13 0.32768000000000000000e5 +128 1 1 8 0.65536000000000000000e5 +128 1 1 20 0.32768000000000000000e5 +128 1 2 9 0.32768000000000000000e5 +128 1 4 11 -0.13107200000000000000e6 +128 1 5 12 -0.65536000000000000000e5 +128 1 5 20 -0.65536000000000000000e5 +128 1 7 10 -0.13107200000000000000e6 +128 1 7 22 0.65536000000000000000e5 +128 1 8 23 0.13107200000000000000e6 +128 1 9 16 -0.65536000000000000000e5 +128 1 11 26 0.13107200000000000000e6 +128 1 12 19 0.65536000000000000000e5 +128 1 12 27 -0.65536000000000000000e5 +128 2 1 7 0.32768000000000000000e5 +128 2 2 8 0.65536000000000000000e5 +128 2 3 9 -0.65536000000000000000e5 +128 2 5 11 0.32768000000000000000e5 +128 2 6 12 -0.65536000000000000000e5 +128 3 1 6 0.32768000000000000000e5 +128 3 1 14 -0.13107200000000000000e6 +128 3 2 7 0.65536000000000000000e5 +128 3 2 15 0.26214400000000000000e6 +128 3 5 10 -0.13107200000000000000e6 +128 3 7 20 0.13107200000000000000e6 +128 3 8 21 -0.65536000000000000000e5 +128 4 1 5 0.32768000000000000000e5 +128 4 4 8 -0.65536000000000000000e5 +128 4 5 9 -0.13107200000000000000e6 +129 1 1 21 0.32768000000000000000e5 +129 1 5 20 -0.32768000000000000000e5 +129 1 6 21 -0.65536000000000000000e5 +129 1 11 26 0.65536000000000000000e5 +129 2 1 15 0.32768000000000000000e5 +129 2 6 12 -0.32768000000000000000e5 +129 3 7 20 0.65536000000000000000e5 +130 1 1 22 0.32768000000000000000e5 +130 1 5 20 0.32768000000000000000e5 +130 1 9 16 0.32768000000000000000e5 +130 1 11 26 -0.65536000000000000000e5 +130 2 6 12 0.32768000000000000000e5 +130 3 7 20 -0.65536000000000000000e5 +131 1 1 8 0.32768000000000000000e5 +131 1 1 23 0.32768000000000000000e5 +131 1 2 9 0.16384000000000000000e5 +131 1 4 11 -0.65536000000000000000e5 +131 1 5 12 -0.32768000000000000000e5 +131 1 5 20 -0.32768000000000000000e5 +131 1 6 21 -0.32768000000000000000e5 +131 1 7 10 -0.65536000000000000000e5 +131 1 7 22 0.32768000000000000000e5 +131 1 8 23 0.65536000000000000000e5 +131 1 9 16 -0.16384000000000000000e5 +131 1 11 26 0.65536000000000000000e5 +131 1 12 19 0.32768000000000000000e5 +131 1 12 27 -0.32768000000000000000e5 +131 2 1 7 0.16384000000000000000e5 +131 2 1 15 0.16384000000000000000e5 +131 2 2 8 0.32768000000000000000e5 +131 2 3 9 -0.32768000000000000000e5 +131 2 6 12 -0.32768000000000000000e5 +131 3 1 6 0.16384000000000000000e5 +131 3 1 14 -0.65536000000000000000e5 +131 3 2 7 0.32768000000000000000e5 +131 3 2 15 0.13107200000000000000e6 +131 3 5 10 -0.65536000000000000000e5 +131 3 7 20 0.65536000000000000000e5 +131 3 8 21 -0.32768000000000000000e5 +131 4 1 5 0.16384000000000000000e5 +131 4 4 8 -0.32768000000000000000e5 +131 4 5 9 -0.65536000000000000000e5 +132 1 1 24 0.32768000000000000000e5 +132 1 6 21 -0.32768000000000000000e5 +133 1 1 25 0.32768000000000000000e5 +133 1 6 21 0.16384000000000000000e5 +133 1 7 22 0.16384000000000000000e5 +133 1 8 23 0.32768000000000000000e5 +133 1 11 26 0.16384000000000000000e5 +133 1 13 20 -0.65536000000000000000e5 +133 2 2 16 0.16384000000000000000e5 +133 2 8 14 0.32768000000000000000e5 +133 3 7 20 0.16384000000000000000e5 +134 1 1 26 0.32768000000000000000e5 +134 1 3 18 -0.32768000000000000000e5 +134 1 5 20 -0.13107200000000000000e6 +134 1 9 16 0.65536000000000000000e5 +134 1 11 26 0.26214400000000000000e6 +134 1 16 23 -0.13107200000000000000e6 +134 1 20 27 -0.13107200000000000000e6 +134 2 1 19 0.65536000000000000000e5 +134 2 6 12 -0.13107200000000000000e6 +134 2 11 11 0.65536000000000000000e5 +134 2 11 17 -0.32768000000000000000e5 +134 3 1 30 -0.13107200000000000000e6 +134 3 3 16 -0.32768000000000000000e5 +134 3 4 17 -0.32768000000000000000e5 +134 3 6 19 0.13107200000000000000e6 +134 4 1 13 -0.32768000000000000000e5 +134 4 2 14 0.13107200000000000000e6 +134 4 11 11 -0.65536000000000000000e5 +135 1 1 27 0.32768000000000000000e5 +135 1 4 27 -0.32768000000000000000e5 +135 1 5 20 0.65536000000000000000e5 +135 1 11 26 -0.13107200000000000000e6 +135 1 20 27 0.13107200000000000000e6 +135 2 3 17 -0.32768000000000000000e5 +135 2 6 12 0.65536000000000000000e5 +135 2 11 17 0.32768000000000000000e5 +135 3 1 30 0.13107200000000000000e6 +135 3 6 19 -0.65536000000000000000e5 +135 4 2 14 -0.65536000000000000000e5 +135 4 11 11 0.65536000000000000000e5 +136 1 1 28 0.32768000000000000000e5 +136 1 3 18 0.32768000000000000000e5 +136 1 4 27 0.32768000000000000000e5 +136 1 9 16 -0.65536000000000000000e5 +136 2 3 17 0.32768000000000000000e5 +136 3 3 16 0.32768000000000000000e5 +136 3 4 17 0.32768000000000000000e5 +136 4 1 13 0.32768000000000000000e5 +137 1 1 29 0.32768000000000000000e5 +137 1 5 20 -0.32768000000000000000e5 +137 1 11 26 0.65536000000000000000e5 +137 1 16 23 -0.65536000000000000000e5 +137 2 1 19 0.32768000000000000000e5 +137 2 6 12 -0.32768000000000000000e5 +137 3 6 19 0.32768000000000000000e5 +137 4 2 14 0.32768000000000000000e5 +138 1 1 30 0.32768000000000000000e5 +138 1 5 20 0.32768000000000000000e5 +138 1 11 26 -0.65536000000000000000e5 +138 1 20 27 0.32768000000000000000e5 +138 2 6 12 0.32768000000000000000e5 +138 3 1 30 0.32768000000000000000e5 +138 3 6 19 -0.32768000000000000000e5 +138 4 2 14 -0.32768000000000000000e5 +139 1 1 31 0.32768000000000000000e5 +139 1 16 23 -0.32768000000000000000e5 +140 1 1 32 0.32768000000000000000e5 +140 1 1 33 0.32768000000000000000e5 +140 1 2 33 0.32768000000000000000e5 +140 1 3 34 0.65536000000000000000e5 +140 1 16 31 -0.13107200000000000000e6 +140 1 20 27 0.65536000000000000000e5 +140 2 6 12 0.65536000000000000000e5 +140 2 11 17 0.32768000000000000000e5 +140 4 2 14 -0.65536000000000000000e5 +140 4 5 17 -0.65536000000000000000e5 +141 1 1 34 0.32768000000000000000e5 +141 1 3 34 0.32768000000000000000e5 +141 1 16 31 -0.65536000000000000000e5 +141 1 20 27 0.32768000000000000000e5 +141 2 6 12 0.32768000000000000000e5 +141 4 2 14 -0.32768000000000000000e5 +141 4 5 17 -0.32768000000000000000e5 +142 1 1 35 0.32768000000000000000e5 +142 1 2 33 -0.32768000000000000000e5 +142 1 3 34 0.65536000000000000000e5 +142 1 4 35 -0.32768000000000000000e5 +142 1 17 32 0.32768000000000000000e5 +142 1 20 27 -0.65536000000000000000e5 +142 2 12 18 -0.32768000000000000000e5 +142 2 17 17 0.65536000000000000000e5 +142 3 4 33 0.32768000000000000000e5 +142 3 16 29 0.65536000000000000000e5 +142 3 17 30 -0.65536000000000000000e5 +142 4 13 17 0.32768000000000000000e5 +143 1 1 8 -0.32768000000000000000e5 +143 1 2 2 0.32768000000000000000e5 +143 1 2 5 -0.16384000000000000000e5 +143 1 2 17 0.16384000000000000000e5 +143 1 4 27 -0.16384000000000000000e5 +143 1 9 16 0.32768000000000000000e5 +143 2 1 3 0.16384000000000000000e5 +143 2 3 17 -0.16384000000000000000e5 +143 3 2 7 0.32768000000000000000e5 +143 3 4 17 -0.16384000000000000000e5 +143 4 1 13 -0.16384000000000000000e5 +143 4 2 2 -0.32768000000000000000e5 +144 1 2 3 0.32768000000000000000e5 +144 1 2 5 0.32768000000000000000e5 +144 1 2 17 -0.32768000000000000000e5 +144 1 3 18 -0.32768000000000000000e5 +144 3 2 3 0.32768000000000000000e5 +144 3 2 7 -0.65536000000000000000e5 +144 4 2 2 0.65536000000000000000e5 +145 1 2 4 0.32768000000000000000e5 +145 1 3 18 0.32768000000000000000e5 +145 1 4 27 0.32768000000000000000e5 +145 1 9 16 -0.65536000000000000000e5 +145 2 3 17 0.32768000000000000000e5 +145 3 2 3 -0.32768000000000000000e5 +145 3 4 17 0.32768000000000000000e5 +145 4 1 13 0.32768000000000000000e5 +146 1 1 8 0.65536000000000000000e5 +146 1 2 6 0.32768000000000000000e5 +146 1 2 9 0.32768000000000000000e5 +146 1 4 11 -0.13107200000000000000e6 +146 1 5 12 -0.65536000000000000000e5 +146 1 5 20 -0.65536000000000000000e5 +146 1 7 10 -0.13107200000000000000e6 +146 1 7 22 0.65536000000000000000e5 +146 1 8 23 0.13107200000000000000e6 +146 1 9 16 -0.65536000000000000000e5 +146 1 11 26 0.13107200000000000000e6 +146 1 12 19 0.65536000000000000000e5 +146 1 12 27 -0.65536000000000000000e5 +146 2 1 7 0.32768000000000000000e5 +146 2 2 8 0.65536000000000000000e5 +146 2 3 9 -0.65536000000000000000e5 +146 2 5 11 0.32768000000000000000e5 +146 2 6 12 -0.65536000000000000000e5 +146 3 1 14 -0.13107200000000000000e6 +146 3 2 7 0.65536000000000000000e5 +146 3 2 15 0.26214400000000000000e6 +146 3 5 10 -0.13107200000000000000e6 +146 3 7 20 0.13107200000000000000e6 +146 3 8 21 -0.65536000000000000000e5 +146 4 1 5 0.32768000000000000000e5 +146 4 4 8 -0.65536000000000000000e5 +146 4 5 9 -0.13107200000000000000e6 +147 1 1 8 -0.32768000000000000000e5 +147 1 2 7 0.32768000000000000000e5 +148 1 2 8 0.32768000000000000000e5 +148 1 5 20 0.32768000000000000000e5 +148 1 9 16 0.32768000000000000000e5 +148 1 11 26 -0.65536000000000000000e5 +148 2 6 12 0.32768000000000000000e5 +148 3 2 7 -0.32768000000000000000e5 +148 3 7 20 -0.65536000000000000000e5 +149 1 1 8 0.16384000000000000000e5 +149 1 2 9 0.16384000000000000000e5 +149 1 2 10 0.32768000000000000000e5 +149 1 4 11 -0.65536000000000000000e5 +149 1 5 12 -0.32768000000000000000e5 +149 1 5 20 -0.16384000000000000000e5 +149 1 7 10 -0.65536000000000000000e5 +149 1 7 22 0.32768000000000000000e5 +149 1 8 23 0.65536000000000000000e5 +149 1 9 16 -0.16384000000000000000e5 +149 1 11 26 0.32768000000000000000e5 +149 1 12 19 0.32768000000000000000e5 +149 1 12 27 -0.32768000000000000000e5 +149 2 1 7 0.16384000000000000000e5 +149 2 2 8 0.32768000000000000000e5 +149 2 3 9 -0.32768000000000000000e5 +149 2 6 12 -0.16384000000000000000e5 +149 3 1 14 -0.65536000000000000000e5 +149 3 2 7 0.16384000000000000000e5 +149 3 2 15 0.13107200000000000000e6 +149 3 5 10 -0.65536000000000000000e5 +149 3 7 20 0.32768000000000000000e5 +149 3 8 21 -0.32768000000000000000e5 +149 4 4 8 -0.32768000000000000000e5 +149 4 5 9 -0.65536000000000000000e5 +150 1 1 8 -0.16384000000000000000e5 +150 1 2 9 -0.16384000000000000000e5 +150 1 2 11 0.32768000000000000000e5 +150 1 5 20 0.16384000000000000000e5 +150 1 9 16 0.16384000000000000000e5 +150 1 11 26 -0.32768000000000000000e5 +150 2 1 7 -0.16384000000000000000e5 +150 2 6 12 0.16384000000000000000e5 +150 3 2 7 -0.16384000000000000000e5 +150 3 7 20 -0.32768000000000000000e5 +151 1 2 12 0.32768000000000000000e5 +151 1 4 11 0.65536000000000000000e5 +151 1 5 12 0.32768000000000000000e5 +151 1 7 22 -0.32768000000000000000e5 +151 1 8 23 -0.65536000000000000000e5 +151 1 12 19 -0.32768000000000000000e5 +151 1 12 27 0.32768000000000000000e5 +151 2 3 9 0.32768000000000000000e5 +151 3 1 14 0.65536000000000000000e5 +151 3 2 15 -0.13107200000000000000e6 +151 3 5 10 0.65536000000000000000e5 +151 3 8 21 0.32768000000000000000e5 +151 4 4 8 0.32768000000000000000e5 +151 4 5 9 0.65536000000000000000e5 +152 1 2 13 0.32768000000000000000e5 +152 1 7 10 -0.32768000000000000000e5 +153 1 2 14 0.32768000000000000000e5 +153 1 6 21 -0.16384000000000000000e5 +153 1 7 22 -0.16384000000000000000e5 +153 1 11 26 -0.16384000000000000000e5 +153 2 2 16 -0.16384000000000000000e5 +153 3 1 14 -0.32768000000000000000e5 +153 3 7 20 -0.16384000000000000000e5 +154 1 2 15 0.32768000000000000000e5 +154 1 4 11 0.81920000000000000000e4 +154 1 5 12 0.81920000000000000000e4 +154 1 6 21 -0.81920000000000000000e4 +154 1 7 10 -0.16384000000000000000e5 +154 1 7 22 -0.16384000000000000000e5 +154 1 8 23 -0.16384000000000000000e5 +154 1 11 26 -0.81920000000000000000e4 +154 1 12 19 -0.81920000000000000000e4 +154 2 2 16 -0.81920000000000000000e4 +154 2 6 8 -0.16384000000000000000e5 +154 3 2 15 -0.32768000000000000000e5 +154 3 5 10 0.81920000000000000000e4 +154 3 7 20 -0.81920000000000000000e4 +154 4 4 8 0.81920000000000000000e4 +154 4 5 9 0.16384000000000000000e5 +155 1 1 8 -0.65536000000000000000e5 +155 1 2 5 -0.32768000000000000000e5 +155 1 2 16 0.32768000000000000000e5 +155 1 2 17 0.32768000000000000000e5 +155 1 4 27 -0.32768000000000000000e5 +155 1 9 16 0.65536000000000000000e5 +155 2 1 3 0.32768000000000000000e5 +155 2 3 17 -0.32768000000000000000e5 +155 3 1 2 0.32768000000000000000e5 +155 3 2 7 0.65536000000000000000e5 +155 3 4 17 -0.32768000000000000000e5 +155 4 1 13 -0.32768000000000000000e5 +155 4 2 2 -0.65536000000000000000e5 +156 1 2 18 0.32768000000000000000e5 +156 1 3 18 0.32768000000000000000e5 +156 1 4 27 0.32768000000000000000e5 +156 1 9 16 -0.65536000000000000000e5 +156 2 3 17 0.32768000000000000000e5 +156 3 4 17 0.32768000000000000000e5 +156 4 1 13 0.32768000000000000000e5 +157 1 2 19 0.32768000000000000000e5 +157 1 3 18 -0.32768000000000000000e5 +158 1 2 20 0.32768000000000000000e5 +158 1 5 20 -0.32768000000000000000e5 +158 1 6 21 -0.65536000000000000000e5 +158 1 11 26 0.65536000000000000000e5 +158 2 1 15 0.32768000000000000000e5 +158 2 6 12 -0.32768000000000000000e5 +158 3 7 20 0.65536000000000000000e5 +159 1 2 21 0.32768000000000000000e5 +159 1 5 20 0.32768000000000000000e5 +159 1 9 16 0.32768000000000000000e5 +159 1 11 26 -0.65536000000000000000e5 +159 2 6 12 0.32768000000000000000e5 +159 3 7 20 -0.65536000000000000000e5 +160 1 2 22 0.32768000000000000000e5 +160 1 9 16 -0.32768000000000000000e5 +161 1 2 23 0.32768000000000000000e5 +161 1 6 21 -0.32768000000000000000e5 +162 1 2 24 0.32768000000000000000e5 +162 1 11 26 -0.32768000000000000000e5 +162 3 7 20 -0.32768000000000000000e5 +163 1 2 25 0.32768000000000000000e5 +163 1 6 21 -0.16384000000000000000e5 +163 1 7 22 -0.16384000000000000000e5 +163 1 11 26 -0.16384000000000000000e5 +163 2 2 16 -0.16384000000000000000e5 +163 3 7 20 -0.16384000000000000000e5 +164 1 2 26 0.32768000000000000000e5 +164 1 4 27 -0.32768000000000000000e5 +164 1 5 20 0.65536000000000000000e5 +164 1 11 26 -0.13107200000000000000e6 +164 1 20 27 0.13107200000000000000e6 +164 2 3 17 -0.32768000000000000000e5 +164 2 6 12 0.65536000000000000000e5 +164 2 11 17 0.32768000000000000000e5 +164 3 1 30 0.13107200000000000000e6 +164 3 6 19 -0.65536000000000000000e5 +164 4 2 14 -0.65536000000000000000e5 +164 4 11 11 0.65536000000000000000e5 +165 1 2 27 0.32768000000000000000e5 +165 1 3 18 0.32768000000000000000e5 +165 1 4 27 0.32768000000000000000e5 +165 1 9 16 -0.65536000000000000000e5 +165 2 3 17 0.32768000000000000000e5 +165 3 3 16 0.32768000000000000000e5 +165 3 4 17 0.32768000000000000000e5 +165 4 1 13 0.32768000000000000000e5 +166 1 2 28 0.32768000000000000000e5 +166 1 3 18 -0.32768000000000000000e5 +166 1 9 16 0.65536000000000000000e5 +166 1 20 27 -0.65536000000000000000e5 +166 3 1 30 -0.65536000000000000000e5 +166 3 3 16 -0.32768000000000000000e5 +166 3 4 17 -0.32768000000000000000e5 +166 4 1 13 -0.32768000000000000000e5 +167 1 2 29 0.32768000000000000000e5 +167 1 5 20 0.32768000000000000000e5 +167 1 11 26 -0.65536000000000000000e5 +167 1 20 27 0.32768000000000000000e5 +167 2 6 12 0.32768000000000000000e5 +167 3 1 30 0.32768000000000000000e5 +167 3 6 19 -0.32768000000000000000e5 +167 4 2 14 -0.32768000000000000000e5 +168 1 2 30 0.32768000000000000000e5 +168 1 20 27 -0.32768000000000000000e5 +168 3 1 30 -0.32768000000000000000e5 +169 1 2 31 0.32768000000000000000e5 +169 1 11 26 -0.32768000000000000000e5 +170 1 1 32 0.32768000000000000000e5 +170 1 2 32 0.32768000000000000000e5 +170 1 2 33 0.32768000000000000000e5 +170 1 3 34 0.65536000000000000000e5 +170 1 16 31 -0.13107200000000000000e6 +170 1 20 27 0.65536000000000000000e5 +170 2 6 12 0.65536000000000000000e5 +170 2 11 17 0.32768000000000000000e5 +170 4 2 14 -0.65536000000000000000e5 +170 4 5 17 -0.65536000000000000000e5 +171 1 2 34 0.32768000000000000000e5 +171 1 20 27 -0.32768000000000000000e5 +172 1 2 35 0.32768000000000000000e5 +172 1 17 32 -0.32768000000000000000e5 +173 1 3 3 0.32768000000000000000e5 +173 1 3 18 0.16384000000000000000e5 +173 1 4 27 0.16384000000000000000e5 +173 1 9 16 -0.32768000000000000000e5 +173 2 3 17 0.16384000000000000000e5 +173 3 2 3 -0.16384000000000000000e5 +173 3 4 17 0.16384000000000000000e5 +173 4 1 13 0.16384000000000000000e5 +174 1 2 5 -0.32768000000000000000e5 +174 1 3 4 0.32768000000000000000e5 +175 1 2 5 0.32768000000000000000e5 +175 1 2 9 -0.65536000000000000000e5 +175 1 3 5 0.32768000000000000000e5 +175 1 3 18 -0.32768000000000000000e5 +175 1 4 27 -0.32768000000000000000e5 +175 1 9 16 0.65536000000000000000e5 +175 2 2 4 0.32768000000000000000e5 +175 2 3 17 -0.32768000000000000000e5 +175 3 2 3 0.32768000000000000000e5 +175 3 4 17 -0.32768000000000000000e5 +175 4 1 13 -0.32768000000000000000e5 +176 1 1 8 -0.32768000000000000000e5 +176 1 3 6 0.32768000000000000000e5 +177 1 3 7 0.32768000000000000000e5 +177 1 5 20 0.32768000000000000000e5 +177 1 9 16 0.32768000000000000000e5 +177 1 11 26 -0.65536000000000000000e5 +177 2 6 12 0.32768000000000000000e5 +177 3 2 7 -0.32768000000000000000e5 +177 3 7 20 -0.65536000000000000000e5 +178 1 2 9 -0.32768000000000000000e5 +178 1 3 8 0.32768000000000000000e5 +179 1 2 9 0.32768000000000000000e5 +179 1 3 9 0.32768000000000000000e5 +179 1 4 11 0.13107200000000000000e6 +179 1 5 12 0.65536000000000000000e5 +179 1 5 20 -0.32768000000000000000e5 +179 1 7 22 -0.65536000000000000000e5 +179 1 8 23 -0.13107200000000000000e6 +179 1 9 16 -0.32768000000000000000e5 +179 1 11 26 0.65536000000000000000e5 +179 1 12 19 -0.65536000000000000000e5 +179 1 12 27 0.65536000000000000000e5 +179 2 3 9 0.65536000000000000000e5 +179 3 1 14 0.13107200000000000000e6 +179 3 2 7 0.32768000000000000000e5 +179 3 2 15 -0.26214400000000000000e6 +179 3 5 10 0.13107200000000000000e6 +179 3 7 20 0.65536000000000000000e5 +179 3 8 21 0.65536000000000000000e5 +179 4 2 6 0.32768000000000000000e5 +179 4 4 8 0.65536000000000000000e5 +179 4 5 9 0.13107200000000000000e6 +180 1 1 8 -0.16384000000000000000e5 +180 1 2 9 -0.16384000000000000000e5 +180 1 3 10 0.32768000000000000000e5 +180 1 5 20 0.16384000000000000000e5 +180 1 9 16 0.16384000000000000000e5 +180 1 11 26 -0.32768000000000000000e5 +180 2 1 7 -0.16384000000000000000e5 +180 2 6 12 0.16384000000000000000e5 +180 3 2 7 -0.16384000000000000000e5 +180 3 7 20 -0.32768000000000000000e5 +181 1 3 11 0.32768000000000000000e5 +181 1 4 11 0.65536000000000000000e5 +181 1 5 12 0.32768000000000000000e5 +181 1 7 22 -0.32768000000000000000e5 +181 1 8 23 -0.65536000000000000000e5 +181 1 12 19 -0.32768000000000000000e5 +181 1 12 27 0.32768000000000000000e5 +181 2 3 9 0.32768000000000000000e5 +181 3 1 14 0.65536000000000000000e5 +181 3 2 15 -0.13107200000000000000e6 +181 3 5 10 0.65536000000000000000e5 +181 3 8 21 0.32768000000000000000e5 +181 4 4 8 0.32768000000000000000e5 +181 4 5 9 0.65536000000000000000e5 +182 1 3 12 0.32768000000000000000e5 +182 1 4 11 -0.32768000000000000000e5 +183 1 3 13 0.32768000000000000000e5 +183 1 6 21 -0.16384000000000000000e5 +183 1 7 22 -0.16384000000000000000e5 +183 1 11 26 -0.16384000000000000000e5 +183 2 2 16 -0.16384000000000000000e5 +183 3 1 14 -0.32768000000000000000e5 +183 3 7 20 -0.16384000000000000000e5 +184 1 3 14 0.32768000000000000000e5 +184 1 4 11 0.16384000000000000000e5 +184 1 5 12 0.16384000000000000000e5 +184 1 7 22 -0.16384000000000000000e5 +184 1 8 23 -0.32768000000000000000e5 +184 1 12 19 -0.16384000000000000000e5 +184 3 1 14 0.32768000000000000000e5 +184 3 2 15 -0.65536000000000000000e5 +184 3 5 10 0.16384000000000000000e5 +184 4 4 8 0.16384000000000000000e5 +184 4 5 9 0.32768000000000000000e5 +185 1 3 15 0.32768000000000000000e5 +185 1 7 14 -0.32768000000000000000e5 +186 1 2 17 -0.32768000000000000000e5 +186 1 3 16 0.32768000000000000000e5 +187 1 3 17 0.32768000000000000000e5 +187 1 3 18 0.32768000000000000000e5 +187 1 4 27 0.32768000000000000000e5 +187 1 9 16 -0.65536000000000000000e5 +187 2 3 17 0.32768000000000000000e5 +187 3 4 17 0.32768000000000000000e5 +187 4 1 13 0.32768000000000000000e5 +188 1 3 19 0.32768000000000000000e5 +188 1 4 27 -0.32768000000000000000e5 +188 3 4 17 -0.32768000000000000000e5 +189 1 3 20 0.32768000000000000000e5 +189 1 5 20 0.32768000000000000000e5 +189 1 9 16 0.32768000000000000000e5 +189 1 11 26 -0.65536000000000000000e5 +189 2 6 12 0.32768000000000000000e5 +189 3 7 20 -0.65536000000000000000e5 +190 1 3 21 0.32768000000000000000e5 +190 1 9 16 -0.32768000000000000000e5 +191 1 3 22 0.32768000000000000000e5 +191 1 5 20 -0.32768000000000000000e5 +192 1 3 23 0.32768000000000000000e5 +192 1 11 26 -0.32768000000000000000e5 +192 3 7 20 -0.32768000000000000000e5 +193 1 3 24 0.32768000000000000000e5 +193 1 7 22 -0.32768000000000000000e5 +194 1 3 25 0.32768000000000000000e5 +194 1 8 23 -0.32768000000000000000e5 +195 1 3 18 0.32768000000000000000e5 +195 1 3 26 0.32768000000000000000e5 +195 1 4 27 0.32768000000000000000e5 +195 1 9 16 -0.65536000000000000000e5 +195 2 3 17 0.32768000000000000000e5 +195 3 3 16 0.32768000000000000000e5 +195 3 4 17 0.32768000000000000000e5 +195 4 1 13 0.32768000000000000000e5 +196 1 3 18 -0.32768000000000000000e5 +196 1 3 27 0.32768000000000000000e5 +196 1 9 16 0.65536000000000000000e5 +196 1 20 27 -0.65536000000000000000e5 +196 3 1 30 -0.65536000000000000000e5 +196 3 3 16 -0.32768000000000000000e5 +196 3 4 17 -0.32768000000000000000e5 +196 4 1 13 -0.32768000000000000000e5 +197 1 3 28 0.32768000000000000000e5 +197 1 4 27 -0.32768000000000000000e5 +198 1 3 29 0.32768000000000000000e5 +198 1 20 27 -0.32768000000000000000e5 +198 3 1 30 -0.32768000000000000000e5 +199 1 3 30 0.32768000000000000000e5 +199 1 5 20 -0.32768000000000000000e5 +199 3 6 19 0.32768000000000000000e5 +200 1 3 31 0.32768000000000000000e5 +200 1 17 24 -0.32768000000000000000e5 +201 1 2 33 -0.32768000000000000000e5 +201 1 3 32 0.32768000000000000000e5 +202 1 2 33 0.32768000000000000000e5 +202 1 3 33 0.32768000000000000000e5 +202 1 3 34 -0.65536000000000000000e5 +202 1 4 35 0.32768000000000000000e5 +202 2 12 18 0.32768000000000000000e5 +202 3 3 32 -0.32768000000000000000e5 +202 3 4 33 -0.32768000000000000000e5 +202 3 17 30 0.65536000000000000000e5 +202 4 13 17 -0.32768000000000000000e5 +203 1 2 33 0.32768000000000000000e5 +203 1 3 34 -0.65536000000000000000e5 +203 1 3 35 0.32768000000000000000e5 +203 1 4 35 0.32768000000000000000e5 +203 2 12 18 0.32768000000000000000e5 +203 3 4 33 -0.32768000000000000000e5 +203 3 17 30 0.65536000000000000000e5 +203 4 13 17 -0.32768000000000000000e5 +204 1 2 5 0.16384000000000000000e5 +204 1 2 9 -0.32768000000000000000e5 +204 1 3 18 -0.16384000000000000000e5 +204 1 4 4 0.32768000000000000000e5 +204 1 4 27 -0.16384000000000000000e5 +204 1 9 16 0.32768000000000000000e5 +204 2 2 4 0.16384000000000000000e5 +204 2 3 17 -0.16384000000000000000e5 +204 3 2 3 0.16384000000000000000e5 +204 3 4 17 -0.16384000000000000000e5 +204 4 1 13 -0.16384000000000000000e5 +205 1 2 9 0.13107200000000000000e6 +205 1 4 5 0.32768000000000000000e5 +205 1 4 11 0.26214400000000000000e6 +205 1 4 19 -0.32768000000000000000e5 +205 1 5 12 0.13107200000000000000e6 +205 1 7 22 -0.13107200000000000000e6 +205 1 8 23 -0.26214400000000000000e6 +205 1 9 16 -0.13107200000000000000e6 +205 1 11 26 0.13107200000000000000e6 +205 1 12 19 -0.13107200000000000000e6 +205 1 12 27 0.13107200000000000000e6 +205 2 2 4 -0.32768000000000000000e5 +205 2 3 9 0.13107200000000000000e6 +205 2 3 17 0.32768000000000000000e5 +205 3 1 14 0.26214400000000000000e6 +205 3 2 3 -0.32768000000000000000e5 +205 3 2 7 0.65536000000000000000e5 +205 3 2 15 -0.52428800000000000000e6 +205 3 5 10 0.26214400000000000000e6 +205 3 7 20 0.13107200000000000000e6 +205 3 8 21 0.13107200000000000000e6 +205 4 1 13 0.32768000000000000000e5 +205 4 2 6 0.65536000000000000000e5 +205 4 3 3 0.65536000000000000000e5 +205 4 4 8 0.13107200000000000000e6 +205 4 5 9 0.26214400000000000000e6 +206 1 4 6 0.32768000000000000000e5 +206 1 5 20 0.32768000000000000000e5 +206 1 9 16 0.32768000000000000000e5 +206 1 11 26 -0.65536000000000000000e5 +206 2 6 12 0.32768000000000000000e5 +206 3 2 7 -0.32768000000000000000e5 +206 3 7 20 -0.65536000000000000000e5 +207 1 2 9 -0.32768000000000000000e5 +207 1 4 7 0.32768000000000000000e5 +208 1 2 9 0.32768000000000000000e5 +208 1 4 8 0.32768000000000000000e5 +208 1 4 11 0.13107200000000000000e6 +208 1 5 12 0.65536000000000000000e5 +208 1 5 20 -0.32768000000000000000e5 +208 1 7 22 -0.65536000000000000000e5 +208 1 8 23 -0.13107200000000000000e6 +208 1 9 16 -0.32768000000000000000e5 +208 1 11 26 0.65536000000000000000e5 +208 1 12 19 -0.65536000000000000000e5 +208 1 12 27 0.65536000000000000000e5 +208 2 3 9 0.65536000000000000000e5 +208 3 1 14 0.13107200000000000000e6 +208 3 2 7 0.32768000000000000000e5 +208 3 2 15 -0.26214400000000000000e6 +208 3 5 10 0.13107200000000000000e6 +208 3 7 20 0.65536000000000000000e5 +208 3 8 21 0.65536000000000000000e5 +208 4 2 6 0.32768000000000000000e5 +208 4 4 8 0.65536000000000000000e5 +208 4 5 9 0.13107200000000000000e6 +209 1 2 9 -0.32768000000000000000e5 +209 1 3 34 0.32768000000000000000e5 +209 1 4 9 0.32768000000000000000e5 +209 1 4 11 -0.13107200000000000000e6 +209 1 5 12 -0.65536000000000000000e5 +209 1 8 23 0.13107200000000000000e6 +209 1 9 16 0.65536000000000000000e5 +209 1 11 26 -0.65536000000000000000e5 +209 1 12 19 0.65536000000000000000e5 +209 1 12 27 -0.65536000000000000000e5 +209 2 3 9 -0.65536000000000000000e5 +209 2 6 20 0.32768000000000000000e5 +209 3 1 14 -0.13107200000000000000e6 +209 3 1 30 -0.32768000000000000000e5 +209 3 2 7 -0.32768000000000000000e5 +209 3 2 15 0.26214400000000000000e6 +209 3 2 31 0.65536000000000000000e5 +209 3 4 9 0.32768000000000000000e5 +209 3 5 10 -0.19660800000000000000e6 +209 3 6 19 0.32768000000000000000e5 +209 3 7 20 -0.65536000000000000000e5 +209 3 8 21 -0.65536000000000000000e5 +209 3 17 22 -0.32768000000000000000e5 +209 4 2 6 -0.32768000000000000000e5 +209 4 3 7 0.32768000000000000000e5 +209 4 4 8 -0.65536000000000000000e5 +209 4 5 9 -0.13107200000000000000e6 +209 4 7 11 0.32768000000000000000e5 +210 1 4 10 0.32768000000000000000e5 +210 1 4 11 0.65536000000000000000e5 +210 1 5 12 0.32768000000000000000e5 +210 1 7 22 -0.32768000000000000000e5 +210 1 8 23 -0.65536000000000000000e5 +210 1 12 19 -0.32768000000000000000e5 +210 1 12 27 0.32768000000000000000e5 +210 2 3 9 0.32768000000000000000e5 +210 3 1 14 0.65536000000000000000e5 +210 3 2 15 -0.13107200000000000000e6 +210 3 5 10 0.65536000000000000000e5 +210 3 8 21 0.32768000000000000000e5 +210 4 4 8 0.32768000000000000000e5 +210 4 5 9 0.65536000000000000000e5 +211 1 4 12 0.32768000000000000000e5 +211 1 12 27 -0.32768000000000000000e5 +211 3 5 10 -0.32768000000000000000e5 +211 3 8 21 -0.32768000000000000000e5 +212 1 4 11 0.16384000000000000000e5 +212 1 4 13 0.32768000000000000000e5 +212 1 5 12 0.16384000000000000000e5 +212 1 7 22 -0.16384000000000000000e5 +212 1 8 23 -0.32768000000000000000e5 +212 1 12 19 -0.16384000000000000000e5 +212 3 1 14 0.32768000000000000000e5 +212 3 2 15 -0.65536000000000000000e5 +212 3 5 10 0.16384000000000000000e5 +212 4 4 8 0.16384000000000000000e5 +212 4 5 9 0.32768000000000000000e5 +213 1 4 11 -0.16384000000000000000e5 +213 1 4 14 0.32768000000000000000e5 +213 1 5 12 -0.16384000000000000000e5 +213 1 7 22 0.16384000000000000000e5 +213 1 12 19 0.16384000000000000000e5 +213 1 13 28 -0.32768000000000000000e5 +213 3 5 10 -0.16384000000000000000e5 +213 3 13 18 -0.32768000000000000000e5 +213 4 4 8 -0.16384000000000000000e5 +214 1 4 15 0.32768000000000000000e5 +214 1 14 21 -0.32768000000000000000e5 +214 3 8 13 -0.32768000000000000000e5 +215 1 3 18 0.32768000000000000000e5 +215 1 4 16 0.32768000000000000000e5 +215 1 4 27 0.32768000000000000000e5 +215 1 9 16 -0.65536000000000000000e5 +215 2 3 17 0.32768000000000000000e5 +215 3 4 17 0.32768000000000000000e5 +215 4 1 13 0.32768000000000000000e5 +216 1 3 18 -0.32768000000000000000e5 +216 1 4 17 0.32768000000000000000e5 +217 1 4 18 0.32768000000000000000e5 +217 1 4 27 -0.32768000000000000000e5 +217 3 4 17 -0.32768000000000000000e5 +218 1 4 20 0.32768000000000000000e5 +218 1 9 16 -0.32768000000000000000e5 +219 1 4 21 0.32768000000000000000e5 +219 1 5 20 -0.32768000000000000000e5 +220 1 3 34 0.32768000000000000000e5 +220 1 4 22 0.32768000000000000000e5 +220 1 7 22 -0.65536000000000000000e5 +220 1 9 16 0.32768000000000000000e5 +220 2 6 20 0.32768000000000000000e5 +220 3 1 30 -0.32768000000000000000e5 +220 3 2 31 0.65536000000000000000e5 +220 3 6 19 0.32768000000000000000e5 +220 3 17 22 -0.32768000000000000000e5 +220 4 7 11 0.32768000000000000000e5 +221 1 4 23 0.32768000000000000000e5 +221 1 7 22 -0.32768000000000000000e5 +222 1 4 24 0.32768000000000000000e5 +222 1 12 27 -0.32768000000000000000e5 +222 3 8 21 -0.32768000000000000000e5 +223 1 4 25 0.32768000000000000000e5 +223 1 13 28 -0.32768000000000000000e5 +223 3 13 18 -0.32768000000000000000e5 +224 1 3 18 -0.32768000000000000000e5 +224 1 4 26 0.32768000000000000000e5 +224 1 9 16 0.65536000000000000000e5 +224 1 20 27 -0.65536000000000000000e5 +224 3 1 30 -0.65536000000000000000e5 +224 3 3 16 -0.32768000000000000000e5 +224 3 4 17 -0.32768000000000000000e5 +224 4 1 13 -0.32768000000000000000e5 +225 1 4 28 0.32768000000000000000e5 +225 1 4 35 -0.32768000000000000000e5 +225 3 3 32 0.32768000000000000000e5 +225 3 4 33 0.32768000000000000000e5 +225 3 5 26 -0.32768000000000000000e5 +225 3 17 30 -0.65536000000000000000e5 +225 4 13 17 0.32768000000000000000e5 +226 1 4 29 0.32768000000000000000e5 +226 1 5 20 -0.32768000000000000000e5 +226 3 6 19 0.32768000000000000000e5 +227 1 3 34 0.32768000000000000000e5 +227 1 4 30 0.32768000000000000000e5 +227 1 17 24 -0.65536000000000000000e5 +227 1 20 27 0.32768000000000000000e5 +227 2 6 20 0.32768000000000000000e5 +227 3 2 31 0.65536000000000000000e5 +227 3 17 22 -0.32768000000000000000e5 +228 1 4 31 0.32768000000000000000e5 +228 1 12 27 -0.32768000000000000000e5 +229 1 2 33 0.32768000000000000000e5 +229 1 3 34 -0.65536000000000000000e5 +229 1 4 32 0.32768000000000000000e5 +229 1 4 35 0.32768000000000000000e5 +229 2 12 18 0.32768000000000000000e5 +229 3 3 32 -0.32768000000000000000e5 +229 3 4 33 -0.32768000000000000000e5 +229 3 17 30 0.65536000000000000000e5 +229 4 13 17 -0.32768000000000000000e5 +230 1 4 33 0.32768000000000000000e5 +230 1 4 35 -0.32768000000000000000e5 +230 3 3 32 0.32768000000000000000e5 +230 3 4 33 0.32768000000000000000e5 +230 3 17 30 -0.65536000000000000000e5 +230 4 13 17 0.32768000000000000000e5 +231 1 3 34 0.32768000000000000000e5 +231 1 4 34 0.32768000000000000000e5 +231 1 17 24 -0.65536000000000000000e5 +231 1 20 27 0.32768000000000000000e5 +231 2 6 20 0.32768000000000000000e5 +231 3 2 31 0.65536000000000000000e5 +232 1 3 34 0.32768000000000000000e5 +232 1 4 27 0.16384000000000000000e5 +232 1 4 35 0.16384000000000000000e5 +232 1 5 5 0.32768000000000000000e5 +232 1 17 24 -0.65536000000000000000e5 +232 1 20 27 0.32768000000000000000e5 +232 2 4 18 0.16384000000000000000e5 +232 2 6 20 0.32768000000000000000e5 +232 3 2 31 0.65536000000000000000e5 +232 3 3 32 -0.16384000000000000000e5 +232 3 4 5 -0.16384000000000000000e5 +232 3 4 33 -0.16384000000000000000e5 +232 3 5 18 -0.16384000000000000000e5 +232 3 5 26 0.16384000000000000000e5 +232 3 17 22 -0.32768000000000000000e5 +232 3 17 30 0.32768000000000000000e5 +232 4 13 17 -0.16384000000000000000e5 +233 1 2 9 -0.32768000000000000000e5 +233 1 5 6 0.32768000000000000000e5 +234 1 2 9 0.32768000000000000000e5 +234 1 4 11 0.13107200000000000000e6 +234 1 5 7 0.32768000000000000000e5 +234 1 5 12 0.65536000000000000000e5 +234 1 5 20 -0.32768000000000000000e5 +234 1 7 22 -0.65536000000000000000e5 +234 1 8 23 -0.13107200000000000000e6 +234 1 9 16 -0.32768000000000000000e5 +234 1 11 26 0.65536000000000000000e5 +234 1 12 19 -0.65536000000000000000e5 +234 1 12 27 0.65536000000000000000e5 +234 2 3 9 0.65536000000000000000e5 +234 3 1 14 0.13107200000000000000e6 +234 3 2 7 0.32768000000000000000e5 +234 3 2 15 -0.26214400000000000000e6 +234 3 5 10 0.13107200000000000000e6 +234 3 7 20 0.65536000000000000000e5 +234 3 8 21 0.65536000000000000000e5 +234 4 2 6 0.32768000000000000000e5 +234 4 4 8 0.65536000000000000000e5 +234 4 5 9 0.13107200000000000000e6 +235 1 2 9 -0.32768000000000000000e5 +235 1 3 34 0.32768000000000000000e5 +235 1 4 11 -0.13107200000000000000e6 +235 1 5 8 0.32768000000000000000e5 +235 1 5 12 -0.65536000000000000000e5 +235 1 8 23 0.13107200000000000000e6 +235 1 9 16 0.65536000000000000000e5 +235 1 11 26 -0.65536000000000000000e5 +235 1 12 19 0.65536000000000000000e5 +235 1 12 27 -0.65536000000000000000e5 +235 2 3 9 -0.65536000000000000000e5 +235 2 6 20 0.32768000000000000000e5 +235 3 1 14 -0.13107200000000000000e6 +235 3 1 30 -0.32768000000000000000e5 +235 3 2 7 -0.32768000000000000000e5 +235 3 2 15 0.26214400000000000000e6 +235 3 2 31 0.65536000000000000000e5 +235 3 4 9 0.32768000000000000000e5 +235 3 5 10 -0.19660800000000000000e6 +235 3 6 19 0.32768000000000000000e5 +235 3 7 20 -0.65536000000000000000e5 +235 3 8 21 -0.65536000000000000000e5 +235 3 17 22 -0.32768000000000000000e5 +235 4 2 6 -0.32768000000000000000e5 +235 4 3 7 0.32768000000000000000e5 +235 4 4 8 -0.65536000000000000000e5 +235 4 5 9 -0.13107200000000000000e6 +235 4 7 11 0.32768000000000000000e5 +236 1 3 34 -0.32768000000000000000e5 +236 1 5 9 0.32768000000000000000e5 +236 1 5 20 0.32768000000000000000e5 +236 1 7 22 0.65536000000000000000e5 +236 1 9 16 -0.32768000000000000000e5 +236 1 17 24 -0.65536000000000000000e5 +236 1 19 34 -0.32768000000000000000e5 +236 1 20 27 0.32768000000000000000e5 +236 3 1 30 0.32768000000000000000e5 +236 3 4 9 -0.32768000000000000000e5 +236 3 6 19 -0.32768000000000000000e5 +236 3 8 21 -0.65536000000000000000e5 +236 3 17 22 0.32768000000000000000e5 +236 3 18 23 -0.65536000000000000000e5 +236 3 22 27 -0.32768000000000000000e5 +236 4 3 15 0.32768000000000000000e5 +236 4 6 18 0.32768000000000000000e5 +236 4 7 11 -0.32768000000000000000e5 +237 1 4 11 -0.32768000000000000000e5 +237 1 5 10 0.32768000000000000000e5 +238 1 5 11 0.32768000000000000000e5 +238 1 12 27 -0.32768000000000000000e5 +238 3 5 10 -0.32768000000000000000e5 +238 3 8 21 -0.32768000000000000000e5 +239 1 4 11 -0.16384000000000000000e5 +239 1 5 12 -0.16384000000000000000e5 +239 1 5 13 0.32768000000000000000e5 +239 1 7 22 0.16384000000000000000e5 +239 1 12 19 0.16384000000000000000e5 +239 1 13 28 -0.32768000000000000000e5 +239 3 5 10 -0.16384000000000000000e5 +239 3 13 18 -0.32768000000000000000e5 +239 4 4 8 -0.16384000000000000000e5 +240 1 5 14 0.32768000000000000000e5 +240 1 8 23 0.32768000000000000000e5 +240 1 13 28 0.32768000000000000000e5 +240 1 14 21 -0.65536000000000000000e5 +240 2 4 10 0.32768000000000000000e5 +240 3 1 14 -0.32768000000000000000e5 +240 3 2 15 0.65536000000000000000e5 +240 3 8 13 -0.65536000000000000000e5 +240 3 13 18 0.32768000000000000000e5 +240 4 5 9 -0.32768000000000000000e5 +241 1 5 15 0.32768000000000000000e5 +241 1 22 25 -0.32768000000000000000e5 +241 3 11 12 -0.32768000000000000000e5 +241 3 11 24 -0.32768000000000000000e5 +242 1 3 18 -0.32768000000000000000e5 +242 1 5 16 0.32768000000000000000e5 +243 1 4 27 -0.32768000000000000000e5 +243 1 5 17 0.32768000000000000000e5 +243 3 4 17 -0.32768000000000000000e5 +244 1 4 19 -0.32768000000000000000e5 +244 1 5 18 0.32768000000000000000e5 +245 1 3 34 0.65536000000000000000e5 +245 1 4 27 0.32768000000000000000e5 +245 1 4 35 0.32768000000000000000e5 +245 1 5 19 0.32768000000000000000e5 +245 1 17 24 -0.13107200000000000000e6 +245 1 20 27 0.65536000000000000000e5 +245 2 4 18 0.32768000000000000000e5 +245 2 6 20 0.65536000000000000000e5 +245 3 2 31 0.13107200000000000000e6 +245 3 3 32 -0.32768000000000000000e5 +245 3 4 33 -0.32768000000000000000e5 +245 3 5 18 -0.32768000000000000000e5 +245 3 5 26 0.32768000000000000000e5 +245 3 17 22 -0.65536000000000000000e5 +245 3 17 30 0.65536000000000000000e5 +245 4 13 17 -0.32768000000000000000e5 +246 1 3 34 0.32768000000000000000e5 +246 1 5 21 0.32768000000000000000e5 +246 1 7 22 -0.65536000000000000000e5 +246 1 9 16 0.32768000000000000000e5 +246 2 6 20 0.32768000000000000000e5 +246 3 1 30 -0.32768000000000000000e5 +246 3 2 31 0.65536000000000000000e5 +246 3 6 19 0.32768000000000000000e5 +246 3 17 22 -0.32768000000000000000e5 +246 4 7 11 0.32768000000000000000e5 +247 1 3 34 -0.32768000000000000000e5 +247 1 5 20 0.32768000000000000000e5 +247 1 5 22 0.32768000000000000000e5 +247 1 7 22 0.65536000000000000000e5 +247 1 9 16 -0.32768000000000000000e5 +247 1 17 24 -0.65536000000000000000e5 +247 1 19 34 -0.32768000000000000000e5 +247 1 20 27 0.32768000000000000000e5 +247 3 1 30 0.32768000000000000000e5 +247 3 6 19 -0.32768000000000000000e5 +247 3 8 21 -0.65536000000000000000e5 +247 3 17 22 0.32768000000000000000e5 +247 3 18 23 -0.65536000000000000000e5 +247 3 22 27 -0.32768000000000000000e5 +247 4 3 15 0.32768000000000000000e5 +247 4 6 18 0.32768000000000000000e5 +247 4 7 11 -0.32768000000000000000e5 +248 1 5 23 0.32768000000000000000e5 +248 1 12 27 -0.32768000000000000000e5 +248 3 8 21 -0.32768000000000000000e5 +249 1 5 24 0.32768000000000000000e5 +249 1 12 19 -0.32768000000000000000e5 +250 1 5 25 0.32768000000000000000e5 +250 1 9 24 -0.32768000000000000000e5 +251 1 4 27 -0.32768000000000000000e5 +251 1 5 26 0.32768000000000000000e5 +252 1 4 35 -0.32768000000000000000e5 +252 1 5 27 0.32768000000000000000e5 +252 3 3 32 0.32768000000000000000e5 +252 3 4 33 0.32768000000000000000e5 +252 3 5 26 -0.32768000000000000000e5 +252 3 17 30 -0.65536000000000000000e5 +252 4 13 17 0.32768000000000000000e5 +253 1 3 34 0.65536000000000000000e5 +253 1 4 27 0.32768000000000000000e5 +253 1 4 35 0.32768000000000000000e5 +253 1 5 28 0.32768000000000000000e5 +253 1 17 24 -0.13107200000000000000e6 +253 1 20 27 0.65536000000000000000e5 +253 2 4 18 0.32768000000000000000e5 +253 2 6 20 0.65536000000000000000e5 +253 3 2 31 0.13107200000000000000e6 +253 3 3 32 -0.32768000000000000000e5 +253 3 4 33 -0.32768000000000000000e5 +253 3 5 26 0.32768000000000000000e5 +253 3 17 22 -0.65536000000000000000e5 +253 3 17 30 0.65536000000000000000e5 +253 4 13 17 -0.32768000000000000000e5 +254 1 3 34 0.32768000000000000000e5 +254 1 5 29 0.32768000000000000000e5 +254 1 17 24 -0.65536000000000000000e5 +254 1 20 27 0.32768000000000000000e5 +254 2 6 20 0.32768000000000000000e5 +254 3 2 31 0.65536000000000000000e5 +254 3 17 22 -0.32768000000000000000e5 +255 1 3 34 -0.32768000000000000000e5 +255 1 5 20 0.32768000000000000000e5 +255 1 5 30 0.32768000000000000000e5 +255 1 19 34 -0.32768000000000000000e5 +255 3 6 19 -0.32768000000000000000e5 +255 3 17 22 0.32768000000000000000e5 +255 3 18 23 -0.65536000000000000000e5 +255 3 22 27 -0.32768000000000000000e5 +255 4 6 18 0.32768000000000000000e5 +256 1 5 31 0.32768000000000000000e5 +256 1 12 19 -0.32768000000000000000e5 +256 3 4 25 0.65536000000000000000e5 +256 3 8 21 -0.32768000000000000000e5 +256 3 9 22 -0.32768000000000000000e5 +256 4 4 16 -0.32768000000000000000e5 +257 1 4 35 -0.32768000000000000000e5 +257 1 5 32 0.32768000000000000000e5 +257 3 3 32 0.32768000000000000000e5 +257 3 4 33 0.32768000000000000000e5 +257 3 17 30 -0.65536000000000000000e5 +257 4 13 17 0.32768000000000000000e5 +258 1 3 34 0.65536000000000000000e5 +258 1 4 27 0.32768000000000000000e5 +258 1 4 35 0.32768000000000000000e5 +258 1 5 33 0.32768000000000000000e5 +258 1 17 24 -0.13107200000000000000e6 +258 1 20 27 0.65536000000000000000e5 +258 2 4 18 0.32768000000000000000e5 +258 2 6 20 0.65536000000000000000e5 +258 3 2 31 0.13107200000000000000e6 +258 3 3 32 -0.32768000000000000000e5 +258 3 4 33 -0.32768000000000000000e5 +258 3 5 26 0.32768000000000000000e5 +258 3 17 22 -0.65536000000000000000e5 +258 3 17 30 0.65536000000000000000e5 +258 3 18 19 0.32768000000000000000e5 +258 4 13 17 -0.32768000000000000000e5 +259 1 5 34 0.32768000000000000000e5 +259 1 19 34 -0.32768000000000000000e5 +259 3 22 27 -0.32768000000000000000e5 +260 1 3 34 0.65536000000000000000e5 +260 1 4 27 0.32768000000000000000e5 +260 1 4 35 0.32768000000000000000e5 +260 1 5 35 0.32768000000000000000e5 +260 1 17 24 -0.13107200000000000000e6 +260 1 20 27 0.65536000000000000000e5 +260 2 4 18 0.32768000000000000000e5 +260 2 6 20 0.65536000000000000000e5 +260 3 2 31 0.13107200000000000000e6 +260 3 3 32 -0.32768000000000000000e5 +260 3 5 26 0.32768000000000000000e5 +260 3 17 22 -0.65536000000000000000e5 +260 3 17 30 0.65536000000000000000e5 +260 3 18 19 0.32768000000000000000e5 +260 4 13 17 -0.32768000000000000000e5 +261 1 1 10 -0.16384000000000000000e5 +261 1 6 6 0.32768000000000000000e5 +262 1 1 8 0.16384000000000000000e5 +262 1 2 9 0.16384000000000000000e5 +262 1 4 11 -0.65536000000000000000e5 +262 1 5 12 -0.32768000000000000000e5 +262 1 5 20 -0.16384000000000000000e5 +262 1 6 7 0.32768000000000000000e5 +262 1 7 10 -0.65536000000000000000e5 +262 1 7 22 0.32768000000000000000e5 +262 1 8 23 0.65536000000000000000e5 +262 1 9 16 -0.16384000000000000000e5 +262 1 11 26 0.32768000000000000000e5 +262 1 12 19 0.32768000000000000000e5 +262 1 12 27 -0.32768000000000000000e5 +262 2 1 7 0.16384000000000000000e5 +262 2 2 8 0.32768000000000000000e5 +262 2 3 9 -0.32768000000000000000e5 +262 2 6 12 -0.16384000000000000000e5 +262 3 1 14 -0.65536000000000000000e5 +262 3 2 7 0.16384000000000000000e5 +262 3 2 15 0.13107200000000000000e6 +262 3 5 10 -0.65536000000000000000e5 +262 3 7 20 0.32768000000000000000e5 +262 3 8 21 -0.32768000000000000000e5 +262 4 4 8 -0.32768000000000000000e5 +262 4 5 9 -0.65536000000000000000e5 +263 1 1 8 -0.16384000000000000000e5 +263 1 2 9 -0.16384000000000000000e5 +263 1 5 20 0.16384000000000000000e5 +263 1 6 8 0.32768000000000000000e5 +263 1 9 16 0.16384000000000000000e5 +263 1 11 26 -0.32768000000000000000e5 +263 2 1 7 -0.16384000000000000000e5 +263 2 6 12 0.16384000000000000000e5 +263 3 2 7 -0.16384000000000000000e5 +263 3 7 20 -0.32768000000000000000e5 +264 1 4 11 0.65536000000000000000e5 +264 1 5 12 0.32768000000000000000e5 +264 1 6 9 0.32768000000000000000e5 +264 1 7 22 -0.32768000000000000000e5 +264 1 8 23 -0.65536000000000000000e5 +264 1 12 19 -0.32768000000000000000e5 +264 1 12 27 0.32768000000000000000e5 +264 2 3 9 0.32768000000000000000e5 +264 3 1 14 0.65536000000000000000e5 +264 3 2 15 -0.13107200000000000000e6 +264 3 5 10 0.65536000000000000000e5 +264 3 8 21 0.32768000000000000000e5 +264 4 4 8 0.32768000000000000000e5 +264 4 5 9 0.65536000000000000000e5 +265 1 1 10 -0.16384000000000000000e5 +265 1 4 11 -0.32768000000000000000e5 +265 1 5 12 -0.16384000000000000000e5 +265 1 6 10 0.32768000000000000000e5 +265 1 7 10 -0.32768000000000000000e5 +265 1 7 22 0.16384000000000000000e5 +265 1 8 23 0.32768000000000000000e5 +265 1 12 19 0.16384000000000000000e5 +265 1 12 27 -0.16384000000000000000e5 +265 2 2 8 0.16384000000000000000e5 +265 2 3 9 -0.16384000000000000000e5 +265 2 5 5 -0.32768000000000000000e5 +265 3 1 14 -0.32768000000000000000e5 +265 3 2 15 0.65536000000000000000e5 +265 3 5 10 -0.32768000000000000000e5 +265 3 8 21 -0.16384000000000000000e5 +265 4 4 8 -0.16384000000000000000e5 +265 4 5 9 -0.32768000000000000000e5 +266 1 6 11 0.32768000000000000000e5 +266 1 7 10 -0.32768000000000000000e5 +267 1 6 12 0.32768000000000000000e5 +267 1 6 21 -0.16384000000000000000e5 +267 1 7 22 -0.16384000000000000000e5 +267 1 11 26 -0.16384000000000000000e5 +267 2 2 16 -0.16384000000000000000e5 +267 3 1 14 -0.32768000000000000000e5 +267 3 7 20 -0.16384000000000000000e5 +268 1 4 11 0.81920000000000000000e4 +268 1 5 12 0.81920000000000000000e4 +268 1 6 14 0.32768000000000000000e5 +268 1 6 21 -0.81920000000000000000e4 +268 1 7 10 -0.16384000000000000000e5 +268 1 7 22 -0.16384000000000000000e5 +268 1 8 23 -0.16384000000000000000e5 +268 1 11 26 -0.81920000000000000000e4 +268 1 12 19 -0.81920000000000000000e4 +268 2 2 16 -0.81920000000000000000e4 +268 2 6 8 -0.16384000000000000000e5 +268 3 2 15 -0.32768000000000000000e5 +268 3 5 10 0.81920000000000000000e4 +268 3 7 20 -0.81920000000000000000e4 +268 4 4 8 0.81920000000000000000e4 +268 4 5 9 0.16384000000000000000e5 +269 1 6 15 0.32768000000000000000e5 +269 1 10 13 -0.32768000000000000000e5 +270 1 1 8 0.65536000000000000000e5 +270 1 2 9 0.32768000000000000000e5 +270 1 4 11 -0.13107200000000000000e6 +270 1 5 12 -0.65536000000000000000e5 +270 1 5 20 -0.65536000000000000000e5 +270 1 6 16 0.32768000000000000000e5 +270 1 7 10 -0.13107200000000000000e6 +270 1 7 22 0.65536000000000000000e5 +270 1 8 23 0.13107200000000000000e6 +270 1 9 16 -0.65536000000000000000e5 +270 1 11 26 0.13107200000000000000e6 +270 1 12 19 0.65536000000000000000e5 +270 1 12 27 -0.65536000000000000000e5 +270 2 1 7 0.32768000000000000000e5 +270 2 2 8 0.65536000000000000000e5 +270 2 3 9 -0.65536000000000000000e5 +270 2 5 11 0.32768000000000000000e5 +270 2 6 12 -0.65536000000000000000e5 +270 3 1 6 0.32768000000000000000e5 +270 3 1 14 -0.13107200000000000000e6 +270 3 2 7 0.65536000000000000000e5 +270 3 2 15 0.26214400000000000000e6 +270 3 5 10 -0.13107200000000000000e6 +270 3 7 20 0.13107200000000000000e6 +270 3 8 21 -0.65536000000000000000e5 +270 4 1 5 0.32768000000000000000e5 +270 4 4 8 -0.65536000000000000000e5 +270 4 5 9 -0.13107200000000000000e6 +271 1 5 20 -0.32768000000000000000e5 +271 1 6 17 0.32768000000000000000e5 +271 1 6 21 -0.65536000000000000000e5 +271 1 11 26 0.65536000000000000000e5 +271 2 1 15 0.32768000000000000000e5 +271 2 6 12 -0.32768000000000000000e5 +271 3 7 20 0.65536000000000000000e5 +272 1 5 20 0.32768000000000000000e5 +272 1 6 18 0.32768000000000000000e5 +272 1 9 16 0.32768000000000000000e5 +272 1 11 26 -0.65536000000000000000e5 +272 2 6 12 0.32768000000000000000e5 +272 3 7 20 -0.65536000000000000000e5 +273 1 6 19 0.32768000000000000000e5 +273 1 9 16 -0.32768000000000000000e5 +274 1 1 8 0.32768000000000000000e5 +274 1 2 9 0.16384000000000000000e5 +274 1 4 11 -0.65536000000000000000e5 +274 1 5 12 -0.32768000000000000000e5 +274 1 5 20 -0.32768000000000000000e5 +274 1 6 20 0.32768000000000000000e5 +274 1 6 21 -0.32768000000000000000e5 +274 1 7 10 -0.65536000000000000000e5 +274 1 7 22 0.32768000000000000000e5 +274 1 8 23 0.65536000000000000000e5 +274 1 9 16 -0.16384000000000000000e5 +274 1 11 26 0.65536000000000000000e5 +274 1 12 19 0.32768000000000000000e5 +274 1 12 27 -0.32768000000000000000e5 +274 2 1 7 0.16384000000000000000e5 +274 2 1 15 0.16384000000000000000e5 +274 2 2 8 0.32768000000000000000e5 +274 2 3 9 -0.32768000000000000000e5 +274 2 6 12 -0.32768000000000000000e5 +274 3 1 6 0.16384000000000000000e5 +274 3 1 14 -0.65536000000000000000e5 +274 3 2 7 0.32768000000000000000e5 +274 3 2 15 0.13107200000000000000e6 +274 3 5 10 -0.65536000000000000000e5 +274 3 7 20 0.65536000000000000000e5 +274 3 8 21 -0.32768000000000000000e5 +274 4 1 5 0.16384000000000000000e5 +274 4 4 8 -0.32768000000000000000e5 +274 4 5 9 -0.65536000000000000000e5 +275 1 6 22 0.32768000000000000000e5 +275 1 11 26 -0.32768000000000000000e5 +275 3 7 20 -0.32768000000000000000e5 +276 1 6 21 0.16384000000000000000e5 +276 1 6 23 0.32768000000000000000e5 +276 1 7 22 0.16384000000000000000e5 +276 1 8 23 0.32768000000000000000e5 +276 1 11 26 0.16384000000000000000e5 +276 1 13 20 -0.65536000000000000000e5 +276 2 2 16 0.16384000000000000000e5 +276 2 8 14 0.32768000000000000000e5 +276 3 7 20 0.16384000000000000000e5 +277 1 6 21 -0.16384000000000000000e5 +277 1 6 24 0.32768000000000000000e5 +277 1 7 22 -0.16384000000000000000e5 +277 1 11 26 -0.16384000000000000000e5 +277 2 2 16 -0.16384000000000000000e5 +277 3 7 20 -0.16384000000000000000e5 +278 1 6 25 0.32768000000000000000e5 +278 1 13 20 -0.32768000000000000000e5 +279 1 5 20 -0.32768000000000000000e5 +279 1 6 26 0.32768000000000000000e5 +279 1 11 26 0.65536000000000000000e5 +279 1 16 23 -0.65536000000000000000e5 +279 2 1 19 0.32768000000000000000e5 +279 2 6 12 -0.32768000000000000000e5 +279 3 6 19 0.32768000000000000000e5 +279 4 2 14 0.32768000000000000000e5 +280 1 5 20 0.32768000000000000000e5 +280 1 6 27 0.32768000000000000000e5 +280 1 11 26 -0.65536000000000000000e5 +280 1 20 27 0.32768000000000000000e5 +280 2 6 12 0.32768000000000000000e5 +280 3 1 30 0.32768000000000000000e5 +280 3 6 19 -0.32768000000000000000e5 +280 4 2 14 -0.32768000000000000000e5 +281 1 6 28 0.32768000000000000000e5 +281 1 20 27 -0.32768000000000000000e5 +281 3 1 30 -0.32768000000000000000e5 +282 1 6 29 0.32768000000000000000e5 +282 1 16 23 -0.32768000000000000000e5 +283 1 6 30 0.32768000000000000000e5 +283 1 11 26 -0.32768000000000000000e5 +284 1 6 31 0.32768000000000000000e5 +284 1 11 26 -0.16384000000000000000e5 +284 1 16 23 -0.16384000000000000000e5 +284 1 17 24 -0.16384000000000000000e5 +284 2 5 19 -0.16384000000000000000e5 +285 1 3 34 0.32768000000000000000e5 +285 1 6 32 0.32768000000000000000e5 +285 1 16 31 -0.65536000000000000000e5 +285 1 20 27 0.32768000000000000000e5 +285 2 6 12 0.32768000000000000000e5 +285 4 2 14 -0.32768000000000000000e5 +285 4 5 17 -0.32768000000000000000e5 +286 1 6 33 0.32768000000000000000e5 +286 1 20 27 -0.32768000000000000000e5 +287 1 6 34 0.32768000000000000000e5 +287 1 16 31 -0.32768000000000000000e5 +288 1 6 35 0.32768000000000000000e5 +288 1 20 27 -0.32768000000000000000e5 +288 3 16 29 0.32768000000000000000e5 +289 1 1 8 -0.81920000000000000000e4 +289 1 2 9 -0.81920000000000000000e4 +289 1 5 20 0.81920000000000000000e4 +289 1 7 7 0.32768000000000000000e5 +289 1 9 16 0.81920000000000000000e4 +289 1 11 26 -0.16384000000000000000e5 +289 2 1 7 -0.81920000000000000000e4 +289 2 6 12 0.81920000000000000000e4 +289 3 2 7 -0.81920000000000000000e4 +289 3 7 20 -0.16384000000000000000e5 +290 1 4 11 0.65536000000000000000e5 +290 1 5 12 0.32768000000000000000e5 +290 1 7 8 0.32768000000000000000e5 +290 1 7 22 -0.32768000000000000000e5 +290 1 8 23 -0.65536000000000000000e5 +290 1 12 19 -0.32768000000000000000e5 +290 1 12 27 0.32768000000000000000e5 +290 2 3 9 0.32768000000000000000e5 +290 3 1 14 0.65536000000000000000e5 +290 3 2 15 -0.13107200000000000000e6 +290 3 5 10 0.65536000000000000000e5 +290 3 8 21 0.32768000000000000000e5 +290 4 4 8 0.32768000000000000000e5 +290 4 5 9 0.65536000000000000000e5 +291 1 4 11 -0.32768000000000000000e5 +291 1 7 9 0.32768000000000000000e5 +292 1 6 21 -0.16384000000000000000e5 +292 1 7 11 0.32768000000000000000e5 +292 1 7 22 -0.16384000000000000000e5 +292 1 11 26 -0.16384000000000000000e5 +292 2 2 16 -0.16384000000000000000e5 +292 3 1 14 -0.32768000000000000000e5 +292 3 7 20 -0.16384000000000000000e5 +293 1 4 11 0.16384000000000000000e5 +293 1 5 12 0.16384000000000000000e5 +293 1 7 12 0.32768000000000000000e5 +293 1 7 22 -0.16384000000000000000e5 +293 1 8 23 -0.32768000000000000000e5 +293 1 12 19 -0.16384000000000000000e5 +293 3 1 14 0.32768000000000000000e5 +293 3 2 15 -0.65536000000000000000e5 +293 3 5 10 0.16384000000000000000e5 +293 4 4 8 0.16384000000000000000e5 +293 4 5 9 0.32768000000000000000e5 +294 1 4 11 0.81920000000000000000e4 +294 1 5 12 0.81920000000000000000e4 +294 1 6 21 -0.81920000000000000000e4 +294 1 7 10 -0.16384000000000000000e5 +294 1 7 13 0.32768000000000000000e5 +294 1 7 22 -0.16384000000000000000e5 +294 1 8 23 -0.16384000000000000000e5 +294 1 11 26 -0.81920000000000000000e4 +294 1 12 19 -0.81920000000000000000e4 +294 2 2 16 -0.81920000000000000000e4 +294 2 6 8 -0.16384000000000000000e5 +294 3 2 15 -0.32768000000000000000e5 +294 3 5 10 0.81920000000000000000e4 +294 3 7 20 -0.81920000000000000000e4 +294 4 4 8 0.81920000000000000000e4 +294 4 5 9 0.16384000000000000000e5 +295 1 4 11 0.40960000000000000000e4 +295 1 5 12 0.40960000000000000000e4 +295 1 6 21 -0.40960000000000000000e4 +295 1 7 10 -0.81920000000000000000e4 +295 1 7 15 0.32768000000000000000e5 +295 1 7 22 -0.81920000000000000000e4 +295 1 8 23 -0.81920000000000000000e4 +295 1 10 25 -0.32768000000000000000e5 +295 1 11 26 -0.40960000000000000000e4 +295 1 12 19 -0.40960000000000000000e4 +295 1 13 20 0.16384000000000000000e5 +295 2 2 16 -0.40960000000000000000e4 +295 2 6 8 -0.81920000000000000000e4 +295 3 2 15 -0.32768000000000000000e5 +295 3 5 10 0.40960000000000000000e4 +295 3 7 20 -0.40960000000000000000e4 +295 3 8 13 -0.16384000000000000000e5 +295 4 4 8 0.40960000000000000000e4 +295 4 5 9 0.81920000000000000000e4 +295 4 8 8 -0.32768000000000000000e5 +296 1 5 20 -0.32768000000000000000e5 +296 1 6 21 -0.65536000000000000000e5 +296 1 7 16 0.32768000000000000000e5 +296 1 11 26 0.65536000000000000000e5 +296 2 1 15 0.32768000000000000000e5 +296 2 6 12 -0.32768000000000000000e5 +296 3 7 20 0.65536000000000000000e5 +297 1 5 20 0.32768000000000000000e5 +297 1 7 17 0.32768000000000000000e5 +297 1 9 16 0.32768000000000000000e5 +297 1 11 26 -0.65536000000000000000e5 +297 2 6 12 0.32768000000000000000e5 +297 3 7 20 -0.65536000000000000000e5 +298 1 7 18 0.32768000000000000000e5 +298 1 9 16 -0.32768000000000000000e5 +299 1 5 20 -0.32768000000000000000e5 +299 1 7 19 0.32768000000000000000e5 +300 1 6 21 -0.32768000000000000000e5 +300 1 7 20 0.32768000000000000000e5 +301 1 7 21 0.32768000000000000000e5 +301 1 11 26 -0.32768000000000000000e5 +301 3 7 20 -0.32768000000000000000e5 +302 1 6 21 -0.16384000000000000000e5 +302 1 7 22 -0.16384000000000000000e5 +302 1 7 23 0.32768000000000000000e5 +302 1 11 26 -0.16384000000000000000e5 +302 2 2 16 -0.16384000000000000000e5 +302 3 7 20 -0.16384000000000000000e5 +303 1 7 24 0.32768000000000000000e5 +303 1 8 23 -0.32768000000000000000e5 +304 1 7 14 -0.32768000000000000000e5 +304 1 7 25 0.32768000000000000000e5 +304 3 2 15 0.32768000000000000000e5 +305 1 5 20 0.32768000000000000000e5 +305 1 7 26 0.32768000000000000000e5 +305 1 11 26 -0.65536000000000000000e5 +305 1 20 27 0.32768000000000000000e5 +305 2 6 12 0.32768000000000000000e5 +305 3 1 30 0.32768000000000000000e5 +305 3 6 19 -0.32768000000000000000e5 +305 4 2 14 -0.32768000000000000000e5 +306 1 7 27 0.32768000000000000000e5 +306 1 20 27 -0.32768000000000000000e5 +306 3 1 30 -0.32768000000000000000e5 +307 1 5 20 -0.32768000000000000000e5 +307 1 7 28 0.32768000000000000000e5 +307 3 6 19 0.32768000000000000000e5 +308 1 7 29 0.32768000000000000000e5 +308 1 11 26 -0.32768000000000000000e5 +309 1 7 30 0.32768000000000000000e5 +309 1 17 24 -0.32768000000000000000e5 +310 1 7 22 0.16384000000000000000e5 +310 1 7 31 0.32768000000000000000e5 +310 1 8 23 -0.32768000000000000000e5 +310 1 17 24 -0.16384000000000000000e5 +310 3 7 20 0.16384000000000000000e5 +310 3 8 21 0.16384000000000000000e5 +310 4 8 12 0.16384000000000000000e5 +311 1 7 32 0.32768000000000000000e5 +311 1 20 27 -0.32768000000000000000e5 +312 1 3 34 -0.32768000000000000000e5 +312 1 7 33 0.32768000000000000000e5 +313 1 7 34 0.32768000000000000000e5 +313 1 17 24 -0.32768000000000000000e5 +313 3 2 31 0.32768000000000000000e5 +314 1 7 35 0.32768000000000000000e5 +314 1 20 35 -0.32768000000000000000e5 +314 3 6 35 -0.32768000000000000000e5 +315 1 4 11 -0.16384000000000000000e5 +315 1 8 8 0.32768000000000000000e5 +316 1 8 9 0.32768000000000000000e5 +316 1 12 27 -0.32768000000000000000e5 +316 3 5 10 -0.32768000000000000000e5 +316 3 8 21 -0.32768000000000000000e5 +317 1 6 21 -0.16384000000000000000e5 +317 1 7 22 -0.16384000000000000000e5 +317 1 8 10 0.32768000000000000000e5 +317 1 11 26 -0.16384000000000000000e5 +317 2 2 16 -0.16384000000000000000e5 +317 3 1 14 -0.32768000000000000000e5 +317 3 7 20 -0.16384000000000000000e5 +318 1 4 11 0.16384000000000000000e5 +318 1 5 12 0.16384000000000000000e5 +318 1 7 22 -0.16384000000000000000e5 +318 1 8 11 0.32768000000000000000e5 +318 1 8 23 -0.32768000000000000000e5 +318 1 12 19 -0.16384000000000000000e5 +318 3 1 14 0.32768000000000000000e5 +318 3 2 15 -0.65536000000000000000e5 +318 3 5 10 0.16384000000000000000e5 +318 4 4 8 0.16384000000000000000e5 +318 4 5 9 0.32768000000000000000e5 +319 1 4 11 -0.16384000000000000000e5 +319 1 5 12 -0.16384000000000000000e5 +319 1 7 22 0.16384000000000000000e5 +319 1 8 12 0.32768000000000000000e5 +319 1 12 19 0.16384000000000000000e5 +319 1 13 28 -0.32768000000000000000e5 +319 3 5 10 -0.16384000000000000000e5 +319 3 13 18 -0.32768000000000000000e5 +319 4 4 8 -0.16384000000000000000e5 +320 1 7 14 -0.32768000000000000000e5 +320 1 8 13 0.32768000000000000000e5 +321 1 8 14 0.32768000000000000000e5 +321 1 14 21 -0.32768000000000000000e5 +321 3 8 13 -0.32768000000000000000e5 +322 1 5 20 0.32768000000000000000e5 +322 1 8 16 0.32768000000000000000e5 +322 1 9 16 0.32768000000000000000e5 +322 1 11 26 -0.65536000000000000000e5 +322 2 6 12 0.32768000000000000000e5 +322 3 7 20 -0.65536000000000000000e5 +323 1 8 17 0.32768000000000000000e5 +323 1 9 16 -0.32768000000000000000e5 +324 1 5 20 -0.32768000000000000000e5 +324 1 8 18 0.32768000000000000000e5 +325 1 3 34 0.32768000000000000000e5 +325 1 7 22 -0.65536000000000000000e5 +325 1 8 19 0.32768000000000000000e5 +325 1 9 16 0.32768000000000000000e5 +325 2 6 20 0.32768000000000000000e5 +325 3 1 30 -0.32768000000000000000e5 +325 3 2 31 0.65536000000000000000e5 +325 3 6 19 0.32768000000000000000e5 +325 3 17 22 -0.32768000000000000000e5 +325 4 7 11 0.32768000000000000000e5 +326 1 8 20 0.32768000000000000000e5 +326 1 11 26 -0.32768000000000000000e5 +326 3 7 20 -0.32768000000000000000e5 +327 1 7 22 -0.32768000000000000000e5 +327 1 8 21 0.32768000000000000000e5 +328 1 8 22 0.32768000000000000000e5 +328 1 12 27 -0.32768000000000000000e5 +328 3 8 21 -0.32768000000000000000e5 +329 1 8 24 0.32768000000000000000e5 +329 1 13 28 -0.32768000000000000000e5 +329 3 13 18 -0.32768000000000000000e5 +330 1 8 25 0.32768000000000000000e5 +330 1 14 21 -0.32768000000000000000e5 +331 1 8 26 0.32768000000000000000e5 +331 1 20 27 -0.32768000000000000000e5 +331 3 1 30 -0.32768000000000000000e5 +332 1 5 20 -0.32768000000000000000e5 +332 1 8 27 0.32768000000000000000e5 +332 3 6 19 0.32768000000000000000e5 +333 1 3 34 0.32768000000000000000e5 +333 1 8 28 0.32768000000000000000e5 +333 1 17 24 -0.65536000000000000000e5 +333 1 20 27 0.32768000000000000000e5 +333 2 6 20 0.32768000000000000000e5 +333 3 2 31 0.65536000000000000000e5 +333 3 17 22 -0.32768000000000000000e5 +334 1 8 29 0.32768000000000000000e5 +334 1 17 24 -0.32768000000000000000e5 +335 1 8 30 0.32768000000000000000e5 +335 1 12 27 -0.32768000000000000000e5 +336 1 8 31 0.32768000000000000000e5 +336 1 13 28 -0.32768000000000000000e5 +337 1 3 34 -0.32768000000000000000e5 +337 1 8 32 0.32768000000000000000e5 +338 1 3 34 0.32768000000000000000e5 +338 1 8 33 0.32768000000000000000e5 +338 1 17 24 -0.65536000000000000000e5 +338 1 20 27 0.32768000000000000000e5 +338 2 6 20 0.32768000000000000000e5 +338 3 2 31 0.65536000000000000000e5 +339 1 8 34 0.32768000000000000000e5 +339 1 12 27 -0.32768000000000000000e5 +339 3 18 23 0.32768000000000000000e5 +340 1 3 34 0.32768000000000000000e5 +340 1 8 35 0.32768000000000000000e5 +340 1 17 24 -0.65536000000000000000e5 +340 1 20 27 0.32768000000000000000e5 +340 2 6 20 0.32768000000000000000e5 +340 3 2 31 0.65536000000000000000e5 +340 3 17 30 0.32768000000000000000e5 +341 1 5 12 -0.16384000000000000000e5 +341 1 9 9 0.32768000000000000000e5 +342 1 4 11 0.16384000000000000000e5 +342 1 5 12 0.16384000000000000000e5 +342 1 7 22 -0.16384000000000000000e5 +342 1 8 23 -0.32768000000000000000e5 +342 1 9 10 0.32768000000000000000e5 +342 1 12 19 -0.16384000000000000000e5 +342 3 1 14 0.32768000000000000000e5 +342 3 2 15 -0.65536000000000000000e5 +342 3 5 10 0.16384000000000000000e5 +342 4 4 8 0.16384000000000000000e5 +342 4 5 9 0.32768000000000000000e5 +343 1 4 11 -0.16384000000000000000e5 +343 1 5 12 -0.16384000000000000000e5 +343 1 7 22 0.16384000000000000000e5 +343 1 9 11 0.32768000000000000000e5 +343 1 12 19 0.16384000000000000000e5 +343 1 13 28 -0.32768000000000000000e5 +343 3 5 10 -0.16384000000000000000e5 +343 3 13 18 -0.32768000000000000000e5 +343 4 4 8 -0.16384000000000000000e5 +344 1 8 23 0.32768000000000000000e5 +344 1 9 12 0.32768000000000000000e5 +344 1 13 28 0.32768000000000000000e5 +344 1 14 21 -0.65536000000000000000e5 +344 2 4 10 0.32768000000000000000e5 +344 3 1 14 -0.32768000000000000000e5 +344 3 2 15 0.65536000000000000000e5 +344 3 8 13 -0.65536000000000000000e5 +344 3 13 18 0.32768000000000000000e5 +344 4 5 9 -0.32768000000000000000e5 +345 1 9 13 0.32768000000000000000e5 +345 1 14 21 -0.32768000000000000000e5 +345 3 8 13 -0.32768000000000000000e5 +346 1 9 14 0.32768000000000000000e5 +346 1 22 25 -0.32768000000000000000e5 +346 3 11 12 -0.32768000000000000000e5 +346 3 11 24 -0.32768000000000000000e5 +347 1 9 15 0.32768000000000000000e5 +347 1 15 22 -0.32768000000000000000e5 +347 3 12 13 -0.32768000000000000000e5 +348 1 5 20 -0.32768000000000000000e5 +348 1 9 17 0.32768000000000000000e5 +349 1 3 34 0.32768000000000000000e5 +349 1 7 22 -0.65536000000000000000e5 +349 1 9 16 0.32768000000000000000e5 +349 1 9 18 0.32768000000000000000e5 +349 2 6 20 0.32768000000000000000e5 +349 3 1 30 -0.32768000000000000000e5 +349 3 2 31 0.65536000000000000000e5 +349 3 6 19 0.32768000000000000000e5 +349 3 17 22 -0.32768000000000000000e5 +349 4 7 11 0.32768000000000000000e5 +350 1 3 34 -0.32768000000000000000e5 +350 1 5 20 0.32768000000000000000e5 +350 1 7 22 0.65536000000000000000e5 +350 1 9 16 -0.32768000000000000000e5 +350 1 9 19 0.32768000000000000000e5 +350 1 17 24 -0.65536000000000000000e5 +350 1 19 34 -0.32768000000000000000e5 +350 1 20 27 0.32768000000000000000e5 +350 3 1 30 0.32768000000000000000e5 +350 3 6 19 -0.32768000000000000000e5 +350 3 8 21 -0.65536000000000000000e5 +350 3 17 22 0.32768000000000000000e5 +350 3 18 23 -0.65536000000000000000e5 +350 3 22 27 -0.32768000000000000000e5 +350 4 3 15 0.32768000000000000000e5 +350 4 6 18 0.32768000000000000000e5 +350 4 7 11 -0.32768000000000000000e5 +351 1 7 22 -0.32768000000000000000e5 +351 1 9 20 0.32768000000000000000e5 +352 1 9 21 0.32768000000000000000e5 +352 1 12 27 -0.32768000000000000000e5 +352 3 8 21 -0.32768000000000000000e5 +353 1 9 22 0.32768000000000000000e5 +353 1 12 19 -0.32768000000000000000e5 +354 1 9 23 0.32768000000000000000e5 +354 1 13 28 -0.32768000000000000000e5 +354 3 13 18 -0.32768000000000000000e5 +355 1 9 25 0.32768000000000000000e5 +355 1 22 25 -0.32768000000000000000e5 +355 3 11 24 -0.32768000000000000000e5 +356 1 5 20 -0.32768000000000000000e5 +356 1 9 26 0.32768000000000000000e5 +356 3 6 19 0.32768000000000000000e5 +357 1 3 34 0.32768000000000000000e5 +357 1 9 27 0.32768000000000000000e5 +357 1 17 24 -0.65536000000000000000e5 +357 1 20 27 0.32768000000000000000e5 +357 2 6 20 0.32768000000000000000e5 +357 3 2 31 0.65536000000000000000e5 +357 3 17 22 -0.32768000000000000000e5 +358 1 3 34 -0.32768000000000000000e5 +358 1 5 20 0.32768000000000000000e5 +358 1 9 28 0.32768000000000000000e5 +358 1 19 34 -0.32768000000000000000e5 +358 3 6 19 -0.32768000000000000000e5 +358 3 17 22 0.32768000000000000000e5 +358 3 18 23 -0.65536000000000000000e5 +358 3 22 27 -0.32768000000000000000e5 +358 4 6 18 0.32768000000000000000e5 +359 1 9 29 0.32768000000000000000e5 +359 1 12 27 -0.32768000000000000000e5 +360 1 9 30 0.32768000000000000000e5 +360 1 12 19 -0.32768000000000000000e5 +360 3 4 25 0.65536000000000000000e5 +360 3 8 21 -0.32768000000000000000e5 +360 3 9 22 -0.32768000000000000000e5 +360 4 4 16 -0.32768000000000000000e5 +361 1 9 24 -0.32768000000000000000e5 +361 1 9 31 0.32768000000000000000e5 +361 3 4 25 0.32768000000000000000e5 +362 1 3 34 0.32768000000000000000e5 +362 1 9 32 0.32768000000000000000e5 +362 1 17 24 -0.65536000000000000000e5 +362 1 20 27 0.32768000000000000000e5 +362 2 6 20 0.32768000000000000000e5 +362 3 2 31 0.65536000000000000000e5 +363 1 9 33 0.32768000000000000000e5 +363 1 19 34 -0.32768000000000000000e5 +363 3 22 27 -0.32768000000000000000e5 +364 1 3 34 -0.32768000000000000000e5 +364 1 9 34 0.32768000000000000000e5 +364 1 12 19 -0.32768000000000000000e5 +364 1 13 28 0.65536000000000000000e5 +364 1 20 35 0.32768000000000000000e5 +364 1 25 32 -0.65536000000000000000e5 +364 2 6 20 -0.16384000000000000000e5 +364 2 14 20 0.16384000000000000000e5 +364 3 2 31 -0.32768000000000000000e5 +364 3 4 25 0.65536000000000000000e5 +364 3 6 35 0.32768000000000000000e5 +364 3 8 21 -0.32768000000000000000e5 +364 3 9 22 -0.32768000000000000000e5 +364 3 16 29 -0.16384000000000000000e5 +364 3 17 30 -0.32768000000000000000e5 +364 3 18 23 -0.32768000000000000000e5 +364 3 18 31 -0.32768000000000000000e5 +364 3 22 27 -0.16384000000000000000e5 +364 4 4 16 -0.32768000000000000000e5 +364 4 8 20 -0.32768000000000000000e5 +364 4 12 16 -0.32768000000000000000e5 +364 4 14 18 -0.16384000000000000000e5 +365 1 9 35 0.32768000000000000000e5 +365 1 19 34 -0.32768000000000000000e5 +366 1 6 13 -0.16384000000000000000e5 +366 1 10 10 0.32768000000000000000e5 +367 1 4 11 0.81920000000000000000e4 +367 1 5 12 0.81920000000000000000e4 +367 1 6 21 -0.81920000000000000000e4 +367 1 7 10 -0.16384000000000000000e5 +367 1 7 22 -0.16384000000000000000e5 +367 1 8 23 -0.16384000000000000000e5 +367 1 10 11 0.32768000000000000000e5 +367 1 11 26 -0.81920000000000000000e4 +367 1 12 19 -0.81920000000000000000e4 +367 2 2 16 -0.81920000000000000000e4 +367 2 6 8 -0.16384000000000000000e5 +367 3 2 15 -0.32768000000000000000e5 +367 3 5 10 0.81920000000000000000e4 +367 3 7 20 -0.81920000000000000000e4 +367 4 4 8 0.81920000000000000000e4 +367 4 5 9 0.16384000000000000000e5 +368 1 7 14 -0.32768000000000000000e5 +368 1 10 12 0.32768000000000000000e5 +369 1 4 11 0.40960000000000000000e4 +369 1 5 12 0.40960000000000000000e4 +369 1 6 21 -0.40960000000000000000e4 +369 1 7 10 -0.81920000000000000000e4 +369 1 7 22 -0.81920000000000000000e4 +369 1 8 23 -0.81920000000000000000e4 +369 1 10 14 0.32768000000000000000e5 +369 1 10 25 -0.32768000000000000000e5 +369 1 11 26 -0.40960000000000000000e4 +369 1 12 19 -0.40960000000000000000e4 +369 1 13 20 0.16384000000000000000e5 +369 2 2 16 -0.40960000000000000000e4 +369 2 6 8 -0.81920000000000000000e4 +369 3 2 15 -0.32768000000000000000e5 +369 3 5 10 0.40960000000000000000e4 +369 3 7 20 -0.40960000000000000000e4 +369 3 8 13 -0.16384000000000000000e5 +369 4 4 8 0.40960000000000000000e4 +369 4 5 9 0.81920000000000000000e4 +369 4 8 8 -0.32768000000000000000e5 +370 1 4 11 0.20480000000000000000e4 +370 1 5 12 0.20480000000000000000e4 +370 1 6 21 -0.20480000000000000000e4 +370 1 7 10 -0.40960000000000000000e4 +370 1 7 22 -0.40960000000000000000e4 +370 1 8 15 -0.16384000000000000000e5 +370 1 8 23 -0.40960000000000000000e4 +370 1 10 13 -0.16384000000000000000e5 +370 1 10 15 0.32768000000000000000e5 +370 1 10 25 -0.16384000000000000000e5 +370 1 11 26 -0.20480000000000000000e4 +370 1 12 19 -0.20480000000000000000e4 +370 1 13 20 0.81920000000000000000e4 +370 2 2 16 -0.20480000000000000000e4 +370 2 6 8 -0.40960000000000000000e4 +370 2 8 10 -0.16384000000000000000e5 +370 3 2 15 -0.16384000000000000000e5 +370 3 5 10 0.20480000000000000000e4 +370 3 7 20 -0.20480000000000000000e4 +370 3 8 13 -0.81920000000000000000e4 +370 4 4 8 0.20480000000000000000e4 +370 4 5 9 0.40960000000000000000e4 +370 4 8 8 -0.16384000000000000000e5 +371 1 1 8 0.32768000000000000000e5 +371 1 2 9 0.16384000000000000000e5 +371 1 4 11 -0.65536000000000000000e5 +371 1 5 12 -0.32768000000000000000e5 +371 1 5 20 -0.32768000000000000000e5 +371 1 6 21 -0.32768000000000000000e5 +371 1 7 10 -0.65536000000000000000e5 +371 1 7 22 0.32768000000000000000e5 +371 1 8 23 0.65536000000000000000e5 +371 1 9 16 -0.16384000000000000000e5 +371 1 10 16 0.32768000000000000000e5 +371 1 11 26 0.65536000000000000000e5 +371 1 12 19 0.32768000000000000000e5 +371 1 12 27 -0.32768000000000000000e5 +371 2 1 7 0.16384000000000000000e5 +371 2 1 15 0.16384000000000000000e5 +371 2 2 8 0.32768000000000000000e5 +371 2 3 9 -0.32768000000000000000e5 +371 2 6 12 -0.32768000000000000000e5 +371 3 1 6 0.16384000000000000000e5 +371 3 1 14 -0.65536000000000000000e5 +371 3 2 7 0.32768000000000000000e5 +371 3 2 15 0.13107200000000000000e6 +371 3 5 10 -0.65536000000000000000e5 +371 3 7 20 0.65536000000000000000e5 +371 3 8 21 -0.32768000000000000000e5 +371 4 1 5 0.16384000000000000000e5 +371 4 4 8 -0.32768000000000000000e5 +371 4 5 9 -0.65536000000000000000e5 +372 1 6 21 -0.32768000000000000000e5 +372 1 10 17 0.32768000000000000000e5 +373 1 10 18 0.32768000000000000000e5 +373 1 11 26 -0.32768000000000000000e5 +373 3 7 20 -0.32768000000000000000e5 +374 1 7 22 -0.32768000000000000000e5 +374 1 10 19 0.32768000000000000000e5 +375 1 6 21 0.16384000000000000000e5 +375 1 7 22 0.16384000000000000000e5 +375 1 8 23 0.32768000000000000000e5 +375 1 10 20 0.32768000000000000000e5 +375 1 11 26 0.16384000000000000000e5 +375 1 13 20 -0.65536000000000000000e5 +375 2 2 16 0.16384000000000000000e5 +375 2 8 14 0.32768000000000000000e5 +375 3 7 20 0.16384000000000000000e5 +376 1 6 21 -0.16384000000000000000e5 +376 1 7 22 -0.16384000000000000000e5 +376 1 10 21 0.32768000000000000000e5 +376 1 11 26 -0.16384000000000000000e5 +376 2 2 16 -0.16384000000000000000e5 +376 3 7 20 -0.16384000000000000000e5 +377 1 8 23 -0.32768000000000000000e5 +377 1 10 22 0.32768000000000000000e5 +378 1 10 23 0.32768000000000000000e5 +378 1 13 20 -0.32768000000000000000e5 +379 1 7 14 -0.32768000000000000000e5 +379 1 10 24 0.32768000000000000000e5 +379 3 2 15 0.32768000000000000000e5 +380 1 10 26 0.32768000000000000000e5 +380 1 16 23 -0.32768000000000000000e5 +381 1 10 27 0.32768000000000000000e5 +381 1 11 26 -0.32768000000000000000e5 +382 1 10 28 0.32768000000000000000e5 +382 1 17 24 -0.32768000000000000000e5 +383 1 10 29 0.32768000000000000000e5 +383 1 11 26 -0.16384000000000000000e5 +383 1 16 23 -0.16384000000000000000e5 +383 1 17 24 -0.16384000000000000000e5 +383 2 5 19 -0.16384000000000000000e5 +384 1 7 22 0.16384000000000000000e5 +384 1 8 23 -0.32768000000000000000e5 +384 1 10 30 0.32768000000000000000e5 +384 1 17 24 -0.16384000000000000000e5 +384 3 7 20 0.16384000000000000000e5 +384 3 8 21 0.16384000000000000000e5 +384 4 8 12 0.16384000000000000000e5 +385 1 7 14 -0.32768000000000000000e5 +385 1 10 31 0.32768000000000000000e5 +385 3 2 15 0.32768000000000000000e5 +385 3 10 23 0.32768000000000000000e5 +386 1 10 32 0.32768000000000000000e5 +386 1 16 31 -0.32768000000000000000e5 +387 1 10 33 0.32768000000000000000e5 +387 1 17 24 -0.32768000000000000000e5 +387 3 2 31 0.32768000000000000000e5 +388 1 7 22 0.16384000000000000000e5 +388 1 8 23 -0.32768000000000000000e5 +388 1 10 34 0.32768000000000000000e5 +388 1 17 24 -0.16384000000000000000e5 +388 3 7 20 0.16384000000000000000e5 +388 3 8 21 0.16384000000000000000e5 +388 3 13 26 0.32768000000000000000e5 +388 4 8 12 0.16384000000000000000e5 +389 1 3 34 0.16384000000000000000e5 +389 1 10 35 0.32768000000000000000e5 +389 1 17 24 -0.32768000000000000000e5 +389 1 20 35 -0.16384000000000000000e5 +389 2 6 20 0.16384000000000000000e5 +389 2 14 20 -0.16384000000000000000e5 +389 3 2 31 0.32768000000000000000e5 +389 3 6 35 -0.16384000000000000000e5 +389 3 16 29 0.16384000000000000000e5 +389 3 17 30 0.16384000000000000000e5 +390 1 7 14 -0.16384000000000000000e5 +390 1 11 11 0.32768000000000000000e5 +391 1 11 12 0.32768000000000000000e5 +391 1 14 21 -0.32768000000000000000e5 +391 3 8 13 -0.32768000000000000000e5 +392 1 4 11 0.40960000000000000000e4 +392 1 5 12 0.40960000000000000000e4 +392 1 6 21 -0.40960000000000000000e4 +392 1 7 10 -0.81920000000000000000e4 +392 1 7 22 -0.81920000000000000000e4 +392 1 8 23 -0.81920000000000000000e4 +392 1 10 25 -0.32768000000000000000e5 +392 1 11 13 0.32768000000000000000e5 +392 1 11 26 -0.40960000000000000000e4 +392 1 12 19 -0.40960000000000000000e4 +392 1 13 20 0.16384000000000000000e5 +392 2 2 16 -0.40960000000000000000e4 +392 2 6 8 -0.81920000000000000000e4 +392 3 2 15 -0.32768000000000000000e5 +392 3 5 10 0.40960000000000000000e4 +392 3 7 20 -0.40960000000000000000e4 +392 3 8 13 -0.16384000000000000000e5 +392 4 4 8 0.40960000000000000000e4 +392 4 5 9 0.81920000000000000000e4 +392 4 8 8 -0.32768000000000000000e5 +393 1 8 15 -0.32768000000000000000e5 +393 1 11 14 0.32768000000000000000e5 +394 1 8 15 -0.16384000000000000000e5 +394 1 10 25 -0.16384000000000000000e5 +394 1 11 15 0.32768000000000000000e5 +394 1 15 22 -0.16384000000000000000e5 +394 2 10 16 -0.16384000000000000000e5 +394 3 2 15 0.81920000000000000000e4 +394 3 8 13 0.81920000000000000000e4 +394 3 10 15 -0.32768000000000000000e5 +394 3 11 12 0.81920000000000000000e4 +394 4 6 10 0.81920000000000000000e4 +395 1 6 21 -0.32768000000000000000e5 +395 1 11 16 0.32768000000000000000e5 +396 1 11 17 0.32768000000000000000e5 +396 1 11 26 -0.32768000000000000000e5 +396 3 7 20 -0.32768000000000000000e5 +397 1 7 22 -0.32768000000000000000e5 +397 1 11 18 0.32768000000000000000e5 +398 1 11 19 0.32768000000000000000e5 +398 1 12 27 -0.32768000000000000000e5 +398 3 8 21 -0.32768000000000000000e5 +399 1 6 21 -0.16384000000000000000e5 +399 1 7 22 -0.16384000000000000000e5 +399 1 11 20 0.32768000000000000000e5 +399 1 11 26 -0.16384000000000000000e5 +399 2 2 16 -0.16384000000000000000e5 +399 3 7 20 -0.16384000000000000000e5 +400 1 8 23 -0.32768000000000000000e5 +400 1 11 21 0.32768000000000000000e5 +401 1 11 22 0.32768000000000000000e5 +401 1 13 28 -0.32768000000000000000e5 +401 3 13 18 -0.32768000000000000000e5 +402 1 7 14 -0.32768000000000000000e5 +402 1 11 23 0.32768000000000000000e5 +402 3 2 15 0.32768000000000000000e5 +403 1 11 24 0.32768000000000000000e5 +403 1 14 21 -0.32768000000000000000e5 +404 1 8 15 -0.32768000000000000000e5 +404 1 11 25 0.32768000000000000000e5 +404 3 2 15 0.16384000000000000000e5 +404 3 8 13 0.16384000000000000000e5 +404 3 11 12 0.16384000000000000000e5 +404 4 6 10 0.16384000000000000000e5 +405 1 11 27 0.32768000000000000000e5 +405 1 17 24 -0.32768000000000000000e5 +406 1 11 28 0.32768000000000000000e5 +406 1 12 27 -0.32768000000000000000e5 +407 1 7 22 0.16384000000000000000e5 +407 1 8 23 -0.32768000000000000000e5 +407 1 11 29 0.32768000000000000000e5 +407 1 17 24 -0.16384000000000000000e5 +407 3 7 20 0.16384000000000000000e5 +407 3 8 21 0.16384000000000000000e5 +407 4 8 12 0.16384000000000000000e5 +408 1 11 30 0.32768000000000000000e5 +408 1 13 28 -0.32768000000000000000e5 +409 1 11 31 0.32768000000000000000e5 +409 1 14 29 -0.32768000000000000000e5 +410 1 11 32 0.32768000000000000000e5 +410 1 17 24 -0.32768000000000000000e5 +410 3 2 31 0.32768000000000000000e5 +411 1 11 33 0.32768000000000000000e5 +411 1 12 27 -0.32768000000000000000e5 +411 3 18 23 0.32768000000000000000e5 +412 1 3 34 -0.16384000000000000000e5 +412 1 11 34 0.32768000000000000000e5 +412 1 20 35 0.16384000000000000000e5 +412 1 25 32 -0.32768000000000000000e5 +412 2 6 20 -0.81920000000000000000e4 +412 2 14 20 0.81920000000000000000e4 +412 3 6 35 0.16384000000000000000e5 +412 3 16 29 -0.81920000000000000000e4 +412 3 17 30 -0.16384000000000000000e5 +412 3 18 31 -0.16384000000000000000e5 +412 3 22 27 -0.81920000000000000000e4 +412 4 8 20 -0.16384000000000000000e5 +412 4 14 18 -0.81920000000000000000e4 +413 1 3 34 0.16384000000000000000e5 +413 1 11 35 0.32768000000000000000e5 +413 1 12 27 -0.32768000000000000000e5 +413 1 20 35 -0.16384000000000000000e5 +413 3 6 35 -0.16384000000000000000e5 +413 3 17 30 0.16384000000000000000e5 +413 3 18 23 0.32768000000000000000e5 +413 3 22 27 0.16384000000000000000e5 +413 4 14 18 0.16384000000000000000e5 +414 1 12 12 0.32768000000000000000e5 +414 1 22 25 -0.16384000000000000000e5 +414 3 11 12 -0.16384000000000000000e5 +414 3 11 24 -0.16384000000000000000e5 +415 1 8 15 -0.32768000000000000000e5 +415 1 12 13 0.32768000000000000000e5 +416 1 12 14 0.32768000000000000000e5 +416 1 15 22 -0.32768000000000000000e5 +416 3 12 13 -0.32768000000000000000e5 +417 1 11 26 -0.32768000000000000000e5 +417 1 12 16 0.32768000000000000000e5 +417 3 7 20 -0.32768000000000000000e5 +418 1 7 22 -0.32768000000000000000e5 +418 1 12 17 0.32768000000000000000e5 +419 1 12 18 0.32768000000000000000e5 +419 1 12 27 -0.32768000000000000000e5 +419 3 8 21 -0.32768000000000000000e5 +420 1 8 23 -0.32768000000000000000e5 +420 1 12 20 0.32768000000000000000e5 +421 1 12 21 0.32768000000000000000e5 +421 1 13 28 -0.32768000000000000000e5 +421 3 13 18 -0.32768000000000000000e5 +422 1 9 24 -0.32768000000000000000e5 +422 1 12 22 0.32768000000000000000e5 +423 1 12 23 0.32768000000000000000e5 +423 1 14 21 -0.32768000000000000000e5 +424 1 12 24 0.32768000000000000000e5 +424 1 22 25 -0.32768000000000000000e5 +424 3 11 24 -0.32768000000000000000e5 +425 1 12 25 0.32768000000000000000e5 +425 1 15 22 -0.32768000000000000000e5 +426 1 12 26 0.32768000000000000000e5 +426 1 17 24 -0.32768000000000000000e5 +427 1 12 19 -0.32768000000000000000e5 +427 1 12 28 0.32768000000000000000e5 +427 3 4 25 0.65536000000000000000e5 +427 3 8 21 -0.32768000000000000000e5 +427 3 9 22 -0.32768000000000000000e5 +427 4 4 16 -0.32768000000000000000e5 +428 1 12 29 0.32768000000000000000e5 +428 1 13 28 -0.32768000000000000000e5 +429 1 9 24 -0.32768000000000000000e5 +429 1 12 30 0.32768000000000000000e5 +429 3 4 25 0.32768000000000000000e5 +430 1 12 31 0.32768000000000000000e5 +430 1 22 25 -0.32768000000000000000e5 +431 1 12 27 -0.32768000000000000000e5 +431 1 12 32 0.32768000000000000000e5 +431 3 18 23 0.32768000000000000000e5 +432 1 3 34 -0.32768000000000000000e5 +432 1 12 19 -0.32768000000000000000e5 +432 1 12 33 0.32768000000000000000e5 +432 1 13 28 0.65536000000000000000e5 +432 1 20 35 0.32768000000000000000e5 +432 1 25 32 -0.65536000000000000000e5 +432 2 6 20 -0.16384000000000000000e5 +432 2 14 20 0.16384000000000000000e5 +432 3 2 31 -0.32768000000000000000e5 +432 3 4 25 0.65536000000000000000e5 +432 3 6 35 0.32768000000000000000e5 +432 3 8 21 -0.32768000000000000000e5 +432 3 9 22 -0.32768000000000000000e5 +432 3 16 29 -0.16384000000000000000e5 +432 3 17 30 -0.32768000000000000000e5 +432 3 18 23 -0.32768000000000000000e5 +432 3 18 31 -0.32768000000000000000e5 +432 3 22 27 -0.16384000000000000000e5 +432 4 4 16 -0.32768000000000000000e5 +432 4 8 20 -0.32768000000000000000e5 +432 4 12 16 -0.32768000000000000000e5 +432 4 14 18 -0.16384000000000000000e5 +433 1 9 24 -0.32768000000000000000e5 +433 1 12 34 0.32768000000000000000e5 +433 3 4 25 0.32768000000000000000e5 +433 3 14 27 0.32768000000000000000e5 +434 1 3 34 -0.32768000000000000000e5 +434 1 12 19 -0.32768000000000000000e5 +434 1 12 35 0.32768000000000000000e5 +434 1 13 28 0.65536000000000000000e5 +434 1 20 35 0.32768000000000000000e5 +434 1 25 32 -0.65536000000000000000e5 +434 2 6 20 -0.16384000000000000000e5 +434 2 14 20 0.16384000000000000000e5 +434 3 2 31 -0.32768000000000000000e5 +434 3 4 25 0.65536000000000000000e5 +434 3 6 35 0.32768000000000000000e5 +434 3 8 21 -0.32768000000000000000e5 +434 3 9 22 -0.32768000000000000000e5 +434 3 16 29 -0.16384000000000000000e5 +434 3 17 30 -0.32768000000000000000e5 +434 3 18 23 -0.32768000000000000000e5 +434 3 22 27 -0.16384000000000000000e5 +434 4 4 16 -0.32768000000000000000e5 +434 4 8 20 -0.32768000000000000000e5 +434 4 12 16 -0.32768000000000000000e5 +434 4 14 18 -0.16384000000000000000e5 +435 1 4 11 0.10240000000000000000e4 +435 1 5 12 0.10240000000000000000e4 +435 1 6 21 -0.10240000000000000000e4 +435 1 7 10 -0.20480000000000000000e4 +435 1 7 22 -0.20480000000000000000e4 +435 1 8 15 -0.81920000000000000000e4 +435 1 8 23 -0.20480000000000000000e4 +435 1 10 13 -0.81920000000000000000e4 +435 1 10 25 -0.81920000000000000000e4 +435 1 11 26 -0.10240000000000000000e4 +435 1 12 19 -0.10240000000000000000e4 +435 1 13 13 0.32768000000000000000e5 +435 1 13 20 0.40960000000000000000e4 +435 2 2 16 -0.10240000000000000000e4 +435 2 6 8 -0.20480000000000000000e4 +435 2 8 10 -0.81920000000000000000e4 +435 3 2 15 -0.81920000000000000000e4 +435 3 5 10 0.10240000000000000000e4 +435 3 7 20 -0.10240000000000000000e4 +435 3 8 13 -0.40960000000000000000e4 +435 4 4 8 0.10240000000000000000e4 +435 4 5 9 0.20480000000000000000e4 +435 4 8 8 -0.81920000000000000000e4 +436 1 8 15 -0.16384000000000000000e5 +436 1 10 25 -0.16384000000000000000e5 +436 1 13 14 0.32768000000000000000e5 +436 1 15 22 -0.16384000000000000000e5 +436 2 10 16 -0.16384000000000000000e5 +436 3 2 15 0.81920000000000000000e4 +436 3 8 13 0.81920000000000000000e4 +436 3 10 15 -0.32768000000000000000e5 +436 3 11 12 0.81920000000000000000e4 +436 4 6 10 0.81920000000000000000e4 +437 1 4 11 0.10240000000000000000e4 +437 1 5 12 0.10240000000000000000e4 +437 1 6 21 -0.10240000000000000000e4 +437 1 7 10 -0.20480000000000000000e4 +437 1 7 22 -0.20480000000000000000e4 +437 1 8 15 -0.16384000000000000000e5 +437 1 8 23 -0.20480000000000000000e4 +437 1 10 13 -0.81920000000000000000e4 +437 1 10 25 -0.16384000000000000000e5 +437 1 11 26 -0.10240000000000000000e4 +437 1 12 15 -0.16384000000000000000e5 +437 1 12 19 -0.10240000000000000000e4 +437 1 13 15 0.32768000000000000000e5 +437 1 13 20 0.40960000000000000000e4 +437 1 15 22 -0.81920000000000000000e4 +437 2 2 16 -0.10240000000000000000e4 +437 2 6 8 -0.20480000000000000000e4 +437 2 8 10 -0.81920000000000000000e4 +437 2 10 10 -0.32768000000000000000e5 +437 2 10 16 -0.81920000000000000000e4 +437 3 2 15 -0.40960000000000000000e4 +437 3 5 10 0.10240000000000000000e4 +437 3 7 20 -0.10240000000000000000e4 +437 3 10 15 -0.16384000000000000000e5 +437 3 11 12 0.40960000000000000000e4 +437 4 4 8 0.10240000000000000000e4 +437 4 5 9 0.20480000000000000000e4 +437 4 6 10 0.40960000000000000000e4 +437 4 8 8 -0.81920000000000000000e4 +438 1 6 21 0.16384000000000000000e5 +438 1 7 22 0.16384000000000000000e5 +438 1 8 23 0.32768000000000000000e5 +438 1 11 26 0.16384000000000000000e5 +438 1 13 16 0.32768000000000000000e5 +438 1 13 20 -0.65536000000000000000e5 +438 2 2 16 0.16384000000000000000e5 +438 2 8 14 0.32768000000000000000e5 +438 3 7 20 0.16384000000000000000e5 +439 1 6 21 -0.16384000000000000000e5 +439 1 7 22 -0.16384000000000000000e5 +439 1 11 26 -0.16384000000000000000e5 +439 1 13 17 0.32768000000000000000e5 +439 2 2 16 -0.16384000000000000000e5 +439 3 7 20 -0.16384000000000000000e5 +440 1 8 23 -0.32768000000000000000e5 +440 1 13 18 0.32768000000000000000e5 +441 1 13 19 0.32768000000000000000e5 +441 1 13 28 -0.32768000000000000000e5 +441 3 13 18 -0.32768000000000000000e5 +442 1 7 14 -0.32768000000000000000e5 +442 1 13 21 0.32768000000000000000e5 +442 3 2 15 0.32768000000000000000e5 +443 1 13 22 0.32768000000000000000e5 +443 1 14 21 -0.32768000000000000000e5 +444 1 10 25 -0.32768000000000000000e5 +444 1 13 23 0.32768000000000000000e5 +445 1 8 15 -0.32768000000000000000e5 +445 1 13 24 0.32768000000000000000e5 +445 3 2 15 0.16384000000000000000e5 +445 3 8 13 0.16384000000000000000e5 +445 3 11 12 0.16384000000000000000e5 +445 4 6 10 0.16384000000000000000e5 +446 1 8 15 -0.16384000000000000000e5 +446 1 10 25 -0.16384000000000000000e5 +446 1 13 25 0.32768000000000000000e5 +446 1 15 22 -0.16384000000000000000e5 +446 2 10 16 -0.16384000000000000000e5 +446 3 2 15 0.81920000000000000000e4 +446 3 8 13 0.81920000000000000000e4 +446 3 11 12 0.81920000000000000000e4 +446 4 6 10 0.81920000000000000000e4 +447 1 11 26 -0.16384000000000000000e5 +447 1 13 26 0.32768000000000000000e5 +447 1 16 23 -0.16384000000000000000e5 +447 1 17 24 -0.16384000000000000000e5 +447 2 5 19 -0.16384000000000000000e5 +448 1 7 22 0.16384000000000000000e5 +448 1 8 23 -0.32768000000000000000e5 +448 1 13 27 0.32768000000000000000e5 +448 1 17 24 -0.16384000000000000000e5 +448 3 7 20 0.16384000000000000000e5 +448 3 8 21 0.16384000000000000000e5 +448 4 8 12 0.16384000000000000000e5 +449 1 7 14 -0.32768000000000000000e5 +449 1 13 29 0.32768000000000000000e5 +449 3 2 15 0.32768000000000000000e5 +449 3 10 23 0.32768000000000000000e5 +450 1 13 30 0.32768000000000000000e5 +450 1 14 29 -0.32768000000000000000e5 +451 1 8 15 -0.32768000000000000000e5 +451 1 13 31 0.32768000000000000000e5 +451 1 14 21 0.16384000000000000000e5 +451 1 14 29 -0.16384000000000000000e5 +451 3 2 15 0.16384000000000000000e5 +451 3 8 13 0.16384000000000000000e5 +451 3 10 23 0.16384000000000000000e5 +451 3 11 12 0.16384000000000000000e5 +451 3 11 24 0.16384000000000000000e5 +451 4 6 10 0.16384000000000000000e5 +451 4 10 14 0.16384000000000000000e5 +452 1 7 22 0.16384000000000000000e5 +452 1 8 23 -0.32768000000000000000e5 +452 1 13 32 0.32768000000000000000e5 +452 1 17 24 -0.16384000000000000000e5 +452 3 7 20 0.16384000000000000000e5 +452 3 8 21 0.16384000000000000000e5 +452 3 13 26 0.32768000000000000000e5 +452 4 8 12 0.16384000000000000000e5 +453 1 3 34 -0.16384000000000000000e5 +453 1 13 33 0.32768000000000000000e5 +453 1 20 35 0.16384000000000000000e5 +453 1 25 32 -0.32768000000000000000e5 +453 2 6 20 -0.81920000000000000000e4 +453 2 14 20 0.81920000000000000000e4 +453 3 6 35 0.16384000000000000000e5 +453 3 16 29 -0.81920000000000000000e4 +453 3 17 30 -0.16384000000000000000e5 +453 3 18 31 -0.16384000000000000000e5 +453 3 22 27 -0.81920000000000000000e4 +453 4 8 20 -0.16384000000000000000e5 +453 4 14 18 -0.81920000000000000000e4 +454 1 13 34 0.32768000000000000000e5 +454 1 14 29 -0.32768000000000000000e5 +454 3 20 25 0.32768000000000000000e5 +455 1 13 35 0.32768000000000000000e5 +455 1 25 32 -0.32768000000000000000e5 +456 1 12 15 -0.16384000000000000000e5 +456 1 14 14 0.32768000000000000000e5 +457 1 6 21 -0.16384000000000000000e5 +457 1 7 22 -0.16384000000000000000e5 +457 1 11 26 -0.16384000000000000000e5 +457 1 14 16 0.32768000000000000000e5 +457 2 2 16 -0.16384000000000000000e5 +457 3 7 20 -0.16384000000000000000e5 +458 1 8 23 -0.32768000000000000000e5 +458 1 14 17 0.32768000000000000000e5 +459 1 13 28 -0.32768000000000000000e5 +459 1 14 18 0.32768000000000000000e5 +459 3 13 18 -0.32768000000000000000e5 +460 1 9 24 -0.32768000000000000000e5 +460 1 14 19 0.32768000000000000000e5 +461 1 7 14 -0.32768000000000000000e5 +461 1 14 20 0.32768000000000000000e5 +461 3 2 15 0.32768000000000000000e5 +462 1 14 22 0.32768000000000000000e5 +462 1 22 25 -0.32768000000000000000e5 +462 3 11 24 -0.32768000000000000000e5 +463 1 8 15 -0.32768000000000000000e5 +463 1 14 23 0.32768000000000000000e5 +463 3 2 15 0.16384000000000000000e5 +463 3 8 13 0.16384000000000000000e5 +463 3 11 12 0.16384000000000000000e5 +463 4 6 10 0.16384000000000000000e5 +464 1 14 24 0.32768000000000000000e5 +464 1 15 22 -0.32768000000000000000e5 +465 1 12 15 -0.32768000000000000000e5 +465 1 14 25 0.32768000000000000000e5 +465 3 13 14 0.32768000000000000000e5 +466 1 7 22 0.16384000000000000000e5 +466 1 8 23 -0.32768000000000000000e5 +466 1 14 26 0.32768000000000000000e5 +466 1 17 24 -0.16384000000000000000e5 +466 3 7 20 0.16384000000000000000e5 +466 3 8 21 0.16384000000000000000e5 +466 4 8 12 0.16384000000000000000e5 +467 1 13 28 -0.32768000000000000000e5 +467 1 14 27 0.32768000000000000000e5 +468 1 9 24 -0.32768000000000000000e5 +468 1 14 28 0.32768000000000000000e5 +468 3 4 25 0.32768000000000000000e5 +469 1 14 30 0.32768000000000000000e5 +469 1 22 25 -0.32768000000000000000e5 +470 1 14 31 0.32768000000000000000e5 +470 1 15 30 -0.32768000000000000000e5 +471 1 3 34 -0.16384000000000000000e5 +471 1 14 32 0.32768000000000000000e5 +471 1 20 35 0.16384000000000000000e5 +471 1 25 32 -0.32768000000000000000e5 +471 2 6 20 -0.81920000000000000000e4 +471 2 14 20 0.81920000000000000000e4 +471 3 6 35 0.16384000000000000000e5 +471 3 16 29 -0.81920000000000000000e4 +471 3 17 30 -0.16384000000000000000e5 +471 3 18 31 -0.16384000000000000000e5 +471 3 22 27 -0.81920000000000000000e4 +471 4 8 20 -0.16384000000000000000e5 +471 4 14 18 -0.81920000000000000000e4 +472 1 9 24 -0.32768000000000000000e5 +472 1 14 33 0.32768000000000000000e5 +472 3 4 25 0.32768000000000000000e5 +472 3 14 27 0.32768000000000000000e5 +473 1 14 34 0.32768000000000000000e5 +473 1 24 31 -0.32768000000000000000e5 +474 1 9 24 -0.32768000000000000000e5 +474 1 14 35 0.32768000000000000000e5 +474 3 4 25 0.32768000000000000000e5 +474 3 14 27 0.32768000000000000000e5 +474 3 24 29 0.32768000000000000000e5 +475 1 13 20 -0.32768000000000000000e5 +475 1 15 16 0.32768000000000000000e5 +476 1 7 14 -0.32768000000000000000e5 +476 1 15 17 0.32768000000000000000e5 +476 3 2 15 0.32768000000000000000e5 +477 1 14 21 -0.32768000000000000000e5 +477 1 15 18 0.32768000000000000000e5 +478 1 15 19 0.32768000000000000000e5 +478 1 22 25 -0.32768000000000000000e5 +478 3 11 24 -0.32768000000000000000e5 +479 1 10 25 -0.32768000000000000000e5 +479 1 15 20 0.32768000000000000000e5 +480 1 8 15 -0.32768000000000000000e5 +480 1 15 21 0.32768000000000000000e5 +480 3 2 15 0.16384000000000000000e5 +480 3 8 13 0.16384000000000000000e5 +480 3 11 12 0.16384000000000000000e5 +480 4 6 10 0.16384000000000000000e5 +481 1 8 15 -0.16384000000000000000e5 +481 1 10 25 -0.16384000000000000000e5 +481 1 15 22 -0.16384000000000000000e5 +481 1 15 23 0.32768000000000000000e5 +481 2 10 16 -0.16384000000000000000e5 +481 3 2 15 0.81920000000000000000e4 +481 3 8 13 0.81920000000000000000e4 +481 3 11 12 0.81920000000000000000e4 +481 4 6 10 0.81920000000000000000e4 +482 1 12 15 -0.32768000000000000000e5 +482 1 15 24 0.32768000000000000000e5 +482 3 13 14 0.32768000000000000000e5 +483 1 14 15 -0.32768000000000000000e5 +483 1 15 25 0.32768000000000000000e5 +483 3 10 15 0.16384000000000000000e5 +483 3 12 15 0.16384000000000000000e5 +483 3 13 14 0.16384000000000000000e5 +483 4 10 10 0.32768000000000000000e5 +484 1 7 14 -0.32768000000000000000e5 +484 1 15 26 0.32768000000000000000e5 +484 3 2 15 0.32768000000000000000e5 +484 3 10 23 0.32768000000000000000e5 +485 1 14 29 -0.32768000000000000000e5 +485 1 15 27 0.32768000000000000000e5 +486 1 15 28 0.32768000000000000000e5 +486 1 22 25 -0.32768000000000000000e5 +487 1 8 15 -0.32768000000000000000e5 +487 1 14 21 0.16384000000000000000e5 +487 1 14 29 -0.16384000000000000000e5 +487 1 15 29 0.32768000000000000000e5 +487 3 2 15 0.16384000000000000000e5 +487 3 8 13 0.16384000000000000000e5 +487 3 10 23 0.16384000000000000000e5 +487 3 11 12 0.16384000000000000000e5 +487 3 11 24 0.16384000000000000000e5 +487 4 6 10 0.16384000000000000000e5 +487 4 10 14 0.16384000000000000000e5 +488 1 12 15 -0.32768000000000000000e5 +488 1 14 21 0.81920000000000000000e4 +488 1 14 29 -0.81920000000000000000e4 +488 1 15 22 0.16384000000000000000e5 +488 1 15 30 -0.16384000000000000000e5 +488 1 15 31 0.32768000000000000000e5 +488 3 10 23 0.81920000000000000000e4 +488 3 11 24 0.81920000000000000000e4 +488 3 12 25 0.16384000000000000000e5 +488 3 13 14 0.32768000000000000000e5 +488 4 10 14 0.81920000000000000000e4 +488 4 10 16 0.16384000000000000000e5 +489 1 14 29 -0.32768000000000000000e5 +489 1 15 32 0.32768000000000000000e5 +489 3 20 25 0.32768000000000000000e5 +490 1 15 33 0.32768000000000000000e5 +490 1 24 31 -0.32768000000000000000e5 +491 1 15 30 -0.32768000000000000000e5 +491 1 15 34 0.32768000000000000000e5 +491 1 22 25 0.16384000000000000000e5 +491 1 24 31 -0.16384000000000000000e5 +491 3 15 28 0.16384000000000000000e5 +491 3 20 25 0.16384000000000000000e5 +491 4 16 16 0.32768000000000000000e5 +492 1 15 35 0.32768000000000000000e5 +492 1 24 31 -0.32768000000000000000e5 +492 3 13 34 0.32768000000000000000e5 +493 1 3 18 -0.16384000000000000000e5 +493 1 5 20 -0.65536000000000000000e5 +493 1 9 16 0.32768000000000000000e5 +493 1 11 26 0.13107200000000000000e6 +493 1 16 16 0.32768000000000000000e5 +493 1 16 23 -0.65536000000000000000e5 +493 1 20 27 -0.65536000000000000000e5 +493 2 1 19 0.32768000000000000000e5 +493 2 6 12 -0.65536000000000000000e5 +493 2 11 11 0.32768000000000000000e5 +493 2 11 17 -0.16384000000000000000e5 +493 3 1 30 -0.65536000000000000000e5 +493 3 3 16 -0.16384000000000000000e5 +493 3 4 17 -0.16384000000000000000e5 +493 3 6 19 0.65536000000000000000e5 +493 4 1 13 -0.16384000000000000000e5 +493 4 2 14 0.65536000000000000000e5 +493 4 11 11 -0.32768000000000000000e5 +494 1 4 27 -0.32768000000000000000e5 +494 1 5 20 0.65536000000000000000e5 +494 1 11 26 -0.13107200000000000000e6 +494 1 16 17 0.32768000000000000000e5 +494 1 20 27 0.13107200000000000000e6 +494 2 3 17 -0.32768000000000000000e5 +494 2 6 12 0.65536000000000000000e5 +494 2 11 17 0.32768000000000000000e5 +494 3 1 30 0.13107200000000000000e6 +494 3 6 19 -0.65536000000000000000e5 +494 4 2 14 -0.65536000000000000000e5 +494 4 11 11 0.65536000000000000000e5 +495 1 3 18 0.32768000000000000000e5 +495 1 4 27 0.32768000000000000000e5 +495 1 9 16 -0.65536000000000000000e5 +495 1 16 18 0.32768000000000000000e5 +495 2 3 17 0.32768000000000000000e5 +495 3 3 16 0.32768000000000000000e5 +495 3 4 17 0.32768000000000000000e5 +495 4 1 13 0.32768000000000000000e5 +496 1 3 18 -0.32768000000000000000e5 +496 1 9 16 0.65536000000000000000e5 +496 1 16 19 0.32768000000000000000e5 +496 1 20 27 -0.65536000000000000000e5 +496 3 1 30 -0.65536000000000000000e5 +496 3 3 16 -0.32768000000000000000e5 +496 3 4 17 -0.32768000000000000000e5 +496 4 1 13 -0.32768000000000000000e5 +497 1 5 20 -0.32768000000000000000e5 +497 1 11 26 0.65536000000000000000e5 +497 1 16 20 0.32768000000000000000e5 +497 1 16 23 -0.65536000000000000000e5 +497 2 1 19 0.32768000000000000000e5 +497 2 6 12 -0.32768000000000000000e5 +497 3 6 19 0.32768000000000000000e5 +497 4 2 14 0.32768000000000000000e5 +498 1 5 20 0.32768000000000000000e5 +498 1 11 26 -0.65536000000000000000e5 +498 1 16 21 0.32768000000000000000e5 +498 1 20 27 0.32768000000000000000e5 +498 2 6 12 0.32768000000000000000e5 +498 3 1 30 0.32768000000000000000e5 +498 3 6 19 -0.32768000000000000000e5 +498 4 2 14 -0.32768000000000000000e5 +499 1 16 22 0.32768000000000000000e5 +499 1 20 27 -0.32768000000000000000e5 +499 3 1 30 -0.32768000000000000000e5 +500 1 11 26 -0.32768000000000000000e5 +500 1 16 24 0.32768000000000000000e5 +501 1 11 26 -0.16384000000000000000e5 +501 1 16 23 -0.16384000000000000000e5 +501 1 16 25 0.32768000000000000000e5 +501 1 17 24 -0.16384000000000000000e5 +501 2 5 19 -0.16384000000000000000e5 +502 1 1 32 -0.32768000000000000000e5 +502 1 16 26 0.32768000000000000000e5 +503 1 1 32 0.32768000000000000000e5 +503 1 2 33 0.32768000000000000000e5 +503 1 3 34 0.65536000000000000000e5 +503 1 16 27 0.32768000000000000000e5 +503 1 16 31 -0.13107200000000000000e6 +503 1 20 27 0.65536000000000000000e5 +503 2 6 12 0.65536000000000000000e5 +503 2 11 17 0.32768000000000000000e5 +503 4 2 14 -0.65536000000000000000e5 +503 4 5 17 -0.65536000000000000000e5 +504 1 2 33 -0.32768000000000000000e5 +504 1 16 28 0.32768000000000000000e5 +505 1 3 34 0.32768000000000000000e5 +505 1 16 29 0.32768000000000000000e5 +505 1 16 31 -0.65536000000000000000e5 +505 1 20 27 0.32768000000000000000e5 +505 2 6 12 0.32768000000000000000e5 +505 4 2 14 -0.32768000000000000000e5 +505 4 5 17 -0.32768000000000000000e5 +506 1 16 30 0.32768000000000000000e5 +506 1 20 27 -0.32768000000000000000e5 +507 1 2 33 -0.32768000000000000000e5 +507 1 3 34 0.65536000000000000000e5 +507 1 4 35 -0.32768000000000000000e5 +507 1 16 32 0.32768000000000000000e5 +507 1 17 32 0.32768000000000000000e5 +507 1 20 27 -0.65536000000000000000e5 +507 2 12 18 -0.32768000000000000000e5 +507 2 17 17 0.65536000000000000000e5 +507 3 4 33 0.32768000000000000000e5 +507 3 16 29 0.65536000000000000000e5 +507 3 17 30 -0.65536000000000000000e5 +507 4 13 17 0.32768000000000000000e5 +508 1 16 33 0.32768000000000000000e5 +508 1 17 32 -0.32768000000000000000e5 +509 1 16 34 0.32768000000000000000e5 +509 1 20 27 -0.32768000000000000000e5 +509 3 16 29 0.32768000000000000000e5 +510 1 2 33 0.32768000000000000000e5 +510 1 3 34 -0.65536000000000000000e5 +510 1 4 27 0.32768000000000000000e5 +510 1 4 35 0.32768000000000000000e5 +510 1 16 35 0.32768000000000000000e5 +510 1 17 32 -0.32768000000000000000e5 +510 2 4 18 0.32768000000000000000e5 +510 2 12 18 0.32768000000000000000e5 +510 2 18 20 -0.32768000000000000000e5 +510 3 3 32 -0.32768000000000000000e5 +510 3 4 33 -0.32768000000000000000e5 +510 3 5 26 0.32768000000000000000e5 +510 3 6 35 0.65536000000000000000e5 +510 3 17 22 -0.65536000000000000000e5 +510 3 17 30 0.65536000000000000000e5 +510 3 18 19 0.32768000000000000000e5 +510 3 19 32 0.32768000000000000000e5 +510 3 20 33 -0.65536000000000000000e5 +510 4 13 17 -0.65536000000000000000e5 +510 4 17 17 -0.65536000000000000000e5 +511 1 3 18 0.16384000000000000000e5 +511 1 4 27 0.16384000000000000000e5 +511 1 9 16 -0.32768000000000000000e5 +511 1 17 17 0.32768000000000000000e5 +511 2 3 17 0.16384000000000000000e5 +511 3 3 16 0.16384000000000000000e5 +511 3 4 17 0.16384000000000000000e5 +511 4 1 13 0.16384000000000000000e5 +512 1 3 18 -0.32768000000000000000e5 +512 1 9 16 0.65536000000000000000e5 +512 1 17 18 0.32768000000000000000e5 +512 1 20 27 -0.65536000000000000000e5 +512 3 1 30 -0.65536000000000000000e5 +512 3 3 16 -0.32768000000000000000e5 +512 3 4 17 -0.32768000000000000000e5 +512 4 1 13 -0.32768000000000000000e5 +513 1 4 27 -0.32768000000000000000e5 +513 1 17 19 0.32768000000000000000e5 +514 1 5 20 0.32768000000000000000e5 +514 1 11 26 -0.65536000000000000000e5 +514 1 17 20 0.32768000000000000000e5 +514 1 20 27 0.32768000000000000000e5 +514 2 6 12 0.32768000000000000000e5 +514 3 1 30 0.32768000000000000000e5 +514 3 6 19 -0.32768000000000000000e5 +514 4 2 14 -0.32768000000000000000e5 +515 1 17 21 0.32768000000000000000e5 +515 1 20 27 -0.32768000000000000000e5 +515 3 1 30 -0.32768000000000000000e5 +516 1 5 20 -0.32768000000000000000e5 +516 1 17 22 0.32768000000000000000e5 +516 3 6 19 0.32768000000000000000e5 +517 1 11 26 -0.32768000000000000000e5 +517 1 17 23 0.32768000000000000000e5 +518 1 7 22 0.16384000000000000000e5 +518 1 8 23 -0.32768000000000000000e5 +518 1 17 24 -0.16384000000000000000e5 +518 1 17 25 0.32768000000000000000e5 +518 3 7 20 0.16384000000000000000e5 +518 3 8 21 0.16384000000000000000e5 +518 4 8 12 0.16384000000000000000e5 +519 1 1 32 0.32768000000000000000e5 +519 1 2 33 0.32768000000000000000e5 +519 1 3 34 0.65536000000000000000e5 +519 1 16 31 -0.13107200000000000000e6 +519 1 17 26 0.32768000000000000000e5 +519 1 20 27 0.65536000000000000000e5 +519 2 6 12 0.65536000000000000000e5 +519 2 11 17 0.32768000000000000000e5 +519 4 2 14 -0.65536000000000000000e5 +519 4 5 17 -0.65536000000000000000e5 +520 1 2 33 -0.32768000000000000000e5 +520 1 17 27 0.32768000000000000000e5 +521 1 2 33 0.32768000000000000000e5 +521 1 3 34 -0.65536000000000000000e5 +521 1 4 35 0.32768000000000000000e5 +521 1 17 28 0.32768000000000000000e5 +521 2 12 18 0.32768000000000000000e5 +521 3 3 32 -0.32768000000000000000e5 +521 3 4 33 -0.32768000000000000000e5 +521 3 17 30 0.65536000000000000000e5 +521 4 13 17 -0.32768000000000000000e5 +522 1 17 29 0.32768000000000000000e5 +522 1 20 27 -0.32768000000000000000e5 +523 1 3 34 -0.32768000000000000000e5 +523 1 17 30 0.32768000000000000000e5 +524 1 17 24 -0.32768000000000000000e5 +524 1 17 31 0.32768000000000000000e5 +524 3 2 31 0.32768000000000000000e5 +525 1 2 33 0.32768000000000000000e5 +525 1 3 34 -0.65536000000000000000e5 +525 1 4 35 0.32768000000000000000e5 +525 1 17 33 0.32768000000000000000e5 +525 2 12 18 0.32768000000000000000e5 +525 3 4 33 -0.32768000000000000000e5 +525 3 17 30 0.65536000000000000000e5 +525 4 13 17 -0.32768000000000000000e5 +526 1 17 34 0.32768000000000000000e5 +526 1 20 35 -0.32768000000000000000e5 +526 3 6 35 -0.32768000000000000000e5 +527 1 17 35 0.32768000000000000000e5 +527 1 26 33 -0.32768000000000000000e5 +528 1 4 27 -0.16384000000000000000e5 +528 1 18 18 0.32768000000000000000e5 +529 1 4 35 -0.32768000000000000000e5 +529 1 18 19 0.32768000000000000000e5 +529 3 3 32 0.32768000000000000000e5 +529 3 4 33 0.32768000000000000000e5 +529 3 5 26 -0.32768000000000000000e5 +529 3 17 30 -0.65536000000000000000e5 +529 4 13 17 0.32768000000000000000e5 +530 1 18 20 0.32768000000000000000e5 +530 1 20 27 -0.32768000000000000000e5 +530 3 1 30 -0.32768000000000000000e5 +531 1 5 20 -0.32768000000000000000e5 +531 1 18 21 0.32768000000000000000e5 +531 3 6 19 0.32768000000000000000e5 +532 1 3 34 0.32768000000000000000e5 +532 1 17 24 -0.65536000000000000000e5 +532 1 18 22 0.32768000000000000000e5 +532 1 20 27 0.32768000000000000000e5 +532 2 6 20 0.32768000000000000000e5 +532 3 2 31 0.65536000000000000000e5 +532 3 17 22 -0.32768000000000000000e5 +533 1 17 24 -0.32768000000000000000e5 +533 1 18 23 0.32768000000000000000e5 +534 1 12 27 -0.32768000000000000000e5 +534 1 18 24 0.32768000000000000000e5 +535 1 13 28 -0.32768000000000000000e5 +535 1 18 25 0.32768000000000000000e5 +536 1 2 33 -0.32768000000000000000e5 +536 1 18 26 0.32768000000000000000e5 +537 1 2 33 0.32768000000000000000e5 +537 1 3 34 -0.65536000000000000000e5 +537 1 4 35 0.32768000000000000000e5 +537 1 18 27 0.32768000000000000000e5 +537 2 12 18 0.32768000000000000000e5 +537 3 3 32 -0.32768000000000000000e5 +537 3 4 33 -0.32768000000000000000e5 +537 3 17 30 0.65536000000000000000e5 +537 4 13 17 -0.32768000000000000000e5 +538 1 4 35 -0.32768000000000000000e5 +538 1 18 28 0.32768000000000000000e5 +538 3 3 32 0.32768000000000000000e5 +538 3 4 33 0.32768000000000000000e5 +538 3 17 30 -0.65536000000000000000e5 +538 4 13 17 0.32768000000000000000e5 +539 1 3 34 -0.32768000000000000000e5 +539 1 18 29 0.32768000000000000000e5 +540 1 3 34 0.32768000000000000000e5 +540 1 17 24 -0.65536000000000000000e5 +540 1 18 30 0.32768000000000000000e5 +540 1 20 27 0.32768000000000000000e5 +540 2 6 20 0.32768000000000000000e5 +540 3 2 31 0.65536000000000000000e5 +541 1 12 27 -0.32768000000000000000e5 +541 1 18 31 0.32768000000000000000e5 +541 3 18 23 0.32768000000000000000e5 +542 1 2 33 0.32768000000000000000e5 +542 1 3 34 -0.65536000000000000000e5 +542 1 4 35 0.32768000000000000000e5 +542 1 18 32 0.32768000000000000000e5 +542 2 12 18 0.32768000000000000000e5 +542 3 4 33 -0.32768000000000000000e5 +542 3 17 30 0.65536000000000000000e5 +542 4 13 17 -0.32768000000000000000e5 +543 1 4 35 -0.32768000000000000000e5 +543 1 18 33 0.32768000000000000000e5 +544 1 3 34 0.32768000000000000000e5 +544 1 17 24 -0.65536000000000000000e5 +544 1 18 34 0.32768000000000000000e5 +544 1 20 27 0.32768000000000000000e5 +544 2 6 20 0.32768000000000000000e5 +544 3 2 31 0.65536000000000000000e5 +544 3 17 30 0.32768000000000000000e5 +545 1 4 27 -0.32768000000000000000e5 +545 1 4 35 -0.32768000000000000000e5 +545 1 18 35 0.32768000000000000000e5 +545 1 26 33 0.32768000000000000000e5 +545 2 4 18 -0.32768000000000000000e5 +545 2 18 20 0.32768000000000000000e5 +545 3 3 32 0.32768000000000000000e5 +545 3 5 26 -0.32768000000000000000e5 +545 3 17 22 0.65536000000000000000e5 +545 3 18 19 -0.32768000000000000000e5 +545 3 19 32 -0.32768000000000000000e5 +545 3 20 33 0.65536000000000000000e5 +545 4 13 17 0.32768000000000000000e5 +546 1 3 34 0.32768000000000000000e5 +546 1 4 27 0.16384000000000000000e5 +546 1 4 35 0.16384000000000000000e5 +546 1 17 24 -0.65536000000000000000e5 +546 1 19 19 0.32768000000000000000e5 +546 1 20 27 0.32768000000000000000e5 +546 2 4 18 0.16384000000000000000e5 +546 2 6 20 0.32768000000000000000e5 +546 3 2 31 0.65536000000000000000e5 +546 3 3 32 -0.16384000000000000000e5 +546 3 4 33 -0.16384000000000000000e5 +546 3 5 26 0.16384000000000000000e5 +546 3 17 22 -0.32768000000000000000e5 +546 3 17 30 0.32768000000000000000e5 +546 4 13 17 -0.16384000000000000000e5 +547 1 5 20 -0.32768000000000000000e5 +547 1 19 20 0.32768000000000000000e5 +547 3 6 19 0.32768000000000000000e5 +548 1 3 34 0.32768000000000000000e5 +548 1 17 24 -0.65536000000000000000e5 +548 1 19 21 0.32768000000000000000e5 +548 1 20 27 0.32768000000000000000e5 +548 2 6 20 0.32768000000000000000e5 +548 3 2 31 0.65536000000000000000e5 +548 3 17 22 -0.32768000000000000000e5 +549 1 3 34 -0.32768000000000000000e5 +549 1 5 20 0.32768000000000000000e5 +549 1 19 22 0.32768000000000000000e5 +549 1 19 34 -0.32768000000000000000e5 +549 3 6 19 -0.32768000000000000000e5 +549 3 17 22 0.32768000000000000000e5 +549 3 18 23 -0.65536000000000000000e5 +549 3 22 27 -0.32768000000000000000e5 +549 4 6 18 0.32768000000000000000e5 +550 1 12 27 -0.32768000000000000000e5 +550 1 19 23 0.32768000000000000000e5 +551 1 12 19 -0.32768000000000000000e5 +551 1 19 24 0.32768000000000000000e5 +551 3 4 25 0.65536000000000000000e5 +551 3 8 21 -0.32768000000000000000e5 +551 3 9 22 -0.32768000000000000000e5 +551 4 4 16 -0.32768000000000000000e5 +552 1 9 24 -0.32768000000000000000e5 +552 1 19 25 0.32768000000000000000e5 +552 3 4 25 0.32768000000000000000e5 +553 1 2 33 0.32768000000000000000e5 +553 1 3 34 -0.65536000000000000000e5 +553 1 4 35 0.32768000000000000000e5 +553 1 19 26 0.32768000000000000000e5 +553 2 12 18 0.32768000000000000000e5 +553 3 3 32 -0.32768000000000000000e5 +553 3 4 33 -0.32768000000000000000e5 +553 3 17 30 0.65536000000000000000e5 +553 4 13 17 -0.32768000000000000000e5 +554 1 4 35 -0.32768000000000000000e5 +554 1 19 27 0.32768000000000000000e5 +554 3 3 32 0.32768000000000000000e5 +554 3 4 33 0.32768000000000000000e5 +554 3 17 30 -0.65536000000000000000e5 +554 4 13 17 0.32768000000000000000e5 +555 1 3 34 0.65536000000000000000e5 +555 1 4 27 0.32768000000000000000e5 +555 1 4 35 0.32768000000000000000e5 +555 1 17 24 -0.13107200000000000000e6 +555 1 19 28 0.32768000000000000000e5 +555 1 20 27 0.65536000000000000000e5 +555 2 4 18 0.32768000000000000000e5 +555 2 6 20 0.65536000000000000000e5 +555 3 2 31 0.13107200000000000000e6 +555 3 3 32 -0.32768000000000000000e5 +555 3 4 33 -0.32768000000000000000e5 +555 3 5 26 0.32768000000000000000e5 +555 3 17 22 -0.65536000000000000000e5 +555 3 17 30 0.65536000000000000000e5 +555 3 18 19 0.32768000000000000000e5 +555 4 13 17 -0.32768000000000000000e5 +556 1 3 34 0.32768000000000000000e5 +556 1 17 24 -0.65536000000000000000e5 +556 1 19 29 0.32768000000000000000e5 +556 1 20 27 0.32768000000000000000e5 +556 2 6 20 0.32768000000000000000e5 +556 3 2 31 0.65536000000000000000e5 +557 1 19 30 0.32768000000000000000e5 +557 1 19 34 -0.32768000000000000000e5 +557 3 22 27 -0.32768000000000000000e5 +558 1 3 34 -0.32768000000000000000e5 +558 1 12 19 -0.32768000000000000000e5 +558 1 13 28 0.65536000000000000000e5 +558 1 19 31 0.32768000000000000000e5 +558 1 20 35 0.32768000000000000000e5 +558 1 25 32 -0.65536000000000000000e5 +558 2 6 20 -0.16384000000000000000e5 +558 2 14 20 0.16384000000000000000e5 +558 3 2 31 -0.32768000000000000000e5 +558 3 4 25 0.65536000000000000000e5 +558 3 6 35 0.32768000000000000000e5 +558 3 8 21 -0.32768000000000000000e5 +558 3 9 22 -0.32768000000000000000e5 +558 3 16 29 -0.16384000000000000000e5 +558 3 17 30 -0.32768000000000000000e5 +558 3 18 23 -0.32768000000000000000e5 +558 3 18 31 -0.32768000000000000000e5 +558 3 22 27 -0.16384000000000000000e5 +558 4 4 16 -0.32768000000000000000e5 +558 4 8 20 -0.32768000000000000000e5 +558 4 12 16 -0.32768000000000000000e5 +558 4 14 18 -0.16384000000000000000e5 +559 1 4 35 -0.32768000000000000000e5 +559 1 19 32 0.32768000000000000000e5 +560 1 3 34 0.65536000000000000000e5 +560 1 4 27 0.32768000000000000000e5 +560 1 4 35 0.32768000000000000000e5 +560 1 17 24 -0.13107200000000000000e6 +560 1 19 33 0.32768000000000000000e5 +560 1 20 27 0.65536000000000000000e5 +560 2 4 18 0.32768000000000000000e5 +560 2 6 20 0.65536000000000000000e5 +560 3 2 31 0.13107200000000000000e6 +560 3 3 32 -0.32768000000000000000e5 +560 3 5 26 0.32768000000000000000e5 +560 3 17 22 -0.65536000000000000000e5 +560 3 17 30 0.65536000000000000000e5 +560 3 18 19 0.32768000000000000000e5 +560 4 13 17 -0.32768000000000000000e5 +561 1 3 34 0.65536000000000000000e5 +561 1 4 27 0.32768000000000000000e5 +561 1 4 35 0.32768000000000000000e5 +561 1 17 24 -0.13107200000000000000e6 +561 1 19 35 0.32768000000000000000e5 +561 1 20 27 0.65536000000000000000e5 +561 2 4 18 0.32768000000000000000e5 +561 2 6 20 0.65536000000000000000e5 +561 3 2 31 0.13107200000000000000e6 +561 3 3 32 -0.32768000000000000000e5 +561 3 5 26 0.32768000000000000000e5 +561 3 17 22 -0.65536000000000000000e5 +561 3 17 30 0.65536000000000000000e5 +561 3 18 19 0.32768000000000000000e5 +561 3 19 32 0.32768000000000000000e5 +561 4 13 17 -0.32768000000000000000e5 +562 1 16 23 -0.16384000000000000000e5 +562 1 20 20 0.32768000000000000000e5 +563 1 11 26 -0.32768000000000000000e5 +563 1 20 21 0.32768000000000000000e5 +564 1 17 24 -0.32768000000000000000e5 +564 1 20 22 0.32768000000000000000e5 +565 1 11 26 -0.16384000000000000000e5 +565 1 16 23 -0.16384000000000000000e5 +565 1 17 24 -0.16384000000000000000e5 +565 1 20 23 0.32768000000000000000e5 +565 2 5 19 -0.16384000000000000000e5 +566 1 7 22 0.16384000000000000000e5 +566 1 8 23 -0.32768000000000000000e5 +566 1 17 24 -0.16384000000000000000e5 +566 1 20 24 0.32768000000000000000e5 +566 3 7 20 0.16384000000000000000e5 +566 3 8 21 0.16384000000000000000e5 +566 4 8 12 0.16384000000000000000e5 +567 1 7 14 -0.32768000000000000000e5 +567 1 20 25 0.32768000000000000000e5 +567 3 2 15 0.32768000000000000000e5 +567 3 10 23 0.32768000000000000000e5 +568 1 3 34 0.32768000000000000000e5 +568 1 16 31 -0.65536000000000000000e5 +568 1 20 26 0.32768000000000000000e5 +568 1 20 27 0.32768000000000000000e5 +568 2 6 12 0.32768000000000000000e5 +568 4 2 14 -0.32768000000000000000e5 +568 4 5 17 -0.32768000000000000000e5 +569 1 3 34 -0.32768000000000000000e5 +569 1 20 28 0.32768000000000000000e5 +570 1 16 31 -0.32768000000000000000e5 +570 1 20 29 0.32768000000000000000e5 +571 1 17 24 -0.32768000000000000000e5 +571 1 20 30 0.32768000000000000000e5 +571 3 2 31 0.32768000000000000000e5 +572 1 7 22 0.16384000000000000000e5 +572 1 8 23 -0.32768000000000000000e5 +572 1 17 24 -0.16384000000000000000e5 +572 1 20 31 0.32768000000000000000e5 +572 3 7 20 0.16384000000000000000e5 +572 3 8 21 0.16384000000000000000e5 +572 3 13 26 0.32768000000000000000e5 +572 4 8 12 0.16384000000000000000e5 +573 1 20 27 -0.32768000000000000000e5 +573 1 20 32 0.32768000000000000000e5 +573 3 16 29 0.32768000000000000000e5 +574 1 20 33 0.32768000000000000000e5 +574 1 20 35 -0.32768000000000000000e5 +574 3 6 35 -0.32768000000000000000e5 +575 1 3 34 0.16384000000000000000e5 +575 1 17 24 -0.32768000000000000000e5 +575 1 20 34 0.32768000000000000000e5 +575 1 20 35 -0.16384000000000000000e5 +575 2 6 20 0.16384000000000000000e5 +575 2 14 20 -0.16384000000000000000e5 +575 3 2 31 0.32768000000000000000e5 +575 3 6 35 -0.16384000000000000000e5 +575 3 16 29 0.16384000000000000000e5 +575 3 17 30 0.16384000000000000000e5 +576 1 17 24 -0.16384000000000000000e5 +576 1 21 21 0.32768000000000000000e5 +577 1 12 27 -0.32768000000000000000e5 +577 1 21 22 0.32768000000000000000e5 +578 1 7 22 0.16384000000000000000e5 +578 1 8 23 -0.32768000000000000000e5 +578 1 17 24 -0.16384000000000000000e5 +578 1 21 23 0.32768000000000000000e5 +578 3 7 20 0.16384000000000000000e5 +578 3 8 21 0.16384000000000000000e5 +578 4 8 12 0.16384000000000000000e5 +579 1 13 28 -0.32768000000000000000e5 +579 1 21 24 0.32768000000000000000e5 +580 1 14 29 -0.32768000000000000000e5 +580 1 21 25 0.32768000000000000000e5 +581 1 20 27 -0.32768000000000000000e5 +581 1 21 26 0.32768000000000000000e5 +582 1 3 34 -0.32768000000000000000e5 +582 1 21 27 0.32768000000000000000e5 +583 1 3 34 0.32768000000000000000e5 +583 1 17 24 -0.65536000000000000000e5 +583 1 20 27 0.32768000000000000000e5 +583 1 21 28 0.32768000000000000000e5 +583 2 6 20 0.32768000000000000000e5 +583 3 2 31 0.65536000000000000000e5 +584 1 17 24 -0.32768000000000000000e5 +584 1 21 29 0.32768000000000000000e5 +584 3 2 31 0.32768000000000000000e5 +585 1 12 27 -0.32768000000000000000e5 +585 1 21 30 0.32768000000000000000e5 +585 3 18 23 0.32768000000000000000e5 +586 1 3 34 -0.16384000000000000000e5 +586 1 20 35 0.16384000000000000000e5 +586 1 21 31 0.32768000000000000000e5 +586 1 25 32 -0.32768000000000000000e5 +586 2 6 20 -0.81920000000000000000e4 +586 2 14 20 0.81920000000000000000e4 +586 3 6 35 0.16384000000000000000e5 +586 3 16 29 -0.81920000000000000000e4 +586 3 17 30 -0.16384000000000000000e5 +586 3 18 31 -0.16384000000000000000e5 +586 3 22 27 -0.81920000000000000000e4 +586 4 8 20 -0.16384000000000000000e5 +586 4 14 18 -0.81920000000000000000e4 +587 1 20 35 -0.32768000000000000000e5 +587 1 21 32 0.32768000000000000000e5 +587 3 6 35 -0.32768000000000000000e5 +588 1 3 34 0.32768000000000000000e5 +588 1 17 24 -0.65536000000000000000e5 +588 1 20 27 0.32768000000000000000e5 +588 1 21 33 0.32768000000000000000e5 +588 2 6 20 0.32768000000000000000e5 +588 3 2 31 0.65536000000000000000e5 +588 3 17 30 0.32768000000000000000e5 +589 1 3 34 0.16384000000000000000e5 +589 1 12 27 -0.32768000000000000000e5 +589 1 20 35 -0.16384000000000000000e5 +589 1 21 34 0.32768000000000000000e5 +589 3 6 35 -0.16384000000000000000e5 +589 3 17 30 0.16384000000000000000e5 +589 3 18 23 0.32768000000000000000e5 +589 3 22 27 0.16384000000000000000e5 +589 4 14 18 0.16384000000000000000e5 +590 1 3 34 0.32768000000000000000e5 +590 1 17 24 -0.65536000000000000000e5 +590 1 20 27 0.32768000000000000000e5 +590 1 21 35 0.32768000000000000000e5 +590 2 6 20 0.32768000000000000000e5 +590 3 2 31 0.65536000000000000000e5 +590 3 17 30 0.32768000000000000000e5 +590 3 20 33 0.32768000000000000000e5 +591 1 12 19 -0.16384000000000000000e5 +591 1 22 22 0.32768000000000000000e5 +591 3 4 25 0.32768000000000000000e5 +591 3 8 21 -0.16384000000000000000e5 +591 3 9 22 -0.16384000000000000000e5 +591 4 4 16 -0.16384000000000000000e5 +592 1 13 28 -0.32768000000000000000e5 +592 1 22 23 0.32768000000000000000e5 +593 1 9 24 -0.32768000000000000000e5 +593 1 22 24 0.32768000000000000000e5 +593 3 4 25 0.32768000000000000000e5 +594 1 3 34 -0.32768000000000000000e5 +594 1 22 26 0.32768000000000000000e5 +595 1 3 34 0.32768000000000000000e5 +595 1 17 24 -0.65536000000000000000e5 +595 1 20 27 0.32768000000000000000e5 +595 1 22 27 0.32768000000000000000e5 +595 2 6 20 0.32768000000000000000e5 +595 3 2 31 0.65536000000000000000e5 +596 1 19 34 -0.32768000000000000000e5 +596 1 22 28 0.32768000000000000000e5 +596 3 22 27 -0.32768000000000000000e5 +597 1 12 27 -0.32768000000000000000e5 +597 1 22 29 0.32768000000000000000e5 +597 3 18 23 0.32768000000000000000e5 +598 1 3 34 -0.32768000000000000000e5 +598 1 12 19 -0.32768000000000000000e5 +598 1 13 28 0.65536000000000000000e5 +598 1 20 35 0.32768000000000000000e5 +598 1 22 30 0.32768000000000000000e5 +598 1 25 32 -0.65536000000000000000e5 +598 2 6 20 -0.16384000000000000000e5 +598 2 14 20 0.16384000000000000000e5 +598 3 2 31 -0.32768000000000000000e5 +598 3 4 25 0.65536000000000000000e5 +598 3 6 35 0.32768000000000000000e5 +598 3 8 21 -0.32768000000000000000e5 +598 3 9 22 -0.32768000000000000000e5 +598 3 16 29 -0.16384000000000000000e5 +598 3 17 30 -0.32768000000000000000e5 +598 3 18 23 -0.32768000000000000000e5 +598 3 18 31 -0.32768000000000000000e5 +598 3 22 27 -0.16384000000000000000e5 +598 4 4 16 -0.32768000000000000000e5 +598 4 8 20 -0.32768000000000000000e5 +598 4 12 16 -0.32768000000000000000e5 +598 4 14 18 -0.16384000000000000000e5 +599 1 9 24 -0.32768000000000000000e5 +599 1 22 31 0.32768000000000000000e5 +599 3 4 25 0.32768000000000000000e5 +599 3 14 27 0.32768000000000000000e5 +600 1 3 34 0.32768000000000000000e5 +600 1 17 24 -0.65536000000000000000e5 +600 1 20 27 0.32768000000000000000e5 +600 1 22 32 0.32768000000000000000e5 +600 2 6 20 0.32768000000000000000e5 +600 3 2 31 0.65536000000000000000e5 +600 3 17 30 0.32768000000000000000e5 +601 1 19 34 -0.32768000000000000000e5 +601 1 22 33 0.32768000000000000000e5 +602 1 3 34 -0.32768000000000000000e5 +602 1 12 19 -0.32768000000000000000e5 +602 1 13 28 0.65536000000000000000e5 +602 1 20 35 0.32768000000000000000e5 +602 1 22 34 0.32768000000000000000e5 +602 1 25 32 -0.65536000000000000000e5 +602 2 6 20 -0.16384000000000000000e5 +602 2 14 20 0.16384000000000000000e5 +602 3 2 31 -0.32768000000000000000e5 +602 3 4 25 0.65536000000000000000e5 +602 3 6 35 0.32768000000000000000e5 +602 3 8 21 -0.32768000000000000000e5 +602 3 9 22 -0.32768000000000000000e5 +602 3 16 29 -0.16384000000000000000e5 +602 3 17 30 -0.32768000000000000000e5 +602 3 18 23 -0.32768000000000000000e5 +602 3 22 27 -0.16384000000000000000e5 +602 4 4 16 -0.32768000000000000000e5 +602 4 8 20 -0.32768000000000000000e5 +602 4 12 16 -0.32768000000000000000e5 +602 4 14 18 -0.16384000000000000000e5 +603 1 22 35 0.32768000000000000000e5 +603 1 30 33 -0.32768000000000000000e5 +604 1 7 14 -0.16384000000000000000e5 +604 1 23 23 0.32768000000000000000e5 +604 3 2 15 0.16384000000000000000e5 +604 3 10 23 0.16384000000000000000e5 +605 1 14 29 -0.32768000000000000000e5 +605 1 23 24 0.32768000000000000000e5 +606 1 8 15 -0.32768000000000000000e5 +606 1 14 21 0.16384000000000000000e5 +606 1 14 29 -0.16384000000000000000e5 +606 1 23 25 0.32768000000000000000e5 +606 3 2 15 0.16384000000000000000e5 +606 3 8 13 0.16384000000000000000e5 +606 3 10 23 0.16384000000000000000e5 +606 3 11 12 0.16384000000000000000e5 +606 3 11 24 0.16384000000000000000e5 +606 4 6 10 0.16384000000000000000e5 +606 4 10 14 0.16384000000000000000e5 +607 1 16 31 -0.32768000000000000000e5 +607 1 23 26 0.32768000000000000000e5 +608 1 17 24 -0.32768000000000000000e5 +608 1 23 27 0.32768000000000000000e5 +608 3 2 31 0.32768000000000000000e5 +609 1 12 27 -0.32768000000000000000e5 +609 1 23 28 0.32768000000000000000e5 +609 3 18 23 0.32768000000000000000e5 +610 1 7 22 0.16384000000000000000e5 +610 1 8 23 -0.32768000000000000000e5 +610 1 17 24 -0.16384000000000000000e5 +610 1 23 29 0.32768000000000000000e5 +610 3 7 20 0.16384000000000000000e5 +610 3 8 21 0.16384000000000000000e5 +610 3 13 26 0.32768000000000000000e5 +610 4 8 12 0.16384000000000000000e5 +611 1 3 34 -0.16384000000000000000e5 +611 1 20 35 0.16384000000000000000e5 +611 1 23 30 0.32768000000000000000e5 +611 1 25 32 -0.32768000000000000000e5 +611 2 6 20 -0.81920000000000000000e4 +611 2 14 20 0.81920000000000000000e4 +611 3 6 35 0.16384000000000000000e5 +611 3 16 29 -0.81920000000000000000e4 +611 3 17 30 -0.16384000000000000000e5 +611 3 18 31 -0.16384000000000000000e5 +611 3 22 27 -0.81920000000000000000e4 +611 4 8 20 -0.16384000000000000000e5 +611 4 14 18 -0.81920000000000000000e4 +612 1 14 29 -0.32768000000000000000e5 +612 1 23 31 0.32768000000000000000e5 +612 3 20 25 0.32768000000000000000e5 +613 1 3 34 0.16384000000000000000e5 +613 1 17 24 -0.32768000000000000000e5 +613 1 20 35 -0.16384000000000000000e5 +613 1 23 32 0.32768000000000000000e5 +613 2 6 20 0.16384000000000000000e5 +613 2 14 20 -0.16384000000000000000e5 +613 3 2 31 0.32768000000000000000e5 +613 3 6 35 -0.16384000000000000000e5 +613 3 16 29 0.16384000000000000000e5 +613 3 17 30 0.16384000000000000000e5 +614 1 3 34 0.16384000000000000000e5 +614 1 12 27 -0.32768000000000000000e5 +614 1 20 35 -0.16384000000000000000e5 +614 1 23 33 0.32768000000000000000e5 +614 3 6 35 -0.16384000000000000000e5 +614 3 17 30 0.16384000000000000000e5 +614 3 18 23 0.32768000000000000000e5 +614 3 22 27 0.16384000000000000000e5 +614 4 14 18 0.16384000000000000000e5 +615 1 23 34 0.32768000000000000000e5 +615 1 25 32 -0.32768000000000000000e5 +616 1 3 34 0.16384000000000000000e5 +616 1 12 27 -0.32768000000000000000e5 +616 1 20 35 -0.16384000000000000000e5 +616 1 23 35 0.32768000000000000000e5 +616 3 6 35 -0.16384000000000000000e5 +616 3 17 30 0.16384000000000000000e5 +616 3 18 23 0.32768000000000000000e5 +616 3 22 27 0.16384000000000000000e5 +616 3 26 31 0.32768000000000000000e5 +616 4 14 18 0.16384000000000000000e5 +617 1 22 25 -0.16384000000000000000e5 +617 1 24 24 0.32768000000000000000e5 +618 1 15 30 -0.32768000000000000000e5 +618 1 24 25 0.32768000000000000000e5 +619 1 17 24 -0.32768000000000000000e5 +619 1 24 26 0.32768000000000000000e5 +619 3 2 31 0.32768000000000000000e5 +620 1 12 27 -0.32768000000000000000e5 +620 1 24 27 0.32768000000000000000e5 +620 3 18 23 0.32768000000000000000e5 +621 1 3 34 -0.32768000000000000000e5 +621 1 12 19 -0.32768000000000000000e5 +621 1 13 28 0.65536000000000000000e5 +621 1 20 35 0.32768000000000000000e5 +621 1 24 28 0.32768000000000000000e5 +621 1 25 32 -0.65536000000000000000e5 +621 2 6 20 -0.16384000000000000000e5 +621 2 14 20 0.16384000000000000000e5 +621 3 2 31 -0.32768000000000000000e5 +621 3 4 25 0.65536000000000000000e5 +621 3 6 35 0.32768000000000000000e5 +621 3 8 21 -0.32768000000000000000e5 +621 3 9 22 -0.32768000000000000000e5 +621 3 16 29 -0.16384000000000000000e5 +621 3 17 30 -0.32768000000000000000e5 +621 3 18 23 -0.32768000000000000000e5 +621 3 18 31 -0.32768000000000000000e5 +621 3 22 27 -0.16384000000000000000e5 +621 4 4 16 -0.32768000000000000000e5 +621 4 8 20 -0.32768000000000000000e5 +621 4 12 16 -0.32768000000000000000e5 +621 4 14 18 -0.16384000000000000000e5 +622 1 3 34 -0.16384000000000000000e5 +622 1 20 35 0.16384000000000000000e5 +622 1 24 29 0.32768000000000000000e5 +622 1 25 32 -0.32768000000000000000e5 +622 2 6 20 -0.81920000000000000000e4 +622 2 14 20 0.81920000000000000000e4 +622 3 6 35 0.16384000000000000000e5 +622 3 16 29 -0.81920000000000000000e4 +622 3 17 30 -0.16384000000000000000e5 +622 3 18 31 -0.16384000000000000000e5 +622 3 22 27 -0.81920000000000000000e4 +622 4 8 20 -0.16384000000000000000e5 +622 4 14 18 -0.81920000000000000000e4 +623 1 9 24 -0.32768000000000000000e5 +623 1 24 30 0.32768000000000000000e5 +623 3 4 25 0.32768000000000000000e5 +623 3 14 27 0.32768000000000000000e5 +624 1 3 34 0.16384000000000000000e5 +624 1 12 27 -0.32768000000000000000e5 +624 1 20 35 -0.16384000000000000000e5 +624 1 24 32 0.32768000000000000000e5 +624 3 6 35 -0.16384000000000000000e5 +624 3 17 30 0.16384000000000000000e5 +624 3 18 23 0.32768000000000000000e5 +624 3 22 27 0.16384000000000000000e5 +624 4 14 18 0.16384000000000000000e5 +625 1 3 34 -0.32768000000000000000e5 +625 1 12 19 -0.32768000000000000000e5 +625 1 13 28 0.65536000000000000000e5 +625 1 20 35 0.32768000000000000000e5 +625 1 24 33 0.32768000000000000000e5 +625 1 25 32 -0.65536000000000000000e5 +625 2 6 20 -0.16384000000000000000e5 +625 2 14 20 0.16384000000000000000e5 +625 3 2 31 -0.32768000000000000000e5 +625 3 4 25 0.65536000000000000000e5 +625 3 6 35 0.32768000000000000000e5 +625 3 8 21 -0.32768000000000000000e5 +625 3 9 22 -0.32768000000000000000e5 +625 3 16 29 -0.16384000000000000000e5 +625 3 17 30 -0.32768000000000000000e5 +625 3 18 23 -0.32768000000000000000e5 +625 3 22 27 -0.16384000000000000000e5 +625 4 4 16 -0.32768000000000000000e5 +625 4 8 20 -0.32768000000000000000e5 +625 4 12 16 -0.32768000000000000000e5 +625 4 14 18 -0.16384000000000000000e5 +626 1 9 24 -0.32768000000000000000e5 +626 1 24 34 0.32768000000000000000e5 +626 3 4 25 0.32768000000000000000e5 +626 3 14 27 0.32768000000000000000e5 +626 3 24 29 0.32768000000000000000e5 +627 1 3 34 -0.32768000000000000000e5 +627 1 12 19 -0.32768000000000000000e5 +627 1 13 28 0.65536000000000000000e5 +627 1 20 35 0.32768000000000000000e5 +627 1 24 35 0.32768000000000000000e5 +627 1 25 32 -0.65536000000000000000e5 +627 2 6 20 -0.16384000000000000000e5 +627 2 14 20 0.16384000000000000000e5 +627 3 2 31 -0.32768000000000000000e5 +627 3 4 25 0.65536000000000000000e5 +627 3 6 35 0.32768000000000000000e5 +627 3 8 21 -0.32768000000000000000e5 +627 3 9 22 -0.32768000000000000000e5 +627 3 16 29 -0.16384000000000000000e5 +627 3 17 30 -0.32768000000000000000e5 +627 3 18 23 -0.32768000000000000000e5 +627 3 21 34 0.32768000000000000000e5 +627 3 22 27 -0.16384000000000000000e5 +627 4 4 16 -0.32768000000000000000e5 +627 4 8 20 -0.32768000000000000000e5 +627 4 12 16 -0.32768000000000000000e5 +627 4 14 18 -0.16384000000000000000e5 +628 1 12 15 -0.16384000000000000000e5 +628 1 14 21 0.40960000000000000000e4 +628 1 14 29 -0.40960000000000000000e4 +628 1 15 22 0.81920000000000000000e4 +628 1 15 30 -0.81920000000000000000e4 +628 1 25 25 0.32768000000000000000e5 +628 3 10 23 0.40960000000000000000e4 +628 3 11 24 0.40960000000000000000e4 +628 3 12 25 0.81920000000000000000e4 +628 3 13 14 0.16384000000000000000e5 +628 4 10 14 0.40960000000000000000e4 +628 4 10 16 0.81920000000000000000e4 +629 1 7 22 0.16384000000000000000e5 +629 1 8 23 -0.32768000000000000000e5 +629 1 17 24 -0.16384000000000000000e5 +629 1 25 26 0.32768000000000000000e5 +629 3 7 20 0.16384000000000000000e5 +629 3 8 21 0.16384000000000000000e5 +629 3 13 26 0.32768000000000000000e5 +629 4 8 12 0.16384000000000000000e5 +630 1 3 34 -0.16384000000000000000e5 +630 1 20 35 0.16384000000000000000e5 +630 1 25 27 0.32768000000000000000e5 +630 1 25 32 -0.32768000000000000000e5 +630 2 6 20 -0.81920000000000000000e4 +630 2 14 20 0.81920000000000000000e4 +630 3 6 35 0.16384000000000000000e5 +630 3 16 29 -0.81920000000000000000e4 +630 3 17 30 -0.16384000000000000000e5 +630 3 18 31 -0.16384000000000000000e5 +630 3 22 27 -0.81920000000000000000e4 +630 4 8 20 -0.16384000000000000000e5 +630 4 14 18 -0.81920000000000000000e4 +631 1 9 24 -0.32768000000000000000e5 +631 1 25 28 0.32768000000000000000e5 +631 3 4 25 0.32768000000000000000e5 +631 3 14 27 0.32768000000000000000e5 +632 1 14 29 -0.32768000000000000000e5 +632 1 25 29 0.32768000000000000000e5 +632 3 20 25 0.32768000000000000000e5 +633 1 24 31 -0.32768000000000000000e5 +633 1 25 30 0.32768000000000000000e5 +634 1 15 30 -0.32768000000000000000e5 +634 1 22 25 0.16384000000000000000e5 +634 1 24 31 -0.16384000000000000000e5 +634 1 25 31 0.32768000000000000000e5 +634 3 15 28 0.16384000000000000000e5 +634 3 20 25 0.16384000000000000000e5 +634 4 16 16 0.32768000000000000000e5 +635 1 9 24 -0.32768000000000000000e5 +635 1 25 33 0.32768000000000000000e5 +635 3 4 25 0.32768000000000000000e5 +635 3 14 27 0.32768000000000000000e5 +635 3 24 29 0.32768000000000000000e5 +636 1 24 31 -0.32768000000000000000e5 +636 1 25 34 0.32768000000000000000e5 +636 3 13 34 0.32768000000000000000e5 +637 1 25 35 0.32768000000000000000e5 +637 1 31 34 -0.32768000000000000000e5 +638 1 2 33 -0.16384000000000000000e5 +638 1 3 34 0.32768000000000000000e5 +638 1 4 35 -0.16384000000000000000e5 +638 1 17 32 0.16384000000000000000e5 +638 1 20 27 -0.32768000000000000000e5 +638 1 26 26 0.32768000000000000000e5 +638 2 12 18 -0.16384000000000000000e5 +638 2 17 17 0.32768000000000000000e5 +638 3 4 33 0.16384000000000000000e5 +638 3 16 29 0.32768000000000000000e5 +638 3 17 30 -0.32768000000000000000e5 +638 4 13 17 0.16384000000000000000e5 +639 1 17 32 -0.32768000000000000000e5 +639 1 26 27 0.32768000000000000000e5 +640 1 2 33 0.32768000000000000000e5 +640 1 3 34 -0.65536000000000000000e5 +640 1 4 35 0.32768000000000000000e5 +640 1 26 28 0.32768000000000000000e5 +640 2 12 18 0.32768000000000000000e5 +640 3 4 33 -0.32768000000000000000e5 +640 3 17 30 0.65536000000000000000e5 +640 4 13 17 -0.32768000000000000000e5 +641 1 20 27 -0.32768000000000000000e5 +641 1 26 29 0.32768000000000000000e5 +641 3 16 29 0.32768000000000000000e5 +642 1 20 35 -0.32768000000000000000e5 +642 1 26 30 0.32768000000000000000e5 +642 3 6 35 -0.32768000000000000000e5 +643 1 3 34 0.16384000000000000000e5 +643 1 17 24 -0.32768000000000000000e5 +643 1 20 35 -0.16384000000000000000e5 +643 1 26 31 0.32768000000000000000e5 +643 2 6 20 0.16384000000000000000e5 +643 2 14 20 -0.16384000000000000000e5 +643 3 2 31 0.32768000000000000000e5 +643 3 6 35 -0.16384000000000000000e5 +643 3 16 29 0.16384000000000000000e5 +643 3 17 30 0.16384000000000000000e5 +644 1 2 33 0.32768000000000000000e5 +644 1 3 34 -0.65536000000000000000e5 +644 1 4 27 0.32768000000000000000e5 +644 1 4 35 0.32768000000000000000e5 +644 1 17 32 -0.32768000000000000000e5 +644 1 26 32 0.32768000000000000000e5 +644 2 4 18 0.32768000000000000000e5 +644 2 12 18 0.32768000000000000000e5 +644 2 18 20 -0.32768000000000000000e5 +644 3 3 32 -0.32768000000000000000e5 +644 3 4 33 -0.32768000000000000000e5 +644 3 5 26 0.32768000000000000000e5 +644 3 6 35 0.65536000000000000000e5 +644 3 17 22 -0.65536000000000000000e5 +644 3 17 30 0.65536000000000000000e5 +644 3 18 19 0.32768000000000000000e5 +644 3 19 32 0.32768000000000000000e5 +644 3 20 33 -0.65536000000000000000e5 +644 4 13 17 -0.65536000000000000000e5 +644 4 17 17 -0.65536000000000000000e5 +645 1 20 35 -0.32768000000000000000e5 +645 1 26 34 0.32768000000000000000e5 +646 1 3 34 0.65536000000000000000e5 +646 1 4 27 0.32768000000000000000e5 +646 1 4 35 0.32768000000000000000e5 +646 1 17 24 -0.13107200000000000000e6 +646 1 20 27 0.65536000000000000000e5 +646 1 26 33 -0.32768000000000000000e5 +646 1 26 35 0.32768000000000000000e5 +646 1 28 35 0.32768000000000000000e5 +646 2 4 18 0.32768000000000000000e5 +646 2 6 20 0.65536000000000000000e5 +646 2 18 20 -0.32768000000000000000e5 +646 2 20 20 0.65536000000000000000e5 +646 3 2 31 0.13107200000000000000e6 +646 3 3 32 -0.32768000000000000000e5 +646 3 5 26 0.32768000000000000000e5 +646 3 17 22 -0.65536000000000000000e5 +646 3 17 30 0.65536000000000000000e5 +646 3 18 19 0.32768000000000000000e5 +646 3 19 32 0.32768000000000000000e5 +646 3 20 35 0.65536000000000000000e5 +646 3 27 32 -0.32768000000000000000e5 +646 4 13 17 -0.32768000000000000000e5 +647 1 2 33 0.16384000000000000000e5 +647 1 3 34 -0.32768000000000000000e5 +647 1 4 35 0.16384000000000000000e5 +647 1 27 27 0.32768000000000000000e5 +647 2 12 18 0.16384000000000000000e5 +647 3 4 33 -0.16384000000000000000e5 +647 3 17 30 0.32768000000000000000e5 +647 4 13 17 -0.16384000000000000000e5 +648 1 4 35 -0.32768000000000000000e5 +648 1 27 28 0.32768000000000000000e5 +649 1 20 35 -0.32768000000000000000e5 +649 1 27 29 0.32768000000000000000e5 +649 3 6 35 -0.32768000000000000000e5 +650 1 3 34 0.32768000000000000000e5 +650 1 17 24 -0.65536000000000000000e5 +650 1 20 27 0.32768000000000000000e5 +650 1 27 30 0.32768000000000000000e5 +650 2 6 20 0.32768000000000000000e5 +650 3 2 31 0.65536000000000000000e5 +650 3 17 30 0.32768000000000000000e5 +651 1 3 34 0.16384000000000000000e5 +651 1 12 27 -0.32768000000000000000e5 +651 1 20 35 -0.16384000000000000000e5 +651 1 27 31 0.32768000000000000000e5 +651 3 6 35 -0.16384000000000000000e5 +651 3 17 30 0.16384000000000000000e5 +651 3 18 23 0.32768000000000000000e5 +651 3 22 27 0.16384000000000000000e5 +651 4 14 18 0.16384000000000000000e5 +652 1 26 33 -0.32768000000000000000e5 +652 1 27 32 0.32768000000000000000e5 +653 1 4 27 -0.32768000000000000000e5 +653 1 4 35 -0.32768000000000000000e5 +653 1 26 33 0.32768000000000000000e5 +653 1 27 33 0.32768000000000000000e5 +653 2 4 18 -0.32768000000000000000e5 +653 2 18 20 0.32768000000000000000e5 +653 3 3 32 0.32768000000000000000e5 +653 3 5 26 -0.32768000000000000000e5 +653 3 17 22 0.65536000000000000000e5 +653 3 18 19 -0.32768000000000000000e5 +653 3 19 32 -0.32768000000000000000e5 +653 3 20 33 0.65536000000000000000e5 +653 4 13 17 0.32768000000000000000e5 +654 1 3 34 0.32768000000000000000e5 +654 1 17 24 -0.65536000000000000000e5 +654 1 20 27 0.32768000000000000000e5 +654 1 27 34 0.32768000000000000000e5 +654 2 6 20 0.32768000000000000000e5 +654 3 2 31 0.65536000000000000000e5 +654 3 17 30 0.32768000000000000000e5 +654 3 20 33 0.32768000000000000000e5 +655 1 4 27 -0.32768000000000000000e5 +655 1 4 35 -0.32768000000000000000e5 +655 1 26 33 0.32768000000000000000e5 +655 1 27 35 0.32768000000000000000e5 +655 2 4 18 -0.32768000000000000000e5 +655 2 18 20 0.32768000000000000000e5 +655 3 3 32 0.32768000000000000000e5 +655 3 5 26 -0.32768000000000000000e5 +655 3 17 22 0.65536000000000000000e5 +655 3 18 19 -0.32768000000000000000e5 +655 3 19 32 -0.32768000000000000000e5 +655 3 20 33 0.65536000000000000000e5 +655 3 27 32 0.32768000000000000000e5 +655 4 13 17 0.32768000000000000000e5 +656 1 3 34 0.32768000000000000000e5 +656 1 4 27 0.16384000000000000000e5 +656 1 4 35 0.16384000000000000000e5 +656 1 17 24 -0.65536000000000000000e5 +656 1 20 27 0.32768000000000000000e5 +656 1 28 28 0.32768000000000000000e5 +656 2 4 18 0.16384000000000000000e5 +656 2 6 20 0.32768000000000000000e5 +656 3 2 31 0.65536000000000000000e5 +656 3 3 32 -0.16384000000000000000e5 +656 3 5 26 0.16384000000000000000e5 +656 3 17 22 -0.32768000000000000000e5 +656 3 17 30 0.32768000000000000000e5 +656 3 18 19 0.16384000000000000000e5 +656 4 13 17 -0.16384000000000000000e5 +657 1 3 34 0.32768000000000000000e5 +657 1 17 24 -0.65536000000000000000e5 +657 1 20 27 0.32768000000000000000e5 +657 1 28 29 0.32768000000000000000e5 +657 2 6 20 0.32768000000000000000e5 +657 3 2 31 0.65536000000000000000e5 +657 3 17 30 0.32768000000000000000e5 +658 1 19 34 -0.32768000000000000000e5 +658 1 28 30 0.32768000000000000000e5 +659 1 3 34 -0.32768000000000000000e5 +659 1 12 19 -0.32768000000000000000e5 +659 1 13 28 0.65536000000000000000e5 +659 1 20 35 0.32768000000000000000e5 +659 1 25 32 -0.65536000000000000000e5 +659 1 28 31 0.32768000000000000000e5 +659 2 6 20 -0.16384000000000000000e5 +659 2 14 20 0.16384000000000000000e5 +659 3 2 31 -0.32768000000000000000e5 +659 3 4 25 0.65536000000000000000e5 +659 3 6 35 0.32768000000000000000e5 +659 3 8 21 -0.32768000000000000000e5 +659 3 9 22 -0.32768000000000000000e5 +659 3 16 29 -0.16384000000000000000e5 +659 3 17 30 -0.32768000000000000000e5 +659 3 18 23 -0.32768000000000000000e5 +659 3 22 27 -0.16384000000000000000e5 +659 4 4 16 -0.32768000000000000000e5 +659 4 8 20 -0.32768000000000000000e5 +659 4 12 16 -0.32768000000000000000e5 +659 4 14 18 -0.16384000000000000000e5 +660 1 4 27 -0.32768000000000000000e5 +660 1 4 35 -0.32768000000000000000e5 +660 1 26 33 0.32768000000000000000e5 +660 1 28 32 0.32768000000000000000e5 +660 2 4 18 -0.32768000000000000000e5 +660 2 18 20 0.32768000000000000000e5 +660 3 3 32 0.32768000000000000000e5 +660 3 5 26 -0.32768000000000000000e5 +660 3 17 22 0.65536000000000000000e5 +660 3 18 19 -0.32768000000000000000e5 +660 3 19 32 -0.32768000000000000000e5 +660 3 20 33 0.65536000000000000000e5 +660 4 13 17 0.32768000000000000000e5 +661 1 3 34 0.65536000000000000000e5 +661 1 4 27 0.32768000000000000000e5 +661 1 4 35 0.32768000000000000000e5 +661 1 17 24 -0.13107200000000000000e6 +661 1 20 27 0.65536000000000000000e5 +661 1 28 33 0.32768000000000000000e5 +661 2 4 18 0.32768000000000000000e5 +661 2 6 20 0.65536000000000000000e5 +661 3 2 31 0.13107200000000000000e6 +661 3 3 32 -0.32768000000000000000e5 +661 3 5 26 0.32768000000000000000e5 +661 3 17 22 -0.65536000000000000000e5 +661 3 17 30 0.65536000000000000000e5 +661 3 18 19 0.32768000000000000000e5 +661 3 19 32 0.32768000000000000000e5 +661 4 13 17 -0.32768000000000000000e5 +662 1 28 34 0.32768000000000000000e5 +662 1 30 33 -0.32768000000000000000e5 +663 1 3 34 0.81920000000000000000e4 +663 1 17 24 -0.16384000000000000000e5 +663 1 20 35 -0.81920000000000000000e4 +663 1 29 29 0.32768000000000000000e5 +663 2 6 20 0.81920000000000000000e4 +663 2 14 20 -0.81920000000000000000e4 +663 3 2 31 0.16384000000000000000e5 +663 3 6 35 -0.81920000000000000000e4 +663 3 16 29 0.81920000000000000000e4 +663 3 17 30 0.81920000000000000000e4 +664 1 3 34 0.16384000000000000000e5 +664 1 12 27 -0.32768000000000000000e5 +664 1 20 35 -0.16384000000000000000e5 +664 1 29 30 0.32768000000000000000e5 +664 3 6 35 -0.16384000000000000000e5 +664 3 17 30 0.16384000000000000000e5 +664 3 18 23 0.32768000000000000000e5 +664 3 22 27 0.16384000000000000000e5 +664 4 14 18 0.16384000000000000000e5 +665 1 25 32 -0.32768000000000000000e5 +665 1 29 31 0.32768000000000000000e5 +666 1 20 35 -0.32768000000000000000e5 +666 1 29 32 0.32768000000000000000e5 +667 1 3 34 0.32768000000000000000e5 +667 1 17 24 -0.65536000000000000000e5 +667 1 20 27 0.32768000000000000000e5 +667 1 29 33 0.32768000000000000000e5 +667 2 6 20 0.32768000000000000000e5 +667 3 2 31 0.65536000000000000000e5 +667 3 17 30 0.32768000000000000000e5 +667 3 20 33 0.32768000000000000000e5 +668 1 3 34 0.16384000000000000000e5 +668 1 12 27 -0.32768000000000000000e5 +668 1 20 35 -0.16384000000000000000e5 +668 1 29 34 0.32768000000000000000e5 +668 3 6 35 -0.16384000000000000000e5 +668 3 17 30 0.16384000000000000000e5 +668 3 18 23 0.32768000000000000000e5 +668 3 22 27 0.16384000000000000000e5 +668 3 26 31 0.32768000000000000000e5 +668 4 14 18 0.16384000000000000000e5 +669 1 3 34 0.32768000000000000000e5 +669 1 17 24 -0.65536000000000000000e5 +669 1 20 27 0.32768000000000000000e5 +669 1 29 35 0.32768000000000000000e5 +669 2 6 20 0.32768000000000000000e5 +669 3 2 31 0.65536000000000000000e5 +669 3 17 30 0.32768000000000000000e5 +669 3 20 33 0.32768000000000000000e5 +669 3 20 35 0.32768000000000000000e5 +670 1 3 34 -0.16384000000000000000e5 +670 1 12 19 -0.16384000000000000000e5 +670 1 13 28 0.32768000000000000000e5 +670 1 20 35 0.16384000000000000000e5 +670 1 25 32 -0.32768000000000000000e5 +670 1 30 30 0.32768000000000000000e5 +670 2 6 20 -0.81920000000000000000e4 +670 2 14 20 0.81920000000000000000e4 +670 3 2 31 -0.16384000000000000000e5 +670 3 4 25 0.32768000000000000000e5 +670 3 6 35 0.16384000000000000000e5 +670 3 8 21 -0.16384000000000000000e5 +670 3 9 22 -0.16384000000000000000e5 +670 3 16 29 -0.81920000000000000000e4 +670 3 17 30 -0.16384000000000000000e5 +670 3 18 23 -0.16384000000000000000e5 +670 3 22 27 -0.81920000000000000000e4 +670 4 4 16 -0.16384000000000000000e5 +670 4 8 20 -0.16384000000000000000e5 +670 4 12 16 -0.16384000000000000000e5 +670 4 14 18 -0.81920000000000000000e4 +671 1 9 24 -0.32768000000000000000e5 +671 1 30 31 0.32768000000000000000e5 +671 3 4 25 0.32768000000000000000e5 +671 3 14 27 0.32768000000000000000e5 +671 3 24 29 0.32768000000000000000e5 +672 1 3 34 0.32768000000000000000e5 +672 1 17 24 -0.65536000000000000000e5 +672 1 20 27 0.32768000000000000000e5 +672 1 30 32 0.32768000000000000000e5 +672 2 6 20 0.32768000000000000000e5 +672 3 2 31 0.65536000000000000000e5 +672 3 17 30 0.32768000000000000000e5 +672 3 20 33 0.32768000000000000000e5 +673 1 3 34 -0.32768000000000000000e5 +673 1 12 19 -0.32768000000000000000e5 +673 1 13 28 0.65536000000000000000e5 +673 1 20 35 0.32768000000000000000e5 +673 1 25 32 -0.65536000000000000000e5 +673 1 30 34 0.32768000000000000000e5 +673 2 6 20 -0.16384000000000000000e5 +673 2 14 20 0.16384000000000000000e5 +673 3 2 31 -0.32768000000000000000e5 +673 3 4 25 0.65536000000000000000e5 +673 3 6 35 0.32768000000000000000e5 +673 3 8 21 -0.32768000000000000000e5 +673 3 9 22 -0.32768000000000000000e5 +673 3 16 29 -0.16384000000000000000e5 +673 3 17 30 -0.32768000000000000000e5 +673 3 18 23 -0.32768000000000000000e5 +673 3 21 34 0.32768000000000000000e5 +673 3 22 27 -0.16384000000000000000e5 +673 4 4 16 -0.32768000000000000000e5 +673 4 8 20 -0.32768000000000000000e5 +673 4 12 16 -0.32768000000000000000e5 +673 4 14 18 -0.16384000000000000000e5 +674 1 30 35 0.32768000000000000000e5 +674 1 33 34 -0.32768000000000000000e5 +675 1 24 31 -0.16384000000000000000e5 +675 1 31 31 0.32768000000000000000e5 +675 3 13 34 0.16384000000000000000e5 +676 1 3 34 0.16384000000000000000e5 +676 1 12 27 -0.32768000000000000000e5 +676 1 20 35 -0.16384000000000000000e5 +676 1 31 32 0.32768000000000000000e5 +676 3 6 35 -0.16384000000000000000e5 +676 3 17 30 0.16384000000000000000e5 +676 3 18 23 0.32768000000000000000e5 +676 3 22 27 0.16384000000000000000e5 +676 3 26 31 0.32768000000000000000e5 +676 4 14 18 0.16384000000000000000e5 +677 1 3 34 -0.32768000000000000000e5 +677 1 12 19 -0.32768000000000000000e5 +677 1 13 28 0.65536000000000000000e5 +677 1 20 35 0.32768000000000000000e5 +677 1 25 32 -0.65536000000000000000e5 +677 1 31 33 0.32768000000000000000e5 +677 2 6 20 -0.16384000000000000000e5 +677 2 14 20 0.16384000000000000000e5 +677 3 2 31 -0.32768000000000000000e5 +677 3 4 25 0.65536000000000000000e5 +677 3 6 35 0.32768000000000000000e5 +677 3 8 21 -0.32768000000000000000e5 +677 3 9 22 -0.32768000000000000000e5 +677 3 16 29 -0.16384000000000000000e5 +677 3 17 30 -0.32768000000000000000e5 +677 3 18 23 -0.32768000000000000000e5 +677 3 21 34 0.32768000000000000000e5 +677 3 22 27 -0.16384000000000000000e5 +677 4 4 16 -0.32768000000000000000e5 +677 4 8 20 -0.32768000000000000000e5 +677 4 12 16 -0.32768000000000000000e5 +677 4 14 18 -0.16384000000000000000e5 +678 1 3 34 -0.32768000000000000000e5 +678 1 12 19 -0.32768000000000000000e5 +678 1 13 28 0.65536000000000000000e5 +678 1 20 35 0.32768000000000000000e5 +678 1 25 32 -0.65536000000000000000e5 +678 1 31 35 0.32768000000000000000e5 +678 2 6 20 -0.16384000000000000000e5 +678 2 14 20 0.16384000000000000000e5 +678 3 2 31 -0.32768000000000000000e5 +678 3 4 25 0.65536000000000000000e5 +678 3 6 35 0.32768000000000000000e5 +678 3 8 21 -0.32768000000000000000e5 +678 3 9 22 -0.32768000000000000000e5 +678 3 16 29 -0.16384000000000000000e5 +678 3 17 30 -0.32768000000000000000e5 +678 3 18 23 -0.32768000000000000000e5 +678 3 21 34 0.32768000000000000000e5 +678 3 22 27 -0.16384000000000000000e5 +678 3 29 34 0.32768000000000000000e5 +678 4 4 16 -0.32768000000000000000e5 +678 4 8 20 -0.32768000000000000000e5 +678 4 12 16 -0.32768000000000000000e5 +678 4 14 18 -0.16384000000000000000e5 +679 1 3 34 0.32768000000000000000e5 +679 1 4 27 0.16384000000000000000e5 +679 1 4 35 0.16384000000000000000e5 +679 1 17 24 -0.65536000000000000000e5 +679 1 20 27 0.32768000000000000000e5 +679 1 26 33 -0.16384000000000000000e5 +679 1 28 35 0.16384000000000000000e5 +679 1 32 32 0.32768000000000000000e5 +679 2 4 18 0.16384000000000000000e5 +679 2 6 20 0.32768000000000000000e5 +679 2 18 20 -0.16384000000000000000e5 +679 2 20 20 0.32768000000000000000e5 +679 3 2 31 0.65536000000000000000e5 +679 3 3 32 -0.16384000000000000000e5 +679 3 5 26 0.16384000000000000000e5 +679 3 17 22 -0.32768000000000000000e5 +679 3 17 30 0.32768000000000000000e5 +679 3 18 19 0.16384000000000000000e5 +679 3 19 32 0.16384000000000000000e5 +679 3 20 35 0.32768000000000000000e5 +679 3 27 32 -0.16384000000000000000e5 +679 4 13 17 -0.16384000000000000000e5 +680 1 4 27 -0.32768000000000000000e5 +680 1 4 35 -0.32768000000000000000e5 +680 1 26 33 0.32768000000000000000e5 +680 1 32 33 0.32768000000000000000e5 +680 2 4 18 -0.32768000000000000000e5 +680 2 18 20 0.32768000000000000000e5 +680 3 3 32 0.32768000000000000000e5 +680 3 5 26 -0.32768000000000000000e5 +680 3 17 22 0.65536000000000000000e5 +680 3 18 19 -0.32768000000000000000e5 +680 3 19 32 -0.32768000000000000000e5 +680 3 20 33 0.65536000000000000000e5 +680 3 27 32 0.32768000000000000000e5 +680 4 13 17 0.32768000000000000000e5 +681 1 3 34 0.32768000000000000000e5 +681 1 17 24 -0.65536000000000000000e5 +681 1 20 27 0.32768000000000000000e5 +681 1 32 34 0.32768000000000000000e5 +681 2 6 20 0.32768000000000000000e5 +681 3 2 31 0.65536000000000000000e5 +681 3 17 30 0.32768000000000000000e5 +681 3 20 33 0.32768000000000000000e5 +681 3 20 35 0.32768000000000000000e5 +682 1 28 35 -0.16384000000000000000e5 +682 1 33 33 0.32768000000000000000e5 +683 1 28 35 -0.32768000000000000000e5 +683 1 33 35 0.32768000000000000000e5 +683 3 32 33 0.32768000000000000000e5 +684 1 3 34 -0.16384000000000000000e5 +684 1 12 19 -0.16384000000000000000e5 +684 1 13 28 0.32768000000000000000e5 +684 1 20 35 0.16384000000000000000e5 +684 1 25 32 -0.32768000000000000000e5 +684 1 34 34 0.32768000000000000000e5 +684 2 6 20 -0.81920000000000000000e4 +684 2 14 20 0.81920000000000000000e4 +684 3 2 31 -0.16384000000000000000e5 +684 3 4 25 0.32768000000000000000e5 +684 3 6 35 0.16384000000000000000e5 +684 3 8 21 -0.16384000000000000000e5 +684 3 9 22 -0.16384000000000000000e5 +684 3 16 29 -0.81920000000000000000e4 +684 3 17 30 -0.16384000000000000000e5 +684 3 18 23 -0.16384000000000000000e5 +684 3 21 34 0.16384000000000000000e5 +684 3 22 27 -0.81920000000000000000e4 +684 3 29 34 0.16384000000000000000e5 +684 4 4 16 -0.16384000000000000000e5 +684 4 8 20 -0.16384000000000000000e5 +684 4 12 16 -0.16384000000000000000e5 +684 4 14 18 -0.81920000000000000000e4 +685 1 28 35 -0.16384000000000000000e5 +685 1 35 35 0.32768000000000000000e5 +685 3 32 33 0.16384000000000000000e5 +685 3 32 35 0.16384000000000000000e5 +686 1 1 8 0.19660800000000000000e6 +686 1 1 16 0.32768000000000000000e5 +686 1 2 5 0.32768000000000000000e5 +686 1 2 9 0.65536000000000000000e5 +686 1 4 11 -0.26214400000000000000e6 +686 1 4 27 0.32768000000000000000e5 +686 1 5 12 -0.13107200000000000000e6 +686 1 5 20 -0.13107200000000000000e6 +686 1 7 10 -0.26214400000000000000e6 +686 1 7 22 0.13107200000000000000e6 +686 1 8 23 0.26214400000000000000e6 +686 1 9 16 -0.19660800000000000000e6 +686 1 11 26 0.26214400000000000000e6 +686 1 12 19 0.13107200000000000000e6 +686 1 12 27 -0.13107200000000000000e6 +686 2 1 2 0.32768000000000000000e5 +686 2 1 3 -0.32768000000000000000e5 +686 2 1 7 0.65536000000000000000e5 +686 2 2 8 0.13107200000000000000e6 +686 2 3 9 -0.13107200000000000000e6 +686 2 3 17 0.32768000000000000000e5 +686 2 5 11 0.65536000000000000000e5 +686 2 6 12 -0.13107200000000000000e6 +686 3 1 2 -0.32768000000000000000e5 +686 3 1 6 0.65536000000000000000e5 +686 3 1 14 -0.26214400000000000000e6 +686 3 2 7 0.65536000000000000000e5 +686 3 2 15 0.52428800000000000000e6 +686 3 4 17 0.32768000000000000000e5 +686 3 5 10 -0.26214400000000000000e6 +686 3 7 20 0.26214400000000000000e6 +686 3 8 21 -0.13107200000000000000e6 +686 4 1 1 -0.65536000000000000000e5 +686 4 1 5 0.65536000000000000000e5 +686 4 1 13 0.32768000000000000000e5 +686 4 2 2 0.65536000000000000000e5 +686 4 4 8 -0.13107200000000000000e6 +686 4 5 9 -0.26214400000000000000e6 +687 1 2 17 0.32768000000000000000e5 +687 1 4 27 -0.32768000000000000000e5 +687 1 5 20 0.65536000000000000000e5 +687 1 9 16 0.13107200000000000000e6 +687 1 11 26 -0.13107200000000000000e6 +687 2 1 4 0.32768000000000000000e5 +687 2 3 17 -0.32768000000000000000e5 +687 2 6 12 0.65536000000000000000e5 +687 3 4 17 -0.32768000000000000000e5 +687 3 7 20 -0.13107200000000000000e6 +687 4 1 13 -0.32768000000000000000e5 +687 4 2 2 -0.65536000000000000000e5 +688 1 1 6 0.32768000000000000000e5 +688 1 1 8 -0.32768000000000000000e5 +688 1 1 10 -0.65536000000000000000e5 +688 1 2 9 -0.32768000000000000000e5 +688 1 4 11 0.13107200000000000000e6 +688 1 5 12 0.65536000000000000000e5 +688 1 5 20 0.65536000000000000000e5 +688 1 7 10 0.13107200000000000000e6 +688 1 7 22 -0.65536000000000000000e5 +688 1 8 23 -0.13107200000000000000e6 +688 1 9 16 0.65536000000000000000e5 +688 1 11 26 -0.13107200000000000000e6 +688 1 12 19 -0.65536000000000000000e5 +688 1 12 27 0.65536000000000000000e5 +688 2 1 5 0.32768000000000000000e5 +688 2 1 7 -0.32768000000000000000e5 +688 2 2 8 -0.65536000000000000000e5 +688 2 3 9 0.65536000000000000000e5 +688 2 5 11 -0.32768000000000000000e5 +688 2 6 12 0.65536000000000000000e5 +688 3 1 14 0.13107200000000000000e6 +688 3 2 7 -0.65536000000000000000e5 +688 3 2 15 -0.26214400000000000000e6 +688 3 5 10 0.13107200000000000000e6 +688 3 7 20 -0.13107200000000000000e6 +688 3 8 21 0.65536000000000000000e5 +688 4 1 5 -0.32768000000000000000e5 +688 4 4 8 0.65536000000000000000e5 +688 4 5 9 0.13107200000000000000e6 +689 2 1 6 0.32768000000000000000e5 +689 2 5 11 -0.32768000000000000000e5 +689 4 1 5 -0.32768000000000000000e5 +690 2 1 8 0.32768000000000000000e5 +690 2 5 5 -0.65536000000000000000e5 +691 2 1 9 0.32768000000000000000e5 +691 2 2 8 -0.32768000000000000000e5 +692 1 1 10 0.16384000000000000000e5 +692 1 4 11 0.32768000000000000000e5 +692 1 5 12 0.16384000000000000000e5 +692 1 6 13 -0.65536000000000000000e5 +692 1 6 21 0.16384000000000000000e5 +692 1 7 10 0.65536000000000000000e5 +692 1 8 23 -0.32768000000000000000e5 +692 1 11 26 0.16384000000000000000e5 +692 1 12 19 -0.16384000000000000000e5 +692 1 12 27 0.16384000000000000000e5 +692 2 1 10 0.32768000000000000000e5 +692 2 2 8 -0.16384000000000000000e5 +692 2 2 16 0.16384000000000000000e5 +692 2 3 9 0.16384000000000000000e5 +692 2 5 5 0.32768000000000000000e5 +692 3 1 14 0.65536000000000000000e5 +692 3 2 15 -0.65536000000000000000e5 +692 3 5 10 0.32768000000000000000e5 +692 3 7 20 0.16384000000000000000e5 +692 3 8 21 0.16384000000000000000e5 +692 4 4 8 0.16384000000000000000e5 +692 4 5 9 0.32768000000000000000e5 +693 1 1 8 0.19660800000000000000e6 +693 1 1 16 0.32768000000000000000e5 +693 1 2 5 0.32768000000000000000e5 +693 1 2 9 0.65536000000000000000e5 +693 1 4 11 -0.26214400000000000000e6 +693 1 4 27 0.32768000000000000000e5 +693 1 5 12 -0.13107200000000000000e6 +693 1 5 20 -0.13107200000000000000e6 +693 1 7 10 -0.26214400000000000000e6 +693 1 7 22 0.13107200000000000000e6 +693 1 8 23 0.26214400000000000000e6 +693 1 9 16 -0.19660800000000000000e6 +693 1 11 26 0.26214400000000000000e6 +693 1 12 19 0.13107200000000000000e6 +693 1 12 27 -0.13107200000000000000e6 +693 2 1 3 -0.32768000000000000000e5 +693 2 1 7 0.65536000000000000000e5 +693 2 1 11 0.32768000000000000000e5 +693 2 2 8 0.13107200000000000000e6 +693 2 3 9 -0.13107200000000000000e6 +693 2 3 17 0.32768000000000000000e5 +693 2 5 11 0.65536000000000000000e5 +693 2 6 12 -0.13107200000000000000e6 +693 3 1 2 -0.32768000000000000000e5 +693 3 1 6 0.65536000000000000000e5 +693 3 1 14 -0.26214400000000000000e6 +693 3 2 7 0.65536000000000000000e5 +693 3 2 15 0.52428800000000000000e6 +693 3 4 17 0.32768000000000000000e5 +693 3 5 10 -0.26214400000000000000e6 +693 3 7 20 0.26214400000000000000e6 +693 3 8 21 -0.13107200000000000000e6 +693 4 1 5 0.65536000000000000000e5 +693 4 1 13 0.32768000000000000000e5 +693 4 2 2 0.65536000000000000000e5 +693 4 4 8 -0.13107200000000000000e6 +693 4 5 9 -0.26214400000000000000e6 +694 1 1 8 0.65536000000000000000e5 +694 1 2 5 0.32768000000000000000e5 +694 1 3 18 -0.32768000000000000000e5 +694 1 5 20 -0.65536000000000000000e5 +694 1 6 21 -0.13107200000000000000e6 +694 1 11 26 0.13107200000000000000e6 +694 2 1 3 -0.32768000000000000000e5 +694 2 1 12 0.32768000000000000000e5 +694 2 1 15 0.65536000000000000000e5 +694 2 6 12 -0.65536000000000000000e5 +694 3 1 2 -0.32768000000000000000e5 +694 3 2 7 -0.65536000000000000000e5 +694 3 7 20 0.13107200000000000000e6 +694 4 2 2 0.65536000000000000000e5 +695 1 2 17 0.32768000000000000000e5 +695 1 4 27 -0.32768000000000000000e5 +695 1 5 20 0.65536000000000000000e5 +695 1 9 16 0.13107200000000000000e6 +695 1 11 26 -0.13107200000000000000e6 +695 2 1 13 0.32768000000000000000e5 +695 2 3 17 -0.32768000000000000000e5 +695 2 6 12 0.65536000000000000000e5 +695 3 4 17 -0.32768000000000000000e5 +695 3 7 20 -0.13107200000000000000e6 +695 4 1 13 -0.32768000000000000000e5 +696 2 1 14 0.32768000000000000000e5 +696 2 5 11 -0.32768000000000000000e5 +697 1 1 8 -0.32768000000000000000e5 +697 1 2 9 -0.16384000000000000000e5 +697 1 4 11 0.65536000000000000000e5 +697 1 5 12 0.32768000000000000000e5 +697 1 5 20 0.32768000000000000000e5 +697 1 6 21 0.98304000000000000000e5 +697 1 7 10 0.65536000000000000000e5 +697 1 9 16 0.16384000000000000000e5 +697 1 12 19 -0.32768000000000000000e5 +697 1 12 27 0.32768000000000000000e5 +697 1 13 20 -0.13107200000000000000e6 +697 2 1 7 -0.16384000000000000000e5 +697 2 1 15 -0.16384000000000000000e5 +697 2 1 16 0.32768000000000000000e5 +697 2 2 8 -0.32768000000000000000e5 +697 2 2 16 0.32768000000000000000e5 +697 2 3 9 0.32768000000000000000e5 +697 2 6 12 0.32768000000000000000e5 +697 2 8 14 0.65536000000000000000e5 +697 3 1 6 -0.16384000000000000000e5 +697 3 1 14 0.65536000000000000000e5 +697 3 2 7 -0.32768000000000000000e5 +697 3 2 15 -0.13107200000000000000e6 +697 3 5 10 0.65536000000000000000e5 +697 3 8 21 0.32768000000000000000e5 +697 4 1 5 -0.16384000000000000000e5 +697 4 4 8 0.32768000000000000000e5 +697 4 5 9 0.65536000000000000000e5 +698 2 1 17 0.32768000000000000000e5 +698 2 11 11 -0.65536000000000000000e5 +699 2 1 18 0.32768000000000000000e5 +699 2 11 17 -0.32768000000000000000e5 +699 4 11 11 -0.65536000000000000000e5 +700 2 1 20 0.32768000000000000000e5 +700 2 11 17 -0.32768000000000000000e5 +701 2 1 3 -0.16384000000000000000e5 +701 2 2 2 0.32768000000000000000e5 +702 1 2 17 0.32768000000000000000e5 +702 1 4 27 -0.32768000000000000000e5 +702 1 5 20 0.65536000000000000000e5 +702 1 9 16 0.13107200000000000000e6 +702 1 11 26 -0.13107200000000000000e6 +702 2 2 3 0.32768000000000000000e5 +702 2 3 17 -0.32768000000000000000e5 +702 2 6 12 0.65536000000000000000e5 +702 3 4 17 -0.32768000000000000000e5 +702 3 7 20 -0.13107200000000000000e6 +702 4 1 13 -0.32768000000000000000e5 +702 4 2 2 -0.65536000000000000000e5 +703 2 2 5 0.32768000000000000000e5 +703 2 5 11 -0.32768000000000000000e5 +703 4 1 5 -0.32768000000000000000e5 +704 2 1 7 -0.32768000000000000000e5 +704 2 2 6 0.32768000000000000000e5 +705 2 2 7 0.32768000000000000000e5 +705 2 6 12 -0.32768000000000000000e5 +705 4 2 6 -0.32768000000000000000e5 +706 1 1 8 0.16384000000000000000e5 +706 1 2 9 0.16384000000000000000e5 +706 1 4 11 -0.32768000000000000000e5 +706 1 5 12 -0.32768000000000000000e5 +706 1 5 20 -0.16384000000000000000e5 +706 1 6 21 -0.32768000000000000000e5 +706 1 8 23 0.65536000000000000000e5 +706 1 9 16 -0.16384000000000000000e5 +706 1 12 19 0.32768000000000000000e5 +706 1 12 27 -0.32768000000000000000e5 +706 2 1 7 0.16384000000000000000e5 +706 2 2 9 0.32768000000000000000e5 +706 2 2 16 -0.32768000000000000000e5 +706 2 3 9 -0.32768000000000000000e5 +706 2 6 12 -0.16384000000000000000e5 +706 3 1 14 -0.13107200000000000000e6 +706 3 2 7 0.16384000000000000000e5 +706 3 2 15 0.13107200000000000000e6 +706 3 5 10 -0.65536000000000000000e5 +706 3 8 21 -0.32768000000000000000e5 +706 4 4 8 -0.32768000000000000000e5 +706 4 5 9 -0.65536000000000000000e5 +707 2 2 10 0.32768000000000000000e5 +707 2 6 8 -0.32768000000000000000e5 +708 1 1 8 0.65536000000000000000e5 +708 1 2 5 0.32768000000000000000e5 +708 1 3 18 -0.32768000000000000000e5 +708 1 5 20 -0.65536000000000000000e5 +708 1 6 21 -0.13107200000000000000e6 +708 1 11 26 0.13107200000000000000e6 +708 2 1 3 -0.32768000000000000000e5 +708 2 1 15 0.65536000000000000000e5 +708 2 2 11 0.32768000000000000000e5 +708 2 6 12 -0.65536000000000000000e5 +708 3 1 2 -0.32768000000000000000e5 +708 3 2 7 -0.65536000000000000000e5 +708 3 7 20 0.13107200000000000000e6 +708 4 2 2 0.65536000000000000000e5 +709 1 2 17 0.32768000000000000000e5 +709 1 4 27 -0.32768000000000000000e5 +709 1 5 20 0.65536000000000000000e5 +709 1 9 16 0.13107200000000000000e6 +709 1 11 26 -0.13107200000000000000e6 +709 2 2 12 0.32768000000000000000e5 +709 2 3 17 -0.32768000000000000000e5 +709 2 6 12 0.65536000000000000000e5 +709 3 4 17 -0.32768000000000000000e5 +709 3 7 20 -0.13107200000000000000e6 +709 4 1 13 -0.32768000000000000000e5 +710 2 2 13 0.32768000000000000000e5 +710 2 3 17 -0.32768000000000000000e5 +710 4 1 13 -0.32768000000000000000e5 +711 2 1 15 -0.32768000000000000000e5 +711 2 2 14 0.32768000000000000000e5 +712 2 2 15 0.32768000000000000000e5 +712 2 6 12 -0.32768000000000000000e5 +713 2 2 17 0.32768000000000000000e5 +713 2 11 17 -0.32768000000000000000e5 +713 4 11 11 -0.65536000000000000000e5 +714 2 2 18 0.32768000000000000000e5 +714 2 3 17 -0.32768000000000000000e5 +715 2 2 19 0.32768000000000000000e5 +715 2 6 12 -0.32768000000000000000e5 +715 4 2 14 0.32768000000000000000e5 +716 1 1 32 -0.32768000000000000000e5 +716 1 2 33 -0.32768000000000000000e5 +716 1 4 35 -0.32768000000000000000e5 +716 1 16 31 0.13107200000000000000e6 +716 1 20 27 -0.13107200000000000000e6 +716 2 2 20 0.32768000000000000000e5 +716 2 6 12 -0.65536000000000000000e5 +716 2 11 17 -0.32768000000000000000e5 +716 2 12 18 -0.32768000000000000000e5 +716 3 3 32 0.32768000000000000000e5 +716 3 4 33 0.32768000000000000000e5 +716 3 17 30 -0.65536000000000000000e5 +716 4 2 14 0.65536000000000000000e5 +716 4 5 17 0.65536000000000000000e5 +716 4 13 17 0.32768000000000000000e5 +717 2 2 4 -0.16384000000000000000e5 +717 2 3 3 0.32768000000000000000e5 +718 1 3 18 0.32768000000000000000e5 +718 1 4 19 0.32768000000000000000e5 +718 1 4 27 0.32768000000000000000e5 +718 1 5 20 -0.65536000000000000000e5 +718 2 3 4 0.32768000000000000000e5 +718 3 4 17 0.32768000000000000000e5 +718 4 3 3 -0.65536000000000000000e5 +719 2 1 7 -0.32768000000000000000e5 +719 2 3 5 0.32768000000000000000e5 +720 2 3 6 0.32768000000000000000e5 +720 2 6 12 -0.32768000000000000000e5 +720 4 2 6 -0.32768000000000000000e5 +721 1 2 9 0.32768000000000000000e5 +721 1 3 34 -0.32768000000000000000e5 +721 1 4 11 -0.65536000000000000000e5 +721 1 5 20 0.32768000000000000000e5 +721 1 7 22 0.65536000000000000000e5 +721 1 9 16 -0.32768000000000000000e5 +721 2 3 7 0.32768000000000000000e5 +721 2 6 20 -0.32768000000000000000e5 +721 3 1 30 0.32768000000000000000e5 +721 3 2 31 -0.65536000000000000000e5 +721 3 4 9 -0.32768000000000000000e5 +721 3 5 10 0.65536000000000000000e5 +721 3 6 19 -0.32768000000000000000e5 +721 3 17 22 0.32768000000000000000e5 +721 4 3 7 -0.32768000000000000000e5 +721 4 7 11 -0.32768000000000000000e5 +722 1 1 8 0.16384000000000000000e5 +722 1 2 9 0.16384000000000000000e5 +722 1 4 11 -0.32768000000000000000e5 +722 1 5 12 -0.32768000000000000000e5 +722 1 5 20 -0.16384000000000000000e5 +722 1 6 21 -0.32768000000000000000e5 +722 1 8 23 0.65536000000000000000e5 +722 1 9 16 -0.16384000000000000000e5 +722 1 12 19 0.32768000000000000000e5 +722 1 12 27 -0.32768000000000000000e5 +722 2 1 7 0.16384000000000000000e5 +722 2 2 16 -0.32768000000000000000e5 +722 2 3 8 0.32768000000000000000e5 +722 2 3 9 -0.32768000000000000000e5 +722 2 6 12 -0.16384000000000000000e5 +722 3 1 14 -0.13107200000000000000e6 +722 3 2 7 0.16384000000000000000e5 +722 3 2 15 0.13107200000000000000e6 +722 3 5 10 -0.65536000000000000000e5 +722 3 8 21 -0.32768000000000000000e5 +722 4 4 8 -0.32768000000000000000e5 +722 4 5 9 -0.65536000000000000000e5 +723 1 6 21 0.16384000000000000000e5 +723 1 7 14 -0.65536000000000000000e5 +723 1 7 22 0.16384000000000000000e5 +723 1 8 23 0.32768000000000000000e5 +723 1 11 26 0.16384000000000000000e5 +723 1 13 28 0.32768000000000000000e5 +723 2 2 16 0.16384000000000000000e5 +723 2 3 10 0.32768000000000000000e5 +723 3 2 15 0.65536000000000000000e5 +723 3 7 20 0.16384000000000000000e5 +723 3 13 18 0.32768000000000000000e5 +723 4 5 9 -0.32768000000000000000e5 +724 1 2 17 0.32768000000000000000e5 +724 1 4 27 -0.32768000000000000000e5 +724 1 5 20 0.65536000000000000000e5 +724 1 9 16 0.13107200000000000000e6 +724 1 11 26 -0.13107200000000000000e6 +724 2 3 11 0.32768000000000000000e5 +724 2 3 17 -0.32768000000000000000e5 +724 2 6 12 0.65536000000000000000e5 +724 3 4 17 -0.32768000000000000000e5 +724 3 7 20 -0.13107200000000000000e6 +724 4 1 13 -0.32768000000000000000e5 +725 2 3 12 0.32768000000000000000e5 +725 2 3 17 -0.32768000000000000000e5 +725 4 1 13 -0.32768000000000000000e5 +726 1 3 18 0.32768000000000000000e5 +726 1 4 19 0.32768000000000000000e5 +726 1 4 27 0.32768000000000000000e5 +726 1 5 20 -0.65536000000000000000e5 +726 2 3 13 0.32768000000000000000e5 +726 3 4 17 0.32768000000000000000e5 +727 2 3 14 0.32768000000000000000e5 +727 2 6 12 -0.32768000000000000000e5 +728 1 3 34 -0.32768000000000000000e5 +728 1 5 20 0.32768000000000000000e5 +728 2 3 15 0.32768000000000000000e5 +728 2 6 20 -0.32768000000000000000e5 +728 3 1 30 0.32768000000000000000e5 +728 3 2 31 -0.65536000000000000000e5 +728 3 6 19 -0.32768000000000000000e5 +728 3 17 22 0.32768000000000000000e5 +728 4 7 11 -0.32768000000000000000e5 +729 1 7 22 0.32768000000000000000e5 +729 1 8 23 -0.65536000000000000000e5 +729 1 11 26 0.32768000000000000000e5 +729 1 12 27 0.32768000000000000000e5 +729 2 3 16 0.32768000000000000000e5 +729 3 7 20 0.32768000000000000000e5 +729 3 8 21 0.32768000000000000000e5 +730 1 3 18 0.32768000000000000000e5 +730 1 4 27 0.32768000000000000000e5 +730 1 4 35 0.32768000000000000000e5 +730 1 5 20 -0.65536000000000000000e5 +730 1 9 16 -0.65536000000000000000e5 +730 1 20 27 0.65536000000000000000e5 +730 2 3 18 0.32768000000000000000e5 +730 3 1 30 0.65536000000000000000e5 +730 3 3 16 0.32768000000000000000e5 +730 3 3 32 -0.32768000000000000000e5 +730 3 4 17 0.32768000000000000000e5 +730 3 4 33 -0.32768000000000000000e5 +730 3 5 26 0.32768000000000000000e5 +730 3 6 19 0.65536000000000000000e5 +730 3 17 30 0.65536000000000000000e5 +730 4 1 13 0.32768000000000000000e5 +730 4 13 17 -0.32768000000000000000e5 +731 1 3 34 -0.32768000000000000000e5 +731 1 5 20 0.32768000000000000000e5 +731 2 3 19 0.32768000000000000000e5 +731 2 6 20 -0.32768000000000000000e5 +731 3 1 30 0.32768000000000000000e5 +731 3 2 31 -0.65536000000000000000e5 +731 3 6 19 -0.32768000000000000000e5 +731 3 17 22 0.32768000000000000000e5 +732 2 3 20 0.32768000000000000000e5 +732 2 12 18 -0.32768000000000000000e5 +733 1 2 5 -0.16384000000000000000e5 +733 1 2 9 -0.65536000000000000000e5 +733 1 3 18 0.16384000000000000000e5 +733 1 4 11 -0.26214400000000000000e6 +733 1 4 19 0.16384000000000000000e5 +733 1 4 35 -0.16384000000000000000e5 +733 1 5 12 -0.13107200000000000000e6 +733 1 7 22 0.65536000000000000000e5 +733 1 8 23 0.26214400000000000000e6 +733 1 9 16 0.98304000000000000000e5 +733 1 11 26 -0.13107200000000000000e6 +733 1 12 19 0.13107200000000000000e6 +733 1 12 27 -0.13107200000000000000e6 +733 1 17 24 0.65536000000000000000e5 +733 1 20 27 -0.32768000000000000000e5 +733 2 3 9 -0.13107200000000000000e6 +733 2 4 4 0.32768000000000000000e5 +733 2 4 18 -0.16384000000000000000e5 +733 3 1 14 -0.26214400000000000000e6 +733 3 1 30 -0.32768000000000000000e5 +733 3 2 7 -0.65536000000000000000e5 +733 3 2 15 0.52428800000000000000e6 +733 3 3 32 0.16384000000000000000e5 +733 3 4 5 0.16384000000000000000e5 +733 3 4 9 0.32768000000000000000e5 +733 3 4 17 0.16384000000000000000e5 +733 3 4 33 0.16384000000000000000e5 +733 3 5 10 -0.32768000000000000000e6 +733 3 5 18 0.16384000000000000000e5 +733 3 5 26 -0.16384000000000000000e5 +733 3 6 19 0.32768000000000000000e5 +733 3 7 20 -0.13107200000000000000e6 +733 3 8 21 -0.13107200000000000000e6 +733 3 17 30 -0.32768000000000000000e5 +733 4 2 6 -0.65536000000000000000e5 +733 4 3 3 -0.32768000000000000000e5 +733 4 3 7 0.32768000000000000000e5 +733 4 4 8 -0.13107200000000000000e6 +733 4 5 9 -0.26214400000000000000e6 +733 4 7 11 0.32768000000000000000e5 +733 4 13 17 0.16384000000000000000e5 +734 2 4 5 0.32768000000000000000e5 +734 2 6 12 -0.32768000000000000000e5 +734 4 2 6 -0.32768000000000000000e5 +735 1 2 9 0.32768000000000000000e5 +735 1 3 34 -0.32768000000000000000e5 +735 1 4 11 -0.65536000000000000000e5 +735 1 5 20 0.32768000000000000000e5 +735 1 7 22 0.65536000000000000000e5 +735 1 9 16 -0.32768000000000000000e5 +735 2 4 6 0.32768000000000000000e5 +735 2 6 20 -0.32768000000000000000e5 +735 3 1 30 0.32768000000000000000e5 +735 3 2 31 -0.65536000000000000000e5 +735 3 4 9 -0.32768000000000000000e5 +735 3 5 10 0.65536000000000000000e5 +735 3 6 19 -0.32768000000000000000e5 +735 3 17 22 0.32768000000000000000e5 +735 4 3 7 -0.32768000000000000000e5 +735 4 7 11 -0.32768000000000000000e5 +736 1 12 27 -0.65536000000000000000e5 +736 1 17 24 0.65536000000000000000e5 +736 1 19 34 0.32768000000000000000e5 +736 1 20 27 -0.32768000000000000000e5 +736 2 4 7 0.32768000000000000000e5 +736 2 6 20 -0.32768000000000000000e5 +736 3 2 31 -0.65536000000000000000e5 +736 3 18 23 0.65536000000000000000e5 +736 3 22 27 0.32768000000000000000e5 +736 4 3 7 -0.32768000000000000000e5 +736 4 3 15 -0.32768000000000000000e5 +736 4 6 18 -0.32768000000000000000e5 +737 2 3 9 -0.32768000000000000000e5 +737 2 4 8 0.32768000000000000000e5 +738 1 7 22 0.32768000000000000000e5 +738 1 12 19 0.32768000000000000000e5 +738 1 12 27 0.32768000000000000000e5 +738 1 13 28 -0.65536000000000000000e5 +738 2 4 9 0.32768000000000000000e5 +738 3 8 21 0.32768000000000000000e5 +738 3 13 18 -0.65536000000000000000e5 +738 4 4 8 -0.32768000000000000000e5 +739 2 3 17 -0.32768000000000000000e5 +739 2 4 11 0.32768000000000000000e5 +739 4 1 13 -0.32768000000000000000e5 +740 1 3 18 0.32768000000000000000e5 +740 1 4 19 0.32768000000000000000e5 +740 1 4 27 0.32768000000000000000e5 +740 1 5 20 -0.65536000000000000000e5 +740 2 4 12 0.32768000000000000000e5 +740 3 4 17 0.32768000000000000000e5 +741 1 4 19 0.32768000000000000000e5 +741 1 4 35 -0.32768000000000000000e5 +741 1 7 22 -0.13107200000000000000e6 +741 1 9 16 0.65536000000000000000e5 +741 1 17 24 0.13107200000000000000e6 +741 1 20 27 -0.65536000000000000000e5 +741 2 4 13 0.32768000000000000000e5 +741 2 4 18 -0.32768000000000000000e5 +741 3 1 30 -0.65536000000000000000e5 +741 3 3 32 0.32768000000000000000e5 +741 3 4 17 0.32768000000000000000e5 +741 3 4 33 0.32768000000000000000e5 +741 3 5 18 0.32768000000000000000e5 +741 3 5 26 -0.32768000000000000000e5 +741 3 6 19 0.65536000000000000000e5 +741 3 17 30 -0.65536000000000000000e5 +741 4 7 11 0.65536000000000000000e5 +741 4 13 17 0.32768000000000000000e5 +742 1 3 34 -0.32768000000000000000e5 +742 1 5 20 0.32768000000000000000e5 +742 2 4 14 0.32768000000000000000e5 +742 2 6 20 -0.32768000000000000000e5 +742 3 1 30 0.32768000000000000000e5 +742 3 2 31 -0.65536000000000000000e5 +742 3 6 19 -0.32768000000000000000e5 +742 3 17 22 0.32768000000000000000e5 +742 4 7 11 -0.32768000000000000000e5 +743 1 12 27 -0.65536000000000000000e5 +743 1 17 24 0.65536000000000000000e5 +743 1 19 34 0.32768000000000000000e5 +743 1 20 27 -0.32768000000000000000e5 +743 2 4 15 0.32768000000000000000e5 +743 2 6 20 -0.32768000000000000000e5 +743 3 2 31 -0.65536000000000000000e5 +743 3 18 23 0.65536000000000000000e5 +743 3 22 27 0.32768000000000000000e5 +743 4 3 15 -0.32768000000000000000e5 +743 4 6 18 -0.32768000000000000000e5 +744 1 7 22 0.32768000000000000000e5 +744 1 12 19 0.32768000000000000000e5 +744 1 12 27 0.32768000000000000000e5 +744 1 13 28 -0.65536000000000000000e5 +744 2 4 16 0.32768000000000000000e5 +744 3 8 21 0.32768000000000000000e5 +744 3 13 18 -0.65536000000000000000e5 +745 1 3 18 0.32768000000000000000e5 +745 1 4 27 0.32768000000000000000e5 +745 1 4 35 0.32768000000000000000e5 +745 1 5 20 -0.65536000000000000000e5 +745 1 9 16 -0.65536000000000000000e5 +745 1 20 27 0.65536000000000000000e5 +745 2 4 17 0.32768000000000000000e5 +745 3 1 30 0.65536000000000000000e5 +745 3 3 16 0.32768000000000000000e5 +745 3 3 32 -0.32768000000000000000e5 +745 3 4 17 0.32768000000000000000e5 +745 3 4 33 -0.32768000000000000000e5 +745 3 5 26 0.32768000000000000000e5 +745 3 6 19 0.65536000000000000000e5 +745 3 17 30 0.65536000000000000000e5 +745 4 1 13 0.32768000000000000000e5 +745 4 13 17 -0.32768000000000000000e5 +746 1 12 27 -0.65536000000000000000e5 +746 1 17 24 0.65536000000000000000e5 +746 1 19 34 0.32768000000000000000e5 +746 1 20 27 -0.32768000000000000000e5 +746 2 4 19 0.32768000000000000000e5 +746 2 6 20 -0.32768000000000000000e5 +746 3 2 31 -0.65536000000000000000e5 +746 3 18 23 0.65536000000000000000e5 +746 3 22 27 0.32768000000000000000e5 +746 4 6 18 -0.32768000000000000000e5 +747 1 2 33 -0.32768000000000000000e5 +747 1 3 34 0.65536000000000000000e5 +747 1 4 27 -0.32768000000000000000e5 +747 1 4 35 -0.32768000000000000000e5 +747 2 4 18 -0.32768000000000000000e5 +747 2 4 20 0.32768000000000000000e5 +747 2 12 18 -0.32768000000000000000e5 +747 3 3 32 0.32768000000000000000e5 +747 3 4 33 0.32768000000000000000e5 +747 3 5 26 -0.32768000000000000000e5 +747 3 17 22 0.65536000000000000000e5 +747 3 17 30 -0.65536000000000000000e5 +747 3 18 19 -0.32768000000000000000e5 +747 4 13 17 0.32768000000000000000e5 +748 2 2 8 -0.32768000000000000000e5 +748 2 5 6 0.32768000000000000000e5 +749 1 1 8 0.16384000000000000000e5 +749 1 2 9 0.16384000000000000000e5 +749 1 4 11 -0.32768000000000000000e5 +749 1 5 12 -0.32768000000000000000e5 +749 1 5 20 -0.16384000000000000000e5 +749 1 6 21 -0.32768000000000000000e5 +749 1 8 23 0.65536000000000000000e5 +749 1 9 16 -0.16384000000000000000e5 +749 1 12 19 0.32768000000000000000e5 +749 1 12 27 -0.32768000000000000000e5 +749 2 1 7 0.16384000000000000000e5 +749 2 2 16 -0.32768000000000000000e5 +749 2 3 9 -0.32768000000000000000e5 +749 2 5 7 0.32768000000000000000e5 +749 2 6 12 -0.16384000000000000000e5 +749 3 1 14 -0.13107200000000000000e6 +749 3 2 7 0.16384000000000000000e5 +749 3 2 15 0.13107200000000000000e6 +749 3 5 10 -0.65536000000000000000e5 +749 3 8 21 -0.32768000000000000000e5 +749 4 4 8 -0.32768000000000000000e5 +749 4 5 9 -0.65536000000000000000e5 +750 1 1 10 0.16384000000000000000e5 +750 1 4 11 0.32768000000000000000e5 +750 1 5 12 0.16384000000000000000e5 +750 1 6 13 -0.65536000000000000000e5 +750 1 6 21 0.16384000000000000000e5 +750 1 7 10 0.65536000000000000000e5 +750 1 8 23 -0.32768000000000000000e5 +750 1 11 26 0.16384000000000000000e5 +750 1 12 19 -0.16384000000000000000e5 +750 1 12 27 0.16384000000000000000e5 +750 2 2 8 -0.16384000000000000000e5 +750 2 2 16 0.16384000000000000000e5 +750 2 3 9 0.16384000000000000000e5 +750 2 5 5 0.32768000000000000000e5 +750 2 5 8 0.32768000000000000000e5 +750 3 1 14 0.65536000000000000000e5 +750 3 2 15 -0.65536000000000000000e5 +750 3 5 10 0.32768000000000000000e5 +750 3 7 20 0.16384000000000000000e5 +750 3 8 21 0.16384000000000000000e5 +750 4 4 8 0.16384000000000000000e5 +750 4 5 9 0.32768000000000000000e5 +751 2 5 9 0.32768000000000000000e5 +751 2 6 8 -0.32768000000000000000e5 +752 1 4 11 -0.81920000000000000000e4 +752 1 5 12 -0.81920000000000000000e4 +752 1 6 13 0.32768000000000000000e5 +752 1 6 21 0.81920000000000000000e4 +752 1 7 10 0.16384000000000000000e5 +752 1 7 14 0.32768000000000000000e5 +752 1 7 22 0.16384000000000000000e5 +752 1 8 23 0.16384000000000000000e5 +752 1 10 13 -0.65536000000000000000e5 +752 1 11 26 0.81920000000000000000e4 +752 1 12 19 0.81920000000000000000e4 +752 2 2 16 0.81920000000000000000e4 +752 2 5 10 0.32768000000000000000e5 +752 2 6 8 0.16384000000000000000e5 +752 3 2 15 0.32768000000000000000e5 +752 3 5 10 -0.81920000000000000000e4 +752 3 7 20 0.81920000000000000000e4 +752 4 4 8 -0.81920000000000000000e4 +752 4 5 9 -0.16384000000000000000e5 +753 2 1 15 -0.32768000000000000000e5 +753 2 5 12 0.32768000000000000000e5 +754 2 5 13 0.32768000000000000000e5 +754 2 6 12 -0.32768000000000000000e5 +755 1 1 8 -0.32768000000000000000e5 +755 1 2 9 -0.16384000000000000000e5 +755 1 4 11 0.65536000000000000000e5 +755 1 5 12 0.32768000000000000000e5 +755 1 5 20 0.32768000000000000000e5 +755 1 6 21 0.98304000000000000000e5 +755 1 7 10 0.65536000000000000000e5 +755 1 9 16 0.16384000000000000000e5 +755 1 12 19 -0.32768000000000000000e5 +755 1 12 27 0.32768000000000000000e5 +755 1 13 20 -0.13107200000000000000e6 +755 2 1 7 -0.16384000000000000000e5 +755 2 1 15 -0.16384000000000000000e5 +755 2 2 8 -0.32768000000000000000e5 +755 2 2 16 0.32768000000000000000e5 +755 2 3 9 0.32768000000000000000e5 +755 2 5 14 0.32768000000000000000e5 +755 2 6 12 0.32768000000000000000e5 +755 2 8 14 0.65536000000000000000e5 +755 3 1 6 -0.16384000000000000000e5 +755 3 1 14 0.65536000000000000000e5 +755 3 2 7 -0.32768000000000000000e5 +755 3 2 15 -0.13107200000000000000e6 +755 3 5 10 0.65536000000000000000e5 +755 3 8 21 0.32768000000000000000e5 +755 4 1 5 -0.16384000000000000000e5 +755 4 4 8 0.32768000000000000000e5 +755 4 5 9 0.65536000000000000000e5 +756 2 2 16 -0.32768000000000000000e5 +756 2 5 15 0.32768000000000000000e5 +757 2 5 16 0.32768000000000000000e5 +757 2 8 14 -0.32768000000000000000e5 +758 2 1 19 -0.32768000000000000000e5 +758 2 5 17 0.32768000000000000000e5 +759 2 5 18 0.32768000000000000000e5 +759 2 6 12 -0.32768000000000000000e5 +759 4 2 14 0.32768000000000000000e5 +760 2 5 20 0.32768000000000000000e5 +760 2 6 12 -0.32768000000000000000e5 +760 4 2 14 0.32768000000000000000e5 +760 4 5 17 0.32768000000000000000e5 +761 1 1 8 0.81920000000000000000e4 +761 1 2 9 0.81920000000000000000e4 +761 1 4 11 -0.16384000000000000000e5 +761 1 5 12 -0.16384000000000000000e5 +761 1 5 20 -0.81920000000000000000e4 +761 1 6 21 -0.16384000000000000000e5 +761 1 8 23 0.32768000000000000000e5 +761 1 9 16 -0.81920000000000000000e4 +761 1 12 19 0.16384000000000000000e5 +761 1 12 27 -0.16384000000000000000e5 +761 2 1 7 0.81920000000000000000e4 +761 2 2 16 -0.16384000000000000000e5 +761 2 3 9 -0.16384000000000000000e5 +761 2 6 6 0.32768000000000000000e5 +761 2 6 12 -0.81920000000000000000e4 +761 3 1 14 -0.65536000000000000000e5 +761 3 2 7 0.81920000000000000000e4 +761 3 2 15 0.65536000000000000000e5 +761 3 5 10 -0.32768000000000000000e5 +761 3 8 21 -0.16384000000000000000e5 +761 4 4 8 -0.16384000000000000000e5 +761 4 5 9 -0.32768000000000000000e5 +762 2 3 9 -0.32768000000000000000e5 +762 2 6 7 0.32768000000000000000e5 +763 1 6 21 0.16384000000000000000e5 +763 1 7 14 -0.65536000000000000000e5 +763 1 7 22 0.16384000000000000000e5 +763 1 8 23 0.32768000000000000000e5 +763 1 11 26 0.16384000000000000000e5 +763 1 13 28 0.32768000000000000000e5 +763 2 2 16 0.16384000000000000000e5 +763 2 6 9 0.32768000000000000000e5 +763 3 2 15 0.65536000000000000000e5 +763 3 7 20 0.16384000000000000000e5 +763 3 13 18 0.32768000000000000000e5 +763 4 5 9 -0.32768000000000000000e5 +764 1 7 14 0.32768000000000000000e5 +764 1 10 25 -0.65536000000000000000e5 +764 1 13 20 0.32768000000000000000e5 +764 1 14 21 0.32768000000000000000e5 +764 2 6 10 0.32768000000000000000e5 +764 3 2 15 -0.32768000000000000000e5 +764 4 8 8 -0.65536000000000000000e5 +765 2 1 15 -0.32768000000000000000e5 +765 2 6 11 0.32768000000000000000e5 +766 1 3 34 -0.32768000000000000000e5 +766 1 5 20 0.32768000000000000000e5 +766 2 6 13 0.32768000000000000000e5 +766 2 6 20 -0.32768000000000000000e5 +766 3 1 30 0.32768000000000000000e5 +766 3 2 31 -0.65536000000000000000e5 +766 3 6 19 -0.32768000000000000000e5 +766 3 17 22 0.32768000000000000000e5 +766 4 7 11 -0.32768000000000000000e5 +767 2 2 16 -0.32768000000000000000e5 +767 2 6 14 0.32768000000000000000e5 +768 1 7 22 0.32768000000000000000e5 +768 1 8 23 -0.65536000000000000000e5 +768 1 11 26 0.32768000000000000000e5 +768 1 12 27 0.32768000000000000000e5 +768 2 6 15 0.32768000000000000000e5 +768 3 7 20 0.32768000000000000000e5 +768 3 8 21 0.32768000000000000000e5 +769 1 6 21 0.16384000000000000000e5 +769 1 7 14 -0.65536000000000000000e5 +769 1 7 22 0.16384000000000000000e5 +769 1 8 23 0.32768000000000000000e5 +769 1 11 26 0.16384000000000000000e5 +769 1 13 28 0.32768000000000000000e5 +769 2 2 16 0.16384000000000000000e5 +769 2 6 16 0.32768000000000000000e5 +769 3 2 15 0.65536000000000000000e5 +769 3 7 20 0.16384000000000000000e5 +769 3 13 18 0.32768000000000000000e5 +770 2 6 12 -0.32768000000000000000e5 +770 2 6 17 0.32768000000000000000e5 +770 4 2 14 0.32768000000000000000e5 +771 1 3 34 -0.32768000000000000000e5 +771 1 5 20 0.32768000000000000000e5 +771 2 6 18 0.32768000000000000000e5 +771 2 6 20 -0.32768000000000000000e5 +771 3 1 30 0.32768000000000000000e5 +771 3 2 31 -0.65536000000000000000e5 +771 3 6 19 -0.32768000000000000000e5 +771 3 17 22 0.32768000000000000000e5 +772 1 7 22 0.32768000000000000000e5 +772 1 8 23 -0.65536000000000000000e5 +772 1 11 26 0.32768000000000000000e5 +772 1 12 27 0.32768000000000000000e5 +772 2 6 19 0.32768000000000000000e5 +772 3 7 20 0.32768000000000000000e5 +772 3 8 21 0.32768000000000000000e5 +772 4 8 12 0.32768000000000000000e5 +773 1 7 22 0.16384000000000000000e5 +773 1 12 19 0.16384000000000000000e5 +773 1 12 27 0.16384000000000000000e5 +773 1 13 28 -0.32768000000000000000e5 +773 2 7 7 0.32768000000000000000e5 +773 3 8 21 0.16384000000000000000e5 +773 3 13 18 -0.32768000000000000000e5 +773 4 4 8 -0.16384000000000000000e5 +774 1 6 21 0.16384000000000000000e5 +774 1 7 14 -0.65536000000000000000e5 +774 1 7 22 0.16384000000000000000e5 +774 1 8 23 0.32768000000000000000e5 +774 1 11 26 0.16384000000000000000e5 +774 1 13 28 0.32768000000000000000e5 +774 2 2 16 0.16384000000000000000e5 +774 2 7 8 0.32768000000000000000e5 +774 3 2 15 0.65536000000000000000e5 +774 3 7 20 0.16384000000000000000e5 +774 3 13 18 0.32768000000000000000e5 +774 4 5 9 -0.32768000000000000000e5 +775 2 4 10 -0.32768000000000000000e5 +775 2 7 9 0.32768000000000000000e5 +776 1 7 14 0.32768000000000000000e5 +776 1 8 15 -0.65536000000000000000e5 +776 1 14 21 0.32768000000000000000e5 +776 1 22 25 0.32768000000000000000e5 +776 2 7 10 0.32768000000000000000e5 +776 3 8 13 0.32768000000000000000e5 +776 3 11 12 0.32768000000000000000e5 +776 3 11 24 0.32768000000000000000e5 +777 2 6 12 -0.32768000000000000000e5 +777 2 7 11 0.32768000000000000000e5 +778 1 3 34 -0.32768000000000000000e5 +778 1 5 20 0.32768000000000000000e5 +778 2 6 20 -0.32768000000000000000e5 +778 2 7 12 0.32768000000000000000e5 +778 3 1 30 0.32768000000000000000e5 +778 3 2 31 -0.65536000000000000000e5 +778 3 6 19 -0.32768000000000000000e5 +778 3 17 22 0.32768000000000000000e5 +778 4 7 11 -0.32768000000000000000e5 +779 1 12 27 -0.65536000000000000000e5 +779 1 17 24 0.65536000000000000000e5 +779 1 19 34 0.32768000000000000000e5 +779 1 20 27 -0.32768000000000000000e5 +779 2 6 20 -0.32768000000000000000e5 +779 2 7 13 0.32768000000000000000e5 +779 3 2 31 -0.65536000000000000000e5 +779 3 18 23 0.65536000000000000000e5 +779 3 22 27 0.32768000000000000000e5 +779 4 3 15 -0.32768000000000000000e5 +779 4 6 18 -0.32768000000000000000e5 +780 1 7 22 0.32768000000000000000e5 +780 1 8 23 -0.65536000000000000000e5 +780 1 11 26 0.32768000000000000000e5 +780 1 12 27 0.32768000000000000000e5 +780 2 7 14 0.32768000000000000000e5 +780 3 7 20 0.32768000000000000000e5 +780 3 8 21 0.32768000000000000000e5 +781 1 7 22 0.32768000000000000000e5 +781 1 12 19 0.32768000000000000000e5 +781 1 12 27 0.32768000000000000000e5 +781 1 13 28 -0.65536000000000000000e5 +781 2 7 15 0.32768000000000000000e5 +781 3 8 21 0.32768000000000000000e5 +781 3 13 18 -0.65536000000000000000e5 +782 1 8 23 0.32768000000000000000e5 +782 1 9 24 0.32768000000000000000e5 +782 1 13 28 0.32768000000000000000e5 +782 1 14 21 -0.65536000000000000000e5 +782 2 7 16 0.32768000000000000000e5 +782 3 13 18 0.32768000000000000000e5 +783 1 3 34 -0.32768000000000000000e5 +783 1 5 20 0.32768000000000000000e5 +783 2 6 20 -0.32768000000000000000e5 +783 2 7 17 0.32768000000000000000e5 +783 3 1 30 0.32768000000000000000e5 +783 3 2 31 -0.65536000000000000000e5 +783 3 6 19 -0.32768000000000000000e5 +783 3 17 22 0.32768000000000000000e5 +784 1 12 27 -0.65536000000000000000e5 +784 1 17 24 0.65536000000000000000e5 +784 1 19 34 0.32768000000000000000e5 +784 1 20 27 -0.32768000000000000000e5 +784 2 6 20 -0.32768000000000000000e5 +784 2 7 18 0.32768000000000000000e5 +784 3 2 31 -0.65536000000000000000e5 +784 3 18 23 0.65536000000000000000e5 +784 3 22 27 0.32768000000000000000e5 +784 4 6 18 -0.32768000000000000000e5 +785 1 12 19 0.32768000000000000000e5 +785 1 12 27 0.32768000000000000000e5 +785 1 13 28 -0.65536000000000000000e5 +785 1 17 24 0.32768000000000000000e5 +785 2 7 19 0.32768000000000000000e5 +785 3 4 25 -0.65536000000000000000e5 +785 3 8 21 0.32768000000000000000e5 +785 3 9 22 0.32768000000000000000e5 +785 4 4 16 0.32768000000000000000e5 +786 1 12 27 -0.65536000000000000000e5 +786 1 17 24 0.65536000000000000000e5 +786 1 19 34 0.32768000000000000000e5 +786 1 20 27 -0.32768000000000000000e5 +786 2 6 20 -0.32768000000000000000e5 +786 2 7 20 0.32768000000000000000e5 +786 3 2 31 -0.65536000000000000000e5 +786 3 18 23 0.65536000000000000000e5 +786 3 22 27 0.32768000000000000000e5 +787 1 4 11 -0.40960000000000000000e4 +787 1 5 12 -0.40960000000000000000e4 +787 1 6 13 0.16384000000000000000e5 +787 1 6 21 0.40960000000000000000e4 +787 1 7 10 0.81920000000000000000e4 +787 1 7 14 0.16384000000000000000e5 +787 1 7 22 0.81920000000000000000e4 +787 1 8 23 0.81920000000000000000e4 +787 1 10 13 -0.32768000000000000000e5 +787 1 11 26 0.40960000000000000000e4 +787 1 12 19 0.40960000000000000000e4 +787 2 2 16 0.40960000000000000000e4 +787 2 6 8 0.81920000000000000000e4 +787 2 8 8 0.32768000000000000000e5 +787 3 2 15 0.16384000000000000000e5 +787 3 5 10 -0.40960000000000000000e4 +787 3 7 20 0.40960000000000000000e4 +787 4 4 8 -0.40960000000000000000e4 +787 4 5 9 -0.81920000000000000000e4 +788 1 7 14 0.32768000000000000000e5 +788 1 10 25 -0.65536000000000000000e5 +788 1 13 20 0.32768000000000000000e5 +788 1 14 21 0.32768000000000000000e5 +788 2 8 9 0.32768000000000000000e5 +788 3 2 15 -0.32768000000000000000e5 +788 4 8 8 -0.65536000000000000000e5 +789 1 1 8 -0.32768000000000000000e5 +789 1 2 9 -0.16384000000000000000e5 +789 1 4 11 0.65536000000000000000e5 +789 1 5 12 0.32768000000000000000e5 +789 1 5 20 0.32768000000000000000e5 +789 1 6 21 0.98304000000000000000e5 +789 1 7 10 0.65536000000000000000e5 +789 1 9 16 0.16384000000000000000e5 +789 1 12 19 -0.32768000000000000000e5 +789 1 12 27 0.32768000000000000000e5 +789 1 13 20 -0.13107200000000000000e6 +789 2 1 7 -0.16384000000000000000e5 +789 2 1 15 -0.16384000000000000000e5 +789 2 2 8 -0.32768000000000000000e5 +789 2 2 16 0.32768000000000000000e5 +789 2 3 9 0.32768000000000000000e5 +789 2 6 12 0.32768000000000000000e5 +789 2 8 11 0.32768000000000000000e5 +789 2 8 14 0.65536000000000000000e5 +789 3 1 6 -0.16384000000000000000e5 +789 3 1 14 0.65536000000000000000e5 +789 3 2 7 -0.32768000000000000000e5 +789 3 2 15 -0.13107200000000000000e6 +789 3 5 10 0.65536000000000000000e5 +789 3 8 21 0.32768000000000000000e5 +789 4 1 5 -0.16384000000000000000e5 +789 4 4 8 0.32768000000000000000e5 +789 4 5 9 0.65536000000000000000e5 +790 2 2 16 -0.32768000000000000000e5 +790 2 8 12 0.32768000000000000000e5 +791 1 7 22 0.32768000000000000000e5 +791 1 8 23 -0.65536000000000000000e5 +791 1 11 26 0.32768000000000000000e5 +791 1 12 27 0.32768000000000000000e5 +791 2 8 13 0.32768000000000000000e5 +791 3 7 20 0.32768000000000000000e5 +791 3 8 21 0.32768000000000000000e5 +792 1 6 21 0.16384000000000000000e5 +792 1 7 14 -0.65536000000000000000e5 +792 1 7 22 0.16384000000000000000e5 +792 1 8 23 0.32768000000000000000e5 +792 1 11 26 0.16384000000000000000e5 +792 1 13 28 0.32768000000000000000e5 +792 2 2 16 0.16384000000000000000e5 +792 2 8 15 0.32768000000000000000e5 +792 3 2 15 0.65536000000000000000e5 +792 3 7 20 0.16384000000000000000e5 +792 3 13 18 0.32768000000000000000e5 +793 1 7 14 0.32768000000000000000e5 +793 1 10 25 -0.65536000000000000000e5 +793 1 13 20 0.32768000000000000000e5 +793 1 14 21 0.32768000000000000000e5 +793 2 8 16 0.32768000000000000000e5 +793 3 2 15 -0.32768000000000000000e5 +794 2 5 19 -0.32768000000000000000e5 +794 2 8 17 0.32768000000000000000e5 +795 1 7 22 0.32768000000000000000e5 +795 1 8 23 -0.65536000000000000000e5 +795 1 11 26 0.32768000000000000000e5 +795 1 12 27 0.32768000000000000000e5 +795 2 8 18 0.32768000000000000000e5 +795 3 7 20 0.32768000000000000000e5 +795 3 8 21 0.32768000000000000000e5 +795 4 8 12 0.32768000000000000000e5 +796 1 7 14 -0.65536000000000000000e5 +796 1 7 22 -0.16384000000000000000e5 +796 1 8 23 0.32768000000000000000e5 +796 1 11 26 0.16384000000000000000e5 +796 1 13 28 0.32768000000000000000e5 +796 1 16 23 0.16384000000000000000e5 +796 1 17 24 0.32768000000000000000e5 +796 2 5 19 0.16384000000000000000e5 +796 2 8 19 0.32768000000000000000e5 +796 3 2 15 0.65536000000000000000e5 +796 3 7 20 -0.16384000000000000000e5 +796 3 8 21 -0.16384000000000000000e5 +796 3 10 23 0.65536000000000000000e5 +796 4 8 12 -0.16384000000000000000e5 +797 1 7 22 0.32768000000000000000e5 +797 1 8 23 -0.65536000000000000000e5 +797 1 12 27 0.32768000000000000000e5 +797 1 16 31 0.32768000000000000000e5 +797 2 8 20 0.32768000000000000000e5 +797 3 2 31 -0.32768000000000000000e5 +797 3 7 20 0.32768000000000000000e5 +797 3 8 21 0.32768000000000000000e5 +797 3 13 26 0.65536000000000000000e5 +797 3 18 23 -0.32768000000000000000e5 +797 4 8 12 0.32768000000000000000e5 +798 1 7 14 0.16384000000000000000e5 +798 1 8 15 -0.32768000000000000000e5 +798 1 14 21 0.16384000000000000000e5 +798 1 22 25 0.16384000000000000000e5 +798 2 9 9 0.32768000000000000000e5 +798 3 8 13 0.16384000000000000000e5 +798 3 11 12 0.16384000000000000000e5 +798 3 11 24 0.16384000000000000000e5 +799 1 4 11 -0.40960000000000000000e4 +799 1 5 12 -0.40960000000000000000e4 +799 1 6 21 0.40960000000000000000e4 +799 1 7 10 0.81920000000000000000e4 +799 1 7 22 0.81920000000000000000e4 +799 1 8 23 0.81920000000000000000e4 +799 1 11 26 0.40960000000000000000e4 +799 1 12 19 0.40960000000000000000e4 +799 1 13 20 -0.16384000000000000000e5 +799 2 2 16 0.40960000000000000000e4 +799 2 6 8 0.81920000000000000000e4 +799 2 9 10 0.32768000000000000000e5 +799 2 10 16 -0.32768000000000000000e5 +799 3 2 15 0.49152000000000000000e5 +799 3 5 10 -0.40960000000000000000e4 +799 3 7 20 0.40960000000000000000e4 +799 3 8 13 0.32768000000000000000e5 +799 3 10 15 -0.65536000000000000000e5 +799 3 11 12 0.16384000000000000000e5 +799 3 12 13 0.32768000000000000000e5 +799 4 4 8 -0.40960000000000000000e4 +799 4 5 9 -0.81920000000000000000e4 +799 4 6 10 0.16384000000000000000e5 +799 4 8 8 0.32768000000000000000e5 +800 2 2 16 -0.32768000000000000000e5 +800 2 9 11 0.32768000000000000000e5 +801 1 7 22 0.32768000000000000000e5 +801 1 8 23 -0.65536000000000000000e5 +801 1 11 26 0.32768000000000000000e5 +801 1 12 27 0.32768000000000000000e5 +801 2 9 12 0.32768000000000000000e5 +801 3 7 20 0.32768000000000000000e5 +801 3 8 21 0.32768000000000000000e5 +802 1 7 22 0.32768000000000000000e5 +802 1 12 19 0.32768000000000000000e5 +802 1 12 27 0.32768000000000000000e5 +802 1 13 28 -0.65536000000000000000e5 +802 2 9 13 0.32768000000000000000e5 +802 3 8 21 0.32768000000000000000e5 +802 3 13 18 -0.65536000000000000000e5 +803 1 6 21 0.16384000000000000000e5 +803 1 7 14 -0.65536000000000000000e5 +803 1 7 22 0.16384000000000000000e5 +803 1 8 23 0.32768000000000000000e5 +803 1 11 26 0.16384000000000000000e5 +803 1 13 28 0.32768000000000000000e5 +803 2 2 16 0.16384000000000000000e5 +803 2 9 14 0.32768000000000000000e5 +803 3 2 15 0.65536000000000000000e5 +803 3 7 20 0.16384000000000000000e5 +803 3 13 18 0.32768000000000000000e5 +804 1 8 23 0.32768000000000000000e5 +804 1 9 24 0.32768000000000000000e5 +804 1 13 28 0.32768000000000000000e5 +804 1 14 21 -0.65536000000000000000e5 +804 2 9 15 0.32768000000000000000e5 +804 3 13 18 0.32768000000000000000e5 +805 1 7 14 0.32768000000000000000e5 +805 1 8 15 -0.65536000000000000000e5 +805 1 14 21 0.32768000000000000000e5 +805 1 22 25 0.32768000000000000000e5 +805 2 9 16 0.32768000000000000000e5 +805 3 8 13 0.32768000000000000000e5 +805 3 11 12 0.32768000000000000000e5 +805 3 11 24 0.32768000000000000000e5 +805 4 6 10 0.32768000000000000000e5 +806 1 7 22 0.32768000000000000000e5 +806 1 8 23 -0.65536000000000000000e5 +806 1 11 26 0.32768000000000000000e5 +806 1 12 27 0.32768000000000000000e5 +806 2 9 17 0.32768000000000000000e5 +806 3 7 20 0.32768000000000000000e5 +806 3 8 21 0.32768000000000000000e5 +806 4 8 12 0.32768000000000000000e5 +807 1 12 19 0.32768000000000000000e5 +807 1 12 27 0.32768000000000000000e5 +807 1 13 28 -0.65536000000000000000e5 +807 1 17 24 0.32768000000000000000e5 +807 2 9 18 0.32768000000000000000e5 +807 3 4 25 -0.65536000000000000000e5 +807 3 8 21 0.32768000000000000000e5 +807 3 9 22 0.32768000000000000000e5 +807 4 4 16 0.32768000000000000000e5 +808 1 7 22 -0.16384000000000000000e5 +808 1 8 23 0.32768000000000000000e5 +808 1 9 24 0.32768000000000000000e5 +808 1 13 28 0.32768000000000000000e5 +808 1 14 29 -0.65536000000000000000e5 +808 1 17 24 0.16384000000000000000e5 +808 2 9 19 0.32768000000000000000e5 +808 3 4 25 -0.32768000000000000000e5 +808 3 7 20 -0.16384000000000000000e5 +808 3 8 21 -0.16384000000000000000e5 +808 4 8 12 -0.16384000000000000000e5 +809 1 12 19 0.32768000000000000000e5 +809 1 12 27 0.32768000000000000000e5 +809 1 13 28 -0.65536000000000000000e5 +809 1 17 24 0.32768000000000000000e5 +809 2 9 20 0.32768000000000000000e5 +809 3 4 25 -0.65536000000000000000e5 +809 3 8 21 0.32768000000000000000e5 +809 3 9 22 0.32768000000000000000e5 +809 4 4 16 0.32768000000000000000e5 +809 4 12 16 0.32768000000000000000e5 +810 2 8 14 -0.32768000000000000000e5 +810 2 10 11 0.32768000000000000000e5 +811 1 6 21 0.16384000000000000000e5 +811 1 7 14 -0.65536000000000000000e5 +811 1 7 22 0.16384000000000000000e5 +811 1 8 23 0.32768000000000000000e5 +811 1 11 26 0.16384000000000000000e5 +811 1 13 28 0.32768000000000000000e5 +811 2 2 16 0.16384000000000000000e5 +811 2 10 12 0.32768000000000000000e5 +811 3 2 15 0.65536000000000000000e5 +811 3 7 20 0.16384000000000000000e5 +811 3 13 18 0.32768000000000000000e5 +812 1 8 23 0.32768000000000000000e5 +812 1 9 24 0.32768000000000000000e5 +812 1 13 28 0.32768000000000000000e5 +812 1 14 21 -0.65536000000000000000e5 +812 2 10 13 0.32768000000000000000e5 +812 3 13 18 0.32768000000000000000e5 +813 1 7 14 0.32768000000000000000e5 +813 1 10 25 -0.65536000000000000000e5 +813 1 13 20 0.32768000000000000000e5 +813 1 14 21 0.32768000000000000000e5 +813 2 10 14 0.32768000000000000000e5 +813 3 2 15 -0.32768000000000000000e5 +814 1 7 14 0.32768000000000000000e5 +814 1 8 15 -0.65536000000000000000e5 +814 1 14 21 0.32768000000000000000e5 +814 1 22 25 0.32768000000000000000e5 +814 2 10 15 0.32768000000000000000e5 +814 3 8 13 0.32768000000000000000e5 +814 3 11 12 0.32768000000000000000e5 +814 3 11 24 0.32768000000000000000e5 +814 4 6 10 0.32768000000000000000e5 +815 1 7 14 -0.65536000000000000000e5 +815 1 7 22 -0.16384000000000000000e5 +815 1 8 23 0.32768000000000000000e5 +815 1 11 26 0.16384000000000000000e5 +815 1 13 28 0.32768000000000000000e5 +815 1 16 23 0.16384000000000000000e5 +815 1 17 24 0.32768000000000000000e5 +815 2 5 19 0.16384000000000000000e5 +815 2 10 17 0.32768000000000000000e5 +815 3 2 15 0.65536000000000000000e5 +815 3 7 20 -0.16384000000000000000e5 +815 3 8 21 -0.16384000000000000000e5 +815 3 10 23 0.65536000000000000000e5 +815 4 8 12 -0.16384000000000000000e5 +816 1 7 22 -0.16384000000000000000e5 +816 1 8 23 0.32768000000000000000e5 +816 1 9 24 0.32768000000000000000e5 +816 1 13 28 0.32768000000000000000e5 +816 1 14 29 -0.65536000000000000000e5 +816 1 17 24 0.16384000000000000000e5 +816 2 10 18 0.32768000000000000000e5 +816 3 4 25 -0.32768000000000000000e5 +816 3 7 20 -0.16384000000000000000e5 +816 3 8 21 -0.16384000000000000000e5 +816 4 8 12 -0.16384000000000000000e5 +817 1 7 14 0.32768000000000000000e5 +817 1 8 15 -0.65536000000000000000e5 +817 1 14 21 0.32768000000000000000e5 +817 1 22 25 0.32768000000000000000e5 +817 2 10 19 0.32768000000000000000e5 +817 3 8 13 0.32768000000000000000e5 +817 3 11 12 0.32768000000000000000e5 +817 3 11 24 0.32768000000000000000e5 +817 4 6 10 0.32768000000000000000e5 +817 4 10 14 0.32768000000000000000e5 +818 1 3 34 0.16384000000000000000e5 +818 1 7 22 -0.16384000000000000000e5 +818 1 8 23 0.32768000000000000000e5 +818 1 9 24 0.32768000000000000000e5 +818 1 14 29 -0.65536000000000000000e5 +818 1 17 24 0.16384000000000000000e5 +818 1 20 35 -0.16384000000000000000e5 +818 1 25 32 0.32768000000000000000e5 +818 2 6 20 0.81920000000000000000e4 +818 2 10 20 0.32768000000000000000e5 +818 2 14 20 -0.81920000000000000000e4 +818 3 4 25 -0.32768000000000000000e5 +818 3 6 35 -0.16384000000000000000e5 +818 3 7 20 -0.16384000000000000000e5 +818 3 8 21 -0.16384000000000000000e5 +818 3 13 26 -0.32768000000000000000e5 +818 3 14 27 -0.32768000000000000000e5 +818 3 16 29 0.81920000000000000000e4 +818 3 17 30 0.16384000000000000000e5 +818 3 18 31 0.16384000000000000000e5 +818 3 20 25 0.65536000000000000000e5 +818 3 22 27 0.81920000000000000000e4 +818 4 8 12 -0.16384000000000000000e5 +818 4 8 20 0.16384000000000000000e5 +818 4 14 18 0.81920000000000000000e4 +819 2 11 12 0.32768000000000000000e5 +819 2 11 17 -0.32768000000000000000e5 +819 4 11 11 -0.65536000000000000000e5 +820 2 3 17 -0.32768000000000000000e5 +820 2 11 13 0.32768000000000000000e5 +821 2 1 19 -0.32768000000000000000e5 +821 2 11 14 0.32768000000000000000e5 +822 2 6 12 -0.32768000000000000000e5 +822 2 11 15 0.32768000000000000000e5 +822 4 2 14 0.32768000000000000000e5 +823 2 5 19 -0.32768000000000000000e5 +823 2 11 16 0.32768000000000000000e5 +824 1 1 32 -0.32768000000000000000e5 +824 1 2 33 -0.32768000000000000000e5 +824 1 4 35 -0.32768000000000000000e5 +824 1 16 31 0.13107200000000000000e6 +824 1 20 27 -0.13107200000000000000e6 +824 2 6 12 -0.65536000000000000000e5 +824 2 11 17 -0.32768000000000000000e5 +824 2 11 18 0.32768000000000000000e5 +824 2 12 18 -0.32768000000000000000e5 +824 3 3 32 0.32768000000000000000e5 +824 3 4 33 0.32768000000000000000e5 +824 3 17 30 -0.65536000000000000000e5 +824 4 2 14 0.65536000000000000000e5 +824 4 5 17 0.65536000000000000000e5 +824 4 13 17 0.32768000000000000000e5 +825 2 6 12 -0.32768000000000000000e5 +825 2 11 19 0.32768000000000000000e5 +825 4 2 14 0.32768000000000000000e5 +825 4 5 17 0.32768000000000000000e5 +826 2 11 20 0.32768000000000000000e5 +826 2 17 17 -0.65536000000000000000e5 +827 2 3 17 -0.16384000000000000000e5 +827 2 12 12 0.32768000000000000000e5 +828 1 3 18 0.32768000000000000000e5 +828 1 4 27 0.32768000000000000000e5 +828 1 4 35 0.32768000000000000000e5 +828 1 5 20 -0.65536000000000000000e5 +828 1 9 16 -0.65536000000000000000e5 +828 1 20 27 0.65536000000000000000e5 +828 2 12 13 0.32768000000000000000e5 +828 3 1 30 0.65536000000000000000e5 +828 3 3 16 0.32768000000000000000e5 +828 3 3 32 -0.32768000000000000000e5 +828 3 4 17 0.32768000000000000000e5 +828 3 4 33 -0.32768000000000000000e5 +828 3 5 26 0.32768000000000000000e5 +828 3 6 19 0.65536000000000000000e5 +828 3 17 30 0.65536000000000000000e5 +828 4 1 13 0.32768000000000000000e5 +828 4 13 17 -0.32768000000000000000e5 +829 2 6 12 -0.32768000000000000000e5 +829 2 12 14 0.32768000000000000000e5 +829 4 2 14 0.32768000000000000000e5 +830 1 3 34 -0.32768000000000000000e5 +830 1 5 20 0.32768000000000000000e5 +830 2 6 20 -0.32768000000000000000e5 +830 2 12 15 0.32768000000000000000e5 +830 3 1 30 0.32768000000000000000e5 +830 3 2 31 -0.65536000000000000000e5 +830 3 6 19 -0.32768000000000000000e5 +830 3 17 22 0.32768000000000000000e5 +831 1 7 22 0.32768000000000000000e5 +831 1 8 23 -0.65536000000000000000e5 +831 1 11 26 0.32768000000000000000e5 +831 1 12 27 0.32768000000000000000e5 +831 2 12 16 0.32768000000000000000e5 +831 3 7 20 0.32768000000000000000e5 +831 3 8 21 0.32768000000000000000e5 +831 4 8 12 0.32768000000000000000e5 +832 1 1 32 -0.32768000000000000000e5 +832 1 2 33 -0.32768000000000000000e5 +832 1 4 35 -0.32768000000000000000e5 +832 1 16 31 0.13107200000000000000e6 +832 1 20 27 -0.13107200000000000000e6 +832 2 6 12 -0.65536000000000000000e5 +832 2 11 17 -0.32768000000000000000e5 +832 2 12 17 0.32768000000000000000e5 +832 2 12 18 -0.32768000000000000000e5 +832 3 3 32 0.32768000000000000000e5 +832 3 4 33 0.32768000000000000000e5 +832 3 17 30 -0.65536000000000000000e5 +832 4 2 14 0.65536000000000000000e5 +832 4 5 17 0.65536000000000000000e5 +832 4 13 17 0.32768000000000000000e5 +833 2 6 20 -0.32768000000000000000e5 +833 2 12 19 0.32768000000000000000e5 +834 1 2 33 -0.32768000000000000000e5 +834 1 3 34 0.65536000000000000000e5 +834 1 17 32 0.32768000000000000000e5 +834 1 20 35 -0.65536000000000000000e5 +834 2 12 18 -0.32768000000000000000e5 +834 2 12 20 0.32768000000000000000e5 +834 3 4 33 0.32768000000000000000e5 +834 3 6 35 -0.65536000000000000000e5 +834 3 17 30 -0.65536000000000000000e5 +834 4 13 17 0.32768000000000000000e5 +835 2 4 18 -0.16384000000000000000e5 +835 2 13 13 0.32768000000000000000e5 +836 1 3 34 -0.32768000000000000000e5 +836 1 5 20 0.32768000000000000000e5 +836 2 6 20 -0.32768000000000000000e5 +836 2 13 14 0.32768000000000000000e5 +836 3 1 30 0.32768000000000000000e5 +836 3 2 31 -0.65536000000000000000e5 +836 3 6 19 -0.32768000000000000000e5 +836 3 17 22 0.32768000000000000000e5 +837 1 12 27 -0.65536000000000000000e5 +837 1 17 24 0.65536000000000000000e5 +837 1 19 34 0.32768000000000000000e5 +837 1 20 27 -0.32768000000000000000e5 +837 2 6 20 -0.32768000000000000000e5 +837 2 13 15 0.32768000000000000000e5 +837 3 2 31 -0.65536000000000000000e5 +837 3 18 23 0.65536000000000000000e5 +837 3 22 27 0.32768000000000000000e5 +837 4 6 18 -0.32768000000000000000e5 +838 1 12 19 0.32768000000000000000e5 +838 1 12 27 0.32768000000000000000e5 +838 1 13 28 -0.65536000000000000000e5 +838 1 17 24 0.32768000000000000000e5 +838 2 13 16 0.32768000000000000000e5 +838 3 4 25 -0.65536000000000000000e5 +838 3 8 21 0.32768000000000000000e5 +838 3 9 22 0.32768000000000000000e5 +838 4 4 16 0.32768000000000000000e5 +839 2 12 18 -0.32768000000000000000e5 +839 2 13 17 0.32768000000000000000e5 +840 1 2 33 -0.32768000000000000000e5 +840 1 3 34 0.65536000000000000000e5 +840 1 4 27 -0.32768000000000000000e5 +840 1 4 35 -0.32768000000000000000e5 +840 2 4 18 -0.32768000000000000000e5 +840 2 12 18 -0.32768000000000000000e5 +840 2 13 18 0.32768000000000000000e5 +840 3 3 32 0.32768000000000000000e5 +840 3 4 33 0.32768000000000000000e5 +840 3 5 26 -0.32768000000000000000e5 +840 3 17 22 0.65536000000000000000e5 +840 3 17 30 -0.65536000000000000000e5 +840 3 18 19 -0.32768000000000000000e5 +840 4 13 17 0.32768000000000000000e5 +841 1 12 27 -0.65536000000000000000e5 +841 1 17 24 0.65536000000000000000e5 +841 1 19 34 0.32768000000000000000e5 +841 1 20 27 -0.32768000000000000000e5 +841 2 6 20 -0.32768000000000000000e5 +841 2 13 19 0.32768000000000000000e5 +841 3 2 31 -0.65536000000000000000e5 +841 3 18 23 0.65536000000000000000e5 +841 3 22 27 0.32768000000000000000e5 +842 1 2 33 -0.32768000000000000000e5 +842 1 3 34 0.65536000000000000000e5 +842 1 4 27 -0.32768000000000000000e5 +842 1 4 35 -0.32768000000000000000e5 +842 2 4 18 -0.32768000000000000000e5 +842 2 12 18 -0.32768000000000000000e5 +842 2 13 20 0.32768000000000000000e5 +842 3 3 32 0.32768000000000000000e5 +842 3 4 33 0.32768000000000000000e5 +842 3 5 26 -0.32768000000000000000e5 +842 3 17 22 0.65536000000000000000e5 +842 3 17 30 -0.65536000000000000000e5 +842 3 18 19 -0.32768000000000000000e5 +842 4 13 17 0.65536000000000000000e5 +843 2 5 19 -0.16384000000000000000e5 +843 2 14 14 0.32768000000000000000e5 +844 1 7 22 0.32768000000000000000e5 +844 1 8 23 -0.65536000000000000000e5 +844 1 11 26 0.32768000000000000000e5 +844 1 12 27 0.32768000000000000000e5 +844 2 14 15 0.32768000000000000000e5 +844 3 7 20 0.32768000000000000000e5 +844 3 8 21 0.32768000000000000000e5 +844 4 8 12 0.32768000000000000000e5 +845 1 7 14 -0.65536000000000000000e5 +845 1 7 22 -0.16384000000000000000e5 +845 1 8 23 0.32768000000000000000e5 +845 1 11 26 0.16384000000000000000e5 +845 1 13 28 0.32768000000000000000e5 +845 1 16 23 0.16384000000000000000e5 +845 1 17 24 0.32768000000000000000e5 +845 2 5 19 0.16384000000000000000e5 +845 2 14 16 0.32768000000000000000e5 +845 3 2 15 0.65536000000000000000e5 +845 3 7 20 -0.16384000000000000000e5 +845 3 8 21 -0.16384000000000000000e5 +845 3 10 23 0.65536000000000000000e5 +845 4 8 12 -0.16384000000000000000e5 +846 2 6 12 -0.32768000000000000000e5 +846 2 14 17 0.32768000000000000000e5 +846 4 2 14 0.32768000000000000000e5 +846 4 5 17 0.32768000000000000000e5 +847 2 6 20 -0.32768000000000000000e5 +847 2 14 18 0.32768000000000000000e5 +848 1 7 22 0.32768000000000000000e5 +848 1 8 23 -0.65536000000000000000e5 +848 1 12 27 0.32768000000000000000e5 +848 1 16 31 0.32768000000000000000e5 +848 2 14 19 0.32768000000000000000e5 +848 3 2 31 -0.32768000000000000000e5 +848 3 7 20 0.32768000000000000000e5 +848 3 8 21 0.32768000000000000000e5 +848 3 13 26 0.65536000000000000000e5 +848 3 18 23 -0.32768000000000000000e5 +848 4 8 12 0.32768000000000000000e5 +849 1 12 19 0.16384000000000000000e5 +849 1 12 27 0.16384000000000000000e5 +849 1 13 28 -0.32768000000000000000e5 +849 1 17 24 0.16384000000000000000e5 +849 2 15 15 0.32768000000000000000e5 +849 3 4 25 -0.32768000000000000000e5 +849 3 8 21 0.16384000000000000000e5 +849 3 9 22 0.16384000000000000000e5 +849 4 4 16 0.16384000000000000000e5 +850 1 7 22 -0.16384000000000000000e5 +850 1 8 23 0.32768000000000000000e5 +850 1 9 24 0.32768000000000000000e5 +850 1 13 28 0.32768000000000000000e5 +850 1 14 29 -0.65536000000000000000e5 +850 1 17 24 0.16384000000000000000e5 +850 2 15 16 0.32768000000000000000e5 +850 3 4 25 -0.32768000000000000000e5 +850 3 7 20 -0.16384000000000000000e5 +850 3 8 21 -0.16384000000000000000e5 +850 4 8 12 -0.16384000000000000000e5 +851 2 6 20 -0.32768000000000000000e5 +851 2 15 17 0.32768000000000000000e5 +852 1 12 27 -0.65536000000000000000e5 +852 1 17 24 0.65536000000000000000e5 +852 1 19 34 0.32768000000000000000e5 +852 1 20 27 -0.32768000000000000000e5 +852 2 6 20 -0.32768000000000000000e5 +852 2 15 18 0.32768000000000000000e5 +852 3 2 31 -0.65536000000000000000e5 +852 3 18 23 0.65536000000000000000e5 +852 3 22 27 0.32768000000000000000e5 +853 1 12 19 0.32768000000000000000e5 +853 1 12 27 0.32768000000000000000e5 +853 1 13 28 -0.65536000000000000000e5 +853 1 17 24 0.32768000000000000000e5 +853 2 15 19 0.32768000000000000000e5 +853 3 4 25 -0.65536000000000000000e5 +853 3 8 21 0.32768000000000000000e5 +853 3 9 22 0.32768000000000000000e5 +853 4 4 16 0.32768000000000000000e5 +853 4 12 16 0.32768000000000000000e5 +854 1 12 27 -0.65536000000000000000e5 +854 1 17 24 0.65536000000000000000e5 +854 1 19 34 0.32768000000000000000e5 +854 1 20 27 -0.32768000000000000000e5 +854 2 6 20 -0.32768000000000000000e5 +854 2 15 20 0.32768000000000000000e5 +854 3 2 31 -0.65536000000000000000e5 +854 3 18 23 0.65536000000000000000e5 +854 3 22 27 0.32768000000000000000e5 +854 4 14 18 0.32768000000000000000e5 +855 1 7 14 0.16384000000000000000e5 +855 1 8 15 -0.32768000000000000000e5 +855 1 14 21 0.16384000000000000000e5 +855 1 22 25 0.16384000000000000000e5 +855 2 16 16 0.32768000000000000000e5 +855 3 8 13 0.16384000000000000000e5 +855 3 11 12 0.16384000000000000000e5 +855 3 11 24 0.16384000000000000000e5 +855 4 6 10 0.16384000000000000000e5 +855 4 10 14 0.16384000000000000000e5 +856 1 7 22 0.32768000000000000000e5 +856 1 8 23 -0.65536000000000000000e5 +856 1 12 27 0.32768000000000000000e5 +856 1 16 31 0.32768000000000000000e5 +856 2 16 17 0.32768000000000000000e5 +856 3 2 31 -0.32768000000000000000e5 +856 3 7 20 0.32768000000000000000e5 +856 3 8 21 0.32768000000000000000e5 +856 3 13 26 0.65536000000000000000e5 +856 3 18 23 -0.32768000000000000000e5 +856 4 8 12 0.32768000000000000000e5 +857 1 12 19 0.32768000000000000000e5 +857 1 12 27 0.32768000000000000000e5 +857 1 13 28 -0.65536000000000000000e5 +857 1 17 24 0.32768000000000000000e5 +857 2 16 18 0.32768000000000000000e5 +857 3 4 25 -0.65536000000000000000e5 +857 3 8 21 0.32768000000000000000e5 +857 3 9 22 0.32768000000000000000e5 +857 4 4 16 0.32768000000000000000e5 +857 4 12 16 0.32768000000000000000e5 +858 1 3 34 0.16384000000000000000e5 +858 1 7 22 -0.16384000000000000000e5 +858 1 8 23 0.32768000000000000000e5 +858 1 9 24 0.32768000000000000000e5 +858 1 14 29 -0.65536000000000000000e5 +858 1 17 24 0.16384000000000000000e5 +858 1 20 35 -0.16384000000000000000e5 +858 1 25 32 0.32768000000000000000e5 +858 2 6 20 0.81920000000000000000e4 +858 2 14 20 -0.81920000000000000000e4 +858 2 16 19 0.32768000000000000000e5 +858 3 4 25 -0.32768000000000000000e5 +858 3 6 35 -0.16384000000000000000e5 +858 3 7 20 -0.16384000000000000000e5 +858 3 8 21 -0.16384000000000000000e5 +858 3 13 26 -0.32768000000000000000e5 +858 3 14 27 -0.32768000000000000000e5 +858 3 16 29 0.81920000000000000000e4 +858 3 17 30 0.16384000000000000000e5 +858 3 18 31 0.16384000000000000000e5 +858 3 20 25 0.65536000000000000000e5 +858 3 22 27 0.81920000000000000000e4 +858 4 8 12 -0.16384000000000000000e5 +858 4 8 20 0.16384000000000000000e5 +858 4 14 18 0.81920000000000000000e4 +859 1 12 19 0.32768000000000000000e5 +859 1 12 27 0.32768000000000000000e5 +859 1 13 28 -0.65536000000000000000e5 +859 1 17 24 0.32768000000000000000e5 +859 2 16 20 0.32768000000000000000e5 +859 3 4 25 -0.65536000000000000000e5 +859 3 8 21 0.32768000000000000000e5 +859 3 9 22 0.32768000000000000000e5 +859 4 4 16 0.32768000000000000000e5 +859 4 8 20 0.32768000000000000000e5 +859 4 12 16 0.32768000000000000000e5 +860 1 2 33 -0.32768000000000000000e5 +860 1 3 34 0.65536000000000000000e5 +860 1 17 32 0.32768000000000000000e5 +860 1 20 35 -0.65536000000000000000e5 +860 2 12 18 -0.32768000000000000000e5 +860 2 17 18 0.32768000000000000000e5 +860 3 4 33 0.32768000000000000000e5 +860 3 6 35 -0.65536000000000000000e5 +860 3 17 30 -0.65536000000000000000e5 +860 4 13 17 0.32768000000000000000e5 +861 2 14 20 -0.32768000000000000000e5 +861 2 17 19 0.32768000000000000000e5 +862 1 2 33 -0.32768000000000000000e5 +862 1 3 34 0.65536000000000000000e5 +862 1 17 32 0.32768000000000000000e5 +862 1 20 35 -0.65536000000000000000e5 +862 2 12 18 -0.32768000000000000000e5 +862 2 17 20 0.32768000000000000000e5 +862 3 4 33 0.32768000000000000000e5 +862 3 6 35 -0.65536000000000000000e5 +862 3 17 30 -0.65536000000000000000e5 +862 4 13 17 0.32768000000000000000e5 +862 4 17 17 0.65536000000000000000e5 +863 1 2 33 -0.16384000000000000000e5 +863 1 3 34 0.32768000000000000000e5 +863 1 4 27 -0.16384000000000000000e5 +863 1 4 35 -0.16384000000000000000e5 +863 2 4 18 -0.16384000000000000000e5 +863 2 12 18 -0.16384000000000000000e5 +863 2 18 18 0.32768000000000000000e5 +863 3 3 32 0.16384000000000000000e5 +863 3 4 33 0.16384000000000000000e5 +863 3 5 26 -0.16384000000000000000e5 +863 3 17 22 0.32768000000000000000e5 +863 3 17 30 -0.32768000000000000000e5 +863 3 18 19 -0.16384000000000000000e5 +863 4 13 17 0.32768000000000000000e5 +864 1 12 27 -0.65536000000000000000e5 +864 1 17 24 0.65536000000000000000e5 +864 1 19 34 0.32768000000000000000e5 +864 1 20 27 -0.32768000000000000000e5 +864 2 6 20 -0.32768000000000000000e5 +864 2 18 19 0.32768000000000000000e5 +864 3 2 31 -0.65536000000000000000e5 +864 3 18 23 0.65536000000000000000e5 +864 3 22 27 0.32768000000000000000e5 +864 4 14 18 0.32768000000000000000e5 +865 1 12 19 0.16384000000000000000e5 +865 1 12 27 0.16384000000000000000e5 +865 1 13 28 -0.32768000000000000000e5 +865 1 17 24 0.16384000000000000000e5 +865 2 19 19 0.32768000000000000000e5 +865 3 4 25 -0.32768000000000000000e5 +865 3 8 21 0.16384000000000000000e5 +865 3 9 22 0.16384000000000000000e5 +865 4 4 16 0.16384000000000000000e5 +865 4 8 20 0.16384000000000000000e5 +865 4 12 16 0.16384000000000000000e5 +866 1 12 27 -0.65536000000000000000e5 +866 1 17 24 0.65536000000000000000e5 +866 1 20 27 -0.32768000000000000000e5 +866 1 30 33 0.32768000000000000000e5 +866 2 6 20 -0.32768000000000000000e5 +866 2 19 20 0.32768000000000000000e5 +866 3 2 31 -0.65536000000000000000e5 +866 3 6 35 -0.32768000000000000000e5 +866 3 18 23 0.65536000000000000000e5 +866 3 20 33 -0.32768000000000000000e5 +866 3 22 27 0.32768000000000000000e5 +866 3 26 31 0.65536000000000000000e5 +866 4 14 18 0.32768000000000000000e5 +867 1 2 5 -0.16384000000000000000e5 +867 1 3 18 0.16384000000000000000e5 +867 3 1 1 0.32768000000000000000e5 +867 3 1 2 0.16384000000000000000e5 +867 3 1 6 -0.32768000000000000000e5 +867 3 2 3 -0.16384000000000000000e5 +867 3 2 7 0.32768000000000000000e5 +867 4 1 1 0.32768000000000000000e5 +867 4 2 2 -0.32768000000000000000e5 +868 1 2 5 0.32768000000000000000e5 +868 1 3 18 -0.32768000000000000000e5 +868 3 1 3 0.32768000000000000000e5 +868 3 2 3 0.32768000000000000000e5 +868 3 2 7 -0.65536000000000000000e5 +868 4 2 2 0.65536000000000000000e5 +869 3 1 4 0.32768000000000000000e5 +869 3 2 3 -0.32768000000000000000e5 +870 1 2 5 -0.32768000000000000000e5 +870 1 3 18 0.32768000000000000000e5 +870 3 1 5 0.32768000000000000000e5 +871 1 1 8 -0.32768000000000000000e5 +871 1 5 20 0.32768000000000000000e5 +871 1 6 21 0.65536000000000000000e5 +871 1 11 26 -0.65536000000000000000e5 +871 2 1 15 -0.32768000000000000000e5 +871 2 6 12 0.32768000000000000000e5 +871 3 1 7 0.32768000000000000000e5 +871 3 7 20 -0.65536000000000000000e5 +872 3 1 8 0.32768000000000000000e5 +872 3 2 7 -0.32768000000000000000e5 +873 1 2 9 -0.32768000000000000000e5 +873 1 9 16 0.32768000000000000000e5 +873 3 1 9 0.32768000000000000000e5 +874 1 1 8 -0.16384000000000000000e5 +874 1 5 20 0.16384000000000000000e5 +874 1 6 21 0.32768000000000000000e5 +874 1 11 26 -0.32768000000000000000e5 +874 2 1 15 -0.16384000000000000000e5 +874 2 6 12 0.16384000000000000000e5 +874 3 1 6 -0.16384000000000000000e5 +874 3 1 10 0.32768000000000000000e5 +874 3 2 7 -0.16384000000000000000e5 +874 3 7 20 -0.32768000000000000000e5 +874 4 1 5 -0.16384000000000000000e5 +875 1 1 8 -0.16384000000000000000e5 +875 1 2 9 -0.16384000000000000000e5 +875 1 5 20 0.16384000000000000000e5 +875 1 6 21 0.32768000000000000000e5 +875 1 9 16 0.16384000000000000000e5 +875 1 11 26 -0.32768000000000000000e5 +875 2 1 7 -0.16384000000000000000e5 +875 2 6 12 0.16384000000000000000e5 +875 3 1 11 0.32768000000000000000e5 +875 3 2 7 -0.16384000000000000000e5 +875 3 7 20 -0.32768000000000000000e5 +876 1 4 11 0.65536000000000000000e5 +876 1 5 12 0.32768000000000000000e5 +876 1 7 22 -0.32768000000000000000e5 +876 1 8 23 -0.65536000000000000000e5 +876 1 11 26 0.32768000000000000000e5 +876 1 12 19 -0.32768000000000000000e5 +876 1 12 27 0.32768000000000000000e5 +876 2 3 9 0.32768000000000000000e5 +876 3 1 12 0.32768000000000000000e5 +876 3 1 14 0.65536000000000000000e5 +876 3 2 15 -0.13107200000000000000e6 +876 3 5 10 0.65536000000000000000e5 +876 3 7 20 0.32768000000000000000e5 +876 3 8 21 0.32768000000000000000e5 +876 4 4 8 0.32768000000000000000e5 +876 4 5 9 0.65536000000000000000e5 +877 1 6 21 -0.16384000000000000000e5 +877 1 7 10 -0.32768000000000000000e5 +877 1 7 22 -0.16384000000000000000e5 +877 1 8 23 -0.32768000000000000000e5 +877 1 11 26 -0.16384000000000000000e5 +877 1 13 20 0.65536000000000000000e5 +877 2 2 16 -0.16384000000000000000e5 +877 2 8 14 -0.32768000000000000000e5 +877 3 1 13 0.32768000000000000000e5 +877 3 7 20 -0.16384000000000000000e5 +878 1 4 11 0.81920000000000000000e4 +878 1 5 12 0.81920000000000000000e4 +878 1 6 21 -0.81920000000000000000e4 +878 1 7 10 -0.16384000000000000000e5 +878 1 7 22 -0.16384000000000000000e5 +878 1 8 23 -0.16384000000000000000e5 +878 1 11 26 -0.81920000000000000000e4 +878 1 12 19 -0.81920000000000000000e4 +878 1 13 20 0.32768000000000000000e5 +878 2 2 16 -0.81920000000000000000e4 +878 2 6 8 -0.16384000000000000000e5 +878 3 1 15 0.32768000000000000000e5 +878 3 2 15 -0.32768000000000000000e5 +878 3 5 10 0.81920000000000000000e4 +878 3 7 20 -0.81920000000000000000e4 +878 4 4 8 0.81920000000000000000e4 +878 4 5 9 0.16384000000000000000e5 +879 1 1 8 -0.65536000000000000000e5 +879 1 2 5 -0.32768000000000000000e5 +879 1 2 17 0.32768000000000000000e5 +879 1 3 18 0.32768000000000000000e5 +879 1 4 27 -0.32768000000000000000e5 +879 1 5 20 0.13107200000000000000e6 +879 1 11 26 -0.26214400000000000000e6 +879 1 16 23 0.13107200000000000000e6 +879 1 20 27 0.13107200000000000000e6 +879 2 1 3 0.32768000000000000000e5 +879 2 1 19 -0.65536000000000000000e5 +879 2 3 17 -0.32768000000000000000e5 +879 2 6 12 0.13107200000000000000e6 +879 2 11 11 -0.65536000000000000000e5 +879 2 11 17 0.32768000000000000000e5 +879 3 1 2 0.32768000000000000000e5 +879 3 1 16 0.32768000000000000000e5 +879 3 1 30 0.13107200000000000000e6 +879 3 2 7 0.65536000000000000000e5 +879 3 3 16 0.32768000000000000000e5 +879 3 6 19 -0.13107200000000000000e6 +879 4 2 2 -0.65536000000000000000e5 +879 4 2 14 -0.13107200000000000000e6 +879 4 11 11 0.65536000000000000000e5 +880 1 2 17 -0.32768000000000000000e5 +880 1 4 27 0.32768000000000000000e5 +880 1 5 20 -0.65536000000000000000e5 +880 1 11 26 0.13107200000000000000e6 +880 1 20 27 -0.13107200000000000000e6 +880 2 3 17 0.32768000000000000000e5 +880 2 6 12 -0.65536000000000000000e5 +880 2 11 17 -0.32768000000000000000e5 +880 3 1 17 0.32768000000000000000e5 +880 3 1 30 -0.13107200000000000000e6 +880 3 6 19 0.65536000000000000000e5 +880 4 2 14 0.65536000000000000000e5 +880 4 11 11 -0.65536000000000000000e5 +881 3 1 18 0.32768000000000000000e5 +881 3 3 16 -0.32768000000000000000e5 +882 1 9 16 -0.65536000000000000000e5 +882 1 20 27 0.65536000000000000000e5 +882 3 1 19 0.32768000000000000000e5 +882 3 1 30 0.65536000000000000000e5 +882 3 3 16 0.32768000000000000000e5 +882 3 4 17 0.32768000000000000000e5 +882 4 1 13 0.32768000000000000000e5 +883 1 6 21 -0.65536000000000000000e5 +883 1 16 23 0.65536000000000000000e5 +883 2 1 15 0.32768000000000000000e5 +883 2 1 19 -0.32768000000000000000e5 +883 3 1 20 0.32768000000000000000e5 +883 3 6 19 -0.32768000000000000000e5 +883 3 7 20 0.65536000000000000000e5 +883 4 2 14 -0.32768000000000000000e5 +884 1 9 16 0.32768000000000000000e5 +884 1 20 27 -0.32768000000000000000e5 +884 3 1 21 0.32768000000000000000e5 +884 3 1 30 -0.32768000000000000000e5 +884 3 6 19 0.32768000000000000000e5 +884 3 7 20 -0.65536000000000000000e5 +884 4 2 14 0.32768000000000000000e5 +885 1 9 16 -0.32768000000000000000e5 +885 1 20 27 0.32768000000000000000e5 +885 3 1 22 0.32768000000000000000e5 +885 3 1 30 0.32768000000000000000e5 +886 1 6 21 -0.32768000000000000000e5 +886 1 16 23 0.32768000000000000000e5 +886 3 1 23 0.32768000000000000000e5 +887 3 1 24 0.32768000000000000000e5 +887 3 7 20 -0.32768000000000000000e5 +888 1 6 21 -0.16384000000000000000e5 +888 1 7 22 -0.16384000000000000000e5 +888 1 16 23 0.16384000000000000000e5 +888 1 17 24 0.16384000000000000000e5 +888 2 2 16 -0.16384000000000000000e5 +888 2 5 19 0.16384000000000000000e5 +888 3 1 25 0.32768000000000000000e5 +888 3 7 20 -0.16384000000000000000e5 +889 1 1 32 0.32768000000000000000e5 +889 1 4 27 -0.32768000000000000000e5 +889 1 5 20 0.65536000000000000000e5 +889 1 11 26 -0.13107200000000000000e6 +889 1 20 27 0.13107200000000000000e6 +889 2 3 17 -0.32768000000000000000e5 +889 2 6 12 0.65536000000000000000e5 +889 2 11 17 0.32768000000000000000e5 +889 3 1 26 0.32768000000000000000e5 +889 3 1 30 0.13107200000000000000e6 +889 3 6 19 -0.65536000000000000000e5 +889 4 2 14 -0.65536000000000000000e5 +889 4 11 11 0.65536000000000000000e5 +890 1 1 32 -0.32768000000000000000e5 +890 1 2 33 -0.32768000000000000000e5 +890 1 3 18 0.32768000000000000000e5 +890 1 3 34 -0.65536000000000000000e5 +890 1 4 27 0.32768000000000000000e5 +890 1 9 16 -0.65536000000000000000e5 +890 1 16 31 0.13107200000000000000e6 +890 1 20 27 -0.65536000000000000000e5 +890 2 3 17 0.32768000000000000000e5 +890 2 6 12 -0.65536000000000000000e5 +890 2 11 17 -0.32768000000000000000e5 +890 3 1 27 0.32768000000000000000e5 +890 3 3 16 0.32768000000000000000e5 +890 3 4 17 0.32768000000000000000e5 +890 4 1 13 0.32768000000000000000e5 +890 4 2 14 0.65536000000000000000e5 +890 4 5 17 0.65536000000000000000e5 +891 1 2 33 0.32768000000000000000e5 +891 1 3 18 -0.32768000000000000000e5 +891 1 9 16 0.65536000000000000000e5 +891 1 20 27 -0.65536000000000000000e5 +891 3 1 28 0.32768000000000000000e5 +891 3 1 30 -0.65536000000000000000e5 +891 3 3 16 -0.32768000000000000000e5 +891 3 4 17 -0.32768000000000000000e5 +891 4 1 13 -0.32768000000000000000e5 +892 1 3 34 -0.32768000000000000000e5 +892 1 5 20 0.32768000000000000000e5 +892 1 11 26 -0.65536000000000000000e5 +892 1 16 31 0.65536000000000000000e5 +892 3 1 29 0.32768000000000000000e5 +892 3 1 30 0.32768000000000000000e5 +892 3 6 19 -0.32768000000000000000e5 +892 4 5 17 0.32768000000000000000e5 +893 1 11 26 -0.32768000000000000000e5 +893 1 16 31 0.32768000000000000000e5 +893 3 1 31 0.32768000000000000000e5 +894 1 1 32 0.32768000000000000000e5 +894 1 2 33 0.65536000000000000000e5 +894 1 4 35 0.32768000000000000000e5 +894 1 16 31 -0.13107200000000000000e6 +894 1 17 32 -0.32768000000000000000e5 +894 1 20 27 0.13107200000000000000e6 +894 2 6 12 0.65536000000000000000e5 +894 2 11 17 0.32768000000000000000e5 +894 2 12 18 0.32768000000000000000e5 +894 2 17 17 -0.65536000000000000000e5 +894 3 1 32 0.32768000000000000000e5 +894 3 4 33 -0.32768000000000000000e5 +894 3 16 29 -0.65536000000000000000e5 +894 3 17 30 0.65536000000000000000e5 +894 4 2 14 -0.65536000000000000000e5 +894 4 5 17 -0.65536000000000000000e5 +894 4 13 17 -0.32768000000000000000e5 +895 1 2 33 -0.32768000000000000000e5 +895 1 17 32 0.32768000000000000000e5 +895 3 1 33 0.32768000000000000000e5 +896 3 1 34 0.32768000000000000000e5 +896 3 16 29 -0.32768000000000000000e5 +897 1 2 33 -0.32768000000000000000e5 +897 1 3 34 0.65536000000000000000e5 +897 1 4 27 -0.32768000000000000000e5 +897 1 4 35 -0.32768000000000000000e5 +897 2 4 18 -0.32768000000000000000e5 +897 2 12 18 -0.32768000000000000000e5 +897 2 18 20 0.32768000000000000000e5 +897 3 1 35 0.32768000000000000000e5 +897 3 3 32 0.32768000000000000000e5 +897 3 4 33 0.32768000000000000000e5 +897 3 5 26 -0.32768000000000000000e5 +897 3 6 35 -0.65536000000000000000e5 +897 3 17 22 0.65536000000000000000e5 +897 3 17 30 -0.65536000000000000000e5 +897 3 18 19 -0.32768000000000000000e5 +897 3 19 32 -0.32768000000000000000e5 +897 3 20 33 0.65536000000000000000e5 +897 4 13 17 0.65536000000000000000e5 +897 4 17 17 0.65536000000000000000e5 +898 1 2 5 0.16384000000000000000e5 +898 1 3 18 -0.16384000000000000000e5 +898 3 2 2 0.32768000000000000000e5 +898 3 2 3 0.16384000000000000000e5 +898 3 2 7 -0.32768000000000000000e5 +898 4 2 2 0.32768000000000000000e5 +899 1 2 5 -0.32768000000000000000e5 +899 1 3 18 0.32768000000000000000e5 +899 3 2 4 0.32768000000000000000e5 +900 1 2 5 0.32768000000000000000e5 +900 1 2 9 -0.65536000000000000000e5 +900 1 3 18 -0.32768000000000000000e5 +900 1 9 16 0.65536000000000000000e5 +900 2 2 4 0.32768000000000000000e5 +900 2 3 17 -0.32768000000000000000e5 +900 3 2 3 0.32768000000000000000e5 +900 3 2 5 0.32768000000000000000e5 +900 4 1 13 -0.32768000000000000000e5 +901 1 1 8 -0.32768000000000000000e5 +901 1 5 20 0.32768000000000000000e5 +901 1 6 21 0.65536000000000000000e5 +901 1 11 26 -0.65536000000000000000e5 +901 2 1 15 -0.32768000000000000000e5 +901 2 6 12 0.32768000000000000000e5 +901 3 2 6 0.32768000000000000000e5 +901 3 7 20 -0.65536000000000000000e5 +902 1 2 9 -0.32768000000000000000e5 +902 1 9 16 0.32768000000000000000e5 +902 3 2 8 0.32768000000000000000e5 +903 1 2 9 0.32768000000000000000e5 +903 1 4 11 0.13107200000000000000e6 +903 1 5 12 0.65536000000000000000e5 +903 1 7 22 -0.65536000000000000000e5 +903 1 8 23 -0.13107200000000000000e6 +903 1 9 16 -0.32768000000000000000e5 +903 1 11 26 0.65536000000000000000e5 +903 1 12 19 -0.65536000000000000000e5 +903 1 12 27 0.65536000000000000000e5 +903 2 3 9 0.65536000000000000000e5 +903 3 1 14 0.13107200000000000000e6 +903 3 2 7 0.32768000000000000000e5 +903 3 2 9 0.32768000000000000000e5 +903 3 2 15 -0.26214400000000000000e6 +903 3 5 10 0.13107200000000000000e6 +903 3 7 20 0.65536000000000000000e5 +903 3 8 21 0.65536000000000000000e5 +903 4 2 6 0.32768000000000000000e5 +903 4 4 8 0.65536000000000000000e5 +903 4 5 9 0.13107200000000000000e6 +904 1 1 8 -0.16384000000000000000e5 +904 1 2 9 -0.16384000000000000000e5 +904 1 5 20 0.16384000000000000000e5 +904 1 6 21 0.32768000000000000000e5 +904 1 9 16 0.16384000000000000000e5 +904 1 11 26 -0.32768000000000000000e5 +904 2 1 7 -0.16384000000000000000e5 +904 2 6 12 0.16384000000000000000e5 +904 3 2 7 -0.16384000000000000000e5 +904 3 2 10 0.32768000000000000000e5 +904 3 7 20 -0.32768000000000000000e5 +905 1 4 11 0.65536000000000000000e5 +905 1 5 12 0.32768000000000000000e5 +905 1 7 22 -0.32768000000000000000e5 +905 1 8 23 -0.65536000000000000000e5 +905 1 11 26 0.32768000000000000000e5 +905 1 12 19 -0.32768000000000000000e5 +905 1 12 27 0.32768000000000000000e5 +905 2 3 9 0.32768000000000000000e5 +905 3 1 14 0.65536000000000000000e5 +905 3 2 11 0.32768000000000000000e5 +905 3 2 15 -0.13107200000000000000e6 +905 3 5 10 0.65536000000000000000e5 +905 3 7 20 0.32768000000000000000e5 +905 3 8 21 0.32768000000000000000e5 +905 4 4 8 0.32768000000000000000e5 +905 4 5 9 0.65536000000000000000e5 +906 1 4 11 -0.32768000000000000000e5 +906 1 7 22 0.32768000000000000000e5 +906 3 2 12 0.32768000000000000000e5 +907 3 1 14 -0.32768000000000000000e5 +907 3 2 13 0.32768000000000000000e5 +908 1 4 11 0.16384000000000000000e5 +908 1 5 12 0.16384000000000000000e5 +908 1 7 22 -0.16384000000000000000e5 +908 1 12 19 -0.16384000000000000000e5 +908 3 1 14 0.32768000000000000000e5 +908 3 2 14 0.32768000000000000000e5 +908 3 2 15 -0.65536000000000000000e5 +908 3 5 10 0.16384000000000000000e5 +908 4 4 8 0.16384000000000000000e5 +908 4 5 9 0.32768000000000000000e5 +909 1 2 17 -0.32768000000000000000e5 +909 1 4 27 0.32768000000000000000e5 +909 1 5 20 -0.65536000000000000000e5 +909 1 11 26 0.13107200000000000000e6 +909 1 20 27 -0.13107200000000000000e6 +909 2 3 17 0.32768000000000000000e5 +909 2 6 12 -0.65536000000000000000e5 +909 2 11 17 -0.32768000000000000000e5 +909 3 1 30 -0.13107200000000000000e6 +909 3 2 16 0.32768000000000000000e5 +909 3 6 19 0.65536000000000000000e5 +909 4 2 14 0.65536000000000000000e5 +909 4 11 11 -0.65536000000000000000e5 +910 3 2 17 0.32768000000000000000e5 +910 3 3 16 -0.32768000000000000000e5 +911 1 9 16 -0.65536000000000000000e5 +911 1 20 27 0.65536000000000000000e5 +911 3 1 30 0.65536000000000000000e5 +911 3 2 18 0.32768000000000000000e5 +911 3 3 16 0.32768000000000000000e5 +911 3 4 17 0.32768000000000000000e5 +911 4 1 13 0.32768000000000000000e5 +912 3 2 19 0.32768000000000000000e5 +912 3 4 17 -0.32768000000000000000e5 +913 1 9 16 0.32768000000000000000e5 +913 1 20 27 -0.32768000000000000000e5 +913 3 1 30 -0.32768000000000000000e5 +913 3 2 20 0.32768000000000000000e5 +913 3 6 19 0.32768000000000000000e5 +913 3 7 20 -0.65536000000000000000e5 +913 4 2 14 0.32768000000000000000e5 +914 1 9 16 -0.32768000000000000000e5 +914 1 20 27 0.32768000000000000000e5 +914 3 1 30 0.32768000000000000000e5 +914 3 2 21 0.32768000000000000000e5 +915 3 2 22 0.32768000000000000000e5 +915 3 6 19 -0.32768000000000000000e5 +916 3 2 23 0.32768000000000000000e5 +916 3 7 20 -0.32768000000000000000e5 +917 1 7 22 -0.32768000000000000000e5 +917 1 17 24 0.32768000000000000000e5 +917 3 2 24 0.32768000000000000000e5 +918 1 7 22 -0.16384000000000000000e5 +918 1 17 24 0.16384000000000000000e5 +918 3 2 25 0.32768000000000000000e5 +918 3 7 20 -0.16384000000000000000e5 +918 3 8 21 -0.16384000000000000000e5 +918 4 8 12 -0.16384000000000000000e5 +919 1 1 32 -0.32768000000000000000e5 +919 1 2 33 -0.32768000000000000000e5 +919 1 3 18 0.32768000000000000000e5 +919 1 3 34 -0.65536000000000000000e5 +919 1 4 27 0.32768000000000000000e5 +919 1 9 16 -0.65536000000000000000e5 +919 1 16 31 0.13107200000000000000e6 +919 1 20 27 -0.65536000000000000000e5 +919 2 3 17 0.32768000000000000000e5 +919 2 6 12 -0.65536000000000000000e5 +919 2 11 17 -0.32768000000000000000e5 +919 3 2 26 0.32768000000000000000e5 +919 3 3 16 0.32768000000000000000e5 +919 3 4 17 0.32768000000000000000e5 +919 4 1 13 0.32768000000000000000e5 +919 4 2 14 0.65536000000000000000e5 +919 4 5 17 0.65536000000000000000e5 +920 1 2 33 0.32768000000000000000e5 +920 1 3 18 -0.32768000000000000000e5 +920 1 9 16 0.65536000000000000000e5 +920 1 20 27 -0.65536000000000000000e5 +920 3 1 30 -0.65536000000000000000e5 +920 3 2 27 0.32768000000000000000e5 +920 3 3 16 -0.32768000000000000000e5 +920 3 4 17 -0.32768000000000000000e5 +920 4 1 13 -0.32768000000000000000e5 +921 1 2 33 -0.32768000000000000000e5 +921 1 3 34 0.65536000000000000000e5 +921 1 4 27 -0.32768000000000000000e5 +921 1 4 35 -0.32768000000000000000e5 +921 2 12 18 -0.32768000000000000000e5 +921 3 2 28 0.32768000000000000000e5 +921 3 3 32 0.32768000000000000000e5 +921 3 4 33 0.32768000000000000000e5 +921 3 17 30 -0.65536000000000000000e5 +921 4 13 17 0.32768000000000000000e5 +922 3 1 30 -0.32768000000000000000e5 +922 3 2 29 0.32768000000000000000e5 +923 1 3 34 0.32768000000000000000e5 +923 1 5 20 -0.32768000000000000000e5 +923 3 2 30 0.32768000000000000000e5 +923 3 6 19 0.32768000000000000000e5 +924 1 2 33 -0.32768000000000000000e5 +924 1 17 32 0.32768000000000000000e5 +924 3 2 32 0.32768000000000000000e5 +925 3 2 33 0.32768000000000000000e5 +925 3 3 32 -0.32768000000000000000e5 +926 1 3 34 -0.32768000000000000000e5 +926 1 20 35 0.32768000000000000000e5 +926 3 2 34 0.32768000000000000000e5 +926 3 6 35 0.32768000000000000000e5 +927 1 2 33 0.32768000000000000000e5 +927 1 3 34 -0.65536000000000000000e5 +927 1 4 35 0.32768000000000000000e5 +927 1 26 33 0.32768000000000000000e5 +927 2 12 18 0.32768000000000000000e5 +927 3 2 35 0.32768000000000000000e5 +927 3 4 33 -0.32768000000000000000e5 +927 3 17 30 0.65536000000000000000e5 +927 4 13 17 -0.32768000000000000000e5 +928 1 2 5 -0.16384000000000000000e5 +928 1 3 18 0.16384000000000000000e5 +928 3 3 3 0.32768000000000000000e5 +929 1 2 5 0.32768000000000000000e5 +929 1 2 9 -0.65536000000000000000e5 +929 1 3 18 -0.32768000000000000000e5 +929 1 9 16 0.65536000000000000000e5 +929 2 2 4 0.32768000000000000000e5 +929 2 3 17 -0.32768000000000000000e5 +929 3 2 3 0.32768000000000000000e5 +929 3 3 4 0.32768000000000000000e5 +929 4 1 13 -0.32768000000000000000e5 +930 1 2 9 0.13107200000000000000e6 +930 1 4 11 0.26214400000000000000e6 +930 1 5 12 0.13107200000000000000e6 +930 1 7 22 -0.13107200000000000000e6 +930 1 8 23 -0.26214400000000000000e6 +930 1 9 16 -0.13107200000000000000e6 +930 1 11 26 0.13107200000000000000e6 +930 1 12 19 -0.13107200000000000000e6 +930 1 12 27 0.13107200000000000000e6 +930 2 2 4 -0.32768000000000000000e5 +930 2 3 9 0.13107200000000000000e6 +930 2 3 17 0.32768000000000000000e5 +930 3 1 14 0.26214400000000000000e6 +930 3 2 3 -0.32768000000000000000e5 +930 3 2 7 0.65536000000000000000e5 +930 3 2 15 -0.52428800000000000000e6 +930 3 3 5 0.32768000000000000000e5 +930 3 5 10 0.26214400000000000000e6 +930 3 7 20 0.13107200000000000000e6 +930 3 8 21 0.13107200000000000000e6 +930 4 1 13 0.32768000000000000000e5 +930 4 2 6 0.65536000000000000000e5 +930 4 3 3 0.65536000000000000000e5 +930 4 4 8 0.13107200000000000000e6 +930 4 5 9 0.26214400000000000000e6 +931 3 2 7 -0.32768000000000000000e5 +931 3 3 6 0.32768000000000000000e5 +932 1 2 9 -0.32768000000000000000e5 +932 1 9 16 0.32768000000000000000e5 +932 3 3 7 0.32768000000000000000e5 +933 1 2 9 0.32768000000000000000e5 +933 1 4 11 0.13107200000000000000e6 +933 1 5 12 0.65536000000000000000e5 +933 1 7 22 -0.65536000000000000000e5 +933 1 8 23 -0.13107200000000000000e6 +933 1 9 16 -0.32768000000000000000e5 +933 1 11 26 0.65536000000000000000e5 +933 1 12 19 -0.65536000000000000000e5 +933 1 12 27 0.65536000000000000000e5 +933 2 3 9 0.65536000000000000000e5 +933 3 1 14 0.13107200000000000000e6 +933 3 2 7 0.32768000000000000000e5 +933 3 2 15 -0.26214400000000000000e6 +933 3 3 8 0.32768000000000000000e5 +933 3 5 10 0.13107200000000000000e6 +933 3 7 20 0.65536000000000000000e5 +933 3 8 21 0.65536000000000000000e5 +933 4 2 6 0.32768000000000000000e5 +933 4 4 8 0.65536000000000000000e5 +933 4 5 9 0.13107200000000000000e6 +934 1 2 9 -0.32768000000000000000e5 +934 1 4 11 -0.13107200000000000000e6 +934 1 5 12 -0.65536000000000000000e5 +934 1 7 22 0.65536000000000000000e5 +934 1 8 23 0.13107200000000000000e6 +934 1 9 16 0.32768000000000000000e5 +934 1 11 26 -0.65536000000000000000e5 +934 1 12 19 0.65536000000000000000e5 +934 1 12 27 -0.65536000000000000000e5 +934 2 3 9 -0.65536000000000000000e5 +934 3 1 14 -0.13107200000000000000e6 +934 3 2 7 -0.32768000000000000000e5 +934 3 2 15 0.26214400000000000000e6 +934 3 3 9 0.32768000000000000000e5 +934 3 4 9 0.32768000000000000000e5 +934 3 5 10 -0.19660800000000000000e6 +934 3 7 20 -0.65536000000000000000e5 +934 3 8 21 -0.65536000000000000000e5 +934 4 2 6 -0.32768000000000000000e5 +934 4 3 7 0.32768000000000000000e5 +934 4 4 8 -0.65536000000000000000e5 +934 4 5 9 -0.13107200000000000000e6 +935 1 4 11 0.65536000000000000000e5 +935 1 5 12 0.32768000000000000000e5 +935 1 7 22 -0.32768000000000000000e5 +935 1 8 23 -0.65536000000000000000e5 +935 1 11 26 0.32768000000000000000e5 +935 1 12 19 -0.32768000000000000000e5 +935 1 12 27 0.32768000000000000000e5 +935 2 3 9 0.32768000000000000000e5 +935 3 1 14 0.65536000000000000000e5 +935 3 2 15 -0.13107200000000000000e6 +935 3 3 10 0.32768000000000000000e5 +935 3 5 10 0.65536000000000000000e5 +935 3 7 20 0.32768000000000000000e5 +935 3 8 21 0.32768000000000000000e5 +935 4 4 8 0.32768000000000000000e5 +935 4 5 9 0.65536000000000000000e5 +936 1 4 11 -0.32768000000000000000e5 +936 1 7 22 0.32768000000000000000e5 +936 3 3 11 0.32768000000000000000e5 +937 3 3 12 0.32768000000000000000e5 +937 3 5 10 -0.32768000000000000000e5 +938 1 4 11 0.16384000000000000000e5 +938 1 5 12 0.16384000000000000000e5 +938 1 7 22 -0.16384000000000000000e5 +938 1 12 19 -0.16384000000000000000e5 +938 3 1 14 0.32768000000000000000e5 +938 3 2 15 -0.65536000000000000000e5 +938 3 3 13 0.32768000000000000000e5 +938 3 5 10 0.16384000000000000000e5 +938 4 4 8 0.16384000000000000000e5 +938 4 5 9 0.32768000000000000000e5 +939 1 4 11 -0.16384000000000000000e5 +939 1 5 12 -0.16384000000000000000e5 +939 1 7 22 0.16384000000000000000e5 +939 1 12 19 0.16384000000000000000e5 +939 3 3 14 0.32768000000000000000e5 +939 3 5 10 -0.16384000000000000000e5 +939 4 4 8 -0.16384000000000000000e5 +940 3 3 15 0.32768000000000000000e5 +940 3 8 13 -0.32768000000000000000e5 +941 1 9 16 -0.65536000000000000000e5 +941 1 20 27 0.65536000000000000000e5 +941 3 1 30 0.65536000000000000000e5 +941 3 3 16 0.32768000000000000000e5 +941 3 3 17 0.32768000000000000000e5 +941 3 4 17 0.32768000000000000000e5 +941 4 1 13 0.32768000000000000000e5 +942 3 3 18 0.32768000000000000000e5 +942 3 4 17 -0.32768000000000000000e5 +943 1 4 19 -0.32768000000000000000e5 +943 1 4 35 0.32768000000000000000e5 +943 3 3 19 0.32768000000000000000e5 +943 3 3 32 -0.32768000000000000000e5 +943 3 4 33 -0.32768000000000000000e5 +943 3 5 26 0.32768000000000000000e5 +943 3 17 30 0.65536000000000000000e5 +943 4 13 17 -0.32768000000000000000e5 +944 1 9 16 -0.32768000000000000000e5 +944 1 20 27 0.32768000000000000000e5 +944 3 1 30 0.32768000000000000000e5 +944 3 3 20 0.32768000000000000000e5 +945 3 3 21 0.32768000000000000000e5 +945 3 6 19 -0.32768000000000000000e5 +946 1 7 22 -0.65536000000000000000e5 +946 1 9 16 0.32768000000000000000e5 +946 1 17 24 0.65536000000000000000e5 +946 1 20 27 -0.32768000000000000000e5 +946 3 1 30 -0.32768000000000000000e5 +946 3 3 22 0.32768000000000000000e5 +946 3 6 19 0.32768000000000000000e5 +946 4 7 11 0.32768000000000000000e5 +947 1 7 22 -0.32768000000000000000e5 +947 1 17 24 0.32768000000000000000e5 +947 3 3 23 0.32768000000000000000e5 +948 3 3 24 0.32768000000000000000e5 +948 3 8 21 -0.32768000000000000000e5 +949 3 3 25 0.32768000000000000000e5 +949 3 13 18 -0.32768000000000000000e5 +950 1 2 33 0.32768000000000000000e5 +950 1 3 18 -0.32768000000000000000e5 +950 1 9 16 0.65536000000000000000e5 +950 1 20 27 -0.65536000000000000000e5 +950 3 1 30 -0.65536000000000000000e5 +950 3 3 16 -0.32768000000000000000e5 +950 3 3 26 0.32768000000000000000e5 +950 3 4 17 -0.32768000000000000000e5 +950 4 1 13 -0.32768000000000000000e5 +951 1 2 33 -0.32768000000000000000e5 +951 1 3 34 0.65536000000000000000e5 +951 1 4 27 -0.32768000000000000000e5 +951 1 4 35 -0.32768000000000000000e5 +951 2 12 18 -0.32768000000000000000e5 +951 3 3 27 0.32768000000000000000e5 +951 3 3 32 0.32768000000000000000e5 +951 3 4 33 0.32768000000000000000e5 +951 3 17 30 -0.65536000000000000000e5 +951 4 13 17 0.32768000000000000000e5 +952 3 3 28 0.32768000000000000000e5 +952 3 5 26 -0.32768000000000000000e5 +953 1 3 34 0.32768000000000000000e5 +953 1 5 20 -0.32768000000000000000e5 +953 3 3 29 0.32768000000000000000e5 +953 3 6 19 0.32768000000000000000e5 +954 3 3 30 0.32768000000000000000e5 +954 3 17 22 -0.32768000000000000000e5 +955 3 3 31 0.32768000000000000000e5 +955 3 18 23 -0.32768000000000000000e5 +956 3 3 32 0.32768000000000000000e5 +956 3 3 33 0.32768000000000000000e5 +956 3 4 33 0.32768000000000000000e5 +956 3 17 30 -0.65536000000000000000e5 +956 4 13 17 0.32768000000000000000e5 +957 3 3 34 0.32768000000000000000e5 +957 3 17 30 -0.32768000000000000000e5 +958 1 4 27 0.32768000000000000000e5 +958 1 26 33 -0.32768000000000000000e5 +958 2 4 18 0.32768000000000000000e5 +958 2 18 20 -0.32768000000000000000e5 +958 3 3 32 -0.32768000000000000000e5 +958 3 3 35 0.32768000000000000000e5 +958 3 5 26 0.32768000000000000000e5 +958 3 17 22 -0.65536000000000000000e5 +958 3 18 19 0.32768000000000000000e5 +958 3 19 32 0.32768000000000000000e5 +958 3 20 33 -0.65536000000000000000e5 +958 4 13 17 -0.32768000000000000000e5 +959 1 2 9 0.65536000000000000000e5 +959 1 4 11 0.13107200000000000000e6 +959 1 5 12 0.65536000000000000000e5 +959 1 7 22 -0.65536000000000000000e5 +959 1 8 23 -0.13107200000000000000e6 +959 1 9 16 -0.65536000000000000000e5 +959 1 11 26 0.65536000000000000000e5 +959 1 12 19 -0.65536000000000000000e5 +959 1 12 27 0.65536000000000000000e5 +959 2 2 4 -0.16384000000000000000e5 +959 2 3 9 0.65536000000000000000e5 +959 2 3 17 0.16384000000000000000e5 +959 3 1 14 0.13107200000000000000e6 +959 3 2 3 -0.16384000000000000000e5 +959 3 2 7 0.32768000000000000000e5 +959 3 2 15 -0.26214400000000000000e6 +959 3 4 4 0.32768000000000000000e5 +959 3 5 10 0.13107200000000000000e6 +959 3 7 20 0.65536000000000000000e5 +959 3 8 21 0.65536000000000000000e5 +959 4 1 13 0.16384000000000000000e5 +959 4 2 6 0.32768000000000000000e5 +959 4 3 3 0.32768000000000000000e5 +959 4 4 8 0.65536000000000000000e5 +959 4 5 9 0.13107200000000000000e6 +960 1 2 9 -0.32768000000000000000e5 +960 1 9 16 0.32768000000000000000e5 +960 3 4 6 0.32768000000000000000e5 +961 1 2 9 0.32768000000000000000e5 +961 1 4 11 0.13107200000000000000e6 +961 1 5 12 0.65536000000000000000e5 +961 1 7 22 -0.65536000000000000000e5 +961 1 8 23 -0.13107200000000000000e6 +961 1 9 16 -0.32768000000000000000e5 +961 1 11 26 0.65536000000000000000e5 +961 1 12 19 -0.65536000000000000000e5 +961 1 12 27 0.65536000000000000000e5 +961 2 3 9 0.65536000000000000000e5 +961 3 1 14 0.13107200000000000000e6 +961 3 2 7 0.32768000000000000000e5 +961 3 2 15 -0.26214400000000000000e6 +961 3 4 7 0.32768000000000000000e5 +961 3 5 10 0.13107200000000000000e6 +961 3 7 20 0.65536000000000000000e5 +961 3 8 21 0.65536000000000000000e5 +961 4 2 6 0.32768000000000000000e5 +961 4 4 8 0.65536000000000000000e5 +961 4 5 9 0.13107200000000000000e6 +962 1 2 9 -0.32768000000000000000e5 +962 1 4 11 -0.13107200000000000000e6 +962 1 5 12 -0.65536000000000000000e5 +962 1 7 22 0.65536000000000000000e5 +962 1 8 23 0.13107200000000000000e6 +962 1 9 16 0.32768000000000000000e5 +962 1 11 26 -0.65536000000000000000e5 +962 1 12 19 0.65536000000000000000e5 +962 1 12 27 -0.65536000000000000000e5 +962 2 3 9 -0.65536000000000000000e5 +962 3 1 14 -0.13107200000000000000e6 +962 3 2 7 -0.32768000000000000000e5 +962 3 2 15 0.26214400000000000000e6 +962 3 4 8 0.32768000000000000000e5 +962 3 4 9 0.32768000000000000000e5 +962 3 5 10 -0.19660800000000000000e6 +962 3 7 20 -0.65536000000000000000e5 +962 3 8 21 -0.65536000000000000000e5 +962 4 2 6 -0.32768000000000000000e5 +962 4 3 7 0.32768000000000000000e5 +962 4 4 8 -0.65536000000000000000e5 +962 4 5 9 -0.13107200000000000000e6 +963 1 4 11 -0.32768000000000000000e5 +963 1 7 22 0.32768000000000000000e5 +963 3 4 10 0.32768000000000000000e5 +964 3 4 11 0.32768000000000000000e5 +964 3 5 10 -0.32768000000000000000e5 +965 1 5 12 -0.32768000000000000000e5 +965 1 12 19 0.32768000000000000000e5 +965 3 4 12 0.32768000000000000000e5 +966 1 4 11 -0.16384000000000000000e5 +966 1 5 12 -0.16384000000000000000e5 +966 1 7 22 0.16384000000000000000e5 +966 1 12 19 0.16384000000000000000e5 +966 3 4 13 0.32768000000000000000e5 +966 3 5 10 -0.16384000000000000000e5 +966 4 4 8 -0.16384000000000000000e5 +967 1 8 23 0.32768000000000000000e5 +967 1 9 24 0.32768000000000000000e5 +967 1 13 28 0.32768000000000000000e5 +967 1 14 21 -0.65536000000000000000e5 +967 2 4 10 0.32768000000000000000e5 +967 3 1 14 -0.32768000000000000000e5 +967 3 2 15 0.65536000000000000000e5 +967 3 4 14 0.32768000000000000000e5 +967 3 8 13 -0.65536000000000000000e5 +967 3 13 18 0.32768000000000000000e5 +967 4 5 9 -0.32768000000000000000e5 +968 3 4 15 0.32768000000000000000e5 +968 3 11 12 -0.32768000000000000000e5 +969 1 9 16 -0.65536000000000000000e5 +969 1 20 27 0.65536000000000000000e5 +969 3 1 30 0.65536000000000000000e5 +969 3 3 16 0.32768000000000000000e5 +969 3 4 16 0.32768000000000000000e5 +969 3 4 17 0.32768000000000000000e5 +969 4 1 13 0.32768000000000000000e5 +970 1 4 19 -0.32768000000000000000e5 +970 1 4 35 0.32768000000000000000e5 +970 3 3 32 -0.32768000000000000000e5 +970 3 4 18 0.32768000000000000000e5 +970 3 4 33 -0.32768000000000000000e5 +970 3 5 26 0.32768000000000000000e5 +970 3 17 30 0.65536000000000000000e5 +970 4 13 17 -0.32768000000000000000e5 +971 3 4 19 0.32768000000000000000e5 +971 3 5 18 -0.32768000000000000000e5 +972 3 4 20 0.32768000000000000000e5 +972 3 6 19 -0.32768000000000000000e5 +973 1 7 22 -0.65536000000000000000e5 +973 1 9 16 0.32768000000000000000e5 +973 1 17 24 0.65536000000000000000e5 +973 1 20 27 -0.32768000000000000000e5 +973 3 1 30 -0.32768000000000000000e5 +973 3 4 21 0.32768000000000000000e5 +973 3 6 19 0.32768000000000000000e5 +973 4 7 11 0.32768000000000000000e5 +974 1 7 22 0.65536000000000000000e5 +974 1 9 16 -0.32768000000000000000e5 +974 1 17 24 -0.65536000000000000000e5 +974 1 20 27 0.32768000000000000000e5 +974 3 1 30 0.32768000000000000000e5 +974 3 4 22 0.32768000000000000000e5 +974 3 8 21 -0.65536000000000000000e5 +974 4 3 15 0.32768000000000000000e5 +974 4 7 11 -0.32768000000000000000e5 +975 3 4 23 0.32768000000000000000e5 +975 3 8 21 -0.32768000000000000000e5 +976 3 4 24 0.32768000000000000000e5 +976 3 4 25 -0.65536000000000000000e5 +976 3 8 21 0.32768000000000000000e5 +976 3 9 22 0.32768000000000000000e5 +976 4 4 16 0.32768000000000000000e5 +977 1 2 33 -0.32768000000000000000e5 +977 1 3 34 0.65536000000000000000e5 +977 1 4 27 -0.32768000000000000000e5 +977 1 4 35 -0.32768000000000000000e5 +977 2 12 18 -0.32768000000000000000e5 +977 3 3 32 0.32768000000000000000e5 +977 3 4 26 0.32768000000000000000e5 +977 3 4 33 0.32768000000000000000e5 +977 3 17 30 -0.65536000000000000000e5 +977 4 13 17 0.32768000000000000000e5 +978 3 4 27 0.32768000000000000000e5 +978 3 5 26 -0.32768000000000000000e5 +979 3 4 28 0.32768000000000000000e5 +979 3 18 19 -0.32768000000000000000e5 +980 3 4 29 0.32768000000000000000e5 +980 3 17 22 -0.32768000000000000000e5 +981 1 3 34 -0.32768000000000000000e5 +981 1 5 20 0.32768000000000000000e5 +981 3 4 30 0.32768000000000000000e5 +981 3 6 19 -0.32768000000000000000e5 +981 3 17 22 0.32768000000000000000e5 +981 3 18 23 -0.65536000000000000000e5 +981 4 6 18 0.32768000000000000000e5 +982 1 3 34 0.32768000000000000000e5 +982 1 13 28 -0.65536000000000000000e5 +982 1 20 35 -0.32768000000000000000e5 +982 1 25 32 0.65536000000000000000e5 +982 2 6 20 0.16384000000000000000e5 +982 2 14 20 -0.16384000000000000000e5 +982 3 2 31 0.32768000000000000000e5 +982 3 4 31 0.32768000000000000000e5 +982 3 6 35 -0.32768000000000000000e5 +982 3 16 29 0.16384000000000000000e5 +982 3 17 30 0.32768000000000000000e5 +982 3 18 23 0.32768000000000000000e5 +982 3 18 31 0.32768000000000000000e5 +982 3 22 27 0.16384000000000000000e5 +982 4 8 20 0.32768000000000000000e5 +982 4 12 16 0.32768000000000000000e5 +982 4 14 18 0.16384000000000000000e5 +983 3 3 32 0.32768000000000000000e5 +983 3 4 32 0.32768000000000000000e5 +983 3 4 33 0.32768000000000000000e5 +983 3 17 30 -0.65536000000000000000e5 +983 4 13 17 0.32768000000000000000e5 +984 3 4 34 0.32768000000000000000e5 +984 3 22 27 -0.32768000000000000000e5 +985 3 4 35 0.32768000000000000000e5 +985 3 19 32 -0.32768000000000000000e5 +986 1 2 9 -0.65536000000000000000e5 +986 1 4 11 -0.13107200000000000000e6 +986 1 5 12 -0.65536000000000000000e5 +986 1 7 22 0.65536000000000000000e5 +986 1 8 23 0.13107200000000000000e6 +986 1 9 16 0.65536000000000000000e5 +986 1 11 26 -0.65536000000000000000e5 +986 1 12 19 0.65536000000000000000e5 +986 1 12 27 -0.65536000000000000000e5 +986 2 2 4 0.16384000000000000000e5 +986 2 3 9 -0.65536000000000000000e5 +986 2 3 17 -0.16384000000000000000e5 +986 3 1 14 -0.13107200000000000000e6 +986 3 2 3 0.16384000000000000000e5 +986 3 2 7 -0.32768000000000000000e5 +986 3 2 15 0.26214400000000000000e6 +986 3 4 5 0.16384000000000000000e5 +986 3 4 9 -0.32768000000000000000e5 +986 3 5 5 0.32768000000000000000e5 +986 3 5 10 -0.13107200000000000000e6 +986 3 7 20 -0.65536000000000000000e5 +986 3 8 21 -0.65536000000000000000e5 +986 4 1 13 -0.16384000000000000000e5 +986 4 2 6 -0.32768000000000000000e5 +986 4 3 3 -0.32768000000000000000e5 +986 4 4 4 0.32768000000000000000e5 +986 4 4 8 -0.65536000000000000000e5 +986 4 5 9 -0.13107200000000000000e6 +987 1 2 9 0.32768000000000000000e5 +987 1 4 11 0.13107200000000000000e6 +987 1 5 12 0.65536000000000000000e5 +987 1 7 22 -0.65536000000000000000e5 +987 1 8 23 -0.13107200000000000000e6 +987 1 9 16 -0.32768000000000000000e5 +987 1 11 26 0.65536000000000000000e5 +987 1 12 19 -0.65536000000000000000e5 +987 1 12 27 0.65536000000000000000e5 +987 2 3 9 0.65536000000000000000e5 +987 3 1 14 0.13107200000000000000e6 +987 3 2 7 0.32768000000000000000e5 +987 3 2 15 -0.26214400000000000000e6 +987 3 5 6 0.32768000000000000000e5 +987 3 5 10 0.13107200000000000000e6 +987 3 7 20 0.65536000000000000000e5 +987 3 8 21 0.65536000000000000000e5 +987 4 2 6 0.32768000000000000000e5 +987 4 4 8 0.65536000000000000000e5 +987 4 5 9 0.13107200000000000000e6 +988 1 2 9 -0.32768000000000000000e5 +988 1 4 11 -0.13107200000000000000e6 +988 1 5 12 -0.65536000000000000000e5 +988 1 7 22 0.65536000000000000000e5 +988 1 8 23 0.13107200000000000000e6 +988 1 9 16 0.32768000000000000000e5 +988 1 11 26 -0.65536000000000000000e5 +988 1 12 19 0.65536000000000000000e5 +988 1 12 27 -0.65536000000000000000e5 +988 2 3 9 -0.65536000000000000000e5 +988 3 1 14 -0.13107200000000000000e6 +988 3 2 7 -0.32768000000000000000e5 +988 3 2 15 0.26214400000000000000e6 +988 3 4 9 0.32768000000000000000e5 +988 3 5 7 0.32768000000000000000e5 +988 3 5 10 -0.19660800000000000000e6 +988 3 7 20 -0.65536000000000000000e5 +988 3 8 21 -0.65536000000000000000e5 +988 4 2 6 -0.32768000000000000000e5 +988 4 3 7 0.32768000000000000000e5 +988 4 4 8 -0.65536000000000000000e5 +988 4 5 9 -0.13107200000000000000e6 +989 3 4 9 -0.32768000000000000000e5 +989 3 5 8 0.32768000000000000000e5 +990 1 2 9 0.32768000000000000000e5 +990 1 4 11 0.13107200000000000000e6 +990 1 7 22 -0.65536000000000000000e5 +990 1 8 23 -0.13107200000000000000e6 +990 1 9 16 -0.32768000000000000000e5 +990 1 11 26 0.65536000000000000000e5 +990 1 12 27 0.65536000000000000000e5 +990 2 3 9 0.65536000000000000000e5 +990 3 1 14 0.13107200000000000000e6 +990 3 2 7 0.32768000000000000000e5 +990 3 2 15 -0.26214400000000000000e6 +990 3 5 9 0.32768000000000000000e5 +990 3 5 10 0.19660800000000000000e6 +990 3 7 20 0.65536000000000000000e5 +990 3 8 21 0.65536000000000000000e5 +990 4 2 6 0.32768000000000000000e5 +990 4 3 7 -0.32768000000000000000e5 +990 4 4 7 0.32768000000000000000e5 +990 4 4 8 0.65536000000000000000e5 +990 4 5 9 0.13107200000000000000e6 +991 1 5 12 -0.32768000000000000000e5 +991 1 12 19 0.32768000000000000000e5 +991 3 5 11 0.32768000000000000000e5 +992 1 5 12 0.32768000000000000000e5 +992 1 8 23 0.65536000000000000000e5 +992 1 9 24 0.65536000000000000000e5 +992 1 12 19 -0.32768000000000000000e5 +992 1 13 28 0.65536000000000000000e5 +992 1 14 21 -0.13107200000000000000e6 +992 2 4 10 0.65536000000000000000e5 +992 3 1 14 -0.65536000000000000000e5 +992 3 2 15 0.13107200000000000000e6 +992 3 5 10 0.32768000000000000000e5 +992 3 5 12 0.32768000000000000000e5 +992 3 8 13 -0.13107200000000000000e6 +992 3 13 18 0.65536000000000000000e5 +992 4 5 9 -0.65536000000000000000e5 +992 4 7 7 0.65536000000000000000e5 +993 1 8 23 0.32768000000000000000e5 +993 1 9 24 0.32768000000000000000e5 +993 1 13 28 0.32768000000000000000e5 +993 1 14 21 -0.65536000000000000000e5 +993 2 4 10 0.32768000000000000000e5 +993 3 1 14 -0.32768000000000000000e5 +993 3 2 15 0.65536000000000000000e5 +993 3 5 13 0.32768000000000000000e5 +993 3 8 13 -0.65536000000000000000e5 +993 3 13 18 0.32768000000000000000e5 +993 4 5 9 -0.32768000000000000000e5 +994 3 5 15 0.32768000000000000000e5 +994 3 9 14 -0.32768000000000000000e5 +995 3 4 17 -0.32768000000000000000e5 +995 3 5 16 0.32768000000000000000e5 +996 1 4 19 -0.32768000000000000000e5 +996 1 4 35 0.32768000000000000000e5 +996 3 3 32 -0.32768000000000000000e5 +996 3 4 33 -0.32768000000000000000e5 +996 3 5 17 0.32768000000000000000e5 +996 3 5 26 0.32768000000000000000e5 +996 3 17 30 0.65536000000000000000e5 +996 4 13 17 -0.32768000000000000000e5 +997 1 7 22 -0.65536000000000000000e5 +997 1 9 16 0.32768000000000000000e5 +997 1 17 24 0.65536000000000000000e5 +997 1 20 27 -0.32768000000000000000e5 +997 3 1 30 -0.32768000000000000000e5 +997 3 5 20 0.32768000000000000000e5 +997 3 6 19 0.32768000000000000000e5 +997 4 7 11 0.32768000000000000000e5 +998 1 7 22 0.65536000000000000000e5 +998 1 9 16 -0.32768000000000000000e5 +998 1 17 24 -0.65536000000000000000e5 +998 1 20 27 0.32768000000000000000e5 +998 3 1 30 0.32768000000000000000e5 +998 3 5 21 0.32768000000000000000e5 +998 3 8 21 -0.65536000000000000000e5 +998 4 3 15 0.32768000000000000000e5 +998 4 7 11 -0.32768000000000000000e5 +999 3 4 25 -0.65536000000000000000e5 +999 3 5 23 0.32768000000000000000e5 +999 3 8 21 0.32768000000000000000e5 +999 3 9 22 0.32768000000000000000e5 +999 4 4 16 0.32768000000000000000e5 +1000 3 5 24 0.32768000000000000000e5 +1000 3 9 22 -0.32768000000000000000e5 +1001 3 5 25 0.32768000000000000000e5 +1001 3 14 19 -0.32768000000000000000e5 +1002 3 5 27 0.32768000000000000000e5 +1002 3 18 19 -0.32768000000000000000e5 +1003 1 3 34 -0.65536000000000000000e5 +1003 1 5 20 0.65536000000000000000e5 +1003 3 5 26 0.32768000000000000000e5 +1003 3 5 28 0.32768000000000000000e5 +1003 3 6 19 -0.65536000000000000000e5 +1003 3 17 22 0.65536000000000000000e5 +1003 3 18 19 0.32768000000000000000e5 +1003 3 18 23 -0.13107200000000000000e6 +1003 4 6 18 0.65536000000000000000e5 +1003 4 13 13 0.65536000000000000000e5 +1004 1 3 34 -0.32768000000000000000e5 +1004 1 5 20 0.32768000000000000000e5 +1004 3 5 29 0.32768000000000000000e5 +1004 3 6 19 -0.32768000000000000000e5 +1004 3 17 22 0.32768000000000000000e5 +1004 3 18 23 -0.65536000000000000000e5 +1004 4 6 18 0.32768000000000000000e5 +1005 1 3 34 -0.32768000000000000000e5 +1005 1 13 28 0.65536000000000000000e5 +1005 1 20 35 0.32768000000000000000e5 +1005 1 25 32 -0.65536000000000000000e5 +1005 2 6 20 -0.16384000000000000000e5 +1005 2 14 20 0.16384000000000000000e5 +1005 3 2 31 -0.32768000000000000000e5 +1005 3 5 31 0.32768000000000000000e5 +1005 3 6 35 0.32768000000000000000e5 +1005 3 14 27 -0.65536000000000000000e5 +1005 3 16 29 -0.16384000000000000000e5 +1005 3 17 30 -0.32768000000000000000e5 +1005 3 18 31 -0.32768000000000000000e5 +1005 3 22 27 -0.16384000000000000000e5 +1005 4 7 19 0.32768000000000000000e5 +1005 4 8 20 -0.32768000000000000000e5 +1005 4 12 16 -0.32768000000000000000e5 +1005 4 14 18 -0.16384000000000000000e5 +1006 3 4 33 -0.32768000000000000000e5 +1006 3 5 32 0.32768000000000000000e5 +1007 3 3 32 -0.32768000000000000000e5 +1007 3 5 33 0.32768000000000000000e5 +1007 3 17 30 0.65536000000000000000e5 +1007 3 22 27 -0.65536000000000000000e5 +1007 4 4 20 0.32768000000000000000e5 +1007 4 13 17 -0.32768000000000000000e5 +1008 1 4 27 -0.32768000000000000000e5 +1008 1 19 34 -0.65536000000000000000e5 +1008 1 26 33 0.32768000000000000000e5 +1008 1 30 33 0.65536000000000000000e5 +1008 2 4 18 -0.32768000000000000000e5 +1008 2 18 20 0.32768000000000000000e5 +1008 3 3 32 0.32768000000000000000e5 +1008 3 5 26 -0.32768000000000000000e5 +1008 3 5 35 0.32768000000000000000e5 +1008 3 17 22 0.65536000000000000000e5 +1008 3 18 19 -0.32768000000000000000e5 +1008 3 20 33 0.65536000000000000000e5 +1008 4 13 17 0.32768000000000000000e5 +1008 4 18 18 0.65536000000000000000e5 +1009 1 1 8 -0.81920000000000000000e4 +1009 1 5 20 0.81920000000000000000e4 +1009 1 6 21 0.16384000000000000000e5 +1009 1 11 26 -0.16384000000000000000e5 +1009 2 1 15 -0.81920000000000000000e4 +1009 2 6 12 0.81920000000000000000e4 +1009 3 1 6 -0.81920000000000000000e4 +1009 3 2 7 -0.81920000000000000000e4 +1009 3 6 6 0.32768000000000000000e5 +1009 3 7 20 -0.16384000000000000000e5 +1009 4 1 5 -0.81920000000000000000e4 +1010 1 1 8 -0.16384000000000000000e5 +1010 1 2 9 -0.16384000000000000000e5 +1010 1 5 20 0.16384000000000000000e5 +1010 1 6 21 0.32768000000000000000e5 +1010 1 9 16 0.16384000000000000000e5 +1010 1 11 26 -0.32768000000000000000e5 +1010 2 1 7 -0.16384000000000000000e5 +1010 2 6 12 0.16384000000000000000e5 +1010 3 2 7 -0.16384000000000000000e5 +1010 3 6 7 0.32768000000000000000e5 +1010 3 7 20 -0.32768000000000000000e5 +1011 1 4 11 0.65536000000000000000e5 +1011 1 5 12 0.32768000000000000000e5 +1011 1 7 22 -0.32768000000000000000e5 +1011 1 8 23 -0.65536000000000000000e5 +1011 1 11 26 0.32768000000000000000e5 +1011 1 12 19 -0.32768000000000000000e5 +1011 1 12 27 0.32768000000000000000e5 +1011 2 3 9 0.32768000000000000000e5 +1011 3 1 14 0.65536000000000000000e5 +1011 3 2 15 -0.13107200000000000000e6 +1011 3 5 10 0.65536000000000000000e5 +1011 3 6 8 0.32768000000000000000e5 +1011 3 7 20 0.32768000000000000000e5 +1011 3 8 21 0.32768000000000000000e5 +1011 4 4 8 0.32768000000000000000e5 +1011 4 5 9 0.65536000000000000000e5 +1012 1 4 11 -0.32768000000000000000e5 +1012 1 7 22 0.32768000000000000000e5 +1012 3 6 9 0.32768000000000000000e5 +1013 1 6 21 -0.16384000000000000000e5 +1013 1 7 10 -0.32768000000000000000e5 +1013 1 7 22 -0.16384000000000000000e5 +1013 1 8 23 -0.32768000000000000000e5 +1013 1 11 26 -0.16384000000000000000e5 +1013 1 13 20 0.65536000000000000000e5 +1013 2 2 16 -0.16384000000000000000e5 +1013 2 8 14 -0.32768000000000000000e5 +1013 3 6 10 0.32768000000000000000e5 +1013 3 7 20 -0.16384000000000000000e5 +1014 3 1 14 -0.32768000000000000000e5 +1014 3 6 11 0.32768000000000000000e5 +1015 1 4 11 0.16384000000000000000e5 +1015 1 5 12 0.16384000000000000000e5 +1015 1 7 22 -0.16384000000000000000e5 +1015 1 12 19 -0.16384000000000000000e5 +1015 3 1 14 0.32768000000000000000e5 +1015 3 2 15 -0.65536000000000000000e5 +1015 3 5 10 0.16384000000000000000e5 +1015 3 6 12 0.32768000000000000000e5 +1015 4 4 8 0.16384000000000000000e5 +1015 4 5 9 0.32768000000000000000e5 +1016 1 4 11 0.81920000000000000000e4 +1016 1 5 12 0.81920000000000000000e4 +1016 1 6 21 -0.81920000000000000000e4 +1016 1 7 10 -0.16384000000000000000e5 +1016 1 7 22 -0.16384000000000000000e5 +1016 1 8 23 -0.16384000000000000000e5 +1016 1 11 26 -0.81920000000000000000e4 +1016 1 12 19 -0.81920000000000000000e4 +1016 1 13 20 0.32768000000000000000e5 +1016 2 2 16 -0.81920000000000000000e4 +1016 2 6 8 -0.16384000000000000000e5 +1016 3 2 15 -0.32768000000000000000e5 +1016 3 5 10 0.81920000000000000000e4 +1016 3 6 13 0.32768000000000000000e5 +1016 3 7 20 -0.81920000000000000000e4 +1016 4 4 8 0.81920000000000000000e4 +1016 4 5 9 0.16384000000000000000e5 +1017 3 2 15 -0.32768000000000000000e5 +1017 3 6 14 0.32768000000000000000e5 +1018 1 4 11 0.40960000000000000000e4 +1018 1 5 12 0.40960000000000000000e4 +1018 1 6 21 -0.40960000000000000000e4 +1018 1 7 10 -0.81920000000000000000e4 +1018 1 7 22 -0.81920000000000000000e4 +1018 1 8 23 -0.81920000000000000000e4 +1018 1 11 26 -0.40960000000000000000e4 +1018 1 12 19 -0.40960000000000000000e4 +1018 1 13 20 0.16384000000000000000e5 +1018 2 2 16 -0.40960000000000000000e4 +1018 2 6 8 -0.81920000000000000000e4 +1018 3 2 15 -0.32768000000000000000e5 +1018 3 5 10 0.40960000000000000000e4 +1018 3 6 15 0.32768000000000000000e5 +1018 3 7 20 -0.40960000000000000000e4 +1018 3 8 13 -0.16384000000000000000e5 +1018 4 4 8 0.40960000000000000000e4 +1018 4 5 9 0.81920000000000000000e4 +1018 4 8 8 -0.32768000000000000000e5 +1019 1 6 21 -0.65536000000000000000e5 +1019 1 16 23 0.65536000000000000000e5 +1019 2 1 15 0.32768000000000000000e5 +1019 2 1 19 -0.32768000000000000000e5 +1019 3 6 16 0.32768000000000000000e5 +1019 3 6 19 -0.32768000000000000000e5 +1019 3 7 20 0.65536000000000000000e5 +1019 4 2 14 -0.32768000000000000000e5 +1020 1 9 16 0.32768000000000000000e5 +1020 1 20 27 -0.32768000000000000000e5 +1020 3 1 30 -0.32768000000000000000e5 +1020 3 6 17 0.32768000000000000000e5 +1020 3 6 19 0.32768000000000000000e5 +1020 3 7 20 -0.65536000000000000000e5 +1020 4 2 14 0.32768000000000000000e5 +1021 1 9 16 -0.32768000000000000000e5 +1021 1 20 27 0.32768000000000000000e5 +1021 3 1 30 0.32768000000000000000e5 +1021 3 6 18 0.32768000000000000000e5 +1022 1 6 21 -0.32768000000000000000e5 +1022 1 16 23 0.32768000000000000000e5 +1022 3 6 20 0.32768000000000000000e5 +1023 3 6 21 0.32768000000000000000e5 +1023 3 7 20 -0.32768000000000000000e5 +1024 1 7 22 -0.32768000000000000000e5 +1024 1 17 24 0.32768000000000000000e5 +1024 3 6 22 0.32768000000000000000e5 +1025 1 6 21 -0.16384000000000000000e5 +1025 1 7 22 -0.16384000000000000000e5 +1025 1 16 23 0.16384000000000000000e5 +1025 1 17 24 0.16384000000000000000e5 +1025 2 2 16 -0.16384000000000000000e5 +1025 2 5 19 0.16384000000000000000e5 +1025 3 6 23 0.32768000000000000000e5 +1025 3 7 20 -0.16384000000000000000e5 +1026 1 7 22 -0.16384000000000000000e5 +1026 1 17 24 0.16384000000000000000e5 +1026 3 6 24 0.32768000000000000000e5 +1026 3 7 20 -0.16384000000000000000e5 +1026 3 8 21 -0.16384000000000000000e5 +1026 4 8 12 -0.16384000000000000000e5 +1027 3 6 25 0.32768000000000000000e5 +1027 3 10 23 -0.32768000000000000000e5 +1028 1 3 34 -0.32768000000000000000e5 +1028 1 5 20 0.32768000000000000000e5 +1028 1 11 26 -0.65536000000000000000e5 +1028 1 16 31 0.65536000000000000000e5 +1028 3 1 30 0.32768000000000000000e5 +1028 3 6 19 -0.32768000000000000000e5 +1028 3 6 26 0.32768000000000000000e5 +1028 4 5 17 0.32768000000000000000e5 +1029 3 1 30 -0.32768000000000000000e5 +1029 3 6 27 0.32768000000000000000e5 +1030 1 3 34 0.32768000000000000000e5 +1030 1 5 20 -0.32768000000000000000e5 +1030 3 6 19 0.32768000000000000000e5 +1030 3 6 28 0.32768000000000000000e5 +1031 1 11 26 -0.32768000000000000000e5 +1031 1 16 31 0.32768000000000000000e5 +1031 3 6 29 0.32768000000000000000e5 +1032 3 2 31 -0.32768000000000000000e5 +1032 3 6 30 0.32768000000000000000e5 +1033 3 6 31 0.32768000000000000000e5 +1033 3 13 26 -0.32768000000000000000e5 +1034 3 6 32 0.32768000000000000000e5 +1034 3 16 29 -0.32768000000000000000e5 +1035 1 3 34 -0.32768000000000000000e5 +1035 1 20 35 0.32768000000000000000e5 +1035 3 6 33 0.32768000000000000000e5 +1035 3 6 35 0.32768000000000000000e5 +1036 1 3 34 -0.16384000000000000000e5 +1036 1 20 35 0.16384000000000000000e5 +1036 2 6 20 -0.16384000000000000000e5 +1036 2 14 20 0.16384000000000000000e5 +1036 3 6 34 0.32768000000000000000e5 +1036 3 6 35 0.16384000000000000000e5 +1036 3 16 29 -0.16384000000000000000e5 +1036 3 17 30 -0.16384000000000000000e5 +1037 1 4 11 0.32768000000000000000e5 +1037 1 5 12 0.16384000000000000000e5 +1037 1 7 22 -0.16384000000000000000e5 +1037 1 8 23 -0.32768000000000000000e5 +1037 1 11 26 0.16384000000000000000e5 +1037 1 12 19 -0.16384000000000000000e5 +1037 1 12 27 0.16384000000000000000e5 +1037 2 3 9 0.16384000000000000000e5 +1037 3 1 14 0.32768000000000000000e5 +1037 3 2 15 -0.65536000000000000000e5 +1037 3 5 10 0.32768000000000000000e5 +1037 3 7 7 0.32768000000000000000e5 +1037 3 7 20 0.16384000000000000000e5 +1037 3 8 21 0.16384000000000000000e5 +1037 4 4 8 0.16384000000000000000e5 +1037 4 5 9 0.32768000000000000000e5 +1038 1 4 11 -0.32768000000000000000e5 +1038 1 7 22 0.32768000000000000000e5 +1038 3 7 8 0.32768000000000000000e5 +1039 3 5 10 -0.32768000000000000000e5 +1039 3 7 9 0.32768000000000000000e5 +1040 3 1 14 -0.32768000000000000000e5 +1040 3 7 10 0.32768000000000000000e5 +1041 1 4 11 0.16384000000000000000e5 +1041 1 5 12 0.16384000000000000000e5 +1041 1 7 22 -0.16384000000000000000e5 +1041 1 12 19 -0.16384000000000000000e5 +1041 3 1 14 0.32768000000000000000e5 +1041 3 2 15 -0.65536000000000000000e5 +1041 3 5 10 0.16384000000000000000e5 +1041 3 7 11 0.32768000000000000000e5 +1041 4 4 8 0.16384000000000000000e5 +1041 4 5 9 0.32768000000000000000e5 +1042 1 4 11 -0.16384000000000000000e5 +1042 1 5 12 -0.16384000000000000000e5 +1042 1 7 22 0.16384000000000000000e5 +1042 1 12 19 0.16384000000000000000e5 +1042 3 5 10 -0.16384000000000000000e5 +1042 3 7 12 0.32768000000000000000e5 +1042 4 4 8 -0.16384000000000000000e5 +1043 3 2 15 -0.32768000000000000000e5 +1043 3 7 13 0.32768000000000000000e5 +1044 3 7 14 0.32768000000000000000e5 +1044 3 8 13 -0.32768000000000000000e5 +1045 3 2 15 -0.16384000000000000000e5 +1045 3 7 15 0.32768000000000000000e5 +1045 3 8 13 -0.16384000000000000000e5 +1045 3 11 12 -0.16384000000000000000e5 +1045 4 6 10 -0.16384000000000000000e5 +1046 1 9 16 0.32768000000000000000e5 +1046 1 20 27 -0.32768000000000000000e5 +1046 3 1 30 -0.32768000000000000000e5 +1046 3 6 19 0.32768000000000000000e5 +1046 3 7 16 0.32768000000000000000e5 +1046 3 7 20 -0.65536000000000000000e5 +1046 4 2 14 0.32768000000000000000e5 +1047 1 9 16 -0.32768000000000000000e5 +1047 1 20 27 0.32768000000000000000e5 +1047 3 1 30 0.32768000000000000000e5 +1047 3 7 17 0.32768000000000000000e5 +1048 3 6 19 -0.32768000000000000000e5 +1048 3 7 18 0.32768000000000000000e5 +1049 1 7 22 -0.65536000000000000000e5 +1049 1 9 16 0.32768000000000000000e5 +1049 1 17 24 0.65536000000000000000e5 +1049 1 20 27 -0.32768000000000000000e5 +1049 3 1 30 -0.32768000000000000000e5 +1049 3 6 19 0.32768000000000000000e5 +1049 3 7 19 0.32768000000000000000e5 +1049 4 7 11 0.32768000000000000000e5 +1050 1 7 22 -0.32768000000000000000e5 +1050 1 17 24 0.32768000000000000000e5 +1050 3 7 21 0.32768000000000000000e5 +1051 3 7 22 0.32768000000000000000e5 +1051 3 8 21 -0.32768000000000000000e5 +1052 1 7 22 -0.16384000000000000000e5 +1052 1 17 24 0.16384000000000000000e5 +1052 3 7 20 -0.16384000000000000000e5 +1052 3 7 23 0.32768000000000000000e5 +1052 3 8 21 -0.16384000000000000000e5 +1052 4 8 12 -0.16384000000000000000e5 +1053 3 7 24 0.32768000000000000000e5 +1053 3 13 18 -0.32768000000000000000e5 +1054 1 14 21 -0.32768000000000000000e5 +1054 1 14 29 0.32768000000000000000e5 +1054 3 7 25 0.32768000000000000000e5 +1055 3 1 30 -0.32768000000000000000e5 +1055 3 7 26 0.32768000000000000000e5 +1056 1 3 34 0.32768000000000000000e5 +1056 1 5 20 -0.32768000000000000000e5 +1056 3 6 19 0.32768000000000000000e5 +1056 3 7 27 0.32768000000000000000e5 +1057 3 7 28 0.32768000000000000000e5 +1057 3 17 22 -0.32768000000000000000e5 +1058 3 2 31 -0.32768000000000000000e5 +1058 3 7 29 0.32768000000000000000e5 +1059 3 7 30 0.32768000000000000000e5 +1059 3 18 23 -0.32768000000000000000e5 +1060 1 3 34 0.16384000000000000000e5 +1060 1 13 28 -0.32768000000000000000e5 +1060 1 20 35 -0.16384000000000000000e5 +1060 1 25 32 0.32768000000000000000e5 +1060 2 6 20 0.81920000000000000000e4 +1060 2 14 20 -0.81920000000000000000e4 +1060 3 6 35 -0.16384000000000000000e5 +1060 3 7 31 0.32768000000000000000e5 +1060 3 16 29 0.81920000000000000000e4 +1060 3 17 30 0.16384000000000000000e5 +1060 3 18 31 0.16384000000000000000e5 +1060 3 22 27 0.81920000000000000000e4 +1060 4 8 20 0.16384000000000000000e5 +1060 4 14 18 0.81920000000000000000e4 +1061 1 3 34 -0.32768000000000000000e5 +1061 1 20 35 0.32768000000000000000e5 +1061 3 6 35 0.32768000000000000000e5 +1061 3 7 32 0.32768000000000000000e5 +1062 3 7 33 0.32768000000000000000e5 +1062 3 17 30 -0.32768000000000000000e5 +1063 1 3 34 -0.16384000000000000000e5 +1063 1 20 35 0.16384000000000000000e5 +1063 3 6 35 0.16384000000000000000e5 +1063 3 7 34 0.32768000000000000000e5 +1063 3 17 30 -0.16384000000000000000e5 +1063 3 22 27 -0.16384000000000000000e5 +1063 4 14 18 -0.16384000000000000000e5 +1064 3 7 35 0.32768000000000000000e5 +1064 3 20 33 -0.32768000000000000000e5 +1065 3 5 10 -0.16384000000000000000e5 +1065 3 8 8 0.32768000000000000000e5 +1066 1 5 12 -0.32768000000000000000e5 +1066 1 12 19 0.32768000000000000000e5 +1066 3 8 9 0.32768000000000000000e5 +1067 1 4 11 0.16384000000000000000e5 +1067 1 5 12 0.16384000000000000000e5 +1067 1 7 22 -0.16384000000000000000e5 +1067 1 12 19 -0.16384000000000000000e5 +1067 3 1 14 0.32768000000000000000e5 +1067 3 2 15 -0.65536000000000000000e5 +1067 3 5 10 0.16384000000000000000e5 +1067 3 8 10 0.32768000000000000000e5 +1067 4 4 8 0.16384000000000000000e5 +1067 4 5 9 0.32768000000000000000e5 +1068 1 4 11 -0.16384000000000000000e5 +1068 1 5 12 -0.16384000000000000000e5 +1068 1 7 22 0.16384000000000000000e5 +1068 1 12 19 0.16384000000000000000e5 +1068 3 5 10 -0.16384000000000000000e5 +1068 3 8 11 0.32768000000000000000e5 +1068 4 4 8 -0.16384000000000000000e5 +1069 1 8 23 0.32768000000000000000e5 +1069 1 9 24 0.32768000000000000000e5 +1069 1 13 28 0.32768000000000000000e5 +1069 1 14 21 -0.65536000000000000000e5 +1069 2 4 10 0.32768000000000000000e5 +1069 3 1 14 -0.32768000000000000000e5 +1069 3 2 15 0.65536000000000000000e5 +1069 3 8 12 0.32768000000000000000e5 +1069 3 8 13 -0.65536000000000000000e5 +1069 3 13 18 0.32768000000000000000e5 +1069 4 5 9 -0.32768000000000000000e5 +1070 3 8 14 0.32768000000000000000e5 +1070 3 11 12 -0.32768000000000000000e5 +1071 3 8 15 0.32768000000000000000e5 +1071 3 12 13 -0.32768000000000000000e5 +1072 1 9 16 -0.32768000000000000000e5 +1072 1 20 27 0.32768000000000000000e5 +1072 3 1 30 0.32768000000000000000e5 +1072 3 8 16 0.32768000000000000000e5 +1073 3 6 19 -0.32768000000000000000e5 +1073 3 8 17 0.32768000000000000000e5 +1074 1 7 22 -0.65536000000000000000e5 +1074 1 9 16 0.32768000000000000000e5 +1074 1 17 24 0.65536000000000000000e5 +1074 1 20 27 -0.32768000000000000000e5 +1074 3 1 30 -0.32768000000000000000e5 +1074 3 6 19 0.32768000000000000000e5 +1074 3 8 18 0.32768000000000000000e5 +1074 4 7 11 0.32768000000000000000e5 +1075 1 7 22 0.65536000000000000000e5 +1075 1 9 16 -0.32768000000000000000e5 +1075 1 17 24 -0.65536000000000000000e5 +1075 1 20 27 0.32768000000000000000e5 +1075 3 1 30 0.32768000000000000000e5 +1075 3 8 19 0.32768000000000000000e5 +1075 3 8 21 -0.65536000000000000000e5 +1075 4 3 15 0.32768000000000000000e5 +1075 4 7 11 -0.32768000000000000000e5 +1076 1 7 22 -0.32768000000000000000e5 +1076 1 17 24 0.32768000000000000000e5 +1076 3 8 20 0.32768000000000000000e5 +1077 3 4 25 -0.65536000000000000000e5 +1077 3 8 21 0.32768000000000000000e5 +1077 3 8 22 0.32768000000000000000e5 +1077 3 9 22 0.32768000000000000000e5 +1077 4 4 16 0.32768000000000000000e5 +1078 3 8 23 0.32768000000000000000e5 +1078 3 13 18 -0.32768000000000000000e5 +1079 3 4 25 -0.32768000000000000000e5 +1079 3 8 24 0.32768000000000000000e5 +1080 3 8 25 0.32768000000000000000e5 +1080 3 11 24 -0.32768000000000000000e5 +1081 1 3 34 0.32768000000000000000e5 +1081 1 5 20 -0.32768000000000000000e5 +1081 3 6 19 0.32768000000000000000e5 +1081 3 8 26 0.32768000000000000000e5 +1082 3 8 27 0.32768000000000000000e5 +1082 3 17 22 -0.32768000000000000000e5 +1083 1 3 34 -0.32768000000000000000e5 +1083 1 5 20 0.32768000000000000000e5 +1083 3 6 19 -0.32768000000000000000e5 +1083 3 8 28 0.32768000000000000000e5 +1083 3 17 22 0.32768000000000000000e5 +1083 3 18 23 -0.65536000000000000000e5 +1083 4 6 18 0.32768000000000000000e5 +1084 3 8 29 0.32768000000000000000e5 +1084 3 18 23 -0.32768000000000000000e5 +1085 1 3 34 0.32768000000000000000e5 +1085 1 13 28 -0.65536000000000000000e5 +1085 1 20 35 -0.32768000000000000000e5 +1085 1 25 32 0.65536000000000000000e5 +1085 2 6 20 0.16384000000000000000e5 +1085 2 14 20 -0.16384000000000000000e5 +1085 3 2 31 0.32768000000000000000e5 +1085 3 6 35 -0.32768000000000000000e5 +1085 3 8 30 0.32768000000000000000e5 +1085 3 16 29 0.16384000000000000000e5 +1085 3 17 30 0.32768000000000000000e5 +1085 3 18 23 0.32768000000000000000e5 +1085 3 18 31 0.32768000000000000000e5 +1085 3 22 27 0.16384000000000000000e5 +1085 4 8 20 0.32768000000000000000e5 +1085 4 12 16 0.32768000000000000000e5 +1085 4 14 18 0.16384000000000000000e5 +1086 3 8 31 0.32768000000000000000e5 +1086 3 14 27 -0.32768000000000000000e5 +1087 3 8 32 0.32768000000000000000e5 +1087 3 17 30 -0.32768000000000000000e5 +1088 3 8 33 0.32768000000000000000e5 +1088 3 22 27 -0.32768000000000000000e5 +1089 3 8 34 0.32768000000000000000e5 +1089 3 18 31 -0.32768000000000000000e5 +1090 1 19 34 -0.32768000000000000000e5 +1090 1 30 33 0.32768000000000000000e5 +1090 3 8 35 0.32768000000000000000e5 +1091 1 5 12 0.16384000000000000000e5 +1091 1 8 23 0.32768000000000000000e5 +1091 1 9 24 0.32768000000000000000e5 +1091 1 12 19 -0.16384000000000000000e5 +1091 1 13 28 0.32768000000000000000e5 +1091 1 14 21 -0.65536000000000000000e5 +1091 2 4 10 0.32768000000000000000e5 +1091 3 1 14 -0.32768000000000000000e5 +1091 3 2 15 0.65536000000000000000e5 +1091 3 5 10 0.16384000000000000000e5 +1091 3 8 13 -0.65536000000000000000e5 +1091 3 9 9 0.32768000000000000000e5 +1091 3 13 18 0.32768000000000000000e5 +1091 4 5 9 -0.32768000000000000000e5 +1091 4 7 7 0.32768000000000000000e5 +1092 1 4 11 -0.16384000000000000000e5 +1092 1 5 12 -0.16384000000000000000e5 +1092 1 7 22 0.16384000000000000000e5 +1092 1 12 19 0.16384000000000000000e5 +1092 3 5 10 -0.16384000000000000000e5 +1092 3 9 10 0.32768000000000000000e5 +1092 4 4 8 -0.16384000000000000000e5 +1093 1 8 23 0.32768000000000000000e5 +1093 1 9 24 0.32768000000000000000e5 +1093 1 13 28 0.32768000000000000000e5 +1093 1 14 21 -0.65536000000000000000e5 +1093 2 4 10 0.32768000000000000000e5 +1093 3 1 14 -0.32768000000000000000e5 +1093 3 2 15 0.65536000000000000000e5 +1093 3 8 13 -0.65536000000000000000e5 +1093 3 9 11 0.32768000000000000000e5 +1093 3 13 18 0.32768000000000000000e5 +1093 4 5 9 -0.32768000000000000000e5 +1094 3 5 14 -0.32768000000000000000e5 +1094 3 9 12 0.32768000000000000000e5 +1095 3 9 13 0.32768000000000000000e5 +1095 3 11 12 -0.32768000000000000000e5 +1096 3 6 19 -0.32768000000000000000e5 +1096 3 9 16 0.32768000000000000000e5 +1097 1 7 22 -0.65536000000000000000e5 +1097 1 9 16 0.32768000000000000000e5 +1097 1 17 24 0.65536000000000000000e5 +1097 1 20 27 -0.32768000000000000000e5 +1097 3 1 30 -0.32768000000000000000e5 +1097 3 6 19 0.32768000000000000000e5 +1097 3 9 17 0.32768000000000000000e5 +1097 4 7 11 0.32768000000000000000e5 +1098 1 7 22 0.65536000000000000000e5 +1098 1 9 16 -0.32768000000000000000e5 +1098 1 17 24 -0.65536000000000000000e5 +1098 1 20 27 0.32768000000000000000e5 +1098 3 1 30 0.32768000000000000000e5 +1098 3 8 21 -0.65536000000000000000e5 +1098 3 9 18 0.32768000000000000000e5 +1098 4 3 15 0.32768000000000000000e5 +1098 4 7 11 -0.32768000000000000000e5 +1099 3 5 22 -0.32768000000000000000e5 +1099 3 9 19 0.32768000000000000000e5 +1100 3 8 21 -0.32768000000000000000e5 +1100 3 9 20 0.32768000000000000000e5 +1101 3 4 25 -0.65536000000000000000e5 +1101 3 8 21 0.32768000000000000000e5 +1101 3 9 21 0.32768000000000000000e5 +1101 3 9 22 0.32768000000000000000e5 +1101 4 4 16 0.32768000000000000000e5 +1102 3 4 25 -0.32768000000000000000e5 +1102 3 9 23 0.32768000000000000000e5 +1103 3 9 24 0.32768000000000000000e5 +1103 3 14 19 -0.32768000000000000000e5 +1104 1 14 21 0.32768000000000000000e5 +1104 1 14 29 -0.32768000000000000000e5 +1104 1 15 22 -0.65536000000000000000e5 +1104 1 15 30 0.65536000000000000000e5 +1104 3 9 25 0.32768000000000000000e5 +1104 3 11 24 0.32768000000000000000e5 +1104 4 10 15 0.32768000000000000000e5 +1105 3 9 26 0.32768000000000000000e5 +1105 3 17 22 -0.32768000000000000000e5 +1106 1 3 34 -0.32768000000000000000e5 +1106 1 5 20 0.32768000000000000000e5 +1106 3 6 19 -0.32768000000000000000e5 +1106 3 9 27 0.32768000000000000000e5 +1106 3 17 22 0.32768000000000000000e5 +1106 3 18 23 -0.65536000000000000000e5 +1106 4 6 18 0.32768000000000000000e5 +1107 3 5 30 -0.32768000000000000000e5 +1107 3 9 28 0.32768000000000000000e5 +1108 1 3 34 0.32768000000000000000e5 +1108 1 13 28 -0.65536000000000000000e5 +1108 1 20 35 -0.32768000000000000000e5 +1108 1 25 32 0.65536000000000000000e5 +1108 2 6 20 0.16384000000000000000e5 +1108 2 14 20 -0.16384000000000000000e5 +1108 3 2 31 0.32768000000000000000e5 +1108 3 6 35 -0.32768000000000000000e5 +1108 3 9 29 0.32768000000000000000e5 +1108 3 16 29 0.16384000000000000000e5 +1108 3 17 30 0.32768000000000000000e5 +1108 3 18 23 0.32768000000000000000e5 +1108 3 18 31 0.32768000000000000000e5 +1108 3 22 27 0.16384000000000000000e5 +1108 4 8 20 0.32768000000000000000e5 +1108 4 12 16 0.32768000000000000000e5 +1108 4 14 18 0.16384000000000000000e5 +1109 1 3 34 -0.32768000000000000000e5 +1109 1 13 28 0.65536000000000000000e5 +1109 1 20 35 0.32768000000000000000e5 +1109 1 25 32 -0.65536000000000000000e5 +1109 2 6 20 -0.16384000000000000000e5 +1109 2 14 20 0.16384000000000000000e5 +1109 3 2 31 -0.32768000000000000000e5 +1109 3 6 35 0.32768000000000000000e5 +1109 3 9 30 0.32768000000000000000e5 +1109 3 14 27 -0.65536000000000000000e5 +1109 3 16 29 -0.16384000000000000000e5 +1109 3 17 30 -0.32768000000000000000e5 +1109 3 18 31 -0.32768000000000000000e5 +1109 3 22 27 -0.16384000000000000000e5 +1109 4 7 19 0.32768000000000000000e5 +1109 4 8 20 -0.32768000000000000000e5 +1109 4 12 16 -0.32768000000000000000e5 +1109 4 14 18 -0.16384000000000000000e5 +1110 1 3 34 -0.16384000000000000000e5 +1110 1 13 28 0.32768000000000000000e5 +1110 1 20 35 0.16384000000000000000e5 +1110 1 22 25 -0.65536000000000000000e5 +1110 1 24 31 0.65536000000000000000e5 +1110 1 25 32 -0.32768000000000000000e5 +1110 2 6 20 -0.81920000000000000000e4 +1110 2 14 20 0.81920000000000000000e4 +1110 3 6 35 0.16384000000000000000e5 +1110 3 9 31 0.32768000000000000000e5 +1110 3 14 27 0.32768000000000000000e5 +1110 3 16 29 -0.81920000000000000000e4 +1110 3 17 30 -0.16384000000000000000e5 +1110 3 18 31 -0.16384000000000000000e5 +1110 3 22 27 -0.81920000000000000000e4 +1110 4 8 20 -0.16384000000000000000e5 +1110 4 10 18 0.32768000000000000000e5 +1110 4 14 18 -0.81920000000000000000e4 +1111 3 9 32 0.32768000000000000000e5 +1111 3 22 27 -0.32768000000000000000e5 +1112 3 5 34 -0.32768000000000000000e5 +1112 3 9 33 0.32768000000000000000e5 +1113 1 3 34 0.16384000000000000000e5 +1113 1 20 35 -0.16384000000000000000e5 +1113 3 6 35 -0.16384000000000000000e5 +1113 3 9 34 0.32768000000000000000e5 +1113 3 17 30 0.16384000000000000000e5 +1113 3 18 31 0.32768000000000000000e5 +1113 3 22 27 0.16384000000000000000e5 +1113 3 24 29 -0.65536000000000000000e5 +1113 4 14 18 0.16384000000000000000e5 +1113 4 15 19 0.32768000000000000000e5 +1114 3 9 35 0.32768000000000000000e5 +1114 3 19 34 -0.32768000000000000000e5 +1115 1 4 11 0.40960000000000000000e4 +1115 1 5 12 0.40960000000000000000e4 +1115 1 6 21 -0.40960000000000000000e4 +1115 1 7 10 -0.81920000000000000000e4 +1115 1 7 22 -0.81920000000000000000e4 +1115 1 8 23 -0.81920000000000000000e4 +1115 1 11 26 -0.40960000000000000000e4 +1115 1 12 19 -0.40960000000000000000e4 +1115 1 13 20 0.16384000000000000000e5 +1115 2 2 16 -0.40960000000000000000e4 +1115 2 6 8 -0.81920000000000000000e4 +1115 3 2 15 -0.16384000000000000000e5 +1115 3 5 10 0.40960000000000000000e4 +1115 3 7 20 -0.40960000000000000000e4 +1115 3 10 10 0.32768000000000000000e5 +1115 4 4 8 0.40960000000000000000e4 +1115 4 5 9 0.81920000000000000000e4 +1116 3 2 15 -0.32768000000000000000e5 +1116 3 10 11 0.32768000000000000000e5 +1117 3 8 13 -0.32768000000000000000e5 +1117 3 10 12 0.32768000000000000000e5 +1118 1 4 11 0.40960000000000000000e4 +1118 1 5 12 0.40960000000000000000e4 +1118 1 6 21 -0.40960000000000000000e4 +1118 1 7 10 -0.81920000000000000000e4 +1118 1 7 22 -0.81920000000000000000e4 +1118 1 8 23 -0.81920000000000000000e4 +1118 1 11 26 -0.40960000000000000000e4 +1118 1 12 19 -0.40960000000000000000e4 +1118 1 13 20 0.16384000000000000000e5 +1118 2 2 16 -0.40960000000000000000e4 +1118 2 6 8 -0.81920000000000000000e4 +1118 3 2 15 -0.32768000000000000000e5 +1118 3 5 10 0.40960000000000000000e4 +1118 3 7 20 -0.40960000000000000000e4 +1118 3 8 13 -0.16384000000000000000e5 +1118 3 10 13 0.32768000000000000000e5 +1118 4 4 8 0.40960000000000000000e4 +1118 4 5 9 0.81920000000000000000e4 +1118 4 8 8 -0.32768000000000000000e5 +1119 3 2 15 -0.16384000000000000000e5 +1119 3 8 13 -0.16384000000000000000e5 +1119 3 10 14 0.32768000000000000000e5 +1119 3 11 12 -0.16384000000000000000e5 +1119 4 6 10 -0.16384000000000000000e5 +1120 1 6 21 -0.32768000000000000000e5 +1120 1 16 23 0.32768000000000000000e5 +1120 3 10 16 0.32768000000000000000e5 +1121 3 7 20 -0.32768000000000000000e5 +1121 3 10 17 0.32768000000000000000e5 +1122 1 7 22 -0.32768000000000000000e5 +1122 1 17 24 0.32768000000000000000e5 +1122 3 10 18 0.32768000000000000000e5 +1123 3 8 21 -0.32768000000000000000e5 +1123 3 10 19 0.32768000000000000000e5 +1124 1 6 21 -0.16384000000000000000e5 +1124 1 7 22 -0.16384000000000000000e5 +1124 1 16 23 0.16384000000000000000e5 +1124 1 17 24 0.16384000000000000000e5 +1124 2 2 16 -0.16384000000000000000e5 +1124 2 5 19 0.16384000000000000000e5 +1124 3 7 20 -0.16384000000000000000e5 +1124 3 10 20 0.32768000000000000000e5 +1125 1 7 22 -0.16384000000000000000e5 +1125 1 17 24 0.16384000000000000000e5 +1125 3 7 20 -0.16384000000000000000e5 +1125 3 8 21 -0.16384000000000000000e5 +1125 3 10 21 0.32768000000000000000e5 +1125 4 8 12 -0.16384000000000000000e5 +1126 3 10 22 0.32768000000000000000e5 +1126 3 13 18 -0.32768000000000000000e5 +1127 1 14 21 -0.32768000000000000000e5 +1127 1 14 29 0.32768000000000000000e5 +1127 3 10 24 0.32768000000000000000e5 +1128 1 14 21 -0.16384000000000000000e5 +1128 1 14 29 0.16384000000000000000e5 +1128 3 10 23 -0.16384000000000000000e5 +1128 3 10 25 0.32768000000000000000e5 +1128 3 11 24 -0.16384000000000000000e5 +1128 4 10 14 -0.16384000000000000000e5 +1129 1 11 26 -0.32768000000000000000e5 +1129 1 16 31 0.32768000000000000000e5 +1129 3 10 26 0.32768000000000000000e5 +1130 3 2 31 -0.32768000000000000000e5 +1130 3 10 27 0.32768000000000000000e5 +1131 3 10 28 0.32768000000000000000e5 +1131 3 18 23 -0.32768000000000000000e5 +1132 3 10 29 0.32768000000000000000e5 +1132 3 13 26 -0.32768000000000000000e5 +1133 1 3 34 0.16384000000000000000e5 +1133 1 13 28 -0.32768000000000000000e5 +1133 1 20 35 -0.16384000000000000000e5 +1133 1 25 32 0.32768000000000000000e5 +1133 2 6 20 0.81920000000000000000e4 +1133 2 14 20 -0.81920000000000000000e4 +1133 3 6 35 -0.16384000000000000000e5 +1133 3 10 30 0.32768000000000000000e5 +1133 3 16 29 0.81920000000000000000e4 +1133 3 17 30 0.16384000000000000000e5 +1133 3 18 31 0.16384000000000000000e5 +1133 3 22 27 0.81920000000000000000e4 +1133 4 8 20 0.16384000000000000000e5 +1133 4 14 18 0.81920000000000000000e4 +1134 3 10 31 0.32768000000000000000e5 +1134 3 20 25 -0.32768000000000000000e5 +1135 1 3 34 -0.16384000000000000000e5 +1135 1 20 35 0.16384000000000000000e5 +1135 2 6 20 -0.16384000000000000000e5 +1135 2 14 20 0.16384000000000000000e5 +1135 3 6 35 0.16384000000000000000e5 +1135 3 10 32 0.32768000000000000000e5 +1135 3 16 29 -0.16384000000000000000e5 +1135 3 17 30 -0.16384000000000000000e5 +1136 1 3 34 -0.16384000000000000000e5 +1136 1 20 35 0.16384000000000000000e5 +1136 3 6 35 0.16384000000000000000e5 +1136 3 10 33 0.32768000000000000000e5 +1136 3 17 30 -0.16384000000000000000e5 +1136 3 22 27 -0.16384000000000000000e5 +1136 4 14 18 -0.16384000000000000000e5 +1137 1 3 34 -0.16384000000000000000e5 +1137 1 20 35 0.16384000000000000000e5 +1137 2 6 20 -0.81920000000000000000e4 +1137 2 14 20 0.81920000000000000000e4 +1137 3 6 35 0.16384000000000000000e5 +1137 3 10 34 0.32768000000000000000e5 +1137 3 16 29 -0.81920000000000000000e4 +1137 3 17 30 -0.16384000000000000000e5 +1137 3 18 31 -0.16384000000000000000e5 +1137 3 22 27 -0.81920000000000000000e4 +1137 4 8 20 -0.16384000000000000000e5 +1137 4 14 18 -0.81920000000000000000e4 +1138 3 10 35 0.32768000000000000000e5 +1138 3 26 31 -0.32768000000000000000e5 +1139 3 8 13 -0.16384000000000000000e5 +1139 3 11 11 0.32768000000000000000e5 +1140 3 2 15 -0.16384000000000000000e5 +1140 3 8 13 -0.16384000000000000000e5 +1140 3 11 12 -0.16384000000000000000e5 +1140 3 11 13 0.32768000000000000000e5 +1140 4 6 10 -0.16384000000000000000e5 +1141 3 11 14 0.32768000000000000000e5 +1141 3 12 13 -0.32768000000000000000e5 +1142 3 11 15 0.32768000000000000000e5 +1142 3 13 14 -0.32768000000000000000e5 +1143 3 7 20 -0.32768000000000000000e5 +1143 3 11 16 0.32768000000000000000e5 +1144 1 7 22 -0.32768000000000000000e5 +1144 1 17 24 0.32768000000000000000e5 +1144 3 11 17 0.32768000000000000000e5 +1145 3 8 21 -0.32768000000000000000e5 +1145 3 11 18 0.32768000000000000000e5 +1146 3 4 25 -0.65536000000000000000e5 +1146 3 8 21 0.32768000000000000000e5 +1146 3 9 22 0.32768000000000000000e5 +1146 3 11 19 0.32768000000000000000e5 +1146 4 4 16 0.32768000000000000000e5 +1147 1 7 22 -0.16384000000000000000e5 +1147 1 17 24 0.16384000000000000000e5 +1147 3 7 20 -0.16384000000000000000e5 +1147 3 8 21 -0.16384000000000000000e5 +1147 3 11 20 0.32768000000000000000e5 +1147 4 8 12 -0.16384000000000000000e5 +1148 3 11 21 0.32768000000000000000e5 +1148 3 13 18 -0.32768000000000000000e5 +1149 3 4 25 -0.32768000000000000000e5 +1149 3 11 22 0.32768000000000000000e5 +1150 1 14 21 -0.32768000000000000000e5 +1150 1 14 29 0.32768000000000000000e5 +1150 3 11 23 0.32768000000000000000e5 +1151 1 15 22 -0.32768000000000000000e5 +1151 1 15 30 0.32768000000000000000e5 +1151 3 11 25 0.32768000000000000000e5 +1152 3 2 31 -0.32768000000000000000e5 +1152 3 11 26 0.32768000000000000000e5 +1153 3 11 27 0.32768000000000000000e5 +1153 3 18 23 -0.32768000000000000000e5 +1154 1 3 34 0.32768000000000000000e5 +1154 1 13 28 -0.65536000000000000000e5 +1154 1 20 35 -0.32768000000000000000e5 +1154 1 25 32 0.65536000000000000000e5 +1154 2 6 20 0.16384000000000000000e5 +1154 2 14 20 -0.16384000000000000000e5 +1154 3 2 31 0.32768000000000000000e5 +1154 3 6 35 -0.32768000000000000000e5 +1154 3 11 28 0.32768000000000000000e5 +1154 3 16 29 0.16384000000000000000e5 +1154 3 17 30 0.32768000000000000000e5 +1154 3 18 23 0.32768000000000000000e5 +1154 3 18 31 0.32768000000000000000e5 +1154 3 22 27 0.16384000000000000000e5 +1154 4 8 20 0.32768000000000000000e5 +1154 4 12 16 0.32768000000000000000e5 +1154 4 14 18 0.16384000000000000000e5 +1155 1 3 34 0.16384000000000000000e5 +1155 1 13 28 -0.32768000000000000000e5 +1155 1 20 35 -0.16384000000000000000e5 +1155 1 25 32 0.32768000000000000000e5 +1155 2 6 20 0.81920000000000000000e4 +1155 2 14 20 -0.81920000000000000000e4 +1155 3 6 35 -0.16384000000000000000e5 +1155 3 11 29 0.32768000000000000000e5 +1155 3 16 29 0.81920000000000000000e4 +1155 3 17 30 0.16384000000000000000e5 +1155 3 18 31 0.16384000000000000000e5 +1155 3 22 27 0.81920000000000000000e4 +1155 4 8 20 0.16384000000000000000e5 +1155 4 14 18 0.81920000000000000000e4 +1156 3 11 30 0.32768000000000000000e5 +1156 3 14 27 -0.32768000000000000000e5 +1157 1 22 25 -0.32768000000000000000e5 +1157 1 24 31 0.32768000000000000000e5 +1157 3 11 31 0.32768000000000000000e5 +1158 1 3 34 -0.16384000000000000000e5 +1158 1 20 35 0.16384000000000000000e5 +1158 3 6 35 0.16384000000000000000e5 +1158 3 11 32 0.32768000000000000000e5 +1158 3 17 30 -0.16384000000000000000e5 +1158 3 22 27 -0.16384000000000000000e5 +1158 4 14 18 -0.16384000000000000000e5 +1159 3 11 33 0.32768000000000000000e5 +1159 3 18 31 -0.32768000000000000000e5 +1160 3 11 34 0.32768000000000000000e5 +1160 3 24 29 -0.32768000000000000000e5 +1161 3 11 35 0.32768000000000000000e5 +1161 3 21 34 -0.32768000000000000000e5 +1162 3 9 14 -0.16384000000000000000e5 +1162 3 12 12 0.32768000000000000000e5 +1163 3 9 15 -0.32768000000000000000e5 +1163 3 12 14 0.32768000000000000000e5 +1164 1 7 22 -0.32768000000000000000e5 +1164 1 17 24 0.32768000000000000000e5 +1164 3 12 16 0.32768000000000000000e5 +1165 3 8 21 -0.32768000000000000000e5 +1165 3 12 17 0.32768000000000000000e5 +1166 3 4 25 -0.65536000000000000000e5 +1166 3 8 21 0.32768000000000000000e5 +1166 3 9 22 0.32768000000000000000e5 +1166 3 12 18 0.32768000000000000000e5 +1166 4 4 16 0.32768000000000000000e5 +1167 3 9 22 -0.32768000000000000000e5 +1167 3 12 19 0.32768000000000000000e5 +1168 3 12 20 0.32768000000000000000e5 +1168 3 13 18 -0.32768000000000000000e5 +1169 3 4 25 -0.32768000000000000000e5 +1169 3 12 21 0.32768000000000000000e5 +1170 3 12 22 0.32768000000000000000e5 +1170 3 14 19 -0.32768000000000000000e5 +1171 3 11 24 -0.32768000000000000000e5 +1171 3 12 23 0.32768000000000000000e5 +1172 1 14 21 0.32768000000000000000e5 +1172 1 14 29 -0.32768000000000000000e5 +1172 1 15 22 -0.65536000000000000000e5 +1172 1 15 30 0.65536000000000000000e5 +1172 3 11 24 0.32768000000000000000e5 +1172 3 12 24 0.32768000000000000000e5 +1172 4 10 15 0.32768000000000000000e5 +1173 3 12 26 0.32768000000000000000e5 +1173 3 18 23 -0.32768000000000000000e5 +1174 1 3 34 0.32768000000000000000e5 +1174 1 13 28 -0.65536000000000000000e5 +1174 1 20 35 -0.32768000000000000000e5 +1174 1 25 32 0.65536000000000000000e5 +1174 2 6 20 0.16384000000000000000e5 +1174 2 14 20 -0.16384000000000000000e5 +1174 3 2 31 0.32768000000000000000e5 +1174 3 6 35 -0.32768000000000000000e5 +1174 3 12 27 0.32768000000000000000e5 +1174 3 16 29 0.16384000000000000000e5 +1174 3 17 30 0.32768000000000000000e5 +1174 3 18 23 0.32768000000000000000e5 +1174 3 18 31 0.32768000000000000000e5 +1174 3 22 27 0.16384000000000000000e5 +1174 4 8 20 0.32768000000000000000e5 +1174 4 12 16 0.32768000000000000000e5 +1174 4 14 18 0.16384000000000000000e5 +1175 1 3 34 -0.32768000000000000000e5 +1175 1 13 28 0.65536000000000000000e5 +1175 1 20 35 0.32768000000000000000e5 +1175 1 25 32 -0.65536000000000000000e5 +1175 2 6 20 -0.16384000000000000000e5 +1175 2 14 20 0.16384000000000000000e5 +1175 3 2 31 -0.32768000000000000000e5 +1175 3 6 35 0.32768000000000000000e5 +1175 3 12 28 0.32768000000000000000e5 +1175 3 14 27 -0.65536000000000000000e5 +1175 3 16 29 -0.16384000000000000000e5 +1175 3 17 30 -0.32768000000000000000e5 +1175 3 18 31 -0.32768000000000000000e5 +1175 3 22 27 -0.16384000000000000000e5 +1175 4 7 19 0.32768000000000000000e5 +1175 4 8 20 -0.32768000000000000000e5 +1175 4 12 16 -0.32768000000000000000e5 +1175 4 14 18 -0.16384000000000000000e5 +1176 3 12 29 0.32768000000000000000e5 +1176 3 14 27 -0.32768000000000000000e5 +1177 1 3 34 -0.16384000000000000000e5 +1177 1 13 28 0.32768000000000000000e5 +1177 1 20 35 0.16384000000000000000e5 +1177 1 22 25 -0.65536000000000000000e5 +1177 1 24 31 0.65536000000000000000e5 +1177 1 25 32 -0.32768000000000000000e5 +1177 2 6 20 -0.81920000000000000000e4 +1177 2 14 20 0.81920000000000000000e4 +1177 3 6 35 0.16384000000000000000e5 +1177 3 12 30 0.32768000000000000000e5 +1177 3 14 27 0.32768000000000000000e5 +1177 3 16 29 -0.81920000000000000000e4 +1177 3 17 30 -0.16384000000000000000e5 +1177 3 18 31 -0.16384000000000000000e5 +1177 3 22 27 -0.81920000000000000000e4 +1177 4 8 20 -0.16384000000000000000e5 +1177 4 10 18 0.32768000000000000000e5 +1177 4 14 18 -0.81920000000000000000e4 +1178 3 12 31 0.32768000000000000000e5 +1178 3 15 28 -0.32768000000000000000e5 +1179 3 12 32 0.32768000000000000000e5 +1179 3 18 31 -0.32768000000000000000e5 +1180 1 3 34 0.16384000000000000000e5 +1180 1 20 35 -0.16384000000000000000e5 +1180 3 6 35 -0.16384000000000000000e5 +1180 3 12 33 0.32768000000000000000e5 +1180 3 17 30 0.16384000000000000000e5 +1180 3 18 31 0.32768000000000000000e5 +1180 3 22 27 0.16384000000000000000e5 +1180 3 24 29 -0.65536000000000000000e5 +1180 4 14 18 0.16384000000000000000e5 +1180 4 15 19 0.32768000000000000000e5 +1181 3 12 34 0.32768000000000000000e5 +1181 3 22 31 -0.32768000000000000000e5 +1182 1 9 24 -0.65536000000000000000e5 +1182 1 31 34 0.65536000000000000000e5 +1182 3 4 25 0.65536000000000000000e5 +1182 3 12 35 0.32768000000000000000e5 +1182 3 14 27 0.65536000000000000000e5 +1182 3 21 34 0.32768000000000000000e5 +1182 3 24 29 0.65536000000000000000e5 +1182 3 26 31 0.32768000000000000000e5 +1182 4 16 20 0.32768000000000000000e5 +1183 3 10 15 -0.16384000000000000000e5 +1183 3 13 13 0.32768000000000000000e5 +1184 3 10 15 -0.16384000000000000000e5 +1184 3 12 15 -0.16384000000000000000e5 +1184 3 13 14 -0.16384000000000000000e5 +1184 3 13 15 0.32768000000000000000e5 +1184 4 10 10 -0.32768000000000000000e5 +1185 1 6 21 -0.16384000000000000000e5 +1185 1 7 22 -0.16384000000000000000e5 +1185 1 16 23 0.16384000000000000000e5 +1185 1 17 24 0.16384000000000000000e5 +1185 2 2 16 -0.16384000000000000000e5 +1185 2 5 19 0.16384000000000000000e5 +1185 3 7 20 -0.16384000000000000000e5 +1185 3 13 16 0.32768000000000000000e5 +1186 1 7 22 -0.16384000000000000000e5 +1186 1 17 24 0.16384000000000000000e5 +1186 3 7 20 -0.16384000000000000000e5 +1186 3 8 21 -0.16384000000000000000e5 +1186 3 13 17 0.32768000000000000000e5 +1186 4 8 12 -0.16384000000000000000e5 +1187 3 4 25 -0.32768000000000000000e5 +1187 3 13 19 0.32768000000000000000e5 +1188 3 10 23 -0.32768000000000000000e5 +1188 3 13 20 0.32768000000000000000e5 +1189 1 14 21 -0.32768000000000000000e5 +1189 1 14 29 0.32768000000000000000e5 +1189 3 13 21 0.32768000000000000000e5 +1190 3 11 24 -0.32768000000000000000e5 +1190 3 13 22 0.32768000000000000000e5 +1191 1 14 21 -0.16384000000000000000e5 +1191 1 14 29 0.16384000000000000000e5 +1191 3 10 23 -0.16384000000000000000e5 +1191 3 11 24 -0.16384000000000000000e5 +1191 3 13 23 0.32768000000000000000e5 +1191 4 10 14 -0.16384000000000000000e5 +1192 1 15 22 -0.32768000000000000000e5 +1192 1 15 30 0.32768000000000000000e5 +1192 3 13 24 0.32768000000000000000e5 +1193 1 14 21 -0.81920000000000000000e4 +1193 1 14 29 0.81920000000000000000e4 +1193 1 15 22 -0.16384000000000000000e5 +1193 1 15 30 0.16384000000000000000e5 +1193 3 10 23 -0.81920000000000000000e4 +1193 3 11 24 -0.81920000000000000000e4 +1193 3 12 25 -0.16384000000000000000e5 +1193 3 13 25 0.32768000000000000000e5 +1193 4 10 14 -0.81920000000000000000e4 +1193 4 10 16 -0.16384000000000000000e5 +1194 1 3 34 0.16384000000000000000e5 +1194 1 13 28 -0.32768000000000000000e5 +1194 1 20 35 -0.16384000000000000000e5 +1194 1 25 32 0.32768000000000000000e5 +1194 2 6 20 0.81920000000000000000e4 +1194 2 14 20 -0.81920000000000000000e4 +1194 3 6 35 -0.16384000000000000000e5 +1194 3 13 27 0.32768000000000000000e5 +1194 3 16 29 0.81920000000000000000e4 +1194 3 17 30 0.16384000000000000000e5 +1194 3 18 31 0.16384000000000000000e5 +1194 3 22 27 0.81920000000000000000e4 +1194 4 8 20 0.16384000000000000000e5 +1194 4 14 18 0.81920000000000000000e4 +1195 3 13 28 0.32768000000000000000e5 +1195 3 14 27 -0.32768000000000000000e5 +1196 3 13 29 0.32768000000000000000e5 +1196 3 20 25 -0.32768000000000000000e5 +1197 1 22 25 -0.32768000000000000000e5 +1197 1 24 31 0.32768000000000000000e5 +1197 3 13 30 0.32768000000000000000e5 +1198 1 22 25 -0.16384000000000000000e5 +1198 1 24 31 0.16384000000000000000e5 +1198 3 13 31 0.32768000000000000000e5 +1198 3 15 28 -0.16384000000000000000e5 +1198 3 20 25 -0.16384000000000000000e5 +1198 4 16 16 -0.32768000000000000000e5 +1199 1 3 34 -0.16384000000000000000e5 +1199 1 20 35 0.16384000000000000000e5 +1199 2 6 20 -0.81920000000000000000e4 +1199 2 14 20 0.81920000000000000000e4 +1199 3 6 35 0.16384000000000000000e5 +1199 3 13 32 0.32768000000000000000e5 +1199 3 16 29 -0.81920000000000000000e4 +1199 3 17 30 -0.16384000000000000000e5 +1199 3 18 31 -0.16384000000000000000e5 +1199 3 22 27 -0.81920000000000000000e4 +1199 4 8 20 -0.16384000000000000000e5 +1199 4 14 18 -0.81920000000000000000e4 +1200 3 13 33 0.32768000000000000000e5 +1200 3 24 29 -0.32768000000000000000e5 +1201 1 9 24 -0.32768000000000000000e5 +1201 1 31 34 0.32768000000000000000e5 +1201 3 4 25 0.32768000000000000000e5 +1201 3 13 35 0.32768000000000000000e5 +1201 3 14 27 0.32768000000000000000e5 +1201 3 24 29 0.32768000000000000000e5 +1202 3 12 15 -0.16384000000000000000e5 +1202 3 14 14 0.32768000000000000000e5 +1203 1 7 22 -0.16384000000000000000e5 +1203 1 17 24 0.16384000000000000000e5 +1203 3 7 20 -0.16384000000000000000e5 +1203 3 8 21 -0.16384000000000000000e5 +1203 3 14 16 0.32768000000000000000e5 +1203 4 8 12 -0.16384000000000000000e5 +1204 3 13 18 -0.32768000000000000000e5 +1204 3 14 17 0.32768000000000000000e5 +1205 3 4 25 -0.32768000000000000000e5 +1205 3 14 18 0.32768000000000000000e5 +1206 1 14 21 -0.32768000000000000000e5 +1206 1 14 29 0.32768000000000000000e5 +1206 3 14 20 0.32768000000000000000e5 +1207 3 11 24 -0.32768000000000000000e5 +1207 3 14 21 0.32768000000000000000e5 +1208 1 14 21 0.32768000000000000000e5 +1208 1 14 29 -0.32768000000000000000e5 +1208 1 15 22 -0.65536000000000000000e5 +1208 1 15 30 0.65536000000000000000e5 +1208 3 11 24 0.32768000000000000000e5 +1208 3 14 22 0.32768000000000000000e5 +1208 4 10 15 0.32768000000000000000e5 +1209 1 15 22 -0.32768000000000000000e5 +1209 1 15 30 0.32768000000000000000e5 +1209 3 14 23 0.32768000000000000000e5 +1210 3 12 25 -0.32768000000000000000e5 +1210 3 14 24 0.32768000000000000000e5 +1211 3 14 25 0.32768000000000000000e5 +1211 3 15 24 -0.32768000000000000000e5 +1212 1 3 34 0.16384000000000000000e5 +1212 1 13 28 -0.32768000000000000000e5 +1212 1 20 35 -0.16384000000000000000e5 +1212 1 25 32 0.32768000000000000000e5 +1212 2 6 20 0.81920000000000000000e4 +1212 2 14 20 -0.81920000000000000000e4 +1212 3 6 35 -0.16384000000000000000e5 +1212 3 14 26 0.32768000000000000000e5 +1212 3 16 29 0.81920000000000000000e4 +1212 3 17 30 0.16384000000000000000e5 +1212 3 18 31 0.16384000000000000000e5 +1212 3 22 27 0.81920000000000000000e4 +1212 4 8 20 0.16384000000000000000e5 +1212 4 14 18 0.81920000000000000000e4 +1213 1 3 34 -0.16384000000000000000e5 +1213 1 13 28 0.32768000000000000000e5 +1213 1 20 35 0.16384000000000000000e5 +1213 1 22 25 -0.65536000000000000000e5 +1213 1 24 31 0.65536000000000000000e5 +1213 1 25 32 -0.32768000000000000000e5 +1213 2 6 20 -0.81920000000000000000e4 +1213 2 14 20 0.81920000000000000000e4 +1213 3 6 35 0.16384000000000000000e5 +1213 3 14 27 0.32768000000000000000e5 +1213 3 14 28 0.32768000000000000000e5 +1213 3 16 29 -0.81920000000000000000e4 +1213 3 17 30 -0.16384000000000000000e5 +1213 3 18 31 -0.16384000000000000000e5 +1213 3 22 27 -0.81920000000000000000e4 +1213 4 8 20 -0.16384000000000000000e5 +1213 4 10 18 0.32768000000000000000e5 +1213 4 14 18 -0.81920000000000000000e4 +1214 1 22 25 -0.32768000000000000000e5 +1214 1 24 31 0.32768000000000000000e5 +1214 3 14 29 0.32768000000000000000e5 +1215 3 14 30 0.32768000000000000000e5 +1215 3 15 28 -0.32768000000000000000e5 +1216 3 14 31 0.32768000000000000000e5 +1216 3 24 25 -0.32768000000000000000e5 +1217 3 14 32 0.32768000000000000000e5 +1217 3 24 29 -0.32768000000000000000e5 +1218 3 14 33 0.32768000000000000000e5 +1218 3 22 31 -0.32768000000000000000e5 +1219 3 14 34 0.32768000000000000000e5 +1219 3 25 30 -0.32768000000000000000e5 +1220 3 10 23 -0.32768000000000000000e5 +1220 3 15 16 0.32768000000000000000e5 +1221 1 14 21 -0.32768000000000000000e5 +1221 1 14 29 0.32768000000000000000e5 +1221 3 15 17 0.32768000000000000000e5 +1222 3 11 24 -0.32768000000000000000e5 +1222 3 15 18 0.32768000000000000000e5 +1223 1 14 21 0.32768000000000000000e5 +1223 1 14 29 -0.32768000000000000000e5 +1223 1 15 22 -0.65536000000000000000e5 +1223 1 15 30 0.65536000000000000000e5 +1223 3 11 24 0.32768000000000000000e5 +1223 3 15 19 0.32768000000000000000e5 +1223 4 10 15 0.32768000000000000000e5 +1224 1 14 21 -0.16384000000000000000e5 +1224 1 14 29 0.16384000000000000000e5 +1224 3 10 23 -0.16384000000000000000e5 +1224 3 11 24 -0.16384000000000000000e5 +1224 3 15 20 0.32768000000000000000e5 +1224 4 10 14 -0.16384000000000000000e5 +1225 1 15 22 -0.32768000000000000000e5 +1225 1 15 30 0.32768000000000000000e5 +1225 3 15 21 0.32768000000000000000e5 +1226 3 12 25 -0.32768000000000000000e5 +1226 3 15 22 0.32768000000000000000e5 +1227 1 14 21 -0.81920000000000000000e4 +1227 1 14 29 0.81920000000000000000e4 +1227 1 15 22 -0.16384000000000000000e5 +1227 1 15 30 0.16384000000000000000e5 +1227 3 10 23 -0.81920000000000000000e4 +1227 3 11 24 -0.81920000000000000000e4 +1227 3 12 25 -0.16384000000000000000e5 +1227 3 15 23 0.32768000000000000000e5 +1227 4 10 14 -0.81920000000000000000e4 +1227 4 10 16 -0.16384000000000000000e5 +1228 3 15 26 0.32768000000000000000e5 +1228 3 20 25 -0.32768000000000000000e5 +1229 1 22 25 -0.32768000000000000000e5 +1229 1 24 31 0.32768000000000000000e5 +1229 3 15 27 0.32768000000000000000e5 +1230 1 22 25 -0.16384000000000000000e5 +1230 1 24 31 0.16384000000000000000e5 +1230 3 15 28 -0.16384000000000000000e5 +1230 3 15 29 0.32768000000000000000e5 +1230 3 20 25 -0.16384000000000000000e5 +1230 4 16 16 -0.32768000000000000000e5 +1231 3 15 30 0.32768000000000000000e5 +1231 3 24 25 -0.32768000000000000000e5 +1232 3 15 31 0.32768000000000000000e5 +1232 3 25 25 -0.65536000000000000000e5 +1233 3 13 34 -0.32768000000000000000e5 +1233 3 15 32 0.32768000000000000000e5 +1234 3 15 33 0.32768000000000000000e5 +1234 3 25 30 -0.32768000000000000000e5 +1235 3 15 35 0.32768000000000000000e5 +1235 3 25 34 -0.32768000000000000000e5 +1236 1 1 32 0.16384000000000000000e5 +1236 1 4 27 -0.16384000000000000000e5 +1236 1 5 20 0.32768000000000000000e5 +1236 1 11 26 -0.65536000000000000000e5 +1236 1 20 27 0.65536000000000000000e5 +1236 2 3 17 -0.16384000000000000000e5 +1236 2 6 12 0.32768000000000000000e5 +1236 2 11 17 0.16384000000000000000e5 +1236 3 1 30 0.65536000000000000000e5 +1236 3 6 19 -0.32768000000000000000e5 +1236 3 16 16 0.32768000000000000000e5 +1236 4 2 14 -0.32768000000000000000e5 +1236 4 11 11 0.32768000000000000000e5 +1237 1 1 32 -0.32768000000000000000e5 +1237 1 2 33 -0.32768000000000000000e5 +1237 1 3 18 0.32768000000000000000e5 +1237 1 3 34 -0.65536000000000000000e5 +1237 1 4 27 0.32768000000000000000e5 +1237 1 9 16 -0.65536000000000000000e5 +1237 1 16 31 0.13107200000000000000e6 +1237 1 20 27 -0.65536000000000000000e5 +1237 2 3 17 0.32768000000000000000e5 +1237 2 6 12 -0.65536000000000000000e5 +1237 2 11 17 -0.32768000000000000000e5 +1237 3 3 16 0.32768000000000000000e5 +1237 3 4 17 0.32768000000000000000e5 +1237 3 16 17 0.32768000000000000000e5 +1237 4 1 13 0.32768000000000000000e5 +1237 4 2 14 0.65536000000000000000e5 +1237 4 5 17 0.65536000000000000000e5 +1238 1 2 33 0.32768000000000000000e5 +1238 1 3 18 -0.32768000000000000000e5 +1238 1 9 16 0.65536000000000000000e5 +1238 1 20 27 -0.65536000000000000000e5 +1238 3 1 30 -0.65536000000000000000e5 +1238 3 3 16 -0.32768000000000000000e5 +1238 3 4 17 -0.32768000000000000000e5 +1238 3 16 18 0.32768000000000000000e5 +1238 4 1 13 -0.32768000000000000000e5 +1239 1 2 33 -0.32768000000000000000e5 +1239 1 3 34 0.65536000000000000000e5 +1239 1 4 27 -0.32768000000000000000e5 +1239 1 4 35 -0.32768000000000000000e5 +1239 2 12 18 -0.32768000000000000000e5 +1239 3 3 32 0.32768000000000000000e5 +1239 3 4 33 0.32768000000000000000e5 +1239 3 16 19 0.32768000000000000000e5 +1239 3 17 30 -0.65536000000000000000e5 +1239 4 13 17 0.32768000000000000000e5 +1240 1 3 34 -0.32768000000000000000e5 +1240 1 5 20 0.32768000000000000000e5 +1240 1 11 26 -0.65536000000000000000e5 +1240 1 16 31 0.65536000000000000000e5 +1240 3 1 30 0.32768000000000000000e5 +1240 3 6 19 -0.32768000000000000000e5 +1240 3 16 20 0.32768000000000000000e5 +1240 4 5 17 0.32768000000000000000e5 +1241 3 1 30 -0.32768000000000000000e5 +1241 3 16 21 0.32768000000000000000e5 +1242 1 3 34 0.32768000000000000000e5 +1242 1 5 20 -0.32768000000000000000e5 +1242 3 6 19 0.32768000000000000000e5 +1242 3 16 22 0.32768000000000000000e5 +1243 1 11 26 -0.32768000000000000000e5 +1243 1 16 31 0.32768000000000000000e5 +1243 3 16 23 0.32768000000000000000e5 +1244 3 2 31 -0.32768000000000000000e5 +1244 3 16 24 0.32768000000000000000e5 +1245 3 13 26 -0.32768000000000000000e5 +1245 3 16 25 0.32768000000000000000e5 +1246 1 1 32 0.32768000000000000000e5 +1246 1 2 33 0.65536000000000000000e5 +1246 1 4 35 0.32768000000000000000e5 +1246 1 16 31 -0.13107200000000000000e6 +1246 1 17 32 -0.32768000000000000000e5 +1246 1 20 27 0.13107200000000000000e6 +1246 2 6 12 0.65536000000000000000e5 +1246 2 11 17 0.32768000000000000000e5 +1246 2 12 18 0.32768000000000000000e5 +1246 2 17 17 -0.65536000000000000000e5 +1246 3 4 33 -0.32768000000000000000e5 +1246 3 16 26 0.32768000000000000000e5 +1246 3 16 29 -0.65536000000000000000e5 +1246 3 17 30 0.65536000000000000000e5 +1246 4 2 14 -0.65536000000000000000e5 +1246 4 5 17 -0.65536000000000000000e5 +1246 4 13 17 -0.32768000000000000000e5 +1247 1 2 33 -0.32768000000000000000e5 +1247 1 17 32 0.32768000000000000000e5 +1247 3 16 27 0.32768000000000000000e5 +1248 3 3 32 -0.32768000000000000000e5 +1248 3 16 28 0.32768000000000000000e5 +1249 1 3 34 -0.32768000000000000000e5 +1249 1 20 35 0.32768000000000000000e5 +1249 3 6 35 0.32768000000000000000e5 +1249 3 16 30 0.32768000000000000000e5 +1250 1 3 34 -0.16384000000000000000e5 +1250 1 20 35 0.16384000000000000000e5 +1250 2 6 20 -0.16384000000000000000e5 +1250 2 14 20 0.16384000000000000000e5 +1250 3 6 35 0.16384000000000000000e5 +1250 3 16 29 -0.16384000000000000000e5 +1250 3 16 31 0.32768000000000000000e5 +1250 3 17 30 -0.16384000000000000000e5 +1251 1 2 33 -0.32768000000000000000e5 +1251 1 3 34 0.65536000000000000000e5 +1251 1 4 27 -0.32768000000000000000e5 +1251 1 4 35 -0.32768000000000000000e5 +1251 2 4 18 -0.32768000000000000000e5 +1251 2 12 18 -0.32768000000000000000e5 +1251 2 18 20 0.32768000000000000000e5 +1251 3 3 32 0.32768000000000000000e5 +1251 3 4 33 0.32768000000000000000e5 +1251 3 5 26 -0.32768000000000000000e5 +1251 3 6 35 -0.65536000000000000000e5 +1251 3 16 32 0.32768000000000000000e5 +1251 3 17 22 0.65536000000000000000e5 +1251 3 17 30 -0.65536000000000000000e5 +1251 3 18 19 -0.32768000000000000000e5 +1251 3 19 32 -0.32768000000000000000e5 +1251 3 20 33 0.65536000000000000000e5 +1251 4 13 17 0.65536000000000000000e5 +1251 4 17 17 0.65536000000000000000e5 +1252 1 2 33 0.32768000000000000000e5 +1252 1 3 34 -0.65536000000000000000e5 +1252 1 4 35 0.32768000000000000000e5 +1252 1 26 33 0.32768000000000000000e5 +1252 2 12 18 0.32768000000000000000e5 +1252 3 4 33 -0.32768000000000000000e5 +1252 3 16 33 0.32768000000000000000e5 +1252 3 17 30 0.65536000000000000000e5 +1252 4 13 17 -0.32768000000000000000e5 +1253 3 6 35 -0.32768000000000000000e5 +1253 3 16 34 0.32768000000000000000e5 +1254 1 3 34 -0.65536000000000000000e5 +1254 1 4 27 -0.32768000000000000000e5 +1254 1 4 35 -0.32768000000000000000e5 +1254 1 17 24 0.13107200000000000000e6 +1254 1 20 27 -0.65536000000000000000e5 +1254 1 28 35 -0.32768000000000000000e5 +1254 2 4 18 -0.32768000000000000000e5 +1254 2 6 20 -0.65536000000000000000e5 +1254 2 18 20 0.32768000000000000000e5 +1254 2 20 20 -0.65536000000000000000e5 +1254 3 2 31 -0.13107200000000000000e6 +1254 3 3 32 0.32768000000000000000e5 +1254 3 5 26 -0.32768000000000000000e5 +1254 3 16 35 0.32768000000000000000e5 +1254 3 17 22 0.65536000000000000000e5 +1254 3 17 30 -0.65536000000000000000e5 +1254 3 18 19 -0.32768000000000000000e5 +1254 3 19 32 -0.32768000000000000000e5 +1254 3 20 35 -0.65536000000000000000e5 +1254 3 27 32 0.32768000000000000000e5 +1254 4 13 17 0.32768000000000000000e5 +1255 1 2 33 0.16384000000000000000e5 +1255 1 3 18 -0.16384000000000000000e5 +1255 1 9 16 0.32768000000000000000e5 +1255 1 20 27 -0.32768000000000000000e5 +1255 3 1 30 -0.32768000000000000000e5 +1255 3 3 16 -0.16384000000000000000e5 +1255 3 4 17 -0.16384000000000000000e5 +1255 3 17 17 0.32768000000000000000e5 +1255 4 1 13 -0.16384000000000000000e5 +1256 1 2 33 -0.32768000000000000000e5 +1256 1 3 34 0.65536000000000000000e5 +1256 1 4 27 -0.32768000000000000000e5 +1256 1 4 35 -0.32768000000000000000e5 +1256 2 12 18 -0.32768000000000000000e5 +1256 3 3 32 0.32768000000000000000e5 +1256 3 4 33 0.32768000000000000000e5 +1256 3 17 18 0.32768000000000000000e5 +1256 3 17 30 -0.65536000000000000000e5 +1256 4 13 17 0.32768000000000000000e5 +1257 3 5 26 -0.32768000000000000000e5 +1257 3 17 19 0.32768000000000000000e5 +1258 3 1 30 -0.32768000000000000000e5 +1258 3 17 20 0.32768000000000000000e5 +1259 1 3 34 0.32768000000000000000e5 +1259 1 5 20 -0.32768000000000000000e5 +1259 3 6 19 0.32768000000000000000e5 +1259 3 17 21 0.32768000000000000000e5 +1260 3 2 31 -0.32768000000000000000e5 +1260 3 17 23 0.32768000000000000000e5 +1261 3 17 24 0.32768000000000000000e5 +1261 3 18 23 -0.32768000000000000000e5 +1262 1 3 34 0.16384000000000000000e5 +1262 1 13 28 -0.32768000000000000000e5 +1262 1 20 35 -0.16384000000000000000e5 +1262 1 25 32 0.32768000000000000000e5 +1262 2 6 20 0.81920000000000000000e4 +1262 2 14 20 -0.81920000000000000000e4 +1262 3 6 35 -0.16384000000000000000e5 +1262 3 16 29 0.81920000000000000000e4 +1262 3 17 25 0.32768000000000000000e5 +1262 3 17 30 0.16384000000000000000e5 +1262 3 18 31 0.16384000000000000000e5 +1262 3 22 27 0.81920000000000000000e4 +1262 4 8 20 0.16384000000000000000e5 +1262 4 14 18 0.81920000000000000000e4 +1263 1 2 33 -0.32768000000000000000e5 +1263 1 17 32 0.32768000000000000000e5 +1263 3 17 26 0.32768000000000000000e5 +1264 3 3 32 -0.32768000000000000000e5 +1264 3 17 27 0.32768000000000000000e5 +1265 3 3 32 0.32768000000000000000e5 +1265 3 4 33 0.32768000000000000000e5 +1265 3 17 28 0.32768000000000000000e5 +1265 3 17 30 -0.65536000000000000000e5 +1265 4 13 17 0.32768000000000000000e5 +1266 1 3 34 -0.32768000000000000000e5 +1266 1 20 35 0.32768000000000000000e5 +1266 3 6 35 0.32768000000000000000e5 +1266 3 17 29 0.32768000000000000000e5 +1267 1 3 34 -0.16384000000000000000e5 +1267 1 20 35 0.16384000000000000000e5 +1267 3 6 35 0.16384000000000000000e5 +1267 3 17 30 -0.16384000000000000000e5 +1267 3 17 31 0.32768000000000000000e5 +1267 3 22 27 -0.16384000000000000000e5 +1267 4 14 18 -0.16384000000000000000e5 +1268 1 2 33 0.32768000000000000000e5 +1268 1 3 34 -0.65536000000000000000e5 +1268 1 4 35 0.32768000000000000000e5 +1268 1 26 33 0.32768000000000000000e5 +1268 2 12 18 0.32768000000000000000e5 +1268 3 4 33 -0.32768000000000000000e5 +1268 3 17 30 0.65536000000000000000e5 +1268 3 17 32 0.32768000000000000000e5 +1268 4 13 17 -0.32768000000000000000e5 +1269 1 4 27 0.32768000000000000000e5 +1269 1 26 33 -0.32768000000000000000e5 +1269 2 4 18 0.32768000000000000000e5 +1269 2 18 20 -0.32768000000000000000e5 +1269 3 3 32 -0.32768000000000000000e5 +1269 3 5 26 0.32768000000000000000e5 +1269 3 17 22 -0.65536000000000000000e5 +1269 3 17 33 0.32768000000000000000e5 +1269 3 18 19 0.32768000000000000000e5 +1269 3 19 32 0.32768000000000000000e5 +1269 3 20 33 -0.65536000000000000000e5 +1269 4 13 17 -0.32768000000000000000e5 +1270 3 17 34 0.32768000000000000000e5 +1270 3 20 33 -0.32768000000000000000e5 +1271 3 17 35 0.32768000000000000000e5 +1271 3 27 32 -0.32768000000000000000e5 +1272 3 5 26 -0.16384000000000000000e5 +1272 3 18 18 0.32768000000000000000e5 +1273 1 3 34 0.32768000000000000000e5 +1273 1 5 20 -0.32768000000000000000e5 +1273 3 6 19 0.32768000000000000000e5 +1273 3 18 20 0.32768000000000000000e5 +1274 3 17 22 -0.32768000000000000000e5 +1274 3 18 21 0.32768000000000000000e5 +1275 1 3 34 -0.32768000000000000000e5 +1275 1 5 20 0.32768000000000000000e5 +1275 3 6 19 -0.32768000000000000000e5 +1275 3 17 22 0.32768000000000000000e5 +1275 3 18 22 0.32768000000000000000e5 +1275 3 18 23 -0.65536000000000000000e5 +1275 4 6 18 0.32768000000000000000e5 +1276 1 3 34 0.32768000000000000000e5 +1276 1 13 28 -0.65536000000000000000e5 +1276 1 20 35 -0.32768000000000000000e5 +1276 1 25 32 0.65536000000000000000e5 +1276 2 6 20 0.16384000000000000000e5 +1276 2 14 20 -0.16384000000000000000e5 +1276 3 2 31 0.32768000000000000000e5 +1276 3 6 35 -0.32768000000000000000e5 +1276 3 16 29 0.16384000000000000000e5 +1276 3 17 30 0.32768000000000000000e5 +1276 3 18 23 0.32768000000000000000e5 +1276 3 18 24 0.32768000000000000000e5 +1276 3 18 31 0.32768000000000000000e5 +1276 3 22 27 0.16384000000000000000e5 +1276 4 8 20 0.32768000000000000000e5 +1276 4 12 16 0.32768000000000000000e5 +1276 4 14 18 0.16384000000000000000e5 +1277 3 14 27 -0.32768000000000000000e5 +1277 3 18 25 0.32768000000000000000e5 +1278 3 3 32 -0.32768000000000000000e5 +1278 3 18 26 0.32768000000000000000e5 +1279 3 3 32 0.32768000000000000000e5 +1279 3 4 33 0.32768000000000000000e5 +1279 3 17 30 -0.65536000000000000000e5 +1279 3 18 27 0.32768000000000000000e5 +1279 4 13 17 0.32768000000000000000e5 +1280 3 4 33 -0.32768000000000000000e5 +1280 3 18 28 0.32768000000000000000e5 +1281 3 17 30 -0.32768000000000000000e5 +1281 3 18 29 0.32768000000000000000e5 +1282 3 18 30 0.32768000000000000000e5 +1282 3 22 27 -0.32768000000000000000e5 +1283 1 4 27 0.32768000000000000000e5 +1283 1 26 33 -0.32768000000000000000e5 +1283 2 4 18 0.32768000000000000000e5 +1283 2 18 20 -0.32768000000000000000e5 +1283 3 3 32 -0.32768000000000000000e5 +1283 3 5 26 0.32768000000000000000e5 +1283 3 17 22 -0.65536000000000000000e5 +1283 3 18 19 0.32768000000000000000e5 +1283 3 18 32 0.32768000000000000000e5 +1283 3 19 32 0.32768000000000000000e5 +1283 3 20 33 -0.65536000000000000000e5 +1283 4 13 17 -0.32768000000000000000e5 +1284 3 18 33 0.32768000000000000000e5 +1284 3 19 32 -0.32768000000000000000e5 +1285 1 19 34 -0.32768000000000000000e5 +1285 1 30 33 0.32768000000000000000e5 +1285 3 18 34 0.32768000000000000000e5 +1286 1 3 34 0.65536000000000000000e5 +1286 1 4 27 0.32768000000000000000e5 +1286 1 4 35 0.32768000000000000000e5 +1286 1 17 24 -0.13107200000000000000e6 +1286 1 20 27 0.65536000000000000000e5 +1286 1 28 35 0.32768000000000000000e5 +1286 2 4 18 0.32768000000000000000e5 +1286 2 6 20 0.65536000000000000000e5 +1286 3 2 31 0.13107200000000000000e6 +1286 3 3 32 -0.32768000000000000000e5 +1286 3 5 26 0.32768000000000000000e5 +1286 3 17 22 -0.65536000000000000000e5 +1286 3 17 30 0.65536000000000000000e5 +1286 3 18 19 0.32768000000000000000e5 +1286 3 18 35 0.32768000000000000000e5 +1286 3 19 32 0.32768000000000000000e5 +1286 4 13 17 -0.32768000000000000000e5 +1287 1 3 34 -0.32768000000000000000e5 +1287 1 5 20 0.32768000000000000000e5 +1287 3 5 26 0.16384000000000000000e5 +1287 3 6 19 -0.32768000000000000000e5 +1287 3 17 22 0.32768000000000000000e5 +1287 3 18 19 0.16384000000000000000e5 +1287 3 18 23 -0.65536000000000000000e5 +1287 3 19 19 0.32768000000000000000e5 +1287 4 6 18 0.32768000000000000000e5 +1287 4 13 13 0.32768000000000000000e5 +1288 3 17 22 -0.32768000000000000000e5 +1288 3 19 20 0.32768000000000000000e5 +1289 1 3 34 -0.32768000000000000000e5 +1289 1 5 20 0.32768000000000000000e5 +1289 3 6 19 -0.32768000000000000000e5 +1289 3 17 22 0.32768000000000000000e5 +1289 3 18 23 -0.65536000000000000000e5 +1289 3 19 21 0.32768000000000000000e5 +1289 4 6 18 0.32768000000000000000e5 +1290 3 5 30 -0.32768000000000000000e5 +1290 3 19 22 0.32768000000000000000e5 +1291 1 3 34 0.32768000000000000000e5 +1291 1 13 28 -0.65536000000000000000e5 +1291 1 20 35 -0.32768000000000000000e5 +1291 1 25 32 0.65536000000000000000e5 +1291 2 6 20 0.16384000000000000000e5 +1291 2 14 20 -0.16384000000000000000e5 +1291 3 2 31 0.32768000000000000000e5 +1291 3 6 35 -0.32768000000000000000e5 +1291 3 16 29 0.16384000000000000000e5 +1291 3 17 30 0.32768000000000000000e5 +1291 3 18 23 0.32768000000000000000e5 +1291 3 18 31 0.32768000000000000000e5 +1291 3 19 23 0.32768000000000000000e5 +1291 3 22 27 0.16384000000000000000e5 +1291 4 8 20 0.32768000000000000000e5 +1291 4 12 16 0.32768000000000000000e5 +1291 4 14 18 0.16384000000000000000e5 +1292 1 3 34 -0.32768000000000000000e5 +1292 1 13 28 0.65536000000000000000e5 +1292 1 20 35 0.32768000000000000000e5 +1292 1 25 32 -0.65536000000000000000e5 +1292 2 6 20 -0.16384000000000000000e5 +1292 2 14 20 0.16384000000000000000e5 +1292 3 2 31 -0.32768000000000000000e5 +1292 3 6 35 0.32768000000000000000e5 +1292 3 14 27 -0.65536000000000000000e5 +1292 3 16 29 -0.16384000000000000000e5 +1292 3 17 30 -0.32768000000000000000e5 +1292 3 18 31 -0.32768000000000000000e5 +1292 3 19 24 0.32768000000000000000e5 +1292 3 22 27 -0.16384000000000000000e5 +1292 4 7 19 0.32768000000000000000e5 +1292 4 8 20 -0.32768000000000000000e5 +1292 4 12 16 -0.32768000000000000000e5 +1292 4 14 18 -0.16384000000000000000e5 +1293 1 3 34 -0.16384000000000000000e5 +1293 1 13 28 0.32768000000000000000e5 +1293 1 20 35 0.16384000000000000000e5 +1293 1 22 25 -0.65536000000000000000e5 +1293 1 24 31 0.65536000000000000000e5 +1293 1 25 32 -0.32768000000000000000e5 +1293 2 6 20 -0.81920000000000000000e4 +1293 2 14 20 0.81920000000000000000e4 +1293 3 6 35 0.16384000000000000000e5 +1293 3 14 27 0.32768000000000000000e5 +1293 3 16 29 -0.81920000000000000000e4 +1293 3 17 30 -0.16384000000000000000e5 +1293 3 18 31 -0.16384000000000000000e5 +1293 3 19 25 0.32768000000000000000e5 +1293 3 22 27 -0.81920000000000000000e4 +1293 4 8 20 -0.16384000000000000000e5 +1293 4 10 18 0.32768000000000000000e5 +1293 4 14 18 -0.81920000000000000000e4 +1294 3 3 32 0.32768000000000000000e5 +1294 3 4 33 0.32768000000000000000e5 +1294 3 17 30 -0.65536000000000000000e5 +1294 3 19 26 0.32768000000000000000e5 +1294 4 13 17 0.32768000000000000000e5 +1295 3 4 33 -0.32768000000000000000e5 +1295 3 19 27 0.32768000000000000000e5 +1296 3 3 32 -0.32768000000000000000e5 +1296 3 17 30 0.65536000000000000000e5 +1296 3 19 28 0.32768000000000000000e5 +1296 3 22 27 -0.65536000000000000000e5 +1296 4 4 20 0.32768000000000000000e5 +1296 4 13 17 -0.32768000000000000000e5 +1297 3 19 29 0.32768000000000000000e5 +1297 3 22 27 -0.32768000000000000000e5 +1298 3 5 34 -0.32768000000000000000e5 +1298 3 19 30 0.32768000000000000000e5 +1299 1 3 34 0.16384000000000000000e5 +1299 1 20 35 -0.16384000000000000000e5 +1299 3 6 35 -0.16384000000000000000e5 +1299 3 17 30 0.16384000000000000000e5 +1299 3 18 31 0.32768000000000000000e5 +1299 3 19 31 0.32768000000000000000e5 +1299 3 22 27 0.16384000000000000000e5 +1299 3 24 29 -0.65536000000000000000e5 +1299 4 14 18 0.16384000000000000000e5 +1299 4 15 19 0.32768000000000000000e5 +1300 1 4 27 -0.32768000000000000000e5 +1300 1 19 34 -0.65536000000000000000e5 +1300 1 26 33 0.32768000000000000000e5 +1300 1 30 33 0.65536000000000000000e5 +1300 2 4 18 -0.32768000000000000000e5 +1300 2 18 20 0.32768000000000000000e5 +1300 3 3 32 0.32768000000000000000e5 +1300 3 5 26 -0.32768000000000000000e5 +1300 3 17 22 0.65536000000000000000e5 +1300 3 18 19 -0.32768000000000000000e5 +1300 3 19 33 0.32768000000000000000e5 +1300 3 20 33 0.65536000000000000000e5 +1300 4 13 17 0.32768000000000000000e5 +1300 4 18 18 0.65536000000000000000e5 +1301 3 19 35 0.32768000000000000000e5 +1301 3 28 33 -0.32768000000000000000e5 +1302 1 11 26 -0.16384000000000000000e5 +1302 1 16 31 0.16384000000000000000e5 +1302 3 20 20 0.32768000000000000000e5 +1303 3 2 31 -0.32768000000000000000e5 +1303 3 20 21 0.32768000000000000000e5 +1304 3 18 23 -0.32768000000000000000e5 +1304 3 20 22 0.32768000000000000000e5 +1305 3 13 26 -0.32768000000000000000e5 +1305 3 20 23 0.32768000000000000000e5 +1306 1 3 34 0.16384000000000000000e5 +1306 1 13 28 -0.32768000000000000000e5 +1306 1 20 35 -0.16384000000000000000e5 +1306 1 25 32 0.32768000000000000000e5 +1306 2 6 20 0.81920000000000000000e4 +1306 2 14 20 -0.81920000000000000000e4 +1306 3 6 35 -0.16384000000000000000e5 +1306 3 16 29 0.81920000000000000000e4 +1306 3 17 30 0.16384000000000000000e5 +1306 3 18 31 0.16384000000000000000e5 +1306 3 20 24 0.32768000000000000000e5 +1306 3 22 27 0.81920000000000000000e4 +1306 4 8 20 0.16384000000000000000e5 +1306 4 14 18 0.81920000000000000000e4 +1307 3 16 29 -0.32768000000000000000e5 +1307 3 20 26 0.32768000000000000000e5 +1308 1 3 34 -0.32768000000000000000e5 +1308 1 20 35 0.32768000000000000000e5 +1308 3 6 35 0.32768000000000000000e5 +1308 3 20 27 0.32768000000000000000e5 +1309 3 17 30 -0.32768000000000000000e5 +1309 3 20 28 0.32768000000000000000e5 +1310 1 3 34 -0.16384000000000000000e5 +1310 1 20 35 0.16384000000000000000e5 +1310 2 6 20 -0.16384000000000000000e5 +1310 2 14 20 0.16384000000000000000e5 +1310 3 6 35 0.16384000000000000000e5 +1310 3 16 29 -0.16384000000000000000e5 +1310 3 17 30 -0.16384000000000000000e5 +1310 3 20 29 0.32768000000000000000e5 +1311 1 3 34 -0.16384000000000000000e5 +1311 1 20 35 0.16384000000000000000e5 +1311 3 6 35 0.16384000000000000000e5 +1311 3 17 30 -0.16384000000000000000e5 +1311 3 20 30 0.32768000000000000000e5 +1311 3 22 27 -0.16384000000000000000e5 +1311 4 14 18 -0.16384000000000000000e5 +1312 1 3 34 -0.16384000000000000000e5 +1312 1 20 35 0.16384000000000000000e5 +1312 2 6 20 -0.81920000000000000000e4 +1312 2 14 20 0.81920000000000000000e4 +1312 3 6 35 0.16384000000000000000e5 +1312 3 16 29 -0.81920000000000000000e4 +1312 3 17 30 -0.16384000000000000000e5 +1312 3 18 31 -0.16384000000000000000e5 +1312 3 20 31 0.32768000000000000000e5 +1312 3 22 27 -0.81920000000000000000e4 +1312 4 8 20 -0.16384000000000000000e5 +1312 4 14 18 -0.81920000000000000000e4 +1313 3 6 35 -0.32768000000000000000e5 +1313 3 20 32 0.32768000000000000000e5 +1314 3 20 34 0.32768000000000000000e5 +1314 3 26 31 -0.32768000000000000000e5 +1315 3 18 23 -0.16384000000000000000e5 +1315 3 21 21 0.32768000000000000000e5 +1316 1 3 34 0.32768000000000000000e5 +1316 1 13 28 -0.65536000000000000000e5 +1316 1 20 35 -0.32768000000000000000e5 +1316 1 25 32 0.65536000000000000000e5 +1316 2 6 20 0.16384000000000000000e5 +1316 2 14 20 -0.16384000000000000000e5 +1316 3 2 31 0.32768000000000000000e5 +1316 3 6 35 -0.32768000000000000000e5 +1316 3 16 29 0.16384000000000000000e5 +1316 3 17 30 0.32768000000000000000e5 +1316 3 18 23 0.32768000000000000000e5 +1316 3 18 31 0.32768000000000000000e5 +1316 3 21 22 0.32768000000000000000e5 +1316 3 22 27 0.16384000000000000000e5 +1316 4 8 20 0.32768000000000000000e5 +1316 4 12 16 0.32768000000000000000e5 +1316 4 14 18 0.16384000000000000000e5 +1317 1 3 34 0.16384000000000000000e5 +1317 1 13 28 -0.32768000000000000000e5 +1317 1 20 35 -0.16384000000000000000e5 +1317 1 25 32 0.32768000000000000000e5 +1317 2 6 20 0.81920000000000000000e4 +1317 2 14 20 -0.81920000000000000000e4 +1317 3 6 35 -0.16384000000000000000e5 +1317 3 16 29 0.81920000000000000000e4 +1317 3 17 30 0.16384000000000000000e5 +1317 3 18 31 0.16384000000000000000e5 +1317 3 21 23 0.32768000000000000000e5 +1317 3 22 27 0.81920000000000000000e4 +1317 4 8 20 0.16384000000000000000e5 +1317 4 14 18 0.81920000000000000000e4 +1318 3 14 27 -0.32768000000000000000e5 +1318 3 21 24 0.32768000000000000000e5 +1319 1 22 25 -0.32768000000000000000e5 +1319 1 24 31 0.32768000000000000000e5 +1319 3 21 25 0.32768000000000000000e5 +1320 1 3 34 -0.32768000000000000000e5 +1320 1 20 35 0.32768000000000000000e5 +1320 3 6 35 0.32768000000000000000e5 +1320 3 21 26 0.32768000000000000000e5 +1321 3 17 30 -0.32768000000000000000e5 +1321 3 21 27 0.32768000000000000000e5 +1322 3 21 28 0.32768000000000000000e5 +1322 3 22 27 -0.32768000000000000000e5 +1323 1 3 34 -0.16384000000000000000e5 +1323 1 20 35 0.16384000000000000000e5 +1323 3 6 35 0.16384000000000000000e5 +1323 3 17 30 -0.16384000000000000000e5 +1323 3 21 29 0.32768000000000000000e5 +1323 3 22 27 -0.16384000000000000000e5 +1323 4 14 18 -0.16384000000000000000e5 +1324 3 18 31 -0.32768000000000000000e5 +1324 3 21 30 0.32768000000000000000e5 +1325 3 21 31 0.32768000000000000000e5 +1325 3 24 29 -0.32768000000000000000e5 +1326 3 20 33 -0.32768000000000000000e5 +1326 3 21 32 0.32768000000000000000e5 +1327 1 19 34 -0.32768000000000000000e5 +1327 1 30 33 0.32768000000000000000e5 +1327 3 21 33 0.32768000000000000000e5 +1328 1 30 33 -0.32768000000000000000e5 +1328 1 33 34 0.32768000000000000000e5 +1328 3 21 35 0.32768000000000000000e5 +1329 1 3 34 -0.16384000000000000000e5 +1329 1 13 28 0.32768000000000000000e5 +1329 1 20 35 0.16384000000000000000e5 +1329 1 25 32 -0.32768000000000000000e5 +1329 2 6 20 -0.81920000000000000000e4 +1329 2 14 20 0.81920000000000000000e4 +1329 3 2 31 -0.16384000000000000000e5 +1329 3 6 35 0.16384000000000000000e5 +1329 3 14 27 -0.32768000000000000000e5 +1329 3 16 29 -0.81920000000000000000e4 +1329 3 17 30 -0.16384000000000000000e5 +1329 3 18 31 -0.16384000000000000000e5 +1329 3 22 22 0.32768000000000000000e5 +1329 3 22 27 -0.81920000000000000000e4 +1329 4 7 19 0.16384000000000000000e5 +1329 4 8 20 -0.16384000000000000000e5 +1329 4 12 16 -0.16384000000000000000e5 +1329 4 14 18 -0.81920000000000000000e4 +1330 3 14 27 -0.32768000000000000000e5 +1330 3 22 23 0.32768000000000000000e5 +1331 1 3 34 -0.16384000000000000000e5 +1331 1 13 28 0.32768000000000000000e5 +1331 1 20 35 0.16384000000000000000e5 +1331 1 22 25 -0.65536000000000000000e5 +1331 1 24 31 0.65536000000000000000e5 +1331 1 25 32 -0.32768000000000000000e5 +1331 2 6 20 -0.81920000000000000000e4 +1331 2 14 20 0.81920000000000000000e4 +1331 3 6 35 0.16384000000000000000e5 +1331 3 14 27 0.32768000000000000000e5 +1331 3 16 29 -0.81920000000000000000e4 +1331 3 17 30 -0.16384000000000000000e5 +1331 3 18 31 -0.16384000000000000000e5 +1331 3 22 24 0.32768000000000000000e5 +1331 3 22 27 -0.81920000000000000000e4 +1331 4 8 20 -0.16384000000000000000e5 +1331 4 10 18 0.32768000000000000000e5 +1331 4 14 18 -0.81920000000000000000e4 +1332 3 15 28 -0.32768000000000000000e5 +1332 3 22 25 0.32768000000000000000e5 +1333 3 17 30 -0.32768000000000000000e5 +1333 3 22 26 0.32768000000000000000e5 +1334 3 5 34 -0.32768000000000000000e5 +1334 3 22 28 0.32768000000000000000e5 +1335 3 18 31 -0.32768000000000000000e5 +1335 3 22 29 0.32768000000000000000e5 +1336 1 3 34 0.16384000000000000000e5 +1336 1 20 35 -0.16384000000000000000e5 +1336 3 6 35 -0.16384000000000000000e5 +1336 3 17 30 0.16384000000000000000e5 +1336 3 18 31 0.32768000000000000000e5 +1336 3 22 27 0.16384000000000000000e5 +1336 3 22 30 0.32768000000000000000e5 +1336 3 24 29 -0.65536000000000000000e5 +1336 4 14 18 0.16384000000000000000e5 +1336 4 15 19 0.32768000000000000000e5 +1337 1 19 34 -0.32768000000000000000e5 +1337 1 30 33 0.32768000000000000000e5 +1337 3 22 32 0.32768000000000000000e5 +1338 3 19 34 -0.32768000000000000000e5 +1338 3 22 33 0.32768000000000000000e5 +1339 1 9 24 -0.65536000000000000000e5 +1339 1 31 34 0.65536000000000000000e5 +1339 3 4 25 0.65536000000000000000e5 +1339 3 14 27 0.65536000000000000000e5 +1339 3 21 34 0.32768000000000000000e5 +1339 3 22 34 0.32768000000000000000e5 +1339 3 24 29 0.65536000000000000000e5 +1339 3 26 31 0.32768000000000000000e5 +1339 4 16 20 0.32768000000000000000e5 +1340 3 20 25 -0.16384000000000000000e5 +1340 3 23 23 0.32768000000000000000e5 +1341 1 22 25 -0.32768000000000000000e5 +1341 1 24 31 0.32768000000000000000e5 +1341 3 23 24 0.32768000000000000000e5 +1342 1 22 25 -0.16384000000000000000e5 +1342 1 24 31 0.16384000000000000000e5 +1342 3 15 28 -0.16384000000000000000e5 +1342 3 20 25 -0.16384000000000000000e5 +1342 3 23 25 0.32768000000000000000e5 +1342 4 16 16 -0.32768000000000000000e5 +1343 1 3 34 -0.16384000000000000000e5 +1343 1 20 35 0.16384000000000000000e5 +1343 2 6 20 -0.16384000000000000000e5 +1343 2 14 20 0.16384000000000000000e5 +1343 3 6 35 0.16384000000000000000e5 +1343 3 16 29 -0.16384000000000000000e5 +1343 3 17 30 -0.16384000000000000000e5 +1343 3 23 26 0.32768000000000000000e5 +1344 1 3 34 -0.16384000000000000000e5 +1344 1 20 35 0.16384000000000000000e5 +1344 3 6 35 0.16384000000000000000e5 +1344 3 17 30 -0.16384000000000000000e5 +1344 3 22 27 -0.16384000000000000000e5 +1344 3 23 27 0.32768000000000000000e5 +1344 4 14 18 -0.16384000000000000000e5 +1345 3 18 31 -0.32768000000000000000e5 +1345 3 23 28 0.32768000000000000000e5 +1346 1 3 34 -0.16384000000000000000e5 +1346 1 20 35 0.16384000000000000000e5 +1346 2 6 20 -0.81920000000000000000e4 +1346 2 14 20 0.81920000000000000000e4 +1346 3 6 35 0.16384000000000000000e5 +1346 3 16 29 -0.81920000000000000000e4 +1346 3 17 30 -0.16384000000000000000e5 +1346 3 18 31 -0.16384000000000000000e5 +1346 3 22 27 -0.81920000000000000000e4 +1346 3 23 29 0.32768000000000000000e5 +1346 4 8 20 -0.16384000000000000000e5 +1346 4 14 18 -0.81920000000000000000e4 +1347 3 23 30 0.32768000000000000000e5 +1347 3 24 29 -0.32768000000000000000e5 +1348 3 13 34 -0.32768000000000000000e5 +1348 3 23 31 0.32768000000000000000e5 +1349 3 23 32 0.32768000000000000000e5 +1349 3 26 31 -0.32768000000000000000e5 +1350 3 21 34 -0.32768000000000000000e5 +1350 3 23 33 0.32768000000000000000e5 +1351 1 9 24 -0.32768000000000000000e5 +1351 1 31 34 0.32768000000000000000e5 +1351 3 4 25 0.32768000000000000000e5 +1351 3 14 27 0.32768000000000000000e5 +1351 3 23 34 0.32768000000000000000e5 +1351 3 24 29 0.32768000000000000000e5 +1352 3 23 35 0.32768000000000000000e5 +1352 3 29 34 -0.32768000000000000000e5 +1353 3 15 28 -0.16384000000000000000e5 +1353 3 24 24 0.32768000000000000000e5 +1354 1 3 34 -0.16384000000000000000e5 +1354 1 20 35 0.16384000000000000000e5 +1354 3 6 35 0.16384000000000000000e5 +1354 3 17 30 -0.16384000000000000000e5 +1354 3 22 27 -0.16384000000000000000e5 +1354 3 24 26 0.32768000000000000000e5 +1354 4 14 18 -0.16384000000000000000e5 +1355 3 18 31 -0.32768000000000000000e5 +1355 3 24 27 0.32768000000000000000e5 +1356 1 3 34 0.16384000000000000000e5 +1356 1 20 35 -0.16384000000000000000e5 +1356 3 6 35 -0.16384000000000000000e5 +1356 3 17 30 0.16384000000000000000e5 +1356 3 18 31 0.32768000000000000000e5 +1356 3 22 27 0.16384000000000000000e5 +1356 3 24 28 0.32768000000000000000e5 +1356 3 24 29 -0.65536000000000000000e5 +1356 4 14 18 0.16384000000000000000e5 +1356 4 15 19 0.32768000000000000000e5 +1357 3 22 31 -0.32768000000000000000e5 +1357 3 24 30 0.32768000000000000000e5 +1358 3 24 31 0.32768000000000000000e5 +1358 3 25 30 -0.32768000000000000000e5 +1359 3 21 34 -0.32768000000000000000e5 +1359 3 24 32 0.32768000000000000000e5 +1360 1 9 24 -0.65536000000000000000e5 +1360 1 31 34 0.65536000000000000000e5 +1360 3 4 25 0.65536000000000000000e5 +1360 3 14 27 0.65536000000000000000e5 +1360 3 21 34 0.32768000000000000000e5 +1360 3 24 29 0.65536000000000000000e5 +1360 3 24 33 0.32768000000000000000e5 +1360 3 26 31 0.32768000000000000000e5 +1360 4 16 20 0.32768000000000000000e5 +1361 3 14 35 -0.32768000000000000000e5 +1361 3 24 34 0.32768000000000000000e5 +1362 1 3 34 -0.16384000000000000000e5 +1362 1 20 35 0.16384000000000000000e5 +1362 2 6 20 -0.81920000000000000000e4 +1362 2 14 20 0.81920000000000000000e4 +1362 3 6 35 0.16384000000000000000e5 +1362 3 16 29 -0.81920000000000000000e4 +1362 3 17 30 -0.16384000000000000000e5 +1362 3 18 31 -0.16384000000000000000e5 +1362 3 22 27 -0.81920000000000000000e4 +1362 3 25 26 0.32768000000000000000e5 +1362 4 8 20 -0.16384000000000000000e5 +1362 4 14 18 -0.81920000000000000000e4 +1363 3 24 29 -0.32768000000000000000e5 +1363 3 25 27 0.32768000000000000000e5 +1364 3 22 31 -0.32768000000000000000e5 +1364 3 25 28 0.32768000000000000000e5 +1365 3 13 34 -0.32768000000000000000e5 +1365 3 25 29 0.32768000000000000000e5 +1366 3 15 34 -0.32768000000000000000e5 +1366 3 25 31 0.32768000000000000000e5 +1367 1 9 24 -0.32768000000000000000e5 +1367 1 31 34 0.32768000000000000000e5 +1367 3 4 25 0.32768000000000000000e5 +1367 3 14 27 0.32768000000000000000e5 +1367 3 24 29 0.32768000000000000000e5 +1367 3 25 32 0.32768000000000000000e5 +1368 3 14 35 -0.32768000000000000000e5 +1368 3 25 33 0.32768000000000000000e5 +1369 3 25 35 0.32768000000000000000e5 +1369 3 31 34 -0.32768000000000000000e5 +1370 1 2 33 -0.16384000000000000000e5 +1370 1 3 34 0.32768000000000000000e5 +1370 1 4 27 -0.16384000000000000000e5 +1370 1 4 35 -0.16384000000000000000e5 +1370 2 4 18 -0.16384000000000000000e5 +1370 2 12 18 -0.16384000000000000000e5 +1370 2 18 20 0.16384000000000000000e5 +1370 3 3 32 0.16384000000000000000e5 +1370 3 4 33 0.16384000000000000000e5 +1370 3 5 26 -0.16384000000000000000e5 +1370 3 6 35 -0.32768000000000000000e5 +1370 3 17 22 0.32768000000000000000e5 +1370 3 17 30 -0.32768000000000000000e5 +1370 3 18 19 -0.16384000000000000000e5 +1370 3 19 32 -0.16384000000000000000e5 +1370 3 20 33 0.32768000000000000000e5 +1370 3 26 26 0.32768000000000000000e5 +1370 4 13 17 0.32768000000000000000e5 +1370 4 17 17 0.32768000000000000000e5 +1371 1 2 33 0.32768000000000000000e5 +1371 1 3 34 -0.65536000000000000000e5 +1371 1 4 35 0.32768000000000000000e5 +1371 1 26 33 0.32768000000000000000e5 +1371 2 12 18 0.32768000000000000000e5 +1371 3 4 33 -0.32768000000000000000e5 +1371 3 17 30 0.65536000000000000000e5 +1371 3 26 27 0.32768000000000000000e5 +1371 4 13 17 -0.32768000000000000000e5 +1372 1 4 27 0.32768000000000000000e5 +1372 1 26 33 -0.32768000000000000000e5 +1372 2 4 18 0.32768000000000000000e5 +1372 2 18 20 -0.32768000000000000000e5 +1372 3 3 32 -0.32768000000000000000e5 +1372 3 5 26 0.32768000000000000000e5 +1372 3 17 22 -0.65536000000000000000e5 +1372 3 18 19 0.32768000000000000000e5 +1372 3 19 32 0.32768000000000000000e5 +1372 3 20 33 -0.65536000000000000000e5 +1372 3 26 28 0.32768000000000000000e5 +1372 4 13 17 -0.32768000000000000000e5 +1373 3 6 35 -0.32768000000000000000e5 +1373 3 26 29 0.32768000000000000000e5 +1374 3 20 33 -0.32768000000000000000e5 +1374 3 26 30 0.32768000000000000000e5 +1375 1 3 34 -0.65536000000000000000e5 +1375 1 4 27 -0.32768000000000000000e5 +1375 1 4 35 -0.32768000000000000000e5 +1375 1 17 24 0.13107200000000000000e6 +1375 1 20 27 -0.65536000000000000000e5 +1375 1 28 35 -0.32768000000000000000e5 +1375 2 4 18 -0.32768000000000000000e5 +1375 2 6 20 -0.65536000000000000000e5 +1375 2 18 20 0.32768000000000000000e5 +1375 2 20 20 -0.65536000000000000000e5 +1375 3 2 31 -0.13107200000000000000e6 +1375 3 3 32 0.32768000000000000000e5 +1375 3 5 26 -0.32768000000000000000e5 +1375 3 17 22 0.65536000000000000000e5 +1375 3 17 30 -0.65536000000000000000e5 +1375 3 18 19 -0.32768000000000000000e5 +1375 3 19 32 -0.32768000000000000000e5 +1375 3 20 35 -0.65536000000000000000e5 +1375 3 26 32 0.32768000000000000000e5 +1375 3 27 32 0.32768000000000000000e5 +1375 4 13 17 0.32768000000000000000e5 +1376 3 26 33 0.32768000000000000000e5 +1376 3 27 32 -0.32768000000000000000e5 +1377 3 20 35 -0.32768000000000000000e5 +1377 3 26 34 0.32768000000000000000e5 +1378 1 4 27 -0.32768000000000000000e5 +1378 1 4 35 -0.32768000000000000000e5 +1378 1 26 33 0.32768000000000000000e5 +1378 1 32 35 0.32768000000000000000e5 +1378 2 4 18 -0.32768000000000000000e5 +1378 2 18 20 0.32768000000000000000e5 +1378 3 3 32 0.32768000000000000000e5 +1378 3 5 26 -0.32768000000000000000e5 +1378 3 17 22 0.65536000000000000000e5 +1378 3 18 19 -0.32768000000000000000e5 +1378 3 19 32 -0.32768000000000000000e5 +1378 3 20 33 0.65536000000000000000e5 +1378 3 26 35 0.32768000000000000000e5 +1378 3 27 32 0.32768000000000000000e5 +1378 4 13 17 0.32768000000000000000e5 +1379 1 4 27 0.16384000000000000000e5 +1379 1 26 33 -0.16384000000000000000e5 +1379 2 4 18 0.16384000000000000000e5 +1379 2 18 20 -0.16384000000000000000e5 +1379 3 3 32 -0.16384000000000000000e5 +1379 3 5 26 0.16384000000000000000e5 +1379 3 17 22 -0.32768000000000000000e5 +1379 3 18 19 0.16384000000000000000e5 +1379 3 19 32 0.16384000000000000000e5 +1379 3 20 33 -0.32768000000000000000e5 +1379 3 27 27 0.32768000000000000000e5 +1379 4 13 17 -0.16384000000000000000e5 +1380 3 19 32 -0.32768000000000000000e5 +1380 3 27 28 0.32768000000000000000e5 +1381 3 20 33 -0.32768000000000000000e5 +1381 3 27 29 0.32768000000000000000e5 +1382 1 19 34 -0.32768000000000000000e5 +1382 1 30 33 0.32768000000000000000e5 +1382 3 27 30 0.32768000000000000000e5 +1383 3 21 34 -0.32768000000000000000e5 +1383 3 27 31 0.32768000000000000000e5 +1384 1 3 34 0.65536000000000000000e5 +1384 1 4 27 0.32768000000000000000e5 +1384 1 4 35 0.32768000000000000000e5 +1384 1 17 24 -0.13107200000000000000e6 +1384 1 20 27 0.65536000000000000000e5 +1384 1 28 35 0.32768000000000000000e5 +1384 2 4 18 0.32768000000000000000e5 +1384 2 6 20 0.65536000000000000000e5 +1384 3 2 31 0.13107200000000000000e6 +1384 3 3 32 -0.32768000000000000000e5 +1384 3 5 26 0.32768000000000000000e5 +1384 3 17 22 -0.65536000000000000000e5 +1384 3 17 30 0.65536000000000000000e5 +1384 3 18 19 0.32768000000000000000e5 +1384 3 19 32 0.32768000000000000000e5 +1384 3 27 33 0.32768000000000000000e5 +1384 4 13 17 -0.32768000000000000000e5 +1385 1 30 33 -0.32768000000000000000e5 +1385 1 33 34 0.32768000000000000000e5 +1385 3 27 34 0.32768000000000000000e5 +1386 3 27 35 0.32768000000000000000e5 +1386 3 32 33 -0.32768000000000000000e5 +1387 1 4 27 -0.16384000000000000000e5 +1387 1 19 34 -0.32768000000000000000e5 +1387 1 26 33 0.16384000000000000000e5 +1387 1 30 33 0.32768000000000000000e5 +1387 2 4 18 -0.16384000000000000000e5 +1387 2 18 20 0.16384000000000000000e5 +1387 3 3 32 0.16384000000000000000e5 +1387 3 5 26 -0.16384000000000000000e5 +1387 3 17 22 0.32768000000000000000e5 +1387 3 18 19 -0.16384000000000000000e5 +1387 3 20 33 0.32768000000000000000e5 +1387 3 28 28 0.32768000000000000000e5 +1387 4 13 17 0.16384000000000000000e5 +1387 4 18 18 0.32768000000000000000e5 +1388 1 19 34 -0.32768000000000000000e5 +1388 1 30 33 0.32768000000000000000e5 +1388 3 28 29 0.32768000000000000000e5 +1389 3 19 34 -0.32768000000000000000e5 +1389 3 28 30 0.32768000000000000000e5 +1390 1 9 24 -0.65536000000000000000e5 +1390 1 31 34 0.65536000000000000000e5 +1390 3 4 25 0.65536000000000000000e5 +1390 3 14 27 0.65536000000000000000e5 +1390 3 21 34 0.32768000000000000000e5 +1390 3 24 29 0.65536000000000000000e5 +1390 3 26 31 0.32768000000000000000e5 +1390 3 28 31 0.32768000000000000000e5 +1390 4 16 20 0.32768000000000000000e5 +1391 1 3 34 0.65536000000000000000e5 +1391 1 4 27 0.32768000000000000000e5 +1391 1 4 35 0.32768000000000000000e5 +1391 1 17 24 -0.13107200000000000000e6 +1391 1 20 27 0.65536000000000000000e5 +1391 1 28 35 0.32768000000000000000e5 +1391 2 4 18 0.32768000000000000000e5 +1391 2 6 20 0.65536000000000000000e5 +1391 3 2 31 0.13107200000000000000e6 +1391 3 3 32 -0.32768000000000000000e5 +1391 3 5 26 0.32768000000000000000e5 +1391 3 17 22 -0.65536000000000000000e5 +1391 3 17 30 0.65536000000000000000e5 +1391 3 18 19 0.32768000000000000000e5 +1391 3 19 32 0.32768000000000000000e5 +1391 3 28 32 0.32768000000000000000e5 +1391 4 13 17 -0.32768000000000000000e5 +1392 3 22 35 -0.32768000000000000000e5 +1392 3 28 34 0.32768000000000000000e5 +1393 1 4 27 0.32768000000000000000e5 +1393 1 4 35 0.32768000000000000000e5 +1393 1 26 33 -0.32768000000000000000e5 +1393 1 32 35 -0.32768000000000000000e5 +1393 1 33 34 -0.65536000000000000000e5 +1393 1 34 35 0.65536000000000000000e5 +1393 2 4 18 0.32768000000000000000e5 +1393 2 18 20 -0.32768000000000000000e5 +1393 3 3 32 -0.32768000000000000000e5 +1393 3 5 26 0.32768000000000000000e5 +1393 3 17 22 -0.65536000000000000000e5 +1393 3 18 19 0.32768000000000000000e5 +1393 3 19 32 0.32768000000000000000e5 +1393 3 20 33 -0.65536000000000000000e5 +1393 3 27 32 -0.32768000000000000000e5 +1393 3 28 35 0.32768000000000000000e5 +1393 3 32 33 0.32768000000000000000e5 +1393 4 13 17 -0.32768000000000000000e5 +1393 4 20 20 0.65536000000000000000e5 +1394 3 26 31 -0.16384000000000000000e5 +1394 3 29 29 0.32768000000000000000e5 +1395 3 21 34 -0.32768000000000000000e5 +1395 3 29 30 0.32768000000000000000e5 +1396 1 9 24 -0.32768000000000000000e5 +1396 1 31 34 0.32768000000000000000e5 +1396 3 4 25 0.32768000000000000000e5 +1396 3 14 27 0.32768000000000000000e5 +1396 3 24 29 0.32768000000000000000e5 +1396 3 29 31 0.32768000000000000000e5 +1397 3 20 35 -0.32768000000000000000e5 +1397 3 29 32 0.32768000000000000000e5 +1398 1 30 33 -0.32768000000000000000e5 +1398 1 33 34 0.32768000000000000000e5 +1398 3 29 33 0.32768000000000000000e5 +1399 1 33 34 -0.32768000000000000000e5 +1399 1 34 35 0.32768000000000000000e5 +1399 3 29 35 0.32768000000000000000e5 +1400 1 9 24 -0.32768000000000000000e5 +1400 1 31 34 0.32768000000000000000e5 +1400 3 4 25 0.32768000000000000000e5 +1400 3 14 27 0.32768000000000000000e5 +1400 3 21 34 0.16384000000000000000e5 +1400 3 24 29 0.32768000000000000000e5 +1400 3 26 31 0.16384000000000000000e5 +1400 3 30 30 0.32768000000000000000e5 +1400 4 16 20 0.16384000000000000000e5 +1401 3 14 35 -0.32768000000000000000e5 +1401 3 30 31 0.32768000000000000000e5 +1402 1 30 33 -0.32768000000000000000e5 +1402 1 33 34 0.32768000000000000000e5 +1402 3 30 32 0.32768000000000000000e5 +1403 3 22 35 -0.32768000000000000000e5 +1403 3 30 33 0.32768000000000000000e5 +1404 3 24 35 -0.32768000000000000000e5 +1404 3 30 34 0.32768000000000000000e5 +1405 3 25 34 -0.16384000000000000000e5 +1405 3 31 31 0.32768000000000000000e5 +1406 3 29 34 -0.32768000000000000000e5 +1406 3 31 32 0.32768000000000000000e5 +1407 3 24 35 -0.32768000000000000000e5 +1407 3 31 33 0.32768000000000000000e5 +1408 3 31 35 0.32768000000000000000e5 +1408 3 34 34 -0.65536000000000000000e5 +1409 1 4 27 -0.16384000000000000000e5 +1409 1 4 35 -0.16384000000000000000e5 +1409 1 26 33 0.16384000000000000000e5 +1409 1 32 35 0.16384000000000000000e5 +1409 2 4 18 -0.16384000000000000000e5 +1409 2 18 20 0.16384000000000000000e5 +1409 3 3 32 0.16384000000000000000e5 +1409 3 5 26 -0.16384000000000000000e5 +1409 3 17 22 0.32768000000000000000e5 +1409 3 18 19 -0.16384000000000000000e5 +1409 3 19 32 -0.16384000000000000000e5 +1409 3 20 33 0.32768000000000000000e5 +1409 3 27 32 0.16384000000000000000e5 +1409 3 32 32 0.32768000000000000000e5 +1409 4 13 17 0.16384000000000000000e5 +1410 1 33 34 -0.32768000000000000000e5 +1410 1 34 35 0.32768000000000000000e5 +1410 3 32 34 0.32768000000000000000e5 +1411 1 4 27 0.16384000000000000000e5 +1411 1 4 35 0.16384000000000000000e5 +1411 1 26 33 -0.16384000000000000000e5 +1411 1 32 35 -0.16384000000000000000e5 +1411 1 33 34 -0.32768000000000000000e5 +1411 1 34 35 0.32768000000000000000e5 +1411 2 4 18 0.16384000000000000000e5 +1411 2 18 20 -0.16384000000000000000e5 +1411 3 3 32 -0.16384000000000000000e5 +1411 3 5 26 0.16384000000000000000e5 +1411 3 17 22 -0.32768000000000000000e5 +1411 3 18 19 0.16384000000000000000e5 +1411 3 19 32 0.16384000000000000000e5 +1411 3 20 33 -0.32768000000000000000e5 +1411 3 27 32 -0.16384000000000000000e5 +1411 3 32 33 0.16384000000000000000e5 +1411 3 33 33 0.32768000000000000000e5 +1411 4 13 17 -0.16384000000000000000e5 +1411 4 20 20 0.32768000000000000000e5 +1412 3 30 35 -0.32768000000000000000e5 +1412 3 33 34 0.32768000000000000000e5 +1413 1 1 8 -0.65536000000000000000e5 +1413 1 2 5 -0.32768000000000000000e5 +1413 1 3 18 0.32768000000000000000e5 +1413 1 5 20 0.65536000000000000000e5 +1413 1 6 21 0.13107200000000000000e6 +1413 1 11 26 -0.13107200000000000000e6 +1413 2 1 15 -0.65536000000000000000e5 +1413 2 6 12 0.65536000000000000000e5 +1413 3 1 2 0.32768000000000000000e5 +1413 3 2 7 0.65536000000000000000e5 +1413 3 7 20 -0.13107200000000000000e6 +1413 4 1 2 0.32768000000000000000e5 +1413 4 2 2 -0.65536000000000000000e5 +1414 4 1 3 0.32768000000000000000e5 +1414 4 2 2 -0.65536000000000000000e5 +1415 2 2 4 -0.32768000000000000000e5 +1415 2 3 17 0.32768000000000000000e5 +1415 4 1 4 0.32768000000000000000e5 +1415 4 1 13 0.32768000000000000000e5 +1416 2 1 7 -0.32768000000000000000e5 +1416 2 1 15 0.32768000000000000000e5 +1416 4 1 6 0.32768000000000000000e5 +1417 4 1 7 0.32768000000000000000e5 +1417 4 2 6 -0.32768000000000000000e5 +1418 1 1 8 0.32768000000000000000e5 +1418 1 2 9 0.16384000000000000000e5 +1418 1 4 11 -0.65536000000000000000e5 +1418 1 5 12 -0.32768000000000000000e5 +1418 1 5 20 -0.32768000000000000000e5 +1418 1 6 21 -0.98304000000000000000e5 +1418 1 7 10 -0.65536000000000000000e5 +1418 1 9 16 -0.16384000000000000000e5 +1418 1 12 19 0.32768000000000000000e5 +1418 1 12 27 -0.32768000000000000000e5 +1418 1 13 20 0.13107200000000000000e6 +1418 2 1 7 0.16384000000000000000e5 +1418 2 1 15 0.16384000000000000000e5 +1418 2 2 16 -0.32768000000000000000e5 +1418 2 3 9 -0.32768000000000000000e5 +1418 2 6 12 -0.32768000000000000000e5 +1418 2 8 14 -0.65536000000000000000e5 +1418 3 1 6 0.16384000000000000000e5 +1418 3 1 14 -0.65536000000000000000e5 +1418 3 2 7 0.32768000000000000000e5 +1418 3 2 15 0.13107200000000000000e6 +1418 3 5 10 -0.65536000000000000000e5 +1418 3 8 21 -0.32768000000000000000e5 +1418 4 1 5 0.16384000000000000000e5 +1418 4 1 8 0.32768000000000000000e5 +1418 4 4 8 -0.32768000000000000000e5 +1418 4 5 9 -0.65536000000000000000e5 +1419 1 1 8 0.16384000000000000000e5 +1419 1 2 9 0.16384000000000000000e5 +1419 1 4 11 -0.32768000000000000000e5 +1419 1 5 12 -0.32768000000000000000e5 +1419 1 5 20 -0.16384000000000000000e5 +1419 1 6 21 -0.32768000000000000000e5 +1419 1 8 23 0.65536000000000000000e5 +1419 1 9 16 -0.16384000000000000000e5 +1419 1 12 19 0.32768000000000000000e5 +1419 1 12 27 -0.32768000000000000000e5 +1419 2 1 7 0.16384000000000000000e5 +1419 2 3 9 -0.32768000000000000000e5 +1419 2 6 12 -0.16384000000000000000e5 +1419 3 1 14 -0.13107200000000000000e6 +1419 3 2 7 0.16384000000000000000e5 +1419 3 2 15 0.13107200000000000000e6 +1419 3 5 10 -0.65536000000000000000e5 +1419 3 8 21 -0.32768000000000000000e5 +1419 4 1 9 0.32768000000000000000e5 +1419 4 4 8 -0.32768000000000000000e5 +1419 4 5 9 -0.65536000000000000000e5 +1420 2 6 8 -0.32768000000000000000e5 +1420 2 8 14 0.32768000000000000000e5 +1420 4 1 10 0.32768000000000000000e5 +1421 1 1 8 0.65536000000000000000e5 +1421 1 2 5 0.32768000000000000000e5 +1421 1 3 18 -0.32768000000000000000e5 +1421 1 5 20 -0.65536000000000000000e5 +1421 1 6 21 -0.13107200000000000000e6 +1421 1 11 26 0.13107200000000000000e6 +1421 2 1 3 -0.32768000000000000000e5 +1421 2 1 15 0.65536000000000000000e5 +1421 2 6 12 -0.65536000000000000000e5 +1421 2 11 11 0.65536000000000000000e5 +1421 3 1 2 -0.32768000000000000000e5 +1421 3 2 7 -0.65536000000000000000e5 +1421 3 7 20 0.13107200000000000000e6 +1421 4 1 11 0.32768000000000000000e5 +1421 4 2 2 0.65536000000000000000e5 +1422 1 2 17 0.32768000000000000000e5 +1422 1 4 27 -0.32768000000000000000e5 +1422 1 5 20 0.65536000000000000000e5 +1422 1 9 16 0.13107200000000000000e6 +1422 1 11 26 -0.13107200000000000000e6 +1422 2 3 17 -0.32768000000000000000e5 +1422 2 6 12 0.65536000000000000000e5 +1422 2 11 17 0.32768000000000000000e5 +1422 3 4 17 -0.32768000000000000000e5 +1422 3 7 20 -0.13107200000000000000e6 +1422 4 1 12 0.32768000000000000000e5 +1422 4 1 13 -0.32768000000000000000e5 +1422 4 11 11 0.65536000000000000000e5 +1423 2 1 15 -0.32768000000000000000e5 +1423 2 1 19 0.32768000000000000000e5 +1423 4 1 14 0.32768000000000000000e5 +1424 4 1 15 0.32768000000000000000e5 +1424 4 2 14 -0.32768000000000000000e5 +1425 2 2 16 -0.32768000000000000000e5 +1425 2 5 19 0.32768000000000000000e5 +1425 4 1 16 0.32768000000000000000e5 +1426 4 1 17 0.32768000000000000000e5 +1426 4 11 11 -0.65536000000000000000e5 +1427 1 1 32 0.32768000000000000000e5 +1427 1 2 33 0.32768000000000000000e5 +1427 1 4 35 0.32768000000000000000e5 +1427 1 16 31 -0.13107200000000000000e6 +1427 1 20 27 0.13107200000000000000e6 +1427 2 3 17 -0.32768000000000000000e5 +1427 2 6 12 0.65536000000000000000e5 +1427 2 11 17 0.32768000000000000000e5 +1427 2 12 18 0.32768000000000000000e5 +1427 3 3 32 -0.32768000000000000000e5 +1427 3 4 33 -0.32768000000000000000e5 +1427 3 17 30 0.65536000000000000000e5 +1427 4 1 18 0.32768000000000000000e5 +1427 4 2 14 -0.65536000000000000000e5 +1427 4 5 17 -0.65536000000000000000e5 +1427 4 13 17 -0.32768000000000000000e5 +1428 4 1 19 0.32768000000000000000e5 +1428 4 5 17 -0.32768000000000000000e5 +1429 1 1 32 -0.32768000000000000000e5 +1429 1 2 33 -0.32768000000000000000e5 +1429 1 4 35 -0.32768000000000000000e5 +1429 1 16 31 0.13107200000000000000e6 +1429 1 20 27 -0.13107200000000000000e6 +1429 2 6 12 -0.65536000000000000000e5 +1429 2 11 17 -0.32768000000000000000e5 +1429 2 12 18 -0.32768000000000000000e5 +1429 2 17 17 0.65536000000000000000e5 +1429 3 3 32 0.32768000000000000000e5 +1429 3 4 33 0.32768000000000000000e5 +1429 3 17 30 -0.65536000000000000000e5 +1429 4 1 20 0.32768000000000000000e5 +1429 4 2 14 0.65536000000000000000e5 +1429 4 5 17 0.65536000000000000000e5 +1429 4 13 17 0.32768000000000000000e5 +1430 2 2 4 -0.32768000000000000000e5 +1430 2 3 17 0.32768000000000000000e5 +1430 4 1 13 0.32768000000000000000e5 +1430 4 2 3 0.32768000000000000000e5 +1431 4 2 4 0.32768000000000000000e5 +1431 4 3 3 -0.65536000000000000000e5 +1432 2 1 7 -0.32768000000000000000e5 +1432 2 1 15 0.32768000000000000000e5 +1432 4 2 5 0.32768000000000000000e5 +1433 1 2 9 0.32768000000000000000e5 +1433 1 4 11 -0.65536000000000000000e5 +1433 1 7 22 0.65536000000000000000e5 +1433 1 9 16 -0.32768000000000000000e5 +1433 3 4 9 -0.32768000000000000000e5 +1433 3 5 10 0.65536000000000000000e5 +1433 4 2 7 0.32768000000000000000e5 +1433 4 3 7 -0.32768000000000000000e5 +1434 1 1 8 0.16384000000000000000e5 +1434 1 2 9 0.16384000000000000000e5 +1434 1 4 11 -0.32768000000000000000e5 +1434 1 5 12 -0.32768000000000000000e5 +1434 1 5 20 -0.16384000000000000000e5 +1434 1 6 21 -0.32768000000000000000e5 +1434 1 8 23 0.65536000000000000000e5 +1434 1 9 16 -0.16384000000000000000e5 +1434 1 12 19 0.32768000000000000000e5 +1434 1 12 27 -0.32768000000000000000e5 +1434 2 1 7 0.16384000000000000000e5 +1434 2 3 9 -0.32768000000000000000e5 +1434 2 6 12 -0.16384000000000000000e5 +1434 3 1 14 -0.13107200000000000000e6 +1434 3 2 7 0.16384000000000000000e5 +1434 3 2 15 0.13107200000000000000e6 +1434 3 5 10 -0.65536000000000000000e5 +1434 3 8 21 -0.32768000000000000000e5 +1434 4 2 8 0.32768000000000000000e5 +1434 4 4 8 -0.32768000000000000000e5 +1434 4 5 9 -0.65536000000000000000e5 +1435 1 7 22 -0.32768000000000000000e5 +1435 1 8 23 0.65536000000000000000e5 +1435 1 11 26 -0.32768000000000000000e5 +1435 1 12 27 -0.32768000000000000000e5 +1435 2 3 9 -0.32768000000000000000e5 +1435 3 7 20 -0.32768000000000000000e5 +1435 3 8 21 -0.32768000000000000000e5 +1435 4 2 9 0.32768000000000000000e5 +1436 4 2 10 0.32768000000000000000e5 +1436 4 5 9 -0.32768000000000000000e5 +1437 1 2 17 0.32768000000000000000e5 +1437 1 4 27 -0.32768000000000000000e5 +1437 1 5 20 0.65536000000000000000e5 +1437 1 9 16 0.13107200000000000000e6 +1437 1 11 26 -0.13107200000000000000e6 +1437 2 3 17 -0.32768000000000000000e5 +1437 2 6 12 0.65536000000000000000e5 +1437 2 11 17 0.32768000000000000000e5 +1437 3 4 17 -0.32768000000000000000e5 +1437 3 7 20 -0.13107200000000000000e6 +1437 4 1 13 -0.32768000000000000000e5 +1437 4 2 11 0.32768000000000000000e5 +1437 4 11 11 0.65536000000000000000e5 +1438 4 1 13 -0.32768000000000000000e5 +1438 4 2 12 0.32768000000000000000e5 +1439 1 4 19 0.32768000000000000000e5 +1439 1 4 35 -0.32768000000000000000e5 +1439 1 9 16 0.65536000000000000000e5 +1439 1 20 27 -0.65536000000000000000e5 +1439 3 1 30 -0.65536000000000000000e5 +1439 3 3 16 -0.32768000000000000000e5 +1439 3 3 32 0.32768000000000000000e5 +1439 3 4 33 0.32768000000000000000e5 +1439 3 5 26 -0.32768000000000000000e5 +1439 3 6 19 -0.65536000000000000000e5 +1439 3 17 30 -0.65536000000000000000e5 +1439 4 1 13 -0.32768000000000000000e5 +1439 4 2 13 0.32768000000000000000e5 +1439 4 13 17 0.32768000000000000000e5 +1440 4 2 15 0.32768000000000000000e5 +1440 4 7 11 -0.32768000000000000000e5 +1441 4 2 16 0.32768000000000000000e5 +1441 4 8 12 -0.32768000000000000000e5 +1442 1 1 32 0.32768000000000000000e5 +1442 1 2 33 0.32768000000000000000e5 +1442 1 4 35 0.32768000000000000000e5 +1442 1 16 31 -0.13107200000000000000e6 +1442 1 20 27 0.13107200000000000000e6 +1442 2 3 17 -0.32768000000000000000e5 +1442 2 6 12 0.65536000000000000000e5 +1442 2 11 17 0.32768000000000000000e5 +1442 2 12 18 0.32768000000000000000e5 +1442 3 3 32 -0.32768000000000000000e5 +1442 3 4 33 -0.32768000000000000000e5 +1442 3 17 30 0.65536000000000000000e5 +1442 4 2 14 -0.65536000000000000000e5 +1442 4 2 17 0.32768000000000000000e5 +1442 4 5 17 -0.65536000000000000000e5 +1442 4 13 17 -0.32768000000000000000e5 +1443 1 3 18 0.32768000000000000000e5 +1443 1 4 27 0.32768000000000000000e5 +1443 1 4 35 0.32768000000000000000e5 +1443 1 5 20 -0.65536000000000000000e5 +1443 1 9 16 -0.65536000000000000000e5 +1443 1 20 27 0.65536000000000000000e5 +1443 2 12 18 0.32768000000000000000e5 +1443 3 1 30 0.65536000000000000000e5 +1443 3 3 16 0.32768000000000000000e5 +1443 3 3 32 -0.32768000000000000000e5 +1443 3 4 17 0.32768000000000000000e5 +1443 3 4 33 -0.32768000000000000000e5 +1443 3 5 26 0.32768000000000000000e5 +1443 3 6 19 0.65536000000000000000e5 +1443 3 17 30 0.65536000000000000000e5 +1443 4 1 13 0.32768000000000000000e5 +1443 4 2 18 0.32768000000000000000e5 +1443 4 13 17 -0.32768000000000000000e5 +1444 1 3 34 -0.32768000000000000000e5 +1444 1 5 20 0.32768000000000000000e5 +1444 3 1 30 0.32768000000000000000e5 +1444 3 2 31 -0.65536000000000000000e5 +1444 3 6 19 -0.32768000000000000000e5 +1444 3 17 22 0.32768000000000000000e5 +1444 4 2 19 0.32768000000000000000e5 +1445 1 2 33 0.32768000000000000000e5 +1445 1 3 34 -0.65536000000000000000e5 +1445 1 17 32 -0.32768000000000000000e5 +1445 1 20 35 0.65536000000000000000e5 +1445 3 4 33 -0.32768000000000000000e5 +1445 3 6 35 0.65536000000000000000e5 +1445 3 17 30 0.65536000000000000000e5 +1445 4 2 20 0.32768000000000000000e5 +1445 4 13 17 -0.32768000000000000000e5 +1446 1 2 5 -0.32768000000000000000e5 +1446 1 2 9 -0.13107200000000000000e6 +1446 1 3 18 0.32768000000000000000e5 +1446 1 4 11 -0.52428800000000000000e6 +1446 1 5 12 -0.26214400000000000000e6 +1446 1 7 22 0.26214400000000000000e6 +1446 1 8 23 0.52428800000000000000e6 +1446 1 9 16 0.13107200000000000000e6 +1446 1 11 26 -0.26214400000000000000e6 +1446 1 12 19 0.26214400000000000000e6 +1446 1 12 27 -0.26214400000000000000e6 +1446 2 3 9 -0.26214400000000000000e6 +1446 3 1 14 -0.52428800000000000000e6 +1446 3 2 7 -0.13107200000000000000e6 +1446 3 2 15 0.10485760000000000000e7 +1446 3 4 5 0.32768000000000000000e5 +1446 3 4 9 0.65536000000000000000e5 +1446 3 5 10 -0.65536000000000000000e6 +1446 3 7 20 -0.26214400000000000000e6 +1446 3 8 21 -0.26214400000000000000e6 +1446 4 2 6 -0.13107200000000000000e6 +1446 4 3 3 -0.65536000000000000000e5 +1446 4 3 4 0.32768000000000000000e5 +1446 4 3 7 0.65536000000000000000e5 +1446 4 4 8 -0.26214400000000000000e6 +1446 4 5 9 -0.52428800000000000000e6 +1447 4 2 6 -0.32768000000000000000e5 +1447 4 3 5 0.32768000000000000000e5 +1448 1 2 9 0.32768000000000000000e5 +1448 1 4 11 -0.65536000000000000000e5 +1448 1 7 22 0.65536000000000000000e5 +1448 1 9 16 -0.32768000000000000000e5 +1448 3 4 9 -0.32768000000000000000e5 +1448 3 5 10 0.65536000000000000000e5 +1448 4 3 6 0.32768000000000000000e5 +1448 4 3 7 -0.32768000000000000000e5 +1449 1 7 22 -0.32768000000000000000e5 +1449 1 8 23 0.65536000000000000000e5 +1449 1 11 26 -0.32768000000000000000e5 +1449 1 12 27 -0.32768000000000000000e5 +1449 2 3 9 -0.32768000000000000000e5 +1449 3 7 20 -0.32768000000000000000e5 +1449 3 8 21 -0.32768000000000000000e5 +1449 4 3 8 0.32768000000000000000e5 +1450 4 3 9 0.32768000000000000000e5 +1450 4 4 8 -0.32768000000000000000e5 +1451 1 8 23 -0.32768000000000000000e5 +1451 1 9 24 -0.32768000000000000000e5 +1451 1 13 28 -0.32768000000000000000e5 +1451 1 14 21 0.65536000000000000000e5 +1451 2 4 10 -0.32768000000000000000e5 +1451 3 13 18 -0.32768000000000000000e5 +1451 4 3 10 0.32768000000000000000e5 +1452 4 1 13 -0.32768000000000000000e5 +1452 4 3 11 0.32768000000000000000e5 +1453 1 4 19 0.32768000000000000000e5 +1453 1 4 35 -0.32768000000000000000e5 +1453 1 9 16 0.65536000000000000000e5 +1453 1 20 27 -0.65536000000000000000e5 +1453 3 1 30 -0.65536000000000000000e5 +1453 3 3 16 -0.32768000000000000000e5 +1453 3 3 32 0.32768000000000000000e5 +1453 3 4 33 0.32768000000000000000e5 +1453 3 5 26 -0.32768000000000000000e5 +1453 3 6 19 -0.65536000000000000000e5 +1453 3 17 30 -0.65536000000000000000e5 +1453 4 1 13 -0.32768000000000000000e5 +1453 4 3 12 0.32768000000000000000e5 +1453 4 13 17 0.32768000000000000000e5 +1454 1 4 19 0.32768000000000000000e5 +1454 1 4 35 -0.32768000000000000000e5 +1454 1 7 22 -0.13107200000000000000e6 +1454 1 9 16 0.65536000000000000000e5 +1454 1 17 24 0.13107200000000000000e6 +1454 1 20 27 -0.65536000000000000000e5 +1454 3 1 30 -0.65536000000000000000e5 +1454 3 3 32 0.32768000000000000000e5 +1454 3 4 17 0.32768000000000000000e5 +1454 3 4 33 0.32768000000000000000e5 +1454 3 5 18 0.32768000000000000000e5 +1454 3 5 26 -0.32768000000000000000e5 +1454 3 6 19 0.65536000000000000000e5 +1454 3 17 30 -0.65536000000000000000e5 +1454 4 3 13 0.32768000000000000000e5 +1454 4 7 11 0.65536000000000000000e5 +1454 4 13 17 0.32768000000000000000e5 +1455 4 3 14 0.32768000000000000000e5 +1455 4 7 11 -0.32768000000000000000e5 +1456 1 7 22 0.32768000000000000000e5 +1456 1 17 24 -0.32768000000000000000e5 +1456 3 4 25 0.65536000000000000000e5 +1456 3 9 22 -0.32768000000000000000e5 +1456 3 13 18 -0.65536000000000000000e5 +1456 4 3 16 0.32768000000000000000e5 +1456 4 4 16 -0.32768000000000000000e5 +1457 1 3 18 0.32768000000000000000e5 +1457 1 4 27 0.32768000000000000000e5 +1457 1 4 35 0.32768000000000000000e5 +1457 1 5 20 -0.65536000000000000000e5 +1457 1 9 16 -0.65536000000000000000e5 +1457 1 20 27 0.65536000000000000000e5 +1457 2 12 18 0.32768000000000000000e5 +1457 3 1 30 0.65536000000000000000e5 +1457 3 3 16 0.32768000000000000000e5 +1457 3 3 32 -0.32768000000000000000e5 +1457 3 4 17 0.32768000000000000000e5 +1457 3 4 33 -0.32768000000000000000e5 +1457 3 5 26 0.32768000000000000000e5 +1457 3 6 19 0.65536000000000000000e5 +1457 3 17 30 0.65536000000000000000e5 +1457 4 1 13 0.32768000000000000000e5 +1457 4 3 17 0.32768000000000000000e5 +1457 4 13 17 -0.32768000000000000000e5 +1458 1 2 33 0.32768000000000000000e5 +1458 1 3 34 -0.65536000000000000000e5 +1458 1 4 27 0.32768000000000000000e5 +1458 1 4 35 0.32768000000000000000e5 +1458 2 12 18 0.32768000000000000000e5 +1458 3 3 32 -0.32768000000000000000e5 +1458 3 4 33 -0.32768000000000000000e5 +1458 3 5 26 0.32768000000000000000e5 +1458 3 17 22 -0.65536000000000000000e5 +1458 3 17 30 0.65536000000000000000e5 +1458 3 18 19 0.32768000000000000000e5 +1458 4 3 18 0.32768000000000000000e5 +1458 4 13 17 -0.32768000000000000000e5 +1459 4 3 19 0.32768000000000000000e5 +1459 4 6 18 -0.32768000000000000000e5 +1460 4 3 20 0.32768000000000000000e5 +1460 4 13 17 -0.32768000000000000000e5 +1461 1 2 9 0.32768000000000000000e5 +1461 1 4 11 -0.65536000000000000000e5 +1461 1 7 22 0.65536000000000000000e5 +1461 1 9 16 -0.32768000000000000000e5 +1461 3 4 9 -0.32768000000000000000e5 +1461 3 5 10 0.65536000000000000000e5 +1461 4 3 7 -0.32768000000000000000e5 +1461 4 4 5 0.32768000000000000000e5 +1462 4 3 7 -0.32768000000000000000e5 +1462 4 4 6 0.32768000000000000000e5 +1463 4 4 9 0.32768000000000000000e5 +1463 4 7 7 -0.65536000000000000000e5 +1464 1 4 11 0.16384000000000000000e5 +1464 1 5 12 0.16384000000000000000e5 +1464 1 7 22 -0.16384000000000000000e5 +1464 1 8 23 -0.32768000000000000000e5 +1464 1 9 24 -0.32768000000000000000e5 +1464 1 12 19 -0.16384000000000000000e5 +1464 1 13 28 -0.32768000000000000000e5 +1464 1 14 21 0.65536000000000000000e5 +1464 2 4 10 -0.32768000000000000000e5 +1464 3 1 14 0.32768000000000000000e5 +1464 3 2 15 -0.65536000000000000000e5 +1464 3 5 10 0.16384000000000000000e5 +1464 3 5 14 0.32768000000000000000e5 +1464 3 8 13 0.65536000000000000000e5 +1464 3 11 12 -0.65536000000000000000e5 +1464 3 13 18 -0.32768000000000000000e5 +1464 4 4 8 0.16384000000000000000e5 +1464 4 4 10 0.32768000000000000000e5 +1464 4 5 9 0.32768000000000000000e5 +1465 1 4 19 0.32768000000000000000e5 +1465 1 4 35 -0.32768000000000000000e5 +1465 1 9 16 0.65536000000000000000e5 +1465 1 20 27 -0.65536000000000000000e5 +1465 3 1 30 -0.65536000000000000000e5 +1465 3 3 16 -0.32768000000000000000e5 +1465 3 3 32 0.32768000000000000000e5 +1465 3 4 33 0.32768000000000000000e5 +1465 3 5 26 -0.32768000000000000000e5 +1465 3 6 19 -0.65536000000000000000e5 +1465 3 17 30 -0.65536000000000000000e5 +1465 4 1 13 -0.32768000000000000000e5 +1465 4 4 11 0.32768000000000000000e5 +1465 4 13 17 0.32768000000000000000e5 +1466 1 4 19 0.32768000000000000000e5 +1466 1 4 35 -0.32768000000000000000e5 +1466 1 7 22 -0.13107200000000000000e6 +1466 1 9 16 0.65536000000000000000e5 +1466 1 17 24 0.13107200000000000000e6 +1466 1 20 27 -0.65536000000000000000e5 +1466 3 1 30 -0.65536000000000000000e5 +1466 3 3 32 0.32768000000000000000e5 +1466 3 4 17 0.32768000000000000000e5 +1466 3 4 33 0.32768000000000000000e5 +1466 3 5 18 0.32768000000000000000e5 +1466 3 5 26 -0.32768000000000000000e5 +1466 3 6 19 0.65536000000000000000e5 +1466 3 17 30 -0.65536000000000000000e5 +1466 4 4 12 0.32768000000000000000e5 +1466 4 7 11 0.65536000000000000000e5 +1466 4 13 17 0.32768000000000000000e5 +1467 1 4 19 0.32768000000000000000e5 +1467 1 4 35 -0.32768000000000000000e5 +1467 1 7 22 0.13107200000000000000e6 +1467 1 9 16 -0.65536000000000000000e5 +1467 1 17 24 -0.13107200000000000000e6 +1467 1 20 27 0.65536000000000000000e5 +1467 3 1 30 0.65536000000000000000e5 +1467 3 3 32 0.32768000000000000000e5 +1467 3 4 33 0.32768000000000000000e5 +1467 3 5 18 0.32768000000000000000e5 +1467 3 5 19 0.32768000000000000000e5 +1467 3 5 26 -0.32768000000000000000e5 +1467 3 8 21 -0.13107200000000000000e6 +1467 3 17 30 -0.65536000000000000000e5 +1467 4 3 15 0.65536000000000000000e5 +1467 4 4 13 0.32768000000000000000e5 +1467 4 7 11 -0.65536000000000000000e5 +1467 4 13 17 0.32768000000000000000e5 +1468 4 3 15 -0.32768000000000000000e5 +1468 4 4 14 0.32768000000000000000e5 +1469 3 4 25 -0.13107200000000000000e6 +1469 3 5 22 0.32768000000000000000e5 +1469 3 6 19 -0.32768000000000000000e5 +1469 3 8 21 0.13107200000000000000e6 +1469 3 9 22 0.65536000000000000000e5 +1469 4 3 15 -0.32768000000000000000e5 +1469 4 4 15 0.32768000000000000000e5 +1469 4 4 16 0.65536000000000000000e5 +1470 1 2 33 0.32768000000000000000e5 +1470 1 3 34 -0.65536000000000000000e5 +1470 1 4 27 0.32768000000000000000e5 +1470 1 4 35 0.32768000000000000000e5 +1470 2 12 18 0.32768000000000000000e5 +1470 3 3 32 -0.32768000000000000000e5 +1470 3 4 33 -0.32768000000000000000e5 +1470 3 5 26 0.32768000000000000000e5 +1470 3 17 22 -0.65536000000000000000e5 +1470 3 17 30 0.65536000000000000000e5 +1470 3 18 19 0.32768000000000000000e5 +1470 4 4 17 0.32768000000000000000e5 +1470 4 13 17 -0.32768000000000000000e5 +1471 4 4 18 0.32768000000000000000e5 +1471 4 13 13 -0.65536000000000000000e5 +1472 1 3 34 0.98304000000000000000e5 +1472 1 5 20 -0.32768000000000000000e5 +1472 1 13 28 -0.13107200000000000000e6 +1472 1 20 35 -0.65536000000000000000e5 +1472 1 25 32 0.13107200000000000000e6 +1472 2 6 20 0.32768000000000000000e5 +1472 2 14 20 -0.32768000000000000000e5 +1472 3 2 31 0.65536000000000000000e5 +1472 3 5 30 0.32768000000000000000e5 +1472 3 6 19 0.32768000000000000000e5 +1472 3 6 35 -0.65536000000000000000e5 +1472 3 16 29 0.32768000000000000000e5 +1472 3 17 30 0.65536000000000000000e5 +1472 3 18 23 0.13107200000000000000e6 +1472 3 18 31 0.65536000000000000000e5 +1472 3 22 27 0.32768000000000000000e5 +1472 4 4 19 0.32768000000000000000e5 +1472 4 6 18 -0.32768000000000000000e5 +1472 4 8 20 0.65536000000000000000e5 +1472 4 12 16 0.65536000000000000000e5 +1472 4 14 18 0.32768000000000000000e5 +1473 1 1 8 0.16384000000000000000e5 +1473 1 2 9 0.81920000000000000000e4 +1473 1 4 11 -0.32768000000000000000e5 +1473 1 5 12 -0.16384000000000000000e5 +1473 1 5 20 -0.16384000000000000000e5 +1473 1 6 21 -0.49152000000000000000e5 +1473 1 7 10 -0.32768000000000000000e5 +1473 1 9 16 -0.81920000000000000000e4 +1473 1 12 19 0.16384000000000000000e5 +1473 1 12 27 -0.16384000000000000000e5 +1473 1 13 20 0.65536000000000000000e5 +1473 2 1 7 0.81920000000000000000e4 +1473 2 1 15 0.81920000000000000000e4 +1473 2 2 16 -0.16384000000000000000e5 +1473 2 3 9 -0.16384000000000000000e5 +1473 2 6 12 -0.16384000000000000000e5 +1473 2 8 14 -0.32768000000000000000e5 +1473 3 1 6 0.81920000000000000000e4 +1473 3 1 14 -0.32768000000000000000e5 +1473 3 2 7 0.16384000000000000000e5 +1473 3 2 15 0.65536000000000000000e5 +1473 3 5 10 -0.32768000000000000000e5 +1473 3 8 21 -0.16384000000000000000e5 +1473 4 1 5 0.81920000000000000000e4 +1473 4 4 8 -0.16384000000000000000e5 +1473 4 5 5 0.32768000000000000000e5 +1473 4 5 9 -0.32768000000000000000e5 +1474 1 1 8 0.16384000000000000000e5 +1474 1 2 9 0.16384000000000000000e5 +1474 1 4 11 -0.32768000000000000000e5 +1474 1 5 12 -0.32768000000000000000e5 +1474 1 5 20 -0.16384000000000000000e5 +1474 1 6 21 -0.32768000000000000000e5 +1474 1 8 23 0.65536000000000000000e5 +1474 1 9 16 -0.16384000000000000000e5 +1474 1 12 19 0.32768000000000000000e5 +1474 1 12 27 -0.32768000000000000000e5 +1474 2 1 7 0.16384000000000000000e5 +1474 2 3 9 -0.32768000000000000000e5 +1474 2 6 12 -0.16384000000000000000e5 +1474 3 1 14 -0.13107200000000000000e6 +1474 3 2 7 0.16384000000000000000e5 +1474 3 2 15 0.13107200000000000000e6 +1474 3 5 10 -0.65536000000000000000e5 +1474 3 8 21 -0.32768000000000000000e5 +1474 4 4 8 -0.32768000000000000000e5 +1474 4 5 6 0.32768000000000000000e5 +1474 4 5 9 -0.65536000000000000000e5 +1475 1 7 22 -0.32768000000000000000e5 +1475 1 8 23 0.65536000000000000000e5 +1475 1 11 26 -0.32768000000000000000e5 +1475 1 12 27 -0.32768000000000000000e5 +1475 2 3 9 -0.32768000000000000000e5 +1475 3 7 20 -0.32768000000000000000e5 +1475 3 8 21 -0.32768000000000000000e5 +1475 4 5 7 0.32768000000000000000e5 +1476 2 6 8 -0.32768000000000000000e5 +1476 2 8 14 0.32768000000000000000e5 +1476 4 5 8 0.32768000000000000000e5 +1477 4 5 10 0.32768000000000000000e5 +1477 4 8 8 -0.65536000000000000000e5 +1478 2 1 15 -0.32768000000000000000e5 +1478 2 1 19 0.32768000000000000000e5 +1478 4 5 11 0.32768000000000000000e5 +1479 4 2 14 -0.32768000000000000000e5 +1479 4 5 12 0.32768000000000000000e5 +1480 4 5 13 0.32768000000000000000e5 +1480 4 7 11 -0.32768000000000000000e5 +1481 2 2 16 -0.32768000000000000000e5 +1481 2 5 19 0.32768000000000000000e5 +1481 4 5 14 0.32768000000000000000e5 +1482 4 5 15 0.32768000000000000000e5 +1482 4 8 12 -0.32768000000000000000e5 +1483 1 6 21 0.16384000000000000000e5 +1483 1 7 22 0.32768000000000000000e5 +1483 1 16 23 -0.16384000000000000000e5 +1483 1 17 24 -0.32768000000000000000e5 +1483 2 2 16 0.16384000000000000000e5 +1483 2 5 19 -0.16384000000000000000e5 +1483 3 7 20 0.32768000000000000000e5 +1483 3 8 21 0.16384000000000000000e5 +1483 3 10 23 -0.65536000000000000000e5 +1483 3 13 18 0.32768000000000000000e5 +1483 4 5 16 0.32768000000000000000e5 +1483 4 8 12 0.16384000000000000000e5 +1484 1 3 34 -0.32768000000000000000e5 +1484 1 5 20 0.32768000000000000000e5 +1484 3 1 30 0.32768000000000000000e5 +1484 3 2 31 -0.65536000000000000000e5 +1484 3 6 19 -0.32768000000000000000e5 +1484 3 17 22 0.32768000000000000000e5 +1484 4 5 18 0.32768000000000000000e5 +1485 1 11 26 0.32768000000000000000e5 +1485 1 16 31 -0.32768000000000000000e5 +1485 3 2 31 0.32768000000000000000e5 +1485 3 13 26 -0.65536000000000000000e5 +1485 3 18 23 0.32768000000000000000e5 +1485 4 5 19 0.32768000000000000000e5 +1486 2 6 20 -0.32768000000000000000e5 +1486 2 14 20 0.32768000000000000000e5 +1486 4 5 20 0.32768000000000000000e5 +1487 1 7 22 -0.16384000000000000000e5 +1487 1 8 23 0.32768000000000000000e5 +1487 1 11 26 -0.16384000000000000000e5 +1487 1 12 27 -0.16384000000000000000e5 +1487 2 3 9 -0.16384000000000000000e5 +1487 3 7 20 -0.16384000000000000000e5 +1487 3 8 21 -0.16384000000000000000e5 +1487 4 6 6 0.32768000000000000000e5 +1488 4 4 8 -0.32768000000000000000e5 +1488 4 6 7 0.32768000000000000000e5 +1489 4 5 9 -0.32768000000000000000e5 +1489 4 6 8 0.32768000000000000000e5 +1490 1 8 23 -0.32768000000000000000e5 +1490 1 9 24 -0.32768000000000000000e5 +1490 1 13 28 -0.32768000000000000000e5 +1490 1 14 21 0.65536000000000000000e5 +1490 2 4 10 -0.32768000000000000000e5 +1490 3 13 18 -0.32768000000000000000e5 +1490 4 6 9 0.32768000000000000000e5 +1491 4 2 14 -0.32768000000000000000e5 +1491 4 6 11 0.32768000000000000000e5 +1492 4 6 12 0.32768000000000000000e5 +1492 4 7 11 -0.32768000000000000000e5 +1493 4 3 15 -0.32768000000000000000e5 +1493 4 6 13 0.32768000000000000000e5 +1494 4 6 14 0.32768000000000000000e5 +1494 4 8 12 -0.32768000000000000000e5 +1495 1 7 22 0.32768000000000000000e5 +1495 1 17 24 -0.32768000000000000000e5 +1495 3 4 25 0.65536000000000000000e5 +1495 3 9 22 -0.32768000000000000000e5 +1495 3 13 18 -0.65536000000000000000e5 +1495 4 4 16 -0.32768000000000000000e5 +1495 4 6 15 0.32768000000000000000e5 +1496 1 7 22 0.16384000000000000000e5 +1496 1 14 21 -0.65536000000000000000e5 +1496 1 14 29 0.65536000000000000000e5 +1496 1 17 24 -0.16384000000000000000e5 +1496 3 4 25 0.32768000000000000000e5 +1496 3 7 20 0.16384000000000000000e5 +1496 3 8 21 0.16384000000000000000e5 +1496 3 13 18 0.32768000000000000000e5 +1496 4 6 16 0.32768000000000000000e5 +1496 4 8 12 0.16384000000000000000e5 +1497 1 3 34 -0.32768000000000000000e5 +1497 1 5 20 0.32768000000000000000e5 +1497 3 1 30 0.32768000000000000000e5 +1497 3 2 31 -0.65536000000000000000e5 +1497 3 6 19 -0.32768000000000000000e5 +1497 3 17 22 0.32768000000000000000e5 +1497 4 6 17 0.32768000000000000000e5 +1498 4 6 19 0.32768000000000000000e5 +1498 4 12 16 -0.32768000000000000000e5 +1499 4 6 20 0.32768000000000000000e5 +1499 4 14 18 -0.32768000000000000000e5 +1500 1 8 23 -0.32768000000000000000e5 +1500 1 9 24 -0.32768000000000000000e5 +1500 1 13 28 -0.32768000000000000000e5 +1500 1 14 21 0.65536000000000000000e5 +1500 2 4 10 -0.32768000000000000000e5 +1500 3 13 18 -0.32768000000000000000e5 +1500 4 7 8 0.32768000000000000000e5 +1501 1 4 11 0.16384000000000000000e5 +1501 1 5 12 0.16384000000000000000e5 +1501 1 7 22 -0.16384000000000000000e5 +1501 1 8 23 -0.32768000000000000000e5 +1501 1 9 24 -0.32768000000000000000e5 +1501 1 12 19 -0.16384000000000000000e5 +1501 1 13 28 -0.32768000000000000000e5 +1501 1 14 21 0.65536000000000000000e5 +1501 2 4 10 -0.32768000000000000000e5 +1501 3 1 14 0.32768000000000000000e5 +1501 3 2 15 -0.65536000000000000000e5 +1501 3 5 10 0.16384000000000000000e5 +1501 3 5 14 0.32768000000000000000e5 +1501 3 8 13 0.65536000000000000000e5 +1501 3 11 12 -0.65536000000000000000e5 +1501 3 13 18 -0.32768000000000000000e5 +1501 4 4 8 0.16384000000000000000e5 +1501 4 5 9 0.32768000000000000000e5 +1501 4 7 9 0.32768000000000000000e5 +1502 3 8 13 0.32768000000000000000e5 +1502 3 9 14 0.32768000000000000000e5 +1502 3 11 12 0.32768000000000000000e5 +1502 3 12 13 -0.65536000000000000000e5 +1502 4 7 10 0.32768000000000000000e5 +1503 4 3 15 -0.32768000000000000000e5 +1503 4 7 12 0.32768000000000000000e5 +1504 3 4 25 -0.13107200000000000000e6 +1504 3 5 22 0.32768000000000000000e5 +1504 3 6 19 -0.32768000000000000000e5 +1504 3 8 21 0.13107200000000000000e6 +1504 3 9 22 0.65536000000000000000e5 +1504 4 3 15 -0.32768000000000000000e5 +1504 4 4 16 0.65536000000000000000e5 +1504 4 7 13 0.32768000000000000000e5 +1505 1 7 22 0.32768000000000000000e5 +1505 1 17 24 -0.32768000000000000000e5 +1505 3 4 25 0.65536000000000000000e5 +1505 3 9 22 -0.32768000000000000000e5 +1505 3 13 18 -0.65536000000000000000e5 +1505 4 4 16 -0.32768000000000000000e5 +1505 4 7 14 0.32768000000000000000e5 +1506 4 4 16 -0.32768000000000000000e5 +1506 4 7 15 0.32768000000000000000e5 +1507 3 4 25 0.32768000000000000000e5 +1507 3 11 24 -0.65536000000000000000e5 +1507 3 13 18 0.32768000000000000000e5 +1507 3 14 19 0.32768000000000000000e5 +1507 4 7 16 0.32768000000000000000e5 +1508 4 6 18 -0.32768000000000000000e5 +1508 4 7 17 0.32768000000000000000e5 +1509 1 3 34 0.98304000000000000000e5 +1509 1 5 20 -0.32768000000000000000e5 +1509 1 13 28 -0.13107200000000000000e6 +1509 1 20 35 -0.65536000000000000000e5 +1509 1 25 32 0.13107200000000000000e6 +1509 2 6 20 0.32768000000000000000e5 +1509 2 14 20 -0.32768000000000000000e5 +1509 3 2 31 0.65536000000000000000e5 +1509 3 5 30 0.32768000000000000000e5 +1509 3 6 19 0.32768000000000000000e5 +1509 3 6 35 -0.65536000000000000000e5 +1509 3 16 29 0.32768000000000000000e5 +1509 3 17 30 0.65536000000000000000e5 +1509 3 18 23 0.13107200000000000000e6 +1509 3 18 31 0.65536000000000000000e5 +1509 3 22 27 0.32768000000000000000e5 +1509 4 6 18 -0.32768000000000000000e5 +1509 4 7 18 0.32768000000000000000e5 +1509 4 8 20 0.65536000000000000000e5 +1509 4 12 16 0.65536000000000000000e5 +1509 4 14 18 0.32768000000000000000e5 +1510 3 5 34 0.32768000000000000000e5 +1510 3 17 30 0.32768000000000000000e5 +1510 3 18 31 -0.65536000000000000000e5 +1510 3 22 27 0.32768000000000000000e5 +1510 4 7 20 0.32768000000000000000e5 +1511 4 6 10 -0.32768000000000000000e5 +1511 4 8 9 0.32768000000000000000e5 +1512 1 4 11 -0.40960000000000000000e4 +1512 1 5 12 -0.40960000000000000000e4 +1512 1 6 21 0.40960000000000000000e4 +1512 1 7 10 0.81920000000000000000e4 +1512 1 7 22 0.81920000000000000000e4 +1512 1 8 23 0.81920000000000000000e4 +1512 1 11 26 0.40960000000000000000e4 +1512 1 12 19 0.40960000000000000000e4 +1512 1 13 20 -0.16384000000000000000e5 +1512 2 2 16 0.40960000000000000000e4 +1512 2 6 8 0.81920000000000000000e4 +1512 3 2 15 0.49152000000000000000e5 +1512 3 5 10 -0.40960000000000000000e4 +1512 3 7 20 0.40960000000000000000e4 +1512 3 8 13 0.32768000000000000000e5 +1512 3 10 15 -0.65536000000000000000e5 +1512 3 11 12 0.16384000000000000000e5 +1512 3 12 13 0.32768000000000000000e5 +1512 4 4 8 -0.40960000000000000000e4 +1512 4 5 9 -0.81920000000000000000e4 +1512 4 6 10 0.16384000000000000000e5 +1512 4 8 8 0.32768000000000000000e5 +1512 4 8 10 0.32768000000000000000e5 +1513 2 2 16 -0.32768000000000000000e5 +1513 2 5 19 0.32768000000000000000e5 +1513 4 8 11 0.32768000000000000000e5 +1514 1 7 22 0.32768000000000000000e5 +1514 1 17 24 -0.32768000000000000000e5 +1514 3 4 25 0.65536000000000000000e5 +1514 3 9 22 -0.32768000000000000000e5 +1514 3 13 18 -0.65536000000000000000e5 +1514 4 4 16 -0.32768000000000000000e5 +1514 4 8 13 0.32768000000000000000e5 +1515 1 6 21 0.16384000000000000000e5 +1515 1 7 22 0.32768000000000000000e5 +1515 1 16 23 -0.16384000000000000000e5 +1515 1 17 24 -0.32768000000000000000e5 +1515 2 2 16 0.16384000000000000000e5 +1515 2 5 19 -0.16384000000000000000e5 +1515 3 7 20 0.32768000000000000000e5 +1515 3 8 21 0.16384000000000000000e5 +1515 3 10 23 -0.65536000000000000000e5 +1515 3 13 18 0.32768000000000000000e5 +1515 4 8 12 0.16384000000000000000e5 +1515 4 8 14 0.32768000000000000000e5 +1516 1 7 22 0.16384000000000000000e5 +1516 1 14 21 -0.65536000000000000000e5 +1516 1 14 29 0.65536000000000000000e5 +1516 1 17 24 -0.16384000000000000000e5 +1516 3 4 25 0.32768000000000000000e5 +1516 3 7 20 0.16384000000000000000e5 +1516 3 8 21 0.16384000000000000000e5 +1516 3 13 18 0.32768000000000000000e5 +1516 4 8 12 0.16384000000000000000e5 +1516 4 8 15 0.32768000000000000000e5 +1517 4 8 16 0.32768000000000000000e5 +1517 4 10 14 -0.32768000000000000000e5 +1518 1 11 26 0.32768000000000000000e5 +1518 1 16 31 -0.32768000000000000000e5 +1518 3 2 31 0.32768000000000000000e5 +1518 3 13 26 -0.65536000000000000000e5 +1518 3 18 23 0.32768000000000000000e5 +1518 4 8 17 0.32768000000000000000e5 +1519 4 8 18 0.32768000000000000000e5 +1519 4 12 16 -0.32768000000000000000e5 +1520 1 3 34 -0.16384000000000000000e5 +1520 1 13 28 0.32768000000000000000e5 +1520 1 20 35 0.16384000000000000000e5 +1520 1 25 32 -0.32768000000000000000e5 +1520 2 6 20 -0.81920000000000000000e4 +1520 2 14 20 0.81920000000000000000e4 +1520 3 6 35 0.16384000000000000000e5 +1520 3 13 26 0.32768000000000000000e5 +1520 3 14 27 0.32768000000000000000e5 +1520 3 16 29 -0.81920000000000000000e4 +1520 3 17 30 -0.16384000000000000000e5 +1520 3 18 31 -0.16384000000000000000e5 +1520 3 20 25 -0.65536000000000000000e5 +1520 3 22 27 -0.81920000000000000000e4 +1520 4 8 19 0.32768000000000000000e5 +1520 4 8 20 -0.16384000000000000000e5 +1520 4 14 18 -0.81920000000000000000e4 +1521 3 8 13 0.16384000000000000000e5 +1521 3 9 14 0.16384000000000000000e5 +1521 3 11 12 0.16384000000000000000e5 +1521 3 12 13 -0.32768000000000000000e5 +1521 4 9 9 0.32768000000000000000e5 +1522 3 2 15 0.16384000000000000000e5 +1522 3 8 13 0.16384000000000000000e5 +1522 3 9 15 0.32768000000000000000e5 +1522 3 11 12 0.16384000000000000000e5 +1522 3 12 13 0.32768000000000000000e5 +1522 3 13 14 -0.65536000000000000000e5 +1522 4 6 10 0.16384000000000000000e5 +1522 4 9 10 0.32768000000000000000e5 +1523 4 8 12 -0.32768000000000000000e5 +1523 4 9 11 0.32768000000000000000e5 +1524 1 7 22 0.32768000000000000000e5 +1524 1 17 24 -0.32768000000000000000e5 +1524 3 4 25 0.65536000000000000000e5 +1524 3 9 22 -0.32768000000000000000e5 +1524 3 13 18 -0.65536000000000000000e5 +1524 4 4 16 -0.32768000000000000000e5 +1524 4 9 12 0.32768000000000000000e5 +1525 4 4 16 -0.32768000000000000000e5 +1525 4 9 13 0.32768000000000000000e5 +1526 1 7 22 0.16384000000000000000e5 +1526 1 14 21 -0.65536000000000000000e5 +1526 1 14 29 0.65536000000000000000e5 +1526 1 17 24 -0.16384000000000000000e5 +1526 3 4 25 0.32768000000000000000e5 +1526 3 7 20 0.16384000000000000000e5 +1526 3 8 21 0.16384000000000000000e5 +1526 3 13 18 0.32768000000000000000e5 +1526 4 8 12 0.16384000000000000000e5 +1526 4 9 14 0.32768000000000000000e5 +1527 3 4 25 0.32768000000000000000e5 +1527 3 11 24 -0.65536000000000000000e5 +1527 3 13 18 0.32768000000000000000e5 +1527 3 14 19 0.32768000000000000000e5 +1527 4 9 15 0.32768000000000000000e5 +1528 4 9 16 0.32768000000000000000e5 +1528 4 10 15 -0.32768000000000000000e5 +1529 4 9 17 0.32768000000000000000e5 +1529 4 12 16 -0.32768000000000000000e5 +1530 4 7 19 -0.32768000000000000000e5 +1530 4 9 18 0.32768000000000000000e5 +1531 4 9 19 0.32768000000000000000e5 +1531 4 10 18 -0.32768000000000000000e5 +1532 4 9 20 0.32768000000000000000e5 +1532 4 15 19 -0.32768000000000000000e5 +1533 1 6 21 0.16384000000000000000e5 +1533 1 7 22 0.32768000000000000000e5 +1533 1 16 23 -0.16384000000000000000e5 +1533 1 17 24 -0.32768000000000000000e5 +1533 2 2 16 0.16384000000000000000e5 +1533 2 5 19 -0.16384000000000000000e5 +1533 3 7 20 0.32768000000000000000e5 +1533 3 8 21 0.16384000000000000000e5 +1533 3 10 23 -0.65536000000000000000e5 +1533 3 13 18 0.32768000000000000000e5 +1533 4 8 12 0.16384000000000000000e5 +1533 4 10 11 0.32768000000000000000e5 +1534 1 7 22 0.16384000000000000000e5 +1534 1 14 21 -0.65536000000000000000e5 +1534 1 14 29 0.65536000000000000000e5 +1534 1 17 24 -0.16384000000000000000e5 +1534 3 4 25 0.32768000000000000000e5 +1534 3 7 20 0.16384000000000000000e5 +1534 3 8 21 0.16384000000000000000e5 +1534 3 13 18 0.32768000000000000000e5 +1534 4 8 12 0.16384000000000000000e5 +1534 4 10 12 0.32768000000000000000e5 +1535 3 4 25 0.32768000000000000000e5 +1535 3 11 24 -0.65536000000000000000e5 +1535 3 13 18 0.32768000000000000000e5 +1535 3 14 19 0.32768000000000000000e5 +1535 4 10 13 0.32768000000000000000e5 +1536 1 3 34 -0.16384000000000000000e5 +1536 1 13 28 0.32768000000000000000e5 +1536 1 20 35 0.16384000000000000000e5 +1536 1 25 32 -0.32768000000000000000e5 +1536 2 6 20 -0.81920000000000000000e4 +1536 2 14 20 0.81920000000000000000e4 +1536 3 6 35 0.16384000000000000000e5 +1536 3 13 26 0.32768000000000000000e5 +1536 3 14 27 0.32768000000000000000e5 +1536 3 16 29 -0.81920000000000000000e4 +1536 3 17 30 -0.16384000000000000000e5 +1536 3 18 31 -0.16384000000000000000e5 +1536 3 20 25 -0.65536000000000000000e5 +1536 3 22 27 -0.81920000000000000000e4 +1536 4 8 20 -0.16384000000000000000e5 +1536 4 10 17 0.32768000000000000000e5 +1536 4 14 18 -0.81920000000000000000e4 +1537 4 10 19 0.32768000000000000000e5 +1537 4 16 16 -0.65536000000000000000e5 +1538 1 3 34 0.16384000000000000000e5 +1538 1 20 35 -0.16384000000000000000e5 +1538 2 6 20 0.81920000000000000000e4 +1538 2 14 20 -0.81920000000000000000e4 +1538 3 6 35 -0.16384000000000000000e5 +1538 3 13 34 -0.65536000000000000000e5 +1538 3 16 29 0.81920000000000000000e4 +1538 3 17 30 0.16384000000000000000e5 +1538 3 18 31 0.16384000000000000000e5 +1538 3 22 27 0.81920000000000000000e4 +1538 3 22 31 0.32768000000000000000e5 +1538 3 24 29 0.32768000000000000000e5 +1538 4 8 20 0.16384000000000000000e5 +1538 4 10 20 0.32768000000000000000e5 +1538 4 14 18 0.81920000000000000000e4 +1539 1 1 32 0.32768000000000000000e5 +1539 1 2 33 0.32768000000000000000e5 +1539 1 4 35 0.32768000000000000000e5 +1539 1 16 31 -0.13107200000000000000e6 +1539 1 20 27 0.13107200000000000000e6 +1539 2 3 17 -0.32768000000000000000e5 +1539 2 6 12 0.65536000000000000000e5 +1539 2 11 17 0.32768000000000000000e5 +1539 2 12 18 0.32768000000000000000e5 +1539 3 3 32 -0.32768000000000000000e5 +1539 3 4 33 -0.32768000000000000000e5 +1539 3 17 30 0.65536000000000000000e5 +1539 4 2 14 -0.65536000000000000000e5 +1539 4 5 17 -0.65536000000000000000e5 +1539 4 11 12 0.32768000000000000000e5 +1539 4 13 17 -0.32768000000000000000e5 +1540 1 3 18 0.32768000000000000000e5 +1540 1 4 27 0.32768000000000000000e5 +1540 1 4 35 0.32768000000000000000e5 +1540 1 5 20 -0.65536000000000000000e5 +1540 1 9 16 -0.65536000000000000000e5 +1540 1 20 27 0.65536000000000000000e5 +1540 2 12 18 0.32768000000000000000e5 +1540 3 1 30 0.65536000000000000000e5 +1540 3 3 16 0.32768000000000000000e5 +1540 3 3 32 -0.32768000000000000000e5 +1540 3 4 17 0.32768000000000000000e5 +1540 3 4 33 -0.32768000000000000000e5 +1540 3 5 26 0.32768000000000000000e5 +1540 3 6 19 0.65536000000000000000e5 +1540 3 17 30 0.65536000000000000000e5 +1540 4 1 13 0.32768000000000000000e5 +1540 4 11 13 0.32768000000000000000e5 +1540 4 13 17 -0.32768000000000000000e5 +1541 4 5 17 -0.32768000000000000000e5 +1541 4 11 14 0.32768000000000000000e5 +1542 1 3 34 -0.32768000000000000000e5 +1542 1 5 20 0.32768000000000000000e5 +1542 3 1 30 0.32768000000000000000e5 +1542 3 2 31 -0.65536000000000000000e5 +1542 3 6 19 -0.32768000000000000000e5 +1542 3 17 22 0.32768000000000000000e5 +1542 4 11 15 0.32768000000000000000e5 +1543 1 11 26 0.32768000000000000000e5 +1543 1 16 31 -0.32768000000000000000e5 +1543 3 2 31 0.32768000000000000000e5 +1543 3 13 26 -0.65536000000000000000e5 +1543 3 18 23 0.32768000000000000000e5 +1543 4 11 16 0.32768000000000000000e5 +1544 1 1 32 -0.32768000000000000000e5 +1544 1 2 33 -0.32768000000000000000e5 +1544 1 4 35 -0.32768000000000000000e5 +1544 1 16 31 0.13107200000000000000e6 +1544 1 20 27 -0.13107200000000000000e6 +1544 2 6 12 -0.65536000000000000000e5 +1544 2 11 17 -0.32768000000000000000e5 +1544 2 12 18 -0.32768000000000000000e5 +1544 2 17 17 0.65536000000000000000e5 +1544 3 3 32 0.32768000000000000000e5 +1544 3 4 33 0.32768000000000000000e5 +1544 3 17 30 -0.65536000000000000000e5 +1544 4 2 14 0.65536000000000000000e5 +1544 4 5 17 0.65536000000000000000e5 +1544 4 11 17 0.32768000000000000000e5 +1544 4 13 17 0.32768000000000000000e5 +1545 1 2 33 0.32768000000000000000e5 +1545 1 3 34 -0.65536000000000000000e5 +1545 1 17 32 -0.32768000000000000000e5 +1545 1 20 35 0.65536000000000000000e5 +1545 3 4 33 -0.32768000000000000000e5 +1545 3 6 35 0.65536000000000000000e5 +1545 3 17 30 0.65536000000000000000e5 +1545 4 11 18 0.32768000000000000000e5 +1545 4 13 17 -0.32768000000000000000e5 +1546 2 6 20 -0.32768000000000000000e5 +1546 2 14 20 0.32768000000000000000e5 +1546 4 11 19 0.32768000000000000000e5 +1547 4 11 20 0.32768000000000000000e5 +1547 4 17 17 -0.65536000000000000000e5 +1548 1 3 18 0.16384000000000000000e5 +1548 1 4 27 0.16384000000000000000e5 +1548 1 4 35 0.16384000000000000000e5 +1548 1 5 20 -0.32768000000000000000e5 +1548 1 9 16 -0.32768000000000000000e5 +1548 1 20 27 0.32768000000000000000e5 +1548 2 12 18 0.16384000000000000000e5 +1548 3 1 30 0.32768000000000000000e5 +1548 3 3 16 0.16384000000000000000e5 +1548 3 3 32 -0.16384000000000000000e5 +1548 3 4 17 0.16384000000000000000e5 +1548 3 4 33 -0.16384000000000000000e5 +1548 3 5 26 0.16384000000000000000e5 +1548 3 6 19 0.32768000000000000000e5 +1548 3 17 30 0.32768000000000000000e5 +1548 4 1 13 0.16384000000000000000e5 +1548 4 12 12 0.32768000000000000000e5 +1548 4 13 17 -0.16384000000000000000e5 +1549 1 2 33 0.32768000000000000000e5 +1549 1 3 34 -0.65536000000000000000e5 +1549 1 4 27 0.32768000000000000000e5 +1549 1 4 35 0.32768000000000000000e5 +1549 2 12 18 0.32768000000000000000e5 +1549 3 3 32 -0.32768000000000000000e5 +1549 3 4 33 -0.32768000000000000000e5 +1549 3 5 26 0.32768000000000000000e5 +1549 3 17 22 -0.65536000000000000000e5 +1549 3 17 30 0.65536000000000000000e5 +1549 3 18 19 0.32768000000000000000e5 +1549 4 12 13 0.32768000000000000000e5 +1549 4 13 17 -0.32768000000000000000e5 +1550 1 3 34 -0.32768000000000000000e5 +1550 1 5 20 0.32768000000000000000e5 +1550 3 1 30 0.32768000000000000000e5 +1550 3 2 31 -0.65536000000000000000e5 +1550 3 6 19 -0.32768000000000000000e5 +1550 3 17 22 0.32768000000000000000e5 +1550 4 12 14 0.32768000000000000000e5 +1551 4 6 18 -0.32768000000000000000e5 +1551 4 12 15 0.32768000000000000000e5 +1552 1 2 33 0.32768000000000000000e5 +1552 1 3 34 -0.65536000000000000000e5 +1552 1 17 32 -0.32768000000000000000e5 +1552 1 20 35 0.65536000000000000000e5 +1552 3 4 33 -0.32768000000000000000e5 +1552 3 6 35 0.65536000000000000000e5 +1552 3 17 30 0.65536000000000000000e5 +1552 4 12 17 0.32768000000000000000e5 +1552 4 13 17 -0.32768000000000000000e5 +1553 4 12 18 0.32768000000000000000e5 +1553 4 13 17 -0.32768000000000000000e5 +1554 4 12 19 0.32768000000000000000e5 +1554 4 14 18 -0.32768000000000000000e5 +1555 1 2 33 -0.32768000000000000000e5 +1555 1 3 34 0.65536000000000000000e5 +1555 1 4 27 -0.32768000000000000000e5 +1555 1 4 35 -0.32768000000000000000e5 +1555 2 4 18 -0.32768000000000000000e5 +1555 2 12 18 -0.32768000000000000000e5 +1555 2 18 20 0.32768000000000000000e5 +1555 3 3 32 0.32768000000000000000e5 +1555 3 4 33 0.32768000000000000000e5 +1555 3 5 26 -0.32768000000000000000e5 +1555 3 17 22 0.65536000000000000000e5 +1555 3 17 30 -0.65536000000000000000e5 +1555 3 18 19 -0.32768000000000000000e5 +1555 4 12 20 0.32768000000000000000e5 +1555 4 13 17 0.65536000000000000000e5 +1556 4 6 18 -0.32768000000000000000e5 +1556 4 13 14 0.32768000000000000000e5 +1557 1 3 34 0.98304000000000000000e5 +1557 1 5 20 -0.32768000000000000000e5 +1557 1 13 28 -0.13107200000000000000e6 +1557 1 20 35 -0.65536000000000000000e5 +1557 1 25 32 0.13107200000000000000e6 +1557 2 6 20 0.32768000000000000000e5 +1557 2 14 20 -0.32768000000000000000e5 +1557 3 2 31 0.65536000000000000000e5 +1557 3 5 30 0.32768000000000000000e5 +1557 3 6 19 0.32768000000000000000e5 +1557 3 6 35 -0.65536000000000000000e5 +1557 3 16 29 0.32768000000000000000e5 +1557 3 17 30 0.65536000000000000000e5 +1557 3 18 23 0.13107200000000000000e6 +1557 3 18 31 0.65536000000000000000e5 +1557 3 22 27 0.32768000000000000000e5 +1557 4 6 18 -0.32768000000000000000e5 +1557 4 8 20 0.65536000000000000000e5 +1557 4 12 16 0.65536000000000000000e5 +1557 4 13 15 0.32768000000000000000e5 +1557 4 14 18 0.32768000000000000000e5 +1558 4 7 19 -0.32768000000000000000e5 +1558 4 13 16 0.32768000000000000000e5 +1559 4 4 20 -0.32768000000000000000e5 +1559 4 13 18 0.32768000000000000000e5 +1560 3 5 34 0.32768000000000000000e5 +1560 3 17 30 0.32768000000000000000e5 +1560 3 18 31 -0.65536000000000000000e5 +1560 3 22 27 0.32768000000000000000e5 +1560 4 13 19 0.32768000000000000000e5 +1561 4 13 20 0.32768000000000000000e5 +1561 4 18 18 -0.65536000000000000000e5 +1562 1 11 26 0.16384000000000000000e5 +1562 1 16 31 -0.16384000000000000000e5 +1562 3 2 31 0.16384000000000000000e5 +1562 3 13 26 -0.32768000000000000000e5 +1562 3 18 23 0.16384000000000000000e5 +1562 4 14 14 0.32768000000000000000e5 +1563 4 12 16 -0.32768000000000000000e5 +1563 4 14 15 0.32768000000000000000e5 +1564 1 3 34 -0.16384000000000000000e5 +1564 1 13 28 0.32768000000000000000e5 +1564 1 20 35 0.16384000000000000000e5 +1564 1 25 32 -0.32768000000000000000e5 +1564 2 6 20 -0.81920000000000000000e4 +1564 2 14 20 0.81920000000000000000e4 +1564 3 6 35 0.16384000000000000000e5 +1564 3 13 26 0.32768000000000000000e5 +1564 3 14 27 0.32768000000000000000e5 +1564 3 16 29 -0.81920000000000000000e4 +1564 3 17 30 -0.16384000000000000000e5 +1564 3 18 31 -0.16384000000000000000e5 +1564 3 20 25 -0.65536000000000000000e5 +1564 3 22 27 -0.81920000000000000000e4 +1564 4 8 20 -0.16384000000000000000e5 +1564 4 14 16 0.32768000000000000000e5 +1564 4 14 18 -0.81920000000000000000e4 +1565 2 6 20 -0.32768000000000000000e5 +1565 2 14 20 0.32768000000000000000e5 +1565 4 14 17 0.32768000000000000000e5 +1566 4 8 20 -0.32768000000000000000e5 +1566 4 14 19 0.32768000000000000000e5 +1567 1 19 34 0.32768000000000000000e5 +1567 1 30 33 -0.32768000000000000000e5 +1567 3 6 35 0.32768000000000000000e5 +1567 3 20 33 0.32768000000000000000e5 +1567 3 26 31 -0.65536000000000000000e5 +1567 4 14 20 0.32768000000000000000e5 +1568 4 7 19 -0.16384000000000000000e5 +1568 4 15 15 0.32768000000000000000e5 +1569 4 10 18 -0.32768000000000000000e5 +1569 4 15 16 0.32768000000000000000e5 +1570 4 14 18 -0.32768000000000000000e5 +1570 4 15 17 0.32768000000000000000e5 +1571 3 5 34 0.32768000000000000000e5 +1571 3 17 30 0.32768000000000000000e5 +1571 3 18 31 -0.65536000000000000000e5 +1571 3 22 27 0.32768000000000000000e5 +1571 4 15 18 0.32768000000000000000e5 +1572 1 19 34 0.32768000000000000000e5 +1572 1 30 33 -0.32768000000000000000e5 +1572 3 19 34 0.32768000000000000000e5 +1572 3 20 33 0.32768000000000000000e5 +1572 3 21 34 -0.65536000000000000000e5 +1572 4 15 20 0.32768000000000000000e5 +1573 4 8 20 -0.32768000000000000000e5 +1573 4 16 17 0.32768000000000000000e5 +1574 4 15 19 -0.32768000000000000000e5 +1574 4 16 18 0.32768000000000000000e5 +1575 1 3 34 0.16384000000000000000e5 +1575 1 20 35 -0.16384000000000000000e5 +1575 2 6 20 0.81920000000000000000e4 +1575 2 14 20 -0.81920000000000000000e4 +1575 3 6 35 -0.16384000000000000000e5 +1575 3 13 34 -0.65536000000000000000e5 +1575 3 16 29 0.81920000000000000000e4 +1575 3 17 30 0.16384000000000000000e5 +1575 3 18 31 0.16384000000000000000e5 +1575 3 22 27 0.81920000000000000000e4 +1575 3 22 31 0.32768000000000000000e5 +1575 3 24 29 0.32768000000000000000e5 +1575 4 8 20 0.16384000000000000000e5 +1575 4 14 18 0.81920000000000000000e4 +1575 4 16 19 0.32768000000000000000e5 +1576 1 2 33 -0.32768000000000000000e5 +1576 1 3 34 0.65536000000000000000e5 +1576 1 4 27 -0.32768000000000000000e5 +1576 1 4 35 -0.32768000000000000000e5 +1576 2 4 18 -0.32768000000000000000e5 +1576 2 12 18 -0.32768000000000000000e5 +1576 2 18 20 0.32768000000000000000e5 +1576 3 3 32 0.32768000000000000000e5 +1576 3 4 33 0.32768000000000000000e5 +1576 3 5 26 -0.32768000000000000000e5 +1576 3 17 22 0.65536000000000000000e5 +1576 3 17 30 -0.65536000000000000000e5 +1576 3 18 19 -0.32768000000000000000e5 +1576 4 13 17 0.65536000000000000000e5 +1576 4 17 18 0.32768000000000000000e5 +1577 1 19 34 0.32768000000000000000e5 +1577 1 30 33 -0.32768000000000000000e5 +1577 3 6 35 0.32768000000000000000e5 +1577 3 20 33 0.32768000000000000000e5 +1577 3 26 31 -0.65536000000000000000e5 +1577 4 17 19 0.32768000000000000000e5 +1578 2 18 20 -0.32768000000000000000e5 +1578 2 20 20 0.65536000000000000000e5 +1578 4 17 20 0.32768000000000000000e5 +1579 1 19 34 0.32768000000000000000e5 +1579 1 30 33 -0.32768000000000000000e5 +1579 3 19 34 0.32768000000000000000e5 +1579 3 20 33 0.32768000000000000000e5 +1579 3 21 34 -0.65536000000000000000e5 +1579 4 18 19 0.32768000000000000000e5 +1580 1 3 34 -0.65536000000000000000e5 +1580 1 4 27 -0.32768000000000000000e5 +1580 1 4 35 -0.32768000000000000000e5 +1580 1 17 24 0.13107200000000000000e6 +1580 1 20 27 -0.65536000000000000000e5 +1580 1 28 35 -0.32768000000000000000e5 +1580 1 30 33 -0.65536000000000000000e5 +1580 1 33 34 0.65536000000000000000e5 +1580 2 4 18 -0.32768000000000000000e5 +1580 2 6 20 -0.65536000000000000000e5 +1580 3 2 31 -0.13107200000000000000e6 +1580 3 3 32 0.32768000000000000000e5 +1580 3 5 26 -0.32768000000000000000e5 +1580 3 17 22 0.65536000000000000000e5 +1580 3 17 30 -0.65536000000000000000e5 +1580 3 18 19 -0.32768000000000000000e5 +1580 3 19 32 -0.32768000000000000000e5 +1580 3 27 32 0.32768000000000000000e5 +1580 3 28 33 0.32768000000000000000e5 +1580 4 13 17 0.32768000000000000000e5 +1580 4 18 20 0.32768000000000000000e5 +1581 4 16 20 -0.16384000000000000000e5 +1581 4 19 19 0.32768000000000000000e5 +1582 1 30 33 0.32768000000000000000e5 +1582 1 33 34 -0.32768000000000000000e5 +1582 3 20 35 0.32768000000000000000e5 +1582 3 22 35 0.32768000000000000000e5 +1582 3 29 34 -0.65536000000000000000e5 +1582 4 19 20 0.32768000000000000000e5 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +2945 +4 +56 35 35 20 +0.26214400000000000000e6 0.0 -0.26214400000000000000e6 0.0 0.0 0.26214400000000000000e6 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.26214400000000000000e6 0.0 -0.26214400000000000000e6 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 -0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.26214400000000000000e6 0.26214400000000000000e6 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 -0.32768000000000000000e6 0.0 -0.13107200000000000000e6 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.19660800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 -0.26214400000000000000e6 0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.13107200000000000000e6 0.0 0.0 -0.19660800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 0.26214400000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 -0.19660800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.0 0.0 0.0 -0.19660800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 -0.19660800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 -0.26214400000000000000e6 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.19660800000000000000e6 -0.32768000000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 -0.52428800000000000000e6 0.26214400000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.52428800000000000000e6 0.0 0.26214400000000000000e6 0.0 0.26214400000000000000e6 -0.52428800000000000000e6 -0.52428800000000000000e6 0.0 -0.26214400000000000000e6 -0.26214400000000000000e6 0.0 -0.13107200000000000000e6 -0.52428800000000000000e6 0.0 0.19660800000000000000e6 0.19660800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.10485760000000000000e7 -0.52428800000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 -0.52428800000000000000e6 0.0 0.0 -0.26214400000000000000e6 0.0 -0.52428800000000000000e6 0.0 0.0 0.19660800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.26214400000000000000e6 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.19660800000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.19660800000000000000e6 0.19660800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.10485760000000000000e7 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.19660800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.10485760000000000000e7 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 -0.52428800000000000000e6 -0.10485760000000000000e7 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.26214400000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.26214400000000000000e6 0.0 0.26214400000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.13107200000000000000e6 0.0 0.0 -0.19660800000000000000e6 0.52428800000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.52428800000000000000e6 -0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.32768000000000000000e6 0.0 0.0 -0.19660800000000000000e6 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 -0.52428800000000000000e6 0.26214400000000000000e6 0.26214400000000000000e6 0.0 -0.52428800000000000000e6 0.0 -0.26214400000000000000e6 0.0 -0.52428800000000000000e6 0.0 0.12451840000000000000e7 0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.12451840000000000000e7 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 -0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 0.26214400000000000000e6 0.0 +0 1 1 8 -0.32768000000000000000e5 +0 1 1 40 0.16384000000000000000e5 +0 1 2 5 -0.16384000000000000000e5 +0 1 2 9 0.32768000000000000000e5 +0 1 7 22 0.32768000000000000000e5 +0 1 7 38 0.32768000000000000000e5 +0 1 8 23 -0.65536000000000000000e5 +0 2 1 1 -0.32768000000000000000e5 +0 3 1 16 -0.16384000000000000000e5 +0 3 2 3 -0.16384000000000000000e5 +0 3 3 16 -0.16384000000000000000e5 +0 3 4 17 -0.16384000000000000000e5 +0 3 6 19 -0.32768000000000000000e5 +0 3 7 20 0.65536000000000000000e5 +0 4 1 1 0.32768000000000000000e5 +0 4 1 13 -0.16384000000000000000e5 +0 4 2 2 -0.32768000000000000000e5 +0 4 2 14 -0.32768000000000000000e5 +1 1 1 48 -0.16384000000000000000e5 +1 1 2 49 -0.16384000000000000000e5 +1 1 3 50 -0.32768000000000000000e5 +1 1 11 42 0.65536000000000000000e5 +1 1 12 43 0.13107200000000000000e6 +1 1 17 48 -0.13107200000000000000e6 +1 1 23 38 -0.16384000000000000000e5 +1 1 24 55 0.32768000000000000000e5 +1 1 28 43 -0.65536000000000000000e5 +1 1 53 56 0.16384000000000000000e5 +1 1 56 56 0.32768000000000000000e5 +1 2 2 32 -0.16384000000000000000e5 +1 2 8 22 0.65536000000000000000e5 +1 2 12 26 -0.65536000000000000000e5 +1 2 16 30 -0.32768000000000000000e5 +1 2 21 35 0.32768000000000000000e5 +1 3 2 31 -0.65536000000000000000e5 +1 3 14 27 -0.13107200000000000000e6 +1 3 17 30 -0.32768000000000000000e5 +1 3 18 31 0.65536000000000000000e5 +1 3 20 33 -0.32768000000000000000e5 +1 3 21 34 0.65536000000000000000e5 +1 3 22 35 0.32768000000000000000e5 +1 3 30 35 0.32768000000000000000e5 +1 3 34 35 0.32768000000000000000e5 +1 4 4 16 -0.65536000000000000000e5 +2 1 1 48 0.81920000000000000000e4 +2 1 2 49 0.81920000000000000000e4 +2 1 3 50 0.16384000000000000000e5 +2 1 11 42 -0.32768000000000000000e5 +2 1 12 43 -0.65536000000000000000e5 +2 1 17 48 0.65536000000000000000e5 +2 1 23 38 0.81920000000000000000e4 +2 1 24 55 -0.16384000000000000000e5 +2 1 28 43 0.32768000000000000000e5 +2 1 52 53 -0.32768000000000000000e5 +2 1 55 56 0.16384000000000000000e5 +2 2 2 32 0.81920000000000000000e4 +2 2 8 22 -0.32768000000000000000e5 +2 2 12 26 0.32768000000000000000e5 +2 2 16 30 0.16384000000000000000e5 +2 2 21 35 -0.16384000000000000000e5 +2 3 2 31 0.32768000000000000000e5 +2 3 14 27 0.65536000000000000000e5 +2 3 17 30 0.16384000000000000000e5 +2 3 18 31 -0.32768000000000000000e5 +2 3 20 33 0.16384000000000000000e5 +2 3 21 34 -0.32768000000000000000e5 +2 3 22 35 -0.16384000000000000000e5 +2 3 30 35 -0.16384000000000000000e5 +2 3 34 35 -0.16384000000000000000e5 +2 4 4 16 0.32768000000000000000e5 +3 1 1 48 0.16384000000000000000e5 +3 1 2 49 0.16384000000000000000e5 +3 1 3 50 0.32768000000000000000e5 +3 1 11 42 -0.65536000000000000000e5 +3 1 12 43 -0.13107200000000000000e6 +3 1 17 48 0.13107200000000000000e6 +3 1 23 38 0.16384000000000000000e5 +3 1 24 55 -0.32768000000000000000e5 +3 1 28 43 0.65536000000000000000e5 +3 1 41 56 -0.32768000000000000000e5 +3 1 49 56 -0.16384000000000000000e5 +3 1 53 54 -0.16384000000000000000e5 +3 1 53 56 0.16384000000000000000e5 +3 2 2 32 0.16384000000000000000e5 +3 2 8 22 -0.65536000000000000000e5 +3 2 12 26 0.65536000000000000000e5 +3 2 16 30 0.32768000000000000000e5 +3 2 21 35 -0.32768000000000000000e5 +3 2 35 35 -0.32768000000000000000e5 +3 3 2 31 0.65536000000000000000e5 +3 3 14 27 0.13107200000000000000e6 +3 3 17 30 0.32768000000000000000e5 +3 3 18 31 -0.65536000000000000000e5 +3 3 20 33 0.32768000000000000000e5 +3 3 21 34 -0.65536000000000000000e5 +3 3 22 35 -0.32768000000000000000e5 +3 3 30 35 -0.32768000000000000000e5 +3 3 34 35 -0.32768000000000000000e5 +3 4 4 16 0.65536000000000000000e5 +4 1 1 48 0.81920000000000000000e4 +4 1 2 49 0.81920000000000000000e4 +4 1 3 50 0.16384000000000000000e5 +4 1 11 42 -0.32768000000000000000e5 +4 1 12 43 -0.65536000000000000000e5 +4 1 17 48 0.65536000000000000000e5 +4 1 23 38 0.81920000000000000000e4 +4 1 24 55 -0.16384000000000000000e5 +4 1 28 43 0.32768000000000000000e5 +4 1 50 51 -0.32768000000000000000e5 +4 1 54 55 0.16384000000000000000e5 +4 2 2 32 0.81920000000000000000e4 +4 2 8 22 -0.32768000000000000000e5 +4 2 12 26 0.32768000000000000000e5 +4 2 16 30 0.16384000000000000000e5 +4 2 21 35 -0.16384000000000000000e5 +4 3 2 31 0.32768000000000000000e5 +4 3 14 27 0.65536000000000000000e5 +4 3 17 30 0.16384000000000000000e5 +4 3 18 31 -0.32768000000000000000e5 +4 3 20 33 0.16384000000000000000e5 +4 3 21 34 -0.32768000000000000000e5 +4 3 22 35 -0.16384000000000000000e5 +4 3 30 35 -0.16384000000000000000e5 +4 4 4 16 0.32768000000000000000e5 +5 1 1 48 0.81920000000000000000e4 +5 1 2 49 0.81920000000000000000e4 +5 1 3 50 0.16384000000000000000e5 +5 1 11 42 -0.32768000000000000000e5 +5 1 12 43 -0.65536000000000000000e5 +5 1 17 48 0.65536000000000000000e5 +5 1 23 38 0.81920000000000000000e4 +5 1 24 55 -0.16384000000000000000e5 +5 1 41 56 0.16384000000000000000e5 +5 2 2 32 0.81920000000000000000e4 +5 2 8 22 -0.32768000000000000000e5 +5 2 12 26 0.32768000000000000000e5 +5 2 16 30 0.16384000000000000000e5 +5 2 21 35 -0.16384000000000000000e5 +5 3 2 31 0.32768000000000000000e5 +5 3 14 27 0.65536000000000000000e5 +5 3 17 30 0.16384000000000000000e5 +5 3 20 33 0.16384000000000000000e5 +5 3 22 35 -0.16384000000000000000e5 +5 3 29 34 0.32768000000000000000e5 +5 3 30 35 -0.16384000000000000000e5 +5 3 34 35 -0.16384000000000000000e5 +5 4 4 16 0.32768000000000000000e5 +6 1 25 56 0.16384000000000000000e5 +6 1 28 43 -0.65536000000000000000e5 +6 1 37 56 -0.16384000000000000000e5 +6 1 38 53 0.16384000000000000000e5 +6 1 41 56 0.32768000000000000000e5 +6 1 47 50 0.32768000000000000000e5 +6 1 49 56 0.16384000000000000000e5 +6 2 29 35 0.32768000000000000000e5 +6 3 18 31 0.65536000000000000000e5 +6 3 21 34 0.65536000000000000000e5 +6 3 29 34 0.65536000000000000000e5 +6 3 32 33 0.16384000000000000000e5 +6 4 20 20 0.32768000000000000000e5 +7 1 1 48 0.16384000000000000000e5 +7 1 2 49 0.16384000000000000000e5 +7 1 3 50 0.32768000000000000000e5 +7 1 11 42 -0.65536000000000000000e5 +7 1 12 43 -0.13107200000000000000e6 +7 1 17 48 0.13107200000000000000e6 +7 1 23 38 0.16384000000000000000e5 +7 1 24 55 -0.32768000000000000000e5 +7 1 47 50 0.32768000000000000000e5 +7 1 47 54 0.16384000000000000000e5 +7 1 53 54 0.16384000000000000000e5 +7 2 2 32 0.16384000000000000000e5 +7 2 8 22 -0.65536000000000000000e5 +7 2 12 26 0.65536000000000000000e5 +7 2 16 30 0.32768000000000000000e5 +7 2 21 35 -0.32768000000000000000e5 +7 2 29 35 0.32768000000000000000e5 +7 3 2 31 0.65536000000000000000e5 +7 3 14 27 0.13107200000000000000e6 +7 3 17 30 0.32768000000000000000e5 +7 3 20 33 0.32768000000000000000e5 +7 3 22 35 -0.32768000000000000000e5 +7 3 29 34 0.65536000000000000000e5 +7 4 4 16 0.65536000000000000000e5 +8 1 1 48 0.16384000000000000000e5 +8 1 2 49 0.16384000000000000000e5 +8 1 3 50 0.32768000000000000000e5 +8 1 11 42 -0.65536000000000000000e5 +8 1 12 43 -0.13107200000000000000e6 +8 1 17 48 0.13107200000000000000e6 +8 1 23 38 0.16384000000000000000e5 +8 1 24 55 -0.32768000000000000000e5 +8 1 28 43 0.65536000000000000000e5 +8 1 37 56 0.16384000000000000000e5 +8 1 47 50 -0.32768000000000000000e5 +8 1 49 56 -0.16384000000000000000e5 +8 1 53 54 -0.16384000000000000000e5 +8 2 2 32 0.16384000000000000000e5 +8 2 8 22 -0.65536000000000000000e5 +8 2 12 26 0.65536000000000000000e5 +8 2 16 30 0.32768000000000000000e5 +8 2 21 35 -0.32768000000000000000e5 +8 2 35 35 -0.32768000000000000000e5 +8 3 2 31 0.65536000000000000000e5 +8 3 14 27 0.13107200000000000000e6 +8 3 17 30 0.32768000000000000000e5 +8 3 18 31 -0.65536000000000000000e5 +8 3 20 33 0.32768000000000000000e5 +8 3 21 34 -0.65536000000000000000e5 +8 3 22 35 -0.32768000000000000000e5 +8 3 30 35 -0.32768000000000000000e5 +8 3 34 35 -0.32768000000000000000e5 +8 4 4 16 0.65536000000000000000e5 +9 1 35 50 -0.32768000000000000000e5 +9 1 46 53 0.16384000000000000000e5 +9 1 52 55 0.16384000000000000000e5 +9 3 25 34 0.32768000000000000000e5 +10 1 44 51 -0.32768000000000000000e5 +10 1 45 56 0.16384000000000000000e5 +10 1 50 51 0.16384000000000000000e5 +11 1 17 48 -0.32768000000000000000e5 +11 1 28 43 0.16384000000000000000e5 +11 1 32 47 0.16384000000000000000e5 +11 1 33 48 0.16384000000000000000e5 +11 1 37 52 -0.16384000000000000000e5 +11 1 43 50 -0.16384000000000000000e5 +11 1 52 53 0.16384000000000000000e5 +11 3 18 31 -0.16384000000000000000e5 +11 3 24 29 0.32768000000000000000e5 +11 3 29 34 -0.16384000000000000000e5 +11 4 16 20 0.16384000000000000000e5 +12 1 1 48 0.81920000000000000000e4 +12 1 2 49 0.81920000000000000000e4 +12 1 3 50 0.16384000000000000000e5 +12 1 11 42 -0.32768000000000000000e5 +12 1 12 43 -0.65536000000000000000e5 +12 1 17 48 0.65536000000000000000e5 +12 1 23 38 0.81920000000000000000e4 +12 1 24 55 -0.16384000000000000000e5 +12 1 28 43 0.32768000000000000000e5 +12 1 43 50 -0.32768000000000000000e5 +12 1 51 54 0.16384000000000000000e5 +12 2 2 32 0.81920000000000000000e4 +12 2 8 22 -0.32768000000000000000e5 +12 2 12 26 0.32768000000000000000e5 +12 2 16 30 0.16384000000000000000e5 +12 2 21 35 -0.16384000000000000000e5 +12 3 2 31 0.32768000000000000000e5 +12 3 14 27 0.65536000000000000000e5 +12 3 17 30 0.16384000000000000000e5 +12 3 18 31 -0.32768000000000000000e5 +12 3 20 33 0.16384000000000000000e5 +12 3 21 34 -0.32768000000000000000e5 +12 3 22 35 -0.16384000000000000000e5 +12 4 4 16 0.32768000000000000000e5 +13 1 47 50 -0.16384000000000000000e5 +13 2 29 35 -0.16384000000000000000e5 +13 3 29 34 -0.32768000000000000000e5 +13 3 30 35 -0.16384000000000000000e5 +14 1 37 52 -0.32768000000000000000e5 +14 1 41 56 0.16384000000000000000e5 +14 1 47 50 0.16384000000000000000e5 +15 1 1 48 -0.16384000000000000000e5 +15 1 2 49 -0.16384000000000000000e5 +15 1 3 50 -0.32768000000000000000e5 +15 1 11 42 0.65536000000000000000e5 +15 1 12 43 0.13107200000000000000e6 +15 1 17 48 -0.13107200000000000000e6 +15 1 23 38 -0.16384000000000000000e5 +15 1 24 55 0.32768000000000000000e5 +15 1 37 56 0.16384000000000000000e5 +15 1 38 53 -0.16384000000000000000e5 +15 1 41 56 -0.32768000000000000000e5 +15 1 47 50 -0.32768000000000000000e5 +15 1 47 54 -0.16384000000000000000e5 +15 2 2 32 -0.16384000000000000000e5 +15 2 8 22 0.65536000000000000000e5 +15 2 12 26 -0.65536000000000000000e5 +15 2 16 30 -0.32768000000000000000e5 +15 2 21 35 0.32768000000000000000e5 +15 2 29 35 -0.32768000000000000000e5 +15 2 33 35 -0.16384000000000000000e5 +15 3 2 31 -0.65536000000000000000e5 +15 3 14 27 -0.13107200000000000000e6 +15 3 17 30 -0.32768000000000000000e5 +15 3 20 33 -0.32768000000000000000e5 +15 3 29 34 -0.65536000000000000000e5 +15 3 30 35 -0.32768000000000000000e5 +15 3 32 33 -0.16384000000000000000e5 +15 4 4 16 -0.65536000000000000000e5 +15 4 20 20 -0.32768000000000000000e5 +16 1 1 48 0.16384000000000000000e5 +16 1 2 49 0.16384000000000000000e5 +16 1 3 50 0.32768000000000000000e5 +16 1 11 42 -0.65536000000000000000e5 +16 1 12 43 -0.13107200000000000000e6 +16 1 17 48 0.13107200000000000000e6 +16 1 23 38 0.16384000000000000000e5 +16 1 24 55 -0.65536000000000000000e5 +16 1 25 56 0.16384000000000000000e5 +16 1 37 56 -0.16384000000000000000e5 +16 1 38 53 0.16384000000000000000e5 +16 1 41 56 0.32768000000000000000e5 +16 1 47 50 0.32768000000000000000e5 +16 1 47 54 0.16384000000000000000e5 +16 2 2 32 0.16384000000000000000e5 +16 2 8 22 -0.65536000000000000000e5 +16 2 12 26 0.65536000000000000000e5 +16 2 16 30 0.32768000000000000000e5 +16 2 21 35 -0.32768000000000000000e5 +16 2 29 35 0.32768000000000000000e5 +16 3 2 31 0.65536000000000000000e5 +16 3 14 27 0.13107200000000000000e6 +16 3 17 30 0.32768000000000000000e5 +16 3 20 33 0.32768000000000000000e5 +16 3 22 35 -0.32768000000000000000e5 +16 3 29 34 0.65536000000000000000e5 +16 3 32 33 0.32768000000000000000e5 +16 4 4 16 0.65536000000000000000e5 +16 4 20 20 0.32768000000000000000e5 +17 1 1 48 0.16384000000000000000e5 +17 1 2 49 0.16384000000000000000e5 +17 1 3 50 0.32768000000000000000e5 +17 1 11 42 -0.65536000000000000000e5 +17 1 12 43 -0.13107200000000000000e6 +17 1 17 48 0.13107200000000000000e6 +17 1 23 38 0.16384000000000000000e5 +17 1 38 53 0.16384000000000000000e5 +17 1 47 54 0.16384000000000000000e5 +17 2 2 32 0.16384000000000000000e5 +17 2 8 22 -0.65536000000000000000e5 +17 2 12 26 0.65536000000000000000e5 +17 2 16 30 0.32768000000000000000e5 +17 3 2 31 0.65536000000000000000e5 +17 3 14 27 0.13107200000000000000e6 +17 3 17 30 0.32768000000000000000e5 +17 3 20 33 0.32768000000000000000e5 +17 4 4 16 0.65536000000000000000e5 +18 1 7 54 -0.32768000000000000000e5 +18 1 37 56 0.16384000000000000000e5 +18 1 38 53 -0.16384000000000000000e5 +18 1 47 50 0.32768000000000000000e5 +18 1 47 54 -0.16384000000000000000e5 +18 2 32 32 -0.32768000000000000000e5 +18 3 6 35 0.32768000000000000000e5 +18 3 32 33 -0.16384000000000000000e5 +19 1 16 55 -0.16384000000000000000e5 +19 1 43 46 -0.16384000000000000000e5 +19 1 46 55 0.16384000000000000000e5 +19 2 31 31 -0.32768000000000000000e5 +19 3 25 34 -0.16384000000000000000e5 +20 1 35 50 -0.32768000000000000000e5 +20 1 44 51 0.16384000000000000000e5 +20 1 51 52 0.16384000000000000000e5 +21 1 16 55 -0.32768000000000000000e5 +21 1 17 48 0.16384000000000000000e5 +21 1 32 47 -0.81920000000000000000e4 +21 1 33 48 -0.81920000000000000000e4 +21 1 37 52 0.81920000000000000000e4 +21 1 43 50 0.81920000000000000000e4 +21 1 46 53 0.16384000000000000000e5 +21 3 21 34 -0.81920000000000000000e4 +21 3 24 29 -0.16384000000000000000e5 +21 4 16 20 -0.81920000000000000000e4 +22 1 33 56 0.16384000000000000000e5 +22 1 34 49 -0.32768000000000000000e5 +22 1 43 50 0.16384000000000000000e5 +23 1 17 48 -0.32768000000000000000e5 +23 1 28 43 0.16384000000000000000e5 +23 1 50 51 0.16384000000000000000e5 +23 3 18 31 -0.16384000000000000000e5 +23 3 21 34 -0.16384000000000000000e5 +23 3 24 29 0.32768000000000000000e5 +24 1 32 47 -0.16384000000000000000e5 +24 1 37 44 -0.16384000000000000000e5 +24 1 37 52 0.16384000000000000000e5 +24 2 20 34 -0.16384000000000000000e5 +24 3 21 34 -0.16384000000000000000e5 +24 3 29 34 -0.16384000000000000000e5 +25 1 1 48 0.81920000000000000000e4 +25 1 2 49 0.81920000000000000000e4 +25 1 3 50 0.16384000000000000000e5 +25 1 11 42 -0.32768000000000000000e5 +25 1 12 43 -0.65536000000000000000e5 +25 1 17 48 0.65536000000000000000e5 +25 1 23 38 0.81920000000000000000e4 +25 1 24 55 -0.16384000000000000000e5 +25 1 28 43 0.32768000000000000000e5 +25 1 33 48 -0.32768000000000000000e5 +25 1 40 55 0.16384000000000000000e5 +25 2 2 32 0.81920000000000000000e4 +25 2 8 22 -0.32768000000000000000e5 +25 2 12 26 0.32768000000000000000e5 +25 2 16 30 0.16384000000000000000e5 +25 2 21 35 -0.16384000000000000000e5 +25 3 2 31 0.32768000000000000000e5 +25 3 14 27 0.65536000000000000000e5 +25 3 17 30 0.16384000000000000000e5 +25 3 18 31 -0.32768000000000000000e5 +25 3 20 33 0.16384000000000000000e5 +25 3 21 34 -0.32768000000000000000e5 +25 4 4 16 0.32768000000000000000e5 +26 1 1 48 0.81920000000000000000e4 +26 1 2 49 0.81920000000000000000e4 +26 1 3 50 0.16384000000000000000e5 +26 1 11 42 -0.32768000000000000000e5 +26 1 12 43 -0.65536000000000000000e5 +26 1 17 48 0.65536000000000000000e5 +26 1 23 38 0.81920000000000000000e4 +26 2 2 32 0.81920000000000000000e4 +26 2 8 22 -0.32768000000000000000e5 +26 2 12 26 0.32768000000000000000e5 +26 2 16 30 0.16384000000000000000e5 +26 2 21 35 -0.16384000000000000000e5 +26 3 2 31 0.32768000000000000000e5 +26 3 14 27 0.65536000000000000000e5 +26 3 17 30 0.16384000000000000000e5 +26 3 20 33 0.16384000000000000000e5 +26 3 21 34 -0.32768000000000000000e5 +26 3 22 35 -0.16384000000000000000e5 +26 4 4 16 0.32768000000000000000e5 +27 1 1 48 -0.16384000000000000000e5 +27 1 2 49 -0.16384000000000000000e5 +27 1 3 50 -0.32768000000000000000e5 +27 1 11 42 0.65536000000000000000e5 +27 1 12 43 0.13107200000000000000e6 +27 1 17 48 -0.13107200000000000000e6 +27 1 23 38 -0.16384000000000000000e5 +27 1 24 55 0.16384000000000000000e5 +27 1 32 47 -0.32768000000000000000e5 +27 1 47 50 -0.16384000000000000000e5 +27 2 2 32 -0.16384000000000000000e5 +27 2 8 22 0.65536000000000000000e5 +27 2 12 26 -0.65536000000000000000e5 +27 2 16 30 -0.32768000000000000000e5 +27 2 21 35 0.16384000000000000000e5 +27 2 29 35 -0.16384000000000000000e5 +27 3 2 31 -0.65536000000000000000e5 +27 3 14 27 -0.13107200000000000000e6 +27 3 17 30 -0.32768000000000000000e5 +27 3 20 33 -0.32768000000000000000e5 +27 3 22 35 0.16384000000000000000e5 +27 3 29 34 -0.32768000000000000000e5 +27 4 4 16 -0.65536000000000000000e5 +28 1 7 54 0.16384000000000000000e5 +28 1 37 44 -0.32768000000000000000e5 +28 1 47 50 0.16384000000000000000e5 +28 3 6 35 -0.16384000000000000000e5 +29 1 24 55 -0.32768000000000000000e5 +29 1 26 41 0.32768000000000000000e5 +29 1 47 54 -0.16384000000000000000e5 +29 2 4 34 0.32768000000000000000e5 +29 2 21 35 -0.32768000000000000000e5 +29 2 33 33 -0.32768000000000000000e5 +29 3 5 34 0.32768000000000000000e5 +29 3 17 30 0.32768000000000000000e5 +29 3 18 31 -0.65536000000000000000e5 +29 3 20 33 0.32768000000000000000e5 +29 3 21 34 -0.65536000000000000000e5 +29 3 22 35 -0.32768000000000000000e5 +29 3 28 33 0.16384000000000000000e5 +29 3 32 33 -0.16384000000000000000e5 +30 1 1 48 -0.16384000000000000000e5 +30 1 2 49 -0.32768000000000000000e5 +30 1 3 50 -0.32768000000000000000e5 +30 1 11 42 0.65536000000000000000e5 +30 1 12 43 0.13107200000000000000e6 +30 1 17 48 -0.13107200000000000000e6 +30 1 23 38 -0.16384000000000000000e5 +30 1 24 39 -0.16384000000000000000e5 +30 1 25 56 0.16384000000000000000e5 +30 1 26 41 -0.32768000000000000000e5 +30 2 2 32 -0.16384000000000000000e5 +30 2 3 33 -0.16384000000000000000e5 +30 2 8 22 0.65536000000000000000e5 +30 2 12 26 -0.65536000000000000000e5 +30 2 16 30 -0.32768000000000000000e5 +30 3 2 31 -0.65536000000000000000e5 +30 3 4 33 -0.16384000000000000000e5 +30 3 14 27 -0.13107200000000000000e6 +30 3 19 32 -0.16384000000000000000e5 +30 3 22 27 0.32768000000000000000e5 +30 4 4 16 -0.65536000000000000000e5 +31 1 1 48 0.16384000000000000000e5 +31 1 2 49 0.16384000000000000000e5 +31 1 3 50 0.32768000000000000000e5 +31 1 11 42 -0.65536000000000000000e5 +31 1 12 43 -0.13107200000000000000e6 +31 1 17 48 0.13107200000000000000e6 +31 1 23 38 0.16384000000000000000e5 +31 1 23 54 0.16384000000000000000e5 +31 1 47 54 0.16384000000000000000e5 +31 2 2 32 0.16384000000000000000e5 +31 2 8 22 -0.65536000000000000000e5 +31 2 12 26 0.65536000000000000000e5 +31 2 16 30 0.32768000000000000000e5 +31 3 2 31 0.65536000000000000000e5 +31 3 14 27 0.13107200000000000000e6 +31 3 17 30 0.32768000000000000000e5 +31 3 32 33 0.16384000000000000000e5 +31 4 4 16 0.65536000000000000000e5 +32 1 22 53 -0.16384000000000000000e5 +32 1 23 54 -0.16384000000000000000e5 +32 1 38 53 0.16384000000000000000e5 +32 2 26 32 -0.16384000000000000000e5 +32 3 6 35 -0.32768000000000000000e5 +33 1 1 48 -0.16384000000000000000e5 +33 1 2 49 -0.16384000000000000000e5 +33 1 22 53 0.16384000000000000000e5 +33 1 23 38 -0.16384000000000000000e5 +33 1 38 53 -0.16384000000000000000e5 +33 1 47 50 0.32768000000000000000e5 +33 1 47 54 -0.16384000000000000000e5 +33 2 2 32 -0.16384000000000000000e5 +33 2 32 32 -0.32768000000000000000e5 +33 3 16 29 0.32768000000000000000e5 +33 3 32 33 -0.16384000000000000000e5 +34 1 16 55 0.81920000000000000000e4 +34 1 19 50 -0.16384000000000000000e5 +34 1 20 51 -0.16384000000000000000e5 +34 1 21 56 0.16384000000000000000e5 +34 1 29 36 -0.16384000000000000000e5 +34 1 35 50 0.81920000000000000000e4 +34 1 43 46 0.81920000000000000000e4 +34 2 25 31 -0.16384000000000000000e5 +34 2 31 31 0.16384000000000000000e5 +34 3 24 25 0.16384000000000000000e5 +35 1 29 36 -0.32768000000000000000e5 +35 1 35 50 0.16384000000000000000e5 +35 1 45 52 0.16384000000000000000e5 +35 3 24 25 0.32768000000000000000e5 +36 1 16 55 0.16384000000000000000e5 +36 1 19 50 -0.32768000000000000000e5 +36 1 35 50 0.16384000000000000000e5 +36 3 25 34 -0.16384000000000000000e5 +37 1 14 45 -0.32768000000000000000e5 +37 1 34 49 0.16384000000000000000e5 +37 1 46 49 0.16384000000000000000e5 +37 3 15 28 0.32768000000000000000e5 +38 1 13 52 -0.32768000000000000000e5 +38 1 17 48 0.16384000000000000000e5 +38 1 44 51 0.16384000000000000000e5 +38 3 24 29 -0.16384000000000000000e5 +39 1 17 48 0.16384000000000000000e5 +39 1 28 43 0.81920000000000000000e4 +39 1 33 48 -0.81920000000000000000e4 +39 1 34 41 -0.32768000000000000000e5 +39 1 37 44 0.81920000000000000000e4 +39 1 37 52 0.81920000000000000000e4 +39 1 43 50 0.81920000000000000000e4 +39 2 20 34 0.81920000000000000000e4 +39 3 18 31 -0.81920000000000000000e4 +39 3 21 34 -0.81920000000000000000e4 +39 3 24 29 -0.16384000000000000000e5 +39 4 16 20 -0.81920000000000000000e4 +40 1 14 45 -0.65536000000000000000e5 +40 1 17 48 0.32768000000000000000e5 +40 1 18 49 0.32768000000000000000e5 +40 1 28 43 -0.16384000000000000000e5 +40 1 33 48 0.16384000000000000000e5 +40 1 43 50 -0.16384000000000000000e5 +40 1 44 51 0.32768000000000000000e5 +40 2 24 30 0.32768000000000000000e5 +40 2 31 33 -0.16384000000000000000e5 +40 3 15 28 0.65536000000000000000e5 +40 3 18 31 0.16384000000000000000e5 +40 3 21 34 0.16384000000000000000e5 +41 1 17 48 -0.32768000000000000000e5 +41 1 28 43 0.16384000000000000000e5 +41 1 43 50 0.16384000000000000000e5 +41 3 18 31 -0.16384000000000000000e5 +42 1 5 52 0.16384000000000000000e5 +42 1 11 42 -0.16384000000000000000e5 +42 1 12 43 -0.32768000000000000000e5 +42 1 28 43 0.16384000000000000000e5 +42 1 32 47 0.16384000000000000000e5 +42 2 12 26 0.16384000000000000000e5 +42 2 20 34 -0.16384000000000000000e5 +42 3 2 31 0.16384000000000000000e5 +42 3 14 27 0.32768000000000000000e5 +42 3 18 31 -0.16384000000000000000e5 +42 3 21 34 -0.16384000000000000000e5 +42 4 7 19 -0.16384000000000000000e5 +42 4 8 20 -0.16384000000000000000e5 +43 1 16 47 -0.32768000000000000000e5 +43 1 37 44 0.16384000000000000000e5 +43 1 37 52 0.16384000000000000000e5 +44 1 5 52 -0.32768000000000000000e5 +44 1 26 41 -0.16384000000000000000e5 +44 1 43 50 0.32768000000000000000e5 +44 2 4 34 -0.16384000000000000000e5 +44 2 21 35 0.16384000000000000000e5 +44 2 28 34 -0.16384000000000000000e5 +44 3 5 34 -0.16384000000000000000e5 +44 3 17 30 -0.16384000000000000000e5 +44 3 18 31 0.32768000000000000000e5 +44 3 20 33 -0.16384000000000000000e5 +44 3 21 34 0.32768000000000000000e5 +45 1 1 48 0.81920000000000000000e4 +45 1 2 49 0.81920000000000000000e4 +45 1 3 50 0.16384000000000000000e5 +45 1 11 42 -0.32768000000000000000e5 +45 1 12 43 -0.65536000000000000000e5 +45 1 17 48 0.65536000000000000000e5 +45 1 23 38 0.81920000000000000000e4 +45 1 24 55 -0.16384000000000000000e5 +45 1 26 41 0.16384000000000000000e5 +45 2 2 32 0.81920000000000000000e4 +45 2 8 22 -0.32768000000000000000e5 +45 2 12 26 0.32768000000000000000e5 +45 2 16 30 0.16384000000000000000e5 +45 2 21 35 -0.16384000000000000000e5 +45 3 2 31 0.32768000000000000000e5 +45 3 14 27 0.65536000000000000000e5 +45 3 17 30 0.16384000000000000000e5 +45 3 18 31 -0.32768000000000000000e5 +45 3 20 33 0.16384000000000000000e5 +45 3 21 34 -0.32768000000000000000e5 +45 3 22 27 -0.16384000000000000000e5 +45 4 4 16 0.32768000000000000000e5 +46 1 1 48 -0.81920000000000000000e4 +46 1 2 49 -0.81920000000000000000e4 +46 1 3 50 -0.16384000000000000000e5 +46 1 5 52 0.32768000000000000000e5 +46 1 11 42 0.32768000000000000000e5 +46 1 12 43 0.65536000000000000000e5 +46 1 17 48 -0.13107200000000000000e6 +46 1 23 38 -0.81920000000000000000e4 +46 1 24 55 0.16384000000000000000e5 +46 1 28 43 0.32768000000000000000e5 +46 2 2 32 -0.81920000000000000000e4 +46 2 8 22 0.65536000000000000000e5 +46 2 12 26 -0.32768000000000000000e5 +46 2 16 30 -0.16384000000000000000e5 +46 3 2 31 -0.32768000000000000000e5 +46 3 14 27 -0.65536000000000000000e5 +46 3 17 30 -0.16384000000000000000e5 +46 4 4 16 -0.65536000000000000000e5 +46 4 7 19 -0.32768000000000000000e5 +47 1 1 48 -0.81920000000000000000e4 +47 1 2 49 -0.81920000000000000000e4 +47 1 3 50 -0.16384000000000000000e5 +47 1 7 54 0.16384000000000000000e5 +47 1 23 38 -0.81920000000000000000e4 +47 2 2 32 -0.81920000000000000000e4 +47 2 16 30 -0.16384000000000000000e5 +47 3 17 30 -0.16384000000000000000e5 +47 3 20 33 -0.16384000000000000000e5 +48 1 1 48 0.81920000000000000000e4 +48 1 2 49 0.81920000000000000000e4 +48 1 5 52 -0.32768000000000000000e5 +48 1 7 54 0.16384000000000000000e5 +48 1 11 42 0.32768000000000000000e5 +48 1 12 43 0.65536000000000000000e5 +48 1 16 47 -0.65536000000000000000e5 +48 1 23 38 0.81920000000000000000e4 +48 1 28 43 -0.32768000000000000000e5 +48 2 2 32 0.81920000000000000000e4 +48 2 10 32 0.32768000000000000000e5 +48 2 12 26 -0.32768000000000000000e5 +48 3 2 31 -0.32768000000000000000e5 +48 3 6 35 -0.16384000000000000000e5 +48 3 14 27 -0.65536000000000000000e5 +48 3 16 29 -0.16384000000000000000e5 +48 4 7 19 0.32768000000000000000e5 +49 1 1 48 0.16384000000000000000e5 +49 1 2 49 0.32768000000000000000e5 +49 1 3 50 0.32768000000000000000e5 +49 1 6 53 0.16384000000000000000e5 +49 1 11 42 -0.65536000000000000000e5 +49 1 12 43 -0.13107200000000000000e6 +49 1 17 48 0.13107200000000000000e6 +49 1 23 38 0.16384000000000000000e5 +49 1 24 39 0.16384000000000000000e5 +49 1 24 55 -0.32768000000000000000e5 +49 1 25 56 -0.16384000000000000000e5 +49 1 26 41 0.32768000000000000000e5 +49 2 2 32 0.16384000000000000000e5 +49 2 3 33 0.16384000000000000000e5 +49 2 4 34 0.32768000000000000000e5 +49 2 8 22 -0.65536000000000000000e5 +49 2 12 26 0.65536000000000000000e5 +49 2 16 30 0.32768000000000000000e5 +49 2 19 35 -0.16384000000000000000e5 +49 2 21 35 -0.32768000000000000000e5 +49 3 2 31 0.65536000000000000000e5 +49 3 4 33 0.16384000000000000000e5 +49 3 14 27 0.13107200000000000000e6 +49 3 17 30 0.32768000000000000000e5 +49 3 18 31 -0.65536000000000000000e5 +49 3 19 32 0.16384000000000000000e5 +49 3 20 33 0.32768000000000000000e5 +49 3 21 34 -0.65536000000000000000e5 +49 3 28 33 -0.16384000000000000000e5 +49 4 4 16 0.65536000000000000000e5 +50 1 1 48 -0.16384000000000000000e5 +50 1 2 49 -0.32768000000000000000e5 +50 1 3 50 -0.32768000000000000000e5 +50 1 11 42 0.65536000000000000000e5 +50 1 12 43 0.13107200000000000000e6 +50 1 17 48 -0.13107200000000000000e6 +50 1 23 38 -0.16384000000000000000e5 +50 1 24 39 -0.16384000000000000000e5 +50 1 25 56 0.16384000000000000000e5 +50 1 26 41 -0.32768000000000000000e5 +50 2 2 32 -0.16384000000000000000e5 +50 2 3 33 -0.16384000000000000000e5 +50 2 8 22 0.65536000000000000000e5 +50 2 12 26 -0.65536000000000000000e5 +50 2 16 30 -0.32768000000000000000e5 +50 3 2 31 -0.65536000000000000000e5 +50 3 4 33 -0.16384000000000000000e5 +50 3 14 27 -0.13107200000000000000e6 +50 3 28 33 0.16384000000000000000e5 +50 4 4 16 -0.65536000000000000000e5 +51 1 2 49 -0.16384000000000000000e5 +51 2 18 32 -0.16384000000000000000e5 +51 3 3 32 0.16384000000000000000e5 +51 3 17 30 -0.32768000000000000000e5 +51 3 19 32 -0.16384000000000000000e5 +52 1 2 49 0.16384000000000000000e5 +52 1 3 50 -0.32768000000000000000e5 +52 1 23 54 0.16384000000000000000e5 +52 3 3 32 -0.16384000000000000000e5 +53 1 1 48 -0.16384000000000000000e5 +53 1 2 49 -0.32768000000000000000e5 +53 1 7 54 0.65536000000000000000e5 +53 1 22 53 -0.16384000000000000000e5 +53 1 23 38 -0.16384000000000000000e5 +53 1 23 54 -0.16384000000000000000e5 +53 1 24 39 -0.16384000000000000000e5 +53 2 2 32 -0.16384000000000000000e5 +53 2 3 33 -0.16384000000000000000e5 +53 2 18 32 0.16384000000000000000e5 +53 2 26 32 -0.32768000000000000000e5 +53 3 4 33 -0.16384000000000000000e5 +53 3 6 35 -0.32768000000000000000e5 +53 3 17 30 0.32768000000000000000e5 +53 4 17 17 -0.32768000000000000000e5 +54 1 1 48 0.16384000000000000000e5 +54 1 2 33 -0.65536000000000000000e5 +54 1 2 49 0.16384000000000000000e5 +54 1 3 34 0.13107200000000000000e6 +54 1 3 50 0.32768000000000000000e5 +54 1 5 52 -0.65536000000000000000e5 +54 1 7 38 -0.32768000000000000000e5 +54 1 7 54 -0.32768000000000000000e5 +54 1 8 39 -0.32768000000000000000e5 +54 1 10 41 -0.65536000000000000000e5 +54 1 11 42 0.65536000000000000000e5 +54 1 12 43 0.13107200000000000000e6 +54 1 16 47 -0.13107200000000000000e6 +54 1 22 53 0.16384000000000000000e5 +54 1 23 38 0.16384000000000000000e5 +54 1 24 39 0.16384000000000000000e5 +54 1 28 43 -0.65536000000000000000e5 +54 2 1 35 -0.16384000000000000000e5 +54 2 2 32 0.16384000000000000000e5 +54 2 3 33 0.16384000000000000000e5 +54 2 7 21 -0.65536000000000000000e5 +54 2 10 32 0.65536000000000000000e5 +54 2 12 26 -0.65536000000000000000e5 +54 2 18 32 -0.16384000000000000000e5 +54 2 26 32 0.16384000000000000000e5 +54 3 1 30 -0.32768000000000000000e5 +54 3 2 31 -0.65536000000000000000e5 +54 3 3 32 0.16384000000000000000e5 +54 3 4 33 0.16384000000000000000e5 +54 3 7 20 -0.65536000000000000000e5 +54 3 8 21 -0.65536000000000000000e5 +54 3 14 27 -0.13107200000000000000e6 +54 3 16 29 -0.32768000000000000000e5 +54 3 17 30 -0.32768000000000000000e5 +54 4 5 17 -0.32768000000000000000e5 +54 4 7 19 0.65536000000000000000e5 +54 4 17 17 0.32768000000000000000e5 +55 1 19 50 0.81920000000000000000e4 +55 1 20 51 0.81920000000000000000e4 +55 1 21 44 -0.32768000000000000000e5 +55 1 29 36 0.81920000000000000000e4 +55 1 46 46 0.32768000000000000000e5 +55 2 25 31 0.81920000000000000000e4 +55 3 24 25 -0.81920000000000000000e4 +56 1 17 32 -0.16384000000000000000e5 +56 1 18 33 -0.16384000000000000000e5 +56 1 36 51 0.16384000000000000000e5 +56 2 14 24 -0.16384000000000000000e5 +56 3 12 25 -0.16384000000000000000e5 +56 3 15 24 0.32768000000000000000e5 +56 3 24 25 -0.16384000000000000000e5 +57 1 4 19 0.81920000000000000000e4 +57 1 13 44 -0.81920000000000000000e4 +57 1 16 55 0.81920000000000000000e4 +57 1 19 42 -0.16384000000000000000e5 +57 1 19 50 0.16384000000000000000e5 +57 1 20 27 -0.16384000000000000000e5 +57 1 29 36 -0.16384000000000000000e5 +57 1 35 50 0.81920000000000000000e4 +57 1 43 46 0.81920000000000000000e4 +57 2 15 29 -0.16384000000000000000e5 +57 2 31 31 0.16384000000000000000e5 +57 3 8 13 -0.81920000000000000000e4 +57 3 10 23 0.81920000000000000000e4 +57 3 11 24 0.81920000000000000000e4 +57 4 10 14 0.81920000000000000000e4 +58 1 14 45 0.16384000000000000000e5 +58 1 29 36 -0.32768000000000000000e5 +58 1 43 46 0.16384000000000000000e5 +58 3 15 28 -0.16384000000000000000e5 +59 1 13 52 0.16384000000000000000e5 +59 1 19 42 -0.32768000000000000000e5 +59 1 35 50 0.16384000000000000000e5 +60 1 4 19 0.16384000000000000000e5 +60 1 13 44 -0.16384000000000000000e5 +60 1 16 55 0.16384000000000000000e5 +60 1 20 27 -0.32768000000000000000e5 +60 1 34 41 0.16384000000000000000e5 +60 3 8 13 -0.16384000000000000000e5 +60 3 10 23 0.16384000000000000000e5 +60 3 11 24 0.16384000000000000000e5 +60 4 10 14 0.16384000000000000000e5 +61 1 17 48 -0.32768000000000000000e5 +61 1 18 49 -0.16384000000000000000e5 +61 1 34 49 -0.16384000000000000000e5 +61 1 35 50 0.32768000000000000000e5 +61 2 24 30 -0.16384000000000000000e5 +61 2 24 34 -0.16384000000000000000e5 +61 3 15 28 -0.32768000000000000000e5 +61 3 24 29 0.16384000000000000000e5 +62 1 17 48 0.16384000000000000000e5 +62 1 28 35 -0.32768000000000000000e5 +62 1 34 49 0.16384000000000000000e5 +63 1 5 52 -0.81920000000000000000e4 +63 1 11 42 0.81920000000000000000e4 +63 1 12 43 0.16384000000000000000e5 +63 1 13 44 -0.32768000000000000000e5 +63 1 17 48 0.16384000000000000000e5 +63 2 12 26 -0.81920000000000000000e4 +63 2 20 34 0.81920000000000000000e4 +63 3 2 31 -0.81920000000000000000e4 +63 3 14 27 -0.16384000000000000000e5 +63 3 24 29 -0.16384000000000000000e5 +63 4 7 19 0.81920000000000000000e4 +63 4 8 20 0.81920000000000000000e4 +64 1 4 19 0.32768000000000000000e5 +64 1 16 47 0.16384000000000000000e5 +64 1 20 27 -0.65536000000000000000e5 +64 1 28 35 0.32768000000000000000e5 +64 1 28 43 0.81920000000000000000e4 +64 1 32 47 0.81920000000000000000e4 +64 1 37 44 0.81920000000000000000e4 +64 2 10 24 0.32768000000000000000e5 +64 2 20 34 0.81920000000000000000e4 +64 3 8 13 -0.32768000000000000000e5 +64 3 10 23 0.32768000000000000000e5 +64 3 11 24 0.32768000000000000000e5 +64 3 18 31 -0.81920000000000000000e4 +65 1 5 52 0.16384000000000000000e5 +65 1 15 54 0.16384000000000000000e5 +65 1 18 25 -0.32768000000000000000e5 +65 3 14 19 0.32768000000000000000e5 +66 1 17 48 -0.32768000000000000000e5 +66 1 28 43 0.16384000000000000000e5 +66 1 33 48 0.16384000000000000000e5 +66 3 14 27 -0.32768000000000000000e5 +67 1 5 52 -0.16384000000000000000e5 +67 1 12 43 -0.32768000000000000000e5 +67 1 17 48 0.32768000000000000000e5 +67 2 8 22 -0.16384000000000000000e5 +67 3 18 31 -0.16384000000000000000e5 +67 4 4 16 0.16384000000000000000e5 +67 4 7 19 0.16384000000000000000e5 +68 1 11 42 0.16384000000000000000e5 +68 1 12 43 0.32768000000000000000e5 +68 1 16 47 -0.32768000000000000000e5 +68 1 17 48 -0.32768000000000000000e5 +68 1 32 47 0.16384000000000000000e5 +68 2 8 22 0.16384000000000000000e5 +68 2 12 26 -0.16384000000000000000e5 +68 3 2 31 -0.16384000000000000000e5 +68 3 13 26 -0.32768000000000000000e5 +68 3 14 27 -0.32768000000000000000e5 +68 4 4 16 -0.16384000000000000000e5 +69 1 2 17 -0.32768000000000000000e5 +69 1 5 52 0.16384000000000000000e5 +69 1 11 42 -0.16384000000000000000e5 +69 1 12 43 -0.32768000000000000000e5 +69 1 16 47 0.32768000000000000000e5 +69 1 28 43 0.16384000000000000000e5 +69 1 37 44 0.16384000000000000000e5 +69 2 10 32 -0.16384000000000000000e5 +69 2 12 26 0.16384000000000000000e5 +69 3 1 14 0.32768000000000000000e5 +69 3 2 31 0.16384000000000000000e5 +69 3 6 23 0.32768000000000000000e5 +69 3 14 27 0.32768000000000000000e5 +69 4 7 19 -0.16384000000000000000e5 +70 1 11 42 -0.32768000000000000000e5 +70 1 26 41 -0.16384000000000000000e5 +70 1 33 48 0.32768000000000000000e5 +70 2 28 30 -0.16384000000000000000e5 +70 3 5 34 0.16384000000000000000e5 +70 3 22 27 0.16384000000000000000e5 +71 1 1 48 0.81920000000000000000e4 +71 1 2 49 0.81920000000000000000e4 +71 1 3 50 0.16384000000000000000e5 +71 1 10 41 0.32768000000000000000e5 +71 1 12 43 -0.65536000000000000000e5 +71 1 23 38 0.81920000000000000000e4 +71 1 28 43 0.32768000000000000000e5 +71 2 2 32 0.81920000000000000000e4 +71 2 4 34 -0.16384000000000000000e5 +71 2 12 26 0.32768000000000000000e5 +71 2 16 30 0.16384000000000000000e5 +71 3 2 31 0.32768000000000000000e5 +71 3 5 34 -0.16384000000000000000e5 +72 1 1 48 -0.81920000000000000000e4 +72 1 2 49 -0.81920000000000000000e4 +72 1 3 50 -0.16384000000000000000e5 +72 1 10 41 -0.32768000000000000000e5 +72 1 11 42 0.32768000000000000000e5 +72 1 12 43 0.65536000000000000000e5 +72 1 17 48 -0.65536000000000000000e5 +72 1 23 38 -0.81920000000000000000e4 +72 1 26 41 0.16384000000000000000e5 +72 2 2 32 -0.81920000000000000000e4 +72 2 8 22 0.32768000000000000000e5 +72 2 12 26 -0.32768000000000000000e5 +72 2 16 30 -0.16384000000000000000e5 +72 3 2 31 -0.32768000000000000000e5 +72 3 14 27 -0.65536000000000000000e5 +72 3 22 27 -0.16384000000000000000e5 +72 4 4 16 -0.32768000000000000000e5 +73 1 1 48 -0.81920000000000000000e4 +73 1 2 49 -0.81920000000000000000e4 +73 1 23 38 -0.81920000000000000000e4 +73 2 2 32 -0.81920000000000000000e4 +73 2 16 30 -0.16384000000000000000e5 +73 3 2 31 -0.32768000000000000000e5 +73 3 17 30 -0.16384000000000000000e5 +74 1 1 48 0.81920000000000000000e4 +74 1 2 33 0.32768000000000000000e5 +74 1 2 49 0.81920000000000000000e4 +74 1 3 34 -0.65536000000000000000e5 +74 1 7 54 0.16384000000000000000e5 +74 1 10 41 0.32768000000000000000e5 +74 1 23 38 0.81920000000000000000e4 +74 2 2 32 0.81920000000000000000e4 +74 2 7 21 0.32768000000000000000e5 +74 3 7 20 0.32768000000000000000e5 +74 3 8 21 0.32768000000000000000e5 +75 1 1 48 0.81920000000000000000e4 +75 1 2 17 -0.65536000000000000000e5 +75 1 2 49 0.81920000000000000000e4 +75 1 3 50 -0.16384000000000000000e5 +75 1 5 52 0.32768000000000000000e5 +75 1 7 38 0.16384000000000000000e5 +75 1 8 39 0.16384000000000000000e5 +75 1 16 47 0.65536000000000000000e5 +75 1 17 48 -0.65536000000000000000e5 +75 1 23 38 0.81920000000000000000e4 +75 1 28 43 0.32768000000000000000e5 +75 2 1 31 0.32768000000000000000e5 +75 2 2 32 0.81920000000000000000e4 +75 2 8 22 0.32768000000000000000e5 +75 2 10 32 -0.32768000000000000000e5 +75 3 1 14 0.65536000000000000000e5 +75 3 1 30 0.16384000000000000000e5 +75 3 2 31 0.32768000000000000000e5 +75 3 6 23 0.65536000000000000000e5 +75 3 16 29 -0.16384000000000000000e5 +75 4 4 16 -0.32768000000000000000e5 +75 4 5 17 0.16384000000000000000e5 +75 4 7 19 -0.32768000000000000000e5 +76 1 1 48 0.32768000000000000000e5 +76 1 2 49 0.49152000000000000000e5 +76 1 3 50 0.65536000000000000000e5 +76 1 6 53 -0.16384000000000000000e5 +76 1 11 42 -0.13107200000000000000e6 +76 1 12 43 -0.26214400000000000000e6 +76 1 17 48 0.26214400000000000000e6 +76 1 23 38 0.32768000000000000000e5 +76 1 24 39 0.16384000000000000000e5 +76 1 25 40 0.16384000000000000000e5 +76 1 26 29 -0.32768000000000000000e5 +76 1 26 41 -0.32768000000000000000e5 +76 1 28 43 0.65536000000000000000e5 +76 2 2 32 0.32768000000000000000e5 +76 2 3 33 0.16384000000000000000e5 +76 2 4 34 -0.32768000000000000000e5 +76 2 5 35 -0.16384000000000000000e5 +76 2 8 22 -0.13107200000000000000e6 +76 2 12 26 0.13107200000000000000e6 +76 2 16 30 0.65536000000000000000e5 +76 3 2 31 0.13107200000000000000e6 +76 3 4 33 0.16384000000000000000e5 +76 3 5 34 -0.32768000000000000000e5 +76 3 14 27 0.26214400000000000000e6 +76 4 4 16 0.13107200000000000000e6 +77 1 1 48 -0.16384000000000000000e5 +77 1 2 49 -0.32768000000000000000e5 +77 1 3 50 -0.32768000000000000000e5 +77 1 6 53 0.16384000000000000000e5 +77 1 9 40 -0.32768000000000000000e5 +77 1 11 42 0.65536000000000000000e5 +77 1 12 43 0.13107200000000000000e6 +77 1 17 48 -0.13107200000000000000e6 +77 1 23 38 -0.16384000000000000000e5 +77 1 24 39 -0.16384000000000000000e5 +77 2 2 32 -0.16384000000000000000e5 +77 2 3 33 -0.16384000000000000000e5 +77 2 8 22 0.65536000000000000000e5 +77 2 12 26 -0.65536000000000000000e5 +77 2 16 30 -0.32768000000000000000e5 +77 3 2 31 -0.65536000000000000000e5 +77 3 14 27 -0.13107200000000000000e6 +77 4 4 16 -0.65536000000000000000e5 +78 1 2 49 -0.16384000000000000000e5 +78 1 3 50 -0.32768000000000000000e5 +78 1 5 52 -0.65536000000000000000e5 +78 1 8 39 0.32768000000000000000e5 +78 1 9 40 0.32768000000000000000e5 +78 1 10 41 -0.65536000000000000000e5 +78 1 17 48 0.13107200000000000000e6 +78 1 26 41 -0.32768000000000000000e5 +78 1 28 43 -0.65536000000000000000e5 +78 2 3 33 -0.16384000000000000000e5 +78 2 8 22 -0.65536000000000000000e5 +78 3 4 33 -0.16384000000000000000e5 +78 4 4 16 0.65536000000000000000e5 +78 4 6 18 0.32768000000000000000e5 +78 4 7 19 0.65536000000000000000e5 +79 1 2 49 0.16384000000000000000e5 +79 1 8 39 -0.32768000000000000000e5 +79 1 24 39 0.16384000000000000000e5 +79 2 3 33 0.16384000000000000000e5 +79 2 18 32 -0.16384000000000000000e5 +79 3 3 32 0.16384000000000000000e5 +79 3 4 33 0.16384000000000000000e5 +79 3 17 30 -0.32768000000000000000e5 +80 1 1 48 -0.16384000000000000000e5 +80 2 2 32 -0.16384000000000000000e5 +80 3 1 30 -0.32768000000000000000e5 +80 3 3 32 -0.16384000000000000000e5 +81 1 1 48 0.16384000000000000000e5 +81 1 2 49 -0.16384000000000000000e5 +81 1 7 38 -0.32768000000000000000e5 +81 1 7 54 0.32768000000000000000e5 +81 1 24 39 -0.16384000000000000000e5 +81 2 3 33 -0.16384000000000000000e5 +81 2 18 32 0.16384000000000000000e5 +81 2 26 32 -0.16384000000000000000e5 +81 3 4 33 -0.16384000000000000000e5 +81 3 17 30 0.32768000000000000000e5 +81 4 17 17 -0.32768000000000000000e5 +82 1 1 24 0.16384000000000000000e5 +82 1 1 32 0.65536000000000000000e5 +82 1 1 40 0.16384000000000000000e5 +82 1 1 48 0.16384000000000000000e5 +82 1 2 49 0.32768000000000000000e5 +82 1 3 50 -0.32768000000000000000e5 +82 1 5 52 0.65536000000000000000e5 +82 1 6 37 0.16384000000000000000e5 +82 1 7 22 0.32768000000000000000e5 +82 1 7 54 -0.32768000000000000000e5 +82 1 8 23 0.32768000000000000000e5 +82 1 11 42 -0.65536000000000000000e5 +82 1 12 27 -0.13107200000000000000e6 +82 1 12 43 -0.13107200000000000000e6 +82 1 16 47 0.13107200000000000000e6 +82 1 23 38 0.16384000000000000000e5 +82 1 24 39 0.16384000000000000000e5 +82 1 28 43 0.65536000000000000000e5 +82 2 1 7 0.32768000000000000000e5 +82 2 1 35 -0.16384000000000000000e5 +82 2 2 16 0.16384000000000000000e5 +82 2 2 32 0.32768000000000000000e5 +82 2 3 17 -0.16384000000000000000e5 +82 2 3 33 0.16384000000000000000e5 +82 2 4 26 0.16384000000000000000e5 +82 2 6 20 0.65536000000000000000e5 +82 2 10 32 -0.65536000000000000000e5 +82 2 12 26 0.65536000000000000000e5 +82 2 16 16 -0.32768000000000000000e5 +82 2 18 32 -0.16384000000000000000e5 +82 2 26 32 0.16384000000000000000e5 +82 3 1 16 0.16384000000000000000e5 +82 3 1 30 0.65536000000000000000e5 +82 3 2 31 0.65536000000000000000e5 +82 3 3 16 0.16384000000000000000e5 +82 3 3 32 0.16384000000000000000e5 +82 3 4 33 0.16384000000000000000e5 +82 3 7 20 0.65536000000000000000e5 +82 3 14 27 0.13107200000000000000e6 +82 3 16 29 -0.32768000000000000000e5 +82 3 17 30 -0.32768000000000000000e5 +82 4 1 5 -0.32768000000000000000e5 +82 4 1 13 0.16384000000000000000e5 +82 4 5 17 0.32768000000000000000e5 +82 4 7 19 -0.65536000000000000000e5 +82 4 11 11 0.32768000000000000000e5 +82 4 17 17 0.32768000000000000000e5 +83 1 14 21 -0.16384000000000000000e5 +83 1 19 34 -0.16384000000000000000e5 +83 1 20 35 -0.16384000000000000000e5 +83 1 21 44 0.16384000000000000000e5 +83 1 21 52 0.16384000000000000000e5 +83 2 15 25 -0.16384000000000000000e5 +83 3 14 15 0.16384000000000000000e5 +84 1 14 21 -0.32768000000000000000e5 +84 1 17 32 0.81920000000000000000e4 +84 1 18 33 0.81920000000000000000e4 +84 1 29 36 0.81920000000000000000e4 +84 1 35 46 0.16384000000000000000e5 +84 2 14 24 0.81920000000000000000e4 +84 3 12 25 0.81920000000000000000e4 +84 3 14 15 0.32768000000000000000e5 +84 3 15 24 -0.16384000000000000000e5 +85 1 4 19 -0.40960000000000000000e4 +85 1 13 44 0.40960000000000000000e4 +85 1 19 34 -0.32768000000000000000e5 +85 1 19 42 0.81920000000000000000e4 +85 1 19 50 0.81920000000000000000e4 +85 1 20 27 0.81920000000000000000e4 +85 1 20 51 0.81920000000000000000e4 +85 1 29 36 0.16384000000000000000e5 +85 2 15 29 0.81920000000000000000e4 +85 2 25 31 0.81920000000000000000e4 +85 3 8 13 0.40960000000000000000e4 +85 3 10 23 -0.40960000000000000000e4 +85 3 11 24 -0.40960000000000000000e4 +85 3 24 25 -0.81920000000000000000e4 +85 4 10 14 -0.40960000000000000000e4 +86 1 17 32 -0.16384000000000000000e5 +86 1 18 33 -0.16384000000000000000e5 +86 1 20 51 0.16384000000000000000e5 +86 2 14 24 -0.16384000000000000000e5 +86 3 12 25 -0.16384000000000000000e5 +87 1 17 32 -0.16384000000000000000e5 +87 1 19 42 0.16384000000000000000e5 +87 1 20 27 -0.16384000000000000000e5 +87 2 11 25 -0.16384000000000000000e5 +87 3 12 25 -0.16384000000000000000e5 +87 3 24 25 -0.16384000000000000000e5 +88 1 4 19 -0.16384000000000000000e5 +88 1 5 20 -0.81920000000000000000e4 +88 1 10 17 -0.16384000000000000000e5 +88 1 13 16 -0.16384000000000000000e5 +88 1 13 44 0.81920000000000000000e4 +88 1 19 50 0.16384000000000000000e5 +88 1 28 35 0.81920000000000000000e4 +88 2 8 14 -0.81920000000000000000e4 +88 2 11 13 -0.16384000000000000000e5 +88 3 2 15 -0.81920000000000000000e4 +88 3 10 15 0.32768000000000000000e5 +88 3 10 23 -0.81920000000000000000e4 +88 4 6 10 -0.81920000000000000000e4 +88 4 10 14 -0.81920000000000000000e4 +89 1 13 52 -0.16384000000000000000e5 +89 2 15 33 -0.16384000000000000000e5 +89 3 12 25 -0.32768000000000000000e5 +89 3 15 28 0.16384000000000000000e5 +89 3 24 25 -0.32768000000000000000e5 +90 1 14 45 0.16384000000000000000e5 +90 1 17 32 -0.32768000000000000000e5 +90 1 28 35 0.16384000000000000000e5 +90 3 15 28 -0.16384000000000000000e5 +91 1 13 44 0.16384000000000000000e5 +91 1 13 52 0.16384000000000000000e5 +91 1 20 27 -0.32768000000000000000e5 +92 1 4 19 -0.16384000000000000000e5 +92 1 16 31 -0.32768000000000000000e5 +92 1 20 27 0.32768000000000000000e5 +92 1 28 35 -0.16384000000000000000e5 +92 1 34 41 0.16384000000000000000e5 +92 2 10 24 -0.16384000000000000000e5 +92 3 8 13 0.16384000000000000000e5 +92 3 10 23 -0.16384000000000000000e5 +92 3 11 24 -0.16384000000000000000e5 +93 1 5 36 -0.32768000000000000000e5 +93 1 18 25 0.16384000000000000000e5 +93 1 18 49 0.16384000000000000000e5 +93 3 14 19 -0.16384000000000000000e5 +94 1 14 45 0.32768000000000000000e5 +94 1 18 49 -0.16384000000000000000e5 +94 1 28 35 -0.32768000000000000000e5 +94 2 24 30 -0.16384000000000000000e5 +94 3 11 24 -0.32768000000000000000e5 +94 3 14 27 0.16384000000000000000e5 +94 3 15 28 -0.32768000000000000000e5 +95 1 4 19 -0.32768000000000000000e5 +95 1 12 43 0.16384000000000000000e5 +95 1 17 48 0.16384000000000000000e5 +95 3 8 13 0.32768000000000000000e5 +96 1 4 19 0.32768000000000000000e5 +96 1 5 52 -0.81920000000000000000e4 +96 1 11 42 0.81920000000000000000e4 +96 1 12 43 0.16384000000000000000e5 +96 1 16 47 0.16384000000000000000e5 +96 1 20 27 -0.65536000000000000000e5 +96 1 28 35 0.32768000000000000000e5 +96 2 10 24 0.32768000000000000000e5 +96 2 12 26 -0.81920000000000000000e4 +96 2 20 34 0.81920000000000000000e4 +96 3 2 31 -0.81920000000000000000e4 +96 3 8 13 -0.32768000000000000000e5 +96 3 11 24 0.32768000000000000000e5 +96 3 13 26 0.16384000000000000000e5 +96 3 14 27 -0.16384000000000000000e5 +96 4 7 19 0.81920000000000000000e4 +96 4 8 20 0.81920000000000000000e4 +97 1 2 17 0.16384000000000000000e5 +97 1 16 31 -0.65536000000000000000e5 +97 1 16 47 0.16384000000000000000e5 +97 1 20 27 0.65536000000000000000e5 +97 1 28 35 -0.32768000000000000000e5 +97 2 7 13 0.32768000000000000000e5 +97 2 10 24 -0.32768000000000000000e5 +97 3 1 14 -0.16384000000000000000e5 +97 3 6 23 -0.16384000000000000000e5 +97 3 11 24 -0.32768000000000000000e5 +97 4 8 8 -0.65536000000000000000e5 +98 1 11 42 0.16384000000000000000e5 +98 1 18 25 -0.32768000000000000000e5 +98 1 33 40 0.16384000000000000000e5 +99 1 4 35 -0.32768000000000000000e5 +99 1 5 52 0.16384000000000000000e5 +99 1 10 41 -0.16384000000000000000e5 +99 1 11 42 -0.16384000000000000000e5 +99 1 17 48 0.32768000000000000000e5 +99 2 8 22 -0.16384000000000000000e5 +99 3 14 27 0.32768000000000000000e5 +99 4 4 16 0.16384000000000000000e5 +100 1 4 35 0.32768000000000000000e5 +100 1 10 41 0.16384000000000000000e5 +100 1 18 25 0.32768000000000000000e5 +100 1 28 35 -0.65536000000000000000e5 +100 1 28 43 0.16384000000000000000e5 +100 2 9 23 0.32768000000000000000e5 +100 3 11 24 -0.65536000000000000000e5 +101 1 3 34 -0.32768000000000000000e5 +101 1 5 52 -0.16384000000000000000e5 +101 1 11 42 0.16384000000000000000e5 +101 1 12 43 0.32768000000000000000e5 +101 1 28 43 -0.16384000000000000000e5 +101 2 12 26 -0.16384000000000000000e5 +101 3 14 27 -0.32768000000000000000e5 +101 4 7 19 0.16384000000000000000e5 +102 1 2 17 -0.32768000000000000000e5 +102 1 2 33 -0.16384000000000000000e5 +102 1 3 34 0.32768000000000000000e5 +102 1 10 41 -0.16384000000000000000e5 +102 1 11 42 0.16384000000000000000e5 +102 1 12 43 0.32768000000000000000e5 +102 1 17 48 -0.32768000000000000000e5 +102 2 7 21 -0.16384000000000000000e5 +102 2 8 22 0.16384000000000000000e5 +102 2 12 26 -0.16384000000000000000e5 +102 3 1 14 0.32768000000000000000e5 +102 3 2 31 -0.16384000000000000000e5 +102 3 7 20 -0.16384000000000000000e5 +102 3 8 21 -0.16384000000000000000e5 +102 3 14 27 -0.32768000000000000000e5 +102 4 4 16 -0.16384000000000000000e5 +103 1 2 17 0.32768000000000000000e5 +103 1 2 33 0.16384000000000000000e5 +103 1 3 34 -0.32768000000000000000e5 +103 1 5 52 0.16384000000000000000e5 +103 1 10 41 0.16384000000000000000e5 +103 1 11 42 -0.32768000000000000000e5 +103 1 12 27 -0.32768000000000000000e5 +103 1 12 43 -0.65536000000000000000e5 +103 1 16 47 0.32768000000000000000e5 +103 1 17 48 0.32768000000000000000e5 +103 1 28 43 0.16384000000000000000e5 +103 2 1 31 -0.16384000000000000000e5 +103 2 7 21 0.16384000000000000000e5 +103 2 8 22 -0.16384000000000000000e5 +103 2 10 32 -0.16384000000000000000e5 +103 2 12 26 0.32768000000000000000e5 +103 3 1 14 -0.32768000000000000000e5 +103 3 2 31 0.16384000000000000000e5 +103 3 6 23 -0.32768000000000000000e5 +103 3 7 20 0.16384000000000000000e5 +103 3 8 21 0.16384000000000000000e5 +103 3 14 27 0.65536000000000000000e5 +103 4 4 16 0.16384000000000000000e5 +103 4 7 19 -0.16384000000000000000e5 +104 1 1 48 -0.81920000000000000000e4 +104 1 2 49 -0.81920000000000000000e4 +104 1 3 50 -0.16384000000000000000e5 +104 1 5 52 0.32768000000000000000e5 +104 1 12 43 0.65536000000000000000e5 +104 1 17 48 -0.65536000000000000000e5 +104 1 23 38 -0.81920000000000000000e4 +104 1 26 29 0.16384000000000000000e5 +104 1 28 43 -0.32768000000000000000e5 +104 2 2 32 -0.81920000000000000000e4 +104 2 4 34 0.16384000000000000000e5 +104 2 8 22 0.32768000000000000000e5 +104 2 12 26 -0.32768000000000000000e5 +104 2 16 30 -0.16384000000000000000e5 +104 2 22 28 -0.16384000000000000000e5 +104 3 2 31 -0.32768000000000000000e5 +104 3 9 22 -0.32768000000000000000e5 +104 3 14 27 -0.65536000000000000000e5 +104 4 4 16 -0.32768000000000000000e5 +105 1 1 48 0.81920000000000000000e4 +105 1 2 49 0.81920000000000000000e4 +105 1 3 50 0.16384000000000000000e5 +105 1 4 35 -0.65536000000000000000e5 +105 1 9 40 0.16384000000000000000e5 +105 1 10 41 0.32768000000000000000e5 +105 1 12 43 -0.65536000000000000000e5 +105 1 17 48 0.65536000000000000000e5 +105 1 23 38 0.81920000000000000000e4 +105 1 26 41 -0.16384000000000000000e5 +105 1 28 43 0.32768000000000000000e5 +105 2 2 32 0.81920000000000000000e4 +105 2 4 34 -0.16384000000000000000e5 +105 2 12 26 0.32768000000000000000e5 +105 2 16 30 0.16384000000000000000e5 +105 3 2 31 0.32768000000000000000e5 +105 3 8 21 0.32768000000000000000e5 +105 3 9 22 0.32768000000000000000e5 +105 3 14 27 0.65536000000000000000e5 +105 4 4 16 0.32768000000000000000e5 +106 1 1 48 -0.81920000000000000000e4 +106 1 2 49 -0.81920000000000000000e4 +106 1 5 52 0.32768000000000000000e5 +106 1 8 39 -0.16384000000000000000e5 +106 1 9 40 -0.16384000000000000000e5 +106 1 11 42 0.32768000000000000000e5 +106 1 12 43 0.65536000000000000000e5 +106 1 17 48 -0.13107200000000000000e6 +106 1 23 38 -0.81920000000000000000e4 +106 1 26 41 0.32768000000000000000e5 +106 1 28 43 0.32768000000000000000e5 +106 2 2 32 -0.81920000000000000000e4 +106 2 8 22 0.65536000000000000000e5 +106 2 12 26 -0.32768000000000000000e5 +106 2 16 30 -0.16384000000000000000e5 +106 3 2 31 -0.32768000000000000000e5 +106 3 8 21 -0.32768000000000000000e5 +106 3 14 27 -0.65536000000000000000e5 +106 4 4 16 -0.65536000000000000000e5 +106 4 6 18 -0.16384000000000000000e5 +106 4 7 19 -0.32768000000000000000e5 +107 1 1 48 -0.81920000000000000000e4 +107 1 2 33 -0.32768000000000000000e5 +107 1 2 49 -0.81920000000000000000e4 +107 1 3 50 -0.16384000000000000000e5 +107 1 8 39 0.16384000000000000000e5 +107 1 11 42 0.32768000000000000000e5 +107 1 12 43 0.65536000000000000000e5 +107 1 17 48 -0.65536000000000000000e5 +107 1 23 38 -0.81920000000000000000e4 +107 2 2 32 -0.81920000000000000000e4 +107 2 8 22 0.32768000000000000000e5 +107 2 12 26 -0.32768000000000000000e5 +107 2 16 30 -0.16384000000000000000e5 +107 3 2 31 -0.32768000000000000000e5 +107 3 14 27 -0.65536000000000000000e5 +107 4 4 16 -0.32768000000000000000e5 +108 1 1 48 0.81920000000000000000e4 +108 1 2 33 0.32768000000000000000e5 +108 1 2 49 0.81920000000000000000e4 +108 1 3 34 -0.65536000000000000000e5 +108 1 3 50 0.16384000000000000000e5 +108 1 10 41 0.32768000000000000000e5 +108 1 23 38 0.81920000000000000000e4 +108 2 2 32 0.81920000000000000000e4 +108 2 7 21 0.32768000000000000000e5 +108 3 1 30 0.16384000000000000000e5 +108 3 8 21 0.32768000000000000000e5 +109 1 1 32 -0.32768000000000000000e5 +109 1 1 48 0.81920000000000000000e4 +109 1 2 49 0.81920000000000000000e4 +109 1 7 38 0.16384000000000000000e5 +109 1 23 38 0.81920000000000000000e4 +109 2 2 32 0.81920000000000000000e4 +110 1 1 24 -0.81920000000000000000e4 +110 1 1 40 -0.81920000000000000000e4 +110 1 2 49 -0.81920000000000000000e4 +110 1 6 37 -0.81920000000000000000e4 +110 1 7 22 -0.16384000000000000000e5 +110 1 7 38 0.16384000000000000000e5 +110 1 8 23 -0.16384000000000000000e5 +110 1 8 39 0.16384000000000000000e5 +110 1 22 37 0.81920000000000000000e4 +110 2 1 7 -0.16384000000000000000e5 +110 2 2 16 -0.81920000000000000000e4 +110 2 2 32 -0.81920000000000000000e4 +110 2 3 17 0.81920000000000000000e4 +110 2 4 26 -0.81920000000000000000e4 +110 2 16 16 0.16384000000000000000e5 +110 3 1 16 -0.81920000000000000000e4 +110 3 1 30 -0.16384000000000000000e5 +110 3 3 16 -0.81920000000000000000e4 +110 4 1 5 0.16384000000000000000e5 +110 4 1 13 -0.81920000000000000000e4 +110 4 11 11 -0.16384000000000000000e5 +111 1 1 40 -0.16384000000000000000e5 +111 1 1 48 0.16384000000000000000e5 +111 1 2 49 0.16384000000000000000e5 +111 1 3 26 0.16384000000000000000e5 +111 1 5 52 -0.65536000000000000000e5 +111 1 6 29 -0.32768000000000000000e5 +111 1 6 37 -0.32768000000000000000e5 +111 1 6 49 0.16384000000000000000e5 +111 1 8 39 0.65536000000000000000e5 +111 1 9 40 0.32768000000000000000e5 +111 1 10 25 0.32768000000000000000e5 +111 1 10 41 -0.65536000000000000000e5 +111 1 11 42 -0.65536000000000000000e5 +111 1 12 43 -0.13107200000000000000e6 +111 1 17 48 0.26214400000000000000e6 +111 1 23 38 0.16384000000000000000e5 +111 1 26 41 -0.32768000000000000000e5 +111 1 28 43 -0.65536000000000000000e5 +111 2 2 32 0.16384000000000000000e5 +111 2 4 18 0.16384000000000000000e5 +111 2 4 26 -0.16384000000000000000e5 +111 2 5 27 -0.16384000000000000000e5 +111 2 8 22 -0.13107200000000000000e6 +111 2 12 26 0.65536000000000000000e5 +111 2 16 30 0.32768000000000000000e5 +111 3 2 31 0.65536000000000000000e5 +111 3 4 17 0.16384000000000000000e5 +111 3 5 18 0.16384000000000000000e5 +111 3 6 19 0.32768000000000000000e5 +111 3 8 21 -0.65536000000000000000e5 +111 3 14 27 0.13107200000000000000e6 +111 4 3 15 0.32768000000000000000e5 +111 4 4 16 0.13107200000000000000e6 +111 4 6 18 0.32768000000000000000e5 +111 4 7 19 0.65536000000000000000e5 +112 1 1 40 0.16384000000000000000e5 +112 1 1 48 -0.16384000000000000000e5 +112 1 2 49 -0.16384000000000000000e5 +112 1 3 26 -0.16384000000000000000e5 +112 1 5 52 0.65536000000000000000e5 +112 1 6 37 0.16384000000000000000e5 +112 1 8 39 -0.65536000000000000000e5 +112 1 10 25 -0.65536000000000000000e5 +112 1 10 41 0.65536000000000000000e5 +112 1 11 42 0.65536000000000000000e5 +112 1 12 43 0.13107200000000000000e6 +112 1 17 48 -0.26214400000000000000e6 +112 1 23 38 -0.16384000000000000000e5 +112 1 25 40 0.16384000000000000000e5 +112 1 26 41 0.32768000000000000000e5 +112 1 28 43 0.65536000000000000000e5 +112 2 2 32 -0.16384000000000000000e5 +112 2 4 18 -0.16384000000000000000e5 +112 2 4 26 0.16384000000000000000e5 +112 2 8 22 0.13107200000000000000e6 +112 2 12 26 -0.65536000000000000000e5 +112 2 16 30 -0.32768000000000000000e5 +112 3 2 31 -0.65536000000000000000e5 +112 3 4 17 -0.16384000000000000000e5 +112 3 5 18 -0.16384000000000000000e5 +112 3 6 19 -0.32768000000000000000e5 +112 3 8 21 0.65536000000000000000e5 +112 3 14 27 -0.13107200000000000000e6 +112 4 3 15 -0.32768000000000000000e5 +112 4 4 16 -0.13107200000000000000e6 +112 4 6 18 -0.32768000000000000000e5 +112 4 7 19 -0.65536000000000000000e5 +113 1 2 49 -0.16384000000000000000e5 +113 1 3 50 -0.32768000000000000000e5 +113 1 5 52 -0.65536000000000000000e5 +113 1 6 37 0.16384000000000000000e5 +113 1 8 39 0.32768000000000000000e5 +113 1 10 25 0.32768000000000000000e5 +113 1 10 41 -0.65536000000000000000e5 +113 1 17 48 0.13107200000000000000e6 +113 1 24 39 -0.16384000000000000000e5 +113 1 26 41 -0.32768000000000000000e5 +113 1 28 43 -0.65536000000000000000e5 +113 2 3 33 -0.16384000000000000000e5 +113 2 8 22 -0.65536000000000000000e5 +113 3 6 19 0.32768000000000000000e5 +113 3 8 21 -0.65536000000000000000e5 +113 4 3 15 0.32768000000000000000e5 +113 4 4 16 0.65536000000000000000e5 +113 4 6 18 0.32768000000000000000e5 +113 4 7 19 0.65536000000000000000e5 +114 1 1 40 -0.16384000000000000000e5 +114 1 6 37 -0.16384000000000000000e5 +114 1 24 39 0.16384000000000000000e5 +114 2 4 26 -0.16384000000000000000e5 +114 3 6 19 -0.32768000000000000000e5 +115 1 1 40 0.16384000000000000000e5 +115 1 1 48 -0.16384000000000000000e5 +115 1 7 38 -0.32768000000000000000e5 +115 1 8 23 0.32768000000000000000e5 +115 1 23 38 -0.16384000000000000000e5 +115 2 2 32 -0.16384000000000000000e5 +115 3 1 30 -0.32768000000000000000e5 +115 3 6 19 0.32768000000000000000e5 +115 3 7 20 -0.65536000000000000000e5 +115 4 2 14 0.32768000000000000000e5 +116 1 1 48 0.16384000000000000000e5 +116 1 2 49 0.16384000000000000000e5 +116 1 6 37 0.16384000000000000000e5 +116 1 8 23 -0.32768000000000000000e5 +116 1 8 39 -0.32768000000000000000e5 +116 1 23 38 0.32768000000000000000e5 +116 2 2 32 0.16384000000000000000e5 +116 2 3 17 -0.16384000000000000000e5 +116 2 4 26 0.16384000000000000000e5 +116 3 1 30 0.32768000000000000000e5 +116 4 1 13 0.16384000000000000000e5 +117 1 1 32 0.65536000000000000000e5 +117 1 1 40 -0.16384000000000000000e5 +117 1 1 48 0.16384000000000000000e5 +117 1 2 33 -0.13107200000000000000e6 +117 1 2 49 -0.16384000000000000000e5 +117 1 3 34 0.26214400000000000000e6 +117 1 3 50 0.32768000000000000000e5 +117 1 5 52 -0.65536000000000000000e5 +117 1 6 37 -0.16384000000000000000e5 +117 1 7 22 0.32768000000000000000e5 +117 1 8 23 0.32768000000000000000e5 +117 1 10 41 -0.13107200000000000000e6 +117 1 11 42 0.65536000000000000000e5 +117 1 12 27 -0.13107200000000000000e6 +117 1 12 43 0.13107200000000000000e6 +117 1 16 47 -0.13107200000000000000e6 +117 1 22 37 0.16384000000000000000e5 +117 1 28 43 -0.65536000000000000000e5 +117 2 1 7 0.32768000000000000000e5 +117 2 2 32 -0.16384000000000000000e5 +117 2 3 17 0.16384000000000000000e5 +117 2 4 26 -0.16384000000000000000e5 +117 2 6 20 0.65536000000000000000e5 +117 2 7 21 -0.13107200000000000000e6 +117 2 10 32 0.65536000000000000000e5 +117 2 12 26 -0.65536000000000000000e5 +117 3 1 30 -0.65536000000000000000e5 +117 3 2 31 -0.65536000000000000000e5 +117 3 7 20 -0.65536000000000000000e5 +117 3 8 21 -0.13107200000000000000e6 +117 3 14 27 -0.13107200000000000000e6 +117 4 1 5 -0.32768000000000000000e5 +117 4 1 13 -0.16384000000000000000e5 +117 4 5 17 -0.32768000000000000000e5 +117 4 7 19 0.65536000000000000000e5 +117 4 11 11 -0.32768000000000000000e5 +118 1 1 24 -0.16384000000000000000e5 +118 1 1 32 -0.65536000000000000000e5 +118 1 1 48 -0.16384000000000000000e5 +118 1 2 33 0.65536000000000000000e5 +118 1 2 49 -0.16384000000000000000e5 +118 1 3 34 -0.13107200000000000000e6 +118 1 6 37 -0.16384000000000000000e5 +118 1 7 22 -0.65536000000000000000e5 +118 1 8 23 -0.32768000000000000000e5 +118 1 8 39 0.32768000000000000000e5 +118 1 10 41 0.65536000000000000000e5 +118 1 12 27 0.13107200000000000000e6 +118 1 22 37 0.16384000000000000000e5 +118 1 23 38 -0.16384000000000000000e5 +118 2 1 7 -0.32768000000000000000e5 +118 2 2 16 -0.16384000000000000000e5 +118 2 2 32 -0.16384000000000000000e5 +118 2 3 17 0.16384000000000000000e5 +118 2 4 26 -0.16384000000000000000e5 +118 2 6 20 -0.65536000000000000000e5 +118 2 7 21 0.65536000000000000000e5 +118 3 1 16 -0.16384000000000000000e5 +118 3 1 30 -0.32768000000000000000e5 +118 3 3 16 -0.16384000000000000000e5 +118 3 8 21 0.65536000000000000000e5 +118 4 1 5 0.32768000000000000000e5 +118 4 1 13 -0.16384000000000000000e5 +119 1 10 21 -0.40960000000000000000e4 +119 1 13 20 -0.40960000000000000000e4 +119 1 16 19 -0.81920000000000000000e4 +119 1 17 32 0.40960000000000000000e4 +119 1 18 21 -0.16384000000000000000e5 +119 1 18 33 0.20480000000000000000e4 +119 1 19 20 -0.16384000000000000000e5 +119 1 20 27 0.20480000000000000000e4 +119 1 20 35 0.81920000000000000000e4 +119 1 21 46 0.16384000000000000000e5 +119 1 29 36 0.40960000000000000000e4 +119 2 11 25 0.20480000000000000000e4 +119 2 13 15 -0.81920000000000000000e4 +119 2 14 24 0.20480000000000000000e4 +119 2 15 15 -0.32768000000000000000e5 +119 2 15 25 0.81920000000000000000e4 +119 3 10 15 -0.40960000000000000000e4 +119 3 12 25 0.40960000000000000000e4 +119 3 14 15 -0.81920000000000000000e4 +119 4 10 10 -0.81920000000000000000e4 +120 1 14 21 0.16384000000000000000e5 +120 1 19 20 -0.32768000000000000000e5 +120 1 35 36 0.16384000000000000000e5 +120 3 14 15 -0.16384000000000000000e5 +121 1 10 21 -0.81920000000000000000e4 +121 1 13 20 -0.81920000000000000000e4 +121 1 14 21 -0.16384000000000000000e5 +121 1 16 19 -0.16384000000000000000e5 +121 1 17 32 0.81920000000000000000e4 +121 1 18 33 0.40960000000000000000e4 +121 1 20 27 0.40960000000000000000e4 +121 1 21 44 0.16384000000000000000e5 +121 1 29 36 0.81920000000000000000e4 +121 2 11 25 0.40960000000000000000e4 +121 2 13 15 -0.16384000000000000000e5 +121 2 14 24 0.40960000000000000000e4 +121 3 10 15 -0.81920000000000000000e4 +121 3 12 25 0.81920000000000000000e4 +121 4 10 10 -0.16384000000000000000e5 +122 1 14 21 -0.32768000000000000000e5 +122 1 17 32 0.81920000000000000000e4 +122 1 18 33 0.81920000000000000000e4 +122 1 29 36 0.81920000000000000000e4 +122 1 33 36 0.16384000000000000000e5 +122 2 14 24 0.81920000000000000000e4 +122 3 12 25 0.81920000000000000000e4 +123 1 10 21 -0.16384000000000000000e5 +123 1 13 20 -0.16384000000000000000e5 +123 1 17 32 0.32768000000000000000e5 +123 1 18 33 0.16384000000000000000e5 +123 1 19 34 -0.32768000000000000000e5 +123 1 20 27 0.16384000000000000000e5 +123 1 29 36 0.32768000000000000000e5 +123 2 11 25 0.16384000000000000000e5 +123 2 14 24 0.16384000000000000000e5 +123 3 10 15 -0.16384000000000000000e5 +123 3 12 25 0.32768000000000000000e5 +123 3 15 24 -0.16384000000000000000e5 +123 4 10 10 -0.32768000000000000000e5 +124 1 5 20 0.40960000000000000000e4 +124 1 10 17 0.81920000000000000000e4 +124 1 13 16 0.81920000000000000000e4 +124 1 13 44 0.40960000000000000000e4 +124 1 16 19 -0.32768000000000000000e5 +124 1 19 42 0.81920000000000000000e4 +124 1 20 27 0.16384000000000000000e5 +124 1 28 35 -0.40960000000000000000e4 +124 1 29 36 0.81920000000000000000e4 +124 2 8 14 0.40960000000000000000e4 +124 2 11 13 0.81920000000000000000e4 +124 2 15 29 0.81920000000000000000e4 +124 3 2 15 0.40960000000000000000e4 +124 3 8 13 0.81920000000000000000e4 +124 3 10 15 -0.16384000000000000000e5 +124 3 10 23 -0.40960000000000000000e4 +124 3 11 24 -0.81920000000000000000e4 +124 4 6 10 0.40960000000000000000e4 +124 4 10 14 -0.40960000000000000000e4 +125 1 10 21 -0.32768000000000000000e5 +125 1 15 46 0.16384000000000000000e5 +125 1 29 36 0.16384000000000000000e5 +125 3 12 25 0.16384000000000000000e5 +126 1 13 20 -0.32768000000000000000e5 +126 1 17 32 0.16384000000000000000e5 +126 1 29 36 0.16384000000000000000e5 +127 1 4 19 -0.81920000000000000000e4 +127 1 5 20 -0.81920000000000000000e4 +127 1 10 17 -0.16384000000000000000e5 +127 1 13 16 -0.16384000000000000000e5 +127 1 19 42 0.16384000000000000000e5 +127 1 28 35 0.81920000000000000000e4 +127 2 8 14 -0.81920000000000000000e4 +127 2 11 13 -0.16384000000000000000e5 +127 3 2 15 -0.81920000000000000000e4 +127 3 8 13 -0.81920000000000000000e4 +127 3 11 24 0.81920000000000000000e4 +127 4 6 10 -0.81920000000000000000e4 +128 1 4 19 -0.81920000000000000000e4 +128 1 12 19 -0.32768000000000000000e5 +128 1 13 44 0.81920000000000000000e4 +128 1 16 31 0.16384000000000000000e5 +128 1 20 27 0.16384000000000000000e5 +128 3 8 13 0.81920000000000000000e4 +128 3 10 23 -0.81920000000000000000e4 +128 3 11 24 -0.81920000000000000000e4 +128 4 10 14 -0.81920000000000000000e4 +129 1 4 19 0.16384000000000000000e5 +129 1 5 20 0.16384000000000000000e5 +129 1 5 36 0.16384000000000000000e5 +129 1 6 21 0.32768000000000000000e5 +129 1 10 17 0.16384000000000000000e5 +129 1 10 21 -0.65536000000000000000e5 +129 1 11 46 0.16384000000000000000e5 +129 2 8 14 0.16384000000000000000e5 +129 2 9 15 0.32768000000000000000e5 +130 1 4 19 -0.16384000000000000000e5 +130 1 5 20 -0.16384000000000000000e5 +130 1 10 17 -0.16384000000000000000e5 +130 1 14 45 0.16384000000000000000e5 +130 1 28 35 0.16384000000000000000e5 +130 2 8 14 -0.16384000000000000000e5 +130 3 11 24 0.16384000000000000000e5 +131 1 4 19 0.16384000000000000000e5 +131 1 10 17 -0.16384000000000000000e5 +131 1 20 27 -0.32768000000000000000e5 +131 1 28 35 0.32768000000000000000e5 +131 3 2 15 -0.16384000000000000000e5 +131 3 8 13 -0.32768000000000000000e5 +131 3 11 24 0.16384000000000000000e5 +131 4 6 10 -0.16384000000000000000e5 +132 1 4 19 -0.16384000000000000000e5 +132 1 13 16 -0.32768000000000000000e5 +132 1 13 44 0.16384000000000000000e5 +132 1 20 27 0.32768000000000000000e5 +132 1 28 35 -0.16384000000000000000e5 +132 2 10 24 -0.16384000000000000000e5 +132 3 8 13 0.16384000000000000000e5 +132 3 11 24 -0.16384000000000000000e5 +133 1 7 16 -0.16384000000000000000e5 +133 1 13 16 -0.32768000000000000000e5 +133 1 16 31 0.32768000000000000000e5 +133 2 1 15 -0.16384000000000000000e5 +133 3 8 13 0.16384000000000000000e5 +133 3 10 23 -0.16384000000000000000e5 +133 4 8 8 0.32768000000000000000e5 +134 1 5 20 -0.32768000000000000000e5 +134 1 14 45 0.32768000000000000000e5 +134 1 17 48 -0.16384000000000000000e5 +134 2 14 28 -0.16384000000000000000e5 +134 3 14 19 0.16384000000000000000e5 +134 3 14 27 -0.16384000000000000000e5 +135 1 4 35 0.16384000000000000000e5 +135 1 10 17 -0.32768000000000000000e5 +135 1 18 25 0.16384000000000000000e5 +135 3 14 19 -0.16384000000000000000e5 +136 1 4 19 -0.32768000000000000000e5 +136 1 4 35 -0.16384000000000000000e5 +136 1 17 48 0.16384000000000000000e5 +136 1 18 25 -0.16384000000000000000e5 +136 1 28 35 0.32768000000000000000e5 +136 2 9 23 -0.16384000000000000000e5 +136 3 11 24 0.32768000000000000000e5 +136 3 14 27 0.16384000000000000000e5 +137 1 3 34 0.16384000000000000000e5 +137 1 4 19 0.32768000000000000000e5 +137 1 12 43 0.16384000000000000000e5 +137 1 20 27 -0.65536000000000000000e5 +137 1 28 35 0.32768000000000000000e5 +137 2 10 24 0.32768000000000000000e5 +137 3 2 15 -0.32768000000000000000e5 +137 3 8 13 -0.32768000000000000000e5 +137 3 11 24 0.32768000000000000000e5 +138 1 2 17 0.16384000000000000000e5 +138 1 13 16 -0.65536000000000000000e5 +138 1 16 47 0.16384000000000000000e5 +138 1 20 27 0.65536000000000000000e5 +138 1 28 35 -0.32768000000000000000e5 +138 2 7 13 0.32768000000000000000e5 +138 2 10 24 -0.32768000000000000000e5 +138 3 1 14 -0.16384000000000000000e5 +138 3 2 15 0.32768000000000000000e5 +138 3 8 13 0.32768000000000000000e5 +138 3 11 24 -0.32768000000000000000e5 +138 3 13 26 0.16384000000000000000e5 +139 1 2 17 0.16384000000000000000e5 +139 1 7 16 -0.32768000000000000000e5 +139 1 12 27 0.16384000000000000000e5 +139 3 1 14 -0.16384000000000000000e5 +139 3 6 23 -0.16384000000000000000e5 +140 1 11 14 -0.32768000000000000000e5 +140 1 11 42 0.16384000000000000000e5 +140 1 26 33 0.16384000000000000000e5 +140 3 9 22 0.16384000000000000000e5 +141 1 3 18 0.32768000000000000000e5 +141 1 4 35 0.32768000000000000000e5 +141 1 10 17 -0.65536000000000000000e5 +141 1 10 41 -0.16384000000000000000e5 +141 1 11 14 0.32768000000000000000e5 +141 2 8 22 -0.16384000000000000000e5 +141 2 9 11 0.32768000000000000000e5 +141 3 8 21 -0.16384000000000000000e5 +141 3 9 22 -0.16384000000000000000e5 +142 1 3 18 -0.32768000000000000000e5 +142 1 11 42 -0.16384000000000000000e5 +142 1 17 48 0.32768000000000000000e5 +142 2 8 22 -0.16384000000000000000e5 +142 3 8 21 0.16384000000000000000e5 +142 3 14 27 0.32768000000000000000e5 +142 4 4 16 0.16384000000000000000e5 +143 1 2 17 0.32768000000000000000e5 +143 1 2 33 0.16384000000000000000e5 +143 1 3 18 0.32768000000000000000e5 +143 1 4 19 0.65536000000000000000e5 +143 1 10 41 0.16384000000000000000e5 +143 1 20 27 -0.13107200000000000000e6 +143 1 28 35 0.65536000000000000000e5 +143 2 6 12 0.32768000000000000000e5 +143 2 10 24 0.65536000000000000000e5 +143 3 2 15 -0.65536000000000000000e5 +143 3 8 13 -0.65536000000000000000e5 +143 3 11 24 0.65536000000000000000e5 +144 1 2 17 -0.32768000000000000000e5 +144 1 2 33 -0.16384000000000000000e5 +144 1 3 34 0.32768000000000000000e5 +144 1 10 41 -0.16384000000000000000e5 +144 1 11 42 0.16384000000000000000e5 +144 1 12 43 0.32768000000000000000e5 +144 1 17 48 -0.32768000000000000000e5 +144 2 7 21 -0.16384000000000000000e5 +144 2 8 22 0.16384000000000000000e5 +144 2 12 26 -0.16384000000000000000e5 +144 3 8 21 -0.16384000000000000000e5 +144 3 14 27 -0.32768000000000000000e5 +144 4 4 16 -0.16384000000000000000e5 +145 1 1 8 -0.81920000000000000000e4 +145 1 1 32 0.16384000000000000000e5 +145 1 1 40 -0.40960000000000000000e4 +145 1 2 5 0.40960000000000000000e4 +145 1 2 9 -0.16384000000000000000e5 +145 1 2 17 0.32768000000000000000e5 +145 1 2 33 -0.16384000000000000000e5 +145 1 3 18 0.65536000000000000000e5 +145 1 3 34 0.65536000000000000000e5 +145 1 4 19 0.65536000000000000000e5 +145 1 4 35 0.65536000000000000000e5 +145 1 6 13 -0.16384000000000000000e5 +145 1 7 22 0.81920000000000000000e4 +145 1 7 38 -0.81920000000000000000e4 +145 1 8 23 0.24576000000000000000e5 +145 1 10 41 -0.32768000000000000000e5 +145 1 11 42 -0.16384000000000000000e5 +145 1 12 27 -0.32768000000000000000e5 +145 1 18 25 0.32768000000000000000e5 +145 1 20 27 -0.13107200000000000000e6 +145 2 1 3 -0.40960000000000000000e4 +145 2 2 16 0.40960000000000000000e4 +145 2 4 10 0.16384000000000000000e5 +145 2 6 12 0.32768000000000000000e5 +145 2 7 21 -0.32768000000000000000e5 +145 2 8 22 -0.16384000000000000000e5 +145 2 9 23 0.32768000000000000000e5 +145 2 10 24 0.65536000000000000000e5 +145 3 1 2 -0.40960000000000000000e4 +145 3 2 15 -0.65536000000000000000e5 +145 3 3 16 0.40960000000000000000e4 +145 3 4 17 0.40960000000000000000e4 +145 3 6 7 -0.16384000000000000000e5 +145 3 6 19 0.81920000000000000000e4 +145 3 7 20 -0.32768000000000000000e5 +145 3 8 13 -0.65536000000000000000e5 +145 3 8 21 -0.32768000000000000000e5 +145 3 9 22 -0.16384000000000000000e5 +145 4 1 5 -0.81920000000000000000e4 +145 4 1 13 0.40960000000000000000e4 +145 4 2 2 0.81920000000000000000e4 +145 4 2 14 0.81920000000000000000e4 +145 4 4 8 -0.16384000000000000000e5 +145 4 5 5 -0.32768000000000000000e5 +146 1 1 16 -0.32768000000000000000e5 +146 1 1 32 -0.16384000000000000000e5 +146 1 2 17 0.32768000000000000000e5 +146 1 2 33 0.32768000000000000000e5 +146 1 3 34 -0.65536000000000000000e5 +146 1 10 41 0.32768000000000000000e5 +146 1 11 42 -0.16384000000000000000e5 +146 1 12 27 0.32768000000000000000e5 +146 1 12 43 -0.32768000000000000000e5 +146 1 17 48 0.32768000000000000000e5 +146 2 1 31 -0.16384000000000000000e5 +146 2 6 20 -0.16384000000000000000e5 +146 2 7 21 0.32768000000000000000e5 +146 2 8 22 -0.16384000000000000000e5 +146 2 12 26 0.16384000000000000000e5 +146 3 1 14 -0.32768000000000000000e5 +146 3 6 23 -0.32768000000000000000e5 +146 3 7 20 0.16384000000000000000e5 +146 3 8 21 0.32768000000000000000e5 +146 3 14 27 0.32768000000000000000e5 +146 4 4 16 0.16384000000000000000e5 +147 1 3 18 0.65536000000000000000e5 +147 1 6 13 0.32768000000000000000e5 +147 1 6 29 0.16384000000000000000e5 +147 1 6 43 0.16384000000000000000e5 +147 1 10 17 -0.13107200000000000000e6 +147 1 10 41 0.32768000000000000000e5 +147 1 11 14 0.65536000000000000000e5 +147 2 5 11 0.32768000000000000000e5 +147 2 9 11 0.65536000000000000000e5 +147 3 5 10 0.32768000000000000000e5 +147 3 8 21 0.32768000000000000000e5 +148 1 6 13 -0.32768000000000000000e5 +148 1 10 25 0.16384000000000000000e5 +148 1 26 29 0.16384000000000000000e5 +149 1 1 48 -0.81920000000000000000e4 +149 1 2 49 -0.81920000000000000000e4 +149 1 5 52 0.32768000000000000000e5 +149 1 8 39 -0.16384000000000000000e5 +149 1 9 40 0.16384000000000000000e5 +149 1 10 25 -0.16384000000000000000e5 +149 1 11 42 0.32768000000000000000e5 +149 1 12 43 0.65536000000000000000e5 +149 1 17 48 -0.13107200000000000000e6 +149 1 23 38 -0.81920000000000000000e4 +149 1 26 41 0.16384000000000000000e5 +149 1 28 43 0.32768000000000000000e5 +149 2 2 32 -0.81920000000000000000e4 +149 2 8 22 0.65536000000000000000e5 +149 2 12 26 -0.32768000000000000000e5 +149 2 16 30 -0.16384000000000000000e5 +149 3 2 31 -0.32768000000000000000e5 +149 3 5 10 -0.32768000000000000000e5 +149 3 6 19 -0.16384000000000000000e5 +149 3 14 27 -0.65536000000000000000e5 +149 4 3 15 -0.16384000000000000000e5 +149 4 4 16 -0.65536000000000000000e5 +149 4 6 18 -0.16384000000000000000e5 +149 4 7 19 -0.32768000000000000000e5 +150 1 1 48 -0.81920000000000000000e4 +150 1 2 33 -0.32768000000000000000e5 +150 1 2 49 -0.81920000000000000000e4 +150 1 3 18 -0.65536000000000000000e5 +150 1 4 35 -0.13107200000000000000e6 +150 1 5 52 0.32768000000000000000e5 +150 1 6 13 0.32768000000000000000e5 +150 1 9 40 -0.16384000000000000000e5 +150 1 10 41 0.65536000000000000000e5 +150 1 11 42 0.65536000000000000000e5 +150 1 12 43 0.65536000000000000000e5 +150 1 17 48 -0.13107200000000000000e6 +150 1 18 25 -0.65536000000000000000e5 +150 1 23 38 -0.81920000000000000000e4 +150 1 26 41 0.16384000000000000000e5 +150 1 28 35 0.13107200000000000000e6 +150 1 28 43 0.32768000000000000000e5 +150 2 2 32 -0.81920000000000000000e4 +150 2 8 22 0.98304000000000000000e5 +150 2 9 23 -0.65536000000000000000e5 +150 2 12 26 -0.32768000000000000000e5 +150 2 16 30 -0.16384000000000000000e5 +150 3 2 31 -0.32768000000000000000e5 +150 3 5 10 0.32768000000000000000e5 +150 3 6 19 0.16384000000000000000e5 +150 3 8 21 0.32768000000000000000e5 +150 3 9 22 0.32768000000000000000e5 +150 3 11 24 0.13107200000000000000e6 +150 3 14 27 -0.65536000000000000000e5 +150 4 4 8 0.32768000000000000000e5 +150 4 4 16 -0.65536000000000000000e5 +150 4 6 18 -0.16384000000000000000e5 +150 4 7 19 -0.32768000000000000000e5 +151 1 1 48 0.81920000000000000000e4 +151 1 2 17 0.65536000000000000000e5 +151 1 2 33 0.32768000000000000000e5 +151 1 2 49 0.81920000000000000000e4 +151 1 3 18 0.13107200000000000000e6 +151 1 4 19 0.13107200000000000000e6 +151 1 4 35 0.13107200000000000000e6 +151 1 6 13 -0.32768000000000000000e5 +151 1 7 38 0.16384000000000000000e5 +151 1 8 23 -0.16384000000000000000e5 +151 1 8 39 0.16384000000000000000e5 +151 1 11 42 -0.32768000000000000000e5 +151 1 18 25 0.65536000000000000000e5 +151 1 20 27 -0.26214400000000000000e6 +151 1 23 38 0.81920000000000000000e4 +151 2 2 32 0.81920000000000000000e4 +151 2 4 10 0.32768000000000000000e5 +151 2 6 12 0.65536000000000000000e5 +151 2 8 22 -0.32768000000000000000e5 +151 2 9 23 0.65536000000000000000e5 +151 2 10 24 0.13107200000000000000e6 +151 3 1 30 0.16384000000000000000e5 +151 3 2 15 -0.13107200000000000000e6 +151 3 6 19 -0.16384000000000000000e5 +151 3 7 20 0.32768000000000000000e5 +151 3 8 13 -0.13107200000000000000e6 +151 3 9 22 -0.32768000000000000000e5 +151 4 2 14 -0.16384000000000000000e5 +151 4 4 8 -0.32768000000000000000e5 +152 1 1 32 -0.32768000000000000000e5 +152 1 1 48 0.81920000000000000000e4 +152 1 2 49 0.81920000000000000000e4 +152 1 8 23 0.16384000000000000000e5 +152 1 23 38 0.81920000000000000000e4 +152 2 2 32 0.81920000000000000000e4 +152 3 1 30 0.16384000000000000000e5 +152 3 6 7 -0.32768000000000000000e5 +153 1 1 8 -0.16384000000000000000e5 +153 1 1 40 -0.81920000000000000000e4 +153 1 2 5 0.81920000000000000000e4 +153 1 2 9 -0.32768000000000000000e5 +153 1 8 23 0.32768000000000000000e5 +153 2 1 3 -0.81920000000000000000e4 +153 2 1 7 -0.16384000000000000000e5 +153 2 2 16 0.81920000000000000000e4 +153 3 1 2 -0.81920000000000000000e4 +153 3 3 16 0.81920000000000000000e4 +153 3 4 17 0.81920000000000000000e4 +153 3 6 19 0.16384000000000000000e5 +153 3 7 20 -0.32768000000000000000e5 +153 4 1 13 0.81920000000000000000e4 +153 4 2 2 0.16384000000000000000e5 +153 4 2 14 0.16384000000000000000e5 +154 1 1 12 -0.32768000000000000000e5 +154 1 1 24 -0.81920000000000000000e4 +154 1 1 32 -0.32768000000000000000e5 +154 1 1 40 -0.81920000000000000000e4 +154 1 2 49 -0.81920000000000000000e4 +154 1 3 50 0.16384000000000000000e5 +154 1 5 52 -0.32768000000000000000e5 +154 1 6 37 -0.81920000000000000000e4 +154 1 8 23 -0.16384000000000000000e5 +154 1 11 42 0.32768000000000000000e5 +154 1 12 27 0.65536000000000000000e5 +154 1 12 43 0.65536000000000000000e5 +154 1 16 47 -0.65536000000000000000e5 +154 1 22 37 0.81920000000000000000e4 +154 1 28 43 -0.32768000000000000000e5 +154 2 1 7 -0.16384000000000000000e5 +154 2 2 16 -0.81920000000000000000e4 +154 2 2 32 -0.81920000000000000000e4 +154 2 3 17 0.81920000000000000000e4 +154 2 4 26 -0.81920000000000000000e4 +154 2 6 20 -0.32768000000000000000e5 +154 2 10 32 0.32768000000000000000e5 +154 2 12 26 -0.32768000000000000000e5 +154 2 16 16 0.16384000000000000000e5 +154 3 1 16 -0.81920000000000000000e4 +154 3 1 30 -0.32768000000000000000e5 +154 3 2 31 -0.32768000000000000000e5 +154 3 3 16 -0.81920000000000000000e4 +154 3 7 20 -0.32768000000000000000e5 +154 3 14 27 -0.65536000000000000000e5 +154 4 1 5 0.16384000000000000000e5 +154 4 1 13 -0.81920000000000000000e4 +154 4 5 17 -0.16384000000000000000e5 +154 4 7 19 0.32768000000000000000e5 +154 4 11 11 -0.16384000000000000000e5 +155 1 3 18 0.13107200000000000000e6 +155 1 6 11 0.32768000000000000000e5 +155 1 6 13 0.65536000000000000000e5 +155 1 6 25 0.16384000000000000000e5 +155 1 6 37 0.16384000000000000000e5 +155 1 9 40 -0.32768000000000000000e5 +155 1 10 17 -0.26214400000000000000e6 +155 1 10 25 0.32768000000000000000e5 +155 1 10 41 0.65536000000000000000e5 +155 1 11 14 0.13107200000000000000e6 +155 1 26 29 0.32768000000000000000e5 +155 2 5 9 0.32768000000000000000e5 +155 2 5 11 0.65536000000000000000e5 +155 2 5 27 0.16384000000000000000e5 +155 2 9 11 0.13107200000000000000e6 +155 2 19 19 -0.32768000000000000000e5 +155 3 4 9 0.32768000000000000000e5 +155 3 5 10 0.65536000000000000000e5 +155 3 8 21 0.65536000000000000000e5 +156 1 6 37 -0.16384000000000000000e5 +156 1 9 40 0.32768000000000000000e5 +156 1 10 25 -0.32768000000000000000e5 +156 2 5 27 -0.16384000000000000000e5 +156 3 4 9 -0.32768000000000000000e5 +156 3 5 18 0.16384000000000000000e5 +157 1 1 40 0.16384000000000000000e5 +157 1 1 48 -0.16384000000000000000e5 +157 1 2 49 -0.16384000000000000000e5 +157 1 5 52 0.65536000000000000000e5 +157 1 6 37 0.16384000000000000000e5 +157 1 8 39 -0.32768000000000000000e5 +157 1 11 42 0.65536000000000000000e5 +157 1 12 43 0.13107200000000000000e6 +157 1 17 48 -0.26214400000000000000e6 +157 1 23 38 -0.16384000000000000000e5 +157 1 26 41 0.32768000000000000000e5 +157 1 28 43 0.65536000000000000000e5 +157 2 2 32 -0.16384000000000000000e5 +157 2 3 9 0.32768000000000000000e5 +157 2 4 18 -0.16384000000000000000e5 +157 2 4 26 0.16384000000000000000e5 +157 2 8 22 0.13107200000000000000e6 +157 2 12 26 -0.65536000000000000000e5 +157 2 16 30 -0.32768000000000000000e5 +157 3 2 31 -0.65536000000000000000e5 +157 3 3 8 0.32768000000000000000e5 +157 3 4 9 0.32768000000000000000e5 +157 3 4 17 -0.16384000000000000000e5 +157 3 5 10 -0.65536000000000000000e5 +157 3 5 18 -0.16384000000000000000e5 +157 3 14 27 -0.13107200000000000000e6 +157 4 3 15 -0.32768000000000000000e5 +157 4 4 16 -0.13107200000000000000e6 +157 4 6 18 -0.32768000000000000000e5 +157 4 7 19 -0.65536000000000000000e5 +158 1 1 40 -0.16384000000000000000e5 +158 2 4 26 -0.16384000000000000000e5 +158 3 3 8 -0.32768000000000000000e5 +158 3 4 17 0.16384000000000000000e5 +158 3 6 19 -0.32768000000000000000e5 +159 1 2 9 0.32768000000000000000e5 +159 1 2 17 0.13107200000000000000e6 +159 1 2 33 0.65536000000000000000e5 +159 1 3 18 0.26214400000000000000e6 +159 1 4 19 0.26214400000000000000e6 +159 1 4 35 0.26214400000000000000e6 +159 1 6 13 -0.65536000000000000000e5 +159 1 6 37 -0.16384000000000000000e5 +159 1 7 38 0.32768000000000000000e5 +159 1 8 23 -0.32768000000000000000e5 +159 1 8 39 0.65536000000000000000e5 +159 1 11 42 -0.65536000000000000000e5 +159 1 18 25 0.13107200000000000000e6 +159 1 20 27 -0.52428800000000000000e6 +159 2 2 8 0.32768000000000000000e5 +159 2 4 10 0.65536000000000000000e5 +159 2 4 26 -0.16384000000000000000e5 +159 2 6 12 0.13107200000000000000e6 +159 2 8 22 -0.65536000000000000000e5 +159 2 9 23 0.13107200000000000000e6 +159 2 10 24 0.26214400000000000000e6 +159 3 2 15 -0.26214400000000000000e6 +159 3 3 8 0.32768000000000000000e5 +159 3 3 16 -0.16384000000000000000e5 +159 3 4 17 -0.16384000000000000000e5 +159 3 7 20 0.65536000000000000000e5 +159 3 8 13 -0.26214400000000000000e6 +159 3 9 22 -0.65536000000000000000e5 +159 4 1 13 -0.16384000000000000000e5 +159 4 2 14 -0.32768000000000000000e5 +159 4 4 8 -0.65536000000000000000e5 +160 1 1 40 0.16384000000000000000e5 +160 1 1 48 0.16384000000000000000e5 +160 1 2 9 -0.32768000000000000000e5 +160 1 2 49 0.16384000000000000000e5 +160 1 6 37 0.16384000000000000000e5 +160 1 8 39 -0.32768000000000000000e5 +160 1 23 38 0.16384000000000000000e5 +160 2 2 32 0.16384000000000000000e5 +160 2 3 17 -0.16384000000000000000e5 +160 2 4 26 0.16384000000000000000e5 +160 3 1 30 0.32768000000000000000e5 +160 3 3 16 0.16384000000000000000e5 +160 4 1 13 0.16384000000000000000e5 +161 1 1 24 0.16384000000000000000e5 +161 1 1 32 0.65536000000000000000e5 +161 1 1 40 -0.16384000000000000000e5 +161 1 1 48 0.16384000000000000000e5 +161 1 2 5 0.16384000000000000000e5 +161 1 2 9 -0.32768000000000000000e5 +161 1 2 33 -0.65536000000000000000e5 +161 1 2 49 0.16384000000000000000e5 +161 1 3 34 0.13107200000000000000e6 +161 1 6 37 0.16384000000000000000e5 +161 1 7 22 0.32768000000000000000e5 +161 1 7 38 -0.32768000000000000000e5 +161 1 8 23 0.98304000000000000000e5 +161 1 8 39 -0.32768000000000000000e5 +161 1 10 41 -0.65536000000000000000e5 +161 1 12 27 -0.13107200000000000000e6 +161 1 23 38 0.16384000000000000000e5 +161 2 1 3 -0.16384000000000000000e5 +161 2 1 7 0.32768000000000000000e5 +161 2 2 16 0.16384000000000000000e5 +161 2 2 32 0.16384000000000000000e5 +161 2 3 17 -0.16384000000000000000e5 +161 2 4 26 0.16384000000000000000e5 +161 2 6 20 0.65536000000000000000e5 +161 2 7 21 -0.65536000000000000000e5 +161 3 1 2 -0.16384000000000000000e5 +161 3 1 30 0.32768000000000000000e5 +161 3 3 16 0.16384000000000000000e5 +161 3 4 17 0.16384000000000000000e5 +161 3 6 19 0.32768000000000000000e5 +161 3 7 20 -0.65536000000000000000e5 +161 3 8 21 -0.65536000000000000000e5 +161 4 1 5 -0.32768000000000000000e5 +161 4 1 13 0.32768000000000000000e5 +161 4 2 2 0.32768000000000000000e5 +161 4 2 14 0.32768000000000000000e5 +162 1 1 8 -0.32768000000000000000e5 +162 1 1 24 -0.16384000000000000000e5 +162 1 1 32 -0.65536000000000000000e5 +162 1 1 40 -0.16384000000000000000e5 +162 1 1 48 -0.16384000000000000000e5 +162 1 2 49 -0.32768000000000000000e5 +162 1 3 50 0.32768000000000000000e5 +162 1 5 52 -0.65536000000000000000e5 +162 1 6 37 -0.32768000000000000000e5 +162 1 7 22 -0.32768000000000000000e5 +162 1 8 23 -0.32768000000000000000e5 +162 1 8 39 0.32768000000000000000e5 +162 1 11 42 0.65536000000000000000e5 +162 1 12 27 0.13107200000000000000e6 +162 1 12 43 0.13107200000000000000e6 +162 1 16 47 -0.13107200000000000000e6 +162 1 22 37 0.16384000000000000000e5 +162 1 23 38 -0.16384000000000000000e5 +162 1 28 43 -0.65536000000000000000e5 +162 2 1 7 -0.32768000000000000000e5 +162 2 2 16 -0.16384000000000000000e5 +162 2 2 32 -0.32768000000000000000e5 +162 2 3 17 0.32768000000000000000e5 +162 2 4 26 -0.32768000000000000000e5 +162 2 6 20 -0.65536000000000000000e5 +162 2 10 32 0.65536000000000000000e5 +162 2 12 26 -0.65536000000000000000e5 +162 3 1 30 -0.98304000000000000000e5 +162 3 2 31 -0.65536000000000000000e5 +162 3 3 16 -0.16384000000000000000e5 +162 3 7 20 -0.65536000000000000000e5 +162 3 14 27 -0.13107200000000000000e6 +162 4 1 5 0.32768000000000000000e5 +162 4 1 13 -0.32768000000000000000e5 +162 4 5 17 -0.32768000000000000000e5 +162 4 7 19 0.65536000000000000000e5 +162 4 11 11 -0.32768000000000000000e5 +163 1 1 1 0.32768000000000000000e5 +163 1 1 8 0.32768000000000000000e5 +163 1 1 40 -0.16384000000000000000e5 +163 1 2 5 0.16384000000000000000e5 +163 1 2 9 -0.32768000000000000000e5 +163 1 7 22 -0.32768000000000000000e5 +163 1 7 38 -0.32768000000000000000e5 +163 1 8 23 0.65536000000000000000e5 +163 2 1 1 0.32768000000000000000e5 +163 3 1 16 0.16384000000000000000e5 +163 3 2 3 0.16384000000000000000e5 +163 3 3 16 0.16384000000000000000e5 +163 3 4 17 0.16384000000000000000e5 +163 3 6 19 0.32768000000000000000e5 +163 3 7 20 -0.65536000000000000000e5 +163 4 1 1 -0.32768000000000000000e5 +163 4 1 13 0.16384000000000000000e5 +163 4 2 2 0.32768000000000000000e5 +163 4 2 14 0.32768000000000000000e5 +164 1 1 3 0.32768000000000000000e5 +164 1 1 24 0.32768000000000000000e5 +164 1 1 32 0.13107200000000000000e6 +164 1 1 48 0.32768000000000000000e5 +164 1 2 33 -0.13107200000000000000e6 +164 1 2 49 0.32768000000000000000e5 +164 1 3 34 0.26214400000000000000e6 +164 1 6 37 0.32768000000000000000e5 +164 1 7 22 0.65536000000000000000e5 +164 1 8 23 0.65536000000000000000e5 +164 1 8 39 -0.65536000000000000000e5 +164 1 10 41 -0.13107200000000000000e6 +164 1 12 27 -0.26214400000000000000e6 +164 1 23 38 0.32768000000000000000e5 +164 2 1 7 0.65536000000000000000e5 +164 2 2 16 0.32768000000000000000e5 +164 2 2 32 0.32768000000000000000e5 +164 2 3 17 -0.32768000000000000000e5 +164 2 4 26 0.32768000000000000000e5 +164 2 6 20 0.13107200000000000000e6 +164 2 7 21 -0.13107200000000000000e6 +164 3 1 2 -0.32768000000000000000e5 +164 3 1 30 0.65536000000000000000e5 +164 3 3 16 0.32768000000000000000e5 +164 3 8 21 -0.13107200000000000000e6 +164 4 1 5 -0.65536000000000000000e5 +164 4 1 13 0.32768000000000000000e5 +165 1 1 4 0.32768000000000000000e5 +165 1 1 24 -0.32768000000000000000e5 +165 1 1 40 -0.32768000000000000000e5 +165 1 2 5 0.32768000000000000000e5 +165 1 2 9 -0.65536000000000000000e5 +165 1 7 38 -0.65536000000000000000e5 +165 1 8 23 0.13107200000000000000e6 +165 3 2 3 0.32768000000000000000e5 +165 3 3 16 0.32768000000000000000e5 +165 3 4 17 0.32768000000000000000e5 +165 3 6 19 0.65536000000000000000e5 +165 3 7 20 -0.13107200000000000000e6 +165 4 1 13 0.32768000000000000000e5 +165 4 2 2 0.65536000000000000000e5 +165 4 2 14 0.65536000000000000000e5 +166 1 1 5 0.32768000000000000000e5 +166 1 1 48 -0.32768000000000000000e5 +166 1 2 49 -0.32768000000000000000e5 +166 1 6 37 -0.32768000000000000000e5 +166 1 8 39 0.65536000000000000000e5 +166 1 23 38 -0.32768000000000000000e5 +166 2 2 32 -0.32768000000000000000e5 +166 2 3 17 0.32768000000000000000e5 +166 2 4 26 -0.32768000000000000000e5 +166 3 1 30 -0.65536000000000000000e5 +166 3 2 3 -0.32768000000000000000e5 +166 3 3 16 -0.32768000000000000000e5 +166 4 1 13 -0.32768000000000000000e5 +167 1 1 6 0.32768000000000000000e5 +167 1 2 5 -0.32768000000000000000e5 +168 1 1 2 -0.16384000000000000000e5 +168 1 1 7 0.32768000000000000000e5 +168 1 1 8 0.32768000000000000000e5 +168 1 1 24 0.16384000000000000000e5 +168 1 1 32 0.65536000000000000000e5 +168 1 1 40 -0.16384000000000000000e5 +168 1 1 48 0.16384000000000000000e5 +168 1 2 5 0.16384000000000000000e5 +168 1 2 9 -0.32768000000000000000e5 +168 1 2 33 -0.65536000000000000000e5 +168 1 2 49 0.16384000000000000000e5 +168 1 3 34 0.13107200000000000000e6 +168 1 6 37 0.16384000000000000000e5 +168 1 7 38 -0.32768000000000000000e5 +168 1 8 23 0.98304000000000000000e5 +168 1 8 39 -0.32768000000000000000e5 +168 1 10 41 -0.65536000000000000000e5 +168 1 12 27 -0.13107200000000000000e6 +168 1 23 38 0.16384000000000000000e5 +168 2 1 7 0.32768000000000000000e5 +168 2 2 16 0.16384000000000000000e5 +168 2 2 32 0.16384000000000000000e5 +168 2 3 17 -0.16384000000000000000e5 +168 2 4 26 0.16384000000000000000e5 +168 2 6 20 0.65536000000000000000e5 +168 2 7 21 -0.65536000000000000000e5 +168 3 1 2 -0.16384000000000000000e5 +168 3 1 16 0.16384000000000000000e5 +168 3 1 30 0.32768000000000000000e5 +168 3 2 3 0.16384000000000000000e5 +168 3 3 16 0.32768000000000000000e5 +168 3 4 17 0.16384000000000000000e5 +168 3 6 19 0.32768000000000000000e5 +168 3 7 20 -0.65536000000000000000e5 +168 3 8 21 -0.65536000000000000000e5 +168 4 1 1 -0.32768000000000000000e5 +168 4 1 5 -0.32768000000000000000e5 +168 4 1 13 0.32768000000000000000e5 +168 4 2 2 0.32768000000000000000e5 +168 4 2 14 0.32768000000000000000e5 +169 1 1 9 0.32768000000000000000e5 +169 1 1 32 0.65536000000000000000e5 +169 1 1 40 -0.16384000000000000000e5 +169 1 2 5 0.16384000000000000000e5 +169 1 2 9 -0.32768000000000000000e5 +169 1 2 33 -0.65536000000000000000e5 +169 1 3 34 0.13107200000000000000e6 +169 1 7 22 0.32768000000000000000e5 +169 1 7 38 -0.32768000000000000000e5 +169 1 8 23 0.98304000000000000000e5 +169 1 10 41 -0.65536000000000000000e5 +169 1 12 27 -0.13107200000000000000e6 +169 2 1 3 -0.16384000000000000000e5 +169 2 1 7 0.32768000000000000000e5 +169 2 2 16 0.16384000000000000000e5 +169 2 6 20 0.65536000000000000000e5 +169 2 7 21 -0.65536000000000000000e5 +169 3 1 2 -0.16384000000000000000e5 +169 3 3 16 0.16384000000000000000e5 +169 3 4 17 0.16384000000000000000e5 +169 3 6 19 0.32768000000000000000e5 +169 3 7 20 -0.65536000000000000000e5 +169 3 8 21 -0.65536000000000000000e5 +169 4 1 5 -0.32768000000000000000e5 +169 4 1 13 0.16384000000000000000e5 +169 4 2 2 0.32768000000000000000e5 +169 4 2 14 0.32768000000000000000e5 +170 1 1 10 0.32768000000000000000e5 +170 1 2 9 -0.32768000000000000000e5 +171 1 1 11 0.32768000000000000000e5 +171 1 2 9 0.32768000000000000000e5 +171 1 2 17 0.13107200000000000000e6 +171 1 2 33 0.65536000000000000000e5 +171 1 3 18 0.26214400000000000000e6 +171 1 4 19 0.26214400000000000000e6 +171 1 4 35 0.26214400000000000000e6 +171 1 6 13 -0.65536000000000000000e5 +171 1 8 39 0.32768000000000000000e5 +171 1 11 42 -0.65536000000000000000e5 +171 1 18 25 0.13107200000000000000e6 +171 1 20 27 -0.52428800000000000000e6 +171 2 2 8 0.32768000000000000000e5 +171 2 4 10 0.65536000000000000000e5 +171 2 6 12 0.13107200000000000000e6 +171 2 8 22 -0.65536000000000000000e5 +171 2 9 23 0.13107200000000000000e6 +171 2 10 24 0.26214400000000000000e6 +171 3 2 15 -0.26214400000000000000e6 +171 3 3 8 0.32768000000000000000e5 +171 3 6 19 0.32768000000000000000e5 +171 3 8 13 -0.26214400000000000000e6 +171 3 9 22 -0.65536000000000000000e5 +171 4 4 8 -0.65536000000000000000e5 +172 1 1 8 -0.16384000000000000000e5 +172 1 1 13 0.32768000000000000000e5 +172 1 1 32 0.32768000000000000000e5 +172 1 1 40 -0.81920000000000000000e4 +172 1 2 5 0.81920000000000000000e4 +172 1 2 9 -0.32768000000000000000e5 +172 1 2 33 -0.32768000000000000000e5 +172 1 3 34 0.65536000000000000000e5 +172 1 7 22 0.16384000000000000000e5 +172 1 7 38 -0.16384000000000000000e5 +172 1 8 23 0.49152000000000000000e5 +172 1 10 41 -0.32768000000000000000e5 +172 1 12 27 -0.65536000000000000000e5 +172 2 1 3 -0.81920000000000000000e4 +172 2 2 16 0.81920000000000000000e4 +172 2 6 20 0.32768000000000000000e5 +172 2 7 21 -0.32768000000000000000e5 +172 3 1 2 -0.81920000000000000000e4 +172 3 3 16 0.81920000000000000000e4 +172 3 4 17 0.81920000000000000000e4 +172 3 6 19 0.16384000000000000000e5 +172 3 7 20 -0.32768000000000000000e5 +172 3 8 21 -0.32768000000000000000e5 +172 4 1 5 -0.16384000000000000000e5 +172 4 1 13 0.81920000000000000000e4 +172 4 2 2 0.16384000000000000000e5 +172 4 2 14 0.16384000000000000000e5 +173 1 1 14 0.32768000000000000000e5 +173 1 1 32 -0.32768000000000000000e5 +173 3 6 7 -0.32768000000000000000e5 +174 1 1 15 0.32768000000000000000e5 +174 1 2 17 0.65536000000000000000e5 +174 1 2 33 0.32768000000000000000e5 +174 1 3 18 0.13107200000000000000e6 +174 1 4 19 0.13107200000000000000e6 +174 1 4 35 0.13107200000000000000e6 +174 1 6 13 -0.32768000000000000000e5 +174 1 11 42 -0.32768000000000000000e5 +174 1 18 25 0.65536000000000000000e5 +174 1 20 27 -0.26214400000000000000e6 +174 2 4 10 0.32768000000000000000e5 +174 2 6 12 0.65536000000000000000e5 +174 2 8 22 -0.32768000000000000000e5 +174 2 9 23 0.65536000000000000000e5 +174 2 10 24 0.13107200000000000000e6 +174 3 2 15 -0.13107200000000000000e6 +174 3 8 13 -0.13107200000000000000e6 +174 3 9 22 -0.32768000000000000000e5 +174 4 4 8 -0.32768000000000000000e5 +175 1 1 8 -0.81920000000000000000e4 +175 1 1 17 0.32768000000000000000e5 +175 1 1 40 -0.40960000000000000000e4 +175 1 2 5 0.40960000000000000000e4 +175 1 2 9 -0.16384000000000000000e5 +175 1 2 17 0.32768000000000000000e5 +175 1 3 18 0.65536000000000000000e5 +175 1 3 34 0.32768000000000000000e5 +175 1 4 19 0.65536000000000000000e5 +175 1 4 35 0.65536000000000000000e5 +175 1 6 13 -0.16384000000000000000e5 +175 1 7 22 0.81920000000000000000e4 +175 1 7 38 -0.81920000000000000000e4 +175 1 8 23 0.24576000000000000000e5 +175 1 10 41 -0.16384000000000000000e5 +175 1 11 42 -0.16384000000000000000e5 +175 1 12 27 -0.32768000000000000000e5 +175 1 18 25 0.32768000000000000000e5 +175 1 20 27 -0.13107200000000000000e6 +175 2 1 3 -0.40960000000000000000e4 +175 2 2 16 0.40960000000000000000e4 +175 2 4 10 0.16384000000000000000e5 +175 2 6 12 0.32768000000000000000e5 +175 2 7 21 -0.16384000000000000000e5 +175 2 8 22 -0.16384000000000000000e5 +175 2 9 23 0.32768000000000000000e5 +175 2 10 24 0.65536000000000000000e5 +175 3 1 2 -0.40960000000000000000e4 +175 3 2 15 -0.65536000000000000000e5 +175 3 3 16 0.40960000000000000000e4 +175 3 4 17 0.40960000000000000000e4 +175 3 6 7 -0.16384000000000000000e5 +175 3 6 19 0.81920000000000000000e4 +175 3 7 20 -0.16384000000000000000e5 +175 3 8 13 -0.65536000000000000000e5 +175 3 8 21 -0.16384000000000000000e5 +175 3 9 22 -0.16384000000000000000e5 +175 4 1 5 -0.81920000000000000000e4 +175 4 1 13 0.40960000000000000000e4 +175 4 2 2 0.81920000000000000000e4 +175 4 2 14 0.81920000000000000000e4 +175 4 4 8 -0.16384000000000000000e5 +175 4 5 5 -0.32768000000000000000e5 +176 1 1 18 0.32768000000000000000e5 +176 1 2 17 -0.32768000000000000000e5 +177 1 1 19 0.32768000000000000000e5 +177 1 7 16 -0.32768000000000000000e5 +178 1 1 20 0.32768000000000000000e5 +178 1 13 16 -0.65536000000000000000e5 +178 1 20 27 0.65536000000000000000e5 +178 1 28 35 -0.32768000000000000000e5 +178 2 7 13 0.32768000000000000000e5 +178 2 10 24 -0.32768000000000000000e5 +178 3 2 15 0.32768000000000000000e5 +178 3 8 13 0.32768000000000000000e5 +178 3 11 24 -0.32768000000000000000e5 +179 1 1 21 0.32768000000000000000e5 +179 1 4 19 0.16384000000000000000e5 +179 1 7 16 -0.16384000000000000000e5 +179 1 13 16 -0.32768000000000000000e5 +179 2 1 15 -0.16384000000000000000e5 +179 2 7 13 0.16384000000000000000e5 +180 1 1 2 -0.32768000000000000000e5 +180 1 1 8 0.65536000000000000000e5 +180 1 1 22 0.32768000000000000000e5 +180 1 1 40 -0.32768000000000000000e5 +180 1 2 5 0.32768000000000000000e5 +180 1 2 9 -0.65536000000000000000e5 +180 1 7 22 -0.65536000000000000000e5 +180 1 7 38 -0.65536000000000000000e5 +180 1 8 23 0.13107200000000000000e6 +180 3 1 2 -0.32768000000000000000e5 +180 3 2 3 0.32768000000000000000e5 +180 3 3 16 0.32768000000000000000e5 +180 3 4 17 0.32768000000000000000e5 +180 3 6 19 0.65536000000000000000e5 +180 3 7 20 -0.13107200000000000000e6 +180 4 1 1 -0.65536000000000000000e5 +180 4 1 13 0.32768000000000000000e5 +180 4 2 2 0.65536000000000000000e5 +180 4 2 14 0.65536000000000000000e5 +181 1 1 23 0.32768000000000000000e5 +181 1 1 24 0.32768000000000000000e5 +181 1 1 32 0.13107200000000000000e6 +181 1 1 48 0.32768000000000000000e5 +181 1 2 33 -0.13107200000000000000e6 +181 1 2 49 0.32768000000000000000e5 +181 1 3 34 0.26214400000000000000e6 +181 1 6 37 0.32768000000000000000e5 +181 1 7 22 0.65536000000000000000e5 +181 1 8 23 0.65536000000000000000e5 +181 1 8 39 -0.65536000000000000000e5 +181 1 10 41 -0.13107200000000000000e6 +181 1 12 27 -0.26214400000000000000e6 +181 1 23 38 0.32768000000000000000e5 +181 2 1 7 0.65536000000000000000e5 +181 2 2 16 0.32768000000000000000e5 +181 2 2 32 0.32768000000000000000e5 +181 2 3 17 -0.32768000000000000000e5 +181 2 4 26 0.32768000000000000000e5 +181 2 6 20 0.13107200000000000000e6 +181 2 7 21 -0.13107200000000000000e6 +181 3 1 30 0.65536000000000000000e5 +181 3 3 16 0.32768000000000000000e5 +181 3 8 21 -0.13107200000000000000e6 +181 4 1 5 -0.65536000000000000000e5 +181 4 1 13 0.32768000000000000000e5 +182 1 1 25 0.32768000000000000000e5 +182 1 1 48 -0.32768000000000000000e5 +182 1 2 49 -0.32768000000000000000e5 +182 1 6 37 -0.32768000000000000000e5 +182 1 8 39 0.65536000000000000000e5 +182 1 23 38 -0.32768000000000000000e5 +182 2 2 32 -0.32768000000000000000e5 +182 2 3 17 0.32768000000000000000e5 +182 2 4 26 -0.32768000000000000000e5 +182 3 1 30 -0.65536000000000000000e5 +182 3 3 16 -0.32768000000000000000e5 +182 4 1 13 -0.32768000000000000000e5 +183 1 1 26 0.32768000000000000000e5 +183 1 1 40 -0.32768000000000000000e5 +183 1 7 38 -0.65536000000000000000e5 +183 1 8 23 0.65536000000000000000e5 +183 3 3 16 0.32768000000000000000e5 +183 3 4 17 0.32768000000000000000e5 +183 3 6 19 0.65536000000000000000e5 +183 3 7 20 -0.13107200000000000000e6 +183 4 1 13 0.32768000000000000000e5 +183 4 2 14 0.65536000000000000000e5 +184 1 1 27 0.32768000000000000000e5 +184 1 7 22 -0.32768000000000000000e5 +185 1 1 28 0.32768000000000000000e5 +185 1 1 32 0.65536000000000000000e5 +185 1 2 33 -0.65536000000000000000e5 +185 1 3 34 0.13107200000000000000e6 +185 1 7 22 0.32768000000000000000e5 +185 1 8 23 0.32768000000000000000e5 +185 1 10 41 -0.65536000000000000000e5 +185 1 12 27 -0.13107200000000000000e6 +185 2 1 7 0.32768000000000000000e5 +185 2 6 20 0.65536000000000000000e5 +185 2 7 21 -0.65536000000000000000e5 +185 3 8 21 -0.65536000000000000000e5 +185 4 1 5 -0.32768000000000000000e5 +186 1 1 29 0.32768000000000000000e5 +186 1 8 23 -0.32768000000000000000e5 +187 1 1 30 0.32768000000000000000e5 +187 1 1 48 -0.16384000000000000000e5 +187 1 2 49 -0.16384000000000000000e5 +187 1 7 38 -0.32768000000000000000e5 +187 1 8 23 0.32768000000000000000e5 +187 1 23 38 -0.16384000000000000000e5 +187 2 2 32 -0.16384000000000000000e5 +187 3 1 30 -0.32768000000000000000e5 +187 3 6 19 0.32768000000000000000e5 +187 3 7 20 -0.65536000000000000000e5 +187 4 2 14 0.32768000000000000000e5 +188 1 1 31 0.32768000000000000000e5 +188 1 1 32 0.32768000000000000000e5 +188 1 2 33 -0.32768000000000000000e5 +188 1 3 34 0.65536000000000000000e5 +188 1 10 41 -0.32768000000000000000e5 +188 1 12 27 -0.65536000000000000000e5 +188 2 6 20 0.32768000000000000000e5 +188 2 7 21 -0.32768000000000000000e5 +188 3 8 21 -0.32768000000000000000e5 +189 1 1 33 0.32768000000000000000e5 +189 1 2 33 0.32768000000000000000e5 +189 1 3 34 -0.65536000000000000000e5 +189 1 10 41 0.32768000000000000000e5 +189 2 7 21 0.32768000000000000000e5 +189 3 8 21 0.32768000000000000000e5 +190 1 1 34 0.32768000000000000000e5 +190 1 12 27 -0.32768000000000000000e5 +191 1 1 35 0.32768000000000000000e5 +191 1 2 17 -0.32768000000000000000e5 +191 3 1 14 0.32768000000000000000e5 +192 1 1 36 0.32768000000000000000e5 +192 1 16 31 -0.65536000000000000000e5 +192 1 20 27 0.65536000000000000000e5 +192 1 28 35 -0.32768000000000000000e5 +192 2 7 13 0.32768000000000000000e5 +192 2 10 24 -0.32768000000000000000e5 +192 3 11 24 -0.32768000000000000000e5 +192 4 8 8 -0.65536000000000000000e5 +193 1 1 24 0.32768000000000000000e5 +193 1 1 32 0.13107200000000000000e6 +193 1 1 37 0.32768000000000000000e5 +193 1 1 48 0.32768000000000000000e5 +193 1 2 33 -0.13107200000000000000e6 +193 1 2 49 0.32768000000000000000e5 +193 1 3 34 0.26214400000000000000e6 +193 1 6 37 0.32768000000000000000e5 +193 1 7 22 0.65536000000000000000e5 +193 1 8 23 0.65536000000000000000e5 +193 1 8 39 -0.65536000000000000000e5 +193 1 10 41 -0.13107200000000000000e6 +193 1 12 27 -0.26214400000000000000e6 +193 1 23 38 0.32768000000000000000e5 +193 2 1 7 0.65536000000000000000e5 +193 2 2 16 0.32768000000000000000e5 +193 2 2 32 0.32768000000000000000e5 +193 2 3 17 -0.32768000000000000000e5 +193 2 4 26 0.32768000000000000000e5 +193 2 6 20 0.13107200000000000000e6 +193 2 7 21 -0.13107200000000000000e6 +193 3 1 16 0.32768000000000000000e5 +193 3 1 30 0.65536000000000000000e5 +193 3 3 16 0.32768000000000000000e5 +193 3 8 21 -0.13107200000000000000e6 +193 4 1 5 -0.65536000000000000000e5 +193 4 1 13 0.32768000000000000000e5 +194 1 1 38 0.32768000000000000000e5 +194 1 1 40 0.32768000000000000000e5 +194 1 2 33 0.13107200000000000000e6 +194 1 2 49 0.32768000000000000000e5 +194 1 3 34 -0.26214400000000000000e6 +194 1 3 50 -0.65536000000000000000e5 +194 1 5 52 0.13107200000000000000e6 +194 1 6 37 0.32768000000000000000e5 +194 1 10 41 0.13107200000000000000e6 +194 1 11 42 -0.13107200000000000000e6 +194 1 12 43 -0.26214400000000000000e6 +194 1 16 47 0.26214400000000000000e6 +194 1 22 37 -0.32768000000000000000e5 +194 1 28 43 0.13107200000000000000e6 +194 2 2 32 0.32768000000000000000e5 +194 2 3 17 -0.32768000000000000000e5 +194 2 4 26 0.32768000000000000000e5 +194 2 7 21 0.13107200000000000000e6 +194 2 10 32 -0.13107200000000000000e6 +194 2 12 26 0.13107200000000000000e6 +194 3 1 30 0.13107200000000000000e6 +194 3 2 31 0.13107200000000000000e6 +194 3 7 20 0.13107200000000000000e6 +194 3 8 21 0.13107200000000000000e6 +194 3 14 27 0.26214400000000000000e6 +194 4 1 13 0.32768000000000000000e5 +194 4 5 17 0.65536000000000000000e5 +194 4 7 19 -0.13107200000000000000e6 +194 4 11 11 0.65536000000000000000e5 +195 1 1 39 0.32768000000000000000e5 +195 1 1 48 -0.32768000000000000000e5 +195 1 2 49 -0.32768000000000000000e5 +195 1 6 37 -0.32768000000000000000e5 +195 1 8 39 0.65536000000000000000e5 +195 1 23 38 -0.32768000000000000000e5 +195 2 2 32 -0.32768000000000000000e5 +195 2 3 17 0.32768000000000000000e5 +195 2 4 26 -0.32768000000000000000e5 +195 3 1 30 -0.65536000000000000000e5 +195 4 1 13 -0.32768000000000000000e5 +196 1 1 24 0.16384000000000000000e5 +196 1 1 32 0.65536000000000000000e5 +196 1 1 40 0.16384000000000000000e5 +196 1 1 41 0.32768000000000000000e5 +196 1 2 49 0.16384000000000000000e5 +196 1 3 50 -0.32768000000000000000e5 +196 1 5 52 0.65536000000000000000e5 +196 1 6 37 0.16384000000000000000e5 +196 1 7 22 0.32768000000000000000e5 +196 1 8 23 0.32768000000000000000e5 +196 1 11 42 -0.65536000000000000000e5 +196 1 12 27 -0.13107200000000000000e6 +196 1 12 43 -0.13107200000000000000e6 +196 1 16 47 0.13107200000000000000e6 +196 1 22 37 -0.16384000000000000000e5 +196 1 28 43 0.65536000000000000000e5 +196 2 1 7 0.32768000000000000000e5 +196 2 2 16 0.16384000000000000000e5 +196 2 2 32 0.16384000000000000000e5 +196 2 3 17 -0.16384000000000000000e5 +196 2 4 26 0.16384000000000000000e5 +196 2 6 20 0.65536000000000000000e5 +196 2 10 32 -0.65536000000000000000e5 +196 2 12 26 0.65536000000000000000e5 +196 2 16 16 -0.32768000000000000000e5 +196 3 1 16 0.16384000000000000000e5 +196 3 1 30 0.65536000000000000000e5 +196 3 2 31 0.65536000000000000000e5 +196 3 3 16 0.16384000000000000000e5 +196 3 7 20 0.65536000000000000000e5 +196 3 14 27 0.13107200000000000000e6 +196 4 1 5 -0.32768000000000000000e5 +196 4 1 13 0.16384000000000000000e5 +196 4 5 17 0.32768000000000000000e5 +196 4 7 19 -0.65536000000000000000e5 +196 4 11 11 0.32768000000000000000e5 +197 1 1 42 0.32768000000000000000e5 +197 1 7 38 -0.32768000000000000000e5 +198 1 1 43 0.32768000000000000000e5 +198 1 1 48 -0.16384000000000000000e5 +198 1 2 49 -0.16384000000000000000e5 +198 1 23 38 -0.16384000000000000000e5 +198 2 2 32 -0.16384000000000000000e5 +198 3 1 30 -0.32768000000000000000e5 +199 1 1 44 0.32768000000000000000e5 +199 1 2 17 -0.65536000000000000000e5 +199 1 2 33 -0.32768000000000000000e5 +199 1 3 34 0.65536000000000000000e5 +199 1 10 41 -0.32768000000000000000e5 +199 1 11 42 0.32768000000000000000e5 +199 1 12 43 0.65536000000000000000e5 +199 1 17 48 -0.65536000000000000000e5 +199 2 1 31 0.32768000000000000000e5 +199 2 7 21 -0.32768000000000000000e5 +199 2 8 22 0.32768000000000000000e5 +199 2 12 26 -0.32768000000000000000e5 +199 3 1 14 0.65536000000000000000e5 +199 3 6 23 0.65536000000000000000e5 +199 3 7 20 -0.32768000000000000000e5 +199 3 8 21 -0.32768000000000000000e5 +199 3 14 27 -0.65536000000000000000e5 +199 4 4 16 -0.32768000000000000000e5 +200 1 1 45 0.32768000000000000000e5 +200 1 2 33 0.32768000000000000000e5 +200 1 3 34 -0.65536000000000000000e5 +200 1 10 41 0.32768000000000000000e5 +200 2 7 21 0.32768000000000000000e5 +200 3 7 20 0.32768000000000000000e5 +200 3 8 21 0.32768000000000000000e5 +201 1 1 46 0.32768000000000000000e5 +201 1 2 17 -0.32768000000000000000e5 +201 3 1 14 0.32768000000000000000e5 +201 3 6 23 0.32768000000000000000e5 +202 1 1 47 0.32768000000000000000e5 +202 1 22 37 -0.32768000000000000000e5 +203 1 1 49 0.32768000000000000000e5 +203 1 23 38 -0.32768000000000000000e5 +204 1 1 50 0.32768000000000000000e5 +204 1 2 33 -0.65536000000000000000e5 +204 1 3 34 0.13107200000000000000e6 +204 1 3 50 0.32768000000000000000e5 +204 1 5 52 -0.65536000000000000000e5 +204 1 7 38 -0.32768000000000000000e5 +204 1 8 39 -0.32768000000000000000e5 +204 1 10 41 -0.65536000000000000000e5 +204 1 11 42 0.65536000000000000000e5 +204 1 12 43 0.13107200000000000000e6 +204 1 16 47 -0.13107200000000000000e6 +204 1 28 43 -0.65536000000000000000e5 +204 2 7 21 -0.65536000000000000000e5 +204 2 10 32 0.65536000000000000000e5 +204 2 12 26 -0.65536000000000000000e5 +204 3 1 30 -0.32768000000000000000e5 +204 3 2 31 -0.65536000000000000000e5 +204 3 7 20 -0.65536000000000000000e5 +204 3 8 21 -0.65536000000000000000e5 +204 3 14 27 -0.13107200000000000000e6 +204 4 5 17 -0.32768000000000000000e5 +204 4 7 19 0.65536000000000000000e5 +205 1 1 48 -0.16384000000000000000e5 +205 1 1 51 0.32768000000000000000e5 +205 1 2 49 -0.16384000000000000000e5 +205 1 23 38 -0.16384000000000000000e5 +205 2 2 32 -0.16384000000000000000e5 +206 1 1 52 0.32768000000000000000e5 +206 1 5 52 -0.32768000000000000000e5 +206 1 11 42 0.32768000000000000000e5 +206 1 12 43 0.65536000000000000000e5 +206 1 16 47 -0.65536000000000000000e5 +206 1 28 43 -0.32768000000000000000e5 +206 2 10 32 0.32768000000000000000e5 +206 2 12 26 -0.32768000000000000000e5 +206 3 2 31 -0.32768000000000000000e5 +206 3 14 27 -0.65536000000000000000e5 +206 4 7 19 0.32768000000000000000e5 +207 1 1 48 -0.32768000000000000000e5 +207 1 1 53 0.32768000000000000000e5 +207 1 2 49 -0.32768000000000000000e5 +207 1 7 54 0.65536000000000000000e5 +207 1 23 38 -0.32768000000000000000e5 +207 1 24 39 -0.32768000000000000000e5 +207 2 1 35 0.32768000000000000000e5 +207 2 2 32 -0.32768000000000000000e5 +207 2 3 33 -0.32768000000000000000e5 +207 2 18 32 0.32768000000000000000e5 +207 2 26 32 -0.32768000000000000000e5 +207 3 3 32 -0.32768000000000000000e5 +207 3 4 33 -0.32768000000000000000e5 +207 3 16 29 0.65536000000000000000e5 +207 3 17 30 0.65536000000000000000e5 +207 4 17 17 -0.65536000000000000000e5 +208 1 1 54 0.32768000000000000000e5 +208 1 2 49 0.32768000000000000000e5 +208 1 7 54 -0.65536000000000000000e5 +208 1 24 39 0.32768000000000000000e5 +208 2 3 33 0.32768000000000000000e5 +208 2 18 32 -0.32768000000000000000e5 +208 2 26 32 0.32768000000000000000e5 +208 3 4 33 0.32768000000000000000e5 +208 3 17 30 -0.65536000000000000000e5 +208 4 17 17 0.65536000000000000000e5 +209 1 1 48 -0.16384000000000000000e5 +209 1 1 55 0.32768000000000000000e5 +209 1 2 49 -0.16384000000000000000e5 +209 1 23 38 -0.16384000000000000000e5 +209 2 2 32 -0.16384000000000000000e5 +209 3 16 29 0.32768000000000000000e5 +210 1 1 56 0.32768000000000000000e5 +210 1 22 53 -0.32768000000000000000e5 +211 1 1 24 0.16384000000000000000e5 +211 1 1 32 0.65536000000000000000e5 +211 1 1 48 0.16384000000000000000e5 +211 1 2 2 0.32768000000000000000e5 +211 1 2 33 -0.65536000000000000000e5 +211 1 2 49 0.16384000000000000000e5 +211 1 3 34 0.13107200000000000000e6 +211 1 6 37 0.16384000000000000000e5 +211 1 7 22 0.32768000000000000000e5 +211 1 8 23 0.32768000000000000000e5 +211 1 8 39 -0.32768000000000000000e5 +211 1 10 41 -0.65536000000000000000e5 +211 1 12 27 -0.13107200000000000000e6 +211 1 23 38 0.16384000000000000000e5 +211 2 1 7 0.32768000000000000000e5 +211 2 2 16 0.16384000000000000000e5 +211 2 2 32 0.16384000000000000000e5 +211 2 3 17 -0.16384000000000000000e5 +211 2 4 26 0.16384000000000000000e5 +211 2 6 20 0.65536000000000000000e5 +211 2 7 21 -0.65536000000000000000e5 +211 3 1 2 -0.16384000000000000000e5 +211 3 1 30 0.32768000000000000000e5 +211 3 3 16 0.16384000000000000000e5 +211 3 8 21 -0.65536000000000000000e5 +211 4 1 5 -0.32768000000000000000e5 +211 4 1 13 0.16384000000000000000e5 +212 1 1 24 -0.32768000000000000000e5 +212 1 1 40 -0.32768000000000000000e5 +212 1 2 3 0.32768000000000000000e5 +212 1 2 5 0.32768000000000000000e5 +212 1 2 9 -0.65536000000000000000e5 +212 1 7 38 -0.65536000000000000000e5 +212 1 8 23 0.13107200000000000000e6 +212 3 2 3 0.32768000000000000000e5 +212 3 3 16 0.32768000000000000000e5 +212 3 4 17 0.32768000000000000000e5 +212 3 6 19 0.65536000000000000000e5 +212 3 7 20 -0.13107200000000000000e6 +212 4 1 13 0.32768000000000000000e5 +212 4 2 2 0.65536000000000000000e5 +212 4 2 14 0.65536000000000000000e5 +213 1 1 48 -0.32768000000000000000e5 +213 1 2 4 0.32768000000000000000e5 +213 1 2 49 -0.32768000000000000000e5 +213 1 6 37 -0.32768000000000000000e5 +213 1 8 39 0.65536000000000000000e5 +213 1 23 38 -0.32768000000000000000e5 +213 2 2 32 -0.32768000000000000000e5 +213 2 3 17 0.32768000000000000000e5 +213 2 4 26 -0.32768000000000000000e5 +213 3 1 30 -0.65536000000000000000e5 +213 3 2 3 -0.32768000000000000000e5 +213 3 3 16 -0.32768000000000000000e5 +213 4 1 13 -0.32768000000000000000e5 +214 1 1 48 0.32768000000000000000e5 +214 1 2 5 0.32768000000000000000e5 +214 1 2 6 0.32768000000000000000e5 +214 1 2 9 0.65536000000000000000e5 +214 1 2 17 0.26214400000000000000e6 +214 1 2 33 0.13107200000000000000e6 +214 1 2 49 0.32768000000000000000e5 +214 1 3 18 0.52428800000000000000e6 +214 1 4 19 0.52428800000000000000e6 +214 1 4 35 0.52428800000000000000e6 +214 1 6 13 -0.13107200000000000000e6 +214 1 6 37 0.32768000000000000000e5 +214 1 11 42 -0.13107200000000000000e6 +214 1 18 25 0.26214400000000000000e6 +214 1 20 27 -0.10485760000000000000e7 +214 1 23 38 0.32768000000000000000e5 +214 2 2 4 0.32768000000000000000e5 +214 2 2 8 0.65536000000000000000e5 +214 2 2 32 0.32768000000000000000e5 +214 2 3 17 -0.32768000000000000000e5 +214 2 4 10 0.13107200000000000000e6 +214 2 4 26 0.32768000000000000000e5 +214 2 6 12 0.26214400000000000000e6 +214 2 8 22 -0.13107200000000000000e6 +214 2 9 23 0.26214400000000000000e6 +214 2 10 24 0.52428800000000000000e6 +214 3 1 30 0.65536000000000000000e5 +214 3 2 3 0.32768000000000000000e5 +214 3 2 15 -0.52428800000000000000e6 +214 3 3 8 0.65536000000000000000e5 +214 3 3 16 0.32768000000000000000e5 +214 3 6 19 0.65536000000000000000e5 +214 3 8 13 -0.52428800000000000000e6 +214 3 9 22 -0.13107200000000000000e6 +214 4 1 13 0.32768000000000000000e5 +214 4 4 8 -0.13107200000000000000e6 +215 1 1 8 -0.32768000000000000000e5 +215 1 2 7 0.32768000000000000000e5 +216 1 1 32 0.65536000000000000000e5 +216 1 1 40 -0.16384000000000000000e5 +216 1 2 5 0.16384000000000000000e5 +216 1 2 8 0.32768000000000000000e5 +216 1 2 9 -0.32768000000000000000e5 +216 1 2 33 -0.65536000000000000000e5 +216 1 3 34 0.13107200000000000000e6 +216 1 7 22 0.32768000000000000000e5 +216 1 7 38 -0.32768000000000000000e5 +216 1 8 23 0.98304000000000000000e5 +216 1 10 41 -0.65536000000000000000e5 +216 1 12 27 -0.13107200000000000000e6 +216 2 1 3 -0.16384000000000000000e5 +216 2 1 7 0.32768000000000000000e5 +216 2 2 16 0.16384000000000000000e5 +216 2 6 20 0.65536000000000000000e5 +216 2 7 21 -0.65536000000000000000e5 +216 3 1 2 -0.16384000000000000000e5 +216 3 3 16 0.16384000000000000000e5 +216 3 4 17 0.16384000000000000000e5 +216 3 6 19 0.32768000000000000000e5 +216 3 7 20 -0.65536000000000000000e5 +216 3 8 21 -0.65536000000000000000e5 +216 4 1 5 -0.32768000000000000000e5 +216 4 1 13 0.16384000000000000000e5 +216 4 2 2 0.32768000000000000000e5 +216 4 2 14 0.32768000000000000000e5 +217 1 2 9 0.32768000000000000000e5 +217 1 2 10 0.32768000000000000000e5 +217 1 2 17 0.13107200000000000000e6 +217 1 2 33 0.65536000000000000000e5 +217 1 3 18 0.26214400000000000000e6 +217 1 4 19 0.26214400000000000000e6 +217 1 4 35 0.26214400000000000000e6 +217 1 6 13 -0.65536000000000000000e5 +217 1 8 39 0.32768000000000000000e5 +217 1 11 42 -0.65536000000000000000e5 +217 1 18 25 0.13107200000000000000e6 +217 1 20 27 -0.52428800000000000000e6 +217 2 2 8 0.32768000000000000000e5 +217 2 4 10 0.65536000000000000000e5 +217 2 6 12 0.13107200000000000000e6 +217 2 8 22 -0.65536000000000000000e5 +217 2 9 23 0.13107200000000000000e6 +217 2 10 24 0.26214400000000000000e6 +217 3 2 15 -0.26214400000000000000e6 +217 3 3 8 0.32768000000000000000e5 +217 3 6 19 0.32768000000000000000e5 +217 3 8 13 -0.26214400000000000000e6 +217 3 9 22 -0.65536000000000000000e5 +217 4 4 8 -0.65536000000000000000e5 +218 1 2 11 0.32768000000000000000e5 +218 1 8 39 -0.32768000000000000000e5 +218 3 3 8 -0.32768000000000000000e5 +218 3 6 19 -0.32768000000000000000e5 +219 1 1 8 -0.16384000000000000000e5 +219 1 1 32 0.32768000000000000000e5 +219 1 1 40 -0.81920000000000000000e4 +219 1 2 5 0.81920000000000000000e4 +219 1 2 9 -0.32768000000000000000e5 +219 1 2 12 0.32768000000000000000e5 +219 1 2 33 -0.32768000000000000000e5 +219 1 3 34 0.65536000000000000000e5 +219 1 7 22 0.16384000000000000000e5 +219 1 7 38 -0.16384000000000000000e5 +219 1 8 23 0.49152000000000000000e5 +219 1 10 41 -0.32768000000000000000e5 +219 1 12 27 -0.65536000000000000000e5 +219 2 1 3 -0.81920000000000000000e4 +219 2 2 16 0.81920000000000000000e4 +219 2 6 20 0.32768000000000000000e5 +219 2 7 21 -0.32768000000000000000e5 +219 3 1 2 -0.81920000000000000000e4 +219 3 3 16 0.81920000000000000000e4 +219 3 4 17 0.81920000000000000000e4 +219 3 6 19 0.16384000000000000000e5 +219 3 7 20 -0.32768000000000000000e5 +219 3 8 21 -0.32768000000000000000e5 +219 4 1 5 -0.16384000000000000000e5 +219 4 1 13 0.81920000000000000000e4 +219 4 2 2 0.16384000000000000000e5 +219 4 2 14 0.16384000000000000000e5 +220 1 1 32 -0.32768000000000000000e5 +220 1 2 13 0.32768000000000000000e5 +220 3 6 7 -0.32768000000000000000e5 +221 1 2 14 0.32768000000000000000e5 +221 1 2 17 0.65536000000000000000e5 +221 1 2 33 0.32768000000000000000e5 +221 1 3 18 0.13107200000000000000e6 +221 1 4 19 0.13107200000000000000e6 +221 1 4 35 0.13107200000000000000e6 +221 1 6 13 -0.32768000000000000000e5 +221 1 11 42 -0.32768000000000000000e5 +221 1 18 25 0.65536000000000000000e5 +221 1 20 27 -0.26214400000000000000e6 +221 2 4 10 0.32768000000000000000e5 +221 2 6 12 0.65536000000000000000e5 +221 2 8 22 -0.32768000000000000000e5 +221 2 9 23 0.65536000000000000000e5 +221 2 10 24 0.13107200000000000000e6 +221 3 2 15 -0.13107200000000000000e6 +221 3 8 13 -0.13107200000000000000e6 +221 3 9 22 -0.32768000000000000000e5 +221 4 4 8 -0.32768000000000000000e5 +222 1 2 15 0.32768000000000000000e5 +222 1 2 33 -0.32768000000000000000e5 +222 1 3 18 -0.65536000000000000000e5 +222 1 4 35 -0.13107200000000000000e6 +222 1 6 13 0.32768000000000000000e5 +222 1 10 41 0.32768000000000000000e5 +222 1 11 42 0.32768000000000000000e5 +222 1 18 25 -0.65536000000000000000e5 +222 1 28 35 0.13107200000000000000e6 +222 2 8 22 0.32768000000000000000e5 +222 2 9 23 -0.65536000000000000000e5 +222 3 5 10 0.32768000000000000000e5 +222 3 8 21 0.32768000000000000000e5 +222 3 9 22 0.32768000000000000000e5 +222 3 11 24 0.13107200000000000000e6 +222 4 4 8 0.32768000000000000000e5 +223 1 1 8 -0.81920000000000000000e4 +223 1 1 40 -0.40960000000000000000e4 +223 1 2 5 0.40960000000000000000e4 +223 1 2 9 -0.16384000000000000000e5 +223 1 2 16 0.32768000000000000000e5 +223 1 2 17 0.32768000000000000000e5 +223 1 3 18 0.65536000000000000000e5 +223 1 3 34 0.32768000000000000000e5 +223 1 4 19 0.65536000000000000000e5 +223 1 4 35 0.65536000000000000000e5 +223 1 6 13 -0.16384000000000000000e5 +223 1 7 22 0.81920000000000000000e4 +223 1 7 38 -0.81920000000000000000e4 +223 1 8 23 0.24576000000000000000e5 +223 1 10 41 -0.16384000000000000000e5 +223 1 11 42 -0.16384000000000000000e5 +223 1 12 27 -0.32768000000000000000e5 +223 1 18 25 0.32768000000000000000e5 +223 1 20 27 -0.13107200000000000000e6 +223 2 1 3 -0.40960000000000000000e4 +223 2 2 16 0.40960000000000000000e4 +223 2 4 10 0.16384000000000000000e5 +223 2 6 12 0.32768000000000000000e5 +223 2 7 21 -0.16384000000000000000e5 +223 2 8 22 -0.16384000000000000000e5 +223 2 9 23 0.32768000000000000000e5 +223 2 10 24 0.65536000000000000000e5 +223 3 1 2 -0.40960000000000000000e4 +223 3 2 15 -0.65536000000000000000e5 +223 3 3 16 0.40960000000000000000e4 +223 3 4 17 0.40960000000000000000e4 +223 3 6 7 -0.16384000000000000000e5 +223 3 6 19 0.81920000000000000000e4 +223 3 7 20 -0.16384000000000000000e5 +223 3 8 13 -0.65536000000000000000e5 +223 3 8 21 -0.16384000000000000000e5 +223 3 9 22 -0.16384000000000000000e5 +223 4 1 5 -0.81920000000000000000e4 +223 4 1 13 0.40960000000000000000e4 +223 4 2 2 0.81920000000000000000e4 +223 4 2 14 0.81920000000000000000e4 +223 4 4 8 -0.16384000000000000000e5 +223 4 5 5 -0.32768000000000000000e5 +224 1 2 17 0.32768000000000000000e5 +224 1 2 18 0.32768000000000000000e5 +224 1 3 18 0.32768000000000000000e5 +224 1 4 19 0.65536000000000000000e5 +224 1 20 27 -0.13107200000000000000e6 +224 1 28 35 0.65536000000000000000e5 +224 2 6 12 0.32768000000000000000e5 +224 2 10 24 0.65536000000000000000e5 +224 3 2 15 -0.65536000000000000000e5 +224 3 8 13 -0.65536000000000000000e5 +224 3 11 24 0.65536000000000000000e5 +225 1 2 19 0.32768000000000000000e5 +225 1 13 16 -0.65536000000000000000e5 +225 1 20 27 0.65536000000000000000e5 +225 1 28 35 -0.32768000000000000000e5 +225 2 7 13 0.32768000000000000000e5 +225 2 10 24 -0.32768000000000000000e5 +225 3 2 15 0.32768000000000000000e5 +225 3 8 13 0.32768000000000000000e5 +225 3 11 24 -0.32768000000000000000e5 +226 1 2 20 0.32768000000000000000e5 +226 1 4 19 0.32768000000000000000e5 +226 1 20 27 -0.65536000000000000000e5 +226 1 28 35 0.32768000000000000000e5 +226 2 10 24 0.32768000000000000000e5 +226 3 2 15 -0.32768000000000000000e5 +226 3 8 13 -0.32768000000000000000e5 +226 3 11 24 0.32768000000000000000e5 +227 1 2 21 0.32768000000000000000e5 +227 1 13 16 -0.32768000000000000000e5 +228 1 1 24 0.32768000000000000000e5 +228 1 1 32 0.13107200000000000000e6 +228 1 1 48 0.32768000000000000000e5 +228 1 2 22 0.32768000000000000000e5 +228 1 2 33 -0.13107200000000000000e6 +228 1 2 49 0.32768000000000000000e5 +228 1 3 34 0.26214400000000000000e6 +228 1 6 37 0.32768000000000000000e5 +228 1 7 22 0.65536000000000000000e5 +228 1 8 23 0.65536000000000000000e5 +228 1 8 39 -0.65536000000000000000e5 +228 1 10 41 -0.13107200000000000000e6 +228 1 12 27 -0.26214400000000000000e6 +228 1 23 38 0.32768000000000000000e5 +228 2 1 7 0.65536000000000000000e5 +228 2 2 16 0.32768000000000000000e5 +228 2 2 32 0.32768000000000000000e5 +228 2 3 17 -0.32768000000000000000e5 +228 2 4 26 0.32768000000000000000e5 +228 2 6 20 0.13107200000000000000e6 +228 2 7 21 -0.13107200000000000000e6 +228 3 1 30 0.65536000000000000000e5 +228 3 3 16 0.32768000000000000000e5 +228 3 8 21 -0.13107200000000000000e6 +228 4 1 5 -0.65536000000000000000e5 +228 4 1 13 0.32768000000000000000e5 +229 1 1 24 -0.32768000000000000000e5 +229 1 2 23 0.32768000000000000000e5 +230 1 1 48 -0.32768000000000000000e5 +230 1 2 24 0.32768000000000000000e5 +230 1 2 49 -0.32768000000000000000e5 +230 1 6 37 -0.32768000000000000000e5 +230 1 8 39 0.65536000000000000000e5 +230 1 23 38 -0.32768000000000000000e5 +230 2 2 32 -0.32768000000000000000e5 +230 2 3 17 0.32768000000000000000e5 +230 2 4 26 -0.32768000000000000000e5 +230 3 1 30 -0.65536000000000000000e5 +230 3 3 16 -0.32768000000000000000e5 +230 4 1 13 -0.32768000000000000000e5 +231 1 1 40 -0.32768000000000000000e5 +231 1 2 25 0.32768000000000000000e5 +231 1 7 38 -0.65536000000000000000e5 +231 1 8 23 0.65536000000000000000e5 +231 3 3 16 0.32768000000000000000e5 +231 3 4 17 0.32768000000000000000e5 +231 3 6 19 0.65536000000000000000e5 +231 3 7 20 -0.13107200000000000000e6 +231 4 1 13 0.32768000000000000000e5 +231 4 2 14 0.65536000000000000000e5 +232 1 1 40 0.32768000000000000000e5 +232 1 2 26 0.32768000000000000000e5 +232 1 6 37 0.32768000000000000000e5 +232 1 8 39 -0.65536000000000000000e5 +232 2 4 26 0.32768000000000000000e5 +232 3 4 17 -0.32768000000000000000e5 +233 1 1 32 0.65536000000000000000e5 +233 1 2 27 0.32768000000000000000e5 +233 1 2 33 -0.65536000000000000000e5 +233 1 3 34 0.13107200000000000000e6 +233 1 7 22 0.32768000000000000000e5 +233 1 8 23 0.32768000000000000000e5 +233 1 10 41 -0.65536000000000000000e5 +233 1 12 27 -0.13107200000000000000e6 +233 2 1 7 0.32768000000000000000e5 +233 2 6 20 0.65536000000000000000e5 +233 2 7 21 -0.65536000000000000000e5 +233 3 8 21 -0.65536000000000000000e5 +233 4 1 5 -0.32768000000000000000e5 +234 1 2 28 0.32768000000000000000e5 +234 1 8 23 -0.32768000000000000000e5 +235 1 1 48 -0.16384000000000000000e5 +235 1 2 29 0.32768000000000000000e5 +235 1 2 49 -0.16384000000000000000e5 +235 1 7 38 -0.32768000000000000000e5 +235 1 8 23 0.32768000000000000000e5 +235 1 23 38 -0.16384000000000000000e5 +235 2 2 32 -0.16384000000000000000e5 +235 3 1 30 -0.32768000000000000000e5 +235 3 6 19 0.32768000000000000000e5 +235 3 7 20 -0.65536000000000000000e5 +235 4 2 14 0.32768000000000000000e5 +236 1 2 30 0.32768000000000000000e5 +236 1 8 39 -0.32768000000000000000e5 +236 3 6 19 -0.32768000000000000000e5 +237 1 1 32 -0.32768000000000000000e5 +237 1 2 31 0.32768000000000000000e5 +238 1 2 32 0.32768000000000000000e5 +238 1 2 33 0.32768000000000000000e5 +238 1 3 34 -0.65536000000000000000e5 +238 1 10 41 0.32768000000000000000e5 +238 2 7 21 0.32768000000000000000e5 +238 3 8 21 0.32768000000000000000e5 +239 1 2 17 -0.32768000000000000000e5 +239 1 2 34 0.32768000000000000000e5 +239 3 1 14 0.32768000000000000000e5 +240 1 2 35 0.32768000000000000000e5 +240 1 3 34 -0.32768000000000000000e5 +241 1 2 36 0.32768000000000000000e5 +241 1 4 19 0.32768000000000000000e5 +241 1 20 27 -0.65536000000000000000e5 +241 1 28 35 0.32768000000000000000e5 +241 2 10 24 0.32768000000000000000e5 +241 3 8 13 -0.32768000000000000000e5 +241 3 11 24 0.32768000000000000000e5 +242 1 1 40 0.32768000000000000000e5 +242 1 2 33 0.13107200000000000000e6 +242 1 2 37 0.32768000000000000000e5 +242 1 2 49 0.32768000000000000000e5 +242 1 3 34 -0.26214400000000000000e6 +242 1 3 50 -0.65536000000000000000e5 +242 1 5 52 0.13107200000000000000e6 +242 1 6 37 0.32768000000000000000e5 +242 1 10 41 0.13107200000000000000e6 +242 1 11 42 -0.13107200000000000000e6 +242 1 12 43 -0.26214400000000000000e6 +242 1 16 47 0.26214400000000000000e6 +242 1 22 37 -0.32768000000000000000e5 +242 1 28 43 0.13107200000000000000e6 +242 2 2 32 0.32768000000000000000e5 +242 2 3 17 -0.32768000000000000000e5 +242 2 4 26 0.32768000000000000000e5 +242 2 7 21 0.13107200000000000000e6 +242 2 10 32 -0.13107200000000000000e6 +242 2 12 26 0.13107200000000000000e6 +242 3 1 30 0.13107200000000000000e6 +242 3 2 31 0.13107200000000000000e6 +242 3 7 20 0.13107200000000000000e6 +242 3 8 21 0.13107200000000000000e6 +242 3 14 27 0.26214400000000000000e6 +242 4 1 13 0.32768000000000000000e5 +242 4 5 17 0.65536000000000000000e5 +242 4 7 19 -0.13107200000000000000e6 +242 4 11 11 0.65536000000000000000e5 +243 1 1 48 -0.32768000000000000000e5 +243 1 2 38 0.32768000000000000000e5 +243 1 2 49 -0.32768000000000000000e5 +243 1 6 37 -0.32768000000000000000e5 +243 1 8 39 0.65536000000000000000e5 +243 1 23 38 -0.32768000000000000000e5 +243 2 2 32 -0.32768000000000000000e5 +243 2 3 17 0.32768000000000000000e5 +243 2 4 26 -0.32768000000000000000e5 +243 3 1 30 -0.65536000000000000000e5 +243 4 1 13 -0.32768000000000000000e5 +244 1 1 40 -0.32768000000000000000e5 +244 1 2 39 0.32768000000000000000e5 +245 1 1 40 0.32768000000000000000e5 +245 1 2 40 0.32768000000000000000e5 +245 1 6 37 0.32768000000000000000e5 +245 1 8 39 -0.65536000000000000000e5 +245 2 4 26 0.32768000000000000000e5 +246 1 2 41 0.32768000000000000000e5 +246 1 7 38 -0.32768000000000000000e5 +247 1 1 48 -0.16384000000000000000e5 +247 1 2 42 0.32768000000000000000e5 +247 1 2 49 -0.16384000000000000000e5 +247 1 23 38 -0.16384000000000000000e5 +247 2 2 32 -0.16384000000000000000e5 +247 3 1 30 -0.32768000000000000000e5 +248 1 2 43 0.32768000000000000000e5 +248 1 8 39 -0.32768000000000000000e5 +249 1 2 33 0.32768000000000000000e5 +249 1 2 44 0.32768000000000000000e5 +249 1 3 34 -0.65536000000000000000e5 +249 1 10 41 0.32768000000000000000e5 +249 2 7 21 0.32768000000000000000e5 +249 3 7 20 0.32768000000000000000e5 +249 3 8 21 0.32768000000000000000e5 +250 1 2 45 0.32768000000000000000e5 +250 1 11 42 -0.32768000000000000000e5 +250 1 12 43 -0.65536000000000000000e5 +250 1 17 48 0.65536000000000000000e5 +250 2 8 22 -0.32768000000000000000e5 +250 2 12 26 0.32768000000000000000e5 +250 3 14 27 0.65536000000000000000e5 +250 4 4 16 0.32768000000000000000e5 +251 1 2 46 0.32768000000000000000e5 +251 1 16 47 -0.32768000000000000000e5 +251 3 13 26 -0.32768000000000000000e5 +252 1 1 48 -0.32768000000000000000e5 +252 1 2 47 0.32768000000000000000e5 +253 1 2 48 0.32768000000000000000e5 +253 1 23 38 -0.32768000000000000000e5 +254 1 1 48 -0.16384000000000000000e5 +254 1 2 49 -0.16384000000000000000e5 +254 1 2 50 0.32768000000000000000e5 +254 1 23 38 -0.16384000000000000000e5 +254 2 2 32 -0.16384000000000000000e5 +255 1 2 51 0.32768000000000000000e5 +255 1 3 50 -0.32768000000000000000e5 +256 1 2 52 0.32768000000000000000e5 +256 1 11 42 -0.32768000000000000000e5 +256 1 12 43 -0.65536000000000000000e5 +256 1 17 48 0.65536000000000000000e5 +256 2 8 22 -0.32768000000000000000e5 +256 2 12 26 0.32768000000000000000e5 +256 3 2 31 0.32768000000000000000e5 +256 3 14 27 0.65536000000000000000e5 +256 4 4 16 0.32768000000000000000e5 +257 1 2 49 0.32768000000000000000e5 +257 1 2 53 0.32768000000000000000e5 +257 1 7 54 -0.65536000000000000000e5 +257 1 24 39 0.32768000000000000000e5 +257 2 3 33 0.32768000000000000000e5 +257 2 18 32 -0.32768000000000000000e5 +257 2 26 32 0.32768000000000000000e5 +257 3 4 33 0.32768000000000000000e5 +257 3 17 30 -0.65536000000000000000e5 +257 4 17 17 0.65536000000000000000e5 +258 1 2 49 -0.32768000000000000000e5 +258 1 2 54 0.32768000000000000000e5 +258 3 3 32 0.32768000000000000000e5 +259 1 2 55 0.32768000000000000000e5 +259 1 7 54 -0.32768000000000000000e5 +260 1 2 56 0.32768000000000000000e5 +260 1 7 54 -0.65536000000000000000e5 +260 1 22 53 0.32768000000000000000e5 +260 1 23 54 0.32768000000000000000e5 +260 2 26 32 0.32768000000000000000e5 +260 3 6 35 0.65536000000000000000e5 +261 1 1 48 -0.16384000000000000000e5 +261 1 2 49 -0.16384000000000000000e5 +261 1 3 3 0.32768000000000000000e5 +261 1 6 37 -0.16384000000000000000e5 +261 1 8 39 0.32768000000000000000e5 +261 1 23 38 -0.16384000000000000000e5 +261 2 2 32 -0.16384000000000000000e5 +261 2 3 17 0.16384000000000000000e5 +261 2 4 26 -0.16384000000000000000e5 +261 3 1 30 -0.32768000000000000000e5 +261 3 2 3 -0.16384000000000000000e5 +261 3 3 16 -0.16384000000000000000e5 +261 4 1 13 -0.16384000000000000000e5 +262 1 2 5 -0.32768000000000000000e5 +262 1 3 4 0.32768000000000000000e5 +263 1 1 48 0.32768000000000000000e5 +263 1 2 5 0.32768000000000000000e5 +263 1 2 9 0.65536000000000000000e5 +263 1 2 17 0.26214400000000000000e6 +263 1 2 33 0.13107200000000000000e6 +263 1 2 49 0.32768000000000000000e5 +263 1 3 5 0.32768000000000000000e5 +263 1 3 18 0.52428800000000000000e6 +263 1 4 19 0.52428800000000000000e6 +263 1 4 35 0.52428800000000000000e6 +263 1 6 13 -0.13107200000000000000e6 +263 1 6 37 0.32768000000000000000e5 +263 1 11 42 -0.13107200000000000000e6 +263 1 18 25 0.26214400000000000000e6 +263 1 20 27 -0.10485760000000000000e7 +263 1 23 38 0.32768000000000000000e5 +263 2 2 4 0.32768000000000000000e5 +263 2 2 8 0.65536000000000000000e5 +263 2 2 32 0.32768000000000000000e5 +263 2 3 17 -0.32768000000000000000e5 +263 2 4 10 0.13107200000000000000e6 +263 2 4 26 0.32768000000000000000e5 +263 2 6 12 0.26214400000000000000e6 +263 2 8 22 -0.13107200000000000000e6 +263 2 9 23 0.26214400000000000000e6 +263 2 10 24 0.52428800000000000000e6 +263 3 1 30 0.65536000000000000000e5 +263 3 2 3 0.32768000000000000000e5 +263 3 2 15 -0.52428800000000000000e6 +263 3 3 8 0.65536000000000000000e5 +263 3 3 16 0.32768000000000000000e5 +263 3 6 19 0.65536000000000000000e5 +263 3 8 13 -0.52428800000000000000e6 +263 3 9 22 -0.13107200000000000000e6 +263 4 1 13 0.32768000000000000000e5 +263 4 4 8 -0.13107200000000000000e6 +264 1 1 40 0.32768000000000000000e5 +264 1 1 48 -0.65536000000000000000e5 +264 1 2 5 -0.32768000000000000000e5 +264 1 2 9 -0.65536000000000000000e5 +264 1 2 17 -0.26214400000000000000e6 +264 1 2 33 -0.13107200000000000000e6 +264 1 2 49 -0.65536000000000000000e5 +264 1 3 6 0.32768000000000000000e5 +264 1 3 18 -0.52428800000000000000e6 +264 1 3 26 -0.32768000000000000000e5 +264 1 4 19 -0.52428800000000000000e6 +264 1 4 35 -0.52428800000000000000e6 +264 1 5 52 0.13107200000000000000e6 +264 1 6 13 0.13107200000000000000e6 +264 1 8 39 -0.65536000000000000000e5 +264 1 11 42 0.26214400000000000000e6 +264 1 12 43 0.26214400000000000000e6 +264 1 17 48 -0.52428800000000000000e6 +264 1 18 25 -0.26214400000000000000e6 +264 1 20 27 0.10485760000000000000e7 +264 1 23 38 -0.65536000000000000000e5 +264 1 26 41 0.65536000000000000000e5 +264 1 28 43 0.13107200000000000000e6 +264 2 2 4 -0.32768000000000000000e5 +264 2 2 8 -0.65536000000000000000e5 +264 2 2 32 -0.65536000000000000000e5 +264 2 3 5 0.32768000000000000000e5 +264 2 3 9 0.65536000000000000000e5 +264 2 3 17 0.32768000000000000000e5 +264 2 4 10 -0.13107200000000000000e6 +264 2 4 18 -0.32768000000000000000e5 +264 2 6 12 -0.26214400000000000000e6 +264 2 8 22 0.39321600000000000000e6 +264 2 9 23 -0.26214400000000000000e6 +264 2 10 24 -0.52428800000000000000e6 +264 2 12 26 -0.13107200000000000000e6 +264 2 16 30 -0.65536000000000000000e5 +264 3 1 30 -0.65536000000000000000e5 +264 3 2 3 -0.32768000000000000000e5 +264 3 2 15 0.52428800000000000000e6 +264 3 2 31 -0.13107200000000000000e6 +264 3 3 16 -0.32768000000000000000e5 +264 3 4 5 0.32768000000000000000e5 +264 3 4 9 0.65536000000000000000e5 +264 3 4 17 -0.32768000000000000000e5 +264 3 5 10 -0.13107200000000000000e6 +264 3 6 19 -0.65536000000000000000e5 +264 3 8 13 0.52428800000000000000e6 +264 3 9 22 0.13107200000000000000e6 +264 3 14 27 -0.26214400000000000000e6 +264 4 1 13 -0.32768000000000000000e5 +264 4 3 15 -0.65536000000000000000e5 +264 4 4 8 0.13107200000000000000e6 +264 4 4 16 -0.26214400000000000000e6 +264 4 6 18 -0.65536000000000000000e5 +264 4 7 19 -0.13107200000000000000e6 +265 1 1 32 0.65536000000000000000e5 +265 1 1 40 -0.16384000000000000000e5 +265 1 2 5 0.16384000000000000000e5 +265 1 2 9 -0.32768000000000000000e5 +265 1 2 33 -0.65536000000000000000e5 +265 1 3 7 0.32768000000000000000e5 +265 1 3 34 0.13107200000000000000e6 +265 1 7 22 0.32768000000000000000e5 +265 1 7 38 -0.32768000000000000000e5 +265 1 8 23 0.98304000000000000000e5 +265 1 10 41 -0.65536000000000000000e5 +265 1 12 27 -0.13107200000000000000e6 +265 2 1 3 -0.16384000000000000000e5 +265 2 1 7 0.32768000000000000000e5 +265 2 2 16 0.16384000000000000000e5 +265 2 6 20 0.65536000000000000000e5 +265 2 7 21 -0.65536000000000000000e5 +265 3 1 2 -0.16384000000000000000e5 +265 3 3 16 0.16384000000000000000e5 +265 3 4 17 0.16384000000000000000e5 +265 3 6 19 0.32768000000000000000e5 +265 3 7 20 -0.65536000000000000000e5 +265 3 8 21 -0.65536000000000000000e5 +265 4 1 5 -0.32768000000000000000e5 +265 4 1 13 0.16384000000000000000e5 +265 4 2 2 0.32768000000000000000e5 +265 4 2 14 0.32768000000000000000e5 +266 1 2 9 -0.32768000000000000000e5 +266 1 3 8 0.32768000000000000000e5 +267 1 2 9 0.32768000000000000000e5 +267 1 2 17 0.13107200000000000000e6 +267 1 2 33 0.65536000000000000000e5 +267 1 3 9 0.32768000000000000000e5 +267 1 3 18 0.26214400000000000000e6 +267 1 4 19 0.26214400000000000000e6 +267 1 4 35 0.26214400000000000000e6 +267 1 6 13 -0.65536000000000000000e5 +267 1 8 39 0.32768000000000000000e5 +267 1 11 42 -0.65536000000000000000e5 +267 1 18 25 0.13107200000000000000e6 +267 1 20 27 -0.52428800000000000000e6 +267 2 2 8 0.32768000000000000000e5 +267 2 4 10 0.65536000000000000000e5 +267 2 6 12 0.13107200000000000000e6 +267 2 8 22 -0.65536000000000000000e5 +267 2 9 23 0.13107200000000000000e6 +267 2 10 24 0.26214400000000000000e6 +267 3 2 15 -0.26214400000000000000e6 +267 3 3 8 0.32768000000000000000e5 +267 3 6 19 0.32768000000000000000e5 +267 3 8 13 -0.26214400000000000000e6 +267 3 9 22 -0.65536000000000000000e5 +267 4 4 8 -0.65536000000000000000e5 +268 1 3 10 0.32768000000000000000e5 +268 1 8 39 -0.32768000000000000000e5 +268 3 3 8 -0.32768000000000000000e5 +268 3 6 19 -0.32768000000000000000e5 +269 1 3 11 0.32768000000000000000e5 +269 1 8 39 0.32768000000000000000e5 +269 1 10 25 0.32768000000000000000e5 +269 1 10 41 -0.65536000000000000000e5 +269 2 3 9 0.32768000000000000000e5 +269 3 3 8 0.32768000000000000000e5 +269 3 4 9 0.32768000000000000000e5 +269 3 5 10 -0.65536000000000000000e5 +269 3 6 19 0.32768000000000000000e5 +269 3 8 21 -0.65536000000000000000e5 +270 1 1 32 -0.32768000000000000000e5 +270 1 3 12 0.32768000000000000000e5 +270 3 6 7 -0.32768000000000000000e5 +271 1 2 17 0.65536000000000000000e5 +271 1 2 33 0.32768000000000000000e5 +271 1 3 13 0.32768000000000000000e5 +271 1 3 18 0.13107200000000000000e6 +271 1 4 19 0.13107200000000000000e6 +271 1 4 35 0.13107200000000000000e6 +271 1 6 13 -0.32768000000000000000e5 +271 1 11 42 -0.32768000000000000000e5 +271 1 18 25 0.65536000000000000000e5 +271 1 20 27 -0.26214400000000000000e6 +271 2 4 10 0.32768000000000000000e5 +271 2 6 12 0.65536000000000000000e5 +271 2 8 22 -0.32768000000000000000e5 +271 2 9 23 0.65536000000000000000e5 +271 2 10 24 0.13107200000000000000e6 +271 3 2 15 -0.13107200000000000000e6 +271 3 8 13 -0.13107200000000000000e6 +271 3 9 22 -0.32768000000000000000e5 +271 4 4 8 -0.32768000000000000000e5 +272 1 2 33 -0.32768000000000000000e5 +272 1 3 14 0.32768000000000000000e5 +272 1 3 18 -0.65536000000000000000e5 +272 1 4 35 -0.13107200000000000000e6 +272 1 6 13 0.32768000000000000000e5 +272 1 10 41 0.32768000000000000000e5 +272 1 11 42 0.32768000000000000000e5 +272 1 18 25 -0.65536000000000000000e5 +272 1 28 35 0.13107200000000000000e6 +272 2 8 22 0.32768000000000000000e5 +272 2 9 23 -0.65536000000000000000e5 +272 3 5 10 0.32768000000000000000e5 +272 3 8 21 0.32768000000000000000e5 +272 3 9 22 0.32768000000000000000e5 +272 3 11 24 0.13107200000000000000e6 +272 4 4 8 0.32768000000000000000e5 +273 1 3 15 0.32768000000000000000e5 +273 1 10 41 -0.32768000000000000000e5 +273 3 5 10 -0.32768000000000000000e5 +273 3 8 21 -0.32768000000000000000e5 +274 1 2 17 -0.32768000000000000000e5 +274 1 3 16 0.32768000000000000000e5 +275 1 2 17 0.32768000000000000000e5 +275 1 3 17 0.32768000000000000000e5 +275 1 3 18 0.32768000000000000000e5 +275 1 4 19 0.65536000000000000000e5 +275 1 20 27 -0.13107200000000000000e6 +275 1 28 35 0.65536000000000000000e5 +275 2 6 12 0.32768000000000000000e5 +275 2 10 24 0.65536000000000000000e5 +275 3 2 15 -0.65536000000000000000e5 +275 3 8 13 -0.65536000000000000000e5 +275 3 11 24 0.65536000000000000000e5 +276 1 3 19 0.32768000000000000000e5 +276 1 4 19 0.32768000000000000000e5 +276 1 20 27 -0.65536000000000000000e5 +276 1 28 35 0.32768000000000000000e5 +276 2 10 24 0.32768000000000000000e5 +276 3 2 15 -0.32768000000000000000e5 +276 3 8 13 -0.32768000000000000000e5 +276 3 11 24 0.32768000000000000000e5 +277 1 3 20 0.32768000000000000000e5 +277 1 4 19 -0.32768000000000000000e5 +278 1 3 21 0.32768000000000000000e5 +278 1 10 17 -0.16384000000000000000e5 +278 1 20 27 -0.32768000000000000000e5 +278 1 28 35 0.16384000000000000000e5 +278 3 2 15 -0.16384000000000000000e5 +278 3 8 13 -0.16384000000000000000e5 +278 3 11 24 0.16384000000000000000e5 +278 4 6 10 -0.16384000000000000000e5 +279 1 1 24 -0.32768000000000000000e5 +279 1 3 22 0.32768000000000000000e5 +280 1 1 48 -0.32768000000000000000e5 +280 1 2 49 -0.32768000000000000000e5 +280 1 3 23 0.32768000000000000000e5 +280 1 6 37 -0.32768000000000000000e5 +280 1 8 39 0.65536000000000000000e5 +280 1 23 38 -0.32768000000000000000e5 +280 2 2 32 -0.32768000000000000000e5 +280 2 3 17 0.32768000000000000000e5 +280 2 4 26 -0.32768000000000000000e5 +280 3 1 30 -0.65536000000000000000e5 +280 3 3 16 -0.32768000000000000000e5 +280 4 1 13 -0.32768000000000000000e5 +281 1 1 40 -0.32768000000000000000e5 +281 1 3 24 0.32768000000000000000e5 +281 1 7 38 -0.65536000000000000000e5 +281 1 8 23 0.65536000000000000000e5 +281 3 3 16 0.32768000000000000000e5 +281 3 4 17 0.32768000000000000000e5 +281 3 6 19 0.65536000000000000000e5 +281 3 7 20 -0.13107200000000000000e6 +281 4 1 13 0.32768000000000000000e5 +281 4 2 14 0.65536000000000000000e5 +282 1 1 40 0.32768000000000000000e5 +282 1 3 25 0.32768000000000000000e5 +282 1 6 37 0.32768000000000000000e5 +282 1 8 39 -0.65536000000000000000e5 +282 2 4 26 0.32768000000000000000e5 +282 3 4 17 -0.32768000000000000000e5 +283 1 3 27 0.32768000000000000000e5 +283 1 8 23 -0.32768000000000000000e5 +284 1 1 48 -0.16384000000000000000e5 +284 1 2 49 -0.16384000000000000000e5 +284 1 3 28 0.32768000000000000000e5 +284 1 7 38 -0.32768000000000000000e5 +284 1 8 23 0.32768000000000000000e5 +284 1 23 38 -0.16384000000000000000e5 +284 2 2 32 -0.16384000000000000000e5 +284 3 1 30 -0.32768000000000000000e5 +284 3 6 19 0.32768000000000000000e5 +284 3 7 20 -0.65536000000000000000e5 +284 4 2 14 0.32768000000000000000e5 +285 1 3 29 0.32768000000000000000e5 +285 1 8 39 -0.32768000000000000000e5 +285 3 6 19 -0.32768000000000000000e5 +286 1 1 48 0.16384000000000000000e5 +286 1 2 49 0.16384000000000000000e5 +286 1 3 30 0.32768000000000000000e5 +286 1 5 52 -0.65536000000000000000e5 +286 1 8 39 0.32768000000000000000e5 +286 1 10 25 0.32768000000000000000e5 +286 1 10 41 -0.65536000000000000000e5 +286 1 11 42 -0.65536000000000000000e5 +286 1 12 43 -0.13107200000000000000e6 +286 1 17 48 0.26214400000000000000e6 +286 1 23 38 0.16384000000000000000e5 +286 1 26 41 -0.32768000000000000000e5 +286 1 28 43 -0.65536000000000000000e5 +286 2 2 32 0.16384000000000000000e5 +286 2 8 22 -0.13107200000000000000e6 +286 2 12 26 0.65536000000000000000e5 +286 2 16 30 0.32768000000000000000e5 +286 3 2 31 0.65536000000000000000e5 +286 3 6 19 0.32768000000000000000e5 +286 3 8 21 -0.65536000000000000000e5 +286 3 14 27 0.13107200000000000000e6 +286 4 3 15 0.32768000000000000000e5 +286 4 4 16 0.13107200000000000000e6 +286 4 6 18 0.32768000000000000000e5 +286 4 7 19 0.65536000000000000000e5 +287 1 2 33 0.32768000000000000000e5 +287 1 3 31 0.32768000000000000000e5 +287 1 3 34 -0.65536000000000000000e5 +287 1 10 41 0.32768000000000000000e5 +287 2 7 21 0.32768000000000000000e5 +287 3 8 21 0.32768000000000000000e5 +288 1 2 33 -0.32768000000000000000e5 +288 1 3 32 0.32768000000000000000e5 +289 1 3 33 0.32768000000000000000e5 +289 1 10 41 -0.32768000000000000000e5 +289 3 8 21 -0.32768000000000000000e5 +290 1 3 35 0.32768000000000000000e5 +290 1 4 35 0.32768000000000000000e5 +290 1 18 25 0.32768000000000000000e5 +290 1 28 35 -0.65536000000000000000e5 +290 2 9 23 0.32768000000000000000e5 +290 3 11 24 -0.65536000000000000000e5 +291 1 3 36 0.32768000000000000000e5 +291 1 4 19 -0.32768000000000000000e5 +291 3 8 13 0.32768000000000000000e5 +292 1 1 48 -0.32768000000000000000e5 +292 1 2 49 -0.32768000000000000000e5 +292 1 3 37 0.32768000000000000000e5 +292 1 6 37 -0.32768000000000000000e5 +292 1 8 39 0.65536000000000000000e5 +292 1 23 38 -0.32768000000000000000e5 +292 2 2 32 -0.32768000000000000000e5 +292 2 3 17 0.32768000000000000000e5 +292 2 4 26 -0.32768000000000000000e5 +292 3 1 30 -0.65536000000000000000e5 +292 4 1 13 -0.32768000000000000000e5 +293 1 1 40 -0.32768000000000000000e5 +293 1 3 38 0.32768000000000000000e5 +294 1 1 40 0.32768000000000000000e5 +294 1 3 39 0.32768000000000000000e5 +294 1 6 37 0.32768000000000000000e5 +294 1 8 39 -0.65536000000000000000e5 +294 2 4 26 0.32768000000000000000e5 +295 1 3 40 0.32768000000000000000e5 +295 1 6 37 -0.32768000000000000000e5 +296 1 1 48 -0.16384000000000000000e5 +296 1 2 49 -0.16384000000000000000e5 +296 1 3 41 0.32768000000000000000e5 +296 1 23 38 -0.16384000000000000000e5 +296 2 2 32 -0.16384000000000000000e5 +296 3 1 30 -0.32768000000000000000e5 +297 1 3 42 0.32768000000000000000e5 +297 1 8 39 -0.32768000000000000000e5 +298 1 1 48 0.16384000000000000000e5 +298 1 2 49 0.16384000000000000000e5 +298 1 3 43 0.32768000000000000000e5 +298 1 5 52 -0.65536000000000000000e5 +298 1 8 39 0.32768000000000000000e5 +298 1 9 40 0.32768000000000000000e5 +298 1 10 41 -0.65536000000000000000e5 +298 1 11 42 -0.65536000000000000000e5 +298 1 12 43 -0.13107200000000000000e6 +298 1 17 48 0.26214400000000000000e6 +298 1 23 38 0.16384000000000000000e5 +298 1 26 41 -0.32768000000000000000e5 +298 1 28 43 -0.65536000000000000000e5 +298 2 2 32 0.16384000000000000000e5 +298 2 8 22 -0.13107200000000000000e6 +298 2 12 26 0.65536000000000000000e5 +298 2 16 30 0.32768000000000000000e5 +298 3 2 31 0.65536000000000000000e5 +298 3 14 27 0.13107200000000000000e6 +298 4 4 16 0.13107200000000000000e6 +298 4 6 18 0.32768000000000000000e5 +298 4 7 19 0.65536000000000000000e5 +299 1 3 44 0.32768000000000000000e5 +299 1 11 42 -0.32768000000000000000e5 +299 1 12 43 -0.65536000000000000000e5 +299 1 17 48 0.65536000000000000000e5 +299 2 8 22 -0.32768000000000000000e5 +299 2 12 26 0.32768000000000000000e5 +299 3 14 27 0.65536000000000000000e5 +299 4 4 16 0.32768000000000000000e5 +300 1 3 45 0.32768000000000000000e5 +300 1 10 41 -0.32768000000000000000e5 +301 1 3 46 0.32768000000000000000e5 +301 1 12 43 -0.32768000000000000000e5 +302 1 3 47 0.32768000000000000000e5 +302 1 23 38 -0.32768000000000000000e5 +303 1 2 49 -0.32768000000000000000e5 +303 1 3 48 0.32768000000000000000e5 +304 1 3 49 0.32768000000000000000e5 +304 1 24 39 -0.32768000000000000000e5 +305 1 1 48 0.16384000000000000000e5 +305 1 2 49 0.16384000000000000000e5 +305 1 3 50 0.32768000000000000000e5 +305 1 3 51 0.32768000000000000000e5 +305 1 11 42 -0.65536000000000000000e5 +305 1 12 43 -0.13107200000000000000e6 +305 1 17 48 0.13107200000000000000e6 +305 1 23 38 0.16384000000000000000e5 +305 2 2 32 0.16384000000000000000e5 +305 2 8 22 -0.65536000000000000000e5 +305 2 12 26 0.65536000000000000000e5 +305 2 16 30 0.32768000000000000000e5 +305 3 2 31 0.65536000000000000000e5 +305 3 14 27 0.13107200000000000000e6 +305 4 4 16 0.65536000000000000000e5 +306 1 3 52 0.32768000000000000000e5 +306 1 5 52 0.32768000000000000000e5 +306 1 17 48 -0.65536000000000000000e5 +306 1 28 43 0.32768000000000000000e5 +306 2 8 22 0.32768000000000000000e5 +306 4 4 16 -0.32768000000000000000e5 +306 4 7 19 -0.32768000000000000000e5 +307 1 2 49 -0.32768000000000000000e5 +307 1 3 53 0.32768000000000000000e5 +307 3 3 32 0.32768000000000000000e5 +308 1 3 54 0.32768000000000000000e5 +308 1 24 39 -0.32768000000000000000e5 +308 2 3 33 -0.32768000000000000000e5 +308 2 18 32 0.32768000000000000000e5 +308 3 3 32 -0.32768000000000000000e5 +308 3 4 33 -0.32768000000000000000e5 +308 3 17 30 0.65536000000000000000e5 +309 1 1 48 0.16384000000000000000e5 +309 1 2 49 0.16384000000000000000e5 +309 1 3 50 0.32768000000000000000e5 +309 1 3 55 0.32768000000000000000e5 +309 1 11 42 -0.65536000000000000000e5 +309 1 12 43 -0.13107200000000000000e6 +309 1 17 48 0.13107200000000000000e6 +309 1 23 38 0.16384000000000000000e5 +309 2 2 32 0.16384000000000000000e5 +309 2 8 22 -0.65536000000000000000e5 +309 2 12 26 0.65536000000000000000e5 +309 2 16 30 0.32768000000000000000e5 +309 3 2 31 0.65536000000000000000e5 +309 3 14 27 0.13107200000000000000e6 +309 3 17 30 0.32768000000000000000e5 +309 4 4 16 0.65536000000000000000e5 +310 1 3 56 0.32768000000000000000e5 +310 1 23 54 -0.32768000000000000000e5 +311 1 1 48 0.16384000000000000000e5 +311 1 2 5 0.16384000000000000000e5 +311 1 2 9 0.32768000000000000000e5 +311 1 2 17 0.13107200000000000000e6 +311 1 2 33 0.65536000000000000000e5 +311 1 2 49 0.16384000000000000000e5 +311 1 3 18 0.26214400000000000000e6 +311 1 4 4 0.32768000000000000000e5 +311 1 4 19 0.26214400000000000000e6 +311 1 4 35 0.26214400000000000000e6 +311 1 6 13 -0.65536000000000000000e5 +311 1 6 37 0.16384000000000000000e5 +311 1 11 42 -0.65536000000000000000e5 +311 1 18 25 0.13107200000000000000e6 +311 1 20 27 -0.52428800000000000000e6 +311 1 23 38 0.16384000000000000000e5 +311 2 2 4 0.16384000000000000000e5 +311 2 2 8 0.32768000000000000000e5 +311 2 2 32 0.16384000000000000000e5 +311 2 3 17 -0.16384000000000000000e5 +311 2 4 10 0.65536000000000000000e5 +311 2 4 26 0.16384000000000000000e5 +311 2 6 12 0.13107200000000000000e6 +311 2 8 22 -0.65536000000000000000e5 +311 2 9 23 0.13107200000000000000e6 +311 2 10 24 0.26214400000000000000e6 +311 3 1 30 0.32768000000000000000e5 +311 3 2 3 0.16384000000000000000e5 +311 3 2 15 -0.26214400000000000000e6 +311 3 3 8 0.32768000000000000000e5 +311 3 3 16 0.16384000000000000000e5 +311 3 6 19 0.32768000000000000000e5 +311 3 8 13 -0.26214400000000000000e6 +311 3 9 22 -0.65536000000000000000e5 +311 4 1 13 0.16384000000000000000e5 +311 4 4 8 -0.65536000000000000000e5 +312 1 1 40 0.32768000000000000000e5 +312 1 1 48 -0.65536000000000000000e5 +312 1 2 5 -0.32768000000000000000e5 +312 1 2 9 -0.65536000000000000000e5 +312 1 2 17 -0.26214400000000000000e6 +312 1 2 33 -0.13107200000000000000e6 +312 1 2 49 -0.65536000000000000000e5 +312 1 3 18 -0.52428800000000000000e6 +312 1 3 26 -0.32768000000000000000e5 +312 1 4 5 0.32768000000000000000e5 +312 1 4 19 -0.52428800000000000000e6 +312 1 4 35 -0.52428800000000000000e6 +312 1 5 52 0.13107200000000000000e6 +312 1 6 13 0.13107200000000000000e6 +312 1 8 39 -0.65536000000000000000e5 +312 1 11 42 0.26214400000000000000e6 +312 1 12 43 0.26214400000000000000e6 +312 1 17 48 -0.52428800000000000000e6 +312 1 18 25 -0.26214400000000000000e6 +312 1 20 27 0.10485760000000000000e7 +312 1 23 38 -0.65536000000000000000e5 +312 1 26 41 0.65536000000000000000e5 +312 1 28 43 0.13107200000000000000e6 +312 2 2 4 -0.32768000000000000000e5 +312 2 2 8 -0.65536000000000000000e5 +312 2 2 32 -0.65536000000000000000e5 +312 2 3 5 0.32768000000000000000e5 +312 2 3 9 0.65536000000000000000e5 +312 2 3 17 0.32768000000000000000e5 +312 2 4 10 -0.13107200000000000000e6 +312 2 4 18 -0.32768000000000000000e5 +312 2 6 12 -0.26214400000000000000e6 +312 2 8 22 0.39321600000000000000e6 +312 2 9 23 -0.26214400000000000000e6 +312 2 10 24 -0.52428800000000000000e6 +312 2 12 26 -0.13107200000000000000e6 +312 2 16 30 -0.65536000000000000000e5 +312 3 1 30 -0.65536000000000000000e5 +312 3 2 3 -0.32768000000000000000e5 +312 3 2 15 0.52428800000000000000e6 +312 3 2 31 -0.13107200000000000000e6 +312 3 3 16 -0.32768000000000000000e5 +312 3 4 5 0.32768000000000000000e5 +312 3 4 9 0.65536000000000000000e5 +312 3 4 17 -0.32768000000000000000e5 +312 3 5 10 -0.13107200000000000000e6 +312 3 6 19 -0.65536000000000000000e5 +312 3 8 13 0.52428800000000000000e6 +312 3 9 22 0.13107200000000000000e6 +312 3 14 27 -0.26214400000000000000e6 +312 4 1 13 -0.32768000000000000000e5 +312 4 3 15 -0.65536000000000000000e5 +312 4 4 8 0.13107200000000000000e6 +312 4 4 16 -0.26214400000000000000e6 +312 4 6 18 -0.65536000000000000000e5 +312 4 7 19 -0.13107200000000000000e6 +313 1 1 40 -0.32768000000000000000e5 +313 1 1 48 0.32768000000000000000e5 +313 1 2 49 0.32768000000000000000e5 +313 1 3 26 0.32768000000000000000e5 +313 1 4 6 0.32768000000000000000e5 +313 1 5 52 -0.13107200000000000000e6 +313 1 6 37 -0.32768000000000000000e5 +313 1 8 39 0.13107200000000000000e6 +313 1 10 25 0.65536000000000000000e5 +313 1 10 41 -0.13107200000000000000e6 +313 1 11 42 -0.13107200000000000000e6 +313 1 12 43 -0.26214400000000000000e6 +313 1 17 48 0.52428800000000000000e6 +313 1 23 38 0.32768000000000000000e5 +313 1 26 41 -0.65536000000000000000e5 +313 1 28 43 -0.13107200000000000000e6 +313 2 2 32 0.32768000000000000000e5 +313 2 4 18 0.32768000000000000000e5 +313 2 4 26 -0.32768000000000000000e5 +313 2 8 22 -0.26214400000000000000e6 +313 2 12 26 0.13107200000000000000e6 +313 2 16 30 0.65536000000000000000e5 +313 3 2 31 0.13107200000000000000e6 +313 3 4 5 -0.32768000000000000000e5 +313 3 4 17 0.32768000000000000000e5 +313 3 6 19 0.65536000000000000000e5 +313 3 8 21 -0.13107200000000000000e6 +313 3 14 27 0.26214400000000000000e6 +313 4 3 15 0.65536000000000000000e5 +313 4 4 16 0.26214400000000000000e6 +313 4 6 18 0.65536000000000000000e5 +313 4 7 19 0.13107200000000000000e6 +314 1 2 9 -0.32768000000000000000e5 +314 1 4 7 0.32768000000000000000e5 +315 1 2 9 0.32768000000000000000e5 +315 1 2 17 0.13107200000000000000e6 +315 1 2 33 0.65536000000000000000e5 +315 1 3 18 0.26214400000000000000e6 +315 1 4 8 0.32768000000000000000e5 +315 1 4 19 0.26214400000000000000e6 +315 1 4 35 0.26214400000000000000e6 +315 1 6 13 -0.65536000000000000000e5 +315 1 8 39 0.32768000000000000000e5 +315 1 11 42 -0.65536000000000000000e5 +315 1 18 25 0.13107200000000000000e6 +315 1 20 27 -0.52428800000000000000e6 +315 2 2 8 0.32768000000000000000e5 +315 2 4 10 0.65536000000000000000e5 +315 2 6 12 0.13107200000000000000e6 +315 2 8 22 -0.65536000000000000000e5 +315 2 9 23 0.13107200000000000000e6 +315 2 10 24 0.26214400000000000000e6 +315 3 2 15 -0.26214400000000000000e6 +315 3 3 8 0.32768000000000000000e5 +315 3 6 19 0.32768000000000000000e5 +315 3 8 13 -0.26214400000000000000e6 +315 3 9 22 -0.65536000000000000000e5 +315 4 4 8 -0.65536000000000000000e5 +316 1 4 9 0.32768000000000000000e5 +316 1 8 39 -0.32768000000000000000e5 +316 3 3 8 -0.32768000000000000000e5 +316 3 6 19 -0.32768000000000000000e5 +317 1 4 10 0.32768000000000000000e5 +317 1 8 39 0.32768000000000000000e5 +317 1 10 25 0.32768000000000000000e5 +317 1 10 41 -0.65536000000000000000e5 +317 2 3 9 0.32768000000000000000e5 +317 3 3 8 0.32768000000000000000e5 +317 3 4 9 0.32768000000000000000e5 +317 3 5 10 -0.65536000000000000000e5 +317 3 6 19 0.32768000000000000000e5 +317 3 8 21 -0.65536000000000000000e5 +318 1 4 11 0.32768000000000000000e5 +318 1 10 25 -0.32768000000000000000e5 +318 3 4 9 -0.32768000000000000000e5 +319 1 2 17 0.65536000000000000000e5 +319 1 2 33 0.32768000000000000000e5 +319 1 3 18 0.13107200000000000000e6 +319 1 4 12 0.32768000000000000000e5 +319 1 4 19 0.13107200000000000000e6 +319 1 4 35 0.13107200000000000000e6 +319 1 6 13 -0.32768000000000000000e5 +319 1 11 42 -0.32768000000000000000e5 +319 1 18 25 0.65536000000000000000e5 +319 1 20 27 -0.26214400000000000000e6 +319 2 4 10 0.32768000000000000000e5 +319 2 6 12 0.65536000000000000000e5 +319 2 8 22 -0.32768000000000000000e5 +319 2 9 23 0.65536000000000000000e5 +319 2 10 24 0.13107200000000000000e6 +319 3 2 15 -0.13107200000000000000e6 +319 3 8 13 -0.13107200000000000000e6 +319 3 9 22 -0.32768000000000000000e5 +319 4 4 8 -0.32768000000000000000e5 +320 1 2 33 -0.32768000000000000000e5 +320 1 3 18 -0.65536000000000000000e5 +320 1 4 13 0.32768000000000000000e5 +320 1 4 35 -0.13107200000000000000e6 +320 1 6 13 0.32768000000000000000e5 +320 1 10 41 0.32768000000000000000e5 +320 1 11 42 0.32768000000000000000e5 +320 1 18 25 -0.65536000000000000000e5 +320 1 28 35 0.13107200000000000000e6 +320 2 8 22 0.32768000000000000000e5 +320 2 9 23 -0.65536000000000000000e5 +320 3 5 10 0.32768000000000000000e5 +320 3 8 21 0.32768000000000000000e5 +320 3 9 22 0.32768000000000000000e5 +320 3 11 24 0.13107200000000000000e6 +320 4 4 8 0.32768000000000000000e5 +321 1 4 14 0.32768000000000000000e5 +321 1 10 41 -0.32768000000000000000e5 +321 3 5 10 -0.32768000000000000000e5 +321 3 8 21 -0.32768000000000000000e5 +322 1 4 15 0.32768000000000000000e5 +322 1 6 13 -0.32768000000000000000e5 +323 1 2 17 0.32768000000000000000e5 +323 1 3 18 0.32768000000000000000e5 +323 1 4 16 0.32768000000000000000e5 +323 1 4 19 0.65536000000000000000e5 +323 1 20 27 -0.13107200000000000000e6 +323 1 28 35 0.65536000000000000000e5 +323 2 6 12 0.32768000000000000000e5 +323 2 10 24 0.65536000000000000000e5 +323 3 2 15 -0.65536000000000000000e5 +323 3 8 13 -0.65536000000000000000e5 +323 3 11 24 0.65536000000000000000e5 +324 1 3 18 -0.32768000000000000000e5 +324 1 4 17 0.32768000000000000000e5 +325 1 3 18 0.32768000000000000000e5 +325 1 4 18 0.32768000000000000000e5 +325 1 10 17 -0.65536000000000000000e5 +325 1 11 14 0.32768000000000000000e5 +325 2 9 11 0.32768000000000000000e5 +326 1 4 20 0.32768000000000000000e5 +326 1 10 17 -0.32768000000000000000e5 +327 1 4 19 -0.16384000000000000000e5 +327 1 4 21 0.32768000000000000000e5 +327 1 5 20 -0.16384000000000000000e5 +327 1 10 17 -0.16384000000000000000e5 +327 2 8 14 -0.16384000000000000000e5 +328 1 1 48 -0.32768000000000000000e5 +328 1 2 49 -0.32768000000000000000e5 +328 1 4 22 0.32768000000000000000e5 +328 1 6 37 -0.32768000000000000000e5 +328 1 8 39 0.65536000000000000000e5 +328 1 23 38 -0.32768000000000000000e5 +328 2 2 32 -0.32768000000000000000e5 +328 2 3 17 0.32768000000000000000e5 +328 2 4 26 -0.32768000000000000000e5 +328 3 1 30 -0.65536000000000000000e5 +328 3 3 16 -0.32768000000000000000e5 +328 4 1 13 -0.32768000000000000000e5 +329 1 1 40 -0.32768000000000000000e5 +329 1 4 23 0.32768000000000000000e5 +329 1 7 38 -0.65536000000000000000e5 +329 1 8 23 0.65536000000000000000e5 +329 3 3 16 0.32768000000000000000e5 +329 3 4 17 0.32768000000000000000e5 +329 3 6 19 0.65536000000000000000e5 +329 3 7 20 -0.13107200000000000000e6 +329 4 1 13 0.32768000000000000000e5 +329 4 2 14 0.65536000000000000000e5 +330 1 1 40 0.32768000000000000000e5 +330 1 4 24 0.32768000000000000000e5 +330 1 6 37 0.32768000000000000000e5 +330 1 8 39 -0.65536000000000000000e5 +330 2 4 26 0.32768000000000000000e5 +330 3 4 17 -0.32768000000000000000e5 +331 1 3 26 -0.32768000000000000000e5 +331 1 4 25 0.32768000000000000000e5 +332 1 1 40 -0.32768000000000000000e5 +332 1 1 48 0.32768000000000000000e5 +332 1 2 49 0.32768000000000000000e5 +332 1 3 26 0.32768000000000000000e5 +332 1 4 26 0.32768000000000000000e5 +332 1 5 52 -0.13107200000000000000e6 +332 1 6 37 -0.32768000000000000000e5 +332 1 8 39 0.13107200000000000000e6 +332 1 10 25 0.65536000000000000000e5 +332 1 10 41 -0.13107200000000000000e6 +332 1 11 42 -0.13107200000000000000e6 +332 1 12 43 -0.26214400000000000000e6 +332 1 17 48 0.52428800000000000000e6 +332 1 23 38 0.32768000000000000000e5 +332 1 26 41 -0.65536000000000000000e5 +332 1 28 43 -0.13107200000000000000e6 +332 2 2 32 0.32768000000000000000e5 +332 2 4 18 0.32768000000000000000e5 +332 2 4 26 -0.32768000000000000000e5 +332 2 8 22 -0.26214400000000000000e6 +332 2 12 26 0.13107200000000000000e6 +332 2 16 30 0.65536000000000000000e5 +332 3 2 31 0.13107200000000000000e6 +332 3 4 17 0.32768000000000000000e5 +332 3 6 19 0.65536000000000000000e5 +332 3 8 21 -0.13107200000000000000e6 +332 3 14 27 0.26214400000000000000e6 +332 4 3 15 0.65536000000000000000e5 +332 4 4 16 0.26214400000000000000e6 +332 4 6 18 0.65536000000000000000e5 +332 4 7 19 0.13107200000000000000e6 +333 1 1 48 -0.16384000000000000000e5 +333 1 2 49 -0.16384000000000000000e5 +333 1 4 27 0.32768000000000000000e5 +333 1 7 38 -0.32768000000000000000e5 +333 1 8 23 0.32768000000000000000e5 +333 1 23 38 -0.16384000000000000000e5 +333 2 2 32 -0.16384000000000000000e5 +333 3 1 30 -0.32768000000000000000e5 +333 3 6 19 0.32768000000000000000e5 +333 3 7 20 -0.65536000000000000000e5 +333 4 2 14 0.32768000000000000000e5 +334 1 4 28 0.32768000000000000000e5 +334 1 8 39 -0.32768000000000000000e5 +334 3 6 19 -0.32768000000000000000e5 +335 1 1 48 0.16384000000000000000e5 +335 1 2 49 0.16384000000000000000e5 +335 1 4 29 0.32768000000000000000e5 +335 1 5 52 -0.65536000000000000000e5 +335 1 8 39 0.32768000000000000000e5 +335 1 10 25 0.32768000000000000000e5 +335 1 10 41 -0.65536000000000000000e5 +335 1 11 42 -0.65536000000000000000e5 +335 1 12 43 -0.13107200000000000000e6 +335 1 17 48 0.26214400000000000000e6 +335 1 23 38 0.16384000000000000000e5 +335 1 26 41 -0.32768000000000000000e5 +335 1 28 43 -0.65536000000000000000e5 +335 2 2 32 0.16384000000000000000e5 +335 2 8 22 -0.13107200000000000000e6 +335 2 12 26 0.65536000000000000000e5 +335 2 16 30 0.32768000000000000000e5 +335 3 2 31 0.65536000000000000000e5 +335 3 6 19 0.32768000000000000000e5 +335 3 8 21 -0.65536000000000000000e5 +335 3 14 27 0.13107200000000000000e6 +335 4 3 15 0.32768000000000000000e5 +335 4 4 16 0.13107200000000000000e6 +335 4 6 18 0.32768000000000000000e5 +335 4 7 19 0.65536000000000000000e5 +336 1 4 30 0.32768000000000000000e5 +336 1 10 25 -0.32768000000000000000e5 +337 1 2 33 -0.32768000000000000000e5 +337 1 4 31 0.32768000000000000000e5 +338 1 4 32 0.32768000000000000000e5 +338 1 10 41 -0.32768000000000000000e5 +338 3 8 21 -0.32768000000000000000e5 +339 1 4 33 0.32768000000000000000e5 +339 1 4 35 -0.65536000000000000000e5 +339 1 10 41 0.32768000000000000000e5 +339 1 11 42 0.32768000000000000000e5 +339 2 8 22 0.32768000000000000000e5 +339 3 8 21 0.32768000000000000000e5 +339 3 9 22 0.32768000000000000000e5 +340 1 4 34 0.32768000000000000000e5 +340 1 4 35 0.32768000000000000000e5 +340 1 18 25 0.32768000000000000000e5 +340 1 28 35 -0.65536000000000000000e5 +340 2 9 23 0.32768000000000000000e5 +340 3 11 24 -0.65536000000000000000e5 +341 1 4 36 0.32768000000000000000e5 +341 1 28 35 -0.32768000000000000000e5 +341 3 11 24 -0.32768000000000000000e5 +342 1 1 40 -0.32768000000000000000e5 +342 1 4 37 0.32768000000000000000e5 +343 1 1 40 0.32768000000000000000e5 +343 1 4 38 0.32768000000000000000e5 +343 1 6 37 0.32768000000000000000e5 +343 1 8 39 -0.65536000000000000000e5 +343 2 4 26 0.32768000000000000000e5 +344 1 4 39 0.32768000000000000000e5 +344 1 6 37 -0.32768000000000000000e5 +345 1 1 40 -0.32768000000000000000e5 +345 1 1 48 0.32768000000000000000e5 +345 1 2 49 0.32768000000000000000e5 +345 1 3 26 0.32768000000000000000e5 +345 1 4 40 0.32768000000000000000e5 +345 1 5 52 -0.13107200000000000000e6 +345 1 6 37 -0.32768000000000000000e5 +345 1 8 39 0.13107200000000000000e6 +345 1 10 25 0.65536000000000000000e5 +345 1 10 41 -0.13107200000000000000e6 +345 1 11 42 -0.13107200000000000000e6 +345 1 12 43 -0.26214400000000000000e6 +345 1 17 48 0.52428800000000000000e6 +345 1 23 38 0.32768000000000000000e5 +345 1 26 41 -0.65536000000000000000e5 +345 1 28 43 -0.13107200000000000000e6 +345 2 2 32 0.32768000000000000000e5 +345 2 4 18 0.32768000000000000000e5 +345 2 4 26 -0.32768000000000000000e5 +345 2 8 22 -0.26214400000000000000e6 +345 2 12 26 0.13107200000000000000e6 +345 2 16 30 0.65536000000000000000e5 +345 3 2 31 0.13107200000000000000e6 +345 3 4 17 0.32768000000000000000e5 +345 3 5 18 0.32768000000000000000e5 +345 3 6 19 0.65536000000000000000e5 +345 3 8 21 -0.13107200000000000000e6 +345 3 14 27 0.26214400000000000000e6 +345 4 3 15 0.65536000000000000000e5 +345 4 4 16 0.26214400000000000000e6 +345 4 6 18 0.65536000000000000000e5 +345 4 7 19 0.13107200000000000000e6 +346 1 4 41 0.32768000000000000000e5 +346 1 8 39 -0.32768000000000000000e5 +347 1 1 48 0.16384000000000000000e5 +347 1 2 49 0.16384000000000000000e5 +347 1 4 42 0.32768000000000000000e5 +347 1 5 52 -0.65536000000000000000e5 +347 1 8 39 0.32768000000000000000e5 +347 1 9 40 0.32768000000000000000e5 +347 1 10 41 -0.65536000000000000000e5 +347 1 11 42 -0.65536000000000000000e5 +347 1 12 43 -0.13107200000000000000e6 +347 1 17 48 0.26214400000000000000e6 +347 1 23 38 0.16384000000000000000e5 +347 1 26 41 -0.32768000000000000000e5 +347 1 28 43 -0.65536000000000000000e5 +347 2 2 32 0.16384000000000000000e5 +347 2 8 22 -0.13107200000000000000e6 +347 2 12 26 0.65536000000000000000e5 +347 2 16 30 0.32768000000000000000e5 +347 3 2 31 0.65536000000000000000e5 +347 3 14 27 0.13107200000000000000e6 +347 4 4 16 0.13107200000000000000e6 +347 4 6 18 0.32768000000000000000e5 +347 4 7 19 0.65536000000000000000e5 +348 1 4 43 0.32768000000000000000e5 +348 1 9 40 -0.32768000000000000000e5 +349 1 4 44 0.32768000000000000000e5 +349 1 10 41 -0.32768000000000000000e5 +350 1 4 45 0.32768000000000000000e5 +350 1 10 41 0.32768000000000000000e5 +350 1 11 42 0.32768000000000000000e5 +350 1 17 48 -0.65536000000000000000e5 +350 2 8 22 0.32768000000000000000e5 +350 3 14 27 -0.65536000000000000000e5 +350 4 4 16 -0.32768000000000000000e5 +351 1 4 46 0.32768000000000000000e5 +351 1 17 48 -0.32768000000000000000e5 +351 3 14 27 -0.32768000000000000000e5 +352 1 2 49 -0.32768000000000000000e5 +352 1 4 47 0.32768000000000000000e5 +353 1 4 48 0.32768000000000000000e5 +353 1 24 39 -0.32768000000000000000e5 +354 1 1 48 0.32768000000000000000e5 +354 1 2 49 0.65536000000000000000e5 +354 1 3 50 0.65536000000000000000e5 +354 1 4 49 0.32768000000000000000e5 +354 1 11 42 -0.13107200000000000000e6 +354 1 12 43 -0.26214400000000000000e6 +354 1 17 48 0.26214400000000000000e6 +354 1 23 38 0.32768000000000000000e5 +354 1 24 39 0.32768000000000000000e5 +354 2 2 32 0.32768000000000000000e5 +354 2 3 33 0.32768000000000000000e5 +354 2 8 22 -0.13107200000000000000e6 +354 2 12 26 0.13107200000000000000e6 +354 2 16 30 0.65536000000000000000e5 +354 3 2 31 0.13107200000000000000e6 +354 3 14 27 0.26214400000000000000e6 +354 4 4 16 0.13107200000000000000e6 +355 1 1 48 0.16384000000000000000e5 +355 1 2 49 0.16384000000000000000e5 +355 1 3 50 0.32768000000000000000e5 +355 1 4 50 0.32768000000000000000e5 +355 1 11 42 -0.65536000000000000000e5 +355 1 12 43 -0.13107200000000000000e6 +355 1 17 48 0.13107200000000000000e6 +355 1 23 38 0.16384000000000000000e5 +355 2 2 32 0.16384000000000000000e5 +355 2 8 22 -0.65536000000000000000e5 +355 2 12 26 0.65536000000000000000e5 +355 2 16 30 0.32768000000000000000e5 +355 3 2 31 0.65536000000000000000e5 +355 3 14 27 0.13107200000000000000e6 +355 4 4 16 0.65536000000000000000e5 +356 1 4 51 0.32768000000000000000e5 +356 1 26 41 -0.32768000000000000000e5 +357 1 4 52 0.32768000000000000000e5 +357 1 28 43 -0.32768000000000000000e5 +358 1 4 53 0.32768000000000000000e5 +358 1 24 39 -0.32768000000000000000e5 +358 2 3 33 -0.32768000000000000000e5 +358 2 18 32 0.32768000000000000000e5 +358 3 3 32 -0.32768000000000000000e5 +358 3 4 33 -0.32768000000000000000e5 +358 3 17 30 0.65536000000000000000e5 +359 1 1 48 0.32768000000000000000e5 +359 1 2 49 0.65536000000000000000e5 +359 1 3 50 0.65536000000000000000e5 +359 1 4 54 0.32768000000000000000e5 +359 1 11 42 -0.13107200000000000000e6 +359 1 12 43 -0.26214400000000000000e6 +359 1 17 48 0.26214400000000000000e6 +359 1 23 38 0.32768000000000000000e5 +359 1 24 39 0.32768000000000000000e5 +359 2 2 32 0.32768000000000000000e5 +359 2 3 33 0.32768000000000000000e5 +359 2 8 22 -0.13107200000000000000e6 +359 2 12 26 0.13107200000000000000e6 +359 2 16 30 0.65536000000000000000e5 +359 3 2 31 0.13107200000000000000e6 +359 3 4 33 0.32768000000000000000e5 +359 3 14 27 0.26214400000000000000e6 +359 4 4 16 0.13107200000000000000e6 +360 1 4 55 0.32768000000000000000e5 +360 1 26 41 -0.32768000000000000000e5 +360 3 22 27 0.32768000000000000000e5 +361 1 1 48 0.32768000000000000000e5 +361 1 2 49 0.65536000000000000000e5 +361 1 3 50 0.65536000000000000000e5 +361 1 4 56 0.32768000000000000000e5 +361 1 11 42 -0.13107200000000000000e6 +361 1 12 43 -0.26214400000000000000e6 +361 1 17 48 0.26214400000000000000e6 +361 1 23 38 0.32768000000000000000e5 +361 1 24 39 0.32768000000000000000e5 +361 2 2 32 0.32768000000000000000e5 +361 2 3 33 0.32768000000000000000e5 +361 2 8 22 -0.13107200000000000000e6 +361 2 12 26 0.13107200000000000000e6 +361 2 16 30 0.65536000000000000000e5 +361 3 2 31 0.13107200000000000000e6 +361 3 4 33 0.32768000000000000000e5 +361 3 14 27 0.26214400000000000000e6 +361 3 19 32 0.32768000000000000000e5 +361 4 4 16 0.13107200000000000000e6 +362 1 1 40 -0.16384000000000000000e5 +362 1 1 48 0.16384000000000000000e5 +362 1 2 49 0.16384000000000000000e5 +362 1 3 26 0.16384000000000000000e5 +362 1 5 5 0.32768000000000000000e5 +362 1 5 52 -0.65536000000000000000e5 +362 1 6 37 -0.16384000000000000000e5 +362 1 8 39 0.65536000000000000000e5 +362 1 10 25 0.32768000000000000000e5 +362 1 10 41 -0.65536000000000000000e5 +362 1 11 42 -0.65536000000000000000e5 +362 1 12 43 -0.13107200000000000000e6 +362 1 17 48 0.26214400000000000000e6 +362 1 23 38 0.16384000000000000000e5 +362 1 26 41 -0.32768000000000000000e5 +362 1 28 43 -0.65536000000000000000e5 +362 2 2 32 0.16384000000000000000e5 +362 2 4 18 0.16384000000000000000e5 +362 2 4 26 -0.16384000000000000000e5 +362 2 8 22 -0.13107200000000000000e6 +362 2 12 26 0.65536000000000000000e5 +362 2 16 30 0.32768000000000000000e5 +362 3 2 31 0.65536000000000000000e5 +362 3 4 5 -0.16384000000000000000e5 +362 3 4 17 0.16384000000000000000e5 +362 3 6 19 0.32768000000000000000e5 +362 3 8 21 -0.65536000000000000000e5 +362 3 14 27 0.13107200000000000000e6 +362 4 3 15 0.32768000000000000000e5 +362 4 4 16 0.13107200000000000000e6 +362 4 6 18 0.32768000000000000000e5 +362 4 7 19 0.65536000000000000000e5 +363 1 1 40 -0.32768000000000000000e5 +363 1 1 48 0.65536000000000000000e5 +363 1 2 5 0.32768000000000000000e5 +363 1 2 9 0.65536000000000000000e5 +363 1 2 17 0.26214400000000000000e6 +363 1 2 33 0.13107200000000000000e6 +363 1 2 49 0.65536000000000000000e5 +363 1 3 18 0.52428800000000000000e6 +363 1 4 19 0.52428800000000000000e6 +363 1 4 35 0.52428800000000000000e6 +363 1 5 6 0.32768000000000000000e5 +363 1 5 52 -0.13107200000000000000e6 +363 1 6 13 -0.13107200000000000000e6 +363 1 6 25 -0.32768000000000000000e5 +363 1 8 39 0.65536000000000000000e5 +363 1 11 42 -0.26214400000000000000e6 +363 1 12 43 -0.26214400000000000000e6 +363 1 17 48 0.52428800000000000000e6 +363 1 18 25 0.26214400000000000000e6 +363 1 20 27 -0.10485760000000000000e7 +363 1 23 38 0.65536000000000000000e5 +363 1 26 41 -0.65536000000000000000e5 +363 1 28 43 -0.13107200000000000000e6 +363 2 2 4 0.32768000000000000000e5 +363 2 2 8 0.65536000000000000000e5 +363 2 2 32 0.65536000000000000000e5 +363 2 3 5 -0.32768000000000000000e5 +363 2 3 9 -0.65536000000000000000e5 +363 2 3 17 -0.32768000000000000000e5 +363 2 4 10 0.13107200000000000000e6 +363 2 4 18 0.32768000000000000000e5 +363 2 6 12 0.26214400000000000000e6 +363 2 8 22 -0.39321600000000000000e6 +363 2 9 23 0.26214400000000000000e6 +363 2 10 24 0.52428800000000000000e6 +363 2 12 26 0.13107200000000000000e6 +363 2 16 30 0.65536000000000000000e5 +363 3 1 30 0.65536000000000000000e5 +363 3 2 3 0.32768000000000000000e5 +363 3 2 15 -0.52428800000000000000e6 +363 3 2 31 0.13107200000000000000e6 +363 3 3 16 0.32768000000000000000e5 +363 3 4 9 -0.13107200000000000000e6 +363 3 4 17 0.32768000000000000000e5 +363 3 5 10 0.13107200000000000000e6 +363 3 6 19 0.65536000000000000000e5 +363 3 8 13 -0.52428800000000000000e6 +363 3 9 22 -0.13107200000000000000e6 +363 3 14 27 0.26214400000000000000e6 +363 4 1 13 0.32768000000000000000e5 +363 4 3 15 0.65536000000000000000e5 +363 4 4 4 0.65536000000000000000e5 +363 4 4 8 -0.13107200000000000000e6 +363 4 4 16 0.26214400000000000000e6 +363 4 6 18 0.65536000000000000000e5 +363 4 7 19 0.13107200000000000000e6 +364 1 2 9 0.32768000000000000000e5 +364 1 2 17 0.13107200000000000000e6 +364 1 2 33 0.65536000000000000000e5 +364 1 3 18 0.26214400000000000000e6 +364 1 4 19 0.26214400000000000000e6 +364 1 4 35 0.26214400000000000000e6 +364 1 5 7 0.32768000000000000000e5 +364 1 6 13 -0.65536000000000000000e5 +364 1 8 39 0.32768000000000000000e5 +364 1 11 42 -0.65536000000000000000e5 +364 1 18 25 0.13107200000000000000e6 +364 1 20 27 -0.52428800000000000000e6 +364 2 2 8 0.32768000000000000000e5 +364 2 4 10 0.65536000000000000000e5 +364 2 6 12 0.13107200000000000000e6 +364 2 8 22 -0.65536000000000000000e5 +364 2 9 23 0.13107200000000000000e6 +364 2 10 24 0.26214400000000000000e6 +364 3 2 15 -0.26214400000000000000e6 +364 3 3 8 0.32768000000000000000e5 +364 3 6 19 0.32768000000000000000e5 +364 3 8 13 -0.26214400000000000000e6 +364 3 9 22 -0.65536000000000000000e5 +364 4 4 8 -0.65536000000000000000e5 +365 1 5 8 0.32768000000000000000e5 +365 1 8 39 -0.32768000000000000000e5 +365 3 3 8 -0.32768000000000000000e5 +365 3 6 19 -0.32768000000000000000e5 +366 1 5 9 0.32768000000000000000e5 +366 1 8 39 0.32768000000000000000e5 +366 1 10 25 0.32768000000000000000e5 +366 1 10 41 -0.65536000000000000000e5 +366 2 3 9 0.32768000000000000000e5 +366 3 3 8 0.32768000000000000000e5 +366 3 4 9 0.32768000000000000000e5 +366 3 5 10 -0.65536000000000000000e5 +366 3 6 19 0.32768000000000000000e5 +366 3 8 21 -0.65536000000000000000e5 +367 1 5 10 0.32768000000000000000e5 +367 1 10 25 -0.32768000000000000000e5 +367 3 4 9 -0.32768000000000000000e5 +368 1 3 18 0.13107200000000000000e6 +368 1 5 11 0.32768000000000000000e5 +368 1 6 11 0.32768000000000000000e5 +368 1 6 13 0.65536000000000000000e5 +368 1 10 17 -0.26214400000000000000e6 +368 1 10 25 0.32768000000000000000e5 +368 1 10 41 0.65536000000000000000e5 +368 1 11 14 0.13107200000000000000e6 +368 2 5 9 0.32768000000000000000e5 +368 2 5 11 0.65536000000000000000e5 +368 2 9 11 0.13107200000000000000e6 +368 3 4 9 0.32768000000000000000e5 +368 3 5 10 0.65536000000000000000e5 +368 3 8 21 0.65536000000000000000e5 +369 1 2 33 -0.32768000000000000000e5 +369 1 3 18 -0.65536000000000000000e5 +369 1 4 35 -0.13107200000000000000e6 +369 1 5 12 0.32768000000000000000e5 +369 1 6 13 0.32768000000000000000e5 +369 1 10 41 0.32768000000000000000e5 +369 1 11 42 0.32768000000000000000e5 +369 1 18 25 -0.65536000000000000000e5 +369 1 28 35 0.13107200000000000000e6 +369 2 8 22 0.32768000000000000000e5 +369 2 9 23 -0.65536000000000000000e5 +369 3 5 10 0.32768000000000000000e5 +369 3 8 21 0.32768000000000000000e5 +369 3 9 22 0.32768000000000000000e5 +369 3 11 24 0.13107200000000000000e6 +369 4 4 8 0.32768000000000000000e5 +370 1 5 13 0.32768000000000000000e5 +370 1 10 41 -0.32768000000000000000e5 +370 3 5 10 -0.32768000000000000000e5 +370 3 8 21 -0.32768000000000000000e5 +371 1 5 14 0.32768000000000000000e5 +371 1 6 13 -0.32768000000000000000e5 +372 1 3 18 0.65536000000000000000e5 +372 1 5 15 0.32768000000000000000e5 +372 1 6 13 0.32768000000000000000e5 +372 1 10 17 -0.13107200000000000000e6 +372 1 10 41 0.32768000000000000000e5 +372 1 11 14 0.65536000000000000000e5 +372 2 5 11 0.32768000000000000000e5 +372 2 9 11 0.65536000000000000000e5 +372 3 5 10 0.32768000000000000000e5 +372 3 8 21 0.32768000000000000000e5 +373 1 3 18 -0.32768000000000000000e5 +373 1 5 16 0.32768000000000000000e5 +374 1 3 18 0.32768000000000000000e5 +374 1 5 17 0.32768000000000000000e5 +374 1 10 17 -0.65536000000000000000e5 +374 1 11 14 0.32768000000000000000e5 +374 2 9 11 0.32768000000000000000e5 +375 1 5 18 0.32768000000000000000e5 +375 1 11 14 -0.32768000000000000000e5 +376 1 5 19 0.32768000000000000000e5 +376 1 10 17 -0.32768000000000000000e5 +377 1 4 19 0.16384000000000000000e5 +377 1 5 20 0.16384000000000000000e5 +377 1 5 21 0.32768000000000000000e5 +377 1 6 21 0.32768000000000000000e5 +377 1 10 17 0.16384000000000000000e5 +377 1 10 21 -0.65536000000000000000e5 +377 2 8 14 0.16384000000000000000e5 +377 2 9 15 0.32768000000000000000e5 +378 1 1 40 -0.32768000000000000000e5 +378 1 5 22 0.32768000000000000000e5 +378 1 7 38 -0.65536000000000000000e5 +378 1 8 23 0.65536000000000000000e5 +378 3 3 16 0.32768000000000000000e5 +378 3 4 17 0.32768000000000000000e5 +378 3 6 19 0.65536000000000000000e5 +378 3 7 20 -0.13107200000000000000e6 +378 4 1 13 0.32768000000000000000e5 +378 4 2 14 0.65536000000000000000e5 +379 1 1 40 0.32768000000000000000e5 +379 1 5 23 0.32768000000000000000e5 +379 1 6 37 0.32768000000000000000e5 +379 1 8 39 -0.65536000000000000000e5 +379 2 4 26 0.32768000000000000000e5 +379 3 4 17 -0.32768000000000000000e5 +380 1 3 26 -0.32768000000000000000e5 +380 1 5 24 0.32768000000000000000e5 +381 1 1 40 -0.32768000000000000000e5 +381 1 1 48 0.32768000000000000000e5 +381 1 2 49 0.32768000000000000000e5 +381 1 3 26 0.32768000000000000000e5 +381 1 5 25 0.32768000000000000000e5 +381 1 5 52 -0.13107200000000000000e6 +381 1 6 37 -0.32768000000000000000e5 +381 1 8 39 0.13107200000000000000e6 +381 1 10 25 0.65536000000000000000e5 +381 1 10 41 -0.13107200000000000000e6 +381 1 11 42 -0.13107200000000000000e6 +381 1 12 43 -0.26214400000000000000e6 +381 1 17 48 0.52428800000000000000e6 +381 1 23 38 0.32768000000000000000e5 +381 1 26 41 -0.65536000000000000000e5 +381 1 28 43 -0.13107200000000000000e6 +381 2 2 32 0.32768000000000000000e5 +381 2 4 18 0.32768000000000000000e5 +381 2 4 26 -0.32768000000000000000e5 +381 2 8 22 -0.26214400000000000000e6 +381 2 12 26 0.13107200000000000000e6 +381 2 16 30 0.65536000000000000000e5 +381 3 2 31 0.13107200000000000000e6 +381 3 4 17 0.32768000000000000000e5 +381 3 6 19 0.65536000000000000000e5 +381 3 8 21 -0.13107200000000000000e6 +381 3 14 27 0.26214400000000000000e6 +381 4 3 15 0.65536000000000000000e5 +381 4 4 16 0.26214400000000000000e6 +381 4 6 18 0.65536000000000000000e5 +381 4 7 19 0.13107200000000000000e6 +382 1 5 26 0.32768000000000000000e5 +382 1 6 25 -0.32768000000000000000e5 +383 1 5 27 0.32768000000000000000e5 +383 1 8 39 -0.32768000000000000000e5 +383 3 6 19 -0.32768000000000000000e5 +384 1 1 48 0.16384000000000000000e5 +384 1 2 49 0.16384000000000000000e5 +384 1 5 28 0.32768000000000000000e5 +384 1 5 52 -0.65536000000000000000e5 +384 1 8 39 0.32768000000000000000e5 +384 1 10 25 0.32768000000000000000e5 +384 1 10 41 -0.65536000000000000000e5 +384 1 11 42 -0.65536000000000000000e5 +384 1 12 43 -0.13107200000000000000e6 +384 1 17 48 0.26214400000000000000e6 +384 1 23 38 0.16384000000000000000e5 +384 1 26 41 -0.32768000000000000000e5 +384 1 28 43 -0.65536000000000000000e5 +384 2 2 32 0.16384000000000000000e5 +384 2 8 22 -0.13107200000000000000e6 +384 2 12 26 0.65536000000000000000e5 +384 2 16 30 0.32768000000000000000e5 +384 3 2 31 0.65536000000000000000e5 +384 3 6 19 0.32768000000000000000e5 +384 3 8 21 -0.65536000000000000000e5 +384 3 14 27 0.13107200000000000000e6 +384 4 3 15 0.32768000000000000000e5 +384 4 4 16 0.13107200000000000000e6 +384 4 6 18 0.32768000000000000000e5 +384 4 7 19 0.65536000000000000000e5 +385 1 5 29 0.32768000000000000000e5 +385 1 10 25 -0.32768000000000000000e5 +386 1 5 30 0.32768000000000000000e5 +386 1 6 29 -0.32768000000000000000e5 +387 1 5 31 0.32768000000000000000e5 +387 1 10 41 -0.32768000000000000000e5 +387 3 8 21 -0.32768000000000000000e5 +388 1 4 35 -0.65536000000000000000e5 +388 1 5 32 0.32768000000000000000e5 +388 1 10 41 0.32768000000000000000e5 +388 1 11 42 0.32768000000000000000e5 +388 2 8 22 0.32768000000000000000e5 +388 3 8 21 0.32768000000000000000e5 +388 3 9 22 0.32768000000000000000e5 +389 1 5 33 0.32768000000000000000e5 +389 1 11 42 -0.32768000000000000000e5 +389 3 9 22 -0.32768000000000000000e5 +390 1 4 35 -0.32768000000000000000e5 +390 1 5 34 0.32768000000000000000e5 +391 1 5 35 0.32768000000000000000e5 +391 1 18 25 -0.32768000000000000000e5 +392 1 1 40 0.32768000000000000000e5 +392 1 5 37 0.32768000000000000000e5 +392 1 6 37 0.32768000000000000000e5 +392 1 8 39 -0.65536000000000000000e5 +392 2 4 26 0.32768000000000000000e5 +393 1 5 38 0.32768000000000000000e5 +393 1 6 37 -0.32768000000000000000e5 +394 1 1 40 -0.32768000000000000000e5 +394 1 1 48 0.32768000000000000000e5 +394 1 2 49 0.32768000000000000000e5 +394 1 3 26 0.32768000000000000000e5 +394 1 5 39 0.32768000000000000000e5 +394 1 5 52 -0.13107200000000000000e6 +394 1 6 37 -0.32768000000000000000e5 +394 1 8 39 0.13107200000000000000e6 +394 1 10 25 0.65536000000000000000e5 +394 1 10 41 -0.13107200000000000000e6 +394 1 11 42 -0.13107200000000000000e6 +394 1 12 43 -0.26214400000000000000e6 +394 1 17 48 0.52428800000000000000e6 +394 1 23 38 0.32768000000000000000e5 +394 1 26 41 -0.65536000000000000000e5 +394 1 28 43 -0.13107200000000000000e6 +394 2 2 32 0.32768000000000000000e5 +394 2 4 18 0.32768000000000000000e5 +394 2 4 26 -0.32768000000000000000e5 +394 2 8 22 -0.26214400000000000000e6 +394 2 12 26 0.13107200000000000000e6 +394 2 16 30 0.65536000000000000000e5 +394 3 2 31 0.13107200000000000000e6 +394 3 4 17 0.32768000000000000000e5 +394 3 5 18 0.32768000000000000000e5 +394 3 6 19 0.65536000000000000000e5 +394 3 8 21 -0.13107200000000000000e6 +394 3 14 27 0.26214400000000000000e6 +394 4 3 15 0.65536000000000000000e5 +394 4 4 16 0.26214400000000000000e6 +394 4 6 18 0.65536000000000000000e5 +394 4 7 19 0.13107200000000000000e6 +395 1 1 40 0.32768000000000000000e5 +395 1 1 48 -0.32768000000000000000e5 +395 1 2 49 -0.32768000000000000000e5 +395 1 3 26 -0.32768000000000000000e5 +395 1 5 40 0.32768000000000000000e5 +395 1 5 52 0.13107200000000000000e6 +395 1 6 37 0.65536000000000000000e5 +395 1 8 39 -0.13107200000000000000e6 +395 1 9 40 -0.65536000000000000000e5 +395 1 10 25 -0.65536000000000000000e5 +395 1 10 41 0.13107200000000000000e6 +395 1 11 42 0.13107200000000000000e6 +395 1 12 43 0.26214400000000000000e6 +395 1 17 48 -0.52428800000000000000e6 +395 1 23 38 -0.32768000000000000000e5 +395 1 26 41 0.65536000000000000000e5 +395 1 28 43 0.13107200000000000000e6 +395 2 2 32 -0.32768000000000000000e5 +395 2 4 18 -0.32768000000000000000e5 +395 2 4 26 0.32768000000000000000e5 +395 2 5 27 0.32768000000000000000e5 +395 2 8 22 0.26214400000000000000e6 +395 2 12 26 -0.13107200000000000000e6 +395 2 16 30 -0.65536000000000000000e5 +395 3 2 31 -0.13107200000000000000e6 +395 3 4 17 -0.32768000000000000000e5 +395 3 5 18 -0.32768000000000000000e5 +395 3 6 19 -0.65536000000000000000e5 +395 3 8 21 0.13107200000000000000e6 +395 3 14 27 -0.26214400000000000000e6 +395 4 3 15 -0.65536000000000000000e5 +395 4 4 16 -0.26214400000000000000e6 +395 4 6 18 -0.65536000000000000000e5 +395 4 7 19 -0.13107200000000000000e6 +396 1 1 48 0.16384000000000000000e5 +396 1 2 49 0.16384000000000000000e5 +396 1 5 41 0.32768000000000000000e5 +396 1 5 52 -0.65536000000000000000e5 +396 1 8 39 0.32768000000000000000e5 +396 1 9 40 0.32768000000000000000e5 +396 1 10 41 -0.65536000000000000000e5 +396 1 11 42 -0.65536000000000000000e5 +396 1 12 43 -0.13107200000000000000e6 +396 1 17 48 0.26214400000000000000e6 +396 1 23 38 0.16384000000000000000e5 +396 1 26 41 -0.32768000000000000000e5 +396 1 28 43 -0.65536000000000000000e5 +396 2 2 32 0.16384000000000000000e5 +396 2 8 22 -0.13107200000000000000e6 +396 2 12 26 0.65536000000000000000e5 +396 2 16 30 0.32768000000000000000e5 +396 3 2 31 0.65536000000000000000e5 +396 3 14 27 0.13107200000000000000e6 +396 4 4 16 0.13107200000000000000e6 +396 4 6 18 0.32768000000000000000e5 +396 4 7 19 0.65536000000000000000e5 +397 1 5 42 0.32768000000000000000e5 +397 1 9 40 -0.32768000000000000000e5 +398 1 5 43 0.32768000000000000000e5 +398 1 26 29 -0.32768000000000000000e5 +399 1 5 44 0.32768000000000000000e5 +399 1 10 41 0.32768000000000000000e5 +399 1 11 42 0.32768000000000000000e5 +399 1 17 48 -0.65536000000000000000e5 +399 2 8 22 0.32768000000000000000e5 +399 3 14 27 -0.65536000000000000000e5 +399 4 4 16 -0.32768000000000000000e5 +400 1 5 45 0.32768000000000000000e5 +400 1 11 42 -0.32768000000000000000e5 +401 1 5 46 0.32768000000000000000e5 +401 1 18 25 -0.32768000000000000000e5 +401 3 14 19 0.32768000000000000000e5 +402 1 5 47 0.32768000000000000000e5 +402 1 24 39 -0.32768000000000000000e5 +403 1 1 48 0.32768000000000000000e5 +403 1 2 49 0.65536000000000000000e5 +403 1 3 50 0.65536000000000000000e5 +403 1 5 48 0.32768000000000000000e5 +403 1 11 42 -0.13107200000000000000e6 +403 1 12 43 -0.26214400000000000000e6 +403 1 17 48 0.26214400000000000000e6 +403 1 23 38 0.32768000000000000000e5 +403 1 24 39 0.32768000000000000000e5 +403 2 2 32 0.32768000000000000000e5 +403 2 3 33 0.32768000000000000000e5 +403 2 8 22 -0.13107200000000000000e6 +403 2 12 26 0.13107200000000000000e6 +403 2 16 30 0.65536000000000000000e5 +403 3 2 31 0.13107200000000000000e6 +403 3 14 27 0.26214400000000000000e6 +403 4 4 16 0.13107200000000000000e6 +404 1 5 49 0.32768000000000000000e5 +404 1 25 40 -0.32768000000000000000e5 +405 1 5 50 0.32768000000000000000e5 +405 1 26 41 -0.32768000000000000000e5 +406 1 1 48 -0.16384000000000000000e5 +406 1 2 49 -0.16384000000000000000e5 +406 1 3 50 -0.32768000000000000000e5 +406 1 5 51 0.32768000000000000000e5 +406 1 11 42 0.65536000000000000000e5 +406 1 12 43 0.13107200000000000000e6 +406 1 17 48 -0.13107200000000000000e6 +406 1 23 38 -0.16384000000000000000e5 +406 1 26 41 0.32768000000000000000e5 +406 1 28 43 -0.65536000000000000000e5 +406 2 2 32 -0.16384000000000000000e5 +406 2 4 34 0.32768000000000000000e5 +406 2 8 22 0.65536000000000000000e5 +406 2 12 26 -0.65536000000000000000e5 +406 2 16 30 -0.32768000000000000000e5 +406 3 2 31 -0.65536000000000000000e5 +406 3 14 27 -0.13107200000000000000e6 +406 4 4 16 -0.65536000000000000000e5 +407 1 1 48 0.32768000000000000000e5 +407 1 2 49 0.65536000000000000000e5 +407 1 3 50 0.65536000000000000000e5 +407 1 5 53 0.32768000000000000000e5 +407 1 11 42 -0.13107200000000000000e6 +407 1 12 43 -0.26214400000000000000e6 +407 1 17 48 0.26214400000000000000e6 +407 1 23 38 0.32768000000000000000e5 +407 1 24 39 0.32768000000000000000e5 +407 2 2 32 0.32768000000000000000e5 +407 2 3 33 0.32768000000000000000e5 +407 2 8 22 -0.13107200000000000000e6 +407 2 12 26 0.13107200000000000000e6 +407 2 16 30 0.65536000000000000000e5 +407 3 2 31 0.13107200000000000000e6 +407 3 4 33 0.32768000000000000000e5 +407 3 14 27 0.26214400000000000000e6 +407 4 4 16 0.13107200000000000000e6 +408 1 5 54 0.32768000000000000000e5 +408 1 6 53 -0.32768000000000000000e5 +409 1 1 48 -0.16384000000000000000e5 +409 1 2 49 -0.16384000000000000000e5 +409 1 3 50 -0.32768000000000000000e5 +409 1 5 55 0.32768000000000000000e5 +409 1 11 42 0.65536000000000000000e5 +409 1 12 43 0.13107200000000000000e6 +409 1 17 48 -0.13107200000000000000e6 +409 1 23 38 -0.16384000000000000000e5 +409 1 26 41 0.32768000000000000000e5 +409 1 28 43 -0.65536000000000000000e5 +409 2 2 32 -0.16384000000000000000e5 +409 2 4 34 0.32768000000000000000e5 +409 2 8 22 0.65536000000000000000e5 +409 2 12 26 -0.65536000000000000000e5 +409 2 16 30 -0.32768000000000000000e5 +409 3 2 31 -0.65536000000000000000e5 +409 3 5 34 0.32768000000000000000e5 +409 3 14 27 -0.13107200000000000000e6 +409 4 4 16 -0.65536000000000000000e5 +410 1 5 56 0.32768000000000000000e5 +410 1 25 56 -0.32768000000000000000e5 +410 3 28 33 -0.32768000000000000000e5 +411 1 1 40 0.32768000000000000000e5 +411 1 1 48 -0.49152000000000000000e5 +411 1 2 5 -0.16384000000000000000e5 +411 1 2 9 -0.32768000000000000000e5 +411 1 2 17 -0.13107200000000000000e6 +411 1 2 33 -0.65536000000000000000e5 +411 1 2 49 -0.49152000000000000000e5 +411 1 3 18 -0.13107200000000000000e6 +411 1 3 26 -0.16384000000000000000e5 +411 1 4 19 -0.26214400000000000000e6 +411 1 4 35 -0.26214400000000000000e6 +411 1 5 52 0.13107200000000000000e6 +411 1 6 6 0.32768000000000000000e5 +411 1 6 11 0.32768000000000000000e5 +411 1 6 13 0.13107200000000000000e6 +411 1 6 25 0.16384000000000000000e5 +411 1 6 37 0.16384000000000000000e5 +411 1 8 39 -0.98304000000000000000e5 +411 1 10 17 -0.26214400000000000000e6 +411 1 10 41 0.13107200000000000000e6 +411 1 11 14 0.13107200000000000000e6 +411 1 11 42 0.19660800000000000000e6 +411 1 12 43 0.26214400000000000000e6 +411 1 17 48 -0.52428800000000000000e6 +411 1 18 25 -0.13107200000000000000e6 +411 1 20 27 0.52428800000000000000e6 +411 1 23 38 -0.49152000000000000000e5 +411 1 26 41 0.65536000000000000000e5 +411 1 28 43 0.13107200000000000000e6 +411 2 2 4 -0.16384000000000000000e5 +411 2 2 8 -0.32768000000000000000e5 +411 2 2 32 -0.49152000000000000000e5 +411 2 3 5 0.16384000000000000000e5 +411 2 3 9 0.32768000000000000000e5 +411 2 3 17 0.16384000000000000000e5 +411 2 4 10 -0.65536000000000000000e5 +411 2 4 18 -0.32768000000000000000e5 +411 2 4 26 0.16384000000000000000e5 +411 2 5 5 0.32768000000000000000e5 +411 2 5 9 0.32768000000000000000e5 +411 2 5 11 0.65536000000000000000e5 +411 2 6 12 -0.13107200000000000000e6 +411 2 8 22 0.32768000000000000000e6 +411 2 9 11 0.13107200000000000000e6 +411 2 9 23 -0.13107200000000000000e6 +411 2 10 24 -0.26214400000000000000e6 +411 2 12 26 -0.13107200000000000000e6 +411 2 16 30 -0.65536000000000000000e5 +411 3 1 30 -0.32768000000000000000e5 +411 3 2 3 -0.16384000000000000000e5 +411 3 2 15 0.26214400000000000000e6 +411 3 2 31 -0.13107200000000000000e6 +411 3 3 16 -0.16384000000000000000e5 +411 3 4 5 0.16384000000000000000e5 +411 3 4 9 0.98304000000000000000e5 +411 3 4 17 -0.32768000000000000000e5 +411 3 6 19 -0.65536000000000000000e5 +411 3 8 13 0.26214400000000000000e6 +411 3 8 21 0.13107200000000000000e6 +411 3 9 22 0.65536000000000000000e5 +411 3 14 27 -0.26214400000000000000e6 +411 4 1 13 -0.16384000000000000000e5 +411 4 3 15 -0.65536000000000000000e5 +411 4 4 4 -0.32768000000000000000e5 +411 4 4 8 0.65536000000000000000e5 +411 4 4 16 -0.26214400000000000000e6 +411 4 6 18 -0.65536000000000000000e5 +411 4 7 19 -0.13107200000000000000e6 +412 1 6 7 0.32768000000000000000e5 +412 1 8 39 -0.32768000000000000000e5 +412 3 3 8 -0.32768000000000000000e5 +412 3 6 19 -0.32768000000000000000e5 +413 1 6 8 0.32768000000000000000e5 +413 1 8 39 0.32768000000000000000e5 +413 1 10 25 0.32768000000000000000e5 +413 1 10 41 -0.65536000000000000000e5 +413 2 3 9 0.32768000000000000000e5 +413 3 3 8 0.32768000000000000000e5 +413 3 4 9 0.32768000000000000000e5 +413 3 5 10 -0.65536000000000000000e5 +413 3 6 19 0.32768000000000000000e5 +413 3 8 21 -0.65536000000000000000e5 +414 1 6 9 0.32768000000000000000e5 +414 1 10 25 -0.32768000000000000000e5 +414 3 4 9 -0.32768000000000000000e5 +415 1 3 18 0.13107200000000000000e6 +415 1 6 10 0.32768000000000000000e5 +415 1 6 11 0.32768000000000000000e5 +415 1 6 13 0.65536000000000000000e5 +415 1 10 17 -0.26214400000000000000e6 +415 1 10 25 0.32768000000000000000e5 +415 1 10 41 0.65536000000000000000e5 +415 1 11 14 0.13107200000000000000e6 +415 2 5 9 0.32768000000000000000e5 +415 2 5 11 0.65536000000000000000e5 +415 2 9 11 0.13107200000000000000e6 +415 3 4 9 0.32768000000000000000e5 +415 3 5 10 0.65536000000000000000e5 +415 3 8 21 0.65536000000000000000e5 +416 1 6 12 0.32768000000000000000e5 +416 1 10 41 -0.32768000000000000000e5 +416 3 5 10 -0.32768000000000000000e5 +416 3 8 21 -0.32768000000000000000e5 +417 1 3 18 0.65536000000000000000e5 +417 1 6 13 0.32768000000000000000e5 +417 1 6 14 0.32768000000000000000e5 +417 1 10 17 -0.13107200000000000000e6 +417 1 10 41 0.32768000000000000000e5 +417 1 11 14 0.65536000000000000000e5 +417 2 5 11 0.32768000000000000000e5 +417 2 9 11 0.65536000000000000000e5 +417 3 5 10 0.32768000000000000000e5 +417 3 8 21 0.32768000000000000000e5 +418 1 3 18 -0.65536000000000000000e5 +418 1 6 15 0.32768000000000000000e5 +418 1 10 17 0.13107200000000000000e6 +418 1 10 41 -0.32768000000000000000e5 +418 1 11 14 -0.13107200000000000000e6 +418 2 5 11 -0.32768000000000000000e5 +418 2 9 9 0.65536000000000000000e5 +418 2 9 11 -0.65536000000000000000e5 +418 3 5 10 -0.32768000000000000000e5 +418 3 8 21 -0.32768000000000000000e5 +419 1 3 18 0.32768000000000000000e5 +419 1 6 16 0.32768000000000000000e5 +419 1 10 17 -0.65536000000000000000e5 +419 1 11 14 0.32768000000000000000e5 +419 2 9 11 0.32768000000000000000e5 +420 1 6 17 0.32768000000000000000e5 +420 1 11 14 -0.32768000000000000000e5 +421 1 3 18 -0.32768000000000000000e5 +421 1 5 20 -0.65536000000000000000e5 +421 1 6 18 0.32768000000000000000e5 +421 1 10 17 0.65536000000000000000e5 +421 2 9 11 -0.32768000000000000000e5 +421 2 9 12 0.32768000000000000000e5 +422 1 5 20 -0.32768000000000000000e5 +422 1 6 19 0.32768000000000000000e5 +423 1 6 20 0.32768000000000000000e5 +423 1 11 18 -0.32768000000000000000e5 +424 1 1 40 0.32768000000000000000e5 +424 1 6 22 0.32768000000000000000e5 +424 1 6 37 0.32768000000000000000e5 +424 1 8 39 -0.65536000000000000000e5 +424 2 4 26 0.32768000000000000000e5 +424 3 4 17 -0.32768000000000000000e5 +425 1 3 26 -0.32768000000000000000e5 +425 1 6 23 0.32768000000000000000e5 +426 1 1 40 -0.32768000000000000000e5 +426 1 1 48 0.32768000000000000000e5 +426 1 2 49 0.32768000000000000000e5 +426 1 3 26 0.32768000000000000000e5 +426 1 5 52 -0.13107200000000000000e6 +426 1 6 24 0.32768000000000000000e5 +426 1 6 37 -0.32768000000000000000e5 +426 1 8 39 0.13107200000000000000e6 +426 1 10 25 0.65536000000000000000e5 +426 1 10 41 -0.13107200000000000000e6 +426 1 11 42 -0.13107200000000000000e6 +426 1 12 43 -0.26214400000000000000e6 +426 1 17 48 0.52428800000000000000e6 +426 1 23 38 0.32768000000000000000e5 +426 1 26 41 -0.65536000000000000000e5 +426 1 28 43 -0.13107200000000000000e6 +426 2 2 32 0.32768000000000000000e5 +426 2 4 18 0.32768000000000000000e5 +426 2 4 26 -0.32768000000000000000e5 +426 2 8 22 -0.26214400000000000000e6 +426 2 12 26 0.13107200000000000000e6 +426 2 16 30 0.65536000000000000000e5 +426 3 2 31 0.13107200000000000000e6 +426 3 4 17 0.32768000000000000000e5 +426 3 6 19 0.65536000000000000000e5 +426 3 8 21 -0.13107200000000000000e6 +426 3 14 27 0.26214400000000000000e6 +426 4 3 15 0.65536000000000000000e5 +426 4 4 16 0.26214400000000000000e6 +426 4 6 18 0.65536000000000000000e5 +426 4 7 19 0.13107200000000000000e6 +427 1 1 40 0.32768000000000000000e5 +427 1 1 48 -0.32768000000000000000e5 +427 1 2 49 -0.32768000000000000000e5 +427 1 3 26 -0.32768000000000000000e5 +427 1 5 52 0.13107200000000000000e6 +427 1 6 25 0.32768000000000000000e5 +427 1 6 26 0.32768000000000000000e5 +427 1 6 29 -0.65536000000000000000e5 +427 1 6 37 0.32768000000000000000e5 +427 1 8 39 -0.13107200000000000000e6 +427 1 10 25 -0.65536000000000000000e5 +427 1 10 41 0.13107200000000000000e6 +427 1 11 42 0.13107200000000000000e6 +427 1 12 43 0.26214400000000000000e6 +427 1 17 48 -0.52428800000000000000e6 +427 1 23 38 -0.32768000000000000000e5 +427 1 26 41 0.65536000000000000000e5 +427 1 28 43 0.13107200000000000000e6 +427 2 2 32 -0.32768000000000000000e5 +427 2 4 18 -0.32768000000000000000e5 +427 2 4 26 0.32768000000000000000e5 +427 2 5 19 0.32768000000000000000e5 +427 2 8 22 0.26214400000000000000e6 +427 2 12 26 -0.13107200000000000000e6 +427 2 16 30 -0.65536000000000000000e5 +427 3 2 31 -0.13107200000000000000e6 +427 3 4 17 -0.32768000000000000000e5 +427 3 6 19 -0.65536000000000000000e5 +427 3 8 21 0.13107200000000000000e6 +427 3 14 27 -0.26214400000000000000e6 +427 4 3 15 -0.65536000000000000000e5 +427 4 4 16 -0.26214400000000000000e6 +427 4 6 18 -0.65536000000000000000e5 +427 4 7 19 -0.13107200000000000000e6 +428 1 1 48 0.16384000000000000000e5 +428 1 2 49 0.16384000000000000000e5 +428 1 5 52 -0.65536000000000000000e5 +428 1 6 27 0.32768000000000000000e5 +428 1 8 39 0.32768000000000000000e5 +428 1 10 25 0.32768000000000000000e5 +428 1 10 41 -0.65536000000000000000e5 +428 1 11 42 -0.65536000000000000000e5 +428 1 12 43 -0.13107200000000000000e6 +428 1 17 48 0.26214400000000000000e6 +428 1 23 38 0.16384000000000000000e5 +428 1 26 41 -0.32768000000000000000e5 +428 1 28 43 -0.65536000000000000000e5 +428 2 2 32 0.16384000000000000000e5 +428 2 8 22 -0.13107200000000000000e6 +428 2 12 26 0.65536000000000000000e5 +428 2 16 30 0.32768000000000000000e5 +428 3 2 31 0.65536000000000000000e5 +428 3 6 19 0.32768000000000000000e5 +428 3 8 21 -0.65536000000000000000e5 +428 3 14 27 0.13107200000000000000e6 +428 4 3 15 0.32768000000000000000e5 +428 4 4 16 0.13107200000000000000e6 +428 4 6 18 0.32768000000000000000e5 +428 4 7 19 0.65536000000000000000e5 +429 1 6 28 0.32768000000000000000e5 +429 1 10 25 -0.32768000000000000000e5 +430 1 6 30 0.32768000000000000000e5 +430 1 11 26 -0.32768000000000000000e5 +431 1 4 35 -0.65536000000000000000e5 +431 1 6 31 0.32768000000000000000e5 +431 1 10 41 0.32768000000000000000e5 +431 1 11 42 0.32768000000000000000e5 +431 2 8 22 0.32768000000000000000e5 +431 3 8 21 0.32768000000000000000e5 +431 3 9 22 0.32768000000000000000e5 +432 1 6 32 0.32768000000000000000e5 +432 1 11 42 -0.32768000000000000000e5 +432 3 9 22 -0.32768000000000000000e5 +433 1 6 33 0.32768000000000000000e5 +433 1 11 30 -0.32768000000000000000e5 +434 1 6 34 0.32768000000000000000e5 +434 1 18 25 -0.32768000000000000000e5 +435 1 6 35 0.32768000000000000000e5 +435 1 15 30 -0.32768000000000000000e5 +436 1 5 36 0.32768000000000000000e5 +436 1 6 36 0.32768000000000000000e5 +436 1 28 35 0.32768000000000000000e5 +436 1 29 36 -0.65536000000000000000e5 +436 2 9 25 0.32768000000000000000e5 +436 3 11 24 0.32768000000000000000e5 +436 3 12 25 -0.65536000000000000000e5 +437 1 1 40 -0.32768000000000000000e5 +437 1 1 48 0.32768000000000000000e5 +437 1 2 49 0.32768000000000000000e5 +437 1 3 26 0.32768000000000000000e5 +437 1 5 52 -0.13107200000000000000e6 +437 1 6 37 -0.32768000000000000000e5 +437 1 6 38 0.32768000000000000000e5 +437 1 8 39 0.13107200000000000000e6 +437 1 10 25 0.65536000000000000000e5 +437 1 10 41 -0.13107200000000000000e6 +437 1 11 42 -0.13107200000000000000e6 +437 1 12 43 -0.26214400000000000000e6 +437 1 17 48 0.52428800000000000000e6 +437 1 23 38 0.32768000000000000000e5 +437 1 26 41 -0.65536000000000000000e5 +437 1 28 43 -0.13107200000000000000e6 +437 2 2 32 0.32768000000000000000e5 +437 2 4 18 0.32768000000000000000e5 +437 2 4 26 -0.32768000000000000000e5 +437 2 8 22 -0.26214400000000000000e6 +437 2 12 26 0.13107200000000000000e6 +437 2 16 30 0.65536000000000000000e5 +437 3 2 31 0.13107200000000000000e6 +437 3 4 17 0.32768000000000000000e5 +437 3 5 18 0.32768000000000000000e5 +437 3 6 19 0.65536000000000000000e5 +437 3 8 21 -0.13107200000000000000e6 +437 3 14 27 0.26214400000000000000e6 +437 4 3 15 0.65536000000000000000e5 +437 4 4 16 0.26214400000000000000e6 +437 4 6 18 0.65536000000000000000e5 +437 4 7 19 0.13107200000000000000e6 +438 1 1 40 0.32768000000000000000e5 +438 1 1 48 -0.32768000000000000000e5 +438 1 2 49 -0.32768000000000000000e5 +438 1 3 26 -0.32768000000000000000e5 +438 1 5 52 0.13107200000000000000e6 +438 1 6 37 0.65536000000000000000e5 +438 1 6 39 0.32768000000000000000e5 +438 1 8 39 -0.13107200000000000000e6 +438 1 9 40 -0.65536000000000000000e5 +438 1 10 25 -0.65536000000000000000e5 +438 1 10 41 0.13107200000000000000e6 +438 1 11 42 0.13107200000000000000e6 +438 1 12 43 0.26214400000000000000e6 +438 1 17 48 -0.52428800000000000000e6 +438 1 23 38 -0.32768000000000000000e5 +438 1 26 41 0.65536000000000000000e5 +438 1 28 43 0.13107200000000000000e6 +438 2 2 32 -0.32768000000000000000e5 +438 2 4 18 -0.32768000000000000000e5 +438 2 4 26 0.32768000000000000000e5 +438 2 5 27 0.32768000000000000000e5 +438 2 8 22 0.26214400000000000000e6 +438 2 12 26 -0.13107200000000000000e6 +438 2 16 30 -0.65536000000000000000e5 +438 3 2 31 -0.13107200000000000000e6 +438 3 4 17 -0.32768000000000000000e5 +438 3 5 18 -0.32768000000000000000e5 +438 3 6 19 -0.65536000000000000000e5 +438 3 8 21 0.13107200000000000000e6 +438 3 14 27 -0.26214400000000000000e6 +438 4 3 15 -0.65536000000000000000e5 +438 4 4 16 -0.26214400000000000000e6 +438 4 6 18 -0.65536000000000000000e5 +438 4 7 19 -0.13107200000000000000e6 +439 1 6 37 -0.32768000000000000000e5 +439 1 6 40 0.32768000000000000000e5 +439 1 9 40 0.65536000000000000000e5 +439 1 26 29 -0.65536000000000000000e5 +439 2 5 27 -0.32768000000000000000e5 +439 2 19 19 0.65536000000000000000e5 +440 1 6 41 0.32768000000000000000e5 +440 1 9 40 -0.32768000000000000000e5 +441 1 6 42 0.32768000000000000000e5 +441 1 26 29 -0.32768000000000000000e5 +442 1 6 44 0.32768000000000000000e5 +442 1 11 42 -0.32768000000000000000e5 +443 1 6 45 0.32768000000000000000e5 +443 1 26 33 -0.32768000000000000000e5 +444 1 6 46 0.32768000000000000000e5 +444 1 14 45 -0.65536000000000000000e5 +444 1 17 48 0.32768000000000000000e5 +444 1 18 25 0.32768000000000000000e5 +444 2 14 28 0.32768000000000000000e5 +444 3 14 19 -0.32768000000000000000e5 +444 3 14 27 0.32768000000000000000e5 +445 1 1 48 0.32768000000000000000e5 +445 1 2 49 0.65536000000000000000e5 +445 1 3 50 0.65536000000000000000e5 +445 1 6 47 0.32768000000000000000e5 +445 1 11 42 -0.13107200000000000000e6 +445 1 12 43 -0.26214400000000000000e6 +445 1 17 48 0.26214400000000000000e6 +445 1 23 38 0.32768000000000000000e5 +445 1 24 39 0.32768000000000000000e5 +445 2 2 32 0.32768000000000000000e5 +445 2 3 33 0.32768000000000000000e5 +445 2 8 22 -0.13107200000000000000e6 +445 2 12 26 0.13107200000000000000e6 +445 2 16 30 0.65536000000000000000e5 +445 3 2 31 0.13107200000000000000e6 +445 3 14 27 0.26214400000000000000e6 +445 4 4 16 0.13107200000000000000e6 +446 1 6 48 0.32768000000000000000e5 +446 1 25 40 -0.32768000000000000000e5 +447 1 1 48 -0.16384000000000000000e5 +447 1 2 49 -0.16384000000000000000e5 +447 1 3 50 -0.32768000000000000000e5 +447 1 6 50 0.32768000000000000000e5 +447 1 11 42 0.65536000000000000000e5 +447 1 12 43 0.13107200000000000000e6 +447 1 17 48 -0.13107200000000000000e6 +447 1 23 38 -0.16384000000000000000e5 +447 1 26 41 0.32768000000000000000e5 +447 1 28 43 -0.65536000000000000000e5 +447 2 2 32 -0.16384000000000000000e5 +447 2 4 34 0.32768000000000000000e5 +447 2 8 22 0.65536000000000000000e5 +447 2 12 26 -0.65536000000000000000e5 +447 2 16 30 -0.32768000000000000000e5 +447 3 2 31 -0.65536000000000000000e5 +447 3 14 27 -0.13107200000000000000e6 +447 4 4 16 -0.65536000000000000000e5 +448 1 1 48 0.16384000000000000000e5 +448 1 2 49 0.16384000000000000000e5 +448 1 3 50 0.32768000000000000000e5 +448 1 5 52 -0.65536000000000000000e5 +448 1 6 51 0.32768000000000000000e5 +448 1 11 42 -0.65536000000000000000e5 +448 1 12 43 -0.13107200000000000000e6 +448 1 17 48 0.13107200000000000000e6 +448 1 23 38 0.16384000000000000000e5 +448 1 28 43 0.65536000000000000000e5 +448 2 2 32 0.16384000000000000000e5 +448 2 4 34 -0.32768000000000000000e5 +448 2 8 22 -0.65536000000000000000e5 +448 2 12 26 0.65536000000000000000e5 +448 2 16 30 0.32768000000000000000e5 +448 2 22 28 0.32768000000000000000e5 +448 3 2 31 0.65536000000000000000e5 +448 3 14 27 0.13107200000000000000e6 +448 4 4 16 0.65536000000000000000e5 +449 1 6 52 0.32768000000000000000e5 +449 1 33 40 -0.32768000000000000000e5 +450 1 1 48 -0.65536000000000000000e5 +450 1 2 49 -0.98304000000000000000e5 +450 1 3 50 -0.13107200000000000000e6 +450 1 6 53 0.32768000000000000000e5 +450 1 6 54 0.32768000000000000000e5 +450 1 11 42 0.26214400000000000000e6 +450 1 12 43 0.52428800000000000000e6 +450 1 17 48 -0.52428800000000000000e6 +450 1 23 38 -0.65536000000000000000e5 +450 1 24 39 -0.32768000000000000000e5 +450 1 26 41 0.65536000000000000000e5 +450 1 28 43 -0.13107200000000000000e6 +450 2 2 32 -0.65536000000000000000e5 +450 2 3 33 -0.32768000000000000000e5 +450 2 4 34 0.65536000000000000000e5 +450 2 5 35 0.32768000000000000000e5 +450 2 8 22 0.26214400000000000000e6 +450 2 12 26 -0.26214400000000000000e6 +450 2 16 30 -0.13107200000000000000e6 +450 3 2 31 -0.26214400000000000000e6 +450 3 4 33 -0.32768000000000000000e5 +450 3 5 34 0.65536000000000000000e5 +450 3 14 27 -0.52428800000000000000e6 +450 4 4 16 -0.26214400000000000000e6 +451 1 1 48 0.16384000000000000000e5 +451 1 2 49 0.16384000000000000000e5 +451 1 3 50 0.32768000000000000000e5 +451 1 6 55 0.32768000000000000000e5 +451 1 11 42 -0.65536000000000000000e5 +451 1 12 43 -0.13107200000000000000e6 +451 1 17 48 0.13107200000000000000e6 +451 1 23 38 0.16384000000000000000e5 +451 1 28 43 0.65536000000000000000e5 +451 1 33 48 -0.65536000000000000000e5 +451 2 2 32 0.16384000000000000000e5 +451 2 4 34 -0.32768000000000000000e5 +451 2 8 22 -0.65536000000000000000e5 +451 2 12 26 0.65536000000000000000e5 +451 2 16 30 0.32768000000000000000e5 +451 2 28 30 0.32768000000000000000e5 +451 3 2 31 0.65536000000000000000e5 +451 3 5 34 -0.32768000000000000000e5 +451 3 14 27 0.13107200000000000000e6 +451 3 22 27 -0.32768000000000000000e5 +451 4 4 16 0.65536000000000000000e5 +452 1 1 48 -0.65536000000000000000e5 +452 1 2 49 -0.98304000000000000000e5 +452 1 3 50 -0.13107200000000000000e6 +452 1 6 56 0.32768000000000000000e5 +452 1 11 42 0.26214400000000000000e6 +452 1 12 43 0.52428800000000000000e6 +452 1 17 48 -0.52428800000000000000e6 +452 1 23 38 -0.65536000000000000000e5 +452 1 24 39 -0.32768000000000000000e5 +452 1 24 55 0.65536000000000000000e5 +452 1 25 56 0.32768000000000000000e5 +452 1 28 43 -0.13107200000000000000e6 +452 2 2 32 -0.65536000000000000000e5 +452 2 3 33 -0.32768000000000000000e5 +452 2 8 22 0.26214400000000000000e6 +452 2 12 26 -0.26214400000000000000e6 +452 2 16 30 -0.13107200000000000000e6 +452 2 19 35 0.32768000000000000000e5 +452 2 21 35 0.65536000000000000000e5 +452 3 2 31 -0.26214400000000000000e6 +452 3 4 33 -0.32768000000000000000e5 +452 3 14 27 -0.52428800000000000000e6 +452 3 17 30 -0.65536000000000000000e5 +452 3 18 31 0.13107200000000000000e6 +452 3 19 32 -0.32768000000000000000e5 +452 3 20 33 -0.65536000000000000000e5 +452 3 21 34 0.13107200000000000000e6 +452 3 28 33 0.32768000000000000000e5 +452 4 4 16 -0.26214400000000000000e6 +453 1 1 12 -0.16384000000000000000e5 +453 1 7 7 0.32768000000000000000e5 +454 1 1 8 -0.16384000000000000000e5 +454 1 1 32 0.32768000000000000000e5 +454 1 1 40 -0.81920000000000000000e4 +454 1 2 5 0.81920000000000000000e4 +454 1 2 9 -0.32768000000000000000e5 +454 1 2 33 -0.32768000000000000000e5 +454 1 3 34 0.65536000000000000000e5 +454 1 7 8 0.32768000000000000000e5 +454 1 7 22 0.16384000000000000000e5 +454 1 7 38 -0.16384000000000000000e5 +454 1 8 23 0.49152000000000000000e5 +454 1 10 41 -0.32768000000000000000e5 +454 1 12 27 -0.65536000000000000000e5 +454 2 1 3 -0.81920000000000000000e4 +454 2 2 16 0.81920000000000000000e4 +454 2 6 20 0.32768000000000000000e5 +454 2 7 21 -0.32768000000000000000e5 +454 3 1 2 -0.81920000000000000000e4 +454 3 3 16 0.81920000000000000000e4 +454 3 4 17 0.81920000000000000000e4 +454 3 6 19 0.16384000000000000000e5 +454 3 7 20 -0.32768000000000000000e5 +454 3 8 21 -0.32768000000000000000e5 +454 4 1 5 -0.16384000000000000000e5 +454 4 1 13 0.81920000000000000000e4 +454 4 2 2 0.16384000000000000000e5 +454 4 2 14 0.16384000000000000000e5 +455 1 1 32 -0.32768000000000000000e5 +455 1 7 9 0.32768000000000000000e5 +455 3 6 7 -0.32768000000000000000e5 +456 1 2 17 0.65536000000000000000e5 +456 1 2 33 0.32768000000000000000e5 +456 1 3 18 0.13107200000000000000e6 +456 1 4 19 0.13107200000000000000e6 +456 1 4 35 0.13107200000000000000e6 +456 1 6 13 -0.32768000000000000000e5 +456 1 7 10 0.32768000000000000000e5 +456 1 11 42 -0.32768000000000000000e5 +456 1 18 25 0.65536000000000000000e5 +456 1 20 27 -0.26214400000000000000e6 +456 2 4 10 0.32768000000000000000e5 +456 2 6 12 0.65536000000000000000e5 +456 2 8 22 -0.32768000000000000000e5 +456 2 9 23 0.65536000000000000000e5 +456 2 10 24 0.13107200000000000000e6 +456 3 2 15 -0.13107200000000000000e6 +456 3 8 13 -0.13107200000000000000e6 +456 3 9 22 -0.32768000000000000000e5 +456 4 4 8 -0.32768000000000000000e5 +457 1 2 33 -0.32768000000000000000e5 +457 1 3 18 -0.65536000000000000000e5 +457 1 4 35 -0.13107200000000000000e6 +457 1 6 13 0.32768000000000000000e5 +457 1 7 11 0.32768000000000000000e5 +457 1 10 41 0.32768000000000000000e5 +457 1 11 42 0.32768000000000000000e5 +457 1 18 25 -0.65536000000000000000e5 +457 1 28 35 0.13107200000000000000e6 +457 2 8 22 0.32768000000000000000e5 +457 2 9 23 -0.65536000000000000000e5 +457 3 5 10 0.32768000000000000000e5 +457 3 8 21 0.32768000000000000000e5 +457 3 9 22 0.32768000000000000000e5 +457 3 11 24 0.13107200000000000000e6 +457 4 4 8 0.32768000000000000000e5 +458 1 1 16 -0.32768000000000000000e5 +458 1 7 12 0.32768000000000000000e5 +459 1 1 8 -0.81920000000000000000e4 +459 1 1 40 -0.40960000000000000000e4 +459 1 2 5 0.40960000000000000000e4 +459 1 2 9 -0.16384000000000000000e5 +459 1 2 17 0.32768000000000000000e5 +459 1 3 18 0.65536000000000000000e5 +459 1 3 34 0.32768000000000000000e5 +459 1 4 19 0.65536000000000000000e5 +459 1 4 35 0.65536000000000000000e5 +459 1 6 13 -0.16384000000000000000e5 +459 1 7 13 0.32768000000000000000e5 +459 1 7 22 0.81920000000000000000e4 +459 1 7 38 -0.81920000000000000000e4 +459 1 8 23 0.24576000000000000000e5 +459 1 10 41 -0.16384000000000000000e5 +459 1 11 42 -0.16384000000000000000e5 +459 1 12 27 -0.32768000000000000000e5 +459 1 18 25 0.32768000000000000000e5 +459 1 20 27 -0.13107200000000000000e6 +459 2 1 3 -0.40960000000000000000e4 +459 2 2 16 0.40960000000000000000e4 +459 2 4 10 0.16384000000000000000e5 +459 2 6 12 0.32768000000000000000e5 +459 2 7 21 -0.16384000000000000000e5 +459 2 8 22 -0.16384000000000000000e5 +459 2 9 23 0.32768000000000000000e5 +459 2 10 24 0.65536000000000000000e5 +459 3 1 2 -0.40960000000000000000e4 +459 3 2 15 -0.65536000000000000000e5 +459 3 3 16 0.40960000000000000000e4 +459 3 4 17 0.40960000000000000000e4 +459 3 6 7 -0.16384000000000000000e5 +459 3 6 19 0.81920000000000000000e4 +459 3 7 20 -0.16384000000000000000e5 +459 3 8 13 -0.65536000000000000000e5 +459 3 8 21 -0.16384000000000000000e5 +459 3 9 22 -0.16384000000000000000e5 +459 4 1 5 -0.81920000000000000000e4 +459 4 1 13 0.40960000000000000000e4 +459 4 2 2 0.81920000000000000000e4 +459 4 2 14 0.81920000000000000000e4 +459 4 4 8 -0.16384000000000000000e5 +459 4 5 5 -0.32768000000000000000e5 +460 1 2 17 -0.32768000000000000000e5 +460 1 7 14 0.32768000000000000000e5 +461 1 2 17 0.32768000000000000000e5 +461 1 3 18 0.32768000000000000000e5 +461 1 4 19 0.65536000000000000000e5 +461 1 7 15 0.32768000000000000000e5 +461 1 20 27 -0.13107200000000000000e6 +461 1 28 35 0.65536000000000000000e5 +461 2 6 12 0.32768000000000000000e5 +461 2 10 24 0.65536000000000000000e5 +461 3 2 15 -0.65536000000000000000e5 +461 3 8 13 -0.65536000000000000000e5 +461 3 11 24 0.65536000000000000000e5 +462 1 7 17 0.32768000000000000000e5 +462 1 13 16 -0.65536000000000000000e5 +462 1 20 27 0.65536000000000000000e5 +462 1 28 35 -0.32768000000000000000e5 +462 2 7 13 0.32768000000000000000e5 +462 2 10 24 -0.32768000000000000000e5 +462 3 2 15 0.32768000000000000000e5 +462 3 8 13 0.32768000000000000000e5 +462 3 11 24 -0.32768000000000000000e5 +463 1 4 19 0.32768000000000000000e5 +463 1 7 18 0.32768000000000000000e5 +463 1 20 27 -0.65536000000000000000e5 +463 1 28 35 0.32768000000000000000e5 +463 2 10 24 0.32768000000000000000e5 +463 3 2 15 -0.32768000000000000000e5 +463 3 8 13 -0.32768000000000000000e5 +463 3 11 24 0.32768000000000000000e5 +464 1 4 19 0.16384000000000000000e5 +464 1 7 16 -0.16384000000000000000e5 +464 1 7 19 0.32768000000000000000e5 +464 1 13 16 -0.32768000000000000000e5 +464 2 1 15 -0.16384000000000000000e5 +464 2 7 13 0.16384000000000000000e5 +465 1 7 20 0.32768000000000000000e5 +465 1 13 16 -0.32768000000000000000e5 +466 1 7 21 0.32768000000000000000e5 +466 1 12 19 -0.32768000000000000000e5 +467 1 1 32 0.65536000000000000000e5 +467 1 2 33 -0.65536000000000000000e5 +467 1 3 34 0.13107200000000000000e6 +467 1 7 22 0.32768000000000000000e5 +467 1 7 23 0.32768000000000000000e5 +467 1 8 23 0.32768000000000000000e5 +467 1 10 41 -0.65536000000000000000e5 +467 1 12 27 -0.13107200000000000000e6 +467 2 1 7 0.32768000000000000000e5 +467 2 6 20 0.65536000000000000000e5 +467 2 7 21 -0.65536000000000000000e5 +467 3 8 21 -0.65536000000000000000e5 +467 4 1 5 -0.32768000000000000000e5 +468 1 7 24 0.32768000000000000000e5 +468 1 8 23 -0.32768000000000000000e5 +469 1 1 48 -0.16384000000000000000e5 +469 1 2 49 -0.16384000000000000000e5 +469 1 7 25 0.32768000000000000000e5 +469 1 7 38 -0.32768000000000000000e5 +469 1 8 23 0.32768000000000000000e5 +469 1 23 38 -0.16384000000000000000e5 +469 2 2 32 -0.16384000000000000000e5 +469 3 1 30 -0.32768000000000000000e5 +469 3 6 19 0.32768000000000000000e5 +469 3 7 20 -0.65536000000000000000e5 +469 4 2 14 0.32768000000000000000e5 +470 1 7 26 0.32768000000000000000e5 +470 1 8 39 -0.32768000000000000000e5 +470 3 6 19 -0.32768000000000000000e5 +471 1 1 32 0.32768000000000000000e5 +471 1 2 33 -0.32768000000000000000e5 +471 1 3 34 0.65536000000000000000e5 +471 1 7 27 0.32768000000000000000e5 +471 1 10 41 -0.32768000000000000000e5 +471 1 12 27 -0.65536000000000000000e5 +471 2 6 20 0.32768000000000000000e5 +471 2 7 21 -0.32768000000000000000e5 +471 3 8 21 -0.32768000000000000000e5 +472 1 1 32 -0.32768000000000000000e5 +472 1 7 28 0.32768000000000000000e5 +473 1 2 33 0.32768000000000000000e5 +473 1 3 34 -0.65536000000000000000e5 +473 1 7 29 0.32768000000000000000e5 +473 1 10 41 0.32768000000000000000e5 +473 2 7 21 0.32768000000000000000e5 +473 3 8 21 0.32768000000000000000e5 +474 1 2 33 -0.32768000000000000000e5 +474 1 7 30 0.32768000000000000000e5 +475 1 7 31 0.32768000000000000000e5 +475 1 12 27 -0.32768000000000000000e5 +476 1 2 17 -0.32768000000000000000e5 +476 1 7 32 0.32768000000000000000e5 +476 3 1 14 0.32768000000000000000e5 +477 1 3 34 -0.32768000000000000000e5 +477 1 7 33 0.32768000000000000000e5 +478 1 7 34 0.32768000000000000000e5 +478 1 16 31 -0.65536000000000000000e5 +478 1 20 27 0.65536000000000000000e5 +478 1 28 35 -0.32768000000000000000e5 +478 2 7 13 0.32768000000000000000e5 +478 2 10 24 -0.32768000000000000000e5 +478 3 11 24 -0.32768000000000000000e5 +478 4 8 8 -0.65536000000000000000e5 +479 1 4 19 0.32768000000000000000e5 +479 1 7 35 0.32768000000000000000e5 +479 1 20 27 -0.65536000000000000000e5 +479 1 28 35 0.32768000000000000000e5 +479 2 10 24 0.32768000000000000000e5 +479 3 8 13 -0.32768000000000000000e5 +479 3 11 24 0.32768000000000000000e5 +480 1 7 36 0.32768000000000000000e5 +480 1 16 31 -0.32768000000000000000e5 +481 1 1 24 0.16384000000000000000e5 +481 1 1 32 0.65536000000000000000e5 +481 1 1 40 0.16384000000000000000e5 +481 1 2 49 0.16384000000000000000e5 +481 1 3 50 -0.32768000000000000000e5 +481 1 5 52 0.65536000000000000000e5 +481 1 6 37 0.16384000000000000000e5 +481 1 7 22 0.32768000000000000000e5 +481 1 7 37 0.32768000000000000000e5 +481 1 8 23 0.32768000000000000000e5 +481 1 11 42 -0.65536000000000000000e5 +481 1 12 27 -0.13107200000000000000e6 +481 1 12 43 -0.13107200000000000000e6 +481 1 16 47 0.13107200000000000000e6 +481 1 22 37 -0.16384000000000000000e5 +481 1 28 43 0.65536000000000000000e5 +481 2 1 7 0.32768000000000000000e5 +481 2 2 16 0.16384000000000000000e5 +481 2 2 32 0.16384000000000000000e5 +481 2 3 17 -0.16384000000000000000e5 +481 2 4 26 0.16384000000000000000e5 +481 2 6 20 0.65536000000000000000e5 +481 2 10 32 -0.65536000000000000000e5 +481 2 12 26 0.65536000000000000000e5 +481 2 16 16 -0.32768000000000000000e5 +481 3 1 16 0.16384000000000000000e5 +481 3 1 30 0.65536000000000000000e5 +481 3 2 31 0.65536000000000000000e5 +481 3 3 16 0.16384000000000000000e5 +481 3 7 20 0.65536000000000000000e5 +481 3 14 27 0.13107200000000000000e6 +481 4 1 5 -0.32768000000000000000e5 +481 4 1 13 0.16384000000000000000e5 +481 4 5 17 0.32768000000000000000e5 +481 4 7 19 -0.65536000000000000000e5 +481 4 11 11 0.32768000000000000000e5 +482 1 1 48 -0.16384000000000000000e5 +482 1 2 49 -0.16384000000000000000e5 +482 1 7 39 0.32768000000000000000e5 +482 1 23 38 -0.16384000000000000000e5 +482 2 2 32 -0.16384000000000000000e5 +482 3 1 30 -0.32768000000000000000e5 +483 1 7 40 0.32768000000000000000e5 +483 1 8 39 -0.32768000000000000000e5 +484 1 2 17 -0.65536000000000000000e5 +484 1 2 33 -0.32768000000000000000e5 +484 1 3 34 0.65536000000000000000e5 +484 1 7 41 0.32768000000000000000e5 +484 1 10 41 -0.32768000000000000000e5 +484 1 11 42 0.32768000000000000000e5 +484 1 12 43 0.65536000000000000000e5 +484 1 17 48 -0.65536000000000000000e5 +484 2 1 31 0.32768000000000000000e5 +484 2 7 21 -0.32768000000000000000e5 +484 2 8 22 0.32768000000000000000e5 +484 2 12 26 -0.32768000000000000000e5 +484 3 1 14 0.65536000000000000000e5 +484 3 6 23 0.65536000000000000000e5 +484 3 7 20 -0.32768000000000000000e5 +484 3 8 21 -0.32768000000000000000e5 +484 3 14 27 -0.65536000000000000000e5 +484 4 4 16 -0.32768000000000000000e5 +485 1 2 33 0.32768000000000000000e5 +485 1 3 34 -0.65536000000000000000e5 +485 1 7 42 0.32768000000000000000e5 +485 1 10 41 0.32768000000000000000e5 +485 2 7 21 0.32768000000000000000e5 +485 3 7 20 0.32768000000000000000e5 +485 3 8 21 0.32768000000000000000e5 +486 1 7 43 0.32768000000000000000e5 +486 1 11 42 -0.32768000000000000000e5 +486 1 12 43 -0.65536000000000000000e5 +486 1 17 48 0.65536000000000000000e5 +486 2 8 22 -0.32768000000000000000e5 +486 2 12 26 0.32768000000000000000e5 +486 3 14 27 0.65536000000000000000e5 +486 4 4 16 0.32768000000000000000e5 +487 1 2 17 -0.32768000000000000000e5 +487 1 7 44 0.32768000000000000000e5 +487 3 1 14 0.32768000000000000000e5 +487 3 6 23 0.32768000000000000000e5 +488 1 7 45 0.32768000000000000000e5 +488 1 16 47 -0.32768000000000000000e5 +488 3 13 26 -0.32768000000000000000e5 +489 1 4 19 0.32768000000000000000e5 +489 1 7 46 0.32768000000000000000e5 +489 1 20 27 -0.65536000000000000000e5 +489 1 28 35 0.32768000000000000000e5 +489 2 10 24 0.32768000000000000000e5 +489 3 8 13 -0.32768000000000000000e5 +489 3 10 23 0.32768000000000000000e5 +489 3 11 24 0.32768000000000000000e5 +490 1 2 33 -0.65536000000000000000e5 +490 1 3 34 0.13107200000000000000e6 +490 1 3 50 0.32768000000000000000e5 +490 1 5 52 -0.65536000000000000000e5 +490 1 7 38 -0.32768000000000000000e5 +490 1 7 47 0.32768000000000000000e5 +490 1 8 39 -0.32768000000000000000e5 +490 1 10 41 -0.65536000000000000000e5 +490 1 11 42 0.65536000000000000000e5 +490 1 12 43 0.13107200000000000000e6 +490 1 16 47 -0.13107200000000000000e6 +490 1 28 43 -0.65536000000000000000e5 +490 2 7 21 -0.65536000000000000000e5 +490 2 10 32 0.65536000000000000000e5 +490 2 12 26 -0.65536000000000000000e5 +490 3 1 30 -0.32768000000000000000e5 +490 3 2 31 -0.65536000000000000000e5 +490 3 7 20 -0.65536000000000000000e5 +490 3 8 21 -0.65536000000000000000e5 +490 3 14 27 -0.13107200000000000000e6 +490 4 5 17 -0.32768000000000000000e5 +490 4 7 19 0.65536000000000000000e5 +491 1 1 48 -0.16384000000000000000e5 +491 1 2 49 -0.16384000000000000000e5 +491 1 7 48 0.32768000000000000000e5 +491 1 23 38 -0.16384000000000000000e5 +491 2 2 32 -0.16384000000000000000e5 +492 1 3 50 -0.32768000000000000000e5 +492 1 7 49 0.32768000000000000000e5 +493 1 5 52 -0.32768000000000000000e5 +493 1 7 50 0.32768000000000000000e5 +493 1 11 42 0.32768000000000000000e5 +493 1 12 43 0.65536000000000000000e5 +493 1 16 47 -0.65536000000000000000e5 +493 1 28 43 -0.32768000000000000000e5 +493 2 10 32 0.32768000000000000000e5 +493 2 12 26 -0.32768000000000000000e5 +493 3 2 31 -0.32768000000000000000e5 +493 3 14 27 -0.65536000000000000000e5 +493 4 7 19 0.32768000000000000000e5 +494 1 7 51 0.32768000000000000000e5 +494 1 11 42 -0.32768000000000000000e5 +494 1 12 43 -0.65536000000000000000e5 +494 1 17 48 0.65536000000000000000e5 +494 2 8 22 -0.32768000000000000000e5 +494 2 12 26 0.32768000000000000000e5 +494 3 2 31 0.32768000000000000000e5 +494 3 14 27 0.65536000000000000000e5 +494 4 4 16 0.32768000000000000000e5 +495 1 7 52 0.32768000000000000000e5 +495 1 16 47 -0.32768000000000000000e5 +496 1 1 48 -0.16384000000000000000e5 +496 1 2 49 -0.16384000000000000000e5 +496 1 7 53 0.32768000000000000000e5 +496 1 23 38 -0.16384000000000000000e5 +496 2 2 32 -0.16384000000000000000e5 +496 3 16 29 0.32768000000000000000e5 +497 1 7 55 0.32768000000000000000e5 +497 1 37 44 -0.32768000000000000000e5 +498 1 7 54 -0.32768000000000000000e5 +498 1 7 56 0.32768000000000000000e5 +498 3 6 35 0.32768000000000000000e5 +499 1 1 32 -0.16384000000000000000e5 +499 1 8 8 0.32768000000000000000e5 +499 3 6 7 -0.16384000000000000000e5 +500 1 2 17 0.65536000000000000000e5 +500 1 2 33 0.32768000000000000000e5 +500 1 3 18 0.13107200000000000000e6 +500 1 4 19 0.13107200000000000000e6 +500 1 4 35 0.13107200000000000000e6 +500 1 6 13 -0.32768000000000000000e5 +500 1 8 9 0.32768000000000000000e5 +500 1 11 42 -0.32768000000000000000e5 +500 1 18 25 0.65536000000000000000e5 +500 1 20 27 -0.26214400000000000000e6 +500 2 4 10 0.32768000000000000000e5 +500 2 6 12 0.65536000000000000000e5 +500 2 8 22 -0.32768000000000000000e5 +500 2 9 23 0.65536000000000000000e5 +500 2 10 24 0.13107200000000000000e6 +500 3 2 15 -0.13107200000000000000e6 +500 3 8 13 -0.13107200000000000000e6 +500 3 9 22 -0.32768000000000000000e5 +500 4 4 8 -0.32768000000000000000e5 +501 1 2 33 -0.32768000000000000000e5 +501 1 3 18 -0.65536000000000000000e5 +501 1 4 35 -0.13107200000000000000e6 +501 1 6 13 0.32768000000000000000e5 +501 1 8 10 0.32768000000000000000e5 +501 1 10 41 0.32768000000000000000e5 +501 1 11 42 0.32768000000000000000e5 +501 1 18 25 -0.65536000000000000000e5 +501 1 28 35 0.13107200000000000000e6 +501 2 8 22 0.32768000000000000000e5 +501 2 9 23 -0.65536000000000000000e5 +501 3 5 10 0.32768000000000000000e5 +501 3 8 21 0.32768000000000000000e5 +501 3 9 22 0.32768000000000000000e5 +501 3 11 24 0.13107200000000000000e6 +501 4 4 8 0.32768000000000000000e5 +502 1 8 11 0.32768000000000000000e5 +502 1 10 41 -0.32768000000000000000e5 +502 3 5 10 -0.32768000000000000000e5 +502 3 8 21 -0.32768000000000000000e5 +503 1 1 8 -0.81920000000000000000e4 +503 1 1 40 -0.40960000000000000000e4 +503 1 2 5 0.40960000000000000000e4 +503 1 2 9 -0.16384000000000000000e5 +503 1 2 17 0.32768000000000000000e5 +503 1 3 18 0.65536000000000000000e5 +503 1 3 34 0.32768000000000000000e5 +503 1 4 19 0.65536000000000000000e5 +503 1 4 35 0.65536000000000000000e5 +503 1 6 13 -0.16384000000000000000e5 +503 1 7 22 0.81920000000000000000e4 +503 1 7 38 -0.81920000000000000000e4 +503 1 8 12 0.32768000000000000000e5 +503 1 8 23 0.24576000000000000000e5 +503 1 10 41 -0.16384000000000000000e5 +503 1 11 42 -0.16384000000000000000e5 +503 1 12 27 -0.32768000000000000000e5 +503 1 18 25 0.32768000000000000000e5 +503 1 20 27 -0.13107200000000000000e6 +503 2 1 3 -0.40960000000000000000e4 +503 2 2 16 0.40960000000000000000e4 +503 2 4 10 0.16384000000000000000e5 +503 2 6 12 0.32768000000000000000e5 +503 2 7 21 -0.16384000000000000000e5 +503 2 8 22 -0.16384000000000000000e5 +503 2 9 23 0.32768000000000000000e5 +503 2 10 24 0.65536000000000000000e5 +503 3 1 2 -0.40960000000000000000e4 +503 3 2 15 -0.65536000000000000000e5 +503 3 3 16 0.40960000000000000000e4 +503 3 4 17 0.40960000000000000000e4 +503 3 6 7 -0.16384000000000000000e5 +503 3 6 19 0.81920000000000000000e4 +503 3 7 20 -0.16384000000000000000e5 +503 3 8 13 -0.65536000000000000000e5 +503 3 8 21 -0.16384000000000000000e5 +503 3 9 22 -0.16384000000000000000e5 +503 4 1 5 -0.81920000000000000000e4 +503 4 1 13 0.40960000000000000000e4 +503 4 2 2 0.81920000000000000000e4 +503 4 2 14 0.81920000000000000000e4 +503 4 4 8 -0.16384000000000000000e5 +503 4 5 5 -0.32768000000000000000e5 +504 1 2 17 -0.32768000000000000000e5 +504 1 8 13 0.32768000000000000000e5 +505 1 2 17 0.32768000000000000000e5 +505 1 3 18 0.32768000000000000000e5 +505 1 4 19 0.65536000000000000000e5 +505 1 8 14 0.32768000000000000000e5 +505 1 20 27 -0.13107200000000000000e6 +505 1 28 35 0.65536000000000000000e5 +505 2 6 12 0.32768000000000000000e5 +505 2 10 24 0.65536000000000000000e5 +505 3 2 15 -0.65536000000000000000e5 +505 3 8 13 -0.65536000000000000000e5 +505 3 11 24 0.65536000000000000000e5 +506 1 3 18 -0.32768000000000000000e5 +506 1 8 15 0.32768000000000000000e5 +507 1 8 16 0.32768000000000000000e5 +507 1 13 16 -0.65536000000000000000e5 +507 1 20 27 0.65536000000000000000e5 +507 1 28 35 -0.32768000000000000000e5 +507 2 7 13 0.32768000000000000000e5 +507 2 10 24 -0.32768000000000000000e5 +507 3 2 15 0.32768000000000000000e5 +507 3 8 13 0.32768000000000000000e5 +507 3 11 24 -0.32768000000000000000e5 +508 1 4 19 0.32768000000000000000e5 +508 1 8 17 0.32768000000000000000e5 +508 1 20 27 -0.65536000000000000000e5 +508 1 28 35 0.32768000000000000000e5 +508 2 10 24 0.32768000000000000000e5 +508 3 2 15 -0.32768000000000000000e5 +508 3 8 13 -0.32768000000000000000e5 +508 3 11 24 0.32768000000000000000e5 +509 1 4 19 -0.32768000000000000000e5 +509 1 8 18 0.32768000000000000000e5 +510 1 8 19 0.32768000000000000000e5 +510 1 13 16 -0.32768000000000000000e5 +511 1 8 20 0.32768000000000000000e5 +511 1 10 17 -0.16384000000000000000e5 +511 1 20 27 -0.32768000000000000000e5 +511 1 28 35 0.16384000000000000000e5 +511 3 2 15 -0.16384000000000000000e5 +511 3 8 13 -0.16384000000000000000e5 +511 3 11 24 0.16384000000000000000e5 +511 4 6 10 -0.16384000000000000000e5 +512 1 4 19 -0.81920000000000000000e4 +512 1 5 20 -0.81920000000000000000e4 +512 1 8 21 0.32768000000000000000e5 +512 1 10 17 -0.16384000000000000000e5 +512 1 13 16 -0.16384000000000000000e5 +512 1 20 27 -0.16384000000000000000e5 +512 1 28 35 0.81920000000000000000e4 +512 2 8 14 -0.81920000000000000000e4 +512 2 11 13 -0.16384000000000000000e5 +512 3 2 15 -0.81920000000000000000e4 +512 3 8 13 -0.81920000000000000000e4 +512 3 11 24 0.81920000000000000000e4 +512 4 6 10 -0.81920000000000000000e4 +513 1 1 32 0.65536000000000000000e5 +513 1 2 33 -0.65536000000000000000e5 +513 1 3 34 0.13107200000000000000e6 +513 1 7 22 0.32768000000000000000e5 +513 1 8 22 0.32768000000000000000e5 +513 1 8 23 0.32768000000000000000e5 +513 1 10 41 -0.65536000000000000000e5 +513 1 12 27 -0.13107200000000000000e6 +513 2 1 7 0.32768000000000000000e5 +513 2 6 20 0.65536000000000000000e5 +513 2 7 21 -0.65536000000000000000e5 +513 3 8 21 -0.65536000000000000000e5 +513 4 1 5 -0.32768000000000000000e5 +514 1 1 48 -0.16384000000000000000e5 +514 1 2 49 -0.16384000000000000000e5 +514 1 7 38 -0.32768000000000000000e5 +514 1 8 23 0.32768000000000000000e5 +514 1 8 24 0.32768000000000000000e5 +514 1 23 38 -0.16384000000000000000e5 +514 2 2 32 -0.16384000000000000000e5 +514 3 1 30 -0.32768000000000000000e5 +514 3 6 19 0.32768000000000000000e5 +514 3 7 20 -0.65536000000000000000e5 +514 4 2 14 0.32768000000000000000e5 +515 1 8 25 0.32768000000000000000e5 +515 1 8 39 -0.32768000000000000000e5 +515 3 6 19 -0.32768000000000000000e5 +516 1 1 48 0.16384000000000000000e5 +516 1 2 49 0.16384000000000000000e5 +516 1 5 52 -0.65536000000000000000e5 +516 1 8 26 0.32768000000000000000e5 +516 1 8 39 0.32768000000000000000e5 +516 1 10 25 0.32768000000000000000e5 +516 1 10 41 -0.65536000000000000000e5 +516 1 11 42 -0.65536000000000000000e5 +516 1 12 43 -0.13107200000000000000e6 +516 1 17 48 0.26214400000000000000e6 +516 1 23 38 0.16384000000000000000e5 +516 1 26 41 -0.32768000000000000000e5 +516 1 28 43 -0.65536000000000000000e5 +516 2 2 32 0.16384000000000000000e5 +516 2 8 22 -0.13107200000000000000e6 +516 2 12 26 0.65536000000000000000e5 +516 2 16 30 0.32768000000000000000e5 +516 3 2 31 0.65536000000000000000e5 +516 3 6 19 0.32768000000000000000e5 +516 3 8 21 -0.65536000000000000000e5 +516 3 14 27 0.13107200000000000000e6 +516 4 3 15 0.32768000000000000000e5 +516 4 4 16 0.13107200000000000000e6 +516 4 6 18 0.32768000000000000000e5 +516 4 7 19 0.65536000000000000000e5 +517 1 1 32 -0.32768000000000000000e5 +517 1 8 27 0.32768000000000000000e5 +518 1 2 33 0.32768000000000000000e5 +518 1 3 34 -0.65536000000000000000e5 +518 1 8 28 0.32768000000000000000e5 +518 1 10 41 0.32768000000000000000e5 +518 2 7 21 0.32768000000000000000e5 +518 3 8 21 0.32768000000000000000e5 +519 1 2 33 -0.32768000000000000000e5 +519 1 8 29 0.32768000000000000000e5 +520 1 8 30 0.32768000000000000000e5 +520 1 10 41 -0.32768000000000000000e5 +520 3 8 21 -0.32768000000000000000e5 +521 1 2 17 -0.32768000000000000000e5 +521 1 8 31 0.32768000000000000000e5 +521 3 1 14 0.32768000000000000000e5 +522 1 3 34 -0.32768000000000000000e5 +522 1 8 32 0.32768000000000000000e5 +523 1 4 35 0.32768000000000000000e5 +523 1 8 33 0.32768000000000000000e5 +523 1 18 25 0.32768000000000000000e5 +523 1 28 35 -0.65536000000000000000e5 +523 2 9 23 0.32768000000000000000e5 +523 3 11 24 -0.65536000000000000000e5 +524 1 4 19 0.32768000000000000000e5 +524 1 8 34 0.32768000000000000000e5 +524 1 20 27 -0.65536000000000000000e5 +524 1 28 35 0.32768000000000000000e5 +524 2 10 24 0.32768000000000000000e5 +524 3 8 13 -0.32768000000000000000e5 +524 3 11 24 0.32768000000000000000e5 +525 1 4 19 -0.32768000000000000000e5 +525 1 8 35 0.32768000000000000000e5 +525 3 8 13 0.32768000000000000000e5 +526 1 8 36 0.32768000000000000000e5 +526 1 20 27 -0.32768000000000000000e5 +527 1 7 38 -0.32768000000000000000e5 +527 1 8 37 0.32768000000000000000e5 +528 1 1 48 -0.16384000000000000000e5 +528 1 2 49 -0.16384000000000000000e5 +528 1 8 38 0.32768000000000000000e5 +528 1 23 38 -0.16384000000000000000e5 +528 2 2 32 -0.16384000000000000000e5 +528 3 1 30 -0.32768000000000000000e5 +529 1 1 48 0.16384000000000000000e5 +529 1 2 49 0.16384000000000000000e5 +529 1 5 52 -0.65536000000000000000e5 +529 1 8 39 0.32768000000000000000e5 +529 1 8 40 0.32768000000000000000e5 +529 1 9 40 0.32768000000000000000e5 +529 1 10 41 -0.65536000000000000000e5 +529 1 11 42 -0.65536000000000000000e5 +529 1 12 43 -0.13107200000000000000e6 +529 1 17 48 0.26214400000000000000e6 +529 1 23 38 0.16384000000000000000e5 +529 1 26 41 -0.32768000000000000000e5 +529 1 28 43 -0.65536000000000000000e5 +529 2 2 32 0.16384000000000000000e5 +529 2 8 22 -0.13107200000000000000e6 +529 2 12 26 0.65536000000000000000e5 +529 2 16 30 0.32768000000000000000e5 +529 3 2 31 0.65536000000000000000e5 +529 3 14 27 0.13107200000000000000e6 +529 4 4 16 0.13107200000000000000e6 +529 4 6 18 0.32768000000000000000e5 +529 4 7 19 0.65536000000000000000e5 +530 1 2 33 0.32768000000000000000e5 +530 1 3 34 -0.65536000000000000000e5 +530 1 8 41 0.32768000000000000000e5 +530 1 10 41 0.32768000000000000000e5 +530 2 7 21 0.32768000000000000000e5 +530 3 7 20 0.32768000000000000000e5 +530 3 8 21 0.32768000000000000000e5 +531 1 8 42 0.32768000000000000000e5 +531 1 11 42 -0.32768000000000000000e5 +531 1 12 43 -0.65536000000000000000e5 +531 1 17 48 0.65536000000000000000e5 +531 2 8 22 -0.32768000000000000000e5 +531 2 12 26 0.32768000000000000000e5 +531 3 14 27 0.65536000000000000000e5 +531 4 4 16 0.32768000000000000000e5 +532 1 8 43 0.32768000000000000000e5 +532 1 10 41 -0.32768000000000000000e5 +533 1 8 44 0.32768000000000000000e5 +533 1 16 47 -0.32768000000000000000e5 +533 3 13 26 -0.32768000000000000000e5 +534 1 8 45 0.32768000000000000000e5 +534 1 12 43 -0.32768000000000000000e5 +535 1 8 46 0.32768000000000000000e5 +535 1 13 44 -0.32768000000000000000e5 +536 1 1 48 -0.16384000000000000000e5 +536 1 2 49 -0.16384000000000000000e5 +536 1 8 47 0.32768000000000000000e5 +536 1 23 38 -0.16384000000000000000e5 +536 2 2 32 -0.16384000000000000000e5 +537 1 3 50 -0.32768000000000000000e5 +537 1 8 48 0.32768000000000000000e5 +538 1 1 48 0.16384000000000000000e5 +538 1 2 49 0.16384000000000000000e5 +538 1 3 50 0.32768000000000000000e5 +538 1 8 49 0.32768000000000000000e5 +538 1 11 42 -0.65536000000000000000e5 +538 1 12 43 -0.13107200000000000000e6 +538 1 17 48 0.13107200000000000000e6 +538 1 23 38 0.16384000000000000000e5 +538 2 2 32 0.16384000000000000000e5 +538 2 8 22 -0.65536000000000000000e5 +538 2 12 26 0.65536000000000000000e5 +538 2 16 30 0.32768000000000000000e5 +538 3 2 31 0.65536000000000000000e5 +538 3 14 27 0.13107200000000000000e6 +538 4 4 16 0.65536000000000000000e5 +539 1 8 50 0.32768000000000000000e5 +539 1 11 42 -0.32768000000000000000e5 +539 1 12 43 -0.65536000000000000000e5 +539 1 17 48 0.65536000000000000000e5 +539 2 8 22 -0.32768000000000000000e5 +539 2 12 26 0.32768000000000000000e5 +539 3 2 31 0.32768000000000000000e5 +539 3 14 27 0.65536000000000000000e5 +539 4 4 16 0.32768000000000000000e5 +540 1 5 52 0.32768000000000000000e5 +540 1 8 51 0.32768000000000000000e5 +540 1 17 48 -0.65536000000000000000e5 +540 1 28 43 0.32768000000000000000e5 +540 2 8 22 0.32768000000000000000e5 +540 4 4 16 -0.32768000000000000000e5 +540 4 7 19 -0.32768000000000000000e5 +541 1 5 52 0.16384000000000000000e5 +541 1 8 52 0.32768000000000000000e5 +541 1 11 42 -0.16384000000000000000e5 +541 1 12 43 -0.32768000000000000000e5 +541 2 12 26 0.16384000000000000000e5 +541 2 20 34 -0.16384000000000000000e5 +541 3 2 31 0.16384000000000000000e5 +541 3 14 27 0.32768000000000000000e5 +541 4 7 19 -0.16384000000000000000e5 +541 4 8 20 -0.16384000000000000000e5 +542 1 7 54 -0.32768000000000000000e5 +542 1 8 53 0.32768000000000000000e5 +543 1 1 48 0.16384000000000000000e5 +543 1 2 49 0.16384000000000000000e5 +543 1 3 50 0.32768000000000000000e5 +543 1 8 54 0.32768000000000000000e5 +543 1 11 42 -0.65536000000000000000e5 +543 1 12 43 -0.13107200000000000000e6 +543 1 17 48 0.13107200000000000000e6 +543 1 23 38 0.16384000000000000000e5 +543 2 2 32 0.16384000000000000000e5 +543 2 8 22 -0.65536000000000000000e5 +543 2 12 26 0.65536000000000000000e5 +543 2 16 30 0.32768000000000000000e5 +543 3 2 31 0.65536000000000000000e5 +543 3 14 27 0.13107200000000000000e6 +543 3 17 30 0.32768000000000000000e5 +543 4 4 16 0.65536000000000000000e5 +544 1 8 55 0.32768000000000000000e5 +544 1 32 47 -0.32768000000000000000e5 +545 1 1 48 0.16384000000000000000e5 +545 1 2 49 0.16384000000000000000e5 +545 1 3 50 0.32768000000000000000e5 +545 1 8 56 0.32768000000000000000e5 +545 1 11 42 -0.65536000000000000000e5 +545 1 12 43 -0.13107200000000000000e6 +545 1 17 48 0.13107200000000000000e6 +545 1 23 38 0.16384000000000000000e5 +545 2 2 32 0.16384000000000000000e5 +545 2 8 22 -0.65536000000000000000e5 +545 2 12 26 0.65536000000000000000e5 +545 2 16 30 0.32768000000000000000e5 +545 3 2 31 0.65536000000000000000e5 +545 3 14 27 0.13107200000000000000e6 +545 3 17 30 0.32768000000000000000e5 +545 3 20 33 0.32768000000000000000e5 +545 4 4 16 0.65536000000000000000e5 +546 1 2 33 -0.16384000000000000000e5 +546 1 3 18 -0.32768000000000000000e5 +546 1 4 35 -0.65536000000000000000e5 +546 1 6 13 0.16384000000000000000e5 +546 1 9 9 0.32768000000000000000e5 +546 1 10 41 0.16384000000000000000e5 +546 1 11 42 0.16384000000000000000e5 +546 1 18 25 -0.32768000000000000000e5 +546 1 28 35 0.65536000000000000000e5 +546 2 8 22 0.16384000000000000000e5 +546 2 9 23 -0.32768000000000000000e5 +546 3 5 10 0.16384000000000000000e5 +546 3 8 21 0.16384000000000000000e5 +546 3 9 22 0.16384000000000000000e5 +546 3 11 24 0.65536000000000000000e5 +546 4 4 8 0.16384000000000000000e5 +547 1 9 10 0.32768000000000000000e5 +547 1 10 41 -0.32768000000000000000e5 +547 3 5 10 -0.32768000000000000000e5 +547 3 8 21 -0.32768000000000000000e5 +548 1 6 13 -0.32768000000000000000e5 +548 1 9 11 0.32768000000000000000e5 +549 1 2 17 -0.32768000000000000000e5 +549 1 9 12 0.32768000000000000000e5 +550 1 2 17 0.32768000000000000000e5 +550 1 3 18 0.32768000000000000000e5 +550 1 4 19 0.65536000000000000000e5 +550 1 9 13 0.32768000000000000000e5 +550 1 20 27 -0.13107200000000000000e6 +550 1 28 35 0.65536000000000000000e5 +550 2 6 12 0.32768000000000000000e5 +550 2 10 24 0.65536000000000000000e5 +550 3 2 15 -0.65536000000000000000e5 +550 3 8 13 -0.65536000000000000000e5 +550 3 11 24 0.65536000000000000000e5 +551 1 3 18 -0.32768000000000000000e5 +551 1 9 14 0.32768000000000000000e5 +552 1 3 18 0.32768000000000000000e5 +552 1 9 15 0.32768000000000000000e5 +552 1 10 17 -0.65536000000000000000e5 +552 1 11 14 0.32768000000000000000e5 +552 2 9 11 0.32768000000000000000e5 +553 1 4 19 0.32768000000000000000e5 +553 1 9 16 0.32768000000000000000e5 +553 1 20 27 -0.65536000000000000000e5 +553 1 28 35 0.32768000000000000000e5 +553 2 10 24 0.32768000000000000000e5 +553 3 2 15 -0.32768000000000000000e5 +553 3 8 13 -0.32768000000000000000e5 +553 3 11 24 0.32768000000000000000e5 +554 1 4 19 -0.32768000000000000000e5 +554 1 9 17 0.32768000000000000000e5 +555 1 9 18 0.32768000000000000000e5 +555 1 10 17 -0.32768000000000000000e5 +556 1 9 19 0.32768000000000000000e5 +556 1 10 17 -0.16384000000000000000e5 +556 1 20 27 -0.32768000000000000000e5 +556 1 28 35 0.16384000000000000000e5 +556 3 2 15 -0.16384000000000000000e5 +556 3 8 13 -0.16384000000000000000e5 +556 3 11 24 0.16384000000000000000e5 +556 4 6 10 -0.16384000000000000000e5 +557 1 4 19 -0.16384000000000000000e5 +557 1 5 20 -0.16384000000000000000e5 +557 1 9 20 0.32768000000000000000e5 +557 1 10 17 -0.16384000000000000000e5 +557 2 8 14 -0.16384000000000000000e5 +558 1 9 21 0.32768000000000000000e5 +558 1 13 20 -0.32768000000000000000e5 +559 1 8 23 -0.32768000000000000000e5 +559 1 9 22 0.32768000000000000000e5 +560 1 1 48 -0.16384000000000000000e5 +560 1 2 49 -0.16384000000000000000e5 +560 1 7 38 -0.32768000000000000000e5 +560 1 8 23 0.32768000000000000000e5 +560 1 9 23 0.32768000000000000000e5 +560 1 23 38 -0.16384000000000000000e5 +560 2 2 32 -0.16384000000000000000e5 +560 3 1 30 -0.32768000000000000000e5 +560 3 6 19 0.32768000000000000000e5 +560 3 7 20 -0.65536000000000000000e5 +560 4 2 14 0.32768000000000000000e5 +561 1 8 39 -0.32768000000000000000e5 +561 1 9 24 0.32768000000000000000e5 +561 3 6 19 -0.32768000000000000000e5 +562 1 1 48 0.16384000000000000000e5 +562 1 2 49 0.16384000000000000000e5 +562 1 5 52 -0.65536000000000000000e5 +562 1 8 39 0.32768000000000000000e5 +562 1 9 25 0.32768000000000000000e5 +562 1 10 25 0.32768000000000000000e5 +562 1 10 41 -0.65536000000000000000e5 +562 1 11 42 -0.65536000000000000000e5 +562 1 12 43 -0.13107200000000000000e6 +562 1 17 48 0.26214400000000000000e6 +562 1 23 38 0.16384000000000000000e5 +562 1 26 41 -0.32768000000000000000e5 +562 1 28 43 -0.65536000000000000000e5 +562 2 2 32 0.16384000000000000000e5 +562 2 8 22 -0.13107200000000000000e6 +562 2 12 26 0.65536000000000000000e5 +562 2 16 30 0.32768000000000000000e5 +562 3 2 31 0.65536000000000000000e5 +562 3 6 19 0.32768000000000000000e5 +562 3 8 21 -0.65536000000000000000e5 +562 3 14 27 0.13107200000000000000e6 +562 4 3 15 0.32768000000000000000e5 +562 4 4 16 0.13107200000000000000e6 +562 4 6 18 0.32768000000000000000e5 +562 4 7 19 0.65536000000000000000e5 +563 1 9 26 0.32768000000000000000e5 +563 1 10 25 -0.32768000000000000000e5 +564 1 2 33 0.32768000000000000000e5 +564 1 3 34 -0.65536000000000000000e5 +564 1 9 27 0.32768000000000000000e5 +564 1 10 41 0.32768000000000000000e5 +564 2 7 21 0.32768000000000000000e5 +564 3 8 21 0.32768000000000000000e5 +565 1 2 33 -0.32768000000000000000e5 +565 1 9 28 0.32768000000000000000e5 +566 1 9 29 0.32768000000000000000e5 +566 1 10 41 -0.32768000000000000000e5 +566 3 8 21 -0.32768000000000000000e5 +567 1 4 35 -0.65536000000000000000e5 +567 1 9 30 0.32768000000000000000e5 +567 1 10 41 0.32768000000000000000e5 +567 1 11 42 0.32768000000000000000e5 +567 2 8 22 0.32768000000000000000e5 +567 3 8 21 0.32768000000000000000e5 +567 3 9 22 0.32768000000000000000e5 +568 1 3 34 -0.32768000000000000000e5 +568 1 9 31 0.32768000000000000000e5 +569 1 4 35 0.32768000000000000000e5 +569 1 9 32 0.32768000000000000000e5 +569 1 18 25 0.32768000000000000000e5 +569 1 28 35 -0.65536000000000000000e5 +569 2 9 23 0.32768000000000000000e5 +569 3 11 24 -0.65536000000000000000e5 +570 1 4 35 -0.32768000000000000000e5 +570 1 9 33 0.32768000000000000000e5 +571 1 4 19 -0.32768000000000000000e5 +571 1 9 34 0.32768000000000000000e5 +571 3 8 13 0.32768000000000000000e5 +572 1 9 35 0.32768000000000000000e5 +572 1 28 35 -0.32768000000000000000e5 +572 3 11 24 -0.32768000000000000000e5 +573 1 9 36 0.32768000000000000000e5 +573 1 17 32 -0.32768000000000000000e5 +574 1 1 48 -0.16384000000000000000e5 +574 1 2 49 -0.16384000000000000000e5 +574 1 9 37 0.32768000000000000000e5 +574 1 23 38 -0.16384000000000000000e5 +574 2 2 32 -0.16384000000000000000e5 +574 3 1 30 -0.32768000000000000000e5 +575 1 8 39 -0.32768000000000000000e5 +575 1 9 38 0.32768000000000000000e5 +576 1 1 48 0.16384000000000000000e5 +576 1 2 49 0.16384000000000000000e5 +576 1 5 52 -0.65536000000000000000e5 +576 1 8 39 0.32768000000000000000e5 +576 1 9 39 0.32768000000000000000e5 +576 1 9 40 0.32768000000000000000e5 +576 1 10 41 -0.65536000000000000000e5 +576 1 11 42 -0.65536000000000000000e5 +576 1 12 43 -0.13107200000000000000e6 +576 1 17 48 0.26214400000000000000e6 +576 1 23 38 0.16384000000000000000e5 +576 1 26 41 -0.32768000000000000000e5 +576 1 28 43 -0.65536000000000000000e5 +576 2 2 32 0.16384000000000000000e5 +576 2 8 22 -0.13107200000000000000e6 +576 2 12 26 0.65536000000000000000e5 +576 2 16 30 0.32768000000000000000e5 +576 3 2 31 0.65536000000000000000e5 +576 3 14 27 0.13107200000000000000e6 +576 4 4 16 0.13107200000000000000e6 +576 4 6 18 0.32768000000000000000e5 +576 4 7 19 0.65536000000000000000e5 +577 1 9 41 0.32768000000000000000e5 +577 1 11 42 -0.32768000000000000000e5 +577 1 12 43 -0.65536000000000000000e5 +577 1 17 48 0.65536000000000000000e5 +577 2 8 22 -0.32768000000000000000e5 +577 2 12 26 0.32768000000000000000e5 +577 3 14 27 0.65536000000000000000e5 +577 4 4 16 0.32768000000000000000e5 +578 1 9 42 0.32768000000000000000e5 +578 1 10 41 -0.32768000000000000000e5 +579 1 9 43 0.32768000000000000000e5 +579 1 10 41 0.32768000000000000000e5 +579 1 11 42 0.32768000000000000000e5 +579 1 17 48 -0.65536000000000000000e5 +579 2 8 22 0.32768000000000000000e5 +579 3 14 27 -0.65536000000000000000e5 +579 4 4 16 -0.32768000000000000000e5 +580 1 9 44 0.32768000000000000000e5 +580 1 12 43 -0.32768000000000000000e5 +581 1 9 45 0.32768000000000000000e5 +581 1 17 48 -0.32768000000000000000e5 +581 3 14 27 -0.32768000000000000000e5 +582 1 9 46 0.32768000000000000000e5 +582 1 28 35 -0.32768000000000000000e5 +583 1 3 50 -0.32768000000000000000e5 +583 1 9 47 0.32768000000000000000e5 +584 1 1 48 0.16384000000000000000e5 +584 1 2 49 0.16384000000000000000e5 +584 1 3 50 0.32768000000000000000e5 +584 1 9 48 0.32768000000000000000e5 +584 1 11 42 -0.65536000000000000000e5 +584 1 12 43 -0.13107200000000000000e6 +584 1 17 48 0.13107200000000000000e6 +584 1 23 38 0.16384000000000000000e5 +584 2 2 32 0.16384000000000000000e5 +584 2 8 22 -0.65536000000000000000e5 +584 2 12 26 0.65536000000000000000e5 +584 2 16 30 0.32768000000000000000e5 +584 3 2 31 0.65536000000000000000e5 +584 3 14 27 0.13107200000000000000e6 +584 4 4 16 0.65536000000000000000e5 +585 1 9 49 0.32768000000000000000e5 +585 1 26 41 -0.32768000000000000000e5 +586 1 5 52 0.32768000000000000000e5 +586 1 9 50 0.32768000000000000000e5 +586 1 17 48 -0.65536000000000000000e5 +586 1 28 43 0.32768000000000000000e5 +586 2 8 22 0.32768000000000000000e5 +586 4 4 16 -0.32768000000000000000e5 +586 4 7 19 -0.32768000000000000000e5 +587 1 9 51 0.32768000000000000000e5 +587 1 28 43 -0.32768000000000000000e5 +588 1 9 52 0.32768000000000000000e5 +588 1 17 48 -0.32768000000000000000e5 +589 1 1 48 0.16384000000000000000e5 +589 1 2 49 0.16384000000000000000e5 +589 1 3 50 0.32768000000000000000e5 +589 1 9 53 0.32768000000000000000e5 +589 1 11 42 -0.65536000000000000000e5 +589 1 12 43 -0.13107200000000000000e6 +589 1 17 48 0.13107200000000000000e6 +589 1 23 38 0.16384000000000000000e5 +589 2 2 32 0.16384000000000000000e5 +589 2 8 22 -0.65536000000000000000e5 +589 2 12 26 0.65536000000000000000e5 +589 2 16 30 0.32768000000000000000e5 +589 3 2 31 0.65536000000000000000e5 +589 3 14 27 0.13107200000000000000e6 +589 3 17 30 0.32768000000000000000e5 +589 4 4 16 0.65536000000000000000e5 +590 1 9 54 0.32768000000000000000e5 +590 1 26 41 -0.32768000000000000000e5 +590 3 22 27 0.32768000000000000000e5 +591 1 9 55 0.32768000000000000000e5 +591 1 28 43 -0.32768000000000000000e5 +591 3 18 31 0.32768000000000000000e5 +592 1 9 56 0.32768000000000000000e5 +592 1 24 55 -0.32768000000000000000e5 +593 1 6 13 -0.16384000000000000000e5 +593 1 10 10 0.32768000000000000000e5 +594 1 3 18 0.65536000000000000000e5 +594 1 6 13 0.32768000000000000000e5 +594 1 10 11 0.32768000000000000000e5 +594 1 10 17 -0.13107200000000000000e6 +594 1 10 41 0.32768000000000000000e5 +594 1 11 14 0.65536000000000000000e5 +594 2 5 11 0.32768000000000000000e5 +594 2 9 11 0.65536000000000000000e5 +594 3 5 10 0.32768000000000000000e5 +594 3 8 21 0.32768000000000000000e5 +595 1 2 17 0.32768000000000000000e5 +595 1 3 18 0.32768000000000000000e5 +595 1 4 19 0.65536000000000000000e5 +595 1 10 12 0.32768000000000000000e5 +595 1 20 27 -0.13107200000000000000e6 +595 1 28 35 0.65536000000000000000e5 +595 2 6 12 0.32768000000000000000e5 +595 2 10 24 0.65536000000000000000e5 +595 3 2 15 -0.65536000000000000000e5 +595 3 8 13 -0.65536000000000000000e5 +595 3 11 24 0.65536000000000000000e5 +596 1 3 18 -0.32768000000000000000e5 +596 1 10 13 0.32768000000000000000e5 +597 1 3 18 0.32768000000000000000e5 +597 1 10 14 0.32768000000000000000e5 +597 1 10 17 -0.65536000000000000000e5 +597 1 11 14 0.32768000000000000000e5 +597 2 9 11 0.32768000000000000000e5 +598 1 10 15 0.32768000000000000000e5 +598 1 11 14 -0.32768000000000000000e5 +599 1 4 19 -0.32768000000000000000e5 +599 1 10 16 0.32768000000000000000e5 +600 1 5 20 -0.32768000000000000000e5 +600 1 10 18 0.32768000000000000000e5 +601 1 4 19 -0.16384000000000000000e5 +601 1 5 20 -0.16384000000000000000e5 +601 1 10 17 -0.16384000000000000000e5 +601 1 10 19 0.32768000000000000000e5 +601 2 8 14 -0.16384000000000000000e5 +602 1 4 19 0.16384000000000000000e5 +602 1 5 20 0.16384000000000000000e5 +602 1 6 21 0.32768000000000000000e5 +602 1 10 17 0.16384000000000000000e5 +602 1 10 20 0.32768000000000000000e5 +602 1 10 21 -0.65536000000000000000e5 +602 2 8 14 0.16384000000000000000e5 +602 2 9 15 0.32768000000000000000e5 +603 1 1 48 -0.16384000000000000000e5 +603 1 2 49 -0.16384000000000000000e5 +603 1 7 38 -0.32768000000000000000e5 +603 1 8 23 0.32768000000000000000e5 +603 1 10 22 0.32768000000000000000e5 +603 1 23 38 -0.16384000000000000000e5 +603 2 2 32 -0.16384000000000000000e5 +603 3 1 30 -0.32768000000000000000e5 +603 3 6 19 0.32768000000000000000e5 +603 3 7 20 -0.65536000000000000000e5 +603 4 2 14 0.32768000000000000000e5 +604 1 8 39 -0.32768000000000000000e5 +604 1 10 23 0.32768000000000000000e5 +604 3 6 19 -0.32768000000000000000e5 +605 1 1 48 0.16384000000000000000e5 +605 1 2 49 0.16384000000000000000e5 +605 1 5 52 -0.65536000000000000000e5 +605 1 8 39 0.32768000000000000000e5 +605 1 10 24 0.32768000000000000000e5 +605 1 10 25 0.32768000000000000000e5 +605 1 10 41 -0.65536000000000000000e5 +605 1 11 42 -0.65536000000000000000e5 +605 1 12 43 -0.13107200000000000000e6 +605 1 17 48 0.26214400000000000000e6 +605 1 23 38 0.16384000000000000000e5 +605 1 26 41 -0.32768000000000000000e5 +605 1 28 43 -0.65536000000000000000e5 +605 2 2 32 0.16384000000000000000e5 +605 2 8 22 -0.13107200000000000000e6 +605 2 12 26 0.65536000000000000000e5 +605 2 16 30 0.32768000000000000000e5 +605 3 2 31 0.65536000000000000000e5 +605 3 6 19 0.32768000000000000000e5 +605 3 8 21 -0.65536000000000000000e5 +605 3 14 27 0.13107200000000000000e6 +605 4 3 15 0.32768000000000000000e5 +605 4 4 16 0.13107200000000000000e6 +605 4 6 18 0.32768000000000000000e5 +605 4 7 19 0.65536000000000000000e5 +606 1 6 29 -0.32768000000000000000e5 +606 1 10 26 0.32768000000000000000e5 +607 1 2 33 -0.32768000000000000000e5 +607 1 10 27 0.32768000000000000000e5 +608 1 10 28 0.32768000000000000000e5 +608 1 10 41 -0.32768000000000000000e5 +608 3 8 21 -0.32768000000000000000e5 +609 1 4 35 -0.65536000000000000000e5 +609 1 10 29 0.32768000000000000000e5 +609 1 10 41 0.32768000000000000000e5 +609 1 11 42 0.32768000000000000000e5 +609 2 8 22 0.32768000000000000000e5 +609 3 8 21 0.32768000000000000000e5 +609 3 9 22 0.32768000000000000000e5 +610 1 10 30 0.32768000000000000000e5 +610 1 11 42 -0.32768000000000000000e5 +610 3 9 22 -0.32768000000000000000e5 +611 1 4 35 0.32768000000000000000e5 +611 1 10 31 0.32768000000000000000e5 +611 1 18 25 0.32768000000000000000e5 +611 1 28 35 -0.65536000000000000000e5 +611 2 9 23 0.32768000000000000000e5 +611 3 11 24 -0.65536000000000000000e5 +612 1 4 35 -0.32768000000000000000e5 +612 1 10 32 0.32768000000000000000e5 +613 1 10 33 0.32768000000000000000e5 +613 1 18 25 -0.32768000000000000000e5 +614 1 10 34 0.32768000000000000000e5 +614 1 28 35 -0.32768000000000000000e5 +614 3 11 24 -0.32768000000000000000e5 +615 1 5 36 -0.32768000000000000000e5 +615 1 10 35 0.32768000000000000000e5 +616 1 10 36 0.32768000000000000000e5 +616 1 29 36 -0.32768000000000000000e5 +616 3 12 25 -0.32768000000000000000e5 +617 1 8 39 -0.32768000000000000000e5 +617 1 10 37 0.32768000000000000000e5 +618 1 1 48 0.16384000000000000000e5 +618 1 2 49 0.16384000000000000000e5 +618 1 5 52 -0.65536000000000000000e5 +618 1 8 39 0.32768000000000000000e5 +618 1 9 40 0.32768000000000000000e5 +618 1 10 38 0.32768000000000000000e5 +618 1 10 41 -0.65536000000000000000e5 +618 1 11 42 -0.65536000000000000000e5 +618 1 12 43 -0.13107200000000000000e6 +618 1 17 48 0.26214400000000000000e6 +618 1 23 38 0.16384000000000000000e5 +618 1 26 41 -0.32768000000000000000e5 +618 1 28 43 -0.65536000000000000000e5 +618 2 2 32 0.16384000000000000000e5 +618 2 8 22 -0.13107200000000000000e6 +618 2 12 26 0.65536000000000000000e5 +618 2 16 30 0.32768000000000000000e5 +618 3 2 31 0.65536000000000000000e5 +618 3 14 27 0.13107200000000000000e6 +618 4 4 16 0.13107200000000000000e6 +618 4 6 18 0.32768000000000000000e5 +618 4 7 19 0.65536000000000000000e5 +619 1 9 40 -0.32768000000000000000e5 +619 1 10 39 0.32768000000000000000e5 +620 1 10 40 0.32768000000000000000e5 +620 1 26 29 -0.32768000000000000000e5 +621 1 10 41 0.32768000000000000000e5 +621 1 10 42 0.32768000000000000000e5 +621 1 11 42 0.32768000000000000000e5 +621 1 17 48 -0.65536000000000000000e5 +621 2 8 22 0.32768000000000000000e5 +621 3 14 27 -0.65536000000000000000e5 +621 4 4 16 -0.32768000000000000000e5 +622 1 10 43 0.32768000000000000000e5 +622 1 11 42 -0.32768000000000000000e5 +623 1 10 44 0.32768000000000000000e5 +623 1 17 48 -0.32768000000000000000e5 +623 3 14 27 -0.32768000000000000000e5 +624 1 10 45 0.32768000000000000000e5 +624 1 18 25 -0.32768000000000000000e5 +624 3 14 19 0.32768000000000000000e5 +625 1 10 46 0.32768000000000000000e5 +625 1 14 45 -0.32768000000000000000e5 +626 1 1 48 0.16384000000000000000e5 +626 1 2 49 0.16384000000000000000e5 +626 1 3 50 0.32768000000000000000e5 +626 1 10 47 0.32768000000000000000e5 +626 1 11 42 -0.65536000000000000000e5 +626 1 12 43 -0.13107200000000000000e6 +626 1 17 48 0.13107200000000000000e6 +626 1 23 38 0.16384000000000000000e5 +626 2 2 32 0.16384000000000000000e5 +626 2 8 22 -0.65536000000000000000e5 +626 2 12 26 0.65536000000000000000e5 +626 2 16 30 0.32768000000000000000e5 +626 3 2 31 0.65536000000000000000e5 +626 3 14 27 0.13107200000000000000e6 +626 4 4 16 0.65536000000000000000e5 +627 1 10 48 0.32768000000000000000e5 +627 1 26 41 -0.32768000000000000000e5 +628 1 1 48 -0.16384000000000000000e5 +628 1 2 49 -0.16384000000000000000e5 +628 1 3 50 -0.32768000000000000000e5 +628 1 10 49 0.32768000000000000000e5 +628 1 11 42 0.65536000000000000000e5 +628 1 12 43 0.13107200000000000000e6 +628 1 17 48 -0.13107200000000000000e6 +628 1 23 38 -0.16384000000000000000e5 +628 1 26 41 0.32768000000000000000e5 +628 1 28 43 -0.65536000000000000000e5 +628 2 2 32 -0.16384000000000000000e5 +628 2 4 34 0.32768000000000000000e5 +628 2 8 22 0.65536000000000000000e5 +628 2 12 26 -0.65536000000000000000e5 +628 2 16 30 -0.32768000000000000000e5 +628 3 2 31 -0.65536000000000000000e5 +628 3 14 27 -0.13107200000000000000e6 +628 4 4 16 -0.65536000000000000000e5 +629 1 10 50 0.32768000000000000000e5 +629 1 28 43 -0.32768000000000000000e5 +630 1 5 52 -0.32768000000000000000e5 +630 1 10 51 0.32768000000000000000e5 +631 1 10 52 0.32768000000000000000e5 +631 1 14 45 -0.65536000000000000000e5 +631 1 17 48 0.32768000000000000000e5 +631 1 18 49 0.32768000000000000000e5 +631 2 24 30 0.32768000000000000000e5 +631 3 15 28 0.65536000000000000000e5 +632 1 10 53 0.32768000000000000000e5 +632 1 26 41 -0.32768000000000000000e5 +632 3 22 27 0.32768000000000000000e5 +633 1 1 48 -0.16384000000000000000e5 +633 1 2 49 -0.16384000000000000000e5 +633 1 3 50 -0.32768000000000000000e5 +633 1 10 54 0.32768000000000000000e5 +633 1 11 42 0.65536000000000000000e5 +633 1 12 43 0.13107200000000000000e6 +633 1 17 48 -0.13107200000000000000e6 +633 1 23 38 -0.16384000000000000000e5 +633 1 26 41 0.32768000000000000000e5 +633 1 28 43 -0.65536000000000000000e5 +633 2 2 32 -0.16384000000000000000e5 +633 2 4 34 0.32768000000000000000e5 +633 2 8 22 0.65536000000000000000e5 +633 2 12 26 -0.65536000000000000000e5 +633 2 16 30 -0.32768000000000000000e5 +633 3 2 31 -0.65536000000000000000e5 +633 3 5 34 0.32768000000000000000e5 +633 3 14 27 -0.13107200000000000000e6 +633 4 4 16 -0.65536000000000000000e5 +634 1 10 55 0.32768000000000000000e5 +634 1 33 48 -0.32768000000000000000e5 +635 1 1 48 -0.16384000000000000000e5 +635 1 2 49 -0.16384000000000000000e5 +635 1 3 50 -0.32768000000000000000e5 +635 1 10 56 0.32768000000000000000e5 +635 1 11 42 0.65536000000000000000e5 +635 1 12 43 0.13107200000000000000e6 +635 1 17 48 -0.13107200000000000000e6 +635 1 23 38 -0.16384000000000000000e5 +635 1 24 55 0.32768000000000000000e5 +635 1 28 43 -0.65536000000000000000e5 +635 2 2 32 -0.16384000000000000000e5 +635 2 8 22 0.65536000000000000000e5 +635 2 12 26 -0.65536000000000000000e5 +635 2 16 30 -0.32768000000000000000e5 +635 2 21 35 0.32768000000000000000e5 +635 3 2 31 -0.65536000000000000000e5 +635 3 14 27 -0.13107200000000000000e6 +635 3 17 30 -0.32768000000000000000e5 +635 3 18 31 0.65536000000000000000e5 +635 3 20 33 -0.32768000000000000000e5 +635 3 21 34 0.65536000000000000000e5 +635 4 4 16 -0.65536000000000000000e5 +636 1 3 18 -0.32768000000000000000e5 +636 1 10 17 0.65536000000000000000e5 +636 1 10 41 -0.16384000000000000000e5 +636 1 11 11 0.32768000000000000000e5 +636 1 11 14 -0.65536000000000000000e5 +636 2 5 11 -0.16384000000000000000e5 +636 2 9 9 0.32768000000000000000e5 +636 2 9 11 -0.32768000000000000000e5 +636 3 5 10 -0.16384000000000000000e5 +636 3 8 21 -0.16384000000000000000e5 +637 1 3 18 -0.32768000000000000000e5 +637 1 11 12 0.32768000000000000000e5 +638 1 3 18 0.32768000000000000000e5 +638 1 10 17 -0.65536000000000000000e5 +638 1 11 13 0.32768000000000000000e5 +638 1 11 14 0.32768000000000000000e5 +638 2 9 11 0.32768000000000000000e5 +639 1 3 18 -0.32768000000000000000e5 +639 1 5 20 -0.65536000000000000000e5 +639 1 10 17 0.65536000000000000000e5 +639 1 11 15 0.32768000000000000000e5 +639 2 9 11 -0.32768000000000000000e5 +639 2 9 12 0.32768000000000000000e5 +640 1 10 17 -0.32768000000000000000e5 +640 1 11 16 0.32768000000000000000e5 +641 1 5 20 -0.32768000000000000000e5 +641 1 11 17 0.32768000000000000000e5 +642 1 4 19 0.16384000000000000000e5 +642 1 5 20 0.16384000000000000000e5 +642 1 6 21 0.32768000000000000000e5 +642 1 10 17 0.16384000000000000000e5 +642 1 10 21 -0.65536000000000000000e5 +642 1 11 19 0.32768000000000000000e5 +642 2 8 14 0.16384000000000000000e5 +642 2 9 15 0.32768000000000000000e5 +643 1 6 21 -0.32768000000000000000e5 +643 1 11 20 0.32768000000000000000e5 +644 1 10 21 0.32768000000000000000e5 +644 1 11 21 0.32768000000000000000e5 +644 1 13 20 0.32768000000000000000e5 +644 1 14 21 -0.65536000000000000000e5 +644 2 14 14 0.65536000000000000000e5 +645 1 8 39 -0.32768000000000000000e5 +645 1 11 22 0.32768000000000000000e5 +645 3 6 19 -0.32768000000000000000e5 +646 1 1 48 0.16384000000000000000e5 +646 1 2 49 0.16384000000000000000e5 +646 1 5 52 -0.65536000000000000000e5 +646 1 8 39 0.32768000000000000000e5 +646 1 10 25 0.32768000000000000000e5 +646 1 10 41 -0.65536000000000000000e5 +646 1 11 23 0.32768000000000000000e5 +646 1 11 42 -0.65536000000000000000e5 +646 1 12 43 -0.13107200000000000000e6 +646 1 17 48 0.26214400000000000000e6 +646 1 23 38 0.16384000000000000000e5 +646 1 26 41 -0.32768000000000000000e5 +646 1 28 43 -0.65536000000000000000e5 +646 2 2 32 0.16384000000000000000e5 +646 2 8 22 -0.13107200000000000000e6 +646 2 12 26 0.65536000000000000000e5 +646 2 16 30 0.32768000000000000000e5 +646 3 2 31 0.65536000000000000000e5 +646 3 6 19 0.32768000000000000000e5 +646 3 8 21 -0.65536000000000000000e5 +646 3 14 27 0.13107200000000000000e6 +646 4 3 15 0.32768000000000000000e5 +646 4 4 16 0.13107200000000000000e6 +646 4 6 18 0.32768000000000000000e5 +646 4 7 19 0.65536000000000000000e5 +647 1 10 25 -0.32768000000000000000e5 +647 1 11 24 0.32768000000000000000e5 +648 1 6 29 -0.32768000000000000000e5 +648 1 11 25 0.32768000000000000000e5 +649 1 10 41 -0.32768000000000000000e5 +649 1 11 27 0.32768000000000000000e5 +649 3 8 21 -0.32768000000000000000e5 +650 1 4 35 -0.65536000000000000000e5 +650 1 10 41 0.32768000000000000000e5 +650 1 11 28 0.32768000000000000000e5 +650 1 11 42 0.32768000000000000000e5 +650 2 8 22 0.32768000000000000000e5 +650 3 8 21 0.32768000000000000000e5 +650 3 9 22 0.32768000000000000000e5 +651 1 11 29 0.32768000000000000000e5 +651 1 11 42 -0.32768000000000000000e5 +651 3 9 22 -0.32768000000000000000e5 +652 1 4 35 -0.32768000000000000000e5 +652 1 11 31 0.32768000000000000000e5 +653 1 11 32 0.32768000000000000000e5 +653 1 18 25 -0.32768000000000000000e5 +654 1 11 33 0.32768000000000000000e5 +654 1 15 30 -0.32768000000000000000e5 +655 1 5 36 -0.32768000000000000000e5 +655 1 11 34 0.32768000000000000000e5 +656 1 5 36 0.32768000000000000000e5 +656 1 11 35 0.32768000000000000000e5 +656 1 28 35 0.32768000000000000000e5 +656 1 29 36 -0.65536000000000000000e5 +656 2 9 25 0.32768000000000000000e5 +656 3 11 24 0.32768000000000000000e5 +656 3 12 25 -0.65536000000000000000e5 +657 1 11 36 0.32768000000000000000e5 +657 1 18 33 -0.32768000000000000000e5 +658 1 1 48 0.16384000000000000000e5 +658 1 2 49 0.16384000000000000000e5 +658 1 5 52 -0.65536000000000000000e5 +658 1 8 39 0.32768000000000000000e5 +658 1 9 40 0.32768000000000000000e5 +658 1 10 41 -0.65536000000000000000e5 +658 1 11 37 0.32768000000000000000e5 +658 1 11 42 -0.65536000000000000000e5 +658 1 12 43 -0.13107200000000000000e6 +658 1 17 48 0.26214400000000000000e6 +658 1 23 38 0.16384000000000000000e5 +658 1 26 41 -0.32768000000000000000e5 +658 1 28 43 -0.65536000000000000000e5 +658 2 2 32 0.16384000000000000000e5 +658 2 8 22 -0.13107200000000000000e6 +658 2 12 26 0.65536000000000000000e5 +658 2 16 30 0.32768000000000000000e5 +658 3 2 31 0.65536000000000000000e5 +658 3 14 27 0.13107200000000000000e6 +658 4 4 16 0.13107200000000000000e6 +658 4 6 18 0.32768000000000000000e5 +658 4 7 19 0.65536000000000000000e5 +659 1 9 40 -0.32768000000000000000e5 +659 1 11 38 0.32768000000000000000e5 +660 1 11 39 0.32768000000000000000e5 +660 1 26 29 -0.32768000000000000000e5 +661 1 6 43 -0.32768000000000000000e5 +661 1 11 40 0.32768000000000000000e5 +662 1 10 41 0.32768000000000000000e5 +662 1 11 41 0.32768000000000000000e5 +662 1 11 42 0.32768000000000000000e5 +662 1 17 48 -0.65536000000000000000e5 +662 2 8 22 0.32768000000000000000e5 +662 3 14 27 -0.65536000000000000000e5 +662 4 4 16 -0.32768000000000000000e5 +663 1 11 43 0.32768000000000000000e5 +663 1 26 33 -0.32768000000000000000e5 +664 1 11 44 0.32768000000000000000e5 +664 1 18 25 -0.32768000000000000000e5 +664 3 14 19 0.32768000000000000000e5 +665 1 11 45 0.32768000000000000000e5 +665 1 14 45 -0.65536000000000000000e5 +665 1 17 48 0.32768000000000000000e5 +665 1 18 25 0.32768000000000000000e5 +665 2 14 28 0.32768000000000000000e5 +665 3 14 19 -0.32768000000000000000e5 +665 3 14 27 0.32768000000000000000e5 +666 1 11 47 0.32768000000000000000e5 +666 1 26 41 -0.32768000000000000000e5 +667 1 1 48 -0.16384000000000000000e5 +667 1 2 49 -0.16384000000000000000e5 +667 1 3 50 -0.32768000000000000000e5 +667 1 11 42 0.65536000000000000000e5 +667 1 11 48 0.32768000000000000000e5 +667 1 12 43 0.13107200000000000000e6 +667 1 17 48 -0.13107200000000000000e6 +667 1 23 38 -0.16384000000000000000e5 +667 1 26 41 0.32768000000000000000e5 +667 1 28 43 -0.65536000000000000000e5 +667 2 2 32 -0.16384000000000000000e5 +667 2 4 34 0.32768000000000000000e5 +667 2 8 22 0.65536000000000000000e5 +667 2 12 26 -0.65536000000000000000e5 +667 2 16 30 -0.32768000000000000000e5 +667 3 2 31 -0.65536000000000000000e5 +667 3 14 27 -0.13107200000000000000e6 +667 4 4 16 -0.65536000000000000000e5 +668 1 1 48 0.16384000000000000000e5 +668 1 2 49 0.16384000000000000000e5 +668 1 3 50 0.32768000000000000000e5 +668 1 5 52 -0.65536000000000000000e5 +668 1 11 42 -0.65536000000000000000e5 +668 1 11 49 0.32768000000000000000e5 +668 1 12 43 -0.13107200000000000000e6 +668 1 17 48 0.13107200000000000000e6 +668 1 23 38 0.16384000000000000000e5 +668 1 28 43 0.65536000000000000000e5 +668 2 2 32 0.16384000000000000000e5 +668 2 4 34 -0.32768000000000000000e5 +668 2 8 22 -0.65536000000000000000e5 +668 2 12 26 0.65536000000000000000e5 +668 2 16 30 0.32768000000000000000e5 +668 2 22 28 0.32768000000000000000e5 +668 3 2 31 0.65536000000000000000e5 +668 3 14 27 0.13107200000000000000e6 +668 4 4 16 0.65536000000000000000e5 +669 1 5 52 -0.32768000000000000000e5 +669 1 11 50 0.32768000000000000000e5 +670 1 11 51 0.32768000000000000000e5 +670 1 33 40 -0.32768000000000000000e5 +671 1 11 52 0.32768000000000000000e5 +671 1 18 49 -0.32768000000000000000e5 +672 1 1 48 -0.16384000000000000000e5 +672 1 2 49 -0.16384000000000000000e5 +672 1 3 50 -0.32768000000000000000e5 +672 1 11 42 0.65536000000000000000e5 +672 1 11 53 0.32768000000000000000e5 +672 1 12 43 0.13107200000000000000e6 +672 1 17 48 -0.13107200000000000000e6 +672 1 23 38 -0.16384000000000000000e5 +672 1 26 41 0.32768000000000000000e5 +672 1 28 43 -0.65536000000000000000e5 +672 2 2 32 -0.16384000000000000000e5 +672 2 4 34 0.32768000000000000000e5 +672 2 8 22 0.65536000000000000000e5 +672 2 12 26 -0.65536000000000000000e5 +672 2 16 30 -0.32768000000000000000e5 +672 3 2 31 -0.65536000000000000000e5 +672 3 5 34 0.32768000000000000000e5 +672 3 14 27 -0.13107200000000000000e6 +672 4 4 16 -0.65536000000000000000e5 +673 1 1 48 0.16384000000000000000e5 +673 1 2 49 0.16384000000000000000e5 +673 1 3 50 0.32768000000000000000e5 +673 1 11 42 -0.65536000000000000000e5 +673 1 11 54 0.32768000000000000000e5 +673 1 12 43 -0.13107200000000000000e6 +673 1 17 48 0.13107200000000000000e6 +673 1 23 38 0.16384000000000000000e5 +673 1 28 43 0.65536000000000000000e5 +673 1 33 48 -0.65536000000000000000e5 +673 2 2 32 0.16384000000000000000e5 +673 2 4 34 -0.32768000000000000000e5 +673 2 8 22 -0.65536000000000000000e5 +673 2 12 26 0.65536000000000000000e5 +673 2 16 30 0.32768000000000000000e5 +673 2 28 30 0.32768000000000000000e5 +673 3 2 31 0.65536000000000000000e5 +673 3 5 34 -0.32768000000000000000e5 +673 3 14 27 0.13107200000000000000e6 +673 3 22 27 -0.32768000000000000000e5 +673 4 4 16 0.65536000000000000000e5 +674 1 11 55 0.32768000000000000000e5 +674 1 15 54 -0.32768000000000000000e5 +675 1 1 48 0.16384000000000000000e5 +675 1 2 49 0.16384000000000000000e5 +675 1 3 50 0.32768000000000000000e5 +675 1 11 42 -0.65536000000000000000e5 +675 1 11 56 0.32768000000000000000e5 +675 1 12 43 -0.13107200000000000000e6 +675 1 17 48 0.13107200000000000000e6 +675 1 23 38 0.16384000000000000000e5 +675 1 28 43 0.65536000000000000000e5 +675 1 43 50 -0.65536000000000000000e5 +675 2 2 32 0.16384000000000000000e5 +675 2 8 22 -0.65536000000000000000e5 +675 2 12 26 0.65536000000000000000e5 +675 2 16 30 0.32768000000000000000e5 +675 2 21 35 -0.32768000000000000000e5 +675 2 28 34 0.32768000000000000000e5 +675 3 2 31 0.65536000000000000000e5 +675 3 14 27 0.13107200000000000000e6 +675 3 17 30 0.32768000000000000000e5 +675 3 18 31 -0.65536000000000000000e5 +675 3 20 33 0.32768000000000000000e5 +675 3 21 34 -0.65536000000000000000e5 +675 4 4 16 0.65536000000000000000e5 +676 1 7 16 -0.16384000000000000000e5 +676 1 12 12 0.32768000000000000000e5 +677 1 12 13 0.32768000000000000000e5 +677 1 13 16 -0.65536000000000000000e5 +677 1 20 27 0.65536000000000000000e5 +677 1 28 35 -0.32768000000000000000e5 +677 2 7 13 0.32768000000000000000e5 +677 2 10 24 -0.32768000000000000000e5 +677 3 2 15 0.32768000000000000000e5 +677 3 8 13 0.32768000000000000000e5 +677 3 11 24 -0.32768000000000000000e5 +678 1 4 19 0.32768000000000000000e5 +678 1 12 14 0.32768000000000000000e5 +678 1 20 27 -0.65536000000000000000e5 +678 1 28 35 0.32768000000000000000e5 +678 2 10 24 0.32768000000000000000e5 +678 3 2 15 -0.32768000000000000000e5 +678 3 8 13 -0.32768000000000000000e5 +678 3 11 24 0.32768000000000000000e5 +679 1 4 19 -0.32768000000000000000e5 +679 1 12 15 0.32768000000000000000e5 +680 1 4 19 0.16384000000000000000e5 +680 1 7 16 -0.16384000000000000000e5 +680 1 12 16 0.32768000000000000000e5 +680 1 13 16 -0.32768000000000000000e5 +680 2 1 15 -0.16384000000000000000e5 +680 2 7 13 0.16384000000000000000e5 +681 1 12 17 0.32768000000000000000e5 +681 1 13 16 -0.32768000000000000000e5 +682 1 10 17 -0.16384000000000000000e5 +682 1 12 18 0.32768000000000000000e5 +682 1 20 27 -0.32768000000000000000e5 +682 1 28 35 0.16384000000000000000e5 +682 3 2 15 -0.16384000000000000000e5 +682 3 8 13 -0.16384000000000000000e5 +682 3 11 24 0.16384000000000000000e5 +682 4 6 10 -0.16384000000000000000e5 +683 1 4 19 -0.81920000000000000000e4 +683 1 5 20 -0.81920000000000000000e4 +683 1 10 17 -0.16384000000000000000e5 +683 1 12 20 0.32768000000000000000e5 +683 1 13 16 -0.16384000000000000000e5 +683 1 20 27 -0.16384000000000000000e5 +683 1 28 35 0.81920000000000000000e4 +683 2 8 14 -0.81920000000000000000e4 +683 2 11 13 -0.16384000000000000000e5 +683 3 2 15 -0.81920000000000000000e4 +683 3 8 13 -0.81920000000000000000e4 +683 3 11 24 0.81920000000000000000e4 +683 4 6 10 -0.81920000000000000000e4 +684 1 12 21 0.32768000000000000000e5 +684 1 16 19 -0.32768000000000000000e5 +685 1 1 32 0.32768000000000000000e5 +685 1 2 33 -0.32768000000000000000e5 +685 1 3 34 0.65536000000000000000e5 +685 1 10 41 -0.32768000000000000000e5 +685 1 12 22 0.32768000000000000000e5 +685 1 12 27 -0.65536000000000000000e5 +685 2 6 20 0.32768000000000000000e5 +685 2 7 21 -0.32768000000000000000e5 +685 3 8 21 -0.32768000000000000000e5 +686 1 1 32 -0.32768000000000000000e5 +686 1 12 23 0.32768000000000000000e5 +687 1 2 33 0.32768000000000000000e5 +687 1 3 34 -0.65536000000000000000e5 +687 1 10 41 0.32768000000000000000e5 +687 1 12 24 0.32768000000000000000e5 +687 2 7 21 0.32768000000000000000e5 +687 3 8 21 0.32768000000000000000e5 +688 1 2 33 -0.32768000000000000000e5 +688 1 12 25 0.32768000000000000000e5 +689 1 10 41 -0.32768000000000000000e5 +689 1 12 26 0.32768000000000000000e5 +689 3 8 21 -0.32768000000000000000e5 +690 1 2 17 -0.32768000000000000000e5 +690 1 12 28 0.32768000000000000000e5 +690 3 1 14 0.32768000000000000000e5 +691 1 3 34 -0.32768000000000000000e5 +691 1 12 29 0.32768000000000000000e5 +692 1 4 35 0.32768000000000000000e5 +692 1 12 30 0.32768000000000000000e5 +692 1 18 25 0.32768000000000000000e5 +692 1 28 35 -0.65536000000000000000e5 +692 2 9 23 0.32768000000000000000e5 +692 3 11 24 -0.65536000000000000000e5 +693 1 12 31 0.32768000000000000000e5 +693 1 16 31 -0.65536000000000000000e5 +693 1 20 27 0.65536000000000000000e5 +693 1 28 35 -0.32768000000000000000e5 +693 2 7 13 0.32768000000000000000e5 +693 2 10 24 -0.32768000000000000000e5 +693 3 11 24 -0.32768000000000000000e5 +693 4 8 8 -0.65536000000000000000e5 +694 1 4 19 0.32768000000000000000e5 +694 1 12 32 0.32768000000000000000e5 +694 1 20 27 -0.65536000000000000000e5 +694 1 28 35 0.32768000000000000000e5 +694 2 10 24 0.32768000000000000000e5 +694 3 8 13 -0.32768000000000000000e5 +694 3 11 24 0.32768000000000000000e5 +695 1 4 19 -0.32768000000000000000e5 +695 1 12 33 0.32768000000000000000e5 +695 3 8 13 0.32768000000000000000e5 +696 1 12 34 0.32768000000000000000e5 +696 1 16 31 -0.32768000000000000000e5 +697 1 12 35 0.32768000000000000000e5 +697 1 20 27 -0.32768000000000000000e5 +698 1 4 19 -0.81920000000000000000e4 +698 1 5 20 -0.81920000000000000000e4 +698 1 10 17 -0.16384000000000000000e5 +698 1 12 36 0.32768000000000000000e5 +698 1 13 16 -0.16384000000000000000e5 +698 1 20 27 -0.16384000000000000000e5 +698 1 28 35 0.81920000000000000000e4 +698 2 8 14 -0.81920000000000000000e4 +698 2 11 13 -0.16384000000000000000e5 +698 3 2 15 -0.81920000000000000000e4 +698 3 8 13 -0.81920000000000000000e4 +698 3 10 15 0.32768000000000000000e5 +698 3 11 24 0.81920000000000000000e4 +698 4 6 10 -0.81920000000000000000e4 +699 1 2 17 -0.65536000000000000000e5 +699 1 2 33 -0.32768000000000000000e5 +699 1 3 34 0.65536000000000000000e5 +699 1 10 41 -0.32768000000000000000e5 +699 1 11 42 0.32768000000000000000e5 +699 1 12 37 0.32768000000000000000e5 +699 1 12 43 0.65536000000000000000e5 +699 1 17 48 -0.65536000000000000000e5 +699 2 1 31 0.32768000000000000000e5 +699 2 7 21 -0.32768000000000000000e5 +699 2 8 22 0.32768000000000000000e5 +699 2 12 26 -0.32768000000000000000e5 +699 3 1 14 0.65536000000000000000e5 +699 3 6 23 0.65536000000000000000e5 +699 3 7 20 -0.32768000000000000000e5 +699 3 8 21 -0.32768000000000000000e5 +699 3 14 27 -0.65536000000000000000e5 +699 4 4 16 -0.32768000000000000000e5 +700 1 2 33 0.32768000000000000000e5 +700 1 3 34 -0.65536000000000000000e5 +700 1 10 41 0.32768000000000000000e5 +700 1 12 38 0.32768000000000000000e5 +700 2 7 21 0.32768000000000000000e5 +700 3 7 20 0.32768000000000000000e5 +700 3 8 21 0.32768000000000000000e5 +701 1 11 42 -0.32768000000000000000e5 +701 1 12 39 0.32768000000000000000e5 +701 1 12 43 -0.65536000000000000000e5 +701 1 17 48 0.65536000000000000000e5 +701 2 8 22 -0.32768000000000000000e5 +701 2 12 26 0.32768000000000000000e5 +701 3 14 27 0.65536000000000000000e5 +701 4 4 16 0.32768000000000000000e5 +702 1 10 41 -0.32768000000000000000e5 +702 1 12 40 0.32768000000000000000e5 +703 1 2 17 -0.32768000000000000000e5 +703 1 12 41 0.32768000000000000000e5 +703 3 1 14 0.32768000000000000000e5 +703 3 6 23 0.32768000000000000000e5 +704 1 12 42 0.32768000000000000000e5 +704 1 16 47 -0.32768000000000000000e5 +704 3 13 26 -0.32768000000000000000e5 +705 1 4 19 0.32768000000000000000e5 +705 1 12 44 0.32768000000000000000e5 +705 1 20 27 -0.65536000000000000000e5 +705 1 28 35 0.32768000000000000000e5 +705 2 10 24 0.32768000000000000000e5 +705 3 8 13 -0.32768000000000000000e5 +705 3 10 23 0.32768000000000000000e5 +705 3 11 24 0.32768000000000000000e5 +706 1 12 45 0.32768000000000000000e5 +706 1 13 44 -0.32768000000000000000e5 +707 1 4 19 0.16384000000000000000e5 +707 1 12 46 0.32768000000000000000e5 +707 1 13 44 -0.16384000000000000000e5 +707 1 20 27 -0.32768000000000000000e5 +707 3 8 13 -0.16384000000000000000e5 +707 3 10 23 0.16384000000000000000e5 +707 3 11 24 0.16384000000000000000e5 +707 4 10 14 0.16384000000000000000e5 +708 1 5 52 -0.32768000000000000000e5 +708 1 11 42 0.32768000000000000000e5 +708 1 12 43 0.65536000000000000000e5 +708 1 12 47 0.32768000000000000000e5 +708 1 16 47 -0.65536000000000000000e5 +708 1 28 43 -0.32768000000000000000e5 +708 2 10 32 0.32768000000000000000e5 +708 2 12 26 -0.32768000000000000000e5 +708 3 2 31 -0.32768000000000000000e5 +708 3 14 27 -0.65536000000000000000e5 +708 4 7 19 0.32768000000000000000e5 +709 1 11 42 -0.32768000000000000000e5 +709 1 12 43 -0.65536000000000000000e5 +709 1 12 48 0.32768000000000000000e5 +709 1 17 48 0.65536000000000000000e5 +709 2 8 22 -0.32768000000000000000e5 +709 2 12 26 0.32768000000000000000e5 +709 3 2 31 0.32768000000000000000e5 +709 3 14 27 0.65536000000000000000e5 +709 4 4 16 0.32768000000000000000e5 +710 1 5 52 0.32768000000000000000e5 +710 1 12 49 0.32768000000000000000e5 +710 1 17 48 -0.65536000000000000000e5 +710 1 28 43 0.32768000000000000000e5 +710 2 8 22 0.32768000000000000000e5 +710 4 4 16 -0.32768000000000000000e5 +710 4 7 19 -0.32768000000000000000e5 +711 1 12 50 0.32768000000000000000e5 +711 1 16 47 -0.32768000000000000000e5 +712 1 5 52 0.16384000000000000000e5 +712 1 11 42 -0.16384000000000000000e5 +712 1 12 43 -0.32768000000000000000e5 +712 1 12 51 0.32768000000000000000e5 +712 2 12 26 0.16384000000000000000e5 +712 2 20 34 -0.16384000000000000000e5 +712 3 2 31 0.16384000000000000000e5 +712 3 14 27 0.32768000000000000000e5 +712 4 7 19 -0.16384000000000000000e5 +712 4 8 20 -0.16384000000000000000e5 +713 1 12 52 0.32768000000000000000e5 +713 1 34 41 -0.32768000000000000000e5 +714 1 12 53 0.32768000000000000000e5 +714 1 37 44 -0.32768000000000000000e5 +715 1 12 54 0.32768000000000000000e5 +715 1 32 47 -0.32768000000000000000e5 +716 1 12 55 0.32768000000000000000e5 +716 1 28 43 -0.16384000000000000000e5 +716 1 32 47 -0.16384000000000000000e5 +716 1 37 44 -0.16384000000000000000e5 +716 2 20 34 -0.16384000000000000000e5 +716 3 18 31 0.16384000000000000000e5 +717 1 12 56 0.32768000000000000000e5 +717 1 37 52 -0.32768000000000000000e5 +718 1 4 19 0.16384000000000000000e5 +718 1 13 13 0.32768000000000000000e5 +718 1 20 27 -0.32768000000000000000e5 +718 1 28 35 0.16384000000000000000e5 +718 2 10 24 0.16384000000000000000e5 +718 3 2 15 -0.16384000000000000000e5 +718 3 8 13 -0.16384000000000000000e5 +718 3 11 24 0.16384000000000000000e5 +719 1 4 19 -0.32768000000000000000e5 +719 1 13 14 0.32768000000000000000e5 +720 1 10 17 -0.32768000000000000000e5 +720 1 13 15 0.32768000000000000000e5 +721 1 10 17 -0.16384000000000000000e5 +721 1 13 17 0.32768000000000000000e5 +721 1 20 27 -0.32768000000000000000e5 +721 1 28 35 0.16384000000000000000e5 +721 3 2 15 -0.16384000000000000000e5 +721 3 8 13 -0.16384000000000000000e5 +721 3 11 24 0.16384000000000000000e5 +721 4 6 10 -0.16384000000000000000e5 +722 1 4 19 -0.16384000000000000000e5 +722 1 5 20 -0.16384000000000000000e5 +722 1 10 17 -0.16384000000000000000e5 +722 1 13 18 0.32768000000000000000e5 +722 2 8 14 -0.16384000000000000000e5 +723 1 4 19 -0.81920000000000000000e4 +723 1 5 20 -0.81920000000000000000e4 +723 1 10 17 -0.16384000000000000000e5 +723 1 13 16 -0.16384000000000000000e5 +723 1 13 19 0.32768000000000000000e5 +723 1 20 27 -0.16384000000000000000e5 +723 1 28 35 0.81920000000000000000e4 +723 2 8 14 -0.81920000000000000000e4 +723 2 11 13 -0.16384000000000000000e5 +723 3 2 15 -0.81920000000000000000e4 +723 3 8 13 -0.81920000000000000000e4 +723 3 11 24 0.81920000000000000000e4 +723 4 6 10 -0.81920000000000000000e4 +724 1 10 21 -0.16384000000000000000e5 +724 1 13 20 -0.16384000000000000000e5 +724 1 13 21 0.32768000000000000000e5 +724 1 17 32 0.16384000000000000000e5 +724 1 18 33 0.81920000000000000000e4 +724 1 19 34 -0.32768000000000000000e5 +724 1 20 27 0.81920000000000000000e4 +724 1 29 36 0.16384000000000000000e5 +724 2 11 25 0.81920000000000000000e4 +724 2 14 24 0.81920000000000000000e4 +724 3 10 15 -0.16384000000000000000e5 +724 3 12 25 0.16384000000000000000e5 +724 4 10 10 -0.32768000000000000000e5 +725 1 1 32 -0.32768000000000000000e5 +725 1 13 22 0.32768000000000000000e5 +726 1 2 33 0.32768000000000000000e5 +726 1 3 34 -0.65536000000000000000e5 +726 1 10 41 0.32768000000000000000e5 +726 1 13 23 0.32768000000000000000e5 +726 2 7 21 0.32768000000000000000e5 +726 3 8 21 0.32768000000000000000e5 +727 1 2 33 -0.32768000000000000000e5 +727 1 13 24 0.32768000000000000000e5 +728 1 10 41 -0.32768000000000000000e5 +728 1 13 25 0.32768000000000000000e5 +728 3 8 21 -0.32768000000000000000e5 +729 1 4 35 -0.65536000000000000000e5 +729 1 10 41 0.32768000000000000000e5 +729 1 11 42 0.32768000000000000000e5 +729 1 13 26 0.32768000000000000000e5 +729 2 8 22 0.32768000000000000000e5 +729 3 8 21 0.32768000000000000000e5 +729 3 9 22 0.32768000000000000000e5 +730 1 2 17 -0.32768000000000000000e5 +730 1 13 27 0.32768000000000000000e5 +730 3 1 14 0.32768000000000000000e5 +731 1 3 34 -0.32768000000000000000e5 +731 1 13 28 0.32768000000000000000e5 +732 1 4 35 0.32768000000000000000e5 +732 1 13 29 0.32768000000000000000e5 +732 1 18 25 0.32768000000000000000e5 +732 1 28 35 -0.65536000000000000000e5 +732 2 9 23 0.32768000000000000000e5 +732 3 11 24 -0.65536000000000000000e5 +733 1 4 35 -0.32768000000000000000e5 +733 1 13 30 0.32768000000000000000e5 +734 1 4 19 0.32768000000000000000e5 +734 1 13 31 0.32768000000000000000e5 +734 1 20 27 -0.65536000000000000000e5 +734 1 28 35 0.32768000000000000000e5 +734 2 10 24 0.32768000000000000000e5 +734 3 8 13 -0.32768000000000000000e5 +734 3 11 24 0.32768000000000000000e5 +735 1 4 19 -0.32768000000000000000e5 +735 1 13 32 0.32768000000000000000e5 +735 3 8 13 0.32768000000000000000e5 +736 1 13 33 0.32768000000000000000e5 +736 1 28 35 -0.32768000000000000000e5 +736 3 11 24 -0.32768000000000000000e5 +737 1 13 34 0.32768000000000000000e5 +737 1 20 27 -0.32768000000000000000e5 +738 1 13 35 0.32768000000000000000e5 +738 1 17 32 -0.32768000000000000000e5 +739 1 13 36 0.32768000000000000000e5 +739 1 17 32 -0.16384000000000000000e5 +739 1 20 27 -0.16384000000000000000e5 +739 1 29 36 -0.16384000000000000000e5 +739 2 11 25 -0.16384000000000000000e5 +739 3 12 25 -0.16384000000000000000e5 +740 1 2 33 0.32768000000000000000e5 +740 1 3 34 -0.65536000000000000000e5 +740 1 10 41 0.32768000000000000000e5 +740 1 13 37 0.32768000000000000000e5 +740 2 7 21 0.32768000000000000000e5 +740 3 7 20 0.32768000000000000000e5 +740 3 8 21 0.32768000000000000000e5 +741 1 11 42 -0.32768000000000000000e5 +741 1 12 43 -0.65536000000000000000e5 +741 1 13 38 0.32768000000000000000e5 +741 1 17 48 0.65536000000000000000e5 +741 2 8 22 -0.32768000000000000000e5 +741 2 12 26 0.32768000000000000000e5 +741 3 14 27 0.65536000000000000000e5 +741 4 4 16 0.32768000000000000000e5 +742 1 10 41 -0.32768000000000000000e5 +742 1 13 39 0.32768000000000000000e5 +743 1 10 41 0.32768000000000000000e5 +743 1 11 42 0.32768000000000000000e5 +743 1 13 40 0.32768000000000000000e5 +743 1 17 48 -0.65536000000000000000e5 +743 2 8 22 0.32768000000000000000e5 +743 3 14 27 -0.65536000000000000000e5 +743 4 4 16 -0.32768000000000000000e5 +744 1 13 41 0.32768000000000000000e5 +744 1 16 47 -0.32768000000000000000e5 +744 3 13 26 -0.32768000000000000000e5 +745 1 12 43 -0.32768000000000000000e5 +745 1 13 42 0.32768000000000000000e5 +746 1 13 43 0.32768000000000000000e5 +746 1 17 48 -0.32768000000000000000e5 +746 3 14 27 -0.32768000000000000000e5 +747 1 13 45 0.32768000000000000000e5 +747 1 28 35 -0.32768000000000000000e5 +748 1 13 46 0.32768000000000000000e5 +748 1 19 42 -0.32768000000000000000e5 +749 1 11 42 -0.32768000000000000000e5 +749 1 12 43 -0.65536000000000000000e5 +749 1 13 47 0.32768000000000000000e5 +749 1 17 48 0.65536000000000000000e5 +749 2 8 22 -0.32768000000000000000e5 +749 2 12 26 0.32768000000000000000e5 +749 3 2 31 0.32768000000000000000e5 +749 3 14 27 0.65536000000000000000e5 +749 4 4 16 0.32768000000000000000e5 +750 1 5 52 0.32768000000000000000e5 +750 1 13 48 0.32768000000000000000e5 +750 1 17 48 -0.65536000000000000000e5 +750 1 28 43 0.32768000000000000000e5 +750 2 8 22 0.32768000000000000000e5 +750 4 4 16 -0.32768000000000000000e5 +750 4 7 19 -0.32768000000000000000e5 +751 1 13 49 0.32768000000000000000e5 +751 1 28 43 -0.32768000000000000000e5 +752 1 5 52 0.16384000000000000000e5 +752 1 11 42 -0.16384000000000000000e5 +752 1 12 43 -0.32768000000000000000e5 +752 1 13 50 0.32768000000000000000e5 +752 2 12 26 0.16384000000000000000e5 +752 2 20 34 -0.16384000000000000000e5 +752 3 2 31 0.16384000000000000000e5 +752 3 14 27 0.32768000000000000000e5 +752 4 7 19 -0.16384000000000000000e5 +752 4 8 20 -0.16384000000000000000e5 +753 1 13 51 0.32768000000000000000e5 +753 1 17 48 -0.32768000000000000000e5 +754 1 13 53 0.32768000000000000000e5 +754 1 32 47 -0.32768000000000000000e5 +755 1 13 54 0.32768000000000000000e5 +755 1 28 43 -0.32768000000000000000e5 +755 3 18 31 0.32768000000000000000e5 +756 1 13 55 0.32768000000000000000e5 +756 1 17 48 -0.32768000000000000000e5 +756 3 24 29 0.32768000000000000000e5 +757 1 13 56 0.32768000000000000000e5 +757 1 28 43 -0.32768000000000000000e5 +757 3 18 31 0.32768000000000000000e5 +757 3 21 34 0.32768000000000000000e5 +758 1 10 17 -0.16384000000000000000e5 +758 1 14 14 0.32768000000000000000e5 +759 1 5 20 -0.32768000000000000000e5 +759 1 14 15 0.32768000000000000000e5 +760 1 10 17 -0.16384000000000000000e5 +760 1 14 16 0.32768000000000000000e5 +760 1 20 27 -0.32768000000000000000e5 +760 1 28 35 0.16384000000000000000e5 +760 3 2 15 -0.16384000000000000000e5 +760 3 8 13 -0.16384000000000000000e5 +760 3 11 24 0.16384000000000000000e5 +760 4 6 10 -0.16384000000000000000e5 +761 1 4 19 -0.16384000000000000000e5 +761 1 5 20 -0.16384000000000000000e5 +761 1 10 17 -0.16384000000000000000e5 +761 1 14 17 0.32768000000000000000e5 +761 2 8 14 -0.16384000000000000000e5 +762 1 4 19 0.16384000000000000000e5 +762 1 5 20 0.16384000000000000000e5 +762 1 6 21 0.32768000000000000000e5 +762 1 10 17 0.16384000000000000000e5 +762 1 10 21 -0.65536000000000000000e5 +762 1 14 18 0.32768000000000000000e5 +762 2 8 14 0.16384000000000000000e5 +762 2 9 15 0.32768000000000000000e5 +763 1 13 20 -0.32768000000000000000e5 +763 1 14 19 0.32768000000000000000e5 +764 1 10 21 -0.32768000000000000000e5 +764 1 14 20 0.32768000000000000000e5 +765 1 2 33 0.32768000000000000000e5 +765 1 3 34 -0.65536000000000000000e5 +765 1 10 41 0.32768000000000000000e5 +765 1 14 22 0.32768000000000000000e5 +765 2 7 21 0.32768000000000000000e5 +765 3 8 21 0.32768000000000000000e5 +766 1 2 33 -0.32768000000000000000e5 +766 1 14 23 0.32768000000000000000e5 +767 1 10 41 -0.32768000000000000000e5 +767 1 14 24 0.32768000000000000000e5 +767 3 8 21 -0.32768000000000000000e5 +768 1 4 35 -0.65536000000000000000e5 +768 1 10 41 0.32768000000000000000e5 +768 1 11 42 0.32768000000000000000e5 +768 1 14 25 0.32768000000000000000e5 +768 2 8 22 0.32768000000000000000e5 +768 3 8 21 0.32768000000000000000e5 +768 3 9 22 0.32768000000000000000e5 +769 1 11 42 -0.32768000000000000000e5 +769 1 14 26 0.32768000000000000000e5 +769 3 9 22 -0.32768000000000000000e5 +770 1 3 34 -0.32768000000000000000e5 +770 1 14 27 0.32768000000000000000e5 +771 1 4 35 0.32768000000000000000e5 +771 1 14 28 0.32768000000000000000e5 +771 1 18 25 0.32768000000000000000e5 +771 1 28 35 -0.65536000000000000000e5 +771 2 9 23 0.32768000000000000000e5 +771 3 11 24 -0.65536000000000000000e5 +772 1 4 35 -0.32768000000000000000e5 +772 1 14 29 0.32768000000000000000e5 +773 1 14 30 0.32768000000000000000e5 +773 1 18 25 -0.32768000000000000000e5 +774 1 4 19 -0.32768000000000000000e5 +774 1 14 31 0.32768000000000000000e5 +774 3 8 13 0.32768000000000000000e5 +775 1 14 32 0.32768000000000000000e5 +775 1 28 35 -0.32768000000000000000e5 +775 3 11 24 -0.32768000000000000000e5 +776 1 5 36 -0.32768000000000000000e5 +776 1 14 33 0.32768000000000000000e5 +777 1 14 34 0.32768000000000000000e5 +777 1 17 32 -0.32768000000000000000e5 +778 1 14 35 0.32768000000000000000e5 +778 1 29 36 -0.32768000000000000000e5 +778 3 12 25 -0.32768000000000000000e5 +779 1 14 36 0.32768000000000000000e5 +779 1 17 32 -0.16384000000000000000e5 +779 1 18 33 -0.16384000000000000000e5 +779 1 29 36 -0.16384000000000000000e5 +779 2 14 24 -0.16384000000000000000e5 +779 3 12 25 -0.16384000000000000000e5 +780 1 11 42 -0.32768000000000000000e5 +780 1 12 43 -0.65536000000000000000e5 +780 1 14 37 0.32768000000000000000e5 +780 1 17 48 0.65536000000000000000e5 +780 2 8 22 -0.32768000000000000000e5 +780 2 12 26 0.32768000000000000000e5 +780 3 14 27 0.65536000000000000000e5 +780 4 4 16 0.32768000000000000000e5 +781 1 10 41 -0.32768000000000000000e5 +781 1 14 38 0.32768000000000000000e5 +782 1 10 41 0.32768000000000000000e5 +782 1 11 42 0.32768000000000000000e5 +782 1 14 39 0.32768000000000000000e5 +782 1 17 48 -0.65536000000000000000e5 +782 2 8 22 0.32768000000000000000e5 +782 3 14 27 -0.65536000000000000000e5 +782 4 4 16 -0.32768000000000000000e5 +783 1 11 42 -0.32768000000000000000e5 +783 1 14 40 0.32768000000000000000e5 +784 1 12 43 -0.32768000000000000000e5 +784 1 14 41 0.32768000000000000000e5 +785 1 14 42 0.32768000000000000000e5 +785 1 17 48 -0.32768000000000000000e5 +785 3 14 27 -0.32768000000000000000e5 +786 1 14 43 0.32768000000000000000e5 +786 1 18 25 -0.32768000000000000000e5 +786 3 14 19 0.32768000000000000000e5 +787 1 14 44 0.32768000000000000000e5 +787 1 28 35 -0.32768000000000000000e5 +788 1 14 46 0.32768000000000000000e5 +788 1 29 36 -0.32768000000000000000e5 +789 1 5 52 0.32768000000000000000e5 +789 1 14 47 0.32768000000000000000e5 +789 1 17 48 -0.65536000000000000000e5 +789 1 28 43 0.32768000000000000000e5 +789 2 8 22 0.32768000000000000000e5 +789 4 4 16 -0.32768000000000000000e5 +789 4 7 19 -0.32768000000000000000e5 +790 1 14 48 0.32768000000000000000e5 +790 1 28 43 -0.32768000000000000000e5 +791 1 5 52 -0.32768000000000000000e5 +791 1 14 49 0.32768000000000000000e5 +792 1 14 50 0.32768000000000000000e5 +792 1 17 48 -0.32768000000000000000e5 +793 1 14 45 -0.65536000000000000000e5 +793 1 14 51 0.32768000000000000000e5 +793 1 17 48 0.32768000000000000000e5 +793 1 18 49 0.32768000000000000000e5 +793 2 24 30 0.32768000000000000000e5 +793 3 15 28 0.65536000000000000000e5 +794 1 14 45 -0.32768000000000000000e5 +794 1 14 52 0.32768000000000000000e5 +794 3 15 28 0.32768000000000000000e5 +795 1 14 53 0.32768000000000000000e5 +795 1 28 43 -0.32768000000000000000e5 +795 3 18 31 0.32768000000000000000e5 +796 1 14 54 0.32768000000000000000e5 +796 1 33 48 -0.32768000000000000000e5 +797 1 14 55 0.32768000000000000000e5 +797 1 34 49 -0.32768000000000000000e5 +798 1 14 56 0.32768000000000000000e5 +798 1 43 50 -0.32768000000000000000e5 +799 1 11 18 -0.16384000000000000000e5 +799 1 15 15 0.32768000000000000000e5 +800 1 4 19 -0.16384000000000000000e5 +800 1 5 20 -0.16384000000000000000e5 +800 1 10 17 -0.16384000000000000000e5 +800 1 15 16 0.32768000000000000000e5 +800 2 8 14 -0.16384000000000000000e5 +801 1 4 19 0.16384000000000000000e5 +801 1 5 20 0.16384000000000000000e5 +801 1 6 21 0.32768000000000000000e5 +801 1 10 17 0.16384000000000000000e5 +801 1 10 21 -0.65536000000000000000e5 +801 1 15 17 0.32768000000000000000e5 +801 2 8 14 0.16384000000000000000e5 +801 2 9 15 0.32768000000000000000e5 +802 1 6 21 -0.32768000000000000000e5 +802 1 15 18 0.32768000000000000000e5 +803 1 10 21 -0.32768000000000000000e5 +803 1 15 19 0.32768000000000000000e5 +804 1 10 21 0.32768000000000000000e5 +804 1 13 20 0.32768000000000000000e5 +804 1 14 21 -0.65536000000000000000e5 +804 1 15 20 0.32768000000000000000e5 +804 2 14 14 0.65536000000000000000e5 +805 1 10 21 0.16384000000000000000e5 +805 1 13 20 0.16384000000000000000e5 +805 1 14 21 0.32768000000000000000e5 +805 1 15 21 0.32768000000000000000e5 +805 1 17 32 -0.16384000000000000000e5 +805 1 18 33 -0.81920000000000000000e4 +805 1 19 20 -0.65536000000000000000e5 +805 1 19 34 0.32768000000000000000e5 +805 1 20 27 -0.81920000000000000000e4 +805 1 29 36 -0.16384000000000000000e5 +805 2 11 25 -0.81920000000000000000e4 +805 2 14 15 0.32768000000000000000e5 +805 2 14 24 -0.81920000000000000000e4 +805 3 10 15 0.16384000000000000000e5 +805 3 12 25 -0.16384000000000000000e5 +805 4 10 10 0.32768000000000000000e5 +806 1 2 33 -0.32768000000000000000e5 +806 1 15 22 0.32768000000000000000e5 +807 1 10 41 -0.32768000000000000000e5 +807 1 15 23 0.32768000000000000000e5 +807 3 8 21 -0.32768000000000000000e5 +808 1 4 35 -0.65536000000000000000e5 +808 1 10 41 0.32768000000000000000e5 +808 1 11 42 0.32768000000000000000e5 +808 1 15 24 0.32768000000000000000e5 +808 2 8 22 0.32768000000000000000e5 +808 3 8 21 0.32768000000000000000e5 +808 3 9 22 0.32768000000000000000e5 +809 1 11 42 -0.32768000000000000000e5 +809 1 15 25 0.32768000000000000000e5 +809 3 9 22 -0.32768000000000000000e5 +810 1 11 30 -0.32768000000000000000e5 +810 1 15 26 0.32768000000000000000e5 +811 1 4 35 0.32768000000000000000e5 +811 1 15 27 0.32768000000000000000e5 +811 1 18 25 0.32768000000000000000e5 +811 1 28 35 -0.65536000000000000000e5 +811 2 9 23 0.32768000000000000000e5 +811 3 11 24 -0.65536000000000000000e5 +812 1 4 35 -0.32768000000000000000e5 +812 1 15 28 0.32768000000000000000e5 +813 1 15 29 0.32768000000000000000e5 +813 1 18 25 -0.32768000000000000000e5 +814 1 15 31 0.32768000000000000000e5 +814 1 28 35 -0.32768000000000000000e5 +814 3 11 24 -0.32768000000000000000e5 +815 1 5 36 -0.32768000000000000000e5 +815 1 15 32 0.32768000000000000000e5 +816 1 5 36 0.32768000000000000000e5 +816 1 15 33 0.32768000000000000000e5 +816 1 28 35 0.32768000000000000000e5 +816 1 29 36 -0.65536000000000000000e5 +816 2 9 25 0.32768000000000000000e5 +816 3 11 24 0.32768000000000000000e5 +816 3 12 25 -0.65536000000000000000e5 +817 1 15 34 0.32768000000000000000e5 +817 1 29 36 -0.32768000000000000000e5 +817 3 12 25 -0.32768000000000000000e5 +818 1 15 35 0.32768000000000000000e5 +818 1 18 33 -0.32768000000000000000e5 +819 1 15 36 0.32768000000000000000e5 +819 1 18 35 -0.32768000000000000000e5 +820 1 10 41 -0.32768000000000000000e5 +820 1 15 37 0.32768000000000000000e5 +821 1 10 41 0.32768000000000000000e5 +821 1 11 42 0.32768000000000000000e5 +821 1 15 38 0.32768000000000000000e5 +821 1 17 48 -0.65536000000000000000e5 +821 2 8 22 0.32768000000000000000e5 +821 3 14 27 -0.65536000000000000000e5 +821 4 4 16 -0.32768000000000000000e5 +822 1 11 42 -0.32768000000000000000e5 +822 1 15 39 0.32768000000000000000e5 +823 1 15 40 0.32768000000000000000e5 +823 1 26 33 -0.32768000000000000000e5 +824 1 15 41 0.32768000000000000000e5 +824 1 17 48 -0.32768000000000000000e5 +824 3 14 27 -0.32768000000000000000e5 +825 1 15 42 0.32768000000000000000e5 +825 1 18 25 -0.32768000000000000000e5 +825 3 14 19 0.32768000000000000000e5 +826 1 14 45 -0.65536000000000000000e5 +826 1 15 43 0.32768000000000000000e5 +826 1 17 48 0.32768000000000000000e5 +826 1 18 25 0.32768000000000000000e5 +826 2 14 28 0.32768000000000000000e5 +826 3 14 19 -0.32768000000000000000e5 +826 3 14 27 0.32768000000000000000e5 +827 1 14 45 -0.32768000000000000000e5 +827 1 15 44 0.32768000000000000000e5 +828 1 11 46 -0.32768000000000000000e5 +828 1 15 45 0.32768000000000000000e5 +829 1 15 47 0.32768000000000000000e5 +829 1 28 43 -0.32768000000000000000e5 +830 1 5 52 -0.32768000000000000000e5 +830 1 15 48 0.32768000000000000000e5 +831 1 15 49 0.32768000000000000000e5 +831 1 33 40 -0.32768000000000000000e5 +832 1 14 45 -0.65536000000000000000e5 +832 1 15 50 0.32768000000000000000e5 +832 1 17 48 0.32768000000000000000e5 +832 1 18 49 0.32768000000000000000e5 +832 2 24 30 0.32768000000000000000e5 +832 3 15 28 0.65536000000000000000e5 +833 1 15 51 0.32768000000000000000e5 +833 1 18 49 -0.32768000000000000000e5 +834 1 13 52 0.32768000000000000000e5 +834 1 14 45 0.32768000000000000000e5 +834 1 15 52 0.32768000000000000000e5 +834 1 29 36 -0.65536000000000000000e5 +834 2 15 33 0.32768000000000000000e5 +834 3 15 28 -0.32768000000000000000e5 +834 3 24 25 0.65536000000000000000e5 +835 1 15 53 0.32768000000000000000e5 +835 1 33 48 -0.32768000000000000000e5 +836 1 15 55 0.32768000000000000000e5 +836 1 17 48 0.32768000000000000000e5 +836 1 34 49 0.32768000000000000000e5 +836 1 35 50 -0.65536000000000000000e5 +836 2 24 34 0.32768000000000000000e5 +836 3 24 29 -0.32768000000000000000e5 +837 1 15 56 0.32768000000000000000e5 +837 1 28 43 0.32768000000000000000e5 +837 1 43 50 0.32768000000000000000e5 +837 1 44 51 -0.65536000000000000000e5 +837 2 31 33 0.32768000000000000000e5 +837 3 18 31 -0.32768000000000000000e5 +837 3 21 34 -0.32768000000000000000e5 +838 1 12 19 -0.16384000000000000000e5 +838 1 16 16 0.32768000000000000000e5 +839 1 4 19 -0.81920000000000000000e4 +839 1 5 20 -0.81920000000000000000e4 +839 1 10 17 -0.16384000000000000000e5 +839 1 13 16 -0.16384000000000000000e5 +839 1 16 17 0.32768000000000000000e5 +839 1 20 27 -0.16384000000000000000e5 +839 1 28 35 0.81920000000000000000e4 +839 2 8 14 -0.81920000000000000000e4 +839 2 11 13 -0.16384000000000000000e5 +839 3 2 15 -0.81920000000000000000e4 +839 3 8 13 -0.81920000000000000000e4 +839 3 11 24 0.81920000000000000000e4 +839 4 6 10 -0.81920000000000000000e4 +840 1 13 20 -0.32768000000000000000e5 +840 1 16 18 0.32768000000000000000e5 +841 1 10 21 -0.16384000000000000000e5 +841 1 13 20 -0.16384000000000000000e5 +841 1 16 20 0.32768000000000000000e5 +841 1 17 32 0.16384000000000000000e5 +841 1 18 33 0.81920000000000000000e4 +841 1 19 34 -0.32768000000000000000e5 +841 1 20 27 0.81920000000000000000e4 +841 1 29 36 0.16384000000000000000e5 +841 2 11 25 0.81920000000000000000e4 +841 2 14 24 0.81920000000000000000e4 +841 3 10 15 -0.16384000000000000000e5 +841 3 12 25 0.16384000000000000000e5 +841 4 10 10 -0.32768000000000000000e5 +842 1 10 21 -0.81920000000000000000e4 +842 1 13 20 -0.81920000000000000000e4 +842 1 14 21 -0.16384000000000000000e5 +842 1 16 19 -0.16384000000000000000e5 +842 1 16 21 0.32768000000000000000e5 +842 1 17 32 0.81920000000000000000e4 +842 1 18 33 0.40960000000000000000e4 +842 1 19 34 -0.16384000000000000000e5 +842 1 20 27 0.40960000000000000000e4 +842 1 29 36 0.81920000000000000000e4 +842 2 11 25 0.40960000000000000000e4 +842 2 13 15 -0.16384000000000000000e5 +842 2 14 24 0.40960000000000000000e4 +842 3 10 15 -0.81920000000000000000e4 +842 3 12 25 0.81920000000000000000e4 +842 4 10 10 -0.16384000000000000000e5 +843 1 12 27 -0.32768000000000000000e5 +843 1 16 22 0.32768000000000000000e5 +844 1 2 17 -0.32768000000000000000e5 +844 1 16 23 0.32768000000000000000e5 +844 3 1 14 0.32768000000000000000e5 +845 1 3 34 -0.32768000000000000000e5 +845 1 16 24 0.32768000000000000000e5 +846 1 4 35 0.32768000000000000000e5 +846 1 16 25 0.32768000000000000000e5 +846 1 18 25 0.32768000000000000000e5 +846 1 28 35 -0.65536000000000000000e5 +846 2 9 23 0.32768000000000000000e5 +846 3 11 24 -0.65536000000000000000e5 +847 1 4 35 -0.32768000000000000000e5 +847 1 16 26 0.32768000000000000000e5 +848 1 16 27 0.32768000000000000000e5 +848 1 16 31 -0.65536000000000000000e5 +848 1 20 27 0.65536000000000000000e5 +848 1 28 35 -0.32768000000000000000e5 +848 2 7 13 0.32768000000000000000e5 +848 2 10 24 -0.32768000000000000000e5 +848 3 11 24 -0.32768000000000000000e5 +848 4 8 8 -0.65536000000000000000e5 +849 1 4 19 0.32768000000000000000e5 +849 1 16 28 0.32768000000000000000e5 +849 1 20 27 -0.65536000000000000000e5 +849 1 28 35 0.32768000000000000000e5 +849 2 10 24 0.32768000000000000000e5 +849 3 8 13 -0.32768000000000000000e5 +849 3 11 24 0.32768000000000000000e5 +850 1 4 19 -0.32768000000000000000e5 +850 1 16 29 0.32768000000000000000e5 +850 3 8 13 0.32768000000000000000e5 +851 1 16 30 0.32768000000000000000e5 +851 1 28 35 -0.32768000000000000000e5 +851 3 11 24 -0.32768000000000000000e5 +852 1 16 32 0.32768000000000000000e5 +852 1 20 27 -0.32768000000000000000e5 +853 1 16 33 0.32768000000000000000e5 +853 1 17 32 -0.32768000000000000000e5 +854 1 4 19 -0.81920000000000000000e4 +854 1 5 20 -0.81920000000000000000e4 +854 1 10 17 -0.16384000000000000000e5 +854 1 13 16 -0.16384000000000000000e5 +854 1 16 34 0.32768000000000000000e5 +854 1 20 27 -0.16384000000000000000e5 +854 1 28 35 0.81920000000000000000e4 +854 2 8 14 -0.81920000000000000000e4 +854 2 11 13 -0.16384000000000000000e5 +854 3 2 15 -0.81920000000000000000e4 +854 3 8 13 -0.81920000000000000000e4 +854 3 10 15 0.32768000000000000000e5 +854 3 11 24 0.81920000000000000000e4 +854 4 6 10 -0.81920000000000000000e4 +855 1 16 35 0.32768000000000000000e5 +855 1 17 32 -0.16384000000000000000e5 +855 1 20 27 -0.16384000000000000000e5 +855 1 29 36 -0.16384000000000000000e5 +855 2 11 25 -0.16384000000000000000e5 +855 3 12 25 -0.16384000000000000000e5 +856 1 16 36 0.32768000000000000000e5 +856 1 19 34 -0.32768000000000000000e5 +857 1 2 17 -0.32768000000000000000e5 +857 1 16 37 0.32768000000000000000e5 +857 3 1 14 0.32768000000000000000e5 +857 3 6 23 0.32768000000000000000e5 +858 1 16 38 0.32768000000000000000e5 +858 1 16 47 -0.32768000000000000000e5 +858 3 13 26 -0.32768000000000000000e5 +859 1 12 43 -0.32768000000000000000e5 +859 1 16 39 0.32768000000000000000e5 +860 1 16 40 0.32768000000000000000e5 +860 1 17 48 -0.32768000000000000000e5 +860 3 14 27 -0.32768000000000000000e5 +861 1 4 19 0.32768000000000000000e5 +861 1 16 41 0.32768000000000000000e5 +861 1 20 27 -0.65536000000000000000e5 +861 1 28 35 0.32768000000000000000e5 +861 2 10 24 0.32768000000000000000e5 +861 3 8 13 -0.32768000000000000000e5 +861 3 10 23 0.32768000000000000000e5 +861 3 11 24 0.32768000000000000000e5 +862 1 13 44 -0.32768000000000000000e5 +862 1 16 42 0.32768000000000000000e5 +863 1 16 43 0.32768000000000000000e5 +863 1 28 35 -0.32768000000000000000e5 +864 1 4 19 0.16384000000000000000e5 +864 1 13 44 -0.16384000000000000000e5 +864 1 16 44 0.32768000000000000000e5 +864 1 20 27 -0.32768000000000000000e5 +864 3 8 13 -0.16384000000000000000e5 +864 3 10 23 0.16384000000000000000e5 +864 3 11 24 0.16384000000000000000e5 +864 4 10 14 0.16384000000000000000e5 +865 1 16 45 0.32768000000000000000e5 +865 1 19 42 -0.32768000000000000000e5 +866 1 4 19 0.81920000000000000000e4 +866 1 13 44 -0.81920000000000000000e4 +866 1 16 46 0.32768000000000000000e5 +866 1 19 42 -0.16384000000000000000e5 +866 1 20 27 -0.16384000000000000000e5 +866 1 29 36 -0.16384000000000000000e5 +866 2 15 29 -0.16384000000000000000e5 +866 3 8 13 -0.81920000000000000000e4 +866 3 10 23 0.81920000000000000000e4 +866 3 11 24 0.81920000000000000000e4 +866 4 10 14 0.81920000000000000000e4 +867 1 5 52 0.16384000000000000000e5 +867 1 11 42 -0.16384000000000000000e5 +867 1 12 43 -0.32768000000000000000e5 +867 1 16 48 0.32768000000000000000e5 +867 2 12 26 0.16384000000000000000e5 +867 2 20 34 -0.16384000000000000000e5 +867 3 2 31 0.16384000000000000000e5 +867 3 14 27 0.32768000000000000000e5 +867 4 7 19 -0.16384000000000000000e5 +867 4 8 20 -0.16384000000000000000e5 +868 1 16 49 0.32768000000000000000e5 +868 1 17 48 -0.32768000000000000000e5 +869 1 16 50 0.32768000000000000000e5 +869 1 34 41 -0.32768000000000000000e5 +870 1 13 52 -0.32768000000000000000e5 +870 1 16 51 0.32768000000000000000e5 +871 1 16 52 0.32768000000000000000e5 +871 1 19 50 -0.32768000000000000000e5 +872 1 16 53 0.32768000000000000000e5 +872 1 28 43 -0.16384000000000000000e5 +872 1 32 47 -0.16384000000000000000e5 +872 1 37 44 -0.16384000000000000000e5 +872 2 20 34 -0.16384000000000000000e5 +872 3 18 31 0.16384000000000000000e5 +873 1 16 54 0.32768000000000000000e5 +873 1 17 48 -0.32768000000000000000e5 +873 3 24 29 0.32768000000000000000e5 +874 1 16 56 0.32768000000000000000e5 +874 1 17 48 -0.32768000000000000000e5 +874 1 32 47 0.16384000000000000000e5 +874 1 33 48 0.16384000000000000000e5 +874 1 37 52 -0.16384000000000000000e5 +874 1 43 50 -0.16384000000000000000e5 +874 3 21 34 0.16384000000000000000e5 +874 3 24 29 0.32768000000000000000e5 +874 4 16 20 0.16384000000000000000e5 +875 1 13 20 -0.16384000000000000000e5 +875 1 17 17 0.32768000000000000000e5 +876 1 10 21 -0.32768000000000000000e5 +876 1 17 18 0.32768000000000000000e5 +877 1 10 21 -0.16384000000000000000e5 +877 1 13 20 -0.16384000000000000000e5 +877 1 17 19 0.32768000000000000000e5 +877 1 17 32 0.16384000000000000000e5 +877 1 18 33 0.81920000000000000000e4 +877 1 19 34 -0.32768000000000000000e5 +877 1 20 27 0.81920000000000000000e4 +877 1 29 36 0.16384000000000000000e5 +877 2 11 25 0.81920000000000000000e4 +877 2 14 24 0.81920000000000000000e4 +877 3 10 15 -0.16384000000000000000e5 +877 3 12 25 0.16384000000000000000e5 +877 4 10 10 -0.32768000000000000000e5 +878 1 14 21 -0.32768000000000000000e5 +878 1 17 20 0.32768000000000000000e5 +879 1 17 21 0.32768000000000000000e5 +879 1 19 20 -0.32768000000000000000e5 +880 1 2 17 -0.32768000000000000000e5 +880 1 17 22 0.32768000000000000000e5 +880 3 1 14 0.32768000000000000000e5 +881 1 3 34 -0.32768000000000000000e5 +881 1 17 23 0.32768000000000000000e5 +882 1 4 35 0.32768000000000000000e5 +882 1 17 24 0.32768000000000000000e5 +882 1 18 25 0.32768000000000000000e5 +882 1 28 35 -0.65536000000000000000e5 +882 2 9 23 0.32768000000000000000e5 +882 3 11 24 -0.65536000000000000000e5 +883 1 4 35 -0.32768000000000000000e5 +883 1 17 25 0.32768000000000000000e5 +884 1 17 26 0.32768000000000000000e5 +884 1 18 25 -0.32768000000000000000e5 +885 1 4 19 0.32768000000000000000e5 +885 1 17 27 0.32768000000000000000e5 +885 1 20 27 -0.65536000000000000000e5 +885 1 28 35 0.32768000000000000000e5 +885 2 10 24 0.32768000000000000000e5 +885 3 8 13 -0.32768000000000000000e5 +885 3 11 24 0.32768000000000000000e5 +886 1 4 19 -0.32768000000000000000e5 +886 1 17 28 0.32768000000000000000e5 +886 3 8 13 0.32768000000000000000e5 +887 1 17 29 0.32768000000000000000e5 +887 1 28 35 -0.32768000000000000000e5 +887 3 11 24 -0.32768000000000000000e5 +888 1 5 36 -0.32768000000000000000e5 +888 1 17 30 0.32768000000000000000e5 +889 1 17 31 0.32768000000000000000e5 +889 1 20 27 -0.32768000000000000000e5 +890 1 17 33 0.32768000000000000000e5 +890 1 29 36 -0.32768000000000000000e5 +890 3 12 25 -0.32768000000000000000e5 +891 1 17 32 -0.16384000000000000000e5 +891 1 17 34 0.32768000000000000000e5 +891 1 20 27 -0.16384000000000000000e5 +891 1 29 36 -0.16384000000000000000e5 +891 2 11 25 -0.16384000000000000000e5 +891 3 12 25 -0.16384000000000000000e5 +892 1 17 32 -0.16384000000000000000e5 +892 1 17 35 0.32768000000000000000e5 +892 1 18 33 -0.16384000000000000000e5 +892 1 29 36 -0.16384000000000000000e5 +892 2 14 24 -0.16384000000000000000e5 +892 3 12 25 -0.16384000000000000000e5 +893 1 14 21 -0.32768000000000000000e5 +893 1 17 36 0.32768000000000000000e5 +893 3 14 15 0.32768000000000000000e5 +894 1 16 47 -0.32768000000000000000e5 +894 1 17 37 0.32768000000000000000e5 +894 3 13 26 -0.32768000000000000000e5 +895 1 12 43 -0.32768000000000000000e5 +895 1 17 38 0.32768000000000000000e5 +896 1 17 39 0.32768000000000000000e5 +896 1 17 48 -0.32768000000000000000e5 +896 3 14 27 -0.32768000000000000000e5 +897 1 17 40 0.32768000000000000000e5 +897 1 18 25 -0.32768000000000000000e5 +897 3 14 19 0.32768000000000000000e5 +898 1 13 44 -0.32768000000000000000e5 +898 1 17 41 0.32768000000000000000e5 +899 1 17 42 0.32768000000000000000e5 +899 1 28 35 -0.32768000000000000000e5 +900 1 14 45 -0.32768000000000000000e5 +900 1 17 43 0.32768000000000000000e5 +901 1 17 44 0.32768000000000000000e5 +901 1 19 42 -0.32768000000000000000e5 +902 1 17 45 0.32768000000000000000e5 +902 1 29 36 -0.32768000000000000000e5 +903 1 17 32 -0.16384000000000000000e5 +903 1 17 46 0.32768000000000000000e5 +903 1 18 33 -0.16384000000000000000e5 +903 1 29 36 -0.16384000000000000000e5 +903 2 14 24 -0.16384000000000000000e5 +903 3 12 25 -0.16384000000000000000e5 +903 3 15 24 0.32768000000000000000e5 +904 1 5 52 0.16384000000000000000e5 +904 1 11 42 -0.16384000000000000000e5 +904 1 12 43 -0.32768000000000000000e5 +904 1 17 47 0.32768000000000000000e5 +904 2 12 26 0.16384000000000000000e5 +904 2 20 34 -0.16384000000000000000e5 +904 3 2 31 0.16384000000000000000e5 +904 3 14 27 0.32768000000000000000e5 +904 4 7 19 -0.16384000000000000000e5 +904 4 8 20 -0.16384000000000000000e5 +905 1 14 45 -0.65536000000000000000e5 +905 1 17 48 0.32768000000000000000e5 +905 1 17 49 0.32768000000000000000e5 +905 1 18 49 0.32768000000000000000e5 +905 2 24 30 0.32768000000000000000e5 +905 3 15 28 0.65536000000000000000e5 +906 1 13 52 -0.32768000000000000000e5 +906 1 17 50 0.32768000000000000000e5 +907 1 14 45 -0.32768000000000000000e5 +907 1 17 51 0.32768000000000000000e5 +907 3 15 28 0.32768000000000000000e5 +908 1 17 52 0.32768000000000000000e5 +908 1 29 36 -0.32768000000000000000e5 +908 3 24 25 0.32768000000000000000e5 +909 1 17 48 -0.32768000000000000000e5 +909 1 17 53 0.32768000000000000000e5 +909 3 24 29 0.32768000000000000000e5 +910 1 17 54 0.32768000000000000000e5 +910 1 34 49 -0.32768000000000000000e5 +911 1 17 55 0.32768000000000000000e5 +911 1 35 50 -0.32768000000000000000e5 +912 1 17 56 0.32768000000000000000e5 +912 1 44 51 -0.32768000000000000000e5 +913 1 10 21 0.16384000000000000000e5 +913 1 13 20 0.16384000000000000000e5 +913 1 14 21 -0.32768000000000000000e5 +913 1 18 18 0.32768000000000000000e5 +913 2 14 14 0.32768000000000000000e5 +914 1 14 21 -0.32768000000000000000e5 +914 1 18 19 0.32768000000000000000e5 +915 1 10 21 0.16384000000000000000e5 +915 1 13 20 0.16384000000000000000e5 +915 1 14 21 0.32768000000000000000e5 +915 1 17 32 -0.16384000000000000000e5 +915 1 18 20 0.32768000000000000000e5 +915 1 18 33 -0.81920000000000000000e4 +915 1 19 20 -0.65536000000000000000e5 +915 1 19 34 0.32768000000000000000e5 +915 1 20 27 -0.81920000000000000000e4 +915 1 29 36 -0.16384000000000000000e5 +915 2 11 25 -0.81920000000000000000e4 +915 2 14 15 0.32768000000000000000e5 +915 2 14 24 -0.81920000000000000000e4 +915 3 10 15 0.16384000000000000000e5 +915 3 12 25 -0.16384000000000000000e5 +915 4 10 10 0.32768000000000000000e5 +916 1 3 34 -0.32768000000000000000e5 +916 1 18 22 0.32768000000000000000e5 +917 1 4 35 0.32768000000000000000e5 +917 1 18 23 0.32768000000000000000e5 +917 1 18 25 0.32768000000000000000e5 +917 1 28 35 -0.65536000000000000000e5 +917 2 9 23 0.32768000000000000000e5 +917 3 11 24 -0.65536000000000000000e5 +918 1 4 35 -0.32768000000000000000e5 +918 1 18 24 0.32768000000000000000e5 +919 1 15 30 -0.32768000000000000000e5 +919 1 18 26 0.32768000000000000000e5 +920 1 4 19 -0.32768000000000000000e5 +920 1 18 27 0.32768000000000000000e5 +920 3 8 13 0.32768000000000000000e5 +921 1 18 28 0.32768000000000000000e5 +921 1 28 35 -0.32768000000000000000e5 +921 3 11 24 -0.32768000000000000000e5 +922 1 5 36 -0.32768000000000000000e5 +922 1 18 29 0.32768000000000000000e5 +923 1 5 36 0.32768000000000000000e5 +923 1 18 30 0.32768000000000000000e5 +923 1 28 35 0.32768000000000000000e5 +923 1 29 36 -0.65536000000000000000e5 +923 2 9 25 0.32768000000000000000e5 +923 3 11 24 0.32768000000000000000e5 +923 3 12 25 -0.65536000000000000000e5 +924 1 17 32 -0.32768000000000000000e5 +924 1 18 31 0.32768000000000000000e5 +925 1 18 32 0.32768000000000000000e5 +925 1 29 36 -0.32768000000000000000e5 +925 3 12 25 -0.32768000000000000000e5 +926 1 17 32 -0.16384000000000000000e5 +926 1 18 33 -0.16384000000000000000e5 +926 1 18 34 0.32768000000000000000e5 +926 1 29 36 -0.16384000000000000000e5 +926 2 14 24 -0.16384000000000000000e5 +926 3 12 25 -0.16384000000000000000e5 +927 1 18 36 0.32768000000000000000e5 +927 1 20 35 -0.32768000000000000000e5 +928 1 12 43 -0.32768000000000000000e5 +928 1 18 37 0.32768000000000000000e5 +929 1 17 48 -0.32768000000000000000e5 +929 1 18 38 0.32768000000000000000e5 +929 3 14 27 -0.32768000000000000000e5 +930 1 18 25 -0.32768000000000000000e5 +930 1 18 39 0.32768000000000000000e5 +930 3 14 19 0.32768000000000000000e5 +931 1 14 45 -0.65536000000000000000e5 +931 1 17 48 0.32768000000000000000e5 +931 1 18 25 0.32768000000000000000e5 +931 1 18 40 0.32768000000000000000e5 +931 2 14 28 0.32768000000000000000e5 +931 3 14 19 -0.32768000000000000000e5 +931 3 14 27 0.32768000000000000000e5 +932 1 18 41 0.32768000000000000000e5 +932 1 28 35 -0.32768000000000000000e5 +933 1 14 45 -0.32768000000000000000e5 +933 1 18 42 0.32768000000000000000e5 +934 1 11 46 -0.32768000000000000000e5 +934 1 18 43 0.32768000000000000000e5 +935 1 18 44 0.32768000000000000000e5 +935 1 29 36 -0.32768000000000000000e5 +936 1 15 46 -0.32768000000000000000e5 +936 1 18 45 0.32768000000000000000e5 +937 1 18 46 0.32768000000000000000e5 +937 1 33 36 -0.32768000000000000000e5 +938 1 17 48 -0.32768000000000000000e5 +938 1 18 47 0.32768000000000000000e5 +939 1 14 45 -0.65536000000000000000e5 +939 1 17 48 0.32768000000000000000e5 +939 1 18 48 0.32768000000000000000e5 +939 1 18 49 0.32768000000000000000e5 +939 2 24 30 0.32768000000000000000e5 +939 3 15 28 0.65536000000000000000e5 +940 1 14 45 -0.32768000000000000000e5 +940 1 18 50 0.32768000000000000000e5 +940 3 15 28 0.32768000000000000000e5 +941 1 13 52 0.32768000000000000000e5 +941 1 14 45 0.32768000000000000000e5 +941 1 18 51 0.32768000000000000000e5 +941 1 29 36 -0.65536000000000000000e5 +941 2 15 33 0.32768000000000000000e5 +941 3 15 28 -0.32768000000000000000e5 +941 3 24 25 0.65536000000000000000e5 +942 1 18 52 0.32768000000000000000e5 +942 1 20 51 -0.32768000000000000000e5 +943 1 18 53 0.32768000000000000000e5 +943 1 34 49 -0.32768000000000000000e5 +944 1 17 48 0.32768000000000000000e5 +944 1 18 54 0.32768000000000000000e5 +944 1 34 49 0.32768000000000000000e5 +944 1 35 50 -0.65536000000000000000e5 +944 2 24 34 0.32768000000000000000e5 +944 3 24 29 -0.32768000000000000000e5 +945 1 18 55 0.32768000000000000000e5 +945 1 43 46 -0.32768000000000000000e5 +946 1 18 56 0.32768000000000000000e5 +946 1 46 49 -0.32768000000000000000e5 +947 1 10 21 -0.40960000000000000000e4 +947 1 13 20 -0.40960000000000000000e4 +947 1 14 21 -0.81920000000000000000e4 +947 1 16 19 -0.81920000000000000000e4 +947 1 17 32 0.40960000000000000000e4 +947 1 18 33 0.20480000000000000000e4 +947 1 19 19 0.32768000000000000000e5 +947 1 19 34 -0.81920000000000000000e4 +947 1 20 27 0.20480000000000000000e4 +947 1 29 36 0.40960000000000000000e4 +947 2 11 25 0.20480000000000000000e4 +947 2 13 15 -0.81920000000000000000e4 +947 2 14 24 0.20480000000000000000e4 +947 3 10 15 -0.40960000000000000000e4 +947 3 12 25 0.40960000000000000000e4 +947 4 10 10 -0.81920000000000000000e4 +948 1 10 21 -0.40960000000000000000e4 +948 1 13 20 -0.40960000000000000000e4 +948 1 14 21 -0.81920000000000000000e4 +948 1 16 19 -0.81920000000000000000e4 +948 1 17 32 0.40960000000000000000e4 +948 1 18 21 -0.16384000000000000000e5 +948 1 18 33 0.20480000000000000000e4 +948 1 19 20 -0.16384000000000000000e5 +948 1 19 21 0.32768000000000000000e5 +948 1 19 34 -0.81920000000000000000e4 +948 1 20 27 0.20480000000000000000e4 +948 1 29 36 0.40960000000000000000e4 +948 2 11 25 0.20480000000000000000e4 +948 2 13 15 -0.81920000000000000000e4 +948 2 14 24 0.20480000000000000000e4 +948 2 15 15 -0.32768000000000000000e5 +948 3 10 15 -0.40960000000000000000e4 +948 3 12 25 0.40960000000000000000e4 +948 4 10 10 -0.81920000000000000000e4 +949 1 16 31 -0.65536000000000000000e5 +949 1 19 22 0.32768000000000000000e5 +949 1 20 27 0.65536000000000000000e5 +949 1 28 35 -0.32768000000000000000e5 +949 2 7 13 0.32768000000000000000e5 +949 2 10 24 -0.32768000000000000000e5 +949 3 11 24 -0.32768000000000000000e5 +949 4 8 8 -0.65536000000000000000e5 +950 1 4 19 0.32768000000000000000e5 +950 1 19 23 0.32768000000000000000e5 +950 1 20 27 -0.65536000000000000000e5 +950 1 28 35 0.32768000000000000000e5 +950 2 10 24 0.32768000000000000000e5 +950 3 8 13 -0.32768000000000000000e5 +950 3 11 24 0.32768000000000000000e5 +951 1 4 19 -0.32768000000000000000e5 +951 1 19 24 0.32768000000000000000e5 +951 3 8 13 0.32768000000000000000e5 +952 1 19 25 0.32768000000000000000e5 +952 1 28 35 -0.32768000000000000000e5 +952 3 11 24 -0.32768000000000000000e5 +953 1 5 36 -0.32768000000000000000e5 +953 1 19 26 0.32768000000000000000e5 +954 1 16 31 -0.32768000000000000000e5 +954 1 19 27 0.32768000000000000000e5 +955 1 19 28 0.32768000000000000000e5 +955 1 20 27 -0.32768000000000000000e5 +956 1 17 32 -0.32768000000000000000e5 +956 1 19 29 0.32768000000000000000e5 +957 1 19 30 0.32768000000000000000e5 +957 1 29 36 -0.32768000000000000000e5 +957 3 12 25 -0.32768000000000000000e5 +958 1 4 19 -0.81920000000000000000e4 +958 1 5 20 -0.81920000000000000000e4 +958 1 10 17 -0.16384000000000000000e5 +958 1 13 16 -0.16384000000000000000e5 +958 1 19 31 0.32768000000000000000e5 +958 1 20 27 -0.16384000000000000000e5 +958 1 28 35 0.81920000000000000000e4 +958 2 8 14 -0.81920000000000000000e4 +958 2 11 13 -0.16384000000000000000e5 +958 3 2 15 -0.81920000000000000000e4 +958 3 8 13 -0.81920000000000000000e4 +958 3 10 15 0.32768000000000000000e5 +958 3 11 24 0.81920000000000000000e4 +958 4 6 10 -0.81920000000000000000e4 +959 1 17 32 -0.16384000000000000000e5 +959 1 19 32 0.32768000000000000000e5 +959 1 20 27 -0.16384000000000000000e5 +959 1 29 36 -0.16384000000000000000e5 +959 2 11 25 -0.16384000000000000000e5 +959 3 12 25 -0.16384000000000000000e5 +960 1 17 32 -0.16384000000000000000e5 +960 1 18 33 -0.16384000000000000000e5 +960 1 19 33 0.32768000000000000000e5 +960 1 29 36 -0.16384000000000000000e5 +960 2 14 24 -0.16384000000000000000e5 +960 3 12 25 -0.16384000000000000000e5 +961 1 14 21 -0.32768000000000000000e5 +961 1 19 35 0.32768000000000000000e5 +961 3 14 15 0.32768000000000000000e5 +962 1 14 21 -0.16384000000000000000e5 +962 1 19 34 -0.16384000000000000000e5 +962 1 19 36 0.32768000000000000000e5 +962 1 20 35 -0.16384000000000000000e5 +962 2 15 25 -0.16384000000000000000e5 +962 3 14 15 0.16384000000000000000e5 +963 1 4 19 0.32768000000000000000e5 +963 1 19 37 0.32768000000000000000e5 +963 1 20 27 -0.65536000000000000000e5 +963 1 28 35 0.32768000000000000000e5 +963 2 10 24 0.32768000000000000000e5 +963 3 8 13 -0.32768000000000000000e5 +963 3 10 23 0.32768000000000000000e5 +963 3 11 24 0.32768000000000000000e5 +964 1 13 44 -0.32768000000000000000e5 +964 1 19 38 0.32768000000000000000e5 +965 1 19 39 0.32768000000000000000e5 +965 1 28 35 -0.32768000000000000000e5 +966 1 14 45 -0.32768000000000000000e5 +966 1 19 40 0.32768000000000000000e5 +967 1 4 19 0.16384000000000000000e5 +967 1 13 44 -0.16384000000000000000e5 +967 1 19 41 0.32768000000000000000e5 +967 1 20 27 -0.32768000000000000000e5 +967 3 8 13 -0.16384000000000000000e5 +967 3 10 23 0.16384000000000000000e5 +967 3 11 24 0.16384000000000000000e5 +967 4 10 14 0.16384000000000000000e5 +968 1 19 43 0.32768000000000000000e5 +968 1 29 36 -0.32768000000000000000e5 +969 1 4 19 0.81920000000000000000e4 +969 1 13 44 -0.81920000000000000000e4 +969 1 19 42 -0.16384000000000000000e5 +969 1 19 44 0.32768000000000000000e5 +969 1 20 27 -0.16384000000000000000e5 +969 1 29 36 -0.16384000000000000000e5 +969 2 15 29 -0.16384000000000000000e5 +969 3 8 13 -0.81920000000000000000e4 +969 3 10 23 0.81920000000000000000e4 +969 3 11 24 0.81920000000000000000e4 +969 4 10 14 0.81920000000000000000e4 +970 1 17 32 -0.16384000000000000000e5 +970 1 18 33 -0.16384000000000000000e5 +970 1 19 45 0.32768000000000000000e5 +970 1 29 36 -0.16384000000000000000e5 +970 2 14 24 -0.16384000000000000000e5 +970 3 12 25 -0.16384000000000000000e5 +970 3 15 24 0.32768000000000000000e5 +971 1 19 46 0.32768000000000000000e5 +971 1 21 44 -0.32768000000000000000e5 +972 1 19 47 0.32768000000000000000e5 +972 1 34 41 -0.32768000000000000000e5 +973 1 13 52 -0.32768000000000000000e5 +973 1 19 48 0.32768000000000000000e5 +974 1 14 45 -0.32768000000000000000e5 +974 1 19 49 0.32768000000000000000e5 +974 3 15 28 0.32768000000000000000e5 +975 1 19 51 0.32768000000000000000e5 +975 1 29 36 -0.32768000000000000000e5 +975 3 24 25 0.32768000000000000000e5 +976 1 19 50 -0.16384000000000000000e5 +976 1 19 52 0.32768000000000000000e5 +976 1 20 51 -0.16384000000000000000e5 +976 1 29 36 -0.16384000000000000000e5 +976 2 25 31 -0.16384000000000000000e5 +976 3 24 25 0.16384000000000000000e5 +977 1 16 55 -0.32768000000000000000e5 +977 1 19 53 0.32768000000000000000e5 +978 1 19 54 0.32768000000000000000e5 +978 1 35 50 -0.32768000000000000000e5 +979 1 16 55 -0.16384000000000000000e5 +979 1 19 55 0.32768000000000000000e5 +979 1 35 50 -0.16384000000000000000e5 +979 1 43 46 -0.16384000000000000000e5 +979 2 31 31 -0.32768000000000000000e5 +980 1 19 56 0.32768000000000000000e5 +980 1 35 50 -0.32768000000000000000e5 +980 3 25 34 0.32768000000000000000e5 +981 1 18 21 -0.16384000000000000000e5 +981 1 20 20 0.32768000000000000000e5 +982 1 4 19 0.32768000000000000000e5 +982 1 20 22 0.32768000000000000000e5 +982 1 20 27 -0.65536000000000000000e5 +982 1 28 35 0.32768000000000000000e5 +982 2 10 24 0.32768000000000000000e5 +982 3 8 13 -0.32768000000000000000e5 +982 3 11 24 0.32768000000000000000e5 +983 1 4 19 -0.32768000000000000000e5 +983 1 20 23 0.32768000000000000000e5 +983 3 8 13 0.32768000000000000000e5 +984 1 20 24 0.32768000000000000000e5 +984 1 28 35 -0.32768000000000000000e5 +984 3 11 24 -0.32768000000000000000e5 +985 1 5 36 -0.32768000000000000000e5 +985 1 20 25 0.32768000000000000000e5 +986 1 5 36 0.32768000000000000000e5 +986 1 20 26 0.32768000000000000000e5 +986 1 28 35 0.32768000000000000000e5 +986 1 29 36 -0.65536000000000000000e5 +986 2 9 25 0.32768000000000000000e5 +986 3 11 24 0.32768000000000000000e5 +986 3 12 25 -0.65536000000000000000e5 +987 1 17 32 -0.32768000000000000000e5 +987 1 20 28 0.32768000000000000000e5 +988 1 20 29 0.32768000000000000000e5 +988 1 29 36 -0.32768000000000000000e5 +988 3 12 25 -0.32768000000000000000e5 +989 1 18 33 -0.32768000000000000000e5 +989 1 20 30 0.32768000000000000000e5 +990 1 17 32 -0.16384000000000000000e5 +990 1 20 27 -0.16384000000000000000e5 +990 1 20 31 0.32768000000000000000e5 +990 1 29 36 -0.16384000000000000000e5 +990 2 11 25 -0.16384000000000000000e5 +990 3 12 25 -0.16384000000000000000e5 +991 1 17 32 -0.16384000000000000000e5 +991 1 18 33 -0.16384000000000000000e5 +991 1 20 32 0.32768000000000000000e5 +991 1 29 36 -0.16384000000000000000e5 +991 2 14 24 -0.16384000000000000000e5 +991 3 12 25 -0.16384000000000000000e5 +992 1 18 35 -0.32768000000000000000e5 +992 1 20 33 0.32768000000000000000e5 +993 1 14 21 -0.32768000000000000000e5 +993 1 20 34 0.32768000000000000000e5 +993 3 14 15 0.32768000000000000000e5 +994 1 13 44 -0.32768000000000000000e5 +994 1 20 37 0.32768000000000000000e5 +995 1 20 38 0.32768000000000000000e5 +995 1 28 35 -0.32768000000000000000e5 +996 1 14 45 -0.32768000000000000000e5 +996 1 20 39 0.32768000000000000000e5 +997 1 11 46 -0.32768000000000000000e5 +997 1 20 40 0.32768000000000000000e5 +998 1 19 42 -0.32768000000000000000e5 +998 1 20 41 0.32768000000000000000e5 +999 1 20 42 0.32768000000000000000e5 +999 1 29 36 -0.32768000000000000000e5 +1000 1 15 46 -0.32768000000000000000e5 +1000 1 20 43 0.32768000000000000000e5 +1001 1 17 32 -0.16384000000000000000e5 +1001 1 18 33 -0.16384000000000000000e5 +1001 1 20 44 0.32768000000000000000e5 +1001 1 29 36 -0.16384000000000000000e5 +1001 2 14 24 -0.16384000000000000000e5 +1001 3 12 25 -0.16384000000000000000e5 +1001 3 15 24 0.32768000000000000000e5 +1002 1 20 45 0.32768000000000000000e5 +1002 1 33 36 -0.32768000000000000000e5 +1003 1 20 46 0.32768000000000000000e5 +1003 1 35 36 -0.32768000000000000000e5 +1004 1 13 52 -0.32768000000000000000e5 +1004 1 20 47 0.32768000000000000000e5 +1005 1 14 45 -0.32768000000000000000e5 +1005 1 20 48 0.32768000000000000000e5 +1005 3 15 28 0.32768000000000000000e5 +1006 1 13 52 0.32768000000000000000e5 +1006 1 14 45 0.32768000000000000000e5 +1006 1 20 49 0.32768000000000000000e5 +1006 1 29 36 -0.65536000000000000000e5 +1006 2 15 33 0.32768000000000000000e5 +1006 3 15 28 -0.32768000000000000000e5 +1006 3 24 25 0.65536000000000000000e5 +1007 1 20 50 0.32768000000000000000e5 +1007 1 29 36 -0.32768000000000000000e5 +1007 3 24 25 0.32768000000000000000e5 +1008 1 20 52 0.32768000000000000000e5 +1008 1 35 46 -0.32768000000000000000e5 +1009 1 20 53 0.32768000000000000000e5 +1009 1 35 50 -0.32768000000000000000e5 +1010 1 20 54 0.32768000000000000000e5 +1010 1 43 46 -0.32768000000000000000e5 +1011 1 20 55 0.32768000000000000000e5 +1011 1 36 51 -0.32768000000000000000e5 +1012 1 20 56 0.32768000000000000000e5 +1012 1 45 52 -0.32768000000000000000e5 +1013 1 16 31 -0.32768000000000000000e5 +1013 1 21 22 0.32768000000000000000e5 +1014 1 20 27 -0.32768000000000000000e5 +1014 1 21 23 0.32768000000000000000e5 +1015 1 17 32 -0.32768000000000000000e5 +1015 1 21 24 0.32768000000000000000e5 +1016 1 21 25 0.32768000000000000000e5 +1016 1 29 36 -0.32768000000000000000e5 +1016 3 12 25 -0.32768000000000000000e5 +1017 1 18 33 -0.32768000000000000000e5 +1017 1 21 26 0.32768000000000000000e5 +1018 1 4 19 -0.81920000000000000000e4 +1018 1 5 20 -0.81920000000000000000e4 +1018 1 10 17 -0.16384000000000000000e5 +1018 1 13 16 -0.16384000000000000000e5 +1018 1 20 27 -0.16384000000000000000e5 +1018 1 21 27 0.32768000000000000000e5 +1018 1 28 35 0.81920000000000000000e4 +1018 2 8 14 -0.81920000000000000000e4 +1018 2 11 13 -0.16384000000000000000e5 +1018 3 2 15 -0.81920000000000000000e4 +1018 3 8 13 -0.81920000000000000000e4 +1018 3 10 15 0.32768000000000000000e5 +1018 3 11 24 0.81920000000000000000e4 +1018 4 6 10 -0.81920000000000000000e4 +1019 1 17 32 -0.16384000000000000000e5 +1019 1 20 27 -0.16384000000000000000e5 +1019 1 21 28 0.32768000000000000000e5 +1019 1 29 36 -0.16384000000000000000e5 +1019 2 11 25 -0.16384000000000000000e5 +1019 3 12 25 -0.16384000000000000000e5 +1020 1 17 32 -0.16384000000000000000e5 +1020 1 18 33 -0.16384000000000000000e5 +1020 1 21 29 0.32768000000000000000e5 +1020 1 29 36 -0.16384000000000000000e5 +1020 2 14 24 -0.16384000000000000000e5 +1020 3 12 25 -0.16384000000000000000e5 +1021 1 18 35 -0.32768000000000000000e5 +1021 1 21 30 0.32768000000000000000e5 +1022 1 19 34 -0.32768000000000000000e5 +1022 1 21 31 0.32768000000000000000e5 +1023 1 14 21 -0.32768000000000000000e5 +1023 1 21 32 0.32768000000000000000e5 +1023 3 14 15 0.32768000000000000000e5 +1024 1 20 35 -0.32768000000000000000e5 +1024 1 21 33 0.32768000000000000000e5 +1025 1 14 21 -0.16384000000000000000e5 +1025 1 19 34 -0.16384000000000000000e5 +1025 1 20 35 -0.16384000000000000000e5 +1025 1 21 34 0.32768000000000000000e5 +1025 2 15 25 -0.16384000000000000000e5 +1025 3 14 15 0.16384000000000000000e5 +1026 1 20 36 -0.32768000000000000000e5 +1026 1 21 35 0.32768000000000000000e5 +1027 1 4 19 0.16384000000000000000e5 +1027 1 13 44 -0.16384000000000000000e5 +1027 1 20 27 -0.32768000000000000000e5 +1027 1 21 37 0.32768000000000000000e5 +1027 3 8 13 -0.16384000000000000000e5 +1027 3 10 23 0.16384000000000000000e5 +1027 3 11 24 0.16384000000000000000e5 +1027 4 10 14 0.16384000000000000000e5 +1028 1 19 42 -0.32768000000000000000e5 +1028 1 21 38 0.32768000000000000000e5 +1029 1 21 39 0.32768000000000000000e5 +1029 1 29 36 -0.32768000000000000000e5 +1030 1 15 46 -0.32768000000000000000e5 +1030 1 21 40 0.32768000000000000000e5 +1031 1 4 19 0.81920000000000000000e4 +1031 1 13 44 -0.81920000000000000000e4 +1031 1 19 42 -0.16384000000000000000e5 +1031 1 20 27 -0.16384000000000000000e5 +1031 1 21 41 0.32768000000000000000e5 +1031 1 29 36 -0.16384000000000000000e5 +1031 2 15 29 -0.16384000000000000000e5 +1031 3 8 13 -0.81920000000000000000e4 +1031 3 10 23 0.81920000000000000000e4 +1031 3 11 24 0.81920000000000000000e4 +1031 4 10 14 0.81920000000000000000e4 +1032 1 17 32 -0.16384000000000000000e5 +1032 1 18 33 -0.16384000000000000000e5 +1032 1 21 42 0.32768000000000000000e5 +1032 1 29 36 -0.16384000000000000000e5 +1032 2 14 24 -0.16384000000000000000e5 +1032 3 12 25 -0.16384000000000000000e5 +1032 3 15 24 0.32768000000000000000e5 +1033 1 21 43 0.32768000000000000000e5 +1033 1 33 36 -0.32768000000000000000e5 +1034 1 21 45 0.32768000000000000000e5 +1034 1 35 36 -0.32768000000000000000e5 +1035 1 19 50 -0.32768000000000000000e5 +1035 1 21 47 0.32768000000000000000e5 +1036 1 21 48 0.32768000000000000000e5 +1036 1 29 36 -0.32768000000000000000e5 +1036 3 24 25 0.32768000000000000000e5 +1037 1 20 51 -0.32768000000000000000e5 +1037 1 21 49 0.32768000000000000000e5 +1038 1 19 50 -0.16384000000000000000e5 +1038 1 20 51 -0.16384000000000000000e5 +1038 1 21 50 0.32768000000000000000e5 +1038 1 29 36 -0.16384000000000000000e5 +1038 2 25 31 -0.16384000000000000000e5 +1038 3 24 25 0.16384000000000000000e5 +1039 1 21 51 0.32768000000000000000e5 +1039 1 35 46 -0.32768000000000000000e5 +1040 1 16 55 -0.16384000000000000000e5 +1040 1 21 53 0.32768000000000000000e5 +1040 1 35 50 -0.16384000000000000000e5 +1040 1 43 46 -0.16384000000000000000e5 +1040 2 31 31 -0.32768000000000000000e5 +1041 1 21 54 0.32768000000000000000e5 +1041 1 36 51 -0.32768000000000000000e5 +1042 1 21 55 0.32768000000000000000e5 +1042 1 46 46 -0.65536000000000000000e5 +1043 1 1 24 0.16384000000000000000e5 +1043 1 1 32 0.65536000000000000000e5 +1043 1 1 48 0.16384000000000000000e5 +1043 1 2 33 -0.65536000000000000000e5 +1043 1 2 49 0.16384000000000000000e5 +1043 1 3 34 0.13107200000000000000e6 +1043 1 6 37 0.16384000000000000000e5 +1043 1 7 22 0.32768000000000000000e5 +1043 1 8 23 0.32768000000000000000e5 +1043 1 8 39 -0.32768000000000000000e5 +1043 1 10 41 -0.65536000000000000000e5 +1043 1 12 27 -0.13107200000000000000e6 +1043 1 22 22 0.32768000000000000000e5 +1043 1 23 38 0.16384000000000000000e5 +1043 2 1 7 0.32768000000000000000e5 +1043 2 2 16 0.16384000000000000000e5 +1043 2 2 32 0.16384000000000000000e5 +1043 2 3 17 -0.16384000000000000000e5 +1043 2 4 26 0.16384000000000000000e5 +1043 2 6 20 0.65536000000000000000e5 +1043 2 7 21 -0.65536000000000000000e5 +1043 3 1 16 0.16384000000000000000e5 +1043 3 1 30 0.32768000000000000000e5 +1043 3 3 16 0.16384000000000000000e5 +1043 3 8 21 -0.65536000000000000000e5 +1043 4 1 5 -0.32768000000000000000e5 +1043 4 1 13 0.16384000000000000000e5 +1044 1 1 40 0.32768000000000000000e5 +1044 1 2 33 0.13107200000000000000e6 +1044 1 2 49 0.32768000000000000000e5 +1044 1 3 34 -0.26214400000000000000e6 +1044 1 3 50 -0.65536000000000000000e5 +1044 1 5 52 0.13107200000000000000e6 +1044 1 6 37 0.32768000000000000000e5 +1044 1 10 41 0.13107200000000000000e6 +1044 1 11 42 -0.13107200000000000000e6 +1044 1 12 43 -0.26214400000000000000e6 +1044 1 16 47 0.26214400000000000000e6 +1044 1 22 23 0.32768000000000000000e5 +1044 1 22 37 -0.32768000000000000000e5 +1044 1 28 43 0.13107200000000000000e6 +1044 2 2 32 0.32768000000000000000e5 +1044 2 3 17 -0.32768000000000000000e5 +1044 2 4 26 0.32768000000000000000e5 +1044 2 7 21 0.13107200000000000000e6 +1044 2 10 32 -0.13107200000000000000e6 +1044 2 12 26 0.13107200000000000000e6 +1044 3 1 30 0.13107200000000000000e6 +1044 3 2 31 0.13107200000000000000e6 +1044 3 7 20 0.13107200000000000000e6 +1044 3 8 21 0.13107200000000000000e6 +1044 3 14 27 0.26214400000000000000e6 +1044 4 1 13 0.32768000000000000000e5 +1044 4 5 17 0.65536000000000000000e5 +1044 4 7 19 -0.13107200000000000000e6 +1044 4 11 11 0.65536000000000000000e5 +1045 1 1 48 -0.32768000000000000000e5 +1045 1 2 49 -0.32768000000000000000e5 +1045 1 6 37 -0.32768000000000000000e5 +1045 1 8 39 0.65536000000000000000e5 +1045 1 22 24 0.32768000000000000000e5 +1045 1 23 38 -0.32768000000000000000e5 +1045 2 2 32 -0.32768000000000000000e5 +1045 2 3 17 0.32768000000000000000e5 +1045 2 4 26 -0.32768000000000000000e5 +1045 3 1 30 -0.65536000000000000000e5 +1045 4 1 13 -0.32768000000000000000e5 +1046 1 1 40 -0.32768000000000000000e5 +1046 1 22 25 0.32768000000000000000e5 +1047 1 1 40 0.32768000000000000000e5 +1047 1 6 37 0.32768000000000000000e5 +1047 1 8 39 -0.65536000000000000000e5 +1047 1 22 26 0.32768000000000000000e5 +1047 2 4 26 0.32768000000000000000e5 +1048 1 1 24 0.16384000000000000000e5 +1048 1 1 32 0.65536000000000000000e5 +1048 1 1 40 0.16384000000000000000e5 +1048 1 2 49 0.16384000000000000000e5 +1048 1 3 50 -0.32768000000000000000e5 +1048 1 5 52 0.65536000000000000000e5 +1048 1 6 37 0.16384000000000000000e5 +1048 1 7 22 0.32768000000000000000e5 +1048 1 8 23 0.32768000000000000000e5 +1048 1 11 42 -0.65536000000000000000e5 +1048 1 12 27 -0.13107200000000000000e6 +1048 1 12 43 -0.13107200000000000000e6 +1048 1 16 47 0.13107200000000000000e6 +1048 1 22 27 0.32768000000000000000e5 +1048 1 22 37 -0.16384000000000000000e5 +1048 1 28 43 0.65536000000000000000e5 +1048 2 1 7 0.32768000000000000000e5 +1048 2 2 16 0.16384000000000000000e5 +1048 2 2 32 0.16384000000000000000e5 +1048 2 3 17 -0.16384000000000000000e5 +1048 2 4 26 0.16384000000000000000e5 +1048 2 6 20 0.65536000000000000000e5 +1048 2 10 32 -0.65536000000000000000e5 +1048 2 12 26 0.65536000000000000000e5 +1048 2 16 16 -0.32768000000000000000e5 +1048 3 1 16 0.16384000000000000000e5 +1048 3 1 30 0.65536000000000000000e5 +1048 3 2 31 0.65536000000000000000e5 +1048 3 3 16 0.16384000000000000000e5 +1048 3 7 20 0.65536000000000000000e5 +1048 3 14 27 0.13107200000000000000e6 +1048 4 1 5 -0.32768000000000000000e5 +1048 4 1 13 0.16384000000000000000e5 +1048 4 5 17 0.32768000000000000000e5 +1048 4 7 19 -0.65536000000000000000e5 +1048 4 11 11 0.32768000000000000000e5 +1049 1 7 38 -0.32768000000000000000e5 +1049 1 22 28 0.32768000000000000000e5 +1050 1 1 48 -0.16384000000000000000e5 +1050 1 2 49 -0.16384000000000000000e5 +1050 1 22 29 0.32768000000000000000e5 +1050 1 23 38 -0.16384000000000000000e5 +1050 2 2 32 -0.16384000000000000000e5 +1050 3 1 30 -0.32768000000000000000e5 +1051 1 8 39 -0.32768000000000000000e5 +1051 1 22 30 0.32768000000000000000e5 +1052 1 2 17 -0.65536000000000000000e5 +1052 1 2 33 -0.32768000000000000000e5 +1052 1 3 34 0.65536000000000000000e5 +1052 1 10 41 -0.32768000000000000000e5 +1052 1 11 42 0.32768000000000000000e5 +1052 1 12 43 0.65536000000000000000e5 +1052 1 17 48 -0.65536000000000000000e5 +1052 1 22 31 0.32768000000000000000e5 +1052 2 1 31 0.32768000000000000000e5 +1052 2 7 21 -0.32768000000000000000e5 +1052 2 8 22 0.32768000000000000000e5 +1052 2 12 26 -0.32768000000000000000e5 +1052 3 1 14 0.65536000000000000000e5 +1052 3 6 23 0.65536000000000000000e5 +1052 3 7 20 -0.32768000000000000000e5 +1052 3 8 21 -0.32768000000000000000e5 +1052 3 14 27 -0.65536000000000000000e5 +1052 4 4 16 -0.32768000000000000000e5 +1053 1 2 33 0.32768000000000000000e5 +1053 1 3 34 -0.65536000000000000000e5 +1053 1 10 41 0.32768000000000000000e5 +1053 1 22 32 0.32768000000000000000e5 +1053 2 7 21 0.32768000000000000000e5 +1053 3 7 20 0.32768000000000000000e5 +1053 3 8 21 0.32768000000000000000e5 +1054 1 11 42 -0.32768000000000000000e5 +1054 1 12 43 -0.65536000000000000000e5 +1054 1 17 48 0.65536000000000000000e5 +1054 1 22 33 0.32768000000000000000e5 +1054 2 8 22 -0.32768000000000000000e5 +1054 2 12 26 0.32768000000000000000e5 +1054 3 14 27 0.65536000000000000000e5 +1054 4 4 16 0.32768000000000000000e5 +1055 1 2 17 -0.32768000000000000000e5 +1055 1 22 34 0.32768000000000000000e5 +1055 3 1 14 0.32768000000000000000e5 +1055 3 6 23 0.32768000000000000000e5 +1056 1 16 47 -0.32768000000000000000e5 +1056 1 22 35 0.32768000000000000000e5 +1056 3 13 26 -0.32768000000000000000e5 +1057 1 4 19 0.32768000000000000000e5 +1057 1 20 27 -0.65536000000000000000e5 +1057 1 22 36 0.32768000000000000000e5 +1057 1 28 35 0.32768000000000000000e5 +1057 2 10 24 0.32768000000000000000e5 +1057 3 8 13 -0.32768000000000000000e5 +1057 3 10 23 0.32768000000000000000e5 +1057 3 11 24 0.32768000000000000000e5 +1058 1 1 48 -0.32768000000000000000e5 +1058 1 22 38 0.32768000000000000000e5 +1059 1 22 39 0.32768000000000000000e5 +1059 1 23 38 -0.32768000000000000000e5 +1060 1 2 49 -0.32768000000000000000e5 +1060 1 22 40 0.32768000000000000000e5 +1061 1 2 33 -0.65536000000000000000e5 +1061 1 3 34 0.13107200000000000000e6 +1061 1 3 50 0.32768000000000000000e5 +1061 1 5 52 -0.65536000000000000000e5 +1061 1 7 38 -0.32768000000000000000e5 +1061 1 8 39 -0.32768000000000000000e5 +1061 1 10 41 -0.65536000000000000000e5 +1061 1 11 42 0.65536000000000000000e5 +1061 1 12 43 0.13107200000000000000e6 +1061 1 16 47 -0.13107200000000000000e6 +1061 1 22 41 0.32768000000000000000e5 +1061 1 28 43 -0.65536000000000000000e5 +1061 2 7 21 -0.65536000000000000000e5 +1061 2 10 32 0.65536000000000000000e5 +1061 2 12 26 -0.65536000000000000000e5 +1061 3 1 30 -0.32768000000000000000e5 +1061 3 2 31 -0.65536000000000000000e5 +1061 3 7 20 -0.65536000000000000000e5 +1061 3 8 21 -0.65536000000000000000e5 +1061 3 14 27 -0.13107200000000000000e6 +1061 4 5 17 -0.32768000000000000000e5 +1061 4 7 19 0.65536000000000000000e5 +1062 1 1 48 -0.16384000000000000000e5 +1062 1 2 49 -0.16384000000000000000e5 +1062 1 22 42 0.32768000000000000000e5 +1062 1 23 38 -0.16384000000000000000e5 +1062 2 2 32 -0.16384000000000000000e5 +1063 1 3 50 -0.32768000000000000000e5 +1063 1 22 43 0.32768000000000000000e5 +1064 1 5 52 -0.32768000000000000000e5 +1064 1 11 42 0.32768000000000000000e5 +1064 1 12 43 0.65536000000000000000e5 +1064 1 16 47 -0.65536000000000000000e5 +1064 1 22 44 0.32768000000000000000e5 +1064 1 28 43 -0.32768000000000000000e5 +1064 2 10 32 0.32768000000000000000e5 +1064 2 12 26 -0.32768000000000000000e5 +1064 3 2 31 -0.32768000000000000000e5 +1064 3 14 27 -0.65536000000000000000e5 +1064 4 7 19 0.32768000000000000000e5 +1065 1 11 42 -0.32768000000000000000e5 +1065 1 12 43 -0.65536000000000000000e5 +1065 1 17 48 0.65536000000000000000e5 +1065 1 22 45 0.32768000000000000000e5 +1065 2 8 22 -0.32768000000000000000e5 +1065 2 12 26 0.32768000000000000000e5 +1065 3 2 31 0.32768000000000000000e5 +1065 3 14 27 0.65536000000000000000e5 +1065 4 4 16 0.32768000000000000000e5 +1066 1 16 47 -0.32768000000000000000e5 +1066 1 22 46 0.32768000000000000000e5 +1067 1 1 48 -0.32768000000000000000e5 +1067 1 2 49 -0.32768000000000000000e5 +1067 1 7 54 0.65536000000000000000e5 +1067 1 22 47 0.32768000000000000000e5 +1067 1 23 38 -0.32768000000000000000e5 +1067 1 24 39 -0.32768000000000000000e5 +1067 2 1 35 0.32768000000000000000e5 +1067 2 2 32 -0.32768000000000000000e5 +1067 2 3 33 -0.32768000000000000000e5 +1067 2 18 32 0.32768000000000000000e5 +1067 2 26 32 -0.32768000000000000000e5 +1067 3 3 32 -0.32768000000000000000e5 +1067 3 4 33 -0.32768000000000000000e5 +1067 3 16 29 0.65536000000000000000e5 +1067 3 17 30 0.65536000000000000000e5 +1067 4 17 17 -0.65536000000000000000e5 +1068 1 2 49 0.32768000000000000000e5 +1068 1 7 54 -0.65536000000000000000e5 +1068 1 22 48 0.32768000000000000000e5 +1068 1 24 39 0.32768000000000000000e5 +1068 2 3 33 0.32768000000000000000e5 +1068 2 18 32 -0.32768000000000000000e5 +1068 2 26 32 0.32768000000000000000e5 +1068 3 4 33 0.32768000000000000000e5 +1068 3 17 30 -0.65536000000000000000e5 +1068 4 17 17 0.65536000000000000000e5 +1069 1 2 49 -0.32768000000000000000e5 +1069 1 22 49 0.32768000000000000000e5 +1069 3 3 32 0.32768000000000000000e5 +1070 1 1 48 -0.16384000000000000000e5 +1070 1 2 49 -0.16384000000000000000e5 +1070 1 22 50 0.32768000000000000000e5 +1070 1 23 38 -0.16384000000000000000e5 +1070 2 2 32 -0.16384000000000000000e5 +1070 3 16 29 0.32768000000000000000e5 +1071 1 7 54 -0.32768000000000000000e5 +1071 1 22 51 0.32768000000000000000e5 +1072 1 22 52 0.32768000000000000000e5 +1072 1 37 44 -0.32768000000000000000e5 +1073 1 7 54 -0.65536000000000000000e5 +1073 1 22 53 0.32768000000000000000e5 +1073 1 22 54 0.32768000000000000000e5 +1073 1 23 54 0.32768000000000000000e5 +1073 2 26 32 0.32768000000000000000e5 +1073 3 6 35 0.65536000000000000000e5 +1074 1 7 54 -0.32768000000000000000e5 +1074 1 22 55 0.32768000000000000000e5 +1074 3 6 35 0.32768000000000000000e5 +1075 1 22 56 0.32768000000000000000e5 +1075 1 38 53 0.32768000000000000000e5 +1075 1 47 50 -0.65536000000000000000e5 +1075 1 47 54 0.32768000000000000000e5 +1075 2 32 32 0.65536000000000000000e5 +1075 3 32 33 0.32768000000000000000e5 +1076 1 1 48 -0.16384000000000000000e5 +1076 1 2 49 -0.16384000000000000000e5 +1076 1 6 37 -0.16384000000000000000e5 +1076 1 8 39 0.32768000000000000000e5 +1076 1 23 23 0.32768000000000000000e5 +1076 1 23 38 -0.16384000000000000000e5 +1076 2 2 32 -0.16384000000000000000e5 +1076 2 3 17 0.16384000000000000000e5 +1076 2 4 26 -0.16384000000000000000e5 +1076 3 1 30 -0.32768000000000000000e5 +1076 4 1 13 -0.16384000000000000000e5 +1077 1 1 40 -0.32768000000000000000e5 +1077 1 23 24 0.32768000000000000000e5 +1078 1 1 40 0.32768000000000000000e5 +1078 1 6 37 0.32768000000000000000e5 +1078 1 8 39 -0.65536000000000000000e5 +1078 1 23 25 0.32768000000000000000e5 +1078 2 4 26 0.32768000000000000000e5 +1079 1 6 37 -0.32768000000000000000e5 +1079 1 23 26 0.32768000000000000000e5 +1080 1 7 38 -0.32768000000000000000e5 +1080 1 23 27 0.32768000000000000000e5 +1081 1 1 48 -0.16384000000000000000e5 +1081 1 2 49 -0.16384000000000000000e5 +1081 1 23 28 0.32768000000000000000e5 +1081 1 23 38 -0.16384000000000000000e5 +1081 2 2 32 -0.16384000000000000000e5 +1081 3 1 30 -0.32768000000000000000e5 +1082 1 8 39 -0.32768000000000000000e5 +1082 1 23 29 0.32768000000000000000e5 +1083 1 1 48 0.16384000000000000000e5 +1083 1 2 49 0.16384000000000000000e5 +1083 1 5 52 -0.65536000000000000000e5 +1083 1 8 39 0.32768000000000000000e5 +1083 1 9 40 0.32768000000000000000e5 +1083 1 10 41 -0.65536000000000000000e5 +1083 1 11 42 -0.65536000000000000000e5 +1083 1 12 43 -0.13107200000000000000e6 +1083 1 17 48 0.26214400000000000000e6 +1083 1 23 30 0.32768000000000000000e5 +1083 1 23 38 0.16384000000000000000e5 +1083 1 26 41 -0.32768000000000000000e5 +1083 1 28 43 -0.65536000000000000000e5 +1083 2 2 32 0.16384000000000000000e5 +1083 2 8 22 -0.13107200000000000000e6 +1083 2 12 26 0.65536000000000000000e5 +1083 2 16 30 0.32768000000000000000e5 +1083 3 2 31 0.65536000000000000000e5 +1083 3 14 27 0.13107200000000000000e6 +1083 4 4 16 0.13107200000000000000e6 +1083 4 6 18 0.32768000000000000000e5 +1083 4 7 19 0.65536000000000000000e5 +1084 1 2 33 0.32768000000000000000e5 +1084 1 3 34 -0.65536000000000000000e5 +1084 1 10 41 0.32768000000000000000e5 +1084 1 23 31 0.32768000000000000000e5 +1084 2 7 21 0.32768000000000000000e5 +1084 3 7 20 0.32768000000000000000e5 +1084 3 8 21 0.32768000000000000000e5 +1085 1 11 42 -0.32768000000000000000e5 +1085 1 12 43 -0.65536000000000000000e5 +1085 1 17 48 0.65536000000000000000e5 +1085 1 23 32 0.32768000000000000000e5 +1085 2 8 22 -0.32768000000000000000e5 +1085 2 12 26 0.32768000000000000000e5 +1085 3 14 27 0.65536000000000000000e5 +1085 4 4 16 0.32768000000000000000e5 +1086 1 10 41 -0.32768000000000000000e5 +1086 1 23 33 0.32768000000000000000e5 +1087 1 16 47 -0.32768000000000000000e5 +1087 1 23 34 0.32768000000000000000e5 +1087 3 13 26 -0.32768000000000000000e5 +1088 1 12 43 -0.32768000000000000000e5 +1088 1 23 35 0.32768000000000000000e5 +1089 1 13 44 -0.32768000000000000000e5 +1089 1 23 36 0.32768000000000000000e5 +1090 1 1 48 -0.32768000000000000000e5 +1090 1 23 37 0.32768000000000000000e5 +1091 1 2 49 -0.32768000000000000000e5 +1091 1 23 39 0.32768000000000000000e5 +1092 1 23 40 0.32768000000000000000e5 +1092 1 24 39 -0.32768000000000000000e5 +1093 1 1 48 -0.16384000000000000000e5 +1093 1 2 49 -0.16384000000000000000e5 +1093 1 23 38 -0.16384000000000000000e5 +1093 1 23 41 0.32768000000000000000e5 +1093 2 2 32 -0.16384000000000000000e5 +1094 1 3 50 -0.32768000000000000000e5 +1094 1 23 42 0.32768000000000000000e5 +1095 1 1 48 0.16384000000000000000e5 +1095 1 2 49 0.16384000000000000000e5 +1095 1 3 50 0.32768000000000000000e5 +1095 1 11 42 -0.65536000000000000000e5 +1095 1 12 43 -0.13107200000000000000e6 +1095 1 17 48 0.13107200000000000000e6 +1095 1 23 38 0.16384000000000000000e5 +1095 1 23 43 0.32768000000000000000e5 +1095 2 2 32 0.16384000000000000000e5 +1095 2 8 22 -0.65536000000000000000e5 +1095 2 12 26 0.65536000000000000000e5 +1095 2 16 30 0.32768000000000000000e5 +1095 3 2 31 0.65536000000000000000e5 +1095 3 14 27 0.13107200000000000000e6 +1095 4 4 16 0.65536000000000000000e5 +1096 1 11 42 -0.32768000000000000000e5 +1096 1 12 43 -0.65536000000000000000e5 +1096 1 17 48 0.65536000000000000000e5 +1096 1 23 44 0.32768000000000000000e5 +1096 2 8 22 -0.32768000000000000000e5 +1096 2 12 26 0.32768000000000000000e5 +1096 3 2 31 0.32768000000000000000e5 +1096 3 14 27 0.65536000000000000000e5 +1096 4 4 16 0.32768000000000000000e5 +1097 1 5 52 0.32768000000000000000e5 +1097 1 17 48 -0.65536000000000000000e5 +1097 1 23 45 0.32768000000000000000e5 +1097 1 28 43 0.32768000000000000000e5 +1097 2 8 22 0.32768000000000000000e5 +1097 4 4 16 -0.32768000000000000000e5 +1097 4 7 19 -0.32768000000000000000e5 +1098 1 5 52 0.16384000000000000000e5 +1098 1 11 42 -0.16384000000000000000e5 +1098 1 12 43 -0.32768000000000000000e5 +1098 1 23 46 0.32768000000000000000e5 +1098 2 12 26 0.16384000000000000000e5 +1098 2 20 34 -0.16384000000000000000e5 +1098 3 2 31 0.16384000000000000000e5 +1098 3 14 27 0.32768000000000000000e5 +1098 4 7 19 -0.16384000000000000000e5 +1098 4 8 20 -0.16384000000000000000e5 +1099 1 2 49 0.32768000000000000000e5 +1099 1 7 54 -0.65536000000000000000e5 +1099 1 23 47 0.32768000000000000000e5 +1099 1 24 39 0.32768000000000000000e5 +1099 2 3 33 0.32768000000000000000e5 +1099 2 18 32 -0.32768000000000000000e5 +1099 2 26 32 0.32768000000000000000e5 +1099 3 4 33 0.32768000000000000000e5 +1099 3 17 30 -0.65536000000000000000e5 +1099 4 17 17 0.65536000000000000000e5 +1100 1 2 49 -0.32768000000000000000e5 +1100 1 23 48 0.32768000000000000000e5 +1100 3 3 32 0.32768000000000000000e5 +1101 1 23 49 0.32768000000000000000e5 +1101 1 24 39 -0.32768000000000000000e5 +1101 2 3 33 -0.32768000000000000000e5 +1101 2 18 32 0.32768000000000000000e5 +1101 3 3 32 -0.32768000000000000000e5 +1101 3 4 33 -0.32768000000000000000e5 +1101 3 17 30 0.65536000000000000000e5 +1102 1 7 54 -0.32768000000000000000e5 +1102 1 23 50 0.32768000000000000000e5 +1103 1 1 48 0.16384000000000000000e5 +1103 1 2 49 0.16384000000000000000e5 +1103 1 3 50 0.32768000000000000000e5 +1103 1 11 42 -0.65536000000000000000e5 +1103 1 12 43 -0.13107200000000000000e6 +1103 1 17 48 0.13107200000000000000e6 +1103 1 23 38 0.16384000000000000000e5 +1103 1 23 51 0.32768000000000000000e5 +1103 2 2 32 0.16384000000000000000e5 +1103 2 8 22 -0.65536000000000000000e5 +1103 2 12 26 0.65536000000000000000e5 +1103 2 16 30 0.32768000000000000000e5 +1103 3 2 31 0.65536000000000000000e5 +1103 3 14 27 0.13107200000000000000e6 +1103 3 17 30 0.32768000000000000000e5 +1103 4 4 16 0.65536000000000000000e5 +1104 1 23 52 0.32768000000000000000e5 +1104 1 32 47 -0.32768000000000000000e5 +1105 1 7 54 -0.65536000000000000000e5 +1105 1 22 53 0.32768000000000000000e5 +1105 1 23 53 0.32768000000000000000e5 +1105 1 23 54 0.32768000000000000000e5 +1105 2 26 32 0.32768000000000000000e5 +1105 3 6 35 0.65536000000000000000e5 +1106 1 1 48 0.16384000000000000000e5 +1106 1 2 49 0.16384000000000000000e5 +1106 1 3 50 0.32768000000000000000e5 +1106 1 11 42 -0.65536000000000000000e5 +1106 1 12 43 -0.13107200000000000000e6 +1106 1 17 48 0.13107200000000000000e6 +1106 1 23 38 0.16384000000000000000e5 +1106 1 23 55 0.32768000000000000000e5 +1106 2 2 32 0.16384000000000000000e5 +1106 2 8 22 -0.65536000000000000000e5 +1106 2 12 26 0.65536000000000000000e5 +1106 2 16 30 0.32768000000000000000e5 +1106 3 2 31 0.65536000000000000000e5 +1106 3 14 27 0.13107200000000000000e6 +1106 3 17 30 0.32768000000000000000e5 +1106 3 20 33 0.32768000000000000000e5 +1106 4 4 16 0.65536000000000000000e5 +1107 1 23 56 0.32768000000000000000e5 +1107 1 38 53 -0.32768000000000000000e5 +1108 1 1 40 0.16384000000000000000e5 +1108 1 6 37 0.16384000000000000000e5 +1108 1 8 39 -0.32768000000000000000e5 +1108 1 24 24 0.32768000000000000000e5 +1108 2 4 26 0.16384000000000000000e5 +1109 1 6 37 -0.32768000000000000000e5 +1109 1 24 25 0.32768000000000000000e5 +1110 1 1 40 -0.32768000000000000000e5 +1110 1 1 48 0.32768000000000000000e5 +1110 1 2 49 0.32768000000000000000e5 +1110 1 3 26 0.32768000000000000000e5 +1110 1 5 52 -0.13107200000000000000e6 +1110 1 6 37 -0.32768000000000000000e5 +1110 1 8 39 0.13107200000000000000e6 +1110 1 10 25 0.65536000000000000000e5 +1110 1 10 41 -0.13107200000000000000e6 +1110 1 11 42 -0.13107200000000000000e6 +1110 1 12 43 -0.26214400000000000000e6 +1110 1 17 48 0.52428800000000000000e6 +1110 1 23 38 0.32768000000000000000e5 +1110 1 24 26 0.32768000000000000000e5 +1110 1 26 41 -0.65536000000000000000e5 +1110 1 28 43 -0.13107200000000000000e6 +1110 2 2 32 0.32768000000000000000e5 +1110 2 4 18 0.32768000000000000000e5 +1110 2 4 26 -0.32768000000000000000e5 +1110 2 8 22 -0.26214400000000000000e6 +1110 2 12 26 0.13107200000000000000e6 +1110 2 16 30 0.65536000000000000000e5 +1110 3 2 31 0.13107200000000000000e6 +1110 3 4 17 0.32768000000000000000e5 +1110 3 5 18 0.32768000000000000000e5 +1110 3 6 19 0.65536000000000000000e5 +1110 3 8 21 -0.13107200000000000000e6 +1110 3 14 27 0.26214400000000000000e6 +1110 4 3 15 0.65536000000000000000e5 +1110 4 4 16 0.26214400000000000000e6 +1110 4 6 18 0.65536000000000000000e5 +1110 4 7 19 0.13107200000000000000e6 +1111 1 1 48 -0.16384000000000000000e5 +1111 1 2 49 -0.16384000000000000000e5 +1111 1 23 38 -0.16384000000000000000e5 +1111 1 24 27 0.32768000000000000000e5 +1111 2 2 32 -0.16384000000000000000e5 +1111 3 1 30 -0.32768000000000000000e5 +1112 1 8 39 -0.32768000000000000000e5 +1112 1 24 28 0.32768000000000000000e5 +1113 1 1 48 0.16384000000000000000e5 +1113 1 2 49 0.16384000000000000000e5 +1113 1 5 52 -0.65536000000000000000e5 +1113 1 8 39 0.32768000000000000000e5 +1113 1 9 40 0.32768000000000000000e5 +1113 1 10 41 -0.65536000000000000000e5 +1113 1 11 42 -0.65536000000000000000e5 +1113 1 12 43 -0.13107200000000000000e6 +1113 1 17 48 0.26214400000000000000e6 +1113 1 23 38 0.16384000000000000000e5 +1113 1 24 29 0.32768000000000000000e5 +1113 1 26 41 -0.32768000000000000000e5 +1113 1 28 43 -0.65536000000000000000e5 +1113 2 2 32 0.16384000000000000000e5 +1113 2 8 22 -0.13107200000000000000e6 +1113 2 12 26 0.65536000000000000000e5 +1113 2 16 30 0.32768000000000000000e5 +1113 3 2 31 0.65536000000000000000e5 +1113 3 14 27 0.13107200000000000000e6 +1113 4 4 16 0.13107200000000000000e6 +1113 4 6 18 0.32768000000000000000e5 +1113 4 7 19 0.65536000000000000000e5 +1114 1 9 40 -0.32768000000000000000e5 +1114 1 24 30 0.32768000000000000000e5 +1115 1 11 42 -0.32768000000000000000e5 +1115 1 12 43 -0.65536000000000000000e5 +1115 1 17 48 0.65536000000000000000e5 +1115 1 24 31 0.32768000000000000000e5 +1115 2 8 22 -0.32768000000000000000e5 +1115 2 12 26 0.32768000000000000000e5 +1115 3 14 27 0.65536000000000000000e5 +1115 4 4 16 0.32768000000000000000e5 +1116 1 10 41 -0.32768000000000000000e5 +1116 1 24 32 0.32768000000000000000e5 +1117 1 10 41 0.32768000000000000000e5 +1117 1 11 42 0.32768000000000000000e5 +1117 1 17 48 -0.65536000000000000000e5 +1117 1 24 33 0.32768000000000000000e5 +1117 2 8 22 0.32768000000000000000e5 +1117 3 14 27 -0.65536000000000000000e5 +1117 4 4 16 -0.32768000000000000000e5 +1118 1 12 43 -0.32768000000000000000e5 +1118 1 24 34 0.32768000000000000000e5 +1119 1 17 48 -0.32768000000000000000e5 +1119 1 24 35 0.32768000000000000000e5 +1119 3 14 27 -0.32768000000000000000e5 +1120 1 24 36 0.32768000000000000000e5 +1120 1 28 35 -0.32768000000000000000e5 +1121 1 23 38 -0.32768000000000000000e5 +1121 1 24 37 0.32768000000000000000e5 +1122 1 2 49 -0.32768000000000000000e5 +1122 1 24 38 0.32768000000000000000e5 +1123 1 1 48 0.32768000000000000000e5 +1123 1 2 49 0.65536000000000000000e5 +1123 1 3 50 0.65536000000000000000e5 +1123 1 11 42 -0.13107200000000000000e6 +1123 1 12 43 -0.26214400000000000000e6 +1123 1 17 48 0.26214400000000000000e6 +1123 1 23 38 0.32768000000000000000e5 +1123 1 24 39 0.32768000000000000000e5 +1123 1 24 40 0.32768000000000000000e5 +1123 2 2 32 0.32768000000000000000e5 +1123 2 3 33 0.32768000000000000000e5 +1123 2 8 22 -0.13107200000000000000e6 +1123 2 12 26 0.13107200000000000000e6 +1123 2 16 30 0.65536000000000000000e5 +1123 3 2 31 0.13107200000000000000e6 +1123 3 14 27 0.26214400000000000000e6 +1123 4 4 16 0.13107200000000000000e6 +1124 1 3 50 -0.32768000000000000000e5 +1124 1 24 41 0.32768000000000000000e5 +1125 1 1 48 0.16384000000000000000e5 +1125 1 2 49 0.16384000000000000000e5 +1125 1 3 50 0.32768000000000000000e5 +1125 1 11 42 -0.65536000000000000000e5 +1125 1 12 43 -0.13107200000000000000e6 +1125 1 17 48 0.13107200000000000000e6 +1125 1 23 38 0.16384000000000000000e5 +1125 1 24 42 0.32768000000000000000e5 +1125 2 2 32 0.16384000000000000000e5 +1125 2 8 22 -0.65536000000000000000e5 +1125 2 12 26 0.65536000000000000000e5 +1125 2 16 30 0.32768000000000000000e5 +1125 3 2 31 0.65536000000000000000e5 +1125 3 14 27 0.13107200000000000000e6 +1125 4 4 16 0.65536000000000000000e5 +1126 1 24 43 0.32768000000000000000e5 +1126 1 26 41 -0.32768000000000000000e5 +1127 1 5 52 0.32768000000000000000e5 +1127 1 17 48 -0.65536000000000000000e5 +1127 1 24 44 0.32768000000000000000e5 +1127 1 28 43 0.32768000000000000000e5 +1127 2 8 22 0.32768000000000000000e5 +1127 4 4 16 -0.32768000000000000000e5 +1127 4 7 19 -0.32768000000000000000e5 +1128 1 24 45 0.32768000000000000000e5 +1128 1 28 43 -0.32768000000000000000e5 +1129 1 17 48 -0.32768000000000000000e5 +1129 1 24 46 0.32768000000000000000e5 +1130 1 2 49 -0.32768000000000000000e5 +1130 1 24 47 0.32768000000000000000e5 +1130 3 3 32 0.32768000000000000000e5 +1131 1 24 39 -0.32768000000000000000e5 +1131 1 24 48 0.32768000000000000000e5 +1131 2 3 33 -0.32768000000000000000e5 +1131 2 18 32 0.32768000000000000000e5 +1131 3 3 32 -0.32768000000000000000e5 +1131 3 4 33 -0.32768000000000000000e5 +1131 3 17 30 0.65536000000000000000e5 +1132 1 1 48 0.32768000000000000000e5 +1132 1 2 49 0.65536000000000000000e5 +1132 1 3 50 0.65536000000000000000e5 +1132 1 11 42 -0.13107200000000000000e6 +1132 1 12 43 -0.26214400000000000000e6 +1132 1 17 48 0.26214400000000000000e6 +1132 1 23 38 0.32768000000000000000e5 +1132 1 24 39 0.32768000000000000000e5 +1132 1 24 49 0.32768000000000000000e5 +1132 2 2 32 0.32768000000000000000e5 +1132 2 3 33 0.32768000000000000000e5 +1132 2 8 22 -0.13107200000000000000e6 +1132 2 12 26 0.13107200000000000000e6 +1132 2 16 30 0.65536000000000000000e5 +1132 3 2 31 0.13107200000000000000e6 +1132 3 4 33 0.32768000000000000000e5 +1132 3 14 27 0.26214400000000000000e6 +1132 4 4 16 0.13107200000000000000e6 +1133 1 1 48 0.16384000000000000000e5 +1133 1 2 49 0.16384000000000000000e5 +1133 1 3 50 0.32768000000000000000e5 +1133 1 11 42 -0.65536000000000000000e5 +1133 1 12 43 -0.13107200000000000000e6 +1133 1 17 48 0.13107200000000000000e6 +1133 1 23 38 0.16384000000000000000e5 +1133 1 24 50 0.32768000000000000000e5 +1133 2 2 32 0.16384000000000000000e5 +1133 2 8 22 -0.65536000000000000000e5 +1133 2 12 26 0.65536000000000000000e5 +1133 2 16 30 0.32768000000000000000e5 +1133 3 2 31 0.65536000000000000000e5 +1133 3 14 27 0.13107200000000000000e6 +1133 3 17 30 0.32768000000000000000e5 +1133 4 4 16 0.65536000000000000000e5 +1134 1 24 51 0.32768000000000000000e5 +1134 1 26 41 -0.32768000000000000000e5 +1134 3 22 27 0.32768000000000000000e5 +1135 1 24 52 0.32768000000000000000e5 +1135 1 28 43 -0.32768000000000000000e5 +1135 3 18 31 0.32768000000000000000e5 +1136 1 23 54 -0.32768000000000000000e5 +1136 1 24 53 0.32768000000000000000e5 +1137 1 1 48 0.32768000000000000000e5 +1137 1 2 49 0.65536000000000000000e5 +1137 1 3 50 0.65536000000000000000e5 +1137 1 11 42 -0.13107200000000000000e6 +1137 1 12 43 -0.26214400000000000000e6 +1137 1 17 48 0.26214400000000000000e6 +1137 1 23 38 0.32768000000000000000e5 +1137 1 24 39 0.32768000000000000000e5 +1137 1 24 54 0.32768000000000000000e5 +1137 2 2 32 0.32768000000000000000e5 +1137 2 3 33 0.32768000000000000000e5 +1137 2 8 22 -0.13107200000000000000e6 +1137 2 12 26 0.13107200000000000000e6 +1137 2 16 30 0.65536000000000000000e5 +1137 3 2 31 0.13107200000000000000e6 +1137 3 4 33 0.32768000000000000000e5 +1137 3 14 27 0.26214400000000000000e6 +1137 3 19 32 0.32768000000000000000e5 +1137 4 4 16 0.13107200000000000000e6 +1138 1 24 56 0.32768000000000000000e5 +1138 1 47 54 -0.32768000000000000000e5 +1138 3 32 33 -0.32768000000000000000e5 +1139 1 1 40 -0.16384000000000000000e5 +1139 1 1 48 0.16384000000000000000e5 +1139 1 2 49 0.16384000000000000000e5 +1139 1 3 26 0.16384000000000000000e5 +1139 1 5 52 -0.65536000000000000000e5 +1139 1 6 37 -0.16384000000000000000e5 +1139 1 8 39 0.65536000000000000000e5 +1139 1 10 25 0.32768000000000000000e5 +1139 1 10 41 -0.65536000000000000000e5 +1139 1 11 42 -0.65536000000000000000e5 +1139 1 12 43 -0.13107200000000000000e6 +1139 1 17 48 0.26214400000000000000e6 +1139 1 23 38 0.16384000000000000000e5 +1139 1 25 25 0.32768000000000000000e5 +1139 1 26 41 -0.32768000000000000000e5 +1139 1 28 43 -0.65536000000000000000e5 +1139 2 2 32 0.16384000000000000000e5 +1139 2 4 18 0.16384000000000000000e5 +1139 2 4 26 -0.16384000000000000000e5 +1139 2 8 22 -0.13107200000000000000e6 +1139 2 12 26 0.65536000000000000000e5 +1139 2 16 30 0.32768000000000000000e5 +1139 3 2 31 0.65536000000000000000e5 +1139 3 4 17 0.16384000000000000000e5 +1139 3 5 18 0.16384000000000000000e5 +1139 3 6 19 0.32768000000000000000e5 +1139 3 8 21 -0.65536000000000000000e5 +1139 3 14 27 0.13107200000000000000e6 +1139 4 3 15 0.32768000000000000000e5 +1139 4 4 16 0.13107200000000000000e6 +1139 4 6 18 0.32768000000000000000e5 +1139 4 7 19 0.65536000000000000000e5 +1140 1 1 40 0.32768000000000000000e5 +1140 1 1 48 -0.32768000000000000000e5 +1140 1 2 49 -0.32768000000000000000e5 +1140 1 3 26 -0.32768000000000000000e5 +1140 1 5 52 0.13107200000000000000e6 +1140 1 6 37 0.65536000000000000000e5 +1140 1 8 39 -0.13107200000000000000e6 +1140 1 9 40 -0.65536000000000000000e5 +1140 1 10 25 -0.65536000000000000000e5 +1140 1 10 41 0.13107200000000000000e6 +1140 1 11 42 0.13107200000000000000e6 +1140 1 12 43 0.26214400000000000000e6 +1140 1 17 48 -0.52428800000000000000e6 +1140 1 23 38 -0.32768000000000000000e5 +1140 1 25 26 0.32768000000000000000e5 +1140 1 26 41 0.65536000000000000000e5 +1140 1 28 43 0.13107200000000000000e6 +1140 2 2 32 -0.32768000000000000000e5 +1140 2 4 18 -0.32768000000000000000e5 +1140 2 4 26 0.32768000000000000000e5 +1140 2 5 27 0.32768000000000000000e5 +1140 2 8 22 0.26214400000000000000e6 +1140 2 12 26 -0.13107200000000000000e6 +1140 2 16 30 -0.65536000000000000000e5 +1140 3 2 31 -0.13107200000000000000e6 +1140 3 4 17 -0.32768000000000000000e5 +1140 3 5 18 -0.32768000000000000000e5 +1140 3 6 19 -0.65536000000000000000e5 +1140 3 8 21 0.13107200000000000000e6 +1140 3 14 27 -0.26214400000000000000e6 +1140 4 3 15 -0.65536000000000000000e5 +1140 4 4 16 -0.26214400000000000000e6 +1140 4 6 18 -0.65536000000000000000e5 +1140 4 7 19 -0.13107200000000000000e6 +1141 1 8 39 -0.32768000000000000000e5 +1141 1 25 27 0.32768000000000000000e5 +1142 1 1 48 0.16384000000000000000e5 +1142 1 2 49 0.16384000000000000000e5 +1142 1 5 52 -0.65536000000000000000e5 +1142 1 8 39 0.32768000000000000000e5 +1142 1 9 40 0.32768000000000000000e5 +1142 1 10 41 -0.65536000000000000000e5 +1142 1 11 42 -0.65536000000000000000e5 +1142 1 12 43 -0.13107200000000000000e6 +1142 1 17 48 0.26214400000000000000e6 +1142 1 23 38 0.16384000000000000000e5 +1142 1 25 28 0.32768000000000000000e5 +1142 1 26 41 -0.32768000000000000000e5 +1142 1 28 43 -0.65536000000000000000e5 +1142 2 2 32 0.16384000000000000000e5 +1142 2 8 22 -0.13107200000000000000e6 +1142 2 12 26 0.65536000000000000000e5 +1142 2 16 30 0.32768000000000000000e5 +1142 3 2 31 0.65536000000000000000e5 +1142 3 14 27 0.13107200000000000000e6 +1142 4 4 16 0.13107200000000000000e6 +1142 4 6 18 0.32768000000000000000e5 +1142 4 7 19 0.65536000000000000000e5 +1143 1 9 40 -0.32768000000000000000e5 +1143 1 25 29 0.32768000000000000000e5 +1144 1 25 30 0.32768000000000000000e5 +1144 1 26 29 -0.32768000000000000000e5 +1145 1 10 41 -0.32768000000000000000e5 +1145 1 25 31 0.32768000000000000000e5 +1146 1 10 41 0.32768000000000000000e5 +1146 1 11 42 0.32768000000000000000e5 +1146 1 17 48 -0.65536000000000000000e5 +1146 1 25 32 0.32768000000000000000e5 +1146 2 8 22 0.32768000000000000000e5 +1146 3 14 27 -0.65536000000000000000e5 +1146 4 4 16 -0.32768000000000000000e5 +1147 1 11 42 -0.32768000000000000000e5 +1147 1 25 33 0.32768000000000000000e5 +1148 1 17 48 -0.32768000000000000000e5 +1148 1 25 34 0.32768000000000000000e5 +1148 3 14 27 -0.32768000000000000000e5 +1149 1 18 25 -0.32768000000000000000e5 +1149 1 25 35 0.32768000000000000000e5 +1149 3 14 19 0.32768000000000000000e5 +1150 1 14 45 -0.32768000000000000000e5 +1150 1 25 36 0.32768000000000000000e5 +1151 1 2 49 -0.32768000000000000000e5 +1151 1 25 37 0.32768000000000000000e5 +1152 1 24 39 -0.32768000000000000000e5 +1152 1 25 38 0.32768000000000000000e5 +1153 1 1 48 0.32768000000000000000e5 +1153 1 2 49 0.65536000000000000000e5 +1153 1 3 50 0.65536000000000000000e5 +1153 1 11 42 -0.13107200000000000000e6 +1153 1 12 43 -0.26214400000000000000e6 +1153 1 17 48 0.26214400000000000000e6 +1153 1 23 38 0.32768000000000000000e5 +1153 1 24 39 0.32768000000000000000e5 +1153 1 25 39 0.32768000000000000000e5 +1153 2 2 32 0.32768000000000000000e5 +1153 2 3 33 0.32768000000000000000e5 +1153 2 8 22 -0.13107200000000000000e6 +1153 2 12 26 0.13107200000000000000e6 +1153 2 16 30 0.65536000000000000000e5 +1153 3 2 31 0.13107200000000000000e6 +1153 3 14 27 0.26214400000000000000e6 +1153 4 4 16 0.13107200000000000000e6 +1154 1 1 48 0.16384000000000000000e5 +1154 1 2 49 0.16384000000000000000e5 +1154 1 3 50 0.32768000000000000000e5 +1154 1 11 42 -0.65536000000000000000e5 +1154 1 12 43 -0.13107200000000000000e6 +1154 1 17 48 0.13107200000000000000e6 +1154 1 23 38 0.16384000000000000000e5 +1154 1 25 41 0.32768000000000000000e5 +1154 2 2 32 0.16384000000000000000e5 +1154 2 8 22 -0.65536000000000000000e5 +1154 2 12 26 0.65536000000000000000e5 +1154 2 16 30 0.32768000000000000000e5 +1154 3 2 31 0.65536000000000000000e5 +1154 3 14 27 0.13107200000000000000e6 +1154 4 4 16 0.65536000000000000000e5 +1155 1 25 42 0.32768000000000000000e5 +1155 1 26 41 -0.32768000000000000000e5 +1156 1 1 48 -0.16384000000000000000e5 +1156 1 2 49 -0.16384000000000000000e5 +1156 1 3 50 -0.32768000000000000000e5 +1156 1 11 42 0.65536000000000000000e5 +1156 1 12 43 0.13107200000000000000e6 +1156 1 17 48 -0.13107200000000000000e6 +1156 1 23 38 -0.16384000000000000000e5 +1156 1 25 43 0.32768000000000000000e5 +1156 1 26 41 0.32768000000000000000e5 +1156 1 28 43 -0.65536000000000000000e5 +1156 2 2 32 -0.16384000000000000000e5 +1156 2 4 34 0.32768000000000000000e5 +1156 2 8 22 0.65536000000000000000e5 +1156 2 12 26 -0.65536000000000000000e5 +1156 2 16 30 -0.32768000000000000000e5 +1156 3 2 31 -0.65536000000000000000e5 +1156 3 14 27 -0.13107200000000000000e6 +1156 4 4 16 -0.65536000000000000000e5 +1157 1 25 44 0.32768000000000000000e5 +1157 1 28 43 -0.32768000000000000000e5 +1158 1 5 52 -0.32768000000000000000e5 +1158 1 25 45 0.32768000000000000000e5 +1159 1 14 45 -0.65536000000000000000e5 +1159 1 17 48 0.32768000000000000000e5 +1159 1 18 49 0.32768000000000000000e5 +1159 1 25 46 0.32768000000000000000e5 +1159 2 24 30 0.32768000000000000000e5 +1159 3 15 28 0.65536000000000000000e5 +1160 1 24 39 -0.32768000000000000000e5 +1160 1 25 47 0.32768000000000000000e5 +1160 2 3 33 -0.32768000000000000000e5 +1160 2 18 32 0.32768000000000000000e5 +1160 3 3 32 -0.32768000000000000000e5 +1160 3 4 33 -0.32768000000000000000e5 +1160 3 17 30 0.65536000000000000000e5 +1161 1 1 48 0.32768000000000000000e5 +1161 1 2 49 0.65536000000000000000e5 +1161 1 3 50 0.65536000000000000000e5 +1161 1 11 42 -0.13107200000000000000e6 +1161 1 12 43 -0.26214400000000000000e6 +1161 1 17 48 0.26214400000000000000e6 +1161 1 23 38 0.32768000000000000000e5 +1161 1 24 39 0.32768000000000000000e5 +1161 1 25 48 0.32768000000000000000e5 +1161 2 2 32 0.32768000000000000000e5 +1161 2 3 33 0.32768000000000000000e5 +1161 2 8 22 -0.13107200000000000000e6 +1161 2 12 26 0.13107200000000000000e6 +1161 2 16 30 0.65536000000000000000e5 +1161 3 2 31 0.13107200000000000000e6 +1161 3 4 33 0.32768000000000000000e5 +1161 3 14 27 0.26214400000000000000e6 +1161 4 4 16 0.13107200000000000000e6 +1162 1 6 53 -0.32768000000000000000e5 +1162 1 25 49 0.32768000000000000000e5 +1163 1 25 50 0.32768000000000000000e5 +1163 1 26 41 -0.32768000000000000000e5 +1163 3 22 27 0.32768000000000000000e5 +1164 1 1 48 -0.16384000000000000000e5 +1164 1 2 49 -0.16384000000000000000e5 +1164 1 3 50 -0.32768000000000000000e5 +1164 1 11 42 0.65536000000000000000e5 +1164 1 12 43 0.13107200000000000000e6 +1164 1 17 48 -0.13107200000000000000e6 +1164 1 23 38 -0.16384000000000000000e5 +1164 1 25 51 0.32768000000000000000e5 +1164 1 26 41 0.32768000000000000000e5 +1164 1 28 43 -0.65536000000000000000e5 +1164 2 2 32 -0.16384000000000000000e5 +1164 2 4 34 0.32768000000000000000e5 +1164 2 8 22 0.65536000000000000000e5 +1164 2 12 26 -0.65536000000000000000e5 +1164 2 16 30 -0.32768000000000000000e5 +1164 3 2 31 -0.65536000000000000000e5 +1164 3 5 34 0.32768000000000000000e5 +1164 3 14 27 -0.13107200000000000000e6 +1164 4 4 16 -0.65536000000000000000e5 +1165 1 25 52 0.32768000000000000000e5 +1165 1 33 48 -0.32768000000000000000e5 +1166 1 1 48 0.32768000000000000000e5 +1166 1 2 49 0.65536000000000000000e5 +1166 1 3 50 0.65536000000000000000e5 +1166 1 11 42 -0.13107200000000000000e6 +1166 1 12 43 -0.26214400000000000000e6 +1166 1 17 48 0.26214400000000000000e6 +1166 1 23 38 0.32768000000000000000e5 +1166 1 24 39 0.32768000000000000000e5 +1166 1 25 53 0.32768000000000000000e5 +1166 2 2 32 0.32768000000000000000e5 +1166 2 3 33 0.32768000000000000000e5 +1166 2 8 22 -0.13107200000000000000e6 +1166 2 12 26 0.13107200000000000000e6 +1166 2 16 30 0.65536000000000000000e5 +1166 3 2 31 0.13107200000000000000e6 +1166 3 4 33 0.32768000000000000000e5 +1166 3 14 27 0.26214400000000000000e6 +1166 3 19 32 0.32768000000000000000e5 +1166 4 4 16 0.13107200000000000000e6 +1167 1 25 54 0.32768000000000000000e5 +1167 1 25 56 -0.32768000000000000000e5 +1167 3 28 33 -0.32768000000000000000e5 +1168 1 1 48 -0.16384000000000000000e5 +1168 1 2 49 -0.16384000000000000000e5 +1168 1 3 50 -0.32768000000000000000e5 +1168 1 11 42 0.65536000000000000000e5 +1168 1 12 43 0.13107200000000000000e6 +1168 1 17 48 -0.13107200000000000000e6 +1168 1 23 38 -0.16384000000000000000e5 +1168 1 24 55 0.32768000000000000000e5 +1168 1 25 55 0.32768000000000000000e5 +1168 1 28 43 -0.65536000000000000000e5 +1168 2 2 32 -0.16384000000000000000e5 +1168 2 8 22 0.65536000000000000000e5 +1168 2 12 26 -0.65536000000000000000e5 +1168 2 16 30 -0.32768000000000000000e5 +1168 2 21 35 0.32768000000000000000e5 +1168 3 2 31 -0.65536000000000000000e5 +1168 3 14 27 -0.13107200000000000000e6 +1168 3 17 30 -0.32768000000000000000e5 +1168 3 18 31 0.65536000000000000000e5 +1168 3 20 33 -0.32768000000000000000e5 +1168 3 21 34 0.65536000000000000000e5 +1168 4 4 16 -0.65536000000000000000e5 +1169 1 6 37 -0.16384000000000000000e5 +1169 1 9 40 0.32768000000000000000e5 +1169 1 26 26 0.32768000000000000000e5 +1169 1 26 29 -0.32768000000000000000e5 +1169 2 5 27 -0.16384000000000000000e5 +1169 2 19 19 0.32768000000000000000e5 +1170 1 1 48 0.16384000000000000000e5 +1170 1 2 49 0.16384000000000000000e5 +1170 1 5 52 -0.65536000000000000000e5 +1170 1 8 39 0.32768000000000000000e5 +1170 1 9 40 0.32768000000000000000e5 +1170 1 10 41 -0.65536000000000000000e5 +1170 1 11 42 -0.65536000000000000000e5 +1170 1 12 43 -0.13107200000000000000e6 +1170 1 17 48 0.26214400000000000000e6 +1170 1 23 38 0.16384000000000000000e5 +1170 1 26 27 0.32768000000000000000e5 +1170 1 26 41 -0.32768000000000000000e5 +1170 1 28 43 -0.65536000000000000000e5 +1170 2 2 32 0.16384000000000000000e5 +1170 2 8 22 -0.13107200000000000000e6 +1170 2 12 26 0.65536000000000000000e5 +1170 2 16 30 0.32768000000000000000e5 +1170 3 2 31 0.65536000000000000000e5 +1170 3 14 27 0.13107200000000000000e6 +1170 4 4 16 0.13107200000000000000e6 +1170 4 6 18 0.32768000000000000000e5 +1170 4 7 19 0.65536000000000000000e5 +1171 1 9 40 -0.32768000000000000000e5 +1171 1 26 28 0.32768000000000000000e5 +1172 1 6 43 -0.32768000000000000000e5 +1172 1 26 30 0.32768000000000000000e5 +1173 1 10 41 0.32768000000000000000e5 +1173 1 11 42 0.32768000000000000000e5 +1173 1 17 48 -0.65536000000000000000e5 +1173 1 26 31 0.32768000000000000000e5 +1173 2 8 22 0.32768000000000000000e5 +1173 3 14 27 -0.65536000000000000000e5 +1173 4 4 16 -0.32768000000000000000e5 +1174 1 11 42 -0.32768000000000000000e5 +1174 1 26 32 0.32768000000000000000e5 +1175 1 18 25 -0.32768000000000000000e5 +1175 1 26 34 0.32768000000000000000e5 +1175 3 14 19 0.32768000000000000000e5 +1176 1 14 45 -0.65536000000000000000e5 +1176 1 17 48 0.32768000000000000000e5 +1176 1 18 25 0.32768000000000000000e5 +1176 1 26 35 0.32768000000000000000e5 +1176 2 14 28 0.32768000000000000000e5 +1176 3 14 19 -0.32768000000000000000e5 +1176 3 14 27 0.32768000000000000000e5 +1177 1 11 46 -0.32768000000000000000e5 +1177 1 26 36 0.32768000000000000000e5 +1178 1 24 39 -0.32768000000000000000e5 +1178 1 26 37 0.32768000000000000000e5 +1179 1 1 48 0.32768000000000000000e5 +1179 1 2 49 0.65536000000000000000e5 +1179 1 3 50 0.65536000000000000000e5 +1179 1 11 42 -0.13107200000000000000e6 +1179 1 12 43 -0.26214400000000000000e6 +1179 1 17 48 0.26214400000000000000e6 +1179 1 23 38 0.32768000000000000000e5 +1179 1 24 39 0.32768000000000000000e5 +1179 1 26 38 0.32768000000000000000e5 +1179 2 2 32 0.32768000000000000000e5 +1179 2 3 33 0.32768000000000000000e5 +1179 2 8 22 -0.13107200000000000000e6 +1179 2 12 26 0.13107200000000000000e6 +1179 2 16 30 0.65536000000000000000e5 +1179 3 2 31 0.13107200000000000000e6 +1179 3 14 27 0.26214400000000000000e6 +1179 4 4 16 0.13107200000000000000e6 +1180 1 25 40 -0.32768000000000000000e5 +1180 1 26 39 0.32768000000000000000e5 +1181 1 6 49 -0.32768000000000000000e5 +1181 1 26 40 0.32768000000000000000e5 +1182 1 1 48 -0.16384000000000000000e5 +1182 1 2 49 -0.16384000000000000000e5 +1182 1 3 50 -0.32768000000000000000e5 +1182 1 11 42 0.65536000000000000000e5 +1182 1 12 43 0.13107200000000000000e6 +1182 1 17 48 -0.13107200000000000000e6 +1182 1 23 38 -0.16384000000000000000e5 +1182 1 26 41 0.32768000000000000000e5 +1182 1 26 42 0.32768000000000000000e5 +1182 1 28 43 -0.65536000000000000000e5 +1182 2 2 32 -0.16384000000000000000e5 +1182 2 4 34 0.32768000000000000000e5 +1182 2 8 22 0.65536000000000000000e5 +1182 2 12 26 -0.65536000000000000000e5 +1182 2 16 30 -0.32768000000000000000e5 +1182 3 2 31 -0.65536000000000000000e5 +1182 3 14 27 -0.13107200000000000000e6 +1182 4 4 16 -0.65536000000000000000e5 +1183 1 1 48 0.16384000000000000000e5 +1183 1 2 49 0.16384000000000000000e5 +1183 1 3 50 0.32768000000000000000e5 +1183 1 5 52 -0.65536000000000000000e5 +1183 1 11 42 -0.65536000000000000000e5 +1183 1 12 43 -0.13107200000000000000e6 +1183 1 17 48 0.13107200000000000000e6 +1183 1 23 38 0.16384000000000000000e5 +1183 1 26 43 0.32768000000000000000e5 +1183 1 28 43 0.65536000000000000000e5 +1183 2 2 32 0.16384000000000000000e5 +1183 2 4 34 -0.32768000000000000000e5 +1183 2 8 22 -0.65536000000000000000e5 +1183 2 12 26 0.65536000000000000000e5 +1183 2 16 30 0.32768000000000000000e5 +1183 2 22 28 0.32768000000000000000e5 +1183 3 2 31 0.65536000000000000000e5 +1183 3 14 27 0.13107200000000000000e6 +1183 4 4 16 0.65536000000000000000e5 +1184 1 5 52 -0.32768000000000000000e5 +1184 1 26 44 0.32768000000000000000e5 +1185 1 26 45 0.32768000000000000000e5 +1185 1 33 40 -0.32768000000000000000e5 +1186 1 18 49 -0.32768000000000000000e5 +1186 1 26 46 0.32768000000000000000e5 +1187 1 1 48 0.32768000000000000000e5 +1187 1 2 49 0.65536000000000000000e5 +1187 1 3 50 0.65536000000000000000e5 +1187 1 11 42 -0.13107200000000000000e6 +1187 1 12 43 -0.26214400000000000000e6 +1187 1 17 48 0.26214400000000000000e6 +1187 1 23 38 0.32768000000000000000e5 +1187 1 24 39 0.32768000000000000000e5 +1187 1 26 47 0.32768000000000000000e5 +1187 2 2 32 0.32768000000000000000e5 +1187 2 3 33 0.32768000000000000000e5 +1187 2 8 22 -0.13107200000000000000e6 +1187 2 12 26 0.13107200000000000000e6 +1187 2 16 30 0.65536000000000000000e5 +1187 3 2 31 0.13107200000000000000e6 +1187 3 4 33 0.32768000000000000000e5 +1187 3 14 27 0.26214400000000000000e6 +1187 4 4 16 0.13107200000000000000e6 +1188 1 6 53 -0.32768000000000000000e5 +1188 1 26 48 0.32768000000000000000e5 +1189 1 1 48 -0.65536000000000000000e5 +1189 1 2 49 -0.98304000000000000000e5 +1189 1 3 50 -0.13107200000000000000e6 +1189 1 6 53 0.32768000000000000000e5 +1189 1 11 42 0.26214400000000000000e6 +1189 1 12 43 0.52428800000000000000e6 +1189 1 17 48 -0.52428800000000000000e6 +1189 1 23 38 -0.65536000000000000000e5 +1189 1 24 39 -0.32768000000000000000e5 +1189 1 26 41 0.65536000000000000000e5 +1189 1 26 49 0.32768000000000000000e5 +1189 1 28 43 -0.13107200000000000000e6 +1189 2 2 32 -0.65536000000000000000e5 +1189 2 3 33 -0.32768000000000000000e5 +1189 2 4 34 0.65536000000000000000e5 +1189 2 5 35 0.32768000000000000000e5 +1189 2 8 22 0.26214400000000000000e6 +1189 2 12 26 -0.26214400000000000000e6 +1189 2 16 30 -0.13107200000000000000e6 +1189 3 2 31 -0.26214400000000000000e6 +1189 3 4 33 -0.32768000000000000000e5 +1189 3 5 34 0.65536000000000000000e5 +1189 3 14 27 -0.52428800000000000000e6 +1189 4 4 16 -0.26214400000000000000e6 +1190 1 1 48 -0.16384000000000000000e5 +1190 1 2 49 -0.16384000000000000000e5 +1190 1 3 50 -0.32768000000000000000e5 +1190 1 11 42 0.65536000000000000000e5 +1190 1 12 43 0.13107200000000000000e6 +1190 1 17 48 -0.13107200000000000000e6 +1190 1 23 38 -0.16384000000000000000e5 +1190 1 26 41 0.32768000000000000000e5 +1190 1 26 50 0.32768000000000000000e5 +1190 1 28 43 -0.65536000000000000000e5 +1190 2 2 32 -0.16384000000000000000e5 +1190 2 4 34 0.32768000000000000000e5 +1190 2 8 22 0.65536000000000000000e5 +1190 2 12 26 -0.65536000000000000000e5 +1190 2 16 30 -0.32768000000000000000e5 +1190 3 2 31 -0.65536000000000000000e5 +1190 3 5 34 0.32768000000000000000e5 +1190 3 14 27 -0.13107200000000000000e6 +1190 4 4 16 -0.65536000000000000000e5 +1191 1 1 48 0.16384000000000000000e5 +1191 1 2 49 0.16384000000000000000e5 +1191 1 3 50 0.32768000000000000000e5 +1191 1 11 42 -0.65536000000000000000e5 +1191 1 12 43 -0.13107200000000000000e6 +1191 1 17 48 0.13107200000000000000e6 +1191 1 23 38 0.16384000000000000000e5 +1191 1 26 51 0.32768000000000000000e5 +1191 1 28 43 0.65536000000000000000e5 +1191 1 33 48 -0.65536000000000000000e5 +1191 2 2 32 0.16384000000000000000e5 +1191 2 4 34 -0.32768000000000000000e5 +1191 2 8 22 -0.65536000000000000000e5 +1191 2 12 26 0.65536000000000000000e5 +1191 2 16 30 0.32768000000000000000e5 +1191 2 28 30 0.32768000000000000000e5 +1191 3 2 31 0.65536000000000000000e5 +1191 3 5 34 -0.32768000000000000000e5 +1191 3 14 27 0.13107200000000000000e6 +1191 3 22 27 -0.32768000000000000000e5 +1191 4 4 16 0.65536000000000000000e5 +1192 1 15 54 -0.32768000000000000000e5 +1192 1 26 52 0.32768000000000000000e5 +1193 1 25 56 -0.32768000000000000000e5 +1193 1 26 53 0.32768000000000000000e5 +1193 3 28 33 -0.32768000000000000000e5 +1194 1 1 48 -0.65536000000000000000e5 +1194 1 2 49 -0.98304000000000000000e5 +1194 1 3 50 -0.13107200000000000000e6 +1194 1 11 42 0.26214400000000000000e6 +1194 1 12 43 0.52428800000000000000e6 +1194 1 17 48 -0.52428800000000000000e6 +1194 1 23 38 -0.65536000000000000000e5 +1194 1 24 39 -0.32768000000000000000e5 +1194 1 24 55 0.65536000000000000000e5 +1194 1 25 56 0.32768000000000000000e5 +1194 1 26 54 0.32768000000000000000e5 +1194 1 28 43 -0.13107200000000000000e6 +1194 2 2 32 -0.65536000000000000000e5 +1194 2 3 33 -0.32768000000000000000e5 +1194 2 8 22 0.26214400000000000000e6 +1194 2 12 26 -0.26214400000000000000e6 +1194 2 16 30 -0.13107200000000000000e6 +1194 2 19 35 0.32768000000000000000e5 +1194 2 21 35 0.65536000000000000000e5 +1194 3 2 31 -0.26214400000000000000e6 +1194 3 4 33 -0.32768000000000000000e5 +1194 3 14 27 -0.52428800000000000000e6 +1194 3 17 30 -0.65536000000000000000e5 +1194 3 18 31 0.13107200000000000000e6 +1194 3 19 32 -0.32768000000000000000e5 +1194 3 20 33 -0.65536000000000000000e5 +1194 3 21 34 0.13107200000000000000e6 +1194 3 28 33 0.32768000000000000000e5 +1194 4 4 16 -0.26214400000000000000e6 +1195 1 1 48 0.16384000000000000000e5 +1195 1 2 49 0.16384000000000000000e5 +1195 1 3 50 0.32768000000000000000e5 +1195 1 11 42 -0.65536000000000000000e5 +1195 1 12 43 -0.13107200000000000000e6 +1195 1 17 48 0.13107200000000000000e6 +1195 1 23 38 0.16384000000000000000e5 +1195 1 26 55 0.32768000000000000000e5 +1195 1 28 43 0.65536000000000000000e5 +1195 1 43 50 -0.65536000000000000000e5 +1195 2 2 32 0.16384000000000000000e5 +1195 2 8 22 -0.65536000000000000000e5 +1195 2 12 26 0.65536000000000000000e5 +1195 2 16 30 0.32768000000000000000e5 +1195 2 21 35 -0.32768000000000000000e5 +1195 2 28 34 0.32768000000000000000e5 +1195 3 2 31 0.65536000000000000000e5 +1195 3 14 27 0.13107200000000000000e6 +1195 3 17 30 0.32768000000000000000e5 +1195 3 18 31 -0.65536000000000000000e5 +1195 3 20 33 0.32768000000000000000e5 +1195 3 21 34 -0.65536000000000000000e5 +1195 4 4 16 0.65536000000000000000e5 +1196 1 1 48 -0.32768000000000000000e5 +1196 1 2 49 -0.32768000000000000000e5 +1196 1 3 50 -0.65536000000000000000e5 +1196 1 11 42 0.13107200000000000000e6 +1196 1 12 43 0.26214400000000000000e6 +1196 1 17 48 -0.26214400000000000000e6 +1196 1 23 38 -0.32768000000000000000e5 +1196 1 24 55 0.65536000000000000000e5 +1196 1 25 56 0.32768000000000000000e5 +1196 1 26 56 0.32768000000000000000e5 +1196 1 28 43 -0.13107200000000000000e6 +1196 1 47 54 0.32768000000000000000e5 +1196 2 2 32 -0.32768000000000000000e5 +1196 2 8 22 0.13107200000000000000e6 +1196 2 12 26 -0.13107200000000000000e6 +1196 2 16 30 -0.65536000000000000000e5 +1196 2 21 35 0.65536000000000000000e5 +1196 2 33 33 0.65536000000000000000e5 +1196 3 2 31 -0.13107200000000000000e6 +1196 3 14 27 -0.26214400000000000000e6 +1196 3 17 30 -0.65536000000000000000e5 +1196 3 18 31 0.13107200000000000000e6 +1196 3 20 33 -0.65536000000000000000e5 +1196 3 21 34 0.13107200000000000000e6 +1196 3 22 35 0.65536000000000000000e5 +1196 3 32 33 0.32768000000000000000e5 +1196 4 4 16 -0.13107200000000000000e6 +1197 1 2 17 -0.32768000000000000000e5 +1197 1 2 33 -0.16384000000000000000e5 +1197 1 3 34 0.32768000000000000000e5 +1197 1 10 41 -0.16384000000000000000e5 +1197 1 11 42 0.16384000000000000000e5 +1197 1 12 43 0.32768000000000000000e5 +1197 1 17 48 -0.32768000000000000000e5 +1197 1 27 27 0.32768000000000000000e5 +1197 2 1 31 0.16384000000000000000e5 +1197 2 7 21 -0.16384000000000000000e5 +1197 2 8 22 0.16384000000000000000e5 +1197 2 12 26 -0.16384000000000000000e5 +1197 3 1 14 0.32768000000000000000e5 +1197 3 6 23 0.32768000000000000000e5 +1197 3 7 20 -0.16384000000000000000e5 +1197 3 8 21 -0.16384000000000000000e5 +1197 3 14 27 -0.32768000000000000000e5 +1197 4 4 16 -0.16384000000000000000e5 +1198 1 2 33 0.32768000000000000000e5 +1198 1 3 34 -0.65536000000000000000e5 +1198 1 10 41 0.32768000000000000000e5 +1198 1 27 28 0.32768000000000000000e5 +1198 2 7 21 0.32768000000000000000e5 +1198 3 7 20 0.32768000000000000000e5 +1198 3 8 21 0.32768000000000000000e5 +1199 1 11 42 -0.32768000000000000000e5 +1199 1 12 43 -0.65536000000000000000e5 +1199 1 17 48 0.65536000000000000000e5 +1199 1 27 29 0.32768000000000000000e5 +1199 2 8 22 -0.32768000000000000000e5 +1199 2 12 26 0.32768000000000000000e5 +1199 3 14 27 0.65536000000000000000e5 +1199 4 4 16 0.32768000000000000000e5 +1200 1 10 41 -0.32768000000000000000e5 +1200 1 27 30 0.32768000000000000000e5 +1201 1 2 17 -0.32768000000000000000e5 +1201 1 27 31 0.32768000000000000000e5 +1201 3 1 14 0.32768000000000000000e5 +1201 3 6 23 0.32768000000000000000e5 +1202 1 16 47 -0.32768000000000000000e5 +1202 1 27 32 0.32768000000000000000e5 +1202 3 13 26 -0.32768000000000000000e5 +1203 1 12 43 -0.32768000000000000000e5 +1203 1 27 33 0.32768000000000000000e5 +1204 1 4 19 0.32768000000000000000e5 +1204 1 20 27 -0.65536000000000000000e5 +1204 1 27 34 0.32768000000000000000e5 +1204 1 28 35 0.32768000000000000000e5 +1204 2 10 24 0.32768000000000000000e5 +1204 3 8 13 -0.32768000000000000000e5 +1204 3 10 23 0.32768000000000000000e5 +1204 3 11 24 0.32768000000000000000e5 +1205 1 13 44 -0.32768000000000000000e5 +1205 1 27 35 0.32768000000000000000e5 +1206 1 4 19 0.16384000000000000000e5 +1206 1 13 44 -0.16384000000000000000e5 +1206 1 20 27 -0.32768000000000000000e5 +1206 1 27 36 0.32768000000000000000e5 +1206 3 8 13 -0.16384000000000000000e5 +1206 3 10 23 0.16384000000000000000e5 +1206 3 11 24 0.16384000000000000000e5 +1206 4 10 14 0.16384000000000000000e5 +1207 1 2 33 -0.65536000000000000000e5 +1207 1 3 34 0.13107200000000000000e6 +1207 1 3 50 0.32768000000000000000e5 +1207 1 5 52 -0.65536000000000000000e5 +1207 1 7 38 -0.32768000000000000000e5 +1207 1 8 39 -0.32768000000000000000e5 +1207 1 10 41 -0.65536000000000000000e5 +1207 1 11 42 0.65536000000000000000e5 +1207 1 12 43 0.13107200000000000000e6 +1207 1 16 47 -0.13107200000000000000e6 +1207 1 27 37 0.32768000000000000000e5 +1207 1 28 43 -0.65536000000000000000e5 +1207 2 7 21 -0.65536000000000000000e5 +1207 2 10 32 0.65536000000000000000e5 +1207 2 12 26 -0.65536000000000000000e5 +1207 3 1 30 -0.32768000000000000000e5 +1207 3 2 31 -0.65536000000000000000e5 +1207 3 7 20 -0.65536000000000000000e5 +1207 3 8 21 -0.65536000000000000000e5 +1207 3 14 27 -0.13107200000000000000e6 +1207 4 5 17 -0.32768000000000000000e5 +1207 4 7 19 0.65536000000000000000e5 +1208 1 1 48 -0.16384000000000000000e5 +1208 1 2 49 -0.16384000000000000000e5 +1208 1 23 38 -0.16384000000000000000e5 +1208 1 27 38 0.32768000000000000000e5 +1208 2 2 32 -0.16384000000000000000e5 +1209 1 3 50 -0.32768000000000000000e5 +1209 1 27 39 0.32768000000000000000e5 +1210 1 1 48 0.16384000000000000000e5 +1210 1 2 49 0.16384000000000000000e5 +1210 1 3 50 0.32768000000000000000e5 +1210 1 11 42 -0.65536000000000000000e5 +1210 1 12 43 -0.13107200000000000000e6 +1210 1 17 48 0.13107200000000000000e6 +1210 1 23 38 0.16384000000000000000e5 +1210 1 27 40 0.32768000000000000000e5 +1210 2 2 32 0.16384000000000000000e5 +1210 2 8 22 -0.65536000000000000000e5 +1210 2 12 26 0.65536000000000000000e5 +1210 2 16 30 0.32768000000000000000e5 +1210 3 2 31 0.65536000000000000000e5 +1210 3 14 27 0.13107200000000000000e6 +1210 4 4 16 0.65536000000000000000e5 +1211 1 5 52 -0.32768000000000000000e5 +1211 1 11 42 0.32768000000000000000e5 +1211 1 12 43 0.65536000000000000000e5 +1211 1 16 47 -0.65536000000000000000e5 +1211 1 27 41 0.32768000000000000000e5 +1211 1 28 43 -0.32768000000000000000e5 +1211 2 10 32 0.32768000000000000000e5 +1211 2 12 26 -0.32768000000000000000e5 +1211 3 2 31 -0.32768000000000000000e5 +1211 3 14 27 -0.65536000000000000000e5 +1211 4 7 19 0.32768000000000000000e5 +1212 1 11 42 -0.32768000000000000000e5 +1212 1 12 43 -0.65536000000000000000e5 +1212 1 17 48 0.65536000000000000000e5 +1212 1 27 42 0.32768000000000000000e5 +1212 2 8 22 -0.32768000000000000000e5 +1212 2 12 26 0.32768000000000000000e5 +1212 3 2 31 0.32768000000000000000e5 +1212 3 14 27 0.65536000000000000000e5 +1212 4 4 16 0.32768000000000000000e5 +1213 1 5 52 0.32768000000000000000e5 +1213 1 17 48 -0.65536000000000000000e5 +1213 1 27 43 0.32768000000000000000e5 +1213 1 28 43 0.32768000000000000000e5 +1213 2 8 22 0.32768000000000000000e5 +1213 4 4 16 -0.32768000000000000000e5 +1213 4 7 19 -0.32768000000000000000e5 +1214 1 16 47 -0.32768000000000000000e5 +1214 1 27 44 0.32768000000000000000e5 +1215 1 5 52 0.16384000000000000000e5 +1215 1 11 42 -0.16384000000000000000e5 +1215 1 12 43 -0.32768000000000000000e5 +1215 1 27 45 0.32768000000000000000e5 +1215 2 12 26 0.16384000000000000000e5 +1215 2 20 34 -0.16384000000000000000e5 +1215 3 2 31 0.16384000000000000000e5 +1215 3 14 27 0.32768000000000000000e5 +1215 4 7 19 -0.16384000000000000000e5 +1215 4 8 20 -0.16384000000000000000e5 +1216 1 27 46 0.32768000000000000000e5 +1216 1 34 41 -0.32768000000000000000e5 +1217 1 1 48 -0.16384000000000000000e5 +1217 1 2 49 -0.16384000000000000000e5 +1217 1 23 38 -0.16384000000000000000e5 +1217 1 27 47 0.32768000000000000000e5 +1217 2 2 32 -0.16384000000000000000e5 +1217 3 16 29 0.32768000000000000000e5 +1218 1 7 54 -0.32768000000000000000e5 +1218 1 27 48 0.32768000000000000000e5 +1219 1 1 48 0.16384000000000000000e5 +1219 1 2 49 0.16384000000000000000e5 +1219 1 3 50 0.32768000000000000000e5 +1219 1 11 42 -0.65536000000000000000e5 +1219 1 12 43 -0.13107200000000000000e6 +1219 1 17 48 0.13107200000000000000e6 +1219 1 23 38 0.16384000000000000000e5 +1219 1 27 49 0.32768000000000000000e5 +1219 2 2 32 0.16384000000000000000e5 +1219 2 8 22 -0.65536000000000000000e5 +1219 2 12 26 0.65536000000000000000e5 +1219 2 16 30 0.32768000000000000000e5 +1219 3 2 31 0.65536000000000000000e5 +1219 3 14 27 0.13107200000000000000e6 +1219 3 17 30 0.32768000000000000000e5 +1219 4 4 16 0.65536000000000000000e5 +1220 1 27 50 0.32768000000000000000e5 +1220 1 37 44 -0.32768000000000000000e5 +1221 1 27 51 0.32768000000000000000e5 +1221 1 32 47 -0.32768000000000000000e5 +1222 1 27 52 0.32768000000000000000e5 +1222 1 28 43 -0.16384000000000000000e5 +1222 1 32 47 -0.16384000000000000000e5 +1222 1 37 44 -0.16384000000000000000e5 +1222 2 20 34 -0.16384000000000000000e5 +1222 3 18 31 0.16384000000000000000e5 +1223 1 7 54 -0.32768000000000000000e5 +1223 1 27 53 0.32768000000000000000e5 +1223 3 6 35 0.32768000000000000000e5 +1224 1 1 48 0.16384000000000000000e5 +1224 1 2 49 0.16384000000000000000e5 +1224 1 3 50 0.32768000000000000000e5 +1224 1 11 42 -0.65536000000000000000e5 +1224 1 12 43 -0.13107200000000000000e6 +1224 1 17 48 0.13107200000000000000e6 +1224 1 23 38 0.16384000000000000000e5 +1224 1 27 54 0.32768000000000000000e5 +1224 2 2 32 0.16384000000000000000e5 +1224 2 8 22 -0.65536000000000000000e5 +1224 2 12 26 0.65536000000000000000e5 +1224 2 16 30 0.32768000000000000000e5 +1224 3 2 31 0.65536000000000000000e5 +1224 3 14 27 0.13107200000000000000e6 +1224 3 17 30 0.32768000000000000000e5 +1224 3 20 33 0.32768000000000000000e5 +1224 4 4 16 0.65536000000000000000e5 +1225 1 27 55 0.32768000000000000000e5 +1225 1 37 52 -0.32768000000000000000e5 +1226 1 27 56 0.32768000000000000000e5 +1226 1 47 50 -0.32768000000000000000e5 +1227 1 11 42 -0.16384000000000000000e5 +1227 1 12 43 -0.32768000000000000000e5 +1227 1 17 48 0.32768000000000000000e5 +1227 1 28 28 0.32768000000000000000e5 +1227 2 8 22 -0.16384000000000000000e5 +1227 2 12 26 0.16384000000000000000e5 +1227 3 14 27 0.32768000000000000000e5 +1227 4 4 16 0.16384000000000000000e5 +1228 1 10 41 -0.32768000000000000000e5 +1228 1 28 29 0.32768000000000000000e5 +1229 1 10 41 0.32768000000000000000e5 +1229 1 11 42 0.32768000000000000000e5 +1229 1 17 48 -0.65536000000000000000e5 +1229 1 28 30 0.32768000000000000000e5 +1229 2 8 22 0.32768000000000000000e5 +1229 3 14 27 -0.65536000000000000000e5 +1229 4 4 16 -0.32768000000000000000e5 +1230 1 16 47 -0.32768000000000000000e5 +1230 1 28 31 0.32768000000000000000e5 +1230 3 13 26 -0.32768000000000000000e5 +1231 1 12 43 -0.32768000000000000000e5 +1231 1 28 32 0.32768000000000000000e5 +1232 1 17 48 -0.32768000000000000000e5 +1232 1 28 33 0.32768000000000000000e5 +1232 3 14 27 -0.32768000000000000000e5 +1233 1 13 44 -0.32768000000000000000e5 +1233 1 28 34 0.32768000000000000000e5 +1234 1 19 42 -0.32768000000000000000e5 +1234 1 28 36 0.32768000000000000000e5 +1235 1 1 48 -0.16384000000000000000e5 +1235 1 2 49 -0.16384000000000000000e5 +1235 1 23 38 -0.16384000000000000000e5 +1235 1 28 37 0.32768000000000000000e5 +1235 2 2 32 -0.16384000000000000000e5 +1236 1 3 50 -0.32768000000000000000e5 +1236 1 28 38 0.32768000000000000000e5 +1237 1 1 48 0.16384000000000000000e5 +1237 1 2 49 0.16384000000000000000e5 +1237 1 3 50 0.32768000000000000000e5 +1237 1 11 42 -0.65536000000000000000e5 +1237 1 12 43 -0.13107200000000000000e6 +1237 1 17 48 0.13107200000000000000e6 +1237 1 23 38 0.16384000000000000000e5 +1237 1 28 39 0.32768000000000000000e5 +1237 2 2 32 0.16384000000000000000e5 +1237 2 8 22 -0.65536000000000000000e5 +1237 2 12 26 0.65536000000000000000e5 +1237 2 16 30 0.32768000000000000000e5 +1237 3 2 31 0.65536000000000000000e5 +1237 3 14 27 0.13107200000000000000e6 +1237 4 4 16 0.65536000000000000000e5 +1238 1 26 41 -0.32768000000000000000e5 +1238 1 28 40 0.32768000000000000000e5 +1239 1 11 42 -0.32768000000000000000e5 +1239 1 12 43 -0.65536000000000000000e5 +1239 1 17 48 0.65536000000000000000e5 +1239 1 28 41 0.32768000000000000000e5 +1239 2 8 22 -0.32768000000000000000e5 +1239 2 12 26 0.32768000000000000000e5 +1239 3 2 31 0.32768000000000000000e5 +1239 3 14 27 0.65536000000000000000e5 +1239 4 4 16 0.32768000000000000000e5 +1240 1 5 52 0.32768000000000000000e5 +1240 1 17 48 -0.65536000000000000000e5 +1240 1 28 42 0.32768000000000000000e5 +1240 1 28 43 0.32768000000000000000e5 +1240 2 8 22 0.32768000000000000000e5 +1240 4 4 16 -0.32768000000000000000e5 +1240 4 7 19 -0.32768000000000000000e5 +1241 1 5 52 0.16384000000000000000e5 +1241 1 11 42 -0.16384000000000000000e5 +1241 1 12 43 -0.32768000000000000000e5 +1241 1 28 44 0.32768000000000000000e5 +1241 2 12 26 0.16384000000000000000e5 +1241 2 20 34 -0.16384000000000000000e5 +1241 3 2 31 0.16384000000000000000e5 +1241 3 14 27 0.32768000000000000000e5 +1241 4 7 19 -0.16384000000000000000e5 +1241 4 8 20 -0.16384000000000000000e5 +1242 1 17 48 -0.32768000000000000000e5 +1242 1 28 45 0.32768000000000000000e5 +1243 1 13 52 -0.32768000000000000000e5 +1243 1 28 46 0.32768000000000000000e5 +1244 1 7 54 -0.32768000000000000000e5 +1244 1 28 47 0.32768000000000000000e5 +1245 1 1 48 0.16384000000000000000e5 +1245 1 2 49 0.16384000000000000000e5 +1245 1 3 50 0.32768000000000000000e5 +1245 1 11 42 -0.65536000000000000000e5 +1245 1 12 43 -0.13107200000000000000e6 +1245 1 17 48 0.13107200000000000000e6 +1245 1 23 38 0.16384000000000000000e5 +1245 1 28 48 0.32768000000000000000e5 +1245 2 2 32 0.16384000000000000000e5 +1245 2 8 22 -0.65536000000000000000e5 +1245 2 12 26 0.65536000000000000000e5 +1245 2 16 30 0.32768000000000000000e5 +1245 3 2 31 0.65536000000000000000e5 +1245 3 14 27 0.13107200000000000000e6 +1245 3 17 30 0.32768000000000000000e5 +1245 4 4 16 0.65536000000000000000e5 +1246 1 26 41 -0.32768000000000000000e5 +1246 1 28 49 0.32768000000000000000e5 +1246 3 22 27 0.32768000000000000000e5 +1247 1 28 50 0.32768000000000000000e5 +1247 1 32 47 -0.32768000000000000000e5 +1248 1 28 43 -0.32768000000000000000e5 +1248 1 28 51 0.32768000000000000000e5 +1248 3 18 31 0.32768000000000000000e5 +1249 1 17 48 -0.32768000000000000000e5 +1249 1 28 52 0.32768000000000000000e5 +1249 3 24 29 0.32768000000000000000e5 +1250 1 1 48 0.16384000000000000000e5 +1250 1 2 49 0.16384000000000000000e5 +1250 1 3 50 0.32768000000000000000e5 +1250 1 11 42 -0.65536000000000000000e5 +1250 1 12 43 -0.13107200000000000000e6 +1250 1 17 48 0.13107200000000000000e6 +1250 1 23 38 0.16384000000000000000e5 +1250 1 28 53 0.32768000000000000000e5 +1250 2 2 32 0.16384000000000000000e5 +1250 2 8 22 -0.65536000000000000000e5 +1250 2 12 26 0.65536000000000000000e5 +1250 2 16 30 0.32768000000000000000e5 +1250 3 2 31 0.65536000000000000000e5 +1250 3 14 27 0.13107200000000000000e6 +1250 3 17 30 0.32768000000000000000e5 +1250 3 20 33 0.32768000000000000000e5 +1250 4 4 16 0.65536000000000000000e5 +1251 1 24 55 -0.32768000000000000000e5 +1251 1 28 54 0.32768000000000000000e5 +1252 1 28 43 -0.32768000000000000000e5 +1252 1 28 55 0.32768000000000000000e5 +1252 3 18 31 0.32768000000000000000e5 +1252 3 21 34 0.32768000000000000000e5 +1253 1 1 48 0.16384000000000000000e5 +1253 1 2 49 0.16384000000000000000e5 +1253 1 3 50 0.32768000000000000000e5 +1253 1 11 42 -0.65536000000000000000e5 +1253 1 12 43 -0.13107200000000000000e6 +1253 1 17 48 0.13107200000000000000e6 +1253 1 23 38 0.16384000000000000000e5 +1253 1 24 55 -0.32768000000000000000e5 +1253 1 28 56 0.32768000000000000000e5 +1253 1 47 50 0.32768000000000000000e5 +1253 2 2 32 0.16384000000000000000e5 +1253 2 8 22 -0.65536000000000000000e5 +1253 2 12 26 0.65536000000000000000e5 +1253 2 16 30 0.32768000000000000000e5 +1253 2 21 35 -0.32768000000000000000e5 +1253 2 29 35 0.32768000000000000000e5 +1253 3 2 31 0.65536000000000000000e5 +1253 3 14 27 0.13107200000000000000e6 +1253 3 17 30 0.32768000000000000000e5 +1253 3 20 33 0.32768000000000000000e5 +1253 3 22 35 -0.32768000000000000000e5 +1253 3 29 34 0.65536000000000000000e5 +1253 4 4 16 0.65536000000000000000e5 +1254 1 10 41 0.16384000000000000000e5 +1254 1 11 42 0.16384000000000000000e5 +1254 1 17 48 -0.32768000000000000000e5 +1254 1 29 29 0.32768000000000000000e5 +1254 2 8 22 0.16384000000000000000e5 +1254 3 14 27 -0.32768000000000000000e5 +1254 4 4 16 -0.16384000000000000000e5 +1255 1 11 42 -0.32768000000000000000e5 +1255 1 29 30 0.32768000000000000000e5 +1256 1 12 43 -0.32768000000000000000e5 +1256 1 29 31 0.32768000000000000000e5 +1257 1 17 48 -0.32768000000000000000e5 +1257 1 29 32 0.32768000000000000000e5 +1257 3 14 27 -0.32768000000000000000e5 +1258 1 18 25 -0.32768000000000000000e5 +1258 1 29 33 0.32768000000000000000e5 +1258 3 14 19 0.32768000000000000000e5 +1259 1 28 35 -0.32768000000000000000e5 +1259 1 29 34 0.32768000000000000000e5 +1260 1 14 45 -0.32768000000000000000e5 +1260 1 29 35 0.32768000000000000000e5 +1261 1 3 50 -0.32768000000000000000e5 +1261 1 29 37 0.32768000000000000000e5 +1262 1 1 48 0.16384000000000000000e5 +1262 1 2 49 0.16384000000000000000e5 +1262 1 3 50 0.32768000000000000000e5 +1262 1 11 42 -0.65536000000000000000e5 +1262 1 12 43 -0.13107200000000000000e6 +1262 1 17 48 0.13107200000000000000e6 +1262 1 23 38 0.16384000000000000000e5 +1262 1 29 38 0.32768000000000000000e5 +1262 2 2 32 0.16384000000000000000e5 +1262 2 8 22 -0.65536000000000000000e5 +1262 2 12 26 0.65536000000000000000e5 +1262 2 16 30 0.32768000000000000000e5 +1262 3 2 31 0.65536000000000000000e5 +1262 3 14 27 0.13107200000000000000e6 +1262 4 4 16 0.65536000000000000000e5 +1263 1 26 41 -0.32768000000000000000e5 +1263 1 29 39 0.32768000000000000000e5 +1264 1 1 48 -0.16384000000000000000e5 +1264 1 2 49 -0.16384000000000000000e5 +1264 1 3 50 -0.32768000000000000000e5 +1264 1 11 42 0.65536000000000000000e5 +1264 1 12 43 0.13107200000000000000e6 +1264 1 17 48 -0.13107200000000000000e6 +1264 1 23 38 -0.16384000000000000000e5 +1264 1 26 41 0.32768000000000000000e5 +1264 1 28 43 -0.65536000000000000000e5 +1264 1 29 40 0.32768000000000000000e5 +1264 2 2 32 -0.16384000000000000000e5 +1264 2 4 34 0.32768000000000000000e5 +1264 2 8 22 0.65536000000000000000e5 +1264 2 12 26 -0.65536000000000000000e5 +1264 2 16 30 -0.32768000000000000000e5 +1264 3 2 31 -0.65536000000000000000e5 +1264 3 14 27 -0.13107200000000000000e6 +1264 4 4 16 -0.65536000000000000000e5 +1265 1 5 52 0.32768000000000000000e5 +1265 1 17 48 -0.65536000000000000000e5 +1265 1 28 43 0.32768000000000000000e5 +1265 1 29 41 0.32768000000000000000e5 +1265 2 8 22 0.32768000000000000000e5 +1265 4 4 16 -0.32768000000000000000e5 +1265 4 7 19 -0.32768000000000000000e5 +1266 1 28 43 -0.32768000000000000000e5 +1266 1 29 42 0.32768000000000000000e5 +1267 1 5 52 -0.32768000000000000000e5 +1267 1 29 43 0.32768000000000000000e5 +1268 1 17 48 -0.32768000000000000000e5 +1268 1 29 44 0.32768000000000000000e5 +1269 1 14 45 -0.65536000000000000000e5 +1269 1 17 48 0.32768000000000000000e5 +1269 1 18 49 0.32768000000000000000e5 +1269 1 29 45 0.32768000000000000000e5 +1269 2 24 30 0.32768000000000000000e5 +1269 3 15 28 0.65536000000000000000e5 +1270 1 14 45 -0.32768000000000000000e5 +1270 1 29 46 0.32768000000000000000e5 +1270 3 15 28 0.32768000000000000000e5 +1271 1 1 48 0.16384000000000000000e5 +1271 1 2 49 0.16384000000000000000e5 +1271 1 3 50 0.32768000000000000000e5 +1271 1 11 42 -0.65536000000000000000e5 +1271 1 12 43 -0.13107200000000000000e6 +1271 1 17 48 0.13107200000000000000e6 +1271 1 23 38 0.16384000000000000000e5 +1271 1 29 47 0.32768000000000000000e5 +1271 2 2 32 0.16384000000000000000e5 +1271 2 8 22 -0.65536000000000000000e5 +1271 2 12 26 0.65536000000000000000e5 +1271 2 16 30 0.32768000000000000000e5 +1271 3 2 31 0.65536000000000000000e5 +1271 3 14 27 0.13107200000000000000e6 +1271 3 17 30 0.32768000000000000000e5 +1271 4 4 16 0.65536000000000000000e5 +1272 1 26 41 -0.32768000000000000000e5 +1272 1 29 48 0.32768000000000000000e5 +1272 3 22 27 0.32768000000000000000e5 +1273 1 1 48 -0.16384000000000000000e5 +1273 1 2 49 -0.16384000000000000000e5 +1273 1 3 50 -0.32768000000000000000e5 +1273 1 11 42 0.65536000000000000000e5 +1273 1 12 43 0.13107200000000000000e6 +1273 1 17 48 -0.13107200000000000000e6 +1273 1 23 38 -0.16384000000000000000e5 +1273 1 26 41 0.32768000000000000000e5 +1273 1 28 43 -0.65536000000000000000e5 +1273 1 29 49 0.32768000000000000000e5 +1273 2 2 32 -0.16384000000000000000e5 +1273 2 4 34 0.32768000000000000000e5 +1273 2 8 22 0.65536000000000000000e5 +1273 2 12 26 -0.65536000000000000000e5 +1273 2 16 30 -0.32768000000000000000e5 +1273 3 2 31 -0.65536000000000000000e5 +1273 3 5 34 0.32768000000000000000e5 +1273 3 14 27 -0.13107200000000000000e6 +1273 4 4 16 -0.65536000000000000000e5 +1274 1 28 43 -0.32768000000000000000e5 +1274 1 29 50 0.32768000000000000000e5 +1274 3 18 31 0.32768000000000000000e5 +1275 1 29 51 0.32768000000000000000e5 +1275 1 33 48 -0.32768000000000000000e5 +1276 1 29 52 0.32768000000000000000e5 +1276 1 34 49 -0.32768000000000000000e5 +1277 1 24 55 -0.32768000000000000000e5 +1277 1 29 53 0.32768000000000000000e5 +1278 1 1 48 -0.16384000000000000000e5 +1278 1 2 49 -0.16384000000000000000e5 +1278 1 3 50 -0.32768000000000000000e5 +1278 1 11 42 0.65536000000000000000e5 +1278 1 12 43 0.13107200000000000000e6 +1278 1 17 48 -0.13107200000000000000e6 +1278 1 23 38 -0.16384000000000000000e5 +1278 1 24 55 0.32768000000000000000e5 +1278 1 28 43 -0.65536000000000000000e5 +1278 1 29 54 0.32768000000000000000e5 +1278 2 2 32 -0.16384000000000000000e5 +1278 2 8 22 0.65536000000000000000e5 +1278 2 12 26 -0.65536000000000000000e5 +1278 2 16 30 -0.32768000000000000000e5 +1278 2 21 35 0.32768000000000000000e5 +1278 3 2 31 -0.65536000000000000000e5 +1278 3 14 27 -0.13107200000000000000e6 +1278 3 17 30 -0.32768000000000000000e5 +1278 3 18 31 0.65536000000000000000e5 +1278 3 20 33 -0.32768000000000000000e5 +1278 3 21 34 0.65536000000000000000e5 +1278 4 4 16 -0.65536000000000000000e5 +1279 1 29 55 0.32768000000000000000e5 +1279 1 43 50 -0.32768000000000000000e5 +1280 1 1 48 -0.16384000000000000000e5 +1280 1 2 49 -0.16384000000000000000e5 +1280 1 3 50 -0.32768000000000000000e5 +1280 1 11 42 0.65536000000000000000e5 +1280 1 12 43 0.13107200000000000000e6 +1280 1 17 48 -0.13107200000000000000e6 +1280 1 23 38 -0.16384000000000000000e5 +1280 1 24 55 0.32768000000000000000e5 +1280 1 28 43 -0.65536000000000000000e5 +1280 1 29 56 0.32768000000000000000e5 +1280 2 2 32 -0.16384000000000000000e5 +1280 2 8 22 0.65536000000000000000e5 +1280 2 12 26 -0.65536000000000000000e5 +1280 2 16 30 -0.32768000000000000000e5 +1280 2 21 35 0.32768000000000000000e5 +1280 3 2 31 -0.65536000000000000000e5 +1280 3 14 27 -0.13107200000000000000e6 +1280 3 17 30 -0.32768000000000000000e5 +1280 3 18 31 0.65536000000000000000e5 +1280 3 20 33 -0.32768000000000000000e5 +1280 3 21 34 0.65536000000000000000e5 +1280 3 22 35 0.32768000000000000000e5 +1280 4 4 16 -0.65536000000000000000e5 +1281 1 26 33 -0.16384000000000000000e5 +1281 1 30 30 0.32768000000000000000e5 +1282 1 17 48 -0.32768000000000000000e5 +1282 1 30 31 0.32768000000000000000e5 +1282 3 14 27 -0.32768000000000000000e5 +1283 1 18 25 -0.32768000000000000000e5 +1283 1 30 32 0.32768000000000000000e5 +1283 3 14 19 0.32768000000000000000e5 +1284 1 14 45 -0.65536000000000000000e5 +1284 1 17 48 0.32768000000000000000e5 +1284 1 18 25 0.32768000000000000000e5 +1284 1 30 33 0.32768000000000000000e5 +1284 2 14 28 0.32768000000000000000e5 +1284 3 14 19 -0.32768000000000000000e5 +1284 3 14 27 0.32768000000000000000e5 +1285 1 14 45 -0.32768000000000000000e5 +1285 1 30 34 0.32768000000000000000e5 +1286 1 11 46 -0.32768000000000000000e5 +1286 1 30 35 0.32768000000000000000e5 +1287 1 15 46 -0.32768000000000000000e5 +1287 1 30 36 0.32768000000000000000e5 +1288 1 1 48 0.16384000000000000000e5 +1288 1 2 49 0.16384000000000000000e5 +1288 1 3 50 0.32768000000000000000e5 +1288 1 11 42 -0.65536000000000000000e5 +1288 1 12 43 -0.13107200000000000000e6 +1288 1 17 48 0.13107200000000000000e6 +1288 1 23 38 0.16384000000000000000e5 +1288 1 30 37 0.32768000000000000000e5 +1288 2 2 32 0.16384000000000000000e5 +1288 2 8 22 -0.65536000000000000000e5 +1288 2 12 26 0.65536000000000000000e5 +1288 2 16 30 0.32768000000000000000e5 +1288 3 2 31 0.65536000000000000000e5 +1288 3 14 27 0.13107200000000000000e6 +1288 4 4 16 0.65536000000000000000e5 +1289 1 26 41 -0.32768000000000000000e5 +1289 1 30 38 0.32768000000000000000e5 +1290 1 1 48 -0.16384000000000000000e5 +1290 1 2 49 -0.16384000000000000000e5 +1290 1 3 50 -0.32768000000000000000e5 +1290 1 11 42 0.65536000000000000000e5 +1290 1 12 43 0.13107200000000000000e6 +1290 1 17 48 -0.13107200000000000000e6 +1290 1 23 38 -0.16384000000000000000e5 +1290 1 26 41 0.32768000000000000000e5 +1290 1 28 43 -0.65536000000000000000e5 +1290 1 30 39 0.32768000000000000000e5 +1290 2 2 32 -0.16384000000000000000e5 +1290 2 4 34 0.32768000000000000000e5 +1290 2 8 22 0.65536000000000000000e5 +1290 2 12 26 -0.65536000000000000000e5 +1290 2 16 30 -0.32768000000000000000e5 +1290 3 2 31 -0.65536000000000000000e5 +1290 3 14 27 -0.13107200000000000000e6 +1290 4 4 16 -0.65536000000000000000e5 +1291 1 1 48 0.16384000000000000000e5 +1291 1 2 49 0.16384000000000000000e5 +1291 1 3 50 0.32768000000000000000e5 +1291 1 5 52 -0.65536000000000000000e5 +1291 1 11 42 -0.65536000000000000000e5 +1291 1 12 43 -0.13107200000000000000e6 +1291 1 17 48 0.13107200000000000000e6 +1291 1 23 38 0.16384000000000000000e5 +1291 1 28 43 0.65536000000000000000e5 +1291 1 30 40 0.32768000000000000000e5 +1291 2 2 32 0.16384000000000000000e5 +1291 2 4 34 -0.32768000000000000000e5 +1291 2 8 22 -0.65536000000000000000e5 +1291 2 12 26 0.65536000000000000000e5 +1291 2 16 30 0.32768000000000000000e5 +1291 2 22 28 0.32768000000000000000e5 +1291 3 2 31 0.65536000000000000000e5 +1291 3 14 27 0.13107200000000000000e6 +1291 4 4 16 0.65536000000000000000e5 +1292 1 28 43 -0.32768000000000000000e5 +1292 1 30 41 0.32768000000000000000e5 +1293 1 5 52 -0.32768000000000000000e5 +1293 1 30 42 0.32768000000000000000e5 +1294 1 30 43 0.32768000000000000000e5 +1294 1 33 40 -0.32768000000000000000e5 +1295 1 14 45 -0.65536000000000000000e5 +1295 1 17 48 0.32768000000000000000e5 +1295 1 18 49 0.32768000000000000000e5 +1295 1 30 44 0.32768000000000000000e5 +1295 2 24 30 0.32768000000000000000e5 +1295 3 15 28 0.65536000000000000000e5 +1296 1 18 49 -0.32768000000000000000e5 +1296 1 30 45 0.32768000000000000000e5 +1297 1 13 52 0.32768000000000000000e5 +1297 1 14 45 0.32768000000000000000e5 +1297 1 29 36 -0.65536000000000000000e5 +1297 1 30 46 0.32768000000000000000e5 +1297 2 15 33 0.32768000000000000000e5 +1297 3 15 28 -0.32768000000000000000e5 +1297 3 24 25 0.65536000000000000000e5 +1298 1 26 41 -0.32768000000000000000e5 +1298 1 30 47 0.32768000000000000000e5 +1298 3 22 27 0.32768000000000000000e5 +1299 1 1 48 -0.16384000000000000000e5 +1299 1 2 49 -0.16384000000000000000e5 +1299 1 3 50 -0.32768000000000000000e5 +1299 1 11 42 0.65536000000000000000e5 +1299 1 12 43 0.13107200000000000000e6 +1299 1 17 48 -0.13107200000000000000e6 +1299 1 23 38 -0.16384000000000000000e5 +1299 1 26 41 0.32768000000000000000e5 +1299 1 28 43 -0.65536000000000000000e5 +1299 1 30 48 0.32768000000000000000e5 +1299 2 2 32 -0.16384000000000000000e5 +1299 2 4 34 0.32768000000000000000e5 +1299 2 8 22 0.65536000000000000000e5 +1299 2 12 26 -0.65536000000000000000e5 +1299 2 16 30 -0.32768000000000000000e5 +1299 3 2 31 -0.65536000000000000000e5 +1299 3 5 34 0.32768000000000000000e5 +1299 3 14 27 -0.13107200000000000000e6 +1299 4 4 16 -0.65536000000000000000e5 +1300 1 1 48 0.16384000000000000000e5 +1300 1 2 49 0.16384000000000000000e5 +1300 1 3 50 0.32768000000000000000e5 +1300 1 11 42 -0.65536000000000000000e5 +1300 1 12 43 -0.13107200000000000000e6 +1300 1 17 48 0.13107200000000000000e6 +1300 1 23 38 0.16384000000000000000e5 +1300 1 28 43 0.65536000000000000000e5 +1300 1 30 49 0.32768000000000000000e5 +1300 1 33 48 -0.65536000000000000000e5 +1300 2 2 32 0.16384000000000000000e5 +1300 2 4 34 -0.32768000000000000000e5 +1300 2 8 22 -0.65536000000000000000e5 +1300 2 12 26 0.65536000000000000000e5 +1300 2 16 30 0.32768000000000000000e5 +1300 2 28 30 0.32768000000000000000e5 +1300 3 2 31 0.65536000000000000000e5 +1300 3 5 34 -0.32768000000000000000e5 +1300 3 14 27 0.13107200000000000000e6 +1300 3 22 27 -0.32768000000000000000e5 +1300 4 4 16 0.65536000000000000000e5 +1301 1 30 50 0.32768000000000000000e5 +1301 1 33 48 -0.32768000000000000000e5 +1302 1 15 54 -0.32768000000000000000e5 +1302 1 30 51 0.32768000000000000000e5 +1303 1 17 48 0.32768000000000000000e5 +1303 1 30 52 0.32768000000000000000e5 +1303 1 34 49 0.32768000000000000000e5 +1303 1 35 50 -0.65536000000000000000e5 +1303 2 24 34 0.32768000000000000000e5 +1303 3 24 29 -0.32768000000000000000e5 +1304 1 1 48 -0.16384000000000000000e5 +1304 1 2 49 -0.16384000000000000000e5 +1304 1 3 50 -0.32768000000000000000e5 +1304 1 11 42 0.65536000000000000000e5 +1304 1 12 43 0.13107200000000000000e6 +1304 1 17 48 -0.13107200000000000000e6 +1304 1 23 38 -0.16384000000000000000e5 +1304 1 24 55 0.32768000000000000000e5 +1304 1 28 43 -0.65536000000000000000e5 +1304 1 30 53 0.32768000000000000000e5 +1304 2 2 32 -0.16384000000000000000e5 +1304 2 8 22 0.65536000000000000000e5 +1304 2 12 26 -0.65536000000000000000e5 +1304 2 16 30 -0.32768000000000000000e5 +1304 2 21 35 0.32768000000000000000e5 +1304 3 2 31 -0.65536000000000000000e5 +1304 3 14 27 -0.13107200000000000000e6 +1304 3 17 30 -0.32768000000000000000e5 +1304 3 18 31 0.65536000000000000000e5 +1304 3 20 33 -0.32768000000000000000e5 +1304 3 21 34 0.65536000000000000000e5 +1304 4 4 16 -0.65536000000000000000e5 +1305 1 1 48 0.16384000000000000000e5 +1305 1 2 49 0.16384000000000000000e5 +1305 1 3 50 0.32768000000000000000e5 +1305 1 11 42 -0.65536000000000000000e5 +1305 1 12 43 -0.13107200000000000000e6 +1305 1 17 48 0.13107200000000000000e6 +1305 1 23 38 0.16384000000000000000e5 +1305 1 28 43 0.65536000000000000000e5 +1305 1 30 54 0.32768000000000000000e5 +1305 1 43 50 -0.65536000000000000000e5 +1305 2 2 32 0.16384000000000000000e5 +1305 2 8 22 -0.65536000000000000000e5 +1305 2 12 26 0.65536000000000000000e5 +1305 2 16 30 0.32768000000000000000e5 +1305 2 21 35 -0.32768000000000000000e5 +1305 2 28 34 0.32768000000000000000e5 +1305 3 2 31 0.65536000000000000000e5 +1305 3 14 27 0.13107200000000000000e6 +1305 3 17 30 0.32768000000000000000e5 +1305 3 18 31 -0.65536000000000000000e5 +1305 3 20 33 0.32768000000000000000e5 +1305 3 21 34 -0.65536000000000000000e5 +1305 4 4 16 0.65536000000000000000e5 +1306 1 28 43 0.32768000000000000000e5 +1306 1 30 55 0.32768000000000000000e5 +1306 1 43 50 0.32768000000000000000e5 +1306 1 44 51 -0.65536000000000000000e5 +1306 2 31 33 0.32768000000000000000e5 +1306 3 18 31 -0.32768000000000000000e5 +1306 3 21 34 -0.32768000000000000000e5 +1307 1 30 56 0.32768000000000000000e5 +1307 1 40 55 -0.32768000000000000000e5 +1308 1 4 19 0.16384000000000000000e5 +1308 1 20 27 -0.32768000000000000000e5 +1308 1 28 35 0.16384000000000000000e5 +1308 1 31 31 0.32768000000000000000e5 +1308 2 10 24 0.16384000000000000000e5 +1308 3 8 13 -0.16384000000000000000e5 +1308 3 10 23 0.16384000000000000000e5 +1308 3 11 24 0.16384000000000000000e5 +1309 1 13 44 -0.32768000000000000000e5 +1309 1 31 32 0.32768000000000000000e5 +1310 1 28 35 -0.32768000000000000000e5 +1310 1 31 33 0.32768000000000000000e5 +1311 1 4 19 0.16384000000000000000e5 +1311 1 13 44 -0.16384000000000000000e5 +1311 1 20 27 -0.32768000000000000000e5 +1311 1 31 34 0.32768000000000000000e5 +1311 3 8 13 -0.16384000000000000000e5 +1311 3 10 23 0.16384000000000000000e5 +1311 3 11 24 0.16384000000000000000e5 +1311 4 10 14 0.16384000000000000000e5 +1312 1 19 42 -0.32768000000000000000e5 +1312 1 31 35 0.32768000000000000000e5 +1313 1 4 19 0.81920000000000000000e4 +1313 1 13 44 -0.81920000000000000000e4 +1313 1 19 42 -0.16384000000000000000e5 +1313 1 20 27 -0.16384000000000000000e5 +1313 1 29 36 -0.16384000000000000000e5 +1313 1 31 36 0.32768000000000000000e5 +1313 2 15 29 -0.16384000000000000000e5 +1313 3 8 13 -0.81920000000000000000e4 +1313 3 10 23 0.81920000000000000000e4 +1313 3 11 24 0.81920000000000000000e4 +1313 4 10 14 0.81920000000000000000e4 +1314 1 5 52 -0.32768000000000000000e5 +1314 1 11 42 0.32768000000000000000e5 +1314 1 12 43 0.65536000000000000000e5 +1314 1 16 47 -0.65536000000000000000e5 +1314 1 28 43 -0.32768000000000000000e5 +1314 1 31 37 0.32768000000000000000e5 +1314 2 10 32 0.32768000000000000000e5 +1314 2 12 26 -0.32768000000000000000e5 +1314 3 2 31 -0.32768000000000000000e5 +1314 3 14 27 -0.65536000000000000000e5 +1314 4 7 19 0.32768000000000000000e5 +1315 1 11 42 -0.32768000000000000000e5 +1315 1 12 43 -0.65536000000000000000e5 +1315 1 17 48 0.65536000000000000000e5 +1315 1 31 38 0.32768000000000000000e5 +1315 2 8 22 -0.32768000000000000000e5 +1315 2 12 26 0.32768000000000000000e5 +1315 3 2 31 0.32768000000000000000e5 +1315 3 14 27 0.65536000000000000000e5 +1315 4 4 16 0.32768000000000000000e5 +1316 1 5 52 0.32768000000000000000e5 +1316 1 17 48 -0.65536000000000000000e5 +1316 1 28 43 0.32768000000000000000e5 +1316 1 31 39 0.32768000000000000000e5 +1316 2 8 22 0.32768000000000000000e5 +1316 4 4 16 -0.32768000000000000000e5 +1316 4 7 19 -0.32768000000000000000e5 +1317 1 28 43 -0.32768000000000000000e5 +1317 1 31 40 0.32768000000000000000e5 +1318 1 16 47 -0.32768000000000000000e5 +1318 1 31 41 0.32768000000000000000e5 +1319 1 5 52 0.16384000000000000000e5 +1319 1 11 42 -0.16384000000000000000e5 +1319 1 12 43 -0.32768000000000000000e5 +1319 1 31 42 0.32768000000000000000e5 +1319 2 12 26 0.16384000000000000000e5 +1319 2 20 34 -0.16384000000000000000e5 +1319 3 2 31 0.16384000000000000000e5 +1319 3 14 27 0.32768000000000000000e5 +1319 4 7 19 -0.16384000000000000000e5 +1319 4 8 20 -0.16384000000000000000e5 +1320 1 17 48 -0.32768000000000000000e5 +1320 1 31 43 0.32768000000000000000e5 +1321 1 31 44 0.32768000000000000000e5 +1321 1 34 41 -0.32768000000000000000e5 +1322 1 13 52 -0.32768000000000000000e5 +1322 1 31 45 0.32768000000000000000e5 +1323 1 19 50 -0.32768000000000000000e5 +1323 1 31 46 0.32768000000000000000e5 +1324 1 31 47 0.32768000000000000000e5 +1324 1 37 44 -0.32768000000000000000e5 +1325 1 31 48 0.32768000000000000000e5 +1325 1 32 47 -0.32768000000000000000e5 +1326 1 28 43 -0.32768000000000000000e5 +1326 1 31 49 0.32768000000000000000e5 +1326 3 18 31 0.32768000000000000000e5 +1327 1 28 43 -0.16384000000000000000e5 +1327 1 31 50 0.32768000000000000000e5 +1327 1 32 47 -0.16384000000000000000e5 +1327 1 37 44 -0.16384000000000000000e5 +1327 2 20 34 -0.16384000000000000000e5 +1327 3 18 31 0.16384000000000000000e5 +1328 1 17 48 -0.32768000000000000000e5 +1328 1 31 51 0.32768000000000000000e5 +1328 3 24 29 0.32768000000000000000e5 +1329 1 16 55 -0.32768000000000000000e5 +1329 1 31 52 0.32768000000000000000e5 +1330 1 31 53 0.32768000000000000000e5 +1330 1 37 52 -0.32768000000000000000e5 +1331 1 28 43 -0.32768000000000000000e5 +1331 1 31 54 0.32768000000000000000e5 +1331 3 18 31 0.32768000000000000000e5 +1331 3 21 34 0.32768000000000000000e5 +1332 1 17 48 -0.32768000000000000000e5 +1332 1 31 55 0.32768000000000000000e5 +1332 1 32 47 0.16384000000000000000e5 +1332 1 33 48 0.16384000000000000000e5 +1332 1 37 52 -0.16384000000000000000e5 +1332 1 43 50 -0.16384000000000000000e5 +1332 3 21 34 0.16384000000000000000e5 +1332 3 24 29 0.32768000000000000000e5 +1332 4 16 20 0.16384000000000000000e5 +1333 1 28 43 -0.32768000000000000000e5 +1333 1 31 56 0.32768000000000000000e5 +1333 3 18 31 0.32768000000000000000e5 +1333 3 21 34 0.32768000000000000000e5 +1333 3 29 34 0.32768000000000000000e5 +1334 1 28 35 -0.16384000000000000000e5 +1334 1 32 32 0.32768000000000000000e5 +1335 1 14 45 -0.32768000000000000000e5 +1335 1 32 33 0.32768000000000000000e5 +1336 1 19 42 -0.32768000000000000000e5 +1336 1 32 34 0.32768000000000000000e5 +1337 1 29 36 -0.32768000000000000000e5 +1337 1 32 35 0.32768000000000000000e5 +1338 1 17 32 -0.16384000000000000000e5 +1338 1 18 33 -0.16384000000000000000e5 +1338 1 29 36 -0.16384000000000000000e5 +1338 1 32 36 0.32768000000000000000e5 +1338 2 14 24 -0.16384000000000000000e5 +1338 3 12 25 -0.16384000000000000000e5 +1338 3 15 24 0.32768000000000000000e5 +1339 1 11 42 -0.32768000000000000000e5 +1339 1 12 43 -0.65536000000000000000e5 +1339 1 17 48 0.65536000000000000000e5 +1339 1 32 37 0.32768000000000000000e5 +1339 2 8 22 -0.32768000000000000000e5 +1339 2 12 26 0.32768000000000000000e5 +1339 3 2 31 0.32768000000000000000e5 +1339 3 14 27 0.65536000000000000000e5 +1339 4 4 16 0.32768000000000000000e5 +1340 1 5 52 0.32768000000000000000e5 +1340 1 17 48 -0.65536000000000000000e5 +1340 1 28 43 0.32768000000000000000e5 +1340 1 32 38 0.32768000000000000000e5 +1340 2 8 22 0.32768000000000000000e5 +1340 4 4 16 -0.32768000000000000000e5 +1340 4 7 19 -0.32768000000000000000e5 +1341 1 28 43 -0.32768000000000000000e5 +1341 1 32 39 0.32768000000000000000e5 +1342 1 5 52 -0.32768000000000000000e5 +1342 1 32 40 0.32768000000000000000e5 +1343 1 5 52 0.16384000000000000000e5 +1343 1 11 42 -0.16384000000000000000e5 +1343 1 12 43 -0.32768000000000000000e5 +1343 1 32 41 0.32768000000000000000e5 +1343 2 12 26 0.16384000000000000000e5 +1343 2 20 34 -0.16384000000000000000e5 +1343 3 2 31 0.16384000000000000000e5 +1343 3 14 27 0.32768000000000000000e5 +1343 4 7 19 -0.16384000000000000000e5 +1343 4 8 20 -0.16384000000000000000e5 +1344 1 17 48 -0.32768000000000000000e5 +1344 1 32 42 0.32768000000000000000e5 +1345 1 14 45 -0.65536000000000000000e5 +1345 1 17 48 0.32768000000000000000e5 +1345 1 18 49 0.32768000000000000000e5 +1345 1 32 43 0.32768000000000000000e5 +1345 2 24 30 0.32768000000000000000e5 +1345 3 15 28 0.65536000000000000000e5 +1346 1 13 52 -0.32768000000000000000e5 +1346 1 32 44 0.32768000000000000000e5 +1347 1 14 45 -0.32768000000000000000e5 +1347 1 32 45 0.32768000000000000000e5 +1347 3 15 28 0.32768000000000000000e5 +1348 1 29 36 -0.32768000000000000000e5 +1348 1 32 46 0.32768000000000000000e5 +1348 3 24 25 0.32768000000000000000e5 +1349 1 28 43 -0.32768000000000000000e5 +1349 1 32 48 0.32768000000000000000e5 +1349 3 18 31 0.32768000000000000000e5 +1350 1 32 49 0.32768000000000000000e5 +1350 1 33 48 -0.32768000000000000000e5 +1351 1 17 48 -0.32768000000000000000e5 +1351 1 32 50 0.32768000000000000000e5 +1351 3 24 29 0.32768000000000000000e5 +1352 1 32 51 0.32768000000000000000e5 +1352 1 34 49 -0.32768000000000000000e5 +1353 1 32 52 0.32768000000000000000e5 +1353 1 35 50 -0.32768000000000000000e5 +1354 1 28 43 -0.32768000000000000000e5 +1354 1 32 53 0.32768000000000000000e5 +1354 3 18 31 0.32768000000000000000e5 +1354 3 21 34 0.32768000000000000000e5 +1355 1 32 54 0.32768000000000000000e5 +1355 1 43 50 -0.32768000000000000000e5 +1356 1 32 55 0.32768000000000000000e5 +1356 1 44 51 -0.32768000000000000000e5 +1357 1 32 56 0.32768000000000000000e5 +1357 1 50 51 -0.32768000000000000000e5 +1358 1 11 46 -0.16384000000000000000e5 +1358 1 33 33 0.32768000000000000000e5 +1359 1 29 36 -0.32768000000000000000e5 +1359 1 33 34 0.32768000000000000000e5 +1360 1 15 46 -0.32768000000000000000e5 +1360 1 33 35 0.32768000000000000000e5 +1361 1 5 52 0.32768000000000000000e5 +1361 1 17 48 -0.65536000000000000000e5 +1361 1 28 43 0.32768000000000000000e5 +1361 1 33 37 0.32768000000000000000e5 +1361 2 8 22 0.32768000000000000000e5 +1361 4 4 16 -0.32768000000000000000e5 +1361 4 7 19 -0.32768000000000000000e5 +1362 1 28 43 -0.32768000000000000000e5 +1362 1 33 38 0.32768000000000000000e5 +1363 1 5 52 -0.32768000000000000000e5 +1363 1 33 39 0.32768000000000000000e5 +1364 1 17 48 -0.32768000000000000000e5 +1364 1 33 41 0.32768000000000000000e5 +1365 1 14 45 -0.65536000000000000000e5 +1365 1 17 48 0.32768000000000000000e5 +1365 1 18 49 0.32768000000000000000e5 +1365 1 33 42 0.32768000000000000000e5 +1365 2 24 30 0.32768000000000000000e5 +1365 3 15 28 0.65536000000000000000e5 +1366 1 18 49 -0.32768000000000000000e5 +1366 1 33 43 0.32768000000000000000e5 +1367 1 14 45 -0.32768000000000000000e5 +1367 1 33 44 0.32768000000000000000e5 +1367 3 15 28 0.32768000000000000000e5 +1368 1 13 52 0.32768000000000000000e5 +1368 1 14 45 0.32768000000000000000e5 +1368 1 29 36 -0.65536000000000000000e5 +1368 1 33 45 0.32768000000000000000e5 +1368 2 15 33 0.32768000000000000000e5 +1368 3 15 28 -0.32768000000000000000e5 +1368 3 24 25 0.65536000000000000000e5 +1369 1 20 51 -0.32768000000000000000e5 +1369 1 33 46 0.32768000000000000000e5 +1370 1 28 43 -0.32768000000000000000e5 +1370 1 33 47 0.32768000000000000000e5 +1370 3 18 31 0.32768000000000000000e5 +1371 1 15 54 -0.32768000000000000000e5 +1371 1 33 49 0.32768000000000000000e5 +1372 1 33 50 0.32768000000000000000e5 +1372 1 34 49 -0.32768000000000000000e5 +1373 1 17 48 0.32768000000000000000e5 +1373 1 33 51 0.32768000000000000000e5 +1373 1 34 49 0.32768000000000000000e5 +1373 1 35 50 -0.65536000000000000000e5 +1373 2 24 34 0.32768000000000000000e5 +1373 3 24 29 -0.32768000000000000000e5 +1374 1 33 52 0.32768000000000000000e5 +1374 1 43 46 -0.32768000000000000000e5 +1375 1 33 53 0.32768000000000000000e5 +1375 1 43 50 -0.32768000000000000000e5 +1376 1 28 43 0.32768000000000000000e5 +1376 1 33 54 0.32768000000000000000e5 +1376 1 43 50 0.32768000000000000000e5 +1376 1 44 51 -0.65536000000000000000e5 +1376 2 31 33 0.32768000000000000000e5 +1376 3 18 31 -0.32768000000000000000e5 +1376 3 21 34 -0.32768000000000000000e5 +1377 1 33 55 0.32768000000000000000e5 +1377 1 46 49 -0.32768000000000000000e5 +1378 1 4 19 0.40960000000000000000e4 +1378 1 13 44 -0.40960000000000000000e4 +1378 1 19 42 -0.81920000000000000000e4 +1378 1 20 27 -0.81920000000000000000e4 +1378 1 29 36 -0.81920000000000000000e4 +1378 1 34 34 0.32768000000000000000e5 +1378 2 15 29 -0.81920000000000000000e4 +1378 3 8 13 -0.40960000000000000000e4 +1378 3 10 23 0.40960000000000000000e4 +1378 3 11 24 0.40960000000000000000e4 +1378 4 10 14 0.40960000000000000000e4 +1379 1 17 32 -0.16384000000000000000e5 +1379 1 18 33 -0.16384000000000000000e5 +1379 1 29 36 -0.16384000000000000000e5 +1379 1 34 35 0.32768000000000000000e5 +1379 2 14 24 -0.16384000000000000000e5 +1379 3 12 25 -0.16384000000000000000e5 +1379 3 15 24 0.32768000000000000000e5 +1380 1 21 44 -0.32768000000000000000e5 +1380 1 34 36 0.32768000000000000000e5 +1381 1 16 47 -0.32768000000000000000e5 +1381 1 34 37 0.32768000000000000000e5 +1382 1 5 52 0.16384000000000000000e5 +1382 1 11 42 -0.16384000000000000000e5 +1382 1 12 43 -0.32768000000000000000e5 +1382 1 34 38 0.32768000000000000000e5 +1382 2 12 26 0.16384000000000000000e5 +1382 2 20 34 -0.16384000000000000000e5 +1382 3 2 31 0.16384000000000000000e5 +1382 3 14 27 0.32768000000000000000e5 +1382 4 7 19 -0.16384000000000000000e5 +1382 4 8 20 -0.16384000000000000000e5 +1383 1 17 48 -0.32768000000000000000e5 +1383 1 34 39 0.32768000000000000000e5 +1384 1 14 45 -0.65536000000000000000e5 +1384 1 17 48 0.32768000000000000000e5 +1384 1 18 49 0.32768000000000000000e5 +1384 1 34 40 0.32768000000000000000e5 +1384 2 24 30 0.32768000000000000000e5 +1384 3 15 28 0.65536000000000000000e5 +1385 1 13 52 -0.32768000000000000000e5 +1385 1 34 42 0.32768000000000000000e5 +1386 1 14 45 -0.32768000000000000000e5 +1386 1 34 43 0.32768000000000000000e5 +1386 3 15 28 0.32768000000000000000e5 +1387 1 19 50 -0.32768000000000000000e5 +1387 1 34 44 0.32768000000000000000e5 +1388 1 29 36 -0.32768000000000000000e5 +1388 1 34 45 0.32768000000000000000e5 +1388 3 24 25 0.32768000000000000000e5 +1389 1 19 50 -0.16384000000000000000e5 +1389 1 20 51 -0.16384000000000000000e5 +1389 1 29 36 -0.16384000000000000000e5 +1389 1 34 46 0.32768000000000000000e5 +1389 2 25 31 -0.16384000000000000000e5 +1389 3 24 25 0.16384000000000000000e5 +1390 1 28 43 -0.16384000000000000000e5 +1390 1 32 47 -0.16384000000000000000e5 +1390 1 34 47 0.32768000000000000000e5 +1390 1 37 44 -0.16384000000000000000e5 +1390 2 20 34 -0.16384000000000000000e5 +1390 3 18 31 0.16384000000000000000e5 +1391 1 17 48 -0.32768000000000000000e5 +1391 1 34 48 0.32768000000000000000e5 +1391 3 24 29 0.32768000000000000000e5 +1392 1 16 55 -0.32768000000000000000e5 +1392 1 34 50 0.32768000000000000000e5 +1393 1 34 51 0.32768000000000000000e5 +1393 1 35 50 -0.32768000000000000000e5 +1394 1 16 55 -0.16384000000000000000e5 +1394 1 34 52 0.32768000000000000000e5 +1394 1 35 50 -0.16384000000000000000e5 +1394 1 43 46 -0.16384000000000000000e5 +1394 2 31 31 -0.32768000000000000000e5 +1395 1 17 48 -0.32768000000000000000e5 +1395 1 32 47 0.16384000000000000000e5 +1395 1 33 48 0.16384000000000000000e5 +1395 1 34 53 0.32768000000000000000e5 +1395 1 37 52 -0.16384000000000000000e5 +1395 1 43 50 -0.16384000000000000000e5 +1395 3 21 34 0.16384000000000000000e5 +1395 3 24 29 0.32768000000000000000e5 +1395 4 16 20 0.16384000000000000000e5 +1396 1 34 54 0.32768000000000000000e5 +1396 1 44 51 -0.32768000000000000000e5 +1397 1 34 55 0.32768000000000000000e5 +1397 1 35 50 -0.32768000000000000000e5 +1397 3 25 34 0.32768000000000000000e5 +1398 1 34 56 0.32768000000000000000e5 +1398 1 46 53 -0.32768000000000000000e5 +1399 1 33 36 -0.16384000000000000000e5 +1399 1 35 35 0.32768000000000000000e5 +1400 1 5 52 0.16384000000000000000e5 +1400 1 11 42 -0.16384000000000000000e5 +1400 1 12 43 -0.32768000000000000000e5 +1400 1 35 37 0.32768000000000000000e5 +1400 2 12 26 0.16384000000000000000e5 +1400 2 20 34 -0.16384000000000000000e5 +1400 3 2 31 0.16384000000000000000e5 +1400 3 14 27 0.32768000000000000000e5 +1400 4 7 19 -0.16384000000000000000e5 +1400 4 8 20 -0.16384000000000000000e5 +1401 1 17 48 -0.32768000000000000000e5 +1401 1 35 38 0.32768000000000000000e5 +1402 1 14 45 -0.65536000000000000000e5 +1402 1 17 48 0.32768000000000000000e5 +1402 1 18 49 0.32768000000000000000e5 +1402 1 35 39 0.32768000000000000000e5 +1402 2 24 30 0.32768000000000000000e5 +1402 3 15 28 0.65536000000000000000e5 +1403 1 18 49 -0.32768000000000000000e5 +1403 1 35 40 0.32768000000000000000e5 +1404 1 13 52 -0.32768000000000000000e5 +1404 1 35 41 0.32768000000000000000e5 +1405 1 14 45 -0.32768000000000000000e5 +1405 1 35 42 0.32768000000000000000e5 +1405 3 15 28 0.32768000000000000000e5 +1406 1 13 52 0.32768000000000000000e5 +1406 1 14 45 0.32768000000000000000e5 +1406 1 29 36 -0.65536000000000000000e5 +1406 1 35 43 0.32768000000000000000e5 +1406 2 15 33 0.32768000000000000000e5 +1406 3 15 28 -0.32768000000000000000e5 +1406 3 24 25 0.65536000000000000000e5 +1407 1 29 36 -0.32768000000000000000e5 +1407 1 35 44 0.32768000000000000000e5 +1407 3 24 25 0.32768000000000000000e5 +1408 1 20 51 -0.32768000000000000000e5 +1408 1 35 45 0.32768000000000000000e5 +1409 1 17 48 -0.32768000000000000000e5 +1409 1 35 47 0.32768000000000000000e5 +1409 3 24 29 0.32768000000000000000e5 +1410 1 34 49 -0.32768000000000000000e5 +1410 1 35 48 0.32768000000000000000e5 +1411 1 17 48 0.32768000000000000000e5 +1411 1 34 49 0.32768000000000000000e5 +1411 1 35 49 0.32768000000000000000e5 +1411 1 35 50 -0.65536000000000000000e5 +1411 2 24 34 0.32768000000000000000e5 +1411 3 24 29 -0.32768000000000000000e5 +1412 1 35 51 0.32768000000000000000e5 +1412 1 43 46 -0.32768000000000000000e5 +1413 1 35 52 0.32768000000000000000e5 +1413 1 36 51 -0.32768000000000000000e5 +1414 1 35 53 0.32768000000000000000e5 +1414 1 44 51 -0.32768000000000000000e5 +1415 1 35 54 0.32768000000000000000e5 +1415 1 46 49 -0.32768000000000000000e5 +1416 1 35 55 0.32768000000000000000e5 +1416 1 45 52 -0.32768000000000000000e5 +1417 1 35 56 0.32768000000000000000e5 +1417 1 51 52 -0.32768000000000000000e5 +1418 1 21 46 -0.16384000000000000000e5 +1418 1 36 36 0.32768000000000000000e5 +1419 1 34 41 -0.32768000000000000000e5 +1419 1 36 37 0.32768000000000000000e5 +1420 1 13 52 -0.32768000000000000000e5 +1420 1 36 38 0.32768000000000000000e5 +1421 1 14 45 -0.32768000000000000000e5 +1421 1 36 39 0.32768000000000000000e5 +1421 3 15 28 0.32768000000000000000e5 +1422 1 13 52 0.32768000000000000000e5 +1422 1 14 45 0.32768000000000000000e5 +1422 1 29 36 -0.65536000000000000000e5 +1422 1 36 40 0.32768000000000000000e5 +1422 2 15 33 0.32768000000000000000e5 +1422 3 15 28 -0.32768000000000000000e5 +1422 3 24 25 0.65536000000000000000e5 +1423 1 19 50 -0.32768000000000000000e5 +1423 1 36 41 0.32768000000000000000e5 +1424 1 29 36 -0.32768000000000000000e5 +1424 1 36 42 0.32768000000000000000e5 +1424 3 24 25 0.32768000000000000000e5 +1425 1 20 51 -0.32768000000000000000e5 +1425 1 36 43 0.32768000000000000000e5 +1426 1 19 50 -0.16384000000000000000e5 +1426 1 20 51 -0.16384000000000000000e5 +1426 1 29 36 -0.16384000000000000000e5 +1426 1 36 44 0.32768000000000000000e5 +1426 2 25 31 -0.16384000000000000000e5 +1426 3 24 25 0.16384000000000000000e5 +1427 1 35 46 -0.32768000000000000000e5 +1427 1 36 45 0.32768000000000000000e5 +1428 1 21 52 -0.32768000000000000000e5 +1428 1 36 46 0.32768000000000000000e5 +1429 1 16 55 -0.32768000000000000000e5 +1429 1 36 47 0.32768000000000000000e5 +1430 1 35 50 -0.32768000000000000000e5 +1430 1 36 48 0.32768000000000000000e5 +1431 1 36 49 0.32768000000000000000e5 +1431 1 43 46 -0.32768000000000000000e5 +1432 1 16 55 -0.16384000000000000000e5 +1432 1 35 50 -0.16384000000000000000e5 +1432 1 36 50 0.32768000000000000000e5 +1432 1 43 46 -0.16384000000000000000e5 +1432 2 31 31 -0.32768000000000000000e5 +1433 1 36 52 0.32768000000000000000e5 +1433 1 46 46 -0.65536000000000000000e5 +1434 1 35 50 -0.32768000000000000000e5 +1434 1 36 53 0.32768000000000000000e5 +1434 3 25 34 0.32768000000000000000e5 +1435 1 36 54 0.32768000000000000000e5 +1435 1 45 52 -0.32768000000000000000e5 +1436 1 21 56 -0.32768000000000000000e5 +1436 1 36 55 0.32768000000000000000e5 +1437 1 36 56 0.32768000000000000000e5 +1437 1 46 55 -0.32768000000000000000e5 +1438 1 1 48 -0.16384000000000000000e5 +1438 1 2 49 -0.16384000000000000000e5 +1438 1 7 54 0.32768000000000000000e5 +1438 1 23 38 -0.16384000000000000000e5 +1438 1 24 39 -0.16384000000000000000e5 +1438 1 37 37 0.32768000000000000000e5 +1438 2 1 35 0.16384000000000000000e5 +1438 2 2 32 -0.16384000000000000000e5 +1438 2 3 33 -0.16384000000000000000e5 +1438 2 18 32 0.16384000000000000000e5 +1438 2 26 32 -0.16384000000000000000e5 +1438 3 3 32 -0.16384000000000000000e5 +1438 3 4 33 -0.16384000000000000000e5 +1438 3 16 29 0.32768000000000000000e5 +1438 3 17 30 0.32768000000000000000e5 +1438 4 17 17 -0.32768000000000000000e5 +1439 1 2 49 0.32768000000000000000e5 +1439 1 7 54 -0.65536000000000000000e5 +1439 1 24 39 0.32768000000000000000e5 +1439 1 37 38 0.32768000000000000000e5 +1439 2 3 33 0.32768000000000000000e5 +1439 2 18 32 -0.32768000000000000000e5 +1439 2 26 32 0.32768000000000000000e5 +1439 3 4 33 0.32768000000000000000e5 +1439 3 17 30 -0.65536000000000000000e5 +1439 4 17 17 0.65536000000000000000e5 +1440 1 2 49 -0.32768000000000000000e5 +1440 1 37 39 0.32768000000000000000e5 +1440 3 3 32 0.32768000000000000000e5 +1441 1 24 39 -0.32768000000000000000e5 +1441 1 37 40 0.32768000000000000000e5 +1441 2 3 33 -0.32768000000000000000e5 +1441 2 18 32 0.32768000000000000000e5 +1441 3 3 32 -0.32768000000000000000e5 +1441 3 4 33 -0.32768000000000000000e5 +1441 3 17 30 0.65536000000000000000e5 +1442 1 1 48 -0.16384000000000000000e5 +1442 1 2 49 -0.16384000000000000000e5 +1442 1 23 38 -0.16384000000000000000e5 +1442 1 37 41 0.32768000000000000000e5 +1442 2 2 32 -0.16384000000000000000e5 +1442 3 16 29 0.32768000000000000000e5 +1443 1 7 54 -0.32768000000000000000e5 +1443 1 37 42 0.32768000000000000000e5 +1444 1 1 48 0.16384000000000000000e5 +1444 1 2 49 0.16384000000000000000e5 +1444 1 3 50 0.32768000000000000000e5 +1444 1 11 42 -0.65536000000000000000e5 +1444 1 12 43 -0.13107200000000000000e6 +1444 1 17 48 0.13107200000000000000e6 +1444 1 23 38 0.16384000000000000000e5 +1444 1 37 43 0.32768000000000000000e5 +1444 2 2 32 0.16384000000000000000e5 +1444 2 8 22 -0.65536000000000000000e5 +1444 2 12 26 0.65536000000000000000e5 +1444 2 16 30 0.32768000000000000000e5 +1444 3 2 31 0.65536000000000000000e5 +1444 3 14 27 0.13107200000000000000e6 +1444 3 17 30 0.32768000000000000000e5 +1444 4 4 16 0.65536000000000000000e5 +1445 1 32 47 -0.32768000000000000000e5 +1445 1 37 45 0.32768000000000000000e5 +1446 1 28 43 -0.16384000000000000000e5 +1446 1 32 47 -0.16384000000000000000e5 +1446 1 37 44 -0.16384000000000000000e5 +1446 1 37 46 0.32768000000000000000e5 +1446 2 20 34 -0.16384000000000000000e5 +1446 3 18 31 0.16384000000000000000e5 +1447 1 22 53 -0.32768000000000000000e5 +1447 1 37 47 0.32768000000000000000e5 +1448 1 7 54 -0.65536000000000000000e5 +1448 1 22 53 0.32768000000000000000e5 +1448 1 23 54 0.32768000000000000000e5 +1448 1 37 48 0.32768000000000000000e5 +1448 2 26 32 0.32768000000000000000e5 +1448 3 6 35 0.65536000000000000000e5 +1449 1 23 54 -0.32768000000000000000e5 +1449 1 37 49 0.32768000000000000000e5 +1450 1 7 54 -0.32768000000000000000e5 +1450 1 37 50 0.32768000000000000000e5 +1450 3 6 35 0.32768000000000000000e5 +1451 1 1 48 0.16384000000000000000e5 +1451 1 2 49 0.16384000000000000000e5 +1451 1 3 50 0.32768000000000000000e5 +1451 1 11 42 -0.65536000000000000000e5 +1451 1 12 43 -0.13107200000000000000e6 +1451 1 17 48 0.13107200000000000000e6 +1451 1 23 38 0.16384000000000000000e5 +1451 1 37 51 0.32768000000000000000e5 +1451 2 2 32 0.16384000000000000000e5 +1451 2 8 22 -0.65536000000000000000e5 +1451 2 12 26 0.65536000000000000000e5 +1451 2 16 30 0.32768000000000000000e5 +1451 3 2 31 0.65536000000000000000e5 +1451 3 14 27 0.13107200000000000000e6 +1451 3 17 30 0.32768000000000000000e5 +1451 3 20 33 0.32768000000000000000e5 +1451 4 4 16 0.65536000000000000000e5 +1452 1 37 53 0.32768000000000000000e5 +1452 1 38 53 0.32768000000000000000e5 +1452 1 47 50 -0.65536000000000000000e5 +1452 1 47 54 0.32768000000000000000e5 +1452 2 32 32 0.65536000000000000000e5 +1452 3 32 33 0.32768000000000000000e5 +1453 1 37 54 0.32768000000000000000e5 +1453 1 38 53 -0.32768000000000000000e5 +1454 1 37 55 0.32768000000000000000e5 +1454 1 47 50 -0.32768000000000000000e5 +1455 1 2 49 -0.16384000000000000000e5 +1455 1 38 38 0.32768000000000000000e5 +1455 3 3 32 0.16384000000000000000e5 +1456 1 24 39 -0.32768000000000000000e5 +1456 1 38 39 0.32768000000000000000e5 +1456 2 3 33 -0.32768000000000000000e5 +1456 2 18 32 0.32768000000000000000e5 +1456 3 3 32 -0.32768000000000000000e5 +1456 3 4 33 -0.32768000000000000000e5 +1456 3 17 30 0.65536000000000000000e5 +1457 1 1 48 0.32768000000000000000e5 +1457 1 2 49 0.65536000000000000000e5 +1457 1 3 50 0.65536000000000000000e5 +1457 1 11 42 -0.13107200000000000000e6 +1457 1 12 43 -0.26214400000000000000e6 +1457 1 17 48 0.26214400000000000000e6 +1457 1 23 38 0.32768000000000000000e5 +1457 1 24 39 0.32768000000000000000e5 +1457 1 38 40 0.32768000000000000000e5 +1457 2 2 32 0.32768000000000000000e5 +1457 2 3 33 0.32768000000000000000e5 +1457 2 8 22 -0.13107200000000000000e6 +1457 2 12 26 0.13107200000000000000e6 +1457 2 16 30 0.65536000000000000000e5 +1457 3 2 31 0.13107200000000000000e6 +1457 3 4 33 0.32768000000000000000e5 +1457 3 14 27 0.26214400000000000000e6 +1457 4 4 16 0.13107200000000000000e6 +1458 1 7 54 -0.32768000000000000000e5 +1458 1 38 41 0.32768000000000000000e5 +1459 1 1 48 0.16384000000000000000e5 +1459 1 2 49 0.16384000000000000000e5 +1459 1 3 50 0.32768000000000000000e5 +1459 1 11 42 -0.65536000000000000000e5 +1459 1 12 43 -0.13107200000000000000e6 +1459 1 17 48 0.13107200000000000000e6 +1459 1 23 38 0.16384000000000000000e5 +1459 1 38 42 0.32768000000000000000e5 +1459 2 2 32 0.16384000000000000000e5 +1459 2 8 22 -0.65536000000000000000e5 +1459 2 12 26 0.65536000000000000000e5 +1459 2 16 30 0.32768000000000000000e5 +1459 3 2 31 0.65536000000000000000e5 +1459 3 14 27 0.13107200000000000000e6 +1459 3 17 30 0.32768000000000000000e5 +1459 4 4 16 0.65536000000000000000e5 +1460 1 26 41 -0.32768000000000000000e5 +1460 1 38 43 0.32768000000000000000e5 +1460 3 22 27 0.32768000000000000000e5 +1461 1 32 47 -0.32768000000000000000e5 +1461 1 38 44 0.32768000000000000000e5 +1462 1 28 43 -0.32768000000000000000e5 +1462 1 38 45 0.32768000000000000000e5 +1462 3 18 31 0.32768000000000000000e5 +1463 1 17 48 -0.32768000000000000000e5 +1463 1 38 46 0.32768000000000000000e5 +1463 3 24 29 0.32768000000000000000e5 +1464 1 7 54 -0.65536000000000000000e5 +1464 1 22 53 0.32768000000000000000e5 +1464 1 23 54 0.32768000000000000000e5 +1464 1 38 47 0.32768000000000000000e5 +1464 2 26 32 0.32768000000000000000e5 +1464 3 6 35 0.65536000000000000000e5 +1465 1 23 54 -0.32768000000000000000e5 +1465 1 38 48 0.32768000000000000000e5 +1466 1 1 48 0.32768000000000000000e5 +1466 1 2 49 0.65536000000000000000e5 +1466 1 3 50 0.65536000000000000000e5 +1466 1 11 42 -0.13107200000000000000e6 +1466 1 12 43 -0.26214400000000000000e6 +1466 1 17 48 0.26214400000000000000e6 +1466 1 23 38 0.32768000000000000000e5 +1466 1 24 39 0.32768000000000000000e5 +1466 1 38 49 0.32768000000000000000e5 +1466 2 2 32 0.32768000000000000000e5 +1466 2 3 33 0.32768000000000000000e5 +1466 2 8 22 -0.13107200000000000000e6 +1466 2 12 26 0.13107200000000000000e6 +1466 2 16 30 0.65536000000000000000e5 +1466 3 2 31 0.13107200000000000000e6 +1466 3 4 33 0.32768000000000000000e5 +1466 3 14 27 0.26214400000000000000e6 +1466 3 19 32 0.32768000000000000000e5 +1466 4 4 16 0.13107200000000000000e6 +1467 1 1 48 0.16384000000000000000e5 +1467 1 2 49 0.16384000000000000000e5 +1467 1 3 50 0.32768000000000000000e5 +1467 1 11 42 -0.65536000000000000000e5 +1467 1 12 43 -0.13107200000000000000e6 +1467 1 17 48 0.13107200000000000000e6 +1467 1 23 38 0.16384000000000000000e5 +1467 1 38 50 0.32768000000000000000e5 +1467 2 2 32 0.16384000000000000000e5 +1467 2 8 22 -0.65536000000000000000e5 +1467 2 12 26 0.65536000000000000000e5 +1467 2 16 30 0.32768000000000000000e5 +1467 3 2 31 0.65536000000000000000e5 +1467 3 14 27 0.13107200000000000000e6 +1467 3 17 30 0.32768000000000000000e5 +1467 3 20 33 0.32768000000000000000e5 +1467 4 4 16 0.65536000000000000000e5 +1468 1 24 55 -0.32768000000000000000e5 +1468 1 38 51 0.32768000000000000000e5 +1469 1 28 43 -0.32768000000000000000e5 +1469 1 38 52 0.32768000000000000000e5 +1469 3 18 31 0.32768000000000000000e5 +1469 3 21 34 0.32768000000000000000e5 +1470 1 38 54 0.32768000000000000000e5 +1470 1 47 54 -0.32768000000000000000e5 +1470 3 32 33 -0.32768000000000000000e5 +1471 1 1 48 0.16384000000000000000e5 +1471 1 2 49 0.16384000000000000000e5 +1471 1 3 50 0.32768000000000000000e5 +1471 1 11 42 -0.65536000000000000000e5 +1471 1 12 43 -0.13107200000000000000e6 +1471 1 17 48 0.13107200000000000000e6 +1471 1 23 38 0.16384000000000000000e5 +1471 1 24 55 -0.32768000000000000000e5 +1471 1 38 55 0.32768000000000000000e5 +1471 1 47 50 0.32768000000000000000e5 +1471 2 2 32 0.16384000000000000000e5 +1471 2 8 22 -0.65536000000000000000e5 +1471 2 12 26 0.65536000000000000000e5 +1471 2 16 30 0.32768000000000000000e5 +1471 2 21 35 -0.32768000000000000000e5 +1471 2 29 35 0.32768000000000000000e5 +1471 3 2 31 0.65536000000000000000e5 +1471 3 14 27 0.13107200000000000000e6 +1471 3 17 30 0.32768000000000000000e5 +1471 3 20 33 0.32768000000000000000e5 +1471 3 22 35 -0.32768000000000000000e5 +1471 3 29 34 0.65536000000000000000e5 +1471 4 4 16 0.65536000000000000000e5 +1472 1 38 56 0.32768000000000000000e5 +1472 1 47 54 -0.32768000000000000000e5 +1473 1 1 48 0.16384000000000000000e5 +1473 1 2 49 0.32768000000000000000e5 +1473 1 3 50 0.32768000000000000000e5 +1473 1 11 42 -0.65536000000000000000e5 +1473 1 12 43 -0.13107200000000000000e6 +1473 1 17 48 0.13107200000000000000e6 +1473 1 23 38 0.16384000000000000000e5 +1473 1 24 39 0.16384000000000000000e5 +1473 1 39 39 0.32768000000000000000e5 +1473 2 2 32 0.16384000000000000000e5 +1473 2 3 33 0.16384000000000000000e5 +1473 2 8 22 -0.65536000000000000000e5 +1473 2 12 26 0.65536000000000000000e5 +1473 2 16 30 0.32768000000000000000e5 +1473 3 2 31 0.65536000000000000000e5 +1473 3 4 33 0.16384000000000000000e5 +1473 3 14 27 0.13107200000000000000e6 +1473 4 4 16 0.65536000000000000000e5 +1474 1 6 53 -0.32768000000000000000e5 +1474 1 39 40 0.32768000000000000000e5 +1475 1 1 48 0.16384000000000000000e5 +1475 1 2 49 0.16384000000000000000e5 +1475 1 3 50 0.32768000000000000000e5 +1475 1 11 42 -0.65536000000000000000e5 +1475 1 12 43 -0.13107200000000000000e6 +1475 1 17 48 0.13107200000000000000e6 +1475 1 23 38 0.16384000000000000000e5 +1475 1 39 41 0.32768000000000000000e5 +1475 2 2 32 0.16384000000000000000e5 +1475 2 8 22 -0.65536000000000000000e5 +1475 2 12 26 0.65536000000000000000e5 +1475 2 16 30 0.32768000000000000000e5 +1475 3 2 31 0.65536000000000000000e5 +1475 3 14 27 0.13107200000000000000e6 +1475 3 17 30 0.32768000000000000000e5 +1475 4 4 16 0.65536000000000000000e5 +1476 1 26 41 -0.32768000000000000000e5 +1476 1 39 42 0.32768000000000000000e5 +1476 3 22 27 0.32768000000000000000e5 +1477 1 1 48 -0.16384000000000000000e5 +1477 1 2 49 -0.16384000000000000000e5 +1477 1 3 50 -0.32768000000000000000e5 +1477 1 11 42 0.65536000000000000000e5 +1477 1 12 43 0.13107200000000000000e6 +1477 1 17 48 -0.13107200000000000000e6 +1477 1 23 38 -0.16384000000000000000e5 +1477 1 26 41 0.32768000000000000000e5 +1477 1 28 43 -0.65536000000000000000e5 +1477 1 39 43 0.32768000000000000000e5 +1477 2 2 32 -0.16384000000000000000e5 +1477 2 4 34 0.32768000000000000000e5 +1477 2 8 22 0.65536000000000000000e5 +1477 2 12 26 -0.65536000000000000000e5 +1477 2 16 30 -0.32768000000000000000e5 +1477 3 2 31 -0.65536000000000000000e5 +1477 3 5 34 0.32768000000000000000e5 +1477 3 14 27 -0.13107200000000000000e6 +1477 4 4 16 -0.65536000000000000000e5 +1478 1 28 43 -0.32768000000000000000e5 +1478 1 39 44 0.32768000000000000000e5 +1478 3 18 31 0.32768000000000000000e5 +1479 1 33 48 -0.32768000000000000000e5 +1479 1 39 45 0.32768000000000000000e5 +1480 1 34 49 -0.32768000000000000000e5 +1480 1 39 46 0.32768000000000000000e5 +1481 1 23 54 -0.32768000000000000000e5 +1481 1 39 47 0.32768000000000000000e5 +1482 1 1 48 0.32768000000000000000e5 +1482 1 2 49 0.65536000000000000000e5 +1482 1 3 50 0.65536000000000000000e5 +1482 1 11 42 -0.13107200000000000000e6 +1482 1 12 43 -0.26214400000000000000e6 +1482 1 17 48 0.26214400000000000000e6 +1482 1 23 38 0.32768000000000000000e5 +1482 1 24 39 0.32768000000000000000e5 +1482 1 39 48 0.32768000000000000000e5 +1482 2 2 32 0.32768000000000000000e5 +1482 2 3 33 0.32768000000000000000e5 +1482 2 8 22 -0.13107200000000000000e6 +1482 2 12 26 0.13107200000000000000e6 +1482 2 16 30 0.65536000000000000000e5 +1482 3 2 31 0.13107200000000000000e6 +1482 3 4 33 0.32768000000000000000e5 +1482 3 14 27 0.26214400000000000000e6 +1482 3 19 32 0.32768000000000000000e5 +1482 4 4 16 0.13107200000000000000e6 +1483 1 25 56 -0.32768000000000000000e5 +1483 1 39 49 0.32768000000000000000e5 +1483 3 28 33 -0.32768000000000000000e5 +1484 1 24 55 -0.32768000000000000000e5 +1484 1 39 50 0.32768000000000000000e5 +1485 1 1 48 -0.16384000000000000000e5 +1485 1 2 49 -0.16384000000000000000e5 +1485 1 3 50 -0.32768000000000000000e5 +1485 1 11 42 0.65536000000000000000e5 +1485 1 12 43 0.13107200000000000000e6 +1485 1 17 48 -0.13107200000000000000e6 +1485 1 23 38 -0.16384000000000000000e5 +1485 1 24 55 0.32768000000000000000e5 +1485 1 28 43 -0.65536000000000000000e5 +1485 1 39 51 0.32768000000000000000e5 +1485 2 2 32 -0.16384000000000000000e5 +1485 2 8 22 0.65536000000000000000e5 +1485 2 12 26 -0.65536000000000000000e5 +1485 2 16 30 -0.32768000000000000000e5 +1485 2 21 35 0.32768000000000000000e5 +1485 3 2 31 -0.65536000000000000000e5 +1485 3 14 27 -0.13107200000000000000e6 +1485 3 17 30 -0.32768000000000000000e5 +1485 3 18 31 0.65536000000000000000e5 +1485 3 20 33 -0.32768000000000000000e5 +1485 3 21 34 0.65536000000000000000e5 +1485 4 4 16 -0.65536000000000000000e5 +1486 1 39 52 0.32768000000000000000e5 +1486 1 43 50 -0.32768000000000000000e5 +1487 1 39 53 0.32768000000000000000e5 +1487 1 47 54 -0.32768000000000000000e5 +1487 3 32 33 -0.32768000000000000000e5 +1488 1 25 56 -0.32768000000000000000e5 +1488 1 39 54 0.32768000000000000000e5 +1489 1 1 48 -0.16384000000000000000e5 +1489 1 2 49 -0.16384000000000000000e5 +1489 1 3 50 -0.32768000000000000000e5 +1489 1 11 42 0.65536000000000000000e5 +1489 1 12 43 0.13107200000000000000e6 +1489 1 17 48 -0.13107200000000000000e6 +1489 1 23 38 -0.16384000000000000000e5 +1489 1 24 55 0.32768000000000000000e5 +1489 1 28 43 -0.65536000000000000000e5 +1489 1 39 55 0.32768000000000000000e5 +1489 2 2 32 -0.16384000000000000000e5 +1489 2 8 22 0.65536000000000000000e5 +1489 2 12 26 -0.65536000000000000000e5 +1489 2 16 30 -0.32768000000000000000e5 +1489 2 21 35 0.32768000000000000000e5 +1489 3 2 31 -0.65536000000000000000e5 +1489 3 14 27 -0.13107200000000000000e6 +1489 3 17 30 -0.32768000000000000000e5 +1489 3 18 31 0.65536000000000000000e5 +1489 3 20 33 -0.32768000000000000000e5 +1489 3 21 34 0.65536000000000000000e5 +1489 3 22 35 0.32768000000000000000e5 +1489 4 4 16 -0.65536000000000000000e5 +1490 1 1 48 -0.32768000000000000000e5 +1490 1 2 49 -0.32768000000000000000e5 +1490 1 3 50 -0.65536000000000000000e5 +1490 1 11 42 0.13107200000000000000e6 +1490 1 12 43 0.26214400000000000000e6 +1490 1 17 48 -0.26214400000000000000e6 +1490 1 23 38 -0.32768000000000000000e5 +1490 1 24 55 0.65536000000000000000e5 +1490 1 25 56 -0.32768000000000000000e5 +1490 1 37 56 0.32768000000000000000e5 +1490 1 38 53 -0.32768000000000000000e5 +1490 1 39 56 0.32768000000000000000e5 +1490 1 41 56 -0.65536000000000000000e5 +1490 1 47 50 -0.65536000000000000000e5 +1490 2 2 32 -0.32768000000000000000e5 +1490 2 8 22 0.13107200000000000000e6 +1490 2 12 26 -0.13107200000000000000e6 +1490 2 16 30 -0.65536000000000000000e5 +1490 2 21 35 0.65536000000000000000e5 +1490 2 29 35 -0.65536000000000000000e5 +1490 3 2 31 -0.13107200000000000000e6 +1490 3 14 27 -0.26214400000000000000e6 +1490 3 17 30 -0.65536000000000000000e5 +1490 3 20 33 -0.65536000000000000000e5 +1490 3 22 35 0.65536000000000000000e5 +1490 3 29 34 -0.13107200000000000000e6 +1490 3 32 33 -0.32768000000000000000e5 +1490 4 4 16 -0.13107200000000000000e6 +1490 4 20 20 -0.65536000000000000000e5 +1491 1 1 48 -0.32768000000000000000e5 +1491 1 2 49 -0.49152000000000000000e5 +1491 1 3 50 -0.65536000000000000000e5 +1491 1 6 53 0.16384000000000000000e5 +1491 1 11 42 0.13107200000000000000e6 +1491 1 12 43 0.26214400000000000000e6 +1491 1 17 48 -0.26214400000000000000e6 +1491 1 23 38 -0.32768000000000000000e5 +1491 1 24 39 -0.16384000000000000000e5 +1491 1 26 41 0.32768000000000000000e5 +1491 1 28 43 -0.65536000000000000000e5 +1491 1 40 40 0.32768000000000000000e5 +1491 2 2 32 -0.32768000000000000000e5 +1491 2 3 33 -0.16384000000000000000e5 +1491 2 4 34 0.32768000000000000000e5 +1491 2 5 35 0.16384000000000000000e5 +1491 2 8 22 0.13107200000000000000e6 +1491 2 12 26 -0.13107200000000000000e6 +1491 2 16 30 -0.65536000000000000000e5 +1491 3 2 31 -0.13107200000000000000e6 +1491 3 4 33 -0.16384000000000000000e5 +1491 3 5 34 0.32768000000000000000e5 +1491 3 14 27 -0.26214400000000000000e6 +1491 4 4 16 -0.13107200000000000000e6 +1492 1 26 41 -0.32768000000000000000e5 +1492 1 40 41 0.32768000000000000000e5 +1492 3 22 27 0.32768000000000000000e5 +1493 1 1 48 -0.16384000000000000000e5 +1493 1 2 49 -0.16384000000000000000e5 +1493 1 3 50 -0.32768000000000000000e5 +1493 1 11 42 0.65536000000000000000e5 +1493 1 12 43 0.13107200000000000000e6 +1493 1 17 48 -0.13107200000000000000e6 +1493 1 23 38 -0.16384000000000000000e5 +1493 1 26 41 0.32768000000000000000e5 +1493 1 28 43 -0.65536000000000000000e5 +1493 1 40 42 0.32768000000000000000e5 +1493 2 2 32 -0.16384000000000000000e5 +1493 2 4 34 0.32768000000000000000e5 +1493 2 8 22 0.65536000000000000000e5 +1493 2 12 26 -0.65536000000000000000e5 +1493 2 16 30 -0.32768000000000000000e5 +1493 3 2 31 -0.65536000000000000000e5 +1493 3 5 34 0.32768000000000000000e5 +1493 3 14 27 -0.13107200000000000000e6 +1493 4 4 16 -0.65536000000000000000e5 +1494 1 1 48 0.16384000000000000000e5 +1494 1 2 49 0.16384000000000000000e5 +1494 1 3 50 0.32768000000000000000e5 +1494 1 11 42 -0.65536000000000000000e5 +1494 1 12 43 -0.13107200000000000000e6 +1494 1 17 48 0.13107200000000000000e6 +1494 1 23 38 0.16384000000000000000e5 +1494 1 28 43 0.65536000000000000000e5 +1494 1 33 48 -0.65536000000000000000e5 +1494 1 40 43 0.32768000000000000000e5 +1494 2 2 32 0.16384000000000000000e5 +1494 2 4 34 -0.32768000000000000000e5 +1494 2 8 22 -0.65536000000000000000e5 +1494 2 12 26 0.65536000000000000000e5 +1494 2 16 30 0.32768000000000000000e5 +1494 2 28 30 0.32768000000000000000e5 +1494 3 2 31 0.65536000000000000000e5 +1494 3 5 34 -0.32768000000000000000e5 +1494 3 14 27 0.13107200000000000000e6 +1494 3 22 27 -0.32768000000000000000e5 +1494 4 4 16 0.65536000000000000000e5 +1495 1 33 48 -0.32768000000000000000e5 +1495 1 40 44 0.32768000000000000000e5 +1496 1 15 54 -0.32768000000000000000e5 +1496 1 40 45 0.32768000000000000000e5 +1497 1 17 48 0.32768000000000000000e5 +1497 1 34 49 0.32768000000000000000e5 +1497 1 35 50 -0.65536000000000000000e5 +1497 1 40 46 0.32768000000000000000e5 +1497 2 24 34 0.32768000000000000000e5 +1497 3 24 29 -0.32768000000000000000e5 +1498 1 1 48 0.32768000000000000000e5 +1498 1 2 49 0.65536000000000000000e5 +1498 1 3 50 0.65536000000000000000e5 +1498 1 11 42 -0.13107200000000000000e6 +1498 1 12 43 -0.26214400000000000000e6 +1498 1 17 48 0.26214400000000000000e6 +1498 1 23 38 0.32768000000000000000e5 +1498 1 24 39 0.32768000000000000000e5 +1498 1 40 47 0.32768000000000000000e5 +1498 2 2 32 0.32768000000000000000e5 +1498 2 3 33 0.32768000000000000000e5 +1498 2 8 22 -0.13107200000000000000e6 +1498 2 12 26 0.13107200000000000000e6 +1498 2 16 30 0.65536000000000000000e5 +1498 3 2 31 0.13107200000000000000e6 +1498 3 4 33 0.32768000000000000000e5 +1498 3 14 27 0.26214400000000000000e6 +1498 3 19 32 0.32768000000000000000e5 +1498 4 4 16 0.13107200000000000000e6 +1499 1 25 56 -0.32768000000000000000e5 +1499 1 40 48 0.32768000000000000000e5 +1499 3 28 33 -0.32768000000000000000e5 +1500 1 1 48 -0.65536000000000000000e5 +1500 1 2 49 -0.98304000000000000000e5 +1500 1 3 50 -0.13107200000000000000e6 +1500 1 11 42 0.26214400000000000000e6 +1500 1 12 43 0.52428800000000000000e6 +1500 1 17 48 -0.52428800000000000000e6 +1500 1 23 38 -0.65536000000000000000e5 +1500 1 24 39 -0.32768000000000000000e5 +1500 1 24 55 0.65536000000000000000e5 +1500 1 25 56 0.32768000000000000000e5 +1500 1 28 43 -0.13107200000000000000e6 +1500 1 40 49 0.32768000000000000000e5 +1500 2 2 32 -0.65536000000000000000e5 +1500 2 3 33 -0.32768000000000000000e5 +1500 2 8 22 0.26214400000000000000e6 +1500 2 12 26 -0.26214400000000000000e6 +1500 2 16 30 -0.13107200000000000000e6 +1500 2 19 35 0.32768000000000000000e5 +1500 2 21 35 0.65536000000000000000e5 +1500 3 2 31 -0.26214400000000000000e6 +1500 3 4 33 -0.32768000000000000000e5 +1500 3 14 27 -0.52428800000000000000e6 +1500 3 17 30 -0.65536000000000000000e5 +1500 3 18 31 0.13107200000000000000e6 +1500 3 19 32 -0.32768000000000000000e5 +1500 3 20 33 -0.65536000000000000000e5 +1500 3 21 34 0.13107200000000000000e6 +1500 3 28 33 0.32768000000000000000e5 +1500 4 4 16 -0.26214400000000000000e6 +1501 1 1 48 -0.16384000000000000000e5 +1501 1 2 49 -0.16384000000000000000e5 +1501 1 3 50 -0.32768000000000000000e5 +1501 1 11 42 0.65536000000000000000e5 +1501 1 12 43 0.13107200000000000000e6 +1501 1 17 48 -0.13107200000000000000e6 +1501 1 23 38 -0.16384000000000000000e5 +1501 1 24 55 0.32768000000000000000e5 +1501 1 28 43 -0.65536000000000000000e5 +1501 1 40 50 0.32768000000000000000e5 +1501 2 2 32 -0.16384000000000000000e5 +1501 2 8 22 0.65536000000000000000e5 +1501 2 12 26 -0.65536000000000000000e5 +1501 2 16 30 -0.32768000000000000000e5 +1501 2 21 35 0.32768000000000000000e5 +1501 3 2 31 -0.65536000000000000000e5 +1501 3 14 27 -0.13107200000000000000e6 +1501 3 17 30 -0.32768000000000000000e5 +1501 3 18 31 0.65536000000000000000e5 +1501 3 20 33 -0.32768000000000000000e5 +1501 3 21 34 0.65536000000000000000e5 +1501 4 4 16 -0.65536000000000000000e5 +1502 1 1 48 0.16384000000000000000e5 +1502 1 2 49 0.16384000000000000000e5 +1502 1 3 50 0.32768000000000000000e5 +1502 1 11 42 -0.65536000000000000000e5 +1502 1 12 43 -0.13107200000000000000e6 +1502 1 17 48 0.13107200000000000000e6 +1502 1 23 38 0.16384000000000000000e5 +1502 1 28 43 0.65536000000000000000e5 +1502 1 40 51 0.32768000000000000000e5 +1502 1 43 50 -0.65536000000000000000e5 +1502 2 2 32 0.16384000000000000000e5 +1502 2 8 22 -0.65536000000000000000e5 +1502 2 12 26 0.65536000000000000000e5 +1502 2 16 30 0.32768000000000000000e5 +1502 2 21 35 -0.32768000000000000000e5 +1502 2 28 34 0.32768000000000000000e5 +1502 3 2 31 0.65536000000000000000e5 +1502 3 14 27 0.13107200000000000000e6 +1502 3 17 30 0.32768000000000000000e5 +1502 3 18 31 -0.65536000000000000000e5 +1502 3 20 33 0.32768000000000000000e5 +1502 3 21 34 -0.65536000000000000000e5 +1502 4 4 16 0.65536000000000000000e5 +1503 1 28 43 0.32768000000000000000e5 +1503 1 40 52 0.32768000000000000000e5 +1503 1 43 50 0.32768000000000000000e5 +1503 1 44 51 -0.65536000000000000000e5 +1503 2 31 33 0.32768000000000000000e5 +1503 3 18 31 -0.32768000000000000000e5 +1503 3 21 34 -0.32768000000000000000e5 +1504 1 25 56 -0.32768000000000000000e5 +1504 1 40 53 0.32768000000000000000e5 +1505 1 1 48 -0.32768000000000000000e5 +1505 1 2 49 -0.32768000000000000000e5 +1505 1 3 50 -0.65536000000000000000e5 +1505 1 11 42 0.13107200000000000000e6 +1505 1 12 43 0.26214400000000000000e6 +1505 1 17 48 -0.26214400000000000000e6 +1505 1 23 38 -0.32768000000000000000e5 +1505 1 24 55 0.65536000000000000000e5 +1505 1 25 56 0.32768000000000000000e5 +1505 1 28 43 -0.13107200000000000000e6 +1505 1 40 54 0.32768000000000000000e5 +1505 1 47 54 0.32768000000000000000e5 +1505 2 2 32 -0.32768000000000000000e5 +1505 2 8 22 0.13107200000000000000e6 +1505 2 12 26 -0.13107200000000000000e6 +1505 2 16 30 -0.65536000000000000000e5 +1505 2 21 35 0.65536000000000000000e5 +1505 2 33 33 0.65536000000000000000e5 +1505 3 2 31 -0.13107200000000000000e6 +1505 3 14 27 -0.26214400000000000000e6 +1505 3 17 30 -0.65536000000000000000e5 +1505 3 18 31 0.13107200000000000000e6 +1505 3 20 33 -0.65536000000000000000e5 +1505 3 21 34 0.13107200000000000000e6 +1505 3 22 35 0.65536000000000000000e5 +1505 3 32 33 0.32768000000000000000e5 +1505 4 4 16 -0.13107200000000000000e6 +1506 1 25 56 0.32768000000000000000e5 +1506 1 28 43 -0.13107200000000000000e6 +1506 1 37 56 -0.32768000000000000000e5 +1506 1 38 53 0.32768000000000000000e5 +1506 1 40 56 0.32768000000000000000e5 +1506 1 41 56 0.65536000000000000000e5 +1506 1 47 50 0.65536000000000000000e5 +1506 1 47 54 0.32768000000000000000e5 +1506 2 29 35 0.65536000000000000000e5 +1506 2 33 35 0.32768000000000000000e5 +1506 3 18 31 0.13107200000000000000e6 +1506 3 21 34 0.13107200000000000000e6 +1506 3 29 34 0.13107200000000000000e6 +1506 3 30 35 0.65536000000000000000e5 +1506 3 32 33 0.32768000000000000000e5 +1506 4 20 20 0.65536000000000000000e5 +1507 1 37 44 -0.16384000000000000000e5 +1507 1 41 41 0.32768000000000000000e5 +1508 1 32 47 -0.32768000000000000000e5 +1508 1 41 42 0.32768000000000000000e5 +1509 1 28 43 -0.32768000000000000000e5 +1509 1 41 43 0.32768000000000000000e5 +1509 3 18 31 0.32768000000000000000e5 +1510 1 28 43 -0.16384000000000000000e5 +1510 1 32 47 -0.16384000000000000000e5 +1510 1 37 44 -0.16384000000000000000e5 +1510 1 41 44 0.32768000000000000000e5 +1510 2 20 34 -0.16384000000000000000e5 +1510 3 18 31 0.16384000000000000000e5 +1511 1 17 48 -0.32768000000000000000e5 +1511 1 41 45 0.32768000000000000000e5 +1511 3 24 29 0.32768000000000000000e5 +1512 1 16 55 -0.32768000000000000000e5 +1512 1 41 46 0.32768000000000000000e5 +1513 1 7 54 -0.32768000000000000000e5 +1513 1 41 47 0.32768000000000000000e5 +1513 3 6 35 0.32768000000000000000e5 +1514 1 1 48 0.16384000000000000000e5 +1514 1 2 49 0.16384000000000000000e5 +1514 1 3 50 0.32768000000000000000e5 +1514 1 11 42 -0.65536000000000000000e5 +1514 1 12 43 -0.13107200000000000000e6 +1514 1 17 48 0.13107200000000000000e6 +1514 1 23 38 0.16384000000000000000e5 +1514 1 41 48 0.32768000000000000000e5 +1514 2 2 32 0.16384000000000000000e5 +1514 2 8 22 -0.65536000000000000000e5 +1514 2 12 26 0.65536000000000000000e5 +1514 2 16 30 0.32768000000000000000e5 +1514 3 2 31 0.65536000000000000000e5 +1514 3 14 27 0.13107200000000000000e6 +1514 3 17 30 0.32768000000000000000e5 +1514 3 20 33 0.32768000000000000000e5 +1514 4 4 16 0.65536000000000000000e5 +1515 1 24 55 -0.32768000000000000000e5 +1515 1 41 49 0.32768000000000000000e5 +1516 1 37 52 -0.32768000000000000000e5 +1516 1 41 50 0.32768000000000000000e5 +1517 1 28 43 -0.32768000000000000000e5 +1517 1 41 51 0.32768000000000000000e5 +1517 3 18 31 0.32768000000000000000e5 +1517 3 21 34 0.32768000000000000000e5 +1518 1 17 48 -0.32768000000000000000e5 +1518 1 32 47 0.16384000000000000000e5 +1518 1 33 48 0.16384000000000000000e5 +1518 1 37 52 -0.16384000000000000000e5 +1518 1 41 52 0.32768000000000000000e5 +1518 1 43 50 -0.16384000000000000000e5 +1518 3 21 34 0.16384000000000000000e5 +1518 3 24 29 0.32768000000000000000e5 +1518 4 16 20 0.16384000000000000000e5 +1519 1 41 53 0.32768000000000000000e5 +1519 1 47 50 -0.32768000000000000000e5 +1520 1 1 48 0.16384000000000000000e5 +1520 1 2 49 0.16384000000000000000e5 +1520 1 3 50 0.32768000000000000000e5 +1520 1 11 42 -0.65536000000000000000e5 +1520 1 12 43 -0.13107200000000000000e6 +1520 1 17 48 0.13107200000000000000e6 +1520 1 23 38 0.16384000000000000000e5 +1520 1 24 55 -0.32768000000000000000e5 +1520 1 41 54 0.32768000000000000000e5 +1520 1 47 50 0.32768000000000000000e5 +1520 2 2 32 0.16384000000000000000e5 +1520 2 8 22 -0.65536000000000000000e5 +1520 2 12 26 0.65536000000000000000e5 +1520 2 16 30 0.32768000000000000000e5 +1520 2 21 35 -0.32768000000000000000e5 +1520 2 29 35 0.32768000000000000000e5 +1520 3 2 31 0.65536000000000000000e5 +1520 3 14 27 0.13107200000000000000e6 +1520 3 17 30 0.32768000000000000000e5 +1520 3 20 33 0.32768000000000000000e5 +1520 3 22 35 -0.32768000000000000000e5 +1520 3 29 34 0.65536000000000000000e5 +1520 4 4 16 0.65536000000000000000e5 +1521 1 28 43 -0.32768000000000000000e5 +1521 1 41 55 0.32768000000000000000e5 +1521 3 18 31 0.32768000000000000000e5 +1521 3 21 34 0.32768000000000000000e5 +1521 3 29 34 0.32768000000000000000e5 +1522 1 28 43 -0.16384000000000000000e5 +1522 1 42 42 0.32768000000000000000e5 +1522 3 18 31 0.16384000000000000000e5 +1523 1 33 48 -0.32768000000000000000e5 +1523 1 42 43 0.32768000000000000000e5 +1524 1 17 48 -0.32768000000000000000e5 +1524 1 42 44 0.32768000000000000000e5 +1524 3 24 29 0.32768000000000000000e5 +1525 1 34 49 -0.32768000000000000000e5 +1525 1 42 45 0.32768000000000000000e5 +1526 1 35 50 -0.32768000000000000000e5 +1526 1 42 46 0.32768000000000000000e5 +1527 1 1 48 0.16384000000000000000e5 +1527 1 2 49 0.16384000000000000000e5 +1527 1 3 50 0.32768000000000000000e5 +1527 1 11 42 -0.65536000000000000000e5 +1527 1 12 43 -0.13107200000000000000e6 +1527 1 17 48 0.13107200000000000000e6 +1527 1 23 38 0.16384000000000000000e5 +1527 1 42 47 0.32768000000000000000e5 +1527 2 2 32 0.16384000000000000000e5 +1527 2 8 22 -0.65536000000000000000e5 +1527 2 12 26 0.65536000000000000000e5 +1527 2 16 30 0.32768000000000000000e5 +1527 3 2 31 0.65536000000000000000e5 +1527 3 14 27 0.13107200000000000000e6 +1527 3 17 30 0.32768000000000000000e5 +1527 3 20 33 0.32768000000000000000e5 +1527 4 4 16 0.65536000000000000000e5 +1528 1 24 55 -0.32768000000000000000e5 +1528 1 42 48 0.32768000000000000000e5 +1529 1 1 48 -0.16384000000000000000e5 +1529 1 2 49 -0.16384000000000000000e5 +1529 1 3 50 -0.32768000000000000000e5 +1529 1 11 42 0.65536000000000000000e5 +1529 1 12 43 0.13107200000000000000e6 +1529 1 17 48 -0.13107200000000000000e6 +1529 1 23 38 -0.16384000000000000000e5 +1529 1 24 55 0.32768000000000000000e5 +1529 1 28 43 -0.65536000000000000000e5 +1529 1 42 49 0.32768000000000000000e5 +1529 2 2 32 -0.16384000000000000000e5 +1529 2 8 22 0.65536000000000000000e5 +1529 2 12 26 -0.65536000000000000000e5 +1529 2 16 30 -0.32768000000000000000e5 +1529 2 21 35 0.32768000000000000000e5 +1529 3 2 31 -0.65536000000000000000e5 +1529 3 14 27 -0.13107200000000000000e6 +1529 3 17 30 -0.32768000000000000000e5 +1529 3 18 31 0.65536000000000000000e5 +1529 3 20 33 -0.32768000000000000000e5 +1529 3 21 34 0.65536000000000000000e5 +1529 4 4 16 -0.65536000000000000000e5 +1530 1 28 43 -0.32768000000000000000e5 +1530 1 42 50 0.32768000000000000000e5 +1530 3 18 31 0.32768000000000000000e5 +1530 3 21 34 0.32768000000000000000e5 +1531 1 42 51 0.32768000000000000000e5 +1531 1 43 50 -0.32768000000000000000e5 +1532 1 42 52 0.32768000000000000000e5 +1532 1 44 51 -0.32768000000000000000e5 +1533 1 1 48 0.16384000000000000000e5 +1533 1 2 49 0.16384000000000000000e5 +1533 1 3 50 0.32768000000000000000e5 +1533 1 11 42 -0.65536000000000000000e5 +1533 1 12 43 -0.13107200000000000000e6 +1533 1 17 48 0.13107200000000000000e6 +1533 1 23 38 0.16384000000000000000e5 +1533 1 24 55 -0.32768000000000000000e5 +1533 1 42 53 0.32768000000000000000e5 +1533 1 47 50 0.32768000000000000000e5 +1533 2 2 32 0.16384000000000000000e5 +1533 2 8 22 -0.65536000000000000000e5 +1533 2 12 26 0.65536000000000000000e5 +1533 2 16 30 0.32768000000000000000e5 +1533 2 21 35 -0.32768000000000000000e5 +1533 2 29 35 0.32768000000000000000e5 +1533 3 2 31 0.65536000000000000000e5 +1533 3 14 27 0.13107200000000000000e6 +1533 3 17 30 0.32768000000000000000e5 +1533 3 20 33 0.32768000000000000000e5 +1533 3 22 35 -0.32768000000000000000e5 +1533 3 29 34 0.65536000000000000000e5 +1533 4 4 16 0.65536000000000000000e5 +1534 1 1 48 -0.16384000000000000000e5 +1534 1 2 49 -0.16384000000000000000e5 +1534 1 3 50 -0.32768000000000000000e5 +1534 1 11 42 0.65536000000000000000e5 +1534 1 12 43 0.13107200000000000000e6 +1534 1 17 48 -0.13107200000000000000e6 +1534 1 23 38 -0.16384000000000000000e5 +1534 1 24 55 0.32768000000000000000e5 +1534 1 28 43 -0.65536000000000000000e5 +1534 1 42 54 0.32768000000000000000e5 +1534 2 2 32 -0.16384000000000000000e5 +1534 2 8 22 0.65536000000000000000e5 +1534 2 12 26 -0.65536000000000000000e5 +1534 2 16 30 -0.32768000000000000000e5 +1534 2 21 35 0.32768000000000000000e5 +1534 3 2 31 -0.65536000000000000000e5 +1534 3 14 27 -0.13107200000000000000e6 +1534 3 17 30 -0.32768000000000000000e5 +1534 3 18 31 0.65536000000000000000e5 +1534 3 20 33 -0.32768000000000000000e5 +1534 3 21 34 0.65536000000000000000e5 +1534 3 22 35 0.32768000000000000000e5 +1534 4 4 16 -0.65536000000000000000e5 +1535 1 42 55 0.32768000000000000000e5 +1535 1 50 51 -0.32768000000000000000e5 +1536 1 1 48 -0.16384000000000000000e5 +1536 1 2 49 -0.16384000000000000000e5 +1536 1 3 50 -0.32768000000000000000e5 +1536 1 11 42 0.65536000000000000000e5 +1536 1 12 43 0.13107200000000000000e6 +1536 1 17 48 -0.13107200000000000000e6 +1536 1 23 38 -0.16384000000000000000e5 +1536 1 24 55 0.32768000000000000000e5 +1536 1 28 43 -0.65536000000000000000e5 +1536 1 42 56 0.32768000000000000000e5 +1536 2 2 32 -0.16384000000000000000e5 +1536 2 8 22 0.65536000000000000000e5 +1536 2 12 26 -0.65536000000000000000e5 +1536 2 16 30 -0.32768000000000000000e5 +1536 2 21 35 0.32768000000000000000e5 +1536 3 2 31 -0.65536000000000000000e5 +1536 3 14 27 -0.13107200000000000000e6 +1536 3 17 30 -0.32768000000000000000e5 +1536 3 18 31 0.65536000000000000000e5 +1536 3 20 33 -0.32768000000000000000e5 +1536 3 21 34 0.65536000000000000000e5 +1536 3 22 35 0.32768000000000000000e5 +1536 3 30 35 0.32768000000000000000e5 +1536 4 4 16 -0.65536000000000000000e5 +1537 1 15 54 -0.16384000000000000000e5 +1537 1 43 43 0.32768000000000000000e5 +1538 1 34 49 -0.32768000000000000000e5 +1538 1 43 44 0.32768000000000000000e5 +1539 1 17 48 0.32768000000000000000e5 +1539 1 34 49 0.32768000000000000000e5 +1539 1 35 50 -0.65536000000000000000e5 +1539 1 43 45 0.32768000000000000000e5 +1539 2 24 34 0.32768000000000000000e5 +1539 3 24 29 -0.32768000000000000000e5 +1540 1 24 55 -0.32768000000000000000e5 +1540 1 43 47 0.32768000000000000000e5 +1541 1 1 48 -0.16384000000000000000e5 +1541 1 2 49 -0.16384000000000000000e5 +1541 1 3 50 -0.32768000000000000000e5 +1541 1 11 42 0.65536000000000000000e5 +1541 1 12 43 0.13107200000000000000e6 +1541 1 17 48 -0.13107200000000000000e6 +1541 1 23 38 -0.16384000000000000000e5 +1541 1 24 55 0.32768000000000000000e5 +1541 1 28 43 -0.65536000000000000000e5 +1541 1 43 48 0.32768000000000000000e5 +1541 2 2 32 -0.16384000000000000000e5 +1541 2 8 22 0.65536000000000000000e5 +1541 2 12 26 -0.65536000000000000000e5 +1541 2 16 30 -0.32768000000000000000e5 +1541 2 21 35 0.32768000000000000000e5 +1541 3 2 31 -0.65536000000000000000e5 +1541 3 14 27 -0.13107200000000000000e6 +1541 3 17 30 -0.32768000000000000000e5 +1541 3 18 31 0.65536000000000000000e5 +1541 3 20 33 -0.32768000000000000000e5 +1541 3 21 34 0.65536000000000000000e5 +1541 4 4 16 -0.65536000000000000000e5 +1542 1 1 48 0.16384000000000000000e5 +1542 1 2 49 0.16384000000000000000e5 +1542 1 3 50 0.32768000000000000000e5 +1542 1 11 42 -0.65536000000000000000e5 +1542 1 12 43 -0.13107200000000000000e6 +1542 1 17 48 0.13107200000000000000e6 +1542 1 23 38 0.16384000000000000000e5 +1542 1 28 43 0.65536000000000000000e5 +1542 1 43 49 0.32768000000000000000e5 +1542 1 43 50 -0.65536000000000000000e5 +1542 2 2 32 0.16384000000000000000e5 +1542 2 8 22 -0.65536000000000000000e5 +1542 2 12 26 0.65536000000000000000e5 +1542 2 16 30 0.32768000000000000000e5 +1542 2 21 35 -0.32768000000000000000e5 +1542 2 28 34 0.32768000000000000000e5 +1542 3 2 31 0.65536000000000000000e5 +1542 3 14 27 0.13107200000000000000e6 +1542 3 17 30 0.32768000000000000000e5 +1542 3 18 31 -0.65536000000000000000e5 +1542 3 20 33 0.32768000000000000000e5 +1542 3 21 34 -0.65536000000000000000e5 +1542 4 4 16 0.65536000000000000000e5 +1543 1 28 43 0.32768000000000000000e5 +1543 1 43 50 0.32768000000000000000e5 +1543 1 43 51 0.32768000000000000000e5 +1543 1 44 51 -0.65536000000000000000e5 +1543 2 31 33 0.32768000000000000000e5 +1543 3 18 31 -0.32768000000000000000e5 +1543 3 21 34 -0.32768000000000000000e5 +1544 1 43 52 0.32768000000000000000e5 +1544 1 46 49 -0.32768000000000000000e5 +1545 1 1 48 -0.16384000000000000000e5 +1545 1 2 49 -0.16384000000000000000e5 +1545 1 3 50 -0.32768000000000000000e5 +1545 1 11 42 0.65536000000000000000e5 +1545 1 12 43 0.13107200000000000000e6 +1545 1 17 48 -0.13107200000000000000e6 +1545 1 23 38 -0.16384000000000000000e5 +1545 1 24 55 0.32768000000000000000e5 +1545 1 28 43 -0.65536000000000000000e5 +1545 1 43 53 0.32768000000000000000e5 +1545 2 2 32 -0.16384000000000000000e5 +1545 2 8 22 0.65536000000000000000e5 +1545 2 12 26 -0.65536000000000000000e5 +1545 2 16 30 -0.32768000000000000000e5 +1545 2 21 35 0.32768000000000000000e5 +1545 3 2 31 -0.65536000000000000000e5 +1545 3 14 27 -0.13107200000000000000e6 +1545 3 17 30 -0.32768000000000000000e5 +1545 3 18 31 0.65536000000000000000e5 +1545 3 20 33 -0.32768000000000000000e5 +1545 3 21 34 0.65536000000000000000e5 +1545 3 22 35 0.32768000000000000000e5 +1545 4 4 16 -0.65536000000000000000e5 +1546 1 40 55 -0.32768000000000000000e5 +1546 1 43 54 0.32768000000000000000e5 +1547 1 33 56 -0.32768000000000000000e5 +1547 1 43 55 0.32768000000000000000e5 +1548 1 43 56 0.32768000000000000000e5 +1548 1 51 54 -0.32768000000000000000e5 +1549 1 16 55 -0.16384000000000000000e5 +1549 1 44 44 0.32768000000000000000e5 +1550 1 35 50 -0.32768000000000000000e5 +1550 1 44 45 0.32768000000000000000e5 +1551 1 16 55 -0.16384000000000000000e5 +1551 1 35 50 -0.16384000000000000000e5 +1551 1 43 46 -0.16384000000000000000e5 +1551 1 44 46 0.32768000000000000000e5 +1551 2 31 31 -0.32768000000000000000e5 +1552 1 37 52 -0.32768000000000000000e5 +1552 1 44 47 0.32768000000000000000e5 +1553 1 28 43 -0.32768000000000000000e5 +1553 1 44 48 0.32768000000000000000e5 +1553 3 18 31 0.32768000000000000000e5 +1553 3 21 34 0.32768000000000000000e5 +1554 1 43 50 -0.32768000000000000000e5 +1554 1 44 49 0.32768000000000000000e5 +1555 1 17 48 -0.32768000000000000000e5 +1555 1 32 47 0.16384000000000000000e5 +1555 1 33 48 0.16384000000000000000e5 +1555 1 37 52 -0.16384000000000000000e5 +1555 1 43 50 -0.16384000000000000000e5 +1555 1 44 50 0.32768000000000000000e5 +1555 3 21 34 0.16384000000000000000e5 +1555 3 24 29 0.32768000000000000000e5 +1555 4 16 20 0.16384000000000000000e5 +1556 1 35 50 -0.32768000000000000000e5 +1556 1 44 52 0.32768000000000000000e5 +1556 3 25 34 0.32768000000000000000e5 +1557 1 28 43 -0.32768000000000000000e5 +1557 1 44 53 0.32768000000000000000e5 +1557 3 18 31 0.32768000000000000000e5 +1557 3 21 34 0.32768000000000000000e5 +1557 3 29 34 0.32768000000000000000e5 +1558 1 44 54 0.32768000000000000000e5 +1558 1 50 51 -0.32768000000000000000e5 +1559 1 44 55 0.32768000000000000000e5 +1559 1 46 53 -0.32768000000000000000e5 +1560 1 44 56 0.32768000000000000000e5 +1560 1 52 53 -0.32768000000000000000e5 +1561 1 43 46 -0.16384000000000000000e5 +1561 1 45 45 0.32768000000000000000e5 +1562 1 36 51 -0.32768000000000000000e5 +1562 1 45 46 0.32768000000000000000e5 +1563 1 28 43 -0.32768000000000000000e5 +1563 1 45 47 0.32768000000000000000e5 +1563 3 18 31 0.32768000000000000000e5 +1563 3 21 34 0.32768000000000000000e5 +1564 1 43 50 -0.32768000000000000000e5 +1564 1 45 48 0.32768000000000000000e5 +1565 1 28 43 0.32768000000000000000e5 +1565 1 43 50 0.32768000000000000000e5 +1565 1 44 51 -0.65536000000000000000e5 +1565 1 45 49 0.32768000000000000000e5 +1565 2 31 33 0.32768000000000000000e5 +1565 3 18 31 -0.32768000000000000000e5 +1565 3 21 34 -0.32768000000000000000e5 +1566 1 44 51 -0.32768000000000000000e5 +1566 1 45 50 0.32768000000000000000e5 +1567 1 45 51 0.32768000000000000000e5 +1567 1 46 49 -0.32768000000000000000e5 +1568 1 45 53 0.32768000000000000000e5 +1568 1 50 51 -0.32768000000000000000e5 +1569 1 33 56 -0.32768000000000000000e5 +1569 1 45 54 0.32768000000000000000e5 +1570 1 45 55 0.32768000000000000000e5 +1570 1 51 52 -0.32768000000000000000e5 +1571 1 17 48 -0.32768000000000000000e5 +1571 1 32 47 0.16384000000000000000e5 +1571 1 33 48 0.16384000000000000000e5 +1571 1 37 52 -0.16384000000000000000e5 +1571 1 43 50 -0.16384000000000000000e5 +1571 1 46 47 0.32768000000000000000e5 +1571 3 21 34 0.16384000000000000000e5 +1571 3 24 29 0.32768000000000000000e5 +1571 4 16 20 0.16384000000000000000e5 +1572 1 44 51 -0.32768000000000000000e5 +1572 1 46 48 0.32768000000000000000e5 +1573 1 35 50 -0.32768000000000000000e5 +1573 1 46 50 0.32768000000000000000e5 +1573 3 25 34 0.32768000000000000000e5 +1574 1 45 52 -0.32768000000000000000e5 +1574 1 46 51 0.32768000000000000000e5 +1575 1 21 56 -0.32768000000000000000e5 +1575 1 46 52 0.32768000000000000000e5 +1576 1 46 54 0.32768000000000000000e5 +1576 1 51 52 -0.32768000000000000000e5 +1577 1 46 56 0.32768000000000000000e5 +1577 1 52 55 -0.32768000000000000000e5 +1578 1 38 53 0.16384000000000000000e5 +1578 1 47 47 0.32768000000000000000e5 +1578 1 47 50 -0.32768000000000000000e5 +1578 1 47 54 0.16384000000000000000e5 +1578 2 32 32 0.32768000000000000000e5 +1578 3 32 33 0.16384000000000000000e5 +1579 1 38 53 -0.32768000000000000000e5 +1579 1 47 48 0.32768000000000000000e5 +1580 1 47 49 0.32768000000000000000e5 +1580 1 47 54 -0.32768000000000000000e5 +1580 3 32 33 -0.32768000000000000000e5 +1581 1 1 48 0.16384000000000000000e5 +1581 1 2 49 0.16384000000000000000e5 +1581 1 3 50 0.32768000000000000000e5 +1581 1 11 42 -0.65536000000000000000e5 +1581 1 12 43 -0.13107200000000000000e6 +1581 1 17 48 0.13107200000000000000e6 +1581 1 23 38 0.16384000000000000000e5 +1581 1 24 55 -0.32768000000000000000e5 +1581 1 47 50 0.32768000000000000000e5 +1581 1 47 51 0.32768000000000000000e5 +1581 2 2 32 0.16384000000000000000e5 +1581 2 8 22 -0.65536000000000000000e5 +1581 2 12 26 0.65536000000000000000e5 +1581 2 16 30 0.32768000000000000000e5 +1581 2 21 35 -0.32768000000000000000e5 +1581 2 29 35 0.32768000000000000000e5 +1581 3 2 31 0.65536000000000000000e5 +1581 3 14 27 0.13107200000000000000e6 +1581 3 17 30 0.32768000000000000000e5 +1581 3 20 33 0.32768000000000000000e5 +1581 3 22 35 -0.32768000000000000000e5 +1581 3 29 34 0.65536000000000000000e5 +1581 4 4 16 0.65536000000000000000e5 +1582 1 28 43 -0.32768000000000000000e5 +1582 1 47 52 0.32768000000000000000e5 +1582 3 18 31 0.32768000000000000000e5 +1582 3 21 34 0.32768000000000000000e5 +1582 3 29 34 0.32768000000000000000e5 +1583 1 37 56 -0.32768000000000000000e5 +1583 1 47 53 0.32768000000000000000e5 +1584 1 41 56 -0.32768000000000000000e5 +1584 1 47 55 0.32768000000000000000e5 +1585 1 1 48 -0.32768000000000000000e5 +1585 1 2 49 -0.32768000000000000000e5 +1585 1 3 50 -0.65536000000000000000e5 +1585 1 11 42 0.13107200000000000000e6 +1585 1 12 43 0.26214400000000000000e6 +1585 1 17 48 -0.26214400000000000000e6 +1585 1 23 38 -0.32768000000000000000e5 +1585 1 24 55 0.65536000000000000000e5 +1585 1 28 43 -0.13107200000000000000e6 +1585 1 47 56 0.32768000000000000000e5 +1585 1 49 56 0.32768000000000000000e5 +1585 1 53 54 0.32768000000000000000e5 +1585 2 2 32 -0.32768000000000000000e5 +1585 2 8 22 0.13107200000000000000e6 +1585 2 12 26 -0.13107200000000000000e6 +1585 2 16 30 -0.65536000000000000000e5 +1585 2 21 35 0.65536000000000000000e5 +1585 2 35 35 0.65536000000000000000e5 +1585 3 2 31 -0.13107200000000000000e6 +1585 3 14 27 -0.26214400000000000000e6 +1585 3 17 30 -0.65536000000000000000e5 +1585 3 18 31 0.13107200000000000000e6 +1585 3 20 33 -0.65536000000000000000e5 +1585 3 21 34 0.13107200000000000000e6 +1585 3 22 35 0.65536000000000000000e5 +1585 3 30 35 0.65536000000000000000e5 +1585 3 34 35 0.65536000000000000000e5 +1585 4 4 16 -0.13107200000000000000e6 +1586 1 47 54 -0.16384000000000000000e5 +1586 1 48 48 0.32768000000000000000e5 +1586 3 32 33 -0.16384000000000000000e5 +1587 1 25 56 -0.32768000000000000000e5 +1587 1 48 49 0.32768000000000000000e5 +1588 1 1 48 0.16384000000000000000e5 +1588 1 2 49 0.16384000000000000000e5 +1588 1 3 50 0.32768000000000000000e5 +1588 1 11 42 -0.65536000000000000000e5 +1588 1 12 43 -0.13107200000000000000e6 +1588 1 17 48 0.13107200000000000000e6 +1588 1 23 38 0.16384000000000000000e5 +1588 1 24 55 -0.32768000000000000000e5 +1588 1 47 50 0.32768000000000000000e5 +1588 1 48 50 0.32768000000000000000e5 +1588 2 2 32 0.16384000000000000000e5 +1588 2 8 22 -0.65536000000000000000e5 +1588 2 12 26 0.65536000000000000000e5 +1588 2 16 30 0.32768000000000000000e5 +1588 2 21 35 -0.32768000000000000000e5 +1588 2 29 35 0.32768000000000000000e5 +1588 3 2 31 0.65536000000000000000e5 +1588 3 14 27 0.13107200000000000000e6 +1588 3 17 30 0.32768000000000000000e5 +1588 3 20 33 0.32768000000000000000e5 +1588 3 22 35 -0.32768000000000000000e5 +1588 3 29 34 0.65536000000000000000e5 +1588 4 4 16 0.65536000000000000000e5 +1589 1 1 48 -0.16384000000000000000e5 +1589 1 2 49 -0.16384000000000000000e5 +1589 1 3 50 -0.32768000000000000000e5 +1589 1 11 42 0.65536000000000000000e5 +1589 1 12 43 0.13107200000000000000e6 +1589 1 17 48 -0.13107200000000000000e6 +1589 1 23 38 -0.16384000000000000000e5 +1589 1 24 55 0.32768000000000000000e5 +1589 1 28 43 -0.65536000000000000000e5 +1589 1 48 51 0.32768000000000000000e5 +1589 2 2 32 -0.16384000000000000000e5 +1589 2 8 22 0.65536000000000000000e5 +1589 2 12 26 -0.65536000000000000000e5 +1589 2 16 30 -0.32768000000000000000e5 +1589 2 21 35 0.32768000000000000000e5 +1589 3 2 31 -0.65536000000000000000e5 +1589 3 14 27 -0.13107200000000000000e6 +1589 3 17 30 -0.32768000000000000000e5 +1589 3 18 31 0.65536000000000000000e5 +1589 3 20 33 -0.32768000000000000000e5 +1589 3 21 34 0.65536000000000000000e5 +1589 3 22 35 0.32768000000000000000e5 +1589 4 4 16 -0.65536000000000000000e5 +1590 1 48 52 0.32768000000000000000e5 +1590 1 50 51 -0.32768000000000000000e5 +1591 1 47 54 -0.32768000000000000000e5 +1591 1 48 53 0.32768000000000000000e5 +1592 1 1 48 -0.32768000000000000000e5 +1592 1 2 49 -0.32768000000000000000e5 +1592 1 3 50 -0.65536000000000000000e5 +1592 1 11 42 0.13107200000000000000e6 +1592 1 12 43 0.26214400000000000000e6 +1592 1 17 48 -0.26214400000000000000e6 +1592 1 23 38 -0.32768000000000000000e5 +1592 1 24 55 0.65536000000000000000e5 +1592 1 25 56 -0.32768000000000000000e5 +1592 1 37 56 0.32768000000000000000e5 +1592 1 38 53 -0.32768000000000000000e5 +1592 1 41 56 -0.65536000000000000000e5 +1592 1 47 50 -0.65536000000000000000e5 +1592 1 48 54 0.32768000000000000000e5 +1592 2 2 32 -0.32768000000000000000e5 +1592 2 8 22 0.13107200000000000000e6 +1592 2 12 26 -0.13107200000000000000e6 +1592 2 16 30 -0.65536000000000000000e5 +1592 2 21 35 0.65536000000000000000e5 +1592 2 29 35 -0.65536000000000000000e5 +1592 3 2 31 -0.13107200000000000000e6 +1592 3 14 27 -0.26214400000000000000e6 +1592 3 17 30 -0.65536000000000000000e5 +1592 3 20 33 -0.65536000000000000000e5 +1592 3 22 35 0.65536000000000000000e5 +1592 3 29 34 -0.13107200000000000000e6 +1592 3 32 33 -0.32768000000000000000e5 +1592 4 4 16 -0.13107200000000000000e6 +1592 4 20 20 -0.65536000000000000000e5 +1593 1 1 48 -0.16384000000000000000e5 +1593 1 2 49 -0.16384000000000000000e5 +1593 1 3 50 -0.32768000000000000000e5 +1593 1 11 42 0.65536000000000000000e5 +1593 1 12 43 0.13107200000000000000e6 +1593 1 17 48 -0.13107200000000000000e6 +1593 1 23 38 -0.16384000000000000000e5 +1593 1 24 55 0.32768000000000000000e5 +1593 1 28 43 -0.65536000000000000000e5 +1593 1 48 55 0.32768000000000000000e5 +1593 2 2 32 -0.16384000000000000000e5 +1593 2 8 22 0.65536000000000000000e5 +1593 2 12 26 -0.65536000000000000000e5 +1593 2 16 30 -0.32768000000000000000e5 +1593 2 21 35 0.32768000000000000000e5 +1593 3 2 31 -0.65536000000000000000e5 +1593 3 14 27 -0.13107200000000000000e6 +1593 3 17 30 -0.32768000000000000000e5 +1593 3 18 31 0.65536000000000000000e5 +1593 3 20 33 -0.32768000000000000000e5 +1593 3 21 34 0.65536000000000000000e5 +1593 3 22 35 0.32768000000000000000e5 +1593 3 30 35 0.32768000000000000000e5 +1593 4 4 16 -0.65536000000000000000e5 +1594 1 48 56 0.32768000000000000000e5 +1594 1 53 54 -0.32768000000000000000e5 +1595 1 1 48 -0.16384000000000000000e5 +1595 1 2 49 -0.16384000000000000000e5 +1595 1 3 50 -0.32768000000000000000e5 +1595 1 11 42 0.65536000000000000000e5 +1595 1 12 43 0.13107200000000000000e6 +1595 1 17 48 -0.13107200000000000000e6 +1595 1 23 38 -0.16384000000000000000e5 +1595 1 24 55 0.32768000000000000000e5 +1595 1 25 56 0.16384000000000000000e5 +1595 1 28 43 -0.65536000000000000000e5 +1595 1 47 54 0.16384000000000000000e5 +1595 1 49 49 0.32768000000000000000e5 +1595 2 2 32 -0.16384000000000000000e5 +1595 2 8 22 0.65536000000000000000e5 +1595 2 12 26 -0.65536000000000000000e5 +1595 2 16 30 -0.32768000000000000000e5 +1595 2 21 35 0.32768000000000000000e5 +1595 2 33 33 0.32768000000000000000e5 +1595 3 2 31 -0.65536000000000000000e5 +1595 3 14 27 -0.13107200000000000000e6 +1595 3 17 30 -0.32768000000000000000e5 +1595 3 18 31 0.65536000000000000000e5 +1595 3 20 33 -0.32768000000000000000e5 +1595 3 21 34 0.65536000000000000000e5 +1595 3 22 35 0.32768000000000000000e5 +1595 3 32 33 0.16384000000000000000e5 +1595 4 4 16 -0.65536000000000000000e5 +1596 1 1 48 -0.16384000000000000000e5 +1596 1 2 49 -0.16384000000000000000e5 +1596 1 3 50 -0.32768000000000000000e5 +1596 1 11 42 0.65536000000000000000e5 +1596 1 12 43 0.13107200000000000000e6 +1596 1 17 48 -0.13107200000000000000e6 +1596 1 23 38 -0.16384000000000000000e5 +1596 1 24 55 0.32768000000000000000e5 +1596 1 28 43 -0.65536000000000000000e5 +1596 1 49 50 0.32768000000000000000e5 +1596 2 2 32 -0.16384000000000000000e5 +1596 2 8 22 0.65536000000000000000e5 +1596 2 12 26 -0.65536000000000000000e5 +1596 2 16 30 -0.32768000000000000000e5 +1596 2 21 35 0.32768000000000000000e5 +1596 3 2 31 -0.65536000000000000000e5 +1596 3 14 27 -0.13107200000000000000e6 +1596 3 17 30 -0.32768000000000000000e5 +1596 3 18 31 0.65536000000000000000e5 +1596 3 20 33 -0.32768000000000000000e5 +1596 3 21 34 0.65536000000000000000e5 +1596 3 22 35 0.32768000000000000000e5 +1596 4 4 16 -0.65536000000000000000e5 +1597 1 40 55 -0.32768000000000000000e5 +1597 1 49 51 0.32768000000000000000e5 +1598 1 33 56 -0.32768000000000000000e5 +1598 1 49 52 0.32768000000000000000e5 +1599 1 1 48 -0.32768000000000000000e5 +1599 1 2 49 -0.32768000000000000000e5 +1599 1 3 50 -0.65536000000000000000e5 +1599 1 11 42 0.13107200000000000000e6 +1599 1 12 43 0.26214400000000000000e6 +1599 1 17 48 -0.26214400000000000000e6 +1599 1 23 38 -0.32768000000000000000e5 +1599 1 24 55 0.65536000000000000000e5 +1599 1 25 56 -0.32768000000000000000e5 +1599 1 37 56 0.32768000000000000000e5 +1599 1 38 53 -0.32768000000000000000e5 +1599 1 41 56 -0.65536000000000000000e5 +1599 1 47 50 -0.65536000000000000000e5 +1599 1 49 53 0.32768000000000000000e5 +1599 2 2 32 -0.32768000000000000000e5 +1599 2 8 22 0.13107200000000000000e6 +1599 2 12 26 -0.13107200000000000000e6 +1599 2 16 30 -0.65536000000000000000e5 +1599 2 21 35 0.65536000000000000000e5 +1599 2 29 35 -0.65536000000000000000e5 +1599 3 2 31 -0.13107200000000000000e6 +1599 3 14 27 -0.26214400000000000000e6 +1599 3 17 30 -0.65536000000000000000e5 +1599 3 20 33 -0.65536000000000000000e5 +1599 3 22 35 0.65536000000000000000e5 +1599 3 29 34 -0.13107200000000000000e6 +1599 3 32 33 -0.32768000000000000000e5 +1599 4 4 16 -0.13107200000000000000e6 +1599 4 20 20 -0.65536000000000000000e5 +1600 1 25 56 0.32768000000000000000e5 +1600 1 28 43 -0.13107200000000000000e6 +1600 1 37 56 -0.32768000000000000000e5 +1600 1 38 53 0.32768000000000000000e5 +1600 1 41 56 0.65536000000000000000e5 +1600 1 47 50 0.65536000000000000000e5 +1600 1 47 54 0.32768000000000000000e5 +1600 1 49 54 0.32768000000000000000e5 +1600 2 29 35 0.65536000000000000000e5 +1600 2 33 35 0.32768000000000000000e5 +1600 3 18 31 0.13107200000000000000e6 +1600 3 21 34 0.13107200000000000000e6 +1600 3 29 34 0.13107200000000000000e6 +1600 3 30 35 0.65536000000000000000e5 +1600 3 32 33 0.32768000000000000000e5 +1600 4 20 20 0.65536000000000000000e5 +1601 1 49 55 0.32768000000000000000e5 +1601 1 51 54 -0.32768000000000000000e5 +1602 1 28 43 -0.16384000000000000000e5 +1602 1 50 50 0.32768000000000000000e5 +1602 3 18 31 0.16384000000000000000e5 +1602 3 21 34 0.16384000000000000000e5 +1602 3 29 34 0.16384000000000000000e5 +1603 1 46 53 -0.32768000000000000000e5 +1603 1 50 52 0.32768000000000000000e5 +1604 1 41 56 -0.32768000000000000000e5 +1604 1 50 53 0.32768000000000000000e5 +1605 1 1 48 -0.16384000000000000000e5 +1605 1 2 49 -0.16384000000000000000e5 +1605 1 3 50 -0.32768000000000000000e5 +1605 1 11 42 0.65536000000000000000e5 +1605 1 12 43 0.13107200000000000000e6 +1605 1 17 48 -0.13107200000000000000e6 +1605 1 23 38 -0.16384000000000000000e5 +1605 1 24 55 0.32768000000000000000e5 +1605 1 28 43 -0.65536000000000000000e5 +1605 1 50 54 0.32768000000000000000e5 +1605 2 2 32 -0.16384000000000000000e5 +1605 2 8 22 0.65536000000000000000e5 +1605 2 12 26 -0.65536000000000000000e5 +1605 2 16 30 -0.32768000000000000000e5 +1605 2 21 35 0.32768000000000000000e5 +1605 3 2 31 -0.65536000000000000000e5 +1605 3 14 27 -0.13107200000000000000e6 +1605 3 17 30 -0.32768000000000000000e5 +1605 3 18 31 0.65536000000000000000e5 +1605 3 20 33 -0.32768000000000000000e5 +1605 3 21 34 0.65536000000000000000e5 +1605 3 22 35 0.32768000000000000000e5 +1605 3 30 35 0.32768000000000000000e5 +1605 4 4 16 -0.65536000000000000000e5 +1606 1 50 55 0.32768000000000000000e5 +1606 1 52 53 -0.32768000000000000000e5 +1607 1 1 48 -0.16384000000000000000e5 +1607 1 2 49 -0.16384000000000000000e5 +1607 1 3 50 -0.32768000000000000000e5 +1607 1 11 42 0.65536000000000000000e5 +1607 1 12 43 0.13107200000000000000e6 +1607 1 17 48 -0.13107200000000000000e6 +1607 1 23 38 -0.16384000000000000000e5 +1607 1 24 55 0.32768000000000000000e5 +1607 1 28 43 -0.65536000000000000000e5 +1607 1 50 56 0.32768000000000000000e5 +1607 2 2 32 -0.16384000000000000000e5 +1607 2 8 22 0.65536000000000000000e5 +1607 2 12 26 -0.65536000000000000000e5 +1607 2 16 30 -0.32768000000000000000e5 +1607 2 21 35 0.32768000000000000000e5 +1607 3 2 31 -0.65536000000000000000e5 +1607 3 14 27 -0.13107200000000000000e6 +1607 3 17 30 -0.32768000000000000000e5 +1607 3 18 31 0.65536000000000000000e5 +1607 3 20 33 -0.32768000000000000000e5 +1607 3 21 34 0.65536000000000000000e5 +1607 3 22 35 0.32768000000000000000e5 +1607 3 30 35 0.32768000000000000000e5 +1607 3 34 35 0.32768000000000000000e5 +1607 4 4 16 -0.65536000000000000000e5 +1608 1 33 56 -0.16384000000000000000e5 +1608 1 51 51 0.32768000000000000000e5 +1609 1 1 48 -0.16384000000000000000e5 +1609 1 2 49 -0.16384000000000000000e5 +1609 1 3 50 -0.32768000000000000000e5 +1609 1 11 42 0.65536000000000000000e5 +1609 1 12 43 0.13107200000000000000e6 +1609 1 17 48 -0.13107200000000000000e6 +1609 1 23 38 -0.16384000000000000000e5 +1609 1 24 55 0.32768000000000000000e5 +1609 1 28 43 -0.65536000000000000000e5 +1609 1 51 53 0.32768000000000000000e5 +1609 2 2 32 -0.16384000000000000000e5 +1609 2 8 22 0.65536000000000000000e5 +1609 2 12 26 -0.65536000000000000000e5 +1609 2 16 30 -0.32768000000000000000e5 +1609 2 21 35 0.32768000000000000000e5 +1609 3 2 31 -0.65536000000000000000e5 +1609 3 14 27 -0.13107200000000000000e6 +1609 3 17 30 -0.32768000000000000000e5 +1609 3 18 31 0.65536000000000000000e5 +1609 3 20 33 -0.32768000000000000000e5 +1609 3 21 34 0.65536000000000000000e5 +1609 3 22 35 0.32768000000000000000e5 +1609 3 30 35 0.32768000000000000000e5 +1609 4 4 16 -0.65536000000000000000e5 +1610 1 45 56 -0.32768000000000000000e5 +1610 1 51 55 0.32768000000000000000e5 +1611 1 51 56 0.32768000000000000000e5 +1611 1 54 55 -0.32768000000000000000e5 +1612 1 46 55 -0.16384000000000000000e5 +1612 1 52 52 0.32768000000000000000e5 +1613 1 45 56 -0.32768000000000000000e5 +1613 1 52 54 0.32768000000000000000e5 +1614 1 46 53 -0.65536000000000000000e5 +1614 1 52 53 0.32768000000000000000e5 +1614 1 52 56 0.32768000000000000000e5 +1615 1 1 48 -0.16384000000000000000e5 +1615 1 2 49 -0.16384000000000000000e5 +1615 1 3 50 -0.32768000000000000000e5 +1615 1 11 42 0.65536000000000000000e5 +1615 1 12 43 0.13107200000000000000e6 +1615 1 17 48 -0.13107200000000000000e6 +1615 1 23 38 -0.16384000000000000000e5 +1615 1 24 55 0.32768000000000000000e5 +1615 1 28 43 -0.65536000000000000000e5 +1615 1 49 56 0.16384000000000000000e5 +1615 1 53 53 0.32768000000000000000e5 +1615 1 53 54 0.16384000000000000000e5 +1615 2 2 32 -0.16384000000000000000e5 +1615 2 8 22 0.65536000000000000000e5 +1615 2 12 26 -0.65536000000000000000e5 +1615 2 16 30 -0.32768000000000000000e5 +1615 2 21 35 0.32768000000000000000e5 +1615 2 35 35 0.32768000000000000000e5 +1615 3 2 31 -0.65536000000000000000e5 +1615 3 14 27 -0.13107200000000000000e6 +1615 3 17 30 -0.32768000000000000000e5 +1615 3 18 31 0.65536000000000000000e5 +1615 3 20 33 -0.32768000000000000000e5 +1615 3 21 34 0.65536000000000000000e5 +1615 3 22 35 0.32768000000000000000e5 +1615 3 30 35 0.32768000000000000000e5 +1615 3 34 35 0.32768000000000000000e5 +1615 4 4 16 -0.65536000000000000000e5 +1616 1 1 48 -0.16384000000000000000e5 +1616 1 2 49 -0.16384000000000000000e5 +1616 1 3 50 -0.32768000000000000000e5 +1616 1 11 42 0.65536000000000000000e5 +1616 1 12 43 0.13107200000000000000e6 +1616 1 17 48 -0.13107200000000000000e6 +1616 1 23 38 -0.16384000000000000000e5 +1616 1 24 55 0.32768000000000000000e5 +1616 1 28 43 -0.65536000000000000000e5 +1616 1 53 55 0.32768000000000000000e5 +1616 2 2 32 -0.16384000000000000000e5 +1616 2 8 22 0.65536000000000000000e5 +1616 2 12 26 -0.65536000000000000000e5 +1616 2 16 30 -0.32768000000000000000e5 +1616 2 21 35 0.32768000000000000000e5 +1616 3 2 31 -0.65536000000000000000e5 +1616 3 14 27 -0.13107200000000000000e6 +1616 3 17 30 -0.32768000000000000000e5 +1616 3 18 31 0.65536000000000000000e5 +1616 3 20 33 -0.32768000000000000000e5 +1616 3 21 34 0.65536000000000000000e5 +1616 3 22 35 0.32768000000000000000e5 +1616 3 30 35 0.32768000000000000000e5 +1616 3 34 35 0.32768000000000000000e5 +1616 4 4 16 -0.65536000000000000000e5 +1617 1 49 56 -0.16384000000000000000e5 +1617 1 54 54 0.32768000000000000000e5 +1618 1 1 48 -0.32768000000000000000e5 +1618 1 2 49 -0.32768000000000000000e5 +1618 1 3 50 -0.65536000000000000000e5 +1618 1 11 42 0.13107200000000000000e6 +1618 1 12 43 0.26214400000000000000e6 +1618 1 17 48 -0.26214400000000000000e6 +1618 1 23 38 -0.32768000000000000000e5 +1618 1 24 55 0.65536000000000000000e5 +1618 1 28 43 -0.13107200000000000000e6 +1618 1 53 54 0.32768000000000000000e5 +1618 1 54 56 0.32768000000000000000e5 +1618 2 2 32 -0.32768000000000000000e5 +1618 2 8 22 0.13107200000000000000e6 +1618 2 12 26 -0.13107200000000000000e6 +1618 2 16 30 -0.65536000000000000000e5 +1618 2 21 35 0.65536000000000000000e5 +1618 3 2 31 -0.13107200000000000000e6 +1618 3 14 27 -0.26214400000000000000e6 +1618 3 17 30 -0.65536000000000000000e5 +1618 3 18 31 0.13107200000000000000e6 +1618 3 20 33 -0.65536000000000000000e5 +1618 3 21 34 0.13107200000000000000e6 +1618 3 22 35 0.65536000000000000000e5 +1618 3 30 35 0.65536000000000000000e5 +1618 4 4 16 -0.13107200000000000000e6 +1619 1 46 53 -0.32768000000000000000e5 +1619 1 52 53 0.16384000000000000000e5 +1619 1 55 55 0.32768000000000000000e5 +1620 1 1 2 0.32768000000000000000e5 +1620 1 1 8 -0.65536000000000000000e5 +1620 1 1 32 -0.13107200000000000000e6 +1620 1 1 40 0.32768000000000000000e5 +1620 1 1 48 -0.32768000000000000000e5 +1620 1 2 5 -0.32768000000000000000e5 +1620 1 2 9 0.65536000000000000000e5 +1620 1 2 33 0.13107200000000000000e6 +1620 1 2 49 -0.32768000000000000000e5 +1620 1 3 34 -0.26214400000000000000e6 +1620 1 6 37 -0.32768000000000000000e5 +1620 1 7 22 -0.65536000000000000000e5 +1620 1 7 38 0.65536000000000000000e5 +1620 1 8 23 -0.19660800000000000000e6 +1620 1 8 39 0.65536000000000000000e5 +1620 1 10 41 0.13107200000000000000e6 +1620 1 12 27 0.26214400000000000000e6 +1620 1 23 38 -0.32768000000000000000e5 +1620 2 1 2 0.32768000000000000000e5 +1620 2 1 7 -0.65536000000000000000e5 +1620 2 2 16 -0.32768000000000000000e5 +1620 2 2 32 -0.32768000000000000000e5 +1620 2 3 17 0.32768000000000000000e5 +1620 2 4 26 -0.32768000000000000000e5 +1620 2 6 20 -0.13107200000000000000e6 +1620 2 7 21 0.13107200000000000000e6 +1620 3 1 2 0.32768000000000000000e5 +1620 3 1 30 -0.65536000000000000000e5 +1620 3 2 3 -0.32768000000000000000e5 +1620 3 3 16 -0.65536000000000000000e5 +1620 3 4 17 -0.32768000000000000000e5 +1620 3 6 19 -0.65536000000000000000e5 +1620 3 7 20 0.13107200000000000000e6 +1620 3 8 21 0.13107200000000000000e6 +1620 4 1 5 0.65536000000000000000e5 +1620 4 1 13 -0.65536000000000000000e5 +1620 4 2 2 -0.65536000000000000000e5 +1620 4 2 14 -0.65536000000000000000e5 +1621 1 1 24 0.32768000000000000000e5 +1621 1 1 40 0.32768000000000000000e5 +1621 1 1 48 0.32768000000000000000e5 +1621 1 2 49 0.32768000000000000000e5 +1621 1 6 37 0.32768000000000000000e5 +1621 1 7 38 0.65536000000000000000e5 +1621 1 8 23 -0.13107200000000000000e6 +1621 1 8 39 -0.65536000000000000000e5 +1621 1 23 38 0.32768000000000000000e5 +1621 2 1 4 0.32768000000000000000e5 +1621 2 2 32 0.32768000000000000000e5 +1621 2 3 17 -0.32768000000000000000e5 +1621 2 4 26 0.32768000000000000000e5 +1621 3 1 30 0.65536000000000000000e5 +1621 3 4 17 -0.32768000000000000000e5 +1621 3 6 19 -0.65536000000000000000e5 +1621 3 7 20 0.13107200000000000000e6 +1621 4 2 2 -0.65536000000000000000e5 +1621 4 2 14 -0.65536000000000000000e5 +1622 2 1 5 0.32768000000000000000e5 +1622 2 2 4 -0.32768000000000000000e5 +1623 1 1 2 0.16384000000000000000e5 +1623 1 1 12 -0.65536000000000000000e5 +1623 1 1 24 -0.16384000000000000000e5 +1623 1 1 32 -0.13107200000000000000e6 +1623 1 1 40 0.32768000000000000000e5 +1623 1 1 48 -0.16384000000000000000e5 +1623 1 2 5 -0.32768000000000000000e5 +1623 1 2 9 0.65536000000000000000e5 +1623 1 2 33 0.13107200000000000000e6 +1623 1 2 49 -0.16384000000000000000e5 +1623 1 3 34 -0.26214400000000000000e6 +1623 1 6 37 -0.16384000000000000000e5 +1623 1 7 22 -0.32768000000000000000e5 +1623 1 7 38 0.65536000000000000000e5 +1623 1 8 23 -0.19660800000000000000e6 +1623 1 8 39 0.32768000000000000000e5 +1623 1 10 41 0.13107200000000000000e6 +1623 1 12 27 0.26214400000000000000e6 +1623 1 23 38 -0.16384000000000000000e5 +1623 2 1 3 0.16384000000000000000e5 +1623 2 1 6 0.32768000000000000000e5 +1623 2 1 7 -0.65536000000000000000e5 +1623 2 2 16 -0.32768000000000000000e5 +1623 2 2 32 -0.16384000000000000000e5 +1623 2 3 17 0.16384000000000000000e5 +1623 2 4 26 -0.16384000000000000000e5 +1623 2 6 20 -0.13107200000000000000e6 +1623 2 7 21 0.13107200000000000000e6 +1623 3 1 2 0.32768000000000000000e5 +1623 3 1 16 -0.16384000000000000000e5 +1623 3 1 30 -0.32768000000000000000e5 +1623 3 2 3 -0.16384000000000000000e5 +1623 3 3 16 -0.49152000000000000000e5 +1623 3 4 17 -0.32768000000000000000e5 +1623 3 6 19 -0.65536000000000000000e5 +1623 3 7 20 0.13107200000000000000e6 +1623 3 8 21 0.13107200000000000000e6 +1623 4 1 1 0.32768000000000000000e5 +1623 4 1 5 0.65536000000000000000e5 +1623 4 1 13 -0.49152000000000000000e5 +1623 4 2 2 -0.65536000000000000000e5 +1623 4 2 14 -0.65536000000000000000e5 +1624 1 1 32 -0.13107200000000000000e6 +1624 1 1 40 0.16384000000000000000e5 +1624 1 2 5 -0.16384000000000000000e5 +1624 1 2 9 0.32768000000000000000e5 +1624 1 2 17 -0.13107200000000000000e6 +1624 1 3 18 -0.26214400000000000000e6 +1624 1 3 34 -0.13107200000000000000e6 +1624 1 4 19 -0.26214400000000000000e6 +1624 1 4 35 -0.26214400000000000000e6 +1624 1 6 13 0.65536000000000000000e5 +1624 1 7 22 -0.32768000000000000000e5 +1624 1 7 38 0.32768000000000000000e5 +1624 1 8 23 -0.98304000000000000000e5 +1624 1 8 39 -0.32768000000000000000e5 +1624 1 10 41 0.65536000000000000000e5 +1624 1 11 42 0.65536000000000000000e5 +1624 1 12 27 0.13107200000000000000e6 +1624 1 18 25 -0.13107200000000000000e6 +1624 1 20 27 0.52428800000000000000e6 +1624 2 1 3 0.16384000000000000000e5 +1624 2 1 7 -0.32768000000000000000e5 +1624 2 1 8 0.32768000000000000000e5 +1624 2 2 8 -0.32768000000000000000e5 +1624 2 2 16 -0.16384000000000000000e5 +1624 2 4 10 -0.65536000000000000000e5 +1624 2 6 12 -0.13107200000000000000e6 +1624 2 6 20 -0.65536000000000000000e5 +1624 2 7 21 0.65536000000000000000e5 +1624 2 8 22 0.65536000000000000000e5 +1624 2 9 23 -0.13107200000000000000e6 +1624 2 10 24 -0.26214400000000000000e6 +1624 3 1 2 0.16384000000000000000e5 +1624 3 2 15 0.26214400000000000000e6 +1624 3 3 8 -0.32768000000000000000e5 +1624 3 3 16 -0.16384000000000000000e5 +1624 3 4 17 -0.16384000000000000000e5 +1624 3 6 7 -0.65536000000000000000e5 +1624 3 6 19 -0.65536000000000000000e5 +1624 3 7 20 0.65536000000000000000e5 +1624 3 8 13 0.26214400000000000000e6 +1624 3 8 21 0.65536000000000000000e5 +1624 3 9 22 0.65536000000000000000e5 +1624 4 1 5 0.32768000000000000000e5 +1624 4 1 13 -0.16384000000000000000e5 +1624 4 2 2 -0.32768000000000000000e5 +1624 4 2 14 -0.32768000000000000000e5 +1624 4 4 8 0.65536000000000000000e5 +1625 2 1 9 0.32768000000000000000e5 +1625 2 2 8 -0.32768000000000000000e5 +1626 1 1 8 0.16384000000000000000e5 +1626 1 1 12 0.32768000000000000000e5 +1626 1 1 16 -0.65536000000000000000e5 +1626 1 1 40 0.81920000000000000000e4 +1626 1 2 5 -0.81920000000000000000e4 +1626 1 2 9 0.32768000000000000000e5 +1626 1 2 33 0.32768000000000000000e5 +1626 1 3 34 -0.65536000000000000000e5 +1626 1 7 22 -0.16384000000000000000e5 +1626 1 7 38 0.16384000000000000000e5 +1626 1 8 23 -0.49152000000000000000e5 +1626 1 10 41 0.32768000000000000000e5 +1626 1 12 27 0.65536000000000000000e5 +1626 2 1 3 0.81920000000000000000e4 +1626 2 1 10 0.32768000000000000000e5 +1626 2 2 16 -0.81920000000000000000e4 +1626 2 6 20 -0.32768000000000000000e5 +1626 2 7 21 0.32768000000000000000e5 +1626 3 1 2 0.81920000000000000000e4 +1626 3 3 16 -0.81920000000000000000e4 +1626 3 4 17 -0.81920000000000000000e4 +1626 3 6 7 0.32768000000000000000e5 +1626 3 6 19 -0.16384000000000000000e5 +1626 3 7 20 0.32768000000000000000e5 +1626 3 8 21 0.32768000000000000000e5 +1626 4 1 5 0.16384000000000000000e5 +1626 4 1 13 -0.81920000000000000000e4 +1626 4 2 2 -0.16384000000000000000e5 +1626 4 2 14 -0.16384000000000000000e5 +1627 2 1 11 0.32768000000000000000e5 +1627 2 6 20 -0.32768000000000000000e5 +1627 4 5 5 -0.65536000000000000000e5 +1628 1 1 32 0.32768000000000000000e5 +1628 1 2 17 -0.13107200000000000000e6 +1628 1 3 18 -0.65536000000000000000e5 +1628 1 4 19 -0.13107200000000000000e6 +1628 1 10 41 -0.32768000000000000000e5 +1628 1 20 27 0.26214400000000000000e6 +1628 1 28 35 -0.13107200000000000000e6 +1628 2 1 12 0.32768000000000000000e5 +1628 2 4 10 -0.32768000000000000000e5 +1628 2 6 12 -0.65536000000000000000e5 +1628 2 10 24 -0.13107200000000000000e6 +1628 3 2 15 0.13107200000000000000e6 +1628 3 5 10 -0.32768000000000000000e5 +1628 3 6 7 0.32768000000000000000e5 +1628 3 8 13 0.13107200000000000000e6 +1628 3 8 21 -0.32768000000000000000e5 +1628 3 11 24 -0.13107200000000000000e6 +1629 1 1 8 0.81920000000000000000e4 +1629 1 1 16 0.32768000000000000000e5 +1629 1 1 40 0.40960000000000000000e4 +1629 1 2 5 -0.40960000000000000000e4 +1629 1 2 9 0.16384000000000000000e5 +1629 1 3 18 -0.65536000000000000000e5 +1629 1 3 34 -0.32768000000000000000e5 +1629 1 4 19 -0.65536000000000000000e5 +1629 1 4 35 -0.65536000000000000000e5 +1629 1 6 13 0.16384000000000000000e5 +1629 1 7 16 -0.65536000000000000000e5 +1629 1 7 22 -0.81920000000000000000e4 +1629 1 7 38 0.81920000000000000000e4 +1629 1 8 23 -0.24576000000000000000e5 +1629 1 10 41 0.16384000000000000000e5 +1629 1 11 42 0.16384000000000000000e5 +1629 1 12 27 0.32768000000000000000e5 +1629 1 18 25 -0.32768000000000000000e5 +1629 1 20 27 0.13107200000000000000e6 +1629 2 1 3 0.40960000000000000000e4 +1629 2 1 13 0.32768000000000000000e5 +1629 2 2 16 -0.40960000000000000000e4 +1629 2 4 10 -0.16384000000000000000e5 +1629 2 6 12 -0.32768000000000000000e5 +1629 2 7 21 0.16384000000000000000e5 +1629 2 8 22 0.16384000000000000000e5 +1629 2 9 23 -0.32768000000000000000e5 +1629 2 10 24 -0.65536000000000000000e5 +1629 3 1 2 0.40960000000000000000e4 +1629 3 2 15 0.65536000000000000000e5 +1629 3 3 16 -0.40960000000000000000e4 +1629 3 4 17 -0.40960000000000000000e4 +1629 3 6 7 0.16384000000000000000e5 +1629 3 6 19 -0.81920000000000000000e4 +1629 3 7 20 0.16384000000000000000e5 +1629 3 8 13 0.65536000000000000000e5 +1629 3 8 21 0.16384000000000000000e5 +1629 3 9 22 0.16384000000000000000e5 +1629 4 1 5 0.81920000000000000000e4 +1629 4 1 13 -0.40960000000000000000e4 +1629 4 2 2 -0.81920000000000000000e4 +1629 4 2 14 -0.81920000000000000000e4 +1629 4 4 8 0.16384000000000000000e5 +1629 4 5 5 0.32768000000000000000e5 +1630 1 1 8 0.81920000000000000000e4 +1630 1 1 40 0.40960000000000000000e4 +1630 1 2 5 -0.40960000000000000000e4 +1630 1 2 9 0.16384000000000000000e5 +1630 1 2 17 -0.32768000000000000000e5 +1630 1 3 18 -0.98304000000000000000e5 +1630 1 3 34 -0.32768000000000000000e5 +1630 1 4 19 -0.13107200000000000000e6 +1630 1 4 35 -0.65536000000000000000e5 +1630 1 6 13 0.16384000000000000000e5 +1630 1 7 22 -0.81920000000000000000e4 +1630 1 7 38 0.81920000000000000000e4 +1630 1 8 23 -0.24576000000000000000e5 +1630 1 10 41 0.16384000000000000000e5 +1630 1 11 42 0.16384000000000000000e5 +1630 1 12 27 0.32768000000000000000e5 +1630 1 13 16 -0.13107200000000000000e6 +1630 1 18 25 -0.32768000000000000000e5 +1630 1 20 27 0.39321600000000000000e6 +1630 1 28 35 -0.13107200000000000000e6 +1630 2 1 3 0.40960000000000000000e4 +1630 2 1 14 0.32768000000000000000e5 +1630 2 2 16 -0.40960000000000000000e4 +1630 2 4 10 -0.16384000000000000000e5 +1630 2 6 12 -0.65536000000000000000e5 +1630 2 7 13 0.65536000000000000000e5 +1630 2 7 21 0.16384000000000000000e5 +1630 2 8 22 0.16384000000000000000e5 +1630 2 9 23 -0.32768000000000000000e5 +1630 2 10 24 -0.19660800000000000000e6 +1630 3 1 2 0.40960000000000000000e4 +1630 3 2 15 0.19660800000000000000e6 +1630 3 3 16 -0.40960000000000000000e4 +1630 3 4 17 -0.40960000000000000000e4 +1630 3 6 7 0.16384000000000000000e5 +1630 3 6 19 -0.81920000000000000000e4 +1630 3 7 20 0.16384000000000000000e5 +1630 3 8 13 0.19660800000000000000e6 +1630 3 8 21 0.16384000000000000000e5 +1630 3 9 22 0.16384000000000000000e5 +1630 3 11 24 -0.13107200000000000000e6 +1630 4 1 5 0.81920000000000000000e4 +1630 4 1 13 -0.40960000000000000000e4 +1630 4 2 2 -0.81920000000000000000e4 +1630 4 2 14 -0.81920000000000000000e4 +1630 4 4 8 0.16384000000000000000e5 +1630 4 5 5 0.32768000000000000000e5 +1631 1 1 2 0.32768000000000000000e5 +1631 1 1 8 -0.65536000000000000000e5 +1631 1 1 32 -0.13107200000000000000e6 +1631 1 1 40 0.32768000000000000000e5 +1631 1 1 48 -0.32768000000000000000e5 +1631 1 2 5 -0.32768000000000000000e5 +1631 1 2 9 0.65536000000000000000e5 +1631 1 2 33 0.13107200000000000000e6 +1631 1 2 49 -0.32768000000000000000e5 +1631 1 3 34 -0.26214400000000000000e6 +1631 1 6 37 -0.32768000000000000000e5 +1631 1 7 22 -0.65536000000000000000e5 +1631 1 7 38 0.65536000000000000000e5 +1631 1 8 23 -0.19660800000000000000e6 +1631 1 8 39 0.65536000000000000000e5 +1631 1 10 41 0.13107200000000000000e6 +1631 1 12 27 0.26214400000000000000e6 +1631 1 23 38 -0.32768000000000000000e5 +1631 2 1 7 -0.65536000000000000000e5 +1631 2 1 16 0.32768000000000000000e5 +1631 2 2 16 -0.32768000000000000000e5 +1631 2 2 32 -0.32768000000000000000e5 +1631 2 3 17 0.32768000000000000000e5 +1631 2 4 26 -0.32768000000000000000e5 +1631 2 6 20 -0.13107200000000000000e6 +1631 2 7 21 0.13107200000000000000e6 +1631 3 1 2 0.32768000000000000000e5 +1631 3 1 30 -0.65536000000000000000e5 +1631 3 2 3 -0.32768000000000000000e5 +1631 3 3 16 -0.65536000000000000000e5 +1631 3 4 17 -0.32768000000000000000e5 +1631 3 6 19 -0.65536000000000000000e5 +1631 3 7 20 0.13107200000000000000e6 +1631 3 8 21 0.13107200000000000000e6 +1631 4 1 1 0.65536000000000000000e5 +1631 4 1 5 0.65536000000000000000e5 +1631 4 1 13 -0.65536000000000000000e5 +1631 4 2 2 -0.65536000000000000000e5 +1631 4 2 14 -0.65536000000000000000e5 +1632 2 1 17 0.32768000000000000000e5 +1632 2 2 16 -0.32768000000000000000e5 +1633 1 1 24 0.32768000000000000000e5 +1633 1 1 40 0.32768000000000000000e5 +1633 1 1 48 0.32768000000000000000e5 +1633 1 2 49 0.32768000000000000000e5 +1633 1 6 37 0.32768000000000000000e5 +1633 1 7 38 0.65536000000000000000e5 +1633 1 8 23 -0.13107200000000000000e6 +1633 1 8 39 -0.65536000000000000000e5 +1633 1 23 38 0.32768000000000000000e5 +1633 2 1 18 0.32768000000000000000e5 +1633 2 2 32 0.32768000000000000000e5 +1633 2 3 17 -0.32768000000000000000e5 +1633 2 4 26 0.32768000000000000000e5 +1633 3 1 30 0.65536000000000000000e5 +1633 3 4 17 -0.32768000000000000000e5 +1633 3 6 19 -0.65536000000000000000e5 +1633 3 7 20 0.13107200000000000000e6 +1633 4 2 14 -0.65536000000000000000e5 +1634 2 1 19 0.32768000000000000000e5 +1634 2 3 17 -0.32768000000000000000e5 +1635 2 1 7 -0.32768000000000000000e5 +1635 2 1 20 0.32768000000000000000e5 +1635 4 1 5 0.32768000000000000000e5 +1636 1 1 32 -0.13107200000000000000e6 +1636 1 1 48 0.16384000000000000000e5 +1636 1 2 33 0.65536000000000000000e5 +1636 1 2 49 0.16384000000000000000e5 +1636 1 3 34 -0.13107200000000000000e6 +1636 1 7 22 -0.32768000000000000000e5 +1636 1 7 38 0.32768000000000000000e5 +1636 1 8 23 -0.32768000000000000000e5 +1636 1 10 41 0.65536000000000000000e5 +1636 1 12 27 0.13107200000000000000e6 +1636 1 23 38 0.16384000000000000000e5 +1636 2 1 7 -0.32768000000000000000e5 +1636 2 1 21 0.32768000000000000000e5 +1636 2 2 32 0.16384000000000000000e5 +1636 2 6 20 -0.65536000000000000000e5 +1636 2 7 21 0.65536000000000000000e5 +1636 3 1 30 0.32768000000000000000e5 +1636 3 6 19 -0.32768000000000000000e5 +1636 3 7 20 0.65536000000000000000e5 +1636 3 8 21 0.65536000000000000000e5 +1636 4 1 5 0.32768000000000000000e5 +1636 4 2 14 -0.32768000000000000000e5 +1637 1 1 48 0.16384000000000000000e5 +1637 1 2 33 0.65536000000000000000e5 +1637 1 2 49 0.16384000000000000000e5 +1637 1 3 34 -0.13107200000000000000e6 +1637 1 7 38 0.32768000000000000000e5 +1637 1 8 39 0.32768000000000000000e5 +1637 1 10 41 0.65536000000000000000e5 +1637 1 23 38 0.16384000000000000000e5 +1637 2 1 22 0.32768000000000000000e5 +1637 2 2 32 0.16384000000000000000e5 +1637 2 7 21 0.65536000000000000000e5 +1637 3 1 30 0.32768000000000000000e5 +1637 3 7 20 0.65536000000000000000e5 +1637 3 8 21 0.65536000000000000000e5 +1637 4 2 14 -0.32768000000000000000e5 +1638 2 1 23 0.32768000000000000000e5 +1638 2 6 20 -0.32768000000000000000e5 +1639 1 1 32 0.32768000000000000000e5 +1639 1 2 17 -0.65536000000000000000e5 +1639 1 3 34 0.65536000000000000000e5 +1639 1 10 41 -0.32768000000000000000e5 +1639 2 1 24 0.32768000000000000000e5 +1639 2 7 21 -0.32768000000000000000e5 +1639 3 1 14 0.65536000000000000000e5 +1639 3 8 21 -0.32768000000000000000e5 +1640 1 2 17 0.32768000000000000000e5 +1640 1 3 34 0.32768000000000000000e5 +1640 1 12 27 0.32768000000000000000e5 +1640 1 16 31 -0.13107200000000000000e6 +1640 1 20 27 0.13107200000000000000e6 +1640 1 28 35 -0.65536000000000000000e5 +1640 2 1 25 0.32768000000000000000e5 +1640 2 7 13 0.65536000000000000000e5 +1640 2 10 24 -0.65536000000000000000e5 +1640 3 1 14 -0.32768000000000000000e5 +1640 3 11 24 -0.65536000000000000000e5 +1640 4 8 8 -0.13107200000000000000e6 +1641 2 1 26 0.32768000000000000000e5 +1641 2 16 16 -0.65536000000000000000e5 +1642 1 1 48 0.32768000000000000000e5 +1642 1 2 33 -0.13107200000000000000e6 +1642 1 3 34 0.26214400000000000000e6 +1642 1 3 50 0.65536000000000000000e5 +1642 1 5 52 -0.13107200000000000000e6 +1642 1 7 38 -0.65536000000000000000e5 +1642 1 8 39 -0.65536000000000000000e5 +1642 1 10 41 -0.13107200000000000000e6 +1642 1 11 42 0.13107200000000000000e6 +1642 1 12 43 0.26214400000000000000e6 +1642 1 16 47 -0.26214400000000000000e6 +1642 1 22 37 0.32768000000000000000e5 +1642 1 23 38 0.32768000000000000000e5 +1642 1 28 43 -0.13107200000000000000e6 +1642 2 1 27 0.32768000000000000000e5 +1642 2 7 21 -0.13107200000000000000e6 +1642 2 10 32 0.13107200000000000000e6 +1642 2 12 26 -0.13107200000000000000e6 +1642 3 1 30 -0.65536000000000000000e5 +1642 3 2 31 -0.13107200000000000000e6 +1642 3 7 20 -0.13107200000000000000e6 +1642 3 8 21 -0.13107200000000000000e6 +1642 3 14 27 -0.26214400000000000000e6 +1642 4 5 17 -0.65536000000000000000e5 +1642 4 7 19 0.13107200000000000000e6 +1642 4 11 11 -0.65536000000000000000e5 +1643 2 1 28 0.32768000000000000000e5 +1643 2 3 17 -0.32768000000000000000e5 +1643 4 1 13 0.32768000000000000000e5 +1644 1 1 24 -0.16384000000000000000e5 +1644 1 1 32 -0.65536000000000000000e5 +1644 1 1 40 -0.16384000000000000000e5 +1644 1 1 48 0.16384000000000000000e5 +1644 1 2 17 -0.13107200000000000000e6 +1644 1 2 33 -0.65536000000000000000e5 +1644 1 3 34 0.13107200000000000000e6 +1644 1 3 50 0.32768000000000000000e5 +1644 1 5 52 -0.65536000000000000000e5 +1644 1 6 37 -0.16384000000000000000e5 +1644 1 7 22 -0.32768000000000000000e5 +1644 1 7 38 0.32768000000000000000e5 +1644 1 8 23 -0.32768000000000000000e5 +1644 1 10 41 -0.65536000000000000000e5 +1644 1 11 42 0.13107200000000000000e6 +1644 1 12 27 0.13107200000000000000e6 +1644 1 12 43 0.26214400000000000000e6 +1644 1 16 47 -0.13107200000000000000e6 +1644 1 17 48 -0.13107200000000000000e6 +1644 1 22 37 0.16384000000000000000e5 +1644 1 23 38 0.16384000000000000000e5 +1644 1 28 43 -0.65536000000000000000e5 +1644 2 1 7 -0.32768000000000000000e5 +1644 2 1 29 0.32768000000000000000e5 +1644 2 1 31 0.65536000000000000000e5 +1644 2 2 16 -0.16384000000000000000e5 +1644 2 3 17 0.16384000000000000000e5 +1644 2 4 26 -0.16384000000000000000e5 +1644 2 6 20 -0.65536000000000000000e5 +1644 2 7 21 -0.65536000000000000000e5 +1644 2 8 22 0.65536000000000000000e5 +1644 2 10 32 0.65536000000000000000e5 +1644 2 12 26 -0.13107200000000000000e6 +1644 2 16 16 0.32768000000000000000e5 +1644 3 1 14 0.13107200000000000000e6 +1644 3 1 16 -0.16384000000000000000e5 +1644 3 1 30 -0.32768000000000000000e5 +1644 3 2 31 -0.65536000000000000000e5 +1644 3 3 16 -0.16384000000000000000e5 +1644 3 6 23 0.13107200000000000000e6 +1644 3 7 20 -0.13107200000000000000e6 +1644 3 8 21 -0.65536000000000000000e5 +1644 3 14 27 -0.26214400000000000000e6 +1644 4 1 5 0.32768000000000000000e5 +1644 4 1 13 -0.16384000000000000000e5 +1644 4 4 16 -0.65536000000000000000e5 +1644 4 5 17 -0.32768000000000000000e5 +1644 4 7 19 0.65536000000000000000e5 +1644 4 11 11 -0.32768000000000000000e5 +1645 1 1 48 0.16384000000000000000e5 +1645 1 2 33 0.65536000000000000000e5 +1645 1 2 49 0.16384000000000000000e5 +1645 1 3 34 -0.13107200000000000000e6 +1645 1 7 38 0.32768000000000000000e5 +1645 1 8 39 0.32768000000000000000e5 +1645 1 10 41 0.65536000000000000000e5 +1645 1 23 38 0.16384000000000000000e5 +1645 2 1 30 0.32768000000000000000e5 +1645 2 2 32 0.16384000000000000000e5 +1645 2 7 21 0.65536000000000000000e5 +1645 3 1 30 0.32768000000000000000e5 +1645 3 7 20 0.65536000000000000000e5 +1645 3 8 21 0.65536000000000000000e5 +1646 1 1 48 0.32768000000000000000e5 +1646 1 2 33 -0.13107200000000000000e6 +1646 1 3 34 0.26214400000000000000e6 +1646 1 3 50 0.65536000000000000000e5 +1646 1 5 52 -0.13107200000000000000e6 +1646 1 7 38 -0.65536000000000000000e5 +1646 1 8 39 -0.65536000000000000000e5 +1646 1 10 41 -0.13107200000000000000e6 +1646 1 11 42 0.13107200000000000000e6 +1646 1 12 43 0.26214400000000000000e6 +1646 1 16 47 -0.26214400000000000000e6 +1646 1 22 37 0.32768000000000000000e5 +1646 1 23 38 0.32768000000000000000e5 +1646 1 28 43 -0.13107200000000000000e6 +1646 2 1 32 0.32768000000000000000e5 +1646 2 7 21 -0.13107200000000000000e6 +1646 2 10 32 0.13107200000000000000e6 +1646 2 12 26 -0.13107200000000000000e6 +1646 3 1 30 -0.65536000000000000000e5 +1646 3 2 31 -0.13107200000000000000e6 +1646 3 7 20 -0.13107200000000000000e6 +1646 3 8 21 -0.13107200000000000000e6 +1646 3 14 27 -0.26214400000000000000e6 +1646 4 5 17 -0.65536000000000000000e5 +1646 4 7 19 0.13107200000000000000e6 +1647 2 1 33 0.32768000000000000000e5 +1647 2 2 32 -0.32768000000000000000e5 +1648 1 1 48 0.16384000000000000000e5 +1648 1 2 33 0.65536000000000000000e5 +1648 1 2 49 0.16384000000000000000e5 +1648 1 3 34 -0.13107200000000000000e6 +1648 1 7 38 0.32768000000000000000e5 +1648 1 8 39 0.32768000000000000000e5 +1648 1 10 41 0.65536000000000000000e5 +1648 1 23 38 0.16384000000000000000e5 +1648 2 1 34 0.32768000000000000000e5 +1648 2 2 32 0.16384000000000000000e5 +1648 2 7 21 0.65536000000000000000e5 +1648 3 1 30 0.32768000000000000000e5 +1648 3 7 20 0.65536000000000000000e5 +1648 3 8 21 0.65536000000000000000e5 +1648 4 5 17 0.32768000000000000000e5 +1649 2 1 3 -0.16384000000000000000e5 +1649 2 2 2 0.32768000000000000000e5 +1650 1 1 24 0.32768000000000000000e5 +1650 1 1 40 0.32768000000000000000e5 +1650 1 1 48 0.32768000000000000000e5 +1650 1 2 49 0.32768000000000000000e5 +1650 1 6 37 0.32768000000000000000e5 +1650 1 7 38 0.65536000000000000000e5 +1650 1 8 23 -0.13107200000000000000e6 +1650 1 8 39 -0.65536000000000000000e5 +1650 1 23 38 0.32768000000000000000e5 +1650 2 2 3 0.32768000000000000000e5 +1650 2 2 32 0.32768000000000000000e5 +1650 2 3 17 -0.32768000000000000000e5 +1650 2 4 26 0.32768000000000000000e5 +1650 3 1 30 0.65536000000000000000e5 +1650 3 4 17 -0.32768000000000000000e5 +1650 3 6 19 -0.65536000000000000000e5 +1650 3 7 20 0.13107200000000000000e6 +1650 4 2 2 -0.65536000000000000000e5 +1650 4 2 14 -0.65536000000000000000e5 +1651 1 1 40 -0.32768000000000000000e5 +1651 1 1 48 0.32768000000000000000e5 +1651 1 2 5 0.32768000000000000000e5 +1651 1 2 49 0.32768000000000000000e5 +1651 1 3 26 0.32768000000000000000e5 +1651 1 5 52 -0.13107200000000000000e6 +1651 1 6 37 -0.32768000000000000000e5 +1651 1 11 42 -0.13107200000000000000e6 +1651 1 12 43 -0.26214400000000000000e6 +1651 1 17 48 0.52428800000000000000e6 +1651 1 23 38 0.32768000000000000000e5 +1651 1 26 41 -0.65536000000000000000e5 +1651 1 28 43 -0.13107200000000000000e6 +1651 2 2 5 0.32768000000000000000e5 +1651 2 2 32 0.32768000000000000000e5 +1651 2 3 5 -0.32768000000000000000e5 +1651 2 3 9 -0.65536000000000000000e5 +1651 2 4 18 0.32768000000000000000e5 +1651 2 4 26 -0.32768000000000000000e5 +1651 2 8 22 -0.26214400000000000000e6 +1651 2 12 26 0.13107200000000000000e6 +1651 2 16 30 0.65536000000000000000e5 +1651 3 2 31 0.13107200000000000000e6 +1651 3 3 8 -0.13107200000000000000e6 +1651 3 4 5 -0.32768000000000000000e5 +1651 3 4 9 -0.65536000000000000000e5 +1651 3 4 17 0.32768000000000000000e5 +1651 3 5 10 0.13107200000000000000e6 +1651 3 6 19 -0.65536000000000000000e5 +1651 3 14 27 0.26214400000000000000e6 +1651 4 3 15 0.65536000000000000000e5 +1651 4 4 16 0.26214400000000000000e6 +1651 4 6 18 0.65536000000000000000e5 +1651 4 7 19 0.13107200000000000000e6 +1652 2 1 7 -0.32768000000000000000e5 +1652 2 2 6 0.32768000000000000000e5 +1653 1 1 32 -0.13107200000000000000e6 +1653 1 1 40 0.16384000000000000000e5 +1653 1 2 5 -0.16384000000000000000e5 +1653 1 2 9 0.32768000000000000000e5 +1653 1 2 17 -0.13107200000000000000e6 +1653 1 3 18 -0.26214400000000000000e6 +1653 1 3 34 -0.13107200000000000000e6 +1653 1 4 19 -0.26214400000000000000e6 +1653 1 4 35 -0.26214400000000000000e6 +1653 1 6 13 0.65536000000000000000e5 +1653 1 7 22 -0.32768000000000000000e5 +1653 1 7 38 0.32768000000000000000e5 +1653 1 8 23 -0.98304000000000000000e5 +1653 1 8 39 -0.32768000000000000000e5 +1653 1 10 41 0.65536000000000000000e5 +1653 1 11 42 0.65536000000000000000e5 +1653 1 12 27 0.13107200000000000000e6 +1653 1 18 25 -0.13107200000000000000e6 +1653 1 20 27 0.52428800000000000000e6 +1653 2 1 3 0.16384000000000000000e5 +1653 2 1 7 -0.32768000000000000000e5 +1653 2 2 7 0.32768000000000000000e5 +1653 2 2 8 -0.32768000000000000000e5 +1653 2 2 16 -0.16384000000000000000e5 +1653 2 4 10 -0.65536000000000000000e5 +1653 2 6 12 -0.13107200000000000000e6 +1653 2 6 20 -0.65536000000000000000e5 +1653 2 7 21 0.65536000000000000000e5 +1653 2 8 22 0.65536000000000000000e5 +1653 2 9 23 -0.13107200000000000000e6 +1653 2 10 24 -0.26214400000000000000e6 +1653 3 1 2 0.16384000000000000000e5 +1653 3 2 15 0.26214400000000000000e6 +1653 3 3 8 -0.32768000000000000000e5 +1653 3 3 16 -0.16384000000000000000e5 +1653 3 4 17 -0.16384000000000000000e5 +1653 3 6 7 -0.65536000000000000000e5 +1653 3 6 19 -0.65536000000000000000e5 +1653 3 7 20 0.65536000000000000000e5 +1653 3 8 13 0.26214400000000000000e6 +1653 3 8 21 0.65536000000000000000e5 +1653 3 9 22 0.65536000000000000000e5 +1653 4 1 5 0.32768000000000000000e5 +1653 4 1 13 -0.16384000000000000000e5 +1653 4 2 2 -0.32768000000000000000e5 +1653 4 2 14 -0.32768000000000000000e5 +1653 4 4 8 0.65536000000000000000e5 +1654 1 2 9 -0.32768000000000000000e5 +1654 1 2 17 -0.13107200000000000000e6 +1654 1 2 33 -0.13107200000000000000e6 +1654 1 3 18 -0.39321600000000000000e6 +1654 1 4 19 -0.26214400000000000000e6 +1654 1 4 35 -0.52428800000000000000e6 +1654 1 6 13 0.13107200000000000000e6 +1654 1 8 39 -0.32768000000000000000e5 +1654 1 10 25 -0.32768000000000000000e5 +1654 1 10 41 0.13107200000000000000e6 +1654 1 11 42 0.13107200000000000000e6 +1654 1 18 25 -0.26214400000000000000e6 +1654 1 20 27 0.52428800000000000000e6 +1654 1 28 35 0.26214400000000000000e6 +1654 2 2 8 -0.32768000000000000000e5 +1654 2 2 9 0.32768000000000000000e5 +1654 2 3 9 -0.32768000000000000000e5 +1654 2 4 10 -0.65536000000000000000e5 +1654 2 6 12 -0.13107200000000000000e6 +1654 2 8 22 0.13107200000000000000e6 +1654 2 9 23 -0.26214400000000000000e6 +1654 2 10 24 -0.26214400000000000000e6 +1654 3 2 15 0.26214400000000000000e6 +1654 3 3 8 -0.32768000000000000000e5 +1654 3 4 9 -0.32768000000000000000e5 +1654 3 5 10 0.13107200000000000000e6 +1654 3 6 19 -0.32768000000000000000e5 +1654 3 8 13 0.26214400000000000000e6 +1654 3 8 21 0.13107200000000000000e6 +1654 3 9 22 0.13107200000000000000e6 +1654 3 11 24 0.26214400000000000000e6 +1654 4 4 8 0.13107200000000000000e6 +1655 2 2 10 0.32768000000000000000e5 +1655 2 6 20 -0.32768000000000000000e5 +1655 4 5 5 -0.65536000000000000000e5 +1656 1 1 32 0.32768000000000000000e5 +1656 1 2 17 -0.13107200000000000000e6 +1656 1 3 18 -0.65536000000000000000e5 +1656 1 4 19 -0.13107200000000000000e6 +1656 1 10 41 -0.32768000000000000000e5 +1656 1 20 27 0.26214400000000000000e6 +1656 1 28 35 -0.13107200000000000000e6 +1656 2 2 11 0.32768000000000000000e5 +1656 2 4 10 -0.32768000000000000000e5 +1656 2 6 12 -0.65536000000000000000e5 +1656 2 10 24 -0.13107200000000000000e6 +1656 3 2 15 0.13107200000000000000e6 +1656 3 5 10 -0.32768000000000000000e5 +1656 3 6 7 0.32768000000000000000e5 +1656 3 8 13 0.13107200000000000000e6 +1656 3 8 21 -0.32768000000000000000e5 +1656 3 11 24 -0.13107200000000000000e6 +1657 2 2 12 0.32768000000000000000e5 +1657 2 4 10 -0.32768000000000000000e5 +1658 1 1 8 0.81920000000000000000e4 +1658 1 1 40 0.40960000000000000000e4 +1658 1 2 5 -0.40960000000000000000e4 +1658 1 2 9 0.16384000000000000000e5 +1658 1 2 17 -0.32768000000000000000e5 +1658 1 3 18 -0.98304000000000000000e5 +1658 1 3 34 -0.32768000000000000000e5 +1658 1 4 19 -0.13107200000000000000e6 +1658 1 4 35 -0.65536000000000000000e5 +1658 1 6 13 0.16384000000000000000e5 +1658 1 7 22 -0.81920000000000000000e4 +1658 1 7 38 0.81920000000000000000e4 +1658 1 8 23 -0.24576000000000000000e5 +1658 1 10 41 0.16384000000000000000e5 +1658 1 11 42 0.16384000000000000000e5 +1658 1 12 27 0.32768000000000000000e5 +1658 1 13 16 -0.13107200000000000000e6 +1658 1 18 25 -0.32768000000000000000e5 +1658 1 20 27 0.39321600000000000000e6 +1658 1 28 35 -0.13107200000000000000e6 +1658 2 1 3 0.40960000000000000000e4 +1658 2 2 13 0.32768000000000000000e5 +1658 2 2 16 -0.40960000000000000000e4 +1658 2 4 10 -0.16384000000000000000e5 +1658 2 6 12 -0.65536000000000000000e5 +1658 2 7 13 0.65536000000000000000e5 +1658 2 7 21 0.16384000000000000000e5 +1658 2 8 22 0.16384000000000000000e5 +1658 2 9 23 -0.32768000000000000000e5 +1658 2 10 24 -0.19660800000000000000e6 +1658 3 1 2 0.40960000000000000000e4 +1658 3 2 15 0.19660800000000000000e6 +1658 3 3 16 -0.40960000000000000000e4 +1658 3 4 17 -0.40960000000000000000e4 +1658 3 6 7 0.16384000000000000000e5 +1658 3 6 19 -0.81920000000000000000e4 +1658 3 7 20 0.16384000000000000000e5 +1658 3 8 13 0.19660800000000000000e6 +1658 3 8 21 0.16384000000000000000e5 +1658 3 9 22 0.16384000000000000000e5 +1658 3 11 24 -0.13107200000000000000e6 +1658 4 1 5 0.81920000000000000000e4 +1658 4 1 13 -0.40960000000000000000e4 +1658 4 2 2 -0.81920000000000000000e4 +1658 4 2 14 -0.81920000000000000000e4 +1658 4 4 8 0.16384000000000000000e5 +1658 4 5 5 0.32768000000000000000e5 +1659 2 2 14 0.32768000000000000000e5 +1659 2 6 12 -0.32768000000000000000e5 +1660 2 2 15 0.32768000000000000000e5 +1660 2 7 13 -0.32768000000000000000e5 +1661 1 1 24 0.32768000000000000000e5 +1661 1 1 40 0.32768000000000000000e5 +1661 1 1 48 0.32768000000000000000e5 +1661 1 2 49 0.32768000000000000000e5 +1661 1 6 37 0.32768000000000000000e5 +1661 1 7 38 0.65536000000000000000e5 +1661 1 8 23 -0.13107200000000000000e6 +1661 1 8 39 -0.65536000000000000000e5 +1661 1 23 38 0.32768000000000000000e5 +1661 2 2 17 0.32768000000000000000e5 +1661 2 2 32 0.32768000000000000000e5 +1661 2 3 17 -0.32768000000000000000e5 +1661 2 4 26 0.32768000000000000000e5 +1661 3 1 30 0.65536000000000000000e5 +1661 3 4 17 -0.32768000000000000000e5 +1661 3 6 19 -0.65536000000000000000e5 +1661 3 7 20 0.13107200000000000000e6 +1661 4 2 14 -0.65536000000000000000e5 +1662 2 2 18 0.32768000000000000000e5 +1662 2 3 17 -0.32768000000000000000e5 +1663 1 3 26 0.32768000000000000000e5 +1663 1 6 37 -0.32768000000000000000e5 +1663 1 7 38 0.65536000000000000000e5 +1663 1 8 23 -0.65536000000000000000e5 +1663 2 2 19 0.32768000000000000000e5 +1663 2 4 26 -0.32768000000000000000e5 +1663 3 3 16 -0.32768000000000000000e5 +1663 3 6 19 -0.13107200000000000000e6 +1663 3 7 20 0.13107200000000000000e6 +1663 4 1 13 -0.32768000000000000000e5 +1663 4 2 14 -0.65536000000000000000e5 +1664 1 1 32 -0.13107200000000000000e6 +1664 1 1 48 0.16384000000000000000e5 +1664 1 2 33 0.65536000000000000000e5 +1664 1 2 49 0.16384000000000000000e5 +1664 1 3 34 -0.13107200000000000000e6 +1664 1 7 22 -0.32768000000000000000e5 +1664 1 7 38 0.32768000000000000000e5 +1664 1 8 23 -0.32768000000000000000e5 +1664 1 10 41 0.65536000000000000000e5 +1664 1 12 27 0.13107200000000000000e6 +1664 1 23 38 0.16384000000000000000e5 +1664 2 1 7 -0.32768000000000000000e5 +1664 2 2 20 0.32768000000000000000e5 +1664 2 2 32 0.16384000000000000000e5 +1664 2 6 20 -0.65536000000000000000e5 +1664 2 7 21 0.65536000000000000000e5 +1664 3 1 30 0.32768000000000000000e5 +1664 3 6 19 -0.32768000000000000000e5 +1664 3 7 20 0.65536000000000000000e5 +1664 3 8 21 0.65536000000000000000e5 +1664 4 1 5 0.32768000000000000000e5 +1664 4 2 14 -0.32768000000000000000e5 +1665 1 1 48 0.16384000000000000000e5 +1665 1 2 33 0.65536000000000000000e5 +1665 1 2 49 0.16384000000000000000e5 +1665 1 3 34 -0.13107200000000000000e6 +1665 1 7 38 0.32768000000000000000e5 +1665 1 8 39 0.32768000000000000000e5 +1665 1 10 41 0.65536000000000000000e5 +1665 1 23 38 0.16384000000000000000e5 +1665 2 2 21 0.32768000000000000000e5 +1665 2 2 32 0.16384000000000000000e5 +1665 2 7 21 0.65536000000000000000e5 +1665 3 1 30 0.32768000000000000000e5 +1665 3 7 20 0.65536000000000000000e5 +1665 3 8 21 0.65536000000000000000e5 +1665 4 2 14 -0.32768000000000000000e5 +1666 1 2 33 -0.65536000000000000000e5 +1666 1 5 52 0.65536000000000000000e5 +1666 1 7 38 0.32768000000000000000e5 +1666 1 8 23 -0.32768000000000000000e5 +1666 1 10 25 -0.32768000000000000000e5 +1666 1 10 41 0.65536000000000000000e5 +1666 1 11 42 0.65536000000000000000e5 +1666 1 12 43 0.13107200000000000000e6 +1666 1 17 48 -0.26214400000000000000e6 +1666 1 26 41 0.32768000000000000000e5 +1666 1 28 43 0.65536000000000000000e5 +1666 2 2 22 0.32768000000000000000e5 +1666 2 8 22 0.13107200000000000000e6 +1666 2 12 26 -0.65536000000000000000e5 +1666 2 16 30 -0.32768000000000000000e5 +1666 3 1 30 0.32768000000000000000e5 +1666 3 2 31 -0.65536000000000000000e5 +1666 3 6 19 -0.32768000000000000000e5 +1666 3 7 20 0.65536000000000000000e5 +1666 3 8 21 0.65536000000000000000e5 +1666 3 14 27 -0.13107200000000000000e6 +1666 4 2 14 -0.32768000000000000000e5 +1666 4 3 15 -0.32768000000000000000e5 +1666 4 4 16 -0.13107200000000000000e6 +1666 4 6 18 -0.32768000000000000000e5 +1666 4 7 19 -0.65536000000000000000e5 +1667 1 1 32 0.32768000000000000000e5 +1667 1 2 17 -0.65536000000000000000e5 +1667 1 3 34 0.65536000000000000000e5 +1667 1 10 41 -0.32768000000000000000e5 +1667 2 2 23 0.32768000000000000000e5 +1667 2 7 21 -0.32768000000000000000e5 +1667 3 1 14 0.65536000000000000000e5 +1667 3 8 21 -0.32768000000000000000e5 +1668 2 2 24 0.32768000000000000000e5 +1668 2 7 21 -0.32768000000000000000e5 +1669 1 2 17 0.32768000000000000000e5 +1669 1 3 34 0.32768000000000000000e5 +1669 1 4 19 0.65536000000000000000e5 +1669 1 4 35 -0.32768000000000000000e5 +1669 1 18 25 -0.32768000000000000000e5 +1669 1 20 27 -0.13107200000000000000e6 +1669 1 28 35 0.13107200000000000000e6 +1669 2 2 25 0.32768000000000000000e5 +1669 2 9 23 -0.32768000000000000000e5 +1669 2 10 24 0.65536000000000000000e5 +1669 3 1 14 -0.32768000000000000000e5 +1669 3 8 13 -0.65536000000000000000e5 +1669 3 11 24 0.13107200000000000000e6 +1670 1 1 48 0.32768000000000000000e5 +1670 1 2 33 -0.13107200000000000000e6 +1670 1 3 34 0.26214400000000000000e6 +1670 1 3 50 0.65536000000000000000e5 +1670 1 5 52 -0.13107200000000000000e6 +1670 1 7 38 -0.65536000000000000000e5 +1670 1 8 39 -0.65536000000000000000e5 +1670 1 10 41 -0.13107200000000000000e6 +1670 1 11 42 0.13107200000000000000e6 +1670 1 12 43 0.26214400000000000000e6 +1670 1 16 47 -0.26214400000000000000e6 +1670 1 22 37 0.32768000000000000000e5 +1670 1 23 38 0.32768000000000000000e5 +1670 1 28 43 -0.13107200000000000000e6 +1670 2 2 26 0.32768000000000000000e5 +1670 2 7 21 -0.13107200000000000000e6 +1670 2 10 32 0.13107200000000000000e6 +1670 2 12 26 -0.13107200000000000000e6 +1670 3 1 30 -0.65536000000000000000e5 +1670 3 2 31 -0.13107200000000000000e6 +1670 3 7 20 -0.13107200000000000000e6 +1670 3 8 21 -0.13107200000000000000e6 +1670 3 14 27 -0.26214400000000000000e6 +1670 4 5 17 -0.65536000000000000000e5 +1670 4 7 19 0.13107200000000000000e6 +1670 4 11 11 -0.65536000000000000000e5 +1671 2 2 27 0.32768000000000000000e5 +1671 2 3 17 -0.32768000000000000000e5 +1671 4 1 13 0.32768000000000000000e5 +1672 2 2 28 0.32768000000000000000e5 +1672 2 4 26 -0.32768000000000000000e5 +1673 1 1 48 0.16384000000000000000e5 +1673 1 2 33 0.65536000000000000000e5 +1673 1 2 49 0.16384000000000000000e5 +1673 1 3 34 -0.13107200000000000000e6 +1673 1 7 38 0.32768000000000000000e5 +1673 1 8 39 0.32768000000000000000e5 +1673 1 10 41 0.65536000000000000000e5 +1673 1 23 38 0.16384000000000000000e5 +1673 2 2 29 0.32768000000000000000e5 +1673 2 2 32 0.16384000000000000000e5 +1673 2 7 21 0.65536000000000000000e5 +1673 3 1 30 0.32768000000000000000e5 +1673 3 7 20 0.65536000000000000000e5 +1673 3 8 21 0.65536000000000000000e5 +1674 1 5 52 0.65536000000000000000e5 +1674 1 9 40 -0.32768000000000000000e5 +1674 1 10 41 0.65536000000000000000e5 +1674 1 17 48 -0.13107200000000000000e6 +1674 1 26 41 0.32768000000000000000e5 +1674 1 28 43 0.65536000000000000000e5 +1674 2 2 30 0.32768000000000000000e5 +1674 2 8 22 0.65536000000000000000e5 +1674 2 16 30 -0.32768000000000000000e5 +1674 3 1 30 0.32768000000000000000e5 +1674 3 2 31 -0.65536000000000000000e5 +1674 4 4 16 -0.65536000000000000000e5 +1674 4 6 18 -0.32768000000000000000e5 +1674 4 7 19 -0.65536000000000000000e5 +1675 1 2 33 -0.32768000000000000000e5 +1675 1 3 34 0.65536000000000000000e5 +1675 1 11 42 0.32768000000000000000e5 +1675 1 12 43 0.65536000000000000000e5 +1675 1 16 47 -0.65536000000000000000e5 +1675 1 17 48 -0.65536000000000000000e5 +1675 2 2 31 0.32768000000000000000e5 +1675 2 7 21 -0.32768000000000000000e5 +1675 2 8 22 0.32768000000000000000e5 +1675 2 12 26 -0.32768000000000000000e5 +1675 3 7 20 -0.32768000000000000000e5 +1675 3 8 21 -0.32768000000000000000e5 +1675 3 13 26 -0.65536000000000000000e5 +1675 3 14 27 -0.65536000000000000000e5 +1675 4 4 16 -0.32768000000000000000e5 +1676 1 2 49 0.32768000000000000000e5 +1676 1 3 50 -0.65536000000000000000e5 +1676 1 23 38 0.32768000000000000000e5 +1676 1 24 39 0.32768000000000000000e5 +1676 2 2 33 0.32768000000000000000e5 +1677 2 2 34 0.32768000000000000000e5 +1677 2 16 30 -0.32768000000000000000e5 +1678 2 2 35 0.32768000000000000000e5 +1678 2 26 32 -0.32768000000000000000e5 +1678 4 17 17 -0.65536000000000000000e5 +1679 2 2 4 -0.16384000000000000000e5 +1679 2 3 3 0.32768000000000000000e5 +1680 1 1 40 -0.32768000000000000000e5 +1680 1 1 48 0.32768000000000000000e5 +1680 1 2 5 0.32768000000000000000e5 +1680 1 2 49 0.32768000000000000000e5 +1680 1 3 26 0.32768000000000000000e5 +1680 1 5 52 -0.13107200000000000000e6 +1680 1 6 37 -0.32768000000000000000e5 +1680 1 11 42 -0.13107200000000000000e6 +1680 1 12 43 -0.26214400000000000000e6 +1680 1 17 48 0.52428800000000000000e6 +1680 1 23 38 0.32768000000000000000e5 +1680 1 26 41 -0.65536000000000000000e5 +1680 1 28 43 -0.13107200000000000000e6 +1680 2 2 32 0.32768000000000000000e5 +1680 2 3 4 0.32768000000000000000e5 +1680 2 3 5 -0.32768000000000000000e5 +1680 2 3 9 -0.65536000000000000000e5 +1680 2 4 18 0.32768000000000000000e5 +1680 2 4 26 -0.32768000000000000000e5 +1680 2 8 22 -0.26214400000000000000e6 +1680 2 12 26 0.13107200000000000000e6 +1680 2 16 30 0.65536000000000000000e5 +1680 3 2 31 0.13107200000000000000e6 +1680 3 3 8 -0.13107200000000000000e6 +1680 3 4 5 -0.32768000000000000000e5 +1680 3 4 9 -0.65536000000000000000e5 +1680 3 4 17 0.32768000000000000000e5 +1680 3 5 10 0.13107200000000000000e6 +1680 3 6 19 -0.65536000000000000000e5 +1680 3 14 27 0.26214400000000000000e6 +1680 4 3 15 0.65536000000000000000e5 +1680 4 4 16 0.26214400000000000000e6 +1680 4 6 18 0.65536000000000000000e5 +1680 4 7 19 0.13107200000000000000e6 +1681 1 1 32 -0.13107200000000000000e6 +1681 1 1 40 0.16384000000000000000e5 +1681 1 2 5 -0.16384000000000000000e5 +1681 1 2 9 0.32768000000000000000e5 +1681 1 2 17 -0.13107200000000000000e6 +1681 1 3 18 -0.26214400000000000000e6 +1681 1 3 34 -0.13107200000000000000e6 +1681 1 4 19 -0.26214400000000000000e6 +1681 1 4 35 -0.26214400000000000000e6 +1681 1 6 13 0.65536000000000000000e5 +1681 1 7 22 -0.32768000000000000000e5 +1681 1 7 38 0.32768000000000000000e5 +1681 1 8 23 -0.98304000000000000000e5 +1681 1 8 39 -0.32768000000000000000e5 +1681 1 10 41 0.65536000000000000000e5 +1681 1 11 42 0.65536000000000000000e5 +1681 1 12 27 0.13107200000000000000e6 +1681 1 18 25 -0.13107200000000000000e6 +1681 1 20 27 0.52428800000000000000e6 +1681 2 1 3 0.16384000000000000000e5 +1681 2 1 7 -0.32768000000000000000e5 +1681 2 2 8 -0.32768000000000000000e5 +1681 2 2 16 -0.16384000000000000000e5 +1681 2 3 6 0.32768000000000000000e5 +1681 2 4 10 -0.65536000000000000000e5 +1681 2 6 12 -0.13107200000000000000e6 +1681 2 6 20 -0.65536000000000000000e5 +1681 2 7 21 0.65536000000000000000e5 +1681 2 8 22 0.65536000000000000000e5 +1681 2 9 23 -0.13107200000000000000e6 +1681 2 10 24 -0.26214400000000000000e6 +1681 3 1 2 0.16384000000000000000e5 +1681 3 2 15 0.26214400000000000000e6 +1681 3 3 8 -0.32768000000000000000e5 +1681 3 3 16 -0.16384000000000000000e5 +1681 3 4 17 -0.16384000000000000000e5 +1681 3 6 7 -0.65536000000000000000e5 +1681 3 6 19 -0.65536000000000000000e5 +1681 3 7 20 0.65536000000000000000e5 +1681 3 8 13 0.26214400000000000000e6 +1681 3 8 21 0.65536000000000000000e5 +1681 3 9 22 0.65536000000000000000e5 +1681 4 1 5 0.32768000000000000000e5 +1681 4 1 13 -0.16384000000000000000e5 +1681 4 2 2 -0.32768000000000000000e5 +1681 4 2 14 -0.32768000000000000000e5 +1681 4 4 8 0.65536000000000000000e5 +1682 2 2 8 -0.32768000000000000000e5 +1682 2 3 7 0.32768000000000000000e5 +1683 1 2 9 -0.32768000000000000000e5 +1683 1 2 17 -0.13107200000000000000e6 +1683 1 2 33 -0.13107200000000000000e6 +1683 1 3 18 -0.39321600000000000000e6 +1683 1 4 19 -0.26214400000000000000e6 +1683 1 4 35 -0.52428800000000000000e6 +1683 1 6 13 0.13107200000000000000e6 +1683 1 8 39 -0.32768000000000000000e5 +1683 1 10 25 -0.32768000000000000000e5 +1683 1 10 41 0.13107200000000000000e6 +1683 1 11 42 0.13107200000000000000e6 +1683 1 18 25 -0.26214400000000000000e6 +1683 1 20 27 0.52428800000000000000e6 +1683 1 28 35 0.26214400000000000000e6 +1683 2 2 8 -0.32768000000000000000e5 +1683 2 3 8 0.32768000000000000000e5 +1683 2 3 9 -0.32768000000000000000e5 +1683 2 4 10 -0.65536000000000000000e5 +1683 2 6 12 -0.13107200000000000000e6 +1683 2 8 22 0.13107200000000000000e6 +1683 2 9 23 -0.26214400000000000000e6 +1683 2 10 24 -0.26214400000000000000e6 +1683 3 2 15 0.26214400000000000000e6 +1683 3 3 8 -0.32768000000000000000e5 +1683 3 4 9 -0.32768000000000000000e5 +1683 3 5 10 0.13107200000000000000e6 +1683 3 6 19 -0.32768000000000000000e5 +1683 3 8 13 0.26214400000000000000e6 +1683 3 8 21 0.13107200000000000000e6 +1683 3 9 22 0.13107200000000000000e6 +1683 3 11 24 0.26214400000000000000e6 +1683 4 4 8 0.13107200000000000000e6 +1684 1 1 32 0.32768000000000000000e5 +1684 1 2 17 -0.13107200000000000000e6 +1684 1 3 18 -0.65536000000000000000e5 +1684 1 4 19 -0.13107200000000000000e6 +1684 1 10 41 -0.32768000000000000000e5 +1684 1 20 27 0.26214400000000000000e6 +1684 1 28 35 -0.13107200000000000000e6 +1684 2 3 10 0.32768000000000000000e5 +1684 2 4 10 -0.32768000000000000000e5 +1684 2 6 12 -0.65536000000000000000e5 +1684 2 10 24 -0.13107200000000000000e6 +1684 3 2 15 0.13107200000000000000e6 +1684 3 5 10 -0.32768000000000000000e5 +1684 3 6 7 0.32768000000000000000e5 +1684 3 8 13 0.13107200000000000000e6 +1684 3 8 21 -0.32768000000000000000e5 +1684 3 11 24 -0.13107200000000000000e6 +1685 2 3 11 0.32768000000000000000e5 +1685 2 4 10 -0.32768000000000000000e5 +1686 1 2 33 0.32768000000000000000e5 +1686 1 4 35 0.13107200000000000000e6 +1686 1 11 42 -0.32768000000000000000e5 +1686 1 18 25 0.65536000000000000000e5 +1686 1 28 35 -0.13107200000000000000e6 +1686 2 3 12 0.32768000000000000000e5 +1686 2 8 22 -0.32768000000000000000e5 +1686 2 9 23 0.65536000000000000000e5 +1686 3 9 22 -0.32768000000000000000e5 +1686 3 11 24 -0.13107200000000000000e6 +1686 4 4 8 -0.32768000000000000000e5 +1687 2 3 13 0.32768000000000000000e5 +1687 2 6 12 -0.32768000000000000000e5 +1688 1 2 17 -0.32768000000000000000e5 +1688 1 3 18 -0.32768000000000000000e5 +1688 1 4 19 -0.13107200000000000000e6 +1688 1 10 17 0.65536000000000000000e5 +1688 1 11 14 -0.32768000000000000000e5 +1688 1 20 27 0.13107200000000000000e6 +1688 1 28 35 -0.65536000000000000000e5 +1688 2 3 14 0.32768000000000000000e5 +1688 2 6 12 -0.32768000000000000000e5 +1688 2 9 11 -0.32768000000000000000e5 +1688 2 10 24 -0.65536000000000000000e5 +1688 3 2 15 0.65536000000000000000e5 +1688 3 8 13 0.65536000000000000000e5 +1688 3 11 24 -0.65536000000000000000e5 +1689 2 3 15 0.32768000000000000000e5 +1689 2 10 24 -0.32768000000000000000e5 +1689 4 6 10 -0.32768000000000000000e5 +1690 1 1 24 0.32768000000000000000e5 +1690 1 1 40 0.32768000000000000000e5 +1690 1 1 48 0.32768000000000000000e5 +1690 1 2 49 0.32768000000000000000e5 +1690 1 6 37 0.32768000000000000000e5 +1690 1 7 38 0.65536000000000000000e5 +1690 1 8 23 -0.13107200000000000000e6 +1690 1 8 39 -0.65536000000000000000e5 +1690 1 23 38 0.32768000000000000000e5 +1690 2 2 32 0.32768000000000000000e5 +1690 2 3 16 0.32768000000000000000e5 +1690 2 3 17 -0.32768000000000000000e5 +1690 2 4 26 0.32768000000000000000e5 +1690 3 1 30 0.65536000000000000000e5 +1690 3 4 17 -0.32768000000000000000e5 +1690 3 6 19 -0.65536000000000000000e5 +1690 3 7 20 0.13107200000000000000e6 +1690 4 2 14 -0.65536000000000000000e5 +1691 1 3 26 0.32768000000000000000e5 +1691 1 6 37 -0.32768000000000000000e5 +1691 1 7 38 0.65536000000000000000e5 +1691 1 8 23 -0.65536000000000000000e5 +1691 2 3 18 0.32768000000000000000e5 +1691 2 4 26 -0.32768000000000000000e5 +1691 3 3 16 -0.32768000000000000000e5 +1691 3 6 19 -0.13107200000000000000e6 +1691 3 7 20 0.13107200000000000000e6 +1691 4 1 13 -0.32768000000000000000e5 +1691 4 2 14 -0.65536000000000000000e5 +1692 2 3 19 0.32768000000000000000e5 +1692 2 4 18 -0.32768000000000000000e5 +1693 1 1 48 0.16384000000000000000e5 +1693 1 2 33 0.65536000000000000000e5 +1693 1 2 49 0.16384000000000000000e5 +1693 1 3 34 -0.13107200000000000000e6 +1693 1 7 38 0.32768000000000000000e5 +1693 1 8 39 0.32768000000000000000e5 +1693 1 10 41 0.65536000000000000000e5 +1693 1 23 38 0.16384000000000000000e5 +1693 2 2 32 0.16384000000000000000e5 +1693 2 3 20 0.32768000000000000000e5 +1693 2 7 21 0.65536000000000000000e5 +1693 3 1 30 0.32768000000000000000e5 +1693 3 7 20 0.65536000000000000000e5 +1693 3 8 21 0.65536000000000000000e5 +1693 4 2 14 -0.32768000000000000000e5 +1694 1 2 33 -0.65536000000000000000e5 +1694 1 5 52 0.65536000000000000000e5 +1694 1 7 38 0.32768000000000000000e5 +1694 1 8 23 -0.32768000000000000000e5 +1694 1 10 25 -0.32768000000000000000e5 +1694 1 10 41 0.65536000000000000000e5 +1694 1 11 42 0.65536000000000000000e5 +1694 1 12 43 0.13107200000000000000e6 +1694 1 17 48 -0.26214400000000000000e6 +1694 1 26 41 0.32768000000000000000e5 +1694 1 28 43 0.65536000000000000000e5 +1694 2 3 21 0.32768000000000000000e5 +1694 2 8 22 0.13107200000000000000e6 +1694 2 12 26 -0.65536000000000000000e5 +1694 2 16 30 -0.32768000000000000000e5 +1694 3 1 30 0.32768000000000000000e5 +1694 3 2 31 -0.65536000000000000000e5 +1694 3 6 19 -0.32768000000000000000e5 +1694 3 7 20 0.65536000000000000000e5 +1694 3 8 21 0.65536000000000000000e5 +1694 3 14 27 -0.13107200000000000000e6 +1694 4 2 14 -0.32768000000000000000e5 +1694 4 3 15 -0.32768000000000000000e5 +1694 4 4 16 -0.13107200000000000000e6 +1694 4 6 18 -0.32768000000000000000e5 +1694 4 7 19 -0.65536000000000000000e5 +1695 1 1 48 -0.16384000000000000000e5 +1695 1 2 49 -0.16384000000000000000e5 +1695 1 5 52 0.65536000000000000000e5 +1695 1 11 42 0.65536000000000000000e5 +1695 1 12 43 0.13107200000000000000e6 +1695 1 17 48 -0.26214400000000000000e6 +1695 1 23 38 -0.16384000000000000000e5 +1695 1 26 41 0.32768000000000000000e5 +1695 1 28 43 0.65536000000000000000e5 +1695 2 2 32 -0.16384000000000000000e5 +1695 2 3 22 0.32768000000000000000e5 +1695 2 8 22 0.13107200000000000000e6 +1695 2 12 26 -0.65536000000000000000e5 +1695 2 16 30 -0.32768000000000000000e5 +1695 3 2 31 -0.65536000000000000000e5 +1695 3 14 27 -0.13107200000000000000e6 +1695 4 3 15 -0.32768000000000000000e5 +1695 4 4 16 -0.13107200000000000000e6 +1695 4 6 18 -0.32768000000000000000e5 +1695 4 7 19 -0.65536000000000000000e5 +1696 2 3 23 0.32768000000000000000e5 +1696 2 7 21 -0.32768000000000000000e5 +1697 1 2 33 0.32768000000000000000e5 +1697 1 4 35 0.13107200000000000000e6 +1697 1 11 42 -0.32768000000000000000e5 +1697 1 18 25 0.65536000000000000000e5 +1697 1 28 35 -0.13107200000000000000e6 +1697 2 3 24 0.32768000000000000000e5 +1697 2 8 22 -0.32768000000000000000e5 +1697 2 9 23 0.65536000000000000000e5 +1697 3 9 22 -0.32768000000000000000e5 +1697 3 11 24 -0.13107200000000000000e6 +1698 1 3 34 0.32768000000000000000e5 +1698 1 4 19 -0.65536000000000000000e5 +1698 1 18 25 -0.32768000000000000000e5 +1698 1 28 35 0.65536000000000000000e5 +1698 2 3 25 0.32768000000000000000e5 +1698 2 9 23 -0.32768000000000000000e5 +1698 3 8 13 0.65536000000000000000e5 +1698 3 11 24 0.65536000000000000000e5 +1699 2 3 17 -0.32768000000000000000e5 +1699 2 3 26 0.32768000000000000000e5 +1699 4 1 13 0.32768000000000000000e5 +1700 2 3 27 0.32768000000000000000e5 +1700 2 4 26 -0.32768000000000000000e5 +1701 1 3 26 -0.32768000000000000000e5 +1701 1 6 37 0.32768000000000000000e5 +1701 1 9 40 0.65536000000000000000e5 +1701 1 10 25 -0.65536000000000000000e5 +1701 2 3 28 0.32768000000000000000e5 +1701 2 4 18 -0.32768000000000000000e5 +1701 3 4 17 -0.32768000000000000000e5 +1701 3 5 18 -0.32768000000000000000e5 +1701 3 6 19 -0.65536000000000000000e5 +1701 3 8 21 0.13107200000000000000e6 +1701 4 3 15 -0.65536000000000000000e5 +1702 1 5 52 0.65536000000000000000e5 +1702 1 9 40 -0.32768000000000000000e5 +1702 1 10 41 0.65536000000000000000e5 +1702 1 17 48 -0.13107200000000000000e6 +1702 1 26 41 0.32768000000000000000e5 +1702 1 28 43 0.65536000000000000000e5 +1702 2 3 29 0.32768000000000000000e5 +1702 2 8 22 0.65536000000000000000e5 +1702 2 16 30 -0.32768000000000000000e5 +1702 3 1 30 0.32768000000000000000e5 +1702 3 2 31 -0.65536000000000000000e5 +1702 4 4 16 -0.65536000000000000000e5 +1702 4 6 18 -0.32768000000000000000e5 +1702 4 7 19 -0.65536000000000000000e5 +1703 1 1 48 -0.16384000000000000000e5 +1703 1 2 49 -0.16384000000000000000e5 +1703 1 5 52 0.65536000000000000000e5 +1703 1 11 42 0.65536000000000000000e5 +1703 1 12 43 0.13107200000000000000e6 +1703 1 17 48 -0.26214400000000000000e6 +1703 1 23 38 -0.16384000000000000000e5 +1703 1 26 41 0.32768000000000000000e5 +1703 1 28 43 0.65536000000000000000e5 +1703 2 2 32 -0.16384000000000000000e5 +1703 2 3 30 0.32768000000000000000e5 +1703 2 8 22 0.13107200000000000000e6 +1703 2 12 26 -0.65536000000000000000e5 +1703 2 16 30 -0.32768000000000000000e5 +1703 3 2 31 -0.65536000000000000000e5 +1703 3 14 27 -0.13107200000000000000e6 +1703 4 4 16 -0.13107200000000000000e6 +1703 4 6 18 -0.32768000000000000000e5 +1703 4 7 19 -0.65536000000000000000e5 +1704 2 3 31 0.32768000000000000000e5 +1704 2 12 26 -0.32768000000000000000e5 +1705 1 2 49 0.32768000000000000000e5 +1705 1 3 50 -0.65536000000000000000e5 +1705 1 23 38 0.32768000000000000000e5 +1705 1 24 39 0.32768000000000000000e5 +1705 2 3 32 0.32768000000000000000e5 +1706 1 1 48 -0.16384000000000000000e5 +1706 1 2 49 -0.16384000000000000000e5 +1706 1 5 52 0.65536000000000000000e5 +1706 1 11 42 0.65536000000000000000e5 +1706 1 12 43 0.13107200000000000000e6 +1706 1 17 48 -0.26214400000000000000e6 +1706 1 23 38 -0.16384000000000000000e5 +1706 1 26 41 0.32768000000000000000e5 +1706 1 28 43 0.65536000000000000000e5 +1706 2 2 32 -0.16384000000000000000e5 +1706 2 3 34 0.32768000000000000000e5 +1706 2 8 22 0.13107200000000000000e6 +1706 2 12 26 -0.65536000000000000000e5 +1706 2 16 30 -0.32768000000000000000e5 +1706 3 2 31 -0.65536000000000000000e5 +1706 3 14 27 -0.13107200000000000000e6 +1706 4 4 16 -0.13107200000000000000e6 +1706 4 7 19 -0.65536000000000000000e5 +1707 2 3 35 0.32768000000000000000e5 +1707 2 18 32 -0.32768000000000000000e5 +1708 2 3 5 -0.16384000000000000000e5 +1708 2 4 4 0.32768000000000000000e5 +1709 1 1 40 0.32768000000000000000e5 +1709 1 1 48 -0.32768000000000000000e5 +1709 1 2 49 -0.32768000000000000000e5 +1709 1 5 52 0.13107200000000000000e6 +1709 1 6 25 0.32768000000000000000e5 +1709 1 6 37 0.32768000000000000000e5 +1709 1 8 39 -0.13107200000000000000e6 +1709 1 10 25 -0.13107200000000000000e6 +1709 1 10 41 0.13107200000000000000e6 +1709 1 11 42 0.13107200000000000000e6 +1709 1 12 43 0.26214400000000000000e6 +1709 1 17 48 -0.52428800000000000000e6 +1709 1 23 38 -0.32768000000000000000e5 +1709 1 26 41 0.65536000000000000000e5 +1709 1 28 43 0.13107200000000000000e6 +1709 2 2 32 -0.32768000000000000000e5 +1709 2 4 5 0.32768000000000000000e5 +1709 2 4 18 -0.32768000000000000000e5 +1709 2 4 26 0.32768000000000000000e5 +1709 2 8 22 0.26214400000000000000e6 +1709 2 12 26 -0.13107200000000000000e6 +1709 2 16 30 -0.65536000000000000000e5 +1709 3 2 31 -0.13107200000000000000e6 +1709 3 4 17 -0.32768000000000000000e5 +1709 3 6 19 -0.65536000000000000000e5 +1709 3 8 21 0.13107200000000000000e6 +1709 3 14 27 -0.26214400000000000000e6 +1709 4 3 15 -0.65536000000000000000e5 +1709 4 4 4 -0.65536000000000000000e5 +1709 4 4 16 -0.26214400000000000000e6 +1709 4 6 18 -0.65536000000000000000e5 +1709 4 7 19 -0.13107200000000000000e6 +1710 2 2 8 -0.32768000000000000000e5 +1710 2 4 6 0.32768000000000000000e5 +1711 1 2 9 -0.32768000000000000000e5 +1711 1 2 17 -0.13107200000000000000e6 +1711 1 2 33 -0.13107200000000000000e6 +1711 1 3 18 -0.39321600000000000000e6 +1711 1 4 19 -0.26214400000000000000e6 +1711 1 4 35 -0.52428800000000000000e6 +1711 1 6 13 0.13107200000000000000e6 +1711 1 8 39 -0.32768000000000000000e5 +1711 1 10 25 -0.32768000000000000000e5 +1711 1 10 41 0.13107200000000000000e6 +1711 1 11 42 0.13107200000000000000e6 +1711 1 18 25 -0.26214400000000000000e6 +1711 1 20 27 0.52428800000000000000e6 +1711 1 28 35 0.26214400000000000000e6 +1711 2 2 8 -0.32768000000000000000e5 +1711 2 3 9 -0.32768000000000000000e5 +1711 2 4 7 0.32768000000000000000e5 +1711 2 4 10 -0.65536000000000000000e5 +1711 2 6 12 -0.13107200000000000000e6 +1711 2 8 22 0.13107200000000000000e6 +1711 2 9 23 -0.26214400000000000000e6 +1711 2 10 24 -0.26214400000000000000e6 +1711 3 2 15 0.26214400000000000000e6 +1711 3 3 8 -0.32768000000000000000e5 +1711 3 4 9 -0.32768000000000000000e5 +1711 3 5 10 0.13107200000000000000e6 +1711 3 6 19 -0.32768000000000000000e5 +1711 3 8 13 0.26214400000000000000e6 +1711 3 8 21 0.13107200000000000000e6 +1711 3 9 22 0.13107200000000000000e6 +1711 3 11 24 0.26214400000000000000e6 +1711 4 4 8 0.13107200000000000000e6 +1712 2 3 9 -0.32768000000000000000e5 +1712 2 4 8 0.32768000000000000000e5 +1713 1 3 18 -0.13107200000000000000e6 +1713 1 6 11 -0.32768000000000000000e5 +1713 1 6 13 -0.13107200000000000000e6 +1713 1 8 39 -0.32768000000000000000e5 +1713 1 10 17 0.26214400000000000000e6 +1713 1 10 25 -0.32768000000000000000e5 +1713 1 11 14 -0.13107200000000000000e6 +1713 2 3 9 -0.32768000000000000000e5 +1713 2 4 9 0.32768000000000000000e5 +1713 2 5 9 -0.32768000000000000000e5 +1713 2 5 11 -0.65536000000000000000e5 +1713 2 9 11 -0.13107200000000000000e6 +1713 3 3 8 -0.32768000000000000000e5 +1713 3 4 9 -0.32768000000000000000e5 +1713 3 6 19 -0.32768000000000000000e5 +1714 1 2 33 0.32768000000000000000e5 +1714 1 4 35 0.13107200000000000000e6 +1714 1 11 42 -0.32768000000000000000e5 +1714 1 18 25 0.65536000000000000000e5 +1714 1 28 35 -0.13107200000000000000e6 +1714 2 4 11 0.32768000000000000000e5 +1714 2 8 22 -0.32768000000000000000e5 +1714 2 9 23 0.65536000000000000000e5 +1714 3 9 22 -0.32768000000000000000e5 +1714 3 11 24 -0.13107200000000000000e6 +1714 4 4 8 -0.32768000000000000000e5 +1715 2 4 12 0.32768000000000000000e5 +1715 2 5 11 -0.32768000000000000000e5 +1716 1 2 17 -0.32768000000000000000e5 +1716 1 3 18 -0.32768000000000000000e5 +1716 1 4 19 -0.13107200000000000000e6 +1716 1 10 17 0.65536000000000000000e5 +1716 1 11 14 -0.32768000000000000000e5 +1716 1 20 27 0.13107200000000000000e6 +1716 1 28 35 -0.65536000000000000000e5 +1716 2 4 13 0.32768000000000000000e5 +1716 2 6 12 -0.32768000000000000000e5 +1716 2 9 11 -0.32768000000000000000e5 +1716 2 10 24 -0.65536000000000000000e5 +1716 3 2 15 0.65536000000000000000e5 +1716 3 8 13 0.65536000000000000000e5 +1716 3 11 24 -0.65536000000000000000e5 +1717 2 4 14 0.32768000000000000000e5 +1717 2 9 11 -0.32768000000000000000e5 +1718 2 4 15 0.32768000000000000000e5 +1718 2 8 14 -0.32768000000000000000e5 +1719 2 3 17 -0.32768000000000000000e5 +1719 2 4 16 0.32768000000000000000e5 +1720 1 3 26 0.32768000000000000000e5 +1720 1 6 37 -0.32768000000000000000e5 +1720 1 7 38 0.65536000000000000000e5 +1720 1 8 23 -0.65536000000000000000e5 +1720 2 4 17 0.32768000000000000000e5 +1720 2 4 26 -0.32768000000000000000e5 +1720 3 3 16 -0.32768000000000000000e5 +1720 3 6 19 -0.13107200000000000000e6 +1720 3 7 20 0.13107200000000000000e6 +1720 4 1 13 -0.32768000000000000000e5 +1720 4 2 14 -0.65536000000000000000e5 +1721 1 1 40 0.32768000000000000000e5 +1721 1 1 48 -0.32768000000000000000e5 +1721 1 2 49 -0.32768000000000000000e5 +1721 1 5 52 0.13107200000000000000e6 +1721 1 6 25 0.32768000000000000000e5 +1721 1 6 37 0.32768000000000000000e5 +1721 1 8 39 -0.13107200000000000000e6 +1721 1 10 25 -0.13107200000000000000e6 +1721 1 10 41 0.13107200000000000000e6 +1721 1 11 42 0.13107200000000000000e6 +1721 1 12 43 0.26214400000000000000e6 +1721 1 17 48 -0.52428800000000000000e6 +1721 1 23 38 -0.32768000000000000000e5 +1721 1 26 41 0.65536000000000000000e5 +1721 1 28 43 0.13107200000000000000e6 +1721 2 2 32 -0.32768000000000000000e5 +1721 2 4 18 -0.32768000000000000000e5 +1721 2 4 19 0.32768000000000000000e5 +1721 2 4 26 0.32768000000000000000e5 +1721 2 8 22 0.26214400000000000000e6 +1721 2 12 26 -0.13107200000000000000e6 +1721 2 16 30 -0.65536000000000000000e5 +1721 3 2 31 -0.13107200000000000000e6 +1721 3 4 17 -0.32768000000000000000e5 +1721 3 6 19 -0.65536000000000000000e5 +1721 3 8 21 0.13107200000000000000e6 +1721 3 14 27 -0.26214400000000000000e6 +1721 4 3 15 -0.65536000000000000000e5 +1721 4 4 16 -0.26214400000000000000e6 +1721 4 6 18 -0.65536000000000000000e5 +1721 4 7 19 -0.13107200000000000000e6 +1722 1 2 33 -0.65536000000000000000e5 +1722 1 5 52 0.65536000000000000000e5 +1722 1 7 38 0.32768000000000000000e5 +1722 1 8 23 -0.32768000000000000000e5 +1722 1 10 25 -0.32768000000000000000e5 +1722 1 10 41 0.65536000000000000000e5 +1722 1 11 42 0.65536000000000000000e5 +1722 1 12 43 0.13107200000000000000e6 +1722 1 17 48 -0.26214400000000000000e6 +1722 1 26 41 0.32768000000000000000e5 +1722 1 28 43 0.65536000000000000000e5 +1722 2 4 20 0.32768000000000000000e5 +1722 2 8 22 0.13107200000000000000e6 +1722 2 12 26 -0.65536000000000000000e5 +1722 2 16 30 -0.32768000000000000000e5 +1722 3 1 30 0.32768000000000000000e5 +1722 3 2 31 -0.65536000000000000000e5 +1722 3 6 19 -0.32768000000000000000e5 +1722 3 7 20 0.65536000000000000000e5 +1722 3 8 21 0.65536000000000000000e5 +1722 3 14 27 -0.13107200000000000000e6 +1722 4 2 14 -0.32768000000000000000e5 +1722 4 3 15 -0.32768000000000000000e5 +1722 4 4 16 -0.13107200000000000000e6 +1722 4 6 18 -0.32768000000000000000e5 +1722 4 7 19 -0.65536000000000000000e5 +1723 1 1 48 -0.16384000000000000000e5 +1723 1 2 49 -0.16384000000000000000e5 +1723 1 5 52 0.65536000000000000000e5 +1723 1 11 42 0.65536000000000000000e5 +1723 1 12 43 0.13107200000000000000e6 +1723 1 17 48 -0.26214400000000000000e6 +1723 1 23 38 -0.16384000000000000000e5 +1723 1 26 41 0.32768000000000000000e5 +1723 1 28 43 0.65536000000000000000e5 +1723 2 2 32 -0.16384000000000000000e5 +1723 2 4 21 0.32768000000000000000e5 +1723 2 8 22 0.13107200000000000000e6 +1723 2 12 26 -0.65536000000000000000e5 +1723 2 16 30 -0.32768000000000000000e5 +1723 3 2 31 -0.65536000000000000000e5 +1723 3 14 27 -0.13107200000000000000e6 +1723 4 3 15 -0.32768000000000000000e5 +1723 4 4 16 -0.13107200000000000000e6 +1723 4 6 18 -0.32768000000000000000e5 +1723 4 7 19 -0.65536000000000000000e5 +1724 1 1 48 -0.16384000000000000000e5 +1724 1 2 49 -0.16384000000000000000e5 +1724 1 4 35 -0.13107200000000000000e6 +1724 1 5 52 0.65536000000000000000e5 +1724 1 6 29 0.32768000000000000000e5 +1724 1 8 39 -0.32768000000000000000e5 +1724 1 10 41 0.13107200000000000000e6 +1724 1 11 42 0.13107200000000000000e6 +1724 1 12 43 0.13107200000000000000e6 +1724 1 17 48 -0.26214400000000000000e6 +1724 1 23 38 -0.16384000000000000000e5 +1724 1 26 41 0.32768000000000000000e5 +1724 1 28 43 0.65536000000000000000e5 +1724 2 2 32 -0.16384000000000000000e5 +1724 2 4 22 0.32768000000000000000e5 +1724 2 8 22 0.19660800000000000000e6 +1724 2 12 26 -0.65536000000000000000e5 +1724 2 16 30 -0.32768000000000000000e5 +1724 3 2 31 -0.65536000000000000000e5 +1724 3 6 19 -0.32768000000000000000e5 +1724 3 8 21 0.13107200000000000000e6 +1724 3 9 22 0.65536000000000000000e5 +1724 3 14 27 -0.13107200000000000000e6 +1724 4 3 15 -0.32768000000000000000e5 +1724 4 4 16 -0.13107200000000000000e6 +1724 4 6 18 -0.32768000000000000000e5 +1724 4 7 19 -0.65536000000000000000e5 +1725 1 2 33 0.32768000000000000000e5 +1725 1 4 35 0.13107200000000000000e6 +1725 1 11 42 -0.32768000000000000000e5 +1725 1 18 25 0.65536000000000000000e5 +1725 1 28 35 -0.13107200000000000000e6 +1725 2 4 23 0.32768000000000000000e5 +1725 2 8 22 -0.32768000000000000000e5 +1725 2 9 23 0.65536000000000000000e5 +1725 3 9 22 -0.32768000000000000000e5 +1725 3 11 24 -0.13107200000000000000e6 +1726 2 4 24 0.32768000000000000000e5 +1726 2 8 22 -0.32768000000000000000e5 +1727 2 4 25 0.32768000000000000000e5 +1727 2 9 23 -0.32768000000000000000e5 +1728 1 3 26 -0.32768000000000000000e5 +1728 1 6 37 0.32768000000000000000e5 +1728 1 9 40 0.65536000000000000000e5 +1728 1 10 25 -0.65536000000000000000e5 +1728 2 4 18 -0.32768000000000000000e5 +1728 2 4 27 0.32768000000000000000e5 +1728 3 4 17 -0.32768000000000000000e5 +1728 3 5 18 -0.32768000000000000000e5 +1728 3 6 19 -0.65536000000000000000e5 +1728 3 8 21 0.13107200000000000000e6 +1728 4 3 15 -0.65536000000000000000e5 +1729 2 4 28 0.32768000000000000000e5 +1729 2 5 27 -0.32768000000000000000e5 +1730 1 1 48 -0.16384000000000000000e5 +1730 1 2 49 -0.16384000000000000000e5 +1730 1 5 52 0.65536000000000000000e5 +1730 1 11 42 0.65536000000000000000e5 +1730 1 12 43 0.13107200000000000000e6 +1730 1 17 48 -0.26214400000000000000e6 +1730 1 23 38 -0.16384000000000000000e5 +1730 1 26 41 0.32768000000000000000e5 +1730 1 28 43 0.65536000000000000000e5 +1730 2 2 32 -0.16384000000000000000e5 +1730 2 4 29 0.32768000000000000000e5 +1730 2 8 22 0.13107200000000000000e6 +1730 2 12 26 -0.65536000000000000000e5 +1730 2 16 30 -0.32768000000000000000e5 +1730 3 2 31 -0.65536000000000000000e5 +1730 3 14 27 -0.13107200000000000000e6 +1730 4 4 16 -0.13107200000000000000e6 +1730 4 6 18 -0.32768000000000000000e5 +1730 4 7 19 -0.65536000000000000000e5 +1731 1 1 48 -0.16384000000000000000e5 +1731 1 2 49 -0.16384000000000000000e5 +1731 1 5 52 0.65536000000000000000e5 +1731 1 8 39 -0.32768000000000000000e5 +1731 1 10 41 0.13107200000000000000e6 +1731 1 11 42 0.13107200000000000000e6 +1731 1 12 43 0.13107200000000000000e6 +1731 1 17 48 -0.39321600000000000000e6 +1731 1 23 38 -0.16384000000000000000e5 +1731 1 26 29 0.32768000000000000000e5 +1731 1 26 41 0.32768000000000000000e5 +1731 1 28 43 0.65536000000000000000e5 +1731 2 2 32 -0.16384000000000000000e5 +1731 2 4 30 0.32768000000000000000e5 +1731 2 8 22 0.19660800000000000000e6 +1731 2 12 26 -0.65536000000000000000e5 +1731 2 16 30 -0.32768000000000000000e5 +1731 3 2 31 -0.65536000000000000000e5 +1731 3 14 27 -0.26214400000000000000e6 +1731 4 4 16 -0.19660800000000000000e6 +1731 4 6 18 -0.32768000000000000000e5 +1731 4 7 19 -0.65536000000000000000e5 +1732 2 4 31 0.32768000000000000000e5 +1732 2 8 22 -0.32768000000000000000e5 +1732 4 4 16 0.32768000000000000000e5 +1733 2 3 33 -0.32768000000000000000e5 +1733 2 4 32 0.32768000000000000000e5 +1734 1 1 48 -0.32768000000000000000e5 +1734 1 2 49 -0.65536000000000000000e5 +1734 1 3 50 -0.65536000000000000000e5 +1734 1 11 42 0.13107200000000000000e6 +1734 1 12 43 0.26214400000000000000e6 +1734 1 17 48 -0.26214400000000000000e6 +1734 1 23 38 -0.32768000000000000000e5 +1734 1 25 40 0.32768000000000000000e5 +1734 1 26 41 -0.65536000000000000000e5 +1734 2 2 32 -0.32768000000000000000e5 +1734 2 3 33 -0.32768000000000000000e5 +1734 2 4 33 0.32768000000000000000e5 +1734 2 8 22 0.13107200000000000000e6 +1734 2 12 26 -0.13107200000000000000e6 +1734 2 16 30 -0.65536000000000000000e5 +1734 3 2 31 -0.13107200000000000000e6 +1734 3 14 27 -0.26214400000000000000e6 +1734 4 4 16 -0.13107200000000000000e6 +1735 1 1 48 -0.32768000000000000000e5 +1735 1 2 49 -0.65536000000000000000e5 +1735 1 3 50 -0.65536000000000000000e5 +1735 1 6 53 0.32768000000000000000e5 +1735 1 11 42 0.13107200000000000000e6 +1735 1 12 43 0.26214400000000000000e6 +1735 1 17 48 -0.26214400000000000000e6 +1735 1 23 38 -0.32768000000000000000e5 +1735 1 26 41 -0.65536000000000000000e5 +1735 2 2 32 -0.32768000000000000000e5 +1735 2 4 35 0.32768000000000000000e5 +1735 2 8 22 0.13107200000000000000e6 +1735 2 12 26 -0.13107200000000000000e6 +1735 2 16 30 -0.65536000000000000000e5 +1735 2 18 32 -0.32768000000000000000e5 +1735 3 2 31 -0.13107200000000000000e6 +1735 3 3 32 0.32768000000000000000e5 +1735 3 14 27 -0.26214400000000000000e6 +1735 3 17 30 -0.65536000000000000000e5 +1735 3 22 27 0.65536000000000000000e5 +1735 4 4 16 -0.13107200000000000000e6 +1736 1 2 9 -0.32768000000000000000e5 +1736 1 2 17 -0.13107200000000000000e6 +1736 1 2 33 -0.13107200000000000000e6 +1736 1 3 18 -0.39321600000000000000e6 +1736 1 4 19 -0.26214400000000000000e6 +1736 1 4 35 -0.52428800000000000000e6 +1736 1 6 13 0.13107200000000000000e6 +1736 1 8 39 -0.32768000000000000000e5 +1736 1 10 25 -0.32768000000000000000e5 +1736 1 10 41 0.13107200000000000000e6 +1736 1 11 42 0.13107200000000000000e6 +1736 1 18 25 -0.26214400000000000000e6 +1736 1 20 27 0.52428800000000000000e6 +1736 1 28 35 0.26214400000000000000e6 +1736 2 2 8 -0.32768000000000000000e5 +1736 2 3 9 -0.32768000000000000000e5 +1736 2 4 10 -0.65536000000000000000e5 +1736 2 5 6 0.32768000000000000000e5 +1736 2 6 12 -0.13107200000000000000e6 +1736 2 8 22 0.13107200000000000000e6 +1736 2 9 23 -0.26214400000000000000e6 +1736 2 10 24 -0.26214400000000000000e6 +1736 3 2 15 0.26214400000000000000e6 +1736 3 3 8 -0.32768000000000000000e5 +1736 3 4 9 -0.32768000000000000000e5 +1736 3 5 10 0.13107200000000000000e6 +1736 3 6 19 -0.32768000000000000000e5 +1736 3 8 13 0.26214400000000000000e6 +1736 3 8 21 0.13107200000000000000e6 +1736 3 9 22 0.13107200000000000000e6 +1736 3 11 24 0.26214400000000000000e6 +1736 4 4 8 0.13107200000000000000e6 +1737 2 3 9 -0.32768000000000000000e5 +1737 2 5 7 0.32768000000000000000e5 +1738 1 3 18 -0.13107200000000000000e6 +1738 1 6 11 -0.32768000000000000000e5 +1738 1 6 13 -0.13107200000000000000e6 +1738 1 8 39 -0.32768000000000000000e5 +1738 1 10 17 0.26214400000000000000e6 +1738 1 10 25 -0.32768000000000000000e5 +1738 1 11 14 -0.13107200000000000000e6 +1738 2 3 9 -0.32768000000000000000e5 +1738 2 5 8 0.32768000000000000000e5 +1738 2 5 9 -0.32768000000000000000e5 +1738 2 5 11 -0.65536000000000000000e5 +1738 2 9 11 -0.13107200000000000000e6 +1738 3 3 8 -0.32768000000000000000e5 +1738 3 4 9 -0.32768000000000000000e5 +1738 3 6 19 -0.32768000000000000000e5 +1739 1 2 33 0.32768000000000000000e5 +1739 1 4 35 0.13107200000000000000e6 +1739 1 11 42 -0.32768000000000000000e5 +1739 1 18 25 0.65536000000000000000e5 +1739 1 28 35 -0.13107200000000000000e6 +1739 2 5 10 0.32768000000000000000e5 +1739 2 8 22 -0.32768000000000000000e5 +1739 2 9 23 0.65536000000000000000e5 +1739 3 9 22 -0.32768000000000000000e5 +1739 3 11 24 -0.13107200000000000000e6 +1739 4 4 8 -0.32768000000000000000e5 +1740 2 5 12 0.32768000000000000000e5 +1740 2 9 9 -0.65536000000000000000e5 +1741 2 5 13 0.32768000000000000000e5 +1741 2 9 11 -0.32768000000000000000e5 +1742 2 5 14 0.32768000000000000000e5 +1742 2 9 12 -0.32768000000000000000e5 +1743 1 4 19 0.32768000000000000000e5 +1743 1 5 20 0.65536000000000000000e5 +1743 1 6 21 0.65536000000000000000e5 +1743 1 10 17 0.65536000000000000000e5 +1743 1 10 21 -0.13107200000000000000e6 +1743 1 11 18 0.32768000000000000000e5 +1743 2 5 15 0.32768000000000000000e5 +1743 2 8 14 0.32768000000000000000e5 +1743 2 9 15 0.65536000000000000000e5 +1744 1 3 26 0.32768000000000000000e5 +1744 1 6 37 -0.32768000000000000000e5 +1744 1 7 38 0.65536000000000000000e5 +1744 1 8 23 -0.65536000000000000000e5 +1744 2 4 26 -0.32768000000000000000e5 +1744 2 5 16 0.32768000000000000000e5 +1744 3 3 16 -0.32768000000000000000e5 +1744 3 6 19 -0.13107200000000000000e6 +1744 3 7 20 0.13107200000000000000e6 +1744 4 1 13 -0.32768000000000000000e5 +1744 4 2 14 -0.65536000000000000000e5 +1745 2 4 18 -0.32768000000000000000e5 +1745 2 5 17 0.32768000000000000000e5 +1746 1 1 40 0.32768000000000000000e5 +1746 1 1 48 -0.32768000000000000000e5 +1746 1 2 49 -0.32768000000000000000e5 +1746 1 5 52 0.13107200000000000000e6 +1746 1 6 25 0.32768000000000000000e5 +1746 1 6 37 0.32768000000000000000e5 +1746 1 8 39 -0.13107200000000000000e6 +1746 1 10 25 -0.13107200000000000000e6 +1746 1 10 41 0.13107200000000000000e6 +1746 1 11 42 0.13107200000000000000e6 +1746 1 12 43 0.26214400000000000000e6 +1746 1 17 48 -0.52428800000000000000e6 +1746 1 23 38 -0.32768000000000000000e5 +1746 1 26 41 0.65536000000000000000e5 +1746 1 28 43 0.13107200000000000000e6 +1746 2 2 32 -0.32768000000000000000e5 +1746 2 4 18 -0.32768000000000000000e5 +1746 2 4 26 0.32768000000000000000e5 +1746 2 5 18 0.32768000000000000000e5 +1746 2 8 22 0.26214400000000000000e6 +1746 2 12 26 -0.13107200000000000000e6 +1746 2 16 30 -0.65536000000000000000e5 +1746 3 2 31 -0.13107200000000000000e6 +1746 3 4 17 -0.32768000000000000000e5 +1746 3 6 19 -0.65536000000000000000e5 +1746 3 8 21 0.13107200000000000000e6 +1746 3 14 27 -0.26214400000000000000e6 +1746 4 3 15 -0.65536000000000000000e5 +1746 4 4 16 -0.26214400000000000000e6 +1746 4 6 18 -0.65536000000000000000e5 +1746 4 7 19 -0.13107200000000000000e6 +1747 1 1 48 -0.16384000000000000000e5 +1747 1 2 49 -0.16384000000000000000e5 +1747 1 5 52 0.65536000000000000000e5 +1747 1 11 42 0.65536000000000000000e5 +1747 1 12 43 0.13107200000000000000e6 +1747 1 17 48 -0.26214400000000000000e6 +1747 1 23 38 -0.16384000000000000000e5 +1747 1 26 41 0.32768000000000000000e5 +1747 1 28 43 0.65536000000000000000e5 +1747 2 2 32 -0.16384000000000000000e5 +1747 2 5 20 0.32768000000000000000e5 +1747 2 8 22 0.13107200000000000000e6 +1747 2 12 26 -0.65536000000000000000e5 +1747 2 16 30 -0.32768000000000000000e5 +1747 3 2 31 -0.65536000000000000000e5 +1747 3 14 27 -0.13107200000000000000e6 +1747 4 3 15 -0.32768000000000000000e5 +1747 4 4 16 -0.13107200000000000000e6 +1747 4 6 18 -0.32768000000000000000e5 +1747 4 7 19 -0.65536000000000000000e5 +1748 1 1 48 -0.16384000000000000000e5 +1748 1 2 49 -0.16384000000000000000e5 +1748 1 4 35 -0.13107200000000000000e6 +1748 1 5 52 0.65536000000000000000e5 +1748 1 6 29 0.32768000000000000000e5 +1748 1 8 39 -0.32768000000000000000e5 +1748 1 10 41 0.13107200000000000000e6 +1748 1 11 42 0.13107200000000000000e6 +1748 1 12 43 0.13107200000000000000e6 +1748 1 17 48 -0.26214400000000000000e6 +1748 1 23 38 -0.16384000000000000000e5 +1748 1 26 41 0.32768000000000000000e5 +1748 1 28 43 0.65536000000000000000e5 +1748 2 2 32 -0.16384000000000000000e5 +1748 2 5 21 0.32768000000000000000e5 +1748 2 8 22 0.19660800000000000000e6 +1748 2 12 26 -0.65536000000000000000e5 +1748 2 16 30 -0.32768000000000000000e5 +1748 3 2 31 -0.65536000000000000000e5 +1748 3 6 19 -0.32768000000000000000e5 +1748 3 8 21 0.13107200000000000000e6 +1748 3 9 22 0.65536000000000000000e5 +1748 3 14 27 -0.13107200000000000000e6 +1748 4 3 15 -0.32768000000000000000e5 +1748 4 4 16 -0.13107200000000000000e6 +1748 4 6 18 -0.32768000000000000000e5 +1748 4 7 19 -0.65536000000000000000e5 +1749 1 6 29 0.32768000000000000000e5 +1749 1 10 25 0.32768000000000000000e5 +1749 1 11 26 0.32768000000000000000e5 +1749 1 11 42 -0.65536000000000000000e5 +1749 2 5 22 0.32768000000000000000e5 +1749 3 9 22 -0.65536000000000000000e5 +1750 2 5 23 0.32768000000000000000e5 +1750 2 8 22 -0.32768000000000000000e5 +1751 1 4 35 0.65536000000000000000e5 +1751 1 10 41 -0.32768000000000000000e5 +1751 1 11 30 0.32768000000000000000e5 +1751 1 18 25 -0.65536000000000000000e5 +1751 2 5 24 0.32768000000000000000e5 +1751 2 8 22 -0.32768000000000000000e5 +1751 3 8 21 -0.32768000000000000000e5 +1752 1 4 35 0.32768000000000000000e5 +1752 1 5 36 -0.65536000000000000000e5 +1752 1 15 30 0.32768000000000000000e5 +1752 1 18 25 0.32768000000000000000e5 +1752 2 5 25 0.32768000000000000000e5 +1753 1 3 26 -0.32768000000000000000e5 +1753 1 6 37 0.32768000000000000000e5 +1753 1 9 40 0.65536000000000000000e5 +1753 1 10 25 -0.65536000000000000000e5 +1753 2 4 18 -0.32768000000000000000e5 +1753 2 5 26 0.32768000000000000000e5 +1753 3 4 17 -0.32768000000000000000e5 +1753 3 5 18 -0.32768000000000000000e5 +1753 3 6 19 -0.65536000000000000000e5 +1753 3 8 21 0.13107200000000000000e6 +1753 4 3 15 -0.65536000000000000000e5 +1754 2 5 28 0.32768000000000000000e5 +1754 2 19 19 -0.65536000000000000000e5 +1755 1 1 48 -0.16384000000000000000e5 +1755 1 2 49 -0.16384000000000000000e5 +1755 1 5 52 0.65536000000000000000e5 +1755 1 8 39 -0.32768000000000000000e5 +1755 1 10 41 0.13107200000000000000e6 +1755 1 11 42 0.13107200000000000000e6 +1755 1 12 43 0.13107200000000000000e6 +1755 1 17 48 -0.39321600000000000000e6 +1755 1 23 38 -0.16384000000000000000e5 +1755 1 26 29 0.32768000000000000000e5 +1755 1 26 41 0.32768000000000000000e5 +1755 1 28 43 0.65536000000000000000e5 +1755 2 2 32 -0.16384000000000000000e5 +1755 2 5 29 0.32768000000000000000e5 +1755 2 8 22 0.19660800000000000000e6 +1755 2 12 26 -0.65536000000000000000e5 +1755 2 16 30 -0.32768000000000000000e5 +1755 3 2 31 -0.65536000000000000000e5 +1755 3 14 27 -0.26214400000000000000e6 +1755 4 4 16 -0.19660800000000000000e6 +1755 4 6 18 -0.32768000000000000000e5 +1755 4 7 19 -0.65536000000000000000e5 +1756 1 6 43 0.32768000000000000000e5 +1756 1 9 40 0.32768000000000000000e5 +1756 1 11 42 -0.65536000000000000000e5 +1756 1 26 29 0.32768000000000000000e5 +1756 2 5 30 0.32768000000000000000e5 +1757 1 10 41 -0.32768000000000000000e5 +1757 1 17 48 0.65536000000000000000e5 +1757 1 18 25 -0.65536000000000000000e5 +1757 1 26 33 0.32768000000000000000e5 +1757 2 5 31 0.32768000000000000000e5 +1757 2 8 22 -0.32768000000000000000e5 +1757 3 14 19 0.65536000000000000000e5 +1757 3 14 27 0.65536000000000000000e5 +1757 4 4 16 0.32768000000000000000e5 +1758 1 1 48 -0.32768000000000000000e5 +1758 1 2 49 -0.65536000000000000000e5 +1758 1 3 50 -0.65536000000000000000e5 +1758 1 11 42 0.13107200000000000000e6 +1758 1 12 43 0.26214400000000000000e6 +1758 1 17 48 -0.26214400000000000000e6 +1758 1 23 38 -0.32768000000000000000e5 +1758 1 25 40 0.32768000000000000000e5 +1758 1 26 41 -0.65536000000000000000e5 +1758 2 2 32 -0.32768000000000000000e5 +1758 2 3 33 -0.32768000000000000000e5 +1758 2 5 32 0.32768000000000000000e5 +1758 2 8 22 0.13107200000000000000e6 +1758 2 12 26 -0.13107200000000000000e6 +1758 2 16 30 -0.65536000000000000000e5 +1758 3 2 31 -0.13107200000000000000e6 +1758 3 14 27 -0.26214400000000000000e6 +1758 4 4 16 -0.13107200000000000000e6 +1759 1 1 48 -0.65536000000000000000e5 +1759 1 2 49 -0.98304000000000000000e5 +1759 1 3 50 -0.13107200000000000000e6 +1759 1 6 49 0.32768000000000000000e5 +1759 1 11 42 0.26214400000000000000e6 +1759 1 12 43 0.52428800000000000000e6 +1759 1 17 48 -0.52428800000000000000e6 +1759 1 23 38 -0.65536000000000000000e5 +1759 1 24 39 -0.32768000000000000000e5 +1759 1 25 40 0.32768000000000000000e5 +1759 1 26 41 0.65536000000000000000e5 +1759 1 28 43 -0.13107200000000000000e6 +1759 2 2 32 -0.65536000000000000000e5 +1759 2 3 33 -0.32768000000000000000e5 +1759 2 4 34 0.65536000000000000000e5 +1759 2 5 33 0.32768000000000000000e5 +1759 2 8 22 0.26214400000000000000e6 +1759 2 12 26 -0.26214400000000000000e6 +1759 2 16 30 -0.13107200000000000000e6 +1759 3 2 31 -0.26214400000000000000e6 +1759 3 14 27 -0.52428800000000000000e6 +1759 4 4 16 -0.26214400000000000000e6 +1760 2 5 34 0.32768000000000000000e5 +1760 2 22 28 -0.32768000000000000000e5 +1761 1 1 8 0.81920000000000000000e4 +1761 1 1 12 0.16384000000000000000e5 +1761 1 1 16 -0.32768000000000000000e5 +1761 1 1 40 0.40960000000000000000e4 +1761 1 2 5 -0.40960000000000000000e4 +1761 1 2 9 0.16384000000000000000e5 +1761 1 2 33 0.16384000000000000000e5 +1761 1 3 34 -0.32768000000000000000e5 +1761 1 7 22 -0.81920000000000000000e4 +1761 1 7 38 0.81920000000000000000e4 +1761 1 8 23 -0.24576000000000000000e5 +1761 1 10 41 0.16384000000000000000e5 +1761 1 12 27 0.32768000000000000000e5 +1761 2 1 3 0.40960000000000000000e4 +1761 2 2 16 -0.40960000000000000000e4 +1761 2 6 6 0.32768000000000000000e5 +1761 2 6 20 -0.16384000000000000000e5 +1761 2 7 21 0.16384000000000000000e5 +1761 3 1 2 0.40960000000000000000e4 +1761 3 3 16 -0.40960000000000000000e4 +1761 3 4 17 -0.40960000000000000000e4 +1761 3 6 7 0.16384000000000000000e5 +1761 3 6 19 -0.81920000000000000000e4 +1761 3 7 20 0.16384000000000000000e5 +1761 3 8 21 0.16384000000000000000e5 +1761 4 1 5 0.81920000000000000000e4 +1761 4 1 13 -0.40960000000000000000e4 +1761 4 2 2 -0.81920000000000000000e4 +1761 4 2 14 -0.81920000000000000000e4 +1762 2 6 7 0.32768000000000000000e5 +1762 2 6 20 -0.32768000000000000000e5 +1762 4 5 5 -0.65536000000000000000e5 +1763 1 1 32 0.32768000000000000000e5 +1763 1 2 17 -0.13107200000000000000e6 +1763 1 3 18 -0.65536000000000000000e5 +1763 1 4 19 -0.13107200000000000000e6 +1763 1 10 41 -0.32768000000000000000e5 +1763 1 20 27 0.26214400000000000000e6 +1763 1 28 35 -0.13107200000000000000e6 +1763 2 4 10 -0.32768000000000000000e5 +1763 2 6 8 0.32768000000000000000e5 +1763 2 6 12 -0.65536000000000000000e5 +1763 2 10 24 -0.13107200000000000000e6 +1763 3 2 15 0.13107200000000000000e6 +1763 3 5 10 -0.32768000000000000000e5 +1763 3 6 7 0.32768000000000000000e5 +1763 3 8 13 0.13107200000000000000e6 +1763 3 8 21 -0.32768000000000000000e5 +1763 3 11 24 -0.13107200000000000000e6 +1764 2 4 10 -0.32768000000000000000e5 +1764 2 6 9 0.32768000000000000000e5 +1765 1 1 8 0.81920000000000000000e4 +1765 1 1 16 0.32768000000000000000e5 +1765 1 1 40 0.40960000000000000000e4 +1765 1 2 5 -0.40960000000000000000e4 +1765 1 2 9 0.16384000000000000000e5 +1765 1 3 18 -0.65536000000000000000e5 +1765 1 3 34 -0.32768000000000000000e5 +1765 1 4 19 -0.65536000000000000000e5 +1765 1 4 35 -0.65536000000000000000e5 +1765 1 6 13 0.16384000000000000000e5 +1765 1 7 16 -0.65536000000000000000e5 +1765 1 7 22 -0.81920000000000000000e4 +1765 1 7 38 0.81920000000000000000e4 +1765 1 8 23 -0.24576000000000000000e5 +1765 1 10 41 0.16384000000000000000e5 +1765 1 11 42 0.16384000000000000000e5 +1765 1 12 27 0.32768000000000000000e5 +1765 1 18 25 -0.32768000000000000000e5 +1765 1 20 27 0.13107200000000000000e6 +1765 2 1 3 0.40960000000000000000e4 +1765 2 2 16 -0.40960000000000000000e4 +1765 2 4 10 -0.16384000000000000000e5 +1765 2 6 10 0.32768000000000000000e5 +1765 2 6 12 -0.32768000000000000000e5 +1765 2 7 21 0.16384000000000000000e5 +1765 2 8 22 0.16384000000000000000e5 +1765 2 9 23 -0.32768000000000000000e5 +1765 2 10 24 -0.65536000000000000000e5 +1765 3 1 2 0.40960000000000000000e4 +1765 3 2 15 0.65536000000000000000e5 +1765 3 3 16 -0.40960000000000000000e4 +1765 3 4 17 -0.40960000000000000000e4 +1765 3 6 7 0.16384000000000000000e5 +1765 3 6 19 -0.81920000000000000000e4 +1765 3 7 20 0.16384000000000000000e5 +1765 3 8 13 0.65536000000000000000e5 +1765 3 8 21 0.16384000000000000000e5 +1765 3 9 22 0.16384000000000000000e5 +1765 4 1 5 0.81920000000000000000e4 +1765 4 1 13 -0.40960000000000000000e4 +1765 4 2 2 -0.81920000000000000000e4 +1765 4 2 14 -0.81920000000000000000e4 +1765 4 4 8 0.16384000000000000000e5 +1765 4 5 5 0.32768000000000000000e5 +1766 1 1 8 0.81920000000000000000e4 +1766 1 1 40 0.40960000000000000000e4 +1766 1 2 5 -0.40960000000000000000e4 +1766 1 2 9 0.16384000000000000000e5 +1766 1 2 17 -0.32768000000000000000e5 +1766 1 3 18 -0.98304000000000000000e5 +1766 1 3 34 -0.32768000000000000000e5 +1766 1 4 19 -0.13107200000000000000e6 +1766 1 4 35 -0.65536000000000000000e5 +1766 1 6 13 0.16384000000000000000e5 +1766 1 7 22 -0.81920000000000000000e4 +1766 1 7 38 0.81920000000000000000e4 +1766 1 8 23 -0.24576000000000000000e5 +1766 1 10 41 0.16384000000000000000e5 +1766 1 11 42 0.16384000000000000000e5 +1766 1 12 27 0.32768000000000000000e5 +1766 1 13 16 -0.13107200000000000000e6 +1766 1 18 25 -0.32768000000000000000e5 +1766 1 20 27 0.39321600000000000000e6 +1766 1 28 35 -0.13107200000000000000e6 +1766 2 1 3 0.40960000000000000000e4 +1766 2 2 16 -0.40960000000000000000e4 +1766 2 4 10 -0.16384000000000000000e5 +1766 2 6 11 0.32768000000000000000e5 +1766 2 6 12 -0.65536000000000000000e5 +1766 2 7 13 0.65536000000000000000e5 +1766 2 7 21 0.16384000000000000000e5 +1766 2 8 22 0.16384000000000000000e5 +1766 2 9 23 -0.32768000000000000000e5 +1766 2 10 24 -0.19660800000000000000e6 +1766 3 1 2 0.40960000000000000000e4 +1766 3 2 15 0.19660800000000000000e6 +1766 3 3 16 -0.40960000000000000000e4 +1766 3 4 17 -0.40960000000000000000e4 +1766 3 6 7 0.16384000000000000000e5 +1766 3 6 19 -0.81920000000000000000e4 +1766 3 7 20 0.16384000000000000000e5 +1766 3 8 13 0.19660800000000000000e6 +1766 3 8 21 0.16384000000000000000e5 +1766 3 9 22 0.16384000000000000000e5 +1766 3 11 24 -0.13107200000000000000e6 +1766 4 1 5 0.81920000000000000000e4 +1766 4 1 13 -0.40960000000000000000e4 +1766 4 2 2 -0.81920000000000000000e4 +1766 4 2 14 -0.81920000000000000000e4 +1766 4 4 8 0.16384000000000000000e5 +1766 4 5 5 0.32768000000000000000e5 +1767 2 1 15 -0.32768000000000000000e5 +1767 2 6 13 0.32768000000000000000e5 +1768 2 6 14 0.32768000000000000000e5 +1768 2 7 13 -0.32768000000000000000e5 +1769 1 4 19 -0.16384000000000000000e5 +1769 1 7 16 0.16384000000000000000e5 +1769 1 10 17 0.16384000000000000000e5 +1769 1 12 19 -0.65536000000000000000e5 +1769 1 13 16 0.65536000000000000000e5 +1769 1 20 27 0.32768000000000000000e5 +1769 1 28 35 -0.16384000000000000000e5 +1769 2 1 15 0.16384000000000000000e5 +1769 2 6 15 0.32768000000000000000e5 +1769 2 7 13 -0.16384000000000000000e5 +1769 3 2 15 0.16384000000000000000e5 +1769 3 8 13 0.16384000000000000000e5 +1769 3 11 24 -0.16384000000000000000e5 +1769 4 6 10 0.16384000000000000000e5 +1770 2 1 7 -0.32768000000000000000e5 +1770 2 6 16 0.32768000000000000000e5 +1770 4 1 5 0.32768000000000000000e5 +1771 1 1 32 -0.13107200000000000000e6 +1771 1 1 48 0.16384000000000000000e5 +1771 1 2 33 0.65536000000000000000e5 +1771 1 2 49 0.16384000000000000000e5 +1771 1 3 34 -0.13107200000000000000e6 +1771 1 7 22 -0.32768000000000000000e5 +1771 1 7 38 0.32768000000000000000e5 +1771 1 8 23 -0.32768000000000000000e5 +1771 1 10 41 0.65536000000000000000e5 +1771 1 12 27 0.13107200000000000000e6 +1771 1 23 38 0.16384000000000000000e5 +1771 2 1 7 -0.32768000000000000000e5 +1771 2 2 32 0.16384000000000000000e5 +1771 2 6 17 0.32768000000000000000e5 +1771 2 6 20 -0.65536000000000000000e5 +1771 2 7 21 0.65536000000000000000e5 +1771 3 1 30 0.32768000000000000000e5 +1771 3 6 19 -0.32768000000000000000e5 +1771 3 7 20 0.65536000000000000000e5 +1771 3 8 21 0.65536000000000000000e5 +1771 4 1 5 0.32768000000000000000e5 +1771 4 2 14 -0.32768000000000000000e5 +1772 1 1 48 0.16384000000000000000e5 +1772 1 2 33 0.65536000000000000000e5 +1772 1 2 49 0.16384000000000000000e5 +1772 1 3 34 -0.13107200000000000000e6 +1772 1 7 38 0.32768000000000000000e5 +1772 1 8 39 0.32768000000000000000e5 +1772 1 10 41 0.65536000000000000000e5 +1772 1 23 38 0.16384000000000000000e5 +1772 2 2 32 0.16384000000000000000e5 +1772 2 6 18 0.32768000000000000000e5 +1772 2 7 21 0.65536000000000000000e5 +1772 3 1 30 0.32768000000000000000e5 +1772 3 7 20 0.65536000000000000000e5 +1772 3 8 21 0.65536000000000000000e5 +1772 4 2 14 -0.32768000000000000000e5 +1773 1 2 33 -0.65536000000000000000e5 +1773 1 5 52 0.65536000000000000000e5 +1773 1 7 38 0.32768000000000000000e5 +1773 1 8 23 -0.32768000000000000000e5 +1773 1 10 25 -0.32768000000000000000e5 +1773 1 10 41 0.65536000000000000000e5 +1773 1 11 42 0.65536000000000000000e5 +1773 1 12 43 0.13107200000000000000e6 +1773 1 17 48 -0.26214400000000000000e6 +1773 1 26 41 0.32768000000000000000e5 +1773 1 28 43 0.65536000000000000000e5 +1773 2 6 19 0.32768000000000000000e5 +1773 2 8 22 0.13107200000000000000e6 +1773 2 12 26 -0.65536000000000000000e5 +1773 2 16 30 -0.32768000000000000000e5 +1773 3 1 30 0.32768000000000000000e5 +1773 3 2 31 -0.65536000000000000000e5 +1773 3 6 19 -0.32768000000000000000e5 +1773 3 7 20 0.65536000000000000000e5 +1773 3 8 21 0.65536000000000000000e5 +1773 3 14 27 -0.13107200000000000000e6 +1773 4 2 14 -0.32768000000000000000e5 +1773 4 3 15 -0.32768000000000000000e5 +1773 4 4 16 -0.13107200000000000000e6 +1773 4 6 18 -0.32768000000000000000e5 +1773 4 7 19 -0.65536000000000000000e5 +1774 1 1 32 0.32768000000000000000e5 +1774 1 2 17 -0.65536000000000000000e5 +1774 1 3 34 0.65536000000000000000e5 +1774 1 10 41 -0.32768000000000000000e5 +1774 2 6 21 0.32768000000000000000e5 +1774 2 7 21 -0.32768000000000000000e5 +1774 3 1 14 0.65536000000000000000e5 +1774 3 8 21 -0.32768000000000000000e5 +1775 2 6 22 0.32768000000000000000e5 +1775 2 7 21 -0.32768000000000000000e5 +1776 1 2 17 0.32768000000000000000e5 +1776 1 3 34 0.32768000000000000000e5 +1776 1 12 27 0.32768000000000000000e5 +1776 1 16 31 -0.13107200000000000000e6 +1776 1 20 27 0.13107200000000000000e6 +1776 1 28 35 -0.65536000000000000000e5 +1776 2 6 23 0.32768000000000000000e5 +1776 2 7 13 0.65536000000000000000e5 +1776 2 10 24 -0.65536000000000000000e5 +1776 3 1 14 -0.32768000000000000000e5 +1776 3 11 24 -0.65536000000000000000e5 +1776 4 8 8 -0.13107200000000000000e6 +1777 1 2 17 0.32768000000000000000e5 +1777 1 3 34 0.32768000000000000000e5 +1777 1 4 19 0.65536000000000000000e5 +1777 1 4 35 -0.32768000000000000000e5 +1777 1 18 25 -0.32768000000000000000e5 +1777 1 20 27 -0.13107200000000000000e6 +1777 1 28 35 0.13107200000000000000e6 +1777 2 6 24 0.32768000000000000000e5 +1777 2 9 23 -0.32768000000000000000e5 +1777 2 10 24 0.65536000000000000000e5 +1777 3 1 14 -0.32768000000000000000e5 +1777 3 8 13 -0.65536000000000000000e5 +1777 3 11 24 0.13107200000000000000e6 +1778 2 6 25 0.32768000000000000000e5 +1778 2 7 13 -0.32768000000000000000e5 +1778 4 8 8 0.65536000000000000000e5 +1779 1 1 24 -0.16384000000000000000e5 +1779 1 1 32 -0.65536000000000000000e5 +1779 1 1 40 -0.16384000000000000000e5 +1779 1 1 48 0.16384000000000000000e5 +1779 1 2 17 -0.13107200000000000000e6 +1779 1 2 33 -0.65536000000000000000e5 +1779 1 3 34 0.13107200000000000000e6 +1779 1 3 50 0.32768000000000000000e5 +1779 1 5 52 -0.65536000000000000000e5 +1779 1 6 37 -0.16384000000000000000e5 +1779 1 7 22 -0.32768000000000000000e5 +1779 1 7 38 0.32768000000000000000e5 +1779 1 8 23 -0.32768000000000000000e5 +1779 1 10 41 -0.65536000000000000000e5 +1779 1 11 42 0.13107200000000000000e6 +1779 1 12 27 0.13107200000000000000e6 +1779 1 12 43 0.26214400000000000000e6 +1779 1 16 47 -0.13107200000000000000e6 +1779 1 17 48 -0.13107200000000000000e6 +1779 1 22 37 0.16384000000000000000e5 +1779 1 23 38 0.16384000000000000000e5 +1779 1 28 43 -0.65536000000000000000e5 +1779 2 1 7 -0.32768000000000000000e5 +1779 2 1 31 0.65536000000000000000e5 +1779 2 2 16 -0.16384000000000000000e5 +1779 2 3 17 0.16384000000000000000e5 +1779 2 4 26 -0.16384000000000000000e5 +1779 2 6 20 -0.65536000000000000000e5 +1779 2 6 26 0.32768000000000000000e5 +1779 2 7 21 -0.65536000000000000000e5 +1779 2 8 22 0.65536000000000000000e5 +1779 2 10 32 0.65536000000000000000e5 +1779 2 12 26 -0.13107200000000000000e6 +1779 2 16 16 0.32768000000000000000e5 +1779 3 1 14 0.13107200000000000000e6 +1779 3 1 16 -0.16384000000000000000e5 +1779 3 1 30 -0.32768000000000000000e5 +1779 3 2 31 -0.65536000000000000000e5 +1779 3 3 16 -0.16384000000000000000e5 +1779 3 6 23 0.13107200000000000000e6 +1779 3 7 20 -0.13107200000000000000e6 +1779 3 8 21 -0.65536000000000000000e5 +1779 3 14 27 -0.26214400000000000000e6 +1779 4 1 5 0.32768000000000000000e5 +1779 4 1 13 -0.16384000000000000000e5 +1779 4 4 16 -0.65536000000000000000e5 +1779 4 5 17 -0.32768000000000000000e5 +1779 4 7 19 0.65536000000000000000e5 +1779 4 11 11 -0.32768000000000000000e5 +1780 1 1 48 0.16384000000000000000e5 +1780 1 2 33 0.65536000000000000000e5 +1780 1 2 49 0.16384000000000000000e5 +1780 1 3 34 -0.13107200000000000000e6 +1780 1 7 38 0.32768000000000000000e5 +1780 1 8 39 0.32768000000000000000e5 +1780 1 10 41 0.65536000000000000000e5 +1780 1 23 38 0.16384000000000000000e5 +1780 2 2 32 0.16384000000000000000e5 +1780 2 6 27 0.32768000000000000000e5 +1780 2 7 21 0.65536000000000000000e5 +1780 3 1 30 0.32768000000000000000e5 +1780 3 7 20 0.65536000000000000000e5 +1780 3 8 21 0.65536000000000000000e5 +1781 1 5 52 0.65536000000000000000e5 +1781 1 9 40 -0.32768000000000000000e5 +1781 1 10 41 0.65536000000000000000e5 +1781 1 17 48 -0.13107200000000000000e6 +1781 1 26 41 0.32768000000000000000e5 +1781 1 28 43 0.65536000000000000000e5 +1781 2 6 28 0.32768000000000000000e5 +1781 2 8 22 0.65536000000000000000e5 +1781 2 16 30 -0.32768000000000000000e5 +1781 3 1 30 0.32768000000000000000e5 +1781 3 2 31 -0.65536000000000000000e5 +1781 4 4 16 -0.65536000000000000000e5 +1781 4 6 18 -0.32768000000000000000e5 +1781 4 7 19 -0.65536000000000000000e5 +1782 2 1 31 -0.32768000000000000000e5 +1782 2 6 29 0.32768000000000000000e5 +1783 1 2 33 -0.32768000000000000000e5 +1783 1 3 34 0.65536000000000000000e5 +1783 1 11 42 0.32768000000000000000e5 +1783 1 12 43 0.65536000000000000000e5 +1783 1 16 47 -0.65536000000000000000e5 +1783 1 17 48 -0.65536000000000000000e5 +1783 2 6 30 0.32768000000000000000e5 +1783 2 7 21 -0.32768000000000000000e5 +1783 2 8 22 0.32768000000000000000e5 +1783 2 12 26 -0.32768000000000000000e5 +1783 3 7 20 -0.32768000000000000000e5 +1783 3 8 21 -0.32768000000000000000e5 +1783 3 13 26 -0.65536000000000000000e5 +1783 3 14 27 -0.65536000000000000000e5 +1783 4 4 16 -0.32768000000000000000e5 +1784 1 2 17 0.32768000000000000000e5 +1784 1 4 19 0.65536000000000000000e5 +1784 1 12 43 0.32768000000000000000e5 +1784 1 16 47 0.32768000000000000000e5 +1784 1 20 27 -0.13107200000000000000e6 +1784 1 28 35 0.65536000000000000000e5 +1784 2 6 31 0.32768000000000000000e5 +1784 2 10 24 0.65536000000000000000e5 +1784 3 1 14 -0.32768000000000000000e5 +1784 3 6 23 -0.32768000000000000000e5 +1784 3 8 13 -0.65536000000000000000e5 +1784 3 10 23 0.65536000000000000000e5 +1784 3 11 24 0.65536000000000000000e5 +1784 3 13 26 0.32768000000000000000e5 +1785 1 1 48 0.16384000000000000000e5 +1785 1 2 33 0.65536000000000000000e5 +1785 1 2 49 0.16384000000000000000e5 +1785 1 3 34 -0.13107200000000000000e6 +1785 1 7 38 0.32768000000000000000e5 +1785 1 8 39 0.32768000000000000000e5 +1785 1 10 41 0.65536000000000000000e5 +1785 1 23 38 0.16384000000000000000e5 +1785 2 2 32 0.16384000000000000000e5 +1785 2 6 32 0.32768000000000000000e5 +1785 2 7 21 0.65536000000000000000e5 +1785 3 1 30 0.32768000000000000000e5 +1785 3 7 20 0.65536000000000000000e5 +1785 3 8 21 0.65536000000000000000e5 +1785 4 5 17 0.32768000000000000000e5 +1786 2 6 33 0.32768000000000000000e5 +1786 2 16 30 -0.32768000000000000000e5 +1787 2 6 34 0.32768000000000000000e5 +1787 2 10 32 -0.32768000000000000000e5 +1788 1 3 50 -0.32768000000000000000e5 +1788 1 7 54 0.32768000000000000000e5 +1788 1 11 42 0.65536000000000000000e5 +1788 1 12 43 0.13107200000000000000e6 +1788 1 17 48 -0.13107200000000000000e6 +1788 1 37 44 -0.65536000000000000000e5 +1788 2 6 35 0.32768000000000000000e5 +1788 2 8 22 0.65536000000000000000e5 +1788 2 12 26 -0.65536000000000000000e5 +1788 2 16 30 -0.32768000000000000000e5 +1788 3 2 31 -0.65536000000000000000e5 +1788 3 14 27 -0.13107200000000000000e6 +1788 3 16 29 -0.32768000000000000000e5 +1788 3 17 30 -0.32768000000000000000e5 +1788 4 4 16 -0.65536000000000000000e5 +1789 1 1 32 0.16384000000000000000e5 +1789 1 2 17 -0.65536000000000000000e5 +1789 1 3 18 -0.32768000000000000000e5 +1789 1 4 19 -0.65536000000000000000e5 +1789 1 10 41 -0.16384000000000000000e5 +1789 1 20 27 0.13107200000000000000e6 +1789 1 28 35 -0.65536000000000000000e5 +1789 2 4 10 -0.16384000000000000000e5 +1789 2 6 12 -0.32768000000000000000e5 +1789 2 7 7 0.32768000000000000000e5 +1789 2 10 24 -0.65536000000000000000e5 +1789 3 2 15 0.65536000000000000000e5 +1789 3 5 10 -0.16384000000000000000e5 +1789 3 6 7 0.16384000000000000000e5 +1789 3 8 13 0.65536000000000000000e5 +1789 3 8 21 -0.16384000000000000000e5 +1789 3 11 24 -0.65536000000000000000e5 +1790 2 4 10 -0.32768000000000000000e5 +1790 2 7 8 0.32768000000000000000e5 +1791 1 2 33 0.32768000000000000000e5 +1791 1 4 35 0.13107200000000000000e6 +1791 1 11 42 -0.32768000000000000000e5 +1791 1 18 25 0.65536000000000000000e5 +1791 1 28 35 -0.13107200000000000000e6 +1791 2 7 9 0.32768000000000000000e5 +1791 2 8 22 -0.32768000000000000000e5 +1791 2 9 23 0.65536000000000000000e5 +1791 3 9 22 -0.32768000000000000000e5 +1791 3 11 24 -0.13107200000000000000e6 +1791 4 4 8 -0.32768000000000000000e5 +1792 1 1 8 0.81920000000000000000e4 +1792 1 1 40 0.40960000000000000000e4 +1792 1 2 5 -0.40960000000000000000e4 +1792 1 2 9 0.16384000000000000000e5 +1792 1 2 17 -0.32768000000000000000e5 +1792 1 3 18 -0.98304000000000000000e5 +1792 1 3 34 -0.32768000000000000000e5 +1792 1 4 19 -0.13107200000000000000e6 +1792 1 4 35 -0.65536000000000000000e5 +1792 1 6 13 0.16384000000000000000e5 +1792 1 7 22 -0.81920000000000000000e4 +1792 1 7 38 0.81920000000000000000e4 +1792 1 8 23 -0.24576000000000000000e5 +1792 1 10 41 0.16384000000000000000e5 +1792 1 11 42 0.16384000000000000000e5 +1792 1 12 27 0.32768000000000000000e5 +1792 1 13 16 -0.13107200000000000000e6 +1792 1 18 25 -0.32768000000000000000e5 +1792 1 20 27 0.39321600000000000000e6 +1792 1 28 35 -0.13107200000000000000e6 +1792 2 1 3 0.40960000000000000000e4 +1792 2 2 16 -0.40960000000000000000e4 +1792 2 4 10 -0.16384000000000000000e5 +1792 2 6 12 -0.65536000000000000000e5 +1792 2 7 10 0.32768000000000000000e5 +1792 2 7 13 0.65536000000000000000e5 +1792 2 7 21 0.16384000000000000000e5 +1792 2 8 22 0.16384000000000000000e5 +1792 2 9 23 -0.32768000000000000000e5 +1792 2 10 24 -0.19660800000000000000e6 +1792 3 1 2 0.40960000000000000000e4 +1792 3 2 15 0.19660800000000000000e6 +1792 3 3 16 -0.40960000000000000000e4 +1792 3 4 17 -0.40960000000000000000e4 +1792 3 6 7 0.16384000000000000000e5 +1792 3 6 19 -0.81920000000000000000e4 +1792 3 7 20 0.16384000000000000000e5 +1792 3 8 13 0.19660800000000000000e6 +1792 3 8 21 0.16384000000000000000e5 +1792 3 9 22 0.16384000000000000000e5 +1792 3 11 24 -0.13107200000000000000e6 +1792 4 1 5 0.81920000000000000000e4 +1792 4 1 13 -0.40960000000000000000e4 +1792 4 2 2 -0.81920000000000000000e4 +1792 4 2 14 -0.81920000000000000000e4 +1792 4 4 8 0.16384000000000000000e5 +1792 4 5 5 0.32768000000000000000e5 +1793 2 6 12 -0.32768000000000000000e5 +1793 2 7 11 0.32768000000000000000e5 +1794 1 2 17 -0.32768000000000000000e5 +1794 1 3 18 -0.32768000000000000000e5 +1794 1 4 19 -0.13107200000000000000e6 +1794 1 10 17 0.65536000000000000000e5 +1794 1 11 14 -0.32768000000000000000e5 +1794 1 20 27 0.13107200000000000000e6 +1794 1 28 35 -0.65536000000000000000e5 +1794 2 6 12 -0.32768000000000000000e5 +1794 2 7 12 0.32768000000000000000e5 +1794 2 9 11 -0.32768000000000000000e5 +1794 2 10 24 -0.65536000000000000000e5 +1794 3 2 15 0.65536000000000000000e5 +1794 3 8 13 0.65536000000000000000e5 +1794 3 11 24 -0.65536000000000000000e5 +1795 2 7 14 0.32768000000000000000e5 +1795 2 10 24 -0.32768000000000000000e5 +1795 4 6 10 -0.32768000000000000000e5 +1796 2 7 15 0.32768000000000000000e5 +1796 2 11 13 -0.32768000000000000000e5 +1797 1 1 32 -0.13107200000000000000e6 +1797 1 1 48 0.16384000000000000000e5 +1797 1 2 33 0.65536000000000000000e5 +1797 1 2 49 0.16384000000000000000e5 +1797 1 3 34 -0.13107200000000000000e6 +1797 1 7 22 -0.32768000000000000000e5 +1797 1 7 38 0.32768000000000000000e5 +1797 1 8 23 -0.32768000000000000000e5 +1797 1 10 41 0.65536000000000000000e5 +1797 1 12 27 0.13107200000000000000e6 +1797 1 23 38 0.16384000000000000000e5 +1797 2 1 7 -0.32768000000000000000e5 +1797 2 2 32 0.16384000000000000000e5 +1797 2 6 20 -0.65536000000000000000e5 +1797 2 7 16 0.32768000000000000000e5 +1797 2 7 21 0.65536000000000000000e5 +1797 3 1 30 0.32768000000000000000e5 +1797 3 6 19 -0.32768000000000000000e5 +1797 3 7 20 0.65536000000000000000e5 +1797 3 8 21 0.65536000000000000000e5 +1797 4 1 5 0.32768000000000000000e5 +1797 4 2 14 -0.32768000000000000000e5 +1798 1 1 48 0.16384000000000000000e5 +1798 1 2 33 0.65536000000000000000e5 +1798 1 2 49 0.16384000000000000000e5 +1798 1 3 34 -0.13107200000000000000e6 +1798 1 7 38 0.32768000000000000000e5 +1798 1 8 39 0.32768000000000000000e5 +1798 1 10 41 0.65536000000000000000e5 +1798 1 23 38 0.16384000000000000000e5 +1798 2 2 32 0.16384000000000000000e5 +1798 2 7 17 0.32768000000000000000e5 +1798 2 7 21 0.65536000000000000000e5 +1798 3 1 30 0.32768000000000000000e5 +1798 3 7 20 0.65536000000000000000e5 +1798 3 8 21 0.65536000000000000000e5 +1798 4 2 14 -0.32768000000000000000e5 +1799 1 2 33 -0.65536000000000000000e5 +1799 1 5 52 0.65536000000000000000e5 +1799 1 7 38 0.32768000000000000000e5 +1799 1 8 23 -0.32768000000000000000e5 +1799 1 10 25 -0.32768000000000000000e5 +1799 1 10 41 0.65536000000000000000e5 +1799 1 11 42 0.65536000000000000000e5 +1799 1 12 43 0.13107200000000000000e6 +1799 1 17 48 -0.26214400000000000000e6 +1799 1 26 41 0.32768000000000000000e5 +1799 1 28 43 0.65536000000000000000e5 +1799 2 7 18 0.32768000000000000000e5 +1799 2 8 22 0.13107200000000000000e6 +1799 2 12 26 -0.65536000000000000000e5 +1799 2 16 30 -0.32768000000000000000e5 +1799 3 1 30 0.32768000000000000000e5 +1799 3 2 31 -0.65536000000000000000e5 +1799 3 6 19 -0.32768000000000000000e5 +1799 3 7 20 0.65536000000000000000e5 +1799 3 8 21 0.65536000000000000000e5 +1799 3 14 27 -0.13107200000000000000e6 +1799 4 2 14 -0.32768000000000000000e5 +1799 4 3 15 -0.32768000000000000000e5 +1799 4 4 16 -0.13107200000000000000e6 +1799 4 6 18 -0.32768000000000000000e5 +1799 4 7 19 -0.65536000000000000000e5 +1800 1 1 48 -0.16384000000000000000e5 +1800 1 2 49 -0.16384000000000000000e5 +1800 1 5 52 0.65536000000000000000e5 +1800 1 11 42 0.65536000000000000000e5 +1800 1 12 43 0.13107200000000000000e6 +1800 1 17 48 -0.26214400000000000000e6 +1800 1 23 38 -0.16384000000000000000e5 +1800 1 26 41 0.32768000000000000000e5 +1800 1 28 43 0.65536000000000000000e5 +1800 2 2 32 -0.16384000000000000000e5 +1800 2 7 19 0.32768000000000000000e5 +1800 2 8 22 0.13107200000000000000e6 +1800 2 12 26 -0.65536000000000000000e5 +1800 2 16 30 -0.32768000000000000000e5 +1800 3 2 31 -0.65536000000000000000e5 +1800 3 14 27 -0.13107200000000000000e6 +1800 4 3 15 -0.32768000000000000000e5 +1800 4 4 16 -0.13107200000000000000e6 +1800 4 6 18 -0.32768000000000000000e5 +1800 4 7 19 -0.65536000000000000000e5 +1801 1 1 32 0.32768000000000000000e5 +1801 1 2 17 -0.65536000000000000000e5 +1801 1 3 34 0.65536000000000000000e5 +1801 1 10 41 -0.32768000000000000000e5 +1801 2 7 20 0.32768000000000000000e5 +1801 2 7 21 -0.32768000000000000000e5 +1801 3 1 14 0.65536000000000000000e5 +1801 3 8 21 -0.32768000000000000000e5 +1802 1 2 33 0.32768000000000000000e5 +1802 1 4 35 0.13107200000000000000e6 +1802 1 11 42 -0.32768000000000000000e5 +1802 1 18 25 0.65536000000000000000e5 +1802 1 28 35 -0.13107200000000000000e6 +1802 2 7 22 0.32768000000000000000e5 +1802 2 8 22 -0.32768000000000000000e5 +1802 2 9 23 0.65536000000000000000e5 +1802 3 9 22 -0.32768000000000000000e5 +1802 3 11 24 -0.13107200000000000000e6 +1803 1 2 17 0.32768000000000000000e5 +1803 1 3 34 0.32768000000000000000e5 +1803 1 4 19 0.65536000000000000000e5 +1803 1 4 35 -0.32768000000000000000e5 +1803 1 18 25 -0.32768000000000000000e5 +1803 1 20 27 -0.13107200000000000000e6 +1803 1 28 35 0.13107200000000000000e6 +1803 2 7 23 0.32768000000000000000e5 +1803 2 9 23 -0.32768000000000000000e5 +1803 2 10 24 0.65536000000000000000e5 +1803 3 1 14 -0.32768000000000000000e5 +1803 3 8 13 -0.65536000000000000000e5 +1803 3 11 24 0.13107200000000000000e6 +1804 1 3 34 0.32768000000000000000e5 +1804 1 4 19 -0.65536000000000000000e5 +1804 1 18 25 -0.32768000000000000000e5 +1804 1 28 35 0.65536000000000000000e5 +1804 2 7 24 0.32768000000000000000e5 +1804 2 9 23 -0.32768000000000000000e5 +1804 3 8 13 0.65536000000000000000e5 +1804 3 11 24 0.65536000000000000000e5 +1805 2 7 25 0.32768000000000000000e5 +1805 2 10 24 -0.32768000000000000000e5 +1806 1 1 48 0.16384000000000000000e5 +1806 1 2 33 0.65536000000000000000e5 +1806 1 2 49 0.16384000000000000000e5 +1806 1 3 34 -0.13107200000000000000e6 +1806 1 7 38 0.32768000000000000000e5 +1806 1 8 39 0.32768000000000000000e5 +1806 1 10 41 0.65536000000000000000e5 +1806 1 23 38 0.16384000000000000000e5 +1806 2 2 32 0.16384000000000000000e5 +1806 2 7 21 0.65536000000000000000e5 +1806 2 7 26 0.32768000000000000000e5 +1806 3 1 30 0.32768000000000000000e5 +1806 3 7 20 0.65536000000000000000e5 +1806 3 8 21 0.65536000000000000000e5 +1807 1 5 52 0.65536000000000000000e5 +1807 1 9 40 -0.32768000000000000000e5 +1807 1 10 41 0.65536000000000000000e5 +1807 1 17 48 -0.13107200000000000000e6 +1807 1 26 41 0.32768000000000000000e5 +1807 1 28 43 0.65536000000000000000e5 +1807 2 7 27 0.32768000000000000000e5 +1807 2 8 22 0.65536000000000000000e5 +1807 2 16 30 -0.32768000000000000000e5 +1807 3 1 30 0.32768000000000000000e5 +1807 3 2 31 -0.65536000000000000000e5 +1807 4 4 16 -0.65536000000000000000e5 +1807 4 6 18 -0.32768000000000000000e5 +1807 4 7 19 -0.65536000000000000000e5 +1808 1 1 48 -0.16384000000000000000e5 +1808 1 2 49 -0.16384000000000000000e5 +1808 1 5 52 0.65536000000000000000e5 +1808 1 11 42 0.65536000000000000000e5 +1808 1 12 43 0.13107200000000000000e6 +1808 1 17 48 -0.26214400000000000000e6 +1808 1 23 38 -0.16384000000000000000e5 +1808 1 26 41 0.32768000000000000000e5 +1808 1 28 43 0.65536000000000000000e5 +1808 2 2 32 -0.16384000000000000000e5 +1808 2 7 28 0.32768000000000000000e5 +1808 2 8 22 0.13107200000000000000e6 +1808 2 12 26 -0.65536000000000000000e5 +1808 2 16 30 -0.32768000000000000000e5 +1808 3 2 31 -0.65536000000000000000e5 +1808 3 14 27 -0.13107200000000000000e6 +1808 4 4 16 -0.13107200000000000000e6 +1808 4 6 18 -0.32768000000000000000e5 +1808 4 7 19 -0.65536000000000000000e5 +1809 1 2 33 -0.32768000000000000000e5 +1809 1 3 34 0.65536000000000000000e5 +1809 1 11 42 0.32768000000000000000e5 +1809 1 12 43 0.65536000000000000000e5 +1809 1 16 47 -0.65536000000000000000e5 +1809 1 17 48 -0.65536000000000000000e5 +1809 2 7 21 -0.32768000000000000000e5 +1809 2 7 29 0.32768000000000000000e5 +1809 2 8 22 0.32768000000000000000e5 +1809 2 12 26 -0.32768000000000000000e5 +1809 3 7 20 -0.32768000000000000000e5 +1809 3 8 21 -0.32768000000000000000e5 +1809 3 13 26 -0.65536000000000000000e5 +1809 3 14 27 -0.65536000000000000000e5 +1809 4 4 16 -0.32768000000000000000e5 +1810 2 7 30 0.32768000000000000000e5 +1810 2 12 26 -0.32768000000000000000e5 +1811 1 12 43 0.32768000000000000000e5 +1811 1 13 44 -0.65536000000000000000e5 +1811 1 16 47 0.32768000000000000000e5 +1811 1 17 48 0.32768000000000000000e5 +1811 2 7 31 0.32768000000000000000e5 +1811 3 13 26 0.32768000000000000000e5 +1811 3 14 27 0.32768000000000000000e5 +1812 2 7 32 0.32768000000000000000e5 +1812 2 16 30 -0.32768000000000000000e5 +1813 1 1 48 -0.16384000000000000000e5 +1813 1 2 49 -0.16384000000000000000e5 +1813 1 5 52 0.65536000000000000000e5 +1813 1 11 42 0.65536000000000000000e5 +1813 1 12 43 0.13107200000000000000e6 +1813 1 17 48 -0.26214400000000000000e6 +1813 1 23 38 -0.16384000000000000000e5 +1813 1 26 41 0.32768000000000000000e5 +1813 1 28 43 0.65536000000000000000e5 +1813 2 2 32 -0.16384000000000000000e5 +1813 2 7 33 0.32768000000000000000e5 +1813 2 8 22 0.13107200000000000000e6 +1813 2 12 26 -0.65536000000000000000e5 +1813 2 16 30 -0.32768000000000000000e5 +1813 3 2 31 -0.65536000000000000000e5 +1813 3 14 27 -0.13107200000000000000e6 +1813 4 4 16 -0.13107200000000000000e6 +1813 4 7 19 -0.65536000000000000000e5 +1814 2 7 34 0.32768000000000000000e5 +1814 2 20 34 -0.32768000000000000000e5 +1814 4 8 20 -0.32768000000000000000e5 +1815 1 1 48 -0.16384000000000000000e5 +1815 1 2 49 -0.16384000000000000000e5 +1815 1 3 50 -0.32768000000000000000e5 +1815 1 7 54 0.32768000000000000000e5 +1815 1 11 42 0.65536000000000000000e5 +1815 1 12 43 0.13107200000000000000e6 +1815 1 17 48 -0.13107200000000000000e6 +1815 1 23 38 -0.16384000000000000000e5 +1815 1 26 41 0.32768000000000000000e5 +1815 1 32 47 -0.65536000000000000000e5 +1815 2 2 32 -0.16384000000000000000e5 +1815 2 7 35 0.32768000000000000000e5 +1815 2 8 22 0.65536000000000000000e5 +1815 2 12 26 -0.65536000000000000000e5 +1815 2 16 30 -0.32768000000000000000e5 +1815 3 2 31 -0.65536000000000000000e5 +1815 3 14 27 -0.13107200000000000000e6 +1815 3 17 30 -0.32768000000000000000e5 +1815 3 22 27 -0.32768000000000000000e5 +1815 4 4 16 -0.65536000000000000000e5 +1816 1 2 33 0.16384000000000000000e5 +1816 1 4 35 0.65536000000000000000e5 +1816 1 11 42 -0.16384000000000000000e5 +1816 1 18 25 0.32768000000000000000e5 +1816 1 28 35 -0.65536000000000000000e5 +1816 2 8 8 0.32768000000000000000e5 +1816 2 8 22 -0.16384000000000000000e5 +1816 2 9 23 0.32768000000000000000e5 +1816 3 9 22 -0.16384000000000000000e5 +1816 3 11 24 -0.65536000000000000000e5 +1816 4 4 8 -0.16384000000000000000e5 +1817 2 5 11 -0.32768000000000000000e5 +1817 2 8 9 0.32768000000000000000e5 +1818 2 6 12 -0.32768000000000000000e5 +1818 2 8 10 0.32768000000000000000e5 +1819 1 2 17 -0.32768000000000000000e5 +1819 1 3 18 -0.32768000000000000000e5 +1819 1 4 19 -0.13107200000000000000e6 +1819 1 10 17 0.65536000000000000000e5 +1819 1 11 14 -0.32768000000000000000e5 +1819 1 20 27 0.13107200000000000000e6 +1819 1 28 35 -0.65536000000000000000e5 +1819 2 6 12 -0.32768000000000000000e5 +1819 2 8 11 0.32768000000000000000e5 +1819 2 9 11 -0.32768000000000000000e5 +1819 2 10 24 -0.65536000000000000000e5 +1819 3 2 15 0.65536000000000000000e5 +1819 3 8 13 0.65536000000000000000e5 +1819 3 11 24 -0.65536000000000000000e5 +1820 2 8 12 0.32768000000000000000e5 +1820 2 9 11 -0.32768000000000000000e5 +1821 2 8 13 0.32768000000000000000e5 +1821 2 10 24 -0.32768000000000000000e5 +1821 4 6 10 -0.32768000000000000000e5 +1822 1 6 21 -0.32768000000000000000e5 +1822 1 10 17 0.16384000000000000000e5 +1822 1 10 21 0.65536000000000000000e5 +1822 1 13 20 -0.65536000000000000000e5 +1822 1 20 27 0.32768000000000000000e5 +1822 1 28 35 -0.16384000000000000000e5 +1822 2 8 15 0.32768000000000000000e5 +1822 2 9 15 -0.32768000000000000000e5 +1822 3 2 15 0.16384000000000000000e5 +1822 3 8 13 0.16384000000000000000e5 +1822 3 11 24 -0.16384000000000000000e5 +1822 4 6 10 0.16384000000000000000e5 +1823 1 1 48 0.16384000000000000000e5 +1823 1 2 33 0.65536000000000000000e5 +1823 1 2 49 0.16384000000000000000e5 +1823 1 3 34 -0.13107200000000000000e6 +1823 1 7 38 0.32768000000000000000e5 +1823 1 8 39 0.32768000000000000000e5 +1823 1 10 41 0.65536000000000000000e5 +1823 1 23 38 0.16384000000000000000e5 +1823 2 2 32 0.16384000000000000000e5 +1823 2 7 21 0.65536000000000000000e5 +1823 2 8 16 0.32768000000000000000e5 +1823 3 1 30 0.32768000000000000000e5 +1823 3 7 20 0.65536000000000000000e5 +1823 3 8 21 0.65536000000000000000e5 +1823 4 2 14 -0.32768000000000000000e5 +1824 1 2 33 -0.65536000000000000000e5 +1824 1 5 52 0.65536000000000000000e5 +1824 1 7 38 0.32768000000000000000e5 +1824 1 8 23 -0.32768000000000000000e5 +1824 1 10 25 -0.32768000000000000000e5 +1824 1 10 41 0.65536000000000000000e5 +1824 1 11 42 0.65536000000000000000e5 +1824 1 12 43 0.13107200000000000000e6 +1824 1 17 48 -0.26214400000000000000e6 +1824 1 26 41 0.32768000000000000000e5 +1824 1 28 43 0.65536000000000000000e5 +1824 2 8 17 0.32768000000000000000e5 +1824 2 8 22 0.13107200000000000000e6 +1824 2 12 26 -0.65536000000000000000e5 +1824 2 16 30 -0.32768000000000000000e5 +1824 3 1 30 0.32768000000000000000e5 +1824 3 2 31 -0.65536000000000000000e5 +1824 3 6 19 -0.32768000000000000000e5 +1824 3 7 20 0.65536000000000000000e5 +1824 3 8 21 0.65536000000000000000e5 +1824 3 14 27 -0.13107200000000000000e6 +1824 4 2 14 -0.32768000000000000000e5 +1824 4 3 15 -0.32768000000000000000e5 +1824 4 4 16 -0.13107200000000000000e6 +1824 4 6 18 -0.32768000000000000000e5 +1824 4 7 19 -0.65536000000000000000e5 +1825 1 1 48 -0.16384000000000000000e5 +1825 1 2 49 -0.16384000000000000000e5 +1825 1 5 52 0.65536000000000000000e5 +1825 1 11 42 0.65536000000000000000e5 +1825 1 12 43 0.13107200000000000000e6 +1825 1 17 48 -0.26214400000000000000e6 +1825 1 23 38 -0.16384000000000000000e5 +1825 1 26 41 0.32768000000000000000e5 +1825 1 28 43 0.65536000000000000000e5 +1825 2 2 32 -0.16384000000000000000e5 +1825 2 8 18 0.32768000000000000000e5 +1825 2 8 22 0.13107200000000000000e6 +1825 2 12 26 -0.65536000000000000000e5 +1825 2 16 30 -0.32768000000000000000e5 +1825 3 2 31 -0.65536000000000000000e5 +1825 3 14 27 -0.13107200000000000000e6 +1825 4 3 15 -0.32768000000000000000e5 +1825 4 4 16 -0.13107200000000000000e6 +1825 4 6 18 -0.32768000000000000000e5 +1825 4 7 19 -0.65536000000000000000e5 +1826 1 1 48 -0.16384000000000000000e5 +1826 1 2 49 -0.16384000000000000000e5 +1826 1 4 35 -0.13107200000000000000e6 +1826 1 5 52 0.65536000000000000000e5 +1826 1 6 29 0.32768000000000000000e5 +1826 1 8 39 -0.32768000000000000000e5 +1826 1 10 41 0.13107200000000000000e6 +1826 1 11 42 0.13107200000000000000e6 +1826 1 12 43 0.13107200000000000000e6 +1826 1 17 48 -0.26214400000000000000e6 +1826 1 23 38 -0.16384000000000000000e5 +1826 1 26 41 0.32768000000000000000e5 +1826 1 28 43 0.65536000000000000000e5 +1826 2 2 32 -0.16384000000000000000e5 +1826 2 8 19 0.32768000000000000000e5 +1826 2 8 22 0.19660800000000000000e6 +1826 2 12 26 -0.65536000000000000000e5 +1826 2 16 30 -0.32768000000000000000e5 +1826 3 2 31 -0.65536000000000000000e5 +1826 3 6 19 -0.32768000000000000000e5 +1826 3 8 21 0.13107200000000000000e6 +1826 3 9 22 0.65536000000000000000e5 +1826 3 14 27 -0.13107200000000000000e6 +1826 4 3 15 -0.32768000000000000000e5 +1826 4 4 16 -0.13107200000000000000e6 +1826 4 6 18 -0.32768000000000000000e5 +1826 4 7 19 -0.65536000000000000000e5 +1827 2 7 21 -0.32768000000000000000e5 +1827 2 8 20 0.32768000000000000000e5 +1828 1 2 33 0.32768000000000000000e5 +1828 1 4 35 0.13107200000000000000e6 +1828 1 11 42 -0.32768000000000000000e5 +1828 1 18 25 0.65536000000000000000e5 +1828 1 28 35 -0.13107200000000000000e6 +1828 2 8 21 0.32768000000000000000e5 +1828 2 8 22 -0.32768000000000000000e5 +1828 2 9 23 0.65536000000000000000e5 +1828 3 9 22 -0.32768000000000000000e5 +1828 3 11 24 -0.13107200000000000000e6 +1829 1 3 34 0.32768000000000000000e5 +1829 1 4 19 -0.65536000000000000000e5 +1829 1 18 25 -0.32768000000000000000e5 +1829 1 28 35 0.65536000000000000000e5 +1829 2 8 23 0.32768000000000000000e5 +1829 2 9 23 -0.32768000000000000000e5 +1829 3 8 13 0.65536000000000000000e5 +1829 3 11 24 0.65536000000000000000e5 +1830 2 8 24 0.32768000000000000000e5 +1830 2 9 23 -0.32768000000000000000e5 +1831 1 4 19 0.32768000000000000000e5 +1831 1 5 36 0.32768000000000000000e5 +1831 1 17 32 -0.65536000000000000000e5 +1831 1 28 35 0.32768000000000000000e5 +1831 2 8 25 0.32768000000000000000e5 +1831 3 8 13 -0.32768000000000000000e5 +1831 3 11 24 0.32768000000000000000e5 +1832 1 5 52 0.65536000000000000000e5 +1832 1 9 40 -0.32768000000000000000e5 +1832 1 10 41 0.65536000000000000000e5 +1832 1 17 48 -0.13107200000000000000e6 +1832 1 26 41 0.32768000000000000000e5 +1832 1 28 43 0.65536000000000000000e5 +1832 2 8 22 0.65536000000000000000e5 +1832 2 8 26 0.32768000000000000000e5 +1832 2 16 30 -0.32768000000000000000e5 +1832 3 1 30 0.32768000000000000000e5 +1832 3 2 31 -0.65536000000000000000e5 +1832 4 4 16 -0.65536000000000000000e5 +1832 4 6 18 -0.32768000000000000000e5 +1832 4 7 19 -0.65536000000000000000e5 +1833 1 1 48 -0.16384000000000000000e5 +1833 1 2 49 -0.16384000000000000000e5 +1833 1 5 52 0.65536000000000000000e5 +1833 1 11 42 0.65536000000000000000e5 +1833 1 12 43 0.13107200000000000000e6 +1833 1 17 48 -0.26214400000000000000e6 +1833 1 23 38 -0.16384000000000000000e5 +1833 1 26 41 0.32768000000000000000e5 +1833 1 28 43 0.65536000000000000000e5 +1833 2 2 32 -0.16384000000000000000e5 +1833 2 8 22 0.13107200000000000000e6 +1833 2 8 27 0.32768000000000000000e5 +1833 2 12 26 -0.65536000000000000000e5 +1833 2 16 30 -0.32768000000000000000e5 +1833 3 2 31 -0.65536000000000000000e5 +1833 3 14 27 -0.13107200000000000000e6 +1833 4 4 16 -0.13107200000000000000e6 +1833 4 6 18 -0.32768000000000000000e5 +1833 4 7 19 -0.65536000000000000000e5 +1834 1 1 48 -0.16384000000000000000e5 +1834 1 2 49 -0.16384000000000000000e5 +1834 1 5 52 0.65536000000000000000e5 +1834 1 8 39 -0.32768000000000000000e5 +1834 1 10 41 0.13107200000000000000e6 +1834 1 11 42 0.13107200000000000000e6 +1834 1 12 43 0.13107200000000000000e6 +1834 1 17 48 -0.39321600000000000000e6 +1834 1 23 38 -0.16384000000000000000e5 +1834 1 26 29 0.32768000000000000000e5 +1834 1 26 41 0.32768000000000000000e5 +1834 1 28 43 0.65536000000000000000e5 +1834 2 2 32 -0.16384000000000000000e5 +1834 2 8 22 0.19660800000000000000e6 +1834 2 8 28 0.32768000000000000000e5 +1834 2 12 26 -0.65536000000000000000e5 +1834 2 16 30 -0.32768000000000000000e5 +1834 3 2 31 -0.65536000000000000000e5 +1834 3 14 27 -0.26214400000000000000e6 +1834 4 4 16 -0.19660800000000000000e6 +1834 4 6 18 -0.32768000000000000000e5 +1834 4 7 19 -0.65536000000000000000e5 +1835 2 8 29 0.32768000000000000000e5 +1835 2 12 26 -0.32768000000000000000e5 +1836 2 8 22 -0.32768000000000000000e5 +1836 2 8 30 0.32768000000000000000e5 +1836 4 4 16 0.32768000000000000000e5 +1837 1 12 43 0.32768000000000000000e5 +1837 1 17 48 0.32768000000000000000e5 +1837 1 18 25 0.32768000000000000000e5 +1837 1 28 35 -0.65536000000000000000e5 +1837 2 8 31 0.32768000000000000000e5 +1837 3 14 19 -0.32768000000000000000e5 +1837 3 14 27 0.32768000000000000000e5 +1838 1 1 48 -0.16384000000000000000e5 +1838 1 2 49 -0.16384000000000000000e5 +1838 1 5 52 0.65536000000000000000e5 +1838 1 11 42 0.65536000000000000000e5 +1838 1 12 43 0.13107200000000000000e6 +1838 1 17 48 -0.26214400000000000000e6 +1838 1 23 38 -0.16384000000000000000e5 +1838 1 26 41 0.32768000000000000000e5 +1838 1 28 43 0.65536000000000000000e5 +1838 2 2 32 -0.16384000000000000000e5 +1838 2 8 22 0.13107200000000000000e6 +1838 2 8 32 0.32768000000000000000e5 +1838 2 12 26 -0.65536000000000000000e5 +1838 2 16 30 -0.32768000000000000000e5 +1838 3 2 31 -0.65536000000000000000e5 +1838 3 14 27 -0.13107200000000000000e6 +1838 4 4 16 -0.13107200000000000000e6 +1838 4 7 19 -0.65536000000000000000e5 +1839 2 4 34 -0.32768000000000000000e5 +1839 2 8 33 0.32768000000000000000e5 +1840 2 8 22 -0.32768000000000000000e5 +1840 2 8 34 0.32768000000000000000e5 +1840 4 4 16 0.32768000000000000000e5 +1840 4 7 19 0.32768000000000000000e5 +1841 2 4 34 -0.32768000000000000000e5 +1841 2 8 35 0.32768000000000000000e5 +1841 3 5 34 -0.32768000000000000000e5 +1841 3 17 30 -0.32768000000000000000e5 +1841 3 18 31 0.65536000000000000000e5 +1841 3 22 27 -0.32768000000000000000e5 +1842 1 2 17 -0.32768000000000000000e5 +1842 1 3 18 -0.32768000000000000000e5 +1842 1 4 19 -0.13107200000000000000e6 +1842 1 10 17 0.65536000000000000000e5 +1842 1 11 14 -0.32768000000000000000e5 +1842 1 20 27 0.13107200000000000000e6 +1842 1 28 35 -0.65536000000000000000e5 +1842 2 6 12 -0.32768000000000000000e5 +1842 2 9 10 0.32768000000000000000e5 +1842 2 9 11 -0.32768000000000000000e5 +1842 2 10 24 -0.65536000000000000000e5 +1842 3 2 15 0.65536000000000000000e5 +1842 3 8 13 0.65536000000000000000e5 +1842 3 11 24 -0.65536000000000000000e5 +1843 2 8 14 -0.32768000000000000000e5 +1843 2 9 13 0.32768000000000000000e5 +1844 1 4 19 0.32768000000000000000e5 +1844 1 5 20 0.65536000000000000000e5 +1844 1 6 21 0.65536000000000000000e5 +1844 1 10 17 0.65536000000000000000e5 +1844 1 10 21 -0.13107200000000000000e6 +1844 1 11 18 0.32768000000000000000e5 +1844 2 8 14 0.32768000000000000000e5 +1844 2 9 14 0.32768000000000000000e5 +1844 2 9 15 0.65536000000000000000e5 +1845 1 2 33 -0.65536000000000000000e5 +1845 1 5 52 0.65536000000000000000e5 +1845 1 7 38 0.32768000000000000000e5 +1845 1 8 23 -0.32768000000000000000e5 +1845 1 10 25 -0.32768000000000000000e5 +1845 1 10 41 0.65536000000000000000e5 +1845 1 11 42 0.65536000000000000000e5 +1845 1 12 43 0.13107200000000000000e6 +1845 1 17 48 -0.26214400000000000000e6 +1845 1 26 41 0.32768000000000000000e5 +1845 1 28 43 0.65536000000000000000e5 +1845 2 8 22 0.13107200000000000000e6 +1845 2 9 16 0.32768000000000000000e5 +1845 2 12 26 -0.65536000000000000000e5 +1845 2 16 30 -0.32768000000000000000e5 +1845 3 1 30 0.32768000000000000000e5 +1845 3 2 31 -0.65536000000000000000e5 +1845 3 6 19 -0.32768000000000000000e5 +1845 3 7 20 0.65536000000000000000e5 +1845 3 8 21 0.65536000000000000000e5 +1845 3 14 27 -0.13107200000000000000e6 +1845 4 2 14 -0.32768000000000000000e5 +1845 4 3 15 -0.32768000000000000000e5 +1845 4 4 16 -0.13107200000000000000e6 +1845 4 6 18 -0.32768000000000000000e5 +1845 4 7 19 -0.65536000000000000000e5 +1846 1 1 48 -0.16384000000000000000e5 +1846 1 2 49 -0.16384000000000000000e5 +1846 1 5 52 0.65536000000000000000e5 +1846 1 11 42 0.65536000000000000000e5 +1846 1 12 43 0.13107200000000000000e6 +1846 1 17 48 -0.26214400000000000000e6 +1846 1 23 38 -0.16384000000000000000e5 +1846 1 26 41 0.32768000000000000000e5 +1846 1 28 43 0.65536000000000000000e5 +1846 2 2 32 -0.16384000000000000000e5 +1846 2 8 22 0.13107200000000000000e6 +1846 2 9 17 0.32768000000000000000e5 +1846 2 12 26 -0.65536000000000000000e5 +1846 2 16 30 -0.32768000000000000000e5 +1846 3 2 31 -0.65536000000000000000e5 +1846 3 14 27 -0.13107200000000000000e6 +1846 4 3 15 -0.32768000000000000000e5 +1846 4 4 16 -0.13107200000000000000e6 +1846 4 6 18 -0.32768000000000000000e5 +1846 4 7 19 -0.65536000000000000000e5 +1847 1 1 48 -0.16384000000000000000e5 +1847 1 2 49 -0.16384000000000000000e5 +1847 1 4 35 -0.13107200000000000000e6 +1847 1 5 52 0.65536000000000000000e5 +1847 1 6 29 0.32768000000000000000e5 +1847 1 8 39 -0.32768000000000000000e5 +1847 1 10 41 0.13107200000000000000e6 +1847 1 11 42 0.13107200000000000000e6 +1847 1 12 43 0.13107200000000000000e6 +1847 1 17 48 -0.26214400000000000000e6 +1847 1 23 38 -0.16384000000000000000e5 +1847 1 26 41 0.32768000000000000000e5 +1847 1 28 43 0.65536000000000000000e5 +1847 2 2 32 -0.16384000000000000000e5 +1847 2 8 22 0.19660800000000000000e6 +1847 2 9 18 0.32768000000000000000e5 +1847 2 12 26 -0.65536000000000000000e5 +1847 2 16 30 -0.32768000000000000000e5 +1847 3 2 31 -0.65536000000000000000e5 +1847 3 6 19 -0.32768000000000000000e5 +1847 3 8 21 0.13107200000000000000e6 +1847 3 9 22 0.65536000000000000000e5 +1847 3 14 27 -0.13107200000000000000e6 +1847 4 3 15 -0.32768000000000000000e5 +1847 4 4 16 -0.13107200000000000000e6 +1847 4 6 18 -0.32768000000000000000e5 +1847 4 7 19 -0.65536000000000000000e5 +1848 1 6 29 0.32768000000000000000e5 +1848 1 10 25 0.32768000000000000000e5 +1848 1 11 26 0.32768000000000000000e5 +1848 1 11 42 -0.65536000000000000000e5 +1848 2 9 19 0.32768000000000000000e5 +1848 3 9 22 -0.65536000000000000000e5 +1849 1 2 33 0.32768000000000000000e5 +1849 1 4 35 0.13107200000000000000e6 +1849 1 11 42 -0.32768000000000000000e5 +1849 1 18 25 0.65536000000000000000e5 +1849 1 28 35 -0.13107200000000000000e6 +1849 2 8 22 -0.32768000000000000000e5 +1849 2 9 20 0.32768000000000000000e5 +1849 2 9 23 0.65536000000000000000e5 +1849 3 9 22 -0.32768000000000000000e5 +1849 3 11 24 -0.13107200000000000000e6 +1850 2 8 22 -0.32768000000000000000e5 +1850 2 9 21 0.32768000000000000000e5 +1851 1 4 35 0.65536000000000000000e5 +1851 1 10 41 -0.32768000000000000000e5 +1851 1 11 30 0.32768000000000000000e5 +1851 1 18 25 -0.65536000000000000000e5 +1851 2 8 22 -0.32768000000000000000e5 +1851 2 9 22 0.32768000000000000000e5 +1851 3 8 21 -0.32768000000000000000e5 +1852 1 4 35 0.32768000000000000000e5 +1852 1 5 36 -0.65536000000000000000e5 +1852 1 15 30 0.32768000000000000000e5 +1852 1 18 25 0.32768000000000000000e5 +1852 2 9 24 0.32768000000000000000e5 +1853 1 1 48 -0.16384000000000000000e5 +1853 1 2 49 -0.16384000000000000000e5 +1853 1 5 52 0.65536000000000000000e5 +1853 1 11 42 0.65536000000000000000e5 +1853 1 12 43 0.13107200000000000000e6 +1853 1 17 48 -0.26214400000000000000e6 +1853 1 23 38 -0.16384000000000000000e5 +1853 1 26 41 0.32768000000000000000e5 +1853 1 28 43 0.65536000000000000000e5 +1853 2 2 32 -0.16384000000000000000e5 +1853 2 8 22 0.13107200000000000000e6 +1853 2 9 26 0.32768000000000000000e5 +1853 2 12 26 -0.65536000000000000000e5 +1853 2 16 30 -0.32768000000000000000e5 +1853 3 2 31 -0.65536000000000000000e5 +1853 3 14 27 -0.13107200000000000000e6 +1853 4 4 16 -0.13107200000000000000e6 +1853 4 6 18 -0.32768000000000000000e5 +1853 4 7 19 -0.65536000000000000000e5 +1854 1 1 48 -0.16384000000000000000e5 +1854 1 2 49 -0.16384000000000000000e5 +1854 1 5 52 0.65536000000000000000e5 +1854 1 8 39 -0.32768000000000000000e5 +1854 1 10 41 0.13107200000000000000e6 +1854 1 11 42 0.13107200000000000000e6 +1854 1 12 43 0.13107200000000000000e6 +1854 1 17 48 -0.39321600000000000000e6 +1854 1 23 38 -0.16384000000000000000e5 +1854 1 26 29 0.32768000000000000000e5 +1854 1 26 41 0.32768000000000000000e5 +1854 1 28 43 0.65536000000000000000e5 +1854 2 2 32 -0.16384000000000000000e5 +1854 2 8 22 0.19660800000000000000e6 +1854 2 9 27 0.32768000000000000000e5 +1854 2 12 26 -0.65536000000000000000e5 +1854 2 16 30 -0.32768000000000000000e5 +1854 3 2 31 -0.65536000000000000000e5 +1854 3 14 27 -0.26214400000000000000e6 +1854 4 4 16 -0.19660800000000000000e6 +1854 4 6 18 -0.32768000000000000000e5 +1854 4 7 19 -0.65536000000000000000e5 +1855 1 6 43 0.32768000000000000000e5 +1855 1 9 40 0.32768000000000000000e5 +1855 1 11 42 -0.65536000000000000000e5 +1855 1 26 29 0.32768000000000000000e5 +1855 2 9 28 0.32768000000000000000e5 +1856 2 8 22 -0.32768000000000000000e5 +1856 2 9 29 0.32768000000000000000e5 +1856 4 4 16 0.32768000000000000000e5 +1857 1 10 41 -0.32768000000000000000e5 +1857 1 17 48 0.65536000000000000000e5 +1857 1 18 25 -0.65536000000000000000e5 +1857 1 26 33 0.32768000000000000000e5 +1857 2 8 22 -0.32768000000000000000e5 +1857 2 9 30 0.32768000000000000000e5 +1857 3 14 19 0.65536000000000000000e5 +1857 3 14 27 0.65536000000000000000e5 +1857 4 4 16 0.32768000000000000000e5 +1858 2 9 31 0.32768000000000000000e5 +1858 2 14 28 -0.32768000000000000000e5 +1859 2 4 34 -0.32768000000000000000e5 +1859 2 9 32 0.32768000000000000000e5 +1860 2 9 33 0.32768000000000000000e5 +1860 2 22 28 -0.32768000000000000000e5 +1861 1 5 52 0.32768000000000000000e5 +1861 1 14 45 -0.13107200000000000000e6 +1861 1 17 48 0.65536000000000000000e5 +1861 1 18 49 0.65536000000000000000e5 +1861 1 28 43 0.32768000000000000000e5 +1861 1 33 40 0.32768000000000000000e5 +1861 2 9 34 0.32768000000000000000e5 +1861 2 24 30 0.65536000000000000000e5 +1861 3 15 28 0.13107200000000000000e6 +1862 2 9 35 0.32768000000000000000e5 +1862 2 28 30 -0.32768000000000000000e5 +1863 2 1 15 -0.16384000000000000000e5 +1863 2 10 10 0.32768000000000000000e5 +1864 2 7 13 -0.32768000000000000000e5 +1864 2 10 11 0.32768000000000000000e5 +1865 2 10 12 0.32768000000000000000e5 +1865 2 10 24 -0.32768000000000000000e5 +1865 4 6 10 -0.32768000000000000000e5 +1866 1 4 19 -0.16384000000000000000e5 +1866 1 7 16 0.16384000000000000000e5 +1866 1 10 17 0.16384000000000000000e5 +1866 1 12 19 -0.65536000000000000000e5 +1866 1 13 16 0.65536000000000000000e5 +1866 1 20 27 0.32768000000000000000e5 +1866 1 28 35 -0.16384000000000000000e5 +1866 2 1 15 0.16384000000000000000e5 +1866 2 7 13 -0.16384000000000000000e5 +1866 2 10 13 0.32768000000000000000e5 +1866 3 2 15 0.16384000000000000000e5 +1866 3 8 13 0.16384000000000000000e5 +1866 3 11 24 -0.16384000000000000000e5 +1866 4 6 10 0.16384000000000000000e5 +1867 2 10 14 0.32768000000000000000e5 +1867 2 11 13 -0.32768000000000000000e5 +1868 1 4 19 0.81920000000000000000e4 +1868 1 5 20 0.81920000000000000000e4 +1868 1 10 17 0.16384000000000000000e5 +1868 1 12 19 0.32768000000000000000e5 +1868 1 13 16 0.16384000000000000000e5 +1868 1 13 20 0.32768000000000000000e5 +1868 1 16 19 -0.65536000000000000000e5 +1868 1 20 27 0.16384000000000000000e5 +1868 1 28 35 -0.81920000000000000000e4 +1868 2 8 14 0.81920000000000000000e4 +1868 2 10 15 0.32768000000000000000e5 +1868 2 11 13 0.16384000000000000000e5 +1868 3 2 15 0.81920000000000000000e4 +1868 3 8 13 0.81920000000000000000e4 +1868 3 11 24 -0.81920000000000000000e4 +1868 4 6 10 0.81920000000000000000e4 +1869 2 6 20 -0.32768000000000000000e5 +1869 2 10 16 0.32768000000000000000e5 +1870 1 1 32 0.32768000000000000000e5 +1870 1 2 17 -0.65536000000000000000e5 +1870 1 3 34 0.65536000000000000000e5 +1870 1 10 41 -0.32768000000000000000e5 +1870 2 7 21 -0.32768000000000000000e5 +1870 2 10 17 0.32768000000000000000e5 +1870 3 1 14 0.65536000000000000000e5 +1870 3 8 21 -0.32768000000000000000e5 +1871 2 7 21 -0.32768000000000000000e5 +1871 2 10 18 0.32768000000000000000e5 +1872 1 2 33 0.32768000000000000000e5 +1872 1 4 35 0.13107200000000000000e6 +1872 1 11 42 -0.32768000000000000000e5 +1872 1 18 25 0.65536000000000000000e5 +1872 1 28 35 -0.13107200000000000000e6 +1872 2 8 22 -0.32768000000000000000e5 +1872 2 9 23 0.65536000000000000000e5 +1872 2 10 19 0.32768000000000000000e5 +1872 3 9 22 -0.32768000000000000000e5 +1872 3 11 24 -0.13107200000000000000e6 +1873 1 2 17 0.32768000000000000000e5 +1873 1 3 34 0.32768000000000000000e5 +1873 1 12 27 0.32768000000000000000e5 +1873 1 16 31 -0.13107200000000000000e6 +1873 1 20 27 0.13107200000000000000e6 +1873 1 28 35 -0.65536000000000000000e5 +1873 2 7 13 0.65536000000000000000e5 +1873 2 10 20 0.32768000000000000000e5 +1873 2 10 24 -0.65536000000000000000e5 +1873 3 1 14 -0.32768000000000000000e5 +1873 3 11 24 -0.65536000000000000000e5 +1873 4 8 8 -0.13107200000000000000e6 +1874 1 2 17 0.32768000000000000000e5 +1874 1 3 34 0.32768000000000000000e5 +1874 1 4 19 0.65536000000000000000e5 +1874 1 4 35 -0.32768000000000000000e5 +1874 1 18 25 -0.32768000000000000000e5 +1874 1 20 27 -0.13107200000000000000e6 +1874 1 28 35 0.13107200000000000000e6 +1874 2 9 23 -0.32768000000000000000e5 +1874 2 10 21 0.32768000000000000000e5 +1874 2 10 24 0.65536000000000000000e5 +1874 3 1 14 -0.32768000000000000000e5 +1874 3 8 13 -0.65536000000000000000e5 +1874 3 11 24 0.13107200000000000000e6 +1875 1 3 34 0.32768000000000000000e5 +1875 1 4 19 -0.65536000000000000000e5 +1875 1 18 25 -0.32768000000000000000e5 +1875 1 28 35 0.65536000000000000000e5 +1875 2 9 23 -0.32768000000000000000e5 +1875 2 10 22 0.32768000000000000000e5 +1875 3 8 13 0.65536000000000000000e5 +1875 3 11 24 0.65536000000000000000e5 +1876 2 7 13 -0.32768000000000000000e5 +1876 2 10 23 0.32768000000000000000e5 +1876 4 8 8 0.65536000000000000000e5 +1877 1 4 19 -0.16384000000000000000e5 +1877 1 5 20 -0.16384000000000000000e5 +1877 1 10 17 -0.32768000000000000000e5 +1877 1 13 16 -0.32768000000000000000e5 +1877 1 16 31 0.32768000000000000000e5 +1877 1 17 32 0.32768000000000000000e5 +1877 1 28 35 0.16384000000000000000e5 +1877 2 8 14 -0.16384000000000000000e5 +1877 2 10 25 0.32768000000000000000e5 +1877 2 11 13 -0.32768000000000000000e5 +1877 3 2 15 -0.16384000000000000000e5 +1877 3 8 13 -0.16384000000000000000e5 +1877 3 10 15 0.65536000000000000000e5 +1877 3 11 24 0.16384000000000000000e5 +1877 4 6 10 -0.16384000000000000000e5 +1878 2 1 31 -0.32768000000000000000e5 +1878 2 10 26 0.32768000000000000000e5 +1879 1 2 33 -0.32768000000000000000e5 +1879 1 3 34 0.65536000000000000000e5 +1879 1 11 42 0.32768000000000000000e5 +1879 1 12 43 0.65536000000000000000e5 +1879 1 16 47 -0.65536000000000000000e5 +1879 1 17 48 -0.65536000000000000000e5 +1879 2 7 21 -0.32768000000000000000e5 +1879 2 8 22 0.32768000000000000000e5 +1879 2 10 27 0.32768000000000000000e5 +1879 2 12 26 -0.32768000000000000000e5 +1879 3 7 20 -0.32768000000000000000e5 +1879 3 8 21 -0.32768000000000000000e5 +1879 3 13 26 -0.65536000000000000000e5 +1879 3 14 27 -0.65536000000000000000e5 +1879 4 4 16 -0.32768000000000000000e5 +1880 2 10 28 0.32768000000000000000e5 +1880 2 12 26 -0.32768000000000000000e5 +1881 1 2 17 0.32768000000000000000e5 +1881 1 4 19 0.65536000000000000000e5 +1881 1 12 43 0.32768000000000000000e5 +1881 1 16 47 0.32768000000000000000e5 +1881 1 20 27 -0.13107200000000000000e6 +1881 1 28 35 0.65536000000000000000e5 +1881 2 10 24 0.65536000000000000000e5 +1881 2 10 29 0.32768000000000000000e5 +1881 3 1 14 -0.32768000000000000000e5 +1881 3 6 23 -0.32768000000000000000e5 +1881 3 8 13 -0.65536000000000000000e5 +1881 3 10 23 0.65536000000000000000e5 +1881 3 11 24 0.65536000000000000000e5 +1881 3 13 26 0.32768000000000000000e5 +1882 1 12 43 0.32768000000000000000e5 +1882 1 13 44 -0.65536000000000000000e5 +1882 1 16 47 0.32768000000000000000e5 +1882 1 17 48 0.32768000000000000000e5 +1882 2 10 30 0.32768000000000000000e5 +1882 3 13 26 0.32768000000000000000e5 +1882 3 14 27 0.32768000000000000000e5 +1883 2 10 24 -0.32768000000000000000e5 +1883 2 10 31 0.32768000000000000000e5 +1883 4 10 14 0.32768000000000000000e5 +1884 2 10 33 0.32768000000000000000e5 +1884 2 20 34 -0.32768000000000000000e5 +1884 4 8 20 -0.32768000000000000000e5 +1885 1 5 52 -0.16384000000000000000e5 +1885 1 11 42 0.16384000000000000000e5 +1885 1 12 43 0.32768000000000000000e5 +1885 1 16 47 0.32768000000000000000e5 +1885 1 17 48 0.32768000000000000000e5 +1885 1 34 41 -0.65536000000000000000e5 +1885 2 10 34 0.32768000000000000000e5 +1885 2 12 26 -0.16384000000000000000e5 +1885 2 20 34 0.16384000000000000000e5 +1885 3 2 31 -0.16384000000000000000e5 +1885 3 14 27 -0.32768000000000000000e5 +1885 4 7 19 0.16384000000000000000e5 +1885 4 8 20 0.16384000000000000000e5 +1886 2 10 35 0.32768000000000000000e5 +1886 2 20 34 -0.32768000000000000000e5 +1887 2 10 24 -0.16384000000000000000e5 +1887 2 11 11 0.32768000000000000000e5 +1887 4 6 10 -0.16384000000000000000e5 +1888 2 8 14 -0.32768000000000000000e5 +1888 2 11 12 0.32768000000000000000e5 +1889 1 6 21 -0.32768000000000000000e5 +1889 1 10 17 0.16384000000000000000e5 +1889 1 10 21 0.65536000000000000000e5 +1889 1 13 20 -0.65536000000000000000e5 +1889 1 20 27 0.32768000000000000000e5 +1889 1 28 35 -0.16384000000000000000e5 +1889 2 9 15 -0.32768000000000000000e5 +1889 2 11 14 0.32768000000000000000e5 +1889 3 2 15 0.16384000000000000000e5 +1889 3 8 13 0.16384000000000000000e5 +1889 3 11 24 -0.16384000000000000000e5 +1889 4 6 10 0.16384000000000000000e5 +1890 1 4 19 0.81920000000000000000e4 +1890 1 5 20 0.81920000000000000000e4 +1890 1 10 17 0.16384000000000000000e5 +1890 1 13 16 0.16384000000000000000e5 +1890 1 17 32 0.32768000000000000000e5 +1890 1 18 33 0.16384000000000000000e5 +1890 1 19 34 -0.65536000000000000000e5 +1890 1 20 27 0.32768000000000000000e5 +1890 1 28 35 -0.81920000000000000000e4 +1890 1 29 36 0.32768000000000000000e5 +1890 2 8 14 0.81920000000000000000e4 +1890 2 11 13 0.16384000000000000000e5 +1890 2 11 15 0.32768000000000000000e5 +1890 2 11 25 0.16384000000000000000e5 +1890 2 14 24 0.16384000000000000000e5 +1890 3 2 15 0.81920000000000000000e4 +1890 3 8 13 0.81920000000000000000e4 +1890 3 10 15 -0.32768000000000000000e5 +1890 3 11 24 -0.81920000000000000000e4 +1890 3 12 25 0.32768000000000000000e5 +1890 4 6 10 0.81920000000000000000e4 +1890 4 10 10 -0.65536000000000000000e5 +1891 1 1 32 0.32768000000000000000e5 +1891 1 2 17 -0.65536000000000000000e5 +1891 1 3 34 0.65536000000000000000e5 +1891 1 10 41 -0.32768000000000000000e5 +1891 2 7 21 -0.32768000000000000000e5 +1891 2 11 16 0.32768000000000000000e5 +1891 3 1 14 0.65536000000000000000e5 +1891 3 8 21 -0.32768000000000000000e5 +1892 2 7 21 -0.32768000000000000000e5 +1892 2 11 17 0.32768000000000000000e5 +1893 1 2 33 0.32768000000000000000e5 +1893 1 4 35 0.13107200000000000000e6 +1893 1 11 42 -0.32768000000000000000e5 +1893 1 18 25 0.65536000000000000000e5 +1893 1 28 35 -0.13107200000000000000e6 +1893 2 8 22 -0.32768000000000000000e5 +1893 2 9 23 0.65536000000000000000e5 +1893 2 11 18 0.32768000000000000000e5 +1893 3 9 22 -0.32768000000000000000e5 +1893 3 11 24 -0.13107200000000000000e6 +1894 2 8 22 -0.32768000000000000000e5 +1894 2 11 19 0.32768000000000000000e5 +1895 1 2 17 0.32768000000000000000e5 +1895 1 3 34 0.32768000000000000000e5 +1895 1 4 19 0.65536000000000000000e5 +1895 1 4 35 -0.32768000000000000000e5 +1895 1 18 25 -0.32768000000000000000e5 +1895 1 20 27 -0.13107200000000000000e6 +1895 1 28 35 0.13107200000000000000e6 +1895 2 9 23 -0.32768000000000000000e5 +1895 2 10 24 0.65536000000000000000e5 +1895 2 11 20 0.32768000000000000000e5 +1895 3 1 14 -0.32768000000000000000e5 +1895 3 8 13 -0.65536000000000000000e5 +1895 3 11 24 0.13107200000000000000e6 +1896 1 3 34 0.32768000000000000000e5 +1896 1 4 19 -0.65536000000000000000e5 +1896 1 18 25 -0.32768000000000000000e5 +1896 1 28 35 0.65536000000000000000e5 +1896 2 9 23 -0.32768000000000000000e5 +1896 2 11 21 0.32768000000000000000e5 +1896 3 8 13 0.65536000000000000000e5 +1896 3 11 24 0.65536000000000000000e5 +1897 2 9 23 -0.32768000000000000000e5 +1897 2 11 22 0.32768000000000000000e5 +1898 2 10 24 -0.32768000000000000000e5 +1898 2 11 23 0.32768000000000000000e5 +1899 1 4 19 0.32768000000000000000e5 +1899 1 5 36 0.32768000000000000000e5 +1899 1 17 32 -0.65536000000000000000e5 +1899 1 28 35 0.32768000000000000000e5 +1899 2 11 24 0.32768000000000000000e5 +1899 3 8 13 -0.32768000000000000000e5 +1899 3 11 24 0.32768000000000000000e5 +1900 1 2 33 -0.32768000000000000000e5 +1900 1 3 34 0.65536000000000000000e5 +1900 1 11 42 0.32768000000000000000e5 +1900 1 12 43 0.65536000000000000000e5 +1900 1 16 47 -0.65536000000000000000e5 +1900 1 17 48 -0.65536000000000000000e5 +1900 2 7 21 -0.32768000000000000000e5 +1900 2 8 22 0.32768000000000000000e5 +1900 2 11 26 0.32768000000000000000e5 +1900 2 12 26 -0.32768000000000000000e5 +1900 3 7 20 -0.32768000000000000000e5 +1900 3 8 21 -0.32768000000000000000e5 +1900 3 13 26 -0.65536000000000000000e5 +1900 3 14 27 -0.65536000000000000000e5 +1900 4 4 16 -0.32768000000000000000e5 +1901 2 11 27 0.32768000000000000000e5 +1901 2 12 26 -0.32768000000000000000e5 +1902 2 8 22 -0.32768000000000000000e5 +1902 2 11 28 0.32768000000000000000e5 +1902 4 4 16 0.32768000000000000000e5 +1903 1 12 43 0.32768000000000000000e5 +1903 1 13 44 -0.65536000000000000000e5 +1903 1 16 47 0.32768000000000000000e5 +1903 1 17 48 0.32768000000000000000e5 +1903 2 11 29 0.32768000000000000000e5 +1903 3 13 26 0.32768000000000000000e5 +1903 3 14 27 0.32768000000000000000e5 +1904 1 12 43 0.32768000000000000000e5 +1904 1 17 48 0.32768000000000000000e5 +1904 1 18 25 0.32768000000000000000e5 +1904 1 28 35 -0.65536000000000000000e5 +1904 2 11 30 0.32768000000000000000e5 +1904 3 14 19 -0.32768000000000000000e5 +1904 3 14 27 0.32768000000000000000e5 +1905 1 13 44 0.32768000000000000000e5 +1905 1 14 45 0.32768000000000000000e5 +1905 1 19 42 -0.65536000000000000000e5 +1905 1 28 35 0.32768000000000000000e5 +1905 2 11 31 0.32768000000000000000e5 +1906 2 11 32 0.32768000000000000000e5 +1906 2 20 34 -0.32768000000000000000e5 +1906 4 8 20 -0.32768000000000000000e5 +1907 2 8 22 -0.32768000000000000000e5 +1907 2 11 33 0.32768000000000000000e5 +1907 4 4 16 0.32768000000000000000e5 +1907 4 7 19 0.32768000000000000000e5 +1908 1 5 52 -0.16384000000000000000e5 +1908 1 11 42 0.16384000000000000000e5 +1908 1 12 43 0.32768000000000000000e5 +1908 1 13 52 -0.65536000000000000000e5 +1908 1 14 45 0.65536000000000000000e5 +1908 1 18 49 -0.32768000000000000000e5 +1908 2 11 34 0.32768000000000000000e5 +1908 2 12 26 -0.16384000000000000000e5 +1908 2 20 34 0.16384000000000000000e5 +1908 2 24 30 -0.32768000000000000000e5 +1908 3 2 31 -0.16384000000000000000e5 +1908 3 14 27 -0.32768000000000000000e5 +1908 3 15 28 -0.65536000000000000000e5 +1908 4 7 19 0.16384000000000000000e5 +1908 4 8 20 0.16384000000000000000e5 +1909 1 17 48 -0.65536000000000000000e5 +1909 1 28 43 0.32768000000000000000e5 +1909 1 32 47 0.32768000000000000000e5 +1909 1 33 48 0.32768000000000000000e5 +1909 2 11 35 0.32768000000000000000e5 +1909 3 18 31 -0.32768000000000000000e5 +1909 3 24 29 0.65536000000000000000e5 +1910 1 4 19 0.16384000000000000000e5 +1910 1 5 20 0.32768000000000000000e5 +1910 1 6 21 0.32768000000000000000e5 +1910 1 10 17 0.32768000000000000000e5 +1910 1 10 21 -0.65536000000000000000e5 +1910 1 11 18 0.16384000000000000000e5 +1910 2 8 14 0.16384000000000000000e5 +1910 2 9 15 0.32768000000000000000e5 +1910 2 12 12 0.32768000000000000000e5 +1911 1 6 21 -0.32768000000000000000e5 +1911 1 10 17 0.16384000000000000000e5 +1911 1 10 21 0.65536000000000000000e5 +1911 1 13 20 -0.65536000000000000000e5 +1911 1 20 27 0.32768000000000000000e5 +1911 1 28 35 -0.16384000000000000000e5 +1911 2 9 15 -0.32768000000000000000e5 +1911 2 12 13 0.32768000000000000000e5 +1911 3 2 15 0.16384000000000000000e5 +1911 3 8 13 0.16384000000000000000e5 +1911 3 11 24 -0.16384000000000000000e5 +1911 4 6 10 0.16384000000000000000e5 +1912 2 9 15 -0.32768000000000000000e5 +1912 2 12 14 0.32768000000000000000e5 +1913 2 12 15 0.32768000000000000000e5 +1913 2 14 14 -0.65536000000000000000e5 +1914 2 7 21 -0.32768000000000000000e5 +1914 2 12 16 0.32768000000000000000e5 +1915 1 2 33 0.32768000000000000000e5 +1915 1 4 35 0.13107200000000000000e6 +1915 1 11 42 -0.32768000000000000000e5 +1915 1 18 25 0.65536000000000000000e5 +1915 1 28 35 -0.13107200000000000000e6 +1915 2 8 22 -0.32768000000000000000e5 +1915 2 9 23 0.65536000000000000000e5 +1915 2 12 17 0.32768000000000000000e5 +1915 3 9 22 -0.32768000000000000000e5 +1915 3 11 24 -0.13107200000000000000e6 +1916 2 8 22 -0.32768000000000000000e5 +1916 2 12 18 0.32768000000000000000e5 +1917 1 4 35 0.65536000000000000000e5 +1917 1 10 41 -0.32768000000000000000e5 +1917 1 11 30 0.32768000000000000000e5 +1917 1 18 25 -0.65536000000000000000e5 +1917 2 8 22 -0.32768000000000000000e5 +1917 2 12 19 0.32768000000000000000e5 +1917 3 8 21 -0.32768000000000000000e5 +1918 1 3 34 0.32768000000000000000e5 +1918 1 4 19 -0.65536000000000000000e5 +1918 1 18 25 -0.32768000000000000000e5 +1918 1 28 35 0.65536000000000000000e5 +1918 2 9 23 -0.32768000000000000000e5 +1918 2 12 20 0.32768000000000000000e5 +1918 3 8 13 0.65536000000000000000e5 +1918 3 11 24 0.65536000000000000000e5 +1919 2 9 23 -0.32768000000000000000e5 +1919 2 12 21 0.32768000000000000000e5 +1920 1 4 35 0.32768000000000000000e5 +1920 1 5 36 -0.65536000000000000000e5 +1920 1 15 30 0.32768000000000000000e5 +1920 1 18 25 0.32768000000000000000e5 +1920 2 12 22 0.32768000000000000000e5 +1921 1 4 19 0.32768000000000000000e5 +1921 1 5 36 0.32768000000000000000e5 +1921 1 17 32 -0.65536000000000000000e5 +1921 1 28 35 0.32768000000000000000e5 +1921 2 12 23 0.32768000000000000000e5 +1921 3 8 13 -0.32768000000000000000e5 +1921 3 11 24 0.32768000000000000000e5 +1922 2 9 25 -0.32768000000000000000e5 +1922 2 12 24 0.32768000000000000000e5 +1923 2 12 25 0.32768000000000000000e5 +1923 2 14 24 -0.32768000000000000000e5 +1924 2 8 22 -0.32768000000000000000e5 +1924 2 12 27 0.32768000000000000000e5 +1924 4 4 16 0.32768000000000000000e5 +1925 1 10 41 -0.32768000000000000000e5 +1925 1 17 48 0.65536000000000000000e5 +1925 1 18 25 -0.65536000000000000000e5 +1925 1 26 33 0.32768000000000000000e5 +1925 2 8 22 -0.32768000000000000000e5 +1925 2 12 28 0.32768000000000000000e5 +1925 3 14 19 0.65536000000000000000e5 +1925 3 14 27 0.65536000000000000000e5 +1925 4 4 16 0.32768000000000000000e5 +1926 1 12 43 0.32768000000000000000e5 +1926 1 17 48 0.32768000000000000000e5 +1926 1 18 25 0.32768000000000000000e5 +1926 1 28 35 -0.65536000000000000000e5 +1926 2 12 29 0.32768000000000000000e5 +1926 3 14 19 -0.32768000000000000000e5 +1926 3 14 27 0.32768000000000000000e5 +1927 2 12 30 0.32768000000000000000e5 +1927 2 14 28 -0.32768000000000000000e5 +1928 1 11 46 0.32768000000000000000e5 +1928 1 14 45 0.32768000000000000000e5 +1928 1 28 35 0.32768000000000000000e5 +1928 1 29 36 -0.65536000000000000000e5 +1928 2 12 31 0.32768000000000000000e5 +1929 2 8 22 -0.32768000000000000000e5 +1929 2 12 32 0.32768000000000000000e5 +1929 4 4 16 0.32768000000000000000e5 +1929 4 7 19 0.32768000000000000000e5 +1930 1 5 52 0.32768000000000000000e5 +1930 1 14 45 -0.13107200000000000000e6 +1930 1 17 48 0.65536000000000000000e5 +1930 1 18 49 0.65536000000000000000e5 +1930 1 28 43 0.32768000000000000000e5 +1930 1 33 40 0.32768000000000000000e5 +1930 2 12 33 0.32768000000000000000e5 +1930 2 24 30 0.65536000000000000000e5 +1930 3 15 28 0.13107200000000000000e6 +1931 2 12 34 0.32768000000000000000e5 +1931 2 24 30 -0.32768000000000000000e5 +1932 1 15 54 0.32768000000000000000e5 +1932 1 28 43 0.32768000000000000000e5 +1932 1 33 48 0.32768000000000000000e5 +1932 1 34 49 -0.65536000000000000000e5 +1932 2 12 35 0.32768000000000000000e5 +1932 3 18 31 -0.32768000000000000000e5 +1933 1 4 19 0.40960000000000000000e4 +1933 1 5 20 0.40960000000000000000e4 +1933 1 10 17 0.81920000000000000000e4 +1933 1 12 19 0.16384000000000000000e5 +1933 1 13 16 0.81920000000000000000e4 +1933 1 13 20 0.16384000000000000000e5 +1933 1 16 19 -0.32768000000000000000e5 +1933 1 20 27 0.81920000000000000000e4 +1933 1 28 35 -0.40960000000000000000e4 +1933 2 8 14 0.40960000000000000000e4 +1933 2 11 13 0.81920000000000000000e4 +1933 2 13 13 0.32768000000000000000e5 +1933 3 2 15 0.40960000000000000000e4 +1933 3 8 13 0.40960000000000000000e4 +1933 3 11 24 -0.40960000000000000000e4 +1933 4 6 10 0.40960000000000000000e4 +1934 1 4 19 0.81920000000000000000e4 +1934 1 5 20 0.81920000000000000000e4 +1934 1 10 17 0.16384000000000000000e5 +1934 1 13 16 0.16384000000000000000e5 +1934 1 17 32 0.32768000000000000000e5 +1934 1 18 33 0.16384000000000000000e5 +1934 1 19 34 -0.65536000000000000000e5 +1934 1 20 27 0.32768000000000000000e5 +1934 1 28 35 -0.81920000000000000000e4 +1934 1 29 36 0.32768000000000000000e5 +1934 2 8 14 0.81920000000000000000e4 +1934 2 11 13 0.16384000000000000000e5 +1934 2 11 25 0.16384000000000000000e5 +1934 2 13 14 0.32768000000000000000e5 +1934 2 14 24 0.16384000000000000000e5 +1934 3 2 15 0.81920000000000000000e4 +1934 3 8 13 0.81920000000000000000e4 +1934 3 10 15 -0.32768000000000000000e5 +1934 3 11 24 -0.81920000000000000000e4 +1934 3 12 25 0.32768000000000000000e5 +1934 4 6 10 0.81920000000000000000e4 +1934 4 10 10 -0.65536000000000000000e5 +1935 1 2 17 0.32768000000000000000e5 +1935 1 3 34 0.32768000000000000000e5 +1935 1 12 27 0.32768000000000000000e5 +1935 1 16 31 -0.13107200000000000000e6 +1935 1 20 27 0.13107200000000000000e6 +1935 1 28 35 -0.65536000000000000000e5 +1935 2 7 13 0.65536000000000000000e5 +1935 2 10 24 -0.65536000000000000000e5 +1935 2 13 16 0.32768000000000000000e5 +1935 3 1 14 -0.32768000000000000000e5 +1935 3 11 24 -0.65536000000000000000e5 +1935 4 8 8 -0.13107200000000000000e6 +1936 1 2 17 0.32768000000000000000e5 +1936 1 3 34 0.32768000000000000000e5 +1936 1 4 19 0.65536000000000000000e5 +1936 1 4 35 -0.32768000000000000000e5 +1936 1 18 25 -0.32768000000000000000e5 +1936 1 20 27 -0.13107200000000000000e6 +1936 1 28 35 0.13107200000000000000e6 +1936 2 9 23 -0.32768000000000000000e5 +1936 2 10 24 0.65536000000000000000e5 +1936 2 13 17 0.32768000000000000000e5 +1936 3 1 14 -0.32768000000000000000e5 +1936 3 8 13 -0.65536000000000000000e5 +1936 3 11 24 0.13107200000000000000e6 +1937 1 3 34 0.32768000000000000000e5 +1937 1 4 19 -0.65536000000000000000e5 +1937 1 18 25 -0.32768000000000000000e5 +1937 1 28 35 0.65536000000000000000e5 +1937 2 9 23 -0.32768000000000000000e5 +1937 2 13 18 0.32768000000000000000e5 +1937 3 8 13 0.65536000000000000000e5 +1937 3 11 24 0.65536000000000000000e5 +1938 2 9 23 -0.32768000000000000000e5 +1938 2 13 19 0.32768000000000000000e5 +1939 2 7 13 -0.32768000000000000000e5 +1939 2 13 20 0.32768000000000000000e5 +1939 4 8 8 0.65536000000000000000e5 +1940 2 10 24 -0.32768000000000000000e5 +1940 2 13 21 0.32768000000000000000e5 +1941 1 4 19 0.32768000000000000000e5 +1941 1 5 36 0.32768000000000000000e5 +1941 1 17 32 -0.65536000000000000000e5 +1941 1 28 35 0.32768000000000000000e5 +1941 2 13 22 0.32768000000000000000e5 +1941 3 8 13 -0.32768000000000000000e5 +1941 3 11 24 0.32768000000000000000e5 +1942 1 4 19 -0.16384000000000000000e5 +1942 1 5 20 -0.16384000000000000000e5 +1942 1 10 17 -0.32768000000000000000e5 +1942 1 13 16 -0.32768000000000000000e5 +1942 1 16 31 0.32768000000000000000e5 +1942 1 17 32 0.32768000000000000000e5 +1942 1 28 35 0.16384000000000000000e5 +1942 2 8 14 -0.16384000000000000000e5 +1942 2 11 13 -0.32768000000000000000e5 +1942 2 13 23 0.32768000000000000000e5 +1942 3 2 15 -0.16384000000000000000e5 +1942 3 8 13 -0.16384000000000000000e5 +1942 3 10 15 0.65536000000000000000e5 +1942 3 11 24 0.16384000000000000000e5 +1942 4 6 10 -0.16384000000000000000e5 +1943 2 11 25 -0.32768000000000000000e5 +1943 2 13 24 0.32768000000000000000e5 +1944 1 4 19 0.81920000000000000000e4 +1944 1 5 20 0.81920000000000000000e4 +1944 1 10 17 0.16384000000000000000e5 +1944 1 13 16 0.16384000000000000000e5 +1944 1 17 32 0.32768000000000000000e5 +1944 1 18 33 0.16384000000000000000e5 +1944 1 19 34 -0.65536000000000000000e5 +1944 1 20 27 0.32768000000000000000e5 +1944 1 28 35 -0.81920000000000000000e4 +1944 1 29 36 0.32768000000000000000e5 +1944 2 8 14 0.81920000000000000000e4 +1944 2 11 13 0.16384000000000000000e5 +1944 2 11 25 0.16384000000000000000e5 +1944 2 13 25 0.32768000000000000000e5 +1944 2 14 24 0.16384000000000000000e5 +1944 3 2 15 0.81920000000000000000e4 +1944 3 8 13 0.81920000000000000000e4 +1944 3 10 15 -0.32768000000000000000e5 +1944 3 11 24 -0.81920000000000000000e4 +1944 3 12 25 0.32768000000000000000e5 +1944 4 6 10 0.81920000000000000000e4 +1945 1 2 17 0.32768000000000000000e5 +1945 1 4 19 0.65536000000000000000e5 +1945 1 12 43 0.32768000000000000000e5 +1945 1 16 47 0.32768000000000000000e5 +1945 1 20 27 -0.13107200000000000000e6 +1945 1 28 35 0.65536000000000000000e5 +1945 2 10 24 0.65536000000000000000e5 +1945 2 13 26 0.32768000000000000000e5 +1945 3 1 14 -0.32768000000000000000e5 +1945 3 6 23 -0.32768000000000000000e5 +1945 3 8 13 -0.65536000000000000000e5 +1945 3 10 23 0.65536000000000000000e5 +1945 3 11 24 0.65536000000000000000e5 +1945 3 13 26 0.32768000000000000000e5 +1946 1 12 43 0.32768000000000000000e5 +1946 1 13 44 -0.65536000000000000000e5 +1946 1 16 47 0.32768000000000000000e5 +1946 1 17 48 0.32768000000000000000e5 +1946 2 13 27 0.32768000000000000000e5 +1946 3 13 26 0.32768000000000000000e5 +1946 3 14 27 0.32768000000000000000e5 +1947 1 12 43 0.32768000000000000000e5 +1947 1 17 48 0.32768000000000000000e5 +1947 1 18 25 0.32768000000000000000e5 +1947 1 28 35 -0.65536000000000000000e5 +1947 2 13 28 0.32768000000000000000e5 +1947 3 14 19 -0.32768000000000000000e5 +1947 3 14 27 0.32768000000000000000e5 +1948 2 10 24 -0.32768000000000000000e5 +1948 2 13 29 0.32768000000000000000e5 +1948 4 10 14 0.32768000000000000000e5 +1949 1 13 44 0.32768000000000000000e5 +1949 1 14 45 0.32768000000000000000e5 +1949 1 19 42 -0.65536000000000000000e5 +1949 1 28 35 0.32768000000000000000e5 +1949 2 13 30 0.32768000000000000000e5 +1950 2 13 31 0.32768000000000000000e5 +1950 2 15 29 -0.32768000000000000000e5 +1951 1 5 52 -0.16384000000000000000e5 +1951 1 11 42 0.16384000000000000000e5 +1951 1 12 43 0.32768000000000000000e5 +1951 1 16 47 0.32768000000000000000e5 +1951 1 17 48 0.32768000000000000000e5 +1951 1 34 41 -0.65536000000000000000e5 +1951 2 12 26 -0.16384000000000000000e5 +1951 2 13 32 0.32768000000000000000e5 +1951 2 20 34 0.16384000000000000000e5 +1951 3 2 31 -0.16384000000000000000e5 +1951 3 14 27 -0.32768000000000000000e5 +1951 4 7 19 0.16384000000000000000e5 +1951 4 8 20 0.16384000000000000000e5 +1952 1 5 52 -0.16384000000000000000e5 +1952 1 11 42 0.16384000000000000000e5 +1952 1 12 43 0.32768000000000000000e5 +1952 1 13 52 -0.65536000000000000000e5 +1952 1 14 45 0.65536000000000000000e5 +1952 1 18 49 -0.32768000000000000000e5 +1952 2 12 26 -0.16384000000000000000e5 +1952 2 13 33 0.32768000000000000000e5 +1952 2 20 34 0.16384000000000000000e5 +1952 2 24 30 -0.32768000000000000000e5 +1952 3 2 31 -0.16384000000000000000e5 +1952 3 14 27 -0.32768000000000000000e5 +1952 3 15 28 -0.65536000000000000000e5 +1952 4 7 19 0.16384000000000000000e5 +1952 4 8 20 0.16384000000000000000e5 +1953 1 13 52 0.32768000000000000000e5 +1953 1 14 45 0.32768000000000000000e5 +1953 1 19 50 -0.65536000000000000000e5 +1953 1 34 41 0.32768000000000000000e5 +1953 2 13 34 0.32768000000000000000e5 +1953 3 15 28 -0.32768000000000000000e5 +1954 1 16 55 -0.65536000000000000000e5 +1954 1 17 48 0.32768000000000000000e5 +1954 1 28 43 0.16384000000000000000e5 +1954 1 32 47 0.16384000000000000000e5 +1954 1 34 49 0.32768000000000000000e5 +1954 1 37 44 0.16384000000000000000e5 +1954 2 13 35 0.32768000000000000000e5 +1954 2 20 34 0.16384000000000000000e5 +1954 3 18 31 -0.16384000000000000000e5 +1954 3 24 29 -0.32768000000000000000e5 +1955 1 2 17 0.32768000000000000000e5 +1955 1 3 34 0.32768000000000000000e5 +1955 1 4 19 0.65536000000000000000e5 +1955 1 4 35 -0.32768000000000000000e5 +1955 1 18 25 -0.32768000000000000000e5 +1955 1 20 27 -0.13107200000000000000e6 +1955 1 28 35 0.13107200000000000000e6 +1955 2 9 23 -0.32768000000000000000e5 +1955 2 10 24 0.65536000000000000000e5 +1955 2 14 16 0.32768000000000000000e5 +1955 3 1 14 -0.32768000000000000000e5 +1955 3 8 13 -0.65536000000000000000e5 +1955 3 11 24 0.13107200000000000000e6 +1956 1 3 34 0.32768000000000000000e5 +1956 1 4 19 -0.65536000000000000000e5 +1956 1 18 25 -0.32768000000000000000e5 +1956 1 28 35 0.65536000000000000000e5 +1956 2 9 23 -0.32768000000000000000e5 +1956 2 14 17 0.32768000000000000000e5 +1956 3 8 13 0.65536000000000000000e5 +1956 3 11 24 0.65536000000000000000e5 +1957 2 9 23 -0.32768000000000000000e5 +1957 2 14 18 0.32768000000000000000e5 +1958 1 4 35 0.32768000000000000000e5 +1958 1 5 36 -0.65536000000000000000e5 +1958 1 15 30 0.32768000000000000000e5 +1958 1 18 25 0.32768000000000000000e5 +1958 2 14 19 0.32768000000000000000e5 +1959 2 10 24 -0.32768000000000000000e5 +1959 2 14 20 0.32768000000000000000e5 +1960 1 4 19 0.32768000000000000000e5 +1960 1 5 36 0.32768000000000000000e5 +1960 1 17 32 -0.65536000000000000000e5 +1960 1 28 35 0.32768000000000000000e5 +1960 2 14 21 0.32768000000000000000e5 +1960 3 8 13 -0.32768000000000000000e5 +1960 3 11 24 0.32768000000000000000e5 +1961 2 9 25 -0.32768000000000000000e5 +1961 2 14 22 0.32768000000000000000e5 +1962 2 11 25 -0.32768000000000000000e5 +1962 2 14 23 0.32768000000000000000e5 +1963 1 14 21 -0.65536000000000000000e5 +1963 1 17 32 0.32768000000000000000e5 +1963 1 18 33 0.16384000000000000000e5 +1963 1 18 35 0.32768000000000000000e5 +1963 1 20 27 0.16384000000000000000e5 +1963 1 29 36 0.32768000000000000000e5 +1963 2 11 25 0.16384000000000000000e5 +1963 2 14 24 0.16384000000000000000e5 +1963 2 14 25 0.32768000000000000000e5 +1963 3 12 25 0.32768000000000000000e5 +1963 3 14 15 0.65536000000000000000e5 +1964 1 12 43 0.32768000000000000000e5 +1964 1 13 44 -0.65536000000000000000e5 +1964 1 16 47 0.32768000000000000000e5 +1964 1 17 48 0.32768000000000000000e5 +1964 2 14 26 0.32768000000000000000e5 +1964 3 13 26 0.32768000000000000000e5 +1964 3 14 27 0.32768000000000000000e5 +1965 1 12 43 0.32768000000000000000e5 +1965 1 17 48 0.32768000000000000000e5 +1965 1 18 25 0.32768000000000000000e5 +1965 1 28 35 -0.65536000000000000000e5 +1965 2 14 27 0.32768000000000000000e5 +1965 3 14 19 -0.32768000000000000000e5 +1965 3 14 27 0.32768000000000000000e5 +1966 1 13 44 0.32768000000000000000e5 +1966 1 14 45 0.32768000000000000000e5 +1966 1 19 42 -0.65536000000000000000e5 +1966 1 28 35 0.32768000000000000000e5 +1966 2 14 29 0.32768000000000000000e5 +1967 1 11 46 0.32768000000000000000e5 +1967 1 14 45 0.32768000000000000000e5 +1967 1 28 35 0.32768000000000000000e5 +1967 1 29 36 -0.65536000000000000000e5 +1967 2 14 30 0.32768000000000000000e5 +1968 1 15 46 0.32768000000000000000e5 +1968 1 17 32 -0.32768000000000000000e5 +1968 1 18 33 -0.32768000000000000000e5 +1968 1 19 42 0.32768000000000000000e5 +1968 2 14 24 -0.32768000000000000000e5 +1968 2 14 31 0.32768000000000000000e5 +1968 3 12 25 -0.32768000000000000000e5 +1968 3 15 24 0.65536000000000000000e5 +1969 1 5 52 -0.16384000000000000000e5 +1969 1 11 42 0.16384000000000000000e5 +1969 1 12 43 0.32768000000000000000e5 +1969 1 13 52 -0.65536000000000000000e5 +1969 1 14 45 0.65536000000000000000e5 +1969 1 18 49 -0.32768000000000000000e5 +1969 2 12 26 -0.16384000000000000000e5 +1969 2 14 32 0.32768000000000000000e5 +1969 2 20 34 0.16384000000000000000e5 +1969 2 24 30 -0.32768000000000000000e5 +1969 3 2 31 -0.16384000000000000000e5 +1969 3 14 27 -0.32768000000000000000e5 +1969 3 15 28 -0.65536000000000000000e5 +1969 4 7 19 0.16384000000000000000e5 +1969 4 8 20 0.16384000000000000000e5 +1970 2 14 33 0.32768000000000000000e5 +1970 2 24 30 -0.32768000000000000000e5 +1971 2 14 34 0.32768000000000000000e5 +1971 2 15 33 -0.32768000000000000000e5 +1972 2 14 35 0.32768000000000000000e5 +1972 2 24 34 -0.32768000000000000000e5 +1973 2 7 13 -0.32768000000000000000e5 +1973 2 15 16 0.32768000000000000000e5 +1973 4 8 8 0.65536000000000000000e5 +1974 2 10 24 -0.32768000000000000000e5 +1974 2 15 17 0.32768000000000000000e5 +1975 1 4 19 0.32768000000000000000e5 +1975 1 5 36 0.32768000000000000000e5 +1975 1 17 32 -0.65536000000000000000e5 +1975 1 28 35 0.32768000000000000000e5 +1975 2 15 18 0.32768000000000000000e5 +1975 3 8 13 -0.32768000000000000000e5 +1975 3 11 24 0.32768000000000000000e5 +1976 2 9 25 -0.32768000000000000000e5 +1976 2 15 19 0.32768000000000000000e5 +1977 1 4 19 -0.16384000000000000000e5 +1977 1 5 20 -0.16384000000000000000e5 +1977 1 10 17 -0.32768000000000000000e5 +1977 1 13 16 -0.32768000000000000000e5 +1977 1 16 31 0.32768000000000000000e5 +1977 1 17 32 0.32768000000000000000e5 +1977 1 28 35 0.16384000000000000000e5 +1977 2 8 14 -0.16384000000000000000e5 +1977 2 11 13 -0.32768000000000000000e5 +1977 2 15 20 0.32768000000000000000e5 +1977 3 2 15 -0.16384000000000000000e5 +1977 3 8 13 -0.16384000000000000000e5 +1977 3 10 15 0.65536000000000000000e5 +1977 3 11 24 0.16384000000000000000e5 +1977 4 6 10 -0.16384000000000000000e5 +1978 2 11 25 -0.32768000000000000000e5 +1978 2 15 21 0.32768000000000000000e5 +1979 2 14 24 -0.32768000000000000000e5 +1979 2 15 22 0.32768000000000000000e5 +1980 1 4 19 0.81920000000000000000e4 +1980 1 5 20 0.81920000000000000000e4 +1980 1 10 17 0.16384000000000000000e5 +1980 1 13 16 0.16384000000000000000e5 +1980 1 17 32 0.32768000000000000000e5 +1980 1 18 33 0.16384000000000000000e5 +1980 1 19 34 -0.65536000000000000000e5 +1980 1 20 27 0.32768000000000000000e5 +1980 1 28 35 -0.81920000000000000000e4 +1980 1 29 36 0.32768000000000000000e5 +1980 2 8 14 0.81920000000000000000e4 +1980 2 11 13 0.16384000000000000000e5 +1980 2 11 25 0.16384000000000000000e5 +1980 2 14 24 0.16384000000000000000e5 +1980 2 15 23 0.32768000000000000000e5 +1980 3 2 15 0.81920000000000000000e4 +1980 3 8 13 0.81920000000000000000e4 +1980 3 10 15 -0.32768000000000000000e5 +1980 3 11 24 -0.81920000000000000000e4 +1980 3 12 25 0.32768000000000000000e5 +1980 4 6 10 0.81920000000000000000e4 +1981 1 14 21 -0.65536000000000000000e5 +1981 1 17 32 0.32768000000000000000e5 +1981 1 18 33 0.16384000000000000000e5 +1981 1 18 35 0.32768000000000000000e5 +1981 1 20 27 0.16384000000000000000e5 +1981 1 29 36 0.32768000000000000000e5 +1981 2 11 25 0.16384000000000000000e5 +1981 2 14 24 0.16384000000000000000e5 +1981 2 15 24 0.32768000000000000000e5 +1981 3 12 25 0.32768000000000000000e5 +1981 3 14 15 0.65536000000000000000e5 +1982 2 10 24 -0.32768000000000000000e5 +1982 2 15 26 0.32768000000000000000e5 +1982 4 10 14 0.32768000000000000000e5 +1983 1 13 44 0.32768000000000000000e5 +1983 1 14 45 0.32768000000000000000e5 +1983 1 19 42 -0.65536000000000000000e5 +1983 1 28 35 0.32768000000000000000e5 +1983 2 15 27 0.32768000000000000000e5 +1984 1 11 46 0.32768000000000000000e5 +1984 1 14 45 0.32768000000000000000e5 +1984 1 28 35 0.32768000000000000000e5 +1984 1 29 36 -0.65536000000000000000e5 +1984 2 15 28 0.32768000000000000000e5 +1985 1 15 46 0.32768000000000000000e5 +1985 1 17 32 -0.32768000000000000000e5 +1985 1 18 33 -0.32768000000000000000e5 +1985 1 19 42 0.32768000000000000000e5 +1985 2 14 24 -0.32768000000000000000e5 +1985 2 15 30 0.32768000000000000000e5 +1985 3 12 25 -0.32768000000000000000e5 +1985 3 15 24 0.65536000000000000000e5 +1986 1 4 19 -0.81920000000000000000e4 +1986 1 13 44 0.81920000000000000000e4 +1986 1 17 32 0.16384000000000000000e5 +1986 1 18 33 0.16384000000000000000e5 +1986 1 19 42 0.16384000000000000000e5 +1986 1 20 27 0.16384000000000000000e5 +1986 1 21 44 -0.65536000000000000000e5 +1986 1 29 36 0.32768000000000000000e5 +1986 1 33 36 0.32768000000000000000e5 +1986 2 14 24 0.16384000000000000000e5 +1986 2 15 29 0.16384000000000000000e5 +1986 2 15 31 0.32768000000000000000e5 +1986 3 8 13 0.81920000000000000000e4 +1986 3 10 23 -0.81920000000000000000e4 +1986 3 11 24 -0.81920000000000000000e4 +1986 3 12 25 0.16384000000000000000e5 +1986 3 15 24 -0.32768000000000000000e5 +1986 4 10 14 -0.81920000000000000000e4 +1987 1 13 52 0.32768000000000000000e5 +1987 1 14 45 0.32768000000000000000e5 +1987 1 19 50 -0.65536000000000000000e5 +1987 1 34 41 0.32768000000000000000e5 +1987 2 15 32 0.32768000000000000000e5 +1987 3 15 28 -0.32768000000000000000e5 +1988 2 15 34 0.32768000000000000000e5 +1988 2 25 31 -0.32768000000000000000e5 +1989 2 15 35 0.32768000000000000000e5 +1989 2 31 31 -0.65536000000000000000e5 +1990 1 1 48 0.32768000000000000000e5 +1990 1 2 33 -0.13107200000000000000e6 +1990 1 3 34 0.26214400000000000000e6 +1990 1 3 50 0.65536000000000000000e5 +1990 1 5 52 -0.13107200000000000000e6 +1990 1 7 38 -0.65536000000000000000e5 +1990 1 8 39 -0.65536000000000000000e5 +1990 1 10 41 -0.13107200000000000000e6 +1990 1 11 42 0.13107200000000000000e6 +1990 1 12 43 0.26214400000000000000e6 +1990 1 16 47 -0.26214400000000000000e6 +1990 1 22 37 0.32768000000000000000e5 +1990 1 23 38 0.32768000000000000000e5 +1990 1 28 43 -0.13107200000000000000e6 +1990 2 7 21 -0.13107200000000000000e6 +1990 2 10 32 0.13107200000000000000e6 +1990 2 12 26 -0.13107200000000000000e6 +1990 2 16 17 0.32768000000000000000e5 +1990 3 1 30 -0.65536000000000000000e5 +1990 3 2 31 -0.13107200000000000000e6 +1990 3 7 20 -0.13107200000000000000e6 +1990 3 8 21 -0.13107200000000000000e6 +1990 3 14 27 -0.26214400000000000000e6 +1990 4 5 17 -0.65536000000000000000e5 +1990 4 7 19 0.13107200000000000000e6 +1990 4 11 11 -0.65536000000000000000e5 +1991 2 3 17 -0.32768000000000000000e5 +1991 2 16 18 0.32768000000000000000e5 +1991 4 1 13 0.32768000000000000000e5 +1992 2 4 26 -0.32768000000000000000e5 +1992 2 16 19 0.32768000000000000000e5 +1993 1 1 24 -0.16384000000000000000e5 +1993 1 1 32 -0.65536000000000000000e5 +1993 1 1 40 -0.16384000000000000000e5 +1993 1 1 48 0.16384000000000000000e5 +1993 1 2 17 -0.13107200000000000000e6 +1993 1 2 33 -0.65536000000000000000e5 +1993 1 3 34 0.13107200000000000000e6 +1993 1 3 50 0.32768000000000000000e5 +1993 1 5 52 -0.65536000000000000000e5 +1993 1 6 37 -0.16384000000000000000e5 +1993 1 7 22 -0.32768000000000000000e5 +1993 1 7 38 0.32768000000000000000e5 +1993 1 8 23 -0.32768000000000000000e5 +1993 1 10 41 -0.65536000000000000000e5 +1993 1 11 42 0.13107200000000000000e6 +1993 1 12 27 0.13107200000000000000e6 +1993 1 12 43 0.26214400000000000000e6 +1993 1 16 47 -0.13107200000000000000e6 +1993 1 17 48 -0.13107200000000000000e6 +1993 1 22 37 0.16384000000000000000e5 +1993 1 23 38 0.16384000000000000000e5 +1993 1 28 43 -0.65536000000000000000e5 +1993 2 1 7 -0.32768000000000000000e5 +1993 2 1 31 0.65536000000000000000e5 +1993 2 2 16 -0.16384000000000000000e5 +1993 2 3 17 0.16384000000000000000e5 +1993 2 4 26 -0.16384000000000000000e5 +1993 2 6 20 -0.65536000000000000000e5 +1993 2 7 21 -0.65536000000000000000e5 +1993 2 8 22 0.65536000000000000000e5 +1993 2 10 32 0.65536000000000000000e5 +1993 2 12 26 -0.13107200000000000000e6 +1993 2 16 16 0.32768000000000000000e5 +1993 2 16 20 0.32768000000000000000e5 +1993 3 1 14 0.13107200000000000000e6 +1993 3 1 16 -0.16384000000000000000e5 +1993 3 1 30 -0.32768000000000000000e5 +1993 3 2 31 -0.65536000000000000000e5 +1993 3 3 16 -0.16384000000000000000e5 +1993 3 6 23 0.13107200000000000000e6 +1993 3 7 20 -0.13107200000000000000e6 +1993 3 8 21 -0.65536000000000000000e5 +1993 3 14 27 -0.26214400000000000000e6 +1993 4 1 5 0.32768000000000000000e5 +1993 4 1 13 -0.16384000000000000000e5 +1993 4 4 16 -0.65536000000000000000e5 +1993 4 5 17 -0.32768000000000000000e5 +1993 4 7 19 0.65536000000000000000e5 +1993 4 11 11 -0.32768000000000000000e5 +1994 1 1 48 0.16384000000000000000e5 +1994 1 2 33 0.65536000000000000000e5 +1994 1 2 49 0.16384000000000000000e5 +1994 1 3 34 -0.13107200000000000000e6 +1994 1 7 38 0.32768000000000000000e5 +1994 1 8 39 0.32768000000000000000e5 +1994 1 10 41 0.65536000000000000000e5 +1994 1 23 38 0.16384000000000000000e5 +1994 2 2 32 0.16384000000000000000e5 +1994 2 7 21 0.65536000000000000000e5 +1994 2 16 21 0.32768000000000000000e5 +1994 3 1 30 0.32768000000000000000e5 +1994 3 7 20 0.65536000000000000000e5 +1994 3 8 21 0.65536000000000000000e5 +1995 1 5 52 0.65536000000000000000e5 +1995 1 9 40 -0.32768000000000000000e5 +1995 1 10 41 0.65536000000000000000e5 +1995 1 17 48 -0.13107200000000000000e6 +1995 1 26 41 0.32768000000000000000e5 +1995 1 28 43 0.65536000000000000000e5 +1995 2 8 22 0.65536000000000000000e5 +1995 2 16 22 0.32768000000000000000e5 +1995 2 16 30 -0.32768000000000000000e5 +1995 3 1 30 0.32768000000000000000e5 +1995 3 2 31 -0.65536000000000000000e5 +1995 4 4 16 -0.65536000000000000000e5 +1995 4 6 18 -0.32768000000000000000e5 +1995 4 7 19 -0.65536000000000000000e5 +1996 2 1 31 -0.32768000000000000000e5 +1996 2 16 23 0.32768000000000000000e5 +1997 1 2 33 -0.32768000000000000000e5 +1997 1 3 34 0.65536000000000000000e5 +1997 1 11 42 0.32768000000000000000e5 +1997 1 12 43 0.65536000000000000000e5 +1997 1 16 47 -0.65536000000000000000e5 +1997 1 17 48 -0.65536000000000000000e5 +1997 2 7 21 -0.32768000000000000000e5 +1997 2 8 22 0.32768000000000000000e5 +1997 2 12 26 -0.32768000000000000000e5 +1997 2 16 24 0.32768000000000000000e5 +1997 3 7 20 -0.32768000000000000000e5 +1997 3 8 21 -0.32768000000000000000e5 +1997 3 13 26 -0.65536000000000000000e5 +1997 3 14 27 -0.65536000000000000000e5 +1997 4 4 16 -0.32768000000000000000e5 +1998 1 2 17 0.32768000000000000000e5 +1998 1 4 19 0.65536000000000000000e5 +1998 1 12 43 0.32768000000000000000e5 +1998 1 16 47 0.32768000000000000000e5 +1998 1 20 27 -0.13107200000000000000e6 +1998 1 28 35 0.65536000000000000000e5 +1998 2 10 24 0.65536000000000000000e5 +1998 2 16 25 0.32768000000000000000e5 +1998 3 1 14 -0.32768000000000000000e5 +1998 3 6 23 -0.32768000000000000000e5 +1998 3 8 13 -0.65536000000000000000e5 +1998 3 10 23 0.65536000000000000000e5 +1998 3 11 24 0.65536000000000000000e5 +1998 3 13 26 0.32768000000000000000e5 +1999 1 1 48 0.32768000000000000000e5 +1999 1 2 33 -0.13107200000000000000e6 +1999 1 3 34 0.26214400000000000000e6 +1999 1 3 50 0.65536000000000000000e5 +1999 1 5 52 -0.13107200000000000000e6 +1999 1 7 38 -0.65536000000000000000e5 +1999 1 8 39 -0.65536000000000000000e5 +1999 1 10 41 -0.13107200000000000000e6 +1999 1 11 42 0.13107200000000000000e6 +1999 1 12 43 0.26214400000000000000e6 +1999 1 16 47 -0.26214400000000000000e6 +1999 1 22 37 0.32768000000000000000e5 +1999 1 23 38 0.32768000000000000000e5 +1999 1 28 43 -0.13107200000000000000e6 +1999 2 7 21 -0.13107200000000000000e6 +1999 2 10 32 0.13107200000000000000e6 +1999 2 12 26 -0.13107200000000000000e6 +1999 2 16 26 0.32768000000000000000e5 +1999 3 1 30 -0.65536000000000000000e5 +1999 3 2 31 -0.13107200000000000000e6 +1999 3 7 20 -0.13107200000000000000e6 +1999 3 8 21 -0.13107200000000000000e6 +1999 3 14 27 -0.26214400000000000000e6 +1999 4 5 17 -0.65536000000000000000e5 +1999 4 7 19 0.13107200000000000000e6 +2000 2 2 32 -0.32768000000000000000e5 +2000 2 16 27 0.32768000000000000000e5 +2001 1 2 49 0.32768000000000000000e5 +2001 1 3 50 -0.65536000000000000000e5 +2001 1 23 38 0.32768000000000000000e5 +2001 1 24 39 0.32768000000000000000e5 +2001 2 16 28 0.32768000000000000000e5 +2002 1 1 48 0.16384000000000000000e5 +2002 1 2 33 0.65536000000000000000e5 +2002 1 2 49 0.16384000000000000000e5 +2002 1 3 34 -0.13107200000000000000e6 +2002 1 7 38 0.32768000000000000000e5 +2002 1 8 39 0.32768000000000000000e5 +2002 1 10 41 0.65536000000000000000e5 +2002 1 23 38 0.16384000000000000000e5 +2002 2 2 32 0.16384000000000000000e5 +2002 2 7 21 0.65536000000000000000e5 +2002 2 16 29 0.32768000000000000000e5 +2002 3 1 30 0.32768000000000000000e5 +2002 3 7 20 0.65536000000000000000e5 +2002 3 8 21 0.65536000000000000000e5 +2002 4 5 17 0.32768000000000000000e5 +2003 2 10 32 -0.32768000000000000000e5 +2003 2 16 31 0.32768000000000000000e5 +2004 2 1 35 -0.32768000000000000000e5 +2004 2 16 32 0.32768000000000000000e5 +2005 2 16 33 0.32768000000000000000e5 +2005 2 26 32 -0.32768000000000000000e5 +2005 4 17 17 -0.65536000000000000000e5 +2006 1 3 50 -0.32768000000000000000e5 +2006 1 7 54 0.32768000000000000000e5 +2006 1 11 42 0.65536000000000000000e5 +2006 1 12 43 0.13107200000000000000e6 +2006 1 17 48 -0.13107200000000000000e6 +2006 1 37 44 -0.65536000000000000000e5 +2006 2 8 22 0.65536000000000000000e5 +2006 2 12 26 -0.65536000000000000000e5 +2006 2 16 30 -0.32768000000000000000e5 +2006 2 16 34 0.32768000000000000000e5 +2006 3 2 31 -0.65536000000000000000e5 +2006 3 14 27 -0.13107200000000000000e6 +2006 3 16 29 -0.32768000000000000000e5 +2006 3 17 30 -0.32768000000000000000e5 +2006 4 4 16 -0.65536000000000000000e5 +2007 2 16 35 0.32768000000000000000e5 +2007 2 26 32 -0.32768000000000000000e5 +2008 2 3 17 -0.16384000000000000000e5 +2008 2 17 17 0.32768000000000000000e5 +2008 4 1 13 0.16384000000000000000e5 +2009 2 4 26 -0.32768000000000000000e5 +2009 2 17 18 0.32768000000000000000e5 +2010 1 3 26 -0.32768000000000000000e5 +2010 1 6 37 0.32768000000000000000e5 +2010 1 9 40 0.65536000000000000000e5 +2010 1 10 25 -0.65536000000000000000e5 +2010 2 4 18 -0.32768000000000000000e5 +2010 2 17 19 0.32768000000000000000e5 +2010 3 4 17 -0.32768000000000000000e5 +2010 3 5 18 -0.32768000000000000000e5 +2010 3 6 19 -0.65536000000000000000e5 +2010 3 8 21 0.13107200000000000000e6 +2010 4 3 15 -0.65536000000000000000e5 +2011 1 1 48 0.16384000000000000000e5 +2011 1 2 33 0.65536000000000000000e5 +2011 1 2 49 0.16384000000000000000e5 +2011 1 3 34 -0.13107200000000000000e6 +2011 1 7 38 0.32768000000000000000e5 +2011 1 8 39 0.32768000000000000000e5 +2011 1 10 41 0.65536000000000000000e5 +2011 1 23 38 0.16384000000000000000e5 +2011 2 2 32 0.16384000000000000000e5 +2011 2 7 21 0.65536000000000000000e5 +2011 2 17 20 0.32768000000000000000e5 +2011 3 1 30 0.32768000000000000000e5 +2011 3 7 20 0.65536000000000000000e5 +2011 3 8 21 0.65536000000000000000e5 +2012 1 5 52 0.65536000000000000000e5 +2012 1 9 40 -0.32768000000000000000e5 +2012 1 10 41 0.65536000000000000000e5 +2012 1 17 48 -0.13107200000000000000e6 +2012 1 26 41 0.32768000000000000000e5 +2012 1 28 43 0.65536000000000000000e5 +2012 2 8 22 0.65536000000000000000e5 +2012 2 16 30 -0.32768000000000000000e5 +2012 2 17 21 0.32768000000000000000e5 +2012 3 1 30 0.32768000000000000000e5 +2012 3 2 31 -0.65536000000000000000e5 +2012 4 4 16 -0.65536000000000000000e5 +2012 4 6 18 -0.32768000000000000000e5 +2012 4 7 19 -0.65536000000000000000e5 +2013 1 1 48 -0.16384000000000000000e5 +2013 1 2 49 -0.16384000000000000000e5 +2013 1 5 52 0.65536000000000000000e5 +2013 1 11 42 0.65536000000000000000e5 +2013 1 12 43 0.13107200000000000000e6 +2013 1 17 48 -0.26214400000000000000e6 +2013 1 23 38 -0.16384000000000000000e5 +2013 1 26 41 0.32768000000000000000e5 +2013 1 28 43 0.65536000000000000000e5 +2013 2 2 32 -0.16384000000000000000e5 +2013 2 8 22 0.13107200000000000000e6 +2013 2 12 26 -0.65536000000000000000e5 +2013 2 16 30 -0.32768000000000000000e5 +2013 2 17 22 0.32768000000000000000e5 +2013 3 2 31 -0.65536000000000000000e5 +2013 3 14 27 -0.13107200000000000000e6 +2013 4 4 16 -0.13107200000000000000e6 +2013 4 6 18 -0.32768000000000000000e5 +2013 4 7 19 -0.65536000000000000000e5 +2014 1 2 33 -0.32768000000000000000e5 +2014 1 3 34 0.65536000000000000000e5 +2014 1 11 42 0.32768000000000000000e5 +2014 1 12 43 0.65536000000000000000e5 +2014 1 16 47 -0.65536000000000000000e5 +2014 1 17 48 -0.65536000000000000000e5 +2014 2 7 21 -0.32768000000000000000e5 +2014 2 8 22 0.32768000000000000000e5 +2014 2 12 26 -0.32768000000000000000e5 +2014 2 17 23 0.32768000000000000000e5 +2014 3 7 20 -0.32768000000000000000e5 +2014 3 8 21 -0.32768000000000000000e5 +2014 3 13 26 -0.65536000000000000000e5 +2014 3 14 27 -0.65536000000000000000e5 +2014 4 4 16 -0.32768000000000000000e5 +2015 2 12 26 -0.32768000000000000000e5 +2015 2 17 24 0.32768000000000000000e5 +2016 1 12 43 0.32768000000000000000e5 +2016 1 13 44 -0.65536000000000000000e5 +2016 1 16 47 0.32768000000000000000e5 +2016 1 17 48 0.32768000000000000000e5 +2016 2 17 25 0.32768000000000000000e5 +2016 3 13 26 0.32768000000000000000e5 +2016 3 14 27 0.32768000000000000000e5 +2017 2 2 32 -0.32768000000000000000e5 +2017 2 17 26 0.32768000000000000000e5 +2018 1 2 49 0.32768000000000000000e5 +2018 1 3 50 -0.65536000000000000000e5 +2018 1 23 38 0.32768000000000000000e5 +2018 1 24 39 0.32768000000000000000e5 +2018 2 17 27 0.32768000000000000000e5 +2019 2 3 33 -0.32768000000000000000e5 +2019 2 17 28 0.32768000000000000000e5 +2020 2 16 30 -0.32768000000000000000e5 +2020 2 17 29 0.32768000000000000000e5 +2021 1 1 48 -0.16384000000000000000e5 +2021 1 2 49 -0.16384000000000000000e5 +2021 1 5 52 0.65536000000000000000e5 +2021 1 11 42 0.65536000000000000000e5 +2021 1 12 43 0.13107200000000000000e6 +2021 1 17 48 -0.26214400000000000000e6 +2021 1 23 38 -0.16384000000000000000e5 +2021 1 26 41 0.32768000000000000000e5 +2021 1 28 43 0.65536000000000000000e5 +2021 2 2 32 -0.16384000000000000000e5 +2021 2 8 22 0.13107200000000000000e6 +2021 2 12 26 -0.65536000000000000000e5 +2021 2 16 30 -0.32768000000000000000e5 +2021 2 17 30 0.32768000000000000000e5 +2021 3 2 31 -0.65536000000000000000e5 +2021 3 14 27 -0.13107200000000000000e6 +2021 4 4 16 -0.13107200000000000000e6 +2021 4 7 19 -0.65536000000000000000e5 +2022 2 17 31 0.32768000000000000000e5 +2022 2 20 34 -0.32768000000000000000e5 +2022 4 8 20 -0.32768000000000000000e5 +2023 2 17 32 0.32768000000000000000e5 +2023 2 26 32 -0.32768000000000000000e5 +2023 4 17 17 -0.65536000000000000000e5 +2024 2 17 33 0.32768000000000000000e5 +2024 2 18 32 -0.32768000000000000000e5 +2025 1 1 48 -0.16384000000000000000e5 +2025 1 2 49 -0.16384000000000000000e5 +2025 1 3 50 -0.32768000000000000000e5 +2025 1 7 54 0.32768000000000000000e5 +2025 1 11 42 0.65536000000000000000e5 +2025 1 12 43 0.13107200000000000000e6 +2025 1 17 48 -0.13107200000000000000e6 +2025 1 23 38 -0.16384000000000000000e5 +2025 1 26 41 0.32768000000000000000e5 +2025 1 32 47 -0.65536000000000000000e5 +2025 2 2 32 -0.16384000000000000000e5 +2025 2 8 22 0.65536000000000000000e5 +2025 2 12 26 -0.65536000000000000000e5 +2025 2 16 30 -0.32768000000000000000e5 +2025 2 17 34 0.32768000000000000000e5 +2025 3 2 31 -0.65536000000000000000e5 +2025 3 14 27 -0.13107200000000000000e6 +2025 3 17 30 -0.32768000000000000000e5 +2025 3 22 27 -0.32768000000000000000e5 +2025 4 4 16 -0.65536000000000000000e5 +2026 1 2 49 -0.32768000000000000000e5 +2026 1 7 54 0.65536000000000000000e5 +2026 1 22 53 -0.32768000000000000000e5 +2026 1 24 39 -0.32768000000000000000e5 +2026 2 3 33 -0.32768000000000000000e5 +2026 2 17 35 0.32768000000000000000e5 +2026 2 26 32 -0.32768000000000000000e5 +2026 3 4 33 -0.32768000000000000000e5 +2026 3 6 35 -0.65536000000000000000e5 +2026 3 17 30 0.65536000000000000000e5 +2026 3 19 32 -0.32768000000000000000e5 +2026 3 20 33 0.65536000000000000000e5 +2027 1 3 26 -0.16384000000000000000e5 +2027 1 6 37 0.16384000000000000000e5 +2027 1 9 40 0.32768000000000000000e5 +2027 1 10 25 -0.32768000000000000000e5 +2027 2 4 18 -0.16384000000000000000e5 +2027 2 18 18 0.32768000000000000000e5 +2027 3 4 17 -0.16384000000000000000e5 +2027 3 5 18 -0.16384000000000000000e5 +2027 3 6 19 -0.32768000000000000000e5 +2027 3 8 21 0.65536000000000000000e5 +2027 4 3 15 -0.32768000000000000000e5 +2028 2 5 27 -0.32768000000000000000e5 +2028 2 18 19 0.32768000000000000000e5 +2029 1 5 52 0.65536000000000000000e5 +2029 1 9 40 -0.32768000000000000000e5 +2029 1 10 41 0.65536000000000000000e5 +2029 1 17 48 -0.13107200000000000000e6 +2029 1 26 41 0.32768000000000000000e5 +2029 1 28 43 0.65536000000000000000e5 +2029 2 8 22 0.65536000000000000000e5 +2029 2 16 30 -0.32768000000000000000e5 +2029 2 18 20 0.32768000000000000000e5 +2029 3 1 30 0.32768000000000000000e5 +2029 3 2 31 -0.65536000000000000000e5 +2029 4 4 16 -0.65536000000000000000e5 +2029 4 6 18 -0.32768000000000000000e5 +2029 4 7 19 -0.65536000000000000000e5 +2030 1 1 48 -0.16384000000000000000e5 +2030 1 2 49 -0.16384000000000000000e5 +2030 1 5 52 0.65536000000000000000e5 +2030 1 11 42 0.65536000000000000000e5 +2030 1 12 43 0.13107200000000000000e6 +2030 1 17 48 -0.26214400000000000000e6 +2030 1 23 38 -0.16384000000000000000e5 +2030 1 26 41 0.32768000000000000000e5 +2030 1 28 43 0.65536000000000000000e5 +2030 2 2 32 -0.16384000000000000000e5 +2030 2 8 22 0.13107200000000000000e6 +2030 2 12 26 -0.65536000000000000000e5 +2030 2 16 30 -0.32768000000000000000e5 +2030 2 18 21 0.32768000000000000000e5 +2030 3 2 31 -0.65536000000000000000e5 +2030 3 14 27 -0.13107200000000000000e6 +2030 4 4 16 -0.13107200000000000000e6 +2030 4 6 18 -0.32768000000000000000e5 +2030 4 7 19 -0.65536000000000000000e5 +2031 1 1 48 -0.16384000000000000000e5 +2031 1 2 49 -0.16384000000000000000e5 +2031 1 5 52 0.65536000000000000000e5 +2031 1 8 39 -0.32768000000000000000e5 +2031 1 10 41 0.13107200000000000000e6 +2031 1 11 42 0.13107200000000000000e6 +2031 1 12 43 0.13107200000000000000e6 +2031 1 17 48 -0.39321600000000000000e6 +2031 1 23 38 -0.16384000000000000000e5 +2031 1 26 29 0.32768000000000000000e5 +2031 1 26 41 0.32768000000000000000e5 +2031 1 28 43 0.65536000000000000000e5 +2031 2 2 32 -0.16384000000000000000e5 +2031 2 8 22 0.19660800000000000000e6 +2031 2 12 26 -0.65536000000000000000e5 +2031 2 16 30 -0.32768000000000000000e5 +2031 2 18 22 0.32768000000000000000e5 +2031 3 2 31 -0.65536000000000000000e5 +2031 3 14 27 -0.26214400000000000000e6 +2031 4 4 16 -0.19660800000000000000e6 +2031 4 6 18 -0.32768000000000000000e5 +2031 4 7 19 -0.65536000000000000000e5 +2032 2 12 26 -0.32768000000000000000e5 +2032 2 18 23 0.32768000000000000000e5 +2033 2 8 22 -0.32768000000000000000e5 +2033 2 18 24 0.32768000000000000000e5 +2033 4 4 16 0.32768000000000000000e5 +2034 1 12 43 0.32768000000000000000e5 +2034 1 17 48 0.32768000000000000000e5 +2034 1 18 25 0.32768000000000000000e5 +2034 1 28 35 -0.65536000000000000000e5 +2034 2 18 25 0.32768000000000000000e5 +2034 3 14 19 -0.32768000000000000000e5 +2034 3 14 27 0.32768000000000000000e5 +2035 1 2 49 0.32768000000000000000e5 +2035 1 3 50 -0.65536000000000000000e5 +2035 1 23 38 0.32768000000000000000e5 +2035 1 24 39 0.32768000000000000000e5 +2035 2 18 26 0.32768000000000000000e5 +2036 2 3 33 -0.32768000000000000000e5 +2036 2 18 27 0.32768000000000000000e5 +2037 1 1 48 -0.32768000000000000000e5 +2037 1 2 49 -0.65536000000000000000e5 +2037 1 3 50 -0.65536000000000000000e5 +2037 1 11 42 0.13107200000000000000e6 +2037 1 12 43 0.26214400000000000000e6 +2037 1 17 48 -0.26214400000000000000e6 +2037 1 23 38 -0.32768000000000000000e5 +2037 1 25 40 0.32768000000000000000e5 +2037 1 26 41 -0.65536000000000000000e5 +2037 2 2 32 -0.32768000000000000000e5 +2037 2 3 33 -0.32768000000000000000e5 +2037 2 8 22 0.13107200000000000000e6 +2037 2 12 26 -0.13107200000000000000e6 +2037 2 16 30 -0.65536000000000000000e5 +2037 2 18 28 0.32768000000000000000e5 +2037 3 2 31 -0.13107200000000000000e6 +2037 3 14 27 -0.26214400000000000000e6 +2037 4 4 16 -0.13107200000000000000e6 +2038 1 1 48 -0.16384000000000000000e5 +2038 1 2 49 -0.16384000000000000000e5 +2038 1 5 52 0.65536000000000000000e5 +2038 1 11 42 0.65536000000000000000e5 +2038 1 12 43 0.13107200000000000000e6 +2038 1 17 48 -0.26214400000000000000e6 +2038 1 23 38 -0.16384000000000000000e5 +2038 1 26 41 0.32768000000000000000e5 +2038 1 28 43 0.65536000000000000000e5 +2038 2 2 32 -0.16384000000000000000e5 +2038 2 8 22 0.13107200000000000000e6 +2038 2 12 26 -0.65536000000000000000e5 +2038 2 16 30 -0.32768000000000000000e5 +2038 2 18 29 0.32768000000000000000e5 +2038 3 2 31 -0.65536000000000000000e5 +2038 3 14 27 -0.13107200000000000000e6 +2038 4 4 16 -0.13107200000000000000e6 +2038 4 7 19 -0.65536000000000000000e5 +2039 2 4 34 -0.32768000000000000000e5 +2039 2 18 30 0.32768000000000000000e5 +2040 2 8 22 -0.32768000000000000000e5 +2040 2 18 31 0.32768000000000000000e5 +2040 4 4 16 0.32768000000000000000e5 +2040 4 7 19 0.32768000000000000000e5 +2041 1 1 48 -0.32768000000000000000e5 +2041 1 2 49 -0.65536000000000000000e5 +2041 1 3 50 -0.65536000000000000000e5 +2041 1 6 53 0.32768000000000000000e5 +2041 1 11 42 0.13107200000000000000e6 +2041 1 12 43 0.26214400000000000000e6 +2041 1 17 48 -0.26214400000000000000e6 +2041 1 23 38 -0.32768000000000000000e5 +2041 1 26 41 -0.65536000000000000000e5 +2041 2 2 32 -0.32768000000000000000e5 +2041 2 8 22 0.13107200000000000000e6 +2041 2 12 26 -0.13107200000000000000e6 +2041 2 16 30 -0.65536000000000000000e5 +2041 2 18 32 -0.32768000000000000000e5 +2041 2 18 33 0.32768000000000000000e5 +2041 3 2 31 -0.13107200000000000000e6 +2041 3 3 32 0.32768000000000000000e5 +2041 3 14 27 -0.26214400000000000000e6 +2041 3 17 30 -0.65536000000000000000e5 +2041 3 22 27 0.65536000000000000000e5 +2041 4 4 16 -0.13107200000000000000e6 +2042 2 4 34 -0.32768000000000000000e5 +2042 2 18 34 0.32768000000000000000e5 +2042 3 5 34 -0.32768000000000000000e5 +2042 3 17 30 -0.32768000000000000000e5 +2042 3 18 31 0.65536000000000000000e5 +2042 3 22 27 -0.32768000000000000000e5 +2043 1 1 48 -0.32768000000000000000e5 +2043 1 2 49 -0.65536000000000000000e5 +2043 1 3 50 -0.65536000000000000000e5 +2043 1 11 42 0.13107200000000000000e6 +2043 1 12 43 0.26214400000000000000e6 +2043 1 17 48 -0.26214400000000000000e6 +2043 1 23 38 -0.32768000000000000000e5 +2043 1 23 54 0.32768000000000000000e5 +2043 1 24 39 -0.32768000000000000000e5 +2043 1 24 55 -0.65536000000000000000e5 +2043 1 25 56 0.32768000000000000000e5 +2043 2 2 32 -0.32768000000000000000e5 +2043 2 3 33 -0.32768000000000000000e5 +2043 2 8 22 0.13107200000000000000e6 +2043 2 12 26 -0.13107200000000000000e6 +2043 2 16 30 -0.65536000000000000000e5 +2043 2 18 35 0.32768000000000000000e5 +2043 3 2 31 -0.13107200000000000000e6 +2043 3 4 33 -0.32768000000000000000e5 +2043 3 14 27 -0.26214400000000000000e6 +2043 3 19 32 -0.32768000000000000000e5 +2043 3 28 33 0.32768000000000000000e5 +2043 4 4 16 -0.13107200000000000000e6 +2044 1 1 48 -0.16384000000000000000e5 +2044 1 2 49 -0.16384000000000000000e5 +2044 1 5 52 0.65536000000000000000e5 +2044 1 11 42 0.65536000000000000000e5 +2044 1 12 43 0.13107200000000000000e6 +2044 1 17 48 -0.26214400000000000000e6 +2044 1 23 38 -0.16384000000000000000e5 +2044 1 26 41 0.32768000000000000000e5 +2044 1 28 43 0.65536000000000000000e5 +2044 2 2 32 -0.16384000000000000000e5 +2044 2 8 22 0.13107200000000000000e6 +2044 2 12 26 -0.65536000000000000000e5 +2044 2 16 30 -0.32768000000000000000e5 +2044 2 19 20 0.32768000000000000000e5 +2044 3 2 31 -0.65536000000000000000e5 +2044 3 14 27 -0.13107200000000000000e6 +2044 4 4 16 -0.13107200000000000000e6 +2044 4 6 18 -0.32768000000000000000e5 +2044 4 7 19 -0.65536000000000000000e5 +2045 1 1 48 -0.16384000000000000000e5 +2045 1 2 49 -0.16384000000000000000e5 +2045 1 5 52 0.65536000000000000000e5 +2045 1 8 39 -0.32768000000000000000e5 +2045 1 10 41 0.13107200000000000000e6 +2045 1 11 42 0.13107200000000000000e6 +2045 1 12 43 0.13107200000000000000e6 +2045 1 17 48 -0.39321600000000000000e6 +2045 1 23 38 -0.16384000000000000000e5 +2045 1 26 29 0.32768000000000000000e5 +2045 1 26 41 0.32768000000000000000e5 +2045 1 28 43 0.65536000000000000000e5 +2045 2 2 32 -0.16384000000000000000e5 +2045 2 8 22 0.19660800000000000000e6 +2045 2 12 26 -0.65536000000000000000e5 +2045 2 16 30 -0.32768000000000000000e5 +2045 2 19 21 0.32768000000000000000e5 +2045 3 2 31 -0.65536000000000000000e5 +2045 3 14 27 -0.26214400000000000000e6 +2045 4 4 16 -0.19660800000000000000e6 +2045 4 6 18 -0.32768000000000000000e5 +2045 4 7 19 -0.65536000000000000000e5 +2046 1 6 43 0.32768000000000000000e5 +2046 1 9 40 0.32768000000000000000e5 +2046 1 11 42 -0.65536000000000000000e5 +2046 1 26 29 0.32768000000000000000e5 +2046 2 19 22 0.32768000000000000000e5 +2047 2 8 22 -0.32768000000000000000e5 +2047 2 19 23 0.32768000000000000000e5 +2047 4 4 16 0.32768000000000000000e5 +2048 1 10 41 -0.32768000000000000000e5 +2048 1 17 48 0.65536000000000000000e5 +2048 1 18 25 -0.65536000000000000000e5 +2048 1 26 33 0.32768000000000000000e5 +2048 2 8 22 -0.32768000000000000000e5 +2048 2 19 24 0.32768000000000000000e5 +2048 3 14 19 0.65536000000000000000e5 +2048 3 14 27 0.65536000000000000000e5 +2048 4 4 16 0.32768000000000000000e5 +2049 2 14 28 -0.32768000000000000000e5 +2049 2 19 25 0.32768000000000000000e5 +2050 2 3 33 -0.32768000000000000000e5 +2050 2 19 26 0.32768000000000000000e5 +2051 1 1 48 -0.32768000000000000000e5 +2051 1 2 49 -0.65536000000000000000e5 +2051 1 3 50 -0.65536000000000000000e5 +2051 1 11 42 0.13107200000000000000e6 +2051 1 12 43 0.26214400000000000000e6 +2051 1 17 48 -0.26214400000000000000e6 +2051 1 23 38 -0.32768000000000000000e5 +2051 1 25 40 0.32768000000000000000e5 +2051 1 26 41 -0.65536000000000000000e5 +2051 2 2 32 -0.32768000000000000000e5 +2051 2 3 33 -0.32768000000000000000e5 +2051 2 8 22 0.13107200000000000000e6 +2051 2 12 26 -0.13107200000000000000e6 +2051 2 16 30 -0.65536000000000000000e5 +2051 2 19 27 0.32768000000000000000e5 +2051 3 2 31 -0.13107200000000000000e6 +2051 3 14 27 -0.26214400000000000000e6 +2051 4 4 16 -0.13107200000000000000e6 +2052 1 1 48 -0.65536000000000000000e5 +2052 1 2 49 -0.98304000000000000000e5 +2052 1 3 50 -0.13107200000000000000e6 +2052 1 6 49 0.32768000000000000000e5 +2052 1 11 42 0.26214400000000000000e6 +2052 1 12 43 0.52428800000000000000e6 +2052 1 17 48 -0.52428800000000000000e6 +2052 1 23 38 -0.65536000000000000000e5 +2052 1 24 39 -0.32768000000000000000e5 +2052 1 25 40 0.32768000000000000000e5 +2052 1 26 41 0.65536000000000000000e5 +2052 1 28 43 -0.13107200000000000000e6 +2052 2 2 32 -0.65536000000000000000e5 +2052 2 3 33 -0.32768000000000000000e5 +2052 2 4 34 0.65536000000000000000e5 +2052 2 8 22 0.26214400000000000000e6 +2052 2 12 26 -0.26214400000000000000e6 +2052 2 16 30 -0.13107200000000000000e6 +2052 2 19 28 0.32768000000000000000e5 +2052 3 2 31 -0.26214400000000000000e6 +2052 3 14 27 -0.52428800000000000000e6 +2052 4 4 16 -0.26214400000000000000e6 +2053 2 4 34 -0.32768000000000000000e5 +2053 2 19 29 0.32768000000000000000e5 +2054 2 19 30 0.32768000000000000000e5 +2054 2 22 28 -0.32768000000000000000e5 +2055 1 5 52 0.32768000000000000000e5 +2055 1 14 45 -0.13107200000000000000e6 +2055 1 17 48 0.65536000000000000000e5 +2055 1 18 49 0.65536000000000000000e5 +2055 1 28 43 0.32768000000000000000e5 +2055 1 33 40 0.32768000000000000000e5 +2055 2 19 31 0.32768000000000000000e5 +2055 2 24 30 0.65536000000000000000e5 +2055 3 15 28 0.13107200000000000000e6 +2056 1 1 48 -0.32768000000000000000e5 +2056 1 2 49 -0.65536000000000000000e5 +2056 1 3 50 -0.65536000000000000000e5 +2056 1 6 53 0.32768000000000000000e5 +2056 1 11 42 0.13107200000000000000e6 +2056 1 12 43 0.26214400000000000000e6 +2056 1 17 48 -0.26214400000000000000e6 +2056 1 23 38 -0.32768000000000000000e5 +2056 1 26 41 -0.65536000000000000000e5 +2056 2 2 32 -0.32768000000000000000e5 +2056 2 8 22 0.13107200000000000000e6 +2056 2 12 26 -0.13107200000000000000e6 +2056 2 16 30 -0.65536000000000000000e5 +2056 2 18 32 -0.32768000000000000000e5 +2056 2 19 32 0.32768000000000000000e5 +2056 3 2 31 -0.13107200000000000000e6 +2056 3 3 32 0.32768000000000000000e5 +2056 3 14 27 -0.26214400000000000000e6 +2056 3 17 30 -0.65536000000000000000e5 +2056 3 22 27 0.65536000000000000000e5 +2056 4 4 16 -0.13107200000000000000e6 +2057 2 5 35 -0.32768000000000000000e5 +2057 2 19 33 0.32768000000000000000e5 +2058 2 19 34 0.32768000000000000000e5 +2058 2 28 30 -0.32768000000000000000e5 +2059 2 1 31 -0.16384000000000000000e5 +2059 2 20 20 0.32768000000000000000e5 +2060 1 2 33 -0.32768000000000000000e5 +2060 1 3 34 0.65536000000000000000e5 +2060 1 11 42 0.32768000000000000000e5 +2060 1 12 43 0.65536000000000000000e5 +2060 1 16 47 -0.65536000000000000000e5 +2060 1 17 48 -0.65536000000000000000e5 +2060 2 7 21 -0.32768000000000000000e5 +2060 2 8 22 0.32768000000000000000e5 +2060 2 12 26 -0.32768000000000000000e5 +2060 2 20 21 0.32768000000000000000e5 +2060 3 7 20 -0.32768000000000000000e5 +2060 3 8 21 -0.32768000000000000000e5 +2060 3 13 26 -0.65536000000000000000e5 +2060 3 14 27 -0.65536000000000000000e5 +2060 4 4 16 -0.32768000000000000000e5 +2061 2 12 26 -0.32768000000000000000e5 +2061 2 20 22 0.32768000000000000000e5 +2062 1 2 17 0.32768000000000000000e5 +2062 1 4 19 0.65536000000000000000e5 +2062 1 12 43 0.32768000000000000000e5 +2062 1 16 47 0.32768000000000000000e5 +2062 1 20 27 -0.13107200000000000000e6 +2062 1 28 35 0.65536000000000000000e5 +2062 2 10 24 0.65536000000000000000e5 +2062 2 20 23 0.32768000000000000000e5 +2062 3 1 14 -0.32768000000000000000e5 +2062 3 6 23 -0.32768000000000000000e5 +2062 3 8 13 -0.65536000000000000000e5 +2062 3 10 23 0.65536000000000000000e5 +2062 3 11 24 0.65536000000000000000e5 +2062 3 13 26 0.32768000000000000000e5 +2063 1 12 43 0.32768000000000000000e5 +2063 1 13 44 -0.65536000000000000000e5 +2063 1 16 47 0.32768000000000000000e5 +2063 1 17 48 0.32768000000000000000e5 +2063 2 20 24 0.32768000000000000000e5 +2063 3 13 26 0.32768000000000000000e5 +2063 3 14 27 0.32768000000000000000e5 +2064 2 10 24 -0.32768000000000000000e5 +2064 2 20 25 0.32768000000000000000e5 +2064 4 10 14 0.32768000000000000000e5 +2065 1 1 48 0.16384000000000000000e5 +2065 1 2 33 0.65536000000000000000e5 +2065 1 2 49 0.16384000000000000000e5 +2065 1 3 34 -0.13107200000000000000e6 +2065 1 7 38 0.32768000000000000000e5 +2065 1 8 39 0.32768000000000000000e5 +2065 1 10 41 0.65536000000000000000e5 +2065 1 23 38 0.16384000000000000000e5 +2065 2 2 32 0.16384000000000000000e5 +2065 2 7 21 0.65536000000000000000e5 +2065 2 20 26 0.32768000000000000000e5 +2065 3 1 30 0.32768000000000000000e5 +2065 3 7 20 0.65536000000000000000e5 +2065 3 8 21 0.65536000000000000000e5 +2065 4 5 17 0.32768000000000000000e5 +2066 2 16 30 -0.32768000000000000000e5 +2066 2 20 27 0.32768000000000000000e5 +2067 1 1 48 -0.16384000000000000000e5 +2067 1 2 49 -0.16384000000000000000e5 +2067 1 5 52 0.65536000000000000000e5 +2067 1 11 42 0.65536000000000000000e5 +2067 1 12 43 0.13107200000000000000e6 +2067 1 17 48 -0.26214400000000000000e6 +2067 1 23 38 -0.16384000000000000000e5 +2067 1 26 41 0.32768000000000000000e5 +2067 1 28 43 0.65536000000000000000e5 +2067 2 2 32 -0.16384000000000000000e5 +2067 2 8 22 0.13107200000000000000e6 +2067 2 12 26 -0.65536000000000000000e5 +2067 2 16 30 -0.32768000000000000000e5 +2067 2 20 28 0.32768000000000000000e5 +2067 3 2 31 -0.65536000000000000000e5 +2067 3 14 27 -0.13107200000000000000e6 +2067 4 4 16 -0.13107200000000000000e6 +2067 4 7 19 -0.65536000000000000000e5 +2068 2 10 32 -0.32768000000000000000e5 +2068 2 20 29 0.32768000000000000000e5 +2069 2 20 30 0.32768000000000000000e5 +2069 2 20 34 -0.32768000000000000000e5 +2069 4 8 20 -0.32768000000000000000e5 +2070 1 5 52 -0.16384000000000000000e5 +2070 1 11 42 0.16384000000000000000e5 +2070 1 12 43 0.32768000000000000000e5 +2070 1 16 47 0.32768000000000000000e5 +2070 1 17 48 0.32768000000000000000e5 +2070 1 34 41 -0.65536000000000000000e5 +2070 2 12 26 -0.16384000000000000000e5 +2070 2 20 31 0.32768000000000000000e5 +2070 2 20 34 0.16384000000000000000e5 +2070 3 2 31 -0.16384000000000000000e5 +2070 3 14 27 -0.32768000000000000000e5 +2070 4 7 19 0.16384000000000000000e5 +2070 4 8 20 0.16384000000000000000e5 +2071 1 3 50 -0.32768000000000000000e5 +2071 1 7 54 0.32768000000000000000e5 +2071 1 11 42 0.65536000000000000000e5 +2071 1 12 43 0.13107200000000000000e6 +2071 1 17 48 -0.13107200000000000000e6 +2071 1 37 44 -0.65536000000000000000e5 +2071 2 8 22 0.65536000000000000000e5 +2071 2 12 26 -0.65536000000000000000e5 +2071 2 16 30 -0.32768000000000000000e5 +2071 2 20 32 0.32768000000000000000e5 +2071 3 2 31 -0.65536000000000000000e5 +2071 3 14 27 -0.13107200000000000000e6 +2071 3 16 29 -0.32768000000000000000e5 +2071 3 17 30 -0.32768000000000000000e5 +2071 4 4 16 -0.65536000000000000000e5 +2072 1 1 48 -0.16384000000000000000e5 +2072 1 2 49 -0.16384000000000000000e5 +2072 1 3 50 -0.32768000000000000000e5 +2072 1 7 54 0.32768000000000000000e5 +2072 1 11 42 0.65536000000000000000e5 +2072 1 12 43 0.13107200000000000000e6 +2072 1 17 48 -0.13107200000000000000e6 +2072 1 23 38 -0.16384000000000000000e5 +2072 1 26 41 0.32768000000000000000e5 +2072 1 32 47 -0.65536000000000000000e5 +2072 2 2 32 -0.16384000000000000000e5 +2072 2 8 22 0.65536000000000000000e5 +2072 2 12 26 -0.65536000000000000000e5 +2072 2 16 30 -0.32768000000000000000e5 +2072 2 20 33 0.32768000000000000000e5 +2072 3 2 31 -0.65536000000000000000e5 +2072 3 14 27 -0.13107200000000000000e6 +2072 3 17 30 -0.32768000000000000000e5 +2072 3 22 27 -0.32768000000000000000e5 +2072 4 4 16 -0.65536000000000000000e5 +2073 1 1 48 -0.16384000000000000000e5 +2073 1 2 49 -0.16384000000000000000e5 +2073 1 3 50 -0.32768000000000000000e5 +2073 1 7 54 0.32768000000000000000e5 +2073 1 11 42 0.65536000000000000000e5 +2073 1 12 43 0.13107200000000000000e6 +2073 1 17 48 -0.13107200000000000000e6 +2073 1 23 38 -0.16384000000000000000e5 +2073 1 24 55 0.32768000000000000000e5 +2073 1 37 52 -0.65536000000000000000e5 +2073 2 2 32 -0.16384000000000000000e5 +2073 2 8 22 0.65536000000000000000e5 +2073 2 12 26 -0.65536000000000000000e5 +2073 2 16 30 -0.32768000000000000000e5 +2073 2 20 35 0.32768000000000000000e5 +2073 3 2 31 -0.65536000000000000000e5 +2073 3 6 35 -0.32768000000000000000e5 +2073 3 14 27 -0.13107200000000000000e6 +2073 3 17 30 -0.32768000000000000000e5 +2073 3 20 33 -0.32768000000000000000e5 +2073 4 4 16 -0.65536000000000000000e5 +2074 2 12 26 -0.16384000000000000000e5 +2074 2 21 21 0.32768000000000000000e5 +2075 2 8 22 -0.32768000000000000000e5 +2075 2 21 22 0.32768000000000000000e5 +2075 4 4 16 0.32768000000000000000e5 +2076 1 12 43 0.32768000000000000000e5 +2076 1 13 44 -0.65536000000000000000e5 +2076 1 16 47 0.32768000000000000000e5 +2076 1 17 48 0.32768000000000000000e5 +2076 2 21 23 0.32768000000000000000e5 +2076 3 13 26 0.32768000000000000000e5 +2076 3 14 27 0.32768000000000000000e5 +2077 1 12 43 0.32768000000000000000e5 +2077 1 17 48 0.32768000000000000000e5 +2077 1 18 25 0.32768000000000000000e5 +2077 1 28 35 -0.65536000000000000000e5 +2077 2 21 24 0.32768000000000000000e5 +2077 3 14 19 -0.32768000000000000000e5 +2077 3 14 27 0.32768000000000000000e5 +2078 1 13 44 0.32768000000000000000e5 +2078 1 14 45 0.32768000000000000000e5 +2078 1 19 42 -0.65536000000000000000e5 +2078 1 28 35 0.32768000000000000000e5 +2078 2 21 25 0.32768000000000000000e5 +2079 2 16 30 -0.32768000000000000000e5 +2079 2 21 26 0.32768000000000000000e5 +2080 1 1 48 -0.16384000000000000000e5 +2080 1 2 49 -0.16384000000000000000e5 +2080 1 5 52 0.65536000000000000000e5 +2080 1 11 42 0.65536000000000000000e5 +2080 1 12 43 0.13107200000000000000e6 +2080 1 17 48 -0.26214400000000000000e6 +2080 1 23 38 -0.16384000000000000000e5 +2080 1 26 41 0.32768000000000000000e5 +2080 1 28 43 0.65536000000000000000e5 +2080 2 2 32 -0.16384000000000000000e5 +2080 2 8 22 0.13107200000000000000e6 +2080 2 12 26 -0.65536000000000000000e5 +2080 2 16 30 -0.32768000000000000000e5 +2080 2 21 27 0.32768000000000000000e5 +2080 3 2 31 -0.65536000000000000000e5 +2080 3 14 27 -0.13107200000000000000e6 +2080 4 4 16 -0.13107200000000000000e6 +2080 4 7 19 -0.65536000000000000000e5 +2081 2 4 34 -0.32768000000000000000e5 +2081 2 21 28 0.32768000000000000000e5 +2082 2 20 34 -0.32768000000000000000e5 +2082 2 21 29 0.32768000000000000000e5 +2082 4 8 20 -0.32768000000000000000e5 +2083 2 8 22 -0.32768000000000000000e5 +2083 2 21 30 0.32768000000000000000e5 +2083 4 4 16 0.32768000000000000000e5 +2083 4 7 19 0.32768000000000000000e5 +2084 1 5 52 -0.16384000000000000000e5 +2084 1 11 42 0.16384000000000000000e5 +2084 1 12 43 0.32768000000000000000e5 +2084 1 13 52 -0.65536000000000000000e5 +2084 1 14 45 0.65536000000000000000e5 +2084 1 18 49 -0.32768000000000000000e5 +2084 2 12 26 -0.16384000000000000000e5 +2084 2 20 34 0.16384000000000000000e5 +2084 2 21 31 0.32768000000000000000e5 +2084 2 24 30 -0.32768000000000000000e5 +2084 3 2 31 -0.16384000000000000000e5 +2084 3 14 27 -0.32768000000000000000e5 +2084 3 15 28 -0.65536000000000000000e5 +2084 4 7 19 0.16384000000000000000e5 +2084 4 8 20 0.16384000000000000000e5 +2085 1 1 48 -0.16384000000000000000e5 +2085 1 2 49 -0.16384000000000000000e5 +2085 1 3 50 -0.32768000000000000000e5 +2085 1 7 54 0.32768000000000000000e5 +2085 1 11 42 0.65536000000000000000e5 +2085 1 12 43 0.13107200000000000000e6 +2085 1 17 48 -0.13107200000000000000e6 +2085 1 23 38 -0.16384000000000000000e5 +2085 1 26 41 0.32768000000000000000e5 +2085 1 32 47 -0.65536000000000000000e5 +2085 2 2 32 -0.16384000000000000000e5 +2085 2 8 22 0.65536000000000000000e5 +2085 2 12 26 -0.65536000000000000000e5 +2085 2 16 30 -0.32768000000000000000e5 +2085 2 21 32 0.32768000000000000000e5 +2085 3 2 31 -0.65536000000000000000e5 +2085 3 14 27 -0.13107200000000000000e6 +2085 3 17 30 -0.32768000000000000000e5 +2085 3 22 27 -0.32768000000000000000e5 +2085 4 4 16 -0.65536000000000000000e5 +2086 2 4 34 -0.32768000000000000000e5 +2086 2 21 33 0.32768000000000000000e5 +2086 3 5 34 -0.32768000000000000000e5 +2086 3 17 30 -0.32768000000000000000e5 +2086 3 18 31 0.65536000000000000000e5 +2086 3 22 27 -0.32768000000000000000e5 +2087 1 17 48 -0.65536000000000000000e5 +2087 1 28 43 0.32768000000000000000e5 +2087 1 32 47 0.32768000000000000000e5 +2087 1 33 48 0.32768000000000000000e5 +2087 2 21 34 0.32768000000000000000e5 +2087 3 18 31 -0.32768000000000000000e5 +2087 3 24 29 0.65536000000000000000e5 +2088 1 10 41 -0.16384000000000000000e5 +2088 1 17 48 0.32768000000000000000e5 +2088 1 18 25 -0.32768000000000000000e5 +2088 1 26 33 0.16384000000000000000e5 +2088 2 8 22 -0.16384000000000000000e5 +2088 2 22 22 0.32768000000000000000e5 +2088 3 14 19 0.32768000000000000000e5 +2088 3 14 27 0.32768000000000000000e5 +2088 4 4 16 0.16384000000000000000e5 +2089 1 12 43 0.32768000000000000000e5 +2089 1 17 48 0.32768000000000000000e5 +2089 1 18 25 0.32768000000000000000e5 +2089 1 28 35 -0.65536000000000000000e5 +2089 2 22 23 0.32768000000000000000e5 +2089 3 14 19 -0.32768000000000000000e5 +2089 3 14 27 0.32768000000000000000e5 +2090 2 14 28 -0.32768000000000000000e5 +2090 2 22 24 0.32768000000000000000e5 +2091 1 11 46 0.32768000000000000000e5 +2091 1 14 45 0.32768000000000000000e5 +2091 1 28 35 0.32768000000000000000e5 +2091 1 29 36 -0.65536000000000000000e5 +2091 2 22 25 0.32768000000000000000e5 +2092 1 1 48 -0.16384000000000000000e5 +2092 1 2 49 -0.16384000000000000000e5 +2092 1 5 52 0.65536000000000000000e5 +2092 1 11 42 0.65536000000000000000e5 +2092 1 12 43 0.13107200000000000000e6 +2092 1 17 48 -0.26214400000000000000e6 +2092 1 23 38 -0.16384000000000000000e5 +2092 1 26 41 0.32768000000000000000e5 +2092 1 28 43 0.65536000000000000000e5 +2092 2 2 32 -0.16384000000000000000e5 +2092 2 8 22 0.13107200000000000000e6 +2092 2 12 26 -0.65536000000000000000e5 +2092 2 16 30 -0.32768000000000000000e5 +2092 2 22 26 0.32768000000000000000e5 +2092 3 2 31 -0.65536000000000000000e5 +2092 3 14 27 -0.13107200000000000000e6 +2092 4 4 16 -0.13107200000000000000e6 +2092 4 7 19 -0.65536000000000000000e5 +2093 2 4 34 -0.32768000000000000000e5 +2093 2 22 27 0.32768000000000000000e5 +2094 2 8 22 -0.32768000000000000000e5 +2094 2 22 29 0.32768000000000000000e5 +2094 4 4 16 0.32768000000000000000e5 +2094 4 7 19 0.32768000000000000000e5 +2095 1 5 52 0.32768000000000000000e5 +2095 1 14 45 -0.13107200000000000000e6 +2095 1 17 48 0.65536000000000000000e5 +2095 1 18 49 0.65536000000000000000e5 +2095 1 28 43 0.32768000000000000000e5 +2095 1 33 40 0.32768000000000000000e5 +2095 2 22 30 0.32768000000000000000e5 +2095 2 24 30 0.65536000000000000000e5 +2095 3 15 28 0.13107200000000000000e6 +2096 2 22 31 0.32768000000000000000e5 +2096 2 24 30 -0.32768000000000000000e5 +2097 2 4 34 -0.32768000000000000000e5 +2097 2 22 32 0.32768000000000000000e5 +2097 3 5 34 -0.32768000000000000000e5 +2097 3 17 30 -0.32768000000000000000e5 +2097 3 18 31 0.65536000000000000000e5 +2097 3 22 27 -0.32768000000000000000e5 +2098 2 22 33 0.32768000000000000000e5 +2098 2 28 30 -0.32768000000000000000e5 +2099 1 15 54 0.32768000000000000000e5 +2099 1 28 43 0.32768000000000000000e5 +2099 1 33 48 0.32768000000000000000e5 +2099 1 34 49 -0.65536000000000000000e5 +2099 2 22 34 0.32768000000000000000e5 +2099 3 18 31 -0.32768000000000000000e5 +2100 2 22 35 0.32768000000000000000e5 +2100 2 28 34 -0.32768000000000000000e5 +2101 2 10 24 -0.16384000000000000000e5 +2101 2 23 23 0.32768000000000000000e5 +2101 4 10 14 0.16384000000000000000e5 +2102 1 13 44 0.32768000000000000000e5 +2102 1 14 45 0.32768000000000000000e5 +2102 1 19 42 -0.65536000000000000000e5 +2102 1 28 35 0.32768000000000000000e5 +2102 2 23 24 0.32768000000000000000e5 +2103 2 15 29 -0.32768000000000000000e5 +2103 2 23 25 0.32768000000000000000e5 +2104 2 10 32 -0.32768000000000000000e5 +2104 2 23 26 0.32768000000000000000e5 +2105 2 20 34 -0.32768000000000000000e5 +2105 2 23 27 0.32768000000000000000e5 +2105 4 8 20 -0.32768000000000000000e5 +2106 2 8 22 -0.32768000000000000000e5 +2106 2 23 28 0.32768000000000000000e5 +2106 4 4 16 0.32768000000000000000e5 +2106 4 7 19 0.32768000000000000000e5 +2107 1 5 52 -0.16384000000000000000e5 +2107 1 11 42 0.16384000000000000000e5 +2107 1 12 43 0.32768000000000000000e5 +2107 1 16 47 0.32768000000000000000e5 +2107 1 17 48 0.32768000000000000000e5 +2107 1 34 41 -0.65536000000000000000e5 +2107 2 12 26 -0.16384000000000000000e5 +2107 2 20 34 0.16384000000000000000e5 +2107 2 23 29 0.32768000000000000000e5 +2107 3 2 31 -0.16384000000000000000e5 +2107 3 14 27 -0.32768000000000000000e5 +2107 4 7 19 0.16384000000000000000e5 +2107 4 8 20 0.16384000000000000000e5 +2108 1 5 52 -0.16384000000000000000e5 +2108 1 11 42 0.16384000000000000000e5 +2108 1 12 43 0.32768000000000000000e5 +2108 1 13 52 -0.65536000000000000000e5 +2108 1 14 45 0.65536000000000000000e5 +2108 1 18 49 -0.32768000000000000000e5 +2108 2 12 26 -0.16384000000000000000e5 +2108 2 20 34 0.16384000000000000000e5 +2108 2 23 30 0.32768000000000000000e5 +2108 2 24 30 -0.32768000000000000000e5 +2108 3 2 31 -0.16384000000000000000e5 +2108 3 14 27 -0.32768000000000000000e5 +2108 3 15 28 -0.65536000000000000000e5 +2108 4 7 19 0.16384000000000000000e5 +2108 4 8 20 0.16384000000000000000e5 +2109 1 13 52 0.32768000000000000000e5 +2109 1 14 45 0.32768000000000000000e5 +2109 1 19 50 -0.65536000000000000000e5 +2109 1 34 41 0.32768000000000000000e5 +2109 2 23 31 0.32768000000000000000e5 +2109 3 15 28 -0.32768000000000000000e5 +2110 2 20 34 -0.32768000000000000000e5 +2110 2 23 32 0.32768000000000000000e5 +2111 1 17 48 -0.65536000000000000000e5 +2111 1 28 43 0.32768000000000000000e5 +2111 1 32 47 0.32768000000000000000e5 +2111 1 33 48 0.32768000000000000000e5 +2111 2 23 33 0.32768000000000000000e5 +2111 3 18 31 -0.32768000000000000000e5 +2111 3 24 29 0.65536000000000000000e5 +2112 1 16 55 -0.65536000000000000000e5 +2112 1 17 48 0.32768000000000000000e5 +2112 1 28 43 0.16384000000000000000e5 +2112 1 32 47 0.16384000000000000000e5 +2112 1 34 49 0.32768000000000000000e5 +2112 1 37 44 0.16384000000000000000e5 +2112 2 20 34 0.16384000000000000000e5 +2112 2 23 34 0.32768000000000000000e5 +2112 3 18 31 -0.16384000000000000000e5 +2112 3 24 29 -0.32768000000000000000e5 +2113 1 17 48 -0.65536000000000000000e5 +2113 1 28 43 0.32768000000000000000e5 +2113 1 32 47 0.32768000000000000000e5 +2113 1 33 48 0.32768000000000000000e5 +2113 2 23 35 0.32768000000000000000e5 +2113 3 18 31 -0.32768000000000000000e5 +2113 3 24 29 0.65536000000000000000e5 +2113 4 16 20 0.32768000000000000000e5 +2114 1 11 46 0.16384000000000000000e5 +2114 1 14 45 0.16384000000000000000e5 +2114 1 28 35 0.16384000000000000000e5 +2114 1 29 36 -0.32768000000000000000e5 +2114 2 24 24 0.32768000000000000000e5 +2115 1 15 46 0.32768000000000000000e5 +2115 1 17 32 -0.32768000000000000000e5 +2115 1 18 33 -0.32768000000000000000e5 +2115 1 19 42 0.32768000000000000000e5 +2115 2 14 24 -0.32768000000000000000e5 +2115 2 24 25 0.32768000000000000000e5 +2115 3 12 25 -0.32768000000000000000e5 +2115 3 15 24 0.65536000000000000000e5 +2116 2 20 34 -0.32768000000000000000e5 +2116 2 24 26 0.32768000000000000000e5 +2116 4 8 20 -0.32768000000000000000e5 +2117 2 8 22 -0.32768000000000000000e5 +2117 2 24 27 0.32768000000000000000e5 +2117 4 4 16 0.32768000000000000000e5 +2117 4 7 19 0.32768000000000000000e5 +2118 1 5 52 0.32768000000000000000e5 +2118 1 14 45 -0.13107200000000000000e6 +2118 1 17 48 0.65536000000000000000e5 +2118 1 18 49 0.65536000000000000000e5 +2118 1 28 43 0.32768000000000000000e5 +2118 1 33 40 0.32768000000000000000e5 +2118 2 24 28 0.32768000000000000000e5 +2118 2 24 30 0.65536000000000000000e5 +2118 3 15 28 0.13107200000000000000e6 +2119 1 5 52 -0.16384000000000000000e5 +2119 1 11 42 0.16384000000000000000e5 +2119 1 12 43 0.32768000000000000000e5 +2119 1 13 52 -0.65536000000000000000e5 +2119 1 14 45 0.65536000000000000000e5 +2119 1 18 49 -0.32768000000000000000e5 +2119 2 12 26 -0.16384000000000000000e5 +2119 2 20 34 0.16384000000000000000e5 +2119 2 24 29 0.32768000000000000000e5 +2119 2 24 30 -0.32768000000000000000e5 +2119 3 2 31 -0.16384000000000000000e5 +2119 3 14 27 -0.32768000000000000000e5 +2119 3 15 28 -0.65536000000000000000e5 +2119 4 7 19 0.16384000000000000000e5 +2119 4 8 20 0.16384000000000000000e5 +2120 2 15 33 -0.32768000000000000000e5 +2120 2 24 31 0.32768000000000000000e5 +2121 1 17 48 -0.65536000000000000000e5 +2121 1 28 43 0.32768000000000000000e5 +2121 1 32 47 0.32768000000000000000e5 +2121 1 33 48 0.32768000000000000000e5 +2121 2 24 32 0.32768000000000000000e5 +2121 3 18 31 -0.32768000000000000000e5 +2121 3 24 29 0.65536000000000000000e5 +2122 1 15 54 0.32768000000000000000e5 +2122 1 28 43 0.32768000000000000000e5 +2122 1 33 48 0.32768000000000000000e5 +2122 1 34 49 -0.65536000000000000000e5 +2122 2 24 33 0.32768000000000000000e5 +2122 3 18 31 -0.32768000000000000000e5 +2123 2 24 35 0.32768000000000000000e5 +2123 2 31 33 -0.32768000000000000000e5 +2124 1 4 19 -0.40960000000000000000e4 +2124 1 13 44 0.40960000000000000000e4 +2124 1 17 32 0.81920000000000000000e4 +2124 1 18 33 0.81920000000000000000e4 +2124 1 19 42 0.81920000000000000000e4 +2124 1 20 27 0.81920000000000000000e4 +2124 1 21 44 -0.32768000000000000000e5 +2124 1 29 36 0.16384000000000000000e5 +2124 1 33 36 0.16384000000000000000e5 +2124 2 14 24 0.81920000000000000000e4 +2124 2 15 29 0.81920000000000000000e4 +2124 2 25 25 0.32768000000000000000e5 +2124 3 8 13 0.40960000000000000000e4 +2124 3 10 23 -0.40960000000000000000e4 +2124 3 11 24 -0.40960000000000000000e4 +2124 3 12 25 0.81920000000000000000e4 +2124 3 15 24 -0.16384000000000000000e5 +2124 4 10 14 -0.40960000000000000000e4 +2125 1 5 52 -0.16384000000000000000e5 +2125 1 11 42 0.16384000000000000000e5 +2125 1 12 43 0.32768000000000000000e5 +2125 1 16 47 0.32768000000000000000e5 +2125 1 17 48 0.32768000000000000000e5 +2125 1 34 41 -0.65536000000000000000e5 +2125 2 12 26 -0.16384000000000000000e5 +2125 2 20 34 0.16384000000000000000e5 +2125 2 25 26 0.32768000000000000000e5 +2125 3 2 31 -0.16384000000000000000e5 +2125 3 14 27 -0.32768000000000000000e5 +2125 4 7 19 0.16384000000000000000e5 +2125 4 8 20 0.16384000000000000000e5 +2126 1 5 52 -0.16384000000000000000e5 +2126 1 11 42 0.16384000000000000000e5 +2126 1 12 43 0.32768000000000000000e5 +2126 1 13 52 -0.65536000000000000000e5 +2126 1 14 45 0.65536000000000000000e5 +2126 1 18 49 -0.32768000000000000000e5 +2126 2 12 26 -0.16384000000000000000e5 +2126 2 20 34 0.16384000000000000000e5 +2126 2 24 30 -0.32768000000000000000e5 +2126 2 25 27 0.32768000000000000000e5 +2126 3 2 31 -0.16384000000000000000e5 +2126 3 14 27 -0.32768000000000000000e5 +2126 3 15 28 -0.65536000000000000000e5 +2126 4 7 19 0.16384000000000000000e5 +2126 4 8 20 0.16384000000000000000e5 +2127 2 24 30 -0.32768000000000000000e5 +2127 2 25 28 0.32768000000000000000e5 +2128 1 13 52 0.32768000000000000000e5 +2128 1 14 45 0.32768000000000000000e5 +2128 1 19 50 -0.65536000000000000000e5 +2128 1 34 41 0.32768000000000000000e5 +2128 2 25 29 0.32768000000000000000e5 +2128 3 15 28 -0.32768000000000000000e5 +2129 2 15 33 -0.32768000000000000000e5 +2129 2 25 30 0.32768000000000000000e5 +2130 1 16 55 -0.65536000000000000000e5 +2130 1 17 48 0.32768000000000000000e5 +2130 1 28 43 0.16384000000000000000e5 +2130 1 32 47 0.16384000000000000000e5 +2130 1 34 49 0.32768000000000000000e5 +2130 1 37 44 0.16384000000000000000e5 +2130 2 20 34 0.16384000000000000000e5 +2130 2 25 32 0.32768000000000000000e5 +2130 3 18 31 -0.16384000000000000000e5 +2130 3 24 29 -0.32768000000000000000e5 +2131 2 24 34 -0.32768000000000000000e5 +2131 2 25 33 0.32768000000000000000e5 +2132 2 25 34 0.32768000000000000000e5 +2132 2 31 31 -0.65536000000000000000e5 +2133 1 17 48 0.32768000000000000000e5 +2133 1 32 47 -0.16384000000000000000e5 +2133 1 33 48 -0.16384000000000000000e5 +2133 1 35 50 -0.65536000000000000000e5 +2133 1 37 52 0.16384000000000000000e5 +2133 1 43 50 0.16384000000000000000e5 +2133 1 44 51 0.32768000000000000000e5 +2133 1 46 49 0.32768000000000000000e5 +2133 2 25 35 0.32768000000000000000e5 +2133 3 21 34 -0.16384000000000000000e5 +2133 3 24 29 -0.32768000000000000000e5 +2133 3 25 34 0.65536000000000000000e5 +2133 4 16 20 -0.16384000000000000000e5 +2134 2 1 35 -0.16384000000000000000e5 +2134 2 26 26 0.32768000000000000000e5 +2135 2 26 27 0.32768000000000000000e5 +2135 2 26 32 -0.32768000000000000000e5 +2135 4 17 17 -0.65536000000000000000e5 +2136 2 18 32 -0.32768000000000000000e5 +2136 2 26 28 0.32768000000000000000e5 +2137 1 3 50 -0.32768000000000000000e5 +2137 1 7 54 0.32768000000000000000e5 +2137 1 11 42 0.65536000000000000000e5 +2137 1 12 43 0.13107200000000000000e6 +2137 1 17 48 -0.13107200000000000000e6 +2137 1 37 44 -0.65536000000000000000e5 +2137 2 8 22 0.65536000000000000000e5 +2137 2 12 26 -0.65536000000000000000e5 +2137 2 16 30 -0.32768000000000000000e5 +2137 2 26 29 0.32768000000000000000e5 +2137 3 2 31 -0.65536000000000000000e5 +2137 3 14 27 -0.13107200000000000000e6 +2137 3 16 29 -0.32768000000000000000e5 +2137 3 17 30 -0.32768000000000000000e5 +2137 4 4 16 -0.65536000000000000000e5 +2138 1 1 48 -0.16384000000000000000e5 +2138 1 2 49 -0.16384000000000000000e5 +2138 1 3 50 -0.32768000000000000000e5 +2138 1 7 54 0.32768000000000000000e5 +2138 1 11 42 0.65536000000000000000e5 +2138 1 12 43 0.13107200000000000000e6 +2138 1 17 48 -0.13107200000000000000e6 +2138 1 23 38 -0.16384000000000000000e5 +2138 1 26 41 0.32768000000000000000e5 +2138 1 32 47 -0.65536000000000000000e5 +2138 2 2 32 -0.16384000000000000000e5 +2138 2 8 22 0.65536000000000000000e5 +2138 2 12 26 -0.65536000000000000000e5 +2138 2 16 30 -0.32768000000000000000e5 +2138 2 26 30 0.32768000000000000000e5 +2138 3 2 31 -0.65536000000000000000e5 +2138 3 14 27 -0.13107200000000000000e6 +2138 3 17 30 -0.32768000000000000000e5 +2138 3 22 27 -0.32768000000000000000e5 +2138 4 4 16 -0.65536000000000000000e5 +2139 2 20 34 -0.32768000000000000000e5 +2139 2 26 31 0.32768000000000000000e5 +2140 1 2 49 -0.32768000000000000000e5 +2140 1 7 54 0.65536000000000000000e5 +2140 1 22 53 -0.32768000000000000000e5 +2140 1 24 39 -0.32768000000000000000e5 +2140 2 3 33 -0.32768000000000000000e5 +2140 2 26 32 -0.32768000000000000000e5 +2140 2 26 33 0.32768000000000000000e5 +2140 3 4 33 -0.32768000000000000000e5 +2140 3 6 35 -0.65536000000000000000e5 +2140 3 17 30 0.65536000000000000000e5 +2140 3 19 32 -0.32768000000000000000e5 +2140 3 20 33 0.65536000000000000000e5 +2141 1 1 48 -0.16384000000000000000e5 +2141 1 2 49 -0.16384000000000000000e5 +2141 1 3 50 -0.32768000000000000000e5 +2141 1 7 54 0.32768000000000000000e5 +2141 1 11 42 0.65536000000000000000e5 +2141 1 12 43 0.13107200000000000000e6 +2141 1 17 48 -0.13107200000000000000e6 +2141 1 23 38 -0.16384000000000000000e5 +2141 1 24 55 0.32768000000000000000e5 +2141 1 37 52 -0.65536000000000000000e5 +2141 2 2 32 -0.16384000000000000000e5 +2141 2 8 22 0.65536000000000000000e5 +2141 2 12 26 -0.65536000000000000000e5 +2141 2 16 30 -0.32768000000000000000e5 +2141 2 26 34 0.32768000000000000000e5 +2141 3 2 31 -0.65536000000000000000e5 +2141 3 6 35 -0.32768000000000000000e5 +2141 3 14 27 -0.13107200000000000000e6 +2141 3 17 30 -0.32768000000000000000e5 +2141 3 20 33 -0.32768000000000000000e5 +2141 4 4 16 -0.65536000000000000000e5 +2142 2 26 35 0.32768000000000000000e5 +2142 2 32 32 -0.65536000000000000000e5 +2143 2 18 32 -0.16384000000000000000e5 +2143 2 27 27 0.32768000000000000000e5 +2144 1 1 48 -0.32768000000000000000e5 +2144 1 2 49 -0.65536000000000000000e5 +2144 1 3 50 -0.65536000000000000000e5 +2144 1 6 53 0.32768000000000000000e5 +2144 1 11 42 0.13107200000000000000e6 +2144 1 12 43 0.26214400000000000000e6 +2144 1 17 48 -0.26214400000000000000e6 +2144 1 23 38 -0.32768000000000000000e5 +2144 1 26 41 -0.65536000000000000000e5 +2144 2 2 32 -0.32768000000000000000e5 +2144 2 8 22 0.13107200000000000000e6 +2144 2 12 26 -0.13107200000000000000e6 +2144 2 16 30 -0.65536000000000000000e5 +2144 2 18 32 -0.32768000000000000000e5 +2144 2 27 28 0.32768000000000000000e5 +2144 3 2 31 -0.13107200000000000000e6 +2144 3 3 32 0.32768000000000000000e5 +2144 3 14 27 -0.26214400000000000000e6 +2144 3 17 30 -0.65536000000000000000e5 +2144 3 22 27 0.65536000000000000000e5 +2144 4 4 16 -0.13107200000000000000e6 +2145 1 1 48 -0.16384000000000000000e5 +2145 1 2 49 -0.16384000000000000000e5 +2145 1 3 50 -0.32768000000000000000e5 +2145 1 7 54 0.32768000000000000000e5 +2145 1 11 42 0.65536000000000000000e5 +2145 1 12 43 0.13107200000000000000e6 +2145 1 17 48 -0.13107200000000000000e6 +2145 1 23 38 -0.16384000000000000000e5 +2145 1 26 41 0.32768000000000000000e5 +2145 1 32 47 -0.65536000000000000000e5 +2145 2 2 32 -0.16384000000000000000e5 +2145 2 8 22 0.65536000000000000000e5 +2145 2 12 26 -0.65536000000000000000e5 +2145 2 16 30 -0.32768000000000000000e5 +2145 2 27 29 0.32768000000000000000e5 +2145 3 2 31 -0.65536000000000000000e5 +2145 3 14 27 -0.13107200000000000000e6 +2145 3 17 30 -0.32768000000000000000e5 +2145 3 22 27 -0.32768000000000000000e5 +2145 4 4 16 -0.65536000000000000000e5 +2146 2 4 34 -0.32768000000000000000e5 +2146 2 27 30 0.32768000000000000000e5 +2146 3 5 34 -0.32768000000000000000e5 +2146 3 17 30 -0.32768000000000000000e5 +2146 3 18 31 0.65536000000000000000e5 +2146 3 22 27 -0.32768000000000000000e5 +2147 1 17 48 -0.65536000000000000000e5 +2147 1 28 43 0.32768000000000000000e5 +2147 1 32 47 0.32768000000000000000e5 +2147 1 33 48 0.32768000000000000000e5 +2147 2 27 31 0.32768000000000000000e5 +2147 3 18 31 -0.32768000000000000000e5 +2147 3 24 29 0.65536000000000000000e5 +2148 1 2 49 -0.32768000000000000000e5 +2148 1 7 54 0.65536000000000000000e5 +2148 1 22 53 -0.32768000000000000000e5 +2148 1 24 39 -0.32768000000000000000e5 +2148 2 3 33 -0.32768000000000000000e5 +2148 2 26 32 -0.32768000000000000000e5 +2148 2 27 32 0.32768000000000000000e5 +2148 3 4 33 -0.32768000000000000000e5 +2148 3 6 35 -0.65536000000000000000e5 +2148 3 17 30 0.65536000000000000000e5 +2148 3 19 32 -0.32768000000000000000e5 +2148 3 20 33 0.65536000000000000000e5 +2149 1 1 48 -0.32768000000000000000e5 +2149 1 2 49 -0.65536000000000000000e5 +2149 1 3 50 -0.65536000000000000000e5 +2149 1 11 42 0.13107200000000000000e6 +2149 1 12 43 0.26214400000000000000e6 +2149 1 17 48 -0.26214400000000000000e6 +2149 1 23 38 -0.32768000000000000000e5 +2149 1 23 54 0.32768000000000000000e5 +2149 1 24 39 -0.32768000000000000000e5 +2149 1 24 55 -0.65536000000000000000e5 +2149 1 25 56 0.32768000000000000000e5 +2149 2 2 32 -0.32768000000000000000e5 +2149 2 3 33 -0.32768000000000000000e5 +2149 2 8 22 0.13107200000000000000e6 +2149 2 12 26 -0.13107200000000000000e6 +2149 2 16 30 -0.65536000000000000000e5 +2149 2 27 33 0.32768000000000000000e5 +2149 3 2 31 -0.13107200000000000000e6 +2149 3 4 33 -0.32768000000000000000e5 +2149 3 14 27 -0.26214400000000000000e6 +2149 3 19 32 -0.32768000000000000000e5 +2149 3 28 33 0.32768000000000000000e5 +2149 4 4 16 -0.13107200000000000000e6 +2150 2 21 35 -0.32768000000000000000e5 +2150 2 27 34 0.32768000000000000000e5 +2151 1 1 48 0.32768000000000000000e5 +2151 1 2 49 0.32768000000000000000e5 +2151 1 3 50 0.65536000000000000000e5 +2151 1 11 42 -0.13107200000000000000e6 +2151 1 12 43 -0.26214400000000000000e6 +2151 1 17 48 0.26214400000000000000e6 +2151 1 23 38 0.32768000000000000000e5 +2151 1 24 55 -0.65536000000000000000e5 +2151 1 25 56 0.32768000000000000000e5 +2151 1 38 53 0.32768000000000000000e5 +2151 1 47 50 0.65536000000000000000e5 +2151 1 47 54 0.32768000000000000000e5 +2151 2 2 32 0.32768000000000000000e5 +2151 2 8 22 -0.13107200000000000000e6 +2151 2 12 26 0.13107200000000000000e6 +2151 2 16 30 0.65536000000000000000e5 +2151 2 21 35 -0.65536000000000000000e5 +2151 2 27 35 0.32768000000000000000e5 +2151 2 29 35 0.65536000000000000000e5 +2151 3 2 31 0.13107200000000000000e6 +2151 3 14 27 0.26214400000000000000e6 +2151 3 17 30 0.65536000000000000000e5 +2151 3 20 33 0.65536000000000000000e5 +2151 3 22 35 -0.65536000000000000000e5 +2151 3 29 34 0.13107200000000000000e6 +2151 3 32 33 0.32768000000000000000e5 +2151 4 4 16 0.13107200000000000000e6 +2152 2 5 35 -0.16384000000000000000e5 +2152 2 28 28 0.32768000000000000000e5 +2153 2 4 34 -0.32768000000000000000e5 +2153 2 28 29 0.32768000000000000000e5 +2153 3 5 34 -0.32768000000000000000e5 +2153 3 17 30 -0.32768000000000000000e5 +2153 3 18 31 0.65536000000000000000e5 +2153 3 22 27 -0.32768000000000000000e5 +2154 1 15 54 0.32768000000000000000e5 +2154 1 28 43 0.32768000000000000000e5 +2154 1 33 48 0.32768000000000000000e5 +2154 1 34 49 -0.65536000000000000000e5 +2154 2 28 31 0.32768000000000000000e5 +2154 3 18 31 -0.32768000000000000000e5 +2155 1 1 48 -0.32768000000000000000e5 +2155 1 2 49 -0.65536000000000000000e5 +2155 1 3 50 -0.65536000000000000000e5 +2155 1 11 42 0.13107200000000000000e6 +2155 1 12 43 0.26214400000000000000e6 +2155 1 17 48 -0.26214400000000000000e6 +2155 1 23 38 -0.32768000000000000000e5 +2155 1 23 54 0.32768000000000000000e5 +2155 1 24 39 -0.32768000000000000000e5 +2155 1 24 55 -0.65536000000000000000e5 +2155 1 25 56 0.32768000000000000000e5 +2155 2 2 32 -0.32768000000000000000e5 +2155 2 3 33 -0.32768000000000000000e5 +2155 2 8 22 0.13107200000000000000e6 +2155 2 12 26 -0.13107200000000000000e6 +2155 2 16 30 -0.65536000000000000000e5 +2155 2 28 32 0.32768000000000000000e5 +2155 3 2 31 -0.13107200000000000000e6 +2155 3 4 33 -0.32768000000000000000e5 +2155 3 14 27 -0.26214400000000000000e6 +2155 3 19 32 -0.32768000000000000000e5 +2155 3 28 33 0.32768000000000000000e5 +2155 4 4 16 -0.13107200000000000000e6 +2156 2 19 35 -0.32768000000000000000e5 +2156 2 28 33 0.32768000000000000000e5 +2157 2 28 35 0.32768000000000000000e5 +2157 2 33 33 -0.65536000000000000000e5 +2158 2 20 34 -0.16384000000000000000e5 +2158 2 29 29 0.32768000000000000000e5 +2159 1 17 48 -0.65536000000000000000e5 +2159 1 28 43 0.32768000000000000000e5 +2159 1 32 47 0.32768000000000000000e5 +2159 1 33 48 0.32768000000000000000e5 +2159 2 29 30 0.32768000000000000000e5 +2159 3 18 31 -0.32768000000000000000e5 +2159 3 24 29 0.65536000000000000000e5 +2160 1 16 55 -0.65536000000000000000e5 +2160 1 17 48 0.32768000000000000000e5 +2160 1 28 43 0.16384000000000000000e5 +2160 1 32 47 0.16384000000000000000e5 +2160 1 34 49 0.32768000000000000000e5 +2160 1 37 44 0.16384000000000000000e5 +2160 2 20 34 0.16384000000000000000e5 +2160 2 29 31 0.32768000000000000000e5 +2160 3 18 31 -0.16384000000000000000e5 +2160 3 24 29 -0.32768000000000000000e5 +2161 1 1 48 -0.16384000000000000000e5 +2161 1 2 49 -0.16384000000000000000e5 +2161 1 3 50 -0.32768000000000000000e5 +2161 1 7 54 0.32768000000000000000e5 +2161 1 11 42 0.65536000000000000000e5 +2161 1 12 43 0.13107200000000000000e6 +2161 1 17 48 -0.13107200000000000000e6 +2161 1 23 38 -0.16384000000000000000e5 +2161 1 24 55 0.32768000000000000000e5 +2161 1 37 52 -0.65536000000000000000e5 +2161 2 2 32 -0.16384000000000000000e5 +2161 2 8 22 0.65536000000000000000e5 +2161 2 12 26 -0.65536000000000000000e5 +2161 2 16 30 -0.32768000000000000000e5 +2161 2 29 32 0.32768000000000000000e5 +2161 3 2 31 -0.65536000000000000000e5 +2161 3 6 35 -0.32768000000000000000e5 +2161 3 14 27 -0.13107200000000000000e6 +2161 3 17 30 -0.32768000000000000000e5 +2161 3 20 33 -0.32768000000000000000e5 +2161 4 4 16 -0.65536000000000000000e5 +2162 2 21 35 -0.32768000000000000000e5 +2162 2 29 33 0.32768000000000000000e5 +2163 1 17 48 -0.65536000000000000000e5 +2163 1 28 43 0.32768000000000000000e5 +2163 1 32 47 0.32768000000000000000e5 +2163 1 33 48 0.32768000000000000000e5 +2163 2 29 34 0.32768000000000000000e5 +2163 3 18 31 -0.32768000000000000000e5 +2163 3 24 29 0.65536000000000000000e5 +2163 4 16 20 0.32768000000000000000e5 +2164 1 15 54 0.16384000000000000000e5 +2164 1 28 43 0.16384000000000000000e5 +2164 1 33 48 0.16384000000000000000e5 +2164 1 34 49 -0.32768000000000000000e5 +2164 2 30 30 0.32768000000000000000e5 +2164 3 18 31 -0.16384000000000000000e5 +2165 2 24 34 -0.32768000000000000000e5 +2165 2 30 31 0.32768000000000000000e5 +2166 2 21 35 -0.32768000000000000000e5 +2166 2 30 32 0.32768000000000000000e5 +2167 2 28 34 -0.32768000000000000000e5 +2167 2 30 33 0.32768000000000000000e5 +2168 2 30 34 0.32768000000000000000e5 +2168 2 31 33 -0.32768000000000000000e5 +2169 1 28 43 0.65536000000000000000e5 +2169 1 40 55 0.32768000000000000000e5 +2169 1 47 50 -0.32768000000000000000e5 +2169 1 50 51 -0.65536000000000000000e5 +2169 2 29 35 -0.32768000000000000000e5 +2169 2 30 35 0.32768000000000000000e5 +2169 3 18 31 -0.65536000000000000000e5 +2169 3 21 34 -0.65536000000000000000e5 +2169 3 29 34 -0.65536000000000000000e5 +2170 1 17 48 -0.65536000000000000000e5 +2170 1 28 43 0.32768000000000000000e5 +2170 1 32 47 0.32768000000000000000e5 +2170 1 33 48 0.32768000000000000000e5 +2170 2 31 32 0.32768000000000000000e5 +2170 3 18 31 -0.32768000000000000000e5 +2170 3 24 29 0.65536000000000000000e5 +2170 4 16 20 0.32768000000000000000e5 +2171 1 17 48 0.32768000000000000000e5 +2171 1 32 47 -0.16384000000000000000e5 +2171 1 33 48 -0.16384000000000000000e5 +2171 1 35 50 -0.65536000000000000000e5 +2171 1 37 52 0.16384000000000000000e5 +2171 1 43 50 0.16384000000000000000e5 +2171 1 44 51 0.32768000000000000000e5 +2171 1 46 49 0.32768000000000000000e5 +2171 2 31 34 0.32768000000000000000e5 +2171 3 21 34 -0.16384000000000000000e5 +2171 3 24 29 -0.32768000000000000000e5 +2171 3 25 34 0.65536000000000000000e5 +2171 4 16 20 -0.16384000000000000000e5 +2172 1 28 43 0.32768000000000000000e5 +2172 1 33 56 0.32768000000000000000e5 +2172 1 46 53 -0.65536000000000000000e5 +2172 1 50 51 0.32768000000000000000e5 +2172 2 31 35 0.32768000000000000000e5 +2172 3 18 31 -0.32768000000000000000e5 +2172 3 21 34 -0.32768000000000000000e5 +2172 3 29 34 -0.32768000000000000000e5 +2173 1 1 48 0.32768000000000000000e5 +2173 1 2 49 0.32768000000000000000e5 +2173 1 3 50 0.65536000000000000000e5 +2173 1 11 42 -0.13107200000000000000e6 +2173 1 12 43 -0.26214400000000000000e6 +2173 1 17 48 0.26214400000000000000e6 +2173 1 23 38 0.32768000000000000000e5 +2173 1 24 55 -0.65536000000000000000e5 +2173 1 25 56 0.32768000000000000000e5 +2173 1 38 53 0.32768000000000000000e5 +2173 1 47 50 0.65536000000000000000e5 +2173 1 47 54 0.32768000000000000000e5 +2173 2 2 32 0.32768000000000000000e5 +2173 2 8 22 -0.13107200000000000000e6 +2173 2 12 26 0.13107200000000000000e6 +2173 2 16 30 0.65536000000000000000e5 +2173 2 21 35 -0.65536000000000000000e5 +2173 2 29 35 0.65536000000000000000e5 +2173 2 32 33 0.32768000000000000000e5 +2173 3 2 31 0.13107200000000000000e6 +2173 3 14 27 0.26214400000000000000e6 +2173 3 17 30 0.65536000000000000000e5 +2173 3 20 33 0.65536000000000000000e5 +2173 3 22 35 -0.65536000000000000000e5 +2173 3 29 34 0.13107200000000000000e6 +2173 3 32 33 0.32768000000000000000e5 +2173 4 4 16 0.13107200000000000000e6 +2174 2 29 35 -0.32768000000000000000e5 +2174 2 32 34 0.32768000000000000000e5 +2175 1 1 48 0.32768000000000000000e5 +2175 1 2 49 0.32768000000000000000e5 +2175 1 3 50 0.65536000000000000000e5 +2175 1 11 42 -0.13107200000000000000e6 +2175 1 12 43 -0.26214400000000000000e6 +2175 1 17 48 0.26214400000000000000e6 +2175 1 23 38 0.32768000000000000000e5 +2175 1 24 55 -0.65536000000000000000e5 +2175 1 25 56 0.32768000000000000000e5 +2175 1 38 53 0.32768000000000000000e5 +2175 1 47 50 0.65536000000000000000e5 +2175 1 47 54 0.32768000000000000000e5 +2175 2 2 32 0.32768000000000000000e5 +2175 2 8 22 -0.13107200000000000000e6 +2175 2 12 26 0.13107200000000000000e6 +2175 2 16 30 0.65536000000000000000e5 +2175 2 21 35 -0.65536000000000000000e5 +2175 2 29 35 0.65536000000000000000e5 +2175 2 32 35 0.32768000000000000000e5 +2175 3 2 31 0.13107200000000000000e6 +2175 3 14 27 0.26214400000000000000e6 +2175 3 17 30 0.65536000000000000000e5 +2175 3 20 33 0.65536000000000000000e5 +2175 3 22 35 -0.65536000000000000000e5 +2175 3 29 34 0.13107200000000000000e6 +2175 3 32 33 0.32768000000000000000e5 +2175 4 4 16 0.13107200000000000000e6 +2175 4 20 20 0.65536000000000000000e5 +2176 1 28 43 0.65536000000000000000e5 +2176 1 40 55 0.32768000000000000000e5 +2176 1 47 50 -0.32768000000000000000e5 +2176 1 50 51 -0.65536000000000000000e5 +2176 2 29 35 -0.32768000000000000000e5 +2176 2 33 34 0.32768000000000000000e5 +2176 3 18 31 -0.65536000000000000000e5 +2176 3 21 34 -0.65536000000000000000e5 +2176 3 29 34 -0.65536000000000000000e5 +2177 1 28 43 0.16384000000000000000e5 +2177 1 33 56 0.16384000000000000000e5 +2177 1 46 53 -0.32768000000000000000e5 +2177 1 50 51 0.16384000000000000000e5 +2177 2 34 34 0.32768000000000000000e5 +2177 3 18 31 -0.16384000000000000000e5 +2177 3 21 34 -0.16384000000000000000e5 +2177 3 29 34 -0.16384000000000000000e5 +2178 1 1 48 0.16384000000000000000e5 +2178 1 2 49 0.16384000000000000000e5 +2178 1 3 50 0.32768000000000000000e5 +2178 1 11 42 -0.65536000000000000000e5 +2178 1 12 43 -0.13107200000000000000e6 +2178 1 17 48 0.13107200000000000000e6 +2178 1 23 38 0.16384000000000000000e5 +2178 1 24 55 -0.32768000000000000000e5 +2178 1 28 43 0.65536000000000000000e5 +2178 1 41 56 0.32768000000000000000e5 +2178 1 51 54 0.32768000000000000000e5 +2178 1 52 53 -0.65536000000000000000e5 +2178 2 2 32 0.16384000000000000000e5 +2178 2 8 22 -0.65536000000000000000e5 +2178 2 12 26 0.65536000000000000000e5 +2178 2 16 30 0.32768000000000000000e5 +2178 2 21 35 -0.32768000000000000000e5 +2178 2 34 35 0.32768000000000000000e5 +2178 3 2 31 0.65536000000000000000e5 +2178 3 14 27 0.13107200000000000000e6 +2178 3 17 30 0.32768000000000000000e5 +2178 3 18 31 -0.65536000000000000000e5 +2178 3 20 33 0.32768000000000000000e5 +2178 3 21 34 -0.65536000000000000000e5 +2178 3 22 35 -0.32768000000000000000e5 +2178 3 30 35 -0.32768000000000000000e5 +2178 4 4 16 0.65536000000000000000e5 +2179 1 1 8 -0.32768000000000000000e5 +2179 1 1 40 0.16384000000000000000e5 +2179 1 2 5 -0.16384000000000000000e5 +2179 1 2 9 0.32768000000000000000e5 +2179 1 7 22 0.32768000000000000000e5 +2179 1 7 38 0.32768000000000000000e5 +2179 1 8 23 -0.65536000000000000000e5 +2179 3 1 1 0.32768000000000000000e5 +2179 3 1 2 0.16384000000000000000e5 +2179 3 2 3 -0.16384000000000000000e5 +2179 3 3 16 -0.16384000000000000000e5 +2179 3 4 17 -0.16384000000000000000e5 +2179 3 6 19 -0.32768000000000000000e5 +2179 3 7 20 0.65536000000000000000e5 +2179 4 1 1 0.32768000000000000000e5 +2179 4 1 13 -0.16384000000000000000e5 +2179 4 2 2 -0.32768000000000000000e5 +2179 4 2 14 -0.32768000000000000000e5 +2180 1 1 40 -0.32768000000000000000e5 +2180 1 2 5 0.32768000000000000000e5 +2180 1 2 9 -0.65536000000000000000e5 +2180 1 7 38 -0.65536000000000000000e5 +2180 1 8 23 0.13107200000000000000e6 +2180 3 1 3 0.32768000000000000000e5 +2180 3 2 3 0.32768000000000000000e5 +2180 3 3 16 0.32768000000000000000e5 +2180 3 4 17 0.32768000000000000000e5 +2180 3 6 19 0.65536000000000000000e5 +2180 3 7 20 -0.13107200000000000000e6 +2180 4 1 13 0.32768000000000000000e5 +2180 4 2 2 0.65536000000000000000e5 +2180 4 2 14 0.65536000000000000000e5 +2181 3 1 4 0.32768000000000000000e5 +2181 3 2 3 -0.32768000000000000000e5 +2182 1 1 40 0.32768000000000000000e5 +2182 1 2 5 -0.32768000000000000000e5 +2182 1 7 38 0.65536000000000000000e5 +2182 1 8 23 -0.65536000000000000000e5 +2182 3 1 5 0.32768000000000000000e5 +2182 3 3 16 -0.32768000000000000000e5 +2182 3 4 17 -0.32768000000000000000e5 +2182 3 6 19 -0.65536000000000000000e5 +2182 3 7 20 0.13107200000000000000e6 +2182 4 1 13 -0.32768000000000000000e5 +2182 4 2 14 -0.65536000000000000000e5 +2183 1 1 8 -0.32768000000000000000e5 +2183 1 7 22 0.32768000000000000000e5 +2183 3 1 6 0.32768000000000000000e5 +2184 1 1 40 -0.16384000000000000000e5 +2184 1 2 5 0.16384000000000000000e5 +2184 1 2 9 -0.32768000000000000000e5 +2184 1 7 38 -0.32768000000000000000e5 +2184 1 8 23 0.65536000000000000000e5 +2184 2 1 3 -0.16384000000000000000e5 +2184 2 2 16 0.16384000000000000000e5 +2184 3 1 2 -0.16384000000000000000e5 +2184 3 1 7 0.32768000000000000000e5 +2184 3 3 16 0.16384000000000000000e5 +2184 3 4 17 0.16384000000000000000e5 +2184 3 6 19 0.32768000000000000000e5 +2184 3 7 20 -0.65536000000000000000e5 +2184 4 1 13 0.16384000000000000000e5 +2184 4 2 2 0.32768000000000000000e5 +2184 4 2 14 0.32768000000000000000e5 +2185 1 2 9 -0.32768000000000000000e5 +2185 1 8 23 0.32768000000000000000e5 +2185 3 1 8 0.32768000000000000000e5 +2186 1 1 48 0.16384000000000000000e5 +2186 1 2 9 0.32768000000000000000e5 +2186 1 2 17 0.13107200000000000000e6 +2186 1 2 33 0.65536000000000000000e5 +2186 1 2 49 0.16384000000000000000e5 +2186 1 3 18 0.26214400000000000000e6 +2186 1 4 19 0.26214400000000000000e6 +2186 1 4 35 0.26214400000000000000e6 +2186 1 6 13 -0.65536000000000000000e5 +2186 1 7 38 0.32768000000000000000e5 +2186 1 8 23 -0.32768000000000000000e5 +2186 1 8 39 0.32768000000000000000e5 +2186 1 11 42 -0.65536000000000000000e5 +2186 1 18 25 0.13107200000000000000e6 +2186 1 20 27 -0.52428800000000000000e6 +2186 1 23 38 0.16384000000000000000e5 +2186 2 2 8 0.32768000000000000000e5 +2186 2 2 32 0.16384000000000000000e5 +2186 2 4 10 0.65536000000000000000e5 +2186 2 6 12 0.13107200000000000000e6 +2186 2 8 22 -0.65536000000000000000e5 +2186 2 9 23 0.13107200000000000000e6 +2186 2 10 24 0.26214400000000000000e6 +2186 3 1 9 0.32768000000000000000e5 +2186 3 1 30 0.32768000000000000000e5 +2186 3 2 15 -0.26214400000000000000e6 +2186 3 3 8 0.32768000000000000000e5 +2186 3 7 20 0.65536000000000000000e5 +2186 3 8 13 -0.26214400000000000000e6 +2186 3 9 22 -0.65536000000000000000e5 +2186 4 2 14 -0.32768000000000000000e5 +2186 4 4 8 -0.65536000000000000000e5 +2187 1 1 8 -0.16384000000000000000e5 +2187 1 1 40 -0.81920000000000000000e4 +2187 1 2 5 0.81920000000000000000e4 +2187 1 2 9 -0.32768000000000000000e5 +2187 1 7 22 0.16384000000000000000e5 +2187 1 7 38 -0.16384000000000000000e5 +2187 1 8 23 0.49152000000000000000e5 +2187 2 1 3 -0.81920000000000000000e4 +2187 2 2 16 0.81920000000000000000e4 +2187 3 1 2 -0.81920000000000000000e4 +2187 3 1 10 0.32768000000000000000e5 +2187 3 3 16 0.81920000000000000000e4 +2187 3 4 17 0.81920000000000000000e4 +2187 3 6 19 0.16384000000000000000e5 +2187 3 7 20 -0.32768000000000000000e5 +2187 4 1 5 -0.16384000000000000000e5 +2187 4 1 13 0.81920000000000000000e4 +2187 4 2 2 0.16384000000000000000e5 +2187 4 2 14 0.16384000000000000000e5 +2188 3 1 11 0.32768000000000000000e5 +2188 3 6 7 -0.32768000000000000000e5 +2189 1 2 17 0.65536000000000000000e5 +2189 1 3 18 0.13107200000000000000e6 +2189 1 3 34 0.65536000000000000000e5 +2189 1 4 19 0.13107200000000000000e6 +2189 1 4 35 0.13107200000000000000e6 +2189 1 6 13 -0.32768000000000000000e5 +2189 1 10 41 -0.32768000000000000000e5 +2189 1 11 42 -0.32768000000000000000e5 +2189 1 18 25 0.65536000000000000000e5 +2189 1 20 27 -0.26214400000000000000e6 +2189 2 4 10 0.32768000000000000000e5 +2189 2 6 12 0.65536000000000000000e5 +2189 2 7 21 -0.32768000000000000000e5 +2189 2 8 22 -0.32768000000000000000e5 +2189 2 9 23 0.65536000000000000000e5 +2189 2 10 24 0.13107200000000000000e6 +2189 3 1 12 0.32768000000000000000e5 +2189 3 2 15 -0.13107200000000000000e6 +2189 3 8 13 -0.13107200000000000000e6 +2189 3 8 21 -0.32768000000000000000e5 +2189 3 9 22 -0.32768000000000000000e5 +2189 4 4 8 -0.32768000000000000000e5 +2190 1 1 8 -0.81920000000000000000e4 +2190 1 1 40 -0.40960000000000000000e4 +2190 1 2 5 0.40960000000000000000e4 +2190 1 2 9 -0.16384000000000000000e5 +2190 1 2 17 0.32768000000000000000e5 +2190 1 3 18 0.65536000000000000000e5 +2190 1 3 34 0.32768000000000000000e5 +2190 1 4 19 0.65536000000000000000e5 +2190 1 4 35 0.65536000000000000000e5 +2190 1 6 13 -0.16384000000000000000e5 +2190 1 7 22 0.81920000000000000000e4 +2190 1 7 38 -0.81920000000000000000e4 +2190 1 8 23 0.24576000000000000000e5 +2190 1 10 41 -0.16384000000000000000e5 +2190 1 11 42 -0.16384000000000000000e5 +2190 1 18 25 0.32768000000000000000e5 +2190 1 20 27 -0.13107200000000000000e6 +2190 2 1 3 -0.40960000000000000000e4 +2190 2 2 16 0.40960000000000000000e4 +2190 2 4 10 0.16384000000000000000e5 +2190 2 6 12 0.32768000000000000000e5 +2190 2 7 21 -0.16384000000000000000e5 +2190 2 8 22 -0.16384000000000000000e5 +2190 2 9 23 0.32768000000000000000e5 +2190 2 10 24 0.65536000000000000000e5 +2190 3 1 2 -0.40960000000000000000e4 +2190 3 1 13 0.32768000000000000000e5 +2190 3 2 15 -0.65536000000000000000e5 +2190 3 3 16 0.40960000000000000000e4 +2190 3 4 17 0.40960000000000000000e4 +2190 3 6 7 -0.16384000000000000000e5 +2190 3 6 19 0.81920000000000000000e4 +2190 3 7 20 -0.16384000000000000000e5 +2190 3 8 13 -0.65536000000000000000e5 +2190 3 8 21 -0.16384000000000000000e5 +2190 3 9 22 -0.16384000000000000000e5 +2190 4 1 5 -0.81920000000000000000e4 +2190 4 1 13 0.40960000000000000000e4 +2190 4 2 2 0.81920000000000000000e4 +2190 4 2 14 0.81920000000000000000e4 +2190 4 4 8 -0.16384000000000000000e5 +2190 4 5 5 -0.32768000000000000000e5 +2191 1 13 16 -0.65536000000000000000e5 +2191 1 16 31 0.65536000000000000000e5 +2191 3 1 15 0.32768000000000000000e5 +2191 3 2 15 0.32768000000000000000e5 +2191 3 8 13 0.32768000000000000000e5 +2191 4 8 8 0.65536000000000000000e5 +2192 1 1 24 -0.32768000000000000000e5 +2192 1 1 40 -0.32768000000000000000e5 +2192 1 2 33 -0.13107200000000000000e6 +2192 1 2 49 -0.32768000000000000000e5 +2192 1 3 34 0.26214400000000000000e6 +2192 1 3 50 0.65536000000000000000e5 +2192 1 5 52 -0.13107200000000000000e6 +2192 1 6 37 -0.32768000000000000000e5 +2192 1 10 41 -0.13107200000000000000e6 +2192 1 11 42 0.13107200000000000000e6 +2192 1 12 43 0.26214400000000000000e6 +2192 1 16 47 -0.26214400000000000000e6 +2192 1 22 37 0.32768000000000000000e5 +2192 1 28 43 -0.13107200000000000000e6 +2192 2 2 32 -0.32768000000000000000e5 +2192 2 3 17 0.32768000000000000000e5 +2192 2 4 26 -0.32768000000000000000e5 +2192 2 7 21 -0.13107200000000000000e6 +2192 2 10 32 0.13107200000000000000e6 +2192 2 12 26 -0.13107200000000000000e6 +2192 3 1 17 0.32768000000000000000e5 +2192 3 1 30 -0.13107200000000000000e6 +2192 3 2 31 -0.13107200000000000000e6 +2192 3 7 20 -0.13107200000000000000e6 +2192 3 8 21 -0.13107200000000000000e6 +2192 3 14 27 -0.26214400000000000000e6 +2192 4 1 13 -0.32768000000000000000e5 +2192 4 5 17 -0.65536000000000000000e5 +2192 4 7 19 0.13107200000000000000e6 +2192 4 11 11 -0.65536000000000000000e5 +2193 3 1 18 0.32768000000000000000e5 +2193 3 3 16 -0.32768000000000000000e5 +2194 1 7 38 -0.65536000000000000000e5 +2194 1 8 23 0.65536000000000000000e5 +2194 3 1 19 0.32768000000000000000e5 +2194 3 3 16 0.32768000000000000000e5 +2194 3 4 17 0.32768000000000000000e5 +2194 3 6 19 0.65536000000000000000e5 +2194 3 7 20 -0.13107200000000000000e6 +2194 4 1 13 0.32768000000000000000e5 +2194 4 2 14 0.65536000000000000000e5 +2195 1 1 24 -0.16384000000000000000e5 +2195 1 1 40 -0.16384000000000000000e5 +2195 1 2 33 -0.65536000000000000000e5 +2195 1 2 49 -0.16384000000000000000e5 +2195 1 3 34 0.13107200000000000000e6 +2195 1 3 50 0.32768000000000000000e5 +2195 1 5 52 -0.65536000000000000000e5 +2195 1 6 37 -0.16384000000000000000e5 +2195 1 10 41 -0.65536000000000000000e5 +2195 1 11 42 0.65536000000000000000e5 +2195 1 12 43 0.13107200000000000000e6 +2195 1 16 47 -0.13107200000000000000e6 +2195 1 22 37 0.16384000000000000000e5 +2195 1 28 43 -0.65536000000000000000e5 +2195 2 2 16 -0.16384000000000000000e5 +2195 2 2 32 -0.16384000000000000000e5 +2195 2 3 17 0.16384000000000000000e5 +2195 2 4 26 -0.16384000000000000000e5 +2195 2 7 21 -0.65536000000000000000e5 +2195 2 10 32 0.65536000000000000000e5 +2195 2 12 26 -0.65536000000000000000e5 +2195 2 16 16 0.32768000000000000000e5 +2195 3 1 16 -0.16384000000000000000e5 +2195 3 1 20 0.32768000000000000000e5 +2195 3 1 30 -0.65536000000000000000e5 +2195 3 2 31 -0.65536000000000000000e5 +2195 3 3 16 -0.16384000000000000000e5 +2195 3 7 20 -0.65536000000000000000e5 +2195 3 8 21 -0.65536000000000000000e5 +2195 3 14 27 -0.13107200000000000000e6 +2195 4 1 13 -0.16384000000000000000e5 +2195 4 5 17 -0.32768000000000000000e5 +2195 4 7 19 0.65536000000000000000e5 +2195 4 11 11 -0.32768000000000000000e5 +2196 1 7 38 0.32768000000000000000e5 +2196 1 8 23 -0.32768000000000000000e5 +2196 3 1 21 0.32768000000000000000e5 +2197 1 7 38 -0.32768000000000000000e5 +2197 1 8 23 0.32768000000000000000e5 +2197 3 1 22 0.32768000000000000000e5 +2197 3 6 19 0.32768000000000000000e5 +2197 3 7 20 -0.65536000000000000000e5 +2197 4 2 14 0.32768000000000000000e5 +2198 1 1 32 -0.32768000000000000000e5 +2198 1 2 17 0.65536000000000000000e5 +2198 1 2 33 0.32768000000000000000e5 +2198 1 3 34 -0.65536000000000000000e5 +2198 1 10 41 0.32768000000000000000e5 +2198 1 11 42 -0.32768000000000000000e5 +2198 1 12 43 -0.65536000000000000000e5 +2198 1 17 48 0.65536000000000000000e5 +2198 2 1 31 -0.32768000000000000000e5 +2198 2 7 21 0.32768000000000000000e5 +2198 2 8 22 -0.32768000000000000000e5 +2198 2 12 26 0.32768000000000000000e5 +2198 3 1 14 -0.65536000000000000000e5 +2198 3 1 23 0.32768000000000000000e5 +2198 3 6 23 -0.65536000000000000000e5 +2198 3 7 20 0.32768000000000000000e5 +2198 3 8 21 0.32768000000000000000e5 +2198 3 14 27 0.65536000000000000000e5 +2198 4 4 16 0.32768000000000000000e5 +2199 3 1 24 0.32768000000000000000e5 +2199 3 7 20 -0.32768000000000000000e5 +2200 3 1 25 0.32768000000000000000e5 +2200 3 6 23 -0.32768000000000000000e5 +2201 1 1 40 0.32768000000000000000e5 +2201 1 2 33 0.13107200000000000000e6 +2201 1 2 49 0.32768000000000000000e5 +2201 1 3 34 -0.26214400000000000000e6 +2201 1 3 50 -0.65536000000000000000e5 +2201 1 5 52 0.13107200000000000000e6 +2201 1 6 37 0.32768000000000000000e5 +2201 1 10 41 0.13107200000000000000e6 +2201 1 11 42 -0.13107200000000000000e6 +2201 1 12 43 -0.26214400000000000000e6 +2201 1 16 47 0.26214400000000000000e6 +2201 1 28 43 0.13107200000000000000e6 +2201 2 2 32 0.32768000000000000000e5 +2201 2 3 17 -0.32768000000000000000e5 +2201 2 4 26 0.32768000000000000000e5 +2201 2 7 21 0.13107200000000000000e6 +2201 2 10 32 -0.13107200000000000000e6 +2201 2 12 26 0.13107200000000000000e6 +2201 3 1 26 0.32768000000000000000e5 +2201 3 1 30 0.13107200000000000000e6 +2201 3 2 31 0.13107200000000000000e6 +2201 3 7 20 0.13107200000000000000e6 +2201 3 8 21 0.13107200000000000000e6 +2201 3 14 27 0.26214400000000000000e6 +2201 4 1 13 0.32768000000000000000e5 +2201 4 5 17 0.65536000000000000000e5 +2201 4 7 19 -0.13107200000000000000e6 +2201 4 11 11 0.65536000000000000000e5 +2202 1 2 49 -0.32768000000000000000e5 +2202 1 6 37 -0.32768000000000000000e5 +2202 1 8 39 0.65536000000000000000e5 +2202 1 23 38 -0.32768000000000000000e5 +2202 2 2 32 -0.32768000000000000000e5 +2202 2 3 17 0.32768000000000000000e5 +2202 2 4 26 -0.32768000000000000000e5 +2202 3 1 27 0.32768000000000000000e5 +2202 3 1 30 -0.65536000000000000000e5 +2202 4 1 13 -0.32768000000000000000e5 +2203 1 1 40 -0.32768000000000000000e5 +2203 1 23 38 0.32768000000000000000e5 +2203 3 1 28 0.32768000000000000000e5 +2204 1 2 33 0.65536000000000000000e5 +2204 1 3 34 -0.13107200000000000000e6 +2204 1 3 50 -0.32768000000000000000e5 +2204 1 5 52 0.65536000000000000000e5 +2204 1 8 39 0.32768000000000000000e5 +2204 1 10 41 0.65536000000000000000e5 +2204 1 11 42 -0.65536000000000000000e5 +2204 1 12 43 -0.13107200000000000000e6 +2204 1 16 47 0.13107200000000000000e6 +2204 1 28 43 0.65536000000000000000e5 +2204 2 7 21 0.65536000000000000000e5 +2204 2 10 32 -0.65536000000000000000e5 +2204 2 12 26 0.65536000000000000000e5 +2204 3 1 29 0.32768000000000000000e5 +2204 3 1 30 0.32768000000000000000e5 +2204 3 2 31 0.65536000000000000000e5 +2204 3 7 20 0.65536000000000000000e5 +2204 3 8 21 0.65536000000000000000e5 +2204 3 14 27 0.13107200000000000000e6 +2204 4 5 17 0.32768000000000000000e5 +2204 4 7 19 -0.65536000000000000000e5 +2205 1 2 33 0.32768000000000000000e5 +2205 1 3 34 -0.65536000000000000000e5 +2205 1 5 52 0.32768000000000000000e5 +2205 1 10 41 0.32768000000000000000e5 +2205 1 11 42 -0.32768000000000000000e5 +2205 1 12 43 -0.65536000000000000000e5 +2205 1 16 47 0.65536000000000000000e5 +2205 1 28 43 0.32768000000000000000e5 +2205 2 7 21 0.32768000000000000000e5 +2205 2 10 32 -0.32768000000000000000e5 +2205 2 12 26 0.32768000000000000000e5 +2205 3 1 31 0.32768000000000000000e5 +2205 3 2 31 0.32768000000000000000e5 +2205 3 7 20 0.32768000000000000000e5 +2205 3 8 21 0.32768000000000000000e5 +2205 3 14 27 0.65536000000000000000e5 +2205 4 7 19 -0.32768000000000000000e5 +2206 1 2 49 0.32768000000000000000e5 +2206 1 7 54 -0.65536000000000000000e5 +2206 1 23 38 0.32768000000000000000e5 +2206 1 24 39 0.32768000000000000000e5 +2206 2 1 35 -0.32768000000000000000e5 +2206 2 2 32 0.32768000000000000000e5 +2206 2 3 33 0.32768000000000000000e5 +2206 2 18 32 -0.32768000000000000000e5 +2206 2 26 32 0.32768000000000000000e5 +2206 3 1 32 0.32768000000000000000e5 +2206 3 3 32 0.32768000000000000000e5 +2206 3 4 33 0.32768000000000000000e5 +2206 3 16 29 -0.65536000000000000000e5 +2206 3 17 30 -0.65536000000000000000e5 +2206 4 17 17 0.65536000000000000000e5 +2207 1 2 49 -0.32768000000000000000e5 +2207 1 7 54 0.65536000000000000000e5 +2207 1 23 38 -0.32768000000000000000e5 +2207 1 24 39 -0.32768000000000000000e5 +2207 2 3 33 -0.32768000000000000000e5 +2207 2 18 32 0.32768000000000000000e5 +2207 2 26 32 -0.32768000000000000000e5 +2207 3 1 33 0.32768000000000000000e5 +2207 3 4 33 -0.32768000000000000000e5 +2207 3 17 30 0.65536000000000000000e5 +2207 4 17 17 -0.65536000000000000000e5 +2208 3 1 34 0.32768000000000000000e5 +2208 3 16 29 -0.32768000000000000000e5 +2209 1 2 49 0.32768000000000000000e5 +2209 1 7 54 -0.65536000000000000000e5 +2209 1 22 53 0.32768000000000000000e5 +2209 1 24 39 0.32768000000000000000e5 +2209 2 3 33 0.32768000000000000000e5 +2209 2 18 32 -0.32768000000000000000e5 +2209 2 26 32 0.32768000000000000000e5 +2209 3 1 35 0.32768000000000000000e5 +2209 3 4 33 0.32768000000000000000e5 +2209 3 17 30 -0.65536000000000000000e5 +2209 4 17 17 0.65536000000000000000e5 +2210 1 1 40 -0.16384000000000000000e5 +2210 1 2 5 0.16384000000000000000e5 +2210 1 2 9 -0.32768000000000000000e5 +2210 1 7 38 -0.32768000000000000000e5 +2210 1 8 23 0.65536000000000000000e5 +2210 3 2 2 0.32768000000000000000e5 +2210 3 2 3 0.16384000000000000000e5 +2210 3 3 16 0.16384000000000000000e5 +2210 3 4 17 0.16384000000000000000e5 +2210 3 6 19 0.32768000000000000000e5 +2210 3 7 20 -0.65536000000000000000e5 +2210 4 1 13 0.16384000000000000000e5 +2210 4 2 2 0.32768000000000000000e5 +2210 4 2 14 0.32768000000000000000e5 +2211 1 1 40 0.32768000000000000000e5 +2211 1 2 5 -0.32768000000000000000e5 +2211 1 7 38 0.65536000000000000000e5 +2211 1 8 23 -0.65536000000000000000e5 +2211 3 2 4 0.32768000000000000000e5 +2211 3 3 16 -0.32768000000000000000e5 +2211 3 4 17 -0.32768000000000000000e5 +2211 3 6 19 -0.65536000000000000000e5 +2211 3 7 20 0.13107200000000000000e6 +2211 4 1 13 -0.32768000000000000000e5 +2211 4 2 14 -0.65536000000000000000e5 +2212 1 1 40 -0.32768000000000000000e5 +2212 1 1 48 0.32768000000000000000e5 +2212 1 2 5 0.32768000000000000000e5 +2212 1 2 9 0.65536000000000000000e5 +2212 1 2 17 0.26214400000000000000e6 +2212 1 2 33 0.13107200000000000000e6 +2212 1 2 49 0.32768000000000000000e5 +2212 1 3 18 0.52428800000000000000e6 +2212 1 4 19 0.52428800000000000000e6 +2212 1 4 35 0.52428800000000000000e6 +2212 1 6 13 -0.13107200000000000000e6 +2212 1 8 39 0.65536000000000000000e5 +2212 1 11 42 -0.13107200000000000000e6 +2212 1 18 25 0.26214400000000000000e6 +2212 1 20 27 -0.10485760000000000000e7 +2212 1 23 38 0.32768000000000000000e5 +2212 2 2 4 0.32768000000000000000e5 +2212 2 2 8 0.65536000000000000000e5 +2212 2 2 32 0.32768000000000000000e5 +2212 2 3 17 -0.32768000000000000000e5 +2212 2 4 10 0.13107200000000000000e6 +2212 2 6 12 0.26214400000000000000e6 +2212 2 8 22 -0.13107200000000000000e6 +2212 2 9 23 0.26214400000000000000e6 +2212 2 10 24 0.52428800000000000000e6 +2212 3 1 30 0.65536000000000000000e5 +2212 3 2 3 0.32768000000000000000e5 +2212 3 2 5 0.32768000000000000000e5 +2212 3 2 15 -0.52428800000000000000e6 +2212 3 3 8 0.65536000000000000000e5 +2212 3 3 16 0.32768000000000000000e5 +2212 3 4 17 0.32768000000000000000e5 +2212 3 6 19 0.65536000000000000000e5 +2212 3 8 13 -0.52428800000000000000e6 +2212 3 9 22 -0.13107200000000000000e6 +2212 4 1 13 0.32768000000000000000e5 +2212 4 4 8 -0.13107200000000000000e6 +2213 1 1 40 -0.16384000000000000000e5 +2213 1 2 5 0.16384000000000000000e5 +2213 1 2 9 -0.32768000000000000000e5 +2213 1 7 38 -0.32768000000000000000e5 +2213 1 8 23 0.65536000000000000000e5 +2213 2 1 3 -0.16384000000000000000e5 +2213 2 2 16 0.16384000000000000000e5 +2213 3 1 2 -0.16384000000000000000e5 +2213 3 2 6 0.32768000000000000000e5 +2213 3 3 16 0.16384000000000000000e5 +2213 3 4 17 0.16384000000000000000e5 +2213 3 6 19 0.32768000000000000000e5 +2213 3 7 20 -0.65536000000000000000e5 +2213 4 1 13 0.16384000000000000000e5 +2213 4 2 2 0.32768000000000000000e5 +2213 4 2 14 0.32768000000000000000e5 +2214 1 2 9 -0.32768000000000000000e5 +2214 1 8 23 0.32768000000000000000e5 +2214 3 2 7 0.32768000000000000000e5 +2215 1 1 48 0.16384000000000000000e5 +2215 1 2 9 0.32768000000000000000e5 +2215 1 2 17 0.13107200000000000000e6 +2215 1 2 33 0.65536000000000000000e5 +2215 1 2 49 0.16384000000000000000e5 +2215 1 3 18 0.26214400000000000000e6 +2215 1 4 19 0.26214400000000000000e6 +2215 1 4 35 0.26214400000000000000e6 +2215 1 6 13 -0.65536000000000000000e5 +2215 1 7 38 0.32768000000000000000e5 +2215 1 8 23 -0.32768000000000000000e5 +2215 1 8 39 0.32768000000000000000e5 +2215 1 11 42 -0.65536000000000000000e5 +2215 1 18 25 0.13107200000000000000e6 +2215 1 20 27 -0.52428800000000000000e6 +2215 1 23 38 0.16384000000000000000e5 +2215 2 2 8 0.32768000000000000000e5 +2215 2 2 32 0.16384000000000000000e5 +2215 2 4 10 0.65536000000000000000e5 +2215 2 6 12 0.13107200000000000000e6 +2215 2 8 22 -0.65536000000000000000e5 +2215 2 9 23 0.13107200000000000000e6 +2215 2 10 24 0.26214400000000000000e6 +2215 3 1 30 0.32768000000000000000e5 +2215 3 2 8 0.32768000000000000000e5 +2215 3 2 15 -0.26214400000000000000e6 +2215 3 3 8 0.32768000000000000000e5 +2215 3 7 20 0.65536000000000000000e5 +2215 3 8 13 -0.26214400000000000000e6 +2215 3 9 22 -0.65536000000000000000e5 +2215 4 2 14 -0.32768000000000000000e5 +2215 4 4 8 -0.65536000000000000000e5 +2216 3 2 9 0.32768000000000000000e5 +2216 3 3 8 -0.32768000000000000000e5 +2217 3 2 10 0.32768000000000000000e5 +2217 3 6 7 -0.32768000000000000000e5 +2218 1 2 17 0.65536000000000000000e5 +2218 1 3 18 0.13107200000000000000e6 +2218 1 3 34 0.65536000000000000000e5 +2218 1 4 19 0.13107200000000000000e6 +2218 1 4 35 0.13107200000000000000e6 +2218 1 6 13 -0.32768000000000000000e5 +2218 1 10 41 -0.32768000000000000000e5 +2218 1 11 42 -0.32768000000000000000e5 +2218 1 18 25 0.65536000000000000000e5 +2218 1 20 27 -0.26214400000000000000e6 +2218 2 4 10 0.32768000000000000000e5 +2218 2 6 12 0.65536000000000000000e5 +2218 2 7 21 -0.32768000000000000000e5 +2218 2 8 22 -0.32768000000000000000e5 +2218 2 9 23 0.65536000000000000000e5 +2218 2 10 24 0.13107200000000000000e6 +2218 3 2 11 0.32768000000000000000e5 +2218 3 2 15 -0.13107200000000000000e6 +2218 3 8 13 -0.13107200000000000000e6 +2218 3 8 21 -0.32768000000000000000e5 +2218 3 9 22 -0.32768000000000000000e5 +2218 4 4 8 -0.32768000000000000000e5 +2219 1 3 18 -0.65536000000000000000e5 +2219 1 4 35 -0.13107200000000000000e6 +2219 1 6 13 0.32768000000000000000e5 +2219 1 10 41 0.32768000000000000000e5 +2219 1 11 42 0.32768000000000000000e5 +2219 1 18 25 -0.65536000000000000000e5 +2219 1 28 35 0.13107200000000000000e6 +2219 2 8 22 0.32768000000000000000e5 +2219 2 9 23 -0.65536000000000000000e5 +2219 3 2 12 0.32768000000000000000e5 +2219 3 5 10 0.32768000000000000000e5 +2219 3 8 21 0.32768000000000000000e5 +2219 3 9 22 0.32768000000000000000e5 +2219 3 11 24 0.13107200000000000000e6 +2219 4 4 8 0.32768000000000000000e5 +2220 3 1 14 -0.32768000000000000000e5 +2220 3 2 13 0.32768000000000000000e5 +2221 1 2 17 0.32768000000000000000e5 +2221 1 3 18 0.32768000000000000000e5 +2221 1 3 34 0.32768000000000000000e5 +2221 1 4 19 0.65536000000000000000e5 +2221 1 20 27 -0.13107200000000000000e6 +2221 1 28 35 0.65536000000000000000e5 +2221 2 6 12 0.32768000000000000000e5 +2221 2 10 24 0.65536000000000000000e5 +2221 3 2 14 0.32768000000000000000e5 +2221 3 2 15 -0.65536000000000000000e5 +2221 3 8 13 -0.65536000000000000000e5 +2221 3 11 24 0.65536000000000000000e5 +2222 1 1 24 -0.32768000000000000000e5 +2222 1 1 40 -0.32768000000000000000e5 +2222 1 2 33 -0.13107200000000000000e6 +2222 1 2 49 -0.32768000000000000000e5 +2222 1 3 34 0.26214400000000000000e6 +2222 1 3 50 0.65536000000000000000e5 +2222 1 5 52 -0.13107200000000000000e6 +2222 1 6 37 -0.32768000000000000000e5 +2222 1 10 41 -0.13107200000000000000e6 +2222 1 11 42 0.13107200000000000000e6 +2222 1 12 43 0.26214400000000000000e6 +2222 1 16 47 -0.26214400000000000000e6 +2222 1 22 37 0.32768000000000000000e5 +2222 1 28 43 -0.13107200000000000000e6 +2222 2 2 32 -0.32768000000000000000e5 +2222 2 3 17 0.32768000000000000000e5 +2222 2 4 26 -0.32768000000000000000e5 +2222 2 7 21 -0.13107200000000000000e6 +2222 2 10 32 0.13107200000000000000e6 +2222 2 12 26 -0.13107200000000000000e6 +2222 3 1 30 -0.13107200000000000000e6 +2222 3 2 16 0.32768000000000000000e5 +2222 3 2 31 -0.13107200000000000000e6 +2222 3 7 20 -0.13107200000000000000e6 +2222 3 8 21 -0.13107200000000000000e6 +2222 3 14 27 -0.26214400000000000000e6 +2222 4 1 13 -0.32768000000000000000e5 +2222 4 5 17 -0.65536000000000000000e5 +2222 4 7 19 0.13107200000000000000e6 +2222 4 11 11 -0.65536000000000000000e5 +2223 3 2 17 0.32768000000000000000e5 +2223 3 3 16 -0.32768000000000000000e5 +2224 1 7 38 -0.65536000000000000000e5 +2224 1 8 23 0.65536000000000000000e5 +2224 3 2 18 0.32768000000000000000e5 +2224 3 3 16 0.32768000000000000000e5 +2224 3 4 17 0.32768000000000000000e5 +2224 3 6 19 0.65536000000000000000e5 +2224 3 7 20 -0.13107200000000000000e6 +2224 4 1 13 0.32768000000000000000e5 +2224 4 2 14 0.65536000000000000000e5 +2225 3 2 19 0.32768000000000000000e5 +2225 3 4 17 -0.32768000000000000000e5 +2226 1 7 38 0.32768000000000000000e5 +2226 1 8 23 -0.32768000000000000000e5 +2226 3 2 20 0.32768000000000000000e5 +2227 1 7 38 -0.32768000000000000000e5 +2227 1 8 23 0.32768000000000000000e5 +2227 3 2 21 0.32768000000000000000e5 +2227 3 6 19 0.32768000000000000000e5 +2227 3 7 20 -0.65536000000000000000e5 +2227 4 2 14 0.32768000000000000000e5 +2228 3 2 22 0.32768000000000000000e5 +2228 3 6 19 -0.32768000000000000000e5 +2229 3 2 23 0.32768000000000000000e5 +2229 3 7 20 -0.32768000000000000000e5 +2230 1 2 33 -0.32768000000000000000e5 +2230 1 11 42 0.32768000000000000000e5 +2230 1 12 43 0.65536000000000000000e5 +2230 1 17 48 -0.65536000000000000000e5 +2230 2 8 22 0.32768000000000000000e5 +2230 2 12 26 -0.32768000000000000000e5 +2230 3 2 24 0.32768000000000000000e5 +2230 3 14 27 -0.65536000000000000000e5 +2230 4 4 16 -0.32768000000000000000e5 +2231 1 3 34 -0.32768000000000000000e5 +2231 1 16 47 0.32768000000000000000e5 +2231 3 2 25 0.32768000000000000000e5 +2231 3 13 26 0.32768000000000000000e5 +2232 1 2 49 -0.32768000000000000000e5 +2232 1 6 37 -0.32768000000000000000e5 +2232 1 8 39 0.65536000000000000000e5 +2232 1 23 38 -0.32768000000000000000e5 +2232 2 2 32 -0.32768000000000000000e5 +2232 2 3 17 0.32768000000000000000e5 +2232 2 4 26 -0.32768000000000000000e5 +2232 3 1 30 -0.65536000000000000000e5 +2232 3 2 26 0.32768000000000000000e5 +2232 4 1 13 -0.32768000000000000000e5 +2233 1 1 40 -0.32768000000000000000e5 +2233 1 23 38 0.32768000000000000000e5 +2233 3 2 27 0.32768000000000000000e5 +2234 1 1 40 0.32768000000000000000e5 +2234 1 2 49 0.32768000000000000000e5 +2234 1 6 37 0.32768000000000000000e5 +2234 1 8 39 -0.65536000000000000000e5 +2234 2 4 26 0.32768000000000000000e5 +2234 3 2 28 0.32768000000000000000e5 +2235 3 1 30 -0.32768000000000000000e5 +2235 3 2 29 0.32768000000000000000e5 +2236 1 3 50 0.32768000000000000000e5 +2236 1 8 39 -0.32768000000000000000e5 +2236 3 2 30 0.32768000000000000000e5 +2237 1 2 49 -0.32768000000000000000e5 +2237 1 7 54 0.65536000000000000000e5 +2237 1 23 38 -0.32768000000000000000e5 +2237 1 24 39 -0.32768000000000000000e5 +2237 2 3 33 -0.32768000000000000000e5 +2237 2 18 32 0.32768000000000000000e5 +2237 2 26 32 -0.32768000000000000000e5 +2237 3 2 32 0.32768000000000000000e5 +2237 3 4 33 -0.32768000000000000000e5 +2237 3 17 30 0.65536000000000000000e5 +2237 4 17 17 -0.65536000000000000000e5 +2238 3 2 33 0.32768000000000000000e5 +2238 3 3 32 -0.32768000000000000000e5 +2239 1 3 50 -0.32768000000000000000e5 +2239 1 7 54 0.32768000000000000000e5 +2239 3 2 34 0.32768000000000000000e5 +2240 1 2 49 -0.32768000000000000000e5 +2240 1 7 54 0.65536000000000000000e5 +2240 1 22 53 -0.32768000000000000000e5 +2240 1 23 54 -0.32768000000000000000e5 +2240 2 26 32 -0.32768000000000000000e5 +2240 3 2 35 0.32768000000000000000e5 +2240 3 3 32 0.32768000000000000000e5 +2240 3 6 35 -0.65536000000000000000e5 +2241 1 1 40 0.16384000000000000000e5 +2241 1 2 5 -0.16384000000000000000e5 +2241 1 7 38 0.32768000000000000000e5 +2241 1 8 23 -0.32768000000000000000e5 +2241 3 3 3 0.32768000000000000000e5 +2241 3 3 16 -0.16384000000000000000e5 +2241 3 4 17 -0.16384000000000000000e5 +2241 3 6 19 -0.32768000000000000000e5 +2241 3 7 20 0.65536000000000000000e5 +2241 4 1 13 -0.16384000000000000000e5 +2241 4 2 14 -0.32768000000000000000e5 +2242 1 1 40 -0.32768000000000000000e5 +2242 1 1 48 0.32768000000000000000e5 +2242 1 2 5 0.32768000000000000000e5 +2242 1 2 9 0.65536000000000000000e5 +2242 1 2 17 0.26214400000000000000e6 +2242 1 2 33 0.13107200000000000000e6 +2242 1 2 49 0.32768000000000000000e5 +2242 1 3 18 0.52428800000000000000e6 +2242 1 4 19 0.52428800000000000000e6 +2242 1 4 35 0.52428800000000000000e6 +2242 1 6 13 -0.13107200000000000000e6 +2242 1 8 39 0.65536000000000000000e5 +2242 1 11 42 -0.13107200000000000000e6 +2242 1 18 25 0.26214400000000000000e6 +2242 1 20 27 -0.10485760000000000000e7 +2242 1 23 38 0.32768000000000000000e5 +2242 2 2 4 0.32768000000000000000e5 +2242 2 2 8 0.65536000000000000000e5 +2242 2 2 32 0.32768000000000000000e5 +2242 2 3 17 -0.32768000000000000000e5 +2242 2 4 10 0.13107200000000000000e6 +2242 2 6 12 0.26214400000000000000e6 +2242 2 8 22 -0.13107200000000000000e6 +2242 2 9 23 0.26214400000000000000e6 +2242 2 10 24 0.52428800000000000000e6 +2242 3 1 30 0.65536000000000000000e5 +2242 3 2 3 0.32768000000000000000e5 +2242 3 2 15 -0.52428800000000000000e6 +2242 3 3 4 0.32768000000000000000e5 +2242 3 3 8 0.65536000000000000000e5 +2242 3 3 16 0.32768000000000000000e5 +2242 3 4 17 0.32768000000000000000e5 +2242 3 6 19 0.65536000000000000000e5 +2242 3 8 13 -0.52428800000000000000e6 +2242 3 9 22 -0.13107200000000000000e6 +2242 4 1 13 0.32768000000000000000e5 +2242 4 4 8 -0.13107200000000000000e6 +2243 1 1 40 0.32768000000000000000e5 +2243 1 1 48 -0.65536000000000000000e5 +2243 1 2 5 -0.32768000000000000000e5 +2243 1 2 9 -0.65536000000000000000e5 +2243 1 2 17 -0.26214400000000000000e6 +2243 1 2 33 -0.13107200000000000000e6 +2243 1 2 49 -0.65536000000000000000e5 +2243 1 3 18 -0.52428800000000000000e6 +2243 1 4 19 -0.52428800000000000000e6 +2243 1 4 35 -0.52428800000000000000e6 +2243 1 5 52 0.13107200000000000000e6 +2243 1 6 13 0.13107200000000000000e6 +2243 1 8 39 -0.65536000000000000000e5 +2243 1 11 42 0.26214400000000000000e6 +2243 1 12 43 0.26214400000000000000e6 +2243 1 17 48 -0.52428800000000000000e6 +2243 1 18 25 -0.26214400000000000000e6 +2243 1 20 27 0.10485760000000000000e7 +2243 1 23 38 -0.65536000000000000000e5 +2243 1 26 41 0.65536000000000000000e5 +2243 1 28 43 0.13107200000000000000e6 +2243 2 2 4 -0.32768000000000000000e5 +2243 2 2 8 -0.65536000000000000000e5 +2243 2 2 32 -0.65536000000000000000e5 +2243 2 3 5 0.32768000000000000000e5 +2243 2 3 9 0.65536000000000000000e5 +2243 2 3 17 0.32768000000000000000e5 +2243 2 4 10 -0.13107200000000000000e6 +2243 2 4 18 -0.32768000000000000000e5 +2243 2 6 12 -0.26214400000000000000e6 +2243 2 8 22 0.39321600000000000000e6 +2243 2 9 23 -0.26214400000000000000e6 +2243 2 10 24 -0.52428800000000000000e6 +2243 2 12 26 -0.13107200000000000000e6 +2243 2 16 30 -0.65536000000000000000e5 +2243 3 1 30 -0.65536000000000000000e5 +2243 3 2 3 -0.32768000000000000000e5 +2243 3 2 15 0.52428800000000000000e6 +2243 3 2 31 -0.13107200000000000000e6 +2243 3 3 5 0.32768000000000000000e5 +2243 3 3 16 -0.32768000000000000000e5 +2243 3 4 5 0.32768000000000000000e5 +2243 3 4 9 0.65536000000000000000e5 +2243 3 4 17 -0.32768000000000000000e5 +2243 3 5 10 -0.13107200000000000000e6 +2243 3 6 19 -0.65536000000000000000e5 +2243 3 8 13 0.52428800000000000000e6 +2243 3 9 22 0.13107200000000000000e6 +2243 3 14 27 -0.26214400000000000000e6 +2243 4 1 13 -0.32768000000000000000e5 +2243 4 3 15 -0.65536000000000000000e5 +2243 4 4 8 0.13107200000000000000e6 +2243 4 4 16 -0.26214400000000000000e6 +2243 4 6 18 -0.65536000000000000000e5 +2243 4 7 19 -0.13107200000000000000e6 +2244 1 2 9 -0.32768000000000000000e5 +2244 1 8 23 0.32768000000000000000e5 +2244 3 3 6 0.32768000000000000000e5 +2245 1 1 48 0.16384000000000000000e5 +2245 1 2 9 0.32768000000000000000e5 +2245 1 2 17 0.13107200000000000000e6 +2245 1 2 33 0.65536000000000000000e5 +2245 1 2 49 0.16384000000000000000e5 +2245 1 3 18 0.26214400000000000000e6 +2245 1 4 19 0.26214400000000000000e6 +2245 1 4 35 0.26214400000000000000e6 +2245 1 6 13 -0.65536000000000000000e5 +2245 1 7 38 0.32768000000000000000e5 +2245 1 8 23 -0.32768000000000000000e5 +2245 1 8 39 0.32768000000000000000e5 +2245 1 11 42 -0.65536000000000000000e5 +2245 1 18 25 0.13107200000000000000e6 +2245 1 20 27 -0.52428800000000000000e6 +2245 1 23 38 0.16384000000000000000e5 +2245 2 2 8 0.32768000000000000000e5 +2245 2 2 32 0.16384000000000000000e5 +2245 2 4 10 0.65536000000000000000e5 +2245 2 6 12 0.13107200000000000000e6 +2245 2 8 22 -0.65536000000000000000e5 +2245 2 9 23 0.13107200000000000000e6 +2245 2 10 24 0.26214400000000000000e6 +2245 3 1 30 0.32768000000000000000e5 +2245 3 2 15 -0.26214400000000000000e6 +2245 3 3 7 0.32768000000000000000e5 +2245 3 3 8 0.32768000000000000000e5 +2245 3 7 20 0.65536000000000000000e5 +2245 3 8 13 -0.26214400000000000000e6 +2245 3 9 22 -0.65536000000000000000e5 +2245 4 2 14 -0.32768000000000000000e5 +2245 4 4 8 -0.65536000000000000000e5 +2246 1 1 48 -0.16384000000000000000e5 +2246 1 2 49 -0.16384000000000000000e5 +2246 1 5 52 0.65536000000000000000e5 +2246 1 11 42 0.65536000000000000000e5 +2246 1 12 43 0.13107200000000000000e6 +2246 1 17 48 -0.26214400000000000000e6 +2246 1 23 38 -0.16384000000000000000e5 +2246 1 26 41 0.32768000000000000000e5 +2246 1 28 43 0.65536000000000000000e5 +2246 2 2 32 -0.16384000000000000000e5 +2246 2 3 9 0.32768000000000000000e5 +2246 2 8 22 0.13107200000000000000e6 +2246 2 12 26 -0.65536000000000000000e5 +2246 2 16 30 -0.32768000000000000000e5 +2246 3 2 31 -0.65536000000000000000e5 +2246 3 3 8 0.32768000000000000000e5 +2246 3 3 9 0.32768000000000000000e5 +2246 3 4 9 0.32768000000000000000e5 +2246 3 5 10 -0.65536000000000000000e5 +2246 3 14 27 -0.13107200000000000000e6 +2246 4 3 15 -0.32768000000000000000e5 +2246 4 4 16 -0.13107200000000000000e6 +2246 4 6 18 -0.32768000000000000000e5 +2246 4 7 19 -0.65536000000000000000e5 +2247 1 2 17 0.65536000000000000000e5 +2247 1 3 18 0.13107200000000000000e6 +2247 1 3 34 0.65536000000000000000e5 +2247 1 4 19 0.13107200000000000000e6 +2247 1 4 35 0.13107200000000000000e6 +2247 1 6 13 -0.32768000000000000000e5 +2247 1 10 41 -0.32768000000000000000e5 +2247 1 11 42 -0.32768000000000000000e5 +2247 1 18 25 0.65536000000000000000e5 +2247 1 20 27 -0.26214400000000000000e6 +2247 2 4 10 0.32768000000000000000e5 +2247 2 6 12 0.65536000000000000000e5 +2247 2 7 21 -0.32768000000000000000e5 +2247 2 8 22 -0.32768000000000000000e5 +2247 2 9 23 0.65536000000000000000e5 +2247 2 10 24 0.13107200000000000000e6 +2247 3 2 15 -0.13107200000000000000e6 +2247 3 3 10 0.32768000000000000000e5 +2247 3 8 13 -0.13107200000000000000e6 +2247 3 8 21 -0.32768000000000000000e5 +2247 3 9 22 -0.32768000000000000000e5 +2247 4 4 8 -0.32768000000000000000e5 +2248 1 3 18 -0.65536000000000000000e5 +2248 1 4 35 -0.13107200000000000000e6 +2248 1 6 13 0.32768000000000000000e5 +2248 1 10 41 0.32768000000000000000e5 +2248 1 11 42 0.32768000000000000000e5 +2248 1 18 25 -0.65536000000000000000e5 +2248 1 28 35 0.13107200000000000000e6 +2248 2 8 22 0.32768000000000000000e5 +2248 2 9 23 -0.65536000000000000000e5 +2248 3 3 11 0.32768000000000000000e5 +2248 3 5 10 0.32768000000000000000e5 +2248 3 8 21 0.32768000000000000000e5 +2248 3 9 22 0.32768000000000000000e5 +2248 3 11 24 0.13107200000000000000e6 +2248 4 4 8 0.32768000000000000000e5 +2249 3 3 12 0.32768000000000000000e5 +2249 3 5 10 -0.32768000000000000000e5 +2250 1 2 17 0.32768000000000000000e5 +2250 1 3 18 0.32768000000000000000e5 +2250 1 3 34 0.32768000000000000000e5 +2250 1 4 19 0.65536000000000000000e5 +2250 1 20 27 -0.13107200000000000000e6 +2250 1 28 35 0.65536000000000000000e5 +2250 2 6 12 0.32768000000000000000e5 +2250 2 10 24 0.65536000000000000000e5 +2250 3 2 15 -0.65536000000000000000e5 +2250 3 3 13 0.32768000000000000000e5 +2250 3 8 13 -0.65536000000000000000e5 +2250 3 11 24 0.65536000000000000000e5 +2251 1 3 18 -0.32768000000000000000e5 +2251 1 4 35 -0.32768000000000000000e5 +2251 1 18 25 -0.32768000000000000000e5 +2251 1 28 35 0.65536000000000000000e5 +2251 2 9 23 -0.32768000000000000000e5 +2251 3 3 14 0.32768000000000000000e5 +2251 3 11 24 0.65536000000000000000e5 +2252 3 3 15 0.32768000000000000000e5 +2252 3 8 13 -0.32768000000000000000e5 +2253 1 7 38 -0.65536000000000000000e5 +2253 1 8 23 0.65536000000000000000e5 +2253 3 3 16 0.32768000000000000000e5 +2253 3 3 17 0.32768000000000000000e5 +2253 3 4 17 0.32768000000000000000e5 +2253 3 6 19 0.65536000000000000000e5 +2253 3 7 20 -0.13107200000000000000e6 +2253 4 1 13 0.32768000000000000000e5 +2253 4 2 14 0.65536000000000000000e5 +2254 3 3 18 0.32768000000000000000e5 +2254 3 4 17 -0.32768000000000000000e5 +2255 1 3 26 -0.32768000000000000000e5 +2255 1 6 37 0.32768000000000000000e5 +2255 3 3 19 0.32768000000000000000e5 +2256 1 7 38 -0.32768000000000000000e5 +2256 1 8 23 0.32768000000000000000e5 +2256 3 3 20 0.32768000000000000000e5 +2256 3 6 19 0.32768000000000000000e5 +2256 3 7 20 -0.65536000000000000000e5 +2256 4 2 14 0.32768000000000000000e5 +2257 3 3 21 0.32768000000000000000e5 +2257 3 6 19 -0.32768000000000000000e5 +2258 1 9 40 -0.32768000000000000000e5 +2258 1 10 25 0.32768000000000000000e5 +2258 3 3 22 0.32768000000000000000e5 +2258 3 6 19 0.32768000000000000000e5 +2258 3 8 21 -0.65536000000000000000e5 +2258 4 3 15 0.32768000000000000000e5 +2259 1 2 33 -0.32768000000000000000e5 +2259 1 11 42 0.32768000000000000000e5 +2259 1 12 43 0.65536000000000000000e5 +2259 1 17 48 -0.65536000000000000000e5 +2259 2 8 22 0.32768000000000000000e5 +2259 2 12 26 -0.32768000000000000000e5 +2259 3 3 23 0.32768000000000000000e5 +2259 3 14 27 -0.65536000000000000000e5 +2259 4 4 16 -0.32768000000000000000e5 +2260 3 3 24 0.32768000000000000000e5 +2260 3 8 21 -0.32768000000000000000e5 +2261 1 4 35 0.32768000000000000000e5 +2261 1 12 43 0.32768000000000000000e5 +2261 1 18 25 0.32768000000000000000e5 +2261 1 28 35 -0.65536000000000000000e5 +2261 2 9 23 0.32768000000000000000e5 +2261 3 3 25 0.32768000000000000000e5 +2261 3 11 24 -0.65536000000000000000e5 +2262 1 1 40 -0.32768000000000000000e5 +2262 1 23 38 0.32768000000000000000e5 +2262 3 3 26 0.32768000000000000000e5 +2263 1 1 40 0.32768000000000000000e5 +2263 1 2 49 0.32768000000000000000e5 +2263 1 6 37 0.32768000000000000000e5 +2263 1 8 39 -0.65536000000000000000e5 +2263 2 4 26 0.32768000000000000000e5 +2263 3 3 27 0.32768000000000000000e5 +2264 1 6 37 -0.32768000000000000000e5 +2264 1 24 39 0.32768000000000000000e5 +2264 3 3 28 0.32768000000000000000e5 +2265 1 3 50 0.32768000000000000000e5 +2265 1 8 39 -0.32768000000000000000e5 +2265 3 3 29 0.32768000000000000000e5 +2266 1 3 50 -0.32768000000000000000e5 +2266 1 5 52 -0.65536000000000000000e5 +2266 1 8 39 0.32768000000000000000e5 +2266 1 9 40 0.32768000000000000000e5 +2266 1 10 41 -0.65536000000000000000e5 +2266 1 17 48 0.13107200000000000000e6 +2266 1 26 41 -0.32768000000000000000e5 +2266 1 28 43 -0.65536000000000000000e5 +2266 2 8 22 -0.65536000000000000000e5 +2266 3 3 30 0.32768000000000000000e5 +2266 4 4 16 0.65536000000000000000e5 +2266 4 6 18 0.32768000000000000000e5 +2266 4 7 19 0.65536000000000000000e5 +2267 1 5 52 -0.32768000000000000000e5 +2267 1 10 41 -0.32768000000000000000e5 +2267 1 17 48 0.65536000000000000000e5 +2267 1 28 43 -0.32768000000000000000e5 +2267 2 8 22 -0.32768000000000000000e5 +2267 3 3 31 0.32768000000000000000e5 +2267 4 4 16 0.32768000000000000000e5 +2267 4 7 19 0.32768000000000000000e5 +2268 2 3 33 0.32768000000000000000e5 +2268 2 18 32 -0.32768000000000000000e5 +2268 3 3 32 0.32768000000000000000e5 +2268 3 3 33 0.32768000000000000000e5 +2268 3 4 33 0.32768000000000000000e5 +2268 3 17 30 -0.65536000000000000000e5 +2269 3 3 34 0.32768000000000000000e5 +2269 3 17 30 -0.32768000000000000000e5 +2270 1 23 54 0.32768000000000000000e5 +2270 1 24 39 -0.32768000000000000000e5 +2270 2 3 33 -0.32768000000000000000e5 +2270 2 18 32 0.32768000000000000000e5 +2270 3 3 32 -0.32768000000000000000e5 +2270 3 3 35 0.32768000000000000000e5 +2270 3 4 33 -0.32768000000000000000e5 +2270 3 17 30 0.65536000000000000000e5 +2271 1 1 40 0.16384000000000000000e5 +2271 1 1 48 -0.32768000000000000000e5 +2271 1 2 5 -0.16384000000000000000e5 +2271 1 2 9 -0.32768000000000000000e5 +2271 1 2 17 -0.13107200000000000000e6 +2271 1 2 33 -0.65536000000000000000e5 +2271 1 2 49 -0.32768000000000000000e5 +2271 1 3 18 -0.26214400000000000000e6 +2271 1 4 19 -0.26214400000000000000e6 +2271 1 4 35 -0.26214400000000000000e6 +2271 1 5 52 0.65536000000000000000e5 +2271 1 6 13 0.65536000000000000000e5 +2271 1 8 39 -0.32768000000000000000e5 +2271 1 11 42 0.13107200000000000000e6 +2271 1 12 43 0.13107200000000000000e6 +2271 1 17 48 -0.26214400000000000000e6 +2271 1 18 25 -0.13107200000000000000e6 +2271 1 20 27 0.52428800000000000000e6 +2271 1 23 38 -0.32768000000000000000e5 +2271 1 26 41 0.32768000000000000000e5 +2271 1 28 43 0.65536000000000000000e5 +2271 2 2 4 -0.16384000000000000000e5 +2271 2 2 8 -0.32768000000000000000e5 +2271 2 2 32 -0.32768000000000000000e5 +2271 2 3 5 0.16384000000000000000e5 +2271 2 3 9 0.32768000000000000000e5 +2271 2 3 17 0.16384000000000000000e5 +2271 2 4 10 -0.65536000000000000000e5 +2271 2 4 18 -0.16384000000000000000e5 +2271 2 6 12 -0.13107200000000000000e6 +2271 2 8 22 0.19660800000000000000e6 +2271 2 9 23 -0.13107200000000000000e6 +2271 2 10 24 -0.26214400000000000000e6 +2271 2 12 26 -0.65536000000000000000e5 +2271 2 16 30 -0.32768000000000000000e5 +2271 3 1 30 -0.32768000000000000000e5 +2271 3 2 3 -0.16384000000000000000e5 +2271 3 2 15 0.26214400000000000000e6 +2271 3 2 31 -0.65536000000000000000e5 +2271 3 3 16 -0.16384000000000000000e5 +2271 3 4 4 0.32768000000000000000e5 +2271 3 4 5 0.16384000000000000000e5 +2271 3 4 9 0.32768000000000000000e5 +2271 3 4 17 -0.16384000000000000000e5 +2271 3 5 10 -0.65536000000000000000e5 +2271 3 6 19 -0.32768000000000000000e5 +2271 3 8 13 0.26214400000000000000e6 +2271 3 9 22 0.65536000000000000000e5 +2271 3 14 27 -0.13107200000000000000e6 +2271 4 1 13 -0.16384000000000000000e5 +2271 4 3 15 -0.32768000000000000000e5 +2271 4 4 8 0.65536000000000000000e5 +2271 4 4 16 -0.13107200000000000000e6 +2271 4 6 18 -0.32768000000000000000e5 +2271 4 7 19 -0.65536000000000000000e5 +2272 1 1 48 0.16384000000000000000e5 +2272 1 2 9 0.32768000000000000000e5 +2272 1 2 17 0.13107200000000000000e6 +2272 1 2 33 0.65536000000000000000e5 +2272 1 2 49 0.16384000000000000000e5 +2272 1 3 18 0.26214400000000000000e6 +2272 1 4 19 0.26214400000000000000e6 +2272 1 4 35 0.26214400000000000000e6 +2272 1 6 13 -0.65536000000000000000e5 +2272 1 7 38 0.32768000000000000000e5 +2272 1 8 23 -0.32768000000000000000e5 +2272 1 8 39 0.32768000000000000000e5 +2272 1 11 42 -0.65536000000000000000e5 +2272 1 18 25 0.13107200000000000000e6 +2272 1 20 27 -0.52428800000000000000e6 +2272 1 23 38 0.16384000000000000000e5 +2272 2 2 8 0.32768000000000000000e5 +2272 2 2 32 0.16384000000000000000e5 +2272 2 4 10 0.65536000000000000000e5 +2272 2 6 12 0.13107200000000000000e6 +2272 2 8 22 -0.65536000000000000000e5 +2272 2 9 23 0.13107200000000000000e6 +2272 2 10 24 0.26214400000000000000e6 +2272 3 1 30 0.32768000000000000000e5 +2272 3 2 15 -0.26214400000000000000e6 +2272 3 3 8 0.32768000000000000000e5 +2272 3 4 6 0.32768000000000000000e5 +2272 3 7 20 0.65536000000000000000e5 +2272 3 8 13 -0.26214400000000000000e6 +2272 3 9 22 -0.65536000000000000000e5 +2272 4 2 14 -0.32768000000000000000e5 +2272 4 4 8 -0.65536000000000000000e5 +2273 3 3 8 -0.32768000000000000000e5 +2273 3 4 7 0.32768000000000000000e5 +2274 1 1 48 -0.16384000000000000000e5 +2274 1 2 49 -0.16384000000000000000e5 +2274 1 5 52 0.65536000000000000000e5 +2274 1 11 42 0.65536000000000000000e5 +2274 1 12 43 0.13107200000000000000e6 +2274 1 17 48 -0.26214400000000000000e6 +2274 1 23 38 -0.16384000000000000000e5 +2274 1 26 41 0.32768000000000000000e5 +2274 1 28 43 0.65536000000000000000e5 +2274 2 2 32 -0.16384000000000000000e5 +2274 2 3 9 0.32768000000000000000e5 +2274 2 8 22 0.13107200000000000000e6 +2274 2 12 26 -0.65536000000000000000e5 +2274 2 16 30 -0.32768000000000000000e5 +2274 3 2 31 -0.65536000000000000000e5 +2274 3 3 8 0.32768000000000000000e5 +2274 3 4 8 0.32768000000000000000e5 +2274 3 4 9 0.32768000000000000000e5 +2274 3 5 10 -0.65536000000000000000e5 +2274 3 14 27 -0.13107200000000000000e6 +2274 4 3 15 -0.32768000000000000000e5 +2274 4 4 16 -0.13107200000000000000e6 +2274 4 6 18 -0.32768000000000000000e5 +2274 4 7 19 -0.65536000000000000000e5 +2275 1 3 18 -0.65536000000000000000e5 +2275 1 4 35 -0.13107200000000000000e6 +2275 1 6 13 0.32768000000000000000e5 +2275 1 10 41 0.32768000000000000000e5 +2275 1 11 42 0.32768000000000000000e5 +2275 1 18 25 -0.65536000000000000000e5 +2275 1 28 35 0.13107200000000000000e6 +2275 2 8 22 0.32768000000000000000e5 +2275 2 9 23 -0.65536000000000000000e5 +2275 3 4 10 0.32768000000000000000e5 +2275 3 5 10 0.32768000000000000000e5 +2275 3 8 21 0.32768000000000000000e5 +2275 3 9 22 0.32768000000000000000e5 +2275 3 11 24 0.13107200000000000000e6 +2275 4 4 8 0.32768000000000000000e5 +2276 3 4 11 0.32768000000000000000e5 +2276 3 5 10 -0.32768000000000000000e5 +2277 1 4 35 0.65536000000000000000e5 +2277 1 6 13 -0.32768000000000000000e5 +2277 1 10 41 -0.32768000000000000000e5 +2277 1 11 42 -0.32768000000000000000e5 +2277 2 8 22 -0.32768000000000000000e5 +2277 3 4 12 0.32768000000000000000e5 +2277 3 8 21 -0.32768000000000000000e5 +2277 3 9 22 -0.32768000000000000000e5 +2278 1 3 18 -0.32768000000000000000e5 +2278 1 4 35 -0.32768000000000000000e5 +2278 1 18 25 -0.32768000000000000000e5 +2278 1 28 35 0.65536000000000000000e5 +2278 2 9 23 -0.32768000000000000000e5 +2278 3 4 13 0.32768000000000000000e5 +2278 3 11 24 0.65536000000000000000e5 +2279 1 3 18 0.32768000000000000000e5 +2279 1 4 35 0.32768000000000000000e5 +2279 1 10 17 -0.65536000000000000000e5 +2279 1 11 14 0.32768000000000000000e5 +2279 2 9 11 0.32768000000000000000e5 +2279 3 4 14 0.32768000000000000000e5 +2280 1 10 17 -0.32768000000000000000e5 +2280 1 28 35 0.32768000000000000000e5 +2280 3 4 15 0.32768000000000000000e5 +2280 3 11 24 0.32768000000000000000e5 +2281 1 7 38 -0.65536000000000000000e5 +2281 1 8 23 0.65536000000000000000e5 +2281 3 3 16 0.32768000000000000000e5 +2281 3 4 16 0.32768000000000000000e5 +2281 3 4 17 0.32768000000000000000e5 +2281 3 6 19 0.65536000000000000000e5 +2281 3 7 20 -0.13107200000000000000e6 +2281 4 1 13 0.32768000000000000000e5 +2281 4 2 14 0.65536000000000000000e5 +2282 1 3 26 -0.32768000000000000000e5 +2282 1 6 37 0.32768000000000000000e5 +2282 3 4 18 0.32768000000000000000e5 +2283 3 4 19 0.32768000000000000000e5 +2283 3 5 18 -0.32768000000000000000e5 +2284 3 4 20 0.32768000000000000000e5 +2284 3 6 19 -0.32768000000000000000e5 +2285 1 9 40 -0.32768000000000000000e5 +2285 1 10 25 0.32768000000000000000e5 +2285 3 4 21 0.32768000000000000000e5 +2285 3 6 19 0.32768000000000000000e5 +2285 3 8 21 -0.65536000000000000000e5 +2285 4 3 15 0.32768000000000000000e5 +2286 1 9 40 0.32768000000000000000e5 +2286 1 10 25 -0.32768000000000000000e5 +2286 3 4 22 0.32768000000000000000e5 +2287 3 4 23 0.32768000000000000000e5 +2287 3 8 21 -0.32768000000000000000e5 +2288 1 4 35 -0.65536000000000000000e5 +2288 1 17 48 0.65536000000000000000e5 +2288 3 4 24 0.32768000000000000000e5 +2288 3 8 21 0.32768000000000000000e5 +2288 3 9 22 0.32768000000000000000e5 +2288 3 14 27 0.65536000000000000000e5 +2288 4 4 16 0.32768000000000000000e5 +2289 1 4 35 -0.32768000000000000000e5 +2289 1 17 48 0.32768000000000000000e5 +2289 3 4 25 0.32768000000000000000e5 +2289 3 14 27 0.32768000000000000000e5 +2290 1 1 40 0.32768000000000000000e5 +2290 1 2 49 0.32768000000000000000e5 +2290 1 6 37 0.32768000000000000000e5 +2290 1 8 39 -0.65536000000000000000e5 +2290 2 4 26 0.32768000000000000000e5 +2290 3 4 26 0.32768000000000000000e5 +2291 1 6 37 -0.32768000000000000000e5 +2291 1 24 39 0.32768000000000000000e5 +2291 3 4 27 0.32768000000000000000e5 +2292 1 1 40 -0.32768000000000000000e5 +2292 1 2 49 -0.32768000000000000000e5 +2292 1 3 26 0.32768000000000000000e5 +2292 1 3 50 -0.65536000000000000000e5 +2292 1 5 52 -0.13107200000000000000e6 +2292 1 6 37 -0.32768000000000000000e5 +2292 1 8 39 0.13107200000000000000e6 +2292 1 10 25 0.65536000000000000000e5 +2292 1 10 41 -0.13107200000000000000e6 +2292 1 17 48 0.26214400000000000000e6 +2292 1 24 39 -0.32768000000000000000e5 +2292 1 26 41 -0.65536000000000000000e5 +2292 1 28 43 -0.13107200000000000000e6 +2292 2 3 33 -0.32768000000000000000e5 +2292 2 4 18 0.32768000000000000000e5 +2292 2 4 26 -0.32768000000000000000e5 +2292 2 8 22 -0.13107200000000000000e6 +2292 3 4 17 0.32768000000000000000e5 +2292 3 4 28 0.32768000000000000000e5 +2292 3 5 18 0.32768000000000000000e5 +2292 3 6 19 0.65536000000000000000e5 +2292 3 8 21 -0.13107200000000000000e6 +2292 4 3 15 0.65536000000000000000e5 +2292 4 4 16 0.13107200000000000000e6 +2292 4 6 18 0.65536000000000000000e5 +2292 4 7 19 0.13107200000000000000e6 +2293 1 3 50 -0.32768000000000000000e5 +2293 1 5 52 -0.65536000000000000000e5 +2293 1 8 39 0.32768000000000000000e5 +2293 1 9 40 0.32768000000000000000e5 +2293 1 10 41 -0.65536000000000000000e5 +2293 1 17 48 0.13107200000000000000e6 +2293 1 26 41 -0.32768000000000000000e5 +2293 1 28 43 -0.65536000000000000000e5 +2293 2 8 22 -0.65536000000000000000e5 +2293 3 4 29 0.32768000000000000000e5 +2293 4 4 16 0.65536000000000000000e5 +2293 4 6 18 0.32768000000000000000e5 +2293 4 7 19 0.65536000000000000000e5 +2294 1 9 40 -0.32768000000000000000e5 +2294 1 26 41 0.32768000000000000000e5 +2294 3 4 30 0.32768000000000000000e5 +2295 1 10 41 0.32768000000000000000e5 +2295 1 11 42 0.32768000000000000000e5 +2295 1 17 48 -0.65536000000000000000e5 +2295 1 28 43 0.32768000000000000000e5 +2295 2 8 22 0.32768000000000000000e5 +2295 3 4 31 0.32768000000000000000e5 +2295 3 14 27 -0.65536000000000000000e5 +2295 4 4 16 -0.32768000000000000000e5 +2296 2 3 33 0.32768000000000000000e5 +2296 2 18 32 -0.32768000000000000000e5 +2296 3 3 32 0.32768000000000000000e5 +2296 3 4 32 0.32768000000000000000e5 +2296 3 4 33 0.32768000000000000000e5 +2296 3 17 30 -0.65536000000000000000e5 +2297 3 4 34 0.32768000000000000000e5 +2297 3 22 27 -0.32768000000000000000e5 +2298 3 4 35 0.32768000000000000000e5 +2298 3 19 32 -0.32768000000000000000e5 +2299 1 1 40 -0.16384000000000000000e5 +2299 1 1 48 0.32768000000000000000e5 +2299 1 2 5 0.16384000000000000000e5 +2299 1 2 9 0.32768000000000000000e5 +2299 1 2 17 0.13107200000000000000e6 +2299 1 2 33 0.65536000000000000000e5 +2299 1 2 49 0.32768000000000000000e5 +2299 1 3 18 0.26214400000000000000e6 +2299 1 4 19 0.26214400000000000000e6 +2299 1 4 35 0.26214400000000000000e6 +2299 1 5 52 -0.65536000000000000000e5 +2299 1 6 13 -0.65536000000000000000e5 +2299 1 8 39 0.32768000000000000000e5 +2299 1 11 42 -0.13107200000000000000e6 +2299 1 12 43 -0.13107200000000000000e6 +2299 1 17 48 0.26214400000000000000e6 +2299 1 18 25 0.13107200000000000000e6 +2299 1 20 27 -0.52428800000000000000e6 +2299 1 23 38 0.32768000000000000000e5 +2299 1 26 41 -0.32768000000000000000e5 +2299 1 28 43 -0.65536000000000000000e5 +2299 2 2 4 0.16384000000000000000e5 +2299 2 2 8 0.32768000000000000000e5 +2299 2 2 32 0.32768000000000000000e5 +2299 2 3 5 -0.16384000000000000000e5 +2299 2 3 9 -0.32768000000000000000e5 +2299 2 3 17 -0.16384000000000000000e5 +2299 2 4 10 0.65536000000000000000e5 +2299 2 4 18 0.16384000000000000000e5 +2299 2 6 12 0.13107200000000000000e6 +2299 2 8 22 -0.19660800000000000000e6 +2299 2 9 23 0.13107200000000000000e6 +2299 2 10 24 0.26214400000000000000e6 +2299 2 12 26 0.65536000000000000000e5 +2299 2 16 30 0.32768000000000000000e5 +2299 3 1 30 0.32768000000000000000e5 +2299 3 2 3 0.16384000000000000000e5 +2299 3 2 15 -0.26214400000000000000e6 +2299 3 2 31 0.65536000000000000000e5 +2299 3 3 16 0.16384000000000000000e5 +2299 3 4 9 -0.65536000000000000000e5 +2299 3 4 17 0.16384000000000000000e5 +2299 3 5 5 0.32768000000000000000e5 +2299 3 5 10 0.65536000000000000000e5 +2299 3 6 19 0.32768000000000000000e5 +2299 3 8 13 -0.26214400000000000000e6 +2299 3 9 22 -0.65536000000000000000e5 +2299 3 14 27 0.13107200000000000000e6 +2299 4 1 13 0.16384000000000000000e5 +2299 4 3 15 0.32768000000000000000e5 +2299 4 4 4 0.32768000000000000000e5 +2299 4 4 8 -0.65536000000000000000e5 +2299 4 4 16 0.13107200000000000000e6 +2299 4 6 18 0.32768000000000000000e5 +2299 4 7 19 0.65536000000000000000e5 +2300 3 3 8 -0.32768000000000000000e5 +2300 3 5 6 0.32768000000000000000e5 +2301 1 1 48 -0.16384000000000000000e5 +2301 1 2 49 -0.16384000000000000000e5 +2301 1 5 52 0.65536000000000000000e5 +2301 1 11 42 0.65536000000000000000e5 +2301 1 12 43 0.13107200000000000000e6 +2301 1 17 48 -0.26214400000000000000e6 +2301 1 23 38 -0.16384000000000000000e5 +2301 1 26 41 0.32768000000000000000e5 +2301 1 28 43 0.65536000000000000000e5 +2301 2 2 32 -0.16384000000000000000e5 +2301 2 3 9 0.32768000000000000000e5 +2301 2 8 22 0.13107200000000000000e6 +2301 2 12 26 -0.65536000000000000000e5 +2301 2 16 30 -0.32768000000000000000e5 +2301 3 2 31 -0.65536000000000000000e5 +2301 3 3 8 0.32768000000000000000e5 +2301 3 4 9 0.32768000000000000000e5 +2301 3 5 7 0.32768000000000000000e5 +2301 3 5 10 -0.65536000000000000000e5 +2301 3 14 27 -0.13107200000000000000e6 +2301 4 3 15 -0.32768000000000000000e5 +2301 4 4 16 -0.13107200000000000000e6 +2301 4 6 18 -0.32768000000000000000e5 +2301 4 7 19 -0.65536000000000000000e5 +2302 3 4 9 -0.32768000000000000000e5 +2302 3 5 8 0.32768000000000000000e5 +2303 1 3 18 0.13107200000000000000e6 +2303 1 6 11 0.32768000000000000000e5 +2303 1 6 13 0.65536000000000000000e5 +2303 1 6 29 0.32768000000000000000e5 +2303 1 10 17 -0.26214400000000000000e6 +2303 1 10 25 0.32768000000000000000e5 +2303 1 10 41 0.65536000000000000000e5 +2303 1 11 14 0.13107200000000000000e6 +2303 2 5 9 0.32768000000000000000e5 +2303 2 5 11 0.65536000000000000000e5 +2303 2 9 11 0.13107200000000000000e6 +2303 3 4 9 0.32768000000000000000e5 +2303 3 5 9 0.32768000000000000000e5 +2303 3 5 10 0.65536000000000000000e5 +2303 3 8 21 0.65536000000000000000e5 +2304 1 4 35 0.65536000000000000000e5 +2304 1 6 13 -0.32768000000000000000e5 +2304 1 10 41 -0.32768000000000000000e5 +2304 1 11 42 -0.32768000000000000000e5 +2304 2 8 22 -0.32768000000000000000e5 +2304 3 5 11 0.32768000000000000000e5 +2304 3 8 21 -0.32768000000000000000e5 +2304 3 9 22 -0.32768000000000000000e5 +2305 1 3 18 0.65536000000000000000e5 +2305 1 6 13 0.32768000000000000000e5 +2305 1 10 17 -0.13107200000000000000e6 +2305 1 10 41 0.32768000000000000000e5 +2305 1 11 14 0.65536000000000000000e5 +2305 1 11 42 0.32768000000000000000e5 +2305 2 5 11 0.32768000000000000000e5 +2305 2 9 11 0.65536000000000000000e5 +2305 3 5 10 0.32768000000000000000e5 +2305 3 5 12 0.32768000000000000000e5 +2305 3 8 21 0.32768000000000000000e5 +2305 3 9 22 0.32768000000000000000e5 +2306 1 3 18 0.32768000000000000000e5 +2306 1 4 35 0.32768000000000000000e5 +2306 1 10 17 -0.65536000000000000000e5 +2306 1 11 14 0.32768000000000000000e5 +2306 2 9 11 0.32768000000000000000e5 +2306 3 5 13 0.32768000000000000000e5 +2307 1 11 14 -0.32768000000000000000e5 +2307 1 18 25 0.32768000000000000000e5 +2307 3 5 14 0.32768000000000000000e5 +2308 1 5 20 -0.32768000000000000000e5 +2308 1 5 36 0.32768000000000000000e5 +2308 3 5 15 0.32768000000000000000e5 +2309 3 4 17 -0.32768000000000000000e5 +2309 3 5 16 0.32768000000000000000e5 +2310 1 3 26 -0.32768000000000000000e5 +2310 1 6 37 0.32768000000000000000e5 +2310 3 5 17 0.32768000000000000000e5 +2311 1 1 40 -0.32768000000000000000e5 +2311 1 1 48 0.32768000000000000000e5 +2311 1 2 49 0.32768000000000000000e5 +2311 1 3 26 0.32768000000000000000e5 +2311 1 5 52 -0.13107200000000000000e6 +2311 1 6 25 -0.32768000000000000000e5 +2311 1 6 37 -0.65536000000000000000e5 +2311 1 8 39 0.13107200000000000000e6 +2311 1 9 40 0.65536000000000000000e5 +2311 1 10 25 0.65536000000000000000e5 +2311 1 10 41 -0.13107200000000000000e6 +2311 1 11 42 -0.13107200000000000000e6 +2311 1 12 43 -0.26214400000000000000e6 +2311 1 17 48 0.52428800000000000000e6 +2311 1 23 38 0.32768000000000000000e5 +2311 1 26 41 -0.65536000000000000000e5 +2311 1 28 43 -0.13107200000000000000e6 +2311 2 2 32 0.32768000000000000000e5 +2311 2 4 18 0.32768000000000000000e5 +2311 2 4 26 -0.32768000000000000000e5 +2311 2 5 27 -0.32768000000000000000e5 +2311 2 8 22 -0.26214400000000000000e6 +2311 2 12 26 0.13107200000000000000e6 +2311 2 16 30 0.65536000000000000000e5 +2311 3 2 31 0.13107200000000000000e6 +2311 3 4 17 0.32768000000000000000e5 +2311 3 5 18 0.32768000000000000000e5 +2311 3 5 19 0.32768000000000000000e5 +2311 3 6 19 0.65536000000000000000e5 +2311 3 8 21 -0.13107200000000000000e6 +2311 3 14 27 0.26214400000000000000e6 +2311 4 3 15 0.65536000000000000000e5 +2311 4 4 16 0.26214400000000000000e6 +2311 4 6 18 0.65536000000000000000e5 +2311 4 7 19 0.13107200000000000000e6 +2312 1 9 40 -0.32768000000000000000e5 +2312 1 10 25 0.32768000000000000000e5 +2312 3 5 20 0.32768000000000000000e5 +2312 3 6 19 0.32768000000000000000e5 +2312 3 8 21 -0.65536000000000000000e5 +2312 4 3 15 0.32768000000000000000e5 +2313 1 9 40 0.32768000000000000000e5 +2313 1 10 25 -0.32768000000000000000e5 +2313 3 5 21 0.32768000000000000000e5 +2314 1 6 29 -0.32768000000000000000e5 +2314 1 26 29 0.32768000000000000000e5 +2314 3 5 22 0.32768000000000000000e5 +2315 1 4 35 -0.65536000000000000000e5 +2315 1 17 48 0.65536000000000000000e5 +2315 3 5 23 0.32768000000000000000e5 +2315 3 8 21 0.32768000000000000000e5 +2315 3 9 22 0.32768000000000000000e5 +2315 3 14 27 0.65536000000000000000e5 +2315 4 4 16 0.32768000000000000000e5 +2316 3 5 24 0.32768000000000000000e5 +2316 3 9 22 -0.32768000000000000000e5 +2317 3 5 25 0.32768000000000000000e5 +2317 3 14 19 -0.32768000000000000000e5 +2318 1 6 37 -0.32768000000000000000e5 +2318 1 24 39 0.32768000000000000000e5 +2318 3 5 26 0.32768000000000000000e5 +2319 1 1 40 -0.32768000000000000000e5 +2319 1 2 49 -0.32768000000000000000e5 +2319 1 3 26 0.32768000000000000000e5 +2319 1 3 50 -0.65536000000000000000e5 +2319 1 5 52 -0.13107200000000000000e6 +2319 1 6 37 -0.32768000000000000000e5 +2319 1 8 39 0.13107200000000000000e6 +2319 1 10 25 0.65536000000000000000e5 +2319 1 10 41 -0.13107200000000000000e6 +2319 1 17 48 0.26214400000000000000e6 +2319 1 24 39 -0.32768000000000000000e5 +2319 1 26 41 -0.65536000000000000000e5 +2319 1 28 43 -0.13107200000000000000e6 +2319 2 3 33 -0.32768000000000000000e5 +2319 2 4 18 0.32768000000000000000e5 +2319 2 4 26 -0.32768000000000000000e5 +2319 2 8 22 -0.13107200000000000000e6 +2319 3 4 17 0.32768000000000000000e5 +2319 3 5 18 0.32768000000000000000e5 +2319 3 5 27 0.32768000000000000000e5 +2319 3 6 19 0.65536000000000000000e5 +2319 3 8 21 -0.13107200000000000000e6 +2319 4 3 15 0.65536000000000000000e5 +2319 4 4 16 0.13107200000000000000e6 +2319 4 6 18 0.65536000000000000000e5 +2319 4 7 19 0.13107200000000000000e6 +2320 1 1 40 0.32768000000000000000e5 +2320 1 1 48 -0.32768000000000000000e5 +2320 1 2 49 -0.32768000000000000000e5 +2320 1 3 26 -0.32768000000000000000e5 +2320 1 5 52 0.13107200000000000000e6 +2320 1 6 37 0.65536000000000000000e5 +2320 1 8 39 -0.13107200000000000000e6 +2320 1 9 40 -0.65536000000000000000e5 +2320 1 10 25 -0.65536000000000000000e5 +2320 1 10 41 0.13107200000000000000e6 +2320 1 11 42 0.13107200000000000000e6 +2320 1 12 43 0.26214400000000000000e6 +2320 1 17 48 -0.52428800000000000000e6 +2320 1 23 38 -0.32768000000000000000e5 +2320 1 25 40 0.32768000000000000000e5 +2320 1 26 41 0.65536000000000000000e5 +2320 1 28 43 0.13107200000000000000e6 +2320 2 2 32 -0.32768000000000000000e5 +2320 2 4 18 -0.32768000000000000000e5 +2320 2 4 26 0.32768000000000000000e5 +2320 2 5 27 0.32768000000000000000e5 +2320 2 8 22 0.26214400000000000000e6 +2320 2 12 26 -0.13107200000000000000e6 +2320 2 16 30 -0.65536000000000000000e5 +2320 3 2 31 -0.13107200000000000000e6 +2320 3 4 17 -0.32768000000000000000e5 +2320 3 5 18 -0.32768000000000000000e5 +2320 3 5 28 0.32768000000000000000e5 +2320 3 6 19 -0.65536000000000000000e5 +2320 3 8 21 0.13107200000000000000e6 +2320 3 14 27 -0.26214400000000000000e6 +2320 4 3 15 -0.65536000000000000000e5 +2320 4 4 16 -0.26214400000000000000e6 +2320 4 6 18 -0.65536000000000000000e5 +2320 4 7 19 -0.13107200000000000000e6 +2321 1 9 40 -0.32768000000000000000e5 +2321 1 26 41 0.32768000000000000000e5 +2321 3 5 29 0.32768000000000000000e5 +2322 1 1 48 0.16384000000000000000e5 +2322 1 2 49 0.16384000000000000000e5 +2322 1 3 50 0.32768000000000000000e5 +2322 1 11 42 -0.65536000000000000000e5 +2322 1 12 43 -0.13107200000000000000e6 +2322 1 17 48 0.13107200000000000000e6 +2322 1 23 38 0.16384000000000000000e5 +2322 1 26 29 -0.32768000000000000000e5 +2322 1 26 41 -0.32768000000000000000e5 +2322 1 28 43 0.65536000000000000000e5 +2322 2 2 32 0.16384000000000000000e5 +2322 2 4 34 -0.32768000000000000000e5 +2322 2 8 22 -0.65536000000000000000e5 +2322 2 12 26 0.65536000000000000000e5 +2322 2 16 30 0.32768000000000000000e5 +2322 3 2 31 0.65536000000000000000e5 +2322 3 5 30 0.32768000000000000000e5 +2322 3 14 27 0.13107200000000000000e6 +2322 4 4 16 0.65536000000000000000e5 +2323 1 5 52 0.32768000000000000000e5 +2323 1 11 42 -0.32768000000000000000e5 +2323 3 5 31 0.32768000000000000000e5 +2324 3 4 33 -0.32768000000000000000e5 +2324 3 5 32 0.32768000000000000000e5 +2325 1 6 53 0.32768000000000000000e5 +2325 1 25 40 -0.32768000000000000000e5 +2325 3 5 33 0.32768000000000000000e5 +2326 1 6 53 -0.32768000000000000000e5 +2326 1 25 56 0.32768000000000000000e5 +2326 3 5 35 0.32768000000000000000e5 +2326 3 28 33 0.32768000000000000000e5 +2327 1 1 8 -0.81920000000000000000e4 +2327 1 1 40 -0.40960000000000000000e4 +2327 1 2 5 0.40960000000000000000e4 +2327 1 2 9 -0.16384000000000000000e5 +2327 1 7 22 0.81920000000000000000e4 +2327 1 7 38 -0.81920000000000000000e4 +2327 1 8 23 0.24576000000000000000e5 +2327 2 1 3 -0.40960000000000000000e4 +2327 2 2 16 0.40960000000000000000e4 +2327 3 1 2 -0.40960000000000000000e4 +2327 3 3 16 0.40960000000000000000e4 +2327 3 4 17 0.40960000000000000000e4 +2327 3 6 6 0.32768000000000000000e5 +2327 3 6 19 0.81920000000000000000e4 +2327 3 7 20 -0.16384000000000000000e5 +2327 4 1 5 -0.81920000000000000000e4 +2327 4 1 13 0.40960000000000000000e4 +2327 4 2 2 0.81920000000000000000e4 +2327 4 2 14 0.81920000000000000000e4 +2328 1 2 17 0.65536000000000000000e5 +2328 1 3 18 0.13107200000000000000e6 +2328 1 3 34 0.65536000000000000000e5 +2328 1 4 19 0.13107200000000000000e6 +2328 1 4 35 0.13107200000000000000e6 +2328 1 6 13 -0.32768000000000000000e5 +2328 1 10 41 -0.32768000000000000000e5 +2328 1 11 42 -0.32768000000000000000e5 +2328 1 18 25 0.65536000000000000000e5 +2328 1 20 27 -0.26214400000000000000e6 +2328 2 4 10 0.32768000000000000000e5 +2328 2 6 12 0.65536000000000000000e5 +2328 2 7 21 -0.32768000000000000000e5 +2328 2 8 22 -0.32768000000000000000e5 +2328 2 9 23 0.65536000000000000000e5 +2328 2 10 24 0.13107200000000000000e6 +2328 3 2 15 -0.13107200000000000000e6 +2328 3 6 8 0.32768000000000000000e5 +2328 3 8 13 -0.13107200000000000000e6 +2328 3 8 21 -0.32768000000000000000e5 +2328 3 9 22 -0.32768000000000000000e5 +2328 4 4 8 -0.32768000000000000000e5 +2329 1 3 18 -0.65536000000000000000e5 +2329 1 4 35 -0.13107200000000000000e6 +2329 1 6 13 0.32768000000000000000e5 +2329 1 10 41 0.32768000000000000000e5 +2329 1 11 42 0.32768000000000000000e5 +2329 1 18 25 -0.65536000000000000000e5 +2329 1 28 35 0.13107200000000000000e6 +2329 2 8 22 0.32768000000000000000e5 +2329 2 9 23 -0.65536000000000000000e5 +2329 3 5 10 0.32768000000000000000e5 +2329 3 6 9 0.32768000000000000000e5 +2329 3 8 21 0.32768000000000000000e5 +2329 3 9 22 0.32768000000000000000e5 +2329 3 11 24 0.13107200000000000000e6 +2329 4 4 8 0.32768000000000000000e5 +2330 1 1 8 -0.81920000000000000000e4 +2330 1 1 40 -0.40960000000000000000e4 +2330 1 2 5 0.40960000000000000000e4 +2330 1 2 9 -0.16384000000000000000e5 +2330 1 2 17 0.32768000000000000000e5 +2330 1 3 18 0.65536000000000000000e5 +2330 1 3 34 0.32768000000000000000e5 +2330 1 4 19 0.65536000000000000000e5 +2330 1 4 35 0.65536000000000000000e5 +2330 1 6 13 -0.16384000000000000000e5 +2330 1 7 22 0.81920000000000000000e4 +2330 1 7 38 -0.81920000000000000000e4 +2330 1 8 23 0.24576000000000000000e5 +2330 1 10 41 -0.16384000000000000000e5 +2330 1 11 42 -0.16384000000000000000e5 +2330 1 18 25 0.32768000000000000000e5 +2330 1 20 27 -0.13107200000000000000e6 +2330 2 1 3 -0.40960000000000000000e4 +2330 2 2 16 0.40960000000000000000e4 +2330 2 4 10 0.16384000000000000000e5 +2330 2 6 12 0.32768000000000000000e5 +2330 2 7 21 -0.16384000000000000000e5 +2330 2 8 22 -0.16384000000000000000e5 +2330 2 9 23 0.32768000000000000000e5 +2330 2 10 24 0.65536000000000000000e5 +2330 3 1 2 -0.40960000000000000000e4 +2330 3 2 15 -0.65536000000000000000e5 +2330 3 3 16 0.40960000000000000000e4 +2330 3 4 17 0.40960000000000000000e4 +2330 3 6 7 -0.16384000000000000000e5 +2330 3 6 10 0.32768000000000000000e5 +2330 3 6 19 0.81920000000000000000e4 +2330 3 7 20 -0.16384000000000000000e5 +2330 3 8 13 -0.65536000000000000000e5 +2330 3 8 21 -0.16384000000000000000e5 +2330 3 9 22 -0.16384000000000000000e5 +2330 4 1 5 -0.81920000000000000000e4 +2330 4 1 13 0.40960000000000000000e4 +2330 4 2 2 0.81920000000000000000e4 +2330 4 2 14 0.81920000000000000000e4 +2330 4 4 8 -0.16384000000000000000e5 +2330 4 5 5 -0.32768000000000000000e5 +2331 3 1 14 -0.32768000000000000000e5 +2331 3 6 11 0.32768000000000000000e5 +2332 1 2 17 0.32768000000000000000e5 +2332 1 3 18 0.32768000000000000000e5 +2332 1 3 34 0.32768000000000000000e5 +2332 1 4 19 0.65536000000000000000e5 +2332 1 20 27 -0.13107200000000000000e6 +2332 1 28 35 0.65536000000000000000e5 +2332 2 6 12 0.32768000000000000000e5 +2332 2 10 24 0.65536000000000000000e5 +2332 3 2 15 -0.65536000000000000000e5 +2332 3 6 12 0.32768000000000000000e5 +2332 3 8 13 -0.65536000000000000000e5 +2332 3 11 24 0.65536000000000000000e5 +2333 1 13 16 -0.65536000000000000000e5 +2333 1 16 31 0.65536000000000000000e5 +2333 3 2 15 0.32768000000000000000e5 +2333 3 6 13 0.32768000000000000000e5 +2333 3 8 13 0.32768000000000000000e5 +2333 4 8 8 0.65536000000000000000e5 +2334 3 2 15 -0.32768000000000000000e5 +2334 3 6 14 0.32768000000000000000e5 +2335 1 13 16 -0.32768000000000000000e5 +2335 1 16 31 0.32768000000000000000e5 +2335 3 6 15 0.32768000000000000000e5 +2336 1 1 24 -0.16384000000000000000e5 +2336 1 1 40 -0.16384000000000000000e5 +2336 1 2 33 -0.65536000000000000000e5 +2336 1 2 49 -0.16384000000000000000e5 +2336 1 3 34 0.13107200000000000000e6 +2336 1 3 50 0.32768000000000000000e5 +2336 1 5 52 -0.65536000000000000000e5 +2336 1 6 37 -0.16384000000000000000e5 +2336 1 10 41 -0.65536000000000000000e5 +2336 1 11 42 0.65536000000000000000e5 +2336 1 12 43 0.13107200000000000000e6 +2336 1 16 47 -0.13107200000000000000e6 +2336 1 22 37 0.16384000000000000000e5 +2336 1 28 43 -0.65536000000000000000e5 +2336 2 2 16 -0.16384000000000000000e5 +2336 2 2 32 -0.16384000000000000000e5 +2336 2 3 17 0.16384000000000000000e5 +2336 2 4 26 -0.16384000000000000000e5 +2336 2 7 21 -0.65536000000000000000e5 +2336 2 10 32 0.65536000000000000000e5 +2336 2 12 26 -0.65536000000000000000e5 +2336 2 16 16 0.32768000000000000000e5 +2336 3 1 16 -0.16384000000000000000e5 +2336 3 1 30 -0.65536000000000000000e5 +2336 3 2 31 -0.65536000000000000000e5 +2336 3 3 16 -0.16384000000000000000e5 +2336 3 6 16 0.32768000000000000000e5 +2336 3 7 20 -0.65536000000000000000e5 +2336 3 8 21 -0.65536000000000000000e5 +2336 3 14 27 -0.13107200000000000000e6 +2336 4 1 13 -0.16384000000000000000e5 +2336 4 5 17 -0.32768000000000000000e5 +2336 4 7 19 0.65536000000000000000e5 +2336 4 11 11 -0.32768000000000000000e5 +2337 1 7 38 0.32768000000000000000e5 +2337 1 8 23 -0.32768000000000000000e5 +2337 3 6 17 0.32768000000000000000e5 +2338 1 7 38 -0.32768000000000000000e5 +2338 1 8 23 0.32768000000000000000e5 +2338 3 6 18 0.32768000000000000000e5 +2338 3 6 19 0.32768000000000000000e5 +2338 3 7 20 -0.65536000000000000000e5 +2338 4 2 14 0.32768000000000000000e5 +2339 1 1 32 -0.32768000000000000000e5 +2339 1 2 17 0.65536000000000000000e5 +2339 1 2 33 0.32768000000000000000e5 +2339 1 3 34 -0.65536000000000000000e5 +2339 1 10 41 0.32768000000000000000e5 +2339 1 11 42 -0.32768000000000000000e5 +2339 1 12 43 -0.65536000000000000000e5 +2339 1 17 48 0.65536000000000000000e5 +2339 2 1 31 -0.32768000000000000000e5 +2339 2 7 21 0.32768000000000000000e5 +2339 2 8 22 -0.32768000000000000000e5 +2339 2 12 26 0.32768000000000000000e5 +2339 3 1 14 -0.65536000000000000000e5 +2339 3 6 20 0.32768000000000000000e5 +2339 3 6 23 -0.65536000000000000000e5 +2339 3 7 20 0.32768000000000000000e5 +2339 3 8 21 0.32768000000000000000e5 +2339 3 14 27 0.65536000000000000000e5 +2339 4 4 16 0.32768000000000000000e5 +2340 3 6 21 0.32768000000000000000e5 +2340 3 7 20 -0.32768000000000000000e5 +2341 1 2 33 -0.32768000000000000000e5 +2341 1 11 42 0.32768000000000000000e5 +2341 1 12 43 0.65536000000000000000e5 +2341 1 17 48 -0.65536000000000000000e5 +2341 2 8 22 0.32768000000000000000e5 +2341 2 12 26 -0.32768000000000000000e5 +2341 3 6 22 0.32768000000000000000e5 +2341 3 14 27 -0.65536000000000000000e5 +2341 4 4 16 -0.32768000000000000000e5 +2342 1 3 34 -0.32768000000000000000e5 +2342 1 16 47 0.32768000000000000000e5 +2342 3 6 24 0.32768000000000000000e5 +2342 3 13 26 0.32768000000000000000e5 +2343 3 6 25 0.32768000000000000000e5 +2343 3 10 23 -0.32768000000000000000e5 +2344 1 2 33 0.65536000000000000000e5 +2344 1 3 34 -0.13107200000000000000e6 +2344 1 3 50 -0.32768000000000000000e5 +2344 1 5 52 0.65536000000000000000e5 +2344 1 8 39 0.32768000000000000000e5 +2344 1 10 41 0.65536000000000000000e5 +2344 1 11 42 -0.65536000000000000000e5 +2344 1 12 43 -0.13107200000000000000e6 +2344 1 16 47 0.13107200000000000000e6 +2344 1 28 43 0.65536000000000000000e5 +2344 2 7 21 0.65536000000000000000e5 +2344 2 10 32 -0.65536000000000000000e5 +2344 2 12 26 0.65536000000000000000e5 +2344 3 1 30 0.32768000000000000000e5 +2344 3 2 31 0.65536000000000000000e5 +2344 3 6 26 0.32768000000000000000e5 +2344 3 7 20 0.65536000000000000000e5 +2344 3 8 21 0.65536000000000000000e5 +2344 3 14 27 0.13107200000000000000e6 +2344 4 5 17 0.32768000000000000000e5 +2344 4 7 19 -0.65536000000000000000e5 +2345 3 1 30 -0.32768000000000000000e5 +2345 3 6 27 0.32768000000000000000e5 +2346 1 3 50 0.32768000000000000000e5 +2346 1 8 39 -0.32768000000000000000e5 +2346 3 6 28 0.32768000000000000000e5 +2347 1 2 33 0.32768000000000000000e5 +2347 1 3 34 -0.65536000000000000000e5 +2347 1 5 52 0.32768000000000000000e5 +2347 1 10 41 0.32768000000000000000e5 +2347 1 11 42 -0.32768000000000000000e5 +2347 1 12 43 -0.65536000000000000000e5 +2347 1 16 47 0.65536000000000000000e5 +2347 1 28 43 0.32768000000000000000e5 +2347 2 7 21 0.32768000000000000000e5 +2347 2 10 32 -0.32768000000000000000e5 +2347 2 12 26 0.32768000000000000000e5 +2347 3 2 31 0.32768000000000000000e5 +2347 3 6 29 0.32768000000000000000e5 +2347 3 7 20 0.32768000000000000000e5 +2347 3 8 21 0.32768000000000000000e5 +2347 3 14 27 0.65536000000000000000e5 +2347 4 7 19 -0.32768000000000000000e5 +2348 3 2 31 -0.32768000000000000000e5 +2348 3 6 30 0.32768000000000000000e5 +2349 3 6 31 0.32768000000000000000e5 +2349 3 13 26 -0.32768000000000000000e5 +2350 3 6 32 0.32768000000000000000e5 +2350 3 16 29 -0.32768000000000000000e5 +2351 1 3 50 -0.32768000000000000000e5 +2351 1 7 54 0.32768000000000000000e5 +2351 3 6 33 0.32768000000000000000e5 +2352 1 11 42 -0.32768000000000000000e5 +2352 1 12 43 -0.65536000000000000000e5 +2352 1 17 48 0.65536000000000000000e5 +2352 1 37 44 0.32768000000000000000e5 +2352 2 8 22 -0.32768000000000000000e5 +2352 2 12 26 0.32768000000000000000e5 +2352 3 2 31 0.32768000000000000000e5 +2352 3 6 34 0.32768000000000000000e5 +2352 3 14 27 0.65536000000000000000e5 +2352 4 4 16 0.32768000000000000000e5 +2353 1 2 17 0.32768000000000000000e5 +2353 1 3 18 0.65536000000000000000e5 +2353 1 3 34 0.32768000000000000000e5 +2353 1 4 19 0.65536000000000000000e5 +2353 1 4 35 0.65536000000000000000e5 +2353 1 6 13 -0.16384000000000000000e5 +2353 1 10 41 -0.16384000000000000000e5 +2353 1 11 42 -0.16384000000000000000e5 +2353 1 18 25 0.32768000000000000000e5 +2353 1 20 27 -0.13107200000000000000e6 +2353 2 4 10 0.16384000000000000000e5 +2353 2 6 12 0.32768000000000000000e5 +2353 2 7 21 -0.16384000000000000000e5 +2353 2 8 22 -0.16384000000000000000e5 +2353 2 9 23 0.32768000000000000000e5 +2353 2 10 24 0.65536000000000000000e5 +2353 3 2 15 -0.65536000000000000000e5 +2353 3 7 7 0.32768000000000000000e5 +2353 3 8 13 -0.65536000000000000000e5 +2353 3 8 21 -0.16384000000000000000e5 +2353 3 9 22 -0.16384000000000000000e5 +2353 4 4 8 -0.16384000000000000000e5 +2354 1 3 18 -0.65536000000000000000e5 +2354 1 4 35 -0.13107200000000000000e6 +2354 1 6 13 0.32768000000000000000e5 +2354 1 10 41 0.32768000000000000000e5 +2354 1 11 42 0.32768000000000000000e5 +2354 1 18 25 -0.65536000000000000000e5 +2354 1 28 35 0.13107200000000000000e6 +2354 2 8 22 0.32768000000000000000e5 +2354 2 9 23 -0.65536000000000000000e5 +2354 3 5 10 0.32768000000000000000e5 +2354 3 7 8 0.32768000000000000000e5 +2354 3 8 21 0.32768000000000000000e5 +2354 3 9 22 0.32768000000000000000e5 +2354 3 11 24 0.13107200000000000000e6 +2354 4 4 8 0.32768000000000000000e5 +2355 3 5 10 -0.32768000000000000000e5 +2355 3 7 9 0.32768000000000000000e5 +2356 3 1 14 -0.32768000000000000000e5 +2356 3 7 10 0.32768000000000000000e5 +2357 1 2 17 0.32768000000000000000e5 +2357 1 3 18 0.32768000000000000000e5 +2357 1 3 34 0.32768000000000000000e5 +2357 1 4 19 0.65536000000000000000e5 +2357 1 20 27 -0.13107200000000000000e6 +2357 1 28 35 0.65536000000000000000e5 +2357 2 6 12 0.32768000000000000000e5 +2357 2 10 24 0.65536000000000000000e5 +2357 3 2 15 -0.65536000000000000000e5 +2357 3 7 11 0.32768000000000000000e5 +2357 3 8 13 -0.65536000000000000000e5 +2357 3 11 24 0.65536000000000000000e5 +2358 1 3 18 -0.32768000000000000000e5 +2358 1 4 35 -0.32768000000000000000e5 +2358 1 18 25 -0.32768000000000000000e5 +2358 1 28 35 0.65536000000000000000e5 +2358 2 9 23 -0.32768000000000000000e5 +2358 3 7 12 0.32768000000000000000e5 +2358 3 11 24 0.65536000000000000000e5 +2359 3 2 15 -0.32768000000000000000e5 +2359 3 7 13 0.32768000000000000000e5 +2360 3 7 14 0.32768000000000000000e5 +2360 3 8 13 -0.32768000000000000000e5 +2361 1 10 17 -0.16384000000000000000e5 +2361 1 28 35 0.16384000000000000000e5 +2361 3 2 15 -0.16384000000000000000e5 +2361 3 7 15 0.32768000000000000000e5 +2361 3 8 13 -0.16384000000000000000e5 +2361 3 11 24 0.16384000000000000000e5 +2361 4 6 10 -0.16384000000000000000e5 +2362 1 7 38 0.32768000000000000000e5 +2362 1 8 23 -0.32768000000000000000e5 +2362 3 7 16 0.32768000000000000000e5 +2363 1 7 38 -0.32768000000000000000e5 +2363 1 8 23 0.32768000000000000000e5 +2363 3 6 19 0.32768000000000000000e5 +2363 3 7 17 0.32768000000000000000e5 +2363 3 7 20 -0.65536000000000000000e5 +2363 4 2 14 0.32768000000000000000e5 +2364 3 6 19 -0.32768000000000000000e5 +2364 3 7 18 0.32768000000000000000e5 +2365 1 9 40 -0.32768000000000000000e5 +2365 1 10 25 0.32768000000000000000e5 +2365 3 6 19 0.32768000000000000000e5 +2365 3 7 19 0.32768000000000000000e5 +2365 3 8 21 -0.65536000000000000000e5 +2365 4 3 15 0.32768000000000000000e5 +2366 1 2 33 -0.32768000000000000000e5 +2366 1 11 42 0.32768000000000000000e5 +2366 1 12 43 0.65536000000000000000e5 +2366 1 17 48 -0.65536000000000000000e5 +2366 2 8 22 0.32768000000000000000e5 +2366 2 12 26 -0.32768000000000000000e5 +2366 3 7 21 0.32768000000000000000e5 +2366 3 14 27 -0.65536000000000000000e5 +2366 4 4 16 -0.32768000000000000000e5 +2367 3 7 22 0.32768000000000000000e5 +2367 3 8 21 -0.32768000000000000000e5 +2368 1 3 34 -0.32768000000000000000e5 +2368 1 16 47 0.32768000000000000000e5 +2368 3 7 23 0.32768000000000000000e5 +2368 3 13 26 0.32768000000000000000e5 +2369 1 4 35 0.32768000000000000000e5 +2369 1 12 43 0.32768000000000000000e5 +2369 1 18 25 0.32768000000000000000e5 +2369 1 28 35 -0.65536000000000000000e5 +2369 2 9 23 0.32768000000000000000e5 +2369 3 7 24 0.32768000000000000000e5 +2369 3 11 24 -0.65536000000000000000e5 +2370 1 4 19 -0.32768000000000000000e5 +2370 1 13 44 0.32768000000000000000e5 +2370 3 7 25 0.32768000000000000000e5 +2370 3 8 13 0.32768000000000000000e5 +2371 3 1 30 -0.32768000000000000000e5 +2371 3 7 26 0.32768000000000000000e5 +2372 1 3 50 0.32768000000000000000e5 +2372 1 8 39 -0.32768000000000000000e5 +2372 3 7 27 0.32768000000000000000e5 +2373 1 3 50 -0.32768000000000000000e5 +2373 1 5 52 -0.65536000000000000000e5 +2373 1 8 39 0.32768000000000000000e5 +2373 1 9 40 0.32768000000000000000e5 +2373 1 10 41 -0.65536000000000000000e5 +2373 1 17 48 0.13107200000000000000e6 +2373 1 26 41 -0.32768000000000000000e5 +2373 1 28 43 -0.65536000000000000000e5 +2373 2 8 22 -0.65536000000000000000e5 +2373 3 7 28 0.32768000000000000000e5 +2373 4 4 16 0.65536000000000000000e5 +2373 4 6 18 0.32768000000000000000e5 +2373 4 7 19 0.65536000000000000000e5 +2374 3 2 31 -0.32768000000000000000e5 +2374 3 7 29 0.32768000000000000000e5 +2375 1 5 52 -0.32768000000000000000e5 +2375 1 10 41 -0.32768000000000000000e5 +2375 1 17 48 0.65536000000000000000e5 +2375 1 28 43 -0.32768000000000000000e5 +2375 2 8 22 -0.32768000000000000000e5 +2375 3 7 30 0.32768000000000000000e5 +2375 4 4 16 0.32768000000000000000e5 +2375 4 7 19 0.32768000000000000000e5 +2376 1 5 52 -0.16384000000000000000e5 +2376 1 11 42 0.16384000000000000000e5 +2376 2 12 26 -0.16384000000000000000e5 +2376 2 20 34 0.16384000000000000000e5 +2376 3 2 31 -0.16384000000000000000e5 +2376 3 7 31 0.32768000000000000000e5 +2376 3 14 27 -0.32768000000000000000e5 +2376 4 7 19 0.16384000000000000000e5 +2376 4 8 20 0.16384000000000000000e5 +2377 1 3 50 -0.32768000000000000000e5 +2377 1 7 54 0.32768000000000000000e5 +2377 3 7 32 0.32768000000000000000e5 +2378 3 7 33 0.32768000000000000000e5 +2378 3 17 30 -0.32768000000000000000e5 +2379 1 5 52 0.32768000000000000000e5 +2379 1 17 48 -0.65536000000000000000e5 +2379 1 28 43 0.32768000000000000000e5 +2379 1 32 47 0.32768000000000000000e5 +2379 2 8 22 0.32768000000000000000e5 +2379 3 7 34 0.32768000000000000000e5 +2379 4 4 16 -0.32768000000000000000e5 +2379 4 7 19 -0.32768000000000000000e5 +2380 3 7 35 0.32768000000000000000e5 +2380 3 20 33 -0.32768000000000000000e5 +2381 3 5 10 -0.16384000000000000000e5 +2381 3 8 8 0.32768000000000000000e5 +2382 1 4 35 0.65536000000000000000e5 +2382 1 6 13 -0.32768000000000000000e5 +2382 1 10 41 -0.32768000000000000000e5 +2382 1 11 42 -0.32768000000000000000e5 +2382 2 8 22 -0.32768000000000000000e5 +2382 3 8 9 0.32768000000000000000e5 +2382 3 8 21 -0.32768000000000000000e5 +2382 3 9 22 -0.32768000000000000000e5 +2383 1 2 17 0.32768000000000000000e5 +2383 1 3 18 0.32768000000000000000e5 +2383 1 3 34 0.32768000000000000000e5 +2383 1 4 19 0.65536000000000000000e5 +2383 1 20 27 -0.13107200000000000000e6 +2383 1 28 35 0.65536000000000000000e5 +2383 2 6 12 0.32768000000000000000e5 +2383 2 10 24 0.65536000000000000000e5 +2383 3 2 15 -0.65536000000000000000e5 +2383 3 8 10 0.32768000000000000000e5 +2383 3 8 13 -0.65536000000000000000e5 +2383 3 11 24 0.65536000000000000000e5 +2384 1 3 18 -0.32768000000000000000e5 +2384 1 4 35 -0.32768000000000000000e5 +2384 1 18 25 -0.32768000000000000000e5 +2384 1 28 35 0.65536000000000000000e5 +2384 2 9 23 -0.32768000000000000000e5 +2384 3 8 11 0.32768000000000000000e5 +2384 3 11 24 0.65536000000000000000e5 +2385 1 3 18 0.32768000000000000000e5 +2385 1 4 35 0.32768000000000000000e5 +2385 1 10 17 -0.65536000000000000000e5 +2385 1 11 14 0.32768000000000000000e5 +2385 2 9 11 0.32768000000000000000e5 +2385 3 8 12 0.32768000000000000000e5 +2386 1 10 17 -0.32768000000000000000e5 +2386 1 28 35 0.32768000000000000000e5 +2386 3 8 14 0.32768000000000000000e5 +2386 3 11 24 0.32768000000000000000e5 +2387 1 4 19 -0.16384000000000000000e5 +2387 1 5 20 -0.16384000000000000000e5 +2387 1 10 17 -0.16384000000000000000e5 +2387 1 17 32 0.32768000000000000000e5 +2387 2 8 14 -0.16384000000000000000e5 +2387 3 8 15 0.32768000000000000000e5 +2388 1 7 38 -0.32768000000000000000e5 +2388 1 8 23 0.32768000000000000000e5 +2388 3 6 19 0.32768000000000000000e5 +2388 3 7 20 -0.65536000000000000000e5 +2388 3 8 16 0.32768000000000000000e5 +2388 4 2 14 0.32768000000000000000e5 +2389 3 6 19 -0.32768000000000000000e5 +2389 3 8 17 0.32768000000000000000e5 +2390 1 9 40 -0.32768000000000000000e5 +2390 1 10 25 0.32768000000000000000e5 +2390 3 6 19 0.32768000000000000000e5 +2390 3 8 18 0.32768000000000000000e5 +2390 3 8 21 -0.65536000000000000000e5 +2390 4 3 15 0.32768000000000000000e5 +2391 1 9 40 0.32768000000000000000e5 +2391 1 10 25 -0.32768000000000000000e5 +2391 3 8 19 0.32768000000000000000e5 +2392 1 2 33 -0.32768000000000000000e5 +2392 1 11 42 0.32768000000000000000e5 +2392 1 12 43 0.65536000000000000000e5 +2392 1 17 48 -0.65536000000000000000e5 +2392 2 8 22 0.32768000000000000000e5 +2392 2 12 26 -0.32768000000000000000e5 +2392 3 8 20 0.32768000000000000000e5 +2392 3 14 27 -0.65536000000000000000e5 +2392 4 4 16 -0.32768000000000000000e5 +2393 1 4 35 -0.65536000000000000000e5 +2393 1 17 48 0.65536000000000000000e5 +2393 3 8 21 0.32768000000000000000e5 +2393 3 8 22 0.32768000000000000000e5 +2393 3 9 22 0.32768000000000000000e5 +2393 3 14 27 0.65536000000000000000e5 +2393 4 4 16 0.32768000000000000000e5 +2394 1 4 35 0.32768000000000000000e5 +2394 1 12 43 0.32768000000000000000e5 +2394 1 18 25 0.32768000000000000000e5 +2394 1 28 35 -0.65536000000000000000e5 +2394 2 9 23 0.32768000000000000000e5 +2394 3 8 23 0.32768000000000000000e5 +2394 3 11 24 -0.65536000000000000000e5 +2395 1 4 35 -0.32768000000000000000e5 +2395 1 17 48 0.32768000000000000000e5 +2395 3 8 24 0.32768000000000000000e5 +2395 3 14 27 0.32768000000000000000e5 +2396 3 8 25 0.32768000000000000000e5 +2396 3 11 24 -0.32768000000000000000e5 +2397 1 3 50 0.32768000000000000000e5 +2397 1 8 39 -0.32768000000000000000e5 +2397 3 8 26 0.32768000000000000000e5 +2398 1 3 50 -0.32768000000000000000e5 +2398 1 5 52 -0.65536000000000000000e5 +2398 1 8 39 0.32768000000000000000e5 +2398 1 9 40 0.32768000000000000000e5 +2398 1 10 41 -0.65536000000000000000e5 +2398 1 17 48 0.13107200000000000000e6 +2398 1 26 41 -0.32768000000000000000e5 +2398 1 28 43 -0.65536000000000000000e5 +2398 2 8 22 -0.65536000000000000000e5 +2398 3 8 27 0.32768000000000000000e5 +2398 4 4 16 0.65536000000000000000e5 +2398 4 6 18 0.32768000000000000000e5 +2398 4 7 19 0.65536000000000000000e5 +2399 1 9 40 -0.32768000000000000000e5 +2399 1 26 41 0.32768000000000000000e5 +2399 3 8 28 0.32768000000000000000e5 +2400 1 5 52 -0.32768000000000000000e5 +2400 1 10 41 -0.32768000000000000000e5 +2400 1 17 48 0.65536000000000000000e5 +2400 1 28 43 -0.32768000000000000000e5 +2400 2 8 22 -0.32768000000000000000e5 +2400 3 8 29 0.32768000000000000000e5 +2400 4 4 16 0.32768000000000000000e5 +2400 4 7 19 0.32768000000000000000e5 +2401 1 10 41 0.32768000000000000000e5 +2401 1 11 42 0.32768000000000000000e5 +2401 1 17 48 -0.65536000000000000000e5 +2401 1 28 43 0.32768000000000000000e5 +2401 2 8 22 0.32768000000000000000e5 +2401 3 8 30 0.32768000000000000000e5 +2401 3 14 27 -0.65536000000000000000e5 +2401 4 4 16 -0.32768000000000000000e5 +2402 3 8 31 0.32768000000000000000e5 +2402 3 14 27 -0.32768000000000000000e5 +2403 3 8 32 0.32768000000000000000e5 +2403 3 17 30 -0.32768000000000000000e5 +2404 3 8 33 0.32768000000000000000e5 +2404 3 22 27 -0.32768000000000000000e5 +2405 3 8 34 0.32768000000000000000e5 +2405 3 18 31 -0.32768000000000000000e5 +2406 1 24 55 0.32768000000000000000e5 +2406 1 26 41 -0.32768000000000000000e5 +2406 3 8 35 0.32768000000000000000e5 +2406 3 22 27 0.32768000000000000000e5 +2407 1 3 18 0.32768000000000000000e5 +2407 1 6 13 0.16384000000000000000e5 +2407 1 10 17 -0.65536000000000000000e5 +2407 1 10 41 0.16384000000000000000e5 +2407 1 11 14 0.32768000000000000000e5 +2407 1 11 42 0.16384000000000000000e5 +2407 2 5 11 0.16384000000000000000e5 +2407 2 9 11 0.32768000000000000000e5 +2407 3 5 10 0.16384000000000000000e5 +2407 3 8 21 0.16384000000000000000e5 +2407 3 9 9 0.32768000000000000000e5 +2407 3 9 22 0.16384000000000000000e5 +2408 1 3 18 -0.32768000000000000000e5 +2408 1 4 35 -0.32768000000000000000e5 +2408 1 18 25 -0.32768000000000000000e5 +2408 1 28 35 0.65536000000000000000e5 +2408 2 9 23 -0.32768000000000000000e5 +2408 3 9 10 0.32768000000000000000e5 +2408 3 11 24 0.65536000000000000000e5 +2409 1 3 18 0.32768000000000000000e5 +2409 1 4 35 0.32768000000000000000e5 +2409 1 10 17 -0.65536000000000000000e5 +2409 1 11 14 0.32768000000000000000e5 +2409 2 9 11 0.32768000000000000000e5 +2409 3 9 11 0.32768000000000000000e5 +2410 1 11 14 -0.32768000000000000000e5 +2410 1 18 25 0.32768000000000000000e5 +2410 3 9 12 0.32768000000000000000e5 +2411 1 10 17 -0.32768000000000000000e5 +2411 1 28 35 0.32768000000000000000e5 +2411 3 9 13 0.32768000000000000000e5 +2411 3 11 24 0.32768000000000000000e5 +2412 1 5 20 -0.32768000000000000000e5 +2412 1 5 36 0.32768000000000000000e5 +2412 3 9 14 0.32768000000000000000e5 +2413 1 4 19 0.16384000000000000000e5 +2413 1 5 20 0.16384000000000000000e5 +2413 1 6 21 0.32768000000000000000e5 +2413 1 10 17 0.16384000000000000000e5 +2413 1 10 21 -0.65536000000000000000e5 +2413 1 29 36 0.32768000000000000000e5 +2413 2 8 14 0.16384000000000000000e5 +2413 2 9 15 0.32768000000000000000e5 +2413 3 9 15 0.32768000000000000000e5 +2413 3 12 25 0.32768000000000000000e5 +2414 3 6 19 -0.32768000000000000000e5 +2414 3 9 16 0.32768000000000000000e5 +2415 1 9 40 -0.32768000000000000000e5 +2415 1 10 25 0.32768000000000000000e5 +2415 3 6 19 0.32768000000000000000e5 +2415 3 8 21 -0.65536000000000000000e5 +2415 3 9 17 0.32768000000000000000e5 +2415 4 3 15 0.32768000000000000000e5 +2416 1 9 40 0.32768000000000000000e5 +2416 1 10 25 -0.32768000000000000000e5 +2416 3 9 18 0.32768000000000000000e5 +2417 1 6 29 -0.32768000000000000000e5 +2417 1 26 29 0.32768000000000000000e5 +2417 3 9 19 0.32768000000000000000e5 +2418 3 8 21 -0.32768000000000000000e5 +2418 3 9 20 0.32768000000000000000e5 +2419 1 4 35 -0.65536000000000000000e5 +2419 1 17 48 0.65536000000000000000e5 +2419 3 8 21 0.32768000000000000000e5 +2419 3 9 21 0.32768000000000000000e5 +2419 3 9 22 0.32768000000000000000e5 +2419 3 14 27 0.65536000000000000000e5 +2419 4 4 16 0.32768000000000000000e5 +2420 1 4 35 -0.32768000000000000000e5 +2420 1 17 48 0.32768000000000000000e5 +2420 3 9 23 0.32768000000000000000e5 +2420 3 14 27 0.32768000000000000000e5 +2421 3 9 24 0.32768000000000000000e5 +2421 3 14 19 -0.32768000000000000000e5 +2422 1 5 36 -0.32768000000000000000e5 +2422 1 14 45 0.32768000000000000000e5 +2422 3 9 25 0.32768000000000000000e5 +2423 1 3 50 -0.32768000000000000000e5 +2423 1 5 52 -0.65536000000000000000e5 +2423 1 8 39 0.32768000000000000000e5 +2423 1 9 40 0.32768000000000000000e5 +2423 1 10 41 -0.65536000000000000000e5 +2423 1 17 48 0.13107200000000000000e6 +2423 1 26 41 -0.32768000000000000000e5 +2423 1 28 43 -0.65536000000000000000e5 +2423 2 8 22 -0.65536000000000000000e5 +2423 3 9 26 0.32768000000000000000e5 +2423 4 4 16 0.65536000000000000000e5 +2423 4 6 18 0.32768000000000000000e5 +2423 4 7 19 0.65536000000000000000e5 +2424 1 9 40 -0.32768000000000000000e5 +2424 1 26 41 0.32768000000000000000e5 +2424 3 9 27 0.32768000000000000000e5 +2425 1 1 48 0.16384000000000000000e5 +2425 1 2 49 0.16384000000000000000e5 +2425 1 3 50 0.32768000000000000000e5 +2425 1 11 42 -0.65536000000000000000e5 +2425 1 12 43 -0.13107200000000000000e6 +2425 1 17 48 0.13107200000000000000e6 +2425 1 23 38 0.16384000000000000000e5 +2425 1 26 29 -0.32768000000000000000e5 +2425 1 26 41 -0.32768000000000000000e5 +2425 1 28 43 0.65536000000000000000e5 +2425 2 2 32 0.16384000000000000000e5 +2425 2 4 34 -0.32768000000000000000e5 +2425 2 8 22 -0.65536000000000000000e5 +2425 2 12 26 0.65536000000000000000e5 +2425 2 16 30 0.32768000000000000000e5 +2425 3 2 31 0.65536000000000000000e5 +2425 3 9 28 0.32768000000000000000e5 +2425 3 14 27 0.13107200000000000000e6 +2425 4 4 16 0.65536000000000000000e5 +2426 1 10 41 0.32768000000000000000e5 +2426 1 11 42 0.32768000000000000000e5 +2426 1 17 48 -0.65536000000000000000e5 +2426 1 28 43 0.32768000000000000000e5 +2426 2 8 22 0.32768000000000000000e5 +2426 3 9 29 0.32768000000000000000e5 +2426 3 14 27 -0.65536000000000000000e5 +2426 4 4 16 -0.32768000000000000000e5 +2427 1 5 52 0.32768000000000000000e5 +2427 1 11 42 -0.32768000000000000000e5 +2427 3 9 30 0.32768000000000000000e5 +2428 1 14 45 0.65536000000000000000e5 +2428 1 17 48 -0.32768000000000000000e5 +2428 1 18 25 -0.32768000000000000000e5 +2428 1 18 49 -0.32768000000000000000e5 +2428 2 24 30 -0.32768000000000000000e5 +2428 3 9 31 0.32768000000000000000e5 +2428 3 14 19 0.32768000000000000000e5 +2428 3 15 28 -0.65536000000000000000e5 +2429 3 9 32 0.32768000000000000000e5 +2429 3 22 27 -0.32768000000000000000e5 +2430 3 5 34 -0.32768000000000000000e5 +2430 3 9 33 0.32768000000000000000e5 +2431 1 5 52 -0.32768000000000000000e5 +2431 1 33 48 0.32768000000000000000e5 +2431 3 9 34 0.32768000000000000000e5 +2432 1 24 55 -0.32768000000000000000e5 +2432 1 26 41 0.32768000000000000000e5 +2432 2 4 34 0.32768000000000000000e5 +2432 2 21 35 -0.32768000000000000000e5 +2432 3 5 34 0.32768000000000000000e5 +2432 3 9 35 0.32768000000000000000e5 +2432 3 17 30 0.32768000000000000000e5 +2432 3 18 31 -0.65536000000000000000e5 +2432 3 20 33 0.32768000000000000000e5 +2432 3 21 34 -0.65536000000000000000e5 +2433 1 13 16 -0.32768000000000000000e5 +2433 1 16 31 0.32768000000000000000e5 +2433 3 2 15 0.16384000000000000000e5 +2433 3 8 13 0.16384000000000000000e5 +2433 3 10 10 0.32768000000000000000e5 +2433 4 8 8 0.32768000000000000000e5 +2434 3 2 15 -0.32768000000000000000e5 +2434 3 10 11 0.32768000000000000000e5 +2435 3 8 13 -0.32768000000000000000e5 +2435 3 10 12 0.32768000000000000000e5 +2436 1 13 16 -0.32768000000000000000e5 +2436 1 16 31 0.32768000000000000000e5 +2436 3 10 13 0.32768000000000000000e5 +2437 1 10 17 -0.16384000000000000000e5 +2437 1 28 35 0.16384000000000000000e5 +2437 3 2 15 -0.16384000000000000000e5 +2437 3 8 13 -0.16384000000000000000e5 +2437 3 10 14 0.32768000000000000000e5 +2437 3 11 24 0.16384000000000000000e5 +2437 4 6 10 -0.16384000000000000000e5 +2438 1 1 32 -0.32768000000000000000e5 +2438 1 2 17 0.65536000000000000000e5 +2438 1 2 33 0.32768000000000000000e5 +2438 1 3 34 -0.65536000000000000000e5 +2438 1 10 41 0.32768000000000000000e5 +2438 1 11 42 -0.32768000000000000000e5 +2438 1 12 43 -0.65536000000000000000e5 +2438 1 17 48 0.65536000000000000000e5 +2438 2 1 31 -0.32768000000000000000e5 +2438 2 7 21 0.32768000000000000000e5 +2438 2 8 22 -0.32768000000000000000e5 +2438 2 12 26 0.32768000000000000000e5 +2438 3 1 14 -0.65536000000000000000e5 +2438 3 6 23 -0.65536000000000000000e5 +2438 3 7 20 0.32768000000000000000e5 +2438 3 8 21 0.32768000000000000000e5 +2438 3 10 16 0.32768000000000000000e5 +2438 3 14 27 0.65536000000000000000e5 +2438 4 4 16 0.32768000000000000000e5 +2439 3 7 20 -0.32768000000000000000e5 +2439 3 10 17 0.32768000000000000000e5 +2440 1 2 33 -0.32768000000000000000e5 +2440 1 11 42 0.32768000000000000000e5 +2440 1 12 43 0.65536000000000000000e5 +2440 1 17 48 -0.65536000000000000000e5 +2440 2 8 22 0.32768000000000000000e5 +2440 2 12 26 -0.32768000000000000000e5 +2440 3 10 18 0.32768000000000000000e5 +2440 3 14 27 -0.65536000000000000000e5 +2440 4 4 16 -0.32768000000000000000e5 +2441 3 8 21 -0.32768000000000000000e5 +2441 3 10 19 0.32768000000000000000e5 +2442 3 6 23 -0.32768000000000000000e5 +2442 3 10 20 0.32768000000000000000e5 +2443 1 3 34 -0.32768000000000000000e5 +2443 1 16 47 0.32768000000000000000e5 +2443 3 10 21 0.32768000000000000000e5 +2443 3 13 26 0.32768000000000000000e5 +2444 1 4 35 0.32768000000000000000e5 +2444 1 12 43 0.32768000000000000000e5 +2444 1 18 25 0.32768000000000000000e5 +2444 1 28 35 -0.65536000000000000000e5 +2444 2 9 23 0.32768000000000000000e5 +2444 3 10 22 0.32768000000000000000e5 +2444 3 11 24 -0.65536000000000000000e5 +2445 1 4 19 -0.32768000000000000000e5 +2445 1 13 44 0.32768000000000000000e5 +2445 3 8 13 0.32768000000000000000e5 +2445 3 10 24 0.32768000000000000000e5 +2446 1 4 19 -0.16384000000000000000e5 +2446 1 13 44 0.16384000000000000000e5 +2446 3 8 13 0.16384000000000000000e5 +2446 3 10 23 -0.16384000000000000000e5 +2446 3 10 25 0.32768000000000000000e5 +2446 3 11 24 -0.16384000000000000000e5 +2446 4 10 14 -0.16384000000000000000e5 +2447 1 2 33 0.32768000000000000000e5 +2447 1 3 34 -0.65536000000000000000e5 +2447 1 5 52 0.32768000000000000000e5 +2447 1 10 41 0.32768000000000000000e5 +2447 1 11 42 -0.32768000000000000000e5 +2447 1 12 43 -0.65536000000000000000e5 +2447 1 16 47 0.65536000000000000000e5 +2447 1 28 43 0.32768000000000000000e5 +2447 2 7 21 0.32768000000000000000e5 +2447 2 10 32 -0.32768000000000000000e5 +2447 2 12 26 0.32768000000000000000e5 +2447 3 2 31 0.32768000000000000000e5 +2447 3 7 20 0.32768000000000000000e5 +2447 3 8 21 0.32768000000000000000e5 +2447 3 10 26 0.32768000000000000000e5 +2447 3 14 27 0.65536000000000000000e5 +2447 4 7 19 -0.32768000000000000000e5 +2448 3 2 31 -0.32768000000000000000e5 +2448 3 10 27 0.32768000000000000000e5 +2449 1 5 52 -0.32768000000000000000e5 +2449 1 10 41 -0.32768000000000000000e5 +2449 1 17 48 0.65536000000000000000e5 +2449 1 28 43 -0.32768000000000000000e5 +2449 2 8 22 -0.32768000000000000000e5 +2449 3 10 28 0.32768000000000000000e5 +2449 4 4 16 0.32768000000000000000e5 +2449 4 7 19 0.32768000000000000000e5 +2450 3 10 29 0.32768000000000000000e5 +2450 3 13 26 -0.32768000000000000000e5 +2451 1 5 52 -0.16384000000000000000e5 +2451 1 11 42 0.16384000000000000000e5 +2451 2 12 26 -0.16384000000000000000e5 +2451 2 20 34 0.16384000000000000000e5 +2451 3 2 31 -0.16384000000000000000e5 +2451 3 10 30 0.32768000000000000000e5 +2451 3 14 27 -0.32768000000000000000e5 +2451 4 7 19 0.16384000000000000000e5 +2451 4 8 20 0.16384000000000000000e5 +2452 1 13 44 -0.32768000000000000000e5 +2452 1 34 41 0.32768000000000000000e5 +2452 3 10 31 0.32768000000000000000e5 +2453 1 11 42 -0.32768000000000000000e5 +2453 1 12 43 -0.65536000000000000000e5 +2453 1 17 48 0.65536000000000000000e5 +2453 1 37 44 0.32768000000000000000e5 +2453 2 8 22 -0.32768000000000000000e5 +2453 2 12 26 0.32768000000000000000e5 +2453 3 2 31 0.32768000000000000000e5 +2453 3 10 32 0.32768000000000000000e5 +2453 3 14 27 0.65536000000000000000e5 +2453 4 4 16 0.32768000000000000000e5 +2454 1 5 52 0.32768000000000000000e5 +2454 1 17 48 -0.65536000000000000000e5 +2454 1 28 43 0.32768000000000000000e5 +2454 1 32 47 0.32768000000000000000e5 +2454 2 8 22 0.32768000000000000000e5 +2454 3 10 33 0.32768000000000000000e5 +2454 4 4 16 -0.32768000000000000000e5 +2454 4 7 19 -0.32768000000000000000e5 +2455 1 5 52 0.16384000000000000000e5 +2455 1 11 42 -0.16384000000000000000e5 +2455 1 12 43 -0.32768000000000000000e5 +2455 1 28 43 0.16384000000000000000e5 +2455 1 32 47 0.16384000000000000000e5 +2455 1 37 44 0.16384000000000000000e5 +2455 2 12 26 0.16384000000000000000e5 +2455 3 2 31 0.16384000000000000000e5 +2455 3 10 34 0.32768000000000000000e5 +2455 3 14 27 0.32768000000000000000e5 +2455 3 18 31 -0.16384000000000000000e5 +2455 4 7 19 -0.16384000000000000000e5 +2455 4 8 20 -0.16384000000000000000e5 +2456 1 32 47 -0.32768000000000000000e5 +2456 1 37 52 0.32768000000000000000e5 +2456 3 10 35 0.32768000000000000000e5 +2457 3 8 13 -0.16384000000000000000e5 +2457 3 11 11 0.32768000000000000000e5 +2458 1 10 17 -0.32768000000000000000e5 +2458 1 28 35 0.32768000000000000000e5 +2458 3 11 12 0.32768000000000000000e5 +2458 3 11 24 0.32768000000000000000e5 +2459 1 10 17 -0.16384000000000000000e5 +2459 1 28 35 0.16384000000000000000e5 +2459 3 2 15 -0.16384000000000000000e5 +2459 3 8 13 -0.16384000000000000000e5 +2459 3 11 13 0.32768000000000000000e5 +2459 3 11 24 0.16384000000000000000e5 +2459 4 6 10 -0.16384000000000000000e5 +2460 1 4 19 -0.16384000000000000000e5 +2460 1 5 20 -0.16384000000000000000e5 +2460 1 10 17 -0.16384000000000000000e5 +2460 1 17 32 0.32768000000000000000e5 +2460 2 8 14 -0.16384000000000000000e5 +2460 3 11 14 0.32768000000000000000e5 +2461 1 13 20 -0.32768000000000000000e5 +2461 1 17 32 0.16384000000000000000e5 +2461 1 20 27 0.16384000000000000000e5 +2461 1 29 36 0.16384000000000000000e5 +2461 2 11 25 0.16384000000000000000e5 +2461 3 11 15 0.32768000000000000000e5 +2461 3 12 25 0.16384000000000000000e5 +2462 3 7 20 -0.32768000000000000000e5 +2462 3 11 16 0.32768000000000000000e5 +2463 1 2 33 -0.32768000000000000000e5 +2463 1 11 42 0.32768000000000000000e5 +2463 1 12 43 0.65536000000000000000e5 +2463 1 17 48 -0.65536000000000000000e5 +2463 2 8 22 0.32768000000000000000e5 +2463 2 12 26 -0.32768000000000000000e5 +2463 3 11 17 0.32768000000000000000e5 +2463 3 14 27 -0.65536000000000000000e5 +2463 4 4 16 -0.32768000000000000000e5 +2464 3 8 21 -0.32768000000000000000e5 +2464 3 11 18 0.32768000000000000000e5 +2465 1 4 35 -0.65536000000000000000e5 +2465 1 17 48 0.65536000000000000000e5 +2465 3 8 21 0.32768000000000000000e5 +2465 3 9 22 0.32768000000000000000e5 +2465 3 11 19 0.32768000000000000000e5 +2465 3 14 27 0.65536000000000000000e5 +2465 4 4 16 0.32768000000000000000e5 +2466 1 3 34 -0.32768000000000000000e5 +2466 1 16 47 0.32768000000000000000e5 +2466 3 11 20 0.32768000000000000000e5 +2466 3 13 26 0.32768000000000000000e5 +2467 1 4 35 0.32768000000000000000e5 +2467 1 12 43 0.32768000000000000000e5 +2467 1 18 25 0.32768000000000000000e5 +2467 1 28 35 -0.65536000000000000000e5 +2467 2 9 23 0.32768000000000000000e5 +2467 3 11 21 0.32768000000000000000e5 +2467 3 11 24 -0.65536000000000000000e5 +2468 1 4 35 -0.32768000000000000000e5 +2468 1 17 48 0.32768000000000000000e5 +2468 3 11 22 0.32768000000000000000e5 +2468 3 14 27 0.32768000000000000000e5 +2469 1 4 19 -0.32768000000000000000e5 +2469 1 13 44 0.32768000000000000000e5 +2469 3 8 13 0.32768000000000000000e5 +2469 3 11 23 0.32768000000000000000e5 +2470 1 17 32 -0.32768000000000000000e5 +2470 1 19 42 0.32768000000000000000e5 +2470 3 11 25 0.32768000000000000000e5 +2471 3 2 31 -0.32768000000000000000e5 +2471 3 11 26 0.32768000000000000000e5 +2472 1 5 52 -0.32768000000000000000e5 +2472 1 10 41 -0.32768000000000000000e5 +2472 1 17 48 0.65536000000000000000e5 +2472 1 28 43 -0.32768000000000000000e5 +2472 2 8 22 -0.32768000000000000000e5 +2472 3 11 27 0.32768000000000000000e5 +2472 4 4 16 0.32768000000000000000e5 +2472 4 7 19 0.32768000000000000000e5 +2473 1 10 41 0.32768000000000000000e5 +2473 1 11 42 0.32768000000000000000e5 +2473 1 17 48 -0.65536000000000000000e5 +2473 1 28 43 0.32768000000000000000e5 +2473 2 8 22 0.32768000000000000000e5 +2473 3 11 28 0.32768000000000000000e5 +2473 3 14 27 -0.65536000000000000000e5 +2473 4 4 16 -0.32768000000000000000e5 +2474 1 5 52 -0.16384000000000000000e5 +2474 1 11 42 0.16384000000000000000e5 +2474 2 12 26 -0.16384000000000000000e5 +2474 2 20 34 0.16384000000000000000e5 +2474 3 2 31 -0.16384000000000000000e5 +2474 3 11 29 0.32768000000000000000e5 +2474 3 14 27 -0.32768000000000000000e5 +2474 4 7 19 0.16384000000000000000e5 +2474 4 8 20 0.16384000000000000000e5 +2475 3 11 30 0.32768000000000000000e5 +2475 3 14 27 -0.32768000000000000000e5 +2476 1 13 52 0.32768000000000000000e5 +2476 1 28 35 -0.32768000000000000000e5 +2476 3 11 31 0.32768000000000000000e5 +2477 1 5 52 0.32768000000000000000e5 +2477 1 17 48 -0.65536000000000000000e5 +2477 1 28 43 0.32768000000000000000e5 +2477 1 32 47 0.32768000000000000000e5 +2477 2 8 22 0.32768000000000000000e5 +2477 3 11 32 0.32768000000000000000e5 +2477 4 4 16 -0.32768000000000000000e5 +2477 4 7 19 -0.32768000000000000000e5 +2478 3 11 33 0.32768000000000000000e5 +2478 3 18 31 -0.32768000000000000000e5 +2479 3 11 34 0.32768000000000000000e5 +2479 3 24 29 -0.32768000000000000000e5 +2480 3 11 35 0.32768000000000000000e5 +2480 3 21 34 -0.32768000000000000000e5 +2481 1 5 20 -0.16384000000000000000e5 +2481 1 5 36 0.16384000000000000000e5 +2481 3 12 12 0.32768000000000000000e5 +2482 1 4 19 -0.16384000000000000000e5 +2482 1 5 20 -0.16384000000000000000e5 +2482 1 10 17 -0.16384000000000000000e5 +2482 1 17 32 0.32768000000000000000e5 +2482 2 8 14 -0.16384000000000000000e5 +2482 3 12 13 0.32768000000000000000e5 +2483 1 4 19 0.16384000000000000000e5 +2483 1 5 20 0.16384000000000000000e5 +2483 1 6 21 0.32768000000000000000e5 +2483 1 10 17 0.16384000000000000000e5 +2483 1 10 21 -0.65536000000000000000e5 +2483 1 29 36 0.32768000000000000000e5 +2483 2 8 14 0.16384000000000000000e5 +2483 2 9 15 0.32768000000000000000e5 +2483 3 12 14 0.32768000000000000000e5 +2483 3 12 25 0.32768000000000000000e5 +2484 1 10 21 -0.32768000000000000000e5 +2484 1 17 32 0.16384000000000000000e5 +2484 1 18 33 0.16384000000000000000e5 +2484 1 29 36 0.16384000000000000000e5 +2484 2 14 24 0.16384000000000000000e5 +2484 3 12 15 0.32768000000000000000e5 +2484 3 12 25 0.16384000000000000000e5 +2485 1 2 33 -0.32768000000000000000e5 +2485 1 11 42 0.32768000000000000000e5 +2485 1 12 43 0.65536000000000000000e5 +2485 1 17 48 -0.65536000000000000000e5 +2485 2 8 22 0.32768000000000000000e5 +2485 2 12 26 -0.32768000000000000000e5 +2485 3 12 16 0.32768000000000000000e5 +2485 3 14 27 -0.65536000000000000000e5 +2485 4 4 16 -0.32768000000000000000e5 +2486 3 8 21 -0.32768000000000000000e5 +2486 3 12 17 0.32768000000000000000e5 +2487 1 4 35 -0.65536000000000000000e5 +2487 1 17 48 0.65536000000000000000e5 +2487 3 8 21 0.32768000000000000000e5 +2487 3 9 22 0.32768000000000000000e5 +2487 3 12 18 0.32768000000000000000e5 +2487 3 14 27 0.65536000000000000000e5 +2487 4 4 16 0.32768000000000000000e5 +2488 3 9 22 -0.32768000000000000000e5 +2488 3 12 19 0.32768000000000000000e5 +2489 1 4 35 0.32768000000000000000e5 +2489 1 12 43 0.32768000000000000000e5 +2489 1 18 25 0.32768000000000000000e5 +2489 1 28 35 -0.65536000000000000000e5 +2489 2 9 23 0.32768000000000000000e5 +2489 3 11 24 -0.65536000000000000000e5 +2489 3 12 20 0.32768000000000000000e5 +2490 1 4 35 -0.32768000000000000000e5 +2490 1 17 48 0.32768000000000000000e5 +2490 3 12 21 0.32768000000000000000e5 +2490 3 14 27 0.32768000000000000000e5 +2491 3 12 22 0.32768000000000000000e5 +2491 3 14 19 -0.32768000000000000000e5 +2492 3 11 24 -0.32768000000000000000e5 +2492 3 12 23 0.32768000000000000000e5 +2493 1 5 36 -0.32768000000000000000e5 +2493 1 14 45 0.32768000000000000000e5 +2493 3 12 24 0.32768000000000000000e5 +2494 1 5 52 -0.32768000000000000000e5 +2494 1 10 41 -0.32768000000000000000e5 +2494 1 17 48 0.65536000000000000000e5 +2494 1 28 43 -0.32768000000000000000e5 +2494 2 8 22 -0.32768000000000000000e5 +2494 3 12 26 0.32768000000000000000e5 +2494 4 4 16 0.32768000000000000000e5 +2494 4 7 19 0.32768000000000000000e5 +2495 1 10 41 0.32768000000000000000e5 +2495 1 11 42 0.32768000000000000000e5 +2495 1 17 48 -0.65536000000000000000e5 +2495 1 28 43 0.32768000000000000000e5 +2495 2 8 22 0.32768000000000000000e5 +2495 3 12 27 0.32768000000000000000e5 +2495 3 14 27 -0.65536000000000000000e5 +2495 4 4 16 -0.32768000000000000000e5 +2496 1 5 52 0.32768000000000000000e5 +2496 1 11 42 -0.32768000000000000000e5 +2496 3 12 28 0.32768000000000000000e5 +2497 3 12 29 0.32768000000000000000e5 +2497 3 14 27 -0.32768000000000000000e5 +2498 1 14 45 0.65536000000000000000e5 +2498 1 17 48 -0.32768000000000000000e5 +2498 1 18 25 -0.32768000000000000000e5 +2498 1 18 49 -0.32768000000000000000e5 +2498 2 24 30 -0.32768000000000000000e5 +2498 3 12 30 0.32768000000000000000e5 +2498 3 14 19 0.32768000000000000000e5 +2498 3 15 28 -0.65536000000000000000e5 +2499 3 12 31 0.32768000000000000000e5 +2499 3 15 28 -0.32768000000000000000e5 +2500 3 12 32 0.32768000000000000000e5 +2500 3 18 31 -0.32768000000000000000e5 +2501 1 5 52 -0.32768000000000000000e5 +2501 1 33 48 0.32768000000000000000e5 +2501 3 12 33 0.32768000000000000000e5 +2502 1 14 45 -0.65536000000000000000e5 +2502 1 17 48 0.32768000000000000000e5 +2502 1 18 49 0.32768000000000000000e5 +2502 1 34 49 0.32768000000000000000e5 +2502 2 24 30 0.32768000000000000000e5 +2502 3 12 34 0.32768000000000000000e5 +2502 3 15 28 0.65536000000000000000e5 +2503 1 33 48 -0.32768000000000000000e5 +2503 1 43 50 0.32768000000000000000e5 +2503 3 12 35 0.32768000000000000000e5 +2504 3 10 15 -0.16384000000000000000e5 +2504 3 13 13 0.32768000000000000000e5 +2505 1 13 20 -0.32768000000000000000e5 +2505 1 17 32 0.16384000000000000000e5 +2505 1 20 27 0.16384000000000000000e5 +2505 1 29 36 0.16384000000000000000e5 +2505 2 11 25 0.16384000000000000000e5 +2505 3 12 25 0.16384000000000000000e5 +2505 3 13 14 0.32768000000000000000e5 +2506 1 10 21 -0.16384000000000000000e5 +2506 1 13 20 -0.16384000000000000000e5 +2506 1 17 32 0.16384000000000000000e5 +2506 1 18 33 0.81920000000000000000e4 +2506 1 20 27 0.81920000000000000000e4 +2506 1 29 36 0.16384000000000000000e5 +2506 2 11 25 0.81920000000000000000e4 +2506 2 14 24 0.81920000000000000000e4 +2506 3 10 15 -0.16384000000000000000e5 +2506 3 12 25 0.16384000000000000000e5 +2506 3 13 15 0.32768000000000000000e5 +2506 4 10 10 -0.32768000000000000000e5 +2507 3 6 23 -0.32768000000000000000e5 +2507 3 13 16 0.32768000000000000000e5 +2508 1 3 34 -0.32768000000000000000e5 +2508 1 16 47 0.32768000000000000000e5 +2508 3 13 17 0.32768000000000000000e5 +2508 3 13 26 0.32768000000000000000e5 +2509 1 4 35 0.32768000000000000000e5 +2509 1 12 43 0.32768000000000000000e5 +2509 1 18 25 0.32768000000000000000e5 +2509 1 28 35 -0.65536000000000000000e5 +2509 2 9 23 0.32768000000000000000e5 +2509 3 11 24 -0.65536000000000000000e5 +2509 3 13 18 0.32768000000000000000e5 +2510 1 4 35 -0.32768000000000000000e5 +2510 1 17 48 0.32768000000000000000e5 +2510 3 13 19 0.32768000000000000000e5 +2510 3 14 27 0.32768000000000000000e5 +2511 3 10 23 -0.32768000000000000000e5 +2511 3 13 20 0.32768000000000000000e5 +2512 1 4 19 -0.32768000000000000000e5 +2512 1 13 44 0.32768000000000000000e5 +2512 3 8 13 0.32768000000000000000e5 +2512 3 13 21 0.32768000000000000000e5 +2513 3 11 24 -0.32768000000000000000e5 +2513 3 13 22 0.32768000000000000000e5 +2514 1 4 19 -0.16384000000000000000e5 +2514 1 13 44 0.16384000000000000000e5 +2514 3 8 13 0.16384000000000000000e5 +2514 3 10 23 -0.16384000000000000000e5 +2514 3 11 24 -0.16384000000000000000e5 +2514 3 13 23 0.32768000000000000000e5 +2514 4 10 14 -0.16384000000000000000e5 +2515 1 17 32 -0.32768000000000000000e5 +2515 1 19 42 0.32768000000000000000e5 +2515 3 13 24 0.32768000000000000000e5 +2516 1 4 19 -0.81920000000000000000e4 +2516 1 13 44 0.81920000000000000000e4 +2516 1 17 32 -0.16384000000000000000e5 +2516 1 19 42 0.16384000000000000000e5 +2516 2 11 25 -0.16384000000000000000e5 +2516 2 15 29 0.16384000000000000000e5 +2516 3 8 13 0.81920000000000000000e4 +2516 3 10 23 -0.81920000000000000000e4 +2516 3 11 24 -0.81920000000000000000e4 +2516 3 12 25 -0.16384000000000000000e5 +2516 3 13 25 0.32768000000000000000e5 +2516 4 10 14 -0.81920000000000000000e4 +2517 1 5 52 -0.16384000000000000000e5 +2517 1 11 42 0.16384000000000000000e5 +2517 2 12 26 -0.16384000000000000000e5 +2517 2 20 34 0.16384000000000000000e5 +2517 3 2 31 -0.16384000000000000000e5 +2517 3 13 27 0.32768000000000000000e5 +2517 3 14 27 -0.32768000000000000000e5 +2517 4 7 19 0.16384000000000000000e5 +2517 4 8 20 0.16384000000000000000e5 +2518 3 13 28 0.32768000000000000000e5 +2518 3 14 27 -0.32768000000000000000e5 +2519 1 13 44 -0.32768000000000000000e5 +2519 1 34 41 0.32768000000000000000e5 +2519 3 13 29 0.32768000000000000000e5 +2520 1 13 52 0.32768000000000000000e5 +2520 1 28 35 -0.32768000000000000000e5 +2520 3 13 30 0.32768000000000000000e5 +2521 1 19 42 -0.32768000000000000000e5 +2521 1 19 50 0.32768000000000000000e5 +2521 3 13 31 0.32768000000000000000e5 +2522 1 5 52 0.16384000000000000000e5 +2522 1 11 42 -0.16384000000000000000e5 +2522 1 12 43 -0.32768000000000000000e5 +2522 1 28 43 0.16384000000000000000e5 +2522 1 32 47 0.16384000000000000000e5 +2522 1 37 44 0.16384000000000000000e5 +2522 2 12 26 0.16384000000000000000e5 +2522 3 2 31 0.16384000000000000000e5 +2522 3 13 32 0.32768000000000000000e5 +2522 3 14 27 0.32768000000000000000e5 +2522 3 18 31 -0.16384000000000000000e5 +2522 4 7 19 -0.16384000000000000000e5 +2522 4 8 20 -0.16384000000000000000e5 +2523 3 13 33 0.32768000000000000000e5 +2523 3 24 29 -0.32768000000000000000e5 +2524 1 13 52 -0.32768000000000000000e5 +2524 1 16 55 0.32768000000000000000e5 +2524 3 13 34 0.32768000000000000000e5 +2525 1 32 47 -0.16384000000000000000e5 +2525 1 33 48 -0.16384000000000000000e5 +2525 1 37 52 0.16384000000000000000e5 +2525 1 43 50 0.16384000000000000000e5 +2525 3 13 35 0.32768000000000000000e5 +2525 3 21 34 -0.16384000000000000000e5 +2525 4 16 20 -0.16384000000000000000e5 +2526 1 10 21 -0.16384000000000000000e5 +2526 1 17 32 0.81920000000000000000e4 +2526 1 18 33 0.81920000000000000000e4 +2526 1 29 36 0.81920000000000000000e4 +2526 2 14 24 0.81920000000000000000e4 +2526 3 12 25 0.81920000000000000000e4 +2526 3 14 14 0.32768000000000000000e5 +2527 1 3 34 -0.32768000000000000000e5 +2527 1 16 47 0.32768000000000000000e5 +2527 3 13 26 0.32768000000000000000e5 +2527 3 14 16 0.32768000000000000000e5 +2528 1 4 35 0.32768000000000000000e5 +2528 1 12 43 0.32768000000000000000e5 +2528 1 18 25 0.32768000000000000000e5 +2528 1 28 35 -0.65536000000000000000e5 +2528 2 9 23 0.32768000000000000000e5 +2528 3 11 24 -0.65536000000000000000e5 +2528 3 14 17 0.32768000000000000000e5 +2529 1 4 35 -0.32768000000000000000e5 +2529 1 17 48 0.32768000000000000000e5 +2529 3 14 18 0.32768000000000000000e5 +2529 3 14 27 0.32768000000000000000e5 +2530 1 4 19 -0.32768000000000000000e5 +2530 1 13 44 0.32768000000000000000e5 +2530 3 8 13 0.32768000000000000000e5 +2530 3 14 20 0.32768000000000000000e5 +2531 3 11 24 -0.32768000000000000000e5 +2531 3 14 21 0.32768000000000000000e5 +2532 1 5 36 -0.32768000000000000000e5 +2532 1 14 45 0.32768000000000000000e5 +2532 3 14 22 0.32768000000000000000e5 +2533 1 17 32 -0.32768000000000000000e5 +2533 1 19 42 0.32768000000000000000e5 +2533 3 14 23 0.32768000000000000000e5 +2534 3 12 25 -0.32768000000000000000e5 +2534 3 14 24 0.32768000000000000000e5 +2535 3 14 25 0.32768000000000000000e5 +2535 3 15 24 -0.32768000000000000000e5 +2536 1 5 52 -0.16384000000000000000e5 +2536 1 11 42 0.16384000000000000000e5 +2536 2 12 26 -0.16384000000000000000e5 +2536 2 20 34 0.16384000000000000000e5 +2536 3 2 31 -0.16384000000000000000e5 +2536 3 14 26 0.32768000000000000000e5 +2536 3 14 27 -0.32768000000000000000e5 +2536 4 7 19 0.16384000000000000000e5 +2536 4 8 20 0.16384000000000000000e5 +2537 1 14 45 0.65536000000000000000e5 +2537 1 17 48 -0.32768000000000000000e5 +2537 1 18 25 -0.32768000000000000000e5 +2537 1 18 49 -0.32768000000000000000e5 +2537 2 24 30 -0.32768000000000000000e5 +2537 3 14 19 0.32768000000000000000e5 +2537 3 14 28 0.32768000000000000000e5 +2537 3 15 28 -0.65536000000000000000e5 +2538 1 13 52 0.32768000000000000000e5 +2538 1 28 35 -0.32768000000000000000e5 +2538 3 14 29 0.32768000000000000000e5 +2539 3 14 30 0.32768000000000000000e5 +2539 3 15 28 -0.32768000000000000000e5 +2540 3 14 31 0.32768000000000000000e5 +2540 3 24 25 -0.32768000000000000000e5 +2541 3 14 32 0.32768000000000000000e5 +2541 3 24 29 -0.32768000000000000000e5 +2542 1 14 45 -0.65536000000000000000e5 +2542 1 17 48 0.32768000000000000000e5 +2542 1 18 49 0.32768000000000000000e5 +2542 1 34 49 0.32768000000000000000e5 +2542 2 24 30 0.32768000000000000000e5 +2542 3 14 33 0.32768000000000000000e5 +2542 3 15 28 0.65536000000000000000e5 +2543 1 14 45 -0.32768000000000000000e5 +2543 1 35 50 0.32768000000000000000e5 +2543 3 14 34 0.32768000000000000000e5 +2543 3 15 28 0.32768000000000000000e5 +2544 1 34 49 -0.32768000000000000000e5 +2544 1 44 51 0.32768000000000000000e5 +2544 3 14 35 0.32768000000000000000e5 +2545 1 14 21 0.81920000000000000000e4 +2545 1 19 20 -0.16384000000000000000e5 +2545 1 19 34 0.81920000000000000000e4 +2545 1 20 35 0.81920000000000000000e4 +2545 2 15 25 0.81920000000000000000e4 +2545 3 14 15 -0.81920000000000000000e4 +2545 3 15 15 0.32768000000000000000e5 +2546 3 10 23 -0.32768000000000000000e5 +2546 3 15 16 0.32768000000000000000e5 +2547 1 4 19 -0.32768000000000000000e5 +2547 1 13 44 0.32768000000000000000e5 +2547 3 8 13 0.32768000000000000000e5 +2547 3 15 17 0.32768000000000000000e5 +2548 3 11 24 -0.32768000000000000000e5 +2548 3 15 18 0.32768000000000000000e5 +2549 1 5 36 -0.32768000000000000000e5 +2549 1 14 45 0.32768000000000000000e5 +2549 3 15 19 0.32768000000000000000e5 +2550 1 4 19 -0.16384000000000000000e5 +2550 1 13 44 0.16384000000000000000e5 +2550 3 8 13 0.16384000000000000000e5 +2550 3 10 23 -0.16384000000000000000e5 +2550 3 11 24 -0.16384000000000000000e5 +2550 3 15 20 0.32768000000000000000e5 +2550 4 10 14 -0.16384000000000000000e5 +2551 1 17 32 -0.32768000000000000000e5 +2551 1 19 42 0.32768000000000000000e5 +2551 3 15 21 0.32768000000000000000e5 +2552 3 12 25 -0.32768000000000000000e5 +2552 3 15 22 0.32768000000000000000e5 +2553 1 4 19 -0.81920000000000000000e4 +2553 1 13 44 0.81920000000000000000e4 +2553 1 17 32 -0.16384000000000000000e5 +2553 1 19 42 0.16384000000000000000e5 +2553 2 11 25 -0.16384000000000000000e5 +2553 2 15 29 0.16384000000000000000e5 +2553 3 8 13 0.81920000000000000000e4 +2553 3 10 23 -0.81920000000000000000e4 +2553 3 11 24 -0.81920000000000000000e4 +2553 3 12 25 -0.16384000000000000000e5 +2553 3 15 23 0.32768000000000000000e5 +2553 4 10 14 -0.81920000000000000000e4 +2554 1 14 21 -0.32768000000000000000e5 +2554 1 21 44 0.32768000000000000000e5 +2554 3 14 15 0.32768000000000000000e5 +2554 3 15 25 0.32768000000000000000e5 +2555 1 13 44 -0.32768000000000000000e5 +2555 1 34 41 0.32768000000000000000e5 +2555 3 15 26 0.32768000000000000000e5 +2556 1 13 52 0.32768000000000000000e5 +2556 1 28 35 -0.32768000000000000000e5 +2556 3 15 27 0.32768000000000000000e5 +2557 1 19 42 -0.32768000000000000000e5 +2557 1 19 50 0.32768000000000000000e5 +2557 3 15 29 0.32768000000000000000e5 +2558 3 15 30 0.32768000000000000000e5 +2558 3 24 25 -0.32768000000000000000e5 +2559 1 17 32 -0.16384000000000000000e5 +2559 1 18 33 -0.16384000000000000000e5 +2559 1 19 50 0.16384000000000000000e5 +2559 1 20 51 0.16384000000000000000e5 +2559 2 14 24 -0.16384000000000000000e5 +2559 2 25 31 0.16384000000000000000e5 +2559 3 12 25 -0.16384000000000000000e5 +2559 3 15 24 0.32768000000000000000e5 +2559 3 15 31 0.32768000000000000000e5 +2559 3 24 25 -0.16384000000000000000e5 +2560 1 13 52 -0.32768000000000000000e5 +2560 1 16 55 0.32768000000000000000e5 +2560 3 15 32 0.32768000000000000000e5 +2561 1 14 45 -0.32768000000000000000e5 +2561 1 35 50 0.32768000000000000000e5 +2561 3 15 28 0.32768000000000000000e5 +2561 3 15 33 0.32768000000000000000e5 +2562 1 16 55 0.16384000000000000000e5 +2562 1 29 36 -0.32768000000000000000e5 +2562 1 35 50 0.16384000000000000000e5 +2562 1 43 46 0.16384000000000000000e5 +2562 2 31 31 0.32768000000000000000e5 +2562 3 15 34 0.32768000000000000000e5 +2562 3 24 25 0.32768000000000000000e5 +2563 3 15 35 0.32768000000000000000e5 +2563 3 25 34 -0.32768000000000000000e5 +2564 1 1 40 0.16384000000000000000e5 +2564 1 2 33 0.65536000000000000000e5 +2564 1 2 49 0.16384000000000000000e5 +2564 1 3 34 -0.13107200000000000000e6 +2564 1 3 50 -0.32768000000000000000e5 +2564 1 5 52 0.65536000000000000000e5 +2564 1 6 37 0.16384000000000000000e5 +2564 1 10 41 0.65536000000000000000e5 +2564 1 11 42 -0.65536000000000000000e5 +2564 1 12 43 -0.13107200000000000000e6 +2564 1 16 47 0.13107200000000000000e6 +2564 1 28 43 0.65536000000000000000e5 +2564 2 2 32 0.16384000000000000000e5 +2564 2 3 17 -0.16384000000000000000e5 +2564 2 4 26 0.16384000000000000000e5 +2564 2 7 21 0.65536000000000000000e5 +2564 2 10 32 -0.65536000000000000000e5 +2564 2 12 26 0.65536000000000000000e5 +2564 3 1 30 0.65536000000000000000e5 +2564 3 2 31 0.65536000000000000000e5 +2564 3 7 20 0.65536000000000000000e5 +2564 3 8 21 0.65536000000000000000e5 +2564 3 14 27 0.13107200000000000000e6 +2564 3 16 16 0.32768000000000000000e5 +2564 4 1 13 0.16384000000000000000e5 +2564 4 5 17 0.32768000000000000000e5 +2564 4 7 19 -0.65536000000000000000e5 +2564 4 11 11 0.32768000000000000000e5 +2565 1 2 49 -0.32768000000000000000e5 +2565 1 6 37 -0.32768000000000000000e5 +2565 1 8 39 0.65536000000000000000e5 +2565 1 23 38 -0.32768000000000000000e5 +2565 2 2 32 -0.32768000000000000000e5 +2565 2 3 17 0.32768000000000000000e5 +2565 2 4 26 -0.32768000000000000000e5 +2565 3 1 30 -0.65536000000000000000e5 +2565 3 16 17 0.32768000000000000000e5 +2565 4 1 13 -0.32768000000000000000e5 +2566 1 1 40 -0.32768000000000000000e5 +2566 1 23 38 0.32768000000000000000e5 +2566 3 16 18 0.32768000000000000000e5 +2567 1 1 40 0.32768000000000000000e5 +2567 1 2 49 0.32768000000000000000e5 +2567 1 6 37 0.32768000000000000000e5 +2567 1 8 39 -0.65536000000000000000e5 +2567 2 4 26 0.32768000000000000000e5 +2567 3 16 19 0.32768000000000000000e5 +2568 1 2 33 0.65536000000000000000e5 +2568 1 3 34 -0.13107200000000000000e6 +2568 1 3 50 -0.32768000000000000000e5 +2568 1 5 52 0.65536000000000000000e5 +2568 1 8 39 0.32768000000000000000e5 +2568 1 10 41 0.65536000000000000000e5 +2568 1 11 42 -0.65536000000000000000e5 +2568 1 12 43 -0.13107200000000000000e6 +2568 1 16 47 0.13107200000000000000e6 +2568 1 28 43 0.65536000000000000000e5 +2568 2 7 21 0.65536000000000000000e5 +2568 2 10 32 -0.65536000000000000000e5 +2568 2 12 26 0.65536000000000000000e5 +2568 3 1 30 0.32768000000000000000e5 +2568 3 2 31 0.65536000000000000000e5 +2568 3 7 20 0.65536000000000000000e5 +2568 3 8 21 0.65536000000000000000e5 +2568 3 14 27 0.13107200000000000000e6 +2568 3 16 20 0.32768000000000000000e5 +2568 4 5 17 0.32768000000000000000e5 +2568 4 7 19 -0.65536000000000000000e5 +2569 3 1 30 -0.32768000000000000000e5 +2569 3 16 21 0.32768000000000000000e5 +2570 1 3 50 0.32768000000000000000e5 +2570 1 8 39 -0.32768000000000000000e5 +2570 3 16 22 0.32768000000000000000e5 +2571 1 2 33 0.32768000000000000000e5 +2571 1 3 34 -0.65536000000000000000e5 +2571 1 5 52 0.32768000000000000000e5 +2571 1 10 41 0.32768000000000000000e5 +2571 1 11 42 -0.32768000000000000000e5 +2571 1 12 43 -0.65536000000000000000e5 +2571 1 16 47 0.65536000000000000000e5 +2571 1 28 43 0.32768000000000000000e5 +2571 2 7 21 0.32768000000000000000e5 +2571 2 10 32 -0.32768000000000000000e5 +2571 2 12 26 0.32768000000000000000e5 +2571 3 2 31 0.32768000000000000000e5 +2571 3 7 20 0.32768000000000000000e5 +2571 3 8 21 0.32768000000000000000e5 +2571 3 14 27 0.65536000000000000000e5 +2571 3 16 23 0.32768000000000000000e5 +2571 4 7 19 -0.32768000000000000000e5 +2572 3 2 31 -0.32768000000000000000e5 +2572 3 16 24 0.32768000000000000000e5 +2573 3 13 26 -0.32768000000000000000e5 +2573 3 16 25 0.32768000000000000000e5 +2574 1 2 49 0.32768000000000000000e5 +2574 1 7 54 -0.65536000000000000000e5 +2574 1 23 38 0.32768000000000000000e5 +2574 1 24 39 0.32768000000000000000e5 +2574 2 1 35 -0.32768000000000000000e5 +2574 2 2 32 0.32768000000000000000e5 +2574 2 3 33 0.32768000000000000000e5 +2574 2 18 32 -0.32768000000000000000e5 +2574 2 26 32 0.32768000000000000000e5 +2574 3 3 32 0.32768000000000000000e5 +2574 3 4 33 0.32768000000000000000e5 +2574 3 16 26 0.32768000000000000000e5 +2574 3 16 29 -0.65536000000000000000e5 +2574 3 17 30 -0.65536000000000000000e5 +2574 4 17 17 0.65536000000000000000e5 +2575 1 2 49 -0.32768000000000000000e5 +2575 1 7 54 0.65536000000000000000e5 +2575 1 23 38 -0.32768000000000000000e5 +2575 1 24 39 -0.32768000000000000000e5 +2575 2 3 33 -0.32768000000000000000e5 +2575 2 18 32 0.32768000000000000000e5 +2575 2 26 32 -0.32768000000000000000e5 +2575 3 4 33 -0.32768000000000000000e5 +2575 3 16 27 0.32768000000000000000e5 +2575 3 17 30 0.65536000000000000000e5 +2575 4 17 17 -0.65536000000000000000e5 +2576 3 3 32 -0.32768000000000000000e5 +2576 3 16 28 0.32768000000000000000e5 +2577 1 3 50 -0.32768000000000000000e5 +2577 1 7 54 0.32768000000000000000e5 +2577 3 16 30 0.32768000000000000000e5 +2578 1 11 42 -0.32768000000000000000e5 +2578 1 12 43 -0.65536000000000000000e5 +2578 1 17 48 0.65536000000000000000e5 +2578 1 37 44 0.32768000000000000000e5 +2578 2 8 22 -0.32768000000000000000e5 +2578 2 12 26 0.32768000000000000000e5 +2578 3 2 31 0.32768000000000000000e5 +2578 3 14 27 0.65536000000000000000e5 +2578 3 16 31 0.32768000000000000000e5 +2578 4 4 16 0.32768000000000000000e5 +2579 1 2 49 0.32768000000000000000e5 +2579 1 7 54 -0.65536000000000000000e5 +2579 1 22 53 0.32768000000000000000e5 +2579 1 24 39 0.32768000000000000000e5 +2579 2 3 33 0.32768000000000000000e5 +2579 2 18 32 -0.32768000000000000000e5 +2579 2 26 32 0.32768000000000000000e5 +2579 3 4 33 0.32768000000000000000e5 +2579 3 16 32 0.32768000000000000000e5 +2579 3 17 30 -0.65536000000000000000e5 +2579 4 17 17 0.65536000000000000000e5 +2580 1 2 49 -0.32768000000000000000e5 +2580 1 7 54 0.65536000000000000000e5 +2580 1 22 53 -0.32768000000000000000e5 +2580 1 23 54 -0.32768000000000000000e5 +2580 2 26 32 -0.32768000000000000000e5 +2580 3 3 32 0.32768000000000000000e5 +2580 3 6 35 -0.65536000000000000000e5 +2580 3 16 33 0.32768000000000000000e5 +2581 3 6 35 -0.32768000000000000000e5 +2581 3 16 34 0.32768000000000000000e5 +2582 1 7 54 -0.65536000000000000000e5 +2582 1 22 53 0.32768000000000000000e5 +2582 1 23 54 0.32768000000000000000e5 +2582 1 38 53 -0.32768000000000000000e5 +2582 1 47 50 0.65536000000000000000e5 +2582 1 47 54 -0.32768000000000000000e5 +2582 2 26 32 0.32768000000000000000e5 +2582 2 32 32 -0.65536000000000000000e5 +2582 3 6 35 0.65536000000000000000e5 +2582 3 16 35 0.32768000000000000000e5 +2582 3 32 33 -0.32768000000000000000e5 +2583 1 1 40 -0.16384000000000000000e5 +2583 1 23 38 0.16384000000000000000e5 +2583 3 17 17 0.32768000000000000000e5 +2584 1 1 40 0.32768000000000000000e5 +2584 1 2 49 0.32768000000000000000e5 +2584 1 6 37 0.32768000000000000000e5 +2584 1 8 39 -0.65536000000000000000e5 +2584 2 4 26 0.32768000000000000000e5 +2584 3 17 18 0.32768000000000000000e5 +2585 1 6 37 -0.32768000000000000000e5 +2585 1 24 39 0.32768000000000000000e5 +2585 3 17 19 0.32768000000000000000e5 +2586 3 1 30 -0.32768000000000000000e5 +2586 3 17 20 0.32768000000000000000e5 +2587 1 3 50 0.32768000000000000000e5 +2587 1 8 39 -0.32768000000000000000e5 +2587 3 17 21 0.32768000000000000000e5 +2588 1 3 50 -0.32768000000000000000e5 +2588 1 5 52 -0.65536000000000000000e5 +2588 1 8 39 0.32768000000000000000e5 +2588 1 9 40 0.32768000000000000000e5 +2588 1 10 41 -0.65536000000000000000e5 +2588 1 17 48 0.13107200000000000000e6 +2588 1 26 41 -0.32768000000000000000e5 +2588 1 28 43 -0.65536000000000000000e5 +2588 2 8 22 -0.65536000000000000000e5 +2588 3 17 22 0.32768000000000000000e5 +2588 4 4 16 0.65536000000000000000e5 +2588 4 6 18 0.32768000000000000000e5 +2588 4 7 19 0.65536000000000000000e5 +2589 3 2 31 -0.32768000000000000000e5 +2589 3 17 23 0.32768000000000000000e5 +2590 1 5 52 -0.32768000000000000000e5 +2590 1 10 41 -0.32768000000000000000e5 +2590 1 17 48 0.65536000000000000000e5 +2590 1 28 43 -0.32768000000000000000e5 +2590 2 8 22 -0.32768000000000000000e5 +2590 3 17 24 0.32768000000000000000e5 +2590 4 4 16 0.32768000000000000000e5 +2590 4 7 19 0.32768000000000000000e5 +2591 1 5 52 -0.16384000000000000000e5 +2591 1 11 42 0.16384000000000000000e5 +2591 2 12 26 -0.16384000000000000000e5 +2591 2 20 34 0.16384000000000000000e5 +2591 3 2 31 -0.16384000000000000000e5 +2591 3 14 27 -0.32768000000000000000e5 +2591 3 17 25 0.32768000000000000000e5 +2591 4 7 19 0.16384000000000000000e5 +2591 4 8 20 0.16384000000000000000e5 +2592 1 2 49 -0.32768000000000000000e5 +2592 1 7 54 0.65536000000000000000e5 +2592 1 23 38 -0.32768000000000000000e5 +2592 1 24 39 -0.32768000000000000000e5 +2592 2 3 33 -0.32768000000000000000e5 +2592 2 18 32 0.32768000000000000000e5 +2592 2 26 32 -0.32768000000000000000e5 +2592 3 4 33 -0.32768000000000000000e5 +2592 3 17 26 0.32768000000000000000e5 +2592 3 17 30 0.65536000000000000000e5 +2592 4 17 17 -0.65536000000000000000e5 +2593 3 3 32 -0.32768000000000000000e5 +2593 3 17 27 0.32768000000000000000e5 +2594 2 3 33 0.32768000000000000000e5 +2594 2 18 32 -0.32768000000000000000e5 +2594 3 3 32 0.32768000000000000000e5 +2594 3 4 33 0.32768000000000000000e5 +2594 3 17 28 0.32768000000000000000e5 +2594 3 17 30 -0.65536000000000000000e5 +2595 1 3 50 -0.32768000000000000000e5 +2595 1 7 54 0.32768000000000000000e5 +2595 3 17 29 0.32768000000000000000e5 +2596 1 5 52 0.32768000000000000000e5 +2596 1 17 48 -0.65536000000000000000e5 +2596 1 28 43 0.32768000000000000000e5 +2596 1 32 47 0.32768000000000000000e5 +2596 2 8 22 0.32768000000000000000e5 +2596 3 17 31 0.32768000000000000000e5 +2596 4 4 16 -0.32768000000000000000e5 +2596 4 7 19 -0.32768000000000000000e5 +2597 1 2 49 -0.32768000000000000000e5 +2597 1 7 54 0.65536000000000000000e5 +2597 1 22 53 -0.32768000000000000000e5 +2597 1 23 54 -0.32768000000000000000e5 +2597 2 26 32 -0.32768000000000000000e5 +2597 3 3 32 0.32768000000000000000e5 +2597 3 6 35 -0.65536000000000000000e5 +2597 3 17 32 0.32768000000000000000e5 +2598 1 23 54 0.32768000000000000000e5 +2598 1 24 39 -0.32768000000000000000e5 +2598 2 3 33 -0.32768000000000000000e5 +2598 2 18 32 0.32768000000000000000e5 +2598 3 3 32 -0.32768000000000000000e5 +2598 3 4 33 -0.32768000000000000000e5 +2598 3 17 30 0.65536000000000000000e5 +2598 3 17 33 0.32768000000000000000e5 +2599 3 17 34 0.32768000000000000000e5 +2599 3 20 33 -0.32768000000000000000e5 +2600 1 23 54 -0.32768000000000000000e5 +2600 1 38 53 0.32768000000000000000e5 +2600 3 17 35 0.32768000000000000000e5 +2601 1 6 37 -0.16384000000000000000e5 +2601 1 24 39 0.16384000000000000000e5 +2601 3 18 18 0.32768000000000000000e5 +2602 1 1 40 -0.32768000000000000000e5 +2602 1 2 49 -0.32768000000000000000e5 +2602 1 3 26 0.32768000000000000000e5 +2602 1 3 50 -0.65536000000000000000e5 +2602 1 5 52 -0.13107200000000000000e6 +2602 1 6 37 -0.32768000000000000000e5 +2602 1 8 39 0.13107200000000000000e6 +2602 1 10 25 0.65536000000000000000e5 +2602 1 10 41 -0.13107200000000000000e6 +2602 1 17 48 0.26214400000000000000e6 +2602 1 24 39 -0.32768000000000000000e5 +2602 1 26 41 -0.65536000000000000000e5 +2602 1 28 43 -0.13107200000000000000e6 +2602 2 3 33 -0.32768000000000000000e5 +2602 2 4 18 0.32768000000000000000e5 +2602 2 4 26 -0.32768000000000000000e5 +2602 2 8 22 -0.13107200000000000000e6 +2602 3 4 17 0.32768000000000000000e5 +2602 3 5 18 0.32768000000000000000e5 +2602 3 6 19 0.65536000000000000000e5 +2602 3 8 21 -0.13107200000000000000e6 +2602 3 18 19 0.32768000000000000000e5 +2602 4 3 15 0.65536000000000000000e5 +2602 4 4 16 0.13107200000000000000e6 +2602 4 6 18 0.65536000000000000000e5 +2602 4 7 19 0.13107200000000000000e6 +2603 1 3 50 0.32768000000000000000e5 +2603 1 8 39 -0.32768000000000000000e5 +2603 3 18 20 0.32768000000000000000e5 +2604 1 3 50 -0.32768000000000000000e5 +2604 1 5 52 -0.65536000000000000000e5 +2604 1 8 39 0.32768000000000000000e5 +2604 1 9 40 0.32768000000000000000e5 +2604 1 10 41 -0.65536000000000000000e5 +2604 1 17 48 0.13107200000000000000e6 +2604 1 26 41 -0.32768000000000000000e5 +2604 1 28 43 -0.65536000000000000000e5 +2604 2 8 22 -0.65536000000000000000e5 +2604 3 18 21 0.32768000000000000000e5 +2604 4 4 16 0.65536000000000000000e5 +2604 4 6 18 0.32768000000000000000e5 +2604 4 7 19 0.65536000000000000000e5 +2605 1 9 40 -0.32768000000000000000e5 +2605 1 26 41 0.32768000000000000000e5 +2605 3 18 22 0.32768000000000000000e5 +2606 1 5 52 -0.32768000000000000000e5 +2606 1 10 41 -0.32768000000000000000e5 +2606 1 17 48 0.65536000000000000000e5 +2606 1 28 43 -0.32768000000000000000e5 +2606 2 8 22 -0.32768000000000000000e5 +2606 3 18 23 0.32768000000000000000e5 +2606 4 4 16 0.32768000000000000000e5 +2606 4 7 19 0.32768000000000000000e5 +2607 1 10 41 0.32768000000000000000e5 +2607 1 11 42 0.32768000000000000000e5 +2607 1 17 48 -0.65536000000000000000e5 +2607 1 28 43 0.32768000000000000000e5 +2607 2 8 22 0.32768000000000000000e5 +2607 3 14 27 -0.65536000000000000000e5 +2607 3 18 24 0.32768000000000000000e5 +2607 4 4 16 -0.32768000000000000000e5 +2608 3 14 27 -0.32768000000000000000e5 +2608 3 18 25 0.32768000000000000000e5 +2609 3 3 32 -0.32768000000000000000e5 +2609 3 18 26 0.32768000000000000000e5 +2610 2 3 33 0.32768000000000000000e5 +2610 2 18 32 -0.32768000000000000000e5 +2610 3 3 32 0.32768000000000000000e5 +2610 3 4 33 0.32768000000000000000e5 +2610 3 17 30 -0.65536000000000000000e5 +2610 3 18 27 0.32768000000000000000e5 +2611 3 4 33 -0.32768000000000000000e5 +2611 3 18 28 0.32768000000000000000e5 +2612 3 17 30 -0.32768000000000000000e5 +2612 3 18 29 0.32768000000000000000e5 +2613 3 18 30 0.32768000000000000000e5 +2613 3 22 27 -0.32768000000000000000e5 +2614 1 23 54 0.32768000000000000000e5 +2614 1 24 39 -0.32768000000000000000e5 +2614 2 3 33 -0.32768000000000000000e5 +2614 2 18 32 0.32768000000000000000e5 +2614 3 3 32 -0.32768000000000000000e5 +2614 3 4 33 -0.32768000000000000000e5 +2614 3 17 30 0.65536000000000000000e5 +2614 3 18 32 0.32768000000000000000e5 +2615 3 18 33 0.32768000000000000000e5 +2615 3 19 32 -0.32768000000000000000e5 +2616 1 24 55 0.32768000000000000000e5 +2616 1 26 41 -0.32768000000000000000e5 +2616 3 18 34 0.32768000000000000000e5 +2616 3 22 27 0.32768000000000000000e5 +2617 1 1 48 0.32768000000000000000e5 +2617 1 2 49 0.65536000000000000000e5 +2617 1 3 50 0.65536000000000000000e5 +2617 1 11 42 -0.13107200000000000000e6 +2617 1 12 43 -0.26214400000000000000e6 +2617 1 17 48 0.26214400000000000000e6 +2617 1 23 38 0.32768000000000000000e5 +2617 1 24 39 0.32768000000000000000e5 +2617 1 47 54 0.32768000000000000000e5 +2617 2 2 32 0.32768000000000000000e5 +2617 2 3 33 0.32768000000000000000e5 +2617 2 8 22 -0.13107200000000000000e6 +2617 2 12 26 0.13107200000000000000e6 +2617 2 16 30 0.65536000000000000000e5 +2617 3 2 31 0.13107200000000000000e6 +2617 3 4 33 0.32768000000000000000e5 +2617 3 14 27 0.26214400000000000000e6 +2617 3 18 35 0.32768000000000000000e5 +2617 3 19 32 0.32768000000000000000e5 +2617 3 32 33 0.32768000000000000000e5 +2617 4 4 16 0.13107200000000000000e6 +2618 1 1 40 0.16384000000000000000e5 +2618 1 1 48 -0.16384000000000000000e5 +2618 1 2 49 -0.16384000000000000000e5 +2618 1 3 26 -0.16384000000000000000e5 +2618 1 5 52 0.65536000000000000000e5 +2618 1 6 37 0.32768000000000000000e5 +2618 1 8 39 -0.65536000000000000000e5 +2618 1 9 40 -0.32768000000000000000e5 +2618 1 10 25 -0.32768000000000000000e5 +2618 1 10 41 0.65536000000000000000e5 +2618 1 11 42 0.65536000000000000000e5 +2618 1 12 43 0.13107200000000000000e6 +2618 1 17 48 -0.26214400000000000000e6 +2618 1 23 38 -0.16384000000000000000e5 +2618 1 25 40 0.16384000000000000000e5 +2618 1 26 41 0.32768000000000000000e5 +2618 1 28 43 0.65536000000000000000e5 +2618 2 2 32 -0.16384000000000000000e5 +2618 2 4 18 -0.16384000000000000000e5 +2618 2 4 26 0.16384000000000000000e5 +2618 2 5 27 0.16384000000000000000e5 +2618 2 8 22 0.13107200000000000000e6 +2618 2 12 26 -0.65536000000000000000e5 +2618 2 16 30 -0.32768000000000000000e5 +2618 3 2 31 -0.65536000000000000000e5 +2618 3 4 17 -0.16384000000000000000e5 +2618 3 5 18 -0.16384000000000000000e5 +2618 3 6 19 -0.32768000000000000000e5 +2618 3 8 21 0.65536000000000000000e5 +2618 3 14 27 -0.13107200000000000000e6 +2618 3 19 19 0.32768000000000000000e5 +2618 4 3 15 -0.32768000000000000000e5 +2618 4 4 16 -0.13107200000000000000e6 +2618 4 6 18 -0.32768000000000000000e5 +2618 4 7 19 -0.65536000000000000000e5 +2619 1 3 50 -0.32768000000000000000e5 +2619 1 5 52 -0.65536000000000000000e5 +2619 1 8 39 0.32768000000000000000e5 +2619 1 9 40 0.32768000000000000000e5 +2619 1 10 41 -0.65536000000000000000e5 +2619 1 17 48 0.13107200000000000000e6 +2619 1 26 41 -0.32768000000000000000e5 +2619 1 28 43 -0.65536000000000000000e5 +2619 2 8 22 -0.65536000000000000000e5 +2619 3 19 20 0.32768000000000000000e5 +2619 4 4 16 0.65536000000000000000e5 +2619 4 6 18 0.32768000000000000000e5 +2619 4 7 19 0.65536000000000000000e5 +2620 1 9 40 -0.32768000000000000000e5 +2620 1 26 41 0.32768000000000000000e5 +2620 3 19 21 0.32768000000000000000e5 +2621 1 1 48 0.16384000000000000000e5 +2621 1 2 49 0.16384000000000000000e5 +2621 1 3 50 0.32768000000000000000e5 +2621 1 11 42 -0.65536000000000000000e5 +2621 1 12 43 -0.13107200000000000000e6 +2621 1 17 48 0.13107200000000000000e6 +2621 1 23 38 0.16384000000000000000e5 +2621 1 26 29 -0.32768000000000000000e5 +2621 1 26 41 -0.32768000000000000000e5 +2621 1 28 43 0.65536000000000000000e5 +2621 2 2 32 0.16384000000000000000e5 +2621 2 4 34 -0.32768000000000000000e5 +2621 2 8 22 -0.65536000000000000000e5 +2621 2 12 26 0.65536000000000000000e5 +2621 2 16 30 0.32768000000000000000e5 +2621 3 2 31 0.65536000000000000000e5 +2621 3 14 27 0.13107200000000000000e6 +2621 3 19 22 0.32768000000000000000e5 +2621 4 4 16 0.65536000000000000000e5 +2622 1 10 41 0.32768000000000000000e5 +2622 1 11 42 0.32768000000000000000e5 +2622 1 17 48 -0.65536000000000000000e5 +2622 1 28 43 0.32768000000000000000e5 +2622 2 8 22 0.32768000000000000000e5 +2622 3 14 27 -0.65536000000000000000e5 +2622 3 19 23 0.32768000000000000000e5 +2622 4 4 16 -0.32768000000000000000e5 +2623 1 5 52 0.32768000000000000000e5 +2623 1 11 42 -0.32768000000000000000e5 +2623 3 19 24 0.32768000000000000000e5 +2624 1 14 45 0.65536000000000000000e5 +2624 1 17 48 -0.32768000000000000000e5 +2624 1 18 25 -0.32768000000000000000e5 +2624 1 18 49 -0.32768000000000000000e5 +2624 2 24 30 -0.32768000000000000000e5 +2624 3 14 19 0.32768000000000000000e5 +2624 3 15 28 -0.65536000000000000000e5 +2624 3 19 25 0.32768000000000000000e5 +2625 2 3 33 0.32768000000000000000e5 +2625 2 18 32 -0.32768000000000000000e5 +2625 3 3 32 0.32768000000000000000e5 +2625 3 4 33 0.32768000000000000000e5 +2625 3 17 30 -0.65536000000000000000e5 +2625 3 19 26 0.32768000000000000000e5 +2626 3 4 33 -0.32768000000000000000e5 +2626 3 19 27 0.32768000000000000000e5 +2627 1 6 53 0.32768000000000000000e5 +2627 1 25 40 -0.32768000000000000000e5 +2627 3 19 28 0.32768000000000000000e5 +2628 3 19 29 0.32768000000000000000e5 +2628 3 22 27 -0.32768000000000000000e5 +2629 3 5 34 -0.32768000000000000000e5 +2629 3 19 30 0.32768000000000000000e5 +2630 1 5 52 -0.32768000000000000000e5 +2630 1 33 48 0.32768000000000000000e5 +2630 3 19 31 0.32768000000000000000e5 +2631 1 6 53 -0.32768000000000000000e5 +2631 1 25 56 0.32768000000000000000e5 +2631 3 19 33 0.32768000000000000000e5 +2631 3 28 33 0.32768000000000000000e5 +2632 1 24 55 -0.32768000000000000000e5 +2632 1 26 41 0.32768000000000000000e5 +2632 2 4 34 0.32768000000000000000e5 +2632 2 21 35 -0.32768000000000000000e5 +2632 3 5 34 0.32768000000000000000e5 +2632 3 17 30 0.32768000000000000000e5 +2632 3 18 31 -0.65536000000000000000e5 +2632 3 19 34 0.32768000000000000000e5 +2632 3 20 33 0.32768000000000000000e5 +2632 3 21 34 -0.65536000000000000000e5 +2633 3 19 35 0.32768000000000000000e5 +2633 3 28 33 -0.32768000000000000000e5 +2634 1 2 33 0.16384000000000000000e5 +2634 1 3 34 -0.32768000000000000000e5 +2634 1 5 52 0.16384000000000000000e5 +2634 1 10 41 0.16384000000000000000e5 +2634 1 11 42 -0.16384000000000000000e5 +2634 1 12 43 -0.32768000000000000000e5 +2634 1 16 47 0.32768000000000000000e5 +2634 1 28 43 0.16384000000000000000e5 +2634 2 7 21 0.16384000000000000000e5 +2634 2 10 32 -0.16384000000000000000e5 +2634 2 12 26 0.16384000000000000000e5 +2634 3 2 31 0.16384000000000000000e5 +2634 3 7 20 0.16384000000000000000e5 +2634 3 8 21 0.16384000000000000000e5 +2634 3 14 27 0.32768000000000000000e5 +2634 3 20 20 0.32768000000000000000e5 +2634 4 7 19 -0.16384000000000000000e5 +2635 3 2 31 -0.32768000000000000000e5 +2635 3 20 21 0.32768000000000000000e5 +2636 1 5 52 -0.32768000000000000000e5 +2636 1 10 41 -0.32768000000000000000e5 +2636 1 17 48 0.65536000000000000000e5 +2636 1 28 43 -0.32768000000000000000e5 +2636 2 8 22 -0.32768000000000000000e5 +2636 3 20 22 0.32768000000000000000e5 +2636 4 4 16 0.32768000000000000000e5 +2636 4 7 19 0.32768000000000000000e5 +2637 3 13 26 -0.32768000000000000000e5 +2637 3 20 23 0.32768000000000000000e5 +2638 1 5 52 -0.16384000000000000000e5 +2638 1 11 42 0.16384000000000000000e5 +2638 2 12 26 -0.16384000000000000000e5 +2638 2 20 34 0.16384000000000000000e5 +2638 3 2 31 -0.16384000000000000000e5 +2638 3 14 27 -0.32768000000000000000e5 +2638 3 20 24 0.32768000000000000000e5 +2638 4 7 19 0.16384000000000000000e5 +2638 4 8 20 0.16384000000000000000e5 +2639 1 13 44 -0.32768000000000000000e5 +2639 1 34 41 0.32768000000000000000e5 +2639 3 20 25 0.32768000000000000000e5 +2640 3 16 29 -0.32768000000000000000e5 +2640 3 20 26 0.32768000000000000000e5 +2641 1 3 50 -0.32768000000000000000e5 +2641 1 7 54 0.32768000000000000000e5 +2641 3 20 27 0.32768000000000000000e5 +2642 3 17 30 -0.32768000000000000000e5 +2642 3 20 28 0.32768000000000000000e5 +2643 1 11 42 -0.32768000000000000000e5 +2643 1 12 43 -0.65536000000000000000e5 +2643 1 17 48 0.65536000000000000000e5 +2643 1 37 44 0.32768000000000000000e5 +2643 2 8 22 -0.32768000000000000000e5 +2643 2 12 26 0.32768000000000000000e5 +2643 3 2 31 0.32768000000000000000e5 +2643 3 14 27 0.65536000000000000000e5 +2643 3 20 29 0.32768000000000000000e5 +2643 4 4 16 0.32768000000000000000e5 +2644 1 5 52 0.32768000000000000000e5 +2644 1 17 48 -0.65536000000000000000e5 +2644 1 28 43 0.32768000000000000000e5 +2644 1 32 47 0.32768000000000000000e5 +2644 2 8 22 0.32768000000000000000e5 +2644 3 20 30 0.32768000000000000000e5 +2644 4 4 16 -0.32768000000000000000e5 +2644 4 7 19 -0.32768000000000000000e5 +2645 1 5 52 0.16384000000000000000e5 +2645 1 11 42 -0.16384000000000000000e5 +2645 1 12 43 -0.32768000000000000000e5 +2645 1 28 43 0.16384000000000000000e5 +2645 1 32 47 0.16384000000000000000e5 +2645 1 37 44 0.16384000000000000000e5 +2645 2 12 26 0.16384000000000000000e5 +2645 3 2 31 0.16384000000000000000e5 +2645 3 14 27 0.32768000000000000000e5 +2645 3 18 31 -0.16384000000000000000e5 +2645 3 20 31 0.32768000000000000000e5 +2645 4 7 19 -0.16384000000000000000e5 +2645 4 8 20 -0.16384000000000000000e5 +2646 3 6 35 -0.32768000000000000000e5 +2646 3 20 32 0.32768000000000000000e5 +2647 1 32 47 -0.32768000000000000000e5 +2647 1 37 52 0.32768000000000000000e5 +2647 3 20 34 0.32768000000000000000e5 +2648 1 1 48 0.16384000000000000000e5 +2648 1 2 49 0.16384000000000000000e5 +2648 1 3 50 0.32768000000000000000e5 +2648 1 11 42 -0.65536000000000000000e5 +2648 1 12 43 -0.13107200000000000000e6 +2648 1 17 48 0.13107200000000000000e6 +2648 1 23 38 0.16384000000000000000e5 +2648 1 47 50 0.32768000000000000000e5 +2648 2 2 32 0.16384000000000000000e5 +2648 2 8 22 -0.65536000000000000000e5 +2648 2 12 26 0.65536000000000000000e5 +2648 2 16 30 0.32768000000000000000e5 +2648 3 2 31 0.65536000000000000000e5 +2648 3 14 27 0.13107200000000000000e6 +2648 3 17 30 0.32768000000000000000e5 +2648 3 20 33 0.32768000000000000000e5 +2648 3 20 35 0.32768000000000000000e5 +2648 4 4 16 0.65536000000000000000e5 +2649 1 5 52 -0.16384000000000000000e5 +2649 1 10 41 -0.16384000000000000000e5 +2649 1 17 48 0.32768000000000000000e5 +2649 1 28 43 -0.16384000000000000000e5 +2649 2 8 22 -0.16384000000000000000e5 +2649 3 21 21 0.32768000000000000000e5 +2649 4 4 16 0.16384000000000000000e5 +2649 4 7 19 0.16384000000000000000e5 +2650 1 10 41 0.32768000000000000000e5 +2650 1 11 42 0.32768000000000000000e5 +2650 1 17 48 -0.65536000000000000000e5 +2650 1 28 43 0.32768000000000000000e5 +2650 2 8 22 0.32768000000000000000e5 +2650 3 14 27 -0.65536000000000000000e5 +2650 3 21 22 0.32768000000000000000e5 +2650 4 4 16 -0.32768000000000000000e5 +2651 1 5 52 -0.16384000000000000000e5 +2651 1 11 42 0.16384000000000000000e5 +2651 2 12 26 -0.16384000000000000000e5 +2651 2 20 34 0.16384000000000000000e5 +2651 3 2 31 -0.16384000000000000000e5 +2651 3 14 27 -0.32768000000000000000e5 +2651 3 21 23 0.32768000000000000000e5 +2651 4 7 19 0.16384000000000000000e5 +2651 4 8 20 0.16384000000000000000e5 +2652 3 14 27 -0.32768000000000000000e5 +2652 3 21 24 0.32768000000000000000e5 +2653 1 13 52 0.32768000000000000000e5 +2653 1 28 35 -0.32768000000000000000e5 +2653 3 21 25 0.32768000000000000000e5 +2654 1 3 50 -0.32768000000000000000e5 +2654 1 7 54 0.32768000000000000000e5 +2654 3 21 26 0.32768000000000000000e5 +2655 3 17 30 -0.32768000000000000000e5 +2655 3 21 27 0.32768000000000000000e5 +2656 3 21 28 0.32768000000000000000e5 +2656 3 22 27 -0.32768000000000000000e5 +2657 1 5 52 0.32768000000000000000e5 +2657 1 17 48 -0.65536000000000000000e5 +2657 1 28 43 0.32768000000000000000e5 +2657 1 32 47 0.32768000000000000000e5 +2657 2 8 22 0.32768000000000000000e5 +2657 3 21 29 0.32768000000000000000e5 +2657 4 4 16 -0.32768000000000000000e5 +2657 4 7 19 -0.32768000000000000000e5 +2658 3 18 31 -0.32768000000000000000e5 +2658 3 21 30 0.32768000000000000000e5 +2659 3 21 31 0.32768000000000000000e5 +2659 3 24 29 -0.32768000000000000000e5 +2660 3 20 33 -0.32768000000000000000e5 +2660 3 21 32 0.32768000000000000000e5 +2661 1 24 55 0.32768000000000000000e5 +2661 1 26 41 -0.32768000000000000000e5 +2661 3 21 33 0.32768000000000000000e5 +2661 3 22 27 0.32768000000000000000e5 +2662 1 1 48 -0.16384000000000000000e5 +2662 1 2 49 -0.16384000000000000000e5 +2662 1 3 50 -0.32768000000000000000e5 +2662 1 11 42 0.65536000000000000000e5 +2662 1 12 43 0.13107200000000000000e6 +2662 1 17 48 -0.13107200000000000000e6 +2662 1 23 38 -0.16384000000000000000e5 +2662 1 47 50 -0.32768000000000000000e5 +2662 2 2 32 -0.16384000000000000000e5 +2662 2 8 22 0.65536000000000000000e5 +2662 2 12 26 -0.65536000000000000000e5 +2662 2 16 30 -0.32768000000000000000e5 +2662 2 21 35 0.32768000000000000000e5 +2662 2 29 35 -0.32768000000000000000e5 +2662 3 2 31 -0.65536000000000000000e5 +2662 3 14 27 -0.13107200000000000000e6 +2662 3 17 30 -0.32768000000000000000e5 +2662 3 20 33 -0.32768000000000000000e5 +2662 3 21 35 0.32768000000000000000e5 +2662 3 22 35 0.32768000000000000000e5 +2662 3 29 34 -0.65536000000000000000e5 +2662 4 4 16 -0.65536000000000000000e5 +2663 1 5 52 0.16384000000000000000e5 +2663 1 11 42 -0.16384000000000000000e5 +2663 3 22 22 0.32768000000000000000e5 +2664 3 14 27 -0.32768000000000000000e5 +2664 3 22 23 0.32768000000000000000e5 +2665 1 14 45 0.65536000000000000000e5 +2665 1 17 48 -0.32768000000000000000e5 +2665 1 18 25 -0.32768000000000000000e5 +2665 1 18 49 -0.32768000000000000000e5 +2665 2 24 30 -0.32768000000000000000e5 +2665 3 14 19 0.32768000000000000000e5 +2665 3 15 28 -0.65536000000000000000e5 +2665 3 22 24 0.32768000000000000000e5 +2666 3 15 28 -0.32768000000000000000e5 +2666 3 22 25 0.32768000000000000000e5 +2667 3 17 30 -0.32768000000000000000e5 +2667 3 22 26 0.32768000000000000000e5 +2668 3 5 34 -0.32768000000000000000e5 +2668 3 22 28 0.32768000000000000000e5 +2669 3 18 31 -0.32768000000000000000e5 +2669 3 22 29 0.32768000000000000000e5 +2670 1 5 52 -0.32768000000000000000e5 +2670 1 33 48 0.32768000000000000000e5 +2670 3 22 30 0.32768000000000000000e5 +2671 1 14 45 -0.65536000000000000000e5 +2671 1 17 48 0.32768000000000000000e5 +2671 1 18 49 0.32768000000000000000e5 +2671 1 34 49 0.32768000000000000000e5 +2671 2 24 30 0.32768000000000000000e5 +2671 3 15 28 0.65536000000000000000e5 +2671 3 22 31 0.32768000000000000000e5 +2672 1 24 55 0.32768000000000000000e5 +2672 1 26 41 -0.32768000000000000000e5 +2672 3 22 27 0.32768000000000000000e5 +2672 3 22 32 0.32768000000000000000e5 +2673 1 24 55 -0.32768000000000000000e5 +2673 1 26 41 0.32768000000000000000e5 +2673 2 4 34 0.32768000000000000000e5 +2673 2 21 35 -0.32768000000000000000e5 +2673 3 5 34 0.32768000000000000000e5 +2673 3 17 30 0.32768000000000000000e5 +2673 3 18 31 -0.65536000000000000000e5 +2673 3 20 33 0.32768000000000000000e5 +2673 3 21 34 -0.65536000000000000000e5 +2673 3 22 33 0.32768000000000000000e5 +2674 1 33 48 -0.32768000000000000000e5 +2674 1 43 50 0.32768000000000000000e5 +2674 3 22 34 0.32768000000000000000e5 +2675 1 13 44 -0.16384000000000000000e5 +2675 1 34 41 0.16384000000000000000e5 +2675 3 23 23 0.32768000000000000000e5 +2676 1 13 52 0.32768000000000000000e5 +2676 1 28 35 -0.32768000000000000000e5 +2676 3 23 24 0.32768000000000000000e5 +2677 1 19 42 -0.32768000000000000000e5 +2677 1 19 50 0.32768000000000000000e5 +2677 3 23 25 0.32768000000000000000e5 +2678 1 11 42 -0.32768000000000000000e5 +2678 1 12 43 -0.65536000000000000000e5 +2678 1 17 48 0.65536000000000000000e5 +2678 1 37 44 0.32768000000000000000e5 +2678 2 8 22 -0.32768000000000000000e5 +2678 2 12 26 0.32768000000000000000e5 +2678 3 2 31 0.32768000000000000000e5 +2678 3 14 27 0.65536000000000000000e5 +2678 3 23 26 0.32768000000000000000e5 +2678 4 4 16 0.32768000000000000000e5 +2679 1 5 52 0.32768000000000000000e5 +2679 1 17 48 -0.65536000000000000000e5 +2679 1 28 43 0.32768000000000000000e5 +2679 1 32 47 0.32768000000000000000e5 +2679 2 8 22 0.32768000000000000000e5 +2679 3 23 27 0.32768000000000000000e5 +2679 4 4 16 -0.32768000000000000000e5 +2679 4 7 19 -0.32768000000000000000e5 +2680 3 18 31 -0.32768000000000000000e5 +2680 3 23 28 0.32768000000000000000e5 +2681 1 5 52 0.16384000000000000000e5 +2681 1 11 42 -0.16384000000000000000e5 +2681 1 12 43 -0.32768000000000000000e5 +2681 1 28 43 0.16384000000000000000e5 +2681 1 32 47 0.16384000000000000000e5 +2681 1 37 44 0.16384000000000000000e5 +2681 2 12 26 0.16384000000000000000e5 +2681 3 2 31 0.16384000000000000000e5 +2681 3 14 27 0.32768000000000000000e5 +2681 3 18 31 -0.16384000000000000000e5 +2681 3 23 29 0.32768000000000000000e5 +2681 4 7 19 -0.16384000000000000000e5 +2681 4 8 20 -0.16384000000000000000e5 +2682 3 23 30 0.32768000000000000000e5 +2682 3 24 29 -0.32768000000000000000e5 +2683 1 13 52 -0.32768000000000000000e5 +2683 1 16 55 0.32768000000000000000e5 +2683 3 23 31 0.32768000000000000000e5 +2684 1 32 47 -0.32768000000000000000e5 +2684 1 37 52 0.32768000000000000000e5 +2684 3 23 32 0.32768000000000000000e5 +2685 3 21 34 -0.32768000000000000000e5 +2685 3 23 33 0.32768000000000000000e5 +2686 1 32 47 -0.16384000000000000000e5 +2686 1 33 48 -0.16384000000000000000e5 +2686 1 37 52 0.16384000000000000000e5 +2686 1 43 50 0.16384000000000000000e5 +2686 3 21 34 -0.16384000000000000000e5 +2686 3 23 34 0.32768000000000000000e5 +2686 4 16 20 -0.16384000000000000000e5 +2687 3 23 35 0.32768000000000000000e5 +2687 3 29 34 -0.32768000000000000000e5 +2688 3 15 28 -0.16384000000000000000e5 +2688 3 24 24 0.32768000000000000000e5 +2689 1 5 52 0.32768000000000000000e5 +2689 1 17 48 -0.65536000000000000000e5 +2689 1 28 43 0.32768000000000000000e5 +2689 1 32 47 0.32768000000000000000e5 +2689 2 8 22 0.32768000000000000000e5 +2689 3 24 26 0.32768000000000000000e5 +2689 4 4 16 -0.32768000000000000000e5 +2689 4 7 19 -0.32768000000000000000e5 +2690 3 18 31 -0.32768000000000000000e5 +2690 3 24 27 0.32768000000000000000e5 +2691 1 5 52 -0.32768000000000000000e5 +2691 1 33 48 0.32768000000000000000e5 +2691 3 24 28 0.32768000000000000000e5 +2692 1 14 45 -0.65536000000000000000e5 +2692 1 17 48 0.32768000000000000000e5 +2692 1 18 49 0.32768000000000000000e5 +2692 1 34 49 0.32768000000000000000e5 +2692 2 24 30 0.32768000000000000000e5 +2692 3 15 28 0.65536000000000000000e5 +2692 3 24 30 0.32768000000000000000e5 +2693 1 14 45 -0.32768000000000000000e5 +2693 1 35 50 0.32768000000000000000e5 +2693 3 15 28 0.32768000000000000000e5 +2693 3 24 31 0.32768000000000000000e5 +2694 3 21 34 -0.32768000000000000000e5 +2694 3 24 32 0.32768000000000000000e5 +2695 1 33 48 -0.32768000000000000000e5 +2695 1 43 50 0.32768000000000000000e5 +2695 3 24 33 0.32768000000000000000e5 +2696 1 34 49 -0.32768000000000000000e5 +2696 1 44 51 0.32768000000000000000e5 +2696 3 24 34 0.32768000000000000000e5 +2697 1 43 50 -0.32768000000000000000e5 +2697 1 50 51 0.32768000000000000000e5 +2697 3 24 35 0.32768000000000000000e5 +2698 1 17 32 -0.81920000000000000000e4 +2698 1 18 33 -0.81920000000000000000e4 +2698 1 19 50 0.81920000000000000000e4 +2698 1 20 51 0.81920000000000000000e4 +2698 2 14 24 -0.81920000000000000000e4 +2698 2 25 31 0.81920000000000000000e4 +2698 3 12 25 -0.81920000000000000000e4 +2698 3 15 24 0.16384000000000000000e5 +2698 3 24 25 -0.81920000000000000000e4 +2698 3 25 25 0.32768000000000000000e5 +2699 1 5 52 0.16384000000000000000e5 +2699 1 11 42 -0.16384000000000000000e5 +2699 1 12 43 -0.32768000000000000000e5 +2699 1 28 43 0.16384000000000000000e5 +2699 1 32 47 0.16384000000000000000e5 +2699 1 37 44 0.16384000000000000000e5 +2699 2 12 26 0.16384000000000000000e5 +2699 3 2 31 0.16384000000000000000e5 +2699 3 14 27 0.32768000000000000000e5 +2699 3 18 31 -0.16384000000000000000e5 +2699 3 25 26 0.32768000000000000000e5 +2699 4 7 19 -0.16384000000000000000e5 +2699 4 8 20 -0.16384000000000000000e5 +2700 3 24 29 -0.32768000000000000000e5 +2700 3 25 27 0.32768000000000000000e5 +2701 1 14 45 -0.65536000000000000000e5 +2701 1 17 48 0.32768000000000000000e5 +2701 1 18 49 0.32768000000000000000e5 +2701 1 34 49 0.32768000000000000000e5 +2701 2 24 30 0.32768000000000000000e5 +2701 3 15 28 0.65536000000000000000e5 +2701 3 25 28 0.32768000000000000000e5 +2702 1 13 52 -0.32768000000000000000e5 +2702 1 16 55 0.32768000000000000000e5 +2702 3 25 29 0.32768000000000000000e5 +2703 1 14 45 -0.32768000000000000000e5 +2703 1 35 50 0.32768000000000000000e5 +2703 3 15 28 0.32768000000000000000e5 +2703 3 25 30 0.32768000000000000000e5 +2704 1 16 55 0.16384000000000000000e5 +2704 1 29 36 -0.32768000000000000000e5 +2704 1 35 50 0.16384000000000000000e5 +2704 1 43 46 0.16384000000000000000e5 +2704 2 31 31 0.32768000000000000000e5 +2704 3 24 25 0.32768000000000000000e5 +2704 3 25 31 0.32768000000000000000e5 +2705 1 32 47 -0.16384000000000000000e5 +2705 1 33 48 -0.16384000000000000000e5 +2705 1 37 52 0.16384000000000000000e5 +2705 1 43 50 0.16384000000000000000e5 +2705 3 21 34 -0.16384000000000000000e5 +2705 3 25 32 0.32768000000000000000e5 +2705 4 16 20 -0.16384000000000000000e5 +2706 1 34 49 -0.32768000000000000000e5 +2706 1 44 51 0.32768000000000000000e5 +2706 3 25 33 0.32768000000000000000e5 +2707 1 44 51 -0.32768000000000000000e5 +2707 1 46 53 0.32768000000000000000e5 +2707 3 25 35 0.32768000000000000000e5 +2708 1 2 49 0.16384000000000000000e5 +2708 1 7 54 -0.32768000000000000000e5 +2708 1 22 53 0.16384000000000000000e5 +2708 1 24 39 0.16384000000000000000e5 +2708 2 3 33 0.16384000000000000000e5 +2708 2 18 32 -0.16384000000000000000e5 +2708 2 26 32 0.16384000000000000000e5 +2708 3 4 33 0.16384000000000000000e5 +2708 3 17 30 -0.32768000000000000000e5 +2708 3 26 26 0.32768000000000000000e5 +2708 4 17 17 0.32768000000000000000e5 +2709 1 2 49 -0.32768000000000000000e5 +2709 1 7 54 0.65536000000000000000e5 +2709 1 22 53 -0.32768000000000000000e5 +2709 1 23 54 -0.32768000000000000000e5 +2709 2 26 32 -0.32768000000000000000e5 +2709 3 3 32 0.32768000000000000000e5 +2709 3 6 35 -0.65536000000000000000e5 +2709 3 26 27 0.32768000000000000000e5 +2710 1 23 54 0.32768000000000000000e5 +2710 1 24 39 -0.32768000000000000000e5 +2710 2 3 33 -0.32768000000000000000e5 +2710 2 18 32 0.32768000000000000000e5 +2710 3 3 32 -0.32768000000000000000e5 +2710 3 4 33 -0.32768000000000000000e5 +2710 3 17 30 0.65536000000000000000e5 +2710 3 26 28 0.32768000000000000000e5 +2711 3 6 35 -0.32768000000000000000e5 +2711 3 26 29 0.32768000000000000000e5 +2712 3 20 33 -0.32768000000000000000e5 +2712 3 26 30 0.32768000000000000000e5 +2713 1 32 47 -0.32768000000000000000e5 +2713 1 37 52 0.32768000000000000000e5 +2713 3 26 31 0.32768000000000000000e5 +2714 1 7 54 -0.65536000000000000000e5 +2714 1 22 53 0.32768000000000000000e5 +2714 1 23 54 0.32768000000000000000e5 +2714 1 38 53 -0.32768000000000000000e5 +2714 1 47 50 0.65536000000000000000e5 +2714 1 47 54 -0.32768000000000000000e5 +2714 2 26 32 0.32768000000000000000e5 +2714 2 32 32 -0.65536000000000000000e5 +2714 3 6 35 0.65536000000000000000e5 +2714 3 26 32 0.32768000000000000000e5 +2714 3 32 33 -0.32768000000000000000e5 +2715 1 23 54 -0.32768000000000000000e5 +2715 1 38 53 0.32768000000000000000e5 +2715 3 26 33 0.32768000000000000000e5 +2716 1 1 48 0.16384000000000000000e5 +2716 1 2 49 0.16384000000000000000e5 +2716 1 3 50 0.32768000000000000000e5 +2716 1 11 42 -0.65536000000000000000e5 +2716 1 12 43 -0.13107200000000000000e6 +2716 1 17 48 0.13107200000000000000e6 +2716 1 23 38 0.16384000000000000000e5 +2716 1 47 50 0.32768000000000000000e5 +2716 2 2 32 0.16384000000000000000e5 +2716 2 8 22 -0.65536000000000000000e5 +2716 2 12 26 0.65536000000000000000e5 +2716 2 16 30 0.32768000000000000000e5 +2716 3 2 31 0.65536000000000000000e5 +2716 3 14 27 0.13107200000000000000e6 +2716 3 17 30 0.32768000000000000000e5 +2716 3 20 33 0.32768000000000000000e5 +2716 3 26 34 0.32768000000000000000e5 +2716 4 4 16 0.65536000000000000000e5 +2717 1 37 56 0.32768000000000000000e5 +2717 1 38 53 -0.32768000000000000000e5 +2717 3 26 35 0.32768000000000000000e5 +2718 1 23 54 0.16384000000000000000e5 +2718 1 24 39 -0.16384000000000000000e5 +2718 2 3 33 -0.16384000000000000000e5 +2718 2 18 32 0.16384000000000000000e5 +2718 3 3 32 -0.16384000000000000000e5 +2718 3 4 33 -0.16384000000000000000e5 +2718 3 17 30 0.32768000000000000000e5 +2718 3 27 27 0.32768000000000000000e5 +2719 3 19 32 -0.32768000000000000000e5 +2719 3 27 28 0.32768000000000000000e5 +2720 3 20 33 -0.32768000000000000000e5 +2720 3 27 29 0.32768000000000000000e5 +2721 1 24 55 0.32768000000000000000e5 +2721 1 26 41 -0.32768000000000000000e5 +2721 3 22 27 0.32768000000000000000e5 +2721 3 27 30 0.32768000000000000000e5 +2722 3 21 34 -0.32768000000000000000e5 +2722 3 27 31 0.32768000000000000000e5 +2723 1 23 54 -0.32768000000000000000e5 +2723 1 38 53 0.32768000000000000000e5 +2723 3 27 32 0.32768000000000000000e5 +2724 1 1 48 0.32768000000000000000e5 +2724 1 2 49 0.65536000000000000000e5 +2724 1 3 50 0.65536000000000000000e5 +2724 1 11 42 -0.13107200000000000000e6 +2724 1 12 43 -0.26214400000000000000e6 +2724 1 17 48 0.26214400000000000000e6 +2724 1 23 38 0.32768000000000000000e5 +2724 1 24 39 0.32768000000000000000e5 +2724 1 47 54 0.32768000000000000000e5 +2724 2 2 32 0.32768000000000000000e5 +2724 2 3 33 0.32768000000000000000e5 +2724 2 8 22 -0.13107200000000000000e6 +2724 2 12 26 0.13107200000000000000e6 +2724 2 16 30 0.65536000000000000000e5 +2724 3 2 31 0.13107200000000000000e6 +2724 3 4 33 0.32768000000000000000e5 +2724 3 14 27 0.26214400000000000000e6 +2724 3 19 32 0.32768000000000000000e5 +2724 3 27 33 0.32768000000000000000e5 +2724 3 32 33 0.32768000000000000000e5 +2724 4 4 16 0.13107200000000000000e6 +2725 1 1 48 -0.16384000000000000000e5 +2725 1 2 49 -0.16384000000000000000e5 +2725 1 3 50 -0.32768000000000000000e5 +2725 1 11 42 0.65536000000000000000e5 +2725 1 12 43 0.13107200000000000000e6 +2725 1 17 48 -0.13107200000000000000e6 +2725 1 23 38 -0.16384000000000000000e5 +2725 1 47 50 -0.32768000000000000000e5 +2725 2 2 32 -0.16384000000000000000e5 +2725 2 8 22 0.65536000000000000000e5 +2725 2 12 26 -0.65536000000000000000e5 +2725 2 16 30 -0.32768000000000000000e5 +2725 2 21 35 0.32768000000000000000e5 +2725 2 29 35 -0.32768000000000000000e5 +2725 3 2 31 -0.65536000000000000000e5 +2725 3 14 27 -0.13107200000000000000e6 +2725 3 17 30 -0.32768000000000000000e5 +2725 3 20 33 -0.32768000000000000000e5 +2725 3 22 35 0.32768000000000000000e5 +2725 3 27 34 0.32768000000000000000e5 +2725 3 29 34 -0.65536000000000000000e5 +2725 4 4 16 -0.65536000000000000000e5 +2726 3 27 35 0.32768000000000000000e5 +2726 3 32 33 -0.32768000000000000000e5 +2727 1 6 53 -0.16384000000000000000e5 +2727 1 25 56 0.16384000000000000000e5 +2727 3 28 28 0.32768000000000000000e5 +2727 3 28 33 0.16384000000000000000e5 +2728 1 24 55 0.32768000000000000000e5 +2728 1 26 41 -0.32768000000000000000e5 +2728 3 22 27 0.32768000000000000000e5 +2728 3 28 29 0.32768000000000000000e5 +2729 1 24 55 -0.32768000000000000000e5 +2729 1 26 41 0.32768000000000000000e5 +2729 2 4 34 0.32768000000000000000e5 +2729 2 21 35 -0.32768000000000000000e5 +2729 3 5 34 0.32768000000000000000e5 +2729 3 17 30 0.32768000000000000000e5 +2729 3 18 31 -0.65536000000000000000e5 +2729 3 20 33 0.32768000000000000000e5 +2729 3 21 34 -0.65536000000000000000e5 +2729 3 28 30 0.32768000000000000000e5 +2730 1 33 48 -0.32768000000000000000e5 +2730 1 43 50 0.32768000000000000000e5 +2730 3 28 31 0.32768000000000000000e5 +2731 1 1 48 0.32768000000000000000e5 +2731 1 2 49 0.65536000000000000000e5 +2731 1 3 50 0.65536000000000000000e5 +2731 1 11 42 -0.13107200000000000000e6 +2731 1 12 43 -0.26214400000000000000e6 +2731 1 17 48 0.26214400000000000000e6 +2731 1 23 38 0.32768000000000000000e5 +2731 1 24 39 0.32768000000000000000e5 +2731 1 47 54 0.32768000000000000000e5 +2731 2 2 32 0.32768000000000000000e5 +2731 2 3 33 0.32768000000000000000e5 +2731 2 8 22 -0.13107200000000000000e6 +2731 2 12 26 0.13107200000000000000e6 +2731 2 16 30 0.65536000000000000000e5 +2731 3 2 31 0.13107200000000000000e6 +2731 3 4 33 0.32768000000000000000e5 +2731 3 14 27 0.26214400000000000000e6 +2731 3 19 32 0.32768000000000000000e5 +2731 3 28 32 0.32768000000000000000e5 +2731 3 32 33 0.32768000000000000000e5 +2731 4 4 16 0.13107200000000000000e6 +2732 3 22 35 -0.32768000000000000000e5 +2732 3 28 34 0.32768000000000000000e5 +2733 1 1 48 0.32768000000000000000e5 +2733 1 2 49 0.32768000000000000000e5 +2733 1 3 50 0.65536000000000000000e5 +2733 1 11 42 -0.13107200000000000000e6 +2733 1 12 43 -0.26214400000000000000e6 +2733 1 17 48 0.26214400000000000000e6 +2733 1 23 38 0.32768000000000000000e5 +2733 1 24 55 -0.65536000000000000000e5 +2733 1 37 56 -0.32768000000000000000e5 +2733 1 38 53 0.32768000000000000000e5 +2733 1 41 56 0.65536000000000000000e5 +2733 1 47 50 0.65536000000000000000e5 +2733 2 2 32 0.32768000000000000000e5 +2733 2 8 22 -0.13107200000000000000e6 +2733 2 12 26 0.13107200000000000000e6 +2733 2 16 30 0.65536000000000000000e5 +2733 2 21 35 -0.65536000000000000000e5 +2733 2 29 35 0.65536000000000000000e5 +2733 3 2 31 0.13107200000000000000e6 +2733 3 14 27 0.26214400000000000000e6 +2733 3 17 30 0.65536000000000000000e5 +2733 3 20 33 0.65536000000000000000e5 +2733 3 22 35 -0.65536000000000000000e5 +2733 3 28 35 0.32768000000000000000e5 +2733 3 29 34 0.13107200000000000000e6 +2733 3 32 33 0.32768000000000000000e5 +2733 4 4 16 0.13107200000000000000e6 +2733 4 20 20 0.65536000000000000000e5 +2734 1 32 47 -0.16384000000000000000e5 +2734 1 37 52 0.16384000000000000000e5 +2734 3 29 29 0.32768000000000000000e5 +2735 3 21 34 -0.32768000000000000000e5 +2735 3 29 30 0.32768000000000000000e5 +2736 1 32 47 -0.16384000000000000000e5 +2736 1 33 48 -0.16384000000000000000e5 +2736 1 37 52 0.16384000000000000000e5 +2736 1 43 50 0.16384000000000000000e5 +2736 3 21 34 -0.16384000000000000000e5 +2736 3 29 31 0.32768000000000000000e5 +2736 4 16 20 -0.16384000000000000000e5 +2737 1 1 48 0.16384000000000000000e5 +2737 1 2 49 0.16384000000000000000e5 +2737 1 3 50 0.32768000000000000000e5 +2737 1 11 42 -0.65536000000000000000e5 +2737 1 12 43 -0.13107200000000000000e6 +2737 1 17 48 0.13107200000000000000e6 +2737 1 23 38 0.16384000000000000000e5 +2737 1 47 50 0.32768000000000000000e5 +2737 2 2 32 0.16384000000000000000e5 +2737 2 8 22 -0.65536000000000000000e5 +2737 2 12 26 0.65536000000000000000e5 +2737 2 16 30 0.32768000000000000000e5 +2737 3 2 31 0.65536000000000000000e5 +2737 3 14 27 0.13107200000000000000e6 +2737 3 17 30 0.32768000000000000000e5 +2737 3 20 33 0.32768000000000000000e5 +2737 3 29 32 0.32768000000000000000e5 +2737 4 4 16 0.65536000000000000000e5 +2738 1 1 48 -0.16384000000000000000e5 +2738 1 2 49 -0.16384000000000000000e5 +2738 1 3 50 -0.32768000000000000000e5 +2738 1 11 42 0.65536000000000000000e5 +2738 1 12 43 0.13107200000000000000e6 +2738 1 17 48 -0.13107200000000000000e6 +2738 1 23 38 -0.16384000000000000000e5 +2738 1 47 50 -0.32768000000000000000e5 +2738 2 2 32 -0.16384000000000000000e5 +2738 2 8 22 0.65536000000000000000e5 +2738 2 12 26 -0.65536000000000000000e5 +2738 2 16 30 -0.32768000000000000000e5 +2738 2 21 35 0.32768000000000000000e5 +2738 2 29 35 -0.32768000000000000000e5 +2738 3 2 31 -0.65536000000000000000e5 +2738 3 14 27 -0.13107200000000000000e6 +2738 3 17 30 -0.32768000000000000000e5 +2738 3 20 33 -0.32768000000000000000e5 +2738 3 22 35 0.32768000000000000000e5 +2738 3 29 33 0.32768000000000000000e5 +2738 3 29 34 -0.65536000000000000000e5 +2738 4 4 16 -0.65536000000000000000e5 +2739 1 1 48 0.16384000000000000000e5 +2739 1 2 49 0.16384000000000000000e5 +2739 1 3 50 0.32768000000000000000e5 +2739 1 11 42 -0.65536000000000000000e5 +2739 1 12 43 -0.13107200000000000000e6 +2739 1 17 48 0.13107200000000000000e6 +2739 1 23 38 0.16384000000000000000e5 +2739 1 24 55 -0.32768000000000000000e5 +2739 1 41 56 0.32768000000000000000e5 +2739 1 47 50 0.32768000000000000000e5 +2739 2 2 32 0.16384000000000000000e5 +2739 2 8 22 -0.65536000000000000000e5 +2739 2 12 26 0.65536000000000000000e5 +2739 2 16 30 0.32768000000000000000e5 +2739 2 21 35 -0.32768000000000000000e5 +2739 2 29 35 0.32768000000000000000e5 +2739 3 2 31 0.65536000000000000000e5 +2739 3 14 27 0.13107200000000000000e6 +2739 3 17 30 0.32768000000000000000e5 +2739 3 20 33 0.32768000000000000000e5 +2739 3 22 35 -0.32768000000000000000e5 +2739 3 29 34 0.65536000000000000000e5 +2739 3 29 35 0.32768000000000000000e5 +2739 4 4 16 0.65536000000000000000e5 +2740 1 33 48 -0.16384000000000000000e5 +2740 1 43 50 0.16384000000000000000e5 +2740 3 30 30 0.32768000000000000000e5 +2741 1 34 49 -0.32768000000000000000e5 +2741 1 44 51 0.32768000000000000000e5 +2741 3 30 31 0.32768000000000000000e5 +2742 1 1 48 -0.16384000000000000000e5 +2742 1 2 49 -0.16384000000000000000e5 +2742 1 3 50 -0.32768000000000000000e5 +2742 1 11 42 0.65536000000000000000e5 +2742 1 12 43 0.13107200000000000000e6 +2742 1 17 48 -0.13107200000000000000e6 +2742 1 23 38 -0.16384000000000000000e5 +2742 1 47 50 -0.32768000000000000000e5 +2742 2 2 32 -0.16384000000000000000e5 +2742 2 8 22 0.65536000000000000000e5 +2742 2 12 26 -0.65536000000000000000e5 +2742 2 16 30 -0.32768000000000000000e5 +2742 2 21 35 0.32768000000000000000e5 +2742 2 29 35 -0.32768000000000000000e5 +2742 3 2 31 -0.65536000000000000000e5 +2742 3 14 27 -0.13107200000000000000e6 +2742 3 17 30 -0.32768000000000000000e5 +2742 3 20 33 -0.32768000000000000000e5 +2742 3 22 35 0.32768000000000000000e5 +2742 3 29 34 -0.65536000000000000000e5 +2742 3 30 32 0.32768000000000000000e5 +2742 4 4 16 -0.65536000000000000000e5 +2743 3 22 35 -0.32768000000000000000e5 +2743 3 30 33 0.32768000000000000000e5 +2744 1 43 50 -0.32768000000000000000e5 +2744 1 50 51 0.32768000000000000000e5 +2744 3 30 34 0.32768000000000000000e5 +2745 3 25 34 -0.16384000000000000000e5 +2745 3 31 31 0.32768000000000000000e5 +2746 3 29 34 -0.32768000000000000000e5 +2746 3 31 32 0.32768000000000000000e5 +2747 1 43 50 -0.32768000000000000000e5 +2747 1 50 51 0.32768000000000000000e5 +2747 3 31 33 0.32768000000000000000e5 +2748 1 44 51 -0.32768000000000000000e5 +2748 1 46 53 0.32768000000000000000e5 +2748 3 31 34 0.32768000000000000000e5 +2749 1 50 51 -0.32768000000000000000e5 +2749 1 52 53 0.32768000000000000000e5 +2749 3 31 35 0.32768000000000000000e5 +2750 1 37 56 0.16384000000000000000e5 +2750 1 38 53 -0.16384000000000000000e5 +2750 3 32 32 0.32768000000000000000e5 +2751 1 1 48 0.16384000000000000000e5 +2751 1 2 49 0.16384000000000000000e5 +2751 1 3 50 0.32768000000000000000e5 +2751 1 11 42 -0.65536000000000000000e5 +2751 1 12 43 -0.13107200000000000000e6 +2751 1 17 48 0.13107200000000000000e6 +2751 1 23 38 0.16384000000000000000e5 +2751 1 24 55 -0.32768000000000000000e5 +2751 1 41 56 0.32768000000000000000e5 +2751 1 47 50 0.32768000000000000000e5 +2751 2 2 32 0.16384000000000000000e5 +2751 2 8 22 -0.65536000000000000000e5 +2751 2 12 26 0.65536000000000000000e5 +2751 2 16 30 0.32768000000000000000e5 +2751 2 21 35 -0.32768000000000000000e5 +2751 2 29 35 0.32768000000000000000e5 +2751 3 2 31 0.65536000000000000000e5 +2751 3 14 27 0.13107200000000000000e6 +2751 3 17 30 0.32768000000000000000e5 +2751 3 20 33 0.32768000000000000000e5 +2751 3 22 35 -0.32768000000000000000e5 +2751 3 29 34 0.65536000000000000000e5 +2751 3 32 34 0.32768000000000000000e5 +2751 4 4 16 0.65536000000000000000e5 +2752 1 1 48 0.32768000000000000000e5 +2752 1 2 49 0.32768000000000000000e5 +2752 1 3 50 0.65536000000000000000e5 +2752 1 11 42 -0.13107200000000000000e6 +2752 1 12 43 -0.26214400000000000000e6 +2752 1 17 48 0.26214400000000000000e6 +2752 1 23 38 0.32768000000000000000e5 +2752 1 24 55 -0.65536000000000000000e5 +2752 1 28 43 0.13107200000000000000e6 +2752 1 47 54 -0.32768000000000000000e5 +2752 1 49 56 -0.32768000000000000000e5 +2752 1 53 54 -0.32768000000000000000e5 +2752 2 2 32 0.32768000000000000000e5 +2752 2 8 22 -0.13107200000000000000e6 +2752 2 12 26 0.13107200000000000000e6 +2752 2 16 30 0.65536000000000000000e5 +2752 2 21 35 -0.65536000000000000000e5 +2752 2 35 35 -0.65536000000000000000e5 +2752 3 2 31 0.13107200000000000000e6 +2752 3 14 27 0.26214400000000000000e6 +2752 3 17 30 0.65536000000000000000e5 +2752 3 18 31 -0.13107200000000000000e6 +2752 3 20 33 0.65536000000000000000e5 +2752 3 21 34 -0.13107200000000000000e6 +2752 3 22 35 -0.65536000000000000000e5 +2752 3 30 35 -0.65536000000000000000e5 +2752 3 32 35 0.32768000000000000000e5 +2752 3 34 35 -0.65536000000000000000e5 +2752 4 4 16 0.13107200000000000000e6 +2753 1 1 48 0.16384000000000000000e5 +2753 1 2 49 0.16384000000000000000e5 +2753 1 3 50 0.32768000000000000000e5 +2753 1 11 42 -0.65536000000000000000e5 +2753 1 12 43 -0.13107200000000000000e6 +2753 1 17 48 0.13107200000000000000e6 +2753 1 23 38 0.16384000000000000000e5 +2753 1 24 55 -0.32768000000000000000e5 +2753 1 37 56 -0.16384000000000000000e5 +2753 1 38 53 0.16384000000000000000e5 +2753 1 41 56 0.32768000000000000000e5 +2753 1 47 50 0.32768000000000000000e5 +2753 2 2 32 0.16384000000000000000e5 +2753 2 8 22 -0.65536000000000000000e5 +2753 2 12 26 0.65536000000000000000e5 +2753 2 16 30 0.32768000000000000000e5 +2753 2 21 35 -0.32768000000000000000e5 +2753 2 29 35 0.32768000000000000000e5 +2753 3 2 31 0.65536000000000000000e5 +2753 3 14 27 0.13107200000000000000e6 +2753 3 17 30 0.32768000000000000000e5 +2753 3 20 33 0.32768000000000000000e5 +2753 3 22 35 -0.32768000000000000000e5 +2753 3 29 34 0.65536000000000000000e5 +2753 3 32 33 0.16384000000000000000e5 +2753 3 33 33 0.32768000000000000000e5 +2753 4 4 16 0.65536000000000000000e5 +2753 4 20 20 0.32768000000000000000e5 +2754 3 30 35 -0.32768000000000000000e5 +2754 3 33 34 0.32768000000000000000e5 +2755 1 1 48 -0.32768000000000000000e5 +2755 1 2 49 -0.32768000000000000000e5 +2755 1 3 50 -0.65536000000000000000e5 +2755 1 11 42 0.13107200000000000000e6 +2755 1 12 43 0.26214400000000000000e6 +2755 1 17 48 -0.26214400000000000000e6 +2755 1 23 38 -0.32768000000000000000e5 +2755 1 24 55 0.65536000000000000000e5 +2755 1 25 56 -0.32768000000000000000e5 +2755 1 37 56 0.32768000000000000000e5 +2755 1 38 53 -0.32768000000000000000e5 +2755 1 41 56 -0.65536000000000000000e5 +2755 1 47 50 -0.65536000000000000000e5 +2755 1 53 54 0.32768000000000000000e5 +2755 2 2 32 -0.32768000000000000000e5 +2755 2 8 22 0.13107200000000000000e6 +2755 2 12 26 -0.13107200000000000000e6 +2755 2 16 30 -0.65536000000000000000e5 +2755 2 21 35 0.65536000000000000000e5 +2755 2 29 35 -0.65536000000000000000e5 +2755 3 2 31 -0.13107200000000000000e6 +2755 3 14 27 -0.26214400000000000000e6 +2755 3 17 30 -0.65536000000000000000e5 +2755 3 20 33 -0.65536000000000000000e5 +2755 3 22 35 0.65536000000000000000e5 +2755 3 29 34 -0.13107200000000000000e6 +2755 3 32 33 -0.32768000000000000000e5 +2755 3 33 35 0.32768000000000000000e5 +2755 4 4 16 -0.13107200000000000000e6 +2755 4 20 20 -0.65536000000000000000e5 +2756 1 50 51 -0.16384000000000000000e5 +2756 1 52 53 0.16384000000000000000e5 +2756 3 34 34 0.32768000000000000000e5 +2757 1 53 54 -0.16384000000000000000e5 +2757 1 53 56 0.16384000000000000000e5 +2757 3 35 35 0.32768000000000000000e5 +2758 2 1 3 -0.32768000000000000000e5 +2758 2 2 16 0.32768000000000000000e5 +2758 4 1 2 0.32768000000000000000e5 +2759 4 1 3 0.32768000000000000000e5 +2759 4 2 2 -0.65536000000000000000e5 +2760 2 2 4 -0.32768000000000000000e5 +2760 2 3 17 0.32768000000000000000e5 +2760 4 1 4 0.32768000000000000000e5 +2761 1 1 40 0.16384000000000000000e5 +2761 1 1 48 -0.16384000000000000000e5 +2761 1 2 5 -0.16384000000000000000e5 +2761 1 2 9 0.32768000000000000000e5 +2761 1 2 17 -0.13107200000000000000e6 +2761 1 2 33 -0.65536000000000000000e5 +2761 1 2 49 -0.16384000000000000000e5 +2761 1 3 18 -0.26214400000000000000e6 +2761 1 4 19 -0.26214400000000000000e6 +2761 1 4 35 -0.26214400000000000000e6 +2761 1 6 13 0.65536000000000000000e5 +2761 1 8 23 -0.65536000000000000000e5 +2761 1 8 39 -0.32768000000000000000e5 +2761 1 11 42 0.65536000000000000000e5 +2761 1 18 25 -0.13107200000000000000e6 +2761 1 20 27 0.52428800000000000000e6 +2761 1 23 38 -0.16384000000000000000e5 +2761 2 1 3 0.16384000000000000000e5 +2761 2 2 8 -0.32768000000000000000e5 +2761 2 2 16 -0.16384000000000000000e5 +2761 2 2 32 -0.16384000000000000000e5 +2761 2 4 10 -0.65536000000000000000e5 +2761 2 6 12 -0.13107200000000000000e6 +2761 2 8 22 0.65536000000000000000e5 +2761 2 9 23 -0.13107200000000000000e6 +2761 2 10 24 -0.26214400000000000000e6 +2761 3 1 2 0.16384000000000000000e5 +2761 3 1 30 -0.32768000000000000000e5 +2761 3 2 15 0.26214400000000000000e6 +2761 3 3 8 -0.32768000000000000000e5 +2761 3 3 16 -0.16384000000000000000e5 +2761 3 4 17 -0.16384000000000000000e5 +2761 3 6 7 -0.65536000000000000000e5 +2761 3 6 19 -0.32768000000000000000e5 +2761 3 8 13 0.26214400000000000000e6 +2761 3 9 22 0.65536000000000000000e5 +2761 4 1 6 0.32768000000000000000e5 +2761 4 1 13 -0.16384000000000000000e5 +2761 4 2 2 -0.32768000000000000000e5 +2761 4 4 8 0.65536000000000000000e5 +2762 1 1 48 -0.16384000000000000000e5 +2762 1 2 33 -0.65536000000000000000e5 +2762 1 2 49 -0.16384000000000000000e5 +2762 1 3 34 0.13107200000000000000e6 +2762 1 7 38 -0.32768000000000000000e5 +2762 1 8 39 -0.32768000000000000000e5 +2762 1 10 41 -0.65536000000000000000e5 +2762 1 23 38 -0.16384000000000000000e5 +2762 2 2 8 -0.32768000000000000000e5 +2762 2 2 32 -0.16384000000000000000e5 +2762 2 7 21 -0.65536000000000000000e5 +2762 3 1 30 -0.32768000000000000000e5 +2762 3 7 20 -0.65536000000000000000e5 +2762 3 8 21 -0.65536000000000000000e5 +2762 4 1 7 0.32768000000000000000e5 +2762 4 2 14 0.32768000000000000000e5 +2763 4 1 8 0.32768000000000000000e5 +2763 4 5 5 -0.65536000000000000000e5 +2764 1 2 17 -0.65536000000000000000e5 +2764 1 3 18 -0.65536000000000000000e5 +2764 1 3 34 -0.65536000000000000000e5 +2764 1 4 19 -0.13107200000000000000e6 +2764 1 20 27 0.26214400000000000000e6 +2764 1 28 35 -0.13107200000000000000e6 +2764 2 4 10 -0.32768000000000000000e5 +2764 2 6 12 -0.65536000000000000000e5 +2764 2 7 21 0.32768000000000000000e5 +2764 2 10 24 -0.13107200000000000000e6 +2764 3 1 14 -0.65536000000000000000e5 +2764 3 2 15 0.13107200000000000000e6 +2764 3 5 10 -0.32768000000000000000e5 +2764 3 6 7 0.32768000000000000000e5 +2764 3 8 13 0.13107200000000000000e6 +2764 3 11 24 -0.13107200000000000000e6 +2764 4 1 9 0.32768000000000000000e5 +2765 1 1 8 0.81920000000000000000e4 +2765 1 1 40 0.40960000000000000000e4 +2765 1 2 5 -0.40960000000000000000e4 +2765 1 2 9 0.16384000000000000000e5 +2765 1 2 17 -0.65536000000000000000e5 +2765 1 3 18 -0.98304000000000000000e5 +2765 1 3 34 -0.65536000000000000000e5 +2765 1 4 19 -0.13107200000000000000e6 +2765 1 4 35 -0.65536000000000000000e5 +2765 1 6 13 0.16384000000000000000e5 +2765 1 7 22 -0.81920000000000000000e4 +2765 1 7 38 0.81920000000000000000e4 +2765 1 8 23 -0.24576000000000000000e5 +2765 1 10 41 0.16384000000000000000e5 +2765 1 11 42 0.16384000000000000000e5 +2765 1 13 16 -0.13107200000000000000e6 +2765 1 16 31 0.13107200000000000000e6 +2765 1 18 25 -0.32768000000000000000e5 +2765 1 20 27 0.26214400000000000000e6 +2765 1 28 35 -0.65536000000000000000e5 +2765 2 1 3 0.40960000000000000000e4 +2765 2 2 16 -0.40960000000000000000e4 +2765 2 4 10 -0.16384000000000000000e5 +2765 2 6 12 -0.65536000000000000000e5 +2765 2 7 21 0.16384000000000000000e5 +2765 2 8 22 0.16384000000000000000e5 +2765 2 9 23 -0.32768000000000000000e5 +2765 2 10 24 -0.13107200000000000000e6 +2765 3 1 2 0.40960000000000000000e4 +2765 3 1 14 0.32768000000000000000e5 +2765 3 2 15 0.19660800000000000000e6 +2765 3 3 16 -0.40960000000000000000e4 +2765 3 4 17 -0.40960000000000000000e4 +2765 3 6 7 0.16384000000000000000e5 +2765 3 6 19 -0.81920000000000000000e4 +2765 3 7 20 0.16384000000000000000e5 +2765 3 8 13 0.19660800000000000000e6 +2765 3 8 21 0.16384000000000000000e5 +2765 3 9 22 0.16384000000000000000e5 +2765 3 11 24 -0.65536000000000000000e5 +2765 4 1 5 0.81920000000000000000e4 +2765 4 1 10 0.32768000000000000000e5 +2765 4 1 13 -0.40960000000000000000e4 +2765 4 2 2 -0.81920000000000000000e4 +2765 4 2 14 -0.81920000000000000000e4 +2765 4 4 8 0.16384000000000000000e5 +2765 4 5 5 0.32768000000000000000e5 +2765 4 8 8 0.13107200000000000000e6 +2766 2 2 16 -0.32768000000000000000e5 +2766 2 16 16 0.65536000000000000000e5 +2766 4 1 11 0.32768000000000000000e5 +2767 1 1 24 0.32768000000000000000e5 +2767 1 1 40 0.32768000000000000000e5 +2767 1 2 33 0.13107200000000000000e6 +2767 1 2 49 0.32768000000000000000e5 +2767 1 3 34 -0.26214400000000000000e6 +2767 1 3 50 -0.65536000000000000000e5 +2767 1 5 52 0.13107200000000000000e6 +2767 1 6 37 0.32768000000000000000e5 +2767 1 7 38 0.13107200000000000000e6 +2767 1 8 23 -0.13107200000000000000e6 +2767 1 10 41 0.13107200000000000000e6 +2767 1 11 42 -0.13107200000000000000e6 +2767 1 12 43 -0.26214400000000000000e6 +2767 1 16 47 0.26214400000000000000e6 +2767 1 22 37 -0.32768000000000000000e5 +2767 1 28 43 0.13107200000000000000e6 +2767 2 2 32 0.32768000000000000000e5 +2767 2 3 17 -0.32768000000000000000e5 +2767 2 4 26 0.32768000000000000000e5 +2767 2 7 21 0.13107200000000000000e6 +2767 2 10 32 -0.13107200000000000000e6 +2767 2 12 26 0.13107200000000000000e6 +2767 3 1 30 0.13107200000000000000e6 +2767 3 2 31 0.13107200000000000000e6 +2767 3 4 17 -0.32768000000000000000e5 +2767 3 6 19 -0.65536000000000000000e5 +2767 3 7 20 0.26214400000000000000e6 +2767 3 8 21 0.13107200000000000000e6 +2767 3 14 27 0.26214400000000000000e6 +2767 4 1 12 0.32768000000000000000e5 +2767 4 2 14 -0.65536000000000000000e5 +2767 4 5 17 0.65536000000000000000e5 +2767 4 7 19 -0.13107200000000000000e6 +2767 4 11 11 0.65536000000000000000e5 +2768 1 1 24 0.16384000000000000000e5 +2768 1 1 32 -0.65536000000000000000e5 +2768 1 1 40 0.16384000000000000000e5 +2768 1 2 17 0.13107200000000000000e6 +2768 1 2 33 0.13107200000000000000e6 +2768 1 2 49 0.16384000000000000000e5 +2768 1 3 34 -0.26214400000000000000e6 +2768 1 3 50 -0.32768000000000000000e5 +2768 1 5 52 0.65536000000000000000e5 +2768 1 6 37 0.16384000000000000000e5 +2768 1 10 41 0.13107200000000000000e6 +2768 1 11 42 -0.13107200000000000000e6 +2768 1 12 43 -0.26214400000000000000e6 +2768 1 16 47 0.13107200000000000000e6 +2768 1 17 48 0.13107200000000000000e6 +2768 1 22 37 -0.16384000000000000000e5 +2768 1 28 43 0.65536000000000000000e5 +2768 2 1 31 -0.65536000000000000000e5 +2768 2 2 16 0.16384000000000000000e5 +2768 2 2 32 0.16384000000000000000e5 +2768 2 3 17 -0.16384000000000000000e5 +2768 2 4 26 0.16384000000000000000e5 +2768 2 7 21 0.13107200000000000000e6 +2768 2 8 22 -0.65536000000000000000e5 +2768 2 10 32 -0.65536000000000000000e5 +2768 2 12 26 0.13107200000000000000e6 +2768 2 16 16 -0.32768000000000000000e5 +2768 3 1 14 -0.13107200000000000000e6 +2768 3 1 16 0.16384000000000000000e5 +2768 3 1 30 0.65536000000000000000e5 +2768 3 2 31 0.65536000000000000000e5 +2768 3 3 16 0.16384000000000000000e5 +2768 3 6 19 -0.32768000000000000000e5 +2768 3 6 23 -0.13107200000000000000e6 +2768 3 7 20 0.19660800000000000000e6 +2768 3 8 21 0.13107200000000000000e6 +2768 3 14 27 0.26214400000000000000e6 +2768 4 1 13 0.16384000000000000000e5 +2768 4 1 14 0.32768000000000000000e5 +2768 4 2 14 -0.32768000000000000000e5 +2768 4 4 16 0.65536000000000000000e5 +2768 4 5 17 0.32768000000000000000e5 +2768 4 7 19 -0.65536000000000000000e5 +2768 4 11 11 0.32768000000000000000e5 +2769 4 1 15 0.32768000000000000000e5 +2769 4 2 14 -0.32768000000000000000e5 +2770 1 1 32 0.32768000000000000000e5 +2770 1 2 17 -0.65536000000000000000e5 +2770 1 3 34 0.65536000000000000000e5 +2770 1 10 41 -0.32768000000000000000e5 +2770 2 1 31 0.32768000000000000000e5 +2770 2 7 21 -0.32768000000000000000e5 +2770 3 1 14 0.65536000000000000000e5 +2770 3 8 21 -0.32768000000000000000e5 +2770 4 1 16 0.32768000000000000000e5 +2771 4 1 17 0.32768000000000000000e5 +2771 4 11 11 -0.65536000000000000000e5 +2772 2 2 32 0.32768000000000000000e5 +2772 2 3 17 -0.32768000000000000000e5 +2772 4 1 13 0.32768000000000000000e5 +2772 4 1 18 0.32768000000000000000e5 +2773 4 1 19 0.32768000000000000000e5 +2773 4 5 17 -0.32768000000000000000e5 +2774 2 1 35 0.32768000000000000000e5 +2774 2 2 32 -0.32768000000000000000e5 +2774 4 1 20 0.32768000000000000000e5 +2775 2 2 4 -0.32768000000000000000e5 +2775 2 3 17 0.32768000000000000000e5 +2775 4 2 3 0.32768000000000000000e5 +2776 1 1 40 -0.32768000000000000000e5 +2776 1 1 48 0.32768000000000000000e5 +2776 1 2 5 0.32768000000000000000e5 +2776 1 2 49 0.32768000000000000000e5 +2776 1 5 52 -0.13107200000000000000e6 +2776 1 7 38 -0.65536000000000000000e5 +2776 1 8 23 0.65536000000000000000e5 +2776 1 11 42 -0.13107200000000000000e6 +2776 1 12 43 -0.26214400000000000000e6 +2776 1 17 48 0.52428800000000000000e6 +2776 1 23 38 0.32768000000000000000e5 +2776 1 26 41 -0.65536000000000000000e5 +2776 1 28 43 -0.13107200000000000000e6 +2776 2 2 32 0.32768000000000000000e5 +2776 2 3 5 -0.32768000000000000000e5 +2776 2 3 9 -0.65536000000000000000e5 +2776 2 4 18 0.32768000000000000000e5 +2776 2 8 22 -0.26214400000000000000e6 +2776 2 12 26 0.13107200000000000000e6 +2776 2 16 30 0.65536000000000000000e5 +2776 3 2 31 0.13107200000000000000e6 +2776 3 3 8 -0.13107200000000000000e6 +2776 3 3 16 0.32768000000000000000e5 +2776 3 4 5 -0.32768000000000000000e5 +2776 3 4 9 -0.65536000000000000000e5 +2776 3 4 17 0.32768000000000000000e5 +2776 3 5 10 0.13107200000000000000e6 +2776 3 6 19 0.65536000000000000000e5 +2776 3 7 20 -0.13107200000000000000e6 +2776 3 14 27 0.26214400000000000000e6 +2776 4 1 13 0.32768000000000000000e5 +2776 4 2 4 0.32768000000000000000e5 +2776 4 2 14 0.65536000000000000000e5 +2776 4 3 15 0.65536000000000000000e5 +2776 4 4 16 0.26214400000000000000e6 +2776 4 6 18 0.65536000000000000000e5 +2776 4 7 19 0.13107200000000000000e6 +2777 1 1 40 0.16384000000000000000e5 +2777 1 1 48 -0.16384000000000000000e5 +2777 1 2 5 -0.16384000000000000000e5 +2777 1 2 9 0.32768000000000000000e5 +2777 1 2 17 -0.13107200000000000000e6 +2777 1 2 33 -0.65536000000000000000e5 +2777 1 2 49 -0.16384000000000000000e5 +2777 1 3 18 -0.26214400000000000000e6 +2777 1 4 19 -0.26214400000000000000e6 +2777 1 4 35 -0.26214400000000000000e6 +2777 1 6 13 0.65536000000000000000e5 +2777 1 8 23 -0.65536000000000000000e5 +2777 1 8 39 -0.32768000000000000000e5 +2777 1 11 42 0.65536000000000000000e5 +2777 1 18 25 -0.13107200000000000000e6 +2777 1 20 27 0.52428800000000000000e6 +2777 1 23 38 -0.16384000000000000000e5 +2777 2 1 3 0.16384000000000000000e5 +2777 2 2 8 -0.32768000000000000000e5 +2777 2 2 16 -0.16384000000000000000e5 +2777 2 2 32 -0.16384000000000000000e5 +2777 2 4 10 -0.65536000000000000000e5 +2777 2 6 12 -0.13107200000000000000e6 +2777 2 8 22 0.65536000000000000000e5 +2777 2 9 23 -0.13107200000000000000e6 +2777 2 10 24 -0.26214400000000000000e6 +2777 3 1 2 0.16384000000000000000e5 +2777 3 1 30 -0.32768000000000000000e5 +2777 3 2 15 0.26214400000000000000e6 +2777 3 3 8 -0.32768000000000000000e5 +2777 3 3 16 -0.16384000000000000000e5 +2777 3 4 17 -0.16384000000000000000e5 +2777 3 6 7 -0.65536000000000000000e5 +2777 3 6 19 -0.32768000000000000000e5 +2777 3 8 13 0.26214400000000000000e6 +2777 3 9 22 0.65536000000000000000e5 +2777 4 1 13 -0.16384000000000000000e5 +2777 4 2 2 -0.32768000000000000000e5 +2777 4 2 5 0.32768000000000000000e5 +2777 4 4 8 0.65536000000000000000e5 +2778 1 1 48 -0.16384000000000000000e5 +2778 1 2 33 -0.65536000000000000000e5 +2778 1 2 49 -0.16384000000000000000e5 +2778 1 3 34 0.13107200000000000000e6 +2778 1 7 38 -0.32768000000000000000e5 +2778 1 8 39 -0.32768000000000000000e5 +2778 1 10 41 -0.65536000000000000000e5 +2778 1 23 38 -0.16384000000000000000e5 +2778 2 2 8 -0.32768000000000000000e5 +2778 2 2 32 -0.16384000000000000000e5 +2778 2 7 21 -0.65536000000000000000e5 +2778 3 1 30 -0.32768000000000000000e5 +2778 3 7 20 -0.65536000000000000000e5 +2778 3 8 21 -0.65536000000000000000e5 +2778 4 2 6 0.32768000000000000000e5 +2778 4 2 14 0.32768000000000000000e5 +2779 1 2 9 -0.32768000000000000000e5 +2779 1 2 17 -0.13107200000000000000e6 +2779 1 2 33 -0.65536000000000000000e5 +2779 1 3 18 -0.39321600000000000000e6 +2779 1 4 19 -0.26214400000000000000e6 +2779 1 4 35 -0.52428800000000000000e6 +2779 1 5 52 -0.65536000000000000000e5 +2779 1 6 13 0.13107200000000000000e6 +2779 1 7 38 -0.32768000000000000000e5 +2779 1 8 23 0.32768000000000000000e5 +2779 1 8 39 -0.32768000000000000000e5 +2779 1 10 41 0.65536000000000000000e5 +2779 1 11 42 0.65536000000000000000e5 +2779 1 12 43 -0.13107200000000000000e6 +2779 1 17 48 0.26214400000000000000e6 +2779 1 18 25 -0.26214400000000000000e6 +2779 1 20 27 0.52428800000000000000e6 +2779 1 26 41 -0.32768000000000000000e5 +2779 1 28 35 0.26214400000000000000e6 +2779 1 28 43 -0.65536000000000000000e5 +2779 2 2 8 -0.32768000000000000000e5 +2779 2 3 9 -0.32768000000000000000e5 +2779 2 4 10 -0.65536000000000000000e5 +2779 2 6 12 -0.13107200000000000000e6 +2779 2 9 23 -0.26214400000000000000e6 +2779 2 10 24 -0.26214400000000000000e6 +2779 2 12 26 0.65536000000000000000e5 +2779 2 16 30 0.32768000000000000000e5 +2779 3 1 30 -0.32768000000000000000e5 +2779 3 2 15 0.26214400000000000000e6 +2779 3 2 31 0.65536000000000000000e5 +2779 3 3 8 -0.32768000000000000000e5 +2779 3 4 9 -0.32768000000000000000e5 +2779 3 5 10 0.13107200000000000000e6 +2779 3 7 20 -0.65536000000000000000e5 +2779 3 8 13 0.26214400000000000000e6 +2779 3 8 21 0.65536000000000000000e5 +2779 3 9 22 0.13107200000000000000e6 +2779 3 11 24 0.26214400000000000000e6 +2779 3 14 27 0.13107200000000000000e6 +2779 4 2 7 0.32768000000000000000e5 +2779 4 2 14 0.32768000000000000000e5 +2779 4 3 15 0.32768000000000000000e5 +2779 4 4 8 0.13107200000000000000e6 +2779 4 4 16 0.13107200000000000000e6 +2779 4 6 18 0.32768000000000000000e5 +2779 4 7 19 0.65536000000000000000e5 +2780 1 2 17 -0.65536000000000000000e5 +2780 1 3 18 -0.65536000000000000000e5 +2780 1 3 34 -0.65536000000000000000e5 +2780 1 4 19 -0.13107200000000000000e6 +2780 1 20 27 0.26214400000000000000e6 +2780 1 28 35 -0.13107200000000000000e6 +2780 2 4 10 -0.32768000000000000000e5 +2780 2 6 12 -0.65536000000000000000e5 +2780 2 7 21 0.32768000000000000000e5 +2780 2 10 24 -0.13107200000000000000e6 +2780 3 1 14 -0.65536000000000000000e5 +2780 3 2 15 0.13107200000000000000e6 +2780 3 5 10 -0.32768000000000000000e5 +2780 3 6 7 0.32768000000000000000e5 +2780 3 8 13 0.13107200000000000000e6 +2780 3 11 24 -0.13107200000000000000e6 +2780 4 2 8 0.32768000000000000000e5 +2781 2 4 10 -0.32768000000000000000e5 +2781 2 7 21 0.32768000000000000000e5 +2781 4 2 9 0.32768000000000000000e5 +2782 1 2 17 -0.32768000000000000000e5 +2782 1 3 34 -0.32768000000000000000e5 +2782 1 4 19 -0.65536000000000000000e5 +2782 1 4 35 0.32768000000000000000e5 +2782 1 18 25 0.32768000000000000000e5 +2782 1 20 27 0.13107200000000000000e6 +2782 1 28 35 -0.13107200000000000000e6 +2782 2 6 12 -0.32768000000000000000e5 +2782 2 9 23 0.32768000000000000000e5 +2782 2 10 24 -0.65536000000000000000e5 +2782 3 1 14 0.32768000000000000000e5 +2782 3 8 13 0.65536000000000000000e5 +2782 3 11 24 -0.13107200000000000000e6 +2782 4 2 10 0.32768000000000000000e5 +2783 1 1 24 0.32768000000000000000e5 +2783 1 1 40 0.32768000000000000000e5 +2783 1 2 33 0.13107200000000000000e6 +2783 1 2 49 0.32768000000000000000e5 +2783 1 3 34 -0.26214400000000000000e6 +2783 1 3 50 -0.65536000000000000000e5 +2783 1 5 52 0.13107200000000000000e6 +2783 1 6 37 0.32768000000000000000e5 +2783 1 7 38 0.13107200000000000000e6 +2783 1 8 23 -0.13107200000000000000e6 +2783 1 10 41 0.13107200000000000000e6 +2783 1 11 42 -0.13107200000000000000e6 +2783 1 12 43 -0.26214400000000000000e6 +2783 1 16 47 0.26214400000000000000e6 +2783 1 22 37 -0.32768000000000000000e5 +2783 1 28 43 0.13107200000000000000e6 +2783 2 2 32 0.32768000000000000000e5 +2783 2 3 17 -0.32768000000000000000e5 +2783 2 4 26 0.32768000000000000000e5 +2783 2 7 21 0.13107200000000000000e6 +2783 2 10 32 -0.13107200000000000000e6 +2783 2 12 26 0.13107200000000000000e6 +2783 3 1 30 0.13107200000000000000e6 +2783 3 2 31 0.13107200000000000000e6 +2783 3 4 17 -0.32768000000000000000e5 +2783 3 6 19 -0.65536000000000000000e5 +2783 3 7 20 0.26214400000000000000e6 +2783 3 8 21 0.13107200000000000000e6 +2783 3 14 27 0.26214400000000000000e6 +2783 4 2 11 0.32768000000000000000e5 +2783 4 2 14 -0.65536000000000000000e5 +2783 4 5 17 0.65536000000000000000e5 +2783 4 7 19 -0.13107200000000000000e6 +2783 4 11 11 0.65536000000000000000e5 +2784 4 1 13 -0.32768000000000000000e5 +2784 4 2 12 0.32768000000000000000e5 +2785 1 3 26 0.32768000000000000000e5 +2785 1 6 37 -0.32768000000000000000e5 +2785 1 7 38 0.65536000000000000000e5 +2785 1 8 23 -0.65536000000000000000e5 +2785 3 3 16 -0.32768000000000000000e5 +2785 3 6 19 -0.13107200000000000000e6 +2785 3 7 20 0.13107200000000000000e6 +2785 4 1 13 -0.32768000000000000000e5 +2785 4 2 13 0.32768000000000000000e5 +2785 4 2 14 -0.65536000000000000000e5 +2786 1 2 33 -0.65536000000000000000e5 +2786 1 7 38 0.32768000000000000000e5 +2786 1 8 23 -0.32768000000000000000e5 +2786 1 9 40 0.32768000000000000000e5 +2786 1 10 25 -0.32768000000000000000e5 +2786 1 11 42 0.65536000000000000000e5 +2786 1 12 43 0.13107200000000000000e6 +2786 1 17 48 -0.13107200000000000000e6 +2786 2 8 22 0.65536000000000000000e5 +2786 2 12 26 -0.65536000000000000000e5 +2786 3 6 19 -0.32768000000000000000e5 +2786 3 7 20 0.65536000000000000000e5 +2786 3 8 21 0.65536000000000000000e5 +2786 3 14 27 -0.13107200000000000000e6 +2786 4 2 14 -0.32768000000000000000e5 +2786 4 2 15 0.32768000000000000000e5 +2786 4 3 15 -0.32768000000000000000e5 +2786 4 4 16 -0.65536000000000000000e5 +2787 1 2 33 0.32768000000000000000e5 +2787 1 3 34 -0.65536000000000000000e5 +2787 1 11 42 -0.32768000000000000000e5 +2787 1 12 43 -0.65536000000000000000e5 +2787 1 16 47 0.65536000000000000000e5 +2787 1 17 48 0.65536000000000000000e5 +2787 2 8 22 -0.32768000000000000000e5 +2787 2 12 26 0.32768000000000000000e5 +2787 3 7 20 0.32768000000000000000e5 +2787 3 8 21 0.32768000000000000000e5 +2787 3 13 26 0.65536000000000000000e5 +2787 3 14 27 0.65536000000000000000e5 +2787 4 2 16 0.32768000000000000000e5 +2787 4 4 16 0.32768000000000000000e5 +2788 2 2 32 0.32768000000000000000e5 +2788 2 3 17 -0.32768000000000000000e5 +2788 4 1 13 0.32768000000000000000e5 +2788 4 2 17 0.32768000000000000000e5 +2789 1 2 49 -0.32768000000000000000e5 +2789 1 3 50 0.65536000000000000000e5 +2789 1 23 38 -0.32768000000000000000e5 +2789 1 24 39 -0.32768000000000000000e5 +2789 2 4 26 -0.32768000000000000000e5 +2789 4 2 18 0.32768000000000000000e5 +2790 1 5 52 0.65536000000000000000e5 +2790 1 9 40 -0.32768000000000000000e5 +2790 1 10 41 0.65536000000000000000e5 +2790 1 17 48 -0.13107200000000000000e6 +2790 1 26 41 0.32768000000000000000e5 +2790 1 28 43 0.65536000000000000000e5 +2790 2 8 22 0.65536000000000000000e5 +2790 3 1 30 0.32768000000000000000e5 +2790 3 2 31 -0.65536000000000000000e5 +2790 4 2 19 0.32768000000000000000e5 +2790 4 4 16 -0.65536000000000000000e5 +2790 4 6 18 -0.32768000000000000000e5 +2790 4 7 19 -0.65536000000000000000e5 +2791 1 2 49 0.32768000000000000000e5 +2791 1 3 50 -0.65536000000000000000e5 +2791 1 23 38 0.32768000000000000000e5 +2791 1 24 39 0.32768000000000000000e5 +2791 2 26 32 0.32768000000000000000e5 +2791 4 2 20 0.32768000000000000000e5 +2791 4 17 17 0.65536000000000000000e5 +2792 1 1 40 -0.16384000000000000000e5 +2792 1 1 48 0.16384000000000000000e5 +2792 1 2 5 0.16384000000000000000e5 +2792 1 2 49 0.16384000000000000000e5 +2792 1 5 52 -0.65536000000000000000e5 +2792 1 7 38 -0.32768000000000000000e5 +2792 1 8 23 0.32768000000000000000e5 +2792 1 11 42 -0.65536000000000000000e5 +2792 1 12 43 -0.13107200000000000000e6 +2792 1 17 48 0.26214400000000000000e6 +2792 1 23 38 0.16384000000000000000e5 +2792 1 26 41 -0.32768000000000000000e5 +2792 1 28 43 -0.65536000000000000000e5 +2792 2 2 32 0.16384000000000000000e5 +2792 2 3 5 -0.16384000000000000000e5 +2792 2 3 9 -0.32768000000000000000e5 +2792 2 4 18 0.16384000000000000000e5 +2792 2 8 22 -0.13107200000000000000e6 +2792 2 12 26 0.65536000000000000000e5 +2792 2 16 30 0.32768000000000000000e5 +2792 3 2 31 0.65536000000000000000e5 +2792 3 3 8 -0.65536000000000000000e5 +2792 3 3 16 0.16384000000000000000e5 +2792 3 4 5 -0.16384000000000000000e5 +2792 3 4 9 -0.32768000000000000000e5 +2792 3 4 17 0.16384000000000000000e5 +2792 3 5 10 0.65536000000000000000e5 +2792 3 6 19 0.32768000000000000000e5 +2792 3 7 20 -0.65536000000000000000e5 +2792 3 14 27 0.13107200000000000000e6 +2792 4 1 13 0.16384000000000000000e5 +2792 4 2 14 0.32768000000000000000e5 +2792 4 3 3 0.32768000000000000000e5 +2792 4 3 15 0.32768000000000000000e5 +2792 4 4 16 0.13107200000000000000e6 +2792 4 6 18 0.32768000000000000000e5 +2792 4 7 19 0.65536000000000000000e5 +2793 2 3 5 -0.32768000000000000000e5 +2793 2 4 18 0.32768000000000000000e5 +2793 4 3 4 0.32768000000000000000e5 +2794 1 1 48 -0.16384000000000000000e5 +2794 1 2 33 -0.65536000000000000000e5 +2794 1 2 49 -0.16384000000000000000e5 +2794 1 3 34 0.13107200000000000000e6 +2794 1 7 38 -0.32768000000000000000e5 +2794 1 8 39 -0.32768000000000000000e5 +2794 1 10 41 -0.65536000000000000000e5 +2794 1 23 38 -0.16384000000000000000e5 +2794 2 2 8 -0.32768000000000000000e5 +2794 2 2 32 -0.16384000000000000000e5 +2794 2 7 21 -0.65536000000000000000e5 +2794 3 1 30 -0.32768000000000000000e5 +2794 3 7 20 -0.65536000000000000000e5 +2794 3 8 21 -0.65536000000000000000e5 +2794 4 2 14 0.32768000000000000000e5 +2794 4 3 5 0.32768000000000000000e5 +2795 1 2 9 -0.32768000000000000000e5 +2795 1 2 17 -0.13107200000000000000e6 +2795 1 2 33 -0.65536000000000000000e5 +2795 1 3 18 -0.39321600000000000000e6 +2795 1 4 19 -0.26214400000000000000e6 +2795 1 4 35 -0.52428800000000000000e6 +2795 1 5 52 -0.65536000000000000000e5 +2795 1 6 13 0.13107200000000000000e6 +2795 1 7 38 -0.32768000000000000000e5 +2795 1 8 23 0.32768000000000000000e5 +2795 1 8 39 -0.32768000000000000000e5 +2795 1 10 41 0.65536000000000000000e5 +2795 1 11 42 0.65536000000000000000e5 +2795 1 12 43 -0.13107200000000000000e6 +2795 1 17 48 0.26214400000000000000e6 +2795 1 18 25 -0.26214400000000000000e6 +2795 1 20 27 0.52428800000000000000e6 +2795 1 26 41 -0.32768000000000000000e5 +2795 1 28 35 0.26214400000000000000e6 +2795 1 28 43 -0.65536000000000000000e5 +2795 2 2 8 -0.32768000000000000000e5 +2795 2 3 9 -0.32768000000000000000e5 +2795 2 4 10 -0.65536000000000000000e5 +2795 2 6 12 -0.13107200000000000000e6 +2795 2 9 23 -0.26214400000000000000e6 +2795 2 10 24 -0.26214400000000000000e6 +2795 2 12 26 0.65536000000000000000e5 +2795 2 16 30 0.32768000000000000000e5 +2795 3 1 30 -0.32768000000000000000e5 +2795 3 2 15 0.26214400000000000000e6 +2795 3 2 31 0.65536000000000000000e5 +2795 3 3 8 -0.32768000000000000000e5 +2795 3 4 9 -0.32768000000000000000e5 +2795 3 5 10 0.13107200000000000000e6 +2795 3 7 20 -0.65536000000000000000e5 +2795 3 8 13 0.26214400000000000000e6 +2795 3 8 21 0.65536000000000000000e5 +2795 3 9 22 0.13107200000000000000e6 +2795 3 11 24 0.26214400000000000000e6 +2795 3 14 27 0.13107200000000000000e6 +2795 4 2 14 0.32768000000000000000e5 +2795 4 3 6 0.32768000000000000000e5 +2795 4 3 15 0.32768000000000000000e5 +2795 4 4 8 0.13107200000000000000e6 +2795 4 4 16 0.13107200000000000000e6 +2795 4 6 18 0.32768000000000000000e5 +2795 4 7 19 0.65536000000000000000e5 +2796 1 1 48 0.16384000000000000000e5 +2796 1 2 49 0.16384000000000000000e5 +2796 1 5 52 -0.65536000000000000000e5 +2796 1 11 42 -0.65536000000000000000e5 +2796 1 12 43 -0.13107200000000000000e6 +2796 1 17 48 0.26214400000000000000e6 +2796 1 23 38 0.16384000000000000000e5 +2796 1 26 41 -0.32768000000000000000e5 +2796 1 28 43 -0.65536000000000000000e5 +2796 2 2 32 0.16384000000000000000e5 +2796 2 3 9 -0.32768000000000000000e5 +2796 2 8 22 -0.13107200000000000000e6 +2796 2 12 26 0.65536000000000000000e5 +2796 2 16 30 0.32768000000000000000e5 +2796 3 2 31 0.65536000000000000000e5 +2796 3 14 27 0.13107200000000000000e6 +2796 4 3 7 0.32768000000000000000e5 +2796 4 3 15 0.32768000000000000000e5 +2796 4 4 16 0.13107200000000000000e6 +2796 4 6 18 0.32768000000000000000e5 +2796 4 7 19 0.65536000000000000000e5 +2797 2 4 10 -0.32768000000000000000e5 +2797 2 7 21 0.32768000000000000000e5 +2797 4 3 8 0.32768000000000000000e5 +2798 4 3 9 0.32768000000000000000e5 +2798 4 4 8 -0.32768000000000000000e5 +2799 1 2 17 -0.32768000000000000000e5 +2799 1 3 18 -0.32768000000000000000e5 +2799 1 3 34 -0.32768000000000000000e5 +2799 1 4 19 -0.65536000000000000000e5 +2799 1 10 17 0.65536000000000000000e5 +2799 1 11 14 -0.32768000000000000000e5 +2799 1 18 25 0.32768000000000000000e5 +2799 1 20 27 0.13107200000000000000e6 +2799 1 28 35 -0.13107200000000000000e6 +2799 2 6 12 -0.32768000000000000000e5 +2799 2 9 11 -0.32768000000000000000e5 +2799 2 9 23 0.32768000000000000000e5 +2799 2 10 24 -0.65536000000000000000e5 +2799 3 2 15 0.65536000000000000000e5 +2799 3 11 24 -0.13107200000000000000e6 +2799 4 3 10 0.32768000000000000000e5 +2800 4 1 13 -0.32768000000000000000e5 +2800 4 3 11 0.32768000000000000000e5 +2801 1 3 26 0.32768000000000000000e5 +2801 1 6 37 -0.32768000000000000000e5 +2801 1 7 38 0.65536000000000000000e5 +2801 1 8 23 -0.65536000000000000000e5 +2801 3 3 16 -0.32768000000000000000e5 +2801 3 6 19 -0.13107200000000000000e6 +2801 3 7 20 0.13107200000000000000e6 +2801 4 1 13 -0.32768000000000000000e5 +2801 4 2 14 -0.65536000000000000000e5 +2801 4 3 12 0.32768000000000000000e5 +2802 1 3 26 0.32768000000000000000e5 +2802 1 6 37 -0.32768000000000000000e5 +2802 1 9 40 -0.65536000000000000000e5 +2802 1 10 25 0.65536000000000000000e5 +2802 3 4 17 0.32768000000000000000e5 +2802 3 5 18 0.32768000000000000000e5 +2802 3 6 19 0.65536000000000000000e5 +2802 3 8 21 -0.13107200000000000000e6 +2802 4 3 13 0.32768000000000000000e5 +2802 4 3 15 0.65536000000000000000e5 +2803 1 2 33 -0.65536000000000000000e5 +2803 1 7 38 0.32768000000000000000e5 +2803 1 8 23 -0.32768000000000000000e5 +2803 1 9 40 0.32768000000000000000e5 +2803 1 10 25 -0.32768000000000000000e5 +2803 1 11 42 0.65536000000000000000e5 +2803 1 12 43 0.13107200000000000000e6 +2803 1 17 48 -0.13107200000000000000e6 +2803 2 8 22 0.65536000000000000000e5 +2803 2 12 26 -0.65536000000000000000e5 +2803 3 6 19 -0.32768000000000000000e5 +2803 3 7 20 0.65536000000000000000e5 +2803 3 8 21 0.65536000000000000000e5 +2803 3 14 27 -0.13107200000000000000e6 +2803 4 2 14 -0.32768000000000000000e5 +2803 4 3 14 0.32768000000000000000e5 +2803 4 3 15 -0.32768000000000000000e5 +2803 4 4 16 -0.65536000000000000000e5 +2804 1 2 33 0.32768000000000000000e5 +2804 1 4 35 0.13107200000000000000e6 +2804 1 11 42 -0.32768000000000000000e5 +2804 1 18 25 0.65536000000000000000e5 +2804 1 28 35 -0.13107200000000000000e6 +2804 2 8 22 -0.32768000000000000000e5 +2804 2 9 23 0.65536000000000000000e5 +2804 2 12 26 0.32768000000000000000e5 +2804 3 9 22 -0.32768000000000000000e5 +2804 3 11 24 -0.13107200000000000000e6 +2804 4 3 16 0.32768000000000000000e5 +2805 1 2 49 -0.32768000000000000000e5 +2805 1 3 50 0.65536000000000000000e5 +2805 1 23 38 -0.32768000000000000000e5 +2805 1 24 39 -0.32768000000000000000e5 +2805 2 4 26 -0.32768000000000000000e5 +2805 4 3 17 0.32768000000000000000e5 +2806 1 3 26 -0.32768000000000000000e5 +2806 1 6 37 0.32768000000000000000e5 +2806 1 9 40 0.65536000000000000000e5 +2806 1 10 25 -0.65536000000000000000e5 +2806 2 3 33 0.32768000000000000000e5 +2806 2 4 18 -0.32768000000000000000e5 +2806 3 4 17 -0.32768000000000000000e5 +2806 3 5 18 -0.32768000000000000000e5 +2806 3 6 19 -0.65536000000000000000e5 +2806 3 8 21 0.13107200000000000000e6 +2806 4 3 15 -0.65536000000000000000e5 +2806 4 3 18 0.32768000000000000000e5 +2807 4 3 19 0.32768000000000000000e5 +2807 4 6 18 -0.32768000000000000000e5 +2808 2 3 33 -0.32768000000000000000e5 +2808 2 18 32 0.32768000000000000000e5 +2808 4 3 20 0.32768000000000000000e5 +2809 1 2 9 -0.32768000000000000000e5 +2809 1 2 17 -0.13107200000000000000e6 +2809 1 2 33 -0.65536000000000000000e5 +2809 1 3 18 -0.39321600000000000000e6 +2809 1 4 19 -0.26214400000000000000e6 +2809 1 4 35 -0.52428800000000000000e6 +2809 1 5 52 -0.65536000000000000000e5 +2809 1 6 13 0.13107200000000000000e6 +2809 1 7 38 -0.32768000000000000000e5 +2809 1 8 23 0.32768000000000000000e5 +2809 1 8 39 -0.32768000000000000000e5 +2809 1 10 41 0.65536000000000000000e5 +2809 1 11 42 0.65536000000000000000e5 +2809 1 12 43 -0.13107200000000000000e6 +2809 1 17 48 0.26214400000000000000e6 +2809 1 18 25 -0.26214400000000000000e6 +2809 1 20 27 0.52428800000000000000e6 +2809 1 26 41 -0.32768000000000000000e5 +2809 1 28 35 0.26214400000000000000e6 +2809 1 28 43 -0.65536000000000000000e5 +2809 2 2 8 -0.32768000000000000000e5 +2809 2 3 9 -0.32768000000000000000e5 +2809 2 4 10 -0.65536000000000000000e5 +2809 2 6 12 -0.13107200000000000000e6 +2809 2 9 23 -0.26214400000000000000e6 +2809 2 10 24 -0.26214400000000000000e6 +2809 2 12 26 0.65536000000000000000e5 +2809 2 16 30 0.32768000000000000000e5 +2809 3 1 30 -0.32768000000000000000e5 +2809 3 2 15 0.26214400000000000000e6 +2809 3 2 31 0.65536000000000000000e5 +2809 3 3 8 -0.32768000000000000000e5 +2809 3 4 9 -0.32768000000000000000e5 +2809 3 5 10 0.13107200000000000000e6 +2809 3 7 20 -0.65536000000000000000e5 +2809 3 8 13 0.26214400000000000000e6 +2809 3 8 21 0.65536000000000000000e5 +2809 3 9 22 0.13107200000000000000e6 +2809 3 11 24 0.26214400000000000000e6 +2809 3 14 27 0.13107200000000000000e6 +2809 4 2 14 0.32768000000000000000e5 +2809 4 3 15 0.32768000000000000000e5 +2809 4 4 5 0.32768000000000000000e5 +2809 4 4 8 0.13107200000000000000e6 +2809 4 4 16 0.13107200000000000000e6 +2809 4 6 18 0.32768000000000000000e5 +2809 4 7 19 0.65536000000000000000e5 +2810 1 1 48 0.16384000000000000000e5 +2810 1 2 49 0.16384000000000000000e5 +2810 1 5 52 -0.65536000000000000000e5 +2810 1 11 42 -0.65536000000000000000e5 +2810 1 12 43 -0.13107200000000000000e6 +2810 1 17 48 0.26214400000000000000e6 +2810 1 23 38 0.16384000000000000000e5 +2810 1 26 41 -0.32768000000000000000e5 +2810 1 28 43 -0.65536000000000000000e5 +2810 2 2 32 0.16384000000000000000e5 +2810 2 3 9 -0.32768000000000000000e5 +2810 2 8 22 -0.13107200000000000000e6 +2810 2 12 26 0.65536000000000000000e5 +2810 2 16 30 0.32768000000000000000e5 +2810 3 2 31 0.65536000000000000000e5 +2810 3 14 27 0.13107200000000000000e6 +2810 4 3 15 0.32768000000000000000e5 +2810 4 4 6 0.32768000000000000000e5 +2810 4 4 16 0.13107200000000000000e6 +2810 4 6 18 0.32768000000000000000e5 +2810 4 7 19 0.65536000000000000000e5 +2811 1 1 48 0.16384000000000000000e5 +2811 1 2 49 0.16384000000000000000e5 +2811 1 3 18 -0.13107200000000000000e6 +2811 1 4 35 0.13107200000000000000e6 +2811 1 5 52 -0.65536000000000000000e5 +2811 1 6 11 -0.32768000000000000000e5 +2811 1 6 13 -0.13107200000000000000e6 +2811 1 6 29 -0.32768000000000000000e5 +2811 1 10 17 0.26214400000000000000e6 +2811 1 10 25 -0.32768000000000000000e5 +2811 1 10 41 -0.13107200000000000000e6 +2811 1 11 14 -0.13107200000000000000e6 +2811 1 11 42 -0.13107200000000000000e6 +2811 1 12 43 -0.13107200000000000000e6 +2811 1 17 48 0.26214400000000000000e6 +2811 1 23 38 0.16384000000000000000e5 +2811 1 26 41 -0.32768000000000000000e5 +2811 1 28 43 -0.65536000000000000000e5 +2811 2 2 32 0.16384000000000000000e5 +2811 2 3 9 -0.32768000000000000000e5 +2811 2 5 9 -0.32768000000000000000e5 +2811 2 5 11 -0.65536000000000000000e5 +2811 2 8 22 -0.19660800000000000000e6 +2811 2 9 11 -0.13107200000000000000e6 +2811 2 12 26 0.65536000000000000000e5 +2811 2 16 30 0.32768000000000000000e5 +2811 3 2 31 0.65536000000000000000e5 +2811 3 3 8 -0.32768000000000000000e5 +2811 3 4 9 -0.32768000000000000000e5 +2811 3 8 21 -0.13107200000000000000e6 +2811 3 9 22 -0.65536000000000000000e5 +2811 3 14 27 0.13107200000000000000e6 +2811 4 3 15 0.32768000000000000000e5 +2811 4 4 7 0.32768000000000000000e5 +2811 4 4 16 0.13107200000000000000e6 +2811 4 6 18 0.32768000000000000000e5 +2811 4 7 19 0.65536000000000000000e5 +2812 2 5 11 -0.32768000000000000000e5 +2812 2 8 22 0.32768000000000000000e5 +2812 4 4 9 0.32768000000000000000e5 +2813 2 9 11 -0.32768000000000000000e5 +2813 2 9 23 0.32768000000000000000e5 +2813 4 4 10 0.32768000000000000000e5 +2814 1 3 26 0.32768000000000000000e5 +2814 1 6 37 -0.32768000000000000000e5 +2814 1 7 38 0.65536000000000000000e5 +2814 1 8 23 -0.65536000000000000000e5 +2814 3 3 16 -0.32768000000000000000e5 +2814 3 6 19 -0.13107200000000000000e6 +2814 3 7 20 0.13107200000000000000e6 +2814 4 1 13 -0.32768000000000000000e5 +2814 4 2 14 -0.65536000000000000000e5 +2814 4 4 11 0.32768000000000000000e5 +2815 1 3 26 0.32768000000000000000e5 +2815 1 6 37 -0.32768000000000000000e5 +2815 1 9 40 -0.65536000000000000000e5 +2815 1 10 25 0.65536000000000000000e5 +2815 3 4 17 0.32768000000000000000e5 +2815 3 5 18 0.32768000000000000000e5 +2815 3 6 19 0.65536000000000000000e5 +2815 3 8 21 -0.13107200000000000000e6 +2815 4 3 15 0.65536000000000000000e5 +2815 4 4 12 0.32768000000000000000e5 +2816 1 1 40 0.32768000000000000000e5 +2816 1 1 48 -0.32768000000000000000e5 +2816 1 2 49 -0.32768000000000000000e5 +2816 1 5 52 0.13107200000000000000e6 +2816 1 6 25 0.32768000000000000000e5 +2816 1 6 37 0.32768000000000000000e5 +2816 1 8 39 -0.13107200000000000000e6 +2816 1 10 25 -0.13107200000000000000e6 +2816 1 10 41 0.13107200000000000000e6 +2816 1 11 42 0.13107200000000000000e6 +2816 1 12 43 0.26214400000000000000e6 +2816 1 17 48 -0.52428800000000000000e6 +2816 1 23 38 -0.32768000000000000000e5 +2816 1 26 41 0.65536000000000000000e5 +2816 1 28 43 0.13107200000000000000e6 +2816 2 2 32 -0.32768000000000000000e5 +2816 2 4 18 -0.32768000000000000000e5 +2816 2 4 26 0.32768000000000000000e5 +2816 2 5 27 0.32768000000000000000e5 +2816 2 8 22 0.26214400000000000000e6 +2816 2 12 26 -0.13107200000000000000e6 +2816 2 16 30 -0.65536000000000000000e5 +2816 3 2 31 -0.13107200000000000000e6 +2816 3 4 17 -0.32768000000000000000e5 +2816 3 6 19 -0.65536000000000000000e5 +2816 3 8 21 0.13107200000000000000e6 +2816 3 14 27 -0.26214400000000000000e6 +2816 4 3 15 -0.65536000000000000000e5 +2816 4 4 13 0.32768000000000000000e5 +2816 4 4 16 -0.26214400000000000000e6 +2816 4 6 18 -0.65536000000000000000e5 +2816 4 7 19 -0.13107200000000000000e6 +2817 4 3 15 -0.32768000000000000000e5 +2817 4 4 14 0.32768000000000000000e5 +2818 1 4 35 -0.13107200000000000000e6 +2818 1 6 29 0.32768000000000000000e5 +2818 1 17 48 0.13107200000000000000e6 +2818 1 26 29 -0.32768000000000000000e5 +2818 3 6 19 -0.32768000000000000000e5 +2818 3 8 21 0.13107200000000000000e6 +2818 3 9 22 0.65536000000000000000e5 +2818 3 14 27 0.13107200000000000000e6 +2818 4 3 15 -0.32768000000000000000e5 +2818 4 4 15 0.32768000000000000000e5 +2818 4 4 16 0.65536000000000000000e5 +2819 1 3 26 -0.32768000000000000000e5 +2819 1 6 37 0.32768000000000000000e5 +2819 1 9 40 0.65536000000000000000e5 +2819 1 10 25 -0.65536000000000000000e5 +2819 2 3 33 0.32768000000000000000e5 +2819 2 4 18 -0.32768000000000000000e5 +2819 3 4 17 -0.32768000000000000000e5 +2819 3 5 18 -0.32768000000000000000e5 +2819 3 6 19 -0.65536000000000000000e5 +2819 3 8 21 0.13107200000000000000e6 +2819 4 3 15 -0.65536000000000000000e5 +2819 4 4 17 0.32768000000000000000e5 +2820 1 1 48 0.32768000000000000000e5 +2820 1 2 49 0.65536000000000000000e5 +2820 1 3 50 0.65536000000000000000e5 +2820 1 11 42 -0.13107200000000000000e6 +2820 1 12 43 -0.26214400000000000000e6 +2820 1 17 48 0.26214400000000000000e6 +2820 1 23 38 0.32768000000000000000e5 +2820 1 25 40 -0.32768000000000000000e5 +2820 1 26 41 0.65536000000000000000e5 +2820 2 2 32 0.32768000000000000000e5 +2820 2 3 33 0.32768000000000000000e5 +2820 2 5 27 -0.32768000000000000000e5 +2820 2 8 22 -0.13107200000000000000e6 +2820 2 12 26 0.13107200000000000000e6 +2820 2 16 30 0.65536000000000000000e5 +2820 3 2 31 0.13107200000000000000e6 +2820 3 14 27 0.26214400000000000000e6 +2820 4 4 16 0.13107200000000000000e6 +2820 4 4 18 0.32768000000000000000e5 +2821 1 1 48 -0.16384000000000000000e5 +2821 1 2 49 -0.16384000000000000000e5 +2821 1 5 52 0.65536000000000000000e5 +2821 1 8 39 -0.32768000000000000000e5 +2821 1 10 41 0.13107200000000000000e6 +2821 1 11 42 0.13107200000000000000e6 +2821 1 12 43 0.13107200000000000000e6 +2821 1 17 48 -0.39321600000000000000e6 +2821 1 23 38 -0.16384000000000000000e5 +2821 1 26 29 0.32768000000000000000e5 +2821 1 26 41 0.32768000000000000000e5 +2821 1 28 43 0.65536000000000000000e5 +2821 2 2 32 -0.16384000000000000000e5 +2821 2 4 34 0.32768000000000000000e5 +2821 2 8 22 0.19660800000000000000e6 +2821 2 12 26 -0.65536000000000000000e5 +2821 2 16 30 -0.32768000000000000000e5 +2821 3 2 31 -0.65536000000000000000e5 +2821 3 14 27 -0.26214400000000000000e6 +2821 4 4 16 -0.19660800000000000000e6 +2821 4 4 19 0.32768000000000000000e5 +2821 4 6 18 -0.32768000000000000000e5 +2821 4 7 19 -0.65536000000000000000e5 +2822 1 6 53 -0.32768000000000000000e5 +2822 1 25 40 0.32768000000000000000e5 +2822 2 3 33 -0.32768000000000000000e5 +2822 2 18 32 0.32768000000000000000e5 +2822 3 3 32 -0.32768000000000000000e5 +2822 3 17 30 0.65536000000000000000e5 +2822 3 22 27 -0.65536000000000000000e5 +2822 4 4 20 0.32768000000000000000e5 +2823 1 2 17 -0.65536000000000000000e5 +2823 1 3 18 -0.65536000000000000000e5 +2823 1 3 34 -0.65536000000000000000e5 +2823 1 4 19 -0.13107200000000000000e6 +2823 1 20 27 0.26214400000000000000e6 +2823 1 28 35 -0.13107200000000000000e6 +2823 2 4 10 -0.32768000000000000000e5 +2823 2 6 12 -0.65536000000000000000e5 +2823 2 7 21 0.32768000000000000000e5 +2823 2 10 24 -0.13107200000000000000e6 +2823 3 1 14 -0.65536000000000000000e5 +2823 3 2 15 0.13107200000000000000e6 +2823 3 5 10 -0.32768000000000000000e5 +2823 3 6 7 0.32768000000000000000e5 +2823 3 8 13 0.13107200000000000000e6 +2823 3 11 24 -0.13107200000000000000e6 +2823 4 5 6 0.32768000000000000000e5 +2824 2 4 10 -0.32768000000000000000e5 +2824 2 7 21 0.32768000000000000000e5 +2824 4 5 7 0.32768000000000000000e5 +2825 1 1 8 0.81920000000000000000e4 +2825 1 1 40 0.40960000000000000000e4 +2825 1 2 5 -0.40960000000000000000e4 +2825 1 2 9 0.16384000000000000000e5 +2825 1 2 17 -0.65536000000000000000e5 +2825 1 3 18 -0.98304000000000000000e5 +2825 1 3 34 -0.65536000000000000000e5 +2825 1 4 19 -0.13107200000000000000e6 +2825 1 4 35 -0.65536000000000000000e5 +2825 1 6 13 0.16384000000000000000e5 +2825 1 7 22 -0.81920000000000000000e4 +2825 1 7 38 0.81920000000000000000e4 +2825 1 8 23 -0.24576000000000000000e5 +2825 1 10 41 0.16384000000000000000e5 +2825 1 11 42 0.16384000000000000000e5 +2825 1 13 16 -0.13107200000000000000e6 +2825 1 16 31 0.13107200000000000000e6 +2825 1 18 25 -0.32768000000000000000e5 +2825 1 20 27 0.26214400000000000000e6 +2825 1 28 35 -0.65536000000000000000e5 +2825 2 1 3 0.40960000000000000000e4 +2825 2 2 16 -0.40960000000000000000e4 +2825 2 4 10 -0.16384000000000000000e5 +2825 2 6 12 -0.65536000000000000000e5 +2825 2 7 21 0.16384000000000000000e5 +2825 2 8 22 0.16384000000000000000e5 +2825 2 9 23 -0.32768000000000000000e5 +2825 2 10 24 -0.13107200000000000000e6 +2825 3 1 2 0.40960000000000000000e4 +2825 3 1 14 0.32768000000000000000e5 +2825 3 2 15 0.19660800000000000000e6 +2825 3 3 16 -0.40960000000000000000e4 +2825 3 4 17 -0.40960000000000000000e4 +2825 3 6 7 0.16384000000000000000e5 +2825 3 6 19 -0.81920000000000000000e4 +2825 3 7 20 0.16384000000000000000e5 +2825 3 8 13 0.19660800000000000000e6 +2825 3 8 21 0.16384000000000000000e5 +2825 3 9 22 0.16384000000000000000e5 +2825 3 11 24 -0.65536000000000000000e5 +2825 4 1 5 0.81920000000000000000e4 +2825 4 1 13 -0.40960000000000000000e4 +2825 4 2 2 -0.81920000000000000000e4 +2825 4 2 14 -0.81920000000000000000e4 +2825 4 4 8 0.16384000000000000000e5 +2825 4 5 5 0.32768000000000000000e5 +2825 4 5 8 0.32768000000000000000e5 +2825 4 8 8 0.13107200000000000000e6 +2826 1 2 17 -0.32768000000000000000e5 +2826 1 3 34 -0.32768000000000000000e5 +2826 1 4 19 -0.65536000000000000000e5 +2826 1 4 35 0.32768000000000000000e5 +2826 1 18 25 0.32768000000000000000e5 +2826 1 20 27 0.13107200000000000000e6 +2826 1 28 35 -0.13107200000000000000e6 +2826 2 6 12 -0.32768000000000000000e5 +2826 2 9 23 0.32768000000000000000e5 +2826 2 10 24 -0.65536000000000000000e5 +2826 3 1 14 0.32768000000000000000e5 +2826 3 8 13 0.65536000000000000000e5 +2826 3 11 24 -0.13107200000000000000e6 +2826 4 5 9 0.32768000000000000000e5 +2827 4 5 10 0.32768000000000000000e5 +2827 4 8 8 -0.65536000000000000000e5 +2828 1 1 24 0.16384000000000000000e5 +2828 1 1 32 -0.65536000000000000000e5 +2828 1 1 40 0.16384000000000000000e5 +2828 1 2 17 0.13107200000000000000e6 +2828 1 2 33 0.13107200000000000000e6 +2828 1 2 49 0.16384000000000000000e5 +2828 1 3 34 -0.26214400000000000000e6 +2828 1 3 50 -0.32768000000000000000e5 +2828 1 5 52 0.65536000000000000000e5 +2828 1 6 37 0.16384000000000000000e5 +2828 1 10 41 0.13107200000000000000e6 +2828 1 11 42 -0.13107200000000000000e6 +2828 1 12 43 -0.26214400000000000000e6 +2828 1 16 47 0.13107200000000000000e6 +2828 1 17 48 0.13107200000000000000e6 +2828 1 22 37 -0.16384000000000000000e5 +2828 1 28 43 0.65536000000000000000e5 +2828 2 1 31 -0.65536000000000000000e5 +2828 2 2 16 0.16384000000000000000e5 +2828 2 2 32 0.16384000000000000000e5 +2828 2 3 17 -0.16384000000000000000e5 +2828 2 4 26 0.16384000000000000000e5 +2828 2 7 21 0.13107200000000000000e6 +2828 2 8 22 -0.65536000000000000000e5 +2828 2 10 32 -0.65536000000000000000e5 +2828 2 12 26 0.13107200000000000000e6 +2828 2 16 16 -0.32768000000000000000e5 +2828 3 1 14 -0.13107200000000000000e6 +2828 3 1 16 0.16384000000000000000e5 +2828 3 1 30 0.65536000000000000000e5 +2828 3 2 31 0.65536000000000000000e5 +2828 3 3 16 0.16384000000000000000e5 +2828 3 6 19 -0.32768000000000000000e5 +2828 3 6 23 -0.13107200000000000000e6 +2828 3 7 20 0.19660800000000000000e6 +2828 3 8 21 0.13107200000000000000e6 +2828 3 14 27 0.26214400000000000000e6 +2828 4 1 13 0.16384000000000000000e5 +2828 4 2 14 -0.32768000000000000000e5 +2828 4 4 16 0.65536000000000000000e5 +2828 4 5 11 0.32768000000000000000e5 +2828 4 5 17 0.32768000000000000000e5 +2828 4 7 19 -0.65536000000000000000e5 +2828 4 11 11 0.32768000000000000000e5 +2829 4 2 14 -0.32768000000000000000e5 +2829 4 5 12 0.32768000000000000000e5 +2830 1 2 33 -0.65536000000000000000e5 +2830 1 7 38 0.32768000000000000000e5 +2830 1 8 23 -0.32768000000000000000e5 +2830 1 9 40 0.32768000000000000000e5 +2830 1 10 25 -0.32768000000000000000e5 +2830 1 11 42 0.65536000000000000000e5 +2830 1 12 43 0.13107200000000000000e6 +2830 1 17 48 -0.13107200000000000000e6 +2830 2 8 22 0.65536000000000000000e5 +2830 2 12 26 -0.65536000000000000000e5 +2830 3 6 19 -0.32768000000000000000e5 +2830 3 7 20 0.65536000000000000000e5 +2830 3 8 21 0.65536000000000000000e5 +2830 3 14 27 -0.13107200000000000000e6 +2830 4 2 14 -0.32768000000000000000e5 +2830 4 3 15 -0.32768000000000000000e5 +2830 4 4 16 -0.65536000000000000000e5 +2830 4 5 13 0.32768000000000000000e5 +2831 1 1 32 0.32768000000000000000e5 +2831 1 2 17 -0.65536000000000000000e5 +2831 1 3 34 0.65536000000000000000e5 +2831 1 10 41 -0.32768000000000000000e5 +2831 2 1 31 0.32768000000000000000e5 +2831 2 7 21 -0.32768000000000000000e5 +2831 3 1 14 0.65536000000000000000e5 +2831 3 8 21 -0.32768000000000000000e5 +2831 4 5 14 0.32768000000000000000e5 +2832 1 2 33 0.32768000000000000000e5 +2832 1 3 34 -0.65536000000000000000e5 +2832 1 11 42 -0.32768000000000000000e5 +2832 1 12 43 -0.65536000000000000000e5 +2832 1 16 47 0.65536000000000000000e5 +2832 1 17 48 0.65536000000000000000e5 +2832 2 8 22 -0.32768000000000000000e5 +2832 2 12 26 0.32768000000000000000e5 +2832 3 7 20 0.32768000000000000000e5 +2832 3 8 21 0.32768000000000000000e5 +2832 3 13 26 0.65536000000000000000e5 +2832 3 14 27 0.65536000000000000000e5 +2832 4 4 16 0.32768000000000000000e5 +2832 4 5 15 0.32768000000000000000e5 +2833 1 3 34 0.32768000000000000000e5 +2833 1 4 35 -0.32768000000000000000e5 +2833 1 12 43 -0.32768000000000000000e5 +2833 1 16 47 -0.32768000000000000000e5 +2833 1 18 25 -0.32768000000000000000e5 +2833 1 28 35 0.65536000000000000000e5 +2833 2 9 23 -0.32768000000000000000e5 +2833 3 6 23 0.32768000000000000000e5 +2833 3 10 23 -0.65536000000000000000e5 +2833 3 11 24 0.65536000000000000000e5 +2833 3 13 26 -0.32768000000000000000e5 +2833 4 5 16 0.32768000000000000000e5 +2834 1 5 52 0.65536000000000000000e5 +2834 1 9 40 -0.32768000000000000000e5 +2834 1 10 41 0.65536000000000000000e5 +2834 1 17 48 -0.13107200000000000000e6 +2834 1 26 41 0.32768000000000000000e5 +2834 1 28 43 0.65536000000000000000e5 +2834 2 8 22 0.65536000000000000000e5 +2834 3 1 30 0.32768000000000000000e5 +2834 3 2 31 -0.65536000000000000000e5 +2834 4 4 16 -0.65536000000000000000e5 +2834 4 5 18 0.32768000000000000000e5 +2834 4 6 18 -0.32768000000000000000e5 +2834 4 7 19 -0.65536000000000000000e5 +2835 1 2 33 -0.32768000000000000000e5 +2835 1 3 34 0.65536000000000000000e5 +2835 1 11 42 0.32768000000000000000e5 +2835 1 12 43 0.65536000000000000000e5 +2835 1 16 47 -0.65536000000000000000e5 +2835 1 17 48 -0.65536000000000000000e5 +2835 2 7 21 -0.32768000000000000000e5 +2835 2 8 22 0.32768000000000000000e5 +2835 2 10 32 0.32768000000000000000e5 +2835 2 12 26 -0.32768000000000000000e5 +2835 3 7 20 -0.32768000000000000000e5 +2835 3 8 21 -0.32768000000000000000e5 +2835 3 13 26 -0.65536000000000000000e5 +2835 3 14 27 -0.65536000000000000000e5 +2835 4 4 16 -0.32768000000000000000e5 +2835 4 5 19 0.32768000000000000000e5 +2836 1 3 50 0.32768000000000000000e5 +2836 1 7 54 -0.32768000000000000000e5 +2836 1 11 42 -0.65536000000000000000e5 +2836 1 12 43 -0.13107200000000000000e6 +2836 1 17 48 0.13107200000000000000e6 +2836 1 37 44 0.65536000000000000000e5 +2836 2 8 22 -0.65536000000000000000e5 +2836 2 12 26 0.65536000000000000000e5 +2836 3 2 31 0.65536000000000000000e5 +2836 3 14 27 0.13107200000000000000e6 +2836 3 16 29 0.32768000000000000000e5 +2836 3 17 30 0.32768000000000000000e5 +2836 4 4 16 0.65536000000000000000e5 +2836 4 5 20 0.32768000000000000000e5 +2837 2 4 10 -0.16384000000000000000e5 +2837 2 7 21 0.16384000000000000000e5 +2837 4 6 6 0.32768000000000000000e5 +2838 4 4 8 -0.32768000000000000000e5 +2838 4 6 7 0.32768000000000000000e5 +2839 1 2 17 -0.32768000000000000000e5 +2839 1 3 34 -0.32768000000000000000e5 +2839 1 4 19 -0.65536000000000000000e5 +2839 1 4 35 0.32768000000000000000e5 +2839 1 18 25 0.32768000000000000000e5 +2839 1 20 27 0.13107200000000000000e6 +2839 1 28 35 -0.13107200000000000000e6 +2839 2 6 12 -0.32768000000000000000e5 +2839 2 9 23 0.32768000000000000000e5 +2839 2 10 24 -0.65536000000000000000e5 +2839 3 1 14 0.32768000000000000000e5 +2839 3 8 13 0.65536000000000000000e5 +2839 3 11 24 -0.13107200000000000000e6 +2839 4 6 8 0.32768000000000000000e5 +2840 1 2 17 -0.32768000000000000000e5 +2840 1 3 18 -0.32768000000000000000e5 +2840 1 3 34 -0.32768000000000000000e5 +2840 1 4 19 -0.65536000000000000000e5 +2840 1 10 17 0.65536000000000000000e5 +2840 1 11 14 -0.32768000000000000000e5 +2840 1 18 25 0.32768000000000000000e5 +2840 1 20 27 0.13107200000000000000e6 +2840 1 28 35 -0.13107200000000000000e6 +2840 2 6 12 -0.32768000000000000000e5 +2840 2 9 11 -0.32768000000000000000e5 +2840 2 9 23 0.32768000000000000000e5 +2840 2 10 24 -0.65536000000000000000e5 +2840 3 2 15 0.65536000000000000000e5 +2840 3 11 24 -0.13107200000000000000e6 +2840 4 6 9 0.32768000000000000000e5 +2841 4 2 14 -0.32768000000000000000e5 +2841 4 6 11 0.32768000000000000000e5 +2842 1 2 33 -0.65536000000000000000e5 +2842 1 7 38 0.32768000000000000000e5 +2842 1 8 23 -0.32768000000000000000e5 +2842 1 9 40 0.32768000000000000000e5 +2842 1 10 25 -0.32768000000000000000e5 +2842 1 11 42 0.65536000000000000000e5 +2842 1 12 43 0.13107200000000000000e6 +2842 1 17 48 -0.13107200000000000000e6 +2842 2 8 22 0.65536000000000000000e5 +2842 2 12 26 -0.65536000000000000000e5 +2842 3 6 19 -0.32768000000000000000e5 +2842 3 7 20 0.65536000000000000000e5 +2842 3 8 21 0.65536000000000000000e5 +2842 3 14 27 -0.13107200000000000000e6 +2842 4 2 14 -0.32768000000000000000e5 +2842 4 3 15 -0.32768000000000000000e5 +2842 4 4 16 -0.65536000000000000000e5 +2842 4 6 12 0.32768000000000000000e5 +2843 4 3 15 -0.32768000000000000000e5 +2843 4 6 13 0.32768000000000000000e5 +2844 1 2 33 0.32768000000000000000e5 +2844 1 3 34 -0.65536000000000000000e5 +2844 1 11 42 -0.32768000000000000000e5 +2844 1 12 43 -0.65536000000000000000e5 +2844 1 16 47 0.65536000000000000000e5 +2844 1 17 48 0.65536000000000000000e5 +2844 2 8 22 -0.32768000000000000000e5 +2844 2 12 26 0.32768000000000000000e5 +2844 3 7 20 0.32768000000000000000e5 +2844 3 8 21 0.32768000000000000000e5 +2844 3 13 26 0.65536000000000000000e5 +2844 3 14 27 0.65536000000000000000e5 +2844 4 4 16 0.32768000000000000000e5 +2844 4 6 14 0.32768000000000000000e5 +2845 1 2 33 0.32768000000000000000e5 +2845 1 4 35 0.13107200000000000000e6 +2845 1 11 42 -0.32768000000000000000e5 +2845 1 18 25 0.65536000000000000000e5 +2845 1 28 35 -0.13107200000000000000e6 +2845 2 8 22 -0.32768000000000000000e5 +2845 2 9 23 0.65536000000000000000e5 +2845 2 12 26 0.32768000000000000000e5 +2845 3 9 22 -0.32768000000000000000e5 +2845 3 11 24 -0.13107200000000000000e6 +2845 4 6 15 0.32768000000000000000e5 +2846 1 3 34 0.32768000000000000000e5 +2846 1 4 19 -0.65536000000000000000e5 +2846 1 12 43 -0.32768000000000000000e5 +2846 1 13 44 0.65536000000000000000e5 +2846 1 16 47 -0.32768000000000000000e5 +2846 1 17 48 -0.32768000000000000000e5 +2846 1 18 25 -0.32768000000000000000e5 +2846 1 28 35 0.65536000000000000000e5 +2846 2 9 23 -0.32768000000000000000e5 +2846 3 8 13 0.65536000000000000000e5 +2846 3 11 24 0.65536000000000000000e5 +2846 3 13 26 -0.32768000000000000000e5 +2846 3 14 27 -0.32768000000000000000e5 +2846 4 6 16 0.32768000000000000000e5 +2847 1 5 52 0.65536000000000000000e5 +2847 1 9 40 -0.32768000000000000000e5 +2847 1 10 41 0.65536000000000000000e5 +2847 1 17 48 -0.13107200000000000000e6 +2847 1 26 41 0.32768000000000000000e5 +2847 1 28 43 0.65536000000000000000e5 +2847 2 8 22 0.65536000000000000000e5 +2847 3 1 30 0.32768000000000000000e5 +2847 3 2 31 -0.65536000000000000000e5 +2847 4 4 16 -0.65536000000000000000e5 +2847 4 6 17 0.32768000000000000000e5 +2847 4 6 18 -0.32768000000000000000e5 +2847 4 7 19 -0.65536000000000000000e5 +2848 2 12 26 -0.32768000000000000000e5 +2848 2 20 34 0.32768000000000000000e5 +2848 4 6 19 0.32768000000000000000e5 +2848 4 8 20 0.32768000000000000000e5 +2849 1 3 50 0.32768000000000000000e5 +2849 1 5 52 0.65536000000000000000e5 +2849 1 7 54 -0.32768000000000000000e5 +2849 1 17 48 -0.13107200000000000000e6 +2849 1 28 43 0.65536000000000000000e5 +2849 1 32 47 0.65536000000000000000e5 +2849 2 8 22 0.65536000000000000000e5 +2849 3 17 30 0.32768000000000000000e5 +2849 3 22 27 0.32768000000000000000e5 +2849 4 4 16 -0.65536000000000000000e5 +2849 4 6 20 0.32768000000000000000e5 +2849 4 7 19 -0.65536000000000000000e5 +2850 2 5 11 -0.16384000000000000000e5 +2850 2 8 22 0.16384000000000000000e5 +2850 4 7 7 0.32768000000000000000e5 +2851 1 2 17 -0.32768000000000000000e5 +2851 1 3 18 -0.32768000000000000000e5 +2851 1 3 34 -0.32768000000000000000e5 +2851 1 4 19 -0.65536000000000000000e5 +2851 1 10 17 0.65536000000000000000e5 +2851 1 11 14 -0.32768000000000000000e5 +2851 1 18 25 0.32768000000000000000e5 +2851 1 20 27 0.13107200000000000000e6 +2851 1 28 35 -0.13107200000000000000e6 +2851 2 6 12 -0.32768000000000000000e5 +2851 2 9 11 -0.32768000000000000000e5 +2851 2 9 23 0.32768000000000000000e5 +2851 2 10 24 -0.65536000000000000000e5 +2851 3 2 15 0.65536000000000000000e5 +2851 3 11 24 -0.13107200000000000000e6 +2851 4 7 8 0.32768000000000000000e5 +2852 2 9 11 -0.32768000000000000000e5 +2852 2 9 23 0.32768000000000000000e5 +2852 4 7 9 0.32768000000000000000e5 +2853 1 4 19 -0.32768000000000000000e5 +2853 1 5 36 -0.32768000000000000000e5 +2853 1 17 32 0.65536000000000000000e5 +2853 1 28 35 -0.32768000000000000000e5 +2853 2 8 14 -0.32768000000000000000e5 +2853 3 8 13 0.32768000000000000000e5 +2853 3 11 24 -0.32768000000000000000e5 +2853 4 7 10 0.32768000000000000000e5 +2854 1 2 33 -0.65536000000000000000e5 +2854 1 7 38 0.32768000000000000000e5 +2854 1 8 23 -0.32768000000000000000e5 +2854 1 9 40 0.32768000000000000000e5 +2854 1 10 25 -0.32768000000000000000e5 +2854 1 11 42 0.65536000000000000000e5 +2854 1 12 43 0.13107200000000000000e6 +2854 1 17 48 -0.13107200000000000000e6 +2854 2 8 22 0.65536000000000000000e5 +2854 2 12 26 -0.65536000000000000000e5 +2854 3 6 19 -0.32768000000000000000e5 +2854 3 7 20 0.65536000000000000000e5 +2854 3 8 21 0.65536000000000000000e5 +2854 3 14 27 -0.13107200000000000000e6 +2854 4 2 14 -0.32768000000000000000e5 +2854 4 3 15 -0.32768000000000000000e5 +2854 4 4 16 -0.65536000000000000000e5 +2854 4 7 11 0.32768000000000000000e5 +2855 4 3 15 -0.32768000000000000000e5 +2855 4 7 12 0.32768000000000000000e5 +2856 1 4 35 -0.13107200000000000000e6 +2856 1 6 29 0.32768000000000000000e5 +2856 1 17 48 0.13107200000000000000e6 +2856 1 26 29 -0.32768000000000000000e5 +2856 3 6 19 -0.32768000000000000000e5 +2856 3 8 21 0.13107200000000000000e6 +2856 3 9 22 0.65536000000000000000e5 +2856 3 14 27 0.13107200000000000000e6 +2856 4 3 15 -0.32768000000000000000e5 +2856 4 4 16 0.65536000000000000000e5 +2856 4 7 13 0.32768000000000000000e5 +2857 1 2 33 0.32768000000000000000e5 +2857 1 4 35 0.13107200000000000000e6 +2857 1 11 42 -0.32768000000000000000e5 +2857 1 18 25 0.65536000000000000000e5 +2857 1 28 35 -0.13107200000000000000e6 +2857 2 8 22 -0.32768000000000000000e5 +2857 2 9 23 0.65536000000000000000e5 +2857 2 12 26 0.32768000000000000000e5 +2857 3 9 22 -0.32768000000000000000e5 +2857 3 11 24 -0.13107200000000000000e6 +2857 4 7 14 0.32768000000000000000e5 +2858 4 4 16 -0.32768000000000000000e5 +2858 4 7 15 0.32768000000000000000e5 +2859 1 12 43 -0.32768000000000000000e5 +2859 1 17 48 -0.32768000000000000000e5 +2859 1 18 25 -0.32768000000000000000e5 +2859 1 28 35 0.65536000000000000000e5 +2859 2 9 23 -0.32768000000000000000e5 +2859 3 14 19 0.32768000000000000000e5 +2859 3 14 27 -0.32768000000000000000e5 +2859 4 7 16 0.32768000000000000000e5 +2860 4 6 18 -0.32768000000000000000e5 +2860 4 7 17 0.32768000000000000000e5 +2861 1 1 48 -0.16384000000000000000e5 +2861 1 2 49 -0.16384000000000000000e5 +2861 1 5 52 0.65536000000000000000e5 +2861 1 8 39 -0.32768000000000000000e5 +2861 1 10 41 0.13107200000000000000e6 +2861 1 11 42 0.13107200000000000000e6 +2861 1 12 43 0.13107200000000000000e6 +2861 1 17 48 -0.39321600000000000000e6 +2861 1 23 38 -0.16384000000000000000e5 +2861 1 26 29 0.32768000000000000000e5 +2861 1 26 41 0.32768000000000000000e5 +2861 1 28 43 0.65536000000000000000e5 +2861 2 2 32 -0.16384000000000000000e5 +2861 2 4 34 0.32768000000000000000e5 +2861 2 8 22 0.19660800000000000000e6 +2861 2 12 26 -0.65536000000000000000e5 +2861 2 16 30 -0.32768000000000000000e5 +2861 3 2 31 -0.65536000000000000000e5 +2861 3 14 27 -0.26214400000000000000e6 +2861 4 4 16 -0.19660800000000000000e6 +2861 4 6 18 -0.32768000000000000000e5 +2861 4 7 18 0.32768000000000000000e5 +2861 4 7 19 -0.65536000000000000000e5 +2862 3 5 34 0.32768000000000000000e5 +2862 3 17 30 0.32768000000000000000e5 +2862 3 18 31 -0.65536000000000000000e5 +2862 3 22 27 0.32768000000000000000e5 +2862 4 7 20 0.32768000000000000000e5 +2863 4 6 10 -0.32768000000000000000e5 +2863 4 8 9 0.32768000000000000000e5 +2864 1 4 19 0.16384000000000000000e5 +2864 1 5 20 0.16384000000000000000e5 +2864 1 10 17 0.32768000000000000000e5 +2864 1 13 16 0.32768000000000000000e5 +2864 1 16 31 -0.32768000000000000000e5 +2864 1 17 32 -0.32768000000000000000e5 +2864 1 28 35 -0.16384000000000000000e5 +2864 2 8 14 0.16384000000000000000e5 +2864 3 2 15 0.16384000000000000000e5 +2864 3 8 13 0.16384000000000000000e5 +2864 3 10 15 -0.65536000000000000000e5 +2864 3 11 24 -0.16384000000000000000e5 +2864 4 6 10 0.16384000000000000000e5 +2864 4 8 10 0.32768000000000000000e5 +2865 1 1 32 0.32768000000000000000e5 +2865 1 2 17 -0.65536000000000000000e5 +2865 1 3 34 0.65536000000000000000e5 +2865 1 10 41 -0.32768000000000000000e5 +2865 2 1 31 0.32768000000000000000e5 +2865 2 7 21 -0.32768000000000000000e5 +2865 3 1 14 0.65536000000000000000e5 +2865 3 8 21 -0.32768000000000000000e5 +2865 4 8 11 0.32768000000000000000e5 +2866 1 2 33 0.32768000000000000000e5 +2866 1 3 34 -0.65536000000000000000e5 +2866 1 11 42 -0.32768000000000000000e5 +2866 1 12 43 -0.65536000000000000000e5 +2866 1 16 47 0.65536000000000000000e5 +2866 1 17 48 0.65536000000000000000e5 +2866 2 8 22 -0.32768000000000000000e5 +2866 2 12 26 0.32768000000000000000e5 +2866 3 7 20 0.32768000000000000000e5 +2866 3 8 21 0.32768000000000000000e5 +2866 3 13 26 0.65536000000000000000e5 +2866 3 14 27 0.65536000000000000000e5 +2866 4 4 16 0.32768000000000000000e5 +2866 4 8 12 0.32768000000000000000e5 +2867 1 2 33 0.32768000000000000000e5 +2867 1 4 35 0.13107200000000000000e6 +2867 1 11 42 -0.32768000000000000000e5 +2867 1 18 25 0.65536000000000000000e5 +2867 1 28 35 -0.13107200000000000000e6 +2867 2 8 22 -0.32768000000000000000e5 +2867 2 9 23 0.65536000000000000000e5 +2867 2 12 26 0.32768000000000000000e5 +2867 3 9 22 -0.32768000000000000000e5 +2867 3 11 24 -0.13107200000000000000e6 +2867 4 8 13 0.32768000000000000000e5 +2868 1 3 34 0.32768000000000000000e5 +2868 1 4 35 -0.32768000000000000000e5 +2868 1 12 43 -0.32768000000000000000e5 +2868 1 16 47 -0.32768000000000000000e5 +2868 1 18 25 -0.32768000000000000000e5 +2868 1 28 35 0.65536000000000000000e5 +2868 2 9 23 -0.32768000000000000000e5 +2868 3 6 23 0.32768000000000000000e5 +2868 3 10 23 -0.65536000000000000000e5 +2868 3 11 24 0.65536000000000000000e5 +2868 3 13 26 -0.32768000000000000000e5 +2868 4 8 14 0.32768000000000000000e5 +2869 1 3 34 0.32768000000000000000e5 +2869 1 4 19 -0.65536000000000000000e5 +2869 1 12 43 -0.32768000000000000000e5 +2869 1 13 44 0.65536000000000000000e5 +2869 1 16 47 -0.32768000000000000000e5 +2869 1 17 48 -0.32768000000000000000e5 +2869 1 18 25 -0.32768000000000000000e5 +2869 1 28 35 0.65536000000000000000e5 +2869 2 9 23 -0.32768000000000000000e5 +2869 3 8 13 0.65536000000000000000e5 +2869 3 11 24 0.65536000000000000000e5 +2869 3 13 26 -0.32768000000000000000e5 +2869 3 14 27 -0.32768000000000000000e5 +2869 4 8 15 0.32768000000000000000e5 +2870 4 8 16 0.32768000000000000000e5 +2870 4 10 14 -0.32768000000000000000e5 +2871 1 2 33 -0.32768000000000000000e5 +2871 1 3 34 0.65536000000000000000e5 +2871 1 11 42 0.32768000000000000000e5 +2871 1 12 43 0.65536000000000000000e5 +2871 1 16 47 -0.65536000000000000000e5 +2871 1 17 48 -0.65536000000000000000e5 +2871 2 7 21 -0.32768000000000000000e5 +2871 2 8 22 0.32768000000000000000e5 +2871 2 10 32 0.32768000000000000000e5 +2871 2 12 26 -0.32768000000000000000e5 +2871 3 7 20 -0.32768000000000000000e5 +2871 3 8 21 -0.32768000000000000000e5 +2871 3 13 26 -0.65536000000000000000e5 +2871 3 14 27 -0.65536000000000000000e5 +2871 4 4 16 -0.32768000000000000000e5 +2871 4 8 17 0.32768000000000000000e5 +2872 2 12 26 -0.32768000000000000000e5 +2872 2 20 34 0.32768000000000000000e5 +2872 4 8 18 0.32768000000000000000e5 +2872 4 8 20 0.32768000000000000000e5 +2873 1 5 52 0.16384000000000000000e5 +2873 1 11 42 -0.16384000000000000000e5 +2873 1 13 44 -0.65536000000000000000e5 +2873 1 34 41 0.65536000000000000000e5 +2873 2 12 26 0.16384000000000000000e5 +2873 2 20 34 -0.16384000000000000000e5 +2873 3 2 31 0.16384000000000000000e5 +2873 3 13 26 0.32768000000000000000e5 +2873 3 14 27 0.65536000000000000000e5 +2873 4 7 19 -0.16384000000000000000e5 +2873 4 8 19 0.32768000000000000000e5 +2873 4 8 20 -0.16384000000000000000e5 +2874 1 4 19 -0.16384000000000000000e5 +2874 1 5 36 -0.16384000000000000000e5 +2874 1 17 32 0.32768000000000000000e5 +2874 1 28 35 -0.16384000000000000000e5 +2874 2 8 14 -0.16384000000000000000e5 +2874 3 8 13 0.16384000000000000000e5 +2874 3 11 24 -0.16384000000000000000e5 +2874 4 9 9 0.32768000000000000000e5 +2875 1 6 21 -0.32768000000000000000e5 +2875 1 10 17 0.16384000000000000000e5 +2875 1 10 21 0.65536000000000000000e5 +2875 1 13 20 -0.65536000000000000000e5 +2875 1 20 27 0.32768000000000000000e5 +2875 1 28 35 -0.16384000000000000000e5 +2875 2 9 15 -0.32768000000000000000e5 +2875 2 11 25 0.32768000000000000000e5 +2875 3 2 15 0.16384000000000000000e5 +2875 3 8 13 0.16384000000000000000e5 +2875 3 11 24 -0.16384000000000000000e5 +2875 4 6 10 0.16384000000000000000e5 +2875 4 9 10 0.32768000000000000000e5 +2876 1 2 33 0.32768000000000000000e5 +2876 1 3 34 -0.65536000000000000000e5 +2876 1 11 42 -0.32768000000000000000e5 +2876 1 12 43 -0.65536000000000000000e5 +2876 1 16 47 0.65536000000000000000e5 +2876 1 17 48 0.65536000000000000000e5 +2876 2 8 22 -0.32768000000000000000e5 +2876 2 12 26 0.32768000000000000000e5 +2876 3 7 20 0.32768000000000000000e5 +2876 3 8 21 0.32768000000000000000e5 +2876 3 13 26 0.65536000000000000000e5 +2876 3 14 27 0.65536000000000000000e5 +2876 4 4 16 0.32768000000000000000e5 +2876 4 9 11 0.32768000000000000000e5 +2877 1 2 33 0.32768000000000000000e5 +2877 1 4 35 0.13107200000000000000e6 +2877 1 11 42 -0.32768000000000000000e5 +2877 1 18 25 0.65536000000000000000e5 +2877 1 28 35 -0.13107200000000000000e6 +2877 2 8 22 -0.32768000000000000000e5 +2877 2 9 23 0.65536000000000000000e5 +2877 2 12 26 0.32768000000000000000e5 +2877 3 9 22 -0.32768000000000000000e5 +2877 3 11 24 -0.13107200000000000000e6 +2877 4 9 12 0.32768000000000000000e5 +2878 4 4 16 -0.32768000000000000000e5 +2878 4 9 13 0.32768000000000000000e5 +2879 1 3 34 0.32768000000000000000e5 +2879 1 4 19 -0.65536000000000000000e5 +2879 1 12 43 -0.32768000000000000000e5 +2879 1 13 44 0.65536000000000000000e5 +2879 1 16 47 -0.32768000000000000000e5 +2879 1 17 48 -0.32768000000000000000e5 +2879 1 18 25 -0.32768000000000000000e5 +2879 1 28 35 0.65536000000000000000e5 +2879 2 9 23 -0.32768000000000000000e5 +2879 3 8 13 0.65536000000000000000e5 +2879 3 11 24 0.65536000000000000000e5 +2879 3 13 26 -0.32768000000000000000e5 +2879 3 14 27 -0.32768000000000000000e5 +2879 4 9 14 0.32768000000000000000e5 +2880 1 12 43 -0.32768000000000000000e5 +2880 1 17 48 -0.32768000000000000000e5 +2880 1 18 25 -0.32768000000000000000e5 +2880 1 28 35 0.65536000000000000000e5 +2880 2 9 23 -0.32768000000000000000e5 +2880 3 14 19 0.32768000000000000000e5 +2880 3 14 27 -0.32768000000000000000e5 +2880 4 9 15 0.32768000000000000000e5 +2881 1 4 19 0.32768000000000000000e5 +2881 1 5 36 0.32768000000000000000e5 +2881 1 13 44 -0.32768000000000000000e5 +2881 1 14 45 -0.32768000000000000000e5 +2881 1 17 32 -0.65536000000000000000e5 +2881 1 19 42 0.65536000000000000000e5 +2881 3 8 13 -0.32768000000000000000e5 +2881 3 11 24 0.32768000000000000000e5 +2881 4 9 16 0.32768000000000000000e5 +2882 2 12 26 -0.32768000000000000000e5 +2882 2 20 34 0.32768000000000000000e5 +2882 4 8 20 0.32768000000000000000e5 +2882 4 9 17 0.32768000000000000000e5 +2883 4 7 19 -0.32768000000000000000e5 +2883 4 9 18 0.32768000000000000000e5 +2884 1 5 52 0.16384000000000000000e5 +2884 1 11 42 -0.16384000000000000000e5 +2884 1 13 52 0.65536000000000000000e5 +2884 1 14 45 -0.65536000000000000000e5 +2884 1 17 48 0.32768000000000000000e5 +2884 1 18 25 0.32768000000000000000e5 +2884 1 18 49 0.32768000000000000000e5 +2884 1 28 35 -0.65536000000000000000e5 +2884 2 12 26 0.16384000000000000000e5 +2884 2 20 34 -0.16384000000000000000e5 +2884 2 24 30 0.32768000000000000000e5 +2884 3 2 31 0.16384000000000000000e5 +2884 3 14 19 -0.32768000000000000000e5 +2884 3 14 27 0.65536000000000000000e5 +2884 3 15 28 0.65536000000000000000e5 +2884 4 7 19 -0.16384000000000000000e5 +2884 4 8 20 -0.16384000000000000000e5 +2884 4 9 19 0.32768000000000000000e5 +2885 1 17 48 0.65536000000000000000e5 +2885 1 28 43 -0.32768000000000000000e5 +2885 1 32 47 -0.32768000000000000000e5 +2885 1 33 48 -0.32768000000000000000e5 +2885 2 8 22 -0.32768000000000000000e5 +2885 3 18 31 0.32768000000000000000e5 +2885 3 24 29 -0.65536000000000000000e5 +2885 4 4 16 0.32768000000000000000e5 +2885 4 7 19 0.32768000000000000000e5 +2885 4 9 20 0.32768000000000000000e5 +2886 1 3 34 0.32768000000000000000e5 +2886 1 4 35 -0.32768000000000000000e5 +2886 1 12 43 -0.32768000000000000000e5 +2886 1 16 47 -0.32768000000000000000e5 +2886 1 18 25 -0.32768000000000000000e5 +2886 1 28 35 0.65536000000000000000e5 +2886 2 9 23 -0.32768000000000000000e5 +2886 3 6 23 0.32768000000000000000e5 +2886 3 10 23 -0.65536000000000000000e5 +2886 3 11 24 0.65536000000000000000e5 +2886 3 13 26 -0.32768000000000000000e5 +2886 4 10 11 0.32768000000000000000e5 +2887 1 3 34 0.32768000000000000000e5 +2887 1 4 19 -0.65536000000000000000e5 +2887 1 12 43 -0.32768000000000000000e5 +2887 1 13 44 0.65536000000000000000e5 +2887 1 16 47 -0.32768000000000000000e5 +2887 1 17 48 -0.32768000000000000000e5 +2887 1 18 25 -0.32768000000000000000e5 +2887 1 28 35 0.65536000000000000000e5 +2887 2 9 23 -0.32768000000000000000e5 +2887 3 8 13 0.65536000000000000000e5 +2887 3 11 24 0.65536000000000000000e5 +2887 3 13 26 -0.32768000000000000000e5 +2887 3 14 27 -0.32768000000000000000e5 +2887 4 10 12 0.32768000000000000000e5 +2888 1 12 43 -0.32768000000000000000e5 +2888 1 17 48 -0.32768000000000000000e5 +2888 1 18 25 -0.32768000000000000000e5 +2888 1 28 35 0.65536000000000000000e5 +2888 2 9 23 -0.32768000000000000000e5 +2888 3 14 19 0.32768000000000000000e5 +2888 3 14 27 -0.32768000000000000000e5 +2888 4 10 13 0.32768000000000000000e5 +2889 1 4 19 0.32768000000000000000e5 +2889 1 5 36 0.32768000000000000000e5 +2889 1 13 44 -0.32768000000000000000e5 +2889 1 14 45 -0.32768000000000000000e5 +2889 1 17 32 -0.65536000000000000000e5 +2889 1 19 42 0.65536000000000000000e5 +2889 3 8 13 -0.32768000000000000000e5 +2889 3 11 24 0.32768000000000000000e5 +2889 4 10 15 0.32768000000000000000e5 +2890 2 11 25 -0.32768000000000000000e5 +2890 2 15 29 0.32768000000000000000e5 +2890 4 10 16 0.32768000000000000000e5 +2891 1 5 52 0.16384000000000000000e5 +2891 1 11 42 -0.16384000000000000000e5 +2891 1 13 44 -0.65536000000000000000e5 +2891 1 34 41 0.65536000000000000000e5 +2891 2 12 26 0.16384000000000000000e5 +2891 2 20 34 -0.16384000000000000000e5 +2891 3 2 31 0.16384000000000000000e5 +2891 3 13 26 0.32768000000000000000e5 +2891 3 14 27 0.65536000000000000000e5 +2891 4 7 19 -0.16384000000000000000e5 +2891 4 8 20 -0.16384000000000000000e5 +2891 4 10 17 0.32768000000000000000e5 +2892 1 5 52 0.16384000000000000000e5 +2892 1 11 42 -0.16384000000000000000e5 +2892 1 13 52 0.65536000000000000000e5 +2892 1 14 45 -0.65536000000000000000e5 +2892 1 17 48 0.32768000000000000000e5 +2892 1 18 25 0.32768000000000000000e5 +2892 1 18 49 0.32768000000000000000e5 +2892 1 28 35 -0.65536000000000000000e5 +2892 2 12 26 0.16384000000000000000e5 +2892 2 20 34 -0.16384000000000000000e5 +2892 2 24 30 0.32768000000000000000e5 +2892 3 2 31 0.16384000000000000000e5 +2892 3 14 19 -0.32768000000000000000e5 +2892 3 14 27 0.65536000000000000000e5 +2892 3 15 28 0.65536000000000000000e5 +2892 4 7 19 -0.16384000000000000000e5 +2892 4 8 20 -0.16384000000000000000e5 +2892 4 10 18 0.32768000000000000000e5 +2893 1 13 44 0.32768000000000000000e5 +2893 1 13 52 -0.32768000000000000000e5 +2893 1 19 42 -0.65536000000000000000e5 +2893 1 19 50 0.65536000000000000000e5 +2893 1 28 35 0.32768000000000000000e5 +2893 1 34 41 -0.32768000000000000000e5 +2893 3 15 28 0.32768000000000000000e5 +2893 4 10 19 0.32768000000000000000e5 +2894 1 5 52 -0.16384000000000000000e5 +2894 1 11 42 0.16384000000000000000e5 +2894 1 12 43 0.32768000000000000000e5 +2894 1 13 52 -0.65536000000000000000e5 +2894 1 14 45 0.65536000000000000000e5 +2894 1 16 55 0.65536000000000000000e5 +2894 1 17 48 -0.32768000000000000000e5 +2894 1 18 49 -0.32768000000000000000e5 +2894 1 28 43 -0.16384000000000000000e5 +2894 1 32 47 -0.16384000000000000000e5 +2894 1 34 49 -0.32768000000000000000e5 +2894 1 37 44 -0.16384000000000000000e5 +2894 2 12 26 -0.16384000000000000000e5 +2894 2 24 30 -0.32768000000000000000e5 +2894 3 2 31 -0.16384000000000000000e5 +2894 3 14 27 -0.32768000000000000000e5 +2894 3 15 28 -0.65536000000000000000e5 +2894 3 18 31 0.16384000000000000000e5 +2894 3 24 29 0.32768000000000000000e5 +2894 4 7 19 0.16384000000000000000e5 +2894 4 8 20 0.16384000000000000000e5 +2894 4 10 20 0.32768000000000000000e5 +2895 2 2 32 0.32768000000000000000e5 +2895 2 3 17 -0.32768000000000000000e5 +2895 4 1 13 0.32768000000000000000e5 +2895 4 11 12 0.32768000000000000000e5 +2896 1 2 49 -0.32768000000000000000e5 +2896 1 3 50 0.65536000000000000000e5 +2896 1 23 38 -0.32768000000000000000e5 +2896 1 24 39 -0.32768000000000000000e5 +2896 2 4 26 -0.32768000000000000000e5 +2896 4 11 13 0.32768000000000000000e5 +2897 4 5 17 -0.32768000000000000000e5 +2897 4 11 14 0.32768000000000000000e5 +2898 1 5 52 0.65536000000000000000e5 +2898 1 9 40 -0.32768000000000000000e5 +2898 1 10 41 0.65536000000000000000e5 +2898 1 17 48 -0.13107200000000000000e6 +2898 1 26 41 0.32768000000000000000e5 +2898 1 28 43 0.65536000000000000000e5 +2898 2 8 22 0.65536000000000000000e5 +2898 3 1 30 0.32768000000000000000e5 +2898 3 2 31 -0.65536000000000000000e5 +2898 4 4 16 -0.65536000000000000000e5 +2898 4 6 18 -0.32768000000000000000e5 +2898 4 7 19 -0.65536000000000000000e5 +2898 4 11 15 0.32768000000000000000e5 +2899 1 2 33 -0.32768000000000000000e5 +2899 1 3 34 0.65536000000000000000e5 +2899 1 11 42 0.32768000000000000000e5 +2899 1 12 43 0.65536000000000000000e5 +2899 1 16 47 -0.65536000000000000000e5 +2899 1 17 48 -0.65536000000000000000e5 +2899 2 7 21 -0.32768000000000000000e5 +2899 2 8 22 0.32768000000000000000e5 +2899 2 10 32 0.32768000000000000000e5 +2899 2 12 26 -0.32768000000000000000e5 +2899 3 7 20 -0.32768000000000000000e5 +2899 3 8 21 -0.32768000000000000000e5 +2899 3 13 26 -0.65536000000000000000e5 +2899 3 14 27 -0.65536000000000000000e5 +2899 4 4 16 -0.32768000000000000000e5 +2899 4 11 16 0.32768000000000000000e5 +2900 2 1 35 0.32768000000000000000e5 +2900 2 2 32 -0.32768000000000000000e5 +2900 4 11 17 0.32768000000000000000e5 +2901 1 2 49 0.32768000000000000000e5 +2901 1 3 50 -0.65536000000000000000e5 +2901 1 23 38 0.32768000000000000000e5 +2901 1 24 39 0.32768000000000000000e5 +2901 2 26 32 0.32768000000000000000e5 +2901 4 11 18 0.32768000000000000000e5 +2901 4 17 17 0.65536000000000000000e5 +2902 1 3 50 0.32768000000000000000e5 +2902 1 7 54 -0.32768000000000000000e5 +2902 1 11 42 -0.65536000000000000000e5 +2902 1 12 43 -0.13107200000000000000e6 +2902 1 17 48 0.13107200000000000000e6 +2902 1 37 44 0.65536000000000000000e5 +2902 2 8 22 -0.65536000000000000000e5 +2902 2 12 26 0.65536000000000000000e5 +2902 3 2 31 0.65536000000000000000e5 +2902 3 14 27 0.13107200000000000000e6 +2902 3 16 29 0.32768000000000000000e5 +2902 3 17 30 0.32768000000000000000e5 +2902 4 4 16 0.65536000000000000000e5 +2902 4 11 19 0.32768000000000000000e5 +2903 4 11 20 0.32768000000000000000e5 +2903 4 17 17 -0.65536000000000000000e5 +2904 1 2 49 -0.16384000000000000000e5 +2904 1 3 50 0.32768000000000000000e5 +2904 1 23 38 -0.16384000000000000000e5 +2904 1 24 39 -0.16384000000000000000e5 +2904 2 4 26 -0.16384000000000000000e5 +2904 4 12 12 0.32768000000000000000e5 +2905 1 3 26 -0.32768000000000000000e5 +2905 1 6 37 0.32768000000000000000e5 +2905 1 9 40 0.65536000000000000000e5 +2905 1 10 25 -0.65536000000000000000e5 +2905 2 3 33 0.32768000000000000000e5 +2905 2 4 18 -0.32768000000000000000e5 +2905 3 4 17 -0.32768000000000000000e5 +2905 3 5 18 -0.32768000000000000000e5 +2905 3 6 19 -0.65536000000000000000e5 +2905 3 8 21 0.13107200000000000000e6 +2905 4 3 15 -0.65536000000000000000e5 +2905 4 12 13 0.32768000000000000000e5 +2906 1 5 52 0.65536000000000000000e5 +2906 1 9 40 -0.32768000000000000000e5 +2906 1 10 41 0.65536000000000000000e5 +2906 1 17 48 -0.13107200000000000000e6 +2906 1 26 41 0.32768000000000000000e5 +2906 1 28 43 0.65536000000000000000e5 +2906 2 8 22 0.65536000000000000000e5 +2906 3 1 30 0.32768000000000000000e5 +2906 3 2 31 -0.65536000000000000000e5 +2906 4 4 16 -0.65536000000000000000e5 +2906 4 6 18 -0.32768000000000000000e5 +2906 4 7 19 -0.65536000000000000000e5 +2906 4 12 14 0.32768000000000000000e5 +2907 4 6 18 -0.32768000000000000000e5 +2907 4 12 15 0.32768000000000000000e5 +2908 2 12 26 -0.32768000000000000000e5 +2908 2 20 34 0.32768000000000000000e5 +2908 4 8 20 0.32768000000000000000e5 +2908 4 12 16 0.32768000000000000000e5 +2909 1 2 49 0.32768000000000000000e5 +2909 1 3 50 -0.65536000000000000000e5 +2909 1 23 38 0.32768000000000000000e5 +2909 1 24 39 0.32768000000000000000e5 +2909 2 26 32 0.32768000000000000000e5 +2909 4 12 17 0.32768000000000000000e5 +2909 4 17 17 0.65536000000000000000e5 +2910 2 3 33 -0.32768000000000000000e5 +2910 2 18 32 0.32768000000000000000e5 +2910 4 12 18 0.32768000000000000000e5 +2911 1 3 50 0.32768000000000000000e5 +2911 1 5 52 0.65536000000000000000e5 +2911 1 7 54 -0.32768000000000000000e5 +2911 1 17 48 -0.13107200000000000000e6 +2911 1 28 43 0.65536000000000000000e5 +2911 1 32 47 0.65536000000000000000e5 +2911 2 8 22 0.65536000000000000000e5 +2911 3 17 30 0.32768000000000000000e5 +2911 3 22 27 0.32768000000000000000e5 +2911 4 4 16 -0.65536000000000000000e5 +2911 4 7 19 -0.65536000000000000000e5 +2911 4 12 19 0.32768000000000000000e5 +2912 1 2 49 0.32768000000000000000e5 +2912 1 7 54 -0.65536000000000000000e5 +2912 1 22 53 0.32768000000000000000e5 +2912 1 24 39 0.32768000000000000000e5 +2912 2 3 33 0.32768000000000000000e5 +2912 2 18 32 -0.32768000000000000000e5 +2912 2 26 32 0.32768000000000000000e5 +2912 3 4 33 0.32768000000000000000e5 +2912 3 6 35 0.65536000000000000000e5 +2912 3 17 30 -0.65536000000000000000e5 +2912 3 19 32 0.32768000000000000000e5 +2912 3 20 33 -0.65536000000000000000e5 +2912 4 12 20 0.32768000000000000000e5 +2913 1 1 48 0.16384000000000000000e5 +2913 1 2 49 0.32768000000000000000e5 +2913 1 3 50 0.32768000000000000000e5 +2913 1 11 42 -0.65536000000000000000e5 +2913 1 12 43 -0.13107200000000000000e6 +2913 1 17 48 0.13107200000000000000e6 +2913 1 23 38 0.16384000000000000000e5 +2913 1 25 40 -0.16384000000000000000e5 +2913 1 26 41 0.32768000000000000000e5 +2913 2 2 32 0.16384000000000000000e5 +2913 2 3 33 0.16384000000000000000e5 +2913 2 5 27 -0.16384000000000000000e5 +2913 2 8 22 -0.65536000000000000000e5 +2913 2 12 26 0.65536000000000000000e5 +2913 2 16 30 0.32768000000000000000e5 +2913 3 2 31 0.65536000000000000000e5 +2913 3 14 27 0.13107200000000000000e6 +2913 4 4 16 0.65536000000000000000e5 +2913 4 13 13 0.32768000000000000000e5 +2914 4 6 18 -0.32768000000000000000e5 +2914 4 13 14 0.32768000000000000000e5 +2915 1 1 48 -0.16384000000000000000e5 +2915 1 2 49 -0.16384000000000000000e5 +2915 1 5 52 0.65536000000000000000e5 +2915 1 8 39 -0.32768000000000000000e5 +2915 1 10 41 0.13107200000000000000e6 +2915 1 11 42 0.13107200000000000000e6 +2915 1 12 43 0.13107200000000000000e6 +2915 1 17 48 -0.39321600000000000000e6 +2915 1 23 38 -0.16384000000000000000e5 +2915 1 26 29 0.32768000000000000000e5 +2915 1 26 41 0.32768000000000000000e5 +2915 1 28 43 0.65536000000000000000e5 +2915 2 2 32 -0.16384000000000000000e5 +2915 2 4 34 0.32768000000000000000e5 +2915 2 8 22 0.19660800000000000000e6 +2915 2 12 26 -0.65536000000000000000e5 +2915 2 16 30 -0.32768000000000000000e5 +2915 3 2 31 -0.65536000000000000000e5 +2915 3 14 27 -0.26214400000000000000e6 +2915 4 4 16 -0.19660800000000000000e6 +2915 4 6 18 -0.32768000000000000000e5 +2915 4 7 19 -0.65536000000000000000e5 +2915 4 13 15 0.32768000000000000000e5 +2916 4 7 19 -0.32768000000000000000e5 +2916 4 13 16 0.32768000000000000000e5 +2917 2 3 33 -0.32768000000000000000e5 +2917 2 18 32 0.32768000000000000000e5 +2917 4 13 17 0.32768000000000000000e5 +2918 1 6 53 -0.32768000000000000000e5 +2918 1 25 40 0.32768000000000000000e5 +2918 2 3 33 -0.32768000000000000000e5 +2918 2 18 32 0.32768000000000000000e5 +2918 3 3 32 -0.32768000000000000000e5 +2918 3 17 30 0.65536000000000000000e5 +2918 3 22 27 -0.65536000000000000000e5 +2918 4 13 18 0.32768000000000000000e5 +2919 3 5 34 0.32768000000000000000e5 +2919 3 17 30 0.32768000000000000000e5 +2919 3 18 31 -0.65536000000000000000e5 +2919 3 22 27 0.32768000000000000000e5 +2919 4 13 19 0.32768000000000000000e5 +2920 1 6 53 0.32768000000000000000e5 +2920 1 23 54 -0.32768000000000000000e5 +2920 1 24 39 0.32768000000000000000e5 +2920 1 24 55 0.65536000000000000000e5 +2920 1 25 56 -0.32768000000000000000e5 +2920 1 26 41 -0.65536000000000000000e5 +2920 2 3 33 0.32768000000000000000e5 +2920 2 18 32 -0.32768000000000000000e5 +2920 3 3 32 0.32768000000000000000e5 +2920 3 4 33 0.32768000000000000000e5 +2920 3 17 30 -0.65536000000000000000e5 +2920 3 19 32 0.32768000000000000000e5 +2920 3 22 27 0.65536000000000000000e5 +2920 3 28 33 -0.32768000000000000000e5 +2920 4 13 20 0.32768000000000000000e5 +2921 1 2 33 -0.16384000000000000000e5 +2921 1 3 34 0.32768000000000000000e5 +2921 1 11 42 0.16384000000000000000e5 +2921 1 12 43 0.32768000000000000000e5 +2921 1 16 47 -0.32768000000000000000e5 +2921 1 17 48 -0.32768000000000000000e5 +2921 2 7 21 -0.16384000000000000000e5 +2921 2 8 22 0.16384000000000000000e5 +2921 2 10 32 0.16384000000000000000e5 +2921 2 12 26 -0.16384000000000000000e5 +2921 3 7 20 -0.16384000000000000000e5 +2921 3 8 21 -0.16384000000000000000e5 +2921 3 13 26 -0.32768000000000000000e5 +2921 3 14 27 -0.32768000000000000000e5 +2921 4 4 16 -0.16384000000000000000e5 +2921 4 14 14 0.32768000000000000000e5 +2922 2 12 26 -0.32768000000000000000e5 +2922 2 20 34 0.32768000000000000000e5 +2922 4 8 20 0.32768000000000000000e5 +2922 4 14 15 0.32768000000000000000e5 +2923 1 5 52 0.16384000000000000000e5 +2923 1 11 42 -0.16384000000000000000e5 +2923 1 13 44 -0.65536000000000000000e5 +2923 1 34 41 0.65536000000000000000e5 +2923 2 12 26 0.16384000000000000000e5 +2923 2 20 34 -0.16384000000000000000e5 +2923 3 2 31 0.16384000000000000000e5 +2923 3 13 26 0.32768000000000000000e5 +2923 3 14 27 0.65536000000000000000e5 +2923 4 7 19 -0.16384000000000000000e5 +2923 4 8 20 -0.16384000000000000000e5 +2923 4 14 16 0.32768000000000000000e5 +2924 1 3 50 0.32768000000000000000e5 +2924 1 7 54 -0.32768000000000000000e5 +2924 1 11 42 -0.65536000000000000000e5 +2924 1 12 43 -0.13107200000000000000e6 +2924 1 17 48 0.13107200000000000000e6 +2924 1 37 44 0.65536000000000000000e5 +2924 2 8 22 -0.65536000000000000000e5 +2924 2 12 26 0.65536000000000000000e5 +2924 3 2 31 0.65536000000000000000e5 +2924 3 14 27 0.13107200000000000000e6 +2924 3 16 29 0.32768000000000000000e5 +2924 3 17 30 0.32768000000000000000e5 +2924 4 4 16 0.65536000000000000000e5 +2924 4 14 17 0.32768000000000000000e5 +2925 1 3 50 0.32768000000000000000e5 +2925 1 5 52 0.65536000000000000000e5 +2925 1 7 54 -0.32768000000000000000e5 +2925 1 17 48 -0.13107200000000000000e6 +2925 1 28 43 0.65536000000000000000e5 +2925 1 32 47 0.65536000000000000000e5 +2925 2 8 22 0.65536000000000000000e5 +2925 3 17 30 0.32768000000000000000e5 +2925 3 22 27 0.32768000000000000000e5 +2925 4 4 16 -0.65536000000000000000e5 +2925 4 7 19 -0.65536000000000000000e5 +2925 4 14 18 0.32768000000000000000e5 +2926 4 8 20 -0.32768000000000000000e5 +2926 4 14 19 0.32768000000000000000e5 +2927 1 24 55 -0.32768000000000000000e5 +2927 1 26 41 0.32768000000000000000e5 +2927 1 32 47 -0.65536000000000000000e5 +2927 1 37 52 0.65536000000000000000e5 +2927 3 6 35 0.32768000000000000000e5 +2927 3 20 33 0.32768000000000000000e5 +2927 3 22 27 -0.32768000000000000000e5 +2927 4 14 20 0.32768000000000000000e5 +2928 4 7 19 -0.16384000000000000000e5 +2928 4 15 15 0.32768000000000000000e5 +2929 1 5 52 0.16384000000000000000e5 +2929 1 11 42 -0.16384000000000000000e5 +2929 1 13 52 0.65536000000000000000e5 +2929 1 14 45 -0.65536000000000000000e5 +2929 1 17 48 0.32768000000000000000e5 +2929 1 18 25 0.32768000000000000000e5 +2929 1 18 49 0.32768000000000000000e5 +2929 1 28 35 -0.65536000000000000000e5 +2929 2 12 26 0.16384000000000000000e5 +2929 2 20 34 -0.16384000000000000000e5 +2929 2 24 30 0.32768000000000000000e5 +2929 3 2 31 0.16384000000000000000e5 +2929 3 14 19 -0.32768000000000000000e5 +2929 3 14 27 0.65536000000000000000e5 +2929 3 15 28 0.65536000000000000000e5 +2929 4 7 19 -0.16384000000000000000e5 +2929 4 8 20 -0.16384000000000000000e5 +2929 4 15 16 0.32768000000000000000e5 +2930 1 3 50 0.32768000000000000000e5 +2930 1 5 52 0.65536000000000000000e5 +2930 1 7 54 -0.32768000000000000000e5 +2930 1 17 48 -0.13107200000000000000e6 +2930 1 28 43 0.65536000000000000000e5 +2930 1 32 47 0.65536000000000000000e5 +2930 2 8 22 0.65536000000000000000e5 +2930 3 17 30 0.32768000000000000000e5 +2930 3 22 27 0.32768000000000000000e5 +2930 4 4 16 -0.65536000000000000000e5 +2930 4 7 19 -0.65536000000000000000e5 +2930 4 15 17 0.32768000000000000000e5 +2931 3 5 34 0.32768000000000000000e5 +2931 3 17 30 0.32768000000000000000e5 +2931 3 18 31 -0.65536000000000000000e5 +2931 3 22 27 0.32768000000000000000e5 +2931 4 15 18 0.32768000000000000000e5 +2932 1 17 48 0.65536000000000000000e5 +2932 1 28 43 -0.32768000000000000000e5 +2932 1 32 47 -0.32768000000000000000e5 +2932 1 33 48 -0.32768000000000000000e5 +2932 2 8 22 -0.32768000000000000000e5 +2932 3 18 31 0.32768000000000000000e5 +2932 3 24 29 -0.65536000000000000000e5 +2932 4 4 16 0.32768000000000000000e5 +2932 4 7 19 0.32768000000000000000e5 +2932 4 15 19 0.32768000000000000000e5 +2933 2 4 34 -0.32768000000000000000e5 +2933 2 21 35 0.32768000000000000000e5 +2933 3 5 34 -0.32768000000000000000e5 +2933 3 17 30 -0.32768000000000000000e5 +2933 3 18 31 0.65536000000000000000e5 +2933 3 22 27 -0.32768000000000000000e5 +2933 4 15 20 0.32768000000000000000e5 +2934 1 13 44 0.16384000000000000000e5 +2934 1 13 52 -0.16384000000000000000e5 +2934 1 19 42 -0.32768000000000000000e5 +2934 1 19 50 0.32768000000000000000e5 +2934 1 28 35 0.16384000000000000000e5 +2934 1 34 41 -0.16384000000000000000e5 +2934 3 15 28 0.16384000000000000000e5 +2934 4 16 16 0.32768000000000000000e5 +2935 4 8 20 -0.32768000000000000000e5 +2935 4 16 17 0.32768000000000000000e5 +2936 1 17 48 0.65536000000000000000e5 +2936 1 28 43 -0.32768000000000000000e5 +2936 1 32 47 -0.32768000000000000000e5 +2936 1 33 48 -0.32768000000000000000e5 +2936 2 8 22 -0.32768000000000000000e5 +2936 3 18 31 0.32768000000000000000e5 +2936 3 24 29 -0.65536000000000000000e5 +2936 4 4 16 0.32768000000000000000e5 +2936 4 7 19 0.32768000000000000000e5 +2936 4 16 18 0.32768000000000000000e5 +2937 1 5 52 -0.16384000000000000000e5 +2937 1 11 42 0.16384000000000000000e5 +2937 1 12 43 0.32768000000000000000e5 +2937 1 13 52 -0.65536000000000000000e5 +2937 1 14 45 0.65536000000000000000e5 +2937 1 16 55 0.65536000000000000000e5 +2937 1 17 48 -0.32768000000000000000e5 +2937 1 18 49 -0.32768000000000000000e5 +2937 1 28 43 -0.16384000000000000000e5 +2937 1 32 47 -0.16384000000000000000e5 +2937 1 34 49 -0.32768000000000000000e5 +2937 1 37 44 -0.16384000000000000000e5 +2937 2 12 26 -0.16384000000000000000e5 +2937 2 24 30 -0.32768000000000000000e5 +2937 3 2 31 -0.16384000000000000000e5 +2937 3 14 27 -0.32768000000000000000e5 +2937 3 15 28 -0.65536000000000000000e5 +2937 3 18 31 0.16384000000000000000e5 +2937 3 24 29 0.32768000000000000000e5 +2937 4 7 19 0.16384000000000000000e5 +2937 4 8 20 0.16384000000000000000e5 +2937 4 16 19 0.32768000000000000000e5 +2938 1 2 49 0.32768000000000000000e5 +2938 1 7 54 -0.65536000000000000000e5 +2938 1 22 53 0.32768000000000000000e5 +2938 1 24 39 0.32768000000000000000e5 +2938 2 3 33 0.32768000000000000000e5 +2938 2 18 32 -0.32768000000000000000e5 +2938 2 26 32 0.32768000000000000000e5 +2938 3 4 33 0.32768000000000000000e5 +2938 3 6 35 0.65536000000000000000e5 +2938 3 17 30 -0.65536000000000000000e5 +2938 3 19 32 0.32768000000000000000e5 +2938 3 20 33 -0.65536000000000000000e5 +2938 4 17 18 0.32768000000000000000e5 +2939 1 24 55 -0.32768000000000000000e5 +2939 1 26 41 0.32768000000000000000e5 +2939 1 32 47 -0.65536000000000000000e5 +2939 1 37 52 0.65536000000000000000e5 +2939 3 6 35 0.32768000000000000000e5 +2939 3 20 33 0.32768000000000000000e5 +2939 3 22 27 -0.32768000000000000000e5 +2939 4 17 19 0.32768000000000000000e5 +2940 1 2 49 -0.32768000000000000000e5 +2940 1 7 54 0.65536000000000000000e5 +2940 1 22 53 -0.32768000000000000000e5 +2940 1 24 39 -0.32768000000000000000e5 +2940 2 3 33 -0.32768000000000000000e5 +2940 2 26 32 -0.32768000000000000000e5 +2940 2 32 32 0.65536000000000000000e5 +2940 3 4 33 -0.32768000000000000000e5 +2940 3 6 35 -0.65536000000000000000e5 +2940 3 17 30 0.65536000000000000000e5 +2940 3 19 32 -0.32768000000000000000e5 +2940 3 20 33 0.65536000000000000000e5 +2940 4 17 20 0.32768000000000000000e5 +2941 1 6 53 0.16384000000000000000e5 +2941 1 23 54 -0.16384000000000000000e5 +2941 1 24 39 0.16384000000000000000e5 +2941 1 24 55 0.32768000000000000000e5 +2941 1 25 56 -0.16384000000000000000e5 +2941 1 26 41 -0.32768000000000000000e5 +2941 2 3 33 0.16384000000000000000e5 +2941 2 18 32 -0.16384000000000000000e5 +2941 3 3 32 0.16384000000000000000e5 +2941 3 4 33 0.16384000000000000000e5 +2941 3 17 30 -0.32768000000000000000e5 +2941 3 19 32 0.16384000000000000000e5 +2941 3 22 27 0.32768000000000000000e5 +2941 3 28 33 -0.16384000000000000000e5 +2941 4 18 18 0.32768000000000000000e5 +2942 2 4 34 -0.32768000000000000000e5 +2942 2 21 35 0.32768000000000000000e5 +2942 3 5 34 -0.32768000000000000000e5 +2942 3 17 30 -0.32768000000000000000e5 +2942 3 18 31 0.65536000000000000000e5 +2942 3 22 27 -0.32768000000000000000e5 +2942 4 18 19 0.32768000000000000000e5 +2943 1 1 48 -0.65536000000000000000e5 +2943 1 2 49 -0.98304000000000000000e5 +2943 1 3 50 -0.13107200000000000000e6 +2943 1 11 42 0.26214400000000000000e6 +2943 1 12 43 0.52428800000000000000e6 +2943 1 17 48 -0.52428800000000000000e6 +2943 1 23 38 -0.65536000000000000000e5 +2943 1 23 54 0.32768000000000000000e5 +2943 1 24 39 -0.32768000000000000000e5 +2943 1 38 53 -0.32768000000000000000e5 +2943 1 47 50 -0.65536000000000000000e5 +2943 1 47 54 -0.32768000000000000000e5 +2943 2 2 32 -0.65536000000000000000e5 +2943 2 3 33 -0.32768000000000000000e5 +2943 2 8 22 0.26214400000000000000e6 +2943 2 12 26 -0.26214400000000000000e6 +2943 2 16 30 -0.13107200000000000000e6 +2943 2 21 35 0.65536000000000000000e5 +2943 2 29 35 -0.65536000000000000000e5 +2943 3 2 31 -0.26214400000000000000e6 +2943 3 4 33 -0.32768000000000000000e5 +2943 3 14 27 -0.52428800000000000000e6 +2943 3 17 30 -0.65536000000000000000e5 +2943 3 19 32 -0.32768000000000000000e5 +2943 3 20 33 -0.65536000000000000000e5 +2943 3 22 35 0.65536000000000000000e5 +2943 3 28 33 0.32768000000000000000e5 +2943 3 29 34 -0.13107200000000000000e6 +2943 3 32 33 -0.32768000000000000000e5 +2943 4 4 16 -0.26214400000000000000e6 +2943 4 18 20 0.32768000000000000000e5 +2944 4 16 20 -0.16384000000000000000e5 +2944 4 19 19 0.32768000000000000000e5 +2945 2 21 35 -0.32768000000000000000e5 +2945 2 29 35 0.32768000000000000000e5 +2945 4 19 20 0.32768000000000000000e5 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +4310 +4 +56 35 56 35 +-0.13107200000000000000e6 0.0 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 -0.65536000000000000000e5 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.39321600000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 -0.65536000000000000000e5 -0.13107200000000000000e6 0.0 -0.26214400000000000000e6 0.0 0.0 -0.32768000000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 -0.39321600000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.39321600000000000000e6 -0.52428800000000000000e6 -0.13107200000000000000e6 -0.65536000000000000000e5 0.65536000000000000000e5 0.0 0.13107200000000000000e6 0.0 0.0 0.16384000000000000000e6 0.0 0.0 0.0 -0.65536000000000000000e5 0.0 0.0 0.0 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 -0.65536000000000000000e6 0.26214400000000000000e6 0.10485760000000000000e7 0.26214400000000000000e6 0.0 0.0 0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 -0.13107200000000000000e6 0.0 0.10485760000000000000e7 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.10485760000000000000e7 0.26214400000000000000e6 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.65536000000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 -0.13107200000000000000e6 0.10485760000000000000e7 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 -0.13107200000000000000e6 -0.13107200000000000000e6 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 -0.13107200000000000000e6 0.0 -0.65536000000000000000e5 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 -0.26214400000000000000e6 0.0 0.0 -0.13107200000000000000e6 -0.13107200000000000000e6 0.0 -0.65536000000000000000e5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 -0.32768000000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 -0.65536000000000000000e5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 -0.65536000000000000000e5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.32768000000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 -0.65536000000000000000e5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 -0.65536000000000000000e5 -0.16384000000000000000e6 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.32768000000000000000e6 0.0 0.0 -0.13107200000000000000e6 -0.65536000000000000000e5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.32768000000000000000e6 0.0 0.0 -0.26214400000000000000e6 0.0 -0.13107200000000000000e6 0.0 -0.65536000000000000000e5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.65536000000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 -0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.13107200000000000000e6 0.0 0.13107200000000000000e6 0.13107200000000000000e6 -0.13107200000000000000e7 -0.26214400000000000000e6 -0.26214400000000000000e6 0.0 -0.10485760000000000000e7 -0.52428800000000000000e6 0.0 -0.26214400000000000000e6 -0.26214400000000000000e6 0.0 0.0 -0.52428800000000000000e6 -0.10485760000000000000e7 0.0 0.0 0.0 -0.52428800000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 -0.52428800000000000000e6 -0.26214400000000000000e6 -0.26214400000000000000e6 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 -0.26214400000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.26214400000000000000e6 -0.52428800000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.26214400000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.26214400000000000000e6 0.0 0.65536000000000000000e5 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.26214400000000000000e6 -0.65536000000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.65536000000000000000e5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.16384000000000000000e6 0.65536000000000000000e5 -0.52428800000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 -0.65536000000000000000e6 0.0 0.32768000000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 -0.65536000000000000000e6 0.0 0.0 0.32768000000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.13107200000000000000e6 0.0 0.13107200000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.13107200000000000000e6 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.13107200000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 -0.13107200000000000000e6 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 -0.13107200000000000000e6 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 -0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 -0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.26214400000000000000e6 0.0 -0.26214400000000000000e6 -0.26214400000000000000e6 0.0 0.52428800000000000000e6 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 -0.26214400000000000000e6 0.26214400000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.65536000000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.65536000000000000000e6 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 -0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.13107200000000000000e6 0.0 +0 1 1 8 -0.65536000000000000000e5 +0 1 2 5 -0.32768000000000000000e5 +0 1 2 9 0.65536000000000000000e5 +0 1 2 25 0.32768000000000000000e5 +0 1 7 22 0.65536000000000000000e5 +0 1 8 23 -0.65536000000000000000e5 +0 2 1 1 -0.65536000000000000000e5 +0 3 1 22 -0.32768000000000000000e5 +0 3 2 3 -0.32768000000000000000e5 +0 4 1 1 0.65536000000000000000e5 +0 4 2 2 -0.65536000000000000000e5 +1 1 40 55 0.65536000000000000000e5 +1 1 55 56 -0.65536000000000000000e5 +1 3 49 50 -0.65536000000000000000e5 +1 3 53 54 -0.32768000000000000000e5 +1 3 53 56 -0.32768000000000000000e5 +1 3 54 56 -0.32768000000000000000e5 +1 3 56 56 -0.65536000000000000000e5 +2 1 1 48 0.16384000000000000000e5 +2 1 2 49 0.16384000000000000000e5 +2 1 8 39 0.32768000000000000000e5 +2 1 9 40 0.32768000000000000000e5 +2 1 10 41 -0.65536000000000000000e5 +2 1 12 43 -0.13107200000000000000e6 +2 1 23 38 0.16384000000000000000e5 +2 1 26 41 -0.32768000000000000000e5 +2 1 28 43 0.13107200000000000000e6 +2 1 32 47 0.13107200000000000000e6 +2 1 33 48 -0.65536000000000000000e5 +2 1 55 56 0.32768000000000000000e5 +2 2 2 32 0.16384000000000000000e5 +2 2 4 34 -0.32768000000000000000e5 +2 2 16 30 0.32768000000000000000e5 +2 2 20 34 0.65536000000000000000e5 +2 2 28 34 0.32768000000000000000e5 +2 3 5 50 -0.32768000000000000000e5 +2 3 9 38 0.32768000000000000000e5 +2 3 10 55 0.65536000000000000000e5 +2 3 14 51 0.13107200000000000000e6 +2 3 22 35 0.13107200000000000000e6 +2 3 26 55 -0.32768000000000000000e5 +2 3 27 40 -0.32768000000000000000e5 +2 3 28 41 0.13107200000000000000e6 +2 3 29 42 -0.65536000000000000000e5 +2 3 30 43 -0.65536000000000000000e5 +2 3 39 52 0.65536000000000000000e5 +2 3 40 55 -0.32768000000000000000e5 +2 3 42 55 0.65536000000000000000e5 +2 3 43 56 -0.32768000000000000000e5 +2 3 50 55 0.65536000000000000000e5 +2 3 51 56 -0.32768000000000000000e5 +2 3 55 56 -0.32768000000000000000e5 +2 4 2 30 0.32768000000000000000e5 +2 4 6 34 0.65536000000000000000e5 +2 4 19 31 -0.65536000000000000000e5 +2 4 21 33 0.32768000000000000000e5 +3 1 40 55 0.65536000000000000000e5 +3 1 54 55 -0.65536000000000000000e5 +3 3 49 50 -0.65536000000000000000e5 +3 3 53 54 -0.32768000000000000000e5 +3 3 54 56 -0.32768000000000000000e5 +4 1 1 48 -0.32768000000000000000e5 +4 1 2 49 -0.32768000000000000000e5 +4 1 8 39 -0.65536000000000000000e5 +4 1 9 40 -0.65536000000000000000e5 +4 1 10 41 0.13107200000000000000e6 +4 1 12 43 0.26214400000000000000e6 +4 1 23 38 -0.32768000000000000000e5 +4 1 24 55 0.65536000000000000000e5 +4 1 26 41 0.65536000000000000000e5 +4 1 28 43 -0.26214400000000000000e6 +4 1 32 47 -0.26214400000000000000e6 +4 1 49 56 0.32768000000000000000e5 +4 1 53 56 0.32768000000000000000e5 +4 2 2 32 -0.32768000000000000000e5 +4 2 4 34 0.65536000000000000000e5 +4 2 16 30 -0.65536000000000000000e5 +4 2 20 34 -0.13107200000000000000e6 +4 3 5 50 0.65536000000000000000e5 +4 3 9 38 -0.65536000000000000000e5 +4 3 22 35 -0.26214400000000000000e6 +4 3 22 51 -0.65536000000000000000e5 +4 3 23 52 0.13107200000000000000e6 +4 3 27 40 0.65536000000000000000e5 +4 3 28 41 -0.26214400000000000000e6 +4 3 38 51 0.65536000000000000000e5 +4 3 41 54 0.65536000000000000000e5 +4 3 41 56 0.65536000000000000000e5 +4 3 53 54 -0.32768000000000000000e5 +4 3 53 56 -0.32768000000000000000e5 +4 4 2 30 -0.65536000000000000000e5 +4 4 6 34 -0.13107200000000000000e6 +4 4 7 35 -0.65536000000000000000e5 +5 1 18 49 0.65536000000000000000e5 +5 1 52 55 -0.65536000000000000000e5 +5 3 14 51 -0.65536000000000000000e5 +5 3 35 48 -0.65536000000000000000e5 +5 3 45 50 -0.65536000000000000000e5 +5 3 50 55 -0.32768000000000000000e5 +5 3 55 55 -0.65536000000000000000e5 +6 1 1 48 0.16384000000000000000e5 +6 1 2 49 0.16384000000000000000e5 +6 1 8 39 0.32768000000000000000e5 +6 1 9 40 0.32768000000000000000e5 +6 1 10 41 -0.65536000000000000000e5 +6 1 12 43 -0.13107200000000000000e6 +6 1 23 38 0.16384000000000000000e5 +6 1 26 41 -0.32768000000000000000e5 +6 1 28 43 0.13107200000000000000e6 +6 1 32 47 0.13107200000000000000e6 +6 1 33 48 -0.65536000000000000000e5 +6 1 54 55 0.32768000000000000000e5 +6 2 2 32 0.16384000000000000000e5 +6 2 4 34 -0.32768000000000000000e5 +6 2 16 30 0.32768000000000000000e5 +6 2 20 34 0.65536000000000000000e5 +6 2 28 34 0.32768000000000000000e5 +6 3 5 50 -0.32768000000000000000e5 +6 3 9 38 0.32768000000000000000e5 +6 3 10 55 0.65536000000000000000e5 +6 3 14 51 0.13107200000000000000e6 +6 3 22 35 0.13107200000000000000e6 +6 3 26 55 -0.32768000000000000000e5 +6 3 27 40 -0.32768000000000000000e5 +6 3 28 41 0.13107200000000000000e6 +6 3 29 42 -0.65536000000000000000e5 +6 3 30 43 -0.65536000000000000000e5 +6 3 39 52 0.65536000000000000000e5 +6 3 40 55 -0.32768000000000000000e5 +6 3 42 55 0.65536000000000000000e5 +6 3 43 56 -0.32768000000000000000e5 +6 3 51 56 -0.32768000000000000000e5 +6 4 2 30 0.32768000000000000000e5 +6 4 6 34 0.65536000000000000000e5 +6 4 19 31 -0.65536000000000000000e5 +6 4 21 33 0.32768000000000000000e5 +7 1 40 55 -0.32768000000000000000e5 +7 1 41 56 -0.32768000000000000000e5 +7 1 55 56 0.32768000000000000000e5 +7 2 28 34 -0.32768000000000000000e5 +7 3 27 56 -0.32768000000000000000e5 +7 3 41 54 -0.32768000000000000000e5 +7 3 41 56 -0.32768000000000000000e5 +7 3 47 52 0.65536000000000000000e5 +7 4 29 33 0.32768000000000000000e5 +8 1 1 48 -0.65536000000000000000e5 +8 1 2 49 -0.98304000000000000000e5 +8 1 6 53 0.32768000000000000000e5 +8 1 8 39 -0.13107200000000000000e6 +8 1 9 40 -0.13107200000000000000e6 +8 1 10 41 0.26214400000000000000e6 +8 1 12 43 0.52428800000000000000e6 +8 1 23 38 -0.65536000000000000000e5 +8 1 24 39 -0.32768000000000000000e5 +8 1 26 41 0.19660800000000000000e6 +8 1 28 43 -0.39321600000000000000e6 +8 1 32 47 -0.52428800000000000000e6 +8 1 47 54 -0.32768000000000000000e5 +8 1 49 56 0.32768000000000000000e5 +8 2 2 32 -0.65536000000000000000e5 +8 2 3 33 -0.32768000000000000000e5 +8 2 4 34 0.65536000000000000000e5 +8 2 5 35 0.32768000000000000000e5 +8 2 16 30 -0.13107200000000000000e6 +8 2 20 34 -0.26214400000000000000e6 +8 2 33 35 -0.32768000000000000000e5 +8 3 5 50 0.65536000000000000000e5 +8 3 9 38 -0.13107200000000000000e6 +8 3 22 35 -0.52428800000000000000e6 +8 3 25 38 -0.32768000000000000000e5 +8 3 25 54 0.32768000000000000000e5 +8 3 28 41 -0.52428800000000000000e6 +8 3 39 40 0.32768000000000000000e5 +8 3 40 53 0.32768000000000000000e5 +8 3 48 53 -0.32768000000000000000e5 +8 3 53 54 -0.32768000000000000000e5 +8 4 2 30 -0.13107200000000000000e6 +8 4 6 34 -0.26214400000000000000e6 +9 1 1 48 0.65536000000000000000e5 +9 1 2 49 0.98304000000000000000e5 +9 1 6 53 -0.32768000000000000000e5 +9 1 8 39 0.13107200000000000000e6 +9 1 9 40 0.13107200000000000000e6 +9 1 10 41 -0.26214400000000000000e6 +9 1 12 43 -0.52428800000000000000e6 +9 1 23 38 0.65536000000000000000e5 +9 1 24 39 0.32768000000000000000e5 +9 1 26 41 -0.19660800000000000000e6 +9 1 28 43 0.39321600000000000000e6 +9 1 32 47 0.52428800000000000000e6 +9 1 41 56 -0.65536000000000000000e5 +9 1 47 54 0.32768000000000000000e5 +9 1 49 56 -0.32768000000000000000e5 +9 1 53 56 0.32768000000000000000e5 +9 2 2 32 0.65536000000000000000e5 +9 2 3 33 0.32768000000000000000e5 +9 2 4 34 -0.65536000000000000000e5 +9 2 5 35 -0.32768000000000000000e5 +9 2 16 30 0.13107200000000000000e6 +9 2 20 34 0.26214400000000000000e6 +9 2 33 35 0.32768000000000000000e5 +9 2 35 35 -0.65536000000000000000e5 +9 3 5 50 -0.65536000000000000000e5 +9 3 9 38 0.13107200000000000000e6 +9 3 22 35 0.52428800000000000000e6 +9 3 25 38 0.32768000000000000000e5 +9 3 25 54 -0.32768000000000000000e5 +9 3 28 41 0.52428800000000000000e6 +9 3 39 40 -0.32768000000000000000e5 +9 3 40 53 -0.32768000000000000000e5 +9 3 41 56 -0.65536000000000000000e5 +9 3 48 53 0.32768000000000000000e5 +9 4 2 30 0.13107200000000000000e6 +9 4 6 34 0.26214400000000000000e6 +10 1 18 49 -0.32768000000000000000e5 +10 1 34 49 0.32768000000000000000e5 +10 1 44 51 -0.32768000000000000000e5 +10 1 52 55 0.32768000000000000000e5 +10 3 14 43 -0.32768000000000000000e5 +10 3 15 44 0.65536000000000000000e5 +10 3 17 30 0.65536000000000000000e5 +10 3 19 56 0.65536000000000000000e5 +10 3 32 45 0.65536000000000000000e5 +10 3 35 40 -0.32768000000000000000e5 +10 3 35 48 0.32768000000000000000e5 +10 3 35 56 -0.32768000000000000000e5 +10 3 43 52 -0.32768000000000000000e5 +10 3 52 55 -0.32768000000000000000e5 +10 4 25 33 0.32768000000000000000e5 +11 1 1 48 0.81920000000000000000e4 +11 1 2 49 0.81920000000000000000e4 +11 1 8 39 0.16384000000000000000e5 +11 1 9 40 0.16384000000000000000e5 +11 1 10 41 -0.32768000000000000000e5 +11 1 12 43 -0.65536000000000000000e5 +11 1 23 38 0.81920000000000000000e4 +11 1 24 55 -0.16384000000000000000e5 +11 1 26 41 -0.16384000000000000000e5 +11 1 28 43 0.65536000000000000000e5 +11 1 32 47 0.65536000000000000000e5 +11 1 33 40 0.32768000000000000000e5 +11 1 40 55 0.16384000000000000000e5 +11 1 41 56 0.16384000000000000000e5 +11 1 46 53 -0.65536000000000000000e5 +11 2 2 32 0.81920000000000000000e4 +11 2 4 34 -0.16384000000000000000e5 +11 2 16 30 0.16384000000000000000e5 +11 2 20 34 0.32768000000000000000e5 +11 2 28 34 0.16384000000000000000e5 +11 3 5 50 -0.16384000000000000000e5 +11 3 9 38 0.16384000000000000000e5 +11 3 10 55 -0.32768000000000000000e5 +11 3 14 51 -0.65536000000000000000e5 +11 3 22 35 0.65536000000000000000e5 +11 3 22 51 0.16384000000000000000e5 +11 3 23 52 -0.32768000000000000000e5 +11 3 27 40 -0.16384000000000000000e5 +11 3 27 56 0.16384000000000000000e5 +11 3 28 41 0.65536000000000000000e5 +11 3 29 42 0.32768000000000000000e5 +11 3 30 43 0.32768000000000000000e5 +11 3 38 51 -0.16384000000000000000e5 +11 3 39 52 -0.32768000000000000000e5 +11 3 42 55 -0.32768000000000000000e5 +11 3 47 52 -0.32768000000000000000e5 +11 3 50 55 -0.32768000000000000000e5 +11 4 2 30 0.16384000000000000000e5 +11 4 6 34 0.32768000000000000000e5 +11 4 7 35 0.16384000000000000000e5 +11 4 19 31 0.32768000000000000000e5 +11 4 29 33 -0.16384000000000000000e5 +12 1 1 48 0.16384000000000000000e5 +12 1 2 49 0.16384000000000000000e5 +12 1 8 39 0.32768000000000000000e5 +12 1 9 40 0.32768000000000000000e5 +12 1 10 41 -0.65536000000000000000e5 +12 1 12 43 -0.13107200000000000000e6 +12 1 23 38 0.16384000000000000000e5 +12 1 26 41 -0.32768000000000000000e5 +12 1 28 43 0.13107200000000000000e6 +12 1 32 47 0.13107200000000000000e6 +12 1 33 48 -0.65536000000000000000e5 +12 1 40 55 0.32768000000000000000e5 +12 2 2 32 0.16384000000000000000e5 +12 2 4 34 -0.32768000000000000000e5 +12 2 16 30 0.32768000000000000000e5 +12 2 20 34 0.65536000000000000000e5 +12 2 28 34 0.32768000000000000000e5 +12 3 5 50 -0.32768000000000000000e5 +12 3 9 38 0.32768000000000000000e5 +12 3 10 55 0.65536000000000000000e5 +12 3 14 51 0.13107200000000000000e6 +12 3 22 35 0.13107200000000000000e6 +12 3 26 55 -0.32768000000000000000e5 +12 3 27 40 -0.32768000000000000000e5 +12 3 28 41 0.13107200000000000000e6 +12 3 29 42 -0.65536000000000000000e5 +12 3 30 43 -0.65536000000000000000e5 +12 3 39 52 0.65536000000000000000e5 +12 3 40 55 -0.32768000000000000000e5 +12 3 43 56 -0.32768000000000000000e5 +12 3 49 50 -0.32768000000000000000e5 +12 4 2 30 0.32768000000000000000e5 +12 4 6 34 0.65536000000000000000e5 +12 4 19 31 -0.65536000000000000000e5 +12 4 21 33 0.32768000000000000000e5 +13 1 40 55 -0.32768000000000000000e5 +13 1 41 56 -0.32768000000000000000e5 +13 1 54 55 0.32768000000000000000e5 +13 2 28 34 -0.32768000000000000000e5 +13 3 27 56 -0.32768000000000000000e5 +13 3 41 54 -0.32768000000000000000e5 +13 4 29 33 0.32768000000000000000e5 +14 1 1 48 0.32768000000000000000e5 +14 1 2 49 0.32768000000000000000e5 +14 1 6 53 0.16384000000000000000e5 +14 1 8 39 0.65536000000000000000e5 +14 1 9 40 0.65536000000000000000e5 +14 1 10 41 -0.13107200000000000000e6 +14 1 12 43 -0.26214400000000000000e6 +14 1 23 38 0.32768000000000000000e5 +14 1 24 55 -0.65536000000000000000e5 +14 1 25 40 -0.16384000000000000000e5 +14 1 26 41 -0.65536000000000000000e5 +14 1 28 43 0.19660800000000000000e6 +14 1 32 47 0.26214400000000000000e6 +14 1 33 48 -0.65536000000000000000e5 +14 1 40 55 0.32768000000000000000e5 +14 1 41 56 0.65536000000000000000e5 +14 1 44 51 0.13107200000000000000e6 +14 1 46 53 -0.13107200000000000000e6 +14 2 2 32 0.32768000000000000000e5 +14 2 4 34 -0.32768000000000000000e5 +14 2 16 30 0.65536000000000000000e5 +14 2 20 34 0.13107200000000000000e6 +14 2 21 35 -0.32768000000000000000e5 +14 2 28 34 0.32768000000000000000e5 +14 3 5 50 -0.32768000000000000000e5 +14 3 9 38 0.65536000000000000000e5 +14 3 10 55 -0.65536000000000000000e5 +14 3 22 35 0.26214400000000000000e6 +14 3 22 51 0.65536000000000000000e5 +14 3 23 52 -0.65536000000000000000e5 +14 3 24 37 0.16384000000000000000e5 +14 3 27 56 0.32768000000000000000e5 +14 3 28 41 0.26214400000000000000e6 +14 3 35 48 0.13107200000000000000e6 +14 3 38 51 -0.65536000000000000000e5 +14 3 39 52 -0.65536000000000000000e5 +14 3 40 45 -0.65536000000000000000e5 +14 3 41 54 -0.32768000000000000000e5 +14 3 41 56 -0.32768000000000000000e5 +14 4 2 30 0.65536000000000000000e5 +14 4 4 32 -0.16384000000000000000e5 +14 4 6 34 0.13107200000000000000e6 +14 4 7 35 0.32768000000000000000e5 +14 4 16 28 0.16384000000000000000e5 +14 4 22 34 -0.65536000000000000000e5 +14 4 23 35 -0.65536000000000000000e5 +14 4 29 33 -0.32768000000000000000e5 +15 1 1 48 0.98304000000000000000e5 +15 1 2 49 0.16384000000000000000e6 +15 1 6 53 -0.65536000000000000000e5 +15 1 8 39 0.19660800000000000000e6 +15 1 9 40 0.19660800000000000000e6 +15 1 10 41 -0.39321600000000000000e6 +15 1 12 43 -0.78643200000000000000e6 +15 1 23 38 0.98304000000000000000e5 +15 1 24 39 0.65536000000000000000e5 +15 1 24 55 0.65536000000000000000e5 +15 1 26 41 -0.32768000000000000000e6 +15 1 28 43 0.52428800000000000000e6 +15 1 32 47 0.78643200000000000000e6 +15 1 47 54 0.32768000000000000000e5 +15 1 49 56 -0.32768000000000000000e5 +15 1 53 56 0.32768000000000000000e5 +15 1 54 55 0.65536000000000000000e5 +15 1 55 56 -0.65536000000000000000e5 +15 2 2 32 0.98304000000000000000e5 +15 2 3 33 0.65536000000000000000e5 +15 2 4 34 -0.65536000000000000000e5 +15 2 5 35 -0.65536000000000000000e5 +15 2 16 30 0.19660800000000000000e6 +15 2 20 34 0.39321600000000000000e6 +15 2 33 35 0.32768000000000000000e5 +15 3 5 50 -0.65536000000000000000e5 +15 3 9 38 0.19660800000000000000e6 +15 3 22 35 0.78643200000000000000e6 +15 3 22 51 -0.65536000000000000000e5 +15 3 23 52 0.13107200000000000000e6 +15 3 25 38 0.65536000000000000000e5 +15 3 25 54 -0.65536000000000000000e5 +15 3 27 40 0.65536000000000000000e5 +15 3 28 41 0.78643200000000000000e6 +15 3 38 51 0.65536000000000000000e5 +15 3 39 40 -0.65536000000000000000e5 +15 3 40 53 -0.65536000000000000000e5 +15 3 41 54 0.65536000000000000000e5 +15 3 48 53 0.32768000000000000000e5 +15 3 49 50 -0.65536000000000000000e5 +15 3 53 54 -0.32768000000000000000e5 +15 4 2 30 0.19660800000000000000e6 +15 4 6 34 0.39321600000000000000e6 +15 4 7 35 -0.65536000000000000000e5 +15 4 35 35 -0.65536000000000000000e5 +16 1 1 48 -0.65536000000000000000e5 +16 1 2 49 -0.98304000000000000000e5 +16 1 6 53 0.32768000000000000000e5 +16 1 8 39 -0.13107200000000000000e6 +16 1 9 40 -0.13107200000000000000e6 +16 1 10 41 0.26214400000000000000e6 +16 1 12 43 0.52428800000000000000e6 +16 1 23 38 -0.65536000000000000000e5 +16 1 24 39 -0.32768000000000000000e5 +16 1 26 41 0.19660800000000000000e6 +16 1 28 43 -0.39321600000000000000e6 +16 1 32 47 -0.52428800000000000000e6 +16 1 47 54 -0.32768000000000000000e5 +16 1 49 56 0.32768000000000000000e5 +16 2 2 32 -0.65536000000000000000e5 +16 2 3 33 -0.32768000000000000000e5 +16 2 4 34 0.65536000000000000000e5 +16 2 5 35 0.32768000000000000000e5 +16 2 16 30 -0.13107200000000000000e6 +16 2 20 34 -0.26214400000000000000e6 +16 2 33 35 -0.32768000000000000000e5 +16 3 5 50 0.65536000000000000000e5 +16 3 9 38 -0.13107200000000000000e6 +16 3 22 35 -0.52428800000000000000e6 +16 3 25 38 -0.32768000000000000000e5 +16 3 25 54 0.32768000000000000000e5 +16 3 28 41 -0.52428800000000000000e6 +16 3 39 40 0.32768000000000000000e5 +16 3 40 53 0.32768000000000000000e5 +16 3 41 54 -0.65536000000000000000e5 +16 4 2 30 -0.13107200000000000000e6 +16 4 6 34 -0.26214400000000000000e6 +17 1 1 48 -0.32768000000000000000e5 +17 1 2 49 -0.65536000000000000000e5 +17 1 6 53 0.32768000000000000000e5 +17 1 8 39 -0.65536000000000000000e5 +17 1 9 40 -0.65536000000000000000e5 +17 1 10 41 0.13107200000000000000e6 +17 1 12 43 0.26214400000000000000e6 +17 1 23 38 -0.32768000000000000000e5 +17 1 24 39 -0.32768000000000000000e5 +17 1 24 55 -0.65536000000000000000e5 +17 1 26 41 0.13107200000000000000e6 +17 1 28 43 -0.13107200000000000000e6 +17 1 32 47 -0.26214400000000000000e6 +17 1 41 56 -0.65536000000000000000e5 +17 2 2 32 -0.32768000000000000000e5 +17 2 3 33 -0.32768000000000000000e5 +17 2 5 35 0.32768000000000000000e5 +17 2 16 30 -0.65536000000000000000e5 +17 2 20 34 -0.13107200000000000000e6 +17 2 33 35 -0.32768000000000000000e5 +17 3 9 38 -0.65536000000000000000e5 +17 3 22 35 -0.26214400000000000000e6 +17 3 22 51 0.65536000000000000000e5 +17 3 23 52 -0.13107200000000000000e6 +17 3 25 38 -0.32768000000000000000e5 +17 3 25 54 0.32768000000000000000e5 +17 3 27 40 -0.65536000000000000000e5 +17 3 27 56 -0.65536000000000000000e5 +17 3 28 41 -0.26214400000000000000e6 +17 3 38 51 -0.65536000000000000000e5 +17 3 39 40 0.32768000000000000000e5 +17 3 40 53 0.32768000000000000000e5 +17 3 41 54 -0.65536000000000000000e5 +17 3 48 53 -0.32768000000000000000e5 +17 4 2 30 -0.65536000000000000000e5 +17 4 6 34 -0.13107200000000000000e6 +17 4 7 35 0.65536000000000000000e5 +18 1 1 48 0.13107200000000000000e6 +18 1 2 49 0.19660800000000000000e6 +18 1 6 53 -0.32768000000000000000e5 +18 1 8 39 0.26214400000000000000e6 +18 1 9 40 0.26214400000000000000e6 +18 1 10 41 -0.52428800000000000000e6 +18 1 12 43 -0.10485760000000000000e7 +18 1 23 38 0.13107200000000000000e6 +18 1 24 39 0.65536000000000000000e5 +18 1 24 55 0.65536000000000000000e5 +18 1 25 40 -0.32768000000000000000e5 +18 1 25 56 0.32768000000000000000e5 +18 1 26 41 -0.39321600000000000000e6 +18 1 28 43 0.65536000000000000000e6 +18 1 32 47 0.10485760000000000000e7 +18 1 38 53 0.32768000000000000000e5 +18 1 40 47 0.32768000000000000000e5 +18 1 47 54 0.32768000000000000000e5 +18 1 49 56 -0.32768000000000000000e5 +18 2 2 32 0.13107200000000000000e6 +18 2 3 33 0.65536000000000000000e5 +18 2 4 34 -0.65536000000000000000e5 +18 2 5 35 -0.65536000000000000000e5 +18 2 16 30 0.26214400000000000000e6 +18 2 20 34 0.52428800000000000000e6 +18 2 33 35 0.65536000000000000000e5 +18 2 35 35 -0.65536000000000000000e5 +18 3 5 50 -0.65536000000000000000e5 +18 3 9 38 0.26214400000000000000e6 +18 3 22 35 0.10485760000000000000e7 +18 3 23 52 0.13107200000000000000e6 +18 3 24 37 0.32768000000000000000e5 +18 3 24 53 -0.32768000000000000000e5 +18 3 25 38 0.65536000000000000000e5 +18 3 25 54 -0.65536000000000000000e5 +18 3 27 40 0.13107200000000000000e6 +18 3 27 56 -0.65536000000000000000e5 +18 3 28 41 0.10485760000000000000e7 +18 3 37 50 0.65536000000000000000e5 +18 3 38 51 0.65536000000000000000e5 +18 3 39 40 -0.65536000000000000000e5 +18 3 40 53 -0.65536000000000000000e5 +18 3 41 54 0.65536000000000000000e5 +18 3 41 56 -0.65536000000000000000e5 +18 3 48 53 0.32768000000000000000e5 +18 4 2 30 0.26214400000000000000e6 +18 4 4 32 -0.32768000000000000000e5 +18 4 6 34 0.52428800000000000000e6 +18 4 7 35 -0.65536000000000000000e5 +18 4 16 28 0.32768000000000000000e5 +18 4 32 32 0.65536000000000000000e5 +19 1 20 51 0.65536000000000000000e5 +19 1 36 51 -0.65536000000000000000e5 +19 3 19 56 -0.32768000000000000000e5 +19 3 36 49 0.32768000000000000000e5 +19 3 41 46 0.32768000000000000000e5 +19 3 46 51 -0.32768000000000000000e5 +19 3 46 55 -0.32768000000000000000e5 +19 4 15 35 0.32768000000000000000e5 +20 1 34 49 0.32768000000000000000e5 +20 1 44 51 -0.32768000000000000000e5 +20 3 14 43 -0.32768000000000000000e5 +20 3 14 51 -0.32768000000000000000e5 +20 3 15 44 0.65536000000000000000e5 +20 3 17 30 0.65536000000000000000e5 +20 3 32 45 0.65536000000000000000e5 +20 3 35 40 -0.32768000000000000000e5 +20 3 35 56 -0.32768000000000000000e5 +20 3 43 52 -0.32768000000000000000e5 +20 3 45 50 -0.32768000000000000000e5 +20 4 25 33 0.32768000000000000000e5 +21 1 14 45 -0.13107200000000000000e6 +21 1 17 48 0.32768000000000000000e5 +21 1 18 49 0.32768000000000000000e5 +21 1 34 49 0.32768000000000000000e5 +21 1 46 53 0.32768000000000000000e5 +21 1 52 55 0.32768000000000000000e5 +21 2 14 28 0.32768000000000000000e5 +21 3 14 43 0.32768000000000000000e5 +21 3 15 44 -0.65536000000000000000e5 +21 3 16 45 0.13107200000000000000e6 +21 3 18 47 0.32768000000000000000e5 +21 3 19 48 0.65536000000000000000e5 +21 3 22 35 -0.32768000000000000000e5 +21 3 41 46 0.65536000000000000000e5 +21 4 14 26 -0.32768000000000000000e5 +21 4 15 27 -0.65536000000000000000e5 +22 3 42 55 0.32768000000000000000e5 +22 3 45 50 -0.65536000000000000000e5 +22 3 45 56 0.32768000000000000000e5 +23 1 1 48 0.81920000000000000000e4 +23 1 2 49 0.81920000000000000000e4 +23 1 8 39 0.16384000000000000000e5 +23 1 9 40 0.16384000000000000000e5 +23 1 10 41 -0.32768000000000000000e5 +23 1 12 43 -0.65536000000000000000e5 +23 1 23 38 0.81920000000000000000e4 +23 1 24 55 -0.16384000000000000000e5 +23 1 26 41 -0.16384000000000000000e5 +23 1 28 43 0.65536000000000000000e5 +23 1 32 47 0.65536000000000000000e5 +23 1 33 40 0.32768000000000000000e5 +23 1 40 55 0.16384000000000000000e5 +23 1 41 56 0.16384000000000000000e5 +23 1 44 51 -0.65536000000000000000e5 +23 2 2 32 0.81920000000000000000e4 +23 2 4 34 -0.16384000000000000000e5 +23 2 16 30 0.16384000000000000000e5 +23 2 20 34 0.32768000000000000000e5 +23 2 28 34 0.16384000000000000000e5 +23 3 5 50 -0.16384000000000000000e5 +23 3 9 38 0.16384000000000000000e5 +23 3 10 55 -0.32768000000000000000e5 +23 3 14 51 -0.65536000000000000000e5 +23 3 22 35 0.65536000000000000000e5 +23 3 22 51 0.16384000000000000000e5 +23 3 23 52 -0.32768000000000000000e5 +23 3 27 40 -0.16384000000000000000e5 +23 3 27 56 0.16384000000000000000e5 +23 3 28 41 0.65536000000000000000e5 +23 3 29 42 0.32768000000000000000e5 +23 3 30 43 0.32768000000000000000e5 +23 3 38 51 -0.16384000000000000000e5 +23 3 39 52 -0.32768000000000000000e5 +23 3 42 55 -0.32768000000000000000e5 +23 4 2 30 0.16384000000000000000e5 +23 4 6 34 0.32768000000000000000e5 +23 4 7 35 0.16384000000000000000e5 +23 4 19 31 0.32768000000000000000e5 +23 4 29 33 -0.16384000000000000000e5 +24 1 17 48 -0.65536000000000000000e5 +24 1 28 43 0.32768000000000000000e5 +24 1 33 48 0.32768000000000000000e5 +24 1 44 51 -0.65536000000000000000e5 +24 1 46 53 0.65536000000000000000e5 +24 3 10 55 0.32768000000000000000e5 +24 3 23 52 -0.32768000000000000000e5 +24 3 28 41 0.32768000000000000000e5 +24 3 29 42 0.32768000000000000000e5 +24 3 34 47 0.65536000000000000000e5 +24 3 35 48 -0.65536000000000000000e5 +24 3 39 52 0.32768000000000000000e5 +24 3 40 45 0.32768000000000000000e5 +24 3 47 52 -0.32768000000000000000e5 +24 4 22 34 0.32768000000000000000e5 +24 4 23 27 0.32768000000000000000e5 +24 4 23 35 0.32768000000000000000e5 +25 1 1 48 0.16384000000000000000e5 +25 1 2 49 0.16384000000000000000e5 +25 1 8 39 0.32768000000000000000e5 +25 1 9 40 0.32768000000000000000e5 +25 1 10 41 -0.65536000000000000000e5 +25 1 12 43 -0.13107200000000000000e6 +25 1 23 38 0.16384000000000000000e5 +25 1 26 41 -0.32768000000000000000e5 +25 1 28 43 0.13107200000000000000e6 +25 1 32 47 0.13107200000000000000e6 +25 1 33 48 -0.65536000000000000000e5 +25 1 40 55 0.32768000000000000000e5 +25 2 2 32 0.16384000000000000000e5 +25 2 4 34 -0.32768000000000000000e5 +25 2 16 30 0.32768000000000000000e5 +25 2 20 34 0.65536000000000000000e5 +25 2 28 34 0.32768000000000000000e5 +25 3 5 50 -0.32768000000000000000e5 +25 3 9 38 0.32768000000000000000e5 +25 3 10 55 0.65536000000000000000e5 +25 3 14 51 0.13107200000000000000e6 +25 3 22 35 0.13107200000000000000e6 +25 3 26 55 -0.32768000000000000000e5 +25 3 27 40 -0.32768000000000000000e5 +25 3 28 41 0.13107200000000000000e6 +25 3 29 42 -0.65536000000000000000e5 +25 3 30 43 -0.65536000000000000000e5 +25 3 40 55 -0.32768000000000000000e5 +25 4 2 30 0.32768000000000000000e5 +25 4 6 34 0.65536000000000000000e5 +25 4 19 31 -0.65536000000000000000e5 +25 4 21 33 0.32768000000000000000e5 +26 1 1 48 0.16384000000000000000e5 +26 1 2 49 0.16384000000000000000e5 +26 1 8 39 0.32768000000000000000e5 +26 1 9 40 0.32768000000000000000e5 +26 1 10 41 -0.65536000000000000000e5 +26 1 12 43 -0.13107200000000000000e6 +26 1 23 38 0.16384000000000000000e5 +26 1 24 55 -0.32768000000000000000e5 +26 1 26 41 -0.32768000000000000000e5 +26 1 28 43 0.13107200000000000000e6 +26 1 32 47 0.13107200000000000000e6 +26 1 33 48 -0.65536000000000000000e5 +26 1 40 55 0.32768000000000000000e5 +26 2 2 32 0.16384000000000000000e5 +26 2 4 34 -0.32768000000000000000e5 +26 2 16 30 0.32768000000000000000e5 +26 2 20 34 0.65536000000000000000e5 +26 3 5 50 -0.32768000000000000000e5 +26 3 9 38 0.32768000000000000000e5 +26 3 10 55 -0.65536000000000000000e5 +26 3 22 35 0.13107200000000000000e6 +26 3 22 51 0.32768000000000000000e5 +26 3 23 52 -0.65536000000000000000e5 +26 3 27 40 -0.32768000000000000000e5 +26 3 28 41 0.13107200000000000000e6 +26 3 35 48 0.13107200000000000000e6 +26 3 38 51 -0.32768000000000000000e5 +26 3 40 45 -0.65536000000000000000e5 +26 3 49 50 -0.32768000000000000000e5 +26 4 2 30 0.32768000000000000000e5 +26 4 6 34 0.65536000000000000000e5 +26 4 7 35 0.32768000000000000000e5 +26 4 22 34 -0.65536000000000000000e5 +27 1 1 48 0.16384000000000000000e5 +27 1 2 49 0.16384000000000000000e5 +27 1 6 53 0.16384000000000000000e5 +27 1 8 39 0.32768000000000000000e5 +27 1 9 40 0.32768000000000000000e5 +27 1 10 41 -0.65536000000000000000e5 +27 1 12 43 -0.13107200000000000000e6 +27 1 23 38 0.16384000000000000000e5 +27 1 24 55 -0.32768000000000000000e5 +27 1 25 40 -0.16384000000000000000e5 +27 1 26 41 -0.32768000000000000000e5 +27 1 28 43 0.65536000000000000000e5 +27 1 32 47 0.13107200000000000000e6 +27 1 41 56 0.32768000000000000000e5 +27 2 2 32 0.16384000000000000000e5 +27 2 16 30 0.32768000000000000000e5 +27 2 20 34 0.65536000000000000000e5 +27 2 21 35 -0.32768000000000000000e5 +27 3 9 38 0.32768000000000000000e5 +27 3 22 35 0.13107200000000000000e6 +27 3 22 51 0.32768000000000000000e5 +27 3 24 37 0.16384000000000000000e5 +27 3 27 40 0.32768000000000000000e5 +27 3 27 56 0.32768000000000000000e5 +27 3 28 41 0.13107200000000000000e6 +27 3 38 51 -0.32768000000000000000e5 +27 3 41 54 -0.32768000000000000000e5 +27 4 2 30 0.32768000000000000000e5 +27 4 4 32 -0.16384000000000000000e5 +27 4 6 34 0.65536000000000000000e5 +27 4 16 28 0.16384000000000000000e5 +28 1 1 48 -0.16384000000000000000e5 +28 1 2 49 -0.16384000000000000000e5 +28 1 6 53 -0.16384000000000000000e5 +28 1 8 39 -0.32768000000000000000e5 +28 1 9 40 -0.32768000000000000000e5 +28 1 10 41 0.65536000000000000000e5 +28 1 12 43 0.13107200000000000000e6 +28 1 23 38 -0.16384000000000000000e5 +28 1 25 40 0.16384000000000000000e5 +28 1 26 41 0.32768000000000000000e5 +28 1 28 43 -0.65536000000000000000e5 +28 1 32 47 -0.13107200000000000000e6 +28 1 37 52 -0.65536000000000000000e5 +28 1 41 56 0.32768000000000000000e5 +28 2 2 32 -0.16384000000000000000e5 +28 2 16 30 -0.32768000000000000000e5 +28 2 20 34 -0.65536000000000000000e5 +28 3 9 38 -0.32768000000000000000e5 +28 3 22 35 -0.13107200000000000000e6 +28 3 22 51 -0.32768000000000000000e5 +28 3 24 37 -0.16384000000000000000e5 +28 3 27 40 -0.32768000000000000000e5 +28 3 28 41 -0.13107200000000000000e6 +28 3 37 50 -0.32768000000000000000e5 +28 4 2 30 -0.32768000000000000000e5 +28 4 4 32 0.16384000000000000000e5 +28 4 6 34 -0.65536000000000000000e5 +28 4 16 28 -0.16384000000000000000e5 +29 1 1 48 0.13107200000000000000e6 +29 1 2 49 0.19660800000000000000e6 +29 1 6 53 -0.65536000000000000000e5 +29 1 8 39 0.26214400000000000000e6 +29 1 9 40 0.26214400000000000000e6 +29 1 10 41 -0.52428800000000000000e6 +29 1 12 43 -0.10485760000000000000e7 +29 1 23 38 0.13107200000000000000e6 +29 1 24 39 0.65536000000000000000e5 +29 1 24 55 0.65536000000000000000e5 +29 1 26 41 -0.39321600000000000000e6 +29 1 28 43 0.78643200000000000000e6 +29 1 32 47 0.10485760000000000000e7 +29 1 33 48 -0.13107200000000000000e6 +29 1 40 55 0.65536000000000000000e5 +29 1 47 54 0.32768000000000000000e5 +29 1 49 56 -0.32768000000000000000e5 +29 1 53 56 0.32768000000000000000e5 +29 1 54 55 0.65536000000000000000e5 +29 1 55 56 -0.65536000000000000000e5 +29 2 2 32 0.13107200000000000000e6 +29 2 3 33 0.65536000000000000000e5 +29 2 4 34 -0.13107200000000000000e6 +29 2 5 35 -0.65536000000000000000e5 +29 2 16 30 0.26214400000000000000e6 +29 2 20 34 0.52428800000000000000e6 +29 2 28 34 0.65536000000000000000e5 +29 2 33 35 0.32768000000000000000e5 +29 3 5 50 -0.13107200000000000000e6 +29 3 9 38 0.26214400000000000000e6 +29 3 10 55 -0.13107200000000000000e6 +29 3 22 35 0.10485760000000000000e7 +29 3 25 38 0.65536000000000000000e5 +29 3 25 54 -0.65536000000000000000e5 +29 3 28 41 0.10485760000000000000e7 +29 3 35 48 0.26214400000000000000e6 +29 3 38 51 0.65536000000000000000e5 +29 3 39 40 -0.65536000000000000000e5 +29 3 40 45 -0.13107200000000000000e6 +29 3 40 53 -0.32768000000000000000e5 +29 3 41 54 0.65536000000000000000e5 +29 3 48 53 0.32768000000000000000e5 +29 3 49 50 -0.65536000000000000000e5 +29 3 49 54 0.32768000000000000000e5 +29 3 53 54 -0.32768000000000000000e5 +29 4 2 30 0.26214400000000000000e6 +29 4 6 34 0.52428800000000000000e6 +29 4 22 34 -0.13107200000000000000e6 +29 4 35 35 -0.65536000000000000000e5 +30 1 1 48 0.32768000000000000000e5 +30 1 2 49 0.65536000000000000000e5 +30 1 6 53 -0.32768000000000000000e5 +30 1 8 39 0.65536000000000000000e5 +30 1 9 40 0.65536000000000000000e5 +30 1 10 41 -0.13107200000000000000e6 +30 1 12 43 -0.26214400000000000000e6 +30 1 23 38 0.32768000000000000000e5 +30 1 24 39 0.32768000000000000000e5 +30 1 24 55 0.65536000000000000000e5 +30 1 25 56 0.32768000000000000000e5 +30 1 26 41 -0.13107200000000000000e6 +30 1 28 43 0.13107200000000000000e6 +30 1 32 47 0.26214400000000000000e6 +30 2 2 32 0.32768000000000000000e5 +30 2 3 33 0.32768000000000000000e5 +30 2 5 35 -0.32768000000000000000e5 +30 2 16 30 0.65536000000000000000e5 +30 2 20 34 0.13107200000000000000e6 +30 3 9 38 0.65536000000000000000e5 +30 3 22 35 0.26214400000000000000e6 +30 3 22 51 -0.65536000000000000000e5 +30 3 23 52 0.13107200000000000000e6 +30 3 25 38 0.32768000000000000000e5 +30 3 25 54 -0.32768000000000000000e5 +30 3 27 40 0.65536000000000000000e5 +30 3 28 41 0.26214400000000000000e6 +30 3 39 40 -0.32768000000000000000e5 +30 3 40 53 -0.32768000000000000000e5 +30 4 2 30 0.65536000000000000000e5 +30 4 6 34 0.13107200000000000000e6 +30 4 7 35 -0.65536000000000000000e5 +31 1 1 48 -0.32768000000000000000e5 +31 1 2 49 -0.65536000000000000000e5 +31 1 6 53 0.32768000000000000000e5 +31 1 8 39 -0.65536000000000000000e5 +31 1 9 40 -0.65536000000000000000e5 +31 1 10 41 0.13107200000000000000e6 +31 1 12 43 0.26214400000000000000e6 +31 1 23 38 -0.32768000000000000000e5 +31 1 24 39 -0.32768000000000000000e5 +31 1 24 55 -0.13107200000000000000e6 +31 1 26 41 0.13107200000000000000e6 +31 1 28 43 -0.13107200000000000000e6 +31 1 32 47 -0.26214400000000000000e6 +31 1 40 47 0.32768000000000000000e5 +31 1 47 54 -0.32768000000000000000e5 +31 2 2 32 -0.32768000000000000000e5 +31 2 3 33 -0.32768000000000000000e5 +31 2 5 35 0.32768000000000000000e5 +31 2 16 30 -0.65536000000000000000e5 +31 2 20 34 -0.13107200000000000000e6 +31 2 33 35 -0.32768000000000000000e5 +31 3 9 38 -0.65536000000000000000e5 +31 3 22 35 -0.26214400000000000000e6 +31 3 22 51 0.65536000000000000000e5 +31 3 23 52 -0.13107200000000000000e6 +31 3 24 53 -0.32768000000000000000e5 +31 3 25 38 -0.32768000000000000000e5 +31 3 25 54 0.32768000000000000000e5 +31 3 27 40 -0.65536000000000000000e5 +31 3 28 41 -0.26214400000000000000e6 +31 3 38 51 -0.65536000000000000000e5 +31 3 39 40 0.32768000000000000000e5 +31 3 40 53 0.32768000000000000000e5 +31 3 41 54 -0.65536000000000000000e5 +31 4 2 30 -0.65536000000000000000e5 +31 4 6 34 -0.13107200000000000000e6 +31 4 7 35 0.65536000000000000000e5 +32 1 1 48 0.32768000000000000000e5 +32 1 2 49 0.32768000000000000000e5 +32 1 6 53 0.32768000000000000000e5 +32 1 8 39 0.65536000000000000000e5 +32 1 9 40 0.65536000000000000000e5 +32 1 10 41 -0.13107200000000000000e6 +32 1 12 43 -0.26214400000000000000e6 +32 1 23 38 0.32768000000000000000e5 +32 1 25 40 -0.32768000000000000000e5 +32 1 26 41 -0.65536000000000000000e5 +32 1 28 43 0.13107200000000000000e6 +32 1 32 47 0.26214400000000000000e6 +32 1 38 53 0.32768000000000000000e5 +32 1 47 54 0.32768000000000000000e5 +32 2 2 32 0.32768000000000000000e5 +32 2 16 30 0.65536000000000000000e5 +32 2 20 34 0.13107200000000000000e6 +32 3 9 38 0.65536000000000000000e5 +32 3 22 35 0.26214400000000000000e6 +32 3 22 51 0.65536000000000000000e5 +32 3 24 37 0.32768000000000000000e5 +32 3 27 40 0.65536000000000000000e5 +32 3 28 41 0.26214400000000000000e6 +32 4 2 30 0.65536000000000000000e5 +32 4 4 32 -0.32768000000000000000e5 +32 4 6 34 0.13107200000000000000e6 +32 4 16 28 0.32768000000000000000e5 +33 1 2 49 0.32768000000000000000e5 +33 1 6 53 -0.98304000000000000000e5 +33 1 8 39 -0.65536000000000000000e5 +33 1 9 40 -0.65536000000000000000e5 +33 1 10 41 0.13107200000000000000e6 +33 1 24 39 0.32768000000000000000e5 +33 1 24 55 0.13107200000000000000e6 +33 1 25 40 0.65536000000000000000e5 +33 1 25 56 0.32768000000000000000e5 +33 1 26 41 -0.65536000000000000000e5 +33 1 37 52 -0.13107200000000000000e6 +33 2 3 33 0.32768000000000000000e5 +33 2 5 35 -0.32768000000000000000e5 +33 2 32 32 -0.65536000000000000000e5 +33 2 33 35 0.32768000000000000000e5 +33 3 9 38 -0.65536000000000000000e5 +33 3 22 51 -0.19660800000000000000e6 +33 3 23 52 0.13107200000000000000e6 +33 3 24 37 -0.65536000000000000000e5 +33 3 25 38 0.32768000000000000000e5 +33 3 25 54 -0.32768000000000000000e5 +33 3 27 40 -0.65536000000000000000e5 +33 3 27 56 -0.65536000000000000000e5 +33 3 37 50 -0.65536000000000000000e5 +33 3 38 51 0.65536000000000000000e5 +33 3 39 40 -0.32768000000000000000e5 +33 3 40 53 -0.32768000000000000000e5 +33 3 41 54 0.65536000000000000000e5 +33 4 2 30 -0.65536000000000000000e5 +33 4 4 32 0.65536000000000000000e5 +33 4 7 35 -0.65536000000000000000e5 +33 4 16 28 -0.65536000000000000000e5 +33 4 17 29 -0.65536000000000000000e5 +33 4 20 32 -0.65536000000000000000e5 +33 4 32 32 0.65536000000000000000e5 +34 1 11 18 -0.32768000000000000000e5 +34 1 20 51 0.65536000000000000000e5 +34 1 36 51 -0.65536000000000000000e5 +34 1 45 52 0.32768000000000000000e5 +34 3 6 19 0.32768000000000000000e5 +34 3 15 44 0.32768000000000000000e5 +34 3 17 30 0.32768000000000000000e5 +34 3 32 45 0.32768000000000000000e5 +34 3 46 51 -0.32768000000000000000e5 +35 1 13 20 -0.13107200000000000000e6 +35 1 14 45 0.65536000000000000000e5 +35 1 17 32 0.65536000000000000000e5 +35 1 17 48 -0.16384000000000000000e5 +35 1 18 49 -0.16384000000000000000e5 +35 1 20 27 0.65536000000000000000e5 +35 1 34 49 -0.16384000000000000000e5 +35 1 45 52 0.32768000000000000000e5 +35 2 11 25 0.65536000000000000000e5 +35 2 14 28 -0.16384000000000000000e5 +35 3 8 21 0.13107200000000000000e6 +35 3 14 43 -0.16384000000000000000e5 +35 3 15 44 0.32768000000000000000e5 +35 3 18 31 0.65536000000000000000e5 +35 3 18 47 -0.16384000000000000000e5 +35 3 19 48 -0.32768000000000000000e5 +35 3 19 56 -0.32768000000000000000e5 +35 3 22 35 0.16384000000000000000e5 +35 3 36 41 0.65536000000000000000e5 +35 3 41 46 -0.32768000000000000000e5 +35 4 14 26 0.16384000000000000000e5 +35 4 15 27 0.32768000000000000000e5 +36 1 11 18 -0.65536000000000000000e5 +36 1 34 49 0.32768000000000000000e5 +36 1 44 51 -0.32768000000000000000e5 +36 1 45 52 0.65536000000000000000e5 +36 3 6 19 0.65536000000000000000e5 +36 3 14 43 -0.32768000000000000000e5 +36 3 14 51 -0.32768000000000000000e5 +36 3 15 44 0.13107200000000000000e6 +36 3 17 30 0.13107200000000000000e6 +36 3 32 45 0.13107200000000000000e6 +36 3 35 40 -0.32768000000000000000e5 +36 3 43 52 -0.32768000000000000000e5 +36 4 25 33 0.32768000000000000000e5 +37 1 14 45 -0.13107200000000000000e6 +37 1 17 48 0.32768000000000000000e5 +37 1 18 49 0.65536000000000000000e5 +37 1 34 49 0.32768000000000000000e5 +37 1 44 51 0.32768000000000000000e5 +37 2 14 28 0.32768000000000000000e5 +37 3 14 43 0.32768000000000000000e5 +37 3 14 51 -0.32768000000000000000e5 +37 3 15 44 -0.65536000000000000000e5 +37 3 16 45 0.13107200000000000000e6 +37 3 18 47 0.32768000000000000000e5 +37 3 19 48 0.65536000000000000000e5 +37 3 22 35 -0.32768000000000000000e5 +37 3 35 48 -0.32768000000000000000e5 +37 3 45 50 -0.32768000000000000000e5 +37 4 14 26 -0.32768000000000000000e5 +37 4 15 27 -0.65536000000000000000e5 +38 1 4 35 -0.32768000000000000000e5 +38 1 6 53 -0.40960000000000000000e4 +38 1 12 43 -0.32768000000000000000e5 +38 1 17 48 0.32768000000000000000e5 +38 1 25 40 0.40960000000000000000e4 +38 1 34 49 -0.32768000000000000000e5 +38 1 46 53 0.32768000000000000000e5 +38 2 4 34 -0.81920000000000000000e4 +38 2 9 23 -0.32768000000000000000e5 +38 2 21 35 0.81920000000000000000e4 +38 3 5 34 -0.32768000000000000000e5 +38 3 5 50 -0.81920000000000000000e4 +38 3 13 42 0.32768000000000000000e5 +38 3 14 27 -0.32768000000000000000e5 +38 3 16 29 0.65536000000000000000e5 +38 3 18 47 -0.32768000000000000000e5 +38 3 22 35 0.32768000000000000000e5 +38 3 24 37 -0.40960000000000000000e4 +38 3 27 40 -0.16384000000000000000e5 +38 3 28 41 -0.16384000000000000000e5 +38 3 29 42 -0.16384000000000000000e5 +38 3 31 44 0.65536000000000000000e5 +38 3 34 47 -0.32768000000000000000e5 +38 4 4 32 0.40960000000000000000e4 +38 4 7 35 0.81920000000000000000e4 +38 4 14 26 0.32768000000000000000e5 +38 4 16 28 -0.40960000000000000000e4 +38 4 23 27 -0.16384000000000000000e5 +39 1 18 49 0.65536000000000000000e5 +39 1 52 55 -0.65536000000000000000e5 +39 3 14 51 -0.65536000000000000000e5 +39 3 35 48 -0.13107200000000000000e6 +39 3 39 52 0.32768000000000000000e5 +39 3 45 50 -0.13107200000000000000e6 +39 3 45 56 0.32768000000000000000e5 +39 3 47 52 -0.32768000000000000000e5 +39 4 31 35 -0.32768000000000000000e5 +40 1 33 40 0.32768000000000000000e5 +40 1 33 48 0.32768000000000000000e5 +40 1 34 49 -0.65536000000000000000e5 +40 3 14 51 -0.65536000000000000000e5 +40 3 29 42 0.32768000000000000000e5 +40 3 30 43 0.32768000000000000000e5 +40 3 35 48 -0.65536000000000000000e5 +40 3 39 52 -0.32768000000000000000e5 +40 3 40 45 0.32768000000000000000e5 +40 4 19 31 0.32768000000000000000e5 +40 4 22 34 0.32768000000000000000e5 +41 1 1 48 0.81920000000000000000e4 +41 1 2 49 0.81920000000000000000e4 +41 1 8 39 0.16384000000000000000e5 +41 1 9 40 0.16384000000000000000e5 +41 1 10 41 -0.32768000000000000000e5 +41 1 12 43 -0.65536000000000000000e5 +41 1 17 48 -0.65536000000000000000e5 +41 1 23 38 0.81920000000000000000e4 +41 1 24 55 -0.16384000000000000000e5 +41 1 26 41 -0.16384000000000000000e5 +41 1 28 43 0.98304000000000000000e5 +41 1 32 47 0.65536000000000000000e5 +41 1 40 55 0.16384000000000000000e5 +41 1 41 56 0.16384000000000000000e5 +41 2 2 32 0.81920000000000000000e4 +41 2 4 34 -0.16384000000000000000e5 +41 2 16 30 0.16384000000000000000e5 +41 2 20 34 0.32768000000000000000e5 +41 2 28 34 0.16384000000000000000e5 +41 3 5 50 -0.16384000000000000000e5 +41 3 9 38 0.16384000000000000000e5 +41 3 22 35 0.65536000000000000000e5 +41 3 22 51 0.16384000000000000000e5 +41 3 23 52 -0.65536000000000000000e5 +41 3 27 40 -0.16384000000000000000e5 +41 3 27 56 0.16384000000000000000e5 +41 3 28 41 0.98304000000000000000e5 +41 3 29 42 0.32768000000000000000e5 +41 3 38 51 -0.16384000000000000000e5 +41 4 2 30 0.16384000000000000000e5 +41 4 6 34 0.32768000000000000000e5 +41 4 7 35 0.16384000000000000000e5 +41 4 23 27 0.32768000000000000000e5 +41 4 29 33 -0.16384000000000000000e5 +42 1 1 48 -0.81920000000000000000e4 +42 1 2 49 -0.81920000000000000000e4 +42 1 6 53 -0.81920000000000000000e4 +42 1 8 39 -0.16384000000000000000e5 +42 1 9 40 -0.16384000000000000000e5 +42 1 10 41 0.32768000000000000000e5 +42 1 23 38 -0.81920000000000000000e4 +42 1 24 55 0.16384000000000000000e5 +42 1 25 40 0.81920000000000000000e4 +42 1 26 41 0.16384000000000000000e5 +42 1 28 43 -0.32768000000000000000e5 +42 1 32 47 -0.65536000000000000000e5 +42 1 33 48 0.32768000000000000000e5 +42 1 37 52 0.32768000000000000000e5 +42 1 40 55 -0.16384000000000000000e5 +42 1 41 56 -0.16384000000000000000e5 +42 1 44 51 -0.65536000000000000000e5 +42 1 46 53 0.65536000000000000000e5 +42 2 2 32 -0.81920000000000000000e4 +42 2 16 30 -0.16384000000000000000e5 +42 2 20 34 -0.32768000000000000000e5 +42 2 21 35 0.16384000000000000000e5 +42 2 28 34 -0.16384000000000000000e5 +42 3 7 52 0.65536000000000000000e5 +42 3 9 38 -0.16384000000000000000e5 +42 3 10 55 0.32768000000000000000e5 +42 3 22 51 -0.16384000000000000000e5 +42 3 24 37 -0.81920000000000000000e4 +42 3 27 40 -0.16384000000000000000e5 +42 3 27 56 -0.16384000000000000000e5 +42 3 28 41 -0.65536000000000000000e5 +42 3 35 48 -0.65536000000000000000e5 +42 3 38 51 0.16384000000000000000e5 +42 3 39 52 0.32768000000000000000e5 +42 3 40 45 0.32768000000000000000e5 +42 4 2 30 -0.16384000000000000000e5 +42 4 4 32 0.81920000000000000000e4 +42 4 6 34 -0.32768000000000000000e5 +42 4 16 28 -0.81920000000000000000e4 +42 4 22 34 0.32768000000000000000e5 +42 4 23 35 0.32768000000000000000e5 +42 4 29 33 0.16384000000000000000e5 +43 3 10 55 0.65536000000000000000e5 +43 3 14 51 0.13107200000000000000e6 +43 3 22 51 -0.32768000000000000000e5 +43 3 23 52 0.65536000000000000000e5 +43 3 26 55 -0.32768000000000000000e5 +43 3 29 42 -0.65536000000000000000e5 +43 3 30 43 -0.65536000000000000000e5 +43 3 35 48 -0.13107200000000000000e6 +43 3 40 45 0.65536000000000000000e5 +43 4 7 35 -0.32768000000000000000e5 +43 4 19 31 -0.65536000000000000000e5 +43 4 21 33 0.32768000000000000000e5 +43 4 22 34 0.65536000000000000000e5 +44 1 1 48 0.16384000000000000000e5 +44 1 2 49 0.16384000000000000000e5 +44 1 8 39 0.32768000000000000000e5 +44 1 9 40 0.32768000000000000000e5 +44 1 10 41 -0.65536000000000000000e5 +44 1 12 43 -0.13107200000000000000e6 +44 1 23 38 0.16384000000000000000e5 +44 1 24 55 -0.32768000000000000000e5 +44 1 26 41 -0.32768000000000000000e5 +44 1 28 43 0.13107200000000000000e6 +44 1 32 47 0.13107200000000000000e6 +44 1 33 48 -0.65536000000000000000e5 +44 1 40 55 0.32768000000000000000e5 +44 2 2 32 0.16384000000000000000e5 +44 2 4 34 -0.32768000000000000000e5 +44 2 16 30 0.32768000000000000000e5 +44 2 20 34 0.65536000000000000000e5 +44 3 5 50 -0.32768000000000000000e5 +44 3 9 38 0.32768000000000000000e5 +44 3 22 35 0.13107200000000000000e6 +44 3 22 51 0.32768000000000000000e5 +44 3 23 52 -0.65536000000000000000e5 +44 3 27 40 -0.32768000000000000000e5 +44 3 28 41 0.13107200000000000000e6 +44 4 2 30 0.32768000000000000000e5 +44 4 6 34 0.65536000000000000000e5 +44 4 7 35 0.32768000000000000000e5 +45 1 1 48 0.16384000000000000000e5 +45 1 2 49 0.16384000000000000000e5 +45 1 6 53 0.16384000000000000000e5 +45 1 8 39 0.32768000000000000000e5 +45 1 9 40 0.32768000000000000000e5 +45 1 10 41 -0.65536000000000000000e5 +45 1 12 43 -0.13107200000000000000e6 +45 1 23 38 0.16384000000000000000e5 +45 1 25 40 -0.16384000000000000000e5 +45 1 26 41 -0.32768000000000000000e5 +45 1 28 43 0.65536000000000000000e5 +45 1 32 47 0.13107200000000000000e6 +45 2 2 32 0.16384000000000000000e5 +45 2 16 30 0.32768000000000000000e5 +45 2 20 34 0.65536000000000000000e5 +45 2 21 35 -0.32768000000000000000e5 +45 3 9 38 0.32768000000000000000e5 +45 3 22 35 0.13107200000000000000e6 +45 3 22 51 0.32768000000000000000e5 +45 3 23 52 -0.65536000000000000000e5 +45 3 24 37 0.16384000000000000000e5 +45 3 27 40 0.32768000000000000000e5 +45 3 28 41 0.13107200000000000000e6 +45 3 38 51 -0.32768000000000000000e5 +45 4 2 30 0.32768000000000000000e5 +45 4 4 32 -0.16384000000000000000e5 +45 4 6 34 0.65536000000000000000e5 +45 4 16 28 0.16384000000000000000e5 +46 1 1 48 -0.16384000000000000000e5 +46 1 2 49 -0.16384000000000000000e5 +46 1 6 53 -0.16384000000000000000e5 +46 1 8 39 -0.32768000000000000000e5 +46 1 9 40 -0.32768000000000000000e5 +46 1 10 41 0.65536000000000000000e5 +46 1 12 43 0.13107200000000000000e6 +46 1 23 38 -0.16384000000000000000e5 +46 1 25 40 0.16384000000000000000e5 +46 1 26 41 0.32768000000000000000e5 +46 1 28 43 -0.65536000000000000000e5 +46 1 32 47 -0.19660800000000000000e6 +46 1 41 56 0.32768000000000000000e5 +46 2 2 32 -0.16384000000000000000e5 +46 2 16 30 -0.32768000000000000000e5 +46 2 20 34 -0.65536000000000000000e5 +46 3 9 38 -0.32768000000000000000e5 +46 3 22 35 -0.13107200000000000000e6 +46 3 22 51 -0.32768000000000000000e5 +46 3 24 37 -0.16384000000000000000e5 +46 3 27 40 -0.32768000000000000000e5 +46 3 27 56 0.32768000000000000000e5 +46 3 28 41 -0.13107200000000000000e6 +46 4 2 30 -0.32768000000000000000e5 +46 4 4 32 0.16384000000000000000e5 +46 4 6 34 -0.65536000000000000000e5 +46 4 16 28 -0.16384000000000000000e5 +47 1 1 48 -0.16384000000000000000e5 +47 1 2 49 -0.16384000000000000000e5 +47 1 6 53 -0.16384000000000000000e5 +47 1 23 38 -0.16384000000000000000e5 +47 1 24 55 -0.32768000000000000000e5 +47 1 25 40 0.16384000000000000000e5 +47 1 26 41 0.32768000000000000000e5 +47 1 32 47 -0.65536000000000000000e5 +47 1 37 52 0.65536000000000000000e5 +47 2 2 32 -0.16384000000000000000e5 +47 2 4 34 -0.32768000000000000000e5 +47 2 16 30 -0.32768000000000000000e5 +47 2 21 35 0.32768000000000000000e5 +47 3 5 50 -0.32768000000000000000e5 +47 3 7 52 0.13107200000000000000e6 +47 3 24 37 -0.16384000000000000000e5 +47 3 27 40 -0.65536000000000000000e5 +47 3 28 41 -0.13107200000000000000e6 +47 3 37 50 -0.32768000000000000000e5 +47 4 4 32 0.16384000000000000000e5 +47 4 6 34 -0.65536000000000000000e5 +47 4 7 35 0.32768000000000000000e5 +47 4 16 28 -0.16384000000000000000e5 +47 4 17 29 0.32768000000000000000e5 +47 4 20 32 0.32768000000000000000e5 +48 1 1 48 0.98304000000000000000e5 +48 1 2 49 0.13107200000000000000e6 +48 1 6 53 -0.32768000000000000000e5 +48 1 8 39 0.19660800000000000000e6 +48 1 9 40 0.19660800000000000000e6 +48 1 10 41 -0.39321600000000000000e6 +48 1 12 43 -0.78643200000000000000e6 +48 1 23 38 0.98304000000000000000e5 +48 1 24 39 0.32768000000000000000e5 +48 1 25 56 -0.32768000000000000000e5 +48 1 26 41 -0.26214400000000000000e6 +48 1 28 43 0.65536000000000000000e6 +48 1 32 47 0.78643200000000000000e6 +48 1 33 48 -0.13107200000000000000e6 +48 1 40 55 0.65536000000000000000e5 +48 1 49 56 -0.32768000000000000000e5 +48 1 53 56 0.32768000000000000000e5 +48 1 54 55 0.65536000000000000000e5 +48 1 55 56 -0.65536000000000000000e5 +48 2 2 32 0.98304000000000000000e5 +48 2 3 33 0.32768000000000000000e5 +48 2 4 34 -0.13107200000000000000e6 +48 2 5 35 -0.32768000000000000000e5 +48 2 16 30 0.19660800000000000000e6 +48 2 20 34 0.39321600000000000000e6 +48 2 28 34 0.65536000000000000000e5 +48 3 5 50 -0.13107200000000000000e6 +48 3 9 38 0.19660800000000000000e6 +48 3 22 35 0.78643200000000000000e6 +48 3 25 38 0.32768000000000000000e5 +48 3 27 40 -0.65536000000000000000e5 +48 3 28 41 0.78643200000000000000e6 +48 3 39 40 -0.32768000000000000000e5 +48 3 40 53 -0.32768000000000000000e5 +48 3 48 53 0.32768000000000000000e5 +48 3 49 54 0.32768000000000000000e5 +48 3 53 54 -0.32768000000000000000e5 +48 4 2 30 0.19660800000000000000e6 +48 4 6 34 0.39321600000000000000e6 +48 4 21 33 0.65536000000000000000e5 +48 4 33 33 -0.65536000000000000000e5 +48 4 35 35 -0.65536000000000000000e5 +49 1 1 48 0.32768000000000000000e5 +49 1 2 49 0.65536000000000000000e5 +49 1 6 53 -0.32768000000000000000e5 +49 1 8 39 0.65536000000000000000e5 +49 1 9 40 0.65536000000000000000e5 +49 1 10 41 -0.13107200000000000000e6 +49 1 12 43 -0.26214400000000000000e6 +49 1 23 38 0.32768000000000000000e5 +49 1 24 39 0.32768000000000000000e5 +49 1 25 56 0.32768000000000000000e5 +49 1 26 41 -0.65536000000000000000e5 +49 1 28 43 0.13107200000000000000e6 +49 1 32 47 0.26214400000000000000e6 +49 2 2 32 0.32768000000000000000e5 +49 2 3 33 0.32768000000000000000e5 +49 2 5 35 -0.32768000000000000000e5 +49 2 16 30 0.65536000000000000000e5 +49 2 20 34 0.13107200000000000000e6 +49 3 9 38 0.65536000000000000000e5 +49 3 22 35 0.26214400000000000000e6 +49 3 24 53 -0.32768000000000000000e5 +49 3 25 38 0.32768000000000000000e5 +49 3 25 54 -0.65536000000000000000e5 +49 3 28 41 0.26214400000000000000e6 +49 3 38 51 0.65536000000000000000e5 +49 3 39 40 -0.32768000000000000000e5 +49 4 2 30 0.65536000000000000000e5 +49 4 6 34 0.13107200000000000000e6 +49 4 28 32 -0.32768000000000000000e5 +50 1 25 56 0.32768000000000000000e5 +50 1 26 41 -0.65536000000000000000e5 +50 1 40 47 0.32768000000000000000e5 +50 3 27 40 0.65536000000000000000e5 +51 1 1 48 0.32768000000000000000e5 +51 1 2 49 0.32768000000000000000e5 +51 1 6 53 0.32768000000000000000e5 +51 1 8 39 0.65536000000000000000e5 +51 1 9 40 0.65536000000000000000e5 +51 1 10 41 -0.13107200000000000000e6 +51 1 12 43 -0.26214400000000000000e6 +51 1 23 38 0.32768000000000000000e5 +51 1 23 54 0.32768000000000000000e5 +51 1 25 40 -0.32768000000000000000e5 +51 1 26 41 -0.65536000000000000000e5 +51 1 28 43 0.13107200000000000000e6 +51 1 32 47 0.26214400000000000000e6 +51 1 40 47 0.32768000000000000000e5 +51 2 2 32 0.32768000000000000000e5 +51 2 16 30 0.65536000000000000000e5 +51 2 20 34 0.13107200000000000000e6 +51 3 9 38 0.65536000000000000000e5 +51 3 22 35 0.26214400000000000000e6 +51 3 24 37 0.32768000000000000000e5 +51 3 24 53 -0.32768000000000000000e5 +51 3 27 40 0.65536000000000000000e5 +51 3 28 41 0.26214400000000000000e6 +51 4 2 30 0.65536000000000000000e5 +51 4 4 32 -0.32768000000000000000e5 +51 4 6 34 0.13107200000000000000e6 +51 4 16 28 0.32768000000000000000e5 +52 1 22 53 -0.32768000000000000000e5 +52 1 23 54 -0.32768000000000000000e5 +52 1 24 55 -0.65536000000000000000e5 +52 1 26 41 0.65536000000000000000e5 +52 1 32 47 -0.13107200000000000000e6 +52 1 37 52 0.13107200000000000000e6 +52 1 38 53 0.32768000000000000000e5 +52 2 26 32 -0.32768000000000000000e5 +52 3 22 51 0.65536000000000000000e5 +52 3 27 40 -0.65536000000000000000e5 +52 4 20 32 0.65536000000000000000e5 +53 1 1 48 -0.65536000000000000000e5 +53 1 2 49 -0.65536000000000000000e5 +53 1 6 53 -0.65536000000000000000e5 +53 1 8 39 -0.65536000000000000000e5 +53 1 9 40 -0.65536000000000000000e5 +53 1 10 41 0.13107200000000000000e6 +53 1 12 43 0.26214400000000000000e6 +53 1 22 53 0.32768000000000000000e5 +53 1 23 38 -0.65536000000000000000e5 +53 1 25 40 0.65536000000000000000e5 +53 1 26 41 0.65536000000000000000e5 +53 1 28 43 -0.13107200000000000000e6 +53 1 32 47 -0.26214400000000000000e6 +53 1 38 53 -0.32768000000000000000e5 +53 1 40 47 -0.32768000000000000000e5 +53 2 2 32 -0.65536000000000000000e5 +53 2 4 34 -0.65536000000000000000e5 +53 2 16 30 -0.13107200000000000000e6 +53 2 16 34 0.65536000000000000000e5 +53 2 20 34 -0.13107200000000000000e6 +53 2 21 35 0.65536000000000000000e5 +53 2 32 32 -0.65536000000000000000e5 +53 3 5 50 -0.65536000000000000000e5 +53 3 7 52 0.26214400000000000000e6 +53 3 9 38 -0.65536000000000000000e5 +53 3 22 35 -0.26214400000000000000e6 +53 3 22 51 -0.65536000000000000000e5 +53 3 24 37 -0.65536000000000000000e5 +53 3 24 53 0.32768000000000000000e5 +53 3 27 40 -0.13107200000000000000e6 +53 3 28 41 -0.52428800000000000000e6 +53 3 37 50 -0.65536000000000000000e5 +53 4 2 30 -0.65536000000000000000e5 +53 4 4 32 0.65536000000000000000e5 +53 4 6 34 -0.26214400000000000000e6 +53 4 7 35 0.65536000000000000000e5 +53 4 16 28 -0.65536000000000000000e5 +53 4 17 29 0.65536000000000000000e5 +54 1 20 35 0.65536000000000000000e5 +54 1 21 52 -0.65536000000000000000e5 +54 3 17 46 -0.32768000000000000000e5 +54 3 21 50 -0.32768000000000000000e5 +54 3 21 55 -0.32768000000000000000e5 +54 3 36 45 -0.32768000000000000000e5 +55 1 11 18 0.16384000000000000000e5 +55 1 45 52 -0.16384000000000000000e5 +55 3 6 19 -0.16384000000000000000e5 +55 3 15 44 -0.16384000000000000000e5 +55 3 17 30 -0.16384000000000000000e5 +55 3 21 50 -0.65536000000000000000e5 +55 3 21 56 0.32768000000000000000e5 +55 3 32 45 -0.16384000000000000000e5 +55 3 36 49 0.16384000000000000000e5 +55 3 41 46 0.16384000000000000000e5 +55 4 15 35 0.16384000000000000000e5 +56 1 11 18 -0.16384000000000000000e5 +56 1 19 50 -0.32768000000000000000e5 +56 1 20 51 -0.32768000000000000000e5 +56 1 36 51 0.32768000000000000000e5 +56 1 45 52 0.16384000000000000000e5 +56 2 25 31 -0.32768000000000000000e5 +56 3 6 19 0.16384000000000000000e5 +56 3 15 44 0.16384000000000000000e5 +56 3 17 30 0.16384000000000000000e5 +56 3 32 45 0.16384000000000000000e5 +56 3 36 41 -0.32768000000000000000e5 +56 3 36 49 -0.16384000000000000000e5 +56 3 41 46 -0.16384000000000000000e5 +56 4 15 35 -0.16384000000000000000e5 +57 1 13 20 -0.13107200000000000000e6 +57 1 14 45 0.65536000000000000000e5 +57 1 17 32 0.65536000000000000000e5 +57 1 17 48 -0.16384000000000000000e5 +57 1 18 49 -0.16384000000000000000e5 +57 1 20 27 0.65536000000000000000e5 +57 1 34 49 -0.16384000000000000000e5 +57 1 45 52 0.32768000000000000000e5 +57 2 11 25 0.65536000000000000000e5 +57 2 14 28 -0.16384000000000000000e5 +57 3 8 21 0.13107200000000000000e6 +57 3 14 43 -0.16384000000000000000e5 +57 3 15 44 0.32768000000000000000e5 +57 3 18 31 0.65536000000000000000e5 +57 3 18 47 -0.16384000000000000000e5 +57 3 19 48 -0.32768000000000000000e5 +57 3 22 35 0.16384000000000000000e5 +57 4 14 26 0.16384000000000000000e5 +57 4 15 27 0.32768000000000000000e5 +58 1 4 35 0.16384000000000000000e5 +58 1 12 43 0.16384000000000000000e5 +58 1 14 45 0.65536000000000000000e5 +58 1 17 48 -0.16384000000000000000e5 +58 1 18 49 -0.16384000000000000000e5 +58 1 19 50 -0.65536000000000000000e5 +58 2 9 23 0.16384000000000000000e5 +58 2 14 28 -0.16384000000000000000e5 +58 3 5 34 0.16384000000000000000e5 +58 3 13 42 -0.16384000000000000000e5 +58 3 14 27 0.16384000000000000000e5 +58 3 14 43 -0.16384000000000000000e5 +58 3 15 44 0.32768000000000000000e5 +58 3 16 29 -0.32768000000000000000e5 +58 3 16 45 -0.65536000000000000000e5 +58 3 19 48 -0.32768000000000000000e5 +58 3 31 44 -0.32768000000000000000e5 +58 3 41 46 -0.32768000000000000000e5 +58 4 15 27 0.32768000000000000000e5 +59 1 11 18 -0.65536000000000000000e5 +59 1 34 49 0.32768000000000000000e5 +59 1 44 51 -0.32768000000000000000e5 +59 1 45 52 0.65536000000000000000e5 +59 3 6 19 0.65536000000000000000e5 +59 3 14 43 -0.32768000000000000000e5 +59 3 14 51 -0.32768000000000000000e5 +59 3 15 44 0.13107200000000000000e6 +59 3 17 30 0.13107200000000000000e6 +59 3 32 45 0.65536000000000000000e5 +59 3 35 40 -0.32768000000000000000e5 +59 3 35 48 0.32768000000000000000e5 +59 4 25 33 0.32768000000000000000e5 +60 1 14 45 -0.13107200000000000000e6 +60 1 17 48 0.32768000000000000000e5 +60 1 18 49 0.65536000000000000000e5 +60 1 34 49 0.65536000000000000000e5 +60 2 14 28 0.32768000000000000000e5 +60 3 14 43 0.32768000000000000000e5 +60 3 14 51 -0.32768000000000000000e5 +60 3 15 44 -0.65536000000000000000e5 +60 3 16 45 0.13107200000000000000e6 +60 3 18 47 0.32768000000000000000e5 +60 3 22 35 -0.32768000000000000000e5 +60 3 35 48 -0.32768000000000000000e5 +60 4 14 26 -0.32768000000000000000e5 +60 4 15 27 -0.65536000000000000000e5 +61 1 4 35 -0.32768000000000000000e5 +61 1 6 53 -0.40960000000000000000e4 +61 1 12 43 -0.32768000000000000000e5 +61 1 17 48 0.32768000000000000000e5 +61 1 25 40 0.40960000000000000000e4 +61 1 34 49 -0.32768000000000000000e5 +61 1 44 51 0.32768000000000000000e5 +61 2 4 34 -0.81920000000000000000e4 +61 2 9 23 -0.32768000000000000000e5 +61 2 21 35 0.81920000000000000000e4 +61 3 5 34 -0.32768000000000000000e5 +61 3 5 50 -0.81920000000000000000e4 +61 3 13 42 0.32768000000000000000e5 +61 3 14 27 -0.32768000000000000000e5 +61 3 16 29 0.65536000000000000000e5 +61 3 18 47 -0.32768000000000000000e5 +61 3 22 35 0.32768000000000000000e5 +61 3 24 37 -0.40960000000000000000e4 +61 3 27 40 -0.16384000000000000000e5 +61 3 28 41 -0.16384000000000000000e5 +61 3 29 42 -0.16384000000000000000e5 +61 4 4 32 0.40960000000000000000e4 +61 4 7 35 0.81920000000000000000e4 +61 4 14 26 0.32768000000000000000e5 +61 4 16 28 -0.40960000000000000000e4 +61 4 23 27 -0.16384000000000000000e5 +62 1 6 53 -0.40960000000000000000e4 +62 1 12 43 0.32768000000000000000e5 +62 1 17 48 0.32768000000000000000e5 +62 1 25 40 0.40960000000000000000e4 +62 1 34 41 -0.65536000000000000000e5 +62 2 4 34 -0.81920000000000000000e4 +62 2 21 35 0.81920000000000000000e4 +62 3 5 50 -0.81920000000000000000e4 +62 3 7 52 -0.32768000000000000000e5 +62 3 22 35 -0.32768000000000000000e5 +62 3 24 37 -0.40960000000000000000e4 +62 3 27 40 -0.16384000000000000000e5 +62 3 28 41 -0.16384000000000000000e5 +62 3 29 42 -0.16384000000000000000e5 +62 3 34 47 -0.32768000000000000000e5 +62 4 4 32 0.40960000000000000000e4 +62 4 7 35 0.81920000000000000000e4 +62 4 16 28 -0.40960000000000000000e4 +62 4 23 27 -0.16384000000000000000e5 +63 1 1 48 0.81920000000000000000e4 +63 1 2 49 0.81920000000000000000e4 +63 1 8 39 0.16384000000000000000e5 +63 1 9 40 0.16384000000000000000e5 +63 1 10 41 -0.32768000000000000000e5 +63 1 12 43 -0.65536000000000000000e5 +63 1 18 49 0.65536000000000000000e5 +63 1 23 38 0.81920000000000000000e4 +63 1 24 55 -0.16384000000000000000e5 +63 1 26 41 -0.16384000000000000000e5 +63 1 28 43 0.65536000000000000000e5 +63 1 32 47 0.65536000000000000000e5 +63 1 33 48 -0.32768000000000000000e5 +63 1 40 55 0.16384000000000000000e5 +63 1 41 56 0.16384000000000000000e5 +63 1 52 55 -0.65536000000000000000e5 +63 2 2 32 0.81920000000000000000e4 +63 2 4 34 -0.16384000000000000000e5 +63 2 16 30 0.16384000000000000000e5 +63 2 20 34 0.32768000000000000000e5 +63 2 28 34 0.16384000000000000000e5 +63 3 5 50 -0.16384000000000000000e5 +63 3 9 38 0.16384000000000000000e5 +63 3 14 51 -0.13107200000000000000e6 +63 3 22 35 0.65536000000000000000e5 +63 3 22 51 0.16384000000000000000e5 +63 3 23 52 -0.32768000000000000000e5 +63 3 27 40 -0.16384000000000000000e5 +63 3 27 56 0.16384000000000000000e5 +63 3 28 41 0.65536000000000000000e5 +63 3 35 48 -0.65536000000000000000e5 +63 3 38 51 -0.16384000000000000000e5 +63 3 40 45 -0.32768000000000000000e5 +63 3 45 50 -0.65536000000000000000e5 +63 3 45 56 0.32768000000000000000e5 +63 3 47 52 -0.32768000000000000000e5 +63 4 2 30 0.16384000000000000000e5 +63 4 6 34 0.32768000000000000000e5 +63 4 7 35 0.16384000000000000000e5 +63 4 22 34 -0.32768000000000000000e5 +63 4 29 33 -0.16384000000000000000e5 +63 4 30 34 -0.32768000000000000000e5 +63 4 31 35 -0.32768000000000000000e5 +64 1 33 40 0.32768000000000000000e5 +64 1 33 48 0.32768000000000000000e5 +64 1 34 49 -0.65536000000000000000e5 +64 3 10 55 -0.32768000000000000000e5 +64 3 14 51 -0.65536000000000000000e5 +64 3 18 47 -0.65536000000000000000e5 +64 3 29 42 0.32768000000000000000e5 +64 3 30 43 0.32768000000000000000e5 +64 4 19 31 0.32768000000000000000e5 +65 1 6 53 -0.81920000000000000000e4 +65 1 17 48 -0.65536000000000000000e5 +65 1 25 40 0.81920000000000000000e4 +65 1 28 43 0.32768000000000000000e5 +65 1 33 48 0.32768000000000000000e5 +65 2 4 34 -0.16384000000000000000e5 +65 2 21 35 0.16384000000000000000e5 +65 3 5 50 -0.16384000000000000000e5 +65 3 10 55 0.32768000000000000000e5 +65 3 24 37 -0.81920000000000000000e4 +65 3 27 40 -0.32768000000000000000e5 +65 3 35 48 -0.65536000000000000000e5 +65 3 40 45 0.32768000000000000000e5 +65 4 4 32 0.81920000000000000000e4 +65 4 7 35 0.16384000000000000000e5 +65 4 16 28 -0.81920000000000000000e4 +65 4 22 34 0.32768000000000000000e5 +66 1 6 53 -0.81920000000000000000e4 +66 1 12 43 -0.65536000000000000000e5 +66 1 25 40 0.81920000000000000000e4 +66 1 28 43 0.32768000000000000000e5 +66 1 32 47 0.32768000000000000000e5 +66 2 4 34 -0.16384000000000000000e5 +66 2 21 35 0.16384000000000000000e5 +66 3 5 50 -0.16384000000000000000e5 +66 3 22 35 0.65536000000000000000e5 +66 3 23 52 -0.32768000000000000000e5 +66 3 24 37 -0.81920000000000000000e4 +66 3 27 40 -0.32768000000000000000e5 +66 4 4 32 0.81920000000000000000e4 +66 4 7 35 0.16384000000000000000e5 +66 4 16 28 -0.81920000000000000000e4 +67 1 6 53 0.81920000000000000000e4 +67 1 12 43 0.65536000000000000000e5 +67 1 16 47 -0.65536000000000000000e5 +67 1 25 40 -0.81920000000000000000e4 +67 1 28 43 -0.32768000000000000000e5 +67 1 32 47 -0.32768000000000000000e5 +67 1 37 52 0.32768000000000000000e5 +67 2 4 34 0.16384000000000000000e5 +67 2 20 34 -0.32768000000000000000e5 +67 2 21 35 -0.16384000000000000000e5 +67 3 5 50 0.16384000000000000000e5 +67 3 7 52 -0.65536000000000000000e5 +67 3 22 35 -0.65536000000000000000e5 +67 3 24 37 0.81920000000000000000e4 +67 3 27 40 0.32768000000000000000e5 +67 4 4 32 -0.81920000000000000000e4 +67 4 7 35 -0.16384000000000000000e5 +67 4 16 28 0.81920000000000000000e4 +68 1 26 41 -0.32768000000000000000e5 +68 2 28 34 -0.32768000000000000000e5 +68 3 10 55 0.65536000000000000000e5 +68 3 22 51 -0.32768000000000000000e5 +68 3 23 52 0.65536000000000000000e5 +68 3 27 40 0.32768000000000000000e5 +68 3 29 42 -0.65536000000000000000e5 +68 3 35 48 -0.13107200000000000000e6 +68 3 40 45 0.65536000000000000000e5 +68 4 7 35 -0.32768000000000000000e5 +68 4 22 34 0.65536000000000000000e5 +69 1 1 48 0.16384000000000000000e5 +69 1 2 49 0.16384000000000000000e5 +69 1 8 39 0.32768000000000000000e5 +69 1 9 40 0.32768000000000000000e5 +69 1 10 41 -0.65536000000000000000e5 +69 1 12 43 -0.13107200000000000000e6 +69 1 23 38 0.16384000000000000000e5 +69 1 24 55 -0.32768000000000000000e5 +69 1 28 43 0.65536000000000000000e5 +69 1 32 47 0.13107200000000000000e6 +69 2 2 32 0.16384000000000000000e5 +69 2 4 34 -0.32768000000000000000e5 +69 2 16 30 0.32768000000000000000e5 +69 2 20 34 0.65536000000000000000e5 +69 3 5 50 -0.32768000000000000000e5 +69 3 9 38 0.32768000000000000000e5 +69 3 22 35 0.13107200000000000000e6 +69 3 22 51 0.32768000000000000000e5 +69 3 23 52 -0.65536000000000000000e5 +69 3 27 40 -0.65536000000000000000e5 +69 3 28 41 0.13107200000000000000e6 +69 4 2 30 0.32768000000000000000e5 +69 4 6 34 0.65536000000000000000e5 +69 4 7 35 0.32768000000000000000e5 +70 1 1 48 -0.16384000000000000000e5 +70 1 2 49 -0.16384000000000000000e5 +70 1 6 53 -0.16384000000000000000e5 +70 1 8 39 -0.32768000000000000000e5 +70 1 9 40 -0.32768000000000000000e5 +70 1 10 41 0.65536000000000000000e5 +70 1 12 43 0.13107200000000000000e6 +70 1 23 38 -0.16384000000000000000e5 +70 1 24 55 0.32768000000000000000e5 +70 1 25 40 0.16384000000000000000e5 +70 1 26 41 0.32768000000000000000e5 +70 1 28 43 -0.65536000000000000000e5 +70 1 32 47 -0.19660800000000000000e6 +70 2 2 32 -0.16384000000000000000e5 +70 2 16 30 -0.32768000000000000000e5 +70 2 20 34 -0.65536000000000000000e5 +70 3 9 38 -0.32768000000000000000e5 +70 3 22 35 -0.13107200000000000000e6 +70 3 24 37 -0.16384000000000000000e5 +70 3 27 40 -0.32768000000000000000e5 +70 3 28 41 -0.19660800000000000000e6 +70 4 2 30 -0.32768000000000000000e5 +70 4 4 32 0.16384000000000000000e5 +70 4 6 34 -0.65536000000000000000e5 +70 4 16 28 -0.16384000000000000000e5 +71 1 1 48 -0.16384000000000000000e5 +71 1 2 49 -0.16384000000000000000e5 +71 1 23 38 -0.16384000000000000000e5 +71 2 2 32 -0.16384000000000000000e5 +71 2 16 30 -0.32768000000000000000e5 +71 3 22 51 -0.32768000000000000000e5 +71 3 27 40 0.32768000000000000000e5 +71 3 28 41 -0.65536000000000000000e5 +71 4 17 29 0.32768000000000000000e5 +72 1 1 48 0.16384000000000000000e5 +72 1 2 33 0.65536000000000000000e5 +72 1 2 49 0.16384000000000000000e5 +72 1 3 34 -0.13107200000000000000e6 +72 1 6 53 0.32768000000000000000e5 +72 1 8 39 0.32768000000000000000e5 +72 1 10 41 0.65536000000000000000e5 +72 1 23 38 0.16384000000000000000e5 +72 1 24 55 -0.32768000000000000000e5 +72 1 25 40 -0.32768000000000000000e5 +72 1 26 41 0.32768000000000000000e5 +72 1 32 47 -0.65536000000000000000e5 +72 1 37 52 0.65536000000000000000e5 +72 2 2 32 0.16384000000000000000e5 +72 2 4 34 0.32768000000000000000e5 +72 2 7 21 0.65536000000000000000e5 +72 2 16 30 0.32768000000000000000e5 +72 2 16 34 -0.32768000000000000000e5 +72 2 21 35 -0.32768000000000000000e5 +72 3 2 31 0.65536000000000000000e5 +72 3 3 32 0.65536000000000000000e5 +72 3 5 50 0.32768000000000000000e5 +72 3 7 52 -0.13107200000000000000e6 +72 3 8 37 0.32768000000000000000e5 +72 3 22 27 0.32768000000000000000e5 +72 3 22 51 0.32768000000000000000e5 +72 3 24 37 0.32768000000000000000e5 +72 3 27 40 0.65536000000000000000e5 +72 3 28 41 0.65536000000000000000e5 +72 4 1 29 0.32768000000000000000e5 +72 4 4 32 -0.32768000000000000000e5 +72 4 6 34 0.65536000000000000000e5 +72 4 7 35 -0.32768000000000000000e5 +72 4 16 28 0.32768000000000000000e5 +72 4 20 32 0.32768000000000000000e5 +73 1 1 48 0.65536000000000000000e5 +73 1 2 49 0.98304000000000000000e5 +73 1 6 53 -0.32768000000000000000e5 +73 1 8 39 0.13107200000000000000e6 +73 1 9 40 0.13107200000000000000e6 +73 1 10 41 -0.26214400000000000000e6 +73 1 12 43 -0.52428800000000000000e6 +73 1 23 38 0.65536000000000000000e5 +73 1 24 39 0.32768000000000000000e5 +73 1 25 56 -0.32768000000000000000e5 +73 1 26 41 -0.19660800000000000000e6 +73 1 28 43 0.39321600000000000000e6 +73 1 32 47 0.52428800000000000000e6 +73 1 49 56 -0.32768000000000000000e5 +73 1 53 56 0.32768000000000000000e5 +73 1 54 55 0.65536000000000000000e5 +73 1 55 56 -0.65536000000000000000e5 +73 2 2 32 0.65536000000000000000e5 +73 2 3 33 0.32768000000000000000e5 +73 2 4 34 -0.65536000000000000000e5 +73 2 5 35 -0.32768000000000000000e5 +73 2 16 30 0.13107200000000000000e6 +73 2 20 34 0.26214400000000000000e6 +73 3 9 38 0.13107200000000000000e6 +73 3 10 55 0.13107200000000000000e6 +73 3 22 35 0.52428800000000000000e6 +73 3 22 51 -0.65536000000000000000e5 +73 3 23 52 0.13107200000000000000e6 +73 3 24 53 0.32768000000000000000e5 +73 3 25 38 0.32768000000000000000e5 +73 3 27 40 0.65536000000000000000e5 +73 3 28 41 0.52428800000000000000e6 +73 3 29 42 -0.13107200000000000000e6 +73 3 35 48 -0.26214400000000000000e6 +73 3 38 51 -0.65536000000000000000e5 +73 3 40 45 0.13107200000000000000e6 +73 3 40 53 -0.32768000000000000000e5 +73 3 48 53 0.32768000000000000000e5 +73 3 49 54 0.32768000000000000000e5 +73 3 53 54 -0.32768000000000000000e5 +73 4 2 30 0.13107200000000000000e6 +73 4 6 34 0.26214400000000000000e6 +73 4 7 35 -0.65536000000000000000e5 +73 4 18 30 0.65536000000000000000e5 +73 4 19 35 -0.32768000000000000000e5 +73 4 21 33 0.65536000000000000000e5 +73 4 22 34 0.13107200000000000000e6 +73 4 28 32 0.32768000000000000000e5 +73 4 33 33 -0.65536000000000000000e5 +73 4 35 35 -0.65536000000000000000e5 +74 1 1 48 0.32768000000000000000e5 +74 1 2 49 0.65536000000000000000e5 +74 1 8 39 0.65536000000000000000e5 +74 1 9 40 0.65536000000000000000e5 +74 1 10 41 -0.13107200000000000000e6 +74 1 12 43 -0.26214400000000000000e6 +74 1 23 38 0.32768000000000000000e5 +74 1 24 39 0.32768000000000000000e5 +74 1 26 41 -0.65536000000000000000e5 +74 1 28 43 0.13107200000000000000e6 +74 1 32 47 0.26214400000000000000e6 +74 2 2 32 0.32768000000000000000e5 +74 2 3 33 0.32768000000000000000e5 +74 2 5 35 -0.32768000000000000000e5 +74 2 16 30 0.65536000000000000000e5 +74 2 20 34 0.13107200000000000000e6 +74 3 5 50 -0.65536000000000000000e5 +74 3 9 38 0.65536000000000000000e5 +74 3 22 35 0.26214400000000000000e6 +74 3 25 38 0.32768000000000000000e5 +74 3 28 41 0.26214400000000000000e6 +74 3 39 40 -0.32768000000000000000e5 +74 4 2 30 0.65536000000000000000e5 +74 4 6 34 0.13107200000000000000e6 +75 1 1 48 -0.32768000000000000000e5 +75 1 2 49 -0.65536000000000000000e5 +75 1 8 39 -0.65536000000000000000e5 +75 1 9 40 -0.65536000000000000000e5 +75 1 10 41 0.13107200000000000000e6 +75 1 12 43 0.26214400000000000000e6 +75 1 23 38 -0.32768000000000000000e5 +75 1 24 39 -0.32768000000000000000e5 +75 1 25 56 0.32768000000000000000e5 +75 1 28 43 -0.13107200000000000000e6 +75 1 32 47 -0.26214400000000000000e6 +75 2 2 32 -0.32768000000000000000e5 +75 2 3 33 -0.32768000000000000000e5 +75 2 16 30 -0.65536000000000000000e5 +75 2 20 34 -0.13107200000000000000e6 +75 3 9 38 -0.65536000000000000000e5 +75 3 22 35 -0.26214400000000000000e6 +75 3 24 53 -0.32768000000000000000e5 +75 3 25 38 -0.32768000000000000000e5 +75 3 25 54 -0.32768000000000000000e5 +75 3 28 41 -0.26214400000000000000e6 +75 3 38 51 0.65536000000000000000e5 +75 4 2 30 -0.65536000000000000000e5 +75 4 6 34 -0.13107200000000000000e6 +75 4 28 32 -0.32768000000000000000e5 +76 1 1 48 0.32768000000000000000e5 +76 1 2 49 0.32768000000000000000e5 +76 1 6 53 -0.32768000000000000000e5 +76 1 8 39 0.65536000000000000000e5 +76 1 9 40 0.65536000000000000000e5 +76 1 10 41 -0.13107200000000000000e6 +76 1 12 43 -0.26214400000000000000e6 +76 1 23 38 0.32768000000000000000e5 +76 1 24 39 0.32768000000000000000e5 +76 1 25 40 0.32768000000000000000e5 +76 1 26 41 -0.65536000000000000000e5 +76 1 28 43 0.13107200000000000000e6 +76 1 32 47 0.26214400000000000000e6 +76 1 40 47 0.32768000000000000000e5 +76 2 2 32 0.32768000000000000000e5 +76 2 16 30 0.65536000000000000000e5 +76 2 20 34 0.13107200000000000000e6 +76 3 9 38 0.65536000000000000000e5 +76 3 22 35 0.26214400000000000000e6 +76 3 25 38 0.32768000000000000000e5 +76 3 27 40 -0.65536000000000000000e5 +76 3 28 41 0.26214400000000000000e6 +76 4 2 30 0.65536000000000000000e5 +76 4 4 32 0.32768000000000000000e5 +76 4 6 34 0.13107200000000000000e6 +77 1 2 49 0.32768000000000000000e5 +77 1 8 39 -0.65536000000000000000e5 +77 1 9 40 -0.65536000000000000000e5 +77 1 10 41 0.13107200000000000000e6 +77 1 23 54 0.32768000000000000000e5 +77 1 26 41 0.65536000000000000000e5 +77 1 32 47 -0.13107200000000000000e6 +77 3 9 38 -0.65536000000000000000e5 +77 3 24 37 -0.32768000000000000000e5 +77 3 28 41 -0.13107200000000000000e6 +77 4 2 30 -0.65536000000000000000e5 +78 1 1 48 -0.32768000000000000000e5 +78 1 2 49 -0.32768000000000000000e5 +78 1 6 53 0.32768000000000000000e5 +78 1 8 39 0.65536000000000000000e5 +78 1 9 40 0.65536000000000000000e5 +78 1 10 41 -0.13107200000000000000e6 +78 1 22 53 -0.32768000000000000000e5 +78 1 23 54 -0.32768000000000000000e5 +78 1 24 55 -0.65536000000000000000e5 +78 1 25 40 -0.32768000000000000000e5 +78 1 37 52 0.13107200000000000000e6 +78 2 2 32 -0.32768000000000000000e5 +78 2 26 32 -0.32768000000000000000e5 +78 3 2 47 -0.32768000000000000000e5 +78 3 9 38 0.65536000000000000000e5 +78 3 22 51 0.65536000000000000000e5 +78 3 24 37 0.32768000000000000000e5 +78 3 27 40 0.65536000000000000000e5 +78 4 2 30 0.65536000000000000000e5 +78 4 4 32 -0.32768000000000000000e5 +78 4 16 28 0.32768000000000000000e5 +78 4 17 29 0.65536000000000000000e5 +78 4 20 32 0.65536000000000000000e5 +79 1 1 48 0.32768000000000000000e5 +79 1 6 53 0.32768000000000000000e5 +79 1 7 38 -0.65536000000000000000e5 +79 1 22 53 0.32768000000000000000e5 +79 1 25 40 -0.32768000000000000000e5 +79 2 1 35 -0.32768000000000000000e5 +79 2 2 32 0.32768000000000000000e5 +79 2 4 34 0.65536000000000000000e5 +79 2 16 30 0.65536000000000000000e5 +79 2 16 34 -0.65536000000000000000e5 +79 2 21 35 -0.65536000000000000000e5 +79 3 2 47 0.32768000000000000000e5 +79 3 5 50 0.65536000000000000000e5 +79 3 7 52 -0.26214400000000000000e6 +79 3 22 27 0.65536000000000000000e5 +79 3 24 37 0.65536000000000000000e5 +79 3 27 40 0.65536000000000000000e5 +79 3 28 41 0.26214400000000000000e6 +79 4 4 32 -0.32768000000000000000e5 +79 4 6 34 0.13107200000000000000e6 +79 4 7 35 -0.65536000000000000000e5 +79 4 16 28 0.32768000000000000000e5 +79 4 17 29 -0.65536000000000000000e5 +80 1 6 21 -0.81920000000000000000e4 +80 1 17 32 -0.81920000000000000000e4 +80 1 19 50 0.81920000000000000000e4 +80 1 20 51 0.81920000000000000000e4 +80 2 9 15 -0.81920000000000000000e4 +80 2 25 31 0.81920000000000000000e4 +80 3 7 20 0.81920000000000000000e4 +80 3 8 21 -0.16384000000000000000e5 +80 3 14 19 0.16384000000000000000e5 +80 3 16 45 -0.81920000000000000000e4 +80 3 17 46 -0.16384000000000000000e5 +80 3 18 31 -0.81920000000000000000e4 +80 3 19 32 0.16384000000000000000e5 +80 3 20 45 -0.16384000000000000000e5 +80 3 21 34 0.65536000000000000000e5 +80 3 21 52 -0.32768000000000000000e5 +80 4 10 14 0.81920000000000000000e4 +80 4 25 25 -0.32768000000000000000e5 +81 1 6 21 -0.16384000000000000000e5 +81 1 17 32 -0.16384000000000000000e5 +81 1 19 50 0.16384000000000000000e5 +81 1 20 35 0.65536000000000000000e5 +81 1 20 51 0.16384000000000000000e5 +81 1 21 52 -0.65536000000000000000e5 +81 2 9 15 -0.16384000000000000000e5 +81 2 25 31 0.16384000000000000000e5 +81 3 7 20 0.16384000000000000000e5 +81 3 8 21 -0.32768000000000000000e5 +81 3 14 19 0.32768000000000000000e5 +81 3 16 45 -0.16384000000000000000e5 +81 3 17 46 -0.65536000000000000000e5 +81 3 18 31 -0.16384000000000000000e5 +81 3 19 32 0.32768000000000000000e5 +81 3 20 45 -0.32768000000000000000e5 +81 3 36 45 -0.32768000000000000000e5 +81 4 10 14 0.16384000000000000000e5 +81 4 25 25 -0.65536000000000000000e5 +82 1 13 20 0.32768000000000000000e5 +82 1 17 32 -0.16384000000000000000e5 +82 1 19 50 0.16384000000000000000e5 +82 1 20 27 -0.16384000000000000000e5 +82 1 20 51 0.16384000000000000000e5 +82 1 21 44 -0.65536000000000000000e5 +82 1 33 36 0.32768000000000000000e5 +82 2 11 25 -0.16384000000000000000e5 +82 2 25 31 0.16384000000000000000e5 +82 3 8 21 -0.32768000000000000000e5 +82 3 16 45 -0.16384000000000000000e5 +82 3 17 46 -0.32768000000000000000e5 +82 3 18 31 -0.16384000000000000000e5 +82 3 21 50 -0.32768000000000000000e5 +83 1 11 18 0.16384000000000000000e5 +83 1 20 51 0.32768000000000000000e5 +83 1 36 51 -0.32768000000000000000e5 +83 1 45 52 -0.16384000000000000000e5 +83 3 6 19 -0.16384000000000000000e5 +83 3 15 44 -0.16384000000000000000e5 +83 3 17 30 -0.16384000000000000000e5 +83 3 17 46 -0.65536000000000000000e5 +83 3 21 50 -0.65536000000000000000e5 +83 3 21 56 0.32768000000000000000e5 +83 3 32 45 -0.16384000000000000000e5 +83 3 36 49 0.16384000000000000000e5 +83 3 41 46 0.16384000000000000000e5 +83 3 45 46 0.32768000000000000000e5 +83 4 15 35 0.16384000000000000000e5 +84 1 6 21 -0.32768000000000000000e5 +84 1 17 32 -0.32768000000000000000e5 +84 1 36 51 0.32768000000000000000e5 +84 2 9 15 -0.32768000000000000000e5 +84 3 7 20 0.32768000000000000000e5 +84 3 8 21 -0.65536000000000000000e5 +84 3 14 19 0.65536000000000000000e5 +84 3 16 45 -0.32768000000000000000e5 +84 3 18 31 -0.32768000000000000000e5 +84 3 19 32 0.65536000000000000000e5 +84 4 10 14 0.32768000000000000000e5 +85 1 3 18 -0.81920000000000000000e4 +85 1 4 19 0.16384000000000000000e5 +85 1 5 36 0.16384000000000000000e5 +85 1 12 43 0.81920000000000000000e4 +85 1 13 44 -0.16384000000000000000e5 +85 1 14 45 -0.16384000000000000000e5 +85 1 17 32 -0.32768000000000000000e5 +85 1 19 50 0.32768000000000000000e5 +85 1 20 27 -0.32768000000000000000e5 +85 2 15 29 -0.32768000000000000000e5 +85 3 3 16 -0.81920000000000000000e4 +85 3 4 17 -0.81920000000000000000e4 +85 3 7 36 0.32768000000000000000e5 +85 3 14 27 0.81920000000000000000e4 +85 3 16 29 0.16384000000000000000e5 +85 3 16 45 -0.32768000000000000000e5 +85 3 36 41 -0.32768000000000000000e5 +85 4 2 14 -0.81920000000000000000e4 +85 4 11 23 0.16384000000000000000e5 +86 1 15 46 -0.65536000000000000000e5 +86 1 20 51 0.65536000000000000000e5 +86 3 32 45 0.32768000000000000000e5 +86 3 36 49 0.32768000000000000000e5 +87 1 11 18 0.32768000000000000000e5 +87 1 13 20 -0.13107200000000000000e6 +87 1 14 45 0.65536000000000000000e5 +87 1 17 32 0.65536000000000000000e5 +87 1 17 48 -0.16384000000000000000e5 +87 1 18 49 -0.16384000000000000000e5 +87 1 20 27 0.65536000000000000000e5 +87 1 34 49 -0.16384000000000000000e5 +87 2 11 25 0.65536000000000000000e5 +87 2 14 28 -0.16384000000000000000e5 +87 3 6 19 -0.32768000000000000000e5 +87 3 8 21 0.13107200000000000000e6 +87 3 14 43 -0.16384000000000000000e5 +87 3 16 45 -0.65536000000000000000e5 +87 3 17 30 -0.32768000000000000000e5 +87 3 18 31 0.65536000000000000000e5 +87 3 18 47 -0.16384000000000000000e5 +87 3 22 35 0.16384000000000000000e5 +87 3 32 45 -0.32768000000000000000e5 +87 4 14 26 0.16384000000000000000e5 +87 4 15 27 0.32768000000000000000e5 +88 1 3 18 -0.16384000000000000000e5 +88 1 4 19 0.32768000000000000000e5 +88 1 4 35 0.16384000000000000000e5 +88 1 5 36 0.32768000000000000000e5 +88 1 12 43 0.32768000000000000000e5 +88 1 13 44 -0.32768000000000000000e5 +88 1 14 45 0.32768000000000000000e5 +88 1 17 32 -0.65536000000000000000e5 +88 1 17 48 -0.16384000000000000000e5 +88 1 18 49 -0.16384000000000000000e5 +88 2 9 23 0.16384000000000000000e5 +88 2 14 28 -0.16384000000000000000e5 +88 3 3 16 -0.16384000000000000000e5 +88 3 4 17 -0.16384000000000000000e5 +88 3 5 34 0.16384000000000000000e5 +88 3 13 42 -0.16384000000000000000e5 +88 3 14 27 0.32768000000000000000e5 +88 3 14 43 -0.16384000000000000000e5 +88 3 15 44 0.32768000000000000000e5 +88 3 16 45 -0.65536000000000000000e5 +88 3 19 48 -0.32768000000000000000e5 +88 4 2 14 -0.16384000000000000000e5 +88 4 11 23 0.32768000000000000000e5 +88 4 15 27 0.32768000000000000000e5 +89 1 4 35 0.16384000000000000000e5 +89 1 12 43 0.16384000000000000000e5 +89 1 20 27 -0.65536000000000000000e5 +89 1 34 41 0.32768000000000000000e5 +89 1 34 49 0.16384000000000000000e5 +89 2 9 23 0.16384000000000000000e5 +89 3 5 34 0.16384000000000000000e5 +89 3 7 36 0.65536000000000000000e5 +89 3 13 42 -0.16384000000000000000e5 +89 3 14 27 0.16384000000000000000e5 +89 3 16 29 -0.32768000000000000000e5 +89 3 18 47 0.16384000000000000000e5 +89 3 22 35 -0.16384000000000000000e5 +89 3 31 44 -0.32768000000000000000e5 +89 4 14 26 -0.16384000000000000000e5 +90 3 14 43 -0.32768000000000000000e5 +90 3 17 30 0.65536000000000000000e5 +90 3 35 40 -0.32768000000000000000e5 +91 1 14 45 -0.65536000000000000000e5 +91 1 18 49 0.32768000000000000000e5 +91 1 34 49 0.32768000000000000000e5 +91 3 14 51 -0.32768000000000000000e5 +91 3 18 47 0.32768000000000000000e5 +92 1 4 35 -0.32768000000000000000e5 +92 1 12 43 -0.32768000000000000000e5 +92 1 14 45 -0.65536000000000000000e5 +92 1 17 48 0.65536000000000000000e5 +92 1 18 49 0.32768000000000000000e5 +92 1 34 49 0.32768000000000000000e5 +92 2 9 23 -0.32768000000000000000e5 +92 2 14 28 0.32768000000000000000e5 +92 3 5 34 -0.32768000000000000000e5 +92 3 13 42 0.32768000000000000000e5 +92 3 14 27 -0.32768000000000000000e5 +92 3 14 43 0.32768000000000000000e5 +92 3 16 29 0.65536000000000000000e5 +93 1 6 53 -0.40960000000000000000e4 +93 1 12 43 0.32768000000000000000e5 +93 1 13 44 -0.65536000000000000000e5 +93 1 17 48 0.32768000000000000000e5 +93 1 25 40 0.40960000000000000000e4 +93 2 4 34 -0.81920000000000000000e4 +93 2 21 35 0.81920000000000000000e4 +93 3 5 50 -0.81920000000000000000e4 +93 3 22 35 -0.32768000000000000000e5 +93 3 24 37 -0.40960000000000000000e4 +93 3 27 40 -0.16384000000000000000e5 +93 3 28 41 -0.16384000000000000000e5 +93 3 29 42 -0.16384000000000000000e5 +93 4 4 32 0.40960000000000000000e4 +93 4 7 35 0.81920000000000000000e4 +93 4 16 28 -0.40960000000000000000e4 +93 4 23 27 -0.16384000000000000000e5 +94 1 12 43 0.32768000000000000000e5 +94 1 16 47 0.32768000000000000000e5 +94 1 27 34 -0.65536000000000000000e5 +94 3 7 52 -0.32768000000000000000e5 +94 3 22 35 -0.32768000000000000000e5 +95 1 1 48 0.81920000000000000000e4 +95 1 2 49 0.81920000000000000000e4 +95 1 8 39 0.16384000000000000000e5 +95 1 9 40 0.16384000000000000000e5 +95 1 10 41 -0.32768000000000000000e5 +95 1 12 43 -0.65536000000000000000e5 +95 1 18 49 0.65536000000000000000e5 +95 1 23 38 0.81920000000000000000e4 +95 1 24 55 -0.16384000000000000000e5 +95 1 26 41 -0.16384000000000000000e5 +95 1 28 43 0.65536000000000000000e5 +95 1 32 47 0.65536000000000000000e5 +95 1 33 48 -0.32768000000000000000e5 +95 1 40 55 0.16384000000000000000e5 +95 1 41 56 0.16384000000000000000e5 +95 1 52 55 -0.65536000000000000000e5 +95 2 2 32 0.81920000000000000000e4 +95 2 4 34 -0.16384000000000000000e5 +95 2 16 30 0.16384000000000000000e5 +95 2 20 34 0.32768000000000000000e5 +95 2 28 34 0.16384000000000000000e5 +95 3 5 50 -0.16384000000000000000e5 +95 3 9 38 0.16384000000000000000e5 +95 3 14 43 -0.65536000000000000000e5 +95 3 14 51 -0.65536000000000000000e5 +95 3 22 35 0.65536000000000000000e5 +95 3 22 51 0.16384000000000000000e5 +95 3 23 52 -0.32768000000000000000e5 +95 3 27 40 -0.16384000000000000000e5 +95 3 27 56 0.16384000000000000000e5 +95 3 28 41 0.65536000000000000000e5 +95 3 29 42 -0.32768000000000000000e5 +95 3 30 43 -0.32768000000000000000e5 +95 3 35 48 -0.65536000000000000000e5 +95 3 38 51 -0.16384000000000000000e5 +95 3 45 50 -0.65536000000000000000e5 +95 3 45 56 0.32768000000000000000e5 +95 3 47 52 -0.32768000000000000000e5 +95 4 2 30 0.16384000000000000000e5 +95 4 6 34 0.32768000000000000000e5 +95 4 7 35 0.16384000000000000000e5 +95 4 19 31 -0.32768000000000000000e5 +95 4 22 34 -0.32768000000000000000e5 +95 4 29 33 -0.16384000000000000000e5 +95 4 30 34 -0.32768000000000000000e5 +95 4 31 35 -0.32768000000000000000e5 +96 1 14 45 -0.13107200000000000000e6 +96 1 17 48 0.65536000000000000000e5 +96 1 18 49 0.65536000000000000000e5 +96 1 33 40 0.32768000000000000000e5 +96 1 33 48 0.32768000000000000000e5 +96 2 14 28 0.65536000000000000000e5 +96 3 13 42 0.65536000000000000000e5 +96 3 14 43 0.65536000000000000000e5 +96 3 14 51 -0.65536000000000000000e5 +96 3 29 42 0.65536000000000000000e5 +96 3 30 43 0.32768000000000000000e5 +96 4 19 31 0.32768000000000000000e5 +97 1 17 48 -0.65536000000000000000e5 +97 1 28 43 0.32768000000000000000e5 +97 1 33 48 0.32768000000000000000e5 +97 3 13 42 -0.65536000000000000000e5 +98 1 6 53 -0.81920000000000000000e4 +98 1 12 43 -0.65536000000000000000e5 +98 1 25 40 0.81920000000000000000e4 +98 1 28 43 0.32768000000000000000e5 +98 1 32 47 0.32768000000000000000e5 +98 2 4 34 -0.16384000000000000000e5 +98 2 21 35 0.16384000000000000000e5 +98 3 5 50 -0.16384000000000000000e5 +98 3 24 37 -0.81920000000000000000e4 +98 3 27 40 -0.32768000000000000000e5 +98 3 28 41 0.32768000000000000000e5 +98 4 4 32 0.81920000000000000000e4 +98 4 7 35 0.16384000000000000000e5 +98 4 16 28 -0.81920000000000000000e4 +99 1 12 43 0.65536000000000000000e5 +99 1 16 47 -0.65536000000000000000e5 +99 1 28 43 -0.32768000000000000000e5 +99 2 20 34 -0.32768000000000000000e5 +99 3 12 41 -0.65536000000000000000e5 +99 3 22 35 -0.65536000000000000000e5 +99 3 28 41 -0.32768000000000000000e5 +99 4 6 34 -0.32768000000000000000e5 +100 1 2 33 -0.32768000000000000000e5 +100 1 3 34 0.65536000000000000000e5 +100 1 6 53 0.81920000000000000000e4 +100 1 9 40 0.16384000000000000000e5 +100 1 10 41 -0.65536000000000000000e5 +100 1 12 43 0.65536000000000000000e5 +100 1 16 23 -0.65536000000000000000e5 +100 1 25 40 -0.81920000000000000000e4 +100 1 26 41 -0.16384000000000000000e5 +100 1 28 43 -0.32768000000000000000e5 +100 2 4 34 0.16384000000000000000e5 +100 2 7 21 -0.32768000000000000000e5 +100 2 20 34 -0.32768000000000000000e5 +100 2 21 35 -0.16384000000000000000e5 +100 3 1 34 0.65536000000000000000e5 +100 3 2 31 -0.32768000000000000000e5 +100 3 3 32 -0.32768000000000000000e5 +100 3 5 50 0.16384000000000000000e5 +100 3 7 52 -0.65536000000000000000e5 +100 3 8 37 -0.16384000000000000000e5 +100 3 9 38 0.16384000000000000000e5 +100 3 22 27 -0.16384000000000000000e5 +100 3 22 35 -0.65536000000000000000e5 +100 3 24 37 0.81920000000000000000e4 +100 3 27 40 0.32768000000000000000e5 +100 3 28 41 0.32768000000000000000e5 +100 4 1 29 -0.16384000000000000000e5 +100 4 2 30 0.16384000000000000000e5 +100 4 4 32 -0.81920000000000000000e4 +100 4 7 35 -0.16384000000000000000e5 +100 4 16 28 0.81920000000000000000e4 +101 1 26 33 -0.65536000000000000000e5 +101 1 33 40 0.65536000000000000000e5 +101 3 5 50 -0.32768000000000000000e5 +101 3 6 55 0.32768000000000000000e5 +101 3 27 40 -0.32768000000000000000e5 +101 3 29 42 0.65536000000000000000e5 +101 4 18 30 -0.32768000000000000000e5 +102 1 11 42 -0.65536000000000000000e5 +102 1 26 41 -0.32768000000000000000e5 +102 1 33 48 0.65536000000000000000e5 +102 2 28 34 -0.32768000000000000000e5 +102 3 5 50 0.32768000000000000000e5 +102 3 27 40 0.32768000000000000000e5 +102 4 21 33 -0.32768000000000000000e5 +103 1 1 48 0.16384000000000000000e5 +103 1 2 49 0.16384000000000000000e5 +103 1 8 39 0.32768000000000000000e5 +103 1 9 40 0.32768000000000000000e5 +103 1 11 42 0.65536000000000000000e5 +103 1 12 43 -0.13107200000000000000e6 +103 1 23 38 0.16384000000000000000e5 +103 1 26 41 -0.32768000000000000000e5 +103 1 28 43 0.65536000000000000000e5 +103 1 32 47 0.65536000000000000000e5 +103 1 33 48 -0.65536000000000000000e5 +103 2 2 32 0.16384000000000000000e5 +103 2 4 34 -0.32768000000000000000e5 +103 2 16 30 0.32768000000000000000e5 +103 2 20 34 0.65536000000000000000e5 +103 3 5 50 -0.32768000000000000000e5 +103 3 9 38 0.32768000000000000000e5 +103 3 13 42 -0.13107200000000000000e6 +103 3 22 35 0.13107200000000000000e6 +103 3 28 41 0.65536000000000000000e5 +103 3 29 42 -0.65536000000000000000e5 +103 4 2 30 0.32768000000000000000e5 +103 4 3 31 0.65536000000000000000e5 +103 4 6 34 0.65536000000000000000e5 +104 1 1 48 -0.16384000000000000000e5 +104 1 2 49 -0.16384000000000000000e5 +104 1 8 39 -0.32768000000000000000e5 +104 1 9 40 -0.32768000000000000000e5 +104 1 12 43 0.13107200000000000000e6 +104 1 23 38 -0.16384000000000000000e5 +104 1 26 41 0.65536000000000000000e5 +104 1 28 43 -0.65536000000000000000e5 +104 1 32 47 -0.13107200000000000000e6 +104 2 2 32 -0.16384000000000000000e5 +104 2 16 30 -0.32768000000000000000e5 +104 2 20 34 -0.65536000000000000000e5 +104 3 9 38 -0.32768000000000000000e5 +104 3 22 35 -0.13107200000000000000e6 +104 3 27 40 -0.32768000000000000000e5 +104 3 28 41 -0.13107200000000000000e6 +104 4 2 30 -0.32768000000000000000e5 +104 4 6 34 -0.65536000000000000000e5 +105 1 1 48 -0.16384000000000000000e5 +105 1 2 49 -0.16384000000000000000e5 +105 1 6 53 -0.16384000000000000000e5 +105 1 11 42 -0.65536000000000000000e5 +105 1 23 38 -0.16384000000000000000e5 +105 1 25 40 0.16384000000000000000e5 +105 1 33 48 0.65536000000000000000e5 +105 2 2 32 -0.16384000000000000000e5 +105 2 12 26 0.65536000000000000000e5 +105 2 16 30 -0.32768000000000000000e5 +105 2 20 34 -0.65536000000000000000e5 +105 3 13 42 0.13107200000000000000e6 +105 3 22 35 -0.13107200000000000000e6 +105 3 24 37 -0.16384000000000000000e5 +105 3 27 40 -0.32768000000000000000e5 +105 3 29 42 0.65536000000000000000e5 +105 4 3 31 -0.65536000000000000000e5 +105 4 4 32 0.16384000000000000000e5 +105 4 6 34 -0.65536000000000000000e5 +105 4 16 28 -0.16384000000000000000e5 +106 1 1 48 0.16384000000000000000e5 +106 1 2 33 0.65536000000000000000e5 +106 1 2 49 0.16384000000000000000e5 +106 1 3 34 -0.13107200000000000000e6 +106 1 6 53 0.16384000000000000000e5 +106 1 8 39 0.32768000000000000000e5 +106 1 9 40 0.32768000000000000000e5 +106 1 23 38 0.16384000000000000000e5 +106 1 25 40 -0.16384000000000000000e5 +106 1 26 41 -0.32768000000000000000e5 +106 1 32 47 0.65536000000000000000e5 +106 2 2 32 0.16384000000000000000e5 +106 2 7 21 0.65536000000000000000e5 +106 3 2 31 0.65536000000000000000e5 +106 3 3 32 0.65536000000000000000e5 +106 3 9 38 0.32768000000000000000e5 +106 3 24 37 0.16384000000000000000e5 +106 3 27 40 0.65536000000000000000e5 +106 4 2 30 0.32768000000000000000e5 +106 4 4 32 -0.16384000000000000000e5 +106 4 16 28 0.16384000000000000000e5 +106 4 17 29 0.32768000000000000000e5 +107 1 1 48 0.16384000000000000000e5 +107 1 2 33 -0.65536000000000000000e5 +107 1 2 49 0.16384000000000000000e5 +107 1 3 34 0.13107200000000000000e6 +107 1 6 53 0.16384000000000000000e5 +107 1 7 38 0.32768000000000000000e5 +107 1 10 41 -0.65536000000000000000e5 +107 1 11 42 0.65536000000000000000e5 +107 1 12 43 0.13107200000000000000e6 +107 1 16 23 -0.13107200000000000000e6 +107 1 23 38 0.16384000000000000000e5 +107 1 25 40 -0.16384000000000000000e5 +107 1 28 43 -0.65536000000000000000e5 +107 1 32 47 -0.65536000000000000000e5 +107 1 33 48 -0.65536000000000000000e5 +107 2 1 31 0.65536000000000000000e5 +107 2 2 32 0.16384000000000000000e5 +107 2 4 34 0.32768000000000000000e5 +107 2 7 21 -0.65536000000000000000e5 +107 2 12 26 -0.65536000000000000000e5 +107 2 16 30 0.32768000000000000000e5 +107 2 16 34 -0.32768000000000000000e5 +107 2 21 35 -0.32768000000000000000e5 +107 3 1 34 0.13107200000000000000e6 +107 3 2 31 -0.65536000000000000000e5 +107 3 3 32 -0.65536000000000000000e5 +107 3 5 50 0.32768000000000000000e5 +107 3 7 52 -0.13107200000000000000e6 +107 3 13 42 -0.13107200000000000000e6 +107 3 22 27 -0.32768000000000000000e5 +107 3 24 37 0.16384000000000000000e5 +107 3 27 40 0.32768000000000000000e5 +107 3 28 41 0.65536000000000000000e5 +107 3 29 42 -0.65536000000000000000e5 +107 4 3 31 0.65536000000000000000e5 +107 4 4 32 -0.16384000000000000000e5 +107 4 6 34 0.65536000000000000000e5 +107 4 7 35 -0.32768000000000000000e5 +107 4 16 28 0.16384000000000000000e5 +107 4 17 29 -0.32768000000000000000e5 +108 1 1 48 0.65536000000000000000e5 +108 1 2 49 0.98304000000000000000e5 +108 1 6 53 -0.65536000000000000000e5 +108 1 8 39 0.13107200000000000000e6 +108 1 9 40 0.19660800000000000000e6 +108 1 10 41 -0.26214400000000000000e6 +108 1 11 42 -0.13107200000000000000e6 +108 1 12 43 -0.52428800000000000000e6 +108 1 23 38 0.65536000000000000000e5 +108 1 24 39 0.32768000000000000000e5 +108 1 26 41 -0.26214400000000000000e6 +108 1 28 43 0.39321600000000000000e6 +108 1 32 47 0.52428800000000000000e6 +108 1 33 48 0.13107200000000000000e6 +108 1 49 56 -0.32768000000000000000e5 +108 1 53 56 0.32768000000000000000e5 +108 1 54 55 0.65536000000000000000e5 +108 1 55 56 -0.65536000000000000000e5 +108 2 2 32 0.65536000000000000000e5 +108 2 3 33 0.32768000000000000000e5 +108 2 4 34 -0.65536000000000000000e5 +108 2 5 35 -0.32768000000000000000e5 +108 2 16 30 0.13107200000000000000e6 +108 2 20 34 0.26214400000000000000e6 +108 3 9 38 0.13107200000000000000e6 +108 3 10 39 0.65536000000000000000e5 +108 3 22 35 0.52428800000000000000e6 +108 3 25 38 0.32768000000000000000e5 +108 3 25 54 -0.32768000000000000000e5 +108 3 26 39 0.32768000000000000000e5 +108 3 27 40 0.65536000000000000000e5 +108 3 28 41 0.52428800000000000000e6 +108 3 39 40 -0.32768000000000000000e5 +108 3 40 53 -0.32768000000000000000e5 +108 3 48 53 0.32768000000000000000e5 +108 3 49 54 0.32768000000000000000e5 +108 3 53 54 -0.32768000000000000000e5 +108 4 2 30 0.13107200000000000000e6 +108 4 6 34 0.26214400000000000000e6 +108 4 18 22 0.65536000000000000000e5 +108 4 18 30 0.65536000000000000000e5 +108 4 19 35 -0.32768000000000000000e5 +108 4 28 28 -0.65536000000000000000e5 +108 4 33 33 -0.65536000000000000000e5 +108 4 35 35 -0.65536000000000000000e5 +109 1 1 48 0.32768000000000000000e5 +109 1 2 49 0.65536000000000000000e5 +109 1 6 53 -0.32768000000000000000e5 +109 1 8 39 0.65536000000000000000e5 +109 1 9 40 0.65536000000000000000e5 +109 1 10 41 -0.13107200000000000000e6 +109 1 12 43 -0.26214400000000000000e6 +109 1 23 38 0.32768000000000000000e5 +109 1 24 39 0.32768000000000000000e5 +109 1 25 40 0.32768000000000000000e5 +109 1 26 41 -0.65536000000000000000e5 +109 1 28 43 0.13107200000000000000e6 +109 1 32 47 0.26214400000000000000e6 +109 2 2 32 0.32768000000000000000e5 +109 2 3 33 0.32768000000000000000e5 +109 2 5 35 -0.32768000000000000000e5 +109 2 16 30 0.65536000000000000000e5 +109 2 20 34 0.13107200000000000000e6 +109 3 5 50 -0.65536000000000000000e5 +109 3 9 38 0.65536000000000000000e5 +109 3 10 39 -0.65536000000000000000e5 +109 3 22 35 0.26214400000000000000e6 +109 3 25 38 0.32768000000000000000e5 +109 3 28 41 0.26214400000000000000e6 +109 4 2 30 0.65536000000000000000e5 +109 4 6 34 0.13107200000000000000e6 +110 1 1 48 -0.32768000000000000000e5 +110 1 2 49 -0.65536000000000000000e5 +110 1 6 53 0.32768000000000000000e5 +110 1 8 39 -0.65536000000000000000e5 +110 1 9 40 -0.13107200000000000000e6 +110 1 10 41 0.13107200000000000000e6 +110 1 12 43 0.26214400000000000000e6 +110 1 23 38 -0.32768000000000000000e5 +110 1 24 39 -0.32768000000000000000e5 +110 1 26 41 0.65536000000000000000e5 +110 1 28 43 -0.13107200000000000000e6 +110 1 32 47 -0.26214400000000000000e6 +110 2 2 32 -0.32768000000000000000e5 +110 2 3 33 -0.32768000000000000000e5 +110 2 16 30 -0.65536000000000000000e5 +110 2 20 34 -0.13107200000000000000e6 +110 3 9 38 -0.65536000000000000000e5 +110 3 22 35 -0.26214400000000000000e6 +110 3 28 41 -0.26214400000000000000e6 +110 4 2 30 -0.65536000000000000000e5 +110 4 6 34 -0.13107200000000000000e6 +111 1 2 49 -0.32768000000000000000e5 +111 2 3 33 -0.32768000000000000000e5 +111 3 9 38 -0.65536000000000000000e5 +111 3 25 38 -0.32768000000000000000e5 +112 1 2 49 0.32768000000000000000e5 +112 1 6 53 -0.32768000000000000000e5 +112 1 8 39 -0.65536000000000000000e5 +112 1 24 39 0.32768000000000000000e5 +112 1 25 40 0.32768000000000000000e5 +112 3 25 38 0.32768000000000000000e5 +112 3 27 40 -0.65536000000000000000e5 +112 4 4 32 0.32768000000000000000e5 +113 1 1 48 -0.32768000000000000000e5 +113 2 2 32 -0.32768000000000000000e5 +113 3 8 37 -0.65536000000000000000e5 +113 3 24 37 -0.32768000000000000000e5 +114 1 1 48 0.32768000000000000000e5 +114 1 7 38 -0.65536000000000000000e5 +114 1 23 38 0.32768000000000000000e5 +114 3 2 47 -0.32768000000000000000e5 +115 1 1 8 0.65536000000000000000e5 +115 1 1 24 0.32768000000000000000e5 +115 1 1 32 0.13107200000000000000e6 +115 1 1 40 0.32768000000000000000e5 +115 1 1 48 -0.32768000000000000000e5 +115 1 2 9 0.65536000000000000000e5 +115 1 2 33 -0.39321600000000000000e6 +115 1 2 49 -0.65536000000000000000e5 +115 1 3 34 0.52428800000000000000e6 +115 1 4 11 0.65536000000000000000e5 +115 1 6 53 0.32768000000000000000e5 +115 1 8 23 -0.65536000000000000000e5 +115 1 8 39 -0.65536000000000000000e5 +115 1 9 40 -0.65536000000000000000e5 +115 1 10 41 -0.26214400000000000000e6 +115 1 11 42 0.13107200000000000000e6 +115 1 12 27 -0.26214400000000000000e6 +115 1 12 43 0.52428800000000000000e6 +115 1 23 38 -0.98304000000000000000e5 +115 1 25 40 -0.32768000000000000000e5 +115 1 26 41 0.65536000000000000000e5 +115 1 28 43 -0.26214400000000000000e6 +115 1 32 47 -0.39321600000000000000e6 +115 1 33 48 -0.13107200000000000000e6 +115 2 1 7 0.65536000000000000000e5 +115 2 1 35 -0.32768000000000000000e5 +115 2 2 8 -0.65536000000000000000e5 +115 2 2 16 0.32768000000000000000e5 +115 2 2 32 -0.32768000000000000000e5 +115 2 3 9 0.65536000000000000000e5 +115 2 4 34 0.65536000000000000000e5 +115 2 6 20 0.13107200000000000000e6 +115 2 7 21 -0.26214400000000000000e6 +115 2 12 26 -0.13107200000000000000e6 +115 2 16 16 -0.65536000000000000000e5 +115 2 16 34 -0.65536000000000000000e5 +115 2 20 34 -0.13107200000000000000e6 +115 2 21 35 -0.65536000000000000000e5 +115 3 1 14 0.26214400000000000000e6 +115 3 1 22 0.32768000000000000000e5 +115 3 1 30 0.65536000000000000000e5 +115 3 1 38 0.32768000000000000000e5 +115 3 2 7 0.13107200000000000000e6 +115 3 2 15 -0.13107200000000000000e6 +115 3 2 23 0.32768000000000000000e5 +115 3 2 47 0.32768000000000000000e5 +115 3 3 32 -0.39321600000000000000e6 +115 3 4 9 0.65536000000000000000e5 +115 3 5 50 0.65536000000000000000e5 +115 3 7 12 -0.26214400000000000000e6 +115 3 7 52 -0.26214400000000000000e6 +115 3 8 37 -0.65536000000000000000e5 +115 3 10 23 0.13107200000000000000e6 +115 3 13 42 -0.26214400000000000000e6 +115 3 22 27 -0.65536000000000000000e5 +115 3 22 35 -0.26214400000000000000e6 +115 3 24 37 0.65536000000000000000e5 +115 3 27 40 0.65536000000000000000e5 +115 3 28 41 -0.13107200000000000000e6 +115 3 29 42 -0.13107200000000000000e6 +115 4 2 6 0.65536000000000000000e5 +115 4 2 30 -0.65536000000000000000e5 +115 4 3 31 0.13107200000000000000e6 +115 4 4 32 -0.32768000000000000000e5 +115 4 6 6 0.26214400000000000000e6 +115 4 6 18 0.65536000000000000000e5 +115 4 7 35 -0.65536000000000000000e5 +115 4 16 16 0.65536000000000000000e5 +115 4 16 28 0.32768000000000000000e5 +115 4 17 29 -0.65536000000000000000e5 +116 1 20 21 0.65536000000000000000e5 +116 1 21 36 -0.65536000000000000000e5 +116 3 21 34 -0.32768000000000000000e5 +116 3 21 46 -0.32768000000000000000e5 +117 1 14 21 -0.32768000000000000000e5 +117 1 19 34 -0.32768000000000000000e5 +117 1 20 35 -0.32768000000000000000e5 +117 1 21 44 0.32768000000000000000e5 +117 1 21 52 0.32768000000000000000e5 +117 2 15 25 -0.32768000000000000000e5 +117 3 8 21 0.16384000000000000000e5 +117 3 15 20 -0.16384000000000000000e5 +117 3 18 19 0.32768000000000000000e5 +117 4 11 15 0.16384000000000000000e5 +117 4 14 14 -0.32768000000000000000e5 +118 1 6 21 0.16384000000000000000e5 +118 1 13 20 0.32768000000000000000e5 +118 1 14 21 -0.65536000000000000000e5 +118 1 20 27 -0.16384000000000000000e5 +118 1 33 36 0.32768000000000000000e5 +118 2 9 15 0.16384000000000000000e5 +118 2 11 25 -0.16384000000000000000e5 +118 3 7 20 -0.16384000000000000000e5 +118 3 8 21 0.32768000000000000000e5 +118 3 14 19 -0.32768000000000000000e5 +118 3 15 20 -0.32768000000000000000e5 +118 3 17 46 -0.32768000000000000000e5 +118 3 18 19 0.65536000000000000000e5 +118 3 19 32 -0.32768000000000000000e5 +118 4 10 14 -0.16384000000000000000e5 +118 4 11 15 0.32768000000000000000e5 +118 4 14 14 -0.65536000000000000000e5 +119 1 3 18 0.40960000000000000000e4 +119 1 4 19 -0.81920000000000000000e4 +119 1 5 36 -0.81920000000000000000e4 +119 1 12 43 -0.40960000000000000000e4 +119 1 13 20 0.65536000000000000000e5 +119 1 13 44 0.81920000000000000000e4 +119 1 14 45 0.81920000000000000000e4 +119 1 17 32 -0.16384000000000000000e5 +119 1 19 34 -0.65536000000000000000e5 +119 1 19 50 0.16384000000000000000e5 +119 1 20 27 -0.16384000000000000000e5 +119 1 20 51 0.16384000000000000000e5 +119 2 11 25 -0.32768000000000000000e5 +119 2 15 29 0.16384000000000000000e5 +119 2 25 31 0.16384000000000000000e5 +119 3 3 16 0.40960000000000000000e4 +119 3 4 17 0.40960000000000000000e4 +119 3 7 36 -0.16384000000000000000e5 +119 3 8 21 -0.65536000000000000000e5 +119 3 14 27 -0.40960000000000000000e4 +119 3 16 29 -0.81920000000000000000e4 +119 3 16 45 -0.16384000000000000000e5 +119 3 18 31 -0.32768000000000000000e5 +119 4 2 14 0.40960000000000000000e4 +119 4 11 23 -0.81920000000000000000e4 +120 1 3 18 -0.81920000000000000000e4 +120 1 4 19 0.16384000000000000000e5 +120 1 5 36 0.16384000000000000000e5 +120 1 11 18 0.16384000000000000000e5 +120 1 12 43 0.81920000000000000000e4 +120 1 13 44 -0.16384000000000000000e5 +120 1 14 21 -0.13107200000000000000e6 +120 1 14 45 -0.16384000000000000000e5 +120 1 15 46 0.32768000000000000000e5 +120 1 21 44 0.13107200000000000000e6 +120 1 36 51 -0.32768000000000000000e5 +120 1 45 52 -0.16384000000000000000e5 +120 2 11 25 0.32768000000000000000e5 +120 2 15 29 -0.32768000000000000000e5 +120 3 3 16 -0.81920000000000000000e4 +120 3 4 17 -0.81920000000000000000e4 +120 3 6 19 -0.16384000000000000000e5 +120 3 7 36 0.32768000000000000000e5 +120 3 8 21 0.65536000000000000000e5 +120 3 14 27 0.81920000000000000000e4 +120 3 15 20 -0.65536000000000000000e5 +120 3 15 44 -0.16384000000000000000e5 +120 3 16 29 0.16384000000000000000e5 +120 3 17 30 -0.16384000000000000000e5 +120 3 17 46 -0.65536000000000000000e5 +120 3 18 19 0.13107200000000000000e6 +120 3 18 31 0.32768000000000000000e5 +120 3 19 32 0.65536000000000000000e5 +120 3 21 50 -0.65536000000000000000e5 +120 3 21 56 0.32768000000000000000e5 +120 3 32 45 -0.16384000000000000000e5 +120 3 33 46 0.32768000000000000000e5 +120 3 36 49 0.16384000000000000000e5 +120 3 41 46 0.16384000000000000000e5 +120 3 45 46 0.32768000000000000000e5 +120 4 2 14 -0.81920000000000000000e4 +120 4 11 15 0.65536000000000000000e5 +120 4 11 23 0.16384000000000000000e5 +120 4 13 25 0.65536000000000000000e5 +120 4 14 14 -0.13107200000000000000e6 +120 4 15 35 0.16384000000000000000e5 +121 1 6 21 -0.32768000000000000000e5 +121 1 17 32 -0.32768000000000000000e5 +121 1 20 51 0.32768000000000000000e5 +121 2 9 15 -0.32768000000000000000e5 +121 3 7 20 0.32768000000000000000e5 +121 3 8 21 -0.65536000000000000000e5 +121 3 14 19 0.65536000000000000000e5 +121 3 18 31 -0.32768000000000000000e5 +121 4 10 14 0.32768000000000000000e5 +122 1 3 18 0.81920000000000000000e4 +122 1 4 19 -0.16384000000000000000e5 +122 1 5 36 -0.16384000000000000000e5 +122 1 12 43 -0.81920000000000000000e4 +122 1 13 44 0.16384000000000000000e5 +122 1 14 45 0.16384000000000000000e5 +122 1 20 27 -0.32768000000000000000e5 +122 2 11 25 -0.32768000000000000000e5 +122 3 3 16 0.81920000000000000000e4 +122 3 4 17 0.81920000000000000000e4 +122 3 14 27 -0.81920000000000000000e4 +122 3 16 29 -0.16384000000000000000e5 +122 3 16 45 -0.32768000000000000000e5 +122 3 18 31 -0.32768000000000000000e5 +122 4 2 14 0.81920000000000000000e4 +122 4 11 23 -0.16384000000000000000e5 +123 1 2 17 -0.16384000000000000000e5 +123 1 3 18 -0.16384000000000000000e5 +123 1 3 34 -0.81920000000000000000e4 +123 1 4 19 -0.16384000000000000000e5 +123 1 5 20 -0.16384000000000000000e5 +123 1 5 36 0.16384000000000000000e5 +123 1 10 17 -0.16384000000000000000e5 +123 1 12 43 0.81920000000000000000e4 +123 1 16 23 0.81920000000000000000e4 +123 1 16 31 -0.32768000000000000000e5 +123 1 17 32 -0.32768000000000000000e5 +123 1 19 50 0.32768000000000000000e5 +123 1 20 27 0.32768000000000000000e5 +123 2 6 12 -0.81920000000000000000e4 +123 2 10 24 -0.16384000000000000000e5 +123 2 11 13 -0.32768000000000000000e5 +123 3 3 16 -0.24576000000000000000e5 +123 3 4 17 -0.81920000000000000000e4 +123 3 7 12 -0.81920000000000000000e4 +123 3 7 20 -0.32768000000000000000e5 +123 3 7 36 -0.32768000000000000000e5 +123 3 8 21 -0.65536000000000000000e5 +123 3 12 21 0.13107200000000000000e6 +123 3 14 19 -0.65536000000000000000e5 +123 3 14 27 0.81920000000000000000e4 +123 4 1 13 -0.81920000000000000000e4 +123 4 2 14 -0.81920000000000000000e4 +123 4 3 15 -0.16384000000000000000e5 +123 4 10 10 -0.32768000000000000000e5 +123 4 13 13 -0.13107200000000000000e6 +124 1 18 33 -0.65536000000000000000e5 +124 1 20 51 0.65536000000000000000e5 +124 3 15 44 0.32768000000000000000e5 +124 3 20 49 0.32768000000000000000e5 +124 3 32 45 0.32768000000000000000e5 +124 3 36 49 0.32768000000000000000e5 +125 1 11 18 0.32768000000000000000e5 +125 1 13 20 -0.13107200000000000000e6 +125 1 14 45 0.32768000000000000000e5 +125 1 17 32 0.65536000000000000000e5 +125 1 20 27 0.65536000000000000000e5 +125 2 11 25 0.65536000000000000000e5 +125 3 6 19 -0.32768000000000000000e5 +125 3 8 21 0.13107200000000000000e6 +125 3 15 44 -0.32768000000000000000e5 +125 3 17 30 -0.32768000000000000000e5 +126 1 4 35 0.16384000000000000000e5 +126 1 12 43 0.16384000000000000000e5 +126 1 14 45 0.98304000000000000000e5 +126 1 17 32 -0.65536000000000000000e5 +126 1 17 48 -0.32768000000000000000e5 +126 1 18 49 -0.32768000000000000000e5 +126 1 34 49 -0.16384000000000000000e5 +126 2 9 23 0.16384000000000000000e5 +126 2 14 28 -0.32768000000000000000e5 +126 3 5 34 0.16384000000000000000e5 +126 3 13 42 -0.16384000000000000000e5 +126 3 14 27 0.16384000000000000000e5 +126 3 14 43 -0.32768000000000000000e5 +126 3 15 44 0.32768000000000000000e5 +126 3 16 29 -0.32768000000000000000e5 +126 3 16 45 -0.65536000000000000000e5 +126 3 18 47 -0.16384000000000000000e5 +126 3 22 35 0.16384000000000000000e5 +126 4 14 26 0.16384000000000000000e5 +126 4 15 27 0.32768000000000000000e5 +127 1 4 35 0.16384000000000000000e5 +127 1 12 43 0.16384000000000000000e5 +127 1 13 44 0.32768000000000000000e5 +127 1 20 27 -0.65536000000000000000e5 +127 1 34 49 0.16384000000000000000e5 +127 2 9 23 0.16384000000000000000e5 +127 3 5 34 0.16384000000000000000e5 +127 3 13 42 -0.16384000000000000000e5 +127 3 14 27 0.16384000000000000000e5 +127 3 16 29 -0.32768000000000000000e5 +127 3 18 47 0.16384000000000000000e5 +127 3 22 35 -0.16384000000000000000e5 +127 4 14 26 -0.16384000000000000000e5 +128 1 16 31 -0.65536000000000000000e5 +128 1 27 34 0.32768000000000000000e5 +128 1 34 41 0.32768000000000000000e5 +129 1 5 36 -0.65536000000000000000e5 +129 1 14 45 0.65536000000000000000e5 +129 1 17 48 -0.32768000000000000000e5 +129 2 14 28 -0.32768000000000000000e5 +129 3 13 42 -0.32768000000000000000e5 +129 3 14 43 -0.32768000000000000000e5 +130 1 4 35 -0.32768000000000000000e5 +130 1 12 43 -0.32768000000000000000e5 +130 1 14 45 -0.65536000000000000000e5 +130 1 17 48 0.65536000000000000000e5 +130 1 18 49 0.32768000000000000000e5 +130 1 34 49 0.32768000000000000000e5 +130 2 9 23 -0.32768000000000000000e5 +130 2 14 28 0.32768000000000000000e5 +130 3 5 34 -0.32768000000000000000e5 +130 3 13 42 0.65536000000000000000e5 +130 3 14 27 -0.32768000000000000000e5 +130 3 14 43 0.32768000000000000000e5 +130 3 18 47 0.32768000000000000000e5 +131 1 3 18 0.32768000000000000000e5 +131 1 4 19 -0.65536000000000000000e5 +131 1 17 48 0.32768000000000000000e5 +131 3 3 16 0.32768000000000000000e5 +131 3 4 17 0.32768000000000000000e5 +131 3 14 27 -0.32768000000000000000e5 +131 4 2 14 0.32768000000000000000e5 +132 1 3 18 -0.32768000000000000000e5 +132 1 4 19 0.65536000000000000000e5 +132 1 4 35 0.32768000000000000000e5 +132 1 12 43 0.98304000000000000000e5 +132 1 14 45 0.65536000000000000000e5 +132 1 16 47 0.32768000000000000000e5 +132 1 17 48 -0.32768000000000000000e5 +132 1 18 49 -0.32768000000000000000e5 +132 1 20 27 -0.13107200000000000000e6 +132 2 9 23 0.32768000000000000000e5 +132 2 10 24 0.65536000000000000000e5 +132 2 14 28 -0.32768000000000000000e5 +132 3 3 16 -0.32768000000000000000e5 +132 3 4 17 -0.32768000000000000000e5 +132 3 5 34 0.32768000000000000000e5 +132 3 12 41 0.32768000000000000000e5 +132 3 13 42 -0.32768000000000000000e5 +132 3 14 27 0.65536000000000000000e5 +132 3 14 43 -0.32768000000000000000e5 +132 3 22 35 -0.32768000000000000000e5 +132 4 2 14 -0.32768000000000000000e5 +133 1 4 35 -0.32768000000000000000e5 +133 1 12 43 -0.32768000000000000000e5 +133 1 14 45 -0.65536000000000000000e5 +133 1 16 23 0.32768000000000000000e5 +133 1 16 31 -0.13107200000000000000e6 +133 1 16 47 0.32768000000000000000e5 +133 1 17 48 0.32768000000000000000e5 +133 1 18 49 0.32768000000000000000e5 +133 1 20 27 0.13107200000000000000e6 +133 2 7 13 0.65536000000000000000e5 +133 2 9 23 -0.32768000000000000000e5 +133 2 10 24 -0.65536000000000000000e5 +133 2 14 28 0.32768000000000000000e5 +133 3 1 34 -0.32768000000000000000e5 +133 3 5 34 -0.32768000000000000000e5 +133 3 13 42 0.32768000000000000000e5 +133 3 14 27 -0.32768000000000000000e5 +133 3 14 43 0.32768000000000000000e5 +133 4 10 10 -0.13107200000000000000e6 +134 1 1 48 0.81920000000000000000e4 +134 1 2 49 0.81920000000000000000e4 +134 1 8 39 0.16384000000000000000e5 +134 1 9 40 0.16384000000000000000e5 +134 1 10 41 -0.32768000000000000000e5 +134 1 12 43 -0.65536000000000000000e5 +134 1 15 30 -0.65536000000000000000e5 +134 1 18 49 0.13107200000000000000e6 +134 1 23 38 0.81920000000000000000e4 +134 1 24 55 -0.16384000000000000000e5 +134 1 26 33 0.32768000000000000000e5 +134 1 26 41 -0.16384000000000000000e5 +134 1 28 43 0.65536000000000000000e5 +134 1 32 47 0.65536000000000000000e5 +134 1 33 40 -0.32768000000000000000e5 +134 1 33 48 -0.32768000000000000000e5 +134 1 40 55 0.16384000000000000000e5 +134 1 41 56 0.16384000000000000000e5 +134 1 52 55 -0.65536000000000000000e5 +134 2 2 32 0.81920000000000000000e4 +134 2 4 34 -0.16384000000000000000e5 +134 2 16 30 0.16384000000000000000e5 +134 2 20 34 0.32768000000000000000e5 +134 2 28 34 0.16384000000000000000e5 +134 3 5 50 -0.16384000000000000000e5 +134 3 9 38 0.16384000000000000000e5 +134 3 14 51 -0.65536000000000000000e5 +134 3 22 35 0.65536000000000000000e5 +134 3 22 51 0.16384000000000000000e5 +134 3 23 52 -0.32768000000000000000e5 +134 3 27 40 -0.16384000000000000000e5 +134 3 27 56 0.16384000000000000000e5 +134 3 28 41 0.65536000000000000000e5 +134 3 29 42 -0.32768000000000000000e5 +134 3 35 48 -0.65536000000000000000e5 +134 3 38 51 -0.16384000000000000000e5 +134 3 45 50 -0.65536000000000000000e5 +134 3 45 56 0.32768000000000000000e5 +134 3 47 52 -0.32768000000000000000e5 +134 4 2 30 0.16384000000000000000e5 +134 4 6 34 0.32768000000000000000e5 +134 4 7 35 0.16384000000000000000e5 +134 4 19 31 -0.32768000000000000000e5 +134 4 22 34 -0.32768000000000000000e5 +134 4 29 33 -0.16384000000000000000e5 +134 4 30 34 -0.32768000000000000000e5 +134 4 31 35 -0.32768000000000000000e5 +135 1 11 42 0.32768000000000000000e5 +135 1 14 45 -0.13107200000000000000e6 +135 1 17 48 0.65536000000000000000e5 +135 1 18 49 0.65536000000000000000e5 +135 1 33 40 0.32768000000000000000e5 +135 2 14 28 0.65536000000000000000e5 +135 3 5 34 -0.65536000000000000000e5 +135 3 13 42 0.65536000000000000000e5 +135 3 14 43 0.65536000000000000000e5 +136 1 4 35 -0.65536000000000000000e5 +136 1 10 41 -0.32768000000000000000e5 +136 1 11 42 -0.32768000000000000000e5 +136 1 28 43 0.32768000000000000000e5 +136 1 32 47 0.32768000000000000000e5 +136 1 33 48 0.65536000000000000000e5 +136 3 13 42 0.65536000000000000000e5 +136 3 28 41 0.32768000000000000000e5 +136 3 29 42 0.65536000000000000000e5 +136 4 3 31 -0.32768000000000000000e5 +137 1 10 41 0.32768000000000000000e5 +137 1 12 43 -0.65536000000000000000e5 +137 1 28 43 0.32768000000000000000e5 +137 3 14 27 -0.65536000000000000000e5 +138 1 3 34 -0.65536000000000000000e5 +138 1 11 42 0.32768000000000000000e5 +138 1 12 43 0.65536000000000000000e5 +138 1 28 43 -0.32768000000000000000e5 +138 1 33 48 -0.32768000000000000000e5 +138 2 12 26 -0.32768000000000000000e5 +138 3 13 42 -0.65536000000000000000e5 +138 3 29 42 -0.32768000000000000000e5 +138 4 3 31 0.32768000000000000000e5 +139 1 2 33 -0.32768000000000000000e5 +139 1 3 34 0.65536000000000000000e5 +139 1 10 41 -0.32768000000000000000e5 +139 1 12 43 0.65536000000000000000e5 +139 1 16 23 -0.65536000000000000000e5 +139 1 28 43 -0.32768000000000000000e5 +139 1 32 47 -0.32768000000000000000e5 +139 2 7 21 -0.32768000000000000000e5 +139 2 20 34 -0.32768000000000000000e5 +139 3 2 31 -0.32768000000000000000e5 +139 3 3 32 -0.32768000000000000000e5 +139 3 22 35 -0.65536000000000000000e5 +139 3 28 41 -0.32768000000000000000e5 +139 4 6 34 -0.32768000000000000000e5 +140 1 9 40 0.16384000000000000000e5 +140 1 10 41 -0.32768000000000000000e5 +140 1 11 42 -0.32768000000000000000e5 +140 1 12 27 -0.65536000000000000000e5 +140 1 12 43 -0.65536000000000000000e5 +140 1 16 23 0.65536000000000000000e5 +140 1 26 41 -0.16384000000000000000e5 +140 1 28 43 0.32768000000000000000e5 +140 1 32 47 0.65536000000000000000e5 +140 1 33 48 0.32768000000000000000e5 +140 2 1 31 -0.32768000000000000000e5 +140 2 12 26 0.32768000000000000000e5 +140 3 1 34 -0.65536000000000000000e5 +140 3 8 37 -0.16384000000000000000e5 +140 3 9 38 0.16384000000000000000e5 +140 3 13 42 0.65536000000000000000e5 +140 3 22 27 -0.16384000000000000000e5 +140 3 28 41 0.65536000000000000000e5 +140 3 29 42 0.32768000000000000000e5 +140 4 1 29 -0.16384000000000000000e5 +140 4 2 30 0.16384000000000000000e5 +140 4 3 31 -0.32768000000000000000e5 +141 1 2 33 -0.65536000000000000000e5 +141 1 9 40 -0.32768000000000000000e5 +141 1 11 42 0.13107200000000000000e6 +141 1 12 43 0.13107200000000000000e6 +141 1 26 33 -0.65536000000000000000e5 +141 1 26 41 0.32768000000000000000e5 +141 1 28 43 -0.65536000000000000000e5 +141 1 32 47 -0.65536000000000000000e5 +141 1 33 40 0.65536000000000000000e5 +141 1 33 48 -0.13107200000000000000e6 +141 2 12 26 -0.65536000000000000000e5 +141 3 3 32 -0.65536000000000000000e5 +141 3 4 33 0.65536000000000000000e5 +141 3 5 34 -0.13107200000000000000e6 +141 3 5 50 -0.32768000000000000000e5 +141 3 6 51 0.32768000000000000000e5 +141 3 6 55 0.32768000000000000000e5 +141 3 10 39 -0.32768000000000000000e5 +141 3 13 42 -0.13107200000000000000e6 +141 3 14 27 0.13107200000000000000e6 +141 3 27 40 -0.32768000000000000000e5 +141 3 28 41 -0.65536000000000000000e5 +141 3 29 42 -0.65536000000000000000e5 +141 4 3 31 0.65536000000000000000e5 +141 4 8 20 -0.65536000000000000000e5 +141 4 9 21 0.65536000000000000000e5 +141 4 18 22 -0.32768000000000000000e5 +141 4 18 30 -0.32768000000000000000e5 +142 1 11 42 -0.65536000000000000000e5 +142 1 26 41 -0.32768000000000000000e5 +142 1 33 48 0.65536000000000000000e5 +142 2 28 34 -0.32768000000000000000e5 +142 3 4 33 -0.65536000000000000000e5 +142 3 10 39 0.32768000000000000000e5 +142 3 29 42 0.65536000000000000000e5 +142 4 18 30 -0.32768000000000000000e5 +142 4 21 33 -0.32768000000000000000e5 +143 1 1 48 0.16384000000000000000e5 +143 1 2 33 0.65536000000000000000e5 +143 1 2 49 0.16384000000000000000e5 +143 1 8 39 0.32768000000000000000e5 +143 1 9 40 0.65536000000000000000e5 +143 1 12 43 -0.26214400000000000000e6 +143 1 23 38 0.16384000000000000000e5 +143 1 26 41 -0.65536000000000000000e5 +143 1 28 43 0.13107200000000000000e6 +143 1 32 47 0.13107200000000000000e6 +143 2 2 32 0.16384000000000000000e5 +143 2 4 34 -0.32768000000000000000e5 +143 2 12 26 0.65536000000000000000e5 +143 2 16 30 0.32768000000000000000e5 +143 2 20 34 0.65536000000000000000e5 +143 3 3 32 0.65536000000000000000e5 +143 3 9 38 0.32768000000000000000e5 +143 3 14 27 -0.13107200000000000000e6 +143 3 22 35 0.13107200000000000000e6 +143 3 28 41 0.13107200000000000000e6 +143 4 2 30 0.32768000000000000000e5 +143 4 6 34 0.65536000000000000000e5 +143 4 8 20 0.65536000000000000000e5 +144 1 1 48 -0.16384000000000000000e5 +144 1 2 49 -0.16384000000000000000e5 +144 1 8 39 -0.32768000000000000000e5 +144 1 9 40 -0.32768000000000000000e5 +144 1 12 43 0.13107200000000000000e6 +144 1 23 38 -0.16384000000000000000e5 +144 1 26 41 0.65536000000000000000e5 +144 1 28 43 -0.65536000000000000000e5 +144 1 32 47 -0.13107200000000000000e6 +144 2 2 32 -0.16384000000000000000e5 +144 2 16 30 -0.32768000000000000000e5 +144 2 20 34 -0.65536000000000000000e5 +144 3 3 32 -0.65536000000000000000e5 +144 3 22 35 -0.13107200000000000000e6 +144 3 28 41 -0.13107200000000000000e6 +144 4 2 30 -0.32768000000000000000e5 +144 4 6 34 -0.65536000000000000000e5 +145 1 1 48 -0.16384000000000000000e5 +145 1 2 33 -0.65536000000000000000e5 +145 1 2 49 -0.16384000000000000000e5 +145 1 9 40 -0.32768000000000000000e5 +145 1 10 41 0.65536000000000000000e5 +145 1 12 43 0.13107200000000000000e6 +145 1 23 38 -0.16384000000000000000e5 +145 1 26 41 0.32768000000000000000e5 +145 1 28 43 -0.65536000000000000000e5 +145 1 32 47 -0.13107200000000000000e6 +145 2 2 32 -0.16384000000000000000e5 +145 2 16 30 -0.32768000000000000000e5 +145 2 20 34 -0.65536000000000000000e5 +145 3 9 38 -0.32768000000000000000e5 +145 3 22 35 -0.13107200000000000000e6 +145 3 28 41 -0.13107200000000000000e6 +145 4 2 30 -0.32768000000000000000e5 +145 4 6 34 -0.65536000000000000000e5 +146 1 1 48 0.16384000000000000000e5 +146 1 2 33 0.65536000000000000000e5 +146 1 2 49 0.16384000000000000000e5 +146 1 3 34 -0.13107200000000000000e6 +146 1 8 39 0.32768000000000000000e5 +146 1 9 40 0.32768000000000000000e5 +146 1 23 38 0.16384000000000000000e5 +146 1 26 41 -0.32768000000000000000e5 +146 1 32 47 0.65536000000000000000e5 +146 2 2 32 0.16384000000000000000e5 +146 2 7 21 0.65536000000000000000e5 +146 3 3 32 0.65536000000000000000e5 +146 3 8 37 0.32768000000000000000e5 +146 3 9 38 0.32768000000000000000e5 +146 3 28 41 0.65536000000000000000e5 +146 4 2 30 0.32768000000000000000e5 +147 1 1 32 -0.65536000000000000000e5 +147 1 1 48 0.16384000000000000000e5 +147 1 2 49 0.16384000000000000000e5 +147 1 7 38 0.32768000000000000000e5 +147 1 23 38 0.16384000000000000000e5 +147 2 2 32 0.16384000000000000000e5 +148 1 1 8 -0.32768000000000000000e5 +148 1 1 24 -0.16384000000000000000e5 +148 1 1 40 -0.16384000000000000000e5 +148 1 1 48 0.32768000000000000000e5 +148 1 2 9 -0.32768000000000000000e5 +148 1 2 33 0.13107200000000000000e6 +148 1 2 49 0.32768000000000000000e5 +148 1 3 34 -0.13107200000000000000e6 +148 1 4 11 -0.32768000000000000000e5 +148 1 7 38 0.32768000000000000000e5 +148 1 8 23 0.32768000000000000000e5 +148 1 8 39 0.32768000000000000000e5 +148 1 9 40 0.32768000000000000000e5 +148 1 10 41 0.65536000000000000000e5 +148 1 11 42 -0.65536000000000000000e5 +148 1 12 43 -0.26214400000000000000e6 +148 1 22 37 0.16384000000000000000e5 +148 1 23 38 0.49152000000000000000e5 +148 1 26 41 -0.32768000000000000000e5 +148 1 28 43 0.13107200000000000000e6 +148 1 32 47 0.19660800000000000000e6 +148 1 33 48 0.65536000000000000000e5 +148 2 1 7 -0.32768000000000000000e5 +148 2 2 8 0.32768000000000000000e5 +148 2 2 16 -0.16384000000000000000e5 +148 2 2 32 0.32768000000000000000e5 +148 2 3 9 -0.32768000000000000000e5 +148 2 7 21 0.65536000000000000000e5 +148 2 12 26 0.65536000000000000000e5 +148 2 16 16 0.32768000000000000000e5 +148 2 16 30 0.32768000000000000000e5 +148 2 20 34 0.65536000000000000000e5 +148 3 1 14 -0.13107200000000000000e6 +148 3 1 22 -0.16384000000000000000e5 +148 3 1 30 -0.32768000000000000000e5 +148 3 1 38 -0.16384000000000000000e5 +148 3 2 7 -0.65536000000000000000e5 +148 3 2 15 0.65536000000000000000e5 +148 3 2 23 -0.16384000000000000000e5 +148 3 3 32 0.13107200000000000000e6 +148 3 4 9 -0.32768000000000000000e5 +148 3 7 12 0.13107200000000000000e6 +148 3 8 37 0.32768000000000000000e5 +148 3 10 23 -0.65536000000000000000e5 +148 3 13 42 0.13107200000000000000e6 +148 3 22 35 0.13107200000000000000e6 +148 3 28 41 0.19660800000000000000e6 +148 3 29 42 0.65536000000000000000e5 +148 4 2 6 -0.32768000000000000000e5 +148 4 2 30 0.32768000000000000000e5 +148 4 3 31 -0.65536000000000000000e5 +148 4 6 6 -0.13107200000000000000e6 +148 4 6 18 -0.32768000000000000000e5 +148 4 6 34 0.65536000000000000000e5 +148 4 16 16 -0.32768000000000000000e5 +149 1 1 40 0.32768000000000000000e5 +149 1 2 33 -0.26214400000000000000e6 +149 1 6 37 0.32768000000000000000e5 +149 1 9 40 0.65536000000000000000e5 +149 1 10 25 -0.13107200000000000000e6 +149 1 11 26 -0.65536000000000000000e5 +149 1 11 42 0.26214400000000000000e6 +149 1 12 43 0.52428800000000000000e6 +149 1 23 38 -0.32768000000000000000e5 +149 1 25 40 -0.32768000000000000000e5 +149 1 26 41 -0.65536000000000000000e5 +149 1 28 43 -0.26214400000000000000e6 +149 1 32 47 -0.26214400000000000000e6 +149 1 33 48 -0.13107200000000000000e6 +149 1 49 56 -0.32768000000000000000e5 +149 1 53 56 0.32768000000000000000e5 +149 1 54 55 0.65536000000000000000e5 +149 1 55 56 -0.65536000000000000000e5 +149 2 2 32 -0.32768000000000000000e5 +149 2 3 17 0.32768000000000000000e5 +149 2 5 19 -0.32768000000000000000e5 +149 2 5 27 0.32768000000000000000e5 +149 2 12 26 -0.26214400000000000000e6 +149 2 28 34 -0.65536000000000000000e5 +149 3 1 30 0.13107200000000000000e6 +149 3 1 38 0.32768000000000000000e5 +149 3 2 23 0.32768000000000000000e5 +149 3 2 39 0.32768000000000000000e5 +149 3 3 32 -0.13107200000000000000e6 +149 3 5 26 -0.32768000000000000000e5 +149 3 8 37 -0.65536000000000000000e5 +149 3 10 39 0.65536000000000000000e5 +149 3 13 42 -0.52428800000000000000e6 +149 3 14 27 0.26214400000000000000e6 +149 3 25 54 -0.32768000000000000000e5 +149 3 26 39 -0.32768000000000000000e5 +149 3 28 41 -0.26214400000000000000e6 +149 3 29 42 -0.13107200000000000000e6 +149 3 39 40 -0.32768000000000000000e5 +149 3 40 53 -0.32768000000000000000e5 +149 3 48 53 0.32768000000000000000e5 +149 3 49 54 0.32768000000000000000e5 +149 3 53 54 -0.32768000000000000000e5 +149 4 3 31 0.26214400000000000000e6 +149 4 4 16 -0.32768000000000000000e5 +149 4 5 17 0.32768000000000000000e5 +149 4 5 33 -0.32768000000000000000e5 +149 4 6 18 0.65536000000000000000e5 +149 4 7 19 -0.65536000000000000000e5 +149 4 8 20 -0.13107200000000000000e6 +149 4 18 30 -0.65536000000000000000e5 +149 4 19 35 -0.32768000000000000000e5 +149 4 21 33 -0.65536000000000000000e5 +149 4 28 28 -0.65536000000000000000e5 +149 4 33 33 -0.65536000000000000000e5 +149 4 35 35 -0.65536000000000000000e5 +150 1 1 48 0.65536000000000000000e5 +150 1 2 33 0.13107200000000000000e6 +150 1 2 49 0.13107200000000000000e6 +150 1 6 37 -0.32768000000000000000e5 +150 1 6 53 -0.32768000000000000000e5 +150 1 8 39 0.13107200000000000000e6 +150 1 9 40 0.13107200000000000000e6 +150 1 10 25 0.65536000000000000000e5 +150 1 10 41 -0.26214400000000000000e6 +150 1 11 42 -0.13107200000000000000e6 +150 1 12 43 -0.78643200000000000000e6 +150 1 23 38 0.65536000000000000000e5 +150 1 24 39 0.65536000000000000000e5 +150 1 26 41 -0.13107200000000000000e6 +150 1 28 43 0.39321600000000000000e6 +150 1 32 47 0.65536000000000000000e6 +150 1 33 48 0.13107200000000000000e6 +150 2 2 32 0.65536000000000000000e5 +150 2 3 33 0.65536000000000000000e5 +150 2 5 27 -0.32768000000000000000e5 +150 2 5 35 -0.32768000000000000000e5 +150 2 12 26 0.13107200000000000000e6 +150 2 16 30 0.13107200000000000000e6 +150 2 20 34 0.26214400000000000000e6 +150 3 3 32 0.13107200000000000000e6 +150 3 3 40 -0.32768000000000000000e5 +150 3 5 50 -0.65536000000000000000e5 +150 3 9 38 0.13107200000000000000e6 +150 3 10 23 0.65536000000000000000e5 +150 3 10 39 -0.65536000000000000000e5 +150 3 13 42 0.26214400000000000000e6 +150 3 14 27 -0.26214400000000000000e6 +150 3 22 35 0.52428800000000000000e6 +150 3 25 38 0.32768000000000000000e5 +150 3 26 39 0.32768000000000000000e5 +150 3 28 41 0.65536000000000000000e6 +150 3 29 42 0.13107200000000000000e6 +150 4 2 30 0.13107200000000000000e6 +150 4 3 31 -0.13107200000000000000e6 +150 4 6 34 0.26214400000000000000e6 +150 4 7 19 0.65536000000000000000e5 +150 4 8 20 0.13107200000000000000e6 +151 1 1 48 -0.32768000000000000000e5 +151 1 2 49 -0.65536000000000000000e5 +151 1 8 39 -0.65536000000000000000e5 +151 1 9 40 -0.65536000000000000000e5 +151 1 10 25 -0.65536000000000000000e5 +151 1 10 41 0.13107200000000000000e6 +151 1 12 43 0.26214400000000000000e6 +151 1 23 38 -0.32768000000000000000e5 +151 1 24 39 -0.32768000000000000000e5 +151 1 25 40 0.32768000000000000000e5 +151 1 26 41 0.65536000000000000000e5 +151 1 28 43 -0.13107200000000000000e6 +151 1 32 47 -0.26214400000000000000e6 +151 2 2 32 -0.32768000000000000000e5 +151 2 3 33 -0.32768000000000000000e5 +151 2 16 30 -0.65536000000000000000e5 +151 2 20 34 -0.13107200000000000000e6 +151 3 3 40 0.32768000000000000000e5 +151 3 9 38 -0.65536000000000000000e5 +151 3 22 35 -0.26214400000000000000e6 +151 3 28 41 -0.26214400000000000000e6 +151 4 2 30 -0.65536000000000000000e5 +151 4 6 34 -0.13107200000000000000e6 +152 1 2 49 -0.32768000000000000000e5 +152 1 6 37 0.32768000000000000000e5 +152 1 24 39 -0.32768000000000000000e5 +152 2 3 33 -0.32768000000000000000e5 +152 3 9 38 -0.65536000000000000000e5 +152 3 10 23 -0.65536000000000000000e5 +153 1 2 49 0.32768000000000000000e5 +153 1 8 39 -0.65536000000000000000e5 +153 1 24 39 0.32768000000000000000e5 +153 3 1 30 -0.65536000000000000000e5 +153 3 2 39 0.32768000000000000000e5 +154 1 1 40 0.32768000000000000000e5 +154 1 1 48 -0.32768000000000000000e5 +154 1 2 33 -0.13107200000000000000e6 +154 1 11 42 0.13107200000000000000e6 +154 1 12 43 0.26214400000000000000e6 +154 1 23 38 -0.32768000000000000000e5 +154 1 28 43 -0.13107200000000000000e6 +154 1 32 47 -0.13107200000000000000e6 +154 1 33 48 -0.13107200000000000000e6 +154 2 2 32 -0.32768000000000000000e5 +154 2 12 26 -0.13107200000000000000e6 +154 3 1 30 0.65536000000000000000e5 +154 3 8 37 -0.65536000000000000000e5 +154 3 10 23 0.65536000000000000000e5 +154 3 13 42 -0.26214400000000000000e6 +154 3 28 41 -0.13107200000000000000e6 +154 3 29 42 -0.13107200000000000000e6 +154 4 3 31 0.13107200000000000000e6 +154 4 6 18 0.65536000000000000000e5 +155 1 1 48 0.32768000000000000000e5 +155 1 8 23 -0.65536000000000000000e5 +155 1 23 38 0.32768000000000000000e5 +155 3 1 38 0.32768000000000000000e5 +156 1 1 8 0.65536000000000000000e5 +156 1 1 32 0.13107200000000000000e6 +156 1 1 40 -0.32768000000000000000e5 +156 1 1 48 -0.32768000000000000000e5 +156 1 2 9 0.65536000000000000000e5 +156 1 2 33 -0.39321600000000000000e6 +156 1 2 49 -0.65536000000000000000e5 +156 1 3 34 0.52428800000000000000e6 +156 1 4 11 0.65536000000000000000e5 +156 1 8 23 -0.65536000000000000000e5 +156 1 8 39 -0.65536000000000000000e5 +156 1 9 40 -0.65536000000000000000e5 +156 1 10 41 -0.26214400000000000000e6 +156 1 11 42 0.13107200000000000000e6 +156 1 12 27 -0.26214400000000000000e6 +156 1 12 43 0.52428800000000000000e6 +156 1 22 37 0.32768000000000000000e5 +156 1 23 38 -0.32768000000000000000e5 +156 1 26 41 0.65536000000000000000e5 +156 1 28 43 -0.26214400000000000000e6 +156 1 32 47 -0.39321600000000000000e6 +156 1 33 48 -0.13107200000000000000e6 +156 2 1 7 0.65536000000000000000e5 +156 2 2 8 -0.65536000000000000000e5 +156 2 2 32 -0.65536000000000000000e5 +156 2 3 9 0.65536000000000000000e5 +156 2 6 20 0.13107200000000000000e6 +156 2 7 21 -0.26214400000000000000e6 +156 2 12 26 -0.13107200000000000000e6 +156 2 16 30 -0.65536000000000000000e5 +156 2 20 34 -0.13107200000000000000e6 +156 3 1 14 0.26214400000000000000e6 +156 3 1 30 0.65536000000000000000e5 +156 3 1 38 -0.32768000000000000000e5 +156 3 2 7 0.13107200000000000000e6 +156 3 2 15 -0.13107200000000000000e6 +156 3 3 32 -0.39321600000000000000e6 +156 3 4 9 0.65536000000000000000e5 +156 3 7 12 -0.26214400000000000000e6 +156 3 8 37 -0.65536000000000000000e5 +156 3 10 23 0.13107200000000000000e6 +156 3 13 42 -0.26214400000000000000e6 +156 3 22 27 0.65536000000000000000e5 +156 3 22 35 -0.26214400000000000000e6 +156 3 28 41 -0.39321600000000000000e6 +156 3 29 42 -0.13107200000000000000e6 +156 4 2 6 0.65536000000000000000e5 +156 4 2 30 -0.65536000000000000000e5 +156 4 3 31 0.13107200000000000000e6 +156 4 6 6 0.26214400000000000000e6 +156 4 6 18 0.65536000000000000000e5 +156 4 6 34 -0.13107200000000000000e6 +156 4 16 16 -0.65536000000000000000e5 +157 1 1 8 -0.65536000000000000000e5 +157 1 1 24 -0.32768000000000000000e5 +157 1 1 32 -0.13107200000000000000e6 +157 1 1 48 0.32768000000000000000e5 +157 1 2 9 -0.65536000000000000000e5 +157 1 2 33 0.39321600000000000000e6 +157 1 2 49 0.65536000000000000000e5 +157 1 3 34 -0.52428800000000000000e6 +157 1 4 11 -0.65536000000000000000e5 +157 1 7 22 -0.65536000000000000000e5 +157 1 8 23 0.65536000000000000000e5 +157 1 8 39 0.65536000000000000000e5 +157 1 9 40 0.65536000000000000000e5 +157 1 10 41 0.26214400000000000000e6 +157 1 11 42 -0.13107200000000000000e6 +157 1 12 27 0.26214400000000000000e6 +157 1 12 43 -0.52428800000000000000e6 +157 1 22 37 0.32768000000000000000e5 +157 1 23 38 0.65536000000000000000e5 +157 1 26 41 -0.65536000000000000000e5 +157 1 28 43 0.26214400000000000000e6 +157 1 32 47 0.39321600000000000000e6 +157 1 33 48 0.13107200000000000000e6 +157 2 1 7 -0.65536000000000000000e5 +157 2 2 8 0.65536000000000000000e5 +157 2 2 16 -0.32768000000000000000e5 +157 2 2 32 0.65536000000000000000e5 +157 2 3 9 -0.65536000000000000000e5 +157 2 6 20 -0.13107200000000000000e6 +157 2 7 21 0.26214400000000000000e6 +157 2 12 26 0.13107200000000000000e6 +157 2 16 30 0.65536000000000000000e5 +157 2 20 34 0.13107200000000000000e6 +157 3 1 14 -0.26214400000000000000e6 +157 3 1 22 -0.32768000000000000000e5 +157 3 1 30 -0.65536000000000000000e5 +157 3 1 38 -0.32768000000000000000e5 +157 3 2 7 -0.13107200000000000000e6 +157 3 2 15 0.13107200000000000000e6 +157 3 2 23 -0.32768000000000000000e5 +157 3 3 32 0.39321600000000000000e6 +157 3 4 9 -0.65536000000000000000e5 +157 3 7 12 0.26214400000000000000e6 +157 3 8 37 0.65536000000000000000e5 +157 3 10 23 -0.13107200000000000000e6 +157 3 13 42 0.26214400000000000000e6 +157 3 22 35 0.26214400000000000000e6 +157 3 28 41 0.39321600000000000000e6 +157 3 29 42 0.13107200000000000000e6 +157 4 2 6 -0.65536000000000000000e5 +157 4 2 30 0.65536000000000000000e5 +157 4 3 31 -0.13107200000000000000e6 +157 4 6 6 -0.26214400000000000000e6 +157 4 6 18 -0.65536000000000000000e5 +157 4 6 34 0.13107200000000000000e6 +158 1 14 21 -0.16384000000000000000e5 +158 1 16 19 -0.16384000000000000000e5 +158 1 19 34 -0.16384000000000000000e5 +158 2 13 15 -0.16384000000000000000e5 +158 2 15 15 -0.65536000000000000000e5 +158 3 12 21 -0.16384000000000000000e5 +158 3 16 21 -0.32768000000000000000e5 +158 3 19 20 -0.32768000000000000000e5 +158 3 21 34 -0.32768000000000000000e5 +159 1 6 21 -0.81920000000000000000e4 +159 1 17 32 -0.81920000000000000000e4 +159 1 19 50 0.81920000000000000000e4 +159 1 20 35 0.32768000000000000000e5 +159 1 20 51 0.81920000000000000000e4 +159 1 21 52 -0.32768000000000000000e5 +159 2 9 15 -0.81920000000000000000e4 +159 2 25 31 0.81920000000000000000e4 +159 3 7 20 0.81920000000000000000e4 +159 3 8 21 -0.16384000000000000000e5 +159 3 14 19 0.16384000000000000000e5 +159 3 16 45 -0.81920000000000000000e4 +159 3 17 46 -0.16384000000000000000e5 +159 3 18 31 -0.81920000000000000000e4 +159 3 19 20 -0.65536000000000000000e5 +159 3 19 32 0.16384000000000000000e5 +159 3 20 45 -0.16384000000000000000e5 +159 3 35 36 0.32768000000000000000e5 +159 4 10 14 0.81920000000000000000e4 +159 4 25 25 -0.32768000000000000000e5 +160 1 6 21 0.81920000000000000000e4 +160 1 17 32 0.81920000000000000000e4 +160 1 19 34 -0.32768000000000000000e5 +160 1 19 50 -0.81920000000000000000e4 +160 1 20 35 -0.32768000000000000000e5 +160 1 20 51 -0.81920000000000000000e4 +160 1 21 52 0.32768000000000000000e5 +160 2 9 15 0.81920000000000000000e4 +160 2 15 25 -0.32768000000000000000e5 +160 2 25 31 -0.81920000000000000000e4 +160 3 7 20 -0.81920000000000000000e4 +160 3 8 21 0.16384000000000000000e5 +160 3 14 19 -0.16384000000000000000e5 +160 3 16 21 -0.65536000000000000000e5 +160 3 16 45 0.81920000000000000000e4 +160 3 17 46 0.16384000000000000000e5 +160 3 18 31 0.81920000000000000000e4 +160 3 19 32 -0.16384000000000000000e5 +160 3 20 45 0.16384000000000000000e5 +160 4 10 14 -0.81920000000000000000e4 +160 4 25 25 0.32768000000000000000e5 +161 1 14 21 -0.32768000000000000000e5 +161 1 16 19 -0.32768000000000000000e5 +161 1 21 44 0.32768000000000000000e5 +161 2 13 15 -0.32768000000000000000e5 +161 3 12 21 -0.32768000000000000000e5 +162 1 3 18 0.40960000000000000000e4 +162 1 4 19 -0.81920000000000000000e4 +162 1 5 36 -0.81920000000000000000e4 +162 1 12 43 -0.40960000000000000000e4 +162 1 13 44 0.81920000000000000000e4 +162 1 14 21 0.65536000000000000000e5 +162 1 14 45 0.81920000000000000000e4 +162 1 21 44 -0.65536000000000000000e5 +162 2 11 25 -0.16384000000000000000e5 +162 2 15 29 0.16384000000000000000e5 +162 3 3 16 0.40960000000000000000e4 +162 3 4 17 0.40960000000000000000e4 +162 3 7 36 -0.16384000000000000000e5 +162 3 8 21 -0.32768000000000000000e5 +162 3 14 27 -0.40960000000000000000e4 +162 3 15 20 0.32768000000000000000e5 +162 3 16 29 -0.81920000000000000000e4 +162 3 18 19 -0.13107200000000000000e6 +162 3 18 31 -0.16384000000000000000e5 +162 3 19 32 -0.32768000000000000000e5 +162 3 20 45 0.32768000000000000000e5 +162 4 2 14 0.40960000000000000000e4 +162 4 11 15 -0.32768000000000000000e5 +162 4 11 23 -0.81920000000000000000e4 +162 4 13 25 -0.32768000000000000000e5 +162 4 14 14 0.65536000000000000000e5 +163 1 6 21 0.16384000000000000000e5 +163 1 13 20 0.32768000000000000000e5 +163 1 14 21 -0.65536000000000000000e5 +163 1 20 27 -0.16384000000000000000e5 +163 1 33 36 0.32768000000000000000e5 +163 2 9 15 0.16384000000000000000e5 +163 2 11 25 -0.16384000000000000000e5 +163 3 7 20 -0.16384000000000000000e5 +163 3 14 19 -0.32768000000000000000e5 +163 4 10 14 -0.16384000000000000000e5 +164 1 6 21 0.16384000000000000000e5 +164 1 13 20 0.65536000000000000000e5 +164 1 19 34 -0.65536000000000000000e5 +164 1 20 27 -0.16384000000000000000e5 +164 2 9 15 0.16384000000000000000e5 +164 2 11 25 -0.16384000000000000000e5 +164 3 7 20 -0.16384000000000000000e5 +164 3 8 21 -0.32768000000000000000e5 +164 3 12 21 -0.65536000000000000000e5 +164 3 14 19 -0.32768000000000000000e5 +164 3 19 32 -0.32768000000000000000e5 +164 4 10 14 -0.16384000000000000000e5 +165 1 2 17 0.81920000000000000000e4 +165 1 3 18 0.12288000000000000000e5 +165 1 3 34 0.40960000000000000000e4 +165 1 5 20 0.81920000000000000000e4 +165 1 5 36 -0.16384000000000000000e5 +165 1 10 17 0.81920000000000000000e4 +165 1 12 43 -0.81920000000000000000e4 +165 1 13 20 0.32768000000000000000e5 +165 1 13 44 0.81920000000000000000e4 +165 1 14 45 0.81920000000000000000e4 +165 1 16 19 -0.65536000000000000000e5 +165 1 16 23 -0.40960000000000000000e4 +165 1 16 31 0.16384000000000000000e5 +165 1 17 32 0.16384000000000000000e5 +165 2 6 12 0.40960000000000000000e4 +165 2 10 24 0.81920000000000000000e4 +165 2 11 13 0.16384000000000000000e5 +165 2 11 25 -0.16384000000000000000e5 +165 2 15 29 0.16384000000000000000e5 +165 3 3 16 0.16384000000000000000e5 +165 3 4 17 0.81920000000000000000e4 +165 3 7 12 0.40960000000000000000e4 +165 3 7 20 0.16384000000000000000e5 +165 3 7 36 -0.16384000000000000000e5 +165 3 12 21 -0.65536000000000000000e5 +165 3 14 19 0.32768000000000000000e5 +165 3 14 27 -0.81920000000000000000e4 +165 3 16 29 -0.81920000000000000000e4 +165 3 18 31 -0.16384000000000000000e5 +165 4 1 13 0.40960000000000000000e4 +165 4 2 14 0.81920000000000000000e4 +165 4 3 15 0.81920000000000000000e4 +165 4 10 10 0.16384000000000000000e5 +165 4 11 23 -0.81920000000000000000e4 +165 4 13 13 0.65536000000000000000e5 +166 1 3 18 -0.81920000000000000000e4 +166 1 4 19 0.16384000000000000000e5 +166 1 5 36 0.16384000000000000000e5 +166 1 11 18 0.16384000000000000000e5 +166 1 12 43 0.81920000000000000000e4 +166 1 13 44 -0.16384000000000000000e5 +166 1 14 21 -0.13107200000000000000e6 +166 1 14 45 -0.16384000000000000000e5 +166 1 18 33 0.32768000000000000000e5 +166 1 21 44 0.13107200000000000000e6 +166 1 36 51 -0.32768000000000000000e5 +166 1 45 52 -0.16384000000000000000e5 +166 2 11 25 0.32768000000000000000e5 +166 2 15 29 -0.32768000000000000000e5 +166 3 3 16 -0.81920000000000000000e4 +166 3 4 17 -0.81920000000000000000e4 +166 3 6 19 -0.16384000000000000000e5 +166 3 7 36 0.32768000000000000000e5 +166 3 8 21 0.65536000000000000000e5 +166 3 14 19 0.65536000000000000000e5 +166 3 14 27 0.81920000000000000000e4 +166 3 15 44 -0.16384000000000000000e5 +166 3 15 46 0.32768000000000000000e5 +166 3 16 29 0.16384000000000000000e5 +166 3 17 30 -0.16384000000000000000e5 +166 3 17 46 -0.65536000000000000000e5 +166 3 18 31 0.32768000000000000000e5 +166 3 19 32 0.65536000000000000000e5 +166 3 21 50 -0.65536000000000000000e5 +166 3 21 56 0.32768000000000000000e5 +166 3 32 45 -0.16384000000000000000e5 +166 3 33 46 0.32768000000000000000e5 +166 3 36 49 0.16384000000000000000e5 +166 3 41 46 0.16384000000000000000e5 +166 3 45 46 0.32768000000000000000e5 +166 4 2 14 -0.81920000000000000000e4 +166 4 11 15 0.65536000000000000000e5 +166 4 11 23 0.16384000000000000000e5 +166 4 13 25 0.65536000000000000000e5 +166 4 15 35 0.16384000000000000000e5 +167 1 6 21 -0.32768000000000000000e5 +167 1 15 46 0.32768000000000000000e5 +167 1 17 32 -0.32768000000000000000e5 +167 2 9 15 -0.32768000000000000000e5 +167 3 7 20 0.32768000000000000000e5 +167 3 8 21 -0.65536000000000000000e5 +167 4 10 14 0.32768000000000000000e5 +168 1 20 27 -0.32768000000000000000e5 +168 2 11 25 -0.32768000000000000000e5 +168 3 8 21 -0.65536000000000000000e5 +168 3 18 31 -0.32768000000000000000e5 +169 1 2 17 -0.16384000000000000000e5 +169 1 3 18 -0.81920000000000000000e4 +169 1 3 34 -0.81920000000000000000e4 +169 1 4 19 -0.32768000000000000000e5 +169 1 5 20 -0.16384000000000000000e5 +169 1 10 17 -0.16384000000000000000e5 +169 1 13 44 0.16384000000000000000e5 +169 1 14 45 0.16384000000000000000e5 +169 1 16 23 0.81920000000000000000e4 +169 1 16 31 -0.32768000000000000000e5 +169 1 20 27 0.32768000000000000000e5 +169 2 6 12 -0.81920000000000000000e4 +169 2 10 24 -0.16384000000000000000e5 +169 2 11 13 -0.32768000000000000000e5 +169 3 3 16 -0.16384000000000000000e5 +169 3 7 12 -0.81920000000000000000e4 +169 3 7 20 -0.32768000000000000000e5 +169 3 16 29 -0.16384000000000000000e5 +169 4 1 13 -0.81920000000000000000e4 +169 4 3 15 -0.16384000000000000000e5 +169 4 10 10 -0.32768000000000000000e5 +169 4 11 23 -0.16384000000000000000e5 +170 1 12 19 -0.65536000000000000000e5 +170 1 16 31 0.32768000000000000000e5 +170 1 20 27 0.32768000000000000000e5 +170 3 7 36 -0.32768000000000000000e5 +171 1 6 21 -0.65536000000000000000e5 +171 1 20 51 0.65536000000000000000e5 +171 3 15 44 0.32768000000000000000e5 +171 3 17 30 0.32768000000000000000e5 +171 3 20 49 0.32768000000000000000e5 +171 3 30 35 0.32768000000000000000e5 +171 3 32 45 0.32768000000000000000e5 +171 3 36 49 0.32768000000000000000e5 +172 1 3 18 0.16384000000000000000e5 +172 1 4 35 -0.16384000000000000000e5 +172 1 5 20 0.32768000000000000000e5 +172 1 10 17 0.32768000000000000000e5 +172 1 11 18 0.32768000000000000000e5 +172 1 12 43 -0.32768000000000000000e5 +172 1 13 20 -0.13107200000000000000e6 +172 1 14 45 -0.32768000000000000000e5 +172 1 17 32 0.65536000000000000000e5 +172 1 17 48 0.16384000000000000000e5 +172 1 18 49 0.16384000000000000000e5 +172 1 20 27 0.65536000000000000000e5 +172 2 9 23 -0.16384000000000000000e5 +172 2 11 25 0.65536000000000000000e5 +172 2 14 28 0.16384000000000000000e5 +172 3 3 16 0.16384000000000000000e5 +172 3 4 17 0.16384000000000000000e5 +172 3 5 34 -0.16384000000000000000e5 +172 3 6 19 -0.32768000000000000000e5 +172 3 7 20 0.65536000000000000000e5 +172 3 13 42 0.16384000000000000000e5 +172 3 14 27 -0.32768000000000000000e5 +172 3 14 43 0.16384000000000000000e5 +172 3 17 30 -0.32768000000000000000e5 +172 4 2 14 0.16384000000000000000e5 +172 4 3 15 0.32768000000000000000e5 +172 4 10 14 0.65536000000000000000e5 +173 1 3 18 -0.16384000000000000000e5 +173 1 4 35 0.32768000000000000000e5 +173 1 5 20 -0.32768000000000000000e5 +173 1 5 36 0.32768000000000000000e5 +173 1 10 17 -0.32768000000000000000e5 +173 1 12 43 0.49152000000000000000e5 +173 1 14 45 0.98304000000000000000e5 +173 1 17 32 -0.65536000000000000000e5 +173 1 17 48 -0.32768000000000000000e5 +173 1 18 49 -0.32768000000000000000e5 +173 2 9 23 0.32768000000000000000e5 +173 2 14 28 -0.32768000000000000000e5 +173 3 3 16 -0.16384000000000000000e5 +173 3 4 17 -0.16384000000000000000e5 +173 3 5 34 0.32768000000000000000e5 +173 3 13 42 -0.32768000000000000000e5 +173 3 14 27 0.49152000000000000000e5 +173 3 14 43 -0.32768000000000000000e5 +173 4 2 14 -0.16384000000000000000e5 +173 4 3 15 -0.32768000000000000000e5 +174 1 3 18 -0.16384000000000000000e5 +174 1 4 19 0.32768000000000000000e5 +174 1 4 35 0.16384000000000000000e5 +174 1 12 43 0.32768000000000000000e5 +174 1 14 45 0.32768000000000000000e5 +174 1 17 48 -0.16384000000000000000e5 +174 1 18 49 -0.16384000000000000000e5 +174 1 20 27 -0.65536000000000000000e5 +174 2 9 23 0.16384000000000000000e5 +174 2 14 28 -0.16384000000000000000e5 +174 3 3 16 -0.16384000000000000000e5 +174 3 4 17 -0.16384000000000000000e5 +174 3 5 34 0.16384000000000000000e5 +174 3 7 20 -0.65536000000000000000e5 +174 3 13 42 -0.16384000000000000000e5 +174 3 14 27 0.32768000000000000000e5 +174 3 14 43 -0.16384000000000000000e5 +174 3 16 29 -0.32768000000000000000e5 +174 4 2 14 -0.16384000000000000000e5 +175 1 2 17 -0.32768000000000000000e5 +175 1 3 34 -0.16384000000000000000e5 +175 1 4 19 -0.65536000000000000000e5 +175 1 4 35 -0.32768000000000000000e5 +175 1 12 43 -0.49152000000000000000e5 +175 1 13 44 0.32768000000000000000e5 +175 1 14 45 -0.65536000000000000000e5 +175 1 16 23 0.16384000000000000000e5 +175 1 16 31 -0.65536000000000000000e5 +175 1 17 48 0.32768000000000000000e5 +175 1 18 49 0.32768000000000000000e5 +175 1 20 27 0.13107200000000000000e6 +175 2 6 12 -0.16384000000000000000e5 +175 2 9 23 -0.32768000000000000000e5 +175 2 10 24 -0.65536000000000000000e5 +175 2 14 28 0.32768000000000000000e5 +175 3 3 16 -0.16384000000000000000e5 +175 3 4 17 0.16384000000000000000e5 +175 3 5 34 -0.32768000000000000000e5 +175 3 7 12 -0.16384000000000000000e5 +175 3 13 42 0.32768000000000000000e5 +175 3 14 27 -0.49152000000000000000e5 +175 3 14 43 0.32768000000000000000e5 +175 4 1 13 -0.16384000000000000000e5 +175 4 2 14 0.16384000000000000000e5 +175 4 10 10 -0.65536000000000000000e5 +176 1 2 17 -0.32768000000000000000e5 +176 1 3 18 -0.16384000000000000000e5 +176 1 3 34 -0.16384000000000000000e5 +176 1 7 16 -0.32768000000000000000e5 +176 1 16 23 0.16384000000000000000e5 +176 1 27 34 0.32768000000000000000e5 +176 2 1 15 -0.32768000000000000000e5 +176 2 6 12 -0.16384000000000000000e5 +176 3 3 16 -0.32768000000000000000e5 +176 3 7 12 -0.16384000000000000000e5 +176 4 1 13 -0.16384000000000000000e5 +177 1 15 30 0.32768000000000000000e5 +177 1 18 49 -0.32768000000000000000e5 +177 3 6 19 -0.65536000000000000000e5 +177 3 14 43 -0.32768000000000000000e5 +177 3 26 35 0.32768000000000000000e5 +178 1 5 20 -0.65536000000000000000e5 +178 1 14 45 0.65536000000000000000e5 +178 1 17 48 -0.32768000000000000000e5 +178 2 14 28 -0.32768000000000000000e5 +178 3 5 34 0.32768000000000000000e5 +178 3 13 42 -0.32768000000000000000e5 +179 1 4 35 0.32768000000000000000e5 +179 1 10 17 -0.65536000000000000000e5 +179 1 14 45 0.65536000000000000000e5 +179 1 17 48 -0.32768000000000000000e5 +179 1 18 49 -0.32768000000000000000e5 +179 2 14 28 -0.32768000000000000000e5 +179 3 13 42 -0.32768000000000000000e5 +179 3 14 43 -0.32768000000000000000e5 +180 1 4 19 -0.65536000000000000000e5 +180 1 12 43 0.32768000000000000000e5 +180 1 17 48 0.32768000000000000000e5 +180 3 13 42 0.32768000000000000000e5 +180 3 14 27 0.32768000000000000000e5 +181 1 2 17 -0.32768000000000000000e5 +181 1 3 18 -0.32768000000000000000e5 +181 1 12 43 0.32768000000000000000e5 +181 2 6 12 -0.32768000000000000000e5 +181 3 3 16 -0.32768000000000000000e5 +182 1 2 17 -0.32768000000000000000e5 +182 1 4 35 -0.32768000000000000000e5 +182 1 12 43 -0.32768000000000000000e5 +182 1 14 45 -0.65536000000000000000e5 +182 1 16 23 0.65536000000000000000e5 +182 1 16 31 -0.13107200000000000000e6 +182 1 16 47 0.32768000000000000000e5 +182 1 17 48 0.32768000000000000000e5 +182 1 18 49 0.32768000000000000000e5 +182 1 20 27 0.13107200000000000000e6 +182 2 7 13 0.65536000000000000000e5 +182 2 9 23 -0.32768000000000000000e5 +182 2 10 24 -0.65536000000000000000e5 +182 2 14 28 0.32768000000000000000e5 +182 3 3 16 -0.32768000000000000000e5 +182 3 5 34 -0.32768000000000000000e5 +182 3 7 12 -0.32768000000000000000e5 +182 3 12 41 0.32768000000000000000e5 +182 3 13 42 0.32768000000000000000e5 +182 3 14 27 -0.32768000000000000000e5 +182 3 14 43 0.32768000000000000000e5 +182 4 1 13 -0.32768000000000000000e5 +182 4 10 10 -0.13107200000000000000e6 +183 1 7 16 -0.65536000000000000000e5 +183 1 12 27 0.32768000000000000000e5 +183 1 16 23 0.32768000000000000000e5 +183 3 1 34 -0.32768000000000000000e5 +184 1 1 48 0.81920000000000000000e4 +184 1 2 33 0.32768000000000000000e5 +184 1 2 49 0.81920000000000000000e4 +184 1 8 39 0.16384000000000000000e5 +184 1 9 40 0.16384000000000000000e5 +184 1 10 41 -0.32768000000000000000e5 +184 1 11 42 -0.65536000000000000000e5 +184 1 12 43 -0.13107200000000000000e6 +184 1 15 30 -0.65536000000000000000e5 +184 1 18 49 0.13107200000000000000e6 +184 1 23 38 0.81920000000000000000e4 +184 1 24 55 -0.16384000000000000000e5 +184 1 26 41 -0.16384000000000000000e5 +184 1 28 43 0.98304000000000000000e5 +184 1 32 47 0.98304000000000000000e5 +184 1 33 48 0.32768000000000000000e5 +184 1 40 55 0.16384000000000000000e5 +184 1 41 56 0.16384000000000000000e5 +184 1 52 55 -0.65536000000000000000e5 +184 2 2 32 0.81920000000000000000e4 +184 2 4 34 -0.16384000000000000000e5 +184 2 12 26 0.32768000000000000000e5 +184 2 16 30 0.16384000000000000000e5 +184 2 20 34 0.32768000000000000000e5 +184 2 28 34 0.16384000000000000000e5 +184 3 3 32 0.32768000000000000000e5 +184 3 4 33 -0.32768000000000000000e5 +184 3 5 18 -0.65536000000000000000e5 +184 3 5 34 0.65536000000000000000e5 +184 3 5 50 -0.16384000000000000000e5 +184 3 9 38 0.16384000000000000000e5 +184 3 13 42 0.65536000000000000000e5 +184 3 14 27 -0.65536000000000000000e5 +184 3 14 43 0.65536000000000000000e5 +184 3 14 51 -0.65536000000000000000e5 +184 3 22 35 0.65536000000000000000e5 +184 3 22 51 0.16384000000000000000e5 +184 3 23 52 -0.32768000000000000000e5 +184 3 27 40 -0.16384000000000000000e5 +184 3 27 56 0.16384000000000000000e5 +184 3 28 41 0.98304000000000000000e5 +184 3 29 42 0.32768000000000000000e5 +184 3 35 48 -0.65536000000000000000e5 +184 3 38 51 -0.16384000000000000000e5 +184 3 45 50 -0.65536000000000000000e5 +184 3 45 56 0.32768000000000000000e5 +184 3 47 52 -0.32768000000000000000e5 +184 4 2 30 0.16384000000000000000e5 +184 4 3 31 -0.32768000000000000000e5 +184 4 6 34 0.32768000000000000000e5 +184 4 7 35 0.16384000000000000000e5 +184 4 8 20 0.32768000000000000000e5 +184 4 9 21 -0.32768000000000000000e5 +184 4 19 31 -0.32768000000000000000e5 +184 4 22 22 -0.65536000000000000000e5 +184 4 22 34 -0.32768000000000000000e5 +184 4 29 33 -0.16384000000000000000e5 +184 4 30 34 -0.32768000000000000000e5 +184 4 31 35 -0.32768000000000000000e5 +185 1 5 20 -0.13107200000000000000e6 +185 1 5 36 0.13107200000000000000e6 +185 1 11 42 0.32768000000000000000e5 +185 1 14 45 -0.13107200000000000000e6 +185 1 17 48 0.65536000000000000000e5 +185 1 18 49 0.65536000000000000000e5 +185 1 26 33 0.32768000000000000000e5 +185 2 14 28 0.65536000000000000000e5 +185 3 4 17 0.65536000000000000000e5 +185 3 4 33 0.32768000000000000000e5 +185 3 5 18 0.65536000000000000000e5 +185 3 5 34 -0.65536000000000000000e5 +185 3 13 42 0.65536000000000000000e5 +185 3 14 43 0.65536000000000000000e5 +185 4 8 12 0.65536000000000000000e5 +186 1 2 33 -0.32768000000000000000e5 +186 1 4 35 -0.65536000000000000000e5 +186 1 10 41 -0.32768000000000000000e5 +186 1 11 42 0.32768000000000000000e5 +186 1 12 43 0.65536000000000000000e5 +186 2 12 26 -0.32768000000000000000e5 +186 3 3 32 -0.32768000000000000000e5 +186 3 4 17 -0.65536000000000000000e5 +186 3 14 27 0.65536000000000000000e5 +186 4 8 20 -0.32768000000000000000e5 +187 1 3 18 -0.65536000000000000000e5 +187 1 11 42 -0.32768000000000000000e5 +187 1 28 43 0.32768000000000000000e5 +187 1 32 47 0.32768000000000000000e5 +187 1 33 48 0.32768000000000000000e5 +187 3 3 32 0.32768000000000000000e5 +187 3 13 42 0.65536000000000000000e5 +187 3 28 41 0.32768000000000000000e5 +187 3 29 42 0.32768000000000000000e5 +187 4 3 31 -0.32768000000000000000e5 +188 1 2 33 0.32768000000000000000e5 +188 1 3 34 -0.65536000000000000000e5 +188 1 10 41 0.32768000000000000000e5 +188 3 3 16 -0.65536000000000000000e5 +189 1 2 17 -0.65536000000000000000e5 +189 1 2 33 -0.32768000000000000000e5 +189 1 3 34 0.65536000000000000000e5 +189 1 10 41 -0.32768000000000000000e5 +189 1 11 42 0.32768000000000000000e5 +189 1 12 43 0.65536000000000000000e5 +189 1 28 43 -0.32768000000000000000e5 +189 1 32 47 -0.32768000000000000000e5 +189 1 33 48 -0.32768000000000000000e5 +189 2 7 21 -0.32768000000000000000e5 +189 2 12 26 -0.32768000000000000000e5 +189 3 3 32 -0.32768000000000000000e5 +189 3 13 42 -0.65536000000000000000e5 +189 3 28 41 -0.32768000000000000000e5 +189 3 29 42 -0.32768000000000000000e5 +189 4 3 31 0.32768000000000000000e5 +190 1 1 32 0.32768000000000000000e5 +190 1 2 33 -0.32768000000000000000e5 +190 1 3 34 0.65536000000000000000e5 +190 1 10 41 -0.32768000000000000000e5 +190 1 12 27 -0.65536000000000000000e5 +190 2 7 21 -0.32768000000000000000e5 +190 3 2 31 -0.32768000000000000000e5 +190 3 3 32 -0.32768000000000000000e5 +190 3 7 12 -0.65536000000000000000e5 +191 1 1 16 -0.65536000000000000000e5 +191 1 1 32 -0.32768000000000000000e5 +191 1 2 33 0.65536000000000000000e5 +191 1 3 34 -0.13107200000000000000e6 +191 1 10 41 0.65536000000000000000e5 +191 1 11 42 -0.32768000000000000000e5 +191 1 12 27 0.65536000000000000000e5 +191 1 12 43 -0.65536000000000000000e5 +191 1 16 23 0.65536000000000000000e5 +191 1 28 43 0.32768000000000000000e5 +191 1 32 47 0.32768000000000000000e5 +191 1 33 48 0.32768000000000000000e5 +191 2 1 31 -0.32768000000000000000e5 +191 2 6 20 -0.32768000000000000000e5 +191 2 7 21 0.65536000000000000000e5 +191 2 12 26 0.32768000000000000000e5 +191 3 1 34 -0.65536000000000000000e5 +191 3 2 31 0.32768000000000000000e5 +191 3 3 32 0.65536000000000000000e5 +191 3 13 42 0.65536000000000000000e5 +191 3 28 41 0.32768000000000000000e5 +191 3 29 42 0.32768000000000000000e5 +191 4 3 31 -0.32768000000000000000e5 +192 1 1 48 0.16384000000000000000e5 +192 1 2 33 -0.65536000000000000000e5 +192 1 2 49 0.16384000000000000000e5 +192 1 8 39 0.32768000000000000000e5 +192 1 9 40 0.32768000000000000000e5 +192 1 10 41 -0.65536000000000000000e5 +192 1 11 26 0.32768000000000000000e5 +192 1 11 42 0.65536000000000000000e5 +192 1 23 38 0.16384000000000000000e5 +192 1 26 33 -0.65536000000000000000e5 +192 1 26 41 -0.32768000000000000000e5 +192 1 28 43 0.65536000000000000000e5 +192 1 32 47 0.65536000000000000000e5 +192 1 33 40 0.65536000000000000000e5 +192 1 33 48 -0.13107200000000000000e6 +192 2 2 32 0.16384000000000000000e5 +192 2 4 34 -0.32768000000000000000e5 +192 2 12 26 -0.65536000000000000000e5 +192 2 16 30 0.32768000000000000000e5 +192 2 20 34 0.65536000000000000000e5 +192 2 28 34 0.32768000000000000000e5 +192 3 3 32 -0.65536000000000000000e5 +192 3 4 33 0.65536000000000000000e5 +192 3 5 34 -0.13107200000000000000e6 +192 3 5 50 -0.32768000000000000000e5 +192 3 6 51 0.32768000000000000000e5 +192 3 6 55 0.32768000000000000000e5 +192 3 9 38 0.32768000000000000000e5 +192 3 10 11 -0.65536000000000000000e5 +192 3 11 40 0.32768000000000000000e5 +192 3 13 42 -0.13107200000000000000e6 +192 3 14 27 0.13107200000000000000e6 +192 3 22 35 0.13107200000000000000e6 +192 3 27 40 -0.32768000000000000000e5 +192 3 28 41 0.65536000000000000000e5 +192 3 29 42 -0.65536000000000000000e5 +192 4 2 30 0.32768000000000000000e5 +192 4 3 31 0.65536000000000000000e5 +192 4 6 34 0.65536000000000000000e5 +192 4 8 20 -0.65536000000000000000e5 +192 4 9 21 0.65536000000000000000e5 +192 4 21 33 0.32768000000000000000e5 +193 1 2 33 -0.65536000000000000000e5 +193 1 4 35 -0.13107200000000000000e6 +193 1 6 13 0.65536000000000000000e5 +193 1 10 25 -0.32768000000000000000e5 +193 1 10 41 0.65536000000000000000e5 +193 1 11 42 0.13107200000000000000e6 +193 1 12 43 0.13107200000000000000e6 +193 1 28 43 -0.65536000000000000000e5 +193 1 32 47 -0.65536000000000000000e5 +193 1 33 48 -0.65536000000000000000e5 +193 2 5 11 0.65536000000000000000e5 +193 2 12 26 -0.65536000000000000000e5 +193 2 28 34 -0.32768000000000000000e5 +193 3 2 15 0.65536000000000000000e5 +193 3 4 17 -0.13107200000000000000e6 +193 3 10 23 -0.32768000000000000000e5 +193 3 13 42 -0.13107200000000000000e6 +193 3 14 27 0.13107200000000000000e6 +193 3 28 41 -0.65536000000000000000e5 +193 3 29 42 -0.65536000000000000000e5 +193 4 3 31 0.65536000000000000000e5 +193 4 7 19 -0.32768000000000000000e5 +193 4 8 20 -0.65536000000000000000e5 +193 4 18 22 -0.32768000000000000000e5 +193 4 18 30 -0.32768000000000000000e5 +193 4 21 33 -0.32768000000000000000e5 +194 1 1 48 0.16384000000000000000e5 +194 1 2 49 0.16384000000000000000e5 +194 1 6 13 -0.65536000000000000000e5 +194 1 8 39 0.32768000000000000000e5 +194 1 9 40 0.32768000000000000000e5 +194 1 10 25 0.32768000000000000000e5 +194 1 10 41 -0.65536000000000000000e5 +194 1 12 43 -0.13107200000000000000e6 +194 1 23 38 0.16384000000000000000e5 +194 1 26 41 -0.65536000000000000000e5 +194 1 28 43 0.13107200000000000000e6 +194 1 32 47 0.13107200000000000000e6 +194 2 2 32 0.16384000000000000000e5 +194 2 4 34 -0.32768000000000000000e5 +194 2 16 30 0.32768000000000000000e5 +194 2 20 34 0.65536000000000000000e5 +194 3 9 38 0.32768000000000000000e5 +194 3 10 39 0.32768000000000000000e5 +194 3 22 35 0.13107200000000000000e6 +194 3 28 41 0.13107200000000000000e6 +194 4 2 30 0.32768000000000000000e5 +194 4 6 34 0.65536000000000000000e5 +195 1 1 48 -0.16384000000000000000e5 +195 1 2 49 -0.16384000000000000000e5 +195 1 8 39 -0.32768000000000000000e5 +195 1 12 43 0.13107200000000000000e6 +195 1 23 38 -0.16384000000000000000e5 +195 1 26 41 0.32768000000000000000e5 +195 1 28 43 -0.65536000000000000000e5 +195 1 32 47 -0.13107200000000000000e6 +195 2 2 32 -0.16384000000000000000e5 +195 2 16 30 -0.32768000000000000000e5 +195 2 20 34 -0.65536000000000000000e5 +195 3 2 15 -0.65536000000000000000e5 +195 3 3 32 -0.65536000000000000000e5 +195 3 10 23 0.32768000000000000000e5 +195 3 22 35 -0.13107200000000000000e6 +195 3 28 41 -0.13107200000000000000e6 +195 4 2 30 -0.32768000000000000000e5 +195 4 6 34 -0.65536000000000000000e5 +196 1 1 48 -0.16384000000000000000e5 +196 1 2 33 -0.65536000000000000000e5 +196 1 2 49 -0.16384000000000000000e5 +196 1 9 40 -0.32768000000000000000e5 +196 1 10 41 0.65536000000000000000e5 +196 1 12 43 0.13107200000000000000e6 +196 1 23 38 -0.16384000000000000000e5 +196 1 26 41 0.32768000000000000000e5 +196 1 28 43 -0.65536000000000000000e5 +196 1 32 47 -0.13107200000000000000e6 +196 2 2 32 -0.16384000000000000000e5 +196 2 4 10 0.65536000000000000000e5 +196 2 7 21 -0.65536000000000000000e5 +196 2 16 30 -0.32768000000000000000e5 +196 2 20 34 -0.65536000000000000000e5 +196 3 1 14 0.65536000000000000000e5 +196 3 1 30 0.32768000000000000000e5 +196 3 2 15 0.65536000000000000000e5 +196 3 3 16 -0.13107200000000000000e6 +196 3 22 35 -0.13107200000000000000e6 +196 3 28 41 -0.13107200000000000000e6 +196 4 2 30 -0.32768000000000000000e5 +196 4 6 34 -0.65536000000000000000e5 +197 1 1 48 0.16384000000000000000e5 +197 1 2 33 0.13107200000000000000e6 +197 1 2 49 0.16384000000000000000e5 +197 1 3 34 -0.13107200000000000000e6 +197 1 8 39 0.32768000000000000000e5 +197 1 10 41 0.65536000000000000000e5 +197 1 11 42 -0.65536000000000000000e5 +197 1 12 43 -0.13107200000000000000e6 +197 1 23 38 0.16384000000000000000e5 +197 1 28 43 0.65536000000000000000e5 +197 1 32 47 0.65536000000000000000e5 +197 1 33 48 0.65536000000000000000e5 +197 2 2 32 0.16384000000000000000e5 +197 2 7 21 0.65536000000000000000e5 +197 2 12 26 0.65536000000000000000e5 +197 3 1 14 -0.65536000000000000000e5 +197 3 1 30 -0.32768000000000000000e5 +197 3 3 32 0.65536000000000000000e5 +197 3 8 37 0.32768000000000000000e5 +197 3 10 23 -0.32768000000000000000e5 +197 3 13 42 0.13107200000000000000e6 +197 3 28 41 0.65536000000000000000e5 +197 3 29 42 0.65536000000000000000e5 +197 4 3 31 -0.65536000000000000000e5 +197 4 6 18 -0.32768000000000000000e5 +198 1 1 32 -0.65536000000000000000e5 +198 1 1 48 0.49152000000000000000e5 +198 1 2 33 0.13107200000000000000e6 +198 1 2 49 0.49152000000000000000e5 +198 1 3 34 -0.13107200000000000000e6 +198 1 4 11 -0.32768000000000000000e5 +198 1 8 23 0.65536000000000000000e5 +198 1 8 39 0.32768000000000000000e5 +198 1 9 40 0.32768000000000000000e5 +198 1 10 41 0.65536000000000000000e5 +198 1 11 42 -0.65536000000000000000e5 +198 1 12 43 -0.26214400000000000000e6 +198 1 23 38 0.49152000000000000000e5 +198 1 26 41 -0.32768000000000000000e5 +198 1 28 43 0.13107200000000000000e6 +198 1 32 47 0.19660800000000000000e6 +198 1 33 48 0.65536000000000000000e5 +198 2 2 8 0.32768000000000000000e5 +198 2 2 32 0.49152000000000000000e5 +198 2 3 9 -0.32768000000000000000e5 +198 2 7 21 0.65536000000000000000e5 +198 2 12 26 0.65536000000000000000e5 +198 2 16 30 0.32768000000000000000e5 +198 2 20 34 0.65536000000000000000e5 +198 3 1 14 -0.65536000000000000000e5 +198 3 1 30 -0.32768000000000000000e5 +198 3 2 7 -0.32768000000000000000e5 +198 3 2 15 0.65536000000000000000e5 +198 3 3 32 0.13107200000000000000e6 +198 3 4 9 -0.32768000000000000000e5 +198 3 8 37 0.65536000000000000000e5 +198 3 10 23 -0.65536000000000000000e5 +198 3 13 42 0.13107200000000000000e6 +198 3 22 35 0.13107200000000000000e6 +198 3 28 41 0.19660800000000000000e6 +198 3 29 42 0.65536000000000000000e5 +198 4 2 6 -0.32768000000000000000e5 +198 4 2 30 0.32768000000000000000e5 +198 4 3 31 -0.65536000000000000000e5 +198 4 6 18 -0.32768000000000000000e5 +198 4 6 34 0.65536000000000000000e5 +199 1 1 8 -0.32768000000000000000e5 +199 1 2 9 -0.32768000000000000000e5 +199 1 7 38 0.32768000000000000000e5 +199 2 1 7 -0.32768000000000000000e5 +199 3 2 7 -0.32768000000000000000e5 +200 1 1 8 -0.32768000000000000000e5 +200 1 1 12 -0.65536000000000000000e5 +200 1 1 24 -0.16384000000000000000e5 +200 1 1 32 -0.65536000000000000000e5 +200 1 1 40 -0.16384000000000000000e5 +200 1 1 48 0.32768000000000000000e5 +200 1 2 9 -0.32768000000000000000e5 +200 1 2 33 0.19660800000000000000e6 +200 1 2 49 0.32768000000000000000e5 +200 1 3 34 -0.26214400000000000000e6 +200 1 4 11 -0.32768000000000000000e5 +200 1 7 22 0.32768000000000000000e5 +200 1 8 23 0.32768000000000000000e5 +200 1 8 39 0.32768000000000000000e5 +200 1 9 40 0.32768000000000000000e5 +200 1 10 41 0.13107200000000000000e6 +200 1 11 42 -0.65536000000000000000e5 +200 1 12 27 0.13107200000000000000e6 +200 1 12 43 -0.26214400000000000000e6 +200 1 22 37 0.16384000000000000000e5 +200 1 23 38 0.49152000000000000000e5 +200 1 26 41 -0.32768000000000000000e5 +200 1 28 43 0.13107200000000000000e6 +200 1 32 47 0.19660800000000000000e6 +200 1 33 48 0.65536000000000000000e5 +200 2 1 7 -0.32768000000000000000e5 +200 2 2 8 0.32768000000000000000e5 +200 2 2 16 -0.16384000000000000000e5 +200 2 2 32 0.32768000000000000000e5 +200 2 3 9 -0.32768000000000000000e5 +200 2 6 20 -0.65536000000000000000e5 +200 2 7 21 0.13107200000000000000e6 +200 2 12 26 0.65536000000000000000e5 +200 2 16 16 0.32768000000000000000e5 +200 2 16 30 0.32768000000000000000e5 +200 2 20 34 0.65536000000000000000e5 +200 3 1 14 -0.13107200000000000000e6 +200 3 1 22 -0.16384000000000000000e5 +200 3 1 30 -0.32768000000000000000e5 +200 3 1 38 -0.16384000000000000000e5 +200 3 2 7 -0.65536000000000000000e5 +200 3 2 15 0.65536000000000000000e5 +200 3 2 23 -0.16384000000000000000e5 +200 3 3 32 0.19660800000000000000e6 +200 3 4 9 -0.32768000000000000000e5 +200 3 7 12 0.13107200000000000000e6 +200 3 8 37 0.32768000000000000000e5 +200 3 10 23 -0.65536000000000000000e5 +200 3 13 42 0.13107200000000000000e6 +200 3 22 27 0.32768000000000000000e5 +200 3 22 35 0.13107200000000000000e6 +200 3 28 41 0.19660800000000000000e6 +200 3 29 42 0.65536000000000000000e5 +200 4 2 6 -0.32768000000000000000e5 +200 4 2 30 0.32768000000000000000e5 +200 4 3 31 -0.65536000000000000000e5 +200 4 6 6 -0.13107200000000000000e6 +200 4 6 18 -0.32768000000000000000e5 +200 4 6 34 0.65536000000000000000e5 +200 4 16 16 -0.32768000000000000000e5 +201 1 2 33 0.13107200000000000000e6 +201 1 4 11 -0.65536000000000000000e5 +201 1 6 13 0.13107200000000000000e6 +201 1 6 37 0.32768000000000000000e5 +201 1 6 53 -0.32768000000000000000e5 +201 1 9 40 -0.13107200000000000000e6 +201 1 10 25 0.65536000000000000000e5 +201 1 10 41 0.13107200000000000000e6 +201 1 11 26 -0.65536000000000000000e5 +201 1 11 42 0.13107200000000000000e6 +201 1 12 43 -0.26214400000000000000e6 +201 1 49 56 -0.32768000000000000000e5 +201 1 53 56 0.32768000000000000000e5 +201 1 54 55 0.65536000000000000000e5 +201 1 55 56 -0.65536000000000000000e5 +201 2 5 27 0.32768000000000000000e5 +201 2 5 35 -0.32768000000000000000e5 +201 2 12 26 0.13107200000000000000e6 +201 2 28 34 -0.65536000000000000000e5 +201 3 3 32 0.13107200000000000000e6 +201 3 3 40 0.32768000000000000000e5 +201 3 4 9 -0.65536000000000000000e5 +201 3 5 26 0.32768000000000000000e5 +201 3 5 50 -0.65536000000000000000e5 +201 3 6 11 0.65536000000000000000e5 +201 3 10 11 -0.13107200000000000000e6 +201 3 10 39 -0.65536000000000000000e5 +201 3 14 27 -0.26214400000000000000e6 +201 3 25 38 0.32768000000000000000e5 +201 3 25 54 -0.32768000000000000000e5 +201 3 39 40 -0.32768000000000000000e5 +201 3 40 53 -0.32768000000000000000e5 +201 3 48 53 0.32768000000000000000e5 +201 3 49 54 0.32768000000000000000e5 +201 3 53 54 -0.32768000000000000000e5 +201 4 4 8 -0.65536000000000000000e5 +201 4 5 9 0.65536000000000000000e5 +201 4 5 33 -0.32768000000000000000e5 +201 4 8 20 0.13107200000000000000e6 +201 4 18 22 -0.65536000000000000000e5 +201 4 18 30 -0.65536000000000000000e5 +201 4 19 19 -0.65536000000000000000e5 +201 4 19 35 -0.32768000000000000000e5 +201 4 21 33 -0.65536000000000000000e5 +201 4 28 28 -0.65536000000000000000e5 +201 4 33 33 -0.65536000000000000000e5 +201 4 35 35 -0.65536000000000000000e5 +202 1 1 40 0.32768000000000000000e5 +202 1 1 48 0.32768000000000000000e5 +202 1 2 25 -0.32768000000000000000e5 +202 1 2 33 -0.13107200000000000000e6 +202 1 2 49 0.65536000000000000000e5 +202 1 4 11 0.65536000000000000000e5 +202 1 6 13 -0.13107200000000000000e6 +202 1 6 37 0.32768000000000000000e5 +202 1 8 39 0.65536000000000000000e5 +202 1 9 40 0.65536000000000000000e5 +202 1 10 25 -0.65536000000000000000e5 +202 1 10 41 -0.26214400000000000000e6 +202 1 23 38 0.32768000000000000000e5 +202 1 26 41 -0.65536000000000000000e5 +202 1 28 43 0.13107200000000000000e6 +202 1 32 47 0.26214400000000000000e6 +202 2 2 32 0.32768000000000000000e5 +202 2 4 18 0.32768000000000000000e5 +202 2 5 19 -0.32768000000000000000e5 +202 2 12 26 -0.13107200000000000000e6 +202 2 16 30 0.65536000000000000000e5 +202 2 20 34 0.13107200000000000000e6 +202 3 1 30 0.65536000000000000000e5 +202 3 2 39 0.32768000000000000000e5 +202 3 3 32 -0.13107200000000000000e6 +202 3 4 9 0.65536000000000000000e5 +202 3 5 26 -0.32768000000000000000e5 +202 3 10 23 -0.65536000000000000000e5 +202 3 14 27 0.26214400000000000000e6 +202 3 22 35 0.26214400000000000000e6 +202 3 28 41 0.26214400000000000000e6 +202 4 2 30 0.65536000000000000000e5 +202 4 4 8 0.65536000000000000000e5 +202 4 4 16 -0.32768000000000000000e5 +202 4 6 34 0.13107200000000000000e6 +202 4 8 20 -0.13107200000000000000e6 +203 1 1 40 -0.32768000000000000000e5 +203 1 2 25 0.32768000000000000000e5 +203 1 4 11 -0.65536000000000000000e5 +203 1 6 37 -0.65536000000000000000e5 +203 1 9 40 0.65536000000000000000e5 +203 1 24 39 0.32768000000000000000e5 +203 2 3 33 0.32768000000000000000e5 +203 2 4 18 -0.32768000000000000000e5 +203 2 5 27 -0.32768000000000000000e5 +203 3 1 30 -0.65536000000000000000e5 +203 3 2 39 -0.32768000000000000000e5 +203 3 3 40 -0.32768000000000000000e5 +203 3 9 38 0.65536000000000000000e5 +203 3 10 23 0.65536000000000000000e5 +203 4 4 16 0.32768000000000000000e5 +204 1 1 40 0.32768000000000000000e5 +204 1 2 33 -0.13107200000000000000e6 +204 1 2 49 -0.32768000000000000000e5 +204 1 6 37 0.32768000000000000000e5 +204 1 11 42 0.13107200000000000000e6 +204 1 12 43 0.26214400000000000000e6 +204 1 23 38 -0.32768000000000000000e5 +204 1 24 39 -0.32768000000000000000e5 +204 1 28 43 -0.13107200000000000000e6 +204 1 32 47 -0.13107200000000000000e6 +204 1 33 48 -0.13107200000000000000e6 +204 2 2 32 -0.32768000000000000000e5 +204 2 3 17 0.32768000000000000000e5 +204 2 3 33 -0.32768000000000000000e5 +204 2 12 26 -0.13107200000000000000e6 +204 3 1 30 0.13107200000000000000e6 +204 3 1 38 0.32768000000000000000e5 +204 3 2 23 0.32768000000000000000e5 +204 3 2 39 0.32768000000000000000e5 +204 3 3 40 0.32768000000000000000e5 +204 3 4 9 -0.65536000000000000000e5 +204 3 8 37 -0.65536000000000000000e5 +204 3 9 38 -0.65536000000000000000e5 +204 3 13 42 -0.26214400000000000000e6 +204 3 28 41 -0.13107200000000000000e6 +204 3 29 42 -0.13107200000000000000e6 +204 4 3 31 0.13107200000000000000e6 +204 4 4 16 -0.32768000000000000000e5 +204 4 6 18 0.65536000000000000000e5 +205 1 1 48 -0.32768000000000000000e5 +205 1 2 25 -0.32768000000000000000e5 +205 1 2 33 0.13107200000000000000e6 +205 1 4 11 0.65536000000000000000e5 +205 1 6 37 0.32768000000000000000e5 +205 1 8 39 -0.65536000000000000000e5 +205 1 9 40 -0.65536000000000000000e5 +205 1 11 42 -0.13107200000000000000e6 +205 1 26 41 0.65536000000000000000e5 +205 1 32 47 -0.13107200000000000000e6 +205 1 33 48 0.13107200000000000000e6 +205 2 3 9 0.65536000000000000000e5 +205 2 3 17 -0.32768000000000000000e5 +205 2 12 26 0.13107200000000000000e6 +205 2 16 30 -0.65536000000000000000e5 +205 2 20 34 -0.13107200000000000000e6 +205 3 1 30 -0.65536000000000000000e5 +205 3 1 38 -0.32768000000000000000e5 +205 3 2 15 -0.13107200000000000000e6 +205 3 2 23 -0.32768000000000000000e5 +205 3 3 32 -0.13107200000000000000e6 +205 3 4 9 0.65536000000000000000e5 +205 3 8 37 0.65536000000000000000e5 +205 3 13 42 0.26214400000000000000e6 +205 3 22 35 -0.26214400000000000000e6 +205 3 28 41 -0.13107200000000000000e6 +205 3 29 42 0.13107200000000000000e6 +205 4 2 30 -0.65536000000000000000e5 +205 4 3 31 -0.13107200000000000000e6 +205 4 6 18 -0.65536000000000000000e5 +205 4 6 34 -0.13107200000000000000e6 +206 1 1 48 0.32768000000000000000e5 +206 1 2 9 0.65536000000000000000e5 +206 1 2 25 0.32768000000000000000e5 +206 1 2 33 0.13107200000000000000e6 +206 1 2 49 0.65536000000000000000e5 +206 1 3 34 -0.26214400000000000000e6 +206 1 4 11 -0.65536000000000000000e5 +206 1 8 39 0.65536000000000000000e5 +206 1 9 40 0.65536000000000000000e5 +206 1 10 41 0.13107200000000000000e6 +206 1 12 43 -0.26214400000000000000e6 +206 1 23 38 0.32768000000000000000e5 +206 1 26 41 -0.65536000000000000000e5 +206 1 28 43 0.13107200000000000000e6 +206 1 32 47 0.26214400000000000000e6 +206 2 2 8 0.65536000000000000000e5 +206 2 2 32 0.32768000000000000000e5 +206 2 3 9 -0.65536000000000000000e5 +206 2 7 21 0.13107200000000000000e6 +206 2 16 30 0.65536000000000000000e5 +206 2 20 34 0.13107200000000000000e6 +206 3 1 14 -0.13107200000000000000e6 +206 3 2 15 0.13107200000000000000e6 +206 3 2 39 0.32768000000000000000e5 +206 3 3 32 0.26214400000000000000e6 +206 3 4 9 -0.65536000000000000000e5 +206 3 10 23 -0.65536000000000000000e5 +206 3 22 35 0.26214400000000000000e6 +206 3 28 41 0.26214400000000000000e6 +206 4 2 30 0.65536000000000000000e5 +206 4 6 34 0.13107200000000000000e6 +207 1 1 40 0.32768000000000000000e5 +207 1 1 48 0.32768000000000000000e5 +207 1 2 9 -0.65536000000000000000e5 +207 3 1 38 0.32768000000000000000e5 +207 3 2 23 0.32768000000000000000e5 +208 1 1 8 0.65536000000000000000e5 +208 1 1 24 0.32768000000000000000e5 +208 1 1 32 0.13107200000000000000e6 +208 1 1 48 -0.32768000000000000000e5 +208 1 2 9 0.65536000000000000000e5 +208 1 2 33 -0.39321600000000000000e6 +208 1 2 49 -0.65536000000000000000e5 +208 1 3 34 0.52428800000000000000e6 +208 1 4 11 0.65536000000000000000e5 +208 1 8 23 -0.65536000000000000000e5 +208 1 8 39 -0.65536000000000000000e5 +208 1 9 40 -0.65536000000000000000e5 +208 1 10 41 -0.26214400000000000000e6 +208 1 11 42 0.13107200000000000000e6 +208 1 12 27 -0.26214400000000000000e6 +208 1 12 43 0.52428800000000000000e6 +208 1 23 38 -0.65536000000000000000e5 +208 1 26 41 0.65536000000000000000e5 +208 1 28 43 -0.26214400000000000000e6 +208 1 32 47 -0.39321600000000000000e6 +208 1 33 48 -0.13107200000000000000e6 +208 2 1 7 0.65536000000000000000e5 +208 2 2 8 -0.65536000000000000000e5 +208 2 2 32 -0.65536000000000000000e5 +208 2 3 9 0.65536000000000000000e5 +208 2 6 20 0.13107200000000000000e6 +208 2 7 21 -0.26214400000000000000e6 +208 2 12 26 -0.13107200000000000000e6 +208 2 16 30 -0.65536000000000000000e5 +208 2 20 34 -0.13107200000000000000e6 +208 3 1 14 0.26214400000000000000e6 +208 3 1 30 0.65536000000000000000e5 +208 3 1 38 0.32768000000000000000e5 +208 3 2 7 0.65536000000000000000e5 +208 3 2 15 -0.13107200000000000000e6 +208 3 3 32 -0.39321600000000000000e6 +208 3 4 9 0.65536000000000000000e5 +208 3 7 12 -0.26214400000000000000e6 +208 3 8 37 -0.65536000000000000000e5 +208 3 10 23 0.13107200000000000000e6 +208 3 13 42 -0.26214400000000000000e6 +208 3 22 35 -0.26214400000000000000e6 +208 3 28 41 -0.39321600000000000000e6 +208 3 29 42 -0.13107200000000000000e6 +208 4 2 6 0.65536000000000000000e5 +208 4 2 30 -0.65536000000000000000e5 +208 4 3 31 0.13107200000000000000e6 +208 4 6 6 0.26214400000000000000e6 +208 4 6 18 0.65536000000000000000e5 +208 4 6 34 -0.13107200000000000000e6 +209 1 1 8 -0.13107200000000000000e6 +209 1 1 24 -0.32768000000000000000e5 +209 1 1 32 -0.13107200000000000000e6 +209 1 1 40 -0.32768000000000000000e5 +209 1 1 48 0.32768000000000000000e5 +209 1 2 9 -0.65536000000000000000e5 +209 1 2 33 0.39321600000000000000e6 +209 1 2 49 0.65536000000000000000e5 +209 1 3 34 -0.52428800000000000000e6 +209 1 4 11 -0.65536000000000000000e5 +209 1 8 23 0.65536000000000000000e5 +209 1 8 39 0.65536000000000000000e5 +209 1 9 40 0.65536000000000000000e5 +209 1 10 41 0.26214400000000000000e6 +209 1 11 42 -0.13107200000000000000e6 +209 1 12 27 0.26214400000000000000e6 +209 1 12 43 -0.52428800000000000000e6 +209 1 22 37 0.32768000000000000000e5 +209 1 23 38 0.98304000000000000000e5 +209 1 26 41 -0.65536000000000000000e5 +209 1 28 43 0.26214400000000000000e6 +209 1 32 47 0.39321600000000000000e6 +209 1 33 48 0.13107200000000000000e6 +209 2 1 7 -0.65536000000000000000e5 +209 2 2 8 0.65536000000000000000e5 +209 2 2 16 -0.32768000000000000000e5 +209 2 2 32 0.65536000000000000000e5 +209 2 3 9 -0.65536000000000000000e5 +209 2 6 20 -0.13107200000000000000e6 +209 2 7 21 0.26214400000000000000e6 +209 2 12 26 0.13107200000000000000e6 +209 2 16 30 0.65536000000000000000e5 +209 2 20 34 0.13107200000000000000e6 +209 3 1 14 -0.26214400000000000000e6 +209 3 1 30 -0.65536000000000000000e5 +209 3 1 38 -0.65536000000000000000e5 +209 3 2 7 -0.13107200000000000000e6 +209 3 2 15 0.13107200000000000000e6 +209 3 2 23 -0.32768000000000000000e5 +209 3 3 32 0.39321600000000000000e6 +209 3 4 9 -0.65536000000000000000e5 +209 3 7 12 0.26214400000000000000e6 +209 3 8 37 0.65536000000000000000e5 +209 3 10 23 -0.13107200000000000000e6 +209 3 13 42 0.26214400000000000000e6 +209 3 22 27 0.65536000000000000000e5 +209 3 22 35 0.26214400000000000000e6 +209 3 28 41 0.39321600000000000000e6 +209 3 29 42 0.13107200000000000000e6 +209 4 2 6 -0.65536000000000000000e5 +209 4 2 30 0.65536000000000000000e5 +209 4 3 31 -0.13107200000000000000e6 +209 4 6 6 -0.26214400000000000000e6 +209 4 6 18 -0.65536000000000000000e5 +209 4 6 34 0.13107200000000000000e6 +209 4 16 16 -0.65536000000000000000e5 +210 1 1 1 0.65536000000000000000e5 +210 1 1 8 0.65536000000000000000e5 +210 1 2 5 0.32768000000000000000e5 +210 1 2 9 -0.65536000000000000000e5 +210 1 2 25 -0.32768000000000000000e5 +210 1 7 22 -0.65536000000000000000e5 +210 1 8 23 0.65536000000000000000e5 +210 2 1 1 0.65536000000000000000e5 +210 3 1 22 0.32768000000000000000e5 +210 3 2 3 0.32768000000000000000e5 +210 4 1 1 -0.65536000000000000000e5 +210 4 2 2 0.65536000000000000000e5 +211 1 1 3 0.65536000000000000000e5 +211 1 1 8 0.13107200000000000000e6 +211 1 1 24 0.65536000000000000000e5 +211 1 1 32 0.26214400000000000000e6 +211 1 1 48 -0.65536000000000000000e5 +211 1 2 9 0.13107200000000000000e6 +211 1 2 33 -0.78643200000000000000e6 +211 1 2 49 -0.13107200000000000000e6 +211 1 3 34 0.10485760000000000000e7 +211 1 4 11 0.13107200000000000000e6 +211 1 8 23 -0.13107200000000000000e6 +211 1 8 39 -0.13107200000000000000e6 +211 1 9 40 -0.13107200000000000000e6 +211 1 10 41 -0.52428800000000000000e6 +211 1 11 42 0.26214400000000000000e6 +211 1 12 27 -0.52428800000000000000e6 +211 1 12 43 0.10485760000000000000e7 +211 1 23 38 -0.13107200000000000000e6 +211 1 26 41 0.13107200000000000000e6 +211 1 28 43 -0.52428800000000000000e6 +211 1 32 47 -0.78643200000000000000e6 +211 1 33 48 -0.26214400000000000000e6 +211 2 1 7 0.13107200000000000000e6 +211 2 2 8 -0.13107200000000000000e6 +211 2 2 16 0.65536000000000000000e5 +211 2 2 32 -0.13107200000000000000e6 +211 2 3 9 0.13107200000000000000e6 +211 2 6 20 0.26214400000000000000e6 +211 2 7 21 -0.52428800000000000000e6 +211 2 12 26 -0.26214400000000000000e6 +211 2 16 30 -0.13107200000000000000e6 +211 2 20 34 -0.26214400000000000000e6 +211 3 1 2 -0.65536000000000000000e5 +211 3 1 14 0.52428800000000000000e6 +211 3 1 30 0.13107200000000000000e6 +211 3 1 38 0.65536000000000000000e5 +211 3 2 7 0.26214400000000000000e6 +211 3 2 15 -0.26214400000000000000e6 +211 3 2 23 0.65536000000000000000e5 +211 3 3 32 -0.78643200000000000000e6 +211 3 4 9 0.13107200000000000000e6 +211 3 7 12 -0.52428800000000000000e6 +211 3 8 37 -0.13107200000000000000e6 +211 3 10 23 0.26214400000000000000e6 +211 3 13 42 -0.52428800000000000000e6 +211 3 22 35 -0.52428800000000000000e6 +211 3 28 41 -0.78643200000000000000e6 +211 3 29 42 -0.26214400000000000000e6 +211 4 2 6 0.13107200000000000000e6 +211 4 2 30 -0.13107200000000000000e6 +211 4 3 31 0.26214400000000000000e6 +211 4 6 6 0.52428800000000000000e6 +211 4 6 18 0.13107200000000000000e6 +211 4 6 34 -0.26214400000000000000e6 +212 1 1 4 0.65536000000000000000e5 +212 1 1 24 -0.65536000000000000000e5 +212 1 2 5 0.65536000000000000000e5 +212 1 2 9 -0.13107200000000000000e6 +212 1 2 25 -0.65536000000000000000e5 +212 1 8 23 0.13107200000000000000e6 +212 3 2 3 0.65536000000000000000e5 +212 4 2 2 0.13107200000000000000e6 +213 1 1 5 0.65536000000000000000e5 +213 1 1 48 -0.65536000000000000000e5 +213 3 1 38 -0.65536000000000000000e5 +213 3 2 3 -0.65536000000000000000e5 +213 3 2 23 -0.65536000000000000000e5 +214 1 1 6 0.65536000000000000000e5 +214 1 2 5 -0.65536000000000000000e5 +215 1 1 2 -0.32768000000000000000e5 +215 1 1 7 0.65536000000000000000e5 +215 1 1 8 0.13107200000000000000e6 +215 1 1 24 0.32768000000000000000e5 +215 1 1 32 0.13107200000000000000e6 +215 1 1 48 -0.32768000000000000000e5 +215 1 2 5 0.32768000000000000000e5 +215 1 2 25 -0.32768000000000000000e5 +215 1 2 33 -0.39321600000000000000e6 +215 1 2 49 -0.65536000000000000000e5 +215 1 3 34 0.52428800000000000000e6 +215 1 4 11 0.65536000000000000000e5 +215 1 7 22 -0.65536000000000000000e5 +215 1 8 39 -0.65536000000000000000e5 +215 1 9 40 -0.65536000000000000000e5 +215 1 10 41 -0.26214400000000000000e6 +215 1 11 42 0.13107200000000000000e6 +215 1 12 27 -0.26214400000000000000e6 +215 1 12 43 0.52428800000000000000e6 +215 1 23 38 -0.65536000000000000000e5 +215 1 26 41 0.65536000000000000000e5 +215 1 28 43 -0.26214400000000000000e6 +215 1 32 47 -0.39321600000000000000e6 +215 1 33 48 -0.13107200000000000000e6 +215 2 1 7 0.65536000000000000000e5 +215 2 2 8 -0.65536000000000000000e5 +215 2 2 16 0.32768000000000000000e5 +215 2 2 32 -0.65536000000000000000e5 +215 2 3 9 0.65536000000000000000e5 +215 2 6 20 0.13107200000000000000e6 +215 2 7 21 -0.26214400000000000000e6 +215 2 12 26 -0.13107200000000000000e6 +215 2 16 30 -0.65536000000000000000e5 +215 2 20 34 -0.13107200000000000000e6 +215 3 1 2 -0.32768000000000000000e5 +215 3 1 14 0.26214400000000000000e6 +215 3 1 22 0.32768000000000000000e5 +215 3 1 30 0.65536000000000000000e5 +215 3 1 38 0.32768000000000000000e5 +215 3 2 3 0.32768000000000000000e5 +215 3 2 7 0.13107200000000000000e6 +215 3 2 15 -0.13107200000000000000e6 +215 3 2 23 0.32768000000000000000e5 +215 3 3 32 -0.39321600000000000000e6 +215 3 4 9 0.65536000000000000000e5 +215 3 7 12 -0.26214400000000000000e6 +215 3 8 37 -0.65536000000000000000e5 +215 3 10 23 0.13107200000000000000e6 +215 3 13 42 -0.26214400000000000000e6 +215 3 22 35 -0.26214400000000000000e6 +215 3 28 41 -0.39321600000000000000e6 +215 3 29 42 -0.13107200000000000000e6 +215 4 1 1 -0.65536000000000000000e5 +215 4 2 2 0.65536000000000000000e5 +215 4 2 6 0.65536000000000000000e5 +215 4 2 30 -0.65536000000000000000e5 +215 4 3 31 0.13107200000000000000e6 +215 4 6 6 0.26214400000000000000e6 +215 4 6 18 0.65536000000000000000e5 +215 4 6 34 -0.13107200000000000000e6 +216 1 1 8 0.65536000000000000000e5 +216 1 1 9 0.65536000000000000000e5 +216 1 1 32 0.13107200000000000000e6 +216 1 1 48 -0.65536000000000000000e5 +216 1 2 9 0.65536000000000000000e5 +216 1 2 33 -0.39321600000000000000e6 +216 1 2 49 -0.65536000000000000000e5 +216 1 3 34 0.52428800000000000000e6 +216 1 4 11 0.65536000000000000000e5 +216 1 8 23 -0.65536000000000000000e5 +216 1 8 39 -0.65536000000000000000e5 +216 1 9 40 -0.65536000000000000000e5 +216 1 10 41 -0.26214400000000000000e6 +216 1 11 42 0.13107200000000000000e6 +216 1 12 27 -0.26214400000000000000e6 +216 1 12 43 0.52428800000000000000e6 +216 1 23 38 -0.65536000000000000000e5 +216 1 26 41 0.65536000000000000000e5 +216 1 28 43 -0.26214400000000000000e6 +216 1 32 47 -0.39321600000000000000e6 +216 1 33 48 -0.13107200000000000000e6 +216 2 1 7 0.65536000000000000000e5 +216 2 2 8 -0.65536000000000000000e5 +216 2 2 32 -0.65536000000000000000e5 +216 2 3 9 0.65536000000000000000e5 +216 2 6 20 0.13107200000000000000e6 +216 2 7 21 -0.26214400000000000000e6 +216 2 12 26 -0.13107200000000000000e6 +216 2 16 30 -0.65536000000000000000e5 +216 2 20 34 -0.13107200000000000000e6 +216 3 1 14 0.26214400000000000000e6 +216 3 1 30 0.65536000000000000000e5 +216 3 2 7 0.65536000000000000000e5 +216 3 2 15 -0.13107200000000000000e6 +216 3 3 32 -0.39321600000000000000e6 +216 3 4 9 0.65536000000000000000e5 +216 3 7 12 -0.26214400000000000000e6 +216 3 8 37 -0.65536000000000000000e5 +216 3 10 23 0.13107200000000000000e6 +216 3 13 42 -0.26214400000000000000e6 +216 3 22 35 -0.26214400000000000000e6 +216 3 28 41 -0.39321600000000000000e6 +216 3 29 42 -0.13107200000000000000e6 +216 4 2 6 0.65536000000000000000e5 +216 4 2 30 -0.65536000000000000000e5 +216 4 3 31 0.13107200000000000000e6 +216 4 6 6 0.26214400000000000000e6 +216 4 6 18 0.65536000000000000000e5 +216 4 6 34 -0.13107200000000000000e6 +217 1 1 10 0.65536000000000000000e5 +217 1 2 9 -0.65536000000000000000e5 +218 1 1 11 0.65536000000000000000e5 +218 1 1 48 0.32768000000000000000e5 +218 1 2 9 0.65536000000000000000e5 +218 1 2 33 0.13107200000000000000e6 +218 1 2 49 0.32768000000000000000e5 +218 1 3 34 -0.26214400000000000000e6 +218 1 4 11 -0.65536000000000000000e5 +218 1 8 39 0.65536000000000000000e5 +218 1 9 40 0.65536000000000000000e5 +218 1 10 41 0.13107200000000000000e6 +218 1 12 43 -0.26214400000000000000e6 +218 1 23 38 0.32768000000000000000e5 +218 1 26 41 -0.65536000000000000000e5 +218 1 28 43 0.13107200000000000000e6 +218 1 32 47 0.26214400000000000000e6 +218 2 2 8 0.65536000000000000000e5 +218 2 2 32 0.32768000000000000000e5 +218 2 3 9 -0.65536000000000000000e5 +218 2 7 21 0.13107200000000000000e6 +218 2 16 30 0.65536000000000000000e5 +218 2 20 34 0.13107200000000000000e6 +218 3 1 14 -0.13107200000000000000e6 +218 3 2 15 0.13107200000000000000e6 +218 3 3 32 0.26214400000000000000e6 +218 3 4 9 -0.65536000000000000000e5 +218 3 10 23 -0.65536000000000000000e5 +218 3 22 35 0.26214400000000000000e6 +218 3 28 41 0.26214400000000000000e6 +218 4 2 30 0.65536000000000000000e5 +218 4 6 34 0.13107200000000000000e6 +219 1 1 13 0.65536000000000000000e5 +219 1 1 32 0.65536000000000000000e5 +219 1 1 48 -0.32768000000000000000e5 +219 1 2 33 -0.19660800000000000000e6 +219 1 2 49 -0.32768000000000000000e5 +219 1 3 34 0.26214400000000000000e6 +219 1 4 11 0.32768000000000000000e5 +219 1 8 23 -0.32768000000000000000e5 +219 1 8 39 -0.32768000000000000000e5 +219 1 9 40 -0.32768000000000000000e5 +219 1 10 41 -0.13107200000000000000e6 +219 1 11 42 0.65536000000000000000e5 +219 1 12 27 -0.13107200000000000000e6 +219 1 12 43 0.26214400000000000000e6 +219 1 23 38 -0.32768000000000000000e5 +219 1 26 41 0.32768000000000000000e5 +219 1 28 43 -0.13107200000000000000e6 +219 1 32 47 -0.19660800000000000000e6 +219 1 33 48 -0.65536000000000000000e5 +219 2 2 8 -0.32768000000000000000e5 +219 2 2 32 -0.32768000000000000000e5 +219 2 3 9 0.32768000000000000000e5 +219 2 6 20 0.65536000000000000000e5 +219 2 7 21 -0.13107200000000000000e6 +219 2 12 26 -0.65536000000000000000e5 +219 2 16 30 -0.32768000000000000000e5 +219 2 20 34 -0.65536000000000000000e5 +219 3 1 14 0.13107200000000000000e6 +219 3 1 30 0.32768000000000000000e5 +219 3 2 7 0.32768000000000000000e5 +219 3 2 15 -0.65536000000000000000e5 +219 3 3 32 -0.19660800000000000000e6 +219 3 4 9 0.32768000000000000000e5 +219 3 7 12 -0.13107200000000000000e6 +219 3 8 37 -0.32768000000000000000e5 +219 3 10 23 0.65536000000000000000e5 +219 3 13 42 -0.13107200000000000000e6 +219 3 22 35 -0.13107200000000000000e6 +219 3 28 41 -0.19660800000000000000e6 +219 3 29 42 -0.65536000000000000000e5 +219 4 2 6 0.32768000000000000000e5 +219 4 2 30 -0.32768000000000000000e5 +219 4 3 31 0.65536000000000000000e5 +219 4 6 6 0.13107200000000000000e6 +219 4 6 18 0.32768000000000000000e5 +219 4 6 34 -0.65536000000000000000e5 +220 1 1 14 0.65536000000000000000e5 +220 1 1 32 -0.65536000000000000000e5 +220 1 1 48 0.32768000000000000000e5 +220 1 2 33 0.13107200000000000000e6 +220 1 2 49 0.32768000000000000000e5 +220 1 3 34 -0.13107200000000000000e6 +220 1 4 11 -0.32768000000000000000e5 +220 1 8 23 0.32768000000000000000e5 +220 1 8 39 0.32768000000000000000e5 +220 1 9 40 0.32768000000000000000e5 +220 1 10 41 0.65536000000000000000e5 +220 1 11 42 -0.65536000000000000000e5 +220 1 12 43 -0.26214400000000000000e6 +220 1 23 38 0.32768000000000000000e5 +220 1 26 41 -0.32768000000000000000e5 +220 1 28 43 0.13107200000000000000e6 +220 1 32 47 0.19660800000000000000e6 +220 1 33 48 0.65536000000000000000e5 +220 2 2 8 0.32768000000000000000e5 +220 2 2 32 0.32768000000000000000e5 +220 2 3 9 -0.32768000000000000000e5 +220 2 7 21 0.65536000000000000000e5 +220 2 12 26 0.65536000000000000000e5 +220 2 16 30 0.32768000000000000000e5 +220 2 20 34 0.65536000000000000000e5 +220 3 1 14 -0.65536000000000000000e5 +220 3 1 30 -0.32768000000000000000e5 +220 3 2 7 -0.32768000000000000000e5 +220 3 2 15 0.65536000000000000000e5 +220 3 3 32 0.13107200000000000000e6 +220 3 4 9 -0.32768000000000000000e5 +220 3 8 37 0.32768000000000000000e5 +220 3 10 23 -0.65536000000000000000e5 +220 3 13 42 0.13107200000000000000e6 +220 3 22 35 0.13107200000000000000e6 +220 3 28 41 0.19660800000000000000e6 +220 3 29 42 0.65536000000000000000e5 +220 4 2 6 -0.32768000000000000000e5 +220 4 2 30 0.32768000000000000000e5 +220 4 3 31 -0.65536000000000000000e5 +220 4 6 18 -0.32768000000000000000e5 +220 4 6 34 0.65536000000000000000e5 +221 1 1 15 0.65536000000000000000e5 +221 1 2 33 0.65536000000000000000e5 +221 1 3 34 -0.13107200000000000000e6 +221 1 10 41 0.65536000000000000000e5 +221 2 7 21 0.65536000000000000000e5 +221 3 1 14 -0.65536000000000000000e5 +221 3 3 32 0.65536000000000000000e5 +222 1 1 17 0.65536000000000000000e5 +222 1 12 27 -0.65536000000000000000e5 +222 3 7 12 -0.65536000000000000000e5 +223 1 1 18 0.65536000000000000000e5 +223 1 2 17 -0.65536000000000000000e5 +224 1 1 19 0.65536000000000000000e5 +224 1 7 16 -0.65536000000000000000e5 +225 1 1 20 0.65536000000000000000e5 +225 1 2 17 -0.32768000000000000000e5 +225 1 4 35 -0.32768000000000000000e5 +225 1 12 43 -0.32768000000000000000e5 +225 1 14 45 -0.65536000000000000000e5 +225 1 16 23 0.32768000000000000000e5 +225 1 16 31 -0.13107200000000000000e6 +225 1 17 48 0.32768000000000000000e5 +225 1 18 49 0.32768000000000000000e5 +225 1 20 27 0.13107200000000000000e6 +225 2 7 13 0.65536000000000000000e5 +225 2 9 23 -0.32768000000000000000e5 +225 2 10 24 -0.65536000000000000000e5 +225 2 14 28 0.32768000000000000000e5 +225 3 3 16 -0.32768000000000000000e5 +225 3 5 34 -0.32768000000000000000e5 +225 3 7 12 -0.32768000000000000000e5 +225 3 13 42 0.32768000000000000000e5 +225 3 14 27 -0.32768000000000000000e5 +225 3 14 43 0.32768000000000000000e5 +225 4 1 13 -0.32768000000000000000e5 +225 4 10 10 -0.13107200000000000000e6 +226 1 1 21 0.65536000000000000000e5 +226 1 2 17 -0.32768000000000000000e5 +226 1 3 18 -0.16384000000000000000e5 +226 1 3 34 -0.16384000000000000000e5 +226 1 4 35 -0.16384000000000000000e5 +226 1 7 16 -0.32768000000000000000e5 +226 1 12 43 -0.16384000000000000000e5 +226 1 14 45 -0.32768000000000000000e5 +226 1 16 23 0.16384000000000000000e5 +226 1 16 31 -0.65536000000000000000e5 +226 1 17 48 0.16384000000000000000e5 +226 1 18 49 0.16384000000000000000e5 +226 1 20 27 0.65536000000000000000e5 +226 2 1 15 -0.32768000000000000000e5 +226 2 6 12 -0.16384000000000000000e5 +226 2 7 13 0.32768000000000000000e5 +226 2 9 23 -0.16384000000000000000e5 +226 2 10 24 -0.32768000000000000000e5 +226 2 14 28 0.16384000000000000000e5 +226 3 3 16 -0.32768000000000000000e5 +226 3 5 34 -0.16384000000000000000e5 +226 3 7 12 -0.16384000000000000000e5 +226 3 13 42 0.16384000000000000000e5 +226 3 14 27 -0.16384000000000000000e5 +226 3 14 43 0.16384000000000000000e5 +226 4 1 13 -0.16384000000000000000e5 +226 4 10 10 -0.65536000000000000000e5 +227 1 1 2 -0.65536000000000000000e5 +227 1 1 8 0.13107200000000000000e6 +227 1 1 22 0.65536000000000000000e5 +227 1 2 5 0.65536000000000000000e5 +227 1 2 9 -0.13107200000000000000e6 +227 1 2 25 -0.65536000000000000000e5 +227 1 7 22 -0.13107200000000000000e6 +227 1 8 23 0.13107200000000000000e6 +227 3 1 2 -0.65536000000000000000e5 +227 3 2 3 0.65536000000000000000e5 +227 4 1 1 -0.13107200000000000000e6 +227 4 2 2 0.13107200000000000000e6 +228 1 1 8 0.13107200000000000000e6 +228 1 1 23 0.65536000000000000000e5 +228 1 1 24 0.65536000000000000000e5 +228 1 1 32 0.26214400000000000000e6 +228 1 1 48 -0.65536000000000000000e5 +228 1 2 9 0.13107200000000000000e6 +228 1 2 33 -0.78643200000000000000e6 +228 1 2 49 -0.13107200000000000000e6 +228 1 3 34 0.10485760000000000000e7 +228 1 4 11 0.13107200000000000000e6 +228 1 8 23 -0.13107200000000000000e6 +228 1 8 39 -0.13107200000000000000e6 +228 1 9 40 -0.13107200000000000000e6 +228 1 10 41 -0.52428800000000000000e6 +228 1 11 42 0.26214400000000000000e6 +228 1 12 27 -0.52428800000000000000e6 +228 1 12 43 0.10485760000000000000e7 +228 1 23 38 -0.13107200000000000000e6 +228 1 26 41 0.13107200000000000000e6 +228 1 28 43 -0.52428800000000000000e6 +228 1 32 47 -0.78643200000000000000e6 +228 1 33 48 -0.26214400000000000000e6 +228 2 1 7 0.13107200000000000000e6 +228 2 2 8 -0.13107200000000000000e6 +228 2 2 16 0.65536000000000000000e5 +228 2 2 32 -0.13107200000000000000e6 +228 2 3 9 0.13107200000000000000e6 +228 2 6 20 0.26214400000000000000e6 +228 2 7 21 -0.52428800000000000000e6 +228 2 12 26 -0.26214400000000000000e6 +228 2 16 30 -0.13107200000000000000e6 +228 2 20 34 -0.26214400000000000000e6 +228 3 1 14 0.52428800000000000000e6 +228 3 1 30 0.13107200000000000000e6 +228 3 1 38 0.65536000000000000000e5 +228 3 2 7 0.26214400000000000000e6 +228 3 2 15 -0.26214400000000000000e6 +228 3 2 23 0.65536000000000000000e5 +228 3 3 32 -0.78643200000000000000e6 +228 3 4 9 0.13107200000000000000e6 +228 3 7 12 -0.52428800000000000000e6 +228 3 8 37 -0.13107200000000000000e6 +228 3 10 23 0.26214400000000000000e6 +228 3 13 42 -0.52428800000000000000e6 +228 3 22 35 -0.52428800000000000000e6 +228 3 28 41 -0.78643200000000000000e6 +228 3 29 42 -0.26214400000000000000e6 +228 4 2 6 0.13107200000000000000e6 +228 4 2 30 -0.13107200000000000000e6 +228 4 3 31 0.26214400000000000000e6 +228 4 6 6 0.52428800000000000000e6 +228 4 6 18 0.13107200000000000000e6 +228 4 6 34 -0.26214400000000000000e6 +229 1 1 25 0.65536000000000000000e5 +229 1 1 48 -0.65536000000000000000e5 +229 3 1 38 -0.65536000000000000000e5 +229 3 2 23 -0.65536000000000000000e5 +230 1 1 26 0.65536000000000000000e5 +230 1 2 25 -0.65536000000000000000e5 +231 1 1 27 0.65536000000000000000e5 +231 1 7 22 -0.65536000000000000000e5 +232 1 1 8 0.65536000000000000000e5 +232 1 1 28 0.65536000000000000000e5 +232 1 1 32 0.13107200000000000000e6 +232 1 1 48 -0.65536000000000000000e5 +232 1 2 9 0.65536000000000000000e5 +232 1 2 33 -0.39321600000000000000e6 +232 1 2 49 -0.65536000000000000000e5 +232 1 3 34 0.52428800000000000000e6 +232 1 4 11 0.65536000000000000000e5 +232 1 8 23 -0.65536000000000000000e5 +232 1 8 39 -0.65536000000000000000e5 +232 1 9 40 -0.65536000000000000000e5 +232 1 10 41 -0.26214400000000000000e6 +232 1 11 42 0.13107200000000000000e6 +232 1 12 27 -0.26214400000000000000e6 +232 1 12 43 0.52428800000000000000e6 +232 1 23 38 -0.65536000000000000000e5 +232 1 26 41 0.65536000000000000000e5 +232 1 28 43 -0.26214400000000000000e6 +232 1 32 47 -0.39321600000000000000e6 +232 1 33 48 -0.13107200000000000000e6 +232 2 1 7 0.65536000000000000000e5 +232 2 2 8 -0.65536000000000000000e5 +232 2 2 32 -0.65536000000000000000e5 +232 2 3 9 0.65536000000000000000e5 +232 2 6 20 0.13107200000000000000e6 +232 2 7 21 -0.26214400000000000000e6 +232 2 12 26 -0.13107200000000000000e6 +232 2 16 30 -0.65536000000000000000e5 +232 2 20 34 -0.13107200000000000000e6 +232 3 1 14 0.26214400000000000000e6 +232 3 1 30 0.65536000000000000000e5 +232 3 2 7 0.13107200000000000000e6 +232 3 2 15 -0.13107200000000000000e6 +232 3 3 32 -0.39321600000000000000e6 +232 3 4 9 0.65536000000000000000e5 +232 3 7 12 -0.26214400000000000000e6 +232 3 8 37 -0.65536000000000000000e5 +232 3 10 23 0.13107200000000000000e6 +232 3 13 42 -0.26214400000000000000e6 +232 3 22 35 -0.26214400000000000000e6 +232 3 28 41 -0.39321600000000000000e6 +232 3 29 42 -0.13107200000000000000e6 +232 4 2 6 0.65536000000000000000e5 +232 4 2 30 -0.65536000000000000000e5 +232 4 3 31 0.13107200000000000000e6 +232 4 6 6 0.26214400000000000000e6 +232 4 6 18 0.65536000000000000000e5 +232 4 6 34 -0.13107200000000000000e6 +233 1 1 29 0.65536000000000000000e5 +233 1 8 23 -0.65536000000000000000e5 +234 1 1 30 0.65536000000000000000e5 +234 1 1 48 -0.32768000000000000000e5 +234 1 2 33 -0.13107200000000000000e6 +234 1 2 49 -0.32768000000000000000e5 +234 1 11 42 0.13107200000000000000e6 +234 1 12 43 0.26214400000000000000e6 +234 1 23 38 -0.32768000000000000000e5 +234 1 28 43 -0.13107200000000000000e6 +234 1 32 47 -0.13107200000000000000e6 +234 1 33 48 -0.13107200000000000000e6 +234 2 2 32 -0.32768000000000000000e5 +234 2 12 26 -0.13107200000000000000e6 +234 3 1 30 0.65536000000000000000e5 +234 3 8 37 -0.65536000000000000000e5 +234 3 10 23 0.65536000000000000000e5 +234 3 13 42 -0.26214400000000000000e6 +234 3 28 41 -0.13107200000000000000e6 +234 3 29 42 -0.13107200000000000000e6 +234 4 3 31 0.13107200000000000000e6 +234 4 6 18 0.65536000000000000000e5 +235 1 1 31 0.65536000000000000000e5 +235 1 1 32 0.65536000000000000000e5 +235 1 2 33 -0.65536000000000000000e5 +235 1 3 34 0.13107200000000000000e6 +235 1 10 41 -0.65536000000000000000e5 +235 1 12 27 -0.13107200000000000000e6 +235 2 6 20 0.65536000000000000000e5 +235 2 7 21 -0.65536000000000000000e5 +235 3 3 32 -0.65536000000000000000e5 +236 1 1 33 0.65536000000000000000e5 +236 1 2 33 0.65536000000000000000e5 +236 1 3 34 -0.13107200000000000000e6 +236 1 10 41 0.65536000000000000000e5 +236 2 7 21 0.65536000000000000000e5 +236 3 3 32 0.65536000000000000000e5 +237 1 1 34 0.65536000000000000000e5 +237 1 12 27 -0.65536000000000000000e5 +238 1 1 35 0.65536000000000000000e5 +238 1 16 23 -0.65536000000000000000e5 +239 1 1 36 0.65536000000000000000e5 +239 1 4 35 -0.32768000000000000000e5 +239 1 12 43 -0.32768000000000000000e5 +239 1 14 45 -0.65536000000000000000e5 +239 1 16 31 -0.13107200000000000000e6 +239 1 17 48 0.32768000000000000000e5 +239 1 18 49 0.32768000000000000000e5 +239 1 20 27 0.13107200000000000000e6 +239 2 7 13 0.65536000000000000000e5 +239 2 9 23 -0.32768000000000000000e5 +239 2 10 24 -0.65536000000000000000e5 +239 2 14 28 0.32768000000000000000e5 +239 3 5 34 -0.32768000000000000000e5 +239 3 13 42 0.32768000000000000000e5 +239 3 14 27 -0.32768000000000000000e5 +239 3 14 43 0.32768000000000000000e5 +239 4 10 10 -0.13107200000000000000e6 +240 1 1 8 0.13107200000000000000e6 +240 1 1 24 0.65536000000000000000e5 +240 1 1 32 0.26214400000000000000e6 +240 1 1 37 0.65536000000000000000e5 +240 1 1 48 -0.65536000000000000000e5 +240 1 2 9 0.13107200000000000000e6 +240 1 2 33 -0.78643200000000000000e6 +240 1 2 49 -0.13107200000000000000e6 +240 1 3 34 0.10485760000000000000e7 +240 1 4 11 0.13107200000000000000e6 +240 1 8 23 -0.13107200000000000000e6 +240 1 8 39 -0.13107200000000000000e6 +240 1 9 40 -0.13107200000000000000e6 +240 1 10 41 -0.52428800000000000000e6 +240 1 11 42 0.26214400000000000000e6 +240 1 12 27 -0.52428800000000000000e6 +240 1 12 43 0.10485760000000000000e7 +240 1 23 38 -0.13107200000000000000e6 +240 1 26 41 0.13107200000000000000e6 +240 1 28 43 -0.52428800000000000000e6 +240 1 32 47 -0.78643200000000000000e6 +240 1 33 48 -0.26214400000000000000e6 +240 2 1 7 0.13107200000000000000e6 +240 2 2 8 -0.13107200000000000000e6 +240 2 2 16 0.65536000000000000000e5 +240 2 2 32 -0.13107200000000000000e6 +240 2 3 9 0.13107200000000000000e6 +240 2 6 20 0.26214400000000000000e6 +240 2 7 21 -0.52428800000000000000e6 +240 2 12 26 -0.26214400000000000000e6 +240 2 16 30 -0.13107200000000000000e6 +240 2 20 34 -0.26214400000000000000e6 +240 3 1 14 0.52428800000000000000e6 +240 3 1 22 0.65536000000000000000e5 +240 3 1 30 0.13107200000000000000e6 +240 3 1 38 0.65536000000000000000e5 +240 3 2 7 0.26214400000000000000e6 +240 3 2 15 -0.26214400000000000000e6 +240 3 2 23 0.65536000000000000000e5 +240 3 3 32 -0.78643200000000000000e6 +240 3 4 9 0.13107200000000000000e6 +240 3 7 12 -0.52428800000000000000e6 +240 3 8 37 -0.13107200000000000000e6 +240 3 10 23 0.26214400000000000000e6 +240 3 13 42 -0.52428800000000000000e6 +240 3 22 35 -0.52428800000000000000e6 +240 3 28 41 -0.78643200000000000000e6 +240 3 29 42 -0.26214400000000000000e6 +240 4 2 6 0.13107200000000000000e6 +240 4 2 30 -0.13107200000000000000e6 +240 4 3 31 0.26214400000000000000e6 +240 4 6 6 0.52428800000000000000e6 +240 4 6 18 0.13107200000000000000e6 +240 4 6 34 -0.26214400000000000000e6 +241 1 1 38 0.65536000000000000000e5 +241 1 1 40 0.65536000000000000000e5 +241 1 22 37 -0.65536000000000000000e5 +241 1 23 38 -0.65536000000000000000e5 +241 3 1 38 0.65536000000000000000e5 +241 3 22 27 -0.13107200000000000000e6 +241 4 16 16 0.13107200000000000000e6 +242 1 1 39 0.65536000000000000000e5 +242 1 1 48 -0.65536000000000000000e5 +242 3 1 38 -0.65536000000000000000e5 +243 1 1 8 0.65536000000000000000e5 +243 1 1 24 0.32768000000000000000e5 +243 1 1 32 0.13107200000000000000e6 +243 1 1 40 0.32768000000000000000e5 +243 1 1 41 0.65536000000000000000e5 +243 1 1 48 -0.65536000000000000000e5 +243 1 2 9 0.65536000000000000000e5 +243 1 2 33 -0.39321600000000000000e6 +243 1 2 49 -0.65536000000000000000e5 +243 1 3 34 0.52428800000000000000e6 +243 1 4 11 0.65536000000000000000e5 +243 1 8 23 -0.65536000000000000000e5 +243 1 8 39 -0.65536000000000000000e5 +243 1 9 40 -0.65536000000000000000e5 +243 1 10 41 -0.26214400000000000000e6 +243 1 11 42 0.13107200000000000000e6 +243 1 12 27 -0.26214400000000000000e6 +243 1 12 43 0.52428800000000000000e6 +243 1 22 37 -0.32768000000000000000e5 +243 1 23 38 -0.98304000000000000000e5 +243 1 26 41 0.65536000000000000000e5 +243 1 28 43 -0.26214400000000000000e6 +243 1 32 47 -0.39321600000000000000e6 +243 1 33 48 -0.13107200000000000000e6 +243 2 1 7 0.65536000000000000000e5 +243 2 2 8 -0.65536000000000000000e5 +243 2 2 16 0.32768000000000000000e5 +243 2 2 32 -0.65536000000000000000e5 +243 2 3 9 0.65536000000000000000e5 +243 2 6 20 0.13107200000000000000e6 +243 2 7 21 -0.26214400000000000000e6 +243 2 12 26 -0.13107200000000000000e6 +243 2 16 16 -0.65536000000000000000e5 +243 2 16 30 -0.65536000000000000000e5 +243 2 20 34 -0.13107200000000000000e6 +243 3 1 14 0.26214400000000000000e6 +243 3 1 22 0.32768000000000000000e5 +243 3 1 30 0.65536000000000000000e5 +243 3 1 38 0.32768000000000000000e5 +243 3 2 7 0.13107200000000000000e6 +243 3 2 15 -0.13107200000000000000e6 +243 3 2 23 0.32768000000000000000e5 +243 3 3 32 -0.39321600000000000000e6 +243 3 4 9 0.65536000000000000000e5 +243 3 7 12 -0.26214400000000000000e6 +243 3 8 37 -0.65536000000000000000e5 +243 3 10 23 0.13107200000000000000e6 +243 3 13 42 -0.26214400000000000000e6 +243 3 22 27 -0.65536000000000000000e5 +243 3 22 35 -0.26214400000000000000e6 +243 3 28 41 -0.39321600000000000000e6 +243 3 29 42 -0.13107200000000000000e6 +243 4 2 6 0.65536000000000000000e5 +243 4 2 30 -0.65536000000000000000e5 +243 4 3 31 0.13107200000000000000e6 +243 4 6 6 0.26214400000000000000e6 +243 4 6 18 0.65536000000000000000e5 +243 4 6 34 -0.13107200000000000000e6 +243 4 16 16 0.65536000000000000000e5 +244 1 1 42 0.65536000000000000000e5 +244 1 7 38 -0.65536000000000000000e5 +245 1 1 43 0.65536000000000000000e5 +245 1 1 48 -0.32768000000000000000e5 +245 1 2 49 -0.32768000000000000000e5 +245 1 23 38 -0.32768000000000000000e5 +245 2 2 32 -0.32768000000000000000e5 +245 3 8 37 -0.65536000000000000000e5 +246 1 1 44 0.65536000000000000000e5 +246 1 2 33 -0.65536000000000000000e5 +246 1 3 34 0.13107200000000000000e6 +246 1 10 41 -0.65536000000000000000e5 +246 1 11 42 0.65536000000000000000e5 +246 1 12 43 0.13107200000000000000e6 +246 1 16 23 -0.13107200000000000000e6 +246 1 28 43 -0.65536000000000000000e5 +246 1 32 47 -0.65536000000000000000e5 +246 1 33 48 -0.65536000000000000000e5 +246 2 1 31 0.65536000000000000000e5 +246 2 7 21 -0.65536000000000000000e5 +246 2 12 26 -0.65536000000000000000e5 +246 3 1 34 0.13107200000000000000e6 +246 3 2 31 -0.65536000000000000000e5 +246 3 3 32 -0.65536000000000000000e5 +246 3 13 42 -0.13107200000000000000e6 +246 3 28 41 -0.65536000000000000000e5 +246 3 29 42 -0.65536000000000000000e5 +246 4 3 31 0.65536000000000000000e5 +247 1 1 45 0.65536000000000000000e5 +247 1 2 33 0.65536000000000000000e5 +247 1 3 34 -0.13107200000000000000e6 +247 1 10 41 0.65536000000000000000e5 +247 2 7 21 0.65536000000000000000e5 +247 3 2 31 0.65536000000000000000e5 +247 3 3 32 0.65536000000000000000e5 +248 1 1 46 0.65536000000000000000e5 +248 1 16 23 -0.65536000000000000000e5 +248 3 1 34 0.65536000000000000000e5 +249 1 1 47 0.65536000000000000000e5 +249 1 22 37 -0.65536000000000000000e5 +250 1 1 49 0.65536000000000000000e5 +250 1 23 38 -0.65536000000000000000e5 +251 1 1 50 0.65536000000000000000e5 +251 1 7 38 -0.65536000000000000000e5 +251 3 22 27 0.65536000000000000000e5 +252 1 1 48 -0.32768000000000000000e5 +252 1 1 51 0.65536000000000000000e5 +252 1 2 49 -0.32768000000000000000e5 +252 1 23 38 -0.32768000000000000000e5 +252 2 2 32 -0.32768000000000000000e5 +253 1 1 52 0.65536000000000000000e5 +253 1 2 33 0.65536000000000000000e5 +253 1 3 34 -0.13107200000000000000e6 +253 1 9 40 -0.32768000000000000000e5 +253 1 10 41 0.13107200000000000000e6 +253 1 26 41 0.32768000000000000000e5 +253 1 32 47 -0.65536000000000000000e5 +253 2 7 21 0.65536000000000000000e5 +253 3 2 31 0.65536000000000000000e5 +253 3 3 32 0.65536000000000000000e5 +253 3 8 37 0.32768000000000000000e5 +253 3 9 38 -0.32768000000000000000e5 +253 3 22 27 0.32768000000000000000e5 +253 3 28 41 -0.65536000000000000000e5 +253 4 1 29 0.32768000000000000000e5 +253 4 2 30 -0.32768000000000000000e5 +254 1 1 48 -0.65536000000000000000e5 +254 1 1 53 0.65536000000000000000e5 +254 1 6 53 -0.65536000000000000000e5 +254 1 25 40 0.65536000000000000000e5 +254 2 1 35 0.65536000000000000000e5 +254 2 2 32 -0.65536000000000000000e5 +254 2 4 34 -0.13107200000000000000e6 +254 2 16 30 -0.13107200000000000000e6 +254 2 16 34 0.13107200000000000000e6 +254 2 21 35 0.13107200000000000000e6 +254 3 2 47 -0.65536000000000000000e5 +254 3 5 50 -0.13107200000000000000e6 +254 3 7 52 0.52428800000000000000e6 +254 3 24 37 -0.13107200000000000000e6 +254 3 27 40 -0.13107200000000000000e6 +254 3 28 41 -0.52428800000000000000e6 +254 4 4 32 0.65536000000000000000e5 +254 4 6 34 -0.26214400000000000000e6 +254 4 7 35 0.13107200000000000000e6 +254 4 16 28 -0.65536000000000000000e5 +254 4 17 29 0.13107200000000000000e6 +255 1 1 54 0.65536000000000000000e5 +255 1 23 38 -0.65536000000000000000e5 +255 3 2 47 0.65536000000000000000e5 +256 1 1 48 -0.32768000000000000000e5 +256 1 1 55 0.65536000000000000000e5 +256 1 2 49 -0.32768000000000000000e5 +256 1 6 53 -0.32768000000000000000e5 +256 1 23 38 -0.32768000000000000000e5 +256 1 25 40 0.32768000000000000000e5 +256 2 2 32 -0.32768000000000000000e5 +256 2 4 34 -0.65536000000000000000e5 +256 2 16 30 -0.65536000000000000000e5 +256 2 16 34 0.65536000000000000000e5 +256 2 21 35 0.65536000000000000000e5 +256 3 5 50 -0.65536000000000000000e5 +256 3 7 52 0.26214400000000000000e6 +256 3 24 37 -0.32768000000000000000e5 +256 3 27 40 -0.65536000000000000000e5 +256 3 28 41 -0.26214400000000000000e6 +256 4 4 32 0.32768000000000000000e5 +256 4 6 34 -0.13107200000000000000e6 +256 4 7 35 0.65536000000000000000e5 +256 4 16 28 -0.32768000000000000000e5 +256 4 17 29 0.65536000000000000000e5 +257 1 1 56 0.65536000000000000000e5 +257 1 22 53 -0.65536000000000000000e5 +258 1 1 8 0.65536000000000000000e5 +258 1 1 24 0.32768000000000000000e5 +258 1 1 32 0.13107200000000000000e6 +258 1 1 48 -0.32768000000000000000e5 +258 1 2 2 0.65536000000000000000e5 +258 1 2 9 0.65536000000000000000e5 +258 1 2 33 -0.39321600000000000000e6 +258 1 2 49 -0.65536000000000000000e5 +258 1 3 34 0.52428800000000000000e6 +258 1 4 11 0.65536000000000000000e5 +258 1 8 23 -0.65536000000000000000e5 +258 1 8 39 -0.65536000000000000000e5 +258 1 9 40 -0.65536000000000000000e5 +258 1 10 41 -0.26214400000000000000e6 +258 1 11 42 0.13107200000000000000e6 +258 1 12 27 -0.26214400000000000000e6 +258 1 12 43 0.52428800000000000000e6 +258 1 23 38 -0.65536000000000000000e5 +258 1 26 41 0.65536000000000000000e5 +258 1 28 43 -0.26214400000000000000e6 +258 1 32 47 -0.39321600000000000000e6 +258 1 33 48 -0.13107200000000000000e6 +258 2 1 7 0.65536000000000000000e5 +258 2 2 8 -0.65536000000000000000e5 +258 2 2 16 0.32768000000000000000e5 +258 2 2 32 -0.65536000000000000000e5 +258 2 3 9 0.65536000000000000000e5 +258 2 6 20 0.13107200000000000000e6 +258 2 7 21 -0.26214400000000000000e6 +258 2 12 26 -0.13107200000000000000e6 +258 2 16 30 -0.65536000000000000000e5 +258 2 20 34 -0.13107200000000000000e6 +258 3 1 2 -0.32768000000000000000e5 +258 3 1 14 0.26214400000000000000e6 +258 3 1 30 0.65536000000000000000e5 +258 3 1 38 0.32768000000000000000e5 +258 3 2 7 0.13107200000000000000e6 +258 3 2 15 -0.13107200000000000000e6 +258 3 2 23 0.32768000000000000000e5 +258 3 3 32 -0.39321600000000000000e6 +258 3 4 9 0.65536000000000000000e5 +258 3 7 12 -0.26214400000000000000e6 +258 3 8 37 -0.65536000000000000000e5 +258 3 10 23 0.13107200000000000000e6 +258 3 13 42 -0.26214400000000000000e6 +258 3 22 35 -0.26214400000000000000e6 +258 3 28 41 -0.39321600000000000000e6 +258 3 29 42 -0.13107200000000000000e6 +258 4 2 6 0.65536000000000000000e5 +258 4 2 30 -0.65536000000000000000e5 +258 4 3 31 0.13107200000000000000e6 +258 4 6 6 0.26214400000000000000e6 +258 4 6 18 0.65536000000000000000e5 +258 4 6 34 -0.13107200000000000000e6 +259 1 1 24 -0.65536000000000000000e5 +259 1 2 3 0.65536000000000000000e5 +259 1 2 5 0.65536000000000000000e5 +259 1 2 9 -0.13107200000000000000e6 +259 1 2 25 -0.65536000000000000000e5 +259 1 8 23 0.13107200000000000000e6 +259 3 2 3 0.65536000000000000000e5 +259 4 2 2 0.13107200000000000000e6 +260 1 1 48 -0.65536000000000000000e5 +260 1 2 4 0.65536000000000000000e5 +260 3 1 38 -0.65536000000000000000e5 +260 3 2 3 -0.65536000000000000000e5 +260 3 2 23 -0.65536000000000000000e5 +261 1 2 6 0.65536000000000000000e5 +261 1 2 25 0.65536000000000000000e5 +261 1 2 33 -0.26214400000000000000e6 +261 1 2 49 -0.65536000000000000000e5 +261 1 11 42 0.26214400000000000000e6 +261 1 12 43 0.52428800000000000000e6 +261 1 23 38 -0.65536000000000000000e5 +261 1 28 43 -0.26214400000000000000e6 +261 1 32 47 -0.26214400000000000000e6 +261 1 33 48 -0.26214400000000000000e6 +261 2 2 32 -0.65536000000000000000e5 +261 2 3 17 0.65536000000000000000e5 +261 2 12 26 -0.26214400000000000000e6 +261 3 1 6 -0.65536000000000000000e5 +261 3 1 30 0.13107200000000000000e6 +261 3 1 38 0.65536000000000000000e5 +261 3 2 23 0.65536000000000000000e5 +261 3 8 37 -0.13107200000000000000e6 +261 3 10 23 0.13107200000000000000e6 +261 3 13 42 -0.52428800000000000000e6 +261 3 28 41 -0.26214400000000000000e6 +261 3 29 42 -0.26214400000000000000e6 +261 4 3 31 0.26214400000000000000e6 +261 4 6 18 0.13107200000000000000e6 +262 1 1 8 -0.65536000000000000000e5 +262 1 2 7 0.65536000000000000000e5 +263 1 1 8 0.65536000000000000000e5 +263 1 1 32 0.13107200000000000000e6 +263 1 1 48 -0.65536000000000000000e5 +263 1 2 8 0.65536000000000000000e5 +263 1 2 9 0.65536000000000000000e5 +263 1 2 33 -0.39321600000000000000e6 +263 1 2 49 -0.65536000000000000000e5 +263 1 3 34 0.52428800000000000000e6 +263 1 4 11 0.65536000000000000000e5 +263 1 8 23 -0.65536000000000000000e5 +263 1 8 39 -0.65536000000000000000e5 +263 1 9 40 -0.65536000000000000000e5 +263 1 10 41 -0.26214400000000000000e6 +263 1 11 42 0.13107200000000000000e6 +263 1 12 27 -0.26214400000000000000e6 +263 1 12 43 0.52428800000000000000e6 +263 1 23 38 -0.65536000000000000000e5 +263 1 26 41 0.65536000000000000000e5 +263 1 28 43 -0.26214400000000000000e6 +263 1 32 47 -0.39321600000000000000e6 +263 1 33 48 -0.13107200000000000000e6 +263 2 1 7 0.65536000000000000000e5 +263 2 2 8 -0.65536000000000000000e5 +263 2 2 32 -0.65536000000000000000e5 +263 2 3 9 0.65536000000000000000e5 +263 2 6 20 0.13107200000000000000e6 +263 2 7 21 -0.26214400000000000000e6 +263 2 12 26 -0.13107200000000000000e6 +263 2 16 30 -0.65536000000000000000e5 +263 2 20 34 -0.13107200000000000000e6 +263 3 1 14 0.26214400000000000000e6 +263 3 1 30 0.65536000000000000000e5 +263 3 2 7 0.65536000000000000000e5 +263 3 2 15 -0.13107200000000000000e6 +263 3 3 32 -0.39321600000000000000e6 +263 3 4 9 0.65536000000000000000e5 +263 3 7 12 -0.26214400000000000000e6 +263 3 8 37 -0.65536000000000000000e5 +263 3 10 23 0.13107200000000000000e6 +263 3 13 42 -0.26214400000000000000e6 +263 3 22 35 -0.26214400000000000000e6 +263 3 28 41 -0.39321600000000000000e6 +263 3 29 42 -0.13107200000000000000e6 +263 4 2 6 0.65536000000000000000e5 +263 4 2 30 -0.65536000000000000000e5 +263 4 3 31 0.13107200000000000000e6 +263 4 6 6 0.26214400000000000000e6 +263 4 6 18 0.65536000000000000000e5 +263 4 6 34 -0.13107200000000000000e6 +264 1 1 48 0.32768000000000000000e5 +264 1 2 9 0.65536000000000000000e5 +264 1 2 10 0.65536000000000000000e5 +264 1 2 33 0.13107200000000000000e6 +264 1 2 49 0.32768000000000000000e5 +264 1 3 34 -0.26214400000000000000e6 +264 1 4 11 -0.65536000000000000000e5 +264 1 8 39 0.65536000000000000000e5 +264 1 9 40 0.65536000000000000000e5 +264 1 10 41 0.13107200000000000000e6 +264 1 12 43 -0.26214400000000000000e6 +264 1 23 38 0.32768000000000000000e5 +264 1 26 41 -0.65536000000000000000e5 +264 1 28 43 0.13107200000000000000e6 +264 1 32 47 0.26214400000000000000e6 +264 2 2 8 0.65536000000000000000e5 +264 2 2 32 0.32768000000000000000e5 +264 2 3 9 -0.65536000000000000000e5 +264 2 7 21 0.13107200000000000000e6 +264 2 16 30 0.65536000000000000000e5 +264 2 20 34 0.13107200000000000000e6 +264 3 1 14 -0.13107200000000000000e6 +264 3 2 15 0.13107200000000000000e6 +264 3 3 32 0.26214400000000000000e6 +264 3 4 9 -0.65536000000000000000e5 +264 3 10 23 -0.65536000000000000000e5 +264 3 22 35 0.26214400000000000000e6 +264 3 28 41 0.26214400000000000000e6 +264 4 2 30 0.65536000000000000000e5 +264 4 6 34 0.13107200000000000000e6 +265 1 1 48 -0.32768000000000000000e5 +265 1 2 11 0.65536000000000000000e5 +265 1 2 49 -0.32768000000000000000e5 +265 1 4 11 0.65536000000000000000e5 +265 1 8 39 -0.65536000000000000000e5 +265 1 9 40 -0.65536000000000000000e5 +265 1 12 43 0.26214400000000000000e6 +265 1 23 38 -0.32768000000000000000e5 +265 1 26 41 0.65536000000000000000e5 +265 1 28 43 -0.13107200000000000000e6 +265 1 32 47 -0.26214400000000000000e6 +265 2 2 32 -0.32768000000000000000e5 +265 2 3 9 0.65536000000000000000e5 +265 2 16 30 -0.65536000000000000000e5 +265 2 20 34 -0.13107200000000000000e6 +265 3 2 15 -0.13107200000000000000e6 +265 3 3 32 -0.13107200000000000000e6 +265 3 4 9 0.65536000000000000000e5 +265 3 10 23 0.65536000000000000000e5 +265 3 22 35 -0.26214400000000000000e6 +265 3 28 41 -0.26214400000000000000e6 +265 4 2 30 -0.65536000000000000000e5 +265 4 6 34 -0.13107200000000000000e6 +266 1 1 32 0.65536000000000000000e5 +266 1 1 48 -0.32768000000000000000e5 +266 1 2 12 0.65536000000000000000e5 +266 1 2 33 -0.19660800000000000000e6 +266 1 2 49 -0.32768000000000000000e5 +266 1 3 34 0.26214400000000000000e6 +266 1 4 11 0.32768000000000000000e5 +266 1 8 23 -0.32768000000000000000e5 +266 1 8 39 -0.32768000000000000000e5 +266 1 9 40 -0.32768000000000000000e5 +266 1 10 41 -0.13107200000000000000e6 +266 1 11 42 0.65536000000000000000e5 +266 1 12 27 -0.13107200000000000000e6 +266 1 12 43 0.26214400000000000000e6 +266 1 23 38 -0.32768000000000000000e5 +266 1 26 41 0.32768000000000000000e5 +266 1 28 43 -0.13107200000000000000e6 +266 1 32 47 -0.19660800000000000000e6 +266 1 33 48 -0.65536000000000000000e5 +266 2 2 8 -0.32768000000000000000e5 +266 2 2 32 -0.32768000000000000000e5 +266 2 3 9 0.32768000000000000000e5 +266 2 6 20 0.65536000000000000000e5 +266 2 7 21 -0.13107200000000000000e6 +266 2 12 26 -0.65536000000000000000e5 +266 2 16 30 -0.32768000000000000000e5 +266 2 20 34 -0.65536000000000000000e5 +266 3 1 14 0.13107200000000000000e6 +266 3 1 30 0.32768000000000000000e5 +266 3 2 7 0.32768000000000000000e5 +266 3 2 15 -0.65536000000000000000e5 +266 3 3 32 -0.19660800000000000000e6 +266 3 4 9 0.32768000000000000000e5 +266 3 7 12 -0.13107200000000000000e6 +266 3 8 37 -0.32768000000000000000e5 +266 3 10 23 0.65536000000000000000e5 +266 3 13 42 -0.13107200000000000000e6 +266 3 22 35 -0.13107200000000000000e6 +266 3 28 41 -0.19660800000000000000e6 +266 3 29 42 -0.65536000000000000000e5 +266 4 2 6 0.32768000000000000000e5 +266 4 2 30 -0.32768000000000000000e5 +266 4 3 31 0.65536000000000000000e5 +266 4 6 6 0.13107200000000000000e6 +266 4 6 18 0.32768000000000000000e5 +266 4 6 34 -0.65536000000000000000e5 +267 1 1 32 -0.65536000000000000000e5 +267 1 1 48 0.32768000000000000000e5 +267 1 2 13 0.65536000000000000000e5 +267 1 2 33 0.13107200000000000000e6 +267 1 2 49 0.32768000000000000000e5 +267 1 3 34 -0.13107200000000000000e6 +267 1 4 11 -0.32768000000000000000e5 +267 1 8 23 0.32768000000000000000e5 +267 1 8 39 0.32768000000000000000e5 +267 1 9 40 0.32768000000000000000e5 +267 1 10 41 0.65536000000000000000e5 +267 1 11 42 -0.65536000000000000000e5 +267 1 12 43 -0.26214400000000000000e6 +267 1 23 38 0.32768000000000000000e5 +267 1 26 41 -0.32768000000000000000e5 +267 1 28 43 0.13107200000000000000e6 +267 1 32 47 0.19660800000000000000e6 +267 1 33 48 0.65536000000000000000e5 +267 2 2 8 0.32768000000000000000e5 +267 2 2 32 0.32768000000000000000e5 +267 2 3 9 -0.32768000000000000000e5 +267 2 7 21 0.65536000000000000000e5 +267 2 12 26 0.65536000000000000000e5 +267 2 16 30 0.32768000000000000000e5 +267 2 20 34 0.65536000000000000000e5 +267 3 1 14 -0.65536000000000000000e5 +267 3 1 30 -0.32768000000000000000e5 +267 3 2 7 -0.32768000000000000000e5 +267 3 2 15 0.65536000000000000000e5 +267 3 3 32 0.13107200000000000000e6 +267 3 4 9 -0.32768000000000000000e5 +267 3 8 37 0.32768000000000000000e5 +267 3 10 23 -0.65536000000000000000e5 +267 3 13 42 0.13107200000000000000e6 +267 3 22 35 0.13107200000000000000e6 +267 3 28 41 0.19660800000000000000e6 +267 3 29 42 0.65536000000000000000e5 +267 4 2 6 -0.32768000000000000000e5 +267 4 2 30 0.32768000000000000000e5 +267 4 3 31 -0.65536000000000000000e5 +267 4 6 18 -0.32768000000000000000e5 +267 4 6 34 0.65536000000000000000e5 +268 1 2 14 0.65536000000000000000e5 +268 1 2 33 0.65536000000000000000e5 +268 1 3 34 -0.13107200000000000000e6 +268 1 10 41 0.65536000000000000000e5 +268 2 7 21 0.65536000000000000000e5 +268 3 1 14 -0.65536000000000000000e5 +268 3 3 32 0.65536000000000000000e5 +269 1 2 15 0.65536000000000000000e5 +269 1 2 33 -0.65536000000000000000e5 +269 2 4 10 0.65536000000000000000e5 +269 2 7 21 -0.65536000000000000000e5 +269 3 1 14 0.65536000000000000000e5 +269 3 2 15 0.65536000000000000000e5 +269 3 3 16 -0.13107200000000000000e6 +270 1 2 16 0.65536000000000000000e5 +270 1 12 27 -0.65536000000000000000e5 +270 3 7 12 -0.65536000000000000000e5 +271 1 2 18 0.65536000000000000000e5 +271 1 3 34 -0.65536000000000000000e5 +271 3 3 16 -0.65536000000000000000e5 +272 1 2 17 -0.32768000000000000000e5 +272 1 2 19 0.65536000000000000000e5 +272 1 4 35 -0.32768000000000000000e5 +272 1 12 43 -0.32768000000000000000e5 +272 1 14 45 -0.65536000000000000000e5 +272 1 16 23 0.32768000000000000000e5 +272 1 16 31 -0.13107200000000000000e6 +272 1 17 48 0.32768000000000000000e5 +272 1 18 49 0.32768000000000000000e5 +272 1 20 27 0.13107200000000000000e6 +272 2 7 13 0.65536000000000000000e5 +272 2 9 23 -0.32768000000000000000e5 +272 2 10 24 -0.65536000000000000000e5 +272 2 14 28 0.32768000000000000000e5 +272 3 3 16 -0.32768000000000000000e5 +272 3 5 34 -0.32768000000000000000e5 +272 3 7 12 -0.32768000000000000000e5 +272 3 13 42 0.32768000000000000000e5 +272 3 14 27 -0.32768000000000000000e5 +272 3 14 43 0.32768000000000000000e5 +272 4 1 13 -0.32768000000000000000e5 +272 4 10 10 -0.13107200000000000000e6 +273 1 2 17 -0.32768000000000000000e5 +273 1 2 20 0.65536000000000000000e5 +273 1 3 18 -0.32768000000000000000e5 +273 1 3 34 -0.32768000000000000000e5 +273 2 6 12 -0.32768000000000000000e5 +273 3 3 16 -0.32768000000000000000e5 +274 1 2 17 -0.32768000000000000000e5 +274 1 2 21 0.65536000000000000000e5 +274 1 3 18 -0.16384000000000000000e5 +274 1 3 34 -0.16384000000000000000e5 +274 1 4 19 -0.32768000000000000000e5 +274 1 4 35 -0.16384000000000000000e5 +274 1 12 43 -0.16384000000000000000e5 +274 1 14 45 -0.32768000000000000000e5 +274 1 16 23 0.16384000000000000000e5 +274 1 16 31 -0.65536000000000000000e5 +274 1 17 48 0.16384000000000000000e5 +274 1 18 49 0.16384000000000000000e5 +274 1 20 27 0.65536000000000000000e5 +274 2 6 12 -0.16384000000000000000e5 +274 2 9 23 -0.16384000000000000000e5 +274 2 10 24 -0.32768000000000000000e5 +274 2 14 28 0.16384000000000000000e5 +274 3 3 16 -0.32768000000000000000e5 +274 3 5 34 -0.16384000000000000000e5 +274 3 7 12 -0.16384000000000000000e5 +274 3 13 42 0.16384000000000000000e5 +274 3 14 27 -0.16384000000000000000e5 +274 3 14 43 0.16384000000000000000e5 +274 4 1 13 -0.16384000000000000000e5 +274 4 10 10 -0.65536000000000000000e5 +275 1 1 8 0.13107200000000000000e6 +275 1 1 24 0.65536000000000000000e5 +275 1 1 32 0.26214400000000000000e6 +275 1 1 48 -0.65536000000000000000e5 +275 1 2 9 0.13107200000000000000e6 +275 1 2 22 0.65536000000000000000e5 +275 1 2 33 -0.78643200000000000000e6 +275 1 2 49 -0.13107200000000000000e6 +275 1 3 34 0.10485760000000000000e7 +275 1 4 11 0.13107200000000000000e6 +275 1 8 23 -0.13107200000000000000e6 +275 1 8 39 -0.13107200000000000000e6 +275 1 9 40 -0.13107200000000000000e6 +275 1 10 41 -0.52428800000000000000e6 +275 1 11 42 0.26214400000000000000e6 +275 1 12 27 -0.52428800000000000000e6 +275 1 12 43 0.10485760000000000000e7 +275 1 23 38 -0.13107200000000000000e6 +275 1 26 41 0.13107200000000000000e6 +275 1 28 43 -0.52428800000000000000e6 +275 1 32 47 -0.78643200000000000000e6 +275 1 33 48 -0.26214400000000000000e6 +275 2 1 7 0.13107200000000000000e6 +275 2 2 8 -0.13107200000000000000e6 +275 2 2 16 0.65536000000000000000e5 +275 2 2 32 -0.13107200000000000000e6 +275 2 3 9 0.13107200000000000000e6 +275 2 6 20 0.26214400000000000000e6 +275 2 7 21 -0.52428800000000000000e6 +275 2 12 26 -0.26214400000000000000e6 +275 2 16 30 -0.13107200000000000000e6 +275 2 20 34 -0.26214400000000000000e6 +275 3 1 14 0.52428800000000000000e6 +275 3 1 30 0.13107200000000000000e6 +275 3 1 38 0.65536000000000000000e5 +275 3 2 7 0.26214400000000000000e6 +275 3 2 15 -0.26214400000000000000e6 +275 3 2 23 0.65536000000000000000e5 +275 3 3 32 -0.78643200000000000000e6 +275 3 4 9 0.13107200000000000000e6 +275 3 7 12 -0.52428800000000000000e6 +275 3 8 37 -0.13107200000000000000e6 +275 3 10 23 0.26214400000000000000e6 +275 3 13 42 -0.52428800000000000000e6 +275 3 22 35 -0.52428800000000000000e6 +275 3 28 41 -0.78643200000000000000e6 +275 3 29 42 -0.26214400000000000000e6 +275 4 2 6 0.13107200000000000000e6 +275 4 2 30 -0.13107200000000000000e6 +275 4 3 31 0.26214400000000000000e6 +275 4 6 6 0.52428800000000000000e6 +275 4 6 18 0.13107200000000000000e6 +275 4 6 34 -0.26214400000000000000e6 +276 1 1 24 -0.65536000000000000000e5 +276 1 2 23 0.65536000000000000000e5 +277 1 1 48 -0.65536000000000000000e5 +277 1 2 24 0.65536000000000000000e5 +277 3 1 38 -0.65536000000000000000e5 +277 3 2 23 -0.65536000000000000000e5 +278 1 2 25 0.65536000000000000000e5 +278 1 2 26 0.65536000000000000000e5 +278 1 2 33 -0.26214400000000000000e6 +278 1 2 49 -0.65536000000000000000e5 +278 1 11 42 0.26214400000000000000e6 +278 1 12 43 0.52428800000000000000e6 +278 1 23 38 -0.65536000000000000000e5 +278 1 28 43 -0.26214400000000000000e6 +278 1 32 47 -0.26214400000000000000e6 +278 1 33 48 -0.26214400000000000000e6 +278 2 2 32 -0.65536000000000000000e5 +278 2 3 17 0.65536000000000000000e5 +278 2 12 26 -0.26214400000000000000e6 +278 3 1 30 0.13107200000000000000e6 +278 3 1 38 0.65536000000000000000e5 +278 3 2 23 0.65536000000000000000e5 +278 3 8 37 -0.13107200000000000000e6 +278 3 10 23 0.13107200000000000000e6 +278 3 13 42 -0.52428800000000000000e6 +278 3 28 41 -0.26214400000000000000e6 +278 3 29 42 -0.26214400000000000000e6 +278 4 3 31 0.26214400000000000000e6 +278 4 6 18 0.13107200000000000000e6 +279 1 1 8 0.65536000000000000000e5 +279 1 1 32 0.13107200000000000000e6 +279 1 1 48 -0.65536000000000000000e5 +279 1 2 9 0.65536000000000000000e5 +279 1 2 27 0.65536000000000000000e5 +279 1 2 33 -0.39321600000000000000e6 +279 1 2 49 -0.65536000000000000000e5 +279 1 3 34 0.52428800000000000000e6 +279 1 4 11 0.65536000000000000000e5 +279 1 8 23 -0.65536000000000000000e5 +279 1 8 39 -0.65536000000000000000e5 +279 1 9 40 -0.65536000000000000000e5 +279 1 10 41 -0.26214400000000000000e6 +279 1 11 42 0.13107200000000000000e6 +279 1 12 27 -0.26214400000000000000e6 +279 1 12 43 0.52428800000000000000e6 +279 1 23 38 -0.65536000000000000000e5 +279 1 26 41 0.65536000000000000000e5 +279 1 28 43 -0.26214400000000000000e6 +279 1 32 47 -0.39321600000000000000e6 +279 1 33 48 -0.13107200000000000000e6 +279 2 1 7 0.65536000000000000000e5 +279 2 2 8 -0.65536000000000000000e5 +279 2 2 32 -0.65536000000000000000e5 +279 2 3 9 0.65536000000000000000e5 +279 2 6 20 0.13107200000000000000e6 +279 2 7 21 -0.26214400000000000000e6 +279 2 12 26 -0.13107200000000000000e6 +279 2 16 30 -0.65536000000000000000e5 +279 2 20 34 -0.13107200000000000000e6 +279 3 1 14 0.26214400000000000000e6 +279 3 1 30 0.65536000000000000000e5 +279 3 2 7 0.13107200000000000000e6 +279 3 2 15 -0.13107200000000000000e6 +279 3 3 32 -0.39321600000000000000e6 +279 3 4 9 0.65536000000000000000e5 +279 3 7 12 -0.26214400000000000000e6 +279 3 8 37 -0.65536000000000000000e5 +279 3 10 23 0.13107200000000000000e6 +279 3 13 42 -0.26214400000000000000e6 +279 3 22 35 -0.26214400000000000000e6 +279 3 28 41 -0.39321600000000000000e6 +279 3 29 42 -0.13107200000000000000e6 +279 4 2 6 0.65536000000000000000e5 +279 4 2 30 -0.65536000000000000000e5 +279 4 3 31 0.13107200000000000000e6 +279 4 6 6 0.26214400000000000000e6 +279 4 6 18 0.65536000000000000000e5 +279 4 6 34 -0.13107200000000000000e6 +280 1 2 28 0.65536000000000000000e5 +280 1 8 23 -0.65536000000000000000e5 +281 1 1 48 -0.32768000000000000000e5 +281 1 2 29 0.65536000000000000000e5 +281 1 2 33 -0.13107200000000000000e6 +281 1 2 49 -0.32768000000000000000e5 +281 1 11 42 0.13107200000000000000e6 +281 1 12 43 0.26214400000000000000e6 +281 1 23 38 -0.32768000000000000000e5 +281 1 28 43 -0.13107200000000000000e6 +281 1 32 47 -0.13107200000000000000e6 +281 1 33 48 -0.13107200000000000000e6 +281 2 2 32 -0.32768000000000000000e5 +281 2 12 26 -0.13107200000000000000e6 +281 3 1 30 0.65536000000000000000e5 +281 3 8 37 -0.65536000000000000000e5 +281 3 10 23 0.65536000000000000000e5 +281 3 13 42 -0.26214400000000000000e6 +281 3 28 41 -0.13107200000000000000e6 +281 3 29 42 -0.13107200000000000000e6 +281 4 3 31 0.13107200000000000000e6 +281 4 6 18 0.65536000000000000000e5 +282 1 2 30 0.65536000000000000000e5 +282 1 8 39 -0.65536000000000000000e5 +282 3 1 30 -0.65536000000000000000e5 +283 1 1 32 -0.65536000000000000000e5 +283 1 2 31 0.65536000000000000000e5 +284 1 2 32 0.65536000000000000000e5 +284 1 2 33 0.65536000000000000000e5 +284 1 3 34 -0.13107200000000000000e6 +284 1 10 41 0.65536000000000000000e5 +284 2 7 21 0.65536000000000000000e5 +284 3 3 32 0.65536000000000000000e5 +285 1 2 34 0.65536000000000000000e5 +285 1 16 23 -0.65536000000000000000e5 +286 1 2 35 0.65536000000000000000e5 +286 1 3 34 -0.65536000000000000000e5 +287 1 2 36 0.65536000000000000000e5 +287 1 3 18 -0.32768000000000000000e5 +287 1 4 19 0.65536000000000000000e5 +287 1 4 35 0.32768000000000000000e5 +287 1 12 43 0.65536000000000000000e5 +287 1 14 45 0.65536000000000000000e5 +287 1 17 48 -0.32768000000000000000e5 +287 1 18 49 -0.32768000000000000000e5 +287 1 20 27 -0.13107200000000000000e6 +287 2 9 23 0.32768000000000000000e5 +287 2 10 24 0.65536000000000000000e5 +287 2 14 28 -0.32768000000000000000e5 +287 3 3 16 -0.32768000000000000000e5 +287 3 4 17 -0.32768000000000000000e5 +287 3 5 34 0.32768000000000000000e5 +287 3 13 42 -0.32768000000000000000e5 +287 3 14 27 0.65536000000000000000e5 +287 3 14 43 -0.32768000000000000000e5 +287 4 2 14 -0.32768000000000000000e5 +288 1 1 40 0.65536000000000000000e5 +288 1 2 37 0.65536000000000000000e5 +288 1 22 37 -0.65536000000000000000e5 +288 1 23 38 -0.65536000000000000000e5 +288 3 1 38 0.65536000000000000000e5 +288 3 22 27 -0.13107200000000000000e6 +288 4 16 16 0.13107200000000000000e6 +289 1 1 48 -0.65536000000000000000e5 +289 1 2 38 0.65536000000000000000e5 +289 3 1 38 -0.65536000000000000000e5 +290 1 1 40 -0.65536000000000000000e5 +290 1 2 39 0.65536000000000000000e5 +291 1 2 40 0.65536000000000000000e5 +291 1 2 49 -0.65536000000000000000e5 +291 3 2 39 -0.65536000000000000000e5 +292 1 2 41 0.65536000000000000000e5 +292 1 7 38 -0.65536000000000000000e5 +293 1 1 48 -0.32768000000000000000e5 +293 1 2 42 0.65536000000000000000e5 +293 1 2 49 -0.32768000000000000000e5 +293 1 23 38 -0.32768000000000000000e5 +293 2 2 32 -0.32768000000000000000e5 +293 3 8 37 -0.65536000000000000000e5 +294 1 2 43 0.65536000000000000000e5 +294 1 8 39 -0.65536000000000000000e5 +295 1 2 33 0.65536000000000000000e5 +295 1 2 44 0.65536000000000000000e5 +295 1 3 34 -0.13107200000000000000e6 +295 1 10 41 0.65536000000000000000e5 +295 2 7 21 0.65536000000000000000e5 +295 3 2 31 0.65536000000000000000e5 +295 3 3 32 0.65536000000000000000e5 +296 1 2 45 0.65536000000000000000e5 +296 1 11 42 -0.65536000000000000000e5 +296 1 12 43 -0.13107200000000000000e6 +296 1 28 43 0.65536000000000000000e5 +296 1 32 47 0.65536000000000000000e5 +296 1 33 48 0.65536000000000000000e5 +296 2 12 26 0.65536000000000000000e5 +296 3 13 42 0.13107200000000000000e6 +296 3 28 41 0.65536000000000000000e5 +296 3 29 42 0.65536000000000000000e5 +296 4 3 31 -0.65536000000000000000e5 +297 1 2 46 0.65536000000000000000e5 +297 1 16 47 -0.65536000000000000000e5 +297 3 12 41 -0.65536000000000000000e5 +298 1 1 48 -0.65536000000000000000e5 +298 1 2 47 0.65536000000000000000e5 +299 1 2 48 0.65536000000000000000e5 +299 1 23 38 -0.65536000000000000000e5 +300 1 1 48 -0.32768000000000000000e5 +300 1 2 49 -0.32768000000000000000e5 +300 1 2 50 0.65536000000000000000e5 +300 1 23 38 -0.32768000000000000000e5 +300 2 2 32 -0.32768000000000000000e5 +301 1 2 51 0.65536000000000000000e5 +301 1 8 39 -0.65536000000000000000e5 +301 1 9 40 -0.65536000000000000000e5 +301 1 10 41 0.13107200000000000000e6 +301 1 26 41 0.65536000000000000000e5 +301 1 32 47 -0.13107200000000000000e6 +301 3 9 38 -0.65536000000000000000e5 +301 3 28 41 -0.13107200000000000000e6 +301 4 2 30 -0.65536000000000000000e5 +302 1 2 52 0.65536000000000000000e5 +302 1 12 43 -0.13107200000000000000e6 +302 1 28 43 0.65536000000000000000e5 +302 1 32 47 0.65536000000000000000e5 +302 2 20 34 0.65536000000000000000e5 +302 3 22 35 0.13107200000000000000e6 +302 3 28 41 0.65536000000000000000e5 +302 4 6 34 0.65536000000000000000e5 +303 1 2 53 0.65536000000000000000e5 +303 1 23 38 -0.65536000000000000000e5 +303 3 2 47 0.65536000000000000000e5 +304 1 2 49 -0.65536000000000000000e5 +304 1 2 54 0.65536000000000000000e5 +304 3 24 37 0.65536000000000000000e5 +305 1 2 55 0.65536000000000000000e5 +305 1 6 53 -0.32768000000000000000e5 +305 1 8 39 -0.65536000000000000000e5 +305 1 9 40 -0.65536000000000000000e5 +305 1 10 41 0.13107200000000000000e6 +305 1 25 40 0.32768000000000000000e5 +305 1 26 41 0.65536000000000000000e5 +305 1 32 47 -0.13107200000000000000e6 +305 3 9 38 -0.65536000000000000000e5 +305 3 24 37 -0.32768000000000000000e5 +305 3 27 40 -0.13107200000000000000e6 +305 4 2 30 -0.65536000000000000000e5 +305 4 4 32 0.32768000000000000000e5 +305 4 16 28 -0.32768000000000000000e5 +305 4 17 29 -0.65536000000000000000e5 +306 1 2 56 0.65536000000000000000e5 +306 1 6 53 -0.65536000000000000000e5 +306 1 8 39 -0.13107200000000000000e6 +306 1 9 40 -0.13107200000000000000e6 +306 1 10 41 0.26214400000000000000e6 +306 1 22 53 0.65536000000000000000e5 +306 1 23 54 0.65536000000000000000e5 +306 1 24 55 0.13107200000000000000e6 +306 1 25 40 0.65536000000000000000e5 +306 1 37 52 -0.26214400000000000000e6 +306 2 26 32 0.65536000000000000000e5 +306 3 9 38 -0.13107200000000000000e6 +306 3 22 51 -0.13107200000000000000e6 +306 3 24 37 -0.65536000000000000000e5 +306 3 27 40 -0.13107200000000000000e6 +306 4 2 30 -0.13107200000000000000e6 +306 4 4 32 0.65536000000000000000e5 +306 4 16 28 -0.65536000000000000000e5 +306 4 17 29 -0.13107200000000000000e6 +306 4 20 32 -0.13107200000000000000e6 +307 1 1 48 -0.32768000000000000000e5 +307 1 3 3 0.65536000000000000000e5 +307 3 1 38 -0.32768000000000000000e5 +307 3 2 3 -0.32768000000000000000e5 +307 3 2 23 -0.32768000000000000000e5 +308 1 2 5 -0.65536000000000000000e5 +308 1 3 4 0.65536000000000000000e5 +309 1 2 25 0.65536000000000000000e5 +309 1 2 33 -0.26214400000000000000e6 +309 1 2 49 -0.65536000000000000000e5 +309 1 3 5 0.65536000000000000000e5 +309 1 11 42 0.26214400000000000000e6 +309 1 12 43 0.52428800000000000000e6 +309 1 23 38 -0.65536000000000000000e5 +309 1 28 43 -0.26214400000000000000e6 +309 1 32 47 -0.26214400000000000000e6 +309 1 33 48 -0.26214400000000000000e6 +309 2 2 32 -0.65536000000000000000e5 +309 2 3 17 0.65536000000000000000e5 +309 2 12 26 -0.26214400000000000000e6 +309 3 1 6 -0.65536000000000000000e5 +309 3 1 30 0.13107200000000000000e6 +309 3 1 38 0.65536000000000000000e5 +309 3 2 23 0.65536000000000000000e5 +309 3 8 37 -0.13107200000000000000e6 +309 3 10 23 0.13107200000000000000e6 +309 3 13 42 -0.52428800000000000000e6 +309 3 28 41 -0.26214400000000000000e6 +309 3 29 42 -0.26214400000000000000e6 +309 4 3 31 0.26214400000000000000e6 +309 4 6 18 0.13107200000000000000e6 +310 1 1 40 -0.65536000000000000000e5 +310 1 1 48 -0.65536000000000000000e5 +310 1 2 5 0.65536000000000000000e5 +310 1 2 25 -0.65536000000000000000e5 +310 1 2 33 0.26214400000000000000e6 +310 1 2 49 -0.65536000000000000000e5 +310 1 3 6 0.65536000000000000000e5 +310 1 4 11 0.13107200000000000000e6 +310 1 6 37 -0.65536000000000000000e5 +310 1 9 40 -0.13107200000000000000e6 +310 1 11 42 -0.26214400000000000000e6 +310 1 26 41 0.13107200000000000000e6 +310 1 32 47 -0.26214400000000000000e6 +310 1 33 48 0.26214400000000000000e6 +310 2 3 9 0.13107200000000000000e6 +310 2 3 17 -0.65536000000000000000e5 +310 2 12 26 0.26214400000000000000e6 +310 2 16 30 -0.13107200000000000000e6 +310 2 20 34 -0.26214400000000000000e6 +310 3 1 6 0.65536000000000000000e5 +310 3 1 30 -0.13107200000000000000e6 +310 3 1 38 -0.65536000000000000000e5 +310 3 2 15 -0.26214400000000000000e6 +310 3 2 23 -0.65536000000000000000e5 +310 3 2 39 -0.65536000000000000000e5 +310 3 3 32 -0.26214400000000000000e6 +310 3 4 9 0.13107200000000000000e6 +310 3 8 37 0.13107200000000000000e6 +310 3 13 42 0.52428800000000000000e6 +310 3 22 35 -0.52428800000000000000e6 +310 3 28 41 -0.26214400000000000000e6 +310 3 29 42 0.26214400000000000000e6 +310 4 1 5 0.65536000000000000000e5 +310 4 2 30 -0.13107200000000000000e6 +310 4 3 31 -0.26214400000000000000e6 +310 4 4 16 0.65536000000000000000e5 +310 4 6 18 -0.13107200000000000000e6 +310 4 6 34 -0.26214400000000000000e6 +311 1 1 8 0.65536000000000000000e5 +311 1 1 32 0.13107200000000000000e6 +311 1 1 48 -0.65536000000000000000e5 +311 1 2 9 0.65536000000000000000e5 +311 1 2 33 -0.39321600000000000000e6 +311 1 2 49 -0.65536000000000000000e5 +311 1 3 7 0.65536000000000000000e5 +311 1 3 34 0.52428800000000000000e6 +311 1 4 11 0.65536000000000000000e5 +311 1 8 23 -0.65536000000000000000e5 +311 1 8 39 -0.65536000000000000000e5 +311 1 9 40 -0.65536000000000000000e5 +311 1 10 41 -0.26214400000000000000e6 +311 1 11 42 0.13107200000000000000e6 +311 1 12 27 -0.26214400000000000000e6 +311 1 12 43 0.52428800000000000000e6 +311 1 23 38 -0.65536000000000000000e5 +311 1 26 41 0.65536000000000000000e5 +311 1 28 43 -0.26214400000000000000e6 +311 1 32 47 -0.39321600000000000000e6 +311 1 33 48 -0.13107200000000000000e6 +311 2 1 7 0.65536000000000000000e5 +311 2 2 8 -0.65536000000000000000e5 +311 2 2 32 -0.65536000000000000000e5 +311 2 3 9 0.65536000000000000000e5 +311 2 6 20 0.13107200000000000000e6 +311 2 7 21 -0.26214400000000000000e6 +311 2 12 26 -0.13107200000000000000e6 +311 2 16 30 -0.65536000000000000000e5 +311 2 20 34 -0.13107200000000000000e6 +311 3 1 14 0.26214400000000000000e6 +311 3 1 30 0.65536000000000000000e5 +311 3 2 7 0.65536000000000000000e5 +311 3 2 15 -0.13107200000000000000e6 +311 3 3 32 -0.39321600000000000000e6 +311 3 4 9 0.65536000000000000000e5 +311 3 7 12 -0.26214400000000000000e6 +311 3 8 37 -0.65536000000000000000e5 +311 3 10 23 0.13107200000000000000e6 +311 3 13 42 -0.26214400000000000000e6 +311 3 22 35 -0.26214400000000000000e6 +311 3 28 41 -0.39321600000000000000e6 +311 3 29 42 -0.13107200000000000000e6 +311 4 2 6 0.65536000000000000000e5 +311 4 2 30 -0.65536000000000000000e5 +311 4 3 31 0.13107200000000000000e6 +311 4 6 6 0.26214400000000000000e6 +311 4 6 18 0.65536000000000000000e5 +311 4 6 34 -0.13107200000000000000e6 +312 1 2 9 -0.65536000000000000000e5 +312 1 3 8 0.65536000000000000000e5 +313 1 1 48 0.32768000000000000000e5 +313 1 2 9 0.65536000000000000000e5 +313 1 2 33 0.13107200000000000000e6 +313 1 2 49 0.32768000000000000000e5 +313 1 3 9 0.65536000000000000000e5 +313 1 3 34 -0.26214400000000000000e6 +313 1 4 11 -0.65536000000000000000e5 +313 1 8 39 0.65536000000000000000e5 +313 1 9 40 0.65536000000000000000e5 +313 1 10 41 0.13107200000000000000e6 +313 1 12 43 -0.26214400000000000000e6 +313 1 23 38 0.32768000000000000000e5 +313 1 26 41 -0.65536000000000000000e5 +313 1 28 43 0.13107200000000000000e6 +313 1 32 47 0.26214400000000000000e6 +313 2 2 8 0.65536000000000000000e5 +313 2 2 32 0.32768000000000000000e5 +313 2 3 9 -0.65536000000000000000e5 +313 2 7 21 0.13107200000000000000e6 +313 2 16 30 0.65536000000000000000e5 +313 2 20 34 0.13107200000000000000e6 +313 3 1 14 -0.13107200000000000000e6 +313 3 2 15 0.13107200000000000000e6 +313 3 3 32 0.26214400000000000000e6 +313 3 4 9 -0.65536000000000000000e5 +313 3 10 23 -0.65536000000000000000e5 +313 3 22 35 0.26214400000000000000e6 +313 3 28 41 0.26214400000000000000e6 +313 4 2 30 0.65536000000000000000e5 +313 4 6 34 0.13107200000000000000e6 +314 1 1 48 -0.32768000000000000000e5 +314 1 2 49 -0.32768000000000000000e5 +314 1 3 10 0.65536000000000000000e5 +314 1 4 11 0.65536000000000000000e5 +314 1 8 39 -0.65536000000000000000e5 +314 1 9 40 -0.65536000000000000000e5 +314 1 12 43 0.26214400000000000000e6 +314 1 23 38 -0.32768000000000000000e5 +314 1 26 41 0.65536000000000000000e5 +314 1 28 43 -0.13107200000000000000e6 +314 1 32 47 -0.26214400000000000000e6 +314 2 2 32 -0.32768000000000000000e5 +314 2 3 9 0.65536000000000000000e5 +314 2 16 30 -0.65536000000000000000e5 +314 2 20 34 -0.13107200000000000000e6 +314 3 2 15 -0.13107200000000000000e6 +314 3 3 32 -0.13107200000000000000e6 +314 3 4 9 0.65536000000000000000e5 +314 3 10 23 0.65536000000000000000e5 +314 3 22 35 -0.26214400000000000000e6 +314 3 28 41 -0.26214400000000000000e6 +314 4 2 30 -0.65536000000000000000e5 +314 4 6 34 -0.13107200000000000000e6 +315 1 1 48 0.32768000000000000000e5 +315 1 2 49 0.32768000000000000000e5 +315 1 3 11 0.65536000000000000000e5 +315 1 8 39 0.65536000000000000000e5 +315 1 9 40 0.65536000000000000000e5 +315 1 10 41 -0.13107200000000000000e6 +315 1 12 43 -0.26214400000000000000e6 +315 1 23 38 0.32768000000000000000e5 +315 1 26 41 -0.65536000000000000000e5 +315 1 28 43 0.13107200000000000000e6 +315 1 32 47 0.26214400000000000000e6 +315 2 2 32 0.32768000000000000000e5 +315 2 16 30 0.65536000000000000000e5 +315 2 20 34 0.13107200000000000000e6 +315 3 4 9 -0.65536000000000000000e5 +315 3 10 23 -0.65536000000000000000e5 +315 3 22 35 0.26214400000000000000e6 +315 3 28 41 0.26214400000000000000e6 +315 4 2 30 0.65536000000000000000e5 +315 4 6 34 0.13107200000000000000e6 +316 1 1 32 -0.65536000000000000000e5 +316 1 1 48 0.32768000000000000000e5 +316 1 2 33 0.13107200000000000000e6 +316 1 2 49 0.32768000000000000000e5 +316 1 3 12 0.65536000000000000000e5 +316 1 3 34 -0.13107200000000000000e6 +316 1 4 11 -0.32768000000000000000e5 +316 1 8 23 0.32768000000000000000e5 +316 1 8 39 0.32768000000000000000e5 +316 1 9 40 0.32768000000000000000e5 +316 1 10 41 0.65536000000000000000e5 +316 1 11 42 -0.65536000000000000000e5 +316 1 12 43 -0.26214400000000000000e6 +316 1 23 38 0.32768000000000000000e5 +316 1 26 41 -0.32768000000000000000e5 +316 1 28 43 0.13107200000000000000e6 +316 1 32 47 0.19660800000000000000e6 +316 1 33 48 0.65536000000000000000e5 +316 2 2 8 0.32768000000000000000e5 +316 2 2 32 0.32768000000000000000e5 +316 2 3 9 -0.32768000000000000000e5 +316 2 7 21 0.65536000000000000000e5 +316 2 12 26 0.65536000000000000000e5 +316 2 16 30 0.32768000000000000000e5 +316 2 20 34 0.65536000000000000000e5 +316 3 1 14 -0.65536000000000000000e5 +316 3 1 30 -0.32768000000000000000e5 +316 3 2 7 -0.32768000000000000000e5 +316 3 2 15 0.65536000000000000000e5 +316 3 3 32 0.13107200000000000000e6 +316 3 4 9 -0.32768000000000000000e5 +316 3 8 37 0.32768000000000000000e5 +316 3 10 23 -0.65536000000000000000e5 +316 3 13 42 0.13107200000000000000e6 +316 3 22 35 0.13107200000000000000e6 +316 3 28 41 0.19660800000000000000e6 +316 3 29 42 0.65536000000000000000e5 +316 4 2 6 -0.32768000000000000000e5 +316 4 2 30 0.32768000000000000000e5 +316 4 3 31 -0.65536000000000000000e5 +316 4 6 18 -0.32768000000000000000e5 +316 4 6 34 0.65536000000000000000e5 +317 1 2 33 0.65536000000000000000e5 +317 1 3 13 0.65536000000000000000e5 +317 1 3 34 -0.13107200000000000000e6 +317 1 10 41 0.65536000000000000000e5 +317 2 7 21 0.65536000000000000000e5 +317 3 1 14 -0.65536000000000000000e5 +317 3 3 32 0.65536000000000000000e5 +318 1 2 33 -0.65536000000000000000e5 +318 1 3 14 0.65536000000000000000e5 +318 2 4 10 0.65536000000000000000e5 +318 2 7 21 -0.65536000000000000000e5 +318 3 1 14 0.65536000000000000000e5 +318 3 2 15 0.65536000000000000000e5 +318 3 3 16 -0.13107200000000000000e6 +319 1 3 15 0.65536000000000000000e5 +319 1 10 41 -0.65536000000000000000e5 +319 3 2 15 -0.65536000000000000000e5 +319 3 3 32 -0.65536000000000000000e5 +320 1 2 17 -0.65536000000000000000e5 +320 1 3 16 0.65536000000000000000e5 +321 1 3 17 0.65536000000000000000e5 +321 1 3 34 -0.65536000000000000000e5 +321 3 3 16 -0.65536000000000000000e5 +322 1 2 17 -0.32768000000000000000e5 +322 1 3 18 -0.32768000000000000000e5 +322 1 3 19 0.65536000000000000000e5 +322 1 3 34 -0.32768000000000000000e5 +322 2 6 12 -0.32768000000000000000e5 +322 3 3 16 -0.32768000000000000000e5 +323 1 3 20 0.65536000000000000000e5 +323 1 4 19 -0.65536000000000000000e5 +324 1 3 21 0.65536000000000000000e5 +324 1 20 27 -0.65536000000000000000e5 +324 3 7 20 -0.65536000000000000000e5 +325 1 1 24 -0.65536000000000000000e5 +325 1 3 22 0.65536000000000000000e5 +326 1 1 48 -0.65536000000000000000e5 +326 1 3 23 0.65536000000000000000e5 +326 3 1 38 -0.65536000000000000000e5 +326 3 2 23 -0.65536000000000000000e5 +327 1 2 25 -0.65536000000000000000e5 +327 1 3 24 0.65536000000000000000e5 +328 1 2 25 0.65536000000000000000e5 +328 1 2 33 -0.26214400000000000000e6 +328 1 2 49 -0.65536000000000000000e5 +328 1 3 25 0.65536000000000000000e5 +328 1 11 42 0.26214400000000000000e6 +328 1 12 43 0.52428800000000000000e6 +328 1 23 38 -0.65536000000000000000e5 +328 1 28 43 -0.26214400000000000000e6 +328 1 32 47 -0.26214400000000000000e6 +328 1 33 48 -0.26214400000000000000e6 +328 2 2 32 -0.65536000000000000000e5 +328 2 3 17 0.65536000000000000000e5 +328 2 12 26 -0.26214400000000000000e6 +328 3 1 30 0.13107200000000000000e6 +328 3 1 38 0.65536000000000000000e5 +328 3 2 23 0.65536000000000000000e5 +328 3 8 37 -0.13107200000000000000e6 +328 3 10 23 0.13107200000000000000e6 +328 3 13 42 -0.52428800000000000000e6 +328 3 28 41 -0.26214400000000000000e6 +328 3 29 42 -0.26214400000000000000e6 +328 4 3 31 0.26214400000000000000e6 +328 4 6 18 0.13107200000000000000e6 +329 1 1 40 -0.65536000000000000000e5 +329 1 2 33 0.26214400000000000000e6 +329 1 3 26 0.65536000000000000000e5 +329 1 6 37 -0.65536000000000000000e5 +329 1 11 42 -0.26214400000000000000e6 +329 1 12 43 -0.52428800000000000000e6 +329 1 23 38 0.65536000000000000000e5 +329 1 28 43 0.26214400000000000000e6 +329 1 32 47 0.26214400000000000000e6 +329 1 33 48 0.26214400000000000000e6 +329 2 2 32 0.65536000000000000000e5 +329 2 3 17 -0.65536000000000000000e5 +329 2 12 26 0.26214400000000000000e6 +329 3 1 30 -0.26214400000000000000e6 +329 3 1 38 -0.65536000000000000000e5 +329 3 2 23 -0.65536000000000000000e5 +329 3 2 39 -0.65536000000000000000e5 +329 3 8 37 0.13107200000000000000e6 +329 3 10 23 -0.13107200000000000000e6 +329 3 13 42 0.52428800000000000000e6 +329 3 28 41 0.26214400000000000000e6 +329 3 29 42 0.26214400000000000000e6 +329 4 3 31 -0.26214400000000000000e6 +329 4 4 16 0.65536000000000000000e5 +329 4 6 18 -0.13107200000000000000e6 +330 1 3 27 0.65536000000000000000e5 +330 1 8 23 -0.65536000000000000000e5 +331 1 1 48 -0.32768000000000000000e5 +331 1 2 33 -0.13107200000000000000e6 +331 1 2 49 -0.32768000000000000000e5 +331 1 3 28 0.65536000000000000000e5 +331 1 11 42 0.13107200000000000000e6 +331 1 12 43 0.26214400000000000000e6 +331 1 23 38 -0.32768000000000000000e5 +331 1 28 43 -0.13107200000000000000e6 +331 1 32 47 -0.13107200000000000000e6 +331 1 33 48 -0.13107200000000000000e6 +331 2 2 32 -0.32768000000000000000e5 +331 2 12 26 -0.13107200000000000000e6 +331 3 1 30 0.65536000000000000000e5 +331 3 8 37 -0.65536000000000000000e5 +331 3 10 23 0.65536000000000000000e5 +331 3 13 42 -0.26214400000000000000e6 +331 3 28 41 -0.13107200000000000000e6 +331 3 29 42 -0.13107200000000000000e6 +331 4 3 31 0.13107200000000000000e6 +331 4 6 18 0.65536000000000000000e5 +332 1 3 29 0.65536000000000000000e5 +332 1 8 39 -0.65536000000000000000e5 +332 3 1 30 -0.65536000000000000000e5 +333 1 1 48 0.32768000000000000000e5 +333 1 2 49 0.32768000000000000000e5 +333 1 3 30 0.65536000000000000000e5 +333 1 8 39 0.65536000000000000000e5 +333 1 9 40 0.65536000000000000000e5 +333 1 10 41 -0.13107200000000000000e6 +333 1 12 43 -0.26214400000000000000e6 +333 1 23 38 0.32768000000000000000e5 +333 1 26 41 -0.65536000000000000000e5 +333 1 28 43 0.13107200000000000000e6 +333 1 32 47 0.26214400000000000000e6 +333 2 2 32 0.32768000000000000000e5 +333 2 16 30 0.65536000000000000000e5 +333 2 20 34 0.13107200000000000000e6 +333 3 10 23 -0.65536000000000000000e5 +333 3 22 35 0.26214400000000000000e6 +333 3 28 41 0.26214400000000000000e6 +333 4 2 30 0.65536000000000000000e5 +333 4 6 34 0.13107200000000000000e6 +334 1 2 33 0.65536000000000000000e5 +334 1 3 31 0.65536000000000000000e5 +334 1 3 34 -0.13107200000000000000e6 +334 1 10 41 0.65536000000000000000e5 +334 2 7 21 0.65536000000000000000e5 +334 3 3 32 0.65536000000000000000e5 +335 1 2 33 -0.65536000000000000000e5 +335 1 3 32 0.65536000000000000000e5 +336 1 3 33 0.65536000000000000000e5 +336 1 10 41 -0.65536000000000000000e5 +336 3 3 32 -0.65536000000000000000e5 +337 1 3 35 0.65536000000000000000e5 +337 1 12 43 -0.65536000000000000000e5 +337 3 14 27 -0.65536000000000000000e5 +338 1 3 18 0.32768000000000000000e5 +338 1 3 36 0.65536000000000000000e5 +338 1 4 19 -0.65536000000000000000e5 +338 1 12 43 -0.32768000000000000000e5 +338 3 3 16 0.32768000000000000000e5 +338 3 4 17 0.32768000000000000000e5 +338 3 14 27 -0.32768000000000000000e5 +338 4 2 14 0.32768000000000000000e5 +339 1 1 48 -0.65536000000000000000e5 +339 1 3 37 0.65536000000000000000e5 +339 3 1 38 -0.65536000000000000000e5 +340 1 1 40 -0.65536000000000000000e5 +340 1 3 38 0.65536000000000000000e5 +341 1 2 49 -0.65536000000000000000e5 +341 1 3 39 0.65536000000000000000e5 +341 3 2 39 -0.65536000000000000000e5 +342 1 3 40 0.65536000000000000000e5 +342 1 6 37 -0.65536000000000000000e5 +343 1 1 48 -0.32768000000000000000e5 +343 1 2 49 -0.32768000000000000000e5 +343 1 3 41 0.65536000000000000000e5 +343 1 23 38 -0.32768000000000000000e5 +343 2 2 32 -0.32768000000000000000e5 +343 3 8 37 -0.65536000000000000000e5 +344 1 3 42 0.65536000000000000000e5 +344 1 8 39 -0.65536000000000000000e5 +345 1 1 48 0.32768000000000000000e5 +345 1 2 49 0.32768000000000000000e5 +345 1 3 43 0.65536000000000000000e5 +345 1 8 39 0.65536000000000000000e5 +345 1 9 40 0.65536000000000000000e5 +345 1 10 41 -0.13107200000000000000e6 +345 1 12 43 -0.26214400000000000000e6 +345 1 23 38 0.32768000000000000000e5 +345 1 26 41 -0.65536000000000000000e5 +345 1 28 43 0.13107200000000000000e6 +345 1 32 47 0.26214400000000000000e6 +345 2 2 32 0.32768000000000000000e5 +345 2 16 30 0.65536000000000000000e5 +345 2 20 34 0.13107200000000000000e6 +345 3 22 35 0.26214400000000000000e6 +345 3 28 41 0.26214400000000000000e6 +345 4 2 30 0.65536000000000000000e5 +345 4 6 34 0.13107200000000000000e6 +346 1 3 44 0.65536000000000000000e5 +346 1 11 42 -0.65536000000000000000e5 +346 1 12 43 -0.13107200000000000000e6 +346 1 28 43 0.65536000000000000000e5 +346 1 32 47 0.65536000000000000000e5 +346 1 33 48 0.65536000000000000000e5 +346 2 12 26 0.65536000000000000000e5 +346 3 13 42 0.13107200000000000000e6 +346 3 28 41 0.65536000000000000000e5 +346 3 29 42 0.65536000000000000000e5 +346 4 3 31 -0.65536000000000000000e5 +347 1 3 45 0.65536000000000000000e5 +347 1 10 41 -0.65536000000000000000e5 +348 1 3 46 0.65536000000000000000e5 +348 1 12 43 -0.65536000000000000000e5 +349 1 3 47 0.65536000000000000000e5 +349 1 23 38 -0.65536000000000000000e5 +350 1 2 49 -0.65536000000000000000e5 +350 1 3 48 0.65536000000000000000e5 +351 1 3 49 0.65536000000000000000e5 +351 1 24 39 -0.65536000000000000000e5 +352 1 3 50 0.65536000000000000000e5 +352 1 8 39 -0.65536000000000000000e5 +352 1 9 40 -0.65536000000000000000e5 +352 1 10 41 0.13107200000000000000e6 +352 1 26 41 0.65536000000000000000e5 +352 1 32 47 -0.13107200000000000000e6 +352 3 9 38 -0.65536000000000000000e5 +352 3 28 41 -0.13107200000000000000e6 +352 4 2 30 -0.65536000000000000000e5 +353 1 1 48 0.32768000000000000000e5 +353 1 2 49 0.32768000000000000000e5 +353 1 3 51 0.65536000000000000000e5 +353 1 8 39 0.65536000000000000000e5 +353 1 9 40 0.65536000000000000000e5 +353 1 10 41 -0.13107200000000000000e6 +353 1 12 43 -0.26214400000000000000e6 +353 1 23 38 0.32768000000000000000e5 +353 1 26 41 -0.65536000000000000000e5 +353 1 28 43 0.13107200000000000000e6 +353 1 32 47 0.26214400000000000000e6 +353 2 2 32 0.32768000000000000000e5 +353 2 16 30 0.65536000000000000000e5 +353 2 20 34 0.13107200000000000000e6 +353 3 9 38 0.65536000000000000000e5 +353 3 22 35 0.26214400000000000000e6 +353 3 28 41 0.26214400000000000000e6 +353 4 2 30 0.65536000000000000000e5 +353 4 6 34 0.13107200000000000000e6 +354 1 3 52 0.65536000000000000000e5 +354 1 32 47 -0.65536000000000000000e5 +354 3 28 41 -0.65536000000000000000e5 +355 1 2 49 -0.65536000000000000000e5 +355 1 3 53 0.65536000000000000000e5 +355 3 24 37 0.65536000000000000000e5 +356 1 3 54 0.65536000000000000000e5 +356 1 6 53 0.65536000000000000000e5 +356 1 24 39 -0.65536000000000000000e5 +356 1 25 40 -0.65536000000000000000e5 +356 3 25 38 -0.65536000000000000000e5 +356 3 27 40 0.13107200000000000000e6 +356 4 4 32 -0.65536000000000000000e5 +357 1 1 48 0.32768000000000000000e5 +357 1 2 49 0.32768000000000000000e5 +357 1 3 55 0.65536000000000000000e5 +357 1 6 53 0.32768000000000000000e5 +357 1 8 39 0.65536000000000000000e5 +357 1 9 40 0.65536000000000000000e5 +357 1 10 41 -0.13107200000000000000e6 +357 1 12 43 -0.26214400000000000000e6 +357 1 23 38 0.32768000000000000000e5 +357 1 25 40 -0.32768000000000000000e5 +357 1 26 41 -0.65536000000000000000e5 +357 1 28 43 0.13107200000000000000e6 +357 1 32 47 0.26214400000000000000e6 +357 2 2 32 0.32768000000000000000e5 +357 2 16 30 0.65536000000000000000e5 +357 2 20 34 0.13107200000000000000e6 +357 3 9 38 0.65536000000000000000e5 +357 3 22 35 0.26214400000000000000e6 +357 3 24 37 0.32768000000000000000e5 +357 3 27 40 0.65536000000000000000e5 +357 3 28 41 0.26214400000000000000e6 +357 4 2 30 0.65536000000000000000e5 +357 4 4 32 -0.32768000000000000000e5 +357 4 6 34 0.13107200000000000000e6 +357 4 16 28 0.32768000000000000000e5 +358 1 3 56 0.65536000000000000000e5 +358 1 23 54 -0.65536000000000000000e5 +359 1 2 25 0.32768000000000000000e5 +359 1 2 33 -0.13107200000000000000e6 +359 1 2 49 -0.32768000000000000000e5 +359 1 4 4 0.65536000000000000000e5 +359 1 11 42 0.13107200000000000000e6 +359 1 12 43 0.26214400000000000000e6 +359 1 23 38 -0.32768000000000000000e5 +359 1 28 43 -0.13107200000000000000e6 +359 1 32 47 -0.13107200000000000000e6 +359 1 33 48 -0.13107200000000000000e6 +359 2 2 32 -0.32768000000000000000e5 +359 2 3 17 0.32768000000000000000e5 +359 2 12 26 -0.13107200000000000000e6 +359 3 1 6 -0.32768000000000000000e5 +359 3 1 30 0.65536000000000000000e5 +359 3 1 38 0.32768000000000000000e5 +359 3 2 23 0.32768000000000000000e5 +359 3 8 37 -0.65536000000000000000e5 +359 3 10 23 0.65536000000000000000e5 +359 3 13 42 -0.26214400000000000000e6 +359 3 28 41 -0.13107200000000000000e6 +359 3 29 42 -0.13107200000000000000e6 +359 4 3 31 0.13107200000000000000e6 +359 4 6 18 0.65536000000000000000e5 +360 1 1 40 -0.65536000000000000000e5 +360 1 1 48 -0.65536000000000000000e5 +360 1 2 5 0.65536000000000000000e5 +360 1 2 25 -0.65536000000000000000e5 +360 1 2 33 0.26214400000000000000e6 +360 1 2 49 -0.65536000000000000000e5 +360 1 4 5 0.65536000000000000000e5 +360 1 4 11 0.13107200000000000000e6 +360 1 6 37 -0.65536000000000000000e5 +360 1 9 40 -0.13107200000000000000e6 +360 1 11 42 -0.26214400000000000000e6 +360 1 26 41 0.13107200000000000000e6 +360 1 32 47 -0.26214400000000000000e6 +360 1 33 48 0.26214400000000000000e6 +360 2 3 9 0.13107200000000000000e6 +360 2 3 17 -0.65536000000000000000e5 +360 2 12 26 0.26214400000000000000e6 +360 2 16 30 -0.13107200000000000000e6 +360 2 20 34 -0.26214400000000000000e6 +360 3 1 6 0.65536000000000000000e5 +360 3 1 30 -0.13107200000000000000e6 +360 3 1 38 -0.65536000000000000000e5 +360 3 2 15 -0.26214400000000000000e6 +360 3 2 23 -0.65536000000000000000e5 +360 3 2 39 -0.65536000000000000000e5 +360 3 3 32 -0.26214400000000000000e6 +360 3 4 9 0.13107200000000000000e6 +360 3 8 37 0.13107200000000000000e6 +360 3 13 42 0.52428800000000000000e6 +360 3 22 35 -0.52428800000000000000e6 +360 3 28 41 -0.26214400000000000000e6 +360 3 29 42 0.26214400000000000000e6 +360 4 1 5 0.65536000000000000000e5 +360 4 2 30 -0.13107200000000000000e6 +360 4 3 31 -0.26214400000000000000e6 +360 4 4 16 0.65536000000000000000e5 +360 4 6 18 -0.13107200000000000000e6 +360 4 6 34 -0.26214400000000000000e6 +361 1 1 40 0.65536000000000000000e5 +361 1 1 48 0.65536000000000000000e5 +361 1 2 25 -0.65536000000000000000e5 +361 1 2 49 0.13107200000000000000e6 +361 1 4 6 0.65536000000000000000e5 +361 1 6 37 0.65536000000000000000e5 +361 1 8 39 0.13107200000000000000e6 +361 1 9 40 0.13107200000000000000e6 +361 1 10 41 -0.26214400000000000000e6 +361 1 12 43 -0.52428800000000000000e6 +361 1 23 38 0.65536000000000000000e5 +361 1 26 41 -0.13107200000000000000e6 +361 1 28 43 0.26214400000000000000e6 +361 1 32 47 0.52428800000000000000e6 +361 2 2 32 0.65536000000000000000e5 +361 2 4 18 0.65536000000000000000e5 +361 2 16 30 0.13107200000000000000e6 +361 2 20 34 0.26214400000000000000e6 +361 3 1 30 0.13107200000000000000e6 +361 3 2 39 0.65536000000000000000e5 +361 3 4 5 -0.65536000000000000000e5 +361 3 10 23 -0.13107200000000000000e6 +361 3 22 35 0.52428800000000000000e6 +361 3 28 41 0.52428800000000000000e6 +361 4 2 30 0.13107200000000000000e6 +361 4 4 16 -0.65536000000000000000e5 +361 4 6 34 0.26214400000000000000e6 +362 1 2 9 -0.65536000000000000000e5 +362 1 4 7 0.65536000000000000000e5 +363 1 1 48 0.32768000000000000000e5 +363 1 2 9 0.65536000000000000000e5 +363 1 2 33 0.13107200000000000000e6 +363 1 2 49 0.32768000000000000000e5 +363 1 3 34 -0.26214400000000000000e6 +363 1 4 8 0.65536000000000000000e5 +363 1 4 11 -0.65536000000000000000e5 +363 1 8 39 0.65536000000000000000e5 +363 1 9 40 0.65536000000000000000e5 +363 1 10 41 0.13107200000000000000e6 +363 1 12 43 -0.26214400000000000000e6 +363 1 23 38 0.32768000000000000000e5 +363 1 26 41 -0.65536000000000000000e5 +363 1 28 43 0.13107200000000000000e6 +363 1 32 47 0.26214400000000000000e6 +363 2 2 8 0.65536000000000000000e5 +363 2 2 32 0.32768000000000000000e5 +363 2 3 9 -0.65536000000000000000e5 +363 2 7 21 0.13107200000000000000e6 +363 2 16 30 0.65536000000000000000e5 +363 2 20 34 0.13107200000000000000e6 +363 3 1 14 -0.13107200000000000000e6 +363 3 2 15 0.13107200000000000000e6 +363 3 3 32 0.26214400000000000000e6 +363 3 4 9 -0.65536000000000000000e5 +363 3 10 23 -0.65536000000000000000e5 +363 3 22 35 0.26214400000000000000e6 +363 3 28 41 0.26214400000000000000e6 +363 4 2 30 0.65536000000000000000e5 +363 4 6 34 0.13107200000000000000e6 +364 1 1 48 -0.32768000000000000000e5 +364 1 2 49 -0.32768000000000000000e5 +364 1 4 9 0.65536000000000000000e5 +364 1 4 11 0.65536000000000000000e5 +364 1 8 39 -0.65536000000000000000e5 +364 1 9 40 -0.65536000000000000000e5 +364 1 12 43 0.26214400000000000000e6 +364 1 23 38 -0.32768000000000000000e5 +364 1 26 41 0.65536000000000000000e5 +364 1 28 43 -0.13107200000000000000e6 +364 1 32 47 -0.26214400000000000000e6 +364 2 2 32 -0.32768000000000000000e5 +364 2 3 9 0.65536000000000000000e5 +364 2 16 30 -0.65536000000000000000e5 +364 2 20 34 -0.13107200000000000000e6 +364 3 2 15 -0.13107200000000000000e6 +364 3 3 32 -0.13107200000000000000e6 +364 3 4 9 0.65536000000000000000e5 +364 3 10 23 0.65536000000000000000e5 +364 3 22 35 -0.26214400000000000000e6 +364 3 28 41 -0.26214400000000000000e6 +364 4 2 30 -0.65536000000000000000e5 +364 4 6 34 -0.13107200000000000000e6 +365 1 1 48 0.32768000000000000000e5 +365 1 2 49 0.32768000000000000000e5 +365 1 4 10 0.65536000000000000000e5 +365 1 8 39 0.65536000000000000000e5 +365 1 9 40 0.65536000000000000000e5 +365 1 10 41 -0.13107200000000000000e6 +365 1 12 43 -0.26214400000000000000e6 +365 1 23 38 0.32768000000000000000e5 +365 1 26 41 -0.65536000000000000000e5 +365 1 28 43 0.13107200000000000000e6 +365 1 32 47 0.26214400000000000000e6 +365 2 2 32 0.32768000000000000000e5 +365 2 16 30 0.65536000000000000000e5 +365 2 20 34 0.13107200000000000000e6 +365 3 4 9 -0.65536000000000000000e5 +365 3 10 23 -0.65536000000000000000e5 +365 3 22 35 0.26214400000000000000e6 +365 3 28 41 0.26214400000000000000e6 +365 4 2 30 0.65536000000000000000e5 +365 4 6 34 0.13107200000000000000e6 +366 1 2 33 0.65536000000000000000e5 +366 1 3 34 -0.13107200000000000000e6 +366 1 4 12 0.65536000000000000000e5 +366 1 10 41 0.65536000000000000000e5 +366 2 7 21 0.65536000000000000000e5 +366 3 1 14 -0.65536000000000000000e5 +366 3 3 32 0.65536000000000000000e5 +367 1 2 33 -0.65536000000000000000e5 +367 1 4 13 0.65536000000000000000e5 +367 2 4 10 0.65536000000000000000e5 +367 2 7 21 -0.65536000000000000000e5 +367 3 1 14 0.65536000000000000000e5 +367 3 2 15 0.65536000000000000000e5 +367 3 3 16 -0.13107200000000000000e6 +368 1 4 14 0.65536000000000000000e5 +368 1 10 41 -0.65536000000000000000e5 +368 3 2 15 -0.65536000000000000000e5 +368 3 3 32 -0.65536000000000000000e5 +369 1 4 15 0.65536000000000000000e5 +369 1 6 13 -0.65536000000000000000e5 +370 1 3 34 -0.65536000000000000000e5 +370 1 4 16 0.65536000000000000000e5 +370 3 3 16 -0.65536000000000000000e5 +371 1 3 18 -0.65536000000000000000e5 +371 1 4 17 0.65536000000000000000e5 +372 1 4 18 0.65536000000000000000e5 +372 1 4 35 -0.65536000000000000000e5 +372 3 4 17 -0.65536000000000000000e5 +373 1 4 20 0.65536000000000000000e5 +373 1 10 17 -0.65536000000000000000e5 +374 1 3 18 -0.16384000000000000000e5 +374 1 4 21 0.65536000000000000000e5 +374 1 4 35 0.16384000000000000000e5 +374 1 5 20 -0.32768000000000000000e5 +374 1 5 36 0.32768000000000000000e5 +374 1 10 17 -0.32768000000000000000e5 +374 1 12 43 0.32768000000000000000e5 +374 1 14 45 0.32768000000000000000e5 +374 1 17 32 -0.65536000000000000000e5 +374 1 17 48 -0.16384000000000000000e5 +374 1 18 49 -0.16384000000000000000e5 +374 2 9 23 0.16384000000000000000e5 +374 2 14 28 -0.16384000000000000000e5 +374 3 3 16 -0.16384000000000000000e5 +374 3 4 17 -0.16384000000000000000e5 +374 3 5 34 0.16384000000000000000e5 +374 3 13 42 -0.16384000000000000000e5 +374 3 14 27 0.32768000000000000000e5 +374 3 14 43 -0.16384000000000000000e5 +374 4 2 14 -0.16384000000000000000e5 +374 4 3 15 -0.32768000000000000000e5 +375 1 1 48 -0.65536000000000000000e5 +375 1 4 22 0.65536000000000000000e5 +375 3 1 38 -0.65536000000000000000e5 +375 3 2 23 -0.65536000000000000000e5 +376 1 2 25 -0.65536000000000000000e5 +376 1 4 23 0.65536000000000000000e5 +377 1 2 25 0.65536000000000000000e5 +377 1 2 33 -0.26214400000000000000e6 +377 1 2 49 -0.65536000000000000000e5 +377 1 4 24 0.65536000000000000000e5 +377 1 11 42 0.26214400000000000000e6 +377 1 12 43 0.52428800000000000000e6 +377 1 23 38 -0.65536000000000000000e5 +377 1 28 43 -0.26214400000000000000e6 +377 1 32 47 -0.26214400000000000000e6 +377 1 33 48 -0.26214400000000000000e6 +377 2 2 32 -0.65536000000000000000e5 +377 2 3 17 0.65536000000000000000e5 +377 2 12 26 -0.26214400000000000000e6 +377 3 1 30 0.13107200000000000000e6 +377 3 1 38 0.65536000000000000000e5 +377 3 2 23 0.65536000000000000000e5 +377 3 8 37 -0.13107200000000000000e6 +377 3 10 23 0.13107200000000000000e6 +377 3 13 42 -0.52428800000000000000e6 +377 3 28 41 -0.26214400000000000000e6 +377 3 29 42 -0.26214400000000000000e6 +377 4 3 31 0.26214400000000000000e6 +377 4 6 18 0.13107200000000000000e6 +378 1 1 40 -0.65536000000000000000e5 +378 1 2 33 0.26214400000000000000e6 +378 1 4 25 0.65536000000000000000e5 +378 1 6 37 -0.65536000000000000000e5 +378 1 11 42 -0.26214400000000000000e6 +378 1 12 43 -0.52428800000000000000e6 +378 1 23 38 0.65536000000000000000e5 +378 1 28 43 0.26214400000000000000e6 +378 1 32 47 0.26214400000000000000e6 +378 1 33 48 0.26214400000000000000e6 +378 2 2 32 0.65536000000000000000e5 +378 2 3 17 -0.65536000000000000000e5 +378 2 12 26 0.26214400000000000000e6 +378 3 1 30 -0.26214400000000000000e6 +378 3 1 38 -0.65536000000000000000e5 +378 3 2 23 -0.65536000000000000000e5 +378 3 2 39 -0.65536000000000000000e5 +378 3 8 37 0.13107200000000000000e6 +378 3 10 23 -0.13107200000000000000e6 +378 3 13 42 0.52428800000000000000e6 +378 3 28 41 0.26214400000000000000e6 +378 3 29 42 0.26214400000000000000e6 +378 4 3 31 -0.26214400000000000000e6 +378 4 4 16 0.65536000000000000000e5 +378 4 6 18 -0.13107200000000000000e6 +379 1 1 40 0.65536000000000000000e5 +379 1 1 48 0.65536000000000000000e5 +379 1 2 25 -0.65536000000000000000e5 +379 1 2 49 0.13107200000000000000e6 +379 1 4 26 0.65536000000000000000e5 +379 1 6 37 0.65536000000000000000e5 +379 1 8 39 0.13107200000000000000e6 +379 1 9 40 0.13107200000000000000e6 +379 1 10 41 -0.26214400000000000000e6 +379 1 12 43 -0.52428800000000000000e6 +379 1 23 38 0.65536000000000000000e5 +379 1 26 41 -0.13107200000000000000e6 +379 1 28 43 0.26214400000000000000e6 +379 1 32 47 0.52428800000000000000e6 +379 2 2 32 0.65536000000000000000e5 +379 2 4 18 0.65536000000000000000e5 +379 2 16 30 0.13107200000000000000e6 +379 2 20 34 0.26214400000000000000e6 +379 3 1 30 0.13107200000000000000e6 +379 3 2 39 0.65536000000000000000e5 +379 3 10 23 -0.13107200000000000000e6 +379 3 22 35 0.52428800000000000000e6 +379 3 28 41 0.52428800000000000000e6 +379 4 2 30 0.13107200000000000000e6 +379 4 4 16 -0.65536000000000000000e5 +379 4 6 34 0.26214400000000000000e6 +380 1 1 48 -0.32768000000000000000e5 +380 1 2 33 -0.13107200000000000000e6 +380 1 2 49 -0.32768000000000000000e5 +380 1 4 27 0.65536000000000000000e5 +380 1 11 42 0.13107200000000000000e6 +380 1 12 43 0.26214400000000000000e6 +380 1 23 38 -0.32768000000000000000e5 +380 1 28 43 -0.13107200000000000000e6 +380 1 32 47 -0.13107200000000000000e6 +380 1 33 48 -0.13107200000000000000e6 +380 2 2 32 -0.32768000000000000000e5 +380 2 12 26 -0.13107200000000000000e6 +380 3 1 30 0.65536000000000000000e5 +380 3 8 37 -0.65536000000000000000e5 +380 3 10 23 0.65536000000000000000e5 +380 3 13 42 -0.26214400000000000000e6 +380 3 28 41 -0.13107200000000000000e6 +380 3 29 42 -0.13107200000000000000e6 +380 4 3 31 0.13107200000000000000e6 +380 4 6 18 0.65536000000000000000e5 +381 1 4 28 0.65536000000000000000e5 +381 1 8 39 -0.65536000000000000000e5 +381 3 1 30 -0.65536000000000000000e5 +382 1 1 48 0.32768000000000000000e5 +382 1 2 49 0.32768000000000000000e5 +382 1 4 29 0.65536000000000000000e5 +382 1 8 39 0.65536000000000000000e5 +382 1 9 40 0.65536000000000000000e5 +382 1 10 41 -0.13107200000000000000e6 +382 1 12 43 -0.26214400000000000000e6 +382 1 23 38 0.32768000000000000000e5 +382 1 26 41 -0.65536000000000000000e5 +382 1 28 43 0.13107200000000000000e6 +382 1 32 47 0.26214400000000000000e6 +382 2 2 32 0.32768000000000000000e5 +382 2 16 30 0.65536000000000000000e5 +382 2 20 34 0.13107200000000000000e6 +382 3 10 23 -0.65536000000000000000e5 +382 3 22 35 0.26214400000000000000e6 +382 3 28 41 0.26214400000000000000e6 +382 4 2 30 0.65536000000000000000e5 +382 4 6 34 0.13107200000000000000e6 +383 1 4 30 0.65536000000000000000e5 +383 1 10 25 -0.65536000000000000000e5 +384 1 2 33 -0.65536000000000000000e5 +384 1 4 31 0.65536000000000000000e5 +385 1 4 32 0.65536000000000000000e5 +385 1 10 41 -0.65536000000000000000e5 +385 3 3 32 -0.65536000000000000000e5 +386 1 2 33 0.65536000000000000000e5 +386 1 4 33 0.65536000000000000000e5 +386 1 10 41 0.65536000000000000000e5 +386 1 12 43 -0.13107200000000000000e6 +386 2 12 26 0.65536000000000000000e5 +386 3 3 32 0.65536000000000000000e5 +386 3 14 27 -0.13107200000000000000e6 +386 4 8 20 0.65536000000000000000e5 +387 1 4 34 0.65536000000000000000e5 +387 1 12 43 -0.65536000000000000000e5 +387 3 14 27 -0.65536000000000000000e5 +388 1 4 35 -0.32768000000000000000e5 +388 1 4 36 0.65536000000000000000e5 +388 1 12 43 -0.32768000000000000000e5 +388 1 14 45 -0.65536000000000000000e5 +388 1 17 48 0.32768000000000000000e5 +388 1 18 49 0.32768000000000000000e5 +388 2 9 23 -0.32768000000000000000e5 +388 2 14 28 0.32768000000000000000e5 +388 3 5 34 -0.32768000000000000000e5 +388 3 13 42 0.32768000000000000000e5 +388 3 14 27 -0.32768000000000000000e5 +388 3 14 43 0.32768000000000000000e5 +389 1 1 40 -0.65536000000000000000e5 +389 1 4 37 0.65536000000000000000e5 +390 1 2 49 -0.65536000000000000000e5 +390 1 4 38 0.65536000000000000000e5 +390 3 2 39 -0.65536000000000000000e5 +391 1 4 39 0.65536000000000000000e5 +391 1 6 37 -0.65536000000000000000e5 +392 1 1 48 0.65536000000000000000e5 +392 1 2 49 0.13107200000000000000e6 +392 1 4 40 0.65536000000000000000e5 +392 1 8 39 0.13107200000000000000e6 +392 1 9 40 0.13107200000000000000e6 +392 1 10 41 -0.26214400000000000000e6 +392 1 12 43 -0.52428800000000000000e6 +392 1 23 38 0.65536000000000000000e5 +392 1 24 39 0.65536000000000000000e5 +392 1 26 41 -0.13107200000000000000e6 +392 1 28 43 0.26214400000000000000e6 +392 1 32 47 0.52428800000000000000e6 +392 2 2 32 0.65536000000000000000e5 +392 2 3 33 0.65536000000000000000e5 +392 2 16 30 0.13107200000000000000e6 +392 2 20 34 0.26214400000000000000e6 +392 3 3 40 -0.65536000000000000000e5 +392 3 9 38 0.13107200000000000000e6 +392 3 22 35 0.52428800000000000000e6 +392 3 28 41 0.52428800000000000000e6 +392 4 2 30 0.13107200000000000000e6 +392 4 6 34 0.26214400000000000000e6 +393 1 4 41 0.65536000000000000000e5 +393 1 8 39 -0.65536000000000000000e5 +394 1 1 48 0.32768000000000000000e5 +394 1 2 49 0.32768000000000000000e5 +394 1 4 42 0.65536000000000000000e5 +394 1 8 39 0.65536000000000000000e5 +394 1 9 40 0.65536000000000000000e5 +394 1 10 41 -0.13107200000000000000e6 +394 1 12 43 -0.26214400000000000000e6 +394 1 23 38 0.32768000000000000000e5 +394 1 26 41 -0.65536000000000000000e5 +394 1 28 43 0.13107200000000000000e6 +394 1 32 47 0.26214400000000000000e6 +394 2 2 32 0.32768000000000000000e5 +394 2 16 30 0.65536000000000000000e5 +394 2 20 34 0.13107200000000000000e6 +394 3 22 35 0.26214400000000000000e6 +394 3 28 41 0.26214400000000000000e6 +394 4 2 30 0.65536000000000000000e5 +394 4 6 34 0.13107200000000000000e6 +395 1 4 43 0.65536000000000000000e5 +395 1 9 40 -0.65536000000000000000e5 +396 1 4 44 0.65536000000000000000e5 +396 1 10 41 -0.65536000000000000000e5 +397 1 4 45 0.65536000000000000000e5 +397 1 10 41 0.65536000000000000000e5 +397 1 11 42 0.65536000000000000000e5 +397 1 28 43 -0.65536000000000000000e5 +397 1 32 47 -0.65536000000000000000e5 +397 1 33 48 -0.65536000000000000000e5 +397 3 13 42 -0.13107200000000000000e6 +397 3 28 41 -0.65536000000000000000e5 +397 3 29 42 -0.65536000000000000000e5 +397 4 3 31 0.65536000000000000000e5 +398 1 4 46 0.65536000000000000000e5 +398 1 17 48 -0.65536000000000000000e5 +398 3 13 42 -0.65536000000000000000e5 +399 1 2 49 -0.65536000000000000000e5 +399 1 4 47 0.65536000000000000000e5 +400 1 4 48 0.65536000000000000000e5 +400 1 24 39 -0.65536000000000000000e5 +401 1 1 48 0.65536000000000000000e5 +401 1 2 49 0.13107200000000000000e6 +401 1 4 49 0.65536000000000000000e5 +401 1 8 39 0.13107200000000000000e6 +401 1 9 40 0.13107200000000000000e6 +401 1 10 41 -0.26214400000000000000e6 +401 1 12 43 -0.52428800000000000000e6 +401 1 23 38 0.65536000000000000000e5 +401 1 24 39 0.65536000000000000000e5 +401 1 26 41 -0.13107200000000000000e6 +401 1 28 43 0.26214400000000000000e6 +401 1 32 47 0.52428800000000000000e6 +401 2 2 32 0.65536000000000000000e5 +401 2 3 33 0.65536000000000000000e5 +401 2 16 30 0.13107200000000000000e6 +401 2 20 34 0.26214400000000000000e6 +401 3 9 38 0.13107200000000000000e6 +401 3 22 35 0.52428800000000000000e6 +401 3 28 41 0.52428800000000000000e6 +401 4 2 30 0.13107200000000000000e6 +401 4 6 34 0.26214400000000000000e6 +402 1 1 48 0.32768000000000000000e5 +402 1 2 49 0.32768000000000000000e5 +402 1 4 50 0.65536000000000000000e5 +402 1 8 39 0.65536000000000000000e5 +402 1 9 40 0.65536000000000000000e5 +402 1 10 41 -0.13107200000000000000e6 +402 1 12 43 -0.26214400000000000000e6 +402 1 23 38 0.32768000000000000000e5 +402 1 26 41 -0.65536000000000000000e5 +402 1 28 43 0.13107200000000000000e6 +402 1 32 47 0.26214400000000000000e6 +402 2 2 32 0.32768000000000000000e5 +402 2 16 30 0.65536000000000000000e5 +402 2 20 34 0.13107200000000000000e6 +402 3 9 38 0.65536000000000000000e5 +402 3 22 35 0.26214400000000000000e6 +402 3 28 41 0.26214400000000000000e6 +402 4 2 30 0.65536000000000000000e5 +402 4 6 34 0.13107200000000000000e6 +403 1 4 51 0.65536000000000000000e5 +403 1 26 41 -0.65536000000000000000e5 +404 1 4 52 0.65536000000000000000e5 +404 1 28 43 -0.65536000000000000000e5 +405 1 4 53 0.65536000000000000000e5 +405 1 6 53 0.65536000000000000000e5 +405 1 24 39 -0.65536000000000000000e5 +405 1 25 40 -0.65536000000000000000e5 +405 3 25 38 -0.65536000000000000000e5 +405 3 27 40 0.13107200000000000000e6 +405 4 4 32 -0.65536000000000000000e5 +406 1 1 48 0.65536000000000000000e5 +406 1 2 49 0.13107200000000000000e6 +406 1 4 54 0.65536000000000000000e5 +406 1 8 39 0.13107200000000000000e6 +406 1 9 40 0.13107200000000000000e6 +406 1 10 41 -0.26214400000000000000e6 +406 1 12 43 -0.52428800000000000000e6 +406 1 23 38 0.65536000000000000000e5 +406 1 24 39 0.65536000000000000000e5 +406 1 26 41 -0.13107200000000000000e6 +406 1 28 43 0.26214400000000000000e6 +406 1 32 47 0.52428800000000000000e6 +406 2 2 32 0.65536000000000000000e5 +406 2 3 33 0.65536000000000000000e5 +406 2 16 30 0.13107200000000000000e6 +406 2 20 34 0.26214400000000000000e6 +406 3 9 38 0.13107200000000000000e6 +406 3 22 35 0.52428800000000000000e6 +406 3 25 38 0.65536000000000000000e5 +406 3 28 41 0.52428800000000000000e6 +406 4 2 30 0.13107200000000000000e6 +406 4 6 34 0.26214400000000000000e6 +407 1 4 55 0.65536000000000000000e5 +407 1 26 41 -0.65536000000000000000e5 +407 3 27 40 0.65536000000000000000e5 +408 1 4 56 0.65536000000000000000e5 +408 1 40 47 -0.65536000000000000000e5 +409 1 1 40 0.32768000000000000000e5 +409 1 1 48 0.32768000000000000000e5 +409 1 2 25 -0.32768000000000000000e5 +409 1 2 49 0.65536000000000000000e5 +409 1 5 5 0.65536000000000000000e5 +409 1 6 37 0.32768000000000000000e5 +409 1 8 39 0.65536000000000000000e5 +409 1 9 40 0.65536000000000000000e5 +409 1 10 41 -0.13107200000000000000e6 +409 1 12 43 -0.26214400000000000000e6 +409 1 23 38 0.32768000000000000000e5 +409 1 26 41 -0.65536000000000000000e5 +409 1 28 43 0.13107200000000000000e6 +409 1 32 47 0.26214400000000000000e6 +409 2 2 32 0.32768000000000000000e5 +409 2 4 18 0.32768000000000000000e5 +409 2 16 30 0.65536000000000000000e5 +409 2 20 34 0.13107200000000000000e6 +409 3 1 30 0.65536000000000000000e5 +409 3 2 39 0.32768000000000000000e5 +409 3 4 5 -0.32768000000000000000e5 +409 3 10 23 -0.65536000000000000000e5 +409 3 22 35 0.26214400000000000000e6 +409 3 28 41 0.26214400000000000000e6 +409 4 2 30 0.65536000000000000000e5 +409 4 4 16 -0.32768000000000000000e5 +409 4 6 34 0.13107200000000000000e6 +410 1 2 5 -0.65536000000000000000e5 +410 1 2 25 0.13107200000000000000e6 +410 1 2 33 -0.26214400000000000000e6 +410 1 2 49 -0.65536000000000000000e5 +410 1 4 11 -0.26214400000000000000e6 +410 1 5 6 0.65536000000000000000e5 +410 1 8 39 -0.13107200000000000000e6 +410 1 10 41 0.26214400000000000000e6 +410 1 11 42 0.26214400000000000000e6 +410 1 12 43 0.52428800000000000000e6 +410 1 23 38 -0.65536000000000000000e5 +410 1 28 43 -0.26214400000000000000e6 +410 1 32 47 -0.26214400000000000000e6 +410 1 33 48 -0.26214400000000000000e6 +410 2 2 32 -0.65536000000000000000e5 +410 2 3 9 -0.13107200000000000000e6 +410 2 3 17 0.65536000000000000000e5 +410 2 4 18 -0.65536000000000000000e5 +410 2 5 27 0.65536000000000000000e5 +410 2 12 26 -0.26214400000000000000e6 +410 3 1 6 -0.65536000000000000000e5 +410 3 1 38 0.65536000000000000000e5 +410 3 2 15 0.26214400000000000000e6 +410 3 2 23 0.65536000000000000000e5 +410 3 3 32 0.26214400000000000000e6 +410 3 4 5 0.65536000000000000000e5 +410 3 4 9 -0.13107200000000000000e6 +410 3 8 37 -0.13107200000000000000e6 +410 3 10 23 0.13107200000000000000e6 +410 3 13 42 -0.52428800000000000000e6 +410 3 28 41 -0.26214400000000000000e6 +410 3 29 42 -0.26214400000000000000e6 +410 4 1 5 -0.65536000000000000000e5 +410 4 3 31 0.26214400000000000000e6 +410 4 4 4 0.13107200000000000000e6 +410 4 5 17 0.65536000000000000000e5 +410 4 6 18 0.13107200000000000000e6 +411 1 1 48 0.32768000000000000000e5 +411 1 2 9 0.65536000000000000000e5 +411 1 2 33 0.13107200000000000000e6 +411 1 2 49 0.32768000000000000000e5 +411 1 3 34 -0.26214400000000000000e6 +411 1 4 11 -0.65536000000000000000e5 +411 1 5 7 0.65536000000000000000e5 +411 1 8 39 0.65536000000000000000e5 +411 1 9 40 0.65536000000000000000e5 +411 1 10 41 0.13107200000000000000e6 +411 1 12 43 -0.26214400000000000000e6 +411 1 23 38 0.32768000000000000000e5 +411 1 26 41 -0.65536000000000000000e5 +411 1 28 43 0.13107200000000000000e6 +411 1 32 47 0.26214400000000000000e6 +411 2 2 8 0.65536000000000000000e5 +411 2 2 32 0.32768000000000000000e5 +411 2 3 9 -0.65536000000000000000e5 +411 2 7 21 0.13107200000000000000e6 +411 2 16 30 0.65536000000000000000e5 +411 2 20 34 0.13107200000000000000e6 +411 3 1 14 -0.13107200000000000000e6 +411 3 2 15 0.13107200000000000000e6 +411 3 3 32 0.26214400000000000000e6 +411 3 4 9 -0.65536000000000000000e5 +411 3 10 23 -0.65536000000000000000e5 +411 3 22 35 0.26214400000000000000e6 +411 3 28 41 0.26214400000000000000e6 +411 4 2 30 0.65536000000000000000e5 +411 4 6 34 0.13107200000000000000e6 +412 1 1 48 -0.32768000000000000000e5 +412 1 2 49 -0.32768000000000000000e5 +412 1 4 11 0.65536000000000000000e5 +412 1 5 8 0.65536000000000000000e5 +412 1 8 39 -0.65536000000000000000e5 +412 1 9 40 -0.65536000000000000000e5 +412 1 12 43 0.26214400000000000000e6 +412 1 23 38 -0.32768000000000000000e5 +412 1 26 41 0.65536000000000000000e5 +412 1 28 43 -0.13107200000000000000e6 +412 1 32 47 -0.26214400000000000000e6 +412 2 2 32 -0.32768000000000000000e5 +412 2 3 9 0.65536000000000000000e5 +412 2 16 30 -0.65536000000000000000e5 +412 2 20 34 -0.13107200000000000000e6 +412 3 2 15 -0.13107200000000000000e6 +412 3 3 32 -0.13107200000000000000e6 +412 3 4 9 0.65536000000000000000e5 +412 3 10 23 0.65536000000000000000e5 +412 3 22 35 -0.26214400000000000000e6 +412 3 28 41 -0.26214400000000000000e6 +412 4 2 30 -0.65536000000000000000e5 +412 4 6 34 -0.13107200000000000000e6 +413 1 1 48 0.32768000000000000000e5 +413 1 2 49 0.32768000000000000000e5 +413 1 5 9 0.65536000000000000000e5 +413 1 8 39 0.65536000000000000000e5 +413 1 9 40 0.65536000000000000000e5 +413 1 10 41 -0.13107200000000000000e6 +413 1 12 43 -0.26214400000000000000e6 +413 1 23 38 0.32768000000000000000e5 +413 1 26 41 -0.65536000000000000000e5 +413 1 28 43 0.13107200000000000000e6 +413 1 32 47 0.26214400000000000000e6 +413 2 2 32 0.32768000000000000000e5 +413 2 16 30 0.65536000000000000000e5 +413 2 20 34 0.13107200000000000000e6 +413 3 4 9 -0.65536000000000000000e5 +413 3 10 23 -0.65536000000000000000e5 +413 3 22 35 0.26214400000000000000e6 +413 3 28 41 0.26214400000000000000e6 +413 4 2 30 0.65536000000000000000e5 +413 4 6 34 0.13107200000000000000e6 +414 1 4 11 -0.65536000000000000000e5 +414 1 5 10 0.65536000000000000000e5 +415 1 1 48 -0.32768000000000000000e5 +415 1 2 49 -0.32768000000000000000e5 +415 1 4 11 0.65536000000000000000e5 +415 1 5 11 0.65536000000000000000e5 +415 1 6 13 -0.13107200000000000000e6 +415 1 8 39 -0.65536000000000000000e5 +415 1 9 40 -0.13107200000000000000e6 +415 1 11 42 -0.13107200000000000000e6 +415 1 12 43 0.26214400000000000000e6 +415 1 23 38 -0.32768000000000000000e5 +415 1 26 41 0.13107200000000000000e6 +415 1 28 43 -0.13107200000000000000e6 +415 1 32 47 -0.13107200000000000000e6 +415 1 33 48 0.13107200000000000000e6 +415 2 2 32 -0.32768000000000000000e5 +415 2 4 34 0.65536000000000000000e5 +415 2 16 30 -0.65536000000000000000e5 +415 2 20 34 -0.13107200000000000000e6 +415 3 4 9 0.65536000000000000000e5 +415 3 9 38 -0.65536000000000000000e5 +415 3 10 23 0.65536000000000000000e5 +415 3 10 39 -0.65536000000000000000e5 +415 3 13 42 0.26214400000000000000e6 +415 3 22 35 -0.26214400000000000000e6 +415 3 28 41 -0.13107200000000000000e6 +415 3 29 42 0.13107200000000000000e6 +415 4 2 30 -0.65536000000000000000e5 +415 4 3 31 -0.13107200000000000000e6 +415 4 4 8 0.65536000000000000000e5 +415 4 6 34 -0.13107200000000000000e6 +415 4 7 19 0.65536000000000000000e5 +416 1 2 33 -0.65536000000000000000e5 +416 1 5 12 0.65536000000000000000e5 +416 2 4 10 0.65536000000000000000e5 +416 2 7 21 -0.65536000000000000000e5 +416 3 1 14 0.65536000000000000000e5 +416 3 2 15 0.65536000000000000000e5 +416 3 3 16 -0.13107200000000000000e6 +417 1 5 13 0.65536000000000000000e5 +417 1 10 41 -0.65536000000000000000e5 +417 3 2 15 -0.65536000000000000000e5 +417 3 3 32 -0.65536000000000000000e5 +418 1 5 14 0.65536000000000000000e5 +418 1 6 13 -0.65536000000000000000e5 +419 1 4 35 -0.13107200000000000000e6 +419 1 5 15 0.65536000000000000000e5 +419 1 6 13 0.65536000000000000000e5 +419 1 10 41 0.65536000000000000000e5 +419 2 5 11 0.65536000000000000000e5 +419 3 2 15 0.65536000000000000000e5 +419 3 3 32 0.65536000000000000000e5 +419 3 4 17 -0.13107200000000000000e6 +420 1 3 18 -0.65536000000000000000e5 +420 1 5 16 0.65536000000000000000e5 +421 1 4 35 -0.65536000000000000000e5 +421 1 5 17 0.65536000000000000000e5 +421 3 4 17 -0.65536000000000000000e5 +422 1 5 18 0.65536000000000000000e5 +422 1 5 20 -0.13107200000000000000e6 +422 1 5 36 0.13107200000000000000e6 +422 1 14 45 -0.13107200000000000000e6 +422 1 17 48 0.65536000000000000000e5 +422 1 18 49 0.65536000000000000000e5 +422 2 14 28 0.65536000000000000000e5 +422 3 4 17 0.65536000000000000000e5 +422 3 5 18 0.65536000000000000000e5 +422 3 5 34 -0.65536000000000000000e5 +422 3 13 42 0.65536000000000000000e5 +422 3 14 43 0.65536000000000000000e5 +422 4 8 12 0.65536000000000000000e5 +423 1 5 19 0.65536000000000000000e5 +423 1 10 17 -0.65536000000000000000e5 +424 1 3 18 0.16384000000000000000e5 +424 1 4 35 -0.16384000000000000000e5 +424 1 5 20 0.32768000000000000000e5 +424 1 5 21 0.65536000000000000000e5 +424 1 5 36 -0.32768000000000000000e5 +424 1 10 17 0.32768000000000000000e5 +424 1 12 43 -0.32768000000000000000e5 +424 1 13 20 -0.13107200000000000000e6 +424 1 14 45 -0.32768000000000000000e5 +424 1 17 32 0.65536000000000000000e5 +424 1 17 48 0.16384000000000000000e5 +424 1 18 49 0.16384000000000000000e5 +424 1 20 27 0.65536000000000000000e5 +424 2 9 23 -0.16384000000000000000e5 +424 2 11 25 0.65536000000000000000e5 +424 2 14 28 0.16384000000000000000e5 +424 3 3 16 0.16384000000000000000e5 +424 3 4 17 0.16384000000000000000e5 +424 3 5 34 -0.16384000000000000000e5 +424 3 7 20 0.65536000000000000000e5 +424 3 13 42 0.16384000000000000000e5 +424 3 14 27 -0.32768000000000000000e5 +424 3 14 43 0.16384000000000000000e5 +424 4 2 14 0.16384000000000000000e5 +424 4 3 15 0.32768000000000000000e5 +424 4 10 14 0.65536000000000000000e5 +425 1 2 25 -0.65536000000000000000e5 +425 1 5 22 0.65536000000000000000e5 +426 1 2 25 0.65536000000000000000e5 +426 1 2 33 -0.26214400000000000000e6 +426 1 2 49 -0.65536000000000000000e5 +426 1 5 23 0.65536000000000000000e5 +426 1 11 42 0.26214400000000000000e6 +426 1 12 43 0.52428800000000000000e6 +426 1 23 38 -0.65536000000000000000e5 +426 1 28 43 -0.26214400000000000000e6 +426 1 32 47 -0.26214400000000000000e6 +426 1 33 48 -0.26214400000000000000e6 +426 2 2 32 -0.65536000000000000000e5 +426 2 3 17 0.65536000000000000000e5 +426 2 12 26 -0.26214400000000000000e6 +426 3 1 30 0.13107200000000000000e6 +426 3 1 38 0.65536000000000000000e5 +426 3 2 23 0.65536000000000000000e5 +426 3 8 37 -0.13107200000000000000e6 +426 3 10 23 0.13107200000000000000e6 +426 3 13 42 -0.52428800000000000000e6 +426 3 28 41 -0.26214400000000000000e6 +426 3 29 42 -0.26214400000000000000e6 +426 4 3 31 0.26214400000000000000e6 +426 4 6 18 0.13107200000000000000e6 +427 1 1 40 -0.65536000000000000000e5 +427 1 2 33 0.26214400000000000000e6 +427 1 5 24 0.65536000000000000000e5 +427 1 6 37 -0.65536000000000000000e5 +427 1 11 42 -0.26214400000000000000e6 +427 1 12 43 -0.52428800000000000000e6 +427 1 23 38 0.65536000000000000000e5 +427 1 28 43 0.26214400000000000000e6 +427 1 32 47 0.26214400000000000000e6 +427 1 33 48 0.26214400000000000000e6 +427 2 2 32 0.65536000000000000000e5 +427 2 3 17 -0.65536000000000000000e5 +427 2 12 26 0.26214400000000000000e6 +427 3 1 30 -0.26214400000000000000e6 +427 3 1 38 -0.65536000000000000000e5 +427 3 2 23 -0.65536000000000000000e5 +427 3 2 39 -0.65536000000000000000e5 +427 3 8 37 0.13107200000000000000e6 +427 3 10 23 -0.13107200000000000000e6 +427 3 13 42 0.52428800000000000000e6 +427 3 28 41 0.26214400000000000000e6 +427 3 29 42 0.26214400000000000000e6 +427 4 3 31 -0.26214400000000000000e6 +427 4 4 16 0.65536000000000000000e5 +427 4 6 18 -0.13107200000000000000e6 +428 1 1 40 0.65536000000000000000e5 +428 1 1 48 0.65536000000000000000e5 +428 1 2 25 -0.65536000000000000000e5 +428 1 2 49 0.13107200000000000000e6 +428 1 5 25 0.65536000000000000000e5 +428 1 6 37 0.65536000000000000000e5 +428 1 8 39 0.13107200000000000000e6 +428 1 9 40 0.13107200000000000000e6 +428 1 10 41 -0.26214400000000000000e6 +428 1 12 43 -0.52428800000000000000e6 +428 1 23 38 0.65536000000000000000e5 +428 1 26 41 -0.13107200000000000000e6 +428 1 28 43 0.26214400000000000000e6 +428 1 32 47 0.52428800000000000000e6 +428 2 2 32 0.65536000000000000000e5 +428 2 4 18 0.65536000000000000000e5 +428 2 16 30 0.13107200000000000000e6 +428 2 20 34 0.26214400000000000000e6 +428 3 1 30 0.13107200000000000000e6 +428 3 2 39 0.65536000000000000000e5 +428 3 10 23 -0.13107200000000000000e6 +428 3 22 35 0.52428800000000000000e6 +428 3 28 41 0.52428800000000000000e6 +428 4 2 30 0.13107200000000000000e6 +428 4 4 16 -0.65536000000000000000e5 +428 4 6 34 0.26214400000000000000e6 +429 1 1 48 -0.65536000000000000000e5 +429 1 2 25 0.65536000000000000000e5 +429 1 2 33 -0.26214400000000000000e6 +429 1 2 49 -0.13107200000000000000e6 +429 1 5 26 0.65536000000000000000e5 +429 1 8 39 -0.13107200000000000000e6 +429 1 9 40 -0.13107200000000000000e6 +429 1 10 25 -0.13107200000000000000e6 +429 1 10 41 0.26214400000000000000e6 +429 1 11 42 0.26214400000000000000e6 +429 1 12 43 0.10485760000000000000e7 +429 1 23 38 -0.13107200000000000000e6 +429 1 26 41 0.13107200000000000000e6 +429 1 28 43 -0.52428800000000000000e6 +429 1 32 47 -0.78643200000000000000e6 +429 1 33 48 -0.26214400000000000000e6 +429 2 2 32 -0.13107200000000000000e6 +429 2 3 17 0.65536000000000000000e5 +429 2 4 18 -0.65536000000000000000e5 +429 2 5 27 0.65536000000000000000e5 +429 2 12 26 -0.26214400000000000000e6 +429 2 16 30 -0.13107200000000000000e6 +429 2 20 34 -0.26214400000000000000e6 +429 3 1 30 0.13107200000000000000e6 +429 3 1 38 0.65536000000000000000e5 +429 3 2 23 0.65536000000000000000e5 +429 3 8 37 -0.13107200000000000000e6 +429 3 10 23 0.26214400000000000000e6 +429 3 13 42 -0.52428800000000000000e6 +429 3 22 35 -0.52428800000000000000e6 +429 3 28 41 -0.78643200000000000000e6 +429 3 29 42 -0.26214400000000000000e6 +429 4 2 30 -0.13107200000000000000e6 +429 4 3 31 0.26214400000000000000e6 +429 4 5 17 0.65536000000000000000e5 +429 4 6 18 0.13107200000000000000e6 +429 4 6 34 -0.26214400000000000000e6 +430 1 5 27 0.65536000000000000000e5 +430 1 8 39 -0.65536000000000000000e5 +430 3 1 30 -0.65536000000000000000e5 +431 1 1 48 0.32768000000000000000e5 +431 1 2 49 0.32768000000000000000e5 +431 1 5 28 0.65536000000000000000e5 +431 1 8 39 0.65536000000000000000e5 +431 1 9 40 0.65536000000000000000e5 +431 1 10 41 -0.13107200000000000000e6 +431 1 12 43 -0.26214400000000000000e6 +431 1 23 38 0.32768000000000000000e5 +431 1 26 41 -0.65536000000000000000e5 +431 1 28 43 0.13107200000000000000e6 +431 1 32 47 0.26214400000000000000e6 +431 2 2 32 0.32768000000000000000e5 +431 2 16 30 0.65536000000000000000e5 +431 2 20 34 0.13107200000000000000e6 +431 3 10 23 -0.65536000000000000000e5 +431 3 22 35 0.26214400000000000000e6 +431 3 28 41 0.26214400000000000000e6 +431 4 2 30 0.65536000000000000000e5 +431 4 6 34 0.13107200000000000000e6 +432 1 5 29 0.65536000000000000000e5 +432 1 10 25 -0.65536000000000000000e5 +433 1 1 48 -0.32768000000000000000e5 +433 1 2 33 0.13107200000000000000e6 +433 1 2 49 -0.32768000000000000000e5 +433 1 5 30 0.65536000000000000000e5 +433 1 8 39 -0.65536000000000000000e5 +433 1 9 40 -0.13107200000000000000e6 +433 1 10 25 0.65536000000000000000e5 +433 1 10 41 0.13107200000000000000e6 +433 1 11 42 -0.13107200000000000000e6 +433 1 23 38 -0.32768000000000000000e5 +433 1 26 41 0.13107200000000000000e6 +433 1 28 43 -0.13107200000000000000e6 +433 1 32 47 -0.13107200000000000000e6 +433 1 33 48 0.13107200000000000000e6 +433 2 2 32 -0.32768000000000000000e5 +433 2 4 34 0.65536000000000000000e5 +433 2 12 26 0.13107200000000000000e6 +433 2 16 30 -0.65536000000000000000e5 +433 2 20 34 -0.13107200000000000000e6 +433 3 3 32 0.13107200000000000000e6 +433 3 9 38 -0.65536000000000000000e5 +433 3 10 23 0.65536000000000000000e5 +433 3 10 39 -0.65536000000000000000e5 +433 3 13 42 0.26214400000000000000e6 +433 3 14 27 -0.26214400000000000000e6 +433 3 22 35 -0.26214400000000000000e6 +433 3 28 41 -0.13107200000000000000e6 +433 3 29 42 0.13107200000000000000e6 +433 4 2 30 -0.65536000000000000000e5 +433 4 3 31 -0.13107200000000000000e6 +433 4 6 34 -0.13107200000000000000e6 +433 4 7 19 0.65536000000000000000e5 +433 4 8 20 0.13107200000000000000e6 +434 1 5 31 0.65536000000000000000e5 +434 1 10 41 -0.65536000000000000000e5 +434 3 3 32 -0.65536000000000000000e5 +435 1 2 33 0.65536000000000000000e5 +435 1 5 32 0.65536000000000000000e5 +435 1 10 41 0.65536000000000000000e5 +435 1 12 43 -0.13107200000000000000e6 +435 2 12 26 0.65536000000000000000e5 +435 3 3 32 0.65536000000000000000e5 +435 3 14 27 -0.13107200000000000000e6 +435 4 8 20 0.65536000000000000000e5 +436 1 5 33 0.65536000000000000000e5 +436 1 11 42 -0.65536000000000000000e5 +436 3 4 33 -0.65536000000000000000e5 +437 1 4 35 -0.65536000000000000000e5 +437 1 5 34 0.65536000000000000000e5 +438 1 5 35 0.65536000000000000000e5 +438 1 14 45 -0.13107200000000000000e6 +438 1 17 48 0.65536000000000000000e5 +438 1 18 49 0.65536000000000000000e5 +438 2 14 28 0.65536000000000000000e5 +438 3 5 34 -0.65536000000000000000e5 +438 3 13 42 0.65536000000000000000e5 +438 3 14 43 0.65536000000000000000e5 +439 1 2 49 -0.65536000000000000000e5 +439 1 5 37 0.65536000000000000000e5 +439 3 2 39 -0.65536000000000000000e5 +440 1 5 38 0.65536000000000000000e5 +440 1 6 37 -0.65536000000000000000e5 +441 1 1 48 0.65536000000000000000e5 +441 1 2 49 0.13107200000000000000e6 +441 1 5 39 0.65536000000000000000e5 +441 1 8 39 0.13107200000000000000e6 +441 1 9 40 0.13107200000000000000e6 +441 1 10 41 -0.26214400000000000000e6 +441 1 12 43 -0.52428800000000000000e6 +441 1 23 38 0.65536000000000000000e5 +441 1 24 39 0.65536000000000000000e5 +441 1 26 41 -0.13107200000000000000e6 +441 1 28 43 0.26214400000000000000e6 +441 1 32 47 0.52428800000000000000e6 +441 2 2 32 0.65536000000000000000e5 +441 2 3 33 0.65536000000000000000e5 +441 2 16 30 0.13107200000000000000e6 +441 2 20 34 0.26214400000000000000e6 +441 3 3 40 -0.65536000000000000000e5 +441 3 9 38 0.13107200000000000000e6 +441 3 22 35 0.52428800000000000000e6 +441 3 28 41 0.52428800000000000000e6 +441 4 2 30 0.13107200000000000000e6 +441 4 6 34 0.26214400000000000000e6 +442 1 1 48 -0.65536000000000000000e5 +442 1 2 49 -0.13107200000000000000e6 +442 1 5 40 0.65536000000000000000e5 +442 1 6 37 0.65536000000000000000e5 +442 1 8 39 -0.13107200000000000000e6 +442 1 9 40 -0.26214400000000000000e6 +442 1 10 41 0.26214400000000000000e6 +442 1 12 43 0.52428800000000000000e6 +442 1 23 38 -0.65536000000000000000e5 +442 1 24 39 -0.65536000000000000000e5 +442 1 26 41 0.13107200000000000000e6 +442 1 28 43 -0.26214400000000000000e6 +442 1 32 47 -0.52428800000000000000e6 +442 2 2 32 -0.65536000000000000000e5 +442 2 3 33 -0.65536000000000000000e5 +442 2 5 27 0.65536000000000000000e5 +442 2 16 30 -0.13107200000000000000e6 +442 2 20 34 -0.26214400000000000000e6 +442 3 3 40 0.65536000000000000000e5 +442 3 9 38 -0.13107200000000000000e6 +442 3 22 35 -0.52428800000000000000e6 +442 3 28 41 -0.52428800000000000000e6 +442 4 2 30 -0.13107200000000000000e6 +442 4 6 34 -0.26214400000000000000e6 +443 1 1 48 0.32768000000000000000e5 +443 1 2 49 0.32768000000000000000e5 +443 1 5 41 0.65536000000000000000e5 +443 1 8 39 0.65536000000000000000e5 +443 1 9 40 0.65536000000000000000e5 +443 1 10 41 -0.13107200000000000000e6 +443 1 12 43 -0.26214400000000000000e6 +443 1 23 38 0.32768000000000000000e5 +443 1 26 41 -0.65536000000000000000e5 +443 1 28 43 0.13107200000000000000e6 +443 1 32 47 0.26214400000000000000e6 +443 2 2 32 0.32768000000000000000e5 +443 2 16 30 0.65536000000000000000e5 +443 2 20 34 0.13107200000000000000e6 +443 3 22 35 0.26214400000000000000e6 +443 3 28 41 0.26214400000000000000e6 +443 4 2 30 0.65536000000000000000e5 +443 4 6 34 0.13107200000000000000e6 +444 1 5 42 0.65536000000000000000e5 +444 1 9 40 -0.65536000000000000000e5 +445 1 1 48 -0.32768000000000000000e5 +445 1 2 49 -0.32768000000000000000e5 +445 1 5 43 0.65536000000000000000e5 +445 1 8 39 -0.65536000000000000000e5 +445 1 9 40 -0.65536000000000000000e5 +445 1 10 41 0.13107200000000000000e6 +445 1 12 43 0.26214400000000000000e6 +445 1 23 38 -0.32768000000000000000e5 +445 1 26 41 0.13107200000000000000e6 +445 1 28 43 -0.26214400000000000000e6 +445 1 32 47 -0.26214400000000000000e6 +445 2 2 32 -0.32768000000000000000e5 +445 2 4 34 0.65536000000000000000e5 +445 2 16 30 -0.65536000000000000000e5 +445 2 20 34 -0.13107200000000000000e6 +445 3 9 38 -0.65536000000000000000e5 +445 3 10 39 -0.65536000000000000000e5 +445 3 22 35 -0.26214400000000000000e6 +445 3 28 41 -0.26214400000000000000e6 +445 4 2 30 -0.65536000000000000000e5 +445 4 6 34 -0.13107200000000000000e6 +446 1 5 44 0.65536000000000000000e5 +446 1 10 41 0.65536000000000000000e5 +446 1 11 42 0.65536000000000000000e5 +446 1 28 43 -0.65536000000000000000e5 +446 1 32 47 -0.65536000000000000000e5 +446 1 33 48 -0.65536000000000000000e5 +446 3 13 42 -0.13107200000000000000e6 +446 3 28 41 -0.65536000000000000000e5 +446 3 29 42 -0.65536000000000000000e5 +446 4 3 31 0.65536000000000000000e5 +447 1 5 45 0.65536000000000000000e5 +447 1 11 42 -0.65536000000000000000e5 +448 1 5 46 0.65536000000000000000e5 +448 1 14 45 -0.13107200000000000000e6 +448 1 17 48 0.65536000000000000000e5 +448 1 18 49 0.65536000000000000000e5 +448 2 14 28 0.65536000000000000000e5 +448 3 13 42 0.65536000000000000000e5 +448 3 14 43 0.65536000000000000000e5 +449 1 5 47 0.65536000000000000000e5 +449 1 24 39 -0.65536000000000000000e5 +450 1 1 48 0.65536000000000000000e5 +450 1 2 49 0.13107200000000000000e6 +450 1 5 48 0.65536000000000000000e5 +450 1 8 39 0.13107200000000000000e6 +450 1 9 40 0.13107200000000000000e6 +450 1 10 41 -0.26214400000000000000e6 +450 1 12 43 -0.52428800000000000000e6 +450 1 23 38 0.65536000000000000000e5 +450 1 24 39 0.65536000000000000000e5 +450 1 26 41 -0.13107200000000000000e6 +450 1 28 43 0.26214400000000000000e6 +450 1 32 47 0.52428800000000000000e6 +450 2 2 32 0.65536000000000000000e5 +450 2 3 33 0.65536000000000000000e5 +450 2 16 30 0.13107200000000000000e6 +450 2 20 34 0.26214400000000000000e6 +450 3 9 38 0.13107200000000000000e6 +450 3 22 35 0.52428800000000000000e6 +450 3 28 41 0.52428800000000000000e6 +450 4 2 30 0.13107200000000000000e6 +450 4 6 34 0.26214400000000000000e6 +451 1 5 49 0.65536000000000000000e5 +451 1 25 40 -0.65536000000000000000e5 +452 1 5 50 0.65536000000000000000e5 +452 1 26 41 -0.65536000000000000000e5 +453 1 1 48 -0.32768000000000000000e5 +453 1 2 49 -0.32768000000000000000e5 +453 1 5 51 0.65536000000000000000e5 +453 1 8 39 -0.65536000000000000000e5 +453 1 9 40 -0.65536000000000000000e5 +453 1 10 41 0.13107200000000000000e6 +453 1 12 43 0.26214400000000000000e6 +453 1 23 38 -0.32768000000000000000e5 +453 1 26 41 0.13107200000000000000e6 +453 1 28 43 -0.26214400000000000000e6 +453 1 32 47 -0.26214400000000000000e6 +453 2 2 32 -0.32768000000000000000e5 +453 2 4 34 0.65536000000000000000e5 +453 2 16 30 -0.65536000000000000000e5 +453 2 20 34 -0.13107200000000000000e6 +453 3 9 38 -0.65536000000000000000e5 +453 3 22 35 -0.26214400000000000000e6 +453 3 28 41 -0.26214400000000000000e6 +453 4 2 30 -0.65536000000000000000e5 +453 4 6 34 -0.13107200000000000000e6 +454 1 5 52 0.65536000000000000000e5 +454 1 33 48 -0.65536000000000000000e5 +454 3 29 42 -0.65536000000000000000e5 +455 1 1 48 0.65536000000000000000e5 +455 1 2 49 0.13107200000000000000e6 +455 1 5 53 0.65536000000000000000e5 +455 1 8 39 0.13107200000000000000e6 +455 1 9 40 0.13107200000000000000e6 +455 1 10 41 -0.26214400000000000000e6 +455 1 12 43 -0.52428800000000000000e6 +455 1 23 38 0.65536000000000000000e5 +455 1 24 39 0.65536000000000000000e5 +455 1 26 41 -0.13107200000000000000e6 +455 1 28 43 0.26214400000000000000e6 +455 1 32 47 0.52428800000000000000e6 +455 2 2 32 0.65536000000000000000e5 +455 2 3 33 0.65536000000000000000e5 +455 2 16 30 0.13107200000000000000e6 +455 2 20 34 0.26214400000000000000e6 +455 3 9 38 0.13107200000000000000e6 +455 3 22 35 0.52428800000000000000e6 +455 3 25 38 0.65536000000000000000e5 +455 3 28 41 0.52428800000000000000e6 +455 4 2 30 0.13107200000000000000e6 +455 4 6 34 0.26214400000000000000e6 +456 1 5 54 0.65536000000000000000e5 +456 1 6 53 -0.65536000000000000000e5 +457 1 1 48 -0.32768000000000000000e5 +457 1 2 49 -0.32768000000000000000e5 +457 1 5 55 0.65536000000000000000e5 +457 1 8 39 -0.65536000000000000000e5 +457 1 9 40 -0.65536000000000000000e5 +457 1 10 41 0.13107200000000000000e6 +457 1 12 43 0.26214400000000000000e6 +457 1 23 38 -0.32768000000000000000e5 +457 1 26 41 0.13107200000000000000e6 +457 1 28 43 -0.26214400000000000000e6 +457 1 32 47 -0.26214400000000000000e6 +457 2 2 32 -0.32768000000000000000e5 +457 2 4 34 0.65536000000000000000e5 +457 2 16 30 -0.65536000000000000000e5 +457 2 20 34 -0.13107200000000000000e6 +457 3 5 50 0.65536000000000000000e5 +457 3 9 38 -0.65536000000000000000e5 +457 3 22 35 -0.26214400000000000000e6 +457 3 28 41 -0.26214400000000000000e6 +457 4 2 30 -0.65536000000000000000e5 +457 4 6 34 -0.13107200000000000000e6 +458 1 5 56 0.65536000000000000000e5 +458 1 25 56 -0.65536000000000000000e5 +458 3 24 53 0.65536000000000000000e5 +458 3 25 54 0.65536000000000000000e5 +458 3 38 51 -0.13107200000000000000e6 +458 4 28 32 0.65536000000000000000e5 +459 1 1 40 -0.32768000000000000000e5 +459 1 1 48 -0.32768000000000000000e5 +459 1 2 33 0.26214400000000000000e6 +459 1 2 49 -0.32768000000000000000e5 +459 1 6 6 0.65536000000000000000e5 +459 1 6 37 -0.32768000000000000000e5 +459 1 8 39 -0.65536000000000000000e5 +459 1 9 40 -0.13107200000000000000e6 +459 1 10 25 0.13107200000000000000e6 +459 1 10 41 0.13107200000000000000e6 +459 1 11 42 -0.26214400000000000000e6 +459 1 12 43 -0.26214400000000000000e6 +459 1 26 41 0.13107200000000000000e6 +459 1 33 48 0.26214400000000000000e6 +459 2 3 17 -0.32768000000000000000e5 +459 2 4 34 0.65536000000000000000e5 +459 2 5 19 0.32768000000000000000e5 +459 2 5 27 -0.32768000000000000000e5 +459 2 12 26 0.26214400000000000000e6 +459 2 16 30 -0.65536000000000000000e5 +459 2 20 34 -0.13107200000000000000e6 +459 3 1 30 -0.13107200000000000000e6 +459 3 1 38 -0.32768000000000000000e5 +459 3 2 23 -0.32768000000000000000e5 +459 3 2 39 -0.32768000000000000000e5 +459 3 3 32 0.13107200000000000000e6 +459 3 5 6 -0.32768000000000000000e5 +459 3 8 37 0.65536000000000000000e5 +459 3 9 38 -0.65536000000000000000e5 +459 3 10 39 -0.65536000000000000000e5 +459 3 13 42 0.52428800000000000000e6 +459 3 14 27 -0.26214400000000000000e6 +459 3 22 35 -0.26214400000000000000e6 +459 3 29 42 0.26214400000000000000e6 +459 4 2 30 -0.65536000000000000000e5 +459 4 3 31 -0.26214400000000000000e6 +459 4 4 16 0.32768000000000000000e5 +459 4 5 17 -0.32768000000000000000e5 +459 4 6 18 -0.65536000000000000000e5 +459 4 6 34 -0.13107200000000000000e6 +459 4 7 19 0.65536000000000000000e5 +459 4 8 20 0.13107200000000000000e6 +460 1 1 48 -0.32768000000000000000e5 +460 1 2 49 -0.32768000000000000000e5 +460 1 4 11 0.65536000000000000000e5 +460 1 6 7 0.65536000000000000000e5 +460 1 8 39 -0.65536000000000000000e5 +460 1 9 40 -0.65536000000000000000e5 +460 1 12 43 0.26214400000000000000e6 +460 1 23 38 -0.32768000000000000000e5 +460 1 26 41 0.65536000000000000000e5 +460 1 28 43 -0.13107200000000000000e6 +460 1 32 47 -0.26214400000000000000e6 +460 2 2 32 -0.32768000000000000000e5 +460 2 3 9 0.65536000000000000000e5 +460 2 16 30 -0.65536000000000000000e5 +460 2 20 34 -0.13107200000000000000e6 +460 3 2 15 -0.13107200000000000000e6 +460 3 3 32 -0.13107200000000000000e6 +460 3 4 9 0.65536000000000000000e5 +460 3 10 23 0.65536000000000000000e5 +460 3 22 35 -0.26214400000000000000e6 +460 3 28 41 -0.26214400000000000000e6 +460 4 2 30 -0.65536000000000000000e5 +460 4 6 34 -0.13107200000000000000e6 +461 1 1 48 0.32768000000000000000e5 +461 1 2 49 0.32768000000000000000e5 +461 1 6 8 0.65536000000000000000e5 +461 1 8 39 0.65536000000000000000e5 +461 1 9 40 0.65536000000000000000e5 +461 1 10 41 -0.13107200000000000000e6 +461 1 12 43 -0.26214400000000000000e6 +461 1 23 38 0.32768000000000000000e5 +461 1 26 41 -0.65536000000000000000e5 +461 1 28 43 0.13107200000000000000e6 +461 1 32 47 0.26214400000000000000e6 +461 2 2 32 0.32768000000000000000e5 +461 2 16 30 0.65536000000000000000e5 +461 2 20 34 0.13107200000000000000e6 +461 3 4 9 -0.65536000000000000000e5 +461 3 10 23 -0.65536000000000000000e5 +461 3 22 35 0.26214400000000000000e6 +461 3 28 41 0.26214400000000000000e6 +461 4 2 30 0.65536000000000000000e5 +461 4 6 34 0.13107200000000000000e6 +462 1 4 11 -0.65536000000000000000e5 +462 1 6 9 0.65536000000000000000e5 +463 1 1 48 -0.32768000000000000000e5 +463 1 2 49 -0.32768000000000000000e5 +463 1 4 11 0.65536000000000000000e5 +463 1 6 10 0.65536000000000000000e5 +463 1 6 13 -0.13107200000000000000e6 +463 1 8 39 -0.65536000000000000000e5 +463 1 9 40 -0.13107200000000000000e6 +463 1 11 42 -0.13107200000000000000e6 +463 1 12 43 0.26214400000000000000e6 +463 1 23 38 -0.32768000000000000000e5 +463 1 26 41 0.13107200000000000000e6 +463 1 28 43 -0.13107200000000000000e6 +463 1 32 47 -0.13107200000000000000e6 +463 1 33 48 0.13107200000000000000e6 +463 2 2 32 -0.32768000000000000000e5 +463 2 4 34 0.65536000000000000000e5 +463 2 16 30 -0.65536000000000000000e5 +463 2 20 34 -0.13107200000000000000e6 +463 3 4 9 0.65536000000000000000e5 +463 3 9 38 -0.65536000000000000000e5 +463 3 10 23 0.65536000000000000000e5 +463 3 10 39 -0.65536000000000000000e5 +463 3 13 42 0.26214400000000000000e6 +463 3 22 35 -0.26214400000000000000e6 +463 3 28 41 -0.13107200000000000000e6 +463 3 29 42 0.13107200000000000000e6 +463 4 2 30 -0.65536000000000000000e5 +463 4 3 31 -0.13107200000000000000e6 +463 4 4 8 0.65536000000000000000e5 +463 4 6 34 -0.13107200000000000000e6 +463 4 7 19 0.65536000000000000000e5 +464 1 2 33 0.13107200000000000000e6 +464 1 4 11 -0.65536000000000000000e5 +464 1 6 11 0.65536000000000000000e5 +464 1 6 13 0.13107200000000000000e6 +464 1 10 25 0.65536000000000000000e5 +464 1 10 41 0.13107200000000000000e6 +464 1 11 26 -0.65536000000000000000e5 +464 1 12 43 -0.26214400000000000000e6 +464 2 12 26 0.13107200000000000000e6 +464 3 3 32 0.13107200000000000000e6 +464 3 4 9 -0.65536000000000000000e5 +464 3 6 11 0.65536000000000000000e5 +464 3 10 11 -0.13107200000000000000e6 +464 3 14 27 -0.26214400000000000000e6 +464 4 4 8 -0.65536000000000000000e5 +464 4 5 9 0.65536000000000000000e5 +464 4 8 20 0.13107200000000000000e6 +465 1 6 12 0.65536000000000000000e5 +465 1 10 41 -0.65536000000000000000e5 +465 3 2 15 -0.65536000000000000000e5 +465 3 3 32 -0.65536000000000000000e5 +466 1 4 35 -0.13107200000000000000e6 +466 1 6 13 0.65536000000000000000e5 +466 1 6 14 0.65536000000000000000e5 +466 1 10 41 0.65536000000000000000e5 +466 2 5 11 0.65536000000000000000e5 +466 3 2 15 0.65536000000000000000e5 +466 3 3 32 0.65536000000000000000e5 +466 3 4 17 -0.13107200000000000000e6 +467 1 2 33 -0.65536000000000000000e5 +467 1 6 15 0.65536000000000000000e5 +467 1 11 42 0.65536000000000000000e5 +467 1 12 43 0.13107200000000000000e6 +467 1 26 33 -0.65536000000000000000e5 +467 1 28 43 -0.65536000000000000000e5 +467 1 32 47 -0.65536000000000000000e5 +467 1 33 48 -0.65536000000000000000e5 +467 2 12 26 -0.65536000000000000000e5 +467 3 3 32 -0.65536000000000000000e5 +467 3 4 33 0.65536000000000000000e5 +467 3 5 34 -0.13107200000000000000e6 +467 3 10 11 -0.65536000000000000000e5 +467 3 13 42 -0.13107200000000000000e6 +467 3 14 27 0.13107200000000000000e6 +467 3 28 41 -0.65536000000000000000e5 +467 3 29 42 -0.65536000000000000000e5 +467 4 3 31 0.65536000000000000000e5 +467 4 8 20 -0.65536000000000000000e5 +467 4 9 21 0.65536000000000000000e5 +468 1 4 35 -0.65536000000000000000e5 +468 1 6 16 0.65536000000000000000e5 +468 3 4 17 -0.65536000000000000000e5 +469 1 5 20 -0.13107200000000000000e6 +469 1 5 36 0.13107200000000000000e6 +469 1 6 17 0.65536000000000000000e5 +469 1 14 45 -0.13107200000000000000e6 +469 1 17 48 0.65536000000000000000e5 +469 1 18 49 0.65536000000000000000e5 +469 2 14 28 0.65536000000000000000e5 +469 3 4 17 0.65536000000000000000e5 +469 3 5 18 0.65536000000000000000e5 +469 3 5 34 -0.65536000000000000000e5 +469 3 13 42 0.65536000000000000000e5 +469 3 14 43 0.65536000000000000000e5 +469 4 8 12 0.65536000000000000000e5 +470 1 6 18 0.65536000000000000000e5 +470 1 15 30 -0.65536000000000000000e5 +470 3 5 18 -0.65536000000000000000e5 +471 1 5 20 -0.65536000000000000000e5 +471 1 6 19 0.65536000000000000000e5 +472 1 6 20 0.65536000000000000000e5 +472 1 11 18 -0.65536000000000000000e5 +473 1 2 25 0.65536000000000000000e5 +473 1 2 33 -0.26214400000000000000e6 +473 1 2 49 -0.65536000000000000000e5 +473 1 6 22 0.65536000000000000000e5 +473 1 11 42 0.26214400000000000000e6 +473 1 12 43 0.52428800000000000000e6 +473 1 23 38 -0.65536000000000000000e5 +473 1 28 43 -0.26214400000000000000e6 +473 1 32 47 -0.26214400000000000000e6 +473 1 33 48 -0.26214400000000000000e6 +473 2 2 32 -0.65536000000000000000e5 +473 2 3 17 0.65536000000000000000e5 +473 2 12 26 -0.26214400000000000000e6 +473 3 1 30 0.13107200000000000000e6 +473 3 1 38 0.65536000000000000000e5 +473 3 2 23 0.65536000000000000000e5 +473 3 8 37 -0.13107200000000000000e6 +473 3 10 23 0.13107200000000000000e6 +473 3 13 42 -0.52428800000000000000e6 +473 3 28 41 -0.26214400000000000000e6 +473 3 29 42 -0.26214400000000000000e6 +473 4 3 31 0.26214400000000000000e6 +473 4 6 18 0.13107200000000000000e6 +474 1 1 40 -0.65536000000000000000e5 +474 1 2 33 0.26214400000000000000e6 +474 1 6 23 0.65536000000000000000e5 +474 1 6 37 -0.65536000000000000000e5 +474 1 11 42 -0.26214400000000000000e6 +474 1 12 43 -0.52428800000000000000e6 +474 1 23 38 0.65536000000000000000e5 +474 1 28 43 0.26214400000000000000e6 +474 1 32 47 0.26214400000000000000e6 +474 1 33 48 0.26214400000000000000e6 +474 2 2 32 0.65536000000000000000e5 +474 2 3 17 -0.65536000000000000000e5 +474 2 12 26 0.26214400000000000000e6 +474 3 1 30 -0.26214400000000000000e6 +474 3 1 38 -0.65536000000000000000e5 +474 3 2 23 -0.65536000000000000000e5 +474 3 2 39 -0.65536000000000000000e5 +474 3 8 37 0.13107200000000000000e6 +474 3 10 23 -0.13107200000000000000e6 +474 3 13 42 0.52428800000000000000e6 +474 3 28 41 0.26214400000000000000e6 +474 3 29 42 0.26214400000000000000e6 +474 4 3 31 -0.26214400000000000000e6 +474 4 4 16 0.65536000000000000000e5 +474 4 6 18 -0.13107200000000000000e6 +475 1 1 40 0.65536000000000000000e5 +475 1 1 48 0.65536000000000000000e5 +475 1 2 25 -0.65536000000000000000e5 +475 1 2 49 0.13107200000000000000e6 +475 1 6 24 0.65536000000000000000e5 +475 1 6 37 0.65536000000000000000e5 +475 1 8 39 0.13107200000000000000e6 +475 1 9 40 0.13107200000000000000e6 +475 1 10 41 -0.26214400000000000000e6 +475 1 12 43 -0.52428800000000000000e6 +475 1 23 38 0.65536000000000000000e5 +475 1 26 41 -0.13107200000000000000e6 +475 1 28 43 0.26214400000000000000e6 +475 1 32 47 0.52428800000000000000e6 +475 2 2 32 0.65536000000000000000e5 +475 2 4 18 0.65536000000000000000e5 +475 2 16 30 0.13107200000000000000e6 +475 2 20 34 0.26214400000000000000e6 +475 3 1 30 0.13107200000000000000e6 +475 3 2 39 0.65536000000000000000e5 +475 3 10 23 -0.13107200000000000000e6 +475 3 22 35 0.52428800000000000000e6 +475 3 28 41 0.52428800000000000000e6 +475 4 2 30 0.13107200000000000000e6 +475 4 4 16 -0.65536000000000000000e5 +475 4 6 34 0.26214400000000000000e6 +476 1 1 48 -0.65536000000000000000e5 +476 1 2 25 0.65536000000000000000e5 +476 1 2 33 -0.26214400000000000000e6 +476 1 2 49 -0.13107200000000000000e6 +476 1 6 25 0.65536000000000000000e5 +476 1 8 39 -0.13107200000000000000e6 +476 1 9 40 -0.13107200000000000000e6 +476 1 10 25 -0.13107200000000000000e6 +476 1 10 41 0.26214400000000000000e6 +476 1 11 42 0.26214400000000000000e6 +476 1 12 43 0.10485760000000000000e7 +476 1 23 38 -0.13107200000000000000e6 +476 1 26 41 0.13107200000000000000e6 +476 1 28 43 -0.52428800000000000000e6 +476 1 32 47 -0.78643200000000000000e6 +476 1 33 48 -0.26214400000000000000e6 +476 2 2 32 -0.13107200000000000000e6 +476 2 3 17 0.65536000000000000000e5 +476 2 4 18 -0.65536000000000000000e5 +476 2 5 27 0.65536000000000000000e5 +476 2 12 26 -0.26214400000000000000e6 +476 2 16 30 -0.13107200000000000000e6 +476 2 20 34 -0.26214400000000000000e6 +476 3 1 30 0.13107200000000000000e6 +476 3 1 38 0.65536000000000000000e5 +476 3 2 23 0.65536000000000000000e5 +476 3 8 37 -0.13107200000000000000e6 +476 3 10 23 0.26214400000000000000e6 +476 3 13 42 -0.52428800000000000000e6 +476 3 22 35 -0.52428800000000000000e6 +476 3 28 41 -0.78643200000000000000e6 +476 3 29 42 -0.26214400000000000000e6 +476 4 2 30 -0.13107200000000000000e6 +476 4 3 31 0.26214400000000000000e6 +476 4 5 17 0.65536000000000000000e5 +476 4 6 18 0.13107200000000000000e6 +476 4 6 34 -0.26214400000000000000e6 +477 1 1 40 -0.65536000000000000000e5 +477 1 1 48 -0.65536000000000000000e5 +477 1 2 33 0.52428800000000000000e6 +477 1 2 49 -0.65536000000000000000e5 +477 1 6 26 0.65536000000000000000e5 +477 1 6 37 -0.65536000000000000000e5 +477 1 8 39 -0.13107200000000000000e6 +477 1 9 40 -0.26214400000000000000e6 +477 1 10 25 0.26214400000000000000e6 +477 1 10 41 0.26214400000000000000e6 +477 1 11 42 -0.52428800000000000000e6 +477 1 12 43 -0.52428800000000000000e6 +477 1 26 41 0.26214400000000000000e6 +477 1 33 48 0.52428800000000000000e6 +477 2 3 17 -0.65536000000000000000e5 +477 2 4 34 0.13107200000000000000e6 +477 2 5 19 0.65536000000000000000e5 +477 2 5 27 -0.65536000000000000000e5 +477 2 12 26 0.52428800000000000000e6 +477 2 16 30 -0.13107200000000000000e6 +477 2 20 34 -0.26214400000000000000e6 +477 3 1 30 -0.26214400000000000000e6 +477 3 1 38 -0.65536000000000000000e5 +477 3 2 23 -0.65536000000000000000e5 +477 3 2 39 -0.65536000000000000000e5 +477 3 3 32 0.26214400000000000000e6 +477 3 8 37 0.13107200000000000000e6 +477 3 9 38 -0.13107200000000000000e6 +477 3 10 39 -0.13107200000000000000e6 +477 3 13 42 0.10485760000000000000e7 +477 3 14 27 -0.52428800000000000000e6 +477 3 22 35 -0.52428800000000000000e6 +477 3 29 42 0.52428800000000000000e6 +477 4 2 30 -0.13107200000000000000e6 +477 4 3 31 -0.52428800000000000000e6 +477 4 4 16 0.65536000000000000000e5 +477 4 5 17 -0.65536000000000000000e5 +477 4 6 18 -0.13107200000000000000e6 +477 4 6 34 -0.26214400000000000000e6 +477 4 7 19 0.13107200000000000000e6 +477 4 8 20 0.26214400000000000000e6 +478 1 1 48 0.32768000000000000000e5 +478 1 2 49 0.32768000000000000000e5 +478 1 6 27 0.65536000000000000000e5 +478 1 8 39 0.65536000000000000000e5 +478 1 9 40 0.65536000000000000000e5 +478 1 10 41 -0.13107200000000000000e6 +478 1 12 43 -0.26214400000000000000e6 +478 1 23 38 0.32768000000000000000e5 +478 1 26 41 -0.65536000000000000000e5 +478 1 28 43 0.13107200000000000000e6 +478 1 32 47 0.26214400000000000000e6 +478 2 2 32 0.32768000000000000000e5 +478 2 16 30 0.65536000000000000000e5 +478 2 20 34 0.13107200000000000000e6 +478 3 10 23 -0.65536000000000000000e5 +478 3 22 35 0.26214400000000000000e6 +478 3 28 41 0.26214400000000000000e6 +478 4 2 30 0.65536000000000000000e5 +478 4 6 34 0.13107200000000000000e6 +479 1 6 28 0.65536000000000000000e5 +479 1 10 25 -0.65536000000000000000e5 +480 1 1 48 -0.32768000000000000000e5 +480 1 2 33 0.13107200000000000000e6 +480 1 2 49 -0.32768000000000000000e5 +480 1 6 29 0.65536000000000000000e5 +480 1 8 39 -0.65536000000000000000e5 +480 1 9 40 -0.13107200000000000000e6 +480 1 10 25 0.65536000000000000000e5 +480 1 10 41 0.13107200000000000000e6 +480 1 11 42 -0.13107200000000000000e6 +480 1 23 38 -0.32768000000000000000e5 +480 1 26 41 0.13107200000000000000e6 +480 1 28 43 -0.13107200000000000000e6 +480 1 32 47 -0.13107200000000000000e6 +480 1 33 48 0.13107200000000000000e6 +480 2 2 32 -0.32768000000000000000e5 +480 2 4 34 0.65536000000000000000e5 +480 2 12 26 0.13107200000000000000e6 +480 2 16 30 -0.65536000000000000000e5 +480 2 20 34 -0.13107200000000000000e6 +480 3 3 32 0.13107200000000000000e6 +480 3 9 38 -0.65536000000000000000e5 +480 3 10 23 0.65536000000000000000e5 +480 3 10 39 -0.65536000000000000000e5 +480 3 13 42 0.26214400000000000000e6 +480 3 14 27 -0.26214400000000000000e6 +480 3 22 35 -0.26214400000000000000e6 +480 3 28 41 -0.13107200000000000000e6 +480 3 29 42 0.13107200000000000000e6 +480 4 2 30 -0.65536000000000000000e5 +480 4 3 31 -0.13107200000000000000e6 +480 4 6 34 -0.13107200000000000000e6 +480 4 7 19 0.65536000000000000000e5 +480 4 8 20 0.13107200000000000000e6 +481 1 6 30 0.65536000000000000000e5 +481 1 11 26 -0.65536000000000000000e5 +482 1 2 33 0.65536000000000000000e5 +482 1 6 31 0.65536000000000000000e5 +482 1 10 41 0.65536000000000000000e5 +482 1 12 43 -0.13107200000000000000e6 +482 2 12 26 0.65536000000000000000e5 +482 3 3 32 0.65536000000000000000e5 +482 3 14 27 -0.13107200000000000000e6 +482 4 8 20 0.65536000000000000000e5 +483 1 6 32 0.65536000000000000000e5 +483 1 11 42 -0.65536000000000000000e5 +483 3 4 33 -0.65536000000000000000e5 +484 1 2 33 -0.65536000000000000000e5 +484 1 6 33 0.65536000000000000000e5 +484 1 11 42 0.65536000000000000000e5 +484 1 12 43 0.13107200000000000000e6 +484 1 26 33 -0.65536000000000000000e5 +484 1 28 43 -0.65536000000000000000e5 +484 1 32 47 -0.65536000000000000000e5 +484 1 33 48 -0.65536000000000000000e5 +484 2 12 26 -0.65536000000000000000e5 +484 3 3 32 -0.65536000000000000000e5 +484 3 4 33 0.65536000000000000000e5 +484 3 5 34 -0.13107200000000000000e6 +484 3 13 42 -0.13107200000000000000e6 +484 3 14 27 0.13107200000000000000e6 +484 3 28 41 -0.65536000000000000000e5 +484 3 29 42 -0.65536000000000000000e5 +484 4 3 31 0.65536000000000000000e5 +484 4 8 20 -0.65536000000000000000e5 +484 4 9 21 0.65536000000000000000e5 +485 1 6 34 0.65536000000000000000e5 +485 1 14 45 -0.13107200000000000000e6 +485 1 17 48 0.65536000000000000000e5 +485 1 18 49 0.65536000000000000000e5 +485 2 14 28 0.65536000000000000000e5 +485 3 5 34 -0.65536000000000000000e5 +485 3 13 42 0.65536000000000000000e5 +485 3 14 43 0.65536000000000000000e5 +486 1 6 35 0.65536000000000000000e5 +486 1 15 30 -0.65536000000000000000e5 +487 1 6 36 0.65536000000000000000e5 +487 1 11 18 -0.65536000000000000000e5 +487 3 6 19 0.65536000000000000000e5 +488 1 1 48 0.65536000000000000000e5 +488 1 2 49 0.13107200000000000000e6 +488 1 6 38 0.65536000000000000000e5 +488 1 8 39 0.13107200000000000000e6 +488 1 9 40 0.13107200000000000000e6 +488 1 10 41 -0.26214400000000000000e6 +488 1 12 43 -0.52428800000000000000e6 +488 1 23 38 0.65536000000000000000e5 +488 1 24 39 0.65536000000000000000e5 +488 1 26 41 -0.13107200000000000000e6 +488 1 28 43 0.26214400000000000000e6 +488 1 32 47 0.52428800000000000000e6 +488 2 2 32 0.65536000000000000000e5 +488 2 3 33 0.65536000000000000000e5 +488 2 16 30 0.13107200000000000000e6 +488 2 20 34 0.26214400000000000000e6 +488 3 3 40 -0.65536000000000000000e5 +488 3 9 38 0.13107200000000000000e6 +488 3 22 35 0.52428800000000000000e6 +488 3 28 41 0.52428800000000000000e6 +488 4 2 30 0.13107200000000000000e6 +488 4 6 34 0.26214400000000000000e6 +489 1 1 48 -0.65536000000000000000e5 +489 1 2 49 -0.13107200000000000000e6 +489 1 6 37 0.65536000000000000000e5 +489 1 6 39 0.65536000000000000000e5 +489 1 8 39 -0.13107200000000000000e6 +489 1 9 40 -0.26214400000000000000e6 +489 1 10 41 0.26214400000000000000e6 +489 1 12 43 0.52428800000000000000e6 +489 1 23 38 -0.65536000000000000000e5 +489 1 24 39 -0.65536000000000000000e5 +489 1 26 41 0.13107200000000000000e6 +489 1 28 43 -0.26214400000000000000e6 +489 1 32 47 -0.52428800000000000000e6 +489 2 2 32 -0.65536000000000000000e5 +489 2 3 33 -0.65536000000000000000e5 +489 2 5 27 0.65536000000000000000e5 +489 2 16 30 -0.13107200000000000000e6 +489 2 20 34 -0.26214400000000000000e6 +489 3 3 40 0.65536000000000000000e5 +489 3 9 38 -0.13107200000000000000e6 +489 3 22 35 -0.52428800000000000000e6 +489 3 28 41 -0.52428800000000000000e6 +489 4 2 30 -0.13107200000000000000e6 +489 4 6 34 -0.26214400000000000000e6 +490 1 1 40 -0.65536000000000000000e5 +490 1 1 48 -0.65536000000000000000e5 +490 1 2 33 0.52428800000000000000e6 +490 1 2 49 -0.65536000000000000000e5 +490 1 6 37 -0.65536000000000000000e5 +490 1 6 40 0.65536000000000000000e5 +490 1 8 39 -0.13107200000000000000e6 +490 1 9 40 -0.26214400000000000000e6 +490 1 10 25 0.26214400000000000000e6 +490 1 10 41 0.26214400000000000000e6 +490 1 11 42 -0.52428800000000000000e6 +490 1 12 43 -0.52428800000000000000e6 +490 1 26 41 0.26214400000000000000e6 +490 1 33 48 0.52428800000000000000e6 +490 2 3 17 -0.65536000000000000000e5 +490 2 4 34 0.13107200000000000000e6 +490 2 5 19 0.65536000000000000000e5 +490 2 5 27 -0.65536000000000000000e5 +490 2 12 26 0.52428800000000000000e6 +490 2 16 30 -0.13107200000000000000e6 +490 2 20 34 -0.26214400000000000000e6 +490 3 1 30 -0.26214400000000000000e6 +490 3 1 38 -0.65536000000000000000e5 +490 3 2 23 -0.65536000000000000000e5 +490 3 2 39 -0.65536000000000000000e5 +490 3 3 32 0.26214400000000000000e6 +490 3 5 26 0.65536000000000000000e5 +490 3 8 37 0.13107200000000000000e6 +490 3 9 38 -0.13107200000000000000e6 +490 3 10 39 -0.13107200000000000000e6 +490 3 13 42 0.10485760000000000000e7 +490 3 14 27 -0.52428800000000000000e6 +490 3 22 35 -0.52428800000000000000e6 +490 3 29 42 0.52428800000000000000e6 +490 4 2 30 -0.13107200000000000000e6 +490 4 3 31 -0.52428800000000000000e6 +490 4 4 16 0.65536000000000000000e5 +490 4 5 17 -0.65536000000000000000e5 +490 4 6 18 -0.13107200000000000000e6 +490 4 6 34 -0.26214400000000000000e6 +490 4 7 19 0.13107200000000000000e6 +490 4 8 20 0.26214400000000000000e6 +491 1 6 41 0.65536000000000000000e5 +491 1 9 40 -0.65536000000000000000e5 +492 1 1 48 -0.32768000000000000000e5 +492 1 2 49 -0.32768000000000000000e5 +492 1 6 42 0.65536000000000000000e5 +492 1 8 39 -0.65536000000000000000e5 +492 1 9 40 -0.65536000000000000000e5 +492 1 10 41 0.13107200000000000000e6 +492 1 12 43 0.26214400000000000000e6 +492 1 23 38 -0.32768000000000000000e5 +492 1 26 41 0.13107200000000000000e6 +492 1 28 43 -0.26214400000000000000e6 +492 1 32 47 -0.26214400000000000000e6 +492 2 2 32 -0.32768000000000000000e5 +492 2 4 34 0.65536000000000000000e5 +492 2 16 30 -0.65536000000000000000e5 +492 2 20 34 -0.13107200000000000000e6 +492 3 9 38 -0.65536000000000000000e5 +492 3 10 39 -0.65536000000000000000e5 +492 3 22 35 -0.26214400000000000000e6 +492 3 28 41 -0.26214400000000000000e6 +492 4 2 30 -0.65536000000000000000e5 +492 4 6 34 -0.13107200000000000000e6 +493 1 1 48 0.32768000000000000000e5 +493 1 2 49 0.32768000000000000000e5 +493 1 6 43 0.65536000000000000000e5 +493 1 8 39 0.65536000000000000000e5 +493 1 9 40 0.13107200000000000000e6 +493 1 10 41 -0.13107200000000000000e6 +493 1 11 42 -0.13107200000000000000e6 +493 1 12 43 -0.26214400000000000000e6 +493 1 23 38 0.32768000000000000000e5 +493 1 26 41 -0.13107200000000000000e6 +493 1 28 43 0.26214400000000000000e6 +493 1 32 47 0.26214400000000000000e6 +493 2 2 32 0.32768000000000000000e5 +493 2 4 34 -0.65536000000000000000e5 +493 2 16 30 0.65536000000000000000e5 +493 2 20 34 0.13107200000000000000e6 +493 2 28 34 0.65536000000000000000e5 +493 3 9 38 0.65536000000000000000e5 +493 3 10 39 0.65536000000000000000e5 +493 3 22 35 0.26214400000000000000e6 +493 3 28 41 0.26214400000000000000e6 +493 4 2 30 0.65536000000000000000e5 +493 4 6 34 0.13107200000000000000e6 +493 4 18 22 0.65536000000000000000e5 +493 4 18 30 0.65536000000000000000e5 +493 4 21 33 0.65536000000000000000e5 +494 1 6 44 0.65536000000000000000e5 +494 1 11 42 -0.65536000000000000000e5 +495 1 6 45 0.65536000000000000000e5 +495 1 26 33 -0.65536000000000000000e5 +496 1 6 46 0.65536000000000000000e5 +496 1 18 49 -0.65536000000000000000e5 +496 3 14 43 -0.65536000000000000000e5 +497 1 1 48 0.65536000000000000000e5 +497 1 2 49 0.13107200000000000000e6 +497 1 6 47 0.65536000000000000000e5 +497 1 8 39 0.13107200000000000000e6 +497 1 9 40 0.13107200000000000000e6 +497 1 10 41 -0.26214400000000000000e6 +497 1 12 43 -0.52428800000000000000e6 +497 1 23 38 0.65536000000000000000e5 +497 1 24 39 0.65536000000000000000e5 +497 1 26 41 -0.13107200000000000000e6 +497 1 28 43 0.26214400000000000000e6 +497 1 32 47 0.52428800000000000000e6 +497 2 2 32 0.65536000000000000000e5 +497 2 3 33 0.65536000000000000000e5 +497 2 16 30 0.13107200000000000000e6 +497 2 20 34 0.26214400000000000000e6 +497 3 9 38 0.13107200000000000000e6 +497 3 22 35 0.52428800000000000000e6 +497 3 28 41 0.52428800000000000000e6 +497 4 2 30 0.13107200000000000000e6 +497 4 6 34 0.26214400000000000000e6 +498 1 6 48 0.65536000000000000000e5 +498 1 25 40 -0.65536000000000000000e5 +499 1 1 48 -0.13107200000000000000e6 +499 1 2 49 -0.19660800000000000000e6 +499 1 6 49 0.65536000000000000000e5 +499 1 6 53 0.65536000000000000000e5 +499 1 8 39 -0.26214400000000000000e6 +499 1 9 40 -0.26214400000000000000e6 +499 1 10 41 0.52428800000000000000e6 +499 1 12 43 0.10485760000000000000e7 +499 1 23 38 -0.13107200000000000000e6 +499 1 24 39 -0.65536000000000000000e5 +499 1 26 41 0.39321600000000000000e6 +499 1 28 43 -0.78643200000000000000e6 +499 1 32 47 -0.10485760000000000000e7 +499 2 2 32 -0.13107200000000000000e6 +499 2 3 33 -0.65536000000000000000e5 +499 2 4 34 0.13107200000000000000e6 +499 2 5 35 0.65536000000000000000e5 +499 2 16 30 -0.26214400000000000000e6 +499 2 20 34 -0.52428800000000000000e6 +499 3 5 50 0.13107200000000000000e6 +499 3 9 38 -0.26214400000000000000e6 +499 3 22 35 -0.10485760000000000000e7 +499 3 25 38 -0.65536000000000000000e5 +499 3 26 39 -0.65536000000000000000e5 +499 3 28 41 -0.10485760000000000000e7 +499 4 2 30 -0.26214400000000000000e6 +499 4 6 34 -0.52428800000000000000e6 +500 1 1 48 -0.32768000000000000000e5 +500 1 2 49 -0.32768000000000000000e5 +500 1 6 50 0.65536000000000000000e5 +500 1 8 39 -0.65536000000000000000e5 +500 1 9 40 -0.65536000000000000000e5 +500 1 10 41 0.13107200000000000000e6 +500 1 12 43 0.26214400000000000000e6 +500 1 23 38 -0.32768000000000000000e5 +500 1 26 41 0.13107200000000000000e6 +500 1 28 43 -0.26214400000000000000e6 +500 1 32 47 -0.26214400000000000000e6 +500 2 2 32 -0.32768000000000000000e5 +500 2 4 34 0.65536000000000000000e5 +500 2 16 30 -0.65536000000000000000e5 +500 2 20 34 -0.13107200000000000000e6 +500 3 9 38 -0.65536000000000000000e5 +500 3 22 35 -0.26214400000000000000e6 +500 3 28 41 -0.26214400000000000000e6 +500 4 2 30 -0.65536000000000000000e5 +500 4 6 34 -0.13107200000000000000e6 +501 1 1 48 0.32768000000000000000e5 +501 1 2 49 0.32768000000000000000e5 +501 1 6 51 0.65536000000000000000e5 +501 1 8 39 0.65536000000000000000e5 +501 1 9 40 0.65536000000000000000e5 +501 1 10 41 -0.13107200000000000000e6 +501 1 12 43 -0.26214400000000000000e6 +501 1 23 38 0.32768000000000000000e5 +501 1 26 41 -0.65536000000000000000e5 +501 1 28 43 0.26214400000000000000e6 +501 1 32 47 0.26214400000000000000e6 +501 1 33 48 -0.13107200000000000000e6 +501 2 2 32 0.32768000000000000000e5 +501 2 4 34 -0.65536000000000000000e5 +501 2 16 30 0.65536000000000000000e5 +501 2 20 34 0.13107200000000000000e6 +501 2 28 34 0.65536000000000000000e5 +501 3 9 38 0.65536000000000000000e5 +501 3 22 35 0.26214400000000000000e6 +501 3 28 41 0.26214400000000000000e6 +501 3 29 42 -0.13107200000000000000e6 +501 4 2 30 0.65536000000000000000e5 +501 4 6 34 0.13107200000000000000e6 +501 4 18 30 0.65536000000000000000e5 +501 4 21 33 0.65536000000000000000e5 +502 1 6 52 0.65536000000000000000e5 +502 1 33 40 -0.65536000000000000000e5 +503 1 1 48 -0.13107200000000000000e6 +503 1 2 49 -0.19660800000000000000e6 +503 1 6 53 0.65536000000000000000e5 +503 1 6 54 0.65536000000000000000e5 +503 1 8 39 -0.26214400000000000000e6 +503 1 9 40 -0.26214400000000000000e6 +503 1 10 41 0.52428800000000000000e6 +503 1 12 43 0.10485760000000000000e7 +503 1 23 38 -0.13107200000000000000e6 +503 1 24 39 -0.65536000000000000000e5 +503 1 26 41 0.39321600000000000000e6 +503 1 28 43 -0.78643200000000000000e6 +503 1 32 47 -0.10485760000000000000e7 +503 2 2 32 -0.13107200000000000000e6 +503 2 3 33 -0.65536000000000000000e5 +503 2 4 34 0.13107200000000000000e6 +503 2 5 35 0.65536000000000000000e5 +503 2 16 30 -0.26214400000000000000e6 +503 2 20 34 -0.52428800000000000000e6 +503 3 5 50 0.13107200000000000000e6 +503 3 9 38 -0.26214400000000000000e6 +503 3 22 35 -0.10485760000000000000e7 +503 3 25 38 -0.65536000000000000000e5 +503 3 28 41 -0.10485760000000000000e7 +503 4 2 30 -0.26214400000000000000e6 +503 4 6 34 -0.52428800000000000000e6 +504 1 1 48 0.32768000000000000000e5 +504 1 2 49 0.32768000000000000000e5 +504 1 6 55 0.65536000000000000000e5 +504 1 8 39 0.65536000000000000000e5 +504 1 9 40 0.65536000000000000000e5 +504 1 10 41 -0.13107200000000000000e6 +504 1 12 43 -0.26214400000000000000e6 +504 1 23 38 0.32768000000000000000e5 +504 1 26 41 -0.65536000000000000000e5 +504 1 28 43 0.26214400000000000000e6 +504 1 32 47 0.26214400000000000000e6 +504 1 33 48 -0.13107200000000000000e6 +504 2 2 32 0.32768000000000000000e5 +504 2 4 34 -0.65536000000000000000e5 +504 2 16 30 0.65536000000000000000e5 +504 2 20 34 0.13107200000000000000e6 +504 2 28 34 0.65536000000000000000e5 +504 3 5 50 -0.65536000000000000000e5 +504 3 9 38 0.65536000000000000000e5 +504 3 22 35 0.26214400000000000000e6 +504 3 27 40 -0.65536000000000000000e5 +504 3 28 41 0.26214400000000000000e6 +504 4 2 30 0.65536000000000000000e5 +504 4 6 34 0.13107200000000000000e6 +504 4 21 33 0.65536000000000000000e5 +505 1 1 48 -0.13107200000000000000e6 +505 1 2 49 -0.19660800000000000000e6 +505 1 6 53 0.65536000000000000000e5 +505 1 6 56 0.65536000000000000000e5 +505 1 8 39 -0.26214400000000000000e6 +505 1 9 40 -0.26214400000000000000e6 +505 1 10 41 0.52428800000000000000e6 +505 1 12 43 0.10485760000000000000e7 +505 1 23 38 -0.13107200000000000000e6 +505 1 24 39 -0.65536000000000000000e5 +505 1 26 41 0.39321600000000000000e6 +505 1 28 43 -0.78643200000000000000e6 +505 1 32 47 -0.10485760000000000000e7 +505 2 2 32 -0.13107200000000000000e6 +505 2 3 33 -0.65536000000000000000e5 +505 2 4 34 0.13107200000000000000e6 +505 2 5 35 0.65536000000000000000e5 +505 2 16 30 -0.26214400000000000000e6 +505 2 20 34 -0.52428800000000000000e6 +505 3 5 50 0.13107200000000000000e6 +505 3 9 38 -0.26214400000000000000e6 +505 3 22 35 -0.10485760000000000000e7 +505 3 25 38 -0.65536000000000000000e5 +505 3 28 41 -0.10485760000000000000e7 +505 3 39 40 0.65536000000000000000e5 +505 4 2 30 -0.26214400000000000000e6 +505 4 6 34 -0.52428800000000000000e6 +506 1 1 12 -0.32768000000000000000e5 +506 1 7 7 0.65536000000000000000e5 +507 1 1 32 0.65536000000000000000e5 +507 1 1 48 -0.32768000000000000000e5 +507 1 2 33 -0.19660800000000000000e6 +507 1 2 49 -0.32768000000000000000e5 +507 1 3 34 0.26214400000000000000e6 +507 1 4 11 0.32768000000000000000e5 +507 1 7 8 0.65536000000000000000e5 +507 1 8 23 -0.32768000000000000000e5 +507 1 8 39 -0.32768000000000000000e5 +507 1 9 40 -0.32768000000000000000e5 +507 1 10 41 -0.13107200000000000000e6 +507 1 11 42 0.65536000000000000000e5 +507 1 12 27 -0.13107200000000000000e6 +507 1 12 43 0.26214400000000000000e6 +507 1 23 38 -0.32768000000000000000e5 +507 1 26 41 0.32768000000000000000e5 +507 1 28 43 -0.13107200000000000000e6 +507 1 32 47 -0.19660800000000000000e6 +507 1 33 48 -0.65536000000000000000e5 +507 2 2 8 -0.32768000000000000000e5 +507 2 2 32 -0.32768000000000000000e5 +507 2 3 9 0.32768000000000000000e5 +507 2 6 20 0.65536000000000000000e5 +507 2 7 21 -0.13107200000000000000e6 +507 2 12 26 -0.65536000000000000000e5 +507 2 16 30 -0.32768000000000000000e5 +507 2 20 34 -0.65536000000000000000e5 +507 3 1 14 0.13107200000000000000e6 +507 3 1 30 0.32768000000000000000e5 +507 3 2 7 0.32768000000000000000e5 +507 3 2 15 -0.65536000000000000000e5 +507 3 3 32 -0.19660800000000000000e6 +507 3 4 9 0.32768000000000000000e5 +507 3 7 12 -0.13107200000000000000e6 +507 3 8 37 -0.32768000000000000000e5 +507 3 10 23 0.65536000000000000000e5 +507 3 13 42 -0.13107200000000000000e6 +507 3 22 35 -0.13107200000000000000e6 +507 3 28 41 -0.19660800000000000000e6 +507 3 29 42 -0.65536000000000000000e5 +507 4 2 6 0.32768000000000000000e5 +507 4 2 30 -0.32768000000000000000e5 +507 4 3 31 0.65536000000000000000e5 +507 4 6 6 0.13107200000000000000e6 +507 4 6 18 0.32768000000000000000e5 +507 4 6 34 -0.65536000000000000000e5 +508 1 1 32 -0.65536000000000000000e5 +508 1 1 48 0.32768000000000000000e5 +508 1 2 33 0.13107200000000000000e6 +508 1 2 49 0.32768000000000000000e5 +508 1 3 34 -0.13107200000000000000e6 +508 1 4 11 -0.32768000000000000000e5 +508 1 7 9 0.65536000000000000000e5 +508 1 8 23 0.32768000000000000000e5 +508 1 8 39 0.32768000000000000000e5 +508 1 9 40 0.32768000000000000000e5 +508 1 10 41 0.65536000000000000000e5 +508 1 11 42 -0.65536000000000000000e5 +508 1 12 43 -0.26214400000000000000e6 +508 1 23 38 0.32768000000000000000e5 +508 1 26 41 -0.32768000000000000000e5 +508 1 28 43 0.13107200000000000000e6 +508 1 32 47 0.19660800000000000000e6 +508 1 33 48 0.65536000000000000000e5 +508 2 2 8 0.32768000000000000000e5 +508 2 2 32 0.32768000000000000000e5 +508 2 3 9 -0.32768000000000000000e5 +508 2 7 21 0.65536000000000000000e5 +508 2 12 26 0.65536000000000000000e5 +508 2 16 30 0.32768000000000000000e5 +508 2 20 34 0.65536000000000000000e5 +508 3 1 14 -0.65536000000000000000e5 +508 3 1 30 -0.32768000000000000000e5 +508 3 2 7 -0.32768000000000000000e5 +508 3 2 15 0.65536000000000000000e5 +508 3 3 32 0.13107200000000000000e6 +508 3 4 9 -0.32768000000000000000e5 +508 3 8 37 0.32768000000000000000e5 +508 3 10 23 -0.65536000000000000000e5 +508 3 13 42 0.13107200000000000000e6 +508 3 22 35 0.13107200000000000000e6 +508 3 28 41 0.19660800000000000000e6 +508 3 29 42 0.65536000000000000000e5 +508 4 2 6 -0.32768000000000000000e5 +508 4 2 30 0.32768000000000000000e5 +508 4 3 31 -0.65536000000000000000e5 +508 4 6 18 -0.32768000000000000000e5 +508 4 6 34 0.65536000000000000000e5 +509 1 2 33 0.65536000000000000000e5 +509 1 3 34 -0.13107200000000000000e6 +509 1 7 10 0.65536000000000000000e5 +509 1 10 41 0.65536000000000000000e5 +509 2 7 21 0.65536000000000000000e5 +509 3 1 14 -0.65536000000000000000e5 +509 3 3 32 0.65536000000000000000e5 +510 1 2 33 -0.65536000000000000000e5 +510 1 7 11 0.65536000000000000000e5 +510 2 4 10 0.65536000000000000000e5 +510 2 7 21 -0.65536000000000000000e5 +510 3 1 14 0.65536000000000000000e5 +510 3 2 15 0.65536000000000000000e5 +510 3 3 16 -0.13107200000000000000e6 +511 1 1 16 -0.65536000000000000000e5 +511 1 7 12 0.65536000000000000000e5 +512 1 7 13 0.65536000000000000000e5 +512 1 12 27 -0.65536000000000000000e5 +512 3 7 12 -0.65536000000000000000e5 +513 1 2 17 -0.65536000000000000000e5 +513 1 7 14 0.65536000000000000000e5 +514 1 3 34 -0.65536000000000000000e5 +514 1 7 15 0.65536000000000000000e5 +514 3 3 16 -0.65536000000000000000e5 +515 1 2 17 -0.32768000000000000000e5 +515 1 4 35 -0.32768000000000000000e5 +515 1 7 17 0.65536000000000000000e5 +515 1 12 43 -0.32768000000000000000e5 +515 1 14 45 -0.65536000000000000000e5 +515 1 16 23 0.32768000000000000000e5 +515 1 16 31 -0.13107200000000000000e6 +515 1 17 48 0.32768000000000000000e5 +515 1 18 49 0.32768000000000000000e5 +515 1 20 27 0.13107200000000000000e6 +515 2 7 13 0.65536000000000000000e5 +515 2 9 23 -0.32768000000000000000e5 +515 2 10 24 -0.65536000000000000000e5 +515 2 14 28 0.32768000000000000000e5 +515 3 3 16 -0.32768000000000000000e5 +515 3 5 34 -0.32768000000000000000e5 +515 3 7 12 -0.32768000000000000000e5 +515 3 13 42 0.32768000000000000000e5 +515 3 14 27 -0.32768000000000000000e5 +515 3 14 43 0.32768000000000000000e5 +515 4 1 13 -0.32768000000000000000e5 +515 4 10 10 -0.13107200000000000000e6 +516 1 2 17 -0.32768000000000000000e5 +516 1 3 18 -0.32768000000000000000e5 +516 1 3 34 -0.32768000000000000000e5 +516 1 7 18 0.65536000000000000000e5 +516 2 6 12 -0.32768000000000000000e5 +516 3 3 16 -0.32768000000000000000e5 +517 1 2 17 -0.32768000000000000000e5 +517 1 3 18 -0.16384000000000000000e5 +517 1 3 34 -0.16384000000000000000e5 +517 1 4 35 -0.16384000000000000000e5 +517 1 7 16 -0.32768000000000000000e5 +517 1 7 19 0.65536000000000000000e5 +517 1 12 43 -0.16384000000000000000e5 +517 1 14 45 -0.32768000000000000000e5 +517 1 16 23 0.16384000000000000000e5 +517 1 16 31 -0.65536000000000000000e5 +517 1 17 48 0.16384000000000000000e5 +517 1 18 49 0.16384000000000000000e5 +517 1 20 27 0.65536000000000000000e5 +517 2 1 15 -0.32768000000000000000e5 +517 2 6 12 -0.16384000000000000000e5 +517 2 7 13 0.32768000000000000000e5 +517 2 9 23 -0.16384000000000000000e5 +517 2 10 24 -0.32768000000000000000e5 +517 2 14 28 0.16384000000000000000e5 +517 3 3 16 -0.32768000000000000000e5 +517 3 5 34 -0.16384000000000000000e5 +517 3 7 12 -0.16384000000000000000e5 +517 3 13 42 0.16384000000000000000e5 +517 3 14 27 -0.16384000000000000000e5 +517 3 14 43 0.16384000000000000000e5 +517 4 1 13 -0.16384000000000000000e5 +517 4 10 10 -0.65536000000000000000e5 +518 1 2 17 -0.32768000000000000000e5 +518 1 3 18 -0.16384000000000000000e5 +518 1 3 34 -0.16384000000000000000e5 +518 1 4 19 -0.32768000000000000000e5 +518 1 4 35 -0.16384000000000000000e5 +518 1 7 20 0.65536000000000000000e5 +518 1 12 43 -0.16384000000000000000e5 +518 1 14 45 -0.32768000000000000000e5 +518 1 16 23 0.16384000000000000000e5 +518 1 16 31 -0.65536000000000000000e5 +518 1 17 48 0.16384000000000000000e5 +518 1 18 49 0.16384000000000000000e5 +518 1 20 27 0.65536000000000000000e5 +518 2 6 12 -0.16384000000000000000e5 +518 2 9 23 -0.16384000000000000000e5 +518 2 10 24 -0.32768000000000000000e5 +518 2 14 28 0.16384000000000000000e5 +518 3 3 16 -0.32768000000000000000e5 +518 3 5 34 -0.16384000000000000000e5 +518 3 7 12 -0.16384000000000000000e5 +518 3 13 42 0.16384000000000000000e5 +518 3 14 27 -0.16384000000000000000e5 +518 3 14 43 0.16384000000000000000e5 +518 4 1 13 -0.16384000000000000000e5 +518 4 10 10 -0.65536000000000000000e5 +519 1 7 21 0.65536000000000000000e5 +519 1 12 19 -0.65536000000000000000e5 +520 1 1 8 0.65536000000000000000e5 +520 1 1 32 0.13107200000000000000e6 +520 1 1 48 -0.65536000000000000000e5 +520 1 2 9 0.65536000000000000000e5 +520 1 2 33 -0.39321600000000000000e6 +520 1 2 49 -0.65536000000000000000e5 +520 1 3 34 0.52428800000000000000e6 +520 1 4 11 0.65536000000000000000e5 +520 1 7 23 0.65536000000000000000e5 +520 1 8 23 -0.65536000000000000000e5 +520 1 8 39 -0.65536000000000000000e5 +520 1 9 40 -0.65536000000000000000e5 +520 1 10 41 -0.26214400000000000000e6 +520 1 11 42 0.13107200000000000000e6 +520 1 12 27 -0.26214400000000000000e6 +520 1 12 43 0.52428800000000000000e6 +520 1 23 38 -0.65536000000000000000e5 +520 1 26 41 0.65536000000000000000e5 +520 1 28 43 -0.26214400000000000000e6 +520 1 32 47 -0.39321600000000000000e6 +520 1 33 48 -0.13107200000000000000e6 +520 2 1 7 0.65536000000000000000e5 +520 2 2 8 -0.65536000000000000000e5 +520 2 2 32 -0.65536000000000000000e5 +520 2 3 9 0.65536000000000000000e5 +520 2 6 20 0.13107200000000000000e6 +520 2 7 21 -0.26214400000000000000e6 +520 2 12 26 -0.13107200000000000000e6 +520 2 16 30 -0.65536000000000000000e5 +520 2 20 34 -0.13107200000000000000e6 +520 3 1 14 0.26214400000000000000e6 +520 3 1 30 0.65536000000000000000e5 +520 3 2 7 0.13107200000000000000e6 +520 3 2 15 -0.13107200000000000000e6 +520 3 3 32 -0.39321600000000000000e6 +520 3 4 9 0.65536000000000000000e5 +520 3 7 12 -0.26214400000000000000e6 +520 3 8 37 -0.65536000000000000000e5 +520 3 10 23 0.13107200000000000000e6 +520 3 13 42 -0.26214400000000000000e6 +520 3 22 35 -0.26214400000000000000e6 +520 3 28 41 -0.39321600000000000000e6 +520 3 29 42 -0.13107200000000000000e6 +520 4 2 6 0.65536000000000000000e5 +520 4 2 30 -0.65536000000000000000e5 +520 4 3 31 0.13107200000000000000e6 +520 4 6 6 0.26214400000000000000e6 +520 4 6 18 0.65536000000000000000e5 +520 4 6 34 -0.13107200000000000000e6 +521 1 7 24 0.65536000000000000000e5 +521 1 8 23 -0.65536000000000000000e5 +522 1 1 48 -0.32768000000000000000e5 +522 1 2 33 -0.13107200000000000000e6 +522 1 2 49 -0.32768000000000000000e5 +522 1 7 25 0.65536000000000000000e5 +522 1 11 42 0.13107200000000000000e6 +522 1 12 43 0.26214400000000000000e6 +522 1 23 38 -0.32768000000000000000e5 +522 1 28 43 -0.13107200000000000000e6 +522 1 32 47 -0.13107200000000000000e6 +522 1 33 48 -0.13107200000000000000e6 +522 2 2 32 -0.32768000000000000000e5 +522 2 12 26 -0.13107200000000000000e6 +522 3 1 30 0.65536000000000000000e5 +522 3 8 37 -0.65536000000000000000e5 +522 3 10 23 0.65536000000000000000e5 +522 3 13 42 -0.26214400000000000000e6 +522 3 28 41 -0.13107200000000000000e6 +522 3 29 42 -0.13107200000000000000e6 +522 4 3 31 0.13107200000000000000e6 +522 4 6 18 0.65536000000000000000e5 +523 1 7 26 0.65536000000000000000e5 +523 1 8 39 -0.65536000000000000000e5 +523 3 1 30 -0.65536000000000000000e5 +524 1 1 32 0.65536000000000000000e5 +524 1 2 33 -0.65536000000000000000e5 +524 1 3 34 0.13107200000000000000e6 +524 1 7 27 0.65536000000000000000e5 +524 1 10 41 -0.65536000000000000000e5 +524 1 12 27 -0.13107200000000000000e6 +524 2 6 20 0.65536000000000000000e5 +524 2 7 21 -0.65536000000000000000e5 +524 3 3 32 -0.65536000000000000000e5 +525 1 1 32 -0.65536000000000000000e5 +525 1 7 28 0.65536000000000000000e5 +526 1 2 33 0.65536000000000000000e5 +526 1 3 34 -0.13107200000000000000e6 +526 1 7 29 0.65536000000000000000e5 +526 1 10 41 0.65536000000000000000e5 +526 2 7 21 0.65536000000000000000e5 +526 3 3 32 0.65536000000000000000e5 +527 1 2 33 -0.65536000000000000000e5 +527 1 7 30 0.65536000000000000000e5 +528 1 7 31 0.65536000000000000000e5 +528 1 12 27 -0.65536000000000000000e5 +529 1 7 32 0.65536000000000000000e5 +529 1 16 23 -0.65536000000000000000e5 +530 1 3 34 -0.65536000000000000000e5 +530 1 7 33 0.65536000000000000000e5 +531 1 4 35 -0.32768000000000000000e5 +531 1 7 34 0.65536000000000000000e5 +531 1 12 43 -0.32768000000000000000e5 +531 1 14 45 -0.65536000000000000000e5 +531 1 16 31 -0.13107200000000000000e6 +531 1 17 48 0.32768000000000000000e5 +531 1 18 49 0.32768000000000000000e5 +531 1 20 27 0.13107200000000000000e6 +531 2 7 13 0.65536000000000000000e5 +531 2 9 23 -0.32768000000000000000e5 +531 2 10 24 -0.65536000000000000000e5 +531 2 14 28 0.32768000000000000000e5 +531 3 5 34 -0.32768000000000000000e5 +531 3 13 42 0.32768000000000000000e5 +531 3 14 27 -0.32768000000000000000e5 +531 3 14 43 0.32768000000000000000e5 +531 4 10 10 -0.13107200000000000000e6 +532 1 3 18 -0.32768000000000000000e5 +532 1 4 19 0.65536000000000000000e5 +532 1 4 35 0.32768000000000000000e5 +532 1 7 35 0.65536000000000000000e5 +532 1 12 43 0.65536000000000000000e5 +532 1 14 45 0.65536000000000000000e5 +532 1 17 48 -0.32768000000000000000e5 +532 1 18 49 -0.32768000000000000000e5 +532 1 20 27 -0.13107200000000000000e6 +532 2 9 23 0.32768000000000000000e5 +532 2 10 24 0.65536000000000000000e5 +532 2 14 28 -0.32768000000000000000e5 +532 3 3 16 -0.32768000000000000000e5 +532 3 4 17 -0.32768000000000000000e5 +532 3 5 34 0.32768000000000000000e5 +532 3 13 42 -0.32768000000000000000e5 +532 3 14 27 0.65536000000000000000e5 +532 3 14 43 -0.32768000000000000000e5 +532 4 2 14 -0.32768000000000000000e5 +533 1 7 36 0.65536000000000000000e5 +533 1 16 31 -0.65536000000000000000e5 +534 1 1 8 0.65536000000000000000e5 +534 1 1 24 0.32768000000000000000e5 +534 1 1 32 0.13107200000000000000e6 +534 1 1 40 0.32768000000000000000e5 +534 1 1 48 -0.65536000000000000000e5 +534 1 2 9 0.65536000000000000000e5 +534 1 2 33 -0.39321600000000000000e6 +534 1 2 49 -0.65536000000000000000e5 +534 1 3 34 0.52428800000000000000e6 +534 1 4 11 0.65536000000000000000e5 +534 1 7 37 0.65536000000000000000e5 +534 1 8 23 -0.65536000000000000000e5 +534 1 8 39 -0.65536000000000000000e5 +534 1 9 40 -0.65536000000000000000e5 +534 1 10 41 -0.26214400000000000000e6 +534 1 11 42 0.13107200000000000000e6 +534 1 12 27 -0.26214400000000000000e6 +534 1 12 43 0.52428800000000000000e6 +534 1 22 37 -0.32768000000000000000e5 +534 1 23 38 -0.98304000000000000000e5 +534 1 26 41 0.65536000000000000000e5 +534 1 28 43 -0.26214400000000000000e6 +534 1 32 47 -0.39321600000000000000e6 +534 1 33 48 -0.13107200000000000000e6 +534 2 1 7 0.65536000000000000000e5 +534 2 2 8 -0.65536000000000000000e5 +534 2 2 16 0.32768000000000000000e5 +534 2 2 32 -0.65536000000000000000e5 +534 2 3 9 0.65536000000000000000e5 +534 2 6 20 0.13107200000000000000e6 +534 2 7 21 -0.26214400000000000000e6 +534 2 12 26 -0.13107200000000000000e6 +534 2 16 16 -0.65536000000000000000e5 +534 2 16 30 -0.65536000000000000000e5 +534 2 20 34 -0.13107200000000000000e6 +534 3 1 14 0.26214400000000000000e6 +534 3 1 22 0.32768000000000000000e5 +534 3 1 30 0.65536000000000000000e5 +534 3 1 38 0.32768000000000000000e5 +534 3 2 7 0.13107200000000000000e6 +534 3 2 15 -0.13107200000000000000e6 +534 3 2 23 0.32768000000000000000e5 +534 3 3 32 -0.39321600000000000000e6 +534 3 4 9 0.65536000000000000000e5 +534 3 7 12 -0.26214400000000000000e6 +534 3 8 37 -0.65536000000000000000e5 +534 3 10 23 0.13107200000000000000e6 +534 3 13 42 -0.26214400000000000000e6 +534 3 22 27 -0.65536000000000000000e5 +534 3 22 35 -0.26214400000000000000e6 +534 3 28 41 -0.39321600000000000000e6 +534 3 29 42 -0.13107200000000000000e6 +534 4 2 6 0.65536000000000000000e5 +534 4 2 30 -0.65536000000000000000e5 +534 4 3 31 0.13107200000000000000e6 +534 4 6 6 0.26214400000000000000e6 +534 4 6 18 0.65536000000000000000e5 +534 4 6 34 -0.13107200000000000000e6 +534 4 16 16 0.65536000000000000000e5 +535 1 1 48 -0.32768000000000000000e5 +535 1 2 49 -0.32768000000000000000e5 +535 1 7 39 0.65536000000000000000e5 +535 1 23 38 -0.32768000000000000000e5 +535 2 2 32 -0.32768000000000000000e5 +535 3 8 37 -0.65536000000000000000e5 +536 1 7 40 0.65536000000000000000e5 +536 1 8 39 -0.65536000000000000000e5 +537 1 2 33 -0.65536000000000000000e5 +537 1 3 34 0.13107200000000000000e6 +537 1 7 41 0.65536000000000000000e5 +537 1 10 41 -0.65536000000000000000e5 +537 1 11 42 0.65536000000000000000e5 +537 1 12 43 0.13107200000000000000e6 +537 1 16 23 -0.13107200000000000000e6 +537 1 28 43 -0.65536000000000000000e5 +537 1 32 47 -0.65536000000000000000e5 +537 1 33 48 -0.65536000000000000000e5 +537 2 1 31 0.65536000000000000000e5 +537 2 7 21 -0.65536000000000000000e5 +537 2 12 26 -0.65536000000000000000e5 +537 3 1 34 0.13107200000000000000e6 +537 3 2 31 -0.65536000000000000000e5 +537 3 3 32 -0.65536000000000000000e5 +537 3 13 42 -0.13107200000000000000e6 +537 3 28 41 -0.65536000000000000000e5 +537 3 29 42 -0.65536000000000000000e5 +537 4 3 31 0.65536000000000000000e5 +538 1 2 33 0.65536000000000000000e5 +538 1 3 34 -0.13107200000000000000e6 +538 1 7 42 0.65536000000000000000e5 +538 1 10 41 0.65536000000000000000e5 +538 2 7 21 0.65536000000000000000e5 +538 3 2 31 0.65536000000000000000e5 +538 3 3 32 0.65536000000000000000e5 +539 1 7 43 0.65536000000000000000e5 +539 1 11 42 -0.65536000000000000000e5 +539 1 12 43 -0.13107200000000000000e6 +539 1 28 43 0.65536000000000000000e5 +539 1 32 47 0.65536000000000000000e5 +539 1 33 48 0.65536000000000000000e5 +539 2 12 26 0.65536000000000000000e5 +539 3 13 42 0.13107200000000000000e6 +539 3 28 41 0.65536000000000000000e5 +539 3 29 42 0.65536000000000000000e5 +539 4 3 31 -0.65536000000000000000e5 +540 1 7 44 0.65536000000000000000e5 +540 1 16 23 -0.65536000000000000000e5 +540 3 1 34 0.65536000000000000000e5 +541 1 7 45 0.65536000000000000000e5 +541 1 16 47 -0.65536000000000000000e5 +541 3 12 41 -0.65536000000000000000e5 +542 1 7 46 0.65536000000000000000e5 +542 1 27 34 -0.65536000000000000000e5 +543 1 7 38 -0.65536000000000000000e5 +543 1 7 47 0.65536000000000000000e5 +543 3 22 27 0.65536000000000000000e5 +544 1 1 48 -0.32768000000000000000e5 +544 1 2 49 -0.32768000000000000000e5 +544 1 7 48 0.65536000000000000000e5 +544 1 23 38 -0.32768000000000000000e5 +544 2 2 32 -0.32768000000000000000e5 +545 1 7 49 0.65536000000000000000e5 +545 1 8 39 -0.65536000000000000000e5 +545 1 9 40 -0.65536000000000000000e5 +545 1 10 41 0.13107200000000000000e6 +545 1 26 41 0.65536000000000000000e5 +545 1 32 47 -0.13107200000000000000e6 +545 3 9 38 -0.65536000000000000000e5 +545 3 28 41 -0.13107200000000000000e6 +545 4 2 30 -0.65536000000000000000e5 +546 1 2 33 0.65536000000000000000e5 +546 1 3 34 -0.13107200000000000000e6 +546 1 7 50 0.65536000000000000000e5 +546 1 9 40 -0.32768000000000000000e5 +546 1 10 41 0.13107200000000000000e6 +546 1 26 41 0.32768000000000000000e5 +546 1 32 47 -0.65536000000000000000e5 +546 2 7 21 0.65536000000000000000e5 +546 3 2 31 0.65536000000000000000e5 +546 3 3 32 0.65536000000000000000e5 +546 3 8 37 0.32768000000000000000e5 +546 3 9 38 -0.32768000000000000000e5 +546 3 22 27 0.32768000000000000000e5 +546 3 28 41 -0.65536000000000000000e5 +546 4 1 29 0.32768000000000000000e5 +546 4 2 30 -0.32768000000000000000e5 +547 1 7 51 0.65536000000000000000e5 +547 1 12 43 -0.13107200000000000000e6 +547 1 28 43 0.65536000000000000000e5 +547 1 32 47 0.65536000000000000000e5 +547 2 20 34 0.65536000000000000000e5 +547 3 22 35 0.13107200000000000000e6 +547 3 28 41 0.65536000000000000000e5 +547 4 6 34 0.65536000000000000000e5 +548 1 7 52 0.65536000000000000000e5 +548 1 16 47 -0.65536000000000000000e5 +549 1 1 48 -0.32768000000000000000e5 +549 1 2 49 -0.32768000000000000000e5 +549 1 6 53 -0.32768000000000000000e5 +549 1 7 53 0.65536000000000000000e5 +549 1 23 38 -0.32768000000000000000e5 +549 1 25 40 0.32768000000000000000e5 +549 2 2 32 -0.32768000000000000000e5 +549 2 4 34 -0.65536000000000000000e5 +549 2 16 30 -0.65536000000000000000e5 +549 2 16 34 0.65536000000000000000e5 +549 2 21 35 0.65536000000000000000e5 +549 3 5 50 -0.65536000000000000000e5 +549 3 7 52 0.26214400000000000000e6 +549 3 24 37 -0.32768000000000000000e5 +549 3 27 40 -0.65536000000000000000e5 +549 3 28 41 -0.26214400000000000000e6 +549 4 4 32 0.32768000000000000000e5 +549 4 6 34 -0.13107200000000000000e6 +549 4 7 35 0.65536000000000000000e5 +549 4 16 28 -0.32768000000000000000e5 +549 4 17 29 0.65536000000000000000e5 +550 1 6 53 -0.32768000000000000000e5 +550 1 7 54 0.65536000000000000000e5 +550 1 8 39 -0.65536000000000000000e5 +550 1 9 40 -0.65536000000000000000e5 +550 1 10 41 0.13107200000000000000e6 +550 1 25 40 0.32768000000000000000e5 +550 1 26 41 0.65536000000000000000e5 +550 1 32 47 -0.13107200000000000000e6 +550 3 9 38 -0.65536000000000000000e5 +550 3 24 37 -0.32768000000000000000e5 +550 3 27 40 -0.13107200000000000000e6 +550 4 2 30 -0.65536000000000000000e5 +550 4 4 32 0.32768000000000000000e5 +550 4 16 28 -0.32768000000000000000e5 +550 4 17 29 -0.65536000000000000000e5 +551 1 6 53 -0.16384000000000000000e5 +551 1 7 55 0.65536000000000000000e5 +551 1 12 43 -0.13107200000000000000e6 +551 1 25 40 0.16384000000000000000e5 +551 1 28 43 0.65536000000000000000e5 +551 1 32 47 0.65536000000000000000e5 +551 2 4 34 -0.32768000000000000000e5 +551 2 20 34 0.65536000000000000000e5 +551 2 21 35 0.32768000000000000000e5 +551 3 5 50 -0.32768000000000000000e5 +551 3 7 52 0.13107200000000000000e6 +551 3 22 35 0.13107200000000000000e6 +551 3 24 37 -0.16384000000000000000e5 +551 3 27 40 -0.65536000000000000000e5 +551 4 4 32 0.16384000000000000000e5 +551 4 7 35 0.32768000000000000000e5 +551 4 16 28 -0.16384000000000000000e5 +552 1 6 53 -0.32768000000000000000e5 +552 1 7 56 0.65536000000000000000e5 +552 1 8 39 -0.65536000000000000000e5 +552 1 9 40 -0.65536000000000000000e5 +552 1 10 41 0.13107200000000000000e6 +552 1 24 55 0.65536000000000000000e5 +552 1 25 40 0.32768000000000000000e5 +552 1 37 52 -0.13107200000000000000e6 +552 3 9 38 -0.65536000000000000000e5 +552 3 22 51 -0.65536000000000000000e5 +552 3 24 37 -0.32768000000000000000e5 +552 3 27 40 -0.65536000000000000000e5 +552 4 2 30 -0.65536000000000000000e5 +552 4 4 32 0.32768000000000000000e5 +552 4 16 28 -0.32768000000000000000e5 +552 4 17 29 -0.65536000000000000000e5 +552 4 20 32 -0.65536000000000000000e5 +553 1 1 32 -0.32768000000000000000e5 +553 1 1 48 0.16384000000000000000e5 +553 1 2 33 0.65536000000000000000e5 +553 1 2 49 0.16384000000000000000e5 +553 1 3 34 -0.65536000000000000000e5 +553 1 4 11 -0.16384000000000000000e5 +553 1 8 8 0.65536000000000000000e5 +553 1 8 23 0.16384000000000000000e5 +553 1 8 39 0.16384000000000000000e5 +553 1 9 40 0.16384000000000000000e5 +553 1 10 41 0.32768000000000000000e5 +553 1 11 42 -0.32768000000000000000e5 +553 1 12 43 -0.13107200000000000000e6 +553 1 23 38 0.16384000000000000000e5 +553 1 26 41 -0.16384000000000000000e5 +553 1 28 43 0.65536000000000000000e5 +553 1 32 47 0.98304000000000000000e5 +553 1 33 48 0.32768000000000000000e5 +553 2 2 8 0.16384000000000000000e5 +553 2 2 32 0.16384000000000000000e5 +553 2 3 9 -0.16384000000000000000e5 +553 2 7 21 0.32768000000000000000e5 +553 2 12 26 0.32768000000000000000e5 +553 2 16 30 0.16384000000000000000e5 +553 2 20 34 0.32768000000000000000e5 +553 3 1 14 -0.32768000000000000000e5 +553 3 1 30 -0.16384000000000000000e5 +553 3 2 7 -0.16384000000000000000e5 +553 3 2 15 0.32768000000000000000e5 +553 3 3 32 0.65536000000000000000e5 +553 3 4 9 -0.16384000000000000000e5 +553 3 8 37 0.16384000000000000000e5 +553 3 10 23 -0.32768000000000000000e5 +553 3 13 42 0.65536000000000000000e5 +553 3 22 35 0.65536000000000000000e5 +553 3 28 41 0.98304000000000000000e5 +553 3 29 42 0.32768000000000000000e5 +553 4 2 6 -0.16384000000000000000e5 +553 4 2 30 0.16384000000000000000e5 +553 4 3 31 -0.32768000000000000000e5 +553 4 6 18 -0.16384000000000000000e5 +553 4 6 34 0.32768000000000000000e5 +554 1 2 33 0.65536000000000000000e5 +554 1 3 34 -0.13107200000000000000e6 +554 1 8 9 0.65536000000000000000e5 +554 1 10 41 0.65536000000000000000e5 +554 2 7 21 0.65536000000000000000e5 +554 3 1 14 -0.65536000000000000000e5 +554 3 3 32 0.65536000000000000000e5 +555 1 2 33 -0.65536000000000000000e5 +555 1 8 10 0.65536000000000000000e5 +555 2 4 10 0.65536000000000000000e5 +555 2 7 21 -0.65536000000000000000e5 +555 3 1 14 0.65536000000000000000e5 +555 3 2 15 0.65536000000000000000e5 +555 3 3 16 -0.13107200000000000000e6 +556 1 8 11 0.65536000000000000000e5 +556 1 10 41 -0.65536000000000000000e5 +556 3 2 15 -0.65536000000000000000e5 +556 3 3 32 -0.65536000000000000000e5 +557 1 8 12 0.65536000000000000000e5 +557 1 12 27 -0.65536000000000000000e5 +557 3 7 12 -0.65536000000000000000e5 +558 1 2 17 -0.65536000000000000000e5 +558 1 8 13 0.65536000000000000000e5 +559 1 3 34 -0.65536000000000000000e5 +559 1 8 14 0.65536000000000000000e5 +559 3 3 16 -0.65536000000000000000e5 +560 1 3 18 -0.65536000000000000000e5 +560 1 8 15 0.65536000000000000000e5 +561 1 2 17 -0.32768000000000000000e5 +561 1 4 35 -0.32768000000000000000e5 +561 1 8 16 0.65536000000000000000e5 +561 1 12 43 -0.32768000000000000000e5 +561 1 14 45 -0.65536000000000000000e5 +561 1 16 23 0.32768000000000000000e5 +561 1 16 31 -0.13107200000000000000e6 +561 1 17 48 0.32768000000000000000e5 +561 1 18 49 0.32768000000000000000e5 +561 1 20 27 0.13107200000000000000e6 +561 2 7 13 0.65536000000000000000e5 +561 2 9 23 -0.32768000000000000000e5 +561 2 10 24 -0.65536000000000000000e5 +561 2 14 28 0.32768000000000000000e5 +561 3 3 16 -0.32768000000000000000e5 +561 3 5 34 -0.32768000000000000000e5 +561 3 7 12 -0.32768000000000000000e5 +561 3 13 42 0.32768000000000000000e5 +561 3 14 27 -0.32768000000000000000e5 +561 3 14 43 0.32768000000000000000e5 +561 4 1 13 -0.32768000000000000000e5 +561 4 10 10 -0.13107200000000000000e6 +562 1 2 17 -0.32768000000000000000e5 +562 1 3 18 -0.32768000000000000000e5 +562 1 3 34 -0.32768000000000000000e5 +562 1 8 17 0.65536000000000000000e5 +562 2 6 12 -0.32768000000000000000e5 +562 3 3 16 -0.32768000000000000000e5 +563 1 4 19 -0.65536000000000000000e5 +563 1 8 18 0.65536000000000000000e5 +564 1 2 17 -0.32768000000000000000e5 +564 1 3 18 -0.16384000000000000000e5 +564 1 3 34 -0.16384000000000000000e5 +564 1 4 19 -0.32768000000000000000e5 +564 1 4 35 -0.16384000000000000000e5 +564 1 8 19 0.65536000000000000000e5 +564 1 12 43 -0.16384000000000000000e5 +564 1 14 45 -0.32768000000000000000e5 +564 1 16 23 0.16384000000000000000e5 +564 1 16 31 -0.65536000000000000000e5 +564 1 17 48 0.16384000000000000000e5 +564 1 18 49 0.16384000000000000000e5 +564 1 20 27 0.65536000000000000000e5 +564 2 6 12 -0.16384000000000000000e5 +564 2 9 23 -0.16384000000000000000e5 +564 2 10 24 -0.32768000000000000000e5 +564 2 14 28 0.16384000000000000000e5 +564 3 3 16 -0.32768000000000000000e5 +564 3 5 34 -0.16384000000000000000e5 +564 3 7 12 -0.16384000000000000000e5 +564 3 13 42 0.16384000000000000000e5 +564 3 14 27 -0.16384000000000000000e5 +564 3 14 43 0.16384000000000000000e5 +564 4 1 13 -0.16384000000000000000e5 +564 4 10 10 -0.65536000000000000000e5 +565 1 8 20 0.65536000000000000000e5 +565 1 20 27 -0.65536000000000000000e5 +565 3 7 20 -0.65536000000000000000e5 +566 1 2 17 -0.16384000000000000000e5 +566 1 3 18 -0.16384000000000000000e5 +566 1 3 34 -0.81920000000000000000e4 +566 1 4 19 -0.16384000000000000000e5 +566 1 5 20 -0.16384000000000000000e5 +566 1 5 36 0.16384000000000000000e5 +566 1 8 21 0.65536000000000000000e5 +566 1 10 17 -0.16384000000000000000e5 +566 1 12 43 0.81920000000000000000e4 +566 1 16 23 0.81920000000000000000e4 +566 1 16 31 -0.32768000000000000000e5 +566 1 17 32 -0.32768000000000000000e5 +566 2 6 12 -0.81920000000000000000e4 +566 2 10 24 -0.16384000000000000000e5 +566 2 11 13 -0.32768000000000000000e5 +566 3 3 16 -0.24576000000000000000e5 +566 3 4 17 -0.81920000000000000000e4 +566 3 7 12 -0.81920000000000000000e4 +566 3 7 20 -0.32768000000000000000e5 +566 3 14 27 0.81920000000000000000e4 +566 4 1 13 -0.81920000000000000000e4 +566 4 2 14 -0.81920000000000000000e4 +566 4 3 15 -0.16384000000000000000e5 +566 4 10 10 -0.32768000000000000000e5 +567 1 1 8 0.65536000000000000000e5 +567 1 1 32 0.13107200000000000000e6 +567 1 1 48 -0.65536000000000000000e5 +567 1 2 9 0.65536000000000000000e5 +567 1 2 33 -0.39321600000000000000e6 +567 1 2 49 -0.65536000000000000000e5 +567 1 3 34 0.52428800000000000000e6 +567 1 4 11 0.65536000000000000000e5 +567 1 8 22 0.65536000000000000000e5 +567 1 8 23 -0.65536000000000000000e5 +567 1 8 39 -0.65536000000000000000e5 +567 1 9 40 -0.65536000000000000000e5 +567 1 10 41 -0.26214400000000000000e6 +567 1 11 42 0.13107200000000000000e6 +567 1 12 27 -0.26214400000000000000e6 +567 1 12 43 0.52428800000000000000e6 +567 1 23 38 -0.65536000000000000000e5 +567 1 26 41 0.65536000000000000000e5 +567 1 28 43 -0.26214400000000000000e6 +567 1 32 47 -0.39321600000000000000e6 +567 1 33 48 -0.13107200000000000000e6 +567 2 1 7 0.65536000000000000000e5 +567 2 2 8 -0.65536000000000000000e5 +567 2 2 32 -0.65536000000000000000e5 +567 2 3 9 0.65536000000000000000e5 +567 2 6 20 0.13107200000000000000e6 +567 2 7 21 -0.26214400000000000000e6 +567 2 12 26 -0.13107200000000000000e6 +567 2 16 30 -0.65536000000000000000e5 +567 2 20 34 -0.13107200000000000000e6 +567 3 1 14 0.26214400000000000000e6 +567 3 1 30 0.65536000000000000000e5 +567 3 2 7 0.13107200000000000000e6 +567 3 2 15 -0.13107200000000000000e6 +567 3 3 32 -0.39321600000000000000e6 +567 3 4 9 0.65536000000000000000e5 +567 3 7 12 -0.26214400000000000000e6 +567 3 8 37 -0.65536000000000000000e5 +567 3 10 23 0.13107200000000000000e6 +567 3 13 42 -0.26214400000000000000e6 +567 3 22 35 -0.26214400000000000000e6 +567 3 28 41 -0.39321600000000000000e6 +567 3 29 42 -0.13107200000000000000e6 +567 4 2 6 0.65536000000000000000e5 +567 4 2 30 -0.65536000000000000000e5 +567 4 3 31 0.13107200000000000000e6 +567 4 6 6 0.26214400000000000000e6 +567 4 6 18 0.65536000000000000000e5 +567 4 6 34 -0.13107200000000000000e6 +568 1 1 48 -0.32768000000000000000e5 +568 1 2 33 -0.13107200000000000000e6 +568 1 2 49 -0.32768000000000000000e5 +568 1 8 24 0.65536000000000000000e5 +568 1 11 42 0.13107200000000000000e6 +568 1 12 43 0.26214400000000000000e6 +568 1 23 38 -0.32768000000000000000e5 +568 1 28 43 -0.13107200000000000000e6 +568 1 32 47 -0.13107200000000000000e6 +568 1 33 48 -0.13107200000000000000e6 +568 2 2 32 -0.32768000000000000000e5 +568 2 12 26 -0.13107200000000000000e6 +568 3 1 30 0.65536000000000000000e5 +568 3 8 37 -0.65536000000000000000e5 +568 3 10 23 0.65536000000000000000e5 +568 3 13 42 -0.26214400000000000000e6 +568 3 28 41 -0.13107200000000000000e6 +568 3 29 42 -0.13107200000000000000e6 +568 4 3 31 0.13107200000000000000e6 +568 4 6 18 0.65536000000000000000e5 +569 1 8 25 0.65536000000000000000e5 +569 1 8 39 -0.65536000000000000000e5 +569 3 1 30 -0.65536000000000000000e5 +570 1 1 48 0.32768000000000000000e5 +570 1 2 49 0.32768000000000000000e5 +570 1 8 26 0.65536000000000000000e5 +570 1 8 39 0.65536000000000000000e5 +570 1 9 40 0.65536000000000000000e5 +570 1 10 41 -0.13107200000000000000e6 +570 1 12 43 -0.26214400000000000000e6 +570 1 23 38 0.32768000000000000000e5 +570 1 26 41 -0.65536000000000000000e5 +570 1 28 43 0.13107200000000000000e6 +570 1 32 47 0.26214400000000000000e6 +570 2 2 32 0.32768000000000000000e5 +570 2 16 30 0.65536000000000000000e5 +570 2 20 34 0.13107200000000000000e6 +570 3 10 23 -0.65536000000000000000e5 +570 3 22 35 0.26214400000000000000e6 +570 3 28 41 0.26214400000000000000e6 +570 4 2 30 0.65536000000000000000e5 +570 4 6 34 0.13107200000000000000e6 +571 1 1 32 -0.65536000000000000000e5 +571 1 8 27 0.65536000000000000000e5 +572 1 2 33 0.65536000000000000000e5 +572 1 3 34 -0.13107200000000000000e6 +572 1 8 28 0.65536000000000000000e5 +572 1 10 41 0.65536000000000000000e5 +572 2 7 21 0.65536000000000000000e5 +572 3 3 32 0.65536000000000000000e5 +573 1 2 33 -0.65536000000000000000e5 +573 1 8 29 0.65536000000000000000e5 +574 1 8 30 0.65536000000000000000e5 +574 1 10 41 -0.65536000000000000000e5 +574 3 3 32 -0.65536000000000000000e5 +575 1 8 31 0.65536000000000000000e5 +575 1 16 23 -0.65536000000000000000e5 +576 1 3 34 -0.65536000000000000000e5 +576 1 8 32 0.65536000000000000000e5 +577 1 8 33 0.65536000000000000000e5 +577 1 12 43 -0.65536000000000000000e5 +577 3 14 27 -0.65536000000000000000e5 +578 1 3 18 -0.32768000000000000000e5 +578 1 4 19 0.65536000000000000000e5 +578 1 4 35 0.32768000000000000000e5 +578 1 8 34 0.65536000000000000000e5 +578 1 12 43 0.65536000000000000000e5 +578 1 14 45 0.65536000000000000000e5 +578 1 17 48 -0.32768000000000000000e5 +578 1 18 49 -0.32768000000000000000e5 +578 1 20 27 -0.13107200000000000000e6 +578 2 9 23 0.32768000000000000000e5 +578 2 10 24 0.65536000000000000000e5 +578 2 14 28 -0.32768000000000000000e5 +578 3 3 16 -0.32768000000000000000e5 +578 3 4 17 -0.32768000000000000000e5 +578 3 5 34 0.32768000000000000000e5 +578 3 13 42 -0.32768000000000000000e5 +578 3 14 27 0.65536000000000000000e5 +578 3 14 43 -0.32768000000000000000e5 +578 4 2 14 -0.32768000000000000000e5 +579 1 3 18 0.32768000000000000000e5 +579 1 4 19 -0.65536000000000000000e5 +579 1 8 35 0.65536000000000000000e5 +579 1 12 43 -0.32768000000000000000e5 +579 3 3 16 0.32768000000000000000e5 +579 3 4 17 0.32768000000000000000e5 +579 3 14 27 -0.32768000000000000000e5 +579 4 2 14 0.32768000000000000000e5 +580 1 8 36 0.65536000000000000000e5 +580 1 20 27 -0.65536000000000000000e5 +581 1 7 38 -0.65536000000000000000e5 +581 1 8 37 0.65536000000000000000e5 +582 1 1 48 -0.32768000000000000000e5 +582 1 2 49 -0.32768000000000000000e5 +582 1 8 38 0.65536000000000000000e5 +582 1 23 38 -0.32768000000000000000e5 +582 2 2 32 -0.32768000000000000000e5 +582 3 8 37 -0.65536000000000000000e5 +583 1 1 48 0.32768000000000000000e5 +583 1 2 49 0.32768000000000000000e5 +583 1 8 39 0.65536000000000000000e5 +583 1 8 40 0.65536000000000000000e5 +583 1 9 40 0.65536000000000000000e5 +583 1 10 41 -0.13107200000000000000e6 +583 1 12 43 -0.26214400000000000000e6 +583 1 23 38 0.32768000000000000000e5 +583 1 26 41 -0.65536000000000000000e5 +583 1 28 43 0.13107200000000000000e6 +583 1 32 47 0.26214400000000000000e6 +583 2 2 32 0.32768000000000000000e5 +583 2 16 30 0.65536000000000000000e5 +583 2 20 34 0.13107200000000000000e6 +583 3 22 35 0.26214400000000000000e6 +583 3 28 41 0.26214400000000000000e6 +583 4 2 30 0.65536000000000000000e5 +583 4 6 34 0.13107200000000000000e6 +584 1 2 33 0.65536000000000000000e5 +584 1 3 34 -0.13107200000000000000e6 +584 1 8 41 0.65536000000000000000e5 +584 1 10 41 0.65536000000000000000e5 +584 2 7 21 0.65536000000000000000e5 +584 3 2 31 0.65536000000000000000e5 +584 3 3 32 0.65536000000000000000e5 +585 1 8 42 0.65536000000000000000e5 +585 1 11 42 -0.65536000000000000000e5 +585 1 12 43 -0.13107200000000000000e6 +585 1 28 43 0.65536000000000000000e5 +585 1 32 47 0.65536000000000000000e5 +585 1 33 48 0.65536000000000000000e5 +585 2 12 26 0.65536000000000000000e5 +585 3 13 42 0.13107200000000000000e6 +585 3 28 41 0.65536000000000000000e5 +585 3 29 42 0.65536000000000000000e5 +585 4 3 31 -0.65536000000000000000e5 +586 1 8 43 0.65536000000000000000e5 +586 1 10 41 -0.65536000000000000000e5 +587 1 8 44 0.65536000000000000000e5 +587 1 16 47 -0.65536000000000000000e5 +587 3 12 41 -0.65536000000000000000e5 +588 1 8 45 0.65536000000000000000e5 +588 1 12 43 -0.65536000000000000000e5 +589 1 8 46 0.65536000000000000000e5 +589 1 13 44 -0.65536000000000000000e5 +590 1 1 48 -0.32768000000000000000e5 +590 1 2 49 -0.32768000000000000000e5 +590 1 8 47 0.65536000000000000000e5 +590 1 23 38 -0.32768000000000000000e5 +590 2 2 32 -0.32768000000000000000e5 +591 1 8 39 -0.65536000000000000000e5 +591 1 8 48 0.65536000000000000000e5 +591 1 9 40 -0.65536000000000000000e5 +591 1 10 41 0.13107200000000000000e6 +591 1 26 41 0.65536000000000000000e5 +591 1 32 47 -0.13107200000000000000e6 +591 3 9 38 -0.65536000000000000000e5 +591 3 28 41 -0.13107200000000000000e6 +591 4 2 30 -0.65536000000000000000e5 +592 1 1 48 0.32768000000000000000e5 +592 1 2 49 0.32768000000000000000e5 +592 1 8 39 0.65536000000000000000e5 +592 1 8 49 0.65536000000000000000e5 +592 1 9 40 0.65536000000000000000e5 +592 1 10 41 -0.13107200000000000000e6 +592 1 12 43 -0.26214400000000000000e6 +592 1 23 38 0.32768000000000000000e5 +592 1 26 41 -0.65536000000000000000e5 +592 1 28 43 0.13107200000000000000e6 +592 1 32 47 0.26214400000000000000e6 +592 2 2 32 0.32768000000000000000e5 +592 2 16 30 0.65536000000000000000e5 +592 2 20 34 0.13107200000000000000e6 +592 3 9 38 0.65536000000000000000e5 +592 3 22 35 0.26214400000000000000e6 +592 3 28 41 0.26214400000000000000e6 +592 4 2 30 0.65536000000000000000e5 +592 4 6 34 0.13107200000000000000e6 +593 1 8 50 0.65536000000000000000e5 +593 1 12 43 -0.13107200000000000000e6 +593 1 28 43 0.65536000000000000000e5 +593 1 32 47 0.65536000000000000000e5 +593 2 20 34 0.65536000000000000000e5 +593 3 22 35 0.13107200000000000000e6 +593 3 28 41 0.65536000000000000000e5 +593 4 6 34 0.65536000000000000000e5 +594 1 8 51 0.65536000000000000000e5 +594 1 32 47 -0.65536000000000000000e5 +594 3 28 41 -0.65536000000000000000e5 +595 1 8 52 0.65536000000000000000e5 +595 1 12 43 -0.65536000000000000000e5 +595 3 22 35 0.65536000000000000000e5 +596 1 6 53 -0.32768000000000000000e5 +596 1 8 39 -0.65536000000000000000e5 +596 1 8 53 0.65536000000000000000e5 +596 1 9 40 -0.65536000000000000000e5 +596 1 10 41 0.13107200000000000000e6 +596 1 25 40 0.32768000000000000000e5 +596 1 26 41 0.65536000000000000000e5 +596 1 32 47 -0.13107200000000000000e6 +596 3 9 38 -0.65536000000000000000e5 +596 3 24 37 -0.32768000000000000000e5 +596 3 27 40 -0.13107200000000000000e6 +596 4 2 30 -0.65536000000000000000e5 +596 4 4 32 0.32768000000000000000e5 +596 4 16 28 -0.32768000000000000000e5 +596 4 17 29 -0.65536000000000000000e5 +597 1 1 48 0.32768000000000000000e5 +597 1 2 49 0.32768000000000000000e5 +597 1 6 53 0.32768000000000000000e5 +597 1 8 39 0.65536000000000000000e5 +597 1 8 54 0.65536000000000000000e5 +597 1 9 40 0.65536000000000000000e5 +597 1 10 41 -0.13107200000000000000e6 +597 1 12 43 -0.26214400000000000000e6 +597 1 23 38 0.32768000000000000000e5 +597 1 25 40 -0.32768000000000000000e5 +597 1 26 41 -0.65536000000000000000e5 +597 1 28 43 0.13107200000000000000e6 +597 1 32 47 0.26214400000000000000e6 +597 2 2 32 0.32768000000000000000e5 +597 2 16 30 0.65536000000000000000e5 +597 2 20 34 0.13107200000000000000e6 +597 3 9 38 0.65536000000000000000e5 +597 3 22 35 0.26214400000000000000e6 +597 3 24 37 0.32768000000000000000e5 +597 3 27 40 0.65536000000000000000e5 +597 3 28 41 0.26214400000000000000e6 +597 4 2 30 0.65536000000000000000e5 +597 4 4 32 -0.32768000000000000000e5 +597 4 6 34 0.13107200000000000000e6 +597 4 16 28 0.32768000000000000000e5 +598 1 8 55 0.65536000000000000000e5 +598 1 32 47 -0.65536000000000000000e5 +599 1 1 48 0.32768000000000000000e5 +599 1 2 49 0.32768000000000000000e5 +599 1 6 53 0.32768000000000000000e5 +599 1 8 39 0.65536000000000000000e5 +599 1 8 56 0.65536000000000000000e5 +599 1 9 40 0.65536000000000000000e5 +599 1 10 41 -0.13107200000000000000e6 +599 1 12 43 -0.26214400000000000000e6 +599 1 23 38 0.32768000000000000000e5 +599 1 25 40 -0.32768000000000000000e5 +599 1 26 41 -0.65536000000000000000e5 +599 1 28 43 0.13107200000000000000e6 +599 1 32 47 0.26214400000000000000e6 +599 2 2 32 0.32768000000000000000e5 +599 2 16 30 0.65536000000000000000e5 +599 2 20 34 0.13107200000000000000e6 +599 3 9 38 0.65536000000000000000e5 +599 3 22 35 0.26214400000000000000e6 +599 3 22 51 0.65536000000000000000e5 +599 3 24 37 0.32768000000000000000e5 +599 3 27 40 0.65536000000000000000e5 +599 3 28 41 0.26214400000000000000e6 +599 4 2 30 0.65536000000000000000e5 +599 4 4 32 -0.32768000000000000000e5 +599 4 6 34 0.13107200000000000000e6 +599 4 16 28 0.32768000000000000000e5 +600 1 2 33 -0.32768000000000000000e5 +600 1 9 9 0.65536000000000000000e5 +600 2 4 10 0.32768000000000000000e5 +600 2 7 21 -0.32768000000000000000e5 +600 3 1 14 0.32768000000000000000e5 +600 3 2 15 0.32768000000000000000e5 +600 3 3 16 -0.65536000000000000000e5 +601 1 9 10 0.65536000000000000000e5 +601 1 10 41 -0.65536000000000000000e5 +601 3 2 15 -0.65536000000000000000e5 +601 3 3 32 -0.65536000000000000000e5 +602 1 6 13 -0.65536000000000000000e5 +602 1 9 11 0.65536000000000000000e5 +603 1 2 17 -0.65536000000000000000e5 +603 1 9 12 0.65536000000000000000e5 +604 1 3 34 -0.65536000000000000000e5 +604 1 9 13 0.65536000000000000000e5 +604 3 3 16 -0.65536000000000000000e5 +605 1 3 18 -0.65536000000000000000e5 +605 1 9 14 0.65536000000000000000e5 +606 1 4 35 -0.65536000000000000000e5 +606 1 9 15 0.65536000000000000000e5 +606 3 4 17 -0.65536000000000000000e5 +607 1 2 17 -0.32768000000000000000e5 +607 1 3 18 -0.32768000000000000000e5 +607 1 3 34 -0.32768000000000000000e5 +607 1 9 16 0.65536000000000000000e5 +607 2 6 12 -0.32768000000000000000e5 +607 3 3 16 -0.32768000000000000000e5 +608 1 4 19 -0.65536000000000000000e5 +608 1 9 17 0.65536000000000000000e5 +609 1 9 18 0.65536000000000000000e5 +609 1 10 17 -0.65536000000000000000e5 +610 1 9 19 0.65536000000000000000e5 +610 1 20 27 -0.65536000000000000000e5 +610 3 7 20 -0.65536000000000000000e5 +611 1 3 18 -0.16384000000000000000e5 +611 1 4 35 0.16384000000000000000e5 +611 1 5 20 -0.32768000000000000000e5 +611 1 5 36 0.32768000000000000000e5 +611 1 9 20 0.65536000000000000000e5 +611 1 10 17 -0.32768000000000000000e5 +611 1 12 43 0.32768000000000000000e5 +611 1 14 45 0.32768000000000000000e5 +611 1 17 32 -0.65536000000000000000e5 +611 1 17 48 -0.16384000000000000000e5 +611 1 18 49 -0.16384000000000000000e5 +611 2 9 23 0.16384000000000000000e5 +611 2 14 28 -0.16384000000000000000e5 +611 3 3 16 -0.16384000000000000000e5 +611 3 4 17 -0.16384000000000000000e5 +611 3 5 34 0.16384000000000000000e5 +611 3 13 42 -0.16384000000000000000e5 +611 3 14 27 0.32768000000000000000e5 +611 3 14 43 -0.16384000000000000000e5 +611 4 2 14 -0.16384000000000000000e5 +611 4 3 15 -0.32768000000000000000e5 +612 1 9 21 0.65536000000000000000e5 +612 1 13 20 -0.65536000000000000000e5 +613 1 8 23 -0.65536000000000000000e5 +613 1 9 22 0.65536000000000000000e5 +614 1 1 48 -0.32768000000000000000e5 +614 1 2 33 -0.13107200000000000000e6 +614 1 2 49 -0.32768000000000000000e5 +614 1 9 23 0.65536000000000000000e5 +614 1 11 42 0.13107200000000000000e6 +614 1 12 43 0.26214400000000000000e6 +614 1 23 38 -0.32768000000000000000e5 +614 1 28 43 -0.13107200000000000000e6 +614 1 32 47 -0.13107200000000000000e6 +614 1 33 48 -0.13107200000000000000e6 +614 2 2 32 -0.32768000000000000000e5 +614 2 12 26 -0.13107200000000000000e6 +614 3 1 30 0.65536000000000000000e5 +614 3 8 37 -0.65536000000000000000e5 +614 3 10 23 0.65536000000000000000e5 +614 3 13 42 -0.26214400000000000000e6 +614 3 28 41 -0.13107200000000000000e6 +614 3 29 42 -0.13107200000000000000e6 +614 4 3 31 0.13107200000000000000e6 +614 4 6 18 0.65536000000000000000e5 +615 1 8 39 -0.65536000000000000000e5 +615 1 9 24 0.65536000000000000000e5 +615 3 1 30 -0.65536000000000000000e5 +616 1 1 48 0.32768000000000000000e5 +616 1 2 49 0.32768000000000000000e5 +616 1 8 39 0.65536000000000000000e5 +616 1 9 25 0.65536000000000000000e5 +616 1 9 40 0.65536000000000000000e5 +616 1 10 41 -0.13107200000000000000e6 +616 1 12 43 -0.26214400000000000000e6 +616 1 23 38 0.32768000000000000000e5 +616 1 26 41 -0.65536000000000000000e5 +616 1 28 43 0.13107200000000000000e6 +616 1 32 47 0.26214400000000000000e6 +616 2 2 32 0.32768000000000000000e5 +616 2 16 30 0.65536000000000000000e5 +616 2 20 34 0.13107200000000000000e6 +616 3 10 23 -0.65536000000000000000e5 +616 3 22 35 0.26214400000000000000e6 +616 3 28 41 0.26214400000000000000e6 +616 4 2 30 0.65536000000000000000e5 +616 4 6 34 0.13107200000000000000e6 +617 1 9 26 0.65536000000000000000e5 +617 1 10 25 -0.65536000000000000000e5 +618 1 2 33 0.65536000000000000000e5 +618 1 3 34 -0.13107200000000000000e6 +618 1 9 27 0.65536000000000000000e5 +618 1 10 41 0.65536000000000000000e5 +618 2 7 21 0.65536000000000000000e5 +618 3 3 32 0.65536000000000000000e5 +619 1 2 33 -0.65536000000000000000e5 +619 1 9 28 0.65536000000000000000e5 +620 1 9 29 0.65536000000000000000e5 +620 1 10 41 -0.65536000000000000000e5 +620 3 3 32 -0.65536000000000000000e5 +621 1 2 33 0.65536000000000000000e5 +621 1 9 30 0.65536000000000000000e5 +621 1 10 41 0.65536000000000000000e5 +621 1 12 43 -0.13107200000000000000e6 +621 2 12 26 0.65536000000000000000e5 +621 3 3 32 0.65536000000000000000e5 +621 3 14 27 -0.13107200000000000000e6 +621 4 8 20 0.65536000000000000000e5 +622 1 3 34 -0.65536000000000000000e5 +622 1 9 31 0.65536000000000000000e5 +623 1 9 32 0.65536000000000000000e5 +623 1 12 43 -0.65536000000000000000e5 +623 3 14 27 -0.65536000000000000000e5 +624 1 4 35 -0.65536000000000000000e5 +624 1 9 33 0.65536000000000000000e5 +625 1 3 18 0.32768000000000000000e5 +625 1 4 19 -0.65536000000000000000e5 +625 1 9 34 0.65536000000000000000e5 +625 1 12 43 -0.32768000000000000000e5 +625 3 3 16 0.32768000000000000000e5 +625 3 4 17 0.32768000000000000000e5 +625 3 14 27 -0.32768000000000000000e5 +625 4 2 14 0.32768000000000000000e5 +626 1 4 35 -0.32768000000000000000e5 +626 1 9 35 0.65536000000000000000e5 +626 1 12 43 -0.32768000000000000000e5 +626 1 14 45 -0.65536000000000000000e5 +626 1 17 48 0.32768000000000000000e5 +626 1 18 49 0.32768000000000000000e5 +626 2 9 23 -0.32768000000000000000e5 +626 2 14 28 0.32768000000000000000e5 +626 3 5 34 -0.32768000000000000000e5 +626 3 13 42 0.32768000000000000000e5 +626 3 14 27 -0.32768000000000000000e5 +626 3 14 43 0.32768000000000000000e5 +627 1 9 36 0.65536000000000000000e5 +627 1 17 32 -0.65536000000000000000e5 +628 1 1 48 -0.32768000000000000000e5 +628 1 2 49 -0.32768000000000000000e5 +628 1 9 37 0.65536000000000000000e5 +628 1 23 38 -0.32768000000000000000e5 +628 2 2 32 -0.32768000000000000000e5 +628 3 8 37 -0.65536000000000000000e5 +629 1 8 39 -0.65536000000000000000e5 +629 1 9 38 0.65536000000000000000e5 +630 1 1 48 0.32768000000000000000e5 +630 1 2 49 0.32768000000000000000e5 +630 1 8 39 0.65536000000000000000e5 +630 1 9 39 0.65536000000000000000e5 +630 1 9 40 0.65536000000000000000e5 +630 1 10 41 -0.13107200000000000000e6 +630 1 12 43 -0.26214400000000000000e6 +630 1 23 38 0.32768000000000000000e5 +630 1 26 41 -0.65536000000000000000e5 +630 1 28 43 0.13107200000000000000e6 +630 1 32 47 0.26214400000000000000e6 +630 2 2 32 0.32768000000000000000e5 +630 2 16 30 0.65536000000000000000e5 +630 2 20 34 0.13107200000000000000e6 +630 3 22 35 0.26214400000000000000e6 +630 3 28 41 0.26214400000000000000e6 +630 4 2 30 0.65536000000000000000e5 +630 4 6 34 0.13107200000000000000e6 +631 1 9 41 0.65536000000000000000e5 +631 1 11 42 -0.65536000000000000000e5 +631 1 12 43 -0.13107200000000000000e6 +631 1 28 43 0.65536000000000000000e5 +631 1 32 47 0.65536000000000000000e5 +631 1 33 48 0.65536000000000000000e5 +631 2 12 26 0.65536000000000000000e5 +631 3 13 42 0.13107200000000000000e6 +631 3 28 41 0.65536000000000000000e5 +631 3 29 42 0.65536000000000000000e5 +631 4 3 31 -0.65536000000000000000e5 +632 1 9 42 0.65536000000000000000e5 +632 1 10 41 -0.65536000000000000000e5 +633 1 9 43 0.65536000000000000000e5 +633 1 10 41 0.65536000000000000000e5 +633 1 11 42 0.65536000000000000000e5 +633 1 28 43 -0.65536000000000000000e5 +633 1 32 47 -0.65536000000000000000e5 +633 1 33 48 -0.65536000000000000000e5 +633 3 13 42 -0.13107200000000000000e6 +633 3 28 41 -0.65536000000000000000e5 +633 3 29 42 -0.65536000000000000000e5 +633 4 3 31 0.65536000000000000000e5 +634 1 9 44 0.65536000000000000000e5 +634 1 12 43 -0.65536000000000000000e5 +635 1 9 45 0.65536000000000000000e5 +635 1 17 48 -0.65536000000000000000e5 +635 3 13 42 -0.65536000000000000000e5 +636 1 4 35 -0.32768000000000000000e5 +636 1 9 46 0.65536000000000000000e5 +636 1 12 43 -0.32768000000000000000e5 +636 1 14 45 -0.65536000000000000000e5 +636 1 17 48 0.32768000000000000000e5 +636 1 18 49 0.32768000000000000000e5 +636 2 9 23 -0.32768000000000000000e5 +636 2 14 28 0.32768000000000000000e5 +636 3 5 34 -0.32768000000000000000e5 +636 3 13 42 0.32768000000000000000e5 +636 3 14 27 -0.32768000000000000000e5 +636 3 14 43 0.32768000000000000000e5 +636 3 16 29 0.65536000000000000000e5 +637 1 8 39 -0.65536000000000000000e5 +637 1 9 40 -0.65536000000000000000e5 +637 1 9 47 0.65536000000000000000e5 +637 1 10 41 0.13107200000000000000e6 +637 1 26 41 0.65536000000000000000e5 +637 1 32 47 -0.13107200000000000000e6 +637 3 9 38 -0.65536000000000000000e5 +637 3 28 41 -0.13107200000000000000e6 +637 4 2 30 -0.65536000000000000000e5 +638 1 1 48 0.32768000000000000000e5 +638 1 2 49 0.32768000000000000000e5 +638 1 8 39 0.65536000000000000000e5 +638 1 9 40 0.65536000000000000000e5 +638 1 9 48 0.65536000000000000000e5 +638 1 10 41 -0.13107200000000000000e6 +638 1 12 43 -0.26214400000000000000e6 +638 1 23 38 0.32768000000000000000e5 +638 1 26 41 -0.65536000000000000000e5 +638 1 28 43 0.13107200000000000000e6 +638 1 32 47 0.26214400000000000000e6 +638 2 2 32 0.32768000000000000000e5 +638 2 16 30 0.65536000000000000000e5 +638 2 20 34 0.13107200000000000000e6 +638 3 9 38 0.65536000000000000000e5 +638 3 22 35 0.26214400000000000000e6 +638 3 28 41 0.26214400000000000000e6 +638 4 2 30 0.65536000000000000000e5 +638 4 6 34 0.13107200000000000000e6 +639 1 9 49 0.65536000000000000000e5 +639 1 26 41 -0.65536000000000000000e5 +640 1 9 50 0.65536000000000000000e5 +640 1 32 47 -0.65536000000000000000e5 +640 3 28 41 -0.65536000000000000000e5 +641 1 9 51 0.65536000000000000000e5 +641 1 28 43 -0.65536000000000000000e5 +642 1 9 52 0.65536000000000000000e5 +642 1 17 48 -0.65536000000000000000e5 +643 1 1 48 0.32768000000000000000e5 +643 1 2 49 0.32768000000000000000e5 +643 1 6 53 0.32768000000000000000e5 +643 1 8 39 0.65536000000000000000e5 +643 1 9 40 0.65536000000000000000e5 +643 1 9 53 0.65536000000000000000e5 +643 1 10 41 -0.13107200000000000000e6 +643 1 12 43 -0.26214400000000000000e6 +643 1 23 38 0.32768000000000000000e5 +643 1 25 40 -0.32768000000000000000e5 +643 1 26 41 -0.65536000000000000000e5 +643 1 28 43 0.13107200000000000000e6 +643 1 32 47 0.26214400000000000000e6 +643 2 2 32 0.32768000000000000000e5 +643 2 16 30 0.65536000000000000000e5 +643 2 20 34 0.13107200000000000000e6 +643 3 9 38 0.65536000000000000000e5 +643 3 22 35 0.26214400000000000000e6 +643 3 24 37 0.32768000000000000000e5 +643 3 27 40 0.65536000000000000000e5 +643 3 28 41 0.26214400000000000000e6 +643 4 2 30 0.65536000000000000000e5 +643 4 4 32 -0.32768000000000000000e5 +643 4 6 34 0.13107200000000000000e6 +643 4 16 28 0.32768000000000000000e5 +644 1 9 54 0.65536000000000000000e5 +644 1 26 41 -0.65536000000000000000e5 +644 3 27 40 0.65536000000000000000e5 +645 1 6 53 0.16384000000000000000e5 +645 1 9 55 0.65536000000000000000e5 +645 1 25 40 -0.16384000000000000000e5 +645 1 28 43 -0.65536000000000000000e5 +645 2 4 34 0.32768000000000000000e5 +645 2 21 35 -0.32768000000000000000e5 +645 3 5 50 0.32768000000000000000e5 +645 3 24 37 0.16384000000000000000e5 +645 3 27 40 0.65536000000000000000e5 +645 4 4 32 -0.16384000000000000000e5 +645 4 7 35 -0.32768000000000000000e5 +645 4 16 28 0.16384000000000000000e5 +646 1 9 56 0.65536000000000000000e5 +646 1 24 55 -0.65536000000000000000e5 +647 1 6 13 -0.32768000000000000000e5 +647 1 10 10 0.65536000000000000000e5 +648 1 4 35 -0.13107200000000000000e6 +648 1 6 13 0.65536000000000000000e5 +648 1 10 11 0.65536000000000000000e5 +648 1 10 41 0.65536000000000000000e5 +648 2 5 11 0.65536000000000000000e5 +648 3 2 15 0.65536000000000000000e5 +648 3 3 32 0.65536000000000000000e5 +648 3 4 17 -0.13107200000000000000e6 +649 1 3 34 -0.65536000000000000000e5 +649 1 10 12 0.65536000000000000000e5 +649 3 3 16 -0.65536000000000000000e5 +650 1 3 18 -0.65536000000000000000e5 +650 1 10 13 0.65536000000000000000e5 +651 1 4 35 -0.65536000000000000000e5 +651 1 10 14 0.65536000000000000000e5 +651 3 4 17 -0.65536000000000000000e5 +652 1 5 20 -0.13107200000000000000e6 +652 1 5 36 0.13107200000000000000e6 +652 1 10 15 0.65536000000000000000e5 +652 1 14 45 -0.13107200000000000000e6 +652 1 17 48 0.65536000000000000000e5 +652 1 18 49 0.65536000000000000000e5 +652 2 14 28 0.65536000000000000000e5 +652 3 4 17 0.65536000000000000000e5 +652 3 5 18 0.65536000000000000000e5 +652 3 5 34 -0.65536000000000000000e5 +652 3 13 42 0.65536000000000000000e5 +652 3 14 43 0.65536000000000000000e5 +652 4 8 12 0.65536000000000000000e5 +653 1 4 19 -0.65536000000000000000e5 +653 1 10 16 0.65536000000000000000e5 +654 1 5 20 -0.65536000000000000000e5 +654 1 10 18 0.65536000000000000000e5 +655 1 3 18 -0.16384000000000000000e5 +655 1 4 35 0.16384000000000000000e5 +655 1 5 20 -0.32768000000000000000e5 +655 1 5 36 0.32768000000000000000e5 +655 1 10 17 -0.32768000000000000000e5 +655 1 10 19 0.65536000000000000000e5 +655 1 12 43 0.32768000000000000000e5 +655 1 14 45 0.32768000000000000000e5 +655 1 17 32 -0.65536000000000000000e5 +655 1 17 48 -0.16384000000000000000e5 +655 1 18 49 -0.16384000000000000000e5 +655 2 9 23 0.16384000000000000000e5 +655 2 14 28 -0.16384000000000000000e5 +655 3 3 16 -0.16384000000000000000e5 +655 3 4 17 -0.16384000000000000000e5 +655 3 5 34 0.16384000000000000000e5 +655 3 13 42 -0.16384000000000000000e5 +655 3 14 27 0.32768000000000000000e5 +655 3 14 43 -0.16384000000000000000e5 +655 4 2 14 -0.16384000000000000000e5 +655 4 3 15 -0.32768000000000000000e5 +656 1 3 18 0.16384000000000000000e5 +656 1 4 35 -0.16384000000000000000e5 +656 1 5 20 0.32768000000000000000e5 +656 1 5 36 -0.32768000000000000000e5 +656 1 10 17 0.32768000000000000000e5 +656 1 10 20 0.65536000000000000000e5 +656 1 12 43 -0.32768000000000000000e5 +656 1 13 20 -0.13107200000000000000e6 +656 1 14 45 -0.32768000000000000000e5 +656 1 17 32 0.65536000000000000000e5 +656 1 17 48 0.16384000000000000000e5 +656 1 18 49 0.16384000000000000000e5 +656 1 20 27 0.65536000000000000000e5 +656 2 9 23 -0.16384000000000000000e5 +656 2 11 25 0.65536000000000000000e5 +656 2 14 28 0.16384000000000000000e5 +656 3 3 16 0.16384000000000000000e5 +656 3 4 17 0.16384000000000000000e5 +656 3 5 34 -0.16384000000000000000e5 +656 3 7 20 0.65536000000000000000e5 +656 3 13 42 0.16384000000000000000e5 +656 3 14 27 -0.32768000000000000000e5 +656 3 14 43 0.16384000000000000000e5 +656 4 2 14 0.16384000000000000000e5 +656 4 3 15 0.32768000000000000000e5 +656 4 10 14 0.65536000000000000000e5 +657 1 6 21 -0.32768000000000000000e5 +657 1 10 21 0.65536000000000000000e5 +657 1 13 20 -0.65536000000000000000e5 +657 1 20 27 0.32768000000000000000e5 +657 2 9 15 -0.32768000000000000000e5 +657 2 11 25 0.32768000000000000000e5 +657 3 7 20 0.32768000000000000000e5 +657 4 10 14 0.32768000000000000000e5 +658 1 1 48 -0.32768000000000000000e5 +658 1 2 33 -0.13107200000000000000e6 +658 1 2 49 -0.32768000000000000000e5 +658 1 10 22 0.65536000000000000000e5 +658 1 11 42 0.13107200000000000000e6 +658 1 12 43 0.26214400000000000000e6 +658 1 23 38 -0.32768000000000000000e5 +658 1 28 43 -0.13107200000000000000e6 +658 1 32 47 -0.13107200000000000000e6 +658 1 33 48 -0.13107200000000000000e6 +658 2 2 32 -0.32768000000000000000e5 +658 2 12 26 -0.13107200000000000000e6 +658 3 1 30 0.65536000000000000000e5 +658 3 8 37 -0.65536000000000000000e5 +658 3 10 23 0.65536000000000000000e5 +658 3 13 42 -0.26214400000000000000e6 +658 3 28 41 -0.13107200000000000000e6 +658 3 29 42 -0.13107200000000000000e6 +658 4 3 31 0.13107200000000000000e6 +658 4 6 18 0.65536000000000000000e5 +659 1 8 39 -0.65536000000000000000e5 +659 1 10 23 0.65536000000000000000e5 +659 3 1 30 -0.65536000000000000000e5 +660 1 1 48 0.32768000000000000000e5 +660 1 2 49 0.32768000000000000000e5 +660 1 8 39 0.65536000000000000000e5 +660 1 9 40 0.65536000000000000000e5 +660 1 10 24 0.65536000000000000000e5 +660 1 10 41 -0.13107200000000000000e6 +660 1 12 43 -0.26214400000000000000e6 +660 1 23 38 0.32768000000000000000e5 +660 1 26 41 -0.65536000000000000000e5 +660 1 28 43 0.13107200000000000000e6 +660 1 32 47 0.26214400000000000000e6 +660 2 2 32 0.32768000000000000000e5 +660 2 16 30 0.65536000000000000000e5 +660 2 20 34 0.13107200000000000000e6 +660 3 10 23 -0.65536000000000000000e5 +660 3 22 35 0.26214400000000000000e6 +660 3 28 41 0.26214400000000000000e6 +660 4 2 30 0.65536000000000000000e5 +660 4 6 34 0.13107200000000000000e6 +661 1 1 48 -0.32768000000000000000e5 +661 1 2 33 0.13107200000000000000e6 +661 1 2 49 -0.32768000000000000000e5 +661 1 8 39 -0.65536000000000000000e5 +661 1 9 40 -0.13107200000000000000e6 +661 1 10 25 0.65536000000000000000e5 +661 1 10 26 0.65536000000000000000e5 +661 1 10 41 0.13107200000000000000e6 +661 1 11 42 -0.13107200000000000000e6 +661 1 23 38 -0.32768000000000000000e5 +661 1 26 41 0.13107200000000000000e6 +661 1 28 43 -0.13107200000000000000e6 +661 1 32 47 -0.13107200000000000000e6 +661 1 33 48 0.13107200000000000000e6 +661 2 2 32 -0.32768000000000000000e5 +661 2 4 34 0.65536000000000000000e5 +661 2 12 26 0.13107200000000000000e6 +661 2 16 30 -0.65536000000000000000e5 +661 2 20 34 -0.13107200000000000000e6 +661 3 3 32 0.13107200000000000000e6 +661 3 9 38 -0.65536000000000000000e5 +661 3 10 23 0.65536000000000000000e5 +661 3 10 39 -0.65536000000000000000e5 +661 3 13 42 0.26214400000000000000e6 +661 3 14 27 -0.26214400000000000000e6 +661 3 22 35 -0.26214400000000000000e6 +661 3 28 41 -0.13107200000000000000e6 +661 3 29 42 0.13107200000000000000e6 +661 4 2 30 -0.65536000000000000000e5 +661 4 3 31 -0.13107200000000000000e6 +661 4 6 34 -0.13107200000000000000e6 +661 4 7 19 0.65536000000000000000e5 +661 4 8 20 0.13107200000000000000e6 +662 1 2 33 -0.65536000000000000000e5 +662 1 10 27 0.65536000000000000000e5 +663 1 10 28 0.65536000000000000000e5 +663 1 10 41 -0.65536000000000000000e5 +663 3 3 32 -0.65536000000000000000e5 +664 1 2 33 0.65536000000000000000e5 +664 1 10 29 0.65536000000000000000e5 +664 1 10 41 0.65536000000000000000e5 +664 1 12 43 -0.13107200000000000000e6 +664 2 12 26 0.65536000000000000000e5 +664 3 3 32 0.65536000000000000000e5 +664 3 14 27 -0.13107200000000000000e6 +664 4 8 20 0.65536000000000000000e5 +665 1 10 30 0.65536000000000000000e5 +665 1 11 42 -0.65536000000000000000e5 +665 3 4 33 -0.65536000000000000000e5 +666 1 10 31 0.65536000000000000000e5 +666 1 12 43 -0.65536000000000000000e5 +666 3 14 27 -0.65536000000000000000e5 +667 1 4 35 -0.65536000000000000000e5 +667 1 10 32 0.65536000000000000000e5 +668 1 10 33 0.65536000000000000000e5 +668 1 14 45 -0.13107200000000000000e6 +668 1 17 48 0.65536000000000000000e5 +668 1 18 49 0.65536000000000000000e5 +668 2 14 28 0.65536000000000000000e5 +668 3 5 34 -0.65536000000000000000e5 +668 3 13 42 0.65536000000000000000e5 +668 3 14 43 0.65536000000000000000e5 +669 1 4 35 -0.32768000000000000000e5 +669 1 10 34 0.65536000000000000000e5 +669 1 12 43 -0.32768000000000000000e5 +669 1 14 45 -0.65536000000000000000e5 +669 1 17 48 0.32768000000000000000e5 +669 1 18 49 0.32768000000000000000e5 +669 2 9 23 -0.32768000000000000000e5 +669 2 14 28 0.32768000000000000000e5 +669 3 5 34 -0.32768000000000000000e5 +669 3 13 42 0.32768000000000000000e5 +669 3 14 27 -0.32768000000000000000e5 +669 3 14 43 0.32768000000000000000e5 +670 1 5 36 -0.65536000000000000000e5 +670 1 10 35 0.65536000000000000000e5 +671 1 10 36 0.65536000000000000000e5 +671 1 13 20 -0.13107200000000000000e6 +671 1 17 32 0.65536000000000000000e5 +671 1 20 27 0.65536000000000000000e5 +671 2 11 25 0.65536000000000000000e5 +671 3 8 21 0.13107200000000000000e6 +672 1 8 39 -0.65536000000000000000e5 +672 1 10 37 0.65536000000000000000e5 +673 1 1 48 0.32768000000000000000e5 +673 1 2 49 0.32768000000000000000e5 +673 1 8 39 0.65536000000000000000e5 +673 1 9 40 0.65536000000000000000e5 +673 1 10 38 0.65536000000000000000e5 +673 1 10 41 -0.13107200000000000000e6 +673 1 12 43 -0.26214400000000000000e6 +673 1 23 38 0.32768000000000000000e5 +673 1 26 41 -0.65536000000000000000e5 +673 1 28 43 0.13107200000000000000e6 +673 1 32 47 0.26214400000000000000e6 +673 2 2 32 0.32768000000000000000e5 +673 2 16 30 0.65536000000000000000e5 +673 2 20 34 0.13107200000000000000e6 +673 3 22 35 0.26214400000000000000e6 +673 3 28 41 0.26214400000000000000e6 +673 4 2 30 0.65536000000000000000e5 +673 4 6 34 0.13107200000000000000e6 +674 1 9 40 -0.65536000000000000000e5 +674 1 10 39 0.65536000000000000000e5 +675 1 1 48 -0.32768000000000000000e5 +675 1 2 49 -0.32768000000000000000e5 +675 1 8 39 -0.65536000000000000000e5 +675 1 9 40 -0.65536000000000000000e5 +675 1 10 40 0.65536000000000000000e5 +675 1 10 41 0.13107200000000000000e6 +675 1 12 43 0.26214400000000000000e6 +675 1 23 38 -0.32768000000000000000e5 +675 1 26 41 0.13107200000000000000e6 +675 1 28 43 -0.26214400000000000000e6 +675 1 32 47 -0.26214400000000000000e6 +675 2 2 32 -0.32768000000000000000e5 +675 2 4 34 0.65536000000000000000e5 +675 2 16 30 -0.65536000000000000000e5 +675 2 20 34 -0.13107200000000000000e6 +675 3 9 38 -0.65536000000000000000e5 +675 3 10 39 -0.65536000000000000000e5 +675 3 22 35 -0.26214400000000000000e6 +675 3 28 41 -0.26214400000000000000e6 +675 4 2 30 -0.65536000000000000000e5 +675 4 6 34 -0.13107200000000000000e6 +676 1 10 41 0.65536000000000000000e5 +676 1 10 42 0.65536000000000000000e5 +676 1 11 42 0.65536000000000000000e5 +676 1 28 43 -0.65536000000000000000e5 +676 1 32 47 -0.65536000000000000000e5 +676 1 33 48 -0.65536000000000000000e5 +676 3 13 42 -0.13107200000000000000e6 +676 3 28 41 -0.65536000000000000000e5 +676 3 29 42 -0.65536000000000000000e5 +676 4 3 31 0.65536000000000000000e5 +677 1 10 43 0.65536000000000000000e5 +677 1 11 42 -0.65536000000000000000e5 +678 1 10 44 0.65536000000000000000e5 +678 1 17 48 -0.65536000000000000000e5 +678 3 13 42 -0.65536000000000000000e5 +679 1 10 45 0.65536000000000000000e5 +679 1 14 45 -0.13107200000000000000e6 +679 1 17 48 0.65536000000000000000e5 +679 1 18 49 0.65536000000000000000e5 +679 2 14 28 0.65536000000000000000e5 +679 3 13 42 0.65536000000000000000e5 +679 3 14 43 0.65536000000000000000e5 +680 1 10 46 0.65536000000000000000e5 +680 1 14 45 -0.65536000000000000000e5 +681 1 1 48 0.32768000000000000000e5 +681 1 2 49 0.32768000000000000000e5 +681 1 8 39 0.65536000000000000000e5 +681 1 9 40 0.65536000000000000000e5 +681 1 10 41 -0.13107200000000000000e6 +681 1 10 47 0.65536000000000000000e5 +681 1 12 43 -0.26214400000000000000e6 +681 1 23 38 0.32768000000000000000e5 +681 1 26 41 -0.65536000000000000000e5 +681 1 28 43 0.13107200000000000000e6 +681 1 32 47 0.26214400000000000000e6 +681 2 2 32 0.32768000000000000000e5 +681 2 16 30 0.65536000000000000000e5 +681 2 20 34 0.13107200000000000000e6 +681 3 9 38 0.65536000000000000000e5 +681 3 22 35 0.26214400000000000000e6 +681 3 28 41 0.26214400000000000000e6 +681 4 2 30 0.65536000000000000000e5 +681 4 6 34 0.13107200000000000000e6 +682 1 10 48 0.65536000000000000000e5 +682 1 26 41 -0.65536000000000000000e5 +683 1 1 48 -0.32768000000000000000e5 +683 1 2 49 -0.32768000000000000000e5 +683 1 8 39 -0.65536000000000000000e5 +683 1 9 40 -0.65536000000000000000e5 +683 1 10 41 0.13107200000000000000e6 +683 1 10 49 0.65536000000000000000e5 +683 1 12 43 0.26214400000000000000e6 +683 1 23 38 -0.32768000000000000000e5 +683 1 26 41 0.13107200000000000000e6 +683 1 28 43 -0.26214400000000000000e6 +683 1 32 47 -0.26214400000000000000e6 +683 2 2 32 -0.32768000000000000000e5 +683 2 4 34 0.65536000000000000000e5 +683 2 16 30 -0.65536000000000000000e5 +683 2 20 34 -0.13107200000000000000e6 +683 3 9 38 -0.65536000000000000000e5 +683 3 22 35 -0.26214400000000000000e6 +683 3 28 41 -0.26214400000000000000e6 +683 4 2 30 -0.65536000000000000000e5 +683 4 6 34 -0.13107200000000000000e6 +684 1 10 50 0.65536000000000000000e5 +684 1 28 43 -0.65536000000000000000e5 +685 1 10 51 0.65536000000000000000e5 +685 1 33 48 -0.65536000000000000000e5 +685 3 29 42 -0.65536000000000000000e5 +686 1 10 52 0.65536000000000000000e5 +686 1 34 49 -0.65536000000000000000e5 +686 3 18 47 -0.65536000000000000000e5 +687 1 10 53 0.65536000000000000000e5 +687 1 26 41 -0.65536000000000000000e5 +687 3 27 40 0.65536000000000000000e5 +688 1 1 48 -0.32768000000000000000e5 +688 1 2 49 -0.32768000000000000000e5 +688 1 8 39 -0.65536000000000000000e5 +688 1 9 40 -0.65536000000000000000e5 +688 1 10 41 0.13107200000000000000e6 +688 1 10 54 0.65536000000000000000e5 +688 1 12 43 0.26214400000000000000e6 +688 1 23 38 -0.32768000000000000000e5 +688 1 26 41 0.13107200000000000000e6 +688 1 28 43 -0.26214400000000000000e6 +688 1 32 47 -0.26214400000000000000e6 +688 2 2 32 -0.32768000000000000000e5 +688 2 4 34 0.65536000000000000000e5 +688 2 16 30 -0.65536000000000000000e5 +688 2 20 34 -0.13107200000000000000e6 +688 3 5 50 0.65536000000000000000e5 +688 3 9 38 -0.65536000000000000000e5 +688 3 22 35 -0.26214400000000000000e6 +688 3 28 41 -0.26214400000000000000e6 +688 4 2 30 -0.65536000000000000000e5 +688 4 6 34 -0.13107200000000000000e6 +689 1 10 55 0.65536000000000000000e5 +689 1 33 48 -0.65536000000000000000e5 +690 1 1 48 -0.32768000000000000000e5 +690 1 2 49 -0.32768000000000000000e5 +690 1 8 39 -0.65536000000000000000e5 +690 1 9 40 -0.65536000000000000000e5 +690 1 10 41 0.13107200000000000000e6 +690 1 10 56 0.65536000000000000000e5 +690 1 12 43 0.26214400000000000000e6 +690 1 23 38 -0.32768000000000000000e5 +690 1 24 55 0.65536000000000000000e5 +690 1 26 41 0.65536000000000000000e5 +690 1 28 43 -0.26214400000000000000e6 +690 1 32 47 -0.26214400000000000000e6 +690 2 2 32 -0.32768000000000000000e5 +690 2 4 34 0.65536000000000000000e5 +690 2 16 30 -0.65536000000000000000e5 +690 2 20 34 -0.13107200000000000000e6 +690 3 5 50 0.65536000000000000000e5 +690 3 9 38 -0.65536000000000000000e5 +690 3 22 35 -0.26214400000000000000e6 +690 3 22 51 -0.65536000000000000000e5 +690 3 23 52 0.13107200000000000000e6 +690 3 27 40 0.65536000000000000000e5 +690 3 28 41 -0.26214400000000000000e6 +690 4 2 30 -0.65536000000000000000e5 +690 4 6 34 -0.13107200000000000000e6 +690 4 7 35 -0.65536000000000000000e5 +691 1 2 33 -0.32768000000000000000e5 +691 1 11 11 0.65536000000000000000e5 +691 1 11 42 0.32768000000000000000e5 +691 1 12 43 0.65536000000000000000e5 +691 1 26 33 -0.32768000000000000000e5 +691 1 28 43 -0.32768000000000000000e5 +691 1 32 47 -0.32768000000000000000e5 +691 1 33 48 -0.32768000000000000000e5 +691 2 12 26 -0.32768000000000000000e5 +691 3 3 32 -0.32768000000000000000e5 +691 3 4 33 0.32768000000000000000e5 +691 3 5 34 -0.65536000000000000000e5 +691 3 10 11 -0.32768000000000000000e5 +691 3 13 42 -0.65536000000000000000e5 +691 3 14 27 0.65536000000000000000e5 +691 3 28 41 -0.32768000000000000000e5 +691 3 29 42 -0.32768000000000000000e5 +691 4 3 31 0.32768000000000000000e5 +691 4 8 20 -0.32768000000000000000e5 +691 4 9 21 0.32768000000000000000e5 +692 1 3 18 -0.65536000000000000000e5 +692 1 11 12 0.65536000000000000000e5 +693 1 4 35 -0.65536000000000000000e5 +693 1 11 13 0.65536000000000000000e5 +693 3 4 17 -0.65536000000000000000e5 +694 1 5 20 -0.13107200000000000000e6 +694 1 5 36 0.13107200000000000000e6 +694 1 11 14 0.65536000000000000000e5 +694 1 14 45 -0.13107200000000000000e6 +694 1 17 48 0.65536000000000000000e5 +694 1 18 49 0.65536000000000000000e5 +694 2 14 28 0.65536000000000000000e5 +694 3 4 17 0.65536000000000000000e5 +694 3 5 18 0.65536000000000000000e5 +694 3 5 34 -0.65536000000000000000e5 +694 3 13 42 0.65536000000000000000e5 +694 3 14 43 0.65536000000000000000e5 +694 4 8 12 0.65536000000000000000e5 +695 1 11 15 0.65536000000000000000e5 +695 1 15 30 -0.65536000000000000000e5 +695 3 5 18 -0.65536000000000000000e5 +696 1 10 17 -0.65536000000000000000e5 +696 1 11 16 0.65536000000000000000e5 +697 1 5 20 -0.65536000000000000000e5 +697 1 11 17 0.65536000000000000000e5 +698 1 3 18 0.16384000000000000000e5 +698 1 4 35 -0.16384000000000000000e5 +698 1 5 20 0.32768000000000000000e5 +698 1 5 36 -0.32768000000000000000e5 +698 1 10 17 0.32768000000000000000e5 +698 1 11 19 0.65536000000000000000e5 +698 1 12 43 -0.32768000000000000000e5 +698 1 13 20 -0.13107200000000000000e6 +698 1 14 45 -0.32768000000000000000e5 +698 1 17 32 0.65536000000000000000e5 +698 1 17 48 0.16384000000000000000e5 +698 1 18 49 0.16384000000000000000e5 +698 1 20 27 0.65536000000000000000e5 +698 2 9 23 -0.16384000000000000000e5 +698 2 11 25 0.65536000000000000000e5 +698 2 14 28 0.16384000000000000000e5 +698 3 3 16 0.16384000000000000000e5 +698 3 4 17 0.16384000000000000000e5 +698 3 5 34 -0.16384000000000000000e5 +698 3 7 20 0.65536000000000000000e5 +698 3 13 42 0.16384000000000000000e5 +698 3 14 27 -0.32768000000000000000e5 +698 3 14 43 0.16384000000000000000e5 +698 4 2 14 0.16384000000000000000e5 +698 4 3 15 0.32768000000000000000e5 +698 4 10 14 0.65536000000000000000e5 +699 1 6 21 -0.65536000000000000000e5 +699 1 11 20 0.65536000000000000000e5 +700 1 3 18 -0.81920000000000000000e4 +700 1 4 19 0.16384000000000000000e5 +700 1 5 36 0.16384000000000000000e5 +700 1 11 21 0.65536000000000000000e5 +700 1 12 43 0.81920000000000000000e4 +700 1 13 44 -0.16384000000000000000e5 +700 1 14 21 -0.13107200000000000000e6 +700 1 14 45 -0.16384000000000000000e5 +700 1 21 44 0.13107200000000000000e6 +700 1 33 36 -0.65536000000000000000e5 +700 2 11 25 0.32768000000000000000e5 +700 2 15 29 -0.32768000000000000000e5 +700 3 3 16 -0.81920000000000000000e4 +700 3 4 17 -0.81920000000000000000e4 +700 3 7 36 0.32768000000000000000e5 +700 3 8 21 0.65536000000000000000e5 +700 3 14 19 0.65536000000000000000e5 +700 3 14 27 0.81920000000000000000e4 +700 3 16 29 0.16384000000000000000e5 +700 3 18 31 0.32768000000000000000e5 +700 3 19 32 0.65536000000000000000e5 +700 4 2 14 -0.81920000000000000000e4 +700 4 11 15 0.65536000000000000000e5 +700 4 11 23 0.16384000000000000000e5 +700 4 13 25 0.65536000000000000000e5 +701 1 8 39 -0.65536000000000000000e5 +701 1 11 22 0.65536000000000000000e5 +701 3 1 30 -0.65536000000000000000e5 +702 1 1 48 0.32768000000000000000e5 +702 1 2 49 0.32768000000000000000e5 +702 1 8 39 0.65536000000000000000e5 +702 1 9 40 0.65536000000000000000e5 +702 1 10 41 -0.13107200000000000000e6 +702 1 11 23 0.65536000000000000000e5 +702 1 12 43 -0.26214400000000000000e6 +702 1 23 38 0.32768000000000000000e5 +702 1 26 41 -0.65536000000000000000e5 +702 1 28 43 0.13107200000000000000e6 +702 1 32 47 0.26214400000000000000e6 +702 2 2 32 0.32768000000000000000e5 +702 2 16 30 0.65536000000000000000e5 +702 2 20 34 0.13107200000000000000e6 +702 3 10 23 -0.65536000000000000000e5 +702 3 22 35 0.26214400000000000000e6 +702 3 28 41 0.26214400000000000000e6 +702 4 2 30 0.65536000000000000000e5 +702 4 6 34 0.13107200000000000000e6 +703 1 10 25 -0.65536000000000000000e5 +703 1 11 24 0.65536000000000000000e5 +704 1 1 48 -0.32768000000000000000e5 +704 1 2 33 0.13107200000000000000e6 +704 1 2 49 -0.32768000000000000000e5 +704 1 8 39 -0.65536000000000000000e5 +704 1 9 40 -0.13107200000000000000e6 +704 1 10 25 0.65536000000000000000e5 +704 1 10 41 0.13107200000000000000e6 +704 1 11 25 0.65536000000000000000e5 +704 1 11 42 -0.13107200000000000000e6 +704 1 23 38 -0.32768000000000000000e5 +704 1 26 41 0.13107200000000000000e6 +704 1 28 43 -0.13107200000000000000e6 +704 1 32 47 -0.13107200000000000000e6 +704 1 33 48 0.13107200000000000000e6 +704 2 2 32 -0.32768000000000000000e5 +704 2 4 34 0.65536000000000000000e5 +704 2 12 26 0.13107200000000000000e6 +704 2 16 30 -0.65536000000000000000e5 +704 2 20 34 -0.13107200000000000000e6 +704 3 3 32 0.13107200000000000000e6 +704 3 9 38 -0.65536000000000000000e5 +704 3 10 23 0.65536000000000000000e5 +704 3 10 39 -0.65536000000000000000e5 +704 3 13 42 0.26214400000000000000e6 +704 3 14 27 -0.26214400000000000000e6 +704 3 22 35 -0.26214400000000000000e6 +704 3 28 41 -0.13107200000000000000e6 +704 3 29 42 0.13107200000000000000e6 +704 4 2 30 -0.65536000000000000000e5 +704 4 3 31 -0.13107200000000000000e6 +704 4 6 34 -0.13107200000000000000e6 +704 4 7 19 0.65536000000000000000e5 +704 4 8 20 0.13107200000000000000e6 +705 1 10 41 -0.65536000000000000000e5 +705 1 11 27 0.65536000000000000000e5 +705 3 3 32 -0.65536000000000000000e5 +706 1 2 33 0.65536000000000000000e5 +706 1 10 41 0.65536000000000000000e5 +706 1 11 28 0.65536000000000000000e5 +706 1 12 43 -0.13107200000000000000e6 +706 2 12 26 0.65536000000000000000e5 +706 3 3 32 0.65536000000000000000e5 +706 3 14 27 -0.13107200000000000000e6 +706 4 8 20 0.65536000000000000000e5 +707 1 11 29 0.65536000000000000000e5 +707 1 11 42 -0.65536000000000000000e5 +707 3 4 33 -0.65536000000000000000e5 +708 1 2 33 -0.65536000000000000000e5 +708 1 11 30 0.65536000000000000000e5 +708 1 11 42 0.65536000000000000000e5 +708 1 12 43 0.13107200000000000000e6 +708 1 26 33 -0.65536000000000000000e5 +708 1 28 43 -0.65536000000000000000e5 +708 1 32 47 -0.65536000000000000000e5 +708 1 33 48 -0.65536000000000000000e5 +708 2 12 26 -0.65536000000000000000e5 +708 3 3 32 -0.65536000000000000000e5 +708 3 4 33 0.65536000000000000000e5 +708 3 5 34 -0.13107200000000000000e6 +708 3 13 42 -0.13107200000000000000e6 +708 3 14 27 0.13107200000000000000e6 +708 3 28 41 -0.65536000000000000000e5 +708 3 29 42 -0.65536000000000000000e5 +708 4 3 31 0.65536000000000000000e5 +708 4 8 20 -0.65536000000000000000e5 +708 4 9 21 0.65536000000000000000e5 +709 1 4 35 -0.65536000000000000000e5 +709 1 11 31 0.65536000000000000000e5 +710 1 11 32 0.65536000000000000000e5 +710 1 14 45 -0.13107200000000000000e6 +710 1 17 48 0.65536000000000000000e5 +710 1 18 49 0.65536000000000000000e5 +710 2 14 28 0.65536000000000000000e5 +710 3 5 34 -0.65536000000000000000e5 +710 3 13 42 0.65536000000000000000e5 +710 3 14 43 0.65536000000000000000e5 +711 1 11 33 0.65536000000000000000e5 +711 1 15 30 -0.65536000000000000000e5 +712 1 5 36 -0.65536000000000000000e5 +712 1 11 34 0.65536000000000000000e5 +713 1 11 18 -0.65536000000000000000e5 +713 1 11 35 0.65536000000000000000e5 +713 3 6 19 0.65536000000000000000e5 +714 1 11 36 0.65536000000000000000e5 +714 1 18 33 -0.65536000000000000000e5 +715 1 1 48 0.32768000000000000000e5 +715 1 2 49 0.32768000000000000000e5 +715 1 8 39 0.65536000000000000000e5 +715 1 9 40 0.65536000000000000000e5 +715 1 10 41 -0.13107200000000000000e6 +715 1 11 37 0.65536000000000000000e5 +715 1 12 43 -0.26214400000000000000e6 +715 1 23 38 0.32768000000000000000e5 +715 1 26 41 -0.65536000000000000000e5 +715 1 28 43 0.13107200000000000000e6 +715 1 32 47 0.26214400000000000000e6 +715 2 2 32 0.32768000000000000000e5 +715 2 16 30 0.65536000000000000000e5 +715 2 20 34 0.13107200000000000000e6 +715 3 22 35 0.26214400000000000000e6 +715 3 28 41 0.26214400000000000000e6 +715 4 2 30 0.65536000000000000000e5 +715 4 6 34 0.13107200000000000000e6 +716 1 9 40 -0.65536000000000000000e5 +716 1 11 38 0.65536000000000000000e5 +717 1 1 48 -0.32768000000000000000e5 +717 1 2 49 -0.32768000000000000000e5 +717 1 8 39 -0.65536000000000000000e5 +717 1 9 40 -0.65536000000000000000e5 +717 1 10 41 0.13107200000000000000e6 +717 1 11 39 0.65536000000000000000e5 +717 1 12 43 0.26214400000000000000e6 +717 1 23 38 -0.32768000000000000000e5 +717 1 26 41 0.13107200000000000000e6 +717 1 28 43 -0.26214400000000000000e6 +717 1 32 47 -0.26214400000000000000e6 +717 2 2 32 -0.32768000000000000000e5 +717 2 4 34 0.65536000000000000000e5 +717 2 16 30 -0.65536000000000000000e5 +717 2 20 34 -0.13107200000000000000e6 +717 3 9 38 -0.65536000000000000000e5 +717 3 10 39 -0.65536000000000000000e5 +717 3 22 35 -0.26214400000000000000e6 +717 3 28 41 -0.26214400000000000000e6 +717 4 2 30 -0.65536000000000000000e5 +717 4 6 34 -0.13107200000000000000e6 +718 1 1 48 0.32768000000000000000e5 +718 1 2 49 0.32768000000000000000e5 +718 1 8 39 0.65536000000000000000e5 +718 1 9 40 0.13107200000000000000e6 +718 1 10 41 -0.13107200000000000000e6 +718 1 11 40 0.65536000000000000000e5 +718 1 11 42 -0.13107200000000000000e6 +718 1 12 43 -0.26214400000000000000e6 +718 1 23 38 0.32768000000000000000e5 +718 1 26 41 -0.13107200000000000000e6 +718 1 28 43 0.26214400000000000000e6 +718 1 32 47 0.26214400000000000000e6 +718 2 2 32 0.32768000000000000000e5 +718 2 4 34 -0.65536000000000000000e5 +718 2 16 30 0.65536000000000000000e5 +718 2 20 34 0.13107200000000000000e6 +718 2 28 34 0.65536000000000000000e5 +718 3 9 38 0.65536000000000000000e5 +718 3 10 39 0.65536000000000000000e5 +718 3 22 35 0.26214400000000000000e6 +718 3 28 41 0.26214400000000000000e6 +718 4 2 30 0.65536000000000000000e5 +718 4 6 34 0.13107200000000000000e6 +718 4 18 22 0.65536000000000000000e5 +718 4 18 30 0.65536000000000000000e5 +718 4 21 33 0.65536000000000000000e5 +719 1 10 41 0.65536000000000000000e5 +719 1 11 41 0.65536000000000000000e5 +719 1 11 42 0.65536000000000000000e5 +719 1 28 43 -0.65536000000000000000e5 +719 1 32 47 -0.65536000000000000000e5 +719 1 33 48 -0.65536000000000000000e5 +719 3 13 42 -0.13107200000000000000e6 +719 3 28 41 -0.65536000000000000000e5 +719 3 29 42 -0.65536000000000000000e5 +719 4 3 31 0.65536000000000000000e5 +720 1 11 43 0.65536000000000000000e5 +720 1 26 33 -0.65536000000000000000e5 +721 1 11 44 0.65536000000000000000e5 +721 1 14 45 -0.13107200000000000000e6 +721 1 17 48 0.65536000000000000000e5 +721 1 18 49 0.65536000000000000000e5 +721 2 14 28 0.65536000000000000000e5 +721 3 13 42 0.65536000000000000000e5 +721 3 14 43 0.65536000000000000000e5 +722 1 11 45 0.65536000000000000000e5 +722 1 18 49 -0.65536000000000000000e5 +722 3 14 43 -0.65536000000000000000e5 +723 1 11 18 -0.65536000000000000000e5 +723 1 11 46 0.65536000000000000000e5 +723 3 6 19 0.65536000000000000000e5 +723 3 17 30 0.65536000000000000000e5 +724 1 11 47 0.65536000000000000000e5 +724 1 26 41 -0.65536000000000000000e5 +725 1 1 48 -0.32768000000000000000e5 +725 1 2 49 -0.32768000000000000000e5 +725 1 8 39 -0.65536000000000000000e5 +725 1 9 40 -0.65536000000000000000e5 +725 1 10 41 0.13107200000000000000e6 +725 1 11 48 0.65536000000000000000e5 +725 1 12 43 0.26214400000000000000e6 +725 1 23 38 -0.32768000000000000000e5 +725 1 26 41 0.13107200000000000000e6 +725 1 28 43 -0.26214400000000000000e6 +725 1 32 47 -0.26214400000000000000e6 +725 2 2 32 -0.32768000000000000000e5 +725 2 4 34 0.65536000000000000000e5 +725 2 16 30 -0.65536000000000000000e5 +725 2 20 34 -0.13107200000000000000e6 +725 3 9 38 -0.65536000000000000000e5 +725 3 22 35 -0.26214400000000000000e6 +725 3 28 41 -0.26214400000000000000e6 +725 4 2 30 -0.65536000000000000000e5 +725 4 6 34 -0.13107200000000000000e6 +726 1 1 48 0.32768000000000000000e5 +726 1 2 49 0.32768000000000000000e5 +726 1 8 39 0.65536000000000000000e5 +726 1 9 40 0.65536000000000000000e5 +726 1 10 41 -0.13107200000000000000e6 +726 1 11 49 0.65536000000000000000e5 +726 1 12 43 -0.26214400000000000000e6 +726 1 23 38 0.32768000000000000000e5 +726 1 26 41 -0.65536000000000000000e5 +726 1 28 43 0.26214400000000000000e6 +726 1 32 47 0.26214400000000000000e6 +726 1 33 48 -0.13107200000000000000e6 +726 2 2 32 0.32768000000000000000e5 +726 2 4 34 -0.65536000000000000000e5 +726 2 16 30 0.65536000000000000000e5 +726 2 20 34 0.13107200000000000000e6 +726 2 28 34 0.65536000000000000000e5 +726 3 9 38 0.65536000000000000000e5 +726 3 22 35 0.26214400000000000000e6 +726 3 28 41 0.26214400000000000000e6 +726 3 29 42 -0.13107200000000000000e6 +726 4 2 30 0.65536000000000000000e5 +726 4 6 34 0.13107200000000000000e6 +726 4 18 30 0.65536000000000000000e5 +726 4 21 33 0.65536000000000000000e5 +727 1 11 50 0.65536000000000000000e5 +727 1 33 48 -0.65536000000000000000e5 +727 3 29 42 -0.65536000000000000000e5 +728 1 11 51 0.65536000000000000000e5 +728 1 33 40 -0.65536000000000000000e5 +729 1 11 52 0.65536000000000000000e5 +729 1 18 49 -0.65536000000000000000e5 +730 1 1 48 -0.32768000000000000000e5 +730 1 2 49 -0.32768000000000000000e5 +730 1 8 39 -0.65536000000000000000e5 +730 1 9 40 -0.65536000000000000000e5 +730 1 10 41 0.13107200000000000000e6 +730 1 11 53 0.65536000000000000000e5 +730 1 12 43 0.26214400000000000000e6 +730 1 23 38 -0.32768000000000000000e5 +730 1 26 41 0.13107200000000000000e6 +730 1 28 43 -0.26214400000000000000e6 +730 1 32 47 -0.26214400000000000000e6 +730 2 2 32 -0.32768000000000000000e5 +730 2 4 34 0.65536000000000000000e5 +730 2 16 30 -0.65536000000000000000e5 +730 2 20 34 -0.13107200000000000000e6 +730 3 5 50 0.65536000000000000000e5 +730 3 9 38 -0.65536000000000000000e5 +730 3 22 35 -0.26214400000000000000e6 +730 3 28 41 -0.26214400000000000000e6 +730 4 2 30 -0.65536000000000000000e5 +730 4 6 34 -0.13107200000000000000e6 +731 1 1 48 0.32768000000000000000e5 +731 1 2 49 0.32768000000000000000e5 +731 1 8 39 0.65536000000000000000e5 +731 1 9 40 0.65536000000000000000e5 +731 1 10 41 -0.13107200000000000000e6 +731 1 11 54 0.65536000000000000000e5 +731 1 12 43 -0.26214400000000000000e6 +731 1 23 38 0.32768000000000000000e5 +731 1 26 41 -0.65536000000000000000e5 +731 1 28 43 0.26214400000000000000e6 +731 1 32 47 0.26214400000000000000e6 +731 1 33 48 -0.13107200000000000000e6 +731 2 2 32 0.32768000000000000000e5 +731 2 4 34 -0.65536000000000000000e5 +731 2 16 30 0.65536000000000000000e5 +731 2 20 34 0.13107200000000000000e6 +731 2 28 34 0.65536000000000000000e5 +731 3 5 50 -0.65536000000000000000e5 +731 3 9 38 0.65536000000000000000e5 +731 3 22 35 0.26214400000000000000e6 +731 3 27 40 -0.65536000000000000000e5 +731 3 28 41 0.26214400000000000000e6 +731 4 2 30 0.65536000000000000000e5 +731 4 6 34 0.13107200000000000000e6 +731 4 21 33 0.65536000000000000000e5 +732 1 11 55 0.65536000000000000000e5 +732 1 33 40 -0.65536000000000000000e5 +732 3 14 51 0.13107200000000000000e6 +732 3 29 42 -0.65536000000000000000e5 +732 3 30 43 -0.65536000000000000000e5 +732 4 19 31 -0.65536000000000000000e5 +733 1 1 48 0.32768000000000000000e5 +733 1 2 49 0.32768000000000000000e5 +733 1 8 39 0.65536000000000000000e5 +733 1 9 40 0.65536000000000000000e5 +733 1 10 41 -0.13107200000000000000e6 +733 1 11 56 0.65536000000000000000e5 +733 1 12 43 -0.26214400000000000000e6 +733 1 23 38 0.32768000000000000000e5 +733 1 26 41 -0.65536000000000000000e5 +733 1 28 43 0.26214400000000000000e6 +733 1 32 47 0.26214400000000000000e6 +733 1 33 48 -0.13107200000000000000e6 +733 2 2 32 0.32768000000000000000e5 +733 2 4 34 -0.65536000000000000000e5 +733 2 16 30 0.65536000000000000000e5 +733 2 20 34 0.13107200000000000000e6 +733 2 28 34 0.65536000000000000000e5 +733 3 5 50 -0.65536000000000000000e5 +733 3 9 38 0.65536000000000000000e5 +733 3 10 55 -0.13107200000000000000e6 +733 3 22 35 0.26214400000000000000e6 +733 3 22 51 0.65536000000000000000e5 +733 3 23 52 -0.13107200000000000000e6 +733 3 27 40 -0.65536000000000000000e5 +733 3 28 41 0.26214400000000000000e6 +733 3 35 48 0.26214400000000000000e6 +733 3 40 45 -0.13107200000000000000e6 +733 4 2 30 0.65536000000000000000e5 +733 4 6 34 0.13107200000000000000e6 +733 4 7 35 0.65536000000000000000e5 +733 4 22 34 -0.13107200000000000000e6 +734 1 7 16 -0.32768000000000000000e5 +734 1 12 12 0.65536000000000000000e5 +735 1 2 17 -0.32768000000000000000e5 +735 1 4 35 -0.32768000000000000000e5 +735 1 12 13 0.65536000000000000000e5 +735 1 12 43 -0.32768000000000000000e5 +735 1 14 45 -0.65536000000000000000e5 +735 1 16 23 0.32768000000000000000e5 +735 1 16 31 -0.13107200000000000000e6 +735 1 17 48 0.32768000000000000000e5 +735 1 18 49 0.32768000000000000000e5 +735 1 20 27 0.13107200000000000000e6 +735 2 7 13 0.65536000000000000000e5 +735 2 9 23 -0.32768000000000000000e5 +735 2 10 24 -0.65536000000000000000e5 +735 2 14 28 0.32768000000000000000e5 +735 3 3 16 -0.32768000000000000000e5 +735 3 5 34 -0.32768000000000000000e5 +735 3 7 12 -0.32768000000000000000e5 +735 3 13 42 0.32768000000000000000e5 +735 3 14 27 -0.32768000000000000000e5 +735 3 14 43 0.32768000000000000000e5 +735 4 1 13 -0.32768000000000000000e5 +735 4 10 10 -0.13107200000000000000e6 +736 1 2 17 -0.32768000000000000000e5 +736 1 3 18 -0.32768000000000000000e5 +736 1 3 34 -0.32768000000000000000e5 +736 1 12 14 0.65536000000000000000e5 +736 2 6 12 -0.32768000000000000000e5 +736 3 3 16 -0.32768000000000000000e5 +737 1 4 19 -0.65536000000000000000e5 +737 1 12 15 0.65536000000000000000e5 +738 1 2 17 -0.32768000000000000000e5 +738 1 3 18 -0.16384000000000000000e5 +738 1 3 34 -0.16384000000000000000e5 +738 1 4 35 -0.16384000000000000000e5 +738 1 7 16 -0.32768000000000000000e5 +738 1 12 16 0.65536000000000000000e5 +738 1 12 43 -0.16384000000000000000e5 +738 1 14 45 -0.32768000000000000000e5 +738 1 16 23 0.16384000000000000000e5 +738 1 16 31 -0.65536000000000000000e5 +738 1 17 48 0.16384000000000000000e5 +738 1 18 49 0.16384000000000000000e5 +738 1 20 27 0.65536000000000000000e5 +738 2 1 15 -0.32768000000000000000e5 +738 2 6 12 -0.16384000000000000000e5 +738 2 7 13 0.32768000000000000000e5 +738 2 9 23 -0.16384000000000000000e5 +738 2 10 24 -0.32768000000000000000e5 +738 2 14 28 0.16384000000000000000e5 +738 3 3 16 -0.32768000000000000000e5 +738 3 5 34 -0.16384000000000000000e5 +738 3 7 12 -0.16384000000000000000e5 +738 3 13 42 0.16384000000000000000e5 +738 3 14 27 -0.16384000000000000000e5 +738 3 14 43 0.16384000000000000000e5 +738 4 1 13 -0.16384000000000000000e5 +738 4 10 10 -0.65536000000000000000e5 +739 1 2 17 -0.32768000000000000000e5 +739 1 3 18 -0.16384000000000000000e5 +739 1 3 34 -0.16384000000000000000e5 +739 1 4 19 -0.32768000000000000000e5 +739 1 4 35 -0.16384000000000000000e5 +739 1 12 17 0.65536000000000000000e5 +739 1 12 43 -0.16384000000000000000e5 +739 1 14 45 -0.32768000000000000000e5 +739 1 16 23 0.16384000000000000000e5 +739 1 16 31 -0.65536000000000000000e5 +739 1 17 48 0.16384000000000000000e5 +739 1 18 49 0.16384000000000000000e5 +739 1 20 27 0.65536000000000000000e5 +739 2 6 12 -0.16384000000000000000e5 +739 2 9 23 -0.16384000000000000000e5 +739 2 10 24 -0.32768000000000000000e5 +739 2 14 28 0.16384000000000000000e5 +739 3 3 16 -0.32768000000000000000e5 +739 3 5 34 -0.16384000000000000000e5 +739 3 7 12 -0.16384000000000000000e5 +739 3 13 42 0.16384000000000000000e5 +739 3 14 27 -0.16384000000000000000e5 +739 3 14 43 0.16384000000000000000e5 +739 4 1 13 -0.16384000000000000000e5 +739 4 10 10 -0.65536000000000000000e5 +740 1 12 18 0.65536000000000000000e5 +740 1 20 27 -0.65536000000000000000e5 +740 3 7 20 -0.65536000000000000000e5 +741 1 2 17 -0.16384000000000000000e5 +741 1 3 18 -0.16384000000000000000e5 +741 1 3 34 -0.81920000000000000000e4 +741 1 4 19 -0.16384000000000000000e5 +741 1 5 20 -0.16384000000000000000e5 +741 1 5 36 0.16384000000000000000e5 +741 1 10 17 -0.16384000000000000000e5 +741 1 12 20 0.65536000000000000000e5 +741 1 12 43 0.81920000000000000000e4 +741 1 16 23 0.81920000000000000000e4 +741 1 16 31 -0.32768000000000000000e5 +741 1 17 32 -0.32768000000000000000e5 +741 2 6 12 -0.81920000000000000000e4 +741 2 10 24 -0.16384000000000000000e5 +741 2 11 13 -0.32768000000000000000e5 +741 3 3 16 -0.24576000000000000000e5 +741 3 4 17 -0.81920000000000000000e4 +741 3 7 12 -0.81920000000000000000e4 +741 3 7 20 -0.32768000000000000000e5 +741 3 14 27 0.81920000000000000000e4 +741 4 1 13 -0.81920000000000000000e4 +741 4 2 14 -0.81920000000000000000e4 +741 4 3 15 -0.16384000000000000000e5 +741 4 10 10 -0.32768000000000000000e5 +742 1 12 21 0.65536000000000000000e5 +742 1 16 19 -0.65536000000000000000e5 +743 1 1 32 0.65536000000000000000e5 +743 1 2 33 -0.65536000000000000000e5 +743 1 3 34 0.13107200000000000000e6 +743 1 10 41 -0.65536000000000000000e5 +743 1 12 22 0.65536000000000000000e5 +743 1 12 27 -0.13107200000000000000e6 +743 2 6 20 0.65536000000000000000e5 +743 2 7 21 -0.65536000000000000000e5 +743 3 3 32 -0.65536000000000000000e5 +744 1 1 32 -0.65536000000000000000e5 +744 1 12 23 0.65536000000000000000e5 +745 1 2 33 0.65536000000000000000e5 +745 1 3 34 -0.13107200000000000000e6 +745 1 10 41 0.65536000000000000000e5 +745 1 12 24 0.65536000000000000000e5 +745 2 7 21 0.65536000000000000000e5 +745 3 3 32 0.65536000000000000000e5 +746 1 2 33 -0.65536000000000000000e5 +746 1 12 25 0.65536000000000000000e5 +747 1 10 41 -0.65536000000000000000e5 +747 1 12 26 0.65536000000000000000e5 +747 3 3 32 -0.65536000000000000000e5 +748 1 12 28 0.65536000000000000000e5 +748 1 16 23 -0.65536000000000000000e5 +749 1 3 34 -0.65536000000000000000e5 +749 1 12 29 0.65536000000000000000e5 +750 1 12 30 0.65536000000000000000e5 +750 1 12 43 -0.65536000000000000000e5 +750 3 14 27 -0.65536000000000000000e5 +751 1 4 35 -0.32768000000000000000e5 +751 1 12 31 0.65536000000000000000e5 +751 1 12 43 -0.32768000000000000000e5 +751 1 14 45 -0.65536000000000000000e5 +751 1 16 31 -0.13107200000000000000e6 +751 1 17 48 0.32768000000000000000e5 +751 1 18 49 0.32768000000000000000e5 +751 1 20 27 0.13107200000000000000e6 +751 2 7 13 0.65536000000000000000e5 +751 2 9 23 -0.32768000000000000000e5 +751 2 10 24 -0.65536000000000000000e5 +751 2 14 28 0.32768000000000000000e5 +751 3 5 34 -0.32768000000000000000e5 +751 3 13 42 0.32768000000000000000e5 +751 3 14 27 -0.32768000000000000000e5 +751 3 14 43 0.32768000000000000000e5 +751 4 10 10 -0.13107200000000000000e6 +752 1 3 18 -0.32768000000000000000e5 +752 1 4 19 0.65536000000000000000e5 +752 1 4 35 0.32768000000000000000e5 +752 1 12 32 0.65536000000000000000e5 +752 1 12 43 0.65536000000000000000e5 +752 1 14 45 0.65536000000000000000e5 +752 1 17 48 -0.32768000000000000000e5 +752 1 18 49 -0.32768000000000000000e5 +752 1 20 27 -0.13107200000000000000e6 +752 2 9 23 0.32768000000000000000e5 +752 2 10 24 0.65536000000000000000e5 +752 2 14 28 -0.32768000000000000000e5 +752 3 3 16 -0.32768000000000000000e5 +752 3 4 17 -0.32768000000000000000e5 +752 3 5 34 0.32768000000000000000e5 +752 3 13 42 -0.32768000000000000000e5 +752 3 14 27 0.65536000000000000000e5 +752 3 14 43 -0.32768000000000000000e5 +752 4 2 14 -0.32768000000000000000e5 +753 1 3 18 0.32768000000000000000e5 +753 1 4 19 -0.65536000000000000000e5 +753 1 12 33 0.65536000000000000000e5 +753 1 12 43 -0.32768000000000000000e5 +753 3 3 16 0.32768000000000000000e5 +753 3 4 17 0.32768000000000000000e5 +753 3 14 27 -0.32768000000000000000e5 +753 4 2 14 0.32768000000000000000e5 +754 1 12 34 0.65536000000000000000e5 +754 1 16 31 -0.65536000000000000000e5 +755 1 12 35 0.65536000000000000000e5 +755 1 20 27 -0.65536000000000000000e5 +756 1 2 17 -0.16384000000000000000e5 +756 1 3 18 -0.16384000000000000000e5 +756 1 3 34 -0.81920000000000000000e4 +756 1 4 19 -0.16384000000000000000e5 +756 1 5 20 -0.16384000000000000000e5 +756 1 5 36 0.16384000000000000000e5 +756 1 10 17 -0.16384000000000000000e5 +756 1 12 36 0.65536000000000000000e5 +756 1 12 43 0.81920000000000000000e4 +756 1 16 23 0.81920000000000000000e4 +756 1 16 31 -0.32768000000000000000e5 +756 1 17 32 -0.32768000000000000000e5 +756 2 6 12 -0.81920000000000000000e4 +756 2 10 24 -0.16384000000000000000e5 +756 2 11 13 -0.32768000000000000000e5 +756 3 3 16 -0.24576000000000000000e5 +756 3 4 17 -0.81920000000000000000e4 +756 3 7 12 -0.81920000000000000000e4 +756 3 7 20 -0.32768000000000000000e5 +756 3 8 21 -0.65536000000000000000e5 +756 3 12 21 0.13107200000000000000e6 +756 3 14 19 -0.65536000000000000000e5 +756 3 14 27 0.81920000000000000000e4 +756 4 1 13 -0.81920000000000000000e4 +756 4 2 14 -0.81920000000000000000e4 +756 4 3 15 -0.16384000000000000000e5 +756 4 10 10 -0.32768000000000000000e5 +756 4 13 13 -0.13107200000000000000e6 +757 1 2 33 -0.65536000000000000000e5 +757 1 3 34 0.13107200000000000000e6 +757 1 10 41 -0.65536000000000000000e5 +757 1 11 42 0.65536000000000000000e5 +757 1 12 37 0.65536000000000000000e5 +757 1 12 43 0.13107200000000000000e6 +757 1 16 23 -0.13107200000000000000e6 +757 1 28 43 -0.65536000000000000000e5 +757 1 32 47 -0.65536000000000000000e5 +757 1 33 48 -0.65536000000000000000e5 +757 2 1 31 0.65536000000000000000e5 +757 2 7 21 -0.65536000000000000000e5 +757 2 12 26 -0.65536000000000000000e5 +757 3 1 34 0.13107200000000000000e6 +757 3 2 31 -0.65536000000000000000e5 +757 3 3 32 -0.65536000000000000000e5 +757 3 13 42 -0.13107200000000000000e6 +757 3 28 41 -0.65536000000000000000e5 +757 3 29 42 -0.65536000000000000000e5 +757 4 3 31 0.65536000000000000000e5 +758 1 2 33 0.65536000000000000000e5 +758 1 3 34 -0.13107200000000000000e6 +758 1 10 41 0.65536000000000000000e5 +758 1 12 38 0.65536000000000000000e5 +758 2 7 21 0.65536000000000000000e5 +758 3 2 31 0.65536000000000000000e5 +758 3 3 32 0.65536000000000000000e5 +759 1 11 42 -0.65536000000000000000e5 +759 1 12 39 0.65536000000000000000e5 +759 1 12 43 -0.13107200000000000000e6 +759 1 28 43 0.65536000000000000000e5 +759 1 32 47 0.65536000000000000000e5 +759 1 33 48 0.65536000000000000000e5 +759 2 12 26 0.65536000000000000000e5 +759 3 13 42 0.13107200000000000000e6 +759 3 28 41 0.65536000000000000000e5 +759 3 29 42 0.65536000000000000000e5 +759 4 3 31 -0.65536000000000000000e5 +760 1 10 41 -0.65536000000000000000e5 +760 1 12 40 0.65536000000000000000e5 +761 1 12 41 0.65536000000000000000e5 +761 1 16 23 -0.65536000000000000000e5 +761 3 1 34 0.65536000000000000000e5 +762 1 12 42 0.65536000000000000000e5 +762 1 16 47 -0.65536000000000000000e5 +762 3 12 41 -0.65536000000000000000e5 +763 1 12 44 0.65536000000000000000e5 +763 1 27 34 -0.65536000000000000000e5 +764 1 12 45 0.65536000000000000000e5 +764 1 13 44 -0.65536000000000000000e5 +765 1 12 46 0.65536000000000000000e5 +765 1 20 27 -0.65536000000000000000e5 +765 3 7 36 0.65536000000000000000e5 +766 1 2 33 0.65536000000000000000e5 +766 1 3 34 -0.13107200000000000000e6 +766 1 9 40 -0.32768000000000000000e5 +766 1 10 41 0.13107200000000000000e6 +766 1 12 47 0.65536000000000000000e5 +766 1 26 41 0.32768000000000000000e5 +766 1 32 47 -0.65536000000000000000e5 +766 2 7 21 0.65536000000000000000e5 +766 3 2 31 0.65536000000000000000e5 +766 3 3 32 0.65536000000000000000e5 +766 3 8 37 0.32768000000000000000e5 +766 3 9 38 -0.32768000000000000000e5 +766 3 22 27 0.32768000000000000000e5 +766 3 28 41 -0.65536000000000000000e5 +766 4 1 29 0.32768000000000000000e5 +766 4 2 30 -0.32768000000000000000e5 +767 1 12 43 -0.13107200000000000000e6 +767 1 12 48 0.65536000000000000000e5 +767 1 28 43 0.65536000000000000000e5 +767 1 32 47 0.65536000000000000000e5 +767 2 20 34 0.65536000000000000000e5 +767 3 22 35 0.13107200000000000000e6 +767 3 28 41 0.65536000000000000000e5 +767 4 6 34 0.65536000000000000000e5 +768 1 12 49 0.65536000000000000000e5 +768 1 32 47 -0.65536000000000000000e5 +768 3 28 41 -0.65536000000000000000e5 +769 1 12 50 0.65536000000000000000e5 +769 1 16 47 -0.65536000000000000000e5 +770 1 12 43 -0.65536000000000000000e5 +770 1 12 51 0.65536000000000000000e5 +770 3 22 35 0.65536000000000000000e5 +771 1 12 52 0.65536000000000000000e5 +771 1 34 41 -0.65536000000000000000e5 +772 1 6 53 -0.16384000000000000000e5 +772 1 12 43 -0.13107200000000000000e6 +772 1 12 53 0.65536000000000000000e5 +772 1 25 40 0.16384000000000000000e5 +772 1 28 43 0.65536000000000000000e5 +772 1 32 47 0.65536000000000000000e5 +772 2 4 34 -0.32768000000000000000e5 +772 2 20 34 0.65536000000000000000e5 +772 2 21 35 0.32768000000000000000e5 +772 3 5 50 -0.32768000000000000000e5 +772 3 7 52 0.13107200000000000000e6 +772 3 22 35 0.13107200000000000000e6 +772 3 24 37 -0.16384000000000000000e5 +772 3 27 40 -0.65536000000000000000e5 +772 4 4 32 0.16384000000000000000e5 +772 4 7 35 0.32768000000000000000e5 +772 4 16 28 -0.16384000000000000000e5 +773 1 12 54 0.65536000000000000000e5 +773 1 32 47 -0.65536000000000000000e5 +774 1 12 43 -0.65536000000000000000e5 +774 1 12 55 0.65536000000000000000e5 +774 3 7 52 0.65536000000000000000e5 +774 3 22 35 0.65536000000000000000e5 +775 1 12 56 0.65536000000000000000e5 +775 1 37 52 -0.65536000000000000000e5 +776 1 2 17 -0.16384000000000000000e5 +776 1 3 18 -0.16384000000000000000e5 +776 1 3 34 -0.16384000000000000000e5 +776 1 13 13 0.65536000000000000000e5 +776 2 6 12 -0.16384000000000000000e5 +776 3 3 16 -0.16384000000000000000e5 +777 1 4 19 -0.65536000000000000000e5 +777 1 13 14 0.65536000000000000000e5 +778 1 10 17 -0.65536000000000000000e5 +778 1 13 15 0.65536000000000000000e5 +779 1 2 17 -0.32768000000000000000e5 +779 1 3 18 -0.16384000000000000000e5 +779 1 3 34 -0.16384000000000000000e5 +779 1 4 19 -0.32768000000000000000e5 +779 1 4 35 -0.16384000000000000000e5 +779 1 12 43 -0.16384000000000000000e5 +779 1 13 16 0.65536000000000000000e5 +779 1 14 45 -0.32768000000000000000e5 +779 1 16 23 0.16384000000000000000e5 +779 1 16 31 -0.65536000000000000000e5 +779 1 17 48 0.16384000000000000000e5 +779 1 18 49 0.16384000000000000000e5 +779 1 20 27 0.65536000000000000000e5 +779 2 6 12 -0.16384000000000000000e5 +779 2 9 23 -0.16384000000000000000e5 +779 2 10 24 -0.32768000000000000000e5 +779 2 14 28 0.16384000000000000000e5 +779 3 3 16 -0.32768000000000000000e5 +779 3 5 34 -0.16384000000000000000e5 +779 3 7 12 -0.16384000000000000000e5 +779 3 13 42 0.16384000000000000000e5 +779 3 14 27 -0.16384000000000000000e5 +779 3 14 43 0.16384000000000000000e5 +779 4 1 13 -0.16384000000000000000e5 +779 4 10 10 -0.65536000000000000000e5 +780 1 13 17 0.65536000000000000000e5 +780 1 20 27 -0.65536000000000000000e5 +780 3 7 20 -0.65536000000000000000e5 +781 1 3 18 -0.16384000000000000000e5 +781 1 4 35 0.16384000000000000000e5 +781 1 5 20 -0.32768000000000000000e5 +781 1 5 36 0.32768000000000000000e5 +781 1 10 17 -0.32768000000000000000e5 +781 1 12 43 0.32768000000000000000e5 +781 1 13 18 0.65536000000000000000e5 +781 1 14 45 0.32768000000000000000e5 +781 1 17 32 -0.65536000000000000000e5 +781 1 17 48 -0.16384000000000000000e5 +781 1 18 49 -0.16384000000000000000e5 +781 2 9 23 0.16384000000000000000e5 +781 2 14 28 -0.16384000000000000000e5 +781 3 3 16 -0.16384000000000000000e5 +781 3 4 17 -0.16384000000000000000e5 +781 3 5 34 0.16384000000000000000e5 +781 3 13 42 -0.16384000000000000000e5 +781 3 14 27 0.32768000000000000000e5 +781 3 14 43 -0.16384000000000000000e5 +781 4 2 14 -0.16384000000000000000e5 +781 4 3 15 -0.32768000000000000000e5 +782 1 2 17 -0.16384000000000000000e5 +782 1 3 18 -0.16384000000000000000e5 +782 1 3 34 -0.81920000000000000000e4 +782 1 4 19 -0.16384000000000000000e5 +782 1 5 20 -0.16384000000000000000e5 +782 1 5 36 0.16384000000000000000e5 +782 1 10 17 -0.16384000000000000000e5 +782 1 12 43 0.81920000000000000000e4 +782 1 13 19 0.65536000000000000000e5 +782 1 16 23 0.81920000000000000000e4 +782 1 16 31 -0.32768000000000000000e5 +782 1 17 32 -0.32768000000000000000e5 +782 2 6 12 -0.81920000000000000000e4 +782 2 10 24 -0.16384000000000000000e5 +782 2 11 13 -0.32768000000000000000e5 +782 3 3 16 -0.24576000000000000000e5 +782 3 4 17 -0.81920000000000000000e4 +782 3 7 12 -0.81920000000000000000e4 +782 3 7 20 -0.32768000000000000000e5 +782 3 14 27 0.81920000000000000000e4 +782 4 1 13 -0.81920000000000000000e4 +782 4 2 14 -0.81920000000000000000e4 +782 4 3 15 -0.16384000000000000000e5 +782 4 10 10 -0.32768000000000000000e5 +783 1 13 21 0.65536000000000000000e5 +783 1 19 34 -0.65536000000000000000e5 +783 3 12 21 -0.65536000000000000000e5 +784 1 1 32 -0.65536000000000000000e5 +784 1 13 22 0.65536000000000000000e5 +785 1 2 33 0.65536000000000000000e5 +785 1 3 34 -0.13107200000000000000e6 +785 1 10 41 0.65536000000000000000e5 +785 1 13 23 0.65536000000000000000e5 +785 2 7 21 0.65536000000000000000e5 +785 3 3 32 0.65536000000000000000e5 +786 1 2 33 -0.65536000000000000000e5 +786 1 13 24 0.65536000000000000000e5 +787 1 10 41 -0.65536000000000000000e5 +787 1 13 25 0.65536000000000000000e5 +787 3 3 32 -0.65536000000000000000e5 +788 1 2 33 0.65536000000000000000e5 +788 1 10 41 0.65536000000000000000e5 +788 1 12 43 -0.13107200000000000000e6 +788 1 13 26 0.65536000000000000000e5 +788 2 12 26 0.65536000000000000000e5 +788 3 3 32 0.65536000000000000000e5 +788 3 14 27 -0.13107200000000000000e6 +788 4 8 20 0.65536000000000000000e5 +789 1 13 27 0.65536000000000000000e5 +789 1 16 23 -0.65536000000000000000e5 +790 1 3 34 -0.65536000000000000000e5 +790 1 13 28 0.65536000000000000000e5 +791 1 12 43 -0.65536000000000000000e5 +791 1 13 29 0.65536000000000000000e5 +791 3 14 27 -0.65536000000000000000e5 +792 1 4 35 -0.65536000000000000000e5 +792 1 13 30 0.65536000000000000000e5 +793 1 3 18 -0.32768000000000000000e5 +793 1 4 19 0.65536000000000000000e5 +793 1 4 35 0.32768000000000000000e5 +793 1 12 43 0.65536000000000000000e5 +793 1 13 31 0.65536000000000000000e5 +793 1 14 45 0.65536000000000000000e5 +793 1 17 48 -0.32768000000000000000e5 +793 1 18 49 -0.32768000000000000000e5 +793 1 20 27 -0.13107200000000000000e6 +793 2 9 23 0.32768000000000000000e5 +793 2 10 24 0.65536000000000000000e5 +793 2 14 28 -0.32768000000000000000e5 +793 3 3 16 -0.32768000000000000000e5 +793 3 4 17 -0.32768000000000000000e5 +793 3 5 34 0.32768000000000000000e5 +793 3 13 42 -0.32768000000000000000e5 +793 3 14 27 0.65536000000000000000e5 +793 3 14 43 -0.32768000000000000000e5 +793 4 2 14 -0.32768000000000000000e5 +794 1 3 18 0.32768000000000000000e5 +794 1 4 19 -0.65536000000000000000e5 +794 1 12 43 -0.32768000000000000000e5 +794 1 13 32 0.65536000000000000000e5 +794 3 3 16 0.32768000000000000000e5 +794 3 4 17 0.32768000000000000000e5 +794 3 14 27 -0.32768000000000000000e5 +794 4 2 14 0.32768000000000000000e5 +795 1 4 35 -0.32768000000000000000e5 +795 1 12 43 -0.32768000000000000000e5 +795 1 13 33 0.65536000000000000000e5 +795 1 14 45 -0.65536000000000000000e5 +795 1 17 48 0.32768000000000000000e5 +795 1 18 49 0.32768000000000000000e5 +795 2 9 23 -0.32768000000000000000e5 +795 2 14 28 0.32768000000000000000e5 +795 3 5 34 -0.32768000000000000000e5 +795 3 13 42 0.32768000000000000000e5 +795 3 14 27 -0.32768000000000000000e5 +795 3 14 43 0.32768000000000000000e5 +796 1 13 34 0.65536000000000000000e5 +796 1 20 27 -0.65536000000000000000e5 +797 1 13 35 0.65536000000000000000e5 +797 1 17 32 -0.65536000000000000000e5 +798 1 13 20 -0.65536000000000000000e5 +798 1 13 36 0.65536000000000000000e5 +798 3 8 21 0.65536000000000000000e5 +799 1 2 33 0.65536000000000000000e5 +799 1 3 34 -0.13107200000000000000e6 +799 1 10 41 0.65536000000000000000e5 +799 1 13 37 0.65536000000000000000e5 +799 2 7 21 0.65536000000000000000e5 +799 3 2 31 0.65536000000000000000e5 +799 3 3 32 0.65536000000000000000e5 +800 1 11 42 -0.65536000000000000000e5 +800 1 12 43 -0.13107200000000000000e6 +800 1 13 38 0.65536000000000000000e5 +800 1 28 43 0.65536000000000000000e5 +800 1 32 47 0.65536000000000000000e5 +800 1 33 48 0.65536000000000000000e5 +800 2 12 26 0.65536000000000000000e5 +800 3 13 42 0.13107200000000000000e6 +800 3 28 41 0.65536000000000000000e5 +800 3 29 42 0.65536000000000000000e5 +800 4 3 31 -0.65536000000000000000e5 +801 1 10 41 -0.65536000000000000000e5 +801 1 13 39 0.65536000000000000000e5 +802 1 10 41 0.65536000000000000000e5 +802 1 11 42 0.65536000000000000000e5 +802 1 13 40 0.65536000000000000000e5 +802 1 28 43 -0.65536000000000000000e5 +802 1 32 47 -0.65536000000000000000e5 +802 1 33 48 -0.65536000000000000000e5 +802 3 13 42 -0.13107200000000000000e6 +802 3 28 41 -0.65536000000000000000e5 +802 3 29 42 -0.65536000000000000000e5 +802 4 3 31 0.65536000000000000000e5 +803 1 13 41 0.65536000000000000000e5 +803 1 16 47 -0.65536000000000000000e5 +803 3 12 41 -0.65536000000000000000e5 +804 1 12 43 -0.65536000000000000000e5 +804 1 13 42 0.65536000000000000000e5 +805 1 13 43 0.65536000000000000000e5 +805 1 17 48 -0.65536000000000000000e5 +805 3 13 42 -0.65536000000000000000e5 +806 1 4 35 -0.32768000000000000000e5 +806 1 12 43 -0.32768000000000000000e5 +806 1 13 45 0.65536000000000000000e5 +806 1 14 45 -0.65536000000000000000e5 +806 1 17 48 0.32768000000000000000e5 +806 1 18 49 0.32768000000000000000e5 +806 2 9 23 -0.32768000000000000000e5 +806 2 14 28 0.32768000000000000000e5 +806 3 5 34 -0.32768000000000000000e5 +806 3 13 42 0.32768000000000000000e5 +806 3 14 27 -0.32768000000000000000e5 +806 3 14 43 0.32768000000000000000e5 +806 3 16 29 0.65536000000000000000e5 +807 1 3 18 -0.16384000000000000000e5 +807 1 4 19 0.32768000000000000000e5 +807 1 5 36 0.32768000000000000000e5 +807 1 12 43 0.16384000000000000000e5 +807 1 13 44 -0.32768000000000000000e5 +807 1 13 46 0.65536000000000000000e5 +807 1 14 45 -0.32768000000000000000e5 +807 1 17 32 -0.65536000000000000000e5 +807 3 3 16 -0.16384000000000000000e5 +807 3 4 17 -0.16384000000000000000e5 +807 3 14 27 0.16384000000000000000e5 +807 3 16 29 0.32768000000000000000e5 +807 4 2 14 -0.16384000000000000000e5 +807 4 11 23 0.32768000000000000000e5 +808 1 12 43 -0.13107200000000000000e6 +808 1 13 47 0.65536000000000000000e5 +808 1 28 43 0.65536000000000000000e5 +808 1 32 47 0.65536000000000000000e5 +808 2 20 34 0.65536000000000000000e5 +808 3 22 35 0.13107200000000000000e6 +808 3 28 41 0.65536000000000000000e5 +808 4 6 34 0.65536000000000000000e5 +809 1 13 48 0.65536000000000000000e5 +809 1 32 47 -0.65536000000000000000e5 +809 3 28 41 -0.65536000000000000000e5 +810 1 13 49 0.65536000000000000000e5 +810 1 28 43 -0.65536000000000000000e5 +811 1 12 43 -0.65536000000000000000e5 +811 1 13 50 0.65536000000000000000e5 +811 3 22 35 0.65536000000000000000e5 +812 1 13 51 0.65536000000000000000e5 +812 1 17 48 -0.65536000000000000000e5 +813 1 4 35 -0.32768000000000000000e5 +813 1 12 43 -0.32768000000000000000e5 +813 1 13 52 0.65536000000000000000e5 +813 1 34 49 -0.32768000000000000000e5 +813 2 9 23 -0.32768000000000000000e5 +813 3 5 34 -0.32768000000000000000e5 +813 3 13 42 0.32768000000000000000e5 +813 3 14 27 -0.32768000000000000000e5 +813 3 16 29 0.65536000000000000000e5 +813 3 18 47 -0.32768000000000000000e5 +813 3 22 35 0.32768000000000000000e5 +813 4 14 26 0.32768000000000000000e5 +814 1 13 53 0.65536000000000000000e5 +814 1 32 47 -0.65536000000000000000e5 +815 1 6 53 0.16384000000000000000e5 +815 1 13 54 0.65536000000000000000e5 +815 1 25 40 -0.16384000000000000000e5 +815 1 28 43 -0.65536000000000000000e5 +815 2 4 34 0.32768000000000000000e5 +815 2 21 35 -0.32768000000000000000e5 +815 3 5 50 0.32768000000000000000e5 +815 3 24 37 0.16384000000000000000e5 +815 3 27 40 0.65536000000000000000e5 +815 4 4 32 -0.16384000000000000000e5 +815 4 7 35 -0.32768000000000000000e5 +815 4 16 28 0.16384000000000000000e5 +816 1 6 53 0.81920000000000000000e4 +816 1 13 55 0.65536000000000000000e5 +816 1 17 48 -0.65536000000000000000e5 +816 1 25 40 -0.81920000000000000000e4 +816 2 4 34 0.16384000000000000000e5 +816 2 21 35 -0.16384000000000000000e5 +816 3 5 50 0.16384000000000000000e5 +816 3 24 37 0.81920000000000000000e4 +816 3 27 40 0.32768000000000000000e5 +816 3 28 41 0.32768000000000000000e5 +816 3 29 42 0.32768000000000000000e5 +816 4 4 32 -0.81920000000000000000e4 +816 4 7 35 -0.16384000000000000000e5 +816 4 16 28 0.81920000000000000000e4 +816 4 23 27 0.32768000000000000000e5 +817 1 6 53 0.16384000000000000000e5 +817 1 13 56 0.65536000000000000000e5 +817 1 25 40 -0.16384000000000000000e5 +817 1 28 43 -0.65536000000000000000e5 +817 2 4 34 0.32768000000000000000e5 +817 2 21 35 -0.32768000000000000000e5 +817 3 5 50 0.32768000000000000000e5 +817 3 23 52 0.65536000000000000000e5 +817 3 24 37 0.16384000000000000000e5 +817 3 27 40 0.65536000000000000000e5 +817 4 4 32 -0.16384000000000000000e5 +817 4 7 35 -0.32768000000000000000e5 +817 4 16 28 0.16384000000000000000e5 +818 1 10 17 -0.32768000000000000000e5 +818 1 14 14 0.65536000000000000000e5 +819 1 5 20 -0.65536000000000000000e5 +819 1 14 15 0.65536000000000000000e5 +820 1 14 16 0.65536000000000000000e5 +820 1 20 27 -0.65536000000000000000e5 +820 3 7 20 -0.65536000000000000000e5 +821 1 3 18 -0.16384000000000000000e5 +821 1 4 35 0.16384000000000000000e5 +821 1 5 20 -0.32768000000000000000e5 +821 1 5 36 0.32768000000000000000e5 +821 1 10 17 -0.32768000000000000000e5 +821 1 12 43 0.32768000000000000000e5 +821 1 14 17 0.65536000000000000000e5 +821 1 14 45 0.32768000000000000000e5 +821 1 17 32 -0.65536000000000000000e5 +821 1 17 48 -0.16384000000000000000e5 +821 1 18 49 -0.16384000000000000000e5 +821 2 9 23 0.16384000000000000000e5 +821 2 14 28 -0.16384000000000000000e5 +821 3 3 16 -0.16384000000000000000e5 +821 3 4 17 -0.16384000000000000000e5 +821 3 5 34 0.16384000000000000000e5 +821 3 13 42 -0.16384000000000000000e5 +821 3 14 27 0.32768000000000000000e5 +821 3 14 43 -0.16384000000000000000e5 +821 4 2 14 -0.16384000000000000000e5 +821 4 3 15 -0.32768000000000000000e5 +822 1 3 18 0.16384000000000000000e5 +822 1 4 35 -0.16384000000000000000e5 +822 1 5 20 0.32768000000000000000e5 +822 1 5 36 -0.32768000000000000000e5 +822 1 10 17 0.32768000000000000000e5 +822 1 12 43 -0.32768000000000000000e5 +822 1 13 20 -0.13107200000000000000e6 +822 1 14 18 0.65536000000000000000e5 +822 1 14 45 -0.32768000000000000000e5 +822 1 17 32 0.65536000000000000000e5 +822 1 17 48 0.16384000000000000000e5 +822 1 18 49 0.16384000000000000000e5 +822 1 20 27 0.65536000000000000000e5 +822 2 9 23 -0.16384000000000000000e5 +822 2 11 25 0.65536000000000000000e5 +822 2 14 28 0.16384000000000000000e5 +822 3 3 16 0.16384000000000000000e5 +822 3 4 17 0.16384000000000000000e5 +822 3 5 34 -0.16384000000000000000e5 +822 3 7 20 0.65536000000000000000e5 +822 3 13 42 0.16384000000000000000e5 +822 3 14 27 -0.32768000000000000000e5 +822 3 14 43 0.16384000000000000000e5 +822 4 2 14 0.16384000000000000000e5 +822 4 3 15 0.32768000000000000000e5 +822 4 10 14 0.65536000000000000000e5 +823 1 13 20 -0.65536000000000000000e5 +823 1 14 19 0.65536000000000000000e5 +824 1 6 21 -0.32768000000000000000e5 +824 1 13 20 -0.65536000000000000000e5 +824 1 14 20 0.65536000000000000000e5 +824 1 20 27 0.32768000000000000000e5 +824 2 9 15 -0.32768000000000000000e5 +824 2 11 25 0.32768000000000000000e5 +824 3 7 20 0.32768000000000000000e5 +824 4 10 14 0.32768000000000000000e5 +825 1 2 33 0.65536000000000000000e5 +825 1 3 34 -0.13107200000000000000e6 +825 1 10 41 0.65536000000000000000e5 +825 1 14 22 0.65536000000000000000e5 +825 2 7 21 0.65536000000000000000e5 +825 3 3 32 0.65536000000000000000e5 +826 1 2 33 -0.65536000000000000000e5 +826 1 14 23 0.65536000000000000000e5 +827 1 10 41 -0.65536000000000000000e5 +827 1 14 24 0.65536000000000000000e5 +827 3 3 32 -0.65536000000000000000e5 +828 1 2 33 0.65536000000000000000e5 +828 1 10 41 0.65536000000000000000e5 +828 1 12 43 -0.13107200000000000000e6 +828 1 14 25 0.65536000000000000000e5 +828 2 12 26 0.65536000000000000000e5 +828 3 3 32 0.65536000000000000000e5 +828 3 14 27 -0.13107200000000000000e6 +828 4 8 20 0.65536000000000000000e5 +829 1 11 42 -0.65536000000000000000e5 +829 1 14 26 0.65536000000000000000e5 +829 3 4 33 -0.65536000000000000000e5 +830 1 3 34 -0.65536000000000000000e5 +830 1 14 27 0.65536000000000000000e5 +831 1 12 43 -0.65536000000000000000e5 +831 1 14 28 0.65536000000000000000e5 +831 3 14 27 -0.65536000000000000000e5 +832 1 4 35 -0.65536000000000000000e5 +832 1 14 29 0.65536000000000000000e5 +833 1 14 30 0.65536000000000000000e5 +833 1 14 45 -0.13107200000000000000e6 +833 1 17 48 0.65536000000000000000e5 +833 1 18 49 0.65536000000000000000e5 +833 2 14 28 0.65536000000000000000e5 +833 3 5 34 -0.65536000000000000000e5 +833 3 13 42 0.65536000000000000000e5 +833 3 14 43 0.65536000000000000000e5 +834 1 3 18 0.32768000000000000000e5 +834 1 4 19 -0.65536000000000000000e5 +834 1 12 43 -0.32768000000000000000e5 +834 1 14 31 0.65536000000000000000e5 +834 3 3 16 0.32768000000000000000e5 +834 3 4 17 0.32768000000000000000e5 +834 3 14 27 -0.32768000000000000000e5 +834 4 2 14 0.32768000000000000000e5 +835 1 4 35 -0.32768000000000000000e5 +835 1 12 43 -0.32768000000000000000e5 +835 1 14 32 0.65536000000000000000e5 +835 1 14 45 -0.65536000000000000000e5 +835 1 17 48 0.32768000000000000000e5 +835 1 18 49 0.32768000000000000000e5 +835 2 9 23 -0.32768000000000000000e5 +835 2 14 28 0.32768000000000000000e5 +835 3 5 34 -0.32768000000000000000e5 +835 3 13 42 0.32768000000000000000e5 +835 3 14 27 -0.32768000000000000000e5 +835 3 14 43 0.32768000000000000000e5 +836 1 5 36 -0.65536000000000000000e5 +836 1 14 33 0.65536000000000000000e5 +837 1 14 34 0.65536000000000000000e5 +837 1 17 32 -0.65536000000000000000e5 +838 1 13 20 -0.13107200000000000000e6 +838 1 14 35 0.65536000000000000000e5 +838 1 17 32 0.65536000000000000000e5 +838 1 20 27 0.65536000000000000000e5 +838 2 11 25 0.65536000000000000000e5 +838 3 8 21 0.13107200000000000000e6 +839 1 6 21 -0.32768000000000000000e5 +839 1 13 20 -0.65536000000000000000e5 +839 1 14 36 0.65536000000000000000e5 +839 1 20 27 0.32768000000000000000e5 +839 2 9 15 -0.32768000000000000000e5 +839 2 11 25 0.32768000000000000000e5 +839 3 7 20 0.32768000000000000000e5 +839 3 14 19 0.65536000000000000000e5 +839 4 10 14 0.32768000000000000000e5 +840 1 11 42 -0.65536000000000000000e5 +840 1 12 43 -0.13107200000000000000e6 +840 1 14 37 0.65536000000000000000e5 +840 1 28 43 0.65536000000000000000e5 +840 1 32 47 0.65536000000000000000e5 +840 1 33 48 0.65536000000000000000e5 +840 2 12 26 0.65536000000000000000e5 +840 3 13 42 0.13107200000000000000e6 +840 3 28 41 0.65536000000000000000e5 +840 3 29 42 0.65536000000000000000e5 +840 4 3 31 -0.65536000000000000000e5 +841 1 10 41 -0.65536000000000000000e5 +841 1 14 38 0.65536000000000000000e5 +842 1 10 41 0.65536000000000000000e5 +842 1 11 42 0.65536000000000000000e5 +842 1 14 39 0.65536000000000000000e5 +842 1 28 43 -0.65536000000000000000e5 +842 1 32 47 -0.65536000000000000000e5 +842 1 33 48 -0.65536000000000000000e5 +842 3 13 42 -0.13107200000000000000e6 +842 3 28 41 -0.65536000000000000000e5 +842 3 29 42 -0.65536000000000000000e5 +842 4 3 31 0.65536000000000000000e5 +843 1 11 42 -0.65536000000000000000e5 +843 1 14 40 0.65536000000000000000e5 +844 1 12 43 -0.65536000000000000000e5 +844 1 14 41 0.65536000000000000000e5 +845 1 14 42 0.65536000000000000000e5 +845 1 17 48 -0.65536000000000000000e5 +845 3 13 42 -0.65536000000000000000e5 +846 1 14 43 0.65536000000000000000e5 +846 1 14 45 -0.13107200000000000000e6 +846 1 17 48 0.65536000000000000000e5 +846 1 18 49 0.65536000000000000000e5 +846 2 14 28 0.65536000000000000000e5 +846 3 13 42 0.65536000000000000000e5 +846 3 14 43 0.65536000000000000000e5 +847 1 4 35 -0.32768000000000000000e5 +847 1 12 43 -0.32768000000000000000e5 +847 1 14 44 0.65536000000000000000e5 +847 1 14 45 -0.65536000000000000000e5 +847 1 17 48 0.32768000000000000000e5 +847 1 18 49 0.32768000000000000000e5 +847 2 9 23 -0.32768000000000000000e5 +847 2 14 28 0.32768000000000000000e5 +847 3 5 34 -0.32768000000000000000e5 +847 3 13 42 0.32768000000000000000e5 +847 3 14 27 -0.32768000000000000000e5 +847 3 14 43 0.32768000000000000000e5 +847 3 16 29 0.65536000000000000000e5 +848 1 13 20 -0.13107200000000000000e6 +848 1 14 46 0.65536000000000000000e5 +848 1 17 32 0.65536000000000000000e5 +848 1 20 27 0.65536000000000000000e5 +848 2 11 25 0.65536000000000000000e5 +848 3 8 21 0.13107200000000000000e6 +848 3 18 31 0.65536000000000000000e5 +849 1 14 47 0.65536000000000000000e5 +849 1 32 47 -0.65536000000000000000e5 +849 3 28 41 -0.65536000000000000000e5 +850 1 14 48 0.65536000000000000000e5 +850 1 28 43 -0.65536000000000000000e5 +851 1 14 49 0.65536000000000000000e5 +851 1 33 48 -0.65536000000000000000e5 +851 3 29 42 -0.65536000000000000000e5 +852 1 14 50 0.65536000000000000000e5 +852 1 17 48 -0.65536000000000000000e5 +853 1 14 51 0.65536000000000000000e5 +853 1 34 49 -0.65536000000000000000e5 +853 3 18 47 -0.65536000000000000000e5 +854 1 14 45 -0.13107200000000000000e6 +854 1 14 52 0.65536000000000000000e5 +854 1 17 48 0.32768000000000000000e5 +854 1 18 49 0.32768000000000000000e5 +854 1 34 49 0.32768000000000000000e5 +854 2 14 28 0.32768000000000000000e5 +854 3 14 43 0.32768000000000000000e5 +854 3 15 44 -0.65536000000000000000e5 +854 3 16 45 0.13107200000000000000e6 +854 3 18 47 0.32768000000000000000e5 +854 3 22 35 -0.32768000000000000000e5 +854 4 14 26 -0.32768000000000000000e5 +854 4 15 27 -0.65536000000000000000e5 +855 1 6 53 0.16384000000000000000e5 +855 1 14 53 0.65536000000000000000e5 +855 1 25 40 -0.16384000000000000000e5 +855 1 28 43 -0.65536000000000000000e5 +855 2 4 34 0.32768000000000000000e5 +855 2 21 35 -0.32768000000000000000e5 +855 3 5 50 0.32768000000000000000e5 +855 3 24 37 0.16384000000000000000e5 +855 3 27 40 0.65536000000000000000e5 +855 4 4 32 -0.16384000000000000000e5 +855 4 7 35 -0.32768000000000000000e5 +855 4 16 28 0.16384000000000000000e5 +856 1 14 54 0.65536000000000000000e5 +856 1 33 48 -0.65536000000000000000e5 +857 1 14 55 0.65536000000000000000e5 +857 1 34 49 -0.65536000000000000000e5 +858 1 14 56 0.65536000000000000000e5 +858 1 33 48 -0.65536000000000000000e5 +858 3 10 55 -0.65536000000000000000e5 +858 3 35 48 0.13107200000000000000e6 +858 3 40 45 -0.65536000000000000000e5 +858 4 22 34 -0.65536000000000000000e5 +859 1 11 18 -0.32768000000000000000e5 +859 1 15 15 0.65536000000000000000e5 +860 1 3 18 -0.16384000000000000000e5 +860 1 4 35 0.16384000000000000000e5 +860 1 5 20 -0.32768000000000000000e5 +860 1 5 36 0.32768000000000000000e5 +860 1 10 17 -0.32768000000000000000e5 +860 1 12 43 0.32768000000000000000e5 +860 1 14 45 0.32768000000000000000e5 +860 1 15 16 0.65536000000000000000e5 +860 1 17 32 -0.65536000000000000000e5 +860 1 17 48 -0.16384000000000000000e5 +860 1 18 49 -0.16384000000000000000e5 +860 2 9 23 0.16384000000000000000e5 +860 2 14 28 -0.16384000000000000000e5 +860 3 3 16 -0.16384000000000000000e5 +860 3 4 17 -0.16384000000000000000e5 +860 3 5 34 0.16384000000000000000e5 +860 3 13 42 -0.16384000000000000000e5 +860 3 14 27 0.32768000000000000000e5 +860 3 14 43 -0.16384000000000000000e5 +860 4 2 14 -0.16384000000000000000e5 +860 4 3 15 -0.32768000000000000000e5 +861 1 3 18 0.16384000000000000000e5 +861 1 4 35 -0.16384000000000000000e5 +861 1 5 20 0.32768000000000000000e5 +861 1 5 36 -0.32768000000000000000e5 +861 1 10 17 0.32768000000000000000e5 +861 1 12 43 -0.32768000000000000000e5 +861 1 13 20 -0.13107200000000000000e6 +861 1 14 45 -0.32768000000000000000e5 +861 1 15 17 0.65536000000000000000e5 +861 1 17 32 0.65536000000000000000e5 +861 1 17 48 0.16384000000000000000e5 +861 1 18 49 0.16384000000000000000e5 +861 1 20 27 0.65536000000000000000e5 +861 2 9 23 -0.16384000000000000000e5 +861 2 11 25 0.65536000000000000000e5 +861 2 14 28 0.16384000000000000000e5 +861 3 3 16 0.16384000000000000000e5 +861 3 4 17 0.16384000000000000000e5 +861 3 5 34 -0.16384000000000000000e5 +861 3 7 20 0.65536000000000000000e5 +861 3 13 42 0.16384000000000000000e5 +861 3 14 27 -0.32768000000000000000e5 +861 3 14 43 0.16384000000000000000e5 +861 4 2 14 0.16384000000000000000e5 +861 4 3 15 0.32768000000000000000e5 +861 4 10 14 0.65536000000000000000e5 +862 1 6 21 -0.65536000000000000000e5 +862 1 15 18 0.65536000000000000000e5 +863 1 6 21 -0.32768000000000000000e5 +863 1 13 20 -0.65536000000000000000e5 +863 1 15 19 0.65536000000000000000e5 +863 1 20 27 0.32768000000000000000e5 +863 2 9 15 -0.32768000000000000000e5 +863 2 11 25 0.32768000000000000000e5 +863 3 7 20 0.32768000000000000000e5 +863 4 10 14 0.32768000000000000000e5 +864 1 3 18 -0.81920000000000000000e4 +864 1 4 19 0.16384000000000000000e5 +864 1 5 36 0.16384000000000000000e5 +864 1 12 43 0.81920000000000000000e4 +864 1 13 44 -0.16384000000000000000e5 +864 1 14 21 -0.13107200000000000000e6 +864 1 14 45 -0.16384000000000000000e5 +864 1 15 20 0.65536000000000000000e5 +864 1 21 44 0.13107200000000000000e6 +864 1 33 36 -0.65536000000000000000e5 +864 2 11 25 0.32768000000000000000e5 +864 2 15 29 -0.32768000000000000000e5 +864 3 3 16 -0.81920000000000000000e4 +864 3 4 17 -0.81920000000000000000e4 +864 3 7 36 0.32768000000000000000e5 +864 3 8 21 0.65536000000000000000e5 +864 3 14 19 0.65536000000000000000e5 +864 3 14 27 0.81920000000000000000e4 +864 3 16 29 0.16384000000000000000e5 +864 3 18 31 0.32768000000000000000e5 +864 3 19 32 0.65536000000000000000e5 +864 4 2 14 -0.81920000000000000000e4 +864 4 11 15 0.65536000000000000000e5 +864 4 11 23 0.16384000000000000000e5 +864 4 13 25 0.65536000000000000000e5 +865 1 15 21 0.65536000000000000000e5 +865 1 20 35 -0.65536000000000000000e5 +865 3 18 19 -0.65536000000000000000e5 +866 1 2 33 -0.65536000000000000000e5 +866 1 15 22 0.65536000000000000000e5 +867 1 10 41 -0.65536000000000000000e5 +867 1 15 23 0.65536000000000000000e5 +867 3 3 32 -0.65536000000000000000e5 +868 1 2 33 0.65536000000000000000e5 +868 1 10 41 0.65536000000000000000e5 +868 1 12 43 -0.13107200000000000000e6 +868 1 15 24 0.65536000000000000000e5 +868 2 12 26 0.65536000000000000000e5 +868 3 3 32 0.65536000000000000000e5 +868 3 14 27 -0.13107200000000000000e6 +868 4 8 20 0.65536000000000000000e5 +869 1 11 42 -0.65536000000000000000e5 +869 1 15 25 0.65536000000000000000e5 +869 3 4 33 -0.65536000000000000000e5 +870 1 2 33 -0.65536000000000000000e5 +870 1 11 42 0.65536000000000000000e5 +870 1 12 43 0.13107200000000000000e6 +870 1 15 26 0.65536000000000000000e5 +870 1 26 33 -0.65536000000000000000e5 +870 1 28 43 -0.65536000000000000000e5 +870 1 32 47 -0.65536000000000000000e5 +870 1 33 48 -0.65536000000000000000e5 +870 2 12 26 -0.65536000000000000000e5 +870 3 3 32 -0.65536000000000000000e5 +870 3 4 33 0.65536000000000000000e5 +870 3 5 34 -0.13107200000000000000e6 +870 3 13 42 -0.13107200000000000000e6 +870 3 14 27 0.13107200000000000000e6 +870 3 28 41 -0.65536000000000000000e5 +870 3 29 42 -0.65536000000000000000e5 +870 4 3 31 0.65536000000000000000e5 +870 4 8 20 -0.65536000000000000000e5 +870 4 9 21 0.65536000000000000000e5 +871 1 12 43 -0.65536000000000000000e5 +871 1 15 27 0.65536000000000000000e5 +871 3 14 27 -0.65536000000000000000e5 +872 1 4 35 -0.65536000000000000000e5 +872 1 15 28 0.65536000000000000000e5 +873 1 14 45 -0.13107200000000000000e6 +873 1 15 29 0.65536000000000000000e5 +873 1 17 48 0.65536000000000000000e5 +873 1 18 49 0.65536000000000000000e5 +873 2 14 28 0.65536000000000000000e5 +873 3 5 34 -0.65536000000000000000e5 +873 3 13 42 0.65536000000000000000e5 +873 3 14 43 0.65536000000000000000e5 +874 1 4 35 -0.32768000000000000000e5 +874 1 12 43 -0.32768000000000000000e5 +874 1 14 45 -0.65536000000000000000e5 +874 1 15 31 0.65536000000000000000e5 +874 1 17 48 0.32768000000000000000e5 +874 1 18 49 0.32768000000000000000e5 +874 2 9 23 -0.32768000000000000000e5 +874 2 14 28 0.32768000000000000000e5 +874 3 5 34 -0.32768000000000000000e5 +874 3 13 42 0.32768000000000000000e5 +874 3 14 27 -0.32768000000000000000e5 +874 3 14 43 0.32768000000000000000e5 +875 1 5 36 -0.65536000000000000000e5 +875 1 15 32 0.65536000000000000000e5 +876 1 11 18 -0.65536000000000000000e5 +876 1 15 33 0.65536000000000000000e5 +876 3 6 19 0.65536000000000000000e5 +877 1 13 20 -0.13107200000000000000e6 +877 1 15 34 0.65536000000000000000e5 +877 1 17 32 0.65536000000000000000e5 +877 1 20 27 0.65536000000000000000e5 +877 2 11 25 0.65536000000000000000e5 +877 3 8 21 0.13107200000000000000e6 +878 1 15 35 0.65536000000000000000e5 +878 1 18 33 -0.65536000000000000000e5 +879 1 3 18 -0.81920000000000000000e4 +879 1 4 19 0.16384000000000000000e5 +879 1 5 36 0.16384000000000000000e5 +879 1 12 43 0.81920000000000000000e4 +879 1 13 44 -0.16384000000000000000e5 +879 1 14 21 -0.13107200000000000000e6 +879 1 14 45 -0.16384000000000000000e5 +879 1 15 36 0.65536000000000000000e5 +879 1 21 44 0.13107200000000000000e6 +879 1 33 36 -0.65536000000000000000e5 +879 2 11 25 0.32768000000000000000e5 +879 2 15 29 -0.32768000000000000000e5 +879 3 3 16 -0.81920000000000000000e4 +879 3 4 17 -0.81920000000000000000e4 +879 3 7 36 0.32768000000000000000e5 +879 3 8 21 0.65536000000000000000e5 +879 3 14 27 0.81920000000000000000e4 +879 3 15 20 -0.65536000000000000000e5 +879 3 16 29 0.16384000000000000000e5 +879 3 18 19 0.13107200000000000000e6 +879 3 18 31 0.32768000000000000000e5 +879 3 19 32 0.65536000000000000000e5 +879 4 2 14 -0.81920000000000000000e4 +879 4 11 15 0.65536000000000000000e5 +879 4 11 23 0.16384000000000000000e5 +879 4 13 25 0.65536000000000000000e5 +879 4 14 14 -0.13107200000000000000e6 +880 1 10 41 -0.65536000000000000000e5 +880 1 15 37 0.65536000000000000000e5 +881 1 10 41 0.65536000000000000000e5 +881 1 11 42 0.65536000000000000000e5 +881 1 15 38 0.65536000000000000000e5 +881 1 28 43 -0.65536000000000000000e5 +881 1 32 47 -0.65536000000000000000e5 +881 1 33 48 -0.65536000000000000000e5 +881 3 13 42 -0.13107200000000000000e6 +881 3 28 41 -0.65536000000000000000e5 +881 3 29 42 -0.65536000000000000000e5 +881 4 3 31 0.65536000000000000000e5 +882 1 11 42 -0.65536000000000000000e5 +882 1 15 39 0.65536000000000000000e5 +883 1 15 40 0.65536000000000000000e5 +883 1 26 33 -0.65536000000000000000e5 +884 1 15 41 0.65536000000000000000e5 +884 1 17 48 -0.65536000000000000000e5 +884 3 13 42 -0.65536000000000000000e5 +885 1 14 45 -0.13107200000000000000e6 +885 1 15 42 0.65536000000000000000e5 +885 1 17 48 0.65536000000000000000e5 +885 1 18 49 0.65536000000000000000e5 +885 2 14 28 0.65536000000000000000e5 +885 3 13 42 0.65536000000000000000e5 +885 3 14 43 0.65536000000000000000e5 +886 1 15 43 0.65536000000000000000e5 +886 1 18 49 -0.65536000000000000000e5 +886 3 14 43 -0.65536000000000000000e5 +887 1 14 45 -0.65536000000000000000e5 +887 1 15 44 0.65536000000000000000e5 +888 1 11 18 -0.65536000000000000000e5 +888 1 15 45 0.65536000000000000000e5 +888 3 6 19 0.65536000000000000000e5 +888 3 17 30 0.65536000000000000000e5 +889 1 15 47 0.65536000000000000000e5 +889 1 28 43 -0.65536000000000000000e5 +890 1 15 48 0.65536000000000000000e5 +890 1 33 48 -0.65536000000000000000e5 +890 3 29 42 -0.65536000000000000000e5 +891 1 15 49 0.65536000000000000000e5 +891 1 33 40 -0.65536000000000000000e5 +892 1 15 50 0.65536000000000000000e5 +892 1 34 49 -0.65536000000000000000e5 +892 3 18 47 -0.65536000000000000000e5 +893 1 15 51 0.65536000000000000000e5 +893 1 18 49 -0.65536000000000000000e5 +894 1 11 18 -0.65536000000000000000e5 +894 1 15 52 0.65536000000000000000e5 +894 3 6 19 0.65536000000000000000e5 +894 3 15 44 0.65536000000000000000e5 +894 3 17 30 0.65536000000000000000e5 +895 1 15 53 0.65536000000000000000e5 +895 1 33 48 -0.65536000000000000000e5 +896 1 15 54 0.65536000000000000000e5 +896 1 33 40 -0.65536000000000000000e5 +896 3 14 51 0.13107200000000000000e6 +896 3 29 42 -0.65536000000000000000e5 +896 3 30 43 -0.65536000000000000000e5 +896 4 19 31 -0.65536000000000000000e5 +897 1 15 55 0.65536000000000000000e5 +897 1 18 49 -0.65536000000000000000e5 +897 3 14 51 0.65536000000000000000e5 +898 1 15 56 0.65536000000000000000e5 +898 1 33 40 -0.65536000000000000000e5 +898 3 10 55 0.65536000000000000000e5 +898 3 14 51 0.13107200000000000000e6 +898 3 29 42 -0.65536000000000000000e5 +898 3 30 43 -0.65536000000000000000e5 +898 4 19 31 -0.65536000000000000000e5 +899 1 12 19 -0.32768000000000000000e5 +899 1 16 16 0.65536000000000000000e5 +900 1 2 17 -0.16384000000000000000e5 +900 1 3 18 -0.16384000000000000000e5 +900 1 3 34 -0.81920000000000000000e4 +900 1 4 19 -0.16384000000000000000e5 +900 1 5 20 -0.16384000000000000000e5 +900 1 5 36 0.16384000000000000000e5 +900 1 10 17 -0.16384000000000000000e5 +900 1 12 43 0.81920000000000000000e4 +900 1 16 17 0.65536000000000000000e5 +900 1 16 23 0.81920000000000000000e4 +900 1 16 31 -0.32768000000000000000e5 +900 1 17 32 -0.32768000000000000000e5 +900 2 6 12 -0.81920000000000000000e4 +900 2 10 24 -0.16384000000000000000e5 +900 2 11 13 -0.32768000000000000000e5 +900 3 3 16 -0.24576000000000000000e5 +900 3 4 17 -0.81920000000000000000e4 +900 3 7 12 -0.81920000000000000000e4 +900 3 7 20 -0.32768000000000000000e5 +900 3 14 27 0.81920000000000000000e4 +900 4 1 13 -0.81920000000000000000e4 +900 4 2 14 -0.81920000000000000000e4 +900 4 3 15 -0.16384000000000000000e5 +900 4 10 10 -0.32768000000000000000e5 +901 1 13 20 -0.65536000000000000000e5 +901 1 16 18 0.65536000000000000000e5 +902 1 16 20 0.65536000000000000000e5 +902 1 19 34 -0.65536000000000000000e5 +902 3 12 21 -0.65536000000000000000e5 +903 1 14 21 -0.32768000000000000000e5 +903 1 16 19 -0.32768000000000000000e5 +903 1 16 21 0.65536000000000000000e5 +903 1 19 34 -0.32768000000000000000e5 +903 2 13 15 -0.32768000000000000000e5 +903 3 12 21 -0.32768000000000000000e5 +904 1 12 27 -0.65536000000000000000e5 +904 1 16 22 0.65536000000000000000e5 +905 1 3 34 -0.65536000000000000000e5 +905 1 16 24 0.65536000000000000000e5 +906 1 12 43 -0.65536000000000000000e5 +906 1 16 25 0.65536000000000000000e5 +906 3 14 27 -0.65536000000000000000e5 +907 1 4 35 -0.65536000000000000000e5 +907 1 16 26 0.65536000000000000000e5 +908 1 4 35 -0.32768000000000000000e5 +908 1 12 43 -0.32768000000000000000e5 +908 1 14 45 -0.65536000000000000000e5 +908 1 16 27 0.65536000000000000000e5 +908 1 16 31 -0.13107200000000000000e6 +908 1 17 48 0.32768000000000000000e5 +908 1 18 49 0.32768000000000000000e5 +908 1 20 27 0.13107200000000000000e6 +908 2 7 13 0.65536000000000000000e5 +908 2 9 23 -0.32768000000000000000e5 +908 2 10 24 -0.65536000000000000000e5 +908 2 14 28 0.32768000000000000000e5 +908 3 5 34 -0.32768000000000000000e5 +908 3 13 42 0.32768000000000000000e5 +908 3 14 27 -0.32768000000000000000e5 +908 3 14 43 0.32768000000000000000e5 +908 4 10 10 -0.13107200000000000000e6 +909 1 3 18 -0.32768000000000000000e5 +909 1 4 19 0.65536000000000000000e5 +909 1 4 35 0.32768000000000000000e5 +909 1 12 43 0.65536000000000000000e5 +909 1 14 45 0.65536000000000000000e5 +909 1 16 28 0.65536000000000000000e5 +909 1 17 48 -0.32768000000000000000e5 +909 1 18 49 -0.32768000000000000000e5 +909 1 20 27 -0.13107200000000000000e6 +909 2 9 23 0.32768000000000000000e5 +909 2 10 24 0.65536000000000000000e5 +909 2 14 28 -0.32768000000000000000e5 +909 3 3 16 -0.32768000000000000000e5 +909 3 4 17 -0.32768000000000000000e5 +909 3 5 34 0.32768000000000000000e5 +909 3 13 42 -0.32768000000000000000e5 +909 3 14 27 0.65536000000000000000e5 +909 3 14 43 -0.32768000000000000000e5 +909 4 2 14 -0.32768000000000000000e5 +910 1 3 18 0.32768000000000000000e5 +910 1 4 19 -0.65536000000000000000e5 +910 1 12 43 -0.32768000000000000000e5 +910 1 16 29 0.65536000000000000000e5 +910 3 3 16 0.32768000000000000000e5 +910 3 4 17 0.32768000000000000000e5 +910 3 14 27 -0.32768000000000000000e5 +910 4 2 14 0.32768000000000000000e5 +911 1 4 35 -0.32768000000000000000e5 +911 1 12 43 -0.32768000000000000000e5 +911 1 14 45 -0.65536000000000000000e5 +911 1 16 30 0.65536000000000000000e5 +911 1 17 48 0.32768000000000000000e5 +911 1 18 49 0.32768000000000000000e5 +911 2 9 23 -0.32768000000000000000e5 +911 2 14 28 0.32768000000000000000e5 +911 3 5 34 -0.32768000000000000000e5 +911 3 13 42 0.32768000000000000000e5 +911 3 14 27 -0.32768000000000000000e5 +911 3 14 43 0.32768000000000000000e5 +912 1 16 32 0.65536000000000000000e5 +912 1 20 27 -0.65536000000000000000e5 +913 1 16 33 0.65536000000000000000e5 +913 1 17 32 -0.65536000000000000000e5 +914 1 2 17 -0.16384000000000000000e5 +914 1 3 18 -0.16384000000000000000e5 +914 1 3 34 -0.81920000000000000000e4 +914 1 4 19 -0.16384000000000000000e5 +914 1 5 20 -0.16384000000000000000e5 +914 1 5 36 0.16384000000000000000e5 +914 1 10 17 -0.16384000000000000000e5 +914 1 12 43 0.81920000000000000000e4 +914 1 16 23 0.81920000000000000000e4 +914 1 16 31 -0.32768000000000000000e5 +914 1 16 34 0.65536000000000000000e5 +914 1 17 32 -0.32768000000000000000e5 +914 2 6 12 -0.81920000000000000000e4 +914 2 10 24 -0.16384000000000000000e5 +914 2 11 13 -0.32768000000000000000e5 +914 3 3 16 -0.24576000000000000000e5 +914 3 4 17 -0.81920000000000000000e4 +914 3 7 12 -0.81920000000000000000e4 +914 3 7 20 -0.32768000000000000000e5 +914 3 8 21 -0.65536000000000000000e5 +914 3 12 21 0.13107200000000000000e6 +914 3 14 19 -0.65536000000000000000e5 +914 3 14 27 0.81920000000000000000e4 +914 4 1 13 -0.81920000000000000000e4 +914 4 2 14 -0.81920000000000000000e4 +914 4 3 15 -0.16384000000000000000e5 +914 4 10 10 -0.32768000000000000000e5 +914 4 13 13 -0.13107200000000000000e6 +915 1 13 20 -0.65536000000000000000e5 +915 1 16 35 0.65536000000000000000e5 +915 3 8 21 0.65536000000000000000e5 +916 1 16 36 0.65536000000000000000e5 +916 1 19 34 -0.65536000000000000000e5 +917 1 16 23 -0.65536000000000000000e5 +917 1 16 37 0.65536000000000000000e5 +917 3 1 34 0.65536000000000000000e5 +918 1 16 38 0.65536000000000000000e5 +918 1 16 47 -0.65536000000000000000e5 +918 3 12 41 -0.65536000000000000000e5 +919 1 12 43 -0.65536000000000000000e5 +919 1 16 39 0.65536000000000000000e5 +920 1 16 40 0.65536000000000000000e5 +920 1 17 48 -0.65536000000000000000e5 +920 3 13 42 -0.65536000000000000000e5 +921 1 16 41 0.65536000000000000000e5 +921 1 27 34 -0.65536000000000000000e5 +922 1 13 44 -0.65536000000000000000e5 +922 1 16 42 0.65536000000000000000e5 +923 1 4 35 -0.32768000000000000000e5 +923 1 12 43 -0.32768000000000000000e5 +923 1 14 45 -0.65536000000000000000e5 +923 1 16 43 0.65536000000000000000e5 +923 1 17 48 0.32768000000000000000e5 +923 1 18 49 0.32768000000000000000e5 +923 2 9 23 -0.32768000000000000000e5 +923 2 14 28 0.32768000000000000000e5 +923 3 5 34 -0.32768000000000000000e5 +923 3 13 42 0.32768000000000000000e5 +923 3 14 27 -0.32768000000000000000e5 +923 3 14 43 0.32768000000000000000e5 +923 3 16 29 0.65536000000000000000e5 +924 1 16 44 0.65536000000000000000e5 +924 1 20 27 -0.65536000000000000000e5 +924 3 7 36 0.65536000000000000000e5 +925 1 3 18 -0.16384000000000000000e5 +925 1 4 19 0.32768000000000000000e5 +925 1 5 36 0.32768000000000000000e5 +925 1 12 43 0.16384000000000000000e5 +925 1 13 44 -0.32768000000000000000e5 +925 1 14 45 -0.32768000000000000000e5 +925 1 16 45 0.65536000000000000000e5 +925 1 17 32 -0.65536000000000000000e5 +925 3 3 16 -0.16384000000000000000e5 +925 3 4 17 -0.16384000000000000000e5 +925 3 14 27 0.16384000000000000000e5 +925 3 16 29 0.32768000000000000000e5 +925 4 2 14 -0.16384000000000000000e5 +925 4 11 23 0.32768000000000000000e5 +926 1 3 18 -0.81920000000000000000e4 +926 1 4 19 0.16384000000000000000e5 +926 1 5 36 0.16384000000000000000e5 +926 1 12 43 0.81920000000000000000e4 +926 1 13 20 -0.65536000000000000000e5 +926 1 13 44 -0.16384000000000000000e5 +926 1 14 45 -0.16384000000000000000e5 +926 1 16 46 0.65536000000000000000e5 +926 2 11 25 0.32768000000000000000e5 +926 2 15 29 -0.32768000000000000000e5 +926 3 3 16 -0.81920000000000000000e4 +926 3 4 17 -0.81920000000000000000e4 +926 3 7 36 0.32768000000000000000e5 +926 3 8 21 0.65536000000000000000e5 +926 3 14 27 0.81920000000000000000e4 +926 3 16 29 0.16384000000000000000e5 +926 3 18 31 0.32768000000000000000e5 +926 4 2 14 -0.81920000000000000000e4 +926 4 11 23 0.16384000000000000000e5 +927 1 12 43 -0.65536000000000000000e5 +927 1 16 48 0.65536000000000000000e5 +927 3 22 35 0.65536000000000000000e5 +928 1 16 49 0.65536000000000000000e5 +928 1 17 48 -0.65536000000000000000e5 +929 1 16 50 0.65536000000000000000e5 +929 1 34 41 -0.65536000000000000000e5 +930 1 4 35 -0.32768000000000000000e5 +930 1 12 43 -0.32768000000000000000e5 +930 1 16 51 0.65536000000000000000e5 +930 1 34 49 -0.32768000000000000000e5 +930 2 9 23 -0.32768000000000000000e5 +930 3 5 34 -0.32768000000000000000e5 +930 3 13 42 0.32768000000000000000e5 +930 3 14 27 -0.32768000000000000000e5 +930 3 16 29 0.65536000000000000000e5 +930 3 18 47 -0.32768000000000000000e5 +930 3 22 35 0.32768000000000000000e5 +930 4 14 26 0.32768000000000000000e5 +931 1 16 52 0.65536000000000000000e5 +931 1 19 50 -0.65536000000000000000e5 +932 1 12 43 -0.65536000000000000000e5 +932 1 16 53 0.65536000000000000000e5 +932 3 7 52 0.65536000000000000000e5 +932 3 22 35 0.65536000000000000000e5 +933 1 6 53 0.81920000000000000000e4 +933 1 16 54 0.65536000000000000000e5 +933 1 17 48 -0.65536000000000000000e5 +933 1 25 40 -0.81920000000000000000e4 +933 2 4 34 0.16384000000000000000e5 +933 2 21 35 -0.16384000000000000000e5 +933 3 5 50 0.16384000000000000000e5 +933 3 24 37 0.81920000000000000000e4 +933 3 27 40 0.32768000000000000000e5 +933 3 28 41 0.32768000000000000000e5 +933 3 29 42 0.32768000000000000000e5 +933 4 4 32 -0.81920000000000000000e4 +933 4 7 35 -0.16384000000000000000e5 +933 4 16 28 0.81920000000000000000e4 +933 4 23 27 0.32768000000000000000e5 +934 1 4 35 -0.32768000000000000000e5 +934 1 12 43 -0.32768000000000000000e5 +934 1 16 55 0.65536000000000000000e5 +934 1 34 49 -0.32768000000000000000e5 +934 2 9 23 -0.32768000000000000000e5 +934 3 5 34 -0.32768000000000000000e5 +934 3 13 42 0.32768000000000000000e5 +934 3 14 27 -0.32768000000000000000e5 +934 3 16 29 0.65536000000000000000e5 +934 3 18 47 -0.32768000000000000000e5 +934 3 22 35 0.32768000000000000000e5 +934 3 31 44 0.65536000000000000000e5 +934 4 14 26 0.32768000000000000000e5 +935 1 6 53 0.81920000000000000000e4 +935 1 16 56 0.65536000000000000000e5 +935 1 17 48 -0.65536000000000000000e5 +935 1 25 40 -0.81920000000000000000e4 +935 2 4 34 0.16384000000000000000e5 +935 2 21 35 -0.16384000000000000000e5 +935 3 5 50 0.16384000000000000000e5 +935 3 24 37 0.81920000000000000000e4 +935 3 27 40 0.32768000000000000000e5 +935 3 28 41 0.32768000000000000000e5 +935 3 29 42 0.32768000000000000000e5 +935 3 34 47 0.65536000000000000000e5 +935 4 4 32 -0.81920000000000000000e4 +935 4 7 35 -0.16384000000000000000e5 +935 4 16 28 0.81920000000000000000e4 +935 4 23 27 0.32768000000000000000e5 +936 1 13 20 -0.32768000000000000000e5 +936 1 17 17 0.65536000000000000000e5 +937 1 6 21 -0.32768000000000000000e5 +937 1 13 20 -0.65536000000000000000e5 +937 1 17 18 0.65536000000000000000e5 +937 1 20 27 0.32768000000000000000e5 +937 2 9 15 -0.32768000000000000000e5 +937 2 11 25 0.32768000000000000000e5 +937 3 7 20 0.32768000000000000000e5 +937 4 10 14 0.32768000000000000000e5 +938 1 17 19 0.65536000000000000000e5 +938 1 19 34 -0.65536000000000000000e5 +938 3 12 21 -0.65536000000000000000e5 +939 1 14 21 -0.65536000000000000000e5 +939 1 17 20 0.65536000000000000000e5 +940 1 14 21 -0.32768000000000000000e5 +940 1 17 21 0.65536000000000000000e5 +940 1 19 34 -0.32768000000000000000e5 +940 1 20 35 -0.32768000000000000000e5 +940 2 15 25 -0.32768000000000000000e5 +940 3 8 21 0.16384000000000000000e5 +940 3 15 20 -0.16384000000000000000e5 +940 3 16 21 -0.65536000000000000000e5 +940 3 18 19 0.32768000000000000000e5 +940 4 11 15 0.16384000000000000000e5 +940 4 14 14 -0.32768000000000000000e5 +941 1 16 23 -0.65536000000000000000e5 +941 1 17 22 0.65536000000000000000e5 +942 1 3 34 -0.65536000000000000000e5 +942 1 17 23 0.65536000000000000000e5 +943 1 12 43 -0.65536000000000000000e5 +943 1 17 24 0.65536000000000000000e5 +943 3 14 27 -0.65536000000000000000e5 +944 1 4 35 -0.65536000000000000000e5 +944 1 17 25 0.65536000000000000000e5 +945 1 14 45 -0.13107200000000000000e6 +945 1 17 26 0.65536000000000000000e5 +945 1 17 48 0.65536000000000000000e5 +945 1 18 49 0.65536000000000000000e5 +945 2 14 28 0.65536000000000000000e5 +945 3 5 34 -0.65536000000000000000e5 +945 3 13 42 0.65536000000000000000e5 +945 3 14 43 0.65536000000000000000e5 +946 1 3 18 -0.32768000000000000000e5 +946 1 4 19 0.65536000000000000000e5 +946 1 4 35 0.32768000000000000000e5 +946 1 12 43 0.65536000000000000000e5 +946 1 14 45 0.65536000000000000000e5 +946 1 17 27 0.65536000000000000000e5 +946 1 17 48 -0.32768000000000000000e5 +946 1 18 49 -0.32768000000000000000e5 +946 1 20 27 -0.13107200000000000000e6 +946 2 9 23 0.32768000000000000000e5 +946 2 10 24 0.65536000000000000000e5 +946 2 14 28 -0.32768000000000000000e5 +946 3 3 16 -0.32768000000000000000e5 +946 3 4 17 -0.32768000000000000000e5 +946 3 5 34 0.32768000000000000000e5 +946 3 13 42 -0.32768000000000000000e5 +946 3 14 27 0.65536000000000000000e5 +946 3 14 43 -0.32768000000000000000e5 +946 4 2 14 -0.32768000000000000000e5 +947 1 3 18 0.32768000000000000000e5 +947 1 4 19 -0.65536000000000000000e5 +947 1 12 43 -0.32768000000000000000e5 +947 1 17 28 0.65536000000000000000e5 +947 3 3 16 0.32768000000000000000e5 +947 3 4 17 0.32768000000000000000e5 +947 3 14 27 -0.32768000000000000000e5 +947 4 2 14 0.32768000000000000000e5 +948 1 4 35 -0.32768000000000000000e5 +948 1 12 43 -0.32768000000000000000e5 +948 1 14 45 -0.65536000000000000000e5 +948 1 17 29 0.65536000000000000000e5 +948 1 17 48 0.32768000000000000000e5 +948 1 18 49 0.32768000000000000000e5 +948 2 9 23 -0.32768000000000000000e5 +948 2 14 28 0.32768000000000000000e5 +948 3 5 34 -0.32768000000000000000e5 +948 3 13 42 0.32768000000000000000e5 +948 3 14 27 -0.32768000000000000000e5 +948 3 14 43 0.32768000000000000000e5 +949 1 5 36 -0.65536000000000000000e5 +949 1 17 30 0.65536000000000000000e5 +950 1 17 31 0.65536000000000000000e5 +950 1 20 27 -0.65536000000000000000e5 +951 1 13 20 -0.13107200000000000000e6 +951 1 17 32 0.65536000000000000000e5 +951 1 17 33 0.65536000000000000000e5 +951 1 20 27 0.65536000000000000000e5 +951 2 11 25 0.65536000000000000000e5 +951 3 8 21 0.13107200000000000000e6 +952 1 13 20 -0.65536000000000000000e5 +952 1 17 34 0.65536000000000000000e5 +952 3 8 21 0.65536000000000000000e5 +953 1 6 21 -0.32768000000000000000e5 +953 1 13 20 -0.65536000000000000000e5 +953 1 17 35 0.65536000000000000000e5 +953 1 20 27 0.32768000000000000000e5 +953 2 9 15 -0.32768000000000000000e5 +953 2 11 25 0.32768000000000000000e5 +953 3 7 20 0.32768000000000000000e5 +953 3 14 19 0.65536000000000000000e5 +953 4 10 14 0.32768000000000000000e5 +954 1 14 21 -0.65536000000000000000e5 +954 1 17 36 0.65536000000000000000e5 +954 3 8 21 0.32768000000000000000e5 +954 3 15 20 -0.32768000000000000000e5 +954 3 18 19 0.65536000000000000000e5 +954 4 11 15 0.32768000000000000000e5 +954 4 14 14 -0.65536000000000000000e5 +955 1 16 47 -0.65536000000000000000e5 +955 1 17 37 0.65536000000000000000e5 +955 3 12 41 -0.65536000000000000000e5 +956 1 12 43 -0.65536000000000000000e5 +956 1 17 38 0.65536000000000000000e5 +957 1 17 39 0.65536000000000000000e5 +957 1 17 48 -0.65536000000000000000e5 +957 3 13 42 -0.65536000000000000000e5 +958 1 14 45 -0.13107200000000000000e6 +958 1 17 40 0.65536000000000000000e5 +958 1 17 48 0.65536000000000000000e5 +958 1 18 49 0.65536000000000000000e5 +958 2 14 28 0.65536000000000000000e5 +958 3 13 42 0.65536000000000000000e5 +958 3 14 43 0.65536000000000000000e5 +959 1 13 44 -0.65536000000000000000e5 +959 1 17 41 0.65536000000000000000e5 +960 1 4 35 -0.32768000000000000000e5 +960 1 12 43 -0.32768000000000000000e5 +960 1 14 45 -0.65536000000000000000e5 +960 1 17 42 0.65536000000000000000e5 +960 1 17 48 0.32768000000000000000e5 +960 1 18 49 0.32768000000000000000e5 +960 2 9 23 -0.32768000000000000000e5 +960 2 14 28 0.32768000000000000000e5 +960 3 5 34 -0.32768000000000000000e5 +960 3 13 42 0.32768000000000000000e5 +960 3 14 27 -0.32768000000000000000e5 +960 3 14 43 0.32768000000000000000e5 +960 3 16 29 0.65536000000000000000e5 +961 1 14 45 -0.65536000000000000000e5 +961 1 17 43 0.65536000000000000000e5 +962 1 3 18 -0.16384000000000000000e5 +962 1 4 19 0.32768000000000000000e5 +962 1 5 36 0.32768000000000000000e5 +962 1 12 43 0.16384000000000000000e5 +962 1 13 44 -0.32768000000000000000e5 +962 1 14 45 -0.32768000000000000000e5 +962 1 17 32 -0.65536000000000000000e5 +962 1 17 44 0.65536000000000000000e5 +962 3 3 16 -0.16384000000000000000e5 +962 3 4 17 -0.16384000000000000000e5 +962 3 14 27 0.16384000000000000000e5 +962 3 16 29 0.32768000000000000000e5 +962 4 2 14 -0.16384000000000000000e5 +962 4 11 23 0.32768000000000000000e5 +963 1 13 20 -0.13107200000000000000e6 +963 1 17 32 0.65536000000000000000e5 +963 1 17 45 0.65536000000000000000e5 +963 1 20 27 0.65536000000000000000e5 +963 2 11 25 0.65536000000000000000e5 +963 3 8 21 0.13107200000000000000e6 +963 3 18 31 0.65536000000000000000e5 +964 1 6 21 -0.32768000000000000000e5 +964 1 13 20 -0.65536000000000000000e5 +964 1 17 46 0.65536000000000000000e5 +964 1 20 27 0.32768000000000000000e5 +964 2 9 15 -0.32768000000000000000e5 +964 2 11 25 0.32768000000000000000e5 +964 3 7 20 0.32768000000000000000e5 +964 3 14 19 0.65536000000000000000e5 +964 3 19 32 0.65536000000000000000e5 +964 4 10 14 0.32768000000000000000e5 +965 1 12 43 -0.65536000000000000000e5 +965 1 17 47 0.65536000000000000000e5 +965 3 22 35 0.65536000000000000000e5 +966 1 17 49 0.65536000000000000000e5 +966 1 34 49 -0.65536000000000000000e5 +966 3 18 47 -0.65536000000000000000e5 +967 1 4 35 -0.32768000000000000000e5 +967 1 12 43 -0.32768000000000000000e5 +967 1 17 50 0.65536000000000000000e5 +967 1 34 49 -0.32768000000000000000e5 +967 2 9 23 -0.32768000000000000000e5 +967 3 5 34 -0.32768000000000000000e5 +967 3 13 42 0.32768000000000000000e5 +967 3 14 27 -0.32768000000000000000e5 +967 3 16 29 0.65536000000000000000e5 +967 3 18 47 -0.32768000000000000000e5 +967 3 22 35 0.32768000000000000000e5 +967 4 14 26 0.32768000000000000000e5 +968 1 14 45 -0.13107200000000000000e6 +968 1 17 48 0.32768000000000000000e5 +968 1 17 51 0.65536000000000000000e5 +968 1 18 49 0.32768000000000000000e5 +968 1 34 49 0.32768000000000000000e5 +968 2 14 28 0.32768000000000000000e5 +968 3 14 43 0.32768000000000000000e5 +968 3 15 44 -0.65536000000000000000e5 +968 3 16 45 0.13107200000000000000e6 +968 3 18 47 0.32768000000000000000e5 +968 3 22 35 -0.32768000000000000000e5 +968 4 14 26 -0.32768000000000000000e5 +968 4 15 27 -0.65536000000000000000e5 +969 1 13 20 -0.13107200000000000000e6 +969 1 17 32 0.65536000000000000000e5 +969 1 17 52 0.65536000000000000000e5 +969 1 20 27 0.65536000000000000000e5 +969 2 11 25 0.65536000000000000000e5 +969 3 8 21 0.13107200000000000000e6 +969 3 16 45 0.65536000000000000000e5 +969 3 18 31 0.65536000000000000000e5 +970 1 6 53 0.81920000000000000000e4 +970 1 17 48 -0.65536000000000000000e5 +970 1 17 53 0.65536000000000000000e5 +970 1 25 40 -0.81920000000000000000e4 +970 2 4 34 0.16384000000000000000e5 +970 2 21 35 -0.16384000000000000000e5 +970 3 5 50 0.16384000000000000000e5 +970 3 24 37 0.81920000000000000000e4 +970 3 27 40 0.32768000000000000000e5 +970 3 28 41 0.32768000000000000000e5 +970 3 29 42 0.32768000000000000000e5 +970 4 4 32 -0.81920000000000000000e4 +970 4 7 35 -0.16384000000000000000e5 +970 4 16 28 0.81920000000000000000e4 +970 4 23 27 0.32768000000000000000e5 +971 1 17 54 0.65536000000000000000e5 +971 1 34 49 -0.65536000000000000000e5 +972 1 14 45 -0.13107200000000000000e6 +972 1 17 48 0.32768000000000000000e5 +972 1 17 55 0.65536000000000000000e5 +972 1 18 49 0.32768000000000000000e5 +972 1 34 49 0.32768000000000000000e5 +972 2 14 28 0.32768000000000000000e5 +972 3 14 43 0.32768000000000000000e5 +972 3 15 44 -0.65536000000000000000e5 +972 3 16 45 0.13107200000000000000e6 +972 3 18 47 0.32768000000000000000e5 +972 3 19 48 0.65536000000000000000e5 +972 3 22 35 -0.32768000000000000000e5 +972 4 14 26 -0.32768000000000000000e5 +972 4 15 27 -0.65536000000000000000e5 +973 1 17 56 0.65536000000000000000e5 +973 1 44 51 -0.65536000000000000000e5 +974 1 3 18 -0.40960000000000000000e4 +974 1 4 19 0.81920000000000000000e4 +974 1 5 36 0.81920000000000000000e4 +974 1 12 43 0.40960000000000000000e4 +974 1 13 44 -0.81920000000000000000e4 +974 1 14 21 -0.65536000000000000000e5 +974 1 14 45 -0.81920000000000000000e4 +974 1 18 18 0.65536000000000000000e5 +974 1 21 44 0.65536000000000000000e5 +974 1 33 36 -0.32768000000000000000e5 +974 2 11 25 0.16384000000000000000e5 +974 2 15 29 -0.16384000000000000000e5 +974 3 3 16 -0.40960000000000000000e4 +974 3 4 17 -0.40960000000000000000e4 +974 3 7 36 0.16384000000000000000e5 +974 3 8 21 0.32768000000000000000e5 +974 3 14 19 0.32768000000000000000e5 +974 3 14 27 0.40960000000000000000e4 +974 3 16 29 0.81920000000000000000e4 +974 3 18 31 0.16384000000000000000e5 +974 3 19 32 0.32768000000000000000e5 +974 4 2 14 -0.40960000000000000000e4 +974 4 11 15 0.32768000000000000000e5 +974 4 11 23 0.81920000000000000000e4 +974 4 13 25 0.32768000000000000000e5 +975 1 14 21 -0.65536000000000000000e5 +975 1 18 19 0.65536000000000000000e5 +976 1 18 20 0.65536000000000000000e5 +976 1 20 35 -0.65536000000000000000e5 +976 3 18 19 -0.65536000000000000000e5 +977 1 3 34 -0.65536000000000000000e5 +977 1 18 22 0.65536000000000000000e5 +978 1 12 43 -0.65536000000000000000e5 +978 1 18 23 0.65536000000000000000e5 +978 3 14 27 -0.65536000000000000000e5 +979 1 4 35 -0.65536000000000000000e5 +979 1 18 24 0.65536000000000000000e5 +980 1 14 45 -0.13107200000000000000e6 +980 1 17 48 0.65536000000000000000e5 +980 1 18 25 0.65536000000000000000e5 +980 1 18 49 0.65536000000000000000e5 +980 2 14 28 0.65536000000000000000e5 +980 3 5 34 -0.65536000000000000000e5 +980 3 13 42 0.65536000000000000000e5 +980 3 14 43 0.65536000000000000000e5 +981 1 15 30 -0.65536000000000000000e5 +981 1 18 26 0.65536000000000000000e5 +982 1 3 18 0.32768000000000000000e5 +982 1 4 19 -0.65536000000000000000e5 +982 1 12 43 -0.32768000000000000000e5 +982 1 18 27 0.65536000000000000000e5 +982 3 3 16 0.32768000000000000000e5 +982 3 4 17 0.32768000000000000000e5 +982 3 14 27 -0.32768000000000000000e5 +982 4 2 14 0.32768000000000000000e5 +983 1 4 35 -0.32768000000000000000e5 +983 1 12 43 -0.32768000000000000000e5 +983 1 14 45 -0.65536000000000000000e5 +983 1 17 48 0.32768000000000000000e5 +983 1 18 28 0.65536000000000000000e5 +983 1 18 49 0.32768000000000000000e5 +983 2 9 23 -0.32768000000000000000e5 +983 2 14 28 0.32768000000000000000e5 +983 3 5 34 -0.32768000000000000000e5 +983 3 13 42 0.32768000000000000000e5 +983 3 14 27 -0.32768000000000000000e5 +983 3 14 43 0.32768000000000000000e5 +984 1 5 36 -0.65536000000000000000e5 +984 1 18 29 0.65536000000000000000e5 +985 1 11 18 -0.65536000000000000000e5 +985 1 18 30 0.65536000000000000000e5 +985 3 6 19 0.65536000000000000000e5 +986 1 17 32 -0.65536000000000000000e5 +986 1 18 31 0.65536000000000000000e5 +987 1 13 20 -0.13107200000000000000e6 +987 1 17 32 0.65536000000000000000e5 +987 1 18 32 0.65536000000000000000e5 +987 1 20 27 0.65536000000000000000e5 +987 2 11 25 0.65536000000000000000e5 +987 3 8 21 0.13107200000000000000e6 +988 1 6 21 -0.32768000000000000000e5 +988 1 13 20 -0.65536000000000000000e5 +988 1 18 34 0.65536000000000000000e5 +988 1 20 27 0.32768000000000000000e5 +988 2 9 15 -0.32768000000000000000e5 +988 2 11 25 0.32768000000000000000e5 +988 3 7 20 0.32768000000000000000e5 +988 3 14 19 0.65536000000000000000e5 +988 4 10 14 0.32768000000000000000e5 +989 1 3 18 -0.81920000000000000000e4 +989 1 4 19 0.16384000000000000000e5 +989 1 5 36 0.16384000000000000000e5 +989 1 12 43 0.81920000000000000000e4 +989 1 13 44 -0.16384000000000000000e5 +989 1 14 21 -0.13107200000000000000e6 +989 1 14 45 -0.16384000000000000000e5 +989 1 18 35 0.65536000000000000000e5 +989 1 21 44 0.13107200000000000000e6 +989 1 33 36 -0.65536000000000000000e5 +989 2 11 25 0.32768000000000000000e5 +989 2 15 29 -0.32768000000000000000e5 +989 3 3 16 -0.81920000000000000000e4 +989 3 4 17 -0.81920000000000000000e4 +989 3 7 36 0.32768000000000000000e5 +989 3 8 21 0.65536000000000000000e5 +989 3 14 27 0.81920000000000000000e4 +989 3 15 20 -0.65536000000000000000e5 +989 3 16 29 0.16384000000000000000e5 +989 3 18 19 0.13107200000000000000e6 +989 3 18 31 0.32768000000000000000e5 +989 3 19 32 0.65536000000000000000e5 +989 4 2 14 -0.81920000000000000000e4 +989 4 11 15 0.65536000000000000000e5 +989 4 11 23 0.16384000000000000000e5 +989 4 13 25 0.65536000000000000000e5 +989 4 14 14 -0.13107200000000000000e6 +990 1 18 36 0.65536000000000000000e5 +990 1 20 35 -0.65536000000000000000e5 +991 1 12 43 -0.65536000000000000000e5 +991 1 18 37 0.65536000000000000000e5 +992 1 17 48 -0.65536000000000000000e5 +992 1 18 38 0.65536000000000000000e5 +992 3 13 42 -0.65536000000000000000e5 +993 1 14 45 -0.13107200000000000000e6 +993 1 17 48 0.65536000000000000000e5 +993 1 18 39 0.65536000000000000000e5 +993 1 18 49 0.65536000000000000000e5 +993 2 14 28 0.65536000000000000000e5 +993 3 13 42 0.65536000000000000000e5 +993 3 14 43 0.65536000000000000000e5 +994 1 18 40 0.65536000000000000000e5 +994 1 18 49 -0.65536000000000000000e5 +994 3 14 43 -0.65536000000000000000e5 +995 1 4 35 -0.32768000000000000000e5 +995 1 12 43 -0.32768000000000000000e5 +995 1 14 45 -0.65536000000000000000e5 +995 1 17 48 0.32768000000000000000e5 +995 1 18 41 0.65536000000000000000e5 +995 1 18 49 0.32768000000000000000e5 +995 2 9 23 -0.32768000000000000000e5 +995 2 14 28 0.32768000000000000000e5 +995 3 5 34 -0.32768000000000000000e5 +995 3 13 42 0.32768000000000000000e5 +995 3 14 27 -0.32768000000000000000e5 +995 3 14 43 0.32768000000000000000e5 +995 3 16 29 0.65536000000000000000e5 +996 1 14 45 -0.65536000000000000000e5 +996 1 18 42 0.65536000000000000000e5 +997 1 11 18 -0.65536000000000000000e5 +997 1 18 43 0.65536000000000000000e5 +997 3 6 19 0.65536000000000000000e5 +997 3 17 30 0.65536000000000000000e5 +998 1 13 20 -0.13107200000000000000e6 +998 1 17 32 0.65536000000000000000e5 +998 1 18 44 0.65536000000000000000e5 +998 1 20 27 0.65536000000000000000e5 +998 2 11 25 0.65536000000000000000e5 +998 3 8 21 0.13107200000000000000e6 +998 3 18 31 0.65536000000000000000e5 +999 1 15 46 -0.65536000000000000000e5 +999 1 18 45 0.65536000000000000000e5 +1000 1 18 46 0.65536000000000000000e5 +1000 1 33 36 -0.65536000000000000000e5 +1001 1 17 48 -0.65536000000000000000e5 +1001 1 18 47 0.65536000000000000000e5 +1002 1 18 48 0.65536000000000000000e5 +1002 1 34 49 -0.65536000000000000000e5 +1002 3 18 47 -0.65536000000000000000e5 +1003 1 14 45 -0.13107200000000000000e6 +1003 1 17 48 0.32768000000000000000e5 +1003 1 18 49 0.32768000000000000000e5 +1003 1 18 50 0.65536000000000000000e5 +1003 1 34 49 0.32768000000000000000e5 +1003 2 14 28 0.32768000000000000000e5 +1003 3 14 43 0.32768000000000000000e5 +1003 3 15 44 -0.65536000000000000000e5 +1003 3 16 45 0.13107200000000000000e6 +1003 3 18 47 0.32768000000000000000e5 +1003 3 22 35 -0.32768000000000000000e5 +1003 4 14 26 -0.32768000000000000000e5 +1003 4 15 27 -0.65536000000000000000e5 +1004 1 11 18 -0.65536000000000000000e5 +1004 1 18 51 0.65536000000000000000e5 +1004 3 6 19 0.65536000000000000000e5 +1004 3 15 44 0.65536000000000000000e5 +1004 3 17 30 0.65536000000000000000e5 +1005 1 18 52 0.65536000000000000000e5 +1005 1 20 51 -0.65536000000000000000e5 +1006 1 18 53 0.65536000000000000000e5 +1006 1 34 49 -0.65536000000000000000e5 +1007 1 18 49 -0.65536000000000000000e5 +1007 1 18 54 0.65536000000000000000e5 +1007 3 14 51 0.65536000000000000000e5 +1008 1 11 18 -0.65536000000000000000e5 +1008 1 18 55 0.65536000000000000000e5 +1008 3 6 19 0.65536000000000000000e5 +1008 3 15 44 0.65536000000000000000e5 +1008 3 17 30 0.65536000000000000000e5 +1008 3 32 45 0.65536000000000000000e5 +1009 1 18 49 -0.65536000000000000000e5 +1009 1 18 56 0.65536000000000000000e5 +1009 3 14 51 0.65536000000000000000e5 +1009 3 35 48 0.65536000000000000000e5 +1010 1 14 21 -0.16384000000000000000e5 +1010 1 16 19 -0.16384000000000000000e5 +1010 1 19 19 0.65536000000000000000e5 +1010 1 19 34 -0.16384000000000000000e5 +1010 2 13 15 -0.16384000000000000000e5 +1010 3 12 21 -0.16384000000000000000e5 +1011 1 14 21 -0.32768000000000000000e5 +1011 1 19 20 0.65536000000000000000e5 +1011 1 19 34 -0.32768000000000000000e5 +1011 1 20 35 -0.32768000000000000000e5 +1011 2 15 25 -0.32768000000000000000e5 +1011 3 8 21 0.16384000000000000000e5 +1011 3 15 20 -0.16384000000000000000e5 +1011 3 16 21 -0.65536000000000000000e5 +1011 3 18 19 0.32768000000000000000e5 +1011 4 11 15 0.16384000000000000000e5 +1011 4 14 14 -0.32768000000000000000e5 +1012 1 14 21 -0.32768000000000000000e5 +1012 1 16 19 -0.16384000000000000000e5 +1012 1 18 21 -0.32768000000000000000e5 +1012 1 19 21 0.65536000000000000000e5 +1012 1 19 34 -0.32768000000000000000e5 +1012 1 20 35 -0.16384000000000000000e5 +1012 2 13 15 -0.16384000000000000000e5 +1012 2 15 15 -0.65536000000000000000e5 +1012 2 15 25 -0.16384000000000000000e5 +1012 3 8 21 0.81920000000000000000e4 +1012 3 12 21 -0.16384000000000000000e5 +1012 3 15 20 -0.81920000000000000000e4 +1012 3 16 21 -0.32768000000000000000e5 +1012 3 18 19 0.16384000000000000000e5 +1012 4 11 15 0.81920000000000000000e4 +1012 4 14 14 -0.16384000000000000000e5 +1013 1 4 35 -0.32768000000000000000e5 +1013 1 12 43 -0.32768000000000000000e5 +1013 1 14 45 -0.65536000000000000000e5 +1013 1 16 31 -0.13107200000000000000e6 +1013 1 17 48 0.32768000000000000000e5 +1013 1 18 49 0.32768000000000000000e5 +1013 1 19 22 0.65536000000000000000e5 +1013 1 20 27 0.13107200000000000000e6 +1013 2 7 13 0.65536000000000000000e5 +1013 2 9 23 -0.32768000000000000000e5 +1013 2 10 24 -0.65536000000000000000e5 +1013 2 14 28 0.32768000000000000000e5 +1013 3 5 34 -0.32768000000000000000e5 +1013 3 13 42 0.32768000000000000000e5 +1013 3 14 27 -0.32768000000000000000e5 +1013 3 14 43 0.32768000000000000000e5 +1013 4 10 10 -0.13107200000000000000e6 +1014 1 3 18 -0.32768000000000000000e5 +1014 1 4 19 0.65536000000000000000e5 +1014 1 4 35 0.32768000000000000000e5 +1014 1 12 43 0.65536000000000000000e5 +1014 1 14 45 0.65536000000000000000e5 +1014 1 17 48 -0.32768000000000000000e5 +1014 1 18 49 -0.32768000000000000000e5 +1014 1 19 23 0.65536000000000000000e5 +1014 1 20 27 -0.13107200000000000000e6 +1014 2 9 23 0.32768000000000000000e5 +1014 2 10 24 0.65536000000000000000e5 +1014 2 14 28 -0.32768000000000000000e5 +1014 3 3 16 -0.32768000000000000000e5 +1014 3 4 17 -0.32768000000000000000e5 +1014 3 5 34 0.32768000000000000000e5 +1014 3 13 42 -0.32768000000000000000e5 +1014 3 14 27 0.65536000000000000000e5 +1014 3 14 43 -0.32768000000000000000e5 +1014 4 2 14 -0.32768000000000000000e5 +1015 1 3 18 0.32768000000000000000e5 +1015 1 4 19 -0.65536000000000000000e5 +1015 1 12 43 -0.32768000000000000000e5 +1015 1 19 24 0.65536000000000000000e5 +1015 3 3 16 0.32768000000000000000e5 +1015 3 4 17 0.32768000000000000000e5 +1015 3 14 27 -0.32768000000000000000e5 +1015 4 2 14 0.32768000000000000000e5 +1016 1 4 35 -0.32768000000000000000e5 +1016 1 12 43 -0.32768000000000000000e5 +1016 1 14 45 -0.65536000000000000000e5 +1016 1 17 48 0.32768000000000000000e5 +1016 1 18 49 0.32768000000000000000e5 +1016 1 19 25 0.65536000000000000000e5 +1016 2 9 23 -0.32768000000000000000e5 +1016 2 14 28 0.32768000000000000000e5 +1016 3 5 34 -0.32768000000000000000e5 +1016 3 13 42 0.32768000000000000000e5 +1016 3 14 27 -0.32768000000000000000e5 +1016 3 14 43 0.32768000000000000000e5 +1017 1 5 36 -0.65536000000000000000e5 +1017 1 19 26 0.65536000000000000000e5 +1018 1 16 31 -0.65536000000000000000e5 +1018 1 19 27 0.65536000000000000000e5 +1019 1 19 28 0.65536000000000000000e5 +1019 1 20 27 -0.65536000000000000000e5 +1020 1 17 32 -0.65536000000000000000e5 +1020 1 19 29 0.65536000000000000000e5 +1021 1 13 20 -0.13107200000000000000e6 +1021 1 17 32 0.65536000000000000000e5 +1021 1 19 30 0.65536000000000000000e5 +1021 1 20 27 0.65536000000000000000e5 +1021 2 11 25 0.65536000000000000000e5 +1021 3 8 21 0.13107200000000000000e6 +1022 1 2 17 -0.16384000000000000000e5 +1022 1 3 18 -0.16384000000000000000e5 +1022 1 3 34 -0.81920000000000000000e4 +1022 1 4 19 -0.16384000000000000000e5 +1022 1 5 20 -0.16384000000000000000e5 +1022 1 5 36 0.16384000000000000000e5 +1022 1 10 17 -0.16384000000000000000e5 +1022 1 12 43 0.81920000000000000000e4 +1022 1 16 23 0.81920000000000000000e4 +1022 1 16 31 -0.32768000000000000000e5 +1022 1 17 32 -0.32768000000000000000e5 +1022 1 19 31 0.65536000000000000000e5 +1022 2 6 12 -0.81920000000000000000e4 +1022 2 10 24 -0.16384000000000000000e5 +1022 2 11 13 -0.32768000000000000000e5 +1022 3 3 16 -0.24576000000000000000e5 +1022 3 4 17 -0.81920000000000000000e4 +1022 3 7 12 -0.81920000000000000000e4 +1022 3 7 20 -0.32768000000000000000e5 +1022 3 8 21 -0.65536000000000000000e5 +1022 3 12 21 0.13107200000000000000e6 +1022 3 14 19 -0.65536000000000000000e5 +1022 3 14 27 0.81920000000000000000e4 +1022 4 1 13 -0.81920000000000000000e4 +1022 4 2 14 -0.81920000000000000000e4 +1022 4 3 15 -0.16384000000000000000e5 +1022 4 10 10 -0.32768000000000000000e5 +1022 4 13 13 -0.13107200000000000000e6 +1023 1 13 20 -0.65536000000000000000e5 +1023 1 19 32 0.65536000000000000000e5 +1023 3 8 21 0.65536000000000000000e5 +1024 1 6 21 -0.32768000000000000000e5 +1024 1 13 20 -0.65536000000000000000e5 +1024 1 19 33 0.65536000000000000000e5 +1024 1 20 27 0.32768000000000000000e5 +1024 2 9 15 -0.32768000000000000000e5 +1024 2 11 25 0.32768000000000000000e5 +1024 3 7 20 0.32768000000000000000e5 +1024 3 14 19 0.65536000000000000000e5 +1024 4 10 14 0.32768000000000000000e5 +1025 1 14 21 -0.65536000000000000000e5 +1025 1 19 35 0.65536000000000000000e5 +1025 3 8 21 0.32768000000000000000e5 +1025 3 15 20 -0.32768000000000000000e5 +1025 3 18 19 0.65536000000000000000e5 +1025 4 11 15 0.32768000000000000000e5 +1025 4 14 14 -0.65536000000000000000e5 +1026 1 14 21 -0.32768000000000000000e5 +1026 1 19 34 -0.32768000000000000000e5 +1026 1 19 36 0.65536000000000000000e5 +1026 1 20 35 -0.32768000000000000000e5 +1026 2 15 25 -0.32768000000000000000e5 +1026 3 8 21 0.16384000000000000000e5 +1026 3 15 20 -0.16384000000000000000e5 +1026 3 18 19 0.32768000000000000000e5 +1026 4 11 15 0.16384000000000000000e5 +1026 4 14 14 -0.32768000000000000000e5 +1027 1 19 37 0.65536000000000000000e5 +1027 1 27 34 -0.65536000000000000000e5 +1028 1 13 44 -0.65536000000000000000e5 +1028 1 19 38 0.65536000000000000000e5 +1029 1 4 35 -0.32768000000000000000e5 +1029 1 12 43 -0.32768000000000000000e5 +1029 1 14 45 -0.65536000000000000000e5 +1029 1 17 48 0.32768000000000000000e5 +1029 1 18 49 0.32768000000000000000e5 +1029 1 19 39 0.65536000000000000000e5 +1029 2 9 23 -0.32768000000000000000e5 +1029 2 14 28 0.32768000000000000000e5 +1029 3 5 34 -0.32768000000000000000e5 +1029 3 13 42 0.32768000000000000000e5 +1029 3 14 27 -0.32768000000000000000e5 +1029 3 14 43 0.32768000000000000000e5 +1029 3 16 29 0.65536000000000000000e5 +1030 1 14 45 -0.65536000000000000000e5 +1030 1 19 40 0.65536000000000000000e5 +1031 1 19 41 0.65536000000000000000e5 +1031 1 20 27 -0.65536000000000000000e5 +1031 3 7 36 0.65536000000000000000e5 +1032 1 3 18 -0.16384000000000000000e5 +1032 1 4 19 0.32768000000000000000e5 +1032 1 5 36 0.32768000000000000000e5 +1032 1 12 43 0.16384000000000000000e5 +1032 1 13 44 -0.32768000000000000000e5 +1032 1 14 45 -0.32768000000000000000e5 +1032 1 17 32 -0.65536000000000000000e5 +1032 1 19 42 0.65536000000000000000e5 +1032 3 3 16 -0.16384000000000000000e5 +1032 3 4 17 -0.16384000000000000000e5 +1032 3 14 27 0.16384000000000000000e5 +1032 3 16 29 0.32768000000000000000e5 +1032 4 2 14 -0.16384000000000000000e5 +1032 4 11 23 0.32768000000000000000e5 +1033 1 13 20 -0.13107200000000000000e6 +1033 1 17 32 0.65536000000000000000e5 +1033 1 19 43 0.65536000000000000000e5 +1033 1 20 27 0.65536000000000000000e5 +1033 2 11 25 0.65536000000000000000e5 +1033 3 8 21 0.13107200000000000000e6 +1033 3 18 31 0.65536000000000000000e5 +1034 1 3 18 -0.81920000000000000000e4 +1034 1 4 19 0.16384000000000000000e5 +1034 1 5 36 0.16384000000000000000e5 +1034 1 12 43 0.81920000000000000000e4 +1034 1 13 20 -0.65536000000000000000e5 +1034 1 13 44 -0.16384000000000000000e5 +1034 1 14 45 -0.16384000000000000000e5 +1034 1 19 44 0.65536000000000000000e5 +1034 2 11 25 0.32768000000000000000e5 +1034 2 15 29 -0.32768000000000000000e5 +1034 3 3 16 -0.81920000000000000000e4 +1034 3 4 17 -0.81920000000000000000e4 +1034 3 7 36 0.32768000000000000000e5 +1034 3 8 21 0.65536000000000000000e5 +1034 3 14 27 0.81920000000000000000e4 +1034 3 16 29 0.16384000000000000000e5 +1034 3 18 31 0.32768000000000000000e5 +1034 4 2 14 -0.81920000000000000000e4 +1034 4 11 23 0.16384000000000000000e5 +1035 1 6 21 -0.32768000000000000000e5 +1035 1 13 20 -0.65536000000000000000e5 +1035 1 19 45 0.65536000000000000000e5 +1035 1 20 27 0.32768000000000000000e5 +1035 2 9 15 -0.32768000000000000000e5 +1035 2 11 25 0.32768000000000000000e5 +1035 3 7 20 0.32768000000000000000e5 +1035 3 14 19 0.65536000000000000000e5 +1035 3 19 32 0.65536000000000000000e5 +1035 4 10 14 0.32768000000000000000e5 +1036 1 19 46 0.65536000000000000000e5 +1036 1 21 44 -0.65536000000000000000e5 +1037 1 19 47 0.65536000000000000000e5 +1037 1 34 41 -0.65536000000000000000e5 +1038 1 4 35 -0.32768000000000000000e5 +1038 1 12 43 -0.32768000000000000000e5 +1038 1 19 48 0.65536000000000000000e5 +1038 1 34 49 -0.32768000000000000000e5 +1038 2 9 23 -0.32768000000000000000e5 +1038 3 5 34 -0.32768000000000000000e5 +1038 3 13 42 0.32768000000000000000e5 +1038 3 14 27 -0.32768000000000000000e5 +1038 3 16 29 0.65536000000000000000e5 +1038 3 18 47 -0.32768000000000000000e5 +1038 3 22 35 0.32768000000000000000e5 +1038 4 14 26 0.32768000000000000000e5 +1039 1 14 45 -0.13107200000000000000e6 +1039 1 17 48 0.32768000000000000000e5 +1039 1 18 49 0.32768000000000000000e5 +1039 1 19 49 0.65536000000000000000e5 +1039 1 34 49 0.32768000000000000000e5 +1039 2 14 28 0.32768000000000000000e5 +1039 3 14 43 0.32768000000000000000e5 +1039 3 15 44 -0.65536000000000000000e5 +1039 3 16 45 0.13107200000000000000e6 +1039 3 18 47 0.32768000000000000000e5 +1039 3 22 35 -0.32768000000000000000e5 +1039 4 14 26 -0.32768000000000000000e5 +1039 4 15 27 -0.65536000000000000000e5 +1040 1 13 20 -0.13107200000000000000e6 +1040 1 17 32 0.65536000000000000000e5 +1040 1 19 51 0.65536000000000000000e5 +1040 1 20 27 0.65536000000000000000e5 +1040 2 11 25 0.65536000000000000000e5 +1040 3 8 21 0.13107200000000000000e6 +1040 3 16 45 0.65536000000000000000e5 +1040 3 18 31 0.65536000000000000000e5 +1041 1 13 20 -0.65536000000000000000e5 +1041 1 17 32 0.32768000000000000000e5 +1041 1 19 50 -0.32768000000000000000e5 +1041 1 19 52 0.65536000000000000000e5 +1041 1 20 27 0.32768000000000000000e5 +1041 1 20 51 -0.32768000000000000000e5 +1041 2 11 25 0.32768000000000000000e5 +1041 2 25 31 -0.32768000000000000000e5 +1041 3 8 21 0.65536000000000000000e5 +1041 3 16 45 0.32768000000000000000e5 +1041 3 18 31 0.32768000000000000000e5 +1042 1 4 35 -0.32768000000000000000e5 +1042 1 12 43 -0.32768000000000000000e5 +1042 1 19 53 0.65536000000000000000e5 +1042 1 34 49 -0.32768000000000000000e5 +1042 2 9 23 -0.32768000000000000000e5 +1042 3 5 34 -0.32768000000000000000e5 +1042 3 13 42 0.32768000000000000000e5 +1042 3 14 27 -0.32768000000000000000e5 +1042 3 16 29 0.65536000000000000000e5 +1042 3 18 47 -0.32768000000000000000e5 +1042 3 22 35 0.32768000000000000000e5 +1042 3 31 44 0.65536000000000000000e5 +1042 4 14 26 0.32768000000000000000e5 +1043 1 14 45 -0.13107200000000000000e6 +1043 1 17 48 0.32768000000000000000e5 +1043 1 18 49 0.32768000000000000000e5 +1043 1 19 54 0.65536000000000000000e5 +1043 1 34 49 0.32768000000000000000e5 +1043 2 14 28 0.32768000000000000000e5 +1043 3 14 43 0.32768000000000000000e5 +1043 3 15 44 -0.65536000000000000000e5 +1043 3 16 45 0.13107200000000000000e6 +1043 3 18 47 0.32768000000000000000e5 +1043 3 19 48 0.65536000000000000000e5 +1043 3 22 35 -0.32768000000000000000e5 +1043 4 14 26 -0.32768000000000000000e5 +1043 4 15 27 -0.65536000000000000000e5 +1044 1 13 20 -0.13107200000000000000e6 +1044 1 17 32 0.65536000000000000000e5 +1044 1 19 55 0.65536000000000000000e5 +1044 1 20 27 0.65536000000000000000e5 +1044 2 11 25 0.65536000000000000000e5 +1044 3 8 21 0.13107200000000000000e6 +1044 3 16 45 0.65536000000000000000e5 +1044 3 18 31 0.65536000000000000000e5 +1044 3 36 41 0.65536000000000000000e5 +1045 1 14 45 -0.13107200000000000000e6 +1045 1 17 48 0.32768000000000000000e5 +1045 1 18 49 0.32768000000000000000e5 +1045 1 19 56 0.65536000000000000000e5 +1045 1 34 49 0.32768000000000000000e5 +1045 2 14 28 0.32768000000000000000e5 +1045 3 14 43 0.32768000000000000000e5 +1045 3 15 44 -0.65536000000000000000e5 +1045 3 16 45 0.13107200000000000000e6 +1045 3 18 47 0.32768000000000000000e5 +1045 3 19 48 0.65536000000000000000e5 +1045 3 22 35 -0.32768000000000000000e5 +1045 3 41 46 0.65536000000000000000e5 +1045 4 14 26 -0.32768000000000000000e5 +1045 4 15 27 -0.65536000000000000000e5 +1046 1 18 21 -0.32768000000000000000e5 +1046 1 20 20 0.65536000000000000000e5 +1047 1 3 18 -0.32768000000000000000e5 +1047 1 4 19 0.65536000000000000000e5 +1047 1 4 35 0.32768000000000000000e5 +1047 1 12 43 0.65536000000000000000e5 +1047 1 14 45 0.65536000000000000000e5 +1047 1 17 48 -0.32768000000000000000e5 +1047 1 18 49 -0.32768000000000000000e5 +1047 1 20 22 0.65536000000000000000e5 +1047 1 20 27 -0.13107200000000000000e6 +1047 2 9 23 0.32768000000000000000e5 +1047 2 10 24 0.65536000000000000000e5 +1047 2 14 28 -0.32768000000000000000e5 +1047 3 3 16 -0.32768000000000000000e5 +1047 3 4 17 -0.32768000000000000000e5 +1047 3 5 34 0.32768000000000000000e5 +1047 3 13 42 -0.32768000000000000000e5 +1047 3 14 27 0.65536000000000000000e5 +1047 3 14 43 -0.32768000000000000000e5 +1047 4 2 14 -0.32768000000000000000e5 +1048 1 3 18 0.32768000000000000000e5 +1048 1 4 19 -0.65536000000000000000e5 +1048 1 12 43 -0.32768000000000000000e5 +1048 1 20 23 0.65536000000000000000e5 +1048 3 3 16 0.32768000000000000000e5 +1048 3 4 17 0.32768000000000000000e5 +1048 3 14 27 -0.32768000000000000000e5 +1048 4 2 14 0.32768000000000000000e5 +1049 1 4 35 -0.32768000000000000000e5 +1049 1 12 43 -0.32768000000000000000e5 +1049 1 14 45 -0.65536000000000000000e5 +1049 1 17 48 0.32768000000000000000e5 +1049 1 18 49 0.32768000000000000000e5 +1049 1 20 24 0.65536000000000000000e5 +1049 2 9 23 -0.32768000000000000000e5 +1049 2 14 28 0.32768000000000000000e5 +1049 3 5 34 -0.32768000000000000000e5 +1049 3 13 42 0.32768000000000000000e5 +1049 3 14 27 -0.32768000000000000000e5 +1049 3 14 43 0.32768000000000000000e5 +1050 1 5 36 -0.65536000000000000000e5 +1050 1 20 25 0.65536000000000000000e5 +1051 1 11 18 -0.65536000000000000000e5 +1051 1 20 26 0.65536000000000000000e5 +1051 3 6 19 0.65536000000000000000e5 +1052 1 17 32 -0.65536000000000000000e5 +1052 1 20 28 0.65536000000000000000e5 +1053 1 13 20 -0.13107200000000000000e6 +1053 1 17 32 0.65536000000000000000e5 +1053 1 20 27 0.65536000000000000000e5 +1053 1 20 29 0.65536000000000000000e5 +1053 2 11 25 0.65536000000000000000e5 +1053 3 8 21 0.13107200000000000000e6 +1054 1 18 33 -0.65536000000000000000e5 +1054 1 20 30 0.65536000000000000000e5 +1055 1 13 20 -0.65536000000000000000e5 +1055 1 20 31 0.65536000000000000000e5 +1055 3 8 21 0.65536000000000000000e5 +1056 1 6 21 -0.32768000000000000000e5 +1056 1 13 20 -0.65536000000000000000e5 +1056 1 20 27 0.32768000000000000000e5 +1056 1 20 32 0.65536000000000000000e5 +1056 2 9 15 -0.32768000000000000000e5 +1056 2 11 25 0.32768000000000000000e5 +1056 3 7 20 0.32768000000000000000e5 +1056 3 14 19 0.65536000000000000000e5 +1056 4 10 14 0.32768000000000000000e5 +1057 1 3 18 -0.81920000000000000000e4 +1057 1 4 19 0.16384000000000000000e5 +1057 1 5 36 0.16384000000000000000e5 +1057 1 12 43 0.81920000000000000000e4 +1057 1 13 44 -0.16384000000000000000e5 +1057 1 14 21 -0.13107200000000000000e6 +1057 1 14 45 -0.16384000000000000000e5 +1057 1 20 33 0.65536000000000000000e5 +1057 1 21 44 0.13107200000000000000e6 +1057 1 33 36 -0.65536000000000000000e5 +1057 2 11 25 0.32768000000000000000e5 +1057 2 15 29 -0.32768000000000000000e5 +1057 3 3 16 -0.81920000000000000000e4 +1057 3 4 17 -0.81920000000000000000e4 +1057 3 7 36 0.32768000000000000000e5 +1057 3 8 21 0.65536000000000000000e5 +1057 3 14 27 0.81920000000000000000e4 +1057 3 15 20 -0.65536000000000000000e5 +1057 3 16 29 0.16384000000000000000e5 +1057 3 18 19 0.13107200000000000000e6 +1057 3 18 31 0.32768000000000000000e5 +1057 3 19 32 0.65536000000000000000e5 +1057 4 2 14 -0.81920000000000000000e4 +1057 4 11 15 0.65536000000000000000e5 +1057 4 11 23 0.16384000000000000000e5 +1057 4 13 25 0.65536000000000000000e5 +1057 4 14 14 -0.13107200000000000000e6 +1058 1 14 21 -0.65536000000000000000e5 +1058 1 20 34 0.65536000000000000000e5 +1058 3 8 21 0.32768000000000000000e5 +1058 3 15 20 -0.32768000000000000000e5 +1058 3 18 19 0.65536000000000000000e5 +1058 4 11 15 0.32768000000000000000e5 +1058 4 14 14 -0.65536000000000000000e5 +1059 1 18 21 -0.65536000000000000000e5 +1059 1 20 36 0.65536000000000000000e5 +1059 3 19 20 0.65536000000000000000e5 +1060 1 13 44 -0.65536000000000000000e5 +1060 1 20 37 0.65536000000000000000e5 +1061 1 4 35 -0.32768000000000000000e5 +1061 1 12 43 -0.32768000000000000000e5 +1061 1 14 45 -0.65536000000000000000e5 +1061 1 17 48 0.32768000000000000000e5 +1061 1 18 49 0.32768000000000000000e5 +1061 1 20 38 0.65536000000000000000e5 +1061 2 9 23 -0.32768000000000000000e5 +1061 2 14 28 0.32768000000000000000e5 +1061 3 5 34 -0.32768000000000000000e5 +1061 3 13 42 0.32768000000000000000e5 +1061 3 14 27 -0.32768000000000000000e5 +1061 3 14 43 0.32768000000000000000e5 +1061 3 16 29 0.65536000000000000000e5 +1062 1 14 45 -0.65536000000000000000e5 +1062 1 20 39 0.65536000000000000000e5 +1063 1 11 18 -0.65536000000000000000e5 +1063 1 20 40 0.65536000000000000000e5 +1063 3 6 19 0.65536000000000000000e5 +1063 3 17 30 0.65536000000000000000e5 +1064 1 3 18 -0.16384000000000000000e5 +1064 1 4 19 0.32768000000000000000e5 +1064 1 5 36 0.32768000000000000000e5 +1064 1 12 43 0.16384000000000000000e5 +1064 1 13 44 -0.32768000000000000000e5 +1064 1 14 45 -0.32768000000000000000e5 +1064 1 17 32 -0.65536000000000000000e5 +1064 1 20 41 0.65536000000000000000e5 +1064 3 3 16 -0.16384000000000000000e5 +1064 3 4 17 -0.16384000000000000000e5 +1064 3 14 27 0.16384000000000000000e5 +1064 3 16 29 0.32768000000000000000e5 +1064 4 2 14 -0.16384000000000000000e5 +1064 4 11 23 0.32768000000000000000e5 +1065 1 13 20 -0.13107200000000000000e6 +1065 1 17 32 0.65536000000000000000e5 +1065 1 20 27 0.65536000000000000000e5 +1065 1 20 42 0.65536000000000000000e5 +1065 2 11 25 0.65536000000000000000e5 +1065 3 8 21 0.13107200000000000000e6 +1065 3 18 31 0.65536000000000000000e5 +1066 1 15 46 -0.65536000000000000000e5 +1066 1 20 43 0.65536000000000000000e5 +1067 1 6 21 -0.32768000000000000000e5 +1067 1 13 20 -0.65536000000000000000e5 +1067 1 20 27 0.32768000000000000000e5 +1067 1 20 44 0.65536000000000000000e5 +1067 2 9 15 -0.32768000000000000000e5 +1067 2 11 25 0.32768000000000000000e5 +1067 3 7 20 0.32768000000000000000e5 +1067 3 14 19 0.65536000000000000000e5 +1067 3 19 32 0.65536000000000000000e5 +1067 4 10 14 0.32768000000000000000e5 +1068 1 20 45 0.65536000000000000000e5 +1068 1 33 36 -0.65536000000000000000e5 +1069 1 6 21 -0.16384000000000000000e5 +1069 1 17 32 -0.16384000000000000000e5 +1069 1 19 50 0.16384000000000000000e5 +1069 1 20 46 0.65536000000000000000e5 +1069 1 20 51 0.16384000000000000000e5 +1069 1 21 52 -0.65536000000000000000e5 +1069 2 9 15 -0.16384000000000000000e5 +1069 2 25 31 0.16384000000000000000e5 +1069 3 7 20 0.16384000000000000000e5 +1069 3 8 21 -0.32768000000000000000e5 +1069 3 14 19 0.32768000000000000000e5 +1069 3 16 45 -0.16384000000000000000e5 +1069 3 17 46 -0.32768000000000000000e5 +1069 3 18 31 -0.16384000000000000000e5 +1069 3 19 32 0.32768000000000000000e5 +1069 3 20 45 -0.32768000000000000000e5 +1069 4 10 14 0.16384000000000000000e5 +1069 4 25 25 -0.65536000000000000000e5 +1070 1 4 35 -0.32768000000000000000e5 +1070 1 12 43 -0.32768000000000000000e5 +1070 1 20 47 0.65536000000000000000e5 +1070 1 34 49 -0.32768000000000000000e5 +1070 2 9 23 -0.32768000000000000000e5 +1070 3 5 34 -0.32768000000000000000e5 +1070 3 13 42 0.32768000000000000000e5 +1070 3 14 27 -0.32768000000000000000e5 +1070 3 16 29 0.65536000000000000000e5 +1070 3 18 47 -0.32768000000000000000e5 +1070 3 22 35 0.32768000000000000000e5 +1070 4 14 26 0.32768000000000000000e5 +1071 1 14 45 -0.13107200000000000000e6 +1071 1 17 48 0.32768000000000000000e5 +1071 1 18 49 0.32768000000000000000e5 +1071 1 20 48 0.65536000000000000000e5 +1071 1 34 49 0.32768000000000000000e5 +1071 2 14 28 0.32768000000000000000e5 +1071 3 14 43 0.32768000000000000000e5 +1071 3 15 44 -0.65536000000000000000e5 +1071 3 16 45 0.13107200000000000000e6 +1071 3 18 47 0.32768000000000000000e5 +1071 3 22 35 -0.32768000000000000000e5 +1071 4 14 26 -0.32768000000000000000e5 +1071 4 15 27 -0.65536000000000000000e5 +1072 1 11 18 -0.65536000000000000000e5 +1072 1 20 49 0.65536000000000000000e5 +1072 3 6 19 0.65536000000000000000e5 +1072 3 15 44 0.65536000000000000000e5 +1072 3 17 30 0.65536000000000000000e5 +1073 1 13 20 -0.13107200000000000000e6 +1073 1 17 32 0.65536000000000000000e5 +1073 1 20 27 0.65536000000000000000e5 +1073 1 20 50 0.65536000000000000000e5 +1073 2 11 25 0.65536000000000000000e5 +1073 3 8 21 0.13107200000000000000e6 +1073 3 16 45 0.65536000000000000000e5 +1073 3 18 31 0.65536000000000000000e5 +1074 1 20 52 0.65536000000000000000e5 +1074 1 33 36 -0.65536000000000000000e5 +1074 3 17 46 0.65536000000000000000e5 +1075 1 14 45 -0.13107200000000000000e6 +1075 1 17 48 0.32768000000000000000e5 +1075 1 18 49 0.32768000000000000000e5 +1075 1 20 53 0.65536000000000000000e5 +1075 1 34 49 0.32768000000000000000e5 +1075 2 14 28 0.32768000000000000000e5 +1075 3 14 43 0.32768000000000000000e5 +1075 3 15 44 -0.65536000000000000000e5 +1075 3 16 45 0.13107200000000000000e6 +1075 3 18 47 0.32768000000000000000e5 +1075 3 19 48 0.65536000000000000000e5 +1075 3 22 35 -0.32768000000000000000e5 +1075 4 14 26 -0.32768000000000000000e5 +1075 4 15 27 -0.65536000000000000000e5 +1076 1 11 18 -0.65536000000000000000e5 +1076 1 20 54 0.65536000000000000000e5 +1076 3 6 19 0.65536000000000000000e5 +1076 3 15 44 0.65536000000000000000e5 +1076 3 17 30 0.65536000000000000000e5 +1076 3 32 45 0.65536000000000000000e5 +1077 1 20 55 0.65536000000000000000e5 +1077 1 36 51 -0.65536000000000000000e5 +1078 1 20 56 0.65536000000000000000e5 +1078 1 45 52 -0.65536000000000000000e5 +1079 1 16 31 -0.65536000000000000000e5 +1079 1 21 22 0.65536000000000000000e5 +1080 1 20 27 -0.65536000000000000000e5 +1080 1 21 23 0.65536000000000000000e5 +1081 1 17 32 -0.65536000000000000000e5 +1081 1 21 24 0.65536000000000000000e5 +1082 1 13 20 -0.13107200000000000000e6 +1082 1 17 32 0.65536000000000000000e5 +1082 1 20 27 0.65536000000000000000e5 +1082 1 21 25 0.65536000000000000000e5 +1082 2 11 25 0.65536000000000000000e5 +1082 3 8 21 0.13107200000000000000e6 +1083 1 18 33 -0.65536000000000000000e5 +1083 1 21 26 0.65536000000000000000e5 +1084 1 2 17 -0.16384000000000000000e5 +1084 1 3 18 -0.16384000000000000000e5 +1084 1 3 34 -0.81920000000000000000e4 +1084 1 4 19 -0.16384000000000000000e5 +1084 1 5 20 -0.16384000000000000000e5 +1084 1 5 36 0.16384000000000000000e5 +1084 1 10 17 -0.16384000000000000000e5 +1084 1 12 43 0.81920000000000000000e4 +1084 1 16 23 0.81920000000000000000e4 +1084 1 16 31 -0.32768000000000000000e5 +1084 1 17 32 -0.32768000000000000000e5 +1084 1 21 27 0.65536000000000000000e5 +1084 2 6 12 -0.81920000000000000000e4 +1084 2 10 24 -0.16384000000000000000e5 +1084 2 11 13 -0.32768000000000000000e5 +1084 3 3 16 -0.24576000000000000000e5 +1084 3 4 17 -0.81920000000000000000e4 +1084 3 7 12 -0.81920000000000000000e4 +1084 3 7 20 -0.32768000000000000000e5 +1084 3 8 21 -0.65536000000000000000e5 +1084 3 12 21 0.13107200000000000000e6 +1084 3 14 19 -0.65536000000000000000e5 +1084 3 14 27 0.81920000000000000000e4 +1084 4 1 13 -0.81920000000000000000e4 +1084 4 2 14 -0.81920000000000000000e4 +1084 4 3 15 -0.16384000000000000000e5 +1084 4 10 10 -0.32768000000000000000e5 +1084 4 13 13 -0.13107200000000000000e6 +1085 1 13 20 -0.65536000000000000000e5 +1085 1 21 28 0.65536000000000000000e5 +1085 3 8 21 0.65536000000000000000e5 +1086 1 6 21 -0.32768000000000000000e5 +1086 1 13 20 -0.65536000000000000000e5 +1086 1 20 27 0.32768000000000000000e5 +1086 1 21 29 0.65536000000000000000e5 +1086 2 9 15 -0.32768000000000000000e5 +1086 2 11 25 0.32768000000000000000e5 +1086 3 7 20 0.32768000000000000000e5 +1086 3 14 19 0.65536000000000000000e5 +1086 4 10 14 0.32768000000000000000e5 +1087 1 3 18 -0.81920000000000000000e4 +1087 1 4 19 0.16384000000000000000e5 +1087 1 5 36 0.16384000000000000000e5 +1087 1 12 43 0.81920000000000000000e4 +1087 1 13 44 -0.16384000000000000000e5 +1087 1 14 21 -0.13107200000000000000e6 +1087 1 14 45 -0.16384000000000000000e5 +1087 1 21 30 0.65536000000000000000e5 +1087 1 21 44 0.13107200000000000000e6 +1087 1 33 36 -0.65536000000000000000e5 +1087 2 11 25 0.32768000000000000000e5 +1087 2 15 29 -0.32768000000000000000e5 +1087 3 3 16 -0.81920000000000000000e4 +1087 3 4 17 -0.81920000000000000000e4 +1087 3 7 36 0.32768000000000000000e5 +1087 3 8 21 0.65536000000000000000e5 +1087 3 14 27 0.81920000000000000000e4 +1087 3 15 20 -0.65536000000000000000e5 +1087 3 16 29 0.16384000000000000000e5 +1087 3 18 19 0.13107200000000000000e6 +1087 3 18 31 0.32768000000000000000e5 +1087 3 19 32 0.65536000000000000000e5 +1087 4 2 14 -0.81920000000000000000e4 +1087 4 11 15 0.65536000000000000000e5 +1087 4 11 23 0.16384000000000000000e5 +1087 4 13 25 0.65536000000000000000e5 +1087 4 14 14 -0.13107200000000000000e6 +1088 1 19 34 -0.65536000000000000000e5 +1088 1 21 31 0.65536000000000000000e5 +1089 1 14 21 -0.65536000000000000000e5 +1089 1 21 32 0.65536000000000000000e5 +1089 3 8 21 0.32768000000000000000e5 +1089 3 15 20 -0.32768000000000000000e5 +1089 3 18 19 0.65536000000000000000e5 +1089 4 11 15 0.32768000000000000000e5 +1089 4 14 14 -0.65536000000000000000e5 +1090 1 20 35 -0.65536000000000000000e5 +1090 1 21 33 0.65536000000000000000e5 +1091 1 14 21 -0.32768000000000000000e5 +1091 1 19 34 -0.32768000000000000000e5 +1091 1 20 35 -0.32768000000000000000e5 +1091 1 21 34 0.65536000000000000000e5 +1091 2 15 25 -0.32768000000000000000e5 +1091 3 8 21 0.16384000000000000000e5 +1091 3 15 20 -0.16384000000000000000e5 +1091 3 18 19 0.32768000000000000000e5 +1091 4 11 15 0.16384000000000000000e5 +1091 4 14 14 -0.32768000000000000000e5 +1092 1 18 21 -0.65536000000000000000e5 +1092 1 21 35 0.65536000000000000000e5 +1092 3 19 20 0.65536000000000000000e5 +1093 1 20 27 -0.65536000000000000000e5 +1093 1 21 37 0.65536000000000000000e5 +1093 3 7 36 0.65536000000000000000e5 +1094 1 3 18 -0.16384000000000000000e5 +1094 1 4 19 0.32768000000000000000e5 +1094 1 5 36 0.32768000000000000000e5 +1094 1 12 43 0.16384000000000000000e5 +1094 1 13 44 -0.32768000000000000000e5 +1094 1 14 45 -0.32768000000000000000e5 +1094 1 17 32 -0.65536000000000000000e5 +1094 1 21 38 0.65536000000000000000e5 +1094 3 3 16 -0.16384000000000000000e5 +1094 3 4 17 -0.16384000000000000000e5 +1094 3 14 27 0.16384000000000000000e5 +1094 3 16 29 0.32768000000000000000e5 +1094 4 2 14 -0.16384000000000000000e5 +1094 4 11 23 0.32768000000000000000e5 +1095 1 13 20 -0.13107200000000000000e6 +1095 1 17 32 0.65536000000000000000e5 +1095 1 20 27 0.65536000000000000000e5 +1095 1 21 39 0.65536000000000000000e5 +1095 2 11 25 0.65536000000000000000e5 +1095 3 8 21 0.13107200000000000000e6 +1095 3 18 31 0.65536000000000000000e5 +1096 1 15 46 -0.65536000000000000000e5 +1096 1 21 40 0.65536000000000000000e5 +1097 1 3 18 -0.81920000000000000000e4 +1097 1 4 19 0.16384000000000000000e5 +1097 1 5 36 0.16384000000000000000e5 +1097 1 12 43 0.81920000000000000000e4 +1097 1 13 20 -0.65536000000000000000e5 +1097 1 13 44 -0.16384000000000000000e5 +1097 1 14 45 -0.16384000000000000000e5 +1097 1 21 41 0.65536000000000000000e5 +1097 2 11 25 0.32768000000000000000e5 +1097 2 15 29 -0.32768000000000000000e5 +1097 3 3 16 -0.81920000000000000000e4 +1097 3 4 17 -0.81920000000000000000e4 +1097 3 7 36 0.32768000000000000000e5 +1097 3 8 21 0.65536000000000000000e5 +1097 3 14 27 0.81920000000000000000e4 +1097 3 16 29 0.16384000000000000000e5 +1097 3 18 31 0.32768000000000000000e5 +1097 4 2 14 -0.81920000000000000000e4 +1097 4 11 23 0.16384000000000000000e5 +1098 1 6 21 -0.32768000000000000000e5 +1098 1 13 20 -0.65536000000000000000e5 +1098 1 20 27 0.32768000000000000000e5 +1098 1 21 42 0.65536000000000000000e5 +1098 2 9 15 -0.32768000000000000000e5 +1098 2 11 25 0.32768000000000000000e5 +1098 3 7 20 0.32768000000000000000e5 +1098 3 14 19 0.65536000000000000000e5 +1098 3 19 32 0.65536000000000000000e5 +1098 4 10 14 0.32768000000000000000e5 +1099 1 21 43 0.65536000000000000000e5 +1099 1 33 36 -0.65536000000000000000e5 +1100 1 6 21 -0.16384000000000000000e5 +1100 1 17 32 -0.16384000000000000000e5 +1100 1 19 50 0.16384000000000000000e5 +1100 1 20 51 0.16384000000000000000e5 +1100 1 21 45 0.65536000000000000000e5 +1100 1 21 52 -0.65536000000000000000e5 +1100 2 9 15 -0.16384000000000000000e5 +1100 2 25 31 0.16384000000000000000e5 +1100 3 7 20 0.16384000000000000000e5 +1100 3 8 21 -0.32768000000000000000e5 +1100 3 14 19 0.32768000000000000000e5 +1100 3 16 45 -0.16384000000000000000e5 +1100 3 17 46 -0.32768000000000000000e5 +1100 3 18 31 -0.16384000000000000000e5 +1100 3 19 32 0.32768000000000000000e5 +1100 3 20 45 -0.32768000000000000000e5 +1100 4 10 14 0.16384000000000000000e5 +1100 4 25 25 -0.65536000000000000000e5 +1101 1 18 21 -0.65536000000000000000e5 +1101 1 21 46 0.65536000000000000000e5 +1101 3 19 20 0.65536000000000000000e5 +1101 3 21 34 0.65536000000000000000e5 +1102 1 19 50 -0.65536000000000000000e5 +1102 1 21 47 0.65536000000000000000e5 +1103 1 13 20 -0.13107200000000000000e6 +1103 1 17 32 0.65536000000000000000e5 +1103 1 20 27 0.65536000000000000000e5 +1103 1 21 48 0.65536000000000000000e5 +1103 2 11 25 0.65536000000000000000e5 +1103 3 8 21 0.13107200000000000000e6 +1103 3 16 45 0.65536000000000000000e5 +1103 3 18 31 0.65536000000000000000e5 +1104 1 20 51 -0.65536000000000000000e5 +1104 1 21 49 0.65536000000000000000e5 +1105 1 13 20 -0.65536000000000000000e5 +1105 1 17 32 0.32768000000000000000e5 +1105 1 19 50 -0.32768000000000000000e5 +1105 1 20 27 0.32768000000000000000e5 +1105 1 20 51 -0.32768000000000000000e5 +1105 1 21 50 0.65536000000000000000e5 +1105 2 11 25 0.32768000000000000000e5 +1105 2 25 31 -0.32768000000000000000e5 +1105 3 8 21 0.65536000000000000000e5 +1105 3 16 45 0.32768000000000000000e5 +1105 3 18 31 0.32768000000000000000e5 +1106 1 21 51 0.65536000000000000000e5 +1106 1 33 36 -0.65536000000000000000e5 +1106 3 17 46 0.65536000000000000000e5 +1107 1 13 20 -0.13107200000000000000e6 +1107 1 17 32 0.65536000000000000000e5 +1107 1 20 27 0.65536000000000000000e5 +1107 1 21 53 0.65536000000000000000e5 +1107 2 11 25 0.65536000000000000000e5 +1107 3 8 21 0.13107200000000000000e6 +1107 3 16 45 0.65536000000000000000e5 +1107 3 18 31 0.65536000000000000000e5 +1107 3 36 41 0.65536000000000000000e5 +1108 1 21 54 0.65536000000000000000e5 +1108 1 36 51 -0.65536000000000000000e5 +1109 1 21 55 0.65536000000000000000e5 +1109 1 33 36 -0.65536000000000000000e5 +1109 3 17 46 0.65536000000000000000e5 +1109 3 21 50 0.65536000000000000000e5 +1110 1 11 18 0.32768000000000000000e5 +1110 1 21 56 0.65536000000000000000e5 +1110 1 36 51 -0.65536000000000000000e5 +1110 1 45 52 -0.32768000000000000000e5 +1110 3 6 19 -0.32768000000000000000e5 +1110 3 15 44 -0.32768000000000000000e5 +1110 3 17 30 -0.32768000000000000000e5 +1110 3 32 45 -0.32768000000000000000e5 +1110 3 36 49 0.32768000000000000000e5 +1110 3 41 46 0.32768000000000000000e5 +1110 4 15 35 0.32768000000000000000e5 +1111 1 1 8 0.65536000000000000000e5 +1111 1 1 24 0.32768000000000000000e5 +1111 1 1 32 0.13107200000000000000e6 +1111 1 1 48 -0.32768000000000000000e5 +1111 1 2 9 0.65536000000000000000e5 +1111 1 2 33 -0.39321600000000000000e6 +1111 1 2 49 -0.65536000000000000000e5 +1111 1 3 34 0.52428800000000000000e6 +1111 1 4 11 0.65536000000000000000e5 +1111 1 8 23 -0.65536000000000000000e5 +1111 1 8 39 -0.65536000000000000000e5 +1111 1 9 40 -0.65536000000000000000e5 +1111 1 10 41 -0.26214400000000000000e6 +1111 1 11 42 0.13107200000000000000e6 +1111 1 12 27 -0.26214400000000000000e6 +1111 1 12 43 0.52428800000000000000e6 +1111 1 22 22 0.65536000000000000000e5 +1111 1 23 38 -0.65536000000000000000e5 +1111 1 26 41 0.65536000000000000000e5 +1111 1 28 43 -0.26214400000000000000e6 +1111 1 32 47 -0.39321600000000000000e6 +1111 1 33 48 -0.13107200000000000000e6 +1111 2 1 7 0.65536000000000000000e5 +1111 2 2 8 -0.65536000000000000000e5 +1111 2 2 16 0.32768000000000000000e5 +1111 2 2 32 -0.65536000000000000000e5 +1111 2 3 9 0.65536000000000000000e5 +1111 2 6 20 0.13107200000000000000e6 +1111 2 7 21 -0.26214400000000000000e6 +1111 2 12 26 -0.13107200000000000000e6 +1111 2 16 30 -0.65536000000000000000e5 +1111 2 20 34 -0.13107200000000000000e6 +1111 3 1 14 0.26214400000000000000e6 +1111 3 1 22 0.32768000000000000000e5 +1111 3 1 30 0.65536000000000000000e5 +1111 3 1 38 0.32768000000000000000e5 +1111 3 2 7 0.13107200000000000000e6 +1111 3 2 15 -0.13107200000000000000e6 +1111 3 2 23 0.32768000000000000000e5 +1111 3 3 32 -0.39321600000000000000e6 +1111 3 4 9 0.65536000000000000000e5 +1111 3 7 12 -0.26214400000000000000e6 +1111 3 8 37 -0.65536000000000000000e5 +1111 3 10 23 0.13107200000000000000e6 +1111 3 13 42 -0.26214400000000000000e6 +1111 3 22 35 -0.26214400000000000000e6 +1111 3 28 41 -0.39321600000000000000e6 +1111 3 29 42 -0.13107200000000000000e6 +1111 4 2 6 0.65536000000000000000e5 +1111 4 2 30 -0.65536000000000000000e5 +1111 4 3 31 0.13107200000000000000e6 +1111 4 6 6 0.26214400000000000000e6 +1111 4 6 18 0.65536000000000000000e5 +1111 4 6 34 -0.13107200000000000000e6 +1112 1 1 40 0.65536000000000000000e5 +1112 1 22 23 0.65536000000000000000e5 +1112 1 22 37 -0.65536000000000000000e5 +1112 1 23 38 -0.65536000000000000000e5 +1112 3 1 38 0.65536000000000000000e5 +1112 3 22 27 -0.13107200000000000000e6 +1112 4 16 16 0.13107200000000000000e6 +1113 1 1 48 -0.65536000000000000000e5 +1113 1 22 24 0.65536000000000000000e5 +1113 3 1 38 -0.65536000000000000000e5 +1114 1 1 40 -0.65536000000000000000e5 +1114 1 22 25 0.65536000000000000000e5 +1115 1 2 49 -0.65536000000000000000e5 +1115 1 22 26 0.65536000000000000000e5 +1115 3 2 39 -0.65536000000000000000e5 +1116 1 1 8 0.65536000000000000000e5 +1116 1 1 24 0.32768000000000000000e5 +1116 1 1 32 0.13107200000000000000e6 +1116 1 1 40 0.32768000000000000000e5 +1116 1 1 48 -0.65536000000000000000e5 +1116 1 2 9 0.65536000000000000000e5 +1116 1 2 33 -0.39321600000000000000e6 +1116 1 2 49 -0.65536000000000000000e5 +1116 1 3 34 0.52428800000000000000e6 +1116 1 4 11 0.65536000000000000000e5 +1116 1 8 23 -0.65536000000000000000e5 +1116 1 8 39 -0.65536000000000000000e5 +1116 1 9 40 -0.65536000000000000000e5 +1116 1 10 41 -0.26214400000000000000e6 +1116 1 11 42 0.13107200000000000000e6 +1116 1 12 27 -0.26214400000000000000e6 +1116 1 12 43 0.52428800000000000000e6 +1116 1 22 27 0.65536000000000000000e5 +1116 1 22 37 -0.32768000000000000000e5 +1116 1 23 38 -0.98304000000000000000e5 +1116 1 26 41 0.65536000000000000000e5 +1116 1 28 43 -0.26214400000000000000e6 +1116 1 32 47 -0.39321600000000000000e6 +1116 1 33 48 -0.13107200000000000000e6 +1116 2 1 7 0.65536000000000000000e5 +1116 2 2 8 -0.65536000000000000000e5 +1116 2 2 16 0.32768000000000000000e5 +1116 2 2 32 -0.65536000000000000000e5 +1116 2 3 9 0.65536000000000000000e5 +1116 2 6 20 0.13107200000000000000e6 +1116 2 7 21 -0.26214400000000000000e6 +1116 2 12 26 -0.13107200000000000000e6 +1116 2 16 16 -0.65536000000000000000e5 +1116 2 16 30 -0.65536000000000000000e5 +1116 2 20 34 -0.13107200000000000000e6 +1116 3 1 14 0.26214400000000000000e6 +1116 3 1 22 0.32768000000000000000e5 +1116 3 1 30 0.65536000000000000000e5 +1116 3 1 38 0.32768000000000000000e5 +1116 3 2 7 0.13107200000000000000e6 +1116 3 2 15 -0.13107200000000000000e6 +1116 3 2 23 0.32768000000000000000e5 +1116 3 3 32 -0.39321600000000000000e6 +1116 3 4 9 0.65536000000000000000e5 +1116 3 7 12 -0.26214400000000000000e6 +1116 3 8 37 -0.65536000000000000000e5 +1116 3 10 23 0.13107200000000000000e6 +1116 3 13 42 -0.26214400000000000000e6 +1116 3 22 27 -0.65536000000000000000e5 +1116 3 22 35 -0.26214400000000000000e6 +1116 3 28 41 -0.39321600000000000000e6 +1116 3 29 42 -0.13107200000000000000e6 +1116 4 2 6 0.65536000000000000000e5 +1116 4 2 30 -0.65536000000000000000e5 +1116 4 3 31 0.13107200000000000000e6 +1116 4 6 6 0.26214400000000000000e6 +1116 4 6 18 0.65536000000000000000e5 +1116 4 6 34 -0.13107200000000000000e6 +1116 4 16 16 0.65536000000000000000e5 +1117 1 7 38 -0.65536000000000000000e5 +1117 1 22 28 0.65536000000000000000e5 +1118 1 1 48 -0.32768000000000000000e5 +1118 1 2 49 -0.32768000000000000000e5 +1118 1 22 29 0.65536000000000000000e5 +1118 1 23 38 -0.32768000000000000000e5 +1118 2 2 32 -0.32768000000000000000e5 +1118 3 8 37 -0.65536000000000000000e5 +1119 1 8 39 -0.65536000000000000000e5 +1119 1 22 30 0.65536000000000000000e5 +1120 1 2 33 -0.65536000000000000000e5 +1120 1 3 34 0.13107200000000000000e6 +1120 1 10 41 -0.65536000000000000000e5 +1120 1 11 42 0.65536000000000000000e5 +1120 1 12 43 0.13107200000000000000e6 +1120 1 16 23 -0.13107200000000000000e6 +1120 1 22 31 0.65536000000000000000e5 +1120 1 28 43 -0.65536000000000000000e5 +1120 1 32 47 -0.65536000000000000000e5 +1120 1 33 48 -0.65536000000000000000e5 +1120 2 1 31 0.65536000000000000000e5 +1120 2 7 21 -0.65536000000000000000e5 +1120 2 12 26 -0.65536000000000000000e5 +1120 3 1 34 0.13107200000000000000e6 +1120 3 2 31 -0.65536000000000000000e5 +1120 3 3 32 -0.65536000000000000000e5 +1120 3 13 42 -0.13107200000000000000e6 +1120 3 28 41 -0.65536000000000000000e5 +1120 3 29 42 -0.65536000000000000000e5 +1120 4 3 31 0.65536000000000000000e5 +1121 1 2 33 0.65536000000000000000e5 +1121 1 3 34 -0.13107200000000000000e6 +1121 1 10 41 0.65536000000000000000e5 +1121 1 22 32 0.65536000000000000000e5 +1121 2 7 21 0.65536000000000000000e5 +1121 3 2 31 0.65536000000000000000e5 +1121 3 3 32 0.65536000000000000000e5 +1122 1 11 42 -0.65536000000000000000e5 +1122 1 12 43 -0.13107200000000000000e6 +1122 1 22 33 0.65536000000000000000e5 +1122 1 28 43 0.65536000000000000000e5 +1122 1 32 47 0.65536000000000000000e5 +1122 1 33 48 0.65536000000000000000e5 +1122 2 12 26 0.65536000000000000000e5 +1122 3 13 42 0.13107200000000000000e6 +1122 3 28 41 0.65536000000000000000e5 +1122 3 29 42 0.65536000000000000000e5 +1122 4 3 31 -0.65536000000000000000e5 +1123 1 16 23 -0.65536000000000000000e5 +1123 1 22 34 0.65536000000000000000e5 +1123 3 1 34 0.65536000000000000000e5 +1124 1 16 47 -0.65536000000000000000e5 +1124 1 22 35 0.65536000000000000000e5 +1124 3 12 41 -0.65536000000000000000e5 +1125 1 22 36 0.65536000000000000000e5 +1125 1 27 34 -0.65536000000000000000e5 +1126 1 1 48 -0.65536000000000000000e5 +1126 1 22 38 0.65536000000000000000e5 +1127 1 22 39 0.65536000000000000000e5 +1127 1 23 38 -0.65536000000000000000e5 +1128 1 2 49 -0.65536000000000000000e5 +1128 1 22 40 0.65536000000000000000e5 +1129 1 7 38 -0.65536000000000000000e5 +1129 1 22 41 0.65536000000000000000e5 +1129 3 22 27 0.65536000000000000000e5 +1130 1 1 48 -0.32768000000000000000e5 +1130 1 2 49 -0.32768000000000000000e5 +1130 1 22 42 0.65536000000000000000e5 +1130 1 23 38 -0.32768000000000000000e5 +1130 2 2 32 -0.32768000000000000000e5 +1131 1 8 39 -0.65536000000000000000e5 +1131 1 9 40 -0.65536000000000000000e5 +1131 1 10 41 0.13107200000000000000e6 +1131 1 22 43 0.65536000000000000000e5 +1131 1 26 41 0.65536000000000000000e5 +1131 1 32 47 -0.13107200000000000000e6 +1131 3 9 38 -0.65536000000000000000e5 +1131 3 28 41 -0.13107200000000000000e6 +1131 4 2 30 -0.65536000000000000000e5 +1132 1 2 33 0.65536000000000000000e5 +1132 1 3 34 -0.13107200000000000000e6 +1132 1 9 40 -0.32768000000000000000e5 +1132 1 10 41 0.13107200000000000000e6 +1132 1 22 44 0.65536000000000000000e5 +1132 1 26 41 0.32768000000000000000e5 +1132 1 32 47 -0.65536000000000000000e5 +1132 2 7 21 0.65536000000000000000e5 +1132 3 2 31 0.65536000000000000000e5 +1132 3 3 32 0.65536000000000000000e5 +1132 3 8 37 0.32768000000000000000e5 +1132 3 9 38 -0.32768000000000000000e5 +1132 3 22 27 0.32768000000000000000e5 +1132 3 28 41 -0.65536000000000000000e5 +1132 4 1 29 0.32768000000000000000e5 +1132 4 2 30 -0.32768000000000000000e5 +1133 1 12 43 -0.13107200000000000000e6 +1133 1 22 45 0.65536000000000000000e5 +1133 1 28 43 0.65536000000000000000e5 +1133 1 32 47 0.65536000000000000000e5 +1133 2 20 34 0.65536000000000000000e5 +1133 3 22 35 0.13107200000000000000e6 +1133 3 28 41 0.65536000000000000000e5 +1133 4 6 34 0.65536000000000000000e5 +1134 1 16 47 -0.65536000000000000000e5 +1134 1 22 46 0.65536000000000000000e5 +1135 1 1 48 -0.65536000000000000000e5 +1135 1 6 53 -0.65536000000000000000e5 +1135 1 22 47 0.65536000000000000000e5 +1135 1 25 40 0.65536000000000000000e5 +1135 2 1 35 0.65536000000000000000e5 +1135 2 2 32 -0.65536000000000000000e5 +1135 2 4 34 -0.13107200000000000000e6 +1135 2 16 30 -0.13107200000000000000e6 +1135 2 16 34 0.13107200000000000000e6 +1135 2 21 35 0.13107200000000000000e6 +1135 3 2 47 -0.65536000000000000000e5 +1135 3 5 50 -0.13107200000000000000e6 +1135 3 7 52 0.52428800000000000000e6 +1135 3 24 37 -0.13107200000000000000e6 +1135 3 27 40 -0.13107200000000000000e6 +1135 3 28 41 -0.52428800000000000000e6 +1135 4 4 32 0.65536000000000000000e5 +1135 4 6 34 -0.26214400000000000000e6 +1135 4 7 35 0.13107200000000000000e6 +1135 4 16 28 -0.65536000000000000000e5 +1135 4 17 29 0.13107200000000000000e6 +1136 1 22 48 0.65536000000000000000e5 +1136 1 23 38 -0.65536000000000000000e5 +1136 3 2 47 0.65536000000000000000e5 +1137 1 2 49 -0.65536000000000000000e5 +1137 1 22 49 0.65536000000000000000e5 +1137 3 24 37 0.65536000000000000000e5 +1138 1 1 48 -0.32768000000000000000e5 +1138 1 2 49 -0.32768000000000000000e5 +1138 1 6 53 -0.32768000000000000000e5 +1138 1 22 50 0.65536000000000000000e5 +1138 1 23 38 -0.32768000000000000000e5 +1138 1 25 40 0.32768000000000000000e5 +1138 2 2 32 -0.32768000000000000000e5 +1138 2 4 34 -0.65536000000000000000e5 +1138 2 16 30 -0.65536000000000000000e5 +1138 2 16 34 0.65536000000000000000e5 +1138 2 21 35 0.65536000000000000000e5 +1138 3 5 50 -0.65536000000000000000e5 +1138 3 7 52 0.26214400000000000000e6 +1138 3 24 37 -0.32768000000000000000e5 +1138 3 27 40 -0.65536000000000000000e5 +1138 3 28 41 -0.26214400000000000000e6 +1138 4 4 32 0.32768000000000000000e5 +1138 4 6 34 -0.13107200000000000000e6 +1138 4 7 35 0.65536000000000000000e5 +1138 4 16 28 -0.32768000000000000000e5 +1138 4 17 29 0.65536000000000000000e5 +1139 1 6 53 -0.32768000000000000000e5 +1139 1 8 39 -0.65536000000000000000e5 +1139 1 9 40 -0.65536000000000000000e5 +1139 1 10 41 0.13107200000000000000e6 +1139 1 22 51 0.65536000000000000000e5 +1139 1 25 40 0.32768000000000000000e5 +1139 1 26 41 0.65536000000000000000e5 +1139 1 32 47 -0.13107200000000000000e6 +1139 3 9 38 -0.65536000000000000000e5 +1139 3 24 37 -0.32768000000000000000e5 +1139 3 27 40 -0.13107200000000000000e6 +1139 4 2 30 -0.65536000000000000000e5 +1139 4 4 32 0.32768000000000000000e5 +1139 4 16 28 -0.32768000000000000000e5 +1139 4 17 29 -0.65536000000000000000e5 +1140 1 6 53 -0.16384000000000000000e5 +1140 1 12 43 -0.13107200000000000000e6 +1140 1 22 52 0.65536000000000000000e5 +1140 1 25 40 0.16384000000000000000e5 +1140 1 28 43 0.65536000000000000000e5 +1140 1 32 47 0.65536000000000000000e5 +1140 2 4 34 -0.32768000000000000000e5 +1140 2 20 34 0.65536000000000000000e5 +1140 2 21 35 0.32768000000000000000e5 +1140 3 5 50 -0.32768000000000000000e5 +1140 3 7 52 0.13107200000000000000e6 +1140 3 22 35 0.13107200000000000000e6 +1140 3 24 37 -0.16384000000000000000e5 +1140 3 27 40 -0.65536000000000000000e5 +1140 4 4 32 0.16384000000000000000e5 +1140 4 7 35 0.32768000000000000000e5 +1140 4 16 28 -0.16384000000000000000e5 +1141 1 6 53 -0.65536000000000000000e5 +1141 1 8 39 -0.13107200000000000000e6 +1141 1 9 40 -0.13107200000000000000e6 +1141 1 10 41 0.26214400000000000000e6 +1141 1 22 53 0.65536000000000000000e5 +1141 1 22 54 0.65536000000000000000e5 +1141 1 23 54 0.65536000000000000000e5 +1141 1 24 55 0.13107200000000000000e6 +1141 1 25 40 0.65536000000000000000e5 +1141 1 37 52 -0.26214400000000000000e6 +1141 2 26 32 0.65536000000000000000e5 +1141 3 9 38 -0.13107200000000000000e6 +1141 3 22 51 -0.13107200000000000000e6 +1141 3 24 37 -0.65536000000000000000e5 +1141 3 27 40 -0.13107200000000000000e6 +1141 4 2 30 -0.13107200000000000000e6 +1141 4 4 32 0.65536000000000000000e5 +1141 4 16 28 -0.65536000000000000000e5 +1141 4 17 29 -0.13107200000000000000e6 +1141 4 20 32 -0.13107200000000000000e6 +1142 1 6 53 -0.32768000000000000000e5 +1142 1 8 39 -0.65536000000000000000e5 +1142 1 9 40 -0.65536000000000000000e5 +1142 1 10 41 0.13107200000000000000e6 +1142 1 22 55 0.65536000000000000000e5 +1142 1 24 55 0.65536000000000000000e5 +1142 1 25 40 0.32768000000000000000e5 +1142 1 37 52 -0.13107200000000000000e6 +1142 3 9 38 -0.65536000000000000000e5 +1142 3 22 51 -0.65536000000000000000e5 +1142 3 24 37 -0.32768000000000000000e5 +1142 3 27 40 -0.65536000000000000000e5 +1142 4 2 30 -0.65536000000000000000e5 +1142 4 4 32 0.32768000000000000000e5 +1142 4 16 28 -0.32768000000000000000e5 +1142 4 17 29 -0.65536000000000000000e5 +1142 4 20 32 -0.65536000000000000000e5 +1143 1 1 48 0.65536000000000000000e5 +1143 1 2 49 0.65536000000000000000e5 +1143 1 6 53 0.65536000000000000000e5 +1143 1 8 39 0.13107200000000000000e6 +1143 1 9 40 0.13107200000000000000e6 +1143 1 10 41 -0.26214400000000000000e6 +1143 1 12 43 -0.52428800000000000000e6 +1143 1 22 56 0.65536000000000000000e5 +1143 1 23 38 0.65536000000000000000e5 +1143 1 25 40 -0.65536000000000000000e5 +1143 1 26 41 -0.13107200000000000000e6 +1143 1 28 43 0.26214400000000000000e6 +1143 1 32 47 0.52428800000000000000e6 +1143 1 38 53 0.65536000000000000000e5 +1143 1 40 47 0.65536000000000000000e5 +1143 2 2 32 0.65536000000000000000e5 +1143 2 16 30 0.13107200000000000000e6 +1143 2 20 34 0.26214400000000000000e6 +1143 2 32 32 0.13107200000000000000e6 +1143 3 9 38 0.13107200000000000000e6 +1143 3 22 35 0.52428800000000000000e6 +1143 3 22 51 0.13107200000000000000e6 +1143 3 24 37 0.65536000000000000000e5 +1143 3 24 53 -0.65536000000000000000e5 +1143 3 27 40 0.13107200000000000000e6 +1143 3 28 41 0.52428800000000000000e6 +1143 3 37 50 0.13107200000000000000e6 +1143 4 2 30 0.13107200000000000000e6 +1143 4 4 32 -0.65536000000000000000e5 +1143 4 6 34 0.26214400000000000000e6 +1143 4 16 28 0.65536000000000000000e5 +1144 1 1 48 -0.32768000000000000000e5 +1144 1 23 23 0.65536000000000000000e5 +1144 3 1 38 -0.32768000000000000000e5 +1145 1 1 40 -0.65536000000000000000e5 +1145 1 23 24 0.65536000000000000000e5 +1146 1 2 49 -0.65536000000000000000e5 +1146 1 23 25 0.65536000000000000000e5 +1146 3 2 39 -0.65536000000000000000e5 +1147 1 6 37 -0.65536000000000000000e5 +1147 1 23 26 0.65536000000000000000e5 +1148 1 7 38 -0.65536000000000000000e5 +1148 1 23 27 0.65536000000000000000e5 +1149 1 1 48 -0.32768000000000000000e5 +1149 1 2 49 -0.32768000000000000000e5 +1149 1 23 28 0.65536000000000000000e5 +1149 1 23 38 -0.32768000000000000000e5 +1149 2 2 32 -0.32768000000000000000e5 +1149 3 8 37 -0.65536000000000000000e5 +1150 1 8 39 -0.65536000000000000000e5 +1150 1 23 29 0.65536000000000000000e5 +1151 1 1 48 0.32768000000000000000e5 +1151 1 2 49 0.32768000000000000000e5 +1151 1 8 39 0.65536000000000000000e5 +1151 1 9 40 0.65536000000000000000e5 +1151 1 10 41 -0.13107200000000000000e6 +1151 1 12 43 -0.26214400000000000000e6 +1151 1 23 30 0.65536000000000000000e5 +1151 1 23 38 0.32768000000000000000e5 +1151 1 26 41 -0.65536000000000000000e5 +1151 1 28 43 0.13107200000000000000e6 +1151 1 32 47 0.26214400000000000000e6 +1151 2 2 32 0.32768000000000000000e5 +1151 2 16 30 0.65536000000000000000e5 +1151 2 20 34 0.13107200000000000000e6 +1151 3 22 35 0.26214400000000000000e6 +1151 3 28 41 0.26214400000000000000e6 +1151 4 2 30 0.65536000000000000000e5 +1151 4 6 34 0.13107200000000000000e6 +1152 1 2 33 0.65536000000000000000e5 +1152 1 3 34 -0.13107200000000000000e6 +1152 1 10 41 0.65536000000000000000e5 +1152 1 23 31 0.65536000000000000000e5 +1152 2 7 21 0.65536000000000000000e5 +1152 3 2 31 0.65536000000000000000e5 +1152 3 3 32 0.65536000000000000000e5 +1153 1 11 42 -0.65536000000000000000e5 +1153 1 12 43 -0.13107200000000000000e6 +1153 1 23 32 0.65536000000000000000e5 +1153 1 28 43 0.65536000000000000000e5 +1153 1 32 47 0.65536000000000000000e5 +1153 1 33 48 0.65536000000000000000e5 +1153 2 12 26 0.65536000000000000000e5 +1153 3 13 42 0.13107200000000000000e6 +1153 3 28 41 0.65536000000000000000e5 +1153 3 29 42 0.65536000000000000000e5 +1153 4 3 31 -0.65536000000000000000e5 +1154 1 10 41 -0.65536000000000000000e5 +1154 1 23 33 0.65536000000000000000e5 +1155 1 16 47 -0.65536000000000000000e5 +1155 1 23 34 0.65536000000000000000e5 +1155 3 12 41 -0.65536000000000000000e5 +1156 1 12 43 -0.65536000000000000000e5 +1156 1 23 35 0.65536000000000000000e5 +1157 1 13 44 -0.65536000000000000000e5 +1157 1 23 36 0.65536000000000000000e5 +1158 1 1 48 -0.65536000000000000000e5 +1158 1 23 37 0.65536000000000000000e5 +1159 1 2 49 -0.65536000000000000000e5 +1159 1 23 39 0.65536000000000000000e5 +1160 1 23 40 0.65536000000000000000e5 +1160 1 24 39 -0.65536000000000000000e5 +1161 1 1 48 -0.32768000000000000000e5 +1161 1 2 49 -0.32768000000000000000e5 +1161 1 23 38 -0.32768000000000000000e5 +1161 1 23 41 0.65536000000000000000e5 +1161 2 2 32 -0.32768000000000000000e5 +1162 1 8 39 -0.65536000000000000000e5 +1162 1 9 40 -0.65536000000000000000e5 +1162 1 10 41 0.13107200000000000000e6 +1162 1 23 42 0.65536000000000000000e5 +1162 1 26 41 0.65536000000000000000e5 +1162 1 32 47 -0.13107200000000000000e6 +1162 3 9 38 -0.65536000000000000000e5 +1162 3 28 41 -0.13107200000000000000e6 +1162 4 2 30 -0.65536000000000000000e5 +1163 1 1 48 0.32768000000000000000e5 +1163 1 2 49 0.32768000000000000000e5 +1163 1 8 39 0.65536000000000000000e5 +1163 1 9 40 0.65536000000000000000e5 +1163 1 10 41 -0.13107200000000000000e6 +1163 1 12 43 -0.26214400000000000000e6 +1163 1 23 38 0.32768000000000000000e5 +1163 1 23 43 0.65536000000000000000e5 +1163 1 26 41 -0.65536000000000000000e5 +1163 1 28 43 0.13107200000000000000e6 +1163 1 32 47 0.26214400000000000000e6 +1163 2 2 32 0.32768000000000000000e5 +1163 2 16 30 0.65536000000000000000e5 +1163 2 20 34 0.13107200000000000000e6 +1163 3 9 38 0.65536000000000000000e5 +1163 3 22 35 0.26214400000000000000e6 +1163 3 28 41 0.26214400000000000000e6 +1163 4 2 30 0.65536000000000000000e5 +1163 4 6 34 0.13107200000000000000e6 +1164 1 12 43 -0.13107200000000000000e6 +1164 1 23 44 0.65536000000000000000e5 +1164 1 28 43 0.65536000000000000000e5 +1164 1 32 47 0.65536000000000000000e5 +1164 2 20 34 0.65536000000000000000e5 +1164 3 22 35 0.13107200000000000000e6 +1164 3 28 41 0.65536000000000000000e5 +1164 4 6 34 0.65536000000000000000e5 +1165 1 23 45 0.65536000000000000000e5 +1165 1 32 47 -0.65536000000000000000e5 +1165 3 28 41 -0.65536000000000000000e5 +1166 1 12 43 -0.65536000000000000000e5 +1166 1 23 46 0.65536000000000000000e5 +1166 3 22 35 0.65536000000000000000e5 +1167 1 23 38 -0.65536000000000000000e5 +1167 1 23 47 0.65536000000000000000e5 +1167 3 2 47 0.65536000000000000000e5 +1168 1 2 49 -0.65536000000000000000e5 +1168 1 23 48 0.65536000000000000000e5 +1168 3 24 37 0.65536000000000000000e5 +1169 1 6 53 0.65536000000000000000e5 +1169 1 23 49 0.65536000000000000000e5 +1169 1 24 39 -0.65536000000000000000e5 +1169 1 25 40 -0.65536000000000000000e5 +1169 3 25 38 -0.65536000000000000000e5 +1169 3 27 40 0.13107200000000000000e6 +1169 4 4 32 -0.65536000000000000000e5 +1170 1 6 53 -0.32768000000000000000e5 +1170 1 8 39 -0.65536000000000000000e5 +1170 1 9 40 -0.65536000000000000000e5 +1170 1 10 41 0.13107200000000000000e6 +1170 1 23 50 0.65536000000000000000e5 +1170 1 25 40 0.32768000000000000000e5 +1170 1 26 41 0.65536000000000000000e5 +1170 1 32 47 -0.13107200000000000000e6 +1170 3 9 38 -0.65536000000000000000e5 +1170 3 24 37 -0.32768000000000000000e5 +1170 3 27 40 -0.13107200000000000000e6 +1170 4 2 30 -0.65536000000000000000e5 +1170 4 4 32 0.32768000000000000000e5 +1170 4 16 28 -0.32768000000000000000e5 +1170 4 17 29 -0.65536000000000000000e5 +1171 1 1 48 0.32768000000000000000e5 +1171 1 2 49 0.32768000000000000000e5 +1171 1 6 53 0.32768000000000000000e5 +1171 1 8 39 0.65536000000000000000e5 +1171 1 9 40 0.65536000000000000000e5 +1171 1 10 41 -0.13107200000000000000e6 +1171 1 12 43 -0.26214400000000000000e6 +1171 1 23 38 0.32768000000000000000e5 +1171 1 23 51 0.65536000000000000000e5 +1171 1 25 40 -0.32768000000000000000e5 +1171 1 26 41 -0.65536000000000000000e5 +1171 1 28 43 0.13107200000000000000e6 +1171 1 32 47 0.26214400000000000000e6 +1171 2 2 32 0.32768000000000000000e5 +1171 2 16 30 0.65536000000000000000e5 +1171 2 20 34 0.13107200000000000000e6 +1171 3 9 38 0.65536000000000000000e5 +1171 3 22 35 0.26214400000000000000e6 +1171 3 24 37 0.32768000000000000000e5 +1171 3 27 40 0.65536000000000000000e5 +1171 3 28 41 0.26214400000000000000e6 +1171 4 2 30 0.65536000000000000000e5 +1171 4 4 32 -0.32768000000000000000e5 +1171 4 6 34 0.13107200000000000000e6 +1171 4 16 28 0.32768000000000000000e5 +1172 1 23 52 0.65536000000000000000e5 +1172 1 32 47 -0.65536000000000000000e5 +1173 1 6 53 -0.65536000000000000000e5 +1173 1 8 39 -0.13107200000000000000e6 +1173 1 9 40 -0.13107200000000000000e6 +1173 1 10 41 0.26214400000000000000e6 +1173 1 22 53 0.65536000000000000000e5 +1173 1 23 53 0.65536000000000000000e5 +1173 1 23 54 0.65536000000000000000e5 +1173 1 24 55 0.13107200000000000000e6 +1173 1 25 40 0.65536000000000000000e5 +1173 1 37 52 -0.26214400000000000000e6 +1173 2 26 32 0.65536000000000000000e5 +1173 3 9 38 -0.13107200000000000000e6 +1173 3 22 51 -0.13107200000000000000e6 +1173 3 24 37 -0.65536000000000000000e5 +1173 3 27 40 -0.13107200000000000000e6 +1173 4 2 30 -0.13107200000000000000e6 +1173 4 4 32 0.65536000000000000000e5 +1173 4 16 28 -0.65536000000000000000e5 +1173 4 17 29 -0.13107200000000000000e6 +1173 4 20 32 -0.13107200000000000000e6 +1174 1 1 48 0.32768000000000000000e5 +1174 1 2 49 0.32768000000000000000e5 +1174 1 6 53 0.32768000000000000000e5 +1174 1 8 39 0.65536000000000000000e5 +1174 1 9 40 0.65536000000000000000e5 +1174 1 10 41 -0.13107200000000000000e6 +1174 1 12 43 -0.26214400000000000000e6 +1174 1 23 38 0.32768000000000000000e5 +1174 1 23 55 0.65536000000000000000e5 +1174 1 25 40 -0.32768000000000000000e5 +1174 1 26 41 -0.65536000000000000000e5 +1174 1 28 43 0.13107200000000000000e6 +1174 1 32 47 0.26214400000000000000e6 +1174 2 2 32 0.32768000000000000000e5 +1174 2 16 30 0.65536000000000000000e5 +1174 2 20 34 0.13107200000000000000e6 +1174 3 9 38 0.65536000000000000000e5 +1174 3 22 35 0.26214400000000000000e6 +1174 3 22 51 0.65536000000000000000e5 +1174 3 24 37 0.32768000000000000000e5 +1174 3 27 40 0.65536000000000000000e5 +1174 3 28 41 0.26214400000000000000e6 +1174 4 2 30 0.65536000000000000000e5 +1174 4 4 32 -0.32768000000000000000e5 +1174 4 6 34 0.13107200000000000000e6 +1174 4 16 28 0.32768000000000000000e5 +1175 1 23 56 0.65536000000000000000e5 +1175 1 38 53 -0.65536000000000000000e5 +1176 1 2 49 -0.32768000000000000000e5 +1176 1 24 24 0.65536000000000000000e5 +1176 3 2 39 -0.32768000000000000000e5 +1177 1 6 37 -0.65536000000000000000e5 +1177 1 24 25 0.65536000000000000000e5 +1178 1 1 48 0.65536000000000000000e5 +1178 1 2 49 0.13107200000000000000e6 +1178 1 8 39 0.13107200000000000000e6 +1178 1 9 40 0.13107200000000000000e6 +1178 1 10 41 -0.26214400000000000000e6 +1178 1 12 43 -0.52428800000000000000e6 +1178 1 23 38 0.65536000000000000000e5 +1178 1 24 26 0.65536000000000000000e5 +1178 1 24 39 0.65536000000000000000e5 +1178 1 26 41 -0.13107200000000000000e6 +1178 1 28 43 0.26214400000000000000e6 +1178 1 32 47 0.52428800000000000000e6 +1178 2 2 32 0.65536000000000000000e5 +1178 2 3 33 0.65536000000000000000e5 +1178 2 16 30 0.13107200000000000000e6 +1178 2 20 34 0.26214400000000000000e6 +1178 3 3 40 -0.65536000000000000000e5 +1178 3 9 38 0.13107200000000000000e6 +1178 3 22 35 0.52428800000000000000e6 +1178 3 28 41 0.52428800000000000000e6 +1178 4 2 30 0.13107200000000000000e6 +1178 4 6 34 0.26214400000000000000e6 +1179 1 1 48 -0.32768000000000000000e5 +1179 1 2 49 -0.32768000000000000000e5 +1179 1 23 38 -0.32768000000000000000e5 +1179 1 24 27 0.65536000000000000000e5 +1179 2 2 32 -0.32768000000000000000e5 +1179 3 8 37 -0.65536000000000000000e5 +1180 1 8 39 -0.65536000000000000000e5 +1180 1 24 28 0.65536000000000000000e5 +1181 1 1 48 0.32768000000000000000e5 +1181 1 2 49 0.32768000000000000000e5 +1181 1 8 39 0.65536000000000000000e5 +1181 1 9 40 0.65536000000000000000e5 +1181 1 10 41 -0.13107200000000000000e6 +1181 1 12 43 -0.26214400000000000000e6 +1181 1 23 38 0.32768000000000000000e5 +1181 1 24 29 0.65536000000000000000e5 +1181 1 26 41 -0.65536000000000000000e5 +1181 1 28 43 0.13107200000000000000e6 +1181 1 32 47 0.26214400000000000000e6 +1181 2 2 32 0.32768000000000000000e5 +1181 2 16 30 0.65536000000000000000e5 +1181 2 20 34 0.13107200000000000000e6 +1181 3 22 35 0.26214400000000000000e6 +1181 3 28 41 0.26214400000000000000e6 +1181 4 2 30 0.65536000000000000000e5 +1181 4 6 34 0.13107200000000000000e6 +1182 1 9 40 -0.65536000000000000000e5 +1182 1 24 30 0.65536000000000000000e5 +1183 1 11 42 -0.65536000000000000000e5 +1183 1 12 43 -0.13107200000000000000e6 +1183 1 24 31 0.65536000000000000000e5 +1183 1 28 43 0.65536000000000000000e5 +1183 1 32 47 0.65536000000000000000e5 +1183 1 33 48 0.65536000000000000000e5 +1183 2 12 26 0.65536000000000000000e5 +1183 3 13 42 0.13107200000000000000e6 +1183 3 28 41 0.65536000000000000000e5 +1183 3 29 42 0.65536000000000000000e5 +1183 4 3 31 -0.65536000000000000000e5 +1184 1 10 41 -0.65536000000000000000e5 +1184 1 24 32 0.65536000000000000000e5 +1185 1 10 41 0.65536000000000000000e5 +1185 1 11 42 0.65536000000000000000e5 +1185 1 24 33 0.65536000000000000000e5 +1185 1 28 43 -0.65536000000000000000e5 +1185 1 32 47 -0.65536000000000000000e5 +1185 1 33 48 -0.65536000000000000000e5 +1185 3 13 42 -0.13107200000000000000e6 +1185 3 28 41 -0.65536000000000000000e5 +1185 3 29 42 -0.65536000000000000000e5 +1185 4 3 31 0.65536000000000000000e5 +1186 1 12 43 -0.65536000000000000000e5 +1186 1 24 34 0.65536000000000000000e5 +1187 1 17 48 -0.65536000000000000000e5 +1187 1 24 35 0.65536000000000000000e5 +1187 3 13 42 -0.65536000000000000000e5 +1188 1 4 35 -0.32768000000000000000e5 +1188 1 12 43 -0.32768000000000000000e5 +1188 1 14 45 -0.65536000000000000000e5 +1188 1 17 48 0.32768000000000000000e5 +1188 1 18 49 0.32768000000000000000e5 +1188 1 24 36 0.65536000000000000000e5 +1188 2 9 23 -0.32768000000000000000e5 +1188 2 14 28 0.32768000000000000000e5 +1188 3 5 34 -0.32768000000000000000e5 +1188 3 13 42 0.32768000000000000000e5 +1188 3 14 27 -0.32768000000000000000e5 +1188 3 14 43 0.32768000000000000000e5 +1188 3 16 29 0.65536000000000000000e5 +1189 1 23 38 -0.65536000000000000000e5 +1189 1 24 37 0.65536000000000000000e5 +1190 1 2 49 -0.65536000000000000000e5 +1190 1 24 38 0.65536000000000000000e5 +1191 1 1 48 0.65536000000000000000e5 +1191 1 2 49 0.13107200000000000000e6 +1191 1 8 39 0.13107200000000000000e6 +1191 1 9 40 0.13107200000000000000e6 +1191 1 10 41 -0.26214400000000000000e6 +1191 1 12 43 -0.52428800000000000000e6 +1191 1 23 38 0.65536000000000000000e5 +1191 1 24 39 0.65536000000000000000e5 +1191 1 24 40 0.65536000000000000000e5 +1191 1 26 41 -0.13107200000000000000e6 +1191 1 28 43 0.26214400000000000000e6 +1191 1 32 47 0.52428800000000000000e6 +1191 2 2 32 0.65536000000000000000e5 +1191 2 3 33 0.65536000000000000000e5 +1191 2 16 30 0.13107200000000000000e6 +1191 2 20 34 0.26214400000000000000e6 +1191 3 9 38 0.13107200000000000000e6 +1191 3 22 35 0.52428800000000000000e6 +1191 3 28 41 0.52428800000000000000e6 +1191 4 2 30 0.13107200000000000000e6 +1191 4 6 34 0.26214400000000000000e6 +1192 1 8 39 -0.65536000000000000000e5 +1192 1 9 40 -0.65536000000000000000e5 +1192 1 10 41 0.13107200000000000000e6 +1192 1 24 41 0.65536000000000000000e5 +1192 1 26 41 0.65536000000000000000e5 +1192 1 32 47 -0.13107200000000000000e6 +1192 3 9 38 -0.65536000000000000000e5 +1192 3 28 41 -0.13107200000000000000e6 +1192 4 2 30 -0.65536000000000000000e5 +1193 1 1 48 0.32768000000000000000e5 +1193 1 2 49 0.32768000000000000000e5 +1193 1 8 39 0.65536000000000000000e5 +1193 1 9 40 0.65536000000000000000e5 +1193 1 10 41 -0.13107200000000000000e6 +1193 1 12 43 -0.26214400000000000000e6 +1193 1 23 38 0.32768000000000000000e5 +1193 1 24 42 0.65536000000000000000e5 +1193 1 26 41 -0.65536000000000000000e5 +1193 1 28 43 0.13107200000000000000e6 +1193 1 32 47 0.26214400000000000000e6 +1193 2 2 32 0.32768000000000000000e5 +1193 2 16 30 0.65536000000000000000e5 +1193 2 20 34 0.13107200000000000000e6 +1193 3 9 38 0.65536000000000000000e5 +1193 3 22 35 0.26214400000000000000e6 +1193 3 28 41 0.26214400000000000000e6 +1193 4 2 30 0.65536000000000000000e5 +1193 4 6 34 0.13107200000000000000e6 +1194 1 24 43 0.65536000000000000000e5 +1194 1 26 41 -0.65536000000000000000e5 +1195 1 24 44 0.65536000000000000000e5 +1195 1 32 47 -0.65536000000000000000e5 +1195 3 28 41 -0.65536000000000000000e5 +1196 1 24 45 0.65536000000000000000e5 +1196 1 28 43 -0.65536000000000000000e5 +1197 1 17 48 -0.65536000000000000000e5 +1197 1 24 46 0.65536000000000000000e5 +1198 1 2 49 -0.65536000000000000000e5 +1198 1 24 47 0.65536000000000000000e5 +1198 3 24 37 0.65536000000000000000e5 +1199 1 6 53 0.65536000000000000000e5 +1199 1 24 39 -0.65536000000000000000e5 +1199 1 24 48 0.65536000000000000000e5 +1199 1 25 40 -0.65536000000000000000e5 +1199 3 25 38 -0.65536000000000000000e5 +1199 3 27 40 0.13107200000000000000e6 +1199 4 4 32 -0.65536000000000000000e5 +1200 1 1 48 0.65536000000000000000e5 +1200 1 2 49 0.13107200000000000000e6 +1200 1 8 39 0.13107200000000000000e6 +1200 1 9 40 0.13107200000000000000e6 +1200 1 10 41 -0.26214400000000000000e6 +1200 1 12 43 -0.52428800000000000000e6 +1200 1 23 38 0.65536000000000000000e5 +1200 1 24 39 0.65536000000000000000e5 +1200 1 24 49 0.65536000000000000000e5 +1200 1 26 41 -0.13107200000000000000e6 +1200 1 28 43 0.26214400000000000000e6 +1200 1 32 47 0.52428800000000000000e6 +1200 2 2 32 0.65536000000000000000e5 +1200 2 3 33 0.65536000000000000000e5 +1200 2 16 30 0.13107200000000000000e6 +1200 2 20 34 0.26214400000000000000e6 +1200 3 9 38 0.13107200000000000000e6 +1200 3 22 35 0.52428800000000000000e6 +1200 3 25 38 0.65536000000000000000e5 +1200 3 28 41 0.52428800000000000000e6 +1200 4 2 30 0.13107200000000000000e6 +1200 4 6 34 0.26214400000000000000e6 +1201 1 1 48 0.32768000000000000000e5 +1201 1 2 49 0.32768000000000000000e5 +1201 1 6 53 0.32768000000000000000e5 +1201 1 8 39 0.65536000000000000000e5 +1201 1 9 40 0.65536000000000000000e5 +1201 1 10 41 -0.13107200000000000000e6 +1201 1 12 43 -0.26214400000000000000e6 +1201 1 23 38 0.32768000000000000000e5 +1201 1 24 50 0.65536000000000000000e5 +1201 1 25 40 -0.32768000000000000000e5 +1201 1 26 41 -0.65536000000000000000e5 +1201 1 28 43 0.13107200000000000000e6 +1201 1 32 47 0.26214400000000000000e6 +1201 2 2 32 0.32768000000000000000e5 +1201 2 16 30 0.65536000000000000000e5 +1201 2 20 34 0.13107200000000000000e6 +1201 3 9 38 0.65536000000000000000e5 +1201 3 22 35 0.26214400000000000000e6 +1201 3 24 37 0.32768000000000000000e5 +1201 3 27 40 0.65536000000000000000e5 +1201 3 28 41 0.26214400000000000000e6 +1201 4 2 30 0.65536000000000000000e5 +1201 4 4 32 -0.32768000000000000000e5 +1201 4 6 34 0.13107200000000000000e6 +1201 4 16 28 0.32768000000000000000e5 +1202 1 24 51 0.65536000000000000000e5 +1202 1 26 41 -0.65536000000000000000e5 +1202 3 27 40 0.65536000000000000000e5 +1203 1 6 53 0.16384000000000000000e5 +1203 1 24 52 0.65536000000000000000e5 +1203 1 25 40 -0.16384000000000000000e5 +1203 1 28 43 -0.65536000000000000000e5 +1203 2 4 34 0.32768000000000000000e5 +1203 2 21 35 -0.32768000000000000000e5 +1203 3 5 50 0.32768000000000000000e5 +1203 3 24 37 0.16384000000000000000e5 +1203 3 27 40 0.65536000000000000000e5 +1203 4 4 32 -0.16384000000000000000e5 +1203 4 7 35 -0.32768000000000000000e5 +1203 4 16 28 0.16384000000000000000e5 +1204 1 23 54 -0.65536000000000000000e5 +1204 1 24 53 0.65536000000000000000e5 +1205 1 24 54 0.65536000000000000000e5 +1205 1 40 47 -0.65536000000000000000e5 +1206 1 24 56 0.65536000000000000000e5 +1206 1 40 47 -0.65536000000000000000e5 +1206 3 24 53 0.65536000000000000000e5 +1207 1 1 48 0.32768000000000000000e5 +1207 1 2 49 0.65536000000000000000e5 +1207 1 8 39 0.65536000000000000000e5 +1207 1 9 40 0.65536000000000000000e5 +1207 1 10 41 -0.13107200000000000000e6 +1207 1 12 43 -0.26214400000000000000e6 +1207 1 23 38 0.32768000000000000000e5 +1207 1 24 39 0.32768000000000000000e5 +1207 1 25 25 0.65536000000000000000e5 +1207 1 26 41 -0.65536000000000000000e5 +1207 1 28 43 0.13107200000000000000e6 +1207 1 32 47 0.26214400000000000000e6 +1207 2 2 32 0.32768000000000000000e5 +1207 2 3 33 0.32768000000000000000e5 +1207 2 16 30 0.65536000000000000000e5 +1207 2 20 34 0.13107200000000000000e6 +1207 3 3 40 -0.32768000000000000000e5 +1207 3 9 38 0.65536000000000000000e5 +1207 3 22 35 0.26214400000000000000e6 +1207 3 28 41 0.26214400000000000000e6 +1207 4 2 30 0.65536000000000000000e5 +1207 4 6 34 0.13107200000000000000e6 +1208 1 1 48 -0.65536000000000000000e5 +1208 1 2 49 -0.13107200000000000000e6 +1208 1 6 37 0.65536000000000000000e5 +1208 1 8 39 -0.13107200000000000000e6 +1208 1 9 40 -0.26214400000000000000e6 +1208 1 10 41 0.26214400000000000000e6 +1208 1 12 43 0.52428800000000000000e6 +1208 1 23 38 -0.65536000000000000000e5 +1208 1 24 39 -0.65536000000000000000e5 +1208 1 25 26 0.65536000000000000000e5 +1208 1 26 41 0.13107200000000000000e6 +1208 1 28 43 -0.26214400000000000000e6 +1208 1 32 47 -0.52428800000000000000e6 +1208 2 2 32 -0.65536000000000000000e5 +1208 2 3 33 -0.65536000000000000000e5 +1208 2 5 27 0.65536000000000000000e5 +1208 2 16 30 -0.13107200000000000000e6 +1208 2 20 34 -0.26214400000000000000e6 +1208 3 3 40 0.65536000000000000000e5 +1208 3 9 38 -0.13107200000000000000e6 +1208 3 22 35 -0.52428800000000000000e6 +1208 3 28 41 -0.52428800000000000000e6 +1208 4 2 30 -0.13107200000000000000e6 +1208 4 6 34 -0.26214400000000000000e6 +1209 1 8 39 -0.65536000000000000000e5 +1209 1 25 27 0.65536000000000000000e5 +1210 1 1 48 0.32768000000000000000e5 +1210 1 2 49 0.32768000000000000000e5 +1210 1 8 39 0.65536000000000000000e5 +1210 1 9 40 0.65536000000000000000e5 +1210 1 10 41 -0.13107200000000000000e6 +1210 1 12 43 -0.26214400000000000000e6 +1210 1 23 38 0.32768000000000000000e5 +1210 1 25 28 0.65536000000000000000e5 +1210 1 26 41 -0.65536000000000000000e5 +1210 1 28 43 0.13107200000000000000e6 +1210 1 32 47 0.26214400000000000000e6 +1210 2 2 32 0.32768000000000000000e5 +1210 2 16 30 0.65536000000000000000e5 +1210 2 20 34 0.13107200000000000000e6 +1210 3 22 35 0.26214400000000000000e6 +1210 3 28 41 0.26214400000000000000e6 +1210 4 2 30 0.65536000000000000000e5 +1210 4 6 34 0.13107200000000000000e6 +1211 1 9 40 -0.65536000000000000000e5 +1211 1 25 29 0.65536000000000000000e5 +1212 1 1 48 -0.32768000000000000000e5 +1212 1 2 49 -0.32768000000000000000e5 +1212 1 8 39 -0.65536000000000000000e5 +1212 1 9 40 -0.65536000000000000000e5 +1212 1 10 41 0.13107200000000000000e6 +1212 1 12 43 0.26214400000000000000e6 +1212 1 23 38 -0.32768000000000000000e5 +1212 1 25 30 0.65536000000000000000e5 +1212 1 26 41 0.13107200000000000000e6 +1212 1 28 43 -0.26214400000000000000e6 +1212 1 32 47 -0.26214400000000000000e6 +1212 2 2 32 -0.32768000000000000000e5 +1212 2 4 34 0.65536000000000000000e5 +1212 2 16 30 -0.65536000000000000000e5 +1212 2 20 34 -0.13107200000000000000e6 +1212 3 9 38 -0.65536000000000000000e5 +1212 3 10 39 -0.65536000000000000000e5 +1212 3 22 35 -0.26214400000000000000e6 +1212 3 28 41 -0.26214400000000000000e6 +1212 4 2 30 -0.65536000000000000000e5 +1212 4 6 34 -0.13107200000000000000e6 +1213 1 10 41 -0.65536000000000000000e5 +1213 1 25 31 0.65536000000000000000e5 +1214 1 10 41 0.65536000000000000000e5 +1214 1 11 42 0.65536000000000000000e5 +1214 1 25 32 0.65536000000000000000e5 +1214 1 28 43 -0.65536000000000000000e5 +1214 1 32 47 -0.65536000000000000000e5 +1214 1 33 48 -0.65536000000000000000e5 +1214 3 13 42 -0.13107200000000000000e6 +1214 3 28 41 -0.65536000000000000000e5 +1214 3 29 42 -0.65536000000000000000e5 +1214 4 3 31 0.65536000000000000000e5 +1215 1 11 42 -0.65536000000000000000e5 +1215 1 25 33 0.65536000000000000000e5 +1216 1 17 48 -0.65536000000000000000e5 +1216 1 25 34 0.65536000000000000000e5 +1216 3 13 42 -0.65536000000000000000e5 +1217 1 14 45 -0.13107200000000000000e6 +1217 1 17 48 0.65536000000000000000e5 +1217 1 18 49 0.65536000000000000000e5 +1217 1 25 35 0.65536000000000000000e5 +1217 2 14 28 0.65536000000000000000e5 +1217 3 13 42 0.65536000000000000000e5 +1217 3 14 43 0.65536000000000000000e5 +1218 1 14 45 -0.65536000000000000000e5 +1218 1 25 36 0.65536000000000000000e5 +1219 1 2 49 -0.65536000000000000000e5 +1219 1 25 37 0.65536000000000000000e5 +1220 1 24 39 -0.65536000000000000000e5 +1220 1 25 38 0.65536000000000000000e5 +1221 1 1 48 0.65536000000000000000e5 +1221 1 2 49 0.13107200000000000000e6 +1221 1 8 39 0.13107200000000000000e6 +1221 1 9 40 0.13107200000000000000e6 +1221 1 10 41 -0.26214400000000000000e6 +1221 1 12 43 -0.52428800000000000000e6 +1221 1 23 38 0.65536000000000000000e5 +1221 1 24 39 0.65536000000000000000e5 +1221 1 25 39 0.65536000000000000000e5 +1221 1 26 41 -0.13107200000000000000e6 +1221 1 28 43 0.26214400000000000000e6 +1221 1 32 47 0.52428800000000000000e6 +1221 2 2 32 0.65536000000000000000e5 +1221 2 3 33 0.65536000000000000000e5 +1221 2 16 30 0.13107200000000000000e6 +1221 2 20 34 0.26214400000000000000e6 +1221 3 9 38 0.13107200000000000000e6 +1221 3 22 35 0.52428800000000000000e6 +1221 3 28 41 0.52428800000000000000e6 +1221 4 2 30 0.13107200000000000000e6 +1221 4 6 34 0.26214400000000000000e6 +1222 1 1 48 0.32768000000000000000e5 +1222 1 2 49 0.32768000000000000000e5 +1222 1 8 39 0.65536000000000000000e5 +1222 1 9 40 0.65536000000000000000e5 +1222 1 10 41 -0.13107200000000000000e6 +1222 1 12 43 -0.26214400000000000000e6 +1222 1 23 38 0.32768000000000000000e5 +1222 1 25 41 0.65536000000000000000e5 +1222 1 26 41 -0.65536000000000000000e5 +1222 1 28 43 0.13107200000000000000e6 +1222 1 32 47 0.26214400000000000000e6 +1222 2 2 32 0.32768000000000000000e5 +1222 2 16 30 0.65536000000000000000e5 +1222 2 20 34 0.13107200000000000000e6 +1222 3 9 38 0.65536000000000000000e5 +1222 3 22 35 0.26214400000000000000e6 +1222 3 28 41 0.26214400000000000000e6 +1222 4 2 30 0.65536000000000000000e5 +1222 4 6 34 0.13107200000000000000e6 +1223 1 25 42 0.65536000000000000000e5 +1223 1 26 41 -0.65536000000000000000e5 +1224 1 1 48 -0.32768000000000000000e5 +1224 1 2 49 -0.32768000000000000000e5 +1224 1 8 39 -0.65536000000000000000e5 +1224 1 9 40 -0.65536000000000000000e5 +1224 1 10 41 0.13107200000000000000e6 +1224 1 12 43 0.26214400000000000000e6 +1224 1 23 38 -0.32768000000000000000e5 +1224 1 25 43 0.65536000000000000000e5 +1224 1 26 41 0.13107200000000000000e6 +1224 1 28 43 -0.26214400000000000000e6 +1224 1 32 47 -0.26214400000000000000e6 +1224 2 2 32 -0.32768000000000000000e5 +1224 2 4 34 0.65536000000000000000e5 +1224 2 16 30 -0.65536000000000000000e5 +1224 2 20 34 -0.13107200000000000000e6 +1224 3 9 38 -0.65536000000000000000e5 +1224 3 22 35 -0.26214400000000000000e6 +1224 3 28 41 -0.26214400000000000000e6 +1224 4 2 30 -0.65536000000000000000e5 +1224 4 6 34 -0.13107200000000000000e6 +1225 1 25 44 0.65536000000000000000e5 +1225 1 28 43 -0.65536000000000000000e5 +1226 1 25 45 0.65536000000000000000e5 +1226 1 33 48 -0.65536000000000000000e5 +1226 3 29 42 -0.65536000000000000000e5 +1227 1 25 46 0.65536000000000000000e5 +1227 1 34 49 -0.65536000000000000000e5 +1227 3 18 47 -0.65536000000000000000e5 +1228 1 6 53 0.65536000000000000000e5 +1228 1 24 39 -0.65536000000000000000e5 +1228 1 25 40 -0.65536000000000000000e5 +1228 1 25 47 0.65536000000000000000e5 +1228 3 25 38 -0.65536000000000000000e5 +1228 3 27 40 0.13107200000000000000e6 +1228 4 4 32 -0.65536000000000000000e5 +1229 1 1 48 0.65536000000000000000e5 +1229 1 2 49 0.13107200000000000000e6 +1229 1 8 39 0.13107200000000000000e6 +1229 1 9 40 0.13107200000000000000e6 +1229 1 10 41 -0.26214400000000000000e6 +1229 1 12 43 -0.52428800000000000000e6 +1229 1 23 38 0.65536000000000000000e5 +1229 1 24 39 0.65536000000000000000e5 +1229 1 25 48 0.65536000000000000000e5 +1229 1 26 41 -0.13107200000000000000e6 +1229 1 28 43 0.26214400000000000000e6 +1229 1 32 47 0.52428800000000000000e6 +1229 2 2 32 0.65536000000000000000e5 +1229 2 3 33 0.65536000000000000000e5 +1229 2 16 30 0.13107200000000000000e6 +1229 2 20 34 0.26214400000000000000e6 +1229 3 9 38 0.13107200000000000000e6 +1229 3 22 35 0.52428800000000000000e6 +1229 3 25 38 0.65536000000000000000e5 +1229 3 28 41 0.52428800000000000000e6 +1229 4 2 30 0.13107200000000000000e6 +1229 4 6 34 0.26214400000000000000e6 +1230 1 6 53 -0.65536000000000000000e5 +1230 1 25 49 0.65536000000000000000e5 +1231 1 25 50 0.65536000000000000000e5 +1231 1 26 41 -0.65536000000000000000e5 +1231 3 27 40 0.65536000000000000000e5 +1232 1 1 48 -0.32768000000000000000e5 +1232 1 2 49 -0.32768000000000000000e5 +1232 1 8 39 -0.65536000000000000000e5 +1232 1 9 40 -0.65536000000000000000e5 +1232 1 10 41 0.13107200000000000000e6 +1232 1 12 43 0.26214400000000000000e6 +1232 1 23 38 -0.32768000000000000000e5 +1232 1 25 51 0.65536000000000000000e5 +1232 1 26 41 0.13107200000000000000e6 +1232 1 28 43 -0.26214400000000000000e6 +1232 1 32 47 -0.26214400000000000000e6 +1232 2 2 32 -0.32768000000000000000e5 +1232 2 4 34 0.65536000000000000000e5 +1232 2 16 30 -0.65536000000000000000e5 +1232 2 20 34 -0.13107200000000000000e6 +1232 3 5 50 0.65536000000000000000e5 +1232 3 9 38 -0.65536000000000000000e5 +1232 3 22 35 -0.26214400000000000000e6 +1232 3 28 41 -0.26214400000000000000e6 +1232 4 2 30 -0.65536000000000000000e5 +1232 4 6 34 -0.13107200000000000000e6 +1233 1 25 52 0.65536000000000000000e5 +1233 1 33 48 -0.65536000000000000000e5 +1234 1 25 53 0.65536000000000000000e5 +1234 1 40 47 -0.65536000000000000000e5 +1235 1 25 54 0.65536000000000000000e5 +1235 1 25 56 -0.65536000000000000000e5 +1235 3 24 53 0.65536000000000000000e5 +1235 3 25 54 0.65536000000000000000e5 +1235 3 38 51 -0.13107200000000000000e6 +1235 4 28 32 0.65536000000000000000e5 +1236 1 1 48 -0.32768000000000000000e5 +1236 1 2 49 -0.32768000000000000000e5 +1236 1 8 39 -0.65536000000000000000e5 +1236 1 9 40 -0.65536000000000000000e5 +1236 1 10 41 0.13107200000000000000e6 +1236 1 12 43 0.26214400000000000000e6 +1236 1 23 38 -0.32768000000000000000e5 +1236 1 24 55 0.65536000000000000000e5 +1236 1 25 55 0.65536000000000000000e5 +1236 1 26 41 0.65536000000000000000e5 +1236 1 28 43 -0.26214400000000000000e6 +1236 1 32 47 -0.26214400000000000000e6 +1236 2 2 32 -0.32768000000000000000e5 +1236 2 4 34 0.65536000000000000000e5 +1236 2 16 30 -0.65536000000000000000e5 +1236 2 20 34 -0.13107200000000000000e6 +1236 3 5 50 0.65536000000000000000e5 +1236 3 9 38 -0.65536000000000000000e5 +1236 3 22 35 -0.26214400000000000000e6 +1236 3 22 51 -0.65536000000000000000e5 +1236 3 23 52 0.13107200000000000000e6 +1236 3 27 40 0.65536000000000000000e5 +1236 3 28 41 -0.26214400000000000000e6 +1236 4 2 30 -0.65536000000000000000e5 +1236 4 6 34 -0.13107200000000000000e6 +1236 4 7 35 -0.65536000000000000000e5 +1237 1 1 40 -0.32768000000000000000e5 +1237 1 1 48 -0.32768000000000000000e5 +1237 1 2 33 0.26214400000000000000e6 +1237 1 2 49 -0.32768000000000000000e5 +1237 1 6 37 -0.32768000000000000000e5 +1237 1 8 39 -0.65536000000000000000e5 +1237 1 9 40 -0.13107200000000000000e6 +1237 1 10 25 0.13107200000000000000e6 +1237 1 10 41 0.13107200000000000000e6 +1237 1 11 42 -0.26214400000000000000e6 +1237 1 12 43 -0.26214400000000000000e6 +1237 1 26 26 0.65536000000000000000e5 +1237 1 26 41 0.13107200000000000000e6 +1237 1 33 48 0.26214400000000000000e6 +1237 2 3 17 -0.32768000000000000000e5 +1237 2 4 34 0.65536000000000000000e5 +1237 2 5 19 0.32768000000000000000e5 +1237 2 5 27 -0.32768000000000000000e5 +1237 2 12 26 0.26214400000000000000e6 +1237 2 16 30 -0.65536000000000000000e5 +1237 2 20 34 -0.13107200000000000000e6 +1237 3 1 30 -0.13107200000000000000e6 +1237 3 1 38 -0.32768000000000000000e5 +1237 3 2 23 -0.32768000000000000000e5 +1237 3 2 39 -0.32768000000000000000e5 +1237 3 3 32 0.13107200000000000000e6 +1237 3 5 26 0.32768000000000000000e5 +1237 3 8 37 0.65536000000000000000e5 +1237 3 9 38 -0.65536000000000000000e5 +1237 3 10 39 -0.65536000000000000000e5 +1237 3 13 42 0.52428800000000000000e6 +1237 3 14 27 -0.26214400000000000000e6 +1237 3 22 35 -0.26214400000000000000e6 +1237 3 29 42 0.26214400000000000000e6 +1237 4 2 30 -0.65536000000000000000e5 +1237 4 3 31 -0.26214400000000000000e6 +1237 4 4 16 0.32768000000000000000e5 +1237 4 5 17 -0.32768000000000000000e5 +1237 4 6 18 -0.65536000000000000000e5 +1237 4 6 34 -0.13107200000000000000e6 +1237 4 7 19 0.65536000000000000000e5 +1237 4 8 20 0.13107200000000000000e6 +1238 1 1 48 0.32768000000000000000e5 +1238 1 2 49 0.32768000000000000000e5 +1238 1 8 39 0.65536000000000000000e5 +1238 1 9 40 0.65536000000000000000e5 +1238 1 10 41 -0.13107200000000000000e6 +1238 1 12 43 -0.26214400000000000000e6 +1238 1 23 38 0.32768000000000000000e5 +1238 1 26 27 0.65536000000000000000e5 +1238 1 26 41 -0.65536000000000000000e5 +1238 1 28 43 0.13107200000000000000e6 +1238 1 32 47 0.26214400000000000000e6 +1238 2 2 32 0.32768000000000000000e5 +1238 2 16 30 0.65536000000000000000e5 +1238 2 20 34 0.13107200000000000000e6 +1238 3 22 35 0.26214400000000000000e6 +1238 3 28 41 0.26214400000000000000e6 +1238 4 2 30 0.65536000000000000000e5 +1238 4 6 34 0.13107200000000000000e6 +1239 1 9 40 -0.65536000000000000000e5 +1239 1 26 28 0.65536000000000000000e5 +1240 1 1 48 -0.32768000000000000000e5 +1240 1 2 49 -0.32768000000000000000e5 +1240 1 8 39 -0.65536000000000000000e5 +1240 1 9 40 -0.65536000000000000000e5 +1240 1 10 41 0.13107200000000000000e6 +1240 1 12 43 0.26214400000000000000e6 +1240 1 23 38 -0.32768000000000000000e5 +1240 1 26 29 0.65536000000000000000e5 +1240 1 26 41 0.13107200000000000000e6 +1240 1 28 43 -0.26214400000000000000e6 +1240 1 32 47 -0.26214400000000000000e6 +1240 2 2 32 -0.32768000000000000000e5 +1240 2 4 34 0.65536000000000000000e5 +1240 2 16 30 -0.65536000000000000000e5 +1240 2 20 34 -0.13107200000000000000e6 +1240 3 9 38 -0.65536000000000000000e5 +1240 3 10 39 -0.65536000000000000000e5 +1240 3 22 35 -0.26214400000000000000e6 +1240 3 28 41 -0.26214400000000000000e6 +1240 4 2 30 -0.65536000000000000000e5 +1240 4 6 34 -0.13107200000000000000e6 +1241 1 1 48 0.32768000000000000000e5 +1241 1 2 49 0.32768000000000000000e5 +1241 1 8 39 0.65536000000000000000e5 +1241 1 9 40 0.13107200000000000000e6 +1241 1 10 41 -0.13107200000000000000e6 +1241 1 11 42 -0.13107200000000000000e6 +1241 1 12 43 -0.26214400000000000000e6 +1241 1 23 38 0.32768000000000000000e5 +1241 1 26 30 0.65536000000000000000e5 +1241 1 26 41 -0.13107200000000000000e6 +1241 1 28 43 0.26214400000000000000e6 +1241 1 32 47 0.26214400000000000000e6 +1241 2 2 32 0.32768000000000000000e5 +1241 2 4 34 -0.65536000000000000000e5 +1241 2 16 30 0.65536000000000000000e5 +1241 2 20 34 0.13107200000000000000e6 +1241 2 28 34 0.65536000000000000000e5 +1241 3 9 38 0.65536000000000000000e5 +1241 3 10 39 0.65536000000000000000e5 +1241 3 22 35 0.26214400000000000000e6 +1241 3 28 41 0.26214400000000000000e6 +1241 4 2 30 0.65536000000000000000e5 +1241 4 6 34 0.13107200000000000000e6 +1241 4 18 22 0.65536000000000000000e5 +1241 4 18 30 0.65536000000000000000e5 +1241 4 21 33 0.65536000000000000000e5 +1242 1 10 41 0.65536000000000000000e5 +1242 1 11 42 0.65536000000000000000e5 +1242 1 26 31 0.65536000000000000000e5 +1242 1 28 43 -0.65536000000000000000e5 +1242 1 32 47 -0.65536000000000000000e5 +1242 1 33 48 -0.65536000000000000000e5 +1242 3 13 42 -0.13107200000000000000e6 +1242 3 28 41 -0.65536000000000000000e5 +1242 3 29 42 -0.65536000000000000000e5 +1242 4 3 31 0.65536000000000000000e5 +1243 1 11 42 -0.65536000000000000000e5 +1243 1 26 32 0.65536000000000000000e5 +1244 1 14 45 -0.13107200000000000000e6 +1244 1 17 48 0.65536000000000000000e5 +1244 1 18 49 0.65536000000000000000e5 +1244 1 26 34 0.65536000000000000000e5 +1244 2 14 28 0.65536000000000000000e5 +1244 3 13 42 0.65536000000000000000e5 +1244 3 14 43 0.65536000000000000000e5 +1245 1 18 49 -0.65536000000000000000e5 +1245 1 26 35 0.65536000000000000000e5 +1245 3 14 43 -0.65536000000000000000e5 +1246 1 11 18 -0.65536000000000000000e5 +1246 1 26 36 0.65536000000000000000e5 +1246 3 6 19 0.65536000000000000000e5 +1246 3 17 30 0.65536000000000000000e5 +1247 1 24 39 -0.65536000000000000000e5 +1247 1 26 37 0.65536000000000000000e5 +1248 1 1 48 0.65536000000000000000e5 +1248 1 2 49 0.13107200000000000000e6 +1248 1 8 39 0.13107200000000000000e6 +1248 1 9 40 0.13107200000000000000e6 +1248 1 10 41 -0.26214400000000000000e6 +1248 1 12 43 -0.52428800000000000000e6 +1248 1 23 38 0.65536000000000000000e5 +1248 1 24 39 0.65536000000000000000e5 +1248 1 26 38 0.65536000000000000000e5 +1248 1 26 41 -0.13107200000000000000e6 +1248 1 28 43 0.26214400000000000000e6 +1248 1 32 47 0.52428800000000000000e6 +1248 2 2 32 0.65536000000000000000e5 +1248 2 3 33 0.65536000000000000000e5 +1248 2 16 30 0.13107200000000000000e6 +1248 2 20 34 0.26214400000000000000e6 +1248 3 9 38 0.13107200000000000000e6 +1248 3 22 35 0.52428800000000000000e6 +1248 3 28 41 0.52428800000000000000e6 +1248 4 2 30 0.13107200000000000000e6 +1248 4 6 34 0.26214400000000000000e6 +1249 1 25 40 -0.65536000000000000000e5 +1249 1 26 39 0.65536000000000000000e5 +1250 1 1 48 -0.13107200000000000000e6 +1250 1 2 49 -0.19660800000000000000e6 +1250 1 6 53 0.65536000000000000000e5 +1250 1 8 39 -0.26214400000000000000e6 +1250 1 9 40 -0.26214400000000000000e6 +1250 1 10 41 0.52428800000000000000e6 +1250 1 12 43 0.10485760000000000000e7 +1250 1 23 38 -0.13107200000000000000e6 +1250 1 24 39 -0.65536000000000000000e5 +1250 1 26 40 0.65536000000000000000e5 +1250 1 26 41 0.39321600000000000000e6 +1250 1 28 43 -0.78643200000000000000e6 +1250 1 32 47 -0.10485760000000000000e7 +1250 2 2 32 -0.13107200000000000000e6 +1250 2 3 33 -0.65536000000000000000e5 +1250 2 4 34 0.13107200000000000000e6 +1250 2 5 35 0.65536000000000000000e5 +1250 2 16 30 -0.26214400000000000000e6 +1250 2 20 34 -0.52428800000000000000e6 +1250 3 5 50 0.13107200000000000000e6 +1250 3 9 38 -0.26214400000000000000e6 +1250 3 22 35 -0.10485760000000000000e7 +1250 3 25 38 -0.65536000000000000000e5 +1250 3 26 39 -0.65536000000000000000e5 +1250 3 28 41 -0.10485760000000000000e7 +1250 4 2 30 -0.26214400000000000000e6 +1250 4 6 34 -0.52428800000000000000e6 +1251 1 1 48 -0.32768000000000000000e5 +1251 1 2 49 -0.32768000000000000000e5 +1251 1 8 39 -0.65536000000000000000e5 +1251 1 9 40 -0.65536000000000000000e5 +1251 1 10 41 0.13107200000000000000e6 +1251 1 12 43 0.26214400000000000000e6 +1251 1 23 38 -0.32768000000000000000e5 +1251 1 26 41 0.13107200000000000000e6 +1251 1 26 42 0.65536000000000000000e5 +1251 1 28 43 -0.26214400000000000000e6 +1251 1 32 47 -0.26214400000000000000e6 +1251 2 2 32 -0.32768000000000000000e5 +1251 2 4 34 0.65536000000000000000e5 +1251 2 16 30 -0.65536000000000000000e5 +1251 2 20 34 -0.13107200000000000000e6 +1251 3 9 38 -0.65536000000000000000e5 +1251 3 22 35 -0.26214400000000000000e6 +1251 3 28 41 -0.26214400000000000000e6 +1251 4 2 30 -0.65536000000000000000e5 +1251 4 6 34 -0.13107200000000000000e6 +1252 1 1 48 0.32768000000000000000e5 +1252 1 2 49 0.32768000000000000000e5 +1252 1 8 39 0.65536000000000000000e5 +1252 1 9 40 0.65536000000000000000e5 +1252 1 10 41 -0.13107200000000000000e6 +1252 1 12 43 -0.26214400000000000000e6 +1252 1 23 38 0.32768000000000000000e5 +1252 1 26 41 -0.65536000000000000000e5 +1252 1 26 43 0.65536000000000000000e5 +1252 1 28 43 0.26214400000000000000e6 +1252 1 32 47 0.26214400000000000000e6 +1252 1 33 48 -0.13107200000000000000e6 +1252 2 2 32 0.32768000000000000000e5 +1252 2 4 34 -0.65536000000000000000e5 +1252 2 16 30 0.65536000000000000000e5 +1252 2 20 34 0.13107200000000000000e6 +1252 2 28 34 0.65536000000000000000e5 +1252 3 9 38 0.65536000000000000000e5 +1252 3 22 35 0.26214400000000000000e6 +1252 3 28 41 0.26214400000000000000e6 +1252 3 29 42 -0.13107200000000000000e6 +1252 4 2 30 0.65536000000000000000e5 +1252 4 6 34 0.13107200000000000000e6 +1252 4 18 30 0.65536000000000000000e5 +1252 4 21 33 0.65536000000000000000e5 +1253 1 26 44 0.65536000000000000000e5 +1253 1 33 48 -0.65536000000000000000e5 +1253 3 29 42 -0.65536000000000000000e5 +1254 1 26 45 0.65536000000000000000e5 +1254 1 33 40 -0.65536000000000000000e5 +1255 1 18 49 -0.65536000000000000000e5 +1255 1 26 46 0.65536000000000000000e5 +1256 1 1 48 0.65536000000000000000e5 +1256 1 2 49 0.13107200000000000000e6 +1256 1 8 39 0.13107200000000000000e6 +1256 1 9 40 0.13107200000000000000e6 +1256 1 10 41 -0.26214400000000000000e6 +1256 1 12 43 -0.52428800000000000000e6 +1256 1 23 38 0.65536000000000000000e5 +1256 1 24 39 0.65536000000000000000e5 +1256 1 26 41 -0.13107200000000000000e6 +1256 1 26 47 0.65536000000000000000e5 +1256 1 28 43 0.26214400000000000000e6 +1256 1 32 47 0.52428800000000000000e6 +1256 2 2 32 0.65536000000000000000e5 +1256 2 3 33 0.65536000000000000000e5 +1256 2 16 30 0.13107200000000000000e6 +1256 2 20 34 0.26214400000000000000e6 +1256 3 9 38 0.13107200000000000000e6 +1256 3 22 35 0.52428800000000000000e6 +1256 3 25 38 0.65536000000000000000e5 +1256 3 28 41 0.52428800000000000000e6 +1256 4 2 30 0.13107200000000000000e6 +1256 4 6 34 0.26214400000000000000e6 +1257 1 6 53 -0.65536000000000000000e5 +1257 1 26 48 0.65536000000000000000e5 +1258 1 1 48 -0.13107200000000000000e6 +1258 1 2 49 -0.19660800000000000000e6 +1258 1 6 53 0.65536000000000000000e5 +1258 1 8 39 -0.26214400000000000000e6 +1258 1 9 40 -0.26214400000000000000e6 +1258 1 10 41 0.52428800000000000000e6 +1258 1 12 43 0.10485760000000000000e7 +1258 1 23 38 -0.13107200000000000000e6 +1258 1 24 39 -0.65536000000000000000e5 +1258 1 26 41 0.39321600000000000000e6 +1258 1 26 49 0.65536000000000000000e5 +1258 1 28 43 -0.78643200000000000000e6 +1258 1 32 47 -0.10485760000000000000e7 +1258 2 2 32 -0.13107200000000000000e6 +1258 2 3 33 -0.65536000000000000000e5 +1258 2 4 34 0.13107200000000000000e6 +1258 2 5 35 0.65536000000000000000e5 +1258 2 16 30 -0.26214400000000000000e6 +1258 2 20 34 -0.52428800000000000000e6 +1258 3 5 50 0.13107200000000000000e6 +1258 3 9 38 -0.26214400000000000000e6 +1258 3 22 35 -0.10485760000000000000e7 +1258 3 25 38 -0.65536000000000000000e5 +1258 3 28 41 -0.10485760000000000000e7 +1258 4 2 30 -0.26214400000000000000e6 +1258 4 6 34 -0.52428800000000000000e6 +1259 1 1 48 -0.32768000000000000000e5 +1259 1 2 49 -0.32768000000000000000e5 +1259 1 8 39 -0.65536000000000000000e5 +1259 1 9 40 -0.65536000000000000000e5 +1259 1 10 41 0.13107200000000000000e6 +1259 1 12 43 0.26214400000000000000e6 +1259 1 23 38 -0.32768000000000000000e5 +1259 1 26 41 0.13107200000000000000e6 +1259 1 26 50 0.65536000000000000000e5 +1259 1 28 43 -0.26214400000000000000e6 +1259 1 32 47 -0.26214400000000000000e6 +1259 2 2 32 -0.32768000000000000000e5 +1259 2 4 34 0.65536000000000000000e5 +1259 2 16 30 -0.65536000000000000000e5 +1259 2 20 34 -0.13107200000000000000e6 +1259 3 5 50 0.65536000000000000000e5 +1259 3 9 38 -0.65536000000000000000e5 +1259 3 22 35 -0.26214400000000000000e6 +1259 3 28 41 -0.26214400000000000000e6 +1259 4 2 30 -0.65536000000000000000e5 +1259 4 6 34 -0.13107200000000000000e6 +1260 1 1 48 0.32768000000000000000e5 +1260 1 2 49 0.32768000000000000000e5 +1260 1 8 39 0.65536000000000000000e5 +1260 1 9 40 0.65536000000000000000e5 +1260 1 10 41 -0.13107200000000000000e6 +1260 1 12 43 -0.26214400000000000000e6 +1260 1 23 38 0.32768000000000000000e5 +1260 1 26 41 -0.65536000000000000000e5 +1260 1 26 51 0.65536000000000000000e5 +1260 1 28 43 0.26214400000000000000e6 +1260 1 32 47 0.26214400000000000000e6 +1260 1 33 48 -0.13107200000000000000e6 +1260 2 2 32 0.32768000000000000000e5 +1260 2 4 34 -0.65536000000000000000e5 +1260 2 16 30 0.65536000000000000000e5 +1260 2 20 34 0.13107200000000000000e6 +1260 2 28 34 0.65536000000000000000e5 +1260 3 5 50 -0.65536000000000000000e5 +1260 3 9 38 0.65536000000000000000e5 +1260 3 22 35 0.26214400000000000000e6 +1260 3 27 40 -0.65536000000000000000e5 +1260 3 28 41 0.26214400000000000000e6 +1260 4 2 30 0.65536000000000000000e5 +1260 4 6 34 0.13107200000000000000e6 +1260 4 21 33 0.65536000000000000000e5 +1261 1 26 52 0.65536000000000000000e5 +1261 1 33 40 -0.65536000000000000000e5 +1261 3 14 51 0.13107200000000000000e6 +1261 3 29 42 -0.65536000000000000000e5 +1261 3 30 43 -0.65536000000000000000e5 +1261 4 19 31 -0.65536000000000000000e5 +1262 1 25 56 -0.65536000000000000000e5 +1262 1 26 53 0.65536000000000000000e5 +1262 3 24 53 0.65536000000000000000e5 +1262 3 25 54 0.65536000000000000000e5 +1262 3 38 51 -0.13107200000000000000e6 +1262 4 28 32 0.65536000000000000000e5 +1263 1 1 48 -0.13107200000000000000e6 +1263 1 2 49 -0.19660800000000000000e6 +1263 1 6 53 0.65536000000000000000e5 +1263 1 8 39 -0.26214400000000000000e6 +1263 1 9 40 -0.26214400000000000000e6 +1263 1 10 41 0.52428800000000000000e6 +1263 1 12 43 0.10485760000000000000e7 +1263 1 23 38 -0.13107200000000000000e6 +1263 1 24 39 -0.65536000000000000000e5 +1263 1 26 41 0.39321600000000000000e6 +1263 1 26 54 0.65536000000000000000e5 +1263 1 28 43 -0.78643200000000000000e6 +1263 1 32 47 -0.10485760000000000000e7 +1263 2 2 32 -0.13107200000000000000e6 +1263 2 3 33 -0.65536000000000000000e5 +1263 2 4 34 0.13107200000000000000e6 +1263 2 5 35 0.65536000000000000000e5 +1263 2 16 30 -0.26214400000000000000e6 +1263 2 20 34 -0.52428800000000000000e6 +1263 3 5 50 0.13107200000000000000e6 +1263 3 9 38 -0.26214400000000000000e6 +1263 3 22 35 -0.10485760000000000000e7 +1263 3 25 38 -0.65536000000000000000e5 +1263 3 28 41 -0.10485760000000000000e7 +1263 3 39 40 0.65536000000000000000e5 +1263 4 2 30 -0.26214400000000000000e6 +1263 4 6 34 -0.52428800000000000000e6 +1264 1 1 48 0.32768000000000000000e5 +1264 1 2 49 0.32768000000000000000e5 +1264 1 8 39 0.65536000000000000000e5 +1264 1 9 40 0.65536000000000000000e5 +1264 1 10 41 -0.13107200000000000000e6 +1264 1 12 43 -0.26214400000000000000e6 +1264 1 23 38 0.32768000000000000000e5 +1264 1 26 41 -0.65536000000000000000e5 +1264 1 26 55 0.65536000000000000000e5 +1264 1 28 43 0.26214400000000000000e6 +1264 1 32 47 0.26214400000000000000e6 +1264 1 33 48 -0.13107200000000000000e6 +1264 2 2 32 0.32768000000000000000e5 +1264 2 4 34 -0.65536000000000000000e5 +1264 2 16 30 0.65536000000000000000e5 +1264 2 20 34 0.13107200000000000000e6 +1264 2 28 34 0.65536000000000000000e5 +1264 3 5 50 -0.65536000000000000000e5 +1264 3 9 38 0.65536000000000000000e5 +1264 3 10 55 -0.13107200000000000000e6 +1264 3 22 35 0.26214400000000000000e6 +1264 3 22 51 0.65536000000000000000e5 +1264 3 23 52 -0.13107200000000000000e6 +1264 3 27 40 -0.65536000000000000000e5 +1264 3 28 41 0.26214400000000000000e6 +1264 3 35 48 0.26214400000000000000e6 +1264 3 40 45 -0.13107200000000000000e6 +1264 4 2 30 0.65536000000000000000e5 +1264 4 6 34 0.13107200000000000000e6 +1264 4 7 35 0.65536000000000000000e5 +1264 4 22 34 -0.13107200000000000000e6 +1265 1 1 48 -0.13107200000000000000e6 +1265 1 2 49 -0.19660800000000000000e6 +1265 1 6 53 0.65536000000000000000e5 +1265 1 8 39 -0.26214400000000000000e6 +1265 1 9 40 -0.26214400000000000000e6 +1265 1 10 41 0.52428800000000000000e6 +1265 1 12 43 0.10485760000000000000e7 +1265 1 23 38 -0.13107200000000000000e6 +1265 1 24 39 -0.65536000000000000000e5 +1265 1 26 41 0.39321600000000000000e6 +1265 1 26 56 0.65536000000000000000e5 +1265 1 28 43 -0.78643200000000000000e6 +1265 1 32 47 -0.10485760000000000000e7 +1265 2 2 32 -0.13107200000000000000e6 +1265 2 3 33 -0.65536000000000000000e5 +1265 2 4 34 0.13107200000000000000e6 +1265 2 5 35 0.65536000000000000000e5 +1265 2 16 30 -0.26214400000000000000e6 +1265 2 20 34 -0.52428800000000000000e6 +1265 3 5 50 0.13107200000000000000e6 +1265 3 9 38 -0.26214400000000000000e6 +1265 3 22 35 -0.10485760000000000000e7 +1265 3 25 38 -0.65536000000000000000e5 +1265 3 25 54 0.65536000000000000000e5 +1265 3 28 41 -0.10485760000000000000e7 +1265 3 39 40 0.65536000000000000000e5 +1265 4 2 30 -0.26214400000000000000e6 +1265 4 6 34 -0.52428800000000000000e6 +1266 1 2 33 -0.32768000000000000000e5 +1266 1 3 34 0.65536000000000000000e5 +1266 1 10 41 -0.32768000000000000000e5 +1266 1 11 42 0.32768000000000000000e5 +1266 1 12 43 0.65536000000000000000e5 +1266 1 16 23 -0.65536000000000000000e5 +1266 1 27 27 0.65536000000000000000e5 +1266 1 28 43 -0.32768000000000000000e5 +1266 1 32 47 -0.32768000000000000000e5 +1266 1 33 48 -0.32768000000000000000e5 +1266 2 1 31 0.32768000000000000000e5 +1266 2 7 21 -0.32768000000000000000e5 +1266 2 12 26 -0.32768000000000000000e5 +1266 3 1 34 0.65536000000000000000e5 +1266 3 2 31 -0.32768000000000000000e5 +1266 3 3 32 -0.32768000000000000000e5 +1266 3 13 42 -0.65536000000000000000e5 +1266 3 28 41 -0.32768000000000000000e5 +1266 3 29 42 -0.32768000000000000000e5 +1266 4 3 31 0.32768000000000000000e5 +1267 1 2 33 0.65536000000000000000e5 +1267 1 3 34 -0.13107200000000000000e6 +1267 1 10 41 0.65536000000000000000e5 +1267 1 27 28 0.65536000000000000000e5 +1267 2 7 21 0.65536000000000000000e5 +1267 3 2 31 0.65536000000000000000e5 +1267 3 3 32 0.65536000000000000000e5 +1268 1 11 42 -0.65536000000000000000e5 +1268 1 12 43 -0.13107200000000000000e6 +1268 1 27 29 0.65536000000000000000e5 +1268 1 28 43 0.65536000000000000000e5 +1268 1 32 47 0.65536000000000000000e5 +1268 1 33 48 0.65536000000000000000e5 +1268 2 12 26 0.65536000000000000000e5 +1268 3 13 42 0.13107200000000000000e6 +1268 3 28 41 0.65536000000000000000e5 +1268 3 29 42 0.65536000000000000000e5 +1268 4 3 31 -0.65536000000000000000e5 +1269 1 10 41 -0.65536000000000000000e5 +1269 1 27 30 0.65536000000000000000e5 +1270 1 16 23 -0.65536000000000000000e5 +1270 1 27 31 0.65536000000000000000e5 +1270 3 1 34 0.65536000000000000000e5 +1271 1 16 47 -0.65536000000000000000e5 +1271 1 27 32 0.65536000000000000000e5 +1271 3 12 41 -0.65536000000000000000e5 +1272 1 12 43 -0.65536000000000000000e5 +1272 1 27 33 0.65536000000000000000e5 +1273 1 13 44 -0.65536000000000000000e5 +1273 1 27 35 0.65536000000000000000e5 +1274 1 20 27 -0.65536000000000000000e5 +1274 1 27 36 0.65536000000000000000e5 +1274 3 7 36 0.65536000000000000000e5 +1275 1 7 38 -0.65536000000000000000e5 +1275 1 27 37 0.65536000000000000000e5 +1275 3 22 27 0.65536000000000000000e5 +1276 1 1 48 -0.32768000000000000000e5 +1276 1 2 49 -0.32768000000000000000e5 +1276 1 23 38 -0.32768000000000000000e5 +1276 1 27 38 0.65536000000000000000e5 +1276 2 2 32 -0.32768000000000000000e5 +1277 1 8 39 -0.65536000000000000000e5 +1277 1 9 40 -0.65536000000000000000e5 +1277 1 10 41 0.13107200000000000000e6 +1277 1 26 41 0.65536000000000000000e5 +1277 1 27 39 0.65536000000000000000e5 +1277 1 32 47 -0.13107200000000000000e6 +1277 3 9 38 -0.65536000000000000000e5 +1277 3 28 41 -0.13107200000000000000e6 +1277 4 2 30 -0.65536000000000000000e5 +1278 1 1 48 0.32768000000000000000e5 +1278 1 2 49 0.32768000000000000000e5 +1278 1 8 39 0.65536000000000000000e5 +1278 1 9 40 0.65536000000000000000e5 +1278 1 10 41 -0.13107200000000000000e6 +1278 1 12 43 -0.26214400000000000000e6 +1278 1 23 38 0.32768000000000000000e5 +1278 1 26 41 -0.65536000000000000000e5 +1278 1 27 40 0.65536000000000000000e5 +1278 1 28 43 0.13107200000000000000e6 +1278 1 32 47 0.26214400000000000000e6 +1278 2 2 32 0.32768000000000000000e5 +1278 2 16 30 0.65536000000000000000e5 +1278 2 20 34 0.13107200000000000000e6 +1278 3 9 38 0.65536000000000000000e5 +1278 3 22 35 0.26214400000000000000e6 +1278 3 28 41 0.26214400000000000000e6 +1278 4 2 30 0.65536000000000000000e5 +1278 4 6 34 0.13107200000000000000e6 +1279 1 2 33 0.65536000000000000000e5 +1279 1 3 34 -0.13107200000000000000e6 +1279 1 9 40 -0.32768000000000000000e5 +1279 1 10 41 0.13107200000000000000e6 +1279 1 26 41 0.32768000000000000000e5 +1279 1 27 41 0.65536000000000000000e5 +1279 1 32 47 -0.65536000000000000000e5 +1279 2 7 21 0.65536000000000000000e5 +1279 3 2 31 0.65536000000000000000e5 +1279 3 3 32 0.65536000000000000000e5 +1279 3 8 37 0.32768000000000000000e5 +1279 3 9 38 -0.32768000000000000000e5 +1279 3 22 27 0.32768000000000000000e5 +1279 3 28 41 -0.65536000000000000000e5 +1279 4 1 29 0.32768000000000000000e5 +1279 4 2 30 -0.32768000000000000000e5 +1280 1 12 43 -0.13107200000000000000e6 +1280 1 27 42 0.65536000000000000000e5 +1280 1 28 43 0.65536000000000000000e5 +1280 1 32 47 0.65536000000000000000e5 +1280 2 20 34 0.65536000000000000000e5 +1280 3 22 35 0.13107200000000000000e6 +1280 3 28 41 0.65536000000000000000e5 +1280 4 6 34 0.65536000000000000000e5 +1281 1 27 43 0.65536000000000000000e5 +1281 1 32 47 -0.65536000000000000000e5 +1281 3 28 41 -0.65536000000000000000e5 +1282 1 16 47 -0.65536000000000000000e5 +1282 1 27 44 0.65536000000000000000e5 +1283 1 12 43 -0.65536000000000000000e5 +1283 1 27 45 0.65536000000000000000e5 +1283 3 22 35 0.65536000000000000000e5 +1284 1 27 46 0.65536000000000000000e5 +1284 1 34 41 -0.65536000000000000000e5 +1285 1 1 48 -0.32768000000000000000e5 +1285 1 2 49 -0.32768000000000000000e5 +1285 1 6 53 -0.32768000000000000000e5 +1285 1 23 38 -0.32768000000000000000e5 +1285 1 25 40 0.32768000000000000000e5 +1285 1 27 47 0.65536000000000000000e5 +1285 2 2 32 -0.32768000000000000000e5 +1285 2 4 34 -0.65536000000000000000e5 +1285 2 16 30 -0.65536000000000000000e5 +1285 2 16 34 0.65536000000000000000e5 +1285 2 21 35 0.65536000000000000000e5 +1285 3 5 50 -0.65536000000000000000e5 +1285 3 7 52 0.26214400000000000000e6 +1285 3 24 37 -0.32768000000000000000e5 +1285 3 27 40 -0.65536000000000000000e5 +1285 3 28 41 -0.26214400000000000000e6 +1285 4 4 32 0.32768000000000000000e5 +1285 4 6 34 -0.13107200000000000000e6 +1285 4 7 35 0.65536000000000000000e5 +1285 4 16 28 -0.32768000000000000000e5 +1285 4 17 29 0.65536000000000000000e5 +1286 1 6 53 -0.32768000000000000000e5 +1286 1 8 39 -0.65536000000000000000e5 +1286 1 9 40 -0.65536000000000000000e5 +1286 1 10 41 0.13107200000000000000e6 +1286 1 25 40 0.32768000000000000000e5 +1286 1 26 41 0.65536000000000000000e5 +1286 1 27 48 0.65536000000000000000e5 +1286 1 32 47 -0.13107200000000000000e6 +1286 3 9 38 -0.65536000000000000000e5 +1286 3 24 37 -0.32768000000000000000e5 +1286 3 27 40 -0.13107200000000000000e6 +1286 4 2 30 -0.65536000000000000000e5 +1286 4 4 32 0.32768000000000000000e5 +1286 4 16 28 -0.32768000000000000000e5 +1286 4 17 29 -0.65536000000000000000e5 +1287 1 1 48 0.32768000000000000000e5 +1287 1 2 49 0.32768000000000000000e5 +1287 1 6 53 0.32768000000000000000e5 +1287 1 8 39 0.65536000000000000000e5 +1287 1 9 40 0.65536000000000000000e5 +1287 1 10 41 -0.13107200000000000000e6 +1287 1 12 43 -0.26214400000000000000e6 +1287 1 23 38 0.32768000000000000000e5 +1287 1 25 40 -0.32768000000000000000e5 +1287 1 26 41 -0.65536000000000000000e5 +1287 1 27 49 0.65536000000000000000e5 +1287 1 28 43 0.13107200000000000000e6 +1287 1 32 47 0.26214400000000000000e6 +1287 2 2 32 0.32768000000000000000e5 +1287 2 16 30 0.65536000000000000000e5 +1287 2 20 34 0.13107200000000000000e6 +1287 3 9 38 0.65536000000000000000e5 +1287 3 22 35 0.26214400000000000000e6 +1287 3 24 37 0.32768000000000000000e5 +1287 3 27 40 0.65536000000000000000e5 +1287 3 28 41 0.26214400000000000000e6 +1287 4 2 30 0.65536000000000000000e5 +1287 4 4 32 -0.32768000000000000000e5 +1287 4 6 34 0.13107200000000000000e6 +1287 4 16 28 0.32768000000000000000e5 +1288 1 6 53 -0.16384000000000000000e5 +1288 1 12 43 -0.13107200000000000000e6 +1288 1 25 40 0.16384000000000000000e5 +1288 1 27 50 0.65536000000000000000e5 +1288 1 28 43 0.65536000000000000000e5 +1288 1 32 47 0.65536000000000000000e5 +1288 2 4 34 -0.32768000000000000000e5 +1288 2 20 34 0.65536000000000000000e5 +1288 2 21 35 0.32768000000000000000e5 +1288 3 5 50 -0.32768000000000000000e5 +1288 3 7 52 0.13107200000000000000e6 +1288 3 22 35 0.13107200000000000000e6 +1288 3 24 37 -0.16384000000000000000e5 +1288 3 27 40 -0.65536000000000000000e5 +1288 4 4 32 0.16384000000000000000e5 +1288 4 7 35 0.32768000000000000000e5 +1288 4 16 28 -0.16384000000000000000e5 +1289 1 27 51 0.65536000000000000000e5 +1289 1 32 47 -0.65536000000000000000e5 +1290 1 12 43 -0.65536000000000000000e5 +1290 1 27 52 0.65536000000000000000e5 +1290 3 7 52 0.65536000000000000000e5 +1290 3 22 35 0.65536000000000000000e5 +1291 1 6 53 -0.32768000000000000000e5 +1291 1 8 39 -0.65536000000000000000e5 +1291 1 9 40 -0.65536000000000000000e5 +1291 1 10 41 0.13107200000000000000e6 +1291 1 24 55 0.65536000000000000000e5 +1291 1 25 40 0.32768000000000000000e5 +1291 1 27 53 0.65536000000000000000e5 +1291 1 37 52 -0.13107200000000000000e6 +1291 3 9 38 -0.65536000000000000000e5 +1291 3 22 51 -0.65536000000000000000e5 +1291 3 24 37 -0.32768000000000000000e5 +1291 3 27 40 -0.65536000000000000000e5 +1291 4 2 30 -0.65536000000000000000e5 +1291 4 4 32 0.32768000000000000000e5 +1291 4 16 28 -0.32768000000000000000e5 +1291 4 17 29 -0.65536000000000000000e5 +1291 4 20 32 -0.65536000000000000000e5 +1292 1 1 48 0.32768000000000000000e5 +1292 1 2 49 0.32768000000000000000e5 +1292 1 6 53 0.32768000000000000000e5 +1292 1 8 39 0.65536000000000000000e5 +1292 1 9 40 0.65536000000000000000e5 +1292 1 10 41 -0.13107200000000000000e6 +1292 1 12 43 -0.26214400000000000000e6 +1292 1 23 38 0.32768000000000000000e5 +1292 1 25 40 -0.32768000000000000000e5 +1292 1 26 41 -0.65536000000000000000e5 +1292 1 27 54 0.65536000000000000000e5 +1292 1 28 43 0.13107200000000000000e6 +1292 1 32 47 0.26214400000000000000e6 +1292 2 2 32 0.32768000000000000000e5 +1292 2 16 30 0.65536000000000000000e5 +1292 2 20 34 0.13107200000000000000e6 +1292 3 9 38 0.65536000000000000000e5 +1292 3 22 35 0.26214400000000000000e6 +1292 3 22 51 0.65536000000000000000e5 +1292 3 24 37 0.32768000000000000000e5 +1292 3 27 40 0.65536000000000000000e5 +1292 3 28 41 0.26214400000000000000e6 +1292 4 2 30 0.65536000000000000000e5 +1292 4 4 32 -0.32768000000000000000e5 +1292 4 6 34 0.13107200000000000000e6 +1292 4 16 28 0.32768000000000000000e5 +1293 1 27 55 0.65536000000000000000e5 +1293 1 37 52 -0.65536000000000000000e5 +1294 1 1 48 0.32768000000000000000e5 +1294 1 2 49 0.32768000000000000000e5 +1294 1 6 53 0.32768000000000000000e5 +1294 1 8 39 0.65536000000000000000e5 +1294 1 9 40 0.65536000000000000000e5 +1294 1 10 41 -0.13107200000000000000e6 +1294 1 12 43 -0.26214400000000000000e6 +1294 1 23 38 0.32768000000000000000e5 +1294 1 25 40 -0.32768000000000000000e5 +1294 1 26 41 -0.65536000000000000000e5 +1294 1 27 56 0.65536000000000000000e5 +1294 1 28 43 0.13107200000000000000e6 +1294 1 32 47 0.26214400000000000000e6 +1294 2 2 32 0.32768000000000000000e5 +1294 2 16 30 0.65536000000000000000e5 +1294 2 20 34 0.13107200000000000000e6 +1294 3 9 38 0.65536000000000000000e5 +1294 3 22 35 0.26214400000000000000e6 +1294 3 22 51 0.65536000000000000000e5 +1294 3 24 37 0.32768000000000000000e5 +1294 3 27 40 0.65536000000000000000e5 +1294 3 28 41 0.26214400000000000000e6 +1294 3 37 50 0.65536000000000000000e5 +1294 4 2 30 0.65536000000000000000e5 +1294 4 4 32 -0.32768000000000000000e5 +1294 4 6 34 0.13107200000000000000e6 +1294 4 16 28 0.32768000000000000000e5 +1295 1 11 42 -0.32768000000000000000e5 +1295 1 12 43 -0.65536000000000000000e5 +1295 1 28 28 0.65536000000000000000e5 +1295 1 28 43 0.32768000000000000000e5 +1295 1 32 47 0.32768000000000000000e5 +1295 1 33 48 0.32768000000000000000e5 +1295 2 12 26 0.32768000000000000000e5 +1295 3 13 42 0.65536000000000000000e5 +1295 3 28 41 0.32768000000000000000e5 +1295 3 29 42 0.32768000000000000000e5 +1295 4 3 31 -0.32768000000000000000e5 +1296 1 10 41 -0.65536000000000000000e5 +1296 1 28 29 0.65536000000000000000e5 +1297 1 10 41 0.65536000000000000000e5 +1297 1 11 42 0.65536000000000000000e5 +1297 1 28 30 0.65536000000000000000e5 +1297 1 28 43 -0.65536000000000000000e5 +1297 1 32 47 -0.65536000000000000000e5 +1297 1 33 48 -0.65536000000000000000e5 +1297 3 13 42 -0.13107200000000000000e6 +1297 3 28 41 -0.65536000000000000000e5 +1297 3 29 42 -0.65536000000000000000e5 +1297 4 3 31 0.65536000000000000000e5 +1298 1 16 47 -0.65536000000000000000e5 +1298 1 28 31 0.65536000000000000000e5 +1298 3 12 41 -0.65536000000000000000e5 +1299 1 12 43 -0.65536000000000000000e5 +1299 1 28 32 0.65536000000000000000e5 +1300 1 17 48 -0.65536000000000000000e5 +1300 1 28 33 0.65536000000000000000e5 +1300 3 13 42 -0.65536000000000000000e5 +1301 1 13 44 -0.65536000000000000000e5 +1301 1 28 34 0.65536000000000000000e5 +1302 1 4 35 -0.32768000000000000000e5 +1302 1 12 43 -0.32768000000000000000e5 +1302 1 14 45 -0.65536000000000000000e5 +1302 1 17 48 0.32768000000000000000e5 +1302 1 18 49 0.32768000000000000000e5 +1302 1 28 35 0.65536000000000000000e5 +1302 2 9 23 -0.32768000000000000000e5 +1302 2 14 28 0.32768000000000000000e5 +1302 3 5 34 -0.32768000000000000000e5 +1302 3 13 42 0.32768000000000000000e5 +1302 3 14 27 -0.32768000000000000000e5 +1302 3 14 43 0.32768000000000000000e5 +1302 3 16 29 0.65536000000000000000e5 +1303 1 3 18 -0.16384000000000000000e5 +1303 1 4 19 0.32768000000000000000e5 +1303 1 5 36 0.32768000000000000000e5 +1303 1 12 43 0.16384000000000000000e5 +1303 1 13 44 -0.32768000000000000000e5 +1303 1 14 45 -0.32768000000000000000e5 +1303 1 17 32 -0.65536000000000000000e5 +1303 1 28 36 0.65536000000000000000e5 +1303 3 3 16 -0.16384000000000000000e5 +1303 3 4 17 -0.16384000000000000000e5 +1303 3 14 27 0.16384000000000000000e5 +1303 3 16 29 0.32768000000000000000e5 +1303 4 2 14 -0.16384000000000000000e5 +1303 4 11 23 0.32768000000000000000e5 +1304 1 1 48 -0.32768000000000000000e5 +1304 1 2 49 -0.32768000000000000000e5 +1304 1 23 38 -0.32768000000000000000e5 +1304 1 28 37 0.65536000000000000000e5 +1304 2 2 32 -0.32768000000000000000e5 +1305 1 8 39 -0.65536000000000000000e5 +1305 1 9 40 -0.65536000000000000000e5 +1305 1 10 41 0.13107200000000000000e6 +1305 1 26 41 0.65536000000000000000e5 +1305 1 28 38 0.65536000000000000000e5 +1305 1 32 47 -0.13107200000000000000e6 +1305 3 9 38 -0.65536000000000000000e5 +1305 3 28 41 -0.13107200000000000000e6 +1305 4 2 30 -0.65536000000000000000e5 +1306 1 1 48 0.32768000000000000000e5 +1306 1 2 49 0.32768000000000000000e5 +1306 1 8 39 0.65536000000000000000e5 +1306 1 9 40 0.65536000000000000000e5 +1306 1 10 41 -0.13107200000000000000e6 +1306 1 12 43 -0.26214400000000000000e6 +1306 1 23 38 0.32768000000000000000e5 +1306 1 26 41 -0.65536000000000000000e5 +1306 1 28 39 0.65536000000000000000e5 +1306 1 28 43 0.13107200000000000000e6 +1306 1 32 47 0.26214400000000000000e6 +1306 2 2 32 0.32768000000000000000e5 +1306 2 16 30 0.65536000000000000000e5 +1306 2 20 34 0.13107200000000000000e6 +1306 3 9 38 0.65536000000000000000e5 +1306 3 22 35 0.26214400000000000000e6 +1306 3 28 41 0.26214400000000000000e6 +1306 4 2 30 0.65536000000000000000e5 +1306 4 6 34 0.13107200000000000000e6 +1307 1 26 41 -0.65536000000000000000e5 +1307 1 28 40 0.65536000000000000000e5 +1308 1 12 43 -0.13107200000000000000e6 +1308 1 28 41 0.65536000000000000000e5 +1308 1 28 43 0.65536000000000000000e5 +1308 1 32 47 0.65536000000000000000e5 +1308 2 20 34 0.65536000000000000000e5 +1308 3 22 35 0.13107200000000000000e6 +1308 3 28 41 0.65536000000000000000e5 +1308 4 6 34 0.65536000000000000000e5 +1309 1 28 42 0.65536000000000000000e5 +1309 1 32 47 -0.65536000000000000000e5 +1309 3 28 41 -0.65536000000000000000e5 +1310 1 12 43 -0.65536000000000000000e5 +1310 1 28 44 0.65536000000000000000e5 +1310 3 22 35 0.65536000000000000000e5 +1311 1 17 48 -0.65536000000000000000e5 +1311 1 28 45 0.65536000000000000000e5 +1312 1 4 35 -0.32768000000000000000e5 +1312 1 12 43 -0.32768000000000000000e5 +1312 1 28 46 0.65536000000000000000e5 +1312 1 34 49 -0.32768000000000000000e5 +1312 2 9 23 -0.32768000000000000000e5 +1312 3 5 34 -0.32768000000000000000e5 +1312 3 13 42 0.32768000000000000000e5 +1312 3 14 27 -0.32768000000000000000e5 +1312 3 16 29 0.65536000000000000000e5 +1312 3 18 47 -0.32768000000000000000e5 +1312 3 22 35 0.32768000000000000000e5 +1312 4 14 26 0.32768000000000000000e5 +1313 1 6 53 -0.32768000000000000000e5 +1313 1 8 39 -0.65536000000000000000e5 +1313 1 9 40 -0.65536000000000000000e5 +1313 1 10 41 0.13107200000000000000e6 +1313 1 25 40 0.32768000000000000000e5 +1313 1 26 41 0.65536000000000000000e5 +1313 1 28 47 0.65536000000000000000e5 +1313 1 32 47 -0.13107200000000000000e6 +1313 3 9 38 -0.65536000000000000000e5 +1313 3 24 37 -0.32768000000000000000e5 +1313 3 27 40 -0.13107200000000000000e6 +1313 4 2 30 -0.65536000000000000000e5 +1313 4 4 32 0.32768000000000000000e5 +1313 4 16 28 -0.32768000000000000000e5 +1313 4 17 29 -0.65536000000000000000e5 +1314 1 1 48 0.32768000000000000000e5 +1314 1 2 49 0.32768000000000000000e5 +1314 1 6 53 0.32768000000000000000e5 +1314 1 8 39 0.65536000000000000000e5 +1314 1 9 40 0.65536000000000000000e5 +1314 1 10 41 -0.13107200000000000000e6 +1314 1 12 43 -0.26214400000000000000e6 +1314 1 23 38 0.32768000000000000000e5 +1314 1 25 40 -0.32768000000000000000e5 +1314 1 26 41 -0.65536000000000000000e5 +1314 1 28 43 0.13107200000000000000e6 +1314 1 28 48 0.65536000000000000000e5 +1314 1 32 47 0.26214400000000000000e6 +1314 2 2 32 0.32768000000000000000e5 +1314 2 16 30 0.65536000000000000000e5 +1314 2 20 34 0.13107200000000000000e6 +1314 3 9 38 0.65536000000000000000e5 +1314 3 22 35 0.26214400000000000000e6 +1314 3 24 37 0.32768000000000000000e5 +1314 3 27 40 0.65536000000000000000e5 +1314 3 28 41 0.26214400000000000000e6 +1314 4 2 30 0.65536000000000000000e5 +1314 4 4 32 -0.32768000000000000000e5 +1314 4 6 34 0.13107200000000000000e6 +1314 4 16 28 0.32768000000000000000e5 +1315 1 26 41 -0.65536000000000000000e5 +1315 1 28 49 0.65536000000000000000e5 +1315 3 27 40 0.65536000000000000000e5 +1316 1 28 50 0.65536000000000000000e5 +1316 1 32 47 -0.65536000000000000000e5 +1317 1 6 53 0.16384000000000000000e5 +1317 1 25 40 -0.16384000000000000000e5 +1317 1 28 43 -0.65536000000000000000e5 +1317 1 28 51 0.65536000000000000000e5 +1317 2 4 34 0.32768000000000000000e5 +1317 2 21 35 -0.32768000000000000000e5 +1317 3 5 50 0.32768000000000000000e5 +1317 3 24 37 0.16384000000000000000e5 +1317 3 27 40 0.65536000000000000000e5 +1317 4 4 32 -0.16384000000000000000e5 +1317 4 7 35 -0.32768000000000000000e5 +1317 4 16 28 0.16384000000000000000e5 +1318 1 6 53 0.81920000000000000000e4 +1318 1 17 48 -0.65536000000000000000e5 +1318 1 25 40 -0.81920000000000000000e4 +1318 1 28 52 0.65536000000000000000e5 +1318 2 4 34 0.16384000000000000000e5 +1318 2 21 35 -0.16384000000000000000e5 +1318 3 5 50 0.16384000000000000000e5 +1318 3 24 37 0.81920000000000000000e4 +1318 3 27 40 0.32768000000000000000e5 +1318 3 28 41 0.32768000000000000000e5 +1318 3 29 42 0.32768000000000000000e5 +1318 4 4 32 -0.81920000000000000000e4 +1318 4 7 35 -0.16384000000000000000e5 +1318 4 16 28 0.81920000000000000000e4 +1318 4 23 27 0.32768000000000000000e5 +1319 1 1 48 0.32768000000000000000e5 +1319 1 2 49 0.32768000000000000000e5 +1319 1 6 53 0.32768000000000000000e5 +1319 1 8 39 0.65536000000000000000e5 +1319 1 9 40 0.65536000000000000000e5 +1319 1 10 41 -0.13107200000000000000e6 +1319 1 12 43 -0.26214400000000000000e6 +1319 1 23 38 0.32768000000000000000e5 +1319 1 25 40 -0.32768000000000000000e5 +1319 1 26 41 -0.65536000000000000000e5 +1319 1 28 43 0.13107200000000000000e6 +1319 1 28 53 0.65536000000000000000e5 +1319 1 32 47 0.26214400000000000000e6 +1319 2 2 32 0.32768000000000000000e5 +1319 2 16 30 0.65536000000000000000e5 +1319 2 20 34 0.13107200000000000000e6 +1319 3 9 38 0.65536000000000000000e5 +1319 3 22 35 0.26214400000000000000e6 +1319 3 22 51 0.65536000000000000000e5 +1319 3 24 37 0.32768000000000000000e5 +1319 3 27 40 0.65536000000000000000e5 +1319 3 28 41 0.26214400000000000000e6 +1319 4 2 30 0.65536000000000000000e5 +1319 4 4 32 -0.32768000000000000000e5 +1319 4 6 34 0.13107200000000000000e6 +1319 4 16 28 0.32768000000000000000e5 +1320 1 24 55 -0.65536000000000000000e5 +1320 1 28 54 0.65536000000000000000e5 +1321 1 6 53 0.16384000000000000000e5 +1321 1 25 40 -0.16384000000000000000e5 +1321 1 28 43 -0.65536000000000000000e5 +1321 1 28 55 0.65536000000000000000e5 +1321 2 4 34 0.32768000000000000000e5 +1321 2 21 35 -0.32768000000000000000e5 +1321 3 5 50 0.32768000000000000000e5 +1321 3 23 52 0.65536000000000000000e5 +1321 3 24 37 0.16384000000000000000e5 +1321 3 27 40 0.65536000000000000000e5 +1321 4 4 32 -0.16384000000000000000e5 +1321 4 7 35 -0.32768000000000000000e5 +1321 4 16 28 0.16384000000000000000e5 +1322 1 28 56 0.65536000000000000000e5 +1322 1 41 56 -0.65536000000000000000e5 +1322 3 27 56 -0.65536000000000000000e5 +1323 1 10 41 0.32768000000000000000e5 +1323 1 11 42 0.32768000000000000000e5 +1323 1 28 43 -0.32768000000000000000e5 +1323 1 29 29 0.65536000000000000000e5 +1323 1 32 47 -0.32768000000000000000e5 +1323 1 33 48 -0.32768000000000000000e5 +1323 3 13 42 -0.65536000000000000000e5 +1323 3 28 41 -0.32768000000000000000e5 +1323 3 29 42 -0.32768000000000000000e5 +1323 4 3 31 0.32768000000000000000e5 +1324 1 11 42 -0.65536000000000000000e5 +1324 1 29 30 0.65536000000000000000e5 +1325 1 12 43 -0.65536000000000000000e5 +1325 1 29 31 0.65536000000000000000e5 +1326 1 17 48 -0.65536000000000000000e5 +1326 1 29 32 0.65536000000000000000e5 +1326 3 13 42 -0.65536000000000000000e5 +1327 1 14 45 -0.13107200000000000000e6 +1327 1 17 48 0.65536000000000000000e5 +1327 1 18 49 0.65536000000000000000e5 +1327 1 29 33 0.65536000000000000000e5 +1327 2 14 28 0.65536000000000000000e5 +1327 3 13 42 0.65536000000000000000e5 +1327 3 14 43 0.65536000000000000000e5 +1328 1 4 35 -0.32768000000000000000e5 +1328 1 12 43 -0.32768000000000000000e5 +1328 1 14 45 -0.65536000000000000000e5 +1328 1 17 48 0.32768000000000000000e5 +1328 1 18 49 0.32768000000000000000e5 +1328 1 29 34 0.65536000000000000000e5 +1328 2 9 23 -0.32768000000000000000e5 +1328 2 14 28 0.32768000000000000000e5 +1328 3 5 34 -0.32768000000000000000e5 +1328 3 13 42 0.32768000000000000000e5 +1328 3 14 27 -0.32768000000000000000e5 +1328 3 14 43 0.32768000000000000000e5 +1328 3 16 29 0.65536000000000000000e5 +1329 1 14 45 -0.65536000000000000000e5 +1329 1 29 35 0.65536000000000000000e5 +1330 1 13 20 -0.13107200000000000000e6 +1330 1 17 32 0.65536000000000000000e5 +1330 1 20 27 0.65536000000000000000e5 +1330 1 29 36 0.65536000000000000000e5 +1330 2 11 25 0.65536000000000000000e5 +1330 3 8 21 0.13107200000000000000e6 +1330 3 18 31 0.65536000000000000000e5 +1331 1 8 39 -0.65536000000000000000e5 +1331 1 9 40 -0.65536000000000000000e5 +1331 1 10 41 0.13107200000000000000e6 +1331 1 26 41 0.65536000000000000000e5 +1331 1 29 37 0.65536000000000000000e5 +1331 1 32 47 -0.13107200000000000000e6 +1331 3 9 38 -0.65536000000000000000e5 +1331 3 28 41 -0.13107200000000000000e6 +1331 4 2 30 -0.65536000000000000000e5 +1332 1 1 48 0.32768000000000000000e5 +1332 1 2 49 0.32768000000000000000e5 +1332 1 8 39 0.65536000000000000000e5 +1332 1 9 40 0.65536000000000000000e5 +1332 1 10 41 -0.13107200000000000000e6 +1332 1 12 43 -0.26214400000000000000e6 +1332 1 23 38 0.32768000000000000000e5 +1332 1 26 41 -0.65536000000000000000e5 +1332 1 28 43 0.13107200000000000000e6 +1332 1 29 38 0.65536000000000000000e5 +1332 1 32 47 0.26214400000000000000e6 +1332 2 2 32 0.32768000000000000000e5 +1332 2 16 30 0.65536000000000000000e5 +1332 2 20 34 0.13107200000000000000e6 +1332 3 9 38 0.65536000000000000000e5 +1332 3 22 35 0.26214400000000000000e6 +1332 3 28 41 0.26214400000000000000e6 +1332 4 2 30 0.65536000000000000000e5 +1332 4 6 34 0.13107200000000000000e6 +1333 1 26 41 -0.65536000000000000000e5 +1333 1 29 39 0.65536000000000000000e5 +1334 1 1 48 -0.32768000000000000000e5 +1334 1 2 49 -0.32768000000000000000e5 +1334 1 8 39 -0.65536000000000000000e5 +1334 1 9 40 -0.65536000000000000000e5 +1334 1 10 41 0.13107200000000000000e6 +1334 1 12 43 0.26214400000000000000e6 +1334 1 23 38 -0.32768000000000000000e5 +1334 1 26 41 0.13107200000000000000e6 +1334 1 28 43 -0.26214400000000000000e6 +1334 1 29 40 0.65536000000000000000e5 +1334 1 32 47 -0.26214400000000000000e6 +1334 2 2 32 -0.32768000000000000000e5 +1334 2 4 34 0.65536000000000000000e5 +1334 2 16 30 -0.65536000000000000000e5 +1334 2 20 34 -0.13107200000000000000e6 +1334 3 9 38 -0.65536000000000000000e5 +1334 3 22 35 -0.26214400000000000000e6 +1334 3 28 41 -0.26214400000000000000e6 +1334 4 2 30 -0.65536000000000000000e5 +1334 4 6 34 -0.13107200000000000000e6 +1335 1 29 41 0.65536000000000000000e5 +1335 1 32 47 -0.65536000000000000000e5 +1335 3 28 41 -0.65536000000000000000e5 +1336 1 28 43 -0.65536000000000000000e5 +1336 1 29 42 0.65536000000000000000e5 +1337 1 29 43 0.65536000000000000000e5 +1337 1 33 48 -0.65536000000000000000e5 +1337 3 29 42 -0.65536000000000000000e5 +1338 1 17 48 -0.65536000000000000000e5 +1338 1 29 44 0.65536000000000000000e5 +1339 1 29 45 0.65536000000000000000e5 +1339 1 34 49 -0.65536000000000000000e5 +1339 3 18 47 -0.65536000000000000000e5 +1340 1 14 45 -0.13107200000000000000e6 +1340 1 17 48 0.32768000000000000000e5 +1340 1 18 49 0.32768000000000000000e5 +1340 1 29 46 0.65536000000000000000e5 +1340 1 34 49 0.32768000000000000000e5 +1340 2 14 28 0.32768000000000000000e5 +1340 3 14 43 0.32768000000000000000e5 +1340 3 15 44 -0.65536000000000000000e5 +1340 3 16 45 0.13107200000000000000e6 +1340 3 18 47 0.32768000000000000000e5 +1340 3 22 35 -0.32768000000000000000e5 +1340 4 14 26 -0.32768000000000000000e5 +1340 4 15 27 -0.65536000000000000000e5 +1341 1 1 48 0.32768000000000000000e5 +1341 1 2 49 0.32768000000000000000e5 +1341 1 6 53 0.32768000000000000000e5 +1341 1 8 39 0.65536000000000000000e5 +1341 1 9 40 0.65536000000000000000e5 +1341 1 10 41 -0.13107200000000000000e6 +1341 1 12 43 -0.26214400000000000000e6 +1341 1 23 38 0.32768000000000000000e5 +1341 1 25 40 -0.32768000000000000000e5 +1341 1 26 41 -0.65536000000000000000e5 +1341 1 28 43 0.13107200000000000000e6 +1341 1 29 47 0.65536000000000000000e5 +1341 1 32 47 0.26214400000000000000e6 +1341 2 2 32 0.32768000000000000000e5 +1341 2 16 30 0.65536000000000000000e5 +1341 2 20 34 0.13107200000000000000e6 +1341 3 9 38 0.65536000000000000000e5 +1341 3 22 35 0.26214400000000000000e6 +1341 3 24 37 0.32768000000000000000e5 +1341 3 27 40 0.65536000000000000000e5 +1341 3 28 41 0.26214400000000000000e6 +1341 4 2 30 0.65536000000000000000e5 +1341 4 4 32 -0.32768000000000000000e5 +1341 4 6 34 0.13107200000000000000e6 +1341 4 16 28 0.32768000000000000000e5 +1342 1 26 41 -0.65536000000000000000e5 +1342 1 29 48 0.65536000000000000000e5 +1342 3 27 40 0.65536000000000000000e5 +1343 1 1 48 -0.32768000000000000000e5 +1343 1 2 49 -0.32768000000000000000e5 +1343 1 8 39 -0.65536000000000000000e5 +1343 1 9 40 -0.65536000000000000000e5 +1343 1 10 41 0.13107200000000000000e6 +1343 1 12 43 0.26214400000000000000e6 +1343 1 23 38 -0.32768000000000000000e5 +1343 1 26 41 0.13107200000000000000e6 +1343 1 28 43 -0.26214400000000000000e6 +1343 1 29 49 0.65536000000000000000e5 +1343 1 32 47 -0.26214400000000000000e6 +1343 2 2 32 -0.32768000000000000000e5 +1343 2 4 34 0.65536000000000000000e5 +1343 2 16 30 -0.65536000000000000000e5 +1343 2 20 34 -0.13107200000000000000e6 +1343 3 5 50 0.65536000000000000000e5 +1343 3 9 38 -0.65536000000000000000e5 +1343 3 22 35 -0.26214400000000000000e6 +1343 3 28 41 -0.26214400000000000000e6 +1343 4 2 30 -0.65536000000000000000e5 +1343 4 6 34 -0.13107200000000000000e6 +1344 1 6 53 0.16384000000000000000e5 +1344 1 25 40 -0.16384000000000000000e5 +1344 1 28 43 -0.65536000000000000000e5 +1344 1 29 50 0.65536000000000000000e5 +1344 2 4 34 0.32768000000000000000e5 +1344 2 21 35 -0.32768000000000000000e5 +1344 3 5 50 0.32768000000000000000e5 +1344 3 24 37 0.16384000000000000000e5 +1344 3 27 40 0.65536000000000000000e5 +1344 4 4 32 -0.16384000000000000000e5 +1344 4 7 35 -0.32768000000000000000e5 +1344 4 16 28 0.16384000000000000000e5 +1345 1 29 51 0.65536000000000000000e5 +1345 1 33 48 -0.65536000000000000000e5 +1346 1 29 52 0.65536000000000000000e5 +1346 1 34 49 -0.65536000000000000000e5 +1347 1 24 55 -0.65536000000000000000e5 +1347 1 29 53 0.65536000000000000000e5 +1348 1 1 48 -0.32768000000000000000e5 +1348 1 2 49 -0.32768000000000000000e5 +1348 1 8 39 -0.65536000000000000000e5 +1348 1 9 40 -0.65536000000000000000e5 +1348 1 10 41 0.13107200000000000000e6 +1348 1 12 43 0.26214400000000000000e6 +1348 1 23 38 -0.32768000000000000000e5 +1348 1 24 55 0.65536000000000000000e5 +1348 1 26 41 0.65536000000000000000e5 +1348 1 28 43 -0.26214400000000000000e6 +1348 1 29 54 0.65536000000000000000e5 +1348 1 32 47 -0.26214400000000000000e6 +1348 2 2 32 -0.32768000000000000000e5 +1348 2 4 34 0.65536000000000000000e5 +1348 2 16 30 -0.65536000000000000000e5 +1348 2 20 34 -0.13107200000000000000e6 +1348 3 5 50 0.65536000000000000000e5 +1348 3 9 38 -0.65536000000000000000e5 +1348 3 22 35 -0.26214400000000000000e6 +1348 3 22 51 -0.65536000000000000000e5 +1348 3 23 52 0.13107200000000000000e6 +1348 3 27 40 0.65536000000000000000e5 +1348 3 28 41 -0.26214400000000000000e6 +1348 4 2 30 -0.65536000000000000000e5 +1348 4 6 34 -0.13107200000000000000e6 +1348 4 7 35 -0.65536000000000000000e5 +1349 1 29 55 0.65536000000000000000e5 +1349 1 33 48 -0.65536000000000000000e5 +1349 3 10 55 -0.65536000000000000000e5 +1349 3 35 48 0.13107200000000000000e6 +1349 3 40 45 -0.65536000000000000000e5 +1349 4 22 34 -0.65536000000000000000e5 +1350 1 1 48 -0.32768000000000000000e5 +1350 1 2 49 -0.32768000000000000000e5 +1350 1 8 39 -0.65536000000000000000e5 +1350 1 9 40 -0.65536000000000000000e5 +1350 1 10 41 0.13107200000000000000e6 +1350 1 12 43 0.26214400000000000000e6 +1350 1 23 38 -0.32768000000000000000e5 +1350 1 24 55 0.65536000000000000000e5 +1350 1 26 41 0.65536000000000000000e5 +1350 1 28 43 -0.26214400000000000000e6 +1350 1 29 56 0.65536000000000000000e5 +1350 1 32 47 -0.26214400000000000000e6 +1350 2 2 32 -0.32768000000000000000e5 +1350 2 4 34 0.65536000000000000000e5 +1350 2 16 30 -0.65536000000000000000e5 +1350 2 20 34 -0.13107200000000000000e6 +1350 3 5 50 0.65536000000000000000e5 +1350 3 9 38 -0.65536000000000000000e5 +1350 3 22 35 -0.26214400000000000000e6 +1350 3 22 51 -0.65536000000000000000e5 +1350 3 23 52 0.13107200000000000000e6 +1350 3 27 40 0.65536000000000000000e5 +1350 3 28 41 -0.26214400000000000000e6 +1350 3 38 51 0.65536000000000000000e5 +1350 4 2 30 -0.65536000000000000000e5 +1350 4 6 34 -0.13107200000000000000e6 +1350 4 7 35 -0.65536000000000000000e5 +1351 1 26 33 -0.32768000000000000000e5 +1351 1 30 30 0.65536000000000000000e5 +1352 1 17 48 -0.65536000000000000000e5 +1352 1 30 31 0.65536000000000000000e5 +1352 3 13 42 -0.65536000000000000000e5 +1353 1 14 45 -0.13107200000000000000e6 +1353 1 17 48 0.65536000000000000000e5 +1353 1 18 49 0.65536000000000000000e5 +1353 1 30 32 0.65536000000000000000e5 +1353 2 14 28 0.65536000000000000000e5 +1353 3 13 42 0.65536000000000000000e5 +1353 3 14 43 0.65536000000000000000e5 +1354 1 18 49 -0.65536000000000000000e5 +1354 1 30 33 0.65536000000000000000e5 +1354 3 14 43 -0.65536000000000000000e5 +1355 1 14 45 -0.65536000000000000000e5 +1355 1 30 34 0.65536000000000000000e5 +1356 1 11 18 -0.65536000000000000000e5 +1356 1 30 35 0.65536000000000000000e5 +1356 3 6 19 0.65536000000000000000e5 +1356 3 17 30 0.65536000000000000000e5 +1357 1 15 46 -0.65536000000000000000e5 +1357 1 30 36 0.65536000000000000000e5 +1358 1 1 48 0.32768000000000000000e5 +1358 1 2 49 0.32768000000000000000e5 +1358 1 8 39 0.65536000000000000000e5 +1358 1 9 40 0.65536000000000000000e5 +1358 1 10 41 -0.13107200000000000000e6 +1358 1 12 43 -0.26214400000000000000e6 +1358 1 23 38 0.32768000000000000000e5 +1358 1 26 41 -0.65536000000000000000e5 +1358 1 28 43 0.13107200000000000000e6 +1358 1 30 37 0.65536000000000000000e5 +1358 1 32 47 0.26214400000000000000e6 +1358 2 2 32 0.32768000000000000000e5 +1358 2 16 30 0.65536000000000000000e5 +1358 2 20 34 0.13107200000000000000e6 +1358 3 9 38 0.65536000000000000000e5 +1358 3 22 35 0.26214400000000000000e6 +1358 3 28 41 0.26214400000000000000e6 +1358 4 2 30 0.65536000000000000000e5 +1358 4 6 34 0.13107200000000000000e6 +1359 1 26 41 -0.65536000000000000000e5 +1359 1 30 38 0.65536000000000000000e5 +1360 1 1 48 -0.32768000000000000000e5 +1360 1 2 49 -0.32768000000000000000e5 +1360 1 8 39 -0.65536000000000000000e5 +1360 1 9 40 -0.65536000000000000000e5 +1360 1 10 41 0.13107200000000000000e6 +1360 1 12 43 0.26214400000000000000e6 +1360 1 23 38 -0.32768000000000000000e5 +1360 1 26 41 0.13107200000000000000e6 +1360 1 28 43 -0.26214400000000000000e6 +1360 1 30 39 0.65536000000000000000e5 +1360 1 32 47 -0.26214400000000000000e6 +1360 2 2 32 -0.32768000000000000000e5 +1360 2 4 34 0.65536000000000000000e5 +1360 2 16 30 -0.65536000000000000000e5 +1360 2 20 34 -0.13107200000000000000e6 +1360 3 9 38 -0.65536000000000000000e5 +1360 3 22 35 -0.26214400000000000000e6 +1360 3 28 41 -0.26214400000000000000e6 +1360 4 2 30 -0.65536000000000000000e5 +1360 4 6 34 -0.13107200000000000000e6 +1361 1 1 48 0.32768000000000000000e5 +1361 1 2 49 0.32768000000000000000e5 +1361 1 8 39 0.65536000000000000000e5 +1361 1 9 40 0.65536000000000000000e5 +1361 1 10 41 -0.13107200000000000000e6 +1361 1 12 43 -0.26214400000000000000e6 +1361 1 23 38 0.32768000000000000000e5 +1361 1 26 41 -0.65536000000000000000e5 +1361 1 28 43 0.26214400000000000000e6 +1361 1 30 40 0.65536000000000000000e5 +1361 1 32 47 0.26214400000000000000e6 +1361 1 33 48 -0.13107200000000000000e6 +1361 2 2 32 0.32768000000000000000e5 +1361 2 4 34 -0.65536000000000000000e5 +1361 2 16 30 0.65536000000000000000e5 +1361 2 20 34 0.13107200000000000000e6 +1361 2 28 34 0.65536000000000000000e5 +1361 3 9 38 0.65536000000000000000e5 +1361 3 22 35 0.26214400000000000000e6 +1361 3 28 41 0.26214400000000000000e6 +1361 3 29 42 -0.13107200000000000000e6 +1361 4 2 30 0.65536000000000000000e5 +1361 4 6 34 0.13107200000000000000e6 +1361 4 18 30 0.65536000000000000000e5 +1361 4 21 33 0.65536000000000000000e5 +1362 1 28 43 -0.65536000000000000000e5 +1362 1 30 41 0.65536000000000000000e5 +1363 1 30 42 0.65536000000000000000e5 +1363 1 33 48 -0.65536000000000000000e5 +1363 3 29 42 -0.65536000000000000000e5 +1364 1 30 43 0.65536000000000000000e5 +1364 1 33 40 -0.65536000000000000000e5 +1365 1 30 44 0.65536000000000000000e5 +1365 1 34 49 -0.65536000000000000000e5 +1365 3 18 47 -0.65536000000000000000e5 +1366 1 18 49 -0.65536000000000000000e5 +1366 1 30 45 0.65536000000000000000e5 +1367 1 11 18 -0.65536000000000000000e5 +1367 1 30 46 0.65536000000000000000e5 +1367 3 6 19 0.65536000000000000000e5 +1367 3 15 44 0.65536000000000000000e5 +1367 3 17 30 0.65536000000000000000e5 +1368 1 26 41 -0.65536000000000000000e5 +1368 1 30 47 0.65536000000000000000e5 +1368 3 27 40 0.65536000000000000000e5 +1369 1 1 48 -0.32768000000000000000e5 +1369 1 2 49 -0.32768000000000000000e5 +1369 1 8 39 -0.65536000000000000000e5 +1369 1 9 40 -0.65536000000000000000e5 +1369 1 10 41 0.13107200000000000000e6 +1369 1 12 43 0.26214400000000000000e6 +1369 1 23 38 -0.32768000000000000000e5 +1369 1 26 41 0.13107200000000000000e6 +1369 1 28 43 -0.26214400000000000000e6 +1369 1 30 48 0.65536000000000000000e5 +1369 1 32 47 -0.26214400000000000000e6 +1369 2 2 32 -0.32768000000000000000e5 +1369 2 4 34 0.65536000000000000000e5 +1369 2 16 30 -0.65536000000000000000e5 +1369 2 20 34 -0.13107200000000000000e6 +1369 3 5 50 0.65536000000000000000e5 +1369 3 9 38 -0.65536000000000000000e5 +1369 3 22 35 -0.26214400000000000000e6 +1369 3 28 41 -0.26214400000000000000e6 +1369 4 2 30 -0.65536000000000000000e5 +1369 4 6 34 -0.13107200000000000000e6 +1370 1 1 48 0.32768000000000000000e5 +1370 1 2 49 0.32768000000000000000e5 +1370 1 8 39 0.65536000000000000000e5 +1370 1 9 40 0.65536000000000000000e5 +1370 1 10 41 -0.13107200000000000000e6 +1370 1 12 43 -0.26214400000000000000e6 +1370 1 23 38 0.32768000000000000000e5 +1370 1 26 41 -0.65536000000000000000e5 +1370 1 28 43 0.26214400000000000000e6 +1370 1 30 49 0.65536000000000000000e5 +1370 1 32 47 0.26214400000000000000e6 +1370 1 33 48 -0.13107200000000000000e6 +1370 2 2 32 0.32768000000000000000e5 +1370 2 4 34 -0.65536000000000000000e5 +1370 2 16 30 0.65536000000000000000e5 +1370 2 20 34 0.13107200000000000000e6 +1370 2 28 34 0.65536000000000000000e5 +1370 3 5 50 -0.65536000000000000000e5 +1370 3 9 38 0.65536000000000000000e5 +1370 3 22 35 0.26214400000000000000e6 +1370 3 27 40 -0.65536000000000000000e5 +1370 3 28 41 0.26214400000000000000e6 +1370 4 2 30 0.65536000000000000000e5 +1370 4 6 34 0.13107200000000000000e6 +1370 4 21 33 0.65536000000000000000e5 +1371 1 30 50 0.65536000000000000000e5 +1371 1 33 48 -0.65536000000000000000e5 +1372 1 30 51 0.65536000000000000000e5 +1372 1 33 40 -0.65536000000000000000e5 +1372 3 14 51 0.13107200000000000000e6 +1372 3 29 42 -0.65536000000000000000e5 +1372 3 30 43 -0.65536000000000000000e5 +1372 4 19 31 -0.65536000000000000000e5 +1373 1 18 49 -0.65536000000000000000e5 +1373 1 30 52 0.65536000000000000000e5 +1373 3 14 51 0.65536000000000000000e5 +1374 1 1 48 -0.32768000000000000000e5 +1374 1 2 49 -0.32768000000000000000e5 +1374 1 8 39 -0.65536000000000000000e5 +1374 1 9 40 -0.65536000000000000000e5 +1374 1 10 41 0.13107200000000000000e6 +1374 1 12 43 0.26214400000000000000e6 +1374 1 23 38 -0.32768000000000000000e5 +1374 1 24 55 0.65536000000000000000e5 +1374 1 26 41 0.65536000000000000000e5 +1374 1 28 43 -0.26214400000000000000e6 +1374 1 30 53 0.65536000000000000000e5 +1374 1 32 47 -0.26214400000000000000e6 +1374 2 2 32 -0.32768000000000000000e5 +1374 2 4 34 0.65536000000000000000e5 +1374 2 16 30 -0.65536000000000000000e5 +1374 2 20 34 -0.13107200000000000000e6 +1374 3 5 50 0.65536000000000000000e5 +1374 3 9 38 -0.65536000000000000000e5 +1374 3 22 35 -0.26214400000000000000e6 +1374 3 22 51 -0.65536000000000000000e5 +1374 3 23 52 0.13107200000000000000e6 +1374 3 27 40 0.65536000000000000000e5 +1374 3 28 41 -0.26214400000000000000e6 +1374 4 2 30 -0.65536000000000000000e5 +1374 4 6 34 -0.13107200000000000000e6 +1374 4 7 35 -0.65536000000000000000e5 +1375 1 1 48 0.32768000000000000000e5 +1375 1 2 49 0.32768000000000000000e5 +1375 1 8 39 0.65536000000000000000e5 +1375 1 9 40 0.65536000000000000000e5 +1375 1 10 41 -0.13107200000000000000e6 +1375 1 12 43 -0.26214400000000000000e6 +1375 1 23 38 0.32768000000000000000e5 +1375 1 26 41 -0.65536000000000000000e5 +1375 1 28 43 0.26214400000000000000e6 +1375 1 30 54 0.65536000000000000000e5 +1375 1 32 47 0.26214400000000000000e6 +1375 1 33 48 -0.13107200000000000000e6 +1375 2 2 32 0.32768000000000000000e5 +1375 2 4 34 -0.65536000000000000000e5 +1375 2 16 30 0.65536000000000000000e5 +1375 2 20 34 0.13107200000000000000e6 +1375 2 28 34 0.65536000000000000000e5 +1375 3 5 50 -0.65536000000000000000e5 +1375 3 9 38 0.65536000000000000000e5 +1375 3 10 55 -0.13107200000000000000e6 +1375 3 22 35 0.26214400000000000000e6 +1375 3 22 51 0.65536000000000000000e5 +1375 3 23 52 -0.13107200000000000000e6 +1375 3 27 40 -0.65536000000000000000e5 +1375 3 28 41 0.26214400000000000000e6 +1375 3 35 48 0.26214400000000000000e6 +1375 3 40 45 -0.13107200000000000000e6 +1375 4 2 30 0.65536000000000000000e5 +1375 4 6 34 0.13107200000000000000e6 +1375 4 7 35 0.65536000000000000000e5 +1375 4 22 34 -0.13107200000000000000e6 +1376 1 30 55 0.65536000000000000000e5 +1376 1 33 40 -0.65536000000000000000e5 +1376 3 10 55 0.65536000000000000000e5 +1376 3 14 51 0.13107200000000000000e6 +1376 3 29 42 -0.65536000000000000000e5 +1376 3 30 43 -0.65536000000000000000e5 +1376 4 19 31 -0.65536000000000000000e5 +1377 1 30 56 0.65536000000000000000e5 +1377 1 40 55 -0.65536000000000000000e5 +1378 1 27 34 -0.32768000000000000000e5 +1378 1 31 31 0.65536000000000000000e5 +1379 1 13 44 -0.65536000000000000000e5 +1379 1 31 32 0.65536000000000000000e5 +1380 1 4 35 -0.32768000000000000000e5 +1380 1 12 43 -0.32768000000000000000e5 +1380 1 14 45 -0.65536000000000000000e5 +1380 1 17 48 0.32768000000000000000e5 +1380 1 18 49 0.32768000000000000000e5 +1380 1 31 33 0.65536000000000000000e5 +1380 2 9 23 -0.32768000000000000000e5 +1380 2 14 28 0.32768000000000000000e5 +1380 3 5 34 -0.32768000000000000000e5 +1380 3 13 42 0.32768000000000000000e5 +1380 3 14 27 -0.32768000000000000000e5 +1380 3 14 43 0.32768000000000000000e5 +1380 3 16 29 0.65536000000000000000e5 +1381 1 20 27 -0.65536000000000000000e5 +1381 1 31 34 0.65536000000000000000e5 +1381 3 7 36 0.65536000000000000000e5 +1382 1 3 18 -0.16384000000000000000e5 +1382 1 4 19 0.32768000000000000000e5 +1382 1 5 36 0.32768000000000000000e5 +1382 1 12 43 0.16384000000000000000e5 +1382 1 13 44 -0.32768000000000000000e5 +1382 1 14 45 -0.32768000000000000000e5 +1382 1 17 32 -0.65536000000000000000e5 +1382 1 31 35 0.65536000000000000000e5 +1382 3 3 16 -0.16384000000000000000e5 +1382 3 4 17 -0.16384000000000000000e5 +1382 3 14 27 0.16384000000000000000e5 +1382 3 16 29 0.32768000000000000000e5 +1382 4 2 14 -0.16384000000000000000e5 +1382 4 11 23 0.32768000000000000000e5 +1383 1 3 18 -0.81920000000000000000e4 +1383 1 4 19 0.16384000000000000000e5 +1383 1 5 36 0.16384000000000000000e5 +1383 1 12 43 0.81920000000000000000e4 +1383 1 13 20 -0.65536000000000000000e5 +1383 1 13 44 -0.16384000000000000000e5 +1383 1 14 45 -0.16384000000000000000e5 +1383 1 31 36 0.65536000000000000000e5 +1383 2 11 25 0.32768000000000000000e5 +1383 2 15 29 -0.32768000000000000000e5 +1383 3 3 16 -0.81920000000000000000e4 +1383 3 4 17 -0.81920000000000000000e4 +1383 3 7 36 0.32768000000000000000e5 +1383 3 8 21 0.65536000000000000000e5 +1383 3 14 27 0.81920000000000000000e4 +1383 3 16 29 0.16384000000000000000e5 +1383 3 18 31 0.32768000000000000000e5 +1383 4 2 14 -0.81920000000000000000e4 +1383 4 11 23 0.16384000000000000000e5 +1384 1 2 33 0.65536000000000000000e5 +1384 1 3 34 -0.13107200000000000000e6 +1384 1 9 40 -0.32768000000000000000e5 +1384 1 10 41 0.13107200000000000000e6 +1384 1 26 41 0.32768000000000000000e5 +1384 1 31 37 0.65536000000000000000e5 +1384 1 32 47 -0.65536000000000000000e5 +1384 2 7 21 0.65536000000000000000e5 +1384 3 2 31 0.65536000000000000000e5 +1384 3 3 32 0.65536000000000000000e5 +1384 3 8 37 0.32768000000000000000e5 +1384 3 9 38 -0.32768000000000000000e5 +1384 3 22 27 0.32768000000000000000e5 +1384 3 28 41 -0.65536000000000000000e5 +1384 4 1 29 0.32768000000000000000e5 +1384 4 2 30 -0.32768000000000000000e5 +1385 1 12 43 -0.13107200000000000000e6 +1385 1 28 43 0.65536000000000000000e5 +1385 1 31 38 0.65536000000000000000e5 +1385 1 32 47 0.65536000000000000000e5 +1385 2 20 34 0.65536000000000000000e5 +1385 3 22 35 0.13107200000000000000e6 +1385 3 28 41 0.65536000000000000000e5 +1385 4 6 34 0.65536000000000000000e5 +1386 1 31 39 0.65536000000000000000e5 +1386 1 32 47 -0.65536000000000000000e5 +1386 3 28 41 -0.65536000000000000000e5 +1387 1 28 43 -0.65536000000000000000e5 +1387 1 31 40 0.65536000000000000000e5 +1388 1 16 47 -0.65536000000000000000e5 +1388 1 31 41 0.65536000000000000000e5 +1389 1 12 43 -0.65536000000000000000e5 +1389 1 31 42 0.65536000000000000000e5 +1389 3 22 35 0.65536000000000000000e5 +1390 1 17 48 -0.65536000000000000000e5 +1390 1 31 43 0.65536000000000000000e5 +1391 1 31 44 0.65536000000000000000e5 +1391 1 34 41 -0.65536000000000000000e5 +1392 1 4 35 -0.32768000000000000000e5 +1392 1 12 43 -0.32768000000000000000e5 +1392 1 31 45 0.65536000000000000000e5 +1392 1 34 49 -0.32768000000000000000e5 +1392 2 9 23 -0.32768000000000000000e5 +1392 3 5 34 -0.32768000000000000000e5 +1392 3 13 42 0.32768000000000000000e5 +1392 3 14 27 -0.32768000000000000000e5 +1392 3 16 29 0.65536000000000000000e5 +1392 3 18 47 -0.32768000000000000000e5 +1392 3 22 35 0.32768000000000000000e5 +1392 4 14 26 0.32768000000000000000e5 +1393 1 19 50 -0.65536000000000000000e5 +1393 1 31 46 0.65536000000000000000e5 +1394 1 6 53 -0.16384000000000000000e5 +1394 1 12 43 -0.13107200000000000000e6 +1394 1 25 40 0.16384000000000000000e5 +1394 1 28 43 0.65536000000000000000e5 +1394 1 31 47 0.65536000000000000000e5 +1394 1 32 47 0.65536000000000000000e5 +1394 2 4 34 -0.32768000000000000000e5 +1394 2 20 34 0.65536000000000000000e5 +1394 2 21 35 0.32768000000000000000e5 +1394 3 5 50 -0.32768000000000000000e5 +1394 3 7 52 0.13107200000000000000e6 +1394 3 22 35 0.13107200000000000000e6 +1394 3 24 37 -0.16384000000000000000e5 +1394 3 27 40 -0.65536000000000000000e5 +1394 4 4 32 0.16384000000000000000e5 +1394 4 7 35 0.32768000000000000000e5 +1394 4 16 28 -0.16384000000000000000e5 +1395 1 31 48 0.65536000000000000000e5 +1395 1 32 47 -0.65536000000000000000e5 +1396 1 6 53 0.16384000000000000000e5 +1396 1 25 40 -0.16384000000000000000e5 +1396 1 28 43 -0.65536000000000000000e5 +1396 1 31 49 0.65536000000000000000e5 +1396 2 4 34 0.32768000000000000000e5 +1396 2 21 35 -0.32768000000000000000e5 +1396 3 5 50 0.32768000000000000000e5 +1396 3 24 37 0.16384000000000000000e5 +1396 3 27 40 0.65536000000000000000e5 +1396 4 4 32 -0.16384000000000000000e5 +1396 4 7 35 -0.32768000000000000000e5 +1396 4 16 28 0.16384000000000000000e5 +1397 1 12 43 -0.65536000000000000000e5 +1397 1 31 50 0.65536000000000000000e5 +1397 3 7 52 0.65536000000000000000e5 +1397 3 22 35 0.65536000000000000000e5 +1398 1 6 53 0.81920000000000000000e4 +1398 1 17 48 -0.65536000000000000000e5 +1398 1 25 40 -0.81920000000000000000e4 +1398 1 31 51 0.65536000000000000000e5 +1398 2 4 34 0.16384000000000000000e5 +1398 2 21 35 -0.16384000000000000000e5 +1398 3 5 50 0.16384000000000000000e5 +1398 3 24 37 0.81920000000000000000e4 +1398 3 27 40 0.32768000000000000000e5 +1398 3 28 41 0.32768000000000000000e5 +1398 3 29 42 0.32768000000000000000e5 +1398 4 4 32 -0.81920000000000000000e4 +1398 4 7 35 -0.16384000000000000000e5 +1398 4 16 28 0.81920000000000000000e4 +1398 4 23 27 0.32768000000000000000e5 +1399 1 4 35 -0.32768000000000000000e5 +1399 1 12 43 -0.32768000000000000000e5 +1399 1 31 52 0.65536000000000000000e5 +1399 1 34 49 -0.32768000000000000000e5 +1399 2 9 23 -0.32768000000000000000e5 +1399 3 5 34 -0.32768000000000000000e5 +1399 3 13 42 0.32768000000000000000e5 +1399 3 14 27 -0.32768000000000000000e5 +1399 3 16 29 0.65536000000000000000e5 +1399 3 18 47 -0.32768000000000000000e5 +1399 3 22 35 0.32768000000000000000e5 +1399 3 31 44 0.65536000000000000000e5 +1399 4 14 26 0.32768000000000000000e5 +1400 1 31 53 0.65536000000000000000e5 +1400 1 37 52 -0.65536000000000000000e5 +1401 1 6 53 0.16384000000000000000e5 +1401 1 25 40 -0.16384000000000000000e5 +1401 1 28 43 -0.65536000000000000000e5 +1401 1 31 54 0.65536000000000000000e5 +1401 2 4 34 0.32768000000000000000e5 +1401 2 21 35 -0.32768000000000000000e5 +1401 3 5 50 0.32768000000000000000e5 +1401 3 23 52 0.65536000000000000000e5 +1401 3 24 37 0.16384000000000000000e5 +1401 3 27 40 0.65536000000000000000e5 +1401 4 4 32 -0.16384000000000000000e5 +1401 4 7 35 -0.32768000000000000000e5 +1401 4 16 28 0.16384000000000000000e5 +1402 1 6 53 0.81920000000000000000e4 +1402 1 17 48 -0.65536000000000000000e5 +1402 1 25 40 -0.81920000000000000000e4 +1402 1 31 55 0.65536000000000000000e5 +1402 2 4 34 0.16384000000000000000e5 +1402 2 21 35 -0.16384000000000000000e5 +1402 3 5 50 0.16384000000000000000e5 +1402 3 24 37 0.81920000000000000000e4 +1402 3 27 40 0.32768000000000000000e5 +1402 3 28 41 0.32768000000000000000e5 +1402 3 29 42 0.32768000000000000000e5 +1402 3 34 47 0.65536000000000000000e5 +1402 4 4 32 -0.81920000000000000000e4 +1402 4 7 35 -0.16384000000000000000e5 +1402 4 16 28 0.81920000000000000000e4 +1402 4 23 27 0.32768000000000000000e5 +1403 1 1 48 0.16384000000000000000e5 +1403 1 2 49 0.16384000000000000000e5 +1403 1 6 53 0.16384000000000000000e5 +1403 1 8 39 0.32768000000000000000e5 +1403 1 9 40 0.32768000000000000000e5 +1403 1 10 41 -0.65536000000000000000e5 +1403 1 12 43 -0.13107200000000000000e6 +1403 1 23 38 0.16384000000000000000e5 +1403 1 24 55 -0.32768000000000000000e5 +1403 1 25 40 -0.16384000000000000000e5 +1403 1 26 41 -0.32768000000000000000e5 +1403 1 28 43 0.65536000000000000000e5 +1403 1 31 56 0.65536000000000000000e5 +1403 1 32 47 0.13107200000000000000e6 +1403 1 33 48 -0.65536000000000000000e5 +1403 1 40 55 0.32768000000000000000e5 +1403 1 41 56 0.32768000000000000000e5 +1403 1 44 51 0.13107200000000000000e6 +1403 1 46 53 -0.13107200000000000000e6 +1403 2 2 32 0.16384000000000000000e5 +1403 2 16 30 0.32768000000000000000e5 +1403 2 20 34 0.65536000000000000000e5 +1403 2 21 35 -0.32768000000000000000e5 +1403 2 28 34 0.32768000000000000000e5 +1403 3 9 38 0.32768000000000000000e5 +1403 3 10 55 -0.65536000000000000000e5 +1403 3 22 35 0.13107200000000000000e6 +1403 3 22 51 0.32768000000000000000e5 +1403 3 24 37 0.16384000000000000000e5 +1403 3 27 40 0.32768000000000000000e5 +1403 3 27 56 0.32768000000000000000e5 +1403 3 28 41 0.13107200000000000000e6 +1403 3 35 48 0.13107200000000000000e6 +1403 3 38 51 -0.32768000000000000000e5 +1403 3 39 52 -0.65536000000000000000e5 +1403 3 40 45 -0.65536000000000000000e5 +1403 4 2 30 0.32768000000000000000e5 +1403 4 4 32 -0.16384000000000000000e5 +1403 4 6 34 0.65536000000000000000e5 +1403 4 16 28 0.16384000000000000000e5 +1403 4 22 34 -0.65536000000000000000e5 +1403 4 23 35 -0.65536000000000000000e5 +1403 4 29 33 -0.32768000000000000000e5 +1404 1 4 35 -0.16384000000000000000e5 +1404 1 12 43 -0.16384000000000000000e5 +1404 1 14 45 -0.32768000000000000000e5 +1404 1 17 48 0.16384000000000000000e5 +1404 1 18 49 0.16384000000000000000e5 +1404 1 32 32 0.65536000000000000000e5 +1404 2 9 23 -0.16384000000000000000e5 +1404 2 14 28 0.16384000000000000000e5 +1404 3 5 34 -0.16384000000000000000e5 +1404 3 13 42 0.16384000000000000000e5 +1404 3 14 27 -0.16384000000000000000e5 +1404 3 14 43 0.16384000000000000000e5 +1404 3 16 29 0.32768000000000000000e5 +1405 1 14 45 -0.65536000000000000000e5 +1405 1 32 33 0.65536000000000000000e5 +1406 1 3 18 -0.16384000000000000000e5 +1406 1 4 19 0.32768000000000000000e5 +1406 1 5 36 0.32768000000000000000e5 +1406 1 12 43 0.16384000000000000000e5 +1406 1 13 44 -0.32768000000000000000e5 +1406 1 14 45 -0.32768000000000000000e5 +1406 1 17 32 -0.65536000000000000000e5 +1406 1 32 34 0.65536000000000000000e5 +1406 3 3 16 -0.16384000000000000000e5 +1406 3 4 17 -0.16384000000000000000e5 +1406 3 14 27 0.16384000000000000000e5 +1406 3 16 29 0.32768000000000000000e5 +1406 4 2 14 -0.16384000000000000000e5 +1406 4 11 23 0.32768000000000000000e5 +1407 1 13 20 -0.13107200000000000000e6 +1407 1 17 32 0.65536000000000000000e5 +1407 1 20 27 0.65536000000000000000e5 +1407 1 32 35 0.65536000000000000000e5 +1407 2 11 25 0.65536000000000000000e5 +1407 3 8 21 0.13107200000000000000e6 +1407 3 18 31 0.65536000000000000000e5 +1408 1 6 21 -0.32768000000000000000e5 +1408 1 13 20 -0.65536000000000000000e5 +1408 1 20 27 0.32768000000000000000e5 +1408 1 32 36 0.65536000000000000000e5 +1408 2 9 15 -0.32768000000000000000e5 +1408 2 11 25 0.32768000000000000000e5 +1408 3 7 20 0.32768000000000000000e5 +1408 3 14 19 0.65536000000000000000e5 +1408 3 19 32 0.65536000000000000000e5 +1408 4 10 14 0.32768000000000000000e5 +1409 1 12 43 -0.13107200000000000000e6 +1409 1 28 43 0.65536000000000000000e5 +1409 1 32 37 0.65536000000000000000e5 +1409 1 32 47 0.65536000000000000000e5 +1409 2 20 34 0.65536000000000000000e5 +1409 3 22 35 0.13107200000000000000e6 +1409 3 28 41 0.65536000000000000000e5 +1409 4 6 34 0.65536000000000000000e5 +1410 1 32 38 0.65536000000000000000e5 +1410 1 32 47 -0.65536000000000000000e5 +1410 3 28 41 -0.65536000000000000000e5 +1411 1 28 43 -0.65536000000000000000e5 +1411 1 32 39 0.65536000000000000000e5 +1412 1 32 40 0.65536000000000000000e5 +1412 1 33 48 -0.65536000000000000000e5 +1412 3 29 42 -0.65536000000000000000e5 +1413 1 12 43 -0.65536000000000000000e5 +1413 1 32 41 0.65536000000000000000e5 +1413 3 22 35 0.65536000000000000000e5 +1414 1 17 48 -0.65536000000000000000e5 +1414 1 32 42 0.65536000000000000000e5 +1415 1 32 43 0.65536000000000000000e5 +1415 1 34 49 -0.65536000000000000000e5 +1415 3 18 47 -0.65536000000000000000e5 +1416 1 4 35 -0.32768000000000000000e5 +1416 1 12 43 -0.32768000000000000000e5 +1416 1 32 44 0.65536000000000000000e5 +1416 1 34 49 -0.32768000000000000000e5 +1416 2 9 23 -0.32768000000000000000e5 +1416 3 5 34 -0.32768000000000000000e5 +1416 3 13 42 0.32768000000000000000e5 +1416 3 14 27 -0.32768000000000000000e5 +1416 3 16 29 0.65536000000000000000e5 +1416 3 18 47 -0.32768000000000000000e5 +1416 3 22 35 0.32768000000000000000e5 +1416 4 14 26 0.32768000000000000000e5 +1417 1 14 45 -0.13107200000000000000e6 +1417 1 17 48 0.32768000000000000000e5 +1417 1 18 49 0.32768000000000000000e5 +1417 1 32 45 0.65536000000000000000e5 +1417 1 34 49 0.32768000000000000000e5 +1417 2 14 28 0.32768000000000000000e5 +1417 3 14 43 0.32768000000000000000e5 +1417 3 15 44 -0.65536000000000000000e5 +1417 3 16 45 0.13107200000000000000e6 +1417 3 18 47 0.32768000000000000000e5 +1417 3 22 35 -0.32768000000000000000e5 +1417 4 14 26 -0.32768000000000000000e5 +1417 4 15 27 -0.65536000000000000000e5 +1418 1 13 20 -0.13107200000000000000e6 +1418 1 17 32 0.65536000000000000000e5 +1418 1 20 27 0.65536000000000000000e5 +1418 1 32 46 0.65536000000000000000e5 +1418 2 11 25 0.65536000000000000000e5 +1418 3 8 21 0.13107200000000000000e6 +1418 3 16 45 0.65536000000000000000e5 +1418 3 18 31 0.65536000000000000000e5 +1419 1 6 53 0.16384000000000000000e5 +1419 1 25 40 -0.16384000000000000000e5 +1419 1 28 43 -0.65536000000000000000e5 +1419 1 32 48 0.65536000000000000000e5 +1419 2 4 34 0.32768000000000000000e5 +1419 2 21 35 -0.32768000000000000000e5 +1419 3 5 50 0.32768000000000000000e5 +1419 3 24 37 0.16384000000000000000e5 +1419 3 27 40 0.65536000000000000000e5 +1419 4 4 32 -0.16384000000000000000e5 +1419 4 7 35 -0.32768000000000000000e5 +1419 4 16 28 0.16384000000000000000e5 +1420 1 32 49 0.65536000000000000000e5 +1420 1 33 48 -0.65536000000000000000e5 +1421 1 6 53 0.81920000000000000000e4 +1421 1 17 48 -0.65536000000000000000e5 +1421 1 25 40 -0.81920000000000000000e4 +1421 1 32 50 0.65536000000000000000e5 +1421 2 4 34 0.16384000000000000000e5 +1421 2 21 35 -0.16384000000000000000e5 +1421 3 5 50 0.16384000000000000000e5 +1421 3 24 37 0.81920000000000000000e4 +1421 3 27 40 0.32768000000000000000e5 +1421 3 28 41 0.32768000000000000000e5 +1421 3 29 42 0.32768000000000000000e5 +1421 4 4 32 -0.81920000000000000000e4 +1421 4 7 35 -0.16384000000000000000e5 +1421 4 16 28 0.81920000000000000000e4 +1421 4 23 27 0.32768000000000000000e5 +1422 1 32 51 0.65536000000000000000e5 +1422 1 34 49 -0.65536000000000000000e5 +1423 1 14 45 -0.13107200000000000000e6 +1423 1 17 48 0.32768000000000000000e5 +1423 1 18 49 0.32768000000000000000e5 +1423 1 32 52 0.65536000000000000000e5 +1423 1 34 49 0.32768000000000000000e5 +1423 2 14 28 0.32768000000000000000e5 +1423 3 14 43 0.32768000000000000000e5 +1423 3 15 44 -0.65536000000000000000e5 +1423 3 16 45 0.13107200000000000000e6 +1423 3 18 47 0.32768000000000000000e5 +1423 3 19 48 0.65536000000000000000e5 +1423 3 22 35 -0.32768000000000000000e5 +1423 4 14 26 -0.32768000000000000000e5 +1423 4 15 27 -0.65536000000000000000e5 +1424 1 6 53 0.16384000000000000000e5 +1424 1 25 40 -0.16384000000000000000e5 +1424 1 28 43 -0.65536000000000000000e5 +1424 1 32 53 0.65536000000000000000e5 +1424 2 4 34 0.32768000000000000000e5 +1424 2 21 35 -0.32768000000000000000e5 +1424 3 5 50 0.32768000000000000000e5 +1424 3 23 52 0.65536000000000000000e5 +1424 3 24 37 0.16384000000000000000e5 +1424 3 27 40 0.65536000000000000000e5 +1424 4 4 32 -0.16384000000000000000e5 +1424 4 7 35 -0.32768000000000000000e5 +1424 4 16 28 0.16384000000000000000e5 +1425 1 32 54 0.65536000000000000000e5 +1425 1 33 48 -0.65536000000000000000e5 +1425 3 10 55 -0.65536000000000000000e5 +1425 3 35 48 0.13107200000000000000e6 +1425 3 40 45 -0.65536000000000000000e5 +1425 4 22 34 -0.65536000000000000000e5 +1426 1 32 55 0.65536000000000000000e5 +1426 1 44 51 -0.65536000000000000000e5 +1427 1 1 48 -0.16384000000000000000e5 +1427 1 2 49 -0.16384000000000000000e5 +1427 1 8 39 -0.32768000000000000000e5 +1427 1 9 40 -0.32768000000000000000e5 +1427 1 10 41 0.65536000000000000000e5 +1427 1 12 43 0.13107200000000000000e6 +1427 1 23 38 -0.16384000000000000000e5 +1427 1 24 55 0.32768000000000000000e5 +1427 1 26 41 0.32768000000000000000e5 +1427 1 28 43 -0.13107200000000000000e6 +1427 1 32 47 -0.13107200000000000000e6 +1427 1 32 56 0.65536000000000000000e5 +1427 1 40 55 -0.32768000000000000000e5 +1427 1 41 56 -0.32768000000000000000e5 +1427 2 2 32 -0.16384000000000000000e5 +1427 2 4 34 0.32768000000000000000e5 +1427 2 16 30 -0.32768000000000000000e5 +1427 2 20 34 -0.65536000000000000000e5 +1427 2 28 34 -0.32768000000000000000e5 +1427 3 5 50 0.32768000000000000000e5 +1427 3 9 38 -0.32768000000000000000e5 +1427 3 22 35 -0.13107200000000000000e6 +1427 3 22 51 -0.32768000000000000000e5 +1427 3 23 52 0.65536000000000000000e5 +1427 3 27 40 0.32768000000000000000e5 +1427 3 27 56 -0.32768000000000000000e5 +1427 3 28 41 -0.13107200000000000000e6 +1427 3 38 51 0.32768000000000000000e5 +1427 4 2 30 -0.32768000000000000000e5 +1427 4 6 34 -0.65536000000000000000e5 +1427 4 7 35 -0.32768000000000000000e5 +1427 4 29 33 0.32768000000000000000e5 +1428 1 11 18 -0.32768000000000000000e5 +1428 1 33 33 0.65536000000000000000e5 +1428 3 6 19 0.32768000000000000000e5 +1428 3 17 30 0.32768000000000000000e5 +1429 1 13 20 -0.13107200000000000000e6 +1429 1 17 32 0.65536000000000000000e5 +1429 1 20 27 0.65536000000000000000e5 +1429 1 33 34 0.65536000000000000000e5 +1429 2 11 25 0.65536000000000000000e5 +1429 3 8 21 0.13107200000000000000e6 +1429 3 18 31 0.65536000000000000000e5 +1430 1 15 46 -0.65536000000000000000e5 +1430 1 33 35 0.65536000000000000000e5 +1431 1 32 47 -0.65536000000000000000e5 +1431 1 33 37 0.65536000000000000000e5 +1431 3 28 41 -0.65536000000000000000e5 +1432 1 28 43 -0.65536000000000000000e5 +1432 1 33 38 0.65536000000000000000e5 +1433 1 33 39 0.65536000000000000000e5 +1433 1 33 48 -0.65536000000000000000e5 +1433 3 29 42 -0.65536000000000000000e5 +1434 1 17 48 -0.65536000000000000000e5 +1434 1 33 41 0.65536000000000000000e5 +1435 1 33 42 0.65536000000000000000e5 +1435 1 34 49 -0.65536000000000000000e5 +1435 3 18 47 -0.65536000000000000000e5 +1436 1 18 49 -0.65536000000000000000e5 +1436 1 33 43 0.65536000000000000000e5 +1437 1 14 45 -0.13107200000000000000e6 +1437 1 17 48 0.32768000000000000000e5 +1437 1 18 49 0.32768000000000000000e5 +1437 1 33 44 0.65536000000000000000e5 +1437 1 34 49 0.32768000000000000000e5 +1437 2 14 28 0.32768000000000000000e5 +1437 3 14 43 0.32768000000000000000e5 +1437 3 15 44 -0.65536000000000000000e5 +1437 3 16 45 0.13107200000000000000e6 +1437 3 18 47 0.32768000000000000000e5 +1437 3 22 35 -0.32768000000000000000e5 +1437 4 14 26 -0.32768000000000000000e5 +1437 4 15 27 -0.65536000000000000000e5 +1438 1 11 18 -0.65536000000000000000e5 +1438 1 33 45 0.65536000000000000000e5 +1438 3 6 19 0.65536000000000000000e5 +1438 3 15 44 0.65536000000000000000e5 +1438 3 17 30 0.65536000000000000000e5 +1439 1 20 51 -0.65536000000000000000e5 +1439 1 33 46 0.65536000000000000000e5 +1440 1 6 53 0.16384000000000000000e5 +1440 1 25 40 -0.16384000000000000000e5 +1440 1 28 43 -0.65536000000000000000e5 +1440 1 33 47 0.65536000000000000000e5 +1440 2 4 34 0.32768000000000000000e5 +1440 2 21 35 -0.32768000000000000000e5 +1440 3 5 50 0.32768000000000000000e5 +1440 3 24 37 0.16384000000000000000e5 +1440 3 27 40 0.65536000000000000000e5 +1440 4 4 32 -0.16384000000000000000e5 +1440 4 7 35 -0.32768000000000000000e5 +1440 4 16 28 0.16384000000000000000e5 +1441 1 33 40 -0.65536000000000000000e5 +1441 1 33 49 0.65536000000000000000e5 +1441 3 14 51 0.13107200000000000000e6 +1441 3 29 42 -0.65536000000000000000e5 +1441 3 30 43 -0.65536000000000000000e5 +1441 4 19 31 -0.65536000000000000000e5 +1442 1 33 50 0.65536000000000000000e5 +1442 1 34 49 -0.65536000000000000000e5 +1443 1 18 49 -0.65536000000000000000e5 +1443 1 33 51 0.65536000000000000000e5 +1443 3 14 51 0.65536000000000000000e5 +1444 1 11 18 -0.65536000000000000000e5 +1444 1 33 52 0.65536000000000000000e5 +1444 3 6 19 0.65536000000000000000e5 +1444 3 15 44 0.65536000000000000000e5 +1444 3 17 30 0.65536000000000000000e5 +1444 3 32 45 0.65536000000000000000e5 +1445 1 33 48 -0.65536000000000000000e5 +1445 1 33 53 0.65536000000000000000e5 +1445 3 10 55 -0.65536000000000000000e5 +1445 3 35 48 0.13107200000000000000e6 +1445 3 40 45 -0.65536000000000000000e5 +1445 4 22 34 -0.65536000000000000000e5 +1446 1 33 40 -0.65536000000000000000e5 +1446 1 33 54 0.65536000000000000000e5 +1446 3 10 55 0.65536000000000000000e5 +1446 3 14 51 0.13107200000000000000e6 +1446 3 29 42 -0.65536000000000000000e5 +1446 3 30 43 -0.65536000000000000000e5 +1446 4 19 31 -0.65536000000000000000e5 +1447 1 18 49 -0.65536000000000000000e5 +1447 1 33 55 0.65536000000000000000e5 +1447 3 14 51 0.65536000000000000000e5 +1447 3 35 48 0.65536000000000000000e5 +1448 1 33 40 -0.65536000000000000000e5 +1448 1 33 56 0.65536000000000000000e5 +1448 3 10 55 0.65536000000000000000e5 +1448 3 14 51 0.13107200000000000000e6 +1448 3 29 42 -0.65536000000000000000e5 +1448 3 30 43 -0.65536000000000000000e5 +1448 3 39 52 0.65536000000000000000e5 +1448 4 19 31 -0.65536000000000000000e5 +1449 1 3 18 -0.40960000000000000000e4 +1449 1 4 19 0.81920000000000000000e4 +1449 1 5 36 0.81920000000000000000e4 +1449 1 12 43 0.40960000000000000000e4 +1449 1 13 20 -0.32768000000000000000e5 +1449 1 13 44 -0.81920000000000000000e4 +1449 1 14 45 -0.81920000000000000000e4 +1449 1 34 34 0.65536000000000000000e5 +1449 2 11 25 0.16384000000000000000e5 +1449 2 15 29 -0.16384000000000000000e5 +1449 3 3 16 -0.40960000000000000000e4 +1449 3 4 17 -0.40960000000000000000e4 +1449 3 7 36 0.16384000000000000000e5 +1449 3 8 21 0.32768000000000000000e5 +1449 3 14 27 0.40960000000000000000e4 +1449 3 16 29 0.81920000000000000000e4 +1449 3 18 31 0.16384000000000000000e5 +1449 4 2 14 -0.40960000000000000000e4 +1449 4 11 23 0.81920000000000000000e4 +1450 1 6 21 -0.32768000000000000000e5 +1450 1 13 20 -0.65536000000000000000e5 +1450 1 20 27 0.32768000000000000000e5 +1450 1 34 35 0.65536000000000000000e5 +1450 2 9 15 -0.32768000000000000000e5 +1450 2 11 25 0.32768000000000000000e5 +1450 3 7 20 0.32768000000000000000e5 +1450 3 14 19 0.65536000000000000000e5 +1450 3 19 32 0.65536000000000000000e5 +1450 4 10 14 0.32768000000000000000e5 +1451 1 21 44 -0.65536000000000000000e5 +1451 1 34 36 0.65536000000000000000e5 +1452 1 16 47 -0.65536000000000000000e5 +1452 1 34 37 0.65536000000000000000e5 +1453 1 12 43 -0.65536000000000000000e5 +1453 1 34 38 0.65536000000000000000e5 +1453 3 22 35 0.65536000000000000000e5 +1454 1 17 48 -0.65536000000000000000e5 +1454 1 34 39 0.65536000000000000000e5 +1455 1 34 40 0.65536000000000000000e5 +1455 1 34 49 -0.65536000000000000000e5 +1455 3 18 47 -0.65536000000000000000e5 +1456 1 4 35 -0.32768000000000000000e5 +1456 1 12 43 -0.32768000000000000000e5 +1456 1 34 42 0.65536000000000000000e5 +1456 1 34 49 -0.32768000000000000000e5 +1456 2 9 23 -0.32768000000000000000e5 +1456 3 5 34 -0.32768000000000000000e5 +1456 3 13 42 0.32768000000000000000e5 +1456 3 14 27 -0.32768000000000000000e5 +1456 3 16 29 0.65536000000000000000e5 +1456 3 18 47 -0.32768000000000000000e5 +1456 3 22 35 0.32768000000000000000e5 +1456 4 14 26 0.32768000000000000000e5 +1457 1 14 45 -0.13107200000000000000e6 +1457 1 17 48 0.32768000000000000000e5 +1457 1 18 49 0.32768000000000000000e5 +1457 1 34 43 0.65536000000000000000e5 +1457 1 34 49 0.32768000000000000000e5 +1457 2 14 28 0.32768000000000000000e5 +1457 3 14 43 0.32768000000000000000e5 +1457 3 15 44 -0.65536000000000000000e5 +1457 3 16 45 0.13107200000000000000e6 +1457 3 18 47 0.32768000000000000000e5 +1457 3 22 35 -0.32768000000000000000e5 +1457 4 14 26 -0.32768000000000000000e5 +1457 4 15 27 -0.65536000000000000000e5 +1458 1 19 50 -0.65536000000000000000e5 +1458 1 34 44 0.65536000000000000000e5 +1459 1 13 20 -0.13107200000000000000e6 +1459 1 17 32 0.65536000000000000000e5 +1459 1 20 27 0.65536000000000000000e5 +1459 1 34 45 0.65536000000000000000e5 +1459 2 11 25 0.65536000000000000000e5 +1459 3 8 21 0.13107200000000000000e6 +1459 3 16 45 0.65536000000000000000e5 +1459 3 18 31 0.65536000000000000000e5 +1460 1 13 20 -0.65536000000000000000e5 +1460 1 17 32 0.32768000000000000000e5 +1460 1 19 50 -0.32768000000000000000e5 +1460 1 20 27 0.32768000000000000000e5 +1460 1 20 51 -0.32768000000000000000e5 +1460 1 34 46 0.65536000000000000000e5 +1460 2 11 25 0.32768000000000000000e5 +1460 2 25 31 -0.32768000000000000000e5 +1460 3 8 21 0.65536000000000000000e5 +1460 3 16 45 0.32768000000000000000e5 +1460 3 18 31 0.32768000000000000000e5 +1461 1 12 43 -0.65536000000000000000e5 +1461 1 34 47 0.65536000000000000000e5 +1461 3 7 52 0.65536000000000000000e5 +1461 3 22 35 0.65536000000000000000e5 +1462 1 6 53 0.81920000000000000000e4 +1462 1 17 48 -0.65536000000000000000e5 +1462 1 25 40 -0.81920000000000000000e4 +1462 1 34 48 0.65536000000000000000e5 +1462 2 4 34 0.16384000000000000000e5 +1462 2 21 35 -0.16384000000000000000e5 +1462 3 5 50 0.16384000000000000000e5 +1462 3 24 37 0.81920000000000000000e4 +1462 3 27 40 0.32768000000000000000e5 +1462 3 28 41 0.32768000000000000000e5 +1462 3 29 42 0.32768000000000000000e5 +1462 4 4 32 -0.81920000000000000000e4 +1462 4 7 35 -0.16384000000000000000e5 +1462 4 16 28 0.81920000000000000000e4 +1462 4 23 27 0.32768000000000000000e5 +1463 1 4 35 -0.32768000000000000000e5 +1463 1 12 43 -0.32768000000000000000e5 +1463 1 34 49 -0.32768000000000000000e5 +1463 1 34 50 0.65536000000000000000e5 +1463 2 9 23 -0.32768000000000000000e5 +1463 3 5 34 -0.32768000000000000000e5 +1463 3 13 42 0.32768000000000000000e5 +1463 3 14 27 -0.32768000000000000000e5 +1463 3 16 29 0.65536000000000000000e5 +1463 3 18 47 -0.32768000000000000000e5 +1463 3 22 35 0.32768000000000000000e5 +1463 3 31 44 0.65536000000000000000e5 +1463 4 14 26 0.32768000000000000000e5 +1464 1 14 45 -0.13107200000000000000e6 +1464 1 17 48 0.32768000000000000000e5 +1464 1 18 49 0.32768000000000000000e5 +1464 1 34 49 0.32768000000000000000e5 +1464 1 34 51 0.65536000000000000000e5 +1464 2 14 28 0.32768000000000000000e5 +1464 3 14 43 0.32768000000000000000e5 +1464 3 15 44 -0.65536000000000000000e5 +1464 3 16 45 0.13107200000000000000e6 +1464 3 18 47 0.32768000000000000000e5 +1464 3 19 48 0.65536000000000000000e5 +1464 3 22 35 -0.32768000000000000000e5 +1464 4 14 26 -0.32768000000000000000e5 +1464 4 15 27 -0.65536000000000000000e5 +1465 1 13 20 -0.13107200000000000000e6 +1465 1 17 32 0.65536000000000000000e5 +1465 1 20 27 0.65536000000000000000e5 +1465 1 34 52 0.65536000000000000000e5 +1465 2 11 25 0.65536000000000000000e5 +1465 3 8 21 0.13107200000000000000e6 +1465 3 16 45 0.65536000000000000000e5 +1465 3 18 31 0.65536000000000000000e5 +1465 3 36 41 0.65536000000000000000e5 +1466 1 6 53 0.81920000000000000000e4 +1466 1 17 48 -0.65536000000000000000e5 +1466 1 25 40 -0.81920000000000000000e4 +1466 1 34 53 0.65536000000000000000e5 +1466 2 4 34 0.16384000000000000000e5 +1466 2 21 35 -0.16384000000000000000e5 +1466 3 5 50 0.16384000000000000000e5 +1466 3 24 37 0.81920000000000000000e4 +1466 3 27 40 0.32768000000000000000e5 +1466 3 28 41 0.32768000000000000000e5 +1466 3 29 42 0.32768000000000000000e5 +1466 3 34 47 0.65536000000000000000e5 +1466 4 4 32 -0.81920000000000000000e4 +1466 4 7 35 -0.16384000000000000000e5 +1466 4 16 28 0.81920000000000000000e4 +1466 4 23 27 0.32768000000000000000e5 +1467 1 34 54 0.65536000000000000000e5 +1467 1 44 51 -0.65536000000000000000e5 +1468 1 14 45 -0.13107200000000000000e6 +1468 1 17 48 0.32768000000000000000e5 +1468 1 18 49 0.32768000000000000000e5 +1468 1 34 49 0.32768000000000000000e5 +1468 1 34 55 0.65536000000000000000e5 +1468 2 14 28 0.32768000000000000000e5 +1468 3 14 43 0.32768000000000000000e5 +1468 3 15 44 -0.65536000000000000000e5 +1468 3 16 45 0.13107200000000000000e6 +1468 3 18 47 0.32768000000000000000e5 +1468 3 19 48 0.65536000000000000000e5 +1468 3 22 35 -0.32768000000000000000e5 +1468 3 41 46 0.65536000000000000000e5 +1468 4 14 26 -0.32768000000000000000e5 +1468 4 15 27 -0.65536000000000000000e5 +1469 1 34 56 0.65536000000000000000e5 +1469 1 46 53 -0.65536000000000000000e5 +1470 1 33 36 -0.32768000000000000000e5 +1470 1 35 35 0.65536000000000000000e5 +1471 1 6 21 -0.16384000000000000000e5 +1471 1 17 32 -0.16384000000000000000e5 +1471 1 19 50 0.16384000000000000000e5 +1471 1 20 51 0.16384000000000000000e5 +1471 1 21 52 -0.65536000000000000000e5 +1471 1 35 36 0.65536000000000000000e5 +1471 2 9 15 -0.16384000000000000000e5 +1471 2 25 31 0.16384000000000000000e5 +1471 3 7 20 0.16384000000000000000e5 +1471 3 8 21 -0.32768000000000000000e5 +1471 3 14 19 0.32768000000000000000e5 +1471 3 16 45 -0.16384000000000000000e5 +1471 3 17 46 -0.32768000000000000000e5 +1471 3 18 31 -0.16384000000000000000e5 +1471 3 19 32 0.32768000000000000000e5 +1471 3 20 45 -0.32768000000000000000e5 +1471 4 10 14 0.16384000000000000000e5 +1471 4 25 25 -0.65536000000000000000e5 +1472 1 12 43 -0.65536000000000000000e5 +1472 1 35 37 0.65536000000000000000e5 +1472 3 22 35 0.65536000000000000000e5 +1473 1 17 48 -0.65536000000000000000e5 +1473 1 35 38 0.65536000000000000000e5 +1474 1 34 49 -0.65536000000000000000e5 +1474 1 35 39 0.65536000000000000000e5 +1474 3 18 47 -0.65536000000000000000e5 +1475 1 18 49 -0.65536000000000000000e5 +1475 1 35 40 0.65536000000000000000e5 +1476 1 4 35 -0.32768000000000000000e5 +1476 1 12 43 -0.32768000000000000000e5 +1476 1 34 49 -0.32768000000000000000e5 +1476 1 35 41 0.65536000000000000000e5 +1476 2 9 23 -0.32768000000000000000e5 +1476 3 5 34 -0.32768000000000000000e5 +1476 3 13 42 0.32768000000000000000e5 +1476 3 14 27 -0.32768000000000000000e5 +1476 3 16 29 0.65536000000000000000e5 +1476 3 18 47 -0.32768000000000000000e5 +1476 3 22 35 0.32768000000000000000e5 +1476 4 14 26 0.32768000000000000000e5 +1477 1 14 45 -0.13107200000000000000e6 +1477 1 17 48 0.32768000000000000000e5 +1477 1 18 49 0.32768000000000000000e5 +1477 1 34 49 0.32768000000000000000e5 +1477 1 35 42 0.65536000000000000000e5 +1477 2 14 28 0.32768000000000000000e5 +1477 3 14 43 0.32768000000000000000e5 +1477 3 15 44 -0.65536000000000000000e5 +1477 3 16 45 0.13107200000000000000e6 +1477 3 18 47 0.32768000000000000000e5 +1477 3 22 35 -0.32768000000000000000e5 +1477 4 14 26 -0.32768000000000000000e5 +1477 4 15 27 -0.65536000000000000000e5 +1478 1 11 18 -0.65536000000000000000e5 +1478 1 35 43 0.65536000000000000000e5 +1478 3 6 19 0.65536000000000000000e5 +1478 3 15 44 0.65536000000000000000e5 +1478 3 17 30 0.65536000000000000000e5 +1479 1 13 20 -0.13107200000000000000e6 +1479 1 17 32 0.65536000000000000000e5 +1479 1 20 27 0.65536000000000000000e5 +1479 1 35 44 0.65536000000000000000e5 +1479 2 11 25 0.65536000000000000000e5 +1479 3 8 21 0.13107200000000000000e6 +1479 3 16 45 0.65536000000000000000e5 +1479 3 18 31 0.65536000000000000000e5 +1480 1 20 51 -0.65536000000000000000e5 +1480 1 35 45 0.65536000000000000000e5 +1481 1 33 36 -0.65536000000000000000e5 +1481 1 35 46 0.65536000000000000000e5 +1481 3 17 46 0.65536000000000000000e5 +1482 1 6 53 0.81920000000000000000e4 +1482 1 17 48 -0.65536000000000000000e5 +1482 1 25 40 -0.81920000000000000000e4 +1482 1 35 47 0.65536000000000000000e5 +1482 2 4 34 0.16384000000000000000e5 +1482 2 21 35 -0.16384000000000000000e5 +1482 3 5 50 0.16384000000000000000e5 +1482 3 24 37 0.81920000000000000000e4 +1482 3 27 40 0.32768000000000000000e5 +1482 3 28 41 0.32768000000000000000e5 +1482 3 29 42 0.32768000000000000000e5 +1482 4 4 32 -0.81920000000000000000e4 +1482 4 7 35 -0.16384000000000000000e5 +1482 4 16 28 0.81920000000000000000e4 +1482 4 23 27 0.32768000000000000000e5 +1483 1 34 49 -0.65536000000000000000e5 +1483 1 35 48 0.65536000000000000000e5 +1484 1 18 49 -0.65536000000000000000e5 +1484 1 35 49 0.65536000000000000000e5 +1484 3 14 51 0.65536000000000000000e5 +1485 1 14 45 -0.13107200000000000000e6 +1485 1 17 48 0.32768000000000000000e5 +1485 1 18 49 0.32768000000000000000e5 +1485 1 34 49 0.32768000000000000000e5 +1485 1 35 50 0.65536000000000000000e5 +1485 2 14 28 0.32768000000000000000e5 +1485 3 14 43 0.32768000000000000000e5 +1485 3 15 44 -0.65536000000000000000e5 +1485 3 16 45 0.13107200000000000000e6 +1485 3 18 47 0.32768000000000000000e5 +1485 3 19 48 0.65536000000000000000e5 +1485 3 22 35 -0.32768000000000000000e5 +1485 4 14 26 -0.32768000000000000000e5 +1485 4 15 27 -0.65536000000000000000e5 +1486 1 11 18 -0.65536000000000000000e5 +1486 1 35 51 0.65536000000000000000e5 +1486 3 6 19 0.65536000000000000000e5 +1486 3 15 44 0.65536000000000000000e5 +1486 3 17 30 0.65536000000000000000e5 +1486 3 32 45 0.65536000000000000000e5 +1487 1 35 52 0.65536000000000000000e5 +1487 1 36 51 -0.65536000000000000000e5 +1488 1 35 53 0.65536000000000000000e5 +1488 1 44 51 -0.65536000000000000000e5 +1489 1 18 49 -0.65536000000000000000e5 +1489 1 35 54 0.65536000000000000000e5 +1489 3 14 51 0.65536000000000000000e5 +1489 3 35 48 0.65536000000000000000e5 +1490 1 35 55 0.65536000000000000000e5 +1490 1 45 52 -0.65536000000000000000e5 +1491 1 18 49 -0.65536000000000000000e5 +1491 1 35 56 0.65536000000000000000e5 +1491 3 14 51 0.65536000000000000000e5 +1491 3 35 48 0.65536000000000000000e5 +1491 3 45 50 0.65536000000000000000e5 +1492 1 18 21 -0.32768000000000000000e5 +1492 1 36 36 0.65536000000000000000e5 +1492 3 19 20 0.32768000000000000000e5 +1492 3 21 34 0.32768000000000000000e5 +1493 1 34 41 -0.65536000000000000000e5 +1493 1 36 37 0.65536000000000000000e5 +1494 1 4 35 -0.32768000000000000000e5 +1494 1 12 43 -0.32768000000000000000e5 +1494 1 34 49 -0.32768000000000000000e5 +1494 1 36 38 0.65536000000000000000e5 +1494 2 9 23 -0.32768000000000000000e5 +1494 3 5 34 -0.32768000000000000000e5 +1494 3 13 42 0.32768000000000000000e5 +1494 3 14 27 -0.32768000000000000000e5 +1494 3 16 29 0.65536000000000000000e5 +1494 3 18 47 -0.32768000000000000000e5 +1494 3 22 35 0.32768000000000000000e5 +1494 4 14 26 0.32768000000000000000e5 +1495 1 14 45 -0.13107200000000000000e6 +1495 1 17 48 0.32768000000000000000e5 +1495 1 18 49 0.32768000000000000000e5 +1495 1 34 49 0.32768000000000000000e5 +1495 1 36 39 0.65536000000000000000e5 +1495 2 14 28 0.32768000000000000000e5 +1495 3 14 43 0.32768000000000000000e5 +1495 3 15 44 -0.65536000000000000000e5 +1495 3 16 45 0.13107200000000000000e6 +1495 3 18 47 0.32768000000000000000e5 +1495 3 22 35 -0.32768000000000000000e5 +1495 4 14 26 -0.32768000000000000000e5 +1495 4 15 27 -0.65536000000000000000e5 +1496 1 11 18 -0.65536000000000000000e5 +1496 1 36 40 0.65536000000000000000e5 +1496 3 6 19 0.65536000000000000000e5 +1496 3 15 44 0.65536000000000000000e5 +1496 3 17 30 0.65536000000000000000e5 +1497 1 19 50 -0.65536000000000000000e5 +1497 1 36 41 0.65536000000000000000e5 +1498 1 13 20 -0.13107200000000000000e6 +1498 1 17 32 0.65536000000000000000e5 +1498 1 20 27 0.65536000000000000000e5 +1498 1 36 42 0.65536000000000000000e5 +1498 2 11 25 0.65536000000000000000e5 +1498 3 8 21 0.13107200000000000000e6 +1498 3 16 45 0.65536000000000000000e5 +1498 3 18 31 0.65536000000000000000e5 +1499 1 20 51 -0.65536000000000000000e5 +1499 1 36 43 0.65536000000000000000e5 +1500 1 13 20 -0.65536000000000000000e5 +1500 1 17 32 0.32768000000000000000e5 +1500 1 19 50 -0.32768000000000000000e5 +1500 1 20 27 0.32768000000000000000e5 +1500 1 20 51 -0.32768000000000000000e5 +1500 1 36 44 0.65536000000000000000e5 +1500 2 11 25 0.32768000000000000000e5 +1500 2 25 31 -0.32768000000000000000e5 +1500 3 8 21 0.65536000000000000000e5 +1500 3 16 45 0.32768000000000000000e5 +1500 3 18 31 0.32768000000000000000e5 +1501 1 33 36 -0.65536000000000000000e5 +1501 1 36 45 0.65536000000000000000e5 +1501 3 17 46 0.65536000000000000000e5 +1502 1 21 52 -0.65536000000000000000e5 +1502 1 36 46 0.65536000000000000000e5 +1503 1 4 35 -0.32768000000000000000e5 +1503 1 12 43 -0.32768000000000000000e5 +1503 1 34 49 -0.32768000000000000000e5 +1503 1 36 47 0.65536000000000000000e5 +1503 2 9 23 -0.32768000000000000000e5 +1503 3 5 34 -0.32768000000000000000e5 +1503 3 13 42 0.32768000000000000000e5 +1503 3 14 27 -0.32768000000000000000e5 +1503 3 16 29 0.65536000000000000000e5 +1503 3 18 47 -0.32768000000000000000e5 +1503 3 22 35 0.32768000000000000000e5 +1503 3 31 44 0.65536000000000000000e5 +1503 4 14 26 0.32768000000000000000e5 +1504 1 14 45 -0.13107200000000000000e6 +1504 1 17 48 0.32768000000000000000e5 +1504 1 18 49 0.32768000000000000000e5 +1504 1 34 49 0.32768000000000000000e5 +1504 1 36 48 0.65536000000000000000e5 +1504 2 14 28 0.32768000000000000000e5 +1504 3 14 43 0.32768000000000000000e5 +1504 3 15 44 -0.65536000000000000000e5 +1504 3 16 45 0.13107200000000000000e6 +1504 3 18 47 0.32768000000000000000e5 +1504 3 19 48 0.65536000000000000000e5 +1504 3 22 35 -0.32768000000000000000e5 +1504 4 14 26 -0.32768000000000000000e5 +1504 4 15 27 -0.65536000000000000000e5 +1505 1 11 18 -0.65536000000000000000e5 +1505 1 36 49 0.65536000000000000000e5 +1505 3 6 19 0.65536000000000000000e5 +1505 3 15 44 0.65536000000000000000e5 +1505 3 17 30 0.65536000000000000000e5 +1505 3 32 45 0.65536000000000000000e5 +1506 1 13 20 -0.13107200000000000000e6 +1506 1 17 32 0.65536000000000000000e5 +1506 1 20 27 0.65536000000000000000e5 +1506 1 36 50 0.65536000000000000000e5 +1506 2 11 25 0.65536000000000000000e5 +1506 3 8 21 0.13107200000000000000e6 +1506 3 16 45 0.65536000000000000000e5 +1506 3 18 31 0.65536000000000000000e5 +1506 3 36 41 0.65536000000000000000e5 +1507 1 33 36 -0.65536000000000000000e5 +1507 1 36 52 0.65536000000000000000e5 +1507 3 17 46 0.65536000000000000000e5 +1507 3 21 50 0.65536000000000000000e5 +1508 1 14 45 -0.13107200000000000000e6 +1508 1 17 48 0.32768000000000000000e5 +1508 1 18 49 0.32768000000000000000e5 +1508 1 34 49 0.32768000000000000000e5 +1508 1 36 53 0.65536000000000000000e5 +1508 2 14 28 0.32768000000000000000e5 +1508 3 14 43 0.32768000000000000000e5 +1508 3 15 44 -0.65536000000000000000e5 +1508 3 16 45 0.13107200000000000000e6 +1508 3 18 47 0.32768000000000000000e5 +1508 3 19 48 0.65536000000000000000e5 +1508 3 22 35 -0.32768000000000000000e5 +1508 3 41 46 0.65536000000000000000e5 +1508 4 14 26 -0.32768000000000000000e5 +1508 4 15 27 -0.65536000000000000000e5 +1509 1 36 54 0.65536000000000000000e5 +1509 1 45 52 -0.65536000000000000000e5 +1510 1 11 18 0.32768000000000000000e5 +1510 1 36 51 -0.65536000000000000000e5 +1510 1 36 55 0.65536000000000000000e5 +1510 1 45 52 -0.32768000000000000000e5 +1510 3 6 19 -0.32768000000000000000e5 +1510 3 15 44 -0.32768000000000000000e5 +1510 3 17 30 -0.32768000000000000000e5 +1510 3 32 45 -0.32768000000000000000e5 +1510 3 36 49 0.32768000000000000000e5 +1510 3 41 46 0.32768000000000000000e5 +1510 4 15 35 0.32768000000000000000e5 +1511 1 36 56 0.65536000000000000000e5 +1511 1 45 52 -0.65536000000000000000e5 +1511 3 19 56 0.65536000000000000000e5 +1512 1 1 48 -0.32768000000000000000e5 +1512 1 6 53 -0.32768000000000000000e5 +1512 1 25 40 0.32768000000000000000e5 +1512 1 37 37 0.65536000000000000000e5 +1512 2 1 35 0.32768000000000000000e5 +1512 2 2 32 -0.32768000000000000000e5 +1512 2 4 34 -0.65536000000000000000e5 +1512 2 16 30 -0.65536000000000000000e5 +1512 2 16 34 0.65536000000000000000e5 +1512 2 21 35 0.65536000000000000000e5 +1512 3 2 47 -0.32768000000000000000e5 +1512 3 5 50 -0.65536000000000000000e5 +1512 3 7 52 0.26214400000000000000e6 +1512 3 24 37 -0.65536000000000000000e5 +1512 3 27 40 -0.65536000000000000000e5 +1512 3 28 41 -0.26214400000000000000e6 +1512 4 4 32 0.32768000000000000000e5 +1512 4 6 34 -0.13107200000000000000e6 +1512 4 7 35 0.65536000000000000000e5 +1512 4 16 28 -0.32768000000000000000e5 +1512 4 17 29 0.65536000000000000000e5 +1513 1 23 38 -0.65536000000000000000e5 +1513 1 37 38 0.65536000000000000000e5 +1513 3 2 47 0.65536000000000000000e5 +1514 1 2 49 -0.65536000000000000000e5 +1514 1 37 39 0.65536000000000000000e5 +1514 3 24 37 0.65536000000000000000e5 +1515 1 6 53 0.65536000000000000000e5 +1515 1 24 39 -0.65536000000000000000e5 +1515 1 25 40 -0.65536000000000000000e5 +1515 1 37 40 0.65536000000000000000e5 +1515 3 25 38 -0.65536000000000000000e5 +1515 3 27 40 0.13107200000000000000e6 +1515 4 4 32 -0.65536000000000000000e5 +1516 1 1 48 -0.32768000000000000000e5 +1516 1 2 49 -0.32768000000000000000e5 +1516 1 6 53 -0.32768000000000000000e5 +1516 1 23 38 -0.32768000000000000000e5 +1516 1 25 40 0.32768000000000000000e5 +1516 1 37 41 0.65536000000000000000e5 +1516 2 2 32 -0.32768000000000000000e5 +1516 2 4 34 -0.65536000000000000000e5 +1516 2 16 30 -0.65536000000000000000e5 +1516 2 16 34 0.65536000000000000000e5 +1516 2 21 35 0.65536000000000000000e5 +1516 3 5 50 -0.65536000000000000000e5 +1516 3 7 52 0.26214400000000000000e6 +1516 3 24 37 -0.32768000000000000000e5 +1516 3 27 40 -0.65536000000000000000e5 +1516 3 28 41 -0.26214400000000000000e6 +1516 4 4 32 0.32768000000000000000e5 +1516 4 6 34 -0.13107200000000000000e6 +1516 4 7 35 0.65536000000000000000e5 +1516 4 16 28 -0.32768000000000000000e5 +1516 4 17 29 0.65536000000000000000e5 +1517 1 6 53 -0.32768000000000000000e5 +1517 1 8 39 -0.65536000000000000000e5 +1517 1 9 40 -0.65536000000000000000e5 +1517 1 10 41 0.13107200000000000000e6 +1517 1 25 40 0.32768000000000000000e5 +1517 1 26 41 0.65536000000000000000e5 +1517 1 32 47 -0.13107200000000000000e6 +1517 1 37 42 0.65536000000000000000e5 +1517 3 9 38 -0.65536000000000000000e5 +1517 3 24 37 -0.32768000000000000000e5 +1517 3 27 40 -0.13107200000000000000e6 +1517 4 2 30 -0.65536000000000000000e5 +1517 4 4 32 0.32768000000000000000e5 +1517 4 16 28 -0.32768000000000000000e5 +1517 4 17 29 -0.65536000000000000000e5 +1518 1 1 48 0.32768000000000000000e5 +1518 1 2 49 0.32768000000000000000e5 +1518 1 6 53 0.32768000000000000000e5 +1518 1 8 39 0.65536000000000000000e5 +1518 1 9 40 0.65536000000000000000e5 +1518 1 10 41 -0.13107200000000000000e6 +1518 1 12 43 -0.26214400000000000000e6 +1518 1 23 38 0.32768000000000000000e5 +1518 1 25 40 -0.32768000000000000000e5 +1518 1 26 41 -0.65536000000000000000e5 +1518 1 28 43 0.13107200000000000000e6 +1518 1 32 47 0.26214400000000000000e6 +1518 1 37 43 0.65536000000000000000e5 +1518 2 2 32 0.32768000000000000000e5 +1518 2 16 30 0.65536000000000000000e5 +1518 2 20 34 0.13107200000000000000e6 +1518 3 9 38 0.65536000000000000000e5 +1518 3 22 35 0.26214400000000000000e6 +1518 3 24 37 0.32768000000000000000e5 +1518 3 27 40 0.65536000000000000000e5 +1518 3 28 41 0.26214400000000000000e6 +1518 4 2 30 0.65536000000000000000e5 +1518 4 4 32 -0.32768000000000000000e5 +1518 4 6 34 0.13107200000000000000e6 +1518 4 16 28 0.32768000000000000000e5 +1519 1 6 53 -0.16384000000000000000e5 +1519 1 12 43 -0.13107200000000000000e6 +1519 1 25 40 0.16384000000000000000e5 +1519 1 28 43 0.65536000000000000000e5 +1519 1 32 47 0.65536000000000000000e5 +1519 1 37 44 0.65536000000000000000e5 +1519 2 4 34 -0.32768000000000000000e5 +1519 2 20 34 0.65536000000000000000e5 +1519 2 21 35 0.32768000000000000000e5 +1519 3 5 50 -0.32768000000000000000e5 +1519 3 7 52 0.13107200000000000000e6 +1519 3 22 35 0.13107200000000000000e6 +1519 3 24 37 -0.16384000000000000000e5 +1519 3 27 40 -0.65536000000000000000e5 +1519 4 4 32 0.16384000000000000000e5 +1519 4 7 35 0.32768000000000000000e5 +1519 4 16 28 -0.16384000000000000000e5 +1520 1 32 47 -0.65536000000000000000e5 +1520 1 37 45 0.65536000000000000000e5 +1521 1 12 43 -0.65536000000000000000e5 +1521 1 37 46 0.65536000000000000000e5 +1521 3 7 52 0.65536000000000000000e5 +1521 3 22 35 0.65536000000000000000e5 +1522 1 22 53 -0.65536000000000000000e5 +1522 1 37 47 0.65536000000000000000e5 +1523 1 6 53 -0.65536000000000000000e5 +1523 1 8 39 -0.13107200000000000000e6 +1523 1 9 40 -0.13107200000000000000e6 +1523 1 10 41 0.26214400000000000000e6 +1523 1 22 53 0.65536000000000000000e5 +1523 1 23 54 0.65536000000000000000e5 +1523 1 24 55 0.13107200000000000000e6 +1523 1 25 40 0.65536000000000000000e5 +1523 1 37 48 0.65536000000000000000e5 +1523 1 37 52 -0.26214400000000000000e6 +1523 2 26 32 0.65536000000000000000e5 +1523 3 9 38 -0.13107200000000000000e6 +1523 3 22 51 -0.13107200000000000000e6 +1523 3 24 37 -0.65536000000000000000e5 +1523 3 27 40 -0.13107200000000000000e6 +1523 4 2 30 -0.13107200000000000000e6 +1523 4 4 32 0.65536000000000000000e5 +1523 4 16 28 -0.65536000000000000000e5 +1523 4 17 29 -0.13107200000000000000e6 +1523 4 20 32 -0.13107200000000000000e6 +1524 1 23 54 -0.65536000000000000000e5 +1524 1 37 49 0.65536000000000000000e5 +1525 1 6 53 -0.32768000000000000000e5 +1525 1 8 39 -0.65536000000000000000e5 +1525 1 9 40 -0.65536000000000000000e5 +1525 1 10 41 0.13107200000000000000e6 +1525 1 24 55 0.65536000000000000000e5 +1525 1 25 40 0.32768000000000000000e5 +1525 1 37 50 0.65536000000000000000e5 +1525 1 37 52 -0.13107200000000000000e6 +1525 3 9 38 -0.65536000000000000000e5 +1525 3 22 51 -0.65536000000000000000e5 +1525 3 24 37 -0.32768000000000000000e5 +1525 3 27 40 -0.65536000000000000000e5 +1525 4 2 30 -0.65536000000000000000e5 +1525 4 4 32 0.32768000000000000000e5 +1525 4 16 28 -0.32768000000000000000e5 +1525 4 17 29 -0.65536000000000000000e5 +1525 4 20 32 -0.65536000000000000000e5 +1526 1 1 48 0.32768000000000000000e5 +1526 1 2 49 0.32768000000000000000e5 +1526 1 6 53 0.32768000000000000000e5 +1526 1 8 39 0.65536000000000000000e5 +1526 1 9 40 0.65536000000000000000e5 +1526 1 10 41 -0.13107200000000000000e6 +1526 1 12 43 -0.26214400000000000000e6 +1526 1 23 38 0.32768000000000000000e5 +1526 1 25 40 -0.32768000000000000000e5 +1526 1 26 41 -0.65536000000000000000e5 +1526 1 28 43 0.13107200000000000000e6 +1526 1 32 47 0.26214400000000000000e6 +1526 1 37 51 0.65536000000000000000e5 +1526 2 2 32 0.32768000000000000000e5 +1526 2 16 30 0.65536000000000000000e5 +1526 2 20 34 0.13107200000000000000e6 +1526 3 9 38 0.65536000000000000000e5 +1526 3 22 35 0.26214400000000000000e6 +1526 3 22 51 0.65536000000000000000e5 +1526 3 24 37 0.32768000000000000000e5 +1526 3 27 40 0.65536000000000000000e5 +1526 3 28 41 0.26214400000000000000e6 +1526 4 2 30 0.65536000000000000000e5 +1526 4 4 32 -0.32768000000000000000e5 +1526 4 6 34 0.13107200000000000000e6 +1526 4 16 28 0.32768000000000000000e5 +1527 1 1 48 0.65536000000000000000e5 +1527 1 2 49 0.65536000000000000000e5 +1527 1 6 53 0.65536000000000000000e5 +1527 1 8 39 0.13107200000000000000e6 +1527 1 9 40 0.13107200000000000000e6 +1527 1 10 41 -0.26214400000000000000e6 +1527 1 12 43 -0.52428800000000000000e6 +1527 1 23 38 0.65536000000000000000e5 +1527 1 25 40 -0.65536000000000000000e5 +1527 1 26 41 -0.13107200000000000000e6 +1527 1 28 43 0.26214400000000000000e6 +1527 1 32 47 0.52428800000000000000e6 +1527 1 37 53 0.65536000000000000000e5 +1527 1 38 53 0.65536000000000000000e5 +1527 1 40 47 0.65536000000000000000e5 +1527 2 2 32 0.65536000000000000000e5 +1527 2 16 30 0.13107200000000000000e6 +1527 2 20 34 0.26214400000000000000e6 +1527 2 32 32 0.13107200000000000000e6 +1527 3 9 38 0.13107200000000000000e6 +1527 3 22 35 0.52428800000000000000e6 +1527 3 22 51 0.13107200000000000000e6 +1527 3 24 37 0.65536000000000000000e5 +1527 3 24 53 -0.65536000000000000000e5 +1527 3 27 40 0.13107200000000000000e6 +1527 3 28 41 0.52428800000000000000e6 +1527 3 37 50 0.13107200000000000000e6 +1527 4 2 30 0.13107200000000000000e6 +1527 4 4 32 -0.65536000000000000000e5 +1527 4 6 34 0.26214400000000000000e6 +1527 4 16 28 0.65536000000000000000e5 +1528 1 37 54 0.65536000000000000000e5 +1528 1 38 53 -0.65536000000000000000e5 +1529 1 1 48 0.32768000000000000000e5 +1529 1 2 49 0.32768000000000000000e5 +1529 1 6 53 0.32768000000000000000e5 +1529 1 8 39 0.65536000000000000000e5 +1529 1 9 40 0.65536000000000000000e5 +1529 1 10 41 -0.13107200000000000000e6 +1529 1 12 43 -0.26214400000000000000e6 +1529 1 23 38 0.32768000000000000000e5 +1529 1 25 40 -0.32768000000000000000e5 +1529 1 26 41 -0.65536000000000000000e5 +1529 1 28 43 0.13107200000000000000e6 +1529 1 32 47 0.26214400000000000000e6 +1529 1 37 55 0.65536000000000000000e5 +1529 2 2 32 0.32768000000000000000e5 +1529 2 16 30 0.65536000000000000000e5 +1529 2 20 34 0.13107200000000000000e6 +1529 3 9 38 0.65536000000000000000e5 +1529 3 22 35 0.26214400000000000000e6 +1529 3 22 51 0.65536000000000000000e5 +1529 3 24 37 0.32768000000000000000e5 +1529 3 27 40 0.65536000000000000000e5 +1529 3 28 41 0.26214400000000000000e6 +1529 3 37 50 0.65536000000000000000e5 +1529 4 2 30 0.65536000000000000000e5 +1529 4 4 32 -0.32768000000000000000e5 +1529 4 6 34 0.13107200000000000000e6 +1529 4 16 28 0.32768000000000000000e5 +1530 1 1 48 -0.65536000000000000000e5 +1530 1 2 49 -0.13107200000000000000e6 +1530 1 6 53 0.65536000000000000000e5 +1530 1 8 39 -0.13107200000000000000e6 +1530 1 9 40 -0.13107200000000000000e6 +1530 1 10 41 0.26214400000000000000e6 +1530 1 12 43 0.52428800000000000000e6 +1530 1 23 38 -0.65536000000000000000e5 +1530 1 24 39 -0.65536000000000000000e5 +1530 1 24 55 -0.13107200000000000000e6 +1530 1 25 56 -0.65536000000000000000e5 +1530 1 26 41 0.26214400000000000000e6 +1530 1 28 43 -0.26214400000000000000e6 +1530 1 32 47 -0.52428800000000000000e6 +1530 1 37 56 0.65536000000000000000e5 +1530 1 38 53 -0.65536000000000000000e5 +1530 1 40 47 -0.65536000000000000000e5 +1530 2 2 32 -0.65536000000000000000e5 +1530 2 3 33 -0.65536000000000000000e5 +1530 2 5 35 0.65536000000000000000e5 +1530 2 16 30 -0.13107200000000000000e6 +1530 2 20 34 -0.26214400000000000000e6 +1530 2 33 35 -0.65536000000000000000e5 +1530 3 9 38 -0.13107200000000000000e6 +1530 3 22 35 -0.52428800000000000000e6 +1530 3 22 51 0.13107200000000000000e6 +1530 3 23 52 -0.26214400000000000000e6 +1530 3 24 53 0.65536000000000000000e5 +1530 3 25 38 -0.65536000000000000000e5 +1530 3 25 54 0.65536000000000000000e5 +1530 3 27 40 -0.13107200000000000000e6 +1530 3 27 56 0.13107200000000000000e6 +1530 3 28 41 -0.52428800000000000000e6 +1530 3 38 51 -0.13107200000000000000e6 +1530 3 39 40 0.65536000000000000000e5 +1530 3 40 53 0.65536000000000000000e5 +1530 3 41 54 -0.13107200000000000000e6 +1530 4 2 30 -0.13107200000000000000e6 +1530 4 6 34 -0.26214400000000000000e6 +1530 4 7 35 0.13107200000000000000e6 +1530 4 32 32 -0.13107200000000000000e6 +1531 1 2 49 -0.32768000000000000000e5 +1531 1 38 38 0.65536000000000000000e5 +1531 3 24 37 0.32768000000000000000e5 +1532 1 6 53 0.65536000000000000000e5 +1532 1 24 39 -0.65536000000000000000e5 +1532 1 25 40 -0.65536000000000000000e5 +1532 1 38 39 0.65536000000000000000e5 +1532 3 25 38 -0.65536000000000000000e5 +1532 3 27 40 0.13107200000000000000e6 +1532 4 4 32 -0.65536000000000000000e5 +1533 1 1 48 0.65536000000000000000e5 +1533 1 2 49 0.13107200000000000000e6 +1533 1 8 39 0.13107200000000000000e6 +1533 1 9 40 0.13107200000000000000e6 +1533 1 10 41 -0.26214400000000000000e6 +1533 1 12 43 -0.52428800000000000000e6 +1533 1 23 38 0.65536000000000000000e5 +1533 1 24 39 0.65536000000000000000e5 +1533 1 26 41 -0.13107200000000000000e6 +1533 1 28 43 0.26214400000000000000e6 +1533 1 32 47 0.52428800000000000000e6 +1533 1 38 40 0.65536000000000000000e5 +1533 2 2 32 0.65536000000000000000e5 +1533 2 3 33 0.65536000000000000000e5 +1533 2 16 30 0.13107200000000000000e6 +1533 2 20 34 0.26214400000000000000e6 +1533 3 9 38 0.13107200000000000000e6 +1533 3 22 35 0.52428800000000000000e6 +1533 3 25 38 0.65536000000000000000e5 +1533 3 28 41 0.52428800000000000000e6 +1533 4 2 30 0.13107200000000000000e6 +1533 4 6 34 0.26214400000000000000e6 +1534 1 6 53 -0.32768000000000000000e5 +1534 1 8 39 -0.65536000000000000000e5 +1534 1 9 40 -0.65536000000000000000e5 +1534 1 10 41 0.13107200000000000000e6 +1534 1 25 40 0.32768000000000000000e5 +1534 1 26 41 0.65536000000000000000e5 +1534 1 32 47 -0.13107200000000000000e6 +1534 1 38 41 0.65536000000000000000e5 +1534 3 9 38 -0.65536000000000000000e5 +1534 3 24 37 -0.32768000000000000000e5 +1534 3 27 40 -0.13107200000000000000e6 +1534 4 2 30 -0.65536000000000000000e5 +1534 4 4 32 0.32768000000000000000e5 +1534 4 16 28 -0.32768000000000000000e5 +1534 4 17 29 -0.65536000000000000000e5 +1535 1 1 48 0.32768000000000000000e5 +1535 1 2 49 0.32768000000000000000e5 +1535 1 6 53 0.32768000000000000000e5 +1535 1 8 39 0.65536000000000000000e5 +1535 1 9 40 0.65536000000000000000e5 +1535 1 10 41 -0.13107200000000000000e6 +1535 1 12 43 -0.26214400000000000000e6 +1535 1 23 38 0.32768000000000000000e5 +1535 1 25 40 -0.32768000000000000000e5 +1535 1 26 41 -0.65536000000000000000e5 +1535 1 28 43 0.13107200000000000000e6 +1535 1 32 47 0.26214400000000000000e6 +1535 1 38 42 0.65536000000000000000e5 +1535 2 2 32 0.32768000000000000000e5 +1535 2 16 30 0.65536000000000000000e5 +1535 2 20 34 0.13107200000000000000e6 +1535 3 9 38 0.65536000000000000000e5 +1535 3 22 35 0.26214400000000000000e6 +1535 3 24 37 0.32768000000000000000e5 +1535 3 27 40 0.65536000000000000000e5 +1535 3 28 41 0.26214400000000000000e6 +1535 4 2 30 0.65536000000000000000e5 +1535 4 4 32 -0.32768000000000000000e5 +1535 4 6 34 0.13107200000000000000e6 +1535 4 16 28 0.32768000000000000000e5 +1536 1 26 41 -0.65536000000000000000e5 +1536 1 38 43 0.65536000000000000000e5 +1536 3 27 40 0.65536000000000000000e5 +1537 1 32 47 -0.65536000000000000000e5 +1537 1 38 44 0.65536000000000000000e5 +1538 1 6 53 0.16384000000000000000e5 +1538 1 25 40 -0.16384000000000000000e5 +1538 1 28 43 -0.65536000000000000000e5 +1538 1 38 45 0.65536000000000000000e5 +1538 2 4 34 0.32768000000000000000e5 +1538 2 21 35 -0.32768000000000000000e5 +1538 3 5 50 0.32768000000000000000e5 +1538 3 24 37 0.16384000000000000000e5 +1538 3 27 40 0.65536000000000000000e5 +1538 4 4 32 -0.16384000000000000000e5 +1538 4 7 35 -0.32768000000000000000e5 +1538 4 16 28 0.16384000000000000000e5 +1539 1 6 53 0.81920000000000000000e4 +1539 1 17 48 -0.65536000000000000000e5 +1539 1 25 40 -0.81920000000000000000e4 +1539 1 38 46 0.65536000000000000000e5 +1539 2 4 34 0.16384000000000000000e5 +1539 2 21 35 -0.16384000000000000000e5 +1539 3 5 50 0.16384000000000000000e5 +1539 3 24 37 0.81920000000000000000e4 +1539 3 27 40 0.32768000000000000000e5 +1539 3 28 41 0.32768000000000000000e5 +1539 3 29 42 0.32768000000000000000e5 +1539 4 4 32 -0.81920000000000000000e4 +1539 4 7 35 -0.16384000000000000000e5 +1539 4 16 28 0.81920000000000000000e4 +1539 4 23 27 0.32768000000000000000e5 +1540 1 6 53 -0.65536000000000000000e5 +1540 1 8 39 -0.13107200000000000000e6 +1540 1 9 40 -0.13107200000000000000e6 +1540 1 10 41 0.26214400000000000000e6 +1540 1 22 53 0.65536000000000000000e5 +1540 1 23 54 0.65536000000000000000e5 +1540 1 24 55 0.13107200000000000000e6 +1540 1 25 40 0.65536000000000000000e5 +1540 1 37 52 -0.26214400000000000000e6 +1540 1 38 47 0.65536000000000000000e5 +1540 2 26 32 0.65536000000000000000e5 +1540 3 9 38 -0.13107200000000000000e6 +1540 3 22 51 -0.13107200000000000000e6 +1540 3 24 37 -0.65536000000000000000e5 +1540 3 27 40 -0.13107200000000000000e6 +1540 4 2 30 -0.13107200000000000000e6 +1540 4 4 32 0.65536000000000000000e5 +1540 4 16 28 -0.65536000000000000000e5 +1540 4 17 29 -0.13107200000000000000e6 +1540 4 20 32 -0.13107200000000000000e6 +1541 1 23 54 -0.65536000000000000000e5 +1541 1 38 48 0.65536000000000000000e5 +1542 1 38 49 0.65536000000000000000e5 +1542 1 40 47 -0.65536000000000000000e5 +1543 1 1 48 0.32768000000000000000e5 +1543 1 2 49 0.32768000000000000000e5 +1543 1 6 53 0.32768000000000000000e5 +1543 1 8 39 0.65536000000000000000e5 +1543 1 9 40 0.65536000000000000000e5 +1543 1 10 41 -0.13107200000000000000e6 +1543 1 12 43 -0.26214400000000000000e6 +1543 1 23 38 0.32768000000000000000e5 +1543 1 25 40 -0.32768000000000000000e5 +1543 1 26 41 -0.65536000000000000000e5 +1543 1 28 43 0.13107200000000000000e6 +1543 1 32 47 0.26214400000000000000e6 +1543 1 38 50 0.65536000000000000000e5 +1543 2 2 32 0.32768000000000000000e5 +1543 2 16 30 0.65536000000000000000e5 +1543 2 20 34 0.13107200000000000000e6 +1543 3 9 38 0.65536000000000000000e5 +1543 3 22 35 0.26214400000000000000e6 +1543 3 22 51 0.65536000000000000000e5 +1543 3 24 37 0.32768000000000000000e5 +1543 3 27 40 0.65536000000000000000e5 +1543 3 28 41 0.26214400000000000000e6 +1543 4 2 30 0.65536000000000000000e5 +1543 4 4 32 -0.32768000000000000000e5 +1543 4 6 34 0.13107200000000000000e6 +1543 4 16 28 0.32768000000000000000e5 +1544 1 24 55 -0.65536000000000000000e5 +1544 1 38 51 0.65536000000000000000e5 +1545 1 6 53 0.16384000000000000000e5 +1545 1 25 40 -0.16384000000000000000e5 +1545 1 28 43 -0.65536000000000000000e5 +1545 1 38 52 0.65536000000000000000e5 +1545 2 4 34 0.32768000000000000000e5 +1545 2 21 35 -0.32768000000000000000e5 +1545 3 5 50 0.32768000000000000000e5 +1545 3 23 52 0.65536000000000000000e5 +1545 3 24 37 0.16384000000000000000e5 +1545 3 27 40 0.65536000000000000000e5 +1545 4 4 32 -0.16384000000000000000e5 +1545 4 7 35 -0.32768000000000000000e5 +1545 4 16 28 0.16384000000000000000e5 +1546 1 38 54 0.65536000000000000000e5 +1546 1 40 47 -0.65536000000000000000e5 +1546 3 24 53 0.65536000000000000000e5 +1547 1 38 55 0.65536000000000000000e5 +1547 1 41 56 -0.65536000000000000000e5 +1547 3 27 56 -0.65536000000000000000e5 +1548 1 38 56 0.65536000000000000000e5 +1548 1 47 54 -0.65536000000000000000e5 +1549 1 1 48 0.32768000000000000000e5 +1549 1 2 49 0.65536000000000000000e5 +1549 1 8 39 0.65536000000000000000e5 +1549 1 9 40 0.65536000000000000000e5 +1549 1 10 41 -0.13107200000000000000e6 +1549 1 12 43 -0.26214400000000000000e6 +1549 1 23 38 0.32768000000000000000e5 +1549 1 24 39 0.32768000000000000000e5 +1549 1 26 41 -0.65536000000000000000e5 +1549 1 28 43 0.13107200000000000000e6 +1549 1 32 47 0.26214400000000000000e6 +1549 1 39 39 0.65536000000000000000e5 +1549 2 2 32 0.32768000000000000000e5 +1549 2 3 33 0.32768000000000000000e5 +1549 2 16 30 0.65536000000000000000e5 +1549 2 20 34 0.13107200000000000000e6 +1549 3 9 38 0.65536000000000000000e5 +1549 3 22 35 0.26214400000000000000e6 +1549 3 25 38 0.32768000000000000000e5 +1549 3 28 41 0.26214400000000000000e6 +1549 4 2 30 0.65536000000000000000e5 +1549 4 6 34 0.13107200000000000000e6 +1550 1 6 53 -0.65536000000000000000e5 +1550 1 39 40 0.65536000000000000000e5 +1551 1 1 48 0.32768000000000000000e5 +1551 1 2 49 0.32768000000000000000e5 +1551 1 6 53 0.32768000000000000000e5 +1551 1 8 39 0.65536000000000000000e5 +1551 1 9 40 0.65536000000000000000e5 +1551 1 10 41 -0.13107200000000000000e6 +1551 1 12 43 -0.26214400000000000000e6 +1551 1 23 38 0.32768000000000000000e5 +1551 1 25 40 -0.32768000000000000000e5 +1551 1 26 41 -0.65536000000000000000e5 +1551 1 28 43 0.13107200000000000000e6 +1551 1 32 47 0.26214400000000000000e6 +1551 1 39 41 0.65536000000000000000e5 +1551 2 2 32 0.32768000000000000000e5 +1551 2 16 30 0.65536000000000000000e5 +1551 2 20 34 0.13107200000000000000e6 +1551 3 9 38 0.65536000000000000000e5 +1551 3 22 35 0.26214400000000000000e6 +1551 3 24 37 0.32768000000000000000e5 +1551 3 27 40 0.65536000000000000000e5 +1551 3 28 41 0.26214400000000000000e6 +1551 4 2 30 0.65536000000000000000e5 +1551 4 4 32 -0.32768000000000000000e5 +1551 4 6 34 0.13107200000000000000e6 +1551 4 16 28 0.32768000000000000000e5 +1552 1 26 41 -0.65536000000000000000e5 +1552 1 39 42 0.65536000000000000000e5 +1552 3 27 40 0.65536000000000000000e5 +1553 1 1 48 -0.32768000000000000000e5 +1553 1 2 49 -0.32768000000000000000e5 +1553 1 8 39 -0.65536000000000000000e5 +1553 1 9 40 -0.65536000000000000000e5 +1553 1 10 41 0.13107200000000000000e6 +1553 1 12 43 0.26214400000000000000e6 +1553 1 23 38 -0.32768000000000000000e5 +1553 1 26 41 0.13107200000000000000e6 +1553 1 28 43 -0.26214400000000000000e6 +1553 1 32 47 -0.26214400000000000000e6 +1553 1 39 43 0.65536000000000000000e5 +1553 2 2 32 -0.32768000000000000000e5 +1553 2 4 34 0.65536000000000000000e5 +1553 2 16 30 -0.65536000000000000000e5 +1553 2 20 34 -0.13107200000000000000e6 +1553 3 5 50 0.65536000000000000000e5 +1553 3 9 38 -0.65536000000000000000e5 +1553 3 22 35 -0.26214400000000000000e6 +1553 3 28 41 -0.26214400000000000000e6 +1553 4 2 30 -0.65536000000000000000e5 +1553 4 6 34 -0.13107200000000000000e6 +1554 1 6 53 0.16384000000000000000e5 +1554 1 25 40 -0.16384000000000000000e5 +1554 1 28 43 -0.65536000000000000000e5 +1554 1 39 44 0.65536000000000000000e5 +1554 2 4 34 0.32768000000000000000e5 +1554 2 21 35 -0.32768000000000000000e5 +1554 3 5 50 0.32768000000000000000e5 +1554 3 24 37 0.16384000000000000000e5 +1554 3 27 40 0.65536000000000000000e5 +1554 4 4 32 -0.16384000000000000000e5 +1554 4 7 35 -0.32768000000000000000e5 +1554 4 16 28 0.16384000000000000000e5 +1555 1 33 48 -0.65536000000000000000e5 +1555 1 39 45 0.65536000000000000000e5 +1556 1 34 49 -0.65536000000000000000e5 +1556 1 39 46 0.65536000000000000000e5 +1557 1 23 54 -0.65536000000000000000e5 +1557 1 39 47 0.65536000000000000000e5 +1558 1 39 48 0.65536000000000000000e5 +1558 1 40 47 -0.65536000000000000000e5 +1559 1 25 56 -0.65536000000000000000e5 +1559 1 39 49 0.65536000000000000000e5 +1559 3 24 53 0.65536000000000000000e5 +1559 3 25 54 0.65536000000000000000e5 +1559 3 38 51 -0.13107200000000000000e6 +1559 4 28 32 0.65536000000000000000e5 +1560 1 24 55 -0.65536000000000000000e5 +1560 1 39 50 0.65536000000000000000e5 +1561 1 1 48 -0.32768000000000000000e5 +1561 1 2 49 -0.32768000000000000000e5 +1561 1 8 39 -0.65536000000000000000e5 +1561 1 9 40 -0.65536000000000000000e5 +1561 1 10 41 0.13107200000000000000e6 +1561 1 12 43 0.26214400000000000000e6 +1561 1 23 38 -0.32768000000000000000e5 +1561 1 24 55 0.65536000000000000000e5 +1561 1 26 41 0.65536000000000000000e5 +1561 1 28 43 -0.26214400000000000000e6 +1561 1 32 47 -0.26214400000000000000e6 +1561 1 39 51 0.65536000000000000000e5 +1561 2 2 32 -0.32768000000000000000e5 +1561 2 4 34 0.65536000000000000000e5 +1561 2 16 30 -0.65536000000000000000e5 +1561 2 20 34 -0.13107200000000000000e6 +1561 3 5 50 0.65536000000000000000e5 +1561 3 9 38 -0.65536000000000000000e5 +1561 3 22 35 -0.26214400000000000000e6 +1561 3 22 51 -0.65536000000000000000e5 +1561 3 23 52 0.13107200000000000000e6 +1561 3 27 40 0.65536000000000000000e5 +1561 3 28 41 -0.26214400000000000000e6 +1561 4 2 30 -0.65536000000000000000e5 +1561 4 6 34 -0.13107200000000000000e6 +1561 4 7 35 -0.65536000000000000000e5 +1562 1 33 48 -0.65536000000000000000e5 +1562 1 39 52 0.65536000000000000000e5 +1562 3 10 55 -0.65536000000000000000e5 +1562 3 35 48 0.13107200000000000000e6 +1562 3 40 45 -0.65536000000000000000e5 +1562 4 22 34 -0.65536000000000000000e5 +1563 1 39 53 0.65536000000000000000e5 +1563 1 40 47 -0.65536000000000000000e5 +1563 3 24 53 0.65536000000000000000e5 +1564 1 25 56 -0.65536000000000000000e5 +1564 1 39 54 0.65536000000000000000e5 +1565 1 1 48 -0.32768000000000000000e5 +1565 1 2 49 -0.32768000000000000000e5 +1565 1 8 39 -0.65536000000000000000e5 +1565 1 9 40 -0.65536000000000000000e5 +1565 1 10 41 0.13107200000000000000e6 +1565 1 12 43 0.26214400000000000000e6 +1565 1 23 38 -0.32768000000000000000e5 +1565 1 24 55 0.65536000000000000000e5 +1565 1 26 41 0.65536000000000000000e5 +1565 1 28 43 -0.26214400000000000000e6 +1565 1 32 47 -0.26214400000000000000e6 +1565 1 39 55 0.65536000000000000000e5 +1565 2 2 32 -0.32768000000000000000e5 +1565 2 4 34 0.65536000000000000000e5 +1565 2 16 30 -0.65536000000000000000e5 +1565 2 20 34 -0.13107200000000000000e6 +1565 3 5 50 0.65536000000000000000e5 +1565 3 9 38 -0.65536000000000000000e5 +1565 3 22 35 -0.26214400000000000000e6 +1565 3 22 51 -0.65536000000000000000e5 +1565 3 23 52 0.13107200000000000000e6 +1565 3 27 40 0.65536000000000000000e5 +1565 3 28 41 -0.26214400000000000000e6 +1565 3 38 51 0.65536000000000000000e5 +1565 4 2 30 -0.65536000000000000000e5 +1565 4 6 34 -0.13107200000000000000e6 +1565 4 7 35 -0.65536000000000000000e5 +1566 1 1 48 0.65536000000000000000e5 +1566 1 2 49 0.13107200000000000000e6 +1566 1 6 53 -0.65536000000000000000e5 +1566 1 8 39 0.13107200000000000000e6 +1566 1 9 40 0.13107200000000000000e6 +1566 1 10 41 -0.26214400000000000000e6 +1566 1 12 43 -0.52428800000000000000e6 +1566 1 23 38 0.65536000000000000000e5 +1566 1 24 39 0.65536000000000000000e5 +1566 1 24 55 0.13107200000000000000e6 +1566 1 26 41 -0.26214400000000000000e6 +1566 1 28 43 0.26214400000000000000e6 +1566 1 32 47 0.52428800000000000000e6 +1566 1 39 56 0.65536000000000000000e5 +1566 1 47 54 0.65536000000000000000e5 +1566 2 2 32 0.65536000000000000000e5 +1566 2 3 33 0.65536000000000000000e5 +1566 2 5 35 -0.65536000000000000000e5 +1566 2 16 30 0.13107200000000000000e6 +1566 2 20 34 0.26214400000000000000e6 +1566 2 33 35 0.65536000000000000000e5 +1566 3 9 38 0.13107200000000000000e6 +1566 3 22 35 0.52428800000000000000e6 +1566 3 22 51 -0.13107200000000000000e6 +1566 3 23 52 0.26214400000000000000e6 +1566 3 25 38 0.65536000000000000000e5 +1566 3 25 54 -0.65536000000000000000e5 +1566 3 27 40 0.13107200000000000000e6 +1566 3 28 41 0.52428800000000000000e6 +1566 3 38 51 0.13107200000000000000e6 +1566 3 39 40 -0.65536000000000000000e5 +1566 3 40 53 -0.65536000000000000000e5 +1566 3 41 54 0.13107200000000000000e6 +1566 4 2 30 0.13107200000000000000e6 +1566 4 6 34 0.26214400000000000000e6 +1566 4 7 35 -0.13107200000000000000e6 +1567 1 1 48 -0.65536000000000000000e5 +1567 1 2 49 -0.98304000000000000000e5 +1567 1 6 53 0.32768000000000000000e5 +1567 1 8 39 -0.13107200000000000000e6 +1567 1 9 40 -0.13107200000000000000e6 +1567 1 10 41 0.26214400000000000000e6 +1567 1 12 43 0.52428800000000000000e6 +1567 1 23 38 -0.65536000000000000000e5 +1567 1 24 39 -0.32768000000000000000e5 +1567 1 26 41 0.19660800000000000000e6 +1567 1 28 43 -0.39321600000000000000e6 +1567 1 32 47 -0.52428800000000000000e6 +1567 1 40 40 0.65536000000000000000e5 +1567 2 2 32 -0.65536000000000000000e5 +1567 2 3 33 -0.32768000000000000000e5 +1567 2 4 34 0.65536000000000000000e5 +1567 2 5 35 0.32768000000000000000e5 +1567 2 16 30 -0.13107200000000000000e6 +1567 2 20 34 -0.26214400000000000000e6 +1567 3 5 50 0.65536000000000000000e5 +1567 3 9 38 -0.13107200000000000000e6 +1567 3 22 35 -0.52428800000000000000e6 +1567 3 25 38 -0.32768000000000000000e5 +1567 3 28 41 -0.52428800000000000000e6 +1567 4 2 30 -0.13107200000000000000e6 +1567 4 6 34 -0.26214400000000000000e6 +1568 1 26 41 -0.65536000000000000000e5 +1568 1 40 41 0.65536000000000000000e5 +1568 3 27 40 0.65536000000000000000e5 +1569 1 1 48 -0.32768000000000000000e5 +1569 1 2 49 -0.32768000000000000000e5 +1569 1 8 39 -0.65536000000000000000e5 +1569 1 9 40 -0.65536000000000000000e5 +1569 1 10 41 0.13107200000000000000e6 +1569 1 12 43 0.26214400000000000000e6 +1569 1 23 38 -0.32768000000000000000e5 +1569 1 26 41 0.13107200000000000000e6 +1569 1 28 43 -0.26214400000000000000e6 +1569 1 32 47 -0.26214400000000000000e6 +1569 1 40 42 0.65536000000000000000e5 +1569 2 2 32 -0.32768000000000000000e5 +1569 2 4 34 0.65536000000000000000e5 +1569 2 16 30 -0.65536000000000000000e5 +1569 2 20 34 -0.13107200000000000000e6 +1569 3 5 50 0.65536000000000000000e5 +1569 3 9 38 -0.65536000000000000000e5 +1569 3 22 35 -0.26214400000000000000e6 +1569 3 28 41 -0.26214400000000000000e6 +1569 4 2 30 -0.65536000000000000000e5 +1569 4 6 34 -0.13107200000000000000e6 +1570 1 1 48 0.32768000000000000000e5 +1570 1 2 49 0.32768000000000000000e5 +1570 1 8 39 0.65536000000000000000e5 +1570 1 9 40 0.65536000000000000000e5 +1570 1 10 41 -0.13107200000000000000e6 +1570 1 12 43 -0.26214400000000000000e6 +1570 1 23 38 0.32768000000000000000e5 +1570 1 26 41 -0.65536000000000000000e5 +1570 1 28 43 0.26214400000000000000e6 +1570 1 32 47 0.26214400000000000000e6 +1570 1 33 48 -0.13107200000000000000e6 +1570 1 40 43 0.65536000000000000000e5 +1570 2 2 32 0.32768000000000000000e5 +1570 2 4 34 -0.65536000000000000000e5 +1570 2 16 30 0.65536000000000000000e5 +1570 2 20 34 0.13107200000000000000e6 +1570 2 28 34 0.65536000000000000000e5 +1570 3 5 50 -0.65536000000000000000e5 +1570 3 9 38 0.65536000000000000000e5 +1570 3 22 35 0.26214400000000000000e6 +1570 3 27 40 -0.65536000000000000000e5 +1570 3 28 41 0.26214400000000000000e6 +1570 4 2 30 0.65536000000000000000e5 +1570 4 6 34 0.13107200000000000000e6 +1570 4 21 33 0.65536000000000000000e5 +1571 1 33 48 -0.65536000000000000000e5 +1571 1 40 44 0.65536000000000000000e5 +1572 1 33 40 -0.65536000000000000000e5 +1572 1 40 45 0.65536000000000000000e5 +1572 3 14 51 0.13107200000000000000e6 +1572 3 29 42 -0.65536000000000000000e5 +1572 3 30 43 -0.65536000000000000000e5 +1572 4 19 31 -0.65536000000000000000e5 +1573 1 18 49 -0.65536000000000000000e5 +1573 1 40 46 0.65536000000000000000e5 +1573 3 14 51 0.65536000000000000000e5 +1574 1 25 56 -0.65536000000000000000e5 +1574 1 40 48 0.65536000000000000000e5 +1574 3 24 53 0.65536000000000000000e5 +1574 3 25 54 0.65536000000000000000e5 +1574 3 38 51 -0.13107200000000000000e6 +1574 4 28 32 0.65536000000000000000e5 +1575 1 1 48 -0.13107200000000000000e6 +1575 1 2 49 -0.19660800000000000000e6 +1575 1 6 53 0.65536000000000000000e5 +1575 1 8 39 -0.26214400000000000000e6 +1575 1 9 40 -0.26214400000000000000e6 +1575 1 10 41 0.52428800000000000000e6 +1575 1 12 43 0.10485760000000000000e7 +1575 1 23 38 -0.13107200000000000000e6 +1575 1 24 39 -0.65536000000000000000e5 +1575 1 26 41 0.39321600000000000000e6 +1575 1 28 43 -0.78643200000000000000e6 +1575 1 32 47 -0.10485760000000000000e7 +1575 1 40 49 0.65536000000000000000e5 +1575 2 2 32 -0.13107200000000000000e6 +1575 2 3 33 -0.65536000000000000000e5 +1575 2 4 34 0.13107200000000000000e6 +1575 2 5 35 0.65536000000000000000e5 +1575 2 16 30 -0.26214400000000000000e6 +1575 2 20 34 -0.52428800000000000000e6 +1575 3 5 50 0.13107200000000000000e6 +1575 3 9 38 -0.26214400000000000000e6 +1575 3 22 35 -0.10485760000000000000e7 +1575 3 25 38 -0.65536000000000000000e5 +1575 3 28 41 -0.10485760000000000000e7 +1575 3 39 40 0.65536000000000000000e5 +1575 4 2 30 -0.26214400000000000000e6 +1575 4 6 34 -0.52428800000000000000e6 +1576 1 1 48 -0.32768000000000000000e5 +1576 1 2 49 -0.32768000000000000000e5 +1576 1 8 39 -0.65536000000000000000e5 +1576 1 9 40 -0.65536000000000000000e5 +1576 1 10 41 0.13107200000000000000e6 +1576 1 12 43 0.26214400000000000000e6 +1576 1 23 38 -0.32768000000000000000e5 +1576 1 24 55 0.65536000000000000000e5 +1576 1 26 41 0.65536000000000000000e5 +1576 1 28 43 -0.26214400000000000000e6 +1576 1 32 47 -0.26214400000000000000e6 +1576 1 40 50 0.65536000000000000000e5 +1576 2 2 32 -0.32768000000000000000e5 +1576 2 4 34 0.65536000000000000000e5 +1576 2 16 30 -0.65536000000000000000e5 +1576 2 20 34 -0.13107200000000000000e6 +1576 3 5 50 0.65536000000000000000e5 +1576 3 9 38 -0.65536000000000000000e5 +1576 3 22 35 -0.26214400000000000000e6 +1576 3 22 51 -0.65536000000000000000e5 +1576 3 23 52 0.13107200000000000000e6 +1576 3 27 40 0.65536000000000000000e5 +1576 3 28 41 -0.26214400000000000000e6 +1576 4 2 30 -0.65536000000000000000e5 +1576 4 6 34 -0.13107200000000000000e6 +1576 4 7 35 -0.65536000000000000000e5 +1577 1 1 48 0.32768000000000000000e5 +1577 1 2 49 0.32768000000000000000e5 +1577 1 8 39 0.65536000000000000000e5 +1577 1 9 40 0.65536000000000000000e5 +1577 1 10 41 -0.13107200000000000000e6 +1577 1 12 43 -0.26214400000000000000e6 +1577 1 23 38 0.32768000000000000000e5 +1577 1 26 41 -0.65536000000000000000e5 +1577 1 28 43 0.26214400000000000000e6 +1577 1 32 47 0.26214400000000000000e6 +1577 1 33 48 -0.13107200000000000000e6 +1577 1 40 51 0.65536000000000000000e5 +1577 2 2 32 0.32768000000000000000e5 +1577 2 4 34 -0.65536000000000000000e5 +1577 2 16 30 0.65536000000000000000e5 +1577 2 20 34 0.13107200000000000000e6 +1577 2 28 34 0.65536000000000000000e5 +1577 3 5 50 -0.65536000000000000000e5 +1577 3 9 38 0.65536000000000000000e5 +1577 3 10 55 -0.13107200000000000000e6 +1577 3 22 35 0.26214400000000000000e6 +1577 3 22 51 0.65536000000000000000e5 +1577 3 23 52 -0.13107200000000000000e6 +1577 3 27 40 -0.65536000000000000000e5 +1577 3 28 41 0.26214400000000000000e6 +1577 3 35 48 0.26214400000000000000e6 +1577 3 40 45 -0.13107200000000000000e6 +1577 4 2 30 0.65536000000000000000e5 +1577 4 6 34 0.13107200000000000000e6 +1577 4 7 35 0.65536000000000000000e5 +1577 4 22 34 -0.13107200000000000000e6 +1578 1 33 40 -0.65536000000000000000e5 +1578 1 40 52 0.65536000000000000000e5 +1578 3 10 55 0.65536000000000000000e5 +1578 3 14 51 0.13107200000000000000e6 +1578 3 29 42 -0.65536000000000000000e5 +1578 3 30 43 -0.65536000000000000000e5 +1578 4 19 31 -0.65536000000000000000e5 +1579 1 25 56 -0.65536000000000000000e5 +1579 1 40 53 0.65536000000000000000e5 +1580 1 1 48 -0.13107200000000000000e6 +1580 1 2 49 -0.19660800000000000000e6 +1580 1 6 53 0.65536000000000000000e5 +1580 1 8 39 -0.26214400000000000000e6 +1580 1 9 40 -0.26214400000000000000e6 +1580 1 10 41 0.52428800000000000000e6 +1580 1 12 43 0.10485760000000000000e7 +1580 1 23 38 -0.13107200000000000000e6 +1580 1 24 39 -0.65536000000000000000e5 +1580 1 26 41 0.39321600000000000000e6 +1580 1 28 43 -0.78643200000000000000e6 +1580 1 32 47 -0.10485760000000000000e7 +1580 1 40 54 0.65536000000000000000e5 +1580 2 2 32 -0.13107200000000000000e6 +1580 2 3 33 -0.65536000000000000000e5 +1580 2 4 34 0.13107200000000000000e6 +1580 2 5 35 0.65536000000000000000e5 +1580 2 16 30 -0.26214400000000000000e6 +1580 2 20 34 -0.52428800000000000000e6 +1580 3 5 50 0.13107200000000000000e6 +1580 3 9 38 -0.26214400000000000000e6 +1580 3 22 35 -0.10485760000000000000e7 +1580 3 25 38 -0.65536000000000000000e5 +1580 3 25 54 0.65536000000000000000e5 +1580 3 28 41 -0.10485760000000000000e7 +1580 3 39 40 0.65536000000000000000e5 +1580 4 2 30 -0.26214400000000000000e6 +1580 4 6 34 -0.52428800000000000000e6 +1581 1 1 48 -0.13107200000000000000e6 +1581 1 2 49 -0.19660800000000000000e6 +1581 1 6 53 0.65536000000000000000e5 +1581 1 8 39 -0.26214400000000000000e6 +1581 1 9 40 -0.26214400000000000000e6 +1581 1 10 41 0.52428800000000000000e6 +1581 1 12 43 0.10485760000000000000e7 +1581 1 23 38 -0.13107200000000000000e6 +1581 1 24 39 -0.65536000000000000000e5 +1581 1 26 41 0.39321600000000000000e6 +1581 1 28 43 -0.78643200000000000000e6 +1581 1 32 47 -0.10485760000000000000e7 +1581 1 40 56 0.65536000000000000000e5 +1581 2 2 32 -0.13107200000000000000e6 +1581 2 3 33 -0.65536000000000000000e5 +1581 2 4 34 0.13107200000000000000e6 +1581 2 5 35 0.65536000000000000000e5 +1581 2 16 30 -0.26214400000000000000e6 +1581 2 20 34 -0.52428800000000000000e6 +1581 3 5 50 0.13107200000000000000e6 +1581 3 9 38 -0.26214400000000000000e6 +1581 3 22 35 -0.10485760000000000000e7 +1581 3 25 38 -0.65536000000000000000e5 +1581 3 25 54 0.65536000000000000000e5 +1581 3 28 41 -0.10485760000000000000e7 +1581 3 39 40 0.65536000000000000000e5 +1581 3 40 53 0.65536000000000000000e5 +1581 4 2 30 -0.26214400000000000000e6 +1581 4 6 34 -0.52428800000000000000e6 +1582 1 6 53 -0.81920000000000000000e4 +1582 1 12 43 -0.65536000000000000000e5 +1582 1 25 40 0.81920000000000000000e4 +1582 1 28 43 0.32768000000000000000e5 +1582 1 32 47 0.32768000000000000000e5 +1582 1 41 41 0.65536000000000000000e5 +1582 2 4 34 -0.16384000000000000000e5 +1582 2 20 34 0.32768000000000000000e5 +1582 2 21 35 0.16384000000000000000e5 +1582 3 5 50 -0.16384000000000000000e5 +1582 3 7 52 0.65536000000000000000e5 +1582 3 22 35 0.65536000000000000000e5 +1582 3 24 37 -0.81920000000000000000e4 +1582 3 27 40 -0.32768000000000000000e5 +1582 4 4 32 0.81920000000000000000e4 +1582 4 7 35 0.16384000000000000000e5 +1582 4 16 28 -0.81920000000000000000e4 +1583 1 32 47 -0.65536000000000000000e5 +1583 1 41 42 0.65536000000000000000e5 +1584 1 6 53 0.16384000000000000000e5 +1584 1 25 40 -0.16384000000000000000e5 +1584 1 28 43 -0.65536000000000000000e5 +1584 1 41 43 0.65536000000000000000e5 +1584 2 4 34 0.32768000000000000000e5 +1584 2 21 35 -0.32768000000000000000e5 +1584 3 5 50 0.32768000000000000000e5 +1584 3 24 37 0.16384000000000000000e5 +1584 3 27 40 0.65536000000000000000e5 +1584 4 4 32 -0.16384000000000000000e5 +1584 4 7 35 -0.32768000000000000000e5 +1584 4 16 28 0.16384000000000000000e5 +1585 1 12 43 -0.65536000000000000000e5 +1585 1 41 44 0.65536000000000000000e5 +1585 3 7 52 0.65536000000000000000e5 +1585 3 22 35 0.65536000000000000000e5 +1586 1 6 53 0.81920000000000000000e4 +1586 1 17 48 -0.65536000000000000000e5 +1586 1 25 40 -0.81920000000000000000e4 +1586 1 41 45 0.65536000000000000000e5 +1586 2 4 34 0.16384000000000000000e5 +1586 2 21 35 -0.16384000000000000000e5 +1586 3 5 50 0.16384000000000000000e5 +1586 3 24 37 0.81920000000000000000e4 +1586 3 27 40 0.32768000000000000000e5 +1586 3 28 41 0.32768000000000000000e5 +1586 3 29 42 0.32768000000000000000e5 +1586 4 4 32 -0.81920000000000000000e4 +1586 4 7 35 -0.16384000000000000000e5 +1586 4 16 28 0.81920000000000000000e4 +1586 4 23 27 0.32768000000000000000e5 +1587 1 4 35 -0.32768000000000000000e5 +1587 1 12 43 -0.32768000000000000000e5 +1587 1 34 49 -0.32768000000000000000e5 +1587 1 41 46 0.65536000000000000000e5 +1587 2 9 23 -0.32768000000000000000e5 +1587 3 5 34 -0.32768000000000000000e5 +1587 3 13 42 0.32768000000000000000e5 +1587 3 14 27 -0.32768000000000000000e5 +1587 3 16 29 0.65536000000000000000e5 +1587 3 18 47 -0.32768000000000000000e5 +1587 3 22 35 0.32768000000000000000e5 +1587 3 31 44 0.65536000000000000000e5 +1587 4 14 26 0.32768000000000000000e5 +1588 1 6 53 -0.32768000000000000000e5 +1588 1 8 39 -0.65536000000000000000e5 +1588 1 9 40 -0.65536000000000000000e5 +1588 1 10 41 0.13107200000000000000e6 +1588 1 24 55 0.65536000000000000000e5 +1588 1 25 40 0.32768000000000000000e5 +1588 1 37 52 -0.13107200000000000000e6 +1588 1 41 47 0.65536000000000000000e5 +1588 3 9 38 -0.65536000000000000000e5 +1588 3 22 51 -0.65536000000000000000e5 +1588 3 24 37 -0.32768000000000000000e5 +1588 3 27 40 -0.65536000000000000000e5 +1588 4 2 30 -0.65536000000000000000e5 +1588 4 4 32 0.32768000000000000000e5 +1588 4 16 28 -0.32768000000000000000e5 +1588 4 17 29 -0.65536000000000000000e5 +1588 4 20 32 -0.65536000000000000000e5 +1589 1 1 48 0.32768000000000000000e5 +1589 1 2 49 0.32768000000000000000e5 +1589 1 6 53 0.32768000000000000000e5 +1589 1 8 39 0.65536000000000000000e5 +1589 1 9 40 0.65536000000000000000e5 +1589 1 10 41 -0.13107200000000000000e6 +1589 1 12 43 -0.26214400000000000000e6 +1589 1 23 38 0.32768000000000000000e5 +1589 1 25 40 -0.32768000000000000000e5 +1589 1 26 41 -0.65536000000000000000e5 +1589 1 28 43 0.13107200000000000000e6 +1589 1 32 47 0.26214400000000000000e6 +1589 1 41 48 0.65536000000000000000e5 +1589 2 2 32 0.32768000000000000000e5 +1589 2 16 30 0.65536000000000000000e5 +1589 2 20 34 0.13107200000000000000e6 +1589 3 9 38 0.65536000000000000000e5 +1589 3 22 35 0.26214400000000000000e6 +1589 3 22 51 0.65536000000000000000e5 +1589 3 24 37 0.32768000000000000000e5 +1589 3 27 40 0.65536000000000000000e5 +1589 3 28 41 0.26214400000000000000e6 +1589 4 2 30 0.65536000000000000000e5 +1589 4 4 32 -0.32768000000000000000e5 +1589 4 6 34 0.13107200000000000000e6 +1589 4 16 28 0.32768000000000000000e5 +1590 1 24 55 -0.65536000000000000000e5 +1590 1 41 49 0.65536000000000000000e5 +1591 1 37 52 -0.65536000000000000000e5 +1591 1 41 50 0.65536000000000000000e5 +1592 1 6 53 0.16384000000000000000e5 +1592 1 25 40 -0.16384000000000000000e5 +1592 1 28 43 -0.65536000000000000000e5 +1592 1 41 51 0.65536000000000000000e5 +1592 2 4 34 0.32768000000000000000e5 +1592 2 21 35 -0.32768000000000000000e5 +1592 3 5 50 0.32768000000000000000e5 +1592 3 23 52 0.65536000000000000000e5 +1592 3 24 37 0.16384000000000000000e5 +1592 3 27 40 0.65536000000000000000e5 +1592 4 4 32 -0.16384000000000000000e5 +1592 4 7 35 -0.32768000000000000000e5 +1592 4 16 28 0.16384000000000000000e5 +1593 1 6 53 0.81920000000000000000e4 +1593 1 17 48 -0.65536000000000000000e5 +1593 1 25 40 -0.81920000000000000000e4 +1593 1 41 52 0.65536000000000000000e5 +1593 2 4 34 0.16384000000000000000e5 +1593 2 21 35 -0.16384000000000000000e5 +1593 3 5 50 0.16384000000000000000e5 +1593 3 24 37 0.81920000000000000000e4 +1593 3 27 40 0.32768000000000000000e5 +1593 3 28 41 0.32768000000000000000e5 +1593 3 29 42 0.32768000000000000000e5 +1593 3 34 47 0.65536000000000000000e5 +1593 4 4 32 -0.81920000000000000000e4 +1593 4 7 35 -0.16384000000000000000e5 +1593 4 16 28 0.81920000000000000000e4 +1593 4 23 27 0.32768000000000000000e5 +1594 1 1 48 0.32768000000000000000e5 +1594 1 2 49 0.32768000000000000000e5 +1594 1 6 53 0.32768000000000000000e5 +1594 1 8 39 0.65536000000000000000e5 +1594 1 9 40 0.65536000000000000000e5 +1594 1 10 41 -0.13107200000000000000e6 +1594 1 12 43 -0.26214400000000000000e6 +1594 1 23 38 0.32768000000000000000e5 +1594 1 25 40 -0.32768000000000000000e5 +1594 1 26 41 -0.65536000000000000000e5 +1594 1 28 43 0.13107200000000000000e6 +1594 1 32 47 0.26214400000000000000e6 +1594 1 41 53 0.65536000000000000000e5 +1594 2 2 32 0.32768000000000000000e5 +1594 2 16 30 0.65536000000000000000e5 +1594 2 20 34 0.13107200000000000000e6 +1594 3 9 38 0.65536000000000000000e5 +1594 3 22 35 0.26214400000000000000e6 +1594 3 22 51 0.65536000000000000000e5 +1594 3 24 37 0.32768000000000000000e5 +1594 3 27 40 0.65536000000000000000e5 +1594 3 28 41 0.26214400000000000000e6 +1594 3 37 50 0.65536000000000000000e5 +1594 4 2 30 0.65536000000000000000e5 +1594 4 4 32 -0.32768000000000000000e5 +1594 4 6 34 0.13107200000000000000e6 +1594 4 16 28 0.32768000000000000000e5 +1595 1 41 54 0.65536000000000000000e5 +1595 1 41 56 -0.65536000000000000000e5 +1595 3 27 56 -0.65536000000000000000e5 +1596 1 1 48 0.16384000000000000000e5 +1596 1 2 49 0.16384000000000000000e5 +1596 1 6 53 0.16384000000000000000e5 +1596 1 8 39 0.32768000000000000000e5 +1596 1 9 40 0.32768000000000000000e5 +1596 1 10 41 -0.65536000000000000000e5 +1596 1 12 43 -0.13107200000000000000e6 +1596 1 23 38 0.16384000000000000000e5 +1596 1 24 55 -0.32768000000000000000e5 +1596 1 25 40 -0.16384000000000000000e5 +1596 1 26 41 -0.32768000000000000000e5 +1596 1 28 43 0.65536000000000000000e5 +1596 1 32 47 0.13107200000000000000e6 +1596 1 33 48 -0.65536000000000000000e5 +1596 1 40 55 0.32768000000000000000e5 +1596 1 41 55 0.65536000000000000000e5 +1596 1 41 56 0.32768000000000000000e5 +1596 1 44 51 0.13107200000000000000e6 +1596 1 46 53 -0.13107200000000000000e6 +1596 2 2 32 0.16384000000000000000e5 +1596 2 16 30 0.32768000000000000000e5 +1596 2 20 34 0.65536000000000000000e5 +1596 2 21 35 -0.32768000000000000000e5 +1596 2 28 34 0.32768000000000000000e5 +1596 3 9 38 0.32768000000000000000e5 +1596 3 10 55 -0.65536000000000000000e5 +1596 3 22 35 0.13107200000000000000e6 +1596 3 22 51 0.32768000000000000000e5 +1596 3 24 37 0.16384000000000000000e5 +1596 3 27 40 0.32768000000000000000e5 +1596 3 27 56 0.32768000000000000000e5 +1596 3 28 41 0.13107200000000000000e6 +1596 3 35 48 0.13107200000000000000e6 +1596 3 38 51 -0.32768000000000000000e5 +1596 3 39 52 -0.65536000000000000000e5 +1596 3 40 45 -0.65536000000000000000e5 +1596 4 2 30 0.32768000000000000000e5 +1596 4 4 32 -0.16384000000000000000e5 +1596 4 6 34 0.65536000000000000000e5 +1596 4 16 28 0.16384000000000000000e5 +1596 4 22 34 -0.65536000000000000000e5 +1596 4 23 35 -0.65536000000000000000e5 +1596 4 29 33 -0.32768000000000000000e5 +1597 1 6 53 0.81920000000000000000e4 +1597 1 25 40 -0.81920000000000000000e4 +1597 1 28 43 -0.32768000000000000000e5 +1597 1 42 42 0.65536000000000000000e5 +1597 2 4 34 0.16384000000000000000e5 +1597 2 21 35 -0.16384000000000000000e5 +1597 3 5 50 0.16384000000000000000e5 +1597 3 24 37 0.81920000000000000000e4 +1597 3 27 40 0.32768000000000000000e5 +1597 4 4 32 -0.81920000000000000000e4 +1597 4 7 35 -0.16384000000000000000e5 +1597 4 16 28 0.81920000000000000000e4 +1598 1 33 48 -0.65536000000000000000e5 +1598 1 42 43 0.65536000000000000000e5 +1599 1 6 53 0.81920000000000000000e4 +1599 1 17 48 -0.65536000000000000000e5 +1599 1 25 40 -0.81920000000000000000e4 +1599 1 42 44 0.65536000000000000000e5 +1599 2 4 34 0.16384000000000000000e5 +1599 2 21 35 -0.16384000000000000000e5 +1599 3 5 50 0.16384000000000000000e5 +1599 3 24 37 0.81920000000000000000e4 +1599 3 27 40 0.32768000000000000000e5 +1599 3 28 41 0.32768000000000000000e5 +1599 3 29 42 0.32768000000000000000e5 +1599 4 4 32 -0.81920000000000000000e4 +1599 4 7 35 -0.16384000000000000000e5 +1599 4 16 28 0.81920000000000000000e4 +1599 4 23 27 0.32768000000000000000e5 +1600 1 34 49 -0.65536000000000000000e5 +1600 1 42 45 0.65536000000000000000e5 +1601 1 14 45 -0.13107200000000000000e6 +1601 1 17 48 0.32768000000000000000e5 +1601 1 18 49 0.32768000000000000000e5 +1601 1 34 49 0.32768000000000000000e5 +1601 1 42 46 0.65536000000000000000e5 +1601 2 14 28 0.32768000000000000000e5 +1601 3 14 43 0.32768000000000000000e5 +1601 3 15 44 -0.65536000000000000000e5 +1601 3 16 45 0.13107200000000000000e6 +1601 3 18 47 0.32768000000000000000e5 +1601 3 19 48 0.65536000000000000000e5 +1601 3 22 35 -0.32768000000000000000e5 +1601 4 14 26 -0.32768000000000000000e5 +1601 4 15 27 -0.65536000000000000000e5 +1602 1 1 48 0.32768000000000000000e5 +1602 1 2 49 0.32768000000000000000e5 +1602 1 6 53 0.32768000000000000000e5 +1602 1 8 39 0.65536000000000000000e5 +1602 1 9 40 0.65536000000000000000e5 +1602 1 10 41 -0.13107200000000000000e6 +1602 1 12 43 -0.26214400000000000000e6 +1602 1 23 38 0.32768000000000000000e5 +1602 1 25 40 -0.32768000000000000000e5 +1602 1 26 41 -0.65536000000000000000e5 +1602 1 28 43 0.13107200000000000000e6 +1602 1 32 47 0.26214400000000000000e6 +1602 1 42 47 0.65536000000000000000e5 +1602 2 2 32 0.32768000000000000000e5 +1602 2 16 30 0.65536000000000000000e5 +1602 2 20 34 0.13107200000000000000e6 +1602 3 9 38 0.65536000000000000000e5 +1602 3 22 35 0.26214400000000000000e6 +1602 3 22 51 0.65536000000000000000e5 +1602 3 24 37 0.32768000000000000000e5 +1602 3 27 40 0.65536000000000000000e5 +1602 3 28 41 0.26214400000000000000e6 +1602 4 2 30 0.65536000000000000000e5 +1602 4 4 32 -0.32768000000000000000e5 +1602 4 6 34 0.13107200000000000000e6 +1602 4 16 28 0.32768000000000000000e5 +1603 1 24 55 -0.65536000000000000000e5 +1603 1 42 48 0.65536000000000000000e5 +1604 1 1 48 -0.32768000000000000000e5 +1604 1 2 49 -0.32768000000000000000e5 +1604 1 8 39 -0.65536000000000000000e5 +1604 1 9 40 -0.65536000000000000000e5 +1604 1 10 41 0.13107200000000000000e6 +1604 1 12 43 0.26214400000000000000e6 +1604 1 23 38 -0.32768000000000000000e5 +1604 1 24 55 0.65536000000000000000e5 +1604 1 26 41 0.65536000000000000000e5 +1604 1 28 43 -0.26214400000000000000e6 +1604 1 32 47 -0.26214400000000000000e6 +1604 1 42 49 0.65536000000000000000e5 +1604 2 2 32 -0.32768000000000000000e5 +1604 2 4 34 0.65536000000000000000e5 +1604 2 16 30 -0.65536000000000000000e5 +1604 2 20 34 -0.13107200000000000000e6 +1604 3 5 50 0.65536000000000000000e5 +1604 3 9 38 -0.65536000000000000000e5 +1604 3 22 35 -0.26214400000000000000e6 +1604 3 22 51 -0.65536000000000000000e5 +1604 3 23 52 0.13107200000000000000e6 +1604 3 27 40 0.65536000000000000000e5 +1604 3 28 41 -0.26214400000000000000e6 +1604 4 2 30 -0.65536000000000000000e5 +1604 4 6 34 -0.13107200000000000000e6 +1604 4 7 35 -0.65536000000000000000e5 +1605 1 6 53 0.16384000000000000000e5 +1605 1 25 40 -0.16384000000000000000e5 +1605 1 28 43 -0.65536000000000000000e5 +1605 1 42 50 0.65536000000000000000e5 +1605 2 4 34 0.32768000000000000000e5 +1605 2 21 35 -0.32768000000000000000e5 +1605 3 5 50 0.32768000000000000000e5 +1605 3 23 52 0.65536000000000000000e5 +1605 3 24 37 0.16384000000000000000e5 +1605 3 27 40 0.65536000000000000000e5 +1605 4 4 32 -0.16384000000000000000e5 +1605 4 7 35 -0.32768000000000000000e5 +1605 4 16 28 0.16384000000000000000e5 +1606 1 33 48 -0.65536000000000000000e5 +1606 1 42 51 0.65536000000000000000e5 +1606 3 10 55 -0.65536000000000000000e5 +1606 3 35 48 0.13107200000000000000e6 +1606 3 40 45 -0.65536000000000000000e5 +1606 4 22 34 -0.65536000000000000000e5 +1607 1 42 52 0.65536000000000000000e5 +1607 1 44 51 -0.65536000000000000000e5 +1608 1 41 56 -0.65536000000000000000e5 +1608 1 42 53 0.65536000000000000000e5 +1608 3 27 56 -0.65536000000000000000e5 +1609 1 1 48 -0.32768000000000000000e5 +1609 1 2 49 -0.32768000000000000000e5 +1609 1 8 39 -0.65536000000000000000e5 +1609 1 9 40 -0.65536000000000000000e5 +1609 1 10 41 0.13107200000000000000e6 +1609 1 12 43 0.26214400000000000000e6 +1609 1 23 38 -0.32768000000000000000e5 +1609 1 24 55 0.65536000000000000000e5 +1609 1 26 41 0.65536000000000000000e5 +1609 1 28 43 -0.26214400000000000000e6 +1609 1 32 47 -0.26214400000000000000e6 +1609 1 42 54 0.65536000000000000000e5 +1609 2 2 32 -0.32768000000000000000e5 +1609 2 4 34 0.65536000000000000000e5 +1609 2 16 30 -0.65536000000000000000e5 +1609 2 20 34 -0.13107200000000000000e6 +1609 3 5 50 0.65536000000000000000e5 +1609 3 9 38 -0.65536000000000000000e5 +1609 3 22 35 -0.26214400000000000000e6 +1609 3 22 51 -0.65536000000000000000e5 +1609 3 23 52 0.13107200000000000000e6 +1609 3 27 40 0.65536000000000000000e5 +1609 3 28 41 -0.26214400000000000000e6 +1609 3 38 51 0.65536000000000000000e5 +1609 4 2 30 -0.65536000000000000000e5 +1609 4 6 34 -0.13107200000000000000e6 +1609 4 7 35 -0.65536000000000000000e5 +1610 1 1 48 -0.16384000000000000000e5 +1610 1 2 49 -0.16384000000000000000e5 +1610 1 8 39 -0.32768000000000000000e5 +1610 1 9 40 -0.32768000000000000000e5 +1610 1 10 41 0.65536000000000000000e5 +1610 1 12 43 0.13107200000000000000e6 +1610 1 23 38 -0.16384000000000000000e5 +1610 1 24 55 0.32768000000000000000e5 +1610 1 26 41 0.32768000000000000000e5 +1610 1 28 43 -0.13107200000000000000e6 +1610 1 32 47 -0.13107200000000000000e6 +1610 1 40 55 -0.32768000000000000000e5 +1610 1 41 56 -0.32768000000000000000e5 +1610 1 42 55 0.65536000000000000000e5 +1610 2 2 32 -0.16384000000000000000e5 +1610 2 4 34 0.32768000000000000000e5 +1610 2 16 30 -0.32768000000000000000e5 +1610 2 20 34 -0.65536000000000000000e5 +1610 2 28 34 -0.32768000000000000000e5 +1610 3 5 50 0.32768000000000000000e5 +1610 3 9 38 -0.32768000000000000000e5 +1610 3 22 35 -0.13107200000000000000e6 +1610 3 22 51 -0.32768000000000000000e5 +1610 3 23 52 0.65536000000000000000e5 +1610 3 27 40 0.32768000000000000000e5 +1610 3 27 56 -0.32768000000000000000e5 +1610 3 28 41 -0.13107200000000000000e6 +1610 3 38 51 0.32768000000000000000e5 +1610 4 2 30 -0.32768000000000000000e5 +1610 4 6 34 -0.65536000000000000000e5 +1610 4 7 35 -0.32768000000000000000e5 +1610 4 29 33 0.32768000000000000000e5 +1611 1 1 48 -0.32768000000000000000e5 +1611 1 2 49 -0.32768000000000000000e5 +1611 1 8 39 -0.65536000000000000000e5 +1611 1 9 40 -0.65536000000000000000e5 +1611 1 10 41 0.13107200000000000000e6 +1611 1 12 43 0.26214400000000000000e6 +1611 1 23 38 -0.32768000000000000000e5 +1611 1 24 55 0.65536000000000000000e5 +1611 1 26 41 0.65536000000000000000e5 +1611 1 28 43 -0.26214400000000000000e6 +1611 1 32 47 -0.26214400000000000000e6 +1611 1 42 56 0.65536000000000000000e5 +1611 2 2 32 -0.32768000000000000000e5 +1611 2 4 34 0.65536000000000000000e5 +1611 2 16 30 -0.65536000000000000000e5 +1611 2 20 34 -0.13107200000000000000e6 +1611 3 5 50 0.65536000000000000000e5 +1611 3 9 38 -0.65536000000000000000e5 +1611 3 22 35 -0.26214400000000000000e6 +1611 3 22 51 -0.65536000000000000000e5 +1611 3 23 52 0.13107200000000000000e6 +1611 3 27 40 0.65536000000000000000e5 +1611 3 28 41 -0.26214400000000000000e6 +1611 3 38 51 0.65536000000000000000e5 +1611 3 41 54 0.65536000000000000000e5 +1611 4 2 30 -0.65536000000000000000e5 +1611 4 6 34 -0.13107200000000000000e6 +1611 4 7 35 -0.65536000000000000000e5 +1612 1 33 40 -0.32768000000000000000e5 +1612 1 43 43 0.65536000000000000000e5 +1612 3 14 51 0.65536000000000000000e5 +1612 3 29 42 -0.32768000000000000000e5 +1612 3 30 43 -0.32768000000000000000e5 +1612 4 19 31 -0.32768000000000000000e5 +1613 1 34 49 -0.65536000000000000000e5 +1613 1 43 44 0.65536000000000000000e5 +1614 1 18 49 -0.65536000000000000000e5 +1614 1 43 45 0.65536000000000000000e5 +1614 3 14 51 0.65536000000000000000e5 +1615 1 11 18 -0.65536000000000000000e5 +1615 1 43 46 0.65536000000000000000e5 +1615 3 6 19 0.65536000000000000000e5 +1615 3 15 44 0.65536000000000000000e5 +1615 3 17 30 0.65536000000000000000e5 +1615 3 32 45 0.65536000000000000000e5 +1616 1 24 55 -0.65536000000000000000e5 +1616 1 43 47 0.65536000000000000000e5 +1617 1 1 48 -0.32768000000000000000e5 +1617 1 2 49 -0.32768000000000000000e5 +1617 1 8 39 -0.65536000000000000000e5 +1617 1 9 40 -0.65536000000000000000e5 +1617 1 10 41 0.13107200000000000000e6 +1617 1 12 43 0.26214400000000000000e6 +1617 1 23 38 -0.32768000000000000000e5 +1617 1 24 55 0.65536000000000000000e5 +1617 1 26 41 0.65536000000000000000e5 +1617 1 28 43 -0.26214400000000000000e6 +1617 1 32 47 -0.26214400000000000000e6 +1617 1 43 48 0.65536000000000000000e5 +1617 2 2 32 -0.32768000000000000000e5 +1617 2 4 34 0.65536000000000000000e5 +1617 2 16 30 -0.65536000000000000000e5 +1617 2 20 34 -0.13107200000000000000e6 +1617 3 5 50 0.65536000000000000000e5 +1617 3 9 38 -0.65536000000000000000e5 +1617 3 22 35 -0.26214400000000000000e6 +1617 3 22 51 -0.65536000000000000000e5 +1617 3 23 52 0.13107200000000000000e6 +1617 3 27 40 0.65536000000000000000e5 +1617 3 28 41 -0.26214400000000000000e6 +1617 4 2 30 -0.65536000000000000000e5 +1617 4 6 34 -0.13107200000000000000e6 +1617 4 7 35 -0.65536000000000000000e5 +1618 1 1 48 0.32768000000000000000e5 +1618 1 2 49 0.32768000000000000000e5 +1618 1 8 39 0.65536000000000000000e5 +1618 1 9 40 0.65536000000000000000e5 +1618 1 10 41 -0.13107200000000000000e6 +1618 1 12 43 -0.26214400000000000000e6 +1618 1 23 38 0.32768000000000000000e5 +1618 1 26 41 -0.65536000000000000000e5 +1618 1 28 43 0.26214400000000000000e6 +1618 1 32 47 0.26214400000000000000e6 +1618 1 33 48 -0.13107200000000000000e6 +1618 1 43 49 0.65536000000000000000e5 +1618 2 2 32 0.32768000000000000000e5 +1618 2 4 34 -0.65536000000000000000e5 +1618 2 16 30 0.65536000000000000000e5 +1618 2 20 34 0.13107200000000000000e6 +1618 2 28 34 0.65536000000000000000e5 +1618 3 5 50 -0.65536000000000000000e5 +1618 3 9 38 0.65536000000000000000e5 +1618 3 10 55 -0.13107200000000000000e6 +1618 3 22 35 0.26214400000000000000e6 +1618 3 22 51 0.65536000000000000000e5 +1618 3 23 52 -0.13107200000000000000e6 +1618 3 27 40 -0.65536000000000000000e5 +1618 3 28 41 0.26214400000000000000e6 +1618 3 35 48 0.26214400000000000000e6 +1618 3 40 45 -0.13107200000000000000e6 +1618 4 2 30 0.65536000000000000000e5 +1618 4 6 34 0.13107200000000000000e6 +1618 4 7 35 0.65536000000000000000e5 +1618 4 22 34 -0.13107200000000000000e6 +1619 1 33 48 -0.65536000000000000000e5 +1619 1 43 50 0.65536000000000000000e5 +1619 3 10 55 -0.65536000000000000000e5 +1619 3 35 48 0.13107200000000000000e6 +1619 3 40 45 -0.65536000000000000000e5 +1619 4 22 34 -0.65536000000000000000e5 +1620 1 33 40 -0.65536000000000000000e5 +1620 1 43 51 0.65536000000000000000e5 +1620 3 10 55 0.65536000000000000000e5 +1620 3 14 51 0.13107200000000000000e6 +1620 3 29 42 -0.65536000000000000000e5 +1620 3 30 43 -0.65536000000000000000e5 +1620 4 19 31 -0.65536000000000000000e5 +1621 1 18 49 -0.65536000000000000000e5 +1621 1 43 52 0.65536000000000000000e5 +1621 3 14 51 0.65536000000000000000e5 +1621 3 35 48 0.65536000000000000000e5 +1622 1 1 48 -0.32768000000000000000e5 +1622 1 2 49 -0.32768000000000000000e5 +1622 1 8 39 -0.65536000000000000000e5 +1622 1 9 40 -0.65536000000000000000e5 +1622 1 10 41 0.13107200000000000000e6 +1622 1 12 43 0.26214400000000000000e6 +1622 1 23 38 -0.32768000000000000000e5 +1622 1 24 55 0.65536000000000000000e5 +1622 1 26 41 0.65536000000000000000e5 +1622 1 28 43 -0.26214400000000000000e6 +1622 1 32 47 -0.26214400000000000000e6 +1622 1 43 53 0.65536000000000000000e5 +1622 2 2 32 -0.32768000000000000000e5 +1622 2 4 34 0.65536000000000000000e5 +1622 2 16 30 -0.65536000000000000000e5 +1622 2 20 34 -0.13107200000000000000e6 +1622 3 5 50 0.65536000000000000000e5 +1622 3 9 38 -0.65536000000000000000e5 +1622 3 22 35 -0.26214400000000000000e6 +1622 3 22 51 -0.65536000000000000000e5 +1622 3 23 52 0.13107200000000000000e6 +1622 3 27 40 0.65536000000000000000e5 +1622 3 28 41 -0.26214400000000000000e6 +1622 3 38 51 0.65536000000000000000e5 +1622 4 2 30 -0.65536000000000000000e5 +1622 4 6 34 -0.13107200000000000000e6 +1622 4 7 35 -0.65536000000000000000e5 +1623 1 40 55 -0.65536000000000000000e5 +1623 1 43 54 0.65536000000000000000e5 +1624 1 33 40 -0.65536000000000000000e5 +1624 1 43 55 0.65536000000000000000e5 +1624 3 10 55 0.65536000000000000000e5 +1624 3 14 51 0.13107200000000000000e6 +1624 3 29 42 -0.65536000000000000000e5 +1624 3 30 43 -0.65536000000000000000e5 +1624 3 39 52 0.65536000000000000000e5 +1624 4 19 31 -0.65536000000000000000e5 +1625 1 40 55 -0.65536000000000000000e5 +1625 1 43 56 0.65536000000000000000e5 +1625 3 49 50 0.65536000000000000000e5 +1626 1 4 35 -0.16384000000000000000e5 +1626 1 12 43 -0.16384000000000000000e5 +1626 1 34 49 -0.16384000000000000000e5 +1626 1 44 44 0.65536000000000000000e5 +1626 2 9 23 -0.16384000000000000000e5 +1626 3 5 34 -0.16384000000000000000e5 +1626 3 13 42 0.16384000000000000000e5 +1626 3 14 27 -0.16384000000000000000e5 +1626 3 16 29 0.32768000000000000000e5 +1626 3 18 47 -0.16384000000000000000e5 +1626 3 22 35 0.16384000000000000000e5 +1626 3 31 44 0.32768000000000000000e5 +1626 4 14 26 0.16384000000000000000e5 +1627 1 14 45 -0.13107200000000000000e6 +1627 1 17 48 0.32768000000000000000e5 +1627 1 18 49 0.32768000000000000000e5 +1627 1 34 49 0.32768000000000000000e5 +1627 1 44 45 0.65536000000000000000e5 +1627 2 14 28 0.32768000000000000000e5 +1627 3 14 43 0.32768000000000000000e5 +1627 3 15 44 -0.65536000000000000000e5 +1627 3 16 45 0.13107200000000000000e6 +1627 3 18 47 0.32768000000000000000e5 +1627 3 19 48 0.65536000000000000000e5 +1627 3 22 35 -0.32768000000000000000e5 +1627 4 14 26 -0.32768000000000000000e5 +1627 4 15 27 -0.65536000000000000000e5 +1628 1 13 20 -0.13107200000000000000e6 +1628 1 17 32 0.65536000000000000000e5 +1628 1 20 27 0.65536000000000000000e5 +1628 1 44 46 0.65536000000000000000e5 +1628 2 11 25 0.65536000000000000000e5 +1628 3 8 21 0.13107200000000000000e6 +1628 3 16 45 0.65536000000000000000e5 +1628 3 18 31 0.65536000000000000000e5 +1628 3 36 41 0.65536000000000000000e5 +1629 1 37 52 -0.65536000000000000000e5 +1629 1 44 47 0.65536000000000000000e5 +1630 1 6 53 0.16384000000000000000e5 +1630 1 25 40 -0.16384000000000000000e5 +1630 1 28 43 -0.65536000000000000000e5 +1630 1 44 48 0.65536000000000000000e5 +1630 2 4 34 0.32768000000000000000e5 +1630 2 21 35 -0.32768000000000000000e5 +1630 3 5 50 0.32768000000000000000e5 +1630 3 23 52 0.65536000000000000000e5 +1630 3 24 37 0.16384000000000000000e5 +1630 3 27 40 0.65536000000000000000e5 +1630 4 4 32 -0.16384000000000000000e5 +1630 4 7 35 -0.32768000000000000000e5 +1630 4 16 28 0.16384000000000000000e5 +1631 1 33 48 -0.65536000000000000000e5 +1631 1 44 49 0.65536000000000000000e5 +1631 3 10 55 -0.65536000000000000000e5 +1631 3 35 48 0.13107200000000000000e6 +1631 3 40 45 -0.65536000000000000000e5 +1631 4 22 34 -0.65536000000000000000e5 +1632 1 6 53 0.81920000000000000000e4 +1632 1 17 48 -0.65536000000000000000e5 +1632 1 25 40 -0.81920000000000000000e4 +1632 1 44 50 0.65536000000000000000e5 +1632 2 4 34 0.16384000000000000000e5 +1632 2 21 35 -0.16384000000000000000e5 +1632 3 5 50 0.16384000000000000000e5 +1632 3 24 37 0.81920000000000000000e4 +1632 3 27 40 0.32768000000000000000e5 +1632 3 28 41 0.32768000000000000000e5 +1632 3 29 42 0.32768000000000000000e5 +1632 3 34 47 0.65536000000000000000e5 +1632 4 4 32 -0.81920000000000000000e4 +1632 4 7 35 -0.16384000000000000000e5 +1632 4 16 28 0.81920000000000000000e4 +1632 4 23 27 0.32768000000000000000e5 +1633 1 14 45 -0.13107200000000000000e6 +1633 1 17 48 0.32768000000000000000e5 +1633 1 18 49 0.32768000000000000000e5 +1633 1 34 49 0.32768000000000000000e5 +1633 1 44 52 0.65536000000000000000e5 +1633 2 14 28 0.32768000000000000000e5 +1633 3 14 43 0.32768000000000000000e5 +1633 3 15 44 -0.65536000000000000000e5 +1633 3 16 45 0.13107200000000000000e6 +1633 3 18 47 0.32768000000000000000e5 +1633 3 19 48 0.65536000000000000000e5 +1633 3 22 35 -0.32768000000000000000e5 +1633 3 41 46 0.65536000000000000000e5 +1633 4 14 26 -0.32768000000000000000e5 +1633 4 15 27 -0.65536000000000000000e5 +1634 1 1 48 0.16384000000000000000e5 +1634 1 2 49 0.16384000000000000000e5 +1634 1 6 53 0.16384000000000000000e5 +1634 1 8 39 0.32768000000000000000e5 +1634 1 9 40 0.32768000000000000000e5 +1634 1 10 41 -0.65536000000000000000e5 +1634 1 12 43 -0.13107200000000000000e6 +1634 1 23 38 0.16384000000000000000e5 +1634 1 24 55 -0.32768000000000000000e5 +1634 1 25 40 -0.16384000000000000000e5 +1634 1 26 41 -0.32768000000000000000e5 +1634 1 28 43 0.65536000000000000000e5 +1634 1 32 47 0.13107200000000000000e6 +1634 1 33 48 -0.65536000000000000000e5 +1634 1 40 55 0.32768000000000000000e5 +1634 1 41 56 0.32768000000000000000e5 +1634 1 44 51 0.13107200000000000000e6 +1634 1 44 53 0.65536000000000000000e5 +1634 1 46 53 -0.13107200000000000000e6 +1634 2 2 32 0.16384000000000000000e5 +1634 2 16 30 0.32768000000000000000e5 +1634 2 20 34 0.65536000000000000000e5 +1634 2 21 35 -0.32768000000000000000e5 +1634 2 28 34 0.32768000000000000000e5 +1634 3 9 38 0.32768000000000000000e5 +1634 3 10 55 -0.65536000000000000000e5 +1634 3 22 35 0.13107200000000000000e6 +1634 3 22 51 0.32768000000000000000e5 +1634 3 24 37 0.16384000000000000000e5 +1634 3 27 40 0.32768000000000000000e5 +1634 3 27 56 0.32768000000000000000e5 +1634 3 28 41 0.13107200000000000000e6 +1634 3 35 48 0.13107200000000000000e6 +1634 3 38 51 -0.32768000000000000000e5 +1634 3 39 52 -0.65536000000000000000e5 +1634 3 40 45 -0.65536000000000000000e5 +1634 4 2 30 0.32768000000000000000e5 +1634 4 4 32 -0.16384000000000000000e5 +1634 4 6 34 0.65536000000000000000e5 +1634 4 16 28 0.16384000000000000000e5 +1634 4 22 34 -0.65536000000000000000e5 +1634 4 23 35 -0.65536000000000000000e5 +1634 4 29 33 -0.32768000000000000000e5 +1635 1 1 48 -0.16384000000000000000e5 +1635 1 2 49 -0.16384000000000000000e5 +1635 1 8 39 -0.32768000000000000000e5 +1635 1 9 40 -0.32768000000000000000e5 +1635 1 10 41 0.65536000000000000000e5 +1635 1 12 43 0.13107200000000000000e6 +1635 1 23 38 -0.16384000000000000000e5 +1635 1 24 55 0.32768000000000000000e5 +1635 1 26 41 0.32768000000000000000e5 +1635 1 28 43 -0.13107200000000000000e6 +1635 1 32 47 -0.13107200000000000000e6 +1635 1 40 55 -0.32768000000000000000e5 +1635 1 41 56 -0.32768000000000000000e5 +1635 1 44 54 0.65536000000000000000e5 +1635 2 2 32 -0.16384000000000000000e5 +1635 2 4 34 0.32768000000000000000e5 +1635 2 16 30 -0.32768000000000000000e5 +1635 2 20 34 -0.65536000000000000000e5 +1635 2 28 34 -0.32768000000000000000e5 +1635 3 5 50 0.32768000000000000000e5 +1635 3 9 38 -0.32768000000000000000e5 +1635 3 22 35 -0.13107200000000000000e6 +1635 3 22 51 -0.32768000000000000000e5 +1635 3 23 52 0.65536000000000000000e5 +1635 3 27 40 0.32768000000000000000e5 +1635 3 27 56 -0.32768000000000000000e5 +1635 3 28 41 -0.13107200000000000000e6 +1635 3 38 51 0.32768000000000000000e5 +1635 4 2 30 -0.32768000000000000000e5 +1635 4 6 34 -0.65536000000000000000e5 +1635 4 7 35 -0.32768000000000000000e5 +1635 4 29 33 0.32768000000000000000e5 +1636 1 44 55 0.65536000000000000000e5 +1636 1 46 53 -0.65536000000000000000e5 +1637 1 1 48 -0.16384000000000000000e5 +1637 1 2 49 -0.16384000000000000000e5 +1637 1 8 39 -0.32768000000000000000e5 +1637 1 9 40 -0.32768000000000000000e5 +1637 1 10 41 0.65536000000000000000e5 +1637 1 12 43 0.13107200000000000000e6 +1637 1 23 38 -0.16384000000000000000e5 +1637 1 24 55 0.32768000000000000000e5 +1637 1 26 41 0.32768000000000000000e5 +1637 1 28 43 -0.13107200000000000000e6 +1637 1 32 47 -0.13107200000000000000e6 +1637 1 40 55 -0.32768000000000000000e5 +1637 1 41 56 -0.32768000000000000000e5 +1637 1 44 56 0.65536000000000000000e5 +1637 2 2 32 -0.16384000000000000000e5 +1637 2 4 34 0.32768000000000000000e5 +1637 2 16 30 -0.32768000000000000000e5 +1637 2 20 34 -0.65536000000000000000e5 +1637 2 28 34 -0.32768000000000000000e5 +1637 3 5 50 0.32768000000000000000e5 +1637 3 9 38 -0.32768000000000000000e5 +1637 3 22 35 -0.13107200000000000000e6 +1637 3 22 51 -0.32768000000000000000e5 +1637 3 23 52 0.65536000000000000000e5 +1637 3 27 40 0.32768000000000000000e5 +1637 3 27 56 -0.32768000000000000000e5 +1637 3 28 41 -0.13107200000000000000e6 +1637 3 38 51 0.32768000000000000000e5 +1637 3 47 52 0.65536000000000000000e5 +1637 4 2 30 -0.32768000000000000000e5 +1637 4 6 34 -0.65536000000000000000e5 +1637 4 7 35 -0.32768000000000000000e5 +1637 4 29 33 0.32768000000000000000e5 +1638 1 11 18 -0.32768000000000000000e5 +1638 1 45 45 0.65536000000000000000e5 +1638 3 6 19 0.32768000000000000000e5 +1638 3 15 44 0.32768000000000000000e5 +1638 3 17 30 0.32768000000000000000e5 +1638 3 32 45 0.32768000000000000000e5 +1639 1 36 51 -0.65536000000000000000e5 +1639 1 45 46 0.65536000000000000000e5 +1640 1 6 53 0.16384000000000000000e5 +1640 1 25 40 -0.16384000000000000000e5 +1640 1 28 43 -0.65536000000000000000e5 +1640 1 45 47 0.65536000000000000000e5 +1640 2 4 34 0.32768000000000000000e5 +1640 2 21 35 -0.32768000000000000000e5 +1640 3 5 50 0.32768000000000000000e5 +1640 3 23 52 0.65536000000000000000e5 +1640 3 24 37 0.16384000000000000000e5 +1640 3 27 40 0.65536000000000000000e5 +1640 4 4 32 -0.16384000000000000000e5 +1640 4 7 35 -0.32768000000000000000e5 +1640 4 16 28 0.16384000000000000000e5 +1641 1 33 48 -0.65536000000000000000e5 +1641 1 45 48 0.65536000000000000000e5 +1641 3 10 55 -0.65536000000000000000e5 +1641 3 35 48 0.13107200000000000000e6 +1641 3 40 45 -0.65536000000000000000e5 +1641 4 22 34 -0.65536000000000000000e5 +1642 1 33 40 -0.65536000000000000000e5 +1642 1 45 49 0.65536000000000000000e5 +1642 3 10 55 0.65536000000000000000e5 +1642 3 14 51 0.13107200000000000000e6 +1642 3 29 42 -0.65536000000000000000e5 +1642 3 30 43 -0.65536000000000000000e5 +1642 4 19 31 -0.65536000000000000000e5 +1643 1 44 51 -0.65536000000000000000e5 +1643 1 45 50 0.65536000000000000000e5 +1644 1 18 49 -0.65536000000000000000e5 +1644 1 45 51 0.65536000000000000000e5 +1644 3 14 51 0.65536000000000000000e5 +1644 3 35 48 0.65536000000000000000e5 +1645 1 1 48 -0.16384000000000000000e5 +1645 1 2 49 -0.16384000000000000000e5 +1645 1 8 39 -0.32768000000000000000e5 +1645 1 9 40 -0.32768000000000000000e5 +1645 1 10 41 0.65536000000000000000e5 +1645 1 12 43 0.13107200000000000000e6 +1645 1 23 38 -0.16384000000000000000e5 +1645 1 24 55 0.32768000000000000000e5 +1645 1 26 41 0.32768000000000000000e5 +1645 1 28 43 -0.13107200000000000000e6 +1645 1 32 47 -0.13107200000000000000e6 +1645 1 40 55 -0.32768000000000000000e5 +1645 1 41 56 -0.32768000000000000000e5 +1645 1 45 53 0.65536000000000000000e5 +1645 2 2 32 -0.16384000000000000000e5 +1645 2 4 34 0.32768000000000000000e5 +1645 2 16 30 -0.32768000000000000000e5 +1645 2 20 34 -0.65536000000000000000e5 +1645 2 28 34 -0.32768000000000000000e5 +1645 3 5 50 0.32768000000000000000e5 +1645 3 9 38 -0.32768000000000000000e5 +1645 3 22 35 -0.13107200000000000000e6 +1645 3 22 51 -0.32768000000000000000e5 +1645 3 23 52 0.65536000000000000000e5 +1645 3 27 40 0.32768000000000000000e5 +1645 3 27 56 -0.32768000000000000000e5 +1645 3 28 41 -0.13107200000000000000e6 +1645 3 38 51 0.32768000000000000000e5 +1645 4 2 30 -0.32768000000000000000e5 +1645 4 6 34 -0.65536000000000000000e5 +1645 4 7 35 -0.32768000000000000000e5 +1645 4 29 33 0.32768000000000000000e5 +1646 1 33 40 -0.65536000000000000000e5 +1646 1 45 54 0.65536000000000000000e5 +1646 3 10 55 0.65536000000000000000e5 +1646 3 14 51 0.13107200000000000000e6 +1646 3 29 42 -0.65536000000000000000e5 +1646 3 30 43 -0.65536000000000000000e5 +1646 3 39 52 0.65536000000000000000e5 +1646 4 19 31 -0.65536000000000000000e5 +1647 1 18 49 -0.65536000000000000000e5 +1647 1 45 55 0.65536000000000000000e5 +1647 3 14 51 0.65536000000000000000e5 +1647 3 35 48 0.65536000000000000000e5 +1647 3 45 50 0.65536000000000000000e5 +1648 1 33 40 -0.65536000000000000000e5 +1648 1 45 56 0.65536000000000000000e5 +1648 3 10 55 0.65536000000000000000e5 +1648 3 14 51 0.13107200000000000000e6 +1648 3 29 42 -0.65536000000000000000e5 +1648 3 30 43 -0.65536000000000000000e5 +1648 3 39 52 0.65536000000000000000e5 +1648 3 42 55 0.65536000000000000000e5 +1648 4 19 31 -0.65536000000000000000e5 +1649 1 33 36 -0.32768000000000000000e5 +1649 1 46 46 0.65536000000000000000e5 +1649 3 17 46 0.32768000000000000000e5 +1649 3 21 50 0.32768000000000000000e5 +1650 1 6 53 0.81920000000000000000e4 +1650 1 17 48 -0.65536000000000000000e5 +1650 1 25 40 -0.81920000000000000000e4 +1650 1 46 47 0.65536000000000000000e5 +1650 2 4 34 0.16384000000000000000e5 +1650 2 21 35 -0.16384000000000000000e5 +1650 3 5 50 0.16384000000000000000e5 +1650 3 24 37 0.81920000000000000000e4 +1650 3 27 40 0.32768000000000000000e5 +1650 3 28 41 0.32768000000000000000e5 +1650 3 29 42 0.32768000000000000000e5 +1650 3 34 47 0.65536000000000000000e5 +1650 4 4 32 -0.81920000000000000000e4 +1650 4 7 35 -0.16384000000000000000e5 +1650 4 16 28 0.81920000000000000000e4 +1650 4 23 27 0.32768000000000000000e5 +1651 1 44 51 -0.65536000000000000000e5 +1651 1 46 48 0.65536000000000000000e5 +1652 1 18 49 -0.65536000000000000000e5 +1652 1 46 49 0.65536000000000000000e5 +1652 3 14 51 0.65536000000000000000e5 +1652 3 35 48 0.65536000000000000000e5 +1653 1 14 45 -0.13107200000000000000e6 +1653 1 17 48 0.32768000000000000000e5 +1653 1 18 49 0.32768000000000000000e5 +1653 1 34 49 0.32768000000000000000e5 +1653 1 46 50 0.65536000000000000000e5 +1653 2 14 28 0.32768000000000000000e5 +1653 3 14 43 0.32768000000000000000e5 +1653 3 15 44 -0.65536000000000000000e5 +1653 3 16 45 0.13107200000000000000e6 +1653 3 18 47 0.32768000000000000000e5 +1653 3 19 48 0.65536000000000000000e5 +1653 3 22 35 -0.32768000000000000000e5 +1653 3 41 46 0.65536000000000000000e5 +1653 4 14 26 -0.32768000000000000000e5 +1653 4 15 27 -0.65536000000000000000e5 +1654 1 45 52 -0.65536000000000000000e5 +1654 1 46 51 0.65536000000000000000e5 +1655 1 11 18 0.32768000000000000000e5 +1655 1 36 51 -0.65536000000000000000e5 +1655 1 45 52 -0.32768000000000000000e5 +1655 1 46 52 0.65536000000000000000e5 +1655 3 6 19 -0.32768000000000000000e5 +1655 3 15 44 -0.32768000000000000000e5 +1655 3 17 30 -0.32768000000000000000e5 +1655 3 32 45 -0.32768000000000000000e5 +1655 3 36 49 0.32768000000000000000e5 +1655 3 41 46 0.32768000000000000000e5 +1655 4 15 35 0.32768000000000000000e5 +1656 1 18 49 -0.65536000000000000000e5 +1656 1 46 54 0.65536000000000000000e5 +1656 3 14 51 0.65536000000000000000e5 +1656 3 35 48 0.65536000000000000000e5 +1656 3 45 50 0.65536000000000000000e5 +1657 1 45 52 -0.65536000000000000000e5 +1657 1 46 55 0.65536000000000000000e5 +1657 3 19 56 0.65536000000000000000e5 +1658 1 46 56 0.65536000000000000000e5 +1658 1 52 55 -0.65536000000000000000e5 +1659 1 1 48 0.32768000000000000000e5 +1659 1 2 49 0.32768000000000000000e5 +1659 1 6 53 0.32768000000000000000e5 +1659 1 8 39 0.65536000000000000000e5 +1659 1 9 40 0.65536000000000000000e5 +1659 1 10 41 -0.13107200000000000000e6 +1659 1 12 43 -0.26214400000000000000e6 +1659 1 23 38 0.32768000000000000000e5 +1659 1 25 40 -0.32768000000000000000e5 +1659 1 26 41 -0.65536000000000000000e5 +1659 1 28 43 0.13107200000000000000e6 +1659 1 32 47 0.26214400000000000000e6 +1659 1 38 53 0.32768000000000000000e5 +1659 1 40 47 0.32768000000000000000e5 +1659 1 47 47 0.65536000000000000000e5 +1659 2 2 32 0.32768000000000000000e5 +1659 2 16 30 0.65536000000000000000e5 +1659 2 20 34 0.13107200000000000000e6 +1659 2 32 32 0.65536000000000000000e5 +1659 3 9 38 0.65536000000000000000e5 +1659 3 22 35 0.26214400000000000000e6 +1659 3 22 51 0.65536000000000000000e5 +1659 3 24 37 0.32768000000000000000e5 +1659 3 24 53 -0.32768000000000000000e5 +1659 3 27 40 0.65536000000000000000e5 +1659 3 28 41 0.26214400000000000000e6 +1659 3 37 50 0.65536000000000000000e5 +1659 4 2 30 0.65536000000000000000e5 +1659 4 4 32 -0.32768000000000000000e5 +1659 4 6 34 0.13107200000000000000e6 +1659 4 16 28 0.32768000000000000000e5 +1660 1 38 53 -0.65536000000000000000e5 +1660 1 47 48 0.65536000000000000000e5 +1661 1 40 47 -0.65536000000000000000e5 +1661 1 47 49 0.65536000000000000000e5 +1661 3 24 53 0.65536000000000000000e5 +1662 1 1 48 0.32768000000000000000e5 +1662 1 2 49 0.32768000000000000000e5 +1662 1 6 53 0.32768000000000000000e5 +1662 1 8 39 0.65536000000000000000e5 +1662 1 9 40 0.65536000000000000000e5 +1662 1 10 41 -0.13107200000000000000e6 +1662 1 12 43 -0.26214400000000000000e6 +1662 1 23 38 0.32768000000000000000e5 +1662 1 25 40 -0.32768000000000000000e5 +1662 1 26 41 -0.65536000000000000000e5 +1662 1 28 43 0.13107200000000000000e6 +1662 1 32 47 0.26214400000000000000e6 +1662 1 47 50 0.65536000000000000000e5 +1662 2 2 32 0.32768000000000000000e5 +1662 2 16 30 0.65536000000000000000e5 +1662 2 20 34 0.13107200000000000000e6 +1662 3 9 38 0.65536000000000000000e5 +1662 3 22 35 0.26214400000000000000e6 +1662 3 22 51 0.65536000000000000000e5 +1662 3 24 37 0.32768000000000000000e5 +1662 3 27 40 0.65536000000000000000e5 +1662 3 28 41 0.26214400000000000000e6 +1662 3 37 50 0.65536000000000000000e5 +1662 4 2 30 0.65536000000000000000e5 +1662 4 4 32 -0.32768000000000000000e5 +1662 4 6 34 0.13107200000000000000e6 +1662 4 16 28 0.32768000000000000000e5 +1663 1 41 56 -0.65536000000000000000e5 +1663 1 47 51 0.65536000000000000000e5 +1663 3 27 56 -0.65536000000000000000e5 +1664 1 1 48 0.16384000000000000000e5 +1664 1 2 49 0.16384000000000000000e5 +1664 1 6 53 0.16384000000000000000e5 +1664 1 8 39 0.32768000000000000000e5 +1664 1 9 40 0.32768000000000000000e5 +1664 1 10 41 -0.65536000000000000000e5 +1664 1 12 43 -0.13107200000000000000e6 +1664 1 23 38 0.16384000000000000000e5 +1664 1 24 55 -0.32768000000000000000e5 +1664 1 25 40 -0.16384000000000000000e5 +1664 1 26 41 -0.32768000000000000000e5 +1664 1 28 43 0.65536000000000000000e5 +1664 1 32 47 0.13107200000000000000e6 +1664 1 33 48 -0.65536000000000000000e5 +1664 1 40 55 0.32768000000000000000e5 +1664 1 41 56 0.32768000000000000000e5 +1664 1 44 51 0.13107200000000000000e6 +1664 1 46 53 -0.13107200000000000000e6 +1664 1 47 52 0.65536000000000000000e5 +1664 2 2 32 0.16384000000000000000e5 +1664 2 16 30 0.32768000000000000000e5 +1664 2 20 34 0.65536000000000000000e5 +1664 2 21 35 -0.32768000000000000000e5 +1664 2 28 34 0.32768000000000000000e5 +1664 3 9 38 0.32768000000000000000e5 +1664 3 10 55 -0.65536000000000000000e5 +1664 3 22 35 0.13107200000000000000e6 +1664 3 22 51 0.32768000000000000000e5 +1664 3 24 37 0.16384000000000000000e5 +1664 3 27 40 0.32768000000000000000e5 +1664 3 27 56 0.32768000000000000000e5 +1664 3 28 41 0.13107200000000000000e6 +1664 3 35 48 0.13107200000000000000e6 +1664 3 38 51 -0.32768000000000000000e5 +1664 3 39 52 -0.65536000000000000000e5 +1664 3 40 45 -0.65536000000000000000e5 +1664 4 2 30 0.32768000000000000000e5 +1664 4 4 32 -0.16384000000000000000e5 +1664 4 6 34 0.65536000000000000000e5 +1664 4 16 28 0.16384000000000000000e5 +1664 4 22 34 -0.65536000000000000000e5 +1664 4 23 35 -0.65536000000000000000e5 +1664 4 29 33 -0.32768000000000000000e5 +1665 1 1 48 -0.65536000000000000000e5 +1665 1 2 49 -0.13107200000000000000e6 +1665 1 6 53 0.65536000000000000000e5 +1665 1 8 39 -0.13107200000000000000e6 +1665 1 9 40 -0.13107200000000000000e6 +1665 1 10 41 0.26214400000000000000e6 +1665 1 12 43 0.52428800000000000000e6 +1665 1 23 38 -0.65536000000000000000e5 +1665 1 24 39 -0.65536000000000000000e5 +1665 1 24 55 -0.13107200000000000000e6 +1665 1 25 56 -0.65536000000000000000e5 +1665 1 26 41 0.26214400000000000000e6 +1665 1 28 43 -0.26214400000000000000e6 +1665 1 32 47 -0.52428800000000000000e6 +1665 1 38 53 -0.65536000000000000000e5 +1665 1 40 47 -0.65536000000000000000e5 +1665 1 47 53 0.65536000000000000000e5 +1665 2 2 32 -0.65536000000000000000e5 +1665 2 3 33 -0.65536000000000000000e5 +1665 2 5 35 0.65536000000000000000e5 +1665 2 16 30 -0.13107200000000000000e6 +1665 2 20 34 -0.26214400000000000000e6 +1665 2 33 35 -0.65536000000000000000e5 +1665 3 9 38 -0.13107200000000000000e6 +1665 3 22 35 -0.52428800000000000000e6 +1665 3 22 51 0.13107200000000000000e6 +1665 3 23 52 -0.26214400000000000000e6 +1665 3 24 53 0.65536000000000000000e5 +1665 3 25 38 -0.65536000000000000000e5 +1665 3 25 54 0.65536000000000000000e5 +1665 3 27 40 -0.13107200000000000000e6 +1665 3 27 56 0.13107200000000000000e6 +1665 3 28 41 -0.52428800000000000000e6 +1665 3 38 51 -0.13107200000000000000e6 +1665 3 39 40 0.65536000000000000000e5 +1665 3 40 53 0.65536000000000000000e5 +1665 3 41 54 -0.13107200000000000000e6 +1665 4 2 30 -0.13107200000000000000e6 +1665 4 6 34 -0.26214400000000000000e6 +1665 4 7 35 0.13107200000000000000e6 +1665 4 32 32 -0.13107200000000000000e6 +1666 1 41 56 -0.65536000000000000000e5 +1666 1 47 55 0.65536000000000000000e5 +1667 1 1 48 -0.13107200000000000000e6 +1667 1 2 49 -0.19660800000000000000e6 +1667 1 6 53 0.65536000000000000000e5 +1667 1 8 39 -0.26214400000000000000e6 +1667 1 9 40 -0.26214400000000000000e6 +1667 1 10 41 0.52428800000000000000e6 +1667 1 12 43 0.10485760000000000000e7 +1667 1 23 38 -0.13107200000000000000e6 +1667 1 24 39 -0.65536000000000000000e5 +1667 1 26 41 0.39321600000000000000e6 +1667 1 28 43 -0.78643200000000000000e6 +1667 1 32 47 -0.10485760000000000000e7 +1667 1 47 54 -0.65536000000000000000e5 +1667 1 47 56 0.65536000000000000000e5 +1667 1 49 56 0.65536000000000000000e5 +1667 2 2 32 -0.13107200000000000000e6 +1667 2 3 33 -0.65536000000000000000e5 +1667 2 4 34 0.13107200000000000000e6 +1667 2 5 35 0.65536000000000000000e5 +1667 2 16 30 -0.26214400000000000000e6 +1667 2 20 34 -0.52428800000000000000e6 +1667 2 33 35 -0.65536000000000000000e5 +1667 2 35 35 0.13107200000000000000e6 +1667 3 5 50 0.13107200000000000000e6 +1667 3 9 38 -0.26214400000000000000e6 +1667 3 22 35 -0.10485760000000000000e7 +1667 3 25 38 -0.65536000000000000000e5 +1667 3 25 54 0.65536000000000000000e5 +1667 3 28 41 -0.10485760000000000000e7 +1667 3 39 40 0.65536000000000000000e5 +1667 3 40 53 0.65536000000000000000e5 +1667 3 41 56 0.13107200000000000000e6 +1667 3 48 53 -0.65536000000000000000e5 +1667 4 2 30 -0.26214400000000000000e6 +1667 4 6 34 -0.52428800000000000000e6 +1668 1 40 47 -0.32768000000000000000e5 +1668 1 48 48 0.65536000000000000000e5 +1668 3 24 53 0.32768000000000000000e5 +1669 1 25 56 -0.65536000000000000000e5 +1669 1 48 49 0.65536000000000000000e5 +1670 1 41 56 -0.65536000000000000000e5 +1670 1 48 50 0.65536000000000000000e5 +1670 3 27 56 -0.65536000000000000000e5 +1671 1 1 48 -0.32768000000000000000e5 +1671 1 2 49 -0.32768000000000000000e5 +1671 1 8 39 -0.65536000000000000000e5 +1671 1 9 40 -0.65536000000000000000e5 +1671 1 10 41 0.13107200000000000000e6 +1671 1 12 43 0.26214400000000000000e6 +1671 1 23 38 -0.32768000000000000000e5 +1671 1 24 55 0.65536000000000000000e5 +1671 1 26 41 0.65536000000000000000e5 +1671 1 28 43 -0.26214400000000000000e6 +1671 1 32 47 -0.26214400000000000000e6 +1671 1 48 51 0.65536000000000000000e5 +1671 2 2 32 -0.32768000000000000000e5 +1671 2 4 34 0.65536000000000000000e5 +1671 2 16 30 -0.65536000000000000000e5 +1671 2 20 34 -0.13107200000000000000e6 +1671 3 5 50 0.65536000000000000000e5 +1671 3 9 38 -0.65536000000000000000e5 +1671 3 22 35 -0.26214400000000000000e6 +1671 3 22 51 -0.65536000000000000000e5 +1671 3 23 52 0.13107200000000000000e6 +1671 3 27 40 0.65536000000000000000e5 +1671 3 28 41 -0.26214400000000000000e6 +1671 3 38 51 0.65536000000000000000e5 +1671 4 2 30 -0.65536000000000000000e5 +1671 4 6 34 -0.13107200000000000000e6 +1671 4 7 35 -0.65536000000000000000e5 +1672 1 1 48 -0.16384000000000000000e5 +1672 1 2 49 -0.16384000000000000000e5 +1672 1 8 39 -0.32768000000000000000e5 +1672 1 9 40 -0.32768000000000000000e5 +1672 1 10 41 0.65536000000000000000e5 +1672 1 12 43 0.13107200000000000000e6 +1672 1 23 38 -0.16384000000000000000e5 +1672 1 24 55 0.32768000000000000000e5 +1672 1 26 41 0.32768000000000000000e5 +1672 1 28 43 -0.13107200000000000000e6 +1672 1 32 47 -0.13107200000000000000e6 +1672 1 40 55 -0.32768000000000000000e5 +1672 1 41 56 -0.32768000000000000000e5 +1672 1 48 52 0.65536000000000000000e5 +1672 2 2 32 -0.16384000000000000000e5 +1672 2 4 34 0.32768000000000000000e5 +1672 2 16 30 -0.32768000000000000000e5 +1672 2 20 34 -0.65536000000000000000e5 +1672 2 28 34 -0.32768000000000000000e5 +1672 3 5 50 0.32768000000000000000e5 +1672 3 9 38 -0.32768000000000000000e5 +1672 3 22 35 -0.13107200000000000000e6 +1672 3 22 51 -0.32768000000000000000e5 +1672 3 23 52 0.65536000000000000000e5 +1672 3 27 40 0.32768000000000000000e5 +1672 3 27 56 -0.32768000000000000000e5 +1672 3 28 41 -0.13107200000000000000e6 +1672 3 38 51 0.32768000000000000000e5 +1672 4 2 30 -0.32768000000000000000e5 +1672 4 6 34 -0.65536000000000000000e5 +1672 4 7 35 -0.32768000000000000000e5 +1672 4 29 33 0.32768000000000000000e5 +1673 1 47 54 -0.65536000000000000000e5 +1673 1 48 53 0.65536000000000000000e5 +1674 1 1 48 0.65536000000000000000e5 +1674 1 2 49 0.13107200000000000000e6 +1674 1 6 53 -0.65536000000000000000e5 +1674 1 8 39 0.13107200000000000000e6 +1674 1 9 40 0.13107200000000000000e6 +1674 1 10 41 -0.26214400000000000000e6 +1674 1 12 43 -0.52428800000000000000e6 +1674 1 23 38 0.65536000000000000000e5 +1674 1 24 39 0.65536000000000000000e5 +1674 1 24 55 0.13107200000000000000e6 +1674 1 26 41 -0.26214400000000000000e6 +1674 1 28 43 0.26214400000000000000e6 +1674 1 32 47 0.52428800000000000000e6 +1674 1 47 54 0.65536000000000000000e5 +1674 1 48 54 0.65536000000000000000e5 +1674 2 2 32 0.65536000000000000000e5 +1674 2 3 33 0.65536000000000000000e5 +1674 2 5 35 -0.65536000000000000000e5 +1674 2 16 30 0.13107200000000000000e6 +1674 2 20 34 0.26214400000000000000e6 +1674 2 33 35 0.65536000000000000000e5 +1674 3 9 38 0.13107200000000000000e6 +1674 3 22 35 0.52428800000000000000e6 +1674 3 22 51 -0.13107200000000000000e6 +1674 3 23 52 0.26214400000000000000e6 +1674 3 25 38 0.65536000000000000000e5 +1674 3 25 54 -0.65536000000000000000e5 +1674 3 27 40 0.13107200000000000000e6 +1674 3 28 41 0.52428800000000000000e6 +1674 3 38 51 0.13107200000000000000e6 +1674 3 39 40 -0.65536000000000000000e5 +1674 3 40 53 -0.65536000000000000000e5 +1674 3 41 54 0.13107200000000000000e6 +1674 4 2 30 0.13107200000000000000e6 +1674 4 6 34 0.26214400000000000000e6 +1674 4 7 35 -0.13107200000000000000e6 +1675 1 1 48 -0.32768000000000000000e5 +1675 1 2 49 -0.32768000000000000000e5 +1675 1 8 39 -0.65536000000000000000e5 +1675 1 9 40 -0.65536000000000000000e5 +1675 1 10 41 0.13107200000000000000e6 +1675 1 12 43 0.26214400000000000000e6 +1675 1 23 38 -0.32768000000000000000e5 +1675 1 24 55 0.65536000000000000000e5 +1675 1 26 41 0.65536000000000000000e5 +1675 1 28 43 -0.26214400000000000000e6 +1675 1 32 47 -0.26214400000000000000e6 +1675 1 48 55 0.65536000000000000000e5 +1675 2 2 32 -0.32768000000000000000e5 +1675 2 4 34 0.65536000000000000000e5 +1675 2 16 30 -0.65536000000000000000e5 +1675 2 20 34 -0.13107200000000000000e6 +1675 3 5 50 0.65536000000000000000e5 +1675 3 9 38 -0.65536000000000000000e5 +1675 3 22 35 -0.26214400000000000000e6 +1675 3 22 51 -0.65536000000000000000e5 +1675 3 23 52 0.13107200000000000000e6 +1675 3 27 40 0.65536000000000000000e5 +1675 3 28 41 -0.26214400000000000000e6 +1675 3 38 51 0.65536000000000000000e5 +1675 3 41 54 0.65536000000000000000e5 +1675 4 2 30 -0.65536000000000000000e5 +1675 4 6 34 -0.13107200000000000000e6 +1675 4 7 35 -0.65536000000000000000e5 +1676 1 1 48 0.65536000000000000000e5 +1676 1 2 49 0.13107200000000000000e6 +1676 1 6 53 -0.65536000000000000000e5 +1676 1 8 39 0.13107200000000000000e6 +1676 1 9 40 0.13107200000000000000e6 +1676 1 10 41 -0.26214400000000000000e6 +1676 1 12 43 -0.52428800000000000000e6 +1676 1 23 38 0.65536000000000000000e5 +1676 1 24 39 0.65536000000000000000e5 +1676 1 24 55 0.13107200000000000000e6 +1676 1 26 41 -0.26214400000000000000e6 +1676 1 28 43 0.26214400000000000000e6 +1676 1 32 47 0.52428800000000000000e6 +1676 1 47 54 0.65536000000000000000e5 +1676 1 48 56 0.65536000000000000000e5 +1676 2 2 32 0.65536000000000000000e5 +1676 2 3 33 0.65536000000000000000e5 +1676 2 5 35 -0.65536000000000000000e5 +1676 2 16 30 0.13107200000000000000e6 +1676 2 20 34 0.26214400000000000000e6 +1676 2 33 35 0.65536000000000000000e5 +1676 3 9 38 0.13107200000000000000e6 +1676 3 22 35 0.52428800000000000000e6 +1676 3 22 51 -0.13107200000000000000e6 +1676 3 23 52 0.26214400000000000000e6 +1676 3 25 38 0.65536000000000000000e5 +1676 3 25 54 -0.65536000000000000000e5 +1676 3 27 40 0.13107200000000000000e6 +1676 3 28 41 0.52428800000000000000e6 +1676 3 38 51 0.13107200000000000000e6 +1676 3 39 40 -0.65536000000000000000e5 +1676 3 40 53 -0.65536000000000000000e5 +1676 3 41 54 0.13107200000000000000e6 +1676 3 48 53 0.65536000000000000000e5 +1676 4 2 30 0.13107200000000000000e6 +1676 4 6 34 0.26214400000000000000e6 +1676 4 7 35 -0.13107200000000000000e6 +1677 1 1 48 -0.65536000000000000000e5 +1677 1 2 49 -0.98304000000000000000e5 +1677 1 6 53 0.32768000000000000000e5 +1677 1 8 39 -0.13107200000000000000e6 +1677 1 9 40 -0.13107200000000000000e6 +1677 1 10 41 0.26214400000000000000e6 +1677 1 12 43 0.52428800000000000000e6 +1677 1 23 38 -0.65536000000000000000e5 +1677 1 24 39 -0.32768000000000000000e5 +1677 1 26 41 0.19660800000000000000e6 +1677 1 28 43 -0.39321600000000000000e6 +1677 1 32 47 -0.52428800000000000000e6 +1677 1 49 49 0.65536000000000000000e5 +1677 2 2 32 -0.65536000000000000000e5 +1677 2 3 33 -0.32768000000000000000e5 +1677 2 4 34 0.65536000000000000000e5 +1677 2 5 35 0.32768000000000000000e5 +1677 2 16 30 -0.13107200000000000000e6 +1677 2 20 34 -0.26214400000000000000e6 +1677 3 5 50 0.65536000000000000000e5 +1677 3 9 38 -0.13107200000000000000e6 +1677 3 22 35 -0.52428800000000000000e6 +1677 3 25 38 -0.32768000000000000000e5 +1677 3 25 54 0.32768000000000000000e5 +1677 3 28 41 -0.52428800000000000000e6 +1677 3 39 40 0.32768000000000000000e5 +1677 4 2 30 -0.13107200000000000000e6 +1677 4 6 34 -0.26214400000000000000e6 +1678 1 1 48 -0.32768000000000000000e5 +1678 1 2 49 -0.32768000000000000000e5 +1678 1 8 39 -0.65536000000000000000e5 +1678 1 9 40 -0.65536000000000000000e5 +1678 1 10 41 0.13107200000000000000e6 +1678 1 12 43 0.26214400000000000000e6 +1678 1 23 38 -0.32768000000000000000e5 +1678 1 24 55 0.65536000000000000000e5 +1678 1 26 41 0.65536000000000000000e5 +1678 1 28 43 -0.26214400000000000000e6 +1678 1 32 47 -0.26214400000000000000e6 +1678 1 49 50 0.65536000000000000000e5 +1678 2 2 32 -0.32768000000000000000e5 +1678 2 4 34 0.65536000000000000000e5 +1678 2 16 30 -0.65536000000000000000e5 +1678 2 20 34 -0.13107200000000000000e6 +1678 3 5 50 0.65536000000000000000e5 +1678 3 9 38 -0.65536000000000000000e5 +1678 3 22 35 -0.26214400000000000000e6 +1678 3 22 51 -0.65536000000000000000e5 +1678 3 23 52 0.13107200000000000000e6 +1678 3 27 40 0.65536000000000000000e5 +1678 3 28 41 -0.26214400000000000000e6 +1678 3 38 51 0.65536000000000000000e5 +1678 4 2 30 -0.65536000000000000000e5 +1678 4 6 34 -0.13107200000000000000e6 +1678 4 7 35 -0.65536000000000000000e5 +1679 1 40 55 -0.65536000000000000000e5 +1679 1 49 51 0.65536000000000000000e5 +1680 1 33 40 -0.65536000000000000000e5 +1680 1 49 52 0.65536000000000000000e5 +1680 3 10 55 0.65536000000000000000e5 +1680 3 14 51 0.13107200000000000000e6 +1680 3 29 42 -0.65536000000000000000e5 +1680 3 30 43 -0.65536000000000000000e5 +1680 3 39 52 0.65536000000000000000e5 +1680 4 19 31 -0.65536000000000000000e5 +1681 1 1 48 0.65536000000000000000e5 +1681 1 2 49 0.13107200000000000000e6 +1681 1 6 53 -0.65536000000000000000e5 +1681 1 8 39 0.13107200000000000000e6 +1681 1 9 40 0.13107200000000000000e6 +1681 1 10 41 -0.26214400000000000000e6 +1681 1 12 43 -0.52428800000000000000e6 +1681 1 23 38 0.65536000000000000000e5 +1681 1 24 39 0.65536000000000000000e5 +1681 1 24 55 0.13107200000000000000e6 +1681 1 26 41 -0.26214400000000000000e6 +1681 1 28 43 0.26214400000000000000e6 +1681 1 32 47 0.52428800000000000000e6 +1681 1 47 54 0.65536000000000000000e5 +1681 1 49 53 0.65536000000000000000e5 +1681 2 2 32 0.65536000000000000000e5 +1681 2 3 33 0.65536000000000000000e5 +1681 2 5 35 -0.65536000000000000000e5 +1681 2 16 30 0.13107200000000000000e6 +1681 2 20 34 0.26214400000000000000e6 +1681 2 33 35 0.65536000000000000000e5 +1681 3 9 38 0.13107200000000000000e6 +1681 3 22 35 0.52428800000000000000e6 +1681 3 22 51 -0.13107200000000000000e6 +1681 3 23 52 0.26214400000000000000e6 +1681 3 25 38 0.65536000000000000000e5 +1681 3 25 54 -0.65536000000000000000e5 +1681 3 27 40 0.13107200000000000000e6 +1681 3 28 41 0.52428800000000000000e6 +1681 3 38 51 0.13107200000000000000e6 +1681 3 39 40 -0.65536000000000000000e5 +1681 3 40 53 -0.65536000000000000000e5 +1681 3 41 54 0.13107200000000000000e6 +1681 4 2 30 0.13107200000000000000e6 +1681 4 6 34 0.26214400000000000000e6 +1681 4 7 35 -0.13107200000000000000e6 +1682 1 1 48 -0.13107200000000000000e6 +1682 1 2 49 -0.19660800000000000000e6 +1682 1 6 53 0.65536000000000000000e5 +1682 1 8 39 -0.26214400000000000000e6 +1682 1 9 40 -0.26214400000000000000e6 +1682 1 10 41 0.52428800000000000000e6 +1682 1 12 43 0.10485760000000000000e7 +1682 1 23 38 -0.13107200000000000000e6 +1682 1 24 39 -0.65536000000000000000e5 +1682 1 26 41 0.39321600000000000000e6 +1682 1 28 43 -0.78643200000000000000e6 +1682 1 32 47 -0.10485760000000000000e7 +1682 1 49 54 0.65536000000000000000e5 +1682 2 2 32 -0.13107200000000000000e6 +1682 2 3 33 -0.65536000000000000000e5 +1682 2 4 34 0.13107200000000000000e6 +1682 2 5 35 0.65536000000000000000e5 +1682 2 16 30 -0.26214400000000000000e6 +1682 2 20 34 -0.52428800000000000000e6 +1682 3 5 50 0.13107200000000000000e6 +1682 3 9 38 -0.26214400000000000000e6 +1682 3 22 35 -0.10485760000000000000e7 +1682 3 25 38 -0.65536000000000000000e5 +1682 3 25 54 0.65536000000000000000e5 +1682 3 28 41 -0.10485760000000000000e7 +1682 3 39 40 0.65536000000000000000e5 +1682 3 40 53 0.65536000000000000000e5 +1682 4 2 30 -0.26214400000000000000e6 +1682 4 6 34 -0.52428800000000000000e6 +1683 1 40 55 -0.65536000000000000000e5 +1683 1 49 55 0.65536000000000000000e5 +1683 3 49 50 0.65536000000000000000e5 +1684 1 1 48 0.81920000000000000000e4 +1684 1 2 49 0.81920000000000000000e4 +1684 1 6 53 0.81920000000000000000e4 +1684 1 8 39 0.16384000000000000000e5 +1684 1 9 40 0.16384000000000000000e5 +1684 1 10 41 -0.32768000000000000000e5 +1684 1 12 43 -0.65536000000000000000e5 +1684 1 23 38 0.81920000000000000000e4 +1684 1 24 55 -0.16384000000000000000e5 +1684 1 25 40 -0.81920000000000000000e4 +1684 1 26 41 -0.16384000000000000000e5 +1684 1 28 43 0.32768000000000000000e5 +1684 1 32 47 0.65536000000000000000e5 +1684 1 33 48 -0.32768000000000000000e5 +1684 1 40 55 0.16384000000000000000e5 +1684 1 41 56 0.16384000000000000000e5 +1684 1 44 51 0.65536000000000000000e5 +1684 1 46 53 -0.65536000000000000000e5 +1684 1 50 50 0.65536000000000000000e5 +1684 2 2 32 0.81920000000000000000e4 +1684 2 16 30 0.16384000000000000000e5 +1684 2 20 34 0.32768000000000000000e5 +1684 2 21 35 -0.16384000000000000000e5 +1684 2 28 34 0.16384000000000000000e5 +1684 3 9 38 0.16384000000000000000e5 +1684 3 10 55 -0.32768000000000000000e5 +1684 3 22 35 0.65536000000000000000e5 +1684 3 22 51 0.16384000000000000000e5 +1684 3 24 37 0.81920000000000000000e4 +1684 3 27 40 0.16384000000000000000e5 +1684 3 27 56 0.16384000000000000000e5 +1684 3 28 41 0.65536000000000000000e5 +1684 3 35 48 0.65536000000000000000e5 +1684 3 38 51 -0.16384000000000000000e5 +1684 3 39 52 -0.32768000000000000000e5 +1684 3 40 45 -0.32768000000000000000e5 +1684 4 2 30 0.16384000000000000000e5 +1684 4 4 32 -0.81920000000000000000e4 +1684 4 6 34 0.32768000000000000000e5 +1684 4 16 28 0.81920000000000000000e4 +1684 4 22 34 -0.32768000000000000000e5 +1684 4 23 35 -0.32768000000000000000e5 +1684 4 29 33 -0.16384000000000000000e5 +1685 1 1 48 -0.16384000000000000000e5 +1685 1 2 49 -0.16384000000000000000e5 +1685 1 8 39 -0.32768000000000000000e5 +1685 1 9 40 -0.32768000000000000000e5 +1685 1 10 41 0.65536000000000000000e5 +1685 1 12 43 0.13107200000000000000e6 +1685 1 23 38 -0.16384000000000000000e5 +1685 1 24 55 0.32768000000000000000e5 +1685 1 26 41 0.32768000000000000000e5 +1685 1 28 43 -0.13107200000000000000e6 +1685 1 32 47 -0.13107200000000000000e6 +1685 1 40 55 -0.32768000000000000000e5 +1685 1 41 56 -0.32768000000000000000e5 +1685 1 50 51 0.65536000000000000000e5 +1685 2 2 32 -0.16384000000000000000e5 +1685 2 4 34 0.32768000000000000000e5 +1685 2 16 30 -0.32768000000000000000e5 +1685 2 20 34 -0.65536000000000000000e5 +1685 2 28 34 -0.32768000000000000000e5 +1685 3 5 50 0.32768000000000000000e5 +1685 3 9 38 -0.32768000000000000000e5 +1685 3 22 35 -0.13107200000000000000e6 +1685 3 22 51 -0.32768000000000000000e5 +1685 3 23 52 0.65536000000000000000e5 +1685 3 27 40 0.32768000000000000000e5 +1685 3 27 56 -0.32768000000000000000e5 +1685 3 28 41 -0.13107200000000000000e6 +1685 3 38 51 0.32768000000000000000e5 +1685 4 2 30 -0.32768000000000000000e5 +1685 4 6 34 -0.65536000000000000000e5 +1685 4 7 35 -0.32768000000000000000e5 +1685 4 29 33 0.32768000000000000000e5 +1686 1 46 53 -0.65536000000000000000e5 +1686 1 50 52 0.65536000000000000000e5 +1687 1 41 56 -0.65536000000000000000e5 +1687 1 50 53 0.65536000000000000000e5 +1688 1 1 48 -0.32768000000000000000e5 +1688 1 2 49 -0.32768000000000000000e5 +1688 1 8 39 -0.65536000000000000000e5 +1688 1 9 40 -0.65536000000000000000e5 +1688 1 10 41 0.13107200000000000000e6 +1688 1 12 43 0.26214400000000000000e6 +1688 1 23 38 -0.32768000000000000000e5 +1688 1 24 55 0.65536000000000000000e5 +1688 1 26 41 0.65536000000000000000e5 +1688 1 28 43 -0.26214400000000000000e6 +1688 1 32 47 -0.26214400000000000000e6 +1688 1 50 54 0.65536000000000000000e5 +1688 2 2 32 -0.32768000000000000000e5 +1688 2 4 34 0.65536000000000000000e5 +1688 2 16 30 -0.65536000000000000000e5 +1688 2 20 34 -0.13107200000000000000e6 +1688 3 5 50 0.65536000000000000000e5 +1688 3 9 38 -0.65536000000000000000e5 +1688 3 22 35 -0.26214400000000000000e6 +1688 3 22 51 -0.65536000000000000000e5 +1688 3 23 52 0.13107200000000000000e6 +1688 3 27 40 0.65536000000000000000e5 +1688 3 28 41 -0.26214400000000000000e6 +1688 3 38 51 0.65536000000000000000e5 +1688 3 41 54 0.65536000000000000000e5 +1688 4 2 30 -0.65536000000000000000e5 +1688 4 6 34 -0.13107200000000000000e6 +1688 4 7 35 -0.65536000000000000000e5 +1689 1 1 48 -0.16384000000000000000e5 +1689 1 2 49 -0.16384000000000000000e5 +1689 1 8 39 -0.32768000000000000000e5 +1689 1 9 40 -0.32768000000000000000e5 +1689 1 10 41 0.65536000000000000000e5 +1689 1 12 43 0.13107200000000000000e6 +1689 1 23 38 -0.16384000000000000000e5 +1689 1 24 55 0.32768000000000000000e5 +1689 1 26 41 0.32768000000000000000e5 +1689 1 28 43 -0.13107200000000000000e6 +1689 1 32 47 -0.13107200000000000000e6 +1689 1 40 55 -0.32768000000000000000e5 +1689 1 41 56 -0.32768000000000000000e5 +1689 1 50 55 0.65536000000000000000e5 +1689 2 2 32 -0.16384000000000000000e5 +1689 2 4 34 0.32768000000000000000e5 +1689 2 16 30 -0.32768000000000000000e5 +1689 2 20 34 -0.65536000000000000000e5 +1689 2 28 34 -0.32768000000000000000e5 +1689 3 5 50 0.32768000000000000000e5 +1689 3 9 38 -0.32768000000000000000e5 +1689 3 22 35 -0.13107200000000000000e6 +1689 3 22 51 -0.32768000000000000000e5 +1689 3 23 52 0.65536000000000000000e5 +1689 3 27 40 0.32768000000000000000e5 +1689 3 27 56 -0.32768000000000000000e5 +1689 3 28 41 -0.13107200000000000000e6 +1689 3 38 51 0.32768000000000000000e5 +1689 3 47 52 0.65536000000000000000e5 +1689 4 2 30 -0.32768000000000000000e5 +1689 4 6 34 -0.65536000000000000000e5 +1689 4 7 35 -0.32768000000000000000e5 +1689 4 29 33 0.32768000000000000000e5 +1690 1 1 48 -0.32768000000000000000e5 +1690 1 2 49 -0.32768000000000000000e5 +1690 1 8 39 -0.65536000000000000000e5 +1690 1 9 40 -0.65536000000000000000e5 +1690 1 10 41 0.13107200000000000000e6 +1690 1 12 43 0.26214400000000000000e6 +1690 1 23 38 -0.32768000000000000000e5 +1690 1 24 55 0.65536000000000000000e5 +1690 1 26 41 0.65536000000000000000e5 +1690 1 28 43 -0.26214400000000000000e6 +1690 1 32 47 -0.26214400000000000000e6 +1690 1 50 56 0.65536000000000000000e5 +1690 2 2 32 -0.32768000000000000000e5 +1690 2 4 34 0.65536000000000000000e5 +1690 2 16 30 -0.65536000000000000000e5 +1690 2 20 34 -0.13107200000000000000e6 +1690 3 5 50 0.65536000000000000000e5 +1690 3 9 38 -0.65536000000000000000e5 +1690 3 22 35 -0.26214400000000000000e6 +1690 3 22 51 -0.65536000000000000000e5 +1690 3 23 52 0.13107200000000000000e6 +1690 3 27 40 0.65536000000000000000e5 +1690 3 28 41 -0.26214400000000000000e6 +1690 3 38 51 0.65536000000000000000e5 +1690 3 41 54 0.65536000000000000000e5 +1690 3 41 56 0.65536000000000000000e5 +1690 4 2 30 -0.65536000000000000000e5 +1690 4 6 34 -0.13107200000000000000e6 +1690 4 7 35 -0.65536000000000000000e5 +1691 1 33 40 -0.32768000000000000000e5 +1691 1 51 51 0.65536000000000000000e5 +1691 3 10 55 0.32768000000000000000e5 +1691 3 14 51 0.65536000000000000000e5 +1691 3 29 42 -0.32768000000000000000e5 +1691 3 30 43 -0.32768000000000000000e5 +1691 3 39 52 0.32768000000000000000e5 +1691 4 19 31 -0.32768000000000000000e5 +1692 1 18 49 -0.65536000000000000000e5 +1692 1 51 52 0.65536000000000000000e5 +1692 3 14 51 0.65536000000000000000e5 +1692 3 35 48 0.65536000000000000000e5 +1692 3 45 50 0.65536000000000000000e5 +1693 1 1 48 -0.32768000000000000000e5 +1693 1 2 49 -0.32768000000000000000e5 +1693 1 8 39 -0.65536000000000000000e5 +1693 1 9 40 -0.65536000000000000000e5 +1693 1 10 41 0.13107200000000000000e6 +1693 1 12 43 0.26214400000000000000e6 +1693 1 23 38 -0.32768000000000000000e5 +1693 1 24 55 0.65536000000000000000e5 +1693 1 26 41 0.65536000000000000000e5 +1693 1 28 43 -0.26214400000000000000e6 +1693 1 32 47 -0.26214400000000000000e6 +1693 1 51 53 0.65536000000000000000e5 +1693 2 2 32 -0.32768000000000000000e5 +1693 2 4 34 0.65536000000000000000e5 +1693 2 16 30 -0.65536000000000000000e5 +1693 2 20 34 -0.13107200000000000000e6 +1693 3 5 50 0.65536000000000000000e5 +1693 3 9 38 -0.65536000000000000000e5 +1693 3 22 35 -0.26214400000000000000e6 +1693 3 22 51 -0.65536000000000000000e5 +1693 3 23 52 0.13107200000000000000e6 +1693 3 27 40 0.65536000000000000000e5 +1693 3 28 41 -0.26214400000000000000e6 +1693 3 38 51 0.65536000000000000000e5 +1693 3 41 54 0.65536000000000000000e5 +1693 4 2 30 -0.65536000000000000000e5 +1693 4 6 34 -0.13107200000000000000e6 +1693 4 7 35 -0.65536000000000000000e5 +1694 1 40 55 -0.65536000000000000000e5 +1694 1 51 54 0.65536000000000000000e5 +1694 3 49 50 0.65536000000000000000e5 +1695 1 33 40 -0.65536000000000000000e5 +1695 1 51 55 0.65536000000000000000e5 +1695 3 10 55 0.65536000000000000000e5 +1695 3 14 51 0.13107200000000000000e6 +1695 3 29 42 -0.65536000000000000000e5 +1695 3 30 43 -0.65536000000000000000e5 +1695 3 39 52 0.65536000000000000000e5 +1695 3 42 55 0.65536000000000000000e5 +1695 4 19 31 -0.65536000000000000000e5 +1696 1 51 56 0.65536000000000000000e5 +1696 1 54 55 -0.65536000000000000000e5 +1697 1 45 52 -0.32768000000000000000e5 +1697 1 52 52 0.65536000000000000000e5 +1697 3 19 56 0.32768000000000000000e5 +1698 1 1 48 -0.16384000000000000000e5 +1698 1 2 49 -0.16384000000000000000e5 +1698 1 8 39 -0.32768000000000000000e5 +1698 1 9 40 -0.32768000000000000000e5 +1698 1 10 41 0.65536000000000000000e5 +1698 1 12 43 0.13107200000000000000e6 +1698 1 23 38 -0.16384000000000000000e5 +1698 1 24 55 0.32768000000000000000e5 +1698 1 26 41 0.32768000000000000000e5 +1698 1 28 43 -0.13107200000000000000e6 +1698 1 32 47 -0.13107200000000000000e6 +1698 1 40 55 -0.32768000000000000000e5 +1698 1 41 56 -0.32768000000000000000e5 +1698 1 52 53 0.65536000000000000000e5 +1698 2 2 32 -0.16384000000000000000e5 +1698 2 4 34 0.32768000000000000000e5 +1698 2 16 30 -0.32768000000000000000e5 +1698 2 20 34 -0.65536000000000000000e5 +1698 2 28 34 -0.32768000000000000000e5 +1698 3 5 50 0.32768000000000000000e5 +1698 3 9 38 -0.32768000000000000000e5 +1698 3 22 35 -0.13107200000000000000e6 +1698 3 22 51 -0.32768000000000000000e5 +1698 3 23 52 0.65536000000000000000e5 +1698 3 27 40 0.32768000000000000000e5 +1698 3 27 56 -0.32768000000000000000e5 +1698 3 28 41 -0.13107200000000000000e6 +1698 3 38 51 0.32768000000000000000e5 +1698 3 47 52 0.65536000000000000000e5 +1698 4 2 30 -0.32768000000000000000e5 +1698 4 6 34 -0.65536000000000000000e5 +1698 4 7 35 -0.32768000000000000000e5 +1698 4 29 33 0.32768000000000000000e5 +1699 1 33 40 -0.65536000000000000000e5 +1699 1 52 54 0.65536000000000000000e5 +1699 3 10 55 0.65536000000000000000e5 +1699 3 14 51 0.13107200000000000000e6 +1699 3 29 42 -0.65536000000000000000e5 +1699 3 30 43 -0.65536000000000000000e5 +1699 3 39 52 0.65536000000000000000e5 +1699 3 42 55 0.65536000000000000000e5 +1699 4 19 31 -0.65536000000000000000e5 +1700 1 33 40 -0.65536000000000000000e5 +1700 1 52 56 0.65536000000000000000e5 +1700 3 10 55 0.65536000000000000000e5 +1700 3 14 51 0.13107200000000000000e6 +1700 3 29 42 -0.65536000000000000000e5 +1700 3 30 43 -0.65536000000000000000e5 +1700 3 39 52 0.65536000000000000000e5 +1700 3 42 55 0.65536000000000000000e5 +1700 3 50 55 0.65536000000000000000e5 +1700 4 19 31 -0.65536000000000000000e5 +1701 1 1 48 -0.65536000000000000000e5 +1701 1 2 49 -0.98304000000000000000e5 +1701 1 6 53 0.32768000000000000000e5 +1701 1 8 39 -0.13107200000000000000e6 +1701 1 9 40 -0.13107200000000000000e6 +1701 1 10 41 0.26214400000000000000e6 +1701 1 12 43 0.52428800000000000000e6 +1701 1 23 38 -0.65536000000000000000e5 +1701 1 24 39 -0.32768000000000000000e5 +1701 1 26 41 0.19660800000000000000e6 +1701 1 28 43 -0.39321600000000000000e6 +1701 1 32 47 -0.52428800000000000000e6 +1701 1 47 54 -0.32768000000000000000e5 +1701 1 49 56 0.32768000000000000000e5 +1701 1 53 53 0.65536000000000000000e5 +1701 2 2 32 -0.65536000000000000000e5 +1701 2 3 33 -0.32768000000000000000e5 +1701 2 4 34 0.65536000000000000000e5 +1701 2 5 35 0.32768000000000000000e5 +1701 2 16 30 -0.13107200000000000000e6 +1701 2 20 34 -0.26214400000000000000e6 +1701 2 33 35 -0.32768000000000000000e5 +1701 2 35 35 0.65536000000000000000e5 +1701 3 5 50 0.65536000000000000000e5 +1701 3 9 38 -0.13107200000000000000e6 +1701 3 22 35 -0.52428800000000000000e6 +1701 3 25 38 -0.32768000000000000000e5 +1701 3 25 54 0.32768000000000000000e5 +1701 3 28 41 -0.52428800000000000000e6 +1701 3 39 40 0.32768000000000000000e5 +1701 3 40 53 0.32768000000000000000e5 +1701 3 41 56 0.65536000000000000000e5 +1701 3 48 53 -0.32768000000000000000e5 +1701 4 2 30 -0.13107200000000000000e6 +1701 4 6 34 -0.26214400000000000000e6 +1702 1 1 48 0.65536000000000000000e5 +1702 1 2 49 0.13107200000000000000e6 +1702 1 6 53 -0.65536000000000000000e5 +1702 1 8 39 0.13107200000000000000e6 +1702 1 9 40 0.13107200000000000000e6 +1702 1 10 41 -0.26214400000000000000e6 +1702 1 12 43 -0.52428800000000000000e6 +1702 1 23 38 0.65536000000000000000e5 +1702 1 24 39 0.65536000000000000000e5 +1702 1 24 55 0.13107200000000000000e6 +1702 1 26 41 -0.26214400000000000000e6 +1702 1 28 43 0.26214400000000000000e6 +1702 1 32 47 0.52428800000000000000e6 +1702 1 47 54 0.65536000000000000000e5 +1702 1 53 54 0.65536000000000000000e5 +1702 2 2 32 0.65536000000000000000e5 +1702 2 3 33 0.65536000000000000000e5 +1702 2 5 35 -0.65536000000000000000e5 +1702 2 16 30 0.13107200000000000000e6 +1702 2 20 34 0.26214400000000000000e6 +1702 2 33 35 0.65536000000000000000e5 +1702 3 9 38 0.13107200000000000000e6 +1702 3 22 35 0.52428800000000000000e6 +1702 3 22 51 -0.13107200000000000000e6 +1702 3 23 52 0.26214400000000000000e6 +1702 3 25 38 0.65536000000000000000e5 +1702 3 25 54 -0.65536000000000000000e5 +1702 3 27 40 0.13107200000000000000e6 +1702 3 28 41 0.52428800000000000000e6 +1702 3 38 51 0.13107200000000000000e6 +1702 3 39 40 -0.65536000000000000000e5 +1702 3 40 53 -0.65536000000000000000e5 +1702 3 41 54 0.13107200000000000000e6 +1702 3 48 53 0.65536000000000000000e5 +1702 4 2 30 0.13107200000000000000e6 +1702 4 6 34 0.26214400000000000000e6 +1702 4 7 35 -0.13107200000000000000e6 +1703 1 1 48 -0.32768000000000000000e5 +1703 1 2 49 -0.32768000000000000000e5 +1703 1 8 39 -0.65536000000000000000e5 +1703 1 9 40 -0.65536000000000000000e5 +1703 1 10 41 0.13107200000000000000e6 +1703 1 12 43 0.26214400000000000000e6 +1703 1 23 38 -0.32768000000000000000e5 +1703 1 24 55 0.65536000000000000000e5 +1703 1 26 41 0.65536000000000000000e5 +1703 1 28 43 -0.26214400000000000000e6 +1703 1 32 47 -0.26214400000000000000e6 +1703 1 53 55 0.65536000000000000000e5 +1703 2 2 32 -0.32768000000000000000e5 +1703 2 4 34 0.65536000000000000000e5 +1703 2 16 30 -0.65536000000000000000e5 +1703 2 20 34 -0.13107200000000000000e6 +1703 3 5 50 0.65536000000000000000e5 +1703 3 9 38 -0.65536000000000000000e5 +1703 3 22 35 -0.26214400000000000000e6 +1703 3 22 51 -0.65536000000000000000e5 +1703 3 23 52 0.13107200000000000000e6 +1703 3 27 40 0.65536000000000000000e5 +1703 3 28 41 -0.26214400000000000000e6 +1703 3 38 51 0.65536000000000000000e5 +1703 3 41 54 0.65536000000000000000e5 +1703 3 41 56 0.65536000000000000000e5 +1703 4 2 30 -0.65536000000000000000e5 +1703 4 6 34 -0.13107200000000000000e6 +1703 4 7 35 -0.65536000000000000000e5 +1704 1 49 56 -0.32768000000000000000e5 +1704 1 54 54 0.65536000000000000000e5 +1705 1 49 56 -0.65536000000000000000e5 +1705 1 54 56 0.65536000000000000000e5 +1705 3 53 54 0.65536000000000000000e5 +1706 1 33 40 -0.32768000000000000000e5 +1706 1 55 55 0.65536000000000000000e5 +1706 3 10 55 0.32768000000000000000e5 +1706 3 14 51 0.65536000000000000000e5 +1706 3 29 42 -0.32768000000000000000e5 +1706 3 30 43 -0.32768000000000000000e5 +1706 3 39 52 0.32768000000000000000e5 +1706 3 42 55 0.32768000000000000000e5 +1706 3 50 55 0.32768000000000000000e5 +1706 4 19 31 -0.32768000000000000000e5 +1707 1 49 56 -0.32768000000000000000e5 +1707 1 56 56 0.65536000000000000000e5 +1707 3 53 54 0.32768000000000000000e5 +1707 3 53 56 0.32768000000000000000e5 +1708 1 1 2 0.65536000000000000000e5 +1708 1 1 8 -0.26214400000000000000e6 +1708 1 1 32 -0.26214400000000000000e6 +1708 1 1 48 0.65536000000000000000e5 +1708 1 2 5 -0.65536000000000000000e5 +1708 1 2 25 0.65536000000000000000e5 +1708 1 2 33 0.78643200000000000000e6 +1708 1 2 49 0.13107200000000000000e6 +1708 1 3 34 -0.10485760000000000000e7 +1708 1 4 11 -0.13107200000000000000e6 +1708 1 8 39 0.13107200000000000000e6 +1708 1 9 40 0.13107200000000000000e6 +1708 1 10 41 0.52428800000000000000e6 +1708 1 11 42 -0.26214400000000000000e6 +1708 1 12 27 0.52428800000000000000e6 +1708 1 12 43 -0.10485760000000000000e7 +1708 1 23 38 0.13107200000000000000e6 +1708 1 26 41 -0.13107200000000000000e6 +1708 1 28 43 0.52428800000000000000e6 +1708 1 32 47 0.78643200000000000000e6 +1708 1 33 48 0.26214400000000000000e6 +1708 2 1 2 0.65536000000000000000e5 +1708 2 1 7 -0.13107200000000000000e6 +1708 2 2 8 0.13107200000000000000e6 +1708 2 2 16 -0.65536000000000000000e5 +1708 2 2 32 0.13107200000000000000e6 +1708 2 3 9 -0.13107200000000000000e6 +1708 2 6 20 -0.26214400000000000000e6 +1708 2 7 21 0.52428800000000000000e6 +1708 2 12 26 0.26214400000000000000e6 +1708 2 16 30 0.13107200000000000000e6 +1708 2 20 34 0.26214400000000000000e6 +1708 3 1 2 0.65536000000000000000e5 +1708 3 1 14 -0.52428800000000000000e6 +1708 3 1 30 -0.13107200000000000000e6 +1708 3 1 38 -0.65536000000000000000e5 +1708 3 2 3 -0.65536000000000000000e5 +1708 3 2 7 -0.26214400000000000000e6 +1708 3 2 15 0.26214400000000000000e6 +1708 3 2 23 -0.65536000000000000000e5 +1708 3 3 32 0.78643200000000000000e6 +1708 3 4 9 -0.13107200000000000000e6 +1708 3 7 12 0.52428800000000000000e6 +1708 3 8 37 0.13107200000000000000e6 +1708 3 10 23 -0.26214400000000000000e6 +1708 3 13 42 0.52428800000000000000e6 +1708 3 22 35 0.52428800000000000000e6 +1708 3 28 41 0.78643200000000000000e6 +1708 3 29 42 0.26214400000000000000e6 +1708 4 2 2 -0.13107200000000000000e6 +1708 4 2 6 -0.13107200000000000000e6 +1708 4 2 30 0.13107200000000000000e6 +1708 4 3 31 -0.26214400000000000000e6 +1708 4 6 6 -0.52428800000000000000e6 +1708 4 6 18 -0.13107200000000000000e6 +1708 4 6 34 0.26214400000000000000e6 +1709 1 2 5 -0.65536000000000000000e5 +1709 1 2 9 0.13107200000000000000e6 +1709 1 2 25 0.65536000000000000000e5 +1709 1 8 23 -0.13107200000000000000e6 +1709 2 1 3 0.65536000000000000000e5 +1709 2 2 16 -0.65536000000000000000e5 +1709 3 1 2 0.65536000000000000000e5 +1709 3 2 7 -0.13107200000000000000e6 +1709 4 2 2 -0.13107200000000000000e6 +1710 1 1 24 0.65536000000000000000e5 +1710 1 1 48 0.65536000000000000000e5 +1710 1 2 25 0.65536000000000000000e5 +1710 1 8 23 -0.13107200000000000000e6 +1710 2 1 4 0.65536000000000000000e5 +1710 3 1 38 0.65536000000000000000e5 +1710 3 2 23 0.65536000000000000000e5 +1710 4 2 2 -0.13107200000000000000e6 +1711 1 1 48 0.13107200000000000000e6 +1711 1 2 5 0.65536000000000000000e5 +1711 1 2 9 0.13107200000000000000e6 +1711 1 2 25 -0.65536000000000000000e5 +1711 1 2 33 0.52428800000000000000e6 +1711 1 2 49 0.13107200000000000000e6 +1711 1 3 34 -0.52428800000000000000e6 +1711 1 4 11 -0.13107200000000000000e6 +1711 1 8 39 0.13107200000000000000e6 +1711 1 9 40 0.13107200000000000000e6 +1711 1 10 41 0.26214400000000000000e6 +1711 1 11 42 -0.26214400000000000000e6 +1711 1 12 43 -0.10485760000000000000e7 +1711 1 23 38 0.13107200000000000000e6 +1711 1 26 41 -0.13107200000000000000e6 +1711 1 28 43 0.52428800000000000000e6 +1711 1 32 47 0.78643200000000000000e6 +1711 1 33 48 0.26214400000000000000e6 +1711 2 1 5 0.65536000000000000000e5 +1711 2 2 8 0.13107200000000000000e6 +1711 2 2 32 0.13107200000000000000e6 +1711 2 3 9 -0.13107200000000000000e6 +1711 2 3 17 -0.65536000000000000000e5 +1711 2 7 21 0.26214400000000000000e6 +1711 2 12 26 0.26214400000000000000e6 +1711 2 16 30 0.13107200000000000000e6 +1711 2 20 34 0.26214400000000000000e6 +1711 3 1 6 0.65536000000000000000e5 +1711 3 1 14 -0.26214400000000000000e6 +1711 3 1 30 -0.13107200000000000000e6 +1711 3 2 3 0.65536000000000000000e5 +1711 3 2 15 0.26214400000000000000e6 +1711 3 3 32 0.52428800000000000000e6 +1711 3 4 9 -0.13107200000000000000e6 +1711 3 8 37 0.13107200000000000000e6 +1711 3 10 23 -0.26214400000000000000e6 +1711 3 13 42 0.52428800000000000000e6 +1711 3 22 35 0.52428800000000000000e6 +1711 3 28 41 0.78643200000000000000e6 +1711 3 29 42 0.26214400000000000000e6 +1711 4 2 30 0.13107200000000000000e6 +1711 4 3 31 -0.26214400000000000000e6 +1711 4 6 18 -0.13107200000000000000e6 +1711 4 6 34 0.26214400000000000000e6 +1712 1 1 2 0.32768000000000000000e5 +1712 1 1 8 -0.13107200000000000000e6 +1712 1 1 12 -0.13107200000000000000e6 +1712 1 1 24 -0.32768000000000000000e5 +1712 1 1 32 -0.26214400000000000000e6 +1712 1 1 48 0.98304000000000000000e5 +1712 1 2 5 -0.32768000000000000000e5 +1712 1 2 9 -0.65536000000000000000e5 +1712 1 2 25 0.32768000000000000000e5 +1712 1 2 33 0.78643200000000000000e6 +1712 1 2 49 0.13107200000000000000e6 +1712 1 3 34 -0.10485760000000000000e7 +1712 1 4 11 -0.13107200000000000000e6 +1712 1 7 22 0.65536000000000000000e5 +1712 1 8 23 0.65536000000000000000e5 +1712 1 8 39 0.13107200000000000000e6 +1712 1 9 40 0.13107200000000000000e6 +1712 1 10 41 0.52428800000000000000e6 +1712 1 11 42 -0.26214400000000000000e6 +1712 1 12 27 0.52428800000000000000e6 +1712 1 12 43 -0.10485760000000000000e7 +1712 1 23 38 0.13107200000000000000e6 +1712 1 26 41 -0.13107200000000000000e6 +1712 1 28 43 0.52428800000000000000e6 +1712 1 32 47 0.78643200000000000000e6 +1712 1 33 48 0.26214400000000000000e6 +1712 2 1 6 0.65536000000000000000e5 +1712 2 1 7 -0.13107200000000000000e6 +1712 2 2 8 0.13107200000000000000e6 +1712 2 2 16 -0.32768000000000000000e5 +1712 2 2 32 0.13107200000000000000e6 +1712 2 3 9 -0.13107200000000000000e6 +1712 2 6 20 -0.26214400000000000000e6 +1712 2 7 21 0.52428800000000000000e6 +1712 2 12 26 0.26214400000000000000e6 +1712 2 16 30 0.13107200000000000000e6 +1712 2 20 34 0.26214400000000000000e6 +1712 3 1 2 0.32768000000000000000e5 +1712 3 1 14 -0.52428800000000000000e6 +1712 3 1 22 -0.32768000000000000000e5 +1712 3 1 30 -0.13107200000000000000e6 +1712 3 1 38 -0.32768000000000000000e5 +1712 3 2 3 -0.32768000000000000000e5 +1712 3 2 7 -0.19660800000000000000e6 +1712 3 2 15 0.26214400000000000000e6 +1712 3 2 23 -0.32768000000000000000e5 +1712 3 3 32 0.78643200000000000000e6 +1712 3 4 9 -0.13107200000000000000e6 +1712 3 7 12 0.52428800000000000000e6 +1712 3 8 37 0.13107200000000000000e6 +1712 3 10 23 -0.26214400000000000000e6 +1712 3 13 42 0.52428800000000000000e6 +1712 3 22 35 0.52428800000000000000e6 +1712 3 28 41 0.78643200000000000000e6 +1712 3 29 42 0.26214400000000000000e6 +1712 4 1 1 0.65536000000000000000e5 +1712 4 2 2 -0.65536000000000000000e5 +1712 4 2 6 -0.13107200000000000000e6 +1712 4 2 30 0.13107200000000000000e6 +1712 4 3 31 -0.26214400000000000000e6 +1712 4 6 6 -0.52428800000000000000e6 +1712 4 6 18 -0.13107200000000000000e6 +1712 4 6 34 0.26214400000000000000e6 +1713 1 1 8 -0.65536000000000000000e5 +1713 1 1 32 -0.26214400000000000000e6 +1713 1 1 48 0.98304000000000000000e5 +1713 1 2 9 -0.65536000000000000000e5 +1713 1 2 33 0.52428800000000000000e6 +1713 1 2 49 0.98304000000000000000e5 +1713 1 3 34 -0.52428800000000000000e6 +1713 1 4 11 -0.65536000000000000000e5 +1713 1 8 23 0.13107200000000000000e6 +1713 1 8 39 0.65536000000000000000e5 +1713 1 9 40 0.65536000000000000000e5 +1713 1 10 41 0.26214400000000000000e6 +1713 1 11 42 -0.26214400000000000000e6 +1713 1 12 27 0.26214400000000000000e6 +1713 1 12 43 -0.78643200000000000000e6 +1713 1 23 38 0.98304000000000000000e5 +1713 1 26 41 -0.65536000000000000000e5 +1713 1 28 43 0.39321600000000000000e6 +1713 1 32 47 0.52428800000000000000e6 +1713 1 33 48 0.26214400000000000000e6 +1713 2 1 7 -0.65536000000000000000e5 +1713 2 1 8 0.65536000000000000000e5 +1713 2 2 8 0.65536000000000000000e5 +1713 2 2 32 0.98304000000000000000e5 +1713 2 3 9 -0.65536000000000000000e5 +1713 2 6 20 -0.13107200000000000000e6 +1713 2 7 21 0.26214400000000000000e6 +1713 2 12 26 0.26214400000000000000e6 +1713 2 16 30 0.65536000000000000000e5 +1713 2 20 34 0.13107200000000000000e6 +1713 3 1 14 -0.26214400000000000000e6 +1713 3 1 30 -0.13107200000000000000e6 +1713 3 2 7 -0.13107200000000000000e6 +1713 3 2 15 0.13107200000000000000e6 +1713 3 3 32 0.39321600000000000000e6 +1713 3 4 9 -0.65536000000000000000e5 +1713 3 7 12 0.26214400000000000000e6 +1713 3 8 37 0.13107200000000000000e6 +1713 3 10 23 -0.19660800000000000000e6 +1713 3 13 42 0.52428800000000000000e6 +1713 3 22 35 0.26214400000000000000e6 +1713 3 28 41 0.52428800000000000000e6 +1713 3 29 42 0.26214400000000000000e6 +1713 4 2 6 -0.13107200000000000000e6 +1713 4 2 30 0.65536000000000000000e5 +1713 4 3 31 -0.26214400000000000000e6 +1713 4 6 6 -0.26214400000000000000e6 +1713 4 6 18 -0.13107200000000000000e6 +1713 4 6 34 0.13107200000000000000e6 +1714 2 1 9 0.65536000000000000000e5 +1714 2 2 8 -0.65536000000000000000e5 +1715 1 1 12 0.65536000000000000000e5 +1715 1 1 16 -0.13107200000000000000e6 +1715 1 2 33 0.65536000000000000000e5 +1715 1 3 34 -0.13107200000000000000e6 +1715 1 10 41 0.65536000000000000000e5 +1715 1 12 27 0.13107200000000000000e6 +1715 2 1 10 0.65536000000000000000e5 +1715 2 6 20 -0.65536000000000000000e5 +1715 2 7 21 0.65536000000000000000e5 +1715 3 1 14 -0.65536000000000000000e5 +1715 3 3 32 0.65536000000000000000e5 +1715 3 7 12 0.13107200000000000000e6 +1715 4 6 6 -0.13107200000000000000e6 +1716 2 1 11 0.65536000000000000000e5 +1716 2 6 20 -0.65536000000000000000e5 +1716 4 6 6 -0.13107200000000000000e6 +1717 1 1 32 0.65536000000000000000e5 +1717 1 1 48 -0.32768000000000000000e5 +1717 1 2 17 -0.13107200000000000000e6 +1717 1 2 33 -0.13107200000000000000e6 +1717 1 2 49 -0.32768000000000000000e5 +1717 1 3 34 0.26214400000000000000e6 +1717 1 4 11 0.32768000000000000000e5 +1717 1 8 23 -0.32768000000000000000e5 +1717 1 8 39 -0.32768000000000000000e5 +1717 1 9 40 -0.32768000000000000000e5 +1717 1 10 41 -0.13107200000000000000e6 +1717 1 11 42 0.65536000000000000000e5 +1717 1 12 43 0.26214400000000000000e6 +1717 1 23 38 -0.32768000000000000000e5 +1717 1 26 41 0.32768000000000000000e5 +1717 1 28 43 -0.13107200000000000000e6 +1717 1 32 47 -0.19660800000000000000e6 +1717 1 33 48 -0.65536000000000000000e5 +1717 2 1 12 0.65536000000000000000e5 +1717 2 2 8 -0.32768000000000000000e5 +1717 2 2 32 -0.32768000000000000000e5 +1717 2 3 9 0.32768000000000000000e5 +1717 2 4 10 -0.65536000000000000000e5 +1717 2 7 21 -0.65536000000000000000e5 +1717 2 12 26 -0.65536000000000000000e5 +1717 2 16 30 -0.32768000000000000000e5 +1717 2 20 34 -0.65536000000000000000e5 +1717 3 1 14 0.65536000000000000000e5 +1717 3 1 30 0.32768000000000000000e5 +1717 3 2 7 0.32768000000000000000e5 +1717 3 2 15 -0.13107200000000000000e6 +1717 3 3 16 0.13107200000000000000e6 +1717 3 3 32 -0.19660800000000000000e6 +1717 3 4 9 0.32768000000000000000e5 +1717 3 8 37 -0.32768000000000000000e5 +1717 3 10 23 0.65536000000000000000e5 +1717 3 13 42 -0.13107200000000000000e6 +1717 3 22 35 -0.13107200000000000000e6 +1717 3 28 41 -0.19660800000000000000e6 +1717 3 29 42 -0.65536000000000000000e5 +1717 4 2 6 0.32768000000000000000e5 +1717 4 2 30 -0.32768000000000000000e5 +1717 4 3 31 0.65536000000000000000e5 +1717 4 6 18 0.32768000000000000000e5 +1717 4 6 34 -0.65536000000000000000e5 +1718 1 1 16 0.65536000000000000000e5 +1718 1 2 17 0.65536000000000000000e5 +1718 1 7 16 -0.13107200000000000000e6 +1718 1 12 27 0.65536000000000000000e5 +1718 2 1 13 0.65536000000000000000e5 +1718 3 7 12 0.65536000000000000000e5 +1719 1 3 34 0.65536000000000000000e5 +1719 1 4 35 -0.65536000000000000000e5 +1719 1 12 27 0.65536000000000000000e5 +1719 1 12 43 -0.65536000000000000000e5 +1719 1 14 45 -0.13107200000000000000e6 +1719 1 16 23 0.65536000000000000000e5 +1719 1 16 31 -0.26214400000000000000e6 +1719 1 17 48 0.65536000000000000000e5 +1719 1 18 49 0.65536000000000000000e5 +1719 1 20 27 0.26214400000000000000e6 +1719 2 1 14 0.65536000000000000000e5 +1719 2 7 13 0.13107200000000000000e6 +1719 2 9 23 -0.65536000000000000000e5 +1719 2 10 24 -0.13107200000000000000e6 +1719 2 14 28 0.65536000000000000000e5 +1719 3 5 34 -0.65536000000000000000e5 +1719 3 13 42 0.65536000000000000000e5 +1719 3 14 27 -0.65536000000000000000e5 +1719 3 14 43 0.65536000000000000000e5 +1719 4 1 13 -0.65536000000000000000e5 +1719 4 10 10 -0.26214400000000000000e6 +1720 1 1 2 0.65536000000000000000e5 +1720 1 1 8 -0.26214400000000000000e6 +1720 1 1 32 -0.26214400000000000000e6 +1720 1 1 48 0.65536000000000000000e5 +1720 1 2 5 -0.65536000000000000000e5 +1720 1 2 25 0.65536000000000000000e5 +1720 1 2 33 0.78643200000000000000e6 +1720 1 2 49 0.13107200000000000000e6 +1720 1 3 34 -0.10485760000000000000e7 +1720 1 4 11 -0.13107200000000000000e6 +1720 1 8 39 0.13107200000000000000e6 +1720 1 9 40 0.13107200000000000000e6 +1720 1 10 41 0.52428800000000000000e6 +1720 1 11 42 -0.26214400000000000000e6 +1720 1 12 27 0.52428800000000000000e6 +1720 1 12 43 -0.10485760000000000000e7 +1720 1 23 38 0.13107200000000000000e6 +1720 1 26 41 -0.13107200000000000000e6 +1720 1 28 43 0.52428800000000000000e6 +1720 1 32 47 0.78643200000000000000e6 +1720 1 33 48 0.26214400000000000000e6 +1720 2 1 7 -0.13107200000000000000e6 +1720 2 1 16 0.65536000000000000000e5 +1720 2 2 8 0.13107200000000000000e6 +1720 2 2 16 -0.65536000000000000000e5 +1720 2 2 32 0.13107200000000000000e6 +1720 2 3 9 -0.13107200000000000000e6 +1720 2 6 20 -0.26214400000000000000e6 +1720 2 7 21 0.52428800000000000000e6 +1720 2 12 26 0.26214400000000000000e6 +1720 2 16 30 0.13107200000000000000e6 +1720 2 20 34 0.26214400000000000000e6 +1720 3 1 2 0.65536000000000000000e5 +1720 3 1 14 -0.52428800000000000000e6 +1720 3 1 30 -0.13107200000000000000e6 +1720 3 1 38 -0.65536000000000000000e5 +1720 3 2 3 -0.65536000000000000000e5 +1720 3 2 7 -0.26214400000000000000e6 +1720 3 2 15 0.26214400000000000000e6 +1720 3 2 23 -0.65536000000000000000e5 +1720 3 3 32 0.78643200000000000000e6 +1720 3 4 9 -0.13107200000000000000e6 +1720 3 7 12 0.52428800000000000000e6 +1720 3 8 37 0.13107200000000000000e6 +1720 3 10 23 -0.26214400000000000000e6 +1720 3 13 42 0.52428800000000000000e6 +1720 3 22 35 0.52428800000000000000e6 +1720 3 28 41 0.78643200000000000000e6 +1720 3 29 42 0.26214400000000000000e6 +1720 4 1 1 0.13107200000000000000e6 +1720 4 2 2 -0.13107200000000000000e6 +1720 4 2 6 -0.13107200000000000000e6 +1720 4 2 30 0.13107200000000000000e6 +1720 4 3 31 -0.26214400000000000000e6 +1720 4 6 6 -0.52428800000000000000e6 +1720 4 6 18 -0.13107200000000000000e6 +1720 4 6 34 0.26214400000000000000e6 +1721 2 1 17 0.65536000000000000000e5 +1721 2 2 16 -0.65536000000000000000e5 +1722 1 1 24 0.65536000000000000000e5 +1722 1 1 48 0.65536000000000000000e5 +1722 1 2 25 0.65536000000000000000e5 +1722 1 8 23 -0.13107200000000000000e6 +1722 2 1 18 0.65536000000000000000e5 +1722 3 1 38 0.65536000000000000000e5 +1722 3 2 23 0.65536000000000000000e5 +1723 2 1 19 0.65536000000000000000e5 +1723 2 3 17 -0.65536000000000000000e5 +1724 1 1 8 -0.65536000000000000000e5 +1724 1 1 48 0.65536000000000000000e5 +1724 1 2 9 -0.65536000000000000000e5 +1724 1 2 33 0.26214400000000000000e6 +1724 1 2 49 0.65536000000000000000e5 +1724 1 3 34 -0.26214400000000000000e6 +1724 1 4 11 -0.65536000000000000000e5 +1724 1 7 22 0.65536000000000000000e5 +1724 1 8 23 0.13107200000000000000e6 +1724 1 8 39 0.65536000000000000000e5 +1724 1 9 40 0.65536000000000000000e5 +1724 1 10 41 0.13107200000000000000e6 +1724 1 11 42 -0.13107200000000000000e6 +1724 1 12 43 -0.52428800000000000000e6 +1724 1 23 38 0.65536000000000000000e5 +1724 1 26 41 -0.65536000000000000000e5 +1724 1 28 43 0.26214400000000000000e6 +1724 1 32 47 0.39321600000000000000e6 +1724 1 33 48 0.13107200000000000000e6 +1724 2 1 7 -0.65536000000000000000e5 +1724 2 1 20 0.65536000000000000000e5 +1724 2 2 8 0.65536000000000000000e5 +1724 2 2 32 0.65536000000000000000e5 +1724 2 3 9 -0.65536000000000000000e5 +1724 2 7 21 0.13107200000000000000e6 +1724 2 12 26 0.13107200000000000000e6 +1724 2 16 30 0.65536000000000000000e5 +1724 2 20 34 0.13107200000000000000e6 +1724 3 1 14 -0.26214400000000000000e6 +1724 3 1 30 -0.65536000000000000000e5 +1724 3 2 7 -0.13107200000000000000e6 +1724 3 2 15 0.13107200000000000000e6 +1724 3 3 32 0.26214400000000000000e6 +1724 3 4 9 -0.65536000000000000000e5 +1724 3 7 12 0.26214400000000000000e6 +1724 3 8 37 0.65536000000000000000e5 +1724 3 10 23 -0.13107200000000000000e6 +1724 3 13 42 0.26214400000000000000e6 +1724 3 22 35 0.26214400000000000000e6 +1724 3 28 41 0.39321600000000000000e6 +1724 3 29 42 0.13107200000000000000e6 +1724 4 2 6 -0.65536000000000000000e5 +1724 4 2 30 0.65536000000000000000e5 +1724 4 3 31 -0.13107200000000000000e6 +1724 4 6 6 -0.26214400000000000000e6 +1724 4 6 18 -0.65536000000000000000e5 +1724 4 6 34 0.13107200000000000000e6 +1725 1 1 8 -0.65536000000000000000e5 +1725 1 1 32 -0.26214400000000000000e6 +1725 1 1 48 0.98304000000000000000e5 +1725 1 2 9 -0.65536000000000000000e5 +1725 1 2 33 0.52428800000000000000e6 +1725 1 2 49 0.98304000000000000000e5 +1725 1 3 34 -0.52428800000000000000e6 +1725 1 4 11 -0.65536000000000000000e5 +1725 1 8 23 0.13107200000000000000e6 +1725 1 8 39 0.65536000000000000000e5 +1725 1 9 40 0.65536000000000000000e5 +1725 1 10 41 0.26214400000000000000e6 +1725 1 11 42 -0.26214400000000000000e6 +1725 1 12 27 0.26214400000000000000e6 +1725 1 12 43 -0.78643200000000000000e6 +1725 1 23 38 0.98304000000000000000e5 +1725 1 26 41 -0.65536000000000000000e5 +1725 1 28 43 0.39321600000000000000e6 +1725 1 32 47 0.52428800000000000000e6 +1725 1 33 48 0.26214400000000000000e6 +1725 2 1 7 -0.65536000000000000000e5 +1725 2 1 21 0.65536000000000000000e5 +1725 2 2 8 0.65536000000000000000e5 +1725 2 2 32 0.98304000000000000000e5 +1725 2 3 9 -0.65536000000000000000e5 +1725 2 6 20 -0.13107200000000000000e6 +1725 2 7 21 0.26214400000000000000e6 +1725 2 12 26 0.26214400000000000000e6 +1725 2 16 30 0.65536000000000000000e5 +1725 2 20 34 0.13107200000000000000e6 +1725 3 1 14 -0.26214400000000000000e6 +1725 3 1 30 -0.13107200000000000000e6 +1725 3 2 7 -0.13107200000000000000e6 +1725 3 2 15 0.13107200000000000000e6 +1725 3 3 32 0.39321600000000000000e6 +1725 3 4 9 -0.65536000000000000000e5 +1725 3 7 12 0.26214400000000000000e6 +1725 3 8 37 0.13107200000000000000e6 +1725 3 10 23 -0.19660800000000000000e6 +1725 3 13 42 0.52428800000000000000e6 +1725 3 22 35 0.26214400000000000000e6 +1725 3 28 41 0.52428800000000000000e6 +1725 3 29 42 0.26214400000000000000e6 +1725 4 2 6 -0.65536000000000000000e5 +1725 4 2 30 0.65536000000000000000e5 +1725 4 3 31 -0.26214400000000000000e6 +1725 4 6 6 -0.26214400000000000000e6 +1725 4 6 18 -0.13107200000000000000e6 +1725 4 6 34 0.13107200000000000000e6 +1726 1 1 48 0.32768000000000000000e5 +1726 1 2 33 0.26214400000000000000e6 +1726 1 2 49 0.32768000000000000000e5 +1726 1 3 34 -0.26214400000000000000e6 +1726 1 8 23 0.65536000000000000000e5 +1726 1 8 39 0.65536000000000000000e5 +1726 1 10 41 0.13107200000000000000e6 +1726 1 11 42 -0.13107200000000000000e6 +1726 1 12 43 -0.26214400000000000000e6 +1726 1 23 38 0.32768000000000000000e5 +1726 1 28 43 0.13107200000000000000e6 +1726 1 32 47 0.13107200000000000000e6 +1726 1 33 48 0.13107200000000000000e6 +1726 2 1 22 0.65536000000000000000e5 +1726 2 2 32 0.32768000000000000000e5 +1726 2 7 21 0.13107200000000000000e6 +1726 2 12 26 0.13107200000000000000e6 +1726 3 3 32 0.13107200000000000000e6 +1726 3 8 37 0.65536000000000000000e5 +1726 3 10 23 -0.65536000000000000000e5 +1726 3 13 42 0.26214400000000000000e6 +1726 3 28 41 0.13107200000000000000e6 +1726 3 29 42 0.13107200000000000000e6 +1726 4 3 31 -0.13107200000000000000e6 +1726 4 6 18 -0.65536000000000000000e5 +1727 2 1 23 0.65536000000000000000e5 +1727 2 6 20 -0.65536000000000000000e5 +1728 1 1 32 0.65536000000000000000e5 +1728 1 3 34 0.13107200000000000000e6 +1728 1 10 41 -0.65536000000000000000e5 +1728 1 16 23 -0.13107200000000000000e6 +1728 2 1 24 0.65536000000000000000e5 +1728 2 7 21 -0.65536000000000000000e5 +1728 3 3 32 -0.65536000000000000000e5 +1729 1 3 34 0.65536000000000000000e5 +1729 1 4 35 -0.65536000000000000000e5 +1729 1 12 27 0.65536000000000000000e5 +1729 1 12 43 -0.65536000000000000000e5 +1729 1 14 45 -0.13107200000000000000e6 +1729 1 16 23 0.65536000000000000000e5 +1729 1 16 31 -0.26214400000000000000e6 +1729 1 17 48 0.65536000000000000000e5 +1729 1 18 49 0.65536000000000000000e5 +1729 1 20 27 0.26214400000000000000e6 +1729 2 1 25 0.65536000000000000000e5 +1729 2 7 13 0.13107200000000000000e6 +1729 2 9 23 -0.65536000000000000000e5 +1729 2 10 24 -0.13107200000000000000e6 +1729 2 14 28 0.65536000000000000000e5 +1729 3 5 34 -0.65536000000000000000e5 +1729 3 13 42 0.65536000000000000000e5 +1729 3 14 27 -0.65536000000000000000e5 +1729 3 14 43 0.65536000000000000000e5 +1729 4 10 10 -0.26214400000000000000e6 +1730 2 1 26 0.65536000000000000000e5 +1730 2 16 16 -0.13107200000000000000e6 +1731 1 1 48 0.65536000000000000000e5 +1731 1 7 38 -0.13107200000000000000e6 +1731 1 22 37 0.65536000000000000000e5 +1731 1 23 38 0.65536000000000000000e5 +1731 2 1 27 0.65536000000000000000e5 +1731 3 22 27 0.13107200000000000000e6 +1731 4 16 16 -0.13107200000000000000e6 +1732 1 1 40 0.65536000000000000000e5 +1732 1 23 38 -0.65536000000000000000e5 +1732 2 1 28 0.65536000000000000000e5 +1732 2 2 32 -0.65536000000000000000e5 +1732 3 1 38 0.65536000000000000000e5 +1732 3 2 39 0.65536000000000000000e5 +1732 3 8 37 -0.13107200000000000000e6 +1733 1 1 8 -0.65536000000000000000e5 +1733 1 1 24 -0.32768000000000000000e5 +1733 1 1 32 -0.13107200000000000000e6 +1733 1 1 40 -0.32768000000000000000e5 +1733 1 1 48 0.98304000000000000000e5 +1733 1 2 9 -0.65536000000000000000e5 +1733 1 2 33 0.26214400000000000000e6 +1733 1 2 49 0.98304000000000000000e5 +1733 1 3 34 -0.26214400000000000000e6 +1733 1 4 11 -0.65536000000000000000e5 +1733 1 7 38 0.65536000000000000000e5 +1733 1 8 23 0.65536000000000000000e5 +1733 1 8 39 0.65536000000000000000e5 +1733 1 9 40 0.65536000000000000000e5 +1733 1 10 41 0.13107200000000000000e6 +1733 1 12 27 0.26214400000000000000e6 +1733 1 12 43 -0.26214400000000000000e6 +1733 1 16 23 -0.26214400000000000000e6 +1733 1 22 37 0.32768000000000000000e5 +1733 1 23 38 0.13107200000000000000e6 +1733 1 26 41 -0.65536000000000000000e5 +1733 1 28 43 0.13107200000000000000e6 +1733 1 32 47 0.26214400000000000000e6 +1733 2 1 7 -0.65536000000000000000e5 +1733 2 1 29 0.65536000000000000000e5 +1733 2 1 31 0.13107200000000000000e6 +1733 2 2 8 0.65536000000000000000e5 +1733 2 2 16 -0.32768000000000000000e5 +1733 2 2 32 0.98304000000000000000e5 +1733 2 3 9 -0.65536000000000000000e5 +1733 2 6 20 -0.13107200000000000000e6 +1733 2 7 21 0.13107200000000000000e6 +1733 2 16 16 0.65536000000000000000e5 +1733 2 16 30 0.65536000000000000000e5 +1733 2 20 34 0.13107200000000000000e6 +1733 3 1 14 -0.26214400000000000000e6 +1733 3 1 22 -0.32768000000000000000e5 +1733 3 1 30 -0.65536000000000000000e5 +1733 3 1 34 0.26214400000000000000e6 +1733 3 1 38 -0.32768000000000000000e5 +1733 3 2 7 -0.13107200000000000000e6 +1733 3 2 15 0.13107200000000000000e6 +1733 3 2 23 -0.32768000000000000000e5 +1733 3 2 31 -0.13107200000000000000e6 +1733 3 3 32 0.26214400000000000000e6 +1733 3 4 9 -0.65536000000000000000e5 +1733 3 7 12 0.26214400000000000000e6 +1733 3 8 37 0.13107200000000000000e6 +1733 3 10 23 -0.13107200000000000000e6 +1733 3 22 27 0.65536000000000000000e5 +1733 3 22 35 0.26214400000000000000e6 +1733 3 28 41 0.26214400000000000000e6 +1733 4 2 6 -0.65536000000000000000e5 +1733 4 2 30 0.65536000000000000000e5 +1733 4 6 6 -0.26214400000000000000e6 +1733 4 6 18 -0.65536000000000000000e5 +1733 4 6 34 0.13107200000000000000e6 +1733 4 16 16 -0.65536000000000000000e5 +1734 1 1 48 0.32768000000000000000e5 +1734 1 2 33 0.13107200000000000000e6 +1734 1 2 49 0.32768000000000000000e5 +1734 1 3 34 -0.26214400000000000000e6 +1734 1 7 38 0.65536000000000000000e5 +1734 1 8 39 0.65536000000000000000e5 +1734 1 10 41 0.13107200000000000000e6 +1734 1 23 38 0.32768000000000000000e5 +1734 2 1 30 0.65536000000000000000e5 +1734 2 2 32 0.32768000000000000000e5 +1734 2 7 21 0.13107200000000000000e6 +1734 3 2 31 0.13107200000000000000e6 +1734 3 3 32 0.13107200000000000000e6 +1734 3 8 37 0.65536000000000000000e5 +1735 1 1 48 0.65536000000000000000e5 +1735 1 7 38 -0.13107200000000000000e6 +1735 1 22 37 0.65536000000000000000e5 +1735 1 23 38 0.65536000000000000000e5 +1735 2 1 32 0.65536000000000000000e5 +1735 3 22 27 0.13107200000000000000e6 +1736 2 1 33 0.65536000000000000000e5 +1736 2 2 32 -0.65536000000000000000e5 +1737 1 1 48 0.32768000000000000000e5 +1737 1 2 33 0.13107200000000000000e6 +1737 1 2 49 0.32768000000000000000e5 +1737 1 3 34 -0.26214400000000000000e6 +1737 1 7 38 0.65536000000000000000e5 +1737 1 8 39 0.65536000000000000000e5 +1737 1 10 41 0.13107200000000000000e6 +1737 1 23 38 0.32768000000000000000e5 +1737 2 1 34 0.65536000000000000000e5 +1737 2 2 32 0.32768000000000000000e5 +1737 2 7 21 0.13107200000000000000e6 +1737 3 2 31 0.13107200000000000000e6 +1737 3 3 32 0.13107200000000000000e6 +1737 3 8 37 0.65536000000000000000e5 +1737 4 1 29 0.65536000000000000000e5 +1738 1 2 5 -0.32768000000000000000e5 +1738 1 2 9 0.65536000000000000000e5 +1738 1 2 25 0.32768000000000000000e5 +1738 1 8 23 -0.65536000000000000000e5 +1738 2 2 2 0.65536000000000000000e5 +1738 2 2 16 -0.32768000000000000000e5 +1738 3 1 2 0.32768000000000000000e5 +1738 3 2 7 -0.65536000000000000000e5 +1738 4 2 2 -0.65536000000000000000e5 +1739 1 1 24 0.65536000000000000000e5 +1739 1 1 48 0.65536000000000000000e5 +1739 1 2 25 0.65536000000000000000e5 +1739 1 8 23 -0.13107200000000000000e6 +1739 2 2 3 0.65536000000000000000e5 +1739 3 1 38 0.65536000000000000000e5 +1739 3 2 23 0.65536000000000000000e5 +1739 4 2 2 -0.13107200000000000000e6 +1740 1 1 48 0.13107200000000000000e6 +1740 1 2 5 0.65536000000000000000e5 +1740 1 2 9 0.13107200000000000000e6 +1740 1 2 25 -0.65536000000000000000e5 +1740 1 2 33 0.52428800000000000000e6 +1740 1 2 49 0.13107200000000000000e6 +1740 1 3 34 -0.52428800000000000000e6 +1740 1 4 11 -0.13107200000000000000e6 +1740 1 8 39 0.13107200000000000000e6 +1740 1 9 40 0.13107200000000000000e6 +1740 1 10 41 0.26214400000000000000e6 +1740 1 11 42 -0.26214400000000000000e6 +1740 1 12 43 -0.10485760000000000000e7 +1740 1 23 38 0.13107200000000000000e6 +1740 1 26 41 -0.13107200000000000000e6 +1740 1 28 43 0.52428800000000000000e6 +1740 1 32 47 0.78643200000000000000e6 +1740 1 33 48 0.26214400000000000000e6 +1740 2 2 4 0.65536000000000000000e5 +1740 2 2 8 0.13107200000000000000e6 +1740 2 2 32 0.13107200000000000000e6 +1740 2 3 9 -0.13107200000000000000e6 +1740 2 3 17 -0.65536000000000000000e5 +1740 2 7 21 0.26214400000000000000e6 +1740 2 12 26 0.26214400000000000000e6 +1740 2 16 30 0.13107200000000000000e6 +1740 2 20 34 0.26214400000000000000e6 +1740 3 1 6 0.65536000000000000000e5 +1740 3 1 14 -0.26214400000000000000e6 +1740 3 1 30 -0.13107200000000000000e6 +1740 3 2 3 0.65536000000000000000e5 +1740 3 2 15 0.26214400000000000000e6 +1740 3 3 32 0.52428800000000000000e6 +1740 3 4 9 -0.13107200000000000000e6 +1740 3 8 37 0.13107200000000000000e6 +1740 3 10 23 -0.26214400000000000000e6 +1740 3 13 42 0.52428800000000000000e6 +1740 3 22 35 0.52428800000000000000e6 +1740 3 28 41 0.78643200000000000000e6 +1740 3 29 42 0.26214400000000000000e6 +1740 4 2 30 0.13107200000000000000e6 +1740 4 3 31 -0.26214400000000000000e6 +1740 4 6 18 -0.13107200000000000000e6 +1740 4 6 34 0.26214400000000000000e6 +1741 1 1 40 0.65536000000000000000e5 +1741 1 2 49 0.65536000000000000000e5 +1741 1 6 37 0.65536000000000000000e5 +1741 1 8 39 -0.13107200000000000000e6 +1741 2 2 5 0.65536000000000000000e5 +1741 3 2 39 0.65536000000000000000e5 +1741 4 1 5 -0.65536000000000000000e5 +1741 4 4 16 -0.65536000000000000000e5 +1742 2 1 7 -0.65536000000000000000e5 +1742 2 2 6 0.65536000000000000000e5 +1743 1 1 8 -0.65536000000000000000e5 +1743 1 1 32 -0.26214400000000000000e6 +1743 1 1 48 0.98304000000000000000e5 +1743 1 2 9 -0.65536000000000000000e5 +1743 1 2 33 0.52428800000000000000e6 +1743 1 2 49 0.98304000000000000000e5 +1743 1 3 34 -0.52428800000000000000e6 +1743 1 4 11 -0.65536000000000000000e5 +1743 1 8 23 0.13107200000000000000e6 +1743 1 8 39 0.65536000000000000000e5 +1743 1 9 40 0.65536000000000000000e5 +1743 1 10 41 0.26214400000000000000e6 +1743 1 11 42 -0.26214400000000000000e6 +1743 1 12 27 0.26214400000000000000e6 +1743 1 12 43 -0.78643200000000000000e6 +1743 1 23 38 0.98304000000000000000e5 +1743 1 26 41 -0.65536000000000000000e5 +1743 1 28 43 0.39321600000000000000e6 +1743 1 32 47 0.52428800000000000000e6 +1743 1 33 48 0.26214400000000000000e6 +1743 2 1 7 -0.65536000000000000000e5 +1743 2 2 7 0.65536000000000000000e5 +1743 2 2 8 0.65536000000000000000e5 +1743 2 2 32 0.98304000000000000000e5 +1743 2 3 9 -0.65536000000000000000e5 +1743 2 6 20 -0.13107200000000000000e6 +1743 2 7 21 0.26214400000000000000e6 +1743 2 12 26 0.26214400000000000000e6 +1743 2 16 30 0.65536000000000000000e5 +1743 2 20 34 0.13107200000000000000e6 +1743 3 1 14 -0.26214400000000000000e6 +1743 3 1 30 -0.13107200000000000000e6 +1743 3 2 7 -0.13107200000000000000e6 +1743 3 2 15 0.13107200000000000000e6 +1743 3 3 32 0.39321600000000000000e6 +1743 3 4 9 -0.65536000000000000000e5 +1743 3 7 12 0.26214400000000000000e6 +1743 3 8 37 0.13107200000000000000e6 +1743 3 10 23 -0.19660800000000000000e6 +1743 3 13 42 0.52428800000000000000e6 +1743 3 22 35 0.26214400000000000000e6 +1743 3 28 41 0.52428800000000000000e6 +1743 3 29 42 0.26214400000000000000e6 +1743 4 2 6 -0.13107200000000000000e6 +1743 4 2 30 0.65536000000000000000e5 +1743 4 3 31 -0.26214400000000000000e6 +1743 4 6 6 -0.26214400000000000000e6 +1743 4 6 18 -0.13107200000000000000e6 +1743 4 6 34 0.13107200000000000000e6 +1744 1 1 48 -0.32768000000000000000e5 +1744 1 2 9 -0.65536000000000000000e5 +1744 1 2 33 -0.26214400000000000000e6 +1744 1 2 49 -0.32768000000000000000e5 +1744 1 3 34 0.26214400000000000000e6 +1744 1 8 39 -0.65536000000000000000e5 +1744 1 9 40 -0.65536000000000000000e5 +1744 1 12 43 0.26214400000000000000e6 +1744 1 23 38 -0.32768000000000000000e5 +1744 1 26 41 0.65536000000000000000e5 +1744 1 28 43 -0.13107200000000000000e6 +1744 1 32 47 -0.26214400000000000000e6 +1744 2 2 8 -0.65536000000000000000e5 +1744 2 2 9 0.65536000000000000000e5 +1744 2 2 32 -0.32768000000000000000e5 +1744 2 4 10 0.13107200000000000000e6 +1744 2 7 21 -0.26214400000000000000e6 +1744 2 16 30 -0.65536000000000000000e5 +1744 2 20 34 -0.13107200000000000000e6 +1744 3 1 14 0.26214400000000000000e6 +1744 3 2 15 0.13107200000000000000e6 +1744 3 3 16 -0.26214400000000000000e6 +1744 3 3 32 -0.13107200000000000000e6 +1744 3 4 9 0.65536000000000000000e5 +1744 3 10 23 0.65536000000000000000e5 +1744 3 22 35 -0.26214400000000000000e6 +1744 3 28 41 -0.26214400000000000000e6 +1744 4 2 30 -0.65536000000000000000e5 +1744 4 6 34 -0.13107200000000000000e6 +1745 2 2 10 0.65536000000000000000e5 +1745 2 6 20 -0.65536000000000000000e5 +1745 4 6 6 -0.13107200000000000000e6 +1746 1 1 32 0.65536000000000000000e5 +1746 1 1 48 -0.32768000000000000000e5 +1746 1 2 17 -0.13107200000000000000e6 +1746 1 2 33 -0.13107200000000000000e6 +1746 1 2 49 -0.32768000000000000000e5 +1746 1 3 34 0.26214400000000000000e6 +1746 1 4 11 0.32768000000000000000e5 +1746 1 8 23 -0.32768000000000000000e5 +1746 1 8 39 -0.32768000000000000000e5 +1746 1 9 40 -0.32768000000000000000e5 +1746 1 10 41 -0.13107200000000000000e6 +1746 1 11 42 0.65536000000000000000e5 +1746 1 12 43 0.26214400000000000000e6 +1746 1 23 38 -0.32768000000000000000e5 +1746 1 26 41 0.32768000000000000000e5 +1746 1 28 43 -0.13107200000000000000e6 +1746 1 32 47 -0.19660800000000000000e6 +1746 1 33 48 -0.65536000000000000000e5 +1746 2 2 8 -0.32768000000000000000e5 +1746 2 2 11 0.65536000000000000000e5 +1746 2 2 32 -0.32768000000000000000e5 +1746 2 3 9 0.32768000000000000000e5 +1746 2 4 10 -0.65536000000000000000e5 +1746 2 7 21 -0.65536000000000000000e5 +1746 2 12 26 -0.65536000000000000000e5 +1746 2 16 30 -0.32768000000000000000e5 +1746 2 20 34 -0.65536000000000000000e5 +1746 3 1 14 0.65536000000000000000e5 +1746 3 1 30 0.32768000000000000000e5 +1746 3 2 7 0.32768000000000000000e5 +1746 3 2 15 -0.13107200000000000000e6 +1746 3 3 16 0.13107200000000000000e6 +1746 3 3 32 -0.19660800000000000000e6 +1746 3 4 9 0.32768000000000000000e5 +1746 3 8 37 -0.32768000000000000000e5 +1746 3 10 23 0.65536000000000000000e5 +1746 3 13 42 -0.13107200000000000000e6 +1746 3 22 35 -0.13107200000000000000e6 +1746 3 28 41 -0.19660800000000000000e6 +1746 3 29 42 -0.65536000000000000000e5 +1746 4 2 6 0.32768000000000000000e5 +1746 4 2 30 -0.32768000000000000000e5 +1746 4 3 31 0.65536000000000000000e5 +1746 4 6 18 0.32768000000000000000e5 +1746 4 6 34 -0.65536000000000000000e5 +1747 2 2 12 0.65536000000000000000e5 +1747 2 4 10 -0.65536000000000000000e5 +1748 1 3 34 0.65536000000000000000e5 +1748 1 4 35 -0.65536000000000000000e5 +1748 1 12 27 0.65536000000000000000e5 +1748 1 12 43 -0.65536000000000000000e5 +1748 1 14 45 -0.13107200000000000000e6 +1748 1 16 23 0.65536000000000000000e5 +1748 1 16 31 -0.26214400000000000000e6 +1748 1 17 48 0.65536000000000000000e5 +1748 1 18 49 0.65536000000000000000e5 +1748 1 20 27 0.26214400000000000000e6 +1748 2 2 13 0.65536000000000000000e5 +1748 2 7 13 0.13107200000000000000e6 +1748 2 9 23 -0.65536000000000000000e5 +1748 2 10 24 -0.13107200000000000000e6 +1748 2 14 28 0.65536000000000000000e5 +1748 3 5 34 -0.65536000000000000000e5 +1748 3 13 42 0.65536000000000000000e5 +1748 3 14 27 -0.65536000000000000000e5 +1748 3 14 43 0.65536000000000000000e5 +1748 4 1 13 -0.65536000000000000000e5 +1748 4 10 10 -0.26214400000000000000e6 +1749 2 2 14 0.65536000000000000000e5 +1749 2 6 12 -0.65536000000000000000e5 +1750 2 2 15 0.65536000000000000000e5 +1750 2 7 13 -0.65536000000000000000e5 +1751 1 1 24 0.65536000000000000000e5 +1751 1 1 48 0.65536000000000000000e5 +1751 1 2 25 0.65536000000000000000e5 +1751 1 8 23 -0.13107200000000000000e6 +1751 2 2 17 0.65536000000000000000e5 +1751 3 1 38 0.65536000000000000000e5 +1751 3 2 23 0.65536000000000000000e5 +1752 2 2 18 0.65536000000000000000e5 +1752 2 3 17 -0.65536000000000000000e5 +1753 1 1 40 0.65536000000000000000e5 +1753 1 2 49 0.65536000000000000000e5 +1753 1 6 37 0.65536000000000000000e5 +1753 1 8 39 -0.13107200000000000000e6 +1753 2 2 19 0.65536000000000000000e5 +1753 3 2 39 0.65536000000000000000e5 +1753 4 4 16 -0.65536000000000000000e5 +1754 1 1 8 -0.65536000000000000000e5 +1754 1 1 32 -0.26214400000000000000e6 +1754 1 1 48 0.98304000000000000000e5 +1754 1 2 9 -0.65536000000000000000e5 +1754 1 2 33 0.52428800000000000000e6 +1754 1 2 49 0.98304000000000000000e5 +1754 1 3 34 -0.52428800000000000000e6 +1754 1 4 11 -0.65536000000000000000e5 +1754 1 8 23 0.13107200000000000000e6 +1754 1 8 39 0.65536000000000000000e5 +1754 1 9 40 0.65536000000000000000e5 +1754 1 10 41 0.26214400000000000000e6 +1754 1 11 42 -0.26214400000000000000e6 +1754 1 12 27 0.26214400000000000000e6 +1754 1 12 43 -0.78643200000000000000e6 +1754 1 23 38 0.98304000000000000000e5 +1754 1 26 41 -0.65536000000000000000e5 +1754 1 28 43 0.39321600000000000000e6 +1754 1 32 47 0.52428800000000000000e6 +1754 1 33 48 0.26214400000000000000e6 +1754 2 1 7 -0.65536000000000000000e5 +1754 2 2 8 0.65536000000000000000e5 +1754 2 2 20 0.65536000000000000000e5 +1754 2 2 32 0.98304000000000000000e5 +1754 2 3 9 -0.65536000000000000000e5 +1754 2 6 20 -0.13107200000000000000e6 +1754 2 7 21 0.26214400000000000000e6 +1754 2 12 26 0.26214400000000000000e6 +1754 2 16 30 0.65536000000000000000e5 +1754 2 20 34 0.13107200000000000000e6 +1754 3 1 14 -0.26214400000000000000e6 +1754 3 1 30 -0.13107200000000000000e6 +1754 3 2 7 -0.13107200000000000000e6 +1754 3 2 15 0.13107200000000000000e6 +1754 3 3 32 0.39321600000000000000e6 +1754 3 4 9 -0.65536000000000000000e5 +1754 3 7 12 0.26214400000000000000e6 +1754 3 8 37 0.13107200000000000000e6 +1754 3 10 23 -0.19660800000000000000e6 +1754 3 13 42 0.52428800000000000000e6 +1754 3 22 35 0.26214400000000000000e6 +1754 3 28 41 0.52428800000000000000e6 +1754 3 29 42 0.26214400000000000000e6 +1754 4 2 6 -0.65536000000000000000e5 +1754 4 2 30 0.65536000000000000000e5 +1754 4 3 31 -0.26214400000000000000e6 +1754 4 6 6 -0.26214400000000000000e6 +1754 4 6 18 -0.13107200000000000000e6 +1754 4 6 34 0.13107200000000000000e6 +1755 1 1 48 0.32768000000000000000e5 +1755 1 2 33 0.26214400000000000000e6 +1755 1 2 49 0.32768000000000000000e5 +1755 1 3 34 -0.26214400000000000000e6 +1755 1 8 23 0.65536000000000000000e5 +1755 1 8 39 0.65536000000000000000e5 +1755 1 10 41 0.13107200000000000000e6 +1755 1 11 42 -0.13107200000000000000e6 +1755 1 12 43 -0.26214400000000000000e6 +1755 1 23 38 0.32768000000000000000e5 +1755 1 28 43 0.13107200000000000000e6 +1755 1 32 47 0.13107200000000000000e6 +1755 1 33 48 0.13107200000000000000e6 +1755 2 2 21 0.65536000000000000000e5 +1755 2 2 32 0.32768000000000000000e5 +1755 2 7 21 0.13107200000000000000e6 +1755 2 12 26 0.13107200000000000000e6 +1755 3 3 32 0.13107200000000000000e6 +1755 3 8 37 0.65536000000000000000e5 +1755 3 10 23 -0.65536000000000000000e5 +1755 3 13 42 0.26214400000000000000e6 +1755 3 28 41 0.13107200000000000000e6 +1755 3 29 42 0.13107200000000000000e6 +1755 4 3 31 -0.13107200000000000000e6 +1755 4 6 18 -0.65536000000000000000e5 +1756 1 9 40 -0.65536000000000000000e5 +1756 1 10 41 0.13107200000000000000e6 +1756 1 11 42 -0.13107200000000000000e6 +1756 1 26 41 0.65536000000000000000e5 +1756 1 32 47 -0.13107200000000000000e6 +1756 1 33 48 0.13107200000000000000e6 +1756 2 2 22 0.65536000000000000000e5 +1756 2 12 26 0.13107200000000000000e6 +1756 2 16 30 -0.65536000000000000000e5 +1756 2 20 34 -0.13107200000000000000e6 +1756 3 8 37 0.65536000000000000000e5 +1756 3 13 42 0.26214400000000000000e6 +1756 3 22 35 -0.26214400000000000000e6 +1756 3 28 41 -0.13107200000000000000e6 +1756 3 29 42 0.13107200000000000000e6 +1756 4 2 30 -0.65536000000000000000e5 +1756 4 3 31 -0.13107200000000000000e6 +1756 4 6 18 -0.65536000000000000000e5 +1756 4 6 34 -0.13107200000000000000e6 +1757 1 1 32 0.65536000000000000000e5 +1757 1 3 34 0.13107200000000000000e6 +1757 1 10 41 -0.65536000000000000000e5 +1757 1 16 23 -0.13107200000000000000e6 +1757 2 2 23 0.65536000000000000000e5 +1757 2 7 21 -0.65536000000000000000e5 +1757 3 3 32 -0.65536000000000000000e5 +1758 2 2 24 0.65536000000000000000e5 +1758 2 7 21 -0.65536000000000000000e5 +1759 1 3 18 -0.65536000000000000000e5 +1759 1 3 34 0.65536000000000000000e5 +1759 1 4 19 0.13107200000000000000e6 +1759 1 4 35 0.65536000000000000000e5 +1759 1 12 43 0.19660800000000000000e6 +1759 1 14 45 0.13107200000000000000e6 +1759 1 16 23 0.65536000000000000000e5 +1759 1 17 48 -0.65536000000000000000e5 +1759 1 18 49 -0.65536000000000000000e5 +1759 1 20 27 -0.26214400000000000000e6 +1759 2 2 25 0.65536000000000000000e5 +1759 2 9 23 0.65536000000000000000e5 +1759 2 10 24 0.13107200000000000000e6 +1759 2 14 28 -0.65536000000000000000e5 +1759 3 3 16 -0.65536000000000000000e5 +1759 3 4 17 -0.65536000000000000000e5 +1759 3 5 34 0.65536000000000000000e5 +1759 3 13 42 -0.65536000000000000000e5 +1759 3 14 27 0.19660800000000000000e6 +1759 3 14 43 -0.65536000000000000000e5 +1759 4 2 14 -0.65536000000000000000e5 +1760 1 1 48 0.65536000000000000000e5 +1760 1 7 38 -0.13107200000000000000e6 +1760 1 22 37 0.65536000000000000000e5 +1760 1 23 38 0.65536000000000000000e5 +1760 2 2 26 0.65536000000000000000e5 +1760 3 22 27 0.13107200000000000000e6 +1760 4 16 16 -0.13107200000000000000e6 +1761 1 1 40 0.65536000000000000000e5 +1761 1 23 38 -0.65536000000000000000e5 +1761 2 2 27 0.65536000000000000000e5 +1761 2 2 32 -0.65536000000000000000e5 +1761 3 1 38 0.65536000000000000000e5 +1761 3 2 39 0.65536000000000000000e5 +1761 3 8 37 -0.13107200000000000000e6 +1762 1 1 40 0.65536000000000000000e5 +1762 1 2 49 0.65536000000000000000e5 +1762 1 6 37 0.65536000000000000000e5 +1762 1 8 39 -0.13107200000000000000e6 +1762 2 2 28 0.65536000000000000000e5 +1762 3 2 39 0.65536000000000000000e5 +1763 1 1 48 0.32768000000000000000e5 +1763 1 2 33 0.13107200000000000000e6 +1763 1 2 49 0.32768000000000000000e5 +1763 1 3 34 -0.26214400000000000000e6 +1763 1 7 38 0.65536000000000000000e5 +1763 1 8 39 0.65536000000000000000e5 +1763 1 10 41 0.13107200000000000000e6 +1763 1 23 38 0.32768000000000000000e5 +1763 2 2 29 0.65536000000000000000e5 +1763 2 2 32 0.32768000000000000000e5 +1763 2 7 21 0.13107200000000000000e6 +1763 3 2 31 0.13107200000000000000e6 +1763 3 3 32 0.13107200000000000000e6 +1763 3 8 37 0.65536000000000000000e5 +1764 1 9 40 -0.65536000000000000000e5 +1764 1 10 41 0.13107200000000000000e6 +1764 1 11 42 -0.13107200000000000000e6 +1764 1 26 41 0.65536000000000000000e5 +1764 1 32 47 -0.13107200000000000000e6 +1764 1 33 48 0.13107200000000000000e6 +1764 2 2 30 0.65536000000000000000e5 +1764 2 12 26 0.13107200000000000000e6 +1764 2 16 30 -0.65536000000000000000e5 +1764 2 20 34 -0.13107200000000000000e6 +1764 3 8 37 0.65536000000000000000e5 +1764 3 13 42 0.26214400000000000000e6 +1764 3 22 35 -0.26214400000000000000e6 +1764 3 28 41 -0.13107200000000000000e6 +1764 3 29 42 0.13107200000000000000e6 +1764 4 2 30 -0.65536000000000000000e5 +1764 4 3 31 -0.13107200000000000000e6 +1764 4 6 34 -0.13107200000000000000e6 +1765 1 2 33 -0.65536000000000000000e5 +1765 1 3 34 0.13107200000000000000e6 +1765 1 11 42 0.65536000000000000000e5 +1765 1 12 43 0.13107200000000000000e6 +1765 1 16 47 -0.13107200000000000000e6 +1765 1 28 43 -0.65536000000000000000e5 +1765 1 32 47 -0.65536000000000000000e5 +1765 1 33 48 -0.65536000000000000000e5 +1765 2 2 31 0.65536000000000000000e5 +1765 2 7 21 -0.65536000000000000000e5 +1765 2 12 26 -0.65536000000000000000e5 +1765 3 2 31 -0.65536000000000000000e5 +1765 3 3 32 -0.65536000000000000000e5 +1765 3 12 41 -0.13107200000000000000e6 +1765 3 13 42 -0.13107200000000000000e6 +1765 3 28 41 -0.65536000000000000000e5 +1765 3 29 42 -0.65536000000000000000e5 +1765 4 3 31 0.65536000000000000000e5 +1766 1 2 49 0.65536000000000000000e5 +1766 1 8 39 -0.13107200000000000000e6 +1766 1 9 40 -0.13107200000000000000e6 +1766 1 10 41 0.26214400000000000000e6 +1766 1 23 38 0.65536000000000000000e5 +1766 1 24 39 0.65536000000000000000e5 +1766 1 26 41 0.13107200000000000000e6 +1766 1 32 47 -0.26214400000000000000e6 +1766 2 2 33 0.65536000000000000000e5 +1766 3 9 38 -0.13107200000000000000e6 +1766 3 28 41 -0.26214400000000000000e6 +1766 4 2 30 -0.13107200000000000000e6 +1767 2 2 34 0.65536000000000000000e5 +1767 2 16 30 -0.65536000000000000000e5 +1768 1 2 49 0.65536000000000000000e5 +1768 1 6 53 -0.13107200000000000000e6 +1768 1 8 39 -0.13107200000000000000e6 +1768 1 9 40 -0.13107200000000000000e6 +1768 1 10 41 0.26214400000000000000e6 +1768 1 23 38 0.65536000000000000000e5 +1768 1 24 39 0.65536000000000000000e5 +1768 1 25 40 0.13107200000000000000e6 +1768 1 26 41 0.13107200000000000000e6 +1768 1 32 47 -0.26214400000000000000e6 +1768 2 2 35 0.65536000000000000000e5 +1768 3 2 47 -0.65536000000000000000e5 +1768 3 9 38 -0.13107200000000000000e6 +1768 3 24 37 -0.13107200000000000000e6 +1768 3 25 38 0.65536000000000000000e5 +1768 3 27 40 -0.39321600000000000000e6 +1768 4 2 30 -0.13107200000000000000e6 +1768 4 4 32 0.13107200000000000000e6 +1768 4 16 28 -0.65536000000000000000e5 +1768 4 17 29 -0.13107200000000000000e6 +1769 1 1 48 0.65536000000000000000e5 +1769 1 2 5 0.32768000000000000000e5 +1769 1 2 9 0.65536000000000000000e5 +1769 1 2 25 -0.32768000000000000000e5 +1769 1 2 33 0.26214400000000000000e6 +1769 1 2 49 0.65536000000000000000e5 +1769 1 3 34 -0.26214400000000000000e6 +1769 1 4 11 -0.65536000000000000000e5 +1769 1 8 39 0.65536000000000000000e5 +1769 1 9 40 0.65536000000000000000e5 +1769 1 10 41 0.13107200000000000000e6 +1769 1 11 42 -0.13107200000000000000e6 +1769 1 12 43 -0.52428800000000000000e6 +1769 1 23 38 0.65536000000000000000e5 +1769 1 26 41 -0.65536000000000000000e5 +1769 1 28 43 0.26214400000000000000e6 +1769 1 32 47 0.39321600000000000000e6 +1769 1 33 48 0.13107200000000000000e6 +1769 2 2 8 0.65536000000000000000e5 +1769 2 2 32 0.65536000000000000000e5 +1769 2 3 3 0.65536000000000000000e5 +1769 2 3 9 -0.65536000000000000000e5 +1769 2 3 17 -0.32768000000000000000e5 +1769 2 7 21 0.13107200000000000000e6 +1769 2 12 26 0.13107200000000000000e6 +1769 2 16 30 0.65536000000000000000e5 +1769 2 20 34 0.13107200000000000000e6 +1769 3 1 6 0.32768000000000000000e5 +1769 3 1 14 -0.13107200000000000000e6 +1769 3 1 30 -0.65536000000000000000e5 +1769 3 2 3 0.32768000000000000000e5 +1769 3 2 15 0.13107200000000000000e6 +1769 3 3 32 0.26214400000000000000e6 +1769 3 4 9 -0.65536000000000000000e5 +1769 3 8 37 0.65536000000000000000e5 +1769 3 10 23 -0.13107200000000000000e6 +1769 3 13 42 0.26214400000000000000e6 +1769 3 22 35 0.26214400000000000000e6 +1769 3 28 41 0.39321600000000000000e6 +1769 3 29 42 0.13107200000000000000e6 +1769 4 2 30 0.65536000000000000000e5 +1769 4 3 31 -0.13107200000000000000e6 +1769 4 6 18 -0.65536000000000000000e5 +1769 4 6 34 0.13107200000000000000e6 +1770 1 1 40 0.65536000000000000000e5 +1770 1 2 49 0.65536000000000000000e5 +1770 1 6 37 0.65536000000000000000e5 +1770 1 8 39 -0.13107200000000000000e6 +1770 2 3 4 0.65536000000000000000e5 +1770 3 2 39 0.65536000000000000000e5 +1770 4 1 5 -0.65536000000000000000e5 +1770 4 4 16 -0.65536000000000000000e5 +1771 1 1 48 0.65536000000000000000e5 +1771 1 2 5 -0.65536000000000000000e5 +1771 1 2 25 0.65536000000000000000e5 +1771 1 2 49 0.65536000000000000000e5 +1771 1 4 11 -0.13107200000000000000e6 +1771 1 9 40 0.13107200000000000000e6 +1771 1 12 43 -0.52428800000000000000e6 +1771 1 23 38 0.65536000000000000000e5 +1771 1 26 41 -0.13107200000000000000e6 +1771 1 28 43 0.26214400000000000000e6 +1771 1 32 47 0.52428800000000000000e6 +1771 2 2 32 0.65536000000000000000e5 +1771 2 3 5 0.65536000000000000000e5 +1771 2 3 9 -0.13107200000000000000e6 +1771 2 4 18 -0.65536000000000000000e5 +1771 2 16 30 0.13107200000000000000e6 +1771 2 20 34 0.26214400000000000000e6 +1771 3 1 30 -0.13107200000000000000e6 +1771 3 2 15 0.26214400000000000000e6 +1771 3 3 32 0.26214400000000000000e6 +1771 3 4 5 0.65536000000000000000e5 +1771 3 4 9 -0.26214400000000000000e6 +1771 3 10 23 -0.13107200000000000000e6 +1771 3 22 35 0.52428800000000000000e6 +1771 3 28 41 0.52428800000000000000e6 +1771 4 1 5 -0.65536000000000000000e5 +1771 4 2 30 0.13107200000000000000e6 +1771 4 6 34 0.26214400000000000000e6 +1772 1 1 8 -0.65536000000000000000e5 +1772 1 1 32 -0.26214400000000000000e6 +1772 1 1 48 0.98304000000000000000e5 +1772 1 2 9 -0.65536000000000000000e5 +1772 1 2 33 0.52428800000000000000e6 +1772 1 2 49 0.98304000000000000000e5 +1772 1 3 34 -0.52428800000000000000e6 +1772 1 4 11 -0.65536000000000000000e5 +1772 1 8 23 0.13107200000000000000e6 +1772 1 8 39 0.65536000000000000000e5 +1772 1 9 40 0.65536000000000000000e5 +1772 1 10 41 0.26214400000000000000e6 +1772 1 11 42 -0.26214400000000000000e6 +1772 1 12 27 0.26214400000000000000e6 +1772 1 12 43 -0.78643200000000000000e6 +1772 1 23 38 0.98304000000000000000e5 +1772 1 26 41 -0.65536000000000000000e5 +1772 1 28 43 0.39321600000000000000e6 +1772 1 32 47 0.52428800000000000000e6 +1772 1 33 48 0.26214400000000000000e6 +1772 2 1 7 -0.65536000000000000000e5 +1772 2 2 8 0.65536000000000000000e5 +1772 2 2 32 0.98304000000000000000e5 +1772 2 3 6 0.65536000000000000000e5 +1772 2 3 9 -0.65536000000000000000e5 +1772 2 6 20 -0.13107200000000000000e6 +1772 2 7 21 0.26214400000000000000e6 +1772 2 12 26 0.26214400000000000000e6 +1772 2 16 30 0.65536000000000000000e5 +1772 2 20 34 0.13107200000000000000e6 +1772 3 1 14 -0.26214400000000000000e6 +1772 3 1 30 -0.13107200000000000000e6 +1772 3 2 7 -0.13107200000000000000e6 +1772 3 2 15 0.13107200000000000000e6 +1772 3 3 32 0.39321600000000000000e6 +1772 3 4 9 -0.65536000000000000000e5 +1772 3 7 12 0.26214400000000000000e6 +1772 3 8 37 0.13107200000000000000e6 +1772 3 10 23 -0.19660800000000000000e6 +1772 3 13 42 0.52428800000000000000e6 +1772 3 22 35 0.26214400000000000000e6 +1772 3 28 41 0.52428800000000000000e6 +1772 3 29 42 0.26214400000000000000e6 +1772 4 2 6 -0.13107200000000000000e6 +1772 4 2 30 0.65536000000000000000e5 +1772 4 3 31 -0.26214400000000000000e6 +1772 4 6 6 -0.26214400000000000000e6 +1772 4 6 18 -0.13107200000000000000e6 +1772 4 6 34 0.13107200000000000000e6 +1773 2 2 8 -0.65536000000000000000e5 +1773 2 3 7 0.65536000000000000000e5 +1774 1 1 48 -0.32768000000000000000e5 +1774 1 2 9 -0.65536000000000000000e5 +1774 1 2 33 -0.26214400000000000000e6 +1774 1 2 49 -0.32768000000000000000e5 +1774 1 3 34 0.26214400000000000000e6 +1774 1 8 39 -0.65536000000000000000e5 +1774 1 9 40 -0.65536000000000000000e5 +1774 1 12 43 0.26214400000000000000e6 +1774 1 23 38 -0.32768000000000000000e5 +1774 1 26 41 0.65536000000000000000e5 +1774 1 28 43 -0.13107200000000000000e6 +1774 1 32 47 -0.26214400000000000000e6 +1774 2 2 8 -0.65536000000000000000e5 +1774 2 2 32 -0.32768000000000000000e5 +1774 2 3 8 0.65536000000000000000e5 +1774 2 4 10 0.13107200000000000000e6 +1774 2 7 21 -0.26214400000000000000e6 +1774 2 16 30 -0.65536000000000000000e5 +1774 2 20 34 -0.13107200000000000000e6 +1774 3 1 14 0.26214400000000000000e6 +1774 3 2 15 0.13107200000000000000e6 +1774 3 3 16 -0.26214400000000000000e6 +1774 3 3 32 -0.13107200000000000000e6 +1774 3 4 9 0.65536000000000000000e5 +1774 3 10 23 0.65536000000000000000e5 +1774 3 22 35 -0.26214400000000000000e6 +1774 3 28 41 -0.26214400000000000000e6 +1774 4 2 30 -0.65536000000000000000e5 +1774 4 6 34 -0.13107200000000000000e6 +1775 1 1 32 0.65536000000000000000e5 +1775 1 1 48 -0.32768000000000000000e5 +1775 1 2 17 -0.13107200000000000000e6 +1775 1 2 33 -0.13107200000000000000e6 +1775 1 2 49 -0.32768000000000000000e5 +1775 1 3 34 0.26214400000000000000e6 +1775 1 4 11 0.32768000000000000000e5 +1775 1 8 23 -0.32768000000000000000e5 +1775 1 8 39 -0.32768000000000000000e5 +1775 1 9 40 -0.32768000000000000000e5 +1775 1 10 41 -0.13107200000000000000e6 +1775 1 11 42 0.65536000000000000000e5 +1775 1 12 43 0.26214400000000000000e6 +1775 1 23 38 -0.32768000000000000000e5 +1775 1 26 41 0.32768000000000000000e5 +1775 1 28 43 -0.13107200000000000000e6 +1775 1 32 47 -0.19660800000000000000e6 +1775 1 33 48 -0.65536000000000000000e5 +1775 2 2 8 -0.32768000000000000000e5 +1775 2 2 32 -0.32768000000000000000e5 +1775 2 3 9 0.32768000000000000000e5 +1775 2 3 10 0.65536000000000000000e5 +1775 2 4 10 -0.65536000000000000000e5 +1775 2 7 21 -0.65536000000000000000e5 +1775 2 12 26 -0.65536000000000000000e5 +1775 2 16 30 -0.32768000000000000000e5 +1775 2 20 34 -0.65536000000000000000e5 +1775 3 1 14 0.65536000000000000000e5 +1775 3 1 30 0.32768000000000000000e5 +1775 3 2 7 0.32768000000000000000e5 +1775 3 2 15 -0.13107200000000000000e6 +1775 3 3 16 0.13107200000000000000e6 +1775 3 3 32 -0.19660800000000000000e6 +1775 3 4 9 0.32768000000000000000e5 +1775 3 8 37 -0.32768000000000000000e5 +1775 3 10 23 0.65536000000000000000e5 +1775 3 13 42 -0.13107200000000000000e6 +1775 3 22 35 -0.13107200000000000000e6 +1775 3 28 41 -0.19660800000000000000e6 +1775 3 29 42 -0.65536000000000000000e5 +1775 4 2 6 0.32768000000000000000e5 +1775 4 2 30 -0.32768000000000000000e5 +1775 4 3 31 0.65536000000000000000e5 +1775 4 6 18 0.32768000000000000000e5 +1775 4 6 34 -0.65536000000000000000e5 +1776 2 3 11 0.65536000000000000000e5 +1776 2 4 10 -0.65536000000000000000e5 +1777 1 2 33 0.65536000000000000000e5 +1777 1 3 18 -0.13107200000000000000e6 +1777 1 6 13 0.65536000000000000000e5 +1777 1 10 41 0.65536000000000000000e5 +1777 2 3 12 0.65536000000000000000e5 +1777 2 4 10 -0.65536000000000000000e5 +1777 2 7 21 0.65536000000000000000e5 +1777 3 1 14 -0.65536000000000000000e5 +1777 3 3 16 0.13107200000000000000e6 +1777 3 3 32 0.65536000000000000000e5 +1778 2 3 13 0.65536000000000000000e5 +1778 2 6 12 -0.65536000000000000000e5 +1779 1 3 18 0.65536000000000000000e5 +1779 1 3 34 0.65536000000000000000e5 +1779 1 4 19 -0.13107200000000000000e6 +1779 1 4 35 0.65536000000000000000e5 +1779 2 3 14 0.65536000000000000000e5 +1779 3 3 16 0.65536000000000000000e5 +1779 3 4 17 0.65536000000000000000e5 +1780 1 2 17 0.32768000000000000000e5 +1780 1 3 18 0.32768000000000000000e5 +1780 1 3 34 0.32768000000000000000e5 +1780 1 4 19 0.65536000000000000000e5 +1780 1 10 17 0.65536000000000000000e5 +1780 1 20 27 -0.13107200000000000000e6 +1780 2 3 15 0.65536000000000000000e5 +1780 2 6 12 0.32768000000000000000e5 +1780 3 3 16 0.32768000000000000000e5 +1780 3 7 20 -0.13107200000000000000e6 +1781 1 1 24 0.65536000000000000000e5 +1781 1 1 48 0.65536000000000000000e5 +1781 1 2 25 0.65536000000000000000e5 +1781 1 8 23 -0.13107200000000000000e6 +1781 2 3 16 0.65536000000000000000e5 +1781 3 1 38 0.65536000000000000000e5 +1781 3 2 23 0.65536000000000000000e5 +1782 1 1 40 0.65536000000000000000e5 +1782 1 2 49 0.65536000000000000000e5 +1782 1 6 37 0.65536000000000000000e5 +1782 1 8 39 -0.13107200000000000000e6 +1782 2 3 18 0.65536000000000000000e5 +1782 3 2 39 0.65536000000000000000e5 +1782 4 4 16 -0.65536000000000000000e5 +1783 2 3 19 0.65536000000000000000e5 +1783 2 4 18 -0.65536000000000000000e5 +1784 1 1 48 0.32768000000000000000e5 +1784 1 2 33 0.26214400000000000000e6 +1784 1 2 49 0.32768000000000000000e5 +1784 1 3 34 -0.26214400000000000000e6 +1784 1 8 23 0.65536000000000000000e5 +1784 1 8 39 0.65536000000000000000e5 +1784 1 10 41 0.13107200000000000000e6 +1784 1 11 42 -0.13107200000000000000e6 +1784 1 12 43 -0.26214400000000000000e6 +1784 1 23 38 0.32768000000000000000e5 +1784 1 28 43 0.13107200000000000000e6 +1784 1 32 47 0.13107200000000000000e6 +1784 1 33 48 0.13107200000000000000e6 +1784 2 2 32 0.32768000000000000000e5 +1784 2 3 20 0.65536000000000000000e5 +1784 2 7 21 0.13107200000000000000e6 +1784 2 12 26 0.13107200000000000000e6 +1784 3 3 32 0.13107200000000000000e6 +1784 3 8 37 0.65536000000000000000e5 +1784 3 10 23 -0.65536000000000000000e5 +1784 3 13 42 0.26214400000000000000e6 +1784 3 28 41 0.13107200000000000000e6 +1784 3 29 42 0.13107200000000000000e6 +1784 4 3 31 -0.13107200000000000000e6 +1784 4 6 18 -0.65536000000000000000e5 +1785 1 9 40 -0.65536000000000000000e5 +1785 1 10 41 0.13107200000000000000e6 +1785 1 11 42 -0.13107200000000000000e6 +1785 1 26 41 0.65536000000000000000e5 +1785 1 32 47 -0.13107200000000000000e6 +1785 1 33 48 0.13107200000000000000e6 +1785 2 3 21 0.65536000000000000000e5 +1785 2 12 26 0.13107200000000000000e6 +1785 2 16 30 -0.65536000000000000000e5 +1785 2 20 34 -0.13107200000000000000e6 +1785 3 8 37 0.65536000000000000000e5 +1785 3 13 42 0.26214400000000000000e6 +1785 3 22 35 -0.26214400000000000000e6 +1785 3 28 41 -0.13107200000000000000e6 +1785 3 29 42 0.13107200000000000000e6 +1785 4 2 30 -0.65536000000000000000e5 +1785 4 3 31 -0.13107200000000000000e6 +1785 4 6 18 -0.65536000000000000000e5 +1785 4 6 34 -0.13107200000000000000e6 +1786 1 1 48 -0.32768000000000000000e5 +1786 1 2 49 -0.32768000000000000000e5 +1786 1 9 40 -0.65536000000000000000e5 +1786 1 10 25 0.65536000000000000000e5 +1786 1 12 43 0.26214400000000000000e6 +1786 1 23 38 -0.32768000000000000000e5 +1786 1 26 41 0.65536000000000000000e5 +1786 1 28 43 -0.13107200000000000000e6 +1786 1 32 47 -0.26214400000000000000e6 +1786 2 2 32 -0.32768000000000000000e5 +1786 2 3 22 0.65536000000000000000e5 +1786 2 16 30 -0.65536000000000000000e5 +1786 2 20 34 -0.13107200000000000000e6 +1786 3 1 30 0.65536000000000000000e5 +1786 3 3 32 -0.13107200000000000000e6 +1786 3 10 23 0.65536000000000000000e5 +1786 3 22 35 -0.26214400000000000000e6 +1786 3 28 41 -0.26214400000000000000e6 +1786 4 2 30 -0.65536000000000000000e5 +1786 4 6 34 -0.13107200000000000000e6 +1787 2 3 23 0.65536000000000000000e5 +1787 2 7 21 -0.65536000000000000000e5 +1788 2 3 24 0.65536000000000000000e5 +1788 2 12 26 -0.65536000000000000000e5 +1788 4 8 20 -0.65536000000000000000e5 +1789 1 3 18 0.65536000000000000000e5 +1789 1 3 34 0.65536000000000000000e5 +1789 1 4 19 -0.13107200000000000000e6 +1789 1 4 35 0.65536000000000000000e5 +1789 2 3 25 0.65536000000000000000e5 +1789 3 3 16 0.65536000000000000000e5 +1789 3 4 17 0.65536000000000000000e5 +1789 4 2 14 0.65536000000000000000e5 +1790 1 1 40 0.65536000000000000000e5 +1790 1 23 38 -0.65536000000000000000e5 +1790 2 2 32 -0.65536000000000000000e5 +1790 2 3 26 0.65536000000000000000e5 +1790 3 1 38 0.65536000000000000000e5 +1790 3 2 39 0.65536000000000000000e5 +1790 3 8 37 -0.13107200000000000000e6 +1791 1 1 40 0.65536000000000000000e5 +1791 1 2 49 0.65536000000000000000e5 +1791 1 6 37 0.65536000000000000000e5 +1791 1 8 39 -0.13107200000000000000e6 +1791 2 3 27 0.65536000000000000000e5 +1791 3 2 39 0.65536000000000000000e5 +1792 1 6 37 0.65536000000000000000e5 +1792 1 24 39 -0.65536000000000000000e5 +1792 2 3 28 0.65536000000000000000e5 +1792 2 3 33 -0.65536000000000000000e5 +1792 3 2 39 0.65536000000000000000e5 +1792 3 3 40 0.65536000000000000000e5 +1792 3 9 38 -0.13107200000000000000e6 +1793 1 9 40 -0.65536000000000000000e5 +1793 1 10 41 0.13107200000000000000e6 +1793 1 11 42 -0.13107200000000000000e6 +1793 1 26 41 0.65536000000000000000e5 +1793 1 32 47 -0.13107200000000000000e6 +1793 1 33 48 0.13107200000000000000e6 +1793 2 3 29 0.65536000000000000000e5 +1793 2 12 26 0.13107200000000000000e6 +1793 2 16 30 -0.65536000000000000000e5 +1793 2 20 34 -0.13107200000000000000e6 +1793 3 8 37 0.65536000000000000000e5 +1793 3 13 42 0.26214400000000000000e6 +1793 3 22 35 -0.26214400000000000000e6 +1793 3 28 41 -0.13107200000000000000e6 +1793 3 29 42 0.13107200000000000000e6 +1793 4 2 30 -0.65536000000000000000e5 +1793 4 3 31 -0.13107200000000000000e6 +1793 4 6 34 -0.13107200000000000000e6 +1794 1 1 48 -0.32768000000000000000e5 +1794 1 2 49 -0.32768000000000000000e5 +1794 1 12 43 0.26214400000000000000e6 +1794 1 23 38 -0.32768000000000000000e5 +1794 1 26 41 0.65536000000000000000e5 +1794 1 28 43 -0.13107200000000000000e6 +1794 1 32 47 -0.26214400000000000000e6 +1794 2 2 32 -0.32768000000000000000e5 +1794 2 3 30 0.65536000000000000000e5 +1794 2 16 30 -0.65536000000000000000e5 +1794 2 20 34 -0.13107200000000000000e6 +1794 3 22 35 -0.26214400000000000000e6 +1794 3 28 41 -0.26214400000000000000e6 +1794 4 2 30 -0.65536000000000000000e5 +1794 4 6 34 -0.13107200000000000000e6 +1795 2 3 31 0.65536000000000000000e5 +1795 2 12 26 -0.65536000000000000000e5 +1796 1 2 49 0.65536000000000000000e5 +1796 1 8 39 -0.13107200000000000000e6 +1796 1 9 40 -0.13107200000000000000e6 +1796 1 10 41 0.26214400000000000000e6 +1796 1 23 38 0.65536000000000000000e5 +1796 1 24 39 0.65536000000000000000e5 +1796 1 26 41 0.13107200000000000000e6 +1796 1 32 47 -0.26214400000000000000e6 +1796 2 3 32 0.65536000000000000000e5 +1796 3 9 38 -0.13107200000000000000e6 +1796 3 28 41 -0.26214400000000000000e6 +1796 4 2 30 -0.13107200000000000000e6 +1797 1 1 48 -0.32768000000000000000e5 +1797 1 2 49 -0.32768000000000000000e5 +1797 1 12 43 0.26214400000000000000e6 +1797 1 23 38 -0.32768000000000000000e5 +1797 1 26 41 0.65536000000000000000e5 +1797 1 28 43 -0.13107200000000000000e6 +1797 1 32 47 -0.26214400000000000000e6 +1797 2 2 32 -0.32768000000000000000e5 +1797 2 3 34 0.65536000000000000000e5 +1797 2 16 30 -0.65536000000000000000e5 +1797 2 20 34 -0.13107200000000000000e6 +1797 3 22 35 -0.26214400000000000000e6 +1797 3 28 41 -0.26214400000000000000e6 +1797 4 6 34 -0.13107200000000000000e6 +1798 2 3 33 -0.65536000000000000000e5 +1798 2 3 35 0.65536000000000000000e5 +1798 4 16 28 0.65536000000000000000e5 +1799 1 1 48 0.32768000000000000000e5 +1799 1 2 5 -0.32768000000000000000e5 +1799 1 2 25 0.32768000000000000000e5 +1799 1 2 49 0.32768000000000000000e5 +1799 1 4 11 -0.65536000000000000000e5 +1799 1 9 40 0.65536000000000000000e5 +1799 1 12 43 -0.26214400000000000000e6 +1799 1 23 38 0.32768000000000000000e5 +1799 1 26 41 -0.65536000000000000000e5 +1799 1 28 43 0.13107200000000000000e6 +1799 1 32 47 0.26214400000000000000e6 +1799 2 2 32 0.32768000000000000000e5 +1799 2 3 9 -0.65536000000000000000e5 +1799 2 4 4 0.65536000000000000000e5 +1799 2 4 18 -0.32768000000000000000e5 +1799 2 16 30 0.65536000000000000000e5 +1799 2 20 34 0.13107200000000000000e6 +1799 3 1 30 -0.65536000000000000000e5 +1799 3 2 15 0.13107200000000000000e6 +1799 3 3 32 0.13107200000000000000e6 +1799 3 4 5 0.32768000000000000000e5 +1799 3 4 9 -0.13107200000000000000e6 +1799 3 10 23 -0.65536000000000000000e5 +1799 3 22 35 0.26214400000000000000e6 +1799 3 28 41 0.26214400000000000000e6 +1799 4 1 5 -0.32768000000000000000e5 +1799 4 2 30 0.65536000000000000000e5 +1799 4 6 34 0.13107200000000000000e6 +1800 2 4 5 0.65536000000000000000e5 +1800 2 5 27 -0.65536000000000000000e5 +1800 4 4 4 -0.13107200000000000000e6 +1800 4 5 17 -0.65536000000000000000e5 +1801 2 2 8 -0.65536000000000000000e5 +1801 2 4 6 0.65536000000000000000e5 +1802 1 1 48 -0.32768000000000000000e5 +1802 1 2 9 -0.65536000000000000000e5 +1802 1 2 33 -0.26214400000000000000e6 +1802 1 2 49 -0.32768000000000000000e5 +1802 1 3 34 0.26214400000000000000e6 +1802 1 8 39 -0.65536000000000000000e5 +1802 1 9 40 -0.65536000000000000000e5 +1802 1 12 43 0.26214400000000000000e6 +1802 1 23 38 -0.32768000000000000000e5 +1802 1 26 41 0.65536000000000000000e5 +1802 1 28 43 -0.13107200000000000000e6 +1802 1 32 47 -0.26214400000000000000e6 +1802 2 2 8 -0.65536000000000000000e5 +1802 2 2 32 -0.32768000000000000000e5 +1802 2 4 7 0.65536000000000000000e5 +1802 2 4 10 0.13107200000000000000e6 +1802 2 7 21 -0.26214400000000000000e6 +1802 2 16 30 -0.65536000000000000000e5 +1802 2 20 34 -0.13107200000000000000e6 +1802 3 1 14 0.26214400000000000000e6 +1802 3 2 15 0.13107200000000000000e6 +1802 3 3 16 -0.26214400000000000000e6 +1802 3 3 32 -0.13107200000000000000e6 +1802 3 4 9 0.65536000000000000000e5 +1802 3 10 23 0.65536000000000000000e5 +1802 3 22 35 -0.26214400000000000000e6 +1802 3 28 41 -0.26214400000000000000e6 +1802 4 2 30 -0.65536000000000000000e5 +1802 4 6 34 -0.13107200000000000000e6 +1803 2 3 9 -0.65536000000000000000e5 +1803 2 4 8 0.65536000000000000000e5 +1804 1 9 40 0.65536000000000000000e5 +1804 1 10 41 0.13107200000000000000e6 +1804 1 11 42 0.13107200000000000000e6 +1804 1 26 41 -0.65536000000000000000e5 +1804 1 32 47 -0.13107200000000000000e6 +1804 1 33 48 -0.13107200000000000000e6 +1804 2 4 9 0.65536000000000000000e5 +1804 2 4 34 -0.65536000000000000000e5 +1804 3 9 38 0.65536000000000000000e5 +1804 3 10 39 0.65536000000000000000e5 +1804 3 13 42 -0.26214400000000000000e6 +1804 3 28 41 -0.13107200000000000000e6 +1804 3 29 42 -0.13107200000000000000e6 +1804 4 3 31 0.13107200000000000000e6 +1804 4 4 8 -0.65536000000000000000e5 +1804 4 7 19 -0.65536000000000000000e5 +1805 1 2 33 0.65536000000000000000e5 +1805 1 3 18 -0.13107200000000000000e6 +1805 1 6 13 0.65536000000000000000e5 +1805 1 10 41 0.65536000000000000000e5 +1805 2 4 10 -0.65536000000000000000e5 +1805 2 4 11 0.65536000000000000000e5 +1805 2 7 21 0.65536000000000000000e5 +1805 3 1 14 -0.65536000000000000000e5 +1805 3 3 16 0.13107200000000000000e6 +1805 3 3 32 0.65536000000000000000e5 +1806 2 4 12 0.65536000000000000000e5 +1806 2 5 11 -0.65536000000000000000e5 +1807 1 3 18 0.65536000000000000000e5 +1807 1 3 34 0.65536000000000000000e5 +1807 1 4 19 -0.13107200000000000000e6 +1807 1 4 35 0.65536000000000000000e5 +1807 2 4 13 0.65536000000000000000e5 +1807 3 3 16 0.65536000000000000000e5 +1807 3 4 17 0.65536000000000000000e5 +1808 1 3 18 0.65536000000000000000e5 +1808 1 4 35 0.65536000000000000000e5 +1808 1 5 20 0.13107200000000000000e6 +1808 1 5 36 -0.13107200000000000000e6 +1808 1 10 17 -0.13107200000000000000e6 +1808 1 14 45 0.13107200000000000000e6 +1808 1 17 48 -0.65536000000000000000e5 +1808 1 18 49 -0.65536000000000000000e5 +1808 2 4 14 0.65536000000000000000e5 +1808 2 14 28 -0.65536000000000000000e5 +1808 3 5 18 -0.65536000000000000000e5 +1808 3 5 34 0.65536000000000000000e5 +1808 3 13 42 -0.65536000000000000000e5 +1808 3 14 43 -0.65536000000000000000e5 +1808 4 8 12 -0.65536000000000000000e5 +1809 1 3 18 -0.32768000000000000000e5 +1809 1 4 19 0.65536000000000000000e5 +1809 1 4 35 0.32768000000000000000e5 +1809 1 5 36 0.65536000000000000000e5 +1809 1 12 43 0.65536000000000000000e5 +1809 1 14 45 0.65536000000000000000e5 +1809 1 17 32 -0.13107200000000000000e6 +1809 1 17 48 -0.32768000000000000000e5 +1809 1 18 49 -0.32768000000000000000e5 +1809 2 4 15 0.65536000000000000000e5 +1809 2 9 23 0.32768000000000000000e5 +1809 2 14 28 -0.32768000000000000000e5 +1809 3 3 16 -0.32768000000000000000e5 +1809 3 4 17 -0.32768000000000000000e5 +1809 3 5 34 0.32768000000000000000e5 +1809 3 13 42 -0.32768000000000000000e5 +1809 3 14 27 0.65536000000000000000e5 +1809 3 14 43 -0.32768000000000000000e5 +1809 4 2 14 -0.32768000000000000000e5 +1809 4 3 15 -0.65536000000000000000e5 +1810 2 3 17 -0.65536000000000000000e5 +1810 2 4 16 0.65536000000000000000e5 +1811 1 1 40 0.65536000000000000000e5 +1811 1 2 49 0.65536000000000000000e5 +1811 1 6 37 0.65536000000000000000e5 +1811 1 8 39 -0.13107200000000000000e6 +1811 2 4 17 0.65536000000000000000e5 +1811 3 2 39 0.65536000000000000000e5 +1811 4 4 16 -0.65536000000000000000e5 +1812 2 4 19 0.65536000000000000000e5 +1812 2 5 27 -0.65536000000000000000e5 +1812 4 5 17 -0.65536000000000000000e5 +1813 1 9 40 -0.65536000000000000000e5 +1813 1 10 41 0.13107200000000000000e6 +1813 1 11 42 -0.13107200000000000000e6 +1813 1 26 41 0.65536000000000000000e5 +1813 1 32 47 -0.13107200000000000000e6 +1813 1 33 48 0.13107200000000000000e6 +1813 2 4 20 0.65536000000000000000e5 +1813 2 12 26 0.13107200000000000000e6 +1813 2 16 30 -0.65536000000000000000e5 +1813 2 20 34 -0.13107200000000000000e6 +1813 3 8 37 0.65536000000000000000e5 +1813 3 13 42 0.26214400000000000000e6 +1813 3 22 35 -0.26214400000000000000e6 +1813 3 28 41 -0.13107200000000000000e6 +1813 3 29 42 0.13107200000000000000e6 +1813 4 2 30 -0.65536000000000000000e5 +1813 4 3 31 -0.13107200000000000000e6 +1813 4 6 18 -0.65536000000000000000e5 +1813 4 6 34 -0.13107200000000000000e6 +1814 1 1 48 -0.32768000000000000000e5 +1814 1 2 49 -0.32768000000000000000e5 +1814 1 9 40 -0.65536000000000000000e5 +1814 1 10 25 0.65536000000000000000e5 +1814 1 12 43 0.26214400000000000000e6 +1814 1 23 38 -0.32768000000000000000e5 +1814 1 26 41 0.65536000000000000000e5 +1814 1 28 43 -0.13107200000000000000e6 +1814 1 32 47 -0.26214400000000000000e6 +1814 2 2 32 -0.32768000000000000000e5 +1814 2 4 21 0.65536000000000000000e5 +1814 2 16 30 -0.65536000000000000000e5 +1814 2 20 34 -0.13107200000000000000e6 +1814 3 1 30 0.65536000000000000000e5 +1814 3 3 32 -0.13107200000000000000e6 +1814 3 10 23 0.65536000000000000000e5 +1814 3 22 35 -0.26214400000000000000e6 +1814 3 28 41 -0.26214400000000000000e6 +1814 4 2 30 -0.65536000000000000000e5 +1814 4 6 34 -0.13107200000000000000e6 +1815 1 9 40 0.65536000000000000000e5 +1815 1 10 41 0.13107200000000000000e6 +1815 1 11 42 0.13107200000000000000e6 +1815 1 26 41 -0.65536000000000000000e5 +1815 1 32 47 -0.13107200000000000000e6 +1815 1 33 48 -0.13107200000000000000e6 +1815 2 4 22 0.65536000000000000000e5 +1815 2 4 34 -0.65536000000000000000e5 +1815 3 9 38 0.65536000000000000000e5 +1815 3 10 39 0.65536000000000000000e5 +1815 3 13 42 -0.26214400000000000000e6 +1815 3 28 41 -0.13107200000000000000e6 +1815 3 29 42 -0.13107200000000000000e6 +1815 4 3 31 0.13107200000000000000e6 +1815 4 7 19 -0.65536000000000000000e5 +1816 2 4 23 0.65536000000000000000e5 +1816 2 12 26 -0.65536000000000000000e5 +1816 4 8 20 -0.65536000000000000000e5 +1817 1 2 33 -0.65536000000000000000e5 +1817 1 4 35 -0.13107200000000000000e6 +1817 1 11 42 0.65536000000000000000e5 +1817 1 12 43 0.13107200000000000000e6 +1817 2 4 24 0.65536000000000000000e5 +1817 2 12 26 -0.65536000000000000000e5 +1817 3 4 33 0.65536000000000000000e5 +1817 3 14 27 0.13107200000000000000e6 +1817 4 8 20 -0.65536000000000000000e5 +1818 2 4 25 0.65536000000000000000e5 +1818 2 9 23 -0.65536000000000000000e5 +1819 1 1 40 0.65536000000000000000e5 +1819 1 2 49 0.65536000000000000000e5 +1819 1 6 37 0.65536000000000000000e5 +1819 1 8 39 -0.13107200000000000000e6 +1819 2 4 26 0.65536000000000000000e5 +1819 3 2 39 0.65536000000000000000e5 +1820 1 6 37 0.65536000000000000000e5 +1820 1 24 39 -0.65536000000000000000e5 +1820 2 3 33 -0.65536000000000000000e5 +1820 2 4 27 0.65536000000000000000e5 +1820 3 2 39 0.65536000000000000000e5 +1820 3 3 40 0.65536000000000000000e5 +1820 3 9 38 -0.13107200000000000000e6 +1821 2 4 28 0.65536000000000000000e5 +1821 2 5 27 -0.65536000000000000000e5 +1822 1 1 48 -0.32768000000000000000e5 +1822 1 2 49 -0.32768000000000000000e5 +1822 1 12 43 0.26214400000000000000e6 +1822 1 23 38 -0.32768000000000000000e5 +1822 1 26 41 0.65536000000000000000e5 +1822 1 28 43 -0.13107200000000000000e6 +1822 1 32 47 -0.26214400000000000000e6 +1822 2 2 32 -0.32768000000000000000e5 +1822 2 4 29 0.65536000000000000000e5 +1822 2 16 30 -0.65536000000000000000e5 +1822 2 20 34 -0.13107200000000000000e6 +1822 3 22 35 -0.26214400000000000000e6 +1822 3 28 41 -0.26214400000000000000e6 +1822 4 2 30 -0.65536000000000000000e5 +1822 4 6 34 -0.13107200000000000000e6 +1823 1 9 40 0.65536000000000000000e5 +1823 1 10 41 0.13107200000000000000e6 +1823 1 11 42 0.13107200000000000000e6 +1823 1 26 41 -0.65536000000000000000e5 +1823 1 32 47 -0.13107200000000000000e6 +1823 1 33 48 -0.13107200000000000000e6 +1823 2 4 30 0.65536000000000000000e5 +1823 2 4 34 -0.65536000000000000000e5 +1823 3 9 38 0.65536000000000000000e5 +1823 3 10 39 0.65536000000000000000e5 +1823 3 13 42 -0.26214400000000000000e6 +1823 3 28 41 -0.13107200000000000000e6 +1823 3 29 42 -0.13107200000000000000e6 +1823 4 3 31 0.13107200000000000000e6 +1824 1 17 48 -0.13107200000000000000e6 +1824 1 28 43 0.65536000000000000000e5 +1824 1 32 47 0.65536000000000000000e5 +1824 1 33 48 0.65536000000000000000e5 +1824 2 4 31 0.65536000000000000000e5 +1824 3 28 41 0.65536000000000000000e5 +1824 3 29 42 0.65536000000000000000e5 +1824 4 3 31 -0.65536000000000000000e5 +1825 2 3 33 -0.65536000000000000000e5 +1825 2 4 32 0.65536000000000000000e5 +1826 1 1 48 -0.65536000000000000000e5 +1826 1 2 49 -0.13107200000000000000e6 +1826 1 8 39 -0.13107200000000000000e6 +1826 1 9 40 -0.13107200000000000000e6 +1826 1 10 41 0.26214400000000000000e6 +1826 1 12 43 0.52428800000000000000e6 +1826 1 23 38 -0.65536000000000000000e5 +1826 1 25 40 0.65536000000000000000e5 +1826 1 28 43 -0.26214400000000000000e6 +1826 1 32 47 -0.52428800000000000000e6 +1826 2 2 32 -0.65536000000000000000e5 +1826 2 3 33 -0.65536000000000000000e5 +1826 2 4 33 0.65536000000000000000e5 +1826 2 16 30 -0.13107200000000000000e6 +1826 2 20 34 -0.26214400000000000000e6 +1826 3 9 38 -0.13107200000000000000e6 +1826 3 22 35 -0.52428800000000000000e6 +1826 3 28 41 -0.52428800000000000000e6 +1826 4 2 30 -0.13107200000000000000e6 +1826 4 6 34 -0.26214400000000000000e6 +1827 1 1 48 -0.65536000000000000000e5 +1827 1 2 49 -0.13107200000000000000e6 +1827 1 8 39 -0.13107200000000000000e6 +1827 1 9 40 -0.13107200000000000000e6 +1827 1 10 41 0.26214400000000000000e6 +1827 1 12 43 0.52428800000000000000e6 +1827 1 23 38 -0.65536000000000000000e5 +1827 1 25 40 0.65536000000000000000e5 +1827 1 28 43 -0.26214400000000000000e6 +1827 1 32 47 -0.52428800000000000000e6 +1827 2 2 32 -0.65536000000000000000e5 +1827 2 3 33 -0.65536000000000000000e5 +1827 2 4 35 0.65536000000000000000e5 +1827 2 16 30 -0.13107200000000000000e6 +1827 2 20 34 -0.26214400000000000000e6 +1827 3 9 38 -0.13107200000000000000e6 +1827 3 22 35 -0.52428800000000000000e6 +1827 3 28 41 -0.52428800000000000000e6 +1827 4 2 30 -0.13107200000000000000e6 +1827 4 4 32 0.65536000000000000000e5 +1827 4 6 34 -0.26214400000000000000e6 +1828 1 1 48 -0.32768000000000000000e5 +1828 1 2 5 0.32768000000000000000e5 +1828 1 2 25 -0.32768000000000000000e5 +1828 1 2 33 -0.13107200000000000000e6 +1828 1 2 49 -0.32768000000000000000e5 +1828 1 4 11 0.19660800000000000000e6 +1828 1 6 13 -0.13107200000000000000e6 +1828 1 9 40 -0.65536000000000000000e5 +1828 1 10 25 -0.13107200000000000000e6 +1828 1 10 41 -0.13107200000000000000e6 +1828 1 12 43 0.52428800000000000000e6 +1828 1 23 38 -0.32768000000000000000e5 +1828 1 26 41 0.65536000000000000000e5 +1828 1 28 43 -0.13107200000000000000e6 +1828 1 32 47 -0.26214400000000000000e6 +1828 2 2 32 -0.32768000000000000000e5 +1828 2 3 9 0.65536000000000000000e5 +1828 2 5 5 0.65536000000000000000e5 +1828 2 5 19 -0.32768000000000000000e5 +1828 2 12 26 -0.13107200000000000000e6 +1828 2 16 30 -0.65536000000000000000e5 +1828 2 20 34 -0.13107200000000000000e6 +1828 3 1 6 0.32768000000000000000e5 +1828 3 1 30 0.65536000000000000000e5 +1828 3 2 15 -0.13107200000000000000e6 +1828 3 3 32 -0.26214400000000000000e6 +1828 3 4 9 0.13107200000000000000e6 +1828 3 5 6 0.32768000000000000000e5 +1828 3 10 23 0.65536000000000000000e5 +1828 3 14 27 0.26214400000000000000e6 +1828 3 22 35 -0.26214400000000000000e6 +1828 3 28 41 -0.26214400000000000000e6 +1828 4 1 5 0.32768000000000000000e5 +1828 4 2 30 -0.65536000000000000000e5 +1828 4 4 4 -0.65536000000000000000e5 +1828 4 4 8 0.65536000000000000000e5 +1828 4 6 34 -0.13107200000000000000e6 +1828 4 8 20 -0.13107200000000000000e6 +1829 1 1 48 -0.32768000000000000000e5 +1829 1 2 9 -0.65536000000000000000e5 +1829 1 2 33 -0.26214400000000000000e6 +1829 1 2 49 -0.32768000000000000000e5 +1829 1 3 34 0.26214400000000000000e6 +1829 1 8 39 -0.65536000000000000000e5 +1829 1 9 40 -0.65536000000000000000e5 +1829 1 12 43 0.26214400000000000000e6 +1829 1 23 38 -0.32768000000000000000e5 +1829 1 26 41 0.65536000000000000000e5 +1829 1 28 43 -0.13107200000000000000e6 +1829 1 32 47 -0.26214400000000000000e6 +1829 2 2 8 -0.65536000000000000000e5 +1829 2 2 32 -0.32768000000000000000e5 +1829 2 4 10 0.13107200000000000000e6 +1829 2 5 6 0.65536000000000000000e5 +1829 2 7 21 -0.26214400000000000000e6 +1829 2 16 30 -0.65536000000000000000e5 +1829 2 20 34 -0.13107200000000000000e6 +1829 3 1 14 0.26214400000000000000e6 +1829 3 2 15 0.13107200000000000000e6 +1829 3 3 16 -0.26214400000000000000e6 +1829 3 3 32 -0.13107200000000000000e6 +1829 3 4 9 0.65536000000000000000e5 +1829 3 10 23 0.65536000000000000000e5 +1829 3 22 35 -0.26214400000000000000e6 +1829 3 28 41 -0.26214400000000000000e6 +1829 4 2 30 -0.65536000000000000000e5 +1829 4 6 34 -0.13107200000000000000e6 +1830 2 3 9 -0.65536000000000000000e5 +1830 2 5 7 0.65536000000000000000e5 +1831 1 9 40 0.65536000000000000000e5 +1831 1 10 41 0.13107200000000000000e6 +1831 1 11 42 0.13107200000000000000e6 +1831 1 26 41 -0.65536000000000000000e5 +1831 1 32 47 -0.13107200000000000000e6 +1831 1 33 48 -0.13107200000000000000e6 +1831 2 4 34 -0.65536000000000000000e5 +1831 2 5 8 0.65536000000000000000e5 +1831 3 9 38 0.65536000000000000000e5 +1831 3 10 39 0.65536000000000000000e5 +1831 3 13 42 -0.26214400000000000000e6 +1831 3 28 41 -0.13107200000000000000e6 +1831 3 29 42 -0.13107200000000000000e6 +1831 4 3 31 0.13107200000000000000e6 +1831 4 4 8 -0.65536000000000000000e5 +1831 4 7 19 -0.65536000000000000000e5 +1832 1 1 48 0.32768000000000000000e5 +1832 1 2 33 -0.13107200000000000000e6 +1832 1 2 49 0.32768000000000000000e5 +1832 1 4 11 0.65536000000000000000e5 +1832 1 4 35 -0.26214400000000000000e6 +1832 1 6 13 0.13107200000000000000e6 +1832 1 8 39 0.65536000000000000000e5 +1832 1 9 40 0.13107200000000000000e6 +1832 1 10 25 -0.65536000000000000000e5 +1832 1 11 26 0.65536000000000000000e5 +1832 1 11 42 0.13107200000000000000e6 +1832 1 23 38 0.32768000000000000000e5 +1832 1 26 41 -0.13107200000000000000e6 +1832 1 28 43 0.13107200000000000000e6 +1832 1 32 47 0.13107200000000000000e6 +1832 1 33 48 -0.13107200000000000000e6 +1832 2 2 32 0.32768000000000000000e5 +1832 2 4 34 -0.65536000000000000000e5 +1832 2 5 9 0.65536000000000000000e5 +1832 2 5 11 0.13107200000000000000e6 +1832 2 12 26 -0.13107200000000000000e6 +1832 2 16 30 0.65536000000000000000e5 +1832 2 20 34 0.13107200000000000000e6 +1832 3 2 15 0.13107200000000000000e6 +1832 3 4 17 -0.26214400000000000000e6 +1832 3 6 11 -0.65536000000000000000e5 +1832 3 9 38 0.65536000000000000000e5 +1832 3 10 11 0.13107200000000000000e6 +1832 3 10 23 -0.65536000000000000000e5 +1832 3 10 39 0.65536000000000000000e5 +1832 3 13 42 -0.26214400000000000000e6 +1832 3 14 27 0.26214400000000000000e6 +1832 3 22 35 0.26214400000000000000e6 +1832 3 28 41 0.13107200000000000000e6 +1832 3 29 42 -0.13107200000000000000e6 +1832 4 2 30 0.65536000000000000000e5 +1832 4 3 31 0.13107200000000000000e6 +1832 4 5 9 -0.65536000000000000000e5 +1832 4 6 34 0.13107200000000000000e6 +1832 4 7 19 -0.65536000000000000000e5 +1832 4 8 20 -0.13107200000000000000e6 +1833 1 2 33 0.65536000000000000000e5 +1833 1 3 18 -0.13107200000000000000e6 +1833 1 6 13 0.65536000000000000000e5 +1833 1 10 41 0.65536000000000000000e5 +1833 2 4 10 -0.65536000000000000000e5 +1833 2 5 10 0.65536000000000000000e5 +1833 2 7 21 0.65536000000000000000e5 +1833 3 1 14 -0.65536000000000000000e5 +1833 3 3 16 0.13107200000000000000e6 +1833 3 3 32 0.65536000000000000000e5 +1834 1 2 33 0.65536000000000000000e5 +1834 1 4 35 0.13107200000000000000e6 +1834 1 5 20 -0.26214400000000000000e6 +1834 1 5 36 0.26214400000000000000e6 +1834 1 10 41 -0.65536000000000000000e5 +1834 1 11 42 -0.65536000000000000000e5 +1834 1 12 43 -0.13107200000000000000e6 +1834 1 14 45 -0.26214400000000000000e6 +1834 1 17 48 0.13107200000000000000e6 +1834 1 18 49 0.13107200000000000000e6 +1834 1 26 33 0.65536000000000000000e5 +1834 1 28 43 0.65536000000000000000e5 +1834 1 32 47 0.65536000000000000000e5 +1834 1 33 48 0.65536000000000000000e5 +1834 2 5 11 -0.65536000000000000000e5 +1834 2 5 12 0.65536000000000000000e5 +1834 2 12 26 0.65536000000000000000e5 +1834 2 14 28 0.13107200000000000000e6 +1834 3 2 15 -0.65536000000000000000e5 +1834 3 4 17 0.26214400000000000000e6 +1834 3 4 33 -0.65536000000000000000e5 +1834 3 5 18 0.13107200000000000000e6 +1834 3 10 11 0.65536000000000000000e5 +1834 3 13 42 0.26214400000000000000e6 +1834 3 14 27 -0.13107200000000000000e6 +1834 3 14 43 0.13107200000000000000e6 +1834 3 28 41 0.65536000000000000000e5 +1834 3 29 42 0.65536000000000000000e5 +1834 4 3 31 -0.65536000000000000000e5 +1834 4 8 12 0.13107200000000000000e6 +1834 4 8 20 0.65536000000000000000e5 +1834 4 9 21 -0.65536000000000000000e5 +1835 1 3 18 0.65536000000000000000e5 +1835 1 4 35 0.65536000000000000000e5 +1835 1 5 20 0.13107200000000000000e6 +1835 1 5 36 -0.13107200000000000000e6 +1835 1 10 17 -0.13107200000000000000e6 +1835 1 14 45 0.13107200000000000000e6 +1835 1 17 48 -0.65536000000000000000e5 +1835 1 18 49 -0.65536000000000000000e5 +1835 2 5 13 0.65536000000000000000e5 +1835 2 14 28 -0.65536000000000000000e5 +1835 3 5 18 -0.65536000000000000000e5 +1835 3 5 34 0.65536000000000000000e5 +1835 3 13 42 -0.65536000000000000000e5 +1835 3 14 43 -0.65536000000000000000e5 +1835 4 8 12 -0.65536000000000000000e5 +1836 1 4 35 0.65536000000000000000e5 +1836 1 5 36 -0.13107200000000000000e6 +1836 1 14 45 0.13107200000000000000e6 +1836 1 15 30 0.65536000000000000000e5 +1836 1 17 48 -0.65536000000000000000e5 +1836 1 18 49 -0.65536000000000000000e5 +1836 2 5 14 0.65536000000000000000e5 +1836 2 14 28 -0.65536000000000000000e5 +1836 3 5 34 0.65536000000000000000e5 +1836 3 13 42 -0.65536000000000000000e5 +1836 3 14 43 -0.65536000000000000000e5 +1836 4 8 12 -0.65536000000000000000e5 +1837 1 3 18 0.32768000000000000000e5 +1837 1 4 35 -0.32768000000000000000e5 +1837 1 5 20 0.13107200000000000000e6 +1837 1 5 36 -0.65536000000000000000e5 +1837 1 10 17 0.13107200000000000000e6 +1837 1 11 18 0.65536000000000000000e5 +1837 1 12 43 -0.65536000000000000000e5 +1837 1 13 20 -0.26214400000000000000e6 +1837 1 14 45 -0.65536000000000000000e5 +1837 1 17 32 0.13107200000000000000e6 +1837 1 17 48 0.32768000000000000000e5 +1837 1 18 49 0.32768000000000000000e5 +1837 1 20 27 0.13107200000000000000e6 +1837 2 5 15 0.65536000000000000000e5 +1837 2 9 23 -0.32768000000000000000e5 +1837 2 11 25 0.13107200000000000000e6 +1837 2 14 28 0.32768000000000000000e5 +1837 3 3 16 0.32768000000000000000e5 +1837 3 4 17 0.32768000000000000000e5 +1837 3 5 34 -0.32768000000000000000e5 +1837 3 7 20 0.13107200000000000000e6 +1837 3 13 42 0.32768000000000000000e5 +1837 3 14 27 -0.65536000000000000000e5 +1837 3 14 43 0.32768000000000000000e5 +1837 4 2 14 0.32768000000000000000e5 +1837 4 3 15 0.65536000000000000000e5 +1837 4 10 14 0.13107200000000000000e6 +1838 1 1 40 0.65536000000000000000e5 +1838 1 2 49 0.65536000000000000000e5 +1838 1 6 37 0.65536000000000000000e5 +1838 1 8 39 -0.13107200000000000000e6 +1838 2 5 16 0.65536000000000000000e5 +1838 3 2 39 0.65536000000000000000e5 +1838 4 4 16 -0.65536000000000000000e5 +1839 2 4 18 -0.65536000000000000000e5 +1839 2 5 17 0.65536000000000000000e5 +1840 2 5 18 0.65536000000000000000e5 +1840 2 5 27 -0.65536000000000000000e5 +1840 4 5 17 -0.65536000000000000000e5 +1841 1 1 48 -0.32768000000000000000e5 +1841 1 2 49 -0.32768000000000000000e5 +1841 1 9 40 -0.65536000000000000000e5 +1841 1 10 25 0.65536000000000000000e5 +1841 1 12 43 0.26214400000000000000e6 +1841 1 23 38 -0.32768000000000000000e5 +1841 1 26 41 0.65536000000000000000e5 +1841 1 28 43 -0.13107200000000000000e6 +1841 1 32 47 -0.26214400000000000000e6 +1841 2 2 32 -0.32768000000000000000e5 +1841 2 5 20 0.65536000000000000000e5 +1841 2 16 30 -0.65536000000000000000e5 +1841 2 20 34 -0.13107200000000000000e6 +1841 3 1 30 0.65536000000000000000e5 +1841 3 3 32 -0.13107200000000000000e6 +1841 3 10 23 0.65536000000000000000e5 +1841 3 22 35 -0.26214400000000000000e6 +1841 3 28 41 -0.26214400000000000000e6 +1841 4 2 30 -0.65536000000000000000e5 +1841 4 6 34 -0.13107200000000000000e6 +1842 1 9 40 0.65536000000000000000e5 +1842 1 10 41 0.13107200000000000000e6 +1842 1 11 42 0.13107200000000000000e6 +1842 1 26 41 -0.65536000000000000000e5 +1842 1 32 47 -0.13107200000000000000e6 +1842 1 33 48 -0.13107200000000000000e6 +1842 2 4 34 -0.65536000000000000000e5 +1842 2 5 21 0.65536000000000000000e5 +1842 3 9 38 0.65536000000000000000e5 +1842 3 10 39 0.65536000000000000000e5 +1842 3 13 42 -0.26214400000000000000e6 +1842 3 28 41 -0.13107200000000000000e6 +1842 3 29 42 -0.13107200000000000000e6 +1842 4 3 31 0.13107200000000000000e6 +1842 4 7 19 -0.65536000000000000000e5 +1843 1 1 48 0.32768000000000000000e5 +1843 1 2 33 -0.13107200000000000000e6 +1843 1 2 49 0.32768000000000000000e5 +1843 1 8 39 0.65536000000000000000e5 +1843 1 9 40 0.13107200000000000000e6 +1843 1 10 41 -0.13107200000000000000e6 +1843 1 11 26 0.65536000000000000000e5 +1843 1 23 38 0.32768000000000000000e5 +1843 1 26 41 -0.13107200000000000000e6 +1843 1 28 43 0.13107200000000000000e6 +1843 1 32 47 0.13107200000000000000e6 +1843 1 33 48 -0.13107200000000000000e6 +1843 2 2 32 0.32768000000000000000e5 +1843 2 4 34 -0.65536000000000000000e5 +1843 2 5 22 0.65536000000000000000e5 +1843 2 12 26 -0.13107200000000000000e6 +1843 2 16 30 0.65536000000000000000e5 +1843 2 20 34 0.13107200000000000000e6 +1843 3 3 32 -0.13107200000000000000e6 +1843 3 4 33 -0.13107200000000000000e6 +1843 3 9 38 0.65536000000000000000e5 +1843 3 10 23 -0.65536000000000000000e5 +1843 3 10 39 0.65536000000000000000e5 +1843 3 13 42 -0.26214400000000000000e6 +1843 3 14 27 0.26214400000000000000e6 +1843 3 22 35 0.26214400000000000000e6 +1843 3 28 41 0.13107200000000000000e6 +1843 3 29 42 -0.13107200000000000000e6 +1843 4 2 30 0.65536000000000000000e5 +1843 4 3 31 0.13107200000000000000e6 +1843 4 6 34 0.13107200000000000000e6 +1843 4 7 19 -0.65536000000000000000e5 +1843 4 8 20 -0.13107200000000000000e6 +1844 1 2 33 -0.65536000000000000000e5 +1844 1 4 35 -0.13107200000000000000e6 +1844 1 11 42 0.65536000000000000000e5 +1844 1 12 43 0.13107200000000000000e6 +1844 2 5 23 0.65536000000000000000e5 +1844 2 12 26 -0.65536000000000000000e5 +1844 3 4 33 0.65536000000000000000e5 +1844 3 14 27 0.13107200000000000000e6 +1844 4 8 20 -0.65536000000000000000e5 +1845 1 10 41 -0.65536000000000000000e5 +1845 1 14 45 -0.26214400000000000000e6 +1845 1 17 48 0.13107200000000000000e6 +1845 1 18 49 0.13107200000000000000e6 +1845 1 26 33 0.65536000000000000000e5 +1845 1 28 43 0.65536000000000000000e5 +1845 1 32 47 0.65536000000000000000e5 +1845 1 33 48 0.65536000000000000000e5 +1845 2 5 24 0.65536000000000000000e5 +1845 2 14 28 0.13107200000000000000e6 +1845 3 13 42 0.26214400000000000000e6 +1845 3 14 43 0.13107200000000000000e6 +1845 3 28 41 0.65536000000000000000e5 +1845 3 29 42 0.65536000000000000000e5 +1845 4 3 31 -0.65536000000000000000e5 +1845 4 9 21 -0.65536000000000000000e5 +1846 1 4 35 0.65536000000000000000e5 +1846 1 5 36 -0.13107200000000000000e6 +1846 1 14 45 0.13107200000000000000e6 +1846 1 15 30 0.65536000000000000000e5 +1846 1 17 48 -0.65536000000000000000e5 +1846 1 18 49 -0.65536000000000000000e5 +1846 2 5 25 0.65536000000000000000e5 +1846 2 14 28 -0.65536000000000000000e5 +1846 3 5 34 0.65536000000000000000e5 +1846 3 13 42 -0.65536000000000000000e5 +1846 3 14 43 -0.65536000000000000000e5 +1847 1 6 37 0.65536000000000000000e5 +1847 1 24 39 -0.65536000000000000000e5 +1847 2 3 33 -0.65536000000000000000e5 +1847 2 5 26 0.65536000000000000000e5 +1847 3 2 39 0.65536000000000000000e5 +1847 3 3 40 0.65536000000000000000e5 +1847 3 9 38 -0.13107200000000000000e6 +1848 1 1 40 0.65536000000000000000e5 +1848 1 2 33 -0.52428800000000000000e6 +1848 1 9 40 0.26214400000000000000e6 +1848 1 10 25 -0.26214400000000000000e6 +1848 1 11 42 0.52428800000000000000e6 +1848 1 12 43 0.10485760000000000000e7 +1848 1 23 38 -0.65536000000000000000e5 +1848 1 28 43 -0.52428800000000000000e6 +1848 1 32 47 -0.52428800000000000000e6 +1848 1 33 48 -0.52428800000000000000e6 +1848 2 2 32 -0.65536000000000000000e5 +1848 2 3 17 0.65536000000000000000e5 +1848 2 5 19 -0.65536000000000000000e5 +1848 2 5 28 0.65536000000000000000e5 +1848 2 12 26 -0.52428800000000000000e6 +1848 3 1 30 0.26214400000000000000e6 +1848 3 1 38 0.65536000000000000000e5 +1848 3 2 23 0.65536000000000000000e5 +1848 3 2 39 0.65536000000000000000e5 +1848 3 3 32 -0.26214400000000000000e6 +1848 3 5 26 -0.65536000000000000000e5 +1848 3 8 37 -0.13107200000000000000e6 +1848 3 13 42 -0.10485760000000000000e7 +1848 3 14 27 0.52428800000000000000e6 +1848 3 28 41 -0.52428800000000000000e6 +1848 3 29 42 -0.52428800000000000000e6 +1848 4 3 31 0.52428800000000000000e6 +1848 4 4 16 -0.65536000000000000000e5 +1848 4 5 17 0.65536000000000000000e5 +1848 4 6 18 0.13107200000000000000e6 +1848 4 7 19 -0.13107200000000000000e6 +1848 4 8 20 -0.26214400000000000000e6 +1849 1 9 40 0.65536000000000000000e5 +1849 1 10 41 0.13107200000000000000e6 +1849 1 11 42 0.13107200000000000000e6 +1849 1 26 41 -0.65536000000000000000e5 +1849 1 32 47 -0.13107200000000000000e6 +1849 1 33 48 -0.13107200000000000000e6 +1849 2 4 34 -0.65536000000000000000e5 +1849 2 5 29 0.65536000000000000000e5 +1849 3 9 38 0.65536000000000000000e5 +1849 3 10 39 0.65536000000000000000e5 +1849 3 13 42 -0.26214400000000000000e6 +1849 3 28 41 -0.13107200000000000000e6 +1849 3 29 42 -0.13107200000000000000e6 +1849 4 3 31 0.13107200000000000000e6 +1850 2 5 30 0.65536000000000000000e5 +1850 2 28 34 -0.65536000000000000000e5 +1850 4 18 22 -0.65536000000000000000e5 +1850 4 18 30 -0.65536000000000000000e5 +1850 4 21 33 -0.65536000000000000000e5 +1851 1 10 41 -0.65536000000000000000e5 +1851 1 14 45 -0.26214400000000000000e6 +1851 1 17 48 0.13107200000000000000e6 +1851 1 18 49 0.13107200000000000000e6 +1851 1 26 33 0.65536000000000000000e5 +1851 1 28 43 0.65536000000000000000e5 +1851 1 32 47 0.65536000000000000000e5 +1851 1 33 48 0.65536000000000000000e5 +1851 2 5 31 0.65536000000000000000e5 +1851 2 14 28 0.13107200000000000000e6 +1851 3 13 42 0.26214400000000000000e6 +1851 3 14 43 0.13107200000000000000e6 +1851 3 28 41 0.65536000000000000000e5 +1851 3 29 42 0.65536000000000000000e5 +1851 4 3 31 -0.65536000000000000000e5 +1852 1 1 48 -0.65536000000000000000e5 +1852 1 2 49 -0.13107200000000000000e6 +1852 1 8 39 -0.13107200000000000000e6 +1852 1 9 40 -0.13107200000000000000e6 +1852 1 10 41 0.26214400000000000000e6 +1852 1 12 43 0.52428800000000000000e6 +1852 1 23 38 -0.65536000000000000000e5 +1852 1 25 40 0.65536000000000000000e5 +1852 1 28 43 -0.26214400000000000000e6 +1852 1 32 47 -0.52428800000000000000e6 +1852 2 2 32 -0.65536000000000000000e5 +1852 2 3 33 -0.65536000000000000000e5 +1852 2 5 32 0.65536000000000000000e5 +1852 2 16 30 -0.13107200000000000000e6 +1852 2 20 34 -0.26214400000000000000e6 +1852 3 9 38 -0.13107200000000000000e6 +1852 3 22 35 -0.52428800000000000000e6 +1852 3 28 41 -0.52428800000000000000e6 +1852 4 2 30 -0.13107200000000000000e6 +1852 4 6 34 -0.26214400000000000000e6 +1853 1 6 53 -0.65536000000000000000e5 +1853 1 25 40 0.65536000000000000000e5 +1853 2 5 33 0.65536000000000000000e5 +1853 2 5 35 -0.65536000000000000000e5 +1853 3 5 50 -0.13107200000000000000e6 +1853 3 25 38 0.65536000000000000000e5 +1853 3 26 39 0.65536000000000000000e5 +1854 2 5 34 0.65536000000000000000e5 +1854 2 28 34 -0.65536000000000000000e5 +1854 4 18 30 -0.65536000000000000000e5 +1854 4 21 33 -0.65536000000000000000e5 +1855 1 1 12 0.32768000000000000000e5 +1855 1 1 16 -0.65536000000000000000e5 +1855 1 2 33 0.32768000000000000000e5 +1855 1 3 34 -0.65536000000000000000e5 +1855 1 10 41 0.32768000000000000000e5 +1855 1 12 27 0.65536000000000000000e5 +1855 2 6 6 0.65536000000000000000e5 +1855 2 6 20 -0.32768000000000000000e5 +1855 2 7 21 0.32768000000000000000e5 +1855 3 1 14 -0.32768000000000000000e5 +1855 3 3 32 0.32768000000000000000e5 +1855 3 7 12 0.65536000000000000000e5 +1855 4 6 6 -0.65536000000000000000e5 +1856 2 6 7 0.65536000000000000000e5 +1856 2 6 20 -0.65536000000000000000e5 +1856 4 6 6 -0.13107200000000000000e6 +1857 1 1 32 0.65536000000000000000e5 +1857 1 1 48 -0.32768000000000000000e5 +1857 1 2 17 -0.13107200000000000000e6 +1857 1 2 33 -0.13107200000000000000e6 +1857 1 2 49 -0.32768000000000000000e5 +1857 1 3 34 0.26214400000000000000e6 +1857 1 4 11 0.32768000000000000000e5 +1857 1 8 23 -0.32768000000000000000e5 +1857 1 8 39 -0.32768000000000000000e5 +1857 1 9 40 -0.32768000000000000000e5 +1857 1 10 41 -0.13107200000000000000e6 +1857 1 11 42 0.65536000000000000000e5 +1857 1 12 43 0.26214400000000000000e6 +1857 1 23 38 -0.32768000000000000000e5 +1857 1 26 41 0.32768000000000000000e5 +1857 1 28 43 -0.13107200000000000000e6 +1857 1 32 47 -0.19660800000000000000e6 +1857 1 33 48 -0.65536000000000000000e5 +1857 2 2 8 -0.32768000000000000000e5 +1857 2 2 32 -0.32768000000000000000e5 +1857 2 3 9 0.32768000000000000000e5 +1857 2 4 10 -0.65536000000000000000e5 +1857 2 6 8 0.65536000000000000000e5 +1857 2 7 21 -0.65536000000000000000e5 +1857 2 12 26 -0.65536000000000000000e5 +1857 2 16 30 -0.32768000000000000000e5 +1857 2 20 34 -0.65536000000000000000e5 +1857 3 1 14 0.65536000000000000000e5 +1857 3 1 30 0.32768000000000000000e5 +1857 3 2 7 0.32768000000000000000e5 +1857 3 2 15 -0.13107200000000000000e6 +1857 3 3 16 0.13107200000000000000e6 +1857 3 3 32 -0.19660800000000000000e6 +1857 3 4 9 0.32768000000000000000e5 +1857 3 8 37 -0.32768000000000000000e5 +1857 3 10 23 0.65536000000000000000e5 +1857 3 13 42 -0.13107200000000000000e6 +1857 3 22 35 -0.13107200000000000000e6 +1857 3 28 41 -0.19660800000000000000e6 +1857 3 29 42 -0.65536000000000000000e5 +1857 4 2 6 0.32768000000000000000e5 +1857 4 2 30 -0.32768000000000000000e5 +1857 4 3 31 0.65536000000000000000e5 +1857 4 6 18 0.32768000000000000000e5 +1857 4 6 34 -0.65536000000000000000e5 +1858 2 4 10 -0.65536000000000000000e5 +1858 2 6 9 0.65536000000000000000e5 +1859 1 1 16 0.65536000000000000000e5 +1859 1 2 17 0.65536000000000000000e5 +1859 1 7 16 -0.13107200000000000000e6 +1859 1 12 27 0.65536000000000000000e5 +1859 2 6 10 0.65536000000000000000e5 +1859 3 7 12 0.65536000000000000000e5 +1860 1 3 34 0.65536000000000000000e5 +1860 1 4 35 -0.65536000000000000000e5 +1860 1 12 27 0.65536000000000000000e5 +1860 1 12 43 -0.65536000000000000000e5 +1860 1 14 45 -0.13107200000000000000e6 +1860 1 16 23 0.65536000000000000000e5 +1860 1 16 31 -0.26214400000000000000e6 +1860 1 17 48 0.65536000000000000000e5 +1860 1 18 49 0.65536000000000000000e5 +1860 1 20 27 0.26214400000000000000e6 +1860 2 6 11 0.65536000000000000000e5 +1860 2 7 13 0.13107200000000000000e6 +1860 2 9 23 -0.65536000000000000000e5 +1860 2 10 24 -0.13107200000000000000e6 +1860 2 14 28 0.65536000000000000000e5 +1860 3 5 34 -0.65536000000000000000e5 +1860 3 13 42 0.65536000000000000000e5 +1860 3 14 27 -0.65536000000000000000e5 +1860 3 14 43 0.65536000000000000000e5 +1860 4 1 13 -0.65536000000000000000e5 +1860 4 10 10 -0.26214400000000000000e6 +1861 2 1 15 -0.65536000000000000000e5 +1861 2 6 13 0.65536000000000000000e5 +1862 2 6 14 0.65536000000000000000e5 +1862 2 7 13 -0.65536000000000000000e5 +1863 1 2 17 0.65536000000000000000e5 +1863 1 3 18 0.32768000000000000000e5 +1863 1 3 34 0.32768000000000000000e5 +1863 1 4 19 0.32768000000000000000e5 +1863 1 4 35 0.32768000000000000000e5 +1863 1 7 16 0.32768000000000000000e5 +1863 1 12 19 -0.13107200000000000000e6 +1863 1 12 43 0.32768000000000000000e5 +1863 1 14 45 0.65536000000000000000e5 +1863 1 16 23 -0.32768000000000000000e5 +1863 1 16 31 0.13107200000000000000e6 +1863 1 17 48 -0.32768000000000000000e5 +1863 1 18 49 -0.32768000000000000000e5 +1863 1 20 27 -0.65536000000000000000e5 +1863 2 1 15 0.32768000000000000000e5 +1863 2 6 12 0.32768000000000000000e5 +1863 2 6 15 0.65536000000000000000e5 +1863 2 7 13 -0.32768000000000000000e5 +1863 2 9 23 0.32768000000000000000e5 +1863 2 10 24 0.65536000000000000000e5 +1863 2 14 28 -0.32768000000000000000e5 +1863 3 3 16 0.65536000000000000000e5 +1863 3 5 34 0.32768000000000000000e5 +1863 3 7 12 0.32768000000000000000e5 +1863 3 7 20 0.65536000000000000000e5 +1863 3 13 42 -0.32768000000000000000e5 +1863 3 14 27 0.32768000000000000000e5 +1863 3 14 43 -0.32768000000000000000e5 +1863 4 1 13 0.32768000000000000000e5 +1863 4 10 10 0.13107200000000000000e6 +1864 1 1 8 -0.65536000000000000000e5 +1864 1 1 48 0.65536000000000000000e5 +1864 1 2 9 -0.65536000000000000000e5 +1864 1 2 33 0.26214400000000000000e6 +1864 1 2 49 0.65536000000000000000e5 +1864 1 3 34 -0.26214400000000000000e6 +1864 1 4 11 -0.65536000000000000000e5 +1864 1 7 22 0.65536000000000000000e5 +1864 1 8 23 0.13107200000000000000e6 +1864 1 8 39 0.65536000000000000000e5 +1864 1 9 40 0.65536000000000000000e5 +1864 1 10 41 0.13107200000000000000e6 +1864 1 11 42 -0.13107200000000000000e6 +1864 1 12 43 -0.52428800000000000000e6 +1864 1 23 38 0.65536000000000000000e5 +1864 1 26 41 -0.65536000000000000000e5 +1864 1 28 43 0.26214400000000000000e6 +1864 1 32 47 0.39321600000000000000e6 +1864 1 33 48 0.13107200000000000000e6 +1864 2 1 7 -0.65536000000000000000e5 +1864 2 2 8 0.65536000000000000000e5 +1864 2 2 32 0.65536000000000000000e5 +1864 2 3 9 -0.65536000000000000000e5 +1864 2 6 16 0.65536000000000000000e5 +1864 2 7 21 0.13107200000000000000e6 +1864 2 12 26 0.13107200000000000000e6 +1864 2 16 30 0.65536000000000000000e5 +1864 2 20 34 0.13107200000000000000e6 +1864 3 1 14 -0.26214400000000000000e6 +1864 3 1 30 -0.65536000000000000000e5 +1864 3 2 7 -0.13107200000000000000e6 +1864 3 2 15 0.13107200000000000000e6 +1864 3 3 32 0.26214400000000000000e6 +1864 3 4 9 -0.65536000000000000000e5 +1864 3 7 12 0.26214400000000000000e6 +1864 3 8 37 0.65536000000000000000e5 +1864 3 10 23 -0.13107200000000000000e6 +1864 3 13 42 0.26214400000000000000e6 +1864 3 22 35 0.26214400000000000000e6 +1864 3 28 41 0.39321600000000000000e6 +1864 3 29 42 0.13107200000000000000e6 +1864 4 2 6 -0.65536000000000000000e5 +1864 4 2 30 0.65536000000000000000e5 +1864 4 3 31 -0.13107200000000000000e6 +1864 4 6 6 -0.26214400000000000000e6 +1864 4 6 18 -0.65536000000000000000e5 +1864 4 6 34 0.13107200000000000000e6 +1865 1 1 8 -0.65536000000000000000e5 +1865 1 1 32 -0.26214400000000000000e6 +1865 1 1 48 0.98304000000000000000e5 +1865 1 2 9 -0.65536000000000000000e5 +1865 1 2 33 0.52428800000000000000e6 +1865 1 2 49 0.98304000000000000000e5 +1865 1 3 34 -0.52428800000000000000e6 +1865 1 4 11 -0.65536000000000000000e5 +1865 1 8 23 0.13107200000000000000e6 +1865 1 8 39 0.65536000000000000000e5 +1865 1 9 40 0.65536000000000000000e5 +1865 1 10 41 0.26214400000000000000e6 +1865 1 11 42 -0.26214400000000000000e6 +1865 1 12 27 0.26214400000000000000e6 +1865 1 12 43 -0.78643200000000000000e6 +1865 1 23 38 0.98304000000000000000e5 +1865 1 26 41 -0.65536000000000000000e5 +1865 1 28 43 0.39321600000000000000e6 +1865 1 32 47 0.52428800000000000000e6 +1865 1 33 48 0.26214400000000000000e6 +1865 2 1 7 -0.65536000000000000000e5 +1865 2 2 8 0.65536000000000000000e5 +1865 2 2 32 0.98304000000000000000e5 +1865 2 3 9 -0.65536000000000000000e5 +1865 2 6 17 0.65536000000000000000e5 +1865 2 6 20 -0.13107200000000000000e6 +1865 2 7 21 0.26214400000000000000e6 +1865 2 12 26 0.26214400000000000000e6 +1865 2 16 30 0.65536000000000000000e5 +1865 2 20 34 0.13107200000000000000e6 +1865 3 1 14 -0.26214400000000000000e6 +1865 3 1 30 -0.13107200000000000000e6 +1865 3 2 7 -0.13107200000000000000e6 +1865 3 2 15 0.13107200000000000000e6 +1865 3 3 32 0.39321600000000000000e6 +1865 3 4 9 -0.65536000000000000000e5 +1865 3 7 12 0.26214400000000000000e6 +1865 3 8 37 0.13107200000000000000e6 +1865 3 10 23 -0.19660800000000000000e6 +1865 3 13 42 0.52428800000000000000e6 +1865 3 22 35 0.26214400000000000000e6 +1865 3 28 41 0.52428800000000000000e6 +1865 3 29 42 0.26214400000000000000e6 +1865 4 2 6 -0.65536000000000000000e5 +1865 4 2 30 0.65536000000000000000e5 +1865 4 3 31 -0.26214400000000000000e6 +1865 4 6 6 -0.26214400000000000000e6 +1865 4 6 18 -0.13107200000000000000e6 +1865 4 6 34 0.13107200000000000000e6 +1866 1 1 48 0.32768000000000000000e5 +1866 1 2 33 0.26214400000000000000e6 +1866 1 2 49 0.32768000000000000000e5 +1866 1 3 34 -0.26214400000000000000e6 +1866 1 8 23 0.65536000000000000000e5 +1866 1 8 39 0.65536000000000000000e5 +1866 1 10 41 0.13107200000000000000e6 +1866 1 11 42 -0.13107200000000000000e6 +1866 1 12 43 -0.26214400000000000000e6 +1866 1 23 38 0.32768000000000000000e5 +1866 1 28 43 0.13107200000000000000e6 +1866 1 32 47 0.13107200000000000000e6 +1866 1 33 48 0.13107200000000000000e6 +1866 2 2 32 0.32768000000000000000e5 +1866 2 6 18 0.65536000000000000000e5 +1866 2 7 21 0.13107200000000000000e6 +1866 2 12 26 0.13107200000000000000e6 +1866 3 3 32 0.13107200000000000000e6 +1866 3 8 37 0.65536000000000000000e5 +1866 3 10 23 -0.65536000000000000000e5 +1866 3 13 42 0.26214400000000000000e6 +1866 3 28 41 0.13107200000000000000e6 +1866 3 29 42 0.13107200000000000000e6 +1866 4 3 31 -0.13107200000000000000e6 +1866 4 6 18 -0.65536000000000000000e5 +1867 1 9 40 -0.65536000000000000000e5 +1867 1 10 41 0.13107200000000000000e6 +1867 1 11 42 -0.13107200000000000000e6 +1867 1 26 41 0.65536000000000000000e5 +1867 1 32 47 -0.13107200000000000000e6 +1867 1 33 48 0.13107200000000000000e6 +1867 2 6 19 0.65536000000000000000e5 +1867 2 12 26 0.13107200000000000000e6 +1867 2 16 30 -0.65536000000000000000e5 +1867 2 20 34 -0.13107200000000000000e6 +1867 3 8 37 0.65536000000000000000e5 +1867 3 13 42 0.26214400000000000000e6 +1867 3 22 35 -0.26214400000000000000e6 +1867 3 28 41 -0.13107200000000000000e6 +1867 3 29 42 0.13107200000000000000e6 +1867 4 2 30 -0.65536000000000000000e5 +1867 4 3 31 -0.13107200000000000000e6 +1867 4 6 18 -0.65536000000000000000e5 +1867 4 6 34 -0.13107200000000000000e6 +1868 1 1 32 0.65536000000000000000e5 +1868 1 3 34 0.13107200000000000000e6 +1868 1 10 41 -0.65536000000000000000e5 +1868 1 16 23 -0.13107200000000000000e6 +1868 2 6 21 0.65536000000000000000e5 +1868 2 7 21 -0.65536000000000000000e5 +1868 3 3 32 -0.65536000000000000000e5 +1869 2 6 22 0.65536000000000000000e5 +1869 2 7 21 -0.65536000000000000000e5 +1870 1 3 34 0.65536000000000000000e5 +1870 1 4 35 -0.65536000000000000000e5 +1870 1 12 27 0.65536000000000000000e5 +1870 1 12 43 -0.65536000000000000000e5 +1870 1 14 45 -0.13107200000000000000e6 +1870 1 16 23 0.65536000000000000000e5 +1870 1 16 31 -0.26214400000000000000e6 +1870 1 17 48 0.65536000000000000000e5 +1870 1 18 49 0.65536000000000000000e5 +1870 1 20 27 0.26214400000000000000e6 +1870 2 6 23 0.65536000000000000000e5 +1870 2 7 13 0.13107200000000000000e6 +1870 2 9 23 -0.65536000000000000000e5 +1870 2 10 24 -0.13107200000000000000e6 +1870 2 14 28 0.65536000000000000000e5 +1870 3 5 34 -0.65536000000000000000e5 +1870 3 13 42 0.65536000000000000000e5 +1870 3 14 27 -0.65536000000000000000e5 +1870 3 14 43 0.65536000000000000000e5 +1870 4 10 10 -0.26214400000000000000e6 +1871 1 3 18 -0.65536000000000000000e5 +1871 1 3 34 0.65536000000000000000e5 +1871 1 4 19 0.13107200000000000000e6 +1871 1 4 35 0.65536000000000000000e5 +1871 1 12 43 0.19660800000000000000e6 +1871 1 14 45 0.13107200000000000000e6 +1871 1 16 23 0.65536000000000000000e5 +1871 1 17 48 -0.65536000000000000000e5 +1871 1 18 49 -0.65536000000000000000e5 +1871 1 20 27 -0.26214400000000000000e6 +1871 2 6 24 0.65536000000000000000e5 +1871 2 9 23 0.65536000000000000000e5 +1871 2 10 24 0.13107200000000000000e6 +1871 2 14 28 -0.65536000000000000000e5 +1871 3 3 16 -0.65536000000000000000e5 +1871 3 4 17 -0.65536000000000000000e5 +1871 3 5 34 0.65536000000000000000e5 +1871 3 13 42 -0.65536000000000000000e5 +1871 3 14 27 0.19660800000000000000e6 +1871 3 14 43 -0.65536000000000000000e5 +1871 4 2 14 -0.65536000000000000000e5 +1872 2 6 25 0.65536000000000000000e5 +1872 2 7 13 -0.65536000000000000000e5 +1872 4 10 10 0.13107200000000000000e6 +1873 1 1 8 -0.65536000000000000000e5 +1873 1 1 24 -0.32768000000000000000e5 +1873 1 1 32 -0.13107200000000000000e6 +1873 1 1 40 -0.32768000000000000000e5 +1873 1 1 48 0.98304000000000000000e5 +1873 1 2 9 -0.65536000000000000000e5 +1873 1 2 33 0.26214400000000000000e6 +1873 1 2 49 0.98304000000000000000e5 +1873 1 3 34 -0.26214400000000000000e6 +1873 1 4 11 -0.65536000000000000000e5 +1873 1 7 38 0.65536000000000000000e5 +1873 1 8 23 0.65536000000000000000e5 +1873 1 8 39 0.65536000000000000000e5 +1873 1 9 40 0.65536000000000000000e5 +1873 1 10 41 0.13107200000000000000e6 +1873 1 12 27 0.26214400000000000000e6 +1873 1 12 43 -0.26214400000000000000e6 +1873 1 16 23 -0.26214400000000000000e6 +1873 1 22 37 0.32768000000000000000e5 +1873 1 23 38 0.13107200000000000000e6 +1873 1 26 41 -0.65536000000000000000e5 +1873 1 28 43 0.13107200000000000000e6 +1873 1 32 47 0.26214400000000000000e6 +1873 2 1 7 -0.65536000000000000000e5 +1873 2 1 31 0.13107200000000000000e6 +1873 2 2 8 0.65536000000000000000e5 +1873 2 2 16 -0.32768000000000000000e5 +1873 2 2 32 0.98304000000000000000e5 +1873 2 3 9 -0.65536000000000000000e5 +1873 2 6 20 -0.13107200000000000000e6 +1873 2 6 26 0.65536000000000000000e5 +1873 2 7 21 0.13107200000000000000e6 +1873 2 16 16 0.65536000000000000000e5 +1873 2 16 30 0.65536000000000000000e5 +1873 2 20 34 0.13107200000000000000e6 +1873 3 1 14 -0.26214400000000000000e6 +1873 3 1 22 -0.32768000000000000000e5 +1873 3 1 30 -0.65536000000000000000e5 +1873 3 1 34 0.26214400000000000000e6 +1873 3 1 38 -0.32768000000000000000e5 +1873 3 2 7 -0.13107200000000000000e6 +1873 3 2 15 0.13107200000000000000e6 +1873 3 2 23 -0.32768000000000000000e5 +1873 3 2 31 -0.13107200000000000000e6 +1873 3 3 32 0.26214400000000000000e6 +1873 3 4 9 -0.65536000000000000000e5 +1873 3 7 12 0.26214400000000000000e6 +1873 3 8 37 0.13107200000000000000e6 +1873 3 10 23 -0.13107200000000000000e6 +1873 3 22 27 0.65536000000000000000e5 +1873 3 22 35 0.26214400000000000000e6 +1873 3 28 41 0.26214400000000000000e6 +1873 4 2 6 -0.65536000000000000000e5 +1873 4 2 30 0.65536000000000000000e5 +1873 4 6 6 -0.26214400000000000000e6 +1873 4 6 18 -0.65536000000000000000e5 +1873 4 6 34 0.13107200000000000000e6 +1873 4 16 16 -0.65536000000000000000e5 +1874 1 1 48 0.32768000000000000000e5 +1874 1 2 33 0.13107200000000000000e6 +1874 1 2 49 0.32768000000000000000e5 +1874 1 3 34 -0.26214400000000000000e6 +1874 1 7 38 0.65536000000000000000e5 +1874 1 8 39 0.65536000000000000000e5 +1874 1 10 41 0.13107200000000000000e6 +1874 1 23 38 0.32768000000000000000e5 +1874 2 2 32 0.32768000000000000000e5 +1874 2 6 27 0.65536000000000000000e5 +1874 2 7 21 0.13107200000000000000e6 +1874 3 2 31 0.13107200000000000000e6 +1874 3 3 32 0.13107200000000000000e6 +1874 3 8 37 0.65536000000000000000e5 +1875 1 9 40 -0.65536000000000000000e5 +1875 1 10 41 0.13107200000000000000e6 +1875 1 11 42 -0.13107200000000000000e6 +1875 1 26 41 0.65536000000000000000e5 +1875 1 32 47 -0.13107200000000000000e6 +1875 1 33 48 0.13107200000000000000e6 +1875 2 6 28 0.65536000000000000000e5 +1875 2 12 26 0.13107200000000000000e6 +1875 2 16 30 -0.65536000000000000000e5 +1875 2 20 34 -0.13107200000000000000e6 +1875 3 8 37 0.65536000000000000000e5 +1875 3 13 42 0.26214400000000000000e6 +1875 3 22 35 -0.26214400000000000000e6 +1875 3 28 41 -0.13107200000000000000e6 +1875 3 29 42 0.13107200000000000000e6 +1875 4 2 30 -0.65536000000000000000e5 +1875 4 3 31 -0.13107200000000000000e6 +1875 4 6 34 -0.13107200000000000000e6 +1876 2 1 31 -0.65536000000000000000e5 +1876 2 6 29 0.65536000000000000000e5 +1877 1 2 33 -0.65536000000000000000e5 +1877 1 3 34 0.13107200000000000000e6 +1877 1 11 42 0.65536000000000000000e5 +1877 1 12 43 0.13107200000000000000e6 +1877 1 16 47 -0.13107200000000000000e6 +1877 1 28 43 -0.65536000000000000000e5 +1877 1 32 47 -0.65536000000000000000e5 +1877 1 33 48 -0.65536000000000000000e5 +1877 2 6 30 0.65536000000000000000e5 +1877 2 7 21 -0.65536000000000000000e5 +1877 2 12 26 -0.65536000000000000000e5 +1877 3 2 31 -0.65536000000000000000e5 +1877 3 3 32 -0.65536000000000000000e5 +1877 3 12 41 -0.13107200000000000000e6 +1877 3 13 42 -0.13107200000000000000e6 +1877 3 28 41 -0.65536000000000000000e5 +1877 3 29 42 -0.65536000000000000000e5 +1877 4 3 31 0.65536000000000000000e5 +1878 1 12 43 0.65536000000000000000e5 +1878 1 16 23 0.65536000000000000000e5 +1878 1 16 47 0.65536000000000000000e5 +1878 1 27 34 -0.13107200000000000000e6 +1878 2 6 31 0.65536000000000000000e5 +1878 3 1 34 -0.65536000000000000000e5 +1878 3 12 41 0.65536000000000000000e5 +1879 1 1 48 0.32768000000000000000e5 +1879 1 2 33 0.13107200000000000000e6 +1879 1 2 49 0.32768000000000000000e5 +1879 1 3 34 -0.26214400000000000000e6 +1879 1 7 38 0.65536000000000000000e5 +1879 1 8 39 0.65536000000000000000e5 +1879 1 10 41 0.13107200000000000000e6 +1879 1 23 38 0.32768000000000000000e5 +1879 2 2 32 0.32768000000000000000e5 +1879 2 6 32 0.65536000000000000000e5 +1879 2 7 21 0.13107200000000000000e6 +1879 3 2 31 0.13107200000000000000e6 +1879 3 3 32 0.13107200000000000000e6 +1879 3 8 37 0.65536000000000000000e5 +1879 4 1 29 0.65536000000000000000e5 +1880 2 6 33 0.65536000000000000000e5 +1880 2 16 30 -0.65536000000000000000e5 +1881 1 2 33 -0.65536000000000000000e5 +1881 1 3 34 0.13107200000000000000e6 +1881 1 9 40 0.32768000000000000000e5 +1881 1 10 41 -0.13107200000000000000e6 +1881 1 12 43 0.13107200000000000000e6 +1881 1 16 47 -0.13107200000000000000e6 +1881 1 26 41 -0.32768000000000000000e5 +1881 1 28 43 -0.65536000000000000000e5 +1881 1 32 47 0.65536000000000000000e5 +1881 2 6 34 0.65536000000000000000e5 +1881 2 7 21 -0.65536000000000000000e5 +1881 2 20 34 -0.65536000000000000000e5 +1881 3 2 31 -0.65536000000000000000e5 +1881 3 3 32 -0.65536000000000000000e5 +1881 3 8 37 -0.32768000000000000000e5 +1881 3 9 38 0.32768000000000000000e5 +1881 3 22 27 -0.32768000000000000000e5 +1881 3 22 35 -0.13107200000000000000e6 +1881 3 28 41 0.65536000000000000000e5 +1881 4 1 29 -0.32768000000000000000e5 +1881 4 2 30 0.32768000000000000000e5 +1881 4 6 34 -0.65536000000000000000e5 +1882 2 6 35 0.65536000000000000000e5 +1882 2 16 34 -0.65536000000000000000e5 +1883 1 1 32 0.32768000000000000000e5 +1883 1 1 48 -0.16384000000000000000e5 +1883 1 2 17 -0.65536000000000000000e5 +1883 1 2 33 -0.65536000000000000000e5 +1883 1 2 49 -0.16384000000000000000e5 +1883 1 3 34 0.13107200000000000000e6 +1883 1 4 11 0.16384000000000000000e5 +1883 1 8 23 -0.16384000000000000000e5 +1883 1 8 39 -0.16384000000000000000e5 +1883 1 9 40 -0.16384000000000000000e5 +1883 1 10 41 -0.65536000000000000000e5 +1883 1 11 42 0.32768000000000000000e5 +1883 1 12 43 0.13107200000000000000e6 +1883 1 23 38 -0.16384000000000000000e5 +1883 1 26 41 0.16384000000000000000e5 +1883 1 28 43 -0.65536000000000000000e5 +1883 1 32 47 -0.98304000000000000000e5 +1883 1 33 48 -0.32768000000000000000e5 +1883 2 2 8 -0.16384000000000000000e5 +1883 2 2 32 -0.16384000000000000000e5 +1883 2 3 9 0.16384000000000000000e5 +1883 2 4 10 -0.32768000000000000000e5 +1883 2 7 7 0.65536000000000000000e5 +1883 2 7 21 -0.32768000000000000000e5 +1883 2 12 26 -0.32768000000000000000e5 +1883 2 16 30 -0.16384000000000000000e5 +1883 2 20 34 -0.32768000000000000000e5 +1883 3 1 14 0.32768000000000000000e5 +1883 3 1 30 0.16384000000000000000e5 +1883 3 2 7 0.16384000000000000000e5 +1883 3 2 15 -0.65536000000000000000e5 +1883 3 3 16 0.65536000000000000000e5 +1883 3 3 32 -0.98304000000000000000e5 +1883 3 4 9 0.16384000000000000000e5 +1883 3 8 37 -0.16384000000000000000e5 +1883 3 10 23 0.32768000000000000000e5 +1883 3 13 42 -0.65536000000000000000e5 +1883 3 22 35 -0.65536000000000000000e5 +1883 3 28 41 -0.98304000000000000000e5 +1883 3 29 42 -0.32768000000000000000e5 +1883 4 2 6 0.16384000000000000000e5 +1883 4 2 30 -0.16384000000000000000e5 +1883 4 3 31 0.32768000000000000000e5 +1883 4 6 18 0.16384000000000000000e5 +1883 4 6 34 -0.32768000000000000000e5 +1884 2 4 10 -0.65536000000000000000e5 +1884 2 7 8 0.65536000000000000000e5 +1885 1 2 33 0.65536000000000000000e5 +1885 1 3 18 -0.13107200000000000000e6 +1885 1 6 13 0.65536000000000000000e5 +1885 1 10 41 0.65536000000000000000e5 +1885 2 4 10 -0.65536000000000000000e5 +1885 2 7 9 0.65536000000000000000e5 +1885 2 7 21 0.65536000000000000000e5 +1885 3 1 14 -0.65536000000000000000e5 +1885 3 3 16 0.13107200000000000000e6 +1885 3 3 32 0.65536000000000000000e5 +1886 1 3 34 0.65536000000000000000e5 +1886 1 4 35 -0.65536000000000000000e5 +1886 1 12 27 0.65536000000000000000e5 +1886 1 12 43 -0.65536000000000000000e5 +1886 1 14 45 -0.13107200000000000000e6 +1886 1 16 23 0.65536000000000000000e5 +1886 1 16 31 -0.26214400000000000000e6 +1886 1 17 48 0.65536000000000000000e5 +1886 1 18 49 0.65536000000000000000e5 +1886 1 20 27 0.26214400000000000000e6 +1886 2 7 10 0.65536000000000000000e5 +1886 2 7 13 0.13107200000000000000e6 +1886 2 9 23 -0.65536000000000000000e5 +1886 2 10 24 -0.13107200000000000000e6 +1886 2 14 28 0.65536000000000000000e5 +1886 3 5 34 -0.65536000000000000000e5 +1886 3 13 42 0.65536000000000000000e5 +1886 3 14 27 -0.65536000000000000000e5 +1886 3 14 43 0.65536000000000000000e5 +1886 4 1 13 -0.65536000000000000000e5 +1886 4 10 10 -0.26214400000000000000e6 +1887 2 6 12 -0.65536000000000000000e5 +1887 2 7 11 0.65536000000000000000e5 +1888 1 3 18 0.65536000000000000000e5 +1888 1 3 34 0.65536000000000000000e5 +1888 1 4 19 -0.13107200000000000000e6 +1888 1 4 35 0.65536000000000000000e5 +1888 2 7 12 0.65536000000000000000e5 +1888 3 3 16 0.65536000000000000000e5 +1888 3 4 17 0.65536000000000000000e5 +1889 1 2 17 0.32768000000000000000e5 +1889 1 3 18 0.32768000000000000000e5 +1889 1 3 34 0.32768000000000000000e5 +1889 1 4 19 0.65536000000000000000e5 +1889 1 10 17 0.65536000000000000000e5 +1889 1 20 27 -0.13107200000000000000e6 +1889 2 6 12 0.32768000000000000000e5 +1889 2 7 14 0.65536000000000000000e5 +1889 3 3 16 0.32768000000000000000e5 +1889 3 7 20 -0.13107200000000000000e6 +1890 2 7 15 0.65536000000000000000e5 +1890 2 11 13 -0.65536000000000000000e5 +1891 1 1 8 -0.65536000000000000000e5 +1891 1 1 32 -0.26214400000000000000e6 +1891 1 1 48 0.98304000000000000000e5 +1891 1 2 9 -0.65536000000000000000e5 +1891 1 2 33 0.52428800000000000000e6 +1891 1 2 49 0.98304000000000000000e5 +1891 1 3 34 -0.52428800000000000000e6 +1891 1 4 11 -0.65536000000000000000e5 +1891 1 8 23 0.13107200000000000000e6 +1891 1 8 39 0.65536000000000000000e5 +1891 1 9 40 0.65536000000000000000e5 +1891 1 10 41 0.26214400000000000000e6 +1891 1 11 42 -0.26214400000000000000e6 +1891 1 12 27 0.26214400000000000000e6 +1891 1 12 43 -0.78643200000000000000e6 +1891 1 23 38 0.98304000000000000000e5 +1891 1 26 41 -0.65536000000000000000e5 +1891 1 28 43 0.39321600000000000000e6 +1891 1 32 47 0.52428800000000000000e6 +1891 1 33 48 0.26214400000000000000e6 +1891 2 1 7 -0.65536000000000000000e5 +1891 2 2 8 0.65536000000000000000e5 +1891 2 2 32 0.98304000000000000000e5 +1891 2 3 9 -0.65536000000000000000e5 +1891 2 6 20 -0.13107200000000000000e6 +1891 2 7 16 0.65536000000000000000e5 +1891 2 7 21 0.26214400000000000000e6 +1891 2 12 26 0.26214400000000000000e6 +1891 2 16 30 0.65536000000000000000e5 +1891 2 20 34 0.13107200000000000000e6 +1891 3 1 14 -0.26214400000000000000e6 +1891 3 1 30 -0.13107200000000000000e6 +1891 3 2 7 -0.13107200000000000000e6 +1891 3 2 15 0.13107200000000000000e6 +1891 3 3 32 0.39321600000000000000e6 +1891 3 4 9 -0.65536000000000000000e5 +1891 3 7 12 0.26214400000000000000e6 +1891 3 8 37 0.13107200000000000000e6 +1891 3 10 23 -0.19660800000000000000e6 +1891 3 13 42 0.52428800000000000000e6 +1891 3 22 35 0.26214400000000000000e6 +1891 3 28 41 0.52428800000000000000e6 +1891 3 29 42 0.26214400000000000000e6 +1891 4 2 6 -0.65536000000000000000e5 +1891 4 2 30 0.65536000000000000000e5 +1891 4 3 31 -0.26214400000000000000e6 +1891 4 6 6 -0.26214400000000000000e6 +1891 4 6 18 -0.13107200000000000000e6 +1891 4 6 34 0.13107200000000000000e6 +1892 1 1 48 0.32768000000000000000e5 +1892 1 2 33 0.26214400000000000000e6 +1892 1 2 49 0.32768000000000000000e5 +1892 1 3 34 -0.26214400000000000000e6 +1892 1 8 23 0.65536000000000000000e5 +1892 1 8 39 0.65536000000000000000e5 +1892 1 10 41 0.13107200000000000000e6 +1892 1 11 42 -0.13107200000000000000e6 +1892 1 12 43 -0.26214400000000000000e6 +1892 1 23 38 0.32768000000000000000e5 +1892 1 28 43 0.13107200000000000000e6 +1892 1 32 47 0.13107200000000000000e6 +1892 1 33 48 0.13107200000000000000e6 +1892 2 2 32 0.32768000000000000000e5 +1892 2 7 17 0.65536000000000000000e5 +1892 2 7 21 0.13107200000000000000e6 +1892 2 12 26 0.13107200000000000000e6 +1892 3 3 32 0.13107200000000000000e6 +1892 3 8 37 0.65536000000000000000e5 +1892 3 10 23 -0.65536000000000000000e5 +1892 3 13 42 0.26214400000000000000e6 +1892 3 28 41 0.13107200000000000000e6 +1892 3 29 42 0.13107200000000000000e6 +1892 4 3 31 -0.13107200000000000000e6 +1892 4 6 18 -0.65536000000000000000e5 +1893 1 9 40 -0.65536000000000000000e5 +1893 1 10 41 0.13107200000000000000e6 +1893 1 11 42 -0.13107200000000000000e6 +1893 1 26 41 0.65536000000000000000e5 +1893 1 32 47 -0.13107200000000000000e6 +1893 1 33 48 0.13107200000000000000e6 +1893 2 7 18 0.65536000000000000000e5 +1893 2 12 26 0.13107200000000000000e6 +1893 2 16 30 -0.65536000000000000000e5 +1893 2 20 34 -0.13107200000000000000e6 +1893 3 8 37 0.65536000000000000000e5 +1893 3 13 42 0.26214400000000000000e6 +1893 3 22 35 -0.26214400000000000000e6 +1893 3 28 41 -0.13107200000000000000e6 +1893 3 29 42 0.13107200000000000000e6 +1893 4 2 30 -0.65536000000000000000e5 +1893 4 3 31 -0.13107200000000000000e6 +1893 4 6 18 -0.65536000000000000000e5 +1893 4 6 34 -0.13107200000000000000e6 +1894 1 1 48 -0.32768000000000000000e5 +1894 1 2 49 -0.32768000000000000000e5 +1894 1 9 40 -0.65536000000000000000e5 +1894 1 10 25 0.65536000000000000000e5 +1894 1 12 43 0.26214400000000000000e6 +1894 1 23 38 -0.32768000000000000000e5 +1894 1 26 41 0.65536000000000000000e5 +1894 1 28 43 -0.13107200000000000000e6 +1894 1 32 47 -0.26214400000000000000e6 +1894 2 2 32 -0.32768000000000000000e5 +1894 2 7 19 0.65536000000000000000e5 +1894 2 16 30 -0.65536000000000000000e5 +1894 2 20 34 -0.13107200000000000000e6 +1894 3 1 30 0.65536000000000000000e5 +1894 3 3 32 -0.13107200000000000000e6 +1894 3 10 23 0.65536000000000000000e5 +1894 3 22 35 -0.26214400000000000000e6 +1894 3 28 41 -0.26214400000000000000e6 +1894 4 2 30 -0.65536000000000000000e5 +1894 4 6 34 -0.13107200000000000000e6 +1895 1 1 32 0.65536000000000000000e5 +1895 1 3 34 0.13107200000000000000e6 +1895 1 10 41 -0.65536000000000000000e5 +1895 1 16 23 -0.13107200000000000000e6 +1895 2 7 20 0.65536000000000000000e5 +1895 2 7 21 -0.65536000000000000000e5 +1895 3 3 32 -0.65536000000000000000e5 +1896 2 7 22 0.65536000000000000000e5 +1896 2 12 26 -0.65536000000000000000e5 +1896 4 8 20 -0.65536000000000000000e5 +1897 1 3 18 -0.65536000000000000000e5 +1897 1 3 34 0.65536000000000000000e5 +1897 1 4 19 0.13107200000000000000e6 +1897 1 4 35 0.65536000000000000000e5 +1897 1 12 43 0.19660800000000000000e6 +1897 1 14 45 0.13107200000000000000e6 +1897 1 16 23 0.65536000000000000000e5 +1897 1 17 48 -0.65536000000000000000e5 +1897 1 18 49 -0.65536000000000000000e5 +1897 1 20 27 -0.26214400000000000000e6 +1897 2 7 23 0.65536000000000000000e5 +1897 2 9 23 0.65536000000000000000e5 +1897 2 10 24 0.13107200000000000000e6 +1897 2 14 28 -0.65536000000000000000e5 +1897 3 3 16 -0.65536000000000000000e5 +1897 3 4 17 -0.65536000000000000000e5 +1897 3 5 34 0.65536000000000000000e5 +1897 3 13 42 -0.65536000000000000000e5 +1897 3 14 27 0.19660800000000000000e6 +1897 3 14 43 -0.65536000000000000000e5 +1897 4 2 14 -0.65536000000000000000e5 +1898 1 3 18 0.65536000000000000000e5 +1898 1 3 34 0.65536000000000000000e5 +1898 1 4 19 -0.13107200000000000000e6 +1898 1 4 35 0.65536000000000000000e5 +1898 2 7 24 0.65536000000000000000e5 +1898 3 3 16 0.65536000000000000000e5 +1898 3 4 17 0.65536000000000000000e5 +1898 4 2 14 0.65536000000000000000e5 +1899 2 7 25 0.65536000000000000000e5 +1899 2 10 24 -0.65536000000000000000e5 +1900 1 1 48 0.32768000000000000000e5 +1900 1 2 33 0.13107200000000000000e6 +1900 1 2 49 0.32768000000000000000e5 +1900 1 3 34 -0.26214400000000000000e6 +1900 1 7 38 0.65536000000000000000e5 +1900 1 8 39 0.65536000000000000000e5 +1900 1 10 41 0.13107200000000000000e6 +1900 1 23 38 0.32768000000000000000e5 +1900 2 2 32 0.32768000000000000000e5 +1900 2 7 21 0.13107200000000000000e6 +1900 2 7 26 0.65536000000000000000e5 +1900 3 2 31 0.13107200000000000000e6 +1900 3 3 32 0.13107200000000000000e6 +1900 3 8 37 0.65536000000000000000e5 +1901 1 9 40 -0.65536000000000000000e5 +1901 1 10 41 0.13107200000000000000e6 +1901 1 11 42 -0.13107200000000000000e6 +1901 1 26 41 0.65536000000000000000e5 +1901 1 32 47 -0.13107200000000000000e6 +1901 1 33 48 0.13107200000000000000e6 +1901 2 7 27 0.65536000000000000000e5 +1901 2 12 26 0.13107200000000000000e6 +1901 2 16 30 -0.65536000000000000000e5 +1901 2 20 34 -0.13107200000000000000e6 +1901 3 8 37 0.65536000000000000000e5 +1901 3 13 42 0.26214400000000000000e6 +1901 3 22 35 -0.26214400000000000000e6 +1901 3 28 41 -0.13107200000000000000e6 +1901 3 29 42 0.13107200000000000000e6 +1901 4 2 30 -0.65536000000000000000e5 +1901 4 3 31 -0.13107200000000000000e6 +1901 4 6 34 -0.13107200000000000000e6 +1902 1 1 48 -0.32768000000000000000e5 +1902 1 2 49 -0.32768000000000000000e5 +1902 1 12 43 0.26214400000000000000e6 +1902 1 23 38 -0.32768000000000000000e5 +1902 1 26 41 0.65536000000000000000e5 +1902 1 28 43 -0.13107200000000000000e6 +1902 1 32 47 -0.26214400000000000000e6 +1902 2 2 32 -0.32768000000000000000e5 +1902 2 7 28 0.65536000000000000000e5 +1902 2 16 30 -0.65536000000000000000e5 +1902 2 20 34 -0.13107200000000000000e6 +1902 3 22 35 -0.26214400000000000000e6 +1902 3 28 41 -0.26214400000000000000e6 +1902 4 2 30 -0.65536000000000000000e5 +1902 4 6 34 -0.13107200000000000000e6 +1903 1 2 33 -0.65536000000000000000e5 +1903 1 3 34 0.13107200000000000000e6 +1903 1 11 42 0.65536000000000000000e5 +1903 1 12 43 0.13107200000000000000e6 +1903 1 16 47 -0.13107200000000000000e6 +1903 1 28 43 -0.65536000000000000000e5 +1903 1 32 47 -0.65536000000000000000e5 +1903 1 33 48 -0.65536000000000000000e5 +1903 2 7 21 -0.65536000000000000000e5 +1903 2 7 29 0.65536000000000000000e5 +1903 2 12 26 -0.65536000000000000000e5 +1903 3 2 31 -0.65536000000000000000e5 +1903 3 3 32 -0.65536000000000000000e5 +1903 3 12 41 -0.13107200000000000000e6 +1903 3 13 42 -0.13107200000000000000e6 +1903 3 28 41 -0.65536000000000000000e5 +1903 3 29 42 -0.65536000000000000000e5 +1903 4 3 31 0.65536000000000000000e5 +1904 2 7 30 0.65536000000000000000e5 +1904 2 12 26 -0.65536000000000000000e5 +1905 1 12 43 0.65536000000000000000e5 +1905 1 13 44 -0.13107200000000000000e6 +1905 1 16 47 0.65536000000000000000e5 +1905 1 17 48 0.65536000000000000000e5 +1905 2 7 31 0.65536000000000000000e5 +1905 3 12 41 0.65536000000000000000e5 +1905 3 13 42 0.65536000000000000000e5 +1906 2 7 32 0.65536000000000000000e5 +1906 2 16 30 -0.65536000000000000000e5 +1907 1 1 48 -0.32768000000000000000e5 +1907 1 2 49 -0.32768000000000000000e5 +1907 1 12 43 0.26214400000000000000e6 +1907 1 23 38 -0.32768000000000000000e5 +1907 1 26 41 0.65536000000000000000e5 +1907 1 28 43 -0.13107200000000000000e6 +1907 1 32 47 -0.26214400000000000000e6 +1907 2 2 32 -0.32768000000000000000e5 +1907 2 7 33 0.65536000000000000000e5 +1907 2 16 30 -0.65536000000000000000e5 +1907 2 20 34 -0.13107200000000000000e6 +1907 3 22 35 -0.26214400000000000000e6 +1907 3 28 41 -0.26214400000000000000e6 +1907 4 6 34 -0.13107200000000000000e6 +1908 2 7 34 0.65536000000000000000e5 +1908 2 20 34 -0.65536000000000000000e5 +1908 4 6 34 -0.65536000000000000000e5 +1909 1 1 48 -0.32768000000000000000e5 +1909 1 2 49 -0.32768000000000000000e5 +1909 1 12 43 0.26214400000000000000e6 +1909 1 23 38 -0.32768000000000000000e5 +1909 1 26 41 0.65536000000000000000e5 +1909 1 28 43 -0.13107200000000000000e6 +1909 1 32 47 -0.26214400000000000000e6 +1909 2 2 32 -0.32768000000000000000e5 +1909 2 7 35 0.65536000000000000000e5 +1909 2 16 30 -0.65536000000000000000e5 +1909 2 20 34 -0.13107200000000000000e6 +1909 3 22 35 -0.26214400000000000000e6 +1909 3 28 41 -0.26214400000000000000e6 +1909 4 6 34 -0.13107200000000000000e6 +1909 4 17 29 0.65536000000000000000e5 +1910 1 2 33 0.32768000000000000000e5 +1910 1 3 18 -0.65536000000000000000e5 +1910 1 6 13 0.32768000000000000000e5 +1910 1 10 41 0.32768000000000000000e5 +1910 2 4 10 -0.32768000000000000000e5 +1910 2 7 21 0.32768000000000000000e5 +1910 2 8 8 0.65536000000000000000e5 +1910 3 1 14 -0.32768000000000000000e5 +1910 3 3 16 0.65536000000000000000e5 +1910 3 3 32 0.32768000000000000000e5 +1911 2 5 11 -0.65536000000000000000e5 +1911 2 8 9 0.65536000000000000000e5 +1912 2 6 12 -0.65536000000000000000e5 +1912 2 8 10 0.65536000000000000000e5 +1913 1 3 18 0.65536000000000000000e5 +1913 1 3 34 0.65536000000000000000e5 +1913 1 4 19 -0.13107200000000000000e6 +1913 1 4 35 0.65536000000000000000e5 +1913 2 8 11 0.65536000000000000000e5 +1913 3 3 16 0.65536000000000000000e5 +1913 3 4 17 0.65536000000000000000e5 +1914 1 3 18 0.65536000000000000000e5 +1914 1 4 35 0.65536000000000000000e5 +1914 1 5 20 0.13107200000000000000e6 +1914 1 5 36 -0.13107200000000000000e6 +1914 1 10 17 -0.13107200000000000000e6 +1914 1 14 45 0.13107200000000000000e6 +1914 1 17 48 -0.65536000000000000000e5 +1914 1 18 49 -0.65536000000000000000e5 +1914 2 8 12 0.65536000000000000000e5 +1914 2 14 28 -0.65536000000000000000e5 +1914 3 5 18 -0.65536000000000000000e5 +1914 3 5 34 0.65536000000000000000e5 +1914 3 13 42 -0.65536000000000000000e5 +1914 3 14 43 -0.65536000000000000000e5 +1914 4 8 12 -0.65536000000000000000e5 +1915 1 2 17 0.32768000000000000000e5 +1915 1 3 18 0.32768000000000000000e5 +1915 1 3 34 0.32768000000000000000e5 +1915 1 4 19 0.65536000000000000000e5 +1915 1 10 17 0.65536000000000000000e5 +1915 1 20 27 -0.13107200000000000000e6 +1915 2 6 12 0.32768000000000000000e5 +1915 2 8 13 0.65536000000000000000e5 +1915 3 3 16 0.32768000000000000000e5 +1915 3 7 20 -0.13107200000000000000e6 +1916 1 3 18 -0.32768000000000000000e5 +1916 1 4 19 0.65536000000000000000e5 +1916 1 4 35 0.32768000000000000000e5 +1916 1 5 36 0.65536000000000000000e5 +1916 1 12 43 0.65536000000000000000e5 +1916 1 14 45 0.65536000000000000000e5 +1916 1 17 32 -0.13107200000000000000e6 +1916 1 17 48 -0.32768000000000000000e5 +1916 1 18 49 -0.32768000000000000000e5 +1916 2 8 14 0.65536000000000000000e5 +1916 2 9 23 0.32768000000000000000e5 +1916 2 14 28 -0.32768000000000000000e5 +1916 3 3 16 -0.32768000000000000000e5 +1916 3 4 17 -0.32768000000000000000e5 +1916 3 5 34 0.32768000000000000000e5 +1916 3 13 42 -0.32768000000000000000e5 +1916 3 14 27 0.65536000000000000000e5 +1916 3 14 43 -0.32768000000000000000e5 +1916 4 2 14 -0.32768000000000000000e5 +1916 4 3 15 -0.65536000000000000000e5 +1917 2 8 15 0.65536000000000000000e5 +1917 2 11 25 -0.65536000000000000000e5 +1917 4 10 14 -0.65536000000000000000e5 +1918 1 1 48 0.32768000000000000000e5 +1918 1 2 33 0.26214400000000000000e6 +1918 1 2 49 0.32768000000000000000e5 +1918 1 3 34 -0.26214400000000000000e6 +1918 1 8 23 0.65536000000000000000e5 +1918 1 8 39 0.65536000000000000000e5 +1918 1 10 41 0.13107200000000000000e6 +1918 1 11 42 -0.13107200000000000000e6 +1918 1 12 43 -0.26214400000000000000e6 +1918 1 23 38 0.32768000000000000000e5 +1918 1 28 43 0.13107200000000000000e6 +1918 1 32 47 0.13107200000000000000e6 +1918 1 33 48 0.13107200000000000000e6 +1918 2 2 32 0.32768000000000000000e5 +1918 2 7 21 0.13107200000000000000e6 +1918 2 8 16 0.65536000000000000000e5 +1918 2 12 26 0.13107200000000000000e6 +1918 3 3 32 0.13107200000000000000e6 +1918 3 8 37 0.65536000000000000000e5 +1918 3 10 23 -0.65536000000000000000e5 +1918 3 13 42 0.26214400000000000000e6 +1918 3 28 41 0.13107200000000000000e6 +1918 3 29 42 0.13107200000000000000e6 +1918 4 3 31 -0.13107200000000000000e6 +1918 4 6 18 -0.65536000000000000000e5 +1919 1 9 40 -0.65536000000000000000e5 +1919 1 10 41 0.13107200000000000000e6 +1919 1 11 42 -0.13107200000000000000e6 +1919 1 26 41 0.65536000000000000000e5 +1919 1 32 47 -0.13107200000000000000e6 +1919 1 33 48 0.13107200000000000000e6 +1919 2 8 17 0.65536000000000000000e5 +1919 2 12 26 0.13107200000000000000e6 +1919 2 16 30 -0.65536000000000000000e5 +1919 2 20 34 -0.13107200000000000000e6 +1919 3 8 37 0.65536000000000000000e5 +1919 3 13 42 0.26214400000000000000e6 +1919 3 22 35 -0.26214400000000000000e6 +1919 3 28 41 -0.13107200000000000000e6 +1919 3 29 42 0.13107200000000000000e6 +1919 4 2 30 -0.65536000000000000000e5 +1919 4 3 31 -0.13107200000000000000e6 +1919 4 6 18 -0.65536000000000000000e5 +1919 4 6 34 -0.13107200000000000000e6 +1920 1 1 48 -0.32768000000000000000e5 +1920 1 2 49 -0.32768000000000000000e5 +1920 1 9 40 -0.65536000000000000000e5 +1920 1 10 25 0.65536000000000000000e5 +1920 1 12 43 0.26214400000000000000e6 +1920 1 23 38 -0.32768000000000000000e5 +1920 1 26 41 0.65536000000000000000e5 +1920 1 28 43 -0.13107200000000000000e6 +1920 1 32 47 -0.26214400000000000000e6 +1920 2 2 32 -0.32768000000000000000e5 +1920 2 8 18 0.65536000000000000000e5 +1920 2 16 30 -0.65536000000000000000e5 +1920 2 20 34 -0.13107200000000000000e6 +1920 3 1 30 0.65536000000000000000e5 +1920 3 3 32 -0.13107200000000000000e6 +1920 3 10 23 0.65536000000000000000e5 +1920 3 22 35 -0.26214400000000000000e6 +1920 3 28 41 -0.26214400000000000000e6 +1920 4 2 30 -0.65536000000000000000e5 +1920 4 6 34 -0.13107200000000000000e6 +1921 1 9 40 0.65536000000000000000e5 +1921 1 10 41 0.13107200000000000000e6 +1921 1 11 42 0.13107200000000000000e6 +1921 1 26 41 -0.65536000000000000000e5 +1921 1 32 47 -0.13107200000000000000e6 +1921 1 33 48 -0.13107200000000000000e6 +1921 2 4 34 -0.65536000000000000000e5 +1921 2 8 19 0.65536000000000000000e5 +1921 3 9 38 0.65536000000000000000e5 +1921 3 10 39 0.65536000000000000000e5 +1921 3 13 42 -0.26214400000000000000e6 +1921 3 28 41 -0.13107200000000000000e6 +1921 3 29 42 -0.13107200000000000000e6 +1921 4 3 31 0.13107200000000000000e6 +1921 4 7 19 -0.65536000000000000000e5 +1922 2 7 21 -0.65536000000000000000e5 +1922 2 8 20 0.65536000000000000000e5 +1923 2 8 21 0.65536000000000000000e5 +1923 2 12 26 -0.65536000000000000000e5 +1923 4 8 20 -0.65536000000000000000e5 +1924 1 2 33 -0.65536000000000000000e5 +1924 1 4 35 -0.13107200000000000000e6 +1924 1 11 42 0.65536000000000000000e5 +1924 1 12 43 0.13107200000000000000e6 +1924 2 8 22 0.65536000000000000000e5 +1924 2 12 26 -0.65536000000000000000e5 +1924 3 4 33 0.65536000000000000000e5 +1924 3 14 27 0.13107200000000000000e6 +1924 4 8 20 -0.65536000000000000000e5 +1925 1 3 18 0.65536000000000000000e5 +1925 1 3 34 0.65536000000000000000e5 +1925 1 4 19 -0.13107200000000000000e6 +1925 1 4 35 0.65536000000000000000e5 +1925 2 8 23 0.65536000000000000000e5 +1925 3 3 16 0.65536000000000000000e5 +1925 3 4 17 0.65536000000000000000e5 +1925 4 2 14 0.65536000000000000000e5 +1926 2 8 24 0.65536000000000000000e5 +1926 2 9 23 -0.65536000000000000000e5 +1927 1 3 18 -0.32768000000000000000e5 +1927 1 4 19 0.65536000000000000000e5 +1927 1 4 35 0.32768000000000000000e5 +1927 1 5 36 0.65536000000000000000e5 +1927 1 12 43 0.65536000000000000000e5 +1927 1 14 45 0.65536000000000000000e5 +1927 1 17 32 -0.13107200000000000000e6 +1927 1 17 48 -0.32768000000000000000e5 +1927 1 18 49 -0.32768000000000000000e5 +1927 2 8 25 0.65536000000000000000e5 +1927 2 9 23 0.32768000000000000000e5 +1927 2 14 28 -0.32768000000000000000e5 +1927 3 3 16 -0.32768000000000000000e5 +1927 3 4 17 -0.32768000000000000000e5 +1927 3 5 34 0.32768000000000000000e5 +1927 3 13 42 -0.32768000000000000000e5 +1927 3 14 27 0.65536000000000000000e5 +1927 3 14 43 -0.32768000000000000000e5 +1927 4 2 14 -0.32768000000000000000e5 +1928 1 9 40 -0.65536000000000000000e5 +1928 1 10 41 0.13107200000000000000e6 +1928 1 11 42 -0.13107200000000000000e6 +1928 1 26 41 0.65536000000000000000e5 +1928 1 32 47 -0.13107200000000000000e6 +1928 1 33 48 0.13107200000000000000e6 +1928 2 8 26 0.65536000000000000000e5 +1928 2 12 26 0.13107200000000000000e6 +1928 2 16 30 -0.65536000000000000000e5 +1928 2 20 34 -0.13107200000000000000e6 +1928 3 8 37 0.65536000000000000000e5 +1928 3 13 42 0.26214400000000000000e6 +1928 3 22 35 -0.26214400000000000000e6 +1928 3 28 41 -0.13107200000000000000e6 +1928 3 29 42 0.13107200000000000000e6 +1928 4 2 30 -0.65536000000000000000e5 +1928 4 3 31 -0.13107200000000000000e6 +1928 4 6 34 -0.13107200000000000000e6 +1929 1 1 48 -0.32768000000000000000e5 +1929 1 2 49 -0.32768000000000000000e5 +1929 1 12 43 0.26214400000000000000e6 +1929 1 23 38 -0.32768000000000000000e5 +1929 1 26 41 0.65536000000000000000e5 +1929 1 28 43 -0.13107200000000000000e6 +1929 1 32 47 -0.26214400000000000000e6 +1929 2 2 32 -0.32768000000000000000e5 +1929 2 8 27 0.65536000000000000000e5 +1929 2 16 30 -0.65536000000000000000e5 +1929 2 20 34 -0.13107200000000000000e6 +1929 3 22 35 -0.26214400000000000000e6 +1929 3 28 41 -0.26214400000000000000e6 +1929 4 2 30 -0.65536000000000000000e5 +1929 4 6 34 -0.13107200000000000000e6 +1930 1 9 40 0.65536000000000000000e5 +1930 1 10 41 0.13107200000000000000e6 +1930 1 11 42 0.13107200000000000000e6 +1930 1 26 41 -0.65536000000000000000e5 +1930 1 32 47 -0.13107200000000000000e6 +1930 1 33 48 -0.13107200000000000000e6 +1930 2 4 34 -0.65536000000000000000e5 +1930 2 8 28 0.65536000000000000000e5 +1930 3 9 38 0.65536000000000000000e5 +1930 3 10 39 0.65536000000000000000e5 +1930 3 13 42 -0.26214400000000000000e6 +1930 3 28 41 -0.13107200000000000000e6 +1930 3 29 42 -0.13107200000000000000e6 +1930 4 3 31 0.13107200000000000000e6 +1931 2 8 29 0.65536000000000000000e5 +1931 2 12 26 -0.65536000000000000000e5 +1932 1 17 48 -0.13107200000000000000e6 +1932 1 28 43 0.65536000000000000000e5 +1932 1 32 47 0.65536000000000000000e5 +1932 1 33 48 0.65536000000000000000e5 +1932 2 8 30 0.65536000000000000000e5 +1932 3 28 41 0.65536000000000000000e5 +1932 3 29 42 0.65536000000000000000e5 +1932 4 3 31 -0.65536000000000000000e5 +1933 1 4 35 -0.65536000000000000000e5 +1933 1 17 48 0.65536000000000000000e5 +1933 2 8 31 0.65536000000000000000e5 +1933 2 9 23 -0.65536000000000000000e5 +1933 3 5 34 -0.65536000000000000000e5 +1933 3 13 42 0.65536000000000000000e5 +1933 3 14 27 -0.65536000000000000000e5 +1933 3 16 29 0.13107200000000000000e6 +1934 1 1 48 -0.32768000000000000000e5 +1934 1 2 49 -0.32768000000000000000e5 +1934 1 12 43 0.26214400000000000000e6 +1934 1 23 38 -0.32768000000000000000e5 +1934 1 26 41 0.65536000000000000000e5 +1934 1 28 43 -0.13107200000000000000e6 +1934 1 32 47 -0.26214400000000000000e6 +1934 2 2 32 -0.32768000000000000000e5 +1934 2 8 32 0.65536000000000000000e5 +1934 2 16 30 -0.65536000000000000000e5 +1934 2 20 34 -0.13107200000000000000e6 +1934 3 22 35 -0.26214400000000000000e6 +1934 3 28 41 -0.26214400000000000000e6 +1934 4 6 34 -0.13107200000000000000e6 +1935 2 4 34 -0.65536000000000000000e5 +1935 2 8 33 0.65536000000000000000e5 +1936 1 17 48 -0.13107200000000000000e6 +1936 1 28 43 0.65536000000000000000e5 +1936 1 32 47 0.65536000000000000000e5 +1936 1 33 48 0.65536000000000000000e5 +1936 2 8 34 0.65536000000000000000e5 +1936 3 28 41 0.65536000000000000000e5 +1936 3 29 42 0.65536000000000000000e5 +1937 2 8 35 0.65536000000000000000e5 +1937 2 21 35 -0.65536000000000000000e5 +1937 4 7 35 -0.65536000000000000000e5 +1938 1 2 33 0.32768000000000000000e5 +1938 1 4 35 0.65536000000000000000e5 +1938 1 5 20 -0.13107200000000000000e6 +1938 1 5 36 0.13107200000000000000e6 +1938 1 10 41 -0.32768000000000000000e5 +1938 1 11 42 -0.32768000000000000000e5 +1938 1 12 43 -0.65536000000000000000e5 +1938 1 14 45 -0.13107200000000000000e6 +1938 1 17 48 0.65536000000000000000e5 +1938 1 18 49 0.65536000000000000000e5 +1938 1 26 33 0.32768000000000000000e5 +1938 1 28 43 0.32768000000000000000e5 +1938 1 32 47 0.32768000000000000000e5 +1938 1 33 48 0.32768000000000000000e5 +1938 2 5 11 -0.32768000000000000000e5 +1938 2 9 9 0.65536000000000000000e5 +1938 2 12 26 0.32768000000000000000e5 +1938 2 14 28 0.65536000000000000000e5 +1938 3 2 15 -0.32768000000000000000e5 +1938 3 4 17 0.13107200000000000000e6 +1938 3 4 33 -0.32768000000000000000e5 +1938 3 5 18 0.65536000000000000000e5 +1938 3 10 11 0.32768000000000000000e5 +1938 3 13 42 0.13107200000000000000e6 +1938 3 14 27 -0.65536000000000000000e5 +1938 3 14 43 0.65536000000000000000e5 +1938 3 28 41 0.32768000000000000000e5 +1938 3 29 42 0.32768000000000000000e5 +1938 4 3 31 -0.32768000000000000000e5 +1938 4 8 12 0.65536000000000000000e5 +1938 4 8 20 0.32768000000000000000e5 +1938 4 9 21 -0.32768000000000000000e5 +1939 1 3 18 0.65536000000000000000e5 +1939 1 3 34 0.65536000000000000000e5 +1939 1 4 19 -0.13107200000000000000e6 +1939 1 4 35 0.65536000000000000000e5 +1939 2 9 10 0.65536000000000000000e5 +1939 3 3 16 0.65536000000000000000e5 +1939 3 4 17 0.65536000000000000000e5 +1940 1 3 18 0.65536000000000000000e5 +1940 1 4 35 0.65536000000000000000e5 +1940 1 5 20 0.13107200000000000000e6 +1940 1 5 36 -0.13107200000000000000e6 +1940 1 10 17 -0.13107200000000000000e6 +1940 1 14 45 0.13107200000000000000e6 +1940 1 17 48 -0.65536000000000000000e5 +1940 1 18 49 -0.65536000000000000000e5 +1940 2 9 11 0.65536000000000000000e5 +1940 2 14 28 -0.65536000000000000000e5 +1940 3 5 18 -0.65536000000000000000e5 +1940 3 5 34 0.65536000000000000000e5 +1940 3 13 42 -0.65536000000000000000e5 +1940 3 14 43 -0.65536000000000000000e5 +1940 4 8 12 -0.65536000000000000000e5 +1941 1 4 35 0.65536000000000000000e5 +1941 1 5 36 -0.13107200000000000000e6 +1941 1 14 45 0.13107200000000000000e6 +1941 1 15 30 0.65536000000000000000e5 +1941 1 17 48 -0.65536000000000000000e5 +1941 1 18 49 -0.65536000000000000000e5 +1941 2 9 12 0.65536000000000000000e5 +1941 2 14 28 -0.65536000000000000000e5 +1941 3 5 34 0.65536000000000000000e5 +1941 3 13 42 -0.65536000000000000000e5 +1941 3 14 43 -0.65536000000000000000e5 +1941 4 8 12 -0.65536000000000000000e5 +1942 1 3 18 -0.32768000000000000000e5 +1942 1 4 19 0.65536000000000000000e5 +1942 1 4 35 0.32768000000000000000e5 +1942 1 5 36 0.65536000000000000000e5 +1942 1 12 43 0.65536000000000000000e5 +1942 1 14 45 0.65536000000000000000e5 +1942 1 17 32 -0.13107200000000000000e6 +1942 1 17 48 -0.32768000000000000000e5 +1942 1 18 49 -0.32768000000000000000e5 +1942 2 9 13 0.65536000000000000000e5 +1942 2 9 23 0.32768000000000000000e5 +1942 2 14 28 -0.32768000000000000000e5 +1942 3 3 16 -0.32768000000000000000e5 +1942 3 4 17 -0.32768000000000000000e5 +1942 3 5 34 0.32768000000000000000e5 +1942 3 13 42 -0.32768000000000000000e5 +1942 3 14 27 0.65536000000000000000e5 +1942 3 14 43 -0.32768000000000000000e5 +1942 4 2 14 -0.32768000000000000000e5 +1942 4 3 15 -0.65536000000000000000e5 +1943 1 3 18 0.32768000000000000000e5 +1943 1 4 35 -0.32768000000000000000e5 +1943 1 5 20 0.13107200000000000000e6 +1943 1 5 36 -0.65536000000000000000e5 +1943 1 10 17 0.13107200000000000000e6 +1943 1 11 18 0.65536000000000000000e5 +1943 1 12 43 -0.65536000000000000000e5 +1943 1 13 20 -0.26214400000000000000e6 +1943 1 14 45 -0.65536000000000000000e5 +1943 1 17 32 0.13107200000000000000e6 +1943 1 17 48 0.32768000000000000000e5 +1943 1 18 49 0.32768000000000000000e5 +1943 1 20 27 0.13107200000000000000e6 +1943 2 9 14 0.65536000000000000000e5 +1943 2 9 23 -0.32768000000000000000e5 +1943 2 11 25 0.13107200000000000000e6 +1943 2 14 28 0.32768000000000000000e5 +1943 3 3 16 0.32768000000000000000e5 +1943 3 4 17 0.32768000000000000000e5 +1943 3 5 34 -0.32768000000000000000e5 +1943 3 7 20 0.13107200000000000000e6 +1943 3 13 42 0.32768000000000000000e5 +1943 3 14 27 -0.65536000000000000000e5 +1943 3 14 43 0.32768000000000000000e5 +1943 4 2 14 0.32768000000000000000e5 +1943 4 3 15 0.65536000000000000000e5 +1943 4 10 14 0.13107200000000000000e6 +1944 1 9 40 -0.65536000000000000000e5 +1944 1 10 41 0.13107200000000000000e6 +1944 1 11 42 -0.13107200000000000000e6 +1944 1 26 41 0.65536000000000000000e5 +1944 1 32 47 -0.13107200000000000000e6 +1944 1 33 48 0.13107200000000000000e6 +1944 2 9 16 0.65536000000000000000e5 +1944 2 12 26 0.13107200000000000000e6 +1944 2 16 30 -0.65536000000000000000e5 +1944 2 20 34 -0.13107200000000000000e6 +1944 3 8 37 0.65536000000000000000e5 +1944 3 13 42 0.26214400000000000000e6 +1944 3 22 35 -0.26214400000000000000e6 +1944 3 28 41 -0.13107200000000000000e6 +1944 3 29 42 0.13107200000000000000e6 +1944 4 2 30 -0.65536000000000000000e5 +1944 4 3 31 -0.13107200000000000000e6 +1944 4 6 18 -0.65536000000000000000e5 +1944 4 6 34 -0.13107200000000000000e6 +1945 1 1 48 -0.32768000000000000000e5 +1945 1 2 49 -0.32768000000000000000e5 +1945 1 9 40 -0.65536000000000000000e5 +1945 1 10 25 0.65536000000000000000e5 +1945 1 12 43 0.26214400000000000000e6 +1945 1 23 38 -0.32768000000000000000e5 +1945 1 26 41 0.65536000000000000000e5 +1945 1 28 43 -0.13107200000000000000e6 +1945 1 32 47 -0.26214400000000000000e6 +1945 2 2 32 -0.32768000000000000000e5 +1945 2 9 17 0.65536000000000000000e5 +1945 2 16 30 -0.65536000000000000000e5 +1945 2 20 34 -0.13107200000000000000e6 +1945 3 1 30 0.65536000000000000000e5 +1945 3 3 32 -0.13107200000000000000e6 +1945 3 10 23 0.65536000000000000000e5 +1945 3 22 35 -0.26214400000000000000e6 +1945 3 28 41 -0.26214400000000000000e6 +1945 4 2 30 -0.65536000000000000000e5 +1945 4 6 34 -0.13107200000000000000e6 +1946 1 9 40 0.65536000000000000000e5 +1946 1 10 41 0.13107200000000000000e6 +1946 1 11 42 0.13107200000000000000e6 +1946 1 26 41 -0.65536000000000000000e5 +1946 1 32 47 -0.13107200000000000000e6 +1946 1 33 48 -0.13107200000000000000e6 +1946 2 4 34 -0.65536000000000000000e5 +1946 2 9 18 0.65536000000000000000e5 +1946 3 9 38 0.65536000000000000000e5 +1946 3 10 39 0.65536000000000000000e5 +1946 3 13 42 -0.26214400000000000000e6 +1946 3 28 41 -0.13107200000000000000e6 +1946 3 29 42 -0.13107200000000000000e6 +1946 4 3 31 0.13107200000000000000e6 +1946 4 7 19 -0.65536000000000000000e5 +1947 1 1 48 0.32768000000000000000e5 +1947 1 2 33 -0.13107200000000000000e6 +1947 1 2 49 0.32768000000000000000e5 +1947 1 8 39 0.65536000000000000000e5 +1947 1 9 40 0.13107200000000000000e6 +1947 1 10 41 -0.13107200000000000000e6 +1947 1 11 26 0.65536000000000000000e5 +1947 1 23 38 0.32768000000000000000e5 +1947 1 26 41 -0.13107200000000000000e6 +1947 1 28 43 0.13107200000000000000e6 +1947 1 32 47 0.13107200000000000000e6 +1947 1 33 48 -0.13107200000000000000e6 +1947 2 2 32 0.32768000000000000000e5 +1947 2 4 34 -0.65536000000000000000e5 +1947 2 9 19 0.65536000000000000000e5 +1947 2 12 26 -0.13107200000000000000e6 +1947 2 16 30 0.65536000000000000000e5 +1947 2 20 34 0.13107200000000000000e6 +1947 3 3 32 -0.13107200000000000000e6 +1947 3 4 33 -0.13107200000000000000e6 +1947 3 9 38 0.65536000000000000000e5 +1947 3 10 23 -0.65536000000000000000e5 +1947 3 10 39 0.65536000000000000000e5 +1947 3 13 42 -0.26214400000000000000e6 +1947 3 14 27 0.26214400000000000000e6 +1947 3 22 35 0.26214400000000000000e6 +1947 3 28 41 0.13107200000000000000e6 +1947 3 29 42 -0.13107200000000000000e6 +1947 4 2 30 0.65536000000000000000e5 +1947 4 3 31 0.13107200000000000000e6 +1947 4 6 34 0.13107200000000000000e6 +1947 4 7 19 -0.65536000000000000000e5 +1947 4 8 20 -0.13107200000000000000e6 +1948 2 9 20 0.65536000000000000000e5 +1948 2 12 26 -0.65536000000000000000e5 +1948 4 8 20 -0.65536000000000000000e5 +1949 1 2 33 -0.65536000000000000000e5 +1949 1 4 35 -0.13107200000000000000e6 +1949 1 11 42 0.65536000000000000000e5 +1949 1 12 43 0.13107200000000000000e6 +1949 2 9 21 0.65536000000000000000e5 +1949 2 12 26 -0.65536000000000000000e5 +1949 3 4 33 0.65536000000000000000e5 +1949 3 14 27 0.13107200000000000000e6 +1949 4 8 20 -0.65536000000000000000e5 +1950 1 10 41 -0.65536000000000000000e5 +1950 1 14 45 -0.26214400000000000000e6 +1950 1 17 48 0.13107200000000000000e6 +1950 1 18 49 0.13107200000000000000e6 +1950 1 26 33 0.65536000000000000000e5 +1950 1 28 43 0.65536000000000000000e5 +1950 1 32 47 0.65536000000000000000e5 +1950 1 33 48 0.65536000000000000000e5 +1950 2 9 22 0.65536000000000000000e5 +1950 2 14 28 0.13107200000000000000e6 +1950 3 13 42 0.26214400000000000000e6 +1950 3 14 43 0.13107200000000000000e6 +1950 3 28 41 0.65536000000000000000e5 +1950 3 29 42 0.65536000000000000000e5 +1950 4 3 31 -0.65536000000000000000e5 +1950 4 9 21 -0.65536000000000000000e5 +1951 1 4 35 0.65536000000000000000e5 +1951 1 5 36 -0.13107200000000000000e6 +1951 1 14 45 0.13107200000000000000e6 +1951 1 15 30 0.65536000000000000000e5 +1951 1 17 48 -0.65536000000000000000e5 +1951 1 18 49 -0.65536000000000000000e5 +1951 2 9 24 0.65536000000000000000e5 +1951 2 14 28 -0.65536000000000000000e5 +1951 3 5 34 0.65536000000000000000e5 +1951 3 13 42 -0.65536000000000000000e5 +1951 3 14 43 -0.65536000000000000000e5 +1952 1 4 35 0.32768000000000000000e5 +1952 1 5 36 0.65536000000000000000e5 +1952 1 11 18 0.65536000000000000000e5 +1952 1 12 43 0.32768000000000000000e5 +1952 1 13 20 -0.26214400000000000000e6 +1952 1 14 45 0.65536000000000000000e5 +1952 1 17 32 0.13107200000000000000e6 +1952 1 17 48 -0.32768000000000000000e5 +1952 1 18 49 -0.32768000000000000000e5 +1952 1 20 27 0.13107200000000000000e6 +1952 2 9 23 0.32768000000000000000e5 +1952 2 9 25 0.65536000000000000000e5 +1952 2 11 25 0.13107200000000000000e6 +1952 2 14 28 -0.32768000000000000000e5 +1952 3 5 34 0.32768000000000000000e5 +1952 3 6 19 -0.65536000000000000000e5 +1952 3 8 21 0.26214400000000000000e6 +1952 3 13 42 -0.32768000000000000000e5 +1952 3 14 27 0.32768000000000000000e5 +1952 3 14 43 -0.32768000000000000000e5 +1953 1 1 48 -0.32768000000000000000e5 +1953 1 2 49 -0.32768000000000000000e5 +1953 1 12 43 0.26214400000000000000e6 +1953 1 23 38 -0.32768000000000000000e5 +1953 1 26 41 0.65536000000000000000e5 +1953 1 28 43 -0.13107200000000000000e6 +1953 1 32 47 -0.26214400000000000000e6 +1953 2 2 32 -0.32768000000000000000e5 +1953 2 9 26 0.65536000000000000000e5 +1953 2 16 30 -0.65536000000000000000e5 +1953 2 20 34 -0.13107200000000000000e6 +1953 3 22 35 -0.26214400000000000000e6 +1953 3 28 41 -0.26214400000000000000e6 +1953 4 2 30 -0.65536000000000000000e5 +1953 4 6 34 -0.13107200000000000000e6 +1954 1 9 40 0.65536000000000000000e5 +1954 1 10 41 0.13107200000000000000e6 +1954 1 11 42 0.13107200000000000000e6 +1954 1 26 41 -0.65536000000000000000e5 +1954 1 32 47 -0.13107200000000000000e6 +1954 1 33 48 -0.13107200000000000000e6 +1954 2 4 34 -0.65536000000000000000e5 +1954 2 9 27 0.65536000000000000000e5 +1954 3 9 38 0.65536000000000000000e5 +1954 3 10 39 0.65536000000000000000e5 +1954 3 13 42 -0.26214400000000000000e6 +1954 3 28 41 -0.13107200000000000000e6 +1954 3 29 42 -0.13107200000000000000e6 +1954 4 3 31 0.13107200000000000000e6 +1955 2 9 28 0.65536000000000000000e5 +1955 2 28 34 -0.65536000000000000000e5 +1955 4 18 22 -0.65536000000000000000e5 +1955 4 18 30 -0.65536000000000000000e5 +1955 4 21 33 -0.65536000000000000000e5 +1956 1 17 48 -0.13107200000000000000e6 +1956 1 28 43 0.65536000000000000000e5 +1956 1 32 47 0.65536000000000000000e5 +1956 1 33 48 0.65536000000000000000e5 +1956 2 9 29 0.65536000000000000000e5 +1956 3 28 41 0.65536000000000000000e5 +1956 3 29 42 0.65536000000000000000e5 +1956 4 3 31 -0.65536000000000000000e5 +1957 1 10 41 -0.65536000000000000000e5 +1957 1 14 45 -0.26214400000000000000e6 +1957 1 17 48 0.13107200000000000000e6 +1957 1 18 49 0.13107200000000000000e6 +1957 1 26 33 0.65536000000000000000e5 +1957 1 28 43 0.65536000000000000000e5 +1957 1 32 47 0.65536000000000000000e5 +1957 1 33 48 0.65536000000000000000e5 +1957 2 9 30 0.65536000000000000000e5 +1957 2 14 28 0.13107200000000000000e6 +1957 3 13 42 0.26214400000000000000e6 +1957 3 14 43 0.13107200000000000000e6 +1957 3 28 41 0.65536000000000000000e5 +1957 3 29 42 0.65536000000000000000e5 +1957 4 3 31 -0.65536000000000000000e5 +1958 2 9 31 0.65536000000000000000e5 +1958 2 14 28 -0.65536000000000000000e5 +1959 2 4 34 -0.65536000000000000000e5 +1959 2 9 32 0.65536000000000000000e5 +1960 2 9 33 0.65536000000000000000e5 +1960 2 28 34 -0.65536000000000000000e5 +1960 4 18 30 -0.65536000000000000000e5 +1960 4 21 33 -0.65536000000000000000e5 +1961 1 28 43 0.65536000000000000000e5 +1961 1 33 40 0.65536000000000000000e5 +1961 1 33 48 0.65536000000000000000e5 +1961 1 34 49 -0.13107200000000000000e6 +1961 2 9 34 0.65536000000000000000e5 +1961 3 18 47 -0.13107200000000000000e6 +1961 3 29 42 0.65536000000000000000e5 +1962 2 9 35 0.65536000000000000000e5 +1962 2 28 34 -0.65536000000000000000e5 +1962 4 21 33 -0.65536000000000000000e5 +1963 2 1 15 -0.32768000000000000000e5 +1963 2 10 10 0.65536000000000000000e5 +1964 2 7 13 -0.65536000000000000000e5 +1964 2 10 11 0.65536000000000000000e5 +1965 1 2 17 0.32768000000000000000e5 +1965 1 3 18 0.32768000000000000000e5 +1965 1 3 34 0.32768000000000000000e5 +1965 1 4 19 0.65536000000000000000e5 +1965 1 10 17 0.65536000000000000000e5 +1965 1 20 27 -0.13107200000000000000e6 +1965 2 6 12 0.32768000000000000000e5 +1965 2 10 12 0.65536000000000000000e5 +1965 3 3 16 0.32768000000000000000e5 +1965 3 7 20 -0.13107200000000000000e6 +1966 1 2 17 0.65536000000000000000e5 +1966 1 3 18 0.32768000000000000000e5 +1966 1 3 34 0.32768000000000000000e5 +1966 1 4 19 0.32768000000000000000e5 +1966 1 4 35 0.32768000000000000000e5 +1966 1 7 16 0.32768000000000000000e5 +1966 1 12 19 -0.13107200000000000000e6 +1966 1 12 43 0.32768000000000000000e5 +1966 1 14 45 0.65536000000000000000e5 +1966 1 16 23 -0.32768000000000000000e5 +1966 1 16 31 0.13107200000000000000e6 +1966 1 17 48 -0.32768000000000000000e5 +1966 1 18 49 -0.32768000000000000000e5 +1966 1 20 27 -0.65536000000000000000e5 +1966 2 1 15 0.32768000000000000000e5 +1966 2 6 12 0.32768000000000000000e5 +1966 2 7 13 -0.32768000000000000000e5 +1966 2 9 23 0.32768000000000000000e5 +1966 2 10 13 0.65536000000000000000e5 +1966 2 10 24 0.65536000000000000000e5 +1966 2 14 28 -0.32768000000000000000e5 +1966 3 3 16 0.65536000000000000000e5 +1966 3 5 34 0.32768000000000000000e5 +1966 3 7 12 0.32768000000000000000e5 +1966 3 7 20 0.65536000000000000000e5 +1966 3 13 42 -0.32768000000000000000e5 +1966 3 14 27 0.32768000000000000000e5 +1966 3 14 43 -0.32768000000000000000e5 +1966 4 1 13 0.32768000000000000000e5 +1966 4 10 10 0.13107200000000000000e6 +1967 2 10 14 0.65536000000000000000e5 +1967 2 11 13 -0.65536000000000000000e5 +1968 1 2 17 0.16384000000000000000e5 +1968 1 3 18 0.16384000000000000000e5 +1968 1 3 34 0.81920000000000000000e4 +1968 1 4 19 0.16384000000000000000e5 +1968 1 5 20 0.16384000000000000000e5 +1968 1 5 36 -0.16384000000000000000e5 +1968 1 10 17 0.16384000000000000000e5 +1968 1 12 19 0.65536000000000000000e5 +1968 1 12 43 -0.81920000000000000000e4 +1968 1 13 20 0.65536000000000000000e5 +1968 1 16 19 -0.13107200000000000000e6 +1968 1 16 23 -0.81920000000000000000e4 +1968 1 16 31 0.32768000000000000000e5 +1968 1 17 32 0.32768000000000000000e5 +1968 2 6 12 0.81920000000000000000e4 +1968 2 10 15 0.65536000000000000000e5 +1968 2 10 24 0.16384000000000000000e5 +1968 2 11 13 0.32768000000000000000e5 +1968 3 3 16 0.24576000000000000000e5 +1968 3 4 17 0.81920000000000000000e4 +1968 3 7 12 0.81920000000000000000e4 +1968 3 7 20 0.32768000000000000000e5 +1968 3 14 27 -0.81920000000000000000e4 +1968 4 1 13 0.81920000000000000000e4 +1968 4 2 14 0.81920000000000000000e4 +1968 4 3 15 0.16384000000000000000e5 +1968 4 10 10 0.32768000000000000000e5 +1969 2 6 20 -0.65536000000000000000e5 +1969 2 10 16 0.65536000000000000000e5 +1970 1 1 32 0.65536000000000000000e5 +1970 1 3 34 0.13107200000000000000e6 +1970 1 10 41 -0.65536000000000000000e5 +1970 1 16 23 -0.13107200000000000000e6 +1970 2 7 21 -0.65536000000000000000e5 +1970 2 10 17 0.65536000000000000000e5 +1970 3 3 32 -0.65536000000000000000e5 +1971 2 7 21 -0.65536000000000000000e5 +1971 2 10 18 0.65536000000000000000e5 +1972 2 10 19 0.65536000000000000000e5 +1972 2 12 26 -0.65536000000000000000e5 +1972 4 8 20 -0.65536000000000000000e5 +1973 1 3 34 0.65536000000000000000e5 +1973 1 4 35 -0.65536000000000000000e5 +1973 1 12 27 0.65536000000000000000e5 +1973 1 12 43 -0.65536000000000000000e5 +1973 1 14 45 -0.13107200000000000000e6 +1973 1 16 23 0.65536000000000000000e5 +1973 1 16 31 -0.26214400000000000000e6 +1973 1 17 48 0.65536000000000000000e5 +1973 1 18 49 0.65536000000000000000e5 +1973 1 20 27 0.26214400000000000000e6 +1973 2 7 13 0.13107200000000000000e6 +1973 2 9 23 -0.65536000000000000000e5 +1973 2 10 20 0.65536000000000000000e5 +1973 2 10 24 -0.13107200000000000000e6 +1973 2 14 28 0.65536000000000000000e5 +1973 3 5 34 -0.65536000000000000000e5 +1973 3 13 42 0.65536000000000000000e5 +1973 3 14 27 -0.65536000000000000000e5 +1973 3 14 43 0.65536000000000000000e5 +1973 4 10 10 -0.26214400000000000000e6 +1974 1 3 18 -0.65536000000000000000e5 +1974 1 3 34 0.65536000000000000000e5 +1974 1 4 19 0.13107200000000000000e6 +1974 1 4 35 0.65536000000000000000e5 +1974 1 12 43 0.19660800000000000000e6 +1974 1 14 45 0.13107200000000000000e6 +1974 1 16 23 0.65536000000000000000e5 +1974 1 17 48 -0.65536000000000000000e5 +1974 1 18 49 -0.65536000000000000000e5 +1974 1 20 27 -0.26214400000000000000e6 +1974 2 9 23 0.65536000000000000000e5 +1974 2 10 21 0.65536000000000000000e5 +1974 2 10 24 0.13107200000000000000e6 +1974 2 14 28 -0.65536000000000000000e5 +1974 3 3 16 -0.65536000000000000000e5 +1974 3 4 17 -0.65536000000000000000e5 +1974 3 5 34 0.65536000000000000000e5 +1974 3 13 42 -0.65536000000000000000e5 +1974 3 14 27 0.19660800000000000000e6 +1974 3 14 43 -0.65536000000000000000e5 +1974 4 2 14 -0.65536000000000000000e5 +1975 1 3 18 0.65536000000000000000e5 +1975 1 3 34 0.65536000000000000000e5 +1975 1 4 19 -0.13107200000000000000e6 +1975 1 4 35 0.65536000000000000000e5 +1975 2 10 22 0.65536000000000000000e5 +1975 3 3 16 0.65536000000000000000e5 +1975 3 4 17 0.65536000000000000000e5 +1975 4 2 14 0.65536000000000000000e5 +1976 2 7 13 -0.65536000000000000000e5 +1976 2 10 23 0.65536000000000000000e5 +1976 4 10 10 0.13107200000000000000e6 +1977 1 2 17 -0.32768000000000000000e5 +1977 1 3 18 -0.32768000000000000000e5 +1977 1 3 34 -0.16384000000000000000e5 +1977 1 4 19 -0.32768000000000000000e5 +1977 1 5 20 -0.32768000000000000000e5 +1977 1 5 36 0.32768000000000000000e5 +1977 1 10 17 -0.32768000000000000000e5 +1977 1 12 43 0.16384000000000000000e5 +1977 1 16 23 0.16384000000000000000e5 +1977 1 20 27 0.65536000000000000000e5 +1977 2 6 12 -0.16384000000000000000e5 +1977 2 10 24 -0.32768000000000000000e5 +1977 2 10 25 0.65536000000000000000e5 +1977 2 11 13 -0.65536000000000000000e5 +1977 3 3 16 -0.49152000000000000000e5 +1977 3 4 17 -0.16384000000000000000e5 +1977 3 7 12 -0.16384000000000000000e5 +1977 3 7 20 -0.65536000000000000000e5 +1977 3 8 21 -0.13107200000000000000e6 +1977 3 12 21 0.26214400000000000000e6 +1977 3 14 19 -0.13107200000000000000e6 +1977 3 14 27 0.16384000000000000000e5 +1977 4 1 13 -0.16384000000000000000e5 +1977 4 2 14 -0.16384000000000000000e5 +1977 4 3 15 -0.32768000000000000000e5 +1977 4 10 10 -0.65536000000000000000e5 +1977 4 13 13 -0.26214400000000000000e6 +1978 2 1 31 -0.65536000000000000000e5 +1978 2 10 26 0.65536000000000000000e5 +1979 1 2 33 -0.65536000000000000000e5 +1979 1 3 34 0.13107200000000000000e6 +1979 1 11 42 0.65536000000000000000e5 +1979 1 12 43 0.13107200000000000000e6 +1979 1 16 47 -0.13107200000000000000e6 +1979 1 28 43 -0.65536000000000000000e5 +1979 1 32 47 -0.65536000000000000000e5 +1979 1 33 48 -0.65536000000000000000e5 +1979 2 7 21 -0.65536000000000000000e5 +1979 2 10 27 0.65536000000000000000e5 +1979 2 12 26 -0.65536000000000000000e5 +1979 3 2 31 -0.65536000000000000000e5 +1979 3 3 32 -0.65536000000000000000e5 +1979 3 12 41 -0.13107200000000000000e6 +1979 3 13 42 -0.13107200000000000000e6 +1979 3 28 41 -0.65536000000000000000e5 +1979 3 29 42 -0.65536000000000000000e5 +1979 4 3 31 0.65536000000000000000e5 +1980 2 10 28 0.65536000000000000000e5 +1980 2 12 26 -0.65536000000000000000e5 +1981 1 12 43 0.65536000000000000000e5 +1981 1 16 23 0.65536000000000000000e5 +1981 1 16 47 0.65536000000000000000e5 +1981 1 27 34 -0.13107200000000000000e6 +1981 2 10 29 0.65536000000000000000e5 +1981 3 1 34 -0.65536000000000000000e5 +1981 3 12 41 0.65536000000000000000e5 +1982 1 12 43 0.65536000000000000000e5 +1982 1 13 44 -0.13107200000000000000e6 +1982 1 16 47 0.65536000000000000000e5 +1982 1 17 48 0.65536000000000000000e5 +1982 2 10 30 0.65536000000000000000e5 +1982 3 12 41 0.65536000000000000000e5 +1982 3 13 42 0.65536000000000000000e5 +1983 1 4 35 0.32768000000000000000e5 +1983 1 12 43 0.32768000000000000000e5 +1983 1 13 44 0.65536000000000000000e5 +1983 1 14 45 0.65536000000000000000e5 +1983 1 17 48 -0.32768000000000000000e5 +1983 1 18 49 -0.32768000000000000000e5 +1983 1 20 27 -0.13107200000000000000e6 +1983 1 27 34 0.65536000000000000000e5 +1983 2 9 23 0.32768000000000000000e5 +1983 2 10 31 0.65536000000000000000e5 +1983 2 14 28 -0.32768000000000000000e5 +1983 3 5 34 0.32768000000000000000e5 +1983 3 7 36 0.13107200000000000000e6 +1983 3 13 42 -0.32768000000000000000e5 +1983 3 14 27 0.32768000000000000000e5 +1983 3 14 43 -0.32768000000000000000e5 +1983 3 16 29 -0.65536000000000000000e5 +1984 1 2 33 -0.65536000000000000000e5 +1984 1 3 34 0.13107200000000000000e6 +1984 1 9 40 0.32768000000000000000e5 +1984 1 10 41 -0.13107200000000000000e6 +1984 1 12 43 0.13107200000000000000e6 +1984 1 16 47 -0.13107200000000000000e6 +1984 1 26 41 -0.32768000000000000000e5 +1984 1 28 43 -0.65536000000000000000e5 +1984 1 32 47 0.65536000000000000000e5 +1984 2 7 21 -0.65536000000000000000e5 +1984 2 10 32 0.65536000000000000000e5 +1984 2 20 34 -0.65536000000000000000e5 +1984 3 2 31 -0.65536000000000000000e5 +1984 3 3 32 -0.65536000000000000000e5 +1984 3 8 37 -0.32768000000000000000e5 +1984 3 9 38 0.32768000000000000000e5 +1984 3 22 27 -0.32768000000000000000e5 +1984 3 22 35 -0.13107200000000000000e6 +1984 3 28 41 0.65536000000000000000e5 +1984 4 1 29 -0.32768000000000000000e5 +1984 4 2 30 0.32768000000000000000e5 +1984 4 6 34 -0.65536000000000000000e5 +1985 2 10 33 0.65536000000000000000e5 +1985 2 20 34 -0.65536000000000000000e5 +1985 4 6 34 -0.65536000000000000000e5 +1986 1 12 43 0.65536000000000000000e5 +1986 1 16 47 0.65536000000000000000e5 +1986 1 17 48 0.65536000000000000000e5 +1986 1 34 41 -0.13107200000000000000e6 +1986 2 10 34 0.65536000000000000000e5 +1986 3 22 35 -0.65536000000000000000e5 +1987 2 10 35 0.65536000000000000000e5 +1987 2 20 34 -0.65536000000000000000e5 +1988 1 2 17 0.16384000000000000000e5 +1988 1 3 18 0.16384000000000000000e5 +1988 1 3 34 0.16384000000000000000e5 +1988 1 4 19 0.32768000000000000000e5 +1988 1 10 17 0.32768000000000000000e5 +1988 1 20 27 -0.65536000000000000000e5 +1988 2 6 12 0.16384000000000000000e5 +1988 2 11 11 0.65536000000000000000e5 +1988 3 3 16 0.16384000000000000000e5 +1988 3 7 20 -0.65536000000000000000e5 +1989 1 3 18 -0.32768000000000000000e5 +1989 1 4 19 0.65536000000000000000e5 +1989 1 4 35 0.32768000000000000000e5 +1989 1 5 36 0.65536000000000000000e5 +1989 1 12 43 0.65536000000000000000e5 +1989 1 14 45 0.65536000000000000000e5 +1989 1 17 32 -0.13107200000000000000e6 +1989 1 17 48 -0.32768000000000000000e5 +1989 1 18 49 -0.32768000000000000000e5 +1989 2 9 23 0.32768000000000000000e5 +1989 2 11 12 0.65536000000000000000e5 +1989 2 14 28 -0.32768000000000000000e5 +1989 3 3 16 -0.32768000000000000000e5 +1989 3 4 17 -0.32768000000000000000e5 +1989 3 5 34 0.32768000000000000000e5 +1989 3 13 42 -0.32768000000000000000e5 +1989 3 14 27 0.65536000000000000000e5 +1989 3 14 43 -0.32768000000000000000e5 +1989 4 2 14 -0.32768000000000000000e5 +1989 4 3 15 -0.65536000000000000000e5 +1990 2 11 14 0.65536000000000000000e5 +1990 2 11 25 -0.65536000000000000000e5 +1990 4 10 14 -0.65536000000000000000e5 +1991 1 2 17 0.16384000000000000000e5 +1991 1 3 18 0.16384000000000000000e5 +1991 1 3 34 0.81920000000000000000e4 +1991 1 4 19 0.16384000000000000000e5 +1991 1 5 20 0.16384000000000000000e5 +1991 1 5 36 -0.16384000000000000000e5 +1991 1 6 21 0.32768000000000000000e5 +1991 1 10 17 0.16384000000000000000e5 +1991 1 12 43 -0.81920000000000000000e4 +1991 1 13 20 0.13107200000000000000e6 +1991 1 16 23 -0.81920000000000000000e4 +1991 1 16 31 0.32768000000000000000e5 +1991 1 17 32 0.32768000000000000000e5 +1991 1 19 34 -0.13107200000000000000e6 +1991 1 20 27 -0.32768000000000000000e5 +1991 2 6 12 0.81920000000000000000e4 +1991 2 9 15 0.32768000000000000000e5 +1991 2 10 24 0.16384000000000000000e5 +1991 2 11 13 0.32768000000000000000e5 +1991 2 11 15 0.65536000000000000000e5 +1991 2 11 25 -0.32768000000000000000e5 +1991 3 3 16 0.24576000000000000000e5 +1991 3 4 17 0.81920000000000000000e4 +1991 3 7 12 0.81920000000000000000e4 +1991 3 12 21 -0.13107200000000000000e6 +1991 3 14 27 -0.81920000000000000000e4 +1991 4 1 13 0.81920000000000000000e4 +1991 4 2 14 0.81920000000000000000e4 +1991 4 3 15 0.16384000000000000000e5 +1991 4 10 10 0.32768000000000000000e5 +1991 4 10 14 -0.32768000000000000000e5 +1992 1 1 32 0.65536000000000000000e5 +1992 1 3 34 0.13107200000000000000e6 +1992 1 10 41 -0.65536000000000000000e5 +1992 1 16 23 -0.13107200000000000000e6 +1992 2 7 21 -0.65536000000000000000e5 +1992 2 11 16 0.65536000000000000000e5 +1992 3 3 32 -0.65536000000000000000e5 +1993 2 7 21 -0.65536000000000000000e5 +1993 2 11 17 0.65536000000000000000e5 +1994 2 11 18 0.65536000000000000000e5 +1994 2 12 26 -0.65536000000000000000e5 +1994 4 8 20 -0.65536000000000000000e5 +1995 1 2 33 -0.65536000000000000000e5 +1995 1 4 35 -0.13107200000000000000e6 +1995 1 11 42 0.65536000000000000000e5 +1995 1 12 43 0.13107200000000000000e6 +1995 2 11 19 0.65536000000000000000e5 +1995 2 12 26 -0.65536000000000000000e5 +1995 3 4 33 0.65536000000000000000e5 +1995 3 14 27 0.13107200000000000000e6 +1995 4 8 20 -0.65536000000000000000e5 +1996 1 3 18 -0.65536000000000000000e5 +1996 1 3 34 0.65536000000000000000e5 +1996 1 4 19 0.13107200000000000000e6 +1996 1 4 35 0.65536000000000000000e5 +1996 1 12 43 0.19660800000000000000e6 +1996 1 14 45 0.13107200000000000000e6 +1996 1 16 23 0.65536000000000000000e5 +1996 1 17 48 -0.65536000000000000000e5 +1996 1 18 49 -0.65536000000000000000e5 +1996 1 20 27 -0.26214400000000000000e6 +1996 2 9 23 0.65536000000000000000e5 +1996 2 10 24 0.13107200000000000000e6 +1996 2 11 20 0.65536000000000000000e5 +1996 2 14 28 -0.65536000000000000000e5 +1996 3 3 16 -0.65536000000000000000e5 +1996 3 4 17 -0.65536000000000000000e5 +1996 3 5 34 0.65536000000000000000e5 +1996 3 13 42 -0.65536000000000000000e5 +1996 3 14 27 0.19660800000000000000e6 +1996 3 14 43 -0.65536000000000000000e5 +1996 4 2 14 -0.65536000000000000000e5 +1997 1 3 18 0.65536000000000000000e5 +1997 1 3 34 0.65536000000000000000e5 +1997 1 4 19 -0.13107200000000000000e6 +1997 1 4 35 0.65536000000000000000e5 +1997 2 11 21 0.65536000000000000000e5 +1997 3 3 16 0.65536000000000000000e5 +1997 3 4 17 0.65536000000000000000e5 +1997 4 2 14 0.65536000000000000000e5 +1998 2 9 23 -0.65536000000000000000e5 +1998 2 11 22 0.65536000000000000000e5 +1999 2 10 24 -0.65536000000000000000e5 +1999 2 11 23 0.65536000000000000000e5 +2000 1 3 18 -0.32768000000000000000e5 +2000 1 4 19 0.65536000000000000000e5 +2000 1 4 35 0.32768000000000000000e5 +2000 1 5 36 0.65536000000000000000e5 +2000 1 12 43 0.65536000000000000000e5 +2000 1 14 45 0.65536000000000000000e5 +2000 1 17 32 -0.13107200000000000000e6 +2000 1 17 48 -0.32768000000000000000e5 +2000 1 18 49 -0.32768000000000000000e5 +2000 2 9 23 0.32768000000000000000e5 +2000 2 11 24 0.65536000000000000000e5 +2000 2 14 28 -0.32768000000000000000e5 +2000 3 3 16 -0.32768000000000000000e5 +2000 3 4 17 -0.32768000000000000000e5 +2000 3 5 34 0.32768000000000000000e5 +2000 3 13 42 -0.32768000000000000000e5 +2000 3 14 27 0.65536000000000000000e5 +2000 3 14 43 -0.32768000000000000000e5 +2000 4 2 14 -0.32768000000000000000e5 +2001 1 2 33 -0.65536000000000000000e5 +2001 1 3 34 0.13107200000000000000e6 +2001 1 11 42 0.65536000000000000000e5 +2001 1 12 43 0.13107200000000000000e6 +2001 1 16 47 -0.13107200000000000000e6 +2001 1 28 43 -0.65536000000000000000e5 +2001 1 32 47 -0.65536000000000000000e5 +2001 1 33 48 -0.65536000000000000000e5 +2001 2 7 21 -0.65536000000000000000e5 +2001 2 11 26 0.65536000000000000000e5 +2001 2 12 26 -0.65536000000000000000e5 +2001 3 2 31 -0.65536000000000000000e5 +2001 3 3 32 -0.65536000000000000000e5 +2001 3 12 41 -0.13107200000000000000e6 +2001 3 13 42 -0.13107200000000000000e6 +2001 3 28 41 -0.65536000000000000000e5 +2001 3 29 42 -0.65536000000000000000e5 +2001 4 3 31 0.65536000000000000000e5 +2002 2 11 27 0.65536000000000000000e5 +2002 2 12 26 -0.65536000000000000000e5 +2003 1 17 48 -0.13107200000000000000e6 +2003 1 28 43 0.65536000000000000000e5 +2003 1 32 47 0.65536000000000000000e5 +2003 1 33 48 0.65536000000000000000e5 +2003 2 11 28 0.65536000000000000000e5 +2003 3 28 41 0.65536000000000000000e5 +2003 3 29 42 0.65536000000000000000e5 +2003 4 3 31 -0.65536000000000000000e5 +2004 1 12 43 0.65536000000000000000e5 +2004 1 13 44 -0.13107200000000000000e6 +2004 1 16 47 0.65536000000000000000e5 +2004 1 17 48 0.65536000000000000000e5 +2004 2 11 29 0.65536000000000000000e5 +2004 3 12 41 0.65536000000000000000e5 +2004 3 13 42 0.65536000000000000000e5 +2005 1 4 35 -0.65536000000000000000e5 +2005 1 17 48 0.65536000000000000000e5 +2005 2 9 23 -0.65536000000000000000e5 +2005 2 11 30 0.65536000000000000000e5 +2005 3 5 34 -0.65536000000000000000e5 +2005 3 13 42 0.65536000000000000000e5 +2005 3 14 27 -0.65536000000000000000e5 +2005 3 16 29 0.13107200000000000000e6 +2006 1 3 18 -0.32768000000000000000e5 +2006 1 4 19 0.65536000000000000000e5 +2006 1 4 35 0.32768000000000000000e5 +2006 1 5 36 0.65536000000000000000e5 +2006 1 12 43 0.65536000000000000000e5 +2006 1 14 45 0.65536000000000000000e5 +2006 1 17 32 -0.13107200000000000000e6 +2006 1 17 48 -0.32768000000000000000e5 +2006 1 18 49 -0.32768000000000000000e5 +2006 2 9 23 0.32768000000000000000e5 +2006 2 11 31 0.65536000000000000000e5 +2006 2 14 28 -0.32768000000000000000e5 +2006 3 3 16 -0.32768000000000000000e5 +2006 3 4 17 -0.32768000000000000000e5 +2006 3 5 34 0.32768000000000000000e5 +2006 3 13 42 -0.32768000000000000000e5 +2006 3 14 27 0.65536000000000000000e5 +2006 3 14 43 -0.32768000000000000000e5 +2006 4 2 14 -0.32768000000000000000e5 +2006 4 11 23 0.65536000000000000000e5 +2007 2 11 32 0.65536000000000000000e5 +2007 2 20 34 -0.65536000000000000000e5 +2007 4 6 34 -0.65536000000000000000e5 +2008 1 17 48 -0.13107200000000000000e6 +2008 1 28 43 0.65536000000000000000e5 +2008 1 32 47 0.65536000000000000000e5 +2008 1 33 48 0.65536000000000000000e5 +2008 2 11 33 0.65536000000000000000e5 +2008 3 28 41 0.65536000000000000000e5 +2008 3 29 42 0.65536000000000000000e5 +2009 1 4 35 -0.65536000000000000000e5 +2009 1 17 48 0.65536000000000000000e5 +2009 2 9 23 -0.65536000000000000000e5 +2009 2 11 34 0.65536000000000000000e5 +2009 3 5 34 -0.65536000000000000000e5 +2009 3 13 42 0.65536000000000000000e5 +2009 3 14 27 -0.65536000000000000000e5 +2009 3 16 29 0.13107200000000000000e6 +2009 4 14 26 0.65536000000000000000e5 +2010 1 17 48 -0.13107200000000000000e6 +2010 1 28 43 0.65536000000000000000e5 +2010 1 32 47 0.65536000000000000000e5 +2010 1 33 48 0.65536000000000000000e5 +2010 2 11 35 0.65536000000000000000e5 +2010 3 28 41 0.65536000000000000000e5 +2010 3 29 42 0.65536000000000000000e5 +2010 4 23 27 0.65536000000000000000e5 +2011 1 3 18 0.16384000000000000000e5 +2011 1 4 35 -0.16384000000000000000e5 +2011 1 5 20 0.65536000000000000000e5 +2011 1 5 36 -0.32768000000000000000e5 +2011 1 10 17 0.65536000000000000000e5 +2011 1 11 18 0.32768000000000000000e5 +2011 1 12 43 -0.32768000000000000000e5 +2011 1 13 20 -0.13107200000000000000e6 +2011 1 14 45 -0.32768000000000000000e5 +2011 1 17 32 0.65536000000000000000e5 +2011 1 17 48 0.16384000000000000000e5 +2011 1 18 49 0.16384000000000000000e5 +2011 1 20 27 0.65536000000000000000e5 +2011 2 9 23 -0.16384000000000000000e5 +2011 2 11 25 0.65536000000000000000e5 +2011 2 12 12 0.65536000000000000000e5 +2011 2 14 28 0.16384000000000000000e5 +2011 3 3 16 0.16384000000000000000e5 +2011 3 4 17 0.16384000000000000000e5 +2011 3 5 34 -0.16384000000000000000e5 +2011 3 7 20 0.65536000000000000000e5 +2011 3 13 42 0.16384000000000000000e5 +2011 3 14 27 -0.32768000000000000000e5 +2011 3 14 43 0.16384000000000000000e5 +2011 4 2 14 0.16384000000000000000e5 +2011 4 3 15 0.32768000000000000000e5 +2011 4 10 14 0.65536000000000000000e5 +2012 2 11 25 -0.65536000000000000000e5 +2012 2 12 13 0.65536000000000000000e5 +2012 4 10 14 -0.65536000000000000000e5 +2013 2 9 15 -0.65536000000000000000e5 +2013 2 12 14 0.65536000000000000000e5 +2014 1 3 18 0.81920000000000000000e4 +2014 1 4 19 -0.16384000000000000000e5 +2014 1 5 36 -0.16384000000000000000e5 +2014 1 6 21 0.32768000000000000000e5 +2014 1 12 43 -0.81920000000000000000e4 +2014 1 13 20 0.13107200000000000000e6 +2014 1 13 44 0.16384000000000000000e5 +2014 1 14 45 0.16384000000000000000e5 +2014 1 20 27 -0.32768000000000000000e5 +2014 1 21 44 -0.13107200000000000000e6 +2014 1 33 36 0.65536000000000000000e5 +2014 2 9 15 0.32768000000000000000e5 +2014 2 11 25 -0.65536000000000000000e5 +2014 2 12 15 0.65536000000000000000e5 +2014 2 15 29 0.32768000000000000000e5 +2014 3 3 16 0.81920000000000000000e4 +2014 3 4 17 0.81920000000000000000e4 +2014 3 7 20 -0.32768000000000000000e5 +2014 3 7 36 -0.32768000000000000000e5 +2014 3 8 21 -0.65536000000000000000e5 +2014 3 14 19 -0.65536000000000000000e5 +2014 3 14 27 -0.81920000000000000000e4 +2014 3 16 29 -0.16384000000000000000e5 +2014 3 18 31 -0.32768000000000000000e5 +2014 3 19 32 -0.65536000000000000000e5 +2014 4 2 14 0.81920000000000000000e4 +2014 4 10 14 -0.32768000000000000000e5 +2014 4 11 15 -0.65536000000000000000e5 +2014 4 11 23 -0.16384000000000000000e5 +2014 4 13 25 -0.65536000000000000000e5 +2015 2 7 21 -0.65536000000000000000e5 +2015 2 12 16 0.65536000000000000000e5 +2016 2 12 17 0.65536000000000000000e5 +2016 2 12 26 -0.65536000000000000000e5 +2016 4 8 20 -0.65536000000000000000e5 +2017 1 2 33 -0.65536000000000000000e5 +2017 1 4 35 -0.13107200000000000000e6 +2017 1 11 42 0.65536000000000000000e5 +2017 1 12 43 0.13107200000000000000e6 +2017 2 12 18 0.65536000000000000000e5 +2017 2 12 26 -0.65536000000000000000e5 +2017 3 4 33 0.65536000000000000000e5 +2017 3 14 27 0.13107200000000000000e6 +2017 4 8 20 -0.65536000000000000000e5 +2018 1 10 41 -0.65536000000000000000e5 +2018 1 14 45 -0.26214400000000000000e6 +2018 1 17 48 0.13107200000000000000e6 +2018 1 18 49 0.13107200000000000000e6 +2018 1 26 33 0.65536000000000000000e5 +2018 1 28 43 0.65536000000000000000e5 +2018 1 32 47 0.65536000000000000000e5 +2018 1 33 48 0.65536000000000000000e5 +2018 2 12 19 0.65536000000000000000e5 +2018 2 14 28 0.13107200000000000000e6 +2018 3 13 42 0.26214400000000000000e6 +2018 3 14 43 0.13107200000000000000e6 +2018 3 28 41 0.65536000000000000000e5 +2018 3 29 42 0.65536000000000000000e5 +2018 4 3 31 -0.65536000000000000000e5 +2018 4 9 21 -0.65536000000000000000e5 +2019 1 3 18 0.65536000000000000000e5 +2019 1 3 34 0.65536000000000000000e5 +2019 1 4 19 -0.13107200000000000000e6 +2019 1 4 35 0.65536000000000000000e5 +2019 2 12 20 0.65536000000000000000e5 +2019 3 3 16 0.65536000000000000000e5 +2019 3 4 17 0.65536000000000000000e5 +2019 4 2 14 0.65536000000000000000e5 +2020 2 9 23 -0.65536000000000000000e5 +2020 2 12 21 0.65536000000000000000e5 +2021 1 4 35 0.65536000000000000000e5 +2021 1 5 36 -0.13107200000000000000e6 +2021 1 14 45 0.13107200000000000000e6 +2021 1 15 30 0.65536000000000000000e5 +2021 1 17 48 -0.65536000000000000000e5 +2021 1 18 49 -0.65536000000000000000e5 +2021 2 12 22 0.65536000000000000000e5 +2021 2 14 28 -0.65536000000000000000e5 +2021 3 5 34 0.65536000000000000000e5 +2021 3 13 42 -0.65536000000000000000e5 +2021 3 14 43 -0.65536000000000000000e5 +2022 1 3 18 -0.32768000000000000000e5 +2022 1 4 19 0.65536000000000000000e5 +2022 1 4 35 0.32768000000000000000e5 +2022 1 5 36 0.65536000000000000000e5 +2022 1 12 43 0.65536000000000000000e5 +2022 1 14 45 0.65536000000000000000e5 +2022 1 17 32 -0.13107200000000000000e6 +2022 1 17 48 -0.32768000000000000000e5 +2022 1 18 49 -0.32768000000000000000e5 +2022 2 9 23 0.32768000000000000000e5 +2022 2 12 23 0.65536000000000000000e5 +2022 2 14 28 -0.32768000000000000000e5 +2022 3 3 16 -0.32768000000000000000e5 +2022 3 4 17 -0.32768000000000000000e5 +2022 3 5 34 0.32768000000000000000e5 +2022 3 13 42 -0.32768000000000000000e5 +2022 3 14 27 0.65536000000000000000e5 +2022 3 14 43 -0.32768000000000000000e5 +2022 4 2 14 -0.32768000000000000000e5 +2023 1 4 35 0.32768000000000000000e5 +2023 1 5 36 0.65536000000000000000e5 +2023 1 11 18 0.65536000000000000000e5 +2023 1 12 43 0.32768000000000000000e5 +2023 1 13 20 -0.26214400000000000000e6 +2023 1 14 45 0.65536000000000000000e5 +2023 1 17 32 0.13107200000000000000e6 +2023 1 17 48 -0.32768000000000000000e5 +2023 1 18 49 -0.32768000000000000000e5 +2023 1 20 27 0.13107200000000000000e6 +2023 2 9 23 0.32768000000000000000e5 +2023 2 11 25 0.13107200000000000000e6 +2023 2 12 24 0.65536000000000000000e5 +2023 2 14 28 -0.32768000000000000000e5 +2023 3 5 34 0.32768000000000000000e5 +2023 3 6 19 -0.65536000000000000000e5 +2023 3 8 21 0.26214400000000000000e6 +2023 3 13 42 -0.32768000000000000000e5 +2023 3 14 27 0.32768000000000000000e5 +2023 3 14 43 -0.32768000000000000000e5 +2024 1 6 21 -0.65536000000000000000e5 +2024 1 18 33 0.65536000000000000000e5 +2024 2 9 15 -0.65536000000000000000e5 +2024 2 12 25 0.65536000000000000000e5 +2024 3 7 20 0.65536000000000000000e5 +2024 3 8 21 -0.13107200000000000000e6 +2024 3 14 19 0.13107200000000000000e6 +2024 4 10 14 0.65536000000000000000e5 +2025 1 17 48 -0.13107200000000000000e6 +2025 1 28 43 0.65536000000000000000e5 +2025 1 32 47 0.65536000000000000000e5 +2025 1 33 48 0.65536000000000000000e5 +2025 2 12 27 0.65536000000000000000e5 +2025 3 28 41 0.65536000000000000000e5 +2025 3 29 42 0.65536000000000000000e5 +2025 4 3 31 -0.65536000000000000000e5 +2026 1 10 41 -0.65536000000000000000e5 +2026 1 14 45 -0.26214400000000000000e6 +2026 1 17 48 0.13107200000000000000e6 +2026 1 18 49 0.13107200000000000000e6 +2026 1 26 33 0.65536000000000000000e5 +2026 1 28 43 0.65536000000000000000e5 +2026 1 32 47 0.65536000000000000000e5 +2026 1 33 48 0.65536000000000000000e5 +2026 2 12 28 0.65536000000000000000e5 +2026 2 14 28 0.13107200000000000000e6 +2026 3 13 42 0.26214400000000000000e6 +2026 3 14 43 0.13107200000000000000e6 +2026 3 28 41 0.65536000000000000000e5 +2026 3 29 42 0.65536000000000000000e5 +2026 4 3 31 -0.65536000000000000000e5 +2027 1 4 35 -0.65536000000000000000e5 +2027 1 17 48 0.65536000000000000000e5 +2027 2 9 23 -0.65536000000000000000e5 +2027 2 12 29 0.65536000000000000000e5 +2027 3 5 34 -0.65536000000000000000e5 +2027 3 13 42 0.65536000000000000000e5 +2027 3 14 27 -0.65536000000000000000e5 +2027 3 16 29 0.13107200000000000000e6 +2028 2 12 30 0.65536000000000000000e5 +2028 2 14 28 -0.65536000000000000000e5 +2029 1 4 35 0.32768000000000000000e5 +2029 1 11 18 0.65536000000000000000e5 +2029 1 12 43 0.32768000000000000000e5 +2029 1 13 20 -0.26214400000000000000e6 +2029 1 14 45 0.13107200000000000000e6 +2029 1 17 32 0.13107200000000000000e6 +2029 1 17 48 -0.32768000000000000000e5 +2029 1 18 49 -0.32768000000000000000e5 +2029 1 20 27 0.13107200000000000000e6 +2029 2 9 23 0.32768000000000000000e5 +2029 2 11 25 0.13107200000000000000e6 +2029 2 12 31 0.65536000000000000000e5 +2029 2 14 28 -0.32768000000000000000e5 +2029 3 5 34 0.32768000000000000000e5 +2029 3 6 19 -0.65536000000000000000e5 +2029 3 8 21 0.26214400000000000000e6 +2029 3 13 42 -0.32768000000000000000e5 +2029 3 14 27 0.32768000000000000000e5 +2029 3 14 43 -0.32768000000000000000e5 +2029 3 16 29 -0.65536000000000000000e5 +2029 3 17 30 -0.65536000000000000000e5 +2029 3 18 31 0.13107200000000000000e6 +2030 1 17 48 -0.13107200000000000000e6 +2030 1 28 43 0.65536000000000000000e5 +2030 1 32 47 0.65536000000000000000e5 +2030 1 33 48 0.65536000000000000000e5 +2030 2 12 32 0.65536000000000000000e5 +2030 3 28 41 0.65536000000000000000e5 +2030 3 29 42 0.65536000000000000000e5 +2031 1 28 43 0.65536000000000000000e5 +2031 1 33 40 0.65536000000000000000e5 +2031 1 33 48 0.65536000000000000000e5 +2031 1 34 49 -0.13107200000000000000e6 +2031 2 12 33 0.65536000000000000000e5 +2031 3 18 47 -0.13107200000000000000e6 +2031 3 29 42 0.65536000000000000000e5 +2032 1 14 45 -0.26214400000000000000e6 +2032 1 17 48 0.13107200000000000000e6 +2032 1 18 49 0.13107200000000000000e6 +2032 1 34 49 0.13107200000000000000e6 +2032 2 12 34 0.65536000000000000000e5 +2032 2 14 28 0.65536000000000000000e5 +2032 3 14 43 0.65536000000000000000e5 +2032 3 15 44 -0.13107200000000000000e6 +2032 3 16 45 0.26214400000000000000e6 +2032 3 18 47 0.13107200000000000000e6 +2032 3 22 35 -0.65536000000000000000e5 +2032 4 14 26 -0.65536000000000000000e5 +2032 4 15 27 -0.13107200000000000000e6 +2033 1 6 53 -0.16384000000000000000e5 +2033 1 25 40 0.16384000000000000000e5 +2033 1 28 43 0.65536000000000000000e5 +2033 1 33 40 0.65536000000000000000e5 +2033 1 33 48 0.65536000000000000000e5 +2033 1 34 49 -0.13107200000000000000e6 +2033 2 4 34 -0.32768000000000000000e5 +2033 2 12 35 0.65536000000000000000e5 +2033 2 21 35 0.32768000000000000000e5 +2033 3 5 50 -0.32768000000000000000e5 +2033 3 14 51 -0.13107200000000000000e6 +2033 3 24 37 -0.16384000000000000000e5 +2033 3 27 40 -0.65536000000000000000e5 +2033 3 29 42 0.65536000000000000000e5 +2033 3 30 43 0.65536000000000000000e5 +2033 4 4 32 0.16384000000000000000e5 +2033 4 7 35 0.32768000000000000000e5 +2033 4 16 28 -0.16384000000000000000e5 +2033 4 19 31 0.65536000000000000000e5 +2034 1 2 17 0.81920000000000000000e4 +2034 1 3 18 0.81920000000000000000e4 +2034 1 3 34 0.40960000000000000000e4 +2034 1 4 19 0.81920000000000000000e4 +2034 1 5 20 0.81920000000000000000e4 +2034 1 5 36 -0.81920000000000000000e4 +2034 1 10 17 0.81920000000000000000e4 +2034 1 12 19 0.32768000000000000000e5 +2034 1 12 43 -0.40960000000000000000e4 +2034 1 13 20 0.32768000000000000000e5 +2034 1 16 19 -0.65536000000000000000e5 +2034 1 16 23 -0.40960000000000000000e4 +2034 1 16 31 0.16384000000000000000e5 +2034 1 17 32 0.16384000000000000000e5 +2034 2 6 12 0.40960000000000000000e4 +2034 2 10 24 0.81920000000000000000e4 +2034 2 11 13 0.16384000000000000000e5 +2034 2 13 13 0.65536000000000000000e5 +2034 3 3 16 0.12288000000000000000e5 +2034 3 4 17 0.40960000000000000000e4 +2034 3 7 12 0.40960000000000000000e4 +2034 3 7 20 0.16384000000000000000e5 +2034 3 14 27 -0.40960000000000000000e4 +2034 4 1 13 0.40960000000000000000e4 +2034 4 2 14 0.40960000000000000000e4 +2034 4 3 15 0.81920000000000000000e4 +2034 4 10 10 0.16384000000000000000e5 +2035 1 2 17 0.16384000000000000000e5 +2035 1 3 18 0.16384000000000000000e5 +2035 1 3 34 0.81920000000000000000e4 +2035 1 4 19 0.16384000000000000000e5 +2035 1 5 20 0.16384000000000000000e5 +2035 1 5 36 -0.16384000000000000000e5 +2035 1 6 21 0.32768000000000000000e5 +2035 1 10 17 0.16384000000000000000e5 +2035 1 12 43 -0.81920000000000000000e4 +2035 1 13 20 0.13107200000000000000e6 +2035 1 16 23 -0.81920000000000000000e4 +2035 1 16 31 0.32768000000000000000e5 +2035 1 17 32 0.32768000000000000000e5 +2035 1 19 34 -0.13107200000000000000e6 +2035 1 20 27 -0.32768000000000000000e5 +2035 2 6 12 0.81920000000000000000e4 +2035 2 9 15 0.32768000000000000000e5 +2035 2 10 24 0.16384000000000000000e5 +2035 2 11 13 0.32768000000000000000e5 +2035 2 11 25 -0.32768000000000000000e5 +2035 2 13 14 0.65536000000000000000e5 +2035 3 3 16 0.24576000000000000000e5 +2035 3 4 17 0.81920000000000000000e4 +2035 3 7 12 0.81920000000000000000e4 +2035 3 12 21 -0.13107200000000000000e6 +2035 3 14 27 -0.81920000000000000000e4 +2035 4 1 13 0.81920000000000000000e4 +2035 4 2 14 0.81920000000000000000e4 +2035 4 3 15 0.16384000000000000000e5 +2035 4 10 10 0.32768000000000000000e5 +2035 4 10 14 -0.32768000000000000000e5 +2036 1 3 34 0.65536000000000000000e5 +2036 1 4 35 -0.65536000000000000000e5 +2036 1 12 27 0.65536000000000000000e5 +2036 1 12 43 -0.65536000000000000000e5 +2036 1 14 45 -0.13107200000000000000e6 +2036 1 16 23 0.65536000000000000000e5 +2036 1 16 31 -0.26214400000000000000e6 +2036 1 17 48 0.65536000000000000000e5 +2036 1 18 49 0.65536000000000000000e5 +2036 1 20 27 0.26214400000000000000e6 +2036 2 7 13 0.13107200000000000000e6 +2036 2 9 23 -0.65536000000000000000e5 +2036 2 10 24 -0.13107200000000000000e6 +2036 2 13 16 0.65536000000000000000e5 +2036 2 14 28 0.65536000000000000000e5 +2036 3 5 34 -0.65536000000000000000e5 +2036 3 13 42 0.65536000000000000000e5 +2036 3 14 27 -0.65536000000000000000e5 +2036 3 14 43 0.65536000000000000000e5 +2036 4 10 10 -0.26214400000000000000e6 +2037 1 3 18 -0.65536000000000000000e5 +2037 1 3 34 0.65536000000000000000e5 +2037 1 4 19 0.13107200000000000000e6 +2037 1 4 35 0.65536000000000000000e5 +2037 1 12 43 0.19660800000000000000e6 +2037 1 14 45 0.13107200000000000000e6 +2037 1 16 23 0.65536000000000000000e5 +2037 1 17 48 -0.65536000000000000000e5 +2037 1 18 49 -0.65536000000000000000e5 +2037 1 20 27 -0.26214400000000000000e6 +2037 2 9 23 0.65536000000000000000e5 +2037 2 10 24 0.13107200000000000000e6 +2037 2 13 17 0.65536000000000000000e5 +2037 2 14 28 -0.65536000000000000000e5 +2037 3 3 16 -0.65536000000000000000e5 +2037 3 4 17 -0.65536000000000000000e5 +2037 3 5 34 0.65536000000000000000e5 +2037 3 13 42 -0.65536000000000000000e5 +2037 3 14 27 0.19660800000000000000e6 +2037 3 14 43 -0.65536000000000000000e5 +2037 4 2 14 -0.65536000000000000000e5 +2038 1 3 18 0.65536000000000000000e5 +2038 1 3 34 0.65536000000000000000e5 +2038 1 4 19 -0.13107200000000000000e6 +2038 1 4 35 0.65536000000000000000e5 +2038 2 13 18 0.65536000000000000000e5 +2038 3 3 16 0.65536000000000000000e5 +2038 3 4 17 0.65536000000000000000e5 +2038 4 2 14 0.65536000000000000000e5 +2039 2 9 23 -0.65536000000000000000e5 +2039 2 13 19 0.65536000000000000000e5 +2040 2 7 13 -0.65536000000000000000e5 +2040 2 13 20 0.65536000000000000000e5 +2040 4 10 10 0.13107200000000000000e6 +2041 2 10 24 -0.65536000000000000000e5 +2041 2 13 21 0.65536000000000000000e5 +2042 1 3 18 -0.32768000000000000000e5 +2042 1 4 19 0.65536000000000000000e5 +2042 1 4 35 0.32768000000000000000e5 +2042 1 5 36 0.65536000000000000000e5 +2042 1 12 43 0.65536000000000000000e5 +2042 1 14 45 0.65536000000000000000e5 +2042 1 17 32 -0.13107200000000000000e6 +2042 1 17 48 -0.32768000000000000000e5 +2042 1 18 49 -0.32768000000000000000e5 +2042 2 9 23 0.32768000000000000000e5 +2042 2 13 22 0.65536000000000000000e5 +2042 2 14 28 -0.32768000000000000000e5 +2042 3 3 16 -0.32768000000000000000e5 +2042 3 4 17 -0.32768000000000000000e5 +2042 3 5 34 0.32768000000000000000e5 +2042 3 13 42 -0.32768000000000000000e5 +2042 3 14 27 0.65536000000000000000e5 +2042 3 14 43 -0.32768000000000000000e5 +2042 4 2 14 -0.32768000000000000000e5 +2043 1 2 17 -0.32768000000000000000e5 +2043 1 3 18 -0.32768000000000000000e5 +2043 1 3 34 -0.16384000000000000000e5 +2043 1 4 19 -0.32768000000000000000e5 +2043 1 5 20 -0.32768000000000000000e5 +2043 1 5 36 0.32768000000000000000e5 +2043 1 10 17 -0.32768000000000000000e5 +2043 1 12 43 0.16384000000000000000e5 +2043 1 16 23 0.16384000000000000000e5 +2043 1 20 27 0.65536000000000000000e5 +2043 2 6 12 -0.16384000000000000000e5 +2043 2 10 24 -0.32768000000000000000e5 +2043 2 11 13 -0.65536000000000000000e5 +2043 2 13 23 0.65536000000000000000e5 +2043 3 3 16 -0.49152000000000000000e5 +2043 3 4 17 -0.16384000000000000000e5 +2043 3 7 12 -0.16384000000000000000e5 +2043 3 7 20 -0.65536000000000000000e5 +2043 3 8 21 -0.13107200000000000000e6 +2043 3 12 21 0.26214400000000000000e6 +2043 3 14 19 -0.13107200000000000000e6 +2043 3 14 27 0.16384000000000000000e5 +2043 4 1 13 -0.16384000000000000000e5 +2043 4 2 14 -0.16384000000000000000e5 +2043 4 3 15 -0.32768000000000000000e5 +2043 4 10 10 -0.65536000000000000000e5 +2043 4 13 13 -0.26214400000000000000e6 +2044 2 11 25 -0.65536000000000000000e5 +2044 2 13 24 0.65536000000000000000e5 +2045 1 2 17 0.16384000000000000000e5 +2045 1 3 18 0.16384000000000000000e5 +2045 1 3 34 0.81920000000000000000e4 +2045 1 4 19 0.16384000000000000000e5 +2045 1 5 20 0.16384000000000000000e5 +2045 1 5 36 -0.16384000000000000000e5 +2045 1 6 21 0.32768000000000000000e5 +2045 1 10 17 0.16384000000000000000e5 +2045 1 12 43 -0.81920000000000000000e4 +2045 1 13 20 0.13107200000000000000e6 +2045 1 16 23 -0.81920000000000000000e4 +2045 1 16 31 0.32768000000000000000e5 +2045 1 17 32 0.32768000000000000000e5 +2045 1 19 34 -0.13107200000000000000e6 +2045 1 20 27 -0.32768000000000000000e5 +2045 2 6 12 0.81920000000000000000e4 +2045 2 9 15 0.32768000000000000000e5 +2045 2 10 24 0.16384000000000000000e5 +2045 2 11 13 0.32768000000000000000e5 +2045 2 11 25 -0.32768000000000000000e5 +2045 2 13 25 0.65536000000000000000e5 +2045 3 3 16 0.24576000000000000000e5 +2045 3 4 17 0.81920000000000000000e4 +2045 3 7 12 0.81920000000000000000e4 +2045 3 12 21 -0.13107200000000000000e6 +2045 3 14 27 -0.81920000000000000000e4 +2045 4 1 13 0.81920000000000000000e4 +2045 4 2 14 0.81920000000000000000e4 +2045 4 3 15 0.16384000000000000000e5 +2045 4 10 10 0.32768000000000000000e5 +2045 4 10 14 -0.32768000000000000000e5 +2045 4 13 13 0.13107200000000000000e6 +2046 1 12 43 0.65536000000000000000e5 +2046 1 16 23 0.65536000000000000000e5 +2046 1 16 47 0.65536000000000000000e5 +2046 1 27 34 -0.13107200000000000000e6 +2046 2 13 26 0.65536000000000000000e5 +2046 3 1 34 -0.65536000000000000000e5 +2046 3 12 41 0.65536000000000000000e5 +2047 1 12 43 0.65536000000000000000e5 +2047 1 13 44 -0.13107200000000000000e6 +2047 1 16 47 0.65536000000000000000e5 +2047 1 17 48 0.65536000000000000000e5 +2047 2 13 27 0.65536000000000000000e5 +2047 3 12 41 0.65536000000000000000e5 +2047 3 13 42 0.65536000000000000000e5 +2048 1 4 35 -0.65536000000000000000e5 +2048 1 17 48 0.65536000000000000000e5 +2048 2 9 23 -0.65536000000000000000e5 +2048 2 13 28 0.65536000000000000000e5 +2048 3 5 34 -0.65536000000000000000e5 +2048 3 13 42 0.65536000000000000000e5 +2048 3 14 27 -0.65536000000000000000e5 +2048 3 16 29 0.13107200000000000000e6 +2049 1 4 35 0.32768000000000000000e5 +2049 1 12 43 0.32768000000000000000e5 +2049 1 13 44 0.65536000000000000000e5 +2049 1 14 45 0.65536000000000000000e5 +2049 1 17 48 -0.32768000000000000000e5 +2049 1 18 49 -0.32768000000000000000e5 +2049 1 20 27 -0.13107200000000000000e6 +2049 1 27 34 0.65536000000000000000e5 +2049 2 9 23 0.32768000000000000000e5 +2049 2 13 29 0.65536000000000000000e5 +2049 2 14 28 -0.32768000000000000000e5 +2049 3 5 34 0.32768000000000000000e5 +2049 3 7 36 0.13107200000000000000e6 +2049 3 13 42 -0.32768000000000000000e5 +2049 3 14 27 0.32768000000000000000e5 +2049 3 14 43 -0.32768000000000000000e5 +2049 3 16 29 -0.65536000000000000000e5 +2050 1 3 18 -0.32768000000000000000e5 +2050 1 4 19 0.65536000000000000000e5 +2050 1 4 35 0.32768000000000000000e5 +2050 1 5 36 0.65536000000000000000e5 +2050 1 12 43 0.65536000000000000000e5 +2050 1 14 45 0.65536000000000000000e5 +2050 1 17 32 -0.13107200000000000000e6 +2050 1 17 48 -0.32768000000000000000e5 +2050 1 18 49 -0.32768000000000000000e5 +2050 2 9 23 0.32768000000000000000e5 +2050 2 13 30 0.65536000000000000000e5 +2050 2 14 28 -0.32768000000000000000e5 +2050 3 3 16 -0.32768000000000000000e5 +2050 3 4 17 -0.32768000000000000000e5 +2050 3 5 34 0.32768000000000000000e5 +2050 3 13 42 -0.32768000000000000000e5 +2050 3 14 27 0.65536000000000000000e5 +2050 3 14 43 -0.32768000000000000000e5 +2050 4 2 14 -0.32768000000000000000e5 +2050 4 11 23 0.65536000000000000000e5 +2051 2 13 31 0.65536000000000000000e5 +2051 2 15 29 -0.65536000000000000000e5 +2052 1 12 43 0.65536000000000000000e5 +2052 1 16 47 0.65536000000000000000e5 +2052 1 17 48 0.65536000000000000000e5 +2052 1 34 41 -0.13107200000000000000e6 +2052 2 13 32 0.65536000000000000000e5 +2052 3 22 35 -0.65536000000000000000e5 +2053 1 4 35 -0.65536000000000000000e5 +2053 1 17 48 0.65536000000000000000e5 +2053 2 9 23 -0.65536000000000000000e5 +2053 2 13 33 0.65536000000000000000e5 +2053 3 5 34 -0.65536000000000000000e5 +2053 3 13 42 0.65536000000000000000e5 +2053 3 14 27 -0.65536000000000000000e5 +2053 3 16 29 0.13107200000000000000e6 +2053 4 14 26 0.65536000000000000000e5 +2054 1 4 35 0.32768000000000000000e5 +2054 1 12 43 0.32768000000000000000e5 +2054 1 14 45 0.13107200000000000000e6 +2054 1 17 48 -0.32768000000000000000e5 +2054 1 18 49 -0.32768000000000000000e5 +2054 1 19 50 -0.13107200000000000000e6 +2054 1 34 41 0.65536000000000000000e5 +2054 2 9 23 0.32768000000000000000e5 +2054 2 13 34 0.65536000000000000000e5 +2054 2 14 28 -0.32768000000000000000e5 +2054 3 5 34 0.32768000000000000000e5 +2054 3 13 42 -0.32768000000000000000e5 +2054 3 14 27 0.32768000000000000000e5 +2054 3 14 43 -0.32768000000000000000e5 +2054 3 15 44 0.65536000000000000000e5 +2054 3 16 29 -0.65536000000000000000e5 +2054 3 16 45 -0.13107200000000000000e6 +2054 4 15 27 0.65536000000000000000e5 +2055 1 4 35 -0.65536000000000000000e5 +2055 1 6 53 -0.81920000000000000000e4 +2055 1 17 48 0.65536000000000000000e5 +2055 1 25 40 0.81920000000000000000e4 +2055 2 4 34 -0.16384000000000000000e5 +2055 2 9 23 -0.65536000000000000000e5 +2055 2 13 35 0.65536000000000000000e5 +2055 2 21 35 0.16384000000000000000e5 +2055 3 5 34 -0.65536000000000000000e5 +2055 3 5 50 -0.16384000000000000000e5 +2055 3 7 52 -0.65536000000000000000e5 +2055 3 13 42 0.65536000000000000000e5 +2055 3 14 27 -0.65536000000000000000e5 +2055 3 16 29 0.13107200000000000000e6 +2055 3 18 47 -0.65536000000000000000e5 +2055 3 24 37 -0.81920000000000000000e4 +2055 3 27 40 -0.32768000000000000000e5 +2055 3 28 41 -0.32768000000000000000e5 +2055 3 29 42 -0.32768000000000000000e5 +2055 3 31 44 0.13107200000000000000e6 +2055 4 4 32 0.81920000000000000000e4 +2055 4 7 35 0.16384000000000000000e5 +2055 4 14 26 0.65536000000000000000e5 +2055 4 16 28 -0.81920000000000000000e4 +2055 4 23 27 -0.32768000000000000000e5 +2056 1 3 18 0.40960000000000000000e4 +2056 1 4 19 -0.81920000000000000000e4 +2056 1 5 36 -0.81920000000000000000e4 +2056 1 6 21 0.16384000000000000000e5 +2056 1 12 43 -0.40960000000000000000e4 +2056 1 13 20 0.65536000000000000000e5 +2056 1 13 44 0.81920000000000000000e4 +2056 1 14 45 0.81920000000000000000e4 +2056 1 20 27 -0.16384000000000000000e5 +2056 1 21 44 -0.65536000000000000000e5 +2056 1 33 36 0.32768000000000000000e5 +2056 2 9 15 0.16384000000000000000e5 +2056 2 11 25 -0.32768000000000000000e5 +2056 2 14 14 0.65536000000000000000e5 +2056 2 15 29 0.16384000000000000000e5 +2056 3 3 16 0.40960000000000000000e4 +2056 3 4 17 0.40960000000000000000e4 +2056 3 7 20 -0.16384000000000000000e5 +2056 3 7 36 -0.16384000000000000000e5 +2056 3 8 21 -0.32768000000000000000e5 +2056 3 14 19 -0.32768000000000000000e5 +2056 3 14 27 -0.40960000000000000000e4 +2056 3 16 29 -0.81920000000000000000e4 +2056 3 18 31 -0.16384000000000000000e5 +2056 3 19 32 -0.32768000000000000000e5 +2056 4 2 14 0.40960000000000000000e4 +2056 4 10 14 -0.16384000000000000000e5 +2056 4 11 15 -0.32768000000000000000e5 +2056 4 11 23 -0.81920000000000000000e4 +2056 4 13 25 -0.32768000000000000000e5 +2057 2 14 15 0.65536000000000000000e5 +2057 2 15 25 -0.65536000000000000000e5 +2057 3 8 21 0.32768000000000000000e5 +2057 3 12 21 0.65536000000000000000e5 +2057 3 15 20 -0.32768000000000000000e5 +2057 3 16 21 -0.13107200000000000000e6 +2057 3 18 19 0.13107200000000000000e6 +2057 4 11 15 0.32768000000000000000e5 +2057 4 14 14 -0.65536000000000000000e5 +2058 1 3 18 -0.65536000000000000000e5 +2058 1 3 34 0.65536000000000000000e5 +2058 1 4 19 0.13107200000000000000e6 +2058 1 4 35 0.65536000000000000000e5 +2058 1 12 43 0.19660800000000000000e6 +2058 1 14 45 0.13107200000000000000e6 +2058 1 16 23 0.65536000000000000000e5 +2058 1 17 48 -0.65536000000000000000e5 +2058 1 18 49 -0.65536000000000000000e5 +2058 1 20 27 -0.26214400000000000000e6 +2058 2 9 23 0.65536000000000000000e5 +2058 2 10 24 0.13107200000000000000e6 +2058 2 14 16 0.65536000000000000000e5 +2058 2 14 28 -0.65536000000000000000e5 +2058 3 3 16 -0.65536000000000000000e5 +2058 3 4 17 -0.65536000000000000000e5 +2058 3 5 34 0.65536000000000000000e5 +2058 3 13 42 -0.65536000000000000000e5 +2058 3 14 27 0.19660800000000000000e6 +2058 3 14 43 -0.65536000000000000000e5 +2058 4 2 14 -0.65536000000000000000e5 +2059 1 3 18 0.65536000000000000000e5 +2059 1 3 34 0.65536000000000000000e5 +2059 1 4 19 -0.13107200000000000000e6 +2059 1 4 35 0.65536000000000000000e5 +2059 2 14 17 0.65536000000000000000e5 +2059 3 3 16 0.65536000000000000000e5 +2059 3 4 17 0.65536000000000000000e5 +2059 4 2 14 0.65536000000000000000e5 +2060 2 9 23 -0.65536000000000000000e5 +2060 2 14 18 0.65536000000000000000e5 +2061 1 4 35 0.65536000000000000000e5 +2061 1 5 36 -0.13107200000000000000e6 +2061 1 14 45 0.13107200000000000000e6 +2061 1 15 30 0.65536000000000000000e5 +2061 1 17 48 -0.65536000000000000000e5 +2061 1 18 49 -0.65536000000000000000e5 +2061 2 14 19 0.65536000000000000000e5 +2061 2 14 28 -0.65536000000000000000e5 +2061 3 5 34 0.65536000000000000000e5 +2061 3 13 42 -0.65536000000000000000e5 +2061 3 14 43 -0.65536000000000000000e5 +2062 2 10 24 -0.65536000000000000000e5 +2062 2 14 20 0.65536000000000000000e5 +2063 1 3 18 -0.32768000000000000000e5 +2063 1 4 19 0.65536000000000000000e5 +2063 1 4 35 0.32768000000000000000e5 +2063 1 5 36 0.65536000000000000000e5 +2063 1 12 43 0.65536000000000000000e5 +2063 1 14 45 0.65536000000000000000e5 +2063 1 17 32 -0.13107200000000000000e6 +2063 1 17 48 -0.32768000000000000000e5 +2063 1 18 49 -0.32768000000000000000e5 +2063 2 9 23 0.32768000000000000000e5 +2063 2 14 21 0.65536000000000000000e5 +2063 2 14 28 -0.32768000000000000000e5 +2063 3 3 16 -0.32768000000000000000e5 +2063 3 4 17 -0.32768000000000000000e5 +2063 3 5 34 0.32768000000000000000e5 +2063 3 13 42 -0.32768000000000000000e5 +2063 3 14 27 0.65536000000000000000e5 +2063 3 14 43 -0.32768000000000000000e5 +2063 4 2 14 -0.32768000000000000000e5 +2064 1 4 35 0.32768000000000000000e5 +2064 1 5 36 0.65536000000000000000e5 +2064 1 11 18 0.65536000000000000000e5 +2064 1 12 43 0.32768000000000000000e5 +2064 1 13 20 -0.26214400000000000000e6 +2064 1 14 45 0.65536000000000000000e5 +2064 1 17 32 0.13107200000000000000e6 +2064 1 17 48 -0.32768000000000000000e5 +2064 1 18 49 -0.32768000000000000000e5 +2064 1 20 27 0.13107200000000000000e6 +2064 2 9 23 0.32768000000000000000e5 +2064 2 11 25 0.13107200000000000000e6 +2064 2 14 22 0.65536000000000000000e5 +2064 2 14 28 -0.32768000000000000000e5 +2064 3 5 34 0.32768000000000000000e5 +2064 3 6 19 -0.65536000000000000000e5 +2064 3 8 21 0.26214400000000000000e6 +2064 3 13 42 -0.32768000000000000000e5 +2064 3 14 27 0.32768000000000000000e5 +2064 3 14 43 -0.32768000000000000000e5 +2065 2 11 25 -0.65536000000000000000e5 +2065 2 14 23 0.65536000000000000000e5 +2066 1 6 21 -0.65536000000000000000e5 +2066 1 18 33 0.65536000000000000000e5 +2066 2 9 15 -0.65536000000000000000e5 +2066 2 14 24 0.65536000000000000000e5 +2066 3 7 20 0.65536000000000000000e5 +2066 3 8 21 -0.13107200000000000000e6 +2066 3 14 19 0.13107200000000000000e6 +2066 4 10 14 0.65536000000000000000e5 +2067 1 3 18 0.81920000000000000000e4 +2067 1 4 19 -0.16384000000000000000e5 +2067 1 5 36 -0.16384000000000000000e5 +2067 1 6 21 0.32768000000000000000e5 +2067 1 12 43 -0.81920000000000000000e4 +2067 1 13 20 0.13107200000000000000e6 +2067 1 13 44 0.16384000000000000000e5 +2067 1 14 45 0.16384000000000000000e5 +2067 1 20 27 -0.32768000000000000000e5 +2067 1 21 44 -0.13107200000000000000e6 +2067 1 33 36 0.65536000000000000000e5 +2067 2 9 15 0.32768000000000000000e5 +2067 2 11 25 -0.65536000000000000000e5 +2067 2 14 25 0.65536000000000000000e5 +2067 2 15 29 0.32768000000000000000e5 +2067 3 3 16 0.81920000000000000000e4 +2067 3 4 17 0.81920000000000000000e4 +2067 3 7 20 -0.32768000000000000000e5 +2067 3 7 36 -0.32768000000000000000e5 +2067 3 8 21 -0.65536000000000000000e5 +2067 3 14 19 -0.65536000000000000000e5 +2067 3 14 27 -0.81920000000000000000e4 +2067 3 16 29 -0.16384000000000000000e5 +2067 3 18 31 -0.32768000000000000000e5 +2067 3 19 32 -0.65536000000000000000e5 +2067 4 2 14 0.81920000000000000000e4 +2067 4 10 14 -0.32768000000000000000e5 +2067 4 11 23 -0.16384000000000000000e5 +2067 4 13 25 -0.65536000000000000000e5 +2068 1 12 43 0.65536000000000000000e5 +2068 1 13 44 -0.13107200000000000000e6 +2068 1 16 47 0.65536000000000000000e5 +2068 1 17 48 0.65536000000000000000e5 +2068 2 14 26 0.65536000000000000000e5 +2068 3 12 41 0.65536000000000000000e5 +2068 3 13 42 0.65536000000000000000e5 +2069 1 4 35 -0.65536000000000000000e5 +2069 1 17 48 0.65536000000000000000e5 +2069 2 9 23 -0.65536000000000000000e5 +2069 2 14 27 0.65536000000000000000e5 +2069 3 5 34 -0.65536000000000000000e5 +2069 3 13 42 0.65536000000000000000e5 +2069 3 14 27 -0.65536000000000000000e5 +2069 3 16 29 0.13107200000000000000e6 +2070 1 3 18 -0.32768000000000000000e5 +2070 1 4 19 0.65536000000000000000e5 +2070 1 4 35 0.32768000000000000000e5 +2070 1 5 36 0.65536000000000000000e5 +2070 1 12 43 0.65536000000000000000e5 +2070 1 14 45 0.65536000000000000000e5 +2070 1 17 32 -0.13107200000000000000e6 +2070 1 17 48 -0.32768000000000000000e5 +2070 1 18 49 -0.32768000000000000000e5 +2070 2 9 23 0.32768000000000000000e5 +2070 2 14 28 -0.32768000000000000000e5 +2070 2 14 29 0.65536000000000000000e5 +2070 3 3 16 -0.32768000000000000000e5 +2070 3 4 17 -0.32768000000000000000e5 +2070 3 5 34 0.32768000000000000000e5 +2070 3 13 42 -0.32768000000000000000e5 +2070 3 14 27 0.65536000000000000000e5 +2070 3 14 43 -0.32768000000000000000e5 +2070 4 2 14 -0.32768000000000000000e5 +2070 4 11 23 0.65536000000000000000e5 +2071 1 4 35 0.32768000000000000000e5 +2071 1 11 18 0.65536000000000000000e5 +2071 1 12 43 0.32768000000000000000e5 +2071 1 13 20 -0.26214400000000000000e6 +2071 1 14 45 0.13107200000000000000e6 +2071 1 17 32 0.13107200000000000000e6 +2071 1 17 48 -0.32768000000000000000e5 +2071 1 18 49 -0.32768000000000000000e5 +2071 1 20 27 0.13107200000000000000e6 +2071 2 9 23 0.32768000000000000000e5 +2071 2 11 25 0.13107200000000000000e6 +2071 2 14 28 -0.32768000000000000000e5 +2071 2 14 30 0.65536000000000000000e5 +2071 3 5 34 0.32768000000000000000e5 +2071 3 6 19 -0.65536000000000000000e5 +2071 3 8 21 0.26214400000000000000e6 +2071 3 13 42 -0.32768000000000000000e5 +2071 3 14 27 0.32768000000000000000e5 +2071 3 14 43 -0.32768000000000000000e5 +2071 3 16 29 -0.65536000000000000000e5 +2071 3 17 30 -0.65536000000000000000e5 +2071 3 18 31 0.13107200000000000000e6 +2072 1 3 18 0.16384000000000000000e5 +2072 1 4 19 -0.32768000000000000000e5 +2072 1 5 36 -0.32768000000000000000e5 +2072 1 6 21 -0.65536000000000000000e5 +2072 1 12 43 -0.16384000000000000000e5 +2072 1 13 44 0.32768000000000000000e5 +2072 1 14 45 0.32768000000000000000e5 +2072 1 15 46 0.65536000000000000000e5 +2072 2 9 15 -0.65536000000000000000e5 +2072 2 14 31 0.65536000000000000000e5 +2072 3 3 16 0.16384000000000000000e5 +2072 3 4 17 0.16384000000000000000e5 +2072 3 7 20 0.65536000000000000000e5 +2072 3 8 21 -0.13107200000000000000e6 +2072 3 14 19 0.13107200000000000000e6 +2072 3 14 27 -0.16384000000000000000e5 +2072 3 16 29 -0.32768000000000000000e5 +2072 3 18 31 -0.65536000000000000000e5 +2072 3 19 32 0.13107200000000000000e6 +2072 4 2 14 0.16384000000000000000e5 +2072 4 10 14 0.65536000000000000000e5 +2072 4 11 23 -0.32768000000000000000e5 +2073 1 4 35 -0.65536000000000000000e5 +2073 1 17 48 0.65536000000000000000e5 +2073 2 9 23 -0.65536000000000000000e5 +2073 2 14 32 0.65536000000000000000e5 +2073 3 5 34 -0.65536000000000000000e5 +2073 3 13 42 0.65536000000000000000e5 +2073 3 14 27 -0.65536000000000000000e5 +2073 3 16 29 0.13107200000000000000e6 +2073 4 14 26 0.65536000000000000000e5 +2074 1 14 45 -0.26214400000000000000e6 +2074 1 17 48 0.13107200000000000000e6 +2074 1 18 49 0.13107200000000000000e6 +2074 1 34 49 0.13107200000000000000e6 +2074 2 14 28 0.65536000000000000000e5 +2074 2 14 33 0.65536000000000000000e5 +2074 3 14 43 0.65536000000000000000e5 +2074 3 15 44 -0.13107200000000000000e6 +2074 3 16 45 0.26214400000000000000e6 +2074 3 18 47 0.13107200000000000000e6 +2074 3 22 35 -0.65536000000000000000e5 +2074 4 14 26 -0.65536000000000000000e5 +2074 4 15 27 -0.13107200000000000000e6 +2075 1 4 35 0.32768000000000000000e5 +2075 1 11 18 0.65536000000000000000e5 +2075 1 12 43 0.32768000000000000000e5 +2075 1 13 20 -0.26214400000000000000e6 +2075 1 14 45 0.13107200000000000000e6 +2075 1 17 32 0.13107200000000000000e6 +2075 1 17 48 -0.32768000000000000000e5 +2075 1 18 49 -0.32768000000000000000e5 +2075 1 20 27 0.13107200000000000000e6 +2075 2 9 23 0.32768000000000000000e5 +2075 2 11 25 0.13107200000000000000e6 +2075 2 14 28 -0.32768000000000000000e5 +2075 2 14 34 0.65536000000000000000e5 +2075 3 5 34 0.32768000000000000000e5 +2075 3 6 19 -0.65536000000000000000e5 +2075 3 8 21 0.26214400000000000000e6 +2075 3 13 42 -0.32768000000000000000e5 +2075 3 14 27 0.32768000000000000000e5 +2075 3 14 43 -0.32768000000000000000e5 +2075 3 16 29 -0.65536000000000000000e5 +2075 3 17 30 -0.65536000000000000000e5 +2075 3 18 31 0.13107200000000000000e6 +2075 4 15 27 0.65536000000000000000e5 +2076 1 6 53 -0.81920000000000000000e4 +2076 1 14 45 -0.26214400000000000000e6 +2076 1 17 48 0.13107200000000000000e6 +2076 1 18 49 0.13107200000000000000e6 +2076 1 25 40 0.81920000000000000000e4 +2076 1 34 49 0.13107200000000000000e6 +2076 2 4 34 -0.16384000000000000000e5 +2076 2 14 28 0.65536000000000000000e5 +2076 2 14 35 0.65536000000000000000e5 +2076 2 21 35 0.16384000000000000000e5 +2076 3 5 50 -0.16384000000000000000e5 +2076 3 14 43 0.65536000000000000000e5 +2076 3 14 51 -0.65536000000000000000e5 +2076 3 15 44 -0.13107200000000000000e6 +2076 3 16 45 0.26214400000000000000e6 +2076 3 18 47 0.65536000000000000000e5 +2076 3 19 48 0.13107200000000000000e6 +2076 3 22 35 -0.65536000000000000000e5 +2076 3 24 37 -0.81920000000000000000e4 +2076 3 27 40 -0.32768000000000000000e5 +2076 3 28 41 -0.32768000000000000000e5 +2076 3 29 42 -0.32768000000000000000e5 +2076 4 4 32 0.81920000000000000000e4 +2076 4 7 35 0.16384000000000000000e5 +2076 4 14 26 -0.65536000000000000000e5 +2076 4 15 27 -0.13107200000000000000e6 +2076 4 16 28 -0.81920000000000000000e4 +2076 4 23 27 -0.32768000000000000000e5 +2077 2 7 13 -0.65536000000000000000e5 +2077 2 15 16 0.65536000000000000000e5 +2077 4 10 10 0.13107200000000000000e6 +2078 2 10 24 -0.65536000000000000000e5 +2078 2 15 17 0.65536000000000000000e5 +2079 1 3 18 -0.32768000000000000000e5 +2079 1 4 19 0.65536000000000000000e5 +2079 1 4 35 0.32768000000000000000e5 +2079 1 5 36 0.65536000000000000000e5 +2079 1 12 43 0.65536000000000000000e5 +2079 1 14 45 0.65536000000000000000e5 +2079 1 17 32 -0.13107200000000000000e6 +2079 1 17 48 -0.32768000000000000000e5 +2079 1 18 49 -0.32768000000000000000e5 +2079 2 9 23 0.32768000000000000000e5 +2079 2 14 28 -0.32768000000000000000e5 +2079 2 15 18 0.65536000000000000000e5 +2079 3 3 16 -0.32768000000000000000e5 +2079 3 4 17 -0.32768000000000000000e5 +2079 3 5 34 0.32768000000000000000e5 +2079 3 13 42 -0.32768000000000000000e5 +2079 3 14 27 0.65536000000000000000e5 +2079 3 14 43 -0.32768000000000000000e5 +2079 4 2 14 -0.32768000000000000000e5 +2080 1 4 35 0.32768000000000000000e5 +2080 1 5 36 0.65536000000000000000e5 +2080 1 11 18 0.65536000000000000000e5 +2080 1 12 43 0.32768000000000000000e5 +2080 1 13 20 -0.26214400000000000000e6 +2080 1 14 45 0.65536000000000000000e5 +2080 1 17 32 0.13107200000000000000e6 +2080 1 17 48 -0.32768000000000000000e5 +2080 1 18 49 -0.32768000000000000000e5 +2080 1 20 27 0.13107200000000000000e6 +2080 2 9 23 0.32768000000000000000e5 +2080 2 11 25 0.13107200000000000000e6 +2080 2 14 28 -0.32768000000000000000e5 +2080 2 15 19 0.65536000000000000000e5 +2080 3 5 34 0.32768000000000000000e5 +2080 3 6 19 -0.65536000000000000000e5 +2080 3 8 21 0.26214400000000000000e6 +2080 3 13 42 -0.32768000000000000000e5 +2080 3 14 27 0.32768000000000000000e5 +2080 3 14 43 -0.32768000000000000000e5 +2081 1 2 17 -0.32768000000000000000e5 +2081 1 3 18 -0.32768000000000000000e5 +2081 1 3 34 -0.16384000000000000000e5 +2081 1 4 19 -0.32768000000000000000e5 +2081 1 5 20 -0.32768000000000000000e5 +2081 1 5 36 0.32768000000000000000e5 +2081 1 10 17 -0.32768000000000000000e5 +2081 1 12 43 0.16384000000000000000e5 +2081 1 16 23 0.16384000000000000000e5 +2081 1 20 27 0.65536000000000000000e5 +2081 2 6 12 -0.16384000000000000000e5 +2081 2 10 24 -0.32768000000000000000e5 +2081 2 11 13 -0.65536000000000000000e5 +2081 2 15 20 0.65536000000000000000e5 +2081 3 3 16 -0.49152000000000000000e5 +2081 3 4 17 -0.16384000000000000000e5 +2081 3 7 12 -0.16384000000000000000e5 +2081 3 7 20 -0.65536000000000000000e5 +2081 3 8 21 -0.13107200000000000000e6 +2081 3 12 21 0.26214400000000000000e6 +2081 3 14 19 -0.13107200000000000000e6 +2081 3 14 27 0.16384000000000000000e5 +2081 4 1 13 -0.16384000000000000000e5 +2081 4 2 14 -0.16384000000000000000e5 +2081 4 3 15 -0.32768000000000000000e5 +2081 4 10 10 -0.65536000000000000000e5 +2081 4 13 13 -0.26214400000000000000e6 +2082 2 11 25 -0.65536000000000000000e5 +2082 2 15 21 0.65536000000000000000e5 +2083 1 6 21 -0.65536000000000000000e5 +2083 1 18 33 0.65536000000000000000e5 +2083 2 9 15 -0.65536000000000000000e5 +2083 2 15 22 0.65536000000000000000e5 +2083 3 7 20 0.65536000000000000000e5 +2083 3 8 21 -0.13107200000000000000e6 +2083 3 14 19 0.13107200000000000000e6 +2083 4 10 14 0.65536000000000000000e5 +2084 1 2 17 0.16384000000000000000e5 +2084 1 3 18 0.16384000000000000000e5 +2084 1 3 34 0.81920000000000000000e4 +2084 1 4 19 0.16384000000000000000e5 +2084 1 5 20 0.16384000000000000000e5 +2084 1 5 36 -0.16384000000000000000e5 +2084 1 6 21 0.32768000000000000000e5 +2084 1 10 17 0.16384000000000000000e5 +2084 1 12 43 -0.81920000000000000000e4 +2084 1 13 20 0.13107200000000000000e6 +2084 1 16 23 -0.81920000000000000000e4 +2084 1 16 31 0.32768000000000000000e5 +2084 1 17 32 0.32768000000000000000e5 +2084 1 19 34 -0.13107200000000000000e6 +2084 1 20 27 -0.32768000000000000000e5 +2084 2 6 12 0.81920000000000000000e4 +2084 2 9 15 0.32768000000000000000e5 +2084 2 10 24 0.16384000000000000000e5 +2084 2 11 13 0.32768000000000000000e5 +2084 2 11 25 -0.32768000000000000000e5 +2084 2 15 23 0.65536000000000000000e5 +2084 3 3 16 0.24576000000000000000e5 +2084 3 4 17 0.81920000000000000000e4 +2084 3 7 12 0.81920000000000000000e4 +2084 3 12 21 -0.13107200000000000000e6 +2084 3 14 27 -0.81920000000000000000e4 +2084 4 1 13 0.81920000000000000000e4 +2084 4 2 14 0.81920000000000000000e4 +2084 4 3 15 0.16384000000000000000e5 +2084 4 10 10 0.32768000000000000000e5 +2084 4 10 14 -0.32768000000000000000e5 +2084 4 13 13 0.13107200000000000000e6 +2085 1 3 18 0.81920000000000000000e4 +2085 1 4 19 -0.16384000000000000000e5 +2085 1 5 36 -0.16384000000000000000e5 +2085 1 6 21 0.32768000000000000000e5 +2085 1 12 43 -0.81920000000000000000e4 +2085 1 13 20 0.13107200000000000000e6 +2085 1 13 44 0.16384000000000000000e5 +2085 1 14 45 0.16384000000000000000e5 +2085 1 20 27 -0.32768000000000000000e5 +2085 1 21 44 -0.13107200000000000000e6 +2085 1 33 36 0.65536000000000000000e5 +2085 2 9 15 0.32768000000000000000e5 +2085 2 11 25 -0.65536000000000000000e5 +2085 2 15 24 0.65536000000000000000e5 +2085 2 15 29 0.32768000000000000000e5 +2085 3 3 16 0.81920000000000000000e4 +2085 3 4 17 0.81920000000000000000e4 +2085 3 7 20 -0.32768000000000000000e5 +2085 3 7 36 -0.32768000000000000000e5 +2085 3 8 21 -0.65536000000000000000e5 +2085 3 14 19 -0.65536000000000000000e5 +2085 3 14 27 -0.81920000000000000000e4 +2085 3 16 29 -0.16384000000000000000e5 +2085 3 18 31 -0.32768000000000000000e5 +2085 3 19 32 -0.65536000000000000000e5 +2085 4 2 14 0.81920000000000000000e4 +2085 4 10 14 -0.32768000000000000000e5 +2085 4 11 23 -0.16384000000000000000e5 +2085 4 13 25 -0.65536000000000000000e5 +2086 1 4 35 0.32768000000000000000e5 +2086 1 12 43 0.32768000000000000000e5 +2086 1 13 44 0.65536000000000000000e5 +2086 1 14 45 0.65536000000000000000e5 +2086 1 17 48 -0.32768000000000000000e5 +2086 1 18 49 -0.32768000000000000000e5 +2086 1 20 27 -0.13107200000000000000e6 +2086 1 27 34 0.65536000000000000000e5 +2086 2 9 23 0.32768000000000000000e5 +2086 2 14 28 -0.32768000000000000000e5 +2086 2 15 26 0.65536000000000000000e5 +2086 3 5 34 0.32768000000000000000e5 +2086 3 7 36 0.13107200000000000000e6 +2086 3 13 42 -0.32768000000000000000e5 +2086 3 14 27 0.32768000000000000000e5 +2086 3 14 43 -0.32768000000000000000e5 +2086 3 16 29 -0.65536000000000000000e5 +2087 1 3 18 -0.32768000000000000000e5 +2087 1 4 19 0.65536000000000000000e5 +2087 1 4 35 0.32768000000000000000e5 +2087 1 5 36 0.65536000000000000000e5 +2087 1 12 43 0.65536000000000000000e5 +2087 1 14 45 0.65536000000000000000e5 +2087 1 17 32 -0.13107200000000000000e6 +2087 1 17 48 -0.32768000000000000000e5 +2087 1 18 49 -0.32768000000000000000e5 +2087 2 9 23 0.32768000000000000000e5 +2087 2 14 28 -0.32768000000000000000e5 +2087 2 15 27 0.65536000000000000000e5 +2087 3 3 16 -0.32768000000000000000e5 +2087 3 4 17 -0.32768000000000000000e5 +2087 3 5 34 0.32768000000000000000e5 +2087 3 13 42 -0.32768000000000000000e5 +2087 3 14 27 0.65536000000000000000e5 +2087 3 14 43 -0.32768000000000000000e5 +2087 4 2 14 -0.32768000000000000000e5 +2087 4 11 23 0.65536000000000000000e5 +2088 1 4 35 0.32768000000000000000e5 +2088 1 11 18 0.65536000000000000000e5 +2088 1 12 43 0.32768000000000000000e5 +2088 1 13 20 -0.26214400000000000000e6 +2088 1 14 45 0.13107200000000000000e6 +2088 1 17 32 0.13107200000000000000e6 +2088 1 17 48 -0.32768000000000000000e5 +2088 1 18 49 -0.32768000000000000000e5 +2088 1 20 27 0.13107200000000000000e6 +2088 2 9 23 0.32768000000000000000e5 +2088 2 11 25 0.13107200000000000000e6 +2088 2 14 28 -0.32768000000000000000e5 +2088 2 15 28 0.65536000000000000000e5 +2088 3 5 34 0.32768000000000000000e5 +2088 3 6 19 -0.65536000000000000000e5 +2088 3 8 21 0.26214400000000000000e6 +2088 3 13 42 -0.32768000000000000000e5 +2088 3 14 27 0.32768000000000000000e5 +2088 3 14 43 -0.32768000000000000000e5 +2088 3 16 29 -0.65536000000000000000e5 +2088 3 17 30 -0.65536000000000000000e5 +2088 3 18 31 0.13107200000000000000e6 +2089 1 3 18 0.16384000000000000000e5 +2089 1 4 19 -0.32768000000000000000e5 +2089 1 5 36 -0.32768000000000000000e5 +2089 1 6 21 -0.65536000000000000000e5 +2089 1 12 43 -0.16384000000000000000e5 +2089 1 13 44 0.32768000000000000000e5 +2089 1 14 45 0.32768000000000000000e5 +2089 1 15 46 0.65536000000000000000e5 +2089 2 9 15 -0.65536000000000000000e5 +2089 2 15 30 0.65536000000000000000e5 +2089 3 3 16 0.16384000000000000000e5 +2089 3 4 17 0.16384000000000000000e5 +2089 3 7 20 0.65536000000000000000e5 +2089 3 8 21 -0.13107200000000000000e6 +2089 3 14 19 0.13107200000000000000e6 +2089 3 14 27 -0.16384000000000000000e5 +2089 3 16 29 -0.32768000000000000000e5 +2089 3 18 31 -0.65536000000000000000e5 +2089 3 19 32 0.13107200000000000000e6 +2089 4 2 14 0.16384000000000000000e5 +2089 4 10 14 0.65536000000000000000e5 +2089 4 11 23 -0.32768000000000000000e5 +2090 1 3 18 0.81920000000000000000e4 +2090 1 4 19 -0.16384000000000000000e5 +2090 1 5 36 -0.16384000000000000000e5 +2090 1 6 21 0.32768000000000000000e5 +2090 1 12 43 -0.81920000000000000000e4 +2090 1 13 20 0.13107200000000000000e6 +2090 1 13 44 0.16384000000000000000e5 +2090 1 14 45 0.16384000000000000000e5 +2090 1 20 27 -0.32768000000000000000e5 +2090 1 21 44 -0.13107200000000000000e6 +2090 1 33 36 0.65536000000000000000e5 +2090 2 9 15 0.32768000000000000000e5 +2090 2 11 25 -0.65536000000000000000e5 +2090 2 15 29 0.32768000000000000000e5 +2090 2 15 31 0.65536000000000000000e5 +2090 3 3 16 0.81920000000000000000e4 +2090 3 4 17 0.81920000000000000000e4 +2090 3 7 20 -0.32768000000000000000e5 +2090 3 7 36 -0.32768000000000000000e5 +2090 3 8 21 -0.65536000000000000000e5 +2090 3 14 19 -0.65536000000000000000e5 +2090 3 14 27 -0.81920000000000000000e4 +2090 3 16 29 -0.16384000000000000000e5 +2090 3 18 31 -0.32768000000000000000e5 +2090 3 19 32 -0.65536000000000000000e5 +2090 4 2 14 0.81920000000000000000e4 +2090 4 10 14 -0.32768000000000000000e5 +2090 4 11 23 -0.16384000000000000000e5 +2091 1 4 35 0.32768000000000000000e5 +2091 1 12 43 0.32768000000000000000e5 +2091 1 14 45 0.13107200000000000000e6 +2091 1 17 48 -0.32768000000000000000e5 +2091 1 18 49 -0.32768000000000000000e5 +2091 1 19 50 -0.13107200000000000000e6 +2091 1 34 41 0.65536000000000000000e5 +2091 2 9 23 0.32768000000000000000e5 +2091 2 14 28 -0.32768000000000000000e5 +2091 2 15 32 0.65536000000000000000e5 +2091 3 5 34 0.32768000000000000000e5 +2091 3 13 42 -0.32768000000000000000e5 +2091 3 14 27 0.32768000000000000000e5 +2091 3 14 43 -0.32768000000000000000e5 +2091 3 15 44 0.65536000000000000000e5 +2091 3 16 29 -0.65536000000000000000e5 +2091 3 16 45 -0.13107200000000000000e6 +2091 4 15 27 0.65536000000000000000e5 +2092 1 4 35 0.32768000000000000000e5 +2092 1 11 18 0.65536000000000000000e5 +2092 1 12 43 0.32768000000000000000e5 +2092 1 13 20 -0.26214400000000000000e6 +2092 1 14 45 0.13107200000000000000e6 +2092 1 17 32 0.13107200000000000000e6 +2092 1 17 48 -0.32768000000000000000e5 +2092 1 18 49 -0.32768000000000000000e5 +2092 1 20 27 0.13107200000000000000e6 +2092 2 9 23 0.32768000000000000000e5 +2092 2 11 25 0.13107200000000000000e6 +2092 2 14 28 -0.32768000000000000000e5 +2092 2 15 33 0.65536000000000000000e5 +2092 3 5 34 0.32768000000000000000e5 +2092 3 6 19 -0.65536000000000000000e5 +2092 3 8 21 0.26214400000000000000e6 +2092 3 13 42 -0.32768000000000000000e5 +2092 3 14 27 0.32768000000000000000e5 +2092 3 14 43 -0.32768000000000000000e5 +2092 3 16 29 -0.65536000000000000000e5 +2092 3 17 30 -0.65536000000000000000e5 +2092 3 18 31 0.13107200000000000000e6 +2092 4 15 27 0.65536000000000000000e5 +2093 2 15 34 0.65536000000000000000e5 +2093 2 25 31 -0.65536000000000000000e5 +2094 1 4 35 0.32768000000000000000e5 +2094 1 11 18 0.65536000000000000000e5 +2094 1 12 43 0.32768000000000000000e5 +2094 1 13 20 -0.26214400000000000000e6 +2094 1 14 45 0.13107200000000000000e6 +2094 1 17 32 0.13107200000000000000e6 +2094 1 17 48 -0.32768000000000000000e5 +2094 1 18 49 -0.32768000000000000000e5 +2094 1 20 27 0.13107200000000000000e6 +2094 2 9 23 0.32768000000000000000e5 +2094 2 11 25 0.13107200000000000000e6 +2094 2 14 28 -0.32768000000000000000e5 +2094 2 15 35 0.65536000000000000000e5 +2094 3 5 34 0.32768000000000000000e5 +2094 3 6 19 -0.65536000000000000000e5 +2094 3 8 21 0.26214400000000000000e6 +2094 3 13 42 -0.32768000000000000000e5 +2094 3 14 27 0.32768000000000000000e5 +2094 3 14 43 -0.32768000000000000000e5 +2094 3 16 29 -0.65536000000000000000e5 +2094 3 17 30 -0.65536000000000000000e5 +2094 3 18 31 0.13107200000000000000e6 +2094 3 19 48 -0.65536000000000000000e5 +2094 3 31 44 -0.65536000000000000000e5 +2094 3 32 45 -0.65536000000000000000e5 +2094 3 36 41 0.13107200000000000000e6 +2094 4 15 27 0.65536000000000000000e5 +2095 1 1 48 0.65536000000000000000e5 +2095 1 7 38 -0.13107200000000000000e6 +2095 1 22 37 0.65536000000000000000e5 +2095 1 23 38 0.65536000000000000000e5 +2095 2 16 17 0.65536000000000000000e5 +2095 3 22 27 0.13107200000000000000e6 +2095 4 16 16 -0.13107200000000000000e6 +2096 1 1 40 0.65536000000000000000e5 +2096 1 23 38 -0.65536000000000000000e5 +2096 2 2 32 -0.65536000000000000000e5 +2096 2 16 18 0.65536000000000000000e5 +2096 3 1 38 0.65536000000000000000e5 +2096 3 2 39 0.65536000000000000000e5 +2096 3 8 37 -0.13107200000000000000e6 +2097 1 1 40 0.65536000000000000000e5 +2097 1 2 49 0.65536000000000000000e5 +2097 1 6 37 0.65536000000000000000e5 +2097 1 8 39 -0.13107200000000000000e6 +2097 2 16 19 0.65536000000000000000e5 +2097 3 2 39 0.65536000000000000000e5 +2098 1 1 8 -0.65536000000000000000e5 +2098 1 1 24 -0.32768000000000000000e5 +2098 1 1 32 -0.13107200000000000000e6 +2098 1 1 40 -0.32768000000000000000e5 +2098 1 1 48 0.98304000000000000000e5 +2098 1 2 9 -0.65536000000000000000e5 +2098 1 2 33 0.26214400000000000000e6 +2098 1 2 49 0.98304000000000000000e5 +2098 1 3 34 -0.26214400000000000000e6 +2098 1 4 11 -0.65536000000000000000e5 +2098 1 7 38 0.65536000000000000000e5 +2098 1 8 23 0.65536000000000000000e5 +2098 1 8 39 0.65536000000000000000e5 +2098 1 9 40 0.65536000000000000000e5 +2098 1 10 41 0.13107200000000000000e6 +2098 1 12 27 0.26214400000000000000e6 +2098 1 12 43 -0.26214400000000000000e6 +2098 1 16 23 -0.26214400000000000000e6 +2098 1 22 37 0.32768000000000000000e5 +2098 1 23 38 0.13107200000000000000e6 +2098 1 26 41 -0.65536000000000000000e5 +2098 1 28 43 0.13107200000000000000e6 +2098 1 32 47 0.26214400000000000000e6 +2098 2 1 7 -0.65536000000000000000e5 +2098 2 1 31 0.13107200000000000000e6 +2098 2 2 8 0.65536000000000000000e5 +2098 2 2 16 -0.32768000000000000000e5 +2098 2 2 32 0.98304000000000000000e5 +2098 2 3 9 -0.65536000000000000000e5 +2098 2 6 20 -0.13107200000000000000e6 +2098 2 7 21 0.13107200000000000000e6 +2098 2 16 16 0.65536000000000000000e5 +2098 2 16 20 0.65536000000000000000e5 +2098 2 16 30 0.65536000000000000000e5 +2098 2 20 34 0.13107200000000000000e6 +2098 3 1 14 -0.26214400000000000000e6 +2098 3 1 22 -0.32768000000000000000e5 +2098 3 1 30 -0.65536000000000000000e5 +2098 3 1 34 0.26214400000000000000e6 +2098 3 1 38 -0.32768000000000000000e5 +2098 3 2 7 -0.13107200000000000000e6 +2098 3 2 15 0.13107200000000000000e6 +2098 3 2 23 -0.32768000000000000000e5 +2098 3 2 31 -0.13107200000000000000e6 +2098 3 3 32 0.26214400000000000000e6 +2098 3 4 9 -0.65536000000000000000e5 +2098 3 7 12 0.26214400000000000000e6 +2098 3 8 37 0.13107200000000000000e6 +2098 3 10 23 -0.13107200000000000000e6 +2098 3 22 27 0.65536000000000000000e5 +2098 3 22 35 0.26214400000000000000e6 +2098 3 28 41 0.26214400000000000000e6 +2098 4 2 6 -0.65536000000000000000e5 +2098 4 2 30 0.65536000000000000000e5 +2098 4 6 6 -0.26214400000000000000e6 +2098 4 6 18 -0.65536000000000000000e5 +2098 4 6 34 0.13107200000000000000e6 +2098 4 16 16 -0.65536000000000000000e5 +2099 1 1 48 0.32768000000000000000e5 +2099 1 2 33 0.13107200000000000000e6 +2099 1 2 49 0.32768000000000000000e5 +2099 1 3 34 -0.26214400000000000000e6 +2099 1 7 38 0.65536000000000000000e5 +2099 1 8 39 0.65536000000000000000e5 +2099 1 10 41 0.13107200000000000000e6 +2099 1 23 38 0.32768000000000000000e5 +2099 2 2 32 0.32768000000000000000e5 +2099 2 7 21 0.13107200000000000000e6 +2099 2 16 21 0.65536000000000000000e5 +2099 3 2 31 0.13107200000000000000e6 +2099 3 3 32 0.13107200000000000000e6 +2099 3 8 37 0.65536000000000000000e5 +2100 1 9 40 -0.65536000000000000000e5 +2100 1 10 41 0.13107200000000000000e6 +2100 1 11 42 -0.13107200000000000000e6 +2100 1 26 41 0.65536000000000000000e5 +2100 1 32 47 -0.13107200000000000000e6 +2100 1 33 48 0.13107200000000000000e6 +2100 2 12 26 0.13107200000000000000e6 +2100 2 16 22 0.65536000000000000000e5 +2100 2 16 30 -0.65536000000000000000e5 +2100 2 20 34 -0.13107200000000000000e6 +2100 3 8 37 0.65536000000000000000e5 +2100 3 13 42 0.26214400000000000000e6 +2100 3 22 35 -0.26214400000000000000e6 +2100 3 28 41 -0.13107200000000000000e6 +2100 3 29 42 0.13107200000000000000e6 +2100 4 2 30 -0.65536000000000000000e5 +2100 4 3 31 -0.13107200000000000000e6 +2100 4 6 34 -0.13107200000000000000e6 +2101 2 1 31 -0.65536000000000000000e5 +2101 2 16 23 0.65536000000000000000e5 +2102 1 2 33 -0.65536000000000000000e5 +2102 1 3 34 0.13107200000000000000e6 +2102 1 11 42 0.65536000000000000000e5 +2102 1 12 43 0.13107200000000000000e6 +2102 1 16 47 -0.13107200000000000000e6 +2102 1 28 43 -0.65536000000000000000e5 +2102 1 32 47 -0.65536000000000000000e5 +2102 1 33 48 -0.65536000000000000000e5 +2102 2 7 21 -0.65536000000000000000e5 +2102 2 12 26 -0.65536000000000000000e5 +2102 2 16 24 0.65536000000000000000e5 +2102 3 2 31 -0.65536000000000000000e5 +2102 3 3 32 -0.65536000000000000000e5 +2102 3 12 41 -0.13107200000000000000e6 +2102 3 13 42 -0.13107200000000000000e6 +2102 3 28 41 -0.65536000000000000000e5 +2102 3 29 42 -0.65536000000000000000e5 +2102 4 3 31 0.65536000000000000000e5 +2103 1 12 43 0.65536000000000000000e5 +2103 1 16 23 0.65536000000000000000e5 +2103 1 16 47 0.65536000000000000000e5 +2103 1 27 34 -0.13107200000000000000e6 +2103 2 16 25 0.65536000000000000000e5 +2103 3 1 34 -0.65536000000000000000e5 +2103 3 12 41 0.65536000000000000000e5 +2104 1 1 48 0.65536000000000000000e5 +2104 1 7 38 -0.13107200000000000000e6 +2104 1 22 37 0.65536000000000000000e5 +2104 1 23 38 0.65536000000000000000e5 +2104 2 16 26 0.65536000000000000000e5 +2104 3 22 27 0.13107200000000000000e6 +2105 2 2 32 -0.65536000000000000000e5 +2105 2 16 27 0.65536000000000000000e5 +2106 1 2 49 0.65536000000000000000e5 +2106 1 8 39 -0.13107200000000000000e6 +2106 1 9 40 -0.13107200000000000000e6 +2106 1 10 41 0.26214400000000000000e6 +2106 1 23 38 0.65536000000000000000e5 +2106 1 24 39 0.65536000000000000000e5 +2106 1 26 41 0.13107200000000000000e6 +2106 1 32 47 -0.26214400000000000000e6 +2106 2 16 28 0.65536000000000000000e5 +2106 3 9 38 -0.13107200000000000000e6 +2106 3 28 41 -0.26214400000000000000e6 +2106 4 2 30 -0.13107200000000000000e6 +2107 1 1 48 0.32768000000000000000e5 +2107 1 2 33 0.13107200000000000000e6 +2107 1 2 49 0.32768000000000000000e5 +2107 1 3 34 -0.26214400000000000000e6 +2107 1 7 38 0.65536000000000000000e5 +2107 1 8 39 0.65536000000000000000e5 +2107 1 10 41 0.13107200000000000000e6 +2107 1 23 38 0.32768000000000000000e5 +2107 2 2 32 0.32768000000000000000e5 +2107 2 7 21 0.13107200000000000000e6 +2107 2 16 29 0.65536000000000000000e5 +2107 3 2 31 0.13107200000000000000e6 +2107 3 3 32 0.13107200000000000000e6 +2107 3 8 37 0.65536000000000000000e5 +2107 4 1 29 0.65536000000000000000e5 +2108 1 2 33 -0.65536000000000000000e5 +2108 1 3 34 0.13107200000000000000e6 +2108 1 9 40 0.32768000000000000000e5 +2108 1 10 41 -0.13107200000000000000e6 +2108 1 12 43 0.13107200000000000000e6 +2108 1 16 47 -0.13107200000000000000e6 +2108 1 26 41 -0.32768000000000000000e5 +2108 1 28 43 -0.65536000000000000000e5 +2108 1 32 47 0.65536000000000000000e5 +2108 2 7 21 -0.65536000000000000000e5 +2108 2 16 31 0.65536000000000000000e5 +2108 2 20 34 -0.65536000000000000000e5 +2108 3 2 31 -0.65536000000000000000e5 +2108 3 3 32 -0.65536000000000000000e5 +2108 3 8 37 -0.32768000000000000000e5 +2108 3 9 38 0.32768000000000000000e5 +2108 3 22 27 -0.32768000000000000000e5 +2108 3 22 35 -0.13107200000000000000e6 +2108 3 28 41 0.65536000000000000000e5 +2108 4 1 29 -0.32768000000000000000e5 +2108 4 2 30 0.32768000000000000000e5 +2108 4 6 34 -0.65536000000000000000e5 +2109 2 1 35 -0.65536000000000000000e5 +2109 2 16 32 0.65536000000000000000e5 +2110 1 2 49 0.65536000000000000000e5 +2110 1 6 53 -0.13107200000000000000e6 +2110 1 8 39 -0.13107200000000000000e6 +2110 1 9 40 -0.13107200000000000000e6 +2110 1 10 41 0.26214400000000000000e6 +2110 1 23 38 0.65536000000000000000e5 +2110 1 24 39 0.65536000000000000000e5 +2110 1 25 40 0.13107200000000000000e6 +2110 1 26 41 0.13107200000000000000e6 +2110 1 32 47 -0.26214400000000000000e6 +2110 2 16 33 0.65536000000000000000e5 +2110 3 2 47 -0.65536000000000000000e5 +2110 3 9 38 -0.13107200000000000000e6 +2110 3 24 37 -0.13107200000000000000e6 +2110 3 25 38 0.65536000000000000000e5 +2110 3 27 40 -0.39321600000000000000e6 +2110 4 2 30 -0.13107200000000000000e6 +2110 4 4 32 0.13107200000000000000e6 +2110 4 16 28 -0.65536000000000000000e5 +2110 4 17 29 -0.13107200000000000000e6 +2111 2 16 35 0.65536000000000000000e5 +2111 2 26 32 -0.65536000000000000000e5 +2112 1 1 40 0.32768000000000000000e5 +2112 1 23 38 -0.32768000000000000000e5 +2112 2 2 32 -0.32768000000000000000e5 +2112 2 17 17 0.65536000000000000000e5 +2112 3 1 38 0.32768000000000000000e5 +2112 3 2 39 0.32768000000000000000e5 +2112 3 8 37 -0.65536000000000000000e5 +2113 1 1 40 0.65536000000000000000e5 +2113 1 2 49 0.65536000000000000000e5 +2113 1 6 37 0.65536000000000000000e5 +2113 1 8 39 -0.13107200000000000000e6 +2113 2 17 18 0.65536000000000000000e5 +2113 3 2 39 0.65536000000000000000e5 +2114 1 6 37 0.65536000000000000000e5 +2114 1 24 39 -0.65536000000000000000e5 +2114 2 3 33 -0.65536000000000000000e5 +2114 2 17 19 0.65536000000000000000e5 +2114 3 2 39 0.65536000000000000000e5 +2114 3 3 40 0.65536000000000000000e5 +2114 3 9 38 -0.13107200000000000000e6 +2115 1 1 48 0.32768000000000000000e5 +2115 1 2 33 0.13107200000000000000e6 +2115 1 2 49 0.32768000000000000000e5 +2115 1 3 34 -0.26214400000000000000e6 +2115 1 7 38 0.65536000000000000000e5 +2115 1 8 39 0.65536000000000000000e5 +2115 1 10 41 0.13107200000000000000e6 +2115 1 23 38 0.32768000000000000000e5 +2115 2 2 32 0.32768000000000000000e5 +2115 2 7 21 0.13107200000000000000e6 +2115 2 17 20 0.65536000000000000000e5 +2115 3 2 31 0.13107200000000000000e6 +2115 3 3 32 0.13107200000000000000e6 +2115 3 8 37 0.65536000000000000000e5 +2116 1 9 40 -0.65536000000000000000e5 +2116 1 10 41 0.13107200000000000000e6 +2116 1 11 42 -0.13107200000000000000e6 +2116 1 26 41 0.65536000000000000000e5 +2116 1 32 47 -0.13107200000000000000e6 +2116 1 33 48 0.13107200000000000000e6 +2116 2 12 26 0.13107200000000000000e6 +2116 2 16 30 -0.65536000000000000000e5 +2116 2 17 21 0.65536000000000000000e5 +2116 2 20 34 -0.13107200000000000000e6 +2116 3 8 37 0.65536000000000000000e5 +2116 3 13 42 0.26214400000000000000e6 +2116 3 22 35 -0.26214400000000000000e6 +2116 3 28 41 -0.13107200000000000000e6 +2116 3 29 42 0.13107200000000000000e6 +2116 4 2 30 -0.65536000000000000000e5 +2116 4 3 31 -0.13107200000000000000e6 +2116 4 6 34 -0.13107200000000000000e6 +2117 1 1 48 -0.32768000000000000000e5 +2117 1 2 49 -0.32768000000000000000e5 +2117 1 12 43 0.26214400000000000000e6 +2117 1 23 38 -0.32768000000000000000e5 +2117 1 26 41 0.65536000000000000000e5 +2117 1 28 43 -0.13107200000000000000e6 +2117 1 32 47 -0.26214400000000000000e6 +2117 2 2 32 -0.32768000000000000000e5 +2117 2 16 30 -0.65536000000000000000e5 +2117 2 17 22 0.65536000000000000000e5 +2117 2 20 34 -0.13107200000000000000e6 +2117 3 22 35 -0.26214400000000000000e6 +2117 3 28 41 -0.26214400000000000000e6 +2117 4 2 30 -0.65536000000000000000e5 +2117 4 6 34 -0.13107200000000000000e6 +2118 1 2 33 -0.65536000000000000000e5 +2118 1 3 34 0.13107200000000000000e6 +2118 1 11 42 0.65536000000000000000e5 +2118 1 12 43 0.13107200000000000000e6 +2118 1 16 47 -0.13107200000000000000e6 +2118 1 28 43 -0.65536000000000000000e5 +2118 1 32 47 -0.65536000000000000000e5 +2118 1 33 48 -0.65536000000000000000e5 +2118 2 7 21 -0.65536000000000000000e5 +2118 2 12 26 -0.65536000000000000000e5 +2118 2 17 23 0.65536000000000000000e5 +2118 3 2 31 -0.65536000000000000000e5 +2118 3 3 32 -0.65536000000000000000e5 +2118 3 12 41 -0.13107200000000000000e6 +2118 3 13 42 -0.13107200000000000000e6 +2118 3 28 41 -0.65536000000000000000e5 +2118 3 29 42 -0.65536000000000000000e5 +2118 4 3 31 0.65536000000000000000e5 +2119 2 12 26 -0.65536000000000000000e5 +2119 2 17 24 0.65536000000000000000e5 +2120 1 12 43 0.65536000000000000000e5 +2120 1 13 44 -0.13107200000000000000e6 +2120 1 16 47 0.65536000000000000000e5 +2120 1 17 48 0.65536000000000000000e5 +2120 2 17 25 0.65536000000000000000e5 +2120 3 12 41 0.65536000000000000000e5 +2120 3 13 42 0.65536000000000000000e5 +2121 2 2 32 -0.65536000000000000000e5 +2121 2 17 26 0.65536000000000000000e5 +2122 1 2 49 0.65536000000000000000e5 +2122 1 8 39 -0.13107200000000000000e6 +2122 1 9 40 -0.13107200000000000000e6 +2122 1 10 41 0.26214400000000000000e6 +2122 1 23 38 0.65536000000000000000e5 +2122 1 24 39 0.65536000000000000000e5 +2122 1 26 41 0.13107200000000000000e6 +2122 1 32 47 -0.26214400000000000000e6 +2122 2 17 27 0.65536000000000000000e5 +2122 3 9 38 -0.13107200000000000000e6 +2122 3 28 41 -0.26214400000000000000e6 +2122 4 2 30 -0.13107200000000000000e6 +2123 2 3 33 -0.65536000000000000000e5 +2123 2 17 28 0.65536000000000000000e5 +2124 2 16 30 -0.65536000000000000000e5 +2124 2 17 29 0.65536000000000000000e5 +2125 1 1 48 -0.32768000000000000000e5 +2125 1 2 49 -0.32768000000000000000e5 +2125 1 12 43 0.26214400000000000000e6 +2125 1 23 38 -0.32768000000000000000e5 +2125 1 26 41 0.65536000000000000000e5 +2125 1 28 43 -0.13107200000000000000e6 +2125 1 32 47 -0.26214400000000000000e6 +2125 2 2 32 -0.32768000000000000000e5 +2125 2 16 30 -0.65536000000000000000e5 +2125 2 17 30 0.65536000000000000000e5 +2125 2 20 34 -0.13107200000000000000e6 +2125 3 22 35 -0.26214400000000000000e6 +2125 3 28 41 -0.26214400000000000000e6 +2125 4 6 34 -0.13107200000000000000e6 +2126 2 17 31 0.65536000000000000000e5 +2126 2 20 34 -0.65536000000000000000e5 +2126 4 6 34 -0.65536000000000000000e5 +2127 1 2 49 0.65536000000000000000e5 +2127 1 6 53 -0.13107200000000000000e6 +2127 1 8 39 -0.13107200000000000000e6 +2127 1 9 40 -0.13107200000000000000e6 +2127 1 10 41 0.26214400000000000000e6 +2127 1 23 38 0.65536000000000000000e5 +2127 1 24 39 0.65536000000000000000e5 +2127 1 25 40 0.13107200000000000000e6 +2127 1 26 41 0.13107200000000000000e6 +2127 1 32 47 -0.26214400000000000000e6 +2127 2 17 32 0.65536000000000000000e5 +2127 3 2 47 -0.65536000000000000000e5 +2127 3 9 38 -0.13107200000000000000e6 +2127 3 24 37 -0.13107200000000000000e6 +2127 3 25 38 0.65536000000000000000e5 +2127 3 27 40 -0.39321600000000000000e6 +2127 4 2 30 -0.13107200000000000000e6 +2127 4 4 32 0.13107200000000000000e6 +2127 4 16 28 -0.65536000000000000000e5 +2127 4 17 29 -0.13107200000000000000e6 +2128 2 3 33 -0.65536000000000000000e5 +2128 2 17 33 0.65536000000000000000e5 +2128 4 16 28 0.65536000000000000000e5 +2129 1 1 48 -0.32768000000000000000e5 +2129 1 2 49 -0.32768000000000000000e5 +2129 1 12 43 0.26214400000000000000e6 +2129 1 23 38 -0.32768000000000000000e5 +2129 1 26 41 0.65536000000000000000e5 +2129 1 28 43 -0.13107200000000000000e6 +2129 1 32 47 -0.26214400000000000000e6 +2129 2 2 32 -0.32768000000000000000e5 +2129 2 16 30 -0.65536000000000000000e5 +2129 2 17 34 0.65536000000000000000e5 +2129 2 20 34 -0.13107200000000000000e6 +2129 3 22 35 -0.26214400000000000000e6 +2129 3 28 41 -0.26214400000000000000e6 +2129 4 6 34 -0.13107200000000000000e6 +2129 4 17 29 0.65536000000000000000e5 +2130 1 1 48 0.65536000000000000000e5 +2130 1 2 49 0.65536000000000000000e5 +2130 1 6 53 0.13107200000000000000e6 +2130 1 8 39 0.26214400000000000000e6 +2130 1 9 40 0.26214400000000000000e6 +2130 1 10 41 -0.52428800000000000000e6 +2130 1 12 43 -0.52428800000000000000e6 +2130 1 22 53 -0.65536000000000000000e5 +2130 1 23 38 0.65536000000000000000e5 +2130 1 24 55 -0.13107200000000000000e6 +2130 1 25 40 -0.13107200000000000000e6 +2130 1 26 41 -0.13107200000000000000e6 +2130 1 28 43 0.26214400000000000000e6 +2130 1 32 47 0.52428800000000000000e6 +2130 1 37 52 0.26214400000000000000e6 +2130 1 40 47 0.65536000000000000000e5 +2130 2 2 32 0.65536000000000000000e5 +2130 2 16 30 0.13107200000000000000e6 +2130 2 17 35 0.65536000000000000000e5 +2130 2 20 34 0.26214400000000000000e6 +2130 2 26 32 -0.65536000000000000000e5 +2130 3 9 38 0.26214400000000000000e6 +2130 3 22 35 0.52428800000000000000e6 +2130 3 22 51 0.26214400000000000000e6 +2130 3 24 37 0.13107200000000000000e6 +2130 3 27 40 0.26214400000000000000e6 +2130 3 28 41 0.52428800000000000000e6 +2130 4 2 30 0.26214400000000000000e6 +2130 4 4 32 -0.13107200000000000000e6 +2130 4 6 34 0.26214400000000000000e6 +2130 4 16 28 0.13107200000000000000e6 +2130 4 17 29 0.13107200000000000000e6 +2130 4 20 32 0.13107200000000000000e6 +2131 1 6 37 0.32768000000000000000e5 +2131 1 24 39 -0.32768000000000000000e5 +2131 2 3 33 -0.32768000000000000000e5 +2131 2 18 18 0.65536000000000000000e5 +2131 3 2 39 0.32768000000000000000e5 +2131 3 3 40 0.32768000000000000000e5 +2131 3 9 38 -0.65536000000000000000e5 +2132 2 5 27 -0.65536000000000000000e5 +2132 2 18 19 0.65536000000000000000e5 +2133 1 9 40 -0.65536000000000000000e5 +2133 1 10 41 0.13107200000000000000e6 +2133 1 11 42 -0.13107200000000000000e6 +2133 1 26 41 0.65536000000000000000e5 +2133 1 32 47 -0.13107200000000000000e6 +2133 1 33 48 0.13107200000000000000e6 +2133 2 12 26 0.13107200000000000000e6 +2133 2 16 30 -0.65536000000000000000e5 +2133 2 18 20 0.65536000000000000000e5 +2133 2 20 34 -0.13107200000000000000e6 +2133 3 8 37 0.65536000000000000000e5 +2133 3 13 42 0.26214400000000000000e6 +2133 3 22 35 -0.26214400000000000000e6 +2133 3 28 41 -0.13107200000000000000e6 +2133 3 29 42 0.13107200000000000000e6 +2133 4 2 30 -0.65536000000000000000e5 +2133 4 3 31 -0.13107200000000000000e6 +2133 4 6 34 -0.13107200000000000000e6 +2134 1 1 48 -0.32768000000000000000e5 +2134 1 2 49 -0.32768000000000000000e5 +2134 1 12 43 0.26214400000000000000e6 +2134 1 23 38 -0.32768000000000000000e5 +2134 1 26 41 0.65536000000000000000e5 +2134 1 28 43 -0.13107200000000000000e6 +2134 1 32 47 -0.26214400000000000000e6 +2134 2 2 32 -0.32768000000000000000e5 +2134 2 16 30 -0.65536000000000000000e5 +2134 2 18 21 0.65536000000000000000e5 +2134 2 20 34 -0.13107200000000000000e6 +2134 3 22 35 -0.26214400000000000000e6 +2134 3 28 41 -0.26214400000000000000e6 +2134 4 2 30 -0.65536000000000000000e5 +2134 4 6 34 -0.13107200000000000000e6 +2135 1 9 40 0.65536000000000000000e5 +2135 1 10 41 0.13107200000000000000e6 +2135 1 11 42 0.13107200000000000000e6 +2135 1 26 41 -0.65536000000000000000e5 +2135 1 32 47 -0.13107200000000000000e6 +2135 1 33 48 -0.13107200000000000000e6 +2135 2 4 34 -0.65536000000000000000e5 +2135 2 18 22 0.65536000000000000000e5 +2135 3 9 38 0.65536000000000000000e5 +2135 3 10 39 0.65536000000000000000e5 +2135 3 13 42 -0.26214400000000000000e6 +2135 3 28 41 -0.13107200000000000000e6 +2135 3 29 42 -0.13107200000000000000e6 +2135 4 3 31 0.13107200000000000000e6 +2136 2 12 26 -0.65536000000000000000e5 +2136 2 18 23 0.65536000000000000000e5 +2137 1 17 48 -0.13107200000000000000e6 +2137 1 28 43 0.65536000000000000000e5 +2137 1 32 47 0.65536000000000000000e5 +2137 1 33 48 0.65536000000000000000e5 +2137 2 18 24 0.65536000000000000000e5 +2137 3 28 41 0.65536000000000000000e5 +2137 3 29 42 0.65536000000000000000e5 +2137 4 3 31 -0.65536000000000000000e5 +2138 1 4 35 -0.65536000000000000000e5 +2138 1 17 48 0.65536000000000000000e5 +2138 2 9 23 -0.65536000000000000000e5 +2138 2 18 25 0.65536000000000000000e5 +2138 3 5 34 -0.65536000000000000000e5 +2138 3 13 42 0.65536000000000000000e5 +2138 3 14 27 -0.65536000000000000000e5 +2138 3 16 29 0.13107200000000000000e6 +2139 1 2 49 0.65536000000000000000e5 +2139 1 8 39 -0.13107200000000000000e6 +2139 1 9 40 -0.13107200000000000000e6 +2139 1 10 41 0.26214400000000000000e6 +2139 1 23 38 0.65536000000000000000e5 +2139 1 24 39 0.65536000000000000000e5 +2139 1 26 41 0.13107200000000000000e6 +2139 1 32 47 -0.26214400000000000000e6 +2139 2 18 26 0.65536000000000000000e5 +2139 3 9 38 -0.13107200000000000000e6 +2139 3 28 41 -0.26214400000000000000e6 +2139 4 2 30 -0.13107200000000000000e6 +2140 2 3 33 -0.65536000000000000000e5 +2140 2 18 27 0.65536000000000000000e5 +2141 1 1 48 -0.65536000000000000000e5 +2141 1 2 49 -0.13107200000000000000e6 +2141 1 8 39 -0.13107200000000000000e6 +2141 1 9 40 -0.13107200000000000000e6 +2141 1 10 41 0.26214400000000000000e6 +2141 1 12 43 0.52428800000000000000e6 +2141 1 23 38 -0.65536000000000000000e5 +2141 1 25 40 0.65536000000000000000e5 +2141 1 28 43 -0.26214400000000000000e6 +2141 1 32 47 -0.52428800000000000000e6 +2141 2 2 32 -0.65536000000000000000e5 +2141 2 3 33 -0.65536000000000000000e5 +2141 2 16 30 -0.13107200000000000000e6 +2141 2 18 28 0.65536000000000000000e5 +2141 2 20 34 -0.26214400000000000000e6 +2141 3 9 38 -0.13107200000000000000e6 +2141 3 22 35 -0.52428800000000000000e6 +2141 3 28 41 -0.52428800000000000000e6 +2141 4 2 30 -0.13107200000000000000e6 +2141 4 6 34 -0.26214400000000000000e6 +2142 1 1 48 -0.32768000000000000000e5 +2142 1 2 49 -0.32768000000000000000e5 +2142 1 12 43 0.26214400000000000000e6 +2142 1 23 38 -0.32768000000000000000e5 +2142 1 26 41 0.65536000000000000000e5 +2142 1 28 43 -0.13107200000000000000e6 +2142 1 32 47 -0.26214400000000000000e6 +2142 2 2 32 -0.32768000000000000000e5 +2142 2 16 30 -0.65536000000000000000e5 +2142 2 18 29 0.65536000000000000000e5 +2142 2 20 34 -0.13107200000000000000e6 +2142 3 22 35 -0.26214400000000000000e6 +2142 3 28 41 -0.26214400000000000000e6 +2142 4 6 34 -0.13107200000000000000e6 +2143 2 4 34 -0.65536000000000000000e5 +2143 2 18 30 0.65536000000000000000e5 +2144 1 17 48 -0.13107200000000000000e6 +2144 1 28 43 0.65536000000000000000e5 +2144 1 32 47 0.65536000000000000000e5 +2144 1 33 48 0.65536000000000000000e5 +2144 2 18 31 0.65536000000000000000e5 +2144 3 28 41 0.65536000000000000000e5 +2144 3 29 42 0.65536000000000000000e5 +2145 2 3 33 -0.65536000000000000000e5 +2145 2 18 32 0.65536000000000000000e5 +2145 4 16 28 0.65536000000000000000e5 +2146 1 1 48 -0.65536000000000000000e5 +2146 1 2 49 -0.13107200000000000000e6 +2146 1 8 39 -0.13107200000000000000e6 +2146 1 9 40 -0.13107200000000000000e6 +2146 1 10 41 0.26214400000000000000e6 +2146 1 12 43 0.52428800000000000000e6 +2146 1 23 38 -0.65536000000000000000e5 +2146 1 25 40 0.65536000000000000000e5 +2146 1 28 43 -0.26214400000000000000e6 +2146 1 32 47 -0.52428800000000000000e6 +2146 2 2 32 -0.65536000000000000000e5 +2146 2 3 33 -0.65536000000000000000e5 +2146 2 16 30 -0.13107200000000000000e6 +2146 2 18 33 0.65536000000000000000e5 +2146 2 20 34 -0.26214400000000000000e6 +2146 3 9 38 -0.13107200000000000000e6 +2146 3 22 35 -0.52428800000000000000e6 +2146 3 28 41 -0.52428800000000000000e6 +2146 4 2 30 -0.13107200000000000000e6 +2146 4 4 32 0.65536000000000000000e5 +2146 4 6 34 -0.26214400000000000000e6 +2147 2 18 34 0.65536000000000000000e5 +2147 2 21 35 -0.65536000000000000000e5 +2147 4 7 35 -0.65536000000000000000e5 +2148 1 23 54 0.65536000000000000000e5 +2148 1 24 55 -0.13107200000000000000e6 +2148 1 25 56 0.65536000000000000000e5 +2148 1 40 47 0.65536000000000000000e5 +2148 2 18 35 0.65536000000000000000e5 +2148 3 24 53 -0.65536000000000000000e5 +2148 3 25 54 -0.65536000000000000000e5 +2148 3 38 51 0.13107200000000000000e6 +2148 4 28 32 -0.65536000000000000000e5 +2149 1 1 40 0.32768000000000000000e5 +2149 1 2 33 -0.26214400000000000000e6 +2149 1 9 40 0.13107200000000000000e6 +2149 1 10 25 -0.13107200000000000000e6 +2149 1 11 42 0.26214400000000000000e6 +2149 1 12 43 0.52428800000000000000e6 +2149 1 23 38 -0.32768000000000000000e5 +2149 1 28 43 -0.26214400000000000000e6 +2149 1 32 47 -0.26214400000000000000e6 +2149 1 33 48 -0.26214400000000000000e6 +2149 2 2 32 -0.32768000000000000000e5 +2149 2 3 17 0.32768000000000000000e5 +2149 2 5 19 -0.32768000000000000000e5 +2149 2 12 26 -0.26214400000000000000e6 +2149 2 19 19 0.65536000000000000000e5 +2149 3 1 30 0.13107200000000000000e6 +2149 3 1 38 0.32768000000000000000e5 +2149 3 2 23 0.32768000000000000000e5 +2149 3 2 39 0.32768000000000000000e5 +2149 3 3 32 -0.13107200000000000000e6 +2149 3 5 26 -0.32768000000000000000e5 +2149 3 8 37 -0.65536000000000000000e5 +2149 3 13 42 -0.52428800000000000000e6 +2149 3 14 27 0.26214400000000000000e6 +2149 3 28 41 -0.26214400000000000000e6 +2149 3 29 42 -0.26214400000000000000e6 +2149 4 3 31 0.26214400000000000000e6 +2149 4 4 16 -0.32768000000000000000e5 +2149 4 5 17 0.32768000000000000000e5 +2149 4 6 18 0.65536000000000000000e5 +2149 4 7 19 -0.65536000000000000000e5 +2149 4 8 20 -0.13107200000000000000e6 +2150 1 1 48 -0.32768000000000000000e5 +2150 1 2 49 -0.32768000000000000000e5 +2150 1 12 43 0.26214400000000000000e6 +2150 1 23 38 -0.32768000000000000000e5 +2150 1 26 41 0.65536000000000000000e5 +2150 1 28 43 -0.13107200000000000000e6 +2150 1 32 47 -0.26214400000000000000e6 +2150 2 2 32 -0.32768000000000000000e5 +2150 2 16 30 -0.65536000000000000000e5 +2150 2 19 20 0.65536000000000000000e5 +2150 2 20 34 -0.13107200000000000000e6 +2150 3 22 35 -0.26214400000000000000e6 +2150 3 28 41 -0.26214400000000000000e6 +2150 4 2 30 -0.65536000000000000000e5 +2150 4 6 34 -0.13107200000000000000e6 +2151 1 9 40 0.65536000000000000000e5 +2151 1 10 41 0.13107200000000000000e6 +2151 1 11 42 0.13107200000000000000e6 +2151 1 26 41 -0.65536000000000000000e5 +2151 1 32 47 -0.13107200000000000000e6 +2151 1 33 48 -0.13107200000000000000e6 +2151 2 4 34 -0.65536000000000000000e5 +2151 2 19 21 0.65536000000000000000e5 +2151 3 9 38 0.65536000000000000000e5 +2151 3 10 39 0.65536000000000000000e5 +2151 3 13 42 -0.26214400000000000000e6 +2151 3 28 41 -0.13107200000000000000e6 +2151 3 29 42 -0.13107200000000000000e6 +2151 4 3 31 0.13107200000000000000e6 +2152 2 19 22 0.65536000000000000000e5 +2152 2 28 34 -0.65536000000000000000e5 +2152 4 18 22 -0.65536000000000000000e5 +2152 4 18 30 -0.65536000000000000000e5 +2152 4 21 33 -0.65536000000000000000e5 +2153 1 17 48 -0.13107200000000000000e6 +2153 1 28 43 0.65536000000000000000e5 +2153 1 32 47 0.65536000000000000000e5 +2153 1 33 48 0.65536000000000000000e5 +2153 2 19 23 0.65536000000000000000e5 +2153 3 28 41 0.65536000000000000000e5 +2153 3 29 42 0.65536000000000000000e5 +2153 4 3 31 -0.65536000000000000000e5 +2154 1 10 41 -0.65536000000000000000e5 +2154 1 14 45 -0.26214400000000000000e6 +2154 1 17 48 0.13107200000000000000e6 +2154 1 18 49 0.13107200000000000000e6 +2154 1 26 33 0.65536000000000000000e5 +2154 1 28 43 0.65536000000000000000e5 +2154 1 32 47 0.65536000000000000000e5 +2154 1 33 48 0.65536000000000000000e5 +2154 2 14 28 0.13107200000000000000e6 +2154 2 19 24 0.65536000000000000000e5 +2154 3 13 42 0.26214400000000000000e6 +2154 3 14 43 0.13107200000000000000e6 +2154 3 28 41 0.65536000000000000000e5 +2154 3 29 42 0.65536000000000000000e5 +2154 4 3 31 -0.65536000000000000000e5 +2155 2 14 28 -0.65536000000000000000e5 +2155 2 19 25 0.65536000000000000000e5 +2156 2 3 33 -0.65536000000000000000e5 +2156 2 19 26 0.65536000000000000000e5 +2157 1 1 48 -0.65536000000000000000e5 +2157 1 2 49 -0.13107200000000000000e6 +2157 1 8 39 -0.13107200000000000000e6 +2157 1 9 40 -0.13107200000000000000e6 +2157 1 10 41 0.26214400000000000000e6 +2157 1 12 43 0.52428800000000000000e6 +2157 1 23 38 -0.65536000000000000000e5 +2157 1 25 40 0.65536000000000000000e5 +2157 1 28 43 -0.26214400000000000000e6 +2157 1 32 47 -0.52428800000000000000e6 +2157 2 2 32 -0.65536000000000000000e5 +2157 2 3 33 -0.65536000000000000000e5 +2157 2 16 30 -0.13107200000000000000e6 +2157 2 19 27 0.65536000000000000000e5 +2157 2 20 34 -0.26214400000000000000e6 +2157 3 9 38 -0.13107200000000000000e6 +2157 3 22 35 -0.52428800000000000000e6 +2157 3 28 41 -0.52428800000000000000e6 +2157 4 2 30 -0.13107200000000000000e6 +2157 4 6 34 -0.26214400000000000000e6 +2158 1 6 53 -0.65536000000000000000e5 +2158 1 25 40 0.65536000000000000000e5 +2158 2 5 35 -0.65536000000000000000e5 +2158 2 19 28 0.65536000000000000000e5 +2158 3 5 50 -0.13107200000000000000e6 +2158 3 25 38 0.65536000000000000000e5 +2158 3 26 39 0.65536000000000000000e5 +2159 2 4 34 -0.65536000000000000000e5 +2159 2 19 29 0.65536000000000000000e5 +2160 2 19 30 0.65536000000000000000e5 +2160 2 28 34 -0.65536000000000000000e5 +2160 4 18 30 -0.65536000000000000000e5 +2160 4 21 33 -0.65536000000000000000e5 +2161 1 28 43 0.65536000000000000000e5 +2161 1 33 40 0.65536000000000000000e5 +2161 1 33 48 0.65536000000000000000e5 +2161 1 34 49 -0.13107200000000000000e6 +2161 2 19 31 0.65536000000000000000e5 +2161 3 18 47 -0.13107200000000000000e6 +2161 3 29 42 0.65536000000000000000e5 +2162 1 1 48 -0.65536000000000000000e5 +2162 1 2 49 -0.13107200000000000000e6 +2162 1 8 39 -0.13107200000000000000e6 +2162 1 9 40 -0.13107200000000000000e6 +2162 1 10 41 0.26214400000000000000e6 +2162 1 12 43 0.52428800000000000000e6 +2162 1 23 38 -0.65536000000000000000e5 +2162 1 25 40 0.65536000000000000000e5 +2162 1 28 43 -0.26214400000000000000e6 +2162 1 32 47 -0.52428800000000000000e6 +2162 2 2 32 -0.65536000000000000000e5 +2162 2 3 33 -0.65536000000000000000e5 +2162 2 16 30 -0.13107200000000000000e6 +2162 2 19 32 0.65536000000000000000e5 +2162 2 20 34 -0.26214400000000000000e6 +2162 3 9 38 -0.13107200000000000000e6 +2162 3 22 35 -0.52428800000000000000e6 +2162 3 28 41 -0.52428800000000000000e6 +2162 4 2 30 -0.13107200000000000000e6 +2162 4 4 32 0.65536000000000000000e5 +2162 4 6 34 -0.26214400000000000000e6 +2163 2 5 35 -0.65536000000000000000e5 +2163 2 19 33 0.65536000000000000000e5 +2164 2 19 34 0.65536000000000000000e5 +2164 2 28 34 -0.65536000000000000000e5 +2164 4 21 33 -0.65536000000000000000e5 +2165 1 1 48 0.65536000000000000000e5 +2165 1 2 49 0.13107200000000000000e6 +2165 1 6 53 -0.65536000000000000000e5 +2165 1 8 39 0.13107200000000000000e6 +2165 1 9 40 0.13107200000000000000e6 +2165 1 10 41 -0.26214400000000000000e6 +2165 1 12 43 -0.52428800000000000000e6 +2165 1 23 38 0.65536000000000000000e5 +2165 1 24 39 0.65536000000000000000e5 +2165 1 24 55 0.13107200000000000000e6 +2165 1 25 56 0.65536000000000000000e5 +2165 1 26 41 -0.26214400000000000000e6 +2165 1 28 43 0.26214400000000000000e6 +2165 1 32 47 0.52428800000000000000e6 +2165 1 40 47 0.65536000000000000000e5 +2165 2 2 32 0.65536000000000000000e5 +2165 2 3 33 0.65536000000000000000e5 +2165 2 5 35 -0.65536000000000000000e5 +2165 2 16 30 0.13107200000000000000e6 +2165 2 19 35 0.65536000000000000000e5 +2165 2 20 34 0.26214400000000000000e6 +2165 3 9 38 0.13107200000000000000e6 +2165 3 22 35 0.52428800000000000000e6 +2165 3 22 51 -0.13107200000000000000e6 +2165 3 23 52 0.26214400000000000000e6 +2165 3 24 53 -0.65536000000000000000e5 +2165 3 25 38 0.65536000000000000000e5 +2165 3 25 54 -0.65536000000000000000e5 +2165 3 27 40 0.13107200000000000000e6 +2165 3 28 41 0.52428800000000000000e6 +2165 3 38 51 0.13107200000000000000e6 +2165 3 39 40 -0.65536000000000000000e5 +2165 4 2 30 0.13107200000000000000e6 +2165 4 6 34 0.26214400000000000000e6 +2165 4 7 35 -0.13107200000000000000e6 +2165 4 28 32 -0.65536000000000000000e5 +2166 2 1 31 -0.32768000000000000000e5 +2166 2 20 20 0.65536000000000000000e5 +2167 1 2 33 -0.65536000000000000000e5 +2167 1 3 34 0.13107200000000000000e6 +2167 1 11 42 0.65536000000000000000e5 +2167 1 12 43 0.13107200000000000000e6 +2167 1 16 47 -0.13107200000000000000e6 +2167 1 28 43 -0.65536000000000000000e5 +2167 1 32 47 -0.65536000000000000000e5 +2167 1 33 48 -0.65536000000000000000e5 +2167 2 7 21 -0.65536000000000000000e5 +2167 2 12 26 -0.65536000000000000000e5 +2167 2 20 21 0.65536000000000000000e5 +2167 3 2 31 -0.65536000000000000000e5 +2167 3 3 32 -0.65536000000000000000e5 +2167 3 12 41 -0.13107200000000000000e6 +2167 3 13 42 -0.13107200000000000000e6 +2167 3 28 41 -0.65536000000000000000e5 +2167 3 29 42 -0.65536000000000000000e5 +2167 4 3 31 0.65536000000000000000e5 +2168 2 12 26 -0.65536000000000000000e5 +2168 2 20 22 0.65536000000000000000e5 +2169 1 12 43 0.65536000000000000000e5 +2169 1 16 23 0.65536000000000000000e5 +2169 1 16 47 0.65536000000000000000e5 +2169 1 27 34 -0.13107200000000000000e6 +2169 2 20 23 0.65536000000000000000e5 +2169 3 1 34 -0.65536000000000000000e5 +2169 3 12 41 0.65536000000000000000e5 +2170 1 12 43 0.65536000000000000000e5 +2170 1 13 44 -0.13107200000000000000e6 +2170 1 16 47 0.65536000000000000000e5 +2170 1 17 48 0.65536000000000000000e5 +2170 2 20 24 0.65536000000000000000e5 +2170 3 12 41 0.65536000000000000000e5 +2170 3 13 42 0.65536000000000000000e5 +2171 1 4 35 0.32768000000000000000e5 +2171 1 12 43 0.32768000000000000000e5 +2171 1 13 44 0.65536000000000000000e5 +2171 1 14 45 0.65536000000000000000e5 +2171 1 17 48 -0.32768000000000000000e5 +2171 1 18 49 -0.32768000000000000000e5 +2171 1 20 27 -0.13107200000000000000e6 +2171 1 27 34 0.65536000000000000000e5 +2171 2 9 23 0.32768000000000000000e5 +2171 2 14 28 -0.32768000000000000000e5 +2171 2 20 25 0.65536000000000000000e5 +2171 3 5 34 0.32768000000000000000e5 +2171 3 7 36 0.13107200000000000000e6 +2171 3 13 42 -0.32768000000000000000e5 +2171 3 14 27 0.32768000000000000000e5 +2171 3 14 43 -0.32768000000000000000e5 +2171 3 16 29 -0.65536000000000000000e5 +2172 1 1 48 0.32768000000000000000e5 +2172 1 2 33 0.13107200000000000000e6 +2172 1 2 49 0.32768000000000000000e5 +2172 1 3 34 -0.26214400000000000000e6 +2172 1 7 38 0.65536000000000000000e5 +2172 1 8 39 0.65536000000000000000e5 +2172 1 10 41 0.13107200000000000000e6 +2172 1 23 38 0.32768000000000000000e5 +2172 2 2 32 0.32768000000000000000e5 +2172 2 7 21 0.13107200000000000000e6 +2172 2 20 26 0.65536000000000000000e5 +2172 3 2 31 0.13107200000000000000e6 +2172 3 3 32 0.13107200000000000000e6 +2172 3 8 37 0.65536000000000000000e5 +2172 4 1 29 0.65536000000000000000e5 +2173 2 16 30 -0.65536000000000000000e5 +2173 2 20 27 0.65536000000000000000e5 +2174 1 1 48 -0.32768000000000000000e5 +2174 1 2 49 -0.32768000000000000000e5 +2174 1 12 43 0.26214400000000000000e6 +2174 1 23 38 -0.32768000000000000000e5 +2174 1 26 41 0.65536000000000000000e5 +2174 1 28 43 -0.13107200000000000000e6 +2174 1 32 47 -0.26214400000000000000e6 +2174 2 2 32 -0.32768000000000000000e5 +2174 2 16 30 -0.65536000000000000000e5 +2174 2 20 28 0.65536000000000000000e5 +2174 2 20 34 -0.13107200000000000000e6 +2174 3 22 35 -0.26214400000000000000e6 +2174 3 28 41 -0.26214400000000000000e6 +2174 4 6 34 -0.13107200000000000000e6 +2175 1 2 33 -0.65536000000000000000e5 +2175 1 3 34 0.13107200000000000000e6 +2175 1 9 40 0.32768000000000000000e5 +2175 1 10 41 -0.13107200000000000000e6 +2175 1 12 43 0.13107200000000000000e6 +2175 1 16 47 -0.13107200000000000000e6 +2175 1 26 41 -0.32768000000000000000e5 +2175 1 28 43 -0.65536000000000000000e5 +2175 1 32 47 0.65536000000000000000e5 +2175 2 7 21 -0.65536000000000000000e5 +2175 2 20 29 0.65536000000000000000e5 +2175 2 20 34 -0.65536000000000000000e5 +2175 3 2 31 -0.65536000000000000000e5 +2175 3 3 32 -0.65536000000000000000e5 +2175 3 8 37 -0.32768000000000000000e5 +2175 3 9 38 0.32768000000000000000e5 +2175 3 22 27 -0.32768000000000000000e5 +2175 3 22 35 -0.13107200000000000000e6 +2175 3 28 41 0.65536000000000000000e5 +2175 4 1 29 -0.32768000000000000000e5 +2175 4 2 30 0.32768000000000000000e5 +2175 4 6 34 -0.65536000000000000000e5 +2176 2 20 30 0.65536000000000000000e5 +2176 2 20 34 -0.65536000000000000000e5 +2176 4 6 34 -0.65536000000000000000e5 +2177 1 12 43 0.65536000000000000000e5 +2177 1 16 47 0.65536000000000000000e5 +2177 1 17 48 0.65536000000000000000e5 +2177 1 34 41 -0.13107200000000000000e6 +2177 2 20 31 0.65536000000000000000e5 +2177 3 22 35 -0.65536000000000000000e5 +2178 2 16 34 -0.65536000000000000000e5 +2178 2 20 32 0.65536000000000000000e5 +2179 1 1 48 -0.32768000000000000000e5 +2179 1 2 49 -0.32768000000000000000e5 +2179 1 12 43 0.26214400000000000000e6 +2179 1 23 38 -0.32768000000000000000e5 +2179 1 26 41 0.65536000000000000000e5 +2179 1 28 43 -0.13107200000000000000e6 +2179 1 32 47 -0.26214400000000000000e6 +2179 2 2 32 -0.32768000000000000000e5 +2179 2 16 30 -0.65536000000000000000e5 +2179 2 20 33 0.65536000000000000000e5 +2179 2 20 34 -0.13107200000000000000e6 +2179 3 22 35 -0.26214400000000000000e6 +2179 3 28 41 -0.26214400000000000000e6 +2179 4 6 34 -0.13107200000000000000e6 +2179 4 17 29 0.65536000000000000000e5 +2180 1 1 48 -0.32768000000000000000e5 +2180 1 2 49 -0.32768000000000000000e5 +2180 1 12 43 0.26214400000000000000e6 +2180 1 23 38 -0.32768000000000000000e5 +2180 1 26 41 0.65536000000000000000e5 +2180 1 28 43 -0.13107200000000000000e6 +2180 1 32 47 -0.26214400000000000000e6 +2180 2 2 32 -0.32768000000000000000e5 +2180 2 16 30 -0.65536000000000000000e5 +2180 2 20 34 -0.13107200000000000000e6 +2180 2 20 35 0.65536000000000000000e5 +2180 3 22 35 -0.26214400000000000000e6 +2180 3 28 41 -0.26214400000000000000e6 +2180 4 6 34 -0.13107200000000000000e6 +2180 4 17 29 0.65536000000000000000e5 +2180 4 20 32 0.65536000000000000000e5 +2181 2 12 26 -0.32768000000000000000e5 +2181 2 21 21 0.65536000000000000000e5 +2182 1 17 48 -0.13107200000000000000e6 +2182 1 28 43 0.65536000000000000000e5 +2182 1 32 47 0.65536000000000000000e5 +2182 1 33 48 0.65536000000000000000e5 +2182 2 21 22 0.65536000000000000000e5 +2182 3 28 41 0.65536000000000000000e5 +2182 3 29 42 0.65536000000000000000e5 +2182 4 3 31 -0.65536000000000000000e5 +2183 1 12 43 0.65536000000000000000e5 +2183 1 13 44 -0.13107200000000000000e6 +2183 1 16 47 0.65536000000000000000e5 +2183 1 17 48 0.65536000000000000000e5 +2183 2 21 23 0.65536000000000000000e5 +2183 3 12 41 0.65536000000000000000e5 +2183 3 13 42 0.65536000000000000000e5 +2184 1 4 35 -0.65536000000000000000e5 +2184 1 17 48 0.65536000000000000000e5 +2184 2 9 23 -0.65536000000000000000e5 +2184 2 21 24 0.65536000000000000000e5 +2184 3 5 34 -0.65536000000000000000e5 +2184 3 13 42 0.65536000000000000000e5 +2184 3 14 27 -0.65536000000000000000e5 +2184 3 16 29 0.13107200000000000000e6 +2185 1 3 18 -0.32768000000000000000e5 +2185 1 4 19 0.65536000000000000000e5 +2185 1 4 35 0.32768000000000000000e5 +2185 1 5 36 0.65536000000000000000e5 +2185 1 12 43 0.65536000000000000000e5 +2185 1 14 45 0.65536000000000000000e5 +2185 1 17 32 -0.13107200000000000000e6 +2185 1 17 48 -0.32768000000000000000e5 +2185 1 18 49 -0.32768000000000000000e5 +2185 2 9 23 0.32768000000000000000e5 +2185 2 14 28 -0.32768000000000000000e5 +2185 2 21 25 0.65536000000000000000e5 +2185 3 3 16 -0.32768000000000000000e5 +2185 3 4 17 -0.32768000000000000000e5 +2185 3 5 34 0.32768000000000000000e5 +2185 3 13 42 -0.32768000000000000000e5 +2185 3 14 27 0.65536000000000000000e5 +2185 3 14 43 -0.32768000000000000000e5 +2185 4 2 14 -0.32768000000000000000e5 +2185 4 11 23 0.65536000000000000000e5 +2186 2 16 30 -0.65536000000000000000e5 +2186 2 21 26 0.65536000000000000000e5 +2187 1 1 48 -0.32768000000000000000e5 +2187 1 2 49 -0.32768000000000000000e5 +2187 1 12 43 0.26214400000000000000e6 +2187 1 23 38 -0.32768000000000000000e5 +2187 1 26 41 0.65536000000000000000e5 +2187 1 28 43 -0.13107200000000000000e6 +2187 1 32 47 -0.26214400000000000000e6 +2187 2 2 32 -0.32768000000000000000e5 +2187 2 16 30 -0.65536000000000000000e5 +2187 2 20 34 -0.13107200000000000000e6 +2187 2 21 27 0.65536000000000000000e5 +2187 3 22 35 -0.26214400000000000000e6 +2187 3 28 41 -0.26214400000000000000e6 +2187 4 6 34 -0.13107200000000000000e6 +2188 2 4 34 -0.65536000000000000000e5 +2188 2 21 28 0.65536000000000000000e5 +2189 2 20 34 -0.65536000000000000000e5 +2189 2 21 29 0.65536000000000000000e5 +2189 4 6 34 -0.65536000000000000000e5 +2190 1 17 48 -0.13107200000000000000e6 +2190 1 28 43 0.65536000000000000000e5 +2190 1 32 47 0.65536000000000000000e5 +2190 1 33 48 0.65536000000000000000e5 +2190 2 21 30 0.65536000000000000000e5 +2190 3 28 41 0.65536000000000000000e5 +2190 3 29 42 0.65536000000000000000e5 +2191 1 4 35 -0.65536000000000000000e5 +2191 1 17 48 0.65536000000000000000e5 +2191 2 9 23 -0.65536000000000000000e5 +2191 2 21 31 0.65536000000000000000e5 +2191 3 5 34 -0.65536000000000000000e5 +2191 3 13 42 0.65536000000000000000e5 +2191 3 14 27 -0.65536000000000000000e5 +2191 3 16 29 0.13107200000000000000e6 +2191 4 14 26 0.65536000000000000000e5 +2192 1 1 48 -0.32768000000000000000e5 +2192 1 2 49 -0.32768000000000000000e5 +2192 1 12 43 0.26214400000000000000e6 +2192 1 23 38 -0.32768000000000000000e5 +2192 1 26 41 0.65536000000000000000e5 +2192 1 28 43 -0.13107200000000000000e6 +2192 1 32 47 -0.26214400000000000000e6 +2192 2 2 32 -0.32768000000000000000e5 +2192 2 16 30 -0.65536000000000000000e5 +2192 2 20 34 -0.13107200000000000000e6 +2192 2 21 32 0.65536000000000000000e5 +2192 3 22 35 -0.26214400000000000000e6 +2192 3 28 41 -0.26214400000000000000e6 +2192 4 6 34 -0.13107200000000000000e6 +2192 4 17 29 0.65536000000000000000e5 +2193 2 21 33 0.65536000000000000000e5 +2193 2 21 35 -0.65536000000000000000e5 +2193 4 7 35 -0.65536000000000000000e5 +2194 1 17 48 -0.13107200000000000000e6 +2194 1 28 43 0.65536000000000000000e5 +2194 1 32 47 0.65536000000000000000e5 +2194 1 33 48 0.65536000000000000000e5 +2194 2 21 34 0.65536000000000000000e5 +2194 3 28 41 0.65536000000000000000e5 +2194 3 29 42 0.65536000000000000000e5 +2194 4 23 27 0.65536000000000000000e5 +2195 1 10 41 -0.32768000000000000000e5 +2195 1 14 45 -0.13107200000000000000e6 +2195 1 17 48 0.65536000000000000000e5 +2195 1 18 49 0.65536000000000000000e5 +2195 1 26 33 0.32768000000000000000e5 +2195 1 28 43 0.32768000000000000000e5 +2195 1 32 47 0.32768000000000000000e5 +2195 1 33 48 0.32768000000000000000e5 +2195 2 14 28 0.65536000000000000000e5 +2195 2 22 22 0.65536000000000000000e5 +2195 3 13 42 0.13107200000000000000e6 +2195 3 14 43 0.65536000000000000000e5 +2195 3 28 41 0.32768000000000000000e5 +2195 3 29 42 0.32768000000000000000e5 +2195 4 3 31 -0.32768000000000000000e5 +2196 1 4 35 -0.65536000000000000000e5 +2196 1 17 48 0.65536000000000000000e5 +2196 2 9 23 -0.65536000000000000000e5 +2196 2 22 23 0.65536000000000000000e5 +2196 3 5 34 -0.65536000000000000000e5 +2196 3 13 42 0.65536000000000000000e5 +2196 3 14 27 -0.65536000000000000000e5 +2196 3 16 29 0.13107200000000000000e6 +2197 2 14 28 -0.65536000000000000000e5 +2197 2 22 24 0.65536000000000000000e5 +2198 1 4 35 0.32768000000000000000e5 +2198 1 11 18 0.65536000000000000000e5 +2198 1 12 43 0.32768000000000000000e5 +2198 1 13 20 -0.26214400000000000000e6 +2198 1 14 45 0.13107200000000000000e6 +2198 1 17 32 0.13107200000000000000e6 +2198 1 17 48 -0.32768000000000000000e5 +2198 1 18 49 -0.32768000000000000000e5 +2198 1 20 27 0.13107200000000000000e6 +2198 2 9 23 0.32768000000000000000e5 +2198 2 11 25 0.13107200000000000000e6 +2198 2 14 28 -0.32768000000000000000e5 +2198 2 22 25 0.65536000000000000000e5 +2198 3 5 34 0.32768000000000000000e5 +2198 3 6 19 -0.65536000000000000000e5 +2198 3 8 21 0.26214400000000000000e6 +2198 3 13 42 -0.32768000000000000000e5 +2198 3 14 27 0.32768000000000000000e5 +2198 3 14 43 -0.32768000000000000000e5 +2198 3 16 29 -0.65536000000000000000e5 +2198 3 17 30 -0.65536000000000000000e5 +2198 3 18 31 0.13107200000000000000e6 +2199 1 1 48 -0.32768000000000000000e5 +2199 1 2 49 -0.32768000000000000000e5 +2199 1 12 43 0.26214400000000000000e6 +2199 1 23 38 -0.32768000000000000000e5 +2199 1 26 41 0.65536000000000000000e5 +2199 1 28 43 -0.13107200000000000000e6 +2199 1 32 47 -0.26214400000000000000e6 +2199 2 2 32 -0.32768000000000000000e5 +2199 2 16 30 -0.65536000000000000000e5 +2199 2 20 34 -0.13107200000000000000e6 +2199 2 22 26 0.65536000000000000000e5 +2199 3 22 35 -0.26214400000000000000e6 +2199 3 28 41 -0.26214400000000000000e6 +2199 4 6 34 -0.13107200000000000000e6 +2200 2 4 34 -0.65536000000000000000e5 +2200 2 22 27 0.65536000000000000000e5 +2201 2 22 28 0.65536000000000000000e5 +2201 2 28 34 -0.65536000000000000000e5 +2201 4 18 30 -0.65536000000000000000e5 +2201 4 21 33 -0.65536000000000000000e5 +2202 1 17 48 -0.13107200000000000000e6 +2202 1 28 43 0.65536000000000000000e5 +2202 1 32 47 0.65536000000000000000e5 +2202 1 33 48 0.65536000000000000000e5 +2202 2 22 29 0.65536000000000000000e5 +2202 3 28 41 0.65536000000000000000e5 +2202 3 29 42 0.65536000000000000000e5 +2203 1 28 43 0.65536000000000000000e5 +2203 1 33 40 0.65536000000000000000e5 +2203 1 33 48 0.65536000000000000000e5 +2203 1 34 49 -0.13107200000000000000e6 +2203 2 22 30 0.65536000000000000000e5 +2203 3 18 47 -0.13107200000000000000e6 +2203 3 29 42 0.65536000000000000000e5 +2204 1 14 45 -0.26214400000000000000e6 +2204 1 17 48 0.13107200000000000000e6 +2204 1 18 49 0.13107200000000000000e6 +2204 1 34 49 0.13107200000000000000e6 +2204 2 14 28 0.65536000000000000000e5 +2204 2 22 31 0.65536000000000000000e5 +2204 3 14 43 0.65536000000000000000e5 +2204 3 15 44 -0.13107200000000000000e6 +2204 3 16 45 0.26214400000000000000e6 +2204 3 18 47 0.13107200000000000000e6 +2204 3 22 35 -0.65536000000000000000e5 +2204 4 14 26 -0.65536000000000000000e5 +2204 4 15 27 -0.13107200000000000000e6 +2205 2 21 35 -0.65536000000000000000e5 +2205 2 22 32 0.65536000000000000000e5 +2205 4 7 35 -0.65536000000000000000e5 +2206 2 22 33 0.65536000000000000000e5 +2206 2 28 34 -0.65536000000000000000e5 +2206 4 21 33 -0.65536000000000000000e5 +2207 1 6 53 -0.16384000000000000000e5 +2207 1 25 40 0.16384000000000000000e5 +2207 1 28 43 0.65536000000000000000e5 +2207 1 33 40 0.65536000000000000000e5 +2207 1 33 48 0.65536000000000000000e5 +2207 1 34 49 -0.13107200000000000000e6 +2207 2 4 34 -0.32768000000000000000e5 +2207 2 21 35 0.32768000000000000000e5 +2207 2 22 34 0.65536000000000000000e5 +2207 3 5 50 -0.32768000000000000000e5 +2207 3 14 51 -0.13107200000000000000e6 +2207 3 24 37 -0.16384000000000000000e5 +2207 3 27 40 -0.65536000000000000000e5 +2207 3 29 42 0.65536000000000000000e5 +2207 3 30 43 0.65536000000000000000e5 +2207 4 4 32 0.16384000000000000000e5 +2207 4 7 35 0.32768000000000000000e5 +2207 4 16 28 -0.16384000000000000000e5 +2207 4 19 31 0.65536000000000000000e5 +2208 2 22 35 0.65536000000000000000e5 +2208 2 28 34 -0.65536000000000000000e5 +2209 1 4 35 0.16384000000000000000e5 +2209 1 12 43 0.16384000000000000000e5 +2209 1 13 44 0.32768000000000000000e5 +2209 1 14 45 0.32768000000000000000e5 +2209 1 17 48 -0.16384000000000000000e5 +2209 1 18 49 -0.16384000000000000000e5 +2209 1 20 27 -0.65536000000000000000e5 +2209 1 27 34 0.32768000000000000000e5 +2209 2 9 23 0.16384000000000000000e5 +2209 2 14 28 -0.16384000000000000000e5 +2209 2 23 23 0.65536000000000000000e5 +2209 3 5 34 0.16384000000000000000e5 +2209 3 7 36 0.65536000000000000000e5 +2209 3 13 42 -0.16384000000000000000e5 +2209 3 14 27 0.16384000000000000000e5 +2209 3 14 43 -0.16384000000000000000e5 +2209 3 16 29 -0.32768000000000000000e5 +2210 1 3 18 -0.32768000000000000000e5 +2210 1 4 19 0.65536000000000000000e5 +2210 1 4 35 0.32768000000000000000e5 +2210 1 5 36 0.65536000000000000000e5 +2210 1 12 43 0.65536000000000000000e5 +2210 1 14 45 0.65536000000000000000e5 +2210 1 17 32 -0.13107200000000000000e6 +2210 1 17 48 -0.32768000000000000000e5 +2210 1 18 49 -0.32768000000000000000e5 +2210 2 9 23 0.32768000000000000000e5 +2210 2 14 28 -0.32768000000000000000e5 +2210 2 23 24 0.65536000000000000000e5 +2210 3 3 16 -0.32768000000000000000e5 +2210 3 4 17 -0.32768000000000000000e5 +2210 3 5 34 0.32768000000000000000e5 +2210 3 13 42 -0.32768000000000000000e5 +2210 3 14 27 0.65536000000000000000e5 +2210 3 14 43 -0.32768000000000000000e5 +2210 4 2 14 -0.32768000000000000000e5 +2210 4 11 23 0.65536000000000000000e5 +2211 2 15 29 -0.65536000000000000000e5 +2211 2 23 25 0.65536000000000000000e5 +2212 1 2 33 -0.65536000000000000000e5 +2212 1 3 34 0.13107200000000000000e6 +2212 1 9 40 0.32768000000000000000e5 +2212 1 10 41 -0.13107200000000000000e6 +2212 1 12 43 0.13107200000000000000e6 +2212 1 16 47 -0.13107200000000000000e6 +2212 1 26 41 -0.32768000000000000000e5 +2212 1 28 43 -0.65536000000000000000e5 +2212 1 32 47 0.65536000000000000000e5 +2212 2 7 21 -0.65536000000000000000e5 +2212 2 20 34 -0.65536000000000000000e5 +2212 2 23 26 0.65536000000000000000e5 +2212 3 2 31 -0.65536000000000000000e5 +2212 3 3 32 -0.65536000000000000000e5 +2212 3 8 37 -0.32768000000000000000e5 +2212 3 9 38 0.32768000000000000000e5 +2212 3 22 27 -0.32768000000000000000e5 +2212 3 22 35 -0.13107200000000000000e6 +2212 3 28 41 0.65536000000000000000e5 +2212 4 1 29 -0.32768000000000000000e5 +2212 4 2 30 0.32768000000000000000e5 +2212 4 6 34 -0.65536000000000000000e5 +2213 2 20 34 -0.65536000000000000000e5 +2213 2 23 27 0.65536000000000000000e5 +2213 4 6 34 -0.65536000000000000000e5 +2214 1 17 48 -0.13107200000000000000e6 +2214 1 28 43 0.65536000000000000000e5 +2214 1 32 47 0.65536000000000000000e5 +2214 1 33 48 0.65536000000000000000e5 +2214 2 23 28 0.65536000000000000000e5 +2214 3 28 41 0.65536000000000000000e5 +2214 3 29 42 0.65536000000000000000e5 +2215 1 12 43 0.65536000000000000000e5 +2215 1 16 47 0.65536000000000000000e5 +2215 1 17 48 0.65536000000000000000e5 +2215 1 34 41 -0.13107200000000000000e6 +2215 2 23 29 0.65536000000000000000e5 +2215 3 22 35 -0.65536000000000000000e5 +2216 1 4 35 -0.65536000000000000000e5 +2216 1 17 48 0.65536000000000000000e5 +2216 2 9 23 -0.65536000000000000000e5 +2216 2 23 30 0.65536000000000000000e5 +2216 3 5 34 -0.65536000000000000000e5 +2216 3 13 42 0.65536000000000000000e5 +2216 3 14 27 -0.65536000000000000000e5 +2216 3 16 29 0.13107200000000000000e6 +2216 4 14 26 0.65536000000000000000e5 +2217 1 4 35 0.32768000000000000000e5 +2217 1 12 43 0.32768000000000000000e5 +2217 1 14 45 0.13107200000000000000e6 +2217 1 17 48 -0.32768000000000000000e5 +2217 1 18 49 -0.32768000000000000000e5 +2217 1 19 50 -0.13107200000000000000e6 +2217 1 34 41 0.65536000000000000000e5 +2217 2 9 23 0.32768000000000000000e5 +2217 2 14 28 -0.32768000000000000000e5 +2217 2 23 31 0.65536000000000000000e5 +2217 3 5 34 0.32768000000000000000e5 +2217 3 13 42 -0.32768000000000000000e5 +2217 3 14 27 0.32768000000000000000e5 +2217 3 14 43 -0.32768000000000000000e5 +2217 3 15 44 0.65536000000000000000e5 +2217 3 16 29 -0.65536000000000000000e5 +2217 3 16 45 -0.13107200000000000000e6 +2217 4 15 27 0.65536000000000000000e5 +2218 2 20 34 -0.65536000000000000000e5 +2218 2 23 32 0.65536000000000000000e5 +2219 1 17 48 -0.13107200000000000000e6 +2219 1 28 43 0.65536000000000000000e5 +2219 1 32 47 0.65536000000000000000e5 +2219 1 33 48 0.65536000000000000000e5 +2219 2 23 33 0.65536000000000000000e5 +2219 3 28 41 0.65536000000000000000e5 +2219 3 29 42 0.65536000000000000000e5 +2219 4 23 27 0.65536000000000000000e5 +2220 1 4 35 -0.65536000000000000000e5 +2220 1 6 53 -0.81920000000000000000e4 +2220 1 17 48 0.65536000000000000000e5 +2220 1 25 40 0.81920000000000000000e4 +2220 2 4 34 -0.16384000000000000000e5 +2220 2 9 23 -0.65536000000000000000e5 +2220 2 21 35 0.16384000000000000000e5 +2220 2 23 34 0.65536000000000000000e5 +2220 3 5 34 -0.65536000000000000000e5 +2220 3 5 50 -0.16384000000000000000e5 +2220 3 7 52 -0.65536000000000000000e5 +2220 3 13 42 0.65536000000000000000e5 +2220 3 14 27 -0.65536000000000000000e5 +2220 3 16 29 0.13107200000000000000e6 +2220 3 18 47 -0.65536000000000000000e5 +2220 3 24 37 -0.81920000000000000000e4 +2220 3 27 40 -0.32768000000000000000e5 +2220 3 28 41 -0.32768000000000000000e5 +2220 3 29 42 -0.32768000000000000000e5 +2220 3 31 44 0.13107200000000000000e6 +2220 4 4 32 0.81920000000000000000e4 +2220 4 7 35 0.16384000000000000000e5 +2220 4 14 26 0.65536000000000000000e5 +2220 4 16 28 -0.81920000000000000000e4 +2220 4 23 27 -0.32768000000000000000e5 +2221 1 17 48 -0.13107200000000000000e6 +2221 1 28 43 0.65536000000000000000e5 +2221 1 33 48 0.65536000000000000000e5 +2221 1 37 52 0.65536000000000000000e5 +2221 2 23 35 0.65536000000000000000e5 +2221 3 10 55 0.65536000000000000000e5 +2221 3 23 52 -0.65536000000000000000e5 +2221 3 28 41 0.65536000000000000000e5 +2221 3 29 42 0.65536000000000000000e5 +2221 3 34 47 0.13107200000000000000e6 +2221 3 35 48 -0.13107200000000000000e6 +2221 3 40 45 0.65536000000000000000e5 +2221 4 22 34 0.65536000000000000000e5 +2221 4 23 27 0.65536000000000000000e5 +2222 1 4 35 0.16384000000000000000e5 +2222 1 11 18 0.32768000000000000000e5 +2222 1 12 43 0.16384000000000000000e5 +2222 1 13 20 -0.13107200000000000000e6 +2222 1 14 45 0.65536000000000000000e5 +2222 1 17 32 0.65536000000000000000e5 +2222 1 17 48 -0.16384000000000000000e5 +2222 1 18 49 -0.16384000000000000000e5 +2222 1 20 27 0.65536000000000000000e5 +2222 2 9 23 0.16384000000000000000e5 +2222 2 11 25 0.65536000000000000000e5 +2222 2 14 28 -0.16384000000000000000e5 +2222 2 24 24 0.65536000000000000000e5 +2222 3 5 34 0.16384000000000000000e5 +2222 3 6 19 -0.32768000000000000000e5 +2222 3 8 21 0.13107200000000000000e6 +2222 3 13 42 -0.16384000000000000000e5 +2222 3 14 27 0.16384000000000000000e5 +2222 3 14 43 -0.16384000000000000000e5 +2222 3 16 29 -0.32768000000000000000e5 +2222 3 17 30 -0.32768000000000000000e5 +2222 3 18 31 0.65536000000000000000e5 +2223 1 3 18 0.16384000000000000000e5 +2223 1 4 19 -0.32768000000000000000e5 +2223 1 5 36 -0.32768000000000000000e5 +2223 1 6 21 -0.65536000000000000000e5 +2223 1 12 43 -0.16384000000000000000e5 +2223 1 13 44 0.32768000000000000000e5 +2223 1 14 45 0.32768000000000000000e5 +2223 1 15 46 0.65536000000000000000e5 +2223 2 9 15 -0.65536000000000000000e5 +2223 2 24 25 0.65536000000000000000e5 +2223 3 3 16 0.16384000000000000000e5 +2223 3 4 17 0.16384000000000000000e5 +2223 3 7 20 0.65536000000000000000e5 +2223 3 8 21 -0.13107200000000000000e6 +2223 3 14 19 0.13107200000000000000e6 +2223 3 14 27 -0.16384000000000000000e5 +2223 3 16 29 -0.32768000000000000000e5 +2223 3 18 31 -0.65536000000000000000e5 +2223 3 19 32 0.13107200000000000000e6 +2223 4 2 14 0.16384000000000000000e5 +2223 4 10 14 0.65536000000000000000e5 +2223 4 11 23 -0.32768000000000000000e5 +2224 2 20 34 -0.65536000000000000000e5 +2224 2 24 26 0.65536000000000000000e5 +2224 4 6 34 -0.65536000000000000000e5 +2225 1 17 48 -0.13107200000000000000e6 +2225 1 28 43 0.65536000000000000000e5 +2225 1 32 47 0.65536000000000000000e5 +2225 1 33 48 0.65536000000000000000e5 +2225 2 24 27 0.65536000000000000000e5 +2225 3 28 41 0.65536000000000000000e5 +2225 3 29 42 0.65536000000000000000e5 +2226 1 28 43 0.65536000000000000000e5 +2226 1 33 40 0.65536000000000000000e5 +2226 1 33 48 0.65536000000000000000e5 +2226 1 34 49 -0.13107200000000000000e6 +2226 2 24 28 0.65536000000000000000e5 +2226 3 18 47 -0.13107200000000000000e6 +2226 3 29 42 0.65536000000000000000e5 +2227 1 4 35 -0.65536000000000000000e5 +2227 1 17 48 0.65536000000000000000e5 +2227 2 9 23 -0.65536000000000000000e5 +2227 2 24 29 0.65536000000000000000e5 +2227 3 5 34 -0.65536000000000000000e5 +2227 3 13 42 0.65536000000000000000e5 +2227 3 14 27 -0.65536000000000000000e5 +2227 3 16 29 0.13107200000000000000e6 +2227 4 14 26 0.65536000000000000000e5 +2228 1 14 45 -0.26214400000000000000e6 +2228 1 17 48 0.13107200000000000000e6 +2228 1 18 49 0.13107200000000000000e6 +2228 1 34 49 0.13107200000000000000e6 +2228 2 14 28 0.65536000000000000000e5 +2228 2 24 30 0.65536000000000000000e5 +2228 3 14 43 0.65536000000000000000e5 +2228 3 15 44 -0.13107200000000000000e6 +2228 3 16 45 0.26214400000000000000e6 +2228 3 18 47 0.13107200000000000000e6 +2228 3 22 35 -0.65536000000000000000e5 +2228 4 14 26 -0.65536000000000000000e5 +2228 4 15 27 -0.13107200000000000000e6 +2229 1 4 35 0.32768000000000000000e5 +2229 1 11 18 0.65536000000000000000e5 +2229 1 12 43 0.32768000000000000000e5 +2229 1 13 20 -0.26214400000000000000e6 +2229 1 14 45 0.13107200000000000000e6 +2229 1 17 32 0.13107200000000000000e6 +2229 1 17 48 -0.32768000000000000000e5 +2229 1 18 49 -0.32768000000000000000e5 +2229 1 20 27 0.13107200000000000000e6 +2229 2 9 23 0.32768000000000000000e5 +2229 2 11 25 0.13107200000000000000e6 +2229 2 14 28 -0.32768000000000000000e5 +2229 2 24 31 0.65536000000000000000e5 +2229 3 5 34 0.32768000000000000000e5 +2229 3 6 19 -0.65536000000000000000e5 +2229 3 8 21 0.26214400000000000000e6 +2229 3 13 42 -0.32768000000000000000e5 +2229 3 14 27 0.32768000000000000000e5 +2229 3 14 43 -0.32768000000000000000e5 +2229 3 16 29 -0.65536000000000000000e5 +2229 3 17 30 -0.65536000000000000000e5 +2229 3 18 31 0.13107200000000000000e6 +2229 4 15 27 0.65536000000000000000e5 +2230 1 17 48 -0.13107200000000000000e6 +2230 1 28 43 0.65536000000000000000e5 +2230 1 32 47 0.65536000000000000000e5 +2230 1 33 48 0.65536000000000000000e5 +2230 2 24 32 0.65536000000000000000e5 +2230 3 28 41 0.65536000000000000000e5 +2230 3 29 42 0.65536000000000000000e5 +2230 4 23 27 0.65536000000000000000e5 +2231 1 6 53 -0.16384000000000000000e5 +2231 1 25 40 0.16384000000000000000e5 +2231 1 28 43 0.65536000000000000000e5 +2231 1 33 40 0.65536000000000000000e5 +2231 1 33 48 0.65536000000000000000e5 +2231 1 34 49 -0.13107200000000000000e6 +2231 2 4 34 -0.32768000000000000000e5 +2231 2 21 35 0.32768000000000000000e5 +2231 2 24 33 0.65536000000000000000e5 +2231 3 5 50 -0.32768000000000000000e5 +2231 3 14 51 -0.13107200000000000000e6 +2231 3 24 37 -0.16384000000000000000e5 +2231 3 27 40 -0.65536000000000000000e5 +2231 3 29 42 0.65536000000000000000e5 +2231 3 30 43 0.65536000000000000000e5 +2231 4 4 32 0.16384000000000000000e5 +2231 4 7 35 0.32768000000000000000e5 +2231 4 16 28 -0.16384000000000000000e5 +2231 4 19 31 0.65536000000000000000e5 +2232 1 6 53 -0.81920000000000000000e4 +2232 1 14 45 -0.26214400000000000000e6 +2232 1 17 48 0.13107200000000000000e6 +2232 1 18 49 0.13107200000000000000e6 +2232 1 25 40 0.81920000000000000000e4 +2232 1 34 49 0.13107200000000000000e6 +2232 2 4 34 -0.16384000000000000000e5 +2232 2 14 28 0.65536000000000000000e5 +2232 2 21 35 0.16384000000000000000e5 +2232 2 24 34 0.65536000000000000000e5 +2232 3 5 50 -0.16384000000000000000e5 +2232 3 14 43 0.65536000000000000000e5 +2232 3 14 51 -0.65536000000000000000e5 +2232 3 15 44 -0.13107200000000000000e6 +2232 3 16 45 0.26214400000000000000e6 +2232 3 18 47 0.65536000000000000000e5 +2232 3 19 48 0.13107200000000000000e6 +2232 3 22 35 -0.65536000000000000000e5 +2232 3 24 37 -0.81920000000000000000e4 +2232 3 27 40 -0.32768000000000000000e5 +2232 3 28 41 -0.32768000000000000000e5 +2232 3 29 42 -0.32768000000000000000e5 +2232 4 4 32 0.81920000000000000000e4 +2232 4 7 35 0.16384000000000000000e5 +2232 4 14 26 -0.65536000000000000000e5 +2232 4 15 27 -0.13107200000000000000e6 +2232 4 16 28 -0.81920000000000000000e4 +2232 4 23 27 -0.32768000000000000000e5 +2233 1 6 53 -0.16384000000000000000e5 +2233 1 25 40 0.16384000000000000000e5 +2233 1 28 43 0.65536000000000000000e5 +2233 1 33 40 0.65536000000000000000e5 +2233 1 33 48 0.65536000000000000000e5 +2233 1 44 51 -0.13107200000000000000e6 +2233 2 4 34 -0.32768000000000000000e5 +2233 2 21 35 0.32768000000000000000e5 +2233 2 24 35 0.65536000000000000000e5 +2233 3 5 50 -0.32768000000000000000e5 +2233 3 14 51 -0.13107200000000000000e6 +2233 3 23 52 -0.65536000000000000000e5 +2233 3 24 37 -0.16384000000000000000e5 +2233 3 27 40 -0.65536000000000000000e5 +2233 3 29 42 0.65536000000000000000e5 +2233 3 30 43 0.65536000000000000000e5 +2233 3 35 48 -0.13107200000000000000e6 +2233 3 40 45 0.65536000000000000000e5 +2233 4 4 32 0.16384000000000000000e5 +2233 4 7 35 0.32768000000000000000e5 +2233 4 16 28 -0.16384000000000000000e5 +2233 4 19 31 0.65536000000000000000e5 +2233 4 22 34 0.65536000000000000000e5 +2234 1 3 18 0.40960000000000000000e4 +2234 1 4 19 -0.81920000000000000000e4 +2234 1 5 36 -0.81920000000000000000e4 +2234 1 6 21 0.16384000000000000000e5 +2234 1 12 43 -0.40960000000000000000e4 +2234 1 13 20 0.65536000000000000000e5 +2234 1 13 44 0.81920000000000000000e4 +2234 1 14 45 0.81920000000000000000e4 +2234 1 20 27 -0.16384000000000000000e5 +2234 1 21 44 -0.65536000000000000000e5 +2234 1 33 36 0.32768000000000000000e5 +2234 2 9 15 0.16384000000000000000e5 +2234 2 11 25 -0.32768000000000000000e5 +2234 2 15 29 0.16384000000000000000e5 +2234 2 25 25 0.65536000000000000000e5 +2234 3 3 16 0.40960000000000000000e4 +2234 3 4 17 0.40960000000000000000e4 +2234 3 7 20 -0.16384000000000000000e5 +2234 3 7 36 -0.16384000000000000000e5 +2234 3 8 21 -0.32768000000000000000e5 +2234 3 14 19 -0.32768000000000000000e5 +2234 3 14 27 -0.40960000000000000000e4 +2234 3 16 29 -0.81920000000000000000e4 +2234 3 18 31 -0.16384000000000000000e5 +2234 3 19 32 -0.32768000000000000000e5 +2234 4 2 14 0.40960000000000000000e4 +2234 4 10 14 -0.16384000000000000000e5 +2234 4 11 23 -0.81920000000000000000e4 +2235 1 12 43 0.65536000000000000000e5 +2235 1 16 47 0.65536000000000000000e5 +2235 1 17 48 0.65536000000000000000e5 +2235 1 34 41 -0.13107200000000000000e6 +2235 2 25 26 0.65536000000000000000e5 +2235 3 22 35 -0.65536000000000000000e5 +2236 1 4 35 -0.65536000000000000000e5 +2236 1 17 48 0.65536000000000000000e5 +2236 2 9 23 -0.65536000000000000000e5 +2236 2 25 27 0.65536000000000000000e5 +2236 3 5 34 -0.65536000000000000000e5 +2236 3 13 42 0.65536000000000000000e5 +2236 3 14 27 -0.65536000000000000000e5 +2236 3 16 29 0.13107200000000000000e6 +2236 4 14 26 0.65536000000000000000e5 +2237 1 14 45 -0.26214400000000000000e6 +2237 1 17 48 0.13107200000000000000e6 +2237 1 18 49 0.13107200000000000000e6 +2237 1 34 49 0.13107200000000000000e6 +2237 2 14 28 0.65536000000000000000e5 +2237 2 25 28 0.65536000000000000000e5 +2237 3 14 43 0.65536000000000000000e5 +2237 3 15 44 -0.13107200000000000000e6 +2237 3 16 45 0.26214400000000000000e6 +2237 3 18 47 0.13107200000000000000e6 +2237 3 22 35 -0.65536000000000000000e5 +2237 4 14 26 -0.65536000000000000000e5 +2237 4 15 27 -0.13107200000000000000e6 +2238 1 4 35 0.32768000000000000000e5 +2238 1 12 43 0.32768000000000000000e5 +2238 1 14 45 0.13107200000000000000e6 +2238 1 17 48 -0.32768000000000000000e5 +2238 1 18 49 -0.32768000000000000000e5 +2238 1 19 50 -0.13107200000000000000e6 +2238 1 34 41 0.65536000000000000000e5 +2238 2 9 23 0.32768000000000000000e5 +2238 2 14 28 -0.32768000000000000000e5 +2238 2 25 29 0.65536000000000000000e5 +2238 3 5 34 0.32768000000000000000e5 +2238 3 13 42 -0.32768000000000000000e5 +2238 3 14 27 0.32768000000000000000e5 +2238 3 14 43 -0.32768000000000000000e5 +2238 3 15 44 0.65536000000000000000e5 +2238 3 16 29 -0.65536000000000000000e5 +2238 3 16 45 -0.13107200000000000000e6 +2238 4 15 27 0.65536000000000000000e5 +2239 1 4 35 0.32768000000000000000e5 +2239 1 11 18 0.65536000000000000000e5 +2239 1 12 43 0.32768000000000000000e5 +2239 1 13 20 -0.26214400000000000000e6 +2239 1 14 45 0.13107200000000000000e6 +2239 1 17 32 0.13107200000000000000e6 +2239 1 17 48 -0.32768000000000000000e5 +2239 1 18 49 -0.32768000000000000000e5 +2239 1 20 27 0.13107200000000000000e6 +2239 2 9 23 0.32768000000000000000e5 +2239 2 11 25 0.13107200000000000000e6 +2239 2 14 28 -0.32768000000000000000e5 +2239 2 25 30 0.65536000000000000000e5 +2239 3 5 34 0.32768000000000000000e5 +2239 3 6 19 -0.65536000000000000000e5 +2239 3 8 21 0.26214400000000000000e6 +2239 3 13 42 -0.32768000000000000000e5 +2239 3 14 27 0.32768000000000000000e5 +2239 3 14 43 -0.32768000000000000000e5 +2239 3 16 29 -0.65536000000000000000e5 +2239 3 17 30 -0.65536000000000000000e5 +2239 3 18 31 0.13107200000000000000e6 +2239 4 15 27 0.65536000000000000000e5 +2240 1 4 35 -0.65536000000000000000e5 +2240 1 6 53 -0.81920000000000000000e4 +2240 1 17 48 0.65536000000000000000e5 +2240 1 25 40 0.81920000000000000000e4 +2240 2 4 34 -0.16384000000000000000e5 +2240 2 9 23 -0.65536000000000000000e5 +2240 2 21 35 0.16384000000000000000e5 +2240 2 25 32 0.65536000000000000000e5 +2240 3 5 34 -0.65536000000000000000e5 +2240 3 5 50 -0.16384000000000000000e5 +2240 3 7 52 -0.65536000000000000000e5 +2240 3 13 42 0.65536000000000000000e5 +2240 3 14 27 -0.65536000000000000000e5 +2240 3 16 29 0.13107200000000000000e6 +2240 3 18 47 -0.65536000000000000000e5 +2240 3 24 37 -0.81920000000000000000e4 +2240 3 27 40 -0.32768000000000000000e5 +2240 3 28 41 -0.32768000000000000000e5 +2240 3 29 42 -0.32768000000000000000e5 +2240 3 31 44 0.13107200000000000000e6 +2240 4 4 32 0.81920000000000000000e4 +2240 4 7 35 0.16384000000000000000e5 +2240 4 14 26 0.65536000000000000000e5 +2240 4 16 28 -0.81920000000000000000e4 +2240 4 23 27 -0.32768000000000000000e5 +2241 1 6 53 -0.81920000000000000000e4 +2241 1 14 45 -0.26214400000000000000e6 +2241 1 17 48 0.13107200000000000000e6 +2241 1 18 49 0.13107200000000000000e6 +2241 1 25 40 0.81920000000000000000e4 +2241 1 34 49 0.13107200000000000000e6 +2241 2 4 34 -0.16384000000000000000e5 +2241 2 14 28 0.65536000000000000000e5 +2241 2 21 35 0.16384000000000000000e5 +2241 2 25 33 0.65536000000000000000e5 +2241 3 5 50 -0.16384000000000000000e5 +2241 3 14 43 0.65536000000000000000e5 +2241 3 14 51 -0.65536000000000000000e5 +2241 3 15 44 -0.13107200000000000000e6 +2241 3 16 45 0.26214400000000000000e6 +2241 3 18 47 0.65536000000000000000e5 +2241 3 19 48 0.13107200000000000000e6 +2241 3 22 35 -0.65536000000000000000e5 +2241 3 24 37 -0.81920000000000000000e4 +2241 3 27 40 -0.32768000000000000000e5 +2241 3 28 41 -0.32768000000000000000e5 +2241 3 29 42 -0.32768000000000000000e5 +2241 4 4 32 0.81920000000000000000e4 +2241 4 7 35 0.16384000000000000000e5 +2241 4 14 26 -0.65536000000000000000e5 +2241 4 15 27 -0.13107200000000000000e6 +2241 4 16 28 -0.81920000000000000000e4 +2241 4 23 27 -0.32768000000000000000e5 +2242 1 4 35 0.32768000000000000000e5 +2242 1 11 18 0.65536000000000000000e5 +2242 1 12 43 0.32768000000000000000e5 +2242 1 13 20 -0.26214400000000000000e6 +2242 1 14 45 0.13107200000000000000e6 +2242 1 17 32 0.13107200000000000000e6 +2242 1 17 48 -0.32768000000000000000e5 +2242 1 18 49 -0.32768000000000000000e5 +2242 1 20 27 0.13107200000000000000e6 +2242 2 9 23 0.32768000000000000000e5 +2242 2 11 25 0.13107200000000000000e6 +2242 2 14 28 -0.32768000000000000000e5 +2242 2 25 34 0.65536000000000000000e5 +2242 3 5 34 0.32768000000000000000e5 +2242 3 6 19 -0.65536000000000000000e5 +2242 3 8 21 0.26214400000000000000e6 +2242 3 13 42 -0.32768000000000000000e5 +2242 3 14 27 0.32768000000000000000e5 +2242 3 14 43 -0.32768000000000000000e5 +2242 3 16 29 -0.65536000000000000000e5 +2242 3 17 30 -0.65536000000000000000e5 +2242 3 18 31 0.13107200000000000000e6 +2242 3 19 48 -0.65536000000000000000e5 +2242 3 31 44 -0.65536000000000000000e5 +2242 3 32 45 -0.65536000000000000000e5 +2242 3 36 41 0.13107200000000000000e6 +2242 4 15 27 0.65536000000000000000e5 +2243 1 6 53 -0.81920000000000000000e4 +2243 1 14 45 -0.26214400000000000000e6 +2243 1 17 48 0.13107200000000000000e6 +2243 1 18 49 0.13107200000000000000e6 +2243 1 25 40 0.81920000000000000000e4 +2243 1 34 49 0.65536000000000000000e5 +2243 1 44 51 0.65536000000000000000e5 +2243 2 4 34 -0.16384000000000000000e5 +2243 2 14 28 0.65536000000000000000e5 +2243 2 21 35 0.16384000000000000000e5 +2243 2 25 35 0.65536000000000000000e5 +2243 3 5 50 -0.16384000000000000000e5 +2243 3 14 43 0.65536000000000000000e5 +2243 3 14 51 -0.65536000000000000000e5 +2243 3 15 44 -0.13107200000000000000e6 +2243 3 16 45 0.26214400000000000000e6 +2243 3 18 47 0.65536000000000000000e5 +2243 3 19 48 0.13107200000000000000e6 +2243 3 22 35 -0.65536000000000000000e5 +2243 3 24 37 -0.81920000000000000000e4 +2243 3 27 40 -0.32768000000000000000e5 +2243 3 28 41 -0.32768000000000000000e5 +2243 3 29 42 -0.32768000000000000000e5 +2243 3 34 47 -0.65536000000000000000e5 +2243 3 35 48 -0.65536000000000000000e5 +2243 3 41 46 0.13107200000000000000e6 +2243 4 4 32 0.81920000000000000000e4 +2243 4 7 35 0.16384000000000000000e5 +2243 4 14 26 -0.65536000000000000000e5 +2243 4 15 27 -0.13107200000000000000e6 +2243 4 16 28 -0.81920000000000000000e4 +2243 4 23 27 -0.32768000000000000000e5 +2244 2 1 35 -0.32768000000000000000e5 +2244 2 26 26 0.65536000000000000000e5 +2245 1 2 49 0.65536000000000000000e5 +2245 1 6 53 -0.13107200000000000000e6 +2245 1 8 39 -0.13107200000000000000e6 +2245 1 9 40 -0.13107200000000000000e6 +2245 1 10 41 0.26214400000000000000e6 +2245 1 23 38 0.65536000000000000000e5 +2245 1 24 39 0.65536000000000000000e5 +2245 1 25 40 0.13107200000000000000e6 +2245 1 26 41 0.13107200000000000000e6 +2245 1 32 47 -0.26214400000000000000e6 +2245 2 26 27 0.65536000000000000000e5 +2245 3 2 47 -0.65536000000000000000e5 +2245 3 9 38 -0.13107200000000000000e6 +2245 3 24 37 -0.13107200000000000000e6 +2245 3 25 38 0.65536000000000000000e5 +2245 3 27 40 -0.39321600000000000000e6 +2245 4 2 30 -0.13107200000000000000e6 +2245 4 4 32 0.13107200000000000000e6 +2245 4 16 28 -0.65536000000000000000e5 +2245 4 17 29 -0.13107200000000000000e6 +2246 2 3 33 -0.65536000000000000000e5 +2246 2 26 28 0.65536000000000000000e5 +2246 4 16 28 0.65536000000000000000e5 +2247 2 16 34 -0.65536000000000000000e5 +2247 2 26 29 0.65536000000000000000e5 +2248 1 1 48 -0.32768000000000000000e5 +2248 1 2 49 -0.32768000000000000000e5 +2248 1 12 43 0.26214400000000000000e6 +2248 1 23 38 -0.32768000000000000000e5 +2248 1 26 41 0.65536000000000000000e5 +2248 1 28 43 -0.13107200000000000000e6 +2248 1 32 47 -0.26214400000000000000e6 +2248 2 2 32 -0.32768000000000000000e5 +2248 2 16 30 -0.65536000000000000000e5 +2248 2 20 34 -0.13107200000000000000e6 +2248 2 26 30 0.65536000000000000000e5 +2248 3 22 35 -0.26214400000000000000e6 +2248 3 28 41 -0.26214400000000000000e6 +2248 4 6 34 -0.13107200000000000000e6 +2248 4 17 29 0.65536000000000000000e5 +2249 2 20 34 -0.65536000000000000000e5 +2249 2 26 31 0.65536000000000000000e5 +2250 1 1 48 0.65536000000000000000e5 +2250 1 2 49 0.65536000000000000000e5 +2250 1 6 53 0.13107200000000000000e6 +2250 1 8 39 0.26214400000000000000e6 +2250 1 9 40 0.26214400000000000000e6 +2250 1 10 41 -0.52428800000000000000e6 +2250 1 12 43 -0.52428800000000000000e6 +2250 1 22 53 -0.65536000000000000000e5 +2250 1 23 38 0.65536000000000000000e5 +2250 1 24 55 -0.13107200000000000000e6 +2250 1 25 40 -0.13107200000000000000e6 +2250 1 26 41 -0.13107200000000000000e6 +2250 1 28 43 0.26214400000000000000e6 +2250 1 32 47 0.52428800000000000000e6 +2250 1 37 52 0.26214400000000000000e6 +2250 1 40 47 0.65536000000000000000e5 +2250 2 2 32 0.65536000000000000000e5 +2250 2 16 30 0.13107200000000000000e6 +2250 2 20 34 0.26214400000000000000e6 +2250 2 26 32 -0.65536000000000000000e5 +2250 2 26 33 0.65536000000000000000e5 +2250 3 9 38 0.26214400000000000000e6 +2250 3 22 35 0.52428800000000000000e6 +2250 3 22 51 0.26214400000000000000e6 +2250 3 24 37 0.13107200000000000000e6 +2250 3 27 40 0.26214400000000000000e6 +2250 3 28 41 0.52428800000000000000e6 +2250 4 2 30 0.26214400000000000000e6 +2250 4 4 32 -0.13107200000000000000e6 +2250 4 6 34 0.26214400000000000000e6 +2250 4 16 28 0.13107200000000000000e6 +2250 4 17 29 0.13107200000000000000e6 +2250 4 20 32 0.13107200000000000000e6 +2251 1 1 48 -0.32768000000000000000e5 +2251 1 2 49 -0.32768000000000000000e5 +2251 1 12 43 0.26214400000000000000e6 +2251 1 23 38 -0.32768000000000000000e5 +2251 1 26 41 0.65536000000000000000e5 +2251 1 28 43 -0.13107200000000000000e6 +2251 1 32 47 -0.26214400000000000000e6 +2251 2 2 32 -0.32768000000000000000e5 +2251 2 16 30 -0.65536000000000000000e5 +2251 2 20 34 -0.13107200000000000000e6 +2251 2 26 34 0.65536000000000000000e5 +2251 3 22 35 -0.26214400000000000000e6 +2251 3 28 41 -0.26214400000000000000e6 +2251 4 6 34 -0.13107200000000000000e6 +2251 4 17 29 0.65536000000000000000e5 +2251 4 20 32 0.65536000000000000000e5 +2252 2 26 35 0.65536000000000000000e5 +2252 2 32 32 -0.13107200000000000000e6 +2253 2 3 33 -0.32768000000000000000e5 +2253 2 27 27 0.65536000000000000000e5 +2253 4 16 28 0.32768000000000000000e5 +2254 1 1 48 -0.65536000000000000000e5 +2254 1 2 49 -0.13107200000000000000e6 +2254 1 8 39 -0.13107200000000000000e6 +2254 1 9 40 -0.13107200000000000000e6 +2254 1 10 41 0.26214400000000000000e6 +2254 1 12 43 0.52428800000000000000e6 +2254 1 23 38 -0.65536000000000000000e5 +2254 1 25 40 0.65536000000000000000e5 +2254 1 28 43 -0.26214400000000000000e6 +2254 1 32 47 -0.52428800000000000000e6 +2254 2 2 32 -0.65536000000000000000e5 +2254 2 3 33 -0.65536000000000000000e5 +2254 2 16 30 -0.13107200000000000000e6 +2254 2 20 34 -0.26214400000000000000e6 +2254 2 27 28 0.65536000000000000000e5 +2254 3 9 38 -0.13107200000000000000e6 +2254 3 22 35 -0.52428800000000000000e6 +2254 3 28 41 -0.52428800000000000000e6 +2254 4 2 30 -0.13107200000000000000e6 +2254 4 4 32 0.65536000000000000000e5 +2254 4 6 34 -0.26214400000000000000e6 +2255 1 1 48 -0.32768000000000000000e5 +2255 1 2 49 -0.32768000000000000000e5 +2255 1 12 43 0.26214400000000000000e6 +2255 1 23 38 -0.32768000000000000000e5 +2255 1 26 41 0.65536000000000000000e5 +2255 1 28 43 -0.13107200000000000000e6 +2255 1 32 47 -0.26214400000000000000e6 +2255 2 2 32 -0.32768000000000000000e5 +2255 2 16 30 -0.65536000000000000000e5 +2255 2 20 34 -0.13107200000000000000e6 +2255 2 27 29 0.65536000000000000000e5 +2255 3 22 35 -0.26214400000000000000e6 +2255 3 28 41 -0.26214400000000000000e6 +2255 4 6 34 -0.13107200000000000000e6 +2255 4 17 29 0.65536000000000000000e5 +2256 2 21 35 -0.65536000000000000000e5 +2256 2 27 30 0.65536000000000000000e5 +2256 4 7 35 -0.65536000000000000000e5 +2257 1 17 48 -0.13107200000000000000e6 +2257 1 28 43 0.65536000000000000000e5 +2257 1 32 47 0.65536000000000000000e5 +2257 1 33 48 0.65536000000000000000e5 +2257 2 27 31 0.65536000000000000000e5 +2257 3 28 41 0.65536000000000000000e5 +2257 3 29 42 0.65536000000000000000e5 +2257 4 23 27 0.65536000000000000000e5 +2258 1 1 48 0.65536000000000000000e5 +2258 1 2 49 0.65536000000000000000e5 +2258 1 6 53 0.13107200000000000000e6 +2258 1 8 39 0.26214400000000000000e6 +2258 1 9 40 0.26214400000000000000e6 +2258 1 10 41 -0.52428800000000000000e6 +2258 1 12 43 -0.52428800000000000000e6 +2258 1 22 53 -0.65536000000000000000e5 +2258 1 23 38 0.65536000000000000000e5 +2258 1 24 55 -0.13107200000000000000e6 +2258 1 25 40 -0.13107200000000000000e6 +2258 1 26 41 -0.13107200000000000000e6 +2258 1 28 43 0.26214400000000000000e6 +2258 1 32 47 0.52428800000000000000e6 +2258 1 37 52 0.26214400000000000000e6 +2258 1 40 47 0.65536000000000000000e5 +2258 2 2 32 0.65536000000000000000e5 +2258 2 16 30 0.13107200000000000000e6 +2258 2 20 34 0.26214400000000000000e6 +2258 2 26 32 -0.65536000000000000000e5 +2258 2 27 32 0.65536000000000000000e5 +2258 3 9 38 0.26214400000000000000e6 +2258 3 22 35 0.52428800000000000000e6 +2258 3 22 51 0.26214400000000000000e6 +2258 3 24 37 0.13107200000000000000e6 +2258 3 27 40 0.26214400000000000000e6 +2258 3 28 41 0.52428800000000000000e6 +2258 4 2 30 0.26214400000000000000e6 +2258 4 4 32 -0.13107200000000000000e6 +2258 4 6 34 0.26214400000000000000e6 +2258 4 16 28 0.13107200000000000000e6 +2258 4 17 29 0.13107200000000000000e6 +2258 4 20 32 0.13107200000000000000e6 +2259 1 23 54 0.65536000000000000000e5 +2259 1 24 55 -0.13107200000000000000e6 +2259 1 25 56 0.65536000000000000000e5 +2259 1 40 47 0.65536000000000000000e5 +2259 2 27 33 0.65536000000000000000e5 +2259 3 24 53 -0.65536000000000000000e5 +2259 3 25 54 -0.65536000000000000000e5 +2259 3 38 51 0.13107200000000000000e6 +2259 4 28 32 -0.65536000000000000000e5 +2260 2 21 35 -0.65536000000000000000e5 +2260 2 27 34 0.65536000000000000000e5 +2261 1 25 56 0.65536000000000000000e5 +2261 1 38 53 0.65536000000000000000e5 +2261 1 40 47 0.65536000000000000000e5 +2261 1 41 56 -0.13107200000000000000e6 +2261 2 27 35 0.65536000000000000000e5 +2261 3 24 53 -0.65536000000000000000e5 +2261 3 27 56 -0.13107200000000000000e6 +2262 2 5 35 -0.32768000000000000000e5 +2262 2 28 28 0.65536000000000000000e5 +2263 2 21 35 -0.65536000000000000000e5 +2263 2 28 29 0.65536000000000000000e5 +2263 4 7 35 -0.65536000000000000000e5 +2264 2 28 30 0.65536000000000000000e5 +2264 2 28 34 -0.65536000000000000000e5 +2264 4 21 33 -0.65536000000000000000e5 +2265 1 6 53 -0.16384000000000000000e5 +2265 1 25 40 0.16384000000000000000e5 +2265 1 28 43 0.65536000000000000000e5 +2265 1 33 40 0.65536000000000000000e5 +2265 1 33 48 0.65536000000000000000e5 +2265 1 34 49 -0.13107200000000000000e6 +2265 2 4 34 -0.32768000000000000000e5 +2265 2 21 35 0.32768000000000000000e5 +2265 2 28 31 0.65536000000000000000e5 +2265 3 5 50 -0.32768000000000000000e5 +2265 3 14 51 -0.13107200000000000000e6 +2265 3 24 37 -0.16384000000000000000e5 +2265 3 27 40 -0.65536000000000000000e5 +2265 3 29 42 0.65536000000000000000e5 +2265 3 30 43 0.65536000000000000000e5 +2265 4 4 32 0.16384000000000000000e5 +2265 4 7 35 0.32768000000000000000e5 +2265 4 16 28 -0.16384000000000000000e5 +2265 4 19 31 0.65536000000000000000e5 +2266 1 23 54 0.65536000000000000000e5 +2266 1 24 55 -0.13107200000000000000e6 +2266 1 25 56 0.65536000000000000000e5 +2266 1 40 47 0.65536000000000000000e5 +2266 2 28 32 0.65536000000000000000e5 +2266 3 24 53 -0.65536000000000000000e5 +2266 3 25 54 -0.65536000000000000000e5 +2266 3 38 51 0.13107200000000000000e6 +2266 4 28 32 -0.65536000000000000000e5 +2267 1 1 48 0.65536000000000000000e5 +2267 1 2 49 0.13107200000000000000e6 +2267 1 6 53 -0.65536000000000000000e5 +2267 1 8 39 0.13107200000000000000e6 +2267 1 9 40 0.13107200000000000000e6 +2267 1 10 41 -0.26214400000000000000e6 +2267 1 12 43 -0.52428800000000000000e6 +2267 1 23 38 0.65536000000000000000e5 +2267 1 24 39 0.65536000000000000000e5 +2267 1 24 55 0.13107200000000000000e6 +2267 1 25 56 0.65536000000000000000e5 +2267 1 26 41 -0.26214400000000000000e6 +2267 1 28 43 0.26214400000000000000e6 +2267 1 32 47 0.52428800000000000000e6 +2267 1 40 47 0.65536000000000000000e5 +2267 2 2 32 0.65536000000000000000e5 +2267 2 3 33 0.65536000000000000000e5 +2267 2 5 35 -0.65536000000000000000e5 +2267 2 16 30 0.13107200000000000000e6 +2267 2 20 34 0.26214400000000000000e6 +2267 2 28 33 0.65536000000000000000e5 +2267 3 9 38 0.13107200000000000000e6 +2267 3 22 35 0.52428800000000000000e6 +2267 3 22 51 -0.13107200000000000000e6 +2267 3 23 52 0.26214400000000000000e6 +2267 3 24 53 -0.65536000000000000000e5 +2267 3 25 38 0.65536000000000000000e5 +2267 3 25 54 -0.65536000000000000000e5 +2267 3 27 40 0.13107200000000000000e6 +2267 3 28 41 0.52428800000000000000e6 +2267 3 38 51 0.13107200000000000000e6 +2267 3 39 40 -0.65536000000000000000e5 +2267 4 2 30 0.13107200000000000000e6 +2267 4 6 34 0.26214400000000000000e6 +2267 4 7 35 -0.13107200000000000000e6 +2267 4 28 32 -0.65536000000000000000e5 +2268 1 1 48 0.65536000000000000000e5 +2268 1 2 49 0.13107200000000000000e6 +2268 1 6 53 -0.65536000000000000000e5 +2268 1 8 39 0.13107200000000000000e6 +2268 1 9 40 0.13107200000000000000e6 +2268 1 10 41 -0.26214400000000000000e6 +2268 1 12 43 -0.52428800000000000000e6 +2268 1 23 38 0.65536000000000000000e5 +2268 1 24 39 0.65536000000000000000e5 +2268 1 24 55 0.13107200000000000000e6 +2268 1 25 56 0.65536000000000000000e5 +2268 1 26 41 -0.26214400000000000000e6 +2268 1 28 43 0.26214400000000000000e6 +2268 1 32 47 0.52428800000000000000e6 +2268 1 40 47 0.65536000000000000000e5 +2268 2 2 32 0.65536000000000000000e5 +2268 2 3 33 0.65536000000000000000e5 +2268 2 5 35 -0.65536000000000000000e5 +2268 2 16 30 0.13107200000000000000e6 +2268 2 20 34 0.26214400000000000000e6 +2268 2 28 35 0.65536000000000000000e5 +2268 3 9 38 0.13107200000000000000e6 +2268 3 22 35 0.52428800000000000000e6 +2268 3 22 51 -0.13107200000000000000e6 +2268 3 23 52 0.26214400000000000000e6 +2268 3 24 53 -0.65536000000000000000e5 +2268 3 25 38 0.65536000000000000000e5 +2268 3 25 54 -0.65536000000000000000e5 +2268 3 27 40 0.13107200000000000000e6 +2268 3 28 41 0.52428800000000000000e6 +2268 3 38 51 0.13107200000000000000e6 +2268 3 39 40 -0.65536000000000000000e5 +2268 4 2 30 0.13107200000000000000e6 +2268 4 6 34 0.26214400000000000000e6 +2268 4 7 35 -0.13107200000000000000e6 +2269 2 20 34 -0.32768000000000000000e5 +2269 2 29 29 0.65536000000000000000e5 +2270 1 17 48 -0.13107200000000000000e6 +2270 1 28 43 0.65536000000000000000e5 +2270 1 32 47 0.65536000000000000000e5 +2270 1 33 48 0.65536000000000000000e5 +2270 2 29 30 0.65536000000000000000e5 +2270 3 28 41 0.65536000000000000000e5 +2270 3 29 42 0.65536000000000000000e5 +2270 4 23 27 0.65536000000000000000e5 +2271 1 4 35 -0.65536000000000000000e5 +2271 1 6 53 -0.81920000000000000000e4 +2271 1 17 48 0.65536000000000000000e5 +2271 1 25 40 0.81920000000000000000e4 +2271 2 4 34 -0.16384000000000000000e5 +2271 2 9 23 -0.65536000000000000000e5 +2271 2 21 35 0.16384000000000000000e5 +2271 2 29 31 0.65536000000000000000e5 +2271 3 5 34 -0.65536000000000000000e5 +2271 3 5 50 -0.16384000000000000000e5 +2271 3 7 52 -0.65536000000000000000e5 +2271 3 13 42 0.65536000000000000000e5 +2271 3 14 27 -0.65536000000000000000e5 +2271 3 16 29 0.13107200000000000000e6 +2271 3 18 47 -0.65536000000000000000e5 +2271 3 24 37 -0.81920000000000000000e4 +2271 3 27 40 -0.32768000000000000000e5 +2271 3 28 41 -0.32768000000000000000e5 +2271 3 29 42 -0.32768000000000000000e5 +2271 3 31 44 0.13107200000000000000e6 +2271 4 4 32 0.81920000000000000000e4 +2271 4 7 35 0.16384000000000000000e5 +2271 4 14 26 0.65536000000000000000e5 +2271 4 16 28 -0.81920000000000000000e4 +2271 4 23 27 -0.32768000000000000000e5 +2272 1 1 48 -0.32768000000000000000e5 +2272 1 2 49 -0.32768000000000000000e5 +2272 1 12 43 0.26214400000000000000e6 +2272 1 23 38 -0.32768000000000000000e5 +2272 1 26 41 0.65536000000000000000e5 +2272 1 28 43 -0.13107200000000000000e6 +2272 1 32 47 -0.26214400000000000000e6 +2272 2 2 32 -0.32768000000000000000e5 +2272 2 16 30 -0.65536000000000000000e5 +2272 2 20 34 -0.13107200000000000000e6 +2272 2 29 32 0.65536000000000000000e5 +2272 3 22 35 -0.26214400000000000000e6 +2272 3 28 41 -0.26214400000000000000e6 +2272 4 6 34 -0.13107200000000000000e6 +2272 4 17 29 0.65536000000000000000e5 +2272 4 20 32 0.65536000000000000000e5 +2273 2 21 35 -0.65536000000000000000e5 +2273 2 29 33 0.65536000000000000000e5 +2274 1 17 48 -0.13107200000000000000e6 +2274 1 28 43 0.65536000000000000000e5 +2274 1 33 48 0.65536000000000000000e5 +2274 1 37 52 0.65536000000000000000e5 +2274 2 29 34 0.65536000000000000000e5 +2274 3 10 55 0.65536000000000000000e5 +2274 3 23 52 -0.65536000000000000000e5 +2274 3 28 41 0.65536000000000000000e5 +2274 3 29 42 0.65536000000000000000e5 +2274 3 34 47 0.13107200000000000000e6 +2274 3 35 48 -0.13107200000000000000e6 +2274 3 40 45 0.65536000000000000000e5 +2274 4 22 34 0.65536000000000000000e5 +2274 4 23 27 0.65536000000000000000e5 +2275 1 1 48 0.32768000000000000000e5 +2275 1 2 49 0.32768000000000000000e5 +2275 1 8 39 0.65536000000000000000e5 +2275 1 9 40 0.65536000000000000000e5 +2275 1 10 41 -0.13107200000000000000e6 +2275 1 12 43 -0.26214400000000000000e6 +2275 1 23 38 0.32768000000000000000e5 +2275 1 24 55 -0.13107200000000000000e6 +2275 1 26 41 -0.65536000000000000000e5 +2275 1 28 43 0.26214400000000000000e6 +2275 1 32 47 0.26214400000000000000e6 +2275 1 33 48 -0.13107200000000000000e6 +2275 1 40 55 0.65536000000000000000e5 +2275 1 41 56 0.13107200000000000000e6 +2275 1 44 51 0.26214400000000000000e6 +2275 1 46 53 -0.26214400000000000000e6 +2275 2 2 32 0.32768000000000000000e5 +2275 2 4 34 -0.65536000000000000000e5 +2275 2 16 30 0.65536000000000000000e5 +2275 2 20 34 0.13107200000000000000e6 +2275 2 21 35 -0.65536000000000000000e5 +2275 2 28 34 0.65536000000000000000e5 +2275 2 29 35 0.65536000000000000000e5 +2275 3 5 50 -0.65536000000000000000e5 +2275 3 9 38 0.65536000000000000000e5 +2275 3 10 55 -0.13107200000000000000e6 +2275 3 22 35 0.26214400000000000000e6 +2275 3 22 51 0.65536000000000000000e5 +2275 3 23 52 -0.13107200000000000000e6 +2275 3 27 40 -0.65536000000000000000e5 +2275 3 27 56 0.13107200000000000000e6 +2275 3 28 41 0.26214400000000000000e6 +2275 3 35 48 0.26214400000000000000e6 +2275 3 37 50 -0.65536000000000000000e5 +2275 3 38 51 -0.13107200000000000000e6 +2275 3 39 52 -0.13107200000000000000e6 +2275 3 40 45 -0.13107200000000000000e6 +2275 4 2 30 0.65536000000000000000e5 +2275 4 6 34 0.13107200000000000000e6 +2275 4 7 35 0.65536000000000000000e5 +2275 4 22 34 -0.13107200000000000000e6 +2275 4 23 35 -0.13107200000000000000e6 +2275 4 29 33 -0.65536000000000000000e5 +2276 1 6 53 -0.81920000000000000000e4 +2276 1 25 40 0.81920000000000000000e4 +2276 1 28 43 0.32768000000000000000e5 +2276 1 33 40 0.32768000000000000000e5 +2276 1 33 48 0.32768000000000000000e5 +2276 1 34 49 -0.65536000000000000000e5 +2276 2 4 34 -0.16384000000000000000e5 +2276 2 21 35 0.16384000000000000000e5 +2276 2 30 30 0.65536000000000000000e5 +2276 3 5 50 -0.16384000000000000000e5 +2276 3 14 51 -0.65536000000000000000e5 +2276 3 24 37 -0.81920000000000000000e4 +2276 3 27 40 -0.32768000000000000000e5 +2276 3 29 42 0.32768000000000000000e5 +2276 3 30 43 0.32768000000000000000e5 +2276 4 4 32 0.81920000000000000000e4 +2276 4 7 35 0.16384000000000000000e5 +2276 4 16 28 -0.81920000000000000000e4 +2276 4 19 31 0.32768000000000000000e5 +2277 1 6 53 -0.81920000000000000000e4 +2277 1 14 45 -0.26214400000000000000e6 +2277 1 17 48 0.13107200000000000000e6 +2277 1 18 49 0.13107200000000000000e6 +2277 1 25 40 0.81920000000000000000e4 +2277 1 34 49 0.13107200000000000000e6 +2277 2 4 34 -0.16384000000000000000e5 +2277 2 14 28 0.65536000000000000000e5 +2277 2 21 35 0.16384000000000000000e5 +2277 2 30 31 0.65536000000000000000e5 +2277 3 5 50 -0.16384000000000000000e5 +2277 3 14 43 0.65536000000000000000e5 +2277 3 14 51 -0.65536000000000000000e5 +2277 3 15 44 -0.13107200000000000000e6 +2277 3 16 45 0.26214400000000000000e6 +2277 3 18 47 0.65536000000000000000e5 +2277 3 19 48 0.13107200000000000000e6 +2277 3 22 35 -0.65536000000000000000e5 +2277 3 24 37 -0.81920000000000000000e4 +2277 3 27 40 -0.32768000000000000000e5 +2277 3 28 41 -0.32768000000000000000e5 +2277 3 29 42 -0.32768000000000000000e5 +2277 4 4 32 0.81920000000000000000e4 +2277 4 7 35 0.16384000000000000000e5 +2277 4 14 26 -0.65536000000000000000e5 +2277 4 15 27 -0.13107200000000000000e6 +2277 4 16 28 -0.81920000000000000000e4 +2277 4 23 27 -0.32768000000000000000e5 +2278 2 21 35 -0.65536000000000000000e5 +2278 2 30 32 0.65536000000000000000e5 +2279 2 28 34 -0.65536000000000000000e5 +2279 2 30 33 0.65536000000000000000e5 +2280 1 6 53 -0.16384000000000000000e5 +2280 1 25 40 0.16384000000000000000e5 +2280 1 28 43 0.65536000000000000000e5 +2280 1 33 40 0.65536000000000000000e5 +2280 1 33 48 0.65536000000000000000e5 +2280 1 44 51 -0.13107200000000000000e6 +2280 2 4 34 -0.32768000000000000000e5 +2280 2 21 35 0.32768000000000000000e5 +2280 2 30 34 0.65536000000000000000e5 +2280 3 5 50 -0.32768000000000000000e5 +2280 3 14 51 -0.13107200000000000000e6 +2280 3 23 52 -0.65536000000000000000e5 +2280 3 24 37 -0.16384000000000000000e5 +2280 3 27 40 -0.65536000000000000000e5 +2280 3 29 42 0.65536000000000000000e5 +2280 3 30 43 0.65536000000000000000e5 +2280 3 35 48 -0.13107200000000000000e6 +2280 3 40 45 0.65536000000000000000e5 +2280 4 4 32 0.16384000000000000000e5 +2280 4 7 35 0.32768000000000000000e5 +2280 4 16 28 -0.16384000000000000000e5 +2280 4 19 31 0.65536000000000000000e5 +2280 4 22 34 0.65536000000000000000e5 +2281 2 28 34 -0.65536000000000000000e5 +2281 2 30 35 0.65536000000000000000e5 +2281 4 29 33 0.65536000000000000000e5 +2282 1 4 35 0.16384000000000000000e5 +2282 1 11 18 0.32768000000000000000e5 +2282 1 12 43 0.16384000000000000000e5 +2282 1 13 20 -0.13107200000000000000e6 +2282 1 14 45 0.65536000000000000000e5 +2282 1 17 32 0.65536000000000000000e5 +2282 1 17 48 -0.16384000000000000000e5 +2282 1 18 49 -0.16384000000000000000e5 +2282 1 20 27 0.65536000000000000000e5 +2282 2 9 23 0.16384000000000000000e5 +2282 2 11 25 0.65536000000000000000e5 +2282 2 14 28 -0.16384000000000000000e5 +2282 2 31 31 0.65536000000000000000e5 +2282 3 5 34 0.16384000000000000000e5 +2282 3 6 19 -0.32768000000000000000e5 +2282 3 8 21 0.13107200000000000000e6 +2282 3 13 42 -0.16384000000000000000e5 +2282 3 14 27 0.16384000000000000000e5 +2282 3 14 43 -0.16384000000000000000e5 +2282 3 16 29 -0.32768000000000000000e5 +2282 3 17 30 -0.32768000000000000000e5 +2282 3 18 31 0.65536000000000000000e5 +2282 3 19 48 -0.32768000000000000000e5 +2282 3 31 44 -0.32768000000000000000e5 +2282 3 32 45 -0.32768000000000000000e5 +2282 3 36 41 0.65536000000000000000e5 +2282 4 15 27 0.32768000000000000000e5 +2283 1 17 48 -0.13107200000000000000e6 +2283 1 28 43 0.65536000000000000000e5 +2283 1 33 48 0.65536000000000000000e5 +2283 1 37 52 0.65536000000000000000e5 +2283 2 31 32 0.65536000000000000000e5 +2283 3 10 55 0.65536000000000000000e5 +2283 3 23 52 -0.65536000000000000000e5 +2283 3 28 41 0.65536000000000000000e5 +2283 3 29 42 0.65536000000000000000e5 +2283 3 34 47 0.13107200000000000000e6 +2283 3 35 48 -0.13107200000000000000e6 +2283 3 40 45 0.65536000000000000000e5 +2283 4 22 34 0.65536000000000000000e5 +2283 4 23 27 0.65536000000000000000e5 +2284 1 6 53 -0.16384000000000000000e5 +2284 1 25 40 0.16384000000000000000e5 +2284 1 28 43 0.65536000000000000000e5 +2284 1 33 40 0.65536000000000000000e5 +2284 1 33 48 0.65536000000000000000e5 +2284 1 44 51 -0.13107200000000000000e6 +2284 2 4 34 -0.32768000000000000000e5 +2284 2 21 35 0.32768000000000000000e5 +2284 2 31 33 0.65536000000000000000e5 +2284 3 5 50 -0.32768000000000000000e5 +2284 3 14 51 -0.13107200000000000000e6 +2284 3 23 52 -0.65536000000000000000e5 +2284 3 24 37 -0.16384000000000000000e5 +2284 3 27 40 -0.65536000000000000000e5 +2284 3 29 42 0.65536000000000000000e5 +2284 3 30 43 0.65536000000000000000e5 +2284 3 35 48 -0.13107200000000000000e6 +2284 3 40 45 0.65536000000000000000e5 +2284 4 4 32 0.16384000000000000000e5 +2284 4 7 35 0.32768000000000000000e5 +2284 4 16 28 -0.16384000000000000000e5 +2284 4 19 31 0.65536000000000000000e5 +2284 4 22 34 0.65536000000000000000e5 +2285 1 6 53 -0.81920000000000000000e4 +2285 1 14 45 -0.26214400000000000000e6 +2285 1 17 48 0.13107200000000000000e6 +2285 1 18 49 0.13107200000000000000e6 +2285 1 25 40 0.81920000000000000000e4 +2285 1 34 49 0.65536000000000000000e5 +2285 1 44 51 0.65536000000000000000e5 +2285 2 4 34 -0.16384000000000000000e5 +2285 2 14 28 0.65536000000000000000e5 +2285 2 21 35 0.16384000000000000000e5 +2285 2 31 34 0.65536000000000000000e5 +2285 3 5 50 -0.16384000000000000000e5 +2285 3 14 43 0.65536000000000000000e5 +2285 3 14 51 -0.65536000000000000000e5 +2285 3 15 44 -0.13107200000000000000e6 +2285 3 16 45 0.26214400000000000000e6 +2285 3 18 47 0.65536000000000000000e5 +2285 3 19 48 0.13107200000000000000e6 +2285 3 22 35 -0.65536000000000000000e5 +2285 3 24 37 -0.81920000000000000000e4 +2285 3 27 40 -0.32768000000000000000e5 +2285 3 28 41 -0.32768000000000000000e5 +2285 3 29 42 -0.32768000000000000000e5 +2285 3 34 47 -0.65536000000000000000e5 +2285 3 35 48 -0.65536000000000000000e5 +2285 3 41 46 0.13107200000000000000e6 +2285 4 4 32 0.81920000000000000000e4 +2285 4 7 35 0.16384000000000000000e5 +2285 4 14 26 -0.65536000000000000000e5 +2285 4 15 27 -0.13107200000000000000e6 +2285 4 16 28 -0.81920000000000000000e4 +2285 4 23 27 -0.32768000000000000000e5 +2286 1 6 53 -0.16384000000000000000e5 +2286 1 25 40 0.16384000000000000000e5 +2286 1 28 43 0.65536000000000000000e5 +2286 1 33 40 0.65536000000000000000e5 +2286 1 33 48 0.65536000000000000000e5 +2286 1 44 51 -0.13107200000000000000e6 +2286 2 4 34 -0.32768000000000000000e5 +2286 2 21 35 0.32768000000000000000e5 +2286 2 31 35 0.65536000000000000000e5 +2286 3 5 50 -0.32768000000000000000e5 +2286 3 14 51 -0.13107200000000000000e6 +2286 3 23 52 -0.65536000000000000000e5 +2286 3 24 37 -0.16384000000000000000e5 +2286 3 27 40 -0.65536000000000000000e5 +2286 3 29 42 0.65536000000000000000e5 +2286 3 30 43 0.65536000000000000000e5 +2286 3 35 48 -0.13107200000000000000e6 +2286 3 40 45 0.65536000000000000000e5 +2286 4 4 32 0.16384000000000000000e5 +2286 4 7 35 0.32768000000000000000e5 +2286 4 16 28 -0.16384000000000000000e5 +2286 4 19 31 0.65536000000000000000e5 +2286 4 22 34 0.65536000000000000000e5 +2286 4 23 35 0.65536000000000000000e5 +2287 1 25 56 0.65536000000000000000e5 +2287 1 38 53 0.65536000000000000000e5 +2287 1 40 47 0.65536000000000000000e5 +2287 1 41 56 -0.13107200000000000000e6 +2287 2 32 33 0.65536000000000000000e5 +2287 3 24 53 -0.65536000000000000000e5 +2287 3 27 56 -0.13107200000000000000e6 +2288 1 1 48 0.32768000000000000000e5 +2288 1 2 49 0.32768000000000000000e5 +2288 1 8 39 0.65536000000000000000e5 +2288 1 9 40 0.65536000000000000000e5 +2288 1 10 41 -0.13107200000000000000e6 +2288 1 12 43 -0.26214400000000000000e6 +2288 1 23 38 0.32768000000000000000e5 +2288 1 24 55 -0.13107200000000000000e6 +2288 1 26 41 -0.65536000000000000000e5 +2288 1 28 43 0.26214400000000000000e6 +2288 1 32 47 0.26214400000000000000e6 +2288 1 33 48 -0.13107200000000000000e6 +2288 1 40 55 0.65536000000000000000e5 +2288 1 41 56 0.13107200000000000000e6 +2288 1 44 51 0.26214400000000000000e6 +2288 1 46 53 -0.26214400000000000000e6 +2288 2 2 32 0.32768000000000000000e5 +2288 2 4 34 -0.65536000000000000000e5 +2288 2 16 30 0.65536000000000000000e5 +2288 2 20 34 0.13107200000000000000e6 +2288 2 21 35 -0.65536000000000000000e5 +2288 2 28 34 0.65536000000000000000e5 +2288 2 32 34 0.65536000000000000000e5 +2288 3 5 50 -0.65536000000000000000e5 +2288 3 9 38 0.65536000000000000000e5 +2288 3 10 55 -0.13107200000000000000e6 +2288 3 22 35 0.26214400000000000000e6 +2288 3 22 51 0.65536000000000000000e5 +2288 3 23 52 -0.13107200000000000000e6 +2288 3 27 40 -0.65536000000000000000e5 +2288 3 27 56 0.13107200000000000000e6 +2288 3 28 41 0.26214400000000000000e6 +2288 3 35 48 0.26214400000000000000e6 +2288 3 37 50 -0.65536000000000000000e5 +2288 3 38 51 -0.13107200000000000000e6 +2288 3 39 52 -0.13107200000000000000e6 +2288 3 40 45 -0.13107200000000000000e6 +2288 4 2 30 0.65536000000000000000e5 +2288 4 6 34 0.13107200000000000000e6 +2288 4 7 35 0.65536000000000000000e5 +2288 4 22 34 -0.13107200000000000000e6 +2288 4 23 35 -0.13107200000000000000e6 +2288 4 29 33 -0.65536000000000000000e5 +2289 1 25 56 0.65536000000000000000e5 +2289 1 38 53 0.65536000000000000000e5 +2289 1 40 47 0.65536000000000000000e5 +2289 1 41 56 -0.13107200000000000000e6 +2289 2 32 35 0.65536000000000000000e5 +2289 3 24 53 -0.65536000000000000000e5 +2289 3 27 56 -0.13107200000000000000e6 +2289 4 32 32 0.13107200000000000000e6 +2290 1 1 48 0.32768000000000000000e5 +2290 1 2 49 0.65536000000000000000e5 +2290 1 6 53 -0.32768000000000000000e5 +2290 1 8 39 0.65536000000000000000e5 +2290 1 9 40 0.65536000000000000000e5 +2290 1 10 41 -0.13107200000000000000e6 +2290 1 12 43 -0.26214400000000000000e6 +2290 1 23 38 0.32768000000000000000e5 +2290 1 24 39 0.32768000000000000000e5 +2290 1 24 55 0.65536000000000000000e5 +2290 1 25 56 0.32768000000000000000e5 +2290 1 26 41 -0.13107200000000000000e6 +2290 1 28 43 0.13107200000000000000e6 +2290 1 32 47 0.26214400000000000000e6 +2290 1 40 47 0.32768000000000000000e5 +2290 2 2 32 0.32768000000000000000e5 +2290 2 3 33 0.32768000000000000000e5 +2290 2 5 35 -0.32768000000000000000e5 +2290 2 16 30 0.65536000000000000000e5 +2290 2 20 34 0.13107200000000000000e6 +2290 2 33 33 0.65536000000000000000e5 +2290 3 9 38 0.65536000000000000000e5 +2290 3 22 35 0.26214400000000000000e6 +2290 3 22 51 -0.65536000000000000000e5 +2290 3 23 52 0.13107200000000000000e6 +2290 3 24 53 -0.32768000000000000000e5 +2290 3 25 38 0.32768000000000000000e5 +2290 3 25 54 -0.32768000000000000000e5 +2290 3 27 40 0.65536000000000000000e5 +2290 3 28 41 0.26214400000000000000e6 +2290 3 38 51 0.65536000000000000000e5 +2290 3 39 40 -0.32768000000000000000e5 +2290 4 2 30 0.65536000000000000000e5 +2290 4 6 34 0.13107200000000000000e6 +2290 4 7 35 -0.65536000000000000000e5 +2291 2 28 34 -0.65536000000000000000e5 +2291 2 33 34 0.65536000000000000000e5 +2291 4 29 33 0.65536000000000000000e5 +2292 1 6 53 -0.81920000000000000000e4 +2292 1 25 40 0.81920000000000000000e4 +2292 1 28 43 0.32768000000000000000e5 +2292 1 33 40 0.32768000000000000000e5 +2292 1 33 48 0.32768000000000000000e5 +2292 1 44 51 -0.65536000000000000000e5 +2292 2 4 34 -0.16384000000000000000e5 +2292 2 21 35 0.16384000000000000000e5 +2292 2 34 34 0.65536000000000000000e5 +2292 3 5 50 -0.16384000000000000000e5 +2292 3 14 51 -0.65536000000000000000e5 +2292 3 23 52 -0.32768000000000000000e5 +2292 3 24 37 -0.81920000000000000000e4 +2292 3 27 40 -0.32768000000000000000e5 +2292 3 29 42 0.32768000000000000000e5 +2292 3 30 43 0.32768000000000000000e5 +2292 3 35 48 -0.65536000000000000000e5 +2292 3 40 45 0.32768000000000000000e5 +2292 4 4 32 0.81920000000000000000e4 +2292 4 7 35 0.16384000000000000000e5 +2292 4 16 28 -0.81920000000000000000e4 +2292 4 19 31 0.32768000000000000000e5 +2292 4 22 34 0.32768000000000000000e5 +2292 4 23 35 0.32768000000000000000e5 +2293 2 28 34 -0.65536000000000000000e5 +2293 2 34 35 0.65536000000000000000e5 +2293 3 27 56 -0.65536000000000000000e5 +2293 3 41 54 -0.65536000000000000000e5 +2293 3 47 52 0.13107200000000000000e6 +2293 3 49 50 -0.65536000000000000000e5 +2293 4 29 33 0.65536000000000000000e5 +2294 1 1 8 -0.65536000000000000000e5 +2294 1 2 5 -0.32768000000000000000e5 +2294 1 2 9 0.65536000000000000000e5 +2294 1 2 25 0.32768000000000000000e5 +2294 1 7 22 0.65536000000000000000e5 +2294 1 8 23 -0.65536000000000000000e5 +2294 3 1 1 0.65536000000000000000e5 +2294 3 1 2 0.32768000000000000000e5 +2294 3 2 3 -0.32768000000000000000e5 +2294 4 1 1 0.65536000000000000000e5 +2294 4 2 2 -0.65536000000000000000e5 +2295 1 2 5 0.65536000000000000000e5 +2295 1 2 9 -0.13107200000000000000e6 +2295 1 2 25 -0.65536000000000000000e5 +2295 1 8 23 0.13107200000000000000e6 +2295 3 1 3 0.65536000000000000000e5 +2295 3 2 3 0.65536000000000000000e5 +2295 4 2 2 0.13107200000000000000e6 +2296 3 1 4 0.65536000000000000000e5 +2296 3 2 3 -0.65536000000000000000e5 +2297 1 2 5 -0.65536000000000000000e5 +2297 1 2 25 0.65536000000000000000e5 +2297 3 1 5 0.65536000000000000000e5 +2298 1 1 8 -0.65536000000000000000e5 +2298 1 7 22 0.65536000000000000000e5 +2298 3 1 7 0.65536000000000000000e5 +2299 3 1 8 0.65536000000000000000e5 +2299 3 2 7 -0.65536000000000000000e5 +2300 1 2 9 -0.65536000000000000000e5 +2300 1 8 23 0.65536000000000000000e5 +2300 3 1 9 0.65536000000000000000e5 +2301 1 1 48 0.65536000000000000000e5 +2301 1 2 9 0.65536000000000000000e5 +2301 1 2 33 0.26214400000000000000e6 +2301 1 2 49 0.65536000000000000000e5 +2301 1 3 34 -0.26214400000000000000e6 +2301 1 4 11 -0.65536000000000000000e5 +2301 1 8 39 0.65536000000000000000e5 +2301 1 9 40 0.65536000000000000000e5 +2301 1 10 41 0.13107200000000000000e6 +2301 1 11 42 -0.13107200000000000000e6 +2301 1 12 43 -0.52428800000000000000e6 +2301 1 23 38 0.65536000000000000000e5 +2301 1 26 41 -0.65536000000000000000e5 +2301 1 28 43 0.26214400000000000000e6 +2301 1 32 47 0.39321600000000000000e6 +2301 1 33 48 0.13107200000000000000e6 +2301 2 2 8 0.65536000000000000000e5 +2301 2 2 32 0.65536000000000000000e5 +2301 2 3 9 -0.65536000000000000000e5 +2301 2 7 21 0.13107200000000000000e6 +2301 2 12 26 0.13107200000000000000e6 +2301 2 16 30 0.65536000000000000000e5 +2301 2 20 34 0.13107200000000000000e6 +2301 3 1 10 0.65536000000000000000e5 +2301 3 1 14 -0.13107200000000000000e6 +2301 3 1 30 -0.65536000000000000000e5 +2301 3 2 15 0.13107200000000000000e6 +2301 3 3 32 0.26214400000000000000e6 +2301 3 4 9 -0.65536000000000000000e5 +2301 3 8 37 0.65536000000000000000e5 +2301 3 10 23 -0.13107200000000000000e6 +2301 3 13 42 0.26214400000000000000e6 +2301 3 22 35 0.26214400000000000000e6 +2301 3 28 41 0.39321600000000000000e6 +2301 3 29 42 0.13107200000000000000e6 +2301 4 2 30 0.65536000000000000000e5 +2301 4 3 31 -0.13107200000000000000e6 +2301 4 6 18 -0.65536000000000000000e5 +2301 4 6 34 0.13107200000000000000e6 +2302 1 1 48 -0.32768000000000000000e5 +2302 1 2 49 -0.32768000000000000000e5 +2302 1 4 11 0.65536000000000000000e5 +2302 1 9 40 -0.65536000000000000000e5 +2302 1 12 43 0.26214400000000000000e6 +2302 1 23 38 -0.32768000000000000000e5 +2302 1 26 41 0.65536000000000000000e5 +2302 1 28 43 -0.13107200000000000000e6 +2302 1 32 47 -0.26214400000000000000e6 +2302 2 2 32 -0.32768000000000000000e5 +2302 2 3 9 0.65536000000000000000e5 +2302 2 16 30 -0.65536000000000000000e5 +2302 2 20 34 -0.13107200000000000000e6 +2302 3 1 11 0.65536000000000000000e5 +2302 3 1 30 0.65536000000000000000e5 +2302 3 2 15 -0.13107200000000000000e6 +2302 3 3 32 -0.13107200000000000000e6 +2302 3 4 9 0.65536000000000000000e5 +2302 3 10 23 0.65536000000000000000e5 +2302 3 22 35 -0.26214400000000000000e6 +2302 3 28 41 -0.26214400000000000000e6 +2302 4 2 30 -0.65536000000000000000e5 +2302 4 6 34 -0.13107200000000000000e6 +2303 1 1 48 -0.32768000000000000000e5 +2303 1 2 33 -0.13107200000000000000e6 +2303 1 2 49 -0.32768000000000000000e5 +2303 1 3 34 0.13107200000000000000e6 +2303 1 4 11 0.32768000000000000000e5 +2303 1 8 23 -0.32768000000000000000e5 +2303 1 8 39 -0.32768000000000000000e5 +2303 1 9 40 -0.32768000000000000000e5 +2303 1 10 41 -0.65536000000000000000e5 +2303 1 11 42 0.65536000000000000000e5 +2303 1 12 43 0.26214400000000000000e6 +2303 1 23 38 -0.32768000000000000000e5 +2303 1 26 41 0.32768000000000000000e5 +2303 1 28 43 -0.13107200000000000000e6 +2303 1 32 47 -0.19660800000000000000e6 +2303 1 33 48 -0.65536000000000000000e5 +2303 2 2 8 -0.32768000000000000000e5 +2303 2 2 32 -0.32768000000000000000e5 +2303 2 3 9 0.32768000000000000000e5 +2303 2 7 21 -0.65536000000000000000e5 +2303 2 12 26 -0.65536000000000000000e5 +2303 2 16 30 -0.32768000000000000000e5 +2303 2 20 34 -0.65536000000000000000e5 +2303 3 1 12 0.65536000000000000000e5 +2303 3 1 14 0.13107200000000000000e6 +2303 3 1 30 0.32768000000000000000e5 +2303 3 2 7 0.32768000000000000000e5 +2303 3 2 15 -0.65536000000000000000e5 +2303 3 3 32 -0.13107200000000000000e6 +2303 3 4 9 0.32768000000000000000e5 +2303 3 7 12 -0.13107200000000000000e6 +2303 3 8 37 -0.32768000000000000000e5 +2303 3 10 23 0.65536000000000000000e5 +2303 3 13 42 -0.13107200000000000000e6 +2303 3 22 35 -0.13107200000000000000e6 +2303 3 28 41 -0.19660800000000000000e6 +2303 3 29 42 -0.65536000000000000000e5 +2303 4 2 6 0.32768000000000000000e5 +2303 4 2 30 -0.32768000000000000000e5 +2303 4 3 31 0.65536000000000000000e5 +2303 4 6 6 0.13107200000000000000e6 +2303 4 6 18 0.32768000000000000000e5 +2303 4 6 34 -0.65536000000000000000e5 +2304 1 1 48 0.32768000000000000000e5 +2304 1 2 33 0.13107200000000000000e6 +2304 1 2 49 0.32768000000000000000e5 +2304 1 3 34 -0.13107200000000000000e6 +2304 1 4 11 -0.32768000000000000000e5 +2304 1 8 23 0.32768000000000000000e5 +2304 1 8 39 0.32768000000000000000e5 +2304 1 9 40 0.32768000000000000000e5 +2304 1 10 41 0.65536000000000000000e5 +2304 1 11 42 -0.65536000000000000000e5 +2304 1 12 43 -0.26214400000000000000e6 +2304 1 23 38 0.32768000000000000000e5 +2304 1 26 41 -0.32768000000000000000e5 +2304 1 28 43 0.13107200000000000000e6 +2304 1 32 47 0.19660800000000000000e6 +2304 1 33 48 0.65536000000000000000e5 +2304 2 2 8 0.32768000000000000000e5 +2304 2 2 32 0.32768000000000000000e5 +2304 2 3 9 -0.32768000000000000000e5 +2304 2 7 21 0.65536000000000000000e5 +2304 2 12 26 0.65536000000000000000e5 +2304 2 16 30 0.32768000000000000000e5 +2304 2 20 34 0.65536000000000000000e5 +2304 3 1 13 0.65536000000000000000e5 +2304 3 1 14 -0.65536000000000000000e5 +2304 3 1 30 -0.32768000000000000000e5 +2304 3 2 7 -0.32768000000000000000e5 +2304 3 2 15 0.65536000000000000000e5 +2304 3 3 32 0.13107200000000000000e6 +2304 3 4 9 -0.32768000000000000000e5 +2304 3 8 37 0.32768000000000000000e5 +2304 3 10 23 -0.65536000000000000000e5 +2304 3 13 42 0.13107200000000000000e6 +2304 3 22 35 0.13107200000000000000e6 +2304 3 28 41 0.19660800000000000000e6 +2304 3 29 42 0.65536000000000000000e5 +2304 4 2 6 -0.32768000000000000000e5 +2304 4 2 30 0.32768000000000000000e5 +2304 4 3 31 -0.65536000000000000000e5 +2304 4 6 18 -0.32768000000000000000e5 +2304 4 6 34 0.65536000000000000000e5 +2305 2 4 10 0.65536000000000000000e5 +2305 2 7 21 -0.65536000000000000000e5 +2305 3 1 14 0.65536000000000000000e5 +2305 3 1 15 0.65536000000000000000e5 +2305 3 2 15 0.65536000000000000000e5 +2305 3 3 16 -0.13107200000000000000e6 +2306 3 1 16 0.65536000000000000000e5 +2306 3 7 12 -0.65536000000000000000e5 +2307 1 2 17 -0.65536000000000000000e5 +2307 1 16 23 0.65536000000000000000e5 +2307 3 1 17 0.65536000000000000000e5 +2308 3 1 18 0.65536000000000000000e5 +2308 3 3 16 -0.65536000000000000000e5 +2309 1 2 17 -0.32768000000000000000e5 +2309 1 16 23 0.32768000000000000000e5 +2309 3 1 19 0.65536000000000000000e5 +2309 3 3 16 -0.32768000000000000000e5 +2309 3 7 12 -0.32768000000000000000e5 +2309 4 1 13 -0.32768000000000000000e5 +2310 1 2 17 -0.32768000000000000000e5 +2310 1 3 34 -0.32768000000000000000e5 +2310 1 4 19 -0.65536000000000000000e5 +2310 1 4 35 -0.32768000000000000000e5 +2310 1 12 43 -0.65536000000000000000e5 +2310 1 14 45 -0.65536000000000000000e5 +2310 1 17 48 0.32768000000000000000e5 +2310 1 18 49 0.32768000000000000000e5 +2310 1 20 27 0.13107200000000000000e6 +2310 2 6 12 -0.32768000000000000000e5 +2310 2 9 23 -0.32768000000000000000e5 +2310 2 10 24 -0.65536000000000000000e5 +2310 2 14 28 0.32768000000000000000e5 +2310 3 1 20 0.65536000000000000000e5 +2310 3 4 17 0.32768000000000000000e5 +2310 3 5 34 -0.32768000000000000000e5 +2310 3 13 42 0.32768000000000000000e5 +2310 3 14 27 -0.65536000000000000000e5 +2310 3 14 43 0.32768000000000000000e5 +2310 4 2 14 0.32768000000000000000e5 +2311 1 2 17 -0.32768000000000000000e5 +2311 1 3 18 -0.16384000000000000000e5 +2311 1 3 34 -0.16384000000000000000e5 +2311 1 4 19 -0.32768000000000000000e5 +2311 1 4 35 -0.16384000000000000000e5 +2311 1 12 43 -0.16384000000000000000e5 +2311 1 14 45 -0.32768000000000000000e5 +2311 1 16 23 0.16384000000000000000e5 +2311 1 17 48 0.16384000000000000000e5 +2311 1 18 49 0.16384000000000000000e5 +2311 1 20 27 0.65536000000000000000e5 +2311 2 6 12 -0.16384000000000000000e5 +2311 2 9 23 -0.16384000000000000000e5 +2311 2 10 24 -0.32768000000000000000e5 +2311 2 14 28 0.16384000000000000000e5 +2311 3 1 21 0.65536000000000000000e5 +2311 3 3 16 -0.32768000000000000000e5 +2311 3 5 34 -0.16384000000000000000e5 +2311 3 7 12 -0.16384000000000000000e5 +2311 3 13 42 0.16384000000000000000e5 +2311 3 14 27 -0.16384000000000000000e5 +2311 3 14 43 0.16384000000000000000e5 +2311 4 1 13 -0.16384000000000000000e5 +2311 4 10 10 -0.65536000000000000000e5 +2312 1 1 24 -0.65536000000000000000e5 +2312 1 1 40 -0.65536000000000000000e5 +2312 1 22 37 0.65536000000000000000e5 +2312 1 23 38 0.65536000000000000000e5 +2312 3 1 23 0.65536000000000000000e5 +2312 3 1 38 -0.65536000000000000000e5 +2312 3 22 27 0.13107200000000000000e6 +2312 4 16 16 -0.13107200000000000000e6 +2313 3 1 24 0.65536000000000000000e5 +2313 3 2 23 -0.65536000000000000000e5 +2314 1 1 40 0.65536000000000000000e5 +2314 1 2 25 -0.65536000000000000000e5 +2314 3 1 25 0.65536000000000000000e5 +2315 1 2 25 0.65536000000000000000e5 +2315 1 2 33 -0.26214400000000000000e6 +2315 1 11 42 0.26214400000000000000e6 +2315 1 12 43 0.52428800000000000000e6 +2315 1 23 38 -0.65536000000000000000e5 +2315 1 28 43 -0.26214400000000000000e6 +2315 1 32 47 -0.26214400000000000000e6 +2315 1 33 48 -0.26214400000000000000e6 +2315 2 2 32 -0.65536000000000000000e5 +2315 2 3 17 0.65536000000000000000e5 +2315 2 12 26 -0.26214400000000000000e6 +2315 3 1 26 0.65536000000000000000e5 +2315 3 1 30 0.13107200000000000000e6 +2315 3 1 38 0.65536000000000000000e5 +2315 3 2 23 0.65536000000000000000e5 +2315 3 2 39 0.65536000000000000000e5 +2315 3 8 37 -0.13107200000000000000e6 +2315 3 10 23 0.13107200000000000000e6 +2315 3 13 42 -0.52428800000000000000e6 +2315 3 28 41 -0.26214400000000000000e6 +2315 3 29 42 -0.26214400000000000000e6 +2315 4 3 31 0.26214400000000000000e6 +2315 4 6 18 0.13107200000000000000e6 +2316 1 1 24 -0.32768000000000000000e5 +2316 1 1 40 -0.32768000000000000000e5 +2316 1 22 37 0.32768000000000000000e5 +2316 1 23 38 0.32768000000000000000e5 +2316 2 2 16 -0.32768000000000000000e5 +2316 2 16 16 0.65536000000000000000e5 +2316 3 1 22 -0.32768000000000000000e5 +2316 3 1 27 0.65536000000000000000e5 +2316 3 1 38 -0.32768000000000000000e5 +2316 3 2 23 -0.32768000000000000000e5 +2316 3 22 27 0.65536000000000000000e5 +2316 4 16 16 -0.65536000000000000000e5 +2317 1 7 38 0.65536000000000000000e5 +2317 1 8 23 -0.65536000000000000000e5 +2317 3 1 28 0.65536000000000000000e5 +2318 1 2 33 -0.13107200000000000000e6 +2318 1 11 42 0.13107200000000000000e6 +2318 1 12 43 0.26214400000000000000e6 +2318 1 28 43 -0.13107200000000000000e6 +2318 1 32 47 -0.13107200000000000000e6 +2318 1 33 48 -0.13107200000000000000e6 +2318 2 12 26 -0.13107200000000000000e6 +2318 3 1 29 0.65536000000000000000e5 +2318 3 1 30 0.65536000000000000000e5 +2318 3 10 23 0.65536000000000000000e5 +2318 3 13 42 -0.26214400000000000000e6 +2318 3 28 41 -0.13107200000000000000e6 +2318 3 29 42 -0.13107200000000000000e6 +2318 4 3 31 0.13107200000000000000e6 +2318 4 6 18 0.65536000000000000000e5 +2319 1 1 32 -0.65536000000000000000e5 +2319 1 2 33 0.65536000000000000000e5 +2319 1 3 34 -0.13107200000000000000e6 +2319 1 10 41 0.65536000000000000000e5 +2319 1 11 42 -0.65536000000000000000e5 +2319 1 12 43 -0.13107200000000000000e6 +2319 1 16 23 0.13107200000000000000e6 +2319 1 28 43 0.65536000000000000000e5 +2319 1 32 47 0.65536000000000000000e5 +2319 1 33 48 0.65536000000000000000e5 +2319 2 1 31 -0.65536000000000000000e5 +2319 2 7 21 0.65536000000000000000e5 +2319 2 12 26 0.65536000000000000000e5 +2319 3 1 31 0.65536000000000000000e5 +2319 3 1 34 -0.13107200000000000000e6 +2319 3 2 31 0.65536000000000000000e5 +2319 3 3 32 0.65536000000000000000e5 +2319 3 13 42 0.13107200000000000000e6 +2319 3 28 41 0.65536000000000000000e5 +2319 3 29 42 0.65536000000000000000e5 +2319 4 3 31 -0.65536000000000000000e5 +2320 3 1 32 0.65536000000000000000e5 +2320 3 2 31 -0.65536000000000000000e5 +2321 1 2 33 -0.65536000000000000000e5 +2321 1 11 42 0.65536000000000000000e5 +2321 1 12 43 0.13107200000000000000e6 +2321 1 28 43 -0.65536000000000000000e5 +2321 1 32 47 -0.65536000000000000000e5 +2321 1 33 48 -0.65536000000000000000e5 +2321 2 12 26 -0.65536000000000000000e5 +2321 3 1 33 0.65536000000000000000e5 +2321 3 13 42 -0.13107200000000000000e6 +2321 3 28 41 -0.65536000000000000000e5 +2321 3 29 42 -0.65536000000000000000e5 +2321 4 3 31 0.65536000000000000000e5 +2322 1 3 34 -0.65536000000000000000e5 +2322 1 16 47 0.65536000000000000000e5 +2322 3 1 35 0.65536000000000000000e5 +2322 3 12 41 0.65536000000000000000e5 +2323 1 3 18 -0.32768000000000000000e5 +2323 1 4 19 0.65536000000000000000e5 +2323 1 4 35 0.32768000000000000000e5 +2323 1 12 43 0.65536000000000000000e5 +2323 1 14 45 0.65536000000000000000e5 +2323 1 17 48 -0.32768000000000000000e5 +2323 1 18 49 -0.32768000000000000000e5 +2323 1 20 27 -0.13107200000000000000e6 +2323 1 27 34 0.65536000000000000000e5 +2323 2 9 23 0.32768000000000000000e5 +2323 2 10 24 0.65536000000000000000e5 +2323 2 14 28 -0.32768000000000000000e5 +2323 3 1 36 0.65536000000000000000e5 +2323 3 3 16 -0.32768000000000000000e5 +2323 3 4 17 -0.32768000000000000000e5 +2323 3 5 34 0.32768000000000000000e5 +2323 3 13 42 -0.32768000000000000000e5 +2323 3 14 27 0.65536000000000000000e5 +2323 3 14 43 -0.32768000000000000000e5 +2323 4 2 14 -0.32768000000000000000e5 +2324 1 1 40 0.65536000000000000000e5 +2324 1 23 38 -0.65536000000000000000e5 +2324 3 1 37 0.65536000000000000000e5 +2324 3 1 38 0.65536000000000000000e5 +2324 3 22 27 -0.13107200000000000000e6 +2324 4 16 16 0.13107200000000000000e6 +2325 1 1 40 -0.65536000000000000000e5 +2325 1 23 38 0.65536000000000000000e5 +2325 3 1 39 0.65536000000000000000e5 +2326 3 1 40 0.65536000000000000000e5 +2326 3 2 39 -0.65536000000000000000e5 +2327 3 1 41 0.65536000000000000000e5 +2327 3 22 27 -0.65536000000000000000e5 +2328 3 1 42 0.65536000000000000000e5 +2328 3 8 37 -0.65536000000000000000e5 +2329 1 9 40 0.65536000000000000000e5 +2329 1 10 41 -0.13107200000000000000e6 +2329 1 26 41 -0.65536000000000000000e5 +2329 1 32 47 0.13107200000000000000e6 +2329 3 1 43 0.65536000000000000000e5 +2329 3 9 38 0.65536000000000000000e5 +2329 3 28 41 0.13107200000000000000e6 +2329 4 2 30 0.65536000000000000000e5 +2330 1 9 40 0.32768000000000000000e5 +2330 1 10 41 -0.65536000000000000000e5 +2330 1 26 41 -0.32768000000000000000e5 +2330 1 32 47 0.65536000000000000000e5 +2330 3 1 44 0.65536000000000000000e5 +2330 3 8 37 -0.32768000000000000000e5 +2330 3 9 38 0.32768000000000000000e5 +2330 3 22 27 -0.32768000000000000000e5 +2330 3 28 41 0.65536000000000000000e5 +2330 4 1 29 -0.32768000000000000000e5 +2330 4 2 30 0.32768000000000000000e5 +2331 1 11 42 -0.65536000000000000000e5 +2331 1 33 48 0.65536000000000000000e5 +2331 2 12 26 0.65536000000000000000e5 +2331 2 20 34 -0.65536000000000000000e5 +2331 3 1 45 0.65536000000000000000e5 +2331 3 13 42 0.13107200000000000000e6 +2331 3 22 35 -0.13107200000000000000e6 +2331 3 29 42 0.65536000000000000000e5 +2331 4 3 31 -0.65536000000000000000e5 +2331 4 6 34 -0.65536000000000000000e5 +2332 3 1 46 0.65536000000000000000e5 +2332 3 12 41 -0.65536000000000000000e5 +2333 1 6 53 0.65536000000000000000e5 +2333 1 25 40 -0.65536000000000000000e5 +2333 2 1 35 -0.65536000000000000000e5 +2333 2 2 32 0.65536000000000000000e5 +2333 2 4 34 0.13107200000000000000e6 +2333 2 16 30 0.13107200000000000000e6 +2333 2 16 34 -0.13107200000000000000e6 +2333 2 21 35 -0.13107200000000000000e6 +2333 3 1 47 0.65536000000000000000e5 +2333 3 2 47 0.65536000000000000000e5 +2333 3 5 50 0.13107200000000000000e6 +2333 3 7 52 -0.52428800000000000000e6 +2333 3 24 37 0.13107200000000000000e6 +2333 3 27 40 0.13107200000000000000e6 +2333 3 28 41 0.52428800000000000000e6 +2333 4 4 32 -0.65536000000000000000e5 +2333 4 6 34 0.26214400000000000000e6 +2333 4 7 35 -0.13107200000000000000e6 +2333 4 16 28 0.65536000000000000000e5 +2333 4 17 29 -0.13107200000000000000e6 +2334 3 1 48 0.65536000000000000000e5 +2334 3 2 47 -0.65536000000000000000e5 +2335 3 1 49 0.65536000000000000000e5 +2335 3 24 37 -0.65536000000000000000e5 +2336 1 6 53 0.32768000000000000000e5 +2336 1 25 40 -0.32768000000000000000e5 +2336 2 4 34 0.65536000000000000000e5 +2336 2 16 30 0.65536000000000000000e5 +2336 2 16 34 -0.65536000000000000000e5 +2336 2 21 35 -0.65536000000000000000e5 +2336 3 1 50 0.65536000000000000000e5 +2336 3 5 50 0.65536000000000000000e5 +2336 3 7 52 -0.26214400000000000000e6 +2336 3 24 37 0.32768000000000000000e5 +2336 3 27 40 0.65536000000000000000e5 +2336 3 28 41 0.26214400000000000000e6 +2336 4 4 32 -0.32768000000000000000e5 +2336 4 6 34 0.13107200000000000000e6 +2336 4 7 35 -0.65536000000000000000e5 +2336 4 16 28 0.32768000000000000000e5 +2336 4 17 29 -0.65536000000000000000e5 +2337 1 6 53 0.32768000000000000000e5 +2337 1 25 40 -0.32768000000000000000e5 +2337 3 1 51 0.65536000000000000000e5 +2337 3 24 37 0.32768000000000000000e5 +2337 3 27 40 0.13107200000000000000e6 +2337 3 28 41 -0.13107200000000000000e6 +2337 4 4 32 -0.32768000000000000000e5 +2337 4 16 28 0.32768000000000000000e5 +2337 4 17 29 0.65536000000000000000e5 +2338 1 6 53 0.16384000000000000000e5 +2338 1 25 40 -0.16384000000000000000e5 +2338 2 4 34 0.32768000000000000000e5 +2338 2 21 35 -0.32768000000000000000e5 +2338 3 1 52 0.65536000000000000000e5 +2338 3 5 50 0.32768000000000000000e5 +2338 3 7 52 -0.13107200000000000000e6 +2338 3 24 37 0.16384000000000000000e5 +2338 3 27 40 0.65536000000000000000e5 +2338 3 28 41 0.65536000000000000000e5 +2338 4 4 32 -0.16384000000000000000e5 +2338 4 6 34 0.65536000000000000000e5 +2338 4 7 35 -0.32768000000000000000e5 +2338 4 16 28 0.16384000000000000000e5 +2339 1 22 53 0.65536000000000000000e5 +2339 1 23 38 -0.65536000000000000000e5 +2339 3 1 53 0.65536000000000000000e5 +2339 3 2 47 0.65536000000000000000e5 +2340 1 2 49 -0.65536000000000000000e5 +2340 1 6 53 0.65536000000000000000e5 +2340 1 8 39 0.13107200000000000000e6 +2340 1 9 40 0.13107200000000000000e6 +2340 1 10 41 -0.26214400000000000000e6 +2340 1 22 53 -0.65536000000000000000e5 +2340 1 23 54 -0.65536000000000000000e5 +2340 1 24 55 -0.13107200000000000000e6 +2340 1 25 40 -0.65536000000000000000e5 +2340 1 37 52 0.26214400000000000000e6 +2340 2 26 32 -0.65536000000000000000e5 +2340 3 1 54 0.65536000000000000000e5 +2340 3 9 38 0.13107200000000000000e6 +2340 3 22 51 0.13107200000000000000e6 +2340 3 24 37 0.13107200000000000000e6 +2340 3 27 40 0.13107200000000000000e6 +2340 4 2 30 0.13107200000000000000e6 +2340 4 4 32 -0.65536000000000000000e5 +2340 4 16 28 0.65536000000000000000e5 +2340 4 17 29 0.13107200000000000000e6 +2340 4 20 32 0.13107200000000000000e6 +2341 1 24 55 -0.65536000000000000000e5 +2341 1 26 41 0.65536000000000000000e5 +2341 1 32 47 -0.13107200000000000000e6 +2341 1 37 52 0.13107200000000000000e6 +2341 3 1 55 0.65536000000000000000e5 +2341 3 22 51 0.65536000000000000000e5 +2341 3 27 40 -0.65536000000000000000e5 +2341 4 20 32 0.65536000000000000000e5 +2342 1 1 48 -0.65536000000000000000e5 +2342 1 2 49 -0.65536000000000000000e5 +2342 1 6 53 -0.13107200000000000000e6 +2342 1 8 39 -0.26214400000000000000e6 +2342 1 9 40 -0.26214400000000000000e6 +2342 1 10 41 0.52428800000000000000e6 +2342 1 12 43 0.52428800000000000000e6 +2342 1 22 53 0.65536000000000000000e5 +2342 1 23 38 -0.65536000000000000000e5 +2342 1 23 54 0.65536000000000000000e5 +2342 1 24 55 0.13107200000000000000e6 +2342 1 25 40 0.13107200000000000000e6 +2342 1 26 41 0.13107200000000000000e6 +2342 1 28 43 -0.26214400000000000000e6 +2342 1 32 47 -0.52428800000000000000e6 +2342 1 37 52 -0.26214400000000000000e6 +2342 1 38 53 -0.65536000000000000000e5 +2342 1 40 47 -0.65536000000000000000e5 +2342 2 2 32 -0.65536000000000000000e5 +2342 2 16 30 -0.13107200000000000000e6 +2342 2 20 34 -0.26214400000000000000e6 +2342 2 26 32 0.65536000000000000000e5 +2342 2 32 32 -0.13107200000000000000e6 +2342 3 1 56 0.65536000000000000000e5 +2342 3 9 38 -0.26214400000000000000e6 +2342 3 22 35 -0.52428800000000000000e6 +2342 3 22 51 -0.26214400000000000000e6 +2342 3 24 37 -0.13107200000000000000e6 +2342 3 24 53 0.65536000000000000000e5 +2342 3 27 40 -0.26214400000000000000e6 +2342 3 28 41 -0.52428800000000000000e6 +2342 3 37 50 -0.13107200000000000000e6 +2342 4 2 30 -0.26214400000000000000e6 +2342 4 4 32 0.13107200000000000000e6 +2342 4 6 34 -0.26214400000000000000e6 +2342 4 16 28 -0.13107200000000000000e6 +2342 4 17 29 -0.13107200000000000000e6 +2342 4 20 32 -0.13107200000000000000e6 +2343 1 2 5 0.32768000000000000000e5 +2343 1 2 9 -0.65536000000000000000e5 +2343 1 2 25 -0.32768000000000000000e5 +2343 1 8 23 0.65536000000000000000e5 +2343 3 2 2 0.65536000000000000000e5 +2343 3 2 3 0.32768000000000000000e5 +2343 4 2 2 0.65536000000000000000e5 +2344 1 2 5 -0.65536000000000000000e5 +2344 1 2 25 0.65536000000000000000e5 +2344 3 2 4 0.65536000000000000000e5 +2345 3 1 6 -0.65536000000000000000e5 +2345 3 2 5 0.65536000000000000000e5 +2346 1 1 48 -0.65536000000000000000e5 +2346 1 2 5 0.65536000000000000000e5 +2346 1 2 25 -0.65536000000000000000e5 +2346 1 2 49 -0.65536000000000000000e5 +2346 1 4 11 0.13107200000000000000e6 +2346 1 9 40 -0.13107200000000000000e6 +2346 1 12 43 0.52428800000000000000e6 +2346 1 23 38 -0.65536000000000000000e5 +2346 1 26 41 0.13107200000000000000e6 +2346 1 28 43 -0.26214400000000000000e6 +2346 1 32 47 -0.52428800000000000000e6 +2346 2 2 32 -0.65536000000000000000e5 +2346 2 3 9 0.13107200000000000000e6 +2346 2 16 30 -0.13107200000000000000e6 +2346 2 20 34 -0.26214400000000000000e6 +2346 3 1 6 0.65536000000000000000e5 +2346 3 1 30 0.13107200000000000000e6 +2346 3 2 6 0.65536000000000000000e5 +2346 3 2 15 -0.26214400000000000000e6 +2346 3 3 32 -0.26214400000000000000e6 +2346 3 4 9 0.13107200000000000000e6 +2346 3 10 23 0.13107200000000000000e6 +2346 3 22 35 -0.52428800000000000000e6 +2346 3 28 41 -0.52428800000000000000e6 +2346 4 1 5 0.65536000000000000000e5 +2346 4 2 30 -0.13107200000000000000e6 +2346 4 6 34 -0.26214400000000000000e6 +2347 1 2 9 -0.65536000000000000000e5 +2347 1 8 23 0.65536000000000000000e5 +2347 3 2 8 0.65536000000000000000e5 +2348 1 1 48 0.65536000000000000000e5 +2348 1 2 9 0.65536000000000000000e5 +2348 1 2 33 0.26214400000000000000e6 +2348 1 2 49 0.65536000000000000000e5 +2348 1 3 34 -0.26214400000000000000e6 +2348 1 4 11 -0.65536000000000000000e5 +2348 1 8 39 0.65536000000000000000e5 +2348 1 9 40 0.65536000000000000000e5 +2348 1 10 41 0.13107200000000000000e6 +2348 1 11 42 -0.13107200000000000000e6 +2348 1 12 43 -0.52428800000000000000e6 +2348 1 23 38 0.65536000000000000000e5 +2348 1 26 41 -0.65536000000000000000e5 +2348 1 28 43 0.26214400000000000000e6 +2348 1 32 47 0.39321600000000000000e6 +2348 1 33 48 0.13107200000000000000e6 +2348 2 2 8 0.65536000000000000000e5 +2348 2 2 32 0.65536000000000000000e5 +2348 2 3 9 -0.65536000000000000000e5 +2348 2 7 21 0.13107200000000000000e6 +2348 2 12 26 0.13107200000000000000e6 +2348 2 16 30 0.65536000000000000000e5 +2348 2 20 34 0.13107200000000000000e6 +2348 3 1 14 -0.13107200000000000000e6 +2348 3 1 30 -0.65536000000000000000e5 +2348 3 2 9 0.65536000000000000000e5 +2348 3 2 15 0.13107200000000000000e6 +2348 3 3 32 0.26214400000000000000e6 +2348 3 4 9 -0.65536000000000000000e5 +2348 3 8 37 0.65536000000000000000e5 +2348 3 10 23 -0.13107200000000000000e6 +2348 3 13 42 0.26214400000000000000e6 +2348 3 22 35 0.26214400000000000000e6 +2348 3 28 41 0.39321600000000000000e6 +2348 3 29 42 0.13107200000000000000e6 +2348 4 2 30 0.65536000000000000000e5 +2348 4 3 31 -0.13107200000000000000e6 +2348 4 6 18 -0.65536000000000000000e5 +2348 4 6 34 0.13107200000000000000e6 +2349 1 1 48 -0.32768000000000000000e5 +2349 1 2 49 -0.32768000000000000000e5 +2349 1 4 11 0.65536000000000000000e5 +2349 1 9 40 -0.65536000000000000000e5 +2349 1 12 43 0.26214400000000000000e6 +2349 1 23 38 -0.32768000000000000000e5 +2349 1 26 41 0.65536000000000000000e5 +2349 1 28 43 -0.13107200000000000000e6 +2349 1 32 47 -0.26214400000000000000e6 +2349 2 2 32 -0.32768000000000000000e5 +2349 2 3 9 0.65536000000000000000e5 +2349 2 16 30 -0.65536000000000000000e5 +2349 2 20 34 -0.13107200000000000000e6 +2349 3 1 30 0.65536000000000000000e5 +2349 3 2 10 0.65536000000000000000e5 +2349 3 2 15 -0.13107200000000000000e6 +2349 3 3 32 -0.13107200000000000000e6 +2349 3 4 9 0.65536000000000000000e5 +2349 3 10 23 0.65536000000000000000e5 +2349 3 22 35 -0.26214400000000000000e6 +2349 3 28 41 -0.26214400000000000000e6 +2349 4 2 30 -0.65536000000000000000e5 +2349 4 6 34 -0.13107200000000000000e6 +2350 3 2 11 0.65536000000000000000e5 +2350 3 4 9 -0.65536000000000000000e5 +2351 1 1 48 0.32768000000000000000e5 +2351 1 2 33 0.13107200000000000000e6 +2351 1 2 49 0.32768000000000000000e5 +2351 1 3 34 -0.13107200000000000000e6 +2351 1 4 11 -0.32768000000000000000e5 +2351 1 8 23 0.32768000000000000000e5 +2351 1 8 39 0.32768000000000000000e5 +2351 1 9 40 0.32768000000000000000e5 +2351 1 10 41 0.65536000000000000000e5 +2351 1 11 42 -0.65536000000000000000e5 +2351 1 12 43 -0.26214400000000000000e6 +2351 1 23 38 0.32768000000000000000e5 +2351 1 26 41 -0.32768000000000000000e5 +2351 1 28 43 0.13107200000000000000e6 +2351 1 32 47 0.19660800000000000000e6 +2351 1 33 48 0.65536000000000000000e5 +2351 2 2 8 0.32768000000000000000e5 +2351 2 2 32 0.32768000000000000000e5 +2351 2 3 9 -0.32768000000000000000e5 +2351 2 7 21 0.65536000000000000000e5 +2351 2 12 26 0.65536000000000000000e5 +2351 2 16 30 0.32768000000000000000e5 +2351 2 20 34 0.65536000000000000000e5 +2351 3 1 14 -0.65536000000000000000e5 +2351 3 1 30 -0.32768000000000000000e5 +2351 3 2 7 -0.32768000000000000000e5 +2351 3 2 12 0.65536000000000000000e5 +2351 3 2 15 0.65536000000000000000e5 +2351 3 3 32 0.13107200000000000000e6 +2351 3 4 9 -0.32768000000000000000e5 +2351 3 8 37 0.32768000000000000000e5 +2351 3 10 23 -0.65536000000000000000e5 +2351 3 13 42 0.13107200000000000000e6 +2351 3 22 35 0.13107200000000000000e6 +2351 3 28 41 0.19660800000000000000e6 +2351 3 29 42 0.65536000000000000000e5 +2351 4 2 6 -0.32768000000000000000e5 +2351 4 2 30 0.32768000000000000000e5 +2351 4 3 31 -0.65536000000000000000e5 +2351 4 6 18 -0.32768000000000000000e5 +2351 4 6 34 0.65536000000000000000e5 +2352 3 1 14 -0.65536000000000000000e5 +2352 3 2 13 0.65536000000000000000e5 +2353 2 4 10 0.65536000000000000000e5 +2353 2 7 21 -0.65536000000000000000e5 +2353 3 1 14 0.65536000000000000000e5 +2353 3 2 14 0.65536000000000000000e5 +2353 3 2 15 0.65536000000000000000e5 +2353 3 3 16 -0.13107200000000000000e6 +2354 1 2 17 -0.65536000000000000000e5 +2354 1 16 23 0.65536000000000000000e5 +2354 3 2 16 0.65536000000000000000e5 +2355 3 2 17 0.65536000000000000000e5 +2355 3 3 16 -0.65536000000000000000e5 +2356 1 3 18 -0.65536000000000000000e5 +2356 1 12 43 0.65536000000000000000e5 +2356 3 2 18 0.65536000000000000000e5 +2356 3 14 27 0.65536000000000000000e5 +2357 1 2 17 -0.32768000000000000000e5 +2357 1 3 34 -0.32768000000000000000e5 +2357 1 4 19 -0.65536000000000000000e5 +2357 1 4 35 -0.32768000000000000000e5 +2357 1 12 43 -0.65536000000000000000e5 +2357 1 14 45 -0.65536000000000000000e5 +2357 1 17 48 0.32768000000000000000e5 +2357 1 18 49 0.32768000000000000000e5 +2357 1 20 27 0.13107200000000000000e6 +2357 2 6 12 -0.32768000000000000000e5 +2357 2 9 23 -0.32768000000000000000e5 +2357 2 10 24 -0.65536000000000000000e5 +2357 2 14 28 0.32768000000000000000e5 +2357 3 2 19 0.65536000000000000000e5 +2357 3 4 17 0.32768000000000000000e5 +2357 3 5 34 -0.32768000000000000000e5 +2357 3 13 42 0.32768000000000000000e5 +2357 3 14 27 -0.65536000000000000000e5 +2357 3 14 43 0.32768000000000000000e5 +2357 4 2 14 0.32768000000000000000e5 +2358 1 3 18 -0.32768000000000000000e5 +2358 1 12 43 0.32768000000000000000e5 +2358 3 2 20 0.65536000000000000000e5 +2358 3 3 16 -0.32768000000000000000e5 +2358 3 4 17 -0.32768000000000000000e5 +2358 3 14 27 0.32768000000000000000e5 +2358 4 2 14 -0.32768000000000000000e5 +2359 3 2 21 0.65536000000000000000e5 +2359 3 7 20 -0.65536000000000000000e5 +2360 1 1 24 -0.65536000000000000000e5 +2360 1 1 40 -0.65536000000000000000e5 +2360 1 22 37 0.65536000000000000000e5 +2360 1 23 38 0.65536000000000000000e5 +2360 3 1 38 -0.65536000000000000000e5 +2360 3 2 22 0.65536000000000000000e5 +2360 3 22 27 0.13107200000000000000e6 +2360 4 16 16 -0.13107200000000000000e6 +2361 1 1 40 0.65536000000000000000e5 +2361 1 2 25 -0.65536000000000000000e5 +2361 3 2 24 0.65536000000000000000e5 +2362 1 2 25 0.65536000000000000000e5 +2362 1 2 33 -0.26214400000000000000e6 +2362 1 11 42 0.26214400000000000000e6 +2362 1 12 43 0.52428800000000000000e6 +2362 1 23 38 -0.65536000000000000000e5 +2362 1 28 43 -0.26214400000000000000e6 +2362 1 32 47 -0.26214400000000000000e6 +2362 1 33 48 -0.26214400000000000000e6 +2362 2 2 32 -0.65536000000000000000e5 +2362 2 3 17 0.65536000000000000000e5 +2362 2 12 26 -0.26214400000000000000e6 +2362 3 1 30 0.13107200000000000000e6 +2362 3 1 38 0.65536000000000000000e5 +2362 3 2 23 0.65536000000000000000e5 +2362 3 2 25 0.65536000000000000000e5 +2362 3 2 39 0.65536000000000000000e5 +2362 3 8 37 -0.13107200000000000000e6 +2362 3 10 23 0.13107200000000000000e6 +2362 3 13 42 -0.52428800000000000000e6 +2362 3 28 41 -0.26214400000000000000e6 +2362 3 29 42 -0.26214400000000000000e6 +2362 4 3 31 0.26214400000000000000e6 +2362 4 6 18 0.13107200000000000000e6 +2363 1 1 40 -0.65536000000000000000e5 +2363 1 2 33 0.26214400000000000000e6 +2363 1 11 42 -0.26214400000000000000e6 +2363 1 12 43 -0.52428800000000000000e6 +2363 1 23 38 0.65536000000000000000e5 +2363 1 28 43 0.26214400000000000000e6 +2363 1 32 47 0.26214400000000000000e6 +2363 1 33 48 0.26214400000000000000e6 +2363 2 2 32 0.65536000000000000000e5 +2363 2 3 17 -0.65536000000000000000e5 +2363 2 12 26 0.26214400000000000000e6 +2363 3 1 30 -0.26214400000000000000e6 +2363 3 1 38 -0.65536000000000000000e5 +2363 3 2 23 -0.65536000000000000000e5 +2363 3 2 26 0.65536000000000000000e5 +2363 3 2 39 -0.65536000000000000000e5 +2363 3 8 37 0.13107200000000000000e6 +2363 3 10 23 -0.13107200000000000000e6 +2363 3 13 42 0.52428800000000000000e6 +2363 3 28 41 0.26214400000000000000e6 +2363 3 29 42 0.26214400000000000000e6 +2363 4 3 31 -0.26214400000000000000e6 +2363 4 4 16 0.65536000000000000000e5 +2363 4 6 18 -0.13107200000000000000e6 +2364 1 7 38 0.65536000000000000000e5 +2364 1 8 23 -0.65536000000000000000e5 +2364 3 2 27 0.65536000000000000000e5 +2365 1 2 33 -0.13107200000000000000e6 +2365 1 11 42 0.13107200000000000000e6 +2365 1 12 43 0.26214400000000000000e6 +2365 1 28 43 -0.13107200000000000000e6 +2365 1 32 47 -0.13107200000000000000e6 +2365 1 33 48 -0.13107200000000000000e6 +2365 2 12 26 -0.13107200000000000000e6 +2365 3 1 30 0.65536000000000000000e5 +2365 3 2 28 0.65536000000000000000e5 +2365 3 10 23 0.65536000000000000000e5 +2365 3 13 42 -0.26214400000000000000e6 +2365 3 28 41 -0.13107200000000000000e6 +2365 3 29 42 -0.13107200000000000000e6 +2365 4 3 31 0.13107200000000000000e6 +2365 4 6 18 0.65536000000000000000e5 +2366 3 1 30 -0.65536000000000000000e5 +2366 3 2 29 0.65536000000000000000e5 +2367 3 2 30 0.65536000000000000000e5 +2367 3 10 23 -0.65536000000000000000e5 +2368 1 2 33 -0.65536000000000000000e5 +2368 1 11 42 0.65536000000000000000e5 +2368 1 12 43 0.13107200000000000000e6 +2368 1 28 43 -0.65536000000000000000e5 +2368 1 32 47 -0.65536000000000000000e5 +2368 1 33 48 -0.65536000000000000000e5 +2368 2 12 26 -0.65536000000000000000e5 +2368 3 2 32 0.65536000000000000000e5 +2368 3 13 42 -0.13107200000000000000e6 +2368 3 28 41 -0.65536000000000000000e5 +2368 3 29 42 -0.65536000000000000000e5 +2368 4 3 31 0.65536000000000000000e5 +2369 3 2 33 0.65536000000000000000e5 +2369 3 3 32 -0.65536000000000000000e5 +2370 1 3 34 -0.65536000000000000000e5 +2370 1 16 47 0.65536000000000000000e5 +2370 3 2 34 0.65536000000000000000e5 +2370 3 12 41 0.65536000000000000000e5 +2371 3 2 35 0.65536000000000000000e5 +2371 3 14 27 -0.65536000000000000000e5 +2372 1 3 18 0.32768000000000000000e5 +2372 1 4 19 -0.65536000000000000000e5 +2372 1 12 43 -0.32768000000000000000e5 +2372 1 13 44 0.65536000000000000000e5 +2372 3 2 36 0.65536000000000000000e5 +2372 3 3 16 0.32768000000000000000e5 +2372 3 4 17 0.32768000000000000000e5 +2372 3 14 27 -0.32768000000000000000e5 +2372 4 2 14 0.32768000000000000000e5 +2373 3 1 38 -0.65536000000000000000e5 +2373 3 2 37 0.65536000000000000000e5 +2374 1 1 40 -0.65536000000000000000e5 +2374 1 23 38 0.65536000000000000000e5 +2374 3 2 38 0.65536000000000000000e5 +2375 1 6 37 -0.65536000000000000000e5 +2375 1 24 39 0.65536000000000000000e5 +2375 3 2 40 0.65536000000000000000e5 +2376 3 2 41 0.65536000000000000000e5 +2376 3 8 37 -0.65536000000000000000e5 +2377 1 9 40 0.65536000000000000000e5 +2377 1 10 41 -0.13107200000000000000e6 +2377 1 26 41 -0.65536000000000000000e5 +2377 1 32 47 0.13107200000000000000e6 +2377 3 2 42 0.65536000000000000000e5 +2377 3 9 38 0.65536000000000000000e5 +2377 3 28 41 0.13107200000000000000e6 +2377 4 2 30 0.65536000000000000000e5 +2378 3 2 43 0.65536000000000000000e5 +2378 3 9 38 -0.65536000000000000000e5 +2379 1 11 42 -0.65536000000000000000e5 +2379 1 33 48 0.65536000000000000000e5 +2379 2 12 26 0.65536000000000000000e5 +2379 2 20 34 -0.65536000000000000000e5 +2379 3 2 44 0.65536000000000000000e5 +2379 3 13 42 0.13107200000000000000e6 +2379 3 22 35 -0.13107200000000000000e6 +2379 3 29 42 0.65536000000000000000e5 +2379 4 3 31 -0.65536000000000000000e5 +2379 4 6 34 -0.65536000000000000000e5 +2380 1 10 41 -0.65536000000000000000e5 +2380 1 32 47 0.65536000000000000000e5 +2380 3 2 45 0.65536000000000000000e5 +2380 3 28 41 0.65536000000000000000e5 +2381 3 2 46 0.65536000000000000000e5 +2381 3 22 35 -0.65536000000000000000e5 +2382 3 2 48 0.65536000000000000000e5 +2382 3 24 37 -0.65536000000000000000e5 +2383 1 6 53 -0.65536000000000000000e5 +2383 1 25 40 0.65536000000000000000e5 +2383 3 2 49 0.65536000000000000000e5 +2383 3 25 38 0.65536000000000000000e5 +2383 3 27 40 -0.13107200000000000000e6 +2383 4 4 32 0.65536000000000000000e5 +2384 1 6 53 0.32768000000000000000e5 +2384 1 25 40 -0.32768000000000000000e5 +2384 3 2 50 0.65536000000000000000e5 +2384 3 24 37 0.32768000000000000000e5 +2384 3 27 40 0.13107200000000000000e6 +2384 3 28 41 -0.13107200000000000000e6 +2384 4 4 32 -0.32768000000000000000e5 +2384 4 16 28 0.32768000000000000000e5 +2384 4 17 29 0.65536000000000000000e5 +2385 1 6 53 -0.32768000000000000000e5 +2385 1 25 40 0.32768000000000000000e5 +2385 3 2 51 0.65536000000000000000e5 +2385 3 24 37 -0.32768000000000000000e5 +2385 3 27 40 -0.65536000000000000000e5 +2385 4 4 32 0.32768000000000000000e5 +2385 4 16 28 -0.32768000000000000000e5 +2386 3 2 52 0.65536000000000000000e5 +2386 3 28 41 -0.65536000000000000000e5 +2387 1 2 49 -0.65536000000000000000e5 +2387 1 6 53 0.65536000000000000000e5 +2387 1 8 39 0.13107200000000000000e6 +2387 1 9 40 0.13107200000000000000e6 +2387 1 10 41 -0.26214400000000000000e6 +2387 1 22 53 -0.65536000000000000000e5 +2387 1 23 54 -0.65536000000000000000e5 +2387 1 24 55 -0.13107200000000000000e6 +2387 1 25 40 -0.65536000000000000000e5 +2387 1 37 52 0.26214400000000000000e6 +2387 2 26 32 -0.65536000000000000000e5 +2387 3 2 53 0.65536000000000000000e5 +2387 3 9 38 0.13107200000000000000e6 +2387 3 22 51 0.13107200000000000000e6 +2387 3 24 37 0.13107200000000000000e6 +2387 3 27 40 0.13107200000000000000e6 +2387 4 2 30 0.13107200000000000000e6 +2387 4 4 32 -0.65536000000000000000e5 +2387 4 16 28 0.65536000000000000000e5 +2387 4 17 29 0.13107200000000000000e6 +2387 4 20 32 0.13107200000000000000e6 +2388 1 6 53 0.65536000000000000000e5 +2388 1 23 54 0.65536000000000000000e5 +2388 1 24 39 -0.65536000000000000000e5 +2388 1 25 40 -0.65536000000000000000e5 +2388 3 2 54 0.65536000000000000000e5 +2388 3 25 38 -0.65536000000000000000e5 +2388 3 27 40 0.13107200000000000000e6 +2388 4 4 32 -0.65536000000000000000e5 +2389 3 2 55 0.65536000000000000000e5 +2389 3 22 51 -0.65536000000000000000e5 +2390 1 23 54 -0.65536000000000000000e5 +2390 1 38 53 0.65536000000000000000e5 +2390 3 2 56 0.65536000000000000000e5 +2391 1 2 5 -0.32768000000000000000e5 +2391 1 2 25 0.32768000000000000000e5 +2391 3 3 3 0.65536000000000000000e5 +2392 3 1 6 -0.65536000000000000000e5 +2392 3 3 4 0.65536000000000000000e5 +2393 1 1 48 -0.65536000000000000000e5 +2393 1 2 5 0.65536000000000000000e5 +2393 1 2 25 -0.65536000000000000000e5 +2393 1 2 49 -0.65536000000000000000e5 +2393 1 4 11 0.13107200000000000000e6 +2393 1 9 40 -0.13107200000000000000e6 +2393 1 12 43 0.52428800000000000000e6 +2393 1 23 38 -0.65536000000000000000e5 +2393 1 26 41 0.13107200000000000000e6 +2393 1 28 43 -0.26214400000000000000e6 +2393 1 32 47 -0.52428800000000000000e6 +2393 2 2 32 -0.65536000000000000000e5 +2393 2 3 9 0.13107200000000000000e6 +2393 2 16 30 -0.13107200000000000000e6 +2393 2 20 34 -0.26214400000000000000e6 +2393 3 1 6 0.65536000000000000000e5 +2393 3 1 30 0.13107200000000000000e6 +2393 3 2 15 -0.26214400000000000000e6 +2393 3 3 5 0.65536000000000000000e5 +2393 3 3 32 -0.26214400000000000000e6 +2393 3 4 9 0.13107200000000000000e6 +2393 3 10 23 0.13107200000000000000e6 +2393 3 22 35 -0.52428800000000000000e6 +2393 3 28 41 -0.52428800000000000000e6 +2393 4 1 5 0.65536000000000000000e5 +2393 4 2 30 -0.13107200000000000000e6 +2393 4 6 34 -0.26214400000000000000e6 +2394 3 3 6 0.65536000000000000000e5 +2394 3 4 5 -0.65536000000000000000e5 +2395 1 2 9 -0.65536000000000000000e5 +2395 1 8 23 0.65536000000000000000e5 +2395 3 3 7 0.65536000000000000000e5 +2396 1 1 48 0.65536000000000000000e5 +2396 1 2 9 0.65536000000000000000e5 +2396 1 2 33 0.26214400000000000000e6 +2396 1 2 49 0.65536000000000000000e5 +2396 1 3 34 -0.26214400000000000000e6 +2396 1 4 11 -0.65536000000000000000e5 +2396 1 8 39 0.65536000000000000000e5 +2396 1 9 40 0.65536000000000000000e5 +2396 1 10 41 0.13107200000000000000e6 +2396 1 11 42 -0.13107200000000000000e6 +2396 1 12 43 -0.52428800000000000000e6 +2396 1 23 38 0.65536000000000000000e5 +2396 1 26 41 -0.65536000000000000000e5 +2396 1 28 43 0.26214400000000000000e6 +2396 1 32 47 0.39321600000000000000e6 +2396 1 33 48 0.13107200000000000000e6 +2396 2 2 8 0.65536000000000000000e5 +2396 2 2 32 0.65536000000000000000e5 +2396 2 3 9 -0.65536000000000000000e5 +2396 2 7 21 0.13107200000000000000e6 +2396 2 12 26 0.13107200000000000000e6 +2396 2 16 30 0.65536000000000000000e5 +2396 2 20 34 0.13107200000000000000e6 +2396 3 1 14 -0.13107200000000000000e6 +2396 3 1 30 -0.65536000000000000000e5 +2396 3 2 15 0.13107200000000000000e6 +2396 3 3 8 0.65536000000000000000e5 +2396 3 3 32 0.26214400000000000000e6 +2396 3 4 9 -0.65536000000000000000e5 +2396 3 8 37 0.65536000000000000000e5 +2396 3 10 23 -0.13107200000000000000e6 +2396 3 13 42 0.26214400000000000000e6 +2396 3 22 35 0.26214400000000000000e6 +2396 3 28 41 0.39321600000000000000e6 +2396 3 29 42 0.13107200000000000000e6 +2396 4 2 30 0.65536000000000000000e5 +2396 4 3 31 -0.13107200000000000000e6 +2396 4 6 18 -0.65536000000000000000e5 +2396 4 6 34 0.13107200000000000000e6 +2397 1 1 48 -0.32768000000000000000e5 +2397 1 2 49 -0.32768000000000000000e5 +2397 1 4 11 0.65536000000000000000e5 +2397 1 9 40 -0.65536000000000000000e5 +2397 1 12 43 0.26214400000000000000e6 +2397 1 23 38 -0.32768000000000000000e5 +2397 1 26 41 0.65536000000000000000e5 +2397 1 28 43 -0.13107200000000000000e6 +2397 1 32 47 -0.26214400000000000000e6 +2397 2 2 32 -0.32768000000000000000e5 +2397 2 3 9 0.65536000000000000000e5 +2397 2 16 30 -0.65536000000000000000e5 +2397 2 20 34 -0.13107200000000000000e6 +2397 3 1 30 0.65536000000000000000e5 +2397 3 2 15 -0.13107200000000000000e6 +2397 3 3 9 0.65536000000000000000e5 +2397 3 3 32 -0.13107200000000000000e6 +2397 3 4 9 0.65536000000000000000e5 +2397 3 10 23 0.65536000000000000000e5 +2397 3 22 35 -0.26214400000000000000e6 +2397 3 28 41 -0.26214400000000000000e6 +2397 4 2 30 -0.65536000000000000000e5 +2397 4 6 34 -0.13107200000000000000e6 +2398 3 3 10 0.65536000000000000000e5 +2398 3 4 9 -0.65536000000000000000e5 +2399 1 4 11 -0.65536000000000000000e5 +2399 1 10 25 0.65536000000000000000e5 +2399 3 3 11 0.65536000000000000000e5 +2400 3 1 14 -0.65536000000000000000e5 +2400 3 3 12 0.65536000000000000000e5 +2401 2 4 10 0.65536000000000000000e5 +2401 2 7 21 -0.65536000000000000000e5 +2401 3 1 14 0.65536000000000000000e5 +2401 3 2 15 0.65536000000000000000e5 +2401 3 3 13 0.65536000000000000000e5 +2401 3 3 16 -0.13107200000000000000e6 +2402 3 2 15 -0.65536000000000000000e5 +2402 3 3 14 0.65536000000000000000e5 +2403 1 2 33 -0.65536000000000000000e5 +2403 1 6 13 -0.65536000000000000000e5 +2403 1 10 41 -0.65536000000000000000e5 +2403 1 12 43 0.13107200000000000000e6 +2403 2 12 26 -0.65536000000000000000e5 +2403 3 3 15 0.65536000000000000000e5 +2403 3 3 32 -0.65536000000000000000e5 +2403 3 14 27 0.13107200000000000000e6 +2403 4 8 20 -0.65536000000000000000e5 +2404 1 3 18 -0.65536000000000000000e5 +2404 1 12 43 0.65536000000000000000e5 +2404 3 3 17 0.65536000000000000000e5 +2404 3 14 27 0.65536000000000000000e5 +2405 3 3 18 0.65536000000000000000e5 +2405 3 4 17 -0.65536000000000000000e5 +2406 1 3 18 -0.32768000000000000000e5 +2406 1 12 43 0.32768000000000000000e5 +2406 3 3 16 -0.32768000000000000000e5 +2406 3 3 19 0.65536000000000000000e5 +2406 3 4 17 -0.32768000000000000000e5 +2406 3 14 27 0.32768000000000000000e5 +2406 4 2 14 -0.32768000000000000000e5 +2407 1 4 35 0.32768000000000000000e5 +2407 1 10 17 -0.65536000000000000000e5 +2407 1 12 43 0.32768000000000000000e5 +2407 1 14 45 0.65536000000000000000e5 +2407 1 17 48 -0.32768000000000000000e5 +2407 1 18 49 -0.32768000000000000000e5 +2407 2 9 23 0.32768000000000000000e5 +2407 2 14 28 -0.32768000000000000000e5 +2407 3 3 20 0.65536000000000000000e5 +2407 3 5 34 0.32768000000000000000e5 +2407 3 13 42 -0.32768000000000000000e5 +2407 3 14 27 0.32768000000000000000e5 +2407 3 14 43 -0.32768000000000000000e5 +2408 1 3 18 -0.16384000000000000000e5 +2408 1 4 35 0.16384000000000000000e5 +2408 1 5 20 -0.32768000000000000000e5 +2408 1 5 36 0.32768000000000000000e5 +2408 1 10 17 -0.32768000000000000000e5 +2408 1 12 43 0.32768000000000000000e5 +2408 1 14 45 0.32768000000000000000e5 +2408 1 17 48 -0.16384000000000000000e5 +2408 1 18 49 -0.16384000000000000000e5 +2408 2 9 23 0.16384000000000000000e5 +2408 2 14 28 -0.16384000000000000000e5 +2408 3 3 16 -0.16384000000000000000e5 +2408 3 3 21 0.65536000000000000000e5 +2408 3 4 17 -0.16384000000000000000e5 +2408 3 5 34 0.16384000000000000000e5 +2408 3 13 42 -0.16384000000000000000e5 +2408 3 14 27 0.32768000000000000000e5 +2408 3 14 43 -0.16384000000000000000e5 +2408 4 2 14 -0.16384000000000000000e5 +2408 4 3 15 -0.32768000000000000000e5 +2409 3 2 23 -0.65536000000000000000e5 +2409 3 3 22 0.65536000000000000000e5 +2410 1 1 40 0.65536000000000000000e5 +2410 1 2 25 -0.65536000000000000000e5 +2410 3 3 23 0.65536000000000000000e5 +2411 1 2 25 0.65536000000000000000e5 +2411 1 2 33 -0.26214400000000000000e6 +2411 1 11 42 0.26214400000000000000e6 +2411 1 12 43 0.52428800000000000000e6 +2411 1 23 38 -0.65536000000000000000e5 +2411 1 28 43 -0.26214400000000000000e6 +2411 1 32 47 -0.26214400000000000000e6 +2411 1 33 48 -0.26214400000000000000e6 +2411 2 2 32 -0.65536000000000000000e5 +2411 2 3 17 0.65536000000000000000e5 +2411 2 12 26 -0.26214400000000000000e6 +2411 3 1 30 0.13107200000000000000e6 +2411 3 1 38 0.65536000000000000000e5 +2411 3 2 23 0.65536000000000000000e5 +2411 3 2 39 0.65536000000000000000e5 +2411 3 3 24 0.65536000000000000000e5 +2411 3 8 37 -0.13107200000000000000e6 +2411 3 10 23 0.13107200000000000000e6 +2411 3 13 42 -0.52428800000000000000e6 +2411 3 28 41 -0.26214400000000000000e6 +2411 3 29 42 -0.26214400000000000000e6 +2411 4 3 31 0.26214400000000000000e6 +2411 4 6 18 0.13107200000000000000e6 +2412 1 1 40 -0.65536000000000000000e5 +2412 1 2 33 0.26214400000000000000e6 +2412 1 11 42 -0.26214400000000000000e6 +2412 1 12 43 -0.52428800000000000000e6 +2412 1 23 38 0.65536000000000000000e5 +2412 1 28 43 0.26214400000000000000e6 +2412 1 32 47 0.26214400000000000000e6 +2412 1 33 48 0.26214400000000000000e6 +2412 2 2 32 0.65536000000000000000e5 +2412 2 3 17 -0.65536000000000000000e5 +2412 2 12 26 0.26214400000000000000e6 +2412 3 1 30 -0.26214400000000000000e6 +2412 3 1 38 -0.65536000000000000000e5 +2412 3 2 23 -0.65536000000000000000e5 +2412 3 2 39 -0.65536000000000000000e5 +2412 3 3 25 0.65536000000000000000e5 +2412 3 8 37 0.13107200000000000000e6 +2412 3 10 23 -0.13107200000000000000e6 +2412 3 13 42 0.52428800000000000000e6 +2412 3 28 41 0.26214400000000000000e6 +2412 3 29 42 0.26214400000000000000e6 +2412 4 3 31 -0.26214400000000000000e6 +2412 4 4 16 0.65536000000000000000e5 +2412 4 6 18 -0.13107200000000000000e6 +2413 1 1 40 0.65536000000000000000e5 +2413 1 2 25 -0.65536000000000000000e5 +2413 1 6 37 0.65536000000000000000e5 +2413 1 24 39 -0.65536000000000000000e5 +2413 2 3 33 -0.65536000000000000000e5 +2413 2 4 18 0.65536000000000000000e5 +2413 3 1 30 0.13107200000000000000e6 +2413 3 2 39 0.65536000000000000000e5 +2413 3 3 26 0.65536000000000000000e5 +2413 3 3 40 0.65536000000000000000e5 +2413 3 9 38 -0.13107200000000000000e6 +2413 3 10 23 -0.13107200000000000000e6 +2413 4 4 16 -0.65536000000000000000e5 +2414 1 2 33 -0.13107200000000000000e6 +2414 1 11 42 0.13107200000000000000e6 +2414 1 12 43 0.26214400000000000000e6 +2414 1 28 43 -0.13107200000000000000e6 +2414 1 32 47 -0.13107200000000000000e6 +2414 1 33 48 -0.13107200000000000000e6 +2414 2 12 26 -0.13107200000000000000e6 +2414 3 1 30 0.65536000000000000000e5 +2414 3 3 27 0.65536000000000000000e5 +2414 3 10 23 0.65536000000000000000e5 +2414 3 13 42 -0.26214400000000000000e6 +2414 3 28 41 -0.13107200000000000000e6 +2414 3 29 42 -0.13107200000000000000e6 +2414 4 3 31 0.13107200000000000000e6 +2414 4 6 18 0.65536000000000000000e5 +2415 3 1 30 -0.65536000000000000000e5 +2415 3 3 28 0.65536000000000000000e5 +2416 3 3 29 0.65536000000000000000e5 +2416 3 10 23 -0.65536000000000000000e5 +2417 1 9 40 0.65536000000000000000e5 +2417 1 10 25 -0.65536000000000000000e5 +2417 3 3 30 0.65536000000000000000e5 +2418 1 2 33 -0.65536000000000000000e5 +2418 1 11 42 0.65536000000000000000e5 +2418 1 12 43 0.13107200000000000000e6 +2418 1 28 43 -0.65536000000000000000e5 +2418 1 32 47 -0.65536000000000000000e5 +2418 1 33 48 -0.65536000000000000000e5 +2418 2 12 26 -0.65536000000000000000e5 +2418 3 3 31 0.65536000000000000000e5 +2418 3 13 42 -0.13107200000000000000e6 +2418 3 28 41 -0.65536000000000000000e5 +2418 3 29 42 -0.65536000000000000000e5 +2418 4 3 31 0.65536000000000000000e5 +2419 1 2 33 0.65536000000000000000e5 +2419 1 11 42 -0.65536000000000000000e5 +2419 1 12 43 -0.13107200000000000000e6 +2419 1 28 43 0.65536000000000000000e5 +2419 1 32 47 0.65536000000000000000e5 +2419 1 33 48 0.65536000000000000000e5 +2419 2 12 26 0.65536000000000000000e5 +2419 3 3 32 0.65536000000000000000e5 +2419 3 3 33 0.65536000000000000000e5 +2419 3 13 42 0.13107200000000000000e6 +2419 3 14 27 -0.13107200000000000000e6 +2419 3 28 41 0.65536000000000000000e5 +2419 3 29 42 0.65536000000000000000e5 +2419 4 3 31 -0.65536000000000000000e5 +2419 4 8 20 0.65536000000000000000e5 +2420 3 3 34 0.65536000000000000000e5 +2420 3 14 27 -0.65536000000000000000e5 +2421 1 4 35 -0.65536000000000000000e5 +2421 1 17 48 0.65536000000000000000e5 +2421 3 3 35 0.65536000000000000000e5 +2421 3 13 42 0.65536000000000000000e5 +2422 3 3 36 0.65536000000000000000e5 +2422 3 16 29 -0.65536000000000000000e5 +2423 1 1 40 -0.65536000000000000000e5 +2423 1 23 38 0.65536000000000000000e5 +2423 3 3 37 0.65536000000000000000e5 +2424 3 2 39 -0.65536000000000000000e5 +2424 3 3 38 0.65536000000000000000e5 +2425 1 6 37 -0.65536000000000000000e5 +2425 1 24 39 0.65536000000000000000e5 +2425 3 3 39 0.65536000000000000000e5 +2426 1 9 40 0.65536000000000000000e5 +2426 1 10 41 -0.13107200000000000000e6 +2426 1 26 41 -0.65536000000000000000e5 +2426 1 32 47 0.13107200000000000000e6 +2426 3 3 41 0.65536000000000000000e5 +2426 3 9 38 0.65536000000000000000e5 +2426 3 28 41 0.13107200000000000000e6 +2426 4 2 30 0.65536000000000000000e5 +2427 3 3 42 0.65536000000000000000e5 +2427 3 9 38 -0.65536000000000000000e5 +2428 1 9 40 -0.65536000000000000000e5 +2428 1 26 41 0.65536000000000000000e5 +2428 3 3 43 0.65536000000000000000e5 +2429 1 10 41 -0.65536000000000000000e5 +2429 1 32 47 0.65536000000000000000e5 +2429 3 3 44 0.65536000000000000000e5 +2429 3 28 41 0.65536000000000000000e5 +2430 1 10 41 0.65536000000000000000e5 +2430 1 11 42 0.65536000000000000000e5 +2430 1 32 47 -0.65536000000000000000e5 +2430 1 33 48 -0.65536000000000000000e5 +2430 3 3 45 0.65536000000000000000e5 +2430 3 13 42 -0.13107200000000000000e6 +2430 3 28 41 -0.65536000000000000000e5 +2430 3 29 42 -0.65536000000000000000e5 +2430 4 3 31 0.65536000000000000000e5 +2431 3 3 46 0.65536000000000000000e5 +2431 3 13 42 -0.65536000000000000000e5 +2432 3 3 47 0.65536000000000000000e5 +2432 3 24 37 -0.65536000000000000000e5 +2433 1 6 53 -0.65536000000000000000e5 +2433 1 25 40 0.65536000000000000000e5 +2433 3 3 48 0.65536000000000000000e5 +2433 3 25 38 0.65536000000000000000e5 +2433 3 27 40 -0.13107200000000000000e6 +2433 4 4 32 0.65536000000000000000e5 +2434 3 3 49 0.65536000000000000000e5 +2434 3 25 38 -0.65536000000000000000e5 +2435 1 6 53 -0.32768000000000000000e5 +2435 1 25 40 0.32768000000000000000e5 +2435 3 3 50 0.65536000000000000000e5 +2435 3 24 37 -0.32768000000000000000e5 +2435 3 27 40 -0.65536000000000000000e5 +2435 4 4 32 0.32768000000000000000e5 +2435 4 16 28 -0.32768000000000000000e5 +2436 3 3 51 0.65536000000000000000e5 +2436 3 27 40 -0.65536000000000000000e5 +2437 1 6 53 -0.16384000000000000000e5 +2437 1 25 40 0.16384000000000000000e5 +2437 2 4 34 -0.32768000000000000000e5 +2437 2 21 35 0.32768000000000000000e5 +2437 3 3 52 0.65536000000000000000e5 +2437 3 5 50 -0.32768000000000000000e5 +2437 3 24 37 -0.16384000000000000000e5 +2437 3 27 40 -0.65536000000000000000e5 +2437 4 4 32 0.16384000000000000000e5 +2437 4 7 35 0.32768000000000000000e5 +2437 4 16 28 -0.16384000000000000000e5 +2438 1 6 53 0.65536000000000000000e5 +2438 1 23 54 0.65536000000000000000e5 +2438 1 24 39 -0.65536000000000000000e5 +2438 1 25 40 -0.65536000000000000000e5 +2438 3 3 53 0.65536000000000000000e5 +2438 3 25 38 -0.65536000000000000000e5 +2438 3 27 40 0.13107200000000000000e6 +2438 4 4 32 -0.65536000000000000000e5 +2439 1 1 48 0.65536000000000000000e5 +2439 1 2 49 0.13107200000000000000e6 +2439 1 8 39 0.13107200000000000000e6 +2439 1 9 40 0.13107200000000000000e6 +2439 1 10 41 -0.26214400000000000000e6 +2439 1 12 43 -0.52428800000000000000e6 +2439 1 23 38 0.65536000000000000000e5 +2439 1 24 39 0.65536000000000000000e5 +2439 1 26 41 -0.13107200000000000000e6 +2439 1 28 43 0.26214400000000000000e6 +2439 1 32 47 0.52428800000000000000e6 +2439 1 40 47 0.65536000000000000000e5 +2439 2 2 32 0.65536000000000000000e5 +2439 2 3 33 0.65536000000000000000e5 +2439 2 16 30 0.13107200000000000000e6 +2439 2 20 34 0.26214400000000000000e6 +2439 3 3 54 0.65536000000000000000e5 +2439 3 9 38 0.13107200000000000000e6 +2439 3 22 35 0.52428800000000000000e6 +2439 3 25 38 0.65536000000000000000e5 +2439 3 28 41 0.52428800000000000000e6 +2439 4 2 30 0.13107200000000000000e6 +2439 4 6 34 0.26214400000000000000e6 +2440 1 24 55 0.65536000000000000000e5 +2440 1 26 41 -0.65536000000000000000e5 +2440 3 3 55 0.65536000000000000000e5 +2440 3 27 40 0.65536000000000000000e5 +2441 3 3 56 0.65536000000000000000e5 +2441 3 24 53 -0.65536000000000000000e5 +2442 1 1 48 -0.32768000000000000000e5 +2442 1 2 5 0.32768000000000000000e5 +2442 1 2 25 -0.32768000000000000000e5 +2442 1 2 49 -0.32768000000000000000e5 +2442 1 4 11 0.65536000000000000000e5 +2442 1 9 40 -0.65536000000000000000e5 +2442 1 12 43 0.26214400000000000000e6 +2442 1 23 38 -0.32768000000000000000e5 +2442 1 26 41 0.65536000000000000000e5 +2442 1 28 43 -0.13107200000000000000e6 +2442 1 32 47 -0.26214400000000000000e6 +2442 2 2 32 -0.32768000000000000000e5 +2442 2 3 9 0.65536000000000000000e5 +2442 2 16 30 -0.65536000000000000000e5 +2442 2 20 34 -0.13107200000000000000e6 +2442 3 1 6 0.32768000000000000000e5 +2442 3 1 30 0.65536000000000000000e5 +2442 3 2 15 -0.13107200000000000000e6 +2442 3 3 32 -0.13107200000000000000e6 +2442 3 4 4 0.65536000000000000000e5 +2442 3 4 9 0.65536000000000000000e5 +2442 3 10 23 0.65536000000000000000e5 +2442 3 22 35 -0.26214400000000000000e6 +2442 3 28 41 -0.26214400000000000000e6 +2442 4 1 5 0.32768000000000000000e5 +2442 4 2 30 -0.65536000000000000000e5 +2442 4 6 34 -0.13107200000000000000e6 +2443 1 1 48 0.65536000000000000000e5 +2443 1 2 5 -0.65536000000000000000e5 +2443 1 2 25 0.65536000000000000000e5 +2443 1 2 49 0.65536000000000000000e5 +2443 1 4 11 -0.26214400000000000000e6 +2443 1 9 40 0.13107200000000000000e6 +2443 1 10 25 0.13107200000000000000e6 +2443 1 12 43 -0.52428800000000000000e6 +2443 1 23 38 0.65536000000000000000e5 +2443 1 26 41 -0.13107200000000000000e6 +2443 1 28 43 0.26214400000000000000e6 +2443 1 32 47 0.52428800000000000000e6 +2443 2 2 32 0.65536000000000000000e5 +2443 2 3 9 -0.13107200000000000000e6 +2443 2 16 30 0.13107200000000000000e6 +2443 2 20 34 0.26214400000000000000e6 +2443 3 1 6 -0.65536000000000000000e5 +2443 3 1 30 -0.13107200000000000000e6 +2443 3 2 15 0.26214400000000000000e6 +2443 3 3 32 0.26214400000000000000e6 +2443 3 4 5 0.65536000000000000000e5 +2443 3 4 6 0.65536000000000000000e5 +2443 3 4 9 -0.13107200000000000000e6 +2443 3 10 23 -0.13107200000000000000e6 +2443 3 22 35 0.52428800000000000000e6 +2443 3 28 41 0.52428800000000000000e6 +2443 4 1 5 -0.65536000000000000000e5 +2443 4 2 30 0.13107200000000000000e6 +2443 4 4 4 0.13107200000000000000e6 +2443 4 6 34 0.26214400000000000000e6 +2444 1 1 48 0.65536000000000000000e5 +2444 1 2 9 0.65536000000000000000e5 +2444 1 2 33 0.26214400000000000000e6 +2444 1 2 49 0.65536000000000000000e5 +2444 1 3 34 -0.26214400000000000000e6 +2444 1 4 11 -0.65536000000000000000e5 +2444 1 8 39 0.65536000000000000000e5 +2444 1 9 40 0.65536000000000000000e5 +2444 1 10 41 0.13107200000000000000e6 +2444 1 11 42 -0.13107200000000000000e6 +2444 1 12 43 -0.52428800000000000000e6 +2444 1 23 38 0.65536000000000000000e5 +2444 1 26 41 -0.65536000000000000000e5 +2444 1 28 43 0.26214400000000000000e6 +2444 1 32 47 0.39321600000000000000e6 +2444 1 33 48 0.13107200000000000000e6 +2444 2 2 8 0.65536000000000000000e5 +2444 2 2 32 0.65536000000000000000e5 +2444 2 3 9 -0.65536000000000000000e5 +2444 2 7 21 0.13107200000000000000e6 +2444 2 12 26 0.13107200000000000000e6 +2444 2 16 30 0.65536000000000000000e5 +2444 2 20 34 0.13107200000000000000e6 +2444 3 1 14 -0.13107200000000000000e6 +2444 3 1 30 -0.65536000000000000000e5 +2444 3 2 15 0.13107200000000000000e6 +2444 3 3 32 0.26214400000000000000e6 +2444 3 4 7 0.65536000000000000000e5 +2444 3 4 9 -0.65536000000000000000e5 +2444 3 8 37 0.65536000000000000000e5 +2444 3 10 23 -0.13107200000000000000e6 +2444 3 13 42 0.26214400000000000000e6 +2444 3 22 35 0.26214400000000000000e6 +2444 3 28 41 0.39321600000000000000e6 +2444 3 29 42 0.13107200000000000000e6 +2444 4 2 30 0.65536000000000000000e5 +2444 4 3 31 -0.13107200000000000000e6 +2444 4 6 18 -0.65536000000000000000e5 +2444 4 6 34 0.13107200000000000000e6 +2445 1 1 48 -0.32768000000000000000e5 +2445 1 2 49 -0.32768000000000000000e5 +2445 1 4 11 0.65536000000000000000e5 +2445 1 9 40 -0.65536000000000000000e5 +2445 1 12 43 0.26214400000000000000e6 +2445 1 23 38 -0.32768000000000000000e5 +2445 1 26 41 0.65536000000000000000e5 +2445 1 28 43 -0.13107200000000000000e6 +2445 1 32 47 -0.26214400000000000000e6 +2445 2 2 32 -0.32768000000000000000e5 +2445 2 3 9 0.65536000000000000000e5 +2445 2 16 30 -0.65536000000000000000e5 +2445 2 20 34 -0.13107200000000000000e6 +2445 3 1 30 0.65536000000000000000e5 +2445 3 2 15 -0.13107200000000000000e6 +2445 3 3 32 -0.13107200000000000000e6 +2445 3 4 8 0.65536000000000000000e5 +2445 3 4 9 0.65536000000000000000e5 +2445 3 10 23 0.65536000000000000000e5 +2445 3 22 35 -0.26214400000000000000e6 +2445 3 28 41 -0.26214400000000000000e6 +2445 4 2 30 -0.65536000000000000000e5 +2445 4 6 34 -0.13107200000000000000e6 +2446 1 4 11 -0.65536000000000000000e5 +2446 1 10 25 0.65536000000000000000e5 +2446 3 4 10 0.65536000000000000000e5 +2447 1 2 33 -0.13107200000000000000e6 +2447 1 4 11 0.65536000000000000000e5 +2447 1 6 13 -0.13107200000000000000e6 +2447 1 10 25 -0.65536000000000000000e5 +2447 1 10 41 -0.13107200000000000000e6 +2447 1 12 43 0.26214400000000000000e6 +2447 2 12 26 -0.13107200000000000000e6 +2447 3 3 32 -0.13107200000000000000e6 +2447 3 4 9 0.65536000000000000000e5 +2447 3 4 11 0.65536000000000000000e5 +2447 3 14 27 0.26214400000000000000e6 +2447 4 4 8 0.65536000000000000000e5 +2447 4 8 20 -0.13107200000000000000e6 +2448 2 4 10 0.65536000000000000000e5 +2448 2 7 21 -0.65536000000000000000e5 +2448 3 1 14 0.65536000000000000000e5 +2448 3 2 15 0.65536000000000000000e5 +2448 3 3 16 -0.13107200000000000000e6 +2448 3 4 12 0.65536000000000000000e5 +2449 3 2 15 -0.65536000000000000000e5 +2449 3 4 13 0.65536000000000000000e5 +2450 1 2 33 -0.65536000000000000000e5 +2450 1 6 13 -0.65536000000000000000e5 +2450 1 10 41 -0.65536000000000000000e5 +2450 1 12 43 0.13107200000000000000e6 +2450 2 12 26 -0.65536000000000000000e5 +2450 3 3 32 -0.65536000000000000000e5 +2450 3 4 14 0.65536000000000000000e5 +2450 3 14 27 0.13107200000000000000e6 +2450 4 8 20 -0.65536000000000000000e5 +2451 1 4 35 -0.13107200000000000000e6 +2451 1 6 13 0.65536000000000000000e5 +2451 1 10 41 0.65536000000000000000e5 +2451 1 11 42 0.65536000000000000000e5 +2451 2 5 11 0.65536000000000000000e5 +2451 3 2 15 0.65536000000000000000e5 +2451 3 3 32 0.65536000000000000000e5 +2451 3 4 15 0.65536000000000000000e5 +2451 3 4 17 -0.13107200000000000000e6 +2451 3 4 33 0.65536000000000000000e5 +2452 1 3 18 -0.65536000000000000000e5 +2452 1 12 43 0.65536000000000000000e5 +2452 3 4 16 0.65536000000000000000e5 +2452 3 14 27 0.65536000000000000000e5 +2453 1 5 20 -0.13107200000000000000e6 +2453 1 5 36 0.13107200000000000000e6 +2453 3 4 17 0.65536000000000000000e5 +2453 3 4 18 0.65536000000000000000e5 +2453 3 5 18 0.65536000000000000000e5 +2453 4 8 12 0.65536000000000000000e5 +2454 1 4 35 0.32768000000000000000e5 +2454 1 10 17 -0.65536000000000000000e5 +2454 1 12 43 0.32768000000000000000e5 +2454 1 14 45 0.65536000000000000000e5 +2454 1 17 48 -0.32768000000000000000e5 +2454 1 18 49 -0.32768000000000000000e5 +2454 2 9 23 0.32768000000000000000e5 +2454 2 14 28 -0.32768000000000000000e5 +2454 3 4 19 0.65536000000000000000e5 +2454 3 5 34 0.32768000000000000000e5 +2454 3 13 42 -0.32768000000000000000e5 +2454 3 14 27 0.32768000000000000000e5 +2454 3 14 43 -0.32768000000000000000e5 +2455 1 5 20 -0.65536000000000000000e5 +2455 1 5 36 0.65536000000000000000e5 +2455 3 4 20 0.65536000000000000000e5 +2456 1 3 18 0.16384000000000000000e5 +2456 1 4 35 -0.16384000000000000000e5 +2456 1 5 20 0.32768000000000000000e5 +2456 1 5 36 -0.32768000000000000000e5 +2456 1 10 17 0.32768000000000000000e5 +2456 1 12 43 -0.32768000000000000000e5 +2456 1 14 45 -0.32768000000000000000e5 +2456 1 17 48 0.16384000000000000000e5 +2456 1 18 49 0.16384000000000000000e5 +2456 2 9 23 -0.16384000000000000000e5 +2456 2 14 28 0.16384000000000000000e5 +2456 3 3 16 0.16384000000000000000e5 +2456 3 4 17 0.16384000000000000000e5 +2456 3 4 21 0.65536000000000000000e5 +2456 3 5 34 -0.16384000000000000000e5 +2456 3 7 20 0.65536000000000000000e5 +2456 3 8 21 -0.13107200000000000000e6 +2456 3 13 42 0.16384000000000000000e5 +2456 3 14 27 -0.32768000000000000000e5 +2456 3 14 43 0.16384000000000000000e5 +2456 4 2 14 0.16384000000000000000e5 +2456 4 3 15 0.32768000000000000000e5 +2456 4 10 14 0.65536000000000000000e5 +2457 1 1 40 0.65536000000000000000e5 +2457 1 2 25 -0.65536000000000000000e5 +2457 3 4 22 0.65536000000000000000e5 +2458 1 2 25 0.65536000000000000000e5 +2458 1 2 33 -0.26214400000000000000e6 +2458 1 11 42 0.26214400000000000000e6 +2458 1 12 43 0.52428800000000000000e6 +2458 1 23 38 -0.65536000000000000000e5 +2458 1 28 43 -0.26214400000000000000e6 +2458 1 32 47 -0.26214400000000000000e6 +2458 1 33 48 -0.26214400000000000000e6 +2458 2 2 32 -0.65536000000000000000e5 +2458 2 3 17 0.65536000000000000000e5 +2458 2 12 26 -0.26214400000000000000e6 +2458 3 1 30 0.13107200000000000000e6 +2458 3 1 38 0.65536000000000000000e5 +2458 3 2 23 0.65536000000000000000e5 +2458 3 2 39 0.65536000000000000000e5 +2458 3 4 23 0.65536000000000000000e5 +2458 3 8 37 -0.13107200000000000000e6 +2458 3 10 23 0.13107200000000000000e6 +2458 3 13 42 -0.52428800000000000000e6 +2458 3 28 41 -0.26214400000000000000e6 +2458 3 29 42 -0.26214400000000000000e6 +2458 4 3 31 0.26214400000000000000e6 +2458 4 6 18 0.13107200000000000000e6 +2459 1 1 40 -0.65536000000000000000e5 +2459 1 2 33 0.26214400000000000000e6 +2459 1 11 42 -0.26214400000000000000e6 +2459 1 12 43 -0.52428800000000000000e6 +2459 1 23 38 0.65536000000000000000e5 +2459 1 28 43 0.26214400000000000000e6 +2459 1 32 47 0.26214400000000000000e6 +2459 1 33 48 0.26214400000000000000e6 +2459 2 2 32 0.65536000000000000000e5 +2459 2 3 17 -0.65536000000000000000e5 +2459 2 12 26 0.26214400000000000000e6 +2459 3 1 30 -0.26214400000000000000e6 +2459 3 1 38 -0.65536000000000000000e5 +2459 3 2 23 -0.65536000000000000000e5 +2459 3 2 39 -0.65536000000000000000e5 +2459 3 4 24 0.65536000000000000000e5 +2459 3 8 37 0.13107200000000000000e6 +2459 3 10 23 -0.13107200000000000000e6 +2459 3 13 42 0.52428800000000000000e6 +2459 3 28 41 0.26214400000000000000e6 +2459 3 29 42 0.26214400000000000000e6 +2459 4 3 31 -0.26214400000000000000e6 +2459 4 4 16 0.65536000000000000000e5 +2459 4 6 18 -0.13107200000000000000e6 +2460 1 1 40 0.65536000000000000000e5 +2460 1 2 25 -0.65536000000000000000e5 +2460 1 6 37 0.65536000000000000000e5 +2460 1 24 39 -0.65536000000000000000e5 +2460 2 3 33 -0.65536000000000000000e5 +2460 2 4 18 0.65536000000000000000e5 +2460 3 1 30 0.13107200000000000000e6 +2460 3 2 39 0.65536000000000000000e5 +2460 3 3 40 0.65536000000000000000e5 +2460 3 4 25 0.65536000000000000000e5 +2460 3 9 38 -0.13107200000000000000e6 +2460 3 10 23 -0.13107200000000000000e6 +2460 4 4 16 -0.65536000000000000000e5 +2461 1 2 25 0.65536000000000000000e5 +2461 1 2 33 -0.26214400000000000000e6 +2461 1 6 37 -0.65536000000000000000e5 +2461 1 9 40 0.13107200000000000000e6 +2461 1 10 25 -0.13107200000000000000e6 +2461 1 11 42 0.26214400000000000000e6 +2461 1 12 43 0.52428800000000000000e6 +2461 1 23 38 -0.65536000000000000000e5 +2461 1 24 39 0.65536000000000000000e5 +2461 1 28 43 -0.26214400000000000000e6 +2461 1 32 47 -0.26214400000000000000e6 +2461 1 33 48 -0.26214400000000000000e6 +2461 2 2 32 -0.65536000000000000000e5 +2461 2 3 17 0.65536000000000000000e5 +2461 2 3 33 0.65536000000000000000e5 +2461 2 4 18 -0.65536000000000000000e5 +2461 2 12 26 -0.26214400000000000000e6 +2461 3 1 30 0.13107200000000000000e6 +2461 3 1 38 0.65536000000000000000e5 +2461 3 2 23 0.65536000000000000000e5 +2461 3 3 40 -0.65536000000000000000e5 +2461 3 4 26 0.65536000000000000000e5 +2461 3 8 37 -0.13107200000000000000e6 +2461 3 9 38 0.13107200000000000000e6 +2461 3 10 23 0.26214400000000000000e6 +2461 3 13 42 -0.52428800000000000000e6 +2461 3 28 41 -0.26214400000000000000e6 +2461 3 29 42 -0.26214400000000000000e6 +2461 4 3 31 0.26214400000000000000e6 +2461 4 5 17 0.65536000000000000000e5 +2461 4 6 18 0.13107200000000000000e6 +2462 3 1 30 -0.65536000000000000000e5 +2462 3 4 27 0.65536000000000000000e5 +2463 3 4 28 0.65536000000000000000e5 +2463 3 10 23 -0.65536000000000000000e5 +2464 1 9 40 0.65536000000000000000e5 +2464 1 10 25 -0.65536000000000000000e5 +2464 3 4 29 0.65536000000000000000e5 +2465 1 2 33 0.13107200000000000000e6 +2465 1 9 40 -0.65536000000000000000e5 +2465 1 10 25 0.65536000000000000000e5 +2465 1 11 42 -0.13107200000000000000e6 +2465 1 12 43 -0.26214400000000000000e6 +2465 1 28 43 0.13107200000000000000e6 +2465 1 32 47 0.13107200000000000000e6 +2465 1 33 48 0.13107200000000000000e6 +2465 2 12 26 0.13107200000000000000e6 +2465 3 3 32 0.13107200000000000000e6 +2465 3 4 30 0.65536000000000000000e5 +2465 3 10 23 0.65536000000000000000e5 +2465 3 13 42 0.26214400000000000000e6 +2465 3 14 27 -0.26214400000000000000e6 +2465 3 28 41 0.13107200000000000000e6 +2465 3 29 42 0.13107200000000000000e6 +2465 4 3 31 -0.13107200000000000000e6 +2465 4 7 19 0.65536000000000000000e5 +2465 4 8 20 0.13107200000000000000e6 +2466 3 3 32 -0.65536000000000000000e5 +2466 3 4 31 0.65536000000000000000e5 +2467 1 2 33 0.65536000000000000000e5 +2467 1 11 42 -0.65536000000000000000e5 +2467 1 12 43 -0.13107200000000000000e6 +2467 1 28 43 0.65536000000000000000e5 +2467 1 32 47 0.65536000000000000000e5 +2467 1 33 48 0.65536000000000000000e5 +2467 2 12 26 0.65536000000000000000e5 +2467 3 3 32 0.65536000000000000000e5 +2467 3 4 32 0.65536000000000000000e5 +2467 3 13 42 0.13107200000000000000e6 +2467 3 14 27 -0.13107200000000000000e6 +2467 3 28 41 0.65536000000000000000e5 +2467 3 29 42 0.65536000000000000000e5 +2467 4 3 31 -0.65536000000000000000e5 +2467 4 8 20 0.65536000000000000000e5 +2468 1 4 35 -0.65536000000000000000e5 +2468 1 17 48 0.65536000000000000000e5 +2468 3 4 34 0.65536000000000000000e5 +2468 3 13 42 0.65536000000000000000e5 +2469 3 4 35 0.65536000000000000000e5 +2469 3 5 34 -0.65536000000000000000e5 +2470 1 5 36 -0.65536000000000000000e5 +2470 1 14 45 0.65536000000000000000e5 +2470 3 4 36 0.65536000000000000000e5 +2471 3 2 39 -0.65536000000000000000e5 +2471 3 4 37 0.65536000000000000000e5 +2472 1 6 37 -0.65536000000000000000e5 +2472 1 24 39 0.65536000000000000000e5 +2472 3 4 38 0.65536000000000000000e5 +2473 3 3 40 -0.65536000000000000000e5 +2473 3 4 39 0.65536000000000000000e5 +2474 1 1 48 -0.65536000000000000000e5 +2474 1 2 49 -0.13107200000000000000e6 +2474 1 6 37 0.65536000000000000000e5 +2474 1 8 39 -0.13107200000000000000e6 +2474 1 9 40 -0.26214400000000000000e6 +2474 1 10 41 0.26214400000000000000e6 +2474 1 12 43 0.52428800000000000000e6 +2474 1 23 38 -0.65536000000000000000e5 +2474 1 24 39 -0.65536000000000000000e5 +2474 1 25 40 0.65536000000000000000e5 +2474 1 26 41 0.13107200000000000000e6 +2474 1 28 43 -0.26214400000000000000e6 +2474 1 32 47 -0.52428800000000000000e6 +2474 2 2 32 -0.65536000000000000000e5 +2474 2 3 33 -0.65536000000000000000e5 +2474 2 5 27 0.65536000000000000000e5 +2474 2 16 30 -0.13107200000000000000e6 +2474 2 20 34 -0.26214400000000000000e6 +2474 3 3 40 0.65536000000000000000e5 +2474 3 4 40 0.65536000000000000000e5 +2474 3 9 38 -0.13107200000000000000e6 +2474 3 22 35 -0.52428800000000000000e6 +2474 3 28 41 -0.52428800000000000000e6 +2474 4 2 30 -0.13107200000000000000e6 +2474 4 6 34 -0.26214400000000000000e6 +2475 3 4 41 0.65536000000000000000e5 +2475 3 9 38 -0.65536000000000000000e5 +2476 1 9 40 -0.65536000000000000000e5 +2476 1 26 41 0.65536000000000000000e5 +2476 3 4 42 0.65536000000000000000e5 +2477 3 4 43 0.65536000000000000000e5 +2477 3 10 39 -0.65536000000000000000e5 +2478 1 10 41 0.65536000000000000000e5 +2478 1 11 42 0.65536000000000000000e5 +2478 1 32 47 -0.65536000000000000000e5 +2478 1 33 48 -0.65536000000000000000e5 +2478 3 4 44 0.65536000000000000000e5 +2478 3 13 42 -0.13107200000000000000e6 +2478 3 28 41 -0.65536000000000000000e5 +2478 3 29 42 -0.65536000000000000000e5 +2478 4 3 31 0.65536000000000000000e5 +2479 1 11 42 -0.65536000000000000000e5 +2479 1 33 48 0.65536000000000000000e5 +2479 3 4 45 0.65536000000000000000e5 +2479 3 29 42 0.65536000000000000000e5 +2480 1 14 45 -0.13107200000000000000e6 +2480 1 17 48 0.65536000000000000000e5 +2480 1 18 49 0.65536000000000000000e5 +2480 1 34 49 0.65536000000000000000e5 +2480 2 14 28 0.65536000000000000000e5 +2480 3 4 46 0.65536000000000000000e5 +2480 3 13 42 0.65536000000000000000e5 +2480 3 14 43 0.65536000000000000000e5 +2480 3 18 47 0.65536000000000000000e5 +2481 1 6 53 -0.65536000000000000000e5 +2481 1 25 40 0.65536000000000000000e5 +2481 3 4 47 0.65536000000000000000e5 +2481 3 25 38 0.65536000000000000000e5 +2481 3 27 40 -0.13107200000000000000e6 +2481 4 4 32 0.65536000000000000000e5 +2482 3 4 48 0.65536000000000000000e5 +2482 3 25 38 -0.65536000000000000000e5 +2483 1 6 53 0.65536000000000000000e5 +2483 1 25 40 -0.65536000000000000000e5 +2483 3 4 49 0.65536000000000000000e5 +2484 3 4 50 0.65536000000000000000e5 +2484 3 27 40 -0.65536000000000000000e5 +2485 3 4 51 0.65536000000000000000e5 +2485 3 5 50 -0.65536000000000000000e5 +2486 3 4 52 0.65536000000000000000e5 +2486 3 29 42 -0.65536000000000000000e5 +2487 1 1 48 0.65536000000000000000e5 +2487 1 2 49 0.13107200000000000000e6 +2487 1 8 39 0.13107200000000000000e6 +2487 1 9 40 0.13107200000000000000e6 +2487 1 10 41 -0.26214400000000000000e6 +2487 1 12 43 -0.52428800000000000000e6 +2487 1 23 38 0.65536000000000000000e5 +2487 1 24 39 0.65536000000000000000e5 +2487 1 26 41 -0.13107200000000000000e6 +2487 1 28 43 0.26214400000000000000e6 +2487 1 32 47 0.52428800000000000000e6 +2487 1 40 47 0.65536000000000000000e5 +2487 2 2 32 0.65536000000000000000e5 +2487 2 3 33 0.65536000000000000000e5 +2487 2 16 30 0.13107200000000000000e6 +2487 2 20 34 0.26214400000000000000e6 +2487 3 4 53 0.65536000000000000000e5 +2487 3 9 38 0.13107200000000000000e6 +2487 3 22 35 0.52428800000000000000e6 +2487 3 25 38 0.65536000000000000000e5 +2487 3 28 41 0.52428800000000000000e6 +2487 4 2 30 0.13107200000000000000e6 +2487 4 6 34 0.26214400000000000000e6 +2488 1 6 53 -0.65536000000000000000e5 +2488 1 25 56 0.65536000000000000000e5 +2488 3 4 54 0.65536000000000000000e5 +2488 3 24 53 -0.65536000000000000000e5 +2488 3 25 54 -0.65536000000000000000e5 +2488 3 38 51 0.13107200000000000000e6 +2488 4 28 32 -0.65536000000000000000e5 +2489 1 24 55 -0.65536000000000000000e5 +2489 1 26 41 0.65536000000000000000e5 +2489 3 4 55 0.65536000000000000000e5 +2489 3 22 51 0.65536000000000000000e5 +2489 3 23 52 -0.13107200000000000000e6 +2489 3 27 40 -0.65536000000000000000e5 +2489 4 7 35 0.65536000000000000000e5 +2490 3 4 56 0.65536000000000000000e5 +2490 3 24 53 0.65536000000000000000e5 +2490 3 25 54 0.65536000000000000000e5 +2490 3 38 51 -0.13107200000000000000e6 +2490 4 28 32 0.65536000000000000000e5 +2491 1 1 48 0.32768000000000000000e5 +2491 1 2 5 -0.32768000000000000000e5 +2491 1 2 25 0.32768000000000000000e5 +2491 1 2 49 0.32768000000000000000e5 +2491 1 4 11 -0.13107200000000000000e6 +2491 1 9 40 0.65536000000000000000e5 +2491 1 10 25 0.65536000000000000000e5 +2491 1 12 43 -0.26214400000000000000e6 +2491 1 23 38 0.32768000000000000000e5 +2491 1 26 41 -0.65536000000000000000e5 +2491 1 28 43 0.13107200000000000000e6 +2491 1 32 47 0.26214400000000000000e6 +2491 2 2 32 0.32768000000000000000e5 +2491 2 3 9 -0.65536000000000000000e5 +2491 2 16 30 0.65536000000000000000e5 +2491 2 20 34 0.13107200000000000000e6 +2491 3 1 6 -0.32768000000000000000e5 +2491 3 1 30 -0.65536000000000000000e5 +2491 3 2 15 0.13107200000000000000e6 +2491 3 3 32 0.13107200000000000000e6 +2491 3 4 5 0.32768000000000000000e5 +2491 3 4 9 -0.65536000000000000000e5 +2491 3 5 5 0.65536000000000000000e5 +2491 3 10 23 -0.65536000000000000000e5 +2491 3 22 35 0.26214400000000000000e6 +2491 3 28 41 0.26214400000000000000e6 +2491 4 1 5 -0.32768000000000000000e5 +2491 4 2 30 0.65536000000000000000e5 +2491 4 4 4 0.65536000000000000000e5 +2491 4 6 34 0.13107200000000000000e6 +2492 1 1 48 -0.32768000000000000000e5 +2492 1 2 49 -0.32768000000000000000e5 +2492 1 4 11 0.65536000000000000000e5 +2492 1 9 40 -0.65536000000000000000e5 +2492 1 12 43 0.26214400000000000000e6 +2492 1 23 38 -0.32768000000000000000e5 +2492 1 26 41 0.65536000000000000000e5 +2492 1 28 43 -0.13107200000000000000e6 +2492 1 32 47 -0.26214400000000000000e6 +2492 2 2 32 -0.32768000000000000000e5 +2492 2 3 9 0.65536000000000000000e5 +2492 2 16 30 -0.65536000000000000000e5 +2492 2 20 34 -0.13107200000000000000e6 +2492 3 1 30 0.65536000000000000000e5 +2492 3 2 15 -0.13107200000000000000e6 +2492 3 3 32 -0.13107200000000000000e6 +2492 3 4 9 0.65536000000000000000e5 +2492 3 5 7 0.65536000000000000000e5 +2492 3 10 23 0.65536000000000000000e5 +2492 3 22 35 -0.26214400000000000000e6 +2492 3 28 41 -0.26214400000000000000e6 +2492 4 2 30 -0.65536000000000000000e5 +2492 4 6 34 -0.13107200000000000000e6 +2493 3 4 9 -0.65536000000000000000e5 +2493 3 5 8 0.65536000000000000000e5 +2494 1 4 11 -0.65536000000000000000e5 +2494 1 10 25 0.65536000000000000000e5 +2494 3 5 9 0.65536000000000000000e5 +2495 1 2 33 -0.13107200000000000000e6 +2495 1 4 11 0.65536000000000000000e5 +2495 1 6 13 -0.13107200000000000000e6 +2495 1 10 25 -0.65536000000000000000e5 +2495 1 10 41 -0.13107200000000000000e6 +2495 1 12 43 0.26214400000000000000e6 +2495 2 12 26 -0.13107200000000000000e6 +2495 3 3 32 -0.13107200000000000000e6 +2495 3 4 9 0.65536000000000000000e5 +2495 3 5 10 0.65536000000000000000e5 +2495 3 14 27 0.26214400000000000000e6 +2495 4 4 8 0.65536000000000000000e5 +2495 4 8 20 -0.13107200000000000000e6 +2496 1 2 33 0.13107200000000000000e6 +2496 1 4 11 -0.65536000000000000000e5 +2496 1 6 13 0.13107200000000000000e6 +2496 1 10 25 0.65536000000000000000e5 +2496 1 10 41 0.13107200000000000000e6 +2496 1 12 43 -0.26214400000000000000e6 +2496 2 12 26 0.13107200000000000000e6 +2496 3 3 32 0.13107200000000000000e6 +2496 3 4 9 -0.65536000000000000000e5 +2496 3 5 11 0.65536000000000000000e5 +2496 3 6 11 0.65536000000000000000e5 +2496 3 10 11 -0.13107200000000000000e6 +2496 3 14 27 -0.26214400000000000000e6 +2496 4 4 8 -0.65536000000000000000e5 +2496 4 5 9 0.65536000000000000000e5 +2496 4 8 20 0.13107200000000000000e6 +2497 3 2 15 -0.65536000000000000000e5 +2497 3 5 12 0.65536000000000000000e5 +2498 1 2 33 -0.65536000000000000000e5 +2498 1 6 13 -0.65536000000000000000e5 +2498 1 10 41 -0.65536000000000000000e5 +2498 1 12 43 0.13107200000000000000e6 +2498 2 12 26 -0.65536000000000000000e5 +2498 3 3 32 -0.65536000000000000000e5 +2498 3 5 13 0.65536000000000000000e5 +2498 3 14 27 0.13107200000000000000e6 +2498 4 8 20 -0.65536000000000000000e5 +2499 1 4 35 -0.13107200000000000000e6 +2499 1 6 13 0.65536000000000000000e5 +2499 1 10 41 0.65536000000000000000e5 +2499 1 11 42 0.65536000000000000000e5 +2499 2 5 11 0.65536000000000000000e5 +2499 3 2 15 0.65536000000000000000e5 +2499 3 3 32 0.65536000000000000000e5 +2499 3 4 17 -0.13107200000000000000e6 +2499 3 4 33 0.65536000000000000000e5 +2499 3 5 14 0.65536000000000000000e5 +2500 3 5 15 0.65536000000000000000e5 +2500 3 10 11 -0.65536000000000000000e5 +2501 3 4 17 -0.65536000000000000000e5 +2501 3 5 16 0.65536000000000000000e5 +2502 1 5 20 -0.13107200000000000000e6 +2502 1 5 36 0.13107200000000000000e6 +2502 3 4 17 0.65536000000000000000e5 +2502 3 5 17 0.65536000000000000000e5 +2502 3 5 18 0.65536000000000000000e5 +2502 4 8 12 0.65536000000000000000e5 +2503 1 5 20 -0.65536000000000000000e5 +2503 1 5 36 0.65536000000000000000e5 +2503 3 5 19 0.65536000000000000000e5 +2504 3 5 20 0.65536000000000000000e5 +2504 3 6 19 -0.65536000000000000000e5 +2505 1 6 21 -0.65536000000000000000e5 +2505 1 18 33 0.65536000000000000000e5 +2505 3 5 21 0.65536000000000000000e5 +2506 1 2 25 0.65536000000000000000e5 +2506 1 2 33 -0.26214400000000000000e6 +2506 1 11 42 0.26214400000000000000e6 +2506 1 12 43 0.52428800000000000000e6 +2506 1 23 38 -0.65536000000000000000e5 +2506 1 28 43 -0.26214400000000000000e6 +2506 1 32 47 -0.26214400000000000000e6 +2506 1 33 48 -0.26214400000000000000e6 +2506 2 2 32 -0.65536000000000000000e5 +2506 2 3 17 0.65536000000000000000e5 +2506 2 12 26 -0.26214400000000000000e6 +2506 3 1 30 0.13107200000000000000e6 +2506 3 1 38 0.65536000000000000000e5 +2506 3 2 23 0.65536000000000000000e5 +2506 3 2 39 0.65536000000000000000e5 +2506 3 5 22 0.65536000000000000000e5 +2506 3 8 37 -0.13107200000000000000e6 +2506 3 10 23 0.13107200000000000000e6 +2506 3 13 42 -0.52428800000000000000e6 +2506 3 28 41 -0.26214400000000000000e6 +2506 3 29 42 -0.26214400000000000000e6 +2506 4 3 31 0.26214400000000000000e6 +2506 4 6 18 0.13107200000000000000e6 +2507 1 1 40 -0.65536000000000000000e5 +2507 1 2 33 0.26214400000000000000e6 +2507 1 11 42 -0.26214400000000000000e6 +2507 1 12 43 -0.52428800000000000000e6 +2507 1 23 38 0.65536000000000000000e5 +2507 1 28 43 0.26214400000000000000e6 +2507 1 32 47 0.26214400000000000000e6 +2507 1 33 48 0.26214400000000000000e6 +2507 2 2 32 0.65536000000000000000e5 +2507 2 3 17 -0.65536000000000000000e5 +2507 2 12 26 0.26214400000000000000e6 +2507 3 1 30 -0.26214400000000000000e6 +2507 3 1 38 -0.65536000000000000000e5 +2507 3 2 23 -0.65536000000000000000e5 +2507 3 2 39 -0.65536000000000000000e5 +2507 3 5 23 0.65536000000000000000e5 +2507 3 8 37 0.13107200000000000000e6 +2507 3 10 23 -0.13107200000000000000e6 +2507 3 13 42 0.52428800000000000000e6 +2507 3 28 41 0.26214400000000000000e6 +2507 3 29 42 0.26214400000000000000e6 +2507 4 3 31 -0.26214400000000000000e6 +2507 4 4 16 0.65536000000000000000e5 +2507 4 6 18 -0.13107200000000000000e6 +2508 1 1 40 0.65536000000000000000e5 +2508 1 2 25 -0.65536000000000000000e5 +2508 1 6 37 0.65536000000000000000e5 +2508 1 24 39 -0.65536000000000000000e5 +2508 2 3 33 -0.65536000000000000000e5 +2508 2 4 18 0.65536000000000000000e5 +2508 3 1 30 0.13107200000000000000e6 +2508 3 2 39 0.65536000000000000000e5 +2508 3 3 40 0.65536000000000000000e5 +2508 3 5 24 0.65536000000000000000e5 +2508 3 9 38 -0.13107200000000000000e6 +2508 3 10 23 -0.13107200000000000000e6 +2508 4 4 16 -0.65536000000000000000e5 +2509 1 2 25 0.65536000000000000000e5 +2509 1 2 33 -0.26214400000000000000e6 +2509 1 6 37 -0.65536000000000000000e5 +2509 1 9 40 0.13107200000000000000e6 +2509 1 10 25 -0.13107200000000000000e6 +2509 1 11 42 0.26214400000000000000e6 +2509 1 12 43 0.52428800000000000000e6 +2509 1 23 38 -0.65536000000000000000e5 +2509 1 24 39 0.65536000000000000000e5 +2509 1 28 43 -0.26214400000000000000e6 +2509 1 32 47 -0.26214400000000000000e6 +2509 1 33 48 -0.26214400000000000000e6 +2509 2 2 32 -0.65536000000000000000e5 +2509 2 3 17 0.65536000000000000000e5 +2509 2 3 33 0.65536000000000000000e5 +2509 2 4 18 -0.65536000000000000000e5 +2509 2 12 26 -0.26214400000000000000e6 +2509 3 1 30 0.13107200000000000000e6 +2509 3 1 38 0.65536000000000000000e5 +2509 3 2 23 0.65536000000000000000e5 +2509 3 3 40 -0.65536000000000000000e5 +2509 3 5 25 0.65536000000000000000e5 +2509 3 8 37 -0.13107200000000000000e6 +2509 3 9 38 0.13107200000000000000e6 +2509 3 10 23 0.26214400000000000000e6 +2509 3 13 42 -0.52428800000000000000e6 +2509 3 28 41 -0.26214400000000000000e6 +2509 3 29 42 -0.26214400000000000000e6 +2509 4 3 31 0.26214400000000000000e6 +2509 4 5 17 0.65536000000000000000e5 +2509 4 6 18 0.13107200000000000000e6 +2510 3 5 27 0.65536000000000000000e5 +2510 3 10 23 -0.65536000000000000000e5 +2511 1 9 40 0.65536000000000000000e5 +2511 1 10 25 -0.65536000000000000000e5 +2511 3 5 28 0.65536000000000000000e5 +2512 1 2 33 0.13107200000000000000e6 +2512 1 9 40 -0.65536000000000000000e5 +2512 1 10 25 0.65536000000000000000e5 +2512 1 11 42 -0.13107200000000000000e6 +2512 1 12 43 -0.26214400000000000000e6 +2512 1 28 43 0.13107200000000000000e6 +2512 1 32 47 0.13107200000000000000e6 +2512 1 33 48 0.13107200000000000000e6 +2512 2 12 26 0.13107200000000000000e6 +2512 3 3 32 0.13107200000000000000e6 +2512 3 5 29 0.65536000000000000000e5 +2512 3 10 23 0.65536000000000000000e5 +2512 3 13 42 0.26214400000000000000e6 +2512 3 14 27 -0.26214400000000000000e6 +2512 3 28 41 0.13107200000000000000e6 +2512 3 29 42 0.13107200000000000000e6 +2512 4 3 31 -0.13107200000000000000e6 +2512 4 7 19 0.65536000000000000000e5 +2512 4 8 20 0.13107200000000000000e6 +2513 1 1 48 -0.32768000000000000000e5 +2513 1 2 49 -0.32768000000000000000e5 +2513 1 8 39 -0.65536000000000000000e5 +2513 1 9 40 -0.13107200000000000000e6 +2513 1 10 41 0.13107200000000000000e6 +2513 1 11 26 -0.65536000000000000000e5 +2513 1 11 42 0.13107200000000000000e6 +2513 1 12 43 0.26214400000000000000e6 +2513 1 23 38 -0.32768000000000000000e5 +2513 1 26 41 0.13107200000000000000e6 +2513 1 28 43 -0.26214400000000000000e6 +2513 1 32 47 -0.26214400000000000000e6 +2513 2 2 32 -0.32768000000000000000e5 +2513 2 4 34 0.65536000000000000000e5 +2513 2 16 30 -0.65536000000000000000e5 +2513 2 20 34 -0.13107200000000000000e6 +2513 2 28 34 -0.65536000000000000000e5 +2513 3 5 30 0.65536000000000000000e5 +2513 3 9 38 -0.65536000000000000000e5 +2513 3 10 39 -0.65536000000000000000e5 +2513 3 22 35 -0.26214400000000000000e6 +2513 3 28 41 -0.26214400000000000000e6 +2513 4 2 30 -0.65536000000000000000e5 +2513 4 6 34 -0.13107200000000000000e6 +2513 4 18 22 -0.65536000000000000000e5 +2513 4 18 30 -0.65536000000000000000e5 +2513 4 21 33 -0.65536000000000000000e5 +2514 1 2 33 0.65536000000000000000e5 +2514 1 11 42 -0.65536000000000000000e5 +2514 1 12 43 -0.13107200000000000000e6 +2514 1 28 43 0.65536000000000000000e5 +2514 1 32 47 0.65536000000000000000e5 +2514 1 33 48 0.65536000000000000000e5 +2514 2 12 26 0.65536000000000000000e5 +2514 3 3 32 0.65536000000000000000e5 +2514 3 5 31 0.65536000000000000000e5 +2514 3 13 42 0.13107200000000000000e6 +2514 3 14 27 -0.13107200000000000000e6 +2514 3 28 41 0.65536000000000000000e5 +2514 3 29 42 0.65536000000000000000e5 +2514 4 3 31 -0.65536000000000000000e5 +2514 4 8 20 0.65536000000000000000e5 +2515 3 4 33 -0.65536000000000000000e5 +2515 3 5 32 0.65536000000000000000e5 +2516 1 2 33 -0.65536000000000000000e5 +2516 1 11 42 0.65536000000000000000e5 +2516 1 12 43 0.13107200000000000000e6 +2516 1 28 43 -0.65536000000000000000e5 +2516 1 32 47 -0.65536000000000000000e5 +2516 1 33 48 -0.65536000000000000000e5 +2516 2 12 26 -0.65536000000000000000e5 +2516 3 3 32 -0.65536000000000000000e5 +2516 3 4 33 0.65536000000000000000e5 +2516 3 5 33 0.65536000000000000000e5 +2516 3 5 34 -0.13107200000000000000e6 +2516 3 13 42 -0.13107200000000000000e6 +2516 3 14 27 0.13107200000000000000e6 +2516 3 28 41 -0.65536000000000000000e5 +2516 3 29 42 -0.65536000000000000000e5 +2516 4 3 31 0.65536000000000000000e5 +2516 4 8 20 -0.65536000000000000000e5 +2516 4 9 21 0.65536000000000000000e5 +2517 1 15 30 -0.65536000000000000000e5 +2517 1 18 49 0.65536000000000000000e5 +2517 3 5 35 0.65536000000000000000e5 +2517 3 14 43 0.65536000000000000000e5 +2518 3 5 36 0.65536000000000000000e5 +2518 3 17 30 -0.65536000000000000000e5 +2519 1 6 37 -0.65536000000000000000e5 +2519 1 24 39 0.65536000000000000000e5 +2519 3 5 37 0.65536000000000000000e5 +2520 3 3 40 -0.65536000000000000000e5 +2520 3 5 38 0.65536000000000000000e5 +2521 1 1 48 -0.65536000000000000000e5 +2521 1 2 49 -0.13107200000000000000e6 +2521 1 6 37 0.65536000000000000000e5 +2521 1 8 39 -0.13107200000000000000e6 +2521 1 9 40 -0.26214400000000000000e6 +2521 1 10 41 0.26214400000000000000e6 +2521 1 12 43 0.52428800000000000000e6 +2521 1 23 38 -0.65536000000000000000e5 +2521 1 24 39 -0.65536000000000000000e5 +2521 1 25 40 0.65536000000000000000e5 +2521 1 26 41 0.13107200000000000000e6 +2521 1 28 43 -0.26214400000000000000e6 +2521 1 32 47 -0.52428800000000000000e6 +2521 2 2 32 -0.65536000000000000000e5 +2521 2 3 33 -0.65536000000000000000e5 +2521 2 5 27 0.65536000000000000000e5 +2521 2 16 30 -0.13107200000000000000e6 +2521 2 20 34 -0.26214400000000000000e6 +2521 3 3 40 0.65536000000000000000e5 +2521 3 5 39 0.65536000000000000000e5 +2521 3 9 38 -0.13107200000000000000e6 +2521 3 22 35 -0.52428800000000000000e6 +2521 3 28 41 -0.52428800000000000000e6 +2521 4 2 30 -0.13107200000000000000e6 +2521 4 6 34 -0.26214400000000000000e6 +2522 1 1 40 -0.65536000000000000000e5 +2522 1 1 48 0.65536000000000000000e5 +2522 1 2 33 0.52428800000000000000e6 +2522 1 2 49 0.13107200000000000000e6 +2522 1 6 37 -0.65536000000000000000e5 +2522 1 6 53 -0.65536000000000000000e5 +2522 1 8 39 0.13107200000000000000e6 +2522 1 10 25 0.26214400000000000000e6 +2522 1 10 41 -0.26214400000000000000e6 +2522 1 11 42 -0.52428800000000000000e6 +2522 1 12 43 -0.15728640000000000000e7 +2522 1 23 38 0.13107200000000000000e6 +2522 1 24 39 0.65536000000000000000e5 +2522 1 26 41 -0.13107200000000000000e6 +2522 1 28 43 0.78643200000000000000e6 +2522 1 32 47 0.10485760000000000000e7 +2522 1 33 48 0.52428800000000000000e6 +2522 2 2 32 0.13107200000000000000e6 +2522 2 3 17 -0.65536000000000000000e5 +2522 2 3 33 0.65536000000000000000e5 +2522 2 5 19 0.65536000000000000000e5 +2522 2 5 27 -0.65536000000000000000e5 +2522 2 5 35 -0.65536000000000000000e5 +2522 2 12 26 0.52428800000000000000e6 +2522 2 16 30 0.13107200000000000000e6 +2522 2 20 34 0.26214400000000000000e6 +2522 3 1 30 -0.26214400000000000000e6 +2522 3 1 38 -0.65536000000000000000e5 +2522 3 2 23 -0.65536000000000000000e5 +2522 3 2 39 -0.65536000000000000000e5 +2522 3 3 32 0.26214400000000000000e6 +2522 3 5 26 0.65536000000000000000e5 +2522 3 5 40 0.65536000000000000000e5 +2522 3 5 50 -0.13107200000000000000e6 +2522 3 8 37 0.13107200000000000000e6 +2522 3 9 38 0.13107200000000000000e6 +2522 3 10 39 -0.13107200000000000000e6 +2522 3 13 42 0.10485760000000000000e7 +2522 3 14 27 -0.52428800000000000000e6 +2522 3 22 35 0.52428800000000000000e6 +2522 3 25 38 0.65536000000000000000e5 +2522 3 26 39 0.65536000000000000000e5 +2522 3 28 41 0.10485760000000000000e7 +2522 3 29 42 0.52428800000000000000e6 +2522 4 2 30 0.13107200000000000000e6 +2522 4 3 31 -0.52428800000000000000e6 +2522 4 4 16 0.65536000000000000000e5 +2522 4 5 17 -0.65536000000000000000e5 +2522 4 6 18 -0.13107200000000000000e6 +2522 4 6 34 0.26214400000000000000e6 +2522 4 7 19 0.13107200000000000000e6 +2522 4 8 20 0.26214400000000000000e6 +2523 1 9 40 -0.65536000000000000000e5 +2523 1 26 41 0.65536000000000000000e5 +2523 3 5 41 0.65536000000000000000e5 +2524 3 5 42 0.65536000000000000000e5 +2524 3 10 39 -0.65536000000000000000e5 +2525 1 9 40 0.65536000000000000000e5 +2525 1 11 42 -0.13107200000000000000e6 +2525 1 26 41 -0.65536000000000000000e5 +2525 1 33 48 0.13107200000000000000e6 +2525 3 5 43 0.65536000000000000000e5 +2525 3 10 39 0.65536000000000000000e5 +2525 3 29 42 0.13107200000000000000e6 +2525 4 18 22 0.65536000000000000000e5 +2526 1 11 42 -0.65536000000000000000e5 +2526 1 33 48 0.65536000000000000000e5 +2526 3 5 44 0.65536000000000000000e5 +2526 3 29 42 0.65536000000000000000e5 +2527 1 26 33 -0.65536000000000000000e5 +2527 1 33 40 0.65536000000000000000e5 +2527 3 5 45 0.65536000000000000000e5 +2528 3 5 46 0.65536000000000000000e5 +2528 3 14 43 -0.65536000000000000000e5 +2529 3 5 47 0.65536000000000000000e5 +2529 3 25 38 -0.65536000000000000000e5 +2530 1 6 53 0.65536000000000000000e5 +2530 1 25 40 -0.65536000000000000000e5 +2530 3 5 48 0.65536000000000000000e5 +2531 3 5 49 0.65536000000000000000e5 +2531 3 26 39 -0.65536000000000000000e5 +2532 3 5 50 0.65536000000000000000e5 +2532 3 5 51 0.65536000000000000000e5 +2532 3 27 40 0.65536000000000000000e5 +2532 3 29 42 -0.13107200000000000000e6 +2532 4 18 30 0.65536000000000000000e5 +2533 3 5 52 0.65536000000000000000e5 +2533 3 14 51 -0.13107200000000000000e6 +2533 3 29 42 0.65536000000000000000e5 +2533 3 30 43 0.65536000000000000000e5 +2533 4 19 31 0.65536000000000000000e5 +2534 1 6 53 -0.65536000000000000000e5 +2534 1 25 56 0.65536000000000000000e5 +2534 3 5 53 0.65536000000000000000e5 +2534 3 24 53 -0.65536000000000000000e5 +2534 3 25 54 -0.65536000000000000000e5 +2534 3 38 51 0.13107200000000000000e6 +2534 4 28 32 -0.65536000000000000000e5 +2535 3 5 54 0.65536000000000000000e5 +2535 3 39 40 -0.65536000000000000000e5 +2536 3 5 55 0.65536000000000000000e5 +2536 3 10 55 0.13107200000000000000e6 +2536 3 22 51 -0.65536000000000000000e5 +2536 3 23 52 0.13107200000000000000e6 +2536 3 35 48 -0.26214400000000000000e6 +2536 3 40 45 0.13107200000000000000e6 +2536 4 7 35 -0.65536000000000000000e5 +2536 4 21 33 0.65536000000000000000e5 +2536 4 22 34 0.13107200000000000000e6 +2537 3 5 56 0.65536000000000000000e5 +2537 3 25 54 -0.65536000000000000000e5 +2538 1 1 48 -0.32768000000000000000e5 +2538 1 2 5 0.32768000000000000000e5 +2538 1 2 25 -0.32768000000000000000e5 +2538 1 2 33 0.13107200000000000000e6 +2538 1 2 49 -0.32768000000000000000e5 +2538 1 4 11 0.65536000000000000000e5 +2538 1 6 13 0.13107200000000000000e6 +2538 1 9 40 -0.65536000000000000000e5 +2538 1 10 41 0.13107200000000000000e6 +2538 1 23 38 -0.32768000000000000000e5 +2538 1 26 41 0.65536000000000000000e5 +2538 1 28 43 -0.13107200000000000000e6 +2538 1 32 47 -0.26214400000000000000e6 +2538 2 2 32 -0.32768000000000000000e5 +2538 2 3 9 0.65536000000000000000e5 +2538 2 12 26 0.13107200000000000000e6 +2538 2 16 30 -0.65536000000000000000e5 +2538 2 20 34 -0.13107200000000000000e6 +2538 3 1 6 0.32768000000000000000e5 +2538 3 1 30 0.65536000000000000000e5 +2538 3 2 15 -0.13107200000000000000e6 +2538 3 4 5 -0.32768000000000000000e5 +2538 3 5 6 0.32768000000000000000e5 +2538 3 6 6 0.65536000000000000000e5 +2538 3 6 11 0.65536000000000000000e5 +2538 3 10 11 -0.13107200000000000000e6 +2538 3 10 23 0.65536000000000000000e5 +2538 3 14 27 -0.26214400000000000000e6 +2538 3 22 35 -0.26214400000000000000e6 +2538 3 28 41 -0.26214400000000000000e6 +2538 4 1 5 0.32768000000000000000e5 +2538 4 2 30 -0.65536000000000000000e5 +2538 4 4 4 -0.65536000000000000000e5 +2538 4 4 8 -0.65536000000000000000e5 +2538 4 5 5 0.65536000000000000000e5 +2538 4 5 9 0.65536000000000000000e5 +2538 4 6 34 -0.13107200000000000000e6 +2538 4 8 20 0.13107200000000000000e6 +2539 3 4 9 -0.65536000000000000000e5 +2539 3 6 7 0.65536000000000000000e5 +2540 1 4 11 -0.65536000000000000000e5 +2540 1 10 25 0.65536000000000000000e5 +2540 3 6 8 0.65536000000000000000e5 +2541 1 2 33 -0.13107200000000000000e6 +2541 1 4 11 0.65536000000000000000e5 +2541 1 6 13 -0.13107200000000000000e6 +2541 1 10 25 -0.65536000000000000000e5 +2541 1 10 41 -0.13107200000000000000e6 +2541 1 12 43 0.26214400000000000000e6 +2541 2 12 26 -0.13107200000000000000e6 +2541 3 3 32 -0.13107200000000000000e6 +2541 3 4 9 0.65536000000000000000e5 +2541 3 6 9 0.65536000000000000000e5 +2541 3 14 27 0.26214400000000000000e6 +2541 4 4 8 0.65536000000000000000e5 +2541 4 8 20 -0.13107200000000000000e6 +2542 1 2 33 0.13107200000000000000e6 +2542 1 4 11 -0.65536000000000000000e5 +2542 1 6 13 0.13107200000000000000e6 +2542 1 10 25 0.65536000000000000000e5 +2542 1 10 41 0.13107200000000000000e6 +2542 1 12 43 -0.26214400000000000000e6 +2542 2 12 26 0.13107200000000000000e6 +2542 3 3 32 0.13107200000000000000e6 +2542 3 4 9 -0.65536000000000000000e5 +2542 3 6 10 0.65536000000000000000e5 +2542 3 6 11 0.65536000000000000000e5 +2542 3 10 11 -0.13107200000000000000e6 +2542 3 14 27 -0.26214400000000000000e6 +2542 4 4 8 -0.65536000000000000000e5 +2542 4 5 9 0.65536000000000000000e5 +2542 4 8 20 0.13107200000000000000e6 +2543 1 2 33 -0.65536000000000000000e5 +2543 1 6 13 -0.65536000000000000000e5 +2543 1 10 41 -0.65536000000000000000e5 +2543 1 12 43 0.13107200000000000000e6 +2543 2 12 26 -0.65536000000000000000e5 +2543 3 3 32 -0.65536000000000000000e5 +2543 3 6 12 0.65536000000000000000e5 +2543 3 14 27 0.13107200000000000000e6 +2543 4 8 20 -0.65536000000000000000e5 +2544 1 4 35 -0.13107200000000000000e6 +2544 1 6 13 0.65536000000000000000e5 +2544 1 10 41 0.65536000000000000000e5 +2544 1 11 42 0.65536000000000000000e5 +2544 2 5 11 0.65536000000000000000e5 +2544 3 2 15 0.65536000000000000000e5 +2544 3 3 32 0.65536000000000000000e5 +2544 3 4 17 -0.13107200000000000000e6 +2544 3 4 33 0.65536000000000000000e5 +2544 3 6 13 0.65536000000000000000e5 +2545 3 6 14 0.65536000000000000000e5 +2545 3 10 11 -0.65536000000000000000e5 +2546 1 4 35 0.13107200000000000000e6 +2546 1 6 13 -0.65536000000000000000e5 +2546 1 10 41 -0.65536000000000000000e5 +2546 1 11 42 -0.65536000000000000000e5 +2546 2 5 11 -0.65536000000000000000e5 +2546 3 2 15 -0.65536000000000000000e5 +2546 3 3 32 -0.65536000000000000000e5 +2546 3 4 17 0.13107200000000000000e6 +2546 3 4 33 -0.65536000000000000000e5 +2546 3 5 18 -0.13107200000000000000e6 +2546 3 6 15 0.65536000000000000000e5 +2546 3 10 11 0.65536000000000000000e5 +2546 4 9 9 0.13107200000000000000e6 +2547 1 5 20 -0.13107200000000000000e6 +2547 1 5 36 0.13107200000000000000e6 +2547 3 4 17 0.65536000000000000000e5 +2547 3 5 18 0.65536000000000000000e5 +2547 3 6 16 0.65536000000000000000e5 +2547 4 8 12 0.65536000000000000000e5 +2548 3 5 18 -0.65536000000000000000e5 +2548 3 6 17 0.65536000000000000000e5 +2549 1 5 20 0.13107200000000000000e6 +2549 1 5 36 -0.13107200000000000000e6 +2549 3 4 17 -0.65536000000000000000e5 +2549 3 6 18 0.65536000000000000000e5 +2549 3 6 19 -0.13107200000000000000e6 +2549 4 5 14 0.65536000000000000000e5 +2549 4 8 12 -0.65536000000000000000e5 +2550 1 5 20 0.65536000000000000000e5 +2550 1 5 36 -0.65536000000000000000e5 +2550 1 6 21 -0.13107200000000000000e6 +2550 1 18 33 0.13107200000000000000e6 +2550 3 6 19 0.65536000000000000000e5 +2550 3 6 20 0.65536000000000000000e5 +2550 4 12 12 0.13107200000000000000e6 +2551 3 6 21 0.65536000000000000000e5 +2551 3 11 20 -0.65536000000000000000e5 +2552 1 1 40 -0.65536000000000000000e5 +2552 1 2 33 0.26214400000000000000e6 +2552 1 11 42 -0.26214400000000000000e6 +2552 1 12 43 -0.52428800000000000000e6 +2552 1 23 38 0.65536000000000000000e5 +2552 1 28 43 0.26214400000000000000e6 +2552 1 32 47 0.26214400000000000000e6 +2552 1 33 48 0.26214400000000000000e6 +2552 2 2 32 0.65536000000000000000e5 +2552 2 3 17 -0.65536000000000000000e5 +2552 2 12 26 0.26214400000000000000e6 +2552 3 1 30 -0.26214400000000000000e6 +2552 3 1 38 -0.65536000000000000000e5 +2552 3 2 23 -0.65536000000000000000e5 +2552 3 2 39 -0.65536000000000000000e5 +2552 3 6 22 0.65536000000000000000e5 +2552 3 8 37 0.13107200000000000000e6 +2552 3 10 23 -0.13107200000000000000e6 +2552 3 13 42 0.52428800000000000000e6 +2552 3 28 41 0.26214400000000000000e6 +2552 3 29 42 0.26214400000000000000e6 +2552 4 3 31 -0.26214400000000000000e6 +2552 4 4 16 0.65536000000000000000e5 +2552 4 6 18 -0.13107200000000000000e6 +2553 1 1 40 0.65536000000000000000e5 +2553 1 2 25 -0.65536000000000000000e5 +2553 1 6 37 0.65536000000000000000e5 +2553 1 24 39 -0.65536000000000000000e5 +2553 2 3 33 -0.65536000000000000000e5 +2553 2 4 18 0.65536000000000000000e5 +2553 3 1 30 0.13107200000000000000e6 +2553 3 2 39 0.65536000000000000000e5 +2553 3 3 40 0.65536000000000000000e5 +2553 3 6 23 0.65536000000000000000e5 +2553 3 9 38 -0.13107200000000000000e6 +2553 3 10 23 -0.13107200000000000000e6 +2553 4 4 16 -0.65536000000000000000e5 +2554 1 2 25 0.65536000000000000000e5 +2554 1 2 33 -0.26214400000000000000e6 +2554 1 6 37 -0.65536000000000000000e5 +2554 1 9 40 0.13107200000000000000e6 +2554 1 10 25 -0.13107200000000000000e6 +2554 1 11 42 0.26214400000000000000e6 +2554 1 12 43 0.52428800000000000000e6 +2554 1 23 38 -0.65536000000000000000e5 +2554 1 24 39 0.65536000000000000000e5 +2554 1 28 43 -0.26214400000000000000e6 +2554 1 32 47 -0.26214400000000000000e6 +2554 1 33 48 -0.26214400000000000000e6 +2554 2 2 32 -0.65536000000000000000e5 +2554 2 3 17 0.65536000000000000000e5 +2554 2 3 33 0.65536000000000000000e5 +2554 2 4 18 -0.65536000000000000000e5 +2554 2 12 26 -0.26214400000000000000e6 +2554 3 1 30 0.13107200000000000000e6 +2554 3 1 38 0.65536000000000000000e5 +2554 3 2 23 0.65536000000000000000e5 +2554 3 3 40 -0.65536000000000000000e5 +2554 3 6 24 0.65536000000000000000e5 +2554 3 8 37 -0.13107200000000000000e6 +2554 3 9 38 0.13107200000000000000e6 +2554 3 10 23 0.26214400000000000000e6 +2554 3 13 42 -0.52428800000000000000e6 +2554 3 28 41 -0.26214400000000000000e6 +2554 3 29 42 -0.26214400000000000000e6 +2554 4 3 31 0.26214400000000000000e6 +2554 4 5 17 0.65536000000000000000e5 +2554 4 6 18 0.13107200000000000000e6 +2555 3 5 26 -0.65536000000000000000e5 +2555 3 6 25 0.65536000000000000000e5 +2556 1 1 48 -0.65536000000000000000e5 +2556 1 2 25 -0.65536000000000000000e5 +2556 1 2 33 0.26214400000000000000e6 +2556 1 2 49 -0.65536000000000000000e5 +2556 1 6 37 0.65536000000000000000e5 +2556 1 8 39 -0.13107200000000000000e6 +2556 1 9 40 -0.39321600000000000000e6 +2556 1 10 25 0.13107200000000000000e6 +2556 1 10 41 0.26214400000000000000e6 +2556 1 11 26 -0.13107200000000000000e6 +2556 1 24 39 -0.65536000000000000000e5 +2556 1 26 41 0.26214400000000000000e6 +2556 1 28 43 -0.26214400000000000000e6 +2556 1 32 47 -0.26214400000000000000e6 +2556 1 33 48 0.26214400000000000000e6 +2556 2 3 17 -0.65536000000000000000e5 +2556 2 3 33 -0.65536000000000000000e5 +2556 2 4 18 0.65536000000000000000e5 +2556 2 4 34 0.13107200000000000000e6 +2556 2 12 26 0.26214400000000000000e6 +2556 2 16 30 -0.13107200000000000000e6 +2556 2 20 34 -0.26214400000000000000e6 +2556 2 28 34 -0.13107200000000000000e6 +2556 3 1 30 -0.13107200000000000000e6 +2556 3 1 38 -0.65536000000000000000e5 +2556 3 2 23 -0.65536000000000000000e5 +2556 3 3 40 0.65536000000000000000e5 +2556 3 5 26 0.65536000000000000000e5 +2556 3 6 26 0.65536000000000000000e5 +2556 3 8 37 0.13107200000000000000e6 +2556 3 9 38 -0.26214400000000000000e6 +2556 3 10 23 -0.26214400000000000000e6 +2556 3 10 39 -0.13107200000000000000e6 +2556 3 13 42 0.52428800000000000000e6 +2556 3 22 35 -0.52428800000000000000e6 +2556 3 28 41 -0.26214400000000000000e6 +2556 3 29 42 0.26214400000000000000e6 +2556 4 2 30 -0.13107200000000000000e6 +2556 4 3 31 -0.26214400000000000000e6 +2556 4 5 17 -0.65536000000000000000e5 +2556 4 5 19 0.65536000000000000000e5 +2556 4 6 18 -0.13107200000000000000e6 +2556 4 6 34 -0.26214400000000000000e6 +2556 4 18 22 -0.13107200000000000000e6 +2556 4 18 30 -0.13107200000000000000e6 +2556 4 21 33 -0.13107200000000000000e6 +2557 1 9 40 0.65536000000000000000e5 +2557 1 10 25 -0.65536000000000000000e5 +2557 3 6 27 0.65536000000000000000e5 +2558 1 2 33 0.13107200000000000000e6 +2558 1 9 40 -0.65536000000000000000e5 +2558 1 10 25 0.65536000000000000000e5 +2558 1 11 42 -0.13107200000000000000e6 +2558 1 12 43 -0.26214400000000000000e6 +2558 1 28 43 0.13107200000000000000e6 +2558 1 32 47 0.13107200000000000000e6 +2558 1 33 48 0.13107200000000000000e6 +2558 2 12 26 0.13107200000000000000e6 +2558 3 3 32 0.13107200000000000000e6 +2558 3 6 28 0.65536000000000000000e5 +2558 3 10 23 0.65536000000000000000e5 +2558 3 13 42 0.26214400000000000000e6 +2558 3 14 27 -0.26214400000000000000e6 +2558 3 28 41 0.13107200000000000000e6 +2558 3 29 42 0.13107200000000000000e6 +2558 4 3 31 -0.13107200000000000000e6 +2558 4 7 19 0.65536000000000000000e5 +2558 4 8 20 0.13107200000000000000e6 +2559 1 1 48 -0.32768000000000000000e5 +2559 1 2 49 -0.32768000000000000000e5 +2559 1 8 39 -0.65536000000000000000e5 +2559 1 9 40 -0.13107200000000000000e6 +2559 1 10 41 0.13107200000000000000e6 +2559 1 11 26 -0.65536000000000000000e5 +2559 1 11 42 0.13107200000000000000e6 +2559 1 12 43 0.26214400000000000000e6 +2559 1 23 38 -0.32768000000000000000e5 +2559 1 26 41 0.13107200000000000000e6 +2559 1 28 43 -0.26214400000000000000e6 +2559 1 32 47 -0.26214400000000000000e6 +2559 2 2 32 -0.32768000000000000000e5 +2559 2 4 34 0.65536000000000000000e5 +2559 2 16 30 -0.65536000000000000000e5 +2559 2 20 34 -0.13107200000000000000e6 +2559 2 28 34 -0.65536000000000000000e5 +2559 3 6 29 0.65536000000000000000e5 +2559 3 9 38 -0.65536000000000000000e5 +2559 3 10 39 -0.65536000000000000000e5 +2559 3 22 35 -0.26214400000000000000e6 +2559 3 28 41 -0.26214400000000000000e6 +2559 4 2 30 -0.65536000000000000000e5 +2559 4 6 34 -0.13107200000000000000e6 +2559 4 18 22 -0.65536000000000000000e5 +2559 4 18 30 -0.65536000000000000000e5 +2559 4 21 33 -0.65536000000000000000e5 +2560 3 6 30 0.65536000000000000000e5 +2560 3 11 26 -0.65536000000000000000e5 +2561 3 4 33 -0.65536000000000000000e5 +2561 3 6 31 0.65536000000000000000e5 +2562 1 2 33 -0.65536000000000000000e5 +2562 1 11 42 0.65536000000000000000e5 +2562 1 12 43 0.13107200000000000000e6 +2562 1 28 43 -0.65536000000000000000e5 +2562 1 32 47 -0.65536000000000000000e5 +2562 1 33 48 -0.65536000000000000000e5 +2562 2 12 26 -0.65536000000000000000e5 +2562 3 3 32 -0.65536000000000000000e5 +2562 3 4 33 0.65536000000000000000e5 +2562 3 5 34 -0.13107200000000000000e6 +2562 3 6 32 0.65536000000000000000e5 +2562 3 13 42 -0.13107200000000000000e6 +2562 3 14 27 0.13107200000000000000e6 +2562 3 28 41 -0.65536000000000000000e5 +2562 3 29 42 -0.65536000000000000000e5 +2562 4 3 31 0.65536000000000000000e5 +2562 4 8 20 -0.65536000000000000000e5 +2562 4 9 21 0.65536000000000000000e5 +2563 3 6 33 0.65536000000000000000e5 +2563 3 11 30 -0.65536000000000000000e5 +2564 1 15 30 -0.65536000000000000000e5 +2564 1 18 49 0.65536000000000000000e5 +2564 3 6 34 0.65536000000000000000e5 +2564 3 14 43 0.65536000000000000000e5 +2565 1 5 36 0.65536000000000000000e5 +2565 1 14 45 -0.65536000000000000000e5 +2565 1 15 46 0.13107200000000000000e6 +2565 1 18 33 -0.13107200000000000000e6 +2565 3 6 36 0.65536000000000000000e5 +2565 3 17 30 0.65536000000000000000e5 +2565 4 12 24 0.65536000000000000000e5 +2566 3 3 40 -0.65536000000000000000e5 +2566 3 6 37 0.65536000000000000000e5 +2567 1 1 48 -0.65536000000000000000e5 +2567 1 2 49 -0.13107200000000000000e6 +2567 1 6 37 0.65536000000000000000e5 +2567 1 8 39 -0.13107200000000000000e6 +2567 1 9 40 -0.26214400000000000000e6 +2567 1 10 41 0.26214400000000000000e6 +2567 1 12 43 0.52428800000000000000e6 +2567 1 23 38 -0.65536000000000000000e5 +2567 1 24 39 -0.65536000000000000000e5 +2567 1 25 40 0.65536000000000000000e5 +2567 1 26 41 0.13107200000000000000e6 +2567 1 28 43 -0.26214400000000000000e6 +2567 1 32 47 -0.52428800000000000000e6 +2567 2 2 32 -0.65536000000000000000e5 +2567 2 3 33 -0.65536000000000000000e5 +2567 2 5 27 0.65536000000000000000e5 +2567 2 16 30 -0.13107200000000000000e6 +2567 2 20 34 -0.26214400000000000000e6 +2567 3 3 40 0.65536000000000000000e5 +2567 3 6 38 0.65536000000000000000e5 +2567 3 9 38 -0.13107200000000000000e6 +2567 3 22 35 -0.52428800000000000000e6 +2567 3 28 41 -0.52428800000000000000e6 +2567 4 2 30 -0.13107200000000000000e6 +2567 4 6 34 -0.26214400000000000000e6 +2568 1 1 40 -0.65536000000000000000e5 +2568 1 1 48 0.65536000000000000000e5 +2568 1 2 33 0.52428800000000000000e6 +2568 1 2 49 0.13107200000000000000e6 +2568 1 6 37 -0.65536000000000000000e5 +2568 1 6 53 -0.65536000000000000000e5 +2568 1 8 39 0.13107200000000000000e6 +2568 1 10 25 0.26214400000000000000e6 +2568 1 10 41 -0.26214400000000000000e6 +2568 1 11 42 -0.52428800000000000000e6 +2568 1 12 43 -0.15728640000000000000e7 +2568 1 23 38 0.13107200000000000000e6 +2568 1 24 39 0.65536000000000000000e5 +2568 1 26 41 -0.13107200000000000000e6 +2568 1 28 43 0.78643200000000000000e6 +2568 1 32 47 0.10485760000000000000e7 +2568 1 33 48 0.52428800000000000000e6 +2568 2 2 32 0.13107200000000000000e6 +2568 2 3 17 -0.65536000000000000000e5 +2568 2 3 33 0.65536000000000000000e5 +2568 2 5 19 0.65536000000000000000e5 +2568 2 5 27 -0.65536000000000000000e5 +2568 2 5 35 -0.65536000000000000000e5 +2568 2 12 26 0.52428800000000000000e6 +2568 2 16 30 0.13107200000000000000e6 +2568 2 20 34 0.26214400000000000000e6 +2568 3 1 30 -0.26214400000000000000e6 +2568 3 1 38 -0.65536000000000000000e5 +2568 3 2 23 -0.65536000000000000000e5 +2568 3 2 39 -0.65536000000000000000e5 +2568 3 3 32 0.26214400000000000000e6 +2568 3 5 26 0.65536000000000000000e5 +2568 3 5 50 -0.13107200000000000000e6 +2568 3 6 39 0.65536000000000000000e5 +2568 3 8 37 0.13107200000000000000e6 +2568 3 9 38 0.13107200000000000000e6 +2568 3 10 39 -0.13107200000000000000e6 +2568 3 13 42 0.10485760000000000000e7 +2568 3 14 27 -0.52428800000000000000e6 +2568 3 22 35 0.52428800000000000000e6 +2568 3 25 38 0.65536000000000000000e5 +2568 3 26 39 0.65536000000000000000e5 +2568 3 28 41 0.10485760000000000000e7 +2568 3 29 42 0.52428800000000000000e6 +2568 4 2 30 0.13107200000000000000e6 +2568 4 3 31 -0.52428800000000000000e6 +2568 4 4 16 0.65536000000000000000e5 +2568 4 5 17 -0.65536000000000000000e5 +2568 4 6 18 -0.13107200000000000000e6 +2568 4 6 34 0.26214400000000000000e6 +2568 4 7 19 0.13107200000000000000e6 +2568 4 8 20 0.26214400000000000000e6 +2569 1 1 40 0.65536000000000000000e5 +2569 1 2 33 -0.52428800000000000000e6 +2569 1 6 53 0.65536000000000000000e5 +2569 1 9 40 0.39321600000000000000e6 +2569 1 10 25 -0.26214400000000000000e6 +2569 1 11 42 0.26214400000000000000e6 +2569 1 12 43 0.10485760000000000000e7 +2569 1 23 38 -0.65536000000000000000e5 +2569 1 25 40 -0.65536000000000000000e5 +2569 1 26 41 -0.13107200000000000000e6 +2569 1 28 43 -0.52428800000000000000e6 +2569 1 32 47 -0.52428800000000000000e6 +2569 1 33 48 -0.26214400000000000000e6 +2569 2 2 32 -0.65536000000000000000e5 +2569 2 3 17 0.65536000000000000000e5 +2569 2 5 19 -0.65536000000000000000e5 +2569 2 5 35 0.65536000000000000000e5 +2569 2 12 26 -0.52428800000000000000e6 +2569 3 1 30 0.26214400000000000000e6 +2569 3 1 38 0.65536000000000000000e5 +2569 3 2 23 0.65536000000000000000e5 +2569 3 2 39 0.65536000000000000000e5 +2569 3 3 32 -0.26214400000000000000e6 +2569 3 3 40 -0.65536000000000000000e5 +2569 3 5 26 -0.65536000000000000000e5 +2569 3 5 50 0.13107200000000000000e6 +2569 3 6 40 0.65536000000000000000e5 +2569 3 8 37 -0.13107200000000000000e6 +2569 3 10 39 0.26214400000000000000e6 +2569 3 13 42 -0.10485760000000000000e7 +2569 3 14 27 0.52428800000000000000e6 +2569 3 25 38 -0.65536000000000000000e5 +2569 3 26 39 -0.65536000000000000000e5 +2569 3 28 41 -0.52428800000000000000e6 +2569 3 29 42 -0.26214400000000000000e6 +2569 4 3 31 0.52428800000000000000e6 +2569 4 4 16 -0.65536000000000000000e5 +2569 4 5 17 0.65536000000000000000e5 +2569 4 6 18 0.13107200000000000000e6 +2569 4 7 19 -0.13107200000000000000e6 +2569 4 8 20 -0.26214400000000000000e6 +2569 4 18 22 0.13107200000000000000e6 +2569 4 19 19 0.13107200000000000000e6 +2570 3 6 41 0.65536000000000000000e5 +2570 3 10 39 -0.65536000000000000000e5 +2571 1 9 40 0.65536000000000000000e5 +2571 1 11 42 -0.13107200000000000000e6 +2571 1 26 41 -0.65536000000000000000e5 +2571 1 33 48 0.13107200000000000000e6 +2571 3 6 42 0.65536000000000000000e5 +2571 3 10 39 0.65536000000000000000e5 +2571 3 29 42 0.13107200000000000000e6 +2571 4 18 22 0.65536000000000000000e5 +2572 3 6 43 0.65536000000000000000e5 +2572 3 11 40 -0.65536000000000000000e5 +2573 1 26 33 -0.65536000000000000000e5 +2573 1 33 40 0.65536000000000000000e5 +2573 3 6 44 0.65536000000000000000e5 +2574 1 11 42 0.65536000000000000000e5 +2574 1 26 33 0.65536000000000000000e5 +2574 1 33 40 -0.65536000000000000000e5 +2574 1 33 48 -0.65536000000000000000e5 +2574 3 6 45 0.65536000000000000000e5 +2574 3 14 43 -0.13107200000000000000e6 +2574 3 29 42 -0.65536000000000000000e5 +2574 4 22 22 0.13107200000000000000e6 +2575 3 6 46 0.65536000000000000000e5 +2575 3 26 35 -0.65536000000000000000e5 +2576 1 6 53 0.65536000000000000000e5 +2576 1 25 40 -0.65536000000000000000e5 +2576 3 6 47 0.65536000000000000000e5 +2577 3 6 48 0.65536000000000000000e5 +2577 3 26 39 -0.65536000000000000000e5 +2578 1 6 53 -0.65536000000000000000e5 +2578 1 25 40 0.65536000000000000000e5 +2578 3 5 50 0.13107200000000000000e6 +2578 3 6 49 0.65536000000000000000e5 +2578 3 26 39 0.65536000000000000000e5 +2578 3 27 40 0.13107200000000000000e6 +2578 3 29 42 -0.26214400000000000000e6 +2578 4 5 33 0.65536000000000000000e5 +2578 4 18 30 0.13107200000000000000e6 +2579 3 5 50 0.65536000000000000000e5 +2579 3 6 50 0.65536000000000000000e5 +2579 3 27 40 0.65536000000000000000e5 +2579 3 29 42 -0.13107200000000000000e6 +2579 4 18 30 0.65536000000000000000e5 +2580 3 6 52 0.65536000000000000000e5 +2580 3 30 43 -0.65536000000000000000e5 +2581 3 6 53 0.65536000000000000000e5 +2581 3 39 40 -0.65536000000000000000e5 +2582 1 6 53 0.65536000000000000000e5 +2582 1 25 56 -0.65536000000000000000e5 +2582 3 6 54 0.65536000000000000000e5 +2582 3 10 55 0.26214400000000000000e6 +2582 3 22 51 -0.13107200000000000000e6 +2582 3 23 52 0.26214400000000000000e6 +2582 3 24 53 0.65536000000000000000e5 +2582 3 25 54 0.65536000000000000000e5 +2582 3 35 48 -0.52428800000000000000e6 +2582 3 38 51 -0.13107200000000000000e6 +2582 3 39 40 0.65536000000000000000e5 +2582 3 40 45 0.26214400000000000000e6 +2582 4 7 35 -0.13107200000000000000e6 +2582 4 21 33 0.13107200000000000000e6 +2582 4 22 34 0.26214400000000000000e6 +2582 4 28 28 0.13107200000000000000e6 +2582 4 28 32 0.65536000000000000000e5 +2583 1 1 48 0.65536000000000000000e5 +2583 1 2 49 0.65536000000000000000e5 +2583 1 8 39 0.13107200000000000000e6 +2583 1 9 40 0.13107200000000000000e6 +2583 1 10 41 -0.26214400000000000000e6 +2583 1 12 43 -0.52428800000000000000e6 +2583 1 23 38 0.65536000000000000000e5 +2583 1 26 41 -0.13107200000000000000e6 +2583 1 28 43 0.52428800000000000000e6 +2583 1 32 47 0.52428800000000000000e6 +2583 1 33 48 -0.26214400000000000000e6 +2583 1 40 55 0.13107200000000000000e6 +2583 2 2 32 0.65536000000000000000e5 +2583 2 4 34 -0.13107200000000000000e6 +2583 2 16 30 0.13107200000000000000e6 +2583 2 20 34 0.26214400000000000000e6 +2583 2 28 34 0.13107200000000000000e6 +2583 3 5 50 -0.13107200000000000000e6 +2583 3 6 56 0.65536000000000000000e5 +2583 3 9 38 0.13107200000000000000e6 +2583 3 10 55 -0.26214400000000000000e6 +2583 3 22 35 0.52428800000000000000e6 +2583 3 22 51 0.13107200000000000000e6 +2583 3 23 52 -0.26214400000000000000e6 +2583 3 24 53 -0.65536000000000000000e5 +2583 3 27 40 -0.13107200000000000000e6 +2583 3 28 41 0.52428800000000000000e6 +2583 3 35 48 0.52428800000000000000e6 +2583 3 38 51 0.13107200000000000000e6 +2583 3 40 45 -0.26214400000000000000e6 +2583 4 2 30 0.13107200000000000000e6 +2583 4 6 34 0.26214400000000000000e6 +2583 4 7 35 0.13107200000000000000e6 +2583 4 19 35 0.65536000000000000000e5 +2583 4 22 34 -0.26214400000000000000e6 +2583 4 28 32 -0.65536000000000000000e5 +2584 1 1 48 -0.16384000000000000000e5 +2584 1 2 33 -0.65536000000000000000e5 +2584 1 2 49 -0.16384000000000000000e5 +2584 1 3 34 0.65536000000000000000e5 +2584 1 4 11 0.16384000000000000000e5 +2584 1 8 23 -0.16384000000000000000e5 +2584 1 8 39 -0.16384000000000000000e5 +2584 1 9 40 -0.16384000000000000000e5 +2584 1 10 41 -0.32768000000000000000e5 +2584 1 11 42 0.32768000000000000000e5 +2584 1 12 43 0.13107200000000000000e6 +2584 1 23 38 -0.16384000000000000000e5 +2584 1 26 41 0.16384000000000000000e5 +2584 1 28 43 -0.65536000000000000000e5 +2584 1 32 47 -0.98304000000000000000e5 +2584 1 33 48 -0.32768000000000000000e5 +2584 2 2 8 -0.16384000000000000000e5 +2584 2 2 32 -0.16384000000000000000e5 +2584 2 3 9 0.16384000000000000000e5 +2584 2 7 21 -0.32768000000000000000e5 +2584 2 12 26 -0.32768000000000000000e5 +2584 2 16 30 -0.16384000000000000000e5 +2584 2 20 34 -0.32768000000000000000e5 +2584 3 1 14 0.65536000000000000000e5 +2584 3 1 30 0.16384000000000000000e5 +2584 3 2 7 0.16384000000000000000e5 +2584 3 2 15 -0.32768000000000000000e5 +2584 3 3 32 -0.65536000000000000000e5 +2584 3 4 9 0.16384000000000000000e5 +2584 3 7 7 0.65536000000000000000e5 +2584 3 7 12 -0.65536000000000000000e5 +2584 3 8 37 -0.16384000000000000000e5 +2584 3 10 23 0.32768000000000000000e5 +2584 3 13 42 -0.65536000000000000000e5 +2584 3 22 35 -0.65536000000000000000e5 +2584 3 28 41 -0.98304000000000000000e5 +2584 3 29 42 -0.32768000000000000000e5 +2584 4 2 6 0.16384000000000000000e5 +2584 4 2 30 -0.16384000000000000000e5 +2584 4 3 31 0.32768000000000000000e5 +2584 4 6 6 0.65536000000000000000e5 +2584 4 6 18 0.16384000000000000000e5 +2584 4 6 34 -0.32768000000000000000e5 +2585 1 1 48 0.32768000000000000000e5 +2585 1 2 33 0.13107200000000000000e6 +2585 1 2 49 0.32768000000000000000e5 +2585 1 3 34 -0.13107200000000000000e6 +2585 1 4 11 -0.32768000000000000000e5 +2585 1 8 23 0.32768000000000000000e5 +2585 1 8 39 0.32768000000000000000e5 +2585 1 9 40 0.32768000000000000000e5 +2585 1 10 41 0.65536000000000000000e5 +2585 1 11 42 -0.65536000000000000000e5 +2585 1 12 43 -0.26214400000000000000e6 +2585 1 23 38 0.32768000000000000000e5 +2585 1 26 41 -0.32768000000000000000e5 +2585 1 28 43 0.13107200000000000000e6 +2585 1 32 47 0.19660800000000000000e6 +2585 1 33 48 0.65536000000000000000e5 +2585 2 2 8 0.32768000000000000000e5 +2585 2 2 32 0.32768000000000000000e5 +2585 2 3 9 -0.32768000000000000000e5 +2585 2 7 21 0.65536000000000000000e5 +2585 2 12 26 0.65536000000000000000e5 +2585 2 16 30 0.32768000000000000000e5 +2585 2 20 34 0.65536000000000000000e5 +2585 3 1 14 -0.65536000000000000000e5 +2585 3 1 30 -0.32768000000000000000e5 +2585 3 2 7 -0.32768000000000000000e5 +2585 3 2 15 0.65536000000000000000e5 +2585 3 3 32 0.13107200000000000000e6 +2585 3 4 9 -0.32768000000000000000e5 +2585 3 7 8 0.65536000000000000000e5 +2585 3 8 37 0.32768000000000000000e5 +2585 3 10 23 -0.65536000000000000000e5 +2585 3 13 42 0.13107200000000000000e6 +2585 3 22 35 0.13107200000000000000e6 +2585 3 28 41 0.19660800000000000000e6 +2585 3 29 42 0.65536000000000000000e5 +2585 4 2 6 -0.32768000000000000000e5 +2585 4 2 30 0.32768000000000000000e5 +2585 4 3 31 -0.65536000000000000000e5 +2585 4 6 18 -0.32768000000000000000e5 +2585 4 6 34 0.65536000000000000000e5 +2586 3 1 14 -0.65536000000000000000e5 +2586 3 7 9 0.65536000000000000000e5 +2587 2 4 10 0.65536000000000000000e5 +2587 2 7 21 -0.65536000000000000000e5 +2587 3 1 14 0.65536000000000000000e5 +2587 3 2 15 0.65536000000000000000e5 +2587 3 3 16 -0.13107200000000000000e6 +2587 3 7 10 0.65536000000000000000e5 +2588 3 2 15 -0.65536000000000000000e5 +2588 3 7 11 0.65536000000000000000e5 +2589 1 2 17 -0.65536000000000000000e5 +2589 1 16 23 0.65536000000000000000e5 +2589 3 7 13 0.65536000000000000000e5 +2590 3 3 16 -0.65536000000000000000e5 +2590 3 7 14 0.65536000000000000000e5 +2591 1 3 18 -0.65536000000000000000e5 +2591 1 12 43 0.65536000000000000000e5 +2591 3 7 15 0.65536000000000000000e5 +2591 3 14 27 0.65536000000000000000e5 +2592 1 2 17 -0.32768000000000000000e5 +2592 1 16 23 0.32768000000000000000e5 +2592 3 3 16 -0.32768000000000000000e5 +2592 3 7 12 -0.32768000000000000000e5 +2592 3 7 16 0.65536000000000000000e5 +2592 4 1 13 -0.32768000000000000000e5 +2593 1 2 17 -0.32768000000000000000e5 +2593 1 3 34 -0.32768000000000000000e5 +2593 1 4 19 -0.65536000000000000000e5 +2593 1 4 35 -0.32768000000000000000e5 +2593 1 12 43 -0.65536000000000000000e5 +2593 1 14 45 -0.65536000000000000000e5 +2593 1 17 48 0.32768000000000000000e5 +2593 1 18 49 0.32768000000000000000e5 +2593 1 20 27 0.13107200000000000000e6 +2593 2 6 12 -0.32768000000000000000e5 +2593 2 9 23 -0.32768000000000000000e5 +2593 2 10 24 -0.65536000000000000000e5 +2593 2 14 28 0.32768000000000000000e5 +2593 3 4 17 0.32768000000000000000e5 +2593 3 5 34 -0.32768000000000000000e5 +2593 3 7 17 0.65536000000000000000e5 +2593 3 13 42 0.32768000000000000000e5 +2593 3 14 27 -0.65536000000000000000e5 +2593 3 14 43 0.32768000000000000000e5 +2593 4 2 14 0.32768000000000000000e5 +2594 1 3 18 -0.32768000000000000000e5 +2594 1 12 43 0.32768000000000000000e5 +2594 3 3 16 -0.32768000000000000000e5 +2594 3 4 17 -0.32768000000000000000e5 +2594 3 7 18 0.65536000000000000000e5 +2594 3 14 27 0.32768000000000000000e5 +2594 4 2 14 -0.32768000000000000000e5 +2595 1 2 17 -0.32768000000000000000e5 +2595 1 3 18 -0.16384000000000000000e5 +2595 1 3 34 -0.16384000000000000000e5 +2595 1 4 19 -0.32768000000000000000e5 +2595 1 4 35 -0.16384000000000000000e5 +2595 1 12 43 -0.16384000000000000000e5 +2595 1 14 45 -0.32768000000000000000e5 +2595 1 16 23 0.16384000000000000000e5 +2595 1 17 48 0.16384000000000000000e5 +2595 1 18 49 0.16384000000000000000e5 +2595 1 20 27 0.65536000000000000000e5 +2595 2 6 12 -0.16384000000000000000e5 +2595 2 9 23 -0.16384000000000000000e5 +2595 2 10 24 -0.32768000000000000000e5 +2595 2 14 28 0.16384000000000000000e5 +2595 3 3 16 -0.32768000000000000000e5 +2595 3 5 34 -0.16384000000000000000e5 +2595 3 7 12 -0.16384000000000000000e5 +2595 3 7 19 0.65536000000000000000e5 +2595 3 13 42 0.16384000000000000000e5 +2595 3 14 27 -0.16384000000000000000e5 +2595 3 14 43 0.16384000000000000000e5 +2595 4 1 13 -0.16384000000000000000e5 +2595 4 10 10 -0.65536000000000000000e5 +2596 3 7 21 0.65536000000000000000e5 +2596 3 8 21 0.65536000000000000000e5 +2596 3 12 21 -0.13107200000000000000e6 +2596 3 14 19 0.65536000000000000000e5 +2596 4 13 13 0.13107200000000000000e6 +2597 1 1 24 -0.32768000000000000000e5 +2597 1 1 40 -0.32768000000000000000e5 +2597 1 22 37 0.32768000000000000000e5 +2597 1 23 38 0.32768000000000000000e5 +2597 2 2 16 -0.32768000000000000000e5 +2597 2 16 16 0.65536000000000000000e5 +2597 3 1 22 -0.32768000000000000000e5 +2597 3 1 38 -0.32768000000000000000e5 +2597 3 2 23 -0.32768000000000000000e5 +2597 3 7 22 0.65536000000000000000e5 +2597 3 22 27 0.65536000000000000000e5 +2597 4 16 16 -0.65536000000000000000e5 +2598 1 7 38 0.65536000000000000000e5 +2598 1 8 23 -0.65536000000000000000e5 +2598 3 7 23 0.65536000000000000000e5 +2599 1 2 33 -0.13107200000000000000e6 +2599 1 11 42 0.13107200000000000000e6 +2599 1 12 43 0.26214400000000000000e6 +2599 1 28 43 -0.13107200000000000000e6 +2599 1 32 47 -0.13107200000000000000e6 +2599 1 33 48 -0.13107200000000000000e6 +2599 2 12 26 -0.13107200000000000000e6 +2599 3 1 30 0.65536000000000000000e5 +2599 3 7 24 0.65536000000000000000e5 +2599 3 10 23 0.65536000000000000000e5 +2599 3 13 42 -0.26214400000000000000e6 +2599 3 28 41 -0.13107200000000000000e6 +2599 3 29 42 -0.13107200000000000000e6 +2599 4 3 31 0.13107200000000000000e6 +2599 4 6 18 0.65536000000000000000e5 +2600 3 1 30 -0.65536000000000000000e5 +2600 3 7 25 0.65536000000000000000e5 +2601 3 7 26 0.65536000000000000000e5 +2601 3 10 23 -0.65536000000000000000e5 +2602 1 1 32 -0.65536000000000000000e5 +2602 1 2 33 0.65536000000000000000e5 +2602 1 3 34 -0.13107200000000000000e6 +2602 1 10 41 0.65536000000000000000e5 +2602 1 11 42 -0.65536000000000000000e5 +2602 1 12 43 -0.13107200000000000000e6 +2602 1 16 23 0.13107200000000000000e6 +2602 1 28 43 0.65536000000000000000e5 +2602 1 32 47 0.65536000000000000000e5 +2602 1 33 48 0.65536000000000000000e5 +2602 2 1 31 -0.65536000000000000000e5 +2602 2 7 21 0.65536000000000000000e5 +2602 2 12 26 0.65536000000000000000e5 +2602 3 1 34 -0.13107200000000000000e6 +2602 3 2 31 0.65536000000000000000e5 +2602 3 3 32 0.65536000000000000000e5 +2602 3 7 27 0.65536000000000000000e5 +2602 3 13 42 0.13107200000000000000e6 +2602 3 28 41 0.65536000000000000000e5 +2602 3 29 42 0.65536000000000000000e5 +2602 4 3 31 -0.65536000000000000000e5 +2603 3 2 31 -0.65536000000000000000e5 +2603 3 7 28 0.65536000000000000000e5 +2604 1 2 33 -0.65536000000000000000e5 +2604 1 11 42 0.65536000000000000000e5 +2604 1 12 43 0.13107200000000000000e6 +2604 1 28 43 -0.65536000000000000000e5 +2604 1 32 47 -0.65536000000000000000e5 +2604 1 33 48 -0.65536000000000000000e5 +2604 2 12 26 -0.65536000000000000000e5 +2604 3 7 29 0.65536000000000000000e5 +2604 3 13 42 -0.13107200000000000000e6 +2604 3 28 41 -0.65536000000000000000e5 +2604 3 29 42 -0.65536000000000000000e5 +2604 4 3 31 0.65536000000000000000e5 +2605 3 3 32 -0.65536000000000000000e5 +2605 3 7 30 0.65536000000000000000e5 +2606 3 1 34 -0.65536000000000000000e5 +2606 3 7 31 0.65536000000000000000e5 +2607 1 3 34 -0.65536000000000000000e5 +2607 1 16 47 0.65536000000000000000e5 +2607 3 7 32 0.65536000000000000000e5 +2607 3 12 41 0.65536000000000000000e5 +2608 3 7 33 0.65536000000000000000e5 +2608 3 14 27 -0.65536000000000000000e5 +2609 1 3 18 -0.32768000000000000000e5 +2609 1 4 19 0.65536000000000000000e5 +2609 1 4 35 0.32768000000000000000e5 +2609 1 12 43 0.65536000000000000000e5 +2609 1 14 45 0.65536000000000000000e5 +2609 1 17 48 -0.32768000000000000000e5 +2609 1 18 49 -0.32768000000000000000e5 +2609 1 20 27 -0.13107200000000000000e6 +2609 1 27 34 0.65536000000000000000e5 +2609 2 9 23 0.32768000000000000000e5 +2609 2 10 24 0.65536000000000000000e5 +2609 2 14 28 -0.32768000000000000000e5 +2609 3 3 16 -0.32768000000000000000e5 +2609 3 4 17 -0.32768000000000000000e5 +2609 3 5 34 0.32768000000000000000e5 +2609 3 7 34 0.65536000000000000000e5 +2609 3 13 42 -0.32768000000000000000e5 +2609 3 14 27 0.65536000000000000000e5 +2609 3 14 43 -0.32768000000000000000e5 +2609 4 2 14 -0.32768000000000000000e5 +2610 1 3 18 0.32768000000000000000e5 +2610 1 4 19 -0.65536000000000000000e5 +2610 1 12 43 -0.32768000000000000000e5 +2610 1 13 44 0.65536000000000000000e5 +2610 3 3 16 0.32768000000000000000e5 +2610 3 4 17 0.32768000000000000000e5 +2610 3 7 35 0.65536000000000000000e5 +2610 3 14 27 -0.32768000000000000000e5 +2610 4 2 14 0.32768000000000000000e5 +2611 3 7 37 0.65536000000000000000e5 +2611 3 22 27 -0.65536000000000000000e5 +2612 3 7 38 0.65536000000000000000e5 +2612 3 8 37 -0.65536000000000000000e5 +2613 1 9 40 0.65536000000000000000e5 +2613 1 10 41 -0.13107200000000000000e6 +2613 1 26 41 -0.65536000000000000000e5 +2613 1 32 47 0.13107200000000000000e6 +2613 3 7 39 0.65536000000000000000e5 +2613 3 9 38 0.65536000000000000000e5 +2613 3 28 41 0.13107200000000000000e6 +2613 4 2 30 0.65536000000000000000e5 +2614 3 7 40 0.65536000000000000000e5 +2614 3 9 38 -0.65536000000000000000e5 +2615 1 9 40 0.32768000000000000000e5 +2615 1 10 41 -0.65536000000000000000e5 +2615 1 26 41 -0.32768000000000000000e5 +2615 1 32 47 0.65536000000000000000e5 +2615 3 7 41 0.65536000000000000000e5 +2615 3 8 37 -0.32768000000000000000e5 +2615 3 9 38 0.32768000000000000000e5 +2615 3 22 27 -0.32768000000000000000e5 +2615 3 28 41 0.65536000000000000000e5 +2615 4 1 29 -0.32768000000000000000e5 +2615 4 2 30 0.32768000000000000000e5 +2616 1 11 42 -0.65536000000000000000e5 +2616 1 33 48 0.65536000000000000000e5 +2616 2 12 26 0.65536000000000000000e5 +2616 2 20 34 -0.65536000000000000000e5 +2616 3 7 42 0.65536000000000000000e5 +2616 3 13 42 0.13107200000000000000e6 +2616 3 22 35 -0.13107200000000000000e6 +2616 3 29 42 0.65536000000000000000e5 +2616 4 3 31 -0.65536000000000000000e5 +2616 4 6 34 -0.65536000000000000000e5 +2617 1 10 41 -0.65536000000000000000e5 +2617 1 32 47 0.65536000000000000000e5 +2617 3 7 43 0.65536000000000000000e5 +2617 3 28 41 0.65536000000000000000e5 +2618 3 7 44 0.65536000000000000000e5 +2618 3 12 41 -0.65536000000000000000e5 +2619 3 7 45 0.65536000000000000000e5 +2619 3 22 35 -0.65536000000000000000e5 +2620 1 13 44 -0.65536000000000000000e5 +2620 1 34 41 0.65536000000000000000e5 +2620 3 7 46 0.65536000000000000000e5 +2621 1 6 53 0.32768000000000000000e5 +2621 1 25 40 -0.32768000000000000000e5 +2621 2 4 34 0.65536000000000000000e5 +2621 2 16 30 0.65536000000000000000e5 +2621 2 16 34 -0.65536000000000000000e5 +2621 2 21 35 -0.65536000000000000000e5 +2621 3 5 50 0.65536000000000000000e5 +2621 3 7 47 0.65536000000000000000e5 +2621 3 7 52 -0.26214400000000000000e6 +2621 3 24 37 0.32768000000000000000e5 +2621 3 27 40 0.65536000000000000000e5 +2621 3 28 41 0.26214400000000000000e6 +2621 4 4 32 -0.32768000000000000000e5 +2621 4 6 34 0.13107200000000000000e6 +2621 4 7 35 -0.65536000000000000000e5 +2621 4 16 28 0.32768000000000000000e5 +2621 4 17 29 -0.65536000000000000000e5 +2622 1 6 53 0.32768000000000000000e5 +2622 1 25 40 -0.32768000000000000000e5 +2622 3 7 48 0.65536000000000000000e5 +2622 3 24 37 0.32768000000000000000e5 +2622 3 27 40 0.13107200000000000000e6 +2622 3 28 41 -0.13107200000000000000e6 +2622 4 4 32 -0.32768000000000000000e5 +2622 4 16 28 0.32768000000000000000e5 +2622 4 17 29 0.65536000000000000000e5 +2623 1 6 53 -0.32768000000000000000e5 +2623 1 25 40 0.32768000000000000000e5 +2623 3 7 49 0.65536000000000000000e5 +2623 3 24 37 -0.32768000000000000000e5 +2623 3 27 40 -0.65536000000000000000e5 +2623 4 4 32 0.32768000000000000000e5 +2623 4 16 28 -0.32768000000000000000e5 +2624 1 6 53 0.16384000000000000000e5 +2624 1 25 40 -0.16384000000000000000e5 +2624 2 4 34 0.32768000000000000000e5 +2624 2 21 35 -0.32768000000000000000e5 +2624 3 5 50 0.32768000000000000000e5 +2624 3 7 50 0.65536000000000000000e5 +2624 3 7 52 -0.13107200000000000000e6 +2624 3 24 37 0.16384000000000000000e5 +2624 3 27 40 0.65536000000000000000e5 +2624 3 28 41 0.65536000000000000000e5 +2624 4 4 32 -0.16384000000000000000e5 +2624 4 6 34 0.65536000000000000000e5 +2624 4 7 35 -0.32768000000000000000e5 +2624 4 16 28 0.16384000000000000000e5 +2625 3 7 51 0.65536000000000000000e5 +2625 3 28 41 -0.65536000000000000000e5 +2626 1 24 55 -0.65536000000000000000e5 +2626 1 26 41 0.65536000000000000000e5 +2626 1 32 47 -0.13107200000000000000e6 +2626 1 37 52 0.13107200000000000000e6 +2626 3 7 53 0.65536000000000000000e5 +2626 3 22 51 0.65536000000000000000e5 +2626 3 27 40 -0.65536000000000000000e5 +2626 4 20 32 0.65536000000000000000e5 +2627 3 7 54 0.65536000000000000000e5 +2627 3 22 51 -0.65536000000000000000e5 +2628 1 32 47 -0.65536000000000000000e5 +2628 1 37 52 0.65536000000000000000e5 +2628 3 7 55 0.65536000000000000000e5 +2629 3 7 56 0.65536000000000000000e5 +2629 3 37 50 -0.65536000000000000000e5 +2630 3 1 14 -0.32768000000000000000e5 +2630 3 8 8 0.65536000000000000000e5 +2631 2 4 10 0.65536000000000000000e5 +2631 2 7 21 -0.65536000000000000000e5 +2631 3 1 14 0.65536000000000000000e5 +2631 3 2 15 0.65536000000000000000e5 +2631 3 3 16 -0.13107200000000000000e6 +2631 3 8 9 0.65536000000000000000e5 +2632 3 2 15 -0.65536000000000000000e5 +2632 3 8 10 0.65536000000000000000e5 +2633 1 2 33 -0.65536000000000000000e5 +2633 1 6 13 -0.65536000000000000000e5 +2633 1 10 41 -0.65536000000000000000e5 +2633 1 12 43 0.13107200000000000000e6 +2633 2 12 26 -0.65536000000000000000e5 +2633 3 3 32 -0.65536000000000000000e5 +2633 3 8 11 0.65536000000000000000e5 +2633 3 14 27 0.13107200000000000000e6 +2633 4 8 20 -0.65536000000000000000e5 +2634 1 2 17 -0.65536000000000000000e5 +2634 1 16 23 0.65536000000000000000e5 +2634 3 8 12 0.65536000000000000000e5 +2635 3 3 16 -0.65536000000000000000e5 +2635 3 8 13 0.65536000000000000000e5 +2636 1 3 18 -0.65536000000000000000e5 +2636 1 12 43 0.65536000000000000000e5 +2636 3 8 14 0.65536000000000000000e5 +2636 3 14 27 0.65536000000000000000e5 +2637 3 4 17 -0.65536000000000000000e5 +2637 3 8 15 0.65536000000000000000e5 +2638 1 2 17 -0.32768000000000000000e5 +2638 1 3 34 -0.32768000000000000000e5 +2638 1 4 19 -0.65536000000000000000e5 +2638 1 4 35 -0.32768000000000000000e5 +2638 1 12 43 -0.65536000000000000000e5 +2638 1 14 45 -0.65536000000000000000e5 +2638 1 17 48 0.32768000000000000000e5 +2638 1 18 49 0.32768000000000000000e5 +2638 1 20 27 0.13107200000000000000e6 +2638 2 6 12 -0.32768000000000000000e5 +2638 2 9 23 -0.32768000000000000000e5 +2638 2 10 24 -0.65536000000000000000e5 +2638 2 14 28 0.32768000000000000000e5 +2638 3 4 17 0.32768000000000000000e5 +2638 3 5 34 -0.32768000000000000000e5 +2638 3 8 16 0.65536000000000000000e5 +2638 3 13 42 0.32768000000000000000e5 +2638 3 14 27 -0.65536000000000000000e5 +2638 3 14 43 0.32768000000000000000e5 +2638 4 2 14 0.32768000000000000000e5 +2639 1 3 18 -0.32768000000000000000e5 +2639 1 12 43 0.32768000000000000000e5 +2639 3 3 16 -0.32768000000000000000e5 +2639 3 4 17 -0.32768000000000000000e5 +2639 3 8 17 0.65536000000000000000e5 +2639 3 14 27 0.32768000000000000000e5 +2639 4 2 14 -0.32768000000000000000e5 +2640 1 4 35 0.32768000000000000000e5 +2640 1 10 17 -0.65536000000000000000e5 +2640 1 12 43 0.32768000000000000000e5 +2640 1 14 45 0.65536000000000000000e5 +2640 1 17 48 -0.32768000000000000000e5 +2640 1 18 49 -0.32768000000000000000e5 +2640 2 9 23 0.32768000000000000000e5 +2640 2 14 28 -0.32768000000000000000e5 +2640 3 5 34 0.32768000000000000000e5 +2640 3 8 18 0.65536000000000000000e5 +2640 3 13 42 -0.32768000000000000000e5 +2640 3 14 27 0.32768000000000000000e5 +2640 3 14 43 -0.32768000000000000000e5 +2641 3 7 20 -0.65536000000000000000e5 +2641 3 8 19 0.65536000000000000000e5 +2642 1 3 18 -0.16384000000000000000e5 +2642 1 4 35 0.16384000000000000000e5 +2642 1 5 20 -0.32768000000000000000e5 +2642 1 5 36 0.32768000000000000000e5 +2642 1 10 17 -0.32768000000000000000e5 +2642 1 12 43 0.32768000000000000000e5 +2642 1 14 45 0.32768000000000000000e5 +2642 1 17 48 -0.16384000000000000000e5 +2642 1 18 49 -0.16384000000000000000e5 +2642 2 9 23 0.16384000000000000000e5 +2642 2 14 28 -0.16384000000000000000e5 +2642 3 3 16 -0.16384000000000000000e5 +2642 3 4 17 -0.16384000000000000000e5 +2642 3 5 34 0.16384000000000000000e5 +2642 3 8 20 0.65536000000000000000e5 +2642 3 13 42 -0.16384000000000000000e5 +2642 3 14 27 0.32768000000000000000e5 +2642 3 14 43 -0.16384000000000000000e5 +2642 4 2 14 -0.16384000000000000000e5 +2642 4 3 15 -0.32768000000000000000e5 +2643 1 7 38 0.65536000000000000000e5 +2643 1 8 23 -0.65536000000000000000e5 +2643 3 8 22 0.65536000000000000000e5 +2644 1 2 33 -0.13107200000000000000e6 +2644 1 11 42 0.13107200000000000000e6 +2644 1 12 43 0.26214400000000000000e6 +2644 1 28 43 -0.13107200000000000000e6 +2644 1 32 47 -0.13107200000000000000e6 +2644 1 33 48 -0.13107200000000000000e6 +2644 2 12 26 -0.13107200000000000000e6 +2644 3 1 30 0.65536000000000000000e5 +2644 3 8 23 0.65536000000000000000e5 +2644 3 10 23 0.65536000000000000000e5 +2644 3 13 42 -0.26214400000000000000e6 +2644 3 28 41 -0.13107200000000000000e6 +2644 3 29 42 -0.13107200000000000000e6 +2644 4 3 31 0.13107200000000000000e6 +2644 4 6 18 0.65536000000000000000e5 +2645 3 1 30 -0.65536000000000000000e5 +2645 3 8 24 0.65536000000000000000e5 +2646 3 8 25 0.65536000000000000000e5 +2646 3 10 23 -0.65536000000000000000e5 +2647 1 9 40 0.65536000000000000000e5 +2647 1 10 25 -0.65536000000000000000e5 +2647 3 8 26 0.65536000000000000000e5 +2648 3 2 31 -0.65536000000000000000e5 +2648 3 8 27 0.65536000000000000000e5 +2649 1 2 33 -0.65536000000000000000e5 +2649 1 11 42 0.65536000000000000000e5 +2649 1 12 43 0.13107200000000000000e6 +2649 1 28 43 -0.65536000000000000000e5 +2649 1 32 47 -0.65536000000000000000e5 +2649 1 33 48 -0.65536000000000000000e5 +2649 2 12 26 -0.65536000000000000000e5 +2649 3 8 28 0.65536000000000000000e5 +2649 3 13 42 -0.13107200000000000000e6 +2649 3 28 41 -0.65536000000000000000e5 +2649 3 29 42 -0.65536000000000000000e5 +2649 4 3 31 0.65536000000000000000e5 +2650 3 3 32 -0.65536000000000000000e5 +2650 3 8 29 0.65536000000000000000e5 +2651 1 2 33 0.65536000000000000000e5 +2651 1 11 42 -0.65536000000000000000e5 +2651 1 12 43 -0.13107200000000000000e6 +2651 1 28 43 0.65536000000000000000e5 +2651 1 32 47 0.65536000000000000000e5 +2651 1 33 48 0.65536000000000000000e5 +2651 2 12 26 0.65536000000000000000e5 +2651 3 3 32 0.65536000000000000000e5 +2651 3 8 30 0.65536000000000000000e5 +2651 3 13 42 0.13107200000000000000e6 +2651 3 14 27 -0.13107200000000000000e6 +2651 3 28 41 0.65536000000000000000e5 +2651 3 29 42 0.65536000000000000000e5 +2651 4 3 31 -0.65536000000000000000e5 +2651 4 8 20 0.65536000000000000000e5 +2652 1 3 34 -0.65536000000000000000e5 +2652 1 16 47 0.65536000000000000000e5 +2652 3 8 31 0.65536000000000000000e5 +2652 3 12 41 0.65536000000000000000e5 +2653 3 8 32 0.65536000000000000000e5 +2653 3 14 27 -0.65536000000000000000e5 +2654 1 4 35 -0.65536000000000000000e5 +2654 1 17 48 0.65536000000000000000e5 +2654 3 8 33 0.65536000000000000000e5 +2654 3 13 42 0.65536000000000000000e5 +2655 1 3 18 0.32768000000000000000e5 +2655 1 4 19 -0.65536000000000000000e5 +2655 1 12 43 -0.32768000000000000000e5 +2655 1 13 44 0.65536000000000000000e5 +2655 3 3 16 0.32768000000000000000e5 +2655 3 4 17 0.32768000000000000000e5 +2655 3 8 34 0.65536000000000000000e5 +2655 3 14 27 -0.32768000000000000000e5 +2655 4 2 14 0.32768000000000000000e5 +2656 3 8 35 0.65536000000000000000e5 +2656 3 16 29 -0.65536000000000000000e5 +2657 1 3 18 0.16384000000000000000e5 +2657 1 4 19 -0.32768000000000000000e5 +2657 1 5 36 -0.32768000000000000000e5 +2657 1 12 43 -0.16384000000000000000e5 +2657 1 13 44 0.32768000000000000000e5 +2657 1 14 45 0.32768000000000000000e5 +2657 3 3 16 0.16384000000000000000e5 +2657 3 4 17 0.16384000000000000000e5 +2657 3 8 36 0.65536000000000000000e5 +2657 3 14 27 -0.16384000000000000000e5 +2657 3 16 29 -0.32768000000000000000e5 +2657 4 2 14 0.16384000000000000000e5 +2657 4 11 23 -0.32768000000000000000e5 +2658 1 9 40 0.65536000000000000000e5 +2658 1 10 41 -0.13107200000000000000e6 +2658 1 26 41 -0.65536000000000000000e5 +2658 1 32 47 0.13107200000000000000e6 +2658 3 8 38 0.65536000000000000000e5 +2658 3 9 38 0.65536000000000000000e5 +2658 3 28 41 0.13107200000000000000e6 +2658 4 2 30 0.65536000000000000000e5 +2659 3 8 39 0.65536000000000000000e5 +2659 3 9 38 -0.65536000000000000000e5 +2660 1 9 40 -0.65536000000000000000e5 +2660 1 26 41 0.65536000000000000000e5 +2660 3 8 40 0.65536000000000000000e5 +2661 1 11 42 -0.65536000000000000000e5 +2661 1 33 48 0.65536000000000000000e5 +2661 2 12 26 0.65536000000000000000e5 +2661 2 20 34 -0.65536000000000000000e5 +2661 3 8 41 0.65536000000000000000e5 +2661 3 13 42 0.13107200000000000000e6 +2661 3 22 35 -0.13107200000000000000e6 +2661 3 29 42 0.65536000000000000000e5 +2661 4 3 31 -0.65536000000000000000e5 +2661 4 6 34 -0.65536000000000000000e5 +2662 1 10 41 -0.65536000000000000000e5 +2662 1 32 47 0.65536000000000000000e5 +2662 3 8 42 0.65536000000000000000e5 +2662 3 28 41 0.65536000000000000000e5 +2663 1 10 41 0.65536000000000000000e5 +2663 1 11 42 0.65536000000000000000e5 +2663 1 32 47 -0.65536000000000000000e5 +2663 1 33 48 -0.65536000000000000000e5 +2663 3 8 43 0.65536000000000000000e5 +2663 3 13 42 -0.13107200000000000000e6 +2663 3 28 41 -0.65536000000000000000e5 +2663 3 29 42 -0.65536000000000000000e5 +2663 4 3 31 0.65536000000000000000e5 +2664 3 8 44 0.65536000000000000000e5 +2664 3 22 35 -0.65536000000000000000e5 +2665 3 8 45 0.65536000000000000000e5 +2665 3 13 42 -0.65536000000000000000e5 +2666 1 14 45 -0.65536000000000000000e5 +2666 1 17 48 0.32768000000000000000e5 +2666 1 18 49 0.32768000000000000000e5 +2666 1 34 49 0.32768000000000000000e5 +2666 2 14 28 0.32768000000000000000e5 +2666 3 8 46 0.65536000000000000000e5 +2666 3 14 43 0.32768000000000000000e5 +2666 3 18 47 0.32768000000000000000e5 +2666 3 22 35 -0.32768000000000000000e5 +2666 4 14 26 -0.32768000000000000000e5 +2667 1 6 53 0.32768000000000000000e5 +2667 1 25 40 -0.32768000000000000000e5 +2667 3 8 47 0.65536000000000000000e5 +2667 3 24 37 0.32768000000000000000e5 +2667 3 27 40 0.13107200000000000000e6 +2667 3 28 41 -0.13107200000000000000e6 +2667 4 4 32 -0.32768000000000000000e5 +2667 4 16 28 0.32768000000000000000e5 +2667 4 17 29 0.65536000000000000000e5 +2668 1 6 53 -0.32768000000000000000e5 +2668 1 25 40 0.32768000000000000000e5 +2668 3 8 48 0.65536000000000000000e5 +2668 3 24 37 -0.32768000000000000000e5 +2668 3 27 40 -0.65536000000000000000e5 +2668 4 4 32 0.32768000000000000000e5 +2668 4 16 28 -0.32768000000000000000e5 +2669 3 8 49 0.65536000000000000000e5 +2669 3 27 40 -0.65536000000000000000e5 +2670 3 8 50 0.65536000000000000000e5 +2670 3 28 41 -0.65536000000000000000e5 +2671 1 6 53 -0.16384000000000000000e5 +2671 1 25 40 0.16384000000000000000e5 +2671 2 4 34 -0.32768000000000000000e5 +2671 2 21 35 0.32768000000000000000e5 +2671 3 5 50 -0.32768000000000000000e5 +2671 3 8 51 0.65536000000000000000e5 +2671 3 24 37 -0.16384000000000000000e5 +2671 3 27 40 -0.65536000000000000000e5 +2671 4 4 32 0.16384000000000000000e5 +2671 4 7 35 0.32768000000000000000e5 +2671 4 16 28 -0.16384000000000000000e5 +2672 1 6 53 -0.81920000000000000000e4 +2672 1 25 40 0.81920000000000000000e4 +2672 2 4 34 -0.16384000000000000000e5 +2672 2 21 35 0.16384000000000000000e5 +2672 3 5 50 -0.16384000000000000000e5 +2672 3 8 52 0.65536000000000000000e5 +2672 3 24 37 -0.81920000000000000000e4 +2672 3 27 40 -0.32768000000000000000e5 +2672 3 28 41 -0.32768000000000000000e5 +2672 3 29 42 -0.32768000000000000000e5 +2672 4 4 32 0.81920000000000000000e4 +2672 4 7 35 0.16384000000000000000e5 +2672 4 16 28 -0.81920000000000000000e4 +2672 4 23 27 -0.32768000000000000000e5 +2673 3 8 53 0.65536000000000000000e5 +2673 3 22 51 -0.65536000000000000000e5 +2674 1 24 55 0.65536000000000000000e5 +2674 1 26 41 -0.65536000000000000000e5 +2674 3 8 54 0.65536000000000000000e5 +2674 3 27 40 0.65536000000000000000e5 +2675 3 8 55 0.65536000000000000000e5 +2675 3 23 52 -0.65536000000000000000e5 +2676 1 24 55 -0.65536000000000000000e5 +2676 1 41 56 0.65536000000000000000e5 +2676 3 8 56 0.65536000000000000000e5 +2676 3 27 56 0.65536000000000000000e5 +2677 3 2 15 -0.32768000000000000000e5 +2677 3 9 9 0.65536000000000000000e5 +2678 1 2 33 -0.65536000000000000000e5 +2678 1 6 13 -0.65536000000000000000e5 +2678 1 10 41 -0.65536000000000000000e5 +2678 1 12 43 0.13107200000000000000e6 +2678 2 12 26 -0.65536000000000000000e5 +2678 3 3 32 -0.65536000000000000000e5 +2678 3 9 10 0.65536000000000000000e5 +2678 3 14 27 0.13107200000000000000e6 +2678 4 8 20 -0.65536000000000000000e5 +2679 1 4 35 -0.13107200000000000000e6 +2679 1 6 13 0.65536000000000000000e5 +2679 1 10 41 0.65536000000000000000e5 +2679 1 11 42 0.65536000000000000000e5 +2679 2 5 11 0.65536000000000000000e5 +2679 3 2 15 0.65536000000000000000e5 +2679 3 3 32 0.65536000000000000000e5 +2679 3 4 17 -0.13107200000000000000e6 +2679 3 4 33 0.65536000000000000000e5 +2679 3 9 11 0.65536000000000000000e5 +2680 3 3 16 -0.65536000000000000000e5 +2680 3 9 12 0.65536000000000000000e5 +2681 1 3 18 -0.65536000000000000000e5 +2681 1 12 43 0.65536000000000000000e5 +2681 3 9 13 0.65536000000000000000e5 +2681 3 14 27 0.65536000000000000000e5 +2682 3 4 17 -0.65536000000000000000e5 +2682 3 9 14 0.65536000000000000000e5 +2683 1 5 20 -0.13107200000000000000e6 +2683 1 5 36 0.13107200000000000000e6 +2683 3 4 17 0.65536000000000000000e5 +2683 3 5 18 0.65536000000000000000e5 +2683 3 9 15 0.65536000000000000000e5 +2683 4 8 12 0.65536000000000000000e5 +2684 1 3 18 -0.32768000000000000000e5 +2684 1 12 43 0.32768000000000000000e5 +2684 3 3 16 -0.32768000000000000000e5 +2684 3 4 17 -0.32768000000000000000e5 +2684 3 9 16 0.65536000000000000000e5 +2684 3 14 27 0.32768000000000000000e5 +2684 4 2 14 -0.32768000000000000000e5 +2685 1 4 35 0.32768000000000000000e5 +2685 1 10 17 -0.65536000000000000000e5 +2685 1 12 43 0.32768000000000000000e5 +2685 1 14 45 0.65536000000000000000e5 +2685 1 17 48 -0.32768000000000000000e5 +2685 1 18 49 -0.32768000000000000000e5 +2685 2 9 23 0.32768000000000000000e5 +2685 2 14 28 -0.32768000000000000000e5 +2685 3 5 34 0.32768000000000000000e5 +2685 3 9 17 0.65536000000000000000e5 +2685 3 13 42 -0.32768000000000000000e5 +2685 3 14 27 0.32768000000000000000e5 +2685 3 14 43 -0.32768000000000000000e5 +2686 1 5 20 -0.65536000000000000000e5 +2686 1 5 36 0.65536000000000000000e5 +2686 3 9 18 0.65536000000000000000e5 +2687 1 3 18 -0.16384000000000000000e5 +2687 1 4 35 0.16384000000000000000e5 +2687 1 5 20 -0.32768000000000000000e5 +2687 1 5 36 0.32768000000000000000e5 +2687 1 10 17 -0.32768000000000000000e5 +2687 1 12 43 0.32768000000000000000e5 +2687 1 14 45 0.32768000000000000000e5 +2687 1 17 48 -0.16384000000000000000e5 +2687 1 18 49 -0.16384000000000000000e5 +2687 2 9 23 0.16384000000000000000e5 +2687 2 14 28 -0.16384000000000000000e5 +2687 3 3 16 -0.16384000000000000000e5 +2687 3 4 17 -0.16384000000000000000e5 +2687 3 5 34 0.16384000000000000000e5 +2687 3 9 19 0.65536000000000000000e5 +2687 3 13 42 -0.16384000000000000000e5 +2687 3 14 27 0.32768000000000000000e5 +2687 3 14 43 -0.16384000000000000000e5 +2687 4 2 14 -0.16384000000000000000e5 +2687 4 3 15 -0.32768000000000000000e5 +2688 1 3 18 0.16384000000000000000e5 +2688 1 4 35 -0.16384000000000000000e5 +2688 1 5 20 0.32768000000000000000e5 +2688 1 5 36 -0.32768000000000000000e5 +2688 1 10 17 0.32768000000000000000e5 +2688 1 12 43 -0.32768000000000000000e5 +2688 1 14 45 -0.32768000000000000000e5 +2688 1 17 48 0.16384000000000000000e5 +2688 1 18 49 0.16384000000000000000e5 +2688 2 9 23 -0.16384000000000000000e5 +2688 2 14 28 0.16384000000000000000e5 +2688 3 3 16 0.16384000000000000000e5 +2688 3 4 17 0.16384000000000000000e5 +2688 3 5 34 -0.16384000000000000000e5 +2688 3 7 20 0.65536000000000000000e5 +2688 3 8 21 -0.13107200000000000000e6 +2688 3 9 20 0.65536000000000000000e5 +2688 3 13 42 0.16384000000000000000e5 +2688 3 14 27 -0.32768000000000000000e5 +2688 3 14 43 0.16384000000000000000e5 +2688 4 2 14 0.16384000000000000000e5 +2688 4 3 15 0.32768000000000000000e5 +2688 4 10 14 0.65536000000000000000e5 +2689 3 9 21 0.65536000000000000000e5 +2689 3 14 19 -0.65536000000000000000e5 +2690 1 2 33 -0.13107200000000000000e6 +2690 1 11 42 0.13107200000000000000e6 +2690 1 12 43 0.26214400000000000000e6 +2690 1 28 43 -0.13107200000000000000e6 +2690 1 32 47 -0.13107200000000000000e6 +2690 1 33 48 -0.13107200000000000000e6 +2690 2 12 26 -0.13107200000000000000e6 +2690 3 1 30 0.65536000000000000000e5 +2690 3 9 22 0.65536000000000000000e5 +2690 3 10 23 0.65536000000000000000e5 +2690 3 13 42 -0.26214400000000000000e6 +2690 3 28 41 -0.13107200000000000000e6 +2690 3 29 42 -0.13107200000000000000e6 +2690 4 3 31 0.13107200000000000000e6 +2690 4 6 18 0.65536000000000000000e5 +2691 3 1 30 -0.65536000000000000000e5 +2691 3 9 23 0.65536000000000000000e5 +2692 3 9 24 0.65536000000000000000e5 +2692 3 10 23 -0.65536000000000000000e5 +2693 1 9 40 0.65536000000000000000e5 +2693 1 10 25 -0.65536000000000000000e5 +2693 3 9 25 0.65536000000000000000e5 +2694 1 2 33 0.13107200000000000000e6 +2694 1 9 40 -0.65536000000000000000e5 +2694 1 10 25 0.65536000000000000000e5 +2694 1 11 42 -0.13107200000000000000e6 +2694 1 12 43 -0.26214400000000000000e6 +2694 1 28 43 0.13107200000000000000e6 +2694 1 32 47 0.13107200000000000000e6 +2694 1 33 48 0.13107200000000000000e6 +2694 2 12 26 0.13107200000000000000e6 +2694 3 3 32 0.13107200000000000000e6 +2694 3 9 26 0.65536000000000000000e5 +2694 3 10 23 0.65536000000000000000e5 +2694 3 13 42 0.26214400000000000000e6 +2694 3 14 27 -0.26214400000000000000e6 +2694 3 28 41 0.13107200000000000000e6 +2694 3 29 42 0.13107200000000000000e6 +2694 4 3 31 -0.13107200000000000000e6 +2694 4 7 19 0.65536000000000000000e5 +2694 4 8 20 0.13107200000000000000e6 +2695 1 2 33 -0.65536000000000000000e5 +2695 1 11 42 0.65536000000000000000e5 +2695 1 12 43 0.13107200000000000000e6 +2695 1 28 43 -0.65536000000000000000e5 +2695 1 32 47 -0.65536000000000000000e5 +2695 1 33 48 -0.65536000000000000000e5 +2695 2 12 26 -0.65536000000000000000e5 +2695 3 9 27 0.65536000000000000000e5 +2695 3 13 42 -0.13107200000000000000e6 +2695 3 28 41 -0.65536000000000000000e5 +2695 3 29 42 -0.65536000000000000000e5 +2695 4 3 31 0.65536000000000000000e5 +2696 3 3 32 -0.65536000000000000000e5 +2696 3 9 28 0.65536000000000000000e5 +2697 1 2 33 0.65536000000000000000e5 +2697 1 11 42 -0.65536000000000000000e5 +2697 1 12 43 -0.13107200000000000000e6 +2697 1 28 43 0.65536000000000000000e5 +2697 1 32 47 0.65536000000000000000e5 +2697 1 33 48 0.65536000000000000000e5 +2697 2 12 26 0.65536000000000000000e5 +2697 3 3 32 0.65536000000000000000e5 +2697 3 9 29 0.65536000000000000000e5 +2697 3 13 42 0.13107200000000000000e6 +2697 3 14 27 -0.13107200000000000000e6 +2697 3 28 41 0.65536000000000000000e5 +2697 3 29 42 0.65536000000000000000e5 +2697 4 3 31 -0.65536000000000000000e5 +2697 4 8 20 0.65536000000000000000e5 +2698 3 4 33 -0.65536000000000000000e5 +2698 3 9 30 0.65536000000000000000e5 +2699 3 9 31 0.65536000000000000000e5 +2699 3 14 27 -0.65536000000000000000e5 +2700 1 4 35 -0.65536000000000000000e5 +2700 1 17 48 0.65536000000000000000e5 +2700 3 9 32 0.65536000000000000000e5 +2700 3 13 42 0.65536000000000000000e5 +2701 3 5 34 -0.65536000000000000000e5 +2701 3 9 33 0.65536000000000000000e5 +2702 3 9 34 0.65536000000000000000e5 +2702 3 16 29 -0.65536000000000000000e5 +2703 1 5 36 -0.65536000000000000000e5 +2703 1 14 45 0.65536000000000000000e5 +2703 3 9 35 0.65536000000000000000e5 +2704 3 9 36 0.65536000000000000000e5 +2704 3 18 31 -0.65536000000000000000e5 +2705 1 9 40 0.65536000000000000000e5 +2705 1 10 41 -0.13107200000000000000e6 +2705 1 26 41 -0.65536000000000000000e5 +2705 1 32 47 0.13107200000000000000e6 +2705 3 9 37 0.65536000000000000000e5 +2705 3 9 38 0.65536000000000000000e5 +2705 3 28 41 0.13107200000000000000e6 +2705 4 2 30 0.65536000000000000000e5 +2706 1 9 40 -0.65536000000000000000e5 +2706 1 26 41 0.65536000000000000000e5 +2706 3 9 39 0.65536000000000000000e5 +2707 3 9 40 0.65536000000000000000e5 +2707 3 10 39 -0.65536000000000000000e5 +2708 1 10 41 -0.65536000000000000000e5 +2708 1 32 47 0.65536000000000000000e5 +2708 3 9 41 0.65536000000000000000e5 +2708 3 28 41 0.65536000000000000000e5 +2709 1 10 41 0.65536000000000000000e5 +2709 1 11 42 0.65536000000000000000e5 +2709 1 32 47 -0.65536000000000000000e5 +2709 1 33 48 -0.65536000000000000000e5 +2709 3 9 42 0.65536000000000000000e5 +2709 3 13 42 -0.13107200000000000000e6 +2709 3 28 41 -0.65536000000000000000e5 +2709 3 29 42 -0.65536000000000000000e5 +2709 4 3 31 0.65536000000000000000e5 +2710 1 11 42 -0.65536000000000000000e5 +2710 1 33 48 0.65536000000000000000e5 +2710 3 9 43 0.65536000000000000000e5 +2710 3 29 42 0.65536000000000000000e5 +2711 3 9 44 0.65536000000000000000e5 +2711 3 13 42 -0.65536000000000000000e5 +2712 1 14 45 -0.13107200000000000000e6 +2712 1 17 48 0.65536000000000000000e5 +2712 1 18 49 0.65536000000000000000e5 +2712 1 34 49 0.65536000000000000000e5 +2712 2 14 28 0.65536000000000000000e5 +2712 3 9 45 0.65536000000000000000e5 +2712 3 13 42 0.65536000000000000000e5 +2712 3 14 43 0.65536000000000000000e5 +2712 3 18 47 0.65536000000000000000e5 +2713 1 14 45 0.65536000000000000000e5 +2713 1 17 48 -0.32768000000000000000e5 +2713 1 18 49 -0.32768000000000000000e5 +2713 1 34 49 -0.32768000000000000000e5 +2713 2 14 28 -0.32768000000000000000e5 +2713 3 9 46 0.65536000000000000000e5 +2713 3 14 43 -0.32768000000000000000e5 +2713 3 15 44 0.65536000000000000000e5 +2713 3 16 45 -0.13107200000000000000e6 +2713 3 18 47 -0.32768000000000000000e5 +2713 3 22 35 0.32768000000000000000e5 +2713 4 14 26 0.32768000000000000000e5 +2713 4 15 27 0.65536000000000000000e5 +2714 1 6 53 -0.32768000000000000000e5 +2714 1 25 40 0.32768000000000000000e5 +2714 3 9 47 0.65536000000000000000e5 +2714 3 24 37 -0.32768000000000000000e5 +2714 3 27 40 -0.65536000000000000000e5 +2714 4 4 32 0.32768000000000000000e5 +2714 4 16 28 -0.32768000000000000000e5 +2715 3 9 48 0.65536000000000000000e5 +2715 3 27 40 -0.65536000000000000000e5 +2716 3 5 50 -0.65536000000000000000e5 +2716 3 9 49 0.65536000000000000000e5 +2717 1 6 53 -0.16384000000000000000e5 +2717 1 25 40 0.16384000000000000000e5 +2717 2 4 34 -0.32768000000000000000e5 +2717 2 21 35 0.32768000000000000000e5 +2717 3 5 50 -0.32768000000000000000e5 +2717 3 9 50 0.65536000000000000000e5 +2717 3 24 37 -0.16384000000000000000e5 +2717 3 27 40 -0.65536000000000000000e5 +2717 4 4 32 0.16384000000000000000e5 +2717 4 7 35 0.32768000000000000000e5 +2717 4 16 28 -0.16384000000000000000e5 +2718 3 9 51 0.65536000000000000000e5 +2718 3 29 42 -0.65536000000000000000e5 +2719 3 9 52 0.65536000000000000000e5 +2719 3 18 47 -0.65536000000000000000e5 +2720 1 24 55 0.65536000000000000000e5 +2720 1 26 41 -0.65536000000000000000e5 +2720 3 9 53 0.65536000000000000000e5 +2720 3 27 40 0.65536000000000000000e5 +2721 1 24 55 -0.65536000000000000000e5 +2721 1 26 41 0.65536000000000000000e5 +2721 3 9 54 0.65536000000000000000e5 +2721 3 22 51 0.65536000000000000000e5 +2721 3 23 52 -0.13107200000000000000e6 +2721 3 27 40 -0.65536000000000000000e5 +2721 4 7 35 0.65536000000000000000e5 +2722 3 9 55 0.65536000000000000000e5 +2722 3 10 55 0.65536000000000000000e5 +2722 3 35 48 -0.13107200000000000000e6 +2722 3 40 45 0.65536000000000000000e5 +2722 4 22 34 0.65536000000000000000e5 +2723 3 9 56 0.65536000000000000000e5 +2723 3 38 51 -0.65536000000000000000e5 +2724 1 4 35 -0.65536000000000000000e5 +2724 1 6 13 0.32768000000000000000e5 +2724 1 10 41 0.32768000000000000000e5 +2724 1 11 42 0.32768000000000000000e5 +2724 2 5 11 0.32768000000000000000e5 +2724 3 2 15 0.32768000000000000000e5 +2724 3 3 32 0.32768000000000000000e5 +2724 3 4 17 -0.65536000000000000000e5 +2724 3 4 33 0.32768000000000000000e5 +2724 3 10 10 0.65536000000000000000e5 +2725 1 3 18 -0.65536000000000000000e5 +2725 1 12 43 0.65536000000000000000e5 +2725 3 10 12 0.65536000000000000000e5 +2725 3 14 27 0.65536000000000000000e5 +2726 3 4 17 -0.65536000000000000000e5 +2726 3 10 13 0.65536000000000000000e5 +2727 1 5 20 -0.13107200000000000000e6 +2727 1 5 36 0.13107200000000000000e6 +2727 3 4 17 0.65536000000000000000e5 +2727 3 5 18 0.65536000000000000000e5 +2727 3 10 14 0.65536000000000000000e5 +2727 4 8 12 0.65536000000000000000e5 +2728 3 5 18 -0.65536000000000000000e5 +2728 3 10 15 0.65536000000000000000e5 +2729 1 4 35 0.32768000000000000000e5 +2729 1 10 17 -0.65536000000000000000e5 +2729 1 12 43 0.32768000000000000000e5 +2729 1 14 45 0.65536000000000000000e5 +2729 1 17 48 -0.32768000000000000000e5 +2729 1 18 49 -0.32768000000000000000e5 +2729 2 9 23 0.32768000000000000000e5 +2729 2 14 28 -0.32768000000000000000e5 +2729 3 5 34 0.32768000000000000000e5 +2729 3 10 16 0.65536000000000000000e5 +2729 3 13 42 -0.32768000000000000000e5 +2729 3 14 27 0.32768000000000000000e5 +2729 3 14 43 -0.32768000000000000000e5 +2730 1 5 20 -0.65536000000000000000e5 +2730 1 5 36 0.65536000000000000000e5 +2730 3 10 17 0.65536000000000000000e5 +2731 3 6 19 -0.65536000000000000000e5 +2731 3 10 18 0.65536000000000000000e5 +2732 1 3 18 0.16384000000000000000e5 +2732 1 4 35 -0.16384000000000000000e5 +2732 1 5 20 0.32768000000000000000e5 +2732 1 5 36 -0.32768000000000000000e5 +2732 1 10 17 0.32768000000000000000e5 +2732 1 12 43 -0.32768000000000000000e5 +2732 1 14 45 -0.32768000000000000000e5 +2732 1 17 48 0.16384000000000000000e5 +2732 1 18 49 0.16384000000000000000e5 +2732 2 9 23 -0.16384000000000000000e5 +2732 2 14 28 0.16384000000000000000e5 +2732 3 3 16 0.16384000000000000000e5 +2732 3 4 17 0.16384000000000000000e5 +2732 3 5 34 -0.16384000000000000000e5 +2732 3 7 20 0.65536000000000000000e5 +2732 3 8 21 -0.13107200000000000000e6 +2732 3 10 19 0.65536000000000000000e5 +2732 3 13 42 0.16384000000000000000e5 +2732 3 14 27 -0.32768000000000000000e5 +2732 3 14 43 0.16384000000000000000e5 +2732 4 2 14 0.16384000000000000000e5 +2732 4 3 15 0.32768000000000000000e5 +2732 4 10 14 0.65536000000000000000e5 +2733 1 6 21 -0.65536000000000000000e5 +2733 1 18 33 0.65536000000000000000e5 +2733 3 10 20 0.65536000000000000000e5 +2734 3 10 21 0.65536000000000000000e5 +2734 3 14 19 0.65536000000000000000e5 +2734 3 15 20 0.65536000000000000000e5 +2734 3 18 19 -0.13107200000000000000e6 +2734 4 14 14 0.13107200000000000000e6 +2735 3 1 30 -0.65536000000000000000e5 +2735 3 10 22 0.65536000000000000000e5 +2736 1 9 40 0.65536000000000000000e5 +2736 1 10 25 -0.65536000000000000000e5 +2736 3 10 24 0.65536000000000000000e5 +2737 1 2 33 0.13107200000000000000e6 +2737 1 9 40 -0.65536000000000000000e5 +2737 1 10 25 0.65536000000000000000e5 +2737 1 11 42 -0.13107200000000000000e6 +2737 1 12 43 -0.26214400000000000000e6 +2737 1 28 43 0.13107200000000000000e6 +2737 1 32 47 0.13107200000000000000e6 +2737 1 33 48 0.13107200000000000000e6 +2737 2 12 26 0.13107200000000000000e6 +2737 3 3 32 0.13107200000000000000e6 +2737 3 10 23 0.65536000000000000000e5 +2737 3 10 25 0.65536000000000000000e5 +2737 3 13 42 0.26214400000000000000e6 +2737 3 14 27 -0.26214400000000000000e6 +2737 3 28 41 0.13107200000000000000e6 +2737 3 29 42 0.13107200000000000000e6 +2737 4 3 31 -0.13107200000000000000e6 +2737 4 7 19 0.65536000000000000000e5 +2737 4 8 20 0.13107200000000000000e6 +2738 1 1 48 -0.32768000000000000000e5 +2738 1 2 49 -0.32768000000000000000e5 +2738 1 8 39 -0.65536000000000000000e5 +2738 1 9 40 -0.13107200000000000000e6 +2738 1 10 41 0.13107200000000000000e6 +2738 1 11 26 -0.65536000000000000000e5 +2738 1 11 42 0.13107200000000000000e6 +2738 1 12 43 0.26214400000000000000e6 +2738 1 23 38 -0.32768000000000000000e5 +2738 1 26 41 0.13107200000000000000e6 +2738 1 28 43 -0.26214400000000000000e6 +2738 1 32 47 -0.26214400000000000000e6 +2738 2 2 32 -0.32768000000000000000e5 +2738 2 4 34 0.65536000000000000000e5 +2738 2 16 30 -0.65536000000000000000e5 +2738 2 20 34 -0.13107200000000000000e6 +2738 2 28 34 -0.65536000000000000000e5 +2738 3 9 38 -0.65536000000000000000e5 +2738 3 10 26 0.65536000000000000000e5 +2738 3 10 39 -0.65536000000000000000e5 +2738 3 22 35 -0.26214400000000000000e6 +2738 3 28 41 -0.26214400000000000000e6 +2738 4 2 30 -0.65536000000000000000e5 +2738 4 6 34 -0.13107200000000000000e6 +2738 4 18 22 -0.65536000000000000000e5 +2738 4 18 30 -0.65536000000000000000e5 +2738 4 21 33 -0.65536000000000000000e5 +2739 3 3 32 -0.65536000000000000000e5 +2739 3 10 27 0.65536000000000000000e5 +2740 1 2 33 0.65536000000000000000e5 +2740 1 11 42 -0.65536000000000000000e5 +2740 1 12 43 -0.13107200000000000000e6 +2740 1 28 43 0.65536000000000000000e5 +2740 1 32 47 0.65536000000000000000e5 +2740 1 33 48 0.65536000000000000000e5 +2740 2 12 26 0.65536000000000000000e5 +2740 3 3 32 0.65536000000000000000e5 +2740 3 10 28 0.65536000000000000000e5 +2740 3 13 42 0.13107200000000000000e6 +2740 3 14 27 -0.13107200000000000000e6 +2740 3 28 41 0.65536000000000000000e5 +2740 3 29 42 0.65536000000000000000e5 +2740 4 3 31 -0.65536000000000000000e5 +2740 4 8 20 0.65536000000000000000e5 +2741 3 4 33 -0.65536000000000000000e5 +2741 3 10 29 0.65536000000000000000e5 +2742 1 2 33 -0.65536000000000000000e5 +2742 1 11 42 0.65536000000000000000e5 +2742 1 12 43 0.13107200000000000000e6 +2742 1 28 43 -0.65536000000000000000e5 +2742 1 32 47 -0.65536000000000000000e5 +2742 1 33 48 -0.65536000000000000000e5 +2742 2 12 26 -0.65536000000000000000e5 +2742 3 3 32 -0.65536000000000000000e5 +2742 3 4 33 0.65536000000000000000e5 +2742 3 5 34 -0.13107200000000000000e6 +2742 3 10 30 0.65536000000000000000e5 +2742 3 13 42 -0.13107200000000000000e6 +2742 3 14 27 0.13107200000000000000e6 +2742 3 28 41 -0.65536000000000000000e5 +2742 3 29 42 -0.65536000000000000000e5 +2742 4 3 31 0.65536000000000000000e5 +2742 4 8 20 -0.65536000000000000000e5 +2742 4 9 21 0.65536000000000000000e5 +2743 1 4 35 -0.65536000000000000000e5 +2743 1 17 48 0.65536000000000000000e5 +2743 3 10 31 0.65536000000000000000e5 +2743 3 13 42 0.65536000000000000000e5 +2744 3 5 34 -0.65536000000000000000e5 +2744 3 10 32 0.65536000000000000000e5 +2745 1 15 30 -0.65536000000000000000e5 +2745 1 18 49 0.65536000000000000000e5 +2745 3 10 33 0.65536000000000000000e5 +2745 3 14 43 0.65536000000000000000e5 +2746 1 5 36 -0.65536000000000000000e5 +2746 1 14 45 0.65536000000000000000e5 +2746 3 10 34 0.65536000000000000000e5 +2747 3 10 35 0.65536000000000000000e5 +2747 3 17 30 -0.65536000000000000000e5 +2748 1 15 46 0.65536000000000000000e5 +2748 1 18 33 -0.65536000000000000000e5 +2748 3 10 36 0.65536000000000000000e5 +2749 3 9 38 -0.65536000000000000000e5 +2749 3 10 37 0.65536000000000000000e5 +2750 1 9 40 -0.65536000000000000000e5 +2750 1 26 41 0.65536000000000000000e5 +2750 3 10 38 0.65536000000000000000e5 +2751 1 9 40 0.65536000000000000000e5 +2751 1 11 42 -0.13107200000000000000e6 +2751 1 26 41 -0.65536000000000000000e5 +2751 1 33 48 0.13107200000000000000e6 +2751 3 10 39 0.65536000000000000000e5 +2751 3 10 40 0.65536000000000000000e5 +2751 3 29 42 0.13107200000000000000e6 +2751 4 18 22 0.65536000000000000000e5 +2752 1 10 41 0.65536000000000000000e5 +2752 1 11 42 0.65536000000000000000e5 +2752 1 32 47 -0.65536000000000000000e5 +2752 1 33 48 -0.65536000000000000000e5 +2752 3 10 41 0.65536000000000000000e5 +2752 3 13 42 -0.13107200000000000000e6 +2752 3 28 41 -0.65536000000000000000e5 +2752 3 29 42 -0.65536000000000000000e5 +2752 4 3 31 0.65536000000000000000e5 +2753 1 11 42 -0.65536000000000000000e5 +2753 1 33 48 0.65536000000000000000e5 +2753 3 10 42 0.65536000000000000000e5 +2753 3 29 42 0.65536000000000000000e5 +2754 1 26 33 -0.65536000000000000000e5 +2754 1 33 40 0.65536000000000000000e5 +2754 3 10 43 0.65536000000000000000e5 +2755 1 14 45 -0.13107200000000000000e6 +2755 1 17 48 0.65536000000000000000e5 +2755 1 18 49 0.65536000000000000000e5 +2755 1 34 49 0.65536000000000000000e5 +2755 2 14 28 0.65536000000000000000e5 +2755 3 10 44 0.65536000000000000000e5 +2755 3 13 42 0.65536000000000000000e5 +2755 3 14 43 0.65536000000000000000e5 +2755 3 18 47 0.65536000000000000000e5 +2756 3 10 45 0.65536000000000000000e5 +2756 3 14 43 -0.65536000000000000000e5 +2757 3 10 46 0.65536000000000000000e5 +2757 3 15 44 -0.65536000000000000000e5 +2758 3 10 47 0.65536000000000000000e5 +2758 3 27 40 -0.65536000000000000000e5 +2759 3 5 50 -0.65536000000000000000e5 +2759 3 10 48 0.65536000000000000000e5 +2760 3 5 50 0.65536000000000000000e5 +2760 3 10 49 0.65536000000000000000e5 +2760 3 27 40 0.65536000000000000000e5 +2760 3 29 42 -0.13107200000000000000e6 +2760 4 18 30 0.65536000000000000000e5 +2761 3 10 50 0.65536000000000000000e5 +2761 3 29 42 -0.65536000000000000000e5 +2762 3 10 51 0.65536000000000000000e5 +2762 3 14 51 -0.13107200000000000000e6 +2762 3 29 42 0.65536000000000000000e5 +2762 3 30 43 0.65536000000000000000e5 +2762 4 19 31 0.65536000000000000000e5 +2763 3 10 52 0.65536000000000000000e5 +2763 3 14 51 -0.65536000000000000000e5 +2764 1 24 55 -0.65536000000000000000e5 +2764 1 26 41 0.65536000000000000000e5 +2764 3 10 53 0.65536000000000000000e5 +2764 3 22 51 0.65536000000000000000e5 +2764 3 23 52 -0.13107200000000000000e6 +2764 3 27 40 -0.65536000000000000000e5 +2764 4 7 35 0.65536000000000000000e5 +2765 3 10 54 0.65536000000000000000e5 +2765 3 10 55 0.13107200000000000000e6 +2765 3 22 51 -0.65536000000000000000e5 +2765 3 23 52 0.13107200000000000000e6 +2765 3 35 48 -0.26214400000000000000e6 +2765 3 40 45 0.13107200000000000000e6 +2765 4 7 35 -0.65536000000000000000e5 +2765 4 21 33 0.65536000000000000000e5 +2765 4 22 34 0.13107200000000000000e6 +2766 1 1 48 0.32768000000000000000e5 +2766 1 2 49 0.32768000000000000000e5 +2766 1 8 39 0.65536000000000000000e5 +2766 1 9 40 0.65536000000000000000e5 +2766 1 10 41 -0.13107200000000000000e6 +2766 1 12 43 -0.26214400000000000000e6 +2766 1 23 38 0.32768000000000000000e5 +2766 1 26 41 -0.65536000000000000000e5 +2766 1 28 43 0.26214400000000000000e6 +2766 1 32 47 0.26214400000000000000e6 +2766 1 33 48 -0.13107200000000000000e6 +2766 1 40 55 0.65536000000000000000e5 +2766 2 2 32 0.32768000000000000000e5 +2766 2 4 34 -0.65536000000000000000e5 +2766 2 16 30 0.65536000000000000000e5 +2766 2 20 34 0.13107200000000000000e6 +2766 2 28 34 0.65536000000000000000e5 +2766 3 5 50 -0.65536000000000000000e5 +2766 3 9 38 0.65536000000000000000e5 +2766 3 10 55 -0.13107200000000000000e6 +2766 3 10 56 0.65536000000000000000e5 +2766 3 22 35 0.26214400000000000000e6 +2766 3 22 51 0.65536000000000000000e5 +2766 3 23 52 -0.13107200000000000000e6 +2766 3 27 40 -0.65536000000000000000e5 +2766 3 28 41 0.26214400000000000000e6 +2766 3 35 48 0.26214400000000000000e6 +2766 3 40 45 -0.13107200000000000000e6 +2766 4 2 30 0.65536000000000000000e5 +2766 4 6 34 0.13107200000000000000e6 +2766 4 7 35 0.65536000000000000000e5 +2766 4 22 34 -0.13107200000000000000e6 +2767 1 4 35 0.65536000000000000000e5 +2767 1 6 13 -0.32768000000000000000e5 +2767 1 10 41 -0.32768000000000000000e5 +2767 1 11 42 -0.32768000000000000000e5 +2767 2 5 11 -0.32768000000000000000e5 +2767 3 2 15 -0.32768000000000000000e5 +2767 3 3 32 -0.32768000000000000000e5 +2767 3 4 17 0.65536000000000000000e5 +2767 3 4 33 -0.32768000000000000000e5 +2767 3 5 18 -0.65536000000000000000e5 +2767 3 10 11 0.32768000000000000000e5 +2767 3 11 11 0.65536000000000000000e5 +2767 4 9 9 0.65536000000000000000e5 +2768 3 4 17 -0.65536000000000000000e5 +2768 3 11 12 0.65536000000000000000e5 +2769 1 5 20 -0.13107200000000000000e6 +2769 1 5 36 0.13107200000000000000e6 +2769 3 4 17 0.65536000000000000000e5 +2769 3 5 18 0.65536000000000000000e5 +2769 3 11 13 0.65536000000000000000e5 +2769 4 8 12 0.65536000000000000000e5 +2770 3 5 18 -0.65536000000000000000e5 +2770 3 11 14 0.65536000000000000000e5 +2771 1 5 20 0.13107200000000000000e6 +2771 1 5 36 -0.13107200000000000000e6 +2771 3 4 17 -0.65536000000000000000e5 +2771 3 6 19 -0.13107200000000000000e6 +2771 3 11 15 0.65536000000000000000e5 +2771 4 5 14 0.65536000000000000000e5 +2771 4 8 12 -0.65536000000000000000e5 +2772 1 5 20 -0.65536000000000000000e5 +2772 1 5 36 0.65536000000000000000e5 +2772 3 11 16 0.65536000000000000000e5 +2773 3 6 19 -0.65536000000000000000e5 +2773 3 11 17 0.65536000000000000000e5 +2774 1 5 20 0.65536000000000000000e5 +2774 1 5 36 -0.65536000000000000000e5 +2774 1 6 21 -0.13107200000000000000e6 +2774 1 18 33 0.13107200000000000000e6 +2774 3 6 19 0.65536000000000000000e5 +2774 3 11 18 0.65536000000000000000e5 +2774 4 12 12 0.13107200000000000000e6 +2775 1 6 21 -0.65536000000000000000e5 +2775 1 18 33 0.65536000000000000000e5 +2775 3 11 19 0.65536000000000000000e5 +2776 3 11 21 0.65536000000000000000e5 +2776 3 15 20 -0.65536000000000000000e5 +2777 3 10 23 -0.65536000000000000000e5 +2777 3 11 22 0.65536000000000000000e5 +2778 1 9 40 0.65536000000000000000e5 +2778 1 10 25 -0.65536000000000000000e5 +2778 3 11 23 0.65536000000000000000e5 +2779 1 2 33 0.13107200000000000000e6 +2779 1 9 40 -0.65536000000000000000e5 +2779 1 10 25 0.65536000000000000000e5 +2779 1 11 42 -0.13107200000000000000e6 +2779 1 12 43 -0.26214400000000000000e6 +2779 1 28 43 0.13107200000000000000e6 +2779 1 32 47 0.13107200000000000000e6 +2779 1 33 48 0.13107200000000000000e6 +2779 2 12 26 0.13107200000000000000e6 +2779 3 3 32 0.13107200000000000000e6 +2779 3 10 23 0.65536000000000000000e5 +2779 3 11 24 0.65536000000000000000e5 +2779 3 13 42 0.26214400000000000000e6 +2779 3 14 27 -0.26214400000000000000e6 +2779 3 28 41 0.13107200000000000000e6 +2779 3 29 42 0.13107200000000000000e6 +2779 4 3 31 -0.13107200000000000000e6 +2779 4 7 19 0.65536000000000000000e5 +2779 4 8 20 0.13107200000000000000e6 +2780 1 1 48 -0.32768000000000000000e5 +2780 1 2 49 -0.32768000000000000000e5 +2780 1 8 39 -0.65536000000000000000e5 +2780 1 9 40 -0.13107200000000000000e6 +2780 1 10 41 0.13107200000000000000e6 +2780 1 11 26 -0.65536000000000000000e5 +2780 1 11 42 0.13107200000000000000e6 +2780 1 12 43 0.26214400000000000000e6 +2780 1 23 38 -0.32768000000000000000e5 +2780 1 26 41 0.13107200000000000000e6 +2780 1 28 43 -0.26214400000000000000e6 +2780 1 32 47 -0.26214400000000000000e6 +2780 2 2 32 -0.32768000000000000000e5 +2780 2 4 34 0.65536000000000000000e5 +2780 2 16 30 -0.65536000000000000000e5 +2780 2 20 34 -0.13107200000000000000e6 +2780 2 28 34 -0.65536000000000000000e5 +2780 3 9 38 -0.65536000000000000000e5 +2780 3 10 39 -0.65536000000000000000e5 +2780 3 11 25 0.65536000000000000000e5 +2780 3 22 35 -0.26214400000000000000e6 +2780 3 28 41 -0.26214400000000000000e6 +2780 4 2 30 -0.65536000000000000000e5 +2780 4 6 34 -0.13107200000000000000e6 +2780 4 18 22 -0.65536000000000000000e5 +2780 4 18 30 -0.65536000000000000000e5 +2780 4 21 33 -0.65536000000000000000e5 +2781 1 2 33 0.65536000000000000000e5 +2781 1 11 42 -0.65536000000000000000e5 +2781 1 12 43 -0.13107200000000000000e6 +2781 1 28 43 0.65536000000000000000e5 +2781 1 32 47 0.65536000000000000000e5 +2781 1 33 48 0.65536000000000000000e5 +2781 2 12 26 0.65536000000000000000e5 +2781 3 3 32 0.65536000000000000000e5 +2781 3 11 27 0.65536000000000000000e5 +2781 3 13 42 0.13107200000000000000e6 +2781 3 14 27 -0.13107200000000000000e6 +2781 3 28 41 0.65536000000000000000e5 +2781 3 29 42 0.65536000000000000000e5 +2781 4 3 31 -0.65536000000000000000e5 +2781 4 8 20 0.65536000000000000000e5 +2782 3 4 33 -0.65536000000000000000e5 +2782 3 11 28 0.65536000000000000000e5 +2783 1 2 33 -0.65536000000000000000e5 +2783 1 11 42 0.65536000000000000000e5 +2783 1 12 43 0.13107200000000000000e6 +2783 1 28 43 -0.65536000000000000000e5 +2783 1 32 47 -0.65536000000000000000e5 +2783 1 33 48 -0.65536000000000000000e5 +2783 2 12 26 -0.65536000000000000000e5 +2783 3 3 32 -0.65536000000000000000e5 +2783 3 4 33 0.65536000000000000000e5 +2783 3 5 34 -0.13107200000000000000e6 +2783 3 11 29 0.65536000000000000000e5 +2783 3 13 42 -0.13107200000000000000e6 +2783 3 14 27 0.13107200000000000000e6 +2783 3 28 41 -0.65536000000000000000e5 +2783 3 29 42 -0.65536000000000000000e5 +2783 4 3 31 0.65536000000000000000e5 +2783 4 8 20 -0.65536000000000000000e5 +2783 4 9 21 0.65536000000000000000e5 +2784 3 5 34 -0.65536000000000000000e5 +2784 3 11 31 0.65536000000000000000e5 +2785 1 15 30 -0.65536000000000000000e5 +2785 1 18 49 0.65536000000000000000e5 +2785 3 11 32 0.65536000000000000000e5 +2785 3 14 43 0.65536000000000000000e5 +2786 3 6 35 -0.65536000000000000000e5 +2786 3 11 33 0.65536000000000000000e5 +2787 3 11 34 0.65536000000000000000e5 +2787 3 17 30 -0.65536000000000000000e5 +2788 1 5 36 0.65536000000000000000e5 +2788 1 14 45 -0.65536000000000000000e5 +2788 1 15 46 0.13107200000000000000e6 +2788 1 18 33 -0.13107200000000000000e6 +2788 3 11 35 0.65536000000000000000e5 +2788 3 17 30 0.65536000000000000000e5 +2788 4 12 24 0.65536000000000000000e5 +2789 3 11 36 0.65536000000000000000e5 +2789 3 21 26 -0.65536000000000000000e5 +2790 1 9 40 -0.65536000000000000000e5 +2790 1 26 41 0.65536000000000000000e5 +2790 3 11 37 0.65536000000000000000e5 +2791 3 10 39 -0.65536000000000000000e5 +2791 3 11 38 0.65536000000000000000e5 +2792 1 9 40 0.65536000000000000000e5 +2792 1 11 42 -0.13107200000000000000e6 +2792 1 26 41 -0.65536000000000000000e5 +2792 1 33 48 0.13107200000000000000e6 +2792 3 10 39 0.65536000000000000000e5 +2792 3 11 39 0.65536000000000000000e5 +2792 3 29 42 0.13107200000000000000e6 +2792 4 18 22 0.65536000000000000000e5 +2793 1 11 42 -0.65536000000000000000e5 +2793 1 33 48 0.65536000000000000000e5 +2793 3 11 41 0.65536000000000000000e5 +2793 3 29 42 0.65536000000000000000e5 +2794 1 26 33 -0.65536000000000000000e5 +2794 1 33 40 0.65536000000000000000e5 +2794 3 11 42 0.65536000000000000000e5 +2795 1 11 42 0.65536000000000000000e5 +2795 1 26 33 0.65536000000000000000e5 +2795 1 33 40 -0.65536000000000000000e5 +2795 1 33 48 -0.65536000000000000000e5 +2795 3 11 43 0.65536000000000000000e5 +2795 3 14 43 -0.13107200000000000000e6 +2795 3 29 42 -0.65536000000000000000e5 +2795 4 22 22 0.13107200000000000000e6 +2796 3 11 44 0.65536000000000000000e5 +2796 3 14 43 -0.65536000000000000000e5 +2797 3 11 45 0.65536000000000000000e5 +2797 3 26 35 -0.65536000000000000000e5 +2798 3 11 46 0.65536000000000000000e5 +2798 3 30 35 -0.65536000000000000000e5 +2799 3 5 50 -0.65536000000000000000e5 +2799 3 11 47 0.65536000000000000000e5 +2800 3 5 50 0.65536000000000000000e5 +2800 3 11 48 0.65536000000000000000e5 +2800 3 27 40 0.65536000000000000000e5 +2800 3 29 42 -0.13107200000000000000e6 +2800 4 18 30 0.65536000000000000000e5 +2801 3 6 51 -0.65536000000000000000e5 +2801 3 11 49 0.65536000000000000000e5 +2802 3 11 50 0.65536000000000000000e5 +2802 3 14 51 -0.13107200000000000000e6 +2802 3 29 42 0.65536000000000000000e5 +2802 3 30 43 0.65536000000000000000e5 +2802 4 19 31 0.65536000000000000000e5 +2803 3 11 51 0.65536000000000000000e5 +2803 3 30 43 -0.65536000000000000000e5 +2804 3 11 52 0.65536000000000000000e5 +2804 3 35 40 -0.65536000000000000000e5 +2805 3 10 55 0.13107200000000000000e6 +2805 3 11 53 0.65536000000000000000e5 +2805 3 22 51 -0.65536000000000000000e5 +2805 3 23 52 0.13107200000000000000e6 +2805 3 35 48 -0.26214400000000000000e6 +2805 3 40 45 0.13107200000000000000e6 +2805 4 7 35 -0.65536000000000000000e5 +2805 4 21 33 0.65536000000000000000e5 +2805 4 22 34 0.13107200000000000000e6 +2806 3 6 55 -0.65536000000000000000e5 +2806 3 11 54 0.65536000000000000000e5 +2807 3 11 55 0.65536000000000000000e5 +2807 3 40 45 -0.65536000000000000000e5 +2808 3 11 56 0.65536000000000000000e5 +2808 3 26 55 -0.65536000000000000000e5 +2809 1 2 17 -0.16384000000000000000e5 +2809 1 16 23 0.16384000000000000000e5 +2809 3 3 16 -0.16384000000000000000e5 +2809 3 7 12 -0.16384000000000000000e5 +2809 3 12 12 0.65536000000000000000e5 +2809 4 1 13 -0.16384000000000000000e5 +2810 1 2 17 -0.32768000000000000000e5 +2810 1 3 34 -0.32768000000000000000e5 +2810 1 4 19 -0.65536000000000000000e5 +2810 1 4 35 -0.32768000000000000000e5 +2810 1 12 43 -0.65536000000000000000e5 +2810 1 14 45 -0.65536000000000000000e5 +2810 1 17 48 0.32768000000000000000e5 +2810 1 18 49 0.32768000000000000000e5 +2810 1 20 27 0.13107200000000000000e6 +2810 2 6 12 -0.32768000000000000000e5 +2810 2 9 23 -0.32768000000000000000e5 +2810 2 10 24 -0.65536000000000000000e5 +2810 2 14 28 0.32768000000000000000e5 +2810 3 4 17 0.32768000000000000000e5 +2810 3 5 34 -0.32768000000000000000e5 +2810 3 12 13 0.65536000000000000000e5 +2810 3 13 42 0.32768000000000000000e5 +2810 3 14 27 -0.65536000000000000000e5 +2810 3 14 43 0.32768000000000000000e5 +2810 4 2 14 0.32768000000000000000e5 +2811 1 3 18 -0.32768000000000000000e5 +2811 1 12 43 0.32768000000000000000e5 +2811 3 3 16 -0.32768000000000000000e5 +2811 3 4 17 -0.32768000000000000000e5 +2811 3 12 14 0.65536000000000000000e5 +2811 3 14 27 0.32768000000000000000e5 +2811 4 2 14 -0.32768000000000000000e5 +2812 1 4 35 0.32768000000000000000e5 +2812 1 10 17 -0.65536000000000000000e5 +2812 1 12 43 0.32768000000000000000e5 +2812 1 14 45 0.65536000000000000000e5 +2812 1 17 48 -0.32768000000000000000e5 +2812 1 18 49 -0.32768000000000000000e5 +2812 2 9 23 0.32768000000000000000e5 +2812 2 14 28 -0.32768000000000000000e5 +2812 3 5 34 0.32768000000000000000e5 +2812 3 12 15 0.65536000000000000000e5 +2812 3 13 42 -0.32768000000000000000e5 +2812 3 14 27 0.32768000000000000000e5 +2812 3 14 43 -0.32768000000000000000e5 +2813 1 2 17 -0.32768000000000000000e5 +2813 1 3 18 -0.16384000000000000000e5 +2813 1 3 34 -0.16384000000000000000e5 +2813 1 4 19 -0.32768000000000000000e5 +2813 1 4 35 -0.16384000000000000000e5 +2813 1 12 43 -0.16384000000000000000e5 +2813 1 14 45 -0.32768000000000000000e5 +2813 1 16 23 0.16384000000000000000e5 +2813 1 17 48 0.16384000000000000000e5 +2813 1 18 49 0.16384000000000000000e5 +2813 1 20 27 0.65536000000000000000e5 +2813 2 6 12 -0.16384000000000000000e5 +2813 2 9 23 -0.16384000000000000000e5 +2813 2 10 24 -0.32768000000000000000e5 +2813 2 14 28 0.16384000000000000000e5 +2813 3 3 16 -0.32768000000000000000e5 +2813 3 5 34 -0.16384000000000000000e5 +2813 3 7 12 -0.16384000000000000000e5 +2813 3 12 16 0.65536000000000000000e5 +2813 3 13 42 0.16384000000000000000e5 +2813 3 14 27 -0.16384000000000000000e5 +2813 3 14 43 0.16384000000000000000e5 +2813 4 1 13 -0.16384000000000000000e5 +2813 4 10 10 -0.65536000000000000000e5 +2814 3 7 20 -0.65536000000000000000e5 +2814 3 12 17 0.65536000000000000000e5 +2815 1 3 18 -0.16384000000000000000e5 +2815 1 4 35 0.16384000000000000000e5 +2815 1 5 20 -0.32768000000000000000e5 +2815 1 5 36 0.32768000000000000000e5 +2815 1 10 17 -0.32768000000000000000e5 +2815 1 12 43 0.32768000000000000000e5 +2815 1 14 45 0.32768000000000000000e5 +2815 1 17 48 -0.16384000000000000000e5 +2815 1 18 49 -0.16384000000000000000e5 +2815 2 9 23 0.16384000000000000000e5 +2815 2 14 28 -0.16384000000000000000e5 +2815 3 3 16 -0.16384000000000000000e5 +2815 3 4 17 -0.16384000000000000000e5 +2815 3 5 34 0.16384000000000000000e5 +2815 3 12 18 0.65536000000000000000e5 +2815 3 13 42 -0.16384000000000000000e5 +2815 3 14 27 0.32768000000000000000e5 +2815 3 14 43 -0.16384000000000000000e5 +2815 4 2 14 -0.16384000000000000000e5 +2815 4 3 15 -0.32768000000000000000e5 +2816 3 8 21 0.65536000000000000000e5 +2816 3 12 19 0.65536000000000000000e5 +2816 3 12 21 -0.13107200000000000000e6 +2816 3 14 19 0.65536000000000000000e5 +2816 4 13 13 0.13107200000000000000e6 +2817 3 8 21 -0.65536000000000000000e5 +2817 3 12 20 0.65536000000000000000e5 +2818 1 1 32 -0.65536000000000000000e5 +2818 1 2 33 0.65536000000000000000e5 +2818 1 3 34 -0.13107200000000000000e6 +2818 1 10 41 0.65536000000000000000e5 +2818 1 11 42 -0.65536000000000000000e5 +2818 1 12 43 -0.13107200000000000000e6 +2818 1 16 23 0.13107200000000000000e6 +2818 1 28 43 0.65536000000000000000e5 +2818 1 32 47 0.65536000000000000000e5 +2818 1 33 48 0.65536000000000000000e5 +2818 2 1 31 -0.65536000000000000000e5 +2818 2 7 21 0.65536000000000000000e5 +2818 2 12 26 0.65536000000000000000e5 +2818 3 1 34 -0.13107200000000000000e6 +2818 3 2 31 0.65536000000000000000e5 +2818 3 3 32 0.65536000000000000000e5 +2818 3 12 22 0.65536000000000000000e5 +2818 3 13 42 0.13107200000000000000e6 +2818 3 28 41 0.65536000000000000000e5 +2818 3 29 42 0.65536000000000000000e5 +2818 4 3 31 -0.65536000000000000000e5 +2819 3 2 31 -0.65536000000000000000e5 +2819 3 12 23 0.65536000000000000000e5 +2820 1 2 33 -0.65536000000000000000e5 +2820 1 11 42 0.65536000000000000000e5 +2820 1 12 43 0.13107200000000000000e6 +2820 1 28 43 -0.65536000000000000000e5 +2820 1 32 47 -0.65536000000000000000e5 +2820 1 33 48 -0.65536000000000000000e5 +2820 2 12 26 -0.65536000000000000000e5 +2820 3 12 24 0.65536000000000000000e5 +2820 3 13 42 -0.13107200000000000000e6 +2820 3 28 41 -0.65536000000000000000e5 +2820 3 29 42 -0.65536000000000000000e5 +2820 4 3 31 0.65536000000000000000e5 +2821 3 3 32 -0.65536000000000000000e5 +2821 3 12 25 0.65536000000000000000e5 +2822 1 2 33 0.65536000000000000000e5 +2822 1 11 42 -0.65536000000000000000e5 +2822 1 12 43 -0.13107200000000000000e6 +2822 1 28 43 0.65536000000000000000e5 +2822 1 32 47 0.65536000000000000000e5 +2822 1 33 48 0.65536000000000000000e5 +2822 2 12 26 0.65536000000000000000e5 +2822 3 3 32 0.65536000000000000000e5 +2822 3 12 26 0.65536000000000000000e5 +2822 3 13 42 0.13107200000000000000e6 +2822 3 14 27 -0.13107200000000000000e6 +2822 3 28 41 0.65536000000000000000e5 +2822 3 29 42 0.65536000000000000000e5 +2822 4 3 31 -0.65536000000000000000e5 +2822 4 8 20 0.65536000000000000000e5 +2823 3 1 34 -0.65536000000000000000e5 +2823 3 12 27 0.65536000000000000000e5 +2824 1 3 34 -0.65536000000000000000e5 +2824 1 16 47 0.65536000000000000000e5 +2824 3 12 28 0.65536000000000000000e5 +2824 3 12 41 0.65536000000000000000e5 +2825 3 12 29 0.65536000000000000000e5 +2825 3 14 27 -0.65536000000000000000e5 +2826 1 4 35 -0.65536000000000000000e5 +2826 1 17 48 0.65536000000000000000e5 +2826 3 12 30 0.65536000000000000000e5 +2826 3 13 42 0.65536000000000000000e5 +2827 1 3 18 -0.32768000000000000000e5 +2827 1 4 19 0.65536000000000000000e5 +2827 1 4 35 0.32768000000000000000e5 +2827 1 12 43 0.65536000000000000000e5 +2827 1 14 45 0.65536000000000000000e5 +2827 1 17 48 -0.32768000000000000000e5 +2827 1 18 49 -0.32768000000000000000e5 +2827 1 20 27 -0.13107200000000000000e6 +2827 1 27 34 0.65536000000000000000e5 +2827 2 9 23 0.32768000000000000000e5 +2827 2 10 24 0.65536000000000000000e5 +2827 2 14 28 -0.32768000000000000000e5 +2827 3 3 16 -0.32768000000000000000e5 +2827 3 4 17 -0.32768000000000000000e5 +2827 3 5 34 0.32768000000000000000e5 +2827 3 12 31 0.65536000000000000000e5 +2827 3 13 42 -0.32768000000000000000e5 +2827 3 14 27 0.65536000000000000000e5 +2827 3 14 43 -0.32768000000000000000e5 +2827 4 2 14 -0.32768000000000000000e5 +2828 1 3 18 0.32768000000000000000e5 +2828 1 4 19 -0.65536000000000000000e5 +2828 1 12 43 -0.32768000000000000000e5 +2828 1 13 44 0.65536000000000000000e5 +2828 3 3 16 0.32768000000000000000e5 +2828 3 4 17 0.32768000000000000000e5 +2828 3 12 32 0.65536000000000000000e5 +2828 3 14 27 -0.32768000000000000000e5 +2828 4 2 14 0.32768000000000000000e5 +2829 3 12 33 0.65536000000000000000e5 +2829 3 16 29 -0.65536000000000000000e5 +2830 3 7 36 -0.65536000000000000000e5 +2830 3 12 34 0.65536000000000000000e5 +2831 1 3 18 0.16384000000000000000e5 +2831 1 4 19 -0.32768000000000000000e5 +2831 1 5 36 -0.32768000000000000000e5 +2831 1 12 43 -0.16384000000000000000e5 +2831 1 13 44 0.32768000000000000000e5 +2831 1 14 45 0.32768000000000000000e5 +2831 3 3 16 0.16384000000000000000e5 +2831 3 4 17 0.16384000000000000000e5 +2831 3 12 35 0.65536000000000000000e5 +2831 3 14 27 -0.16384000000000000000e5 +2831 3 16 29 -0.32768000000000000000e5 +2831 4 2 14 0.16384000000000000000e5 +2831 4 11 23 -0.32768000000000000000e5 +2832 1 3 18 0.81920000000000000000e4 +2832 1 4 19 -0.16384000000000000000e5 +2832 1 5 36 -0.16384000000000000000e5 +2832 1 12 43 -0.81920000000000000000e4 +2832 1 13 44 0.16384000000000000000e5 +2832 1 14 45 0.16384000000000000000e5 +2832 2 11 25 -0.32768000000000000000e5 +2832 2 15 29 0.32768000000000000000e5 +2832 3 3 16 0.81920000000000000000e4 +2832 3 4 17 0.81920000000000000000e4 +2832 3 7 36 -0.32768000000000000000e5 +2832 3 12 36 0.65536000000000000000e5 +2832 3 14 27 -0.81920000000000000000e4 +2832 3 16 29 -0.16384000000000000000e5 +2832 3 18 31 -0.32768000000000000000e5 +2832 4 2 14 0.81920000000000000000e4 +2832 4 11 23 -0.16384000000000000000e5 +2833 1 9 40 0.32768000000000000000e5 +2833 1 10 41 -0.65536000000000000000e5 +2833 1 26 41 -0.32768000000000000000e5 +2833 1 32 47 0.65536000000000000000e5 +2833 3 8 37 -0.32768000000000000000e5 +2833 3 9 38 0.32768000000000000000e5 +2833 3 12 37 0.65536000000000000000e5 +2833 3 22 27 -0.32768000000000000000e5 +2833 3 28 41 0.65536000000000000000e5 +2833 4 1 29 -0.32768000000000000000e5 +2833 4 2 30 0.32768000000000000000e5 +2834 1 11 42 -0.65536000000000000000e5 +2834 1 33 48 0.65536000000000000000e5 +2834 2 12 26 0.65536000000000000000e5 +2834 2 20 34 -0.65536000000000000000e5 +2834 3 12 38 0.65536000000000000000e5 +2834 3 13 42 0.13107200000000000000e6 +2834 3 22 35 -0.13107200000000000000e6 +2834 3 29 42 0.65536000000000000000e5 +2834 4 3 31 -0.65536000000000000000e5 +2834 4 6 34 -0.65536000000000000000e5 +2835 1 10 41 -0.65536000000000000000e5 +2835 1 32 47 0.65536000000000000000e5 +2835 3 12 39 0.65536000000000000000e5 +2835 3 28 41 0.65536000000000000000e5 +2836 1 10 41 0.65536000000000000000e5 +2836 1 11 42 0.65536000000000000000e5 +2836 1 32 47 -0.65536000000000000000e5 +2836 1 33 48 -0.65536000000000000000e5 +2836 3 12 40 0.65536000000000000000e5 +2836 3 13 42 -0.13107200000000000000e6 +2836 3 28 41 -0.65536000000000000000e5 +2836 3 29 42 -0.65536000000000000000e5 +2836 4 3 31 0.65536000000000000000e5 +2837 3 12 42 0.65536000000000000000e5 +2837 3 22 35 -0.65536000000000000000e5 +2838 3 12 43 0.65536000000000000000e5 +2838 3 13 42 -0.65536000000000000000e5 +2839 1 13 44 -0.65536000000000000000e5 +2839 1 34 41 0.65536000000000000000e5 +2839 3 12 44 0.65536000000000000000e5 +2840 1 14 45 -0.65536000000000000000e5 +2840 1 17 48 0.32768000000000000000e5 +2840 1 18 49 0.32768000000000000000e5 +2840 1 34 49 0.32768000000000000000e5 +2840 2 14 28 0.32768000000000000000e5 +2840 3 12 45 0.65536000000000000000e5 +2840 3 14 43 0.32768000000000000000e5 +2840 3 18 47 0.32768000000000000000e5 +2840 3 22 35 -0.32768000000000000000e5 +2840 4 14 26 -0.32768000000000000000e5 +2841 1 3 18 -0.16384000000000000000e5 +2841 1 4 19 0.32768000000000000000e5 +2841 1 5 36 0.32768000000000000000e5 +2841 1 12 43 0.16384000000000000000e5 +2841 1 13 44 -0.32768000000000000000e5 +2841 1 14 45 -0.32768000000000000000e5 +2841 1 17 32 -0.65536000000000000000e5 +2841 1 19 50 0.65536000000000000000e5 +2841 3 3 16 -0.16384000000000000000e5 +2841 3 4 17 -0.16384000000000000000e5 +2841 3 12 46 0.65536000000000000000e5 +2841 3 14 27 0.16384000000000000000e5 +2841 3 16 29 0.32768000000000000000e5 +2841 4 2 14 -0.16384000000000000000e5 +2841 4 11 23 0.32768000000000000000e5 +2842 1 6 53 0.16384000000000000000e5 +2842 1 25 40 -0.16384000000000000000e5 +2842 2 4 34 0.32768000000000000000e5 +2842 2 21 35 -0.32768000000000000000e5 +2842 3 5 50 0.32768000000000000000e5 +2842 3 7 52 -0.13107200000000000000e6 +2842 3 12 47 0.65536000000000000000e5 +2842 3 24 37 0.16384000000000000000e5 +2842 3 27 40 0.65536000000000000000e5 +2842 3 28 41 0.65536000000000000000e5 +2842 4 4 32 -0.16384000000000000000e5 +2842 4 6 34 0.65536000000000000000e5 +2842 4 7 35 -0.32768000000000000000e5 +2842 4 16 28 0.16384000000000000000e5 +2843 3 12 48 0.65536000000000000000e5 +2843 3 28 41 -0.65536000000000000000e5 +2844 1 6 53 -0.16384000000000000000e5 +2844 1 25 40 0.16384000000000000000e5 +2844 2 4 34 -0.32768000000000000000e5 +2844 2 21 35 0.32768000000000000000e5 +2844 3 5 50 -0.32768000000000000000e5 +2844 3 12 49 0.65536000000000000000e5 +2844 3 24 37 -0.16384000000000000000e5 +2844 3 27 40 -0.65536000000000000000e5 +2844 4 4 32 0.16384000000000000000e5 +2844 4 7 35 0.32768000000000000000e5 +2844 4 16 28 -0.16384000000000000000e5 +2845 3 7 52 -0.65536000000000000000e5 +2845 3 12 50 0.65536000000000000000e5 +2846 1 6 53 -0.81920000000000000000e4 +2846 1 25 40 0.81920000000000000000e4 +2846 2 4 34 -0.16384000000000000000e5 +2846 2 21 35 0.16384000000000000000e5 +2846 3 5 50 -0.16384000000000000000e5 +2846 3 12 51 0.65536000000000000000e5 +2846 3 24 37 -0.81920000000000000000e4 +2846 3 27 40 -0.32768000000000000000e5 +2846 3 28 41 -0.32768000000000000000e5 +2846 3 29 42 -0.32768000000000000000e5 +2846 4 4 32 0.81920000000000000000e4 +2846 4 7 35 0.16384000000000000000e5 +2846 4 16 28 -0.81920000000000000000e4 +2846 4 23 27 -0.32768000000000000000e5 +2847 3 12 52 0.65536000000000000000e5 +2847 3 31 44 -0.65536000000000000000e5 +2848 1 32 47 -0.65536000000000000000e5 +2848 1 37 52 0.65536000000000000000e5 +2848 3 12 53 0.65536000000000000000e5 +2849 3 12 54 0.65536000000000000000e5 +2849 3 23 52 -0.65536000000000000000e5 +2850 3 12 55 0.65536000000000000000e5 +2850 3 34 47 -0.65536000000000000000e5 +2851 1 1 48 -0.16384000000000000000e5 +2851 1 2 49 -0.16384000000000000000e5 +2851 1 8 39 -0.32768000000000000000e5 +2851 1 9 40 -0.32768000000000000000e5 +2851 1 10 41 0.65536000000000000000e5 +2851 1 12 43 0.13107200000000000000e6 +2851 1 23 38 -0.16384000000000000000e5 +2851 1 24 55 0.32768000000000000000e5 +2851 1 26 41 0.32768000000000000000e5 +2851 1 28 43 -0.13107200000000000000e6 +2851 1 32 47 -0.13107200000000000000e6 +2851 1 33 48 0.65536000000000000000e5 +2851 1 40 55 -0.32768000000000000000e5 +2851 1 41 56 -0.32768000000000000000e5 +2851 1 44 51 -0.13107200000000000000e6 +2851 1 46 53 0.13107200000000000000e6 +2851 2 2 32 -0.16384000000000000000e5 +2851 2 4 34 0.32768000000000000000e5 +2851 2 16 30 -0.32768000000000000000e5 +2851 2 20 34 -0.65536000000000000000e5 +2851 2 28 34 -0.32768000000000000000e5 +2851 3 5 50 0.32768000000000000000e5 +2851 3 9 38 -0.32768000000000000000e5 +2851 3 10 55 0.65536000000000000000e5 +2851 3 12 56 0.65536000000000000000e5 +2851 3 22 35 -0.13107200000000000000e6 +2851 3 22 51 -0.32768000000000000000e5 +2851 3 23 52 0.65536000000000000000e5 +2851 3 27 40 0.32768000000000000000e5 +2851 3 27 56 -0.32768000000000000000e5 +2851 3 28 41 -0.13107200000000000000e6 +2851 3 35 48 -0.13107200000000000000e6 +2851 3 38 51 0.32768000000000000000e5 +2851 3 39 52 0.65536000000000000000e5 +2851 3 40 45 0.65536000000000000000e5 +2851 4 2 30 -0.32768000000000000000e5 +2851 4 6 34 -0.65536000000000000000e5 +2851 4 7 35 -0.32768000000000000000e5 +2851 4 22 34 0.65536000000000000000e5 +2851 4 23 35 0.65536000000000000000e5 +2851 4 29 33 0.32768000000000000000e5 +2852 1 3 18 -0.16384000000000000000e5 +2852 1 12 43 0.16384000000000000000e5 +2852 3 3 16 -0.16384000000000000000e5 +2852 3 4 17 -0.16384000000000000000e5 +2852 3 13 13 0.65536000000000000000e5 +2852 3 14 27 0.16384000000000000000e5 +2852 4 2 14 -0.16384000000000000000e5 +2853 1 4 35 0.32768000000000000000e5 +2853 1 10 17 -0.65536000000000000000e5 +2853 1 12 43 0.32768000000000000000e5 +2853 1 14 45 0.65536000000000000000e5 +2853 1 17 48 -0.32768000000000000000e5 +2853 1 18 49 -0.32768000000000000000e5 +2853 2 9 23 0.32768000000000000000e5 +2853 2 14 28 -0.32768000000000000000e5 +2853 3 5 34 0.32768000000000000000e5 +2853 3 13 14 0.65536000000000000000e5 +2853 3 13 42 -0.32768000000000000000e5 +2853 3 14 27 0.32768000000000000000e5 +2853 3 14 43 -0.32768000000000000000e5 +2854 1 5 20 -0.65536000000000000000e5 +2854 1 5 36 0.65536000000000000000e5 +2854 3 13 15 0.65536000000000000000e5 +2855 3 7 20 -0.65536000000000000000e5 +2855 3 13 16 0.65536000000000000000e5 +2856 1 3 18 -0.16384000000000000000e5 +2856 1 4 35 0.16384000000000000000e5 +2856 1 5 20 -0.32768000000000000000e5 +2856 1 5 36 0.32768000000000000000e5 +2856 1 10 17 -0.32768000000000000000e5 +2856 1 12 43 0.32768000000000000000e5 +2856 1 14 45 0.32768000000000000000e5 +2856 1 17 48 -0.16384000000000000000e5 +2856 1 18 49 -0.16384000000000000000e5 +2856 2 9 23 0.16384000000000000000e5 +2856 2 14 28 -0.16384000000000000000e5 +2856 3 3 16 -0.16384000000000000000e5 +2856 3 4 17 -0.16384000000000000000e5 +2856 3 5 34 0.16384000000000000000e5 +2856 3 13 17 0.65536000000000000000e5 +2856 3 13 42 -0.16384000000000000000e5 +2856 3 14 27 0.32768000000000000000e5 +2856 3 14 43 -0.16384000000000000000e5 +2856 4 2 14 -0.16384000000000000000e5 +2856 4 3 15 -0.32768000000000000000e5 +2857 1 3 18 0.16384000000000000000e5 +2857 1 4 35 -0.16384000000000000000e5 +2857 1 5 20 0.32768000000000000000e5 +2857 1 5 36 -0.32768000000000000000e5 +2857 1 10 17 0.32768000000000000000e5 +2857 1 12 43 -0.32768000000000000000e5 +2857 1 14 45 -0.32768000000000000000e5 +2857 1 17 48 0.16384000000000000000e5 +2857 1 18 49 0.16384000000000000000e5 +2857 2 9 23 -0.16384000000000000000e5 +2857 2 14 28 0.16384000000000000000e5 +2857 3 3 16 0.16384000000000000000e5 +2857 3 4 17 0.16384000000000000000e5 +2857 3 5 34 -0.16384000000000000000e5 +2857 3 7 20 0.65536000000000000000e5 +2857 3 8 21 -0.13107200000000000000e6 +2857 3 13 18 0.65536000000000000000e5 +2857 3 13 42 0.16384000000000000000e5 +2857 3 14 27 -0.32768000000000000000e5 +2857 3 14 43 0.16384000000000000000e5 +2857 4 2 14 0.16384000000000000000e5 +2857 4 3 15 0.32768000000000000000e5 +2857 4 10 14 0.65536000000000000000e5 +2858 3 8 21 -0.65536000000000000000e5 +2858 3 13 19 0.65536000000000000000e5 +2859 3 13 20 0.65536000000000000000e5 +2859 3 14 19 -0.65536000000000000000e5 +2860 3 8 21 -0.32768000000000000000e5 +2860 3 13 21 0.65536000000000000000e5 +2860 3 15 20 0.32768000000000000000e5 +2860 3 18 19 -0.65536000000000000000e5 +2860 4 11 15 -0.32768000000000000000e5 +2860 4 14 14 0.65536000000000000000e5 +2861 3 2 31 -0.65536000000000000000e5 +2861 3 13 22 0.65536000000000000000e5 +2862 1 2 33 -0.65536000000000000000e5 +2862 1 11 42 0.65536000000000000000e5 +2862 1 12 43 0.13107200000000000000e6 +2862 1 28 43 -0.65536000000000000000e5 +2862 1 32 47 -0.65536000000000000000e5 +2862 1 33 48 -0.65536000000000000000e5 +2862 2 12 26 -0.65536000000000000000e5 +2862 3 13 23 0.65536000000000000000e5 +2862 3 13 42 -0.13107200000000000000e6 +2862 3 28 41 -0.65536000000000000000e5 +2862 3 29 42 -0.65536000000000000000e5 +2862 4 3 31 0.65536000000000000000e5 +2863 3 3 32 -0.65536000000000000000e5 +2863 3 13 24 0.65536000000000000000e5 +2864 1 2 33 0.65536000000000000000e5 +2864 1 11 42 -0.65536000000000000000e5 +2864 1 12 43 -0.13107200000000000000e6 +2864 1 28 43 0.65536000000000000000e5 +2864 1 32 47 0.65536000000000000000e5 +2864 1 33 48 0.65536000000000000000e5 +2864 2 12 26 0.65536000000000000000e5 +2864 3 3 32 0.65536000000000000000e5 +2864 3 13 25 0.65536000000000000000e5 +2864 3 13 42 0.13107200000000000000e6 +2864 3 14 27 -0.13107200000000000000e6 +2864 3 28 41 0.65536000000000000000e5 +2864 3 29 42 0.65536000000000000000e5 +2864 4 3 31 -0.65536000000000000000e5 +2864 4 8 20 0.65536000000000000000e5 +2865 3 4 33 -0.65536000000000000000e5 +2865 3 13 26 0.65536000000000000000e5 +2866 1 3 34 -0.65536000000000000000e5 +2866 1 16 47 0.65536000000000000000e5 +2866 3 12 41 0.65536000000000000000e5 +2866 3 13 27 0.65536000000000000000e5 +2867 3 13 28 0.65536000000000000000e5 +2867 3 14 27 -0.65536000000000000000e5 +2868 1 4 35 -0.65536000000000000000e5 +2868 1 17 48 0.65536000000000000000e5 +2868 3 13 29 0.65536000000000000000e5 +2868 3 13 42 0.65536000000000000000e5 +2869 3 5 34 -0.65536000000000000000e5 +2869 3 13 30 0.65536000000000000000e5 +2870 1 3 18 0.32768000000000000000e5 +2870 1 4 19 -0.65536000000000000000e5 +2870 1 12 43 -0.32768000000000000000e5 +2870 1 13 44 0.65536000000000000000e5 +2870 3 3 16 0.32768000000000000000e5 +2870 3 4 17 0.32768000000000000000e5 +2870 3 13 31 0.65536000000000000000e5 +2870 3 14 27 -0.32768000000000000000e5 +2870 4 2 14 0.32768000000000000000e5 +2871 3 13 32 0.65536000000000000000e5 +2871 3 16 29 -0.65536000000000000000e5 +2872 1 5 36 -0.65536000000000000000e5 +2872 1 14 45 0.65536000000000000000e5 +2872 3 13 33 0.65536000000000000000e5 +2873 1 3 18 0.16384000000000000000e5 +2873 1 4 19 -0.32768000000000000000e5 +2873 1 5 36 -0.32768000000000000000e5 +2873 1 12 43 -0.16384000000000000000e5 +2873 1 13 44 0.32768000000000000000e5 +2873 1 14 45 0.32768000000000000000e5 +2873 3 3 16 0.16384000000000000000e5 +2873 3 4 17 0.16384000000000000000e5 +2873 3 13 34 0.65536000000000000000e5 +2873 3 14 27 -0.16384000000000000000e5 +2873 3 16 29 -0.32768000000000000000e5 +2873 4 2 14 0.16384000000000000000e5 +2873 4 11 23 -0.32768000000000000000e5 +2874 3 13 35 0.65536000000000000000e5 +2874 3 18 31 -0.65536000000000000000e5 +2875 3 13 36 0.65536000000000000000e5 +2875 3 19 32 -0.65536000000000000000e5 +2876 1 11 42 -0.65536000000000000000e5 +2876 1 33 48 0.65536000000000000000e5 +2876 2 12 26 0.65536000000000000000e5 +2876 2 20 34 -0.65536000000000000000e5 +2876 3 13 37 0.65536000000000000000e5 +2876 3 13 42 0.13107200000000000000e6 +2876 3 22 35 -0.13107200000000000000e6 +2876 3 29 42 0.65536000000000000000e5 +2876 4 3 31 -0.65536000000000000000e5 +2876 4 6 34 -0.65536000000000000000e5 +2877 1 10 41 -0.65536000000000000000e5 +2877 1 32 47 0.65536000000000000000e5 +2877 3 13 38 0.65536000000000000000e5 +2877 3 28 41 0.65536000000000000000e5 +2878 1 10 41 0.65536000000000000000e5 +2878 1 11 42 0.65536000000000000000e5 +2878 1 32 47 -0.65536000000000000000e5 +2878 1 33 48 -0.65536000000000000000e5 +2878 3 13 39 0.65536000000000000000e5 +2878 3 13 42 -0.13107200000000000000e6 +2878 3 28 41 -0.65536000000000000000e5 +2878 3 29 42 -0.65536000000000000000e5 +2878 4 3 31 0.65536000000000000000e5 +2879 1 11 42 -0.65536000000000000000e5 +2879 1 33 48 0.65536000000000000000e5 +2879 3 13 40 0.65536000000000000000e5 +2879 3 29 42 0.65536000000000000000e5 +2880 3 13 41 0.65536000000000000000e5 +2880 3 22 35 -0.65536000000000000000e5 +2881 1 14 45 -0.13107200000000000000e6 +2881 1 17 48 0.65536000000000000000e5 +2881 1 18 49 0.65536000000000000000e5 +2881 1 34 49 0.65536000000000000000e5 +2881 2 14 28 0.65536000000000000000e5 +2881 3 13 42 0.65536000000000000000e5 +2881 3 13 43 0.65536000000000000000e5 +2881 3 14 43 0.65536000000000000000e5 +2881 3 18 47 0.65536000000000000000e5 +2882 1 14 45 -0.65536000000000000000e5 +2882 1 17 48 0.32768000000000000000e5 +2882 1 18 49 0.32768000000000000000e5 +2882 1 34 49 0.32768000000000000000e5 +2882 2 14 28 0.32768000000000000000e5 +2882 3 13 44 0.65536000000000000000e5 +2882 3 14 43 0.32768000000000000000e5 +2882 3 18 47 0.32768000000000000000e5 +2882 3 22 35 -0.32768000000000000000e5 +2882 4 14 26 -0.32768000000000000000e5 +2883 1 14 45 0.65536000000000000000e5 +2883 1 17 48 -0.32768000000000000000e5 +2883 1 18 49 -0.32768000000000000000e5 +2883 1 34 49 -0.32768000000000000000e5 +2883 2 14 28 -0.32768000000000000000e5 +2883 3 13 45 0.65536000000000000000e5 +2883 3 14 43 -0.32768000000000000000e5 +2883 3 15 44 0.65536000000000000000e5 +2883 3 16 45 -0.13107200000000000000e6 +2883 3 18 47 -0.32768000000000000000e5 +2883 3 22 35 0.32768000000000000000e5 +2883 4 14 26 0.32768000000000000000e5 +2883 4 15 27 0.65536000000000000000e5 +2884 3 13 46 0.65536000000000000000e5 +2884 3 16 45 -0.65536000000000000000e5 +2885 3 13 47 0.65536000000000000000e5 +2885 3 28 41 -0.65536000000000000000e5 +2886 1 6 53 -0.16384000000000000000e5 +2886 1 25 40 0.16384000000000000000e5 +2886 2 4 34 -0.32768000000000000000e5 +2886 2 21 35 0.32768000000000000000e5 +2886 3 5 50 -0.32768000000000000000e5 +2886 3 13 48 0.65536000000000000000e5 +2886 3 24 37 -0.16384000000000000000e5 +2886 3 27 40 -0.65536000000000000000e5 +2886 4 4 32 0.16384000000000000000e5 +2886 4 7 35 0.32768000000000000000e5 +2886 4 16 28 -0.16384000000000000000e5 +2887 3 13 49 0.65536000000000000000e5 +2887 3 29 42 -0.65536000000000000000e5 +2888 1 6 53 -0.81920000000000000000e4 +2888 1 25 40 0.81920000000000000000e4 +2888 2 4 34 -0.16384000000000000000e5 +2888 2 21 35 0.16384000000000000000e5 +2888 3 5 50 -0.16384000000000000000e5 +2888 3 13 50 0.65536000000000000000e5 +2888 3 24 37 -0.81920000000000000000e4 +2888 3 27 40 -0.32768000000000000000e5 +2888 3 28 41 -0.32768000000000000000e5 +2888 3 29 42 -0.32768000000000000000e5 +2888 4 4 32 0.81920000000000000000e4 +2888 4 7 35 0.16384000000000000000e5 +2888 4 16 28 -0.81920000000000000000e4 +2888 4 23 27 -0.32768000000000000000e5 +2889 3 13 51 0.65536000000000000000e5 +2889 3 18 47 -0.65536000000000000000e5 +2890 3 13 52 0.65536000000000000000e5 +2890 3 19 48 -0.65536000000000000000e5 +2891 3 13 53 0.65536000000000000000e5 +2891 3 23 52 -0.65536000000000000000e5 +2892 3 10 55 0.65536000000000000000e5 +2892 3 13 54 0.65536000000000000000e5 +2892 3 35 48 -0.13107200000000000000e6 +2892 3 40 45 0.65536000000000000000e5 +2892 4 22 34 0.65536000000000000000e5 +2893 1 34 49 -0.65536000000000000000e5 +2893 1 44 51 0.65536000000000000000e5 +2893 3 13 55 0.65536000000000000000e5 +2894 1 1 48 0.16384000000000000000e5 +2894 1 2 49 0.16384000000000000000e5 +2894 1 8 39 0.32768000000000000000e5 +2894 1 9 40 0.32768000000000000000e5 +2894 1 10 41 -0.65536000000000000000e5 +2894 1 12 43 -0.13107200000000000000e6 +2894 1 23 38 0.16384000000000000000e5 +2894 1 24 55 -0.32768000000000000000e5 +2894 1 26 41 -0.32768000000000000000e5 +2894 1 28 43 0.13107200000000000000e6 +2894 1 32 47 0.13107200000000000000e6 +2894 1 33 48 -0.65536000000000000000e5 +2894 1 40 55 0.32768000000000000000e5 +2894 1 41 56 0.32768000000000000000e5 +2894 2 2 32 0.16384000000000000000e5 +2894 2 4 34 -0.32768000000000000000e5 +2894 2 16 30 0.32768000000000000000e5 +2894 2 20 34 0.65536000000000000000e5 +2894 2 28 34 0.32768000000000000000e5 +2894 3 5 50 -0.32768000000000000000e5 +2894 3 9 38 0.32768000000000000000e5 +2894 3 10 55 -0.65536000000000000000e5 +2894 3 13 56 0.65536000000000000000e5 +2894 3 22 35 0.13107200000000000000e6 +2894 3 22 51 0.32768000000000000000e5 +2894 3 23 52 -0.65536000000000000000e5 +2894 3 27 40 -0.32768000000000000000e5 +2894 3 27 56 0.32768000000000000000e5 +2894 3 28 41 0.13107200000000000000e6 +2894 3 35 48 0.13107200000000000000e6 +2894 3 38 51 -0.32768000000000000000e5 +2894 3 40 45 -0.65536000000000000000e5 +2894 4 2 30 0.32768000000000000000e5 +2894 4 6 34 0.65536000000000000000e5 +2894 4 7 35 0.32768000000000000000e5 +2894 4 22 34 -0.65536000000000000000e5 +2894 4 29 33 -0.32768000000000000000e5 +2895 1 5 20 -0.32768000000000000000e5 +2895 1 5 36 0.32768000000000000000e5 +2895 3 14 14 0.65536000000000000000e5 +2896 3 6 19 -0.65536000000000000000e5 +2896 3 14 15 0.65536000000000000000e5 +2897 1 3 18 -0.16384000000000000000e5 +2897 1 4 35 0.16384000000000000000e5 +2897 1 5 20 -0.32768000000000000000e5 +2897 1 5 36 0.32768000000000000000e5 +2897 1 10 17 -0.32768000000000000000e5 +2897 1 12 43 0.32768000000000000000e5 +2897 1 14 45 0.32768000000000000000e5 +2897 1 17 48 -0.16384000000000000000e5 +2897 1 18 49 -0.16384000000000000000e5 +2897 2 9 23 0.16384000000000000000e5 +2897 2 14 28 -0.16384000000000000000e5 +2897 3 3 16 -0.16384000000000000000e5 +2897 3 4 17 -0.16384000000000000000e5 +2897 3 5 34 0.16384000000000000000e5 +2897 3 13 42 -0.16384000000000000000e5 +2897 3 14 16 0.65536000000000000000e5 +2897 3 14 27 0.32768000000000000000e5 +2897 3 14 43 -0.16384000000000000000e5 +2897 4 2 14 -0.16384000000000000000e5 +2897 4 3 15 -0.32768000000000000000e5 +2898 1 3 18 0.16384000000000000000e5 +2898 1 4 35 -0.16384000000000000000e5 +2898 1 5 20 0.32768000000000000000e5 +2898 1 5 36 -0.32768000000000000000e5 +2898 1 10 17 0.32768000000000000000e5 +2898 1 12 43 -0.32768000000000000000e5 +2898 1 14 45 -0.32768000000000000000e5 +2898 1 17 48 0.16384000000000000000e5 +2898 1 18 49 0.16384000000000000000e5 +2898 2 9 23 -0.16384000000000000000e5 +2898 2 14 28 0.16384000000000000000e5 +2898 3 3 16 0.16384000000000000000e5 +2898 3 4 17 0.16384000000000000000e5 +2898 3 5 34 -0.16384000000000000000e5 +2898 3 7 20 0.65536000000000000000e5 +2898 3 8 21 -0.13107200000000000000e6 +2898 3 13 42 0.16384000000000000000e5 +2898 3 14 17 0.65536000000000000000e5 +2898 3 14 27 -0.32768000000000000000e5 +2898 3 14 43 0.16384000000000000000e5 +2898 4 2 14 0.16384000000000000000e5 +2898 4 3 15 0.32768000000000000000e5 +2898 4 10 14 0.65536000000000000000e5 +2899 1 6 21 -0.65536000000000000000e5 +2899 1 18 33 0.65536000000000000000e5 +2899 3 14 18 0.65536000000000000000e5 +2900 3 14 19 0.65536000000000000000e5 +2900 3 14 20 0.65536000000000000000e5 +2900 3 15 20 0.65536000000000000000e5 +2900 3 18 19 -0.13107200000000000000e6 +2900 4 14 14 0.13107200000000000000e6 +2901 3 14 21 0.65536000000000000000e5 +2901 3 18 19 -0.65536000000000000000e5 +2902 1 2 33 -0.65536000000000000000e5 +2902 1 11 42 0.65536000000000000000e5 +2902 1 12 43 0.13107200000000000000e6 +2902 1 28 43 -0.65536000000000000000e5 +2902 1 32 47 -0.65536000000000000000e5 +2902 1 33 48 -0.65536000000000000000e5 +2902 2 12 26 -0.65536000000000000000e5 +2902 3 13 42 -0.13107200000000000000e6 +2902 3 14 22 0.65536000000000000000e5 +2902 3 28 41 -0.65536000000000000000e5 +2902 3 29 42 -0.65536000000000000000e5 +2902 4 3 31 0.65536000000000000000e5 +2903 3 3 32 -0.65536000000000000000e5 +2903 3 14 23 0.65536000000000000000e5 +2904 1 2 33 0.65536000000000000000e5 +2904 1 11 42 -0.65536000000000000000e5 +2904 1 12 43 -0.13107200000000000000e6 +2904 1 28 43 0.65536000000000000000e5 +2904 1 32 47 0.65536000000000000000e5 +2904 1 33 48 0.65536000000000000000e5 +2904 2 12 26 0.65536000000000000000e5 +2904 3 3 32 0.65536000000000000000e5 +2904 3 13 42 0.13107200000000000000e6 +2904 3 14 24 0.65536000000000000000e5 +2904 3 14 27 -0.13107200000000000000e6 +2904 3 28 41 0.65536000000000000000e5 +2904 3 29 42 0.65536000000000000000e5 +2904 4 3 31 -0.65536000000000000000e5 +2904 4 8 20 0.65536000000000000000e5 +2905 3 4 33 -0.65536000000000000000e5 +2905 3 14 25 0.65536000000000000000e5 +2906 1 2 33 -0.65536000000000000000e5 +2906 1 11 42 0.65536000000000000000e5 +2906 1 12 43 0.13107200000000000000e6 +2906 1 28 43 -0.65536000000000000000e5 +2906 1 32 47 -0.65536000000000000000e5 +2906 1 33 48 -0.65536000000000000000e5 +2906 2 12 26 -0.65536000000000000000e5 +2906 3 3 32 -0.65536000000000000000e5 +2906 3 4 33 0.65536000000000000000e5 +2906 3 5 34 -0.13107200000000000000e6 +2906 3 13 42 -0.13107200000000000000e6 +2906 3 14 26 0.65536000000000000000e5 +2906 3 14 27 0.13107200000000000000e6 +2906 3 28 41 -0.65536000000000000000e5 +2906 3 29 42 -0.65536000000000000000e5 +2906 4 3 31 0.65536000000000000000e5 +2906 4 8 20 -0.65536000000000000000e5 +2906 4 9 21 0.65536000000000000000e5 +2907 1 4 35 -0.65536000000000000000e5 +2907 1 17 48 0.65536000000000000000e5 +2907 3 13 42 0.65536000000000000000e5 +2907 3 14 28 0.65536000000000000000e5 +2908 3 5 34 -0.65536000000000000000e5 +2908 3 14 29 0.65536000000000000000e5 +2909 1 15 30 -0.65536000000000000000e5 +2909 1 18 49 0.65536000000000000000e5 +2909 3 14 30 0.65536000000000000000e5 +2909 3 14 43 0.65536000000000000000e5 +2910 3 14 31 0.65536000000000000000e5 +2910 3 16 29 -0.65536000000000000000e5 +2911 1 5 36 -0.65536000000000000000e5 +2911 1 14 45 0.65536000000000000000e5 +2911 3 14 32 0.65536000000000000000e5 +2912 3 14 33 0.65536000000000000000e5 +2912 3 17 30 -0.65536000000000000000e5 +2913 3 14 34 0.65536000000000000000e5 +2913 3 18 31 -0.65536000000000000000e5 +2914 1 15 46 0.65536000000000000000e5 +2914 1 18 33 -0.65536000000000000000e5 +2914 3 14 35 0.65536000000000000000e5 +2915 1 3 18 -0.81920000000000000000e4 +2915 1 4 19 0.16384000000000000000e5 +2915 1 5 36 0.16384000000000000000e5 +2915 1 12 43 0.81920000000000000000e4 +2915 1 13 44 -0.16384000000000000000e5 +2915 1 14 21 -0.13107200000000000000e6 +2915 1 14 45 -0.16384000000000000000e5 +2915 1 21 44 0.13107200000000000000e6 +2915 2 11 25 0.32768000000000000000e5 +2915 2 15 29 -0.32768000000000000000e5 +2915 3 3 16 -0.81920000000000000000e4 +2915 3 4 17 -0.81920000000000000000e4 +2915 3 7 36 0.32768000000000000000e5 +2915 3 8 21 0.65536000000000000000e5 +2915 3 14 27 0.81920000000000000000e4 +2915 3 14 36 0.65536000000000000000e5 +2915 3 15 20 -0.65536000000000000000e5 +2915 3 16 29 0.16384000000000000000e5 +2915 3 18 19 0.13107200000000000000e6 +2915 3 18 31 0.32768000000000000000e5 +2915 3 19 32 0.65536000000000000000e5 +2915 4 2 14 -0.81920000000000000000e4 +2915 4 11 15 0.65536000000000000000e5 +2915 4 11 23 0.16384000000000000000e5 +2915 4 13 25 0.65536000000000000000e5 +2915 4 14 14 -0.13107200000000000000e6 +2916 1 10 41 -0.65536000000000000000e5 +2916 1 32 47 0.65536000000000000000e5 +2916 3 14 37 0.65536000000000000000e5 +2916 3 28 41 0.65536000000000000000e5 +2917 1 10 41 0.65536000000000000000e5 +2917 1 11 42 0.65536000000000000000e5 +2917 1 32 47 -0.65536000000000000000e5 +2917 1 33 48 -0.65536000000000000000e5 +2917 3 13 42 -0.13107200000000000000e6 +2917 3 14 38 0.65536000000000000000e5 +2917 3 28 41 -0.65536000000000000000e5 +2917 3 29 42 -0.65536000000000000000e5 +2917 4 3 31 0.65536000000000000000e5 +2918 1 11 42 -0.65536000000000000000e5 +2918 1 33 48 0.65536000000000000000e5 +2918 3 14 39 0.65536000000000000000e5 +2918 3 29 42 0.65536000000000000000e5 +2919 1 26 33 -0.65536000000000000000e5 +2919 1 33 40 0.65536000000000000000e5 +2919 3 14 40 0.65536000000000000000e5 +2920 3 13 42 -0.65536000000000000000e5 +2920 3 14 41 0.65536000000000000000e5 +2921 1 14 45 -0.13107200000000000000e6 +2921 1 17 48 0.65536000000000000000e5 +2921 1 18 49 0.65536000000000000000e5 +2921 1 34 49 0.65536000000000000000e5 +2921 2 14 28 0.65536000000000000000e5 +2921 3 13 42 0.65536000000000000000e5 +2921 3 14 42 0.65536000000000000000e5 +2921 3 14 43 0.65536000000000000000e5 +2921 3 18 47 0.65536000000000000000e5 +2922 1 14 45 0.65536000000000000000e5 +2922 1 17 48 -0.32768000000000000000e5 +2922 1 18 49 -0.32768000000000000000e5 +2922 1 34 49 -0.32768000000000000000e5 +2922 2 14 28 -0.32768000000000000000e5 +2922 3 14 43 -0.32768000000000000000e5 +2922 3 14 44 0.65536000000000000000e5 +2922 3 15 44 0.65536000000000000000e5 +2922 3 16 45 -0.13107200000000000000e6 +2922 3 18 47 -0.32768000000000000000e5 +2922 3 22 35 0.32768000000000000000e5 +2922 4 14 26 0.32768000000000000000e5 +2922 4 15 27 0.65536000000000000000e5 +2923 3 14 45 0.65536000000000000000e5 +2923 3 15 44 -0.65536000000000000000e5 +2924 1 15 46 -0.65536000000000000000e5 +2924 1 20 51 0.65536000000000000000e5 +2924 3 14 46 0.65536000000000000000e5 +2925 1 6 53 -0.16384000000000000000e5 +2925 1 25 40 0.16384000000000000000e5 +2925 2 4 34 -0.32768000000000000000e5 +2925 2 21 35 0.32768000000000000000e5 +2925 3 5 50 -0.32768000000000000000e5 +2925 3 14 47 0.65536000000000000000e5 +2925 3 24 37 -0.16384000000000000000e5 +2925 3 27 40 -0.65536000000000000000e5 +2925 4 4 32 0.16384000000000000000e5 +2925 4 7 35 0.32768000000000000000e5 +2925 4 16 28 -0.16384000000000000000e5 +2926 3 14 48 0.65536000000000000000e5 +2926 3 29 42 -0.65536000000000000000e5 +2927 3 14 49 0.65536000000000000000e5 +2927 3 14 51 -0.13107200000000000000e6 +2927 3 29 42 0.65536000000000000000e5 +2927 3 30 43 0.65536000000000000000e5 +2927 4 19 31 0.65536000000000000000e5 +2928 3 14 50 0.65536000000000000000e5 +2928 3 18 47 -0.65536000000000000000e5 +2929 3 14 52 0.65536000000000000000e5 +2929 3 32 45 -0.65536000000000000000e5 +2930 3 10 55 0.65536000000000000000e5 +2930 3 14 53 0.65536000000000000000e5 +2930 3 35 48 -0.13107200000000000000e6 +2930 3 40 45 0.65536000000000000000e5 +2930 4 22 34 0.65536000000000000000e5 +2931 3 10 55 -0.65536000000000000000e5 +2931 3 14 54 0.65536000000000000000e5 +2932 3 14 55 0.65536000000000000000e5 +2932 3 35 48 -0.65536000000000000000e5 +2933 3 14 56 0.65536000000000000000e5 +2933 3 39 52 -0.65536000000000000000e5 +2934 1 5 20 0.32768000000000000000e5 +2934 1 5 36 -0.32768000000000000000e5 +2934 1 6 21 -0.65536000000000000000e5 +2934 1 18 33 0.65536000000000000000e5 +2934 3 6 19 0.32768000000000000000e5 +2934 3 15 15 0.65536000000000000000e5 +2934 4 12 12 0.65536000000000000000e5 +2935 1 3 18 0.16384000000000000000e5 +2935 1 4 35 -0.16384000000000000000e5 +2935 1 5 20 0.32768000000000000000e5 +2935 1 5 36 -0.32768000000000000000e5 +2935 1 10 17 0.32768000000000000000e5 +2935 1 12 43 -0.32768000000000000000e5 +2935 1 14 45 -0.32768000000000000000e5 +2935 1 17 48 0.16384000000000000000e5 +2935 1 18 49 0.16384000000000000000e5 +2935 2 9 23 -0.16384000000000000000e5 +2935 2 14 28 0.16384000000000000000e5 +2935 3 3 16 0.16384000000000000000e5 +2935 3 4 17 0.16384000000000000000e5 +2935 3 5 34 -0.16384000000000000000e5 +2935 3 7 20 0.65536000000000000000e5 +2935 3 8 21 -0.13107200000000000000e6 +2935 3 13 42 0.16384000000000000000e5 +2935 3 14 27 -0.32768000000000000000e5 +2935 3 14 43 0.16384000000000000000e5 +2935 3 15 16 0.65536000000000000000e5 +2935 4 2 14 0.16384000000000000000e5 +2935 4 3 15 0.32768000000000000000e5 +2935 4 10 14 0.65536000000000000000e5 +2936 1 6 21 -0.65536000000000000000e5 +2936 1 18 33 0.65536000000000000000e5 +2936 3 15 17 0.65536000000000000000e5 +2937 3 11 20 -0.65536000000000000000e5 +2937 3 15 18 0.65536000000000000000e5 +2938 3 14 19 0.65536000000000000000e5 +2938 3 15 19 0.65536000000000000000e5 +2938 3 15 20 0.65536000000000000000e5 +2938 3 18 19 -0.13107200000000000000e6 +2938 4 14 14 0.13107200000000000000e6 +2939 3 3 32 -0.65536000000000000000e5 +2939 3 15 22 0.65536000000000000000e5 +2940 1 2 33 0.65536000000000000000e5 +2940 1 11 42 -0.65536000000000000000e5 +2940 1 12 43 -0.13107200000000000000e6 +2940 1 28 43 0.65536000000000000000e5 +2940 1 32 47 0.65536000000000000000e5 +2940 1 33 48 0.65536000000000000000e5 +2940 2 12 26 0.65536000000000000000e5 +2940 3 3 32 0.65536000000000000000e5 +2940 3 13 42 0.13107200000000000000e6 +2940 3 14 27 -0.13107200000000000000e6 +2940 3 15 23 0.65536000000000000000e5 +2940 3 28 41 0.65536000000000000000e5 +2940 3 29 42 0.65536000000000000000e5 +2940 4 3 31 -0.65536000000000000000e5 +2940 4 8 20 0.65536000000000000000e5 +2941 3 4 33 -0.65536000000000000000e5 +2941 3 15 24 0.65536000000000000000e5 +2942 1 2 33 -0.65536000000000000000e5 +2942 1 11 42 0.65536000000000000000e5 +2942 1 12 43 0.13107200000000000000e6 +2942 1 28 43 -0.65536000000000000000e5 +2942 1 32 47 -0.65536000000000000000e5 +2942 1 33 48 -0.65536000000000000000e5 +2942 2 12 26 -0.65536000000000000000e5 +2942 3 3 32 -0.65536000000000000000e5 +2942 3 4 33 0.65536000000000000000e5 +2942 3 5 34 -0.13107200000000000000e6 +2942 3 13 42 -0.13107200000000000000e6 +2942 3 14 27 0.13107200000000000000e6 +2942 3 15 25 0.65536000000000000000e5 +2942 3 28 41 -0.65536000000000000000e5 +2942 3 29 42 -0.65536000000000000000e5 +2942 4 3 31 0.65536000000000000000e5 +2942 4 8 20 -0.65536000000000000000e5 +2942 4 9 21 0.65536000000000000000e5 +2943 3 11 30 -0.65536000000000000000e5 +2943 3 15 26 0.65536000000000000000e5 +2944 1 4 35 -0.65536000000000000000e5 +2944 1 17 48 0.65536000000000000000e5 +2944 3 13 42 0.65536000000000000000e5 +2944 3 15 27 0.65536000000000000000e5 +2945 3 5 34 -0.65536000000000000000e5 +2945 3 15 28 0.65536000000000000000e5 +2946 1 15 30 -0.65536000000000000000e5 +2946 1 18 49 0.65536000000000000000e5 +2946 3 14 43 0.65536000000000000000e5 +2946 3 15 29 0.65536000000000000000e5 +2947 3 6 35 -0.65536000000000000000e5 +2947 3 15 30 0.65536000000000000000e5 +2948 1 5 36 -0.65536000000000000000e5 +2948 1 14 45 0.65536000000000000000e5 +2948 3 15 31 0.65536000000000000000e5 +2949 3 15 32 0.65536000000000000000e5 +2949 3 17 30 -0.65536000000000000000e5 +2950 1 5 36 0.65536000000000000000e5 +2950 1 14 45 -0.65536000000000000000e5 +2950 1 15 46 0.13107200000000000000e6 +2950 1 18 33 -0.13107200000000000000e6 +2950 3 15 33 0.65536000000000000000e5 +2950 3 17 30 0.65536000000000000000e5 +2950 4 12 24 0.65536000000000000000e5 +2951 1 15 46 0.65536000000000000000e5 +2951 1 18 33 -0.65536000000000000000e5 +2951 3 15 34 0.65536000000000000000e5 +2952 3 15 35 0.65536000000000000000e5 +2952 3 21 26 -0.65536000000000000000e5 +2953 3 15 36 0.65536000000000000000e5 +2953 3 20 33 -0.65536000000000000000e5 +2954 1 10 41 0.65536000000000000000e5 +2954 1 11 42 0.65536000000000000000e5 +2954 1 32 47 -0.65536000000000000000e5 +2954 1 33 48 -0.65536000000000000000e5 +2954 3 13 42 -0.13107200000000000000e6 +2954 3 15 37 0.65536000000000000000e5 +2954 3 28 41 -0.65536000000000000000e5 +2954 3 29 42 -0.65536000000000000000e5 +2954 4 3 31 0.65536000000000000000e5 +2955 1 11 42 -0.65536000000000000000e5 +2955 1 33 48 0.65536000000000000000e5 +2955 3 15 38 0.65536000000000000000e5 +2955 3 29 42 0.65536000000000000000e5 +2956 1 26 33 -0.65536000000000000000e5 +2956 1 33 40 0.65536000000000000000e5 +2956 3 15 39 0.65536000000000000000e5 +2957 1 11 42 0.65536000000000000000e5 +2957 1 26 33 0.65536000000000000000e5 +2957 1 33 40 -0.65536000000000000000e5 +2957 1 33 48 -0.65536000000000000000e5 +2957 3 14 43 -0.13107200000000000000e6 +2957 3 15 40 0.65536000000000000000e5 +2957 3 29 42 -0.65536000000000000000e5 +2957 4 22 22 0.13107200000000000000e6 +2958 1 14 45 -0.13107200000000000000e6 +2958 1 17 48 0.65536000000000000000e5 +2958 1 18 49 0.65536000000000000000e5 +2958 1 34 49 0.65536000000000000000e5 +2958 2 14 28 0.65536000000000000000e5 +2958 3 13 42 0.65536000000000000000e5 +2958 3 14 43 0.65536000000000000000e5 +2958 3 15 41 0.65536000000000000000e5 +2958 3 18 47 0.65536000000000000000e5 +2959 3 14 43 -0.65536000000000000000e5 +2959 3 15 42 0.65536000000000000000e5 +2960 3 15 43 0.65536000000000000000e5 +2960 3 26 35 -0.65536000000000000000e5 +2961 3 15 45 0.65536000000000000000e5 +2961 3 30 35 -0.65536000000000000000e5 +2962 3 15 47 0.65536000000000000000e5 +2962 3 29 42 -0.65536000000000000000e5 +2963 3 14 51 -0.13107200000000000000e6 +2963 3 15 48 0.65536000000000000000e5 +2963 3 29 42 0.65536000000000000000e5 +2963 3 30 43 0.65536000000000000000e5 +2963 4 19 31 0.65536000000000000000e5 +2964 3 15 49 0.65536000000000000000e5 +2964 3 30 43 -0.65536000000000000000e5 +2965 3 14 51 -0.65536000000000000000e5 +2965 3 15 50 0.65536000000000000000e5 +2966 3 15 51 0.65536000000000000000e5 +2966 3 35 40 -0.65536000000000000000e5 +2967 3 15 52 0.65536000000000000000e5 +2967 3 20 49 -0.65536000000000000000e5 +2968 3 10 55 -0.65536000000000000000e5 +2968 3 15 53 0.65536000000000000000e5 +2969 3 15 54 0.65536000000000000000e5 +2969 3 40 45 -0.65536000000000000000e5 +2970 1 11 18 -0.13107200000000000000e6 +2970 1 34 49 0.65536000000000000000e5 +2970 1 44 51 -0.65536000000000000000e5 +2970 1 45 52 0.13107200000000000000e6 +2970 3 6 19 0.13107200000000000000e6 +2970 3 15 44 0.13107200000000000000e6 +2970 3 15 55 0.65536000000000000000e5 +2970 3 17 30 0.13107200000000000000e6 +2970 3 32 45 0.13107200000000000000e6 +2970 3 35 48 0.65536000000000000000e5 +2970 4 25 33 0.65536000000000000000e5 +2971 1 1 48 -0.16384000000000000000e5 +2971 1 2 49 -0.16384000000000000000e5 +2971 1 8 39 -0.32768000000000000000e5 +2971 1 9 40 -0.32768000000000000000e5 +2971 1 10 41 0.65536000000000000000e5 +2971 1 12 43 0.13107200000000000000e6 +2971 1 23 38 -0.16384000000000000000e5 +2971 1 24 55 0.32768000000000000000e5 +2971 1 26 41 0.32768000000000000000e5 +2971 1 28 43 -0.13107200000000000000e6 +2971 1 32 47 -0.13107200000000000000e6 +2971 1 33 48 0.65536000000000000000e5 +2971 1 40 55 -0.32768000000000000000e5 +2971 1 41 56 -0.32768000000000000000e5 +2971 2 2 32 -0.16384000000000000000e5 +2971 2 4 34 0.32768000000000000000e5 +2971 2 16 30 -0.32768000000000000000e5 +2971 2 20 34 -0.65536000000000000000e5 +2971 2 28 34 -0.32768000000000000000e5 +2971 3 5 50 0.32768000000000000000e5 +2971 3 9 38 -0.32768000000000000000e5 +2971 3 10 55 0.65536000000000000000e5 +2971 3 15 56 0.65536000000000000000e5 +2971 3 22 35 -0.13107200000000000000e6 +2971 3 22 51 -0.32768000000000000000e5 +2971 3 23 52 0.65536000000000000000e5 +2971 3 27 40 0.32768000000000000000e5 +2971 3 27 56 -0.32768000000000000000e5 +2971 3 28 41 -0.13107200000000000000e6 +2971 3 35 48 -0.13107200000000000000e6 +2971 3 38 51 0.32768000000000000000e5 +2971 3 39 52 0.65536000000000000000e5 +2971 3 40 45 0.65536000000000000000e5 +2971 3 45 50 -0.13107200000000000000e6 +2971 4 2 30 -0.32768000000000000000e5 +2971 4 6 34 -0.65536000000000000000e5 +2971 4 7 35 -0.32768000000000000000e5 +2971 4 22 34 0.65536000000000000000e5 +2971 4 29 33 0.32768000000000000000e5 +2971 4 30 34 0.65536000000000000000e5 +2972 3 8 21 0.32768000000000000000e5 +2972 3 12 21 -0.65536000000000000000e5 +2972 3 14 19 0.32768000000000000000e5 +2972 3 16 16 0.65536000000000000000e5 +2972 4 13 13 0.65536000000000000000e5 +2973 3 8 21 -0.65536000000000000000e5 +2973 3 16 17 0.65536000000000000000e5 +2974 3 14 19 -0.65536000000000000000e5 +2974 3 16 18 0.65536000000000000000e5 +2975 3 12 21 -0.65536000000000000000e5 +2975 3 16 19 0.65536000000000000000e5 +2976 3 8 21 -0.32768000000000000000e5 +2976 3 15 20 0.32768000000000000000e5 +2976 3 16 20 0.65536000000000000000e5 +2976 3 18 19 -0.65536000000000000000e5 +2976 4 11 15 -0.32768000000000000000e5 +2976 4 14 14 0.65536000000000000000e5 +2977 3 1 34 -0.65536000000000000000e5 +2977 3 16 22 0.65536000000000000000e5 +2978 1 3 34 -0.65536000000000000000e5 +2978 1 16 47 0.65536000000000000000e5 +2978 3 12 41 0.65536000000000000000e5 +2978 3 16 23 0.65536000000000000000e5 +2979 3 14 27 -0.65536000000000000000e5 +2979 3 16 24 0.65536000000000000000e5 +2980 1 4 35 -0.65536000000000000000e5 +2980 1 17 48 0.65536000000000000000e5 +2980 3 13 42 0.65536000000000000000e5 +2980 3 16 25 0.65536000000000000000e5 +2981 3 5 34 -0.65536000000000000000e5 +2981 3 16 26 0.65536000000000000000e5 +2982 1 3 18 -0.32768000000000000000e5 +2982 1 4 19 0.65536000000000000000e5 +2982 1 4 35 0.32768000000000000000e5 +2982 1 12 43 0.65536000000000000000e5 +2982 1 14 45 0.65536000000000000000e5 +2982 1 17 48 -0.32768000000000000000e5 +2982 1 18 49 -0.32768000000000000000e5 +2982 1 20 27 -0.13107200000000000000e6 +2982 1 27 34 0.65536000000000000000e5 +2982 2 9 23 0.32768000000000000000e5 +2982 2 10 24 0.65536000000000000000e5 +2982 2 14 28 -0.32768000000000000000e5 +2982 3 3 16 -0.32768000000000000000e5 +2982 3 4 17 -0.32768000000000000000e5 +2982 3 5 34 0.32768000000000000000e5 +2982 3 13 42 -0.32768000000000000000e5 +2982 3 14 27 0.65536000000000000000e5 +2982 3 14 43 -0.32768000000000000000e5 +2982 3 16 27 0.65536000000000000000e5 +2982 4 2 14 -0.32768000000000000000e5 +2983 1 3 18 0.32768000000000000000e5 +2983 1 4 19 -0.65536000000000000000e5 +2983 1 12 43 -0.32768000000000000000e5 +2983 1 13 44 0.65536000000000000000e5 +2983 3 3 16 0.32768000000000000000e5 +2983 3 4 17 0.32768000000000000000e5 +2983 3 14 27 -0.32768000000000000000e5 +2983 3 16 28 0.65536000000000000000e5 +2983 4 2 14 0.32768000000000000000e5 +2984 1 5 36 -0.65536000000000000000e5 +2984 1 14 45 0.65536000000000000000e5 +2984 3 16 30 0.65536000000000000000e5 +2985 3 7 36 -0.65536000000000000000e5 +2985 3 16 31 0.65536000000000000000e5 +2986 1 3 18 0.16384000000000000000e5 +2986 1 4 19 -0.32768000000000000000e5 +2986 1 5 36 -0.32768000000000000000e5 +2986 1 12 43 -0.16384000000000000000e5 +2986 1 13 44 0.32768000000000000000e5 +2986 1 14 45 0.32768000000000000000e5 +2986 3 3 16 0.16384000000000000000e5 +2986 3 4 17 0.16384000000000000000e5 +2986 3 14 27 -0.16384000000000000000e5 +2986 3 16 29 -0.32768000000000000000e5 +2986 3 16 32 0.65536000000000000000e5 +2986 4 2 14 0.16384000000000000000e5 +2986 4 11 23 -0.32768000000000000000e5 +2987 3 16 33 0.65536000000000000000e5 +2987 3 18 31 -0.65536000000000000000e5 +2988 1 3 18 0.81920000000000000000e4 +2988 1 4 19 -0.16384000000000000000e5 +2988 1 5 36 -0.16384000000000000000e5 +2988 1 12 43 -0.81920000000000000000e4 +2988 1 13 44 0.16384000000000000000e5 +2988 1 14 45 0.16384000000000000000e5 +2988 2 11 25 -0.32768000000000000000e5 +2988 2 15 29 0.32768000000000000000e5 +2988 3 3 16 0.81920000000000000000e4 +2988 3 4 17 0.81920000000000000000e4 +2988 3 7 36 -0.32768000000000000000e5 +2988 3 14 27 -0.81920000000000000000e4 +2988 3 16 29 -0.16384000000000000000e5 +2988 3 16 34 0.65536000000000000000e5 +2988 3 18 31 -0.32768000000000000000e5 +2988 4 2 14 0.81920000000000000000e4 +2988 4 11 23 -0.16384000000000000000e5 +2989 3 16 35 0.65536000000000000000e5 +2989 3 19 32 -0.65536000000000000000e5 +2990 1 14 21 -0.65536000000000000000e5 +2990 1 21 44 0.65536000000000000000e5 +2990 3 8 21 0.32768000000000000000e5 +2990 3 15 20 -0.32768000000000000000e5 +2990 3 16 36 0.65536000000000000000e5 +2990 3 18 19 0.65536000000000000000e5 +2990 4 11 15 0.32768000000000000000e5 +2990 4 14 14 -0.65536000000000000000e5 +2991 3 12 41 -0.65536000000000000000e5 +2991 3 16 37 0.65536000000000000000e5 +2992 3 16 38 0.65536000000000000000e5 +2992 3 22 35 -0.65536000000000000000e5 +2993 3 13 42 -0.65536000000000000000e5 +2993 3 16 39 0.65536000000000000000e5 +2994 1 14 45 -0.13107200000000000000e6 +2994 1 17 48 0.65536000000000000000e5 +2994 1 18 49 0.65536000000000000000e5 +2994 1 34 49 0.65536000000000000000e5 +2994 2 14 28 0.65536000000000000000e5 +2994 3 13 42 0.65536000000000000000e5 +2994 3 14 43 0.65536000000000000000e5 +2994 3 16 40 0.65536000000000000000e5 +2994 3 18 47 0.65536000000000000000e5 +2995 1 13 44 -0.65536000000000000000e5 +2995 1 34 41 0.65536000000000000000e5 +2995 3 16 41 0.65536000000000000000e5 +2996 1 14 45 -0.65536000000000000000e5 +2996 1 17 48 0.32768000000000000000e5 +2996 1 18 49 0.32768000000000000000e5 +2996 1 34 49 0.32768000000000000000e5 +2996 2 14 28 0.32768000000000000000e5 +2996 3 14 43 0.32768000000000000000e5 +2996 3 16 42 0.65536000000000000000e5 +2996 3 18 47 0.32768000000000000000e5 +2996 3 22 35 -0.32768000000000000000e5 +2996 4 14 26 -0.32768000000000000000e5 +2997 1 14 45 0.65536000000000000000e5 +2997 1 17 48 -0.32768000000000000000e5 +2997 1 18 49 -0.32768000000000000000e5 +2997 1 34 49 -0.32768000000000000000e5 +2997 2 14 28 -0.32768000000000000000e5 +2997 3 14 43 -0.32768000000000000000e5 +2997 3 15 44 0.65536000000000000000e5 +2997 3 16 43 0.65536000000000000000e5 +2997 3 16 45 -0.13107200000000000000e6 +2997 3 18 47 -0.32768000000000000000e5 +2997 3 22 35 0.32768000000000000000e5 +2997 4 14 26 0.32768000000000000000e5 +2997 4 15 27 0.65536000000000000000e5 +2998 1 3 18 -0.16384000000000000000e5 +2998 1 4 19 0.32768000000000000000e5 +2998 1 5 36 0.32768000000000000000e5 +2998 1 12 43 0.16384000000000000000e5 +2998 1 13 44 -0.32768000000000000000e5 +2998 1 14 45 -0.32768000000000000000e5 +2998 1 17 32 -0.65536000000000000000e5 +2998 1 19 50 0.65536000000000000000e5 +2998 3 3 16 -0.16384000000000000000e5 +2998 3 4 17 -0.16384000000000000000e5 +2998 3 14 27 0.16384000000000000000e5 +2998 3 16 29 0.32768000000000000000e5 +2998 3 16 44 0.65536000000000000000e5 +2998 4 2 14 -0.16384000000000000000e5 +2998 4 11 23 0.32768000000000000000e5 +2999 1 6 21 -0.32768000000000000000e5 +2999 1 17 32 -0.32768000000000000000e5 +2999 1 19 50 0.32768000000000000000e5 +2999 1 20 51 0.32768000000000000000e5 +2999 2 9 15 -0.32768000000000000000e5 +2999 2 25 31 0.32768000000000000000e5 +2999 3 7 20 0.32768000000000000000e5 +2999 3 8 21 -0.65536000000000000000e5 +2999 3 14 19 0.65536000000000000000e5 +2999 3 16 45 -0.32768000000000000000e5 +2999 3 16 46 0.65536000000000000000e5 +2999 3 18 31 -0.32768000000000000000e5 +2999 3 19 32 0.65536000000000000000e5 +2999 4 10 14 0.32768000000000000000e5 +3000 3 7 52 -0.65536000000000000000e5 +3000 3 16 47 0.65536000000000000000e5 +3001 1 6 53 -0.81920000000000000000e4 +3001 1 25 40 0.81920000000000000000e4 +3001 2 4 34 -0.16384000000000000000e5 +3001 2 21 35 0.16384000000000000000e5 +3001 3 5 50 -0.16384000000000000000e5 +3001 3 16 48 0.65536000000000000000e5 +3001 3 24 37 -0.81920000000000000000e4 +3001 3 27 40 -0.32768000000000000000e5 +3001 3 28 41 -0.32768000000000000000e5 +3001 3 29 42 -0.32768000000000000000e5 +3001 4 4 32 0.81920000000000000000e4 +3001 4 7 35 0.16384000000000000000e5 +3001 4 16 28 -0.81920000000000000000e4 +3001 4 23 27 -0.32768000000000000000e5 +3002 3 16 49 0.65536000000000000000e5 +3002 3 18 47 -0.65536000000000000000e5 +3003 3 16 50 0.65536000000000000000e5 +3003 3 31 44 -0.65536000000000000000e5 +3004 3 16 51 0.65536000000000000000e5 +3004 3 19 48 -0.65536000000000000000e5 +3005 3 16 52 0.65536000000000000000e5 +3005 3 36 41 -0.65536000000000000000e5 +3006 3 16 53 0.65536000000000000000e5 +3006 3 34 47 -0.65536000000000000000e5 +3007 1 34 49 -0.65536000000000000000e5 +3007 1 44 51 0.65536000000000000000e5 +3007 3 16 54 0.65536000000000000000e5 +3008 3 16 55 0.65536000000000000000e5 +3008 3 41 46 -0.65536000000000000000e5 +3009 1 44 51 -0.65536000000000000000e5 +3009 1 46 53 0.65536000000000000000e5 +3009 3 16 56 0.65536000000000000000e5 +3010 3 14 19 -0.32768000000000000000e5 +3010 3 17 17 0.65536000000000000000e5 +3011 3 14 19 0.65536000000000000000e5 +3011 3 15 20 0.65536000000000000000e5 +3011 3 17 18 0.65536000000000000000e5 +3011 3 18 19 -0.13107200000000000000e6 +3011 4 14 14 0.13107200000000000000e6 +3012 3 8 21 -0.32768000000000000000e5 +3012 3 15 20 0.32768000000000000000e5 +3012 3 17 19 0.65536000000000000000e5 +3012 3 18 19 -0.65536000000000000000e5 +3012 4 11 15 -0.32768000000000000000e5 +3012 4 14 14 0.65536000000000000000e5 +3013 3 17 20 0.65536000000000000000e5 +3013 3 18 19 -0.65536000000000000000e5 +3014 3 17 21 0.65536000000000000000e5 +3014 3 19 20 -0.65536000000000000000e5 +3015 1 3 34 -0.65536000000000000000e5 +3015 1 16 47 0.65536000000000000000e5 +3015 3 12 41 0.65536000000000000000e5 +3015 3 17 22 0.65536000000000000000e5 +3016 3 14 27 -0.65536000000000000000e5 +3016 3 17 23 0.65536000000000000000e5 +3017 1 4 35 -0.65536000000000000000e5 +3017 1 17 48 0.65536000000000000000e5 +3017 3 13 42 0.65536000000000000000e5 +3017 3 17 24 0.65536000000000000000e5 +3018 3 5 34 -0.65536000000000000000e5 +3018 3 17 25 0.65536000000000000000e5 +3019 1 15 30 -0.65536000000000000000e5 +3019 1 18 49 0.65536000000000000000e5 +3019 3 14 43 0.65536000000000000000e5 +3019 3 17 26 0.65536000000000000000e5 +3020 1 3 18 0.32768000000000000000e5 +3020 1 4 19 -0.65536000000000000000e5 +3020 1 12 43 -0.32768000000000000000e5 +3020 1 13 44 0.65536000000000000000e5 +3020 3 3 16 0.32768000000000000000e5 +3020 3 4 17 0.32768000000000000000e5 +3020 3 14 27 -0.32768000000000000000e5 +3020 3 17 27 0.65536000000000000000e5 +3020 4 2 14 0.32768000000000000000e5 +3021 3 16 29 -0.65536000000000000000e5 +3021 3 17 28 0.65536000000000000000e5 +3022 1 5 36 -0.65536000000000000000e5 +3022 1 14 45 0.65536000000000000000e5 +3022 3 17 29 0.65536000000000000000e5 +3023 1 3 18 0.16384000000000000000e5 +3023 1 4 19 -0.32768000000000000000e5 +3023 1 5 36 -0.32768000000000000000e5 +3023 1 12 43 -0.16384000000000000000e5 +3023 1 13 44 0.32768000000000000000e5 +3023 1 14 45 0.32768000000000000000e5 +3023 3 3 16 0.16384000000000000000e5 +3023 3 4 17 0.16384000000000000000e5 +3023 3 14 27 -0.16384000000000000000e5 +3023 3 16 29 -0.32768000000000000000e5 +3023 3 17 31 0.65536000000000000000e5 +3023 4 2 14 0.16384000000000000000e5 +3023 4 11 23 -0.32768000000000000000e5 +3024 3 17 32 0.65536000000000000000e5 +3024 3 18 31 -0.65536000000000000000e5 +3025 1 15 46 0.65536000000000000000e5 +3025 1 18 33 -0.65536000000000000000e5 +3025 3 17 33 0.65536000000000000000e5 +3026 3 17 34 0.65536000000000000000e5 +3026 3 19 32 -0.65536000000000000000e5 +3027 1 3 18 -0.81920000000000000000e4 +3027 1 4 19 0.16384000000000000000e5 +3027 1 5 36 0.16384000000000000000e5 +3027 1 12 43 0.81920000000000000000e4 +3027 1 13 44 -0.16384000000000000000e5 +3027 1 14 21 -0.13107200000000000000e6 +3027 1 14 45 -0.16384000000000000000e5 +3027 1 21 44 0.13107200000000000000e6 +3027 2 11 25 0.32768000000000000000e5 +3027 2 15 29 -0.32768000000000000000e5 +3027 3 3 16 -0.81920000000000000000e4 +3027 3 4 17 -0.81920000000000000000e4 +3027 3 7 36 0.32768000000000000000e5 +3027 3 8 21 0.65536000000000000000e5 +3027 3 14 27 0.81920000000000000000e4 +3027 3 15 20 -0.65536000000000000000e5 +3027 3 16 29 0.16384000000000000000e5 +3027 3 17 35 0.65536000000000000000e5 +3027 3 18 19 0.13107200000000000000e6 +3027 3 18 31 0.32768000000000000000e5 +3027 3 19 32 0.65536000000000000000e5 +3027 4 2 14 -0.81920000000000000000e4 +3027 4 11 15 0.65536000000000000000e5 +3027 4 11 23 0.16384000000000000000e5 +3027 4 13 25 0.65536000000000000000e5 +3027 4 14 14 -0.13107200000000000000e6 +3028 1 6 21 0.16384000000000000000e5 +3028 1 17 32 0.16384000000000000000e5 +3028 1 19 50 -0.16384000000000000000e5 +3028 1 20 35 -0.65536000000000000000e5 +3028 1 20 51 -0.16384000000000000000e5 +3028 1 21 52 0.65536000000000000000e5 +3028 2 9 15 0.16384000000000000000e5 +3028 2 25 31 -0.16384000000000000000e5 +3028 3 7 20 -0.16384000000000000000e5 +3028 3 8 21 0.32768000000000000000e5 +3028 3 14 19 -0.32768000000000000000e5 +3028 3 16 45 0.16384000000000000000e5 +3028 3 17 36 0.65536000000000000000e5 +3028 3 17 46 0.32768000000000000000e5 +3028 3 18 31 0.16384000000000000000e5 +3028 3 19 32 -0.32768000000000000000e5 +3028 3 20 45 0.32768000000000000000e5 +3028 4 10 14 -0.16384000000000000000e5 +3028 4 25 25 0.65536000000000000000e5 +3029 3 17 37 0.65536000000000000000e5 +3029 3 22 35 -0.65536000000000000000e5 +3030 3 13 42 -0.65536000000000000000e5 +3030 3 17 38 0.65536000000000000000e5 +3031 1 14 45 -0.13107200000000000000e6 +3031 1 17 48 0.65536000000000000000e5 +3031 1 18 49 0.65536000000000000000e5 +3031 1 34 49 0.65536000000000000000e5 +3031 2 14 28 0.65536000000000000000e5 +3031 3 13 42 0.65536000000000000000e5 +3031 3 14 43 0.65536000000000000000e5 +3031 3 17 39 0.65536000000000000000e5 +3031 3 18 47 0.65536000000000000000e5 +3032 3 14 43 -0.65536000000000000000e5 +3032 3 17 40 0.65536000000000000000e5 +3033 1 14 45 -0.65536000000000000000e5 +3033 1 17 48 0.32768000000000000000e5 +3033 1 18 49 0.32768000000000000000e5 +3033 1 34 49 0.32768000000000000000e5 +3033 2 14 28 0.32768000000000000000e5 +3033 3 14 43 0.32768000000000000000e5 +3033 3 17 41 0.65536000000000000000e5 +3033 3 18 47 0.32768000000000000000e5 +3033 3 22 35 -0.32768000000000000000e5 +3033 4 14 26 -0.32768000000000000000e5 +3034 1 14 45 0.65536000000000000000e5 +3034 1 17 48 -0.32768000000000000000e5 +3034 1 18 49 -0.32768000000000000000e5 +3034 1 34 49 -0.32768000000000000000e5 +3034 2 14 28 -0.32768000000000000000e5 +3034 3 14 43 -0.32768000000000000000e5 +3034 3 15 44 0.65536000000000000000e5 +3034 3 16 45 -0.13107200000000000000e6 +3034 3 17 42 0.65536000000000000000e5 +3034 3 18 47 -0.32768000000000000000e5 +3034 3 22 35 0.32768000000000000000e5 +3034 4 14 26 0.32768000000000000000e5 +3034 4 15 27 0.65536000000000000000e5 +3035 3 15 44 -0.65536000000000000000e5 +3035 3 17 43 0.65536000000000000000e5 +3036 3 16 45 -0.65536000000000000000e5 +3036 3 17 44 0.65536000000000000000e5 +3037 1 15 46 -0.65536000000000000000e5 +3037 1 20 51 0.65536000000000000000e5 +3037 3 17 45 0.65536000000000000000e5 +3038 1 6 53 -0.81920000000000000000e4 +3038 1 25 40 0.81920000000000000000e4 +3038 2 4 34 -0.16384000000000000000e5 +3038 2 21 35 0.16384000000000000000e5 +3038 3 5 50 -0.16384000000000000000e5 +3038 3 17 47 0.65536000000000000000e5 +3038 3 24 37 -0.81920000000000000000e4 +3038 3 27 40 -0.32768000000000000000e5 +3038 3 28 41 -0.32768000000000000000e5 +3038 3 29 42 -0.32768000000000000000e5 +3038 4 4 32 0.81920000000000000000e4 +3038 4 7 35 0.16384000000000000000e5 +3038 4 16 28 -0.81920000000000000000e4 +3038 4 23 27 -0.32768000000000000000e5 +3039 3 17 48 0.65536000000000000000e5 +3039 3 18 47 -0.65536000000000000000e5 +3040 3 14 51 -0.65536000000000000000e5 +3040 3 17 49 0.65536000000000000000e5 +3041 3 17 50 0.65536000000000000000e5 +3041 3 19 48 -0.65536000000000000000e5 +3042 3 17 51 0.65536000000000000000e5 +3042 3 32 45 -0.65536000000000000000e5 +3043 1 20 51 -0.65536000000000000000e5 +3043 1 36 51 0.65536000000000000000e5 +3043 3 17 52 0.65536000000000000000e5 +3044 1 34 49 -0.65536000000000000000e5 +3044 1 44 51 0.65536000000000000000e5 +3044 3 17 53 0.65536000000000000000e5 +3045 3 17 54 0.65536000000000000000e5 +3045 3 35 48 -0.65536000000000000000e5 +3046 1 11 18 -0.65536000000000000000e5 +3046 1 45 52 0.65536000000000000000e5 +3046 3 6 19 0.65536000000000000000e5 +3046 3 15 44 0.65536000000000000000e5 +3046 3 17 30 0.65536000000000000000e5 +3046 3 17 55 0.65536000000000000000e5 +3046 3 32 45 0.65536000000000000000e5 +3047 3 17 56 0.65536000000000000000e5 +3047 3 45 50 -0.65536000000000000000e5 +3048 3 15 20 -0.32768000000000000000e5 +3048 3 18 18 0.65536000000000000000e5 +3049 3 15 21 -0.65536000000000000000e5 +3049 3 18 20 0.65536000000000000000e5 +3050 1 20 21 -0.13107200000000000000e6 +3050 1 21 36 0.13107200000000000000e6 +3050 3 16 21 0.65536000000000000000e5 +3050 3 18 21 0.65536000000000000000e5 +3050 3 19 20 0.65536000000000000000e5 +3050 4 15 15 0.13107200000000000000e6 +3051 3 14 27 -0.65536000000000000000e5 +3051 3 18 22 0.65536000000000000000e5 +3052 1 4 35 -0.65536000000000000000e5 +3052 1 17 48 0.65536000000000000000e5 +3052 3 13 42 0.65536000000000000000e5 +3052 3 18 23 0.65536000000000000000e5 +3053 3 5 34 -0.65536000000000000000e5 +3053 3 18 24 0.65536000000000000000e5 +3054 1 15 30 -0.65536000000000000000e5 +3054 1 18 49 0.65536000000000000000e5 +3054 3 14 43 0.65536000000000000000e5 +3054 3 18 25 0.65536000000000000000e5 +3055 3 6 35 -0.65536000000000000000e5 +3055 3 18 26 0.65536000000000000000e5 +3056 3 16 29 -0.65536000000000000000e5 +3056 3 18 27 0.65536000000000000000e5 +3057 1 5 36 -0.65536000000000000000e5 +3057 1 14 45 0.65536000000000000000e5 +3057 3 18 28 0.65536000000000000000e5 +3058 3 17 30 -0.65536000000000000000e5 +3058 3 18 29 0.65536000000000000000e5 +3059 1 5 36 0.65536000000000000000e5 +3059 1 14 45 -0.65536000000000000000e5 +3059 1 15 46 0.13107200000000000000e6 +3059 1 18 33 -0.13107200000000000000e6 +3059 3 17 30 0.65536000000000000000e5 +3059 3 18 30 0.65536000000000000000e5 +3059 4 12 24 0.65536000000000000000e5 +3060 1 15 46 0.65536000000000000000e5 +3060 1 18 33 -0.65536000000000000000e5 +3060 3 18 32 0.65536000000000000000e5 +3061 3 18 33 0.65536000000000000000e5 +3061 3 21 26 -0.65536000000000000000e5 +3062 1 3 18 -0.81920000000000000000e4 +3062 1 4 19 0.16384000000000000000e5 +3062 1 5 36 0.16384000000000000000e5 +3062 1 12 43 0.81920000000000000000e4 +3062 1 13 44 -0.16384000000000000000e5 +3062 1 14 21 -0.13107200000000000000e6 +3062 1 14 45 -0.16384000000000000000e5 +3062 1 21 44 0.13107200000000000000e6 +3062 2 11 25 0.32768000000000000000e5 +3062 2 15 29 -0.32768000000000000000e5 +3062 3 3 16 -0.81920000000000000000e4 +3062 3 4 17 -0.81920000000000000000e4 +3062 3 7 36 0.32768000000000000000e5 +3062 3 8 21 0.65536000000000000000e5 +3062 3 14 27 0.81920000000000000000e4 +3062 3 15 20 -0.65536000000000000000e5 +3062 3 16 29 0.16384000000000000000e5 +3062 3 18 19 0.13107200000000000000e6 +3062 3 18 31 0.32768000000000000000e5 +3062 3 18 34 0.65536000000000000000e5 +3062 3 19 32 0.65536000000000000000e5 +3062 4 2 14 -0.81920000000000000000e4 +3062 4 11 15 0.65536000000000000000e5 +3062 4 11 23 0.16384000000000000000e5 +3062 4 13 25 0.65536000000000000000e5 +3062 4 14 14 -0.13107200000000000000e6 +3063 3 18 35 0.65536000000000000000e5 +3063 3 20 33 -0.65536000000000000000e5 +3064 3 18 36 0.65536000000000000000e5 +3064 3 20 35 -0.65536000000000000000e5 +3065 3 13 42 -0.65536000000000000000e5 +3065 3 18 37 0.65536000000000000000e5 +3066 1 14 45 -0.13107200000000000000e6 +3066 1 17 48 0.65536000000000000000e5 +3066 1 18 49 0.65536000000000000000e5 +3066 1 34 49 0.65536000000000000000e5 +3066 2 14 28 0.65536000000000000000e5 +3066 3 13 42 0.65536000000000000000e5 +3066 3 14 43 0.65536000000000000000e5 +3066 3 18 38 0.65536000000000000000e5 +3066 3 18 47 0.65536000000000000000e5 +3067 3 14 43 -0.65536000000000000000e5 +3067 3 18 39 0.65536000000000000000e5 +3068 3 18 40 0.65536000000000000000e5 +3068 3 26 35 -0.65536000000000000000e5 +3069 1 14 45 0.65536000000000000000e5 +3069 1 17 48 -0.32768000000000000000e5 +3069 1 18 49 -0.32768000000000000000e5 +3069 1 34 49 -0.32768000000000000000e5 +3069 2 14 28 -0.32768000000000000000e5 +3069 3 14 43 -0.32768000000000000000e5 +3069 3 15 44 0.65536000000000000000e5 +3069 3 16 45 -0.13107200000000000000e6 +3069 3 18 41 0.65536000000000000000e5 +3069 3 18 47 -0.32768000000000000000e5 +3069 3 22 35 0.32768000000000000000e5 +3069 4 14 26 0.32768000000000000000e5 +3069 4 15 27 0.65536000000000000000e5 +3070 3 15 44 -0.65536000000000000000e5 +3070 3 18 42 0.65536000000000000000e5 +3071 3 18 43 0.65536000000000000000e5 +3071 3 30 35 -0.65536000000000000000e5 +3072 1 15 46 -0.65536000000000000000e5 +3072 1 20 51 0.65536000000000000000e5 +3072 3 18 44 0.65536000000000000000e5 +3073 3 15 46 -0.65536000000000000000e5 +3073 3 18 45 0.65536000000000000000e5 +3074 3 18 46 0.65536000000000000000e5 +3074 3 20 45 -0.65536000000000000000e5 +3075 3 14 51 -0.65536000000000000000e5 +3075 3 18 48 0.65536000000000000000e5 +3076 3 18 49 0.65536000000000000000e5 +3076 3 35 40 -0.65536000000000000000e5 +3077 3 18 50 0.65536000000000000000e5 +3077 3 32 45 -0.65536000000000000000e5 +3078 3 18 51 0.65536000000000000000e5 +3078 3 20 49 -0.65536000000000000000e5 +3079 3 18 52 0.65536000000000000000e5 +3079 3 33 46 -0.65536000000000000000e5 +3080 3 18 53 0.65536000000000000000e5 +3080 3 35 48 -0.65536000000000000000e5 +3081 1 11 18 -0.13107200000000000000e6 +3081 1 34 49 0.65536000000000000000e5 +3081 1 44 51 -0.65536000000000000000e5 +3081 1 45 52 0.13107200000000000000e6 +3081 3 6 19 0.13107200000000000000e6 +3081 3 15 44 0.13107200000000000000e6 +3081 3 17 30 0.13107200000000000000e6 +3081 3 18 54 0.65536000000000000000e5 +3081 3 32 45 0.13107200000000000000e6 +3081 3 35 48 0.65536000000000000000e5 +3081 4 25 33 0.65536000000000000000e5 +3082 3 18 55 0.65536000000000000000e5 +3082 3 36 49 -0.65536000000000000000e5 +3083 3 18 56 0.65536000000000000000e5 +3083 3 43 52 -0.65536000000000000000e5 +3084 3 16 21 -0.32768000000000000000e5 +3084 3 19 19 0.65536000000000000000e5 +3085 1 20 21 -0.65536000000000000000e5 +3085 1 21 36 0.65536000000000000000e5 +3085 3 19 21 0.65536000000000000000e5 +3086 1 3 18 -0.32768000000000000000e5 +3086 1 4 19 0.65536000000000000000e5 +3086 1 4 35 0.32768000000000000000e5 +3086 1 12 43 0.65536000000000000000e5 +3086 1 14 45 0.65536000000000000000e5 +3086 1 17 48 -0.32768000000000000000e5 +3086 1 18 49 -0.32768000000000000000e5 +3086 1 20 27 -0.13107200000000000000e6 +3086 1 27 34 0.65536000000000000000e5 +3086 2 9 23 0.32768000000000000000e5 +3086 2 10 24 0.65536000000000000000e5 +3086 2 14 28 -0.32768000000000000000e5 +3086 3 3 16 -0.32768000000000000000e5 +3086 3 4 17 -0.32768000000000000000e5 +3086 3 5 34 0.32768000000000000000e5 +3086 3 13 42 -0.32768000000000000000e5 +3086 3 14 27 0.65536000000000000000e5 +3086 3 14 43 -0.32768000000000000000e5 +3086 3 19 22 0.65536000000000000000e5 +3086 4 2 14 -0.32768000000000000000e5 +3087 1 3 18 0.32768000000000000000e5 +3087 1 4 19 -0.65536000000000000000e5 +3087 1 12 43 -0.32768000000000000000e5 +3087 1 13 44 0.65536000000000000000e5 +3087 3 3 16 0.32768000000000000000e5 +3087 3 4 17 0.32768000000000000000e5 +3087 3 14 27 -0.32768000000000000000e5 +3087 3 19 23 0.65536000000000000000e5 +3087 4 2 14 0.32768000000000000000e5 +3088 3 16 29 -0.65536000000000000000e5 +3088 3 19 24 0.65536000000000000000e5 +3089 1 5 36 -0.65536000000000000000e5 +3089 1 14 45 0.65536000000000000000e5 +3089 3 19 25 0.65536000000000000000e5 +3090 3 17 30 -0.65536000000000000000e5 +3090 3 19 26 0.65536000000000000000e5 +3091 3 7 36 -0.65536000000000000000e5 +3091 3 19 27 0.65536000000000000000e5 +3092 1 3 18 0.16384000000000000000e5 +3092 1 4 19 -0.32768000000000000000e5 +3092 1 5 36 -0.32768000000000000000e5 +3092 1 12 43 -0.16384000000000000000e5 +3092 1 13 44 0.32768000000000000000e5 +3092 1 14 45 0.32768000000000000000e5 +3092 3 3 16 0.16384000000000000000e5 +3092 3 4 17 0.16384000000000000000e5 +3092 3 14 27 -0.16384000000000000000e5 +3092 3 16 29 -0.32768000000000000000e5 +3092 3 19 28 0.65536000000000000000e5 +3092 4 2 14 0.16384000000000000000e5 +3092 4 11 23 -0.32768000000000000000e5 +3093 3 18 31 -0.65536000000000000000e5 +3093 3 19 29 0.65536000000000000000e5 +3094 1 15 46 0.65536000000000000000e5 +3094 1 18 33 -0.65536000000000000000e5 +3094 3 19 30 0.65536000000000000000e5 +3095 1 3 18 0.81920000000000000000e4 +3095 1 4 19 -0.16384000000000000000e5 +3095 1 5 36 -0.16384000000000000000e5 +3095 1 12 43 -0.81920000000000000000e4 +3095 1 13 44 0.16384000000000000000e5 +3095 1 14 45 0.16384000000000000000e5 +3095 2 11 25 -0.32768000000000000000e5 +3095 2 15 29 0.32768000000000000000e5 +3095 3 3 16 0.81920000000000000000e4 +3095 3 4 17 0.81920000000000000000e4 +3095 3 7 36 -0.32768000000000000000e5 +3095 3 14 27 -0.81920000000000000000e4 +3095 3 16 29 -0.16384000000000000000e5 +3095 3 18 31 -0.32768000000000000000e5 +3095 3 19 31 0.65536000000000000000e5 +3095 4 2 14 0.81920000000000000000e4 +3095 4 11 23 -0.16384000000000000000e5 +3096 1 3 18 -0.81920000000000000000e4 +3096 1 4 19 0.16384000000000000000e5 +3096 1 5 36 0.16384000000000000000e5 +3096 1 12 43 0.81920000000000000000e4 +3096 1 13 44 -0.16384000000000000000e5 +3096 1 14 21 -0.13107200000000000000e6 +3096 1 14 45 -0.16384000000000000000e5 +3096 1 21 44 0.13107200000000000000e6 +3096 2 11 25 0.32768000000000000000e5 +3096 2 15 29 -0.32768000000000000000e5 +3096 3 3 16 -0.81920000000000000000e4 +3096 3 4 17 -0.81920000000000000000e4 +3096 3 7 36 0.32768000000000000000e5 +3096 3 8 21 0.65536000000000000000e5 +3096 3 14 27 0.81920000000000000000e4 +3096 3 15 20 -0.65536000000000000000e5 +3096 3 16 29 0.16384000000000000000e5 +3096 3 18 19 0.13107200000000000000e6 +3096 3 18 31 0.32768000000000000000e5 +3096 3 19 32 0.65536000000000000000e5 +3096 3 19 33 0.65536000000000000000e5 +3096 4 2 14 -0.81920000000000000000e4 +3096 4 11 15 0.65536000000000000000e5 +3096 4 11 23 0.16384000000000000000e5 +3096 4 13 25 0.65536000000000000000e5 +3096 4 14 14 -0.13107200000000000000e6 +3097 1 14 21 -0.65536000000000000000e5 +3097 1 21 44 0.65536000000000000000e5 +3097 3 8 21 0.32768000000000000000e5 +3097 3 15 20 -0.32768000000000000000e5 +3097 3 18 19 0.65536000000000000000e5 +3097 3 19 34 0.65536000000000000000e5 +3097 4 11 15 0.32768000000000000000e5 +3097 4 14 14 -0.65536000000000000000e5 +3098 1 6 21 0.16384000000000000000e5 +3098 1 17 32 0.16384000000000000000e5 +3098 1 19 50 -0.16384000000000000000e5 +3098 1 20 35 -0.65536000000000000000e5 +3098 1 20 51 -0.16384000000000000000e5 +3098 1 21 52 0.65536000000000000000e5 +3098 2 9 15 0.16384000000000000000e5 +3098 2 25 31 -0.16384000000000000000e5 +3098 3 7 20 -0.16384000000000000000e5 +3098 3 8 21 0.32768000000000000000e5 +3098 3 14 19 -0.32768000000000000000e5 +3098 3 16 45 0.16384000000000000000e5 +3098 3 17 46 0.32768000000000000000e5 +3098 3 18 31 0.16384000000000000000e5 +3098 3 19 32 -0.32768000000000000000e5 +3098 3 19 35 0.65536000000000000000e5 +3098 3 20 45 0.32768000000000000000e5 +3098 4 10 14 -0.16384000000000000000e5 +3098 4 25 25 0.65536000000000000000e5 +3099 3 19 36 0.65536000000000000000e5 +3099 3 21 34 -0.65536000000000000000e5 +3100 1 13 44 -0.65536000000000000000e5 +3100 1 34 41 0.65536000000000000000e5 +3100 3 19 37 0.65536000000000000000e5 +3101 1 14 45 -0.65536000000000000000e5 +3101 1 17 48 0.32768000000000000000e5 +3101 1 18 49 0.32768000000000000000e5 +3101 1 34 49 0.32768000000000000000e5 +3101 2 14 28 0.32768000000000000000e5 +3101 3 14 43 0.32768000000000000000e5 +3101 3 18 47 0.32768000000000000000e5 +3101 3 19 38 0.65536000000000000000e5 +3101 3 22 35 -0.32768000000000000000e5 +3101 4 14 26 -0.32768000000000000000e5 +3102 1 14 45 0.65536000000000000000e5 +3102 1 17 48 -0.32768000000000000000e5 +3102 1 18 49 -0.32768000000000000000e5 +3102 1 34 49 -0.32768000000000000000e5 +3102 2 14 28 -0.32768000000000000000e5 +3102 3 14 43 -0.32768000000000000000e5 +3102 3 15 44 0.65536000000000000000e5 +3102 3 16 45 -0.13107200000000000000e6 +3102 3 18 47 -0.32768000000000000000e5 +3102 3 19 39 0.65536000000000000000e5 +3102 3 22 35 0.32768000000000000000e5 +3102 4 14 26 0.32768000000000000000e5 +3102 4 15 27 0.65536000000000000000e5 +3103 3 15 44 -0.65536000000000000000e5 +3103 3 19 40 0.65536000000000000000e5 +3104 1 3 18 -0.16384000000000000000e5 +3104 1 4 19 0.32768000000000000000e5 +3104 1 5 36 0.32768000000000000000e5 +3104 1 12 43 0.16384000000000000000e5 +3104 1 13 44 -0.32768000000000000000e5 +3104 1 14 45 -0.32768000000000000000e5 +3104 1 17 32 -0.65536000000000000000e5 +3104 1 19 50 0.65536000000000000000e5 +3104 3 3 16 -0.16384000000000000000e5 +3104 3 4 17 -0.16384000000000000000e5 +3104 3 14 27 0.16384000000000000000e5 +3104 3 16 29 0.32768000000000000000e5 +3104 3 19 41 0.65536000000000000000e5 +3104 4 2 14 -0.16384000000000000000e5 +3104 4 11 23 0.32768000000000000000e5 +3105 3 16 45 -0.65536000000000000000e5 +3105 3 19 42 0.65536000000000000000e5 +3106 1 15 46 -0.65536000000000000000e5 +3106 1 20 51 0.65536000000000000000e5 +3106 3 19 43 0.65536000000000000000e5 +3107 1 6 21 -0.32768000000000000000e5 +3107 1 17 32 -0.32768000000000000000e5 +3107 1 19 50 0.32768000000000000000e5 +3107 1 20 51 0.32768000000000000000e5 +3107 2 9 15 -0.32768000000000000000e5 +3107 2 25 31 0.32768000000000000000e5 +3107 3 7 20 0.32768000000000000000e5 +3107 3 8 21 -0.65536000000000000000e5 +3107 3 14 19 0.65536000000000000000e5 +3107 3 16 45 -0.32768000000000000000e5 +3107 3 18 31 -0.32768000000000000000e5 +3107 3 19 32 0.65536000000000000000e5 +3107 3 19 44 0.65536000000000000000e5 +3107 4 10 14 0.32768000000000000000e5 +3108 3 17 46 -0.65536000000000000000e5 +3108 3 19 45 0.65536000000000000000e5 +3109 1 6 21 -0.16384000000000000000e5 +3109 1 17 32 -0.16384000000000000000e5 +3109 1 19 50 0.16384000000000000000e5 +3109 1 20 51 0.16384000000000000000e5 +3109 2 9 15 -0.16384000000000000000e5 +3109 2 25 31 0.16384000000000000000e5 +3109 3 7 20 0.16384000000000000000e5 +3109 3 8 21 -0.32768000000000000000e5 +3109 3 14 19 0.32768000000000000000e5 +3109 3 16 45 -0.16384000000000000000e5 +3109 3 17 46 -0.32768000000000000000e5 +3109 3 18 31 -0.16384000000000000000e5 +3109 3 19 32 0.32768000000000000000e5 +3109 3 19 46 0.65536000000000000000e5 +3109 3 20 45 -0.32768000000000000000e5 +3109 4 10 14 0.16384000000000000000e5 +3109 4 25 25 -0.65536000000000000000e5 +3110 3 19 47 0.65536000000000000000e5 +3110 3 31 44 -0.65536000000000000000e5 +3111 3 19 49 0.65536000000000000000e5 +3111 3 32 45 -0.65536000000000000000e5 +3112 3 19 50 0.65536000000000000000e5 +3112 3 36 41 -0.65536000000000000000e5 +3113 1 20 51 -0.65536000000000000000e5 +3113 1 36 51 0.65536000000000000000e5 +3113 3 19 51 0.65536000000000000000e5 +3114 3 19 52 0.65536000000000000000e5 +3114 3 21 50 -0.65536000000000000000e5 +3115 3 19 53 0.65536000000000000000e5 +3115 3 41 46 -0.65536000000000000000e5 +3116 1 11 18 -0.65536000000000000000e5 +3116 1 45 52 0.65536000000000000000e5 +3116 3 6 19 0.65536000000000000000e5 +3116 3 15 44 0.65536000000000000000e5 +3116 3 17 30 0.65536000000000000000e5 +3116 3 19 54 0.65536000000000000000e5 +3116 3 32 45 0.65536000000000000000e5 +3117 1 11 18 -0.32768000000000000000e5 +3117 1 45 52 0.32768000000000000000e5 +3117 3 6 19 0.32768000000000000000e5 +3117 3 15 44 0.32768000000000000000e5 +3117 3 17 30 0.32768000000000000000e5 +3117 3 19 55 0.65536000000000000000e5 +3117 3 32 45 0.32768000000000000000e5 +3117 3 36 49 -0.32768000000000000000e5 +3117 3 41 46 -0.32768000000000000000e5 +3117 4 15 35 -0.32768000000000000000e5 +3118 1 20 21 -0.65536000000000000000e5 +3118 1 21 36 0.65536000000000000000e5 +3118 3 16 21 0.32768000000000000000e5 +3118 3 19 20 0.32768000000000000000e5 +3118 3 20 20 0.65536000000000000000e5 +3118 4 15 15 0.65536000000000000000e5 +3119 1 3 18 0.32768000000000000000e5 +3119 1 4 19 -0.65536000000000000000e5 +3119 1 12 43 -0.32768000000000000000e5 +3119 1 13 44 0.65536000000000000000e5 +3119 3 3 16 0.32768000000000000000e5 +3119 3 4 17 0.32768000000000000000e5 +3119 3 14 27 -0.32768000000000000000e5 +3119 3 20 22 0.65536000000000000000e5 +3119 4 2 14 0.32768000000000000000e5 +3120 3 16 29 -0.65536000000000000000e5 +3120 3 20 23 0.65536000000000000000e5 +3121 1 5 36 -0.65536000000000000000e5 +3121 1 14 45 0.65536000000000000000e5 +3121 3 20 24 0.65536000000000000000e5 +3122 3 17 30 -0.65536000000000000000e5 +3122 3 20 25 0.65536000000000000000e5 +3123 1 5 36 0.65536000000000000000e5 +3123 1 14 45 -0.65536000000000000000e5 +3123 1 15 46 0.13107200000000000000e6 +3123 1 18 33 -0.13107200000000000000e6 +3123 3 17 30 0.65536000000000000000e5 +3123 3 20 26 0.65536000000000000000e5 +3123 4 12 24 0.65536000000000000000e5 +3124 1 3 18 0.16384000000000000000e5 +3124 1 4 19 -0.32768000000000000000e5 +3124 1 5 36 -0.32768000000000000000e5 +3124 1 12 43 -0.16384000000000000000e5 +3124 1 13 44 0.32768000000000000000e5 +3124 1 14 45 0.32768000000000000000e5 +3124 3 3 16 0.16384000000000000000e5 +3124 3 4 17 0.16384000000000000000e5 +3124 3 14 27 -0.16384000000000000000e5 +3124 3 16 29 -0.32768000000000000000e5 +3124 3 20 27 0.65536000000000000000e5 +3124 4 2 14 0.16384000000000000000e5 +3124 4 11 23 -0.32768000000000000000e5 +3125 3 18 31 -0.65536000000000000000e5 +3125 3 20 28 0.65536000000000000000e5 +3126 1 15 46 0.65536000000000000000e5 +3126 1 18 33 -0.65536000000000000000e5 +3126 3 20 29 0.65536000000000000000e5 +3127 3 20 30 0.65536000000000000000e5 +3127 3 21 26 -0.65536000000000000000e5 +3128 3 19 32 -0.65536000000000000000e5 +3128 3 20 31 0.65536000000000000000e5 +3129 1 3 18 -0.81920000000000000000e4 +3129 1 4 19 0.16384000000000000000e5 +3129 1 5 36 0.16384000000000000000e5 +3129 1 12 43 0.81920000000000000000e4 +3129 1 13 44 -0.16384000000000000000e5 +3129 1 14 21 -0.13107200000000000000e6 +3129 1 14 45 -0.16384000000000000000e5 +3129 1 21 44 0.13107200000000000000e6 +3129 2 11 25 0.32768000000000000000e5 +3129 2 15 29 -0.32768000000000000000e5 +3129 3 3 16 -0.81920000000000000000e4 +3129 3 4 17 -0.81920000000000000000e4 +3129 3 7 36 0.32768000000000000000e5 +3129 3 8 21 0.65536000000000000000e5 +3129 3 14 27 0.81920000000000000000e4 +3129 3 15 20 -0.65536000000000000000e5 +3129 3 16 29 0.16384000000000000000e5 +3129 3 18 19 0.13107200000000000000e6 +3129 3 18 31 0.32768000000000000000e5 +3129 3 19 32 0.65536000000000000000e5 +3129 3 20 32 0.65536000000000000000e5 +3129 4 2 14 -0.81920000000000000000e4 +3129 4 11 15 0.65536000000000000000e5 +3129 4 11 23 0.16384000000000000000e5 +3129 4 13 25 0.65536000000000000000e5 +3129 4 14 14 -0.13107200000000000000e6 +3130 1 6 21 0.16384000000000000000e5 +3130 1 17 32 0.16384000000000000000e5 +3130 1 19 50 -0.16384000000000000000e5 +3130 1 20 35 -0.65536000000000000000e5 +3130 1 20 51 -0.16384000000000000000e5 +3130 1 21 52 0.65536000000000000000e5 +3130 2 9 15 0.16384000000000000000e5 +3130 2 25 31 -0.16384000000000000000e5 +3130 3 7 20 -0.16384000000000000000e5 +3130 3 8 21 0.32768000000000000000e5 +3130 3 14 19 -0.32768000000000000000e5 +3130 3 16 45 0.16384000000000000000e5 +3130 3 17 46 0.32768000000000000000e5 +3130 3 18 31 0.16384000000000000000e5 +3130 3 19 32 -0.32768000000000000000e5 +3130 3 20 34 0.65536000000000000000e5 +3130 3 20 45 0.32768000000000000000e5 +3130 4 10 14 -0.16384000000000000000e5 +3130 4 25 25 0.65536000000000000000e5 +3131 3 20 36 0.65536000000000000000e5 +3131 3 21 35 -0.65536000000000000000e5 +3132 1 14 45 -0.65536000000000000000e5 +3132 1 17 48 0.32768000000000000000e5 +3132 1 18 49 0.32768000000000000000e5 +3132 1 34 49 0.32768000000000000000e5 +3132 2 14 28 0.32768000000000000000e5 +3132 3 14 43 0.32768000000000000000e5 +3132 3 18 47 0.32768000000000000000e5 +3132 3 20 37 0.65536000000000000000e5 +3132 3 22 35 -0.32768000000000000000e5 +3132 4 14 26 -0.32768000000000000000e5 +3133 1 14 45 0.65536000000000000000e5 +3133 1 17 48 -0.32768000000000000000e5 +3133 1 18 49 -0.32768000000000000000e5 +3133 1 34 49 -0.32768000000000000000e5 +3133 2 14 28 -0.32768000000000000000e5 +3133 3 14 43 -0.32768000000000000000e5 +3133 3 15 44 0.65536000000000000000e5 +3133 3 16 45 -0.13107200000000000000e6 +3133 3 18 47 -0.32768000000000000000e5 +3133 3 20 38 0.65536000000000000000e5 +3133 3 22 35 0.32768000000000000000e5 +3133 4 14 26 0.32768000000000000000e5 +3133 4 15 27 0.65536000000000000000e5 +3134 3 15 44 -0.65536000000000000000e5 +3134 3 20 39 0.65536000000000000000e5 +3135 3 20 40 0.65536000000000000000e5 +3135 3 30 35 -0.65536000000000000000e5 +3136 3 16 45 -0.65536000000000000000e5 +3136 3 20 41 0.65536000000000000000e5 +3137 1 15 46 -0.65536000000000000000e5 +3137 1 20 51 0.65536000000000000000e5 +3137 3 20 42 0.65536000000000000000e5 +3138 3 15 46 -0.65536000000000000000e5 +3138 3 20 43 0.65536000000000000000e5 +3139 3 17 46 -0.65536000000000000000e5 +3139 3 20 44 0.65536000000000000000e5 +3140 3 20 46 0.65536000000000000000e5 +3140 3 35 36 -0.65536000000000000000e5 +3141 3 19 48 -0.65536000000000000000e5 +3141 3 20 47 0.65536000000000000000e5 +3142 3 20 48 0.65536000000000000000e5 +3142 3 32 45 -0.65536000000000000000e5 +3143 1 20 51 -0.65536000000000000000e5 +3143 1 36 51 0.65536000000000000000e5 +3143 3 20 50 0.65536000000000000000e5 +3144 3 20 51 0.65536000000000000000e5 +3144 3 33 46 -0.65536000000000000000e5 +3145 3 20 52 0.65536000000000000000e5 +3145 3 36 45 -0.65536000000000000000e5 +3146 1 11 18 -0.65536000000000000000e5 +3146 1 45 52 0.65536000000000000000e5 +3146 3 6 19 0.65536000000000000000e5 +3146 3 15 44 0.65536000000000000000e5 +3146 3 17 30 0.65536000000000000000e5 +3146 3 20 53 0.65536000000000000000e5 +3146 3 32 45 0.65536000000000000000e5 +3147 3 20 54 0.65536000000000000000e5 +3147 3 36 49 -0.65536000000000000000e5 +3148 3 20 55 0.65536000000000000000e5 +3148 3 45 46 -0.65536000000000000000e5 +3149 3 20 56 0.65536000000000000000e5 +3149 3 46 51 -0.65536000000000000000e5 +3150 3 7 36 -0.65536000000000000000e5 +3150 3 21 22 0.65536000000000000000e5 +3151 1 3 18 0.16384000000000000000e5 +3151 1 4 19 -0.32768000000000000000e5 +3151 1 5 36 -0.32768000000000000000e5 +3151 1 12 43 -0.16384000000000000000e5 +3151 1 13 44 0.32768000000000000000e5 +3151 1 14 45 0.32768000000000000000e5 +3151 3 3 16 0.16384000000000000000e5 +3151 3 4 17 0.16384000000000000000e5 +3151 3 14 27 -0.16384000000000000000e5 +3151 3 16 29 -0.32768000000000000000e5 +3151 3 21 23 0.65536000000000000000e5 +3151 4 2 14 0.16384000000000000000e5 +3151 4 11 23 -0.32768000000000000000e5 +3152 3 18 31 -0.65536000000000000000e5 +3152 3 21 24 0.65536000000000000000e5 +3153 1 15 46 0.65536000000000000000e5 +3153 1 18 33 -0.65536000000000000000e5 +3153 3 21 25 0.65536000000000000000e5 +3154 1 3 18 0.81920000000000000000e4 +3154 1 4 19 -0.16384000000000000000e5 +3154 1 5 36 -0.16384000000000000000e5 +3154 1 12 43 -0.81920000000000000000e4 +3154 1 13 44 0.16384000000000000000e5 +3154 1 14 45 0.16384000000000000000e5 +3154 2 11 25 -0.32768000000000000000e5 +3154 2 15 29 0.32768000000000000000e5 +3154 3 3 16 0.81920000000000000000e4 +3154 3 4 17 0.81920000000000000000e4 +3154 3 7 36 -0.32768000000000000000e5 +3154 3 14 27 -0.81920000000000000000e4 +3154 3 16 29 -0.16384000000000000000e5 +3154 3 18 31 -0.32768000000000000000e5 +3154 3 21 27 0.65536000000000000000e5 +3154 4 2 14 0.81920000000000000000e4 +3154 4 11 23 -0.16384000000000000000e5 +3155 3 19 32 -0.65536000000000000000e5 +3155 3 21 28 0.65536000000000000000e5 +3156 1 3 18 -0.81920000000000000000e4 +3156 1 4 19 0.16384000000000000000e5 +3156 1 5 36 0.16384000000000000000e5 +3156 1 12 43 0.81920000000000000000e4 +3156 1 13 44 -0.16384000000000000000e5 +3156 1 14 21 -0.13107200000000000000e6 +3156 1 14 45 -0.16384000000000000000e5 +3156 1 21 44 0.13107200000000000000e6 +3156 2 11 25 0.32768000000000000000e5 +3156 2 15 29 -0.32768000000000000000e5 +3156 3 3 16 -0.81920000000000000000e4 +3156 3 4 17 -0.81920000000000000000e4 +3156 3 7 36 0.32768000000000000000e5 +3156 3 8 21 0.65536000000000000000e5 +3156 3 14 27 0.81920000000000000000e4 +3156 3 15 20 -0.65536000000000000000e5 +3156 3 16 29 0.16384000000000000000e5 +3156 3 18 19 0.13107200000000000000e6 +3156 3 18 31 0.32768000000000000000e5 +3156 3 19 32 0.65536000000000000000e5 +3156 3 21 29 0.65536000000000000000e5 +3156 4 2 14 -0.81920000000000000000e4 +3156 4 11 15 0.65536000000000000000e5 +3156 4 11 23 0.16384000000000000000e5 +3156 4 13 25 0.65536000000000000000e5 +3156 4 14 14 -0.13107200000000000000e6 +3157 3 20 33 -0.65536000000000000000e5 +3157 3 21 30 0.65536000000000000000e5 +3158 1 14 21 -0.65536000000000000000e5 +3158 1 21 44 0.65536000000000000000e5 +3158 3 8 21 0.32768000000000000000e5 +3158 3 15 20 -0.32768000000000000000e5 +3158 3 18 19 0.65536000000000000000e5 +3158 3 21 31 0.65536000000000000000e5 +3158 4 11 15 0.32768000000000000000e5 +3158 4 14 14 -0.65536000000000000000e5 +3159 1 6 21 0.16384000000000000000e5 +3159 1 17 32 0.16384000000000000000e5 +3159 1 19 50 -0.16384000000000000000e5 +3159 1 20 35 -0.65536000000000000000e5 +3159 1 20 51 -0.16384000000000000000e5 +3159 1 21 52 0.65536000000000000000e5 +3159 2 9 15 0.16384000000000000000e5 +3159 2 25 31 -0.16384000000000000000e5 +3159 3 7 20 -0.16384000000000000000e5 +3159 3 8 21 0.32768000000000000000e5 +3159 3 14 19 -0.32768000000000000000e5 +3159 3 16 45 0.16384000000000000000e5 +3159 3 17 46 0.32768000000000000000e5 +3159 3 18 31 0.16384000000000000000e5 +3159 3 19 32 -0.32768000000000000000e5 +3159 3 20 45 0.32768000000000000000e5 +3159 3 21 32 0.65536000000000000000e5 +3159 4 10 14 -0.16384000000000000000e5 +3159 4 25 25 0.65536000000000000000e5 +3160 3 20 35 -0.65536000000000000000e5 +3160 3 21 33 0.65536000000000000000e5 +3161 1 3 18 -0.16384000000000000000e5 +3161 1 4 19 0.32768000000000000000e5 +3161 1 5 36 0.32768000000000000000e5 +3161 1 12 43 0.16384000000000000000e5 +3161 1 13 44 -0.32768000000000000000e5 +3161 1 14 45 -0.32768000000000000000e5 +3161 1 17 32 -0.65536000000000000000e5 +3161 1 19 50 0.65536000000000000000e5 +3161 3 3 16 -0.16384000000000000000e5 +3161 3 4 17 -0.16384000000000000000e5 +3161 3 14 27 0.16384000000000000000e5 +3161 3 16 29 0.32768000000000000000e5 +3161 3 21 37 0.65536000000000000000e5 +3161 4 2 14 -0.16384000000000000000e5 +3161 4 11 23 0.32768000000000000000e5 +3162 3 16 45 -0.65536000000000000000e5 +3162 3 21 38 0.65536000000000000000e5 +3163 1 15 46 -0.65536000000000000000e5 +3163 1 20 51 0.65536000000000000000e5 +3163 3 21 39 0.65536000000000000000e5 +3164 3 15 46 -0.65536000000000000000e5 +3164 3 21 40 0.65536000000000000000e5 +3165 1 6 21 -0.32768000000000000000e5 +3165 1 17 32 -0.32768000000000000000e5 +3165 1 19 50 0.32768000000000000000e5 +3165 1 20 51 0.32768000000000000000e5 +3165 2 9 15 -0.32768000000000000000e5 +3165 2 25 31 0.32768000000000000000e5 +3165 3 7 20 0.32768000000000000000e5 +3165 3 8 21 -0.65536000000000000000e5 +3165 3 14 19 0.65536000000000000000e5 +3165 3 16 45 -0.32768000000000000000e5 +3165 3 18 31 -0.32768000000000000000e5 +3165 3 19 32 0.65536000000000000000e5 +3165 3 21 41 0.65536000000000000000e5 +3165 4 10 14 0.32768000000000000000e5 +3166 3 17 46 -0.65536000000000000000e5 +3166 3 21 42 0.65536000000000000000e5 +3167 3 20 45 -0.65536000000000000000e5 +3167 3 21 43 0.65536000000000000000e5 +3168 1 6 21 -0.16384000000000000000e5 +3168 1 17 32 -0.16384000000000000000e5 +3168 1 19 50 0.16384000000000000000e5 +3168 1 20 51 0.16384000000000000000e5 +3168 2 9 15 -0.16384000000000000000e5 +3168 2 25 31 0.16384000000000000000e5 +3168 3 7 20 0.16384000000000000000e5 +3168 3 8 21 -0.32768000000000000000e5 +3168 3 14 19 0.32768000000000000000e5 +3168 3 16 45 -0.16384000000000000000e5 +3168 3 17 46 -0.32768000000000000000e5 +3168 3 18 31 -0.16384000000000000000e5 +3168 3 19 32 0.32768000000000000000e5 +3168 3 20 45 -0.32768000000000000000e5 +3168 3 21 44 0.65536000000000000000e5 +3168 4 10 14 0.16384000000000000000e5 +3168 4 25 25 -0.65536000000000000000e5 +3169 3 21 45 0.65536000000000000000e5 +3169 3 35 36 -0.65536000000000000000e5 +3170 3 21 47 0.65536000000000000000e5 +3170 3 36 41 -0.65536000000000000000e5 +3171 1 20 51 -0.65536000000000000000e5 +3171 1 36 51 0.65536000000000000000e5 +3171 3 21 48 0.65536000000000000000e5 +3172 3 21 49 0.65536000000000000000e5 +3172 3 33 46 -0.65536000000000000000e5 +3173 3 21 51 0.65536000000000000000e5 +3173 3 36 45 -0.65536000000000000000e5 +3174 1 11 18 -0.32768000000000000000e5 +3174 1 45 52 0.32768000000000000000e5 +3174 3 6 19 0.32768000000000000000e5 +3174 3 15 44 0.32768000000000000000e5 +3174 3 17 30 0.32768000000000000000e5 +3174 3 21 53 0.65536000000000000000e5 +3174 3 32 45 0.32768000000000000000e5 +3174 3 36 49 -0.32768000000000000000e5 +3174 3 41 46 -0.32768000000000000000e5 +3174 4 15 35 -0.32768000000000000000e5 +3175 3 21 54 0.65536000000000000000e5 +3175 3 45 46 -0.65536000000000000000e5 +3176 1 1 40 0.32768000000000000000e5 +3176 1 23 38 -0.32768000000000000000e5 +3176 3 1 38 0.32768000000000000000e5 +3176 3 22 22 0.65536000000000000000e5 +3176 3 22 27 -0.65536000000000000000e5 +3176 4 16 16 0.65536000000000000000e5 +3177 3 1 38 -0.65536000000000000000e5 +3177 3 22 23 0.65536000000000000000e5 +3178 1 1 40 -0.65536000000000000000e5 +3178 1 23 38 0.65536000000000000000e5 +3178 3 22 24 0.65536000000000000000e5 +3179 3 2 39 -0.65536000000000000000e5 +3179 3 22 25 0.65536000000000000000e5 +3180 1 6 37 -0.65536000000000000000e5 +3180 1 24 39 0.65536000000000000000e5 +3180 3 22 26 0.65536000000000000000e5 +3181 3 8 37 -0.65536000000000000000e5 +3181 3 22 28 0.65536000000000000000e5 +3182 1 9 40 0.65536000000000000000e5 +3182 1 10 41 -0.13107200000000000000e6 +3182 1 26 41 -0.65536000000000000000e5 +3182 1 32 47 0.13107200000000000000e6 +3182 3 9 38 0.65536000000000000000e5 +3182 3 22 29 0.65536000000000000000e5 +3182 3 28 41 0.13107200000000000000e6 +3182 4 2 30 0.65536000000000000000e5 +3183 3 9 38 -0.65536000000000000000e5 +3183 3 22 30 0.65536000000000000000e5 +3184 1 9 40 0.32768000000000000000e5 +3184 1 10 41 -0.65536000000000000000e5 +3184 1 26 41 -0.32768000000000000000e5 +3184 1 32 47 0.65536000000000000000e5 +3184 3 8 37 -0.32768000000000000000e5 +3184 3 9 38 0.32768000000000000000e5 +3184 3 22 27 -0.32768000000000000000e5 +3184 3 22 31 0.65536000000000000000e5 +3184 3 28 41 0.65536000000000000000e5 +3184 4 1 29 -0.32768000000000000000e5 +3184 4 2 30 0.32768000000000000000e5 +3185 1 11 42 -0.65536000000000000000e5 +3185 1 33 48 0.65536000000000000000e5 +3185 2 12 26 0.65536000000000000000e5 +3185 2 20 34 -0.65536000000000000000e5 +3185 3 13 42 0.13107200000000000000e6 +3185 3 22 32 0.65536000000000000000e5 +3185 3 22 35 -0.13107200000000000000e6 +3185 3 29 42 0.65536000000000000000e5 +3185 4 3 31 -0.65536000000000000000e5 +3185 4 6 34 -0.65536000000000000000e5 +3186 1 10 41 -0.65536000000000000000e5 +3186 1 32 47 0.65536000000000000000e5 +3186 3 22 33 0.65536000000000000000e5 +3186 3 28 41 0.65536000000000000000e5 +3187 3 12 41 -0.65536000000000000000e5 +3187 3 22 34 0.65536000000000000000e5 +3188 1 13 44 -0.65536000000000000000e5 +3188 1 34 41 0.65536000000000000000e5 +3188 3 22 36 0.65536000000000000000e5 +3189 1 6 53 0.65536000000000000000e5 +3189 1 25 40 -0.65536000000000000000e5 +3189 2 1 35 -0.65536000000000000000e5 +3189 2 2 32 0.65536000000000000000e5 +3189 2 4 34 0.13107200000000000000e6 +3189 2 16 30 0.13107200000000000000e6 +3189 2 16 34 -0.13107200000000000000e6 +3189 2 21 35 -0.13107200000000000000e6 +3189 3 2 47 0.65536000000000000000e5 +3189 3 5 50 0.13107200000000000000e6 +3189 3 7 52 -0.52428800000000000000e6 +3189 3 22 37 0.65536000000000000000e5 +3189 3 24 37 0.13107200000000000000e6 +3189 3 27 40 0.13107200000000000000e6 +3189 3 28 41 0.52428800000000000000e6 +3189 4 4 32 -0.65536000000000000000e5 +3189 4 6 34 0.26214400000000000000e6 +3189 4 7 35 -0.13107200000000000000e6 +3189 4 16 28 0.65536000000000000000e5 +3189 4 17 29 -0.13107200000000000000e6 +3190 3 2 47 -0.65536000000000000000e5 +3190 3 22 38 0.65536000000000000000e5 +3191 3 22 39 0.65536000000000000000e5 +3191 3 24 37 -0.65536000000000000000e5 +3192 1 6 53 -0.65536000000000000000e5 +3192 1 25 40 0.65536000000000000000e5 +3192 3 22 40 0.65536000000000000000e5 +3192 3 25 38 0.65536000000000000000e5 +3192 3 27 40 -0.13107200000000000000e6 +3192 4 4 32 0.65536000000000000000e5 +3193 1 6 53 0.32768000000000000000e5 +3193 1 25 40 -0.32768000000000000000e5 +3193 2 4 34 0.65536000000000000000e5 +3193 2 16 30 0.65536000000000000000e5 +3193 2 16 34 -0.65536000000000000000e5 +3193 2 21 35 -0.65536000000000000000e5 +3193 3 5 50 0.65536000000000000000e5 +3193 3 7 52 -0.26214400000000000000e6 +3193 3 22 41 0.65536000000000000000e5 +3193 3 24 37 0.32768000000000000000e5 +3193 3 27 40 0.65536000000000000000e5 +3193 3 28 41 0.26214400000000000000e6 +3193 4 4 32 -0.32768000000000000000e5 +3193 4 6 34 0.13107200000000000000e6 +3193 4 7 35 -0.65536000000000000000e5 +3193 4 16 28 0.32768000000000000000e5 +3193 4 17 29 -0.65536000000000000000e5 +3194 1 6 53 0.32768000000000000000e5 +3194 1 25 40 -0.32768000000000000000e5 +3194 3 22 42 0.65536000000000000000e5 +3194 3 24 37 0.32768000000000000000e5 +3194 3 27 40 0.13107200000000000000e6 +3194 3 28 41 -0.13107200000000000000e6 +3194 4 4 32 -0.32768000000000000000e5 +3194 4 16 28 0.32768000000000000000e5 +3194 4 17 29 0.65536000000000000000e5 +3195 1 6 53 -0.32768000000000000000e5 +3195 1 25 40 0.32768000000000000000e5 +3195 3 22 43 0.65536000000000000000e5 +3195 3 24 37 -0.32768000000000000000e5 +3195 3 27 40 -0.65536000000000000000e5 +3195 4 4 32 0.32768000000000000000e5 +3195 4 16 28 -0.32768000000000000000e5 +3196 1 6 53 0.16384000000000000000e5 +3196 1 25 40 -0.16384000000000000000e5 +3196 2 4 34 0.32768000000000000000e5 +3196 2 21 35 -0.32768000000000000000e5 +3196 3 5 50 0.32768000000000000000e5 +3196 3 7 52 -0.13107200000000000000e6 +3196 3 22 44 0.65536000000000000000e5 +3196 3 24 37 0.16384000000000000000e5 +3196 3 27 40 0.65536000000000000000e5 +3196 3 28 41 0.65536000000000000000e5 +3196 4 4 32 -0.16384000000000000000e5 +3196 4 6 34 0.65536000000000000000e5 +3196 4 7 35 -0.32768000000000000000e5 +3196 4 16 28 0.16384000000000000000e5 +3197 3 22 45 0.65536000000000000000e5 +3197 3 28 41 -0.65536000000000000000e5 +3198 3 7 52 -0.65536000000000000000e5 +3198 3 22 46 0.65536000000000000000e5 +3199 1 22 53 0.65536000000000000000e5 +3199 1 23 38 -0.65536000000000000000e5 +3199 3 2 47 0.65536000000000000000e5 +3199 3 22 47 0.65536000000000000000e5 +3200 1 2 49 -0.65536000000000000000e5 +3200 1 6 53 0.65536000000000000000e5 +3200 1 8 39 0.13107200000000000000e6 +3200 1 9 40 0.13107200000000000000e6 +3200 1 10 41 -0.26214400000000000000e6 +3200 1 22 53 -0.65536000000000000000e5 +3200 1 23 54 -0.65536000000000000000e5 +3200 1 24 55 -0.13107200000000000000e6 +3200 1 25 40 -0.65536000000000000000e5 +3200 1 37 52 0.26214400000000000000e6 +3200 2 26 32 -0.65536000000000000000e5 +3200 3 9 38 0.13107200000000000000e6 +3200 3 22 48 0.65536000000000000000e5 +3200 3 22 51 0.13107200000000000000e6 +3200 3 24 37 0.13107200000000000000e6 +3200 3 27 40 0.13107200000000000000e6 +3200 4 2 30 0.13107200000000000000e6 +3200 4 4 32 -0.65536000000000000000e5 +3200 4 16 28 0.65536000000000000000e5 +3200 4 17 29 0.13107200000000000000e6 +3200 4 20 32 0.13107200000000000000e6 +3201 1 6 53 0.65536000000000000000e5 +3201 1 23 54 0.65536000000000000000e5 +3201 1 24 39 -0.65536000000000000000e5 +3201 1 25 40 -0.65536000000000000000e5 +3201 3 22 49 0.65536000000000000000e5 +3201 3 25 38 -0.65536000000000000000e5 +3201 3 27 40 0.13107200000000000000e6 +3201 4 4 32 -0.65536000000000000000e5 +3202 1 24 55 -0.65536000000000000000e5 +3202 1 26 41 0.65536000000000000000e5 +3202 1 32 47 -0.13107200000000000000e6 +3202 1 37 52 0.13107200000000000000e6 +3202 3 22 50 0.65536000000000000000e5 +3202 3 22 51 0.65536000000000000000e5 +3202 3 27 40 -0.65536000000000000000e5 +3202 4 20 32 0.65536000000000000000e5 +3203 1 32 47 -0.65536000000000000000e5 +3203 1 37 52 0.65536000000000000000e5 +3203 3 22 52 0.65536000000000000000e5 +3204 1 1 48 -0.65536000000000000000e5 +3204 1 2 49 -0.65536000000000000000e5 +3204 1 6 53 -0.13107200000000000000e6 +3204 1 8 39 -0.26214400000000000000e6 +3204 1 9 40 -0.26214400000000000000e6 +3204 1 10 41 0.52428800000000000000e6 +3204 1 12 43 0.52428800000000000000e6 +3204 1 22 53 0.65536000000000000000e5 +3204 1 23 38 -0.65536000000000000000e5 +3204 1 23 54 0.65536000000000000000e5 +3204 1 24 55 0.13107200000000000000e6 +3204 1 25 40 0.13107200000000000000e6 +3204 1 26 41 0.13107200000000000000e6 +3204 1 28 43 -0.26214400000000000000e6 +3204 1 32 47 -0.52428800000000000000e6 +3204 1 37 52 -0.26214400000000000000e6 +3204 1 38 53 -0.65536000000000000000e5 +3204 1 40 47 -0.65536000000000000000e5 +3204 2 2 32 -0.65536000000000000000e5 +3204 2 16 30 -0.13107200000000000000e6 +3204 2 20 34 -0.26214400000000000000e6 +3204 2 26 32 0.65536000000000000000e5 +3204 2 32 32 -0.13107200000000000000e6 +3204 3 9 38 -0.26214400000000000000e6 +3204 3 22 35 -0.52428800000000000000e6 +3204 3 22 51 -0.26214400000000000000e6 +3204 3 22 53 0.65536000000000000000e5 +3204 3 24 37 -0.13107200000000000000e6 +3204 3 24 53 0.65536000000000000000e5 +3204 3 27 40 -0.26214400000000000000e6 +3204 3 28 41 -0.52428800000000000000e6 +3204 3 37 50 -0.13107200000000000000e6 +3204 4 2 30 -0.26214400000000000000e6 +3204 4 4 32 0.13107200000000000000e6 +3204 4 6 34 -0.26214400000000000000e6 +3204 4 16 28 -0.13107200000000000000e6 +3204 4 17 29 -0.13107200000000000000e6 +3204 4 20 32 -0.13107200000000000000e6 +3205 1 23 54 -0.65536000000000000000e5 +3205 1 38 53 0.65536000000000000000e5 +3205 3 22 54 0.65536000000000000000e5 +3206 3 22 55 0.65536000000000000000e5 +3206 3 37 50 -0.65536000000000000000e5 +3207 1 1 48 0.65536000000000000000e5 +3207 1 2 49 0.13107200000000000000e6 +3207 1 6 53 -0.65536000000000000000e5 +3207 1 8 39 0.13107200000000000000e6 +3207 1 9 40 0.13107200000000000000e6 +3207 1 10 41 -0.26214400000000000000e6 +3207 1 12 43 -0.52428800000000000000e6 +3207 1 23 38 0.65536000000000000000e5 +3207 1 24 39 0.65536000000000000000e5 +3207 1 24 55 0.13107200000000000000e6 +3207 1 25 56 0.65536000000000000000e5 +3207 1 26 41 -0.26214400000000000000e6 +3207 1 28 43 0.26214400000000000000e6 +3207 1 32 47 0.52428800000000000000e6 +3207 1 40 47 0.65536000000000000000e5 +3207 2 2 32 0.65536000000000000000e5 +3207 2 3 33 0.65536000000000000000e5 +3207 2 5 35 -0.65536000000000000000e5 +3207 2 16 30 0.13107200000000000000e6 +3207 2 20 34 0.26214400000000000000e6 +3207 2 33 35 0.65536000000000000000e5 +3207 3 9 38 0.13107200000000000000e6 +3207 3 22 35 0.52428800000000000000e6 +3207 3 22 51 -0.13107200000000000000e6 +3207 3 22 56 0.65536000000000000000e5 +3207 3 23 52 0.26214400000000000000e6 +3207 3 24 53 -0.65536000000000000000e5 +3207 3 25 38 0.65536000000000000000e5 +3207 3 25 54 -0.65536000000000000000e5 +3207 3 27 40 0.13107200000000000000e6 +3207 3 27 56 -0.13107200000000000000e6 +3207 3 28 41 0.52428800000000000000e6 +3207 3 38 51 0.13107200000000000000e6 +3207 3 39 40 -0.65536000000000000000e5 +3207 3 40 53 -0.65536000000000000000e5 +3207 3 41 54 0.13107200000000000000e6 +3207 4 2 30 0.13107200000000000000e6 +3207 4 6 34 0.26214400000000000000e6 +3207 4 7 35 -0.13107200000000000000e6 +3207 4 32 32 0.13107200000000000000e6 +3208 1 1 40 -0.32768000000000000000e5 +3208 1 23 38 0.32768000000000000000e5 +3208 3 23 23 0.65536000000000000000e5 +3209 3 2 39 -0.65536000000000000000e5 +3209 3 23 24 0.65536000000000000000e5 +3210 1 6 37 -0.65536000000000000000e5 +3210 1 24 39 0.65536000000000000000e5 +3210 3 23 25 0.65536000000000000000e5 +3211 3 3 40 -0.65536000000000000000e5 +3211 3 23 26 0.65536000000000000000e5 +3212 3 8 37 -0.65536000000000000000e5 +3212 3 23 27 0.65536000000000000000e5 +3213 1 9 40 0.65536000000000000000e5 +3213 1 10 41 -0.13107200000000000000e6 +3213 1 26 41 -0.65536000000000000000e5 +3213 1 32 47 0.13107200000000000000e6 +3213 3 9 38 0.65536000000000000000e5 +3213 3 23 28 0.65536000000000000000e5 +3213 3 28 41 0.13107200000000000000e6 +3213 4 2 30 0.65536000000000000000e5 +3214 3 9 38 -0.65536000000000000000e5 +3214 3 23 29 0.65536000000000000000e5 +3215 1 9 40 -0.65536000000000000000e5 +3215 1 26 41 0.65536000000000000000e5 +3215 3 23 30 0.65536000000000000000e5 +3216 1 11 42 -0.65536000000000000000e5 +3216 1 33 48 0.65536000000000000000e5 +3216 2 12 26 0.65536000000000000000e5 +3216 2 20 34 -0.65536000000000000000e5 +3216 3 13 42 0.13107200000000000000e6 +3216 3 22 35 -0.13107200000000000000e6 +3216 3 23 31 0.65536000000000000000e5 +3216 3 29 42 0.65536000000000000000e5 +3216 4 3 31 -0.65536000000000000000e5 +3216 4 6 34 -0.65536000000000000000e5 +3217 1 10 41 -0.65536000000000000000e5 +3217 1 32 47 0.65536000000000000000e5 +3217 3 23 32 0.65536000000000000000e5 +3217 3 28 41 0.65536000000000000000e5 +3218 1 10 41 0.65536000000000000000e5 +3218 1 11 42 0.65536000000000000000e5 +3218 1 32 47 -0.65536000000000000000e5 +3218 1 33 48 -0.65536000000000000000e5 +3218 3 13 42 -0.13107200000000000000e6 +3218 3 23 33 0.65536000000000000000e5 +3218 3 28 41 -0.65536000000000000000e5 +3218 3 29 42 -0.65536000000000000000e5 +3218 4 3 31 0.65536000000000000000e5 +3219 3 22 35 -0.65536000000000000000e5 +3219 3 23 34 0.65536000000000000000e5 +3220 3 13 42 -0.65536000000000000000e5 +3220 3 23 35 0.65536000000000000000e5 +3221 1 14 45 -0.65536000000000000000e5 +3221 1 17 48 0.32768000000000000000e5 +3221 1 18 49 0.32768000000000000000e5 +3221 1 34 49 0.32768000000000000000e5 +3221 2 14 28 0.32768000000000000000e5 +3221 3 14 43 0.32768000000000000000e5 +3221 3 18 47 0.32768000000000000000e5 +3221 3 22 35 -0.32768000000000000000e5 +3221 3 23 36 0.65536000000000000000e5 +3221 4 14 26 -0.32768000000000000000e5 +3222 3 2 47 -0.65536000000000000000e5 +3222 3 23 37 0.65536000000000000000e5 +3223 3 23 38 0.65536000000000000000e5 +3223 3 24 37 -0.65536000000000000000e5 +3224 1 6 53 -0.65536000000000000000e5 +3224 1 25 40 0.65536000000000000000e5 +3224 3 23 39 0.65536000000000000000e5 +3224 3 25 38 0.65536000000000000000e5 +3224 3 27 40 -0.13107200000000000000e6 +3224 4 4 32 0.65536000000000000000e5 +3225 3 23 40 0.65536000000000000000e5 +3225 3 25 38 -0.65536000000000000000e5 +3226 1 6 53 0.32768000000000000000e5 +3226 1 25 40 -0.32768000000000000000e5 +3226 3 23 41 0.65536000000000000000e5 +3226 3 24 37 0.32768000000000000000e5 +3226 3 27 40 0.13107200000000000000e6 +3226 3 28 41 -0.13107200000000000000e6 +3226 4 4 32 -0.32768000000000000000e5 +3226 4 16 28 0.32768000000000000000e5 +3226 4 17 29 0.65536000000000000000e5 +3227 1 6 53 -0.32768000000000000000e5 +3227 1 25 40 0.32768000000000000000e5 +3227 3 23 42 0.65536000000000000000e5 +3227 3 24 37 -0.32768000000000000000e5 +3227 3 27 40 -0.65536000000000000000e5 +3227 4 4 32 0.32768000000000000000e5 +3227 4 16 28 -0.32768000000000000000e5 +3228 3 23 43 0.65536000000000000000e5 +3228 3 27 40 -0.65536000000000000000e5 +3229 3 23 44 0.65536000000000000000e5 +3229 3 28 41 -0.65536000000000000000e5 +3230 1 6 53 -0.16384000000000000000e5 +3230 1 25 40 0.16384000000000000000e5 +3230 2 4 34 -0.32768000000000000000e5 +3230 2 21 35 0.32768000000000000000e5 +3230 3 5 50 -0.32768000000000000000e5 +3230 3 23 45 0.65536000000000000000e5 +3230 3 24 37 -0.16384000000000000000e5 +3230 3 27 40 -0.65536000000000000000e5 +3230 4 4 32 0.16384000000000000000e5 +3230 4 7 35 0.32768000000000000000e5 +3230 4 16 28 -0.16384000000000000000e5 +3231 1 6 53 -0.81920000000000000000e4 +3231 1 25 40 0.81920000000000000000e4 +3231 2 4 34 -0.16384000000000000000e5 +3231 2 21 35 0.16384000000000000000e5 +3231 3 5 50 -0.16384000000000000000e5 +3231 3 23 46 0.65536000000000000000e5 +3231 3 24 37 -0.81920000000000000000e4 +3231 3 27 40 -0.32768000000000000000e5 +3231 3 28 41 -0.32768000000000000000e5 +3231 3 29 42 -0.32768000000000000000e5 +3231 4 4 32 0.81920000000000000000e4 +3231 4 7 35 0.16384000000000000000e5 +3231 4 16 28 -0.81920000000000000000e4 +3231 4 23 27 -0.32768000000000000000e5 +3232 1 2 49 -0.65536000000000000000e5 +3232 1 6 53 0.65536000000000000000e5 +3232 1 8 39 0.13107200000000000000e6 +3232 1 9 40 0.13107200000000000000e6 +3232 1 10 41 -0.26214400000000000000e6 +3232 1 22 53 -0.65536000000000000000e5 +3232 1 23 54 -0.65536000000000000000e5 +3232 1 24 55 -0.13107200000000000000e6 +3232 1 25 40 -0.65536000000000000000e5 +3232 1 37 52 0.26214400000000000000e6 +3232 2 26 32 -0.65536000000000000000e5 +3232 3 9 38 0.13107200000000000000e6 +3232 3 22 51 0.13107200000000000000e6 +3232 3 23 47 0.65536000000000000000e5 +3232 3 24 37 0.13107200000000000000e6 +3232 3 27 40 0.13107200000000000000e6 +3232 4 2 30 0.13107200000000000000e6 +3232 4 4 32 -0.65536000000000000000e5 +3232 4 16 28 0.65536000000000000000e5 +3232 4 17 29 0.13107200000000000000e6 +3232 4 20 32 0.13107200000000000000e6 +3233 1 6 53 0.65536000000000000000e5 +3233 1 23 54 0.65536000000000000000e5 +3233 1 24 39 -0.65536000000000000000e5 +3233 1 25 40 -0.65536000000000000000e5 +3233 3 23 48 0.65536000000000000000e5 +3233 3 25 38 -0.65536000000000000000e5 +3233 3 27 40 0.13107200000000000000e6 +3233 4 4 32 -0.65536000000000000000e5 +3234 1 1 48 0.65536000000000000000e5 +3234 1 2 49 0.13107200000000000000e6 +3234 1 8 39 0.13107200000000000000e6 +3234 1 9 40 0.13107200000000000000e6 +3234 1 10 41 -0.26214400000000000000e6 +3234 1 12 43 -0.52428800000000000000e6 +3234 1 23 38 0.65536000000000000000e5 +3234 1 24 39 0.65536000000000000000e5 +3234 1 26 41 -0.13107200000000000000e6 +3234 1 28 43 0.26214400000000000000e6 +3234 1 32 47 0.52428800000000000000e6 +3234 1 40 47 0.65536000000000000000e5 +3234 2 2 32 0.65536000000000000000e5 +3234 2 3 33 0.65536000000000000000e5 +3234 2 16 30 0.13107200000000000000e6 +3234 2 20 34 0.26214400000000000000e6 +3234 3 9 38 0.13107200000000000000e6 +3234 3 22 35 0.52428800000000000000e6 +3234 3 23 49 0.65536000000000000000e5 +3234 3 25 38 0.65536000000000000000e5 +3234 3 28 41 0.52428800000000000000e6 +3234 4 2 30 0.13107200000000000000e6 +3234 4 6 34 0.26214400000000000000e6 +3235 3 22 51 -0.65536000000000000000e5 +3235 3 23 50 0.65536000000000000000e5 +3236 1 24 55 0.65536000000000000000e5 +3236 1 26 41 -0.65536000000000000000e5 +3236 3 23 51 0.65536000000000000000e5 +3236 3 27 40 0.65536000000000000000e5 +3237 1 23 54 -0.65536000000000000000e5 +3237 1 38 53 0.65536000000000000000e5 +3237 3 23 53 0.65536000000000000000e5 +3238 3 23 54 0.65536000000000000000e5 +3238 3 24 53 -0.65536000000000000000e5 +3239 1 24 55 -0.65536000000000000000e5 +3239 1 41 56 0.65536000000000000000e5 +3239 3 23 55 0.65536000000000000000e5 +3239 3 27 56 0.65536000000000000000e5 +3240 1 40 47 -0.65536000000000000000e5 +3240 1 47 54 0.65536000000000000000e5 +3240 3 23 56 0.65536000000000000000e5 +3240 3 24 53 0.65536000000000000000e5 +3241 1 6 37 -0.32768000000000000000e5 +3241 1 24 39 0.32768000000000000000e5 +3241 3 24 24 0.65536000000000000000e5 +3242 3 3 40 -0.65536000000000000000e5 +3242 3 24 25 0.65536000000000000000e5 +3243 1 1 48 -0.65536000000000000000e5 +3243 1 2 49 -0.13107200000000000000e6 +3243 1 6 37 0.65536000000000000000e5 +3243 1 8 39 -0.13107200000000000000e6 +3243 1 9 40 -0.26214400000000000000e6 +3243 1 10 41 0.26214400000000000000e6 +3243 1 12 43 0.52428800000000000000e6 +3243 1 23 38 -0.65536000000000000000e5 +3243 1 24 39 -0.65536000000000000000e5 +3243 1 25 40 0.65536000000000000000e5 +3243 1 26 41 0.13107200000000000000e6 +3243 1 28 43 -0.26214400000000000000e6 +3243 1 32 47 -0.52428800000000000000e6 +3243 2 2 32 -0.65536000000000000000e5 +3243 2 3 33 -0.65536000000000000000e5 +3243 2 5 27 0.65536000000000000000e5 +3243 2 16 30 -0.13107200000000000000e6 +3243 2 20 34 -0.26214400000000000000e6 +3243 3 3 40 0.65536000000000000000e5 +3243 3 9 38 -0.13107200000000000000e6 +3243 3 22 35 -0.52428800000000000000e6 +3243 3 24 26 0.65536000000000000000e5 +3243 3 28 41 -0.52428800000000000000e6 +3243 4 2 30 -0.13107200000000000000e6 +3243 4 6 34 -0.26214400000000000000e6 +3244 1 9 40 0.65536000000000000000e5 +3244 1 10 41 -0.13107200000000000000e6 +3244 1 26 41 -0.65536000000000000000e5 +3244 1 32 47 0.13107200000000000000e6 +3244 3 9 38 0.65536000000000000000e5 +3244 3 24 27 0.65536000000000000000e5 +3244 3 28 41 0.13107200000000000000e6 +3244 4 2 30 0.65536000000000000000e5 +3245 3 9 38 -0.65536000000000000000e5 +3245 3 24 28 0.65536000000000000000e5 +3246 1 9 40 -0.65536000000000000000e5 +3246 1 26 41 0.65536000000000000000e5 +3246 3 24 29 0.65536000000000000000e5 +3247 3 10 39 -0.65536000000000000000e5 +3247 3 24 30 0.65536000000000000000e5 +3248 1 10 41 -0.65536000000000000000e5 +3248 1 32 47 0.65536000000000000000e5 +3248 3 24 31 0.65536000000000000000e5 +3248 3 28 41 0.65536000000000000000e5 +3249 1 10 41 0.65536000000000000000e5 +3249 1 11 42 0.65536000000000000000e5 +3249 1 32 47 -0.65536000000000000000e5 +3249 1 33 48 -0.65536000000000000000e5 +3249 3 13 42 -0.13107200000000000000e6 +3249 3 24 32 0.65536000000000000000e5 +3249 3 28 41 -0.65536000000000000000e5 +3249 3 29 42 -0.65536000000000000000e5 +3249 4 3 31 0.65536000000000000000e5 +3250 1 11 42 -0.65536000000000000000e5 +3250 1 33 48 0.65536000000000000000e5 +3250 3 24 33 0.65536000000000000000e5 +3250 3 29 42 0.65536000000000000000e5 +3251 3 13 42 -0.65536000000000000000e5 +3251 3 24 34 0.65536000000000000000e5 +3252 1 14 45 -0.13107200000000000000e6 +3252 1 17 48 0.65536000000000000000e5 +3252 1 18 49 0.65536000000000000000e5 +3252 1 34 49 0.65536000000000000000e5 +3252 2 14 28 0.65536000000000000000e5 +3252 3 13 42 0.65536000000000000000e5 +3252 3 14 43 0.65536000000000000000e5 +3252 3 18 47 0.65536000000000000000e5 +3252 3 24 35 0.65536000000000000000e5 +3253 1 14 45 0.65536000000000000000e5 +3253 1 17 48 -0.32768000000000000000e5 +3253 1 18 49 -0.32768000000000000000e5 +3253 1 34 49 -0.32768000000000000000e5 +3253 2 14 28 -0.32768000000000000000e5 +3253 3 14 43 -0.32768000000000000000e5 +3253 3 15 44 0.65536000000000000000e5 +3253 3 16 45 -0.13107200000000000000e6 +3253 3 18 47 -0.32768000000000000000e5 +3253 3 22 35 0.32768000000000000000e5 +3253 3 24 36 0.65536000000000000000e5 +3253 4 14 26 0.32768000000000000000e5 +3253 4 15 27 0.65536000000000000000e5 +3254 1 6 53 -0.65536000000000000000e5 +3254 1 25 40 0.65536000000000000000e5 +3254 3 24 38 0.65536000000000000000e5 +3254 3 25 38 0.65536000000000000000e5 +3254 3 27 40 -0.13107200000000000000e6 +3254 4 4 32 0.65536000000000000000e5 +3255 3 24 39 0.65536000000000000000e5 +3255 3 25 38 -0.65536000000000000000e5 +3256 1 6 53 0.65536000000000000000e5 +3256 1 25 40 -0.65536000000000000000e5 +3256 3 24 40 0.65536000000000000000e5 +3257 1 6 53 -0.32768000000000000000e5 +3257 1 25 40 0.32768000000000000000e5 +3257 3 24 37 -0.32768000000000000000e5 +3257 3 24 41 0.65536000000000000000e5 +3257 3 27 40 -0.65536000000000000000e5 +3257 4 4 32 0.32768000000000000000e5 +3257 4 16 28 -0.32768000000000000000e5 +3258 3 24 42 0.65536000000000000000e5 +3258 3 27 40 -0.65536000000000000000e5 +3259 3 5 50 -0.65536000000000000000e5 +3259 3 24 43 0.65536000000000000000e5 +3260 1 6 53 -0.16384000000000000000e5 +3260 1 25 40 0.16384000000000000000e5 +3260 2 4 34 -0.32768000000000000000e5 +3260 2 21 35 0.32768000000000000000e5 +3260 3 5 50 -0.32768000000000000000e5 +3260 3 24 37 -0.16384000000000000000e5 +3260 3 24 44 0.65536000000000000000e5 +3260 3 27 40 -0.65536000000000000000e5 +3260 4 4 32 0.16384000000000000000e5 +3260 4 7 35 0.32768000000000000000e5 +3260 4 16 28 -0.16384000000000000000e5 +3261 3 24 45 0.65536000000000000000e5 +3261 3 29 42 -0.65536000000000000000e5 +3262 3 18 47 -0.65536000000000000000e5 +3262 3 24 46 0.65536000000000000000e5 +3263 1 6 53 0.65536000000000000000e5 +3263 1 23 54 0.65536000000000000000e5 +3263 1 24 39 -0.65536000000000000000e5 +3263 1 25 40 -0.65536000000000000000e5 +3263 3 24 47 0.65536000000000000000e5 +3263 3 25 38 -0.65536000000000000000e5 +3263 3 27 40 0.13107200000000000000e6 +3263 4 4 32 -0.65536000000000000000e5 +3264 1 1 48 0.65536000000000000000e5 +3264 1 2 49 0.13107200000000000000e6 +3264 1 8 39 0.13107200000000000000e6 +3264 1 9 40 0.13107200000000000000e6 +3264 1 10 41 -0.26214400000000000000e6 +3264 1 12 43 -0.52428800000000000000e6 +3264 1 23 38 0.65536000000000000000e5 +3264 1 24 39 0.65536000000000000000e5 +3264 1 26 41 -0.13107200000000000000e6 +3264 1 28 43 0.26214400000000000000e6 +3264 1 32 47 0.52428800000000000000e6 +3264 1 40 47 0.65536000000000000000e5 +3264 2 2 32 0.65536000000000000000e5 +3264 2 3 33 0.65536000000000000000e5 +3264 2 16 30 0.13107200000000000000e6 +3264 2 20 34 0.26214400000000000000e6 +3264 3 9 38 0.13107200000000000000e6 +3264 3 22 35 0.52428800000000000000e6 +3264 3 24 48 0.65536000000000000000e5 +3264 3 25 38 0.65536000000000000000e5 +3264 3 28 41 0.52428800000000000000e6 +3264 4 2 30 0.13107200000000000000e6 +3264 4 6 34 0.26214400000000000000e6 +3265 1 6 53 -0.65536000000000000000e5 +3265 1 25 56 0.65536000000000000000e5 +3265 3 24 49 0.65536000000000000000e5 +3265 3 24 53 -0.65536000000000000000e5 +3265 3 25 54 -0.65536000000000000000e5 +3265 3 38 51 0.13107200000000000000e6 +3265 4 28 32 -0.65536000000000000000e5 +3266 1 24 55 0.65536000000000000000e5 +3266 1 26 41 -0.65536000000000000000e5 +3266 3 24 50 0.65536000000000000000e5 +3266 3 27 40 0.65536000000000000000e5 +3267 1 24 55 -0.65536000000000000000e5 +3267 1 26 41 0.65536000000000000000e5 +3267 3 22 51 0.65536000000000000000e5 +3267 3 23 52 -0.13107200000000000000e6 +3267 3 24 51 0.65536000000000000000e5 +3267 3 27 40 -0.65536000000000000000e5 +3267 4 7 35 0.65536000000000000000e5 +3268 3 10 55 0.65536000000000000000e5 +3268 3 24 52 0.65536000000000000000e5 +3268 3 35 48 -0.13107200000000000000e6 +3268 3 40 45 0.65536000000000000000e5 +3268 4 22 34 0.65536000000000000000e5 +3269 3 24 53 0.65536000000000000000e5 +3269 3 24 54 0.65536000000000000000e5 +3269 3 25 54 0.65536000000000000000e5 +3269 3 38 51 -0.13107200000000000000e6 +3269 4 28 32 0.65536000000000000000e5 +3270 3 24 55 0.65536000000000000000e5 +3270 3 38 51 -0.65536000000000000000e5 +3271 1 1 48 -0.65536000000000000000e5 +3271 1 2 49 -0.13107200000000000000e6 +3271 1 6 53 0.65536000000000000000e5 +3271 1 8 39 -0.13107200000000000000e6 +3271 1 9 40 -0.13107200000000000000e6 +3271 1 10 41 0.26214400000000000000e6 +3271 1 12 43 0.52428800000000000000e6 +3271 1 23 38 -0.65536000000000000000e5 +3271 1 24 39 -0.65536000000000000000e5 +3271 1 24 55 -0.13107200000000000000e6 +3271 1 25 56 -0.65536000000000000000e5 +3271 1 26 41 0.26214400000000000000e6 +3271 1 28 43 -0.26214400000000000000e6 +3271 1 32 47 -0.52428800000000000000e6 +3271 1 47 54 -0.65536000000000000000e5 +3271 2 2 32 -0.65536000000000000000e5 +3271 2 3 33 -0.65536000000000000000e5 +3271 2 5 35 0.65536000000000000000e5 +3271 2 16 30 -0.13107200000000000000e6 +3271 2 20 34 -0.26214400000000000000e6 +3271 2 33 35 -0.65536000000000000000e5 +3271 3 9 38 -0.13107200000000000000e6 +3271 3 22 35 -0.52428800000000000000e6 +3271 3 22 51 0.13107200000000000000e6 +3271 3 23 52 -0.26214400000000000000e6 +3271 3 24 56 0.65536000000000000000e5 +3271 3 25 38 -0.65536000000000000000e5 +3271 3 25 54 0.65536000000000000000e5 +3271 3 27 40 -0.13107200000000000000e6 +3271 3 28 41 -0.52428800000000000000e6 +3271 3 38 51 -0.13107200000000000000e6 +3271 3 39 40 0.65536000000000000000e5 +3271 3 40 53 0.65536000000000000000e5 +3271 3 41 54 -0.13107200000000000000e6 +3271 4 2 30 -0.13107200000000000000e6 +3271 4 6 34 -0.26214400000000000000e6 +3271 4 7 35 0.13107200000000000000e6 +3272 1 1 48 -0.32768000000000000000e5 +3272 1 2 49 -0.65536000000000000000e5 +3272 1 6 37 0.32768000000000000000e5 +3272 1 8 39 -0.65536000000000000000e5 +3272 1 9 40 -0.13107200000000000000e6 +3272 1 10 41 0.13107200000000000000e6 +3272 1 12 43 0.26214400000000000000e6 +3272 1 23 38 -0.32768000000000000000e5 +3272 1 24 39 -0.32768000000000000000e5 +3272 1 25 40 0.32768000000000000000e5 +3272 1 26 41 0.65536000000000000000e5 +3272 1 28 43 -0.13107200000000000000e6 +3272 1 32 47 -0.26214400000000000000e6 +3272 2 2 32 -0.32768000000000000000e5 +3272 2 3 33 -0.32768000000000000000e5 +3272 2 5 27 0.32768000000000000000e5 +3272 2 16 30 -0.65536000000000000000e5 +3272 2 20 34 -0.13107200000000000000e6 +3272 3 3 40 0.32768000000000000000e5 +3272 3 9 38 -0.65536000000000000000e5 +3272 3 22 35 -0.26214400000000000000e6 +3272 3 25 25 0.65536000000000000000e5 +3272 3 28 41 -0.26214400000000000000e6 +3272 4 2 30 -0.65536000000000000000e5 +3272 4 6 34 -0.13107200000000000000e6 +3273 1 1 40 -0.65536000000000000000e5 +3273 1 1 48 0.65536000000000000000e5 +3273 1 2 33 0.52428800000000000000e6 +3273 1 2 49 0.13107200000000000000e6 +3273 1 6 37 -0.65536000000000000000e5 +3273 1 6 53 -0.65536000000000000000e5 +3273 1 8 39 0.13107200000000000000e6 +3273 1 10 25 0.26214400000000000000e6 +3273 1 10 41 -0.26214400000000000000e6 +3273 1 11 42 -0.52428800000000000000e6 +3273 1 12 43 -0.15728640000000000000e7 +3273 1 23 38 0.13107200000000000000e6 +3273 1 24 39 0.65536000000000000000e5 +3273 1 26 41 -0.13107200000000000000e6 +3273 1 28 43 0.78643200000000000000e6 +3273 1 32 47 0.10485760000000000000e7 +3273 1 33 48 0.52428800000000000000e6 +3273 2 2 32 0.13107200000000000000e6 +3273 2 3 17 -0.65536000000000000000e5 +3273 2 3 33 0.65536000000000000000e5 +3273 2 5 19 0.65536000000000000000e5 +3273 2 5 27 -0.65536000000000000000e5 +3273 2 5 35 -0.65536000000000000000e5 +3273 2 12 26 0.52428800000000000000e6 +3273 2 16 30 0.13107200000000000000e6 +3273 2 20 34 0.26214400000000000000e6 +3273 3 1 30 -0.26214400000000000000e6 +3273 3 1 38 -0.65536000000000000000e5 +3273 3 2 23 -0.65536000000000000000e5 +3273 3 2 39 -0.65536000000000000000e5 +3273 3 3 32 0.26214400000000000000e6 +3273 3 5 26 0.65536000000000000000e5 +3273 3 5 50 -0.13107200000000000000e6 +3273 3 8 37 0.13107200000000000000e6 +3273 3 9 38 0.13107200000000000000e6 +3273 3 10 39 -0.13107200000000000000e6 +3273 3 13 42 0.10485760000000000000e7 +3273 3 14 27 -0.52428800000000000000e6 +3273 3 22 35 0.52428800000000000000e6 +3273 3 25 26 0.65536000000000000000e5 +3273 3 25 38 0.65536000000000000000e5 +3273 3 26 39 0.65536000000000000000e5 +3273 3 28 41 0.10485760000000000000e7 +3273 3 29 42 0.52428800000000000000e6 +3273 4 2 30 0.13107200000000000000e6 +3273 4 3 31 -0.52428800000000000000e6 +3273 4 4 16 0.65536000000000000000e5 +3273 4 5 17 -0.65536000000000000000e5 +3273 4 6 18 -0.13107200000000000000e6 +3273 4 6 34 0.26214400000000000000e6 +3273 4 7 19 0.13107200000000000000e6 +3273 4 8 20 0.26214400000000000000e6 +3274 3 9 38 -0.65536000000000000000e5 +3274 3 25 27 0.65536000000000000000e5 +3275 1 9 40 -0.65536000000000000000e5 +3275 1 26 41 0.65536000000000000000e5 +3275 3 25 28 0.65536000000000000000e5 +3276 3 10 39 -0.65536000000000000000e5 +3276 3 25 29 0.65536000000000000000e5 +3277 1 9 40 0.65536000000000000000e5 +3277 1 11 42 -0.13107200000000000000e6 +3277 1 26 41 -0.65536000000000000000e5 +3277 1 33 48 0.13107200000000000000e6 +3277 3 10 39 0.65536000000000000000e5 +3277 3 25 30 0.65536000000000000000e5 +3277 3 29 42 0.13107200000000000000e6 +3277 4 18 22 0.65536000000000000000e5 +3278 1 10 41 0.65536000000000000000e5 +3278 1 11 42 0.65536000000000000000e5 +3278 1 32 47 -0.65536000000000000000e5 +3278 1 33 48 -0.65536000000000000000e5 +3278 3 13 42 -0.13107200000000000000e6 +3278 3 25 31 0.65536000000000000000e5 +3278 3 28 41 -0.65536000000000000000e5 +3278 3 29 42 -0.65536000000000000000e5 +3278 4 3 31 0.65536000000000000000e5 +3279 1 11 42 -0.65536000000000000000e5 +3279 1 33 48 0.65536000000000000000e5 +3279 3 25 32 0.65536000000000000000e5 +3279 3 29 42 0.65536000000000000000e5 +3280 1 26 33 -0.65536000000000000000e5 +3280 1 33 40 0.65536000000000000000e5 +3280 3 25 33 0.65536000000000000000e5 +3281 1 14 45 -0.13107200000000000000e6 +3281 1 17 48 0.65536000000000000000e5 +3281 1 18 49 0.65536000000000000000e5 +3281 1 34 49 0.65536000000000000000e5 +3281 2 14 28 0.65536000000000000000e5 +3281 3 13 42 0.65536000000000000000e5 +3281 3 14 43 0.65536000000000000000e5 +3281 3 18 47 0.65536000000000000000e5 +3281 3 25 34 0.65536000000000000000e5 +3282 3 14 43 -0.65536000000000000000e5 +3282 3 25 35 0.65536000000000000000e5 +3283 3 15 44 -0.65536000000000000000e5 +3283 3 25 36 0.65536000000000000000e5 +3284 1 6 53 -0.65536000000000000000e5 +3284 1 25 40 0.65536000000000000000e5 +3284 3 25 37 0.65536000000000000000e5 +3284 3 25 38 0.65536000000000000000e5 +3284 3 27 40 -0.13107200000000000000e6 +3284 4 4 32 0.65536000000000000000e5 +3285 1 6 53 0.65536000000000000000e5 +3285 1 25 40 -0.65536000000000000000e5 +3285 3 25 39 0.65536000000000000000e5 +3286 3 25 40 0.65536000000000000000e5 +3286 3 26 39 -0.65536000000000000000e5 +3287 3 25 41 0.65536000000000000000e5 +3287 3 27 40 -0.65536000000000000000e5 +3288 3 5 50 -0.65536000000000000000e5 +3288 3 25 42 0.65536000000000000000e5 +3289 3 5 50 0.65536000000000000000e5 +3289 3 25 43 0.65536000000000000000e5 +3289 3 27 40 0.65536000000000000000e5 +3289 3 29 42 -0.13107200000000000000e6 +3289 4 18 30 0.65536000000000000000e5 +3290 3 25 44 0.65536000000000000000e5 +3290 3 29 42 -0.65536000000000000000e5 +3291 3 14 51 -0.13107200000000000000e6 +3291 3 25 45 0.65536000000000000000e5 +3291 3 29 42 0.65536000000000000000e5 +3291 3 30 43 0.65536000000000000000e5 +3291 4 19 31 0.65536000000000000000e5 +3292 3 14 51 -0.65536000000000000000e5 +3292 3 25 46 0.65536000000000000000e5 +3293 1 1 48 0.65536000000000000000e5 +3293 1 2 49 0.13107200000000000000e6 +3293 1 8 39 0.13107200000000000000e6 +3293 1 9 40 0.13107200000000000000e6 +3293 1 10 41 -0.26214400000000000000e6 +3293 1 12 43 -0.52428800000000000000e6 +3293 1 23 38 0.65536000000000000000e5 +3293 1 24 39 0.65536000000000000000e5 +3293 1 26 41 -0.13107200000000000000e6 +3293 1 28 43 0.26214400000000000000e6 +3293 1 32 47 0.52428800000000000000e6 +3293 1 40 47 0.65536000000000000000e5 +3293 2 2 32 0.65536000000000000000e5 +3293 2 3 33 0.65536000000000000000e5 +3293 2 16 30 0.13107200000000000000e6 +3293 2 20 34 0.26214400000000000000e6 +3293 3 9 38 0.13107200000000000000e6 +3293 3 22 35 0.52428800000000000000e6 +3293 3 25 38 0.65536000000000000000e5 +3293 3 25 47 0.65536000000000000000e5 +3293 3 28 41 0.52428800000000000000e6 +3293 4 2 30 0.13107200000000000000e6 +3293 4 6 34 0.26214400000000000000e6 +3294 1 6 53 -0.65536000000000000000e5 +3294 1 25 56 0.65536000000000000000e5 +3294 3 24 53 -0.65536000000000000000e5 +3294 3 25 48 0.65536000000000000000e5 +3294 3 25 54 -0.65536000000000000000e5 +3294 3 38 51 0.13107200000000000000e6 +3294 4 28 32 -0.65536000000000000000e5 +3295 3 25 49 0.65536000000000000000e5 +3295 3 39 40 -0.65536000000000000000e5 +3296 1 24 55 -0.65536000000000000000e5 +3296 1 26 41 0.65536000000000000000e5 +3296 3 22 51 0.65536000000000000000e5 +3296 3 23 52 -0.13107200000000000000e6 +3296 3 25 50 0.65536000000000000000e5 +3296 3 27 40 -0.65536000000000000000e5 +3296 4 7 35 0.65536000000000000000e5 +3297 3 10 55 0.13107200000000000000e6 +3297 3 22 51 -0.65536000000000000000e5 +3297 3 23 52 0.13107200000000000000e6 +3297 3 25 51 0.65536000000000000000e5 +3297 3 35 48 -0.26214400000000000000e6 +3297 3 40 45 0.13107200000000000000e6 +3297 4 7 35 -0.65536000000000000000e5 +3297 4 21 33 0.65536000000000000000e5 +3297 4 22 34 0.13107200000000000000e6 +3298 3 10 55 -0.65536000000000000000e5 +3298 3 25 52 0.65536000000000000000e5 +3299 3 24 53 0.65536000000000000000e5 +3299 3 25 53 0.65536000000000000000e5 +3299 3 25 54 0.65536000000000000000e5 +3299 3 38 51 -0.13107200000000000000e6 +3299 4 28 32 0.65536000000000000000e5 +3300 1 1 48 0.32768000000000000000e5 +3300 1 2 49 0.32768000000000000000e5 +3300 1 8 39 0.65536000000000000000e5 +3300 1 9 40 0.65536000000000000000e5 +3300 1 10 41 -0.13107200000000000000e6 +3300 1 12 43 -0.26214400000000000000e6 +3300 1 23 38 0.32768000000000000000e5 +3300 1 26 41 -0.65536000000000000000e5 +3300 1 28 43 0.26214400000000000000e6 +3300 1 32 47 0.26214400000000000000e6 +3300 1 33 48 -0.13107200000000000000e6 +3300 1 40 55 0.65536000000000000000e5 +3300 2 2 32 0.32768000000000000000e5 +3300 2 4 34 -0.65536000000000000000e5 +3300 2 16 30 0.65536000000000000000e5 +3300 2 20 34 0.13107200000000000000e6 +3300 2 28 34 0.65536000000000000000e5 +3300 3 5 50 -0.65536000000000000000e5 +3300 3 9 38 0.65536000000000000000e5 +3300 3 10 55 -0.13107200000000000000e6 +3300 3 22 35 0.26214400000000000000e6 +3300 3 22 51 0.65536000000000000000e5 +3300 3 23 52 -0.13107200000000000000e6 +3300 3 25 55 0.65536000000000000000e5 +3300 3 27 40 -0.65536000000000000000e5 +3300 3 28 41 0.26214400000000000000e6 +3300 3 35 48 0.26214400000000000000e6 +3300 3 40 45 -0.13107200000000000000e6 +3300 4 2 30 0.65536000000000000000e5 +3300 4 6 34 0.13107200000000000000e6 +3300 4 7 35 0.65536000000000000000e5 +3300 4 22 34 -0.13107200000000000000e6 +3301 3 25 56 0.65536000000000000000e5 +3301 3 40 53 -0.65536000000000000000e5 +3302 1 1 40 0.32768000000000000000e5 +3302 1 2 33 -0.26214400000000000000e6 +3302 1 6 53 0.32768000000000000000e5 +3302 1 9 40 0.19660800000000000000e6 +3302 1 10 25 -0.13107200000000000000e6 +3302 1 11 42 0.13107200000000000000e6 +3302 1 12 43 0.52428800000000000000e6 +3302 1 23 38 -0.32768000000000000000e5 +3302 1 25 40 -0.32768000000000000000e5 +3302 1 26 41 -0.65536000000000000000e5 +3302 1 28 43 -0.26214400000000000000e6 +3302 1 32 47 -0.26214400000000000000e6 +3302 1 33 48 -0.13107200000000000000e6 +3302 2 2 32 -0.32768000000000000000e5 +3302 2 3 17 0.32768000000000000000e5 +3302 2 5 19 -0.32768000000000000000e5 +3302 2 5 35 0.32768000000000000000e5 +3302 2 12 26 -0.26214400000000000000e6 +3302 3 1 30 0.13107200000000000000e6 +3302 3 1 38 0.32768000000000000000e5 +3302 3 2 23 0.32768000000000000000e5 +3302 3 2 39 0.32768000000000000000e5 +3302 3 3 32 -0.13107200000000000000e6 +3302 3 3 40 -0.32768000000000000000e5 +3302 3 5 26 -0.32768000000000000000e5 +3302 3 5 50 0.65536000000000000000e5 +3302 3 8 37 -0.65536000000000000000e5 +3302 3 10 39 0.13107200000000000000e6 +3302 3 13 42 -0.52428800000000000000e6 +3302 3 14 27 0.26214400000000000000e6 +3302 3 25 38 -0.32768000000000000000e5 +3302 3 26 26 0.65536000000000000000e5 +3302 3 26 39 -0.32768000000000000000e5 +3302 3 28 41 -0.26214400000000000000e6 +3302 3 29 42 -0.13107200000000000000e6 +3302 4 3 31 0.26214400000000000000e6 +3302 4 4 16 -0.32768000000000000000e5 +3302 4 5 17 0.32768000000000000000e5 +3302 4 6 18 0.65536000000000000000e5 +3302 4 7 19 -0.65536000000000000000e5 +3302 4 8 20 -0.13107200000000000000e6 +3302 4 18 22 0.65536000000000000000e5 +3302 4 19 19 0.65536000000000000000e5 +3303 1 9 40 -0.65536000000000000000e5 +3303 1 26 41 0.65536000000000000000e5 +3303 3 26 27 0.65536000000000000000e5 +3304 3 10 39 -0.65536000000000000000e5 +3304 3 26 28 0.65536000000000000000e5 +3305 1 9 40 0.65536000000000000000e5 +3305 1 11 42 -0.13107200000000000000e6 +3305 1 26 41 -0.65536000000000000000e5 +3305 1 33 48 0.13107200000000000000e6 +3305 3 10 39 0.65536000000000000000e5 +3305 3 26 29 0.65536000000000000000e5 +3305 3 29 42 0.13107200000000000000e6 +3305 4 18 22 0.65536000000000000000e5 +3306 3 11 40 -0.65536000000000000000e5 +3306 3 26 30 0.65536000000000000000e5 +3307 1 11 42 -0.65536000000000000000e5 +3307 1 33 48 0.65536000000000000000e5 +3307 3 26 31 0.65536000000000000000e5 +3307 3 29 42 0.65536000000000000000e5 +3308 1 26 33 -0.65536000000000000000e5 +3308 1 33 40 0.65536000000000000000e5 +3308 3 26 32 0.65536000000000000000e5 +3309 1 11 42 0.65536000000000000000e5 +3309 1 26 33 0.65536000000000000000e5 +3309 1 33 40 -0.65536000000000000000e5 +3309 1 33 48 -0.65536000000000000000e5 +3309 3 14 43 -0.13107200000000000000e6 +3309 3 26 33 0.65536000000000000000e5 +3309 3 29 42 -0.65536000000000000000e5 +3309 4 22 22 0.13107200000000000000e6 +3310 3 14 43 -0.65536000000000000000e5 +3310 3 26 34 0.65536000000000000000e5 +3311 3 26 36 0.65536000000000000000e5 +3311 3 30 35 -0.65536000000000000000e5 +3312 3 25 38 -0.65536000000000000000e5 +3312 3 26 37 0.65536000000000000000e5 +3313 1 6 53 0.65536000000000000000e5 +3313 1 25 40 -0.65536000000000000000e5 +3313 3 26 38 0.65536000000000000000e5 +3314 1 6 53 -0.65536000000000000000e5 +3314 1 25 40 0.65536000000000000000e5 +3314 3 5 50 0.13107200000000000000e6 +3314 3 26 39 0.65536000000000000000e5 +3314 3 26 40 0.65536000000000000000e5 +3314 3 27 40 0.13107200000000000000e6 +3314 3 29 42 -0.26214400000000000000e6 +3314 4 5 33 0.65536000000000000000e5 +3314 4 18 30 0.13107200000000000000e6 +3315 3 5 50 -0.65536000000000000000e5 +3315 3 26 41 0.65536000000000000000e5 +3316 3 5 50 0.65536000000000000000e5 +3316 3 26 42 0.65536000000000000000e5 +3316 3 27 40 0.65536000000000000000e5 +3316 3 29 42 -0.13107200000000000000e6 +3316 4 18 30 0.65536000000000000000e5 +3317 3 6 51 -0.65536000000000000000e5 +3317 3 26 43 0.65536000000000000000e5 +3318 3 14 51 -0.13107200000000000000e6 +3318 3 26 44 0.65536000000000000000e5 +3318 3 29 42 0.65536000000000000000e5 +3318 3 30 43 0.65536000000000000000e5 +3318 4 19 31 0.65536000000000000000e5 +3319 3 26 45 0.65536000000000000000e5 +3319 3 30 43 -0.65536000000000000000e5 +3320 3 26 46 0.65536000000000000000e5 +3320 3 35 40 -0.65536000000000000000e5 +3321 1 6 53 -0.65536000000000000000e5 +3321 1 25 56 0.65536000000000000000e5 +3321 3 24 53 -0.65536000000000000000e5 +3321 3 25 54 -0.65536000000000000000e5 +3321 3 26 47 0.65536000000000000000e5 +3321 3 38 51 0.13107200000000000000e6 +3321 4 28 32 -0.65536000000000000000e5 +3322 3 26 48 0.65536000000000000000e5 +3322 3 39 40 -0.65536000000000000000e5 +3323 1 6 53 0.65536000000000000000e5 +3323 1 25 56 -0.65536000000000000000e5 +3323 3 10 55 0.26214400000000000000e6 +3323 3 22 51 -0.13107200000000000000e6 +3323 3 23 52 0.26214400000000000000e6 +3323 3 24 53 0.65536000000000000000e5 +3323 3 25 54 0.65536000000000000000e5 +3323 3 26 49 0.65536000000000000000e5 +3323 3 35 48 -0.52428800000000000000e6 +3323 3 38 51 -0.13107200000000000000e6 +3323 3 39 40 0.65536000000000000000e5 +3323 3 40 45 0.26214400000000000000e6 +3323 4 7 35 -0.13107200000000000000e6 +3323 4 21 33 0.13107200000000000000e6 +3323 4 22 34 0.26214400000000000000e6 +3323 4 28 28 0.13107200000000000000e6 +3323 4 28 32 0.65536000000000000000e5 +3324 3 10 55 0.13107200000000000000e6 +3324 3 22 51 -0.65536000000000000000e5 +3324 3 23 52 0.13107200000000000000e6 +3324 3 26 50 0.65536000000000000000e5 +3324 3 35 48 -0.26214400000000000000e6 +3324 3 40 45 0.13107200000000000000e6 +3324 4 7 35 -0.65536000000000000000e5 +3324 4 21 33 0.65536000000000000000e5 +3324 4 22 34 0.13107200000000000000e6 +3325 3 6 55 -0.65536000000000000000e5 +3325 3 26 51 0.65536000000000000000e5 +3326 3 26 52 0.65536000000000000000e5 +3326 3 40 45 -0.65536000000000000000e5 +3327 3 25 54 -0.65536000000000000000e5 +3327 3 26 53 0.65536000000000000000e5 +3328 1 1 48 0.65536000000000000000e5 +3328 1 2 49 0.65536000000000000000e5 +3328 1 8 39 0.13107200000000000000e6 +3328 1 9 40 0.13107200000000000000e6 +3328 1 10 41 -0.26214400000000000000e6 +3328 1 12 43 -0.52428800000000000000e6 +3328 1 23 38 0.65536000000000000000e5 +3328 1 26 41 -0.13107200000000000000e6 +3328 1 28 43 0.52428800000000000000e6 +3328 1 32 47 0.52428800000000000000e6 +3328 1 33 48 -0.26214400000000000000e6 +3328 1 40 55 0.13107200000000000000e6 +3328 2 2 32 0.65536000000000000000e5 +3328 2 4 34 -0.13107200000000000000e6 +3328 2 16 30 0.13107200000000000000e6 +3328 2 20 34 0.26214400000000000000e6 +3328 2 28 34 0.13107200000000000000e6 +3328 3 5 50 -0.13107200000000000000e6 +3328 3 9 38 0.13107200000000000000e6 +3328 3 10 55 -0.26214400000000000000e6 +3328 3 22 35 0.52428800000000000000e6 +3328 3 22 51 0.13107200000000000000e6 +3328 3 23 52 -0.26214400000000000000e6 +3328 3 24 53 -0.65536000000000000000e5 +3328 3 26 54 0.65536000000000000000e5 +3328 3 27 40 -0.13107200000000000000e6 +3328 3 28 41 0.52428800000000000000e6 +3328 3 35 48 0.52428800000000000000e6 +3328 3 38 51 0.13107200000000000000e6 +3328 3 40 45 -0.26214400000000000000e6 +3328 4 2 30 0.13107200000000000000e6 +3328 4 6 34 0.26214400000000000000e6 +3328 4 7 35 0.13107200000000000000e6 +3328 4 19 35 0.65536000000000000000e5 +3328 4 22 34 -0.26214400000000000000e6 +3328 4 28 32 -0.65536000000000000000e5 +3329 1 1 48 0.65536000000000000000e5 +3329 1 2 49 0.13107200000000000000e6 +3329 1 6 53 -0.65536000000000000000e5 +3329 1 8 39 0.13107200000000000000e6 +3329 1 9 40 0.13107200000000000000e6 +3329 1 10 41 -0.26214400000000000000e6 +3329 1 12 43 -0.52428800000000000000e6 +3329 1 23 38 0.65536000000000000000e5 +3329 1 24 39 0.65536000000000000000e5 +3329 1 24 55 0.13107200000000000000e6 +3329 1 25 56 0.65536000000000000000e5 +3329 1 26 41 -0.26214400000000000000e6 +3329 1 28 43 0.26214400000000000000e6 +3329 1 32 47 0.52428800000000000000e6 +3329 1 47 54 0.65536000000000000000e5 +3329 2 2 32 0.65536000000000000000e5 +3329 2 3 33 0.65536000000000000000e5 +3329 2 5 35 -0.65536000000000000000e5 +3329 2 16 30 0.13107200000000000000e6 +3329 2 20 34 0.26214400000000000000e6 +3329 2 33 35 0.65536000000000000000e5 +3329 3 9 38 0.13107200000000000000e6 +3329 3 22 35 0.52428800000000000000e6 +3329 3 22 51 -0.13107200000000000000e6 +3329 3 23 52 0.26214400000000000000e6 +3329 3 25 38 0.65536000000000000000e5 +3329 3 25 54 -0.65536000000000000000e5 +3329 3 26 56 0.65536000000000000000e5 +3329 3 27 40 0.13107200000000000000e6 +3329 3 28 41 0.52428800000000000000e6 +3329 3 38 51 0.13107200000000000000e6 +3329 3 39 40 -0.65536000000000000000e5 +3329 3 41 54 0.13107200000000000000e6 +3329 3 49 50 -0.13107200000000000000e6 +3329 4 2 30 0.13107200000000000000e6 +3329 4 6 34 0.26214400000000000000e6 +3329 4 7 35 -0.13107200000000000000e6 +3329 4 33 33 0.13107200000000000000e6 +3330 1 9 40 0.16384000000000000000e5 +3330 1 10 41 -0.32768000000000000000e5 +3330 1 26 41 -0.16384000000000000000e5 +3330 1 32 47 0.32768000000000000000e5 +3330 3 8 37 -0.16384000000000000000e5 +3330 3 9 38 0.16384000000000000000e5 +3330 3 22 27 -0.16384000000000000000e5 +3330 3 27 27 0.65536000000000000000e5 +3330 3 28 41 0.32768000000000000000e5 +3330 4 1 29 -0.16384000000000000000e5 +3330 4 2 30 0.16384000000000000000e5 +3331 1 11 42 -0.65536000000000000000e5 +3331 1 33 48 0.65536000000000000000e5 +3331 2 12 26 0.65536000000000000000e5 +3331 2 20 34 -0.65536000000000000000e5 +3331 3 13 42 0.13107200000000000000e6 +3331 3 22 35 -0.13107200000000000000e6 +3331 3 27 28 0.65536000000000000000e5 +3331 3 29 42 0.65536000000000000000e5 +3331 4 3 31 -0.65536000000000000000e5 +3331 4 6 34 -0.65536000000000000000e5 +3332 1 10 41 -0.65536000000000000000e5 +3332 1 32 47 0.65536000000000000000e5 +3332 3 27 29 0.65536000000000000000e5 +3332 3 28 41 0.65536000000000000000e5 +3333 1 10 41 0.65536000000000000000e5 +3333 1 11 42 0.65536000000000000000e5 +3333 1 32 47 -0.65536000000000000000e5 +3333 1 33 48 -0.65536000000000000000e5 +3333 3 13 42 -0.13107200000000000000e6 +3333 3 27 30 0.65536000000000000000e5 +3333 3 28 41 -0.65536000000000000000e5 +3333 3 29 42 -0.65536000000000000000e5 +3333 4 3 31 0.65536000000000000000e5 +3334 3 12 41 -0.65536000000000000000e5 +3334 3 27 31 0.65536000000000000000e5 +3335 3 22 35 -0.65536000000000000000e5 +3335 3 27 32 0.65536000000000000000e5 +3336 3 13 42 -0.65536000000000000000e5 +3336 3 27 33 0.65536000000000000000e5 +3337 1 13 44 -0.65536000000000000000e5 +3337 1 34 41 0.65536000000000000000e5 +3337 3 27 34 0.65536000000000000000e5 +3338 1 14 45 -0.65536000000000000000e5 +3338 1 17 48 0.32768000000000000000e5 +3338 1 18 49 0.32768000000000000000e5 +3338 1 34 49 0.32768000000000000000e5 +3338 2 14 28 0.32768000000000000000e5 +3338 3 14 43 0.32768000000000000000e5 +3338 3 18 47 0.32768000000000000000e5 +3338 3 22 35 -0.32768000000000000000e5 +3338 3 27 35 0.65536000000000000000e5 +3338 4 14 26 -0.32768000000000000000e5 +3339 1 3 18 -0.16384000000000000000e5 +3339 1 4 19 0.32768000000000000000e5 +3339 1 5 36 0.32768000000000000000e5 +3339 1 12 43 0.16384000000000000000e5 +3339 1 13 44 -0.32768000000000000000e5 +3339 1 14 45 -0.32768000000000000000e5 +3339 1 17 32 -0.65536000000000000000e5 +3339 1 19 50 0.65536000000000000000e5 +3339 3 3 16 -0.16384000000000000000e5 +3339 3 4 17 -0.16384000000000000000e5 +3339 3 14 27 0.16384000000000000000e5 +3339 3 16 29 0.32768000000000000000e5 +3339 3 27 36 0.65536000000000000000e5 +3339 4 2 14 -0.16384000000000000000e5 +3339 4 11 23 0.32768000000000000000e5 +3340 1 6 53 0.32768000000000000000e5 +3340 1 25 40 -0.32768000000000000000e5 +3340 2 4 34 0.65536000000000000000e5 +3340 2 16 30 0.65536000000000000000e5 +3340 2 16 34 -0.65536000000000000000e5 +3340 2 21 35 -0.65536000000000000000e5 +3340 3 5 50 0.65536000000000000000e5 +3340 3 7 52 -0.26214400000000000000e6 +3340 3 24 37 0.32768000000000000000e5 +3340 3 27 37 0.65536000000000000000e5 +3340 3 27 40 0.65536000000000000000e5 +3340 3 28 41 0.26214400000000000000e6 +3340 4 4 32 -0.32768000000000000000e5 +3340 4 6 34 0.13107200000000000000e6 +3340 4 7 35 -0.65536000000000000000e5 +3340 4 16 28 0.32768000000000000000e5 +3340 4 17 29 -0.65536000000000000000e5 +3341 1 6 53 0.32768000000000000000e5 +3341 1 25 40 -0.32768000000000000000e5 +3341 3 24 37 0.32768000000000000000e5 +3341 3 27 38 0.65536000000000000000e5 +3341 3 27 40 0.13107200000000000000e6 +3341 3 28 41 -0.13107200000000000000e6 +3341 4 4 32 -0.32768000000000000000e5 +3341 4 16 28 0.32768000000000000000e5 +3341 4 17 29 0.65536000000000000000e5 +3342 1 6 53 -0.32768000000000000000e5 +3342 1 25 40 0.32768000000000000000e5 +3342 3 24 37 -0.32768000000000000000e5 +3342 3 27 39 0.65536000000000000000e5 +3342 3 27 40 -0.65536000000000000000e5 +3342 4 4 32 0.32768000000000000000e5 +3342 4 16 28 -0.32768000000000000000e5 +3343 1 6 53 0.16384000000000000000e5 +3343 1 25 40 -0.16384000000000000000e5 +3343 2 4 34 0.32768000000000000000e5 +3343 2 21 35 -0.32768000000000000000e5 +3343 3 5 50 0.32768000000000000000e5 +3343 3 7 52 -0.13107200000000000000e6 +3343 3 24 37 0.16384000000000000000e5 +3343 3 27 40 0.65536000000000000000e5 +3343 3 27 41 0.65536000000000000000e5 +3343 3 28 41 0.65536000000000000000e5 +3343 4 4 32 -0.16384000000000000000e5 +3343 4 6 34 0.65536000000000000000e5 +3343 4 7 35 -0.32768000000000000000e5 +3343 4 16 28 0.16384000000000000000e5 +3344 3 27 42 0.65536000000000000000e5 +3344 3 28 41 -0.65536000000000000000e5 +3345 1 6 53 -0.16384000000000000000e5 +3345 1 25 40 0.16384000000000000000e5 +3345 2 4 34 -0.32768000000000000000e5 +3345 2 21 35 0.32768000000000000000e5 +3345 3 5 50 -0.32768000000000000000e5 +3345 3 24 37 -0.16384000000000000000e5 +3345 3 27 40 -0.65536000000000000000e5 +3345 3 27 43 0.65536000000000000000e5 +3345 4 4 32 0.16384000000000000000e5 +3345 4 7 35 0.32768000000000000000e5 +3345 4 16 28 -0.16384000000000000000e5 +3346 3 7 52 -0.65536000000000000000e5 +3346 3 27 44 0.65536000000000000000e5 +3347 1 6 53 -0.81920000000000000000e4 +3347 1 25 40 0.81920000000000000000e4 +3347 2 4 34 -0.16384000000000000000e5 +3347 2 21 35 0.16384000000000000000e5 +3347 3 5 50 -0.16384000000000000000e5 +3347 3 24 37 -0.81920000000000000000e4 +3347 3 27 40 -0.32768000000000000000e5 +3347 3 27 45 0.65536000000000000000e5 +3347 3 28 41 -0.32768000000000000000e5 +3347 3 29 42 -0.32768000000000000000e5 +3347 4 4 32 0.81920000000000000000e4 +3347 4 7 35 0.16384000000000000000e5 +3347 4 16 28 -0.81920000000000000000e4 +3347 4 23 27 -0.32768000000000000000e5 +3348 3 27 46 0.65536000000000000000e5 +3348 3 31 44 -0.65536000000000000000e5 +3349 1 24 55 -0.65536000000000000000e5 +3349 1 26 41 0.65536000000000000000e5 +3349 1 32 47 -0.13107200000000000000e6 +3349 1 37 52 0.13107200000000000000e6 +3349 3 22 51 0.65536000000000000000e5 +3349 3 27 40 -0.65536000000000000000e5 +3349 3 27 47 0.65536000000000000000e5 +3349 4 20 32 0.65536000000000000000e5 +3350 3 22 51 -0.65536000000000000000e5 +3350 3 27 48 0.65536000000000000000e5 +3351 1 24 55 0.65536000000000000000e5 +3351 1 26 41 -0.65536000000000000000e5 +3351 3 27 40 0.65536000000000000000e5 +3351 3 27 49 0.65536000000000000000e5 +3352 1 32 47 -0.65536000000000000000e5 +3352 1 37 52 0.65536000000000000000e5 +3352 3 27 50 0.65536000000000000000e5 +3353 3 23 52 -0.65536000000000000000e5 +3353 3 27 51 0.65536000000000000000e5 +3354 3 27 52 0.65536000000000000000e5 +3354 3 34 47 -0.65536000000000000000e5 +3355 3 27 53 0.65536000000000000000e5 +3355 3 37 50 -0.65536000000000000000e5 +3356 1 24 55 -0.65536000000000000000e5 +3356 1 41 56 0.65536000000000000000e5 +3356 3 27 54 0.65536000000000000000e5 +3356 3 27 56 0.65536000000000000000e5 +3357 1 1 48 -0.16384000000000000000e5 +3357 1 2 49 -0.16384000000000000000e5 +3357 1 8 39 -0.32768000000000000000e5 +3357 1 9 40 -0.32768000000000000000e5 +3357 1 10 41 0.65536000000000000000e5 +3357 1 12 43 0.13107200000000000000e6 +3357 1 23 38 -0.16384000000000000000e5 +3357 1 24 55 0.32768000000000000000e5 +3357 1 26 41 0.32768000000000000000e5 +3357 1 28 43 -0.13107200000000000000e6 +3357 1 32 47 -0.13107200000000000000e6 +3357 1 33 48 0.65536000000000000000e5 +3357 1 40 55 -0.32768000000000000000e5 +3357 1 41 56 -0.32768000000000000000e5 +3357 1 44 51 -0.13107200000000000000e6 +3357 1 46 53 0.13107200000000000000e6 +3357 2 2 32 -0.16384000000000000000e5 +3357 2 4 34 0.32768000000000000000e5 +3357 2 16 30 -0.32768000000000000000e5 +3357 2 20 34 -0.65536000000000000000e5 +3357 2 28 34 -0.32768000000000000000e5 +3357 3 5 50 0.32768000000000000000e5 +3357 3 9 38 -0.32768000000000000000e5 +3357 3 10 55 0.65536000000000000000e5 +3357 3 22 35 -0.13107200000000000000e6 +3357 3 22 51 -0.32768000000000000000e5 +3357 3 23 52 0.65536000000000000000e5 +3357 3 27 40 0.32768000000000000000e5 +3357 3 27 55 0.65536000000000000000e5 +3357 3 27 56 -0.32768000000000000000e5 +3357 3 28 41 -0.13107200000000000000e6 +3357 3 35 48 -0.13107200000000000000e6 +3357 3 38 51 0.32768000000000000000e5 +3357 3 39 52 0.65536000000000000000e5 +3357 3 40 45 0.65536000000000000000e5 +3357 4 2 30 -0.32768000000000000000e5 +3357 4 6 34 -0.65536000000000000000e5 +3357 4 7 35 -0.32768000000000000000e5 +3357 4 22 34 0.65536000000000000000e5 +3357 4 23 35 0.65536000000000000000e5 +3357 4 29 33 0.32768000000000000000e5 +3358 1 10 41 -0.32768000000000000000e5 +3358 1 32 47 0.32768000000000000000e5 +3358 3 28 28 0.65536000000000000000e5 +3358 3 28 41 0.32768000000000000000e5 +3359 1 10 41 0.65536000000000000000e5 +3359 1 11 42 0.65536000000000000000e5 +3359 1 32 47 -0.65536000000000000000e5 +3359 1 33 48 -0.65536000000000000000e5 +3359 3 13 42 -0.13107200000000000000e6 +3359 3 28 29 0.65536000000000000000e5 +3359 3 28 41 -0.65536000000000000000e5 +3359 3 29 42 -0.65536000000000000000e5 +3359 4 3 31 0.65536000000000000000e5 +3360 1 11 42 -0.65536000000000000000e5 +3360 1 33 48 0.65536000000000000000e5 +3360 3 28 30 0.65536000000000000000e5 +3360 3 29 42 0.65536000000000000000e5 +3361 3 22 35 -0.65536000000000000000e5 +3361 3 28 31 0.65536000000000000000e5 +3362 3 13 42 -0.65536000000000000000e5 +3362 3 28 32 0.65536000000000000000e5 +3363 1 14 45 -0.13107200000000000000e6 +3363 1 17 48 0.65536000000000000000e5 +3363 1 18 49 0.65536000000000000000e5 +3363 1 34 49 0.65536000000000000000e5 +3363 2 14 28 0.65536000000000000000e5 +3363 3 13 42 0.65536000000000000000e5 +3363 3 14 43 0.65536000000000000000e5 +3363 3 18 47 0.65536000000000000000e5 +3363 3 28 33 0.65536000000000000000e5 +3364 1 14 45 -0.65536000000000000000e5 +3364 1 17 48 0.32768000000000000000e5 +3364 1 18 49 0.32768000000000000000e5 +3364 1 34 49 0.32768000000000000000e5 +3364 2 14 28 0.32768000000000000000e5 +3364 3 14 43 0.32768000000000000000e5 +3364 3 18 47 0.32768000000000000000e5 +3364 3 22 35 -0.32768000000000000000e5 +3364 3 28 34 0.65536000000000000000e5 +3364 4 14 26 -0.32768000000000000000e5 +3365 1 14 45 0.65536000000000000000e5 +3365 1 17 48 -0.32768000000000000000e5 +3365 1 18 49 -0.32768000000000000000e5 +3365 1 34 49 -0.32768000000000000000e5 +3365 2 14 28 -0.32768000000000000000e5 +3365 3 14 43 -0.32768000000000000000e5 +3365 3 15 44 0.65536000000000000000e5 +3365 3 16 45 -0.13107200000000000000e6 +3365 3 18 47 -0.32768000000000000000e5 +3365 3 22 35 0.32768000000000000000e5 +3365 3 28 35 0.65536000000000000000e5 +3365 4 14 26 0.32768000000000000000e5 +3365 4 15 27 0.65536000000000000000e5 +3366 3 16 45 -0.65536000000000000000e5 +3366 3 28 36 0.65536000000000000000e5 +3367 1 6 53 0.32768000000000000000e5 +3367 1 25 40 -0.32768000000000000000e5 +3367 3 24 37 0.32768000000000000000e5 +3367 3 27 40 0.13107200000000000000e6 +3367 3 28 37 0.65536000000000000000e5 +3367 3 28 41 -0.13107200000000000000e6 +3367 4 4 32 -0.32768000000000000000e5 +3367 4 16 28 0.32768000000000000000e5 +3367 4 17 29 0.65536000000000000000e5 +3368 1 6 53 -0.32768000000000000000e5 +3368 1 25 40 0.32768000000000000000e5 +3368 3 24 37 -0.32768000000000000000e5 +3368 3 27 40 -0.65536000000000000000e5 +3368 3 28 38 0.65536000000000000000e5 +3368 4 4 32 0.32768000000000000000e5 +3368 4 16 28 -0.32768000000000000000e5 +3369 3 27 40 -0.65536000000000000000e5 +3369 3 28 39 0.65536000000000000000e5 +3370 3 5 50 -0.65536000000000000000e5 +3370 3 28 40 0.65536000000000000000e5 +3371 1 6 53 -0.16384000000000000000e5 +3371 1 25 40 0.16384000000000000000e5 +3371 2 4 34 -0.32768000000000000000e5 +3371 2 21 35 0.32768000000000000000e5 +3371 3 5 50 -0.32768000000000000000e5 +3371 3 24 37 -0.16384000000000000000e5 +3371 3 27 40 -0.65536000000000000000e5 +3371 3 28 42 0.65536000000000000000e5 +3371 4 4 32 0.16384000000000000000e5 +3371 4 7 35 0.32768000000000000000e5 +3371 4 16 28 -0.16384000000000000000e5 +3372 3 28 43 0.65536000000000000000e5 +3372 3 29 42 -0.65536000000000000000e5 +3373 1 6 53 -0.81920000000000000000e4 +3373 1 25 40 0.81920000000000000000e4 +3373 2 4 34 -0.16384000000000000000e5 +3373 2 21 35 0.16384000000000000000e5 +3373 3 5 50 -0.16384000000000000000e5 +3373 3 24 37 -0.81920000000000000000e4 +3373 3 27 40 -0.32768000000000000000e5 +3373 3 28 41 -0.32768000000000000000e5 +3373 3 28 44 0.65536000000000000000e5 +3373 3 29 42 -0.32768000000000000000e5 +3373 4 4 32 0.81920000000000000000e4 +3373 4 7 35 0.16384000000000000000e5 +3373 4 16 28 -0.81920000000000000000e4 +3373 4 23 27 -0.32768000000000000000e5 +3374 3 18 47 -0.65536000000000000000e5 +3374 3 28 45 0.65536000000000000000e5 +3375 3 19 48 -0.65536000000000000000e5 +3375 3 28 46 0.65536000000000000000e5 +3376 3 22 51 -0.65536000000000000000e5 +3376 3 28 47 0.65536000000000000000e5 +3377 1 24 55 0.65536000000000000000e5 +3377 1 26 41 -0.65536000000000000000e5 +3377 3 27 40 0.65536000000000000000e5 +3377 3 28 48 0.65536000000000000000e5 +3378 1 24 55 -0.65536000000000000000e5 +3378 1 26 41 0.65536000000000000000e5 +3378 3 22 51 0.65536000000000000000e5 +3378 3 23 52 -0.13107200000000000000e6 +3378 3 27 40 -0.65536000000000000000e5 +3378 3 28 49 0.65536000000000000000e5 +3378 4 7 35 0.65536000000000000000e5 +3379 3 23 52 -0.65536000000000000000e5 +3379 3 28 50 0.65536000000000000000e5 +3380 3 10 55 0.65536000000000000000e5 +3380 3 28 51 0.65536000000000000000e5 +3380 3 35 48 -0.13107200000000000000e6 +3380 3 40 45 0.65536000000000000000e5 +3380 4 22 34 0.65536000000000000000e5 +3381 1 34 49 -0.65536000000000000000e5 +3381 1 44 51 0.65536000000000000000e5 +3381 3 28 52 0.65536000000000000000e5 +3382 1 24 55 -0.65536000000000000000e5 +3382 1 41 56 0.65536000000000000000e5 +3382 3 27 56 0.65536000000000000000e5 +3382 3 28 53 0.65536000000000000000e5 +3383 3 28 54 0.65536000000000000000e5 +3383 3 38 51 -0.65536000000000000000e5 +3384 1 1 48 0.16384000000000000000e5 +3384 1 2 49 0.16384000000000000000e5 +3384 1 8 39 0.32768000000000000000e5 +3384 1 9 40 0.32768000000000000000e5 +3384 1 10 41 -0.65536000000000000000e5 +3384 1 12 43 -0.13107200000000000000e6 +3384 1 23 38 0.16384000000000000000e5 +3384 1 24 55 -0.32768000000000000000e5 +3384 1 26 41 -0.32768000000000000000e5 +3384 1 28 43 0.13107200000000000000e6 +3384 1 32 47 0.13107200000000000000e6 +3384 1 33 48 -0.65536000000000000000e5 +3384 1 40 55 0.32768000000000000000e5 +3384 1 41 56 0.32768000000000000000e5 +3384 2 2 32 0.16384000000000000000e5 +3384 2 4 34 -0.32768000000000000000e5 +3384 2 16 30 0.32768000000000000000e5 +3384 2 20 34 0.65536000000000000000e5 +3384 2 28 34 0.32768000000000000000e5 +3384 3 5 50 -0.32768000000000000000e5 +3384 3 9 38 0.32768000000000000000e5 +3384 3 10 55 -0.65536000000000000000e5 +3384 3 22 35 0.13107200000000000000e6 +3384 3 22 51 0.32768000000000000000e5 +3384 3 23 52 -0.65536000000000000000e5 +3384 3 27 40 -0.32768000000000000000e5 +3384 3 27 56 0.32768000000000000000e5 +3384 3 28 41 0.13107200000000000000e6 +3384 3 28 55 0.65536000000000000000e5 +3384 3 35 48 0.13107200000000000000e6 +3384 3 38 51 -0.32768000000000000000e5 +3384 3 40 45 -0.65536000000000000000e5 +3384 4 2 30 0.32768000000000000000e5 +3384 4 6 34 0.65536000000000000000e5 +3384 4 7 35 0.32768000000000000000e5 +3384 4 22 34 -0.65536000000000000000e5 +3384 4 29 33 -0.32768000000000000000e5 +3385 3 28 56 0.65536000000000000000e5 +3385 3 41 54 -0.65536000000000000000e5 +3386 1 11 42 -0.32768000000000000000e5 +3386 1 33 48 0.32768000000000000000e5 +3386 3 29 29 0.65536000000000000000e5 +3386 3 29 42 0.32768000000000000000e5 +3387 1 26 33 -0.65536000000000000000e5 +3387 1 33 40 0.65536000000000000000e5 +3387 3 29 30 0.65536000000000000000e5 +3388 3 13 42 -0.65536000000000000000e5 +3388 3 29 31 0.65536000000000000000e5 +3389 1 14 45 -0.13107200000000000000e6 +3389 1 17 48 0.65536000000000000000e5 +3389 1 18 49 0.65536000000000000000e5 +3389 1 34 49 0.65536000000000000000e5 +3389 2 14 28 0.65536000000000000000e5 +3389 3 13 42 0.65536000000000000000e5 +3389 3 14 43 0.65536000000000000000e5 +3389 3 18 47 0.65536000000000000000e5 +3389 3 29 32 0.65536000000000000000e5 +3390 3 14 43 -0.65536000000000000000e5 +3390 3 29 33 0.65536000000000000000e5 +3391 1 14 45 0.65536000000000000000e5 +3391 1 17 48 -0.32768000000000000000e5 +3391 1 18 49 -0.32768000000000000000e5 +3391 1 34 49 -0.32768000000000000000e5 +3391 2 14 28 -0.32768000000000000000e5 +3391 3 14 43 -0.32768000000000000000e5 +3391 3 15 44 0.65536000000000000000e5 +3391 3 16 45 -0.13107200000000000000e6 +3391 3 18 47 -0.32768000000000000000e5 +3391 3 22 35 0.32768000000000000000e5 +3391 3 29 34 0.65536000000000000000e5 +3391 4 14 26 0.32768000000000000000e5 +3391 4 15 27 0.65536000000000000000e5 +3392 3 15 44 -0.65536000000000000000e5 +3392 3 29 35 0.65536000000000000000e5 +3393 1 15 46 -0.65536000000000000000e5 +3393 1 20 51 0.65536000000000000000e5 +3393 3 29 36 0.65536000000000000000e5 +3394 1 6 53 -0.32768000000000000000e5 +3394 1 25 40 0.32768000000000000000e5 +3394 3 24 37 -0.32768000000000000000e5 +3394 3 27 40 -0.65536000000000000000e5 +3394 3 29 37 0.65536000000000000000e5 +3394 4 4 32 0.32768000000000000000e5 +3394 4 16 28 -0.32768000000000000000e5 +3395 3 27 40 -0.65536000000000000000e5 +3395 3 29 38 0.65536000000000000000e5 +3396 3 5 50 -0.65536000000000000000e5 +3396 3 29 39 0.65536000000000000000e5 +3397 3 5 50 0.65536000000000000000e5 +3397 3 27 40 0.65536000000000000000e5 +3397 3 29 40 0.65536000000000000000e5 +3397 3 29 42 -0.13107200000000000000e6 +3397 4 18 30 0.65536000000000000000e5 +3398 1 6 53 -0.16384000000000000000e5 +3398 1 25 40 0.16384000000000000000e5 +3398 2 4 34 -0.32768000000000000000e5 +3398 2 21 35 0.32768000000000000000e5 +3398 3 5 50 -0.32768000000000000000e5 +3398 3 24 37 -0.16384000000000000000e5 +3398 3 27 40 -0.65536000000000000000e5 +3398 3 29 41 0.65536000000000000000e5 +3398 4 4 32 0.16384000000000000000e5 +3398 4 7 35 0.32768000000000000000e5 +3398 4 16 28 -0.16384000000000000000e5 +3399 3 14 51 -0.13107200000000000000e6 +3399 3 29 42 0.65536000000000000000e5 +3399 3 29 43 0.65536000000000000000e5 +3399 3 30 43 0.65536000000000000000e5 +3399 4 19 31 0.65536000000000000000e5 +3400 3 18 47 -0.65536000000000000000e5 +3400 3 29 44 0.65536000000000000000e5 +3401 3 14 51 -0.65536000000000000000e5 +3401 3 29 45 0.65536000000000000000e5 +3402 3 29 46 0.65536000000000000000e5 +3402 3 32 45 -0.65536000000000000000e5 +3403 1 24 55 0.65536000000000000000e5 +3403 1 26 41 -0.65536000000000000000e5 +3403 3 27 40 0.65536000000000000000e5 +3403 3 29 47 0.65536000000000000000e5 +3404 1 24 55 -0.65536000000000000000e5 +3404 1 26 41 0.65536000000000000000e5 +3404 3 22 51 0.65536000000000000000e5 +3404 3 23 52 -0.13107200000000000000e6 +3404 3 27 40 -0.65536000000000000000e5 +3404 3 29 48 0.65536000000000000000e5 +3404 4 7 35 0.65536000000000000000e5 +3405 3 10 55 0.13107200000000000000e6 +3405 3 22 51 -0.65536000000000000000e5 +3405 3 23 52 0.13107200000000000000e6 +3405 3 29 49 0.65536000000000000000e5 +3405 3 35 48 -0.26214400000000000000e6 +3405 3 40 45 0.13107200000000000000e6 +3405 4 7 35 -0.65536000000000000000e5 +3405 4 21 33 0.65536000000000000000e5 +3405 4 22 34 0.13107200000000000000e6 +3406 3 10 55 0.65536000000000000000e5 +3406 3 29 50 0.65536000000000000000e5 +3406 3 35 48 -0.13107200000000000000e6 +3406 3 40 45 0.65536000000000000000e5 +3406 4 22 34 0.65536000000000000000e5 +3407 3 10 55 -0.65536000000000000000e5 +3407 3 29 51 0.65536000000000000000e5 +3408 3 29 52 0.65536000000000000000e5 +3408 3 35 48 -0.65536000000000000000e5 +3409 3 29 53 0.65536000000000000000e5 +3409 3 38 51 -0.65536000000000000000e5 +3410 1 1 48 0.32768000000000000000e5 +3410 1 2 49 0.32768000000000000000e5 +3410 1 8 39 0.65536000000000000000e5 +3410 1 9 40 0.65536000000000000000e5 +3410 1 10 41 -0.13107200000000000000e6 +3410 1 12 43 -0.26214400000000000000e6 +3410 1 23 38 0.32768000000000000000e5 +3410 1 26 41 -0.65536000000000000000e5 +3410 1 28 43 0.26214400000000000000e6 +3410 1 32 47 0.26214400000000000000e6 +3410 1 33 48 -0.13107200000000000000e6 +3410 1 40 55 0.65536000000000000000e5 +3410 2 2 32 0.32768000000000000000e5 +3410 2 4 34 -0.65536000000000000000e5 +3410 2 16 30 0.65536000000000000000e5 +3410 2 20 34 0.13107200000000000000e6 +3410 2 28 34 0.65536000000000000000e5 +3410 3 5 50 -0.65536000000000000000e5 +3410 3 9 38 0.65536000000000000000e5 +3410 3 10 55 -0.13107200000000000000e6 +3410 3 22 35 0.26214400000000000000e6 +3410 3 22 51 0.65536000000000000000e5 +3410 3 23 52 -0.13107200000000000000e6 +3410 3 27 40 -0.65536000000000000000e5 +3410 3 28 41 0.26214400000000000000e6 +3410 3 29 54 0.65536000000000000000e5 +3410 3 35 48 0.26214400000000000000e6 +3410 3 40 45 -0.13107200000000000000e6 +3410 4 2 30 0.65536000000000000000e5 +3410 4 6 34 0.13107200000000000000e6 +3410 4 7 35 0.65536000000000000000e5 +3410 4 22 34 -0.13107200000000000000e6 +3411 3 29 55 0.65536000000000000000e5 +3411 3 39 52 -0.65536000000000000000e5 +3412 3 29 56 0.65536000000000000000e5 +3412 3 49 50 -0.65536000000000000000e5 +3413 1 11 42 0.32768000000000000000e5 +3413 1 26 33 0.32768000000000000000e5 +3413 1 33 40 -0.32768000000000000000e5 +3413 1 33 48 -0.32768000000000000000e5 +3413 3 14 43 -0.65536000000000000000e5 +3413 3 29 42 -0.32768000000000000000e5 +3413 3 30 30 0.65536000000000000000e5 +3413 4 22 22 0.65536000000000000000e5 +3414 1 14 45 -0.13107200000000000000e6 +3414 1 17 48 0.65536000000000000000e5 +3414 1 18 49 0.65536000000000000000e5 +3414 1 34 49 0.65536000000000000000e5 +3414 2 14 28 0.65536000000000000000e5 +3414 3 13 42 0.65536000000000000000e5 +3414 3 14 43 0.65536000000000000000e5 +3414 3 18 47 0.65536000000000000000e5 +3414 3 30 31 0.65536000000000000000e5 +3415 3 14 43 -0.65536000000000000000e5 +3415 3 30 32 0.65536000000000000000e5 +3416 3 26 35 -0.65536000000000000000e5 +3416 3 30 33 0.65536000000000000000e5 +3417 3 15 44 -0.65536000000000000000e5 +3417 3 30 34 0.65536000000000000000e5 +3418 3 15 46 -0.65536000000000000000e5 +3418 3 30 36 0.65536000000000000000e5 +3419 3 27 40 -0.65536000000000000000e5 +3419 3 30 37 0.65536000000000000000e5 +3420 3 5 50 -0.65536000000000000000e5 +3420 3 30 38 0.65536000000000000000e5 +3421 3 5 50 0.65536000000000000000e5 +3421 3 27 40 0.65536000000000000000e5 +3421 3 29 42 -0.13107200000000000000e6 +3421 3 30 39 0.65536000000000000000e5 +3421 4 18 30 0.65536000000000000000e5 +3422 3 6 51 -0.65536000000000000000e5 +3422 3 30 40 0.65536000000000000000e5 +3423 3 29 42 -0.65536000000000000000e5 +3423 3 30 41 0.65536000000000000000e5 +3424 3 14 51 -0.13107200000000000000e6 +3424 3 29 42 0.65536000000000000000e5 +3424 3 30 42 0.65536000000000000000e5 +3424 3 30 43 0.65536000000000000000e5 +3424 4 19 31 0.65536000000000000000e5 +3425 3 14 51 -0.65536000000000000000e5 +3425 3 30 44 0.65536000000000000000e5 +3426 3 30 45 0.65536000000000000000e5 +3426 3 35 40 -0.65536000000000000000e5 +3427 3 20 49 -0.65536000000000000000e5 +3427 3 30 46 0.65536000000000000000e5 +3428 1 24 55 -0.65536000000000000000e5 +3428 1 26 41 0.65536000000000000000e5 +3428 3 22 51 0.65536000000000000000e5 +3428 3 23 52 -0.13107200000000000000e6 +3428 3 27 40 -0.65536000000000000000e5 +3428 3 30 47 0.65536000000000000000e5 +3428 4 7 35 0.65536000000000000000e5 +3429 3 10 55 0.13107200000000000000e6 +3429 3 22 51 -0.65536000000000000000e5 +3429 3 23 52 0.13107200000000000000e6 +3429 3 30 48 0.65536000000000000000e5 +3429 3 35 48 -0.26214400000000000000e6 +3429 3 40 45 0.13107200000000000000e6 +3429 4 7 35 -0.65536000000000000000e5 +3429 4 21 33 0.65536000000000000000e5 +3429 4 22 34 0.13107200000000000000e6 +3430 3 6 55 -0.65536000000000000000e5 +3430 3 30 49 0.65536000000000000000e5 +3431 3 10 55 -0.65536000000000000000e5 +3431 3 30 50 0.65536000000000000000e5 +3432 3 30 51 0.65536000000000000000e5 +3432 3 40 45 -0.65536000000000000000e5 +3433 1 11 18 -0.13107200000000000000e6 +3433 1 34 49 0.65536000000000000000e5 +3433 1 44 51 -0.65536000000000000000e5 +3433 1 45 52 0.13107200000000000000e6 +3433 3 6 19 0.13107200000000000000e6 +3433 3 15 44 0.13107200000000000000e6 +3433 3 17 30 0.13107200000000000000e6 +3433 3 30 52 0.65536000000000000000e5 +3433 3 32 45 0.13107200000000000000e6 +3433 3 35 48 0.65536000000000000000e5 +3433 4 25 33 0.65536000000000000000e5 +3434 1 1 48 0.32768000000000000000e5 +3434 1 2 49 0.32768000000000000000e5 +3434 1 8 39 0.65536000000000000000e5 +3434 1 9 40 0.65536000000000000000e5 +3434 1 10 41 -0.13107200000000000000e6 +3434 1 12 43 -0.26214400000000000000e6 +3434 1 23 38 0.32768000000000000000e5 +3434 1 26 41 -0.65536000000000000000e5 +3434 1 28 43 0.26214400000000000000e6 +3434 1 32 47 0.26214400000000000000e6 +3434 1 33 48 -0.13107200000000000000e6 +3434 1 40 55 0.65536000000000000000e5 +3434 2 2 32 0.32768000000000000000e5 +3434 2 4 34 -0.65536000000000000000e5 +3434 2 16 30 0.65536000000000000000e5 +3434 2 20 34 0.13107200000000000000e6 +3434 2 28 34 0.65536000000000000000e5 +3434 3 5 50 -0.65536000000000000000e5 +3434 3 9 38 0.65536000000000000000e5 +3434 3 10 55 -0.13107200000000000000e6 +3434 3 22 35 0.26214400000000000000e6 +3434 3 22 51 0.65536000000000000000e5 +3434 3 23 52 -0.13107200000000000000e6 +3434 3 27 40 -0.65536000000000000000e5 +3434 3 28 41 0.26214400000000000000e6 +3434 3 30 53 0.65536000000000000000e5 +3434 3 35 48 0.26214400000000000000e6 +3434 3 40 45 -0.13107200000000000000e6 +3434 4 2 30 0.65536000000000000000e5 +3434 4 6 34 0.13107200000000000000e6 +3434 4 7 35 0.65536000000000000000e5 +3434 4 22 34 -0.13107200000000000000e6 +3435 3 26 55 -0.65536000000000000000e5 +3435 3 30 54 0.65536000000000000000e5 +3436 1 1 48 -0.16384000000000000000e5 +3436 1 2 49 -0.16384000000000000000e5 +3436 1 8 39 -0.32768000000000000000e5 +3436 1 9 40 -0.32768000000000000000e5 +3436 1 10 41 0.65536000000000000000e5 +3436 1 12 43 0.13107200000000000000e6 +3436 1 23 38 -0.16384000000000000000e5 +3436 1 24 55 0.32768000000000000000e5 +3436 1 26 41 0.32768000000000000000e5 +3436 1 28 43 -0.13107200000000000000e6 +3436 1 32 47 -0.13107200000000000000e6 +3436 1 33 48 0.65536000000000000000e5 +3436 1 40 55 -0.32768000000000000000e5 +3436 1 41 56 -0.32768000000000000000e5 +3436 2 2 32 -0.16384000000000000000e5 +3436 2 4 34 0.32768000000000000000e5 +3436 2 16 30 -0.32768000000000000000e5 +3436 2 20 34 -0.65536000000000000000e5 +3436 2 28 34 -0.32768000000000000000e5 +3436 3 5 50 0.32768000000000000000e5 +3436 3 9 38 -0.32768000000000000000e5 +3436 3 10 55 0.65536000000000000000e5 +3436 3 22 35 -0.13107200000000000000e6 +3436 3 22 51 -0.32768000000000000000e5 +3436 3 23 52 0.65536000000000000000e5 +3436 3 27 40 0.32768000000000000000e5 +3436 3 27 56 -0.32768000000000000000e5 +3436 3 28 41 -0.13107200000000000000e6 +3436 3 30 55 0.65536000000000000000e5 +3436 3 35 48 -0.13107200000000000000e6 +3436 3 38 51 0.32768000000000000000e5 +3436 3 39 52 0.65536000000000000000e5 +3436 3 40 45 0.65536000000000000000e5 +3436 3 45 50 -0.13107200000000000000e6 +3436 4 2 30 -0.32768000000000000000e5 +3436 4 6 34 -0.65536000000000000000e5 +3436 4 7 35 -0.32768000000000000000e5 +3436 4 22 34 0.65536000000000000000e5 +3436 4 29 33 0.32768000000000000000e5 +3436 4 30 34 0.65536000000000000000e5 +3437 3 30 56 0.65536000000000000000e5 +3437 3 40 55 -0.65536000000000000000e5 +3438 1 13 44 -0.32768000000000000000e5 +3438 1 34 41 0.32768000000000000000e5 +3438 3 31 31 0.65536000000000000000e5 +3439 1 14 45 -0.65536000000000000000e5 +3439 1 17 48 0.32768000000000000000e5 +3439 1 18 49 0.32768000000000000000e5 +3439 1 34 49 0.32768000000000000000e5 +3439 2 14 28 0.32768000000000000000e5 +3439 3 14 43 0.32768000000000000000e5 +3439 3 18 47 0.32768000000000000000e5 +3439 3 22 35 -0.32768000000000000000e5 +3439 3 31 32 0.65536000000000000000e5 +3439 4 14 26 -0.32768000000000000000e5 +3440 1 14 45 0.65536000000000000000e5 +3440 1 17 48 -0.32768000000000000000e5 +3440 1 18 49 -0.32768000000000000000e5 +3440 1 34 49 -0.32768000000000000000e5 +3440 2 14 28 -0.32768000000000000000e5 +3440 3 14 43 -0.32768000000000000000e5 +3440 3 15 44 0.65536000000000000000e5 +3440 3 16 45 -0.13107200000000000000e6 +3440 3 18 47 -0.32768000000000000000e5 +3440 3 22 35 0.32768000000000000000e5 +3440 3 31 33 0.65536000000000000000e5 +3440 4 14 26 0.32768000000000000000e5 +3440 4 15 27 0.65536000000000000000e5 +3441 1 3 18 -0.16384000000000000000e5 +3441 1 4 19 0.32768000000000000000e5 +3441 1 5 36 0.32768000000000000000e5 +3441 1 12 43 0.16384000000000000000e5 +3441 1 13 44 -0.32768000000000000000e5 +3441 1 14 45 -0.32768000000000000000e5 +3441 1 17 32 -0.65536000000000000000e5 +3441 1 19 50 0.65536000000000000000e5 +3441 3 3 16 -0.16384000000000000000e5 +3441 3 4 17 -0.16384000000000000000e5 +3441 3 14 27 0.16384000000000000000e5 +3441 3 16 29 0.32768000000000000000e5 +3441 3 31 34 0.65536000000000000000e5 +3441 4 2 14 -0.16384000000000000000e5 +3441 4 11 23 0.32768000000000000000e5 +3442 3 16 45 -0.65536000000000000000e5 +3442 3 31 35 0.65536000000000000000e5 +3443 1 6 21 -0.32768000000000000000e5 +3443 1 17 32 -0.32768000000000000000e5 +3443 1 19 50 0.32768000000000000000e5 +3443 1 20 51 0.32768000000000000000e5 +3443 2 9 15 -0.32768000000000000000e5 +3443 2 25 31 0.32768000000000000000e5 +3443 3 7 20 0.32768000000000000000e5 +3443 3 8 21 -0.65536000000000000000e5 +3443 3 14 19 0.65536000000000000000e5 +3443 3 16 45 -0.32768000000000000000e5 +3443 3 18 31 -0.32768000000000000000e5 +3443 3 19 32 0.65536000000000000000e5 +3443 3 31 36 0.65536000000000000000e5 +3443 4 10 14 0.32768000000000000000e5 +3444 1 6 53 0.16384000000000000000e5 +3444 1 25 40 -0.16384000000000000000e5 +3444 2 4 34 0.32768000000000000000e5 +3444 2 21 35 -0.32768000000000000000e5 +3444 3 5 50 0.32768000000000000000e5 +3444 3 7 52 -0.13107200000000000000e6 +3444 3 24 37 0.16384000000000000000e5 +3444 3 27 40 0.65536000000000000000e5 +3444 3 28 41 0.65536000000000000000e5 +3444 3 31 37 0.65536000000000000000e5 +3444 4 4 32 -0.16384000000000000000e5 +3444 4 6 34 0.65536000000000000000e5 +3444 4 7 35 -0.32768000000000000000e5 +3444 4 16 28 0.16384000000000000000e5 +3445 3 28 41 -0.65536000000000000000e5 +3445 3 31 38 0.65536000000000000000e5 +3446 1 6 53 -0.16384000000000000000e5 +3446 1 25 40 0.16384000000000000000e5 +3446 2 4 34 -0.32768000000000000000e5 +3446 2 21 35 0.32768000000000000000e5 +3446 3 5 50 -0.32768000000000000000e5 +3446 3 24 37 -0.16384000000000000000e5 +3446 3 27 40 -0.65536000000000000000e5 +3446 3 31 39 0.65536000000000000000e5 +3446 4 4 32 0.16384000000000000000e5 +3446 4 7 35 0.32768000000000000000e5 +3446 4 16 28 -0.16384000000000000000e5 +3447 3 29 42 -0.65536000000000000000e5 +3447 3 31 40 0.65536000000000000000e5 +3448 3 7 52 -0.65536000000000000000e5 +3448 3 31 41 0.65536000000000000000e5 +3449 1 6 53 -0.81920000000000000000e4 +3449 1 25 40 0.81920000000000000000e4 +3449 2 4 34 -0.16384000000000000000e5 +3449 2 21 35 0.16384000000000000000e5 +3449 3 5 50 -0.16384000000000000000e5 +3449 3 24 37 -0.81920000000000000000e4 +3449 3 27 40 -0.32768000000000000000e5 +3449 3 28 41 -0.32768000000000000000e5 +3449 3 29 42 -0.32768000000000000000e5 +3449 3 31 42 0.65536000000000000000e5 +3449 4 4 32 0.81920000000000000000e4 +3449 4 7 35 0.16384000000000000000e5 +3449 4 16 28 -0.81920000000000000000e4 +3449 4 23 27 -0.32768000000000000000e5 +3450 3 18 47 -0.65536000000000000000e5 +3450 3 31 43 0.65536000000000000000e5 +3451 3 19 48 -0.65536000000000000000e5 +3451 3 31 45 0.65536000000000000000e5 +3452 3 31 46 0.65536000000000000000e5 +3452 3 36 41 -0.65536000000000000000e5 +3453 1 32 47 -0.65536000000000000000e5 +3453 1 37 52 0.65536000000000000000e5 +3453 3 31 47 0.65536000000000000000e5 +3454 3 23 52 -0.65536000000000000000e5 +3454 3 31 48 0.65536000000000000000e5 +3455 3 10 55 0.65536000000000000000e5 +3455 3 31 49 0.65536000000000000000e5 +3455 3 35 48 -0.13107200000000000000e6 +3455 3 40 45 0.65536000000000000000e5 +3455 4 22 34 0.65536000000000000000e5 +3456 3 31 50 0.65536000000000000000e5 +3456 3 34 47 -0.65536000000000000000e5 +3457 1 34 49 -0.65536000000000000000e5 +3457 1 44 51 0.65536000000000000000e5 +3457 3 31 51 0.65536000000000000000e5 +3458 3 31 52 0.65536000000000000000e5 +3458 3 41 46 -0.65536000000000000000e5 +3459 1 1 48 -0.16384000000000000000e5 +3459 1 2 49 -0.16384000000000000000e5 +3459 1 8 39 -0.32768000000000000000e5 +3459 1 9 40 -0.32768000000000000000e5 +3459 1 10 41 0.65536000000000000000e5 +3459 1 12 43 0.13107200000000000000e6 +3459 1 23 38 -0.16384000000000000000e5 +3459 1 24 55 0.32768000000000000000e5 +3459 1 26 41 0.32768000000000000000e5 +3459 1 28 43 -0.13107200000000000000e6 +3459 1 32 47 -0.13107200000000000000e6 +3459 1 33 48 0.65536000000000000000e5 +3459 1 40 55 -0.32768000000000000000e5 +3459 1 41 56 -0.32768000000000000000e5 +3459 1 44 51 -0.13107200000000000000e6 +3459 1 46 53 0.13107200000000000000e6 +3459 2 2 32 -0.16384000000000000000e5 +3459 2 4 34 0.32768000000000000000e5 +3459 2 16 30 -0.32768000000000000000e5 +3459 2 20 34 -0.65536000000000000000e5 +3459 2 28 34 -0.32768000000000000000e5 +3459 3 5 50 0.32768000000000000000e5 +3459 3 9 38 -0.32768000000000000000e5 +3459 3 10 55 0.65536000000000000000e5 +3459 3 22 35 -0.13107200000000000000e6 +3459 3 22 51 -0.32768000000000000000e5 +3459 3 23 52 0.65536000000000000000e5 +3459 3 27 40 0.32768000000000000000e5 +3459 3 27 56 -0.32768000000000000000e5 +3459 3 28 41 -0.13107200000000000000e6 +3459 3 31 53 0.65536000000000000000e5 +3459 3 35 48 -0.13107200000000000000e6 +3459 3 38 51 0.32768000000000000000e5 +3459 3 39 52 0.65536000000000000000e5 +3459 3 40 45 0.65536000000000000000e5 +3459 4 2 30 -0.32768000000000000000e5 +3459 4 6 34 -0.65536000000000000000e5 +3459 4 7 35 -0.32768000000000000000e5 +3459 4 22 34 0.65536000000000000000e5 +3459 4 23 35 0.65536000000000000000e5 +3459 4 29 33 0.32768000000000000000e5 +3460 1 1 48 0.16384000000000000000e5 +3460 1 2 49 0.16384000000000000000e5 +3460 1 8 39 0.32768000000000000000e5 +3460 1 9 40 0.32768000000000000000e5 +3460 1 10 41 -0.65536000000000000000e5 +3460 1 12 43 -0.13107200000000000000e6 +3460 1 23 38 0.16384000000000000000e5 +3460 1 24 55 -0.32768000000000000000e5 +3460 1 26 41 -0.32768000000000000000e5 +3460 1 28 43 0.13107200000000000000e6 +3460 1 32 47 0.13107200000000000000e6 +3460 1 33 48 -0.65536000000000000000e5 +3460 1 40 55 0.32768000000000000000e5 +3460 1 41 56 0.32768000000000000000e5 +3460 2 2 32 0.16384000000000000000e5 +3460 2 4 34 -0.32768000000000000000e5 +3460 2 16 30 0.32768000000000000000e5 +3460 2 20 34 0.65536000000000000000e5 +3460 2 28 34 0.32768000000000000000e5 +3460 3 5 50 -0.32768000000000000000e5 +3460 3 9 38 0.32768000000000000000e5 +3460 3 10 55 -0.65536000000000000000e5 +3460 3 22 35 0.13107200000000000000e6 +3460 3 22 51 0.32768000000000000000e5 +3460 3 23 52 -0.65536000000000000000e5 +3460 3 27 40 -0.32768000000000000000e5 +3460 3 27 56 0.32768000000000000000e5 +3460 3 28 41 0.13107200000000000000e6 +3460 3 31 54 0.65536000000000000000e5 +3460 3 35 48 0.13107200000000000000e6 +3460 3 38 51 -0.32768000000000000000e5 +3460 3 40 45 -0.65536000000000000000e5 +3460 4 2 30 0.32768000000000000000e5 +3460 4 6 34 0.65536000000000000000e5 +3460 4 7 35 0.32768000000000000000e5 +3460 4 22 34 -0.65536000000000000000e5 +3460 4 29 33 -0.32768000000000000000e5 +3461 1 44 51 -0.65536000000000000000e5 +3461 1 46 53 0.65536000000000000000e5 +3461 3 31 55 0.65536000000000000000e5 +3462 3 31 56 0.65536000000000000000e5 +3462 3 47 52 -0.65536000000000000000e5 +3463 1 14 45 0.32768000000000000000e5 +3463 1 17 48 -0.16384000000000000000e5 +3463 1 18 49 -0.16384000000000000000e5 +3463 1 34 49 -0.16384000000000000000e5 +3463 2 14 28 -0.16384000000000000000e5 +3463 3 14 43 -0.16384000000000000000e5 +3463 3 15 44 0.32768000000000000000e5 +3463 3 16 45 -0.65536000000000000000e5 +3463 3 18 47 -0.16384000000000000000e5 +3463 3 22 35 0.16384000000000000000e5 +3463 3 32 32 0.65536000000000000000e5 +3463 4 14 26 0.16384000000000000000e5 +3463 4 15 27 0.32768000000000000000e5 +3464 3 15 44 -0.65536000000000000000e5 +3464 3 32 33 0.65536000000000000000e5 +3465 3 16 45 -0.65536000000000000000e5 +3465 3 32 34 0.65536000000000000000e5 +3466 1 15 46 -0.65536000000000000000e5 +3466 1 20 51 0.65536000000000000000e5 +3466 3 32 35 0.65536000000000000000e5 +3467 3 17 46 -0.65536000000000000000e5 +3467 3 32 36 0.65536000000000000000e5 +3468 3 28 41 -0.65536000000000000000e5 +3468 3 32 37 0.65536000000000000000e5 +3469 1 6 53 -0.16384000000000000000e5 +3469 1 25 40 0.16384000000000000000e5 +3469 2 4 34 -0.32768000000000000000e5 +3469 2 21 35 0.32768000000000000000e5 +3469 3 5 50 -0.32768000000000000000e5 +3469 3 24 37 -0.16384000000000000000e5 +3469 3 27 40 -0.65536000000000000000e5 +3469 3 32 38 0.65536000000000000000e5 +3469 4 4 32 0.16384000000000000000e5 +3469 4 7 35 0.32768000000000000000e5 +3469 4 16 28 -0.16384000000000000000e5 +3470 3 29 42 -0.65536000000000000000e5 +3470 3 32 39 0.65536000000000000000e5 +3471 3 14 51 -0.13107200000000000000e6 +3471 3 29 42 0.65536000000000000000e5 +3471 3 30 43 0.65536000000000000000e5 +3471 3 32 40 0.65536000000000000000e5 +3471 4 19 31 0.65536000000000000000e5 +3472 1 6 53 -0.81920000000000000000e4 +3472 1 25 40 0.81920000000000000000e4 +3472 2 4 34 -0.16384000000000000000e5 +3472 2 21 35 0.16384000000000000000e5 +3472 3 5 50 -0.16384000000000000000e5 +3472 3 24 37 -0.81920000000000000000e4 +3472 3 27 40 -0.32768000000000000000e5 +3472 3 28 41 -0.32768000000000000000e5 +3472 3 29 42 -0.32768000000000000000e5 +3472 3 32 41 0.65536000000000000000e5 +3472 4 4 32 0.81920000000000000000e4 +3472 4 7 35 0.16384000000000000000e5 +3472 4 16 28 -0.81920000000000000000e4 +3472 4 23 27 -0.32768000000000000000e5 +3473 3 18 47 -0.65536000000000000000e5 +3473 3 32 42 0.65536000000000000000e5 +3474 3 14 51 -0.65536000000000000000e5 +3474 3 32 43 0.65536000000000000000e5 +3475 3 19 48 -0.65536000000000000000e5 +3475 3 32 44 0.65536000000000000000e5 +3476 1 20 51 -0.65536000000000000000e5 +3476 1 36 51 0.65536000000000000000e5 +3476 3 32 46 0.65536000000000000000e5 +3477 3 23 52 -0.65536000000000000000e5 +3477 3 32 47 0.65536000000000000000e5 +3478 3 10 55 0.65536000000000000000e5 +3478 3 32 48 0.65536000000000000000e5 +3478 3 35 48 -0.13107200000000000000e6 +3478 3 40 45 0.65536000000000000000e5 +3478 4 22 34 0.65536000000000000000e5 +3479 3 10 55 -0.65536000000000000000e5 +3479 3 32 49 0.65536000000000000000e5 +3480 1 34 49 -0.65536000000000000000e5 +3480 1 44 51 0.65536000000000000000e5 +3480 3 32 50 0.65536000000000000000e5 +3481 3 32 51 0.65536000000000000000e5 +3481 3 35 48 -0.65536000000000000000e5 +3482 1 11 18 -0.65536000000000000000e5 +3482 1 45 52 0.65536000000000000000e5 +3482 3 6 19 0.65536000000000000000e5 +3482 3 15 44 0.65536000000000000000e5 +3482 3 17 30 0.65536000000000000000e5 +3482 3 32 45 0.65536000000000000000e5 +3482 3 32 52 0.65536000000000000000e5 +3483 1 1 48 0.16384000000000000000e5 +3483 1 2 49 0.16384000000000000000e5 +3483 1 8 39 0.32768000000000000000e5 +3483 1 9 40 0.32768000000000000000e5 +3483 1 10 41 -0.65536000000000000000e5 +3483 1 12 43 -0.13107200000000000000e6 +3483 1 23 38 0.16384000000000000000e5 +3483 1 24 55 -0.32768000000000000000e5 +3483 1 26 41 -0.32768000000000000000e5 +3483 1 28 43 0.13107200000000000000e6 +3483 1 32 47 0.13107200000000000000e6 +3483 1 33 48 -0.65536000000000000000e5 +3483 1 40 55 0.32768000000000000000e5 +3483 1 41 56 0.32768000000000000000e5 +3483 2 2 32 0.16384000000000000000e5 +3483 2 4 34 -0.32768000000000000000e5 +3483 2 16 30 0.32768000000000000000e5 +3483 2 20 34 0.65536000000000000000e5 +3483 2 28 34 0.32768000000000000000e5 +3483 3 5 50 -0.32768000000000000000e5 +3483 3 9 38 0.32768000000000000000e5 +3483 3 10 55 -0.65536000000000000000e5 +3483 3 22 35 0.13107200000000000000e6 +3483 3 22 51 0.32768000000000000000e5 +3483 3 23 52 -0.65536000000000000000e5 +3483 3 27 40 -0.32768000000000000000e5 +3483 3 27 56 0.32768000000000000000e5 +3483 3 28 41 0.13107200000000000000e6 +3483 3 32 53 0.65536000000000000000e5 +3483 3 35 48 0.13107200000000000000e6 +3483 3 38 51 -0.32768000000000000000e5 +3483 3 40 45 -0.65536000000000000000e5 +3483 4 2 30 0.32768000000000000000e5 +3483 4 6 34 0.65536000000000000000e5 +3483 4 7 35 0.32768000000000000000e5 +3483 4 22 34 -0.65536000000000000000e5 +3483 4 29 33 -0.32768000000000000000e5 +3484 3 32 54 0.65536000000000000000e5 +3484 3 39 52 -0.65536000000000000000e5 +3485 3 32 55 0.65536000000000000000e5 +3485 3 45 50 -0.65536000000000000000e5 +3486 3 32 56 0.65536000000000000000e5 +3486 3 42 55 -0.65536000000000000000e5 +3487 3 30 35 -0.32768000000000000000e5 +3487 3 33 33 0.65536000000000000000e5 +3488 1 15 46 -0.65536000000000000000e5 +3488 1 20 51 0.65536000000000000000e5 +3488 3 33 34 0.65536000000000000000e5 +3489 3 15 46 -0.65536000000000000000e5 +3489 3 33 35 0.65536000000000000000e5 +3490 3 20 45 -0.65536000000000000000e5 +3490 3 33 36 0.65536000000000000000e5 +3491 1 6 53 -0.16384000000000000000e5 +3491 1 25 40 0.16384000000000000000e5 +3491 2 4 34 -0.32768000000000000000e5 +3491 2 21 35 0.32768000000000000000e5 +3491 3 5 50 -0.32768000000000000000e5 +3491 3 24 37 -0.16384000000000000000e5 +3491 3 27 40 -0.65536000000000000000e5 +3491 3 33 37 0.65536000000000000000e5 +3491 4 4 32 0.16384000000000000000e5 +3491 4 7 35 0.32768000000000000000e5 +3491 4 16 28 -0.16384000000000000000e5 +3492 3 29 42 -0.65536000000000000000e5 +3492 3 33 38 0.65536000000000000000e5 +3493 3 14 51 -0.13107200000000000000e6 +3493 3 29 42 0.65536000000000000000e5 +3493 3 30 43 0.65536000000000000000e5 +3493 3 33 39 0.65536000000000000000e5 +3493 4 19 31 0.65536000000000000000e5 +3494 3 30 43 -0.65536000000000000000e5 +3494 3 33 40 0.65536000000000000000e5 +3495 3 18 47 -0.65536000000000000000e5 +3495 3 33 41 0.65536000000000000000e5 +3496 3 14 51 -0.65536000000000000000e5 +3496 3 33 42 0.65536000000000000000e5 +3497 3 33 43 0.65536000000000000000e5 +3497 3 35 40 -0.65536000000000000000e5 +3498 3 32 45 -0.65536000000000000000e5 +3498 3 33 44 0.65536000000000000000e5 +3499 3 20 49 -0.65536000000000000000e5 +3499 3 33 45 0.65536000000000000000e5 +3500 3 10 55 0.65536000000000000000e5 +3500 3 33 47 0.65536000000000000000e5 +3500 3 35 48 -0.13107200000000000000e6 +3500 3 40 45 0.65536000000000000000e5 +3500 4 22 34 0.65536000000000000000e5 +3501 3 10 55 -0.65536000000000000000e5 +3501 3 33 48 0.65536000000000000000e5 +3502 3 33 49 0.65536000000000000000e5 +3502 3 40 45 -0.65536000000000000000e5 +3503 3 33 50 0.65536000000000000000e5 +3503 3 35 48 -0.65536000000000000000e5 +3504 1 11 18 -0.13107200000000000000e6 +3504 1 34 49 0.65536000000000000000e5 +3504 1 44 51 -0.65536000000000000000e5 +3504 1 45 52 0.13107200000000000000e6 +3504 3 6 19 0.13107200000000000000e6 +3504 3 15 44 0.13107200000000000000e6 +3504 3 17 30 0.13107200000000000000e6 +3504 3 32 45 0.13107200000000000000e6 +3504 3 33 51 0.65536000000000000000e5 +3504 3 35 48 0.65536000000000000000e5 +3504 4 25 33 0.65536000000000000000e5 +3505 3 33 52 0.65536000000000000000e5 +3505 3 36 49 -0.65536000000000000000e5 +3506 3 33 53 0.65536000000000000000e5 +3506 3 39 52 -0.65536000000000000000e5 +3507 1 1 48 -0.16384000000000000000e5 +3507 1 2 49 -0.16384000000000000000e5 +3507 1 8 39 -0.32768000000000000000e5 +3507 1 9 40 -0.32768000000000000000e5 +3507 1 10 41 0.65536000000000000000e5 +3507 1 12 43 0.13107200000000000000e6 +3507 1 23 38 -0.16384000000000000000e5 +3507 1 24 55 0.32768000000000000000e5 +3507 1 26 41 0.32768000000000000000e5 +3507 1 28 43 -0.13107200000000000000e6 +3507 1 32 47 -0.13107200000000000000e6 +3507 1 33 48 0.65536000000000000000e5 +3507 1 40 55 -0.32768000000000000000e5 +3507 1 41 56 -0.32768000000000000000e5 +3507 2 2 32 -0.16384000000000000000e5 +3507 2 4 34 0.32768000000000000000e5 +3507 2 16 30 -0.32768000000000000000e5 +3507 2 20 34 -0.65536000000000000000e5 +3507 2 28 34 -0.32768000000000000000e5 +3507 3 5 50 0.32768000000000000000e5 +3507 3 9 38 -0.32768000000000000000e5 +3507 3 10 55 0.65536000000000000000e5 +3507 3 22 35 -0.13107200000000000000e6 +3507 3 22 51 -0.32768000000000000000e5 +3507 3 23 52 0.65536000000000000000e5 +3507 3 27 40 0.32768000000000000000e5 +3507 3 27 56 -0.32768000000000000000e5 +3507 3 28 41 -0.13107200000000000000e6 +3507 3 33 54 0.65536000000000000000e5 +3507 3 35 48 -0.13107200000000000000e6 +3507 3 38 51 0.32768000000000000000e5 +3507 3 39 52 0.65536000000000000000e5 +3507 3 40 45 0.65536000000000000000e5 +3507 3 45 50 -0.13107200000000000000e6 +3507 4 2 30 -0.32768000000000000000e5 +3507 4 6 34 -0.65536000000000000000e5 +3507 4 7 35 -0.32768000000000000000e5 +3507 4 22 34 0.65536000000000000000e5 +3507 4 29 33 0.32768000000000000000e5 +3507 4 30 34 0.65536000000000000000e5 +3508 3 33 55 0.65536000000000000000e5 +3508 3 43 52 -0.65536000000000000000e5 +3509 1 18 49 -0.13107200000000000000e6 +3509 1 52 55 0.13107200000000000000e6 +3509 3 14 51 0.13107200000000000000e6 +3509 3 33 56 0.65536000000000000000e5 +3509 3 35 48 0.13107200000000000000e6 +3509 3 42 55 0.65536000000000000000e5 +3509 3 45 50 0.13107200000000000000e6 +3509 3 47 52 0.65536000000000000000e5 +3509 4 31 35 0.65536000000000000000e5 +3510 1 6 21 -0.16384000000000000000e5 +3510 1 17 32 -0.16384000000000000000e5 +3510 1 19 50 0.16384000000000000000e5 +3510 1 20 51 0.16384000000000000000e5 +3510 2 9 15 -0.16384000000000000000e5 +3510 2 25 31 0.16384000000000000000e5 +3510 3 7 20 0.16384000000000000000e5 +3510 3 8 21 -0.32768000000000000000e5 +3510 3 14 19 0.32768000000000000000e5 +3510 3 16 45 -0.16384000000000000000e5 +3510 3 18 31 -0.16384000000000000000e5 +3510 3 19 32 0.32768000000000000000e5 +3510 3 34 34 0.65536000000000000000e5 +3510 4 10 14 0.16384000000000000000e5 +3511 3 17 46 -0.65536000000000000000e5 +3511 3 34 35 0.65536000000000000000e5 +3512 1 6 21 -0.16384000000000000000e5 +3512 1 17 32 -0.16384000000000000000e5 +3512 1 19 50 0.16384000000000000000e5 +3512 1 20 51 0.16384000000000000000e5 +3512 2 9 15 -0.16384000000000000000e5 +3512 2 25 31 0.16384000000000000000e5 +3512 3 7 20 0.16384000000000000000e5 +3512 3 8 21 -0.32768000000000000000e5 +3512 3 14 19 0.32768000000000000000e5 +3512 3 16 45 -0.16384000000000000000e5 +3512 3 17 46 -0.32768000000000000000e5 +3512 3 18 31 -0.16384000000000000000e5 +3512 3 19 32 0.32768000000000000000e5 +3512 3 20 45 -0.32768000000000000000e5 +3512 3 34 36 0.65536000000000000000e5 +3512 4 10 14 0.16384000000000000000e5 +3512 4 25 25 -0.65536000000000000000e5 +3513 3 7 52 -0.65536000000000000000e5 +3513 3 34 37 0.65536000000000000000e5 +3514 1 6 53 -0.81920000000000000000e4 +3514 1 25 40 0.81920000000000000000e4 +3514 2 4 34 -0.16384000000000000000e5 +3514 2 21 35 0.16384000000000000000e5 +3514 3 5 50 -0.16384000000000000000e5 +3514 3 24 37 -0.81920000000000000000e4 +3514 3 27 40 -0.32768000000000000000e5 +3514 3 28 41 -0.32768000000000000000e5 +3514 3 29 42 -0.32768000000000000000e5 +3514 3 34 38 0.65536000000000000000e5 +3514 4 4 32 0.81920000000000000000e4 +3514 4 7 35 0.16384000000000000000e5 +3514 4 16 28 -0.81920000000000000000e4 +3514 4 23 27 -0.32768000000000000000e5 +3515 3 18 47 -0.65536000000000000000e5 +3515 3 34 39 0.65536000000000000000e5 +3516 3 14 51 -0.65536000000000000000e5 +3516 3 34 40 0.65536000000000000000e5 +3517 3 31 44 -0.65536000000000000000e5 +3517 3 34 41 0.65536000000000000000e5 +3518 3 19 48 -0.65536000000000000000e5 +3518 3 34 42 0.65536000000000000000e5 +3519 3 32 45 -0.65536000000000000000e5 +3519 3 34 43 0.65536000000000000000e5 +3520 3 34 44 0.65536000000000000000e5 +3520 3 36 41 -0.65536000000000000000e5 +3521 1 20 51 -0.65536000000000000000e5 +3521 1 36 51 0.65536000000000000000e5 +3521 3 34 45 0.65536000000000000000e5 +3522 3 21 50 -0.65536000000000000000e5 +3522 3 34 46 0.65536000000000000000e5 +3523 1 34 49 -0.65536000000000000000e5 +3523 1 44 51 0.65536000000000000000e5 +3523 3 34 48 0.65536000000000000000e5 +3524 3 34 49 0.65536000000000000000e5 +3524 3 35 48 -0.65536000000000000000e5 +3525 3 34 50 0.65536000000000000000e5 +3525 3 41 46 -0.65536000000000000000e5 +3526 1 11 18 -0.65536000000000000000e5 +3526 1 45 52 0.65536000000000000000e5 +3526 3 6 19 0.65536000000000000000e5 +3526 3 15 44 0.65536000000000000000e5 +3526 3 17 30 0.65536000000000000000e5 +3526 3 32 45 0.65536000000000000000e5 +3526 3 34 51 0.65536000000000000000e5 +3527 1 11 18 -0.32768000000000000000e5 +3527 1 45 52 0.32768000000000000000e5 +3527 3 6 19 0.32768000000000000000e5 +3527 3 15 44 0.32768000000000000000e5 +3527 3 17 30 0.32768000000000000000e5 +3527 3 32 45 0.32768000000000000000e5 +3527 3 34 52 0.65536000000000000000e5 +3527 3 36 49 -0.32768000000000000000e5 +3527 3 41 46 -0.32768000000000000000e5 +3527 4 15 35 -0.32768000000000000000e5 +3528 1 44 51 -0.65536000000000000000e5 +3528 1 46 53 0.65536000000000000000e5 +3528 3 34 53 0.65536000000000000000e5 +3529 3 34 54 0.65536000000000000000e5 +3529 3 45 50 -0.65536000000000000000e5 +3530 3 19 56 -0.65536000000000000000e5 +3530 3 34 55 0.65536000000000000000e5 +3531 1 18 49 -0.65536000000000000000e5 +3531 1 52 55 0.65536000000000000000e5 +3531 3 14 51 0.65536000000000000000e5 +3531 3 34 56 0.65536000000000000000e5 +3531 3 35 48 0.65536000000000000000e5 +3531 3 45 50 0.65536000000000000000e5 +3532 3 20 45 -0.32768000000000000000e5 +3532 3 35 35 0.65536000000000000000e5 +3533 1 6 53 -0.81920000000000000000e4 +3533 1 25 40 0.81920000000000000000e4 +3533 2 4 34 -0.16384000000000000000e5 +3533 2 21 35 0.16384000000000000000e5 +3533 3 5 50 -0.16384000000000000000e5 +3533 3 24 37 -0.81920000000000000000e4 +3533 3 27 40 -0.32768000000000000000e5 +3533 3 28 41 -0.32768000000000000000e5 +3533 3 29 42 -0.32768000000000000000e5 +3533 3 35 37 0.65536000000000000000e5 +3533 4 4 32 0.81920000000000000000e4 +3533 4 7 35 0.16384000000000000000e5 +3533 4 16 28 -0.81920000000000000000e4 +3533 4 23 27 -0.32768000000000000000e5 +3534 3 18 47 -0.65536000000000000000e5 +3534 3 35 38 0.65536000000000000000e5 +3535 3 14 51 -0.65536000000000000000e5 +3535 3 35 39 0.65536000000000000000e5 +3536 3 19 48 -0.65536000000000000000e5 +3536 3 35 41 0.65536000000000000000e5 +3537 3 32 45 -0.65536000000000000000e5 +3537 3 35 42 0.65536000000000000000e5 +3538 3 20 49 -0.65536000000000000000e5 +3538 3 35 43 0.65536000000000000000e5 +3539 1 20 51 -0.65536000000000000000e5 +3539 1 36 51 0.65536000000000000000e5 +3539 3 35 44 0.65536000000000000000e5 +3540 3 33 46 -0.65536000000000000000e5 +3540 3 35 45 0.65536000000000000000e5 +3541 3 35 46 0.65536000000000000000e5 +3541 3 36 45 -0.65536000000000000000e5 +3542 1 34 49 -0.65536000000000000000e5 +3542 1 44 51 0.65536000000000000000e5 +3542 3 35 47 0.65536000000000000000e5 +3543 1 11 18 -0.13107200000000000000e6 +3543 1 34 49 0.65536000000000000000e5 +3543 1 44 51 -0.65536000000000000000e5 +3543 1 45 52 0.13107200000000000000e6 +3543 3 6 19 0.13107200000000000000e6 +3543 3 15 44 0.13107200000000000000e6 +3543 3 17 30 0.13107200000000000000e6 +3543 3 32 45 0.13107200000000000000e6 +3543 3 35 48 0.65536000000000000000e5 +3543 3 35 49 0.65536000000000000000e5 +3543 4 25 33 0.65536000000000000000e5 +3544 1 11 18 -0.65536000000000000000e5 +3544 1 45 52 0.65536000000000000000e5 +3544 3 6 19 0.65536000000000000000e5 +3544 3 15 44 0.65536000000000000000e5 +3544 3 17 30 0.65536000000000000000e5 +3544 3 32 45 0.65536000000000000000e5 +3544 3 35 50 0.65536000000000000000e5 +3545 3 35 51 0.65536000000000000000e5 +3545 3 36 49 -0.65536000000000000000e5 +3546 3 35 52 0.65536000000000000000e5 +3546 3 45 46 -0.65536000000000000000e5 +3547 3 35 53 0.65536000000000000000e5 +3547 3 45 50 -0.65536000000000000000e5 +3548 3 35 54 0.65536000000000000000e5 +3548 3 43 52 -0.65536000000000000000e5 +3549 3 35 55 0.65536000000000000000e5 +3549 3 46 51 -0.65536000000000000000e5 +3550 3 21 46 -0.32768000000000000000e5 +3550 3 36 36 0.65536000000000000000e5 +3551 3 31 44 -0.65536000000000000000e5 +3551 3 36 37 0.65536000000000000000e5 +3552 3 19 48 -0.65536000000000000000e5 +3552 3 36 38 0.65536000000000000000e5 +3553 3 32 45 -0.65536000000000000000e5 +3553 3 36 39 0.65536000000000000000e5 +3554 3 20 49 -0.65536000000000000000e5 +3554 3 36 40 0.65536000000000000000e5 +3555 1 20 51 -0.65536000000000000000e5 +3555 1 36 51 0.65536000000000000000e5 +3555 3 36 42 0.65536000000000000000e5 +3556 3 33 46 -0.65536000000000000000e5 +3556 3 36 43 0.65536000000000000000e5 +3557 3 21 50 -0.65536000000000000000e5 +3557 3 36 44 0.65536000000000000000e5 +3558 3 21 52 -0.65536000000000000000e5 +3558 3 36 46 0.65536000000000000000e5 +3559 3 36 47 0.65536000000000000000e5 +3559 3 41 46 -0.65536000000000000000e5 +3560 1 11 18 -0.65536000000000000000e5 +3560 1 45 52 0.65536000000000000000e5 +3560 3 6 19 0.65536000000000000000e5 +3560 3 15 44 0.65536000000000000000e5 +3560 3 17 30 0.65536000000000000000e5 +3560 3 32 45 0.65536000000000000000e5 +3560 3 36 48 0.65536000000000000000e5 +3561 1 11 18 -0.32768000000000000000e5 +3561 1 45 52 0.32768000000000000000e5 +3561 3 6 19 0.32768000000000000000e5 +3561 3 15 44 0.32768000000000000000e5 +3561 3 17 30 0.32768000000000000000e5 +3561 3 32 45 0.32768000000000000000e5 +3561 3 36 49 -0.32768000000000000000e5 +3561 3 36 50 0.65536000000000000000e5 +3561 3 41 46 -0.32768000000000000000e5 +3561 4 15 35 -0.32768000000000000000e5 +3562 3 36 51 0.65536000000000000000e5 +3562 3 45 46 -0.65536000000000000000e5 +3563 3 21 55 -0.65536000000000000000e5 +3563 3 36 52 0.65536000000000000000e5 +3564 3 19 56 -0.65536000000000000000e5 +3564 3 36 53 0.65536000000000000000e5 +3565 3 36 54 0.65536000000000000000e5 +3565 3 46 51 -0.65536000000000000000e5 +3566 3 21 56 -0.65536000000000000000e5 +3566 3 36 55 0.65536000000000000000e5 +3567 3 36 56 0.65536000000000000000e5 +3567 3 46 55 -0.65536000000000000000e5 +3568 1 22 53 0.32768000000000000000e5 +3568 1 23 38 -0.32768000000000000000e5 +3568 3 2 47 0.32768000000000000000e5 +3568 3 37 37 0.65536000000000000000e5 +3569 1 2 49 -0.65536000000000000000e5 +3569 1 6 53 0.65536000000000000000e5 +3569 1 8 39 0.13107200000000000000e6 +3569 1 9 40 0.13107200000000000000e6 +3569 1 10 41 -0.26214400000000000000e6 +3569 1 22 53 -0.65536000000000000000e5 +3569 1 23 54 -0.65536000000000000000e5 +3569 1 24 55 -0.13107200000000000000e6 +3569 1 25 40 -0.65536000000000000000e5 +3569 1 37 52 0.26214400000000000000e6 +3569 2 26 32 -0.65536000000000000000e5 +3569 3 9 38 0.13107200000000000000e6 +3569 3 22 51 0.13107200000000000000e6 +3569 3 24 37 0.13107200000000000000e6 +3569 3 27 40 0.13107200000000000000e6 +3569 3 37 38 0.65536000000000000000e5 +3569 4 2 30 0.13107200000000000000e6 +3569 4 4 32 -0.65536000000000000000e5 +3569 4 16 28 0.65536000000000000000e5 +3569 4 17 29 0.13107200000000000000e6 +3569 4 20 32 0.13107200000000000000e6 +3570 1 6 53 0.65536000000000000000e5 +3570 1 23 54 0.65536000000000000000e5 +3570 1 24 39 -0.65536000000000000000e5 +3570 1 25 40 -0.65536000000000000000e5 +3570 3 25 38 -0.65536000000000000000e5 +3570 3 27 40 0.13107200000000000000e6 +3570 3 37 39 0.65536000000000000000e5 +3570 4 4 32 -0.65536000000000000000e5 +3571 1 1 48 0.65536000000000000000e5 +3571 1 2 49 0.13107200000000000000e6 +3571 1 8 39 0.13107200000000000000e6 +3571 1 9 40 0.13107200000000000000e6 +3571 1 10 41 -0.26214400000000000000e6 +3571 1 12 43 -0.52428800000000000000e6 +3571 1 23 38 0.65536000000000000000e5 +3571 1 24 39 0.65536000000000000000e5 +3571 1 26 41 -0.13107200000000000000e6 +3571 1 28 43 0.26214400000000000000e6 +3571 1 32 47 0.52428800000000000000e6 +3571 1 40 47 0.65536000000000000000e5 +3571 2 2 32 0.65536000000000000000e5 +3571 2 3 33 0.65536000000000000000e5 +3571 2 16 30 0.13107200000000000000e6 +3571 2 20 34 0.26214400000000000000e6 +3571 3 9 38 0.13107200000000000000e6 +3571 3 22 35 0.52428800000000000000e6 +3571 3 25 38 0.65536000000000000000e5 +3571 3 28 41 0.52428800000000000000e6 +3571 3 37 40 0.65536000000000000000e5 +3571 4 2 30 0.13107200000000000000e6 +3571 4 6 34 0.26214400000000000000e6 +3572 1 24 55 -0.65536000000000000000e5 +3572 1 26 41 0.65536000000000000000e5 +3572 1 32 47 -0.13107200000000000000e6 +3572 1 37 52 0.13107200000000000000e6 +3572 3 22 51 0.65536000000000000000e5 +3572 3 27 40 -0.65536000000000000000e5 +3572 3 37 41 0.65536000000000000000e5 +3572 4 20 32 0.65536000000000000000e5 +3573 3 22 51 -0.65536000000000000000e5 +3573 3 37 42 0.65536000000000000000e5 +3574 1 24 55 0.65536000000000000000e5 +3574 1 26 41 -0.65536000000000000000e5 +3574 3 27 40 0.65536000000000000000e5 +3574 3 37 43 0.65536000000000000000e5 +3575 1 32 47 -0.65536000000000000000e5 +3575 1 37 52 0.65536000000000000000e5 +3575 3 37 44 0.65536000000000000000e5 +3576 3 23 52 -0.65536000000000000000e5 +3576 3 37 45 0.65536000000000000000e5 +3577 3 34 47 -0.65536000000000000000e5 +3577 3 37 46 0.65536000000000000000e5 +3578 1 1 48 -0.65536000000000000000e5 +3578 1 2 49 -0.65536000000000000000e5 +3578 1 6 53 -0.13107200000000000000e6 +3578 1 8 39 -0.26214400000000000000e6 +3578 1 9 40 -0.26214400000000000000e6 +3578 1 10 41 0.52428800000000000000e6 +3578 1 12 43 0.52428800000000000000e6 +3578 1 22 53 0.65536000000000000000e5 +3578 1 23 38 -0.65536000000000000000e5 +3578 1 23 54 0.65536000000000000000e5 +3578 1 24 55 0.13107200000000000000e6 +3578 1 25 40 0.13107200000000000000e6 +3578 1 26 41 0.13107200000000000000e6 +3578 1 28 43 -0.26214400000000000000e6 +3578 1 32 47 -0.52428800000000000000e6 +3578 1 37 52 -0.26214400000000000000e6 +3578 1 38 53 -0.65536000000000000000e5 +3578 1 40 47 -0.65536000000000000000e5 +3578 2 2 32 -0.65536000000000000000e5 +3578 2 16 30 -0.13107200000000000000e6 +3578 2 20 34 -0.26214400000000000000e6 +3578 2 26 32 0.65536000000000000000e5 +3578 2 32 32 -0.13107200000000000000e6 +3578 3 9 38 -0.26214400000000000000e6 +3578 3 22 35 -0.52428800000000000000e6 +3578 3 22 51 -0.26214400000000000000e6 +3578 3 24 37 -0.13107200000000000000e6 +3578 3 24 53 0.65536000000000000000e5 +3578 3 27 40 -0.26214400000000000000e6 +3578 3 28 41 -0.52428800000000000000e6 +3578 3 37 47 0.65536000000000000000e5 +3578 3 37 50 -0.13107200000000000000e6 +3578 4 2 30 -0.26214400000000000000e6 +3578 4 4 32 0.13107200000000000000e6 +3578 4 6 34 -0.26214400000000000000e6 +3578 4 16 28 -0.13107200000000000000e6 +3578 4 17 29 -0.13107200000000000000e6 +3578 4 20 32 -0.13107200000000000000e6 +3579 1 23 54 -0.65536000000000000000e5 +3579 1 38 53 0.65536000000000000000e5 +3579 3 37 48 0.65536000000000000000e5 +3580 3 24 53 -0.65536000000000000000e5 +3580 3 37 49 0.65536000000000000000e5 +3581 1 24 55 -0.65536000000000000000e5 +3581 1 41 56 0.65536000000000000000e5 +3581 3 27 56 0.65536000000000000000e5 +3581 3 37 51 0.65536000000000000000e5 +3582 1 1 48 -0.16384000000000000000e5 +3582 1 2 49 -0.16384000000000000000e5 +3582 1 8 39 -0.32768000000000000000e5 +3582 1 9 40 -0.32768000000000000000e5 +3582 1 10 41 0.65536000000000000000e5 +3582 1 12 43 0.13107200000000000000e6 +3582 1 23 38 -0.16384000000000000000e5 +3582 1 24 55 0.32768000000000000000e5 +3582 1 26 41 0.32768000000000000000e5 +3582 1 28 43 -0.13107200000000000000e6 +3582 1 32 47 -0.13107200000000000000e6 +3582 1 33 48 0.65536000000000000000e5 +3582 1 40 55 -0.32768000000000000000e5 +3582 1 41 56 -0.32768000000000000000e5 +3582 1 44 51 -0.13107200000000000000e6 +3582 1 46 53 0.13107200000000000000e6 +3582 2 2 32 -0.16384000000000000000e5 +3582 2 4 34 0.32768000000000000000e5 +3582 2 16 30 -0.32768000000000000000e5 +3582 2 20 34 -0.65536000000000000000e5 +3582 2 28 34 -0.32768000000000000000e5 +3582 3 5 50 0.32768000000000000000e5 +3582 3 9 38 -0.32768000000000000000e5 +3582 3 10 55 0.65536000000000000000e5 +3582 3 22 35 -0.13107200000000000000e6 +3582 3 22 51 -0.32768000000000000000e5 +3582 3 23 52 0.65536000000000000000e5 +3582 3 27 40 0.32768000000000000000e5 +3582 3 27 56 -0.32768000000000000000e5 +3582 3 28 41 -0.13107200000000000000e6 +3582 3 35 48 -0.13107200000000000000e6 +3582 3 37 52 0.65536000000000000000e5 +3582 3 38 51 0.32768000000000000000e5 +3582 3 39 52 0.65536000000000000000e5 +3582 3 40 45 0.65536000000000000000e5 +3582 4 2 30 -0.32768000000000000000e5 +3582 4 6 34 -0.65536000000000000000e5 +3582 4 7 35 -0.32768000000000000000e5 +3582 4 22 34 0.65536000000000000000e5 +3582 4 23 35 0.65536000000000000000e5 +3582 4 29 33 0.32768000000000000000e5 +3583 1 1 48 0.65536000000000000000e5 +3583 1 2 49 0.13107200000000000000e6 +3583 1 6 53 -0.65536000000000000000e5 +3583 1 8 39 0.13107200000000000000e6 +3583 1 9 40 0.13107200000000000000e6 +3583 1 10 41 -0.26214400000000000000e6 +3583 1 12 43 -0.52428800000000000000e6 +3583 1 23 38 0.65536000000000000000e5 +3583 1 24 39 0.65536000000000000000e5 +3583 1 24 55 0.13107200000000000000e6 +3583 1 25 56 0.65536000000000000000e5 +3583 1 26 41 -0.26214400000000000000e6 +3583 1 28 43 0.26214400000000000000e6 +3583 1 32 47 0.52428800000000000000e6 +3583 1 40 47 0.65536000000000000000e5 +3583 2 2 32 0.65536000000000000000e5 +3583 2 3 33 0.65536000000000000000e5 +3583 2 5 35 -0.65536000000000000000e5 +3583 2 16 30 0.13107200000000000000e6 +3583 2 20 34 0.26214400000000000000e6 +3583 2 33 35 0.65536000000000000000e5 +3583 3 9 38 0.13107200000000000000e6 +3583 3 22 35 0.52428800000000000000e6 +3583 3 22 51 -0.13107200000000000000e6 +3583 3 23 52 0.26214400000000000000e6 +3583 3 24 53 -0.65536000000000000000e5 +3583 3 25 38 0.65536000000000000000e5 +3583 3 25 54 -0.65536000000000000000e5 +3583 3 27 40 0.13107200000000000000e6 +3583 3 27 56 -0.13107200000000000000e6 +3583 3 28 41 0.52428800000000000000e6 +3583 3 37 53 0.65536000000000000000e5 +3583 3 38 51 0.13107200000000000000e6 +3583 3 39 40 -0.65536000000000000000e5 +3583 3 40 53 -0.65536000000000000000e5 +3583 3 41 54 0.13107200000000000000e6 +3583 4 2 30 0.13107200000000000000e6 +3583 4 6 34 0.26214400000000000000e6 +3583 4 7 35 -0.13107200000000000000e6 +3583 4 32 32 0.13107200000000000000e6 +3584 1 40 47 -0.65536000000000000000e5 +3584 1 47 54 0.65536000000000000000e5 +3584 3 24 53 0.65536000000000000000e5 +3584 3 37 54 0.65536000000000000000e5 +3585 3 27 56 -0.65536000000000000000e5 +3585 3 37 55 0.65536000000000000000e5 +3586 1 1 48 0.13107200000000000000e6 +3586 1 2 49 0.19660800000000000000e6 +3586 1 6 53 -0.65536000000000000000e5 +3586 1 8 39 0.26214400000000000000e6 +3586 1 9 40 0.26214400000000000000e6 +3586 1 10 41 -0.52428800000000000000e6 +3586 1 12 43 -0.10485760000000000000e7 +3586 1 23 38 0.13107200000000000000e6 +3586 1 24 39 0.65536000000000000000e5 +3586 1 26 41 -0.39321600000000000000e6 +3586 1 28 43 0.78643200000000000000e6 +3586 1 32 47 0.10485760000000000000e7 +3586 1 49 56 -0.65536000000000000000e5 +3586 2 2 32 0.13107200000000000000e6 +3586 2 3 33 0.65536000000000000000e5 +3586 2 4 34 -0.13107200000000000000e6 +3586 2 5 35 -0.65536000000000000000e5 +3586 2 16 30 0.26214400000000000000e6 +3586 2 20 34 0.52428800000000000000e6 +3586 2 33 35 0.65536000000000000000e5 +3586 2 35 35 -0.13107200000000000000e6 +3586 3 5 50 -0.13107200000000000000e6 +3586 3 9 38 0.26214400000000000000e6 +3586 3 22 35 0.10485760000000000000e7 +3586 3 25 38 0.65536000000000000000e5 +3586 3 25 54 -0.65536000000000000000e5 +3586 3 28 41 0.10485760000000000000e7 +3586 3 37 56 0.65536000000000000000e5 +3586 3 39 40 -0.65536000000000000000e5 +3586 3 40 53 -0.65536000000000000000e5 +3586 3 41 56 -0.13107200000000000000e6 +3586 3 48 53 0.65536000000000000000e5 +3586 4 2 30 0.26214400000000000000e6 +3586 4 6 34 0.52428800000000000000e6 +3587 1 6 53 0.32768000000000000000e5 +3587 1 23 54 0.32768000000000000000e5 +3587 1 24 39 -0.32768000000000000000e5 +3587 1 25 40 -0.32768000000000000000e5 +3587 3 25 38 -0.32768000000000000000e5 +3587 3 27 40 0.65536000000000000000e5 +3587 3 38 38 0.65536000000000000000e5 +3587 4 4 32 -0.32768000000000000000e5 +3588 1 1 48 0.65536000000000000000e5 +3588 1 2 49 0.13107200000000000000e6 +3588 1 8 39 0.13107200000000000000e6 +3588 1 9 40 0.13107200000000000000e6 +3588 1 10 41 -0.26214400000000000000e6 +3588 1 12 43 -0.52428800000000000000e6 +3588 1 23 38 0.65536000000000000000e5 +3588 1 24 39 0.65536000000000000000e5 +3588 1 26 41 -0.13107200000000000000e6 +3588 1 28 43 0.26214400000000000000e6 +3588 1 32 47 0.52428800000000000000e6 +3588 1 40 47 0.65536000000000000000e5 +3588 2 2 32 0.65536000000000000000e5 +3588 2 3 33 0.65536000000000000000e5 +3588 2 16 30 0.13107200000000000000e6 +3588 2 20 34 0.26214400000000000000e6 +3588 3 9 38 0.13107200000000000000e6 +3588 3 22 35 0.52428800000000000000e6 +3588 3 25 38 0.65536000000000000000e5 +3588 3 28 41 0.52428800000000000000e6 +3588 3 38 39 0.65536000000000000000e5 +3588 4 2 30 0.13107200000000000000e6 +3588 4 6 34 0.26214400000000000000e6 +3589 1 6 53 -0.65536000000000000000e5 +3589 1 25 56 0.65536000000000000000e5 +3589 3 24 53 -0.65536000000000000000e5 +3589 3 25 54 -0.65536000000000000000e5 +3589 3 38 40 0.65536000000000000000e5 +3589 3 38 51 0.13107200000000000000e6 +3589 4 28 32 -0.65536000000000000000e5 +3590 3 22 51 -0.65536000000000000000e5 +3590 3 38 41 0.65536000000000000000e5 +3591 1 24 55 0.65536000000000000000e5 +3591 1 26 41 -0.65536000000000000000e5 +3591 3 27 40 0.65536000000000000000e5 +3591 3 38 42 0.65536000000000000000e5 +3592 1 24 55 -0.65536000000000000000e5 +3592 1 26 41 0.65536000000000000000e5 +3592 3 22 51 0.65536000000000000000e5 +3592 3 23 52 -0.13107200000000000000e6 +3592 3 27 40 -0.65536000000000000000e5 +3592 3 38 43 0.65536000000000000000e5 +3592 4 7 35 0.65536000000000000000e5 +3593 3 23 52 -0.65536000000000000000e5 +3593 3 38 44 0.65536000000000000000e5 +3594 3 10 55 0.65536000000000000000e5 +3594 3 35 48 -0.13107200000000000000e6 +3594 3 38 45 0.65536000000000000000e5 +3594 3 40 45 0.65536000000000000000e5 +3594 4 22 34 0.65536000000000000000e5 +3595 1 34 49 -0.65536000000000000000e5 +3595 1 44 51 0.65536000000000000000e5 +3595 3 38 46 0.65536000000000000000e5 +3596 1 23 54 -0.65536000000000000000e5 +3596 1 38 53 0.65536000000000000000e5 +3596 3 38 47 0.65536000000000000000e5 +3597 3 24 53 -0.65536000000000000000e5 +3597 3 38 48 0.65536000000000000000e5 +3598 3 24 53 0.65536000000000000000e5 +3598 3 25 54 0.65536000000000000000e5 +3598 3 38 49 0.65536000000000000000e5 +3598 3 38 51 -0.13107200000000000000e6 +3598 4 28 32 0.65536000000000000000e5 +3599 1 24 55 -0.65536000000000000000e5 +3599 1 41 56 0.65536000000000000000e5 +3599 3 27 56 0.65536000000000000000e5 +3599 3 38 50 0.65536000000000000000e5 +3600 1 1 48 0.16384000000000000000e5 +3600 1 2 49 0.16384000000000000000e5 +3600 1 8 39 0.32768000000000000000e5 +3600 1 9 40 0.32768000000000000000e5 +3600 1 10 41 -0.65536000000000000000e5 +3600 1 12 43 -0.13107200000000000000e6 +3600 1 23 38 0.16384000000000000000e5 +3600 1 24 55 -0.32768000000000000000e5 +3600 1 26 41 -0.32768000000000000000e5 +3600 1 28 43 0.13107200000000000000e6 +3600 1 32 47 0.13107200000000000000e6 +3600 1 33 48 -0.65536000000000000000e5 +3600 1 40 55 0.32768000000000000000e5 +3600 1 41 56 0.32768000000000000000e5 +3600 2 2 32 0.16384000000000000000e5 +3600 2 4 34 -0.32768000000000000000e5 +3600 2 16 30 0.32768000000000000000e5 +3600 2 20 34 0.65536000000000000000e5 +3600 2 28 34 0.32768000000000000000e5 +3600 3 5 50 -0.32768000000000000000e5 +3600 3 9 38 0.32768000000000000000e5 +3600 3 10 55 -0.65536000000000000000e5 +3600 3 22 35 0.13107200000000000000e6 +3600 3 22 51 0.32768000000000000000e5 +3600 3 23 52 -0.65536000000000000000e5 +3600 3 27 40 -0.32768000000000000000e5 +3600 3 27 56 0.32768000000000000000e5 +3600 3 28 41 0.13107200000000000000e6 +3600 3 35 48 0.13107200000000000000e6 +3600 3 38 51 -0.32768000000000000000e5 +3600 3 38 52 0.65536000000000000000e5 +3600 3 40 45 -0.65536000000000000000e5 +3600 4 2 30 0.32768000000000000000e5 +3600 4 6 34 0.65536000000000000000e5 +3600 4 7 35 0.32768000000000000000e5 +3600 4 22 34 -0.65536000000000000000e5 +3600 4 29 33 -0.32768000000000000000e5 +3601 1 40 47 -0.65536000000000000000e5 +3601 1 47 54 0.65536000000000000000e5 +3601 3 24 53 0.65536000000000000000e5 +3601 3 38 53 0.65536000000000000000e5 +3602 1 1 48 -0.65536000000000000000e5 +3602 1 2 49 -0.13107200000000000000e6 +3602 1 6 53 0.65536000000000000000e5 +3602 1 8 39 -0.13107200000000000000e6 +3602 1 9 40 -0.13107200000000000000e6 +3602 1 10 41 0.26214400000000000000e6 +3602 1 12 43 0.52428800000000000000e6 +3602 1 23 38 -0.65536000000000000000e5 +3602 1 24 39 -0.65536000000000000000e5 +3602 1 24 55 -0.13107200000000000000e6 +3602 1 25 56 -0.65536000000000000000e5 +3602 1 26 41 0.26214400000000000000e6 +3602 1 28 43 -0.26214400000000000000e6 +3602 1 32 47 -0.52428800000000000000e6 +3602 1 47 54 -0.65536000000000000000e5 +3602 2 2 32 -0.65536000000000000000e5 +3602 2 3 33 -0.65536000000000000000e5 +3602 2 5 35 0.65536000000000000000e5 +3602 2 16 30 -0.13107200000000000000e6 +3602 2 20 34 -0.26214400000000000000e6 +3602 2 33 35 -0.65536000000000000000e5 +3602 3 9 38 -0.13107200000000000000e6 +3602 3 22 35 -0.52428800000000000000e6 +3602 3 22 51 0.13107200000000000000e6 +3602 3 23 52 -0.26214400000000000000e6 +3602 3 25 38 -0.65536000000000000000e5 +3602 3 25 54 0.65536000000000000000e5 +3602 3 27 40 -0.13107200000000000000e6 +3602 3 28 41 -0.52428800000000000000e6 +3602 3 38 51 -0.13107200000000000000e6 +3602 3 38 54 0.65536000000000000000e5 +3602 3 39 40 0.65536000000000000000e5 +3602 3 40 53 0.65536000000000000000e5 +3602 3 41 54 -0.13107200000000000000e6 +3602 4 2 30 -0.13107200000000000000e6 +3602 4 6 34 -0.26214400000000000000e6 +3602 4 7 35 0.13107200000000000000e6 +3603 3 38 55 0.65536000000000000000e5 +3603 3 41 54 -0.65536000000000000000e5 +3604 3 38 56 0.65536000000000000000e5 +3604 3 48 53 -0.65536000000000000000e5 +3605 1 6 53 -0.32768000000000000000e5 +3605 1 25 56 0.32768000000000000000e5 +3605 3 24 53 -0.32768000000000000000e5 +3605 3 25 54 -0.32768000000000000000e5 +3605 3 38 51 0.65536000000000000000e5 +3605 3 39 39 0.65536000000000000000e5 +3605 4 28 32 -0.32768000000000000000e5 +3606 1 24 55 0.65536000000000000000e5 +3606 1 26 41 -0.65536000000000000000e5 +3606 3 27 40 0.65536000000000000000e5 +3606 3 39 41 0.65536000000000000000e5 +3607 1 24 55 -0.65536000000000000000e5 +3607 1 26 41 0.65536000000000000000e5 +3607 3 22 51 0.65536000000000000000e5 +3607 3 23 52 -0.13107200000000000000e6 +3607 3 27 40 -0.65536000000000000000e5 +3607 3 39 42 0.65536000000000000000e5 +3607 4 7 35 0.65536000000000000000e5 +3608 3 10 55 0.13107200000000000000e6 +3608 3 22 51 -0.65536000000000000000e5 +3608 3 23 52 0.13107200000000000000e6 +3608 3 35 48 -0.26214400000000000000e6 +3608 3 39 43 0.65536000000000000000e5 +3608 3 40 45 0.13107200000000000000e6 +3608 4 7 35 -0.65536000000000000000e5 +3608 4 21 33 0.65536000000000000000e5 +3608 4 22 34 0.13107200000000000000e6 +3609 3 10 55 0.65536000000000000000e5 +3609 3 35 48 -0.13107200000000000000e6 +3609 3 39 44 0.65536000000000000000e5 +3609 3 40 45 0.65536000000000000000e5 +3609 4 22 34 0.65536000000000000000e5 +3610 3 10 55 -0.65536000000000000000e5 +3610 3 39 45 0.65536000000000000000e5 +3611 3 35 48 -0.65536000000000000000e5 +3611 3 39 46 0.65536000000000000000e5 +3612 3 24 53 -0.65536000000000000000e5 +3612 3 39 47 0.65536000000000000000e5 +3613 3 24 53 0.65536000000000000000e5 +3613 3 25 54 0.65536000000000000000e5 +3613 3 38 51 -0.13107200000000000000e6 +3613 3 39 48 0.65536000000000000000e5 +3613 4 28 32 0.65536000000000000000e5 +3614 3 25 54 -0.65536000000000000000e5 +3614 3 39 49 0.65536000000000000000e5 +3615 3 38 51 -0.65536000000000000000e5 +3615 3 39 50 0.65536000000000000000e5 +3616 1 1 48 0.32768000000000000000e5 +3616 1 2 49 0.32768000000000000000e5 +3616 1 8 39 0.65536000000000000000e5 +3616 1 9 40 0.65536000000000000000e5 +3616 1 10 41 -0.13107200000000000000e6 +3616 1 12 43 -0.26214400000000000000e6 +3616 1 23 38 0.32768000000000000000e5 +3616 1 26 41 -0.65536000000000000000e5 +3616 1 28 43 0.26214400000000000000e6 +3616 1 32 47 0.26214400000000000000e6 +3616 1 33 48 -0.13107200000000000000e6 +3616 1 40 55 0.65536000000000000000e5 +3616 2 2 32 0.32768000000000000000e5 +3616 2 4 34 -0.65536000000000000000e5 +3616 2 16 30 0.65536000000000000000e5 +3616 2 20 34 0.13107200000000000000e6 +3616 2 28 34 0.65536000000000000000e5 +3616 3 5 50 -0.65536000000000000000e5 +3616 3 9 38 0.65536000000000000000e5 +3616 3 10 55 -0.13107200000000000000e6 +3616 3 22 35 0.26214400000000000000e6 +3616 3 22 51 0.65536000000000000000e5 +3616 3 23 52 -0.13107200000000000000e6 +3616 3 27 40 -0.65536000000000000000e5 +3616 3 28 41 0.26214400000000000000e6 +3616 3 35 48 0.26214400000000000000e6 +3616 3 39 51 0.65536000000000000000e5 +3616 3 40 45 -0.13107200000000000000e6 +3616 4 2 30 0.65536000000000000000e5 +3616 4 6 34 0.13107200000000000000e6 +3616 4 7 35 0.65536000000000000000e5 +3616 4 22 34 -0.13107200000000000000e6 +3617 1 1 48 -0.65536000000000000000e5 +3617 1 2 49 -0.13107200000000000000e6 +3617 1 6 53 0.65536000000000000000e5 +3617 1 8 39 -0.13107200000000000000e6 +3617 1 9 40 -0.13107200000000000000e6 +3617 1 10 41 0.26214400000000000000e6 +3617 1 12 43 0.52428800000000000000e6 +3617 1 23 38 -0.65536000000000000000e5 +3617 1 24 39 -0.65536000000000000000e5 +3617 1 24 55 -0.13107200000000000000e6 +3617 1 25 56 -0.65536000000000000000e5 +3617 1 26 41 0.26214400000000000000e6 +3617 1 28 43 -0.26214400000000000000e6 +3617 1 32 47 -0.52428800000000000000e6 +3617 1 47 54 -0.65536000000000000000e5 +3617 2 2 32 -0.65536000000000000000e5 +3617 2 3 33 -0.65536000000000000000e5 +3617 2 5 35 0.65536000000000000000e5 +3617 2 16 30 -0.13107200000000000000e6 +3617 2 20 34 -0.26214400000000000000e6 +3617 2 33 35 -0.65536000000000000000e5 +3617 3 9 38 -0.13107200000000000000e6 +3617 3 22 35 -0.52428800000000000000e6 +3617 3 22 51 0.13107200000000000000e6 +3617 3 23 52 -0.26214400000000000000e6 +3617 3 25 38 -0.65536000000000000000e5 +3617 3 25 54 0.65536000000000000000e5 +3617 3 27 40 -0.13107200000000000000e6 +3617 3 28 41 -0.52428800000000000000e6 +3617 3 38 51 -0.13107200000000000000e6 +3617 3 39 40 0.65536000000000000000e5 +3617 3 39 53 0.65536000000000000000e5 +3617 3 40 53 0.65536000000000000000e5 +3617 3 41 54 -0.13107200000000000000e6 +3617 4 2 30 -0.13107200000000000000e6 +3617 4 6 34 -0.26214400000000000000e6 +3617 4 7 35 0.13107200000000000000e6 +3618 3 39 54 0.65536000000000000000e5 +3618 3 40 53 -0.65536000000000000000e5 +3619 3 39 55 0.65536000000000000000e5 +3619 3 49 50 -0.65536000000000000000e5 +3620 1 1 48 -0.13107200000000000000e6 +3620 1 2 49 -0.19660800000000000000e6 +3620 1 6 53 0.65536000000000000000e5 +3620 1 8 39 -0.26214400000000000000e6 +3620 1 9 40 -0.26214400000000000000e6 +3620 1 10 41 0.52428800000000000000e6 +3620 1 12 43 0.10485760000000000000e7 +3620 1 23 38 -0.13107200000000000000e6 +3620 1 24 39 -0.65536000000000000000e5 +3620 1 26 41 0.39321600000000000000e6 +3620 1 28 43 -0.78643200000000000000e6 +3620 1 32 47 -0.10485760000000000000e7 +3620 1 49 56 0.65536000000000000000e5 +3620 2 2 32 -0.13107200000000000000e6 +3620 2 3 33 -0.65536000000000000000e5 +3620 2 4 34 0.13107200000000000000e6 +3620 2 5 35 0.65536000000000000000e5 +3620 2 16 30 -0.26214400000000000000e6 +3620 2 20 34 -0.52428800000000000000e6 +3620 3 5 50 0.13107200000000000000e6 +3620 3 9 38 -0.26214400000000000000e6 +3620 3 22 35 -0.10485760000000000000e7 +3620 3 25 38 -0.65536000000000000000e5 +3620 3 25 54 0.65536000000000000000e5 +3620 3 28 41 -0.10485760000000000000e7 +3620 3 39 40 0.65536000000000000000e5 +3620 3 39 56 0.65536000000000000000e5 +3620 3 40 53 0.65536000000000000000e5 +3620 4 2 30 -0.26214400000000000000e6 +3620 4 6 34 -0.52428800000000000000e6 +3621 1 6 53 0.32768000000000000000e5 +3621 1 25 56 -0.32768000000000000000e5 +3621 3 10 55 0.13107200000000000000e6 +3621 3 22 51 -0.65536000000000000000e5 +3621 3 23 52 0.13107200000000000000e6 +3621 3 24 53 0.32768000000000000000e5 +3621 3 25 54 0.32768000000000000000e5 +3621 3 35 48 -0.26214400000000000000e6 +3621 3 38 51 -0.65536000000000000000e5 +3621 3 39 40 0.32768000000000000000e5 +3621 3 40 40 0.65536000000000000000e5 +3621 3 40 45 0.13107200000000000000e6 +3621 4 7 35 -0.65536000000000000000e5 +3621 4 21 33 0.65536000000000000000e5 +3621 4 22 34 0.13107200000000000000e6 +3621 4 28 28 0.65536000000000000000e5 +3621 4 28 32 0.32768000000000000000e5 +3622 1 24 55 -0.65536000000000000000e5 +3622 1 26 41 0.65536000000000000000e5 +3622 3 22 51 0.65536000000000000000e5 +3622 3 23 52 -0.13107200000000000000e6 +3622 3 27 40 -0.65536000000000000000e5 +3622 3 40 41 0.65536000000000000000e5 +3622 4 7 35 0.65536000000000000000e5 +3623 3 10 55 0.13107200000000000000e6 +3623 3 22 51 -0.65536000000000000000e5 +3623 3 23 52 0.13107200000000000000e6 +3623 3 35 48 -0.26214400000000000000e6 +3623 3 40 42 0.65536000000000000000e5 +3623 3 40 45 0.13107200000000000000e6 +3623 4 7 35 -0.65536000000000000000e5 +3623 4 21 33 0.65536000000000000000e5 +3623 4 22 34 0.13107200000000000000e6 +3624 3 6 55 -0.65536000000000000000e5 +3624 3 40 43 0.65536000000000000000e5 +3625 3 10 55 -0.65536000000000000000e5 +3625 3 40 44 0.65536000000000000000e5 +3626 1 11 18 -0.13107200000000000000e6 +3626 1 34 49 0.65536000000000000000e5 +3626 1 44 51 -0.65536000000000000000e5 +3626 1 45 52 0.13107200000000000000e6 +3626 3 6 19 0.13107200000000000000e6 +3626 3 15 44 0.13107200000000000000e6 +3626 3 17 30 0.13107200000000000000e6 +3626 3 32 45 0.13107200000000000000e6 +3626 3 35 48 0.65536000000000000000e5 +3626 3 40 46 0.65536000000000000000e5 +3626 4 25 33 0.65536000000000000000e5 +3627 3 24 53 0.65536000000000000000e5 +3627 3 25 54 0.65536000000000000000e5 +3627 3 38 51 -0.13107200000000000000e6 +3627 3 40 47 0.65536000000000000000e5 +3627 4 28 32 0.65536000000000000000e5 +3628 3 25 54 -0.65536000000000000000e5 +3628 3 40 48 0.65536000000000000000e5 +3629 1 1 48 0.65536000000000000000e5 +3629 1 2 49 0.65536000000000000000e5 +3629 1 8 39 0.13107200000000000000e6 +3629 1 9 40 0.13107200000000000000e6 +3629 1 10 41 -0.26214400000000000000e6 +3629 1 12 43 -0.52428800000000000000e6 +3629 1 23 38 0.65536000000000000000e5 +3629 1 26 41 -0.13107200000000000000e6 +3629 1 28 43 0.52428800000000000000e6 +3629 1 32 47 0.52428800000000000000e6 +3629 1 33 48 -0.26214400000000000000e6 +3629 1 40 55 0.13107200000000000000e6 +3629 2 2 32 0.65536000000000000000e5 +3629 2 4 34 -0.13107200000000000000e6 +3629 2 16 30 0.13107200000000000000e6 +3629 2 20 34 0.26214400000000000000e6 +3629 2 28 34 0.13107200000000000000e6 +3629 3 5 50 -0.13107200000000000000e6 +3629 3 9 38 0.13107200000000000000e6 +3629 3 10 55 -0.26214400000000000000e6 +3629 3 22 35 0.52428800000000000000e6 +3629 3 22 51 0.13107200000000000000e6 +3629 3 23 52 -0.26214400000000000000e6 +3629 3 24 53 -0.65536000000000000000e5 +3629 3 27 40 -0.13107200000000000000e6 +3629 3 28 41 0.52428800000000000000e6 +3629 3 35 48 0.52428800000000000000e6 +3629 3 38 51 0.13107200000000000000e6 +3629 3 40 45 -0.26214400000000000000e6 +3629 3 40 49 0.65536000000000000000e5 +3629 4 2 30 0.13107200000000000000e6 +3629 4 6 34 0.26214400000000000000e6 +3629 4 7 35 0.13107200000000000000e6 +3629 4 19 35 0.65536000000000000000e5 +3629 4 22 34 -0.26214400000000000000e6 +3629 4 28 32 -0.65536000000000000000e5 +3630 1 1 48 0.32768000000000000000e5 +3630 1 2 49 0.32768000000000000000e5 +3630 1 8 39 0.65536000000000000000e5 +3630 1 9 40 0.65536000000000000000e5 +3630 1 10 41 -0.13107200000000000000e6 +3630 1 12 43 -0.26214400000000000000e6 +3630 1 23 38 0.32768000000000000000e5 +3630 1 26 41 -0.65536000000000000000e5 +3630 1 28 43 0.26214400000000000000e6 +3630 1 32 47 0.26214400000000000000e6 +3630 1 33 48 -0.13107200000000000000e6 +3630 1 40 55 0.65536000000000000000e5 +3630 2 2 32 0.32768000000000000000e5 +3630 2 4 34 -0.65536000000000000000e5 +3630 2 16 30 0.65536000000000000000e5 +3630 2 20 34 0.13107200000000000000e6 +3630 2 28 34 0.65536000000000000000e5 +3630 3 5 50 -0.65536000000000000000e5 +3630 3 9 38 0.65536000000000000000e5 +3630 3 10 55 -0.13107200000000000000e6 +3630 3 22 35 0.26214400000000000000e6 +3630 3 22 51 0.65536000000000000000e5 +3630 3 23 52 -0.13107200000000000000e6 +3630 3 27 40 -0.65536000000000000000e5 +3630 3 28 41 0.26214400000000000000e6 +3630 3 35 48 0.26214400000000000000e6 +3630 3 40 45 -0.13107200000000000000e6 +3630 3 40 50 0.65536000000000000000e5 +3630 4 2 30 0.65536000000000000000e5 +3630 4 6 34 0.13107200000000000000e6 +3630 4 7 35 0.65536000000000000000e5 +3630 4 22 34 -0.13107200000000000000e6 +3631 3 26 55 -0.65536000000000000000e5 +3631 3 40 51 0.65536000000000000000e5 +3632 1 1 48 -0.16384000000000000000e5 +3632 1 2 49 -0.16384000000000000000e5 +3632 1 8 39 -0.32768000000000000000e5 +3632 1 9 40 -0.32768000000000000000e5 +3632 1 10 41 0.65536000000000000000e5 +3632 1 12 43 0.13107200000000000000e6 +3632 1 23 38 -0.16384000000000000000e5 +3632 1 24 55 0.32768000000000000000e5 +3632 1 26 41 0.32768000000000000000e5 +3632 1 28 43 -0.13107200000000000000e6 +3632 1 32 47 -0.13107200000000000000e6 +3632 1 33 48 0.65536000000000000000e5 +3632 1 40 55 -0.32768000000000000000e5 +3632 1 41 56 -0.32768000000000000000e5 +3632 2 2 32 -0.16384000000000000000e5 +3632 2 4 34 0.32768000000000000000e5 +3632 2 16 30 -0.32768000000000000000e5 +3632 2 20 34 -0.65536000000000000000e5 +3632 2 28 34 -0.32768000000000000000e5 +3632 3 5 50 0.32768000000000000000e5 +3632 3 9 38 -0.32768000000000000000e5 +3632 3 10 55 0.65536000000000000000e5 +3632 3 22 35 -0.13107200000000000000e6 +3632 3 22 51 -0.32768000000000000000e5 +3632 3 23 52 0.65536000000000000000e5 +3632 3 27 40 0.32768000000000000000e5 +3632 3 27 56 -0.32768000000000000000e5 +3632 3 28 41 -0.13107200000000000000e6 +3632 3 35 48 -0.13107200000000000000e6 +3632 3 38 51 0.32768000000000000000e5 +3632 3 39 52 0.65536000000000000000e5 +3632 3 40 45 0.65536000000000000000e5 +3632 3 40 52 0.65536000000000000000e5 +3632 3 45 50 -0.13107200000000000000e6 +3632 4 2 30 -0.32768000000000000000e5 +3632 4 6 34 -0.65536000000000000000e5 +3632 4 7 35 -0.32768000000000000000e5 +3632 4 22 34 0.65536000000000000000e5 +3632 4 29 33 0.32768000000000000000e5 +3632 4 30 34 0.65536000000000000000e5 +3633 1 1 48 0.65536000000000000000e5 +3633 1 2 49 0.13107200000000000000e6 +3633 1 6 53 -0.65536000000000000000e5 +3633 1 8 39 0.13107200000000000000e6 +3633 1 9 40 0.13107200000000000000e6 +3633 1 10 41 -0.26214400000000000000e6 +3633 1 12 43 -0.52428800000000000000e6 +3633 1 23 38 0.65536000000000000000e5 +3633 1 24 39 0.65536000000000000000e5 +3633 1 24 55 0.13107200000000000000e6 +3633 1 25 56 0.65536000000000000000e5 +3633 1 26 41 -0.26214400000000000000e6 +3633 1 28 43 0.26214400000000000000e6 +3633 1 32 47 0.52428800000000000000e6 +3633 1 47 54 0.65536000000000000000e5 +3633 2 2 32 0.65536000000000000000e5 +3633 2 3 33 0.65536000000000000000e5 +3633 2 5 35 -0.65536000000000000000e5 +3633 2 16 30 0.13107200000000000000e6 +3633 2 20 34 0.26214400000000000000e6 +3633 2 33 35 0.65536000000000000000e5 +3633 3 9 38 0.13107200000000000000e6 +3633 3 22 35 0.52428800000000000000e6 +3633 3 22 51 -0.13107200000000000000e6 +3633 3 23 52 0.26214400000000000000e6 +3633 3 25 38 0.65536000000000000000e5 +3633 3 25 54 -0.65536000000000000000e5 +3633 3 27 40 0.13107200000000000000e6 +3633 3 28 41 0.52428800000000000000e6 +3633 3 38 51 0.13107200000000000000e6 +3633 3 39 40 -0.65536000000000000000e5 +3633 3 40 54 0.65536000000000000000e5 +3633 3 41 54 0.13107200000000000000e6 +3633 3 49 50 -0.13107200000000000000e6 +3633 4 2 30 0.13107200000000000000e6 +3633 4 6 34 0.26214400000000000000e6 +3633 4 7 35 -0.13107200000000000000e6 +3633 4 33 33 0.13107200000000000000e6 +3634 3 40 56 0.65536000000000000000e5 +3634 3 49 54 -0.65536000000000000000e5 +3635 1 32 47 -0.32768000000000000000e5 +3635 1 37 52 0.32768000000000000000e5 +3635 3 41 41 0.65536000000000000000e5 +3636 3 23 52 -0.65536000000000000000e5 +3636 3 41 42 0.65536000000000000000e5 +3637 3 10 55 0.65536000000000000000e5 +3637 3 35 48 -0.13107200000000000000e6 +3637 3 40 45 0.65536000000000000000e5 +3637 3 41 43 0.65536000000000000000e5 +3637 4 22 34 0.65536000000000000000e5 +3638 3 34 47 -0.65536000000000000000e5 +3638 3 41 44 0.65536000000000000000e5 +3639 1 34 49 -0.65536000000000000000e5 +3639 1 44 51 0.65536000000000000000e5 +3639 3 41 45 0.65536000000000000000e5 +3640 3 37 50 -0.65536000000000000000e5 +3640 3 41 47 0.65536000000000000000e5 +3641 1 24 55 -0.65536000000000000000e5 +3641 1 41 56 0.65536000000000000000e5 +3641 3 27 56 0.65536000000000000000e5 +3641 3 41 48 0.65536000000000000000e5 +3642 3 38 51 -0.65536000000000000000e5 +3642 3 41 49 0.65536000000000000000e5 +3643 1 1 48 -0.16384000000000000000e5 +3643 1 2 49 -0.16384000000000000000e5 +3643 1 8 39 -0.32768000000000000000e5 +3643 1 9 40 -0.32768000000000000000e5 +3643 1 10 41 0.65536000000000000000e5 +3643 1 12 43 0.13107200000000000000e6 +3643 1 23 38 -0.16384000000000000000e5 +3643 1 24 55 0.32768000000000000000e5 +3643 1 26 41 0.32768000000000000000e5 +3643 1 28 43 -0.13107200000000000000e6 +3643 1 32 47 -0.13107200000000000000e6 +3643 1 33 48 0.65536000000000000000e5 +3643 1 40 55 -0.32768000000000000000e5 +3643 1 41 56 -0.32768000000000000000e5 +3643 1 44 51 -0.13107200000000000000e6 +3643 1 46 53 0.13107200000000000000e6 +3643 2 2 32 -0.16384000000000000000e5 +3643 2 4 34 0.32768000000000000000e5 +3643 2 16 30 -0.32768000000000000000e5 +3643 2 20 34 -0.65536000000000000000e5 +3643 2 28 34 -0.32768000000000000000e5 +3643 3 5 50 0.32768000000000000000e5 +3643 3 9 38 -0.32768000000000000000e5 +3643 3 10 55 0.65536000000000000000e5 +3643 3 22 35 -0.13107200000000000000e6 +3643 3 22 51 -0.32768000000000000000e5 +3643 3 23 52 0.65536000000000000000e5 +3643 3 27 40 0.32768000000000000000e5 +3643 3 27 56 -0.32768000000000000000e5 +3643 3 28 41 -0.13107200000000000000e6 +3643 3 35 48 -0.13107200000000000000e6 +3643 3 38 51 0.32768000000000000000e5 +3643 3 39 52 0.65536000000000000000e5 +3643 3 40 45 0.65536000000000000000e5 +3643 3 41 50 0.65536000000000000000e5 +3643 4 2 30 -0.32768000000000000000e5 +3643 4 6 34 -0.65536000000000000000e5 +3643 4 7 35 -0.32768000000000000000e5 +3643 4 22 34 0.65536000000000000000e5 +3643 4 23 35 0.65536000000000000000e5 +3643 4 29 33 0.32768000000000000000e5 +3644 1 1 48 0.16384000000000000000e5 +3644 1 2 49 0.16384000000000000000e5 +3644 1 8 39 0.32768000000000000000e5 +3644 1 9 40 0.32768000000000000000e5 +3644 1 10 41 -0.65536000000000000000e5 +3644 1 12 43 -0.13107200000000000000e6 +3644 1 23 38 0.16384000000000000000e5 +3644 1 24 55 -0.32768000000000000000e5 +3644 1 26 41 -0.32768000000000000000e5 +3644 1 28 43 0.13107200000000000000e6 +3644 1 32 47 0.13107200000000000000e6 +3644 1 33 48 -0.65536000000000000000e5 +3644 1 40 55 0.32768000000000000000e5 +3644 1 41 56 0.32768000000000000000e5 +3644 2 2 32 0.16384000000000000000e5 +3644 2 4 34 -0.32768000000000000000e5 +3644 2 16 30 0.32768000000000000000e5 +3644 2 20 34 0.65536000000000000000e5 +3644 2 28 34 0.32768000000000000000e5 +3644 3 5 50 -0.32768000000000000000e5 +3644 3 9 38 0.32768000000000000000e5 +3644 3 10 55 -0.65536000000000000000e5 +3644 3 22 35 0.13107200000000000000e6 +3644 3 22 51 0.32768000000000000000e5 +3644 3 23 52 -0.65536000000000000000e5 +3644 3 27 40 -0.32768000000000000000e5 +3644 3 27 56 0.32768000000000000000e5 +3644 3 28 41 0.13107200000000000000e6 +3644 3 35 48 0.13107200000000000000e6 +3644 3 38 51 -0.32768000000000000000e5 +3644 3 40 45 -0.65536000000000000000e5 +3644 3 41 51 0.65536000000000000000e5 +3644 4 2 30 0.32768000000000000000e5 +3644 4 6 34 0.65536000000000000000e5 +3644 4 7 35 0.32768000000000000000e5 +3644 4 22 34 -0.65536000000000000000e5 +3644 4 29 33 -0.32768000000000000000e5 +3645 1 44 51 -0.65536000000000000000e5 +3645 1 46 53 0.65536000000000000000e5 +3645 3 41 52 0.65536000000000000000e5 +3646 3 27 56 -0.65536000000000000000e5 +3646 3 41 53 0.65536000000000000000e5 +3647 3 41 55 0.65536000000000000000e5 +3647 3 47 52 -0.65536000000000000000e5 +3648 3 10 55 0.32768000000000000000e5 +3648 3 35 48 -0.65536000000000000000e5 +3648 3 40 45 0.32768000000000000000e5 +3648 3 42 42 0.65536000000000000000e5 +3648 4 22 34 0.32768000000000000000e5 +3649 3 10 55 -0.65536000000000000000e5 +3649 3 42 43 0.65536000000000000000e5 +3650 1 34 49 -0.65536000000000000000e5 +3650 1 44 51 0.65536000000000000000e5 +3650 3 42 44 0.65536000000000000000e5 +3651 3 35 48 -0.65536000000000000000e5 +3651 3 42 45 0.65536000000000000000e5 +3652 1 11 18 -0.65536000000000000000e5 +3652 1 45 52 0.65536000000000000000e5 +3652 3 6 19 0.65536000000000000000e5 +3652 3 15 44 0.65536000000000000000e5 +3652 3 17 30 0.65536000000000000000e5 +3652 3 32 45 0.65536000000000000000e5 +3652 3 42 46 0.65536000000000000000e5 +3653 1 24 55 -0.65536000000000000000e5 +3653 1 41 56 0.65536000000000000000e5 +3653 3 27 56 0.65536000000000000000e5 +3653 3 42 47 0.65536000000000000000e5 +3654 3 38 51 -0.65536000000000000000e5 +3654 3 42 48 0.65536000000000000000e5 +3655 1 1 48 0.32768000000000000000e5 +3655 1 2 49 0.32768000000000000000e5 +3655 1 8 39 0.65536000000000000000e5 +3655 1 9 40 0.65536000000000000000e5 +3655 1 10 41 -0.13107200000000000000e6 +3655 1 12 43 -0.26214400000000000000e6 +3655 1 23 38 0.32768000000000000000e5 +3655 1 26 41 -0.65536000000000000000e5 +3655 1 28 43 0.26214400000000000000e6 +3655 1 32 47 0.26214400000000000000e6 +3655 1 33 48 -0.13107200000000000000e6 +3655 1 40 55 0.65536000000000000000e5 +3655 2 2 32 0.32768000000000000000e5 +3655 2 4 34 -0.65536000000000000000e5 +3655 2 16 30 0.65536000000000000000e5 +3655 2 20 34 0.13107200000000000000e6 +3655 2 28 34 0.65536000000000000000e5 +3655 3 5 50 -0.65536000000000000000e5 +3655 3 9 38 0.65536000000000000000e5 +3655 3 10 55 -0.13107200000000000000e6 +3655 3 22 35 0.26214400000000000000e6 +3655 3 22 51 0.65536000000000000000e5 +3655 3 23 52 -0.13107200000000000000e6 +3655 3 27 40 -0.65536000000000000000e5 +3655 3 28 41 0.26214400000000000000e6 +3655 3 35 48 0.26214400000000000000e6 +3655 3 40 45 -0.13107200000000000000e6 +3655 3 42 49 0.65536000000000000000e5 +3655 4 2 30 0.65536000000000000000e5 +3655 4 6 34 0.13107200000000000000e6 +3655 4 7 35 0.65536000000000000000e5 +3655 4 22 34 -0.13107200000000000000e6 +3656 1 1 48 0.16384000000000000000e5 +3656 1 2 49 0.16384000000000000000e5 +3656 1 8 39 0.32768000000000000000e5 +3656 1 9 40 0.32768000000000000000e5 +3656 1 10 41 -0.65536000000000000000e5 +3656 1 12 43 -0.13107200000000000000e6 +3656 1 23 38 0.16384000000000000000e5 +3656 1 24 55 -0.32768000000000000000e5 +3656 1 26 41 -0.32768000000000000000e5 +3656 1 28 43 0.13107200000000000000e6 +3656 1 32 47 0.13107200000000000000e6 +3656 1 33 48 -0.65536000000000000000e5 +3656 1 40 55 0.32768000000000000000e5 +3656 1 41 56 0.32768000000000000000e5 +3656 2 2 32 0.16384000000000000000e5 +3656 2 4 34 -0.32768000000000000000e5 +3656 2 16 30 0.32768000000000000000e5 +3656 2 20 34 0.65536000000000000000e5 +3656 2 28 34 0.32768000000000000000e5 +3656 3 5 50 -0.32768000000000000000e5 +3656 3 9 38 0.32768000000000000000e5 +3656 3 10 55 -0.65536000000000000000e5 +3656 3 22 35 0.13107200000000000000e6 +3656 3 22 51 0.32768000000000000000e5 +3656 3 23 52 -0.65536000000000000000e5 +3656 3 27 40 -0.32768000000000000000e5 +3656 3 27 56 0.32768000000000000000e5 +3656 3 28 41 0.13107200000000000000e6 +3656 3 35 48 0.13107200000000000000e6 +3656 3 38 51 -0.32768000000000000000e5 +3656 3 40 45 -0.65536000000000000000e5 +3656 3 42 50 0.65536000000000000000e5 +3656 4 2 30 0.32768000000000000000e5 +3656 4 6 34 0.65536000000000000000e5 +3656 4 7 35 0.32768000000000000000e5 +3656 4 22 34 -0.65536000000000000000e5 +3656 4 29 33 -0.32768000000000000000e5 +3657 3 39 52 -0.65536000000000000000e5 +3657 3 42 51 0.65536000000000000000e5 +3658 3 42 52 0.65536000000000000000e5 +3658 3 45 50 -0.65536000000000000000e5 +3659 3 41 54 -0.65536000000000000000e5 +3659 3 42 53 0.65536000000000000000e5 +3660 3 42 54 0.65536000000000000000e5 +3660 3 49 50 -0.65536000000000000000e5 +3661 1 40 55 -0.65536000000000000000e5 +3661 1 54 55 0.65536000000000000000e5 +3661 3 42 56 0.65536000000000000000e5 +3661 3 49 50 0.65536000000000000000e5 +3662 3 40 45 -0.32768000000000000000e5 +3662 3 43 43 0.65536000000000000000e5 +3663 3 35 48 -0.65536000000000000000e5 +3663 3 43 44 0.65536000000000000000e5 +3664 1 11 18 -0.13107200000000000000e6 +3664 1 34 49 0.65536000000000000000e5 +3664 1 44 51 -0.65536000000000000000e5 +3664 1 45 52 0.13107200000000000000e6 +3664 3 6 19 0.13107200000000000000e6 +3664 3 15 44 0.13107200000000000000e6 +3664 3 17 30 0.13107200000000000000e6 +3664 3 32 45 0.13107200000000000000e6 +3664 3 35 48 0.65536000000000000000e5 +3664 3 43 45 0.65536000000000000000e5 +3664 4 25 33 0.65536000000000000000e5 +3665 3 36 49 -0.65536000000000000000e5 +3665 3 43 46 0.65536000000000000000e5 +3666 3 38 51 -0.65536000000000000000e5 +3666 3 43 47 0.65536000000000000000e5 +3667 1 1 48 0.32768000000000000000e5 +3667 1 2 49 0.32768000000000000000e5 +3667 1 8 39 0.65536000000000000000e5 +3667 1 9 40 0.65536000000000000000e5 +3667 1 10 41 -0.13107200000000000000e6 +3667 1 12 43 -0.26214400000000000000e6 +3667 1 23 38 0.32768000000000000000e5 +3667 1 26 41 -0.65536000000000000000e5 +3667 1 28 43 0.26214400000000000000e6 +3667 1 32 47 0.26214400000000000000e6 +3667 1 33 48 -0.13107200000000000000e6 +3667 1 40 55 0.65536000000000000000e5 +3667 2 2 32 0.32768000000000000000e5 +3667 2 4 34 -0.65536000000000000000e5 +3667 2 16 30 0.65536000000000000000e5 +3667 2 20 34 0.13107200000000000000e6 +3667 2 28 34 0.65536000000000000000e5 +3667 3 5 50 -0.65536000000000000000e5 +3667 3 9 38 0.65536000000000000000e5 +3667 3 10 55 -0.13107200000000000000e6 +3667 3 22 35 0.26214400000000000000e6 +3667 3 22 51 0.65536000000000000000e5 +3667 3 23 52 -0.13107200000000000000e6 +3667 3 27 40 -0.65536000000000000000e5 +3667 3 28 41 0.26214400000000000000e6 +3667 3 35 48 0.26214400000000000000e6 +3667 3 40 45 -0.13107200000000000000e6 +3667 3 43 48 0.65536000000000000000e5 +3667 4 2 30 0.65536000000000000000e5 +3667 4 6 34 0.13107200000000000000e6 +3667 4 7 35 0.65536000000000000000e5 +3667 4 22 34 -0.13107200000000000000e6 +3668 3 26 55 -0.65536000000000000000e5 +3668 3 43 49 0.65536000000000000000e5 +3669 3 39 52 -0.65536000000000000000e5 +3669 3 43 50 0.65536000000000000000e5 +3670 1 1 48 -0.16384000000000000000e5 +3670 1 2 49 -0.16384000000000000000e5 +3670 1 8 39 -0.32768000000000000000e5 +3670 1 9 40 -0.32768000000000000000e5 +3670 1 10 41 0.65536000000000000000e5 +3670 1 12 43 0.13107200000000000000e6 +3670 1 23 38 -0.16384000000000000000e5 +3670 1 24 55 0.32768000000000000000e5 +3670 1 26 41 0.32768000000000000000e5 +3670 1 28 43 -0.13107200000000000000e6 +3670 1 32 47 -0.13107200000000000000e6 +3670 1 33 48 0.65536000000000000000e5 +3670 1 40 55 -0.32768000000000000000e5 +3670 1 41 56 -0.32768000000000000000e5 +3670 2 2 32 -0.16384000000000000000e5 +3670 2 4 34 0.32768000000000000000e5 +3670 2 16 30 -0.32768000000000000000e5 +3670 2 20 34 -0.65536000000000000000e5 +3670 2 28 34 -0.32768000000000000000e5 +3670 3 5 50 0.32768000000000000000e5 +3670 3 9 38 -0.32768000000000000000e5 +3670 3 10 55 0.65536000000000000000e5 +3670 3 22 35 -0.13107200000000000000e6 +3670 3 22 51 -0.32768000000000000000e5 +3670 3 23 52 0.65536000000000000000e5 +3670 3 27 40 0.32768000000000000000e5 +3670 3 27 56 -0.32768000000000000000e5 +3670 3 28 41 -0.13107200000000000000e6 +3670 3 35 48 -0.13107200000000000000e6 +3670 3 38 51 0.32768000000000000000e5 +3670 3 39 52 0.65536000000000000000e5 +3670 3 40 45 0.65536000000000000000e5 +3670 3 43 51 0.65536000000000000000e5 +3670 3 45 50 -0.13107200000000000000e6 +3670 4 2 30 -0.32768000000000000000e5 +3670 4 6 34 -0.65536000000000000000e5 +3670 4 7 35 -0.32768000000000000000e5 +3670 4 22 34 0.65536000000000000000e5 +3670 4 29 33 0.32768000000000000000e5 +3670 4 30 34 0.65536000000000000000e5 +3671 3 43 53 0.65536000000000000000e5 +3671 3 49 50 -0.65536000000000000000e5 +3672 3 40 55 -0.65536000000000000000e5 +3672 3 43 54 0.65536000000000000000e5 +3673 1 18 49 -0.13107200000000000000e6 +3673 1 52 55 0.13107200000000000000e6 +3673 3 14 51 0.13107200000000000000e6 +3673 3 35 48 0.13107200000000000000e6 +3673 3 42 55 0.65536000000000000000e5 +3673 3 43 55 0.65536000000000000000e5 +3673 3 45 50 0.13107200000000000000e6 +3673 3 47 52 0.65536000000000000000e5 +3673 4 31 35 0.65536000000000000000e5 +3674 3 41 46 -0.32768000000000000000e5 +3674 3 44 44 0.65536000000000000000e5 +3675 1 11 18 -0.65536000000000000000e5 +3675 1 45 52 0.65536000000000000000e5 +3675 3 6 19 0.65536000000000000000e5 +3675 3 15 44 0.65536000000000000000e5 +3675 3 17 30 0.65536000000000000000e5 +3675 3 32 45 0.65536000000000000000e5 +3675 3 44 45 0.65536000000000000000e5 +3676 1 11 18 -0.32768000000000000000e5 +3676 1 45 52 0.32768000000000000000e5 +3676 3 6 19 0.32768000000000000000e5 +3676 3 15 44 0.32768000000000000000e5 +3676 3 17 30 0.32768000000000000000e5 +3676 3 32 45 0.32768000000000000000e5 +3676 3 36 49 -0.32768000000000000000e5 +3676 3 41 46 -0.32768000000000000000e5 +3676 3 44 46 0.65536000000000000000e5 +3676 4 15 35 -0.32768000000000000000e5 +3677 1 1 48 -0.16384000000000000000e5 +3677 1 2 49 -0.16384000000000000000e5 +3677 1 8 39 -0.32768000000000000000e5 +3677 1 9 40 -0.32768000000000000000e5 +3677 1 10 41 0.65536000000000000000e5 +3677 1 12 43 0.13107200000000000000e6 +3677 1 23 38 -0.16384000000000000000e5 +3677 1 24 55 0.32768000000000000000e5 +3677 1 26 41 0.32768000000000000000e5 +3677 1 28 43 -0.13107200000000000000e6 +3677 1 32 47 -0.13107200000000000000e6 +3677 1 33 48 0.65536000000000000000e5 +3677 1 40 55 -0.32768000000000000000e5 +3677 1 41 56 -0.32768000000000000000e5 +3677 1 44 51 -0.13107200000000000000e6 +3677 1 46 53 0.13107200000000000000e6 +3677 2 2 32 -0.16384000000000000000e5 +3677 2 4 34 0.32768000000000000000e5 +3677 2 16 30 -0.32768000000000000000e5 +3677 2 20 34 -0.65536000000000000000e5 +3677 2 28 34 -0.32768000000000000000e5 +3677 3 5 50 0.32768000000000000000e5 +3677 3 9 38 -0.32768000000000000000e5 +3677 3 10 55 0.65536000000000000000e5 +3677 3 22 35 -0.13107200000000000000e6 +3677 3 22 51 -0.32768000000000000000e5 +3677 3 23 52 0.65536000000000000000e5 +3677 3 27 40 0.32768000000000000000e5 +3677 3 27 56 -0.32768000000000000000e5 +3677 3 28 41 -0.13107200000000000000e6 +3677 3 35 48 -0.13107200000000000000e6 +3677 3 38 51 0.32768000000000000000e5 +3677 3 39 52 0.65536000000000000000e5 +3677 3 40 45 0.65536000000000000000e5 +3677 3 44 47 0.65536000000000000000e5 +3677 4 2 30 -0.32768000000000000000e5 +3677 4 6 34 -0.65536000000000000000e5 +3677 4 7 35 -0.32768000000000000000e5 +3677 4 22 34 0.65536000000000000000e5 +3677 4 23 35 0.65536000000000000000e5 +3677 4 29 33 0.32768000000000000000e5 +3678 1 1 48 0.16384000000000000000e5 +3678 1 2 49 0.16384000000000000000e5 +3678 1 8 39 0.32768000000000000000e5 +3678 1 9 40 0.32768000000000000000e5 +3678 1 10 41 -0.65536000000000000000e5 +3678 1 12 43 -0.13107200000000000000e6 +3678 1 23 38 0.16384000000000000000e5 +3678 1 24 55 -0.32768000000000000000e5 +3678 1 26 41 -0.32768000000000000000e5 +3678 1 28 43 0.13107200000000000000e6 +3678 1 32 47 0.13107200000000000000e6 +3678 1 33 48 -0.65536000000000000000e5 +3678 1 40 55 0.32768000000000000000e5 +3678 1 41 56 0.32768000000000000000e5 +3678 2 2 32 0.16384000000000000000e5 +3678 2 4 34 -0.32768000000000000000e5 +3678 2 16 30 0.32768000000000000000e5 +3678 2 20 34 0.65536000000000000000e5 +3678 2 28 34 0.32768000000000000000e5 +3678 3 5 50 -0.32768000000000000000e5 +3678 3 9 38 0.32768000000000000000e5 +3678 3 10 55 -0.65536000000000000000e5 +3678 3 22 35 0.13107200000000000000e6 +3678 3 22 51 0.32768000000000000000e5 +3678 3 23 52 -0.65536000000000000000e5 +3678 3 27 40 -0.32768000000000000000e5 +3678 3 27 56 0.32768000000000000000e5 +3678 3 28 41 0.13107200000000000000e6 +3678 3 35 48 0.13107200000000000000e6 +3678 3 38 51 -0.32768000000000000000e5 +3678 3 40 45 -0.65536000000000000000e5 +3678 3 44 48 0.65536000000000000000e5 +3678 4 2 30 0.32768000000000000000e5 +3678 4 6 34 0.65536000000000000000e5 +3678 4 7 35 0.32768000000000000000e5 +3678 4 22 34 -0.65536000000000000000e5 +3678 4 29 33 -0.32768000000000000000e5 +3679 3 39 52 -0.65536000000000000000e5 +3679 3 44 49 0.65536000000000000000e5 +3680 1 44 51 -0.65536000000000000000e5 +3680 1 46 53 0.65536000000000000000e5 +3680 3 44 50 0.65536000000000000000e5 +3681 3 44 51 0.65536000000000000000e5 +3681 3 45 50 -0.65536000000000000000e5 +3682 3 19 56 -0.65536000000000000000e5 +3682 3 44 52 0.65536000000000000000e5 +3683 3 44 53 0.65536000000000000000e5 +3683 3 47 52 -0.65536000000000000000e5 +3684 3 42 55 -0.65536000000000000000e5 +3684 3 44 54 0.65536000000000000000e5 +3685 1 18 49 -0.65536000000000000000e5 +3685 1 52 55 0.65536000000000000000e5 +3685 3 14 51 0.65536000000000000000e5 +3685 3 35 48 0.65536000000000000000e5 +3685 3 44 55 0.65536000000000000000e5 +3685 3 45 50 0.65536000000000000000e5 +3686 3 44 56 0.65536000000000000000e5 +3686 3 50 55 -0.65536000000000000000e5 +3687 3 36 49 -0.32768000000000000000e5 +3687 3 45 45 0.65536000000000000000e5 +3688 1 1 48 0.16384000000000000000e5 +3688 1 2 49 0.16384000000000000000e5 +3688 1 8 39 0.32768000000000000000e5 +3688 1 9 40 0.32768000000000000000e5 +3688 1 10 41 -0.65536000000000000000e5 +3688 1 12 43 -0.13107200000000000000e6 +3688 1 23 38 0.16384000000000000000e5 +3688 1 24 55 -0.32768000000000000000e5 +3688 1 26 41 -0.32768000000000000000e5 +3688 1 28 43 0.13107200000000000000e6 +3688 1 32 47 0.13107200000000000000e6 +3688 1 33 48 -0.65536000000000000000e5 +3688 1 40 55 0.32768000000000000000e5 +3688 1 41 56 0.32768000000000000000e5 +3688 2 2 32 0.16384000000000000000e5 +3688 2 4 34 -0.32768000000000000000e5 +3688 2 16 30 0.32768000000000000000e5 +3688 2 20 34 0.65536000000000000000e5 +3688 2 28 34 0.32768000000000000000e5 +3688 3 5 50 -0.32768000000000000000e5 +3688 3 9 38 0.32768000000000000000e5 +3688 3 10 55 -0.65536000000000000000e5 +3688 3 22 35 0.13107200000000000000e6 +3688 3 22 51 0.32768000000000000000e5 +3688 3 23 52 -0.65536000000000000000e5 +3688 3 27 40 -0.32768000000000000000e5 +3688 3 27 56 0.32768000000000000000e5 +3688 3 28 41 0.13107200000000000000e6 +3688 3 35 48 0.13107200000000000000e6 +3688 3 38 51 -0.32768000000000000000e5 +3688 3 40 45 -0.65536000000000000000e5 +3688 3 45 47 0.65536000000000000000e5 +3688 4 2 30 0.32768000000000000000e5 +3688 4 6 34 0.65536000000000000000e5 +3688 4 7 35 0.32768000000000000000e5 +3688 4 22 34 -0.65536000000000000000e5 +3688 4 29 33 -0.32768000000000000000e5 +3689 3 39 52 -0.65536000000000000000e5 +3689 3 45 48 0.65536000000000000000e5 +3690 1 1 48 -0.16384000000000000000e5 +3690 1 2 49 -0.16384000000000000000e5 +3690 1 8 39 -0.32768000000000000000e5 +3690 1 9 40 -0.32768000000000000000e5 +3690 1 10 41 0.65536000000000000000e5 +3690 1 12 43 0.13107200000000000000e6 +3690 1 23 38 -0.16384000000000000000e5 +3690 1 24 55 0.32768000000000000000e5 +3690 1 26 41 0.32768000000000000000e5 +3690 1 28 43 -0.13107200000000000000e6 +3690 1 32 47 -0.13107200000000000000e6 +3690 1 33 48 0.65536000000000000000e5 +3690 1 40 55 -0.32768000000000000000e5 +3690 1 41 56 -0.32768000000000000000e5 +3690 2 2 32 -0.16384000000000000000e5 +3690 2 4 34 0.32768000000000000000e5 +3690 2 16 30 -0.32768000000000000000e5 +3690 2 20 34 -0.65536000000000000000e5 +3690 2 28 34 -0.32768000000000000000e5 +3690 3 5 50 0.32768000000000000000e5 +3690 3 9 38 -0.32768000000000000000e5 +3690 3 10 55 0.65536000000000000000e5 +3690 3 22 35 -0.13107200000000000000e6 +3690 3 22 51 -0.32768000000000000000e5 +3690 3 23 52 0.65536000000000000000e5 +3690 3 27 40 0.32768000000000000000e5 +3690 3 27 56 -0.32768000000000000000e5 +3690 3 28 41 -0.13107200000000000000e6 +3690 3 35 48 -0.13107200000000000000e6 +3690 3 38 51 0.32768000000000000000e5 +3690 3 39 52 0.65536000000000000000e5 +3690 3 40 45 0.65536000000000000000e5 +3690 3 45 49 0.65536000000000000000e5 +3690 3 45 50 -0.13107200000000000000e6 +3690 4 2 30 -0.32768000000000000000e5 +3690 4 6 34 -0.65536000000000000000e5 +3690 4 7 35 -0.32768000000000000000e5 +3690 4 22 34 0.65536000000000000000e5 +3690 4 29 33 0.32768000000000000000e5 +3690 4 30 34 0.65536000000000000000e5 +3691 3 43 52 -0.65536000000000000000e5 +3691 3 45 51 0.65536000000000000000e5 +3692 3 45 52 0.65536000000000000000e5 +3692 3 46 51 -0.65536000000000000000e5 +3693 3 42 55 -0.65536000000000000000e5 +3693 3 45 53 0.65536000000000000000e5 +3694 1 18 49 -0.13107200000000000000e6 +3694 1 52 55 0.13107200000000000000e6 +3694 3 14 51 0.13107200000000000000e6 +3694 3 35 48 0.13107200000000000000e6 +3694 3 42 55 0.65536000000000000000e5 +3694 3 45 50 0.13107200000000000000e6 +3694 3 45 54 0.65536000000000000000e5 +3694 3 47 52 0.65536000000000000000e5 +3694 4 31 35 0.65536000000000000000e5 +3695 3 35 56 -0.65536000000000000000e5 +3695 3 45 55 0.65536000000000000000e5 +3696 3 21 55 -0.32768000000000000000e5 +3696 3 46 46 0.65536000000000000000e5 +3697 1 44 51 -0.65536000000000000000e5 +3697 1 46 53 0.65536000000000000000e5 +3697 3 46 47 0.65536000000000000000e5 +3698 3 45 50 -0.65536000000000000000e5 +3698 3 46 48 0.65536000000000000000e5 +3699 3 43 52 -0.65536000000000000000e5 +3699 3 46 49 0.65536000000000000000e5 +3700 3 19 56 -0.65536000000000000000e5 +3700 3 46 50 0.65536000000000000000e5 +3701 3 21 56 -0.65536000000000000000e5 +3701 3 46 52 0.65536000000000000000e5 +3702 1 18 49 -0.65536000000000000000e5 +3702 1 52 55 0.65536000000000000000e5 +3702 3 14 51 0.65536000000000000000e5 +3702 3 35 48 0.65536000000000000000e5 +3702 3 45 50 0.65536000000000000000e5 +3702 3 46 53 0.65536000000000000000e5 +3703 3 35 56 -0.65536000000000000000e5 +3703 3 46 54 0.65536000000000000000e5 +3704 3 46 56 0.65536000000000000000e5 +3704 3 52 55 -0.65536000000000000000e5 +3705 1 1 48 0.32768000000000000000e5 +3705 1 2 49 0.65536000000000000000e5 +3705 1 6 53 -0.32768000000000000000e5 +3705 1 8 39 0.65536000000000000000e5 +3705 1 9 40 0.65536000000000000000e5 +3705 1 10 41 -0.13107200000000000000e6 +3705 1 12 43 -0.26214400000000000000e6 +3705 1 23 38 0.32768000000000000000e5 +3705 1 24 39 0.32768000000000000000e5 +3705 1 24 55 0.65536000000000000000e5 +3705 1 25 56 0.32768000000000000000e5 +3705 1 26 41 -0.13107200000000000000e6 +3705 1 28 43 0.13107200000000000000e6 +3705 1 32 47 0.26214400000000000000e6 +3705 1 40 47 0.32768000000000000000e5 +3705 2 2 32 0.32768000000000000000e5 +3705 2 3 33 0.32768000000000000000e5 +3705 2 5 35 -0.32768000000000000000e5 +3705 2 16 30 0.65536000000000000000e5 +3705 2 20 34 0.13107200000000000000e6 +3705 2 33 35 0.32768000000000000000e5 +3705 3 9 38 0.65536000000000000000e5 +3705 3 22 35 0.26214400000000000000e6 +3705 3 22 51 -0.65536000000000000000e5 +3705 3 23 52 0.13107200000000000000e6 +3705 3 24 53 -0.32768000000000000000e5 +3705 3 25 38 0.32768000000000000000e5 +3705 3 25 54 -0.32768000000000000000e5 +3705 3 27 40 0.65536000000000000000e5 +3705 3 27 56 -0.65536000000000000000e5 +3705 3 28 41 0.26214400000000000000e6 +3705 3 38 51 0.65536000000000000000e5 +3705 3 39 40 -0.32768000000000000000e5 +3705 3 40 53 -0.32768000000000000000e5 +3705 3 41 54 0.65536000000000000000e5 +3705 3 47 47 0.65536000000000000000e5 +3705 4 2 30 0.65536000000000000000e5 +3705 4 6 34 0.13107200000000000000e6 +3705 4 7 35 -0.65536000000000000000e5 +3705 4 32 32 0.65536000000000000000e5 +3706 1 40 47 -0.65536000000000000000e5 +3706 1 47 54 0.65536000000000000000e5 +3706 3 24 53 0.65536000000000000000e5 +3706 3 47 48 0.65536000000000000000e5 +3707 1 1 48 -0.65536000000000000000e5 +3707 1 2 49 -0.13107200000000000000e6 +3707 1 6 53 0.65536000000000000000e5 +3707 1 8 39 -0.13107200000000000000e6 +3707 1 9 40 -0.13107200000000000000e6 +3707 1 10 41 0.26214400000000000000e6 +3707 1 12 43 0.52428800000000000000e6 +3707 1 23 38 -0.65536000000000000000e5 +3707 1 24 39 -0.65536000000000000000e5 +3707 1 24 55 -0.13107200000000000000e6 +3707 1 25 56 -0.65536000000000000000e5 +3707 1 26 41 0.26214400000000000000e6 +3707 1 28 43 -0.26214400000000000000e6 +3707 1 32 47 -0.52428800000000000000e6 +3707 1 47 54 -0.65536000000000000000e5 +3707 2 2 32 -0.65536000000000000000e5 +3707 2 3 33 -0.65536000000000000000e5 +3707 2 5 35 0.65536000000000000000e5 +3707 2 16 30 -0.13107200000000000000e6 +3707 2 20 34 -0.26214400000000000000e6 +3707 2 33 35 -0.65536000000000000000e5 +3707 3 9 38 -0.13107200000000000000e6 +3707 3 22 35 -0.52428800000000000000e6 +3707 3 22 51 0.13107200000000000000e6 +3707 3 23 52 -0.26214400000000000000e6 +3707 3 25 38 -0.65536000000000000000e5 +3707 3 25 54 0.65536000000000000000e5 +3707 3 27 40 -0.13107200000000000000e6 +3707 3 28 41 -0.52428800000000000000e6 +3707 3 38 51 -0.13107200000000000000e6 +3707 3 39 40 0.65536000000000000000e5 +3707 3 40 53 0.65536000000000000000e5 +3707 3 41 54 -0.13107200000000000000e6 +3707 3 47 49 0.65536000000000000000e5 +3707 4 2 30 -0.13107200000000000000e6 +3707 4 6 34 -0.26214400000000000000e6 +3707 4 7 35 0.13107200000000000000e6 +3708 3 27 56 -0.65536000000000000000e5 +3708 3 47 50 0.65536000000000000000e5 +3709 3 41 54 -0.65536000000000000000e5 +3709 3 47 51 0.65536000000000000000e5 +3710 1 1 48 0.13107200000000000000e6 +3710 1 2 49 0.19660800000000000000e6 +3710 1 6 53 -0.65536000000000000000e5 +3710 1 8 39 0.26214400000000000000e6 +3710 1 9 40 0.26214400000000000000e6 +3710 1 10 41 -0.52428800000000000000e6 +3710 1 12 43 -0.10485760000000000000e7 +3710 1 23 38 0.13107200000000000000e6 +3710 1 24 39 0.65536000000000000000e5 +3710 1 26 41 -0.39321600000000000000e6 +3710 1 28 43 0.78643200000000000000e6 +3710 1 32 47 0.10485760000000000000e7 +3710 1 49 56 -0.65536000000000000000e5 +3710 2 2 32 0.13107200000000000000e6 +3710 2 3 33 0.65536000000000000000e5 +3710 2 4 34 -0.13107200000000000000e6 +3710 2 5 35 -0.65536000000000000000e5 +3710 2 16 30 0.26214400000000000000e6 +3710 2 20 34 0.52428800000000000000e6 +3710 2 33 35 0.65536000000000000000e5 +3710 2 35 35 -0.13107200000000000000e6 +3710 3 5 50 -0.13107200000000000000e6 +3710 3 9 38 0.26214400000000000000e6 +3710 3 22 35 0.10485760000000000000e7 +3710 3 25 38 0.65536000000000000000e5 +3710 3 25 54 -0.65536000000000000000e5 +3710 3 28 41 0.10485760000000000000e7 +3710 3 39 40 -0.65536000000000000000e5 +3710 3 40 53 -0.65536000000000000000e5 +3710 3 41 56 -0.13107200000000000000e6 +3710 3 47 53 0.65536000000000000000e5 +3710 3 48 53 0.65536000000000000000e5 +3710 4 2 30 0.26214400000000000000e6 +3710 4 6 34 0.52428800000000000000e6 +3711 3 47 54 0.65536000000000000000e5 +3711 3 48 53 -0.65536000000000000000e5 +3712 3 41 56 -0.65536000000000000000e5 +3712 3 47 55 0.65536000000000000000e5 +3713 1 1 48 0.65536000000000000000e5 +3713 1 2 49 0.13107200000000000000e6 +3713 1 6 53 -0.65536000000000000000e5 +3713 1 8 39 0.13107200000000000000e6 +3713 1 9 40 0.13107200000000000000e6 +3713 1 10 41 -0.26214400000000000000e6 +3713 1 12 43 -0.52428800000000000000e6 +3713 1 23 38 0.65536000000000000000e5 +3713 1 24 39 0.65536000000000000000e5 +3713 1 24 55 0.13107200000000000000e6 +3713 1 26 41 -0.26214400000000000000e6 +3713 1 28 43 0.26214400000000000000e6 +3713 1 32 47 0.52428800000000000000e6 +3713 1 47 54 0.65536000000000000000e5 +3713 1 53 56 0.65536000000000000000e5 +3713 2 2 32 0.65536000000000000000e5 +3713 2 3 33 0.65536000000000000000e5 +3713 2 5 35 -0.65536000000000000000e5 +3713 2 16 30 0.13107200000000000000e6 +3713 2 20 34 0.26214400000000000000e6 +3713 2 33 35 0.65536000000000000000e5 +3713 3 9 38 0.13107200000000000000e6 +3713 3 22 35 0.52428800000000000000e6 +3713 3 22 51 -0.13107200000000000000e6 +3713 3 23 52 0.26214400000000000000e6 +3713 3 25 38 0.65536000000000000000e5 +3713 3 25 54 -0.65536000000000000000e5 +3713 3 27 40 0.13107200000000000000e6 +3713 3 28 41 0.52428800000000000000e6 +3713 3 38 51 0.13107200000000000000e6 +3713 3 39 40 -0.65536000000000000000e5 +3713 3 40 53 -0.65536000000000000000e5 +3713 3 41 54 0.13107200000000000000e6 +3713 3 47 56 0.65536000000000000000e5 +3713 3 48 53 0.65536000000000000000e5 +3713 4 2 30 0.13107200000000000000e6 +3713 4 6 34 0.26214400000000000000e6 +3713 4 7 35 -0.13107200000000000000e6 +3714 1 1 48 -0.32768000000000000000e5 +3714 1 2 49 -0.65536000000000000000e5 +3714 1 6 53 0.32768000000000000000e5 +3714 1 8 39 -0.65536000000000000000e5 +3714 1 9 40 -0.65536000000000000000e5 +3714 1 10 41 0.13107200000000000000e6 +3714 1 12 43 0.26214400000000000000e6 +3714 1 23 38 -0.32768000000000000000e5 +3714 1 24 39 -0.32768000000000000000e5 +3714 1 24 55 -0.65536000000000000000e5 +3714 1 25 56 -0.32768000000000000000e5 +3714 1 26 41 0.13107200000000000000e6 +3714 1 28 43 -0.13107200000000000000e6 +3714 1 32 47 -0.26214400000000000000e6 +3714 1 47 54 -0.32768000000000000000e5 +3714 2 2 32 -0.32768000000000000000e5 +3714 2 3 33 -0.32768000000000000000e5 +3714 2 5 35 0.32768000000000000000e5 +3714 2 16 30 -0.65536000000000000000e5 +3714 2 20 34 -0.13107200000000000000e6 +3714 2 33 35 -0.32768000000000000000e5 +3714 3 9 38 -0.65536000000000000000e5 +3714 3 22 35 -0.26214400000000000000e6 +3714 3 22 51 0.65536000000000000000e5 +3714 3 23 52 -0.13107200000000000000e6 +3714 3 25 38 -0.32768000000000000000e5 +3714 3 25 54 0.32768000000000000000e5 +3714 3 27 40 -0.65536000000000000000e5 +3714 3 28 41 -0.26214400000000000000e6 +3714 3 38 51 -0.65536000000000000000e5 +3714 3 39 40 0.32768000000000000000e5 +3714 3 40 53 0.32768000000000000000e5 +3714 3 41 54 -0.65536000000000000000e5 +3714 3 48 48 0.65536000000000000000e5 +3714 4 2 30 -0.65536000000000000000e5 +3714 4 6 34 -0.13107200000000000000e6 +3714 4 7 35 0.65536000000000000000e5 +3715 3 40 53 -0.65536000000000000000e5 +3715 3 48 49 0.65536000000000000000e5 +3716 3 41 54 -0.65536000000000000000e5 +3716 3 48 50 0.65536000000000000000e5 +3717 3 48 51 0.65536000000000000000e5 +3717 3 49 50 -0.65536000000000000000e5 +3718 3 42 55 -0.65536000000000000000e5 +3718 3 48 52 0.65536000000000000000e5 +3719 1 1 48 -0.13107200000000000000e6 +3719 1 2 49 -0.19660800000000000000e6 +3719 1 6 53 0.65536000000000000000e5 +3719 1 8 39 -0.26214400000000000000e6 +3719 1 9 40 -0.26214400000000000000e6 +3719 1 10 41 0.52428800000000000000e6 +3719 1 12 43 0.10485760000000000000e7 +3719 1 23 38 -0.13107200000000000000e6 +3719 1 24 39 -0.65536000000000000000e5 +3719 1 26 41 0.39321600000000000000e6 +3719 1 28 43 -0.78643200000000000000e6 +3719 1 32 47 -0.10485760000000000000e7 +3719 1 49 56 0.65536000000000000000e5 +3719 2 2 32 -0.13107200000000000000e6 +3719 2 3 33 -0.65536000000000000000e5 +3719 2 4 34 0.13107200000000000000e6 +3719 2 5 35 0.65536000000000000000e5 +3719 2 16 30 -0.26214400000000000000e6 +3719 2 20 34 -0.52428800000000000000e6 +3719 3 5 50 0.13107200000000000000e6 +3719 3 9 38 -0.26214400000000000000e6 +3719 3 22 35 -0.10485760000000000000e7 +3719 3 25 38 -0.65536000000000000000e5 +3719 3 25 54 0.65536000000000000000e5 +3719 3 28 41 -0.10485760000000000000e7 +3719 3 39 40 0.65536000000000000000e5 +3719 3 40 53 0.65536000000000000000e5 +3719 3 48 54 0.65536000000000000000e5 +3719 4 2 30 -0.26214400000000000000e6 +3719 4 6 34 -0.52428800000000000000e6 +3720 1 40 55 -0.65536000000000000000e5 +3720 1 54 55 0.65536000000000000000e5 +3720 3 48 55 0.65536000000000000000e5 +3720 3 49 50 0.65536000000000000000e5 +3721 3 48 56 0.65536000000000000000e5 +3721 3 53 54 -0.65536000000000000000e5 +3722 1 1 48 0.32768000000000000000e5 +3722 1 2 49 0.65536000000000000000e5 +3722 1 6 53 -0.32768000000000000000e5 +3722 1 8 39 0.65536000000000000000e5 +3722 1 9 40 0.65536000000000000000e5 +3722 1 10 41 -0.13107200000000000000e6 +3722 1 12 43 -0.26214400000000000000e6 +3722 1 23 38 0.32768000000000000000e5 +3722 1 24 39 0.32768000000000000000e5 +3722 1 24 55 0.65536000000000000000e5 +3722 1 25 56 0.32768000000000000000e5 +3722 1 26 41 -0.13107200000000000000e6 +3722 1 28 43 0.13107200000000000000e6 +3722 1 32 47 0.26214400000000000000e6 +3722 1 47 54 0.32768000000000000000e5 +3722 2 2 32 0.32768000000000000000e5 +3722 2 3 33 0.32768000000000000000e5 +3722 2 5 35 -0.32768000000000000000e5 +3722 2 16 30 0.65536000000000000000e5 +3722 2 20 34 0.13107200000000000000e6 +3722 2 33 35 0.32768000000000000000e5 +3722 3 9 38 0.65536000000000000000e5 +3722 3 22 35 0.26214400000000000000e6 +3722 3 22 51 -0.65536000000000000000e5 +3722 3 23 52 0.13107200000000000000e6 +3722 3 25 38 0.32768000000000000000e5 +3722 3 25 54 -0.32768000000000000000e5 +3722 3 27 40 0.65536000000000000000e5 +3722 3 28 41 0.26214400000000000000e6 +3722 3 38 51 0.65536000000000000000e5 +3722 3 39 40 -0.32768000000000000000e5 +3722 3 41 54 0.65536000000000000000e5 +3722 3 49 49 0.65536000000000000000e5 +3722 3 49 50 -0.65536000000000000000e5 +3722 4 2 30 0.65536000000000000000e5 +3722 4 6 34 0.13107200000000000000e6 +3722 4 7 35 -0.65536000000000000000e5 +3722 4 33 33 0.65536000000000000000e5 +3723 3 40 55 -0.65536000000000000000e5 +3723 3 49 51 0.65536000000000000000e5 +3724 1 18 49 -0.13107200000000000000e6 +3724 1 52 55 0.13107200000000000000e6 +3724 3 14 51 0.13107200000000000000e6 +3724 3 35 48 0.13107200000000000000e6 +3724 3 42 55 0.65536000000000000000e5 +3724 3 45 50 0.13107200000000000000e6 +3724 3 47 52 0.65536000000000000000e5 +3724 3 49 52 0.65536000000000000000e5 +3724 4 31 35 0.65536000000000000000e5 +3725 1 1 48 -0.13107200000000000000e6 +3725 1 2 49 -0.19660800000000000000e6 +3725 1 6 53 0.65536000000000000000e5 +3725 1 8 39 -0.26214400000000000000e6 +3725 1 9 40 -0.26214400000000000000e6 +3725 1 10 41 0.52428800000000000000e6 +3725 1 12 43 0.10485760000000000000e7 +3725 1 23 38 -0.13107200000000000000e6 +3725 1 24 39 -0.65536000000000000000e5 +3725 1 26 41 0.39321600000000000000e6 +3725 1 28 43 -0.78643200000000000000e6 +3725 1 32 47 -0.10485760000000000000e7 +3725 1 49 56 0.65536000000000000000e5 +3725 2 2 32 -0.13107200000000000000e6 +3725 2 3 33 -0.65536000000000000000e5 +3725 2 4 34 0.13107200000000000000e6 +3725 2 5 35 0.65536000000000000000e5 +3725 2 16 30 -0.26214400000000000000e6 +3725 2 20 34 -0.52428800000000000000e6 +3725 3 5 50 0.13107200000000000000e6 +3725 3 9 38 -0.26214400000000000000e6 +3725 3 22 35 -0.10485760000000000000e7 +3725 3 25 38 -0.65536000000000000000e5 +3725 3 25 54 0.65536000000000000000e5 +3725 3 28 41 -0.10485760000000000000e7 +3725 3 39 40 0.65536000000000000000e5 +3725 3 40 53 0.65536000000000000000e5 +3725 3 49 53 0.65536000000000000000e5 +3725 4 2 30 -0.26214400000000000000e6 +3725 4 6 34 -0.52428800000000000000e6 +3726 3 43 56 -0.65536000000000000000e5 +3726 3 49 55 0.65536000000000000000e5 +3727 1 1 48 -0.65536000000000000000e5 +3727 1 2 49 -0.13107200000000000000e6 +3727 1 6 53 0.65536000000000000000e5 +3727 1 8 39 -0.13107200000000000000e6 +3727 1 9 40 -0.13107200000000000000e6 +3727 1 10 41 0.26214400000000000000e6 +3727 1 12 43 0.52428800000000000000e6 +3727 1 23 38 -0.65536000000000000000e5 +3727 1 24 39 -0.65536000000000000000e5 +3727 1 24 55 -0.13107200000000000000e6 +3727 1 26 41 0.26214400000000000000e6 +3727 1 28 43 -0.26214400000000000000e6 +3727 1 32 47 -0.52428800000000000000e6 +3727 1 47 54 -0.65536000000000000000e5 +3727 1 53 56 -0.65536000000000000000e5 +3727 1 54 55 -0.13107200000000000000e6 +3727 1 55 56 0.13107200000000000000e6 +3727 2 2 32 -0.65536000000000000000e5 +3727 2 3 33 -0.65536000000000000000e5 +3727 2 5 35 0.65536000000000000000e5 +3727 2 16 30 -0.13107200000000000000e6 +3727 2 20 34 -0.26214400000000000000e6 +3727 2 33 35 -0.65536000000000000000e5 +3727 3 9 38 -0.13107200000000000000e6 +3727 3 22 35 -0.52428800000000000000e6 +3727 3 22 51 0.13107200000000000000e6 +3727 3 23 52 -0.26214400000000000000e6 +3727 3 25 38 -0.65536000000000000000e5 +3727 3 25 54 0.65536000000000000000e5 +3727 3 27 40 -0.13107200000000000000e6 +3727 3 28 41 -0.52428800000000000000e6 +3727 3 38 51 -0.13107200000000000000e6 +3727 3 39 40 0.65536000000000000000e5 +3727 3 40 53 0.65536000000000000000e5 +3727 3 41 54 -0.13107200000000000000e6 +3727 3 48 53 -0.65536000000000000000e5 +3727 3 49 56 0.65536000000000000000e5 +3727 3 53 54 0.65536000000000000000e5 +3727 4 2 30 -0.13107200000000000000e6 +3727 4 6 34 -0.26214400000000000000e6 +3727 4 7 35 0.13107200000000000000e6 +3727 4 35 35 0.13107200000000000000e6 +3728 3 47 52 -0.32768000000000000000e5 +3728 3 50 50 0.65536000000000000000e5 +3729 3 42 55 -0.65536000000000000000e5 +3729 3 50 51 0.65536000000000000000e5 +3730 1 18 49 -0.65536000000000000000e5 +3730 1 52 55 0.65536000000000000000e5 +3730 3 14 51 0.65536000000000000000e5 +3730 3 35 48 0.65536000000000000000e5 +3730 3 45 50 0.65536000000000000000e5 +3730 3 50 52 0.65536000000000000000e5 +3731 3 41 56 -0.65536000000000000000e5 +3731 3 50 53 0.65536000000000000000e5 +3732 1 40 55 -0.65536000000000000000e5 +3732 1 54 55 0.65536000000000000000e5 +3732 3 49 50 0.65536000000000000000e5 +3732 3 50 54 0.65536000000000000000e5 +3733 1 54 55 -0.65536000000000000000e5 +3733 1 55 56 0.65536000000000000000e5 +3733 3 50 56 0.65536000000000000000e5 +3734 1 18 49 -0.65536000000000000000e5 +3734 1 52 55 0.65536000000000000000e5 +3734 3 14 51 0.65536000000000000000e5 +3734 3 35 48 0.65536000000000000000e5 +3734 3 42 55 0.32768000000000000000e5 +3734 3 45 50 0.65536000000000000000e5 +3734 3 47 52 0.32768000000000000000e5 +3734 3 51 51 0.65536000000000000000e5 +3734 4 31 35 0.32768000000000000000e5 +3735 3 35 56 -0.65536000000000000000e5 +3735 3 51 52 0.65536000000000000000e5 +3736 1 40 55 -0.65536000000000000000e5 +3736 1 54 55 0.65536000000000000000e5 +3736 3 49 50 0.65536000000000000000e5 +3736 3 51 53 0.65536000000000000000e5 +3737 3 43 56 -0.65536000000000000000e5 +3737 3 51 54 0.65536000000000000000e5 +3738 3 45 56 -0.65536000000000000000e5 +3738 3 51 55 0.65536000000000000000e5 +3739 3 46 55 -0.32768000000000000000e5 +3739 3 52 52 0.65536000000000000000e5 +3740 3 50 55 -0.65536000000000000000e5 +3740 3 52 53 0.65536000000000000000e5 +3741 3 45 56 -0.65536000000000000000e5 +3741 3 52 54 0.65536000000000000000e5 +3742 3 52 56 0.65536000000000000000e5 +3742 3 55 55 -0.13107200000000000000e6 +3743 1 1 48 0.32768000000000000000e5 +3743 1 2 49 0.65536000000000000000e5 +3743 1 6 53 -0.32768000000000000000e5 +3743 1 8 39 0.65536000000000000000e5 +3743 1 9 40 0.65536000000000000000e5 +3743 1 10 41 -0.13107200000000000000e6 +3743 1 12 43 -0.26214400000000000000e6 +3743 1 23 38 0.32768000000000000000e5 +3743 1 24 39 0.32768000000000000000e5 +3743 1 24 55 0.65536000000000000000e5 +3743 1 26 41 -0.13107200000000000000e6 +3743 1 28 43 0.13107200000000000000e6 +3743 1 32 47 0.26214400000000000000e6 +3743 1 47 54 0.32768000000000000000e5 +3743 1 53 56 0.32768000000000000000e5 +3743 2 2 32 0.32768000000000000000e5 +3743 2 3 33 0.32768000000000000000e5 +3743 2 5 35 -0.32768000000000000000e5 +3743 2 16 30 0.65536000000000000000e5 +3743 2 20 34 0.13107200000000000000e6 +3743 2 33 35 0.32768000000000000000e5 +3743 3 9 38 0.65536000000000000000e5 +3743 3 22 35 0.26214400000000000000e6 +3743 3 22 51 -0.65536000000000000000e5 +3743 3 23 52 0.13107200000000000000e6 +3743 3 25 38 0.32768000000000000000e5 +3743 3 25 54 -0.32768000000000000000e5 +3743 3 27 40 0.65536000000000000000e5 +3743 3 28 41 0.26214400000000000000e6 +3743 3 38 51 0.65536000000000000000e5 +3743 3 39 40 -0.32768000000000000000e5 +3743 3 40 53 -0.32768000000000000000e5 +3743 3 41 54 0.65536000000000000000e5 +3743 3 48 53 0.32768000000000000000e5 +3743 3 53 53 0.65536000000000000000e5 +3743 4 2 30 0.65536000000000000000e5 +3743 4 6 34 0.13107200000000000000e6 +3743 4 7 35 -0.65536000000000000000e5 +3744 1 54 55 -0.65536000000000000000e5 +3744 1 55 56 0.65536000000000000000e5 +3744 3 53 55 0.65536000000000000000e5 +3745 1 1 48 -0.32768000000000000000e5 +3745 1 2 49 -0.65536000000000000000e5 +3745 1 6 53 0.32768000000000000000e5 +3745 1 8 39 -0.65536000000000000000e5 +3745 1 9 40 -0.65536000000000000000e5 +3745 1 10 41 0.13107200000000000000e6 +3745 1 12 43 0.26214400000000000000e6 +3745 1 23 38 -0.32768000000000000000e5 +3745 1 24 39 -0.32768000000000000000e5 +3745 1 24 55 -0.65536000000000000000e5 +3745 1 26 41 0.13107200000000000000e6 +3745 1 28 43 -0.13107200000000000000e6 +3745 1 32 47 -0.26214400000000000000e6 +3745 1 47 54 -0.32768000000000000000e5 +3745 1 53 56 -0.32768000000000000000e5 +3745 1 54 55 -0.65536000000000000000e5 +3745 1 55 56 0.65536000000000000000e5 +3745 2 2 32 -0.32768000000000000000e5 +3745 2 3 33 -0.32768000000000000000e5 +3745 2 5 35 0.32768000000000000000e5 +3745 2 16 30 -0.65536000000000000000e5 +3745 2 20 34 -0.13107200000000000000e6 +3745 2 33 35 -0.32768000000000000000e5 +3745 3 9 38 -0.65536000000000000000e5 +3745 3 22 35 -0.26214400000000000000e6 +3745 3 22 51 0.65536000000000000000e5 +3745 3 23 52 -0.13107200000000000000e6 +3745 3 25 38 -0.32768000000000000000e5 +3745 3 25 54 0.32768000000000000000e5 +3745 3 27 40 -0.65536000000000000000e5 +3745 3 28 41 -0.26214400000000000000e6 +3745 3 38 51 -0.65536000000000000000e5 +3745 3 39 40 0.32768000000000000000e5 +3745 3 40 53 0.32768000000000000000e5 +3745 3 41 54 -0.65536000000000000000e5 +3745 3 48 53 -0.32768000000000000000e5 +3745 3 53 54 0.32768000000000000000e5 +3745 3 54 54 0.65536000000000000000e5 +3745 4 2 30 -0.65536000000000000000e5 +3745 4 6 34 -0.13107200000000000000e6 +3745 4 7 35 0.65536000000000000000e5 +3745 4 35 35 0.65536000000000000000e5 +3746 3 51 56 -0.65536000000000000000e5 +3746 3 54 55 0.65536000000000000000e5 +3747 1 2 5 -0.65536000000000000000e5 +3747 1 2 9 0.13107200000000000000e6 +3747 1 2 25 0.65536000000000000000e5 +3747 1 8 23 -0.13107200000000000000e6 +3747 3 1 2 0.65536000000000000000e5 +3747 3 2 7 -0.13107200000000000000e6 +3747 4 1 2 0.65536000000000000000e5 +3747 4 2 2 -0.13107200000000000000e6 +3748 4 1 3 0.65536000000000000000e5 +3748 4 2 2 -0.13107200000000000000e6 +3749 1 1 48 0.13107200000000000000e6 +3749 1 2 5 0.65536000000000000000e5 +3749 1 2 9 0.13107200000000000000e6 +3749 1 2 25 -0.65536000000000000000e5 +3749 1 2 33 0.52428800000000000000e6 +3749 1 2 49 0.13107200000000000000e6 +3749 1 3 34 -0.52428800000000000000e6 +3749 1 4 11 -0.13107200000000000000e6 +3749 1 8 39 0.13107200000000000000e6 +3749 1 9 40 0.13107200000000000000e6 +3749 1 10 41 0.26214400000000000000e6 +3749 1 11 42 -0.26214400000000000000e6 +3749 1 12 43 -0.10485760000000000000e7 +3749 1 23 38 0.13107200000000000000e6 +3749 1 26 41 -0.13107200000000000000e6 +3749 1 28 43 0.52428800000000000000e6 +3749 1 32 47 0.78643200000000000000e6 +3749 1 33 48 0.26214400000000000000e6 +3749 2 2 8 0.13107200000000000000e6 +3749 2 2 32 0.13107200000000000000e6 +3749 2 3 9 -0.13107200000000000000e6 +3749 2 7 21 0.26214400000000000000e6 +3749 2 12 26 0.26214400000000000000e6 +3749 2 16 30 0.13107200000000000000e6 +3749 2 20 34 0.26214400000000000000e6 +3749 3 1 6 0.65536000000000000000e5 +3749 3 1 14 -0.26214400000000000000e6 +3749 3 1 30 -0.13107200000000000000e6 +3749 3 2 3 0.65536000000000000000e5 +3749 3 2 15 0.26214400000000000000e6 +3749 3 3 32 0.52428800000000000000e6 +3749 3 4 9 -0.13107200000000000000e6 +3749 3 8 37 0.13107200000000000000e6 +3749 3 10 23 -0.26214400000000000000e6 +3749 3 13 42 0.52428800000000000000e6 +3749 3 22 35 0.52428800000000000000e6 +3749 3 28 41 0.78643200000000000000e6 +3749 3 29 42 0.26214400000000000000e6 +3749 4 1 4 0.65536000000000000000e5 +3749 4 2 30 0.13107200000000000000e6 +3749 4 3 31 -0.26214400000000000000e6 +3749 4 6 18 -0.13107200000000000000e6 +3749 4 6 34 0.26214400000000000000e6 +3750 1 1 8 0.65536000000000000000e5 +3750 1 1 48 -0.65536000000000000000e5 +3750 1 2 9 0.65536000000000000000e5 +3750 1 2 33 -0.26214400000000000000e6 +3750 1 2 49 -0.65536000000000000000e5 +3750 1 3 34 0.26214400000000000000e6 +3750 1 4 11 0.65536000000000000000e5 +3750 1 7 22 -0.65536000000000000000e5 +3750 1 8 23 -0.13107200000000000000e6 +3750 1 8 39 -0.65536000000000000000e5 +3750 1 9 40 -0.65536000000000000000e5 +3750 1 10 41 -0.13107200000000000000e6 +3750 1 11 42 0.13107200000000000000e6 +3750 1 12 43 0.52428800000000000000e6 +3750 1 23 38 -0.65536000000000000000e5 +3750 1 26 41 0.65536000000000000000e5 +3750 1 28 43 -0.26214400000000000000e6 +3750 1 32 47 -0.39321600000000000000e6 +3750 1 33 48 -0.13107200000000000000e6 +3750 2 2 8 -0.65536000000000000000e5 +3750 2 2 32 -0.65536000000000000000e5 +3750 2 3 9 0.65536000000000000000e5 +3750 2 7 21 -0.13107200000000000000e6 +3750 2 12 26 -0.13107200000000000000e6 +3750 2 16 30 -0.65536000000000000000e5 +3750 2 20 34 -0.13107200000000000000e6 +3750 3 1 14 0.26214400000000000000e6 +3750 3 1 30 0.65536000000000000000e5 +3750 3 2 7 0.13107200000000000000e6 +3750 3 2 15 -0.13107200000000000000e6 +3750 3 3 32 -0.26214400000000000000e6 +3750 3 4 9 0.65536000000000000000e5 +3750 3 7 12 -0.26214400000000000000e6 +3750 3 8 37 -0.65536000000000000000e5 +3750 3 10 23 0.13107200000000000000e6 +3750 3 13 42 -0.26214400000000000000e6 +3750 3 22 35 -0.26214400000000000000e6 +3750 3 28 41 -0.39321600000000000000e6 +3750 3 29 42 -0.13107200000000000000e6 +3750 4 1 6 0.65536000000000000000e5 +3750 4 2 6 0.65536000000000000000e5 +3750 4 2 30 -0.65536000000000000000e5 +3750 4 3 31 0.13107200000000000000e6 +3750 4 6 6 0.26214400000000000000e6 +3750 4 6 18 0.65536000000000000000e5 +3750 4 6 34 -0.13107200000000000000e6 +3751 4 1 7 0.65536000000000000000e5 +3751 4 2 6 -0.65536000000000000000e5 +3752 1 1 48 -0.32768000000000000000e5 +3752 1 2 33 -0.26214400000000000000e6 +3752 1 2 49 -0.32768000000000000000e5 +3752 1 3 34 0.26214400000000000000e6 +3752 1 8 23 -0.65536000000000000000e5 +3752 1 8 39 -0.65536000000000000000e5 +3752 1 10 41 -0.13107200000000000000e6 +3752 1 11 42 0.13107200000000000000e6 +3752 1 12 43 0.26214400000000000000e6 +3752 1 23 38 -0.32768000000000000000e5 +3752 1 28 43 -0.13107200000000000000e6 +3752 1 32 47 -0.13107200000000000000e6 +3752 1 33 48 -0.13107200000000000000e6 +3752 2 2 8 -0.65536000000000000000e5 +3752 2 2 32 -0.32768000000000000000e5 +3752 2 7 21 -0.13107200000000000000e6 +3752 2 12 26 -0.13107200000000000000e6 +3752 3 3 32 -0.13107200000000000000e6 +3752 3 8 37 -0.65536000000000000000e5 +3752 3 10 23 0.65536000000000000000e5 +3752 3 13 42 -0.26214400000000000000e6 +3752 3 28 41 -0.13107200000000000000e6 +3752 3 29 42 -0.13107200000000000000e6 +3752 4 1 8 0.65536000000000000000e5 +3752 4 3 31 0.13107200000000000000e6 +3752 4 6 18 0.65536000000000000000e5 +3753 1 1 48 -0.32768000000000000000e5 +3753 1 2 9 -0.65536000000000000000e5 +3753 1 2 33 -0.26214400000000000000e6 +3753 1 2 49 -0.32768000000000000000e5 +3753 1 3 34 0.26214400000000000000e6 +3753 1 8 39 -0.65536000000000000000e5 +3753 1 10 41 -0.13107200000000000000e6 +3753 1 11 42 0.13107200000000000000e6 +3753 1 12 43 0.26214400000000000000e6 +3753 1 23 38 -0.32768000000000000000e5 +3753 1 28 43 -0.13107200000000000000e6 +3753 1 32 47 -0.13107200000000000000e6 +3753 1 33 48 -0.13107200000000000000e6 +3753 2 2 8 -0.65536000000000000000e5 +3753 2 2 32 -0.32768000000000000000e5 +3753 2 4 10 0.13107200000000000000e6 +3753 2 7 21 -0.26214400000000000000e6 +3753 2 12 26 -0.13107200000000000000e6 +3753 3 1 14 0.26214400000000000000e6 +3753 3 2 15 0.13107200000000000000e6 +3753 3 3 16 -0.26214400000000000000e6 +3753 3 3 32 -0.13107200000000000000e6 +3753 3 4 9 0.65536000000000000000e5 +3753 3 8 37 -0.65536000000000000000e5 +3753 3 10 23 0.65536000000000000000e5 +3753 3 13 42 -0.26214400000000000000e6 +3753 3 28 41 -0.13107200000000000000e6 +3753 3 29 42 -0.13107200000000000000e6 +3753 4 1 9 0.65536000000000000000e5 +3753 4 3 31 0.13107200000000000000e6 +3753 4 6 18 0.65536000000000000000e5 +3754 4 1 10 0.65536000000000000000e5 +3754 4 6 6 -0.13107200000000000000e6 +3755 1 1 48 -0.32768000000000000000e5 +3755 1 2 17 -0.13107200000000000000e6 +3755 1 2 33 -0.13107200000000000000e6 +3755 1 2 49 -0.32768000000000000000e5 +3755 1 3 34 0.13107200000000000000e6 +3755 1 4 11 0.32768000000000000000e5 +3755 1 8 23 -0.32768000000000000000e5 +3755 1 8 39 -0.32768000000000000000e5 +3755 1 9 40 -0.32768000000000000000e5 +3755 1 10 41 -0.65536000000000000000e5 +3755 1 11 42 0.65536000000000000000e5 +3755 1 12 43 0.26214400000000000000e6 +3755 1 16 23 0.13107200000000000000e6 +3755 1 23 38 -0.32768000000000000000e5 +3755 1 26 41 0.32768000000000000000e5 +3755 1 28 43 -0.13107200000000000000e6 +3755 1 32 47 -0.19660800000000000000e6 +3755 1 33 48 -0.65536000000000000000e5 +3755 2 2 8 -0.32768000000000000000e5 +3755 2 2 32 -0.32768000000000000000e5 +3755 2 3 9 0.32768000000000000000e5 +3755 2 4 10 -0.65536000000000000000e5 +3755 2 12 26 -0.65536000000000000000e5 +3755 2 16 30 -0.32768000000000000000e5 +3755 2 20 34 -0.65536000000000000000e5 +3755 3 1 14 0.65536000000000000000e5 +3755 3 1 30 0.32768000000000000000e5 +3755 3 2 7 0.32768000000000000000e5 +3755 3 2 15 -0.13107200000000000000e6 +3755 3 3 16 0.13107200000000000000e6 +3755 3 3 32 -0.13107200000000000000e6 +3755 3 4 9 0.32768000000000000000e5 +3755 3 8 37 -0.32768000000000000000e5 +3755 3 10 23 0.65536000000000000000e5 +3755 3 13 42 -0.13107200000000000000e6 +3755 3 22 35 -0.13107200000000000000e6 +3755 3 28 41 -0.19660800000000000000e6 +3755 3 29 42 -0.65536000000000000000e5 +3755 4 1 11 0.65536000000000000000e5 +3755 4 2 6 0.32768000000000000000e5 +3755 4 2 30 -0.32768000000000000000e5 +3755 4 3 31 0.65536000000000000000e5 +3755 4 6 18 0.32768000000000000000e5 +3755 4 6 34 -0.65536000000000000000e5 +3756 2 4 10 -0.65536000000000000000e5 +3756 2 7 21 0.65536000000000000000e5 +3756 4 1 12 0.65536000000000000000e5 +3757 1 3 18 0.65536000000000000000e5 +3757 1 3 34 -0.65536000000000000000e5 +3757 1 4 19 -0.13107200000000000000e6 +3757 1 4 35 -0.65536000000000000000e5 +3757 1 12 43 -0.19660800000000000000e6 +3757 1 14 45 -0.13107200000000000000e6 +3757 1 16 23 -0.65536000000000000000e5 +3757 1 17 48 0.65536000000000000000e5 +3757 1 18 49 0.65536000000000000000e5 +3757 1 20 27 0.26214400000000000000e6 +3757 2 6 12 -0.65536000000000000000e5 +3757 2 9 23 -0.65536000000000000000e5 +3757 2 10 24 -0.13107200000000000000e6 +3757 2 14 28 0.65536000000000000000e5 +3757 3 3 16 0.65536000000000000000e5 +3757 3 4 17 0.65536000000000000000e5 +3757 3 5 34 -0.65536000000000000000e5 +3757 3 13 42 0.65536000000000000000e5 +3757 3 14 27 -0.19660800000000000000e6 +3757 3 14 43 0.65536000000000000000e5 +3757 4 1 14 0.65536000000000000000e5 +3757 4 2 14 0.65536000000000000000e5 +3758 4 1 15 0.65536000000000000000e5 +3758 4 10 10 -0.13107200000000000000e6 +3759 2 2 16 -0.65536000000000000000e5 +3759 2 16 16 0.13107200000000000000e6 +3759 4 1 16 0.65536000000000000000e5 +3760 1 1 24 0.65536000000000000000e5 +3760 1 2 25 0.65536000000000000000e5 +3760 1 7 38 0.13107200000000000000e6 +3760 1 8 23 -0.13107200000000000000e6 +3760 1 22 37 -0.65536000000000000000e5 +3760 1 23 38 -0.65536000000000000000e5 +3760 3 1 38 0.65536000000000000000e5 +3760 3 2 23 0.65536000000000000000e5 +3760 3 22 27 -0.13107200000000000000e6 +3760 4 1 17 0.65536000000000000000e5 +3760 4 16 16 0.13107200000000000000e6 +3761 1 1 40 -0.65536000000000000000e5 +3761 1 23 38 0.65536000000000000000e5 +3761 2 2 32 0.65536000000000000000e5 +3761 2 3 17 -0.65536000000000000000e5 +3761 3 1 38 -0.65536000000000000000e5 +3761 3 2 39 -0.65536000000000000000e5 +3761 3 8 37 0.13107200000000000000e6 +3761 4 1 18 0.65536000000000000000e5 +3762 4 1 19 0.65536000000000000000e5 +3762 4 4 16 -0.65536000000000000000e5 +3763 1 1 24 0.32768000000000000000e5 +3763 1 1 32 -0.13107200000000000000e6 +3763 1 1 40 0.32768000000000000000e5 +3763 1 2 33 0.26214400000000000000e6 +3763 1 3 34 -0.26214400000000000000e6 +3763 1 7 38 -0.65536000000000000000e5 +3763 1 8 23 0.65536000000000000000e5 +3763 1 10 41 0.13107200000000000000e6 +3763 1 11 42 -0.26214400000000000000e6 +3763 1 12 43 -0.52428800000000000000e6 +3763 1 16 23 0.26214400000000000000e6 +3763 1 22 37 -0.32768000000000000000e5 +3763 1 23 38 -0.32768000000000000000e5 +3763 1 28 43 0.26214400000000000000e6 +3763 1 32 47 0.26214400000000000000e6 +3763 1 33 48 0.26214400000000000000e6 +3763 2 1 31 -0.13107200000000000000e6 +3763 2 2 16 0.32768000000000000000e5 +3763 2 7 21 0.13107200000000000000e6 +3763 2 12 26 0.26214400000000000000e6 +3763 2 16 16 -0.65536000000000000000e5 +3763 3 1 22 0.32768000000000000000e5 +3763 3 1 30 -0.65536000000000000000e5 +3763 3 1 34 -0.26214400000000000000e6 +3763 3 1 38 0.32768000000000000000e5 +3763 3 2 23 0.32768000000000000000e5 +3763 3 2 31 0.13107200000000000000e6 +3763 3 3 32 0.13107200000000000000e6 +3763 3 10 23 -0.65536000000000000000e5 +3763 3 13 42 0.52428800000000000000e6 +3763 3 22 27 -0.65536000000000000000e5 +3763 3 28 41 0.26214400000000000000e6 +3763 3 29 42 0.26214400000000000000e6 +3763 4 1 20 0.65536000000000000000e5 +3763 4 3 31 -0.26214400000000000000e6 +3763 4 6 18 -0.65536000000000000000e5 +3763 4 16 16 0.65536000000000000000e5 +3764 1 2 33 0.13107200000000000000e6 +3764 1 7 38 -0.65536000000000000000e5 +3764 1 8 23 0.65536000000000000000e5 +3764 1 11 42 -0.13107200000000000000e6 +3764 1 12 43 -0.26214400000000000000e6 +3764 1 28 43 0.13107200000000000000e6 +3764 1 32 47 0.13107200000000000000e6 +3764 1 33 48 0.13107200000000000000e6 +3764 2 12 26 0.13107200000000000000e6 +3764 3 2 31 -0.13107200000000000000e6 +3764 3 10 23 -0.65536000000000000000e5 +3764 3 13 42 0.26214400000000000000e6 +3764 3 28 41 0.13107200000000000000e6 +3764 3 29 42 0.13107200000000000000e6 +3764 4 1 21 0.65536000000000000000e5 +3764 4 3 31 -0.13107200000000000000e6 +3764 4 6 18 -0.65536000000000000000e5 +3765 4 1 22 0.65536000000000000000e5 +3765 4 6 18 -0.65536000000000000000e5 +3766 1 1 32 0.65536000000000000000e5 +3766 1 3 34 0.13107200000000000000e6 +3766 1 10 41 -0.65536000000000000000e5 +3766 1 16 23 -0.13107200000000000000e6 +3766 2 1 31 0.65536000000000000000e5 +3766 2 7 21 -0.65536000000000000000e5 +3766 3 3 32 -0.65536000000000000000e5 +3766 4 1 23 0.65536000000000000000e5 +3767 1 2 33 0.65536000000000000000e5 +3767 1 3 34 -0.13107200000000000000e6 +3767 1 11 42 -0.65536000000000000000e5 +3767 1 12 43 -0.13107200000000000000e6 +3767 1 16 47 0.13107200000000000000e6 +3767 1 28 43 0.65536000000000000000e5 +3767 1 32 47 0.65536000000000000000e5 +3767 1 33 48 0.65536000000000000000e5 +3767 2 12 26 0.65536000000000000000e5 +3767 3 2 31 0.65536000000000000000e5 +3767 3 3 32 0.65536000000000000000e5 +3767 3 12 41 0.13107200000000000000e6 +3767 3 13 42 0.13107200000000000000e6 +3767 3 28 41 0.65536000000000000000e5 +3767 3 29 42 0.65536000000000000000e5 +3767 4 1 24 0.65536000000000000000e5 +3767 4 3 31 -0.65536000000000000000e5 +3768 1 3 18 -0.65536000000000000000e5 +3768 1 3 34 0.65536000000000000000e5 +3768 1 4 19 0.13107200000000000000e6 +3768 1 4 35 0.65536000000000000000e5 +3768 1 12 43 0.13107200000000000000e6 +3768 1 14 45 0.13107200000000000000e6 +3768 1 16 47 -0.65536000000000000000e5 +3768 1 17 48 -0.65536000000000000000e5 +3768 1 18 49 -0.65536000000000000000e5 +3768 1 20 27 -0.26214400000000000000e6 +3768 1 27 34 0.13107200000000000000e6 +3768 2 9 23 0.65536000000000000000e5 +3768 2 10 24 0.13107200000000000000e6 +3768 2 14 28 -0.65536000000000000000e5 +3768 3 1 34 0.65536000000000000000e5 +3768 3 3 16 -0.65536000000000000000e5 +3768 3 4 17 -0.65536000000000000000e5 +3768 3 5 34 0.65536000000000000000e5 +3768 3 12 41 -0.65536000000000000000e5 +3768 3 13 42 -0.65536000000000000000e5 +3768 3 14 27 0.19660800000000000000e6 +3768 3 14 43 -0.65536000000000000000e5 +3768 4 1 25 0.65536000000000000000e5 +3768 4 2 14 -0.65536000000000000000e5 +3769 4 1 26 0.65536000000000000000e5 +3769 4 16 16 -0.13107200000000000000e6 +3770 1 1 40 0.65536000000000000000e5 +3770 1 23 38 -0.65536000000000000000e5 +3770 3 1 38 0.65536000000000000000e5 +3770 3 2 39 0.65536000000000000000e5 +3770 3 8 37 -0.13107200000000000000e6 +3770 4 1 27 0.65536000000000000000e5 +3771 1 1 40 0.65536000000000000000e5 +3771 1 6 37 0.65536000000000000000e5 +3771 1 9 40 0.13107200000000000000e6 +3771 1 10 41 -0.26214400000000000000e6 +3771 1 23 38 -0.65536000000000000000e5 +3771 1 24 39 -0.65536000000000000000e5 +3771 1 26 41 -0.13107200000000000000e6 +3771 1 32 47 0.26214400000000000000e6 +3771 3 2 39 0.65536000000000000000e5 +3771 3 9 38 0.13107200000000000000e6 +3771 3 28 41 0.26214400000000000000e6 +3771 4 1 28 0.65536000000000000000e5 +3771 4 2 30 0.13107200000000000000e6 +3772 1 9 40 -0.65536000000000000000e5 +3772 1 10 41 0.13107200000000000000e6 +3772 1 11 42 -0.13107200000000000000e6 +3772 1 26 41 0.65536000000000000000e5 +3772 1 32 47 -0.13107200000000000000e6 +3772 1 33 48 0.13107200000000000000e6 +3772 2 12 26 0.13107200000000000000e6 +3772 2 20 34 -0.13107200000000000000e6 +3772 3 8 37 0.65536000000000000000e5 +3772 3 13 42 0.26214400000000000000e6 +3772 3 22 35 -0.26214400000000000000e6 +3772 3 28 41 -0.13107200000000000000e6 +3772 3 29 42 0.13107200000000000000e6 +3772 4 1 30 0.65536000000000000000e5 +3772 4 2 30 -0.65536000000000000000e5 +3772 4 3 31 -0.13107200000000000000e6 +3772 4 6 34 -0.13107200000000000000e6 +3773 1 9 40 -0.32768000000000000000e5 +3773 1 10 41 0.13107200000000000000e6 +3773 1 11 42 0.65536000000000000000e5 +3773 1 26 41 0.32768000000000000000e5 +3773 1 32 47 -0.13107200000000000000e6 +3773 1 33 48 -0.65536000000000000000e5 +3773 2 12 26 -0.65536000000000000000e5 +3773 2 20 34 0.65536000000000000000e5 +3773 3 8 37 0.32768000000000000000e5 +3773 3 9 38 -0.32768000000000000000e5 +3773 3 12 41 -0.13107200000000000000e6 +3773 3 13 42 -0.13107200000000000000e6 +3773 3 22 27 0.32768000000000000000e5 +3773 3 22 35 0.13107200000000000000e6 +3773 3 28 41 -0.13107200000000000000e6 +3773 3 29 42 -0.65536000000000000000e5 +3773 4 1 29 0.32768000000000000000e5 +3773 4 1 31 0.65536000000000000000e5 +3773 4 2 30 -0.32768000000000000000e5 +3773 4 3 31 0.65536000000000000000e5 +3773 4 6 34 0.65536000000000000000e5 +3774 2 1 35 0.65536000000000000000e5 +3774 2 2 32 -0.65536000000000000000e5 +3774 4 1 32 0.65536000000000000000e5 +3775 1 6 53 0.13107200000000000000e6 +3775 1 25 40 -0.13107200000000000000e6 +3775 3 2 47 0.65536000000000000000e5 +3775 3 24 37 0.13107200000000000000e6 +3775 3 25 38 -0.65536000000000000000e5 +3775 3 27 40 0.39321600000000000000e6 +3775 3 28 41 -0.26214400000000000000e6 +3775 4 1 33 0.65536000000000000000e5 +3775 4 4 32 -0.13107200000000000000e6 +3775 4 16 28 0.65536000000000000000e5 +3775 4 17 29 0.13107200000000000000e6 +3776 2 16 30 -0.65536000000000000000e5 +3776 2 16 34 0.65536000000000000000e5 +3776 4 1 34 0.65536000000000000000e5 +3777 1 2 49 0.65536000000000000000e5 +3777 1 6 53 -0.13107200000000000000e6 +3777 1 8 39 -0.13107200000000000000e6 +3777 1 9 40 -0.13107200000000000000e6 +3777 1 10 41 0.26214400000000000000e6 +3777 1 23 38 0.65536000000000000000e5 +3777 1 24 39 0.65536000000000000000e5 +3777 1 25 40 0.13107200000000000000e6 +3777 1 26 41 0.13107200000000000000e6 +3777 1 32 47 -0.26214400000000000000e6 +3777 2 26 32 0.65536000000000000000e5 +3777 3 2 47 -0.65536000000000000000e5 +3777 3 9 38 -0.13107200000000000000e6 +3777 3 24 37 -0.13107200000000000000e6 +3777 3 25 38 0.65536000000000000000e5 +3777 3 27 40 -0.39321600000000000000e6 +3777 4 1 35 0.65536000000000000000e5 +3777 4 2 30 -0.13107200000000000000e6 +3777 4 4 32 0.13107200000000000000e6 +3777 4 16 28 -0.65536000000000000000e5 +3777 4 17 29 -0.13107200000000000000e6 +3778 1 1 48 0.13107200000000000000e6 +3778 1 2 5 0.65536000000000000000e5 +3778 1 2 9 0.13107200000000000000e6 +3778 1 2 25 -0.65536000000000000000e5 +3778 1 2 33 0.52428800000000000000e6 +3778 1 2 49 0.13107200000000000000e6 +3778 1 3 34 -0.52428800000000000000e6 +3778 1 4 11 -0.13107200000000000000e6 +3778 1 8 39 0.13107200000000000000e6 +3778 1 9 40 0.13107200000000000000e6 +3778 1 10 41 0.26214400000000000000e6 +3778 1 11 42 -0.26214400000000000000e6 +3778 1 12 43 -0.10485760000000000000e7 +3778 1 23 38 0.13107200000000000000e6 +3778 1 26 41 -0.13107200000000000000e6 +3778 1 28 43 0.52428800000000000000e6 +3778 1 32 47 0.78643200000000000000e6 +3778 1 33 48 0.26214400000000000000e6 +3778 2 2 8 0.13107200000000000000e6 +3778 2 2 32 0.13107200000000000000e6 +3778 2 3 9 -0.13107200000000000000e6 +3778 2 7 21 0.26214400000000000000e6 +3778 2 12 26 0.26214400000000000000e6 +3778 2 16 30 0.13107200000000000000e6 +3778 2 20 34 0.26214400000000000000e6 +3778 3 1 6 0.65536000000000000000e5 +3778 3 1 14 -0.26214400000000000000e6 +3778 3 1 30 -0.13107200000000000000e6 +3778 3 2 3 0.65536000000000000000e5 +3778 3 2 15 0.26214400000000000000e6 +3778 3 3 32 0.52428800000000000000e6 +3778 3 4 9 -0.13107200000000000000e6 +3778 3 8 37 0.13107200000000000000e6 +3778 3 10 23 -0.26214400000000000000e6 +3778 3 13 42 0.52428800000000000000e6 +3778 3 22 35 0.52428800000000000000e6 +3778 3 28 41 0.78643200000000000000e6 +3778 3 29 42 0.26214400000000000000e6 +3778 4 2 3 0.65536000000000000000e5 +3778 4 2 30 0.13107200000000000000e6 +3778 4 3 31 -0.26214400000000000000e6 +3778 4 6 18 -0.13107200000000000000e6 +3778 4 6 34 0.26214400000000000000e6 +3779 4 1 5 -0.65536000000000000000e5 +3779 4 2 4 0.65536000000000000000e5 +3780 1 1 48 0.65536000000000000000e5 +3780 1 2 5 -0.65536000000000000000e5 +3780 1 2 25 0.65536000000000000000e5 +3780 1 2 49 0.65536000000000000000e5 +3780 1 4 11 -0.13107200000000000000e6 +3780 1 9 40 0.13107200000000000000e6 +3780 1 12 43 -0.52428800000000000000e6 +3780 1 23 38 0.65536000000000000000e5 +3780 1 26 41 -0.13107200000000000000e6 +3780 1 28 43 0.26214400000000000000e6 +3780 1 32 47 0.52428800000000000000e6 +3780 2 2 32 0.65536000000000000000e5 +3780 2 3 9 -0.13107200000000000000e6 +3780 2 16 30 0.13107200000000000000e6 +3780 2 20 34 0.26214400000000000000e6 +3780 3 1 30 -0.13107200000000000000e6 +3780 3 2 15 0.26214400000000000000e6 +3780 3 3 32 0.26214400000000000000e6 +3780 3 4 5 0.65536000000000000000e5 +3780 3 4 9 -0.26214400000000000000e6 +3780 3 10 23 -0.13107200000000000000e6 +3780 3 22 35 0.52428800000000000000e6 +3780 3 28 41 0.52428800000000000000e6 +3780 4 1 5 -0.65536000000000000000e5 +3780 4 2 5 0.65536000000000000000e5 +3780 4 2 30 0.13107200000000000000e6 +3780 4 6 34 0.26214400000000000000e6 +3781 1 1 48 -0.32768000000000000000e5 +3781 1 2 33 -0.26214400000000000000e6 +3781 1 2 49 -0.32768000000000000000e5 +3781 1 3 34 0.26214400000000000000e6 +3781 1 8 23 -0.65536000000000000000e5 +3781 1 8 39 -0.65536000000000000000e5 +3781 1 10 41 -0.13107200000000000000e6 +3781 1 11 42 0.13107200000000000000e6 +3781 1 12 43 0.26214400000000000000e6 +3781 1 23 38 -0.32768000000000000000e5 +3781 1 28 43 -0.13107200000000000000e6 +3781 1 32 47 -0.13107200000000000000e6 +3781 1 33 48 -0.13107200000000000000e6 +3781 2 2 8 -0.65536000000000000000e5 +3781 2 2 32 -0.32768000000000000000e5 +3781 2 7 21 -0.13107200000000000000e6 +3781 2 12 26 -0.13107200000000000000e6 +3781 3 3 32 -0.13107200000000000000e6 +3781 3 8 37 -0.65536000000000000000e5 +3781 3 10 23 0.65536000000000000000e5 +3781 3 13 42 -0.26214400000000000000e6 +3781 3 28 41 -0.13107200000000000000e6 +3781 3 29 42 -0.13107200000000000000e6 +3781 4 2 7 0.65536000000000000000e5 +3781 4 3 31 0.13107200000000000000e6 +3781 4 6 18 0.65536000000000000000e5 +3782 1 1 48 -0.32768000000000000000e5 +3782 1 2 9 -0.65536000000000000000e5 +3782 1 2 33 -0.26214400000000000000e6 +3782 1 2 49 -0.32768000000000000000e5 +3782 1 3 34 0.26214400000000000000e6 +3782 1 8 39 -0.65536000000000000000e5 +3782 1 10 41 -0.13107200000000000000e6 +3782 1 11 42 0.13107200000000000000e6 +3782 1 12 43 0.26214400000000000000e6 +3782 1 23 38 -0.32768000000000000000e5 +3782 1 28 43 -0.13107200000000000000e6 +3782 1 32 47 -0.13107200000000000000e6 +3782 1 33 48 -0.13107200000000000000e6 +3782 2 2 8 -0.65536000000000000000e5 +3782 2 2 32 -0.32768000000000000000e5 +3782 2 4 10 0.13107200000000000000e6 +3782 2 7 21 -0.26214400000000000000e6 +3782 2 12 26 -0.13107200000000000000e6 +3782 3 1 14 0.26214400000000000000e6 +3782 3 2 15 0.13107200000000000000e6 +3782 3 3 16 -0.26214400000000000000e6 +3782 3 3 32 -0.13107200000000000000e6 +3782 3 4 9 0.65536000000000000000e5 +3782 3 8 37 -0.65536000000000000000e5 +3782 3 10 23 0.65536000000000000000e5 +3782 3 13 42 -0.26214400000000000000e6 +3782 3 28 41 -0.13107200000000000000e6 +3782 3 29 42 -0.13107200000000000000e6 +3782 4 2 8 0.65536000000000000000e5 +3782 4 3 31 0.13107200000000000000e6 +3782 4 6 18 0.65536000000000000000e5 +3783 1 1 48 0.32768000000000000000e5 +3783 1 2 49 0.32768000000000000000e5 +3783 1 9 40 0.65536000000000000000e5 +3783 1 10 25 -0.65536000000000000000e5 +3783 1 12 43 -0.26214400000000000000e6 +3783 1 23 38 0.32768000000000000000e5 +3783 1 26 41 -0.65536000000000000000e5 +3783 1 28 43 0.13107200000000000000e6 +3783 1 32 47 0.26214400000000000000e6 +3783 2 2 32 0.32768000000000000000e5 +3783 2 3 9 -0.65536000000000000000e5 +3783 2 16 30 0.65536000000000000000e5 +3783 2 20 34 0.13107200000000000000e6 +3783 3 1 30 -0.65536000000000000000e5 +3783 3 3 32 0.13107200000000000000e6 +3783 3 10 23 -0.65536000000000000000e5 +3783 3 22 35 0.26214400000000000000e6 +3783 3 28 41 0.26214400000000000000e6 +3783 4 2 9 0.65536000000000000000e5 +3783 4 2 30 0.65536000000000000000e5 +3783 4 6 34 0.13107200000000000000e6 +3784 1 1 48 -0.32768000000000000000e5 +3784 1 2 17 -0.13107200000000000000e6 +3784 1 2 33 -0.13107200000000000000e6 +3784 1 2 49 -0.32768000000000000000e5 +3784 1 3 34 0.13107200000000000000e6 +3784 1 4 11 0.32768000000000000000e5 +3784 1 8 23 -0.32768000000000000000e5 +3784 1 8 39 -0.32768000000000000000e5 +3784 1 9 40 -0.32768000000000000000e5 +3784 1 10 41 -0.65536000000000000000e5 +3784 1 11 42 0.65536000000000000000e5 +3784 1 12 43 0.26214400000000000000e6 +3784 1 16 23 0.13107200000000000000e6 +3784 1 23 38 -0.32768000000000000000e5 +3784 1 26 41 0.32768000000000000000e5 +3784 1 28 43 -0.13107200000000000000e6 +3784 1 32 47 -0.19660800000000000000e6 +3784 1 33 48 -0.65536000000000000000e5 +3784 2 2 8 -0.32768000000000000000e5 +3784 2 2 32 -0.32768000000000000000e5 +3784 2 3 9 0.32768000000000000000e5 +3784 2 4 10 -0.65536000000000000000e5 +3784 2 12 26 -0.65536000000000000000e5 +3784 2 16 30 -0.32768000000000000000e5 +3784 2 20 34 -0.65536000000000000000e5 +3784 3 1 14 0.65536000000000000000e5 +3784 3 1 30 0.32768000000000000000e5 +3784 3 2 7 0.32768000000000000000e5 +3784 3 2 15 -0.13107200000000000000e6 +3784 3 3 16 0.13107200000000000000e6 +3784 3 3 32 -0.13107200000000000000e6 +3784 3 4 9 0.32768000000000000000e5 +3784 3 8 37 -0.32768000000000000000e5 +3784 3 10 23 0.65536000000000000000e5 +3784 3 13 42 -0.13107200000000000000e6 +3784 3 22 35 -0.13107200000000000000e6 +3784 3 28 41 -0.19660800000000000000e6 +3784 3 29 42 -0.65536000000000000000e5 +3784 4 2 6 0.32768000000000000000e5 +3784 4 2 10 0.65536000000000000000e5 +3784 4 2 30 -0.32768000000000000000e5 +3784 4 3 31 0.65536000000000000000e5 +3784 4 6 18 0.32768000000000000000e5 +3784 4 6 34 -0.65536000000000000000e5 +3785 2 4 10 -0.65536000000000000000e5 +3785 2 7 21 0.65536000000000000000e5 +3785 4 2 11 0.65536000000000000000e5 +3786 1 2 33 0.65536000000000000000e5 +3786 1 3 18 -0.13107200000000000000e6 +3786 1 6 13 0.65536000000000000000e5 +3786 1 10 41 0.65536000000000000000e5 +3786 2 4 10 -0.65536000000000000000e5 +3786 2 7 21 0.65536000000000000000e5 +3786 2 12 26 0.65536000000000000000e5 +3786 3 1 14 -0.65536000000000000000e5 +3786 3 3 16 0.13107200000000000000e6 +3786 3 3 32 0.65536000000000000000e5 +3786 4 2 12 0.65536000000000000000e5 +3786 4 8 20 0.65536000000000000000e5 +3787 1 3 18 0.65536000000000000000e5 +3787 1 3 34 -0.65536000000000000000e5 +3787 1 4 19 -0.13107200000000000000e6 +3787 1 4 35 -0.65536000000000000000e5 +3787 1 12 43 -0.19660800000000000000e6 +3787 1 14 45 -0.13107200000000000000e6 +3787 1 16 23 -0.65536000000000000000e5 +3787 1 17 48 0.65536000000000000000e5 +3787 1 18 49 0.65536000000000000000e5 +3787 1 20 27 0.26214400000000000000e6 +3787 2 6 12 -0.65536000000000000000e5 +3787 2 9 23 -0.65536000000000000000e5 +3787 2 10 24 -0.13107200000000000000e6 +3787 2 14 28 0.65536000000000000000e5 +3787 3 3 16 0.65536000000000000000e5 +3787 3 4 17 0.65536000000000000000e5 +3787 3 5 34 -0.65536000000000000000e5 +3787 3 13 42 0.65536000000000000000e5 +3787 3 14 27 -0.19660800000000000000e6 +3787 3 14 43 0.65536000000000000000e5 +3787 4 2 13 0.65536000000000000000e5 +3787 4 2 14 0.65536000000000000000e5 +3788 1 2 17 0.32768000000000000000e5 +3788 1 3 18 0.32768000000000000000e5 +3788 1 3 34 0.32768000000000000000e5 +3788 1 4 19 0.65536000000000000000e5 +3788 1 10 17 0.65536000000000000000e5 +3788 1 20 27 -0.13107200000000000000e6 +3788 2 6 12 0.32768000000000000000e5 +3788 2 10 24 0.65536000000000000000e5 +3788 3 3 16 0.32768000000000000000e5 +3788 3 7 20 -0.13107200000000000000e6 +3788 4 2 15 0.65536000000000000000e5 +3789 1 1 24 0.65536000000000000000e5 +3789 1 2 25 0.65536000000000000000e5 +3789 1 7 38 0.13107200000000000000e6 +3789 1 8 23 -0.13107200000000000000e6 +3789 1 22 37 -0.65536000000000000000e5 +3789 1 23 38 -0.65536000000000000000e5 +3789 3 1 38 0.65536000000000000000e5 +3789 3 2 23 0.65536000000000000000e5 +3789 3 22 27 -0.13107200000000000000e6 +3789 4 2 16 0.65536000000000000000e5 +3789 4 16 16 0.13107200000000000000e6 +3790 1 1 40 -0.65536000000000000000e5 +3790 1 23 38 0.65536000000000000000e5 +3790 2 2 32 0.65536000000000000000e5 +3790 2 3 17 -0.65536000000000000000e5 +3790 3 1 38 -0.65536000000000000000e5 +3790 3 2 39 -0.65536000000000000000e5 +3790 3 8 37 0.13107200000000000000e6 +3790 4 2 17 0.65536000000000000000e5 +3791 4 2 18 0.65536000000000000000e5 +3791 4 4 16 -0.65536000000000000000e5 +3792 1 6 37 -0.65536000000000000000e5 +3792 1 24 39 0.65536000000000000000e5 +3792 2 3 33 0.65536000000000000000e5 +3792 2 4 18 -0.65536000000000000000e5 +3792 3 2 39 -0.65536000000000000000e5 +3792 3 3 40 -0.65536000000000000000e5 +3792 3 9 38 0.13107200000000000000e6 +3792 4 2 19 0.65536000000000000000e5 +3793 1 2 33 0.13107200000000000000e6 +3793 1 7 38 -0.65536000000000000000e5 +3793 1 8 23 0.65536000000000000000e5 +3793 1 11 42 -0.13107200000000000000e6 +3793 1 12 43 -0.26214400000000000000e6 +3793 1 28 43 0.13107200000000000000e6 +3793 1 32 47 0.13107200000000000000e6 +3793 1 33 48 0.13107200000000000000e6 +3793 2 12 26 0.13107200000000000000e6 +3793 3 2 31 -0.13107200000000000000e6 +3793 3 10 23 -0.65536000000000000000e5 +3793 3 13 42 0.26214400000000000000e6 +3793 3 28 41 0.13107200000000000000e6 +3793 3 29 42 0.13107200000000000000e6 +3793 4 2 20 0.65536000000000000000e5 +3793 4 3 31 -0.13107200000000000000e6 +3793 4 6 18 -0.65536000000000000000e5 +3794 4 2 21 0.65536000000000000000e5 +3794 4 6 18 -0.65536000000000000000e5 +3795 1 9 40 -0.65536000000000000000e5 +3795 1 10 25 0.65536000000000000000e5 +3795 3 1 30 0.65536000000000000000e5 +3795 3 3 32 -0.13107200000000000000e6 +3795 3 10 23 0.65536000000000000000e5 +3795 4 2 22 0.65536000000000000000e5 +3796 1 2 33 0.65536000000000000000e5 +3796 1 3 34 -0.13107200000000000000e6 +3796 1 11 42 -0.65536000000000000000e5 +3796 1 12 43 -0.13107200000000000000e6 +3796 1 16 47 0.13107200000000000000e6 +3796 1 28 43 0.65536000000000000000e5 +3796 1 32 47 0.65536000000000000000e5 +3796 1 33 48 0.65536000000000000000e5 +3796 2 12 26 0.65536000000000000000e5 +3796 3 2 31 0.65536000000000000000e5 +3796 3 3 32 0.65536000000000000000e5 +3796 3 12 41 0.13107200000000000000e6 +3796 3 13 42 0.13107200000000000000e6 +3796 3 28 41 0.65536000000000000000e5 +3796 3 29 42 0.65536000000000000000e5 +3796 4 2 23 0.65536000000000000000e5 +3796 4 3 31 -0.65536000000000000000e5 +3797 4 2 24 0.65536000000000000000e5 +3797 4 8 20 -0.65536000000000000000e5 +3798 1 3 18 0.65536000000000000000e5 +3798 1 3 34 0.65536000000000000000e5 +3798 1 4 19 -0.13107200000000000000e6 +3798 1 4 35 0.65536000000000000000e5 +3798 1 12 43 -0.65536000000000000000e5 +3798 1 13 44 0.13107200000000000000e6 +3798 1 16 47 -0.65536000000000000000e5 +3798 1 17 48 -0.65536000000000000000e5 +3798 3 3 16 0.65536000000000000000e5 +3798 3 4 17 0.65536000000000000000e5 +3798 3 12 41 -0.65536000000000000000e5 +3798 3 13 42 -0.65536000000000000000e5 +3798 4 2 14 0.65536000000000000000e5 +3798 4 2 25 0.65536000000000000000e5 +3799 1 1 40 0.65536000000000000000e5 +3799 1 23 38 -0.65536000000000000000e5 +3799 3 1 38 0.65536000000000000000e5 +3799 3 2 39 0.65536000000000000000e5 +3799 3 8 37 -0.13107200000000000000e6 +3799 4 2 26 0.65536000000000000000e5 +3800 1 1 40 0.65536000000000000000e5 +3800 1 6 37 0.65536000000000000000e5 +3800 1 9 40 0.13107200000000000000e6 +3800 1 10 41 -0.26214400000000000000e6 +3800 1 23 38 -0.65536000000000000000e5 +3800 1 24 39 -0.65536000000000000000e5 +3800 1 26 41 -0.13107200000000000000e6 +3800 1 32 47 0.26214400000000000000e6 +3800 3 2 39 0.65536000000000000000e5 +3800 3 9 38 0.13107200000000000000e6 +3800 3 28 41 0.26214400000000000000e6 +3800 4 2 27 0.65536000000000000000e5 +3800 4 2 30 0.13107200000000000000e6 +3801 1 6 37 0.65536000000000000000e5 +3801 1 24 39 -0.65536000000000000000e5 +3801 3 2 39 0.65536000000000000000e5 +3801 3 3 40 0.65536000000000000000e5 +3801 3 9 38 -0.13107200000000000000e6 +3801 4 2 28 0.65536000000000000000e5 +3802 1 9 40 -0.65536000000000000000e5 +3802 1 10 41 0.13107200000000000000e6 +3802 1 11 42 -0.13107200000000000000e6 +3802 1 26 41 0.65536000000000000000e5 +3802 1 32 47 -0.13107200000000000000e6 +3802 1 33 48 0.13107200000000000000e6 +3802 2 12 26 0.13107200000000000000e6 +3802 2 20 34 -0.13107200000000000000e6 +3802 3 8 37 0.65536000000000000000e5 +3802 3 13 42 0.26214400000000000000e6 +3802 3 22 35 -0.26214400000000000000e6 +3802 3 28 41 -0.13107200000000000000e6 +3802 3 29 42 0.13107200000000000000e6 +3802 4 2 29 0.65536000000000000000e5 +3802 4 2 30 -0.65536000000000000000e5 +3802 4 3 31 -0.13107200000000000000e6 +3802 4 6 34 -0.13107200000000000000e6 +3803 2 12 26 -0.65536000000000000000e5 +3803 2 20 34 0.65536000000000000000e5 +3803 4 2 31 0.65536000000000000000e5 +3803 4 6 34 0.65536000000000000000e5 +3804 1 6 53 0.13107200000000000000e6 +3804 1 25 40 -0.13107200000000000000e6 +3804 3 2 47 0.65536000000000000000e5 +3804 3 24 37 0.13107200000000000000e6 +3804 3 25 38 -0.65536000000000000000e5 +3804 3 27 40 0.39321600000000000000e6 +3804 3 28 41 -0.26214400000000000000e6 +3804 4 2 32 0.65536000000000000000e5 +3804 4 4 32 -0.13107200000000000000e6 +3804 4 16 28 0.65536000000000000000e5 +3804 4 17 29 0.13107200000000000000e6 +3805 4 2 33 0.65536000000000000000e5 +3805 4 16 28 -0.65536000000000000000e5 +3806 4 2 34 0.65536000000000000000e5 +3806 4 17 29 -0.65536000000000000000e5 +3807 1 1 48 -0.65536000000000000000e5 +3807 1 2 49 -0.65536000000000000000e5 +3807 1 6 53 -0.13107200000000000000e6 +3807 1 8 39 -0.26214400000000000000e6 +3807 1 9 40 -0.26214400000000000000e6 +3807 1 10 41 0.52428800000000000000e6 +3807 1 12 43 0.52428800000000000000e6 +3807 1 22 53 0.65536000000000000000e5 +3807 1 23 38 -0.65536000000000000000e5 +3807 1 24 55 0.13107200000000000000e6 +3807 1 25 40 0.13107200000000000000e6 +3807 1 26 41 0.13107200000000000000e6 +3807 1 28 43 -0.26214400000000000000e6 +3807 1 32 47 -0.52428800000000000000e6 +3807 1 37 52 -0.26214400000000000000e6 +3807 1 40 47 -0.65536000000000000000e5 +3807 2 2 32 -0.65536000000000000000e5 +3807 2 3 33 -0.65536000000000000000e5 +3807 2 16 30 -0.13107200000000000000e6 +3807 2 20 34 -0.26214400000000000000e6 +3807 2 26 32 0.65536000000000000000e5 +3807 3 9 38 -0.26214400000000000000e6 +3807 3 22 35 -0.52428800000000000000e6 +3807 3 22 51 -0.26214400000000000000e6 +3807 3 24 37 -0.13107200000000000000e6 +3807 3 27 40 -0.26214400000000000000e6 +3807 3 28 41 -0.52428800000000000000e6 +3807 4 2 30 -0.26214400000000000000e6 +3807 4 2 35 0.65536000000000000000e5 +3807 4 4 32 0.13107200000000000000e6 +3807 4 6 34 -0.26214400000000000000e6 +3807 4 16 28 -0.65536000000000000000e5 +3807 4 17 29 -0.13107200000000000000e6 +3807 4 20 32 -0.13107200000000000000e6 +3808 4 1 5 -0.32768000000000000000e5 +3808 4 3 3 0.65536000000000000000e5 +3809 1 1 48 0.65536000000000000000e5 +3809 1 2 5 -0.65536000000000000000e5 +3809 1 2 25 0.65536000000000000000e5 +3809 1 2 49 0.65536000000000000000e5 +3809 1 4 11 -0.13107200000000000000e6 +3809 1 9 40 0.13107200000000000000e6 +3809 1 12 43 -0.52428800000000000000e6 +3809 1 23 38 0.65536000000000000000e5 +3809 1 26 41 -0.13107200000000000000e6 +3809 1 28 43 0.26214400000000000000e6 +3809 1 32 47 0.52428800000000000000e6 +3809 2 2 32 0.65536000000000000000e5 +3809 2 3 9 -0.13107200000000000000e6 +3809 2 16 30 0.13107200000000000000e6 +3809 2 20 34 0.26214400000000000000e6 +3809 3 1 30 -0.13107200000000000000e6 +3809 3 2 15 0.26214400000000000000e6 +3809 3 3 32 0.26214400000000000000e6 +3809 3 4 5 0.65536000000000000000e5 +3809 3 4 9 -0.26214400000000000000e6 +3809 3 10 23 -0.13107200000000000000e6 +3809 3 22 35 0.52428800000000000000e6 +3809 3 28 41 0.52428800000000000000e6 +3809 4 1 5 -0.65536000000000000000e5 +3809 4 2 30 0.13107200000000000000e6 +3809 4 3 4 0.65536000000000000000e5 +3809 4 6 34 0.26214400000000000000e6 +3810 4 3 5 0.65536000000000000000e5 +3810 4 4 4 -0.13107200000000000000e6 +3811 1 1 48 -0.32768000000000000000e5 +3811 1 2 33 -0.26214400000000000000e6 +3811 1 2 49 -0.32768000000000000000e5 +3811 1 3 34 0.26214400000000000000e6 +3811 1 8 23 -0.65536000000000000000e5 +3811 1 8 39 -0.65536000000000000000e5 +3811 1 10 41 -0.13107200000000000000e6 +3811 1 11 42 0.13107200000000000000e6 +3811 1 12 43 0.26214400000000000000e6 +3811 1 23 38 -0.32768000000000000000e5 +3811 1 28 43 -0.13107200000000000000e6 +3811 1 32 47 -0.13107200000000000000e6 +3811 1 33 48 -0.13107200000000000000e6 +3811 2 2 8 -0.65536000000000000000e5 +3811 2 2 32 -0.32768000000000000000e5 +3811 2 7 21 -0.13107200000000000000e6 +3811 2 12 26 -0.13107200000000000000e6 +3811 3 3 32 -0.13107200000000000000e6 +3811 3 8 37 -0.65536000000000000000e5 +3811 3 10 23 0.65536000000000000000e5 +3811 3 13 42 -0.26214400000000000000e6 +3811 3 28 41 -0.13107200000000000000e6 +3811 3 29 42 -0.13107200000000000000e6 +3811 4 3 6 0.65536000000000000000e5 +3811 4 3 31 0.13107200000000000000e6 +3811 4 6 18 0.65536000000000000000e5 +3812 1 1 48 -0.32768000000000000000e5 +3812 1 2 9 -0.65536000000000000000e5 +3812 1 2 33 -0.26214400000000000000e6 +3812 1 2 49 -0.32768000000000000000e5 +3812 1 3 34 0.26214400000000000000e6 +3812 1 8 39 -0.65536000000000000000e5 +3812 1 10 41 -0.13107200000000000000e6 +3812 1 11 42 0.13107200000000000000e6 +3812 1 12 43 0.26214400000000000000e6 +3812 1 23 38 -0.32768000000000000000e5 +3812 1 28 43 -0.13107200000000000000e6 +3812 1 32 47 -0.13107200000000000000e6 +3812 1 33 48 -0.13107200000000000000e6 +3812 2 2 8 -0.65536000000000000000e5 +3812 2 2 32 -0.32768000000000000000e5 +3812 2 4 10 0.13107200000000000000e6 +3812 2 7 21 -0.26214400000000000000e6 +3812 2 12 26 -0.13107200000000000000e6 +3812 3 1 14 0.26214400000000000000e6 +3812 3 2 15 0.13107200000000000000e6 +3812 3 3 16 -0.26214400000000000000e6 +3812 3 3 32 -0.13107200000000000000e6 +3812 3 4 9 0.65536000000000000000e5 +3812 3 8 37 -0.65536000000000000000e5 +3812 3 10 23 0.65536000000000000000e5 +3812 3 13 42 -0.26214400000000000000e6 +3812 3 28 41 -0.13107200000000000000e6 +3812 3 29 42 -0.13107200000000000000e6 +3812 4 3 7 0.65536000000000000000e5 +3812 4 3 31 0.13107200000000000000e6 +3812 4 6 18 0.65536000000000000000e5 +3813 1 1 48 0.32768000000000000000e5 +3813 1 2 49 0.32768000000000000000e5 +3813 1 9 40 0.65536000000000000000e5 +3813 1 10 25 -0.65536000000000000000e5 +3813 1 12 43 -0.26214400000000000000e6 +3813 1 23 38 0.32768000000000000000e5 +3813 1 26 41 -0.65536000000000000000e5 +3813 1 28 43 0.13107200000000000000e6 +3813 1 32 47 0.26214400000000000000e6 +3813 2 2 32 0.32768000000000000000e5 +3813 2 3 9 -0.65536000000000000000e5 +3813 2 16 30 0.65536000000000000000e5 +3813 2 20 34 0.13107200000000000000e6 +3813 3 1 30 -0.65536000000000000000e5 +3813 3 3 32 0.13107200000000000000e6 +3813 3 10 23 -0.65536000000000000000e5 +3813 3 22 35 0.26214400000000000000e6 +3813 3 28 41 0.26214400000000000000e6 +3813 4 2 30 0.65536000000000000000e5 +3813 4 3 8 0.65536000000000000000e5 +3813 4 6 34 0.13107200000000000000e6 +3814 4 3 9 0.65536000000000000000e5 +3814 4 4 8 -0.65536000000000000000e5 +3815 2 4 10 -0.65536000000000000000e5 +3815 2 7 21 0.65536000000000000000e5 +3815 4 3 10 0.65536000000000000000e5 +3816 1 2 33 0.65536000000000000000e5 +3816 1 3 18 -0.13107200000000000000e6 +3816 1 6 13 0.65536000000000000000e5 +3816 1 10 41 0.65536000000000000000e5 +3816 2 4 10 -0.65536000000000000000e5 +3816 2 7 21 0.65536000000000000000e5 +3816 2 12 26 0.65536000000000000000e5 +3816 3 1 14 -0.65536000000000000000e5 +3816 3 3 16 0.13107200000000000000e6 +3816 3 3 32 0.65536000000000000000e5 +3816 4 3 11 0.65536000000000000000e5 +3816 4 8 20 0.65536000000000000000e5 +3817 1 2 33 0.65536000000000000000e5 +3817 1 4 35 0.13107200000000000000e6 +3817 1 11 42 -0.65536000000000000000e5 +3817 1 12 43 -0.13107200000000000000e6 +3817 2 5 11 -0.65536000000000000000e5 +3817 2 12 26 0.65536000000000000000e5 +3817 3 4 33 -0.65536000000000000000e5 +3817 3 14 27 -0.13107200000000000000e6 +3817 4 3 12 0.65536000000000000000e5 +3817 4 8 20 0.65536000000000000000e5 +3818 4 2 14 -0.65536000000000000000e5 +3818 4 3 13 0.65536000000000000000e5 +3819 1 3 18 0.65536000000000000000e5 +3819 1 4 35 0.65536000000000000000e5 +3819 1 5 20 0.13107200000000000000e6 +3819 1 5 36 -0.13107200000000000000e6 +3819 1 10 17 -0.13107200000000000000e6 +3819 1 14 45 0.13107200000000000000e6 +3819 1 17 48 -0.65536000000000000000e5 +3819 1 18 49 -0.65536000000000000000e5 +3819 2 9 23 0.65536000000000000000e5 +3819 2 14 28 -0.65536000000000000000e5 +3819 3 5 18 -0.65536000000000000000e5 +3819 3 5 34 0.65536000000000000000e5 +3819 3 13 42 -0.65536000000000000000e5 +3819 3 14 43 -0.65536000000000000000e5 +3819 4 3 14 0.65536000000000000000e5 +3819 4 8 12 -0.65536000000000000000e5 +3820 1 1 40 -0.65536000000000000000e5 +3820 1 23 38 0.65536000000000000000e5 +3820 2 2 32 0.65536000000000000000e5 +3820 2 3 17 -0.65536000000000000000e5 +3820 3 1 38 -0.65536000000000000000e5 +3820 3 2 39 -0.65536000000000000000e5 +3820 3 8 37 0.13107200000000000000e6 +3820 4 3 16 0.65536000000000000000e5 +3821 4 3 17 0.65536000000000000000e5 +3821 4 4 16 -0.65536000000000000000e5 +3822 1 6 37 -0.65536000000000000000e5 +3822 1 24 39 0.65536000000000000000e5 +3822 2 3 33 0.65536000000000000000e5 +3822 2 4 18 -0.65536000000000000000e5 +3822 3 2 39 -0.65536000000000000000e5 +3822 3 3 40 -0.65536000000000000000e5 +3822 3 9 38 0.13107200000000000000e6 +3822 4 3 18 0.65536000000000000000e5 +3823 4 3 19 0.65536000000000000000e5 +3823 4 5 17 -0.65536000000000000000e5 +3824 4 3 20 0.65536000000000000000e5 +3824 4 6 18 -0.65536000000000000000e5 +3825 1 9 40 -0.65536000000000000000e5 +3825 1 10 25 0.65536000000000000000e5 +3825 3 1 30 0.65536000000000000000e5 +3825 3 3 32 -0.13107200000000000000e6 +3825 3 10 23 0.65536000000000000000e5 +3825 4 3 21 0.65536000000000000000e5 +3826 4 3 22 0.65536000000000000000e5 +3826 4 7 19 -0.65536000000000000000e5 +3827 4 3 23 0.65536000000000000000e5 +3827 4 8 20 -0.65536000000000000000e5 +3828 1 2 33 -0.65536000000000000000e5 +3828 1 4 35 -0.13107200000000000000e6 +3828 1 11 42 0.65536000000000000000e5 +3828 1 12 43 0.13107200000000000000e6 +3828 1 17 48 0.13107200000000000000e6 +3828 1 28 43 -0.65536000000000000000e5 +3828 1 32 47 -0.65536000000000000000e5 +3828 1 33 48 -0.65536000000000000000e5 +3828 2 12 26 -0.65536000000000000000e5 +3828 3 4 33 0.65536000000000000000e5 +3828 3 14 27 0.13107200000000000000e6 +3828 3 28 41 -0.65536000000000000000e5 +3828 3 29 42 -0.65536000000000000000e5 +3828 4 3 24 0.65536000000000000000e5 +3828 4 3 31 0.65536000000000000000e5 +3828 4 8 20 -0.65536000000000000000e5 +3829 1 4 35 0.65536000000000000000e5 +3829 1 17 48 -0.65536000000000000000e5 +3829 3 5 34 0.65536000000000000000e5 +3829 3 13 42 -0.65536000000000000000e5 +3829 3 14 27 0.65536000000000000000e5 +3829 3 16 29 -0.13107200000000000000e6 +3829 4 3 25 0.65536000000000000000e5 +3830 1 1 40 0.65536000000000000000e5 +3830 1 6 37 0.65536000000000000000e5 +3830 1 9 40 0.13107200000000000000e6 +3830 1 10 41 -0.26214400000000000000e6 +3830 1 23 38 -0.65536000000000000000e5 +3830 1 24 39 -0.65536000000000000000e5 +3830 1 26 41 -0.13107200000000000000e6 +3830 1 32 47 0.26214400000000000000e6 +3830 3 2 39 0.65536000000000000000e5 +3830 3 9 38 0.13107200000000000000e6 +3830 3 28 41 0.26214400000000000000e6 +3830 4 2 30 0.13107200000000000000e6 +3830 4 3 26 0.65536000000000000000e5 +3831 1 6 37 0.65536000000000000000e5 +3831 1 24 39 -0.65536000000000000000e5 +3831 3 2 39 0.65536000000000000000e5 +3831 3 3 40 0.65536000000000000000e5 +3831 3 9 38 -0.13107200000000000000e6 +3831 4 3 27 0.65536000000000000000e5 +3832 1 1 48 0.65536000000000000000e5 +3832 1 2 49 0.13107200000000000000e6 +3832 1 8 39 0.13107200000000000000e6 +3832 1 9 40 0.13107200000000000000e6 +3832 1 10 41 -0.26214400000000000000e6 +3832 1 12 43 -0.52428800000000000000e6 +3832 1 23 38 0.65536000000000000000e5 +3832 1 25 40 -0.65536000000000000000e5 +3832 1 28 43 0.26214400000000000000e6 +3832 1 32 47 0.52428800000000000000e6 +3832 2 2 32 0.65536000000000000000e5 +3832 2 3 33 0.65536000000000000000e5 +3832 2 5 27 -0.65536000000000000000e5 +3832 2 16 30 0.13107200000000000000e6 +3832 2 20 34 0.26214400000000000000e6 +3832 3 9 38 0.13107200000000000000e6 +3832 3 22 35 0.52428800000000000000e6 +3832 3 28 41 0.52428800000000000000e6 +3832 4 2 30 0.13107200000000000000e6 +3832 4 3 28 0.65536000000000000000e5 +3832 4 6 34 0.26214400000000000000e6 +3833 4 2 30 -0.65536000000000000000e5 +3833 4 3 29 0.65536000000000000000e5 +3834 1 9 40 0.65536000000000000000e5 +3834 1 10 41 0.13107200000000000000e6 +3834 1 11 42 0.13107200000000000000e6 +3834 1 26 41 -0.65536000000000000000e5 +3834 1 32 47 -0.13107200000000000000e6 +3834 1 33 48 -0.13107200000000000000e6 +3834 3 9 38 0.65536000000000000000e5 +3834 3 10 39 0.65536000000000000000e5 +3834 3 13 42 -0.26214400000000000000e6 +3834 3 28 41 -0.13107200000000000000e6 +3834 3 29 42 -0.13107200000000000000e6 +3834 4 3 30 0.65536000000000000000e5 +3834 4 3 31 0.13107200000000000000e6 +3835 4 3 32 0.65536000000000000000e5 +3835 4 16 28 -0.65536000000000000000e5 +3836 4 3 33 0.65536000000000000000e5 +3836 4 4 32 -0.65536000000000000000e5 +3837 2 4 34 -0.65536000000000000000e5 +3837 2 21 35 0.65536000000000000000e5 +3837 4 3 34 0.65536000000000000000e5 +3837 4 7 35 0.65536000000000000000e5 +3838 1 1 48 -0.65536000000000000000e5 +3838 1 2 49 -0.13107200000000000000e6 +3838 1 8 39 -0.13107200000000000000e6 +3838 1 9 40 -0.13107200000000000000e6 +3838 1 10 41 0.26214400000000000000e6 +3838 1 12 43 0.52428800000000000000e6 +3838 1 23 38 -0.65536000000000000000e5 +3838 1 23 54 -0.65536000000000000000e5 +3838 1 24 55 0.13107200000000000000e6 +3838 1 25 40 0.65536000000000000000e5 +3838 1 25 56 -0.65536000000000000000e5 +3838 1 28 43 -0.26214400000000000000e6 +3838 1 32 47 -0.52428800000000000000e6 +3838 1 40 47 -0.65536000000000000000e5 +3838 2 2 32 -0.65536000000000000000e5 +3838 2 3 33 -0.65536000000000000000e5 +3838 2 16 30 -0.13107200000000000000e6 +3838 2 20 34 -0.26214400000000000000e6 +3838 3 9 38 -0.13107200000000000000e6 +3838 3 22 35 -0.52428800000000000000e6 +3838 3 24 53 0.65536000000000000000e5 +3838 3 25 54 0.65536000000000000000e5 +3838 3 28 41 -0.52428800000000000000e6 +3838 3 38 51 -0.13107200000000000000e6 +3838 4 2 30 -0.13107200000000000000e6 +3838 4 3 35 0.65536000000000000000e5 +3838 4 4 32 0.65536000000000000000e5 +3838 4 6 34 -0.26214400000000000000e6 +3838 4 28 32 0.65536000000000000000e5 +3839 1 1 48 -0.65536000000000000000e5 +3839 1 2 5 0.65536000000000000000e5 +3839 1 2 25 -0.65536000000000000000e5 +3839 1 2 33 -0.26214400000000000000e6 +3839 1 2 49 -0.65536000000000000000e5 +3839 1 4 11 0.39321600000000000000e6 +3839 1 6 13 -0.26214400000000000000e6 +3839 1 9 40 -0.13107200000000000000e6 +3839 1 10 25 -0.26214400000000000000e6 +3839 1 10 41 -0.26214400000000000000e6 +3839 1 12 43 0.10485760000000000000e7 +3839 1 23 38 -0.65536000000000000000e5 +3839 1 26 41 0.13107200000000000000e6 +3839 1 28 43 -0.26214400000000000000e6 +3839 1 32 47 -0.52428800000000000000e6 +3839 2 2 32 -0.65536000000000000000e5 +3839 2 3 9 0.13107200000000000000e6 +3839 2 12 26 -0.26214400000000000000e6 +3839 2 16 30 -0.13107200000000000000e6 +3839 2 20 34 -0.26214400000000000000e6 +3839 3 1 6 0.65536000000000000000e5 +3839 3 1 30 0.13107200000000000000e6 +3839 3 2 15 -0.26214400000000000000e6 +3839 3 3 32 -0.52428800000000000000e6 +3839 3 4 9 0.26214400000000000000e6 +3839 3 5 6 0.65536000000000000000e5 +3839 3 10 23 0.13107200000000000000e6 +3839 3 14 27 0.52428800000000000000e6 +3839 3 22 35 -0.52428800000000000000e6 +3839 3 28 41 -0.52428800000000000000e6 +3839 4 1 5 0.65536000000000000000e5 +3839 4 2 30 -0.13107200000000000000e6 +3839 4 4 4 -0.13107200000000000000e6 +3839 4 4 5 0.65536000000000000000e5 +3839 4 4 8 0.13107200000000000000e6 +3839 4 6 34 -0.26214400000000000000e6 +3839 4 8 20 -0.26214400000000000000e6 +3840 1 1 48 -0.32768000000000000000e5 +3840 1 2 9 -0.65536000000000000000e5 +3840 1 2 33 -0.26214400000000000000e6 +3840 1 2 49 -0.32768000000000000000e5 +3840 1 3 34 0.26214400000000000000e6 +3840 1 8 39 -0.65536000000000000000e5 +3840 1 10 41 -0.13107200000000000000e6 +3840 1 11 42 0.13107200000000000000e6 +3840 1 12 43 0.26214400000000000000e6 +3840 1 23 38 -0.32768000000000000000e5 +3840 1 28 43 -0.13107200000000000000e6 +3840 1 32 47 -0.13107200000000000000e6 +3840 1 33 48 -0.13107200000000000000e6 +3840 2 2 8 -0.65536000000000000000e5 +3840 2 2 32 -0.32768000000000000000e5 +3840 2 4 10 0.13107200000000000000e6 +3840 2 7 21 -0.26214400000000000000e6 +3840 2 12 26 -0.13107200000000000000e6 +3840 3 1 14 0.26214400000000000000e6 +3840 3 2 15 0.13107200000000000000e6 +3840 3 3 16 -0.26214400000000000000e6 +3840 3 3 32 -0.13107200000000000000e6 +3840 3 4 9 0.65536000000000000000e5 +3840 3 8 37 -0.65536000000000000000e5 +3840 3 10 23 0.65536000000000000000e5 +3840 3 13 42 -0.26214400000000000000e6 +3840 3 28 41 -0.13107200000000000000e6 +3840 3 29 42 -0.13107200000000000000e6 +3840 4 3 31 0.13107200000000000000e6 +3840 4 4 6 0.65536000000000000000e5 +3840 4 6 18 0.65536000000000000000e5 +3841 1 1 48 0.32768000000000000000e5 +3841 1 2 49 0.32768000000000000000e5 +3841 1 9 40 0.65536000000000000000e5 +3841 1 10 25 -0.65536000000000000000e5 +3841 1 12 43 -0.26214400000000000000e6 +3841 1 23 38 0.32768000000000000000e5 +3841 1 26 41 -0.65536000000000000000e5 +3841 1 28 43 0.13107200000000000000e6 +3841 1 32 47 0.26214400000000000000e6 +3841 2 2 32 0.32768000000000000000e5 +3841 2 3 9 -0.65536000000000000000e5 +3841 2 16 30 0.65536000000000000000e5 +3841 2 20 34 0.13107200000000000000e6 +3841 3 1 30 -0.65536000000000000000e5 +3841 3 3 32 0.13107200000000000000e6 +3841 3 10 23 -0.65536000000000000000e5 +3841 3 22 35 0.26214400000000000000e6 +3841 3 28 41 0.26214400000000000000e6 +3841 4 2 30 0.65536000000000000000e5 +3841 4 4 7 0.65536000000000000000e5 +3841 4 6 34 0.13107200000000000000e6 +3842 1 4 11 0.65536000000000000000e5 +3842 1 4 35 -0.26214400000000000000e6 +3842 1 6 13 0.13107200000000000000e6 +3842 1 10 25 -0.65536000000000000000e5 +3842 1 10 41 0.13107200000000000000e6 +3842 1 11 42 0.13107200000000000000e6 +3842 2 5 11 0.13107200000000000000e6 +3842 3 2 15 0.13107200000000000000e6 +3842 3 3 32 0.13107200000000000000e6 +3842 3 4 17 -0.26214400000000000000e6 +3842 3 4 33 0.13107200000000000000e6 +3842 3 6 11 -0.65536000000000000000e5 +3842 3 10 11 0.13107200000000000000e6 +3842 4 4 9 0.65536000000000000000e5 +3842 4 5 9 -0.65536000000000000000e5 +3843 1 2 33 0.65536000000000000000e5 +3843 1 3 18 -0.13107200000000000000e6 +3843 1 6 13 0.65536000000000000000e5 +3843 1 10 41 0.65536000000000000000e5 +3843 2 4 10 -0.65536000000000000000e5 +3843 2 7 21 0.65536000000000000000e5 +3843 2 12 26 0.65536000000000000000e5 +3843 3 1 14 -0.65536000000000000000e5 +3843 3 3 16 0.13107200000000000000e6 +3843 3 3 32 0.65536000000000000000e5 +3843 4 4 10 0.65536000000000000000e5 +3843 4 8 20 0.65536000000000000000e5 +3844 1 2 33 0.65536000000000000000e5 +3844 1 4 35 0.13107200000000000000e6 +3844 1 11 42 -0.65536000000000000000e5 +3844 1 12 43 -0.13107200000000000000e6 +3844 2 5 11 -0.65536000000000000000e5 +3844 2 12 26 0.65536000000000000000e5 +3844 3 4 33 -0.65536000000000000000e5 +3844 3 14 27 -0.13107200000000000000e6 +3844 4 4 11 0.65536000000000000000e5 +3844 4 8 20 0.65536000000000000000e5 +3845 1 2 33 0.65536000000000000000e5 +3845 1 4 35 0.13107200000000000000e6 +3845 1 5 20 -0.26214400000000000000e6 +3845 1 5 36 0.26214400000000000000e6 +3845 1 11 42 -0.65536000000000000000e5 +3845 1 12 43 -0.13107200000000000000e6 +3845 2 5 11 -0.65536000000000000000e5 +3845 2 12 26 0.65536000000000000000e5 +3845 3 2 15 -0.65536000000000000000e5 +3845 3 4 17 0.26214400000000000000e6 +3845 3 4 33 -0.65536000000000000000e5 +3845 3 5 18 0.13107200000000000000e6 +3845 3 10 11 0.65536000000000000000e5 +3845 3 14 27 -0.13107200000000000000e6 +3845 4 4 12 0.65536000000000000000e5 +3845 4 8 12 0.13107200000000000000e6 +3845 4 8 20 0.65536000000000000000e5 +3846 1 3 18 0.65536000000000000000e5 +3846 1 4 35 0.65536000000000000000e5 +3846 1 5 20 0.13107200000000000000e6 +3846 1 5 36 -0.13107200000000000000e6 +3846 1 10 17 -0.13107200000000000000e6 +3846 1 14 45 0.13107200000000000000e6 +3846 1 17 48 -0.65536000000000000000e5 +3846 1 18 49 -0.65536000000000000000e5 +3846 2 9 23 0.65536000000000000000e5 +3846 2 14 28 -0.65536000000000000000e5 +3846 3 5 18 -0.65536000000000000000e5 +3846 3 5 34 0.65536000000000000000e5 +3846 3 13 42 -0.65536000000000000000e5 +3846 3 14 43 -0.65536000000000000000e5 +3846 4 4 13 0.65536000000000000000e5 +3846 4 8 12 -0.65536000000000000000e5 +3847 4 4 14 0.65536000000000000000e5 +3847 4 8 12 -0.65536000000000000000e5 +3848 1 3 18 0.32768000000000000000e5 +3848 1 4 35 -0.65536000000000000000e5 +3848 1 5 20 0.13107200000000000000e6 +3848 1 5 36 -0.13107200000000000000e6 +3848 1 10 17 0.13107200000000000000e6 +3848 1 12 43 -0.98304000000000000000e5 +3848 1 14 45 -0.13107200000000000000e6 +3848 1 17 48 0.65536000000000000000e5 +3848 1 18 49 0.65536000000000000000e5 +3848 2 9 23 -0.65536000000000000000e5 +3848 2 14 28 0.65536000000000000000e5 +3848 3 3 16 0.32768000000000000000e5 +3848 3 4 17 0.32768000000000000000e5 +3848 3 5 34 -0.65536000000000000000e5 +3848 3 6 19 0.65536000000000000000e5 +3848 3 7 20 0.13107200000000000000e6 +3848 3 8 21 -0.26214400000000000000e6 +3848 3 13 42 0.65536000000000000000e5 +3848 3 14 27 -0.98304000000000000000e5 +3848 3 14 43 0.65536000000000000000e5 +3848 4 2 14 0.32768000000000000000e5 +3848 4 3 15 0.65536000000000000000e5 +3848 4 4 15 0.65536000000000000000e5 +3848 4 10 14 0.13107200000000000000e6 +3849 1 6 37 -0.65536000000000000000e5 +3849 1 24 39 0.65536000000000000000e5 +3849 2 3 33 0.65536000000000000000e5 +3849 2 4 18 -0.65536000000000000000e5 +3849 3 2 39 -0.65536000000000000000e5 +3849 3 3 40 -0.65536000000000000000e5 +3849 3 9 38 0.13107200000000000000e6 +3849 4 4 17 0.65536000000000000000e5 +3850 4 4 18 0.65536000000000000000e5 +3850 4 5 17 -0.65536000000000000000e5 +3851 1 1 40 -0.65536000000000000000e5 +3851 1 2 33 0.52428800000000000000e6 +3851 1 9 40 -0.26214400000000000000e6 +3851 1 10 25 0.26214400000000000000e6 +3851 1 11 42 -0.52428800000000000000e6 +3851 1 12 43 -0.10485760000000000000e7 +3851 1 23 38 0.65536000000000000000e5 +3851 1 28 43 0.52428800000000000000e6 +3851 1 32 47 0.52428800000000000000e6 +3851 1 33 48 0.52428800000000000000e6 +3851 2 2 32 0.65536000000000000000e5 +3851 2 3 17 -0.65536000000000000000e5 +3851 2 12 26 0.52428800000000000000e6 +3851 3 1 30 -0.26214400000000000000e6 +3851 3 1 38 -0.65536000000000000000e5 +3851 3 2 23 -0.65536000000000000000e5 +3851 3 2 39 -0.65536000000000000000e5 +3851 3 3 32 0.26214400000000000000e6 +3851 3 5 26 0.65536000000000000000e5 +3851 3 8 37 0.13107200000000000000e6 +3851 3 13 42 0.10485760000000000000e7 +3851 3 14 27 -0.52428800000000000000e6 +3851 3 28 41 0.52428800000000000000e6 +3851 3 29 42 0.52428800000000000000e6 +3851 4 3 31 -0.52428800000000000000e6 +3851 4 4 16 0.65536000000000000000e5 +3851 4 4 19 0.65536000000000000000e5 +3851 4 5 17 -0.65536000000000000000e5 +3851 4 6 18 -0.13107200000000000000e6 +3851 4 7 19 0.13107200000000000000e6 +3851 4 8 20 0.26214400000000000000e6 +3852 1 9 40 -0.65536000000000000000e5 +3852 1 10 25 0.65536000000000000000e5 +3852 3 1 30 0.65536000000000000000e5 +3852 3 3 32 -0.13107200000000000000e6 +3852 3 10 23 0.65536000000000000000e5 +3852 4 4 20 0.65536000000000000000e5 +3853 4 4 21 0.65536000000000000000e5 +3853 4 7 19 -0.65536000000000000000e5 +3854 1 1 48 0.32768000000000000000e5 +3854 1 2 33 -0.13107200000000000000e6 +3854 1 2 49 0.32768000000000000000e5 +3854 1 8 39 0.65536000000000000000e5 +3854 1 9 40 0.13107200000000000000e6 +3854 1 10 41 -0.13107200000000000000e6 +3854 1 11 26 0.65536000000000000000e5 +3854 1 23 38 0.32768000000000000000e5 +3854 1 26 41 -0.13107200000000000000e6 +3854 1 28 43 0.13107200000000000000e6 +3854 1 32 47 0.13107200000000000000e6 +3854 1 33 48 -0.13107200000000000000e6 +3854 2 2 32 0.32768000000000000000e5 +3854 2 4 34 -0.65536000000000000000e5 +3854 2 12 26 -0.13107200000000000000e6 +3854 2 16 30 0.65536000000000000000e5 +3854 2 20 34 0.13107200000000000000e6 +3854 2 28 34 0.65536000000000000000e5 +3854 3 3 32 -0.13107200000000000000e6 +3854 3 4 33 -0.13107200000000000000e6 +3854 3 9 38 0.65536000000000000000e5 +3854 3 10 23 -0.65536000000000000000e5 +3854 3 10 39 0.65536000000000000000e5 +3854 3 13 42 -0.26214400000000000000e6 +3854 3 14 27 0.26214400000000000000e6 +3854 3 22 35 0.26214400000000000000e6 +3854 3 28 41 0.13107200000000000000e6 +3854 3 29 42 -0.13107200000000000000e6 +3854 4 2 30 0.65536000000000000000e5 +3854 4 3 31 0.13107200000000000000e6 +3854 4 4 22 0.65536000000000000000e5 +3854 4 6 34 0.13107200000000000000e6 +3854 4 7 19 -0.65536000000000000000e5 +3854 4 8 20 -0.13107200000000000000e6 +3854 4 18 22 0.65536000000000000000e5 +3854 4 18 30 0.65536000000000000000e5 +3854 4 21 33 0.65536000000000000000e5 +3855 1 2 33 -0.65536000000000000000e5 +3855 1 4 35 -0.13107200000000000000e6 +3855 1 11 42 0.65536000000000000000e5 +3855 1 12 43 0.13107200000000000000e6 +3855 1 17 48 0.13107200000000000000e6 +3855 1 28 43 -0.65536000000000000000e5 +3855 1 32 47 -0.65536000000000000000e5 +3855 1 33 48 -0.65536000000000000000e5 +3855 2 12 26 -0.65536000000000000000e5 +3855 3 4 33 0.65536000000000000000e5 +3855 3 14 27 0.13107200000000000000e6 +3855 3 28 41 -0.65536000000000000000e5 +3855 3 29 42 -0.65536000000000000000e5 +3855 4 3 31 0.65536000000000000000e5 +3855 4 4 23 0.65536000000000000000e5 +3855 4 8 20 -0.65536000000000000000e5 +3856 4 4 24 0.65536000000000000000e5 +3856 4 9 21 -0.65536000000000000000e5 +3857 1 4 35 0.65536000000000000000e5 +3857 1 5 36 -0.13107200000000000000e6 +3857 1 14 45 0.13107200000000000000e6 +3857 1 15 30 0.65536000000000000000e5 +3857 1 17 48 -0.65536000000000000000e5 +3857 1 18 49 -0.65536000000000000000e5 +3857 3 5 34 0.65536000000000000000e5 +3857 3 13 42 -0.65536000000000000000e5 +3857 3 14 43 -0.65536000000000000000e5 +3857 4 4 25 0.65536000000000000000e5 +3858 1 6 37 0.65536000000000000000e5 +3858 1 24 39 -0.65536000000000000000e5 +3858 3 2 39 0.65536000000000000000e5 +3858 3 3 40 0.65536000000000000000e5 +3858 3 9 38 -0.13107200000000000000e6 +3858 4 4 26 0.65536000000000000000e5 +3859 1 1 48 0.65536000000000000000e5 +3859 1 2 49 0.13107200000000000000e6 +3859 1 8 39 0.13107200000000000000e6 +3859 1 9 40 0.13107200000000000000e6 +3859 1 10 41 -0.26214400000000000000e6 +3859 1 12 43 -0.52428800000000000000e6 +3859 1 23 38 0.65536000000000000000e5 +3859 1 25 40 -0.65536000000000000000e5 +3859 1 28 43 0.26214400000000000000e6 +3859 1 32 47 0.52428800000000000000e6 +3859 2 2 32 0.65536000000000000000e5 +3859 2 3 33 0.65536000000000000000e5 +3859 2 5 27 -0.65536000000000000000e5 +3859 2 16 30 0.13107200000000000000e6 +3859 2 20 34 0.26214400000000000000e6 +3859 3 9 38 0.13107200000000000000e6 +3859 3 22 35 0.52428800000000000000e6 +3859 3 28 41 0.52428800000000000000e6 +3859 4 2 30 0.13107200000000000000e6 +3859 4 4 27 0.65536000000000000000e5 +3859 4 6 34 0.26214400000000000000e6 +3860 1 1 40 0.65536000000000000000e5 +3860 1 2 33 -0.52428800000000000000e6 +3860 1 6 53 0.65536000000000000000e5 +3860 1 9 40 0.26214400000000000000e6 +3860 1 10 25 -0.26214400000000000000e6 +3860 1 11 42 0.52428800000000000000e6 +3860 1 12 43 0.10485760000000000000e7 +3860 1 23 38 -0.65536000000000000000e5 +3860 1 25 40 -0.65536000000000000000e5 +3860 1 28 43 -0.52428800000000000000e6 +3860 1 32 47 -0.52428800000000000000e6 +3860 1 33 48 -0.52428800000000000000e6 +3860 2 2 32 -0.65536000000000000000e5 +3860 2 3 17 0.65536000000000000000e5 +3860 2 5 19 -0.65536000000000000000e5 +3860 2 5 35 0.65536000000000000000e5 +3860 2 12 26 -0.52428800000000000000e6 +3860 3 1 30 0.26214400000000000000e6 +3860 3 1 38 0.65536000000000000000e5 +3860 3 2 23 0.65536000000000000000e5 +3860 3 2 39 0.65536000000000000000e5 +3860 3 3 32 -0.26214400000000000000e6 +3860 3 5 26 -0.65536000000000000000e5 +3860 3 5 50 0.13107200000000000000e6 +3860 3 8 37 -0.13107200000000000000e6 +3860 3 13 42 -0.10485760000000000000e7 +3860 3 14 27 0.52428800000000000000e6 +3860 3 25 38 -0.65536000000000000000e5 +3860 3 26 39 -0.65536000000000000000e5 +3860 3 28 41 -0.52428800000000000000e6 +3860 3 29 42 -0.52428800000000000000e6 +3860 4 3 31 0.52428800000000000000e6 +3860 4 4 16 -0.65536000000000000000e5 +3860 4 4 28 0.65536000000000000000e5 +3860 4 5 17 0.65536000000000000000e5 +3860 4 6 18 0.13107200000000000000e6 +3860 4 7 19 -0.13107200000000000000e6 +3860 4 8 20 -0.26214400000000000000e6 +3861 1 9 40 0.65536000000000000000e5 +3861 1 10 41 0.13107200000000000000e6 +3861 1 11 42 0.13107200000000000000e6 +3861 1 26 41 -0.65536000000000000000e5 +3861 1 32 47 -0.13107200000000000000e6 +3861 1 33 48 -0.13107200000000000000e6 +3861 3 9 38 0.65536000000000000000e5 +3861 3 10 39 0.65536000000000000000e5 +3861 3 13 42 -0.26214400000000000000e6 +3861 3 28 41 -0.13107200000000000000e6 +3861 3 29 42 -0.13107200000000000000e6 +3861 4 3 31 0.13107200000000000000e6 +3861 4 4 29 0.65536000000000000000e5 +3862 4 4 30 0.65536000000000000000e5 +3862 4 18 22 -0.65536000000000000000e5 +3863 1 10 41 -0.65536000000000000000e5 +3863 1 14 45 -0.26214400000000000000e6 +3863 1 17 48 0.13107200000000000000e6 +3863 1 18 49 0.13107200000000000000e6 +3863 1 26 33 0.65536000000000000000e5 +3863 1 32 47 0.65536000000000000000e5 +3863 1 33 40 -0.65536000000000000000e5 +3863 1 34 49 0.13107200000000000000e6 +3863 2 14 28 0.13107200000000000000e6 +3863 3 13 42 0.26214400000000000000e6 +3863 3 14 43 0.13107200000000000000e6 +3863 3 18 47 0.13107200000000000000e6 +3863 3 28 41 0.65536000000000000000e5 +3863 4 3 31 -0.65536000000000000000e5 +3863 4 4 31 0.65536000000000000000e5 +3864 1 6 53 -0.65536000000000000000e5 +3864 1 25 40 0.65536000000000000000e5 +3864 3 5 50 -0.13107200000000000000e6 +3864 3 25 38 0.65536000000000000000e5 +3864 3 26 39 0.65536000000000000000e5 +3864 4 4 33 0.65536000000000000000e5 +3865 4 4 34 0.65536000000000000000e5 +3865 4 18 30 -0.65536000000000000000e5 +3866 1 1 48 -0.65536000000000000000e5 +3866 1 2 49 -0.13107200000000000000e6 +3866 1 6 53 0.65536000000000000000e5 +3866 1 8 39 -0.13107200000000000000e6 +3866 1 9 40 -0.13107200000000000000e6 +3866 1 10 41 0.26214400000000000000e6 +3866 1 12 43 0.52428800000000000000e6 +3866 1 23 38 -0.65536000000000000000e5 +3866 1 24 39 -0.65536000000000000000e5 +3866 1 24 55 -0.13107200000000000000e6 +3866 1 25 56 -0.65536000000000000000e5 +3866 1 26 41 0.26214400000000000000e6 +3866 1 28 43 -0.26214400000000000000e6 +3866 1 32 47 -0.52428800000000000000e6 +3866 1 40 47 -0.65536000000000000000e5 +3866 2 2 32 -0.65536000000000000000e5 +3866 2 3 33 -0.65536000000000000000e5 +3866 2 16 30 -0.13107200000000000000e6 +3866 2 20 34 -0.26214400000000000000e6 +3866 3 9 38 -0.13107200000000000000e6 +3866 3 22 35 -0.52428800000000000000e6 +3866 3 22 51 0.13107200000000000000e6 +3866 3 23 52 -0.26214400000000000000e6 +3866 3 24 53 0.65536000000000000000e5 +3866 3 25 38 -0.65536000000000000000e5 +3866 3 25 54 0.65536000000000000000e5 +3866 3 27 40 -0.13107200000000000000e6 +3866 3 28 41 -0.52428800000000000000e6 +3866 3 38 51 -0.13107200000000000000e6 +3866 3 39 40 0.65536000000000000000e5 +3866 4 2 30 -0.13107200000000000000e6 +3866 4 4 35 0.65536000000000000000e5 +3866 4 6 34 -0.26214400000000000000e6 +3866 4 7 35 0.13107200000000000000e6 +3866 4 28 32 0.65536000000000000000e5 +3867 1 1 48 0.32768000000000000000e5 +3867 1 2 49 0.32768000000000000000e5 +3867 1 9 40 0.65536000000000000000e5 +3867 1 10 25 -0.65536000000000000000e5 +3867 1 12 43 -0.26214400000000000000e6 +3867 1 23 38 0.32768000000000000000e5 +3867 1 26 41 -0.65536000000000000000e5 +3867 1 28 43 0.13107200000000000000e6 +3867 1 32 47 0.26214400000000000000e6 +3867 2 2 32 0.32768000000000000000e5 +3867 2 3 9 -0.65536000000000000000e5 +3867 2 16 30 0.65536000000000000000e5 +3867 2 20 34 0.13107200000000000000e6 +3867 3 1 30 -0.65536000000000000000e5 +3867 3 3 32 0.13107200000000000000e6 +3867 3 10 23 -0.65536000000000000000e5 +3867 3 22 35 0.26214400000000000000e6 +3867 3 28 41 0.26214400000000000000e6 +3867 4 2 30 0.65536000000000000000e5 +3867 4 5 6 0.65536000000000000000e5 +3867 4 6 34 0.13107200000000000000e6 +3868 4 4 8 -0.65536000000000000000e5 +3868 4 5 7 0.65536000000000000000e5 +3869 1 4 11 0.65536000000000000000e5 +3869 1 4 35 -0.26214400000000000000e6 +3869 1 6 13 0.13107200000000000000e6 +3869 1 10 25 -0.65536000000000000000e5 +3869 1 10 41 0.13107200000000000000e6 +3869 1 11 42 0.13107200000000000000e6 +3869 2 5 11 0.13107200000000000000e6 +3869 3 2 15 0.13107200000000000000e6 +3869 3 3 32 0.13107200000000000000e6 +3869 3 4 17 -0.26214400000000000000e6 +3869 3 4 33 0.13107200000000000000e6 +3869 3 6 11 -0.65536000000000000000e5 +3869 3 10 11 0.13107200000000000000e6 +3869 4 5 8 0.65536000000000000000e5 +3869 4 5 9 -0.65536000000000000000e5 +3870 1 2 33 0.65536000000000000000e5 +3870 1 4 35 0.13107200000000000000e6 +3870 1 11 42 -0.65536000000000000000e5 +3870 1 12 43 -0.13107200000000000000e6 +3870 2 5 11 -0.65536000000000000000e5 +3870 2 12 26 0.65536000000000000000e5 +3870 3 4 33 -0.65536000000000000000e5 +3870 3 14 27 -0.13107200000000000000e6 +3870 4 5 10 0.65536000000000000000e5 +3870 4 8 20 0.65536000000000000000e5 +3871 1 2 33 0.65536000000000000000e5 +3871 1 4 35 0.13107200000000000000e6 +3871 1 5 20 -0.26214400000000000000e6 +3871 1 5 36 0.26214400000000000000e6 +3871 1 11 42 -0.65536000000000000000e5 +3871 1 12 43 -0.13107200000000000000e6 +3871 2 5 11 -0.65536000000000000000e5 +3871 2 12 26 0.65536000000000000000e5 +3871 3 2 15 -0.65536000000000000000e5 +3871 3 4 17 0.26214400000000000000e6 +3871 3 4 33 -0.65536000000000000000e5 +3871 3 5 18 0.13107200000000000000e6 +3871 3 10 11 0.65536000000000000000e5 +3871 3 14 27 -0.13107200000000000000e6 +3871 4 5 11 0.65536000000000000000e5 +3871 4 8 12 0.13107200000000000000e6 +3871 4 8 20 0.65536000000000000000e5 +3872 4 5 12 0.65536000000000000000e5 +3872 4 9 9 -0.13107200000000000000e6 +3873 4 5 13 0.65536000000000000000e5 +3873 4 8 12 -0.65536000000000000000e5 +3874 4 5 15 0.65536000000000000000e5 +3874 4 12 12 -0.13107200000000000000e6 +3875 1 6 37 -0.65536000000000000000e5 +3875 1 24 39 0.65536000000000000000e5 +3875 2 3 33 0.65536000000000000000e5 +3875 2 4 18 -0.65536000000000000000e5 +3875 3 2 39 -0.65536000000000000000e5 +3875 3 3 40 -0.65536000000000000000e5 +3875 3 9 38 0.13107200000000000000e6 +3875 4 5 16 0.65536000000000000000e5 +3876 1 1 40 -0.65536000000000000000e5 +3876 1 2 33 0.52428800000000000000e6 +3876 1 9 40 -0.26214400000000000000e6 +3876 1 10 25 0.26214400000000000000e6 +3876 1 11 42 -0.52428800000000000000e6 +3876 1 12 43 -0.10485760000000000000e7 +3876 1 23 38 0.65536000000000000000e5 +3876 1 28 43 0.52428800000000000000e6 +3876 1 32 47 0.52428800000000000000e6 +3876 1 33 48 0.52428800000000000000e6 +3876 2 2 32 0.65536000000000000000e5 +3876 2 3 17 -0.65536000000000000000e5 +3876 2 12 26 0.52428800000000000000e6 +3876 3 1 30 -0.26214400000000000000e6 +3876 3 1 38 -0.65536000000000000000e5 +3876 3 2 23 -0.65536000000000000000e5 +3876 3 2 39 -0.65536000000000000000e5 +3876 3 3 32 0.26214400000000000000e6 +3876 3 5 26 0.65536000000000000000e5 +3876 3 8 37 0.13107200000000000000e6 +3876 3 13 42 0.10485760000000000000e7 +3876 3 14 27 -0.52428800000000000000e6 +3876 3 28 41 0.52428800000000000000e6 +3876 3 29 42 0.52428800000000000000e6 +3876 4 3 31 -0.52428800000000000000e6 +3876 4 4 16 0.65536000000000000000e5 +3876 4 5 17 -0.65536000000000000000e5 +3876 4 5 18 0.65536000000000000000e5 +3876 4 6 18 -0.13107200000000000000e6 +3876 4 7 19 0.13107200000000000000e6 +3876 4 8 20 0.26214400000000000000e6 +3877 4 5 20 0.65536000000000000000e5 +3877 4 7 19 -0.65536000000000000000e5 +3878 1 1 48 0.32768000000000000000e5 +3878 1 2 33 -0.13107200000000000000e6 +3878 1 2 49 0.32768000000000000000e5 +3878 1 8 39 0.65536000000000000000e5 +3878 1 9 40 0.13107200000000000000e6 +3878 1 10 41 -0.13107200000000000000e6 +3878 1 11 26 0.65536000000000000000e5 +3878 1 23 38 0.32768000000000000000e5 +3878 1 26 41 -0.13107200000000000000e6 +3878 1 28 43 0.13107200000000000000e6 +3878 1 32 47 0.13107200000000000000e6 +3878 1 33 48 -0.13107200000000000000e6 +3878 2 2 32 0.32768000000000000000e5 +3878 2 4 34 -0.65536000000000000000e5 +3878 2 12 26 -0.13107200000000000000e6 +3878 2 16 30 0.65536000000000000000e5 +3878 2 20 34 0.13107200000000000000e6 +3878 2 28 34 0.65536000000000000000e5 +3878 3 3 32 -0.13107200000000000000e6 +3878 3 4 33 -0.13107200000000000000e6 +3878 3 9 38 0.65536000000000000000e5 +3878 3 10 23 -0.65536000000000000000e5 +3878 3 10 39 0.65536000000000000000e5 +3878 3 13 42 -0.26214400000000000000e6 +3878 3 14 27 0.26214400000000000000e6 +3878 3 22 35 0.26214400000000000000e6 +3878 3 28 41 0.13107200000000000000e6 +3878 3 29 42 -0.13107200000000000000e6 +3878 4 2 30 0.65536000000000000000e5 +3878 4 3 31 0.13107200000000000000e6 +3878 4 5 21 0.65536000000000000000e5 +3878 4 6 34 0.13107200000000000000e6 +3878 4 7 19 -0.65536000000000000000e5 +3878 4 8 20 -0.13107200000000000000e6 +3878 4 18 22 0.65536000000000000000e5 +3878 4 18 30 0.65536000000000000000e5 +3878 4 21 33 0.65536000000000000000e5 +3879 1 1 48 0.32768000000000000000e5 +3879 1 2 33 -0.26214400000000000000e6 +3879 1 2 49 0.32768000000000000000e5 +3879 1 8 39 0.65536000000000000000e5 +3879 1 9 40 0.19660800000000000000e6 +3879 1 10 25 -0.65536000000000000000e5 +3879 1 10 41 -0.13107200000000000000e6 +3879 1 11 26 0.65536000000000000000e5 +3879 1 11 42 0.13107200000000000000e6 +3879 1 12 43 0.26214400000000000000e6 +3879 1 23 38 0.32768000000000000000e5 +3879 1 26 41 -0.13107200000000000000e6 +3879 1 33 48 -0.26214400000000000000e6 +3879 2 2 32 0.32768000000000000000e5 +3879 2 4 34 -0.65536000000000000000e5 +3879 2 12 26 -0.26214400000000000000e6 +3879 2 16 30 0.65536000000000000000e5 +3879 2 20 34 0.13107200000000000000e6 +3879 2 28 34 0.65536000000000000000e5 +3879 3 3 32 -0.26214400000000000000e6 +3879 3 4 33 0.13107200000000000000e6 +3879 3 5 34 -0.26214400000000000000e6 +3879 3 9 38 0.65536000000000000000e5 +3879 3 10 23 -0.65536000000000000000e5 +3879 3 10 39 0.65536000000000000000e5 +3879 3 11 26 0.65536000000000000000e5 +3879 3 13 42 -0.52428800000000000000e6 +3879 3 14 27 0.52428800000000000000e6 +3879 3 22 35 0.26214400000000000000e6 +3879 3 29 42 -0.26214400000000000000e6 +3879 4 2 30 0.65536000000000000000e5 +3879 4 3 31 0.26214400000000000000e6 +3879 4 5 22 0.65536000000000000000e5 +3879 4 6 34 0.13107200000000000000e6 +3879 4 7 19 -0.65536000000000000000e5 +3879 4 8 20 -0.26214400000000000000e6 +3879 4 9 21 0.13107200000000000000e6 +3879 4 18 22 0.65536000000000000000e5 +3879 4 18 30 0.65536000000000000000e5 +3879 4 21 33 0.65536000000000000000e5 +3880 4 5 23 0.65536000000000000000e5 +3880 4 9 21 -0.65536000000000000000e5 +3881 1 2 33 0.65536000000000000000e5 +3881 1 11 42 -0.65536000000000000000e5 +3881 1 12 43 -0.13107200000000000000e6 +3881 1 15 30 -0.13107200000000000000e6 +3881 1 18 49 0.13107200000000000000e6 +3881 1 28 43 0.65536000000000000000e5 +3881 1 32 47 0.65536000000000000000e5 +3881 1 33 48 0.65536000000000000000e5 +3881 2 12 26 0.65536000000000000000e5 +3881 3 3 32 0.65536000000000000000e5 +3881 3 5 34 0.13107200000000000000e6 +3881 3 11 30 0.65536000000000000000e5 +3881 3 13 42 0.13107200000000000000e6 +3881 3 14 27 -0.13107200000000000000e6 +3881 3 14 43 0.13107200000000000000e6 +3881 3 28 41 0.65536000000000000000e5 +3881 3 29 42 0.65536000000000000000e5 +3881 4 3 31 -0.65536000000000000000e5 +3881 4 5 24 0.65536000000000000000e5 +3881 4 8 20 0.65536000000000000000e5 +3881 4 9 21 -0.65536000000000000000e5 +3882 1 15 30 0.65536000000000000000e5 +3882 1 18 49 -0.65536000000000000000e5 +3882 3 5 34 0.65536000000000000000e5 +3882 3 6 35 0.65536000000000000000e5 +3882 3 14 43 -0.65536000000000000000e5 +3882 3 17 30 -0.13107200000000000000e6 +3882 4 5 25 0.65536000000000000000e5 +3883 1 1 48 0.65536000000000000000e5 +3883 1 2 49 0.13107200000000000000e6 +3883 1 8 39 0.13107200000000000000e6 +3883 1 9 40 0.13107200000000000000e6 +3883 1 10 41 -0.26214400000000000000e6 +3883 1 12 43 -0.52428800000000000000e6 +3883 1 23 38 0.65536000000000000000e5 +3883 1 25 40 -0.65536000000000000000e5 +3883 1 28 43 0.26214400000000000000e6 +3883 1 32 47 0.52428800000000000000e6 +3883 2 2 32 0.65536000000000000000e5 +3883 2 3 33 0.65536000000000000000e5 +3883 2 5 27 -0.65536000000000000000e5 +3883 2 16 30 0.13107200000000000000e6 +3883 2 20 34 0.26214400000000000000e6 +3883 3 9 38 0.13107200000000000000e6 +3883 3 22 35 0.52428800000000000000e6 +3883 3 28 41 0.52428800000000000000e6 +3883 4 2 30 0.13107200000000000000e6 +3883 4 5 26 0.65536000000000000000e5 +3883 4 6 34 0.26214400000000000000e6 +3884 1 1 40 0.65536000000000000000e5 +3884 1 2 33 -0.52428800000000000000e6 +3884 1 6 53 0.65536000000000000000e5 +3884 1 9 40 0.26214400000000000000e6 +3884 1 10 25 -0.26214400000000000000e6 +3884 1 11 42 0.52428800000000000000e6 +3884 1 12 43 0.10485760000000000000e7 +3884 1 23 38 -0.65536000000000000000e5 +3884 1 25 40 -0.65536000000000000000e5 +3884 1 28 43 -0.52428800000000000000e6 +3884 1 32 47 -0.52428800000000000000e6 +3884 1 33 48 -0.52428800000000000000e6 +3884 2 2 32 -0.65536000000000000000e5 +3884 2 3 17 0.65536000000000000000e5 +3884 2 5 19 -0.65536000000000000000e5 +3884 2 5 35 0.65536000000000000000e5 +3884 2 12 26 -0.52428800000000000000e6 +3884 3 1 30 0.26214400000000000000e6 +3884 3 1 38 0.65536000000000000000e5 +3884 3 2 23 0.65536000000000000000e5 +3884 3 2 39 0.65536000000000000000e5 +3884 3 3 32 -0.26214400000000000000e6 +3884 3 5 26 -0.65536000000000000000e5 +3884 3 5 50 0.13107200000000000000e6 +3884 3 8 37 -0.13107200000000000000e6 +3884 3 13 42 -0.10485760000000000000e7 +3884 3 14 27 0.52428800000000000000e6 +3884 3 25 38 -0.65536000000000000000e5 +3884 3 26 39 -0.65536000000000000000e5 +3884 3 28 41 -0.52428800000000000000e6 +3884 3 29 42 -0.52428800000000000000e6 +3884 4 3 31 0.52428800000000000000e6 +3884 4 4 16 -0.65536000000000000000e5 +3884 4 5 17 0.65536000000000000000e5 +3884 4 5 27 0.65536000000000000000e5 +3884 4 6 18 0.13107200000000000000e6 +3884 4 7 19 -0.13107200000000000000e6 +3884 4 8 20 -0.26214400000000000000e6 +3885 4 5 28 0.65536000000000000000e5 +3885 4 19 19 -0.13107200000000000000e6 +3886 4 5 29 0.65536000000000000000e5 +3886 4 18 22 -0.65536000000000000000e5 +3887 1 9 40 -0.65536000000000000000e5 +3887 1 11 42 0.13107200000000000000e6 +3887 1 26 33 -0.13107200000000000000e6 +3887 1 26 41 0.65536000000000000000e5 +3887 1 33 40 0.13107200000000000000e6 +3887 1 33 48 -0.13107200000000000000e6 +3887 3 11 40 0.65536000000000000000e5 +3887 3 29 42 -0.13107200000000000000e6 +3887 4 5 30 0.65536000000000000000e5 +3887 4 18 22 -0.65536000000000000000e5 +3888 4 5 31 0.65536000000000000000e5 +3888 4 22 22 -0.13107200000000000000e6 +3889 1 6 53 -0.65536000000000000000e5 +3889 1 25 40 0.65536000000000000000e5 +3889 3 5 50 -0.13107200000000000000e6 +3889 3 25 38 0.65536000000000000000e5 +3889 3 26 39 0.65536000000000000000e5 +3889 4 5 32 0.65536000000000000000e5 +3890 3 6 51 0.65536000000000000000e5 +3890 3 14 51 -0.26214400000000000000e6 +3890 3 27 40 -0.65536000000000000000e5 +3890 3 29 42 0.26214400000000000000e6 +3890 3 30 43 0.13107200000000000000e6 +3890 4 5 34 0.65536000000000000000e5 +3890 4 18 30 -0.65536000000000000000e5 +3890 4 19 31 0.13107200000000000000e6 +3891 4 5 35 0.65536000000000000000e5 +3891 4 28 28 -0.13107200000000000000e6 +3892 1 1 48 -0.32768000000000000000e5 +3892 1 2 17 -0.13107200000000000000e6 +3892 1 2 33 -0.13107200000000000000e6 +3892 1 2 49 -0.32768000000000000000e5 +3892 1 3 34 0.13107200000000000000e6 +3892 1 4 11 0.32768000000000000000e5 +3892 1 8 23 -0.32768000000000000000e5 +3892 1 8 39 -0.32768000000000000000e5 +3892 1 9 40 -0.32768000000000000000e5 +3892 1 10 41 -0.65536000000000000000e5 +3892 1 11 42 0.65536000000000000000e5 +3892 1 12 43 0.26214400000000000000e6 +3892 1 16 23 0.13107200000000000000e6 +3892 1 23 38 -0.32768000000000000000e5 +3892 1 26 41 0.32768000000000000000e5 +3892 1 28 43 -0.13107200000000000000e6 +3892 1 32 47 -0.19660800000000000000e6 +3892 1 33 48 -0.65536000000000000000e5 +3892 2 2 8 -0.32768000000000000000e5 +3892 2 2 32 -0.32768000000000000000e5 +3892 2 3 9 0.32768000000000000000e5 +3892 2 4 10 -0.65536000000000000000e5 +3892 2 12 26 -0.65536000000000000000e5 +3892 2 16 30 -0.32768000000000000000e5 +3892 2 20 34 -0.65536000000000000000e5 +3892 3 1 14 0.65536000000000000000e5 +3892 3 1 30 0.32768000000000000000e5 +3892 3 2 7 0.32768000000000000000e5 +3892 3 2 15 -0.13107200000000000000e6 +3892 3 3 16 0.13107200000000000000e6 +3892 3 3 32 -0.13107200000000000000e6 +3892 3 4 9 0.32768000000000000000e5 +3892 3 8 37 -0.32768000000000000000e5 +3892 3 10 23 0.65536000000000000000e5 +3892 3 13 42 -0.13107200000000000000e6 +3892 3 22 35 -0.13107200000000000000e6 +3892 3 28 41 -0.19660800000000000000e6 +3892 3 29 42 -0.65536000000000000000e5 +3892 4 2 6 0.32768000000000000000e5 +3892 4 2 30 -0.32768000000000000000e5 +3892 4 3 31 0.65536000000000000000e5 +3892 4 6 7 0.65536000000000000000e5 +3892 4 6 18 0.32768000000000000000e5 +3892 4 6 34 -0.65536000000000000000e5 +3893 2 4 10 -0.65536000000000000000e5 +3893 2 7 21 0.65536000000000000000e5 +3893 4 6 8 0.65536000000000000000e5 +3894 1 2 33 0.65536000000000000000e5 +3894 1 3 18 -0.13107200000000000000e6 +3894 1 6 13 0.65536000000000000000e5 +3894 1 10 41 0.65536000000000000000e5 +3894 2 4 10 -0.65536000000000000000e5 +3894 2 7 21 0.65536000000000000000e5 +3894 2 12 26 0.65536000000000000000e5 +3894 3 1 14 -0.65536000000000000000e5 +3894 3 3 16 0.13107200000000000000e6 +3894 3 3 32 0.65536000000000000000e5 +3894 4 6 9 0.65536000000000000000e5 +3894 4 8 20 0.65536000000000000000e5 +3895 4 1 13 -0.65536000000000000000e5 +3895 4 6 10 0.65536000000000000000e5 +3896 1 3 18 0.65536000000000000000e5 +3896 1 3 34 -0.65536000000000000000e5 +3896 1 4 19 -0.13107200000000000000e6 +3896 1 4 35 -0.65536000000000000000e5 +3896 1 12 43 -0.19660800000000000000e6 +3896 1 14 45 -0.13107200000000000000e6 +3896 1 16 23 -0.65536000000000000000e5 +3896 1 17 48 0.65536000000000000000e5 +3896 1 18 49 0.65536000000000000000e5 +3896 1 20 27 0.26214400000000000000e6 +3896 2 6 12 -0.65536000000000000000e5 +3896 2 9 23 -0.65536000000000000000e5 +3896 2 10 24 -0.13107200000000000000e6 +3896 2 14 28 0.65536000000000000000e5 +3896 3 3 16 0.65536000000000000000e5 +3896 3 4 17 0.65536000000000000000e5 +3896 3 5 34 -0.65536000000000000000e5 +3896 3 13 42 0.65536000000000000000e5 +3896 3 14 27 -0.19660800000000000000e6 +3896 3 14 43 0.65536000000000000000e5 +3896 4 2 14 0.65536000000000000000e5 +3896 4 6 11 0.65536000000000000000e5 +3897 4 2 14 -0.65536000000000000000e5 +3897 4 6 12 0.65536000000000000000e5 +3898 4 6 13 0.65536000000000000000e5 +3898 4 10 10 -0.13107200000000000000e6 +3899 1 2 17 0.32768000000000000000e5 +3899 1 3 18 0.32768000000000000000e5 +3899 1 3 34 0.32768000000000000000e5 +3899 1 4 19 0.65536000000000000000e5 +3899 1 10 17 0.65536000000000000000e5 +3899 1 20 27 -0.13107200000000000000e6 +3899 2 6 12 0.32768000000000000000e5 +3899 2 10 24 0.65536000000000000000e5 +3899 3 3 16 0.32768000000000000000e5 +3899 3 7 20 -0.13107200000000000000e6 +3899 4 6 14 0.65536000000000000000e5 +3900 1 2 17 0.32768000000000000000e5 +3900 1 3 18 0.32768000000000000000e5 +3900 1 3 34 0.16384000000000000000e5 +3900 1 4 19 0.32768000000000000000e5 +3900 1 5 20 0.32768000000000000000e5 +3900 1 5 36 -0.32768000000000000000e5 +3900 1 10 17 0.32768000000000000000e5 +3900 1 12 43 -0.16384000000000000000e5 +3900 1 16 23 -0.16384000000000000000e5 +3900 1 20 27 -0.65536000000000000000e5 +3900 2 6 12 0.16384000000000000000e5 +3900 2 10 24 0.32768000000000000000e5 +3900 3 3 16 0.49152000000000000000e5 +3900 3 4 17 0.16384000000000000000e5 +3900 3 7 12 0.16384000000000000000e5 +3900 3 7 20 0.65536000000000000000e5 +3900 3 8 21 0.13107200000000000000e6 +3900 3 12 21 -0.26214400000000000000e6 +3900 3 14 19 0.13107200000000000000e6 +3900 3 14 27 -0.16384000000000000000e5 +3900 4 1 13 0.16384000000000000000e5 +3900 4 2 14 0.16384000000000000000e5 +3900 4 3 15 0.32768000000000000000e5 +3900 4 6 15 0.65536000000000000000e5 +3900 4 10 10 0.65536000000000000000e5 +3900 4 13 13 0.26214400000000000000e6 +3901 1 1 24 0.32768000000000000000e5 +3901 1 1 32 -0.13107200000000000000e6 +3901 1 1 40 0.32768000000000000000e5 +3901 1 2 33 0.26214400000000000000e6 +3901 1 3 34 -0.26214400000000000000e6 +3901 1 7 38 -0.65536000000000000000e5 +3901 1 8 23 0.65536000000000000000e5 +3901 1 10 41 0.13107200000000000000e6 +3901 1 11 42 -0.26214400000000000000e6 +3901 1 12 43 -0.52428800000000000000e6 +3901 1 16 23 0.26214400000000000000e6 +3901 1 22 37 -0.32768000000000000000e5 +3901 1 23 38 -0.32768000000000000000e5 +3901 1 28 43 0.26214400000000000000e6 +3901 1 32 47 0.26214400000000000000e6 +3901 1 33 48 0.26214400000000000000e6 +3901 2 1 31 -0.13107200000000000000e6 +3901 2 2 16 0.32768000000000000000e5 +3901 2 7 21 0.13107200000000000000e6 +3901 2 12 26 0.26214400000000000000e6 +3901 2 16 16 -0.65536000000000000000e5 +3901 3 1 22 0.32768000000000000000e5 +3901 3 1 30 -0.65536000000000000000e5 +3901 3 1 34 -0.26214400000000000000e6 +3901 3 1 38 0.32768000000000000000e5 +3901 3 2 23 0.32768000000000000000e5 +3901 3 2 31 0.13107200000000000000e6 +3901 3 3 32 0.13107200000000000000e6 +3901 3 10 23 -0.65536000000000000000e5 +3901 3 13 42 0.52428800000000000000e6 +3901 3 22 27 -0.65536000000000000000e5 +3901 3 28 41 0.26214400000000000000e6 +3901 3 29 42 0.26214400000000000000e6 +3901 4 3 31 -0.26214400000000000000e6 +3901 4 6 16 0.65536000000000000000e5 +3901 4 6 18 -0.65536000000000000000e5 +3901 4 16 16 0.65536000000000000000e5 +3902 1 2 33 0.13107200000000000000e6 +3902 1 7 38 -0.65536000000000000000e5 +3902 1 8 23 0.65536000000000000000e5 +3902 1 11 42 -0.13107200000000000000e6 +3902 1 12 43 -0.26214400000000000000e6 +3902 1 28 43 0.13107200000000000000e6 +3902 1 32 47 0.13107200000000000000e6 +3902 1 33 48 0.13107200000000000000e6 +3902 2 12 26 0.13107200000000000000e6 +3902 3 2 31 -0.13107200000000000000e6 +3902 3 10 23 -0.65536000000000000000e5 +3902 3 13 42 0.26214400000000000000e6 +3902 3 28 41 0.13107200000000000000e6 +3902 3 29 42 0.13107200000000000000e6 +3902 4 3 31 -0.13107200000000000000e6 +3902 4 6 17 0.65536000000000000000e5 +3902 4 6 18 -0.65536000000000000000e5 +3903 1 9 40 -0.65536000000000000000e5 +3903 1 10 25 0.65536000000000000000e5 +3903 3 1 30 0.65536000000000000000e5 +3903 3 3 32 -0.13107200000000000000e6 +3903 3 10 23 0.65536000000000000000e5 +3903 4 6 19 0.65536000000000000000e5 +3904 1 1 32 0.65536000000000000000e5 +3904 1 3 34 0.13107200000000000000e6 +3904 1 10 41 -0.65536000000000000000e5 +3904 1 16 23 -0.13107200000000000000e6 +3904 2 1 31 0.65536000000000000000e5 +3904 2 7 21 -0.65536000000000000000e5 +3904 3 3 32 -0.65536000000000000000e5 +3904 4 6 20 0.65536000000000000000e5 +3905 1 2 33 0.65536000000000000000e5 +3905 1 3 34 -0.13107200000000000000e6 +3905 1 11 42 -0.65536000000000000000e5 +3905 1 12 43 -0.13107200000000000000e6 +3905 1 16 47 0.13107200000000000000e6 +3905 1 28 43 0.65536000000000000000e5 +3905 1 32 47 0.65536000000000000000e5 +3905 1 33 48 0.65536000000000000000e5 +3905 2 12 26 0.65536000000000000000e5 +3905 3 2 31 0.65536000000000000000e5 +3905 3 3 32 0.65536000000000000000e5 +3905 3 12 41 0.13107200000000000000e6 +3905 3 13 42 0.13107200000000000000e6 +3905 3 28 41 0.65536000000000000000e5 +3905 3 29 42 0.65536000000000000000e5 +3905 4 3 31 -0.65536000000000000000e5 +3905 4 6 21 0.65536000000000000000e5 +3906 4 6 22 0.65536000000000000000e5 +3906 4 8 20 -0.65536000000000000000e5 +3907 1 3 18 -0.65536000000000000000e5 +3907 1 3 34 0.65536000000000000000e5 +3907 1 4 19 0.13107200000000000000e6 +3907 1 4 35 0.65536000000000000000e5 +3907 1 12 43 0.13107200000000000000e6 +3907 1 14 45 0.13107200000000000000e6 +3907 1 16 47 -0.65536000000000000000e5 +3907 1 17 48 -0.65536000000000000000e5 +3907 1 18 49 -0.65536000000000000000e5 +3907 1 20 27 -0.26214400000000000000e6 +3907 1 27 34 0.13107200000000000000e6 +3907 2 9 23 0.65536000000000000000e5 +3907 2 10 24 0.13107200000000000000e6 +3907 2 14 28 -0.65536000000000000000e5 +3907 3 1 34 0.65536000000000000000e5 +3907 3 3 16 -0.65536000000000000000e5 +3907 3 4 17 -0.65536000000000000000e5 +3907 3 5 34 0.65536000000000000000e5 +3907 3 12 41 -0.65536000000000000000e5 +3907 3 13 42 -0.65536000000000000000e5 +3907 3 14 27 0.19660800000000000000e6 +3907 3 14 43 -0.65536000000000000000e5 +3907 4 2 14 -0.65536000000000000000e5 +3907 4 6 23 0.65536000000000000000e5 +3908 1 3 18 0.65536000000000000000e5 +3908 1 3 34 0.65536000000000000000e5 +3908 1 4 19 -0.13107200000000000000e6 +3908 1 4 35 0.65536000000000000000e5 +3908 1 12 43 -0.65536000000000000000e5 +3908 1 13 44 0.13107200000000000000e6 +3908 1 16 47 -0.65536000000000000000e5 +3908 1 17 48 -0.65536000000000000000e5 +3908 3 3 16 0.65536000000000000000e5 +3908 3 4 17 0.65536000000000000000e5 +3908 3 12 41 -0.65536000000000000000e5 +3908 3 13 42 -0.65536000000000000000e5 +3908 4 2 14 0.65536000000000000000e5 +3908 4 6 24 0.65536000000000000000e5 +3909 1 4 35 -0.32768000000000000000e5 +3909 1 12 43 -0.32768000000000000000e5 +3909 1 13 44 -0.65536000000000000000e5 +3909 1 14 45 -0.65536000000000000000e5 +3909 1 17 48 0.32768000000000000000e5 +3909 1 18 49 0.32768000000000000000e5 +3909 1 20 27 0.13107200000000000000e6 +3909 1 27 34 -0.65536000000000000000e5 +3909 2 9 23 -0.32768000000000000000e5 +3909 2 10 24 -0.65536000000000000000e5 +3909 2 14 28 0.32768000000000000000e5 +3909 3 5 34 -0.32768000000000000000e5 +3909 3 7 36 -0.13107200000000000000e6 +3909 3 13 42 0.32768000000000000000e5 +3909 3 14 27 -0.32768000000000000000e5 +3909 3 14 43 0.32768000000000000000e5 +3909 3 16 29 0.65536000000000000000e5 +3909 4 6 25 0.65536000000000000000e5 +3910 4 1 29 -0.65536000000000000000e5 +3910 4 6 26 0.65536000000000000000e5 +3911 1 9 40 -0.65536000000000000000e5 +3911 1 10 41 0.13107200000000000000e6 +3911 1 11 42 -0.13107200000000000000e6 +3911 1 26 41 0.65536000000000000000e5 +3911 1 32 47 -0.13107200000000000000e6 +3911 1 33 48 0.13107200000000000000e6 +3911 2 12 26 0.13107200000000000000e6 +3911 2 20 34 -0.13107200000000000000e6 +3911 3 8 37 0.65536000000000000000e5 +3911 3 13 42 0.26214400000000000000e6 +3911 3 22 35 -0.26214400000000000000e6 +3911 3 28 41 -0.13107200000000000000e6 +3911 3 29 42 0.13107200000000000000e6 +3911 4 2 30 -0.65536000000000000000e5 +3911 4 3 31 -0.13107200000000000000e6 +3911 4 6 27 0.65536000000000000000e5 +3911 4 6 34 -0.13107200000000000000e6 +3912 4 2 30 -0.65536000000000000000e5 +3912 4 6 28 0.65536000000000000000e5 +3913 1 9 40 -0.32768000000000000000e5 +3913 1 10 41 0.13107200000000000000e6 +3913 1 11 42 0.65536000000000000000e5 +3913 1 26 41 0.32768000000000000000e5 +3913 1 32 47 -0.13107200000000000000e6 +3913 1 33 48 -0.65536000000000000000e5 +3913 2 12 26 -0.65536000000000000000e5 +3913 2 20 34 0.65536000000000000000e5 +3913 3 8 37 0.32768000000000000000e5 +3913 3 9 38 -0.32768000000000000000e5 +3913 3 12 41 -0.13107200000000000000e6 +3913 3 13 42 -0.13107200000000000000e6 +3913 3 22 27 0.32768000000000000000e5 +3913 3 22 35 0.13107200000000000000e6 +3913 3 28 41 -0.13107200000000000000e6 +3913 3 29 42 -0.65536000000000000000e5 +3913 4 1 29 0.32768000000000000000e5 +3913 4 2 30 -0.32768000000000000000e5 +3913 4 3 31 0.65536000000000000000e5 +3913 4 6 29 0.65536000000000000000e5 +3913 4 6 34 0.65536000000000000000e5 +3914 2 12 26 -0.65536000000000000000e5 +3914 2 20 34 0.65536000000000000000e5 +3914 4 6 30 0.65536000000000000000e5 +3914 4 6 34 0.65536000000000000000e5 +3915 1 13 44 -0.13107200000000000000e6 +3915 1 34 41 0.13107200000000000000e6 +3915 3 12 41 0.65536000000000000000e5 +3915 3 13 42 0.65536000000000000000e5 +3915 3 22 35 0.65536000000000000000e5 +3915 4 6 31 0.65536000000000000000e5 +3916 2 16 30 -0.65536000000000000000e5 +3916 2 16 34 0.65536000000000000000e5 +3916 4 6 32 0.65536000000000000000e5 +3917 4 6 33 0.65536000000000000000e5 +3917 4 17 29 -0.65536000000000000000e5 +3918 4 6 35 0.65536000000000000000e5 +3918 4 20 32 -0.65536000000000000000e5 +3919 2 4 10 -0.32768000000000000000e5 +3919 2 7 21 0.32768000000000000000e5 +3919 4 7 7 0.65536000000000000000e5 +3920 1 2 33 0.65536000000000000000e5 +3920 1 3 18 -0.13107200000000000000e6 +3920 1 6 13 0.65536000000000000000e5 +3920 1 10 41 0.65536000000000000000e5 +3920 2 4 10 -0.65536000000000000000e5 +3920 2 7 21 0.65536000000000000000e5 +3920 2 12 26 0.65536000000000000000e5 +3920 3 1 14 -0.65536000000000000000e5 +3920 3 3 16 0.13107200000000000000e6 +3920 3 3 32 0.65536000000000000000e5 +3920 4 7 8 0.65536000000000000000e5 +3920 4 8 20 0.65536000000000000000e5 +3921 1 2 33 0.65536000000000000000e5 +3921 1 4 35 0.13107200000000000000e6 +3921 1 11 42 -0.65536000000000000000e5 +3921 1 12 43 -0.13107200000000000000e6 +3921 2 5 11 -0.65536000000000000000e5 +3921 2 12 26 0.65536000000000000000e5 +3921 3 4 33 -0.65536000000000000000e5 +3921 3 14 27 -0.13107200000000000000e6 +3921 4 7 9 0.65536000000000000000e5 +3921 4 8 20 0.65536000000000000000e5 +3922 1 3 18 0.65536000000000000000e5 +3922 1 3 34 -0.65536000000000000000e5 +3922 1 4 19 -0.13107200000000000000e6 +3922 1 4 35 -0.65536000000000000000e5 +3922 1 12 43 -0.19660800000000000000e6 +3922 1 14 45 -0.13107200000000000000e6 +3922 1 16 23 -0.65536000000000000000e5 +3922 1 17 48 0.65536000000000000000e5 +3922 1 18 49 0.65536000000000000000e5 +3922 1 20 27 0.26214400000000000000e6 +3922 2 6 12 -0.65536000000000000000e5 +3922 2 9 23 -0.65536000000000000000e5 +3922 2 10 24 -0.13107200000000000000e6 +3922 2 14 28 0.65536000000000000000e5 +3922 3 3 16 0.65536000000000000000e5 +3922 3 4 17 0.65536000000000000000e5 +3922 3 5 34 -0.65536000000000000000e5 +3922 3 13 42 0.65536000000000000000e5 +3922 3 14 27 -0.19660800000000000000e6 +3922 3 14 43 0.65536000000000000000e5 +3922 4 2 14 0.65536000000000000000e5 +3922 4 7 10 0.65536000000000000000e5 +3923 4 2 14 -0.65536000000000000000e5 +3923 4 7 11 0.65536000000000000000e5 +3924 1 3 18 0.65536000000000000000e5 +3924 1 4 35 0.65536000000000000000e5 +3924 1 5 20 0.13107200000000000000e6 +3924 1 5 36 -0.13107200000000000000e6 +3924 1 10 17 -0.13107200000000000000e6 +3924 1 14 45 0.13107200000000000000e6 +3924 1 17 48 -0.65536000000000000000e5 +3924 1 18 49 -0.65536000000000000000e5 +3924 2 9 23 0.65536000000000000000e5 +3924 2 14 28 -0.65536000000000000000e5 +3924 3 5 18 -0.65536000000000000000e5 +3924 3 5 34 0.65536000000000000000e5 +3924 3 13 42 -0.65536000000000000000e5 +3924 3 14 43 -0.65536000000000000000e5 +3924 4 7 12 0.65536000000000000000e5 +3924 4 8 12 -0.65536000000000000000e5 +3925 1 2 17 0.32768000000000000000e5 +3925 1 3 18 0.32768000000000000000e5 +3925 1 3 34 0.32768000000000000000e5 +3925 1 4 19 0.65536000000000000000e5 +3925 1 10 17 0.65536000000000000000e5 +3925 1 20 27 -0.13107200000000000000e6 +3925 2 6 12 0.32768000000000000000e5 +3925 2 10 24 0.65536000000000000000e5 +3925 3 3 16 0.32768000000000000000e5 +3925 3 7 20 -0.13107200000000000000e6 +3925 4 7 13 0.65536000000000000000e5 +3926 4 3 15 -0.65536000000000000000e5 +3926 4 7 14 0.65536000000000000000e5 +3927 4 7 15 0.65536000000000000000e5 +3927 4 10 14 -0.65536000000000000000e5 +3928 1 2 33 0.13107200000000000000e6 +3928 1 7 38 -0.65536000000000000000e5 +3928 1 8 23 0.65536000000000000000e5 +3928 1 11 42 -0.13107200000000000000e6 +3928 1 12 43 -0.26214400000000000000e6 +3928 1 28 43 0.13107200000000000000e6 +3928 1 32 47 0.13107200000000000000e6 +3928 1 33 48 0.13107200000000000000e6 +3928 2 12 26 0.13107200000000000000e6 +3928 3 2 31 -0.13107200000000000000e6 +3928 3 10 23 -0.65536000000000000000e5 +3928 3 13 42 0.26214400000000000000e6 +3928 3 28 41 0.13107200000000000000e6 +3928 3 29 42 0.13107200000000000000e6 +3928 4 3 31 -0.13107200000000000000e6 +3928 4 6 18 -0.65536000000000000000e5 +3928 4 7 16 0.65536000000000000000e5 +3929 4 6 18 -0.65536000000000000000e5 +3929 4 7 17 0.65536000000000000000e5 +3930 1 9 40 -0.65536000000000000000e5 +3930 1 10 25 0.65536000000000000000e5 +3930 3 1 30 0.65536000000000000000e5 +3930 3 3 32 -0.13107200000000000000e6 +3930 3 10 23 0.65536000000000000000e5 +3930 4 7 18 0.65536000000000000000e5 +3931 1 2 33 0.65536000000000000000e5 +3931 1 3 34 -0.13107200000000000000e6 +3931 1 11 42 -0.65536000000000000000e5 +3931 1 12 43 -0.13107200000000000000e6 +3931 1 16 47 0.13107200000000000000e6 +3931 1 28 43 0.65536000000000000000e5 +3931 1 32 47 0.65536000000000000000e5 +3931 1 33 48 0.65536000000000000000e5 +3931 2 12 26 0.65536000000000000000e5 +3931 3 2 31 0.65536000000000000000e5 +3931 3 3 32 0.65536000000000000000e5 +3931 3 12 41 0.13107200000000000000e6 +3931 3 13 42 0.13107200000000000000e6 +3931 3 28 41 0.65536000000000000000e5 +3931 3 29 42 0.65536000000000000000e5 +3931 4 3 31 -0.65536000000000000000e5 +3931 4 7 20 0.65536000000000000000e5 +3932 4 7 21 0.65536000000000000000e5 +3932 4 8 20 -0.65536000000000000000e5 +3933 1 2 33 -0.65536000000000000000e5 +3933 1 4 35 -0.13107200000000000000e6 +3933 1 11 42 0.65536000000000000000e5 +3933 1 12 43 0.13107200000000000000e6 +3933 1 17 48 0.13107200000000000000e6 +3933 1 28 43 -0.65536000000000000000e5 +3933 1 32 47 -0.65536000000000000000e5 +3933 1 33 48 -0.65536000000000000000e5 +3933 2 12 26 -0.65536000000000000000e5 +3933 3 4 33 0.65536000000000000000e5 +3933 3 14 27 0.13107200000000000000e6 +3933 3 28 41 -0.65536000000000000000e5 +3933 3 29 42 -0.65536000000000000000e5 +3933 4 3 31 0.65536000000000000000e5 +3933 4 7 22 0.65536000000000000000e5 +3933 4 8 20 -0.65536000000000000000e5 +3934 1 3 18 0.65536000000000000000e5 +3934 1 3 34 0.65536000000000000000e5 +3934 1 4 19 -0.13107200000000000000e6 +3934 1 4 35 0.65536000000000000000e5 +3934 1 12 43 -0.65536000000000000000e5 +3934 1 13 44 0.13107200000000000000e6 +3934 1 16 47 -0.65536000000000000000e5 +3934 1 17 48 -0.65536000000000000000e5 +3934 3 3 16 0.65536000000000000000e5 +3934 3 4 17 0.65536000000000000000e5 +3934 3 12 41 -0.65536000000000000000e5 +3934 3 13 42 -0.65536000000000000000e5 +3934 4 2 14 0.65536000000000000000e5 +3934 4 7 23 0.65536000000000000000e5 +3935 1 4 35 0.65536000000000000000e5 +3935 1 17 48 -0.65536000000000000000e5 +3935 3 5 34 0.65536000000000000000e5 +3935 3 13 42 -0.65536000000000000000e5 +3935 3 14 27 0.65536000000000000000e5 +3935 3 16 29 -0.13107200000000000000e6 +3935 4 7 24 0.65536000000000000000e5 +3936 4 7 25 0.65536000000000000000e5 +3936 4 11 23 -0.65536000000000000000e5 +3937 1 9 40 -0.65536000000000000000e5 +3937 1 10 41 0.13107200000000000000e6 +3937 1 11 42 -0.13107200000000000000e6 +3937 1 26 41 0.65536000000000000000e5 +3937 1 32 47 -0.13107200000000000000e6 +3937 1 33 48 0.13107200000000000000e6 +3937 2 12 26 0.13107200000000000000e6 +3937 2 20 34 -0.13107200000000000000e6 +3937 3 8 37 0.65536000000000000000e5 +3937 3 13 42 0.26214400000000000000e6 +3937 3 22 35 -0.26214400000000000000e6 +3937 3 28 41 -0.13107200000000000000e6 +3937 3 29 42 0.13107200000000000000e6 +3937 4 2 30 -0.65536000000000000000e5 +3937 4 3 31 -0.13107200000000000000e6 +3937 4 6 34 -0.13107200000000000000e6 +3937 4 7 26 0.65536000000000000000e5 +3938 4 2 30 -0.65536000000000000000e5 +3938 4 7 27 0.65536000000000000000e5 +3939 1 9 40 0.65536000000000000000e5 +3939 1 10 41 0.13107200000000000000e6 +3939 1 11 42 0.13107200000000000000e6 +3939 1 26 41 -0.65536000000000000000e5 +3939 1 32 47 -0.13107200000000000000e6 +3939 1 33 48 -0.13107200000000000000e6 +3939 3 9 38 0.65536000000000000000e5 +3939 3 10 39 0.65536000000000000000e5 +3939 3 13 42 -0.26214400000000000000e6 +3939 3 28 41 -0.13107200000000000000e6 +3939 3 29 42 -0.13107200000000000000e6 +3939 4 3 31 0.13107200000000000000e6 +3939 4 7 28 0.65536000000000000000e5 +3940 2 12 26 -0.65536000000000000000e5 +3940 2 20 34 0.65536000000000000000e5 +3940 4 6 34 0.65536000000000000000e5 +3940 4 7 29 0.65536000000000000000e5 +3941 4 3 31 -0.65536000000000000000e5 +3941 4 7 30 0.65536000000000000000e5 +3942 4 7 31 0.65536000000000000000e5 +3942 4 14 26 -0.65536000000000000000e5 +3943 4 7 32 0.65536000000000000000e5 +3943 4 17 29 -0.65536000000000000000e5 +3944 2 4 34 -0.65536000000000000000e5 +3944 2 21 35 0.65536000000000000000e5 +3944 4 7 33 0.65536000000000000000e5 +3944 4 7 35 0.65536000000000000000e5 +3945 4 7 34 0.65536000000000000000e5 +3945 4 23 27 -0.65536000000000000000e5 +3946 1 2 33 0.32768000000000000000e5 +3946 1 4 35 0.65536000000000000000e5 +3946 1 11 42 -0.32768000000000000000e5 +3946 1 12 43 -0.65536000000000000000e5 +3946 2 5 11 -0.32768000000000000000e5 +3946 2 12 26 0.32768000000000000000e5 +3946 3 4 33 -0.32768000000000000000e5 +3946 3 14 27 -0.65536000000000000000e5 +3946 4 8 8 0.65536000000000000000e5 +3946 4 8 20 0.32768000000000000000e5 +3947 1 2 33 0.65536000000000000000e5 +3947 1 4 35 0.13107200000000000000e6 +3947 1 5 20 -0.26214400000000000000e6 +3947 1 5 36 0.26214400000000000000e6 +3947 1 11 42 -0.65536000000000000000e5 +3947 1 12 43 -0.13107200000000000000e6 +3947 2 5 11 -0.65536000000000000000e5 +3947 2 12 26 0.65536000000000000000e5 +3947 3 2 15 -0.65536000000000000000e5 +3947 3 4 17 0.26214400000000000000e6 +3947 3 4 33 -0.65536000000000000000e5 +3947 3 5 18 0.13107200000000000000e6 +3947 3 10 11 0.65536000000000000000e5 +3947 3 14 27 -0.13107200000000000000e6 +3947 4 8 9 0.65536000000000000000e5 +3947 4 8 12 0.13107200000000000000e6 +3947 4 8 20 0.65536000000000000000e5 +3948 4 2 14 -0.65536000000000000000e5 +3948 4 8 10 0.65536000000000000000e5 +3949 1 3 18 0.65536000000000000000e5 +3949 1 4 35 0.65536000000000000000e5 +3949 1 5 20 0.13107200000000000000e6 +3949 1 5 36 -0.13107200000000000000e6 +3949 1 10 17 -0.13107200000000000000e6 +3949 1 14 45 0.13107200000000000000e6 +3949 1 17 48 -0.65536000000000000000e5 +3949 1 18 49 -0.65536000000000000000e5 +3949 2 9 23 0.65536000000000000000e5 +3949 2 14 28 -0.65536000000000000000e5 +3949 3 5 18 -0.65536000000000000000e5 +3949 3 5 34 0.65536000000000000000e5 +3949 3 13 42 -0.65536000000000000000e5 +3949 3 14 43 -0.65536000000000000000e5 +3949 4 8 11 0.65536000000000000000e5 +3949 4 8 12 -0.65536000000000000000e5 +3950 4 3 15 -0.65536000000000000000e5 +3950 4 8 13 0.65536000000000000000e5 +3951 1 3 18 0.32768000000000000000e5 +3951 1 4 35 -0.65536000000000000000e5 +3951 1 5 20 0.13107200000000000000e6 +3951 1 5 36 -0.13107200000000000000e6 +3951 1 10 17 0.13107200000000000000e6 +3951 1 12 43 -0.98304000000000000000e5 +3951 1 14 45 -0.13107200000000000000e6 +3951 1 17 48 0.65536000000000000000e5 +3951 1 18 49 0.65536000000000000000e5 +3951 2 9 23 -0.65536000000000000000e5 +3951 2 14 28 0.65536000000000000000e5 +3951 3 3 16 0.32768000000000000000e5 +3951 3 4 17 0.32768000000000000000e5 +3951 3 5 34 -0.65536000000000000000e5 +3951 3 6 19 0.65536000000000000000e5 +3951 3 7 20 0.13107200000000000000e6 +3951 3 8 21 -0.26214400000000000000e6 +3951 3 13 42 0.65536000000000000000e5 +3951 3 14 27 -0.98304000000000000000e5 +3951 3 14 43 0.65536000000000000000e5 +3951 4 2 14 0.32768000000000000000e5 +3951 4 3 15 0.65536000000000000000e5 +3951 4 8 14 0.65536000000000000000e5 +3951 4 10 14 0.13107200000000000000e6 +3952 1 6 21 0.65536000000000000000e5 +3952 1 18 33 -0.65536000000000000000e5 +3952 3 7 20 -0.65536000000000000000e5 +3952 3 8 21 0.13107200000000000000e6 +3952 3 14 19 -0.13107200000000000000e6 +3952 4 8 15 0.65536000000000000000e5 +3952 4 10 14 -0.65536000000000000000e5 +3953 4 6 18 -0.65536000000000000000e5 +3953 4 8 16 0.65536000000000000000e5 +3954 1 9 40 -0.65536000000000000000e5 +3954 1 10 25 0.65536000000000000000e5 +3954 3 1 30 0.65536000000000000000e5 +3954 3 3 32 -0.13107200000000000000e6 +3954 3 10 23 0.65536000000000000000e5 +3954 4 8 17 0.65536000000000000000e5 +3955 4 7 19 -0.65536000000000000000e5 +3955 4 8 18 0.65536000000000000000e5 +3956 1 1 48 0.32768000000000000000e5 +3956 1 2 33 -0.13107200000000000000e6 +3956 1 2 49 0.32768000000000000000e5 +3956 1 8 39 0.65536000000000000000e5 +3956 1 9 40 0.13107200000000000000e6 +3956 1 10 41 -0.13107200000000000000e6 +3956 1 11 26 0.65536000000000000000e5 +3956 1 23 38 0.32768000000000000000e5 +3956 1 26 41 -0.13107200000000000000e6 +3956 1 28 43 0.13107200000000000000e6 +3956 1 32 47 0.13107200000000000000e6 +3956 1 33 48 -0.13107200000000000000e6 +3956 2 2 32 0.32768000000000000000e5 +3956 2 4 34 -0.65536000000000000000e5 +3956 2 12 26 -0.13107200000000000000e6 +3956 2 16 30 0.65536000000000000000e5 +3956 2 20 34 0.13107200000000000000e6 +3956 2 28 34 0.65536000000000000000e5 +3956 3 3 32 -0.13107200000000000000e6 +3956 3 4 33 -0.13107200000000000000e6 +3956 3 9 38 0.65536000000000000000e5 +3956 3 10 23 -0.65536000000000000000e5 +3956 3 10 39 0.65536000000000000000e5 +3956 3 13 42 -0.26214400000000000000e6 +3956 3 14 27 0.26214400000000000000e6 +3956 3 22 35 0.26214400000000000000e6 +3956 3 28 41 0.13107200000000000000e6 +3956 3 29 42 -0.13107200000000000000e6 +3956 4 2 30 0.65536000000000000000e5 +3956 4 3 31 0.13107200000000000000e6 +3956 4 6 34 0.13107200000000000000e6 +3956 4 7 19 -0.65536000000000000000e5 +3956 4 8 19 0.65536000000000000000e5 +3956 4 8 20 -0.13107200000000000000e6 +3956 4 18 22 0.65536000000000000000e5 +3956 4 18 30 0.65536000000000000000e5 +3956 4 21 33 0.65536000000000000000e5 +3957 1 2 33 -0.65536000000000000000e5 +3957 1 4 35 -0.13107200000000000000e6 +3957 1 11 42 0.65536000000000000000e5 +3957 1 12 43 0.13107200000000000000e6 +3957 1 17 48 0.13107200000000000000e6 +3957 1 28 43 -0.65536000000000000000e5 +3957 1 32 47 -0.65536000000000000000e5 +3957 1 33 48 -0.65536000000000000000e5 +3957 2 12 26 -0.65536000000000000000e5 +3957 3 4 33 0.65536000000000000000e5 +3957 3 14 27 0.13107200000000000000e6 +3957 3 28 41 -0.65536000000000000000e5 +3957 3 29 42 -0.65536000000000000000e5 +3957 4 3 31 0.65536000000000000000e5 +3957 4 8 20 -0.65536000000000000000e5 +3957 4 8 21 0.65536000000000000000e5 +3958 4 8 22 0.65536000000000000000e5 +3958 4 9 21 -0.65536000000000000000e5 +3959 1 4 35 0.65536000000000000000e5 +3959 1 17 48 -0.65536000000000000000e5 +3959 3 5 34 0.65536000000000000000e5 +3959 3 13 42 -0.65536000000000000000e5 +3959 3 14 27 0.65536000000000000000e5 +3959 3 16 29 -0.13107200000000000000e6 +3959 4 8 23 0.65536000000000000000e5 +3960 1 4 35 0.65536000000000000000e5 +3960 1 5 36 -0.13107200000000000000e6 +3960 1 14 45 0.13107200000000000000e6 +3960 1 15 30 0.65536000000000000000e5 +3960 1 17 48 -0.65536000000000000000e5 +3960 1 18 49 -0.65536000000000000000e5 +3960 3 5 34 0.65536000000000000000e5 +3960 3 13 42 -0.65536000000000000000e5 +3960 3 14 43 -0.65536000000000000000e5 +3960 4 8 24 0.65536000000000000000e5 +3961 1 5 36 0.65536000000000000000e5 +3961 1 14 45 -0.65536000000000000000e5 +3961 3 16 29 0.65536000000000000000e5 +3961 3 17 30 0.65536000000000000000e5 +3961 3 18 31 -0.13107200000000000000e6 +3961 4 8 25 0.65536000000000000000e5 +3962 4 2 30 -0.65536000000000000000e5 +3962 4 8 26 0.65536000000000000000e5 +3963 1 9 40 0.65536000000000000000e5 +3963 1 10 41 0.13107200000000000000e6 +3963 1 11 42 0.13107200000000000000e6 +3963 1 26 41 -0.65536000000000000000e5 +3963 1 32 47 -0.13107200000000000000e6 +3963 1 33 48 -0.13107200000000000000e6 +3963 3 9 38 0.65536000000000000000e5 +3963 3 10 39 0.65536000000000000000e5 +3963 3 13 42 -0.26214400000000000000e6 +3963 3 28 41 -0.13107200000000000000e6 +3963 3 29 42 -0.13107200000000000000e6 +3963 4 3 31 0.13107200000000000000e6 +3963 4 8 27 0.65536000000000000000e5 +3964 4 8 28 0.65536000000000000000e5 +3964 4 18 22 -0.65536000000000000000e5 +3965 4 3 31 -0.65536000000000000000e5 +3965 4 8 29 0.65536000000000000000e5 +3966 1 10 41 -0.65536000000000000000e5 +3966 1 14 45 -0.26214400000000000000e6 +3966 1 17 48 0.13107200000000000000e6 +3966 1 18 49 0.13107200000000000000e6 +3966 1 26 33 0.65536000000000000000e5 +3966 1 32 47 0.65536000000000000000e5 +3966 1 33 40 -0.65536000000000000000e5 +3966 1 34 49 0.13107200000000000000e6 +3966 2 14 28 0.13107200000000000000e6 +3966 3 13 42 0.26214400000000000000e6 +3966 3 14 43 0.13107200000000000000e6 +3966 3 18 47 0.13107200000000000000e6 +3966 3 28 41 0.65536000000000000000e5 +3966 4 3 31 -0.65536000000000000000e5 +3966 4 8 30 0.65536000000000000000e5 +3967 1 14 45 0.26214400000000000000e6 +3967 1 17 48 -0.13107200000000000000e6 +3967 1 18 49 -0.13107200000000000000e6 +3967 1 34 49 -0.13107200000000000000e6 +3967 2 14 28 -0.13107200000000000000e6 +3967 3 14 43 -0.65536000000000000000e5 +3967 3 15 44 0.13107200000000000000e6 +3967 3 16 45 -0.26214400000000000000e6 +3967 3 18 47 -0.13107200000000000000e6 +3967 3 22 35 0.65536000000000000000e5 +3967 4 8 31 0.65536000000000000000e5 +3967 4 14 26 0.65536000000000000000e5 +3967 4 15 27 0.13107200000000000000e6 +3968 2 4 34 -0.65536000000000000000e5 +3968 2 21 35 0.65536000000000000000e5 +3968 4 7 35 0.65536000000000000000e5 +3968 4 8 32 0.65536000000000000000e5 +3969 4 8 33 0.65536000000000000000e5 +3969 4 18 30 -0.65536000000000000000e5 +3970 1 6 53 0.16384000000000000000e5 +3970 1 25 40 -0.16384000000000000000e5 +3970 2 4 34 0.32768000000000000000e5 +3970 2 21 35 -0.32768000000000000000e5 +3970 3 5 50 0.32768000000000000000e5 +3970 3 14 51 0.13107200000000000000e6 +3970 3 18 47 -0.13107200000000000000e6 +3970 3 24 37 0.16384000000000000000e5 +3970 3 27 40 0.65536000000000000000e5 +3970 3 30 43 -0.65536000000000000000e5 +3970 4 4 32 -0.16384000000000000000e5 +3970 4 7 35 -0.32768000000000000000e5 +3970 4 8 34 0.65536000000000000000e5 +3970 4 16 28 0.16384000000000000000e5 +3970 4 19 31 -0.65536000000000000000e5 +3971 4 8 35 0.65536000000000000000e5 +3971 4 21 33 -0.65536000000000000000e5 +3972 1 3 18 0.65536000000000000000e5 +3972 1 4 35 0.65536000000000000000e5 +3972 1 5 20 0.13107200000000000000e6 +3972 1 5 36 -0.13107200000000000000e6 +3972 1 10 17 -0.13107200000000000000e6 +3972 1 14 45 0.13107200000000000000e6 +3972 1 17 48 -0.65536000000000000000e5 +3972 1 18 49 -0.65536000000000000000e5 +3972 2 9 23 0.65536000000000000000e5 +3972 2 14 28 -0.65536000000000000000e5 +3972 3 5 18 -0.65536000000000000000e5 +3972 3 5 34 0.65536000000000000000e5 +3972 3 13 42 -0.65536000000000000000e5 +3972 3 14 43 -0.65536000000000000000e5 +3972 4 8 12 -0.65536000000000000000e5 +3972 4 9 10 0.65536000000000000000e5 +3973 4 8 12 -0.65536000000000000000e5 +3973 4 9 11 0.65536000000000000000e5 +3974 4 5 14 -0.65536000000000000000e5 +3974 4 9 12 0.65536000000000000000e5 +3975 1 3 18 0.32768000000000000000e5 +3975 1 4 35 -0.65536000000000000000e5 +3975 1 5 20 0.13107200000000000000e6 +3975 1 5 36 -0.13107200000000000000e6 +3975 1 10 17 0.13107200000000000000e6 +3975 1 12 43 -0.98304000000000000000e5 +3975 1 14 45 -0.13107200000000000000e6 +3975 1 17 48 0.65536000000000000000e5 +3975 1 18 49 0.65536000000000000000e5 +3975 2 9 23 -0.65536000000000000000e5 +3975 2 14 28 0.65536000000000000000e5 +3975 3 3 16 0.32768000000000000000e5 +3975 3 4 17 0.32768000000000000000e5 +3975 3 5 34 -0.65536000000000000000e5 +3975 3 6 19 0.65536000000000000000e5 +3975 3 7 20 0.13107200000000000000e6 +3975 3 8 21 -0.26214400000000000000e6 +3975 3 13 42 0.65536000000000000000e5 +3975 3 14 27 -0.98304000000000000000e5 +3975 3 14 43 0.65536000000000000000e5 +3975 4 2 14 0.32768000000000000000e5 +3975 4 3 15 0.65536000000000000000e5 +3975 4 9 13 0.65536000000000000000e5 +3975 4 10 14 0.13107200000000000000e6 +3976 4 9 14 0.65536000000000000000e5 +3976 4 12 12 -0.13107200000000000000e6 +3977 1 3 18 -0.16384000000000000000e5 +3977 1 4 35 0.16384000000000000000e5 +3977 1 5 20 -0.32768000000000000000e5 +3977 1 5 36 0.32768000000000000000e5 +3977 1 6 21 0.65536000000000000000e5 +3977 1 10 17 -0.32768000000000000000e5 +3977 1 12 43 0.32768000000000000000e5 +3977 1 14 45 0.32768000000000000000e5 +3977 1 17 48 -0.16384000000000000000e5 +3977 1 18 33 -0.65536000000000000000e5 +3977 1 18 49 -0.16384000000000000000e5 +3977 2 9 23 0.16384000000000000000e5 +3977 2 14 28 -0.16384000000000000000e5 +3977 3 3 16 -0.16384000000000000000e5 +3977 3 4 17 -0.16384000000000000000e5 +3977 3 5 34 0.16384000000000000000e5 +3977 3 7 20 -0.65536000000000000000e5 +3977 3 8 21 0.13107200000000000000e6 +3977 3 11 20 0.65536000000000000000e5 +3977 3 13 42 -0.16384000000000000000e5 +3977 3 14 19 0.13107200000000000000e6 +3977 3 14 27 0.32768000000000000000e5 +3977 3 14 43 -0.16384000000000000000e5 +3977 3 15 20 0.13107200000000000000e6 +3977 3 18 19 -0.26214400000000000000e6 +3977 4 2 14 -0.16384000000000000000e5 +3977 4 3 15 -0.32768000000000000000e5 +3977 4 9 15 0.65536000000000000000e5 +3977 4 10 14 -0.65536000000000000000e5 +3977 4 14 14 0.26214400000000000000e6 +3978 1 9 40 -0.65536000000000000000e5 +3978 1 10 25 0.65536000000000000000e5 +3978 3 1 30 0.65536000000000000000e5 +3978 3 3 32 -0.13107200000000000000e6 +3978 3 10 23 0.65536000000000000000e5 +3978 4 9 16 0.65536000000000000000e5 +3979 4 7 19 -0.65536000000000000000e5 +3979 4 9 17 0.65536000000000000000e5 +3980 1 1 48 0.32768000000000000000e5 +3980 1 2 33 -0.13107200000000000000e6 +3980 1 2 49 0.32768000000000000000e5 +3980 1 8 39 0.65536000000000000000e5 +3980 1 9 40 0.13107200000000000000e6 +3980 1 10 41 -0.13107200000000000000e6 +3980 1 11 26 0.65536000000000000000e5 +3980 1 23 38 0.32768000000000000000e5 +3980 1 26 41 -0.13107200000000000000e6 +3980 1 28 43 0.13107200000000000000e6 +3980 1 32 47 0.13107200000000000000e6 +3980 1 33 48 -0.13107200000000000000e6 +3980 2 2 32 0.32768000000000000000e5 +3980 2 4 34 -0.65536000000000000000e5 +3980 2 12 26 -0.13107200000000000000e6 +3980 2 16 30 0.65536000000000000000e5 +3980 2 20 34 0.13107200000000000000e6 +3980 2 28 34 0.65536000000000000000e5 +3980 3 3 32 -0.13107200000000000000e6 +3980 3 4 33 -0.13107200000000000000e6 +3980 3 9 38 0.65536000000000000000e5 +3980 3 10 23 -0.65536000000000000000e5 +3980 3 10 39 0.65536000000000000000e5 +3980 3 13 42 -0.26214400000000000000e6 +3980 3 14 27 0.26214400000000000000e6 +3980 3 22 35 0.26214400000000000000e6 +3980 3 28 41 0.13107200000000000000e6 +3980 3 29 42 -0.13107200000000000000e6 +3980 4 2 30 0.65536000000000000000e5 +3980 4 3 31 0.13107200000000000000e6 +3980 4 6 34 0.13107200000000000000e6 +3980 4 7 19 -0.65536000000000000000e5 +3980 4 8 20 -0.13107200000000000000e6 +3980 4 9 18 0.65536000000000000000e5 +3980 4 18 22 0.65536000000000000000e5 +3980 4 18 30 0.65536000000000000000e5 +3980 4 21 33 0.65536000000000000000e5 +3981 1 1 48 0.32768000000000000000e5 +3981 1 2 33 -0.26214400000000000000e6 +3981 1 2 49 0.32768000000000000000e5 +3981 1 8 39 0.65536000000000000000e5 +3981 1 9 40 0.19660800000000000000e6 +3981 1 10 25 -0.65536000000000000000e5 +3981 1 10 41 -0.13107200000000000000e6 +3981 1 11 26 0.65536000000000000000e5 +3981 1 11 42 0.13107200000000000000e6 +3981 1 12 43 0.26214400000000000000e6 +3981 1 23 38 0.32768000000000000000e5 +3981 1 26 41 -0.13107200000000000000e6 +3981 1 33 48 -0.26214400000000000000e6 +3981 2 2 32 0.32768000000000000000e5 +3981 2 4 34 -0.65536000000000000000e5 +3981 2 12 26 -0.26214400000000000000e6 +3981 2 16 30 0.65536000000000000000e5 +3981 2 20 34 0.13107200000000000000e6 +3981 2 28 34 0.65536000000000000000e5 +3981 3 3 32 -0.26214400000000000000e6 +3981 3 4 33 0.13107200000000000000e6 +3981 3 5 34 -0.26214400000000000000e6 +3981 3 9 38 0.65536000000000000000e5 +3981 3 10 23 -0.65536000000000000000e5 +3981 3 10 39 0.65536000000000000000e5 +3981 3 11 26 0.65536000000000000000e5 +3981 3 13 42 -0.52428800000000000000e6 +3981 3 14 27 0.52428800000000000000e6 +3981 3 22 35 0.26214400000000000000e6 +3981 3 29 42 -0.26214400000000000000e6 +3981 4 2 30 0.65536000000000000000e5 +3981 4 3 31 0.26214400000000000000e6 +3981 4 6 34 0.13107200000000000000e6 +3981 4 7 19 -0.65536000000000000000e5 +3981 4 8 20 -0.26214400000000000000e6 +3981 4 9 19 0.65536000000000000000e5 +3981 4 9 21 0.13107200000000000000e6 +3981 4 18 22 0.65536000000000000000e5 +3981 4 18 30 0.65536000000000000000e5 +3981 4 21 33 0.65536000000000000000e5 +3982 1 2 33 -0.65536000000000000000e5 +3982 1 4 35 -0.13107200000000000000e6 +3982 1 11 42 0.65536000000000000000e5 +3982 1 12 43 0.13107200000000000000e6 +3982 1 17 48 0.13107200000000000000e6 +3982 1 28 43 -0.65536000000000000000e5 +3982 1 32 47 -0.65536000000000000000e5 +3982 1 33 48 -0.65536000000000000000e5 +3982 2 12 26 -0.65536000000000000000e5 +3982 3 4 33 0.65536000000000000000e5 +3982 3 14 27 0.13107200000000000000e6 +3982 3 28 41 -0.65536000000000000000e5 +3982 3 29 42 -0.65536000000000000000e5 +3982 4 3 31 0.65536000000000000000e5 +3982 4 8 20 -0.65536000000000000000e5 +3982 4 9 20 0.65536000000000000000e5 +3983 1 2 33 0.65536000000000000000e5 +3983 1 11 42 -0.65536000000000000000e5 +3983 1 12 43 -0.13107200000000000000e6 +3983 1 15 30 -0.13107200000000000000e6 +3983 1 18 49 0.13107200000000000000e6 +3983 1 28 43 0.65536000000000000000e5 +3983 1 32 47 0.65536000000000000000e5 +3983 1 33 48 0.65536000000000000000e5 +3983 2 12 26 0.65536000000000000000e5 +3983 3 3 32 0.65536000000000000000e5 +3983 3 5 34 0.13107200000000000000e6 +3983 3 11 30 0.65536000000000000000e5 +3983 3 13 42 0.13107200000000000000e6 +3983 3 14 27 -0.13107200000000000000e6 +3983 3 14 43 0.13107200000000000000e6 +3983 3 28 41 0.65536000000000000000e5 +3983 3 29 42 0.65536000000000000000e5 +3983 4 3 31 -0.65536000000000000000e5 +3983 4 8 20 0.65536000000000000000e5 +3983 4 9 21 -0.65536000000000000000e5 +3983 4 9 22 0.65536000000000000000e5 +3984 1 4 35 0.65536000000000000000e5 +3984 1 5 36 -0.13107200000000000000e6 +3984 1 14 45 0.13107200000000000000e6 +3984 1 15 30 0.65536000000000000000e5 +3984 1 17 48 -0.65536000000000000000e5 +3984 1 18 49 -0.65536000000000000000e5 +3984 3 5 34 0.65536000000000000000e5 +3984 3 13 42 -0.65536000000000000000e5 +3984 3 14 43 -0.65536000000000000000e5 +3984 4 9 23 0.65536000000000000000e5 +3985 1 15 30 0.65536000000000000000e5 +3985 1 18 49 -0.65536000000000000000e5 +3985 3 5 34 0.65536000000000000000e5 +3985 3 6 35 0.65536000000000000000e5 +3985 3 14 43 -0.65536000000000000000e5 +3985 3 17 30 -0.13107200000000000000e6 +3985 4 9 24 0.65536000000000000000e5 +3986 4 9 25 0.65536000000000000000e5 +3986 4 12 24 -0.65536000000000000000e5 +3987 1 9 40 0.65536000000000000000e5 +3987 1 10 41 0.13107200000000000000e6 +3987 1 11 42 0.13107200000000000000e6 +3987 1 26 41 -0.65536000000000000000e5 +3987 1 32 47 -0.13107200000000000000e6 +3987 1 33 48 -0.13107200000000000000e6 +3987 3 9 38 0.65536000000000000000e5 +3987 3 10 39 0.65536000000000000000e5 +3987 3 13 42 -0.26214400000000000000e6 +3987 3 28 41 -0.13107200000000000000e6 +3987 3 29 42 -0.13107200000000000000e6 +3987 4 3 31 0.13107200000000000000e6 +3987 4 9 26 0.65536000000000000000e5 +3988 4 9 27 0.65536000000000000000e5 +3988 4 18 22 -0.65536000000000000000e5 +3989 1 9 40 -0.65536000000000000000e5 +3989 1 11 42 0.13107200000000000000e6 +3989 1 26 33 -0.13107200000000000000e6 +3989 1 26 41 0.65536000000000000000e5 +3989 1 33 40 0.13107200000000000000e6 +3989 1 33 48 -0.13107200000000000000e6 +3989 3 11 40 0.65536000000000000000e5 +3989 3 29 42 -0.13107200000000000000e6 +3989 4 9 28 0.65536000000000000000e5 +3989 4 18 22 -0.65536000000000000000e5 +3990 1 10 41 -0.65536000000000000000e5 +3990 1 14 45 -0.26214400000000000000e6 +3990 1 17 48 0.13107200000000000000e6 +3990 1 18 49 0.13107200000000000000e6 +3990 1 26 33 0.65536000000000000000e5 +3990 1 32 47 0.65536000000000000000e5 +3990 1 33 40 -0.65536000000000000000e5 +3990 1 34 49 0.13107200000000000000e6 +3990 2 14 28 0.13107200000000000000e6 +3990 3 13 42 0.26214400000000000000e6 +3990 3 14 43 0.13107200000000000000e6 +3990 3 18 47 0.13107200000000000000e6 +3990 3 28 41 0.65536000000000000000e5 +3990 4 3 31 -0.65536000000000000000e5 +3990 4 9 29 0.65536000000000000000e5 +3991 4 9 30 0.65536000000000000000e5 +3991 4 22 22 -0.13107200000000000000e6 +3992 1 14 45 0.13107200000000000000e6 +3992 1 17 48 -0.65536000000000000000e5 +3992 1 18 49 -0.65536000000000000000e5 +3992 1 34 49 -0.65536000000000000000e5 +3992 2 14 28 -0.65536000000000000000e5 +3992 3 13 42 -0.65536000000000000000e5 +3992 3 15 44 -0.13107200000000000000e6 +3992 3 18 47 -0.65536000000000000000e5 +3992 3 26 35 0.65536000000000000000e5 +3992 4 9 31 0.65536000000000000000e5 +3993 4 9 32 0.65536000000000000000e5 +3993 4 18 30 -0.65536000000000000000e5 +3994 3 6 51 0.65536000000000000000e5 +3994 3 14 51 -0.26214400000000000000e6 +3994 3 27 40 -0.65536000000000000000e5 +3994 3 29 42 0.26214400000000000000e6 +3994 3 30 43 0.13107200000000000000e6 +3994 4 9 33 0.65536000000000000000e5 +3994 4 18 30 -0.65536000000000000000e5 +3994 4 19 31 0.13107200000000000000e6 +3995 4 9 34 0.65536000000000000000e5 +3995 4 19 31 -0.65536000000000000000e5 +3996 1 24 55 0.65536000000000000000e5 +3996 1 26 41 -0.65536000000000000000e5 +3996 3 6 55 0.65536000000000000000e5 +3996 3 10 55 -0.26214400000000000000e6 +3996 3 27 40 0.65536000000000000000e5 +3996 3 35 48 0.26214400000000000000e6 +3996 3 40 45 -0.13107200000000000000e6 +3996 4 9 35 0.65536000000000000000e5 +3996 4 21 33 -0.65536000000000000000e5 +3996 4 22 34 -0.13107200000000000000e6 +3997 1 2 17 0.32768000000000000000e5 +3997 1 3 18 0.32768000000000000000e5 +3997 1 3 34 0.32768000000000000000e5 +3997 1 4 19 0.65536000000000000000e5 +3997 1 10 17 0.65536000000000000000e5 +3997 1 20 27 -0.13107200000000000000e6 +3997 2 6 12 0.32768000000000000000e5 +3997 2 10 24 0.65536000000000000000e5 +3997 3 3 16 0.32768000000000000000e5 +3997 3 7 20 -0.13107200000000000000e6 +3997 4 10 11 0.65536000000000000000e5 +3998 4 3 15 -0.65536000000000000000e5 +3998 4 10 12 0.65536000000000000000e5 +3999 1 2 17 0.32768000000000000000e5 +3999 1 3 18 0.32768000000000000000e5 +3999 1 3 34 0.16384000000000000000e5 +3999 1 4 19 0.32768000000000000000e5 +3999 1 5 20 0.32768000000000000000e5 +3999 1 5 36 -0.32768000000000000000e5 +3999 1 10 17 0.32768000000000000000e5 +3999 1 12 43 -0.16384000000000000000e5 +3999 1 16 23 -0.16384000000000000000e5 +3999 1 20 27 -0.65536000000000000000e5 +3999 2 6 12 0.16384000000000000000e5 +3999 2 10 24 0.32768000000000000000e5 +3999 3 3 16 0.49152000000000000000e5 +3999 3 4 17 0.16384000000000000000e5 +3999 3 7 12 0.16384000000000000000e5 +3999 3 7 20 0.65536000000000000000e5 +3999 3 8 21 0.13107200000000000000e6 +3999 3 12 21 -0.26214400000000000000e6 +3999 3 14 19 0.13107200000000000000e6 +3999 3 14 27 -0.16384000000000000000e5 +3999 4 1 13 0.16384000000000000000e5 +3999 4 2 14 0.16384000000000000000e5 +3999 4 3 15 0.32768000000000000000e5 +3999 4 10 10 0.65536000000000000000e5 +3999 4 10 13 0.65536000000000000000e5 +3999 4 13 13 0.26214400000000000000e6 +4000 4 10 15 0.65536000000000000000e5 +4000 4 13 13 -0.13107200000000000000e6 +4001 1 1 32 0.65536000000000000000e5 +4001 1 3 34 0.13107200000000000000e6 +4001 1 10 41 -0.65536000000000000000e5 +4001 1 16 23 -0.13107200000000000000e6 +4001 2 1 31 0.65536000000000000000e5 +4001 2 7 21 -0.65536000000000000000e5 +4001 3 3 32 -0.65536000000000000000e5 +4001 4 10 16 0.65536000000000000000e5 +4002 1 2 33 0.65536000000000000000e5 +4002 1 3 34 -0.13107200000000000000e6 +4002 1 11 42 -0.65536000000000000000e5 +4002 1 12 43 -0.13107200000000000000e6 +4002 1 16 47 0.13107200000000000000e6 +4002 1 28 43 0.65536000000000000000e5 +4002 1 32 47 0.65536000000000000000e5 +4002 1 33 48 0.65536000000000000000e5 +4002 2 12 26 0.65536000000000000000e5 +4002 3 2 31 0.65536000000000000000e5 +4002 3 3 32 0.65536000000000000000e5 +4002 3 12 41 0.13107200000000000000e6 +4002 3 13 42 0.13107200000000000000e6 +4002 3 28 41 0.65536000000000000000e5 +4002 3 29 42 0.65536000000000000000e5 +4002 4 3 31 -0.65536000000000000000e5 +4002 4 10 17 0.65536000000000000000e5 +4003 4 8 20 -0.65536000000000000000e5 +4003 4 10 18 0.65536000000000000000e5 +4004 1 2 33 -0.65536000000000000000e5 +4004 1 4 35 -0.13107200000000000000e6 +4004 1 11 42 0.65536000000000000000e5 +4004 1 12 43 0.13107200000000000000e6 +4004 1 17 48 0.13107200000000000000e6 +4004 1 28 43 -0.65536000000000000000e5 +4004 1 32 47 -0.65536000000000000000e5 +4004 1 33 48 -0.65536000000000000000e5 +4004 2 12 26 -0.65536000000000000000e5 +4004 3 4 33 0.65536000000000000000e5 +4004 3 14 27 0.13107200000000000000e6 +4004 3 28 41 -0.65536000000000000000e5 +4004 3 29 42 -0.65536000000000000000e5 +4004 4 3 31 0.65536000000000000000e5 +4004 4 8 20 -0.65536000000000000000e5 +4004 4 10 19 0.65536000000000000000e5 +4005 1 3 18 -0.65536000000000000000e5 +4005 1 3 34 0.65536000000000000000e5 +4005 1 4 19 0.13107200000000000000e6 +4005 1 4 35 0.65536000000000000000e5 +4005 1 12 43 0.13107200000000000000e6 +4005 1 14 45 0.13107200000000000000e6 +4005 1 16 47 -0.65536000000000000000e5 +4005 1 17 48 -0.65536000000000000000e5 +4005 1 18 49 -0.65536000000000000000e5 +4005 1 20 27 -0.26214400000000000000e6 +4005 1 27 34 0.13107200000000000000e6 +4005 2 9 23 0.65536000000000000000e5 +4005 2 10 24 0.13107200000000000000e6 +4005 2 14 28 -0.65536000000000000000e5 +4005 3 1 34 0.65536000000000000000e5 +4005 3 3 16 -0.65536000000000000000e5 +4005 3 4 17 -0.65536000000000000000e5 +4005 3 5 34 0.65536000000000000000e5 +4005 3 12 41 -0.65536000000000000000e5 +4005 3 13 42 -0.65536000000000000000e5 +4005 3 14 27 0.19660800000000000000e6 +4005 3 14 43 -0.65536000000000000000e5 +4005 4 2 14 -0.65536000000000000000e5 +4005 4 10 20 0.65536000000000000000e5 +4006 1 3 18 0.65536000000000000000e5 +4006 1 3 34 0.65536000000000000000e5 +4006 1 4 19 -0.13107200000000000000e6 +4006 1 4 35 0.65536000000000000000e5 +4006 1 12 43 -0.65536000000000000000e5 +4006 1 13 44 0.13107200000000000000e6 +4006 1 16 47 -0.65536000000000000000e5 +4006 1 17 48 -0.65536000000000000000e5 +4006 3 3 16 0.65536000000000000000e5 +4006 3 4 17 0.65536000000000000000e5 +4006 3 12 41 -0.65536000000000000000e5 +4006 3 13 42 -0.65536000000000000000e5 +4006 4 2 14 0.65536000000000000000e5 +4006 4 10 21 0.65536000000000000000e5 +4007 1 4 35 0.65536000000000000000e5 +4007 1 17 48 -0.65536000000000000000e5 +4007 3 5 34 0.65536000000000000000e5 +4007 3 13 42 -0.65536000000000000000e5 +4007 3 14 27 0.65536000000000000000e5 +4007 3 16 29 -0.13107200000000000000e6 +4007 4 10 22 0.65536000000000000000e5 +4008 1 4 35 -0.32768000000000000000e5 +4008 1 12 43 -0.32768000000000000000e5 +4008 1 13 44 -0.65536000000000000000e5 +4008 1 14 45 -0.65536000000000000000e5 +4008 1 17 48 0.32768000000000000000e5 +4008 1 18 49 0.32768000000000000000e5 +4008 1 20 27 0.13107200000000000000e6 +4008 1 27 34 -0.65536000000000000000e5 +4008 2 9 23 -0.32768000000000000000e5 +4008 2 10 24 -0.65536000000000000000e5 +4008 2 14 28 0.32768000000000000000e5 +4008 3 5 34 -0.32768000000000000000e5 +4008 3 7 36 -0.13107200000000000000e6 +4008 3 13 42 0.32768000000000000000e5 +4008 3 14 27 -0.32768000000000000000e5 +4008 3 14 43 0.32768000000000000000e5 +4008 3 16 29 0.65536000000000000000e5 +4008 4 10 23 0.65536000000000000000e5 +4009 4 10 24 0.65536000000000000000e5 +4009 4 11 23 -0.65536000000000000000e5 +4010 2 11 25 -0.65536000000000000000e5 +4010 2 15 29 0.65536000000000000000e5 +4010 4 10 25 0.65536000000000000000e5 +4011 1 9 40 -0.32768000000000000000e5 +4011 1 10 41 0.13107200000000000000e6 +4011 1 11 42 0.65536000000000000000e5 +4011 1 26 41 0.32768000000000000000e5 +4011 1 32 47 -0.13107200000000000000e6 +4011 1 33 48 -0.65536000000000000000e5 +4011 2 12 26 -0.65536000000000000000e5 +4011 2 20 34 0.65536000000000000000e5 +4011 3 8 37 0.32768000000000000000e5 +4011 3 9 38 -0.32768000000000000000e5 +4011 3 12 41 -0.13107200000000000000e6 +4011 3 13 42 -0.13107200000000000000e6 +4011 3 22 27 0.32768000000000000000e5 +4011 3 22 35 0.13107200000000000000e6 +4011 3 28 41 -0.13107200000000000000e6 +4011 3 29 42 -0.65536000000000000000e5 +4011 4 1 29 0.32768000000000000000e5 +4011 4 2 30 -0.32768000000000000000e5 +4011 4 3 31 0.65536000000000000000e5 +4011 4 6 34 0.65536000000000000000e5 +4011 4 10 26 0.65536000000000000000e5 +4012 2 12 26 -0.65536000000000000000e5 +4012 2 20 34 0.65536000000000000000e5 +4012 4 6 34 0.65536000000000000000e5 +4012 4 10 27 0.65536000000000000000e5 +4013 4 3 31 -0.65536000000000000000e5 +4013 4 10 28 0.65536000000000000000e5 +4014 1 13 44 -0.13107200000000000000e6 +4014 1 34 41 0.13107200000000000000e6 +4014 3 12 41 0.65536000000000000000e5 +4014 3 13 42 0.65536000000000000000e5 +4014 3 22 35 0.65536000000000000000e5 +4014 4 10 29 0.65536000000000000000e5 +4015 4 10 30 0.65536000000000000000e5 +4015 4 14 26 -0.65536000000000000000e5 +4016 1 3 18 -0.32768000000000000000e5 +4016 1 4 19 0.65536000000000000000e5 +4016 1 5 36 0.65536000000000000000e5 +4016 1 12 43 0.32768000000000000000e5 +4016 1 14 45 -0.65536000000000000000e5 +4016 1 17 32 -0.13107200000000000000e6 +4016 1 19 50 0.13107200000000000000e6 +4016 1 34 41 -0.65536000000000000000e5 +4016 3 3 16 -0.32768000000000000000e5 +4016 3 4 17 -0.32768000000000000000e5 +4016 3 14 27 0.32768000000000000000e5 +4016 3 15 44 -0.65536000000000000000e5 +4016 3 16 29 0.65536000000000000000e5 +4016 3 16 45 0.13107200000000000000e6 +4016 4 2 14 -0.32768000000000000000e5 +4016 4 10 31 0.65536000000000000000e5 +4016 4 11 23 0.65536000000000000000e5 +4016 4 15 27 -0.65536000000000000000e5 +4017 4 6 34 -0.65536000000000000000e5 +4017 4 10 32 0.65536000000000000000e5 +4018 4 10 33 0.65536000000000000000e5 +4018 4 23 27 -0.65536000000000000000e5 +4019 1 6 53 0.81920000000000000000e4 +4019 1 25 40 -0.81920000000000000000e4 +4019 2 4 34 0.16384000000000000000e5 +4019 2 21 35 -0.16384000000000000000e5 +4019 3 5 50 0.16384000000000000000e5 +4019 3 7 52 0.65536000000000000000e5 +4019 3 18 47 0.65536000000000000000e5 +4019 3 24 37 0.81920000000000000000e4 +4019 3 27 40 0.32768000000000000000e5 +4019 3 28 41 0.32768000000000000000e5 +4019 3 29 42 0.32768000000000000000e5 +4019 3 31 44 -0.13107200000000000000e6 +4019 4 4 32 -0.81920000000000000000e4 +4019 4 7 35 -0.16384000000000000000e5 +4019 4 10 34 0.65536000000000000000e5 +4019 4 16 28 0.81920000000000000000e4 +4019 4 23 27 0.32768000000000000000e5 +4020 1 32 47 0.65536000000000000000e5 +4020 1 37 52 -0.65536000000000000000e5 +4020 3 10 55 -0.65536000000000000000e5 +4020 3 23 52 0.65536000000000000000e5 +4020 3 34 47 -0.13107200000000000000e6 +4020 3 35 48 0.13107200000000000000e6 +4020 3 40 45 -0.65536000000000000000e5 +4020 4 10 35 0.65536000000000000000e5 +4020 4 22 34 -0.65536000000000000000e5 +4021 4 3 15 -0.32768000000000000000e5 +4021 4 11 11 0.65536000000000000000e5 +4022 1 3 18 0.32768000000000000000e5 +4022 1 4 35 -0.65536000000000000000e5 +4022 1 5 20 0.13107200000000000000e6 +4022 1 5 36 -0.13107200000000000000e6 +4022 1 10 17 0.13107200000000000000e6 +4022 1 12 43 -0.98304000000000000000e5 +4022 1 14 45 -0.13107200000000000000e6 +4022 1 17 48 0.65536000000000000000e5 +4022 1 18 49 0.65536000000000000000e5 +4022 2 9 23 -0.65536000000000000000e5 +4022 2 14 28 0.65536000000000000000e5 +4022 3 3 16 0.32768000000000000000e5 +4022 3 4 17 0.32768000000000000000e5 +4022 3 5 34 -0.65536000000000000000e5 +4022 3 6 19 0.65536000000000000000e5 +4022 3 7 20 0.13107200000000000000e6 +4022 3 8 21 -0.26214400000000000000e6 +4022 3 13 42 0.65536000000000000000e5 +4022 3 14 27 -0.98304000000000000000e5 +4022 3 14 43 0.65536000000000000000e5 +4022 4 2 14 0.32768000000000000000e5 +4022 4 3 15 0.65536000000000000000e5 +4022 4 10 14 0.13107200000000000000e6 +4022 4 11 12 0.65536000000000000000e5 +4023 4 10 14 -0.65536000000000000000e5 +4023 4 11 13 0.65536000000000000000e5 +4024 1 6 21 0.65536000000000000000e5 +4024 1 18 33 -0.65536000000000000000e5 +4024 3 7 20 -0.65536000000000000000e5 +4024 3 8 21 0.13107200000000000000e6 +4024 3 14 19 -0.13107200000000000000e6 +4024 4 10 14 -0.65536000000000000000e5 +4024 4 11 14 0.65536000000000000000e5 +4025 1 2 33 0.65536000000000000000e5 +4025 1 3 34 -0.13107200000000000000e6 +4025 1 11 42 -0.65536000000000000000e5 +4025 1 12 43 -0.13107200000000000000e6 +4025 1 16 47 0.13107200000000000000e6 +4025 1 28 43 0.65536000000000000000e5 +4025 1 32 47 0.65536000000000000000e5 +4025 1 33 48 0.65536000000000000000e5 +4025 2 12 26 0.65536000000000000000e5 +4025 3 2 31 0.65536000000000000000e5 +4025 3 3 32 0.65536000000000000000e5 +4025 3 12 41 0.13107200000000000000e6 +4025 3 13 42 0.13107200000000000000e6 +4025 3 28 41 0.65536000000000000000e5 +4025 3 29 42 0.65536000000000000000e5 +4025 4 3 31 -0.65536000000000000000e5 +4025 4 11 16 0.65536000000000000000e5 +4026 4 8 20 -0.65536000000000000000e5 +4026 4 11 17 0.65536000000000000000e5 +4027 1 2 33 -0.65536000000000000000e5 +4027 1 4 35 -0.13107200000000000000e6 +4027 1 11 42 0.65536000000000000000e5 +4027 1 12 43 0.13107200000000000000e6 +4027 1 17 48 0.13107200000000000000e6 +4027 1 28 43 -0.65536000000000000000e5 +4027 1 32 47 -0.65536000000000000000e5 +4027 1 33 48 -0.65536000000000000000e5 +4027 2 12 26 -0.65536000000000000000e5 +4027 3 4 33 0.65536000000000000000e5 +4027 3 14 27 0.13107200000000000000e6 +4027 3 28 41 -0.65536000000000000000e5 +4027 3 29 42 -0.65536000000000000000e5 +4027 4 3 31 0.65536000000000000000e5 +4027 4 8 20 -0.65536000000000000000e5 +4027 4 11 18 0.65536000000000000000e5 +4028 4 9 21 -0.65536000000000000000e5 +4028 4 11 19 0.65536000000000000000e5 +4029 1 3 18 0.65536000000000000000e5 +4029 1 3 34 0.65536000000000000000e5 +4029 1 4 19 -0.13107200000000000000e6 +4029 1 4 35 0.65536000000000000000e5 +4029 1 12 43 -0.65536000000000000000e5 +4029 1 13 44 0.13107200000000000000e6 +4029 1 16 47 -0.65536000000000000000e5 +4029 1 17 48 -0.65536000000000000000e5 +4029 3 3 16 0.65536000000000000000e5 +4029 3 4 17 0.65536000000000000000e5 +4029 3 12 41 -0.65536000000000000000e5 +4029 3 13 42 -0.65536000000000000000e5 +4029 4 2 14 0.65536000000000000000e5 +4029 4 11 20 0.65536000000000000000e5 +4030 1 4 35 0.65536000000000000000e5 +4030 1 17 48 -0.65536000000000000000e5 +4030 3 5 34 0.65536000000000000000e5 +4030 3 13 42 -0.65536000000000000000e5 +4030 3 14 27 0.65536000000000000000e5 +4030 3 16 29 -0.13107200000000000000e6 +4030 4 11 21 0.65536000000000000000e5 +4031 1 4 35 0.65536000000000000000e5 +4031 1 5 36 -0.13107200000000000000e6 +4031 1 14 45 0.13107200000000000000e6 +4031 1 15 30 0.65536000000000000000e5 +4031 1 17 48 -0.65536000000000000000e5 +4031 1 18 49 -0.65536000000000000000e5 +4031 3 5 34 0.65536000000000000000e5 +4031 3 13 42 -0.65536000000000000000e5 +4031 3 14 43 -0.65536000000000000000e5 +4031 4 11 22 0.65536000000000000000e5 +4032 1 5 36 0.65536000000000000000e5 +4032 1 14 45 -0.65536000000000000000e5 +4032 3 16 29 0.65536000000000000000e5 +4032 3 17 30 0.65536000000000000000e5 +4032 3 18 31 -0.13107200000000000000e6 +4032 4 11 24 0.65536000000000000000e5 +4033 1 3 18 -0.16384000000000000000e5 +4033 1 4 19 0.32768000000000000000e5 +4033 1 5 36 0.32768000000000000000e5 +4033 1 12 43 0.16384000000000000000e5 +4033 1 13 44 -0.32768000000000000000e5 +4033 1 14 45 -0.32768000000000000000e5 +4033 1 15 46 -0.65536000000000000000e5 +4033 1 18 33 0.65536000000000000000e5 +4033 3 3 16 -0.16384000000000000000e5 +4033 3 4 17 -0.16384000000000000000e5 +4033 3 14 27 0.16384000000000000000e5 +4033 3 16 29 0.32768000000000000000e5 +4033 3 18 31 0.65536000000000000000e5 +4033 3 19 32 -0.13107200000000000000e6 +4033 4 2 14 -0.16384000000000000000e5 +4033 4 11 23 0.32768000000000000000e5 +4033 4 11 25 0.65536000000000000000e5 +4034 2 12 26 -0.65536000000000000000e5 +4034 2 20 34 0.65536000000000000000e5 +4034 4 6 34 0.65536000000000000000e5 +4034 4 11 26 0.65536000000000000000e5 +4035 4 3 31 -0.65536000000000000000e5 +4035 4 11 27 0.65536000000000000000e5 +4036 1 10 41 -0.65536000000000000000e5 +4036 1 14 45 -0.26214400000000000000e6 +4036 1 17 48 0.13107200000000000000e6 +4036 1 18 49 0.13107200000000000000e6 +4036 1 26 33 0.65536000000000000000e5 +4036 1 32 47 0.65536000000000000000e5 +4036 1 33 40 -0.65536000000000000000e5 +4036 1 34 49 0.13107200000000000000e6 +4036 2 14 28 0.13107200000000000000e6 +4036 3 13 42 0.26214400000000000000e6 +4036 3 14 43 0.13107200000000000000e6 +4036 3 18 47 0.13107200000000000000e6 +4036 3 28 41 0.65536000000000000000e5 +4036 4 3 31 -0.65536000000000000000e5 +4036 4 11 28 0.65536000000000000000e5 +4037 4 11 29 0.65536000000000000000e5 +4037 4 14 26 -0.65536000000000000000e5 +4038 1 14 45 0.26214400000000000000e6 +4038 1 17 48 -0.13107200000000000000e6 +4038 1 18 49 -0.13107200000000000000e6 +4038 1 34 49 -0.13107200000000000000e6 +4038 2 14 28 -0.13107200000000000000e6 +4038 3 14 43 -0.65536000000000000000e5 +4038 3 15 44 0.13107200000000000000e6 +4038 3 16 45 -0.26214400000000000000e6 +4038 3 18 47 -0.13107200000000000000e6 +4038 3 22 35 0.65536000000000000000e5 +4038 4 11 30 0.65536000000000000000e5 +4038 4 14 26 0.65536000000000000000e5 +4038 4 15 27 0.13107200000000000000e6 +4039 4 11 31 0.65536000000000000000e5 +4039 4 15 27 -0.65536000000000000000e5 +4040 4 11 32 0.65536000000000000000e5 +4040 4 23 27 -0.65536000000000000000e5 +4041 1 6 53 0.16384000000000000000e5 +4041 1 25 40 -0.16384000000000000000e5 +4041 2 4 34 0.32768000000000000000e5 +4041 2 21 35 -0.32768000000000000000e5 +4041 3 5 50 0.32768000000000000000e5 +4041 3 14 51 0.13107200000000000000e6 +4041 3 18 47 -0.13107200000000000000e6 +4041 3 24 37 0.16384000000000000000e5 +4041 3 27 40 0.65536000000000000000e5 +4041 3 30 43 -0.65536000000000000000e5 +4041 4 4 32 -0.16384000000000000000e5 +4041 4 7 35 -0.32768000000000000000e5 +4041 4 11 33 0.65536000000000000000e5 +4041 4 16 28 0.16384000000000000000e5 +4041 4 19 31 -0.65536000000000000000e5 +4042 1 6 53 0.81920000000000000000e4 +4042 1 25 40 -0.81920000000000000000e4 +4042 2 4 34 0.16384000000000000000e5 +4042 2 21 35 -0.16384000000000000000e5 +4042 3 5 50 0.16384000000000000000e5 +4042 3 14 51 0.65536000000000000000e5 +4042 3 18 47 0.65536000000000000000e5 +4042 3 19 48 -0.13107200000000000000e6 +4042 3 24 37 0.81920000000000000000e4 +4042 3 27 40 0.32768000000000000000e5 +4042 3 28 41 0.32768000000000000000e5 +4042 3 29 42 0.32768000000000000000e5 +4042 4 4 32 -0.81920000000000000000e4 +4042 4 7 35 -0.16384000000000000000e5 +4042 4 11 34 0.65536000000000000000e5 +4042 4 16 28 0.81920000000000000000e4 +4042 4 23 27 0.32768000000000000000e5 +4043 1 34 49 -0.13107200000000000000e6 +4043 1 44 51 0.13107200000000000000e6 +4043 3 23 52 0.65536000000000000000e5 +4043 3 35 48 0.13107200000000000000e6 +4043 3 40 45 -0.65536000000000000000e5 +4043 4 11 35 0.65536000000000000000e5 +4043 4 22 34 -0.65536000000000000000e5 +4044 1 6 21 0.65536000000000000000e5 +4044 1 18 33 -0.65536000000000000000e5 +4044 3 7 20 -0.65536000000000000000e5 +4044 3 8 21 0.13107200000000000000e6 +4044 3 14 19 -0.13107200000000000000e6 +4044 4 10 14 -0.65536000000000000000e5 +4044 4 12 13 0.65536000000000000000e5 +4045 1 3 18 -0.16384000000000000000e5 +4045 1 4 35 0.16384000000000000000e5 +4045 1 5 20 -0.32768000000000000000e5 +4045 1 5 36 0.32768000000000000000e5 +4045 1 6 21 0.65536000000000000000e5 +4045 1 10 17 -0.32768000000000000000e5 +4045 1 12 43 0.32768000000000000000e5 +4045 1 14 45 0.32768000000000000000e5 +4045 1 17 48 -0.16384000000000000000e5 +4045 1 18 33 -0.65536000000000000000e5 +4045 1 18 49 -0.16384000000000000000e5 +4045 2 9 23 0.16384000000000000000e5 +4045 2 14 28 -0.16384000000000000000e5 +4045 3 3 16 -0.16384000000000000000e5 +4045 3 4 17 -0.16384000000000000000e5 +4045 3 5 34 0.16384000000000000000e5 +4045 3 7 20 -0.65536000000000000000e5 +4045 3 8 21 0.13107200000000000000e6 +4045 3 11 20 0.65536000000000000000e5 +4045 3 13 42 -0.16384000000000000000e5 +4045 3 14 19 0.13107200000000000000e6 +4045 3 14 27 0.32768000000000000000e5 +4045 3 14 43 -0.16384000000000000000e5 +4045 3 15 20 0.13107200000000000000e6 +4045 3 18 19 -0.26214400000000000000e6 +4045 4 2 14 -0.16384000000000000000e5 +4045 4 3 15 -0.32768000000000000000e5 +4045 4 10 14 -0.65536000000000000000e5 +4045 4 12 14 0.65536000000000000000e5 +4045 4 14 14 0.26214400000000000000e6 +4046 4 12 15 0.65536000000000000000e5 +4046 4 14 14 -0.13107200000000000000e6 +4047 4 8 20 -0.65536000000000000000e5 +4047 4 12 16 0.65536000000000000000e5 +4048 1 2 33 -0.65536000000000000000e5 +4048 1 4 35 -0.13107200000000000000e6 +4048 1 11 42 0.65536000000000000000e5 +4048 1 12 43 0.13107200000000000000e6 +4048 1 17 48 0.13107200000000000000e6 +4048 1 28 43 -0.65536000000000000000e5 +4048 1 32 47 -0.65536000000000000000e5 +4048 1 33 48 -0.65536000000000000000e5 +4048 2 12 26 -0.65536000000000000000e5 +4048 3 4 33 0.65536000000000000000e5 +4048 3 14 27 0.13107200000000000000e6 +4048 3 28 41 -0.65536000000000000000e5 +4048 3 29 42 -0.65536000000000000000e5 +4048 4 3 31 0.65536000000000000000e5 +4048 4 8 20 -0.65536000000000000000e5 +4048 4 12 17 0.65536000000000000000e5 +4049 4 9 21 -0.65536000000000000000e5 +4049 4 12 18 0.65536000000000000000e5 +4050 1 2 33 0.65536000000000000000e5 +4050 1 11 42 -0.65536000000000000000e5 +4050 1 12 43 -0.13107200000000000000e6 +4050 1 15 30 -0.13107200000000000000e6 +4050 1 18 49 0.13107200000000000000e6 +4050 1 28 43 0.65536000000000000000e5 +4050 1 32 47 0.65536000000000000000e5 +4050 1 33 48 0.65536000000000000000e5 +4050 2 12 26 0.65536000000000000000e5 +4050 3 3 32 0.65536000000000000000e5 +4050 3 5 34 0.13107200000000000000e6 +4050 3 11 30 0.65536000000000000000e5 +4050 3 13 42 0.13107200000000000000e6 +4050 3 14 27 -0.13107200000000000000e6 +4050 3 14 43 0.13107200000000000000e6 +4050 3 28 41 0.65536000000000000000e5 +4050 3 29 42 0.65536000000000000000e5 +4050 4 3 31 -0.65536000000000000000e5 +4050 4 8 20 0.65536000000000000000e5 +4050 4 9 21 -0.65536000000000000000e5 +4050 4 12 19 0.65536000000000000000e5 +4051 1 4 35 0.65536000000000000000e5 +4051 1 17 48 -0.65536000000000000000e5 +4051 3 5 34 0.65536000000000000000e5 +4051 3 13 42 -0.65536000000000000000e5 +4051 3 14 27 0.65536000000000000000e5 +4051 3 16 29 -0.13107200000000000000e6 +4051 4 12 20 0.65536000000000000000e5 +4052 1 4 35 0.65536000000000000000e5 +4052 1 5 36 -0.13107200000000000000e6 +4052 1 14 45 0.13107200000000000000e6 +4052 1 15 30 0.65536000000000000000e5 +4052 1 17 48 -0.65536000000000000000e5 +4052 1 18 49 -0.65536000000000000000e5 +4052 3 5 34 0.65536000000000000000e5 +4052 3 13 42 -0.65536000000000000000e5 +4052 3 14 43 -0.65536000000000000000e5 +4052 4 12 21 0.65536000000000000000e5 +4053 1 15 30 0.65536000000000000000e5 +4053 1 18 49 -0.65536000000000000000e5 +4053 3 5 34 0.65536000000000000000e5 +4053 3 6 35 0.65536000000000000000e5 +4053 3 14 43 -0.65536000000000000000e5 +4053 3 17 30 -0.13107200000000000000e6 +4053 4 12 22 0.65536000000000000000e5 +4054 1 5 36 0.65536000000000000000e5 +4054 1 14 45 -0.65536000000000000000e5 +4054 3 16 29 0.65536000000000000000e5 +4054 3 17 30 0.65536000000000000000e5 +4054 3 18 31 -0.13107200000000000000e6 +4054 4 12 23 0.65536000000000000000e5 +4055 1 3 18 -0.16384000000000000000e5 +4055 1 4 19 0.32768000000000000000e5 +4055 1 5 36 0.32768000000000000000e5 +4055 1 12 43 0.16384000000000000000e5 +4055 1 13 44 -0.32768000000000000000e5 +4055 1 14 21 -0.26214400000000000000e6 +4055 1 14 45 -0.32768000000000000000e5 +4055 1 15 46 -0.65536000000000000000e5 +4055 1 18 33 0.65536000000000000000e5 +4055 1 21 44 0.26214400000000000000e6 +4055 2 11 25 0.65536000000000000000e5 +4055 2 15 29 -0.65536000000000000000e5 +4055 3 3 16 -0.16384000000000000000e5 +4055 3 4 17 -0.16384000000000000000e5 +4055 3 7 36 0.65536000000000000000e5 +4055 3 8 21 0.13107200000000000000e6 +4055 3 14 27 0.16384000000000000000e5 +4055 3 15 20 -0.13107200000000000000e6 +4055 3 16 29 0.32768000000000000000e5 +4055 3 18 19 0.26214400000000000000e6 +4055 3 18 31 0.13107200000000000000e6 +4055 3 19 32 0.13107200000000000000e6 +4055 3 21 26 0.65536000000000000000e5 +4055 4 2 14 -0.16384000000000000000e5 +4055 4 11 15 0.13107200000000000000e6 +4055 4 11 23 0.32768000000000000000e5 +4055 4 12 25 0.65536000000000000000e5 +4055 4 13 25 0.13107200000000000000e6 +4055 4 14 14 -0.26214400000000000000e6 +4056 4 3 31 -0.65536000000000000000e5 +4056 4 12 26 0.65536000000000000000e5 +4057 1 10 41 -0.65536000000000000000e5 +4057 1 14 45 -0.26214400000000000000e6 +4057 1 17 48 0.13107200000000000000e6 +4057 1 18 49 0.13107200000000000000e6 +4057 1 26 33 0.65536000000000000000e5 +4057 1 32 47 0.65536000000000000000e5 +4057 1 33 40 -0.65536000000000000000e5 +4057 1 34 49 0.13107200000000000000e6 +4057 2 14 28 0.13107200000000000000e6 +4057 3 13 42 0.26214400000000000000e6 +4057 3 14 43 0.13107200000000000000e6 +4057 3 18 47 0.13107200000000000000e6 +4057 3 28 41 0.65536000000000000000e5 +4057 4 3 31 -0.65536000000000000000e5 +4057 4 12 27 0.65536000000000000000e5 +4058 4 12 28 0.65536000000000000000e5 +4058 4 22 22 -0.13107200000000000000e6 +4059 1 14 45 0.26214400000000000000e6 +4059 1 17 48 -0.13107200000000000000e6 +4059 1 18 49 -0.13107200000000000000e6 +4059 1 34 49 -0.13107200000000000000e6 +4059 2 14 28 -0.13107200000000000000e6 +4059 3 14 43 -0.65536000000000000000e5 +4059 3 15 44 0.13107200000000000000e6 +4059 3 16 45 -0.26214400000000000000e6 +4059 3 18 47 -0.13107200000000000000e6 +4059 3 22 35 0.65536000000000000000e5 +4059 4 12 29 0.65536000000000000000e5 +4059 4 14 26 0.65536000000000000000e5 +4059 4 15 27 0.13107200000000000000e6 +4060 1 14 45 0.13107200000000000000e6 +4060 1 17 48 -0.65536000000000000000e5 +4060 1 18 49 -0.65536000000000000000e5 +4060 1 34 49 -0.65536000000000000000e5 +4060 2 14 28 -0.65536000000000000000e5 +4060 3 13 42 -0.65536000000000000000e5 +4060 3 15 44 -0.13107200000000000000e6 +4060 3 18 47 -0.65536000000000000000e5 +4060 3 26 35 0.65536000000000000000e5 +4060 4 12 30 0.65536000000000000000e5 +4061 1 14 45 -0.65536000000000000000e5 +4061 1 15 46 -0.13107200000000000000e6 +4061 1 17 48 0.32768000000000000000e5 +4061 1 18 49 0.32768000000000000000e5 +4061 1 20 51 0.13107200000000000000e6 +4061 1 34 49 0.32768000000000000000e5 +4061 2 14 28 0.32768000000000000000e5 +4061 3 14 43 0.32768000000000000000e5 +4061 3 16 45 0.13107200000000000000e6 +4061 3 18 47 0.32768000000000000000e5 +4061 3 22 35 -0.32768000000000000000e5 +4061 3 30 35 0.65536000000000000000e5 +4061 4 12 31 0.65536000000000000000e5 +4061 4 14 26 -0.32768000000000000000e5 +4061 4 15 27 -0.65536000000000000000e5 +4062 1 6 53 0.16384000000000000000e5 +4062 1 25 40 -0.16384000000000000000e5 +4062 2 4 34 0.32768000000000000000e5 +4062 2 21 35 -0.32768000000000000000e5 +4062 3 5 50 0.32768000000000000000e5 +4062 3 14 51 0.13107200000000000000e6 +4062 3 18 47 -0.13107200000000000000e6 +4062 3 24 37 0.16384000000000000000e5 +4062 3 27 40 0.65536000000000000000e5 +4062 3 30 43 -0.65536000000000000000e5 +4062 4 4 32 -0.16384000000000000000e5 +4062 4 7 35 -0.32768000000000000000e5 +4062 4 12 32 0.65536000000000000000e5 +4062 4 16 28 0.16384000000000000000e5 +4062 4 19 31 -0.65536000000000000000e5 +4063 4 12 33 0.65536000000000000000e5 +4063 4 19 31 -0.65536000000000000000e5 +4064 3 14 51 0.65536000000000000000e5 +4064 3 18 47 0.65536000000000000000e5 +4064 3 32 45 -0.13107200000000000000e6 +4064 3 35 40 0.65536000000000000000e5 +4064 4 12 34 0.65536000000000000000e5 +4065 4 12 35 0.65536000000000000000e5 +4065 4 22 34 -0.65536000000000000000e5 +4066 4 11 15 -0.65536000000000000000e5 +4066 4 13 14 0.65536000000000000000e5 +4067 3 8 21 0.32768000000000000000e5 +4067 3 12 21 0.65536000000000000000e5 +4067 3 15 20 -0.32768000000000000000e5 +4067 3 16 21 -0.13107200000000000000e6 +4067 3 18 19 0.13107200000000000000e6 +4067 4 11 15 0.32768000000000000000e5 +4067 4 13 15 0.65536000000000000000e5 +4067 4 14 14 -0.65536000000000000000e5 +4068 1 3 18 -0.65536000000000000000e5 +4068 1 3 34 0.65536000000000000000e5 +4068 1 4 19 0.13107200000000000000e6 +4068 1 4 35 0.65536000000000000000e5 +4068 1 12 43 0.13107200000000000000e6 +4068 1 14 45 0.13107200000000000000e6 +4068 1 16 47 -0.65536000000000000000e5 +4068 1 17 48 -0.65536000000000000000e5 +4068 1 18 49 -0.65536000000000000000e5 +4068 1 20 27 -0.26214400000000000000e6 +4068 1 27 34 0.13107200000000000000e6 +4068 2 9 23 0.65536000000000000000e5 +4068 2 10 24 0.13107200000000000000e6 +4068 2 14 28 -0.65536000000000000000e5 +4068 3 1 34 0.65536000000000000000e5 +4068 3 3 16 -0.65536000000000000000e5 +4068 3 4 17 -0.65536000000000000000e5 +4068 3 5 34 0.65536000000000000000e5 +4068 3 12 41 -0.65536000000000000000e5 +4068 3 13 42 -0.65536000000000000000e5 +4068 3 14 27 0.19660800000000000000e6 +4068 3 14 43 -0.65536000000000000000e5 +4068 4 2 14 -0.65536000000000000000e5 +4068 4 13 16 0.65536000000000000000e5 +4069 1 3 18 0.65536000000000000000e5 +4069 1 3 34 0.65536000000000000000e5 +4069 1 4 19 -0.13107200000000000000e6 +4069 1 4 35 0.65536000000000000000e5 +4069 1 12 43 -0.65536000000000000000e5 +4069 1 13 44 0.13107200000000000000e6 +4069 1 16 47 -0.65536000000000000000e5 +4069 1 17 48 -0.65536000000000000000e5 +4069 3 3 16 0.65536000000000000000e5 +4069 3 4 17 0.65536000000000000000e5 +4069 3 12 41 -0.65536000000000000000e5 +4069 3 13 42 -0.65536000000000000000e5 +4069 4 2 14 0.65536000000000000000e5 +4069 4 13 17 0.65536000000000000000e5 +4070 1 4 35 0.65536000000000000000e5 +4070 1 17 48 -0.65536000000000000000e5 +4070 3 5 34 0.65536000000000000000e5 +4070 3 13 42 -0.65536000000000000000e5 +4070 3 14 27 0.65536000000000000000e5 +4070 3 16 29 -0.13107200000000000000e6 +4070 4 13 18 0.65536000000000000000e5 +4071 1 4 35 0.65536000000000000000e5 +4071 1 5 36 -0.13107200000000000000e6 +4071 1 14 45 0.13107200000000000000e6 +4071 1 15 30 0.65536000000000000000e5 +4071 1 17 48 -0.65536000000000000000e5 +4071 1 18 49 -0.65536000000000000000e5 +4071 3 5 34 0.65536000000000000000e5 +4071 3 13 42 -0.65536000000000000000e5 +4071 3 14 43 -0.65536000000000000000e5 +4071 4 13 19 0.65536000000000000000e5 +4072 1 4 35 -0.32768000000000000000e5 +4072 1 12 43 -0.32768000000000000000e5 +4072 1 13 44 -0.65536000000000000000e5 +4072 1 14 45 -0.65536000000000000000e5 +4072 1 17 48 0.32768000000000000000e5 +4072 1 18 49 0.32768000000000000000e5 +4072 1 20 27 0.13107200000000000000e6 +4072 1 27 34 -0.65536000000000000000e5 +4072 2 9 23 -0.32768000000000000000e5 +4072 2 10 24 -0.65536000000000000000e5 +4072 2 14 28 0.32768000000000000000e5 +4072 3 5 34 -0.32768000000000000000e5 +4072 3 7 36 -0.13107200000000000000e6 +4072 3 13 42 0.32768000000000000000e5 +4072 3 14 27 -0.32768000000000000000e5 +4072 3 14 43 0.32768000000000000000e5 +4072 3 16 29 0.65536000000000000000e5 +4072 4 13 20 0.65536000000000000000e5 +4073 4 11 23 -0.65536000000000000000e5 +4073 4 13 21 0.65536000000000000000e5 +4074 1 5 36 0.65536000000000000000e5 +4074 1 14 45 -0.65536000000000000000e5 +4074 3 16 29 0.65536000000000000000e5 +4074 3 17 30 0.65536000000000000000e5 +4074 3 18 31 -0.13107200000000000000e6 +4074 4 13 22 0.65536000000000000000e5 +4075 2 11 25 -0.65536000000000000000e5 +4075 2 15 29 0.65536000000000000000e5 +4075 4 13 23 0.65536000000000000000e5 +4076 1 3 18 -0.16384000000000000000e5 +4076 1 4 19 0.32768000000000000000e5 +4076 1 5 36 0.32768000000000000000e5 +4076 1 12 43 0.16384000000000000000e5 +4076 1 13 44 -0.32768000000000000000e5 +4076 1 14 45 -0.32768000000000000000e5 +4076 1 15 46 -0.65536000000000000000e5 +4076 1 18 33 0.65536000000000000000e5 +4076 3 3 16 -0.16384000000000000000e5 +4076 3 4 17 -0.16384000000000000000e5 +4076 3 14 27 0.16384000000000000000e5 +4076 3 16 29 0.32768000000000000000e5 +4076 3 18 31 0.65536000000000000000e5 +4076 3 19 32 -0.13107200000000000000e6 +4076 4 2 14 -0.16384000000000000000e5 +4076 4 11 23 0.32768000000000000000e5 +4076 4 13 24 0.65536000000000000000e5 +4077 1 13 44 -0.13107200000000000000e6 +4077 1 34 41 0.13107200000000000000e6 +4077 3 12 41 0.65536000000000000000e5 +4077 3 13 42 0.65536000000000000000e5 +4077 3 22 35 0.65536000000000000000e5 +4077 4 13 26 0.65536000000000000000e5 +4078 4 13 27 0.65536000000000000000e5 +4078 4 14 26 -0.65536000000000000000e5 +4079 1 14 45 0.26214400000000000000e6 +4079 1 17 48 -0.13107200000000000000e6 +4079 1 18 49 -0.13107200000000000000e6 +4079 1 34 49 -0.13107200000000000000e6 +4079 2 14 28 -0.13107200000000000000e6 +4079 3 14 43 -0.65536000000000000000e5 +4079 3 15 44 0.13107200000000000000e6 +4079 3 16 45 -0.26214400000000000000e6 +4079 3 18 47 -0.13107200000000000000e6 +4079 3 22 35 0.65536000000000000000e5 +4079 4 13 28 0.65536000000000000000e5 +4079 4 14 26 0.65536000000000000000e5 +4079 4 15 27 0.13107200000000000000e6 +4080 1 3 18 -0.32768000000000000000e5 +4080 1 4 19 0.65536000000000000000e5 +4080 1 5 36 0.65536000000000000000e5 +4080 1 12 43 0.32768000000000000000e5 +4080 1 14 45 -0.65536000000000000000e5 +4080 1 17 32 -0.13107200000000000000e6 +4080 1 19 50 0.13107200000000000000e6 +4080 1 34 41 -0.65536000000000000000e5 +4080 3 3 16 -0.32768000000000000000e5 +4080 3 4 17 -0.32768000000000000000e5 +4080 3 14 27 0.32768000000000000000e5 +4080 3 15 44 -0.65536000000000000000e5 +4080 3 16 29 0.65536000000000000000e5 +4080 3 16 45 0.13107200000000000000e6 +4080 4 2 14 -0.32768000000000000000e5 +4080 4 11 23 0.65536000000000000000e5 +4080 4 13 29 0.65536000000000000000e5 +4080 4 15 27 -0.65536000000000000000e5 +4081 4 13 30 0.65536000000000000000e5 +4081 4 15 27 -0.65536000000000000000e5 +4082 1 3 18 0.16384000000000000000e5 +4082 1 4 19 -0.32768000000000000000e5 +4082 1 5 36 -0.32768000000000000000e5 +4082 1 6 21 -0.65536000000000000000e5 +4082 1 12 43 -0.16384000000000000000e5 +4082 1 13 44 0.32768000000000000000e5 +4082 1 14 45 0.32768000000000000000e5 +4082 1 15 46 0.65536000000000000000e5 +4082 2 9 15 -0.65536000000000000000e5 +4082 2 25 31 0.65536000000000000000e5 +4082 3 3 16 0.16384000000000000000e5 +4082 3 4 17 0.16384000000000000000e5 +4082 3 7 20 0.65536000000000000000e5 +4082 3 8 21 -0.13107200000000000000e6 +4082 3 14 19 0.13107200000000000000e6 +4082 3 14 27 -0.16384000000000000000e5 +4082 3 16 29 -0.32768000000000000000e5 +4082 3 18 31 -0.65536000000000000000e5 +4082 3 19 32 0.13107200000000000000e6 +4082 4 2 14 0.16384000000000000000e5 +4082 4 10 14 0.65536000000000000000e5 +4082 4 11 23 -0.32768000000000000000e5 +4082 4 13 31 0.65536000000000000000e5 +4083 1 6 53 0.81920000000000000000e4 +4083 1 25 40 -0.81920000000000000000e4 +4083 2 4 34 0.16384000000000000000e5 +4083 2 21 35 -0.16384000000000000000e5 +4083 3 5 50 0.16384000000000000000e5 +4083 3 7 52 0.65536000000000000000e5 +4083 3 18 47 0.65536000000000000000e5 +4083 3 24 37 0.81920000000000000000e4 +4083 3 27 40 0.32768000000000000000e5 +4083 3 28 41 0.32768000000000000000e5 +4083 3 29 42 0.32768000000000000000e5 +4083 3 31 44 -0.13107200000000000000e6 +4083 4 4 32 -0.81920000000000000000e4 +4083 4 7 35 -0.16384000000000000000e5 +4083 4 13 32 0.65536000000000000000e5 +4083 4 16 28 0.81920000000000000000e4 +4083 4 23 27 0.32768000000000000000e5 +4084 1 6 53 0.81920000000000000000e4 +4084 1 25 40 -0.81920000000000000000e4 +4084 2 4 34 0.16384000000000000000e5 +4084 2 21 35 -0.16384000000000000000e5 +4084 3 5 50 0.16384000000000000000e5 +4084 3 14 51 0.65536000000000000000e5 +4084 3 18 47 0.65536000000000000000e5 +4084 3 19 48 -0.13107200000000000000e6 +4084 3 24 37 0.81920000000000000000e4 +4084 3 27 40 0.32768000000000000000e5 +4084 3 28 41 0.32768000000000000000e5 +4084 3 29 42 0.32768000000000000000e5 +4084 4 4 32 -0.81920000000000000000e4 +4084 4 7 35 -0.16384000000000000000e5 +4084 4 13 33 0.65536000000000000000e5 +4084 4 16 28 0.81920000000000000000e4 +4084 4 23 27 0.32768000000000000000e5 +4085 3 19 48 0.65536000000000000000e5 +4085 3 31 44 0.65536000000000000000e5 +4085 3 32 45 0.65536000000000000000e5 +4085 3 36 41 -0.13107200000000000000e6 +4085 4 13 34 0.65536000000000000000e5 +4086 1 34 49 0.65536000000000000000e5 +4086 1 44 51 -0.65536000000000000000e5 +4086 3 34 47 0.65536000000000000000e5 +4086 3 35 48 0.65536000000000000000e5 +4086 3 41 46 -0.13107200000000000000e6 +4086 4 13 35 0.65536000000000000000e5 +4087 3 8 21 0.32768000000000000000e5 +4087 3 15 20 -0.32768000000000000000e5 +4087 3 15 21 0.65536000000000000000e5 +4087 3 18 19 0.13107200000000000000e6 +4087 3 19 20 -0.13107200000000000000e6 +4087 4 11 15 0.32768000000000000000e5 +4087 4 14 14 -0.65536000000000000000e5 +4087 4 14 15 0.65536000000000000000e5 +4088 1 3 18 0.65536000000000000000e5 +4088 1 3 34 0.65536000000000000000e5 +4088 1 4 19 -0.13107200000000000000e6 +4088 1 4 35 0.65536000000000000000e5 +4088 1 12 43 -0.65536000000000000000e5 +4088 1 13 44 0.13107200000000000000e6 +4088 1 16 47 -0.65536000000000000000e5 +4088 1 17 48 -0.65536000000000000000e5 +4088 3 3 16 0.65536000000000000000e5 +4088 3 4 17 0.65536000000000000000e5 +4088 3 12 41 -0.65536000000000000000e5 +4088 3 13 42 -0.65536000000000000000e5 +4088 4 2 14 0.65536000000000000000e5 +4088 4 14 16 0.65536000000000000000e5 +4089 1 4 35 0.65536000000000000000e5 +4089 1 17 48 -0.65536000000000000000e5 +4089 3 5 34 0.65536000000000000000e5 +4089 3 13 42 -0.65536000000000000000e5 +4089 3 14 27 0.65536000000000000000e5 +4089 3 16 29 -0.13107200000000000000e6 +4089 4 14 17 0.65536000000000000000e5 +4090 1 4 35 0.65536000000000000000e5 +4090 1 5 36 -0.13107200000000000000e6 +4090 1 14 45 0.13107200000000000000e6 +4090 1 15 30 0.65536000000000000000e5 +4090 1 17 48 -0.65536000000000000000e5 +4090 1 18 49 -0.65536000000000000000e5 +4090 3 5 34 0.65536000000000000000e5 +4090 3 13 42 -0.65536000000000000000e5 +4090 3 14 43 -0.65536000000000000000e5 +4090 4 14 18 0.65536000000000000000e5 +4091 1 15 30 0.65536000000000000000e5 +4091 1 18 49 -0.65536000000000000000e5 +4091 3 5 34 0.65536000000000000000e5 +4091 3 6 35 0.65536000000000000000e5 +4091 3 14 43 -0.65536000000000000000e5 +4091 3 17 30 -0.13107200000000000000e6 +4091 4 14 19 0.65536000000000000000e5 +4092 4 11 23 -0.65536000000000000000e5 +4092 4 14 20 0.65536000000000000000e5 +4093 1 5 36 0.65536000000000000000e5 +4093 1 14 45 -0.65536000000000000000e5 +4093 3 16 29 0.65536000000000000000e5 +4093 3 17 30 0.65536000000000000000e5 +4093 3 18 31 -0.13107200000000000000e6 +4093 4 14 21 0.65536000000000000000e5 +4094 4 12 24 -0.65536000000000000000e5 +4094 4 14 22 0.65536000000000000000e5 +4095 1 3 18 -0.16384000000000000000e5 +4095 1 4 19 0.32768000000000000000e5 +4095 1 5 36 0.32768000000000000000e5 +4095 1 12 43 0.16384000000000000000e5 +4095 1 13 44 -0.32768000000000000000e5 +4095 1 14 45 -0.32768000000000000000e5 +4095 1 15 46 -0.65536000000000000000e5 +4095 1 18 33 0.65536000000000000000e5 +4095 3 3 16 -0.16384000000000000000e5 +4095 3 4 17 -0.16384000000000000000e5 +4095 3 14 27 0.16384000000000000000e5 +4095 3 16 29 0.32768000000000000000e5 +4095 3 18 31 0.65536000000000000000e5 +4095 3 19 32 -0.13107200000000000000e6 +4095 4 2 14 -0.16384000000000000000e5 +4095 4 11 23 0.32768000000000000000e5 +4095 4 14 23 0.65536000000000000000e5 +4096 1 3 18 -0.16384000000000000000e5 +4096 1 4 19 0.32768000000000000000e5 +4096 1 5 36 0.32768000000000000000e5 +4096 1 12 43 0.16384000000000000000e5 +4096 1 13 44 -0.32768000000000000000e5 +4096 1 14 21 -0.26214400000000000000e6 +4096 1 14 45 -0.32768000000000000000e5 +4096 1 15 46 -0.65536000000000000000e5 +4096 1 18 33 0.65536000000000000000e5 +4096 1 21 44 0.26214400000000000000e6 +4096 2 11 25 0.65536000000000000000e5 +4096 2 15 29 -0.65536000000000000000e5 +4096 3 3 16 -0.16384000000000000000e5 +4096 3 4 17 -0.16384000000000000000e5 +4096 3 7 36 0.65536000000000000000e5 +4096 3 8 21 0.13107200000000000000e6 +4096 3 14 27 0.16384000000000000000e5 +4096 3 15 20 -0.13107200000000000000e6 +4096 3 16 29 0.32768000000000000000e5 +4096 3 18 19 0.26214400000000000000e6 +4096 3 18 31 0.13107200000000000000e6 +4096 3 19 32 0.13107200000000000000e6 +4096 3 21 26 0.65536000000000000000e5 +4096 4 2 14 -0.16384000000000000000e5 +4096 4 11 15 0.13107200000000000000e6 +4096 4 11 23 0.32768000000000000000e5 +4096 4 13 25 0.13107200000000000000e6 +4096 4 14 14 -0.26214400000000000000e6 +4096 4 14 24 0.65536000000000000000e5 +4097 1 3 18 0.81920000000000000000e4 +4097 1 4 19 -0.16384000000000000000e5 +4097 1 5 36 -0.16384000000000000000e5 +4097 1 6 21 0.32768000000000000000e5 +4097 1 12 43 -0.81920000000000000000e4 +4097 1 13 44 0.16384000000000000000e5 +4097 1 14 21 0.13107200000000000000e6 +4097 1 14 45 0.16384000000000000000e5 +4097 1 17 32 0.32768000000000000000e5 +4097 1 19 50 -0.32768000000000000000e5 +4097 1 20 35 -0.13107200000000000000e6 +4097 1 20 51 -0.32768000000000000000e5 +4097 1 21 44 -0.13107200000000000000e6 +4097 1 21 52 0.13107200000000000000e6 +4097 2 9 15 0.32768000000000000000e5 +4097 2 11 25 -0.32768000000000000000e5 +4097 2 15 29 0.32768000000000000000e5 +4097 2 25 31 -0.32768000000000000000e5 +4097 3 3 16 0.81920000000000000000e4 +4097 3 4 17 0.81920000000000000000e4 +4097 3 7 20 -0.32768000000000000000e5 +4097 3 7 36 -0.32768000000000000000e5 +4097 3 14 19 -0.65536000000000000000e5 +4097 3 14 27 -0.81920000000000000000e4 +4097 3 15 20 0.65536000000000000000e5 +4097 3 16 29 -0.16384000000000000000e5 +4097 3 16 45 0.32768000000000000000e5 +4097 3 17 46 0.65536000000000000000e5 +4097 3 18 19 -0.13107200000000000000e6 +4097 3 19 32 -0.65536000000000000000e5 +4097 3 20 33 0.65536000000000000000e5 +4097 3 20 45 0.65536000000000000000e5 +4097 4 2 14 0.81920000000000000000e4 +4097 4 10 14 -0.32768000000000000000e5 +4097 4 11 15 -0.65536000000000000000e5 +4097 4 11 23 -0.16384000000000000000e5 +4097 4 13 25 -0.65536000000000000000e5 +4097 4 14 14 0.13107200000000000000e6 +4097 4 14 25 0.65536000000000000000e5 +4097 4 25 25 0.13107200000000000000e6 +4098 1 14 45 0.26214400000000000000e6 +4098 1 17 48 -0.13107200000000000000e6 +4098 1 18 49 -0.13107200000000000000e6 +4098 1 34 49 -0.13107200000000000000e6 +4098 2 14 28 -0.13107200000000000000e6 +4098 3 14 43 -0.65536000000000000000e5 +4098 3 15 44 0.13107200000000000000e6 +4098 3 16 45 -0.26214400000000000000e6 +4098 3 18 47 -0.13107200000000000000e6 +4098 3 22 35 0.65536000000000000000e5 +4098 4 14 26 0.65536000000000000000e5 +4098 4 14 27 0.65536000000000000000e5 +4098 4 15 27 0.13107200000000000000e6 +4099 1 14 45 0.13107200000000000000e6 +4099 1 17 48 -0.65536000000000000000e5 +4099 1 18 49 -0.65536000000000000000e5 +4099 1 34 49 -0.65536000000000000000e5 +4099 2 14 28 -0.65536000000000000000e5 +4099 3 13 42 -0.65536000000000000000e5 +4099 3 15 44 -0.13107200000000000000e6 +4099 3 18 47 -0.65536000000000000000e5 +4099 3 26 35 0.65536000000000000000e5 +4099 4 14 28 0.65536000000000000000e5 +4100 4 14 29 0.65536000000000000000e5 +4100 4 15 27 -0.65536000000000000000e5 +4101 1 14 45 -0.65536000000000000000e5 +4101 1 15 46 -0.13107200000000000000e6 +4101 1 17 48 0.32768000000000000000e5 +4101 1 18 49 0.32768000000000000000e5 +4101 1 20 51 0.13107200000000000000e6 +4101 1 34 49 0.32768000000000000000e5 +4101 2 14 28 0.32768000000000000000e5 +4101 3 14 43 0.32768000000000000000e5 +4101 3 16 45 0.13107200000000000000e6 +4101 3 18 47 0.32768000000000000000e5 +4101 3 22 35 -0.32768000000000000000e5 +4101 3 30 35 0.65536000000000000000e5 +4101 4 14 26 -0.32768000000000000000e5 +4101 4 14 30 0.65536000000000000000e5 +4101 4 15 27 -0.65536000000000000000e5 +4102 1 15 46 0.65536000000000000000e5 +4102 1 20 51 -0.65536000000000000000e5 +4102 3 15 46 0.65536000000000000000e5 +4102 3 16 45 0.65536000000000000000e5 +4102 3 17 46 -0.13107200000000000000e6 +4102 4 14 31 0.65536000000000000000e5 +4103 1 6 53 0.81920000000000000000e4 +4103 1 25 40 -0.81920000000000000000e4 +4103 2 4 34 0.16384000000000000000e5 +4103 2 21 35 -0.16384000000000000000e5 +4103 3 5 50 0.16384000000000000000e5 +4103 3 14 51 0.65536000000000000000e5 +4103 3 18 47 0.65536000000000000000e5 +4103 3 19 48 -0.13107200000000000000e6 +4103 3 24 37 0.81920000000000000000e4 +4103 3 27 40 0.32768000000000000000e5 +4103 3 28 41 0.32768000000000000000e5 +4103 3 29 42 0.32768000000000000000e5 +4103 4 4 32 -0.81920000000000000000e4 +4103 4 7 35 -0.16384000000000000000e5 +4103 4 14 32 0.65536000000000000000e5 +4103 4 16 28 0.81920000000000000000e4 +4103 4 23 27 0.32768000000000000000e5 +4104 3 14 51 0.65536000000000000000e5 +4104 3 18 47 0.65536000000000000000e5 +4104 3 32 45 -0.13107200000000000000e6 +4104 3 35 40 0.65536000000000000000e5 +4104 4 14 33 0.65536000000000000000e5 +4105 1 20 51 -0.13107200000000000000e6 +4105 1 36 51 0.13107200000000000000e6 +4105 3 19 48 0.65536000000000000000e5 +4105 3 20 49 0.65536000000000000000e5 +4105 3 32 45 0.65536000000000000000e5 +4105 4 14 34 0.65536000000000000000e5 +4106 4 14 35 0.65536000000000000000e5 +4106 4 25 33 -0.65536000000000000000e5 +4107 1 4 35 -0.32768000000000000000e5 +4107 1 12 43 -0.32768000000000000000e5 +4107 1 13 44 -0.65536000000000000000e5 +4107 1 14 45 -0.65536000000000000000e5 +4107 1 17 48 0.32768000000000000000e5 +4107 1 18 49 0.32768000000000000000e5 +4107 1 20 27 0.13107200000000000000e6 +4107 1 27 34 -0.65536000000000000000e5 +4107 2 9 23 -0.32768000000000000000e5 +4107 2 10 24 -0.65536000000000000000e5 +4107 2 14 28 0.32768000000000000000e5 +4107 3 5 34 -0.32768000000000000000e5 +4107 3 7 36 -0.13107200000000000000e6 +4107 3 13 42 0.32768000000000000000e5 +4107 3 14 27 -0.32768000000000000000e5 +4107 3 14 43 0.32768000000000000000e5 +4107 3 16 29 0.65536000000000000000e5 +4107 4 15 16 0.65536000000000000000e5 +4108 4 11 23 -0.65536000000000000000e5 +4108 4 15 17 0.65536000000000000000e5 +4109 1 5 36 0.65536000000000000000e5 +4109 1 14 45 -0.65536000000000000000e5 +4109 3 16 29 0.65536000000000000000e5 +4109 3 17 30 0.65536000000000000000e5 +4109 3 18 31 -0.13107200000000000000e6 +4109 4 15 18 0.65536000000000000000e5 +4110 4 12 24 -0.65536000000000000000e5 +4110 4 15 19 0.65536000000000000000e5 +4111 2 11 25 -0.65536000000000000000e5 +4111 2 15 29 0.65536000000000000000e5 +4111 4 15 20 0.65536000000000000000e5 +4112 1 3 18 -0.16384000000000000000e5 +4112 1 4 19 0.32768000000000000000e5 +4112 1 5 36 0.32768000000000000000e5 +4112 1 12 43 0.16384000000000000000e5 +4112 1 13 44 -0.32768000000000000000e5 +4112 1 14 45 -0.32768000000000000000e5 +4112 1 15 46 -0.65536000000000000000e5 +4112 1 18 33 0.65536000000000000000e5 +4112 3 3 16 -0.16384000000000000000e5 +4112 3 4 17 -0.16384000000000000000e5 +4112 3 14 27 0.16384000000000000000e5 +4112 3 16 29 0.32768000000000000000e5 +4112 3 18 31 0.65536000000000000000e5 +4112 3 19 32 -0.13107200000000000000e6 +4112 4 2 14 -0.16384000000000000000e5 +4112 4 11 23 0.32768000000000000000e5 +4112 4 15 21 0.65536000000000000000e5 +4113 1 3 18 -0.16384000000000000000e5 +4113 1 4 19 0.32768000000000000000e5 +4113 1 5 36 0.32768000000000000000e5 +4113 1 12 43 0.16384000000000000000e5 +4113 1 13 44 -0.32768000000000000000e5 +4113 1 14 21 -0.26214400000000000000e6 +4113 1 14 45 -0.32768000000000000000e5 +4113 1 15 46 -0.65536000000000000000e5 +4113 1 18 33 0.65536000000000000000e5 +4113 1 21 44 0.26214400000000000000e6 +4113 2 11 25 0.65536000000000000000e5 +4113 2 15 29 -0.65536000000000000000e5 +4113 3 3 16 -0.16384000000000000000e5 +4113 3 4 17 -0.16384000000000000000e5 +4113 3 7 36 0.65536000000000000000e5 +4113 3 8 21 0.13107200000000000000e6 +4113 3 14 27 0.16384000000000000000e5 +4113 3 15 20 -0.13107200000000000000e6 +4113 3 16 29 0.32768000000000000000e5 +4113 3 18 19 0.26214400000000000000e6 +4113 3 18 31 0.13107200000000000000e6 +4113 3 19 32 0.13107200000000000000e6 +4113 3 21 26 0.65536000000000000000e5 +4113 4 2 14 -0.16384000000000000000e5 +4113 4 11 15 0.13107200000000000000e6 +4113 4 11 23 0.32768000000000000000e5 +4113 4 13 25 0.13107200000000000000e6 +4113 4 14 14 -0.26214400000000000000e6 +4113 4 15 22 0.65536000000000000000e5 +4114 4 13 25 -0.65536000000000000000e5 +4114 4 15 23 0.65536000000000000000e5 +4115 1 3 18 0.81920000000000000000e4 +4115 1 4 19 -0.16384000000000000000e5 +4115 1 5 36 -0.16384000000000000000e5 +4115 1 6 21 0.32768000000000000000e5 +4115 1 12 43 -0.81920000000000000000e4 +4115 1 13 44 0.16384000000000000000e5 +4115 1 14 21 0.13107200000000000000e6 +4115 1 14 45 0.16384000000000000000e5 +4115 1 17 32 0.32768000000000000000e5 +4115 1 19 50 -0.32768000000000000000e5 +4115 1 20 35 -0.13107200000000000000e6 +4115 1 20 51 -0.32768000000000000000e5 +4115 1 21 44 -0.13107200000000000000e6 +4115 1 21 52 0.13107200000000000000e6 +4115 2 9 15 0.32768000000000000000e5 +4115 2 11 25 -0.32768000000000000000e5 +4115 2 15 29 0.32768000000000000000e5 +4115 2 25 31 -0.32768000000000000000e5 +4115 3 3 16 0.81920000000000000000e4 +4115 3 4 17 0.81920000000000000000e4 +4115 3 7 20 -0.32768000000000000000e5 +4115 3 7 36 -0.32768000000000000000e5 +4115 3 14 19 -0.65536000000000000000e5 +4115 3 14 27 -0.81920000000000000000e4 +4115 3 15 20 0.65536000000000000000e5 +4115 3 16 29 -0.16384000000000000000e5 +4115 3 16 45 0.32768000000000000000e5 +4115 3 17 46 0.65536000000000000000e5 +4115 3 18 19 -0.13107200000000000000e6 +4115 3 19 32 -0.65536000000000000000e5 +4115 3 20 33 0.65536000000000000000e5 +4115 3 20 45 0.65536000000000000000e5 +4115 4 2 14 0.81920000000000000000e4 +4115 4 10 14 -0.32768000000000000000e5 +4115 4 11 15 -0.65536000000000000000e5 +4115 4 11 23 -0.16384000000000000000e5 +4115 4 13 25 -0.65536000000000000000e5 +4115 4 14 14 0.13107200000000000000e6 +4115 4 15 24 0.65536000000000000000e5 +4115 4 25 25 0.13107200000000000000e6 +4116 1 6 21 -0.16384000000000000000e5 +4116 1 14 21 0.65536000000000000000e5 +4116 1 17 32 -0.16384000000000000000e5 +4116 1 19 50 0.16384000000000000000e5 +4116 1 20 35 0.65536000000000000000e5 +4116 1 20 51 0.16384000000000000000e5 +4116 1 21 44 -0.65536000000000000000e5 +4116 1 21 52 -0.65536000000000000000e5 +4116 2 9 15 -0.16384000000000000000e5 +4116 2 25 31 0.16384000000000000000e5 +4116 3 7 20 0.16384000000000000000e5 +4116 3 8 21 -0.65536000000000000000e5 +4116 3 14 19 0.32768000000000000000e5 +4116 3 15 20 0.32768000000000000000e5 +4116 3 16 45 -0.16384000000000000000e5 +4116 3 17 46 -0.32768000000000000000e5 +4116 3 18 19 -0.65536000000000000000e5 +4116 3 18 31 -0.16384000000000000000e5 +4116 3 19 32 0.32768000000000000000e5 +4116 3 20 35 0.65536000000000000000e5 +4116 3 20 45 -0.32768000000000000000e5 +4116 3 21 34 -0.13107200000000000000e6 +4116 4 10 14 0.16384000000000000000e5 +4116 4 11 15 -0.32768000000000000000e5 +4116 4 14 14 0.65536000000000000000e5 +4116 4 15 25 0.65536000000000000000e5 +4116 4 25 25 -0.65536000000000000000e5 +4117 1 3 18 -0.32768000000000000000e5 +4117 1 4 19 0.65536000000000000000e5 +4117 1 5 36 0.65536000000000000000e5 +4117 1 12 43 0.32768000000000000000e5 +4117 1 14 45 -0.65536000000000000000e5 +4117 1 17 32 -0.13107200000000000000e6 +4117 1 19 50 0.13107200000000000000e6 +4117 1 34 41 -0.65536000000000000000e5 +4117 3 3 16 -0.32768000000000000000e5 +4117 3 4 17 -0.32768000000000000000e5 +4117 3 14 27 0.32768000000000000000e5 +4117 3 15 44 -0.65536000000000000000e5 +4117 3 16 29 0.65536000000000000000e5 +4117 3 16 45 0.13107200000000000000e6 +4117 4 2 14 -0.32768000000000000000e5 +4117 4 11 23 0.65536000000000000000e5 +4117 4 15 26 0.65536000000000000000e5 +4117 4 15 27 -0.65536000000000000000e5 +4118 1 14 45 -0.65536000000000000000e5 +4118 1 15 46 -0.13107200000000000000e6 +4118 1 17 48 0.32768000000000000000e5 +4118 1 18 49 0.32768000000000000000e5 +4118 1 20 51 0.13107200000000000000e6 +4118 1 34 49 0.32768000000000000000e5 +4118 2 14 28 0.32768000000000000000e5 +4118 3 14 43 0.32768000000000000000e5 +4118 3 16 45 0.13107200000000000000e6 +4118 3 18 47 0.32768000000000000000e5 +4118 3 22 35 -0.32768000000000000000e5 +4118 3 30 35 0.65536000000000000000e5 +4118 4 14 26 -0.32768000000000000000e5 +4118 4 15 27 -0.65536000000000000000e5 +4118 4 15 28 0.65536000000000000000e5 +4119 1 3 18 0.16384000000000000000e5 +4119 1 4 19 -0.32768000000000000000e5 +4119 1 5 36 -0.32768000000000000000e5 +4119 1 6 21 -0.65536000000000000000e5 +4119 1 12 43 -0.16384000000000000000e5 +4119 1 13 44 0.32768000000000000000e5 +4119 1 14 45 0.32768000000000000000e5 +4119 1 15 46 0.65536000000000000000e5 +4119 2 9 15 -0.65536000000000000000e5 +4119 2 25 31 0.65536000000000000000e5 +4119 3 3 16 0.16384000000000000000e5 +4119 3 4 17 0.16384000000000000000e5 +4119 3 7 20 0.65536000000000000000e5 +4119 3 8 21 -0.13107200000000000000e6 +4119 3 14 19 0.13107200000000000000e6 +4119 3 14 27 -0.16384000000000000000e5 +4119 3 16 29 -0.32768000000000000000e5 +4119 3 18 31 -0.65536000000000000000e5 +4119 3 19 32 0.13107200000000000000e6 +4119 4 2 14 0.16384000000000000000e5 +4119 4 10 14 0.65536000000000000000e5 +4119 4 11 23 -0.32768000000000000000e5 +4119 4 15 29 0.65536000000000000000e5 +4120 1 15 46 0.65536000000000000000e5 +4120 1 20 51 -0.65536000000000000000e5 +4120 3 15 46 0.65536000000000000000e5 +4120 3 16 45 0.65536000000000000000e5 +4120 3 17 46 -0.13107200000000000000e6 +4120 4 15 30 0.65536000000000000000e5 +4121 4 15 31 0.65536000000000000000e5 +4121 4 25 25 -0.13107200000000000000e6 +4122 3 19 48 0.65536000000000000000e5 +4122 3 31 44 0.65536000000000000000e5 +4122 3 32 45 0.65536000000000000000e5 +4122 3 36 41 -0.13107200000000000000e6 +4122 4 15 32 0.65536000000000000000e5 +4123 1 20 51 -0.13107200000000000000e6 +4123 1 36 51 0.13107200000000000000e6 +4123 3 19 48 0.65536000000000000000e5 +4123 3 20 49 0.65536000000000000000e5 +4123 3 32 45 0.65536000000000000000e5 +4123 4 15 33 0.65536000000000000000e5 +4124 1 20 51 0.65536000000000000000e5 +4124 1 36 51 -0.65536000000000000000e5 +4124 3 21 50 -0.13107200000000000000e6 +4124 3 33 46 0.65536000000000000000e5 +4124 3 36 41 0.65536000000000000000e5 +4124 4 15 34 0.65536000000000000000e5 +4125 1 1 40 0.65536000000000000000e5 +4125 1 23 38 -0.65536000000000000000e5 +4125 3 1 38 0.65536000000000000000e5 +4125 3 2 39 0.65536000000000000000e5 +4125 3 8 37 -0.13107200000000000000e6 +4125 4 16 17 0.65536000000000000000e5 +4126 1 1 40 0.65536000000000000000e5 +4126 1 6 37 0.65536000000000000000e5 +4126 1 9 40 0.13107200000000000000e6 +4126 1 10 41 -0.26214400000000000000e6 +4126 1 23 38 -0.65536000000000000000e5 +4126 1 24 39 -0.65536000000000000000e5 +4126 1 26 41 -0.13107200000000000000e6 +4126 1 32 47 0.26214400000000000000e6 +4126 3 2 39 0.65536000000000000000e5 +4126 3 9 38 0.13107200000000000000e6 +4126 3 28 41 0.26214400000000000000e6 +4126 4 2 30 0.13107200000000000000e6 +4126 4 16 18 0.65536000000000000000e5 +4127 1 6 37 0.65536000000000000000e5 +4127 1 24 39 -0.65536000000000000000e5 +4127 3 2 39 0.65536000000000000000e5 +4127 3 3 40 0.65536000000000000000e5 +4127 3 9 38 -0.13107200000000000000e6 +4127 4 16 19 0.65536000000000000000e5 +4128 4 1 29 -0.65536000000000000000e5 +4128 4 16 20 0.65536000000000000000e5 +4129 1 9 40 -0.65536000000000000000e5 +4129 1 10 41 0.13107200000000000000e6 +4129 1 11 42 -0.13107200000000000000e6 +4129 1 26 41 0.65536000000000000000e5 +4129 1 32 47 -0.13107200000000000000e6 +4129 1 33 48 0.13107200000000000000e6 +4129 2 12 26 0.13107200000000000000e6 +4129 2 20 34 -0.13107200000000000000e6 +4129 3 8 37 0.65536000000000000000e5 +4129 3 13 42 0.26214400000000000000e6 +4129 3 22 35 -0.26214400000000000000e6 +4129 3 28 41 -0.13107200000000000000e6 +4129 3 29 42 0.13107200000000000000e6 +4129 4 2 30 -0.65536000000000000000e5 +4129 4 3 31 -0.13107200000000000000e6 +4129 4 6 34 -0.13107200000000000000e6 +4129 4 16 21 0.65536000000000000000e5 +4130 4 2 30 -0.65536000000000000000e5 +4130 4 16 22 0.65536000000000000000e5 +4131 1 9 40 -0.32768000000000000000e5 +4131 1 10 41 0.13107200000000000000e6 +4131 1 11 42 0.65536000000000000000e5 +4131 1 26 41 0.32768000000000000000e5 +4131 1 32 47 -0.13107200000000000000e6 +4131 1 33 48 -0.65536000000000000000e5 +4131 2 12 26 -0.65536000000000000000e5 +4131 2 20 34 0.65536000000000000000e5 +4131 3 8 37 0.32768000000000000000e5 +4131 3 9 38 -0.32768000000000000000e5 +4131 3 12 41 -0.13107200000000000000e6 +4131 3 13 42 -0.13107200000000000000e6 +4131 3 22 27 0.32768000000000000000e5 +4131 3 22 35 0.13107200000000000000e6 +4131 3 28 41 -0.13107200000000000000e6 +4131 3 29 42 -0.65536000000000000000e5 +4131 4 1 29 0.32768000000000000000e5 +4131 4 2 30 -0.32768000000000000000e5 +4131 4 3 31 0.65536000000000000000e5 +4131 4 6 34 0.65536000000000000000e5 +4131 4 16 23 0.65536000000000000000e5 +4132 2 12 26 -0.65536000000000000000e5 +4132 2 20 34 0.65536000000000000000e5 +4132 4 6 34 0.65536000000000000000e5 +4132 4 16 24 0.65536000000000000000e5 +4133 1 13 44 -0.13107200000000000000e6 +4133 1 34 41 0.13107200000000000000e6 +4133 3 12 41 0.65536000000000000000e5 +4133 3 13 42 0.65536000000000000000e5 +4133 3 22 35 0.65536000000000000000e5 +4133 4 16 25 0.65536000000000000000e5 +4134 2 1 35 0.65536000000000000000e5 +4134 2 2 32 -0.65536000000000000000e5 +4134 4 16 26 0.65536000000000000000e5 +4135 1 6 53 0.13107200000000000000e6 +4135 1 25 40 -0.13107200000000000000e6 +4135 3 2 47 0.65536000000000000000e5 +4135 3 24 37 0.13107200000000000000e6 +4135 3 25 38 -0.65536000000000000000e5 +4135 3 27 40 0.39321600000000000000e6 +4135 3 28 41 -0.26214400000000000000e6 +4135 4 4 32 -0.13107200000000000000e6 +4135 4 16 27 0.65536000000000000000e5 +4135 4 16 28 0.65536000000000000000e5 +4135 4 17 29 0.13107200000000000000e6 +4136 2 16 30 -0.65536000000000000000e5 +4136 2 16 34 0.65536000000000000000e5 +4136 4 16 29 0.65536000000000000000e5 +4137 4 16 30 0.65536000000000000000e5 +4137 4 17 29 -0.65536000000000000000e5 +4138 4 6 34 -0.65536000000000000000e5 +4138 4 16 31 0.65536000000000000000e5 +4139 1 2 49 0.65536000000000000000e5 +4139 1 6 53 -0.13107200000000000000e6 +4139 1 8 39 -0.13107200000000000000e6 +4139 1 9 40 -0.13107200000000000000e6 +4139 1 10 41 0.26214400000000000000e6 +4139 1 23 38 0.65536000000000000000e5 +4139 1 24 39 0.65536000000000000000e5 +4139 1 25 40 0.13107200000000000000e6 +4139 1 26 41 0.13107200000000000000e6 +4139 1 32 47 -0.26214400000000000000e6 +4139 2 26 32 0.65536000000000000000e5 +4139 3 2 47 -0.65536000000000000000e5 +4139 3 9 38 -0.13107200000000000000e6 +4139 3 24 37 -0.13107200000000000000e6 +4139 3 25 38 0.65536000000000000000e5 +4139 3 27 40 -0.39321600000000000000e6 +4139 4 2 30 -0.13107200000000000000e6 +4139 4 4 32 0.13107200000000000000e6 +4139 4 16 28 -0.65536000000000000000e5 +4139 4 16 32 0.65536000000000000000e5 +4139 4 17 29 -0.13107200000000000000e6 +4140 1 1 48 -0.65536000000000000000e5 +4140 1 2 49 -0.65536000000000000000e5 +4140 1 6 53 -0.13107200000000000000e6 +4140 1 8 39 -0.26214400000000000000e6 +4140 1 9 40 -0.26214400000000000000e6 +4140 1 10 41 0.52428800000000000000e6 +4140 1 12 43 0.52428800000000000000e6 +4140 1 22 53 0.65536000000000000000e5 +4140 1 23 38 -0.65536000000000000000e5 +4140 1 24 55 0.13107200000000000000e6 +4140 1 25 40 0.13107200000000000000e6 +4140 1 26 41 0.13107200000000000000e6 +4140 1 28 43 -0.26214400000000000000e6 +4140 1 32 47 -0.52428800000000000000e6 +4140 1 37 52 -0.26214400000000000000e6 +4140 1 40 47 -0.65536000000000000000e5 +4140 2 2 32 -0.65536000000000000000e5 +4140 2 3 33 -0.65536000000000000000e5 +4140 2 16 30 -0.13107200000000000000e6 +4140 2 20 34 -0.26214400000000000000e6 +4140 2 26 32 0.65536000000000000000e5 +4140 3 9 38 -0.26214400000000000000e6 +4140 3 22 35 -0.52428800000000000000e6 +4140 3 22 51 -0.26214400000000000000e6 +4140 3 24 37 -0.13107200000000000000e6 +4140 3 27 40 -0.26214400000000000000e6 +4140 3 28 41 -0.52428800000000000000e6 +4140 4 2 30 -0.26214400000000000000e6 +4140 4 4 32 0.13107200000000000000e6 +4140 4 6 34 -0.26214400000000000000e6 +4140 4 16 28 -0.65536000000000000000e5 +4140 4 16 33 0.65536000000000000000e5 +4140 4 17 29 -0.13107200000000000000e6 +4140 4 20 32 -0.13107200000000000000e6 +4141 4 16 34 0.65536000000000000000e5 +4141 4 20 32 -0.65536000000000000000e5 +4142 1 1 48 0.65536000000000000000e5 +4142 1 2 49 0.65536000000000000000e5 +4142 1 6 53 0.13107200000000000000e6 +4142 1 8 39 0.26214400000000000000e6 +4142 1 9 40 0.26214400000000000000e6 +4142 1 10 41 -0.52428800000000000000e6 +4142 1 12 43 -0.52428800000000000000e6 +4142 1 22 53 -0.65536000000000000000e5 +4142 1 23 38 0.65536000000000000000e5 +4142 1 24 55 -0.13107200000000000000e6 +4142 1 25 40 -0.13107200000000000000e6 +4142 1 26 41 -0.13107200000000000000e6 +4142 1 28 43 0.26214400000000000000e6 +4142 1 32 47 0.52428800000000000000e6 +4142 1 37 52 0.26214400000000000000e6 +4142 1 40 47 0.65536000000000000000e5 +4142 2 2 32 0.65536000000000000000e5 +4142 2 16 30 0.13107200000000000000e6 +4142 2 20 34 0.26214400000000000000e6 +4142 2 26 32 -0.65536000000000000000e5 +4142 2 32 32 0.13107200000000000000e6 +4142 3 9 38 0.26214400000000000000e6 +4142 3 22 35 0.52428800000000000000e6 +4142 3 22 51 0.26214400000000000000e6 +4142 3 24 37 0.13107200000000000000e6 +4142 3 27 40 0.26214400000000000000e6 +4142 3 28 41 0.52428800000000000000e6 +4142 4 2 30 0.26214400000000000000e6 +4142 4 4 32 -0.13107200000000000000e6 +4142 4 6 34 0.26214400000000000000e6 +4142 4 16 28 0.13107200000000000000e6 +4142 4 16 35 0.65536000000000000000e5 +4142 4 17 29 0.13107200000000000000e6 +4142 4 20 32 0.13107200000000000000e6 +4143 1 1 40 0.32768000000000000000e5 +4143 1 6 37 0.32768000000000000000e5 +4143 1 9 40 0.65536000000000000000e5 +4143 1 10 41 -0.13107200000000000000e6 +4143 1 23 38 -0.32768000000000000000e5 +4143 1 24 39 -0.32768000000000000000e5 +4143 1 26 41 -0.65536000000000000000e5 +4143 1 32 47 0.13107200000000000000e6 +4143 3 2 39 0.32768000000000000000e5 +4143 3 9 38 0.65536000000000000000e5 +4143 3 28 41 0.13107200000000000000e6 +4143 4 2 30 0.65536000000000000000e5 +4143 4 17 17 0.65536000000000000000e5 +4144 1 6 37 0.65536000000000000000e5 +4144 1 24 39 -0.65536000000000000000e5 +4144 3 2 39 0.65536000000000000000e5 +4144 3 3 40 0.65536000000000000000e5 +4144 3 9 38 -0.13107200000000000000e6 +4144 4 17 18 0.65536000000000000000e5 +4145 1 1 48 0.65536000000000000000e5 +4145 1 2 49 0.13107200000000000000e6 +4145 1 8 39 0.13107200000000000000e6 +4145 1 9 40 0.13107200000000000000e6 +4145 1 10 41 -0.26214400000000000000e6 +4145 1 12 43 -0.52428800000000000000e6 +4145 1 23 38 0.65536000000000000000e5 +4145 1 25 40 -0.65536000000000000000e5 +4145 1 28 43 0.26214400000000000000e6 +4145 1 32 47 0.52428800000000000000e6 +4145 2 2 32 0.65536000000000000000e5 +4145 2 3 33 0.65536000000000000000e5 +4145 2 5 27 -0.65536000000000000000e5 +4145 2 16 30 0.13107200000000000000e6 +4145 2 20 34 0.26214400000000000000e6 +4145 3 9 38 0.13107200000000000000e6 +4145 3 22 35 0.52428800000000000000e6 +4145 3 28 41 0.52428800000000000000e6 +4145 4 2 30 0.13107200000000000000e6 +4145 4 6 34 0.26214400000000000000e6 +4145 4 17 19 0.65536000000000000000e5 +4146 1 9 40 -0.65536000000000000000e5 +4146 1 10 41 0.13107200000000000000e6 +4146 1 11 42 -0.13107200000000000000e6 +4146 1 26 41 0.65536000000000000000e5 +4146 1 32 47 -0.13107200000000000000e6 +4146 1 33 48 0.13107200000000000000e6 +4146 2 12 26 0.13107200000000000000e6 +4146 2 20 34 -0.13107200000000000000e6 +4146 3 8 37 0.65536000000000000000e5 +4146 3 13 42 0.26214400000000000000e6 +4146 3 22 35 -0.26214400000000000000e6 +4146 3 28 41 -0.13107200000000000000e6 +4146 3 29 42 0.13107200000000000000e6 +4146 4 2 30 -0.65536000000000000000e5 +4146 4 3 31 -0.13107200000000000000e6 +4146 4 6 34 -0.13107200000000000000e6 +4146 4 17 20 0.65536000000000000000e5 +4147 4 2 30 -0.65536000000000000000e5 +4147 4 17 21 0.65536000000000000000e5 +4148 1 9 40 0.65536000000000000000e5 +4148 1 10 41 0.13107200000000000000e6 +4148 1 11 42 0.13107200000000000000e6 +4148 1 26 41 -0.65536000000000000000e5 +4148 1 32 47 -0.13107200000000000000e6 +4148 1 33 48 -0.13107200000000000000e6 +4148 3 9 38 0.65536000000000000000e5 +4148 3 10 39 0.65536000000000000000e5 +4148 3 13 42 -0.26214400000000000000e6 +4148 3 28 41 -0.13107200000000000000e6 +4148 3 29 42 -0.13107200000000000000e6 +4148 4 3 31 0.13107200000000000000e6 +4148 4 17 22 0.65536000000000000000e5 +4149 2 12 26 -0.65536000000000000000e5 +4149 2 20 34 0.65536000000000000000e5 +4149 4 6 34 0.65536000000000000000e5 +4149 4 17 23 0.65536000000000000000e5 +4150 4 3 31 -0.65536000000000000000e5 +4150 4 17 24 0.65536000000000000000e5 +4151 4 14 26 -0.65536000000000000000e5 +4151 4 17 25 0.65536000000000000000e5 +4152 1 6 53 0.13107200000000000000e6 +4152 1 25 40 -0.13107200000000000000e6 +4152 3 2 47 0.65536000000000000000e5 +4152 3 24 37 0.13107200000000000000e6 +4152 3 25 38 -0.65536000000000000000e5 +4152 3 27 40 0.39321600000000000000e6 +4152 3 28 41 -0.26214400000000000000e6 +4152 4 4 32 -0.13107200000000000000e6 +4152 4 16 28 0.65536000000000000000e5 +4152 4 17 26 0.65536000000000000000e5 +4152 4 17 29 0.13107200000000000000e6 +4153 4 16 28 -0.65536000000000000000e5 +4153 4 17 27 0.65536000000000000000e5 +4154 4 4 32 -0.65536000000000000000e5 +4154 4 17 28 0.65536000000000000000e5 +4155 2 4 34 -0.65536000000000000000e5 +4155 2 21 35 0.65536000000000000000e5 +4155 4 7 35 0.65536000000000000000e5 +4155 4 17 30 0.65536000000000000000e5 +4156 4 17 31 0.65536000000000000000e5 +4156 4 23 27 -0.65536000000000000000e5 +4157 1 1 48 -0.65536000000000000000e5 +4157 1 2 49 -0.65536000000000000000e5 +4157 1 6 53 -0.13107200000000000000e6 +4157 1 8 39 -0.26214400000000000000e6 +4157 1 9 40 -0.26214400000000000000e6 +4157 1 10 41 0.52428800000000000000e6 +4157 1 12 43 0.52428800000000000000e6 +4157 1 22 53 0.65536000000000000000e5 +4157 1 23 38 -0.65536000000000000000e5 +4157 1 24 55 0.13107200000000000000e6 +4157 1 25 40 0.13107200000000000000e6 +4157 1 26 41 0.13107200000000000000e6 +4157 1 28 43 -0.26214400000000000000e6 +4157 1 32 47 -0.52428800000000000000e6 +4157 1 37 52 -0.26214400000000000000e6 +4157 1 40 47 -0.65536000000000000000e5 +4157 2 2 32 -0.65536000000000000000e5 +4157 2 3 33 -0.65536000000000000000e5 +4157 2 16 30 -0.13107200000000000000e6 +4157 2 20 34 -0.26214400000000000000e6 +4157 2 26 32 0.65536000000000000000e5 +4157 3 9 38 -0.26214400000000000000e6 +4157 3 22 35 -0.52428800000000000000e6 +4157 3 22 51 -0.26214400000000000000e6 +4157 3 24 37 -0.13107200000000000000e6 +4157 3 27 40 -0.26214400000000000000e6 +4157 3 28 41 -0.52428800000000000000e6 +4157 4 2 30 -0.26214400000000000000e6 +4157 4 4 32 0.13107200000000000000e6 +4157 4 6 34 -0.26214400000000000000e6 +4157 4 16 28 -0.65536000000000000000e5 +4157 4 17 29 -0.13107200000000000000e6 +4157 4 17 32 0.65536000000000000000e5 +4157 4 20 32 -0.13107200000000000000e6 +4158 1 1 48 -0.65536000000000000000e5 +4158 1 2 49 -0.13107200000000000000e6 +4158 1 8 39 -0.13107200000000000000e6 +4158 1 9 40 -0.13107200000000000000e6 +4158 1 10 41 0.26214400000000000000e6 +4158 1 12 43 0.52428800000000000000e6 +4158 1 23 38 -0.65536000000000000000e5 +4158 1 23 54 -0.65536000000000000000e5 +4158 1 24 55 0.13107200000000000000e6 +4158 1 25 40 0.65536000000000000000e5 +4158 1 25 56 -0.65536000000000000000e5 +4158 1 28 43 -0.26214400000000000000e6 +4158 1 32 47 -0.52428800000000000000e6 +4158 1 40 47 -0.65536000000000000000e5 +4158 2 2 32 -0.65536000000000000000e5 +4158 2 3 33 -0.65536000000000000000e5 +4158 2 16 30 -0.13107200000000000000e6 +4158 2 20 34 -0.26214400000000000000e6 +4158 3 9 38 -0.13107200000000000000e6 +4158 3 22 35 -0.52428800000000000000e6 +4158 3 24 53 0.65536000000000000000e5 +4158 3 25 54 0.65536000000000000000e5 +4158 3 28 41 -0.52428800000000000000e6 +4158 3 38 51 -0.13107200000000000000e6 +4158 4 2 30 -0.13107200000000000000e6 +4158 4 4 32 0.65536000000000000000e5 +4158 4 6 34 -0.26214400000000000000e6 +4158 4 17 33 0.65536000000000000000e5 +4158 4 28 32 0.65536000000000000000e5 +4159 4 7 35 -0.65536000000000000000e5 +4159 4 17 34 0.65536000000000000000e5 +4160 1 23 54 0.65536000000000000000e5 +4160 1 24 55 -0.13107200000000000000e6 +4160 1 38 53 -0.65536000000000000000e5 +4160 1 41 56 0.13107200000000000000e6 +4160 3 25 54 -0.65536000000000000000e5 +4160 3 27 56 0.13107200000000000000e6 +4160 3 38 51 0.13107200000000000000e6 +4160 4 17 35 0.65536000000000000000e5 +4160 4 28 32 -0.65536000000000000000e5 +4161 1 1 48 0.32768000000000000000e5 +4161 1 2 49 0.65536000000000000000e5 +4161 1 8 39 0.65536000000000000000e5 +4161 1 9 40 0.65536000000000000000e5 +4161 1 10 41 -0.13107200000000000000e6 +4161 1 12 43 -0.26214400000000000000e6 +4161 1 23 38 0.32768000000000000000e5 +4161 1 25 40 -0.32768000000000000000e5 +4161 1 28 43 0.13107200000000000000e6 +4161 1 32 47 0.26214400000000000000e6 +4161 2 2 32 0.32768000000000000000e5 +4161 2 3 33 0.32768000000000000000e5 +4161 2 5 27 -0.32768000000000000000e5 +4161 2 16 30 0.65536000000000000000e5 +4161 2 20 34 0.13107200000000000000e6 +4161 3 9 38 0.65536000000000000000e5 +4161 3 22 35 0.26214400000000000000e6 +4161 3 28 41 0.26214400000000000000e6 +4161 4 2 30 0.65536000000000000000e5 +4161 4 6 34 0.13107200000000000000e6 +4161 4 18 18 0.65536000000000000000e5 +4162 1 1 40 0.65536000000000000000e5 +4162 1 2 33 -0.52428800000000000000e6 +4162 1 6 53 0.65536000000000000000e5 +4162 1 9 40 0.26214400000000000000e6 +4162 1 10 25 -0.26214400000000000000e6 +4162 1 11 42 0.52428800000000000000e6 +4162 1 12 43 0.10485760000000000000e7 +4162 1 23 38 -0.65536000000000000000e5 +4162 1 25 40 -0.65536000000000000000e5 +4162 1 28 43 -0.52428800000000000000e6 +4162 1 32 47 -0.52428800000000000000e6 +4162 1 33 48 -0.52428800000000000000e6 +4162 2 2 32 -0.65536000000000000000e5 +4162 2 3 17 0.65536000000000000000e5 +4162 2 5 19 -0.65536000000000000000e5 +4162 2 5 35 0.65536000000000000000e5 +4162 2 12 26 -0.52428800000000000000e6 +4162 3 1 30 0.26214400000000000000e6 +4162 3 1 38 0.65536000000000000000e5 +4162 3 2 23 0.65536000000000000000e5 +4162 3 2 39 0.65536000000000000000e5 +4162 3 3 32 -0.26214400000000000000e6 +4162 3 5 26 -0.65536000000000000000e5 +4162 3 5 50 0.13107200000000000000e6 +4162 3 8 37 -0.13107200000000000000e6 +4162 3 13 42 -0.10485760000000000000e7 +4162 3 14 27 0.52428800000000000000e6 +4162 3 25 38 -0.65536000000000000000e5 +4162 3 26 39 -0.65536000000000000000e5 +4162 3 28 41 -0.52428800000000000000e6 +4162 3 29 42 -0.52428800000000000000e6 +4162 4 3 31 0.52428800000000000000e6 +4162 4 4 16 -0.65536000000000000000e5 +4162 4 5 17 0.65536000000000000000e5 +4162 4 6 18 0.13107200000000000000e6 +4162 4 7 19 -0.13107200000000000000e6 +4162 4 8 20 -0.26214400000000000000e6 +4162 4 18 19 0.65536000000000000000e5 +4163 4 2 30 -0.65536000000000000000e5 +4163 4 18 20 0.65536000000000000000e5 +4164 1 9 40 0.65536000000000000000e5 +4164 1 10 41 0.13107200000000000000e6 +4164 1 11 42 0.13107200000000000000e6 +4164 1 26 41 -0.65536000000000000000e5 +4164 1 32 47 -0.13107200000000000000e6 +4164 1 33 48 -0.13107200000000000000e6 +4164 3 9 38 0.65536000000000000000e5 +4164 3 10 39 0.65536000000000000000e5 +4164 3 13 42 -0.26214400000000000000e6 +4164 3 28 41 -0.13107200000000000000e6 +4164 3 29 42 -0.13107200000000000000e6 +4164 4 3 31 0.13107200000000000000e6 +4164 4 18 21 0.65536000000000000000e5 +4165 4 3 31 -0.65536000000000000000e5 +4165 4 18 23 0.65536000000000000000e5 +4166 1 10 41 -0.65536000000000000000e5 +4166 1 14 45 -0.26214400000000000000e6 +4166 1 17 48 0.13107200000000000000e6 +4166 1 18 49 0.13107200000000000000e6 +4166 1 26 33 0.65536000000000000000e5 +4166 1 32 47 0.65536000000000000000e5 +4166 1 33 40 -0.65536000000000000000e5 +4166 1 34 49 0.13107200000000000000e6 +4166 2 14 28 0.13107200000000000000e6 +4166 3 13 42 0.26214400000000000000e6 +4166 3 14 43 0.13107200000000000000e6 +4166 3 18 47 0.13107200000000000000e6 +4166 3 28 41 0.65536000000000000000e5 +4166 4 3 31 -0.65536000000000000000e5 +4166 4 18 24 0.65536000000000000000e5 +4167 1 14 45 0.26214400000000000000e6 +4167 1 17 48 -0.13107200000000000000e6 +4167 1 18 49 -0.13107200000000000000e6 +4167 1 34 49 -0.13107200000000000000e6 +4167 2 14 28 -0.13107200000000000000e6 +4167 3 14 43 -0.65536000000000000000e5 +4167 3 15 44 0.13107200000000000000e6 +4167 3 16 45 -0.26214400000000000000e6 +4167 3 18 47 -0.13107200000000000000e6 +4167 3 22 35 0.65536000000000000000e5 +4167 4 14 26 0.65536000000000000000e5 +4167 4 15 27 0.13107200000000000000e6 +4167 4 18 25 0.65536000000000000000e5 +4168 4 16 28 -0.65536000000000000000e5 +4168 4 18 26 0.65536000000000000000e5 +4169 4 4 32 -0.65536000000000000000e5 +4169 4 18 27 0.65536000000000000000e5 +4170 1 6 53 -0.65536000000000000000e5 +4170 1 25 40 0.65536000000000000000e5 +4170 3 5 50 -0.13107200000000000000e6 +4170 3 25 38 0.65536000000000000000e5 +4170 3 26 39 0.65536000000000000000e5 +4170 4 18 28 0.65536000000000000000e5 +4171 2 4 34 -0.65536000000000000000e5 +4171 2 21 35 0.65536000000000000000e5 +4171 4 7 35 0.65536000000000000000e5 +4171 4 18 29 0.65536000000000000000e5 +4172 1 6 53 0.16384000000000000000e5 +4172 1 25 40 -0.16384000000000000000e5 +4172 2 4 34 0.32768000000000000000e5 +4172 2 21 35 -0.32768000000000000000e5 +4172 3 5 50 0.32768000000000000000e5 +4172 3 14 51 0.13107200000000000000e6 +4172 3 18 47 -0.13107200000000000000e6 +4172 3 24 37 0.16384000000000000000e5 +4172 3 27 40 0.65536000000000000000e5 +4172 3 30 43 -0.65536000000000000000e5 +4172 4 4 32 -0.16384000000000000000e5 +4172 4 7 35 -0.32768000000000000000e5 +4172 4 16 28 0.16384000000000000000e5 +4172 4 18 31 0.65536000000000000000e5 +4172 4 19 31 -0.65536000000000000000e5 +4173 1 1 48 -0.65536000000000000000e5 +4173 1 2 49 -0.13107200000000000000e6 +4173 1 8 39 -0.13107200000000000000e6 +4173 1 9 40 -0.13107200000000000000e6 +4173 1 10 41 0.26214400000000000000e6 +4173 1 12 43 0.52428800000000000000e6 +4173 1 23 38 -0.65536000000000000000e5 +4173 1 23 54 -0.65536000000000000000e5 +4173 1 24 55 0.13107200000000000000e6 +4173 1 25 40 0.65536000000000000000e5 +4173 1 25 56 -0.65536000000000000000e5 +4173 1 28 43 -0.26214400000000000000e6 +4173 1 32 47 -0.52428800000000000000e6 +4173 1 40 47 -0.65536000000000000000e5 +4173 2 2 32 -0.65536000000000000000e5 +4173 2 3 33 -0.65536000000000000000e5 +4173 2 16 30 -0.13107200000000000000e6 +4173 2 20 34 -0.26214400000000000000e6 +4173 3 9 38 -0.13107200000000000000e6 +4173 3 22 35 -0.52428800000000000000e6 +4173 3 24 53 0.65536000000000000000e5 +4173 3 25 54 0.65536000000000000000e5 +4173 3 28 41 -0.52428800000000000000e6 +4173 3 38 51 -0.13107200000000000000e6 +4173 4 2 30 -0.13107200000000000000e6 +4173 4 4 32 0.65536000000000000000e5 +4173 4 6 34 -0.26214400000000000000e6 +4173 4 18 32 0.65536000000000000000e5 +4173 4 28 32 0.65536000000000000000e5 +4174 1 1 48 -0.65536000000000000000e5 +4174 1 2 49 -0.13107200000000000000e6 +4174 1 6 53 0.65536000000000000000e5 +4174 1 8 39 -0.13107200000000000000e6 +4174 1 9 40 -0.13107200000000000000e6 +4174 1 10 41 0.26214400000000000000e6 +4174 1 12 43 0.52428800000000000000e6 +4174 1 23 38 -0.65536000000000000000e5 +4174 1 24 39 -0.65536000000000000000e5 +4174 1 24 55 -0.13107200000000000000e6 +4174 1 25 56 -0.65536000000000000000e5 +4174 1 26 41 0.26214400000000000000e6 +4174 1 28 43 -0.26214400000000000000e6 +4174 1 32 47 -0.52428800000000000000e6 +4174 1 40 47 -0.65536000000000000000e5 +4174 2 2 32 -0.65536000000000000000e5 +4174 2 3 33 -0.65536000000000000000e5 +4174 2 16 30 -0.13107200000000000000e6 +4174 2 20 34 -0.26214400000000000000e6 +4174 3 9 38 -0.13107200000000000000e6 +4174 3 22 35 -0.52428800000000000000e6 +4174 3 22 51 0.13107200000000000000e6 +4174 3 23 52 -0.26214400000000000000e6 +4174 3 24 53 0.65536000000000000000e5 +4174 3 25 38 -0.65536000000000000000e5 +4174 3 25 54 0.65536000000000000000e5 +4174 3 27 40 -0.13107200000000000000e6 +4174 3 28 41 -0.52428800000000000000e6 +4174 3 38 51 -0.13107200000000000000e6 +4174 3 39 40 0.65536000000000000000e5 +4174 4 2 30 -0.13107200000000000000e6 +4174 4 6 34 -0.26214400000000000000e6 +4174 4 7 35 0.13107200000000000000e6 +4174 4 18 33 0.65536000000000000000e5 +4174 4 28 32 0.65536000000000000000e5 +4175 4 18 34 0.65536000000000000000e5 +4175 4 21 33 -0.65536000000000000000e5 +4176 4 18 35 0.65536000000000000000e5 +4176 4 28 32 -0.65536000000000000000e5 +4177 1 9 40 0.65536000000000000000e5 +4177 1 10 41 0.13107200000000000000e6 +4177 1 11 42 0.13107200000000000000e6 +4177 1 26 41 -0.65536000000000000000e5 +4177 1 32 47 -0.13107200000000000000e6 +4177 1 33 48 -0.13107200000000000000e6 +4177 3 9 38 0.65536000000000000000e5 +4177 3 10 39 0.65536000000000000000e5 +4177 3 13 42 -0.26214400000000000000e6 +4177 3 28 41 -0.13107200000000000000e6 +4177 3 29 42 -0.13107200000000000000e6 +4177 4 3 31 0.13107200000000000000e6 +4177 4 19 20 0.65536000000000000000e5 +4178 4 18 22 -0.65536000000000000000e5 +4178 4 19 21 0.65536000000000000000e5 +4179 1 9 40 -0.65536000000000000000e5 +4179 1 11 42 0.13107200000000000000e6 +4179 1 26 33 -0.13107200000000000000e6 +4179 1 26 41 0.65536000000000000000e5 +4179 1 33 40 0.13107200000000000000e6 +4179 1 33 48 -0.13107200000000000000e6 +4179 3 11 40 0.65536000000000000000e5 +4179 3 29 42 -0.13107200000000000000e6 +4179 4 18 22 -0.65536000000000000000e5 +4179 4 19 22 0.65536000000000000000e5 +4180 1 10 41 -0.65536000000000000000e5 +4180 1 14 45 -0.26214400000000000000e6 +4180 1 17 48 0.13107200000000000000e6 +4180 1 18 49 0.13107200000000000000e6 +4180 1 26 33 0.65536000000000000000e5 +4180 1 32 47 0.65536000000000000000e5 +4180 1 33 40 -0.65536000000000000000e5 +4180 1 34 49 0.13107200000000000000e6 +4180 2 14 28 0.13107200000000000000e6 +4180 3 13 42 0.26214400000000000000e6 +4180 3 14 43 0.13107200000000000000e6 +4180 3 18 47 0.13107200000000000000e6 +4180 3 28 41 0.65536000000000000000e5 +4180 4 3 31 -0.65536000000000000000e5 +4180 4 19 23 0.65536000000000000000e5 +4181 4 19 24 0.65536000000000000000e5 +4181 4 22 22 -0.13107200000000000000e6 +4182 1 14 45 0.13107200000000000000e6 +4182 1 17 48 -0.65536000000000000000e5 +4182 1 18 49 -0.65536000000000000000e5 +4182 1 34 49 -0.65536000000000000000e5 +4182 2 14 28 -0.65536000000000000000e5 +4182 3 13 42 -0.65536000000000000000e5 +4182 3 15 44 -0.13107200000000000000e6 +4182 3 18 47 -0.65536000000000000000e5 +4182 3 26 35 0.65536000000000000000e5 +4182 4 19 25 0.65536000000000000000e5 +4183 4 4 32 -0.65536000000000000000e5 +4183 4 19 26 0.65536000000000000000e5 +4184 1 6 53 -0.65536000000000000000e5 +4184 1 25 40 0.65536000000000000000e5 +4184 3 5 50 -0.13107200000000000000e6 +4184 3 25 38 0.65536000000000000000e5 +4184 3 26 39 0.65536000000000000000e5 +4184 4 19 27 0.65536000000000000000e5 +4185 4 5 33 -0.65536000000000000000e5 +4185 4 19 28 0.65536000000000000000e5 +4186 4 18 30 -0.65536000000000000000e5 +4186 4 19 29 0.65536000000000000000e5 +4187 3 6 51 0.65536000000000000000e5 +4187 3 14 51 -0.26214400000000000000e6 +4187 3 27 40 -0.65536000000000000000e5 +4187 3 29 42 0.26214400000000000000e6 +4187 3 30 43 0.13107200000000000000e6 +4187 4 18 30 -0.65536000000000000000e5 +4187 4 19 30 0.65536000000000000000e5 +4187 4 19 31 0.13107200000000000000e6 +4188 1 1 48 -0.65536000000000000000e5 +4188 1 2 49 -0.13107200000000000000e6 +4188 1 6 53 0.65536000000000000000e5 +4188 1 8 39 -0.13107200000000000000e6 +4188 1 9 40 -0.13107200000000000000e6 +4188 1 10 41 0.26214400000000000000e6 +4188 1 12 43 0.52428800000000000000e6 +4188 1 23 38 -0.65536000000000000000e5 +4188 1 24 39 -0.65536000000000000000e5 +4188 1 24 55 -0.13107200000000000000e6 +4188 1 25 56 -0.65536000000000000000e5 +4188 1 26 41 0.26214400000000000000e6 +4188 1 28 43 -0.26214400000000000000e6 +4188 1 32 47 -0.52428800000000000000e6 +4188 1 40 47 -0.65536000000000000000e5 +4188 2 2 32 -0.65536000000000000000e5 +4188 2 3 33 -0.65536000000000000000e5 +4188 2 16 30 -0.13107200000000000000e6 +4188 2 20 34 -0.26214400000000000000e6 +4188 3 9 38 -0.13107200000000000000e6 +4188 3 22 35 -0.52428800000000000000e6 +4188 3 22 51 0.13107200000000000000e6 +4188 3 23 52 -0.26214400000000000000e6 +4188 3 24 53 0.65536000000000000000e5 +4188 3 25 38 -0.65536000000000000000e5 +4188 3 25 54 0.65536000000000000000e5 +4188 3 27 40 -0.13107200000000000000e6 +4188 3 28 41 -0.52428800000000000000e6 +4188 3 38 51 -0.13107200000000000000e6 +4188 3 39 40 0.65536000000000000000e5 +4188 4 2 30 -0.13107200000000000000e6 +4188 4 6 34 -0.26214400000000000000e6 +4188 4 7 35 0.13107200000000000000e6 +4188 4 19 32 0.65536000000000000000e5 +4188 4 28 32 0.65536000000000000000e5 +4189 4 19 33 0.65536000000000000000e5 +4189 4 28 28 -0.13107200000000000000e6 +4190 1 24 55 0.65536000000000000000e5 +4190 1 26 41 -0.65536000000000000000e5 +4190 3 6 55 0.65536000000000000000e5 +4190 3 10 55 -0.26214400000000000000e6 +4190 3 27 40 0.65536000000000000000e5 +4190 3 35 48 0.26214400000000000000e6 +4190 3 40 45 -0.13107200000000000000e6 +4190 4 19 34 0.65536000000000000000e5 +4190 4 21 33 -0.65536000000000000000e5 +4190 4 22 34 -0.13107200000000000000e6 +4191 1 9 40 -0.16384000000000000000e5 +4191 1 10 41 0.65536000000000000000e5 +4191 1 11 42 0.32768000000000000000e5 +4191 1 26 41 0.16384000000000000000e5 +4191 1 32 47 -0.65536000000000000000e5 +4191 1 33 48 -0.32768000000000000000e5 +4191 2 12 26 -0.32768000000000000000e5 +4191 2 20 34 0.32768000000000000000e5 +4191 3 8 37 0.16384000000000000000e5 +4191 3 9 38 -0.16384000000000000000e5 +4191 3 12 41 -0.65536000000000000000e5 +4191 3 13 42 -0.65536000000000000000e5 +4191 3 22 27 0.16384000000000000000e5 +4191 3 22 35 0.65536000000000000000e5 +4191 3 28 41 -0.65536000000000000000e5 +4191 3 29 42 -0.32768000000000000000e5 +4191 4 1 29 0.16384000000000000000e5 +4191 4 2 30 -0.16384000000000000000e5 +4191 4 3 31 0.32768000000000000000e5 +4191 4 6 34 0.32768000000000000000e5 +4191 4 20 20 0.65536000000000000000e5 +4192 2 12 26 -0.65536000000000000000e5 +4192 2 20 34 0.65536000000000000000e5 +4192 4 6 34 0.65536000000000000000e5 +4192 4 20 21 0.65536000000000000000e5 +4193 4 3 31 -0.65536000000000000000e5 +4193 4 20 22 0.65536000000000000000e5 +4194 1 13 44 -0.13107200000000000000e6 +4194 1 34 41 0.13107200000000000000e6 +4194 3 12 41 0.65536000000000000000e5 +4194 3 13 42 0.65536000000000000000e5 +4194 3 22 35 0.65536000000000000000e5 +4194 4 20 23 0.65536000000000000000e5 +4195 4 14 26 -0.65536000000000000000e5 +4195 4 20 24 0.65536000000000000000e5 +4196 1 3 18 -0.32768000000000000000e5 +4196 1 4 19 0.65536000000000000000e5 +4196 1 5 36 0.65536000000000000000e5 +4196 1 12 43 0.32768000000000000000e5 +4196 1 14 45 -0.65536000000000000000e5 +4196 1 17 32 -0.13107200000000000000e6 +4196 1 19 50 0.13107200000000000000e6 +4196 1 34 41 -0.65536000000000000000e5 +4196 3 3 16 -0.32768000000000000000e5 +4196 3 4 17 -0.32768000000000000000e5 +4196 3 14 27 0.32768000000000000000e5 +4196 3 15 44 -0.65536000000000000000e5 +4196 3 16 29 0.65536000000000000000e5 +4196 3 16 45 0.13107200000000000000e6 +4196 4 2 14 -0.32768000000000000000e5 +4196 4 11 23 0.65536000000000000000e5 +4196 4 15 27 -0.65536000000000000000e5 +4196 4 20 25 0.65536000000000000000e5 +4197 2 16 30 -0.65536000000000000000e5 +4197 2 16 34 0.65536000000000000000e5 +4197 4 20 26 0.65536000000000000000e5 +4198 4 17 29 -0.65536000000000000000e5 +4198 4 20 27 0.65536000000000000000e5 +4199 2 4 34 -0.65536000000000000000e5 +4199 2 21 35 0.65536000000000000000e5 +4199 4 7 35 0.65536000000000000000e5 +4199 4 20 28 0.65536000000000000000e5 +4200 4 6 34 -0.65536000000000000000e5 +4200 4 20 29 0.65536000000000000000e5 +4201 4 20 30 0.65536000000000000000e5 +4201 4 23 27 -0.65536000000000000000e5 +4202 1 6 53 0.81920000000000000000e4 +4202 1 25 40 -0.81920000000000000000e4 +4202 2 4 34 0.16384000000000000000e5 +4202 2 21 35 -0.16384000000000000000e5 +4202 3 5 50 0.16384000000000000000e5 +4202 3 7 52 0.65536000000000000000e5 +4202 3 18 47 0.65536000000000000000e5 +4202 3 24 37 0.81920000000000000000e4 +4202 3 27 40 0.32768000000000000000e5 +4202 3 28 41 0.32768000000000000000e5 +4202 3 29 42 0.32768000000000000000e5 +4202 3 31 44 -0.13107200000000000000e6 +4202 4 4 32 -0.81920000000000000000e4 +4202 4 7 35 -0.16384000000000000000e5 +4202 4 16 28 0.81920000000000000000e4 +4202 4 20 31 0.65536000000000000000e5 +4202 4 23 27 0.32768000000000000000e5 +4203 4 7 35 -0.65536000000000000000e5 +4203 4 20 33 0.65536000000000000000e5 +4204 1 32 47 0.65536000000000000000e5 +4204 1 37 52 -0.65536000000000000000e5 +4204 3 10 55 -0.65536000000000000000e5 +4204 3 23 52 0.65536000000000000000e5 +4204 3 34 47 -0.13107200000000000000e6 +4204 3 35 48 0.13107200000000000000e6 +4204 3 40 45 -0.65536000000000000000e5 +4204 4 20 34 0.65536000000000000000e5 +4204 4 22 34 -0.65536000000000000000e5 +4205 1 1 48 -0.32768000000000000000e5 +4205 1 2 49 -0.32768000000000000000e5 +4205 1 8 39 -0.65536000000000000000e5 +4205 1 9 40 -0.65536000000000000000e5 +4205 1 10 41 0.13107200000000000000e6 +4205 1 12 43 0.26214400000000000000e6 +4205 1 23 38 -0.32768000000000000000e5 +4205 1 24 55 0.13107200000000000000e6 +4205 1 26 41 0.65536000000000000000e5 +4205 1 28 43 -0.26214400000000000000e6 +4205 1 32 47 -0.26214400000000000000e6 +4205 1 33 48 0.13107200000000000000e6 +4205 1 40 55 -0.65536000000000000000e5 +4205 1 41 56 -0.13107200000000000000e6 +4205 1 44 51 -0.26214400000000000000e6 +4205 1 46 53 0.26214400000000000000e6 +4205 2 2 32 -0.32768000000000000000e5 +4205 2 4 34 0.65536000000000000000e5 +4205 2 16 30 -0.65536000000000000000e5 +4205 2 20 34 -0.13107200000000000000e6 +4205 2 28 34 -0.65536000000000000000e5 +4205 3 5 50 0.65536000000000000000e5 +4205 3 9 38 -0.65536000000000000000e5 +4205 3 10 55 0.13107200000000000000e6 +4205 3 22 35 -0.26214400000000000000e6 +4205 3 22 51 -0.65536000000000000000e5 +4205 3 23 52 0.13107200000000000000e6 +4205 3 27 40 0.65536000000000000000e5 +4205 3 27 56 -0.13107200000000000000e6 +4205 3 28 41 -0.26214400000000000000e6 +4205 3 35 48 -0.26214400000000000000e6 +4205 3 37 50 0.65536000000000000000e5 +4205 3 38 51 0.13107200000000000000e6 +4205 3 39 52 0.13107200000000000000e6 +4205 3 40 45 0.13107200000000000000e6 +4205 4 2 30 -0.65536000000000000000e5 +4205 4 6 34 -0.13107200000000000000e6 +4205 4 7 35 -0.65536000000000000000e5 +4205 4 20 35 0.65536000000000000000e5 +4205 4 22 34 0.13107200000000000000e6 +4205 4 23 35 0.13107200000000000000e6 +4205 4 29 33 0.65536000000000000000e5 +4206 4 3 31 -0.32768000000000000000e5 +4206 4 21 21 0.65536000000000000000e5 +4207 1 10 41 -0.65536000000000000000e5 +4207 1 14 45 -0.26214400000000000000e6 +4207 1 17 48 0.13107200000000000000e6 +4207 1 18 49 0.13107200000000000000e6 +4207 1 26 33 0.65536000000000000000e5 +4207 1 32 47 0.65536000000000000000e5 +4207 1 33 40 -0.65536000000000000000e5 +4207 1 34 49 0.13107200000000000000e6 +4207 2 14 28 0.13107200000000000000e6 +4207 3 13 42 0.26214400000000000000e6 +4207 3 14 43 0.13107200000000000000e6 +4207 3 18 47 0.13107200000000000000e6 +4207 3 28 41 0.65536000000000000000e5 +4207 4 3 31 -0.65536000000000000000e5 +4207 4 21 22 0.65536000000000000000e5 +4208 4 14 26 -0.65536000000000000000e5 +4208 4 21 23 0.65536000000000000000e5 +4209 1 14 45 0.26214400000000000000e6 +4209 1 17 48 -0.13107200000000000000e6 +4209 1 18 49 -0.13107200000000000000e6 +4209 1 34 49 -0.13107200000000000000e6 +4209 2 14 28 -0.13107200000000000000e6 +4209 3 14 43 -0.65536000000000000000e5 +4209 3 15 44 0.13107200000000000000e6 +4209 3 16 45 -0.26214400000000000000e6 +4209 3 18 47 -0.13107200000000000000e6 +4209 3 22 35 0.65536000000000000000e5 +4209 4 14 26 0.65536000000000000000e5 +4209 4 15 27 0.13107200000000000000e6 +4209 4 21 24 0.65536000000000000000e5 +4210 4 15 27 -0.65536000000000000000e5 +4210 4 21 25 0.65536000000000000000e5 +4211 4 17 29 -0.65536000000000000000e5 +4211 4 21 26 0.65536000000000000000e5 +4212 2 4 34 -0.65536000000000000000e5 +4212 2 21 35 0.65536000000000000000e5 +4212 4 7 35 0.65536000000000000000e5 +4212 4 21 27 0.65536000000000000000e5 +4213 4 18 30 -0.65536000000000000000e5 +4213 4 21 28 0.65536000000000000000e5 +4214 4 21 29 0.65536000000000000000e5 +4214 4 23 27 -0.65536000000000000000e5 +4215 1 6 53 0.16384000000000000000e5 +4215 1 25 40 -0.16384000000000000000e5 +4215 2 4 34 0.32768000000000000000e5 +4215 2 21 35 -0.32768000000000000000e5 +4215 3 5 50 0.32768000000000000000e5 +4215 3 14 51 0.13107200000000000000e6 +4215 3 18 47 -0.13107200000000000000e6 +4215 3 24 37 0.16384000000000000000e5 +4215 3 27 40 0.65536000000000000000e5 +4215 3 30 43 -0.65536000000000000000e5 +4215 4 4 32 -0.16384000000000000000e5 +4215 4 7 35 -0.32768000000000000000e5 +4215 4 16 28 0.16384000000000000000e5 +4215 4 19 31 -0.65536000000000000000e5 +4215 4 21 30 0.65536000000000000000e5 +4216 1 6 53 0.81920000000000000000e4 +4216 1 25 40 -0.81920000000000000000e4 +4216 2 4 34 0.16384000000000000000e5 +4216 2 21 35 -0.16384000000000000000e5 +4216 3 5 50 0.16384000000000000000e5 +4216 3 14 51 0.65536000000000000000e5 +4216 3 18 47 0.65536000000000000000e5 +4216 3 19 48 -0.13107200000000000000e6 +4216 3 24 37 0.81920000000000000000e4 +4216 3 27 40 0.32768000000000000000e5 +4216 3 28 41 0.32768000000000000000e5 +4216 3 29 42 0.32768000000000000000e5 +4216 4 4 32 -0.81920000000000000000e4 +4216 4 7 35 -0.16384000000000000000e5 +4216 4 16 28 0.81920000000000000000e4 +4216 4 21 31 0.65536000000000000000e5 +4216 4 23 27 0.32768000000000000000e5 +4217 4 7 35 -0.65536000000000000000e5 +4217 4 21 32 0.65536000000000000000e5 +4218 1 34 49 -0.13107200000000000000e6 +4218 1 44 51 0.13107200000000000000e6 +4218 3 23 52 0.65536000000000000000e5 +4218 3 35 48 0.13107200000000000000e6 +4218 3 40 45 -0.65536000000000000000e5 +4218 4 21 34 0.65536000000000000000e5 +4218 4 22 34 -0.65536000000000000000e5 +4219 4 21 35 0.65536000000000000000e5 +4219 4 29 33 -0.65536000000000000000e5 +4220 1 14 45 0.26214400000000000000e6 +4220 1 17 48 -0.13107200000000000000e6 +4220 1 18 49 -0.13107200000000000000e6 +4220 1 34 49 -0.13107200000000000000e6 +4220 2 14 28 -0.13107200000000000000e6 +4220 3 14 43 -0.65536000000000000000e5 +4220 3 15 44 0.13107200000000000000e6 +4220 3 16 45 -0.26214400000000000000e6 +4220 3 18 47 -0.13107200000000000000e6 +4220 3 22 35 0.65536000000000000000e5 +4220 4 14 26 0.65536000000000000000e5 +4220 4 15 27 0.13107200000000000000e6 +4220 4 22 23 0.65536000000000000000e5 +4221 1 14 45 0.13107200000000000000e6 +4221 1 17 48 -0.65536000000000000000e5 +4221 1 18 49 -0.65536000000000000000e5 +4221 1 34 49 -0.65536000000000000000e5 +4221 2 14 28 -0.65536000000000000000e5 +4221 3 13 42 -0.65536000000000000000e5 +4221 3 15 44 -0.13107200000000000000e6 +4221 3 18 47 -0.65536000000000000000e5 +4221 3 26 35 0.65536000000000000000e5 +4221 4 22 24 0.65536000000000000000e5 +4222 1 14 45 -0.65536000000000000000e5 +4222 1 15 46 -0.13107200000000000000e6 +4222 1 17 48 0.32768000000000000000e5 +4222 1 18 49 0.32768000000000000000e5 +4222 1 20 51 0.13107200000000000000e6 +4222 1 34 49 0.32768000000000000000e5 +4222 2 14 28 0.32768000000000000000e5 +4222 3 14 43 0.32768000000000000000e5 +4222 3 16 45 0.13107200000000000000e6 +4222 3 18 47 0.32768000000000000000e5 +4222 3 22 35 -0.32768000000000000000e5 +4222 3 30 35 0.65536000000000000000e5 +4222 4 14 26 -0.32768000000000000000e5 +4222 4 15 27 -0.65536000000000000000e5 +4222 4 22 25 0.65536000000000000000e5 +4223 2 4 34 -0.65536000000000000000e5 +4223 2 21 35 0.65536000000000000000e5 +4223 4 7 35 0.65536000000000000000e5 +4223 4 22 26 0.65536000000000000000e5 +4224 4 18 30 -0.65536000000000000000e5 +4224 4 22 27 0.65536000000000000000e5 +4225 3 6 51 0.65536000000000000000e5 +4225 3 14 51 -0.26214400000000000000e6 +4225 3 27 40 -0.65536000000000000000e5 +4225 3 29 42 0.26214400000000000000e6 +4225 3 30 43 0.13107200000000000000e6 +4225 4 18 30 -0.65536000000000000000e5 +4225 4 19 31 0.13107200000000000000e6 +4225 4 22 28 0.65536000000000000000e5 +4226 1 6 53 0.16384000000000000000e5 +4226 1 25 40 -0.16384000000000000000e5 +4226 2 4 34 0.32768000000000000000e5 +4226 2 21 35 -0.32768000000000000000e5 +4226 3 5 50 0.32768000000000000000e5 +4226 3 14 51 0.13107200000000000000e6 +4226 3 18 47 -0.13107200000000000000e6 +4226 3 24 37 0.16384000000000000000e5 +4226 3 27 40 0.65536000000000000000e5 +4226 3 30 43 -0.65536000000000000000e5 +4226 4 4 32 -0.16384000000000000000e5 +4226 4 7 35 -0.32768000000000000000e5 +4226 4 16 28 0.16384000000000000000e5 +4226 4 19 31 -0.65536000000000000000e5 +4226 4 22 29 0.65536000000000000000e5 +4227 4 19 31 -0.65536000000000000000e5 +4227 4 22 30 0.65536000000000000000e5 +4228 3 14 51 0.65536000000000000000e5 +4228 3 18 47 0.65536000000000000000e5 +4228 3 32 45 -0.13107200000000000000e6 +4228 3 35 40 0.65536000000000000000e5 +4228 4 22 31 0.65536000000000000000e5 +4229 4 21 33 -0.65536000000000000000e5 +4229 4 22 32 0.65536000000000000000e5 +4230 1 24 55 0.65536000000000000000e5 +4230 1 26 41 -0.65536000000000000000e5 +4230 3 6 55 0.65536000000000000000e5 +4230 3 10 55 -0.26214400000000000000e6 +4230 3 27 40 0.65536000000000000000e5 +4230 3 35 48 0.26214400000000000000e6 +4230 3 40 45 -0.13107200000000000000e6 +4230 4 21 33 -0.65536000000000000000e5 +4230 4 22 33 0.65536000000000000000e5 +4230 4 22 34 -0.13107200000000000000e6 +4231 1 1 48 -0.32768000000000000000e5 +4231 1 2 49 -0.32768000000000000000e5 +4231 1 8 39 -0.65536000000000000000e5 +4231 1 9 40 -0.65536000000000000000e5 +4231 1 10 41 0.13107200000000000000e6 +4231 1 12 43 0.26214400000000000000e6 +4231 1 23 38 -0.32768000000000000000e5 +4231 1 26 41 0.65536000000000000000e5 +4231 1 28 43 -0.26214400000000000000e6 +4231 1 32 47 -0.26214400000000000000e6 +4231 1 33 48 0.13107200000000000000e6 +4231 1 40 55 -0.65536000000000000000e5 +4231 2 2 32 -0.32768000000000000000e5 +4231 2 4 34 0.65536000000000000000e5 +4231 2 16 30 -0.65536000000000000000e5 +4231 2 20 34 -0.13107200000000000000e6 +4231 2 28 34 -0.65536000000000000000e5 +4231 3 5 50 0.65536000000000000000e5 +4231 3 9 38 -0.65536000000000000000e5 +4231 3 10 55 0.13107200000000000000e6 +4231 3 22 35 -0.26214400000000000000e6 +4231 3 22 51 -0.65536000000000000000e5 +4231 3 23 52 0.13107200000000000000e6 +4231 3 26 55 0.65536000000000000000e5 +4231 3 27 40 0.65536000000000000000e5 +4231 3 28 41 -0.26214400000000000000e6 +4231 3 35 48 -0.26214400000000000000e6 +4231 3 38 51 0.65536000000000000000e5 +4231 3 39 52 -0.13107200000000000000e6 +4231 3 40 45 0.13107200000000000000e6 +4231 4 2 30 -0.65536000000000000000e5 +4231 4 6 34 -0.13107200000000000000e6 +4231 4 7 35 -0.65536000000000000000e5 +4231 4 22 34 0.13107200000000000000e6 +4231 4 22 35 0.65536000000000000000e5 +4232 1 3 18 -0.16384000000000000000e5 +4232 1 4 19 0.32768000000000000000e5 +4232 1 5 36 0.32768000000000000000e5 +4232 1 12 43 0.16384000000000000000e5 +4232 1 14 45 -0.32768000000000000000e5 +4232 1 17 32 -0.65536000000000000000e5 +4232 1 19 50 0.65536000000000000000e5 +4232 1 34 41 -0.32768000000000000000e5 +4232 3 3 16 -0.16384000000000000000e5 +4232 3 4 17 -0.16384000000000000000e5 +4232 3 14 27 0.16384000000000000000e5 +4232 3 15 44 -0.32768000000000000000e5 +4232 3 16 29 0.32768000000000000000e5 +4232 3 16 45 0.65536000000000000000e5 +4232 4 2 14 -0.16384000000000000000e5 +4232 4 11 23 0.32768000000000000000e5 +4232 4 15 27 -0.32768000000000000000e5 +4232 4 23 23 0.65536000000000000000e5 +4233 4 15 27 -0.65536000000000000000e5 +4233 4 23 24 0.65536000000000000000e5 +4234 1 3 18 0.16384000000000000000e5 +4234 1 4 19 -0.32768000000000000000e5 +4234 1 5 36 -0.32768000000000000000e5 +4234 1 6 21 -0.65536000000000000000e5 +4234 1 12 43 -0.16384000000000000000e5 +4234 1 13 44 0.32768000000000000000e5 +4234 1 14 45 0.32768000000000000000e5 +4234 1 15 46 0.65536000000000000000e5 +4234 2 9 15 -0.65536000000000000000e5 +4234 2 25 31 0.65536000000000000000e5 +4234 3 3 16 0.16384000000000000000e5 +4234 3 4 17 0.16384000000000000000e5 +4234 3 7 20 0.65536000000000000000e5 +4234 3 8 21 -0.13107200000000000000e6 +4234 3 14 19 0.13107200000000000000e6 +4234 3 14 27 -0.16384000000000000000e5 +4234 3 16 29 -0.32768000000000000000e5 +4234 3 18 31 -0.65536000000000000000e5 +4234 3 19 32 0.13107200000000000000e6 +4234 4 2 14 0.16384000000000000000e5 +4234 4 10 14 0.65536000000000000000e5 +4234 4 11 23 -0.32768000000000000000e5 +4234 4 23 25 0.65536000000000000000e5 +4235 4 6 34 -0.65536000000000000000e5 +4235 4 23 26 0.65536000000000000000e5 +4236 1 6 53 0.16384000000000000000e5 +4236 1 25 40 -0.16384000000000000000e5 +4236 2 4 34 0.32768000000000000000e5 +4236 2 21 35 -0.32768000000000000000e5 +4236 3 5 50 0.32768000000000000000e5 +4236 3 14 51 0.13107200000000000000e6 +4236 3 18 47 -0.13107200000000000000e6 +4236 3 24 37 0.16384000000000000000e5 +4236 3 27 40 0.65536000000000000000e5 +4236 3 30 43 -0.65536000000000000000e5 +4236 4 4 32 -0.16384000000000000000e5 +4236 4 7 35 -0.32768000000000000000e5 +4236 4 16 28 0.16384000000000000000e5 +4236 4 19 31 -0.65536000000000000000e5 +4236 4 23 28 0.65536000000000000000e5 +4237 1 6 53 0.81920000000000000000e4 +4237 1 25 40 -0.81920000000000000000e4 +4237 2 4 34 0.16384000000000000000e5 +4237 2 21 35 -0.16384000000000000000e5 +4237 3 5 50 0.16384000000000000000e5 +4237 3 7 52 0.65536000000000000000e5 +4237 3 18 47 0.65536000000000000000e5 +4237 3 24 37 0.81920000000000000000e4 +4237 3 27 40 0.32768000000000000000e5 +4237 3 28 41 0.32768000000000000000e5 +4237 3 29 42 0.32768000000000000000e5 +4237 3 31 44 -0.13107200000000000000e6 +4237 4 4 32 -0.81920000000000000000e4 +4237 4 7 35 -0.16384000000000000000e5 +4237 4 16 28 0.81920000000000000000e4 +4237 4 23 27 0.32768000000000000000e5 +4237 4 23 29 0.65536000000000000000e5 +4238 1 6 53 0.81920000000000000000e4 +4238 1 25 40 -0.81920000000000000000e4 +4238 2 4 34 0.16384000000000000000e5 +4238 2 21 35 -0.16384000000000000000e5 +4238 3 5 50 0.16384000000000000000e5 +4238 3 14 51 0.65536000000000000000e5 +4238 3 18 47 0.65536000000000000000e5 +4238 3 19 48 -0.13107200000000000000e6 +4238 3 24 37 0.81920000000000000000e4 +4238 3 27 40 0.32768000000000000000e5 +4238 3 28 41 0.32768000000000000000e5 +4238 3 29 42 0.32768000000000000000e5 +4238 4 4 32 -0.81920000000000000000e4 +4238 4 7 35 -0.16384000000000000000e5 +4238 4 16 28 0.81920000000000000000e4 +4238 4 23 27 0.32768000000000000000e5 +4238 4 23 30 0.65536000000000000000e5 +4239 3 19 48 0.65536000000000000000e5 +4239 3 31 44 0.65536000000000000000e5 +4239 3 32 45 0.65536000000000000000e5 +4239 3 36 41 -0.13107200000000000000e6 +4239 4 23 31 0.65536000000000000000e5 +4240 1 32 47 0.65536000000000000000e5 +4240 1 37 52 -0.65536000000000000000e5 +4240 3 10 55 -0.65536000000000000000e5 +4240 3 23 52 0.65536000000000000000e5 +4240 3 34 47 -0.13107200000000000000e6 +4240 3 35 48 0.13107200000000000000e6 +4240 3 40 45 -0.65536000000000000000e5 +4240 4 22 34 -0.65536000000000000000e5 +4240 4 23 32 0.65536000000000000000e5 +4241 1 34 49 -0.13107200000000000000e6 +4241 1 44 51 0.13107200000000000000e6 +4241 3 23 52 0.65536000000000000000e5 +4241 3 35 48 0.13107200000000000000e6 +4241 3 40 45 -0.65536000000000000000e5 +4241 4 22 34 -0.65536000000000000000e5 +4241 4 23 33 0.65536000000000000000e5 +4242 1 34 49 0.65536000000000000000e5 +4242 1 44 51 -0.65536000000000000000e5 +4242 3 34 47 0.65536000000000000000e5 +4242 3 35 48 0.65536000000000000000e5 +4242 3 41 46 -0.13107200000000000000e6 +4242 4 23 34 0.65536000000000000000e5 +4243 1 14 45 -0.32768000000000000000e5 +4243 1 15 46 -0.65536000000000000000e5 +4243 1 17 48 0.16384000000000000000e5 +4243 1 18 49 0.16384000000000000000e5 +4243 1 20 51 0.65536000000000000000e5 +4243 1 34 49 0.16384000000000000000e5 +4243 2 14 28 0.16384000000000000000e5 +4243 3 14 43 0.16384000000000000000e5 +4243 3 16 45 0.65536000000000000000e5 +4243 3 18 47 0.16384000000000000000e5 +4243 3 22 35 -0.16384000000000000000e5 +4243 3 30 35 0.32768000000000000000e5 +4243 4 14 26 -0.16384000000000000000e5 +4243 4 15 27 -0.32768000000000000000e5 +4243 4 24 24 0.65536000000000000000e5 +4244 1 15 46 0.65536000000000000000e5 +4244 1 20 51 -0.65536000000000000000e5 +4244 3 15 46 0.65536000000000000000e5 +4244 3 16 45 0.65536000000000000000e5 +4244 3 17 46 -0.13107200000000000000e6 +4244 4 24 25 0.65536000000000000000e5 +4245 4 23 27 -0.65536000000000000000e5 +4245 4 24 26 0.65536000000000000000e5 +4246 1 6 53 0.16384000000000000000e5 +4246 1 25 40 -0.16384000000000000000e5 +4246 2 4 34 0.32768000000000000000e5 +4246 2 21 35 -0.32768000000000000000e5 +4246 3 5 50 0.32768000000000000000e5 +4246 3 14 51 0.13107200000000000000e6 +4246 3 18 47 -0.13107200000000000000e6 +4246 3 24 37 0.16384000000000000000e5 +4246 3 27 40 0.65536000000000000000e5 +4246 3 30 43 -0.65536000000000000000e5 +4246 4 4 32 -0.16384000000000000000e5 +4246 4 7 35 -0.32768000000000000000e5 +4246 4 16 28 0.16384000000000000000e5 +4246 4 19 31 -0.65536000000000000000e5 +4246 4 24 27 0.65536000000000000000e5 +4247 4 19 31 -0.65536000000000000000e5 +4247 4 24 28 0.65536000000000000000e5 +4248 1 6 53 0.81920000000000000000e4 +4248 1 25 40 -0.81920000000000000000e4 +4248 2 4 34 0.16384000000000000000e5 +4248 2 21 35 -0.16384000000000000000e5 +4248 3 5 50 0.16384000000000000000e5 +4248 3 14 51 0.65536000000000000000e5 +4248 3 18 47 0.65536000000000000000e5 +4248 3 19 48 -0.13107200000000000000e6 +4248 3 24 37 0.81920000000000000000e4 +4248 3 27 40 0.32768000000000000000e5 +4248 3 28 41 0.32768000000000000000e5 +4248 3 29 42 0.32768000000000000000e5 +4248 4 4 32 -0.81920000000000000000e4 +4248 4 7 35 -0.16384000000000000000e5 +4248 4 16 28 0.81920000000000000000e4 +4248 4 23 27 0.32768000000000000000e5 +4248 4 24 29 0.65536000000000000000e5 +4249 3 14 51 0.65536000000000000000e5 +4249 3 18 47 0.65536000000000000000e5 +4249 3 32 45 -0.13107200000000000000e6 +4249 3 35 40 0.65536000000000000000e5 +4249 4 24 30 0.65536000000000000000e5 +4250 1 20 51 -0.13107200000000000000e6 +4250 1 36 51 0.13107200000000000000e6 +4250 3 19 48 0.65536000000000000000e5 +4250 3 20 49 0.65536000000000000000e5 +4250 3 32 45 0.65536000000000000000e5 +4250 4 24 31 0.65536000000000000000e5 +4251 1 34 49 -0.13107200000000000000e6 +4251 1 44 51 0.13107200000000000000e6 +4251 3 23 52 0.65536000000000000000e5 +4251 3 35 48 0.13107200000000000000e6 +4251 3 40 45 -0.65536000000000000000e5 +4251 4 22 34 -0.65536000000000000000e5 +4251 4 24 32 0.65536000000000000000e5 +4252 4 22 34 -0.65536000000000000000e5 +4252 4 24 33 0.65536000000000000000e5 +4253 4 24 34 0.65536000000000000000e5 +4253 4 25 33 -0.65536000000000000000e5 +4254 4 24 35 0.65536000000000000000e5 +4254 4 30 34 -0.65536000000000000000e5 +4255 1 6 53 0.81920000000000000000e4 +4255 1 25 40 -0.81920000000000000000e4 +4255 2 4 34 0.16384000000000000000e5 +4255 2 21 35 -0.16384000000000000000e5 +4255 3 5 50 0.16384000000000000000e5 +4255 3 7 52 0.65536000000000000000e5 +4255 3 18 47 0.65536000000000000000e5 +4255 3 24 37 0.81920000000000000000e4 +4255 3 27 40 0.32768000000000000000e5 +4255 3 28 41 0.32768000000000000000e5 +4255 3 29 42 0.32768000000000000000e5 +4255 3 31 44 -0.13107200000000000000e6 +4255 4 4 32 -0.81920000000000000000e4 +4255 4 7 35 -0.16384000000000000000e5 +4255 4 16 28 0.81920000000000000000e4 +4255 4 23 27 0.32768000000000000000e5 +4255 4 25 26 0.65536000000000000000e5 +4256 1 6 53 0.81920000000000000000e4 +4256 1 25 40 -0.81920000000000000000e4 +4256 2 4 34 0.16384000000000000000e5 +4256 2 21 35 -0.16384000000000000000e5 +4256 3 5 50 0.16384000000000000000e5 +4256 3 14 51 0.65536000000000000000e5 +4256 3 18 47 0.65536000000000000000e5 +4256 3 19 48 -0.13107200000000000000e6 +4256 3 24 37 0.81920000000000000000e4 +4256 3 27 40 0.32768000000000000000e5 +4256 3 28 41 0.32768000000000000000e5 +4256 3 29 42 0.32768000000000000000e5 +4256 4 4 32 -0.81920000000000000000e4 +4256 4 7 35 -0.16384000000000000000e5 +4256 4 16 28 0.81920000000000000000e4 +4256 4 23 27 0.32768000000000000000e5 +4256 4 25 27 0.65536000000000000000e5 +4257 3 14 51 0.65536000000000000000e5 +4257 3 18 47 0.65536000000000000000e5 +4257 3 32 45 -0.13107200000000000000e6 +4257 3 35 40 0.65536000000000000000e5 +4257 4 25 28 0.65536000000000000000e5 +4258 3 19 48 0.65536000000000000000e5 +4258 3 31 44 0.65536000000000000000e5 +4258 3 32 45 0.65536000000000000000e5 +4258 3 36 41 -0.13107200000000000000e6 +4258 4 25 29 0.65536000000000000000e5 +4259 1 20 51 -0.13107200000000000000e6 +4259 1 36 51 0.13107200000000000000e6 +4259 3 19 48 0.65536000000000000000e5 +4259 3 20 49 0.65536000000000000000e5 +4259 3 32 45 0.65536000000000000000e5 +4259 4 25 30 0.65536000000000000000e5 +4260 1 20 51 0.65536000000000000000e5 +4260 1 36 51 -0.65536000000000000000e5 +4260 3 21 50 -0.13107200000000000000e6 +4260 3 33 46 0.65536000000000000000e5 +4260 3 36 41 0.65536000000000000000e5 +4260 4 25 31 0.65536000000000000000e5 +4261 1 34 49 0.65536000000000000000e5 +4261 1 44 51 -0.65536000000000000000e5 +4261 3 34 47 0.65536000000000000000e5 +4261 3 35 48 0.65536000000000000000e5 +4261 3 41 46 -0.13107200000000000000e6 +4261 4 25 32 0.65536000000000000000e5 +4262 4 15 35 -0.65536000000000000000e5 +4262 4 25 34 0.65536000000000000000e5 +4263 1 44 51 0.65536000000000000000e5 +4263 1 46 53 -0.65536000000000000000e5 +4263 3 19 56 -0.13107200000000000000e6 +4263 3 43 52 0.65536000000000000000e5 +4263 3 45 50 0.65536000000000000000e5 +4263 4 25 35 0.65536000000000000000e5 +4264 1 2 49 0.32768000000000000000e5 +4264 1 6 53 -0.65536000000000000000e5 +4264 1 8 39 -0.65536000000000000000e5 +4264 1 9 40 -0.65536000000000000000e5 +4264 1 10 41 0.13107200000000000000e6 +4264 1 23 38 0.32768000000000000000e5 +4264 1 24 39 0.32768000000000000000e5 +4264 1 25 40 0.65536000000000000000e5 +4264 1 26 41 0.65536000000000000000e5 +4264 1 32 47 -0.13107200000000000000e6 +4264 2 26 32 0.32768000000000000000e5 +4264 3 2 47 -0.32768000000000000000e5 +4264 3 9 38 -0.65536000000000000000e5 +4264 3 24 37 -0.65536000000000000000e5 +4264 3 25 38 0.32768000000000000000e5 +4264 3 27 40 -0.19660800000000000000e6 +4264 4 2 30 -0.65536000000000000000e5 +4264 4 4 32 0.65536000000000000000e5 +4264 4 16 28 -0.32768000000000000000e5 +4264 4 17 29 -0.65536000000000000000e5 +4264 4 26 26 0.65536000000000000000e5 +4265 1 1 48 -0.65536000000000000000e5 +4265 1 2 49 -0.65536000000000000000e5 +4265 1 6 53 -0.13107200000000000000e6 +4265 1 8 39 -0.26214400000000000000e6 +4265 1 9 40 -0.26214400000000000000e6 +4265 1 10 41 0.52428800000000000000e6 +4265 1 12 43 0.52428800000000000000e6 +4265 1 22 53 0.65536000000000000000e5 +4265 1 23 38 -0.65536000000000000000e5 +4265 1 24 55 0.13107200000000000000e6 +4265 1 25 40 0.13107200000000000000e6 +4265 1 26 41 0.13107200000000000000e6 +4265 1 28 43 -0.26214400000000000000e6 +4265 1 32 47 -0.52428800000000000000e6 +4265 1 37 52 -0.26214400000000000000e6 +4265 1 40 47 -0.65536000000000000000e5 +4265 2 2 32 -0.65536000000000000000e5 +4265 2 3 33 -0.65536000000000000000e5 +4265 2 16 30 -0.13107200000000000000e6 +4265 2 20 34 -0.26214400000000000000e6 +4265 2 26 32 0.65536000000000000000e5 +4265 3 9 38 -0.26214400000000000000e6 +4265 3 22 35 -0.52428800000000000000e6 +4265 3 22 51 -0.26214400000000000000e6 +4265 3 24 37 -0.13107200000000000000e6 +4265 3 27 40 -0.26214400000000000000e6 +4265 3 28 41 -0.52428800000000000000e6 +4265 4 2 30 -0.26214400000000000000e6 +4265 4 4 32 0.13107200000000000000e6 +4265 4 6 34 -0.26214400000000000000e6 +4265 4 16 28 -0.65536000000000000000e5 +4265 4 17 29 -0.13107200000000000000e6 +4265 4 20 32 -0.13107200000000000000e6 +4265 4 26 27 0.65536000000000000000e5 +4266 1 1 48 -0.65536000000000000000e5 +4266 1 2 49 -0.13107200000000000000e6 +4266 1 8 39 -0.13107200000000000000e6 +4266 1 9 40 -0.13107200000000000000e6 +4266 1 10 41 0.26214400000000000000e6 +4266 1 12 43 0.52428800000000000000e6 +4266 1 23 38 -0.65536000000000000000e5 +4266 1 23 54 -0.65536000000000000000e5 +4266 1 24 55 0.13107200000000000000e6 +4266 1 25 40 0.65536000000000000000e5 +4266 1 25 56 -0.65536000000000000000e5 +4266 1 28 43 -0.26214400000000000000e6 +4266 1 32 47 -0.52428800000000000000e6 +4266 1 40 47 -0.65536000000000000000e5 +4266 2 2 32 -0.65536000000000000000e5 +4266 2 3 33 -0.65536000000000000000e5 +4266 2 16 30 -0.13107200000000000000e6 +4266 2 20 34 -0.26214400000000000000e6 +4266 3 9 38 -0.13107200000000000000e6 +4266 3 22 35 -0.52428800000000000000e6 +4266 3 24 53 0.65536000000000000000e5 +4266 3 25 54 0.65536000000000000000e5 +4266 3 28 41 -0.52428800000000000000e6 +4266 3 38 51 -0.13107200000000000000e6 +4266 4 2 30 -0.13107200000000000000e6 +4266 4 4 32 0.65536000000000000000e5 +4266 4 6 34 -0.26214400000000000000e6 +4266 4 26 28 0.65536000000000000000e5 +4266 4 28 32 0.65536000000000000000e5 +4267 4 20 32 -0.65536000000000000000e5 +4267 4 26 29 0.65536000000000000000e5 +4268 4 7 35 -0.65536000000000000000e5 +4268 4 26 30 0.65536000000000000000e5 +4269 1 32 47 0.65536000000000000000e5 +4269 1 37 52 -0.65536000000000000000e5 +4269 3 10 55 -0.65536000000000000000e5 +4269 3 23 52 0.65536000000000000000e5 +4269 3 34 47 -0.13107200000000000000e6 +4269 3 35 48 0.13107200000000000000e6 +4269 3 40 45 -0.65536000000000000000e5 +4269 4 22 34 -0.65536000000000000000e5 +4269 4 26 31 0.65536000000000000000e5 +4270 1 1 48 0.65536000000000000000e5 +4270 1 2 49 0.65536000000000000000e5 +4270 1 6 53 0.13107200000000000000e6 +4270 1 8 39 0.26214400000000000000e6 +4270 1 9 40 0.26214400000000000000e6 +4270 1 10 41 -0.52428800000000000000e6 +4270 1 12 43 -0.52428800000000000000e6 +4270 1 22 53 -0.65536000000000000000e5 +4270 1 23 38 0.65536000000000000000e5 +4270 1 24 55 -0.13107200000000000000e6 +4270 1 25 40 -0.13107200000000000000e6 +4270 1 26 41 -0.13107200000000000000e6 +4270 1 28 43 0.26214400000000000000e6 +4270 1 32 47 0.52428800000000000000e6 +4270 1 37 52 0.26214400000000000000e6 +4270 1 40 47 0.65536000000000000000e5 +4270 2 2 32 0.65536000000000000000e5 +4270 2 16 30 0.13107200000000000000e6 +4270 2 20 34 0.26214400000000000000e6 +4270 2 26 32 -0.65536000000000000000e5 +4270 2 32 32 0.13107200000000000000e6 +4270 3 9 38 0.26214400000000000000e6 +4270 3 22 35 0.52428800000000000000e6 +4270 3 22 51 0.26214400000000000000e6 +4270 3 24 37 0.13107200000000000000e6 +4270 3 27 40 0.26214400000000000000e6 +4270 3 28 41 0.52428800000000000000e6 +4270 4 2 30 0.26214400000000000000e6 +4270 4 4 32 -0.13107200000000000000e6 +4270 4 6 34 0.26214400000000000000e6 +4270 4 16 28 0.13107200000000000000e6 +4270 4 17 29 0.13107200000000000000e6 +4270 4 20 32 0.13107200000000000000e6 +4270 4 26 32 0.65536000000000000000e5 +4271 1 23 54 0.65536000000000000000e5 +4271 1 24 55 -0.13107200000000000000e6 +4271 1 38 53 -0.65536000000000000000e5 +4271 1 41 56 0.13107200000000000000e6 +4271 3 25 54 -0.65536000000000000000e5 +4271 3 27 56 0.13107200000000000000e6 +4271 3 38 51 0.13107200000000000000e6 +4271 4 26 33 0.65536000000000000000e5 +4271 4 28 32 -0.65536000000000000000e5 +4272 1 1 48 -0.32768000000000000000e5 +4272 1 2 49 -0.32768000000000000000e5 +4272 1 8 39 -0.65536000000000000000e5 +4272 1 9 40 -0.65536000000000000000e5 +4272 1 10 41 0.13107200000000000000e6 +4272 1 12 43 0.26214400000000000000e6 +4272 1 23 38 -0.32768000000000000000e5 +4272 1 24 55 0.13107200000000000000e6 +4272 1 26 41 0.65536000000000000000e5 +4272 1 28 43 -0.26214400000000000000e6 +4272 1 32 47 -0.26214400000000000000e6 +4272 1 33 48 0.13107200000000000000e6 +4272 1 40 55 -0.65536000000000000000e5 +4272 1 41 56 -0.13107200000000000000e6 +4272 1 44 51 -0.26214400000000000000e6 +4272 1 46 53 0.26214400000000000000e6 +4272 2 2 32 -0.32768000000000000000e5 +4272 2 4 34 0.65536000000000000000e5 +4272 2 16 30 -0.65536000000000000000e5 +4272 2 20 34 -0.13107200000000000000e6 +4272 2 28 34 -0.65536000000000000000e5 +4272 3 5 50 0.65536000000000000000e5 +4272 3 9 38 -0.65536000000000000000e5 +4272 3 10 55 0.13107200000000000000e6 +4272 3 22 35 -0.26214400000000000000e6 +4272 3 22 51 -0.65536000000000000000e5 +4272 3 23 52 0.13107200000000000000e6 +4272 3 27 40 0.65536000000000000000e5 +4272 3 27 56 -0.13107200000000000000e6 +4272 3 28 41 -0.26214400000000000000e6 +4272 3 35 48 -0.26214400000000000000e6 +4272 3 37 50 0.65536000000000000000e5 +4272 3 38 51 0.13107200000000000000e6 +4272 3 39 52 0.13107200000000000000e6 +4272 3 40 45 0.13107200000000000000e6 +4272 4 2 30 -0.65536000000000000000e5 +4272 4 6 34 -0.13107200000000000000e6 +4272 4 7 35 -0.65536000000000000000e5 +4272 4 22 34 0.13107200000000000000e6 +4272 4 23 35 0.13107200000000000000e6 +4272 4 26 34 0.65536000000000000000e5 +4272 4 29 33 0.65536000000000000000e5 +4273 4 26 35 0.65536000000000000000e5 +4273 4 32 32 -0.13107200000000000000e6 +4274 1 1 48 -0.32768000000000000000e5 +4274 1 2 49 -0.65536000000000000000e5 +4274 1 8 39 -0.65536000000000000000e5 +4274 1 9 40 -0.65536000000000000000e5 +4274 1 10 41 0.13107200000000000000e6 +4274 1 12 43 0.26214400000000000000e6 +4274 1 23 38 -0.32768000000000000000e5 +4274 1 23 54 -0.32768000000000000000e5 +4274 1 24 55 0.65536000000000000000e5 +4274 1 25 40 0.32768000000000000000e5 +4274 1 25 56 -0.32768000000000000000e5 +4274 1 28 43 -0.13107200000000000000e6 +4274 1 32 47 -0.26214400000000000000e6 +4274 1 40 47 -0.32768000000000000000e5 +4274 2 2 32 -0.32768000000000000000e5 +4274 2 3 33 -0.32768000000000000000e5 +4274 2 16 30 -0.65536000000000000000e5 +4274 2 20 34 -0.13107200000000000000e6 +4274 3 9 38 -0.65536000000000000000e5 +4274 3 22 35 -0.26214400000000000000e6 +4274 3 24 53 0.32768000000000000000e5 +4274 3 25 54 0.32768000000000000000e5 +4274 3 28 41 -0.26214400000000000000e6 +4274 3 38 51 -0.65536000000000000000e5 +4274 4 2 30 -0.65536000000000000000e5 +4274 4 4 32 0.32768000000000000000e5 +4274 4 6 34 -0.13107200000000000000e6 +4274 4 27 27 0.65536000000000000000e5 +4274 4 28 32 0.32768000000000000000e5 +4275 1 1 48 -0.65536000000000000000e5 +4275 1 2 49 -0.13107200000000000000e6 +4275 1 6 53 0.65536000000000000000e5 +4275 1 8 39 -0.13107200000000000000e6 +4275 1 9 40 -0.13107200000000000000e6 +4275 1 10 41 0.26214400000000000000e6 +4275 1 12 43 0.52428800000000000000e6 +4275 1 23 38 -0.65536000000000000000e5 +4275 1 24 39 -0.65536000000000000000e5 +4275 1 24 55 -0.13107200000000000000e6 +4275 1 25 56 -0.65536000000000000000e5 +4275 1 26 41 0.26214400000000000000e6 +4275 1 28 43 -0.26214400000000000000e6 +4275 1 32 47 -0.52428800000000000000e6 +4275 1 40 47 -0.65536000000000000000e5 +4275 2 2 32 -0.65536000000000000000e5 +4275 2 3 33 -0.65536000000000000000e5 +4275 2 16 30 -0.13107200000000000000e6 +4275 2 20 34 -0.26214400000000000000e6 +4275 3 9 38 -0.13107200000000000000e6 +4275 3 22 35 -0.52428800000000000000e6 +4275 3 22 51 0.13107200000000000000e6 +4275 3 23 52 -0.26214400000000000000e6 +4275 3 24 53 0.65536000000000000000e5 +4275 3 25 38 -0.65536000000000000000e5 +4275 3 25 54 0.65536000000000000000e5 +4275 3 27 40 -0.13107200000000000000e6 +4275 3 28 41 -0.52428800000000000000e6 +4275 3 38 51 -0.13107200000000000000e6 +4275 3 39 40 0.65536000000000000000e5 +4275 4 2 30 -0.13107200000000000000e6 +4275 4 6 34 -0.26214400000000000000e6 +4275 4 7 35 0.13107200000000000000e6 +4275 4 27 28 0.65536000000000000000e5 +4275 4 28 32 0.65536000000000000000e5 +4276 4 7 35 -0.65536000000000000000e5 +4276 4 27 29 0.65536000000000000000e5 +4277 4 21 33 -0.65536000000000000000e5 +4277 4 27 30 0.65536000000000000000e5 +4278 1 34 49 -0.13107200000000000000e6 +4278 1 44 51 0.13107200000000000000e6 +4278 3 23 52 0.65536000000000000000e5 +4278 3 35 48 0.13107200000000000000e6 +4278 3 40 45 -0.65536000000000000000e5 +4278 4 22 34 -0.65536000000000000000e5 +4278 4 27 31 0.65536000000000000000e5 +4279 1 23 54 0.65536000000000000000e5 +4279 1 24 55 -0.13107200000000000000e6 +4279 1 38 53 -0.65536000000000000000e5 +4279 1 41 56 0.13107200000000000000e6 +4279 3 25 54 -0.65536000000000000000e5 +4279 3 27 56 0.13107200000000000000e6 +4279 3 38 51 0.13107200000000000000e6 +4279 4 27 32 0.65536000000000000000e5 +4279 4 28 32 -0.65536000000000000000e5 +4280 4 27 33 0.65536000000000000000e5 +4280 4 28 32 -0.65536000000000000000e5 +4281 4 27 34 0.65536000000000000000e5 +4281 4 29 33 -0.65536000000000000000e5 +4282 1 1 48 0.65536000000000000000e5 +4282 1 2 49 0.13107200000000000000e6 +4282 1 6 53 -0.65536000000000000000e5 +4282 1 8 39 0.13107200000000000000e6 +4282 1 9 40 0.13107200000000000000e6 +4282 1 10 41 -0.26214400000000000000e6 +4282 1 12 43 -0.52428800000000000000e6 +4282 1 23 38 0.65536000000000000000e5 +4282 1 24 39 0.65536000000000000000e5 +4282 1 24 55 0.13107200000000000000e6 +4282 1 25 56 0.65536000000000000000e5 +4282 1 26 41 -0.26214400000000000000e6 +4282 1 28 43 0.26214400000000000000e6 +4282 1 32 47 0.52428800000000000000e6 +4282 1 40 47 0.65536000000000000000e5 +4282 2 2 32 0.65536000000000000000e5 +4282 2 3 33 0.65536000000000000000e5 +4282 2 5 35 -0.65536000000000000000e5 +4282 2 16 30 0.13107200000000000000e6 +4282 2 20 34 0.26214400000000000000e6 +4282 2 33 35 0.65536000000000000000e5 +4282 3 9 38 0.13107200000000000000e6 +4282 3 22 35 0.52428800000000000000e6 +4282 3 22 51 -0.13107200000000000000e6 +4282 3 23 52 0.26214400000000000000e6 +4282 3 24 53 -0.65536000000000000000e5 +4282 3 25 38 0.65536000000000000000e5 +4282 3 25 54 -0.65536000000000000000e5 +4282 3 27 40 0.13107200000000000000e6 +4282 3 28 41 0.52428800000000000000e6 +4282 3 38 51 0.13107200000000000000e6 +4282 3 39 40 -0.65536000000000000000e5 +4282 4 2 30 0.13107200000000000000e6 +4282 4 6 34 0.26214400000000000000e6 +4282 4 7 35 -0.13107200000000000000e6 +4282 4 27 35 0.65536000000000000000e5 +4283 4 21 33 -0.65536000000000000000e5 +4283 4 28 29 0.65536000000000000000e5 +4284 1 24 55 0.65536000000000000000e5 +4284 1 26 41 -0.65536000000000000000e5 +4284 3 6 55 0.65536000000000000000e5 +4284 3 10 55 -0.26214400000000000000e6 +4284 3 27 40 0.65536000000000000000e5 +4284 3 35 48 0.26214400000000000000e6 +4284 3 40 45 -0.13107200000000000000e6 +4284 4 21 33 -0.65536000000000000000e5 +4284 4 22 34 -0.13107200000000000000e6 +4284 4 28 30 0.65536000000000000000e5 +4285 4 22 34 -0.65536000000000000000e5 +4285 4 28 31 0.65536000000000000000e5 +4286 4 19 35 -0.65536000000000000000e5 +4286 4 28 33 0.65536000000000000000e5 +4287 1 1 48 -0.32768000000000000000e5 +4287 1 2 49 -0.32768000000000000000e5 +4287 1 8 39 -0.65536000000000000000e5 +4287 1 9 40 -0.65536000000000000000e5 +4287 1 10 41 0.13107200000000000000e6 +4287 1 12 43 0.26214400000000000000e6 +4287 1 23 38 -0.32768000000000000000e5 +4287 1 26 41 0.65536000000000000000e5 +4287 1 28 43 -0.26214400000000000000e6 +4287 1 32 47 -0.26214400000000000000e6 +4287 1 33 48 0.13107200000000000000e6 +4287 1 40 55 -0.65536000000000000000e5 +4287 2 2 32 -0.32768000000000000000e5 +4287 2 4 34 0.65536000000000000000e5 +4287 2 16 30 -0.65536000000000000000e5 +4287 2 20 34 -0.13107200000000000000e6 +4287 2 28 34 -0.65536000000000000000e5 +4287 3 5 50 0.65536000000000000000e5 +4287 3 9 38 -0.65536000000000000000e5 +4287 3 10 55 0.13107200000000000000e6 +4287 3 22 35 -0.26214400000000000000e6 +4287 3 22 51 -0.65536000000000000000e5 +4287 3 23 52 0.13107200000000000000e6 +4287 3 26 55 0.65536000000000000000e5 +4287 3 27 40 0.65536000000000000000e5 +4287 3 28 41 -0.26214400000000000000e6 +4287 3 35 48 -0.26214400000000000000e6 +4287 3 38 51 0.65536000000000000000e5 +4287 3 39 52 -0.13107200000000000000e6 +4287 3 40 45 0.13107200000000000000e6 +4287 4 2 30 -0.65536000000000000000e5 +4287 4 6 34 -0.13107200000000000000e6 +4287 4 7 35 -0.65536000000000000000e5 +4287 4 22 34 0.13107200000000000000e6 +4287 4 28 34 0.65536000000000000000e5 +4288 4 28 35 0.65536000000000000000e5 +4288 4 33 33 -0.13107200000000000000e6 +4289 1 32 47 0.32768000000000000000e5 +4289 1 37 52 -0.32768000000000000000e5 +4289 3 10 55 -0.32768000000000000000e5 +4289 3 23 52 0.32768000000000000000e5 +4289 3 34 47 -0.65536000000000000000e5 +4289 3 35 48 0.65536000000000000000e5 +4289 3 40 45 -0.32768000000000000000e5 +4289 4 22 34 -0.32768000000000000000e5 +4289 4 29 29 0.65536000000000000000e5 +4290 1 34 49 -0.13107200000000000000e6 +4290 1 44 51 0.13107200000000000000e6 +4290 3 23 52 0.65536000000000000000e5 +4290 3 35 48 0.13107200000000000000e6 +4290 3 40 45 -0.65536000000000000000e5 +4290 4 22 34 -0.65536000000000000000e5 +4290 4 29 30 0.65536000000000000000e5 +4291 1 34 49 0.65536000000000000000e5 +4291 1 44 51 -0.65536000000000000000e5 +4291 3 34 47 0.65536000000000000000e5 +4291 3 35 48 0.65536000000000000000e5 +4291 3 41 46 -0.13107200000000000000e6 +4291 4 29 31 0.65536000000000000000e5 +4292 1 1 48 -0.32768000000000000000e5 +4292 1 2 49 -0.32768000000000000000e5 +4292 1 8 39 -0.65536000000000000000e5 +4292 1 9 40 -0.65536000000000000000e5 +4292 1 10 41 0.13107200000000000000e6 +4292 1 12 43 0.26214400000000000000e6 +4292 1 23 38 -0.32768000000000000000e5 +4292 1 24 55 0.13107200000000000000e6 +4292 1 26 41 0.65536000000000000000e5 +4292 1 28 43 -0.26214400000000000000e6 +4292 1 32 47 -0.26214400000000000000e6 +4292 1 33 48 0.13107200000000000000e6 +4292 1 40 55 -0.65536000000000000000e5 +4292 1 41 56 -0.13107200000000000000e6 +4292 1 44 51 -0.26214400000000000000e6 +4292 1 46 53 0.26214400000000000000e6 +4292 2 2 32 -0.32768000000000000000e5 +4292 2 4 34 0.65536000000000000000e5 +4292 2 16 30 -0.65536000000000000000e5 +4292 2 20 34 -0.13107200000000000000e6 +4292 2 28 34 -0.65536000000000000000e5 +4292 3 5 50 0.65536000000000000000e5 +4292 3 9 38 -0.65536000000000000000e5 +4292 3 10 55 0.13107200000000000000e6 +4292 3 22 35 -0.26214400000000000000e6 +4292 3 22 51 -0.65536000000000000000e5 +4292 3 23 52 0.13107200000000000000e6 +4292 3 27 40 0.65536000000000000000e5 +4292 3 27 56 -0.13107200000000000000e6 +4292 3 28 41 -0.26214400000000000000e6 +4292 3 35 48 -0.26214400000000000000e6 +4292 3 37 50 0.65536000000000000000e5 +4292 3 38 51 0.13107200000000000000e6 +4292 3 39 52 0.13107200000000000000e6 +4292 3 40 45 0.13107200000000000000e6 +4292 4 2 30 -0.65536000000000000000e5 +4292 4 6 34 -0.13107200000000000000e6 +4292 4 7 35 -0.65536000000000000000e5 +4292 4 22 34 0.13107200000000000000e6 +4292 4 23 35 0.13107200000000000000e6 +4292 4 29 32 0.65536000000000000000e5 +4292 4 29 33 0.65536000000000000000e5 +4293 4 23 35 -0.65536000000000000000e5 +4293 4 29 34 0.65536000000000000000e5 +4294 3 27 56 0.65536000000000000000e5 +4294 3 41 54 0.65536000000000000000e5 +4294 3 47 52 -0.13107200000000000000e6 +4294 3 49 50 0.65536000000000000000e5 +4294 4 29 35 0.65536000000000000000e5 +4295 4 22 34 -0.32768000000000000000e5 +4295 4 30 30 0.65536000000000000000e5 +4296 4 25 33 -0.65536000000000000000e5 +4296 4 30 31 0.65536000000000000000e5 +4297 4 29 33 -0.65536000000000000000e5 +4297 4 30 32 0.65536000000000000000e5 +4298 1 1 48 -0.32768000000000000000e5 +4298 1 2 49 -0.32768000000000000000e5 +4298 1 8 39 -0.65536000000000000000e5 +4298 1 9 40 -0.65536000000000000000e5 +4298 1 10 41 0.13107200000000000000e6 +4298 1 12 43 0.26214400000000000000e6 +4298 1 23 38 -0.32768000000000000000e5 +4298 1 26 41 0.65536000000000000000e5 +4298 1 28 43 -0.26214400000000000000e6 +4298 1 32 47 -0.26214400000000000000e6 +4298 1 33 48 0.13107200000000000000e6 +4298 1 40 55 -0.65536000000000000000e5 +4298 2 2 32 -0.32768000000000000000e5 +4298 2 4 34 0.65536000000000000000e5 +4298 2 16 30 -0.65536000000000000000e5 +4298 2 20 34 -0.13107200000000000000e6 +4298 2 28 34 -0.65536000000000000000e5 +4298 3 5 50 0.65536000000000000000e5 +4298 3 9 38 -0.65536000000000000000e5 +4298 3 10 55 0.13107200000000000000e6 +4298 3 22 35 -0.26214400000000000000e6 +4298 3 22 51 -0.65536000000000000000e5 +4298 3 23 52 0.13107200000000000000e6 +4298 3 26 55 0.65536000000000000000e5 +4298 3 27 40 0.65536000000000000000e5 +4298 3 28 41 -0.26214400000000000000e6 +4298 3 35 48 -0.26214400000000000000e6 +4298 3 38 51 0.65536000000000000000e5 +4298 3 39 52 -0.13107200000000000000e6 +4298 3 40 45 0.13107200000000000000e6 +4298 4 2 30 -0.65536000000000000000e5 +4298 4 6 34 -0.13107200000000000000e6 +4298 4 7 35 -0.65536000000000000000e5 +4298 4 22 34 0.13107200000000000000e6 +4298 4 30 33 0.65536000000000000000e5 +4299 3 40 55 0.65536000000000000000e5 +4299 3 41 54 0.65536000000000000000e5 +4299 3 42 55 -0.13107200000000000000e6 +4299 3 49 50 0.65536000000000000000e5 +4299 4 30 35 0.65536000000000000000e5 +4300 4 15 35 -0.32768000000000000000e5 +4300 4 31 31 0.65536000000000000000e5 +4301 4 23 35 -0.65536000000000000000e5 +4301 4 31 32 0.65536000000000000000e5 +4302 4 30 34 -0.65536000000000000000e5 +4302 4 31 33 0.65536000000000000000e5 +4303 1 44 51 0.65536000000000000000e5 +4303 1 46 53 -0.65536000000000000000e5 +4303 3 19 56 -0.13107200000000000000e6 +4303 3 43 52 0.65536000000000000000e5 +4303 3 45 50 0.65536000000000000000e5 +4303 4 31 34 0.65536000000000000000e5 +4304 1 1 48 0.65536000000000000000e5 +4304 1 2 49 0.13107200000000000000e6 +4304 1 6 53 -0.65536000000000000000e5 +4304 1 8 39 0.13107200000000000000e6 +4304 1 9 40 0.13107200000000000000e6 +4304 1 10 41 -0.26214400000000000000e6 +4304 1 12 43 -0.52428800000000000000e6 +4304 1 23 38 0.65536000000000000000e5 +4304 1 24 39 0.65536000000000000000e5 +4304 1 24 55 0.13107200000000000000e6 +4304 1 25 56 0.65536000000000000000e5 +4304 1 26 41 -0.26214400000000000000e6 +4304 1 28 43 0.26214400000000000000e6 +4304 1 32 47 0.52428800000000000000e6 +4304 1 40 47 0.65536000000000000000e5 +4304 2 2 32 0.65536000000000000000e5 +4304 2 3 33 0.65536000000000000000e5 +4304 2 5 35 -0.65536000000000000000e5 +4304 2 16 30 0.13107200000000000000e6 +4304 2 20 34 0.26214400000000000000e6 +4304 2 33 35 0.65536000000000000000e5 +4304 3 9 38 0.13107200000000000000e6 +4304 3 22 35 0.52428800000000000000e6 +4304 3 22 51 -0.13107200000000000000e6 +4304 3 23 52 0.26214400000000000000e6 +4304 3 24 53 -0.65536000000000000000e5 +4304 3 25 38 0.65536000000000000000e5 +4304 3 25 54 -0.65536000000000000000e5 +4304 3 27 40 0.13107200000000000000e6 +4304 3 28 41 0.52428800000000000000e6 +4304 3 38 51 0.13107200000000000000e6 +4304 3 39 40 -0.65536000000000000000e5 +4304 4 2 30 0.13107200000000000000e6 +4304 4 6 34 0.26214400000000000000e6 +4304 4 7 35 -0.13107200000000000000e6 +4304 4 32 33 0.65536000000000000000e5 +4305 3 27 56 0.65536000000000000000e5 +4305 3 41 54 0.65536000000000000000e5 +4305 3 47 52 -0.13107200000000000000e6 +4305 3 49 50 0.65536000000000000000e5 +4305 4 32 34 0.65536000000000000000e5 +4306 2 33 35 -0.65536000000000000000e5 +4306 2 35 35 0.13107200000000000000e6 +4306 4 32 35 0.65536000000000000000e5 +4307 3 40 55 0.65536000000000000000e5 +4307 3 41 54 0.65536000000000000000e5 +4307 3 42 55 -0.13107200000000000000e6 +4307 3 49 50 0.65536000000000000000e5 +4307 4 33 34 0.65536000000000000000e5 +4308 1 1 48 0.13107200000000000000e6 +4308 1 2 49 0.19660800000000000000e6 +4308 1 6 53 -0.65536000000000000000e5 +4308 1 8 39 0.26214400000000000000e6 +4308 1 9 40 0.26214400000000000000e6 +4308 1 10 41 -0.52428800000000000000e6 +4308 1 12 43 -0.10485760000000000000e7 +4308 1 23 38 0.13107200000000000000e6 +4308 1 24 39 0.65536000000000000000e5 +4308 1 26 41 -0.39321600000000000000e6 +4308 1 28 43 0.78643200000000000000e6 +4308 1 32 47 0.10485760000000000000e7 +4308 1 40 55 -0.13107200000000000000e6 +4308 1 49 56 -0.65536000000000000000e5 +4308 1 54 55 0.13107200000000000000e6 +4308 2 2 32 0.13107200000000000000e6 +4308 2 3 33 0.65536000000000000000e5 +4308 2 4 34 -0.13107200000000000000e6 +4308 2 5 35 -0.65536000000000000000e5 +4308 2 16 30 0.26214400000000000000e6 +4308 2 20 34 0.52428800000000000000e6 +4308 3 5 50 -0.13107200000000000000e6 +4308 3 9 38 0.26214400000000000000e6 +4308 3 22 35 0.10485760000000000000e7 +4308 3 25 38 0.65536000000000000000e5 +4308 3 25 54 -0.65536000000000000000e5 +4308 3 28 41 0.10485760000000000000e7 +4308 3 39 40 -0.65536000000000000000e5 +4308 3 40 53 -0.65536000000000000000e5 +4308 3 48 53 0.65536000000000000000e5 +4308 3 49 50 0.13107200000000000000e6 +4308 3 49 54 0.65536000000000000000e5 +4308 4 2 30 0.26214400000000000000e6 +4308 4 6 34 0.52428800000000000000e6 +4308 4 33 35 0.65536000000000000000e5 +4309 4 31 35 -0.32768000000000000000e5 +4309 4 34 34 0.65536000000000000000e5 +4310 1 40 55 0.65536000000000000000e5 +4310 1 54 55 -0.65536000000000000000e5 +4310 3 41 56 0.65536000000000000000e5 +4310 3 43 56 0.65536000000000000000e5 +4310 3 49 50 -0.65536000000000000000e5 +4310 3 50 55 -0.13107200000000000000e6 +4310 4 34 35 0.65536000000000000000e5 +*** ANSWER *** +Failure +*** END *** +*** REQUEST *** +"" +1 +3 +1 1 1 +0.10485760000000000000e7 +0 1 1 1 0.10485760000000000000e7 +1 2 1 1 0.10485760000000000000e7 +1 3 1 1 0.10485760000000000000e7 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +5 +5 +4 1 1 1 1 +0.52428800000000000000e6 0.10485760000000000000e7 -0.52428800000000000000e6 -0.15728640000000000000e7 0.10485760000000000000e7 +0 1 2 2 -0.52428800000000000000e6 +0 1 4 4 0.52428800000000000000e6 +0 2 1 1 -0.52428800000000000000e6 +0 4 1 1 0.52428800000000000000e6 +1 1 1 1 0.52428800000000000000e6 +1 1 2 2 0.52428800000000000000e6 +1 1 4 4 -0.52428800000000000000e6 +1 2 1 1 0.52428800000000000000e6 +1 4 1 1 -0.52428800000000000000e6 +2 1 1 2 0.52428800000000000000e6 +2 1 1 4 -0.52428800000000000000e6 +2 4 1 1 0.10485760000000000000e7 +3 1 1 3 0.52428800000000000000e6 +3 1 1 4 -0.26214400000000000000e6 +3 1 4 4 -0.52428800000000000000e6 +4 1 2 2 -0.52428800000000000000e6 +4 1 2 4 0.52428800000000000000e6 +4 1 4 4 -0.52428800000000000000e6 +4 5 1 1 -0.52428800000000000000e6 +5 3 1 1 0.52428800000000000000e6 +5 4 1 1 0.52428800000000000000e6 +*** ANSWER *** +Failure +*** END *** +*** REQUEST *** +"" +20 +7 +4 1 4 1 4 1 1 +0.52428800000000000000e6 0.10485760000000000000e7 -0.52428800000000000000e6 0.0 -0.10485760000000000000e7 0.52428800000000000000e6 0.0 0.0 0.10485760000000000000e7 0.10485760000000000000e7 0.10485760000000000000e7 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.10485760000000000000e7 0.52428800000000000000e6 +0 1 1 2 -0.26214400000000000000e6 +0 1 1 4 0.26214400000000000000e6 +0 2 1 1 -0.52428800000000000000e6 +0 3 1 2 -0.26214400000000000000e6 +0 5 1 4 0.26214400000000000000e6 +1 1 2 3 0.52428800000000000000e6 +1 1 3 4 -0.52428800000000000000e6 +1 5 1 4 0.26214400000000000000e6 +1 5 4 4 0.52428800000000000000e6 +2 1 1 1 0.52428800000000000000e6 +2 1 1 2 0.26214400000000000000e6 +2 1 1 4 -0.26214400000000000000e6 +2 2 1 1 0.52428800000000000000e6 +2 3 1 2 0.26214400000000000000e6 +2 5 1 4 -0.26214400000000000000e6 +3 1 1 3 0.52428800000000000000e6 +3 1 1 4 -0.26214400000000000000e6 +3 1 4 4 -0.52428800000000000000e6 +4 1 2 2 0.52428800000000000000e6 +4 1 4 4 -0.52428800000000000000e6 +4 3 1 2 -0.26214400000000000000e6 +4 5 1 4 0.26214400000000000000e6 +5 1 2 4 0.52428800000000000000e6 +5 1 4 4 -0.10485760000000000000e7 +5 5 1 4 0.52428800000000000000e6 +6 1 1 2 -0.26214400000000000000e6 +6 1 1 4 0.26214400000000000000e6 +6 3 1 1 0.52428800000000000000e6 +7 1 2 3 -0.52428800000000000000e6 +7 1 3 4 0.52428800000000000000e6 +7 3 1 3 0.52428800000000000000e6 +8 3 1 4 0.52428800000000000000e6 +8 5 1 4 0.52428800000000000000e6 +9 1 1 2 0.26214400000000000000e6 +9 1 1 4 -0.26214400000000000000e6 +9 1 2 3 -0.52428800000000000000e6 +9 1 3 4 0.52428800000000000000e6 +9 3 1 2 0.26214400000000000000e6 +9 3 2 2 0.52428800000000000000e6 +9 4 1 1 0.52428800000000000000e6 +10 3 3 3 0.52428800000000000000e6 +10 5 3 3 0.52428800000000000000e6 +11 3 4 4 0.52428800000000000000e6 +11 5 4 4 0.52428800000000000000e6 +12 1 1 2 0.26214400000000000000e6 +12 1 1 4 -0.26214400000000000000e6 +12 5 1 1 0.52428800000000000000e6 +13 3 1 2 0.52428800000000000000e6 +13 5 1 2 0.52428800000000000000e6 +14 1 2 3 0.52428800000000000000e6 +14 1 3 4 -0.52428800000000000000e6 +14 5 1 3 0.52428800000000000000e6 +15 1 1 2 -0.26214400000000000000e6 +15 1 1 4 0.26214400000000000000e6 +15 1 2 3 0.52428800000000000000e6 +15 1 3 4 -0.52428800000000000000e6 +15 3 1 2 -0.26214400000000000000e6 +15 4 1 1 -0.52428800000000000000e6 +15 5 2 2 0.52428800000000000000e6 +16 3 2 3 0.52428800000000000000e6 +16 5 2 3 0.52428800000000000000e6 +17 3 2 4 0.52428800000000000000e6 +17 5 2 4 0.52428800000000000000e6 +18 3 3 4 0.52428800000000000000e6 +18 5 3 4 0.52428800000000000000e6 +19 4 1 1 0.52428800000000000000e6 +19 6 1 1 0.52428800000000000000e6 +20 3 1 2 0.26214400000000000000e6 +20 5 1 4 0.26214400000000000000e6 +20 7 1 1 0.52428800000000000000e6 +*** ANSWER *** +1.408782095084682300e-09 -1.602914970239133998e-09 -2.114475512891011934e-10 1.060506402935637712e-09 2.087517807687731792e-10 1.077350266300643788e+00 2.270314862475966567e-09 3.943375646635861598e-01 1.443375636846786492e-01 -1.043524690896394265e-09 1.443375641664579045e-01 7.735026962533857187e-02 -1.056624334368447687e-01 -6.083345939969603797e-10 1.443375650931136012e-01 8.310024134167537971e-10 1.443375652667332198e-01 8.309942911694060400e-10 6.728192240935055053e-11 -1.043513922667392298e-09 +1 1 1 1 1.330530885183390903e-04 +1 1 1 2 8.214148034180060801e-05 +1 1 1 3 -1.108594137702602865e-04 +1 1 1 4 -2.671175914456134972e-05 +1 1 2 2 1.529452953417394234e-03 +1 1 2 3 -3.220826699857075488e-05 +1 1 2 4 1.094460536356985526e-04 +1 1 3 3 9.734421724350746097e-04 +1 1 3 4 3.220826699857075488e-05 +1 1 4 4 3.093986979516172992e-04 +1 2 1 1 5.242880001330530504e+05 +1 3 1 1 5.648418173916740343e+05 +1 3 1 2 2.067464527572999068e+05 +1 3 1 3 1.190298838617799559e-03 +1 3 1 4 2.067464531023422605e+05 +1 3 2 2 7.567445356255496154e+04 +1 3 2 3 4.356845933254430148e-04 +1 3 2 4 7.567445341856502637e+04 +1 3 3 3 4.263346992943815167e-04 +1 3 3 4 4.356803349286255539e-04 +1 3 4 4 7.567445381514604378e+04 +1 4 1 1 2.702917289243138982e-04 +1 5 1 1 4.055381913477168564e+04 +1 5 1 2 -5.539754590173647011e+04 +1 5 1 3 -3.189425276174783636e-04 +1 5 1 4 -5.539754599425887864e+04 +1 5 2 2 7.567445430098052020e+04 +1 5 2 3 4.356845933254430148e-04 +1 5 2 4 7.567445341856502637e+04 +1 5 3 3 4.263346992943815167e-04 +1 5 3 4 4.356803349286255539e-04 +1 5 4 4 7.567445455375360325e+04 +1 6 1 1 1.008717276971229926e-03 +1 7 1 1 4.263403449476284995e-04 +2 1 1 1 3.732050805139206062e+00 +2 1 1 2 -2.205738840307738535e-01 +2 1 1 3 5.137913862465819381e-01 +2 1 1 4 3.567764125113345175e-01 +2 1 2 2 5.161058505748374881e-01 +2 1 2 3 1.025309913312429100e-02 +2 1 2 4 9.345606857400022560e-02 +2 1 3 3 8.811272648758491366e-01 +2 1 3 4 1.025319644422157360e-02 +2 1 4 4 1.670806359981827249e+00 +2 2 1 1 8.098914071311708108e-10 +2 3 1 1 4.226497034578959866e-01 +2 3 1 2 -5.773502179991629735e-01 +2 3 1 3 -9.731109619819040465e-08 +2 3 1 4 -5.773502914078270098e-01 +2 3 2 2 1.577349906909063293e+00 +2 3 2 3 1.505172131122550902e-03 +2 3 2 4 2.930749784308271307e-07 +2 3 3 3 9.908839907289483939e-01 +2 3 3 4 -1.505025080282298283e-03 +2 3 4 4 1.577350096785630651e+00 +2 4 1 1 1.577350413010018881e+00 +2 5 1 1 1.577350296542107566e+00 +2 5 1 2 5.773502179991624184e-01 +2 5 1 3 9.731109619863104707e-08 +2 5 1 4 5.773502914078268988e-01 +2 5 2 2 4.226500930909433684e-01 +2 5 2 3 -1.505172131122590150e-03 +2 5 2 4 -2.930749781209982017e-07 +2 5 3 3 1.009116009271051828e+00 +2 5 3 4 1.505025080282901100e-03 +2 5 4 4 4.226499032143684609e-01 +2 6 1 1 4.226495869899809521e-01 +2 7 1 1 9.999999265913350754e-01 +*** END *** +*** REQUEST *** +"" +5 +5 +4 1 1 1 1 +0.15728640000000000000e7 0.10485760000000000000e7 -0.52428800000000000000e6 -0.15728640000000000000e7 0.10485760000000000000e7 +0 1 2 2 0.52428800000000000000e6 +0 1 4 4 -0.52428800000000000000e6 +0 2 1 1 -0.52428800000000000000e6 +0 4 1 1 -0.52428800000000000000e6 +1 1 1 1 0.52428800000000000000e6 +1 1 2 2 -0.52428800000000000000e6 +1 1 4 4 0.52428800000000000000e6 +1 2 1 1 0.52428800000000000000e6 +1 4 1 1 0.52428800000000000000e6 +2 1 1 2 0.52428800000000000000e6 +2 1 1 4 -0.52428800000000000000e6 +2 4 1 1 0.10485760000000000000e7 +3 1 1 3 0.52428800000000000000e6 +3 1 1 4 -0.26214400000000000000e6 +3 1 4 4 -0.52428800000000000000e6 +4 1 2 2 -0.52428800000000000000e6 +4 1 2 4 0.52428800000000000000e6 +4 1 4 4 -0.52428800000000000000e6 +4 5 1 1 -0.52428800000000000000e6 +5 3 1 1 0.52428800000000000000e6 +5 4 1 1 0.52428800000000000000e6 +*** ANSWER *** +Failure +*** END *** +*** REQUEST *** +"" +20 +7 +4 1 4 1 4 1 1 +0.52428800000000000000e6 0.10485760000000000000e7 -0.52428800000000000000e6 0.0 -0.10485760000000000000e7 0.52428800000000000000e6 0.0 0.0 0.0 0.10485760000000000000e7 0.10485760000000000000e7 0.52428800000000000000e6 0.0 0.0 0.10485760000000000000e7 0.0 0.0 0.0 0.10485760000000000000e7 0.52428800000000000000e6 +0 1 1 2 0.26214400000000000000e6 +0 1 1 4 -0.26214400000000000000e6 +0 2 1 1 -0.52428800000000000000e6 +0 3 1 2 0.26214400000000000000e6 +0 5 1 4 -0.26214400000000000000e6 +1 1 2 3 0.52428800000000000000e6 +1 1 3 4 -0.52428800000000000000e6 +1 5 1 4 0.26214400000000000000e6 +1 5 4 4 0.52428800000000000000e6 +2 1 1 1 0.52428800000000000000e6 +2 1 1 2 -0.26214400000000000000e6 +2 1 1 4 0.26214400000000000000e6 +2 2 1 1 0.52428800000000000000e6 +2 3 1 2 -0.26214400000000000000e6 +2 5 1 4 0.26214400000000000000e6 +3 1 1 3 0.52428800000000000000e6 +3 1 1 4 -0.26214400000000000000e6 +3 1 4 4 -0.52428800000000000000e6 +4 1 2 2 0.52428800000000000000e6 +4 1 4 4 -0.52428800000000000000e6 +4 3 1 2 -0.26214400000000000000e6 +4 5 1 4 0.26214400000000000000e6 +5 1 2 4 0.52428800000000000000e6 +5 1 4 4 -0.10485760000000000000e7 +5 5 1 4 0.52428800000000000000e6 +6 1 1 2 -0.26214400000000000000e6 +6 1 1 4 0.26214400000000000000e6 +6 3 1 1 0.52428800000000000000e6 +7 1 2 3 -0.52428800000000000000e6 +7 1 3 4 0.52428800000000000000e6 +7 3 1 3 0.52428800000000000000e6 +8 3 1 4 0.52428800000000000000e6 +8 5 1 4 0.52428800000000000000e6 +9 1 1 2 -0.26214400000000000000e6 +9 1 1 4 0.26214400000000000000e6 +9 1 2 3 -0.52428800000000000000e6 +9 1 3 4 0.52428800000000000000e6 +9 3 1 2 0.26214400000000000000e6 +9 3 2 2 0.52428800000000000000e6 +9 4 1 1 -0.52428800000000000000e6 +10 3 3 3 0.52428800000000000000e6 +10 5 3 3 0.52428800000000000000e6 +11 3 4 4 0.52428800000000000000e6 +11 5 4 4 0.52428800000000000000e6 +12 1 1 2 0.26214400000000000000e6 +12 1 1 4 -0.26214400000000000000e6 +12 5 1 1 0.52428800000000000000e6 +13 3 1 2 0.52428800000000000000e6 +13 5 1 2 0.52428800000000000000e6 +14 1 2 3 0.52428800000000000000e6 +14 1 3 4 -0.52428800000000000000e6 +14 5 1 3 0.52428800000000000000e6 +15 1 1 2 0.26214400000000000000e6 +15 1 1 4 -0.26214400000000000000e6 +15 1 2 3 0.52428800000000000000e6 +15 1 3 4 -0.52428800000000000000e6 +15 3 1 2 -0.26214400000000000000e6 +15 4 1 1 0.52428800000000000000e6 +15 5 2 2 0.52428800000000000000e6 +16 3 2 3 0.52428800000000000000e6 +16 5 2 3 0.52428800000000000000e6 +17 3 2 4 0.52428800000000000000e6 +17 5 2 4 0.52428800000000000000e6 +18 3 3 4 0.52428800000000000000e6 +18 5 3 4 0.52428800000000000000e6 +19 4 1 1 0.52428800000000000000e6 +19 6 1 1 0.52428800000000000000e6 +20 3 1 2 0.26214400000000000000e6 +20 5 1 4 0.26214400000000000000e6 +20 7 1 1 0.52428800000000000000e6 +*** ANSWER *** +-1.342740204690445689e-09 -2.443476177054283141e-10 2.208932891713355532e-11 -1.532345868404048473e-10 -3.139235197662867899e-11 7.735026948775075573e-02 -1.878276659880920590e-10 -1.056624331004991646e-01 1.443375666874165963e-01 -5.878259238021636008e-11 1.443375675305158257e-01 1.077350268749102113e+00 3.943375672624861439e-01 7.009819313570835847e-10 1.443375671349980405e-01 2.565769883584886009e-10 1.443375668147544033e-01 2.565774798454362362e-10 -1.533677802886606955e-10 -5.878157252238425958e-11 +1 1 1 1 3.819385166459426766e-05 +1 1 1 2 -1.224727351209503210e-05 +1 1 1 3 1.158117007930611745e-05 +1 1 1 4 6.456670668867969332e-06 +1 1 2 2 8.596332039075612469e-05 +1 1 2 3 -3.328776165281337803e-06 +1 1 2 4 -1.645863343312269685e-05 +1 1 3 3 1.663023754561376508e-04 +1 1 3 4 3.328776165281337803e-06 +1 1 4 4 2.679775273084598897e-04 +1 2 1 1 5.242880000381938880e+05 +1 3 1 1 4.055381825549624773e+04 +1 3 1 2 -5.539754556360188144e+04 +1 3 1 3 -9.847579134556480943e-05 +1 3 1 4 -5.539754572539450601e+04 +1 3 2 2 7.567445432971464470e+04 +1 3 2 3 1.345202360724952716e-04 +1 3 2 4 7.567445423017395660e+04 +1 3 3 3 1.354833676622995212e-04 +1 3 3 4 1.345204937532040734e-04 +1 3 4 4 7.567445477174146799e+04 +1 4 1 1 3.205550771721316777e-04 +1 5 1 1 5.648418178682315629e+05 +1 5 1 2 2.067464544649143354e+05 +1 5 1 3 3.675164148273426384e-04 +1 5 1 4 2.067464537865225575e+05 +1 5 2 2 7.567445456437622488e+04 +1 5 2 3 1.345202360724952716e-04 +1 5 2 4 7.567445423017395660e+04 +1 5 3 3 1.354833676622995212e-04 +1 5 3 4 1.345204937532040734e-04 +1 5 4 4 7.567445406775889569e+04 +1 6 1 1 8.589348866415696254e-05 +1 7 1 1 1.354839023615227872e-04 +2 1 1 1 3.732050806982222912e+00 +2 1 1 2 4.978948750854587102e-01 +2 1 1 3 -1.308563853401384369e-01 +2 1 1 4 -7.945539498499690212e-02 +2 1 2 2 1.972443161412036128e+00 +2 1 2 3 6.164324605351467062e-02 +2 1 2 4 3.950928845234424891e-01 +2 1 3 3 1.074616625792238045e+00 +2 1 3 4 6.164321803416509399e-02 +2 1 4 4 8.177426243047174470e-01 +2 2 1 1 1.955522350017796180e-10 +2 3 1 1 1.577350270070454030e+00 +2 3 1 2 5.773502768885938607e-01 +2 3 1 3 2.801934864614735047e-08 +2 3 1 4 5.773502602187255972e-01 +2 3 2 2 4.226498160836150153e-01 +2 3 2 3 5.093594914049283211e-03 +2 3 2 4 -7.563114304291618158e-08 +2 3 3 3 9.993357808178476853e-01 +2 3 3 4 -5.093634164081054828e-03 +2 3 4 4 4.226497958199734173e-01 +2 4 1 1 4.226497668630540550e-01 +2 5 1 1 4.226497299295452481e-01 +2 5 1 2 -5.773502768885936387e-01 +2 5 1 3 -2.801934814184621462e-08 +2 5 1 4 -5.773502602187251531e-01 +2 5 2 2 1.577350183916385928e+00 +2 5 2 3 -5.093594914048740242e-03 +2 5 2 4 7.563114485286020668e-08 +2 5 3 3 1.000664219182152204e+00 +2 5 3 4 5.093634164081858005e-03 +2 5 4 4 1.577350204180030468e+00 +2 6 1 1 1.577350233136946223e+00 +2 7 1 1 9.999999833301308483e-01 +*** END *** +*** REQUEST *** +"" +1 +2 +2 1 +0.10485760000000000000e7 +0 1 1 2 -0.39321600000000000000e6 +0 1 2 2 -0.10485760000000000000e7 +0 2 1 1 -0.26214400000000000000e6 +1 1 1 1 0.78643200000000000000e6 +1 1 1 2 0.39321600000000000000e6 +1 1 2 2 0.10485760000000000000e7 +1 2 1 1 0.26214400000000000000e6 +*** ANSWER *** +2.307692288662617774e-01 +1 1 1 1 1.814843072622968175e+05 +1 1 1 2 4.839581530978759984e+05 +1 1 2 2 1.290555075994214043e+06 +1 2 1 1 3.226387697984621627e+05 +2 1 1 1 1.641025635602554322e+00 +2 1 1 2 -6.154074322501330574e-01 +2 1 2 2 2.307863458333510587e-01 +2 2 1 1 6.609332998881102657e-09 +*** END *** +*** REQUEST *** +"" +1 +2 +5 1 +0.15728640000000000000e7 +0 1 2 2 -0.52428800000000000000e6 +0 1 3 4 0.10485760000000000000e7 +0 2 1 1 -0.52428800000000000000e6 +1 1 1 1 0.52428800000000000000e6 +1 1 2 2 0.52428800000000000000e6 +1 1 3 4 -0.10485760000000000000e7 +1 2 1 1 0.52428800000000000000e6 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +70 +2 +15 5 +0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.39321600000000000000e6 -0.26214400000000000000e6 0.26214400000000000000e6 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.39321600000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.39321600000000000000e6 0.0 0.0 0.13107200000000000000e6 0.13107200000000000000e6 0.0 0.0 -0.10485760000000000000e7 0.0 +0 1 2 2 -0.13107200000000000000e6 +0 1 4 7 0.26214400000000000000e6 +0 2 1 1 -0.13107200000000000000e6 +1 1 4 11 -0.65536000000000000000e5 +1 1 11 12 -0.65536000000000000000e5 +1 1 14 15 -0.65536000000000000000e5 +2 1 4 7 -0.65536000000000000000e5 +2 1 8 11 -0.65536000000000000000e5 +2 1 10 15 -0.65536000000000000000e5 +3 1 2 13 -0.65536000000000000000e5 +3 1 3 6 0.65536000000000000000e5 +3 1 6 9 -0.26214400000000000000e6 +3 1 13 14 -0.65536000000000000000e5 +3 2 3 3 0.13107200000000000000e6 +4 1 1 5 -0.65536000000000000000e5 +4 1 3 11 -0.65536000000000000000e5 +4 1 8 15 -0.65536000000000000000e5 +5 1 1 4 -0.65536000000000000000e5 +5 1 1 12 -0.65536000000000000000e5 +5 1 11 14 -0.65536000000000000000e5 +6 1 1 1 0.13107200000000000000e6 +6 1 2 2 0.13107200000000000000e6 +6 1 4 7 -0.26214400000000000000e6 +6 2 1 1 0.13107200000000000000e6 +7 1 1 3 0.13107200000000000000e6 +7 1 2 2 -0.26214400000000000000e6 +8 1 1 6 0.13107200000000000000e6 +8 1 3 6 0.13107200000000000000e6 +8 1 6 9 -0.52428800000000000000e6 +8 2 3 3 0.26214400000000000000e6 +9 1 1 7 0.13107200000000000000e6 +9 1 3 7 0.13107200000000000000e6 +9 1 7 9 -0.52428800000000000000e6 +9 2 1 4 0.13107200000000000000e6 +10 1 1 9 0.13107200000000000000e6 +10 1 4 7 -0.13107200000000000000e6 +11 1 1 10 0.13107200000000000000e6 +11 1 3 10 0.13107200000000000000e6 +11 1 9 10 -0.52428800000000000000e6 +11 2 4 4 0.26214400000000000000e6 +12 1 1 11 0.13107200000000000000e6 +12 1 3 11 0.13107200000000000000e6 +12 1 9 11 -0.52428800000000000000e6 +12 2 1 5 0.13107200000000000000e6 +13 1 1 13 0.13107200000000000000e6 +13 1 4 11 -0.13107200000000000000e6 +14 1 1 15 0.13107200000000000000e6 +14 1 12 12 0.26214400000000000000e6 +14 1 13 14 -0.52428800000000000000e6 +14 2 5 5 0.26214400000000000000e6 +15 1 1 5 -0.13107200000000000000e6 +15 1 2 4 0.13107200000000000000e6 +16 1 2 6 0.13107200000000000000e6 +16 1 4 5 -0.13107200000000000000e6 +17 1 1 8 -0.13107200000000000000e6 +17 1 2 7 0.13107200000000000000e6 +18 1 2 8 0.13107200000000000000e6 +18 1 3 7 -0.13107200000000000000e6 +19 1 2 10 0.13107200000000000000e6 +19 1 7 8 -0.13107200000000000000e6 +20 1 1 12 -0.13107200000000000000e6 +20 1 2 11 0.13107200000000000000e6 +21 1 2 12 0.13107200000000000000e6 +21 1 3 11 -0.13107200000000000000e6 +22 1 2 14 0.13107200000000000000e6 +22 1 8 11 -0.13107200000000000000e6 +23 1 2 15 0.13107200000000000000e6 +23 1 11 12 -0.13107200000000000000e6 +24 1 2 2 0.13107200000000000000e6 +24 1 3 3 0.13107200000000000000e6 +24 1 5 8 -0.26214400000000000000e6 +24 2 2 2 0.13107200000000000000e6 +25 1 2 5 -0.13107200000000000000e6 +25 1 3 4 0.13107200000000000000e6 +26 1 1 5 0.13107200000000000000e6 +26 1 3 5 0.13107200000000000000e6 +26 1 5 9 -0.52428800000000000000e6 +26 2 2 3 0.13107200000000000000e6 +27 1 1 8 0.13107200000000000000e6 +27 1 3 8 0.13107200000000000000e6 +27 1 8 9 -0.52428800000000000000e6 +27 2 2 4 0.13107200000000000000e6 +28 1 3 9 0.13107200000000000000e6 +28 1 5 8 -0.13107200000000000000e6 +29 1 3 13 0.13107200000000000000e6 +29 1 5 12 -0.13107200000000000000e6 +30 1 3 15 0.13107200000000000000e6 +30 1 12 12 -0.26214400000000000000e6 +31 1 3 6 0.65536000000000000000e5 +31 1 4 4 0.13107200000000000000e6 +31 1 6 9 -0.26214400000000000000e6 +31 2 3 3 0.13107200000000000000e6 +32 1 2 9 -0.13107200000000000000e6 +32 1 4 8 0.13107200000000000000e6 +33 1 1 4 -0.32768000000000000000e5 +33 1 2 5 -0.32768000000000000000e5 +33 1 4 9 0.13107200000000000000e6 +33 2 1 3 -0.32768000000000000000e5 +34 1 4 10 0.13107200000000000000e6 +34 1 7 9 -0.13107200000000000000e6 +35 1 2 13 -0.13107200000000000000e6 +35 1 4 12 0.13107200000000000000e6 +36 1 4 14 0.13107200000000000000e6 +36 1 9 11 -0.13107200000000000000e6 +37 1 3 6 -0.65536000000000000000e5 +37 1 5 5 0.13107200000000000000e6 +38 1 2 9 -0.13107200000000000000e6 +38 1 5 7 0.13107200000000000000e6 +39 1 5 10 0.13107200000000000000e6 +39 1 8 9 -0.13107200000000000000e6 +40 1 2 13 -0.13107200000000000000e6 +40 1 5 11 0.13107200000000000000e6 +41 1 5 14 0.13107200000000000000e6 +41 1 9 12 -0.13107200000000000000e6 +42 1 5 15 0.13107200000000000000e6 +42 1 12 13 -0.13107200000000000000e6 +43 1 1 4 -0.32768000000000000000e5 +43 1 2 5 -0.32768000000000000000e5 +43 1 6 7 0.13107200000000000000e6 +43 2 1 3 -0.32768000000000000000e5 +44 1 5 9 -0.13107200000000000000e6 +44 1 6 8 0.13107200000000000000e6 +45 1 6 10 0.13107200000000000000e6 +45 1 9 9 -0.26214400000000000000e6 +46 1 4 13 -0.13107200000000000000e6 +46 1 6 11 0.13107200000000000000e6 +47 1 5 13 -0.13107200000000000000e6 +47 1 6 12 0.13107200000000000000e6 +48 1 4 11 -0.32768000000000000000e5 +48 1 5 12 -0.32768000000000000000e5 +48 1 6 14 0.13107200000000000000e6 +48 2 3 5 -0.32768000000000000000e5 +49 1 3 10 0.65536000000000000000e5 +49 1 7 7 0.13107200000000000000e6 +49 1 9 10 -0.26214400000000000000e6 +49 2 4 4 0.13107200000000000000e6 +50 1 1 14 -0.13107200000000000000e6 +50 1 7 11 0.13107200000000000000e6 +51 1 7 12 0.13107200000000000000e6 +51 1 8 11 -0.13107200000000000000e6 +52 1 7 13 0.13107200000000000000e6 +52 1 9 11 -0.13107200000000000000e6 +53 1 7 15 0.13107200000000000000e6 +53 1 11 14 -0.13107200000000000000e6 +54 1 3 10 -0.65536000000000000000e5 +54 1 8 8 0.13107200000000000000e6 +55 1 3 14 -0.13107200000000000000e6 +55 1 8 12 0.13107200000000000000e6 +56 1 8 13 0.13107200000000000000e6 +56 1 9 12 -0.13107200000000000000e6 +57 1 8 14 0.13107200000000000000e6 +57 1 10 12 -0.13107200000000000000e6 +58 1 4 11 -0.32768000000000000000e5 +58 1 5 12 -0.32768000000000000000e5 +58 1 9 13 0.13107200000000000000e6 +58 2 3 5 -0.32768000000000000000e5 +59 1 9 14 0.13107200000000000000e6 +59 1 10 13 -0.13107200000000000000e6 +60 1 9 15 0.13107200000000000000e6 +60 1 13 14 -0.13107200000000000000e6 +61 1 7 14 -0.13107200000000000000e6 +61 1 10 11 0.13107200000000000000e6 +62 1 11 11 0.13107200000000000000e6 +62 1 12 12 0.13107200000000000000e6 +62 1 13 14 -0.26214400000000000000e6 +62 2 5 5 0.13107200000000000000e6 +63 1 4 15 -0.13107200000000000000e6 +63 1 11 13 0.13107200000000000000e6 +64 1 8 15 -0.13107200000000000000e6 +64 1 12 14 0.13107200000000000000e6 +65 1 6 15 -0.65536000000000000000e5 +65 1 13 13 0.13107200000000000000e6 +66 1 10 15 -0.65536000000000000000e5 +66 1 14 14 0.13107200000000000000e6 +67 1 1 2 0.13107200000000000000e6 +67 1 2 3 0.13107200000000000000e6 +67 1 2 9 -0.52428800000000000000e6 +67 2 1 2 0.13107200000000000000e6 +68 1 1 12 0.13107200000000000000e6 +68 1 3 12 0.13107200000000000000e6 +68 1 9 12 -0.52428800000000000000e6 +68 2 2 5 0.13107200000000000000e6 +69 1 4 7 0.13107200000000000000e6 +69 1 5 8 0.13107200000000000000e6 +69 1 9 9 -0.10485760000000000000e7 +69 2 3 4 0.13107200000000000000e6 +70 1 1 14 0.13107200000000000000e6 +70 1 3 14 0.13107200000000000000e6 +70 1 10 13 -0.52428800000000000000e6 +70 2 4 5 0.13107200000000000000e6 +*** ANSWER *** +0.000000000000000000e+00 -3.999999986495791582e+00 -3.024815517261341686e-09 0.000000000000000000e+00 0.000000000000000000e+00 -1.714681008448819494e-09 1.502293844990588603e-10 3.505253171382940855e-11 0.000000000000000000e+00 -2.902858744273215266e-10 -2.755080536853938367e-10 0.000000000000000000e+00 0.000000000000000000e+00 -1.620141642849418438e-10 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.999999992247683656e+00 0.000000000000000000e+00 -1.075928324627131701e-10 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 4.057080075440344468e-11 0.000000000000000000e+00 -7.983045789758037383e-11 2.948634585697572200e-09 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.044468288046854071e-10 0.000000000000000000e+00 2.687050939333491147e-12 0.000000000000000000e+00 0.000000000000000000e+00 2.627311247124930381e-10 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -4.153655221542978990e-10 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.367692572419574050e-10 0.000000000000000000e+00 3.968103463215676299e-10 0.000000000000000000e+00 0.000000000000000000e+00 2.447115870193265508e-10 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.808560050528084742e-10 0.000000000000000000e+00 8.916141910764070674e-11 0.000000000000000000e+00 0.000000000000000000e+00 2.630211613752171180e-10 3.999999984062315939e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.295938361272574264e-10 0.000000000000000000e+00 +1 1 1 1 5.088645099259438490e-05 +1 1 1 3 1.969086588506064293e-05 +1 1 1 6 4.594405436795048238e-06 +1 1 1 9 -3.804835013293788714e-05 +1 1 1 10 -3.611139161265194096e-05 +1 1 1 15 -2.123552054115589735e-05 +1 1 2 2 1.310719999974023085e+05 +1 1 2 13 2.037020705060112354e-04 +1 1 2 14 2.621439989838883921e+05 +1 1 3 3 2.615307123954458551e-04 +1 1 3 6 -5.742866645285253299e-07 +1 1 3 9 5.317695996481168301e-06 +1 1 3 10 -1.041750013694160530e-05 +1 1 3 15 -1.046353777755165476e-05 +1 1 4 4 6.621165525485493697e-04 +1 1 4 7 -3.804839762125188443e-04 +1 1 4 12 -3.990445474508772569e-05 +1 1 5 5 2.759853172727188067e-04 +1 1 5 8 3.987324276549618482e-05 +1 1 5 11 3.443669397831588749e-05 +1 1 6 6 2.756331201319989210e-04 +1 1 6 9 1.592752376673354196e-06 +1 1 6 10 -5.444278971980813422e-05 +1 1 6 15 -1.723735483188622904e-05 +1 1 7 7 3.590957402172158947e-04 +1 1 7 12 5.201072571306051238e-05 +1 1 8 8 3.077079572657952233e-04 +1 1 8 11 7.908908002808882551e-05 +1 1 9 9 2.486297132606391305e-04 +1 1 9 10 -2.247967371982813496e-05 +1 1 9 15 -2.370515829428171233e-05 +1 1 10 10 2.756331201319989210e-04 +1 1 10 15 1.594802450380029477e-04 +1 1 11 11 2.873196856572751701e-04 +1 1 12 12 2.657757201300660344e-04 +1 1 13 13 3.101078297957707286e-04 +1 1 13 14 2.835084191475910082e-04 +1 1 14 14 5.242879981866489979e+05 +1 1 15 15 2.756331201319989210e-04 +1 2 1 1 1.310720000508864468e+05 +1 2 2 2 2.615307123954458551e-04 +1 2 3 3 2.748367439436615392e-04 +1 2 3 4 1.698612328887188540e-05 +1 2 4 4 2.868729569919115790e-04 +1 2 5 5 2.448486445749626164e-04 +2 1 1 1 6.999999996353073684e+00 +2 1 1 3 -3.266131310109827157e-01 +2 1 1 6 1.032088951718121012e-01 +2 1 1 9 1.168346716791389239e+00 +2 1 1 10 1.314551787203173117e+00 +2 1 1 15 2.041043849994600978e-01 +2 1 2 2 6.733868689890164516e-01 +2 1 2 13 -2.064178287591859617e-01 +2 1 2 14 -3.366934310405373942e-01 +2 1 3 3 1.334793739378133948e+00 +2 1 3 6 1.290987389104061578e-01 +2 1 3 9 1.207163056739554430e-01 +2 1 3 10 9.732808333720763261e-02 +2 1 3 15 -3.467963090985101693e-02 +2 1 4 4 1.103208895171817305e+00 +2 1 4 7 1.168346716791390127e+00 +2 1 4 12 -2.064178287591863781e-01 +2 1 5 5 1.129098738910406352e+00 +2 1 5 8 1.207163056739558454e-01 +2 1 5 11 -2.064178287591858785e-01 +2 1 6 6 1.441759502747176569e+00 +2 1 6 9 1.703654477413890367e-01 +2 1 6 10 2.711767616773516631e-01 +2 1 6 15 1.638419698608697128e-01 +2 1 7 7 2.314551787203172672e+00 +2 1 7 12 -3.366934310405386155e-01 +2 1 8 8 1.097328083337207882e+00 +2 1 8 11 -3.366934310405380049e-01 +2 1 9 9 1.271176761677351719e+00 +2 1 9 10 4.458907672314606496e-01 +2 1 9 15 1.032089335873643265e-01 +2 1 10 10 2.016214326311104532e+00 +2 1 10 15 -8.316532857508507348e-01 +2 1 11 11 1.204104384999458821e+00 +2 1 12 12 9.653203690901489553e-01 +2 1 13 13 1.163841969860869074e+00 +2 1 13 14 1.032089335873649649e-01 +2 1 14 14 1.683467142491453794e-01 +2 1 15 15 1.900601776966958534e+00 +2 2 1 1 1.823449816613317400e-09 +2 2 2 2 1.474684614328671595e+00 +2 2 3 3 1.449154156883336375e+00 +2 2 3 4 -2.043559757559340606e-01 +2 2 4 4 1.371683198385462932e+00 +2 2 5 5 1.243410980259853194e+00 +*** END *** +*** REQUEST *** +"" +4 +5 +3 1 1 1 1 +0.10485760000000000000e7 0.10485760000000000000e7 0.10485760000000000000e7 0.52428800000000000000e6 +0 1 2 2 -0.52428800000000000000e6 +0 1 3 3 0.52428800000000000000e6 +0 2 1 1 -0.52428800000000000000e6 +1 1 1 1 0.52428800000000000000e6 +1 1 2 2 0.52428800000000000000e6 +1 1 3 3 -0.52428800000000000000e6 +1 2 1 1 0.52428800000000000000e6 +2 1 1 2 -0.52428800000000000000e6 +2 1 1 3 0.52428800000000000000e6 +2 4 1 1 0.10485760000000000000e7 +3 1 1 2 -0.52428800000000000000e6 +3 3 1 1 0.52428800000000000000e6 +3 4 1 1 0.52428800000000000000e6 +4 1 2 2 -0.52428800000000000000e6 +4 1 3 3 0.52428800000000000000e6 +4 5 1 1 0.52428800000000000000e6 +*** ANSWER *** +-2.874631848909842333e-09 8.664272116492426616e-24 -8.301572844558803433e-10 9.999999947692463920e-01 +1 1 1 1 2.934653518525875623e-04 +1 1 1 2 4.352415023528011240e-04 +1 1 1 3 4.542573899411581366e-18 +1 1 2 2 3.035886662107224743e-03 +1 1 3 3 5.653139376298448732e-04 +1 2 1 1 5.242880002934653312e+05 +1 3 1 1 1.365358832301027253e-03 +1 4 1 1 1.365358832301034192e-03 +1 5 1 1 5.242879990581789752e+05 +2 1 1 1 2.999999997386312955e+00 +2 1 1 2 -1.723337228685464240e-01 +2 1 1 3 1.218984024759611367e-14 +2 1 2 2 3.618177634088584615e-01 +2 1 2 3 -8.223950049990433328e-15 +2 1 3 3 1.361817762102015994e+00 +2 2 1 1 1.306844421807600828e-09 +2 3 1 1 8.276662771314665656e-01 +2 4 1 1 8.276662771314412526e-01 +2 5 1 1 1.306842905878962143e-09 +*** END *** +*** REQUEST *** +"" +1 +2 +3 1 +-0.10485760000000000000e7 +0 1 1 1 0.52428800000000000000e6 +1 1 1 2 0.52428800000000000000e6 +1 1 1 3 0.52428800000000000000e6 +1 2 1 1 -0.10485760000000000000e7 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +4 +3 +3 1 3 +0.26214400000000000000e6 0.26214400000000000000e6 -0.52428800000000000000e6 0.10485760000000000000e7 +0 1 1 1 0.52428800000000000000e6 +1 1 2 2 0.52428800000000000000e6 +1 1 2 3 0.26214400000000000000e6 +1 3 1 2 -0.26214400000000000000e6 +2 1 1 2 -0.26214400000000000000e6 +2 1 1 3 -0.26214400000000000000e6 +2 3 1 1 0.52428800000000000000e6 +3 1 2 3 -0.52428800000000000000e6 +3 1 3 3 -0.10485760000000000000e7 +3 3 1 3 0.52428800000000000000e6 +4 1 1 1 0.52428800000000000000e6 +4 2 1 1 0.52428800000000000000e6 +4 3 2 2 0.52428800000000000000e6 +4 3 2 3 0.52428800000000000000e6 +4 3 3 3 0.52428800000000000000e6 +*** ANSWER *** +Failure +*** END *** +*** REQUEST *** +"" +14 +4 +6 1 3 1 +-0.52428800000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 0.39321600000000000000e6 0.26214400000000000000e6 0.0 0.10485760000000000000e7 0.26214400000000000000e6 0.26214400000000000000e6 0.52428800000000000000e6 0.26214400000000000000e6 0.78643200000000000000e6 +0 1 1 1 0.52428800000000000000e6 +1 1 1 3 0.52428800000000000000e6 +1 1 2 2 -0.10485760000000000000e7 +2 1 1 5 0.52428800000000000000e6 +2 1 2 2 0.10485760000000000000e7 +2 3 1 2 -0.52428800000000000000e6 +3 1 2 2 0.10485760000000000000e7 +3 1 2 4 0.52428800000000000000e6 +3 3 1 2 -0.52428800000000000000e6 +4 1 2 5 0.52428800000000000000e6 +4 1 2 6 0.52428800000000000000e6 +4 3 2 3 -0.52428800000000000000e6 +5 1 2 5 -0.52428800000000000000e6 +5 1 3 4 0.52428800000000000000e6 +6 1 1 2 0.13107200000000000000e6 +6 1 1 4 0.13107200000000000000e6 +6 1 3 3 0.26214400000000000000e6 +6 1 3 5 0.52428800000000000000e6 +6 1 3 6 0.78643200000000000000e6 +6 1 5 6 0.52428800000000000000e6 +6 1 6 6 0.26214400000000000000e6 +6 4 1 1 0.26214400000000000000e6 +7 1 1 6 -0.26214400000000000000e6 +7 1 4 4 0.52428800000000000000e6 +8 1 2 5 0.52428800000000000000e6 +8 1 4 5 0.52428800000000000000e6 +8 3 2 3 -0.52428800000000000000e6 +9 1 1 1 0.10485760000000000000e7 +9 1 2 3 0.52428800000000000000e6 +9 1 4 6 0.52428800000000000000e6 +9 2 1 1 0.10485760000000000000e7 +9 3 2 3 0.15728640000000000000e7 +10 1 3 6 -0.26214400000000000000e6 +10 1 5 5 0.52428800000000000000e6 +11 1 1 2 -0.26214400000000000000e6 +11 1 1 4 -0.26214400000000000000e6 +11 3 1 1 0.52428800000000000000e6 +12 1 1 6 -0.52428800000000000000e6 +12 1 2 2 0.10485760000000000000e7 +12 3 1 2 -0.52428800000000000000e6 +12 3 1 3 0.52428800000000000000e6 +13 1 2 3 -0.26214400000000000000e6 +13 1 2 5 -0.26214400000000000000e6 +13 3 2 2 0.52428800000000000000e6 +14 1 1 1 0.52428800000000000000e6 +14 1 2 3 0.26214400000000000000e6 +14 1 2 5 0.26214400000000000000e6 +14 2 1 1 0.52428800000000000000e6 +14 3 2 3 0.52428800000000000000e6 +14 3 3 3 0.52428800000000000000e6 +*** ANSWER *** +-1.106847476088164140e-10 7.356791287437961024e-11 1.626260578934070067e-09 8.464732015420119625e-10 8.464732012511223196e-10 1.449010447439587610e-09 1.921197997299696732e-09 1.941780561617547037e-09 6.562099206323578718e-10 3.681286449449734143e-09 9.801835322020321617e-10 -8.499142509722558133e-10 9.999999988286795150e-01 9.999999988286794039e-01 +1 1 1 1 3.177290993297571947e-04 +1 1 1 2 -6.702453449876854229e-05 +1 1 1 3 -5.803068495433114007e-05 +1 1 1 4 -6.702453449876854229e-05 +1 1 1 5 3.857077390508273709e-05 +1 1 1 6 -5.803068499039051170e-05 +1 1 2 2 1.251013569424922617e-03 +1 1 2 3 3.440429857844620049e-04 +1 1 2 4 8.526289064081857272e-04 +1 1 2 5 1.018052231210209158e-03 +1 1 2 6 4.437957418900583678e-04 +1 1 3 3 6.236019192508053532e-04 +1 1 3 4 4.437957417375484187e-04 +1 1 3 5 7.596987894672065089e-04 +1 1 3 6 1.745210291962603910e-04 +1 1 4 4 1.251013580125467234e-03 +1 1 4 5 1.018052247089340501e-03 +1 1 4 6 3.440429868684976439e-04 +1 1 5 5 2.173806834526302578e-03 +1 1 5 6 7.596987894672065089e-04 +1 1 6 6 6.236019192508053532e-04 +1 2 1 1 5.242880003177291946e+05 +1 3 1 1 7.576509882483428715e-04 +1 3 1 2 -4.455998374995277095e-04 +1 3 1 3 -4.455998428137420558e-04 +1 3 2 2 5.242879996296432219e+05 +1 3 2 3 5.242879989561716793e+05 +1 3 3 3 5.242879996296432219e+05 +1 4 1 1 6.236019192508053532e-04 +2 1 1 1 1.999999998178647376e+00 +2 1 1 2 1.346399163068515148e-01 +2 1 1 3 6.781452981432495308e-01 +2 1 1 4 1.346399175837738604e-01 +2 1 1 5 -6.781452979395156122e-01 +2 1 1 6 6.781452984226529201e-01 +2 1 2 2 1.178145298143248310e+00 +2 1 2 3 1.982722439910740431e-01 +2 1 2 4 -6.781452979395147240e-01 +2 1 2 5 -2.327574136236412461e-01 +2 1 2 6 -2.327574162884535891e-01 +2 1 3 3 2.342559240944939614e+00 +2 1 3 4 -2.327574136236410518e-01 +2 1 3 5 -1.148202142920628610e+00 +2 1 3 6 7.993425932778602805e-01 +2 1 4 4 1.178145298422653031e+00 +2 1 4 5 -2.327574162884527564e-01 +2 1 4 6 1.982722466558785035e-01 +2 1 5 5 1.299342593277859947e+00 +2 1 5 6 -1.148202143511011464e+00 +2 1 6 6 2.342559242180799917e+00 +2 2 1 1 9.106764973835335516e-10 +2 3 1 1 7.692798338906251532e-01 +2 3 1 2 2.037339898589072536e-10 +2 3 1 3 4.831352180278556857e-10 +2 3 2 2 4.655148303674320198e-01 +2 3 2 3 -4.655148299120935862e-01 +2 3 3 3 4.655148303674318533e-01 +2 4 1 1 9.351632690430405903e-01 +*** END *** +*** REQUEST *** +"" +68 +13 +14 1 1 1 1 1 1 1 1 1 1 1 1 +0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.10485760000000000000e7 -0.10485760000000000000e7 0.10485760000000000000e7 0.0 0.10485760000000000000e7 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.26214400000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 0.26214400000000000000e6 0.26214400000000000000e6 +0 1 4 5 -0.52428800000000000000e6 +0 1 5 6 0.52428800000000000000e6 +0 2 1 1 -0.52428800000000000000e6 +0 4 1 1 -0.52428800000000000000e6 +0 10 1 1 0.52428800000000000000e6 +2 1 3 14 -0.52428800000000000000e6 +3 1 2 7 0.52428800000000000000e6 +3 1 7 8 0.52428800000000000000e6 +3 1 13 14 -0.52428800000000000000e6 +4 1 3 12 -0.52428800000000000000e6 +5 1 3 11 -0.52428800000000000000e6 +6 1 3 10 -0.52428800000000000000e6 +7 1 7 9 0.52428800000000000000e6 +7 1 9 14 -0.52428800000000000000e6 +8 1 2 3 0.52428800000000000000e6 +8 1 2 7 0.52428800000000000000e6 +8 1 7 8 0.52428800000000000000e6 +8 1 13 14 -0.52428800000000000000e6 +9 1 7 7 0.10485760000000000000e7 +9 1 7 14 -0.52428800000000000000e6 +10 1 3 6 -0.52428800000000000000e6 +11 1 3 5 -0.52428800000000000000e6 +12 1 3 4 -0.52428800000000000000e6 +13 1 3 14 -0.52428800000000000000e6 +13 1 7 7 -0.10485760000000000000e7 +13 1 7 14 0.52428800000000000000e6 +14 1 2 3 -0.52428800000000000000e6 +15 1 1 2 -0.52428800000000000000e6 +15 4 1 1 -0.10485760000000000000e7 +15 10 1 1 0.10485760000000000000e7 +16 1 2 3 -0.52428800000000000000e6 +16 1 2 7 -0.52428800000000000000e6 +17 1 2 13 -0.52428800000000000000e6 +18 1 8 12 0.52428800000000000000e6 +18 1 12 13 -0.52428800000000000000e6 +19 1 2 11 -0.52428800000000000000e6 +20 1 2 10 -0.52428800000000000000e6 +21 1 2 9 -0.52428800000000000000e6 +22 1 8 8 0.10485760000000000000e7 +22 1 8 13 -0.52428800000000000000e6 +23 1 2 7 -0.52428800000000000000e6 +24 1 2 6 -0.52428800000000000000e6 +25 1 2 5 -0.52428800000000000000e6 +26 1 4 8 0.52428800000000000000e6 +26 1 4 13 -0.52428800000000000000e6 +27 1 2 3 -0.52428800000000000000e6 +28 1 2 13 -0.52428800000000000000e6 +28 1 8 8 -0.10485760000000000000e7 +28 1 8 13 0.52428800000000000000e6 +29 1 1 2 -0.52428800000000000000e6 +30 1 1 1 0.52428800000000000000e6 +30 1 4 5 0.52428800000000000000e6 +30 1 5 6 -0.52428800000000000000e6 +30 2 1 1 0.52428800000000000000e6 +30 4 1 1 0.52428800000000000000e6 +30 10 1 1 -0.52428800000000000000e6 +31 1 1 2 -0.52428800000000000000e6 +31 1 1 3 0.52428800000000000000e6 +31 4 1 1 -0.10485760000000000000e7 +31 10 1 1 0.10485760000000000000e7 +32 1 1 4 -0.52428800000000000000e6 +32 1 1 6 0.52428800000000000000e6 +32 12 1 1 0.10485760000000000000e7 +33 1 1 7 0.52428800000000000000e6 +33 1 1 8 -0.52428800000000000000e6 +33 1 4 5 -0.52428800000000000000e6 +33 1 5 6 0.52428800000000000000e6 +33 4 1 1 0.10485760000000000000e7 +33 12 1 1 0.10485760000000000000e7 +34 1 1 9 0.52428800000000000000e6 +34 1 1 10 -0.52428800000000000000e6 +34 1 4 5 0.52428800000000000000e6 +34 1 5 6 -0.52428800000000000000e6 +34 6 1 1 -0.10485760000000000000e7 +34 12 1 1 -0.10485760000000000000e7 +35 1 1 11 0.52428800000000000000e6 +35 1 1 12 -0.52428800000000000000e6 +35 1 4 5 -0.52428800000000000000e6 +35 1 5 6 0.52428800000000000000e6 +35 8 1 1 0.10485760000000000000e7 +35 12 1 1 0.10485760000000000000e7 +36 1 1 2 -0.52428800000000000000e6 +36 1 1 8 -0.52428800000000000000e6 +36 1 1 13 0.52428800000000000000e6 +37 1 1 2 -0.52428800000000000000e6 +37 1 1 8 -0.52428800000000000000e6 +37 1 1 14 0.52428800000000000000e6 +37 1 4 5 -0.52428800000000000000e6 +37 1 5 6 0.52428800000000000000e6 +37 10 1 1 0.10485760000000000000e7 +37 12 1 1 0.10485760000000000000e7 +38 1 2 2 0.52428800000000000000e6 +38 1 2 13 -0.26214400000000000000e6 +38 1 8 8 -0.52428800000000000000e6 +38 1 8 13 0.26214400000000000000e6 +39 1 2 4 0.52428800000000000000e6 +39 1 4 8 0.52428800000000000000e6 +39 1 4 13 -0.52428800000000000000e6 +40 1 2 8 0.52428800000000000000e6 +40 1 8 8 0.10485760000000000000e7 +40 1 8 13 -0.52428800000000000000e6 +41 1 2 12 0.52428800000000000000e6 +41 1 8 12 0.52428800000000000000e6 +41 1 12 13 -0.52428800000000000000e6 +42 1 2 3 -0.52428800000000000000e6 +42 1 2 7 -0.52428800000000000000e6 +42 1 2 14 0.52428800000000000000e6 +43 1 3 3 0.52428800000000000000e6 +43 1 3 14 -0.26214400000000000000e6 +43 1 7 7 -0.52428800000000000000e6 +43 1 7 14 0.26214400000000000000e6 +44 1 3 7 0.52428800000000000000e6 +44 1 7 7 0.10485760000000000000e7 +44 1 7 14 -0.52428800000000000000e6 +45 1 2 3 0.52428800000000000000e6 +45 1 2 7 0.52428800000000000000e6 +45 1 3 8 0.52428800000000000000e6 +45 1 7 8 0.52428800000000000000e6 +45 1 13 14 -0.52428800000000000000e6 +46 1 3 9 0.52428800000000000000e6 +46 1 7 9 0.52428800000000000000e6 +46 1 9 14 -0.52428800000000000000e6 +47 1 2 7 0.52428800000000000000e6 +47 1 3 13 0.52428800000000000000e6 +47 1 7 8 0.52428800000000000000e6 +47 1 13 14 -0.52428800000000000000e6 +48 1 3 4 -0.52428800000000000000e6 +48 1 4 7 -0.52428800000000000000e6 +48 1 4 14 0.52428800000000000000e6 +49 1 3 5 0.52428800000000000000e6 +49 1 5 7 0.52428800000000000000e6 +49 1 5 14 -0.52428800000000000000e6 +50 1 2 5 -0.52428800000000000000e6 +50 1 5 8 -0.52428800000000000000e6 +50 1 5 13 0.52428800000000000000e6 +51 1 2 6 0.52428800000000000000e6 +51 1 6 8 0.52428800000000000000e6 +51 1 6 13 -0.52428800000000000000e6 +52 1 3 6 -0.52428800000000000000e6 +52 1 6 7 -0.52428800000000000000e6 +52 1 6 14 0.52428800000000000000e6 +53 1 3 11 0.52428800000000000000e6 +53 1 7 11 0.52428800000000000000e6 +53 1 11 14 -0.52428800000000000000e6 +54 1 2 7 -0.52428800000000000000e6 +54 1 7 8 -0.52428800000000000000e6 +54 1 7 13 0.52428800000000000000e6 +55 1 2 10 0.52428800000000000000e6 +55 1 8 10 0.52428800000000000000e6 +55 1 10 13 -0.52428800000000000000e6 +56 1 2 3 0.52428800000000000000e6 +56 1 2 7 0.52428800000000000000e6 +56 1 8 14 0.52428800000000000000e6 +56 1 13 14 -0.52428800000000000000e6 +57 1 2 9 -0.52428800000000000000e6 +57 1 8 9 -0.52428800000000000000e6 +57 1 9 13 0.52428800000000000000e6 +58 1 3 10 -0.52428800000000000000e6 +58 1 7 10 -0.52428800000000000000e6 +58 1 10 14 0.52428800000000000000e6 +59 1 2 11 -0.52428800000000000000e6 +59 1 8 11 -0.52428800000000000000e6 +59 1 11 13 0.52428800000000000000e6 +60 1 3 12 -0.52428800000000000000e6 +60 1 7 12 -0.52428800000000000000e6 +60 1 12 14 0.52428800000000000000e6 +61 1 2 13 -0.26214400000000000000e6 +61 1 8 13 -0.26214400000000000000e6 +61 1 13 13 0.52428800000000000000e6 +62 1 3 14 -0.26214400000000000000e6 +62 1 7 14 -0.26214400000000000000e6 +62 1 14 14 0.52428800000000000000e6 +63 3 1 1 0.52428800000000000000e6 +63 4 1 1 0.52428800000000000000e6 +64 5 1 1 0.52428800000000000000e6 +64 6 1 1 0.52428800000000000000e6 +65 7 1 1 0.52428800000000000000e6 +65 8 1 1 0.52428800000000000000e6 +66 9 1 1 0.52428800000000000000e6 +66 10 1 1 0.52428800000000000000e6 +67 1 1 5 -0.26214400000000000000e6 +67 11 1 1 0.52428800000000000000e6 +68 1 4 5 -0.26214400000000000000e6 +68 1 5 6 0.26214400000000000000e6 +68 13 1 1 0.52428800000000000000e6 +*** ANSWER *** +0.000000000000000000e+00 6.058569425884383630e-01 -1.789199201512256809e-01 9.164139528929155921e-23 -9.163155761461444090e-23 -9.163246054070993084e-23 9.149486971463384991e-23 1.789199201512256809e-01 -6.058569425884383630e-01 -1.055084366454779290e-21 1.366896744480610378e-21 1.055171579949929567e-21 -6.058569425323364621e-01 7.445596161814049818e-02 4.999999998997861628e-01 3.000711667509576783e-02 -2.846608178953692891e-01 -3.280551426848573192e-23 3.278411316372674215e-23 3.277609884301518549e-23 -3.309393886661871509e-23 2.846608178953692891e-01 -3.000711667509576783e-02 2.999418376264351028e-22 -3.986048648375756746e-22 -3.002478041340279872e-22 7.445684185798943922e-02 2.846608179514712456e-01 -4.999999998997861628e-01 -2.004277256571925133e-10 -1.043352760304082263e-22 -1.735201074119767638e-11 1.469336945234227309e-11 -1.469337046202203813e-11 1.469337046194195670e-11 -1.469336945176598669e-11 1.469336945128446418e-11 -7.480256552598403135e-11 2.043030695300148850e-22 2.149943611159291852e-23 2.212514163610025580e-23 -2.232176720668684315e-23 -7.480256552598392796e-11 1.886758367293535417e-23 -2.163678279421658453e-23 -2.187107010804863835e-23 -2.184446602524318590e-23 -8.512507522749818196e-22 1.096210136342898243e-21 1.275093722762247945e-22 9.583495372664425687e-23 8.511625565357559287e-22 -6.971827249375136076e-23 5.890352473365390447e-23 1.064499908960213029e-23 -5.892097012994617624e-23 1.072013471116010640e-23 6.971872108307831659e-23 -1.068465091438635996e-23 -6.973137492584444626e-23 -3.740128276297283543e-11 -3.740128276285357925e-11 -8.829988951680722337e-11 -8.829988334512354440e-11 -8.829988334505664617e-11 -8.829988951680484523e-11 -4.087805043716688343e-11 1.999999999261285799e+00 +1 1 1 1 2.792993582520324203e-05 +1 1 1 2 5.429890988184294812e-17 +1 1 1 3 -5.470173319943066818e-17 +1 1 1 4 9.097451007481047354e-06 +1 1 1 5 1.071593565380067549e-05 +1 1 1 6 -9.097451007481047354e-06 +1 1 1 7 7.703557283429625672e-06 +1 1 1 8 -7.703557283177169196e-06 +1 1 1 9 -7.703557812792610326e-06 +1 1 1 10 7.703557812792610326e-06 +1 1 1 11 7.703557812750624597e-06 +1 1 1 12 -7.703557812750624597e-06 +1 1 1 13 -7.703557283127485632e-06 +1 1 1 14 7.703557282875029156e-06 +1 1 2 2 9.379369978007416619e-05 +1 1 2 3 -4.330260152043161018e-21 +1 1 2 4 1.071136477177524440e-16 +1 1 2 5 1.421321136040075024e-16 +1 1 2 6 -1.070107899460545291e-16 +1 1 2 7 -1.173239303983601472e-17 +1 1 2 8 1.127189636007482806e-17 +1 1 2 9 1.173031703305739118e-17 +1 1 2 10 -1.160307002751662270e-17 +1 1 2 11 -1.158648286378189913e-17 +1 1 2 12 1.159994625810773091e-17 +1 1 2 13 1.265993768647008194e-17 +1 1 2 14 -1.170303468525943162e-17 +1 1 3 3 9.379369978007416619e-05 +1 1 3 4 -1.069132429000433988e-16 +1 1 3 5 -1.419177404072925923e-16 +1 1 3 6 1.069137578788288642e-16 +1 1 3 7 9.892047708715930969e-18 +1 1 3 8 -1.134390557761422467e-17 +1 1 3 9 -1.146673960480860450e-17 +1 1 3 10 1.148911063276175305e-17 +1 1 3 11 1.148887242944974962e-17 +1 1 3 12 -1.148716075631041761e-17 +1 1 3 13 -1.145279140344269945e-17 +1 1 3 14 1.182357921035172199e-17 +1 1 4 4 1.330117872545616073e-04 +1 1 4 5 5.775343003930029969e-05 +1 1 4 7 4.463005544087456682e-16 +1 1 4 8 -5.030267301606862415e-17 +1 1 4 13 5.030267301606862415e-17 +1 1 4 14 -4.463005544087456682e-16 +1 1 5 5 1.330117872545616073e-04 +1 1 5 6 -5.775343003930029969e-05 +1 1 5 7 5.747298199629454340e-16 +1 1 5 8 -6.685163377195734506e-17 +1 1 5 13 6.685163377195734506e-17 +1 1 5 14 -5.747298199629454340e-16 +1 1 6 6 1.330117872545616073e-04 +1 1 6 7 -4.462543144410184044e-16 +1 1 6 8 5.024511621943486415e-17 +1 1 6 13 -5.024511621943486415e-17 +1 1 6 14 4.462543144410184044e-16 +1 1 7 7 1.134027435172385231e-04 +1 1 7 8 4.216164281923660470e-17 +1 1 7 9 3.650292264813680506e-17 +1 1 7 10 -3.655268883920496445e-17 +1 1 7 11 -3.655245364920391343e-17 +1 1 7 12 3.655932309712113304e-17 +1 1 7 13 3.088241117555793827e-17 +1 1 7 14 1.960904373724709512e-05 +1 1 8 8 1.134027435173009732e-04 +1 1 8 9 -5.620437987444709865e-18 +1 1 8 10 5.581045282689321687e-18 +1 1 8 11 5.601834258601795889e-18 +1 1 8 12 -5.599591206687327644e-18 +1 1 8 13 1.960904373724693927e-05 +1 1 8 14 -3.089155758748922085e-17 +1 1 9 9 1.330117872545616073e-04 +1 1 9 13 5.620437987444709865e-18 +1 1 9 14 -3.650292264813680506e-17 +1 1 10 10 1.330117872545616073e-04 +1 1 10 13 -5.581045282689321687e-18 +1 1 10 14 3.655268883920496445e-17 +1 1 11 11 1.330117872545616073e-04 +1 1 11 13 -5.601834258601795889e-18 +1 1 11 14 3.655245364920391343e-17 +1 1 12 12 1.330117872545616073e-04 +1 1 12 13 5.599591206687327644e-18 +1 1 12 14 -3.655932309712113304e-17 +1 1 13 13 1.134027435173278614e-04 +1 1 13 14 -4.215249640730325136e-17 +1 1 14 14 1.134027435173907451e-04 +1 2 1 1 5.242880000279298984e+05 +1 3 1 1 8.671721477957394439e-05 +1 4 1 1 1.021243379857156817e-04 +1 5 1 1 8.671721801531331181e-05 +1 6 1 1 1.021243336408986409e-04 +1 7 1 1 8.671721801534843996e-05 +1 8 1 1 1.021243336408492013e-04 +1 9 1 1 8.671721477957481175e-05 +1 10 1 1 1.021243379857152481e-04 +1 11 1 1 1.115799159469598768e-04 +1 12 1 1 1.764453456232955089e-04 +1 13 1 1 1.048575999745712848e+06 +2 1 1 1 1.999999999844321641e+00 +2 1 1 2 7.311752911670153242e-16 +2 1 1 3 -6.901825129698932286e-16 +2 1 1 4 -1.127292332345565529e-01 +2 1 1 5 -6.691102133711988864e-02 +2 1 1 6 1.127292332345568582e-01 +2 1 1 7 -1.188751247960352225e-01 +2 1 1 8 1.188751247960550955e-01 +2 1 1 9 1.188751251463236736e-01 +2 1 1 10 -1.188751251463238956e-01 +2 1 1 11 -1.188751251467295295e-01 +2 1 1 12 1.188751251467296682e-01 +2 1 1 13 1.188751247960563306e-01 +2 1 1 14 -1.188751247960356527e-01 +2 1 2 2 5.000000000000004441e-01 +2 1 2 3 3.461352494493778914e-19 +2 1 2 4 3.522232117492824011e-18 +2 1 2 5 -5.803432915554319744e-19 +2 1 2 6 -1.468365186514579080e-17 +2 1 2 7 2.590415198065580707e-18 +2 1 2 8 -8.840350698239196285e-17 +2 1 2 9 -9.669681935660149989e-18 +2 1 2 10 3.600370407925180774e-18 +2 1 2 11 1.105208988373665075e-17 +2 1 2 12 -1.020986451160337920e-17 +2 1 2 13 2.899491076120309157e-17 +2 1 2 14 9.488248099959712043e-19 +2 1 3 3 5.000000000000004441e-01 +2 1 3 4 4.477997042493662077e-20 +2 1 3 5 8.333088546275484162e-21 +2 1 3 6 -1.047966634178833071e-20 +2 1 3 7 -4.406985933925064915e-17 +2 1 3 8 -1.295712377538799424e-17 +2 1 3 9 -3.195754310050305737e-18 +2 1 3 10 -1.059209101674075683e-20 +2 1 3 11 -3.936895976486131605e-20 +2 1 3 12 -5.052912337757297462e-20 +2 1 3 13 -8.278474588572065628e-18 +2 1 3 14 6.917139597152113569e-17 +2 1 4 4 4.609406247639424303e-01 +2 1 4 5 -2.499999999805432305e-01 +2 1 4 6 -9.818265974271837837e-02 +2 1 4 7 6.753403924557811223e-03 +2 1 4 8 -6.753403924555848384e-03 +2 1 4 9 -6.753403941379993759e-03 +2 1 4 10 6.753403941380020648e-03 +2 1 4 11 6.753403939496652186e-03 +2 1 4 12 -6.753403939496658258e-03 +2 1 4 13 -6.753403924555853588e-03 +2 1 4 14 6.753403924557811223e-03 +2 1 5 5 5.452047372474199127e-01 +2 1 5 6 2.499999999805436190e-01 +2 1 5 7 5.999834524485023017e-03 +2 1 5 8 -5.999834524484894648e-03 +2 1 5 9 -5.999834527882438179e-03 +2 1 5 10 5.999834527882393076e-03 +2 1 5 11 5.999834524214686313e-03 +2 1 5 12 -5.999834524214705395e-03 +2 1 5 13 -5.999834524484904189e-03 +2 1 5 14 5.999834524485029089e-03 +2 1 6 6 4.609406247639425969e-01 +2 1 6 7 -6.753403924557818162e-03 +2 1 6 8 6.753403924555857925e-03 +2 1 6 9 6.753403941379991157e-03 +2 1 6 10 -6.753403941380009372e-03 +2 1 6 11 -6.753403939496658258e-03 +2 1 6 12 6.753403939496659125e-03 +2 1 6 13 6.753403924555847516e-03 +2 1 6 14 -6.753403924557813826e-03 +2 1 7 7 4.374384479232655276e-01 +2 1 7 8 -6.059465412654994367e-03 +2 1 7 9 -6.059465436099926126e-03 +2 1 7 10 6.059465436099943474e-03 +2 1 7 11 6.059465437301753826e-03 +2 1 7 12 -6.059465437301759030e-03 +2 1 7 13 -6.059465412654988295e-03 +2 1 7 14 -6.256155207673450014e-02 +2 1 8 8 4.374384479232686918e-01 +2 1 8 9 6.059465436101225434e-03 +2 1 8 10 -6.059465436101247118e-03 +2 1 8 11 -6.059465437303034920e-03 +2 1 8 12 6.059465437303046195e-03 +2 1 8 13 -6.256155207673141927e-02 +2 1 8 14 -6.059465412655000438e-03 +2 1 9 9 3.688174304807698700e-01 +2 1 9 10 -6.059465459546156327e-03 +2 1 9 11 -6.059465460747973618e-03 +2 1 9 12 6.059465460747980557e-03 +2 1 9 13 6.059465436101209822e-03 +2 1 9 14 -6.059465436099941739e-03 +2 1 10 10 3.688174304807698700e-01 +2 1 10 11 6.059465460747989231e-03 +2 1 10 12 -6.059465460747998772e-03 +2 1 10 13 -6.059465436101242782e-03 +2 1 10 14 6.059465436099951280e-03 +2 1 11 11 3.688174304831739470e-01 +2 1 11 12 -6.059465461949783104e-03 +2 1 11 13 -6.059465437303027113e-03 +2 1 11 14 6.059465437301759030e-03 +2 1 12 12 3.688174304831742800e-01 +2 1 12 13 6.059465437303054869e-03 +2 1 12 14 -6.059465437301756428e-03 +2 1 13 13 4.374384479232688028e-01 +2 1 13 14 -6.059465412654998703e-03 +2 1 14 14 4.374384479232658052e-01 +2 2 1 1 7.785372003668848130e-11 +2 3 1 1 5.367912838998860625e-01 +2 4 1 1 4.632087161001144926e-01 +2 5 1 1 5.367912831993271183e-01 +2 6 1 1 4.632087168006734368e-01 +2 7 1 1 5.367912831985144351e-01 +2 8 1 1 4.632087168014861200e-01 +2 9 1 1 5.367912838998843972e-01 +2 10 1 1 4.632087161001162690e-01 +2 11 1 1 4.330889786628803195e-01 +2 12 1 1 2.745415335308867832e-01 +2 13 1 1 3.892685951408976936e-11 +*** END *** +*** REQUEST *** +"" +57 +16 +14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +-0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.52428800000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.10485760000000000000e7 0.0 0.0 0.0 0.0 0.0 -0.10485760000000000000e7 0.0 0.10485760000000000000e7 0.0 0.10485760000000000000e7 -0.10485760000000000000e7 0.10485760000000000000e7 0.0 0.10485760000000000000e7 0.0 0.0 0.10485760000000000000e7 0.0 0.0 0.0 0.10485760000000000000e7 -0.10485760000000000000e7 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.10485760000000000000e7 0.10485760000000000000e7 0.10485760000000000000e7 0.10485760000000000000e7 0.52428800000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 +0 1 1 2 -0.26214400000000000000e6 +0 4 1 1 -0.52428800000000000000e6 +0 10 1 1 0.52428800000000000000e6 +0 12 1 1 -0.52428800000000000000e6 +1 1 3 14 -0.26214400000000000000e6 +1 1 7 14 0.26214400000000000000e6 +1 1 14 14 -0.52428800000000000000e6 +2 1 2 3 -0.26214400000000000000e6 +2 1 2 7 0.26214400000000000000e6 +2 1 3 8 -0.26214400000000000000e6 +2 1 7 8 0.26214400000000000000e6 +2 1 13 14 -0.26214400000000000000e6 +3 1 3 11 -0.26214400000000000000e6 +3 1 7 11 0.26214400000000000000e6 +3 1 11 14 -0.26214400000000000000e6 +4 1 3 9 -0.26214400000000000000e6 +4 1 7 9 0.26214400000000000000e6 +4 1 9 14 -0.26214400000000000000e6 +5 1 2 3 -0.26214400000000000000e6 +5 1 2 7 0.26214400000000000000e6 +5 1 3 8 -0.26214400000000000000e6 +5 1 7 8 0.26214400000000000000e6 +5 1 13 14 -0.26214400000000000000e6 +6 1 3 7 -0.26214400000000000000e6 +6 1 7 7 0.52428800000000000000e6 +6 1 7 14 -0.26214400000000000000e6 +7 1 3 6 -0.26214400000000000000e6 +7 1 6 7 0.26214400000000000000e6 +7 1 6 14 -0.26214400000000000000e6 +8 1 1 5 0.26214400000000000000e6 +8 1 3 5 -0.26214400000000000000e6 +8 13 1 1 0.52428800000000000000e6 +9 1 1 4 0.26214400000000000000e6 +9 1 1 6 -0.26214400000000000000e6 +9 1 3 4 -0.26214400000000000000e6 +9 1 6 7 0.26214400000000000000e6 +9 1 6 14 -0.26214400000000000000e6 +9 16 1 1 0.52428800000000000000e6 +10 1 3 3 -0.52428800000000000000e6 +10 1 3 7 0.26214400000000000000e6 +10 1 3 14 -0.26214400000000000000e6 +11 1 1 2 -0.78643200000000000000e6 +11 1 4 5 0.52428800000000000000e6 +11 1 5 6 -0.52428800000000000000e6 +11 2 1 1 0.52428800000000000000e6 +11 4 1 1 -0.10485760000000000000e7 +11 10 1 1 0.10485760000000000000e7 +11 12 1 1 -0.52428800000000000000e6 +12 1 2 3 0.52428800000000000000e6 +12 1 2 7 -0.52428800000000000000e6 +13 1 2 13 -0.52428800000000000000e6 +14 1 8 12 0.52428800000000000000e6 +14 1 12 13 -0.52428800000000000000e6 +15 1 2 11 -0.52428800000000000000e6 +16 1 2 10 -0.52428800000000000000e6 +17 1 2 9 -0.52428800000000000000e6 +18 1 8 8 0.10485760000000000000e7 +18 1 8 13 -0.52428800000000000000e6 +19 1 2 7 -0.52428800000000000000e6 +20 1 2 6 -0.52428800000000000000e6 +21 1 2 5 -0.52428800000000000000e6 +22 1 4 8 0.52428800000000000000e6 +22 1 4 13 -0.52428800000000000000e6 +23 1 2 3 -0.52428800000000000000e6 +24 1 2 13 -0.52428800000000000000e6 +24 1 8 8 -0.10485760000000000000e7 +24 1 8 13 0.52428800000000000000e6 +25 1 1 2 -0.52428800000000000000e6 +26 1 1 1 0.52428800000000000000e6 +26 1 1 2 0.26214400000000000000e6 +26 4 1 1 0.52428800000000000000e6 +26 10 1 1 -0.52428800000000000000e6 +26 12 1 1 0.52428800000000000000e6 +27 1 1 2 -0.10485760000000000000e7 +27 1 1 3 0.52428800000000000000e6 +27 1 4 5 0.10485760000000000000e7 +27 1 5 6 -0.10485760000000000000e7 +27 2 1 1 0.10485760000000000000e7 +27 4 1 1 -0.10485760000000000000e7 +27 10 1 1 0.10485760000000000000e7 +27 12 1 1 -0.10485760000000000000e7 +28 1 1 4 0.52428800000000000000e6 +28 1 1 6 -0.52428800000000000000e6 +28 1 1 7 0.52428800000000000000e6 +28 1 1 8 -0.52428800000000000000e6 +28 1 4 5 -0.52428800000000000000e6 +28 1 5 6 0.52428800000000000000e6 +28 4 1 1 0.10485760000000000000e7 +29 1 1 4 -0.52428800000000000000e6 +29 1 1 6 0.52428800000000000000e6 +29 1 1 9 0.52428800000000000000e6 +29 1 1 10 -0.52428800000000000000e6 +29 1 4 5 0.52428800000000000000e6 +29 1 5 6 -0.52428800000000000000e6 +29 6 1 1 -0.10485760000000000000e7 +30 1 1 4 0.52428800000000000000e6 +30 1 1 6 -0.52428800000000000000e6 +30 1 1 11 0.52428800000000000000e6 +30 1 1 12 -0.52428800000000000000e6 +30 1 4 5 -0.52428800000000000000e6 +30 1 5 6 0.52428800000000000000e6 +30 8 1 1 0.10485760000000000000e7 +31 1 1 2 -0.52428800000000000000e6 +31 1 1 8 -0.52428800000000000000e6 +31 1 1 13 0.52428800000000000000e6 +32 1 1 2 -0.52428800000000000000e6 +32 1 1 4 0.52428800000000000000e6 +32 1 1 6 -0.52428800000000000000e6 +32 1 1 8 -0.52428800000000000000e6 +32 1 1 14 0.52428800000000000000e6 +32 1 4 5 -0.52428800000000000000e6 +32 1 5 6 0.52428800000000000000e6 +32 10 1 1 0.10485760000000000000e7 +33 1 2 2 0.52428800000000000000e6 +33 1 2 13 -0.26214400000000000000e6 +33 1 8 8 -0.52428800000000000000e6 +33 1 8 13 0.26214400000000000000e6 +34 1 2 4 0.52428800000000000000e6 +34 1 4 8 0.52428800000000000000e6 +34 1 4 13 -0.52428800000000000000e6 +35 1 2 8 0.52428800000000000000e6 +35 1 8 8 0.10485760000000000000e7 +35 1 8 13 -0.52428800000000000000e6 +36 1 2 12 0.52428800000000000000e6 +36 1 8 12 0.52428800000000000000e6 +36 1 12 13 -0.52428800000000000000e6 +37 1 2 3 0.52428800000000000000e6 +37 1 2 7 -0.52428800000000000000e6 +37 1 2 14 0.52428800000000000000e6 +38 1 2 3 -0.52428800000000000000e6 +38 1 3 8 -0.52428800000000000000e6 +38 1 3 13 0.52428800000000000000e6 +39 1 1 4 0.52428800000000000000e6 +39 1 1 6 -0.52428800000000000000e6 +39 1 4 7 -0.52428800000000000000e6 +39 1 4 14 0.52428800000000000000e6 +39 1 6 7 0.52428800000000000000e6 +39 1 6 14 -0.52428800000000000000e6 +39 16 1 1 0.10485760000000000000e7 +40 1 1 5 -0.52428800000000000000e6 +40 1 5 7 0.52428800000000000000e6 +40 1 5 14 -0.52428800000000000000e6 +40 13 1 1 -0.10485760000000000000e7 +41 1 2 5 -0.52428800000000000000e6 +41 1 5 8 -0.52428800000000000000e6 +41 1 5 13 0.52428800000000000000e6 +42 1 2 6 0.52428800000000000000e6 +42 1 6 8 0.52428800000000000000e6 +42 1 6 13 -0.52428800000000000000e6 +43 1 2 7 -0.52428800000000000000e6 +43 1 7 8 -0.52428800000000000000e6 +43 1 7 13 0.52428800000000000000e6 +44 1 2 10 0.52428800000000000000e6 +44 1 8 10 0.52428800000000000000e6 +44 1 10 13 -0.52428800000000000000e6 +45 1 2 3 -0.52428800000000000000e6 +45 1 2 7 0.52428800000000000000e6 +45 1 8 14 0.52428800000000000000e6 +45 1 13 14 -0.52428800000000000000e6 +46 1 2 9 -0.52428800000000000000e6 +46 1 8 9 -0.52428800000000000000e6 +46 1 9 13 0.52428800000000000000e6 +47 1 3 10 0.52428800000000000000e6 +47 1 7 10 -0.52428800000000000000e6 +47 1 10 14 0.52428800000000000000e6 +48 1 2 11 -0.52428800000000000000e6 +48 1 8 11 -0.52428800000000000000e6 +48 1 11 13 0.52428800000000000000e6 +49 1 3 12 0.52428800000000000000e6 +49 1 7 12 -0.52428800000000000000e6 +49 1 12 14 0.52428800000000000000e6 +50 1 2 13 -0.26214400000000000000e6 +50 1 8 13 -0.26214400000000000000e6 +50 1 13 13 0.52428800000000000000e6 +51 3 1 1 0.52428800000000000000e6 +51 4 1 1 0.52428800000000000000e6 +52 5 1 1 0.52428800000000000000e6 +52 6 1 1 0.52428800000000000000e6 +53 7 1 1 0.52428800000000000000e6 +53 8 1 1 0.52428800000000000000e6 +54 9 1 1 0.52428800000000000000e6 +54 10 1 1 0.52428800000000000000e6 +55 1 1 5 -0.26214400000000000000e6 +55 11 1 1 0.52428800000000000000e6 +56 1 1 4 -0.26214400000000000000e6 +56 1 1 6 0.26214400000000000000e6 +56 14 1 1 0.52428800000000000000e6 +57 1 4 5 -0.26214400000000000000e6 +57 1 5 6 0.26214400000000000000e6 +57 15 1 1 0.52428800000000000000e6 +*** ANSWER *** +4.866244994783382449e-11 -1.100581462896628275e-02 -8.908034170585868968e-22 8.905726306780345882e-22 1.100581462896628275e-02 -4.866244994956480332e-11 1.055921518913285223e-10 -9.982606132660257156e-11 -1.055921518913341058e-10 4.866244994713382290e-11 4.999999998803027479e-01 1.702443820572157110e-02 5.876227117598623595e-01 -3.234810965902003160e-23 3.103528504291915109e-23 3.250800442583606684e-23 -3.215249838057380718e-23 -5.876227117598623595e-01 -1.702443820572157110e-02 -2.706647739641636292e-23 1.224559361875562905e-22 2.629372357321966726e-23 1.702443820572157110e-02 -5.876227116503718317e-01 -2.499999997938157636e-01 -1.710358983222822930e-10 -7.477087369317375760e-11 -2.058016017069056463e-11 -1.426218296404363273e-11 1.426218296404011722e-11 -1.680527667576794608e-11 5.419071352217212136e-11 -1.459873498445274876e-10 -1.502327208290050179e-23 2.246365156403382726e-23 2.450110988387977034e-23 -5.541847639920355290e-23 -3.953396560968215455e-22 -2.639803797349733889e-11 2.495651533314075707e-11 -4.755088150464533990e-23 -1.194691034355838100e-23 4.451364034109373173e-22 7.915323872521216086e-24 -4.071740686683570868e-22 7.780945609105644653e-24 4.450994023941847644e-22 -7.059158977143437924e-24 -4.453741416649630275e-22 -7.299367492225050892e-11 -1.839096783629957747e-10 -1.583666372767457160e-10 -1.583666372767448889e-10 -6.777133948622119048e-11 -1.455957793270821742e-10 -2.526104929367946779e-11 9.999999990749821599e-01 +1 1 1 1 4.155004438360649765e-05 +1 1 1 2 -2.532687852785472722e-17 +1 1 1 3 -3.920147182684668302e-05 +1 1 1 4 -2.321898533163589410e-06 +1 1 1 5 -1.086144555464040875e-06 +1 1 1 6 2.321898533163589410e-06 +1 1 1 7 -1.078993101557101475e-05 +1 1 1 8 -8.810804897756645921e-06 +1 1 1 9 -7.477491381852508119e-06 +1 1 1 10 7.477491381852508119e-06 +1 1 1 11 7.477491381850664975e-06 +1 1 1 12 -7.477491381850664975e-06 +1 1 1 13 -8.810804897785024913e-06 +1 1 1 14 2.841154081111257716e-05 +1 1 2 2 5.468269776791171745e-05 +1 1 2 3 3.267532575264126800e-17 +1 1 2 4 -7.876521273799738283e-18 +1 1 2 5 -3.927182130959431229e-17 +1 1 2 6 7.927007571008830277e-18 +1 1 2 7 3.125300992616561732e-18 +1 1 2 8 1.177742295120416723e-17 +1 1 2 9 1.277771265944713022e-17 +1 1 2 10 -1.289364730193633647e-17 +1 1 2 11 -1.257039518277394712e-17 +1 1 2 12 1.284563789879955703e-17 +1 1 2 13 1.262172038600658360e-17 +1 1 2 14 -2.905524215438563234e-17 +1 1 3 3 1.057089748853167182e-04 +1 1 3 4 2.768034906540188782e-05 +1 1 3 5 2.616880302040090452e-05 +1 1 3 6 -2.768034906540042415e-05 +1 1 3 7 2.551313855852008336e-05 +1 1 3 8 -2.477086898988771780e-16 +1 1 3 9 -2.334582716964626991e-16 +1 1 3 10 2.333602754824423418e-16 +1 1 3 11 2.335187709614062035e-16 +1 1 3 12 -2.335043179852401358e-16 +1 1 3 13 -2.072718376156903744e-16 +1 1 3 14 -2.551313855806645317e-05 +1 1 4 4 1.312221134431995617e-04 +1 1 4 5 6.875255973040747190e-05 +1 1 4 7 1.384017453304897281e-05 +1 1 4 8 5.908962470956380671e-18 +1 1 4 13 -5.908962470956380671e-18 +1 1 4 14 -1.384017453304897281e-05 +1 1 5 5 1.312221134431995617e-04 +1 1 5 6 -6.875255973040747190e-05 +1 1 5 7 1.308440151098170124e-05 +1 1 5 8 2.493035656230749596e-17 +1 1 5 13 -2.493035656230749596e-17 +1 1 5 14 -1.308440151098170124e-05 +1 1 6 6 1.312221134431995617e-04 +1 1 6 7 -1.384017453305040938e-05 +1 1 6 8 -6.263621730203536457e-18 +1 1 6 13 6.263621730203536457e-18 +1 1 6 14 1.384017453305040938e-05 +1 1 7 7 1.057089748840416964e-04 +1 1 7 8 2.216008528430548370e-16 +1 1 7 9 2.334582716964626991e-16 +1 1 7 10 -2.333602754824423418e-16 +1 1 7 11 -2.335187709614062035e-16 +1 1 7 12 2.335043179852401358e-16 +1 1 7 13 2.333796746715135042e-16 +1 1 7 14 2.551313855870363878e-05 +1 1 8 8 9.295240560554533966e-05 +1 1 8 9 -4.079456411506780224e-18 +1 1 8 10 4.149909322476403339e-18 +1 1 8 11 3.701032341808578782e-18 +1 1 8 12 -4.114087818108774275e-18 +1 1 8 13 3.826970783764533160e-05 +1 1 8 14 -2.134764781139956003e-16 +1 1 9 9 1.312221134431995617e-04 +1 1 9 13 4.079456411506780224e-18 +1 1 9 14 -2.334582716964626991e-16 +1 1 10 10 1.312221134431995617e-04 +1 1 10 13 -4.149909322476403339e-18 +1 1 10 14 2.333602754824423418e-16 +1 1 11 11 1.312221134431995617e-04 +1 1 11 13 -3.701032341808578782e-18 +1 1 11 14 2.335187709614062035e-16 +1 1 12 12 1.312221134431995617e-04 +1 1 12 13 4.114087818108774275e-18 +1 1 12 14 -2.335043179852401358e-16 +1 1 13 13 9.295240560556247006e-05 +1 1 13 14 -2.415040494005727409e-16 +1 1 14 14 1.057089748849491737e-04 +1 2 1 1 2.621439999900633411e+05 +1 3 1 1 3.480047599362090776e-05 +1 4 1 1 1.274631110653591352e-04 +1 5 1 1 4.819238591864888691e-05 +1 6 1 1 6.314736868235390314e-05 +1 7 1 1 4.819238591864910375e-05 +1 8 1 1 6.314736868235086738e-05 +1 9 1 1 9.569041340664772785e-05 +1 10 1 1 3.827091280024052904e-05 +1 11 1 1 5.488799349136230278e-05 +1 12 1 1 2.621440001827088417e+05 +1 13 1 1 5.271570438043424178e-05 +1 14 1 1 1.179780484311145072e-04 +1 15 1 1 5.242879996462463168e+05 +1 16 1 1 4.818106624629773203e-05 +2 1 1 1 2.999999999730359690e+00 +2 1 1 2 -8.698136286174443148e-16 +2 1 1 3 9.999999999101273351e-01 +2 1 1 4 -2.588934851978849094e-01 +2 1 1 5 -5.736638889176033651e-02 +2 1 1 6 2.588934851978846319e-01 +2 1 1 7 2.870724761737262765e-01 +2 1 1 8 2.129275237813424981e-01 +2 1 1 9 1.854494543914914917e-01 +2 1 1 10 -1.854494543914911309e-01 +2 1 1 11 -1.854494543915010674e-01 +2 1 1 12 1.854494543915012061e-01 +2 1 1 13 2.129275237813443578e-01 +2 1 1 14 -7.129275237364137707e-01 +2 1 2 2 1.000000000000000444e+00 +2 1 2 3 -5.056499057533613360e-16 +2 1 2 4 2.070671856355675995e-16 +2 1 2 5 1.854668380811574643e-17 +2 1 2 6 -1.843872662841094568e-16 +2 1 2 7 5.512074759975448485e-17 +2 1 2 8 2.999219133924283838e-16 +2 1 2 9 -6.055040303069718275e-17 +2 1 2 10 5.409704327321404909e-17 +2 1 2 11 8.460133826310702725e-17 +2 1 2 12 -1.134877230336742996e-16 +2 1 2 13 -1.366689357568450885e-16 +2 1 2 14 2.322226538044880231e-16 +2 1 3 3 1.022633198790902753e+00 +2 1 3 4 -2.285051695031400654e-01 +2 1 3 5 -8.592048073791511142e-02 +2 1 3 6 2.285051695031395380e-01 +2 1 3 7 -5.826678958834711347e-02 +2 1 3 8 6.958338898379869131e-02 +2 1 3 9 6.046391623068835680e-02 +2 1 3 10 -6.046391623068828741e-02 +2 1 3 11 -6.046391623053188474e-02 +2 1 3 12 6.046391623053182923e-02 +2 1 3 13 6.958338898379889947e-02 +2 1 3 14 -8.089998837925009567e-02 +2 1 4 4 7.848472815572965500e-01 +2 1 4 5 -4.999999999550623908e-01 +2 1 4 6 -2.739900390403662844e-01 +2 1 4 7 -9.737526444110718160e-02 +2 1 4 8 -1.687732031046140085e-02 +2 1 4 9 -1.460361822330347344e-02 +2 1 4 10 1.460361822330344742e-02 +2 1 4 11 1.460361822334185246e-02 +2 1 4 12 -1.460361822334191491e-02 +2 1 4 13 -1.687732031046141473e-02 +2 1 4 14 1.311299050620305384e-01 +2 1 5 5 1.023217668958457116e+00 +2 1 5 6 4.999999999550630014e-01 +2 1 5 7 -5.333557797851671417e-02 +2 1 5 8 1.037533760956003970e-02 +2 1 5 9 1.089859895776928121e-02 +2 1 5 10 -1.089859895776927601e-02 +2 1 5 11 -1.089859895770609564e-02 +2 1 5 12 1.089859895770606615e-02 +2 1 5 13 1.037533760956007439e-02 +2 1 5 14 3.258490275939775888e-02 +2 1 6 6 7.848472815572976602e-01 +2 1 6 7 9.737526444110751467e-02 +2 1 6 8 1.687732031046147024e-02 +2 1 6 9 1.460361822330343874e-02 +2 1 6 10 -1.460361822330341793e-02 +2 1 6 11 -1.460361822334182123e-02 +2 1 6 12 1.460361822334189756e-02 +2 1 6 13 1.687732031046131065e-02 +2 1 6 14 -1.311299050620310380e-01 +2 1 7 7 7.093281072464956427e-01 +2 1 7 8 1.696711921779649190e-02 +2 1 7 9 1.447976791737628187e-02 +2 1 7 10 -1.447976791737624370e-02 +2 1 7 11 -1.447976791726815829e-02 +2 1 7 12 1.447976791726809237e-02 +2 1 7 13 1.696711921779667231e-02 +2 1 7 14 -2.324051031651577781e-01 +2 1 8 8 7.732531965325680767e-01 +2 1 8 9 1.575219019796789133e-02 +2 1 8 10 -1.575219019796788092e-02 +2 1 8 11 -1.575219019799780490e-02 +2 1 8 12 1.575219019799789164e-02 +2 1 8 13 -2.267468034674317012e-01 +2 1 8 14 -5.261626976600228267e-02 +2 1 9 9 5.247778513667087363e-01 +2 1 9 10 -1.392060884977724955e-02 +2 1 9 11 -1.392060884980887356e-02 +2 1 9 12 1.392060884980889091e-02 +2 1 9 13 1.575219019796797459e-02 +2 1 9 14 -4.598414831331200381e-02 +2 1 10 10 5.247778513667084033e-01 +2 1 10 11 1.392060884980888744e-02 +2 1 10 12 -1.392060884980888397e-02 +2 1 10 13 -1.575219019796798500e-02 +2 1 10 14 4.598414831331198299e-02 +2 1 11 11 5.247778513667712419e-01 +2 1 11 12 -1.392060884984051145e-02 +2 1 11 13 -1.575219019799788817e-02 +2 1 11 14 4.598414831326368135e-02 +2 1 12 12 5.247778513667716860e-01 +2 1 12 13 1.575219019799788470e-02 +2 1 12 14 -4.598414831326361890e-02 +2 1 13 13 7.732531965325690759e-01 +2 1 13 14 -5.261626976600192185e-02 +2 1 14 14 8.484948852140926645e-01 +2 2 1 1 1.797698302366708057e-10 +2 3 1 1 1.556357981906739907e+00 +2 4 1 1 4.436420180932616475e-01 +2 5 1 1 1.111314120731372590e+00 +2 6 1 1 8.886858792686285202e-01 +2 7 1 1 1.111314120731351718e+00 +2 8 1 1 8.886858792686496145e-01 +2 9 1 1 5.563579819966126827e-01 +2 10 1 1 1.443642018003389760e+00 +2 11 1 1 9.426336111082405100e-01 +2 12 1 1 1.797698283963428353e-10 +2 13 1 1 9.714459081538454610e-01 +2 14 1 1 4.822130296042294595e-01 +2 15 1 1 8.988491390431136912e-11 +2 16 1 1 1.060776631389493074e+00 +*** END *** +*** REQUEST *** +"" +57 +16 +14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +0.52428800000000000000e6 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.52428800000000000000e6 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.10485760000000000000e7 0.0 0.0 0.0 0.0 0.0 -0.10485760000000000000e7 0.0 0.10485760000000000000e7 0.0 0.10485760000000000000e7 -0.10485760000000000000e7 0.10485760000000000000e7 0.0 0.10485760000000000000e7 0.0 0.0 0.10485760000000000000e7 0.0 0.0 0.0 -0.10485760000000000000e7 0.10485760000000000000e7 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.10485760000000000000e7 0.10485760000000000000e7 0.10485760000000000000e7 0.10485760000000000000e7 0.52428800000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 +0 1 1 2 0.26214400000000000000e6 +0 4 1 1 0.52428800000000000000e6 +0 10 1 1 -0.52428800000000000000e6 +0 12 1 1 -0.52428800000000000000e6 +1 1 3 14 -0.26214400000000000000e6 +1 1 7 14 -0.26214400000000000000e6 +1 1 14 14 0.52428800000000000000e6 +2 1 2 3 -0.26214400000000000000e6 +2 1 2 7 -0.26214400000000000000e6 +2 1 3 8 -0.26214400000000000000e6 +2 1 7 8 -0.26214400000000000000e6 +2 1 13 14 0.26214400000000000000e6 +3 1 3 11 -0.26214400000000000000e6 +3 1 7 11 -0.26214400000000000000e6 +3 1 11 14 0.26214400000000000000e6 +4 1 3 9 -0.26214400000000000000e6 +4 1 7 9 -0.26214400000000000000e6 +4 1 9 14 0.26214400000000000000e6 +5 1 2 3 -0.26214400000000000000e6 +5 1 2 7 -0.26214400000000000000e6 +5 1 3 8 -0.26214400000000000000e6 +5 1 7 8 -0.26214400000000000000e6 +5 1 13 14 0.26214400000000000000e6 +6 1 3 7 -0.26214400000000000000e6 +6 1 7 7 -0.52428800000000000000e6 +6 1 7 14 0.26214400000000000000e6 +7 1 3 6 -0.26214400000000000000e6 +7 1 6 7 -0.26214400000000000000e6 +7 1 6 14 0.26214400000000000000e6 +8 1 1 5 0.26214400000000000000e6 +8 1 3 5 -0.26214400000000000000e6 +8 13 1 1 0.52428800000000000000e6 +9 1 1 4 0.26214400000000000000e6 +9 1 1 6 -0.26214400000000000000e6 +9 1 3 4 -0.26214400000000000000e6 +9 1 6 7 -0.26214400000000000000e6 +9 1 6 14 0.26214400000000000000e6 +9 16 1 1 0.52428800000000000000e6 +10 1 3 3 -0.52428800000000000000e6 +10 1 3 7 -0.26214400000000000000e6 +10 1 3 14 0.26214400000000000000e6 +11 1 1 2 0.26214400000000000000e6 +11 1 4 5 0.52428800000000000000e6 +11 1 5 6 -0.52428800000000000000e6 +11 2 1 1 0.52428800000000000000e6 +11 4 1 1 0.10485760000000000000e7 +11 10 1 1 -0.10485760000000000000e7 +11 12 1 1 -0.52428800000000000000e6 +12 1 2 3 -0.52428800000000000000e6 +12 1 2 7 -0.52428800000000000000e6 +13 1 2 13 -0.52428800000000000000e6 +14 1 8 12 0.52428800000000000000e6 +14 1 12 13 -0.52428800000000000000e6 +15 1 2 11 -0.52428800000000000000e6 +16 1 2 10 -0.52428800000000000000e6 +17 1 2 9 -0.52428800000000000000e6 +18 1 8 8 0.10485760000000000000e7 +18 1 8 13 -0.52428800000000000000e6 +19 1 2 7 -0.52428800000000000000e6 +20 1 2 6 -0.52428800000000000000e6 +21 1 2 5 -0.52428800000000000000e6 +22 1 4 8 0.52428800000000000000e6 +22 1 4 13 -0.52428800000000000000e6 +23 1 2 3 -0.52428800000000000000e6 +24 1 2 13 -0.52428800000000000000e6 +24 1 8 8 -0.10485760000000000000e7 +24 1 8 13 0.52428800000000000000e6 +25 1 1 2 -0.52428800000000000000e6 +26 1 1 1 0.52428800000000000000e6 +26 1 1 2 -0.26214400000000000000e6 +26 4 1 1 -0.52428800000000000000e6 +26 10 1 1 0.52428800000000000000e6 +26 12 1 1 0.52428800000000000000e6 +27 1 1 3 0.52428800000000000000e6 +27 1 4 5 0.10485760000000000000e7 +27 1 5 6 -0.10485760000000000000e7 +27 2 1 1 0.10485760000000000000e7 +27 4 1 1 0.10485760000000000000e7 +27 10 1 1 -0.10485760000000000000e7 +27 12 1 1 -0.10485760000000000000e7 +28 1 1 4 0.52428800000000000000e6 +28 1 1 6 -0.52428800000000000000e6 +28 1 1 7 0.52428800000000000000e6 +28 1 1 8 -0.52428800000000000000e6 +28 1 4 5 -0.52428800000000000000e6 +28 1 5 6 0.52428800000000000000e6 +28 4 1 1 0.10485760000000000000e7 +29 1 1 4 -0.52428800000000000000e6 +29 1 1 6 0.52428800000000000000e6 +29 1 1 9 0.52428800000000000000e6 +29 1 1 10 -0.52428800000000000000e6 +29 1 4 5 0.52428800000000000000e6 +29 1 5 6 -0.52428800000000000000e6 +29 6 1 1 -0.10485760000000000000e7 +30 1 1 4 0.52428800000000000000e6 +30 1 1 6 -0.52428800000000000000e6 +30 1 1 11 0.52428800000000000000e6 +30 1 1 12 -0.52428800000000000000e6 +30 1 4 5 -0.52428800000000000000e6 +30 1 5 6 0.52428800000000000000e6 +30 8 1 1 0.10485760000000000000e7 +31 1 1 2 -0.52428800000000000000e6 +31 1 1 8 -0.52428800000000000000e6 +31 1 1 13 0.52428800000000000000e6 +32 1 1 2 -0.52428800000000000000e6 +32 1 1 4 0.52428800000000000000e6 +32 1 1 6 -0.52428800000000000000e6 +32 1 1 8 -0.52428800000000000000e6 +32 1 1 14 0.52428800000000000000e6 +32 1 4 5 -0.52428800000000000000e6 +32 1 5 6 0.52428800000000000000e6 +32 10 1 1 0.10485760000000000000e7 +33 1 2 2 0.52428800000000000000e6 +33 1 2 13 -0.26214400000000000000e6 +33 1 8 8 -0.52428800000000000000e6 +33 1 8 13 0.26214400000000000000e6 +34 1 2 4 0.52428800000000000000e6 +34 1 4 8 0.52428800000000000000e6 +34 1 4 13 -0.52428800000000000000e6 +35 1 2 8 0.52428800000000000000e6 +35 1 8 8 0.10485760000000000000e7 +35 1 8 13 -0.52428800000000000000e6 +36 1 2 12 0.52428800000000000000e6 +36 1 8 12 0.52428800000000000000e6 +36 1 12 13 -0.52428800000000000000e6 +37 1 2 3 -0.52428800000000000000e6 +37 1 2 7 -0.52428800000000000000e6 +37 1 2 14 0.52428800000000000000e6 +38 1 2 3 -0.52428800000000000000e6 +38 1 3 8 -0.52428800000000000000e6 +38 1 3 13 0.52428800000000000000e6 +39 1 1 4 -0.52428800000000000000e6 +39 1 1 6 0.52428800000000000000e6 +39 1 4 7 -0.52428800000000000000e6 +39 1 4 14 0.52428800000000000000e6 +39 1 6 7 0.52428800000000000000e6 +39 1 6 14 -0.52428800000000000000e6 +39 16 1 1 -0.10485760000000000000e7 +40 1 1 5 0.52428800000000000000e6 +40 1 5 7 0.52428800000000000000e6 +40 1 5 14 -0.52428800000000000000e6 +40 13 1 1 0.10485760000000000000e7 +41 1 2 5 -0.52428800000000000000e6 +41 1 5 8 -0.52428800000000000000e6 +41 1 5 13 0.52428800000000000000e6 +42 1 2 6 0.52428800000000000000e6 +42 1 6 8 0.52428800000000000000e6 +42 1 6 13 -0.52428800000000000000e6 +43 1 2 7 -0.52428800000000000000e6 +43 1 7 8 -0.52428800000000000000e6 +43 1 7 13 0.52428800000000000000e6 +44 1 2 10 0.52428800000000000000e6 +44 1 8 10 0.52428800000000000000e6 +44 1 10 13 -0.52428800000000000000e6 +45 1 2 3 0.52428800000000000000e6 +45 1 2 7 0.52428800000000000000e6 +45 1 8 14 0.52428800000000000000e6 +45 1 13 14 -0.52428800000000000000e6 +46 1 2 9 -0.52428800000000000000e6 +46 1 8 9 -0.52428800000000000000e6 +46 1 9 13 0.52428800000000000000e6 +47 1 3 10 -0.52428800000000000000e6 +47 1 7 10 -0.52428800000000000000e6 +47 1 10 14 0.52428800000000000000e6 +48 1 2 11 -0.52428800000000000000e6 +48 1 8 11 -0.52428800000000000000e6 +48 1 11 13 0.52428800000000000000e6 +49 1 3 12 -0.52428800000000000000e6 +49 1 7 12 -0.52428800000000000000e6 +49 1 12 14 0.52428800000000000000e6 +50 1 2 13 -0.26214400000000000000e6 +50 1 8 13 -0.26214400000000000000e6 +50 1 13 13 0.52428800000000000000e6 +51 3 1 1 0.52428800000000000000e6 +51 4 1 1 0.52428800000000000000e6 +52 5 1 1 0.52428800000000000000e6 +52 6 1 1 0.52428800000000000000e6 +53 7 1 1 0.52428800000000000000e6 +53 8 1 1 0.52428800000000000000e6 +54 9 1 1 0.52428800000000000000e6 +54 10 1 1 0.52428800000000000000e6 +55 1 1 5 -0.26214400000000000000e6 +55 11 1 1 0.52428800000000000000e6 +56 1 1 4 -0.26214400000000000000e6 +56 1 1 6 0.26214400000000000000e6 +56 14 1 1 0.52428800000000000000e6 +57 1 4 5 -0.26214400000000000000e6 +57 1 5 6 0.26214400000000000000e6 +57 15 1 1 0.52428800000000000000e6 +*** ANSWER *** +-4.626998460725373717e-10 -2.417481143950478677e-03 -2.224378658199417387e-21 2.217291312063012075e-21 2.417481143950478677e-03 4.626998460678960613e-10 9.675097389510102668e-10 -9.402121011358797129e-10 -9.675097389510350822e-10 4.626998460529042398e-10 4.999999992048242414e-01 3.120683923775143670e-02 -1.177269332037124805e+00 1.450710635331608552e-21 -1.448087500114029073e-21 -1.447797495253837748e-21 1.449987901523035166e-21 1.177269332037124805e+00 -3.120683923775143670e-02 7.400402930640206892e-22 1.150386932921414310e-21 -7.422115198895230889e-22 -3.120683923775143670e-02 1.177269333078199365e+00 -2.499999994177616314e-01 -1.434895834596748866e-09 -5.247565354757580239e-10 3.643520035448375421e-10 -8.134220708231722892e-11 8.134220708231660854e-11 -1.019737358132384853e-10 -1.604045319213574468e-10 -1.388099538193338500e-09 4.952105397065552979e-22 -1.016695193012858419e-21 -9.664171469489820981e-22 3.720871580851088556e-21 1.539199925290079033e-21 2.418774347368753417e-10 -2.350530252850076263e-10 -3.856482082009374171e-22 2.458239732421249234e-22 -2.004691567823728967e-21 -4.831744359228686843e-22 -6.993294728471312375e-22 -4.831917263984190645e-22 -1.108241973773529562e-21 4.836908935980913794e-22 1.112450374771629786e-21 -6.940497690976974355e-10 -1.053456938401041488e-09 -1.456963509457183428e-09 -1.456963509457166884e-09 -1.569670449789262667e-09 -1.373433687022323068e-09 -6.103398771998216418e-10 9.999999934008645397e-01 +1 1 1 1 2.313757053382433510e-04 +1 1 1 2 -1.569819879811475614e-15 +1 1 1 3 -2.751235544715142228e-04 +1 1 1 4 -2.822267460615826345e-05 +1 1 1 5 -9.669041110010320600e-06 +1 1 1 6 2.822267460615826345e-05 +1 1 1 7 1.910253832345157853e-04 +1 1 1 8 -5.346360600047984479e-05 +1 1 1 9 -4.264674306677393532e-05 +1 1 1 10 4.264674306677393532e-05 +1 1 1 11 4.264674306677361006e-05 +1 1 1 12 -4.264674306677361006e-05 +1 1 1 13 -5.346360600205117899e-05 +1 1 1 14 -8.409817123198465305e-05 +1 1 2 2 2.559104419869945649e-04 +1 1 2 3 2.831778183743729510e-15 +1 1 2 4 2.596329434416704640e-16 +1 1 2 5 -4.009433365062541226e-16 +1 1 2 6 -2.591116858867775513e-16 +1 1 2 7 -8.798997970722097997e-16 +1 1 2 8 -5.330410893543255146e-16 +1 1 2 9 -5.068796330637284159e-16 +1 1 2 10 5.057402945305127417e-16 +1 1 2 11 5.056215680370208417e-16 +1 1 2 12 -5.066809131395879262e-16 +1 1 2 13 -5.394280411931037314e-16 +1 1 2 14 1.950808319381255517e-15 +1 1 3 3 7.410863957799194296e-04 +1 1 3 4 2.536268730075801406e-04 +1 1 3 5 2.464709610401640515e-04 +1 1 3 6 -2.536268730075736354e-04 +1 1 3 7 -2.425879768913150741e-04 +1 1 3 8 -2.029552055124745375e-15 +1 1 3 9 -5.812496137094462374e-16 +1 1 3 10 5.810379679457762670e-16 +1 1 3 11 5.831075189750280716e-16 +1 1 3 12 -5.832443820882682371e-16 +1 1 3 13 8.069840504304849563e-16 +1 1 3 14 2.425879768925315490e-04 +1 1 4 4 9.836743726673036203e-04 +1 1 4 5 5.705548528542403811e-04 +1 1 4 7 -1.268134365033268991e-04 +1 1 4 8 -1.294996498981680144e-16 +1 1 4 13 1.294996498981680144e-16 +1 1 4 14 1.268134365033268991e-04 +1 1 5 5 9.836743726673036203e-04 +1 1 5 6 -5.705548528542403811e-04 +1 1 5 7 -1.232354805206260784e-04 +1 1 5 8 2.021907277812530765e-16 +1 1 5 13 -2.021907277812530765e-16 +1 1 5 14 1.232354805206260784e-04 +1 1 6 6 9.836743726673036203e-04 +1 1 6 7 1.268134365033331875e-04 +1 1 6 8 1.288825592831671918e-16 +1 1 6 13 -1.288825592831671918e-16 +1 1 6 14 -1.268134365033331875e-04 +1 1 7 7 7.410863957720576628e-04 +1 1 7 8 -1.715322719830853172e-16 +1 1 7 9 -5.812496137094462374e-16 +1 1 7 10 5.810379679457762670e-16 +1 1 7 11 5.831075189750280716e-16 +1 1 7 12 -5.832443820882682371e-16 +1 1 7 13 -1.051035732711167213e-15 +1 1 7 14 2.425879768964615650e-04 +1 1 8 8 6.197924073276968315e-04 +1 1 8 9 2.533316238499743345e-16 +1 1 8 10 -2.533225586611289767e-16 +1 1 8 11 -2.535933312227561331e-16 +1 1 8 12 2.539092644371504581e-16 +1 1 8 13 3.638819653401506246e-04 +1 1 8 14 -3.666500506600767423e-16 +1 1 9 9 9.836743726673036203e-04 +1 1 9 13 -2.533316238499743345e-16 +1 1 9 14 5.812496137094462374e-16 +1 1 10 10 9.836743726673036203e-04 +1 1 10 13 2.533225586611289767e-16 +1 1 10 14 -5.810379679457762670e-16 +1 1 11 11 9.836743726673036203e-04 +1 1 11 13 2.535933312227561331e-16 +1 1 11 14 -5.831075189750280716e-16 +1 1 12 12 9.836743726673036203e-04 +1 1 12 13 -2.539092644371504581e-16 +1 1 12 14 5.832443820882682371e-16 +1 1 13 13 6.197924073266108946e-04 +1 1 13 14 1.589218055354323750e-15 +1 1 14 14 7.410863957696238458e-04 +1 2 1 1 2.621440000165262027e+05 +1 3 1 1 4.313595413468988143e-04 +1 4 1 1 1.816597661168850228e-04 +1 5 1 1 2.198058882210158355e-04 +1 6 1 1 3.050993743545643566e-04 +1 7 1 1 2.198058882210253764e-04 +1 8 1 1 3.050993743545721629e-04 +1 9 1 1 1.607149918881906753e-04 +1 10 1 1 6.242692184131228700e-04 +1 11 1 1 2.635995717657439036e-04 +1 12 1 1 2.621440011985239107e+05 +1 13 1 1 2.442614895457224933e-04 +1 14 1 1 6.636804991299646156e-04 +1 15 1 1 5.242879975238268380e+05 +1 16 1 1 2.227937536454895409e-04 +2 1 1 1 2.999999998600440421e+00 +2 1 1 2 1.358763360049901962e-15 +2 1 1 3 9.999999995334842851e-01 +2 1 1 4 -2.395147310746525426e-01 +2 1 1 5 7.643859456854374020e-03 +2 1 1 6 2.395147310746519875e-01 +2 1 1 7 -7.321609993895180635e-01 +2 1 1 8 2.321609996227814443e-01 +2 1 1 9 2.043250667802135878e-01 +2 1 1 10 -2.043250667802136433e-01 +2 1 1 11 -2.043250667800976528e-01 +2 1 1 12 2.043250667800974862e-01 +2 1 1 13 2.321609996227818051e-01 +2 1 1 14 2.678390001439579504e-01 +2 1 2 2 1.000000000000001998e+00 +2 1 2 3 4.121313469574638040e-17 +2 1 2 4 -8.673187507299262298e-17 +2 1 2 5 -8.943369907463970867e-18 +2 1 2 6 1.870898689884128133e-17 +2 1 2 7 -4.916622394569216540e-17 +2 1 2 8 -6.889091656085145216e-16 +2 1 2 9 3.746705621344696682e-17 +2 1 2 10 2.742732240810944600e-17 +2 1 2 11 1.544835105942387453e-17 +2 1 2 12 4.303034796443349985e-17 +2 1 2 13 5.238767277915371972e-16 +2 1 2 14 1.436460906128009721e-16 +2 1 3 3 1.117557814841277697e+00 +2 1 3 4 -1.832221116876742439e-01 +2 1 3 5 3.233895004322243083e-02 +2 1 3 6 1.832221116876731892e-01 +2 1 3 7 -1.370030637960643061e-01 +2 1 3 8 7.822415637542859401e-02 +2 1 3 9 6.907274210736986941e-02 +2 1 3 10 -6.907274210736981390e-02 +2 1 3 11 -6.907274210750671828e-02 +2 1 3 12 6.907274210750669052e-02 +2 1 3 13 7.822415637542841360e-02 +2 1 3 14 -1.944524895478936394e-02 +2 1 4 4 7.910866851802405009e-01 +2 1 4 5 -4.999999997667434193e-01 +2 1 4 6 -3.300295363626149503e-01 +2 1 4 7 1.100544227997987956e-01 +2 1 4 8 -1.844336695596375530e-02 +2 1 4 9 -1.625300409585958908e-02 +2 1 4 10 1.625300409585960296e-02 +2 1 4 11 1.625300409581752203e-02 +2 1 4 12 -1.625300409581750816e-02 +2 1 4 13 -1.844336695596375184e-02 +2 1 4 14 -7.316768888787120173e-02 +2 1 5 5 1.094374991669571084e+00 +2 1 5 6 4.999999997667434193e-01 +2 1 5 7 -2.044875308566950628e-02 +2 1 5 8 4.279278064057573557e-03 +2 1 5 9 4.336850983593035745e-03 +2 1 5 10 -4.336850983593048756e-03 +2 1 5 11 -4.336850983558209437e-03 +2 1 5 12 4.336850983558228519e-03 +2 1 5 13 4.279278064057592638e-03 +2 1 5 14 1.189019695755343803e-02 +2 1 6 6 7.910866851802393906e-01 +2 1 6 7 -1.100544227997997948e-01 +2 1 6 8 1.844336695596378306e-02 +2 1 6 9 1.625300409585954051e-02 +2 1 6 10 -1.625300409585957173e-02 +2 1 6 11 -1.625300409581749428e-02 +2 1 6 12 1.625300409581747693e-02 +2 1 6 13 1.844336695596364428e-02 +2 1 6 14 7.316768888787231195e-02 +2 1 7 7 8.561957286599913841e-01 +2 1 7 8 -5.716562235314711499e-02 +2 1 7 9 -5.031308355955435574e-02 +2 1 7 10 5.031308355955436962e-02 +2 1 7 11 5.031308355958108436e-02 +2 1 7 12 -5.031308355958109130e-02 +2 1 7 13 -5.716562235314723295e-02 +2 1 7 14 -2.808073351360737546e-01 +2 1 8 8 7.485821185742452810e-01 +2 1 8 9 1.577671250586922674e-02 +2 1 8 10 -1.577671250586922674e-02 +2 1 8 11 -1.577671250582769399e-02 +2 1 8 12 1.577671250582766624e-02 +2 1 8 13 -2.514178814257549410e-01 +2 1 8 14 2.105853402228125351e-02 +2 1 9 9 4.747995102862429539e-01 +2 1 9 10 -1.374236146861855350e-02 +2 1 9 11 -1.374236146857702595e-02 +2 1 9 12 1.374236146857702248e-02 +2 1 9 13 1.577671250586915389e-02 +2 1 9 14 1.875965854781572878e-02 +2 1 10 10 4.747995102862430095e-01 +2 1 10 11 1.374236146857705024e-02 +2 1 10 12 -1.374236146857703636e-02 +2 1 10 13 -1.577671250586918511e-02 +2 1 10 14 -1.875965854781566980e-02 +2 1 11 11 4.747995102861600758e-01 +2 1 11 12 -1.374236146853552616e-02 +2 1 11 13 -1.577671250582766277e-02 +2 1 11 14 -1.875965854792543963e-02 +2 1 12 12 4.747995102861602978e-01 +2 1 12 13 1.577671250582769052e-02 +2 1 12 14 1.875965854792541188e-02 +2 1 13 13 7.485821185742452810e-01 +2 1 13 14 2.105853402228126739e-02 +2 1 14 14 6.997474159091373602e-01 +2 2 1 1 9.330336908699823811e-10 +2 3 1 1 5.566485383718859925e-01 +2 4 1 1 1.443351461628116450e+00 +2 5 1 1 1.112320403823755521e+00 +2 6 1 1 8.876795961762465881e-01 +2 7 1 1 1.112320403823996884e+00 +2 8 1 1 8.876795961760038933e-01 +2 9 1 1 1.556648537905368723e+00 +2 10 1 1 4.433514620946319984e-01 +2 11 1 1 1.007643859456855751e+00 +2 12 1 1 9.330343783657861062e-10 +2 13 1 1 1.024695090586369428e+00 +2 14 1 1 5.209705378506979123e-01 +2 15 1 1 4.665163751787548061e-10 +2 16 1 1 1.112585238773959651e+00 +*** END *** +*** REQUEST *** +"" +1 +5 +1 1 1 1 1 +0.10485760000000000000e7 +0 1 1 1 0.52428800000000000000e6 +1 1 1 1 0.10485760000000000000e7 +1 3 1 1 0.52428800000000000000e6 +1 4 1 1 0.52428800000000000000e6 +*** ANSWER *** +5.000000009006688728e-01 +1 1 1 1 2.968829838647855240e-03 +1 2 1 1 2.024410062491533574e-03 +1 3 1 1 2.621440024966199417e+05 +1 4 1 1 2.621440024966199417e+05 +1 5 1 1 2.024410062491533574e-03 +2 1 1 1 9.999999999999902300e-01 +2 2 1 1 1.434681423197123440e+00 +2 3 1 1 1.001321036212031532e-14 +2 4 1 1 1.001321036212031532e-14 +2 5 1 1 1.434681423197123440e+00 +*** END *** +*** REQUEST *** +"" +57 +16 +14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.10485760000000000000e7 0.0 0.0 0.0 -0.10485760000000000000e7 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.10485760000000000000e7 0.0 0.10485760000000000000e7 -0.10485760000000000000e7 0.10485760000000000000e7 0.0 0.10485760000000000000e7 -0.10485760000000000000e7 0.0 0.0 -0.10485760000000000000e7 0.0 0.0 0.0 0.0 0.0 0.10485760000000000000e7 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.10485760000000000000e7 0.10485760000000000000e7 0.10485760000000000000e7 0.10485760000000000000e7 0.52428800000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 +0 1 1 2 0.13107200000000000000e6 +0 1 4 5 -0.26214400000000000000e6 +0 1 5 6 0.26214400000000000000e6 +0 2 1 1 -0.26214400000000000000e6 +0 4 1 1 0.26214400000000000000e6 +0 10 1 1 -0.26214400000000000000e6 +0 12 1 1 -0.26214400000000000000e6 +1 1 3 14 -0.52428800000000000000e6 +2 1 2 3 0.52428800000000000000e6 +2 1 3 8 -0.52428800000000000000e6 +3 1 3 12 -0.52428800000000000000e6 +4 1 3 11 -0.52428800000000000000e6 +5 1 3 10 -0.52428800000000000000e6 +6 1 7 9 -0.52428800000000000000e6 +6 1 9 14 0.52428800000000000000e6 +7 1 3 8 -0.52428800000000000000e6 +8 1 7 7 -0.10485760000000000000e7 +8 1 7 14 0.52428800000000000000e6 +9 1 3 6 -0.52428800000000000000e6 +10 1 3 5 -0.52428800000000000000e6 +11 1 3 4 -0.52428800000000000000e6 +12 1 3 14 0.52428800000000000000e6 +12 1 7 7 -0.10485760000000000000e7 +12 1 7 14 0.52428800000000000000e6 +13 1 2 3 -0.52428800000000000000e6 +14 1 1 2 -0.26214400000000000000e6 +14 1 4 5 0.52428800000000000000e6 +14 1 5 6 -0.52428800000000000000e6 +14 2 1 1 0.52428800000000000000e6 +14 4 1 1 0.52428800000000000000e6 +14 10 1 1 -0.52428800000000000000e6 +14 12 1 1 -0.52428800000000000000e6 +15 1 2 3 0.26214400000000000000e6 +15 1 2 7 -0.26214400000000000000e6 +15 1 3 8 -0.26214400000000000000e6 +15 1 7 8 0.26214400000000000000e6 +15 1 13 14 -0.26214400000000000000e6 +16 1 2 13 -0.26214400000000000000e6 +16 1 8 13 0.26214400000000000000e6 +16 1 13 13 -0.52428800000000000000e6 +17 1 2 12 -0.26214400000000000000e6 +17 1 8 12 0.26214400000000000000e6 +17 1 12 13 -0.26214400000000000000e6 +18 1 2 10 -0.26214400000000000000e6 +18 1 8 10 0.26214400000000000000e6 +18 1 10 13 -0.26214400000000000000e6 +19 1 2 2 -0.52428800000000000000e6 +19 1 2 13 -0.26214400000000000000e6 +19 1 8 8 0.52428800000000000000e6 +19 1 8 13 -0.26214400000000000000e6 +20 1 2 3 0.26214400000000000000e6 +20 1 2 7 -0.26214400000000000000e6 +20 1 3 8 -0.26214400000000000000e6 +20 1 7 8 0.26214400000000000000e6 +20 1 13 14 -0.26214400000000000000e6 +21 1 1 4 -0.26214400000000000000e6 +21 1 1 6 0.26214400000000000000e6 +21 1 2 6 -0.26214400000000000000e6 +21 1 4 8 0.26214400000000000000e6 +21 1 4 13 -0.26214400000000000000e6 +21 16 1 1 -0.52428800000000000000e6 +22 1 2 4 -0.26214400000000000000e6 +22 1 4 8 0.26214400000000000000e6 +22 1 4 13 -0.26214400000000000000e6 +23 1 1 2 -0.13107200000000000000e6 +23 1 4 5 -0.26214400000000000000e6 +23 1 5 6 0.26214400000000000000e6 +23 2 1 1 -0.26214400000000000000e6 +23 4 1 1 0.26214400000000000000e6 +23 10 1 1 -0.26214400000000000000e6 +23 12 1 1 0.26214400000000000000e6 +24 1 1 1 0.52428800000000000000e6 +24 1 1 2 -0.13107200000000000000e6 +24 1 4 5 0.26214400000000000000e6 +24 1 5 6 -0.26214400000000000000e6 +24 2 1 1 0.26214400000000000000e6 +24 4 1 1 -0.26214400000000000000e6 +24 10 1 1 0.26214400000000000000e6 +24 12 1 1 0.26214400000000000000e6 +25 1 1 2 -0.26214400000000000000e6 +25 1 1 3 0.52428800000000000000e6 +25 1 4 5 0.52428800000000000000e6 +25 1 5 6 -0.52428800000000000000e6 +25 2 1 1 0.52428800000000000000e6 +25 4 1 1 0.52428800000000000000e6 +25 10 1 1 -0.52428800000000000000e6 +25 12 1 1 -0.52428800000000000000e6 +26 1 1 4 0.52428800000000000000e6 +26 1 1 6 -0.52428800000000000000e6 +26 1 1 7 0.52428800000000000000e6 +26 1 1 8 -0.52428800000000000000e6 +26 1 4 5 -0.52428800000000000000e6 +26 1 5 6 0.52428800000000000000e6 +26 4 1 1 0.10485760000000000000e7 +27 1 1 4 -0.52428800000000000000e6 +27 1 1 6 0.52428800000000000000e6 +27 1 1 9 0.52428800000000000000e6 +27 1 1 10 -0.52428800000000000000e6 +27 1 4 5 0.52428800000000000000e6 +27 1 5 6 -0.52428800000000000000e6 +27 6 1 1 -0.10485760000000000000e7 +28 1 1 4 0.52428800000000000000e6 +28 1 1 6 -0.52428800000000000000e6 +28 1 1 11 0.52428800000000000000e6 +28 1 1 12 -0.52428800000000000000e6 +28 1 4 5 -0.52428800000000000000e6 +28 1 5 6 0.52428800000000000000e6 +28 8 1 1 0.10485760000000000000e7 +29 1 1 2 0.26214400000000000000e6 +29 1 1 8 -0.52428800000000000000e6 +29 1 1 13 0.52428800000000000000e6 +29 1 4 5 -0.52428800000000000000e6 +29 1 5 6 0.52428800000000000000e6 +29 2 1 1 -0.52428800000000000000e6 +29 4 1 1 0.52428800000000000000e6 +29 10 1 1 -0.52428800000000000000e6 +29 12 1 1 0.52428800000000000000e6 +30 1 1 2 0.26214400000000000000e6 +30 1 1 4 0.52428800000000000000e6 +30 1 1 6 -0.52428800000000000000e6 +30 1 1 8 -0.52428800000000000000e6 +30 1 1 14 0.52428800000000000000e6 +30 1 4 5 -0.10485760000000000000e7 +30 1 5 6 0.10485760000000000000e7 +30 2 1 1 -0.52428800000000000000e6 +30 4 1 1 0.52428800000000000000e6 +30 10 1 1 0.52428800000000000000e6 +30 12 1 1 0.52428800000000000000e6 +31 1 2 2 -0.10485760000000000000e7 +31 1 2 8 0.52428800000000000000e6 +31 1 2 13 -0.52428800000000000000e6 +32 1 2 3 0.52428800000000000000e6 +32 1 2 7 -0.52428800000000000000e6 +32 1 2 14 0.52428800000000000000e6 +33 1 3 3 0.52428800000000000000e6 +33 1 3 14 0.26214400000000000000e6 +33 1 7 7 -0.52428800000000000000e6 +33 1 7 14 0.26214400000000000000e6 +34 1 3 7 0.52428800000000000000e6 +34 1 7 7 -0.10485760000000000000e7 +34 1 7 14 0.52428800000000000000e6 +35 1 3 9 0.52428800000000000000e6 +35 1 7 9 -0.52428800000000000000e6 +35 1 9 14 0.52428800000000000000e6 +36 1 2 3 0.52428800000000000000e6 +36 1 3 8 -0.52428800000000000000e6 +36 1 3 13 0.52428800000000000000e6 +37 1 3 4 0.52428800000000000000e6 +37 1 4 7 -0.52428800000000000000e6 +37 1 4 14 0.52428800000000000000e6 +38 1 3 5 -0.52428800000000000000e6 +38 1 5 7 0.52428800000000000000e6 +38 1 5 14 -0.52428800000000000000e6 +39 1 2 5 0.52428800000000000000e6 +39 1 5 8 -0.52428800000000000000e6 +39 1 5 13 0.52428800000000000000e6 +40 1 1 4 0.52428800000000000000e6 +40 1 1 6 -0.52428800000000000000e6 +40 1 4 8 -0.52428800000000000000e6 +40 1 4 13 0.52428800000000000000e6 +40 1 6 8 0.52428800000000000000e6 +40 1 6 13 -0.52428800000000000000e6 +40 16 1 1 0.10485760000000000000e7 +41 1 3 6 0.52428800000000000000e6 +41 1 6 7 -0.52428800000000000000e6 +41 1 6 14 0.52428800000000000000e6 +42 1 3 11 -0.52428800000000000000e6 +42 1 7 11 0.52428800000000000000e6 +42 1 11 14 -0.52428800000000000000e6 +43 1 2 3 0.52428800000000000000e6 +43 1 3 8 -0.52428800000000000000e6 +43 1 7 13 0.52428800000000000000e6 +43 1 13 14 -0.52428800000000000000e6 +44 1 3 8 0.52428800000000000000e6 +44 1 7 8 -0.52428800000000000000e6 +44 1 8 14 0.52428800000000000000e6 +45 1 2 9 0.52428800000000000000e6 +45 1 8 9 -0.52428800000000000000e6 +45 1 9 13 0.52428800000000000000e6 +46 1 3 10 0.52428800000000000000e6 +46 1 7 10 -0.52428800000000000000e6 +46 1 10 14 0.52428800000000000000e6 +47 1 2 11 0.52428800000000000000e6 +47 1 8 11 -0.52428800000000000000e6 +47 1 11 13 0.52428800000000000000e6 +48 1 3 12 0.52428800000000000000e6 +48 1 7 12 -0.52428800000000000000e6 +48 1 12 14 0.52428800000000000000e6 +49 1 3 14 0.26214400000000000000e6 +49 1 7 14 -0.26214400000000000000e6 +49 1 14 14 0.52428800000000000000e6 +50 3 1 1 0.52428800000000000000e6 +50 4 1 1 0.52428800000000000000e6 +51 5 1 1 0.52428800000000000000e6 +51 6 1 1 0.52428800000000000000e6 +52 7 1 1 0.52428800000000000000e6 +52 8 1 1 0.52428800000000000000e6 +53 9 1 1 0.52428800000000000000e6 +53 10 1 1 0.52428800000000000000e6 +54 1 1 5 -0.26214400000000000000e6 +54 11 1 1 0.52428800000000000000e6 +55 1 1 5 0.26214400000000000000e6 +55 1 2 5 -0.26214400000000000000e6 +55 13 1 1 0.52428800000000000000e6 +56 1 1 4 -0.26214400000000000000e6 +56 1 1 6 0.26214400000000000000e6 +56 14 1 1 0.52428800000000000000e6 +57 1 4 5 -0.26214400000000000000e6 +57 1 5 6 0.26214400000000000000e6 +57 15 1 1 0.52428800000000000000e6 +*** ANSWER *** +9.076161302847910450e-01 -5.949881492605670411e-03 7.275603396884498064e-20 -7.275588176834902845e-20 -7.275597535307544895e-20 7.275590640730833405e-20 5.949881492605672145e-03 -9.076161302847910450e-01 -1.944355797141921580e-19 4.030462261977455956e-19 1.944355530943224229e-19 9.076161304925188800e-01 -5.949881492605673013e-03 -4.999999988778522919e-01 -1.202101201657477941e-01 9.232352309666830285e-11 1.003283753923920220e-19 -1.003281711545456714e-19 -9.232352289246398279e-11 1.202101201657477941e-01 2.171373708720645762e-10 -2.171373708720418287e-10 7.327878026817551471e-10 -4.636295539982629404e-10 1.278551057501144625e-20 1.540923693234613258e-11 -1.281819775754666192e-11 1.281819775811322894e-11 2.359361199834245390e-10 1.540923664696639141e-11 9.232352307974966759e-11 1.595483300260840258e-19 -2.769705692561582288e-10 8.500132730890344284e-21 -8.276017641461238099e-21 -4.952076911711697908e-21 1.742839464260758818e-19 -3.635353913709798965e-19 -6.427663597879161250e-11 -5.428434292527932631e-11 -1.742839726751251394e-19 6.447981277018491585e-20 3.959000978141736844e-20 6.890850878530062382e-20 -5.016398095846197032e-20 -6.447990627191126687e-20 5.016376257970784802e-20 6.447996509302730109e-20 -1.384852847595148050e-10 9.999999973486657368e-01 -2.896496485190902979e-10 -2.896496485195744054e-10 -6.488139178600734617e-10 -2.403161916237357302e-10 -3.856598141282796333e-10 -1.012857313985320174e-10 -1.183936949547040661e-11 +1 1 1 1 2.920429535306131447e-04 +1 1 1 2 -2.635547086405195735e-04 +1 1 1 3 6.703289768351601134e-15 +1 1 1 4 -2.923183135369373685e-05 +1 1 1 5 -3.810095857783112982e-05 +1 1 1 6 2.923183135369373685e-05 +1 1 1 7 8.078878012785889158e-06 +1 1 1 8 -1.398562323498202080e-04 +1 1 1 9 -6.720427265908624284e-06 +1 1 1 10 6.720427265908624284e-06 +1 1 1 11 6.720427266205668574e-06 +1 1 1 12 -6.720427266205668574e-06 +1 1 1 13 1.236984764738696847e-04 +1 1 1 14 8.078877863164715418e-06 +1 1 2 2 4.867142497706269944e-04 +1 1 2 3 -3.722580243139683552e-15 +1 1 2 4 5.692125894988053314e-05 +1 1 2 5 6.739893739079510701e-05 +1 1 2 6 -5.692125894988649625e-05 +1 1 2 7 -3.011883135832012792e-14 +1 1 2 8 4.840411526843579372e-05 +1 1 2 9 -2.630037324875010950e-14 +1 1 2 10 2.630042809913722049e-14 +1 1 2 11 2.630025875538986822e-14 +1 1 2 12 -2.630048163886321421e-14 +1 1 2 13 -4.840411532196681231e-05 +1 1 2 14 8.364927485271554170e-14 +1 1 3 3 3.899060193230802218e-04 +1 1 3 4 -1.056524555688227366e-14 +1 1 3 5 -2.071505656965503194e-14 +1 1 3 6 1.056524575129970694e-14 +1 1 3 7 4.456517589213036824e-15 +1 1 3 8 -6.318898677433546386e-15 +1 1 3 9 -4.339016737206429601e-15 +1 1 3 10 4.339043706425116394e-15 +1 1 3 11 4.339043662909175968e-15 +1 1 3 12 -4.339043598764522871e-15 +1 1 3 13 -2.596314499887502673e-15 +1 1 3 14 4.457242804926636837e-15 +1 1 4 4 5.351183651372539915e-04 +1 1 4 5 1.164226234783372407e-04 +1 1 4 7 -9.137498170383447191e-14 +1 1 4 8 2.846062958361479699e-05 +1 1 4 13 -2.846062958361479699e-05 +1 1 4 14 9.137498170383447191e-14 +1 1 5 5 5.351183651372539915e-04 +1 1 5 6 -1.164226234783372407e-04 +1 1 5 7 -1.905972432711083080e-13 +1 1 5 8 3.369946892404869694e-05 +1 1 5 13 -3.369946892404869694e-05 +1 1 5 14 1.905972432711083080e-13 +1 1 6 6 5.351183651372539915e-04 +1 1 6 7 9.137499546589600910e-14 +1 1 6 8 -2.846062958360884743e-05 +1 1 6 13 2.846062958360884743e-05 +1 1 6 14 -9.137499546589600910e-14 +1 1 7 7 4.625121922990759610e-04 +1 1 7 8 -8.965834774842396553e-14 +1 1 7 9 -3.380603192126803834e-14 +1 1 7 10 3.380604109948781429e-14 +1 1 7 11 3.380599207765470916e-14 +1 1 7 12 -3.380607193869309764e-14 +1 1 7 13 2.075656704827974927e-14 +1 1 7 14 7.260617290708699326e-05 +1 1 8 8 4.867142499670098349e-04 +1 1 8 9 2.630037324875010950e-14 +1 1 8 10 -2.630042809913722049e-14 +1 1 8 11 -2.630025875538986822e-14 +1 1 8 12 2.630048163886321421e-14 +1 1 8 13 4.840411522377506678e-05 +1 1 8 14 3.612790425402769346e-14 +1 1 9 9 5.351183651372539915e-04 +1 1 9 13 -2.630037324875010950e-14 +1 1 9 14 3.380603192126803834e-14 +1 1 10 10 5.351183651372539915e-04 +1 1 10 13 2.630042809913722049e-14 +1 1 10 14 -3.380604109948781429e-14 +1 1 11 11 5.351183651372539915e-04 +1 1 11 13 2.630025875538986822e-14 +1 1 11 14 -3.380599207765470916e-14 +1 1 12 12 5.351183651372539915e-04 +1 1 12 13 -2.630048163886321421e-14 +1 1 12 14 3.380607193869309764e-14 +1 1 13 13 4.867142498599479061e-04 +1 1 13 14 3.277387644611616939e-14 +1 1 14 14 4.625121921612591197e-04 +1 2 1 1 6.780359724288427536e-04 +1 3 1 1 5.242879991450556554e+05 +1 4 1 1 1.949530137702326638e-04 +1 5 1 1 3.832585302144773942e-04 +1 6 1 1 3.966993847462942091e-04 +1 7 1 1 3.832585302142223899e-04 +1 8 1 1 3.966993847466342149e-04 +1 9 1 1 1.949530137702317964e-04 +1 10 1 1 5.242879991773712100e+05 +1 11 1 1 4.091234696632283993e-04 +1 12 1 1 5.242880001491253497e+05 +1 13 1 1 3.329215525075673865e-04 +1 14 1 1 4.820154715937802203e-04 +1 15 1 1 5.289111257832136703e-04 +1 16 1 1 3.643545880702642528e-04 +2 1 1 1 3.999999997992406797e+00 +2 1 1 2 1.999999998661600831e+00 +2 1 1 3 1.005053985478608522e-15 +2 1 1 4 -3.280217455405907978e-02 +2 1 1 5 6.176797185473956869e-02 +2 1 1 6 3.280217455406085614e-02 +2 1 1 7 -1.556293052167238011e-01 +2 1 1 8 1.155629304547417746e+00 +2 1 1 9 1.410645412548914568e-01 +2 1 1 10 -1.410645412548937883e-01 +2 1 1 11 -1.410645412569754009e-01 +2 1 1 12 1.410645412569749013e-01 +2 1 1 13 -8.443706941141835287e-01 +2 1 1 14 -1.556293052167226632e-01 +2 1 2 2 1.897337807037401625e+00 +2 1 2 3 -3.398717516929722890e-19 +2 1 2 4 -4.597571212927607787e-02 +2 1 2 5 -5.418228734114162448e-02 +2 1 2 6 4.597571212927732687e-02 +2 1 2 7 -7.791804050603097498e-02 +2 1 2 8 5.265869440246649935e-01 +2 1 2 9 7.072370231975602661e-02 +2 1 2 10 -7.072370231975770583e-02 +2 1 2 11 -7.072370231651636807e-02 +2 1 2 12 7.072370231651585459e-02 +2 1 2 13 -3.707508630127355764e-01 +2 1 2 14 -7.791804050603085008e-02 +2 1 3 3 9.999999999999997780e-01 +2 1 3 4 1.021775331992035214e-21 +2 1 3 5 1.676597032099406827e-20 +2 1 3 6 -4.162336910767331597e-20 +2 1 3 7 -1.934810228763150051e-17 +2 1 3 8 -1.887982140156105071e-19 +2 1 3 9 -1.598349036702389999e-19 +2 1 3 10 -2.198657882043152822e-21 +2 1 3 11 -5.028557178791460567e-21 +2 1 3 12 1.553310811363865150e-21 +2 1 3 13 1.936440257102754284e-19 +2 1 3 14 6.149190083447403086e-17 +2 1 4 4 1.070530775562424264e+00 +2 1 4 5 -1.884314797707294931e-01 +2 1 4 6 4.140682243044641053e-02 +2 1 4 7 9.321317270841586108e-03 +2 1 4 8 -3.230917333547313197e-02 +2 1 4 9 -9.270848479141077444e-03 +2 1 4 10 9.270848479141273468e-03 +2 1 4 11 9.270848475512721149e-03 +2 1 4 12 -9.270848475512672576e-03 +2 1 4 13 1.366653879380283834e-02 +2 1 4 14 9.321317270841589578e-03 +2 1 5 5 9.505026531399344281e-01 +2 1 5 6 1.884314797707287714e-01 +2 1 5 7 1.563815870031422944e-02 +2 1 5 8 -4.272930237087143451e-02 +2 1 5 9 -1.602005094054630152e-02 +2 1 5 10 1.602005094054677684e-02 +2 1 5 11 1.602005092833475725e-02 +2 1 5 12 -1.602005092833443459e-02 +2 1 5 13 1.145298497027018997e-02 +2 1 5 14 1.563815870031423291e-02 +2 1 6 6 1.070530775562424708e+00 +2 1 6 7 -9.321317270841358860e-03 +2 1 6 8 3.230917333547369402e-02 +2 1 6 9 9.270848479140886625e-03 +2 1 6 10 -9.270848479141039281e-03 +2 1 6 11 -9.270848475512526859e-03 +2 1 6 12 9.270848475512450532e-03 +2 1 6 13 -1.366653879380354611e-02 +2 1 6 14 -9.321317270841360594e-03 +2 1 7 7 1.053980906457688160e+00 +2 1 7 8 -3.697112771426870614e-02 +2 1 7 9 2.624520729391167234e-03 +2 1 7 10 -2.624520729391323359e-03 +2 1 7 11 -2.624520723930834961e-03 +2 1 7 12 2.624520723930719168e-03 +2 1 7 13 4.094691279176214393e-02 +2 1 7 14 5.398090645768809787e-02 +2 1 8 8 1.356233398723004635e+00 +2 1 8 9 3.273733043048900060e-02 +2 1 8 10 -3.273733043048970143e-02 +2 1 8 11 -3.273733043432947715e-02 +2 1 8 12 3.273733043432928980e-02 +2 1 8 13 -1.703535453016603862e-01 +2 1 8 14 -3.697112771426860206e-02 +2 1 9 9 1.108728878777101023e+00 +2 1 9 10 3.208719215768788754e-03 +2 1 9 11 3.208719210295720142e-03 +2 1 9 12 -3.208719210295616492e-03 +2 1 9 13 -3.798637188926706071e-02 +2 1 9 14 2.624520729391163331e-03 +2 1 10 10 1.108728878777101468e+00 +2 1 10 11 -3.208719210295846343e-03 +2 1 10 12 3.208719210295764377e-03 +2 1 10 13 3.798637188926803215e-02 +2 1 10 14 -2.624520729391328997e-03 +2 1 11 11 1.108728878788047378e+00 +2 1 11 12 3.208719204822684055e-03 +2 1 11 13 3.798637188218687011e-02 +2 1 11 14 -2.624520723930847538e-03 +2 1 12 12 1.108728878788047822e+00 +2 1 12 13 -3.798637188218650235e-02 +2 1 12 14 2.624520723930730878e-03 +2 1 13 13 1.200397317711075607e+00 +2 1 13 14 4.094691279176220639e-02 +2 1 14 14 1.053980906457687938e+00 +2 2 1 1 7.537259197521217757e-01 +2 3 1 1 6.691999498258463344e-10 +2 4 1 1 1.999999999330804190e+00 +2 5 1 1 1.029129527923553278e+00 +2 6 1 1 9.708704720764466112e-01 +2 7 1 1 1.029129527919387721e+00 +2 8 1 1 9.708704720806121680e-01 +2 9 1 1 1.999999999330800193e+00 +2 10 1 1 6.691999400128637613e-10 +2 11 1 1 1.061767971854739478e+00 +2 12 1 1 6.692003316403501781e-10 +2 13 1 1 8.840497408041190219e-01 +2 14 1 1 9.343956508918794812e-01 +2 15 1 1 6.231370404585406808e-01 +2 16 1 1 9.736529248495666700e-01 +*** END *** +*** REQUEST *** +"" +47 +20 +14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.52428800000000000000e6 -0.26214400000000000000e6 0.0 0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.0 0.52428800000000000000e6 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.52428800000000000000e6 -0.52428800000000000000e6 0.0 0.0 -0.52428800000000000000e6 -0.52428800000000000000e6 0.0 0.10485760000000000000e7 0.0 -0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.0 0.0 0.10485760000000000000e7 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.26214400000000000000e6 0.26214400000000000000e6 0.26214400000000000000e6 0.26214400000000000000e6 +0 1 1 2 0.13107200000000000000e6 +0 1 4 5 -0.26214400000000000000e6 +0 1 5 6 0.26214400000000000000e6 +0 2 1 1 -0.26214400000000000000e6 +0 12 1 1 -0.26214400000000000000e6 +1 1 2 3 0.26214400000000000000e6 +1 1 2 7 -0.26214400000000000000e6 +1 1 3 8 -0.26214400000000000000e6 +1 1 7 8 0.26214400000000000000e6 +1 1 13 14 -0.26214400000000000000e6 +2 1 2 13 -0.26214400000000000000e6 +2 1 8 13 0.26214400000000000000e6 +2 1 13 13 -0.52428800000000000000e6 +3 1 2 12 -0.26214400000000000000e6 +3 1 8 12 0.26214400000000000000e6 +3 1 12 13 -0.26214400000000000000e6 +4 1 2 10 -0.26214400000000000000e6 +4 1 8 10 0.26214400000000000000e6 +4 1 10 13 -0.26214400000000000000e6 +5 1 2 2 -0.52428800000000000000e6 +5 1 2 13 -0.26214400000000000000e6 +5 1 8 8 0.52428800000000000000e6 +5 1 8 13 -0.26214400000000000000e6 +6 1 1 2 0.13107200000000000000e6 +6 1 2 7 -0.26214400000000000000e6 +6 1 3 8 -0.26214400000000000000e6 +6 1 4 5 -0.26214400000000000000e6 +6 1 5 6 0.26214400000000000000e6 +6 1 7 8 0.26214400000000000000e6 +6 1 13 14 -0.26214400000000000000e6 +6 2 1 1 -0.26214400000000000000e6 +6 4 1 1 0.52428800000000000000e6 +6 10 1 1 -0.52428800000000000000e6 +6 12 1 1 0.78643200000000000000e6 +6 16 1 1 0.52428800000000000000e6 +7 1 1 4 -0.26214400000000000000e6 +7 1 1 6 0.26214400000000000000e6 +7 1 2 6 -0.26214400000000000000e6 +7 1 4 8 0.26214400000000000000e6 +7 1 4 13 -0.26214400000000000000e6 +7 20 1 1 -0.52428800000000000000e6 +8 1 2 4 -0.26214400000000000000e6 +8 1 4 8 0.26214400000000000000e6 +8 1 4 13 -0.26214400000000000000e6 +9 1 1 2 0.13107200000000000000e6 +9 1 2 3 -0.26214400000000000000e6 +9 1 4 5 -0.26214400000000000000e6 +9 1 5 6 0.26214400000000000000e6 +9 2 1 1 -0.26214400000000000000e6 +9 4 1 1 0.52428800000000000000e6 +9 10 1 1 -0.52428800000000000000e6 +9 12 1 1 0.78643200000000000000e6 +9 16 1 1 0.52428800000000000000e6 +10 1 1 2 -0.13107200000000000000e6 +10 1 4 5 -0.26214400000000000000e6 +10 1 5 6 0.26214400000000000000e6 +10 2 1 1 -0.26214400000000000000e6 +10 4 1 1 0.52428800000000000000e6 +10 10 1 1 -0.52428800000000000000e6 +10 12 1 1 0.26214400000000000000e6 +11 1 1 1 0.52428800000000000000e6 +11 1 1 2 -0.13107200000000000000e6 +11 1 4 5 0.26214400000000000000e6 +11 1 5 6 -0.26214400000000000000e6 +11 2 1 1 0.26214400000000000000e6 +11 12 1 1 0.26214400000000000000e6 +12 1 1 2 -0.26214400000000000000e6 +12 1 1 3 0.52428800000000000000e6 +12 1 4 5 0.52428800000000000000e6 +12 1 5 6 -0.52428800000000000000e6 +12 2 1 1 0.52428800000000000000e6 +12 12 1 1 -0.52428800000000000000e6 +13 1 1 4 0.52428800000000000000e6 +13 1 1 6 -0.52428800000000000000e6 +13 1 1 7 0.52428800000000000000e6 +13 1 1 8 -0.52428800000000000000e6 +13 1 4 5 -0.52428800000000000000e6 +13 1 5 6 0.52428800000000000000e6 +13 4 1 1 0.10485760000000000000e7 +14 1 1 4 -0.52428800000000000000e6 +14 1 1 6 0.52428800000000000000e6 +14 1 1 9 0.52428800000000000000e6 +14 1 1 10 -0.52428800000000000000e6 +14 1 4 5 0.52428800000000000000e6 +14 1 5 6 -0.52428800000000000000e6 +14 6 1 1 -0.10485760000000000000e7 +15 1 1 4 0.52428800000000000000e6 +15 1 1 6 -0.52428800000000000000e6 +15 1 1 11 0.52428800000000000000e6 +15 1 1 12 -0.52428800000000000000e6 +15 1 4 5 -0.52428800000000000000e6 +15 1 5 6 0.52428800000000000000e6 +15 8 1 1 0.10485760000000000000e7 +16 1 1 2 0.26214400000000000000e6 +16 1 1 8 -0.52428800000000000000e6 +16 1 1 13 0.52428800000000000000e6 +16 1 4 5 -0.52428800000000000000e6 +16 1 5 6 0.52428800000000000000e6 +16 2 1 1 -0.52428800000000000000e6 +16 4 1 1 0.10485760000000000000e7 +16 10 1 1 -0.10485760000000000000e7 +16 12 1 1 0.52428800000000000000e6 +17 1 1 2 0.26214400000000000000e6 +17 1 1 4 0.52428800000000000000e6 +17 1 1 6 -0.52428800000000000000e6 +17 1 1 8 -0.52428800000000000000e6 +17 1 1 14 0.52428800000000000000e6 +17 1 4 5 -0.10485760000000000000e7 +17 1 5 6 0.10485760000000000000e7 +17 2 1 1 -0.52428800000000000000e6 +17 4 1 1 0.10485760000000000000e7 +17 12 1 1 0.52428800000000000000e6 +18 1 2 2 -0.10485760000000000000e7 +18 1 2 8 0.52428800000000000000e6 +18 1 2 13 -0.52428800000000000000e6 +19 1 2 3 0.52428800000000000000e6 +19 1 2 7 -0.52428800000000000000e6 +19 1 2 14 0.52428800000000000000e6 +20 1 3 3 0.52428800000000000000e6 +20 1 3 14 0.26214400000000000000e6 +20 1 7 7 -0.52428800000000000000e6 +20 1 7 14 0.26214400000000000000e6 +21 1 1 5 -0.52428800000000000000e6 +21 1 3 5 0.52428800000000000000e6 +21 13 1 1 -0.10485760000000000000e7 +22 1 3 7 0.52428800000000000000e6 +22 1 7 7 -0.10485760000000000000e7 +22 1 7 14 0.52428800000000000000e6 +23 1 3 9 0.52428800000000000000e6 +23 1 7 9 -0.52428800000000000000e6 +23 1 9 14 0.52428800000000000000e6 +24 1 1 2 0.26214400000000000000e6 +24 1 3 8 -0.52428800000000000000e6 +24 1 3 13 0.52428800000000000000e6 +24 1 4 5 -0.52428800000000000000e6 +24 1 5 6 0.52428800000000000000e6 +24 2 1 1 -0.52428800000000000000e6 +24 4 1 1 0.10485760000000000000e7 +24 10 1 1 -0.10485760000000000000e7 +24 12 1 1 0.15728640000000000000e7 +24 16 1 1 0.10485760000000000000e7 +25 1 3 4 0.52428800000000000000e6 +25 1 4 7 -0.52428800000000000000e6 +25 1 4 14 0.52428800000000000000e6 +26 1 1 5 -0.52428800000000000000e6 +26 1 5 7 0.52428800000000000000e6 +26 1 5 14 -0.52428800000000000000e6 +26 13 1 1 -0.10485760000000000000e7 +27 1 2 5 0.52428800000000000000e6 +27 1 5 8 -0.52428800000000000000e6 +27 1 5 13 0.52428800000000000000e6 +28 1 1 4 0.52428800000000000000e6 +28 1 1 6 -0.52428800000000000000e6 +28 1 4 8 -0.52428800000000000000e6 +28 1 4 13 0.52428800000000000000e6 +28 1 6 8 0.52428800000000000000e6 +28 1 6 13 -0.52428800000000000000e6 +28 20 1 1 0.10485760000000000000e7 +29 1 3 6 0.52428800000000000000e6 +29 1 6 7 -0.52428800000000000000e6 +29 1 6 14 0.52428800000000000000e6 +30 1 3 11 -0.52428800000000000000e6 +30 1 7 11 0.52428800000000000000e6 +30 1 11 14 -0.52428800000000000000e6 +31 1 1 2 0.26214400000000000000e6 +31 1 3 8 -0.52428800000000000000e6 +31 1 4 5 -0.52428800000000000000e6 +31 1 5 6 0.52428800000000000000e6 +31 1 7 13 0.52428800000000000000e6 +31 1 13 14 -0.52428800000000000000e6 +31 2 1 1 -0.52428800000000000000e6 +31 4 1 1 0.10485760000000000000e7 +31 10 1 1 -0.10485760000000000000e7 +31 12 1 1 0.15728640000000000000e7 +31 16 1 1 0.10485760000000000000e7 +32 1 3 8 0.52428800000000000000e6 +32 1 7 8 -0.52428800000000000000e6 +32 1 8 14 0.52428800000000000000e6 +33 1 2 9 0.52428800000000000000e6 +33 1 8 9 -0.52428800000000000000e6 +33 1 9 13 0.52428800000000000000e6 +34 1 3 10 0.52428800000000000000e6 +34 1 7 10 -0.52428800000000000000e6 +34 1 10 14 0.52428800000000000000e6 +35 1 2 11 0.52428800000000000000e6 +35 1 8 11 -0.52428800000000000000e6 +35 1 11 13 0.52428800000000000000e6 +36 1 3 12 0.52428800000000000000e6 +36 1 7 12 -0.52428800000000000000e6 +36 1 12 14 0.52428800000000000000e6 +37 1 3 14 0.26214400000000000000e6 +37 1 7 14 -0.26214400000000000000e6 +37 1 14 14 0.52428800000000000000e6 +38 3 1 1 0.52428800000000000000e6 +38 4 1 1 0.52428800000000000000e6 +39 5 1 1 0.52428800000000000000e6 +39 6 1 1 0.52428800000000000000e6 +40 7 1 1 0.52428800000000000000e6 +40 8 1 1 0.52428800000000000000e6 +41 9 1 1 0.52428800000000000000e6 +41 10 1 1 0.52428800000000000000e6 +42 1 1 5 -0.26214400000000000000e6 +42 11 1 1 0.52428800000000000000e6 +43 4 1 1 -0.52428800000000000000e6 +43 10 1 1 0.52428800000000000000e6 +43 12 1 1 -0.52428800000000000000e6 +43 14 1 1 0.52428800000000000000e6 +44 1 1 5 0.26214400000000000000e6 +44 1 2 5 -0.26214400000000000000e6 +44 15 1 1 0.52428800000000000000e6 +45 1 1 4 -0.26214400000000000000e6 +45 1 1 6 0.26214400000000000000e6 +45 17 1 1 0.52428800000000000000e6 +46 1 4 5 -0.26214400000000000000e6 +46 1 5 6 0.26214400000000000000e6 +46 18 1 1 0.52428800000000000000e6 +47 1 1 4 0.26214400000000000000e6 +47 1 1 6 -0.26214400000000000000e6 +47 1 3 4 -0.26214400000000000000e6 +47 1 3 6 0.26214400000000000000e6 +47 19 1 1 0.52428800000000000000e6 +*** ANSWER *** +-1.441601497045849456e+01 -1.380205971026461420e-10 8.450166922011610698e-20 -8.450916668291332945e-20 1.380205972663046534e-10 1.441601497045849456e+01 -1.257545499465708613e-10 1.257545499465878185e-10 -1.441601496967661511e+01 -9.999999958022715019e-01 5.323304231657361860e-10 -1.887626332943712889e-10 -3.079157694810033954e-11 -6.048469420545591170e-11 6.048469420491472878e-11 2.355055081262433886e-10 1.579710562651817101e-10 -1.380205970540980847e-10 1.303131658774997396e-10 1.380205971526566547e-10 -1.096295190242516437e-10 -1.380205970831949899e-10 -8.012277634553404141e-21 1.303131654372467139e-10 3.333186181653054370e-11 -5.481475949729385307e-11 4.100171235264665679e-11 3.143863720901743050e-11 -3.333186181652496023e-11 -8.017336204213298679e-21 6.515658278764878732e-11 6.515658269063963002e-11 -4.225464360953118470e-20 8.016195658572545177e-21 4.224726393635330856e-20 -8.014998119951071866e-21 1.380205970446607811e-10 9.999999934164999216e-01 3.563607300923616874e-10 3.563607300928745394e-10 -2.129969022366627028e-10 1.591538558613614959e-10 -2.745862286220338743e-10 2.460102761000473818e-10 5.593841040645159798e-10 1.999999993045935787e+00 1.999911709133144022e-10 +1 1 1 1 7.195255132832686917e-04 +1 1 1 2 -3.136240980921179561e-04 +1 1 1 3 -9.896598348463933430e-05 +1 1 1 4 8.533747346133697606e-05 +1 1 1 5 1.089850513245540099e-04 +1 1 1 6 -8.533747346133697606e-05 +1 1 1 7 -1.614365429496563082e-05 +1 1 1 8 -1.901513866966859055e-04 +1 1 1 9 -3.171139935559006903e-05 +1 1 1 10 3.171139935559006903e-05 +1 1 1 11 3.171139935530633332e-05 +1 1 1 12 -3.171139935530633332e-05 +1 1 1 13 1.234727118444918937e-04 +1 1 1 14 8.282232914715958842e-05 +1 1 2 2 5.127936030595910827e-04 +1 1 2 3 -1.366432581449120078e-04 +1 1 2 4 -3.296580074119831710e-05 +1 1 2 5 -4.299341205202646468e-05 +1 1 2 6 3.296580074119387187e-05 +1 1 2 7 -6.832162906877730594e-05 +1 1 2 8 -7.236254278829897663e-05 +1 1 2 9 -2.215360258875388576e-14 +1 1 2 10 2.215357099092563184e-14 +1 1 2 11 2.214973351466280344e-14 +1 1 2 12 -2.215160557603811675e-14 +1 1 2 13 7.236254274539666298e-05 +1 1 2 14 6.832162911158258349e-05 +1 1 3 3 5.127936032225215157e-04 +1 1 3 4 -3.495099033983472495e-05 +1 1 3 5 -5.747744127018684576e-05 +1 1 3 6 3.495099033983754388e-05 +1 1 3 7 -7.236254280355413487e-05 +1 1 3 8 -6.832162888881871884e-05 +1 1 3 9 -4.200741016464735150e-15 +1 1 3 10 4.202795189441682566e-15 +1 1 3 11 4.203393163834581938e-15 +1 1 3 12 -4.202167334312907566e-15 +1 1 3 13 6.832162888076320512e-05 +1 1 3 14 7.236254281166179872e-05 +1 1 4 4 4.404310603825494635e-04 +1 1 4 5 1.192942064455397404e-04 +1 1 4 7 -1.747549516806516570e-05 +1 1 4 8 -1.648290022503683117e-05 +1 1 4 13 1.648290022503683117e-05 +1 1 4 14 1.747549516806516570e-05 +1 1 5 5 4.404310603825494635e-04 +1 1 5 6 -1.192942064455397404e-04 +1 1 5 7 -2.873872062731719964e-05 +1 1 5 8 -2.149670576594441039e-05 +1 1 5 13 2.149670576594441039e-05 +1 1 5 14 2.873872062731719964e-05 +1 1 6 6 4.404310603825494635e-04 +1 1 6 7 1.747549516806223835e-05 +1 1 6 8 1.648290022504133060e-05 +1 1 6 13 -1.648290022504133060e-05 +1 1 6 14 -1.747549516806223835e-05 +1 1 7 7 5.127936031496856811e-04 +1 1 7 8 -3.416081446851534789e-05 +1 1 7 9 4.200741016464735150e-15 +1 1 7 10 -4.202795189441682566e-15 +1 1 7 11 -4.203393163834581938e-15 +1 1 7 12 4.202167334312907566e-15 +1 1 7 13 3.416081447657080741e-05 +1 1 7 14 -7.236254277524388143e-05 +1 1 8 8 5.127936032821040629e-04 +1 1 8 9 2.215360258875388576e-14 +1 1 8 10 -2.215357099092563184e-14 +1 1 8 11 -2.214973351466280344e-14 +1 1 8 12 2.215160557603811675e-14 +1 1 8 13 -7.236254285665445415e-05 +1 1 8 14 3.416081442571007034e-05 +1 1 9 9 4.404310603825494635e-04 +1 1 9 13 -2.215360258875388576e-14 +1 1 9 14 -4.200741016464735150e-15 +1 1 10 10 4.404310603825494635e-04 +1 1 10 13 2.215357099092563184e-14 +1 1 10 14 4.202795189441682566e-15 +1 1 11 11 4.404310603825494635e-04 +1 1 11 13 2.214973351466280344e-14 +1 1 11 14 4.203393163834581938e-15 +1 1 12 12 4.404310603825494635e-04 +1 1 12 13 -2.215160557603811675e-14 +1 1 12 14 -4.202167334312907566e-15 +1 1 13 13 5.127936031963011704e-04 +1 1 13 14 -3.416081443376552985e-05 +1 1 14 14 5.127936031659018762e-04 +1 2 1 1 5.242879988668605802e+05 +1 3 1 1 5.242879969887809712e+05 +1 4 1 1 3.287593405022874726e-04 +1 5 1 1 6.272667148412135879e-04 +1 6 1 1 6.906895135523928586e-04 +1 7 1 1 6.272667148414807353e-04 +1 8 1 1 6.906895135520944862e-04 +1 9 1 1 3.287593405026933979e-04 +1 10 1 1 5.242879971221382730e+05 +1 11 1 1 5.238735171643905258e-04 +1 12 1 1 3.051951930451712869e-03 +1 13 1 1 6.128633841775560365e-04 +1 14 1 1 2.964687957507606761e-04 +1 15 1 1 5.694112960184898042e-04 +1 16 1 1 1.055325721524596333e-03 +1 17 1 1 7.337094335343272850e-04 +1 18 1 1 1.048575996794498642e+06 +1 19 1 1 5.452840313983492448e-04 +1 20 1 1 5.393284623150182422e-04 +2 1 1 1 2.999999997502380111e+00 +2 1 1 2 3.140970399482897246e+00 +2 1 1 3 2.140970400731741830e+00 +2 1 1 4 8.336082960818429199e-02 +2 1 1 5 4.256535900522968041e-01 +2 1 1 6 -8.336082960818343157e-02 +2 1 1 7 7.371243709136725553e-01 +2 1 1 8 1.903846029193499545e+00 +2 1 1 9 3.250575932105353449e-01 +2 1 1 10 -3.250575932105426724e-01 +2 1 1 11 -3.250575932103188515e-01 +2 1 1 12 3.250575932103019205e-01 +2 1 1 13 -1.237124370289336639e+00 +2 1 1 14 -1.403846029818068830e+00 +2 1 2 2 4.581363896067605523e+00 +2 1 2 3 2.818819104790289742e+00 +2 1 2 4 2.865476693527988505e-01 +2 1 2 5 7.594177107064804533e-01 +2 1 2 6 -2.865476693527973517e-01 +2 1 2 7 1.058171355167849548e+00 +2 1 2 8 2.391920145260986175e+00 +2 1 2 9 3.424282651169429093e-01 +2 1 2 10 -3.424282651169483493e-01 +2 1 2 11 -3.424282651116309362e-01 +2 1 2 12 3.424282651116157816e-01 +2 1 2 13 -1.689443750806610689e+00 +2 1 2 14 -1.760647749622433755e+00 +2 1 3 3 2.859496560900510964e+00 +2 1 3 4 2.677757167054631293e-01 +2 1 3 5 6.722549201913569084e-01 +2 1 3 6 -2.677757167054619636e-01 +2 1 3 7 9.391854324692611167e-01 +2 1 3 8 1.649972400376072956e+00 +2 1 3 9 2.345265984343783694e-01 +2 1 3 10 -2.345265984343819776e-01 +2 1 3 11 -2.345265984295437367e-01 +2 1 3 12 2.345265984295343276e-01 +2 1 3 13 -1.168846704414208348e+00 +2 1 3 14 -1.420311128431263281e+00 +2 1 4 4 1.313024387261775061e+00 +2 1 4 5 -2.499999998439338400e-01 +2 1 4 6 -1.176725588161856156e-01 +2 1 4 7 1.301747626628845800e-01 +2 1 4 8 1.469869303662422744e-01 +2 1 4 9 3.396904316822009669e-03 +2 1 4 10 -3.396904316821778951e-03 +2 1 4 11 -3.396904315025265925e-03 +2 1 4 12 3.396904315025206077e-03 +2 1 4 13 -1.395607389865531067e-01 +2 1 4 14 -1.376009540425790489e-01 +2 1 5 5 1.491873355709767646e+00 +2 1 5 6 2.499999998439344506e-01 +2 1 5 7 3.047214383177869745e-01 +2 1 5 8 4.111148771311340933e-01 +2 1 5 9 2.993080420042807180e-02 +2 1 5 10 -2.993080420042728770e-02 +2 1 5 11 -2.993080419239661435e-02 +2 1 5 12 2.993080419239691620e-02 +2 1 5 13 -3.483028335753466376e-01 +2 1 5 14 -3.675334818735712106e-01 +2 1 6 6 1.313024387261772841e+00 +2 1 6 7 -1.301747626628840804e-01 +2 1 6 8 -1.469869303662423021e-01 +2 1 6 9 -3.396904316821777216e-03 +2 1 6 10 3.396904316821621958e-03 +2 1 6 11 3.396904315025023498e-03 +2 1 6 12 -3.396904315024977528e-03 +2 1 6 13 1.395607389865523018e-01 +2 1 6 14 1.376009540425774669e-01 +2 1 7 7 1.228286616869072256e+00 +2 1 7 8 6.180676911722470246e-01 +2 1 7 9 8.698843083439615487e-02 +2 1 7 10 -8.698843083439747326e-02 +2 1 7 11 -8.698843083533802645e-02 +2 1 7 12 8.698843083533447373e-02 +2 1 7 13 -4.401036639955914209e-01 +2 1 7 14 -2.108988156001858350e-01 +2 1 8 8 2.250554495869002913e+00 +2 1 8 9 2.014890009412564353e-01 +2 1 8 10 -2.014890009412595717e-01 +2 1 8 11 -2.014890009352413025e-01 +2 1 8 12 2.014890009352322264e-01 +2 1 8 13 -6.413656493919693835e-01 +2 1 8 14 -1.031904709203824488e+00 +2 1 9 9 1.224624176425935573e+00 +2 1 9 10 -2.927234798034676969e-02 +2 1 9 11 -2.927234797697215660e-02 +2 1 9 12 2.927234797697109148e-02 +2 1 9 13 -1.409392641756853914e-01 +2 1 9 14 -1.475381675999826447e-01 +2 1 10 10 1.224624176425935573e+00 +2 1 10 11 2.927234797697255211e-02 +2 1 10 12 -2.927234797697146271e-02 +2 1 10 13 1.409392641756880282e-01 +2 1 10 14 1.475381675999845044e-01 +2 1 11 11 1.224624176419186528e+00 +2 1 11 12 -2.927234797359686350e-02 +2 1 11 13 1.409392641763898835e-01 +2 1 11 14 1.475381675942057658e-01 +2 1 12 12 1.224624176419184307e+00 +2 1 12 13 -1.409392641763830833e-01 +2 1 12 14 -1.475381675942001314e-01 +2 1 13 13 1.548078101414635199e+00 +2 1 13 14 7.287430404186082677e-01 +2 1 14 14 1.709412312831070979e+00 +2 2 1 1 6.245004975047784753e-10 +2 3 1 1 6.244999243811039219e-10 +2 4 1 1 9.999999993755974703e-01 +2 5 1 1 5.166064724831336274e-01 +2 6 1 1 4.833935275168469992e-01 +2 7 1 1 5.166064724835913724e-01 +2 8 1 1 4.833935275163893652e-01 +2 9 1 1 9.999999993754968841e-01 +2 10 1 1 6.244999414124020098e-10 +2 11 1 1 9.256535900522935290e-01 +2 12 1 1 1.409704032293415954e-01 +2 13 1 1 7.466013301390607149e-01 +2 14 1 1 1.140970401980437199e+00 +2 15 1 1 8.337641206541781536e-01 +2 16 1 1 5.368783020781071613e-01 +2 17 1 1 6.667216592163556221e-01 +2 18 1 1 3.122501997071086770e-10 +2 19 1 1 8.688297741945534280e-01 +2 20 1 1 9.063736794892222060e-01 +*** END *** +*** REQUEST *** +"" +47 +20 +14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +0.0 -0.26214400000000000000e6 0.0 0.0 0.0 -0.52428800000000000000e6 -0.26214400000000000000e6 0.0 0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.0 0.52428800000000000000e6 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.52428800000000000000e6 -0.52428800000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.10485760000000000000e7 0.0 0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.0 0.0 -0.10485760000000000000e7 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.26214400000000000000e6 0.26214400000000000000e6 0.26214400000000000000e6 0.26214400000000000000e6 +0 1 1 2 0.13107200000000000000e6 +0 1 4 5 -0.26214400000000000000e6 +0 1 5 6 0.26214400000000000000e6 +0 2 1 1 -0.26214400000000000000e6 +0 12 1 1 -0.26214400000000000000e6 +1 1 2 3 -0.26214400000000000000e6 +1 1 2 7 -0.26214400000000000000e6 +1 1 3 8 0.26214400000000000000e6 +1 1 7 8 0.26214400000000000000e6 +1 1 13 14 -0.26214400000000000000e6 +2 1 2 13 -0.26214400000000000000e6 +2 1 8 13 0.26214400000000000000e6 +2 1 13 13 -0.52428800000000000000e6 +3 1 2 12 -0.26214400000000000000e6 +3 1 8 12 0.26214400000000000000e6 +3 1 12 13 -0.26214400000000000000e6 +4 1 2 10 -0.26214400000000000000e6 +4 1 8 10 0.26214400000000000000e6 +4 1 10 13 -0.26214400000000000000e6 +5 1 2 2 -0.52428800000000000000e6 +5 1 2 13 -0.26214400000000000000e6 +5 1 8 8 0.52428800000000000000e6 +5 1 8 13 -0.26214400000000000000e6 +6 1 1 2 0.13107200000000000000e6 +6 1 2 7 -0.26214400000000000000e6 +6 1 3 8 0.26214400000000000000e6 +6 1 4 5 -0.26214400000000000000e6 +6 1 5 6 0.26214400000000000000e6 +6 1 7 8 0.26214400000000000000e6 +6 1 13 14 -0.26214400000000000000e6 +6 2 1 1 -0.26214400000000000000e6 +6 4 1 1 -0.52428800000000000000e6 +6 10 1 1 0.52428800000000000000e6 +6 12 1 1 -0.26214400000000000000e6 +6 16 1 1 -0.52428800000000000000e6 +7 1 1 4 -0.26214400000000000000e6 +7 1 1 6 0.26214400000000000000e6 +7 1 2 6 -0.26214400000000000000e6 +7 1 4 8 0.26214400000000000000e6 +7 1 4 13 -0.26214400000000000000e6 +7 20 1 1 -0.52428800000000000000e6 +8 1 2 4 -0.26214400000000000000e6 +8 1 4 8 0.26214400000000000000e6 +8 1 4 13 -0.26214400000000000000e6 +9 1 1 2 -0.13107200000000000000e6 +9 1 2 3 -0.26214400000000000000e6 +9 1 4 5 0.26214400000000000000e6 +9 1 5 6 -0.26214400000000000000e6 +9 2 1 1 0.26214400000000000000e6 +9 4 1 1 0.52428800000000000000e6 +9 10 1 1 -0.52428800000000000000e6 +9 12 1 1 0.26214400000000000000e6 +9 16 1 1 0.52428800000000000000e6 +10 1 1 2 -0.39321600000000000000e6 +10 1 4 5 0.26214400000000000000e6 +10 1 5 6 -0.26214400000000000000e6 +10 2 1 1 0.26214400000000000000e6 +10 4 1 1 0.52428800000000000000e6 +10 10 1 1 -0.52428800000000000000e6 +10 12 1 1 -0.26214400000000000000e6 +11 1 1 1 0.52428800000000000000e6 +11 1 1 2 -0.13107200000000000000e6 +11 1 4 5 0.26214400000000000000e6 +11 1 5 6 -0.26214400000000000000e6 +11 2 1 1 0.26214400000000000000e6 +11 12 1 1 0.26214400000000000000e6 +12 1 1 2 -0.26214400000000000000e6 +12 1 1 3 0.52428800000000000000e6 +12 1 4 5 0.52428800000000000000e6 +12 1 5 6 -0.52428800000000000000e6 +12 2 1 1 0.52428800000000000000e6 +12 12 1 1 -0.52428800000000000000e6 +13 1 1 4 0.52428800000000000000e6 +13 1 1 6 -0.52428800000000000000e6 +13 1 1 7 0.52428800000000000000e6 +13 1 1 8 -0.52428800000000000000e6 +13 1 4 5 -0.52428800000000000000e6 +13 1 5 6 0.52428800000000000000e6 +13 4 1 1 0.10485760000000000000e7 +14 1 1 4 -0.52428800000000000000e6 +14 1 1 6 0.52428800000000000000e6 +14 1 1 9 0.52428800000000000000e6 +14 1 1 10 -0.52428800000000000000e6 +14 1 4 5 0.52428800000000000000e6 +14 1 5 6 -0.52428800000000000000e6 +14 6 1 1 -0.10485760000000000000e7 +15 1 1 4 0.52428800000000000000e6 +15 1 1 6 -0.52428800000000000000e6 +15 1 1 11 0.52428800000000000000e6 +15 1 1 12 -0.52428800000000000000e6 +15 1 4 5 -0.52428800000000000000e6 +15 1 5 6 0.52428800000000000000e6 +15 8 1 1 0.10485760000000000000e7 +16 1 1 2 -0.26214400000000000000e6 +16 1 1 8 -0.52428800000000000000e6 +16 1 1 13 0.52428800000000000000e6 +16 1 4 5 0.52428800000000000000e6 +16 1 5 6 -0.52428800000000000000e6 +16 2 1 1 0.52428800000000000000e6 +16 4 1 1 0.10485760000000000000e7 +16 10 1 1 -0.10485760000000000000e7 +16 12 1 1 -0.52428800000000000000e6 +17 1 1 2 -0.26214400000000000000e6 +17 1 1 4 0.52428800000000000000e6 +17 1 1 6 -0.52428800000000000000e6 +17 1 1 8 -0.52428800000000000000e6 +17 1 1 14 0.52428800000000000000e6 +17 2 1 1 0.52428800000000000000e6 +17 4 1 1 0.10485760000000000000e7 +17 12 1 1 -0.52428800000000000000e6 +18 1 2 2 -0.10485760000000000000e7 +18 1 2 8 0.52428800000000000000e6 +18 1 2 13 -0.52428800000000000000e6 +19 1 2 3 -0.52428800000000000000e6 +19 1 2 7 -0.52428800000000000000e6 +19 1 2 14 0.52428800000000000000e6 +20 1 3 3 0.52428800000000000000e6 +20 1 3 14 -0.26214400000000000000e6 +20 1 7 7 -0.52428800000000000000e6 +20 1 7 14 0.26214400000000000000e6 +21 1 1 5 -0.52428800000000000000e6 +21 1 3 5 0.52428800000000000000e6 +21 13 1 1 -0.10485760000000000000e7 +22 1 3 7 0.52428800000000000000e6 +22 1 7 7 0.10485760000000000000e7 +22 1 7 14 -0.52428800000000000000e6 +23 1 3 9 0.52428800000000000000e6 +23 1 7 9 0.52428800000000000000e6 +23 1 9 14 -0.52428800000000000000e6 +24 1 1 2 -0.26214400000000000000e6 +24 1 3 8 -0.52428800000000000000e6 +24 1 3 13 0.52428800000000000000e6 +24 1 4 5 0.52428800000000000000e6 +24 1 5 6 -0.52428800000000000000e6 +24 2 1 1 0.52428800000000000000e6 +24 4 1 1 0.10485760000000000000e7 +24 10 1 1 -0.10485760000000000000e7 +24 12 1 1 0.52428800000000000000e6 +24 16 1 1 0.10485760000000000000e7 +25 1 3 4 -0.52428800000000000000e6 +25 1 4 7 -0.52428800000000000000e6 +25 1 4 14 0.52428800000000000000e6 +26 1 1 5 0.52428800000000000000e6 +26 1 5 7 0.52428800000000000000e6 +26 1 5 14 -0.52428800000000000000e6 +26 13 1 1 0.10485760000000000000e7 +27 1 2 5 0.52428800000000000000e6 +27 1 5 8 -0.52428800000000000000e6 +27 1 5 13 0.52428800000000000000e6 +28 1 1 4 0.52428800000000000000e6 +28 1 1 6 -0.52428800000000000000e6 +28 1 4 8 -0.52428800000000000000e6 +28 1 4 13 0.52428800000000000000e6 +28 1 6 8 0.52428800000000000000e6 +28 1 6 13 -0.52428800000000000000e6 +28 20 1 1 0.10485760000000000000e7 +29 1 3 6 -0.52428800000000000000e6 +29 1 6 7 -0.52428800000000000000e6 +29 1 6 14 0.52428800000000000000e6 +30 1 3 11 0.52428800000000000000e6 +30 1 7 11 0.52428800000000000000e6 +30 1 11 14 -0.52428800000000000000e6 +31 1 1 2 0.26214400000000000000e6 +31 1 3 8 0.52428800000000000000e6 +31 1 4 5 -0.52428800000000000000e6 +31 1 5 6 0.52428800000000000000e6 +31 1 7 13 0.52428800000000000000e6 +31 1 13 14 -0.52428800000000000000e6 +31 2 1 1 -0.52428800000000000000e6 +31 4 1 1 -0.10485760000000000000e7 +31 10 1 1 0.10485760000000000000e7 +31 12 1 1 -0.52428800000000000000e6 +31 16 1 1 -0.10485760000000000000e7 +32 1 3 8 -0.52428800000000000000e6 +32 1 7 8 -0.52428800000000000000e6 +32 1 8 14 0.52428800000000000000e6 +33 1 2 9 0.52428800000000000000e6 +33 1 8 9 -0.52428800000000000000e6 +33 1 9 13 0.52428800000000000000e6 +34 1 3 10 -0.52428800000000000000e6 +34 1 7 10 -0.52428800000000000000e6 +34 1 10 14 0.52428800000000000000e6 +35 1 2 11 0.52428800000000000000e6 +35 1 8 11 -0.52428800000000000000e6 +35 1 11 13 0.52428800000000000000e6 +36 1 3 12 -0.52428800000000000000e6 +36 1 7 12 -0.52428800000000000000e6 +36 1 12 14 0.52428800000000000000e6 +37 1 3 14 -0.26214400000000000000e6 +37 1 7 14 -0.26214400000000000000e6 +37 1 14 14 0.52428800000000000000e6 +38 3 1 1 0.52428800000000000000e6 +38 4 1 1 0.52428800000000000000e6 +39 5 1 1 0.52428800000000000000e6 +39 6 1 1 0.52428800000000000000e6 +40 7 1 1 0.52428800000000000000e6 +40 8 1 1 0.52428800000000000000e6 +41 9 1 1 0.52428800000000000000e6 +41 10 1 1 0.52428800000000000000e6 +42 1 1 5 -0.26214400000000000000e6 +42 11 1 1 0.52428800000000000000e6 +43 1 1 2 0.26214400000000000000e6 +43 1 4 5 -0.52428800000000000000e6 +43 1 5 6 0.52428800000000000000e6 +43 2 1 1 -0.52428800000000000000e6 +43 4 1 1 -0.52428800000000000000e6 +43 10 1 1 0.52428800000000000000e6 +43 14 1 1 0.52428800000000000000e6 +44 1 1 5 0.26214400000000000000e6 +44 1 2 5 -0.26214400000000000000e6 +44 15 1 1 0.52428800000000000000e6 +45 1 1 4 -0.26214400000000000000e6 +45 1 1 6 0.26214400000000000000e6 +45 17 1 1 0.52428800000000000000e6 +46 1 4 5 -0.26214400000000000000e6 +46 1 5 6 0.26214400000000000000e6 +46 18 1 1 0.52428800000000000000e6 +47 1 1 4 0.26214400000000000000e6 +47 1 1 6 -0.26214400000000000000e6 +47 1 3 4 -0.26214400000000000000e6 +47 1 3 6 0.26214400000000000000e6 +47 19 1 1 0.52428800000000000000e6 +*** ANSWER *** +-2.871520306285544777e+01 7.118729006404162972e-11 -1.316628079394036628e-20 1.316624868805167350e-20 -7.118729009936570569e-11 2.871520306285544777e+01 1.430331976389162955e-10 -1.430331976389222925e-10 2.871520306268291733e+01 -8.687772571948222668e-12 -1.812313094491883375e-10 -1.708784149062177825e-10 1.114835417205896094e-10 -1.991343460485182559e-11 1.991343460416107808e-11 5.938567044498810095e-11 -5.939487314481911411e-11 7.118729006573264539e-11 2.875483058087219242e-11 -7.118729005486742124e-11 6.227955930659415908e-11 -7.118729006678104511e-11 3.145396273232298676e-21 -2.875483056966511005e-11 3.575226819384232864e-11 -3.113977955825844740e-11 -3.112625764560304688e-11 -3.575829930600747514e-11 -3.575226819384222524e-11 -3.145162895080999043e-21 1.437741527826941970e-11 1.437741528756527542e-11 6.582888379346378739e-21 3.145418698924708501e-21 -6.582820522423835712e-21 -3.145489244226517787e-21 -7.118729006194115965e-11 4.999999989748883378e-01 -2.317456255221850609e-10 -2.317456255215938336e-10 -3.239925407391929745e-10 -2.332540544393015838e-10 4.999999992543482930e-01 -1.867575467233528521e-10 -1.222765529485654803e-10 1.640905394533667141e-10 -2.145136093433869968e-10 +1 1 1 1 1.327454776406979120e-04 +1 1 1 2 -8.957985269356701780e-05 +1 1 1 3 -8.958950239435110874e-05 +1 1 1 4 -3.223211922585988314e-05 +1 1 1 5 -3.678985781608613836e-05 +1 1 1 6 3.223211922585988314e-05 +1 1 1 7 5.844948312160448516e-05 +1 1 1 8 -5.844465825651542872e-05 +1 1 1 9 -1.044037480210855393e-05 +1 1 1 10 1.044037480210855393e-05 +1 1 1 11 1.044037480174640330e-05 +1 1 1 12 -1.044037480174640330e-05 +1 1 1 13 3.113519438626192147e-05 +1 1 1 14 -3.114001925135092370e-05 +1 1 2 2 1.904402364928444585e-04 +1 1 2 3 3.015162524882452006e-05 +1 1 2 4 3.749529456185764545e-05 +1 1 2 5 3.263824695974872048e-05 +1 1 2 6 -3.749529456185607336e-05 +1 1 2 7 -1.507581262484438236e-05 +1 1 2 8 3.732264193398283718e-05 +1 1 2 9 3.451329382630754216e-15 +1 1 2 10 -3.451453096080617897e-15 +1 1 2 11 -3.451293806060547978e-15 +1 1 2 12 3.451461512446703378e-15 +1 1 2 13 -3.732264192472282906e-05 +1 1 2 14 1.507581261558432002e-05 +1 1 3 3 1.904402364809073926e-04 +1 1 3 4 3.748897042089957988e-05 +1 1 3 5 3.265242558973563847e-05 +1 1 3 6 -3.748897042089966119e-05 +1 1 3 7 -3.732264193453250058e-05 +1 1 3 8 1.507581261409500571e-05 +1 1 3 9 1.649093521300415408e-15 +1 1 3 10 -1.649105278821837570e-15 +1 1 3 11 -1.648971163936226826e-15 +1 1 3 12 1.649142264877032558e-15 +1 1 3 13 -1.507581260970858122e-05 +1 1 3 14 3.732264193014066863e-05 +1 1 4 4 2.277628784091941840e-04 +1 1 4 5 9.250901876329056805e-05 +1 1 4 7 -1.874448518681320680e-05 +1 1 4 8 1.874764722654646148e-05 +1 1 4 13 -1.874764722654646148e-05 +1 1 4 14 1.874448518681320680e-05 +1 1 5 5 2.277628784091941840e-04 +1 1 5 6 -9.250901876329056805e-05 +1 1 5 7 -1.632621274504020487e-05 +1 1 5 8 1.631912336849793024e-05 +1 1 5 13 -1.631912336849793024e-05 +1 1 5 14 1.632621274504020487e-05 +1 1 6 6 2.277628784091941840e-04 +1 1 6 7 1.874448518681315259e-05 +1 1 6 8 -1.874764722654804713e-05 +1 1 6 13 1.874764722654804713e-05 +1 1 6 14 -1.874448518681315259e-05 +1 1 7 7 1.904402364684156489e-04 +1 1 7 8 -7.537906297026933681e-06 +1 1 7 9 1.649093521300415408e-15 +1 1 7 10 -1.649105278821837570e-15 +1 1 7 11 -1.648971163936226826e-15 +1 1 7 12 1.649142264877032558e-15 +1 1 7 13 7.537906301413317516e-06 +1 1 7 14 3.732264193638683866e-05 +1 1 8 8 1.904402364575775303e-04 +1 1 8 9 -3.451329382630754216e-15 +1 1 8 10 3.451453096080617897e-15 +1 1 8 11 3.451293806060547978e-15 +1 1 8 12 -3.451461512446703378e-15 +1 1 8 13 3.732264194235623898e-05 +1 1 8 14 7.537906306287023121e-06 +1 1 9 9 2.277628784091941840e-04 +1 1 9 13 3.451329382630754216e-15 +1 1 9 14 -1.649093521300415408e-15 +1 1 10 10 2.277628784091941840e-04 +1 1 10 13 -3.451453096080617897e-15 +1 1 10 14 1.649105278821837570e-15 +1 1 11 11 2.277628784091941840e-04 +1 1 11 13 -3.451293806060547978e-15 +1 1 11 14 1.648971163936226826e-15 +1 1 12 12 2.277628784091941840e-04 +1 1 12 13 3.451461512446703378e-15 +1 1 12 14 -1.649142264877032558e-15 +1 1 13 13 1.904402364760974381e-04 +1 1 13 14 -7.537906310673386627e-06 +1 1 14 14 1.904402364771989875e-04 +1 2 1 1 4.114774851519779897e-04 +1 3 1 1 2.621439996903091087e+05 +1 4 1 1 5.789747721012547879e-05 +1 5 1 1 1.062614278954186059e-04 +1 6 1 1 1.271421774996354427e-04 +1 7 1 1 1.062614278957291214e-04 +1 8 1 1 1.271421774992217112e-04 +1 9 1 1 5.789747721012374407e-05 +1 10 1 1 2.621439997449280636e+05 +1 11 1 1 1.054705767153212015e-04 +1 12 1 1 2.621440002042847918e+05 +1 13 1 1 1.298056017396426870e-04 +1 14 1 1 2.621439998368266388e+05 +1 15 1 1 1.298481377527008554e-04 +1 16 1 1 9.208056483961260877e-05 +1 17 1 1 1.636547490168967396e-04 +1 18 1 1 3.137935791581204781e-04 +1 19 1 1 1.152959671937687190e-04 +1 20 1 1 1.152769948323854009e-04 +2 1 1 1 1.499999999610339918e+00 +2 1 1 2 4.999999998051707917e-01 +2 1 1 3 4.999999998051731787e-01 +2 1 1 4 -7.344833268600114984e-02 +2 1 1 5 4.865185841869605447e-04 +2 1 1 6 7.344833268600187148e-02 +2 1 1 7 -3.471341129216770627e-01 +2 1 1 8 3.471341129216881649e-01 +2 1 1 9 8.018198151798980322e-02 +2 1 1 10 -8.018198151798988649e-02 +2 1 1 11 -8.018198151412268826e-02 +2 1 1 12 8.018198151412281316e-02 +2 1 1 13 -1.528658868834808227e-01 +2 1 1 14 1.528658868834925078e-01 +2 1 2 2 6.015200201251953427e-01 +2 1 2 3 1.227082203615951217e-01 +2 1 2 4 -6.256212806039156138e-02 +2 1 2 5 -2.145677144292375271e-02 +2 1 2 6 6.256212806039225527e-02 +2 1 2 7 -9.371513467398677466e-02 +2 1 2 8 8.312103455579200606e-02 +2 1 2 9 2.677370843164496653e-02 +2 1 2 10 -2.677370843164489714e-02 +2 1 2 11 -2.677370843528640784e-02 +2 1 2 12 2.677370843528646682e-02 +2 1 2 13 -1.839898556940339908e-02 +2 1 2 14 2.899308568760844418e-02 +2 1 3 3 6.012069202522601907e-01 +2 1 3 4 -6.277268613905583050e-02 +2 1 3 5 -2.170013620503693716e-02 +2 1 3 6 6.277268613905608030e-02 +2 1 3 7 -8.306040087196901733e-02 +2 1 3 8 9.381105092664132616e-02 +2 1 3 9 2.687277342293677151e-02 +2 1 3 10 -2.687277342293675417e-02 +2 1 3 11 -2.687277342667529489e-02 +2 1 3 12 2.687277342667532959e-02 +2 1 3 13 -2.889716943495203305e-02 +2 1 3 14 1.814651938029093747e-02 +2 1 4 4 4.445924263704292279e-01 +2 1 4 5 -1.705824457050993948e-01 +2 1 4 6 -5.734383936025971851e-02 +2 1 4 7 3.641721660049300480e-02 +2 1 4 8 -3.631193756116282700e-02 +2 1 4 9 -4.238429076511398066e-03 +2 1 4 10 4.238429076511393730e-03 +2 1 4 11 4.238429079323717021e-03 +2 1 4 12 -4.238429079323746511e-03 +2 1 4 13 2.625019049922876907e-02 +2 1 4 14 -2.635546953856282917e-02 +2 1 5 5 5.015566684270258424e-01 +2 1 5 6 1.705824457050994503e-01 +2 1 5 7 9.611497934239833160e-03 +2 1 5 8 -9.489815553185778838e-03 +2 1 5 9 1.141782972000330307e-03 +2 1 5 10 -1.141782972000371940e-03 +2 1 5 11 -1.141782965330986411e-03 +2 1 5 12 1.141782965330971449e-03 +2 1 5 13 1.196695588973797908e-02 +2 1 5 14 -1.208863827079719594e-02 +2 1 6 6 4.445924263704295609e-01 +2 1 6 7 -3.641721660049312276e-02 +2 1 6 8 3.631193756116293109e-02 +2 1 6 9 4.238429076511385923e-03 +2 1 6 10 -4.238429076511378117e-03 +2 1 6 11 -4.238429079323699673e-03 +2 1 6 12 4.238429079323725694e-03 +2 1 6 13 -2.625019049922904663e-02 +2 1 6 14 2.635546953856297142e-02 +2 1 7 7 5.071905100811545664e-01 +2 1 7 8 -6.889358347708032793e-02 +2 1 7 9 -1.806552274995836677e-02 +2 1 7 10 1.806552274995838758e-02 +2 1 7 11 1.806552274837153541e-02 +2 1 7 12 -1.806552274837159439e-02 +2 1 7 13 2.482155119690512834e-02 +2 1 7 14 -7.586989079081414566e-02 +2 1 8 8 5.071728687967446136e-01 +2 1 8 9 1.801599025431218845e-02 +2 1 8 10 -1.801599025431222661e-02 +2 1 8 11 -1.801599025267682647e-02 +2 1 8 12 1.801599025267689239e-02 +2 1 8 13 -7.594816575904822509e-02 +2 1 8 14 2.491746744956085599e-02 +2 1 9 9 3.908851351290226206e-01 +2 1 9 10 -3.636548118853003692e-03 +2 1 9 11 -3.636548115363761810e-03 +2 1 9 12 3.636548115363751402e-03 +2 1 9 13 -8.757718177332675727e-03 +2 1 9 14 8.807250672978363115e-03 +2 1 10 10 3.908851351290223985e-01 +2 1 10 11 3.636548115363795203e-03 +2 1 10 12 -3.636548115363795637e-03 +2 1 10 13 8.757718177332637563e-03 +2 1 10 14 -8.807250672978337094e-03 +2 1 11 11 3.908851351220440362e-01 +2 1 11 12 -3.636548111874534674e-03 +2 1 11 13 8.757718182609536273e-03 +2 1 11 14 -8.807250678303717856e-03 +2 1 12 12 3.908851351220442583e-01 +2 1 12 13 -8.757718182609577906e-03 +2 1 12 14 8.807250678303766428e-03 +2 1 13 13 4.424508198103551670e-01 +2 1 13 14 -4.075618238048223096e-03 +2 1 14 14 4.422766285894769722e-01 +2 2 1 1 1.823297832100532478e-01 +2 3 1 1 1.948300337686970826e-10 +2 4 1 1 9.999999998051720684e-01 +2 5 1 1 5.339042630022160507e-01 +2 6 1 1 4.660957369977840603e-01 +2 7 1 1 5.339042630099507525e-01 +2 8 1 1 4.660957369900492475e-01 +2 9 1 1 9.999999998051699590e-01 +2 10 1 1 1.948300377969798118e-10 +2 11 1 1 5.004865185841872455e-01 +2 12 1 1 1.948300787944431762e-10 +2 13 1 1 4.778133452107759527e-01 +2 14 1 1 1.948300841454695957e-10 +2 15 1 1 4.780567099728894043e-01 +2 16 1 1 6.227082203615936784e-01 +2 17 1 1 3.531033346279960905e-01 +2 18 1 1 1.588351085897996007e-01 +2 19 1 1 5.213512930938913881e-01 +2 20 1 1 5.217724092512192602e-01 +*** END *** +*** REQUEST *** +"" +1 +6 +1 1 1 1 1 1 +0.10485760000000000000e7 +0 1 1 1 0.52428800000000000000e6 +1 1 1 1 0.10485760000000000000e7 +1 3 1 1 0.52428800000000000000e6 +1 4 1 1 0.52428800000000000000e6 +*** ANSWER *** +5.000000006889400161e-01 +1 1 1 1 1.077668620135138061e-03 +1 2 1 1 3.552627545814288773e-04 +1 3 1 1 2.621440007164657000e+05 +1 4 1 1 2.621440007164657000e+05 +1 5 1 1 3.552627545814288773e-04 +1 6 1 1 3.552627545814288773e-04 +2 1 1 1 9.999999999999990008e-01 +2 2 1 1 4.901085593439381327e+00 +2 3 1 1 1.042302185589578071e-15 +2 4 1 1 1.042302185589578071e-15 +2 5 1 1 4.901085593439381327e+00 +2 6 1 1 4.901085593439381327e+00 +*** END *** +*** REQUEST *** +"" +57 +16 +14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.10485760000000000000e7 0.0 0.0 0.0 -0.10485760000000000000e7 0.0 0.10485760000000000000e7 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.52428800000000000000e6 0.10485760000000000000e7 0.10485760000000000000e7 -0.10485760000000000000e7 0.10485760000000000000e7 -0.10485760000000000000e7 0.10485760000000000000e7 0.0 0.0 -0.10485760000000000000e7 0.0 0.0 0.0 0.0 0.0 -0.10485760000000000000e7 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.10485760000000000000e7 0.10485760000000000000e7 0.10485760000000000000e7 0.10485760000000000000e7 0.0 0.52428800000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 +0 1 1 2 0.26214400000000000000e6 +0 1 1 4 0.26214400000000000000e6 +0 1 1 6 -0.26214400000000000000e6 +0 1 1 8 -0.26214400000000000000e6 +0 1 1 14 0.26214400000000000000e6 +0 1 4 5 -0.78643200000000000000e6 +0 1 5 6 0.78643200000000000000e6 +0 2 1 1 -0.52428800000000000000e6 +0 4 1 1 0.52428800000000000000e6 +1 1 3 14 -0.52428800000000000000e6 +2 1 2 3 -0.52428800000000000000e6 +2 1 3 8 -0.52428800000000000000e6 +3 1 3 12 -0.52428800000000000000e6 +4 1 3 11 -0.52428800000000000000e6 +5 1 3 10 -0.52428800000000000000e6 +6 1 7 9 -0.52428800000000000000e6 +6 1 9 14 0.52428800000000000000e6 +7 1 3 8 -0.52428800000000000000e6 +8 1 7 7 -0.10485760000000000000e7 +8 1 7 14 0.52428800000000000000e6 +9 1 3 6 -0.52428800000000000000e6 +10 1 3 5 -0.52428800000000000000e6 +11 1 3 4 -0.52428800000000000000e6 +12 1 3 14 0.52428800000000000000e6 +12 1 7 7 -0.10485760000000000000e7 +12 1 7 14 0.52428800000000000000e6 +13 1 2 3 -0.52428800000000000000e6 +14 1 1 4 0.52428800000000000000e6 +14 1 1 6 -0.52428800000000000000e6 +14 1 1 8 -0.52428800000000000000e6 +14 1 1 14 0.52428800000000000000e6 +14 1 4 5 -0.52428800000000000000e6 +14 1 5 6 0.52428800000000000000e6 +14 4 1 1 0.10485760000000000000e7 +15 1 2 3 0.26214400000000000000e6 +15 1 2 7 -0.26214400000000000000e6 +15 1 3 8 0.26214400000000000000e6 +15 1 7 8 -0.26214400000000000000e6 +15 1 13 14 0.26214400000000000000e6 +16 1 2 13 -0.26214400000000000000e6 +16 1 8 13 -0.26214400000000000000e6 +16 1 13 13 0.52428800000000000000e6 +17 1 2 12 -0.26214400000000000000e6 +17 1 8 12 -0.26214400000000000000e6 +17 1 12 13 0.26214400000000000000e6 +18 1 2 10 -0.26214400000000000000e6 +18 1 8 10 -0.26214400000000000000e6 +18 1 10 13 0.26214400000000000000e6 +19 1 2 2 0.52428800000000000000e6 +19 1 2 13 -0.26214400000000000000e6 +19 1 8 8 -0.52428800000000000000e6 +19 1 8 13 0.26214400000000000000e6 +20 1 2 3 0.26214400000000000000e6 +20 1 2 7 -0.26214400000000000000e6 +20 1 3 8 0.26214400000000000000e6 +20 1 7 8 -0.26214400000000000000e6 +20 1 13 14 0.26214400000000000000e6 +21 1 1 4 -0.26214400000000000000e6 +21 1 1 6 0.26214400000000000000e6 +21 1 2 6 -0.26214400000000000000e6 +21 1 4 8 -0.26214400000000000000e6 +21 1 4 13 0.26214400000000000000e6 +21 16 1 1 -0.52428800000000000000e6 +22 1 2 4 -0.26214400000000000000e6 +22 1 4 8 -0.26214400000000000000e6 +22 1 4 13 0.26214400000000000000e6 +23 1 1 4 0.26214400000000000000e6 +23 1 1 6 -0.26214400000000000000e6 +23 1 1 8 -0.26214400000000000000e6 +23 1 1 14 0.26214400000000000000e6 +23 1 4 5 -0.78643200000000000000e6 +23 1 5 6 0.78643200000000000000e6 +23 2 1 1 -0.52428800000000000000e6 +23 4 1 1 0.52428800000000000000e6 +23 12 1 1 0.52428800000000000000e6 +24 1 1 1 0.52428800000000000000e6 +24 1 1 2 -0.26214400000000000000e6 +24 1 1 4 -0.26214400000000000000e6 +24 1 1 6 0.26214400000000000000e6 +24 1 1 8 0.26214400000000000000e6 +24 1 1 14 -0.26214400000000000000e6 +24 1 4 5 0.78643200000000000000e6 +24 1 5 6 -0.78643200000000000000e6 +24 2 1 1 0.52428800000000000000e6 +24 4 1 1 -0.52428800000000000000e6 +25 1 1 3 0.52428800000000000000e6 +25 1 1 4 0.52428800000000000000e6 +25 1 1 6 -0.52428800000000000000e6 +25 1 1 8 -0.52428800000000000000e6 +25 1 1 14 0.52428800000000000000e6 +25 1 4 5 -0.52428800000000000000e6 +25 1 5 6 0.52428800000000000000e6 +25 4 1 1 0.10485760000000000000e7 +26 1 1 4 0.52428800000000000000e6 +26 1 1 6 -0.52428800000000000000e6 +26 1 1 7 0.52428800000000000000e6 +26 1 1 8 -0.52428800000000000000e6 +26 1 4 5 -0.52428800000000000000e6 +26 1 5 6 0.52428800000000000000e6 +26 4 1 1 0.10485760000000000000e7 +27 1 1 4 -0.52428800000000000000e6 +27 1 1 6 0.52428800000000000000e6 +27 1 1 9 0.52428800000000000000e6 +27 1 1 10 -0.52428800000000000000e6 +27 1 4 5 0.52428800000000000000e6 +27 1 5 6 -0.52428800000000000000e6 +27 6 1 1 -0.10485760000000000000e7 +28 1 1 4 0.52428800000000000000e6 +28 1 1 6 -0.52428800000000000000e6 +28 1 1 11 0.52428800000000000000e6 +28 1 1 12 -0.52428800000000000000e6 +28 1 4 5 -0.52428800000000000000e6 +28 1 5 6 0.52428800000000000000e6 +28 8 1 1 0.10485760000000000000e7 +29 1 1 2 -0.52428800000000000000e6 +29 1 1 4 -0.52428800000000000000e6 +29 1 1 6 0.52428800000000000000e6 +29 1 1 13 0.52428800000000000000e6 +29 1 1 14 -0.52428800000000000000e6 +29 1 4 5 0.15728640000000000000e7 +29 1 5 6 -0.15728640000000000000e7 +29 2 1 1 0.10485760000000000000e7 +29 4 1 1 -0.10485760000000000000e7 +29 12 1 1 -0.10485760000000000000e7 +30 1 2 2 0.10485760000000000000e7 +30 1 2 8 0.52428800000000000000e6 +30 1 2 13 -0.52428800000000000000e6 +31 1 2 3 0.52428800000000000000e6 +31 1 2 7 -0.52428800000000000000e6 +31 1 2 14 0.52428800000000000000e6 +32 1 3 3 0.52428800000000000000e6 +32 1 3 14 0.26214400000000000000e6 +32 1 7 7 -0.52428800000000000000e6 +32 1 7 14 0.26214400000000000000e6 +33 1 3 7 0.52428800000000000000e6 +33 1 7 7 -0.10485760000000000000e7 +33 1 7 14 0.52428800000000000000e6 +34 1 3 9 0.52428800000000000000e6 +34 1 7 9 -0.52428800000000000000e6 +34 1 9 14 0.52428800000000000000e6 +35 1 2 3 -0.52428800000000000000e6 +35 1 3 8 -0.52428800000000000000e6 +35 1 3 13 0.52428800000000000000e6 +36 1 3 4 0.52428800000000000000e6 +36 1 4 7 -0.52428800000000000000e6 +36 1 4 14 0.52428800000000000000e6 +37 1 3 5 -0.52428800000000000000e6 +37 1 5 7 0.52428800000000000000e6 +37 1 5 14 -0.52428800000000000000e6 +38 1 2 5 -0.52428800000000000000e6 +38 1 5 8 -0.52428800000000000000e6 +38 1 5 13 0.52428800000000000000e6 +39 1 1 4 -0.52428800000000000000e6 +39 1 1 6 0.52428800000000000000e6 +39 1 4 8 -0.52428800000000000000e6 +39 1 4 13 0.52428800000000000000e6 +39 1 6 8 0.52428800000000000000e6 +39 1 6 13 -0.52428800000000000000e6 +39 16 1 1 -0.10485760000000000000e7 +40 1 3 6 0.52428800000000000000e6 +40 1 6 7 -0.52428800000000000000e6 +40 1 6 14 0.52428800000000000000e6 +41 1 3 11 -0.52428800000000000000e6 +41 1 7 11 0.52428800000000000000e6 +41 1 11 14 -0.52428800000000000000e6 +42 1 2 3 -0.52428800000000000000e6 +42 1 3 8 -0.52428800000000000000e6 +42 1 7 13 0.52428800000000000000e6 +42 1 13 14 -0.52428800000000000000e6 +43 1 3 8 0.52428800000000000000e6 +43 1 7 8 -0.52428800000000000000e6 +43 1 8 14 0.52428800000000000000e6 +44 1 2 9 -0.52428800000000000000e6 +44 1 8 9 -0.52428800000000000000e6 +44 1 9 13 0.52428800000000000000e6 +45 1 3 10 0.52428800000000000000e6 +45 1 7 10 -0.52428800000000000000e6 +45 1 10 14 0.52428800000000000000e6 +46 1 2 11 -0.52428800000000000000e6 +46 1 8 11 -0.52428800000000000000e6 +46 1 11 13 0.52428800000000000000e6 +47 1 3 12 0.52428800000000000000e6 +47 1 7 12 -0.52428800000000000000e6 +47 1 12 14 0.52428800000000000000e6 +48 1 3 14 0.26214400000000000000e6 +48 1 7 14 -0.26214400000000000000e6 +48 1 14 14 0.52428800000000000000e6 +49 3 1 1 0.52428800000000000000e6 +49 4 1 1 0.52428800000000000000e6 +50 5 1 1 0.52428800000000000000e6 +50 6 1 1 0.52428800000000000000e6 +51 7 1 1 0.52428800000000000000e6 +51 8 1 1 0.52428800000000000000e6 +52 1 1 2 0.26214400000000000000e6 +52 1 4 5 -0.52428800000000000000e6 +52 1 5 6 0.52428800000000000000e6 +52 2 1 1 -0.52428800000000000000e6 +52 4 1 1 0.52428800000000000000e6 +52 9 1 1 0.52428800000000000000e6 +52 12 1 1 0.52428800000000000000e6 +53 1 1 2 -0.26214400000000000000e6 +53 1 4 5 0.52428800000000000000e6 +53 1 5 6 -0.52428800000000000000e6 +53 2 1 1 0.52428800000000000000e6 +53 4 1 1 -0.52428800000000000000e6 +53 10 1 1 0.52428800000000000000e6 +53 12 1 1 -0.52428800000000000000e6 +54 1 1 5 -0.26214400000000000000e6 +54 11 1 1 0.52428800000000000000e6 +55 1 1 5 0.26214400000000000000e6 +55 1 2 5 -0.26214400000000000000e6 +55 13 1 1 0.52428800000000000000e6 +56 1 1 4 -0.26214400000000000000e6 +56 1 1 6 0.26214400000000000000e6 +56 14 1 1 0.52428800000000000000e6 +57 1 4 5 -0.26214400000000000000e6 +57 1 5 6 0.26214400000000000000e6 +57 15 1 1 0.52428800000000000000e6 +*** ANSWER *** +-1.203064525529166318e+00 -2.256486361430123933e-03 5.517049738984484816e-22 -5.516469364432108303e-22 -5.517294994220692428e-22 5.518940319648696642e-22 2.256486361430123065e-03 1.203064525529166318e+00 1.929357172475959574e-21 -4.713050388183805849e-22 -1.929856150325549888e-21 -1.203064525474601965e+00 2.256486361430123933e-03 4.999999997714818512e-01 3.100250575346754148e-02 -2.425080845203530380e-11 5.084842633453655410e-21 -5.083870179937549088e-21 2.425080846218643843e-11 -3.100250575346754148e-02 4.583571235929750537e-11 -4.583571235928799279e-11 2.040967013748555840e-10 -1.187528697866469519e-10 -4.587773218159781520e-21 3.328880813107300327e-12 -2.802660376089081332e-12 2.802660376092092786e-12 -7.042227848884759660e-11 -2.425080846024551082e-11 4.248576206177078823e-21 -7.275242537251554625e-11 4.989760194214665199e-21 -5.162299203541644798e-21 -2.536163976188645228e-21 -1.009067418328734618e-20 1.892858974688499354e-20 1.232143779270894452e-11 1.145892810042191708e-11 1.009017514972698823e-20 -4.610494412830417218e-21 1.142124530370397689e-21 -2.856122142996261823e-21 2.542078565905336792e-21 4.610411888626681029e-21 -2.541923122605798107e-21 -4.610436719626528057e-21 -3.637621267719420005e-11 -1.706889564469568067e-10 -7.551343903206861056e-11 -7.551343903207088531e-11 9.999999993013399813e-01 -1.706889564469534980e-10 -5.153889297841556004e-11 -7.392862668538716534e-11 -2.302246147358585242e-11 6.500991847466325596e-12 +1 1 1 1 7.857643113876001603e-05 +1 1 1 2 -7.035251893676474147e-05 +1 1 1 3 -2.405314445002555534e-15 +1 1 1 4 -5.558757285721584819e-06 +1 1 1 5 -5.869334352880357724e-06 +1 1 1 6 5.558757285721584819e-06 +1 1 1 7 1.745292263742400274e-06 +1 1 1 8 3.343096339053313031e-05 +1 1 1 9 -1.469401203258992273e-06 +1 1 1 10 1.469401203258992273e-06 +1 1 1 11 1.469401203260571143e-06 +1 1 1 12 -1.469401203260571143e-06 +1 1 1 13 -3.692155554436092873e-05 +1 1 1 14 1.745292260524420463e-06 +1 1 2 2 1.281227278684734378e-04 +1 1 2 3 2.572219900086872354e-15 +1 1 2 4 1.201555698071319158e-05 +1 1 2 5 1.291996393635029853e-05 +1 1 2 6 -1.201555698071568525e-05 +1 1 2 7 4.305028112527589235e-16 +1 1 2 8 -1.271440786600519838e-05 +1 1 2 9 -1.332781287161377216e-15 +1 1 2 10 1.332706064449548868e-15 +1 1 2 11 1.332699790104748678e-15 +1 1 2 12 -1.332960987304075044e-15 +1 1 2 13 1.271440786334410546e-05 +1 1 2 14 2.227477521984168302e-15 +1 1 3 3 1.026939121397557088e-04 +1 1 3 4 -4.278618964865483718e-15 +1 1 3 5 -9.676932885022834683e-15 +1 1 3 6 4.278618935656981002e-15 +1 1 3 7 2.616071392704418388e-15 +1 1 3 8 -3.901903400703896580e-15 +1 1 3 9 -2.706531524826441868e-15 +1 1 3 10 2.706448784057276361e-15 +1 1 3 11 2.706448763727996357e-15 +1 1 3 12 -2.706448944214871809e-15 +1 1 3 13 -1.329680338747992430e-15 +1 1 3 14 2.615675638394454998e-15 +1 1 4 4 1.408371357334617900e-04 +1 1 4 5 2.556603610229674908e-05 +1 1 4 7 5.290419386207356151e-15 +1 1 4 8 -6.007778495916513280e-06 +1 1 4 13 6.007778495916513280e-06 +1 1 4 14 -5.290419386207356151e-15 +1 1 5 5 1.408371357334617900e-04 +1 1 5 6 -2.556603610229674908e-05 +1 1 5 7 9.924032461214839492e-15 +1 1 5 8 -6.459981977463787105e-06 +1 1 5 13 6.459981977463787105e-06 +1 1 5 14 -9.924032461214839492e-15 +1 1 6 6 1.408371357334617900e-04 +1 1 6 7 -5.290157748900063206e-15 +1 1 6 8 6.007778495914006063e-06 +1 1 6 13 -6.007778495914006063e-06 +1 1 6 14 5.290157748900063206e-15 +1 1 7 7 1.217655239318551734e-04 +1 1 7 8 4.155410899344141877e-15 +1 1 7 9 2.417180106595669525e-15 +1 1 7 10 -2.417183628264305343e-15 +1 1 7 11 -2.417226894714033782e-15 +1 1 7 12 2.417196646859553142e-15 +1 1 7 13 5.988021857788350635e-16 +1 1 7 14 1.907161179685355561e-05 +1 1 8 8 1.281227278664381734e-04 +1 1 8 9 -1.332781287161377216e-15 +1 1 8 10 1.332706064449548868e-15 +1 1 8 11 1.332699790104748678e-15 +1 1 8 12 -1.332960987304075044e-15 +1 1 8 13 1.271440786436175117e-05 +1 1 8 14 -1.497430566107224118e-15 +1 1 9 9 1.408371357334617900e-04 +1 1 9 13 1.332781287161377216e-15 +1 1 9 14 -2.417180106595669525e-15 +1 1 10 10 1.408371357334617900e-04 +1 1 10 13 -1.332706064449548868e-15 +1 1 10 14 2.417183628264305343e-15 +1 1 11 11 1.408371357334617900e-04 +1 1 11 13 -1.332699790104748678e-15 +1 1 11 14 2.417226894714033782e-15 +1 1 12 12 1.408371357334617900e-04 +1 1 12 13 1.332960987304075044e-15 +1 1 12 14 -2.417196646859553142e-15 +1 1 13 13 1.281227278717607387e-04 +1 1 13 14 -3.256782519015749667e-15 +1 1 14 14 1.217655239413605907e-04 +1 2 1 1 1.745367384800335098e-04 +1 3 1 1 5.134696413579948292e-05 +1 4 1 1 5.242879997815192328e+05 +1 5 1 1 1.012463458102156807e-04 +1 6 1 1 1.041851482167341532e-04 +1 7 1 1 1.012463458102148134e-04 +1 8 1 1 1.041851482167358879e-04 +1 9 1 1 5.242879997745380970e+05 +1 10 1 1 5.134696413580121764e-05 +1 11 1 1 1.138159126115941173e-04 +1 12 1 1 5.242880000448769424e+05 +1 13 1 1 1.020772439058333612e-04 +1 14 1 1 1.287667354523979769e-04 +1 15 1 1 1.442455277471861065e-04 +1 16 1 1 1.047904647802021770e-04 +2 1 1 1 3.999999999574882281e+00 +2 1 1 2 1.999999999716594035e+00 +2 1 1 3 8.579614188072219813e-16 +2 1 1 4 -1.255444341856598311e-01 +2 1 1 5 -1.520519888083168292e-01 +2 1 1 6 1.255444341856599699e-01 +2 1 1 7 -3.011114396772445606e-02 +2 1 1 8 -9.698888507189236119e-01 +2 1 1 9 1.960688192392564394e-02 +2 1 1 10 -1.960688192392578272e-02 +2 1 1 11 -1.960688192345620001e-02 +2 1 1 12 1.960688192345574205e-02 +2 1 1 13 1.030111148997671977e+00 +2 1 1 14 -3.011114396772876511e-02 +2 1 2 2 1.698764383560164903e+00 +2 1 2 3 -4.117139920653466771e-19 +2 1 2 4 -1.730623027990303708e-01 +2 1 2 5 -2.474808844283656883e-01 +2 1 2 6 1.730623027990296492e-01 +2 1 2 7 -1.538836953410929916e-02 +2 1 2 8 -3.339938196456783692e-01 +2 1 2 9 1.024971780347134521e-02 +2 1 2 10 -1.024971780347141634e-02 +2 1 2 11 -1.024971780370046229e-02 +2 1 2 12 1.024971780369995748e-02 +2 1 2 13 3.647705639144857015e-01 +2 1 2 14 -1.538836953410933212e-02 +2 1 3 3 1.000000000000000222e+00 +2 1 3 4 -3.011569238667348036e-21 +2 1 3 5 -3.091548578935767756e-19 +2 1 3 6 -1.065985596117703935e-20 +2 1 3 7 4.239414059335455244e-17 +2 1 3 8 4.219396261878278436e-19 +2 1 3 9 1.809342745915353191e-17 +2 1 3 10 3.858895296900996604e-20 +2 1 3 11 4.464714488570315983e-20 +2 1 3 12 1.963814039498811631e-21 +2 1 3 13 -3.167050615667333023e-19 +2 1 3 14 7.376172378587323988e-17 +2 1 4 4 6.891218722278222852e-01 +2 1 4 5 -1.556555807392085156e-01 +2 1 4 6 -2.989773792221105814e-03 +2 1 4 7 -9.914364557926864160e-05 +2 1 4 8 8.663029491704668517e-02 +2 1 4 9 5.455532305913353593e-04 +2 1 4 10 -5.455532305913067363e-04 +2 1 4 11 -5.455532304993802699e-04 +2 1 4 12 5.455532304993528396e-04 +2 1 4 13 -8.643200788198354689e-02 +2 1 4 14 -9.914364557923612908e-05 +2 1 5 5 7.077019964649091666e-01 +2 1 5 6 1.556555807392079882e-01 +2 1 5 7 -8.255153754547623485e-03 +2 1 5 8 1.319955958387484529e-01 +2 1 5 9 9.010121426334340503e-03 +2 1 5 10 -9.010121426334298869e-03 +2 1 5 11 -9.010121426208220902e-03 +2 1 5 12 9.010121426208108145e-03 +2 1 5 13 -1.154852885896173048e-01 +2 1 5 14 -8.255153754547599199e-03 +2 1 6 6 6.891218722278231734e-01 +2 1 6 7 9.914364557936153062e-05 +2 1 6 8 -8.663029491704697660e-02 +2 1 6 9 -5.455532305914267575e-04 +2 1 6 10 5.455532305913981346e-04 +2 1 6 11 5.455532304994668976e-04 +2 1 6 12 -5.455532304994532367e-04 +2 1 6 13 8.643200788198361628e-02 +2 1 6 14 9.914364557933907408e-05 +2 1 7 7 8.433669144636288806e-01 +2 1 7 8 7.393319459015338518e-03 +2 1 7 9 -3.613925792838017389e-04 +2 1 7 10 3.613925792837851506e-04 +2 1 7 11 3.613925790364963617e-04 +2 1 7 12 -3.613925790364964159e-04 +2 1 7 13 -7.995050075094087272e-03 +2 1 7 14 -1.566330855363711749e-01 +2 1 8 8 1.002669638343691716e+00 +2 1 8 9 -4.763466273007510750e-03 +2 1 8 10 4.763466273007547179e-03 +2 1 8 11 4.763466273369390547e-03 +2 1 8 12 -4.763466273369133808e-03 +2 1 8 13 -3.313241813019893178e-01 +2 1 8 14 7.393319459015607401e-03 +2 1 9 9 6.865816909240175514e-01 +2 1 9 10 -4.495924884143292859e-04 +2 1 9 11 -4.495924881702931578e-04 +2 1 9 12 4.495924881702889836e-04 +2 1 9 13 5.486251530463778954e-03 +2 1 9 14 -3.613925792837988115e-04 +2 1 10 10 6.865816909240171073e-01 +2 1 10 11 4.495924881702841047e-04 +2 1 10 12 -4.495924881702706606e-04 +2 1 10 13 -5.486251530463824057e-03 +2 1 10 14 3.613925792837782117e-04 +2 1 11 11 6.865816909235289422e-01 +2 1 11 12 -4.495924879262201126e-04 +2 1 11 13 -5.486251530331086486e-03 +2 1 11 14 3.613925790364878507e-04 +2 1 12 12 6.865816909235282761e-01 +2 1 12 13 5.486251530330789848e-03 +2 1 12 14 -3.613925790364892602e-04 +2 1 13 13 1.033446382612497327e+00 +2 1 13 14 -7.995050075094213907e-03 +2 1 14 14 8.433669144636289916e-01 +2 2 1 1 6.226223230985455936e-01 +2 3 1 1 1.999999999858293576e+00 +2 4 1 1 1.417075246085598914e-10 +2 5 1 1 1.021008529259245678e+00 +2 6 1 1 9.789914707407543215e-01 +2 7 1 1 1.021008529260184927e+00 +2 8 1 1 9.789914707398151839e-01 +2 9 1 1 1.417075252779421536e-10 +2 10 1 1 1.999999999858295796e+00 +2 11 1 1 8.479480111916830598e-01 +2 12 1 1 1.417075348409205535e-10 +2 13 1 1 9.045711043799514739e-01 +2 14 1 1 7.489111316286777287e-01 +2 15 1 1 6.886888385215829134e-01 +2 16 1 1 9.049642627732598088e-01 +*** END *** +*** REQUEST *** +"" +47 +20 +14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.52428800000000000000e6 -0.26214400000000000000e6 0.0 0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.0 0.52428800000000000000e6 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 -0.52428800000000000000e6 -0.52428800000000000000e6 0.0 -0.10485760000000000000e7 0.0 -0.52428800000000000000e6 0.0 -0.52428800000000000000e6 0.0 0.0 -0.10485760000000000000e7 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.26214400000000000000e6 0.26214400000000000000e6 0.26214400000000000000e6 0.26214400000000000000e6 +0 1 1 2 0.13107200000000000000e6 +0 1 4 5 -0.26214400000000000000e6 +0 1 5 6 0.26214400000000000000e6 +0 2 1 1 -0.26214400000000000000e6 +0 12 1 1 -0.26214400000000000000e6 +1 1 2 3 0.26214400000000000000e6 +1 1 2 7 -0.26214400000000000000e6 +1 1 3 8 0.26214400000000000000e6 +1 1 7 8 -0.26214400000000000000e6 +1 1 13 14 0.26214400000000000000e6 +2 1 2 13 -0.26214400000000000000e6 +2 1 8 13 -0.26214400000000000000e6 +2 1 13 13 0.52428800000000000000e6 +3 1 2 12 -0.26214400000000000000e6 +3 1 8 12 -0.26214400000000000000e6 +3 1 12 13 0.26214400000000000000e6 +4 1 2 10 -0.26214400000000000000e6 +4 1 8 10 -0.26214400000000000000e6 +4 1 10 13 0.26214400000000000000e6 +5 1 2 2 0.52428800000000000000e6 +5 1 2 13 -0.26214400000000000000e6 +5 1 8 8 -0.52428800000000000000e6 +5 1 8 13 0.26214400000000000000e6 +6 1 1 2 -0.13107200000000000000e6 +6 1 2 7 -0.26214400000000000000e6 +6 1 3 8 0.26214400000000000000e6 +6 1 4 5 0.26214400000000000000e6 +6 1 5 6 -0.26214400000000000000e6 +6 1 7 8 -0.26214400000000000000e6 +6 1 13 14 0.26214400000000000000e6 +6 2 1 1 0.26214400000000000000e6 +6 4 1 1 -0.52428800000000000000e6 +6 10 1 1 0.52428800000000000000e6 +6 12 1 1 0.26214400000000000000e6 +6 16 1 1 0.52428800000000000000e6 +7 1 1 4 -0.26214400000000000000e6 +7 1 1 6 0.26214400000000000000e6 +7 1 2 6 -0.26214400000000000000e6 +7 1 4 8 -0.26214400000000000000e6 +7 1 4 13 0.26214400000000000000e6 +7 20 1 1 -0.52428800000000000000e6 +8 1 2 4 -0.26214400000000000000e6 +8 1 4 8 -0.26214400000000000000e6 +8 1 4 13 0.26214400000000000000e6 +9 1 1 2 -0.13107200000000000000e6 +9 1 2 3 -0.26214400000000000000e6 +9 1 4 5 0.26214400000000000000e6 +9 1 5 6 -0.26214400000000000000e6 +9 2 1 1 0.26214400000000000000e6 +9 4 1 1 -0.52428800000000000000e6 +9 10 1 1 0.52428800000000000000e6 +9 12 1 1 0.26214400000000000000e6 +9 16 1 1 0.52428800000000000000e6 +10 1 1 2 -0.39321600000000000000e6 +10 1 4 5 0.26214400000000000000e6 +10 1 5 6 -0.26214400000000000000e6 +10 2 1 1 0.26214400000000000000e6 +10 4 1 1 -0.52428800000000000000e6 +10 10 1 1 0.52428800000000000000e6 +10 12 1 1 -0.26214400000000000000e6 +11 1 1 1 0.52428800000000000000e6 +11 1 1 2 -0.13107200000000000000e6 +11 1 4 5 0.26214400000000000000e6 +11 1 5 6 -0.26214400000000000000e6 +11 2 1 1 0.26214400000000000000e6 +11 12 1 1 0.26214400000000000000e6 +12 1 1 2 -0.26214400000000000000e6 +12 1 1 3 0.52428800000000000000e6 +12 1 4 5 0.52428800000000000000e6 +12 1 5 6 -0.52428800000000000000e6 +12 2 1 1 0.52428800000000000000e6 +12 12 1 1 -0.52428800000000000000e6 +13 1 1 4 0.52428800000000000000e6 +13 1 1 6 -0.52428800000000000000e6 +13 1 1 7 0.52428800000000000000e6 +13 1 1 8 -0.52428800000000000000e6 +13 1 4 5 -0.52428800000000000000e6 +13 1 5 6 0.52428800000000000000e6 +13 4 1 1 0.10485760000000000000e7 +14 1 1 4 -0.52428800000000000000e6 +14 1 1 6 0.52428800000000000000e6 +14 1 1 9 0.52428800000000000000e6 +14 1 1 10 -0.52428800000000000000e6 +14 1 4 5 0.52428800000000000000e6 +14 1 5 6 -0.52428800000000000000e6 +14 6 1 1 -0.10485760000000000000e7 +15 1 1 4 0.52428800000000000000e6 +15 1 1 6 -0.52428800000000000000e6 +15 1 1 11 0.52428800000000000000e6 +15 1 1 12 -0.52428800000000000000e6 +15 1 4 5 -0.52428800000000000000e6 +15 1 5 6 0.52428800000000000000e6 +15 8 1 1 0.10485760000000000000e7 +16 1 1 2 0.26214400000000000000e6 +16 1 1 8 -0.52428800000000000000e6 +16 1 1 13 0.52428800000000000000e6 +16 1 4 5 -0.52428800000000000000e6 +16 1 5 6 0.52428800000000000000e6 +16 2 1 1 -0.52428800000000000000e6 +16 4 1 1 0.10485760000000000000e7 +16 10 1 1 -0.10485760000000000000e7 +16 12 1 1 0.52428800000000000000e6 +17 1 1 2 0.26214400000000000000e6 +17 1 1 4 0.52428800000000000000e6 +17 1 1 6 -0.52428800000000000000e6 +17 1 1 8 -0.52428800000000000000e6 +17 1 1 14 0.52428800000000000000e6 +17 1 4 5 -0.10485760000000000000e7 +17 1 5 6 0.10485760000000000000e7 +17 2 1 1 -0.52428800000000000000e6 +17 4 1 1 0.10485760000000000000e7 +17 12 1 1 0.52428800000000000000e6 +18 1 2 2 0.10485760000000000000e7 +18 1 2 8 0.52428800000000000000e6 +18 1 2 13 -0.52428800000000000000e6 +19 1 2 3 0.52428800000000000000e6 +19 1 2 7 -0.52428800000000000000e6 +19 1 2 14 0.52428800000000000000e6 +20 1 3 3 0.52428800000000000000e6 +20 1 3 14 0.26214400000000000000e6 +20 1 7 7 -0.52428800000000000000e6 +20 1 7 14 0.26214400000000000000e6 +21 1 1 5 -0.52428800000000000000e6 +21 1 3 5 0.52428800000000000000e6 +21 13 1 1 -0.10485760000000000000e7 +22 1 3 7 0.52428800000000000000e6 +22 1 7 7 -0.10485760000000000000e7 +22 1 7 14 0.52428800000000000000e6 +23 1 3 9 0.52428800000000000000e6 +23 1 7 9 -0.52428800000000000000e6 +23 1 9 14 0.52428800000000000000e6 +24 1 1 2 0.26214400000000000000e6 +24 1 3 8 -0.52428800000000000000e6 +24 1 3 13 0.52428800000000000000e6 +24 1 4 5 -0.52428800000000000000e6 +24 1 5 6 0.52428800000000000000e6 +24 2 1 1 -0.52428800000000000000e6 +24 4 1 1 0.10485760000000000000e7 +24 10 1 1 -0.10485760000000000000e7 +24 12 1 1 -0.52428800000000000000e6 +24 16 1 1 -0.10485760000000000000e7 +25 1 3 4 0.52428800000000000000e6 +25 1 4 7 -0.52428800000000000000e6 +25 1 4 14 0.52428800000000000000e6 +26 1 1 5 -0.52428800000000000000e6 +26 1 5 7 0.52428800000000000000e6 +26 1 5 14 -0.52428800000000000000e6 +26 13 1 1 -0.10485760000000000000e7 +27 1 2 5 -0.52428800000000000000e6 +27 1 5 8 -0.52428800000000000000e6 +27 1 5 13 0.52428800000000000000e6 +28 1 1 4 -0.52428800000000000000e6 +28 1 1 6 0.52428800000000000000e6 +28 1 4 8 -0.52428800000000000000e6 +28 1 4 13 0.52428800000000000000e6 +28 1 6 8 0.52428800000000000000e6 +28 1 6 13 -0.52428800000000000000e6 +28 20 1 1 -0.10485760000000000000e7 +29 1 3 6 0.52428800000000000000e6 +29 1 6 7 -0.52428800000000000000e6 +29 1 6 14 0.52428800000000000000e6 +30 1 3 11 -0.52428800000000000000e6 +30 1 7 11 0.52428800000000000000e6 +30 1 11 14 -0.52428800000000000000e6 +31 1 1 2 0.26214400000000000000e6 +31 1 3 8 -0.52428800000000000000e6 +31 1 4 5 -0.52428800000000000000e6 +31 1 5 6 0.52428800000000000000e6 +31 1 7 13 0.52428800000000000000e6 +31 1 13 14 -0.52428800000000000000e6 +31 2 1 1 -0.52428800000000000000e6 +31 4 1 1 0.10485760000000000000e7 +31 10 1 1 -0.10485760000000000000e7 +31 12 1 1 -0.52428800000000000000e6 +31 16 1 1 -0.10485760000000000000e7 +32 1 3 8 0.52428800000000000000e6 +32 1 7 8 -0.52428800000000000000e6 +32 1 8 14 0.52428800000000000000e6 +33 1 2 9 -0.52428800000000000000e6 +33 1 8 9 -0.52428800000000000000e6 +33 1 9 13 0.52428800000000000000e6 +34 1 3 10 0.52428800000000000000e6 +34 1 7 10 -0.52428800000000000000e6 +34 1 10 14 0.52428800000000000000e6 +35 1 2 11 -0.52428800000000000000e6 +35 1 8 11 -0.52428800000000000000e6 +35 1 11 13 0.52428800000000000000e6 +36 1 3 12 0.52428800000000000000e6 +36 1 7 12 -0.52428800000000000000e6 +36 1 12 14 0.52428800000000000000e6 +37 1 3 14 0.26214400000000000000e6 +37 1 7 14 -0.26214400000000000000e6 +37 1 14 14 0.52428800000000000000e6 +38 3 1 1 0.52428800000000000000e6 +38 4 1 1 0.52428800000000000000e6 +39 5 1 1 0.52428800000000000000e6 +39 6 1 1 0.52428800000000000000e6 +40 7 1 1 0.52428800000000000000e6 +40 8 1 1 0.52428800000000000000e6 +41 9 1 1 0.52428800000000000000e6 +41 10 1 1 0.52428800000000000000e6 +42 1 1 5 -0.26214400000000000000e6 +42 11 1 1 0.52428800000000000000e6 +43 1 1 2 0.26214400000000000000e6 +43 1 4 5 -0.52428800000000000000e6 +43 1 5 6 0.52428800000000000000e6 +43 2 1 1 -0.52428800000000000000e6 +43 4 1 1 0.52428800000000000000e6 +43 10 1 1 -0.52428800000000000000e6 +43 14 1 1 0.52428800000000000000e6 +44 1 1 5 0.26214400000000000000e6 +44 1 2 5 -0.26214400000000000000e6 +44 15 1 1 0.52428800000000000000e6 +45 1 1 4 -0.26214400000000000000e6 +45 1 1 6 0.26214400000000000000e6 +45 17 1 1 0.52428800000000000000e6 +46 1 4 5 -0.26214400000000000000e6 +46 1 5 6 0.26214400000000000000e6 +46 18 1 1 0.52428800000000000000e6 +47 1 1 4 0.26214400000000000000e6 +47 1 1 6 -0.26214400000000000000e6 +47 1 3 4 -0.26214400000000000000e6 +47 1 3 6 0.26214400000000000000e6 +47 19 1 1 0.52428800000000000000e6 +*** ANSWER *** +1.940173661886051448e+01 -2.457334103388587562e-11 -2.077183299397886859e-21 2.076599217435528291e-21 2.457334102970057436e-11 -1.940173661886051448e+01 5.049528207860897415e-11 -5.049528207861176588e-11 1.940173661879561706e+01 -3.279214910602921655e-11 -7.195843620126785938e-11 -7.047420626112667775e-11 -2.381758488794320924e-11 -8.999449046850223702e-12 8.999449046823262784e-12 -4.665673704071418564e-11 4.665662144739201262e-11 -2.457334104065035187e-11 -1.081575380888685935e-11 -2.457334109848245175e-11 2.123301560489468276e-11 2.457334105088084414e-11 2.536396840897650414e-21 1.081575377521293114e-11 -1.262373308731221640e-11 1.061650784169001749e-11 1.061623781409549767e-11 1.262382052606669314e-11 1.262373308731212593e-11 2.536418947074418567e-21 5.407876907393847208e-12 5.407876910353202172e-12 -1.038348551111079887e-21 -2.536300511298149021e-21 1.038272653921056871e-21 2.536276408281801490e-21 -2.457334101342538222e-11 -1.281599049553651177e-10 -8.199570467963410888e-11 -8.199570467961043084e-11 4.999999995633992445e-01 -8.396968932065443517e-11 4.999999996547386805e-01 -6.369742686645633473e-11 -3.076048867007774299e-11 1.277919653096591941e-10 -7.574239837212564504e-11 +1 1 1 1 5.800793426386755165e-05 +1 1 1 2 -3.694890189201145789e-05 +1 1 1 3 -3.694878065223358363e-05 +1 1 1 4 -1.023645149470281857e-05 +1 1 1 5 -1.138407097996973653e-05 +1 1 1 6 1.023645149470281857e-05 +1 1 1 7 -1.248727394572996929e-05 +1 1 1 8 1.248733454992161053e-05 +1 1 1 9 -4.718303141875010084e-06 +1 1 1 10 4.718303141875010084e-06 +1 1 1 11 4.718303141860874799e-06 +1 1 1 12 -4.718303141860874799e-06 +1 1 1 13 -2.446156734960195896e-05 +1 1 1 14 2.446150674541026351e-05 +1 1 2 2 8.285137102969622122e-05 +1 1 2 3 1.134113981755092765e-05 +1 1 2 4 1.323703522521560275e-05 +1 1 2 5 1.113193217740378847e-05 +1 1 2 6 -1.323703522521487092e-05 +1 1 2 7 5.670569931847638419e-06 +1 1 2 8 -1.288350782752049168e-05 +1 1 2 9 5.443936851649258519e-16 +1 1 2 10 -5.443680252554191284e-16 +1 1 2 11 -5.443538931789630650e-16 +1 1 2 12 5.445211388373596529e-16 +1 1 2 13 1.288350782861763652e-05 +1 1 2 14 -5.670569932953673713e-06 +1 1 3 3 8.285137100511670745e-05 +1 1 3 4 1.323694350598171034e-05 +1 1 3 5 1.113221528545902344e-05 +1 1 3 6 -1.323694350598176455e-05 +1 1 3 7 1.288350783288421601e-05 +1 1 3 8 -5.670569912641254431e-06 +1 1 3 9 1.329802426920547340e-15 +1 1 3 10 -1.329751922467483954e-15 +1 1 3 11 -1.329814016923752762e-15 +1 1 3 12 1.329739285545249139e-15 +1 1 3 13 5.670569915298837244e-06 +1 1 3 14 -1.288350783554396723e-05 +1 1 4 4 9.573487886295776669e-05 +1 1 4 5 3.617959489343627703e-05 +1 1 4 7 6.618471772880747314e-06 +1 1 4 8 -6.618517615969742908e-06 +1 1 4 13 6.618517615969742908e-06 +1 1 4 14 -6.618471772880747314e-06 +1 1 5 5 9.573487886295776669e-05 +1 1 5 6 -3.617959489343627703e-05 +1 1 5 7 5.566107663303975888e-06 +1 1 5 8 -5.565966091076500282e-06 +1 1 5 13 5.565966091076500282e-06 +1 1 5 14 -5.566107663303975888e-06 +1 1 6 6 9.573487886295776669e-05 +1 1 6 7 -6.618471772880699881e-06 +1 1 6 8 6.618517615970454415e-06 +1 1 6 13 -6.618517615970454415e-06 +1 1 6 14 6.618471772880699881e-06 +1 1 7 7 8.285137105503055654e-05 +1 1 7 8 -2.835284970681284790e-06 +1 1 7 9 -1.329802426920547340e-15 +1 1 7 10 1.329751922467483954e-15 +1 1 7 11 1.329814016923752762e-15 +1 1 7 12 -1.329739285545249139e-15 +1 1 7 13 2.835284968023705365e-06 +1 1 7 14 1.288350781058697492e-05 +1 1 8 8 8.285137104117813907e-05 +1 1 8 9 5.443936851649258519e-16 +1 1 8 10 -5.443680252554191284e-16 +1 1 8 11 -5.443538931789630650e-16 +1 1 8 12 5.445211388373596529e-16 +1 1 8 13 1.288350782287679957e-05 +1 1 8 14 2.835284969575259660e-06 +1 1 9 9 9.573487886295776669e-05 +1 1 9 13 -5.443936851649258519e-16 +1 1 9 14 1.329802426920547340e-15 +1 1 10 10 9.573487886295776669e-05 +1 1 10 13 5.443680252554191284e-16 +1 1 10 14 -1.329751922467483954e-15 +1 1 11 11 9.573487886295776669e-05 +1 1 11 13 5.443538931789630650e-16 +1 1 11 14 -1.329814016923752762e-15 +1 1 12 12 9.573487886295776669e-05 +1 1 12 13 -5.445211388373596529e-16 +1 1 12 14 1.329739285545249139e-15 +1 1 13 13 8.285137103898393071e-05 +1 1 13 14 -2.835284966917693788e-06 +1 1 14 14 8.285137104971124385e-05 +1 2 1 1 1.868252162145257224e-04 +1 3 1 1 2.854217861371929985e-05 +1 4 1 1 2.621439998907788249e+05 +1 5 1 1 5.274551484788186743e-05 +1 6 1 1 6.218212113163188760e-05 +1 7 1 1 5.274551484789422734e-05 +1 8 1 1 6.218212113161605825e-05 +1 9 1 1 2.621439998668303306e+05 +1 10 1 1 2.854217861371984195e-05 +1 11 1 1 5.171057838841068392e-05 +1 12 1 1 2.621440000968988170e+05 +1 13 1 1 6.233823296543199166e-05 +1 14 1 1 2.621439999147185299e+05 +1 15 1 1 6.233908232599737892e-05 +1 16 1 1 4.469974959751561033e-05 +1 17 1 1 7.960752377910015540e-05 +1 18 1 1 1.627346727712296673e-04 +1 19 1 1 5.602404830523286493e-05 +1 20 1 1 5.602377318058714313e-05 +2 1 1 1 1.499999999808624196e+00 +2 1 1 2 4.999999999043107102e-01 +2 1 1 3 4.999999999043129306e-01 +2 1 1 4 -7.833109897254950105e-02 +2 1 1 5 -1.374151838936065080e-02 +2 1 1 6 7.833109897254972309e-02 +2 1 1 7 1.589548116971796210e-01 +2 1 1 8 -1.589548116971827574e-01 +2 1 1 9 7.427973637920855243e-02 +2 1 1 10 -7.427973637920870509e-02 +2 1 1 11 -7.427973638111250165e-02 +2 1 1 12 7.427973638111257104e-02 +2 1 1 13 3.410451882071354746e-01 +2 1 1 14 -3.410451882071295904e-01 +2 1 2 2 5.717993375138601397e-01 +2 1 2 3 1.032200840052103913e-01 +2 1 2 4 -7.331483382832164331e-02 +2 1 2 5 -4.629293947339728488e-02 +2 1 2 6 7.331483382832185147e-02 +2 1 2 7 2.120903160813763025e-02 +2 1 2 8 -5.498658362460417601e-03 +2 1 2 9 2.482566802225424918e-02 +2 1 2 10 -2.482566802225430122e-02 +2 1 2 11 -2.482566802678935411e-02 +2 1 2 12 2.482566802678936452e-02 +2 1 2 13 6.630067915140017143e-02 +2 1 2 14 -8.201105239707273675e-02 +2 1 3 3 5.719343750384712211e-01 +2 1 3 4 -7.332686189211609640e-02 +2 1 3 5 -4.612019126797098356e-02 +2 1 3 6 7.332686189211637395e-02 +2 1 3 7 5.583510900776412524e-03 +2 1 3 8 -2.122636538414353000e-02 +2 1 3 9 2.480799981892707270e-02 +2 1 3 10 -2.480799981892712475e-02 +2 1 3 11 -2.480799982342580048e-02 +2 1 3 12 2.480799982342587681e-02 +2 1 3 13 8.199371862106481779e-02 +2 1 3 14 -6.635086413769428204e-02 +2 1 4 4 4.318119499095723346e-01 +2 1 4 5 -1.693762872275245968e-01 +2 1 4 6 -5.526454690021672528e-02 +2 1 4 7 -3.293161444733986448e-02 +2 1 4 8 3.292560041544242283e-02 +2 1 4 9 -2.867667908038050526e-03 +2 1 4 10 2.867667908038060934e-03 +2 1 4 11 2.867667907102394026e-03 +2 1 4 12 -2.867667907102426552e-03 +2 1 4 13 -4.038923341287910945e-02 +2 1 4 14 4.039524744477634988e-02 +2 1 5 5 4.796823041850223346e-01 +2 1 5 6 1.693762872275245135e-01 +2 1 5 7 -2.980041469892727793e-02 +2 1 5 8 2.988678880164041124e-02 +2 1 5 9 6.970494732713460040e-03 +2 1 5 10 -6.970494732713444427e-03 +2 1 5 11 -6.970494737122455778e-03 +2 1 5 12 6.970494737122406338e-03 +2 1 5 13 -1.640615067175691180e-02 +2 1 5 14 1.631977656904391727e-02 +2 1 6 6 4.318119499095726121e-01 +2 1 6 7 3.293161444734005183e-02 +2 1 6 8 -3.292560041544251304e-02 +2 1 6 9 2.867667908038006291e-03 +2 1 6 10 -2.867667908038018867e-03 +2 1 6 11 -2.867667907102358898e-03 +2 1 6 12 2.867667907102377546e-03 +2 1 6 13 4.038923341287913721e-02 +2 1 6 14 -4.039524744477643314e-02 +2 1 7 7 4.330645517424455138e-01 +2 1 7 8 -2.603610591444528895e-03 +2 1 7 9 6.242433690483604677e-03 +2 1 7 10 -6.242433690483617688e-03 +2 1 7 11 -6.242433691309419788e-03 +2 1 7 12 6.242433691309455350e-03 +2 1 7 13 1.860542101668673926e-02 +2 1 7 14 -7.251895915833082851e-02 +2 1 8 8 4.330134585852812856e-01 +2 1 8 9 -6.251267792147409755e-03 +2 1 8 10 6.251267792147407153e-03 +2 1 8 11 6.251267792991418645e-03 +2 1 8 12 -6.251267792991480228e-03 +2 1 8 13 -7.248519977717866880e-02 +2 1 8 14 1.862275479269870013e-02 +2 1 9 9 3.818641186388784803e-01 +2 1 9 10 -5.316715629522230854e-03 +2 1 9 11 -5.316715630973164845e-03 +2 1 9 12 5.316715630973150968e-03 +2 1 9 13 1.857440023010680299e-02 +2 1 9 14 -1.856556612844345588e-02 +2 1 10 10 3.818641186388784803e-01 +2 1 10 11 5.316715630973170049e-03 +2 1 10 12 -5.316715630973167447e-03 +2 1 10 13 -1.857440023010687585e-02 +2 1 10 14 1.856556612844350099e-02 +2 1 11 11 3.818641186417802147e-01 +2 1 11 12 -5.316715632424108377e-03 +2 1 11 13 -1.857440023379790250e-02 +2 1 11 14 1.856556613211635814e-02 +2 1 12 12 3.818641186417799371e-01 +2 1 12 13 1.857440023379795802e-02 +2 1 12 14 -1.856556613211637549e-02 +2 1 13 13 4.938154793742218773e-01 +2 1 13 14 -6.338829760437550420e-02 +2 1 14 14 4.938319049793636895e-01 +2 2 1 1 1.775051491014733029e-01 +2 3 1 1 9.999999999043126531e-01 +2 4 1 1 9.568754268516796779e-11 +2 5 1 1 5.335309037515307828e-01 +2 6 1 1 4.664690962484692172e-01 +2 7 1 1 5.335309037477240501e-01 +2 8 1 1 4.664690962522760609e-01 +2 9 1 1 9.568754236861049686e-11 +2 10 1 1 9.999999999043155396e-01 +2 11 1 1 4.862584816106395036e-01 +2 12 1 1 9.568754581215883742e-11 +2 13 1 1 4.676213271213895961e-01 +2 14 1 1 9.568754894856715833e-11 +2 15 1 1 4.674485789159634197e-01 +2 16 1 1 6.032200840052086566e-01 +2 17 1 1 3.433378020548999987e-01 +2 18 1 1 1.612474255449491134e-01 +2 19 1 1 5.100084741608670313e-01 +2 20 1 1 5.100325302884557432e-01 +*** END *** +*** REQUEST *** +"" +47 +20 +14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +0.0 0.26214400000000000000e6 0.0 0.0 0.0 -0.52428800000000000000e6 -0.26214400000000000000e6 0.0 0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.0 0.52428800000000000000e6 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 -0.10485760000000000000e7 0.0 0.52428800000000000000e6 0.0 -0.52428800000000000000e6 0.0 0.0 0.10485760000000000000e7 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.26214400000000000000e6 0.26214400000000000000e6 0.26214400000000000000e6 0.26214400000000000000e6 +0 1 1 2 0.13107200000000000000e6 +0 1 4 5 -0.26214400000000000000e6 +0 1 5 6 0.26214400000000000000e6 +0 2 1 1 -0.26214400000000000000e6 +0 12 1 1 -0.26214400000000000000e6 +1 1 2 3 -0.26214400000000000000e6 +1 1 2 7 -0.26214400000000000000e6 +1 1 3 8 -0.26214400000000000000e6 +1 1 7 8 -0.26214400000000000000e6 +1 1 13 14 0.26214400000000000000e6 +2 1 2 13 -0.26214400000000000000e6 +2 1 8 13 -0.26214400000000000000e6 +2 1 13 13 0.52428800000000000000e6 +3 1 2 12 -0.26214400000000000000e6 +3 1 8 12 -0.26214400000000000000e6 +3 1 12 13 0.26214400000000000000e6 +4 1 2 10 -0.26214400000000000000e6 +4 1 8 10 -0.26214400000000000000e6 +4 1 10 13 0.26214400000000000000e6 +5 1 2 2 0.52428800000000000000e6 +5 1 2 13 -0.26214400000000000000e6 +5 1 8 8 -0.52428800000000000000e6 +5 1 8 13 0.26214400000000000000e6 +6 1 1 2 -0.13107200000000000000e6 +6 1 2 7 -0.26214400000000000000e6 +6 1 3 8 -0.26214400000000000000e6 +6 1 4 5 0.26214400000000000000e6 +6 1 5 6 -0.26214400000000000000e6 +6 1 7 8 -0.26214400000000000000e6 +6 1 13 14 0.26214400000000000000e6 +6 2 1 1 0.26214400000000000000e6 +6 4 1 1 0.52428800000000000000e6 +6 10 1 1 -0.52428800000000000000e6 +6 12 1 1 -0.78643200000000000000e6 +6 16 1 1 -0.52428800000000000000e6 +7 1 1 4 -0.26214400000000000000e6 +7 1 1 6 0.26214400000000000000e6 +7 1 2 6 -0.26214400000000000000e6 +7 1 4 8 -0.26214400000000000000e6 +7 1 4 13 0.26214400000000000000e6 +7 20 1 1 -0.52428800000000000000e6 +8 1 2 4 -0.26214400000000000000e6 +8 1 4 8 -0.26214400000000000000e6 +8 1 4 13 0.26214400000000000000e6 +9 1 1 2 0.13107200000000000000e6 +9 1 2 3 -0.26214400000000000000e6 +9 1 4 5 -0.26214400000000000000e6 +9 1 5 6 0.26214400000000000000e6 +9 2 1 1 -0.26214400000000000000e6 +9 4 1 1 -0.52428800000000000000e6 +9 10 1 1 0.52428800000000000000e6 +9 12 1 1 0.78643200000000000000e6 +9 16 1 1 0.52428800000000000000e6 +10 1 1 2 -0.13107200000000000000e6 +10 1 4 5 -0.26214400000000000000e6 +10 1 5 6 0.26214400000000000000e6 +10 2 1 1 -0.26214400000000000000e6 +10 4 1 1 -0.52428800000000000000e6 +10 10 1 1 0.52428800000000000000e6 +10 12 1 1 0.26214400000000000000e6 +11 1 1 1 0.52428800000000000000e6 +11 1 1 2 -0.13107200000000000000e6 +11 1 4 5 0.26214400000000000000e6 +11 1 5 6 -0.26214400000000000000e6 +11 2 1 1 0.26214400000000000000e6 +11 12 1 1 0.26214400000000000000e6 +12 1 1 2 -0.26214400000000000000e6 +12 1 1 3 0.52428800000000000000e6 +12 1 4 5 0.52428800000000000000e6 +12 1 5 6 -0.52428800000000000000e6 +12 2 1 1 0.52428800000000000000e6 +12 12 1 1 -0.52428800000000000000e6 +13 1 1 4 0.52428800000000000000e6 +13 1 1 6 -0.52428800000000000000e6 +13 1 1 7 0.52428800000000000000e6 +13 1 1 8 -0.52428800000000000000e6 +13 1 4 5 -0.52428800000000000000e6 +13 1 5 6 0.52428800000000000000e6 +13 4 1 1 0.10485760000000000000e7 +14 1 1 4 -0.52428800000000000000e6 +14 1 1 6 0.52428800000000000000e6 +14 1 1 9 0.52428800000000000000e6 +14 1 1 10 -0.52428800000000000000e6 +14 1 4 5 0.52428800000000000000e6 +14 1 5 6 -0.52428800000000000000e6 +14 6 1 1 -0.10485760000000000000e7 +15 1 1 4 0.52428800000000000000e6 +15 1 1 6 -0.52428800000000000000e6 +15 1 1 11 0.52428800000000000000e6 +15 1 1 12 -0.52428800000000000000e6 +15 1 4 5 -0.52428800000000000000e6 +15 1 5 6 0.52428800000000000000e6 +15 8 1 1 0.10485760000000000000e7 +16 1 1 2 -0.26214400000000000000e6 +16 1 1 8 -0.52428800000000000000e6 +16 1 1 13 0.52428800000000000000e6 +16 1 4 5 0.52428800000000000000e6 +16 1 5 6 -0.52428800000000000000e6 +16 2 1 1 0.52428800000000000000e6 +16 4 1 1 0.10485760000000000000e7 +16 10 1 1 -0.10485760000000000000e7 +16 12 1 1 -0.52428800000000000000e6 +17 1 1 2 -0.26214400000000000000e6 +17 1 1 4 0.52428800000000000000e6 +17 1 1 6 -0.52428800000000000000e6 +17 1 1 8 -0.52428800000000000000e6 +17 1 1 14 0.52428800000000000000e6 +17 2 1 1 0.52428800000000000000e6 +17 4 1 1 0.10485760000000000000e7 +17 12 1 1 -0.52428800000000000000e6 +18 1 2 2 0.10485760000000000000e7 +18 1 2 8 0.52428800000000000000e6 +18 1 2 13 -0.52428800000000000000e6 +19 1 2 3 -0.52428800000000000000e6 +19 1 2 7 -0.52428800000000000000e6 +19 1 2 14 0.52428800000000000000e6 +20 1 3 3 0.52428800000000000000e6 +20 1 3 14 -0.26214400000000000000e6 +20 1 7 7 -0.52428800000000000000e6 +20 1 7 14 0.26214400000000000000e6 +21 1 1 5 -0.52428800000000000000e6 +21 1 3 5 0.52428800000000000000e6 +21 13 1 1 -0.10485760000000000000e7 +22 1 3 7 0.52428800000000000000e6 +22 1 7 7 0.10485760000000000000e7 +22 1 7 14 -0.52428800000000000000e6 +23 1 3 9 0.52428800000000000000e6 +23 1 7 9 0.52428800000000000000e6 +23 1 9 14 -0.52428800000000000000e6 +24 1 1 2 -0.26214400000000000000e6 +24 1 3 8 -0.52428800000000000000e6 +24 1 3 13 0.52428800000000000000e6 +24 1 4 5 0.52428800000000000000e6 +24 1 5 6 -0.52428800000000000000e6 +24 2 1 1 0.52428800000000000000e6 +24 4 1 1 0.10485760000000000000e7 +24 10 1 1 -0.10485760000000000000e7 +24 12 1 1 -0.15728640000000000000e7 +24 16 1 1 -0.10485760000000000000e7 +25 1 3 4 -0.52428800000000000000e6 +25 1 4 7 -0.52428800000000000000e6 +25 1 4 14 0.52428800000000000000e6 +26 1 1 5 0.52428800000000000000e6 +26 1 5 7 0.52428800000000000000e6 +26 1 5 14 -0.52428800000000000000e6 +26 13 1 1 0.10485760000000000000e7 +27 1 2 5 -0.52428800000000000000e6 +27 1 5 8 -0.52428800000000000000e6 +27 1 5 13 0.52428800000000000000e6 +28 1 1 4 -0.52428800000000000000e6 +28 1 1 6 0.52428800000000000000e6 +28 1 4 8 -0.52428800000000000000e6 +28 1 4 13 0.52428800000000000000e6 +28 1 6 8 0.52428800000000000000e6 +28 1 6 13 -0.52428800000000000000e6 +28 20 1 1 -0.10485760000000000000e7 +29 1 3 6 -0.52428800000000000000e6 +29 1 6 7 -0.52428800000000000000e6 +29 1 6 14 0.52428800000000000000e6 +30 1 3 11 0.52428800000000000000e6 +30 1 7 11 0.52428800000000000000e6 +30 1 11 14 -0.52428800000000000000e6 +31 1 1 2 0.26214400000000000000e6 +31 1 3 8 0.52428800000000000000e6 +31 1 4 5 -0.52428800000000000000e6 +31 1 5 6 0.52428800000000000000e6 +31 1 7 13 0.52428800000000000000e6 +31 1 13 14 -0.52428800000000000000e6 +31 2 1 1 -0.52428800000000000000e6 +31 4 1 1 -0.10485760000000000000e7 +31 10 1 1 0.10485760000000000000e7 +31 12 1 1 0.15728640000000000000e7 +31 16 1 1 0.10485760000000000000e7 +32 1 3 8 -0.52428800000000000000e6 +32 1 7 8 -0.52428800000000000000e6 +32 1 8 14 0.52428800000000000000e6 +33 1 2 9 -0.52428800000000000000e6 +33 1 8 9 -0.52428800000000000000e6 +33 1 9 13 0.52428800000000000000e6 +34 1 3 10 -0.52428800000000000000e6 +34 1 7 10 -0.52428800000000000000e6 +34 1 10 14 0.52428800000000000000e6 +35 1 2 11 -0.52428800000000000000e6 +35 1 8 11 -0.52428800000000000000e6 +35 1 11 13 0.52428800000000000000e6 +36 1 3 12 -0.52428800000000000000e6 +36 1 7 12 -0.52428800000000000000e6 +36 1 12 14 0.52428800000000000000e6 +37 1 3 14 -0.26214400000000000000e6 +37 1 7 14 -0.26214400000000000000e6 +37 1 14 14 0.52428800000000000000e6 +38 3 1 1 0.52428800000000000000e6 +38 4 1 1 0.52428800000000000000e6 +39 5 1 1 0.52428800000000000000e6 +39 6 1 1 0.52428800000000000000e6 +40 7 1 1 0.52428800000000000000e6 +40 8 1 1 0.52428800000000000000e6 +41 9 1 1 0.52428800000000000000e6 +41 10 1 1 0.52428800000000000000e6 +42 1 1 5 -0.26214400000000000000e6 +42 11 1 1 0.52428800000000000000e6 +43 4 1 1 0.52428800000000000000e6 +43 10 1 1 -0.52428800000000000000e6 +43 12 1 1 -0.52428800000000000000e6 +43 14 1 1 0.52428800000000000000e6 +44 1 1 5 0.26214400000000000000e6 +44 1 2 5 -0.26214400000000000000e6 +44 15 1 1 0.52428800000000000000e6 +45 1 1 4 -0.26214400000000000000e6 +45 1 1 6 0.26214400000000000000e6 +45 17 1 1 0.52428800000000000000e6 +46 1 4 5 -0.26214400000000000000e6 +46 1 5 6 0.26214400000000000000e6 +46 18 1 1 0.52428800000000000000e6 +47 1 1 4 0.26214400000000000000e6 +47 1 1 6 -0.26214400000000000000e6 +47 1 3 4 -0.26214400000000000000e6 +47 1 3 6 0.26214400000000000000e6 +47 19 1 1 0.52428800000000000000e6 +*** ANSWER *** +8.202726849559207167e+00 2.141152947318387061e-10 -6.328818678283931992e-20 6.327374583308396281e-20 -2.141152948577016809e-10 -8.202726849559207167e+00 -1.269301219813550395e-10 1.269301219813579347e-10 -8.202726848993730613e+00 -9.999999967872090778e-01 5.081226102172088852e-10 -1.626920888748378991e-10 1.408993294234707394e-10 -5.728730655460676372e-11 5.728730655437329199e-11 -2.980154978863554080e-10 -2.179275949566063943e-11 2.141152948420778935e-10 -9.424612788385556864e-11 2.141152948108005402e-10 -1.160926610266159462e-10 2.141152948139860127e-10 -7.499725034781719879e-21 -9.424612784011715298e-11 -3.543606312783972129e-11 5.804633046827367562e-11 -4.347463150156711404e-11 -3.173253058599186135e-11 3.543606312784902707e-11 7.491110724298854605e-21 4.712306393680091888e-11 4.712306388879352748e-11 -3.163887149547818812e-20 -7.501754499108654282e-21 3.165162601205029867e-20 7.499379781534127087e-21 2.141152947872945487e-10 -5.710011211047235084e-12 5.874905623729913576e-10 5.874905623732097333e-10 9.999999952577489637e-01 2.081484100486796821e-10 -7.950405206115379532e-11 2.608477882664149960e-10 5.584235744773142109e-10 1.999999994686648908e+00 2.126163788519312536e-10 +1 1 1 1 6.091641843217754371e-04 +1 1 1 2 -2.500457534463070355e-04 +1 1 1 3 -8.529750989201101245e-05 +1 1 1 4 8.177591349452033830e-05 +1 1 1 5 1.051138093763827504e-04 +1 1 1 6 -8.177591349452033830e-05 +1 1 1 7 7.387182762477262701e-05 +1 1 1 8 9.379980402153022256e-05 +1 1 1 9 -3.003504737890167094e-05 +1 1 1 10 3.003504737890167094e-05 +1 1 1 11 3.003504737877926451e-05 +1 1 1 12 -3.003504737877926451e-05 +1 1 1 13 -1.562459493558415041e-04 +1 1 1 14 -1.142568229046092532e-05 +1 1 2 2 4.550196769501852270e-04 +1 1 2 3 -9.882422776652782098e-05 +1 1 2 4 -3.327396989668109442e-05 +1 1 2 5 -4.558645500661747361e-05 +1 1 2 6 3.327396989668033548e-05 +1 1 2 7 4.941211386295843010e-05 +1 1 2 8 1.122580797021633346e-04 +1 1 2 9 1.658788065862126829e-14 +1 1 2 10 -1.658683282766796235e-14 +1 1 2 11 -1.659456769860582699e-14 +1 1 2 12 1.659061843600063068e-14 +1 1 2 13 -1.122580796691693278e-04 +1 1 2 14 -4.941211389597086837e-05 +1 1 3 3 4.550196769419791176e-04 +1 1 3 4 -3.715740535259188897e-05 +1 1 3 5 -6.086598906432242120e-05 +1 1 3 6 3.715740535258701006e-05 +1 1 3 7 1.122580796874350986e-04 +1 1 3 8 4.941211386519644023e-05 +1 1 3 9 -3.932015839035638352e-15 +1 1 3 10 3.933079862828678136e-15 +1 1 3 11 3.927499459421197883e-15 +1 1 3 12 -3.931834826900964422e-15 +1 1 3 13 -4.941211387303934190e-05 +1 1 3 14 -1.122580796796032558e-04 +1 1 4 4 3.427615972562136903e-04 +1 1 4 5 8.601067157908755950e-05 +1 1 4 7 1.857870266516883180e-05 +1 1 4 8 1.663698499586779627e-05 +1 1 4 13 -1.663698499586779627e-05 +1 1 4 14 -1.857870266516883180e-05 +1 1 5 5 3.427615972562136903e-04 +1 1 5 6 -8.601067157908755950e-05 +1 1 5 7 3.043299450855026884e-05 +1 1 5 8 2.279322760069361908e-05 +1 1 5 13 -2.279322760069361908e-05 +1 1 5 14 -3.043299450855026884e-05 +1 1 6 6 3.427615972562136903e-04 +1 1 6 7 -1.857870266517371071e-05 +1 1 6 8 -1.663698499586850101e-05 +1 1 6 13 1.663698499586850101e-05 +1 1 6 14 1.857870266517371071e-05 +1 1 7 7 4.550196769453193277e-04 +1 1 7 8 -2.470605695314032763e-05 +1 1 7 9 -3.932015839035638352e-15 +1 1 7 10 3.933079862828678136e-15 +1 1 7 11 3.927499459421197883e-15 +1 1 7 12 -3.931834826900964422e-15 +1 1 7 13 2.470605694529748016e-05 +1 1 7 14 -1.122580796812733608e-04 +1 1 8 8 4.550196769665696903e-04 +1 1 8 9 1.658788065862126829e-14 +1 1 8 10 -1.658683282766796235e-14 +1 1 8 11 -1.659456769860582699e-14 +1 1 8 12 1.659061843600063068e-14 +1 1 8 13 -1.122580796773602584e-04 +1 1 8 14 2.470605692012778094e-05 +1 1 9 9 3.427615972562136903e-04 +1 1 9 13 -1.658788065862126829e-14 +1 1 9 14 3.932015839035638352e-15 +1 1 10 10 3.427615972562136903e-04 +1 1 10 13 1.658683282766796235e-14 +1 1 10 14 -3.933079862828678136e-15 +1 1 11 11 3.427615972562136903e-04 +1 1 11 13 1.659456769860582699e-14 +1 1 11 14 -3.927499459421197883e-15 +1 1 12 12 3.427615972562136903e-04 +1 1 12 13 -1.659061843600063068e-14 +1 1 12 14 3.931834826900964422e-15 +1 1 13 13 4.550196769005816766e-04 +1 1 13 14 -2.470605691228493347e-05 +1 1 14 14 4.550196769296547747e-04 +1 2 1 1 5.242879991584253730e+05 +1 3 1 1 3.397679068983961576e-04 +1 4 1 1 5.242879979813485406e+05 +1 5 1 1 6.507758492216245833e-04 +1 6 1 1 7.108459439794274914e-04 +1 7 1 1 6.507758492217408097e-04 +1 8 1 1 7.108459439792973872e-04 +1 9 1 1 5.242879978564562625e+05 +1 10 1 1 3.397679068981090608e-04 +1 11 1 1 4.518913108638149961e-04 +1 12 1 1 2.279891993938305828e-03 +1 13 1 1 5.253595644019587452e-04 +1 14 1 1 3.010785768091757061e-04 +1 15 1 1 4.795209624708354421e-04 +1 16 1 1 7.874706221518597282e-04 +1 17 1 1 6.355363762717766707e-04 +1 18 1 1 1.048575997557035415e+06 +1 19 1 1 4.542338132917343729e-04 +1 20 1 1 4.425835070413115802e-04 +2 1 1 1 2.999999997675770746e+00 +2 1 1 2 3.183326729927266729e+00 +2 1 1 3 2.183326731089404671e+00 +2 1 1 4 1.116133472516625119e-01 +2 1 1 5 5.138170055136001002e-01 +2 1 1 6 -1.116133472516487174e-01 +2 1 1 7 -1.453276712651084601e+00 +2 1 1 8 -1.230050017857115874e+00 +2 1 1 9 3.534982144555450789e-01 +2 1 1 10 -3.534982144555447459e-01 +2 1 1 11 -3.534982144554282280e-01 +2 1 1 12 3.534982144554203454e-01 +2 1 1 13 1.953276712070085352e+00 +2 1 1 14 7.300500184383149627e-01 +2 1 2 2 4.958197248055411954e+00 +2 1 2 3 3.052907772883039605e+00 +2 1 2 4 4.007552903784985521e-01 +2 1 2 5 9.991372534890715640e-01 +2 1 2 6 -4.007552903784892817e-01 +2 1 2 7 -1.915250791259538676e+00 +2 1 2 8 -1.840301719209612052e+00 +2 1 2 9 3.800414858040930266e-01 +2 1 2 10 -3.800414858040941923e-01 +2 1 2 11 -3.800414857998015150e-01 +2 1 2 12 3.800414857997930773e-01 +2 1 2 13 2.617895528845813224e+00 +2 1 2 14 1.137656981623498043e+00 +2 1 3 3 3.229968391599407074e+00 +2 1 3 4 3.784146327564075207e-01 +2 1 3 5 9.003055525108918378e-01 +2 1 3 6 -3.784146327564037460e-01 +2 1 3 7 -1.633535986816585517e+00 +2 1 3 8 -1.257902095424589195e+00 +2 1 3 9 2.625060115937429828e-01 +2 1 3 10 -2.625060115937432048e-01 +2 1 3 11 -2.625060115902452806e-01 +2 1 3 12 2.625060115902406177e-01 +2 1 3 13 1.795005677458441307e+00 +2 1 3 14 1.096432404782828884e+00 +2 1 4 4 1.625363340099148068e+00 +2 1 4 5 -2.499999998547662305e-01 +2 1 4 6 -1.690112028209116712e-01 +2 1 4 7 -1.991925968357634580e-01 +2 1 4 8 -1.903923647316904944e-01 +2 1 4 9 9.611816342078744260e-03 +2 1 4 10 -9.611816342078954162e-03 +2 1 4 11 -9.611816340561709499e-03 +2 1 4 12 9.611816340561310512e-03 +2 1 4 13 2.103629256468050046e-01 +2 1 4 14 1.792220359206444791e-01 +2 1 5 5 1.918110302007988599e+00 +2 1 5 6 2.499999998547631497e-01 +2 1 5 7 -5.029788842525204640e-01 +2 1 5 8 -4.467425187474751702e-01 +2 1 5 9 5.117033511333874546e-02 +2 1 5 10 -5.117033511333876628e-02 +2 1 5 11 -5.117033510657732071e-02 +2 1 5 12 5.117033510657673090e-02 +2 1 5 13 5.523947347415958387e-01 +2 1 5 14 3.973266682583699305e-01 +2 1 6 6 1.625363340099150955e+00 +2 1 6 7 1.991925968357618759e-01 +2 1 6 8 1.903923647316851930e-01 +2 1 6 9 -9.611816342078511807e-03 +2 1 6 10 9.611816342078666198e-03 +2 1 6 11 9.611816340561418065e-03 +2 1 6 12 -9.611816340560989588e-03 +2 1 6 13 -2.103629256468002029e-01 +2 1 6 14 -1.792220359206442293e-01 +2 1 7 7 1.969971213839328161e+00 +2 1 7 8 7.825982438378249473e-01 +2 1 7 9 -1.709413834843161173e-01 +2 1 7 10 1.709413834843155622e-01 +2 1 7 11 1.709413834791689013e-01 +2 1 7 12 -1.709413834791650433e-01 +2 1 7 13 -1.132652547421707290e+00 +2 1 7 14 -1.635647729772564674e-01 +2 1 8 8 1.744679732118342486e+00 +2 1 8 9 -1.503323652146012490e-01 +2 1 8 10 1.503323652146015821e-01 +2 1 8 11 1.503323652158553569e-01 +2 1 8 12 -1.503323652158511659e-01 +2 1 8 13 -5.956219870912502490e-01 +2 1 8 14 -4.753038515867636371e-01 +2 1 9 9 1.494998930840350626e+00 +2 1 9 10 -3.864679356211517952e-02 +2 1 9 11 -3.864679355870532379e-02 +2 1 9 12 3.864679355870481031e-02 +2 1 9 13 2.297091205894908617e-01 +2 1 9 14 9.156462810942676833e-02 +2 1 10 10 1.494998930840350404e+00 +2 1 10 11 3.864679355870519195e-02 +2 1 10 12 -3.864679355870464378e-02 +2 1 10 13 -2.297091205894915555e-01 +2 1 10 14 -9.156462810942755937e-02 +2 1 11 11 1.494998930833531192e+00 +2 1 11 12 -3.864679355529485050e-02 +2 1 11 13 -2.297091205839470740e-01 +2 1 11 14 -9.156462811107743405e-02 +2 1 12 12 1.494998930833529860e+00 +2 1 12 13 2.297091205839419947e-01 +2 1 12 14 9.156462811107562993e-02 +2 1 13 13 2.522273541754549431e+00 +2 1 13 14 6.623531300367313523e-01 +2 1 14 14 1.432867631805565312e+00 +2 2 1 1 5.811291976356814337e-10 +2 3 1 1 9.999999994188627506e-01 +2 4 1 1 5.811289347827926590e-10 +2 5 1 1 5.162302653017215581e-01 +2 6 1 1 4.837697346982511304e-01 +2 7 1 1 5.162302653019594789e-01 +2 8 1 1 4.837697346980132096e-01 +2 9 1 1 5.811289154464780393e-10 +2 10 1 1 9.999999994189422425e-01 +2 11 1 1 1.013817005513592440e+00 +2 12 1 1 1.833267334136114424e-01 +2 13 1 1 8.864885469972898502e-01 +2 14 1 1 1.183326732251421598e+00 +2 15 1 1 9.853202479754656906e-01 +2 16 1 1 6.862543095422114492e-01 +2 17 1 1 7.232266945032975736e-01 +2 18 1 1 2.905645646932845773e-10 +2 19 1 1 1.033602571009497151e+00 +2 20 1 1 1.078283886253672996e+00 +*** END *** +*** REQUEST *** +"" +1 +6 +1 1 1 1 1 1 +0.10485760000000000000e7 +0 1 1 1 0.52428800000000000000e6 +1 1 1 1 0.10485760000000000000e7 +1 4 1 1 0.52428800000000000000e6 +1 5 1 1 0.52428800000000000000e6 +*** ANSWER *** +5.000000006889400161e-01 +1 1 1 1 1.077668620136170222e-03 +1 2 1 1 3.552627545817120709e-04 +1 3 1 1 3.552627545817120709e-04 +1 4 1 1 2.621440007164657000e+05 +1 5 1 1 2.621440007164657000e+05 +1 6 1 1 3.552627545817120709e-04 +2 1 1 1 9.999999999999990008e-01 +2 2 1 1 4.901085593438081922e+00 +2 3 1 1 4.901085593438081922e+00 +2 4 1 1 1.042302185589578071e-15 +2 5 1 1 1.042302185589578071e-15 +2 6 1 1 4.901085593438081922e+00 +*** END *** +*** REQUEST *** +"" +2 +7 +1 1 1 1 1 1 1 +0.10485760000000000000e7 0.10485760000000000000e7 +0 1 1 1 0.52428800000000000000e6 +1 1 1 1 0.10485760000000000000e7 +1 3 1 1 0.52428800000000000000e6 +1 4 1 1 0.52428800000000000000e6 +2 1 1 1 0.10485760000000000000e7 +2 5 1 1 0.52428800000000000000e6 +2 6 1 1 0.52428800000000000000e6 +*** ANSWER *** +2.499997645979282479e-01 2.500002357495276217e-01 +1 1 1 1 6.745550242878593436e-04 +1 2 1 1 3.102211906109383389e-04 +1 3 1 1 1.310718768917397974e+05 +1 4 1 1 1.310718768917397974e+05 +1 5 1 1 1.310721239108695008e+05 +1 6 1 1 1.310721239108695008e+05 +1 7 1 1 3.102211906109383389e-04 +2 1 1 1 9.999999999999985567e-01 +2 2 1 1 1.664730264895515788e+00 +2 3 1 1 1.437930271481947813e-15 +2 4 1 1 1.437930271481947813e-15 +2 5 1 1 1.410287126255177107e-15 +2 6 1 1 1.410287126255177107e-15 +2 7 1 1 1.664730264895515788e+00 +*** END *** +*** REQUEST *** +"" +4 +5 +3 1 1 1 1 +0.52428800000000000000e6 0.10485760000000000000e7 0.26214400000000000000e6 0.52428800000000000000e6 +0 1 1 2 0.26214400000000000000e6 +0 4 1 1 -0.52428800000000000000e6 +1 1 1 1 0.52428800000000000000e6 +1 1 1 2 -0.26214400000000000000e6 +1 4 1 1 0.52428800000000000000e6 +2 1 1 3 0.52428800000000000000e6 +2 1 2 3 -0.52428800000000000000e6 +2 4 1 1 0.10485760000000000000e7 +2 5 1 1 0.10485760000000000000e7 +3 1 2 3 0.26214400000000000000e6 +3 2 1 1 0.52428800000000000000e6 +4 1 1 2 0.26214400000000000000e6 +4 1 2 3 -0.26214400000000000000e6 +4 3 1 1 0.52428800000000000000e6 +4 5 1 1 0.52428800000000000000e6 +*** ANSWER *** +6.390535959450866983e-11 -7.081165828606712792e-11 9.999999998131693379e-01 9.999999999222820568e-01 +1 1 1 1 8.686329382893162934e-05 +1 1 1 2 -3.712570269949944015e-05 +1 1 1 3 -3.712570269948556236e-05 +1 1 2 2 5.335848065784630154e-05 +1 1 2 3 8.522459157680231092e-06 +1 1 3 3 5.335848065784630154e-05 +1 2 1 1 5.242879999554053647e+05 +1 3 1 1 5.242880000126119703e+05 +1 4 1 1 5.242880000126118539e+05 +1 5 1 1 5.242879999383604736e+05 +2 1 1 1 2.499999999280670515e+00 +2 1 1 2 1.499999999460502220e+00 +2 1 1 3 1.499999999460500666e+00 +2 1 2 2 3.620947120705871214e+00 +2 1 2 3 4.999999998201666296e-01 +2 1 3 3 3.620947120705780176e+00 +2 2 1 1 1.798323704529754762e-10 +2 3 1 1 1.798323696005608919e-10 +2 4 1 1 1.798323696005600647e-10 +2 5 1 1 1.798323677204703494e-10 +*** END *** +*** REQUEST *** +"" +5 +3 +3 1 1 +0.0 -0.52428800000000000000e6 0.0 0.10485760000000000000e7 0.0 +0 1 2 3 0.52428800000000000000e6 +0 2 1 1 -0.10485760000000000000e7 +1 1 2 3 -0.52428800000000000000e6 +2 1 2 2 -0.10485760000000000000e7 +3 1 1 2 -0.52428800000000000000e6 +4 1 1 1 0.10485760000000000000e7 +4 1 2 3 -0.52428800000000000000e6 +4 2 1 1 0.10485760000000000000e7 +5 1 1 3 -0.52428800000000000000e6 +5 1 2 3 0.52428800000000000000e6 +5 2 1 1 -0.10485760000000000000e7 +5 3 1 1 0.10485760000000000000e7 +*** ANSWER *** +-9.999999998715584093e-01 1.284406218496803786e-10 -7.783128073916068263e-31 -1.284409534299150764e-10 6.631567026046208180e-16 +1 1 1 1 3.476886429670015314e-10 +1 1 1 2 4.080600651617307598e-25 +1 1 1 3 -3.476851012951714394e-10 +1 1 2 2 6.953757192769094094e-10 +1 1 2 3 8.665201604627535488e-21 +1 1 3 3 1.346804488723699154e-04 +1 2 1 1 1.048575999999999651e+06 +1 3 1 1 1.346811442425725237e-04 +2 1 1 1 9.999999999960526020e-01 +2 1 1 2 -4.433000231874575034e-17 +2 1 1 3 8.049700100463470729e-07 +2 1 2 2 4.999999999869032541e-01 +2 1 2 3 -2.087243697581483313e-17 +2 1 3 3 8.049886141043881407e-07 +2 2 1 1 3.315809821104277243e-16 +2 3 1 1 8.049700105932944581e-07 +*** END *** +*** REQUEST *** +"" +5 +3 +3 1 1 +0.0 -0.52428800000000000000e6 0.0 0.10485760000000000000e7 0.0 +0 1 2 3 -0.52428800000000000000e6 +0 2 1 1 -0.10485760000000000000e7 +1 1 2 3 -0.52428800000000000000e6 +2 1 2 2 -0.10485760000000000000e7 +3 1 1 2 -0.52428800000000000000e6 +4 1 1 1 0.10485760000000000000e7 +4 1 2 3 0.52428800000000000000e6 +4 2 1 1 0.10485760000000000000e7 +5 1 1 3 -0.52428800000000000000e6 +5 1 2 3 -0.52428800000000000000e6 +5 2 1 1 -0.10485760000000000000e7 +5 3 1 1 0.10485760000000000000e7 +*** ANSWER *** +9.999999998715584093e-01 1.284406218496803786e-10 7.783128073916068263e-31 -1.284409534299150764e-10 6.631567026046208180e-16 +1 1 1 1 3.476886429670015314e-10 +1 1 1 2 -4.080600651617307598e-25 +1 1 1 3 -3.476851012951714394e-10 +1 1 2 2 6.953757192769094094e-10 +1 1 2 3 -8.665201604627535488e-21 +1 1 3 3 1.346804488723699154e-04 +1 2 1 1 1.048575999999999651e+06 +1 3 1 1 1.346811442425725237e-04 +2 1 1 1 9.999999999960526020e-01 +2 1 1 2 4.433000231874575034e-17 +2 1 1 3 8.049700100463470729e-07 +2 1 2 2 4.999999999869032541e-01 +2 1 2 3 2.087243697581483313e-17 +2 1 3 3 8.049886141043881407e-07 +2 2 1 1 3.315809821104277243e-16 +2 3 1 1 8.049700105932944581e-07 +*** END *** +*** REQUEST *** +"" +4 +5 +3 1 1 1 1 +0.52428800000000000000e6 0.10485760000000000000e7 0.26214400000000000000e6 0.52428800000000000000e6 +0 1 1 2 -0.26214400000000000000e6 +0 4 1 1 -0.52428800000000000000e6 +1 1 1 1 0.52428800000000000000e6 +1 1 1 2 0.26214400000000000000e6 +1 4 1 1 0.52428800000000000000e6 +2 1 1 3 0.52428800000000000000e6 +2 1 2 3 0.52428800000000000000e6 +2 4 1 1 0.10485760000000000000e7 +2 5 1 1 0.10485760000000000000e7 +3 1 2 3 -0.26214400000000000000e6 +3 2 1 1 0.52428800000000000000e6 +4 1 1 2 -0.26214400000000000000e6 +4 1 2 3 0.26214400000000000000e6 +4 3 1 1 0.52428800000000000000e6 +4 5 1 1 0.52428800000000000000e6 +*** ANSWER *** +6.390682943459618358e-11 -7.081294109863518471e-11 9.999999998131664514e-01 9.999999999222810576e-01 +1 1 1 1 8.686499997310158372e-05 +1 1 1 2 3.712637526269381340e-05 +1 1 1 3 -3.712637526272124372e-05 +1 1 2 2 5.335941618249645350e-05 +1 1 2 3 -8.522644434525800334e-06 +1 1 3 3 5.335941618249645350e-05 +1 2 1 1 5.242879999554048409e+05 +1 3 1 1 5.242880000126123196e+05 +1 4 1 1 5.242880000126122031e+05 +1 5 1 1 5.242879999383596005e+05 +2 1 1 1 2.499999999280643870e+00 +2 1 1 2 -1.499999999460482680e+00 +2 1 1 3 1.499999999460482902e+00 +2 1 2 2 3.621013004357011233e+00 +2 1 2 3 -4.999999998201609674e-01 +2 1 3 3 3.621013004357259035e+00 +2 2 1 1 1.798390204629782096e-10 +2 3 1 1 1.798390196105975397e-10 +2 4 1 1 1.798390196106000213e-10 +2 5 1 1 1.798390177302902759e-10 +*** END *** +*** REQUEST *** +"" +5 +3 +3 1 1 +-0.52428800000000000000e6 0.0 0.10485760000000000000e7 0.0 0.0 +0 1 2 3 0.52428800000000000000e6 +0 2 1 1 -0.10485760000000000000e7 +1 1 3 3 -0.10485760000000000000e7 +2 1 2 3 -0.52428800000000000000e6 +3 1 1 1 0.10485760000000000000e7 +3 1 2 3 -0.52428800000000000000e6 +3 2 1 1 0.10485760000000000000e7 +4 1 1 3 0.10485760000000000000e7 +5 1 1 2 -0.52428800000000000000e6 +5 1 2 3 0.52428800000000000000e6 +5 2 1 1 -0.10485760000000000000e7 +5 3 1 1 0.10485760000000000000e7 +*** ANSWER *** +2.417243834881730172e-10 -9.999999997582740274e-01 -2.417249248510537096e-10 -6.516102507854656631e-31 1.082378559825435644e-15 +1 1 1 1 5.676625496526350850e-10 +1 1 1 2 -5.674780903737580028e-10 +1 1 1 3 -6.832628703276204432e-25 +1 1 2 2 2.534675224631680567e-04 +1 1 2 3 1.228971102411588713e-18 +1 1 3 3 1.135322673535390481e-09 +1 2 1 1 1.048575999999999418e+06 +1 3 1 1 2.534686574193489601e-04 +2 1 1 1 9.999999999989667154e-01 +2 1 1 2 1.646717610768319847e-06 +2 1 1 3 5.112710586318704261e-17 +2 1 2 2 1.646890679667584597e-06 +2 1 2 3 9.378268007442111308e-18 +2 1 3 3 5.000000000000000000e-01 +2 2 1 1 5.413640376397729861e-16 +2 3 1 1 1.646717611279745635e-06 +*** END *** +*** REQUEST *** +"" +5 +3 +3 1 1 +-0.52428800000000000000e6 0.0 0.10485760000000000000e7 0.0 0.0 +0 1 2 3 -0.52428800000000000000e6 +0 2 1 1 -0.10485760000000000000e7 +1 1 3 3 -0.10485760000000000000e7 +2 1 2 3 -0.52428800000000000000e6 +3 1 1 1 0.10485760000000000000e7 +3 1 2 3 0.52428800000000000000e6 +3 2 1 1 0.10485760000000000000e7 +4 1 1 3 0.10485760000000000000e7 +5 1 1 2 -0.52428800000000000000e6 +5 1 2 3 -0.52428800000000000000e6 +5 2 1 1 -0.10485760000000000000e7 +5 3 1 1 0.10485760000000000000e7 +*** ANSWER *** +2.417243834881730172e-10 9.999999997582740274e-01 -2.417249248510537096e-10 6.516102507854656631e-31 1.082378559825435644e-15 +1 1 1 1 5.676625496526350850e-10 +1 1 1 2 -5.674780903737580028e-10 +1 1 1 3 6.832628703276204432e-25 +1 1 2 2 2.534675224631680567e-04 +1 1 2 3 -1.228971102411588713e-18 +1 1 3 3 1.135322673535390481e-09 +1 2 1 1 1.048575999999999418e+06 +1 3 1 1 2.534686574193489601e-04 +2 1 1 1 9.999999999989667154e-01 +2 1 1 2 1.646717610768319847e-06 +2 1 1 3 -5.112710586318704261e-17 +2 1 2 2 1.646890679667584597e-06 +2 1 2 3 -9.378268007442111308e-18 +2 1 3 3 5.000000000000000000e-01 +2 2 1 1 5.413640376397729861e-16 +2 3 1 1 1.646717611279745635e-06 +*** END *** +*** REQUEST *** +"" +7 +2 +3 1 +0.0 0.0 -0.52428800000000000000e6 0.0 0.10485760000000000000e7 0.0 0.52428800000000000000e6 +0 1 2 3 0.52428800000000000000e6 +0 2 1 1 -0.10485760000000000000e7 +1 1 2 3 -0.52428800000000000000e6 +2 1 2 3 -0.52428800000000000000e6 +3 1 2 2 -0.10485760000000000000e7 +4 1 1 2 -0.52428800000000000000e6 +5 1 1 1 0.10485760000000000000e7 +5 1 2 3 -0.52428800000000000000e6 +5 2 1 1 0.10485760000000000000e7 +6 1 1 3 0.10485760000000000000e7 +7 1 3 3 0.10485760000000000000e7 +*** ANSWER *** +-6.610729450860498568e-01 -3.389270548050536402e-01 1.088966114251059482e-10 0.000000000000000000e+00 -1.088966114252581494e-10 0.000000000000000000e+00 -1.088966114251092569e-10 +1 1 1 1 1.550832121586420985e-16 +1 1 2 2 3.134368784984328401e-16 +1 1 2 3 4.516099629581558325e-18 +1 1 3 3 3.099777580585371567e-16 +1 2 1 1 1.048576000000000000e+06 +2 1 1 1 1.000000000000000000e+00 +2 1 2 2 5.000000000000000000e-01 +2 1 2 3 4.987329993433329641e-18 +2 1 3 3 5.000000000000000000e-01 +2 2 1 1 1.440533100777350242e-22 +*** END *** +*** REQUEST *** +"" +7 +2 +3 1 +0.0 0.0 -0.52428800000000000000e6 0.0 0.10485760000000000000e7 0.0 0.52428800000000000000e6 +0 1 2 3 -0.52428800000000000000e6 +0 2 1 1 -0.10485760000000000000e7 +1 1 2 3 -0.52428800000000000000e6 +2 1 2 3 -0.52428800000000000000e6 +3 1 2 2 -0.10485760000000000000e7 +4 1 1 2 -0.52428800000000000000e6 +5 1 1 1 0.10485760000000000000e7 +5 1 2 3 0.52428800000000000000e6 +5 2 1 1 0.10485760000000000000e7 +6 1 1 3 0.10485760000000000000e7 +7 1 3 3 0.10485760000000000000e7 +*** ANSWER *** +6.610729450860498568e-01 3.389270548050536402e-01 1.088966114251059482e-10 0.000000000000000000e+00 -1.088966114252581494e-10 0.000000000000000000e+00 -1.088966114251092569e-10 +1 1 1 1 1.550832121586420985e-16 +1 1 2 2 3.134368784984328401e-16 +1 1 2 3 -4.516099629581558325e-18 +1 1 3 3 3.099777580585371567e-16 +1 2 1 1 1.048576000000000000e+06 +2 1 1 1 1.000000000000000000e+00 +2 1 2 2 5.000000000000000000e-01 +2 1 2 3 -4.987329993433329641e-18 +2 1 3 3 5.000000000000000000e-01 +2 2 1 1 1.440533100777350242e-22 +*** END *** +*** REQUEST *** +"" +5 +3 +3 1 1 +-0.52428800000000000000e6 0.0 0.10485760000000000000e7 0.0 0.0 +0 1 2 3 0.52428800000000000000e6 +0 2 1 1 -0.10485760000000000000e7 +1 1 3 3 -0.10485760000000000000e7 +2 1 2 3 -0.52428800000000000000e6 +3 1 1 1 0.10485760000000000000e7 +3 1 2 3 -0.52428800000000000000e6 +3 2 1 1 0.10485760000000000000e7 +4 1 1 3 0.10485760000000000000e7 +5 1 1 2 0.52428800000000000000e6 +5 1 2 3 0.52428800000000000000e6 +5 2 1 1 -0.10485760000000000000e7 +5 3 1 1 0.10485760000000000000e7 +*** ANSWER *** +2.417243834881730172e-10 -9.999999997582740274e-01 -2.417249248510537096e-10 6.516102507854656631e-31 1.082378559825435644e-15 +1 1 1 1 5.676625496526350850e-10 +1 1 1 2 5.674780903737580028e-10 +1 1 1 3 6.832628703276204432e-25 +1 1 2 2 2.534675224631680567e-04 +1 1 2 3 1.228971102411588713e-18 +1 1 3 3 1.135322673535390481e-09 +1 2 1 1 1.048575999999999418e+06 +1 3 1 1 2.534686574193489601e-04 +2 1 1 1 9.999999999989667154e-01 +2 1 1 2 -1.646717610768319847e-06 +2 1 1 3 -5.112710586318704261e-17 +2 1 2 2 1.646890679667584597e-06 +2 1 2 3 9.378268007442111308e-18 +2 1 3 3 5.000000000000000000e-01 +2 2 1 1 5.413640376397729861e-16 +2 3 1 1 1.646717611279745635e-06 +*** END *** +*** REQUEST *** +"" +5 +3 +3 1 1 +-0.52428800000000000000e6 0.0 0.10485760000000000000e7 0.0 0.0 +0 1 2 3 -0.52428800000000000000e6 +0 2 1 1 -0.10485760000000000000e7 +1 1 3 3 -0.10485760000000000000e7 +2 1 2 3 -0.52428800000000000000e6 +3 1 1 1 0.10485760000000000000e7 +3 1 2 3 0.52428800000000000000e6 +3 2 1 1 0.10485760000000000000e7 +4 1 1 3 0.10485760000000000000e7 +5 1 1 2 0.52428800000000000000e6 +5 1 2 3 -0.52428800000000000000e6 +5 2 1 1 -0.10485760000000000000e7 +5 3 1 1 0.10485760000000000000e7 +*** ANSWER *** +2.417243834881730172e-10 9.999999997582740274e-01 -2.417249248510537096e-10 -6.516102507854656631e-31 1.082378559825435644e-15 +1 1 1 1 5.676625496526350850e-10 +1 1 1 2 5.674780903737580028e-10 +1 1 1 3 -6.832628703276204432e-25 +1 1 2 2 2.534675224631680567e-04 +1 1 2 3 -1.228971102411588713e-18 +1 1 3 3 1.135322673535390481e-09 +1 2 1 1 1.048575999999999418e+06 +1 3 1 1 2.534686574193489601e-04 +2 1 1 1 9.999999999989667154e-01 +2 1 1 2 -1.646717610768319847e-06 +2 1 1 3 5.112710586318704261e-17 +2 1 2 2 1.646890679667584597e-06 +2 1 2 3 -9.378268007442111308e-18 +2 1 3 3 5.000000000000000000e-01 +2 2 1 1 5.413640376397729861e-16 +2 3 1 1 1.646717611279745635e-06 +*** END *** +*** REQUEST *** +"" +4 +5 +3 1 1 1 1 +0.52428800000000000000e6 -0.10485760000000000000e7 0.26214400000000000000e6 0.52428800000000000000e6 +0 1 1 2 0.26214400000000000000e6 +0 4 1 1 -0.52428800000000000000e6 +1 1 1 1 0.52428800000000000000e6 +1 1 1 2 -0.26214400000000000000e6 +1 4 1 1 0.52428800000000000000e6 +2 1 1 3 0.52428800000000000000e6 +2 1 2 3 -0.52428800000000000000e6 +2 4 1 1 -0.10485760000000000000e7 +2 5 1 1 -0.10485760000000000000e7 +3 1 2 3 -0.26214400000000000000e6 +3 2 1 1 0.52428800000000000000e6 +4 1 1 2 0.26214400000000000000e6 +4 1 2 3 0.26214400000000000000e6 +4 3 1 1 0.52428800000000000000e6 +4 5 1 1 0.52428800000000000000e6 +*** ANSWER *** +6.390550264518323903e-11 7.081185573184761103e-11 9.999999998131687828e-01 9.999999999222817237e-01 +1 1 1 1 8.686351428452204412e-05 +1 1 1 2 -3.712580621795203914e-05 +1 1 1 3 3.712580621793892029e-05 +1 1 2 2 5.335862611368378042e-05 +1 1 2 3 -8.522486255170660984e-06 +1 1 3 3 5.335862611368378042e-05 +1 2 1 1 5.242879999554052483e+05 +1 3 1 1 5.242880000126118539e+05 +1 4 1 1 5.242880000126118539e+05 +1 5 1 1 5.242879999383602408e+05 +2 1 1 1 2.499999999280668295e+00 +2 1 1 2 1.499999999460501110e+00 +2 1 1 3 -1.499999999460502442e+00 +2 1 2 2 3.620948442164833914e+00 +2 1 2 3 -4.999999998201661855e-01 +2 1 3 3 3.620948442164671377e+00 +2 2 1 1 1.798328638351187992e-10 +2 3 1 1 1.798328629827033877e-10 +2 4 1 1 1.798328629827033877e-10 +2 5 1 1 1.798328611025971288e-10 +*** END *** +*** REQUEST *** +"" +5 +3 +3 1 1 +0.0 -0.52428800000000000000e6 0.0 0.10485760000000000000e7 0.0 +0 1 2 3 0.52428800000000000000e6 +0 2 1 1 -0.10485760000000000000e7 +1 1 2 3 -0.52428800000000000000e6 +2 1 2 2 -0.10485760000000000000e7 +3 1 1 2 -0.52428800000000000000e6 +4 1 1 1 0.10485760000000000000e7 +4 1 2 3 -0.52428800000000000000e6 +4 2 1 1 0.10485760000000000000e7 +5 1 1 3 0.52428800000000000000e6 +5 1 2 3 0.52428800000000000000e6 +5 2 1 1 -0.10485760000000000000e7 +5 3 1 1 0.10485760000000000000e7 +*** ANSWER *** +-9.999999998715584093e-01 1.284406218496803786e-10 7.783128073916068263e-31 -1.284409534299150764e-10 6.631567026046208180e-16 +1 1 1 1 3.476886429670015314e-10 +1 1 1 2 -4.080600651617307598e-25 +1 1 1 3 3.476851012951714394e-10 +1 1 2 2 6.953757192769094094e-10 +1 1 2 3 8.665201604627535488e-21 +1 1 3 3 1.346804488723699154e-04 +1 2 1 1 1.048575999999999651e+06 +1 3 1 1 1.346811442425725237e-04 +2 1 1 1 9.999999999960526020e-01 +2 1 1 2 4.433000231874575034e-17 +2 1 1 3 -8.049700100463470729e-07 +2 1 2 2 4.999999999869032541e-01 +2 1 2 3 -2.087243697581483313e-17 +2 1 3 3 8.049886141043881407e-07 +2 2 1 1 3.315809821104277243e-16 +2 3 1 1 8.049700105932944581e-07 +*** END *** +*** REQUEST *** +"" +5 +3 +3 1 1 +0.0 -0.52428800000000000000e6 0.0 0.10485760000000000000e7 0.0 +0 1 2 3 -0.52428800000000000000e6 +0 2 1 1 -0.10485760000000000000e7 +1 1 2 3 -0.52428800000000000000e6 +2 1 2 2 -0.10485760000000000000e7 +3 1 1 2 -0.52428800000000000000e6 +4 1 1 1 0.10485760000000000000e7 +4 1 2 3 0.52428800000000000000e6 +4 2 1 1 0.10485760000000000000e7 +5 1 1 3 0.52428800000000000000e6 +5 1 2 3 -0.52428800000000000000e6 +5 2 1 1 -0.10485760000000000000e7 +5 3 1 1 0.10485760000000000000e7 +*** ANSWER *** +9.999999998715584093e-01 1.284406218496803786e-10 -7.783128073916068263e-31 -1.284409534299150764e-10 6.631567026046208180e-16 +1 1 1 1 3.476886429670015314e-10 +1 1 1 2 4.080600651617307598e-25 +1 1 1 3 3.476851012951714394e-10 +1 1 2 2 6.953757192769094094e-10 +1 1 2 3 -8.665201604627535488e-21 +1 1 3 3 1.346804488723699154e-04 +1 2 1 1 1.048575999999999651e+06 +1 3 1 1 1.346811442425725237e-04 +2 1 1 1 9.999999999960526020e-01 +2 1 1 2 -4.433000231874575034e-17 +2 1 1 3 -8.049700100463470729e-07 +2 1 2 2 4.999999999869032541e-01 +2 1 2 3 2.087243697581483313e-17 +2 1 3 3 8.049886141043881407e-07 +2 2 1 1 3.315809821104277243e-16 +2 3 1 1 8.049700105932944581e-07 +*** END *** +*** REQUEST *** +"" +4 +5 +3 1 1 1 1 +0.52428800000000000000e6 -0.10485760000000000000e7 0.26214400000000000000e6 0.52428800000000000000e6 +0 1 1 2 -0.26214400000000000000e6 +0 4 1 1 -0.52428800000000000000e6 +1 1 1 1 0.52428800000000000000e6 +1 1 1 2 0.26214400000000000000e6 +1 4 1 1 0.52428800000000000000e6 +2 1 1 3 0.52428800000000000000e6 +2 1 2 3 0.52428800000000000000e6 +2 4 1 1 -0.10485760000000000000e7 +2 5 1 1 -0.10485760000000000000e7 +3 1 2 3 0.26214400000000000000e6 +3 2 1 1 0.52428800000000000000e6 +4 1 1 2 -0.26214400000000000000e6 +4 1 2 3 -0.26214400000000000000e6 +4 3 1 1 0.52428800000000000000e6 +4 5 1 1 0.52428800000000000000e6 +*** ANSWER *** +6.390905338787261955e-11 7.081709479863854861e-11 9.999999998131536838e-01 9.999999999222748404e-01 +1 1 1 1 8.686934523099900524e-05 +1 1 1 2 3.712855299775553921e-05 +1 1 1 3 3.712855299778860738e-05 +1 1 2 2 5.336259544837782844e-05 +1 1 2 3 8.523096085362891639e-06 +1 1 3 3 5.336259544837782844e-05 +1 2 1 1 5.242879999554013484e+05 +1 3 1 1 5.242880000126122031e+05 +1 4 1 1 5.242880000126122031e+05 +1 5 1 1 5.242879999383551767e+05 +2 1 1 1 2.499999999280629215e+00 +2 1 1 2 -1.499999999460470690e+00 +2 1 1 3 -1.499999999460471356e+00 +2 1 2 2 3.620974730863071755e+00 +2 1 2 3 4.999999998201573037e-01 +2 1 3 3 3.620974730863228075e+00 +2 2 1 1 1.798428178966176561e-10 +2 3 1 1 1.798428170445868836e-10 +2 4 1 1 1.798428170445868836e-10 +2 5 1 1 1.798428151637460883e-10 +*** END *** +*** REQUEST *** +"" +4 +5 +3 1 1 1 1 +0.10485760000000000000e7 -0.10485760000000000000e7 0.52428800000000000000e6 0.52428800000000000000e6 +0 1 2 3 -0.26214400000000000000e6 +0 2 1 1 -0.52428800000000000000e6 +1 1 1 1 0.52428800000000000000e6 +1 1 2 3 0.26214400000000000000e6 +1 2 1 1 0.52428800000000000000e6 +2 1 1 2 0.52428800000000000000e6 +2 4 1 1 -0.10485760000000000000e7 +3 1 1 3 -0.26214400000000000000e6 +3 3 1 1 0.52428800000000000000e6 +4 1 2 3 -0.26214400000000000000e6 +4 5 1 1 0.52428800000000000000e6 +*** ANSWER *** +-3.988166713257686148e-10 -1.023140901531525444e-11 2.046281803062761375e-11 9.999999988992015476e-01 +1 1 1 1 9.849549814813351317e-05 +1 1 1 2 -5.364204969821604121e-06 +1 1 1 3 -5.364204969820845180e-06 +1 1 2 2 3.075902931241785224e-04 +1 1 2 3 1.840203417470156859e-04 +1 1 3 3 3.075902931241785224e-04 +1 2 1 1 5.242880000984955113e+05 +1 3 1 1 3.183187030638204296e-04 +1 4 1 1 3.183187030638212969e-04 +1 5 1 1 5.242879997304548742e+05 +2 1 1 1 2.999999998965246828e+00 +2 1 1 2 3.605015097267154078e-01 +2 1 1 3 3.605015097267270097e-01 +2 1 2 2 1.982531323202786133e+00 +2 1 2 3 -9.999999994826241911e-01 +2 1 3 3 1.982531323202795903e+00 +2 2 1 1 5.173765593365239165e-10 +2 3 1 1 1.360501509726726788e+00 +2 4 1 1 1.360501509726715019e+00 +2 5 1 1 5.173764285270454239e-10 +*** END *** +*** REQUEST *** +"" +1 +1 +2 +0.10485760000000000000e7 +0 1 2 2 -0.10485760000000000000e7 +1 1 1 1 0.10485760000000000000e7 +1 1 2 2 0.10485760000000000000e7 +*** ANSWER *** +-1.257428932280705548e-10 +1 1 1 1 4.067801944678135183e-18 +1 1 2 2 1.048576000000000000e+06 +2 1 1 1 1.000000000000000000e+00 +2 1 2 2 8.401557020587951909e-24 +*** END *** +*** REQUEST *** +"" +2 +2 +3 1 +0.13107200000000000000e6 0.18350080000000000000e7 +0 1 1 2 -0.13107200000000000000e6 +0 1 3 3 0.26214400000000000000e6 +0 2 1 1 0.26214400000000000000e6 +1 1 1 1 0.78643200000000000000e6 +1 1 1 2 0.13107200000000000000e6 +1 1 3 3 -0.26214400000000000000e6 +1 2 1 1 -0.26214400000000000000e6 +2 1 1 2 -0.52428800000000000000e6 +2 1 1 3 0.78643200000000000000e6 +2 1 2 2 0.15728640000000000000e7 +2 1 3 3 0.10485760000000000000e7 +2 2 1 1 0.10485760000000000000e7 +*** ANSWER *** +3.613357717503612232e+00 2.020964573331731629e+00 +1 1 1 1 2.841660136565609369e+06 +1 1 1 2 -4.548854514743133914e+05 +1 1 1 3 1.589351211334420368e+06 +1 1 2 2 3.178702422742649447e+06 +1 1 3 3 9.097709030224352609e+05 +1 2 1 1 9.097709030224352609e+05 +2 1 1 1 5.484476919375828707e+00 +2 1 1 2 7.848738718408612147e-01 +2 1 1 3 -9.581275765048838267e+00 +2 1 2 2 1.123219262971843352e-01 +2 1 2 3 -1.371159568595501810e+00 +2 1 3 3 1.673830461842008077e+01 +2 2 1 1 1.154826371740193283e-08 +*** END *** +*** REQUEST *** +"" +6 +5 +5 1 1 1 1 +0.10485760000000000000e7 -0.10485760000000000000e7 0.0 -0.10485760000000000000e7 0.52428800000000000000e6 0.52428800000000000000e6 +0 1 2 3 -0.26214400000000000000e6 +0 1 4 5 0.26214400000000000000e6 +0 2 1 1 -0.52428800000000000000e6 +1 1 1 1 0.52428800000000000000e6 +1 1 2 3 0.26214400000000000000e6 +1 1 4 5 -0.26214400000000000000e6 +1 2 1 1 0.52428800000000000000e6 +2 1 1 2 0.52428800000000000000e6 +2 4 1 1 -0.10485760000000000000e7 +3 1 2 4 0.52428800000000000000e6 +3 1 3 5 0.52428800000000000000e6 +4 1 2 2 -0.52428800000000000000e6 +4 1 2 3 -0.52428800000000000000e6 +4 1 3 3 -0.52428800000000000000e6 +4 1 4 4 0.52428800000000000000e6 +4 1 4 5 0.52428800000000000000e6 +4 1 5 5 0.52428800000000000000e6 +4 2 1 1 -0.10485760000000000000e7 +5 1 1 3 -0.26214400000000000000e6 +5 3 1 1 0.52428800000000000000e6 +6 1 2 3 -0.26214400000000000000e6 +6 5 1 1 0.52428800000000000000e6 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +26 +7 +5 1 5 1 5 1 1 +-0.52428800000000000000e6 0.0 0.10485760000000000000e7 0.10485760000000000000e7 0.52428800000000000000e6 0.0 0.0 0.0 -0.52428800000000000000e6 0.10485760000000000000e7 -0.10485760000000000000e7 0.0 0.0 0.52428800000000000000e6 0.0 0.10485760000000000000e7 0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 +0 1 4 5 0.26214400000000000000e6 +0 2 1 1 -0.52428800000000000000e6 +0 3 1 2 -0.26214400000000000000e6 +1 3 4 5 -0.26214400000000000000e6 +1 5 4 4 -0.52428800000000000000e6 +2 3 3 5 -0.26214400000000000000e6 +2 5 3 4 -0.26214400000000000000e6 +3 1 1 1 0.52428800000000000000e6 +3 1 4 5 -0.26214400000000000000e6 +3 2 1 1 0.52428800000000000000e6 +3 3 1 2 0.26214400000000000000e6 +4 1 1 3 0.52428800000000000000e6 +4 3 2 3 0.52428800000000000000e6 +4 3 4 5 -0.52428800000000000000e6 +4 4 1 1 0.10485760000000000000e7 +5 1 2 2 0.52428800000000000000e6 +5 5 1 2 -0.26214400000000000000e6 +6 1 2 3 0.52428800000000000000e6 +6 3 1 2 -0.52428800000000000000e6 +7 1 2 4 0.52428800000000000000e6 +7 5 1 4 -0.52428800000000000000e6 +8 1 3 5 0.52428800000000000000e6 +8 5 1 4 0.52428800000000000000e6 +9 1 3 3 -0.52428800000000000000e6 +9 1 4 4 0.52428800000000000000e6 +9 1 4 5 0.52428800000000000000e6 +9 1 5 5 0.52428800000000000000e6 +9 2 1 1 -0.10485760000000000000e7 +9 3 1 2 -0.52428800000000000000e6 +9 5 1 2 -0.26214400000000000000e6 +10 3 1 1 0.52428800000000000000e6 +10 3 2 3 0.26214400000000000000e6 +10 3 4 5 -0.26214400000000000000e6 +10 4 1 1 0.52428800000000000000e6 +11 1 3 3 -0.10485760000000000000e7 +11 3 1 3 0.52428800000000000000e6 +12 1 3 4 -0.52428800000000000000e6 +12 3 1 4 0.52428800000000000000e6 +13 3 1 5 0.52428800000000000000e6 +13 5 1 4 0.52428800000000000000e6 +14 3 2 2 0.52428800000000000000e6 +14 5 2 3 -0.26214400000000000000e6 +15 3 2 4 0.52428800000000000000e6 +15 5 3 4 -0.52428800000000000000e6 +16 3 2 3 0.52428800000000000000e6 +16 3 3 3 0.52428800000000000000e6 +16 3 4 4 -0.52428800000000000000e6 +16 3 4 5 -0.52428800000000000000e6 +16 4 1 1 0.10485760000000000000e7 +16 5 2 3 0.26214400000000000000e6 +16 5 4 5 0.26214400000000000000e6 +17 3 5 5 0.52428800000000000000e6 +17 5 4 5 0.26214400000000000000e6 +18 1 1 2 -0.26214400000000000000e6 +18 5 1 1 0.52428800000000000000e6 +19 3 1 2 -0.52428800000000000000e6 +19 5 1 3 0.52428800000000000000e6 +20 1 2 5 -0.52428800000000000000e6 +20 5 1 5 0.52428800000000000000e6 +21 3 2 5 0.52428800000000000000e6 +21 5 2 4 0.52428800000000000000e6 +22 3 2 3 -0.26214400000000000000e6 +22 5 3 3 0.52428800000000000000e6 +23 3 2 5 -0.52428800000000000000e6 +23 5 3 5 0.52428800000000000000e6 +24 1 1 2 0.52428800000000000000e6 +24 3 2 3 -0.26214400000000000000e6 +24 5 2 2 -0.52428800000000000000e6 +24 5 4 4 0.52428800000000000000e6 +24 5 5 5 0.52428800000000000000e6 +25 1 1 2 0.26214400000000000000e6 +25 5 2 3 0.26214400000000000000e6 +25 5 4 5 -0.26214400000000000000e6 +25 6 1 1 0.52428800000000000000e6 +26 3 1 2 -0.26214400000000000000e6 +26 7 1 1 0.52428800000000000000e6 +*** ANSWER *** +-2.407966087193593921e+04 0.000000000000000000e+00 -2.515183679091201154e-07 -2.842639018100695663e-13 -2.879558028048280592e-07 1.366185284865987600e-18 0.000000000000000000e+00 0.000000000000000000e+00 2.499997931300196319e-01 2.407966087161147516e+04 -1.249997525622945360e-01 0.000000000000000000e+00 0.000000000000000000e+00 2.407970831219343381e+04 0.000000000000000000e+00 3.244426528789246878e-07 2.407966090559299482e+04 2.407966090559282748e+04 4.566473088503993495e+03 0.000000000000000000e+00 0.000000000000000000e+00 2.407961346375886933e+04 0.000000000000000000e+00 -3.244426523824069972e-07 2.407966090624171193e+04 2.804141880232624562e-02 +1 1 1 1 3.823342680927366288e-02 +1 1 1 2 -1.492753654019907117e-07 +1 1 1 3 -1.490361525521977528e-07 +1 1 2 2 1.912971694267273648e-02 +1 1 2 3 7.162745506318189066e-13 +1 1 3 3 1.910369769872510837e-02 +1 1 4 4 1.310720616420406150e+05 +1 1 4 5 -1.310720425254172296e+05 +1 1 5 5 1.310720616420406150e+05 +1 2 1 1 2.621442551523233415e+05 +1 3 1 1 1.262467723922553825e+10 +1 3 1 2 -2.394023321472746849e+09 +1 3 1 3 -6.553587027138027770e+04 +1 3 2 2 1.262470211175337219e+10 +1 3 2 3 1.242793926587354508e+04 +1 3 3 3 3.402028784761961244e-01 +1 3 4 4 9.929102479564059288e-08 +1 3 4 5 -8.504542783967138087e-02 +1 3 5 5 1.262467725704164124e+10 +1 4 1 1 1.262467723956574059e+10 +1 5 1 1 1.262467725704155350e+10 +1 5 1 2 -6.553587028438989364e+04 +1 5 1 3 2.394147042625581741e+09 +1 5 2 2 3.402028782158778575e-01 +1 5 2 3 -1.242710075751828117e+04 +1 5 3 3 1.262465238385731125e+10 +1 5 4 4 1.262467723922554970e+10 +1 5 4 5 -8.500644075229502050e-02 +1 5 5 5 9.955134307289318317e-08 +1 6 1 1 1.262467725738175583e+10 +1 7 1 1 1.470194948252290487e+04 +2 1 1 1 3.853100919593825238e+05 +2 1 1 2 2.999996582131709388e+00 +2 1 1 3 2.999996508100513992e+00 +2 1 2 2 7.706370786054617492e+05 +2 1 2 3 -5.198656463082483247e-06 +2 1 3 3 7.705975135539248586e+05 +2 1 4 4 3.853082041203107219e+05 +2 1 4 5 3.853081480373177328e+05 +2 1 5 5 3.853082041203107219e+05 +2 2 1 1 5.608313379495610818e-02 +2 3 1 1 3.999996508159969988e+00 +2 3 1 2 -5.198644269985543213e-06 +2 3 1 3 7.705965135539248586e+05 +2 3 2 2 1.158544932152836025e-06 +2 3 2 3 -9.999988371191370629e-01 +2 3 3 3 1.484549187156735535e+11 +2 3 4 4 1.484549187096735535e+11 +2 3 4 5 9.999988354913454947e-01 +2 3 5 5 1.164483886951501567e-06 +2 4 1 1 1.164477140899342430e-06 +2 5 1 1 3.999995172203226090e+00 +2 5 1 2 7.706360786054619821e+05 +2 5 1 3 -5.198644269955297360e-06 +2 5 2 2 1.484702121866084595e+11 +2 5 2 3 -9.999988414640728074e-01 +2 5 3 3 1.162859125907679845e-06 +2 5 4 4 1.164483876263473820e-06 +2 5 4 5 9.999988354864500772e-01 +2 5 5 5 1.484702121806084290e+11 +2 6 1 1 1.164477150884271844e-06 +2 7 1 1 9.999948013557298232e-01 +*** END *** +*** REQUEST *** +"" +143 +8 +15 5 5 1 5 1 5 1 +0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.10485760000000000000e7 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.26214400000000000000e6 -0.52428800000000000000e6 0.0 0.0 -0.52428800000000000000e6 0.0 0.0 0.52428800000000000000e6 0.26214400000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.26214400000000000000e6 0.0 0.26214400000000000000e6 0.26214400000000000000e6 0.26214400000000000000e6 0.26214400000000000000e6 -0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.26214400000000000000e6 0.0 0.0 0.26214400000000000000e6 0.0 0.26214400000000000000e6 0.26214400000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.78643200000000000000e6 0.0 0.0 0.26214400000000000000e6 0.0 0.26214400000000000000e6 0.26214400000000000000e6 +0 1 1 6 0.65536000000000000000e5 +0 1 1 10 -0.65536000000000000000e5 +0 1 3 14 0.65536000000000000000e5 +0 1 5 6 0.65536000000000000000e5 +0 1 8 9 -0.65536000000000000000e5 +0 1 14 15 -0.65536000000000000000e5 +0 2 2 2 -0.13107200000000000000e6 +0 2 5 5 0.13107200000000000000e6 +0 7 2 3 0.13107200000000000000e6 +0 7 4 5 -0.13107200000000000000e6 +0 8 1 1 0.26214400000000000000e6 +1 2 1 1 0.52428800000000000000e6 +1 2 2 2 -0.26214400000000000000e6 +1 2 3 3 -0.26214400000000000000e6 +1 2 4 4 0.26214400000000000000e6 +1 2 5 5 0.26214400000000000000e6 +2 1 1 8 0.13107200000000000000e6 +2 1 1 12 0.26214400000000000000e6 +2 1 3 12 -0.13107200000000000000e6 +2 1 4 11 0.13107200000000000000e6 +2 1 5 8 0.13107200000000000000e6 +2 1 12 15 0.13107200000000000000e6 +2 1 13 14 -0.13107200000000000000e6 +2 2 2 4 0.13107200000000000000e6 +2 2 3 5 0.13107200000000000000e6 +3 1 4 11 0.26214400000000000000e6 +3 1 5 12 -0.13107200000000000000e6 +3 1 6 13 -0.13107200000000000000e6 +3 1 8 15 -0.13107200000000000000e6 +3 1 10 13 0.13107200000000000000e6 +4 1 1 8 -0.13107200000000000000e6 +4 1 5 8 -0.13107200000000000000e6 +4 1 13 14 -0.13107200000000000000e6 +4 2 2 4 -0.13107200000000000000e6 +5 1 6 15 -0.13107200000000000000e6 +5 7 4 5 -0.13107200000000000000e6 +6 1 3 14 -0.13107200000000000000e6 +6 1 12 13 -0.13107200000000000000e6 +7 1 4 15 -0.13107200000000000000e6 +7 1 8 11 -0.13107200000000000000e6 +8 1 1 8 0.26214400000000000000e6 +8 1 3 8 -0.13107200000000000000e6 +8 1 8 15 0.13107200000000000000e6 +8 1 10 13 -0.13107200000000000000e6 +8 7 3 4 -0.13107200000000000000e6 +9 1 1 6 -0.13107200000000000000e6 +9 1 5 6 -0.13107200000000000000e6 +9 1 8 9 -0.13107200000000000000e6 +9 2 3 3 -0.26214400000000000000e6 +10 1 3 10 -0.13107200000000000000e6 +10 7 4 5 -0.13107200000000000000e6 +11 1 1 2 0.26214400000000000000e6 +11 1 2 3 -0.13107200000000000000e6 +11 1 11 12 0.13107200000000000000e6 +11 3 2 3 -0.13107200000000000000e6 +11 3 4 5 -0.13107200000000000000e6 +12 1 6 13 -0.13107200000000000000e6 +12 7 3 4 -0.13107200000000000000e6 +13 1 4 11 0.13107200000000000000e6 +13 1 5 8 -0.13107200000000000000e6 +13 1 13 14 -0.13107200000000000000e6 +13 2 3 5 0.13107200000000000000e6 +14 1 2 9 -0.13107200000000000000e6 +14 1 4 13 -0.13107200000000000000e6 +15 1 3 8 -0.13107200000000000000e6 +15 1 5 12 -0.13107200000000000000e6 +16 1 2 9 0.26214400000000000000e6 +16 1 2 13 -0.13107200000000000000e6 +16 1 7 10 -0.13107200000000000000e6 +16 1 7 14 -0.26214400000000000000e6 +16 1 11 14 -0.13107200000000000000e6 +16 2 1 4 0.26214400000000000000e6 +16 3 3 4 0.13107200000000000000e6 +17 1 1 8 -0.13107200000000000000e6 +17 1 4 11 -0.13107200000000000000e6 +18 1 1 1 0.26214400000000000000e6 +18 1 1 6 -0.65536000000000000000e5 +18 1 1 10 0.65536000000000000000e5 +18 1 3 14 -0.65536000000000000000e5 +18 1 5 6 -0.65536000000000000000e5 +18 1 8 9 0.65536000000000000000e5 +18 1 14 15 0.65536000000000000000e5 +18 2 2 2 0.13107200000000000000e6 +18 2 5 5 -0.13107200000000000000e6 +18 7 2 3 -0.13107200000000000000e6 +18 7 4 5 0.13107200000000000000e6 +18 8 1 1 -0.26214400000000000000e6 +19 1 1 3 0.26214400000000000000e6 +19 1 3 14 -0.26214400000000000000e6 +19 1 5 6 -0.26214400000000000000e6 +19 1 8 9 0.26214400000000000000e6 +19 1 12 13 0.26214400000000000000e6 +19 2 2 2 0.52428800000000000000e6 +19 7 2 3 -0.52428800000000000000e6 +19 7 4 5 0.52428800000000000000e6 +19 8 1 1 -0.10485760000000000000e7 +20 1 1 5 0.26214400000000000000e6 +20 7 2 3 0.26214400000000000000e6 +20 7 4 5 -0.26214400000000000000e6 +20 8 1 1 0.52428800000000000000e6 +21 1 1 7 0.26214400000000000000e6 +21 1 2 9 0.26214400000000000000e6 +21 1 7 14 -0.26214400000000000000e6 +21 2 1 4 0.26214400000000000000e6 +22 1 1 9 0.26214400000000000000e6 +22 1 4 7 -0.26214400000000000000e6 +23 1 1 11 0.26214400000000000000e6 +23 1 2 13 0.26214400000000000000e6 +23 1 11 14 -0.26214400000000000000e6 +23 2 1 5 0.26214400000000000000e6 +24 1 1 13 0.26214400000000000000e6 +24 1 4 11 -0.26214400000000000000e6 +25 1 1 6 -0.13107200000000000000e6 +25 1 1 10 0.13107200000000000000e6 +25 1 1 14 0.26214400000000000000e6 +25 1 3 14 -0.13107200000000000000e6 +25 1 5 6 -0.13107200000000000000e6 +25 1 8 9 0.13107200000000000000e6 +25 1 14 15 0.13107200000000000000e6 +25 2 1 1 -0.52428800000000000000e6 +25 2 2 2 0.26214400000000000000e6 +25 2 5 5 -0.26214400000000000000e6 +26 1 1 15 0.26214400000000000000e6 +26 1 12 13 0.26214400000000000000e6 +26 1 14 15 -0.26214400000000000000e6 +26 2 5 5 0.52428800000000000000e6 +27 1 2 2 0.26214400000000000000e6 +27 1 3 14 -0.13107200000000000000e6 +27 1 5 6 -0.13107200000000000000e6 +27 1 8 9 0.13107200000000000000e6 +27 1 12 13 0.13107200000000000000e6 +27 2 2 2 0.26214400000000000000e6 +27 7 2 3 -0.26214400000000000000e6 +27 7 4 5 0.26214400000000000000e6 +27 8 1 1 -0.52428800000000000000e6 +28 1 2 4 0.26214400000000000000e6 +28 7 2 3 0.26214400000000000000e6 +28 7 4 5 -0.26214400000000000000e6 +28 8 1 1 0.52428800000000000000e6 +29 1 2 5 0.26214400000000000000e6 +29 7 1 2 -0.26214400000000000000e6 +30 1 2 6 0.26214400000000000000e6 +30 3 2 3 -0.26214400000000000000e6 +31 1 1 8 -0.26214400000000000000e6 +31 1 2 7 0.26214400000000000000e6 +32 1 2 8 0.26214400000000000000e6 +32 1 2 9 0.52428800000000000000e6 +32 1 7 10 -0.26214400000000000000e6 +32 1 7 14 -0.52428800000000000000e6 +32 1 11 14 -0.26214400000000000000e6 +32 2 1 4 0.52428800000000000000e6 +32 3 3 4 0.26214400000000000000e6 +33 1 1 2 0.52428800000000000000e6 +33 1 2 3 -0.26214400000000000000e6 +33 1 2 10 0.26214400000000000000e6 +33 1 11 12 0.26214400000000000000e6 +33 3 2 3 -0.26214400000000000000e6 +34 1 1 12 -0.26214400000000000000e6 +34 1 2 11 0.26214400000000000000e6 +35 1 2 12 0.26214400000000000000e6 +35 5 2 5 -0.26214400000000000000e6 +36 1 2 14 0.26214400000000000000e6 +36 1 8 11 -0.26214400000000000000e6 +37 1 2 15 0.26214400000000000000e6 +37 1 11 12 -0.26214400000000000000e6 +38 1 3 3 0.26214400000000000000e6 +38 1 3 10 -0.13107200000000000000e6 +38 1 3 14 -0.26214400000000000000e6 +38 1 5 6 -0.26214400000000000000e6 +38 1 8 9 0.26214400000000000000e6 +38 1 12 12 -0.26214400000000000000e6 +38 1 12 13 0.26214400000000000000e6 +38 2 2 2 0.52428800000000000000e6 +38 7 2 3 -0.39321600000000000000e6 +38 7 4 5 0.52428800000000000000e6 +38 8 1 1 -0.10485760000000000000e7 +39 1 3 4 0.26214400000000000000e6 +39 7 1 2 -0.26214400000000000000e6 +40 1 3 5 0.26214400000000000000e6 +40 1 5 6 0.26214400000000000000e6 +40 1 8 9 -0.26214400000000000000e6 +40 1 12 13 -0.26214400000000000000e6 +40 7 2 3 0.52428800000000000000e6 +40 7 4 5 -0.52428800000000000000e6 +40 8 1 1 0.10485760000000000000e7 +41 1 3 6 0.26214400000000000000e6 +41 7 2 3 -0.26214400000000000000e6 +42 1 2 9 0.52428800000000000000e6 +42 1 3 7 0.26214400000000000000e6 +42 1 7 10 -0.26214400000000000000e6 +42 1 7 14 -0.52428800000000000000e6 +42 1 11 14 -0.26214400000000000000e6 +42 2 1 4 0.52428800000000000000e6 +42 3 3 4 0.26214400000000000000e6 +43 1 3 9 0.26214400000000000000e6 +43 1 5 8 -0.26214400000000000000e6 +44 1 3 11 0.26214400000000000000e6 +44 5 2 5 -0.26214400000000000000e6 +45 1 3 13 0.26214400000000000000e6 +45 1 5 12 -0.26214400000000000000e6 +46 1 3 15 0.26214400000000000000e6 +46 1 12 12 -0.52428800000000000000e6 +47 1 1 6 -0.13107200000000000000e6 +47 1 4 4 0.26214400000000000000e6 +48 1 4 5 0.26214400000000000000e6 +48 3 2 3 -0.26214400000000000000e6 +49 1 2 9 -0.26214400000000000000e6 +49 1 4 8 0.26214400000000000000e6 +50 1 4 9 0.26214400000000000000e6 +50 3 3 4 -0.26214400000000000000e6 +51 1 1 4 0.52428800000000000000e6 +51 1 4 6 -0.26214400000000000000e6 +51 1 4 10 0.26214400000000000000e6 +51 1 4 15 0.26214400000000000000e6 +51 7 1 2 -0.26214400000000000000e6 +52 1 2 13 -0.26214400000000000000e6 +52 1 4 12 0.26214400000000000000e6 +53 1 4 14 0.26214400000000000000e6 +53 3 4 5 -0.26214400000000000000e6 +54 1 5 5 0.26214400000000000000e6 +54 7 2 3 -0.13107200000000000000e6 +55 1 2 9 -0.26214400000000000000e6 +55 1 5 7 0.26214400000000000000e6 +56 1 5 9 0.26214400000000000000e6 +56 7 3 4 -0.26214400000000000000e6 +57 1 5 10 0.26214400000000000000e6 +57 1 8 9 -0.26214400000000000000e6 +58 1 2 13 -0.26214400000000000000e6 +58 1 5 11 0.26214400000000000000e6 +59 1 4 11 0.26214400000000000000e6 +59 1 5 13 0.26214400000000000000e6 +59 1 13 14 -0.26214400000000000000e6 +59 2 3 5 0.26214400000000000000e6 +60 1 5 14 0.26214400000000000000e6 +60 7 4 5 -0.26214400000000000000e6 +61 1 5 15 0.26214400000000000000e6 +61 1 12 13 -0.26214400000000000000e6 +62 1 6 7 0.26214400000000000000e6 +62 3 3 4 -0.26214400000000000000e6 +63 1 6 8 0.26214400000000000000e6 +63 7 3 4 -0.26214400000000000000e6 +64 1 1 6 0.52428800000000000000e6 +64 1 6 6 -0.52428800000000000000e6 +64 1 6 10 0.26214400000000000000e6 +64 1 6 15 0.26214400000000000000e6 +64 7 2 3 -0.26214400000000000000e6 +65 1 4 13 -0.26214400000000000000e6 +65 1 6 11 0.26214400000000000000e6 +66 1 4 11 0.26214400000000000000e6 +66 1 6 12 0.26214400000000000000e6 +66 1 13 14 -0.26214400000000000000e6 +66 2 3 5 0.26214400000000000000e6 +67 1 1 6 -0.26214400000000000000e6 +67 1 5 6 -0.26214400000000000000e6 +67 1 6 14 0.26214400000000000000e6 +67 2 3 3 -0.52428800000000000000e6 +68 1 1 10 -0.13107200000000000000e6 +68 1 7 7 0.26214400000000000000e6 +69 1 1 2 0.52428800000000000000e6 +69 1 2 3 -0.26214400000000000000e6 +69 1 7 8 0.26214400000000000000e6 +69 1 11 12 0.26214400000000000000e6 +69 3 2 3 -0.26214400000000000000e6 +70 1 1 4 0.52428800000000000000e6 +70 1 4 6 -0.26214400000000000000e6 +70 1 4 15 0.26214400000000000000e6 +70 1 7 9 0.26214400000000000000e6 +70 7 1 2 -0.26214400000000000000e6 +71 1 1 6 -0.13107200000000000000e6 +71 1 1 10 0.13107200000000000000e6 +71 1 3 14 -0.13107200000000000000e6 +71 1 5 6 -0.13107200000000000000e6 +71 1 7 11 0.26214400000000000000e6 +71 1 8 9 0.13107200000000000000e6 +71 1 14 15 0.13107200000000000000e6 +71 2 1 1 -0.52428800000000000000e6 +71 2 2 2 0.26214400000000000000e6 +71 2 5 5 -0.26214400000000000000e6 +72 1 7 12 0.26214400000000000000e6 +72 1 8 11 -0.26214400000000000000e6 +73 1 7 13 0.26214400000000000000e6 +73 3 4 5 -0.26214400000000000000e6 +74 1 7 15 0.26214400000000000000e6 +74 1 11 14 -0.26214400000000000000e6 +75 1 3 10 -0.13107200000000000000e6 +75 1 8 8 0.26214400000000000000e6 +76 1 1 8 0.52428800000000000000e6 +76 1 3 8 -0.26214400000000000000e6 +76 1 8 10 0.26214400000000000000e6 +76 1 8 15 0.26214400000000000000e6 +76 7 3 4 -0.26214400000000000000e6 +77 1 3 14 -0.26214400000000000000e6 +77 1 8 12 0.26214400000000000000e6 +78 1 8 13 0.26214400000000000000e6 +78 7 4 5 -0.26214400000000000000e6 +79 1 1 8 -0.26214400000000000000e6 +79 1 5 8 -0.26214400000000000000e6 +79 1 8 14 0.26214400000000000000e6 +79 2 2 4 -0.26214400000000000000e6 +80 1 1 6 0.26214400000000000000e6 +80 1 6 6 -0.26214400000000000000e6 +80 1 6 15 0.13107200000000000000e6 +80 1 9 9 0.26214400000000000000e6 +80 7 2 3 -0.13107200000000000000e6 +81 1 4 7 0.52428800000000000000e6 +81 1 5 8 -0.26214400000000000000e6 +81 1 6 9 -0.26214400000000000000e6 +81 1 9 10 0.26214400000000000000e6 +81 1 13 14 0.26214400000000000000e6 +82 1 9 11 0.26214400000000000000e6 +82 3 4 5 -0.26214400000000000000e6 +83 1 9 12 0.26214400000000000000e6 +83 7 4 5 -0.26214400000000000000e6 +84 1 1 6 -0.26214400000000000000e6 +84 1 5 6 -0.26214400000000000000e6 +84 1 9 13 0.26214400000000000000e6 +84 2 3 3 -0.52428800000000000000e6 +85 1 9 14 0.26214400000000000000e6 +85 1 10 13 -0.26214400000000000000e6 +86 1 9 15 0.26214400000000000000e6 +86 1 13 14 -0.26214400000000000000e6 +87 1 1 6 0.26214400000000000000e6 +87 1 1 10 0.26214400000000000000e6 +87 1 3 10 -0.13107200000000000000e6 +87 1 6 6 -0.26214400000000000000e6 +87 1 6 15 0.13107200000000000000e6 +87 1 10 10 0.26214400000000000000e6 +87 1 10 15 0.13107200000000000000e6 +87 7 2 3 -0.13107200000000000000e6 +88 1 7 14 -0.26214400000000000000e6 +88 1 10 11 0.26214400000000000000e6 +89 1 1 8 -0.26214400000000000000e6 +89 1 5 8 -0.26214400000000000000e6 +89 1 10 12 0.26214400000000000000e6 +89 2 2 4 -0.26214400000000000000e6 +90 1 1 10 -0.26214400000000000000e6 +90 1 8 9 -0.26214400000000000000e6 +90 1 10 14 0.26214400000000000000e6 +90 2 4 4 -0.52428800000000000000e6 +91 1 11 11 0.26214400000000000000e6 +91 1 12 13 0.13107200000000000000e6 +91 1 14 15 -0.13107200000000000000e6 +91 2 5 5 0.26214400000000000000e6 +92 1 4 15 -0.26214400000000000000e6 +92 1 11 13 0.26214400000000000000e6 +93 1 2 13 -0.52428800000000000000e6 +93 1 4 13 -0.26214400000000000000e6 +93 1 7 14 0.26214400000000000000e6 +93 1 11 14 0.52428800000000000000e6 +93 1 11 15 0.26214400000000000000e6 +93 2 1 5 -0.52428800000000000000e6 +93 5 2 5 -0.26214400000000000000e6 +94 1 8 15 -0.26214400000000000000e6 +94 1 12 14 0.26214400000000000000e6 +95 1 6 15 -0.13107200000000000000e6 +95 1 13 13 0.26214400000000000000e6 +96 1 4 11 0.52428800000000000000e6 +96 1 5 12 -0.26214400000000000000e6 +96 1 6 13 -0.26214400000000000000e6 +96 1 10 13 0.26214400000000000000e6 +96 1 13 15 0.26214400000000000000e6 +97 1 10 15 -0.13107200000000000000e6 +97 1 14 14 0.26214400000000000000e6 +98 1 6 15 -0.13107200000000000000e6 +98 1 10 15 0.13107200000000000000e6 +98 1 12 12 -0.26214400000000000000e6 +98 1 12 13 -0.26214400000000000000e6 +98 1 14 15 0.26214400000000000000e6 +98 1 15 15 0.26214400000000000000e6 +98 2 5 5 -0.52428800000000000000e6 +99 1 1 2 0.26214400000000000000e6 +99 1 8 11 -0.26214400000000000000e6 +99 2 1 2 0.26214400000000000000e6 +99 7 1 2 0.26214400000000000000e6 +100 1 1 4 0.26214400000000000000e6 +100 2 1 3 0.26214400000000000000e6 +100 3 2 3 0.26214400000000000000e6 +100 3 4 5 -0.26214400000000000000e6 +101 2 2 3 0.26214400000000000000e6 +101 8 1 1 -0.52428800000000000000e6 +102 1 1 12 0.26214400000000000000e6 +102 1 5 12 0.26214400000000000000e6 +102 1 8 15 -0.26214400000000000000e6 +102 2 2 5 0.26214400000000000000e6 +103 1 4 7 0.26214400000000000000e6 +103 1 10 13 -0.26214400000000000000e6 +103 2 3 4 0.26214400000000000000e6 +103 7 3 4 0.26214400000000000000e6 +104 1 1 6 0.13107200000000000000e6 +104 1 1 10 -0.13107200000000000000e6 +104 1 3 14 0.13107200000000000000e6 +104 1 5 6 0.13107200000000000000e6 +104 1 8 9 -0.13107200000000000000e6 +104 1 10 15 -0.26214400000000000000e6 +104 1 14 15 -0.13107200000000000000e6 +104 2 1 1 0.52428800000000000000e6 +104 2 2 2 -0.26214400000000000000e6 +104 2 4 5 0.26214400000000000000e6 +104 2 5 5 0.26214400000000000000e6 +104 7 4 5 0.26214400000000000000e6 +105 1 1 4 -0.13107200000000000000e6 +105 3 1 1 0.26214400000000000000e6 +106 3 1 2 0.26214400000000000000e6 +106 7 2 3 0.26214400000000000000e6 +106 7 4 5 -0.26214400000000000000e6 +106 8 1 1 0.52428800000000000000e6 +107 1 1 6 -0.26214400000000000000e6 +107 3 1 3 0.26214400000000000000e6 +108 1 4 7 -0.26214400000000000000e6 +108 3 1 4 0.26214400000000000000e6 +109 1 4 11 -0.26214400000000000000e6 +109 3 1 5 0.26214400000000000000e6 +110 3 2 2 0.26214400000000000000e6 +110 7 1 2 -0.13107200000000000000e6 +111 1 2 9 -0.26214400000000000000e6 +111 3 2 4 0.26214400000000000000e6 +112 1 2 13 -0.26214400000000000000e6 +112 3 2 5 0.26214400000000000000e6 +113 1 4 6 -0.13107200000000000000e6 +113 3 3 3 0.26214400000000000000e6 +114 1 4 13 -0.26214400000000000000e6 +114 3 3 5 0.26214400000000000000e6 +115 1 1 4 0.26214400000000000000e6 +115 1 4 6 -0.13107200000000000000e6 +115 1 4 15 0.13107200000000000000e6 +115 3 4 4 0.26214400000000000000e6 +115 7 1 2 -0.13107200000000000000e6 +116 1 4 15 -0.13107200000000000000e6 +116 3 5 5 0.26214400000000000000e6 +117 1 1 4 0.13107200000000000000e6 +117 3 2 3 0.13107200000000000000e6 +117 3 4 5 -0.13107200000000000000e6 +117 4 1 1 0.26214400000000000000e6 +118 1 1 2 -0.13107200000000000000e6 +118 5 1 1 0.26214400000000000000e6 +119 1 3 14 -0.26214400000000000000e6 +119 1 5 6 -0.26214400000000000000e6 +119 1 8 9 0.26214400000000000000e6 +119 1 12 13 0.26214400000000000000e6 +119 2 2 2 0.52428800000000000000e6 +119 5 1 2 0.26214400000000000000e6 +119 7 2 3 -0.52428800000000000000e6 +119 7 4 5 0.52428800000000000000e6 +119 8 1 1 -0.10485760000000000000e7 +120 5 1 3 0.26214400000000000000e6 +120 7 2 3 0.26214400000000000000e6 +120 7 4 5 -0.26214400000000000000e6 +120 8 1 1 0.52428800000000000000e6 +121 1 1 8 -0.26214400000000000000e6 +121 5 1 4 0.26214400000000000000e6 +122 1 1 12 -0.26214400000000000000e6 +122 5 1 5 0.26214400000000000000e6 +123 1 2 3 -0.13107200000000000000e6 +123 5 2 2 0.26214400000000000000e6 +124 5 2 3 0.26214400000000000000e6 +124 7 1 2 -0.26214400000000000000e6 +125 1 2 9 0.52428800000000000000e6 +125 1 7 10 -0.26214400000000000000e6 +125 1 7 14 -0.52428800000000000000e6 +125 1 11 14 -0.26214400000000000000e6 +125 2 1 4 0.52428800000000000000e6 +125 3 3 4 0.26214400000000000000e6 +125 5 2 4 0.26214400000000000000e6 +126 3 2 3 -0.13107200000000000000e6 +126 5 3 3 0.26214400000000000000e6 +127 1 2 9 -0.26214400000000000000e6 +127 5 3 4 0.26214400000000000000e6 +128 1 2 13 -0.26214400000000000000e6 +128 5 3 5 0.26214400000000000000e6 +129 1 1 2 0.26214400000000000000e6 +129 1 2 3 -0.13107200000000000000e6 +129 1 11 12 0.13107200000000000000e6 +129 3 2 3 -0.13107200000000000000e6 +129 5 4 4 0.26214400000000000000e6 +130 1 8 11 -0.26214400000000000000e6 +130 5 4 5 0.26214400000000000000e6 +131 1 11 12 -0.13107200000000000000e6 +131 5 5 5 0.26214400000000000000e6 +132 1 1 2 0.13107200000000000000e6 +132 1 8 11 -0.13107200000000000000e6 +132 6 1 1 0.26214400000000000000e6 +132 7 1 2 0.13107200000000000000e6 +133 7 1 1 0.26214400000000000000e6 +133 7 2 3 0.13107200000000000000e6 +133 7 4 5 -0.13107200000000000000e6 +133 8 1 1 0.26214400000000000000e6 +134 3 2 3 -0.26214400000000000000e6 +134 7 1 3 0.26214400000000000000e6 +135 1 2 9 -0.26214400000000000000e6 +135 7 1 4 0.26214400000000000000e6 +136 1 2 13 -0.26214400000000000000e6 +136 7 1 5 0.26214400000000000000e6 +137 1 5 6 0.13107200000000000000e6 +137 1 8 9 -0.13107200000000000000e6 +137 1 12 13 -0.13107200000000000000e6 +137 7 2 2 0.26214400000000000000e6 +137 7 2 3 0.26214400000000000000e6 +137 7 4 5 -0.26214400000000000000e6 +137 8 1 1 0.52428800000000000000e6 +138 1 5 8 -0.26214400000000000000e6 +138 7 2 4 0.26214400000000000000e6 +139 1 5 12 -0.26214400000000000000e6 +139 7 2 5 0.26214400000000000000e6 +140 1 5 6 -0.13107200000000000000e6 +140 7 3 3 0.26214400000000000000e6 +141 1 4 11 0.26214400000000000000e6 +141 1 13 14 -0.26214400000000000000e6 +141 2 3 5 0.26214400000000000000e6 +141 7 3 5 0.26214400000000000000e6 +142 1 8 9 -0.13107200000000000000e6 +142 7 4 4 0.26214400000000000000e6 +143 1 12 13 -0.13107200000000000000e6 +143 7 5 5 0.26214400000000000000e6 +*** ANSWER *** +6.294286647536645747e-09 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.106537796471129261e-06 -2.488394047102440998e-01 -1.255858404716137010e-03 0.000000000000000000e+00 -2.488394047718981705e-01 -1.106238863362181908e-06 -1.255700226738438790e-03 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.453076589985191130e-09 -2.986686727397727289e-09 5.607255595610765197e-10 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.472637619967755817e-09 2.986470341099891919e-09 -8.422155601290359614e-09 3.790343505217845215e-10 4.838795638027155830e-12 7.533982313953810210e-13 0.000000000000000000e+00 0.000000000000000000e+00 -9.007454898167269025e-13 0.000000000000000000e+00 0.000000000000000000e+00 -1.078897324007260731e-12 1.900504072298423838e-12 -8.990057452338025058e-09 7.538985572040765235e-13 2.806877853881430736e-10 9.743113741808005874e-10 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.588331930929683045e-09 -8.422155580489586240e-09 4.838377585721945031e-12 0.000000000000000000e+00 0.000000000000000000e+00 1.900991683857507472e-12 0.000000000000000000e+00 -1.079251064365997968e-12 3.468300569079341736e-09 0.000000000000000000e+00 0.000000000000000000e+00 -2.800378614688504393e-10 0.000000000000000000e+00 0.000000000000000000e+00 1.713938707445872878e-09 -2.800377473290150903e-10 0.000000000000000000e+00 0.000000000000000000e+00 -3.588334504895772207e-09 0.000000000000000000e+00 0.000000000000000000e+00 -7.361808630707371498e-10 2.499999864959376594e-01 5.307178942100083344e-04 -9.712560638017259866e-05 -2.499999925918749977e-01 9.712560385089810645e-05 -5.307969832053483460e-04 0.000000000000000000e+00 1.126166395616112156e-06 0.000000000000000000e+00 2.061850063722416633e-07 -1.123795556554809668e-06 0.000000000000000000e+00 2.515596098218197494e-08 0.000000000000000000e+00 9.712560385046996856e-05 -3.773351776194438537e-08 2.062158353198494434e-07 0.000000000000000000e+00 0.000000000000000000e+00 -8.989237093746100747e-09 0.000000000000000000e+00 0.000000000000000000e+00 7.364570502056487314e-10 2.499999864959367157e-01 5.307969832047087751e-04 0.000000000000000000e+00 0.000000000000000000e+00 1.126465328724573736e-06 0.000000000000000000e+00 -4.503687565262329986e-09 -8.989239667870611540e-09 1.061520237417974645e-03 1.061520237427969904e-03 -1.519466723619191349e-02 0.000000000000000000e+00 0.000000000000000000e+00 -7.711320959647504362e-09 1.734519217006710032e-03 5.795289307309052680e-04 -5.804928660193566479e-04 0.000000000000000000e+00 0.000000000000000000e+00 1.936304653293935624e-04 0.000000000000000000e+00 0.000000000000000000e+00 1.942618978932245230e-04 0.000000000000000000e+00 -1.068189039225646526e-08 2.549260457411657075e-09 2.520080203865713934e-09 1.734519216982620795e-03 -5.804928660169242404e-04 5.795289308737774188e-04 0.000000000000000000e+00 0.000000000000000000e+00 1.942618978943159622e-04 -1.939499786562977747e-04 0.000000000000000000e+00 1.936304654263643879e-04 0.000000000000000000e+00 0.000000000000000000e+00 2.549269093236438555e-09 -3.664477199064694352e-12 -1.068189063104075733e-08 2.520080203856396572e-09 6.759668376184013994e-06 1.255787183195007737e-03 0.000000000000000000e+00 0.000000000000000000e+00 4.824818749926907402e-01 0.000000000000000000e+00 0.000000000000000000e+00 4.824818749926875205e-01 0.000000000000000000e+00 1.519693448759851934e-02 1.519693448760285268e-02 +1 1 1 1 2.392149811935147252e-03 +1 1 1 2 -4.938933746167970516e-07 +1 1 1 3 -7.829420054669498225e-04 +1 1 1 4 -4.938890822852532104e-07 +1 1 1 5 1.469908410855788432e-04 +1 1 1 6 -7.829424466844533276e-04 +1 1 1 10 7.828857224402591825e-04 +1 1 1 14 -3.860431162488273810e-04 +1 1 1 15 7.828852810972900672e-04 +1 1 2 2 1.089535563595568635e-03 +1 1 2 3 -9.232051211889223902e-07 +1 1 2 4 9.936158078318268159e-05 +1 1 2 5 1.268461243734990738e-06 +1 1 2 6 1.974988259709107624e-07 +1 1 2 10 -2.361250256825160571e-07 +1 1 2 14 -2.828264601045593570e-07 +1 1 2 15 4.982057395285980185e-07 +1 1 3 3 9.406635007545294247e-04 +1 1 3 4 1.976299833797054362e-07 +1 1 3 5 7.358061881278937788e-05 +1 1 3 6 2.554098808732517892e-04 +1 1 3 10 -2.553594128427913446e-04 +1 1 3 14 -1.929852868740060054e-04 +1 1 3 15 -9.406596857016308322e-04 +1 1 4 4 1.089535569048366570e-03 +1 1 4 5 1.268351653831493558e-06 +1 1 4 6 -9.233328287166112460e-07 +1 1 4 10 4.983335639731424388e-07 +1 1 4 14 -2.829191910171601713e-07 +1 1 4 15 -2.362562393734220334e-07 +1 1 5 5 4.206547305920960156e-03 +1 1 5 6 7.358064875360613086e-05 +1 1 5 10 -7.341024515689032956e-05 +1 1 5 14 4.492987485246908996e-04 +1 1 5 15 -7.341021523581733182e-05 +1 1 6 6 9.406641754328842753e-04 +1 1 6 10 -9.406603604513973094e-04 +1 1 6 14 -1.929853961688153194e-04 +1 1 6 15 -2.553594127226782237e-04 +1 1 7 7 6.553599975734420150e+04 +1 1 7 8 1.391245116597884248e+02 +1 1 7 9 -2.546089495892396570e+01 +1 1 7 11 -6.553599805800447939e+04 +1 1 7 12 2.546089429588983322e+01 +1 1 7 13 -1.391452443653828368e+02 +1 1 8 8 2.985151167339303302e-01 +1 1 8 9 -5.405016231350492223e-02 +1 1 8 11 -1.391245116591391877e+02 +1 1 8 12 5.405016231044491859e-02 +1 1 8 13 -2.945962623775040257e-01 +1 1 9 9 9.891837357253338570e-03 +1 1 9 11 2.546089429577759944e+01 +1 1 9 12 -9.891615280187148959e-03 +1 1 9 13 5.405824393408661249e-02 +1 1 10 10 9.408785528372508311e-04 +1 1 10 14 1.930577969691095810e-04 +1 1 10 15 2.553089521012746541e-04 +1 1 11 11 6.553599975734395412e+04 +1 1 11 12 -2.546089495903559552e+01 +1 1 11 13 1.391452443652151771e+02 +1 1 12 12 9.891837357223464897e-03 +1 1 12 13 -5.405824393576202924e-02 +1 1 13 13 2.985934802547148825e-01 +1 1 14 14 2.116738448432096964e-03 +1 1 14 15 1.930576876281731025e-04 +1 1 15 15 9.408778780459550739e-04 +1 2 1 1 1.310719994425142359e+05 +1 2 1 2 2.782711611176975453e+02 +1 2 1 3 2.782711611203177426e+02 +1 2 2 2 6.523165084135181678e+04 +1 2 2 3 -3.983190847964292971e+03 +1 2 3 3 6.523165084135103825e+04 +1 2 4 4 4.561247006533847292e-03 +1 2 4 5 -2.021476521645835384e-03 +1 2 5 5 4.561247251898548072e-03 +1 3 1 1 4.546971029761285195e+02 +1 3 1 2 1.519200320175224306e+02 +1 3 1 3 -1.521727218697782291e+02 +1 3 2 2 5.076236205643008503e+01 +1 3 2 3 -5.084282319181812682e+01 +1 3 3 3 5.092788831444298836e+01 +1 3 4 4 4.971596465525481012e-04 +1 3 4 5 -9.606851562891506970e-07 +1 3 5 5 3.965626454887946628e-03 +1 4 1 1 3.957977026502398910e-03 +1 5 1 1 4.546971029698136704e+02 +1 5 1 2 -1.521727218691405881e+02 +1 5 1 3 1.519200320549755077e+02 +1 5 2 2 5.092788831472910260e+01 +1 5 2 3 -5.084282320487652385e+01 +1 5 3 3 5.076236208185040510e+01 +1 5 4 4 3.965628718717598145e-03 +1 5 4 5 -9.606207108716152362e-07 +1 5 5 5 4.971595839566786412e-04 +1 6 1 1 3.957977026499956419e-03 +1 7 1 1 1.775303859927922501e+00 +1 7 1 2 3.291970753741088629e+02 +1 7 1 3 3.291970753514721082e+02 +1 7 2 2 1.264797319354370411e+05 +1 7 2 3 -3.983193584352030030e+03 +1 7 3 3 1.264797319354361971e+05 +1 7 4 4 3.983788491670147778e+03 +1 7 4 5 3.983782567820532222e+03 +1 7 5 5 3.983788491671283737e+03 +1 8 1 1 3.957970147309114450e-03 +2 1 1 1 3.498643657399957529e+00 +2 1 1 2 3.824381591863590217e-03 +2 1 1 3 2.665884967064385158e+00 +2 1 1 4 3.824383472684058337e-03 +2 1 1 5 -3.341125031296021120e-01 +2 1 1 6 2.665884980222917644e+00 +2 1 1 10 1.672413137699080843e-01 +2 1 1 14 1.164531183139255299e+00 +2 1 1 15 1.672413169010866230e-01 +2 1 2 2 3.665884963286013765e+00 +2 1 2 3 6.963983413450717919e+00 +2 1 2 4 -3.341125031303757709e-01 +2 1 2 5 -1.789488942313931415e-03 +2 1 2 6 -1.789488841931792616e-03 +2 1 2 10 -2.034888856705246562e-03 +2 1 2 14 2.034892577333385910e-03 +2 1 2 15 6.956580050274761895e+00 +2 1 3 3 1.790172714549032025e+04 +2 1 3 4 -1.789488934191968460e-03 +2 1 3 5 -9.999987594596063678e-01 +2 1 3 6 4.818235583253881075e-06 +2 1 3 10 3.341095037903097920e-01 +2 1 3 14 6.658862644584971902e-01 +2 1 3 15 1.789506127086701235e+04 +2 1 4 4 3.665884984101461352e+00 +2 1 4 5 -1.789488852255202061e-03 +2 1 4 6 6.963983461020362142e+00 +2 1 4 10 6.956580103401244664e+00 +2 1 4 14 2.034894549330962428e-03 +2 1 4 15 -2.034898253957583523e-03 +2 1 5 5 1.000004809743141543e+00 +2 1 5 6 -9.999987764764916021e-01 +2 1 5 10 -6.658862598220751661e-01 +2 1 5 14 -3.341094964771161857e-01 +2 1 5 15 -6.658862647992632722e-01 +2 1 6 6 1.790172699852603182e+04 +2 1 6 10 1.789506112388679685e+04 +2 1 6 14 6.658862627455481853e-01 +2 1 6 15 3.341095030024600621e-01 +2 1 7 7 1.167241313865542196e+00 +2 1 7 8 -2.034887476307589271e-03 +2 1 7 9 6.956580103388556147e+00 +2 1 7 11 1.164531182269887388e+00 +2 1 7 12 2.034892569488281570e-03 +2 1 7 13 2.034895994029002446e-03 +2 1 8 8 1.334109497508226827e+00 +2 1 8 9 -6.658862596988571747e-01 +2 1 8 11 2.034892576324505865e-03 +2 1 8 12 6.658862613704504829e-01 +2 1 8 13 -3.341094964681326496e-01 +2 1 9 9 1.789606112384391963e+04 +2 1 9 11 2.034894513888880433e-03 +2 1 9 12 -3.341095292525158023e-01 +2 1 9 13 6.658862603121541435e-01 +2 1 10 10 1.789502137896070417e+04 +2 1 10 14 -4.986449169947423377e-01 +2 1 10 15 1.039371805597704590e+00 +2 1 11 11 1.167241313942641190e+00 +2 1 11 12 6.956580050318525110e+00 +2 1 11 13 -2.034899746242579618e-03 +2 1 12 12 1.789606127084482068e+04 +2 1 12 13 -6.658862618847045667e-01 +2 1 13 13 1.334109497569975877e+00 +2 1 14 14 2.039371798342295428e+00 +2 1 14 15 -4.986449185597990885e-01 +2 1 15 15 1.789502152592529819e+04 +2 2 1 1 2.865415241756634031e-08 +2 2 1 2 -1.268440904534361850e-10 +2 2 1 3 -1.268440904711101396e-10 +2 2 2 2 5.761827416544871700e-08 +2 2 2 3 2.192673081492659521e-09 +2 2 3 3 5.761827416546904579e-08 +2 2 4 4 1.000000027867002705e+00 +2 2 4 5 2.089501112455152132e-01 +2 2 5 5 1.000000030252353733e+00 +2 3 1 1 1.003824383554072108e+00 +2 3 1 2 -3.341125031531068101e-01 +2 3 1 3 2.665884982126626834e+00 +2 3 2 2 9.982105111865723357e-01 +2 3 2 3 -1.789488850769350254e-03 +2 3 3 3 7.963983460950142756e+00 +2 3 4 4 7.956580103419370609e+00 +2 3 4 5 2.034894549303136162e-03 +2 3 5 5 9.979651019135138412e-01 +2 4 1 1 1.000000000093422159e+00 +2 5 1 1 1.003824381674211619e+00 +2 5 1 2 2.665884971399553827e+00 +2 5 1 3 -3.341125031526671618e-01 +2 5 2 2 7.963983413414531753e+00 +2 5 2 3 -1.789488910875541546e-03 +2 5 3 3 9.982105112782418965e-01 +2 5 4 4 9.979651112929218693e-01 +2 5 4 5 2.034892576079883400e-03 +2 5 5 5 7.956580050355776201e+00 +2 6 1 1 1.000000000093855146e+00 +2 7 1 1 6.658874970090585821e-01 +2 7 1 2 -1.789488942374403008e-03 +2 7 1 3 -1.789488944637369081e-03 +2 7 2 2 4.838353289751110261e-06 +2 7 2 3 4.809565954726498075e-06 +2 7 3 3 4.838353301920561363e-06 +2 7 4 4 3.341101261107413123e-01 +2 7 4 5 -3.341094964882555529e-01 +2 7 5 5 3.341101261129719169e-01 +2 8 1 1 9.999981970781385288e-01 +*** END *** +*** REQUEST *** +"" +1 +4 +1 1 1 1 +0.16384000000000000000e7 +0 1 1 1 0.26214400000000000000e6 +1 1 1 1 0.78643200000000000000e6 +1 2 1 1 0.18350080000000000000e7 +1 3 1 1 0.26214400000000000000e6 +1 4 1 1 0.39321600000000000000e6 +*** ANSWER *** +3.333333330362959201e-01 +1 1 1 1 4.314859080885419772e-04 +1 2 1 1 6.116693334533530287e+05 +1 3 1 1 8.738133392055240984e+04 +1 4 1 1 1.310720005482857814e+05 +2 1 1 1 2.083333333333329040e+00 +2 2 1 1 4.270017825945301006e-17 +2 3 1 1 6.573647156062306478e-15 +2 4 1 1 2.755646794823147941e-15 +*** END *** +*** REQUEST *** +"" +2 +5 +1 1 1 1 1 +0.10485760000000000000e7 0.10485760000000000000e7 +0 1 1 1 0.10485760000000000000e7 +1 1 1 1 -0.10485760000000000000e7 +1 2 1 1 0.10485760000000000000e7 +1 3 1 1 0.10485760000000000000e7 +2 1 1 1 -0.10485760000000000000e7 +2 4 1 1 0.10485760000000000000e7 +2 5 1 1 0.10485760000000000000e7 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +14 +15 +3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +0.26214400000000000000e6 -0.52428800000000000000e6 0.52428800000000000000e6 -0.78643200000000000000e6 -0.52428800000000000000e6 -0.52428800000000000000e6 0.26214400000000000000e6 0.26214400000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.26214400000000000000e6 0.10485760000000000000e7 +0 1 1 2 0.52428800000000000000e6 +0 2 1 1 0.52428800000000000000e6 +0 4 1 1 -0.52428800000000000000e6 +1 1 1 1 0.52428800000000000000e6 +1 1 1 2 -0.52428800000000000000e6 +1 2 1 1 -0.52428800000000000000e6 +1 4 1 1 0.52428800000000000000e6 +2 1 1 3 0.52428800000000000000e6 +2 12 1 1 -0.10485760000000000000e7 +3 1 1 2 -0.26214400000000000000e6 +3 1 2 2 0.52428800000000000000e6 +3 8 1 1 0.52428800000000000000e6 +4 1 1 2 0.26214400000000000000e6 +4 1 3 3 0.52428800000000000000e6 +4 4 1 1 -0.52428800000000000000e6 +4 8 1 1 -0.52428800000000000000e6 +4 12 1 1 -0.10485760000000000000e7 +5 1 1 2 0.52428800000000000000e6 +5 3 1 1 0.52428800000000000000e6 +5 4 1 1 -0.52428800000000000000e6 +5 12 1 1 -0.10485760000000000000e7 +6 1 1 2 0.52428800000000000000e6 +6 2 1 1 0.52428800000000000000e6 +6 4 1 1 -0.10485760000000000000e7 +6 5 1 1 0.52428800000000000000e6 +6 12 1 1 -0.10485760000000000000e7 +7 1 1 2 -0.26214400000000000000e6 +7 2 1 1 -0.52428800000000000000e6 +7 4 1 1 0.52428800000000000000e6 +7 6 1 1 0.52428800000000000000e6 +8 1 1 2 -0.26214400000000000000e6 +8 7 1 1 0.52428800000000000000e6 +9 1 1 2 -0.52428800000000000000e6 +9 2 1 1 -0.52428800000000000000e6 +9 4 1 1 0.52428800000000000000e6 +9 9 1 1 0.52428800000000000000e6 +9 12 1 1 0.52428800000000000000e6 +10 1 1 2 -0.26214400000000000000e6 +10 1 2 3 -0.26214400000000000000e6 +10 2 1 1 -0.52428800000000000000e6 +10 4 1 1 0.52428800000000000000e6 +10 10 1 1 0.52428800000000000000e6 +10 12 1 1 0.52428800000000000000e6 +11 1 1 2 -0.26214400000000000000e6 +11 1 2 3 0.26214400000000000000e6 +11 11 1 1 0.52428800000000000000e6 +12 1 2 3 0.26214400000000000000e6 +12 12 1 1 -0.52428800000000000000e6 +12 13 1 1 0.52428800000000000000e6 +13 1 2 3 -0.26214400000000000000e6 +13 14 1 1 0.52428800000000000000e6 +14 1 1 2 -0.26214400000000000000e6 +14 4 1 1 0.52428800000000000000e6 +14 8 1 1 0.52428800000000000000e6 +14 12 1 1 0.52428800000000000000e6 +14 15 1 1 0.52428800000000000000e6 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +50 +35 +3 1 1 1 1 3 1 1 1 1 3 1 1 1 1 1 3 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 +-0.13107200000000000000e6 -0.26214400000000000000e6 -0.26214400000000000000e6 0.13107200000000000000e6 -0.26214400000000000000e6 -0.26214400000000000000e6 0.0 0.0 0.0 -0.26214400000000000000e6 -0.39321600000000000000e6 -0.26214400000000000000e6 0.26214400000000000000e6 -0.13107200000000000000e6 -0.26214400000000000000e6 -0.13107200000000000000e6 0.0 -0.26214400000000000000e6 0.65536000000000000000e6 -0.39321600000000000000e6 0.26214400000000000000e6 0.13107200000000000000e6 0.39321600000000000000e6 0.26214400000000000000e6 0.0 0.0 0.52428800000000000000e6 0.13107200000000000000e6 0.78643200000000000000e6 0.52428800000000000000e6 -0.13107200000000000000e6 0.52428800000000000000e6 0.65536000000000000000e6 0.0 0.13107200000000000000e6 0.13107200000000000000e6 0.0 -0.26214400000000000000e6 -0.78643200000000000000e6 0.13107200000000000000e6 -0.10485760000000000000e7 -0.65536000000000000000e6 0.26214400000000000000e6 -0.39321600000000000000e6 0.13107200000000000000e6 -0.52428800000000000000e6 0.13107200000000000000e6 0.0 0.39321600000000000000e6 0.52428800000000000000e6 +0 2 1 1 0.26214400000000000000e6 +0 4 1 1 -0.26214400000000000000e6 +0 11 1 2 0.26214400000000000000e6 +0 16 1 1 0.52428800000000000000e6 +1 1 1 1 0.26214400000000000000e6 +1 2 1 1 -0.26214400000000000000e6 +1 4 1 1 0.26214400000000000000e6 +1 11 1 2 -0.26214400000000000000e6 +1 16 1 1 -0.52428800000000000000e6 +2 1 1 2 0.26214400000000000000e6 +2 11 1 2 -0.26214400000000000000e6 +2 16 1 1 -0.52428800000000000000e6 +3 1 1 3 0.26214400000000000000e6 +3 6 1 3 -0.26214400000000000000e6 +3 11 2 3 -0.26214400000000000000e6 +3 32 1 1 -0.52428800000000000000e6 +4 1 2 2 0.26214400000000000000e6 +4 11 1 2 -0.13107200000000000000e6 +5 1 2 3 0.26214400000000000000e6 +5 11 2 3 -0.26214400000000000000e6 +5 32 1 1 -0.52428800000000000000e6 +6 1 3 3 0.26214400000000000000e6 +6 4 1 1 -0.26214400000000000000e6 +6 6 1 3 -0.26214400000000000000e6 +6 11 1 2 0.13107200000000000000e6 +6 11 2 3 -0.26214400000000000000e6 +6 32 1 1 -0.52428800000000000000e6 +7 3 1 1 0.26214400000000000000e6 +7 4 1 1 -0.26214400000000000000e6 +7 6 1 3 -0.26214400000000000000e6 +7 11 1 2 0.26214400000000000000e6 +7 11 2 3 -0.26214400000000000000e6 +7 16 1 1 0.52428800000000000000e6 +7 32 1 1 -0.52428800000000000000e6 +8 2 1 1 0.26214400000000000000e6 +8 4 1 1 -0.52428800000000000000e6 +8 5 1 1 0.26214400000000000000e6 +8 6 1 3 -0.26214400000000000000e6 +8 11 1 2 0.26214400000000000000e6 +8 11 2 3 -0.26214400000000000000e6 +8 16 1 1 0.52428800000000000000e6 +8 32 1 1 -0.52428800000000000000e6 +9 2 1 1 -0.26214400000000000000e6 +9 4 1 1 0.26214400000000000000e6 +9 6 1 1 0.26214400000000000000e6 +9 11 1 2 -0.13107200000000000000e6 +9 16 1 1 -0.26214400000000000000e6 +10 6 1 2 0.26214400000000000000e6 +10 16 1 1 -0.52428800000000000000e6 +11 6 1 3 0.13107200000000000000e6 +11 6 2 2 0.26214400000000000000e6 +11 8 1 1 -0.26214400000000000000e6 +11 16 1 1 -0.52428800000000000000e6 +11 34 1 1 -0.26214400000000000000e6 +12 6 2 3 0.26214400000000000000e6 +12 32 1 1 -0.52428800000000000000e6 +13 6 1 3 -0.13107200000000000000e6 +13 6 3 3 0.26214400000000000000e6 +13 34 1 1 0.26214400000000000000e6 +14 2 1 1 -0.26214400000000000000e6 +14 4 1 1 0.26214400000000000000e6 +14 6 1 3 0.26214400000000000000e6 +14 7 1 1 0.26214400000000000000e6 +14 8 1 1 -0.26214400000000000000e6 +14 11 1 2 -0.13107200000000000000e6 +14 16 1 1 -0.26214400000000000000e6 +15 6 1 3 0.26214400000000000000e6 +15 8 1 1 -0.26214400000000000000e6 +15 9 1 1 0.26214400000000000000e6 +15 16 1 1 -0.52428800000000000000e6 +16 2 1 1 0.26214400000000000000e6 +16 4 1 1 -0.26214400000000000000e6 +16 8 1 1 -0.26214400000000000000e6 +16 10 1 1 0.26214400000000000000e6 +16 11 1 2 0.13107200000000000000e6 +16 16 1 1 -0.26214400000000000000e6 +17 11 1 1 0.26214400000000000000e6 +17 11 1 2 -0.13107200000000000000e6 +17 16 1 1 -0.26214400000000000000e6 +18 11 1 3 0.26214400000000000000e6 +18 11 2 3 -0.26214400000000000000e6 +18 32 1 1 -0.52428800000000000000e6 +19 6 1 3 -0.13107200000000000000e6 +19 8 1 1 0.26214400000000000000e6 +19 11 1 2 -0.13107200000000000000e6 +19 11 2 2 0.26214400000000000000e6 +19 16 1 1 0.52428800000000000000e6 +19 34 1 1 0.26214400000000000000e6 +20 4 1 1 -0.26214400000000000000e6 +20 6 1 3 -0.13107200000000000000e6 +20 11 1 2 0.13107200000000000000e6 +20 11 2 3 -0.26214400000000000000e6 +20 11 3 3 0.26214400000000000000e6 +20 32 1 1 -0.52428800000000000000e6 +20 34 1 1 -0.26214400000000000000e6 +21 4 1 1 -0.26214400000000000000e6 +21 6 1 3 -0.26214400000000000000e6 +21 8 1 1 0.26214400000000000000e6 +21 11 1 2 0.13107200000000000000e6 +21 12 1 1 0.26214400000000000000e6 +21 16 1 1 0.26214400000000000000e6 +22 4 1 1 -0.26214400000000000000e6 +22 6 1 3 -0.26214400000000000000e6 +22 8 1 1 0.26214400000000000000e6 +22 11 1 2 0.26214400000000000000e6 +22 11 2 3 -0.26214400000000000000e6 +22 13 1 1 0.26214400000000000000e6 +22 16 1 1 0.52428800000000000000e6 +22 32 1 1 -0.52428800000000000000e6 +23 4 1 1 -0.26214400000000000000e6 +23 6 1 3 -0.26214400000000000000e6 +23 8 1 1 0.26214400000000000000e6 +23 14 1 1 0.26214400000000000000e6 +23 16 1 1 0.52428800000000000000e6 +24 4 1 1 -0.26214400000000000000e6 +24 6 1 3 -0.26214400000000000000e6 +24 8 1 1 0.26214400000000000000e6 +24 11 1 2 0.13107200000000000000e6 +24 11 2 3 -0.26214400000000000000e6 +24 15 1 1 0.26214400000000000000e6 +24 16 1 1 0.78643200000000000000e6 +24 32 1 1 -0.52428800000000000000e6 +25 2 1 1 -0.26214400000000000000e6 +25 4 1 1 0.26214400000000000000e6 +25 6 1 3 0.13107200000000000000e6 +25 11 1 2 -0.26214400000000000000e6 +25 11 2 3 0.13107200000000000000e6 +25 16 1 1 -0.52428800000000000000e6 +25 17 1 1 0.26214400000000000000e6 +25 32 1 1 0.26214400000000000000e6 +26 11 1 2 -0.26214400000000000000e6 +26 11 2 3 0.26214400000000000000e6 +26 16 1 1 -0.52428800000000000000e6 +26 17 1 2 0.26214400000000000000e6 +26 32 1 1 0.52428800000000000000e6 +27 4 1 1 0.52428800000000000000e6 +27 6 1 3 0.26214400000000000000e6 +27 11 1 2 -0.26214400000000000000e6 +27 11 2 3 0.26214400000000000000e6 +27 17 1 3 0.26214400000000000000e6 +27 32 1 1 0.52428800000000000000e6 +28 11 1 2 -0.13107200000000000000e6 +28 11 2 3 0.13107200000000000000e6 +28 17 2 2 0.26214400000000000000e6 +29 4 1 1 0.52428800000000000000e6 +29 6 1 3 0.26214400000000000000e6 +29 11 1 2 -0.26214400000000000000e6 +29 11 2 3 0.26214400000000000000e6 +29 17 2 3 0.26214400000000000000e6 +29 32 1 1 0.52428800000000000000e6 +29 34 1 1 0.52428800000000000000e6 +30 4 1 1 0.52428800000000000000e6 +30 6 1 3 0.26214400000000000000e6 +30 11 1 2 -0.13107200000000000000e6 +30 11 2 3 0.13107200000000000000e6 +30 17 3 3 0.26214400000000000000e6 +30 20 1 1 -0.26214400000000000000e6 +30 32 1 1 0.52428800000000000000e6 +31 2 1 1 -0.26214400000000000000e6 +31 4 1 1 0.26214400000000000000e6 +31 6 1 3 0.13107200000000000000e6 +31 11 2 3 -0.13107200000000000000e6 +31 18 1 1 0.26214400000000000000e6 +31 20 1 1 -0.26214400000000000000e6 +31 32 1 1 -0.26214400000000000000e6 +32 4 1 1 0.52428800000000000000e6 +32 6 1 3 0.26214400000000000000e6 +32 16 1 1 0.52428800000000000000e6 +32 19 1 1 0.26214400000000000000e6 +32 20 1 1 -0.26214400000000000000e6 +33 2 1 1 0.26214400000000000000e6 +33 4 1 1 0.26214400000000000000e6 +33 6 1 3 0.13107200000000000000e6 +33 11 2 3 0.13107200000000000000e6 +33 16 1 1 0.52428800000000000000e6 +33 20 1 1 -0.26214400000000000000e6 +33 21 1 1 0.26214400000000000000e6 +33 32 1 1 0.26214400000000000000e6 +34 2 1 1 -0.26214400000000000000e6 +34 4 1 1 0.26214400000000000000e6 +34 6 1 3 0.13107200000000000000e6 +34 11 1 2 -0.13107200000000000000e6 +34 16 1 1 -0.26214400000000000000e6 +34 22 1 1 0.26214400000000000000e6 +35 11 1 2 -0.13107200000000000000e6 +35 11 2 3 0.13107200000000000000e6 +35 16 1 1 -0.26214400000000000000e6 +35 23 1 1 0.26214400000000000000e6 +35 32 1 1 0.26214400000000000000e6 +36 16 1 1 -0.26214400000000000000e6 +36 24 1 1 0.26214400000000000000e6 +36 32 1 1 0.26214400000000000000e6 +37 6 1 3 -0.13107200000000000000e6 +37 11 2 3 -0.13107200000000000000e6 +37 25 1 1 0.26214400000000000000e6 +37 32 1 1 -0.26214400000000000000e6 +38 11 2 3 -0.26214400000000000000e6 +38 25 1 2 0.26214400000000000000e6 +38 32 1 1 -0.52428800000000000000e6 +39 4 1 1 -0.52428800000000000000e6 +39 6 1 3 -0.52428800000000000000e6 +39 11 1 2 0.26214400000000000000e6 +39 11 2 3 -0.52428800000000000000e6 +39 25 1 3 0.26214400000000000000e6 +39 32 1 1 -0.10485760000000000000e7 +40 11 2 3 -0.13107200000000000000e6 +40 25 2 2 0.26214400000000000000e6 +41 4 1 1 -0.52428800000000000000e6 +41 6 1 3 -0.26214400000000000000e6 +41 11 1 2 0.26214400000000000000e6 +41 11 2 3 -0.52428800000000000000e6 +41 25 2 3 0.26214400000000000000e6 +41 32 1 1 -0.10485760000000000000e7 +41 34 1 1 -0.52428800000000000000e6 +42 4 1 1 -0.78643200000000000000e6 +42 6 1 3 -0.52428800000000000000e6 +42 11 1 2 0.26214400000000000000e6 +42 11 2 3 -0.39321600000000000000e6 +42 20 1 1 0.26214400000000000000e6 +42 25 3 3 0.26214400000000000000e6 +42 32 1 1 -0.10485760000000000000e7 +43 4 1 1 -0.26214400000000000000e6 +43 6 1 3 -0.13107200000000000000e6 +43 11 2 3 0.13107200000000000000e6 +43 20 1 1 0.26214400000000000000e6 +43 26 1 1 0.26214400000000000000e6 +43 32 1 1 0.26214400000000000000e6 +44 4 1 1 -0.78643200000000000000e6 +44 6 1 3 -0.52428800000000000000e6 +44 11 1 2 0.26214400000000000000e6 +44 11 2 3 -0.26214400000000000000e6 +44 20 1 1 0.26214400000000000000e6 +44 27 1 1 0.26214400000000000000e6 +44 32 1 1 -0.52428800000000000000e6 +45 4 1 1 -0.26214400000000000000e6 +45 20 1 1 0.26214400000000000000e6 +45 28 1 1 0.26214400000000000000e6 +46 4 1 1 -0.78643200000000000000e6 +46 6 1 3 -0.39321600000000000000e6 +46 11 1 2 0.26214400000000000000e6 +46 11 2 3 -0.39321600000000000000e6 +46 20 1 1 0.26214400000000000000e6 +46 29 1 1 0.26214400000000000000e6 +46 32 1 1 -0.78643200000000000000e6 +47 6 1 3 -0.13107200000000000000e6 +47 30 1 1 0.26214400000000000000e6 +48 11 2 3 -0.13107200000000000000e6 +48 31 1 1 0.26214400000000000000e6 +48 32 1 1 -0.26214400000000000000e6 +49 4 1 1 0.26214400000000000000e6 +49 6 1 3 0.13107200000000000000e6 +49 11 1 2 -0.13107200000000000000e6 +49 11 2 3 0.13107200000000000000e6 +49 32 1 1 0.26214400000000000000e6 +49 33 1 1 0.26214400000000000000e6 +50 4 1 1 0.26214400000000000000e6 +50 6 1 3 0.13107200000000000000e6 +50 11 1 2 -0.13107200000000000000e6 +50 11 2 3 0.13107200000000000000e6 +50 32 1 1 0.26214400000000000000e6 +50 34 1 1 0.26214400000000000000e6 +50 35 1 1 0.26214400000000000000e6 +*** ANSWER *** +-1.117311551912126854e-10 -6.918562187353531766e-11 -6.918562187354172831e-11 -5.606942255158590987e-11 -1.804124844461699131e-11 -5.606942255157555719e-11 2.246877607164276695e-10 2.246878250257022656e-10 -8.608220748706603548e-11 -1.282136459907263364e-11 1.257326845310911702e-10 9.371084173077689284e-13 2.581470821132411202e-12 -2.913895703482833746e-11 5.000000040440903959e-01 4.999999949219992024e-01 -4.826789388393659927e-12 -5.125133265795395814e-11 8.844623339748182230e-12 7.239417852894696577e-12 4.999999943085403076e-01 5.000000047744372900e-01 -2.913895249512196263e-11 -2.913895060539063012e-11 -8.608220770576959091e-11 -8.353004068375327670e-11 -1.282136554961661045e-11 2.581469107164137565e-12 9.371115205984922963e-13 1.257326898050772962e-10 -2.913895703481934187e-11 4.999999942773489248e-01 5.000000046887400629e-01 -4.708704148713956828e-11 -4.708704148701290625e-11 1.267553963029740168e-10 -4.826790524963189427e-12 -5.125133214557833099e-11 -1.450676198344538033e-10 7.239420511752831499e-12 -5.283908542704538477e-11 8.844622251811909664e-12 5.000000040752829999e-01 -2.913895249513333636e-11 4.999999950076942645e-01 -2.913895060534916770e-11 -4.708704148703079403e-11 -4.708704148686246278e-11 1.128609403347620731e-10 1.407490056777863843e-10 +1 1 1 1 3.547950595704670290e-05 +1 1 1 2 -1.813659566041604231e-05 +1 1 1 3 -1.813659566041772283e-05 +1 1 2 2 5.007089519812899046e-05 +1 1 2 3 -4.729405032265676569e-06 +1 1 3 3 5.007089519813159254e-05 +1 2 1 1 1.236696903423157266e-04 +1 3 1 1 1.236697062487388237e-04 +1 4 1 1 1.236697062487555204e-04 +1 5 1 1 1.236697231070291950e-04 +1 6 1 1 4.220322370400246808e-05 +1 6 1 2 -3.361043801459296472e-06 +1 6 1 3 -2.189689914650918244e-05 +1 6 2 2 9.772922675721062297e-05 +1 6 2 3 2.456573489467277780e-07 +1 6 3 3 6.544587499042659774e-05 +1 7 1 1 5.713055515055374522e-05 +1 8 1 1 5.713055533457852414e-05 +1 9 1 1 1.310720011249031813e+05 +1 10 1 1 1.310719987336017221e+05 +1 11 1 1 6.350384402606075798e-05 +1 11 1 2 -3.802860650729312803e-05 +1 11 1 3 -1.343522934828668240e-05 +1 11 2 2 6.708772284426682726e-05 +1 11 2 3 -1.385144866953701582e-05 +1 11 3 3 6.666692785712116133e-05 +1 12 1 1 1.310719985727871535e+05 +1 13 1 1 1.310720013163592375e+05 +1 14 1 1 5.713055634061069577e-05 +1 15 1 1 5.713055683599242620e-05 +1 16 1 1 9.435497624663393215e-05 +1 17 1 1 4.220322364667050772e-05 +1 17 1 2 -2.189689898500181897e-05 +1 17 1 3 -3.361044050638696730e-06 +1 17 2 2 6.544587454112020704e-05 +1 17 2 3 2.456581624557711645e-07 +1 17 3 3 9.772922813975444198e-05 +1 18 1 1 5.713055515055613046e-05 +1 19 1 1 1.310719985646105197e+05 +1 20 1 1 5.713055533458893248e-05 +1 21 1 1 1.310720012938942527e+05 +1 22 1 1 5.242557249988694795e-05 +1 23 1 1 5.242557249992034138e-05 +1 24 1 1 9.799732451193886307e-05 +1 25 1 1 6.350384372811592945e-05 +1 25 1 2 -1.343522921397048600e-05 +1 25 1 3 -3.802860613388305781e-05 +1 25 2 2 6.666692855412481404e-05 +1 25 2 3 -1.385144921018738534e-05 +1 25 3 3 6.708772255907091524e-05 +1 26 1 1 1.310720011330801353e+05 +1 27 1 1 5.713055634060766001e-05 +1 28 1 1 1.310719987560661539e+05 +1 29 1 1 5.713055683600315980e-05 +1 30 1 1 5.242557249991557089e-05 +1 31 1 1 5.242557249995980634e-05 +1 32 1 1 1.016656637782401874e-04 +1 33 1 1 9.435497624660791130e-05 +1 34 1 1 9.799732321353823994e-05 +1 35 1 1 1.016656652478901100e-04 +2 1 1 1 2.499999998674311108e+00 +2 1 1 2 9.999999993371549989e-01 +2 1 1 3 9.999999993371553320e-01 +2 1 2 2 1.524132485225649480e+00 +2 1 2 3 4.999999996685783321e-01 +2 1 3 3 1.524132485225650591e+00 +2 2 1 1 5.482649717769852993e-01 +2 3 1 1 5.482649717769849662e-01 +2 4 1 1 5.482649717769864095e-01 +2 5 1 1 5.482649717769932929e-01 +2 6 1 1 1.499999999337152001e+00 +2 6 1 2 -2.413248588849401313e-02 +2 6 1 3 4.999999996685778325e-01 +2 6 2 2 5.034119478263670011e-01 +2 6 2 3 -2.754443326994301250e-02 +2 6 3 3 9.965880518422096657e-01 +2 7 1 1 1.048264971445558080e+00 +2 8 1 1 1.048264971445564964e+00 +2 9 1 1 3.314236450741990138e-10 +2 10 1 1 3.314237398613233690e-10 +2 11 1 1 1.499999999337157330e+00 +2 11 1 2 1.024132485225650591e+00 +2 11 1 3 4.999999996685779990e-01 +2 11 2 2 1.520720537399284922e+00 +2 11 2 3 5.275444329385214903e-01 +2 11 3 3 1.027544433383442035e+00 +2 12 1 1 3.314236896409318322e-10 +2 13 1 1 3.314236720802778569e-10 +2 14 1 1 1.048264971445565852e+00 +2 15 1 1 1.048264971445569627e+00 +2 16 1 1 4.758675141115059071e-01 +2 17 1 1 1.499999999337153556e+00 +2 17 1 2 4.999999996685777770e-01 +2 17 1 3 -2.413248588849620235e-02 +2 17 2 2 9.965880522871284342e-01 +2 17 2 3 -2.754443371485860645e-02 +2 17 3 3 5.034119473814459012e-01 +2 18 1 1 1.048264971445561633e+00 +2 19 1 1 3.314237004346544811e-10 +2 20 1 1 1.048264971445564298e+00 +2 21 1 1 3.314236845008794823e-10 +2 22 1 1 9.999999996685743353e-01 +2 23 1 1 9.999999996685762227e-01 +2 24 1 1 5.034119473814491208e-01 +2 25 1 1 1.499999999337155776e+00 +2 25 1 2 4.999999996685783876e-01 +2 25 1 3 1.024132485225645262e+00 +2 25 2 2 1.027544432938521046e+00 +2 25 2 3 5.275444333834377053e-01 +2 25 3 3 1.520720537844207243e+00 +2 26 1 1 3.314236342804631300e-10 +2 27 1 1 1.048264971445565186e+00 +2 28 1 1 3.314237274407349786e-10 +2 29 1 1 1.048264971445565186e+00 +2 30 1 1 9.999999996685773329e-01 +2 31 1 1 9.999999996685793313e-01 +2 32 1 1 4.724555667300571749e-01 +2 33 1 1 4.758675141115081275e-01 +2 34 1 1 5.034119478263683334e-01 +2 35 1 1 4.724555662851357973e-01 +*** END *** +*** REQUEST *** +"" +1 +5 +1 1 1 1 1 +0.10485760000000000000e7 +0 1 1 1 0.52428800000000000000e6 +1 1 1 1 -0.15728640000000000000e7 +1 2 1 1 0.52428800000000000000e6 +1 3 1 1 0.52428800000000000000e6 +1 4 1 1 0.52428800000000000000e6 +1 5 1 1 0.52428800000000000000e6 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +10 +11 +4 1 1 1 1 1 1 1 1 1 1 +0.65536000000000000000e5 -0.78643200000000000000e6 -0.11796480000000000000e7 0.17694720000000000000e7 -0.11796480000000000000e7 0.58982400000000000000e6 0.19660800000000000000e6 0.58982400000000000000e6 0.0 0.58982400000000000000e6 +0 1 1 2 0.98304000000000000000e5 +0 1 2 3 0.32768000000000000000e5 +0 1 3 3 0.65536000000000000000e5 +0 1 3 4 0.32768000000000000000e5 +0 2 1 1 0.19660800000000000000e6 +0 6 1 1 0.65536000000000000000e5 +0 8 1 1 0.19660800000000000000e6 +1 1 1 1 0.58982400000000000000e6 +1 1 1 2 -0.98304000000000000000e5 +1 1 2 3 -0.32768000000000000000e5 +1 1 3 3 -0.65536000000000000000e5 +1 1 3 4 -0.32768000000000000000e5 +1 2 1 1 -0.19660800000000000000e6 +1 6 1 1 -0.65536000000000000000e5 +1 8 1 1 -0.19660800000000000000e6 +2 1 1 3 0.58982400000000000000e6 +2 1 2 3 -0.19660800000000000000e6 +2 1 3 3 -0.39321600000000000000e6 +2 1 3 4 -0.19660800000000000000e6 +2 6 1 1 -0.39321600000000000000e6 +3 1 1 4 0.58982400000000000000e6 +3 8 1 1 -0.11796480000000000000e7 +4 1 1 2 -0.88473600000000000000e6 +4 1 2 2 0.58982400000000000000e6 +4 1 2 3 0.29491200000000000000e6 +4 4 1 1 0.58982400000000000000e6 +4 10 1 1 0.58982400000000000000e6 +5 1 2 4 0.58982400000000000000e6 +5 10 1 1 -0.11796480000000000000e7 +6 1 1 2 -0.29491200000000000000e6 +6 3 1 1 0.58982400000000000000e6 +7 1 2 3 -0.98304000000000000000e5 +7 1 3 3 -0.19660800000000000000e6 +7 1 3 4 -0.98304000000000000000e5 +7 5 1 1 0.58982400000000000000e6 +7 6 1 1 -0.19660800000000000000e6 +8 1 2 3 -0.29491200000000000000e6 +8 7 1 1 0.58982400000000000000e6 +9 1 3 4 0.29491200000000000000e6 +9 1 4 4 0.58982400000000000000e6 +9 8 1 1 -0.17694720000000000000e7 +9 9 1 1 0.58982400000000000000e6 +9 10 1 1 0.58982400000000000000e6 +10 1 3 4 -0.29491200000000000000e6 +10 11 1 1 0.58982400000000000000e6 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +41 +16 +4 1 4 4 1 4 1 1 1 4 1 1 1 1 1 1 +0.26214400000000000000e6 -0.52428800000000000000e6 -0.52428800000000000000e6 0.0 -0.52428800000000000000e6 -0.52428800000000000000e6 0.26214400000000000000e6 0.0 0.52428800000000000000e6 0.78643200000000000000e6 -0.10485760000000000000e7 0.26214400000000000000e6 0.0 0.10485760000000000000e7 0.10485760000000000000e7 -0.52428800000000000000e6 -0.52428800000000000000e6 -0.52428800000000000000e6 -0.52428800000000000000e6 -0.52428800000000000000e6 -0.52428800000000000000e6 0.26214400000000000000e6 -0.52428800000000000000e6 0.0 0.0 -0.52428800000000000000e6 -0.52428800000000000000e6 -0.52428800000000000000e6 0.78643200000000000000e6 -0.26214400000000000000e6 0.26214400000000000000e6 0.26214400000000000000e6 -0.52428800000000000000e6 0.52428800000000000000e6 -0.52428800000000000000e6 -0.52428800000000000000e6 0.10485760000000000000e7 0.26214400000000000000e6 0.26214400000000000000e6 0.26214400000000000000e6 0.26214400000000000000e6 +0 2 1 1 -0.13107200000000000000e6 +0 8 1 1 -0.13107200000000000000e6 +0 10 1 3 -0.65536000000000000000e5 +0 12 1 1 -0.13107200000000000000e6 +0 16 1 1 0.39321600000000000000e6 +1 1 1 1 0.13107200000000000000e6 +1 2 1 1 0.13107200000000000000e6 +1 8 1 1 0.13107200000000000000e6 +1 10 1 3 0.65536000000000000000e5 +1 12 1 1 0.13107200000000000000e6 +1 16 1 1 -0.39321600000000000000e6 +2 1 1 2 0.13107200000000000000e6 +2 4 1 1 -0.26214400000000000000e6 +3 1 1 3 0.13107200000000000000e6 +3 6 1 1 -0.26214400000000000000e6 +4 1 2 2 0.13107200000000000000e6 +4 3 1 2 0.65536000000000000000e5 +4 4 1 1 -0.39321600000000000000e6 +4 8 1 1 0.13107200000000000000e6 +4 12 1 1 0.13107200000000000000e6 +5 1 2 3 0.13107200000000000000e6 +5 8 1 1 -0.26214400000000000000e6 +6 1 2 4 0.13107200000000000000e6 +6 12 1 1 -0.26214400000000000000e6 +7 1 3 3 0.13107200000000000000e6 +7 6 1 3 -0.65536000000000000000e5 +8 1 3 4 0.13107200000000000000e6 +8 10 1 3 -0.13107200000000000000e6 +9 1 1 4 -0.19660800000000000000e6 +9 1 4 4 0.13107200000000000000e6 +9 3 1 4 0.65536000000000000000e5 +9 10 1 3 0.65536000000000000000e5 +9 12 1 1 0.13107200000000000000e6 +10 1 1 4 0.65536000000000000000e5 +10 2 1 1 0.39321600000000000000e6 +10 3 1 1 0.13107200000000000000e6 +10 4 1 1 0.13107200000000000000e6 +10 6 1 1 0.13107200000000000000e6 +10 8 1 1 0.39321600000000000000e6 +10 10 1 3 0.19660800000000000000e6 +10 12 1 1 0.39321600000000000000e6 +10 16 1 1 -0.11796480000000000000e7 +11 3 1 3 0.13107200000000000000e6 +11 6 1 1 -0.78643200000000000000e6 +11 6 1 3 0.13107200000000000000e6 +11 8 1 1 0.26214400000000000000e6 +11 10 1 3 0.13107200000000000000e6 +12 3 1 2 0.19660800000000000000e6 +12 3 2 2 0.13107200000000000000e6 +12 3 2 3 -0.65536000000000000000e5 +12 4 1 1 -0.11796480000000000000e7 +12 4 2 2 0.13107200000000000000e6 +12 4 3 3 -0.13107200000000000000e6 +12 8 1 1 0.78643200000000000000e6 +12 10 2 2 0.13107200000000000000e6 +12 12 1 1 0.39321600000000000000e6 +12 16 1 1 -0.13107200000000000000e6 +13 3 2 4 0.13107200000000000000e6 +13 4 4 4 0.26214400000000000000e6 +13 10 2 2 0.26214400000000000000e6 +13 12 1 1 -0.78643200000000000000e6 +13 16 1 1 0.26214400000000000000e6 +14 3 3 3 0.13107200000000000000e6 +14 4 3 3 0.13107200000000000000e6 +14 6 1 3 -0.19660800000000000000e6 +14 6 3 3 0.13107200000000000000e6 +14 10 3 3 0.13107200000000000000e6 +15 1 1 4 -0.58982400000000000000e6 +15 3 1 4 0.19660800000000000000e6 +15 3 3 4 -0.65536000000000000000e5 +15 3 4 4 0.13107200000000000000e6 +15 4 4 4 0.13107200000000000000e6 +15 10 1 3 0.39321600000000000000e6 +15 10 3 3 -0.13107200000000000000e6 +15 10 4 4 0.13107200000000000000e6 +15 12 1 1 0.39321600000000000000e6 +15 16 1 1 -0.13107200000000000000e6 +16 3 1 2 0.13107200000000000000e6 +16 4 1 1 -0.78643200000000000000e6 +16 4 1 2 0.13107200000000000000e6 +16 8 1 1 0.26214400000000000000e6 +16 12 1 1 0.26214400000000000000e6 +17 4 1 3 0.13107200000000000000e6 +17 8 1 1 -0.26214400000000000000e6 +18 4 1 4 0.13107200000000000000e6 +18 12 1 1 -0.26214400000000000000e6 +19 3 2 3 0.13107200000000000000e6 +19 4 2 3 0.13107200000000000000e6 +19 4 3 3 0.26214400000000000000e6 +19 8 1 1 -0.78643200000000000000e6 +19 16 1 1 0.26214400000000000000e6 +20 4 2 4 0.13107200000000000000e6 +20 10 2 2 -0.26214400000000000000e6 +21 4 3 4 0.13107200000000000000e6 +21 16 1 1 -0.26214400000000000000e6 +22 3 1 2 -0.65536000000000000000e5 +22 5 1 1 0.13107200000000000000e6 +23 6 1 2 0.13107200000000000000e6 +23 8 1 1 -0.26214400000000000000e6 +24 6 1 4 0.13107200000000000000e6 +24 10 1 3 -0.13107200000000000000e6 +25 3 2 3 0.65536000000000000000e5 +25 4 3 3 0.13107200000000000000e6 +25 6 2 2 0.13107200000000000000e6 +25 8 1 1 -0.39321600000000000000e6 +25 16 1 1 0.13107200000000000000e6 +26 4 3 3 -0.26214400000000000000e6 +26 6 2 3 0.13107200000000000000e6 +27 6 2 4 0.13107200000000000000e6 +27 16 1 1 -0.26214400000000000000e6 +28 6 3 4 0.13107200000000000000e6 +28 10 3 3 -0.26214400000000000000e6 +29 3 3 4 0.65536000000000000000e5 +29 6 4 4 0.13107200000000000000e6 +29 10 1 3 -0.19660800000000000000e6 +29 10 3 3 0.13107200000000000000e6 +29 16 1 1 0.13107200000000000000e6 +30 6 1 1 -0.39321600000000000000e6 +30 6 1 3 0.65536000000000000000e5 +30 7 1 1 0.13107200000000000000e6 +30 8 1 1 0.13107200000000000000e6 +30 10 1 3 0.65536000000000000000e5 +31 3 2 3 -0.65536000000000000000e5 +31 9 1 1 0.13107200000000000000e6 +32 1 1 4 -0.65536000000000000000e5 +32 10 1 1 0.13107200000000000000e6 +33 10 1 2 0.13107200000000000000e6 +33 12 1 1 -0.26214400000000000000e6 +34 1 1 4 -0.39321600000000000000e6 +34 3 1 4 0.13107200000000000000e6 +34 10 1 3 0.13107200000000000000e6 +34 10 1 4 0.13107200000000000000e6 +34 12 1 1 0.26214400000000000000e6 +35 10 2 3 0.13107200000000000000e6 +35 16 1 1 -0.26214400000000000000e6 +36 4 4 4 -0.26214400000000000000e6 +36 10 2 4 0.13107200000000000000e6 +37 3 3 4 0.13107200000000000000e6 +37 10 1 3 -0.39321600000000000000e6 +37 10 3 3 0.26214400000000000000e6 +37 10 3 4 0.13107200000000000000e6 +37 16 1 1 0.26214400000000000000e6 +38 3 1 4 -0.65536000000000000000e5 +38 11 1 1 0.13107200000000000000e6 +39 4 4 4 0.13107200000000000000e6 +39 10 2 2 0.13107200000000000000e6 +39 12 1 1 -0.39321600000000000000e6 +39 13 1 1 0.13107200000000000000e6 +39 16 1 1 0.13107200000000000000e6 +40 10 1 3 -0.65536000000000000000e5 +40 14 1 1 0.13107200000000000000e6 +41 3 3 4 -0.65536000000000000000e5 +41 15 1 1 0.13107200000000000000e6 +*** ANSWER *** +-2.796428333061710846e-10 -5.145505709403082136e-12 -5.145505710399421184e-12 -5.065723613441632291e-11 5.112487019279347381e-11 5.112487019517472000e-11 -5.065723614645774618e-11 5.112487019298682728e-11 -5.065723613233761803e-11 -3.227934490141472682e-10 -2.726207292780503898e-11 8.167675251916435826e-11 3.251989134141424605e-10 8.167675250840997632e-11 8.167675251988690053e-11 -1.518635855095441632e-10 1.133140151751466980e-11 1.133166704855965140e-11 1.464637579379667940e-11 1.464320231899948338e-11 -3.333333329650279842e-01 -5.483000373986155436e-11 1.133261561376234559e-11 1.133045304810582364e-11 3.333333328223528347e-01 1.464445376592864346e-11 -3.333333329650249865e-01 1.464512448280788691e-11 3.333333328223558323e-01 -5.483000374452421638e-11 3.333333321195710020e-01 1.556001119344247636e-11 1.133310736505450625e-11 -1.518635855118056750e-10 -3.333333329650288168e-01 1.464347951112338470e-11 1.464609861685960086e-11 -5.483000373986801671e-11 3.333333321195705023e-01 7.578414394855302048e-11 3.333333321195734444e-01 +1 1 1 1 9.569075303465383918e-06 +1 1 1 2 -6.744317243428807817e-07 +1 1 1 3 -6.744317244734729334e-07 +1 1 1 4 -6.744317243375072047e-07 +1 1 2 2 3.958267549596160371e-05 +1 1 2 3 6.701038985909826200e-06 +1 1 2 4 6.701038986221940900e-06 +1 1 3 3 3.958267549438333061e-05 +1 1 3 4 6.701038985935169425e-06 +1 1 4 4 3.958267549623406371e-05 +1 2 1 1 1.310719998826415249e+05 +1 3 1 1 3.913237801389610887e-06 +1 3 1 2 -3.573294422828620612e-06 +1 3 1 3 -3.573294422793262069e-06 +1 3 1 4 -3.573294422846401528e-06 +1 3 2 2 5.692795605676361555e-05 +1 3 2 3 4.262447197835679200e-05 +1 3 2 4 4.262447197901848058e-05 +1 3 3 3 5.692795605535404431e-05 +1 3 3 4 4.262447197839246225e-05 +1 3 4 4 5.692795605685826640e-05 +1 4 1 1 4.826190253762088333e-05 +1 4 1 2 -1.990506387990697255e-05 +1 4 1 3 1.485229459703682801e-06 +1 4 1 4 1.485264263388810628e-06 +1 4 2 2 5.692795605676361555e-05 +1 4 2 3 1.919729768044518362e-06 +1 4 2 4 1.919313814355900286e-06 +1 4 3 3 4.369066664591435983e+04 +1 4 3 4 -4.369066661839214794e+04 +1 4 4 4 4.369066664591454901e+04 +1 5 1 1 3.903574250038071344e-05 +1 6 1 1 4.826190253950284146e-05 +1 6 1 2 1.485388593727058162e-06 +1 6 1 3 -1.990506387727349969e-05 +1 6 1 4 1.485105141921326516e-06 +1 6 2 2 4.369066664591385779e+04 +1 6 2 3 1.919477844007799156e-06 +1 6 2 4 -4.369066661839175504e+04 +1 6 3 3 5.692795605535404431e-05 +1 6 3 4 1.919565756210595353e-06 +1 6 4 4 4.369066664591425069e+04 +1 7 1 1 3.903574249976954867e-05 +1 8 1 1 5.615560006620549938e-05 +1 9 1 1 4.369066655379883741e+04 +1 10 1 1 4.826190253771878678e-05 +1 10 1 2 1.485453048552424243e-06 +1 10 1 3 1.485040675371000036e-06 +1 10 1 4 -1.990506388020339343e-05 +1 10 2 2 4.369066664591462177e+04 +1 10 2 3 -4.369066661839225708e+04 +1 10 2 4 1.919350146481964280e-06 +1 10 3 3 4.369066664591450535e+04 +1 10 3 4 1.919693437909021604e-06 +1 10 4 4 5.692795605685826640e-05 +1 11 1 1 3.903574250037973765e-05 +1 12 1 1 5.615560006619227211e-05 +1 13 1 1 4.369066655379877193e+04 +1 14 1 1 5.615560006619639208e-05 +1 15 1 1 4.369066655379915755e+04 +1 16 1 1 2.579376654421371238e-05 +2 1 1 1 9.999999996741790298e+00 +2 1 1 2 7.471357330074182568e-02 +2 1 1 3 7.471357330270980701e-02 +2 1 1 4 7.471357330001703045e-02 +2 1 2 2 2.115476443911317617e+00 +2 1 2 3 -5.167635032971548137e-01 +2 1 2 4 -5.167635032971514830e-01 +2 1 3 3 2.115476443914586113e+00 +2 1 3 4 -5.167635032971495956e-01 +2 1 4 4 2.115476443909571902e+00 +2 2 1 1 4.654536169871996319e-10 +2 3 1 1 2.577585927032204793e+01 +2 3 1 2 1.142191282585221623e+00 +2 3 1 3 1.142191282587849965e+00 +2 3 1 4 1.142191282584777312e+00 +2 3 2 2 4.419822902971087153e+00 +2 3 2 3 -1.999999998603640528e+00 +2 3 2 4 -1.999999998603631868e+00 +2 3 3 3 4.419822902974047452e+00 +2 3 3 4 -1.999999998603638751e+00 +2 3 4 4 4.419822902969805511e+00 +2 4 1 1 2.074713573300742464e+00 +2 4 1 2 1.154764439113082491e-01 +2 4 1 3 -5.167635032971539255e-01 +2 4 1 4 -5.167635032971520381e-01 +2 4 2 2 9.601334358226817356e-01 +2 4 2 3 -5.167635035298894230e-01 +2 4 2 4 -5.167635035298826507e-01 +2 4 3 3 1.483236496470122123e+00 +2 4 3 4 1.483236495771937724e+00 +2 4 4 4 1.483236496470114352e+00 +2 5 1 1 3.142191282585222734e+00 +2 6 1 1 2.074713573302710667e+00 +2 6 1 2 -5.167635032971558129e-01 +2 6 1 3 1.154764439145860438e-01 +2 6 1 4 -5.167635032971493736e-01 +2 6 2 2 1.483236496470127008e+00 +2 6 2 3 -5.167635035298774326e-01 +2 6 2 4 1.483236495771939278e+00 +2 6 3 3 9.601334358294710825e-01 +2 6 3 4 -5.167635035298775437e-01 +2 6 4 4 1.483236496470112575e+00 +2 7 1 1 3.142191282587846857e+00 +2 8 1 1 1.483236496702845075e+00 +2 9 1 1 1.396360650674838475e-09 +2 10 1 1 2.074713573300015934e+00 +2 10 1 2 -5.167635032971558129e-01 +2 10 1 3 -5.167635032971482634e-01 +2 10 1 4 1.154764439095756212e-01 +2 10 2 2 1.483236496470117016e+00 +2 10 2 3 1.483236495771938612e+00 +2 10 2 4 -5.167635035298842050e-01 +2 10 3 3 1.483236496470120791e+00 +2 10 3 4 -5.167635035298876467e-01 +2 10 4 4 9.601334358185252826e-01 +2 11 1 1 3.142191282584773759e+00 +2 12 1 1 1.483236496702849072e+00 +2 13 1 1 1.396360650674434811e-09 +2 14 1 1 1.483236496702852181e+00 +2 15 1 1 1.396360650674362019e-09 +2 16 1 1 3.483236495771939722e+00 +*** END *** +*** REQUEST *** +"" +2 +2 +4 1 +-0.26214400000000000000e6 -0.13107200000000000000e7 +0 1 2 2 0.52428800000000000000e6 +0 1 3 3 0.52428800000000000000e6 +0 1 4 4 0.52428800000000000000e6 +1 1 1 1 0.52428800000000000000e6 +1 1 2 2 -0.52428800000000000000e6 +1 1 3 3 -0.52428800000000000000e6 +1 1 4 4 -0.52428800000000000000e6 +2 1 2 2 -0.15728640000000000000e7 +2 1 2 3 0.52428800000000000000e6 +2 1 2 4 0.52428800000000000000e6 +2 1 3 3 -0.15728640000000000000e7 +2 1 3 4 0.52428800000000000000e6 +2 1 4 4 -0.15728640000000000000e7 +2 2 1 1 -0.52428800000000000000e6 +*** ANSWER *** +-1.369805830780025199e-10 -9.999999997258860462e-01 +1 1 1 1 4.004402490975419925e-07 +1 1 2 2 1.048575999712891062e+06 +1 1 2 3 -5.242879998562853434e+05 +1 1 2 4 -5.242879998562853434e+05 +1 1 3 3 1.048575999712891062e+06 +1 1 3 4 -5.242879998562853434e+05 +1 1 4 4 1.048575999712891062e+06 +1 2 1 1 5.242879999285030644e+05 +2 1 1 1 1.999999999995417443e+00 +2 1 2 2 8.333333333287741285e-01 +2 1 2 3 8.333333333282649802e-01 +2 1 2 4 8.333333333328124537e-01 +2 1 3 3 8.333333333287741285e-01 +2 1 3 4 8.333333333328124537e-01 +2 1 4 4 8.333333333378689645e-01 +2 2 1 1 1.527559509425708661e-12 +*** END *** +*** REQUEST *** +"" +2 +2 +5 1 +-0.19660800000000000000e6 -0.11141120000000000000e7 +0 1 2 2 0.26214400000000000000e6 +0 1 3 3 0.26214400000000000000e6 +0 1 4 4 0.26214400000000000000e6 +0 1 5 5 0.26214400000000000000e6 +1 1 1 1 0.26214400000000000000e6 +1 1 2 2 -0.26214400000000000000e6 +1 1 3 3 -0.26214400000000000000e6 +1 1 4 4 -0.26214400000000000000e6 +1 1 5 5 -0.26214400000000000000e6 +2 1 2 2 -0.10485760000000000000e7 +2 1 2 3 0.26214400000000000000e6 +2 1 2 4 0.26214400000000000000e6 +2 1 2 5 0.26214400000000000000e6 +2 1 3 3 -0.10485760000000000000e7 +2 1 3 4 0.26214400000000000000e6 +2 1 3 5 0.26214400000000000000e6 +2 1 4 4 -0.10485760000000000000e7 +2 1 4 5 0.26214400000000000000e6 +2 1 5 5 -0.10485760000000000000e7 +2 2 1 1 -0.26214400000000000000e6 +*** ANSWER *** +-2.348240940930787258e-09 -9.999999946942671469e-01 +1 1 1 1 9.050318275803589940e-04 +1 1 2 2 7.864319965727222152e+05 +1 1 2 3 -2.621439986091339670e+05 +1 1 2 4 -2.621439986091339670e+05 +1 1 2 5 -2.621439986091339670e+05 +1 1 3 3 7.864319965727222152e+05 +1 1 3 4 -2.621439986091339670e+05 +1 1 3 5 -2.621439986091339670e+05 +1 1 4 4 7.864319965727222152e+05 +1 1 4 5 -2.621439986091339670e+05 +1 1 5 5 7.864319965727222152e+05 +1 2 1 1 2.621440001297430717e+05 +2 1 1 1 3.499999985499439692e+00 +2 1 2 2 1.062499996374859812e+00 +2 1 2 3 1.062499995468575209e+00 +2 1 2 4 1.062499995468575209e+00 +2 1 2 5 1.062499995468574987e+00 +2 1 3 3 1.062499996374860034e+00 +2 1 3 4 1.062499995468575431e+00 +2 1 3 5 1.062499995468574987e+00 +2 1 4 4 1.062499996374860034e+00 +2 1 4 5 1.062499995468574987e+00 +2 1 5 5 1.062499996374859368e+00 +2 2 1 1 3.625141883504653676e-09 +*** END *** +*** REQUEST *** +"" +4 +5 +3 1 1 1 1 +0.52428800000000000000e6 -0.10485760000000000000e7 0.52428800000000000000e6 0.10485760000000000000e7 +0 1 1 2 0.13107200000000000000e6 +0 1 2 3 -0.13107200000000000000e6 +0 2 1 1 -0.26214400000000000000e6 +0 4 1 1 0.26214400000000000000e6 +1 1 1 1 0.26214400000000000000e6 +1 1 1 2 -0.13107200000000000000e6 +1 1 2 3 0.13107200000000000000e6 +1 2 1 1 0.26214400000000000000e6 +1 4 1 1 -0.26214400000000000000e6 +2 1 1 2 -0.26214400000000000000e6 +2 1 1 3 0.26214400000000000000e6 +2 1 2 3 0.26214400000000000000e6 +2 2 1 1 0.52428800000000000000e6 +2 4 1 1 -0.10485760000000000000e7 +3 1 2 3 -0.13107200000000000000e6 +3 2 1 1 -0.26214400000000000000e6 +3 3 1 1 0.26214400000000000000e6 +3 4 1 1 0.26214400000000000000e6 +4 1 1 2 0.13107200000000000000e6 +4 1 2 3 -0.13107200000000000000e6 +4 4 1 1 0.26214400000000000000e6 +4 5 1 1 0.26214400000000000000e6 +*** ANSWER *** +4.548904692939137619e-10 -1.674174344389079182e-09 9.029409809493680191e-10 9.999999937581930398e-01 +1 1 1 1 6.148414788495325939e-04 +1 1 1 2 -4.388747580510582447e-04 +1 1 1 3 -4.388747593355307730e-04 +1 1 2 2 4.955946716669514668e-04 +1 1 2 3 3.205244787119754246e-04 +1 1 3 3 4.955946716669514668e-04 +1 2 1 1 2.621439995003913937e+05 +1 3 1 1 7.322952321769417294e-04 +1 4 1 1 7.322952176238087252e-04 +1 5 1 1 2.621439988593424496e+05 +2 1 1 1 5.999999993617382010e+00 +2 1 1 2 3.534311092067301097e+00 +2 1 1 3 3.534311093010847671e+00 +2 1 2 2 4.314346557842309693e+00 +2 1 2 3 1.068622194652080637e+00 +2 1 3 3 4.314346558915080898e+00 +2 2 1 1 3.191312840597110303e-09 +2 3 1 1 1.534311098449921529e+00 +2 4 1 1 1.534311099393473210e+00 +2 5 1 1 3.191307237696616244e-09 +*** END *** +*** REQUEST *** +"" +4 +5 +3 1 1 1 1 +0.52428800000000000000e6 -0.10485760000000000000e7 0.52428800000000000000e6 0.15728640000000000000e7 +0 1 1 2 -0.13107200000000000000e6 +0 1 2 3 0.13107200000000000000e6 +0 2 1 1 0.26214400000000000000e6 +0 4 1 1 -0.26214400000000000000e6 +1 1 1 1 0.26214400000000000000e6 +1 1 1 2 0.13107200000000000000e6 +1 1 2 3 -0.13107200000000000000e6 +1 2 1 1 -0.26214400000000000000e6 +1 4 1 1 0.26214400000000000000e6 +2 1 1 2 0.52428800000000000000e6 +2 1 1 3 0.26214400000000000000e6 +2 1 2 3 -0.52428800000000000000e6 +2 2 1 1 -0.10485760000000000000e7 +2 4 1 1 0.52428800000000000000e6 +3 1 1 2 -0.39321600000000000000e6 +3 1 2 3 0.26214400000000000000e6 +3 2 1 1 0.52428800000000000000e6 +3 3 1 1 0.26214400000000000000e6 +3 4 1 1 -0.52428800000000000000e6 +4 1 1 2 0.26214400000000000000e6 +4 1 2 3 -0.13107200000000000000e6 +4 4 1 1 0.52428800000000000000e6 +4 5 1 1 0.26214400000000000000e6 +*** ANSWER *** +9.046097392403201396e-10 -4.087614502059694096e-10 9.999999977383847716e-01 9.999999965640337107e-01 +1 1 1 1 3.604559925710001944e-04 +1 1 1 2 -1.071543616027025719e-04 +1 1 1 3 -1.071543616027936449e-04 +1 1 2 2 1.233179770875857117e-04 +1 1 2 3 -4.677015315264715454e-05 +1 1 3 3 1.233179770875857117e-04 +1 2 1 1 2.621439991290596954e+05 +1 3 1 1 2.621439995304491022e+05 +1 4 1 1 2.621439995304490731e+05 +1 5 1 1 2.621439992226000177e+05 +2 1 1 1 9.999999991249831410e+00 +2 1 1 2 1.399999998468725870e+01 +2 1 1 3 1.399999998468733686e+01 +2 1 2 2 2.719350304632718718e+01 +2 1 2 3 2.199999997593712564e+01 +2 1 3 3 2.719350304632710547e+01 +2 2 1 1 2.187501854030851450e-09 +2 3 1 1 2.187502197415109826e-09 +2 4 1 1 2.187502197415096591e-09 +2 5 1 1 2.187502181997641114e-09 +*** END *** +*** REQUEST *** +"" +3 +7 +1 1 1 1 1 1 1 +0.10485760000000000000e7 0.10485760000000000000e7 0.10485760000000000000e7 +0 1 1 1 0.10485760000000000000e7 +1 2 1 1 0.10485760000000000000e7 +1 3 1 1 0.10485760000000000000e7 +2 4 1 1 0.10485760000000000000e7 +2 5 1 1 0.10485760000000000000e7 +3 6 1 1 0.10485760000000000000e7 +3 7 1 1 0.10485760000000000000e7 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +22 +23 +4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +0.39321600000000000000e6 0.78643200000000000000e6 -0.14417920000000000000e7 -0.15728640000000000000e7 0.15728640000000000000e7 0.10485760000000000000e7 0.52428800000000000000e6 0.0 0.13107200000000000000e6 0.52428800000000000000e6 0.39321600000000000000e6 0.0 0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.14417920000000000000e7 +0 1 1 4 0.65536000000000000000e5 +0 4 1 1 -0.13107200000000000000e6 +1 1 1 1 0.26214400000000000000e6 +1 1 1 4 -0.65536000000000000000e5 +1 4 1 1 0.13107200000000000000e6 +2 1 1 2 0.26214400000000000000e6 +2 1 1 3 0.26214400000000000000e6 +2 1 1 4 -0.26214400000000000000e6 +2 1 2 3 -0.13107200000000000000e6 +2 4 1 1 0.52428800000000000000e6 +2 16 1 1 0.26214400000000000000e6 +3 1 1 2 -0.52428800000000000000e6 +3 1 1 4 -0.32768000000000000000e6 +3 1 2 2 0.26214400000000000000e6 +3 1 2 3 -0.26214400000000000000e6 +3 1 4 4 0.26214400000000000000e6 +3 2 1 1 -0.26214400000000000000e6 +3 4 1 1 -0.14417920000000000000e7 +3 8 1 1 0.52428800000000000000e6 +3 12 1 1 -0.26214400000000000000e6 +3 20 1 1 -0.52428800000000000000e6 +4 1 1 2 -0.52428800000000000000e6 +4 1 2 4 0.26214400000000000000e6 +4 4 1 1 -0.10485760000000000000e7 +4 20 1 1 -0.52428800000000000000e6 +5 1 1 2 0.52428800000000000000e6 +5 1 1 4 -0.26214400000000000000e6 +5 1 2 3 -0.26214400000000000000e6 +5 1 3 3 0.26214400000000000000e6 +5 4 1 1 0.52428800000000000000e6 +5 12 1 1 0.26214400000000000000e6 +5 16 1 1 0.52428800000000000000e6 +6 1 1 2 0.52428800000000000000e6 +6 1 1 4 -0.52428800000000000000e6 +6 1 2 3 -0.26214400000000000000e6 +6 1 3 4 0.26214400000000000000e6 +6 8 1 1 0.52428800000000000000e6 +6 16 1 1 0.52428800000000000000e6 +7 3 1 1 0.26214400000000000000e6 +7 4 1 1 0.26214400000000000000e6 +8 1 1 4 -0.26214400000000000000e6 +8 1 4 4 0.26214400000000000000e6 +8 4 1 1 -0.52428800000000000000e6 +8 5 1 1 0.26214400000000000000e6 +9 1 1 2 -0.13107200000000000000e6 +9 1 2 3 0.65536000000000000000e5 +9 6 1 1 0.26214400000000000000e6 +9 16 1 1 -0.13107200000000000000e6 +10 7 1 1 0.26214400000000000000e6 +10 8 1 1 0.26214400000000000000e6 +11 1 1 2 0.13107200000000000000e6 +11 1 2 3 -0.65536000000000000000e5 +11 9 1 1 0.26214400000000000000e6 +11 16 1 1 0.13107200000000000000e6 +12 8 1 1 -0.26214400000000000000e6 +12 10 1 1 0.26214400000000000000e6 +13 8 1 1 0.26214400000000000000e6 +13 11 1 1 0.26214400000000000000e6 +14 1 1 2 0.13107200000000000000e6 +14 1 1 4 -0.13107200000000000000e6 +14 4 1 1 0.26214400000000000000e6 +14 13 1 1 0.26214400000000000000e6 +15 14 1 1 0.26214400000000000000e6 +15 20 1 1 -0.26214400000000000000e6 +16 15 1 1 0.26214400000000000000e6 +16 20 1 1 0.26214400000000000000e6 +17 16 1 1 0.26214400000000000000e6 +17 17 1 1 0.26214400000000000000e6 +18 1 1 2 -0.13107200000000000000e6 +18 1 1 4 0.13107200000000000000e6 +18 4 1 1 -0.26214400000000000000e6 +18 18 1 1 0.26214400000000000000e6 +19 19 1 1 0.26214400000000000000e6 +19 20 1 1 0.26214400000000000000e6 +20 16 1 1 0.26214400000000000000e6 +20 21 1 1 0.26214400000000000000e6 +21 16 1 1 -0.26214400000000000000e6 +21 22 1 1 0.26214400000000000000e6 +22 1 1 4 0.58982400000000000000e6 +22 1 2 3 0.26214400000000000000e6 +22 1 4 4 -0.26214400000000000000e6 +22 2 1 1 0.26214400000000000000e6 +22 4 1 1 0.91750400000000000000e6 +22 8 1 1 -0.52428800000000000000e6 +22 12 1 1 0.26214400000000000000e6 +22 20 1 1 0.52428800000000000000e6 +22 23 1 1 0.26214400000000000000e6 +*** ANSWER *** +-1.295667068556624539e-10 -1.626374797343609882e-10 -5.545183488149067688e-10 2.098558964095165409e-11 -5.545183488151598861e-10 2.098558964089881793e-11 -5.151721287085392124e-10 7.692307573534454268e-02 -5.151721287085408668e-10 7.692307481797780455e-02 3.076923070197430388e-01 -5.151707783664954629e-10 7.692307668943522414e-02 -5.151721287085458299e-10 7.692307575370652128e-02 -5.151707783665070434e-10 -5.151707783665070434e-10 3.076923070197430388e-01 -5.151707783665053891e-10 -5.151707783665086978e-10 7.692307575370652128e-02 7.692307573534454268e-02 +1 1 1 1 1.485321445614910807e-04 +1 1 1 2 -4.263443948756802729e-05 +1 1 1 3 -4.263443948748432688e-05 +1 1 1 4 -4.263443948753636858e-05 +1 1 2 2 3.713362133172745400e-05 +1 1 2 3 5.501246410828170745e-06 +1 1 2 4 5.501246410837630409e-06 +1 1 3 3 3.713362133166110083e-05 +1 1 3 4 5.501246410823779727e-06 +1 1 4 4 3.713362133169807212e-05 +1 2 1 1 2.016492309342709632e+04 +1 3 1 1 4.744799685529117912e-05 +1 4 1 1 8.065969231388080516e+04 +1 5 1 1 2.016492294806343853e+04 +1 6 1 1 4.744799685529052860e-05 +1 7 1 1 2.016492270758125596e+04 +1 8 1 1 4.744835083935632948e-05 +1 9 1 1 8.065969231388080516e+04 +1 10 1 1 4.744835083935589580e-05 +1 11 1 1 2.016492319817258613e+04 +1 12 1 1 2.016492294806343853e+04 +1 13 1 1 4.744799685528901072e-05 +1 14 1 1 2.016492295287692104e+04 +1 15 1 1 4.744835083935307687e-05 +1 16 1 1 2.016492295287692468e+04 +1 17 1 1 4.744835083935286003e-05 +1 18 1 1 8.065969231388080516e+04 +1 19 1 1 4.744835083935307687e-05 +1 20 1 1 2.016492295287692104e+04 +1 21 1 1 4.744835083935220951e-05 +1 22 1 1 2.016492295287692468e+04 +1 23 1 1 2.016492294806343853e+04 +2 1 1 1 2.692307687733229926e+00 +2 1 1 2 2.384615376610100146e+00 +2 1 1 3 2.384615376610065507e+00 +2 1 1 4 2.384615376610094373e+00 +2 1 2 2 4.769230750932913487e+00 +2 1 2 3 1.769230760081863529e+00 +2 1 2 4 1.769230760081884180e+00 +2 1 3 3 4.769230750933013852e+00 +2 1 3 4 1.769230760081862863e+00 +2 1 4 4 4.769230750932993423e+00 +2 2 1 1 4.574446394022880727e-09 +2 3 1 1 1.999999998856389016e+00 +2 4 1 1 1.143612126719995731e-09 +2 5 1 1 4.574428482139560291e-09 +2 6 1 1 1.999999998856391015e+00 +2 7 1 1 4.574429208583087058e-09 +2 8 1 1 1.999999995425566279e+00 +2 9 1 1 1.143612126720002348e-09 +2 10 1 1 1.999999995425567167e+00 +2 11 1 1 4.574426398049007239e-09 +2 12 1 1 4.574428482139586761e-09 +2 13 1 1 1.999999998856391903e+00 +2 14 1 1 4.574427803316053766e-09 +2 15 1 1 1.999999995425571608e+00 +2 16 1 1 4.574427803316027296e-09 +2 17 1 1 1.999999995425572497e+00 +2 18 1 1 1.143612126720002348e-09 +2 19 1 1 1.999999995425571608e+00 +2 20 1 1 4.574427803316053766e-09 +2 21 1 1 1.999999995425572497e+00 +2 22 1 1 4.574427803316027296e-09 +2 23 1 1 4.574428482139586761e-09 +*** END *** +*** REQUEST *** +"" +3 +7 +1 1 1 1 1 1 1 +0.0 0.0 0.0 +0 1 1 1 0.52428800000000000000e6 +1 1 1 1 -0.10485760000000000000e7 +1 2 1 1 0.52428800000000000000e6 +1 3 1 1 0.52428800000000000000e6 +2 1 1 1 -0.10485760000000000000e7 +2 4 1 1 0.52428800000000000000e6 +2 5 1 1 0.52428800000000000000e6 +3 1 1 1 -0.10485760000000000000e7 +3 6 1 1 0.52428800000000000000e6 +3 7 1 1 0.52428800000000000000e6 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +22 +23 +4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +0.98304000000000000000e5 0.29491200000000000000e6 -0.11796480000000000000e7 -0.39321600000000000000e6 0.75366400000000000000e6 0.19660800000000000000e6 0.19660800000000000000e6 -0.13107200000000000000e6 0.49152000000000000000e5 0.98304000000000000000e5 0.14745600000000000000e6 0.29491200000000000000e6 0.0 0.19660800000000000000e6 0.39321600000000000000e6 0.0 0.39321600000000000000e6 0.0 0.0 0.98304000000000000000e5 -0.98304000000000000000e5 0.10485760000000000000e7 +0 1 1 4 0.16384000000000000000e5 +0 4 1 1 -0.32768000000000000000e5 +1 1 1 1 0.65536000000000000000e5 +1 1 1 4 -0.16384000000000000000e5 +1 4 1 1 0.32768000000000000000e5 +2 1 1 2 0.65536000000000000000e5 +2 1 1 3 0.65536000000000000000e5 +2 1 1 4 -0.13107200000000000000e6 +2 1 2 3 -0.16384000000000000000e5 +2 4 1 1 0.26214400000000000000e6 +2 16 1 1 0.32768000000000000000e5 +3 1 1 2 -0.19660800000000000000e6 +3 1 1 4 0.18022400000000000000e6 +3 1 2 2 0.65536000000000000000e5 +3 1 2 3 -0.49152000000000000000e5 +3 1 4 4 0.65536000000000000000e5 +3 2 1 1 -0.65536000000000000000e5 +3 4 1 1 -0.11468800000000000000e7 +3 8 1 1 0.13107200000000000000e6 +3 12 1 1 -0.65536000000000000000e5 +3 16 1 1 -0.32768000000000000000e5 +3 20 1 1 -0.13107200000000000000e6 +4 1 1 2 -0.13107200000000000000e6 +4 1 2 4 0.65536000000000000000e5 +4 4 1 1 -0.26214400000000000000e6 +4 20 1 1 -0.13107200000000000000e6 +5 1 1 2 0.19660800000000000000e6 +5 1 1 4 -0.26214400000000000000e6 +5 1 2 3 -0.49152000000000000000e5 +5 1 3 3 0.65536000000000000000e5 +5 4 1 1 0.52428800000000000000e6 +5 12 1 1 0.65536000000000000000e5 +5 16 1 1 0.98304000000000000000e5 +6 1 1 2 0.13107200000000000000e6 +6 1 1 4 -0.26214400000000000000e6 +6 1 2 3 -0.32768000000000000000e5 +6 1 3 4 0.65536000000000000000e5 +6 8 1 1 0.13107200000000000000e6 +6 16 1 1 0.65536000000000000000e5 +7 1 1 4 -0.32768000000000000000e5 +7 3 1 1 0.65536000000000000000e5 +7 4 1 1 0.13107200000000000000e6 +8 1 1 4 -0.65536000000000000000e5 +8 1 4 4 0.65536000000000000000e5 +8 4 1 1 -0.26214400000000000000e6 +8 5 1 1 0.65536000000000000000e5 +9 1 1 2 -0.32768000000000000000e5 +9 1 2 3 0.81920000000000000000e4 +9 6 1 1 0.65536000000000000000e5 +9 16 1 1 -0.16384000000000000000e5 +10 1 1 2 -0.65536000000000000000e5 +10 1 2 3 0.16384000000000000000e5 +10 7 1 1 0.65536000000000000000e5 +10 8 1 1 0.65536000000000000000e5 +10 16 1 1 -0.32768000000000000000e5 +11 1 1 2 0.32768000000000000000e5 +11 1 1 4 -0.32768000000000000000e5 +11 1 2 3 -0.81920000000000000000e4 +11 4 1 1 0.65536000000000000000e5 +11 9 1 1 0.65536000000000000000e5 +11 16 1 1 0.16384000000000000000e5 +12 1 1 2 0.65536000000000000000e5 +12 1 1 4 -0.65536000000000000000e5 +12 1 2 3 -0.16384000000000000000e5 +12 4 1 1 0.26214400000000000000e6 +12 8 1 1 -0.65536000000000000000e5 +12 10 1 1 0.65536000000000000000e5 +12 16 1 1 0.32768000000000000000e5 +13 4 1 1 -0.13107200000000000000e6 +13 8 1 1 0.65536000000000000000e5 +13 11 1 1 0.65536000000000000000e5 +14 1 1 2 0.32768000000000000000e5 +14 1 1 4 -0.65536000000000000000e5 +14 4 1 1 0.13107200000000000000e6 +14 13 1 1 0.65536000000000000000e5 +15 1 1 2 0.65536000000000000000e5 +15 1 1 4 -0.13107200000000000000e6 +15 4 1 1 0.39321600000000000000e6 +15 14 1 1 0.65536000000000000000e5 +15 20 1 1 -0.65536000000000000000e5 +16 4 1 1 -0.13107200000000000000e6 +16 15 1 1 0.65536000000000000000e5 +16 20 1 1 0.65536000000000000000e5 +17 1 1 2 0.65536000000000000000e5 +17 1 1 4 -0.13107200000000000000e6 +17 4 1 1 0.26214400000000000000e6 +17 16 1 1 0.65536000000000000000e5 +17 17 1 1 0.65536000000000000000e5 +18 1 1 2 -0.32768000000000000000e5 +18 1 1 4 0.32768000000000000000e5 +18 4 1 1 -0.65536000000000000000e5 +18 18 1 1 0.65536000000000000000e5 +19 1 1 2 -0.65536000000000000000e5 +19 1 1 4 0.65536000000000000000e5 +19 4 1 1 -0.13107200000000000000e6 +19 19 1 1 0.65536000000000000000e5 +19 20 1 1 0.65536000000000000000e5 +20 1 1 2 -0.65536000000000000000e5 +20 1 2 3 0.16384000000000000000e5 +20 16 1 1 0.32768000000000000000e5 +20 21 1 1 0.65536000000000000000e5 +21 1 1 4 0.65536000000000000000e5 +21 1 2 3 -0.16384000000000000000e5 +21 4 1 1 -0.13107200000000000000e6 +21 16 1 1 -0.32768000000000000000e5 +21 22 1 1 0.65536000000000000000e5 +22 1 1 4 -0.49152000000000000000e5 +22 1 2 3 0.49152000000000000000e5 +22 1 4 4 -0.65536000000000000000e5 +22 2 1 1 0.65536000000000000000e5 +22 4 1 1 0.88473600000000000000e6 +22 8 1 1 -0.13107200000000000000e6 +22 12 1 1 0.65536000000000000000e5 +22 16 1 1 0.32768000000000000000e5 +22 20 1 1 0.13107200000000000000e6 +22 23 1 1 0.65536000000000000000e5 +*** ANSWER *** +4.049512478004994521e-09 -7.853528065000316224e-10 2.098746827559298714e-09 -1.064002179143037410e-09 2.098746826197792513e-09 -1.064002178236080190e-09 -3.533807468735688266e-10 9.999999893727561373e-01 -3.533807468734935532e-10 -4.066578641307421796e-10 6.106671844491684542e-01 3.473323508561638184e-01 2.694664478268185004e+00 -3.533807468737202007e-10 -4.066578641307620320e-10 3.473327911937711954e-01 3.473340419483763042e-01 6.106687190982799107e-01 3.473330062104405536e-01 3.473326192695437298e-01 2.694666638300601047e+00 9.999999893727561373e-01 +1 1 1 1 2.955311598780135246e-04 +1 1 1 2 -5.146888158159813008e-05 +1 1 1 3 -5.146888152678607241e-05 +1 1 1 4 -5.146888156371399840e-05 +1 1 2 2 1.676857822104013684e-04 +1 1 2 3 -6.973044675111467021e-05 +1 1 2 4 -6.973044681231809969e-05 +1 1 3 3 1.676857821211741317e-04 +1 1 3 4 -6.973044675287975135e-05 +1 1 4 4 1.676857822024493960e-04 +1 2 1 1 6.553599919613178645e+04 +1 3 1 1 6.983149492369882839e-06 +1 4 1 1 4.002087485256239597e+04 +1 5 1 1 6.553599933367525227e+04 +1 6 1 1 6.983149492374788854e-06 +1 7 1 1 3.491580335803661558e-06 +1 8 1 1 2.276275983412596543e+04 +1 9 1 1 4.002068463020300987e+04 +1 10 1 1 2.276277297585186170e+04 +1 11 1 1 1.765975312779260857e+05 +1 12 1 1 6.553599933367525227e+04 +1 13 1 1 6.983149492359935285e-06 +1 14 1 1 3.491580335802333410e-06 +1 15 1 1 2.276280183381729876e+04 +1 16 1 1 3.491580335807320740e-06 +1 17 1 1 2.276288380327109917e+04 +1 18 1 1 4.002078520496717829e+04 +1 19 1 1 2.276281592514974545e+04 +1 20 1 1 1.765976162269152992e+05 +1 21 1 1 2.276279056659112757e+04 +1 22 1 1 1.765976728378105036e+05 +1 23 1 1 6.553599933367525227e+04 +2 1 1 1 1.699999994384707236e+01 +2 1 1 2 3.099999989341090512e+01 +2 1 1 3 3.099999989341162276e+01 +2 1 1 4 3.099999989341045747e+01 +2 1 2 2 5.999999980617106132e+01 +2 1 2 3 5.899999979955705243e+01 +2 1 2 4 5.899999979955698848e+01 +2 1 3 3 5.999999980620715689e+01 +2 1 3 4 5.899999979955813956e+01 +2 1 4 4 5.999999980617731410e+01 +2 2 1 1 3.509895568585119103e-09 +2 3 1 1 3.399999988197636469e+01 +2 4 1 1 5.716149613856589889e-09 +2 5 1 1 3.509889572509242164e-09 +2 6 1 1 3.399999988197478018e+01 +2 7 1 1 6.799999975382014838e+01 +2 8 1 1 1.013005840234281783e-08 +2 9 1 1 5.716805148766916003e-09 +2 10 1 1 1.012989429842144469e-08 +2 11 1 1 1.303353071688916570e-09 +2 12 1 1 3.509889572509255399e-09 +2 13 1 1 3.399999988197728129e+01 +2 14 1 1 6.799999975382074524e+01 +2 15 1 1 1.012958682617309905e-08 +2 16 1 1 6.799999975381710726e+01 +2 17 1 1 1.012872991779920873e-08 +2 18 1 1 5.716487784110908985e-09 +2 19 1 1 1.012945825278146321e-08 +2 20 1 1 1.303338019016667580e-09 +2 21 1 1 1.012966020393385883e-08 +2 22 1 1 1.303327157037172274e-09 +2 23 1 1 3.509889572509255399e-09 +*** END *** +*** REQUEST *** +"" +5 +5 +3 1 1 1 1 +0.52428800000000000000e6 -0.10485760000000000000e7 0.10485760000000000000e7 0.52428800000000000000e6 0.52428800000000000000e6 +0 1 2 3 0.26214400000000000000e6 +1 1 1 1 0.52428800000000000000e6 +1 1 2 3 -0.26214400000000000000e6 +2 1 1 3 0.52428800000000000000e6 +2 4 1 1 -0.10485760000000000000e7 +3 1 1 2 -0.26214400000000000000e6 +3 1 2 2 0.52428800000000000000e6 +3 1 2 3 0.26214400000000000000e6 +3 1 3 3 0.52428800000000000000e6 +3 2 1 1 0.52428800000000000000e6 +3 4 1 1 -0.52428800000000000000e6 +4 1 1 2 -0.26214400000000000000e6 +4 3 1 1 0.52428800000000000000e6 +5 1 2 3 -0.26214400000000000000e6 +5 5 1 1 0.52428800000000000000e6 +*** ANSWER *** +9.047144637004025380e-01 -5.064741821662422927e-01 1.012948364956070213e+00 -6.235856335248027958e-10 -5.845221297834649404e-10 +1 1 1 1 4.743309372861008742e+05 +1 1 1 2 -2.655383360195748392e+05 +1 1 1 3 -2.655383360195748392e+05 +1 1 2 2 5.310766729076325428e+05 +1 1 2 3 -2.337711320360052632e+05 +1 1 3 3 5.310766729076325428e+05 +1 2 1 1 5.310766729076325428e+05 +1 3 1 1 2.146057993971965325e-04 +1 4 1 1 2.146057993971661748e-04 +1 5 1 1 2.350863256467333393e-04 +2 1 1 1 4.943559570850903917e+00 +2 1 1 2 4.415339358856920526e+00 +2 1 1 3 4.415339358856921415e+00 +2 1 2 2 3.943559572351147846e+00 +2 1 2 3 3.943559570850906582e+00 +2 1 3 3 3.943559572351153619e+00 +2 2 1 1 2.160644606377368460e-09 +2 3 1 1 5.415339358856919638e+00 +2 4 1 1 5.415339358856934737e+00 +2 5 1 1 4.943559570850906582e+00 +*** END *** +*** REQUEST *** +"" +4 +4 +3 1 1 1 +0.0 -0.10485760000000000000e7 0.52428800000000000000e6 0.52428800000000000000e6 +0 4 1 1 0.52428800000000000000e6 +1 1 1 1 0.52428800000000000000e6 +1 4 1 1 -0.52428800000000000000e6 +2 1 2 3 0.52428800000000000000e6 +2 4 1 1 -0.10485760000000000000e7 +3 1 1 2 -0.26214400000000000000e6 +3 2 1 1 0.52428800000000000000e6 +4 1 1 3 -0.26214400000000000000e6 +4 3 1 1 0.52428800000000000000e6 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +13 +5 +3 1 3 3 1 +0.0 0.0 0.52428800000000000000e6 -0.10485760000000000000e7 0.52428800000000000000e6 0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 0.0 0.52428800000000000000e6 -0.10485760000000000000e7 0.52428800000000000000e6 +0 1 2 3 0.26214400000000000000e6 +1 1 2 3 -0.26214400000000000000e6 +1 2 1 1 -0.52428800000000000000e6 +1 3 1 2 -0.26214400000000000000e6 +1 3 2 3 0.26214400000000000000e6 +1 4 1 1 0.52428800000000000000e6 +1 4 1 3 -0.26214400000000000000e6 +2 1 1 2 0.26214400000000000000e6 +2 3 2 3 -0.26214400000000000000e6 +3 1 1 1 0.52428800000000000000e6 +3 1 2 3 -0.26214400000000000000e6 +4 1 1 3 0.52428800000000000000e6 +4 4 1 1 -0.10485760000000000000e7 +5 1 2 2 0.52428800000000000000e6 +5 3 1 2 -0.26214400000000000000e6 +6 1 3 3 0.52428800000000000000e6 +6 4 1 3 -0.26214400000000000000e6 +7 1 1 2 -0.26214400000000000000e6 +7 3 1 1 0.52428800000000000000e6 +8 1 2 3 -0.52428800000000000000e6 +8 3 1 3 0.52428800000000000000e6 +9 1 2 3 -0.26214400000000000000e6 +9 2 1 1 -0.52428800000000000000e6 +9 3 1 2 -0.26214400000000000000e6 +9 3 2 3 0.26214400000000000000e6 +9 3 3 3 0.52428800000000000000e6 +9 4 1 3 -0.26214400000000000000e6 +10 1 2 3 -0.52428800000000000000e6 +10 4 1 2 0.52428800000000000000e6 +11 3 2 3 -0.26214400000000000000e6 +11 4 2 2 0.52428800000000000000e6 +12 1 2 3 -0.52428800000000000000e6 +12 2 1 1 -0.10485760000000000000e7 +12 3 1 2 -0.52428800000000000000e6 +12 3 2 3 0.52428800000000000000e6 +12 4 1 3 -0.52428800000000000000e6 +12 4 2 3 0.52428800000000000000e6 +13 1 2 3 -0.26214400000000000000e6 +13 5 1 1 0.52428800000000000000e6 +*** ANSWER *** +-1.012948329551812909e+00 -1.012948329551812909e+00 9.047145732130862372e-01 -5.064741647124204604e-01 1.012948329986513407e+00 1.012948329986513407e+00 -1.269719777217911070e-10 -2.267145002100386557e-10 1.807584410822154742e-10 -2.267145002104232947e-10 1.807584410826844857e-10 -3.495881670031764897e-10 -2.576717013002858655e-10 +1 1 1 1 4.743309943659727578e+05 +1 1 1 2 -2.655383268687454984e+05 +1 1 1 3 -2.655383268687454984e+05 +1 1 2 2 5.310766542371993419e+05 +1 1 2 3 -2.337711697371662303e+05 +1 1 3 3 5.310766542371993419e+05 +1 2 1 1 5.310766542810912943e+05 +1 3 1 1 1.386602794478742143e-04 +1 3 1 2 2.194599384597073792e-05 +1 3 1 3 -1.188636918861207467e-04 +1 3 2 2 2.052301637036763049e-04 +1 3 2 3 -1.832848809016356280e-04 +1 3 3 3 2.999996452617888915e-04 +1 4 1 1 1.386602794479904407e-04 +1 4 1 2 -1.188636918863224083e-04 +1 4 1 3 2.194599384612041203e-05 +1 4 2 2 2.999996452620360896e-04 +1 4 2 3 -1.832848809017613954e-04 +1 4 3 3 2.052301637036763049e-04 +1 5 1 1 7.013598277235181221e-05 +2 1 1 1 4.943559575736863998e+00 +2 1 1 2 4.415339364265365774e+00 +2 1 1 3 4.415339364265380873e+00 +2 1 2 2 3.943559576120588606e+00 +2 1 2 3 3.943559575736873768e+00 +2 1 3 3 3.943559576120614807e+00 +2 2 1 1 5.526448483074430500e-10 +2 3 1 1 5.415339364265365774e+00 +2 3 1 2 2.943559576120634347e+00 +2 3 1 3 3.943559575736864442e+00 +2 3 2 2 5.028789771976822642e+00 +2 3 2 3 4.415339364265383537e+00 +2 3 3 3 5.415339364265284949e+00 +2 4 1 1 5.415339364265358668e+00 +2 4 1 2 3.943559575736877765e+00 +2 4 1 3 2.943559576120583277e+00 +2 4 2 2 5.415339364265393307e+00 +2 4 2 3 4.415339364265369326e+00 +2 4 3 3 5.028789771976716061e+00 +2 5 1 1 4.943559575736879985e+00 +*** END *** +*** REQUEST *** +"" +3 +4 +3 1 1 1 +-0.10485760000000000000e7 0.52428800000000000000e6 0.52428800000000000000e6 +0 1 1 1 0.52428800000000000000e6 +1 1 2 3 0.52428800000000000000e6 +1 4 1 1 -0.10485760000000000000e7 +2 1 1 2 -0.26214400000000000000e6 +2 2 1 1 0.52428800000000000000e6 +3 1 1 3 -0.26214400000000000000e6 +3 3 1 1 0.52428800000000000000e6 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +9 +4 +3 3 3 1 +0.0 0.52428800000000000000e6 -0.10485760000000000000e7 0.0 0.52428800000000000000e6 0.52428800000000000000e6 -0.10485760000000000000e7 0.52428800000000000000e6 0.52428800000000000000e6 +0 1 1 1 0.52428800000000000000e6 +1 1 2 3 0.52428800000000000000e6 +1 3 1 2 -0.52428800000000000000e6 +2 1 1 2 -0.26214400000000000000e6 +2 2 1 1 0.52428800000000000000e6 +3 1 2 2 -0.10485760000000000000e7 +3 2 1 2 0.52428800000000000000e6 +4 2 1 3 0.52428800000000000000e6 +4 3 1 2 -0.52428800000000000000e6 +5 2 3 3 0.52428800000000000000e6 +5 3 2 3 -0.26214400000000000000e6 +6 1 1 3 -0.26214400000000000000e6 +6 3 1 1 0.52428800000000000000e6 +7 1 3 3 -0.10485760000000000000e7 +7 3 1 3 0.52428800000000000000e6 +8 2 2 3 -0.26214400000000000000e6 +8 3 2 2 0.52428800000000000000e6 +9 3 1 2 -0.26214400000000000000e6 +9 4 1 1 0.52428800000000000000e6 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +25 +5 +6 1 3 3 3 +0.0 0.0 0.13107200000000000000e6 0.0 0.0 0.0 -0.10485760000000000000e7 0.13107200000000000000e6 -0.26214400000000000000e6 0.13107200000000000000e6 0.13107200000000000000e6 0.0 0.13107200000000000000e6 0.0 0.13107200000000000000e6 0.13107200000000000000e6 0.0 0.13107200000000000000e6 0.0 0.13107200000000000000e6 0.0 0.0 -0.39321600000000000000e6 0.0 0.13107200000000000000e6 +0 1 1 1 0.52428800000000000000e6 +1 1 1 3 0.52428800000000000000e6 +1 3 1 2 -0.52428800000000000000e6 +2 1 1 5 0.52428800000000000000e6 +2 4 1 2 -0.52428800000000000000e6 +3 1 2 2 0.52428800000000000000e6 +3 3 1 2 -0.26214400000000000000e6 +4 1 2 4 0.52428800000000000000e6 +4 4 1 2 -0.52428800000000000000e6 +5 1 2 6 0.52428800000000000000e6 +5 1 4 5 -0.52428800000000000000e6 +6 1 2 5 -0.52428800000000000000e6 +6 1 3 4 0.52428800000000000000e6 +7 1 1 1 -0.10485760000000000000e7 +7 1 3 3 -0.10485760000000000000e7 +7 1 3 5 0.52428800000000000000e6 +7 1 5 6 0.52428800000000000000e6 +7 1 6 6 -0.10485760000000000000e7 +7 2 1 1 -0.10485760000000000000e7 +8 1 1 6 -0.26214400000000000000e6 +8 1 4 4 0.52428800000000000000e6 +9 1 4 6 0.52428800000000000000e6 +9 4 3 3 -0.10485760000000000000e7 +10 1 3 6 -0.26214400000000000000e6 +10 1 5 5 0.52428800000000000000e6 +11 1 1 2 -0.26214400000000000000e6 +11 3 1 1 0.52428800000000000000e6 +12 3 1 3 0.52428800000000000000e6 +12 4 1 2 -0.52428800000000000000e6 +13 1 2 3 -0.26214400000000000000e6 +13 3 2 2 0.52428800000000000000e6 +14 1 2 5 -0.52428800000000000000e6 +14 3 2 3 0.52428800000000000000e6 +15 1 4 5 -0.26214400000000000000e6 +15 3 3 3 0.52428800000000000000e6 +16 1 1 4 -0.26214400000000000000e6 +16 4 1 1 0.52428800000000000000e6 +17 1 1 6 -0.52428800000000000000e6 +17 4 1 3 0.52428800000000000000e6 +18 1 2 5 -0.26214400000000000000e6 +18 4 2 2 0.52428800000000000000e6 +19 1 4 5 -0.52428800000000000000e6 +19 4 2 3 0.52428800000000000000e6 +20 4 1 2 -0.26214400000000000000e6 +20 5 1 1 0.52428800000000000000e6 +21 1 2 5 -0.52428800000000000000e6 +21 5 1 2 0.52428800000000000000e6 +22 1 4 5 -0.52428800000000000000e6 +22 5 1 3 0.52428800000000000000e6 +23 1 1 1 -0.52428800000000000000e6 +23 1 3 3 -0.52428800000000000000e6 +23 1 5 6 0.26214400000000000000e6 +23 1 6 6 -0.52428800000000000000e6 +23 2 1 1 -0.52428800000000000000e6 +23 5 2 2 0.52428800000000000000e6 +24 1 3 6 -0.52428800000000000000e6 +24 5 2 3 0.52428800000000000000e6 +25 1 5 6 -0.26214400000000000000e6 +25 5 3 3 0.52428800000000000000e6 +*** ANSWER *** +-4.113697398682738004e-09 8.215094087406949078e-09 1.106563519105026888e-08 -6.332908356568953188e-09 -2.931819407167173368e-05 -2.931818908533051569e-05 -5.000000074902808400e-01 1.106405735886701213e-08 -4.451398475879184303e-09 9.999643968605362865e-01 5.868338520830287551e-09 -1.415827732183235363e-09 8.903640791049248497e-09 -7.865132682789377989e-09 8.902267568543103993e-09 5.889851427419620259e-09 -1.423050516012667677e-09 8.903577047039871176e-09 -7.862722209332731223e-09 1.916770858206847272e-09 -2.334896842407189883e-12 -4.728327014591874540e-13 5.419760765973143563e-09 -5.673174330751571568e-09 5.419709023311579812e-09 +1 1 1 1 5.145820320597975853e-03 +1 1 1 2 -1.538349733204534900e-03 +1 1 1 3 -2.156762181760575343e-03 +1 1 1 4 -1.543989212589488933e-03 +1 1 1 5 4.307075248898414518e-03 +1 1 1 6 -2.154287943343585060e-03 +1 1 2 2 5.934786836522373127e-03 +1 1 2 3 -2.334036011528814198e-03 +1 1 2 4 -3.320267856448823329e-03 +1 1 2 5 1.537296551871073191e+01 +1 1 2 6 -1.537117733344862991e+01 +1 1 3 3 5.242880051458203234e+05 +1 1 3 4 -1.537117471916976541e+01 +1 1 3 5 -2.621440039270643611e+05 +1 1 3 6 -2.621346638762312068e+05 +1 1 4 4 5.933959598042677815e-03 +1 1 4 5 1.537296623622133751e+01 +1 1 4 6 -2.333814804121745780e-03 +1 1 5 5 5.242693338344239164e+05 +1 1 5 6 -2.621440039270507987e+05 +1 1 6 6 5.242880051458203234e+05 +1 2 1 1 5.242880051458203234e+05 +1 3 1 1 3.209906559886079556e-03 +1 3 1 2 -7.440276897621063423e-04 +1 3 1 3 -7.423014900508841021e-04 +1 3 2 2 4.801279116534638153e-03 +1 3 2 3 -4.123594683994277407e-03 +1 3 3 3 4.800559152453337530e-03 +1 4 1 1 3.221185518655987623e-03 +1 4 1 2 -7.469758822524820993e-04 +1 4 1 3 -7.460883089392495110e-04 +1 4 2 2 4.801245696315449736e-03 +1 4 2 3 -4.122330901686638988e-03 +1 4 3 3 4.800836701720500449e-03 +1 5 1 1 1.138147053184561299e-03 +1 5 1 2 -1.224158395711980769e-06 +1 5 1 3 -2.479005113826344719e-07 +1 5 2 2 2.974722625947537249e-03 +1 5 2 3 -2.974377223521079954e-03 +1 5 3 3 2.974695497890991313e-03 +2 1 1 1 1.249995407955173832e+00 +2 1 1 2 1.365127722796842358e+00 +2 1 1 3 2.318470342619831204e+00 +2 1 1 4 1.362163827090625556e+00 +2 1 1 5 2.318434467058817283e+00 +2 1 1 6 2.318450736222450903e+00 +2 1 2 2 2.568470340662027507e+00 +2 1 2 3 6.025700354917745472e+00 +2 1 2 4 2.318434463742098828e+00 +2 1 2 5 6.025697878574734823e+00 +2 1 2 6 6.025682965414580039e+00 +2 1 3 3 3.435647860755638703e+03 +2 1 3 4 6.025697880543860130e+00 +2 1 3 5 3.435775612968312544e+03 +2 1 3 6 3.435653369933564591e+03 +2 1 4 4 2.568450733625221361e+00 +2 1 4 5 6.025682974288950611e+00 +2 1 4 6 6.025662481860707409e+00 +2 1 5 5 3.435903369964215926e+03 +2 1 5 6 3.435781122368971864e+03 +2 1 6 6 3.435658879141153648e+03 +2 2 1 1 1.279963716390136885e-08 +2 3 1 1 1.615127722792867315e+00 +2 3 1 2 2.318470340660159668e+00 +2 3 1 3 2.318434463702130799e+00 +2 3 2 2 6.275700356768556532e+00 +2 3 2 3 6.025697877918420708e+00 +2 3 3 3 6.275682968722814614e+00 +2 4 1 1 1.612163827043817665e+00 +2 4 1 2 2.318434463702042425e+00 +2 4 1 3 2.318450733617516857e+00 +2 4 2 2 6.275697877761073684e+00 +2 4 2 3 6.025682968550636787e+00 +2 4 3 3 6.275662481899622058e+00 +2 5 1 1 2.568434463701084081e+00 +2 5 1 2 6.025697877856011964e+00 +2 5 1 3 6.025682968701328690e+00 +2 5 2 2 3.436025613004531351e+03 +2 5 2 3 3.435653369841461881e+03 +2 5 3 3 3.436031122293553381e+03 +*** END *** +*** REQUEST *** +"" +2 +3 +2 1 1 +0.15728640000000000000e7 0.52428800000000000000e6 +0 1 1 2 0.52428800000000000000e6 +0 1 2 2 -0.10485760000000000000e7 +0 2 1 1 -0.10485760000000000000e7 +1 1 1 1 0.10485760000000000000e7 +1 1 1 2 -0.52428800000000000000e6 +1 1 2 2 0.10485760000000000000e7 +1 2 1 1 0.10485760000000000000e7 +2 1 1 2 -0.52428800000000000000e6 +2 3 1 1 0.10485760000000000000e7 +*** ANSWER *** +3.333333330935131511e-01 -1.478241289070492609e-11 +1 1 1 1 3.495253334203167469e+05 +1 1 1 2 -6.990506665331815602e+05 +1 1 2 2 1.398101333420316689e+06 +1 2 1 1 1.398101333420316689e+06 +1 3 1 1 3.229526064989188434e-04 +2 1 1 1 1.999999999076024881e+00 +2 1 1 2 9.999999992811959837e-01 +2 1 2 2 4.999999998586800998e-01 +2 2 1 1 3.464905364927463821e-10 +2 3 1 1 1.499999999281195651e+00 +*** END *** +*** REQUEST *** +"" +1 +6 +1 1 1 1 1 1 +-0.10485760000000000000e7 +0 1 1 1 0.10485760000000000000e7 +1 1 1 1 -0.10485760000000000000e7 +1 2 1 1 -0.10485760000000000000e7 +1 3 1 1 0.10485760000000000000e7 +1 4 1 1 -0.10485760000000000000e7 +1 5 1 1 0.10485760000000000000e7 +1 6 1 1 -0.10485760000000000000e7 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +16 +16 +5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +0.11796480000000000000e7 -0.52428800000000000000e6 -0.52428800000000000000e6 0.13107200000000000000e7 -0.52428800000000000000e6 0.10485760000000000000e7 -0.52428800000000000000e6 0.91750400000000000000e6 0.91750400000000000000e6 0.26214400000000000000e6 0.26214400000000000000e6 0.26214400000000000000e6 0.26214400000000000000e6 0.0 0.26214400000000000000e6 0.78643200000000000000e6 +0 1 1 4 -0.39321600000000000000e6 +0 1 2 2 0.26214400000000000000e6 +0 1 2 5 -0.13107200000000000000e6 +0 1 3 3 -0.26214400000000000000e6 +0 1 3 4 0.26214400000000000000e6 +0 1 4 4 -0.26214400000000000000e6 +0 1 4 5 0.13107200000000000000e6 +0 2 1 1 -0.52428800000000000000e6 +0 4 1 1 -0.26214400000000000000e6 +0 6 1 1 -0.52428800000000000000e6 +0 8 1 1 0.52428800000000000000e6 +0 10 1 1 -0.26214400000000000000e6 +0 12 1 1 -0.52428800000000000000e6 +1 1 1 1 0.52428800000000000000e6 +1 1 1 4 0.39321600000000000000e6 +1 1 2 2 -0.26214400000000000000e6 +1 1 2 5 0.13107200000000000000e6 +1 1 3 3 0.26214400000000000000e6 +1 1 3 4 -0.26214400000000000000e6 +1 1 4 4 0.26214400000000000000e6 +1 1 4 5 -0.13107200000000000000e6 +1 2 1 1 0.52428800000000000000e6 +1 4 1 1 0.26214400000000000000e6 +1 6 1 1 0.52428800000000000000e6 +1 8 1 1 -0.52428800000000000000e6 +1 10 1 1 0.26214400000000000000e6 +1 12 1 1 0.52428800000000000000e6 +2 1 1 2 0.52428800000000000000e6 +2 12 1 1 -0.10485760000000000000e7 +3 1 1 3 0.52428800000000000000e6 +3 8 1 1 -0.10485760000000000000e7 +4 1 1 4 0.26214400000000000000e6 +4 1 1 5 0.52428800000000000000e6 +4 1 2 2 -0.52428800000000000000e6 +4 1 2 5 0.26214400000000000000e6 +4 1 3 3 0.52428800000000000000e6 +4 1 3 4 -0.52428800000000000000e6 +4 1 4 4 0.52428800000000000000e6 +4 1 4 5 -0.26214400000000000000e6 +4 4 1 1 0.52428800000000000000e6 +4 6 1 1 0.10485760000000000000e7 +4 10 1 1 0.52428800000000000000e6 +5 1 2 3 0.52428800000000000000e6 +5 16 1 1 -0.10485760000000000000e7 +6 1 1 4 0.52428800000000000000e6 +6 1 2 4 0.52428800000000000000e6 +6 1 3 4 -0.52428800000000000000e6 +6 1 4 4 0.10485760000000000000e7 +6 1 4 5 -0.52428800000000000000e6 +6 6 1 1 0.10485760000000000000e7 +7 1 3 5 0.52428800000000000000e6 +7 10 1 1 -0.10485760000000000000e7 +8 1 1 4 0.13107200000000000000e6 +8 1 2 2 -0.26214400000000000000e6 +8 1 2 5 -0.13107200000000000000e6 +8 1 3 3 0.26214400000000000000e6 +8 1 3 4 -0.26214400000000000000e6 +8 1 4 4 0.26214400000000000000e6 +8 1 4 5 -0.39321600000000000000e6 +8 1 5 5 0.52428800000000000000e6 +8 4 1 1 -0.26214400000000000000e6 +8 6 1 1 0.52428800000000000000e6 +8 10 1 1 0.78643200000000000000e6 +9 1 1 4 0.13107200000000000000e6 +9 1 2 2 -0.26214400000000000000e6 +9 1 2 5 0.13107200000000000000e6 +9 1 3 3 0.26214400000000000000e6 +9 1 3 4 -0.26214400000000000000e6 +9 1 4 4 0.26214400000000000000e6 +9 1 4 5 -0.13107200000000000000e6 +9 3 1 1 0.52428800000000000000e6 +9 4 1 1 0.26214400000000000000e6 +9 6 1 1 0.52428800000000000000e6 +9 10 1 1 0.26214400000000000000e6 +10 1 1 4 -0.26214400000000000000e6 +10 5 1 1 0.52428800000000000000e6 +11 1 4 5 -0.26214400000000000000e6 +11 7 1 1 0.52428800000000000000e6 +12 1 3 3 -0.52428800000000000000e6 +12 1 3 4 0.26214400000000000000e6 +12 8 1 1 0.52428800000000000000e6 +12 9 1 1 0.52428800000000000000e6 +12 10 1 1 -0.52428800000000000000e6 +12 16 1 1 0.52428800000000000000e6 +13 1 3 4 -0.26214400000000000000e6 +13 11 1 1 0.52428800000000000000e6 +14 1 1 4 -0.26214400000000000000e6 +14 1 2 2 0.52428800000000000000e6 +14 1 2 5 -0.26214400000000000000e6 +14 1 3 4 0.26214400000000000000e6 +14 1 4 4 -0.52428800000000000000e6 +14 1 4 5 0.26214400000000000000e6 +14 6 1 1 -0.52428800000000000000e6 +14 12 1 1 0.52428800000000000000e6 +14 13 1 1 0.52428800000000000000e6 +14 16 1 1 -0.52428800000000000000e6 +15 1 2 5 -0.26214400000000000000e6 +15 14 1 1 0.52428800000000000000e6 +16 1 1 4 0.26214400000000000000e6 +16 1 3 4 -0.26214400000000000000e6 +16 1 4 4 0.52428800000000000000e6 +16 1 4 5 -0.26214400000000000000e6 +16 6 1 1 0.52428800000000000000e6 +16 15 1 1 0.52428800000000000000e6 +*** ANSWER *** +-2.510945831846816927e-10 7.584564995981076880e-11 -3.980910209918642198e-10 1.344946711011189854e-10 -8.782665206711593718e-11 -5.852309807939336404e-11 -6.669457535662038939e-11 9.130977785251912681e-10 9.999999956372092047e-01 9.999999994808139725e-01 -8.835712425264707961e-11 9.999999984230395489e-01 4.308129358900289983e-10 9.999999981672165195e-01 -8.823106083428535072e-11 -1.165612788739154225e-10 +1 1 1 1 2.212302206669363239e-04 +1 1 1 2 3.976496412612926835e-05 +1 1 1 3 -2.087143452137825081e-04 +1 1 1 4 3.968027478773667252e-05 +1 1 1 5 7.051394212226347064e-05 +1 1 2 2 2.915950003628733217e-04 +1 1 2 3 -4.604645975896408047e-05 +1 1 2 4 -3.068295804584898805e-05 +1 1 2 5 -1.855933114523877075e-04 +1 1 3 3 2.800322674859963973e-04 +1 1 3 4 -4.591486881397235237e-05 +1 1 3 5 -3.496716552457179071e-05 +1 1 4 4 2.916795673287685825e-04 +1 1 4 5 -1.856025585861981186e-04 +1 1 5 5 8.316023056030817651e-04 +1 2 1 1 5.242880002212302061e+05 +1 3 1 1 5.242879980655172840e+05 +1 4 1 1 5.242879989745246130e+05 +1 5 1 1 5.242880000806730241e+05 +1 6 1 1 5.242879993920542765e+05 +1 7 1 1 3.065515175354948871e-04 +1 8 1 1 7.516911745527959064e-05 +1 9 1 1 5.242879995260946453e+05 +1 10 1 1 8.286927941707541295e-04 +1 11 1 1 5.787461500275786763e-04 +1 12 1 1 1.048575999180793995e+06 +1 13 1 1 5.242879993919697590e+05 +1 14 1 1 3.066176110729816259e-04 +1 15 1 1 2.917644177174187267e-04 +1 16 1 1 5.790939308351686354e-04 +2 1 1 1 4.999999995412071740e+00 +2 1 1 2 -4.999999997132525964e-01 +2 1 1 3 3.499999996272315617e+00 +2 1 1 4 -4.999999994265048597e-01 +2 1 1 5 -4.999999994265205139e-01 +2 1 2 2 1.769334399945482472e+00 +2 1 2 3 2.097821616243047416e-01 +2 1 2 4 5.939370707022715301e-01 +2 1 2 5 6.534893098836872527e-01 +2 1 3 3 3.945717502585247782e+00 +2 1 3 4 2.118080333013511174e-01 +2 1 3 5 -2.412731081381683934e-02 +2 1 4 4 1.771232264389578592e+00 +2 1 4 5 6.533613029374879533e-01 +2 1 5 5 8.309779247819940595e-01 +2 2 1 1 5.734958065775951020e-10 +2 3 1 1 5.734956070477661528e-10 +2 4 1 1 5.734956949562236244e-10 +2 5 1 1 5.734957864291148522e-10 +2 6 1 1 5.734957130731152026e-10 +2 7 1 1 1.153361302937487176e+00 +2 8 1 1 3.999999996272334268e+00 +2 9 1 1 5.734957845436244747e-10 +2 10 1 1 4.758726891861830288e-01 +2 11 1 1 7.118080333013501182e-01 +2 12 1 1 2.867478780824246656e-10 +2 13 1 1 5.734957129228942403e-10 +2 14 1 1 1.153489309883686920e+00 +2 15 1 1 1.093937070702268199e+00 +2 16 1 1 7.097821616243046305e-01 +*** END *** +*** REQUEST *** +"" +1 +6 +1 1 1 1 1 1 +0.10485760000000000000e7 +0 1 1 1 0.10485760000000000000e7 +1 1 1 1 0.10485760000000000000e7 +1 2 1 1 0.10485760000000000000e7 +1 3 1 1 0.10485760000000000000e7 +1 4 1 1 -0.10485760000000000000e7 +1 5 1 1 0.10485760000000000000e7 +1 6 1 1 -0.10485760000000000000e7 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +16 +16 +5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +-0.26214400000000000000e6 -0.52428800000000000000e6 -0.52428800000000000000e6 0.15728640000000000000e7 -0.52428800000000000000e6 0.0 -0.26214400000000000000e6 -0.52428800000000000000e6 0.10485760000000000000e7 0.26214400000000000000e6 0.26214400000000000000e6 0.10485760000000000000e7 0.26214400000000000000e6 0.52428800000000000000e6 0.26214400000000000000e6 0.26214400000000000000e6 +0 1 1 4 0.26214400000000000000e6 +0 1 2 5 -0.26214400000000000000e6 +0 1 4 5 -0.26214400000000000000e6 +0 1 5 5 0.52428800000000000000e6 +0 2 1 1 -0.52428800000000000000e6 +0 4 1 1 0.52428800000000000000e6 +0 8 1 1 -0.52428800000000000000e6 +0 10 1 1 0.52428800000000000000e6 +0 12 1 1 0.52428800000000000000e6 +1 1 1 1 0.52428800000000000000e6 +1 1 1 4 -0.26214400000000000000e6 +1 1 2 5 0.26214400000000000000e6 +1 1 4 5 0.26214400000000000000e6 +1 1 5 5 -0.52428800000000000000e6 +1 2 1 1 0.52428800000000000000e6 +1 4 1 1 -0.52428800000000000000e6 +1 8 1 1 0.52428800000000000000e6 +1 10 1 1 -0.52428800000000000000e6 +1 12 1 1 -0.52428800000000000000e6 +2 1 1 2 0.52428800000000000000e6 +2 12 1 1 -0.10485760000000000000e7 +3 1 1 3 0.52428800000000000000e6 +3 8 1 1 -0.10485760000000000000e7 +4 1 1 5 0.52428800000000000000e6 +4 1 2 5 -0.52428800000000000000e6 +4 1 4 5 -0.52428800000000000000e6 +4 1 5 5 0.10485760000000000000e7 +4 4 1 1 0.10485760000000000000e7 +4 10 1 1 0.10485760000000000000e7 +5 1 2 3 0.52428800000000000000e6 +5 16 1 1 -0.10485760000000000000e7 +6 1 1 4 -0.52428800000000000000e6 +6 1 2 4 0.52428800000000000000e6 +6 1 3 4 -0.52428800000000000000e6 +6 1 4 4 0.10485760000000000000e7 +6 1 4 5 -0.52428800000000000000e6 +6 6 1 1 -0.10485760000000000000e7 +7 1 1 4 -0.78643200000000000000e6 +7 1 2 2 -0.52428800000000000000e6 +7 1 2 5 0.26214400000000000000e6 +7 1 3 3 0.52428800000000000000e6 +7 1 3 4 -0.52428800000000000000e6 +7 1 4 4 0.52428800000000000000e6 +7 1 4 5 -0.26214400000000000000e6 +7 4 1 1 -0.52428800000000000000e6 +7 6 1 1 -0.10485760000000000000e7 +7 10 1 1 0.52428800000000000000e6 +8 1 3 5 0.52428800000000000000e6 +8 10 1 1 -0.10485760000000000000e7 +9 1 2 5 -0.26214400000000000000e6 +9 1 4 5 -0.26214400000000000000e6 +9 1 5 5 0.52428800000000000000e6 +9 3 1 1 0.52428800000000000000e6 +9 4 1 1 0.52428800000000000000e6 +9 10 1 1 0.52428800000000000000e6 +10 1 1 4 -0.26214400000000000000e6 +10 5 1 1 0.52428800000000000000e6 +11 1 4 5 -0.26214400000000000000e6 +11 7 1 1 0.52428800000000000000e6 +12 1 1 4 0.78643200000000000000e6 +12 1 2 2 0.52428800000000000000e6 +12 1 2 5 -0.26214400000000000000e6 +12 1 3 4 0.26214400000000000000e6 +12 1 4 4 -0.52428800000000000000e6 +12 1 4 5 0.26214400000000000000e6 +12 4 1 1 0.52428800000000000000e6 +12 6 1 1 0.10485760000000000000e7 +12 8 1 1 0.52428800000000000000e6 +12 9 1 1 0.52428800000000000000e6 +12 16 1 1 -0.52428800000000000000e6 +13 1 3 4 -0.26214400000000000000e6 +13 11 1 1 0.52428800000000000000e6 +14 1 1 4 -0.26214400000000000000e6 +14 1 2 2 -0.52428800000000000000e6 +14 1 2 5 0.26214400000000000000e6 +14 1 3 4 -0.26214400000000000000e6 +14 1 4 4 0.52428800000000000000e6 +14 1 4 5 -0.26214400000000000000e6 +14 6 1 1 -0.52428800000000000000e6 +14 12 1 1 0.52428800000000000000e6 +14 13 1 1 0.52428800000000000000e6 +14 16 1 1 0.52428800000000000000e6 +15 1 2 5 -0.26214400000000000000e6 +15 14 1 1 0.52428800000000000000e6 +16 1 1 4 -0.26214400000000000000e6 +16 1 3 4 -0.26214400000000000000e6 +16 1 4 4 0.52428800000000000000e6 +16 1 4 5 -0.26214400000000000000e6 +16 6 1 1 -0.52428800000000000000e6 +16 15 1 1 0.52428800000000000000e6 +*** ANSWER *** +5.971802404885320773e-11 -3.502156570007520369e-10 1.582565515461167484e-10 1.581307857780074475e-10 -1.929547772322441932e-10 9.017698861213426687e-11 1.396679925039875230e-10 7.818207487653054736e-11 9.999999998832547199e-01 9.999999980736424821e-01 3.275620235594100367e-11 9.999999994214049392e-01 3.296132408197630990e-11 9.999999991834543911e-01 1.474133598215077482e-10 4.368570581248094817e-10 +1 1 1 1 2.199547425220330782e-04 +1 1 1 2 -1.836138663776102839e-04 +1 1 1 3 8.297201089701045779e-05 +1 1 1 4 -2.328237002816599746e-05 +1 1 1 5 8.290607341397996863e-05 +1 1 2 2 2.401736641410717743e-04 +1 1 2 3 -1.011638742455388436e-04 +1 1 2 4 4.727871300547865051e-05 +1 1 2 5 -1.010549733898909869e-04 +1 1 3 3 2.618715515834381044e-04 +1 1 3 4 -1.812877337190460514e-04 +1 1 3 5 4.098992367286644761e-05 +1 1 4 4 4.607132405925265517e-04 +1 1 4 5 -1.812680911757614394e-04 +1 1 5 5 2.619397892190400423e-04 +1 2 1 1 5.242880002199547598e+05 +1 3 1 1 5.242880001274370588e+05 +1 4 1 1 5.242879998853630968e+05 +1 5 1 1 5.242879991786791943e+05 +1 6 1 1 5.242879995400006883e+05 +1 7 1 1 2.058189829502996872e-04 +1 8 1 1 1.048575999750660267e+06 +1 9 1 1 5.242879998852948193e+05 +1 10 1 1 2.531862059070716375e-04 +1 11 1 1 2.059265258097988521e-04 +1 12 1 1 9.645853459013106410e-05 +1 13 1 1 5.242879997605402605e+05 +1 14 1 1 2.659323547236063651e-04 +1 15 1 1 4.176842124196467401e-04 +1 16 1 1 2.662183916312815812e-04 +2 1 1 1 4.999999994297863459e+00 +2 1 1 2 3.499999995367001571e+00 +2 1 1 3 -4.999999996436219618e-01 +2 1 1 4 -4.999999992872352639e-01 +2 1 1 5 -4.999999992872350418e-01 +2 1 2 2 5.258240706974768308e+00 +2 1 2 3 1.144477055802266996e+00 +2 1 2 4 5.327061603310668803e-01 +2 1 2 5 1.146469815423802219e+00 +2 1 3 3 3.078799030784226787e+00 +2 1 3 4 1.570189299411191675e+00 +2 1 3 5 1.135867323360094217e+00 +2 1 4 4 2.107611970420752101e+00 +2 1 4 5 1.570128829915098834e+00 +2 1 5 5 3.080731320553277808e+00 +2 2 1 1 7.127641625703903930e-10 +2 3 1 1 7.127641642295724267e-10 +2 4 1 1 7.127641355596942277e-10 +2 5 1 1 7.127641336669494762e-10 +2 6 1 1 7.127641632172687931e-10 +2 7 1 1 2.070128829915097057e+00 +2 8 1 1 3.563820808107773367e-10 +2 9 1 1 7.127641354447095051e-10 +2 10 1 1 1.635867323360092884e+00 +2 11 1 1 2.070189299411189232e+00 +2 12 1 1 3.999999995367003347e+00 +2 13 1 1 7.127641809638762787e-10 +2 14 1 1 1.646469815423801553e+00 +2 15 1 1 1.032706160331063439e+00 +2 16 1 1 1.644477055802265664e+00 +*** END *** +*** REQUEST *** +"" +1 +1 +7 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.20000000000000000000e1 +0 1 3 3 -0.60000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.20000000000000000000e1 +0 1 6 6 0.60000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 0.0 +1 1 3 3 0.0 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.0 +1 1 6 6 0.0 +1 1 7 7 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +1 +1 +7 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 0.0 +0 1 3 3 0.0 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.0 +0 1 6 6 0.0 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.20000000000000000000e1 +1 1 3 3 -0.60000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.20000000000000000000e1 +1 1 6 6 0.60000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +2 +1 +8 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.40000000000000000000e1 +0 1 3 3 -0.40000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.40000000000000000000e1 +0 1 6 6 0.40000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 0.0 +1 1 3 3 0.0 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.0 +1 1 6 6 0.0 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.20000000000000000000e1 +2 1 3 3 -0.60000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.20000000000000000000e1 +2 1 6 6 0.60000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +2 +1 +8 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 0.0 +0 1 3 3 0.0 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.0 +0 1 6 6 0.0 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.20000000000000000000e1 +1 1 3 3 -0.60000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.20000000000000000000e1 +1 1 6 6 0.60000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.40000000000000000000e1 +2 1 3 3 -0.40000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.40000000000000000000e1 +2 1 6 6 0.40000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +2 +1 +8 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.20000000000000000000e1 +0 1 3 3 -0.60000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.20000000000000000000e1 +0 1 6 6 0.60000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.40000000000000000000e1 +1 1 3 3 -0.40000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.40000000000000000000e1 +1 1 6 6 0.40000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 0.0 +2 1 3 3 0.0 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.0 +2 1 6 6 0.0 +2 1 8 8 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +3 +1 +9 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.20000000000000000000e1 +0 1 3 3 -0.40000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.20000000000000000000e1 +0 1 6 6 0.40000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.40000000000000000000e1 +1 1 3 3 -0.40000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.40000000000000000000e1 +1 1 6 6 0.40000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 0.0 +2 1 3 3 0.0 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.0 +2 1 6 6 0.0 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.20000000000000000000e1 +3 1 3 3 -0.60000000000000000000e1 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.20000000000000000000e1 +3 1 6 6 0.60000000000000000000e1 +3 1 9 9 0.10000000000000000000e1 +*** ANSWER *** +2.499999999999939770e-01 2.499999991497890706e-01 5.000000000000061062e-01 +1 1 1 1 2.066352971081550851e-09 +1 1 2 2 1.216153852604979695e-09 +1 1 3 3 1.216129793015919655e-09 +1 1 4 4 3.659310566000841584e-10 +1 1 5 5 1.216130347246527629e-09 +1 1 6 6 1.216154517800460636e-09 +1 1 7 7 2.500000012161360807e-01 +1 1 8 8 2.500000003659312298e-01 +1 1 9 9 5.000000012161481822e-01 +2 1 1 1 1.445595551241661558e-01 +2 1 2 2 3.988509021996953230e-01 +2 1 3 3 3.988509010278680211e-01 +2 1 4 4 1.144559553366768734e+00 +2 1 5 5 3.988509019800207112e-01 +2 1 6 6 3.988509012475425219e-01 +2 1 7 7 1.757397773942928798e-09 +2 1 8 8 1.757397491173168691e-09 +2 1 9 9 8.786988504662568140e-10 +*** END *** +*** REQUEST *** +"" +3 +1 +9 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.60000000000000000000e1 +0 1 3 3 -0.20000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.60000000000000000000e1 +0 1 6 6 0.20000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.20000000000000000000e1 +1 1 3 3 -0.60000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.20000000000000000000e1 +1 1 6 6 0.60000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.40000000000000000000e1 +2 1 3 3 -0.40000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.40000000000000000000e1 +2 1 6 6 0.40000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 0.0 +3 1 3 3 0.0 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.0 +3 1 6 6 0.0 +3 1 9 9 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +3 +1 +9 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.20000000000000000000e1 +0 1 3 3 -0.60000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.20000000000000000000e1 +0 1 6 6 0.60000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.40000000000000000000e1 +1 1 3 3 -0.40000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.40000000000000000000e1 +1 1 6 6 0.40000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 0.0 +2 1 3 3 0.0 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.0 +2 1 6 6 0.0 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.60000000000000000000e1 +3 1 3 3 -0.20000000000000000000e1 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.60000000000000000000e1 +3 1 6 6 0.20000000000000000000e1 +3 1 9 9 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +3 +1 +9 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.40000000000000000000e1 +0 1 3 3 -0.40000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.40000000000000000000e1 +0 1 6 6 0.40000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 0.0 +1 1 3 3 0.0 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.0 +1 1 6 6 0.0 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.60000000000000000000e1 +2 1 3 3 -0.20000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.60000000000000000000e1 +2 1 6 6 0.20000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.20000000000000000000e1 +3 1 3 3 -0.60000000000000000000e1 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.20000000000000000000e1 +3 1 6 6 0.60000000000000000000e1 +3 1 9 9 0.10000000000000000000e1 +*** ANSWER *** +-2.788429749614535881e-09 4.999999999177147103e-01 4.999999999177147103e-01 +1 1 1 1 7.179446380522872096e-09 +1 1 2 2 4.884728511558652836e-09 +1 1 3 3 4.884728533079615974e-09 +1 1 4 4 1.273445781270666261e-09 +1 1 5 5 3.568164078541628250e-09 +1 1 6 6 3.568164092148815501e-09 +1 1 7 7 1.438016387172196853e-09 +1 1 8 8 5.000000041441609033e-01 +1 1 9 9 5.000000041441609033e-01 +2 1 1 1 1.361603717443017059e-01 +2 1 2 2 2.887940324864630703e-01 +2 1 3 3 2.887940323968900547e-01 +2 1 4 4 5.781475570704999178e-01 +2 1 5 5 3.585456340583702550e-01 +2 1 6 6 3.585456339687972394e-01 +2 1 7 7 5.580128146738018158e-01 +2 1 8 8 2.098544929105395392e-09 +2 1 9 9 2.098544929105395392e-09 +*** END *** +*** REQUEST *** +"" +3 +1 +9 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.40000000000000000000e1 +0 1 3 3 -0.20000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.40000000000000000000e1 +0 1 6 6 0.20000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 0.0 +1 1 3 3 0.0 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.0 +1 1 6 6 0.0 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.60000000000000000000e1 +2 1 3 3 -0.20000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.60000000000000000000e1 +2 1 6 6 0.20000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.20000000000000000000e1 +3 1 3 3 -0.60000000000000000000e1 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.20000000000000000000e1 +3 1 6 6 0.60000000000000000000e1 +3 1 9 9 0.10000000000000000000e1 +*** ANSWER *** +2.499999991313227865e-01 6.250000000000014433e-01 1.249999999999993339e-01 +1 1 1 1 2.109153765807002391e-09 +1 1 2 2 1.240469909716638290e-09 +1 1 3 3 1.240478608624410276e-09 +1 1 4 4 3.718005961197065859e-10 +1 1 5 5 1.240485101874256245e-09 +1 1 6 6 1.240475863013758120e-09 +1 1 7 7 2.500000003718000352e-01 +1 1 8 8 6.250000012404786087e-01 +1 1 9 9 1.250000012404765548e-01 +2 1 1 1 1.458711312867337351e-01 +2 1 2 2 3.999518150231188840e-01 +2 1 3 3 3.999518200193077355e-01 +2 1 4 4 1.145871129479727690e+00 +2 1 5 5 3.999518153393448738e-01 +2 1 6 6 3.999518196127314074e-01 +2 1 7 7 1.807005178384962509e-09 +2 1 8 8 7.228021568036778830e-10 +2 1 9 9 3.614011280095209241e-09 +*** END *** +*** REQUEST *** +"" +2 +1 +8 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 0.0 +0 1 3 3 0.0 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.0 +0 1 6 6 0.0 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.60000000000000000000e1 +1 1 3 3 -0.20000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.60000000000000000000e1 +1 1 6 6 0.20000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.20000000000000000000e1 +2 1 3 3 -0.60000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.20000000000000000000e1 +2 1 6 6 0.60000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +2 +1 +8 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.60000000000000000000e1 +0 1 3 3 -0.20000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.60000000000000000000e1 +0 1 6 6 0.20000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.20000000000000000000e1 +1 1 3 3 -0.60000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.20000000000000000000e1 +1 1 6 6 0.60000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 0.0 +2 1 3 3 0.0 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.0 +2 1 6 6 0.0 +2 1 8 8 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +3 +1 +9 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.20000000000000000000e1 +0 1 3 3 -0.20000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.20000000000000000000e1 +0 1 6 6 0.20000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.20000000000000000000e1 +1 1 3 3 -0.60000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.20000000000000000000e1 +1 1 6 6 0.60000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 0.0 +2 1 3 3 0.0 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.0 +2 1 6 6 0.0 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.60000000000000000000e1 +3 1 3 3 -0.20000000000000000000e1 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.60000000000000000000e1 +3 1 6 6 0.20000000000000000000e1 +3 1 9 9 0.10000000000000000000e1 +*** ANSWER *** +2.500000000000000555e-01 4.999999997801244933e-01 2.499999999999999722e-01 +1 1 1 1 6.029836856908079940e-10 +1 1 2 2 3.831082669073398970e-10 +1 1 3 3 3.831083685380603321e-10 +1 1 4 4 1.632329534566597461e-10 +1 1 5 5 3.831081006571161537e-10 +1 1 6 6 3.831082022877803405e-10 +1 1 7 7 2.500000003831083228e-01 +1 1 8 8 5.000000001632327606e-01 +1 1 9 9 2.500000003831082118e-01 +2 1 1 1 1.843439299686654986e-01 +2 1 2 2 5.010126711884240747e-01 +2 1 3 3 5.010126646015550245e-01 +2 1 4 4 1.184343929650067073e+00 +2 1 5 5 5.010126711485992645e-01 +2 1 6 6 5.010126645617302144e-01 +2 1 7 7 6.371972754652632367e-10 +2 1 8 8 3.185986247738911019e-10 +2 1 9 9 6.371972754652764716e-10 +*** END *** +*** REQUEST *** +"" +2 +1 +8 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.20000000000000000000e1 +0 1 3 3 -0.60000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.20000000000000000000e1 +0 1 6 6 0.60000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 0.0 +1 1 3 3 0.0 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.0 +1 1 6 6 0.0 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.60000000000000000000e1 +2 1 3 3 -0.20000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.60000000000000000000e1 +2 1 6 6 0.20000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +3 +1 +9 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 0.0 +0 1 3 3 -0.20000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.0 +0 1 6 6 0.20000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.60000000000000000000e1 +1 1 3 3 -0.20000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.60000000000000000000e1 +1 1 6 6 0.20000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.20000000000000000000e1 +2 1 3 3 -0.60000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.20000000000000000000e1 +2 1 6 6 0.60000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 0.0 +3 1 3 3 0.0 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.0 +3 1 6 6 0.0 +3 1 9 9 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +3 +1 +9 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.60000000000000000000e1 +0 1 3 3 -0.20000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.60000000000000000000e1 +0 1 6 6 0.20000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.20000000000000000000e1 +1 1 3 3 -0.60000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.20000000000000000000e1 +1 1 6 6 0.60000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 0.0 +2 1 3 3 0.0 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.0 +2 1 6 6 0.0 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 0.0 +3 1 3 3 -0.20000000000000000000e1 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.0 +3 1 6 6 0.20000000000000000000e1 +3 1 9 9 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +3 +1 +9 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.20000000000000000000e1 +0 1 3 3 -0.60000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.20000000000000000000e1 +0 1 6 6 0.60000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 0.0 +1 1 3 3 0.0 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.0 +1 1 6 6 0.0 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 0.0 +2 1 3 3 -0.20000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.0 +2 1 6 6 0.20000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.60000000000000000000e1 +3 1 3 3 -0.20000000000000000000e1 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.60000000000000000000e1 +3 1 6 6 0.20000000000000000000e1 +3 1 9 9 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +4 +1 +10 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.20000000000000000000e1 +0 1 3 3 0.0 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.20000000000000000000e1 +0 1 6 6 0.0 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 0.0 +1 1 3 3 0.0 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.0 +1 1 6 6 0.0 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 0.0 +2 1 3 3 -0.20000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.0 +2 1 6 6 0.20000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.60000000000000000000e1 +3 1 3 3 -0.20000000000000000000e1 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.60000000000000000000e1 +3 1 6 6 0.20000000000000000000e1 +3 1 9 9 0.10000000000000000000e1 +4 1 1 1 -0.10000000000000000000e1 +4 1 2 2 -0.20000000000000000000e1 +4 1 3 3 -0.60000000000000000000e1 +4 1 4 4 0.10000000000000000000e1 +4 1 5 5 0.20000000000000000000e1 +4 1 6 6 0.60000000000000000000e1 +4 1 10 10 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +4 +1 +10 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 0.0 +0 1 3 3 0.0 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.0 +0 1 6 6 0.0 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 0.0 +1 1 3 3 -0.20000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.0 +1 1 6 6 0.20000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.60000000000000000000e1 +2 1 3 3 -0.20000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.60000000000000000000e1 +2 1 6 6 0.20000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.20000000000000000000e1 +3 1 3 3 -0.60000000000000000000e1 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.20000000000000000000e1 +3 1 6 6 0.60000000000000000000e1 +3 1 9 9 0.10000000000000000000e1 +4 1 1 1 -0.10000000000000000000e1 +4 1 2 2 -0.20000000000000000000e1 +4 1 3 3 0.0 +4 1 4 4 0.10000000000000000000e1 +4 1 5 5 0.20000000000000000000e1 +4 1 6 6 0.0 +4 1 10 10 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +4 +1 +10 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 0.0 +0 1 3 3 -0.20000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.0 +0 1 6 6 0.20000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.60000000000000000000e1 +1 1 3 3 -0.20000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.60000000000000000000e1 +1 1 6 6 0.20000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.20000000000000000000e1 +2 1 3 3 -0.60000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.20000000000000000000e1 +2 1 6 6 0.60000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.20000000000000000000e1 +3 1 3 3 0.0 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.20000000000000000000e1 +3 1 6 6 0.0 +3 1 9 9 0.10000000000000000000e1 +4 1 1 1 -0.10000000000000000000e1 +4 1 2 2 0.0 +4 1 3 3 0.0 +4 1 4 4 0.10000000000000000000e1 +4 1 5 5 0.0 +4 1 6 6 0.0 +4 1 10 10 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +4 +1 +10 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.60000000000000000000e1 +0 1 3 3 -0.20000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.60000000000000000000e1 +0 1 6 6 0.20000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.20000000000000000000e1 +1 1 3 3 -0.60000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.20000000000000000000e1 +1 1 6 6 0.60000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.20000000000000000000e1 +2 1 3 3 0.0 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.20000000000000000000e1 +2 1 6 6 0.0 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 0.0 +3 1 3 3 0.0 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.0 +3 1 6 6 0.0 +3 1 9 9 0.10000000000000000000e1 +4 1 1 1 -0.10000000000000000000e1 +4 1 2 2 0.0 +4 1 3 3 -0.20000000000000000000e1 +4 1 4 4 0.10000000000000000000e1 +4 1 5 5 0.0 +4 1 6 6 0.20000000000000000000e1 +4 1 10 10 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +4 +1 +10 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.20000000000000000000e1 +0 1 3 3 -0.60000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.20000000000000000000e1 +0 1 6 6 0.60000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.20000000000000000000e1 +1 1 3 3 0.0 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.20000000000000000000e1 +1 1 6 6 0.0 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 0.0 +2 1 3 3 0.0 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.0 +2 1 6 6 0.0 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 0.0 +3 1 3 3 -0.20000000000000000000e1 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.0 +3 1 6 6 0.20000000000000000000e1 +3 1 9 9 0.10000000000000000000e1 +4 1 1 1 -0.10000000000000000000e1 +4 1 2 2 -0.60000000000000000000e1 +4 1 3 3 -0.20000000000000000000e1 +4 1 4 4 0.10000000000000000000e1 +4 1 5 5 0.60000000000000000000e1 +4 1 6 6 0.20000000000000000000e1 +4 1 10 10 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +5 +1 +11 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 0.0 +0 1 3 3 0.0 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.0 +0 1 6 6 0.0 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.60000000000000000000e1 +1 1 3 3 -0.20000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.60000000000000000000e1 +1 1 6 6 0.20000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.20000000000000000000e1 +2 1 3 3 -0.60000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.20000000000000000000e1 +2 1 6 6 0.60000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.20000000000000000000e1 +3 1 3 3 0.0 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.20000000000000000000e1 +3 1 6 6 0.0 +3 1 9 9 0.10000000000000000000e1 +4 1 1 1 -0.10000000000000000000e1 +4 1 2 2 0.0 +4 1 3 3 0.0 +4 1 4 4 0.10000000000000000000e1 +4 1 5 5 0.0 +4 1 6 6 0.0 +4 1 10 10 0.10000000000000000000e1 +5 1 1 1 -0.10000000000000000000e1 +5 1 2 2 0.0 +5 1 3 3 -0.20000000000000000000e1 +5 1 4 4 0.10000000000000000000e1 +5 1 5 5 0.0 +5 1 6 6 0.20000000000000000000e1 +5 1 11 11 0.10000000000000000000e1 +*** ANSWER *** +-4.479222704203390867e-10 -4.479222704204168416e-10 1.851236519032637209e-09 9.999999966087622649e-01 1.851236519032796028e-09 +1 1 1 1 1.798917800167473003e-09 +1 1 2 2 1.095213727084137733e-09 +1 1 3 3 1.095213727084150968e-09 +1 1 4 4 6.296993519616528324e-10 +1 1 5 5 1.333403476488979943e-09 +1 1 6 6 1.333403476488966708e-09 +1 1 7 7 7.663863313662197512e-10 +1 1 8 8 7.663863313661403419e-10 +1 1 9 9 3.065545120819191084e-09 +1 1 10 10 9.999999978230708075e-01 +1 1 11 11 3.065545120819363138e-09 +2 1 1 1 4.165262799462691734e-01 +2 1 2 2 9.372684186813985407e-01 +2 1 3 3 9.372684186813988738e-01 +2 1 4 4 1.416526279065039029e+00 +2 1 5 5 7.698362642285937474e-01 +2 1 6 6 7.698362642285954127e-01 +2 1 7 7 1.339457236503653004e+00 +2 1 8 8 1.339457236503657001e+00 +2 1 9 9 3.348643097868390650e-01 +2 1 10 10 8.812307146388788419e-10 +2 1 11 11 3.348643097868373442e-01 +*** END *** +*** REQUEST *** +"" +5 +1 +11 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 0.0 +0 1 3 3 -0.20000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.0 +0 1 6 6 0.20000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.60000000000000000000e1 +1 1 3 3 -0.20000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.60000000000000000000e1 +1 1 6 6 0.20000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.20000000000000000000e1 +2 1 3 3 -0.60000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.20000000000000000000e1 +2 1 6 6 0.60000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.20000000000000000000e1 +3 1 3 3 0.0 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.20000000000000000000e1 +3 1 6 6 0.0 +3 1 9 9 0.10000000000000000000e1 +4 1 1 1 -0.10000000000000000000e1 +4 1 2 2 0.0 +4 1 3 3 0.0 +4 1 4 4 0.10000000000000000000e1 +4 1 5 5 0.0 +4 1 6 6 0.0 +4 1 10 10 0.10000000000000000000e1 +5 1 1 1 -0.10000000000000000000e1 +5 1 2 2 0.0 +5 1 3 3 -0.20000000000000000000e1 +5 1 4 4 0.10000000000000000000e1 +5 1 5 5 0.0 +5 1 6 6 0.20000000000000000000e1 +5 1 11 11 0.10000000000000000000e1 +*** ANSWER *** +-1.658354578385335895e-10 5.328429437213907177e-10 -7.956783331845295445e-12 9.649376705070248449e-10 9.999999985592792351e-01 +1 1 1 1 4.006125676770940303e-10 +1 1 2 2 2.291205998047277993e-10 +1 1 3 3 2.999346893328956104e-10 +1 1 4 4 1.671478796272958388e-10 +1 1 5 5 3.386397473004992803e-10 +1 1 6 6 2.678255262536018497e-10 +1 1 7 7 1.180447157140795368e-10 +1 1 8 8 8.167231172740021896e-10 +1 1 9 9 2.759233902207687355e-10 +1 1 10 10 1.248817844059641280e-09 +1 1 11 11 9.999999988431594877e-01 +2 1 1 1 2.600416458149115151e-01 +2 1 2 2 7.661157217441234568e-01 +2 1 3 3 5.823864839627788115e-01 +2 1 4 4 1.115282668672960442e+00 +2 1 5 5 5.157053132028979192e-01 +2 1 6 6 6.547659724472930654e-01 +2 1 7 7 1.502462451420238487e+00 +2 1 8 8 2.113028633173273940e-01 +2 1 9 9 6.455797942243965970e-01 +2 1 10 10 1.447589771419519333e-01 +2 1 11 11 1.729173933877682574e-10 +*** END *** +*** REQUEST *** +"" +5 +1 +11 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 0.0 +0 1 3 3 -0.40000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.0 +0 1 6 6 0.40000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.60000000000000000000e1 +1 1 3 3 -0.20000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.60000000000000000000e1 +1 1 6 6 0.20000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.20000000000000000000e1 +2 1 3 3 -0.60000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.20000000000000000000e1 +2 1 6 6 0.60000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.20000000000000000000e1 +3 1 3 3 0.0 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.20000000000000000000e1 +3 1 6 6 0.0 +3 1 9 9 0.10000000000000000000e1 +4 1 1 1 -0.10000000000000000000e1 +4 1 2 2 0.0 +4 1 3 3 0.0 +4 1 4 4 0.10000000000000000000e1 +4 1 5 5 0.0 +4 1 6 6 0.0 +4 1 10 10 0.10000000000000000000e1 +5 1 1 1 -0.10000000000000000000e1 +5 1 2 2 0.0 +5 1 3 3 -0.20000000000000000000e1 +5 1 4 4 0.10000000000000000000e1 +5 1 5 5 0.0 +5 1 6 6 0.20000000000000000000e1 +5 1 11 11 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +5 +1 +11 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 0.0 +0 1 3 3 -0.60000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.0 +0 1 6 6 0.60000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.60000000000000000000e1 +1 1 3 3 -0.20000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.60000000000000000000e1 +1 1 6 6 0.20000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.20000000000000000000e1 +2 1 3 3 -0.60000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.20000000000000000000e1 +2 1 6 6 0.60000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.20000000000000000000e1 +3 1 3 3 0.0 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.20000000000000000000e1 +3 1 6 6 0.0 +3 1 9 9 0.10000000000000000000e1 +4 1 1 1 -0.10000000000000000000e1 +4 1 2 2 0.0 +4 1 3 3 0.0 +4 1 4 4 0.10000000000000000000e1 +4 1 5 5 0.0 +4 1 6 6 0.0 +4 1 10 10 0.10000000000000000000e1 +5 1 1 1 -0.10000000000000000000e1 +5 1 2 2 0.0 +5 1 3 3 -0.20000000000000000000e1 +5 1 4 4 0.10000000000000000000e1 +5 1 5 5 0.0 +5 1 6 6 0.20000000000000000000e1 +5 1 11 11 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +5 +1 +11 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.20000000000000000000e1 +0 1 3 3 0.0 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.20000000000000000000e1 +0 1 6 6 0.0 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.60000000000000000000e1 +1 1 3 3 -0.20000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.60000000000000000000e1 +1 1 6 6 0.20000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.20000000000000000000e1 +2 1 3 3 -0.60000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.20000000000000000000e1 +2 1 6 6 0.60000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.20000000000000000000e1 +3 1 3 3 0.0 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.20000000000000000000e1 +3 1 6 6 0.0 +3 1 9 9 0.10000000000000000000e1 +4 1 1 1 -0.10000000000000000000e1 +4 1 2 2 0.0 +4 1 3 3 0.0 +4 1 4 4 0.10000000000000000000e1 +4 1 5 5 0.0 +4 1 6 6 0.0 +4 1 10 10 0.10000000000000000000e1 +5 1 1 1 -0.10000000000000000000e1 +5 1 2 2 0.0 +5 1 3 3 -0.20000000000000000000e1 +5 1 4 4 0.10000000000000000000e1 +5 1 5 5 0.0 +5 1 6 6 0.20000000000000000000e1 +5 1 11 11 0.10000000000000000000e1 +*** ANSWER *** +5.328529000634050167e-10 -1.658385707744076861e-10 9.999999985592523677e-01 9.649562499940930920e-10 -7.956887685559986323e-12 +1 1 1 1 4.006196411413076790e-10 +1 1 2 2 2.999404097367630739e-10 +1 1 3 3 2.291249276684495517e-10 +1 1 4 4 1.671515247521178107e-10 +1 1 5 5 2.678306369739725748e-10 +1 1 6 6 3.386461278869371305e-10 +1 1 7 7 8.167384278410987715e-10 +1 1 8 8 1.180469570032856551e-10 +1 1 9 9 9.999999988431379494e-01 +1 1 10 10 1.248841777771783538e-09 +1 1 11 11 2.759286400921338976e-10 +2 1 1 1 2.600416453891800650e-01 +2 1 2 2 5.823864774775534547e-01 +2 1 3 3 7.661157215151184197e-01 +2 1 4 4 1.115282668690511514e+00 +2 1 5 5 6.547659657404256706e-01 +2 1 6 6 5.157053132959389385e-01 +2 1 7 7 2.113028635598032945e-01 +2 1 8 8 1.502462449488000562e+00 +2 1 9 9 1.729173937253001336e-10 +2 1 10 10 1.447589766986691895e-01 +2 1 11 11 6.455797931370278464e-01 +*** END *** +*** REQUEST *** +"" +5 +1 +11 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.20000000000000000000e1 +0 1 3 3 -0.20000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.20000000000000000000e1 +0 1 6 6 0.20000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.60000000000000000000e1 +1 1 3 3 -0.20000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.60000000000000000000e1 +1 1 6 6 0.20000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.20000000000000000000e1 +2 1 3 3 -0.60000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.20000000000000000000e1 +2 1 6 6 0.60000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.20000000000000000000e1 +3 1 3 3 0.0 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.20000000000000000000e1 +3 1 6 6 0.0 +3 1 9 9 0.10000000000000000000e1 +4 1 1 1 -0.10000000000000000000e1 +4 1 2 2 0.0 +4 1 3 3 0.0 +4 1 4 4 0.10000000000000000000e1 +4 1 5 5 0.0 +4 1 6 6 0.0 +4 1 10 10 0.10000000000000000000e1 +5 1 1 1 -0.10000000000000000000e1 +5 1 2 2 0.0 +5 1 3 3 -0.20000000000000000000e1 +5 1 4 4 0.10000000000000000000e1 +5 1 5 5 0.0 +5 1 6 6 0.20000000000000000000e1 +5 1 11 11 0.10000000000000000000e1 +*** ANSWER *** +1.999324241203291330e-01 1.999324366845832979e-01 2.002702909544291643e-01 1.995945820749691346e-01 2.002702658259210289e-01 +1 1 1 1 8.907699142905763540e-10 +1 1 2 2 5.510016952177992013e-10 +1 1 3 3 5.510016967492000283e-10 +1 1 4 4 2.112332737634490601e-10 +1 1 5 5 5.510018251330094249e-10 +1 1 6 6 5.510018266644813895e-10 +1 1 7 7 1.999324246713307662e-01 +1 1 8 8 1.999324372355849311e-01 +1 1 9 9 2.002702915054307975e-01 +1 1 10 10 1.995945826259707678e-01 +1 1 11 11 2.002702663769226621e-01 +2 1 1 1 2.069757105488617133e-01 +2 1 2 2 5.230307918082648388e-01 +2 1 3 3 5.230307917329555245e-01 +2 1 4 4 1.206975709414617182e+00 +2 1 5 5 5.230307918082649499e-01 +2 1 6 6 5.230307917329547474e-01 +2 1 7 7 1.134246665301764813e-09 +2 1 8 8 1.134245134285434472e-09 +2 1 9 9 1.134246103143633211e-09 +2 1 10 10 1.134244048658268019e-09 +2 1 11 11 1.134249159634329371e-09 +*** END *** +*** REQUEST *** +"" +5 +1 +11 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.20000000000000000000e1 +0 1 3 3 -0.40000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.20000000000000000000e1 +0 1 6 6 0.40000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.60000000000000000000e1 +1 1 3 3 -0.20000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.60000000000000000000e1 +1 1 6 6 0.20000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.20000000000000000000e1 +2 1 3 3 -0.60000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.20000000000000000000e1 +2 1 6 6 0.60000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.20000000000000000000e1 +3 1 3 3 0.0 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.20000000000000000000e1 +3 1 6 6 0.0 +3 1 9 9 0.10000000000000000000e1 +4 1 1 1 -0.10000000000000000000e1 +4 1 2 2 0.0 +4 1 3 3 0.0 +4 1 4 4 0.10000000000000000000e1 +4 1 5 5 0.0 +4 1 6 6 0.0 +4 1 10 10 0.10000000000000000000e1 +5 1 1 1 -0.10000000000000000000e1 +5 1 2 2 0.0 +5 1 3 3 -0.20000000000000000000e1 +5 1 4 4 0.10000000000000000000e1 +5 1 5 5 0.0 +5 1 6 6 0.20000000000000000000e1 +5 1 11 11 0.10000000000000000000e1 +*** ANSWER *** +1.130109583961537850e-01 5.813557253835260896e-01 7.961139942800592173e-02 8.310005016198036831e-02 1.429218654532786459e-01 +1 1 1 1 2.730764919025782021e-09 +1 1 2 2 1.553722790796993180e-09 +1 1 3 3 1.553688749253745210e-09 +1 1 4 4 3.766544441352949464e-10 +1 1 5 5 1.553696639717819375e-09 +1 1 6 6 1.553730736777072473e-09 +1 1 7 7 1.130109599498634182e-01 +1 1 8 8 5.813557269372358061e-01 +1 1 9 9 7.961140098171555490e-02 +1 1 10 10 8.310005171569000149e-02 +1 1 11 11 1.429218670069882791e-01 +2 1 1 1 1.285521985253247901e-01 +2 1 2 2 3.599084711029696959e-01 +2 1 3 3 3.599084698743560962e-01 +2 1 4 4 1.128552193489434252e+00 +2 1 5 5 3.599084710002996013e-01 +2 1 6 6 3.599084706198453776e-01 +2 1 7 7 4.161047075456002872e-09 +2 1 8 8 7.685628636142469892e-10 +2 1 9 9 5.241259973097549262e-09 +2 1 10 10 5.036014564476828768e-09 +2 1 11 11 3.545109871524065817e-09 +*** END *** +*** REQUEST *** +"" +5 +1 +11 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.20000000000000000000e1 +0 1 3 3 -0.60000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.20000000000000000000e1 +0 1 6 6 0.60000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.60000000000000000000e1 +1 1 3 3 -0.20000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.60000000000000000000e1 +1 1 6 6 0.20000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.20000000000000000000e1 +2 1 3 3 -0.60000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.20000000000000000000e1 +2 1 6 6 0.60000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.20000000000000000000e1 +3 1 3 3 0.0 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.20000000000000000000e1 +3 1 6 6 0.0 +3 1 9 9 0.10000000000000000000e1 +4 1 1 1 -0.10000000000000000000e1 +4 1 2 2 0.0 +4 1 3 3 0.0 +4 1 4 4 0.10000000000000000000e1 +4 1 5 5 0.0 +4 1 6 6 0.0 +4 1 10 10 0.10000000000000000000e1 +5 1 1 1 -0.10000000000000000000e1 +5 1 2 2 0.0 +5 1 3 3 -0.20000000000000000000e1 +5 1 4 4 0.10000000000000000000e1 +5 1 5 5 0.0 +5 1 6 6 0.20000000000000000000e1 +5 1 11 11 0.10000000000000000000e1 +*** ANSWER *** +8.086015349968846235e-10 9.999999991735928351e-01 -1.585850207842949705e-09 -1.507908629630234875e-09 1.296455331408585567e-09 +1 1 1 1 8.813828237430508567e-09 +1 1 2 2 6.971625137587407086e-09 +1 1 3 3 7.747049527063408134e-09 +1 1 4 4 5.183610129735434151e-09 +1 1 5 5 7.025813167670790106e-09 +1 1 6 6 6.250389392286873084e-09 +1 1 7 7 7.807320704137067420e-09 +1 1 8 8 1.000000006172311995e+00 +1 1 9 9 5.412868961297209930e-09 +1 1 10 10 5.490810539509924760e-09 +1 1 11 11 8.295174500548751819e-09 +2 1 1 1 1.244031575776756160e-01 +2 1 2 2 2.779183526476993182e-01 +2 1 3 3 2.509628826557677161e-01 +2 1 4 4 6.627833125803265224e-01 +2 1 5 5 2.882493420872355716e-01 +2 1 6 6 3.244558597633251384e-01 +2 1 7 7 2.526479541450170618e-01 +2 1 8 8 3.472932459880093262e-09 +2 1 9 9 4.409578661182766979e-01 +2 1 10 10 4.616198449973491491e-01 +2 1 11 11 3.146338907822341935e-01 +*** END *** +*** REQUEST *** +"" +5 +1 +11 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.40000000000000000000e1 +0 1 3 3 0.0 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.40000000000000000000e1 +0 1 6 6 0.0 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.60000000000000000000e1 +1 1 3 3 -0.20000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.60000000000000000000e1 +1 1 6 6 0.20000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.20000000000000000000e1 +2 1 3 3 -0.60000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.20000000000000000000e1 +2 1 6 6 0.60000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.20000000000000000000e1 +3 1 3 3 0.0 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.20000000000000000000e1 +3 1 6 6 0.0 +3 1 9 9 0.10000000000000000000e1 +4 1 1 1 -0.10000000000000000000e1 +4 1 2 2 0.0 +4 1 3 3 0.0 +4 1 4 4 0.10000000000000000000e1 +4 1 5 5 0.0 +4 1 6 6 0.0 +4 1 10 10 0.10000000000000000000e1 +5 1 1 1 -0.10000000000000000000e1 +5 1 2 2 0.0 +5 1 3 3 -0.20000000000000000000e1 +5 1 4 4 0.10000000000000000000e1 +5 1 5 5 0.0 +5 1 6 6 0.20000000000000000000e1 +5 1 11 11 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +5 +1 +11 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.40000000000000000000e1 +0 1 3 3 -0.20000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.40000000000000000000e1 +0 1 6 6 0.20000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.60000000000000000000e1 +1 1 3 3 -0.20000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.60000000000000000000e1 +1 1 6 6 0.20000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.20000000000000000000e1 +2 1 3 3 -0.60000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.20000000000000000000e1 +2 1 6 6 0.60000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.20000000000000000000e1 +3 1 3 3 0.0 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.20000000000000000000e1 +3 1 6 6 0.0 +3 1 9 9 0.10000000000000000000e1 +4 1 1 1 -0.10000000000000000000e1 +4 1 2 2 0.0 +4 1 3 3 0.0 +4 1 4 4 0.10000000000000000000e1 +4 1 5 5 0.0 +4 1 6 6 0.0 +4 1 10 10 0.10000000000000000000e1 +5 1 1 1 -0.10000000000000000000e1 +5 1 2 2 0.0 +5 1 3 3 -0.20000000000000000000e1 +5 1 4 4 0.10000000000000000000e1 +5 1 5 5 0.0 +5 1 6 6 0.20000000000000000000e1 +5 1 11 11 0.10000000000000000000e1 +*** ANSWER *** +5.813557757604064236e-01 1.130109676891488252e-01 1.429217050296425762e-01 8.310022917163913114e-02 7.961132117214057835e-02 +1 1 1 1 2.730692982551297819e-09 +1 1 2 2 1.553649375902123707e-09 +1 1 3 3 1.553683543733189775e-09 +1 1 4 4 3.766479433729648762e-10 +1 1 5 5 1.553691373521110937e-09 +1 1 6 6 1.553657386281290798e-09 +1 1 7 7 5.813557773140769491e-01 +1 1 8 8 1.130109692428193507e-01 +1 1 9 9 1.429217065833131017e-01 +1 1 10 10 8.310023072530965671e-02 +1 1 11 11 7.961132272581110392e-02 +2 1 1 1 1.285520097268625650e-01 +2 1 2 2 3.599087961326637997e-01 +2 1 3 3 3.599087958388706432e-01 +2 1 4 4 1.128552004691022903e+00 +2 1 5 5 3.599087968780450009e-01 +2 1 6 6 3.599087957361898349e-01 +2 1 7 7 7.685334260671894332e-10 +2 1 8 8 4.160883574812816172e-09 +2 1 9 9 3.545024585765373967e-09 +2 1 10 10 5.035684876552453844e-09 +2 1 11 11 5.241145740309453114e-09 +*** END *** +*** REQUEST *** +"" +5 +1 +11 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.40000000000000000000e1 +0 1 3 3 -0.40000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.40000000000000000000e1 +0 1 6 6 0.40000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.60000000000000000000e1 +1 1 3 3 -0.20000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.60000000000000000000e1 +1 1 6 6 0.20000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.20000000000000000000e1 +2 1 3 3 -0.60000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.20000000000000000000e1 +2 1 6 6 0.60000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.20000000000000000000e1 +3 1 3 3 0.0 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.20000000000000000000e1 +3 1 6 6 0.0 +3 1 9 9 0.10000000000000000000e1 +4 1 1 1 -0.10000000000000000000e1 +4 1 2 2 0.0 +4 1 3 3 0.0 +4 1 4 4 0.10000000000000000000e1 +4 1 5 5 0.0 +4 1 6 6 0.0 +4 1 10 10 0.10000000000000000000e1 +5 1 1 1 -0.10000000000000000000e1 +5 1 2 2 0.0 +5 1 3 3 -0.20000000000000000000e1 +5 1 4 4 0.10000000000000000000e1 +5 1 5 5 0.0 +5 1 6 6 0.20000000000000000000e1 +5 1 11 11 0.10000000000000000000e1 +*** ANSWER *** +5.000000000487873075e-01 5.000000000487873075e-01 -2.951377818719969027e-10 -7.504811725856509119e-10 -2.951377818720304035e-10 +1 1 1 1 3.359729362236711660e-09 +1 1 2 2 2.316524203127209942e-09 +1 1 3 3 2.316524236013019274e-09 +1 1 4 4 8.733649496932486490e-10 +1 1 5 5 1.916570444036318402e-09 +1 1 6 6 1.916570466668277746e-09 +1 1 7 7 5.000000021653344673e-01 +1 1 8 8 5.000000021653344673e-01 +1 1 9 9 1.821409376517429361e-09 +1 1 10 10 1.366065985803775765e-09 +1 1 11 11 1.821409376517402891e-09 +2 1 1 1 1.525161898171456532e-01 +2 1 2 2 2.683722925995404296e-01 +2 1 3 3 2.683722923375485014e-01 +2 1 4 4 6.703301664923365655e-01 +2 1 5 5 3.286455453699267393e-01 +2 1 6 6 3.286455451079347556e-01 +2 1 7 7 1.161718757335331391e-09 +2 1 8 8 1.161718757335331391e-09 +2 1 9 9 3.616395177840364683e-01 +2 1 10 10 4.821860233248091432e-01 +2 1 11 11 3.616395177840364128e-01 +*** END *** +*** REQUEST *** +"" +5 +1 +11 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.40000000000000000000e1 +0 1 3 3 -0.60000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.40000000000000000000e1 +0 1 6 6 0.60000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.60000000000000000000e1 +1 1 3 3 -0.20000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.60000000000000000000e1 +1 1 6 6 0.20000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.20000000000000000000e1 +2 1 3 3 -0.60000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.20000000000000000000e1 +2 1 6 6 0.60000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.20000000000000000000e1 +3 1 3 3 0.0 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.20000000000000000000e1 +3 1 6 6 0.0 +3 1 9 9 0.10000000000000000000e1 +4 1 1 1 -0.10000000000000000000e1 +4 1 2 2 0.0 +4 1 3 3 0.0 +4 1 4 4 0.10000000000000000000e1 +4 1 5 5 0.0 +4 1 6 6 0.0 +4 1 10 10 0.10000000000000000000e1 +5 1 1 1 -0.10000000000000000000e1 +5 1 2 2 0.0 +5 1 3 3 -0.20000000000000000000e1 +5 1 4 4 0.10000000000000000000e1 +5 1 5 5 0.0 +5 1 6 6 0.20000000000000000000e1 +5 1 11 11 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +5 +1 +11 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.60000000000000000000e1 +0 1 3 3 0.0 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.60000000000000000000e1 +0 1 6 6 0.0 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.60000000000000000000e1 +1 1 3 3 -0.20000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.60000000000000000000e1 +1 1 6 6 0.20000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.20000000000000000000e1 +2 1 3 3 -0.60000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.20000000000000000000e1 +2 1 6 6 0.60000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.20000000000000000000e1 +3 1 3 3 0.0 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.20000000000000000000e1 +3 1 6 6 0.0 +3 1 9 9 0.10000000000000000000e1 +4 1 1 1 -0.10000000000000000000e1 +4 1 2 2 0.0 +4 1 3 3 0.0 +4 1 4 4 0.10000000000000000000e1 +4 1 5 5 0.0 +4 1 6 6 0.0 +4 1 10 10 0.10000000000000000000e1 +5 1 1 1 -0.10000000000000000000e1 +5 1 2 2 0.0 +5 1 3 3 -0.20000000000000000000e1 +5 1 4 4 0.10000000000000000000e1 +5 1 5 5 0.0 +5 1 6 6 0.20000000000000000000e1 +5 1 11 11 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +5 +1 +11 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.60000000000000000000e1 +0 1 3 3 -0.20000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.60000000000000000000e1 +0 1 6 6 0.20000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.60000000000000000000e1 +1 1 3 3 -0.20000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.60000000000000000000e1 +1 1 6 6 0.20000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.20000000000000000000e1 +2 1 3 3 -0.60000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.20000000000000000000e1 +2 1 6 6 0.60000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.20000000000000000000e1 +3 1 3 3 0.0 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.20000000000000000000e1 +3 1 6 6 0.0 +3 1 9 9 0.10000000000000000000e1 +4 1 1 1 -0.10000000000000000000e1 +4 1 2 2 0.0 +4 1 3 3 0.0 +4 1 4 4 0.10000000000000000000e1 +4 1 5 5 0.0 +4 1 6 6 0.0 +4 1 10 10 0.10000000000000000000e1 +5 1 1 1 -0.10000000000000000000e1 +5 1 2 2 0.0 +5 1 3 3 -0.20000000000000000000e1 +5 1 4 4 0.10000000000000000000e1 +5 1 5 5 0.0 +5 1 6 6 0.20000000000000000000e1 +5 1 11 11 0.10000000000000000000e1 +*** ANSWER *** +9.999999991735801785e-01 8.086049959372732850e-10 1.296488759593392540e-09 -1.507901252267674414e-09 -1.585846848328208515e-09 +1 1 1 1 8.813832397925002433e-09 +1 1 2 2 7.747090081526767704e-09 +1 1 3 3 6.971661792658625704e-09 +1 1 4 4 5.183684082060717847e-09 +1 1 5 5 6.250425879787102057e-09 +1 1 6 6 7.025854542478491661e-09 +1 1 7 7 1.000000006172338418e+00 +1 1 8 8 7.807363214696307839e-09 +1 1 9 9 8.295246978352463490e-09 +1 1 10 10 5.490856966491393228e-09 +1 1 11 11 5.412911370430845891e-09 +2 1 1 1 1.244033359505195419e-01 +2 1 2 2 2.509630536892515362e-01 +2 1 3 3 2.779185414792475495e-01 +2 1 4 4 6.627833064398767071e-01 +2 1 5 5 3.244560642973361997e-01 +2 1 6 6 2.882495226738313043e-01 +2 1 7 7 3.472967492032935775e-09 +2 1 8 8 2.526481211269708260e-01 +2 1 9 9 3.146340082944735217e-01 +2 1 10 10 4.616200295106428486e-01 +2 1 11 11 4.409580671214753944e-01 +*** END *** +*** REQUEST *** +"" +5 +1 +11 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.60000000000000000000e1 +0 1 3 3 -0.40000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.60000000000000000000e1 +0 1 6 6 0.40000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.60000000000000000000e1 +1 1 3 3 -0.20000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.60000000000000000000e1 +1 1 6 6 0.20000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.20000000000000000000e1 +2 1 3 3 -0.60000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.20000000000000000000e1 +2 1 6 6 0.60000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.20000000000000000000e1 +3 1 3 3 0.0 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.20000000000000000000e1 +3 1 6 6 0.0 +3 1 9 9 0.10000000000000000000e1 +4 1 1 1 -0.10000000000000000000e1 +4 1 2 2 0.0 +4 1 3 3 0.0 +4 1 4 4 0.10000000000000000000e1 +4 1 5 5 0.0 +4 1 6 6 0.0 +4 1 10 10 0.10000000000000000000e1 +5 1 1 1 -0.10000000000000000000e1 +5 1 2 2 0.0 +5 1 3 3 -0.20000000000000000000e1 +5 1 4 4 0.10000000000000000000e1 +5 1 5 5 0.0 +5 1 6 6 0.20000000000000000000e1 +5 1 11 11 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +5 +1 +11 +0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 0.10000000000000000000e1 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.60000000000000000000e1 +0 1 3 3 -0.60000000000000000000e1 +0 1 4 4 0.10000000000000000000e1 +0 1 5 5 0.60000000000000000000e1 +0 1 6 6 0.60000000000000000000e1 +1 1 1 1 -0.10000000000000000000e1 +1 1 2 2 -0.60000000000000000000e1 +1 1 3 3 -0.20000000000000000000e1 +1 1 4 4 0.10000000000000000000e1 +1 1 5 5 0.60000000000000000000e1 +1 1 6 6 0.20000000000000000000e1 +1 1 7 7 0.10000000000000000000e1 +2 1 1 1 -0.10000000000000000000e1 +2 1 2 2 -0.20000000000000000000e1 +2 1 3 3 -0.60000000000000000000e1 +2 1 4 4 0.10000000000000000000e1 +2 1 5 5 0.20000000000000000000e1 +2 1 6 6 0.60000000000000000000e1 +2 1 8 8 0.10000000000000000000e1 +3 1 1 1 -0.10000000000000000000e1 +3 1 2 2 -0.20000000000000000000e1 +3 1 3 3 0.0 +3 1 4 4 0.10000000000000000000e1 +3 1 5 5 0.20000000000000000000e1 +3 1 6 6 0.0 +3 1 9 9 0.10000000000000000000e1 +4 1 1 1 -0.10000000000000000000e1 +4 1 2 2 0.0 +4 1 3 3 0.0 +4 1 4 4 0.10000000000000000000e1 +4 1 5 5 0.0 +4 1 6 6 0.0 +4 1 10 10 0.10000000000000000000e1 +5 1 1 1 -0.10000000000000000000e1 +5 1 2 2 0.0 +5 1 3 3 -0.20000000000000000000e1 +5 1 4 4 0.10000000000000000000e1 +5 1 5 5 0.0 +5 1 6 6 0.20000000000000000000e1 +5 1 11 11 0.10000000000000000000e1 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +11 +1 +9 +-0.20000000000000000000e1 -0.40000000000000000000e1 0.0 -0.20000000000000000000e1 0.0 0.0 -0.40000000000000000000e1 0.0 0.0 0.0 0.0 +0 1 1 1 -0.10000000000000000000e1 +0 1 2 2 -0.20000000000000000000e1 +0 1 3 3 0.20000000000000000000e1 +0 1 4 4 -0.10000000000000000000e1 +0 1 5 5 0.20000000000000000000e1 +0 1 6 6 0.30000000000000000000e1 +0 1 7 7 -0.10000000000000000000e1 +0 1 8 8 -0.10000000000000000000e1 +0 1 9 9 -0.20000000000000000000e1 +1 1 1 4 0.10000000000000000000e1 +1 1 2 2 -0.20000000000000000000e1 +2 1 1 6 0.10000000000000000000e1 +2 1 3 3 -0.20000000000000000000e1 +2 1 4 6 0.10000000000000000000e1 +2 1 5 5 -0.20000000000000000000e1 +3 1 1 8 -0.10000000000000000000e1 +3 1 2 7 0.10000000000000000000e1 +3 1 2 8 0.10000000000000000000e1 +3 1 4 7 -0.10000000000000000000e1 +4 1 2 9 0.10000000000000000000e1 +4 1 6 6 -0.20000000000000000000e1 +5 1 1 5 0.10000000000000000000e1 +5 1 2 3 -0.10000000000000000000e1 +5 1 2 5 -0.10000000000000000000e1 +5 1 3 4 0.10000000000000000000e1 +6 1 2 6 -0.10000000000000000000e1 +6 1 3 5 0.10000000000000000000e1 +7 1 3 8 0.10000000000000000000e1 +7 1 5 7 0.10000000000000000000e1 +7 1 6 6 -0.40000000000000000000e1 +8 1 1 9 0.10000000000000000000e1 +8 1 3 7 -0.10000000000000000000e1 +8 1 4 9 0.10000000000000000000e1 +8 1 5 8 -0.10000000000000000000e1 +9 1 1 8 -0.10000000000000000000e1 +9 1 3 6 0.10000000000000000000e1 +9 1 4 7 -0.10000000000000000000e1 +9 1 5 6 0.10000000000000000000e1 +10 1 3 9 -0.10000000000000000000e1 +10 1 5 9 -0.10000000000000000000e1 +10 1 6 7 0.10000000000000000000e1 +10 1 6 8 0.10000000000000000000e1 +11 1 6 9 -0.10000000000000000000e1 +11 1 7 8 0.10000000000000000000e1 +*** ANSWER *** +5.976195916298580046e-01 -1.134359061594133466e+00 0.000000000000000000e+00 -1.268669241671646075e+00 0.000000000000000000e+00 0.000000000000000000e+00 -5.183802933613970154e-01 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 +1 1 1 1 1.000000005275063941e+00 +1 1 1 4 5.976195916298580046e-01 +1 1 1 6 -1.134359061594133466e+00 +1 1 2 2 8.047608220153479319e-01 +1 1 2 9 -1.268669241671646075e+00 +1 1 3 3 2.687181284633307632e-01 +1 1 3 8 -5.183802933613970154e-01 +1 1 4 4 1.000000005275063941e+00 +1 1 4 6 -1.134359061594133466e+00 +1 1 5 5 2.687181284633307632e-01 +1 1 5 7 -5.183802933613970154e-01 +1 1 6 6 1.610859662063943487e+00 +1 1 7 7 1.000000005275063941e+00 +1 1 8 8 1.000000005275063941e+00 +1 1 9 9 2.000000005275063941e+00 +2 1 1 1 1.211397898116186811e+00 +2 1 1 4 1.211397884956494808e+00 +2 1 1 6 1.706083411664991667e+00 +2 1 2 2 2.211397884956743720e+00 +2 1 2 9 1.402778336122095793e+00 +2 1 3 3 2.706083411665114902e+00 +2 1 3 8 1.402778336121920821e+00 +2 1 4 4 1.211397898116346683e+00 +2 1 4 6 1.706083411665100469e+00 +2 1 5 5 2.706083411665114902e+00 +2 1 5 7 1.402778336121920821e+00 +2 1 6 6 2.402778336122022740e+00 +2 1 7 7 7.271716258990957860e-01 +2 1 8 8 7.271716258990957860e-01 +2 1 9 9 8.898385402352601004e-01 +*** END *** +*** REQUEST *** +"" +6 +1 +6 +-0.10485760000000000000e7 0.0 0.0 0.0 0.52428800000000000000e6 0.52428800000000000000e6 +0 1 1 1 0.52428800000000000000e6 +1 1 1 3 0.52428800000000000000e6 +1 1 2 2 -0.10485760000000000000e7 +2 1 1 5 -0.52428800000000000000e6 +2 1 2 4 0.52428800000000000000e6 +3 1 2 6 0.52428800000000000000e6 +3 1 4 5 -0.52428800000000000000e6 +4 1 2 5 -0.52428800000000000000e6 +4 1 3 4 0.52428800000000000000e6 +5 1 1 6 -0.26214400000000000000e6 +5 1 4 4 0.52428800000000000000e6 +6 1 3 6 -0.26214400000000000000e6 +6 1 5 5 0.52428800000000000000e6 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +28 +2 +10 1 +0.78643200000000000000e6 -0.10485760000000000000e7 0.0 0.0 0.0 0.0 0.0 -0.10485760000000000000e7 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.52428800000000000000e6 0.52428800000000000000e6 +0 1 2 9 0.39321600000000000000e6 +0 1 4 9 -0.13107200000000000000e6 +0 1 7 10 -0.13107200000000000000e6 +0 2 1 1 -0.26214400000000000000e6 +1 1 1 1 0.52428800000000000000e6 +1 1 2 9 -0.39321600000000000000e6 +1 1 4 9 0.13107200000000000000e6 +1 1 7 10 0.13107200000000000000e6 +1 2 1 1 0.26214400000000000000e6 +2 1 1 3 0.52428800000000000000e6 +2 1 2 2 -0.10485760000000000000e7 +3 1 1 6 0.52428800000000000000e6 +3 1 2 5 -0.52428800000000000000e6 +4 1 1 7 0.52428800000000000000e6 +4 1 2 6 -0.52428800000000000000e6 +5 1 1 9 0.52428800000000000000e6 +5 1 5 6 -0.52428800000000000000e6 +6 1 1 10 0.52428800000000000000e6 +6 1 5 8 -0.52428800000000000000e6 +7 1 1 4 -0.52428800000000000000e6 +7 1 2 3 0.52428800000000000000e6 +8 1 2 4 0.52428800000000000000e6 +8 1 3 3 -0.10485760000000000000e7 +9 1 2 7 0.52428800000000000000e6 +9 1 3 6 -0.52428800000000000000e6 +10 1 2 8 0.52428800000000000000e6 +10 1 5 6 -0.52428800000000000000e6 +11 1 2 6 -0.52428800000000000000e6 +11 1 3 5 0.52428800000000000000e6 +12 1 2 9 -0.52428800000000000000e6 +12 1 3 8 0.52428800000000000000e6 +13 1 3 9 0.52428800000000000000e6 +13 1 6 7 -0.52428800000000000000e6 +14 1 3 6 -0.52428800000000000000e6 +14 1 4 5 0.52428800000000000000e6 +15 1 3 7 -0.52428800000000000000e6 +15 1 4 6 0.52428800000000000000e6 +16 1 4 8 0.52428800000000000000e6 +16 1 6 7 -0.52428800000000000000e6 +17 1 4 10 0.52428800000000000000e6 +17 1 7 9 -0.52428800000000000000e6 +18 1 1 8 -0.26214400000000000000e6 +18 1 5 5 0.52428800000000000000e6 +19 1 2 9 -0.52428800000000000000e6 +19 1 5 7 0.52428800000000000000e6 +20 1 2 10 -0.52428800000000000000e6 +20 1 5 9 0.52428800000000000000e6 +21 1 2 9 -0.26214400000000000000e6 +21 1 6 6 0.52428800000000000000e6 +22 1 2 10 -0.52428800000000000000e6 +22 1 6 8 0.52428800000000000000e6 +23 1 3 10 -0.52428800000000000000e6 +23 1 6 9 0.52428800000000000000e6 +24 1 6 10 0.52428800000000000000e6 +24 1 8 9 -0.52428800000000000000e6 +25 1 4 9 -0.26214400000000000000e6 +25 1 7 7 0.52428800000000000000e6 +26 1 3 10 -0.52428800000000000000e6 +26 1 7 8 0.52428800000000000000e6 +27 1 5 10 -0.26214400000000000000e6 +27 1 8 8 0.52428800000000000000e6 +28 1 7 10 -0.26214400000000000000e6 +28 1 9 9 0.52428800000000000000e6 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +82 +3 +15 3 1 +0.78643200000000000000e6 0.0 -0.10485760000000000000e7 0.0 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 -0.10485760000000000000e7 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.10485760000000000000e7 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.10485760000000000000e7 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.10485760000000000000e7 0.0 0.52428800000000000000e6 0.0 0.0 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.10485760000000000000e7 0.0 0.52428800000000000000e6 0.52428800000000000000e6 0.0 0.0 0.18350080000000000000e7 +0 1 3 10 0.29491200000000000000e6 +0 1 4 11 -0.98304000000000000000e5 +0 1 7 14 -0.98304000000000000000e5 +0 2 1 1 -0.19660800000000000000e6 +1 1 1 1 0.39321600000000000000e6 +1 1 3 10 -0.29491200000000000000e6 +1 1 4 11 0.98304000000000000000e5 +1 1 7 14 0.98304000000000000000e5 +1 2 1 1 0.19660800000000000000e6 +2 1 1 3 0.39321600000000000000e6 +2 1 1 10 -0.39321600000000000000e6 +2 1 4 11 -0.58982400000000000000e6 +2 1 5 12 0.19660800000000000000e6 +2 1 7 14 0.58982400000000000000e6 +2 1 12 15 -0.19660800000000000000e6 +2 2 2 2 0.39321600000000000000e6 +2 2 3 3 -0.39321600000000000000e6 +3 1 1 5 0.39321600000000000000e6 +3 1 3 3 -0.78643200000000000000e6 +4 1 1 7 0.39321600000000000000e6 +4 1 2 6 -0.39321600000000000000e6 +5 1 1 11 0.39321600000000000000e6 +5 1 6 7 -0.39321600000000000000e6 +6 1 1 12 0.39321600000000000000e6 +6 1 3 10 -0.39321600000000000000e6 +7 1 1 13 0.39321600000000000000e6 +7 1 6 10 -0.39321600000000000000e6 +8 1 1 14 0.39321600000000000000e6 +8 1 7 10 -0.39321600000000000000e6 +9 1 1 15 0.39321600000000000000e6 +9 1 6 13 -0.39321600000000000000e6 +10 1 1 10 -0.19660800000000000000e6 +10 1 2 2 0.39321600000000000000e6 +10 1 4 11 -0.29491200000000000000e6 +10 1 5 12 0.98304000000000000000e5 +10 1 7 14 0.29491200000000000000e6 +10 1 12 15 -0.98304000000000000000e5 +10 2 2 2 0.19660800000000000000e6 +10 2 3 3 -0.19660800000000000000e6 +11 1 1 4 -0.39321600000000000000e6 +11 1 2 3 0.39321600000000000000e6 +12 1 2 4 0.39321600000000000000e6 +12 1 3 3 -0.78643200000000000000e6 +13 1 1 8 -0.39321600000000000000e6 +13 1 2 7 0.39321600000000000000e6 +14 1 1 9 -0.39321600000000000000e6 +14 1 2 8 0.39321600000000000000e6 +15 1 2 10 0.39321600000000000000e6 +15 1 6 7 -0.39321600000000000000e6 +16 1 2 11 0.39321600000000000000e6 +16 1 3 10 -0.39321600000000000000e6 +17 1 2 12 0.39321600000000000000e6 +17 1 6 9 -0.39321600000000000000e6 +18 1 2 13 0.39321600000000000000e6 +18 1 7 10 -0.39321600000000000000e6 +19 1 1 6 -0.26214400000000000000e6 +19 1 2 14 0.39321600000000000000e6 +19 1 5 13 -0.13107200000000000000e6 +19 1 8 15 -0.13107200000000000000e6 +19 2 1 3 -0.13107200000000000000e6 +20 1 2 15 0.39321600000000000000e6 +20 1 10 11 -0.39321600000000000000e6 +21 1 2 5 -0.39321600000000000000e6 +21 1 3 4 0.39321600000000000000e6 +22 1 3 5 0.39321600000000000000e6 +22 1 4 4 -0.78643200000000000000e6 +23 1 1 8 -0.39321600000000000000e6 +23 1 3 6 0.39321600000000000000e6 +24 1 1 9 -0.39321600000000000000e6 +24 1 3 7 0.39321600000000000000e6 +25 1 2 9 -0.39321600000000000000e6 +25 1 3 8 0.39321600000000000000e6 +26 1 3 9 0.39321600000000000000e6 +26 1 4 8 -0.39321600000000000000e6 +27 1 3 11 0.39321600000000000000e6 +27 1 6 9 -0.39321600000000000000e6 +28 1 3 12 0.39321600000000000000e6 +28 1 4 11 -0.39321600000000000000e6 +29 1 1 6 -0.26214400000000000000e6 +29 1 3 13 0.39321600000000000000e6 +29 1 5 13 -0.13107200000000000000e6 +29 1 8 15 -0.13107200000000000000e6 +29 2 1 3 -0.13107200000000000000e6 +30 1 3 14 0.39321600000000000000e6 +30 1 8 11 -0.39321600000000000000e6 +31 1 3 15 0.39321600000000000000e6 +31 1 7 14 -0.39321600000000000000e6 +32 1 1 9 -0.39321600000000000000e6 +32 1 4 6 0.39321600000000000000e6 +33 1 2 9 -0.39321600000000000000e6 +33 1 4 7 0.39321600000000000000e6 +34 1 4 9 0.39321600000000000000e6 +34 1 5 8 -0.39321600000000000000e6 +35 1 4 10 0.39321600000000000000e6 +35 1 6 9 -0.39321600000000000000e6 +36 1 4 12 0.39321600000000000000e6 +36 1 8 9 -0.39321600000000000000e6 +37 1 4 13 0.39321600000000000000e6 +37 1 8 11 -0.39321600000000000000e6 +38 1 4 14 0.39321600000000000000e6 +38 1 5 13 -0.39321600000000000000e6 +39 1 2 9 -0.39321600000000000000e6 +39 1 5 6 0.39321600000000000000e6 +40 1 4 8 -0.39321600000000000000e6 +40 1 5 7 0.39321600000000000000e6 +41 1 4 11 -0.39321600000000000000e6 +41 1 5 10 0.39321600000000000000e6 +42 1 5 11 0.39321600000000000000e6 +42 1 8 9 -0.39321600000000000000e6 +43 1 5 14 0.39321600000000000000e6 +43 1 9 12 -0.39321600000000000000e6 +44 1 1 10 0.78643200000000000000e6 +44 1 5 15 0.39321600000000000000e6 +44 1 7 14 -0.11796480000000000000e7 +44 1 12 15 0.39321600000000000000e6 +44 2 3 3 0.78643200000000000000e6 +45 1 1 10 -0.19660800000000000000e6 +45 1 6 6 0.39321600000000000000e6 +46 1 3 10 -0.39321600000000000000e6 +46 1 6 8 0.39321600000000000000e6 +47 1 6 11 0.39321600000000000000e6 +47 1 7 10 -0.39321600000000000000e6 +48 1 1 6 -0.26214400000000000000e6 +48 1 5 13 -0.13107200000000000000e6 +48 1 6 12 0.39321600000000000000e6 +48 1 8 15 -0.13107200000000000000e6 +48 2 1 3 -0.13107200000000000000e6 +49 1 6 14 0.39321600000000000000e6 +49 1 10 11 -0.39321600000000000000e6 +50 1 6 15 0.39321600000000000000e6 +50 1 10 13 -0.39321600000000000000e6 +51 1 3 10 -0.19660800000000000000e6 +51 1 7 7 0.39321600000000000000e6 +52 1 6 9 -0.39321600000000000000e6 +52 1 7 8 0.39321600000000000000e6 +53 1 4 11 -0.39321600000000000000e6 +53 1 7 9 0.39321600000000000000e6 +54 1 1 6 -0.26214400000000000000e6 +54 1 5 13 -0.13107200000000000000e6 +54 1 7 11 0.39321600000000000000e6 +54 1 8 15 -0.13107200000000000000e6 +54 2 1 3 -0.13107200000000000000e6 +55 1 7 12 0.39321600000000000000e6 +55 1 8 11 -0.39321600000000000000e6 +56 1 7 13 0.39321600000000000000e6 +56 1 10 11 -0.39321600000000000000e6 +57 1 4 11 -0.19660800000000000000e6 +57 1 8 8 0.39321600000000000000e6 +58 1 1 6 -0.26214400000000000000e6 +58 1 5 13 -0.13107200000000000000e6 +58 1 8 10 0.39321600000000000000e6 +58 1 8 15 -0.13107200000000000000e6 +58 2 1 3 -0.13107200000000000000e6 +59 1 5 13 -0.39321600000000000000e6 +59 1 8 12 0.39321600000000000000e6 +60 1 7 14 -0.39321600000000000000e6 +60 1 8 13 0.39321600000000000000e6 +61 1 4 15 -0.39321600000000000000e6 +61 1 8 14 0.39321600000000000000e6 +62 1 5 12 -0.19660800000000000000e6 +62 1 9 9 0.39321600000000000000e6 +63 1 8 11 -0.39321600000000000000e6 +63 1 9 10 0.39321600000000000000e6 +64 1 5 13 -0.39321600000000000000e6 +64 1 9 11 0.39321600000000000000e6 +65 1 4 15 -0.39321600000000000000e6 +65 1 9 13 0.39321600000000000000e6 +66 1 1 10 0.78643200000000000000e6 +66 1 7 14 -0.11796480000000000000e7 +66 1 9 14 0.39321600000000000000e6 +66 1 12 15 0.39321600000000000000e6 +66 2 3 3 0.78643200000000000000e6 +67 1 9 15 0.39321600000000000000e6 +67 1 12 14 -0.39321600000000000000e6 +68 1 6 13 -0.19660800000000000000e6 +68 1 10 10 0.39321600000000000000e6 +69 1 7 14 -0.39321600000000000000e6 +69 1 10 12 0.39321600000000000000e6 +70 1 7 15 -0.39321600000000000000e6 +70 1 10 14 0.39321600000000000000e6 +71 1 7 14 -0.19660800000000000000e6 +71 1 11 11 0.39321600000000000000e6 +72 1 4 15 -0.39321600000000000000e6 +72 1 11 12 0.39321600000000000000e6 +73 1 7 15 -0.39321600000000000000e6 +73 1 11 13 0.39321600000000000000e6 +74 1 8 15 -0.39321600000000000000e6 +74 1 11 14 0.39321600000000000000e6 +75 1 11 15 0.39321600000000000000e6 +75 1 13 14 -0.39321600000000000000e6 +76 1 1 10 0.39321600000000000000e6 +76 1 7 14 -0.58982400000000000000e6 +76 1 12 12 0.39321600000000000000e6 +76 1 12 15 0.19660800000000000000e6 +76 2 3 3 0.39321600000000000000e6 +77 1 8 15 -0.39321600000000000000e6 +77 1 12 13 0.39321600000000000000e6 +78 1 10 15 -0.19660800000000000000e6 +78 1 13 13 0.39321600000000000000e6 +79 1 12 15 -0.19660800000000000000e6 +79 1 14 14 0.39321600000000000000e6 +80 1 1 2 0.78643200000000000000e6 +80 1 4 15 0.39321600000000000000e6 +80 1 6 9 -0.11796480000000000000e7 +80 1 8 9 0.39321600000000000000e6 +80 2 1 2 0.39321600000000000000e6 +81 1 2 6 0.78643200000000000000e6 +81 1 8 11 -0.11796480000000000000e7 +81 1 9 12 0.39321600000000000000e6 +81 1 12 14 0.39321600000000000000e6 +81 2 2 3 0.39321600000000000000e6 +82 1 1 10 0.39321600000000000000e6 +82 1 3 10 0.29491200000000000000e6 +82 1 4 11 0.19660800000000000000e6 +82 1 5 12 -0.98304000000000000000e5 +82 1 7 14 -0.39321600000000000000e6 +82 1 12 15 0.98304000000000000000e5 +82 2 1 1 0.19660800000000000000e6 +82 2 2 2 0.19660800000000000000e6 +82 2 3 3 0.58982400000000000000e6 +82 3 1 1 0.39321600000000000000e6 +*** ANSWER *** +7.796940893135174784e-10 6.813797637731213995e-08 -1.819702272836695982e-11 0.000000000000000000e+00 0.000000000000000000e+00 -1.211336349987705357e-09 0.000000000000000000e+00 0.000000000000000000e+00 1.828717089330574447e-11 2.195120622248925846e-01 0.000000000000000000e+00 -2.352036246681085175e-04 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.924475710563271824e-01 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.259927758138437212e-07 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -8.108551011105481886e-08 0.000000000000000000e+00 0.000000000000000000e+00 1.259926694923211443e-07 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.259926990287851726e-07 0.000000000000000000e+00 0.000000000000000000e+00 -3.374557525278253518e-11 2.195123353366494334e-01 -2.924478752848230223e-01 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 3.857110778183782992e-10 0.000000000000000000e+00 9.936841897612171285e-12 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 3.896171020302531263e-01 0.000000000000000000e+00 0.000000000000000000e+00 3.133531402781714503e-04 0.000000000000000000e+00 1.751332077338886093e-09 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 3.504835310524504536e-10 0.000000000000000000e+00 4.704077552227346618e-04 8.168351255548993291e-08 0.000000000000000000e+00 3.896167761577700173e-01 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 2.869004426754619736e-09 0.000000000000000000e+00 2.519857261133348374e-07 1.751446184848853887e-09 0.000000000000000000e+00 0.000000000000000000e+00 2.195121949115624027e-01 +1 1 1 1 3.198577514606833899e-04 +1 1 1 3 2.679294251918115655e-02 +1 1 1 5 -7.155360489157535698e-06 +1 1 1 10 -2.693714594373405880e-02 +1 1 1 12 -4.763168341967646824e-04 +1 1 1 15 7.190808189982111616e-06 +1 1 2 2 8.631565507309291570e+04 +1 1 2 4 -9.248582847749496239e+01 +1 1 2 11 -1.149950641004847421e+05 +1 1 3 3 1.849716845352713790e+02 +1 1 3 5 -4.954237533441637614e-02 +1 1 3 10 -1.849715752177701233e+02 +1 1 3 12 -3.188411994382853165e-02 +1 1 3 15 4.954233352709255106e-02 +1 1 4 4 9.909802022926993137e-02 +1 1 4 11 1.232153514416678917e+02 +1 1 5 5 1.326956043717973142e-05 +1 1 5 10 4.954234514130279043e-02 +1 1 5 12 8.514971210025244297e-06 +1 1 5 15 -1.326930011859813481e-05 +1 1 6 6 8.631576246500550769e+04 +1 1 6 8 -1.149951837279969768e+05 +1 1 6 13 -9.248593512963959995e+01 +1 1 7 7 1.649373276126110677e-04 +1 1 7 9 3.907325223611457380e-06 +1 1 7 14 3.904405557167731989e-06 +1 1 8 8 1.532036784051975701e+05 +1 1 8 13 1.232154684076214721e+02 +1 1 9 9 7.019213545600665183e-04 +1 1 9 14 1.378157321463200323e-04 +1 1 10 10 1.849718691472232877e+02 +1 1 10 12 3.211926407301951558e-02 +1 1 10 15 -4.954240963969053918e-02 +1 1 11 11 1.532035502669232665e+05 +1 1 12 12 1.141408005107924506e-03 +1 1 12 15 -8.573548386634422729e-06 +1 1 13 13 9.909808883981825745e-02 +1 1 14 14 7.019662234587064481e-04 +1 1 15 15 1.326956043717973142e-05 +1 2 1 1 2.397658537837361218e+05 +1 2 2 2 8.631570795329622342e+04 +1 2 3 3 8.631570791916403687e+04 +1 3 1 1 8.631570724761448218e+04 +2 1 1 1 4.650128127442948234e+00 +2 1 1 3 1.008270798540294111e+00 +2 1 1 5 5.714731806179644824e-01 +2 1 1 10 1.008267720961343317e+00 +2 1 1 12 1.757154306334899108e+00 +2 1 1 15 5.706052343343418487e-01 +2 1 2 2 2.341604134515230751e+00 +2 1 2 4 5.714731848477510034e-01 +2 1 2 11 1.757154306334810290e+00 +2 1 3 3 1.904806518179348762e+00 +2 1 3 5 5.497075463837746838e+02 +2 1 3 10 1.757154306334931304e+00 +2 1 3 12 -1.439613581218681868e-02 +2 1 3 15 -1.439720223129973761e-02 +2 1 4 4 5.510408797170850903e+02 +2 1 4 11 -1.439613581074555317e-02 +2 1 5 5 2.051667888304038206e+06 +2 1 5 10 -1.439613576859220638e-02 +2 1 5 12 -6.008543894055422552e-01 +2 1 5 15 -1.255422911725835866e-01 +2 1 6 6 2.341601054294314199e+00 +2 1 6 8 1.757154306334887561e+00 +2 1 6 13 5.706052328101218762e-01 +2 1 7 7 3.090487639668219266e+00 +2 1 7 9 -1.439613581156724657e-02 +2 1 7 14 -1.439720219710206167e-02 +2 1 8 8 1.318937197520752669e+00 +2 1 8 13 -1.439720219709016667e-02 +2 1 9 9 7.324789449403529273e-01 +2 1 9 14 -1.255422929507052643e-01 +2 1 10 10 1.903938566143527078e+00 +2 1 10 12 -1.439720219666079486e-02 +2 1 10 15 5.491244135442881316e+02 +2 1 11 11 1.318936131136219547e+00 +2 1 12 12 1.207791043390586960e+00 +2 1 12 15 -6.008514277876668697e-01 +2 1 13 13 5.504577468776512887e+02 +2 1 14 14 7.324819036482069778e-01 +2 1 15 15 2.049403343163140351e+06 +2 2 1 1 2.125519657328064401e-09 +2 2 2 2 5.904219915147324839e-09 +2 2 3 3 5.904219867179756391e-09 +2 3 1 1 5.904221527150735123e-09 +*** END *** +*** REQUEST *** +"" +5 +5 +4 1 1 1 1 +0.15728640000000000000e7 -0.10485760000000000000e7 -0.52428800000000000000e6 -0.15728640000000000000e7 0.10485760000000000000e7 +0 1 2 2 -0.52428800000000000000e6 +0 1 4 4 0.52428800000000000000e6 +0 2 1 1 -0.52428800000000000000e6 +0 4 1 1 -0.52428800000000000000e6 +1 1 1 1 0.52428800000000000000e6 +1 1 2 2 0.52428800000000000000e6 +1 1 4 4 -0.52428800000000000000e6 +1 2 1 1 0.52428800000000000000e6 +1 4 1 1 0.52428800000000000000e6 +2 1 1 2 0.52428800000000000000e6 +2 1 1 4 -0.52428800000000000000e6 +2 4 1 1 -0.10485760000000000000e7 +3 1 1 3 0.52428800000000000000e6 +3 1 1 4 -0.26214400000000000000e6 +3 1 4 4 -0.52428800000000000000e6 +4 1 2 2 -0.52428800000000000000e6 +4 1 2 4 0.52428800000000000000e6 +4 1 4 4 -0.52428800000000000000e6 +4 5 1 1 -0.52428800000000000000e6 +5 3 1 1 0.52428800000000000000e6 +5 4 1 1 0.52428800000000000000e6 +*** ANSWER *** +Failure +*** END *** +*** REQUEST *** +"" +20 +7 +4 1 4 1 4 1 1 +-0.52428800000000000000e6 0.10485760000000000000e7 -0.52428800000000000000e6 0.0 -0.10485760000000000000e7 0.52428800000000000000e6 0.0 0.0 0.10485760000000000000e7 0.10485760000000000000e7 0.10485760000000000000e7 0.52428800000000000000e6 0.0 0.0 0.0 0.0 0.0 0.0 0.10485760000000000000e7 0.52428800000000000000e6 +0 1 1 2 -0.26214400000000000000e6 +0 1 1 4 0.26214400000000000000e6 +0 2 1 1 -0.52428800000000000000e6 +0 3 1 2 0.26214400000000000000e6 +0 5 1 4 -0.26214400000000000000e6 +1 1 2 3 0.52428800000000000000e6 +1 1 3 4 -0.52428800000000000000e6 +1 5 1 4 -0.26214400000000000000e6 +1 5 4 4 -0.52428800000000000000e6 +2 1 1 1 0.52428800000000000000e6 +2 1 1 2 0.26214400000000000000e6 +2 1 1 4 -0.26214400000000000000e6 +2 2 1 1 0.52428800000000000000e6 +2 3 1 2 -0.26214400000000000000e6 +2 5 1 4 0.26214400000000000000e6 +3 1 1 3 0.52428800000000000000e6 +3 1 1 4 -0.26214400000000000000e6 +3 1 4 4 -0.52428800000000000000e6 +4 1 2 2 0.52428800000000000000e6 +4 1 4 4 -0.52428800000000000000e6 +4 3 1 2 0.26214400000000000000e6 +4 5 1 4 -0.26214400000000000000e6 +5 1 2 4 0.52428800000000000000e6 +5 1 4 4 -0.10485760000000000000e7 +5 5 1 4 -0.52428800000000000000e6 +6 1 1 2 0.26214400000000000000e6 +6 1 1 4 -0.26214400000000000000e6 +6 3 1 1 0.52428800000000000000e6 +7 1 2 3 0.52428800000000000000e6 +7 1 3 4 -0.52428800000000000000e6 +7 3 1 3 0.52428800000000000000e6 +8 3 1 4 0.52428800000000000000e6 +8 5 1 4 0.52428800000000000000e6 +9 1 1 2 -0.26214400000000000000e6 +9 1 1 4 0.26214400000000000000e6 +9 1 2 3 0.52428800000000000000e6 +9 1 3 4 -0.52428800000000000000e6 +9 3 1 2 0.26214400000000000000e6 +9 3 2 2 0.52428800000000000000e6 +9 4 1 1 0.52428800000000000000e6 +10 3 3 3 0.52428800000000000000e6 +10 5 3 3 0.52428800000000000000e6 +11 3 4 4 0.52428800000000000000e6 +11 5 4 4 0.52428800000000000000e6 +12 1 1 2 -0.26214400000000000000e6 +12 1 1 4 0.26214400000000000000e6 +12 5 1 1 0.52428800000000000000e6 +13 3 1 2 0.52428800000000000000e6 +13 5 1 2 0.52428800000000000000e6 +14 1 2 3 -0.52428800000000000000e6 +14 1 3 4 0.52428800000000000000e6 +14 5 1 3 0.52428800000000000000e6 +15 1 1 2 0.26214400000000000000e6 +15 1 1 4 -0.26214400000000000000e6 +15 1 2 3 -0.52428800000000000000e6 +15 1 3 4 0.52428800000000000000e6 +15 3 1 2 -0.26214400000000000000e6 +15 4 1 1 -0.52428800000000000000e6 +15 5 2 2 0.52428800000000000000e6 +16 3 2 3 0.52428800000000000000e6 +16 5 2 3 0.52428800000000000000e6 +17 3 2 4 0.52428800000000000000e6 +17 5 2 4 0.52428800000000000000e6 +18 3 3 4 0.52428800000000000000e6 +18 5 3 4 0.52428800000000000000e6 +19 4 1 1 0.52428800000000000000e6 +19 6 1 1 0.52428800000000000000e6 +20 3 1 2 -0.26214400000000000000e6 +20 5 1 4 -0.26214400000000000000e6 +20 7 1 1 0.52428800000000000000e6 +*** ANSWER *** +1.408782135629833379e-09 -1.602915007691423680e-09 -2.114475652645426357e-10 1.060506410792219022e-09 2.087517963511041579e-10 7.735026962533785022e-02 -6.083346056031729135e-10 -1.056624336133169251e-01 1.443375650931139342e-01 -1.043524718501323747e-09 1.443375655752403564e-01 1.077350266300642900e+00 3.943375640054703757e-01 2.270314905788526486e-09 1.443375636846789267e-01 8.310024292703551422e-10 1.443375652667335807e-01 8.309943070227691571e-10 -1.341153069964939011e-09 -1.043513950273019921e-09 +1 1 1 1 1.330530909011591600e-04 +1 1 1 2 8.214146408166717733e-05 +1 1 1 3 -1.108594210974165294e-04 +1 1 1 4 -2.671176437533311163e-05 +1 1 2 2 1.529452979555114694e-03 +1 1 2 3 -3.220826912303867418e-05 +1 1 2 4 1.094460618053276968e-04 +1 1 3 3 9.734421944536802984e-04 +1 1 3 4 3.220826912303867418e-05 +1 1 4 4 3.093987068390115919e-04 +1 2 1 1 5.242880001330530504e+05 +1 3 1 1 4.055381913477132912e+04 +1 3 1 2 -5.539754590173628094e+04 +1 3 1 3 -3.189425337024763205e-04 +1 3 1 4 -5.539754599425870401e+04 +1 3 2 2 7.567445430098070938e+04 +1 3 2 3 4.356846016372959568e-04 +1 3 2 4 7.567445341856521554e+04 +1 3 3 3 4.263347068400591411e-04 +1 3 3 4 4.356803432403535958e-04 +1 3 4 4 7.567445455375382153e+04 +1 4 1 1 1.008717294824084537e-03 +1 5 1 1 5.648418173916736851e+05 +1 5 1 2 2.067464527573000523e+05 +1 5 1 3 1.190298861326054974e-03 +1 5 1 4 2.067464531023424352e+05 +1 5 2 2 7.567445356255515071e+04 +1 5 2 3 4.356846016372959568e-04 +1 5 2 4 7.567445341856521554e+04 +1 5 3 3 4.263347068400591411e-04 +1 5 3 4 4.356803432403535958e-04 +1 5 4 4 7.567445381514624751e+04 +1 6 1 1 2.702917337079049562e-04 +1 7 1 1 4.263403524929400973e-04 +2 1 1 1 3.732050805139194516e+00 +2 1 1 2 -2.205738821003602190e-01 +2 1 1 3 5.137913895681569532e-01 +2 1 1 4 3.567764144417457928e-01 +2 1 2 2 5.161058552875832373e-01 +2 1 2 3 1.025309974541342359e-02 +2 1 2 4 9.345607328673936898e-02 +2 1 3 3 8.811272737592539261e-01 +2 1 3 4 1.025319705650454272e-02 +2 1 4 4 1.670806364694566115e+00 +2 2 1 1 8.098913424095950693e-10 +2 3 1 1 1.577350296542103125e+00 +2 3 1 2 5.773502179991568672e-01 +2 3 1 3 9.731109131778280951e-08 +2 3 1 4 5.773502914078277870e-01 +2 3 2 2 4.226500930909230513e-01 +2 3 2 3 -1.505172222580337775e-03 +2 3 2 4 -2.930749631858512249e-07 +2 3 3 3 1.009116009161232563e+00 +2 3 3 4 1.505025171725787349e-03 +2 3 4 4 4.226499032143540280e-01 +2 4 1 1 4.226495869899917768e-01 +2 5 1 1 4.226497034578927114e-01 +2 5 1 2 -5.773502179991555350e-01 +2 5 1 3 -9.731109217953321892e-08 +2 5 1 4 -5.773502914078278980e-01 +2 5 2 2 1.577349906909068178e+00 +2 5 2 3 1.505172222581506979e-03 +2 5 2 4 2.930749610850833078e-07 +2 5 3 3 9.908839908387667705e-01 +2 5 3 4 -1.505025171724929745e-03 +2 5 4 4 1.577350096785647304e+00 +2 6 1 1 1.577350413010008445e+00 +2 7 1 1 9.999999265913281921e-01 +*** END *** +*** REQUEST *** +"" +5 +5 +4 1 1 1 1 +0.52428800000000000000e6 -0.10485760000000000000e7 -0.52428800000000000000e6 -0.15728640000000000000e7 0.10485760000000000000e7 +0 1 2 2 0.52428800000000000000e6 +0 1 4 4 -0.52428800000000000000e6 +0 2 1 1 -0.52428800000000000000e6 +0 4 1 1 0.52428800000000000000e6 +1 1 1 1 0.52428800000000000000e6 +1 1 2 2 -0.52428800000000000000e6 +1 1 4 4 0.52428800000000000000e6 +1 2 1 1 0.52428800000000000000e6 +1 4 1 1 -0.52428800000000000000e6 +2 1 1 2 0.52428800000000000000e6 +2 1 1 4 -0.52428800000000000000e6 +2 4 1 1 -0.10485760000000000000e7 +3 1 1 3 0.52428800000000000000e6 +3 1 1 4 -0.26214400000000000000e6 +3 1 4 4 -0.52428800000000000000e6 +4 1 2 2 -0.52428800000000000000e6 +4 1 2 4 0.52428800000000000000e6 +4 1 4 4 -0.52428800000000000000e6 +4 5 1 1 -0.52428800000000000000e6 +5 3 1 1 0.52428800000000000000e6 +5 4 1 1 0.52428800000000000000e6 +*** ANSWER *** +Failure +*** END *** +*** REQUEST *** +"" +20 +7 +4 1 4 1 4 1 1 +-0.52428800000000000000e6 0.10485760000000000000e7 -0.52428800000000000000e6 0.0 -0.10485760000000000000e7 0.52428800000000000000e6 0.0 0.0 0.0 0.10485760000000000000e7 0.10485760000000000000e7 0.52428800000000000000e6 0.0 0.0 0.10485760000000000000e7 0.0 0.0 0.0 0.10485760000000000000e7 0.52428800000000000000e6 +0 1 1 2 0.26214400000000000000e6 +0 1 1 4 -0.26214400000000000000e6 +0 2 1 1 -0.52428800000000000000e6 +0 3 1 2 -0.26214400000000000000e6 +0 5 1 4 0.26214400000000000000e6 +1 1 2 3 0.52428800000000000000e6 +1 1 3 4 -0.52428800000000000000e6 +1 5 1 4 -0.26214400000000000000e6 +1 5 4 4 -0.52428800000000000000e6 +2 1 1 1 0.52428800000000000000e6 +2 1 1 2 -0.26214400000000000000e6 +2 1 1 4 0.26214400000000000000e6 +2 2 1 1 0.52428800000000000000e6 +2 3 1 2 0.26214400000000000000e6 +2 5 1 4 -0.26214400000000000000e6 +3 1 1 3 0.52428800000000000000e6 +3 1 1 4 -0.26214400000000000000e6 +3 1 4 4 -0.52428800000000000000e6 +4 1 2 2 0.52428800000000000000e6 +4 1 4 4 -0.52428800000000000000e6 +4 3 1 2 0.26214400000000000000e6 +4 5 1 4 -0.26214400000000000000e6 +5 1 2 4 0.52428800000000000000e6 +5 1 4 4 -0.10485760000000000000e7 +5 5 1 4 -0.52428800000000000000e6 +6 1 1 2 0.26214400000000000000e6 +6 1 1 4 -0.26214400000000000000e6 +6 3 1 1 0.52428800000000000000e6 +7 1 2 3 0.52428800000000000000e6 +7 1 3 4 -0.52428800000000000000e6 +7 3 1 3 0.52428800000000000000e6 +8 3 1 4 0.52428800000000000000e6 +8 5 1 4 0.52428800000000000000e6 +9 1 1 2 0.26214400000000000000e6 +9 1 1 4 -0.26214400000000000000e6 +9 1 2 3 0.52428800000000000000e6 +9 1 3 4 -0.52428800000000000000e6 +9 3 1 2 0.26214400000000000000e6 +9 3 2 2 0.52428800000000000000e6 +9 4 1 1 -0.52428800000000000000e6 +10 3 3 3 0.52428800000000000000e6 +10 5 3 3 0.52428800000000000000e6 +11 3 4 4 0.52428800000000000000e6 +11 5 4 4 0.52428800000000000000e6 +12 1 1 2 -0.26214400000000000000e6 +12 1 1 4 0.26214400000000000000e6 +12 5 1 1 0.52428800000000000000e6 +13 3 1 2 0.52428800000000000000e6 +13 5 1 2 0.52428800000000000000e6 +14 1 2 3 -0.52428800000000000000e6 +14 1 3 4 0.52428800000000000000e6 +14 5 1 3 0.52428800000000000000e6 +15 1 1 2 -0.26214400000000000000e6 +15 1 1 4 0.26214400000000000000e6 +15 1 2 3 -0.52428800000000000000e6 +15 1 3 4 0.52428800000000000000e6 +15 3 1 2 -0.26214400000000000000e6 +15 4 1 1 0.52428800000000000000e6 +15 5 2 2 0.52428800000000000000e6 +16 3 2 3 0.52428800000000000000e6 +16 5 2 3 0.52428800000000000000e6 +17 3 2 4 0.52428800000000000000e6 +17 5 2 4 0.52428800000000000000e6 +18 3 3 4 0.52428800000000000000e6 +18 5 3 4 0.52428800000000000000e6 +19 4 1 1 0.52428800000000000000e6 +19 6 1 1 0.52428800000000000000e6 +20 3 1 2 -0.26214400000000000000e6 +20 5 1 4 -0.26214400000000000000e6 +20 7 1 1 0.52428800000000000000e6 +*** ANSWER *** +-1.342746526345061715e-09 -2.443492977315052222e-10 2.208950819456293398e-11 -1.532357985106601546e-10 -3.139233416116088887e-11 1.077350268749094120e+00 7.009852277455727232e-10 3.943375659685520174e-01 1.443375671349989564e-01 -5.878340507562113329e-11 1.443375661877718541e-01 7.735026948774698097e-02 -1.056624327919023082e-01 -1.878285492550673151e-10 1.443375666874154029e-01 2.565781949174762027e-10 1.443375668147542368e-01 2.565786864113415496e-10 2.942145218318752536e-10 -5.878238521589696054e-11 +1 1 1 1 3.819403205883547918e-05 +1 1 1 2 -1.224733049205359824e-05 +1 1 1 3 1.158126407231101153e-05 +1 1 1 4 6.456704127512840957e-06 +1 1 2 2 8.596374633833324744e-05 +1 1 2 3 -3.328802848049413742e-06 +1 1 2 4 -1.645862409268672010e-05 +1 1 3 3 1.663034366678906723e-04 +1 1 3 4 3.328802848049413742e-06 +1 1 4 4 2.679791111105120707e-04 +1 2 1 1 5.242880000381940044e+05 +1 3 1 1 5.648418178682285361e+05 +1 3 1 2 2.067464544649153540e+05 +1 3 1 3 3.675181430842708319e-04 +1 3 1 4 2.067464537865202001e+05 +1 3 2 2 7.567445456437776738e+04 +1 3 2 3 1.345208686568937634e-04 +1 3 2 4 7.567445423017386929e+04 +1 3 3 3 1.354840027876034331e-04 +1 3 3 4 1.345211263412294384e-04 +1 3 4 4 7.567445406775796437e+04 +1 4 1 1 8.589389131903515245e-05 +1 5 1 1 4.055381825549533096e+04 +1 5 1 2 -5.539754556360087736e+04 +1 5 1 3 -9.847625443184073249e-05 +1 5 1 4 -5.539754572539421497e+04 +1 5 2 2 7.567445432971508126e+04 +1 5 2 3 1.345208686568937634e-04 +1 5 2 4 7.567445423017386929e+04 +1 5 3 3 1.354840027876034331e-04 +1 5 3 4 1.345211263412294384e-04 +1 5 4 4 7.567445477174385451e+04 +1 6 1 1 3.205565798900817526e-04 +1 7 1 1 1.354845374878180936e-04 +2 1 1 1 3.732050806982203373e+00 +2 1 1 2 4.978949133196186594e-01 +2 1 1 3 -1.308568436669261814e-01 +2 1 1 4 -7.945535675086745631e-02 +2 1 2 2 1.972442206524292363e+00 +2 1 2 3 6.164317095563820459e-02 +2 1 2 4 3.950919296356215638e-01 +2 1 3 3 1.074614358661167834e+00 +2 1 3 4 6.164314293620330037e-02 +2 1 4 4 8.177416694170173139e-01 +2 2 1 1 1.955575535633660102e-10 +2 3 1 1 4.226497299295132737e-01 +2 3 1 2 -5.773502768886704661e-01 +2 3 1 3 -2.801943794662026982e-08 +2 3 1 4 -5.773502602186049160e-01 +2 3 2 2 1.577350183915906534e+00 +2 3 2 3 -5.093597884469405757e-03 +2 3 2 4 7.563155554311366017e-08 +2 3 3 3 1.000664225665719220e+00 +2 3 3 4 5.093637134632639923e-03 +2 3 4 4 1.577350204179726045e+00 +2 4 1 1 1.577350233136592728e+00 +2 5 1 1 1.577350270070483784e+00 +2 5 1 2 5.773502768886699110e-01 +2 5 1 3 2.801943516876615048e-08 +2 5 1 4 5.773502602186050270e-01 +2 5 2 2 4.226498160840916896e-01 +2 5 2 3 5.093597884469902755e-03 +2 5 2 4 -7.563155467628118543e-08 +2 5 3 3 9.993357743342811128e-01 +2 5 3 4 -5.093637134632782171e-03 +2 5 4 4 4.226497958202757865e-01 +2 6 1 1 4.226497668634069393e-01 +2 7 1 1 9.999999833299334506e-01 +*** END *** +*** REQUEST *** +"" +2 +4 +1 1 1 1 +0.15728640000000000000e7 0.10485760000000000000e7 +0 2 1 1 -0.10485760000000000000e7 +0 4 1 1 -0.10485760000000000000e7 +1 1 1 1 0.10485760000000000000e7 +1 2 1 1 0.10485760000000000000e7 +1 4 1 1 0.10485760000000000000e7 +2 2 1 1 0.10485760000000000000e7 +2 3 1 1 0.10485760000000000000e7 +*** ANSWER *** +-8.033537119682993312e-10 -8.033532523347130644e-10 +1 1 1 1 9.639215222160258208e-10 +1 2 1 1 1.048575999157623970e+06 +1 3 1 1 1.445882272036933453e-09 +1 4 1 1 1.048576000000000931e+06 +2 1 1 1 1.499999999685651009e+00 +2 2 1 1 1.378900983392931975e-15 +2 3 1 1 9.999999999999862332e-01 +2 4 1 1 1.378900796134651217e-15 +*** END *** +*** REQUEST *** +"" +1 +3 +1 1 1 +0.10485760000000000000e7 +0 1 1 1 0.10485760000000000000e7 +1 1 1 1 0.10485760000000000000e7 +1 2 1 1 -0.10485760000000000000e7 +1 3 1 1 0.10485760000000000000e7 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +5 +5 +4 1 1 1 1 +0.10485760000000000000e7 0.0 0.52428800000000000000e6 0.52428800000000000000e6 0.0 +0 2 1 1 -0.52428800000000000000e6 +1 1 1 1 0.52428800000000000000e6 +1 2 1 1 0.52428800000000000000e6 +2 1 1 3 0.52428800000000000000e6 +2 1 1 4 -0.52428800000000000000e6 +2 2 1 1 -0.10485760000000000000e7 +2 4 1 1 0.10485760000000000000e7 +3 1 1 2 -0.52428800000000000000e6 +3 1 1 4 0.26214400000000000000e6 +3 1 3 3 0.52428800000000000000e6 +3 2 1 1 0.52428800000000000000e6 +3 4 1 1 -0.52428800000000000000e6 +4 2 1 1 0.52428800000000000000e6 +4 3 1 1 0.52428800000000000000e6 +4 4 1 1 -0.52428800000000000000e6 +5 1 1 2 -0.52428800000000000000e6 +5 1 1 4 0.26214400000000000000e6 +5 1 3 4 0.52428800000000000000e6 +5 1 4 4 -0.52428800000000000000e6 +5 5 1 1 0.52428800000000000000e6 +*** ANSWER *** +-1.338594917701584393e-10 -4.876570677399720908e-12 -8.432248596379257249e-11 -1.376003305176662146e-10 6.303077531793304895e-11 +1 1 1 1 1.961387163584582007e-06 +1 1 1 2 1.116298839109634367e-05 +1 1 1 3 -2.556727487312544875e-06 +1 1 1 4 -3.024766708235593078e-06 +1 1 2 2 7.214231238477719979e-05 +1 1 3 3 2.793304486379264481e-05 +1 1 3 4 3.304627912988848237e-05 +1 1 4 4 3.909603325488893426e-05 +1 2 1 1 5.242879998907233821e+05 +1 3 1 1 1.102983309069068926e-10 +1 4 1 1 1.833803270175834998e-04 +1 5 1 1 1.051885915146662243e-04 +2 1 1 1 1.999999999825280872e+00 +2 1 1 2 -3.095056099254819282e-01 +2 1 1 3 8.388821521212311283e-02 +2 1 1 4 8.388917358587567874e-02 +2 1 2 2 4.789927494245199008e-02 +2 1 2 3 -1.307058076260208049e-02 +2 1 2 4 -1.290714134044862460e-02 +2 1 3 3 2.971005649372479018e-01 +2 1 3 4 -2.447309307272341194e-01 +2 1 4 4 2.134402019028047992e-01 +2 2 1 1 2.103712716147778344e-16 +2 3 1 1 1.000000958427416542e+00 +2 4 1 1 9.583793370118670507e-07 +2 5 1 1 1.669900717227676154e-06 +*** END *** +*** REQUEST *** +"" +4 +2 +3 1 +-0.52428800000000000000e6 0.52428800000000000000e6 0.10485760000000000000e7 0.0 +0 1 2 2 0.10485760000000000000e7 +0 1 3 3 -0.10485760000000000000e7 +0 2 1 1 -0.10485760000000000000e7 +1 1 2 3 0.52428800000000000000e6 +1 1 3 3 -0.10485760000000000000e7 +2 1 2 2 0.10485760000000000000e7 +2 1 2 3 -0.52428800000000000000e6 +3 1 1 1 0.10485760000000000000e7 +3 1 2 2 -0.10485760000000000000e7 +3 1 3 3 0.10485760000000000000e7 +3 2 1 1 0.10485760000000000000e7 +4 1 1 2 -0.10485760000000000000e7 +4 1 1 3 0.10485760000000000000e7 +*** ANSWER *** +9.999995669872646653e-01 9.999987009619675238e-01 -8.660253659925441563e-07 0.000000000000000000e+00 +1 1 1 1 3.962767353149487803e-08 +1 1 2 2 4.540467642000610149e-01 +1 1 2 3 4.540466709859902750e-01 +1 1 3 3 4.540468014726645185e-01 +1 2 1 1 1.048576000000039581e+06 +2 1 1 1 9.999999999999281686e-01 +2 1 2 2 2.500000307927105481e-01 +2 1 2 3 -2.499999692072846225e-01 +2 1 3 3 2.500000307927234822e-01 +2 2 1 1 5.333451642288094782e-14 +*** END *** +*** REQUEST *** +"" +4 +2 +3 1 +-0.52428800000000000000e6 0.52428800000000000000e6 0.10485760000000000000e7 0.0 +0 1 2 2 -0.10485760000000000000e7 +0 1 3 3 0.10485760000000000000e7 +0 2 1 1 -0.10485760000000000000e7 +1 1 2 3 0.52428800000000000000e6 +1 1 3 3 -0.10485760000000000000e7 +2 1 2 2 0.10485760000000000000e7 +2 1 2 3 -0.52428800000000000000e6 +3 1 1 1 0.10485760000000000000e7 +3 1 2 2 0.10485760000000000000e7 +3 1 3 3 -0.10485760000000000000e7 +3 2 1 1 0.10485760000000000000e7 +4 1 1 2 -0.10485760000000000000e7 +4 1 1 3 0.10485760000000000000e7 +*** ANSWER *** +-9.999998331245307792e-01 -9.999999443745658523e-01 -1.112500350952176353e-07 0.000000000000000000e+00 +1 1 1 1 1.642036506765975901e-11 +1 1 2 2 5.832749536206643937e-02 +1 1 2 3 5.832705836608864658e-02 +1 1 3 3 5.832662143581340830e-02 +1 2 1 1 1.048576000000000000e+06 +2 1 1 1 9.999999999999996669e-01 +2 1 2 2 2.499998068521827044e-01 +2 1 2 3 -2.500000893194189722e-01 +2 1 3 3 2.500003721368480036e-01 +2 2 1 1 2.465190328815661892e-32 +*** END *** +*** REQUEST *** +"" +4 +2 +3 1 +-0.52428800000000000000e6 -0.52428800000000000000e6 0.10485760000000000000e7 0.0 +0 1 2 2 0.10485760000000000000e7 +0 1 3 3 -0.10485760000000000000e7 +0 2 1 1 -0.10485760000000000000e7 +1 1 2 3 -0.52428800000000000000e6 +1 1 3 3 -0.10485760000000000000e7 +2 1 2 2 -0.10485760000000000000e7 +2 1 2 3 -0.52428800000000000000e6 +3 1 1 1 0.10485760000000000000e7 +3 1 2 2 -0.10485760000000000000e7 +3 1 3 3 0.10485760000000000000e7 +3 2 1 1 0.10485760000000000000e7 +4 1 1 2 0.10485760000000000000e7 +4 1 1 3 0.10485760000000000000e7 +*** ANSWER *** +9.999995669872646653e-01 -9.999987009619675238e-01 -8.660253659925441563e-07 0.000000000000000000e+00 +1 1 1 1 3.962767353149487803e-08 +1 1 2 2 4.540467642000610149e-01 +1 1 2 3 -4.540466709859902750e-01 +1 1 3 3 4.540468014726645185e-01 +1 2 1 1 1.048576000000039581e+06 +2 1 1 1 9.999999999999281686e-01 +2 1 2 2 2.500000307927105481e-01 +2 1 2 3 2.499999692072846225e-01 +2 1 3 3 2.500000307927234822e-01 +2 2 1 1 5.333451642288094782e-14 +*** END *** +*** REQUEST *** +"" +4 +2 +3 1 +-0.52428800000000000000e6 -0.52428800000000000000e6 0.10485760000000000000e7 0.0 +0 1 2 2 -0.10485760000000000000e7 +0 1 3 3 0.10485760000000000000e7 +0 2 1 1 -0.10485760000000000000e7 +1 1 2 3 -0.52428800000000000000e6 +1 1 3 3 -0.10485760000000000000e7 +2 1 2 2 -0.10485760000000000000e7 +2 1 2 3 -0.52428800000000000000e6 +3 1 1 1 0.10485760000000000000e7 +3 1 2 2 0.10485760000000000000e7 +3 1 3 3 -0.10485760000000000000e7 +3 2 1 1 0.10485760000000000000e7 +4 1 1 2 0.10485760000000000000e7 +4 1 1 3 0.10485760000000000000e7 +*** ANSWER *** +-9.999998331245307792e-01 9.999999443745658523e-01 -1.112500350952176353e-07 0.000000000000000000e+00 +1 1 1 1 1.642036506765975901e-11 +1 1 2 2 5.832749536206643937e-02 +1 1 2 3 -5.832705836608864658e-02 +1 1 3 3 5.832662143581340830e-02 +1 2 1 1 1.048576000000000000e+06 +2 1 1 1 9.999999999999996669e-01 +2 1 2 2 2.499998068521827044e-01 +2 1 2 3 2.500000893194189722e-01 +2 1 3 3 2.500003721368480036e-01 +2 2 1 1 2.465190328815661892e-32 +*** END *** +*** REQUEST *** +"" +1 +5 +1 1 1 1 1 +0.10485760000000000000e7 +0 1 1 1 0.10485760000000000000e7 +1 2 1 1 0.10485760000000000000e7 +1 4 1 1 0.10485760000000000000e7 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +13 +11 +5 1 1 1 1 1 1 1 1 1 1 +0.15728640000000000000e7 -0.10485760000000000000e7 -0.10485760000000000000e7 0.10485760000000000000e7 0.10485760000000000000e7 0.10485760000000000000e7 0.0 0.10485760000000000000e7 0.10485760000000000000e7 0.0 0.10485760000000000000e7 0.10485760000000000000e7 0.10485760000000000000e7 +0 1 1 1 0.52428800000000000000e6 +1 1 4 4 0.10485760000000000000e7 +1 6 1 1 0.52428800000000000000e6 +2 1 1 2 0.52428800000000000000e6 +2 1 2 3 0.52428800000000000000e6 +2 4 1 1 -0.10485760000000000000e7 +3 1 1 4 0.52428800000000000000e6 +3 8 1 1 -0.10485760000000000000e7 +4 1 2 2 0.52428800000000000000e6 +4 6 1 1 0.52428800000000000000e6 +5 1 2 4 0.52428800000000000000e6 +5 9 1 1 0.10485760000000000000e7 +6 1 3 3 0.52428800000000000000e6 +6 6 1 1 0.52428800000000000000e6 +7 1 4 4 -0.52428800000000000000e6 +7 1 5 5 0.52428800000000000000e6 +8 1 2 3 -0.26214400000000000000e6 +8 2 1 1 0.52428800000000000000e6 +8 4 1 1 0.52428800000000000000e6 +9 1 1 1 0.52428800000000000000e6 +9 1 1 3 0.26214400000000000000e6 +9 3 1 1 0.52428800000000000000e6 +10 1 2 3 0.26214400000000000000e6 +10 4 1 1 -0.52428800000000000000e6 +10 5 1 1 0.52428800000000000000e6 +11 4 1 1 0.52428800000000000000e6 +11 7 1 1 0.52428800000000000000e6 +12 1 3 4 0.26214400000000000000e6 +12 8 1 1 0.52428800000000000000e6 +12 10 1 1 0.52428800000000000000e6 +13 9 1 1 0.52428800000000000000e6 +13 11 1 1 0.52428800000000000000e6 +*** ANSWER *** +1.491607500493158475e-10 -2.946260586897868525e-25 1.192686814972796844e-10 1.574303654274453910e-11 2.080232249849451083e-24 1.170819464678145350e+00 1.458414260046146013e-10 4.060381611148327209e-10 1.447214523119946250e+00 4.060381611148343752e-10 4.060381611148294122e-10 4.928738059904181593e-10 4.060381611148277578e-10 +1 1 1 1 2.344692080938835279e+05 +1 1 1 2 -1.544689070583509693e-19 +1 1 1 3 3.793786039487551898e+05 +1 1 1 4 6.253113848484577117e-05 +1 1 2 2 2.046271191861112615e-04 +1 1 2 3 3.810179772744665476e-19 +1 1 2 4 1.090640805809069009e-18 +1 1 3 3 6.138465956935486756e+05 +1 1 3 4 1.292039109975521780e-04 +1 1 4 4 2.763167071297943644e-04 +1 1 5 5 2.728361436002968432e-04 +1 2 1 1 4.092541694577598449e-04 +1 3 1 1 7.587572080938835861e+05 +1 4 1 1 4.092541694577598449e-04 +1 5 1 1 4.092541694577633143e-04 +1 6 1 1 6.138465957800056785e+05 +1 7 1 1 4.092541694577598449e-04 +1 8 1 1 3.297187790686018430e-04 +1 9 1 1 4.092541694577598449e-04 +1 10 1 1 4.547810560382933853e-04 +1 11 1 1 4.092541694577598449e-04 +2 1 1 1 5.236067975094374383e+00 +2 1 1 2 -4.180129510443609950e-16 +2 1 1 3 -3.236067975651311546e+00 +2 1 1 4 5.031018360597926398e-01 +2 1 2 2 1.999999999311909527e+00 +2 1 2 3 2.583501648248632324e-16 +2 1 2 4 5.150626177396930724e-17 +2 1 3 3 1.999999999311873555e+00 +2 1 3 4 -3.109408375486479303e-01 +2 1 4 4 1.499999999655955429e+00 +2 1 5 5 1.499999999655954985e+00 +2 2 1 1 1.000000000000000222e+00 +2 3 1 1 5.567308407420794632e-10 +2 4 1 1 1.000000000000000000e+00 +2 5 1 1 9.999999999999996669e-01 +2 6 1 1 6.880904095754841013e-10 +2 7 1 1 1.000000000000000000e+00 +2 8 1 1 1.503101836059808738e+00 +2 9 1 1 9.999999999999998890e-01 +2 10 1 1 8.078390014888369164e-01 +2 11 1 1 1.000000000000000222e+00 +*** END *** +*** REQUEST *** +"" +1 +5 +1 1 1 1 1 +0.15728640000000000000e7 +0 1 1 1 0.10485760000000000000e7 +1 1 1 1 0.10485760000000000000e7 +1 2 1 1 0.10485760000000000000e7 +1 5 1 1 0.10485760000000000000e7 +*** ANSWER *** +1.000000001957216389e+00 +1 1 1 1 3.452177815527975729e-03 +1 2 1 1 1.048576003452177858e+06 +1 3 1 1 1.399887753448717312e-03 +1 4 1 1 1.399887753448717312e-03 +1 5 1 1 1.048576003452177858e+06 +2 1 1 1 1.499999999999996891e+00 +2 2 1 1 1.625838482485675356e-15 +2 3 1 1 2.922314168167987170e+00 +2 4 1 1 2.922314168167987170e+00 +2 5 1 1 1.625838482485675356e-15 +*** END *** +*** REQUEST *** +"" +10 +8 +5 1 1 1 1 1 1 1 +0.26214400000000000000e6 0.78643200000000000000e6 -0.52428800000000000000e6 -0.52428800000000000000e6 0.0 -0.52428800000000000000e6 0.10485760000000000000e7 0.0 -0.26214400000000000000e6 0.52428800000000000000e6 +0 1 3 3 -0.10485760000000000000e7 +0 1 4 4 0.52428800000000000000e6 +0 2 1 1 -0.52428800000000000000e6 +1 1 3 3 0.10485760000000000000e7 +1 1 4 4 -0.52428800000000000000e6 +2 1 1 1 0.52428800000000000000e6 +2 1 3 3 0.10485760000000000000e7 +2 1 4 4 -0.52428800000000000000e6 +2 2 1 1 0.52428800000000000000e6 +3 1 1 2 0.52428800000000000000e6 +3 4 1 1 -0.10485760000000000000e7 +4 1 1 3 0.52428800000000000000e6 +4 6 1 1 -0.10485760000000000000e7 +5 1 2 2 0.52428800000000000000e6 +5 1 4 4 -0.52428800000000000000e6 +6 1 2 3 0.52428800000000000000e6 +6 8 1 1 -0.10485760000000000000e7 +7 1 2 4 0.52428800000000000000e6 +7 4 1 1 0.10485760000000000000e7 +7 5 1 1 0.10485760000000000000e7 +8 1 3 3 -0.52428800000000000000e6 +8 1 5 5 0.52428800000000000000e6 +9 1 1 4 0.26214400000000000000e6 +9 1 3 3 -0.10485760000000000000e7 +9 1 4 4 0.52428800000000000000e6 +9 2 1 1 -0.52428800000000000000e6 +9 3 1 1 0.52428800000000000000e6 +10 1 3 4 0.26214400000000000000e6 +10 6 1 1 0.52428800000000000000e6 +10 7 1 1 0.52428800000000000000e6 +*** ANSWER *** +-9.999999995891341031e-01 -3.803473486621178888e-10 -6.700393916482747952e-12 -5.428871525357892679e-12 4.357318402697323595e-11 1.224368895784648765e-10 -1.397522156751196915e-10 -1.881197163293053418e-10 1.961501144259765512e-10 -2.678331179220082914e-10 +1 1 1 1 6.945594704874666694e-05 +1 1 1 2 -3.512936125684906958e-06 +1 1 1 3 -2.846292194286838837e-06 +1 1 1 4 5.141957559608319704e-05 +1 1 2 2 2.917123952912454438e-04 +1 1 2 3 6.419219196331419318e-05 +1 1 2 4 -7.327040965187715284e-05 +1 1 3 3 1.938191092966602865e-04 +1 1 3 4 -7.021084486454694153e-05 +1 1 4 4 3.328611961756211546e-04 +1 1 5 5 1.702385879492527253e-04 +1 2 1 1 5.242879999666168005e+05 +1 3 1 1 3.717066489762766573e-04 +1 4 1 1 1.293525507317268286e-04 +1 5 1 1 1.223266784803576923e-04 +1 6 1 1 1.341383924435904373e-04 +1 7 1 1 1.284458080550170307e-04 +1 8 1 1 1.404831138574836116e-04 +2 1 1 1 9.999999999048130306e-01 +2 1 1 2 -9.791805858089613901e-02 +2 1 1 3 -7.495940148985721918e-02 +2 1 1 4 -1.761119473870640384e-01 +2 1 2 2 2.862965238970243131e-01 +2 1 2 3 -6.789572938328512774e-02 +2 1 2 4 1.173483178028186941e-01 +2 1 3 3 3.931482619485121011e-01 +2 1 3 4 1.011591097635078512e-01 +2 1 4 4 2.862965238970242576e-01 +2 1 5 5 3.931482619485121566e-01 +2 2 1 1 9.518727013297796622e-11 +2 3 1 1 1.761119474822513409e-01 +2 4 1 1 4.020819414191039165e-01 +2 5 1 1 4.805697407780772368e-01 +2 6 1 1 4.250405985101427531e-01 +2 7 1 1 4.738002917263492431e-01 +2 8 1 1 4.321042706167148584e-01 +*** END *** +*** REQUEST *** +"" +10 +8 +5 1 1 1 1 1 1 1 +0.26214400000000000000e6 0.26214400000000000000e6 -0.52428800000000000000e6 -0.52428800000000000000e6 0.0 -0.52428800000000000000e6 0.10485760000000000000e7 0.0 0.26214400000000000000e6 0.52428800000000000000e6 +0 1 3 3 0.10485760000000000000e7 +0 1 4 4 -0.52428800000000000000e6 +0 2 1 1 -0.52428800000000000000e6 +1 1 3 3 0.10485760000000000000e7 +1 1 4 4 -0.52428800000000000000e6 +2 1 1 1 0.52428800000000000000e6 +2 1 3 3 -0.10485760000000000000e7 +2 1 4 4 0.52428800000000000000e6 +2 2 1 1 0.52428800000000000000e6 +3 1 1 2 0.52428800000000000000e6 +3 4 1 1 -0.10485760000000000000e7 +4 1 1 3 0.52428800000000000000e6 +4 6 1 1 -0.10485760000000000000e7 +5 1 2 2 0.52428800000000000000e6 +5 1 4 4 -0.52428800000000000000e6 +6 1 2 3 0.52428800000000000000e6 +6 8 1 1 -0.10485760000000000000e7 +7 1 2 4 0.52428800000000000000e6 +7 4 1 1 0.10485760000000000000e7 +7 5 1 1 0.10485760000000000000e7 +8 1 3 3 -0.52428800000000000000e6 +8 1 5 5 0.52428800000000000000e6 +9 1 1 4 0.26214400000000000000e6 +9 1 3 3 0.10485760000000000000e7 +9 1 4 4 -0.52428800000000000000e6 +9 2 1 1 -0.52428800000000000000e6 +9 3 1 1 0.52428800000000000000e6 +10 1 3 4 0.26214400000000000000e6 +10 6 1 1 0.52428800000000000000e6 +10 7 1 1 0.52428800000000000000e6 +*** ANSWER *** +9.999999992578435526e-01 -3.803621179669960753e-10 -6.700611093044749451e-12 -5.429040383980874669e-12 4.357544632633943844e-11 1.224427165113750327e-10 -1.397590492693696129e-10 -1.881286560854844638e-10 1.961553626130812178e-10 -2.678452895980398204e-10 +1 1 1 1 6.945800898995211844e-05 +1 1 1 2 -3.513049988750245600e-06 +1 1 1 3 -2.846380724836564818e-06 +1 1 1 4 5.142095137684356276e-05 +1 1 2 2 2.917233866981758933e-04 +1 1 2 3 6.419524695431579314e-05 +1 1 2 4 -7.327399242333925561e-05 +1 1 3 3 1.938259237923606500e-04 +1 1 3 4 -7.021403559638855069e-05 +1 1 4 4 3.328737160779339510e-04 +1 1 5 5 1.702437062528860783e-04 +1 2 1 1 5.242879999666161020e+05 +1 3 1 1 3.717192058483196823e-04 +1 4 1 1 1.293554182254532357e-04 +1 5 1 1 1.223293182479527445e-04 +1 6 1 1 1.341419933515285851e-04 +1 7 1 1 1.284492319018545881e-04 +1 8 1 1 1.404868091860003200e-04 +2 1 1 1 9.999999999048114763e-01 +2 1 1 2 -9.791875554850019980e-02 +2 1 1 3 -7.495921678613150230e-02 +2 1 1 4 -1.761120526754002824e-01 +2 1 2 2 2.862954232683553313e-01 +2 1 2 3 -6.789625167944521311e-02 +2 1 2 4 1.173501309850062402e-01 +2 1 3 3 3.931477116341772216e-01 +2 1 3 4 1.011600384885519704e-01 +2 1 4 4 2.862954232683553313e-01 +2 1 5 5 3.931477116341773326e-01 +2 2 1 1 9.518835915348206933e-11 +2 3 1 1 1.761120527705894168e-01 +2 4 1 1 4.020812444514997308e-01 +2 5 1 1 4.805686245634940290e-01 +2 6 1 1 4.250407832138684561e-01 +2 7 1 1 4.737991782975795041e-01 +2 8 1 1 4.321037483205548702e-01 +*** END *** +*** REQUEST *** +"" +13 +11 +5 1 1 1 1 1 1 1 1 1 1 +0.15728640000000000000e7 -0.10485760000000000000e7 -0.10485760000000000000e7 0.10485760000000000000e7 0.10485760000000000000e7 0.10485760000000000000e7 0.0 0.10485760000000000000e7 0.10485760000000000000e7 0.0 0.10485760000000000000e7 0.10485760000000000000e7 0.10485760000000000000e7 +0 1 1 1 0.52428800000000000000e6 +1 1 4 4 0.10485760000000000000e7 +1 6 1 1 0.52428800000000000000e6 +2 1 1 2 0.52428800000000000000e6 +2 1 2 3 -0.52428800000000000000e6 +2 4 1 1 -0.10485760000000000000e7 +3 1 1 4 0.52428800000000000000e6 +3 8 1 1 -0.10485760000000000000e7 +4 1 2 2 0.52428800000000000000e6 +4 6 1 1 0.52428800000000000000e6 +5 1 2 4 0.52428800000000000000e6 +5 9 1 1 0.10485760000000000000e7 +6 1 3 3 0.52428800000000000000e6 +6 6 1 1 0.52428800000000000000e6 +7 1 4 4 -0.52428800000000000000e6 +7 1 5 5 0.52428800000000000000e6 +8 1 2 3 0.26214400000000000000e6 +8 2 1 1 0.52428800000000000000e6 +8 4 1 1 0.52428800000000000000e6 +9 1 1 1 0.52428800000000000000e6 +9 1 1 3 -0.26214400000000000000e6 +9 3 1 1 0.52428800000000000000e6 +10 1 2 3 -0.26214400000000000000e6 +10 4 1 1 -0.52428800000000000000e6 +10 5 1 1 0.52428800000000000000e6 +11 4 1 1 0.52428800000000000000e6 +11 7 1 1 0.52428800000000000000e6 +12 1 3 4 -0.26214400000000000000e6 +12 8 1 1 0.52428800000000000000e6 +12 10 1 1 0.52428800000000000000e6 +13 9 1 1 0.52428800000000000000e6 +13 11 1 1 0.52428800000000000000e6 +*** ANSWER *** +1.492389361104177029e-10 -5.414006260063542034e-26 1.193034345414183999e-10 1.580132269315673874e-11 -3.822602920229432166e-25 1.170819464637501417e+00 1.459189285079053882e-10 4.061540963088140009e-10 1.447214523160652133e+00 4.061540963088156553e-10 4.061540963088156553e-10 4.930152203813611015e-10 4.061540963088140009e-10 +1 1 1 1 2.344692081152248720e+05 +1 1 1 2 -2.838498514076194326e-20 +1 1 1 3 -3.793786039594259928e+05 +1 1 1 4 6.254935908885117003e-05 +1 1 2 2 2.046573439116062404e-04 +1 1 2 3 -1.807183432951896983e-19 +1 1 2 4 -2.004144839841248531e-19 +1 1 3 3 6.138465956722392002e+05 +1 1 3 4 -1.292409819316515246e-04 +1 1 4 4 2.763577235208210248e-04 +1 1 5 5 2.728764432290099393e-04 +1 2 1 1 4.093146188850118466e-04 +1 3 1 1 7.587572081152248429e+05 +1 4 1 1 4.093146188850118466e-04 +1 5 1 1 4.093146188850118466e-04 +1 6 1 1 6.138465957587677985e+05 +1 7 1 1 4.093146188850118466e-04 +1 8 1 1 3.297561457250566472e-04 +1 9 1 1 4.093146188850135814e-04 +1 10 1 1 4.548548639027594209e-04 +1 11 1 1 4.093146188850118466e-04 +2 1 1 1 5.236067975094174543e+00 +2 1 1 2 -1.034045711543959444e-15 +2 1 1 3 3.236067975651042428e+00 +2 1 1 4 5.031158753095015257e-01 +2 1 2 2 1.999999999311752097e+00 +2 1 2 3 -6.390572893185565781e-16 +2 1 2 4 -2.752195281539649504e-16 +2 1 3 3 1.999999999311723231e+00 +2 1 3 4 3.109495151127604218e-01 +2 1 4 4 1.499999999655875937e+00 +2 1 5 5 1.499999999655876382e+00 +2 2 1 1 1.000000000000000888e+00 +2 3 1 1 5.568581590258357525e-10 +2 4 1 1 9.999999999999995559e-01 +2 5 1 1 9.999999999999991118e-01 +2 6 1 1 6.882477664469128551e-10 +2 7 1 1 1.000000000000000222e+00 +2 8 1 1 1.503115875309488425e+00 +2 9 1 1 1.000000000000000222e+00 +2 10 1 1 8.078336398032637256e-01 +2 11 1 1 9.999999999999994449e-01 +*** END *** +*** REQUEST *** +"" +10 +8 +5 1 1 1 1 1 1 1 +0.26214400000000000000e6 0.78643200000000000000e6 -0.52428800000000000000e6 -0.52428800000000000000e6 0.0 -0.52428800000000000000e6 -0.10485760000000000000e7 0.0 -0.26214400000000000000e6 0.52428800000000000000e6 +0 1 3 3 -0.10485760000000000000e7 +0 1 4 4 0.52428800000000000000e6 +0 2 1 1 -0.52428800000000000000e6 +1 1 3 3 0.10485760000000000000e7 +1 1 4 4 -0.52428800000000000000e6 +2 1 1 1 0.52428800000000000000e6 +2 1 3 3 0.10485760000000000000e7 +2 1 4 4 -0.52428800000000000000e6 +2 2 1 1 0.52428800000000000000e6 +3 1 1 2 0.52428800000000000000e6 +3 4 1 1 -0.10485760000000000000e7 +4 1 1 3 0.52428800000000000000e6 +4 6 1 1 -0.10485760000000000000e7 +5 1 2 2 0.52428800000000000000e6 +5 1 4 4 -0.52428800000000000000e6 +6 1 2 3 0.52428800000000000000e6 +6 8 1 1 -0.10485760000000000000e7 +7 1 2 4 0.52428800000000000000e6 +7 4 1 1 -0.10485760000000000000e7 +7 5 1 1 -0.10485760000000000000e7 +8 1 3 3 -0.52428800000000000000e6 +8 1 5 5 0.52428800000000000000e6 +9 1 1 4 -0.26214400000000000000e6 +9 1 3 3 -0.10485760000000000000e7 +9 1 4 4 0.52428800000000000000e6 +9 2 1 1 -0.52428800000000000000e6 +9 3 1 1 0.52428800000000000000e6 +10 1 3 4 -0.26214400000000000000e6 +10 6 1 1 0.52428800000000000000e6 +10 7 1 1 0.52428800000000000000e6 +*** ANSWER *** +-9.999999995884889525e-01 -3.810702490824998314e-10 -6.736049984565948920e-12 -5.444970347363611579e-12 4.367510600526014834e-11 1.227416529920419783e-10 1.401233411982328640e-10 -1.886161028276272925e-10 1.964405220582090356e-10 -2.684361283113760051e-10 +1 1 1 1 6.957824710356660253e-05 +1 1 1 2 -3.531630174308112227e-06 +1 1 1 3 -2.854732613478573188e-06 +1 1 1 4 -5.149570421442714943e-05 +1 1 2 2 2.922671398318177002e-04 +1 1 2 3 6.435197576389170473e-05 +1 1 2 4 7.346498631013911179e-05 +1 1 3 3 1.941947017891744801e-04 +1 1 3 4 7.036892042005735148e-05 +1 1 4 4 3.335021955722895434e-04 +1 1 5 5 1.704796465352414331e-04 +1 2 1 1 5.242879999665868236e+05 +1 3 1 1 3.723602142833857057e-04 +1 4 1 1 1.295020935828698413e-04 +1 5 1 1 1.224388332342540506e-04 +1 6 1 1 1.343404302413743652e-04 +1 7 1 1 1.286309650144171375e-04 +1 8 1 1 1.406648543267486479e-04 +2 1 1 1 9.999999999048063692e-01 +2 1 1 2 -9.795776109657357289e-02 +2 1 1 3 -7.486293410754249478e-02 +2 1 1 4 1.760544474048320318e-01 +2 1 2 2 2.860583275573886364e-01 +2 1 2 3 -6.792470349951823527e-02 +2 1 2 4 -1.175072693384005135e-01 +2 1 3 3 3.930291637786945125e-01 +2 1 3 4 -1.012001156063697394e-01 +2 1 4 4 2.860583275573886919e-01 +2 1 5 5 3.930291637786945680e-01 +2 2 1 1 9.519245368151487941e-11 +2 3 1 1 1.760544475000250519e-01 +2 4 1 1 4.020422389034264410e-01 +2 5 1 1 4.804504917581729484e-01 +2 6 1 1 4.251370658924574775e-01 +2 7 1 1 4.736628185011726999e-01 +2 8 1 1 4.320752965004817647e-01 +*** END *** +*** REQUEST *** +"" +10 +8 +5 1 1 1 1 1 1 1 +0.26214400000000000000e6 0.26214400000000000000e6 -0.52428800000000000000e6 -0.52428800000000000000e6 0.0 -0.52428800000000000000e6 -0.10485760000000000000e7 0.0 0.26214400000000000000e6 0.52428800000000000000e6 +0 1 3 3 0.10485760000000000000e7 +0 1 4 4 -0.52428800000000000000e6 +0 2 1 1 -0.52428800000000000000e6 +1 1 3 3 0.10485760000000000000e7 +1 1 4 4 -0.52428800000000000000e6 +2 1 1 1 0.52428800000000000000e6 +2 1 3 3 -0.10485760000000000000e7 +2 1 4 4 0.52428800000000000000e6 +2 2 1 1 0.52428800000000000000e6 +3 1 1 2 0.52428800000000000000e6 +3 4 1 1 -0.10485760000000000000e7 +4 1 1 3 0.52428800000000000000e6 +4 6 1 1 -0.10485760000000000000e7 +5 1 2 2 0.52428800000000000000e6 +5 1 4 4 -0.52428800000000000000e6 +6 1 2 3 0.52428800000000000000e6 +6 8 1 1 -0.10485760000000000000e7 +7 1 2 4 0.52428800000000000000e6 +7 4 1 1 -0.10485760000000000000e7 +7 5 1 1 -0.10485760000000000000e7 +8 1 3 3 -0.52428800000000000000e6 +8 1 5 5 0.52428800000000000000e6 +9 1 1 4 -0.26214400000000000000e6 +9 1 3 3 0.10485760000000000000e7 +9 1 4 4 -0.52428800000000000000e6 +9 2 1 1 -0.52428800000000000000e6 +9 3 1 1 0.52428800000000000000e6 +10 1 3 4 -0.26214400000000000000e6 +10 6 1 1 0.52428800000000000000e6 +10 7 1 1 0.52428800000000000000e6 +*** ANSWER *** +9.999999992564915230e-01 -3.810695576889143537e-10 -6.735625426342454187e-12 -5.444777627013238453e-12 4.367506358700158526e-11 1.227413030293301348e-10 1.401229005084607075e-10 -1.886153909364574320e-10 1.964397041031435087e-10 -2.684354364726813310e-10 +1 1 1 1 6.957817438412523987e-05 +1 1 1 2 -3.531407583526232621e-06 +1 1 1 3 -2.854631572511516762e-06 +1 1 1 4 -5.149548979241445196e-05 +1 1 2 2 2.922666823836324659e-04 +1 1 2 3 6.435179228264143771e-05 +1 1 2 4 7.346475526177984744e-05 +1 1 3 3 1.941943637436432425e-04 +1 1 3 4 7.036873905869457484e-05 +1 1 4 4 3.335015036236895630e-04 +1 1 5 5 1.704795845624373744e-04 +1 2 1 1 5.242879999665871728e+05 +1 3 1 1 3.723593502305598893e-04 +1 4 1 1 1.295016752892227258e-04 +1 5 1 1 1.224388601221695558e-04 +1 6 1 1 1.343401556733645440e-04 +1 7 1 1 1.286308925283409683e-04 +1 8 1 1 1.406647860804472426e-04 +2 1 1 1 9.999999999048075905e-01 +2 1 1 2 -9.795735713603917483e-02 +2 1 1 3 -7.486315305695728783e-02 +2 1 1 4 1.760541517543041112e-01 +2 1 2 2 2.860587828470143590e-01 +2 1 2 3 -6.792434344894913989e-02 +2 1 2 4 -1.175060159893176470e-01 +2 1 3 3 3.930293914235066244e-01 +2 1 3 4 -1.011994963720127400e-01 +2 1 4 4 2.860587828470145255e-01 +2 1 5 5 3.930293914235067909e-01 +2 2 1 1 9.519167358025126290e-11 +2 3 1 1 1.760541518494961044e-01 +2 4 1 1 4.020426428639607419e-01 +2 5 1 1 4.804513411467217221e-01 +2 6 1 1 4.251368469430427677e-01 +2 7 1 1 4.736636566849445895e-01 +2 8 1 1 4.320756565510509017e-01 +*** END *** +*** REQUEST *** +"" +1 +4 +1 1 1 1 +0.10485760000000000000e7 +0 1 1 1 0.52428800000000000000e6 +1 1 1 1 0.10485760000000000000e7 +1 2 1 1 0.52428800000000000000e6 +1 3 1 1 0.52428800000000000000e6 +*** ANSWER *** +5.000000006943153830e-01 +1 1 1 1 1.290417214877562224e-03 +1 2 1 1 2.621440009263960528e+05 +1 3 1 1 2.621440009263960528e+05 +1 4 1 1 5.623748076465434273e-04 +2 1 1 1 9.999999999999984457e-01 +2 2 1 1 1.665972352747017299e-15 +2 3 1 1 1.665972352747017299e-15 +2 4 1 1 1.637537031929143128e+00 +*** END *** +*** REQUEST *** +"" +1 +4 +1 1 1 1 +0.15728640000000000000e7 +0 1 1 1 0.10485760000000000000e7 +1 1 1 1 0.10485760000000000000e7 +1 2 1 1 0.52428800000000000000e6 +1 3 1 1 0.10485760000000000000e7 +1 4 1 1 -0.10485760000000000000e7 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +7 +7 +3 1 1 1 1 1 1 +0.10485760000000000000e7 0.52428800000000000000e6 0.26214400000000000000e6 0.10485760000000000000e7 0.13107200000000000000e7 0.52428800000000000000e6 0.52428800000000000000e6 +0 1 1 1 0.10485760000000000000e7 +1 1 2 3 0.52428800000000000000e6 +1 2 1 1 0.52428800000000000000e6 +1 4 1 1 0.52428800000000000000e6 +1 6 1 1 0.10485760000000000000e7 +2 1 1 2 -0.10485760000000000000e7 +2 1 1 3 0.10485760000000000000e7 +2 2 1 1 0.10485760000000000000e7 +3 1 2 2 0.10485760000000000000e7 +3 1 2 3 -0.52428800000000000000e6 +3 6 1 1 -0.52428800000000000000e6 +4 1 2 3 -0.52428800000000000000e6 +4 1 3 3 0.10485760000000000000e7 +4 2 1 1 0.52428800000000000000e6 +4 4 1 1 0.52428800000000000000e6 +5 1 1 1 0.10485760000000000000e7 +5 1 1 2 -0.52428800000000000000e6 +5 2 1 1 0.52428800000000000000e6 +5 3 1 1 0.10485760000000000000e7 +6 1 1 2 -0.52428800000000000000e6 +6 5 1 1 0.10485760000000000000e7 +7 1 1 2 0.52428800000000000000e6 +7 1 2 3 -0.52428800000000000000e6 +7 7 1 1 0.10485760000000000000e7 +*** ANSWER *** +9.999999985586283113e-01 -9.282233207833762598e-10 2.416410040619999275e-09 7.287384010613641448e-10 1.000000001150653572e+00 -1.678412777448631064e-10 9.999999957510178339e-01 +1 1 1 1 2.123588660274164375e-03 +1 1 1 2 -1.769654364154091275e-03 +1 1 1 3 -9.733126968137495449e-04 +1 1 2 2 3.450830535535617805e-03 +1 1 2 3 -1.769670706440063662e-04 +1 1 3 3 1.681178558413772006e-03 +1 2 1 1 1.048576000173377106e+06 +1 3 1 1 1.048576002123588696e+06 +1 4 1 1 5.242880005434158957e+05 +1 5 1 1 7.410466251298562790e-04 +1 6 1 1 1.048575998138758354e+06 +1 7 1 1 1.048575996461660252e+06 +2 1 1 1 2.749999992995243225e+00 +2 1 1 2 1.499999995096669370e+00 +2 1 1 3 1.749999994396194358e+00 +2 1 2 2 1.249999997198100399e+00 +2 1 2 3 9.999999964976236111e-01 +2 1 3 3 1.999999994396199687e+00 +2 2 1 1 1.400950902881645464e-09 +2 3 1 1 1.400951113825400542e-09 +2 4 1 1 2.801898309253689249e-09 +2 5 1 1 1.999999995096668037e+00 +2 6 1 1 1.400952195814864889e-09 +2 7 1 1 1.400955085529339772e-09 +*** END *** +*** REQUEST *** +"" +1 +4 +1 1 1 1 +-0.10485760000000000000e7 +0 1 1 1 0.52428800000000000000e6 +1 1 1 1 0.52428800000000000000e6 +1 2 1 1 -0.52428800000000000000e6 +1 3 1 1 0.52428800000000000000e6 +1 4 1 1 -0.10485760000000000000e7 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +7 +7 +3 1 1 1 1 1 1 +-0.15728640000000000000e7 0.52428800000000000000e6 -0.52428800000000000000e6 0.78643200000000000000e6 0.10485760000000000000e7 0.78643200000000000000e6 0.26214400000000000000e6 +0 1 1 1 0.10485760000000000000e7 +1 1 2 3 -0.52428800000000000000e6 +1 2 1 1 -0.10485760000000000000e7 +1 4 1 1 -0.10485760000000000000e7 +1 6 1 1 -0.10485760000000000000e7 +2 1 1 2 -0.52428800000000000000e6 +2 1 1 3 0.10485760000000000000e7 +2 2 1 1 0.10485760000000000000e7 +3 1 2 2 0.10485760000000000000e7 +3 1 2 3 -0.10485760000000000000e7 +3 2 1 1 -0.10485760000000000000e7 +3 4 1 1 -0.10485760000000000000e7 +4 1 2 3 -0.26214400000000000000e6 +4 1 3 3 0.10485760000000000000e7 +4 6 1 1 0.52428800000000000000e6 +5 1 1 1 0.10485760000000000000e7 +5 1 1 2 -0.52428800000000000000e6 +5 3 1 1 0.10485760000000000000e7 +6 1 1 2 -0.26214400000000000000e6 +6 2 1 1 0.52428800000000000000e6 +6 5 1 1 0.10485760000000000000e7 +7 1 1 2 0.26214400000000000000e6 +7 1 2 3 -0.52428800000000000000e6 +7 2 1 1 -0.52428800000000000000e6 +7 7 1 1 0.10485760000000000000e7 +*** ANSWER *** +-2.122682326267485209e+00 7.752558743508156103e-02 1.165856920741376257e+00 9.814639206878961880e-03 1.612372975707343281e+00 -5.204790215550311268e-10 3.519523024615122119e-08 +1 1 1 1 6.421196079141121591e+05 +1 1 1 2 -8.859935285101566697e+05 +1 1 1 3 8.129147037032808294e+04 +1 1 2 2 1.222489589062118437e+06 +1 1 2 3 -1.121655822818670131e+05 +1 1 3 3 1.029139765980135235e+04 +1 2 1 1 1.084595610608764226e+06 +1 3 1 1 1.690695607914112275e+06 +1 4 1 1 1.003304158963754307e+06 +1 5 1 1 1.993047227803988741e-03 +1 6 1 1 2.230939443047560286e+06 +1 7 1 1 3.944368278889842649e-02 +2 1 1 1 4.259591772956758504e+00 +2 1 1 2 3.259591775595432228e+00 +2 1 1 3 1.879795885741197825e+00 +2 1 2 2 2.499999987441589688e+00 +2 1 2 3 1.499999989441199277e+00 +2 1 3 3 1.499999993720805946e+00 +2 2 1 1 4.113025632613441975e-09 +2 3 1 1 2.638667510379978050e-09 +2 4 1 1 4.446179952225849587e-09 +2 5 1 1 2.379795885741203598e+00 +2 6 1 1 1.999588384178727381e-09 +2 7 1 1 1.202041036999986628e-01 +*** END *** +*** REQUEST *** +"" +1 +4 +1 1 1 1 +0.15728640000000000000e7 +0 1 1 1 0.52428800000000000000e6 +1 1 1 1 0.10485760000000000000e7 +1 2 1 1 0.52428800000000000000e6 +1 3 1 1 0.52428800000000000000e6 +1 4 1 1 -0.52428800000000000000e6 +*** ANSWER *** +Infeasible +*** END *** +*** REQUEST *** +"" +7 +7 +3 1 1 1 1 1 1 +0.10485760000000000000e7 0.10485760000000000000e7 0.78643200000000000000e6 0.52428800000000000000e6 -0.52428800000000000000e6 0.78643200000000000000e6 -0.26214400000000000000e6 +0 1 1 2 -0.39321600000000000000e6 +0 1 2 3 -0.13107200000000000000e6 +0 2 1 1 -0.78643200000000000000e6 +0 4 1 1 -0.26214400000000000000e6 +0 6 1 1 -0.52428800000000000000e6 +1 1 1 1 0.52428800000000000000e6 +1 1 1 2 0.39321600000000000000e6 +1 1 2 3 0.13107200000000000000e6 +1 2 1 1 0.78643200000000000000e6 +1 4 1 1 0.26214400000000000000e6 +1 6 1 1 0.52428800000000000000e6 +2 1 1 2 0.26214400000000000000e6 +2 1 1 3 0.52428800000000000000e6 +2 1 2 3 0.26214400000000000000e6 +2 2 1 1 0.52428800000000000000e6 +2 4 1 1 0.52428800000000000000e6 +2 6 1 1 0.10485760000000000000e7 +3 1 1 2 0.26214400000000000000e6 +3 1 2 2 0.52428800000000000000e6 +3 1 2 3 -0.26214400000000000000e6 +3 2 1 1 0.52428800000000000000e6 +3 4 1 1 0.52428800000000000000e6 +4 1 1 2 0.13107200000000000000e6 +4 1 2 3 -0.13107200000000000000e6 +4 1 3 3 0.52428800000000000000e6 +4 2 1 1 0.26214400000000000000e6 +4 4 1 1 0.26214400000000000000e6 +5 1 1 2 -0.65536000000000000000e6 +5 1 2 3 -0.13107200000000000000e6 +5 2 1 1 -0.78643200000000000000e6 +5 3 1 1 0.52428800000000000000e6 +5 4 1 1 -0.26214400000000000000e6 +5 6 1 1 -0.52428800000000000000e6 +6 1 1 2 0.13107200000000000000e6 +6 1 2 3 0.13107200000000000000e6 +6 2 1 1 0.26214400000000000000e6 +6 4 1 1 0.26214400000000000000e6 +6 5 1 1 0.52428800000000000000e6 +6 6 1 1 0.52428800000000000000e6 +7 1 1 2 -0.13107200000000000000e6 +7 1 2 3 -0.39321600000000000000e6 +7 2 1 1 -0.26214400000000000000e6 +7 4 1 1 -0.26214400000000000000e6 +7 6 1 1 -0.52428800000000000000e6 +7 7 1 1 0.52428800000000000000e6 +*** ANSWER *** +-7.608360275419644920e-10 -7.798072457369716546e-11 -8.013859884436968844e-10 -7.171668043536295414e-10 5.714285702070482920e-01 -7.988172012271727674e-10 1.428571434699175968e-01 +1 1 1 1 5.560274682077934530e-05 +1 1 1 2 -8.176870375087877353e-06 +1 1 1 3 -4.088435812529453948e-05 +1 1 2 2 3.434288891953024645e-05 +1 1 2 3 -1.635386148034894142e-06 +1 1 3 3 7.849799650774358199e-05 +1 2 1 1 2.995931426548591116e+05 +1 3 1 1 2.995931426712128450e+05 +1 4 1 1 7.489828527046926320e+04 +1 5 1 1 3.568967323170778479e-05 +1 6 1 1 1.497965713027546590e+05 +1 7 1 1 7.489828649005611078e+04 +2 1 1 1 1.357142856728937641e+00 +2 1 1 2 3.571428568738232445e-01 +2 1 1 3 7.142857137476383844e-01 +2 1 2 2 1.357142856728940306e+00 +2 1 2 3 2.142857143271021947e-01 +2 1 3 3 9.285714283644747047e-01 +2 2 1 1 1.448673344637826035e-10 +2 3 1 1 1.448673288269433621e-10 +2 4 1 1 5.794697349261452038e-10 +2 5 1 1 1.214285713747635498e+00 +2 6 1 1 2.897347029504898006e-10 +2 7 1 1 5.794683254243045175e-10 +*** END *** +*** REQUEST *** +"" +5 +5 +3 1 1 1 1 +0.10485760000000000000e7 -0.10485760000000000000e7 -0.52428800000000000000e6 0.0 0.10485760000000000000e7 +0 2 1 1 -0.52428800000000000000e6 +1 1 1 1 0.52428800000000000000e6 +1 2 1 1 0.52428800000000000000e6 +2 1 1 2 0.52428800000000000000e6 +2 4 1 1 -0.10485760000000000000e7 +3 1 2 2 -0.10485760000000000000e7 +3 1 3 3 0.52428800000000000000e6 +4 1 1 3 -0.26214400000000000000e6 +4 2 1 1 -0.52428800000000000000e6 +4 3 1 1 0.52428800000000000000e6 +5 1 2 3 -0.26214400000000000000e6 +5 4 1 1 0.52428800000000000000e6 +5 5 1 1 0.52428800000000000000e6 +*** ANSWER *** +-4.457229613295930973e-10 6.115897346811394566e-17 1.833869924093994424e-10 -3.451031505601001684e-16 -4.457225765264029824e-10 +1 1 1 1 1.376100633449915924e-10 +1 1 1 2 3.206491588165052434e-11 +1 1 1 3 9.046672030042689854e-11 +1 1 2 2 4.139213860695481126e-05 +1 1 2 3 1.168434991009373834e-04 +1 1 3 3 3.298349370359715885e-04 +1 2 1 1 5.242880000000003492e+05 +1 3 1 1 2.336871566261909672e-04 +1 4 1 1 2.752279266958520360e-10 +1 5 1 1 3.393577580175436896e-10 +2 1 1 1 2.000000000038513637e+00 +2 1 1 2 1.679352122297247312e-04 +2 1 1 3 2.183096486070790850e-06 +2 1 2 2 5.333764953618103100e-01 +2 1 2 3 -1.886894755874139185e-01 +2 1 3 3 6.675299065681922217e-02 +2 2 1 1 5.248430535658322443e-16 +2 3 1 1 2.183106356807534618e-06 +2 4 1 1 1.000167935332526570e+00 +2 5 1 1 8.111425888609598012e-01 +*** END *** diff --git a/test-suite/failure/circular_subtyping1.v b/test-suite/failure/circular_subtyping1.v new file mode 100644 index 00000000..0b3a8688 --- /dev/null +++ b/test-suite/failure/circular_subtyping1.v @@ -0,0 +1,7 @@ +(* subtyping verification in presence of pseudo-circularity*) +Module Type S. End S. +Module Type T. Declare Module M:S. End T. + +Module N:S. End N. +Module NN <: T. Module M:=N. End NN. +Module P <: T with Module M:=NN := NN. diff --git a/test-suite/failure/circular_subtyping2.v b/test-suite/failure/circular_subtyping2.v new file mode 100644 index 00000000..3bacdc65 --- /dev/null +++ b/test-suite/failure/circular_subtyping2.v @@ -0,0 +1,8 @@ +(*subtyping verification in presence of pseudo-circularity at functor application *) +Module Type S. End S. +Module Type T. Declare Module M:S. End T. +Module N:S. End N. + +Module F (X:S) (Y:T with Module M:=X). End F. + +Module G := F N N. \ No newline at end of file diff --git a/test-suite/failure/fixpoint2.v b/test-suite/failure/fixpoint2.v new file mode 100644 index 00000000..d2f02ea1 --- /dev/null +++ b/test-suite/failure/fixpoint2.v @@ -0,0 +1,6 @@ +(* Check Guard in proofs *) + +Goal nat->nat. +fix f 1. +intro n; apply f; assumption. +Guarded. diff --git a/test-suite/failure/guard.v b/test-suite/failure/guard.v new file mode 100644 index 00000000..46208c29 --- /dev/null +++ b/test-suite/failure/guard.v @@ -0,0 +1,10 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* phi(x)) t" with "t" not rewritable used to behave as a + beta-normalization tactic instead of raising the expected message + "nothing to rewrite" *) + +Goal forall b, S b = O -> (fun a => 0 = (S a)) b -> True. + intros b H H0. + rewrite H in H0. diff --git a/test-suite/failure/subtyping.v b/test-suite/failure/subtyping.v new file mode 100644 index 00000000..35fd2036 --- /dev/null +++ b/test-suite/failure/subtyping.v @@ -0,0 +1,21 @@ +(* A variant of bug #1302 that must fail *) + +Module Type T. + + Parameter A : Type. + + Inductive L : Prop := + | L0 + | L1 : (A -> Prop) -> L. + +End T. + +Module TT : T. + + Parameter A : Type. + + Inductive L : Type := + | L0 + | L1 : (A -> Prop) -> L. + +End TT. diff --git a/test-suite/failure/subtyping2.v b/test-suite/failure/subtyping2.v new file mode 100644 index 00000000..0a75ae45 --- /dev/null +++ b/test-suite/failure/subtyping2.v @@ -0,0 +1,245 @@ +(* Check that no constraints on inductive types disappear at subtyping *) + +Module Type S. + +Record A0 : Type := (* Type_i' *) + i0 {X0 : Type; R0 : X0 -> X0 -> Prop}. (* X0: Type_j' *) + +Variable i0' : forall X0 : Type, (X0 -> X0 -> Prop) -> A0. + +End S. + +Module M. + +Record A0 : Type := (* Type_i' *) + i0 {X0 : Type; R0 : X0 -> X0 -> Prop}. (* X0: Type_j' *) + +Definition i0' := i0 : forall X0 : Type, (X0 -> X0 -> Prop) -> A0. + +End M. + +(* The rest of this file formalizes Burali-Forti paradox *) +(* (if the constraint between i0' and A0 is lost, the proof goes through) *) + + Inductive ACC (A : Type) (R : A -> A -> Prop) : A -> Prop := + ACC_intro : + forall x : A, (forall y : A, R y x -> ACC A R y) -> ACC A R x. + + Lemma ACC_nonreflexive : + forall (A : Type) (R : A -> A -> Prop) (x : A), + ACC A R x -> R x x -> False. +simple induction 1; intros. +exact (H1 x0 H2 H2). +Qed. + + Definition WF (A : Type) (R : A -> A -> Prop) := forall x : A, ACC A R x. + + +Section Inverse_Image. + + Variables (A B : Type) (R : B -> B -> Prop) (f : A -> B). + + Definition Rof (x y : A) : Prop := R (f x) (f y). + + Remark ACC_lemma : + forall y : B, ACC B R y -> forall x : A, y = f x -> ACC A Rof x. + simple induction 1; intros. + constructor; intros. + apply (H1 (f y0)); trivial. + elim H2 using eq_ind_r; trivial. + Qed. + + Lemma ACC_inverse_image : forall x : A, ACC B R (f x) -> ACC A Rof x. + intros; apply (ACC_lemma (f x)); trivial. + Qed. + + Lemma WF_inverse_image : WF B R -> WF A Rof. + red in |- *; intros; apply ACC_inverse_image; auto. + Qed. + +End Inverse_Image. + +Section Burali_Forti_Paradox. + + Definition morphism (A : Type) (R : A -> A -> Prop) + (B : Type) (S : B -> B -> Prop) (f : A -> B) := + forall x y : A, R x y -> S (f x) (f y). + + (* The hypothesis of the paradox: + assumes there exists an universal system of notations, i.e: + - A type A0 + - An injection i0 from relations on any type into A0 + - The proof that i0 is injective modulo morphism + *) + Variable A0 : Type. (* Type_i *) + Variable i0 : forall X : Type, (X -> X -> Prop) -> A0. (* X: Type_j *) + Hypothesis + inj : + forall (X1 : Type) (R1 : X1 -> X1 -> Prop) (X2 : Type) + (R2 : X2 -> X2 -> Prop), + i0 X1 R1 = i0 X2 R2 -> exists f : X1 -> X2, morphism X1 R1 X2 R2 f. + + (* Embedding of x in y: x and y are images of 2 well founded relations + R1 and R2, the ordinal of R2 being strictly greater than that of R1. + *) + Record emb (x y : A0) : Prop := + {X1 : Type; + R1 : X1 -> X1 -> Prop; + eqx : x = i0 X1 R1; + X2 : Type; + R2 : X2 -> X2 -> Prop; + eqy : y = i0 X2 R2; + W2 : WF X2 R2; + f : X1 -> X2; + fmorph : morphism X1 R1 X2 R2 f; + maj : X2; + majf : forall z : X1, R2 (f z) maj}. + + + Lemma emb_trans : forall x y z : A0, emb x y -> emb y z -> emb x z. +intros. +case H; intros. +case H0; intros. +generalize eqx0; clear eqx0. +elim eqy using eq_ind_r; intro. +case (inj _ _ _ _ eqx0); intros. +exists X1 R1 X3 R3 (fun x : X1 => f0 (x0 (f x))) maj0; trivial. +red in |- *; auto. +Defined. + + + Lemma ACC_emb : + forall (X : Type) (R : X -> X -> Prop) (x : X), + ACC X R x -> + forall (Y : Type) (S : Y -> Y -> Prop) (f : Y -> X), + morphism Y S X R f -> (forall y : Y, R (f y) x) -> ACC A0 emb (i0 Y S). +simple induction 1; intros. +constructor; intros. +case H4; intros. +elim eqx using eq_ind_r. +case (inj X2 R2 Y S). +apply sym_eq; assumption. + +intros. +apply H1 with (y := f (x1 maj)) (f := fun x : X1 => f (x1 (f0 x))); + try red in |- *; auto. +Defined. + + (* The embedding relation is well founded *) + Lemma WF_emb : WF A0 emb. +constructor; intros. +case H; intros. +elim eqx using eq_ind_r. +apply ACC_emb with (X := X2) (R := R2) (x := maj) (f := f); trivial. +Defined. + + + (* The following definition enforces Type_j >= Type_i *) + Definition Omega : A0 := i0 A0 emb. + + +Section Subsets. + + Variable a : A0. + + (* We define the type of elements of A0 smaller than a w.r.t embedding. + The Record is in Type, but it is possible to avoid such structure. *) + Record sub : Type := {witness : A0; emb_wit : emb witness a}. + + (* F is its image through i0 *) + Definition F : A0 := i0 sub (Rof _ _ emb witness). + + (* F is embedded in Omega: + - the witness projection is a morphism + - a is an upper bound because emb_wit proves that witness is + smaller than a. + *) + Lemma F_emb_Omega : emb F Omega. +exists sub (Rof _ _ emb witness) A0 emb witness a; trivial. +exact WF_emb. + +red in |- *; trivial. + +exact emb_wit. +Defined. + +End Subsets. + + + Definition fsub (a b : A0) (H : emb a b) (x : sub a) : + sub b := Build_sub _ (witness _ x) (emb_trans _ _ _ (emb_wit _ x) H). + + (* F is a morphism: a < b => F(a) < F(b) + - the morphism from F(a) to F(b) is fsub above + - the upper bound is a, which is in F(b) since a < b + *) + Lemma F_morphism : morphism A0 emb A0 emb F. +red in |- *; intros. +exists + (sub x) + (Rof _ _ emb (witness x)) + (sub y) + (Rof _ _ emb (witness y)) + (fsub x y H) + (Build_sub _ x H); trivial. +apply WF_inverse_image. +exact WF_emb. + +unfold morphism, Rof, fsub in |- *; simpl in |- *; intros. +trivial. + +unfold Rof, fsub in |- *; simpl in |- *; intros. +apply emb_wit. +Defined. + + + (* Omega is embedded in itself: + - F is a morphism + - Omega is an upper bound of the image of F + *) + Lemma Omega_refl : emb Omega Omega. +exists A0 emb A0 emb F Omega; trivial. +exact WF_emb. + +exact F_morphism. + +exact F_emb_Omega. +Defined. + + (* The paradox is that Omega cannot be embedded in itself, since + the embedding relation is well founded. + *) + Theorem Burali_Forti : False. +apply ACC_nonreflexive with A0 emb Omega. +apply WF_emb. + +exact Omega_refl. + +Defined. + +End Burali_Forti_Paradox. + +Import M. + + (* Note: this proof uses a large elimination of A0. *) + Lemma inj : + forall (X1 : Type) (R1 : X1 -> X1 -> Prop) (X2 : Type) + (R2 : X2 -> X2 -> Prop), + i0' X1 R1 = i0' X2 R2 -> exists f : X1 -> X2, morphism X1 R1 X2 R2 f. +intros. +change + match i0' X1 R1, i0' X2 R2 with + | i0 x1 r1, i0 x2 r2 => exists f : _, morphism x1 r1 x2 r2 f + end in |- *. +case H; simpl in |- *. +exists (fun x : X1 => x). +red in |- *; trivial. +Defined. + +(* The following command raises 'Error: Universe Inconsistency'. + To allow large elimination of A0, i0 must not be a large constructor. + Hence, the constraint Type_j' < Type_i' is added, which is incompatible + with the constraint j >= i in the paradox. +*) + + Definition Paradox : False := Burali_Forti A0 i0' inj. diff --git a/test-suite/failure/univ_include.v b/test-suite/failure/univ_include.v new file mode 100644 index 00000000..4be70d88 --- /dev/null +++ b/test-suite/failure/univ_include.v @@ -0,0 +1,30 @@ +Definition T := Type. +Definition U := Type. + +Module Type MT. + Parameter t : T. +End MT. + +Module Type MU. + Parameter t : U. +End MU. + +Module F (E : MT). + Definition elt :T := E.t. +End F. + +Module G (E : MU). + Include F E. +Print Universes. (* U <= T *) +End G. +Print Universes. (* Check if constraint is lost *) + +Module Mt. + Definition t := T. +End Mt. + +Module P := G Mt. (* should yield Universe inconsistency *) +(* ... otherwise the following command will show that T has type T! *) +Eval cbv delta [P.elt Mt.t] in P.elt. + + diff --git a/test-suite/ide/undo.v b/test-suite/ide/undo.v new file mode 100644 index 00000000..60c2e657 --- /dev/null +++ b/test-suite/ide/undo.v @@ -0,0 +1,79 @@ +(* Here are a sequences of scripts to test interactively with undo and + replay in coqide proof sessions *) + +(* Undoing arbitrary commands, as first step *) + +Theorem a : O=O. +Ltac f x := x. +assert True by trivial. +trivial. +Qed. + +(* Undoing arbitrary commands, as non-first step *) + +Theorem b : O=O. +assert True by trivial. +Ltac g x := x. +assert True by trivial. +trivial. +Qed. + +(* Undoing declarations, as first step *) +(* was bugged in 8.1 *) + +Theorem c : O=O. +Inductive T : Type := I. +trivial. +Qed. + +(* Undoing declarations, as first step *) +(* new in 8.2 *) + +Theorem d : O=O. +Definition e := O. +Definition f := O. +assert True by trivial. +trivial. +Qed. + +(* Undoing declarations, as non-first step *) +(* new in 8.2 *) + +Theorem h : O=O. +assert True by trivial. +Definition i := O. +Definition j := O. +assert True by trivial. +trivial. +Qed. + +(* Undoing declarations, interleaved with proof steps *) +(* new in 8.2 *) + +Theorem k : O=O. +assert True by trivial. +Definition l := O. +assert True by trivial. +Definition m := O. +assert True by trivial. +trivial. +Qed. + +(* Undoing declarations, interleaved with proof steps and commands *) +(* new in 8.2 *) + +Theorem n : O=O. +assert True by trivial. +Definition o := O. +Ltac h x := x. +assert True by trivial. +Focus. +Definition p := O. +assert True by trivial. +trivial. +Qed. + +(* Undoing declarations, not in proof *) + +Definition q := O. +Definition r := O. diff --git a/test-suite/ideal-features/Case9.v b/test-suite/ideal-features/Case9.v new file mode 100644 index 00000000..800c431e --- /dev/null +++ b/test-suite/ideal-features/Case9.v @@ -0,0 +1,12 @@ +(* Exemple soumis par Pierre Corbineau (bug #1671) *) + +CoInductive hdlist : unit -> Type := +| cons : hdlist tt -> hdlist tt. + +Variable P : forall bo, hdlist bo -> Prop. +Variable all : forall bo l, P bo l. + +Definition F (l:hdlist tt) : P tt l := +match l in hdlist u return P u l with +| cons (cons l') => all tt _ +end. diff --git a/test-suite/ideal-features/complexity/evars_subst.v b/test-suite/ideal-features/complexity/evars_subst.v new file mode 100644 index 00000000..6f9f86a9 --- /dev/null +++ b/test-suite/ideal-features/complexity/evars_subst.v @@ -0,0 +1,53 @@ +(* Bug report #932 *) +(* Expected time < 1.00s *) + +(* Let n be the number of let-in. The complexity comes from the fact + that each implicit arguments of f was in a larger and larger + context. To compute the type of "let _ := f ?Tn 0 in f ?T 0", + "f ?Tn 0" is substituted in the type of "f ?T 0" which is ?T. This + type is an evar instantiated on the n variables denoting the "f ?Ti 0". + One obtain "?T[1;...;n-1;f ?Tn[1;...;n-1] 0]". To compute the + type of "let _ := f ?Tn-1 0 in let _ := f ?Tn 0 in f ?T 0", another + substitution is done leading to + "?T[1;...;n-2;f ?Tn[1;...;n-2] 0;f ?Tn[1;...;n-2;f ?Tn[1;...;n-2] 0] 0]" + and so on. At the end, we get a term of exponential size *) + +(* A way to cut the complexity could have been to remove the dependency in + anonymous variables in evars but this breaks intuitive behaviour + (see Case15.v); another approach could be to substitute lazily + and/or to simultaneously substitute let binders and evars *) + +Variable P : Set -> Set. +Variable f : forall A : Set, A -> P A. + +Time Check + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + + f _ 0. + diff --git a/test-suite/ideal-features/evars_subst.v b/test-suite/ideal-features/evars_subst.v new file mode 100644 index 00000000..6f9f86a9 --- /dev/null +++ b/test-suite/ideal-features/evars_subst.v @@ -0,0 +1,53 @@ +(* Bug report #932 *) +(* Expected time < 1.00s *) + +(* Let n be the number of let-in. The complexity comes from the fact + that each implicit arguments of f was in a larger and larger + context. To compute the type of "let _ := f ?Tn 0 in f ?T 0", + "f ?Tn 0" is substituted in the type of "f ?T 0" which is ?T. This + type is an evar instantiated on the n variables denoting the "f ?Ti 0". + One obtain "?T[1;...;n-1;f ?Tn[1;...;n-1] 0]". To compute the + type of "let _ := f ?Tn-1 0 in let _ := f ?Tn 0 in f ?T 0", another + substitution is done leading to + "?T[1;...;n-2;f ?Tn[1;...;n-2] 0;f ?Tn[1;...;n-2;f ?Tn[1;...;n-2] 0] 0]" + and so on. At the end, we get a term of exponential size *) + +(* A way to cut the complexity could have been to remove the dependency in + anonymous variables in evars but this breaks intuitive behaviour + (see Case15.v); another approach could be to substitute lazily + and/or to simultaneously substitute let binders and evars *) + +Variable P : Set -> Set. +Variable f : forall A : Set, A -> P A. + +Time Check + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + let _ := f _ 0 in + + f _ 0. + diff --git a/test-suite/ideal-features/universes.v b/test-suite/ideal-features/universes.v new file mode 100644 index 00000000..6db4cfe1 --- /dev/null +++ b/test-suite/ideal-features/universes.v @@ -0,0 +1,43 @@ +(* Some issues with polymorphic inductive types *) + +(* 1- upper constraints with respect to non polymorphic inductive types *) + +Unset Elimination Schemes. +Definition Ty := Type (* Top.1 *). + +Inductive Q (A:Type (* Top.2 *)) : Prop := q : A -> Q A. +Inductive T (B:Type (* Top.3 *)) := t : B -> Q (T B) -> T B. +(* ajoute Top.4 <= Top.2 inutilement: + 4 est l'univers utilisé dans le calcul du type polymorphe de T *) +Definition C := T Ty. +(* ajoute Top.1 < Top.3 : + Top.3 jour le rôle de pivot pour propager les contraintes supérieures qu'on + a sur l'argument B de T: Top.3 sera réutilisé plus tard comme majorant + des arguments effectifs de T, propageant à cette occasion les contraintes + supérieures sur Top.3 *) + +(* We need either that Q is polymorphic on A (though it is in Type) or + that the constraint Top.1 < Top.2 is set (and it is not set!) *) + +(* 2- upper constraints with respect to unfoldable constants *) + +Definition f (A:Type (* Top.1 *)) := True. +Inductive R := r : f R -> R. +(* ajoute Top.3 <= Top.1 inutilement: + Top.3 est l'univers utilisé dans le calcul du type polymorphe de R *) + +(* mais il manque la contrainte que l'univers de R est plus petit que Top.1 + ce qui l'empêcherait en fait d'être vraiment polymorphe *) + +(* 3- constraints with respect to global constants *) + +Inductive S (A:Ty) := s : A -> S A. + +(* Q est considéré polymorphique vis à vis de A alors que le type de A + n'est pas une variable mais un univers déjà existant *) + +(* Malgré tout la contrainte Ty < Ty est ajoutée (car Ty est vu comme + un pivot pour propager les contraintes sur le type A, comme si Q était + vraiment polymorphique, ce qu'il n'est pas parce que Ty est une + constante). Et heureusement qu'elle est ajouté car elle évite de + pouvoir typer "Q Ty" *) diff --git a/test-suite/micromega/bertot.v b/test-suite/micromega/bertot.v new file mode 100644 index 00000000..6951fcd3 --- /dev/null +++ b/test-suite/micromega/bertot.v @@ -0,0 +1,22 @@ +(************************************************************************) +(* *) +(* Micromega: A reflexive tactic using the Positivstellensatz *) +(* *) +(* Frédéric Besson (Irisa/Inria) 2006-2008 *) +(* *) +(************************************************************************) + +Require Import ZArith. +Require Import Micromegatac. + +Open Scope Z_scope. + +Goal (forall x y n, + ( ~ x < n /\ x <= n /\ 2 * y = x*(x+1) -> 2 * y = n*(n+1)) + /\ + (x < n /\ x <= n /\ 2 * y = x * (x+1) -> x + 1 <= n /\ 2 *(x+1+y) = (x+1)*(x+2))). +Proof. + intros. + micromega Z. +Qed. + diff --git a/test-suite/micromega/example.v b/test-suite/micromega/example.v new file mode 100644 index 00000000..dc78ace5 --- /dev/null +++ b/test-suite/micromega/example.v @@ -0,0 +1,347 @@ +(************************************************************************) +(* *) +(* Micromega: A reflexive tactic using the Positivstellensatz *) +(* *) +(* Frédéric Besson (Irisa/Inria) 2006-2008 *) +(* *) +(************************************************************************) + +Require Import ZArith. +Require Import Micromegatac. +Require Import Ring_normalize. +Open Scope Z_scope. +Require Import ZMicromega. +Require Import VarMap. + +(* false in Q : x=1/2 and n=1 *) + +Lemma not_so_easy : forall x n : Z, + 2*x + 1 <= 2 *n -> x <= n-1. +Proof. + intros. + zfarkas. +Qed. + + +(* From Laurent Théry *) + +Lemma some_pol : forall x, 4 * x ^ 2 + 3 * x + 2 >= 0. +Proof. + intros. + micromega Z. +Qed. + + +Lemma Zdiscr: forall a b c x, + a * x ^ 2 + b * x + c = 0 -> b ^ 2 - 4 * a * c >= 0. +Proof. + intros ; micromega Z. +Qed. + + +Lemma plus_minus : forall x y, + 0 = x + y -> 0 = x -y -> 0 = x /\ 0 = y. +Proof. + intros. + zfarkas. +Qed. + + + +Lemma mplus_minus : forall x y, + x + y >= 0 -> x -y >= 0 -> x^2 - y^2 >= 0. +Proof. + intros; micromega Z. +Qed. + +Lemma pol3: forall x y, 0 <= x + y -> + x^3 + 3*x^2*y + 3*x* y^2 + y^3 >= 0. +Proof. + intros; micromega Z. +Qed. + + +(* Motivating example from: Expressiveness + Automation + Soundness: + Towards COmbining SMT Solvers and Interactive Proof Assistants *) +Parameter rho : Z. +Parameter rho_ge : rho >= 0. +Parameter correct : Z -> Z -> Prop. + + +Definition rbound1 (C:Z -> Z -> Z) : Prop := + forall p s t, correct p t /\ s <= t -> C p t - C p s <= (1-rho)*(t-s). + +Definition rbound2 (C:Z -> Z -> Z) : Prop := + forall p s t, correct p t /\ s <= t -> (1-rho)*(t-s) <= C p t - C p s. + + +Lemma bounded_drift : forall s t p q C D, s <= t /\ correct p t /\ correct q t /\ + rbound1 C /\ rbound2 C /\ rbound1 D /\ rbound2 D -> + Zabs (C p t - D q t) <= Zabs (C p s - D q s) + 2 * rho * (t- s). +Proof. + intros. + generalize (Zabs_eq (C p t - D q t)). + generalize (Zabs_non_eq (C p t - D q t)). + generalize (Zabs_eq (C p s -D q s)). + generalize (Zabs_non_eq (C p s - D q s)). + unfold rbound2 in H. + unfold rbound1 in H. + intuition. + generalize (H6 _ _ _ (conj H H4)). + generalize (H7 _ _ _ (conj H H4)). + generalize (H8 _ _ _ (conj H H4)). + generalize (H10 _ _ _ (conj H H4)). + generalize (H6 _ _ _ (conj H5 H4)). + generalize (H7 _ _ _ (conj H5 H4)). + generalize (H8 _ _ _ (conj H5 H4)). + generalize (H10 _ _ _ (conj H5 H4)). + generalize rho_ge. + micromega Z. +Qed. + +(* Rule of signs *) + +Lemma sign_pos_pos: forall x y, + x > 0 -> y > 0 -> x*y > 0. +Proof. + intros; micromega Z. +Qed. + +Lemma sign_pos_zero: forall x y, + x > 0 -> y = 0 -> x*y = 0. +Proof. + intros; micromega Z. +Qed. + +Lemma sign_pos_neg: forall x y, + x > 0 -> y < 0 -> x*y < 0. +Proof. + intros; micromega Z. +Qed. + +Lemma sign_zer_pos: forall x y, + x = 0 -> y > 0 -> x*y = 0. +Proof. + intros; micromega Z. +Qed. + +Lemma sign_zero_zero: forall x y, + x = 0 -> y = 0 -> x*y = 0. +Proof. + intros; micromega Z. +Qed. + +Lemma sign_zero_neg: forall x y, + x = 0 -> y < 0 -> x*y = 0. +Proof. + intros; micromega Z. +Qed. + +Lemma sign_neg_pos: forall x y, + x < 0 -> y > 0 -> x*y < 0. +Proof. + intros; micromega Z. +Qed. + +Lemma sign_neg_zero: forall x y, + x < 0 -> y = 0 -> x*y = 0. +Proof. + intros; micromega Z. +Qed. + +Lemma sign_neg_neg: forall x y, + x < 0 -> y < 0 -> x*y > 0. +Proof. + intros; micromega Z. +Qed. + + +(* Other (simple) examples *) + +Lemma binomial : forall x y, (x+y)^2 = x^2 + 2*x*y + y^2. +Proof. + intros. + zfarkas. +Qed. + +Lemma product : forall x y, x >= 0 -> y >= 0 -> x * y >= 0. +Proof. + intros. + micromega Z. +Qed. + + +Lemma product_strict : forall x y, x > 0 -> y > 0 -> x * y > 0. +Proof. + intros. + micromega Z. +Qed. + + +Lemma pow_2_pos : forall x, x ^ 2 + 1 = 0 -> False. +Proof. + intros ; micromega Z. +Qed. + +(* Found in Parrilo's talk *) +(* BUG?: certificate with **very** big coefficients *) +Lemma parrilo_ex : forall x y, x - y^2 + 3 >= 0 -> y + x^2 + 2 = 0 -> False. +Proof. + intros. + micromega Z. +Qed. + + +(* from hol_light/Examples/sos.ml *) + +Lemma hol_light1 : forall a1 a2 b1 b2, + a1 >= 0 -> a2 >= 0 -> + (a1 * a1 + a2 * a2 = b1 * b1 + b2 * b2 + 2) -> + (a1 * b1 + a2 * b2 = 0) -> a1 * a2 - b1 * b2 >= 0. +Proof. + intros ; micromega Z. +Qed. + + +Lemma hol_light2 : forall x a, + 3 * x + 7 * a < 4 -> 3 < 2 * x -> a < 0. +Proof. + intros ; micromega Z. +Qed. + +Lemma hol_light3 : forall b a c x, + b ^ 2 < 4 * a * c -> (a * x ^2 + b * x + c = 0) -> False. +Proof. +intros ; micromega Z. +Qed. + +Lemma hol_light4 : forall a c b x, + a * x ^ 2 + b * x + c = 0 -> b ^ 2 >= 4 * a * c. +Proof. +intros ; micromega Z. +Qed. + +Lemma hol_light5 : forall x y, + 0 <= x /\ x <= 1 /\ 0 <= y /\ y <= 1 + -> x ^ 2 + y ^ 2 < 1 \/ + (x - 1) ^ 2 + y ^ 2 < 1 \/ + x ^ 2 + (y - 1) ^ 2 < 1 \/ + (x - 1) ^ 2 + (y - 1) ^ 2 < 1. +Proof. +intros; micromega Z. +Qed. + + + +Lemma hol_light7 : forall x y z, + 0<= x /\ 0 <= y /\ 0 <= z /\ x + y + z <= 3 + -> x * y + x * z + y * z >= 3 * x * y * z. +Proof. +intros ; micromega Z. +Qed. + +Lemma hol_light8 : forall x y z, + x ^ 2 + y ^ 2 + z ^ 2 = 1 -> (x + y + z) ^ 2 <= 3. +Proof. + intros ; micromega Z. +Qed. + +Lemma hol_light9 : forall w x y z, + w ^ 2 + x ^ 2 + y ^ 2 + z ^ 2 = 1 + -> (w + x + y + z) ^ 2 <= 4. +Proof. + intros;micromega Z. +Qed. + +Lemma hol_light10 : forall x y, + x >= 1 /\ y >= 1 -> x * y >= x + y - 1. +Proof. + intros ; micromega Z. +Qed. + +Lemma hol_light11 : forall x y, + x > 1 /\ y > 1 -> x * y > x + y - 1. +Proof. + intros ; micromega Z. +Qed. + + +Lemma hol_light12: forall x y z, + 2 <= x /\ x <= 125841 / 50000 /\ + 2 <= y /\ y <= 125841 / 50000 /\ + 2 <= z /\ z <= 125841 / 50000 + -> 2 * (x * z + x * y + y * z) - (x * x + y * y + z * z) >= 0. +Proof. + intros x y z ; set (e:= (125841 / 50000)). + compute in e. + unfold e ; intros ; micromega Z. +Qed. + +Lemma hol_light14 : forall x y z, + 2 <= x /\ x <= 4 /\ 2 <= y /\ y <= 4 /\ 2 <= z /\ z <= 4 + -> 12 <= 2 * (x * z + x * y + y * z) - (x * x + y * y + z * z). +Proof. + intros ;micromega Z. +Qed. + +(* ------------------------------------------------------------------------- *) +(* Inequality from sci.math (see "Leon-Sotelo, por favor"). *) +(* ------------------------------------------------------------------------- *) + +Lemma hol_light16 : forall x y, + 0 <= x /\ 0 <= y /\ (x * y = 1) + -> x + y <= x ^ 2 + y ^ 2. +Proof. + intros ; micromega Z. +Qed. + +Lemma hol_light17 : forall x y, + 0 <= x /\ 0 <= y /\ (x * y = 1) + -> x * y * (x + y) <= x ^ 2 + y ^ 2. +Proof. + intros ; micromega Z. +Qed. + +Lemma hol_light18 : forall x y, + 0 <= x /\ 0 <= y -> x * y * (x + y) ^ 2 <= (x ^ 2 + y ^ 2) ^ 2. +Proof. + intros ; micromega Z. +Qed. + +(* ------------------------------------------------------------------------- *) +(* Some examples over integers and natural numbers. *) +(* ------------------------------------------------------------------------- *) + +Lemma hol_light19 : forall m n, 2 * m + n = (n + m) + m. +Proof. + intros ; zfarkas. +Qed. + +Lemma hol_light22 : forall n, n >= 0 -> n <= n * n. +Proof. + intros. + micromega Z. +Qed. + + +Lemma hol_light24 : forall x1 y1 x2 y2, x1 >= 0 -> x2 >= 0 -> y1 >= 0 -> y2 >= 0 -> + ((x1 + y1) ^2 + x1 + 1 = (x2 + y2) ^ 2 + x2 + 1) + -> (x1 + y1 = x2 + y2). +Proof. + intros. + micromega Z. +Qed. + +Lemma motzkin' : forall x y, (x^2+y^2+1)*(x^2*y^4 + x^4*y^2 + 1 - 3*x^2*y^2) >= 0. +Proof. + intros ; sos Z. +Qed. + + + +Lemma motzkin : forall x y, (x^2*y^4 + x^4*y^2 + 1 - 3*x^2*y^2) >= 0. +Proof. + intros. + generalize (motzkin' x y). + micromega Z. +Qed. diff --git a/test-suite/micromega/heap3_vcgen_25.v b/test-suite/micromega/heap3_vcgen_25.v new file mode 100644 index 00000000..ec88b68d --- /dev/null +++ b/test-suite/micromega/heap3_vcgen_25.v @@ -0,0 +1,38 @@ +(************************************************************************) +(* *) +(* Micromega: A reflexive tactic using the Positivstellensatz *) +(* *) +(* Frédéric Besson (Irisa/Inria) 2006-2008 *) +(* *) +(************************************************************************) + +Require Import ZArith. +Require Import Micromegatac. + +Open Scope Z_scope. + +Lemma vcgen_25 : forall + (n : Z) + (m : Z) + (jt : Z) + (j : Z) + (it : Z) + (i : Z) + (H0 : 1 * it + -2 * i + -1 = 0) + (H : 1 * jt + -2 * j + -1 = 0) + (H1 : 1 * n + -10 = 0) + (H2 : 0 <= -4028 * i + 6222 * j + 705 * m + -16674) + (H3 : 0 <= -418 * i + 651 * j + 94 * m + -1866) + (H4 : 0 <= -209 * i + 302 * j + 47 * m + -839) + (H5 : 0 <= -1 * i + 1 * j + -1) + (H6 : 0 <= -1 * j + 1 * m + 0) + (H7 : 0 <= 1 * j + 5 * m + -27) + (H8 : 0 <= 2 * j + -1 * m + 2) + (H9 : 0 <= 7 * j + 10 * m + -74) + (H10 : 0 <= 18 * j + -139 * m + 1188) + (H11 : 0 <= 1 * i + 0) + (H13 : 0 <= 121 * i + 810 * j + -7465 * m + 64350), + (1 = -2 * i + it). +Proof. + intros ; zfarkas. +Qed. diff --git a/test-suite/micromega/qexample.v b/test-suite/micromega/qexample.v new file mode 100644 index 00000000..42aff5a4 --- /dev/null +++ b/test-suite/micromega/qexample.v @@ -0,0 +1,62 @@ +(************************************************************************) +(* *) +(* Micromega: A reflexive tactic using the Positivstellensatz *) +(* *) +(* Frédéric Besson (Irisa/Inria) 2006-2008 *) +(* *) +(************************************************************************) + +Require Import Micromegatac. +Require Import QArith. +Require Import Ring_normalize. + +Lemma plus_minus : forall x y, + 0 == x + y -> 0 == x -y -> 0 == x /\ 0 == y. +Proof. + intros. + omicron Q. +Qed. + +(* Other (simple) examples *) +Open Scope Q_scope. + +Lemma binomial : forall x y:Q, ((x+y)^2 == x^2 + (2 # 1) *x*y + y^2). +Proof. + intros. + omicron Q. +Qed. + + +Lemma hol_light19 : forall m n, (2 # 1) * m + n == (n + m) + m. +Proof. + intros ; omicron Q. +Qed. +Open Scope Z_scope. +Open Scope Q_scope. + +Lemma vcgen_25 : forall + (n : Q) + (m : Q) + (jt : Q) + (j : Q) + (it : Q) + (i : Q) + (H0 : 1 * it + (-2 # 1) * i + (-1 # 1) == 0) + (H : 1 * jt + (-2 # 1) * j + (-1 # 1) == 0) + (H1 : 1 * n + (-10 # 1) = 0) + (H2 : 0 <= (-4028 # 1) * i + (6222 # 1) * j + (705 # 1) * m + (-16674 # 1)) + (H3 : 0 <= (-418 # 1) * i + (651 # 1) * j + (94 # 1) * m + (-1866 # 1)) + (H4 : 0 <= (-209 # 1) * i + (302 # 1) * j + (47 # 1) * m + (-839 # 1)) + (H5 : 0 <= (-1 # 1) * i + 1 * j + (-1 # 1)) + (H6 : 0 <= (-1 # 1) * j + 1 * m + (0 # 1)) + (H7 : 0 <= (1 # 1) * j + (5 # 1) * m + (-27 # 1)) + (H8 : 0 <= (2 # 1) * j + (-1 # 1) * m + (2 # 1)) + (H9 : 0 <= (7 # 1) * j + (10 # 1) * m + (-74 # 1)) + (H10 : 0 <= (18 # 1) * j + (-139 # 1) * m + (1188 # 1)) + (H11 : 0 <= 1 * i + (0 # 1)) + (H13 : 0 <= (121 # 1) * i + (810 # 1) * j + (-7465 # 1) * m + (64350 # 1)), + (( 1# 1) == (-2 # 1) * i + it). +Proof. + intros. + omicron Q. +Qed. diff --git a/test-suite/micromega/rexample.v b/test-suite/micromega/rexample.v new file mode 100644 index 00000000..5132dc4e --- /dev/null +++ b/test-suite/micromega/rexample.v @@ -0,0 +1,62 @@ +(************************************************************************) +(* *) +(* Micromega: A reflexive tactic using the Positivstellensatz *) +(* *) +(* Frédéric Besson (Irisa/Inria) 2006-2008 *) +(* *) +(************************************************************************) + +Require Import Micromegatac. +Require Import Reals. +Require Import Ring_normalize. + +Open Scope R_scope. + +Lemma plus_minus : forall x y, + 0 = x + y -> 0 = x -y -> 0 = x /\ 0 = y. +Proof. + intros. + omicron R. +Qed. + +(* Other (simple) examples *) + +Lemma binomial : forall x y, ((x+y)^2 = x^2 + 2 *x*y + y^2). +Proof. + intros. + omicron R. +Qed. + + +Lemma hol_light19 : forall m n, 2 * m + n = (n + m) + m. +Proof. + intros ; omicron R. +Qed. + + +Lemma vcgen_25 : forall + (n : R) + (m : R) + (jt : R) + (j : R) + (it : R) + (i : R) + (H0 : 1 * it + (-2%R ) * i + (-1%R ) = 0) + (H : 1 * jt + (-2 ) * j + (-1 ) = 0) + (H1 : 1 * n + (-10 ) = 0) + (H2 : 0 <= (-4028 ) * i + (6222 ) * j + (705 ) * m + (-16674 )) + (H3 : 0 <= (-418 ) * i + (651 ) * j + (94 ) * m + (-1866 )) + (H4 : 0 <= (-209 ) * i + (302 ) * j + (47 ) * m + (-839 )) + (H5 : 0 <= (-1 ) * i + 1 * j + (-1 )) + (H6 : 0 <= (-1 ) * j + 1 * m + (0 )) + (H7 : 0 <= (1 ) * j + (5 ) * m + (-27 )) + (H8 : 0 <= (2 ) * j + (-1 ) * m + (2 )) + (H9 : 0 <= (7 ) * j + (10 ) * m + (-74 )) + (H10 : 0 <= (18 ) * j + (-139 ) * m + (1188 )) + (H11 : 0 <= 1 * i + (0 )) + (H13 : 0 <= (121 ) * i + (810 ) * j + (-7465 ) * m + (64350 )), + (( 1 ) = (-2 ) * i + it). +Proof. + intros. + omicron R. +Qed. diff --git a/test-suite/micromega/square.v b/test-suite/micromega/square.v new file mode 100644 index 00000000..30c72e8c --- /dev/null +++ b/test-suite/micromega/square.v @@ -0,0 +1,61 @@ +(************************************************************************) +(* *) +(* Micromega: A reflexive tactic using the Positivstellensatz *) +(* *) +(* Frédéric Besson (Irisa/Inria) 2006-2008 *) +(* *) +(************************************************************************) + +Require Import ZArith Zwf Micromegatac QArith. +Open Scope Z_scope. + +Lemma Zabs_square : forall x, (Zabs x)^2 = x^2. +Proof. + intros ; case (Zabs_dec x) ; intros ; micromega Z. +Qed. +Hint Resolve Zabs_pos Zabs_square. + +Lemma integer_statement : ~exists n, exists p, n^2 = 2*p^2 /\ n <> 0. +Proof. +intros [n [p [Heq Hnz]]]; pose (n' := Zabs n); pose (p':=Zabs p). +assert (facts : 0 <= Zabs n /\ 0 <= Zabs p /\ Zabs n^2=n^2 + /\ Zabs p^2 = p^2) by auto. +assert (H : (0 < n' /\ 0 <= p' /\ n' ^2 = 2* p' ^2)) by + (destruct facts as [Hf1 [Hf2 [Hf3 Hf4]]]; unfold n', p' ; micromega Z). +generalize p' H; elim n' using (well_founded_ind (Zwf_well_founded 0)); clear. +intros n IHn p [Hn [Hp Heq]]. +assert (Hzwf : Zwf 0 (2*p-n) n) by (unfold Zwf; micromega Z). +assert (Hdecr : 0 < 2*p-n /\ 0 <= n-p /\ (2*p-n)^2=2*(n-p)^2) by micromega Z. +apply (IHn (2*p-n) Hzwf (n-p) Hdecr). +Qed. + +Open Scope Q_scope. + +Lemma QnumZpower : forall x : Q, Qnum (x ^ 2)%Q = ((Qnum x) ^ 2) %Z. +Proof. + intros. + destruct x. + cbv beta iota zeta delta - [Zmult]. + ring. +Qed. + + +Lemma QdenZpower : forall x : Q, ' Qden (x ^ 2)%Q = ('(Qden x) ^ 2) %Z. +Proof. + intros. + destruct x. + cbv beta iota zeta delta - [Pmult]. + rewrite Pmult_1_r. + reflexivity. +Qed. + +Theorem sqrt2_not_rational : ~exists x:Q, x^2==2#1. +Proof. + unfold Qeq; intros [x]; simpl (Qden (2#1)); rewrite Zmult_1_r. + intros HQeq. + assert (Heq : (Qnum x ^ 2 = 2 * ' Qden x ^ 2%Q)%Z) by + (rewrite QnumZpower in HQeq ; rewrite QdenZpower in HQeq ; auto). + assert (Hnx : (Qnum x <> 0)%Z) + by (intros Hx; simpl in HQeq; rewrite Hx in HQeq; discriminate HQeq). + apply integer_statement; exists (Qnum x); exists (' Qden x); auto. +Qed. diff --git a/test-suite/micromega/zomicron.v b/test-suite/micromega/zomicron.v new file mode 100644 index 00000000..b13654d6 --- /dev/null +++ b/test-suite/micromega/zomicron.v @@ -0,0 +1,27 @@ +Require Import ZArith. +Require Import Micromegatac. +Open Scope Z_scope. + +Lemma two_x_eq_1 : forall x, 2 * x = 1 -> False. +Proof. + intros. + omicron Z. +Qed. + +Lemma two_x_y_eq_1 : forall x y, 2 * x + 2 * y = 1 -> False. +Proof. + intros. + omicron Z. +Qed. + +Lemma two_x_y_z_eq_1 : forall x y z, 2 * x + 2 * y + 2 * z= 1 -> False. +Proof. + intros. + omicron Z. +Qed. + +Lemma omega_nightmare : forall x y, 27 <= 11 * x + 13 * y <= 45 -> 7 * x - 9 * y = 4 -> -10 <= 7 * x - 9 * y <= 4 -> False. +Proof. + intros ; intuition auto. + omicron Z. +Qed. diff --git a/test-suite/modules/pseudo_circular_with.v b/test-suite/modules/pseudo_circular_with.v new file mode 100644 index 00000000..9e46d17e --- /dev/null +++ b/test-suite/modules/pseudo_circular_with.v @@ -0,0 +1,6 @@ +Module Type S. End S. +Module Type T. Declare Module M:S. End T. +Module N:S. End N. + +Module NN:T. Module M:=N. End NN. +Module Type U := T with Module M:=NN. \ No newline at end of file diff --git a/test-suite/modules/resolver.v b/test-suite/modules/resolver.v new file mode 100644 index 00000000..dcfcc98d --- /dev/null +++ b/test-suite/modules/resolver.v @@ -0,0 +1,37 @@ +Module Type TA. +Parameter t : Set. +End TA. + +Module Type TB. +Declare Module A: TA. +End TB. + +Module Type TC. +Declare Module B : TB. +End TC. + +Module Type TD. + +Declare Module B: TB . +Declare Module C: TC + with Module B := B . +End TD. + +Module Type TE. +Declare Module D : TD. +End TE. + +Module Type TF. +Declare Module E: TE. +End TF. + +Module G (D: TD). +Module B' := D.C.B. +End G. + +Module H (F: TF). +Module I := G(F.E.D). +End H. + +Declare Module F: TF. +Module K := H(F). diff --git a/test-suite/modules/subtyping.v b/test-suite/modules/subtyping.v new file mode 100644 index 00000000..2df8e84e --- /dev/null +++ b/test-suite/modules/subtyping.v @@ -0,0 +1,46 @@ +(* Non regression for bug #1302 *) + +(* With universe polymorphism for inductive types, subtyping of + inductive types needs a special treatment: the standard conversion + algorithm does not work as it only knows to deal with constraints of + the form alpha = beta or max(alphas, alphas+1) <= beta, while + subtyping of inductive types in Type generates constraints of the form + max(alphas, alphas+1) <= max(betas, betas+1). + + These constraints are anyway valid by monotonicity of subtyping but we + have to detect it early enough to avoid breaking the standard + algorithm for constraints on algebraic universes. *) + +Module Type T. + + Parameter A : Type (* Top.1 *) . + + Inductive L : Type (* max(Top.1,1) *) := + | L0 + | L1 : (A -> Prop) -> L. + +End T. + +Axiom Tp : Type (* Top.5 *) . + +Module TT : T. + + Definition A : Type (* Top.6 *) := Tp. (* generates Top.5 <= Top.6 *) + + Inductive L : Type (* max(Top.6,1) *) := + | L0 + | L1 : (A -> Prop) -> L. + +End TT. (* Generates Top.6 <= Top.1 (+ auxiliary constraints for L_rect) *) + +(* Note: Top.6 <= Top.1 is generated by subtyping on A; + subtyping of L follows and has not to be checked *) + + + +(* The same bug as #1302 but for Definition *) +(* Check that inferred algebraic universes in interfaces are considered *) + +Module Type U. Definition A := Type -> Type. End U. +Module M:U. Definition A := Type -> Type. End M. + diff --git a/test-suite/output/Cases.out b/test-suite/output/Cases.out index a3033e94..9d0d0658 100644 --- a/test-suite/output/Cases.out +++ b/test-suite/output/Cases.out @@ -6,4 +6,25 @@ fix F (t : t) : P t := end : forall P : t -> Type, (let x := t in forall x0 : x, P x0 -> P (k x0)) -> forall t : t, P t +proj = +fun (x y : nat) (P : nat -> Type) (def : P x) (prf : P y) => +match eq_nat_dec x y with +| left eqprf => + match eqprf in (_ = z) return (P z) with + | refl_equal => def + end +| right _ => prf +end + : forall (x y : nat) (P : nat -> Type), P x -> P y -> P y +Argument scopes are [nat_scope nat_scope _ _ _] +foo = +fix foo (A : Type) (l : list A) {struct l} : option A := + match l with + | nil => None (A:=A) + | x0 :: nil => Some x0 + | x0 :: (_ :: _) as l0 => foo A l0 + end + : forall A : Type, list A -> option A + +Argument scopes are [type_scope list_scope] diff --git a/test-suite/output/Cases.v b/test-suite/output/Cases.v index 452d3603..61f89d40 100644 --- a/test-suite/output/Cases.v +++ b/test-suite/output/Cases.v @@ -4,3 +4,32 @@ Inductive t : Set := k : let x := t in x -> x. Print t_rect. + +(* Do not contract nested patterns with dependent return type *) +(* see bug #1699 *) + +Require Import Arith. + +Definition proj (x y:nat) (P:nat -> Type) (def:P x) (prf:P y) : P y := + match eq_nat_dec x y return P y with + | left eqprf => + match eqprf in (_ = z) return (P z) with + | refl_equal => def + end + | _ => prf + end. + +Print proj. + +(* Use notations even below aliases *) + +Require Import List. + +Fixpoint foo (A:Type) (l:list A) : option A := + match l with + | nil => None + | x0 :: nil => Some x0 + | x0 :: (x1 :: xs) as l0 => foo A l0 + end. + +Print foo. diff --git a/test-suite/output/Fixpoint.out b/test-suite/output/Fixpoint.out index 62c9d395..f4270d3d 100644 --- a/test-suite/output/Fixpoint.out +++ b/test-suite/output/Fixpoint.out @@ -9,3 +9,17 @@ let fix f (m : nat) : nat := match m with | S m' => f m' end in f 0 : nat +fix even_pos_odd_pos 2 + with (odd_pos_even_pos (n:_) (H:odd n) {struct H} : n >= 1). + intros. + destruct H. + omega. + + apply odd_pos_even_pos in H. + omega. + + intros. + destruct H. + apply even_pos_odd_pos in H. + omega. + diff --git a/test-suite/output/Fixpoint.v b/test-suite/output/Fixpoint.v index fc27e8d2..2b13c204 100644 --- a/test-suite/output/Fixpoint.v +++ b/test-suite/output/Fixpoint.v @@ -16,3 +16,26 @@ Check end in f 0. +Require Import ZArith_base Omega. +Open Scope Z_scope. + +Inductive even: Z -> Prop := +| even_base: even 0 +| even_succ: forall n, odd (n - 1) -> even n +with odd: Z -> Prop := +| odd_succ: forall n, even (n - 1) -> odd n. + +Lemma even_pos_odd_pos: forall n, even n -> n >= 0. +Proof. +fix even_pos_odd_pos 2 with (odd_pos_even_pos n (H:odd n) {struct H} : n >= 1). + intros. + destruct H. + omega. + apply odd_pos_even_pos in H. + omega. + intros. + destruct H. + apply even_pos_odd_pos in H. + omega. +Show Script. +Qed. diff --git a/test-suite/output/Implicit.out b/test-suite/output/Implicit.out index 38c5b827..ecfe8505 100644 --- a/test-suite/output/Implicit.out +++ b/test-suite/output/Implicit.out @@ -5,6 +5,9 @@ ex_intro (P:=fun _ : nat => True) (x:=0) I d2 = fun x : nat => d1 (y:=x) : forall x x0 : nat, x0 = x -> x0 = x - Arguments x, x0 are implicit Argument scopes are [nat_scope nat_scope _] +map id (1 :: nil) + : list nat +map id' (1 :: nil) + : list nat diff --git a/test-suite/output/Implicit.v b/test-suite/output/Implicit.v index 0ff7e87f..4c6f2b5d 100644 --- a/test-suite/output/Implicit.v +++ b/test-suite/output/Implicit.v @@ -17,3 +17,22 @@ Definition d1 y x (h : x = y :>nat) := h. Definition d2 x := d1 (y:=x). Print d2. + +(* Check maximal insertion of implicit *) + +Require Import List. + +Open Scope list_scope. + +Set Implicit Arguments. +Set Maximal Implicit Insertion. + +Definition id (A:Type) (x:A) := x. + +Check map id (1::nil). + +Definition id' (A:Type) (x:A) := x. + +Implicit Arguments id' [[A]]. + +Check map id' (1::nil). diff --git a/test-suite/output/InitSyntax.out b/test-suite/output/InitSyntax.out index c7f3ed7d..9299e010 100644 --- a/test-suite/output/InitSyntax.out +++ b/test-suite/output/InitSyntax.out @@ -1,5 +1,6 @@ -Inductive sig2 (A : Type) (P : A -> Prop) (Q : A -> Prop) : Type := +Inductive sig2 (A : Type) (P Q : A -> Prop) : Type := exist2 : forall x : A, P x -> Q x -> sig2 P Q + For sig2: Argument A is implicit For exist2: Argument A is implicit For sig2: Argument scopes are [type_scope type_scope type_scope] diff --git a/test-suite/output/Nametab.out b/test-suite/output/Nametab.out index d0f15f0e..b1883ec0 100644 --- a/test-suite/output/Nametab.out +++ b/test-suite/output/Nametab.out @@ -1,12 +1,12 @@ -Constant Top.Q.N.K.id - (shorter name to refer to it in current context is Q.N.K.id) -Constant Top.Q.N.K.id - (shorter name to refer to it in current context is Q.N.K.id) -Constant Top.Q.N.K.id - (shorter name to refer to it in current context is Q.N.K.id) -Constant Top.Q.N.K.id -Constant Top.Q.N.K.id - (shorter name to refer to it in current context is Q.N.K.id) +Constant Top.Q.N.K.foo + (shorter name to refer to it in current context is Q.N.K.foo) +Constant Top.Q.N.K.foo + (shorter name to refer to it in current context is Q.N.K.foo) +Constant Top.Q.N.K.foo + (shorter name to refer to it in current context is Q.N.K.foo) +Constant Top.Q.N.K.foo +Constant Top.Q.N.K.foo + (shorter name to refer to it in current context is Q.N.K.foo) No module is referred to by basename K No module is referred to by name N.K Module Top.Q.N.K @@ -16,15 +16,15 @@ Module Top.Q.N Module Top.Q.N Module Top.Q Module Top.Q -Constant Top.Q.N.K.id - (shorter name to refer to it in current context is K.id) -Constant Top.Q.N.K.id -Constant Top.Q.N.K.id - (shorter name to refer to it in current context is K.id) -Constant Top.Q.N.K.id - (shorter name to refer to it in current context is K.id) -Constant Top.Q.N.K.id - (shorter name to refer to it in current context is K.id) +Constant Top.Q.N.K.foo + (shorter name to refer to it in current context is K.foo) +Constant Top.Q.N.K.foo +Constant Top.Q.N.K.foo + (shorter name to refer to it in current context is K.foo) +Constant Top.Q.N.K.foo + (shorter name to refer to it in current context is K.foo) +Constant Top.Q.N.K.foo + (shorter name to refer to it in current context is K.foo) Module Top.Q.N.K No module is referred to by name N.K Module Top.Q.N.K diff --git a/test-suite/output/Nametab.v b/test-suite/output/Nametab.v index a1a7579b..357ba982 100644 --- a/test-suite/output/Nametab.v +++ b/test-suite/output/Nametab.v @@ -1,16 +1,16 @@ Module Q. Module N. Module K. - Definition id := Set. + Definition foo := Set. End K. End N. End Q. -(* Bad *) Locate id. -(* Bad *) Locate K.id. -(* Bad *) Locate N.K.id. -(* OK *) Locate Q.N.K.id. -(* OK *) Locate Top.Q.N.K.id. +(* Bad *) Locate foo. +(* Bad *) Locate K.foo. +(* Bad *) Locate N.K.foo. +(* OK *) Locate Q.N.K.foo. +(* OK *) Locate Top.Q.N.K.foo. (* Bad *) Locate Module K. (* Bad *) Locate Module N.K. @@ -28,11 +28,11 @@ End Q. Import Q.N. -(* Bad *) Locate id. -(* OK *) Locate K.id. -(* Bad *) Locate N.K.id. -(* OK *) Locate Q.N.K.id. -(* OK *) Locate Top.Q.N.K.id. +(* Bad *) Locate foo. +(* OK *) Locate K.foo. +(* Bad *) Locate N.K.foo. +(* OK *) Locate Q.N.K.foo. +(* OK *) Locate Top.Q.N.K.foo. (* OK *) Locate Module K. (* Bad *) Locate Module N.K. diff --git a/test-suite/output/Notations.out b/test-suite/output/Notations.out index be4cd4fa..2066a7ef 100644 --- a/test-suite/output/Notations.out +++ b/test-suite/output/Notations.out @@ -46,3 +46,7 @@ fun x : nat => ifn x is succ n then n else 0 : bool -4 : Z +Nil + : forall A : Type, list A +NIL:list nat + : list nat diff --git a/test-suite/output/Notations.v b/test-suite/output/Notations.v index 3cc0a189..6e637aca 100644 --- a/test-suite/output/Notations.v +++ b/test-suite/output/Notations.v @@ -119,3 +119,13 @@ Require Import ZArith. Open Scope Z_scope. Notation "- 4" := (-2 + -2). Check -4. + +(**********************************************************************) +(* Check notations for references with activated or deactivated *) +(* implicit arguments *) + +Notation Nil := @nil. +Check Nil. + +Notation NIL := nil. +Check NIL : list nat. diff --git a/test-suite/output/Tactics.out b/test-suite/output/Tactics.out index 8e8b8059..287e8488 100644 --- a/test-suite/output/Tactics.out +++ b/test-suite/output/Tactics.out @@ -1,4 +1,6 @@ intro H; split; [ a H | e H ]. + intros; match goal with | |- context [if ?X then _ else _] => case X end; trivial. + diff --git a/test-suite/output/TranspModtype.out b/test-suite/output/TranspModtype.out index 41e8648b..f94ed642 100644 --- a/test-suite/output/TranspModtype.out +++ b/test-suite/output/TranspModtype.out @@ -1,10 +1,7 @@ TrM.A = M.A : Set - OpM.A = M.A : Set - TrM.B = M.B : Set - *** [ OpM.B : Set ] diff --git a/test-suite/output/ZSyntax.out b/test-suite/output/ZSyntax.out index cbfb9f20..f23198b0 100644 --- a/test-suite/output/ZSyntax.out +++ b/test-suite/output/ZSyntax.out @@ -2,19 +2,19 @@ : Z fun f : nat -> Z => (f 0%nat + 0)%Z : (nat -> Z) -> Z -fun x : positive => Zpos (xO x) +fun x : positive => Zpos x~0 : positive -> Z fun x : positive => (Zpos x + 1)%Z : positive -> Z fun x : positive => Zpos x : positive -> Z -fun x : positive => Zneg (xO x) +fun x : positive => Zneg x~0 : positive -> Z -fun x : positive => (Zpos (xO x) + 0)%Z +fun x : positive => (Zpos x~0 + 0)%Z : positive -> Z -fun x : positive => (- Zpos (xO x))%Z +fun x : positive => (- Zpos x~0)%Z : positive -> Z -fun x : positive => (- Zpos (xO x) + 0)%Z +fun x : positive => (- Zpos x~0 + 0)%Z : positive -> Z (Z_of_nat 0 + 1)%Z : Z diff --git a/test-suite/output/reduction.out b/test-suite/output/reduction.out new file mode 100644 index 00000000..ff327aa5 --- /dev/null +++ b/test-suite/output/reduction.out @@ -0,0 +1,4 @@ + = a + : nat + = n + 0 + : nat diff --git a/test-suite/output/reduction.v b/test-suite/output/reduction.v new file mode 100644 index 00000000..4a460a83 --- /dev/null +++ b/test-suite/output/reduction.v @@ -0,0 +1,13 @@ +(* Test the behaviour of hnf and simpl introduced in revision *) + +Variable n:nat. +Definition a:=0. + +Eval simpl in (fix plus (n m : nat) {struct n} : nat := + match n with + | 0 => m + | S p => S (p + m) + end) a a. + +Eval hnf in match (plus (S n) O) with S n => n | _ => O end. + diff --git a/test-suite/success/AdvancedCanonicalStructure.v b/test-suite/success/AdvancedCanonicalStructure.v new file mode 100644 index 00000000..8e613dca --- /dev/null +++ b/test-suite/success/AdvancedCanonicalStructure.v @@ -0,0 +1,144 @@ +Section group_morphism. + +(* An example with default canonical structures *) + +Variable A B : Type. +Variable plusA : A -> A -> A. +Variable plusB : B -> B -> B. +Variable zeroA : A. +Variable zeroB : B. +Variable eqA : A -> A -> Prop. +Variable eqB : B -> B -> Prop. +Variable phi : A -> B. + +Record img := { + ia : A; + ib :> B; + prf : phi ia = ib +}. + +Parameter eq_img : forall (i1:img) (i2:img), + eqB (ib i1) (ib i2) -> eqA (ia i1) (ia i2). + +Lemma phi_img (a:A) : img. + intro a. + exists a (phi a). + refine ( refl_equal _). +Defined. +Canonical Structure phi_img. + +Lemma zero_img : img. + exists zeroA zeroB. + admit. +Defined. +Canonical Structure zero_img. + +Lemma plus_img : img -> img -> img. +intros i1 i2. +exists (plusA (ia i1) (ia i2)) (plusB (ib i1) (ib i2)). +admit. +Defined. +Canonical Structure plus_img. + +(* Print Canonical Projections. *) + +Goal forall a1 a2, eqA (plusA a1 zeroA) a2. + intros a1 a2. + refine (eq_img _ _ _). +change (eqB (plusB (phi a1) zeroB) (phi a2)). +Admitted. + +End group_morphism. + +Open Scope type_scope. + +Section type_reification. + +Inductive term :Type := + Fun : term -> term -> term + | Prod : term -> term -> term + | Bool : term + | SET :term + | PROP :term + | TYPE :term + | Var : Type -> term. + +Fixpoint interp (t:term) := + match t with + Bool => bool + | SET => Set + | PROP => Prop + | TYPE => Type + | Fun a b => interp a -> interp b + | Prod a b => interp a * interp b + | Var x => x +end. + +Record interp_pair :Type := + { repr:>term; + abs:>Type; + link: abs = interp repr }. + +Lemma prod_interp :forall (a b:interp_pair),a * b = interp (Prod a b) . +proof. +let a:interp_pair,b:interp_pair. +reconsider thesis as (a * b = interp a * interp b). +thus thesis by (link a),(link b). +end proof. +Qed. + +Lemma fun_interp :forall (a b:interp_pair), (a -> b) = interp (Fun a b). +proof. +let a:interp_pair,b:interp_pair. +reconsider thesis as ((a -> b) = (interp a -> interp b)). +thus thesis using rewrite (link a);rewrite (link b);reflexivity. +end proof. +Qed. + +Canonical Structure ProdCan (a b:interp_pair) := + Build_interp_pair (Prod a b) (a * b) (prod_interp a b). + +Canonical Structure FunCan (a b:interp_pair) := + Build_interp_pair (Fun a b) (a -> b) (fun_interp a b). + +Canonical Structure BoolCan := + Build_interp_pair Bool bool (refl_equal _). + +Canonical Structure VarCan (x:Type) := + Build_interp_pair (Var x) x (refl_equal _). + +Canonical Structure SetCan := + Build_interp_pair SET Set (refl_equal _). + +Canonical Structure PropCan := + Build_interp_pair PROP Prop (refl_equal _). + +Canonical Structure TypeCan := + Build_interp_pair TYPE Type (refl_equal _). + +(* Print Canonical Projections. *) + +Variable A:Type. + +Variable Inhabited: term -> Prop. + +Variable Inhabited_correct: forall p, Inhabited (repr p) -> abs p. + +Lemma L : Prop * A -> bool * (Type -> Set) . +refine (Inhabited_correct _ _). +change (Inhabited (Fun (Prod PROP (Var A)) (Prod Bool (Fun TYPE SET)))). +Admitted. + +Check L : abs _ . + +End type_reification. + + + + + + + + + + diff --git a/test-suite/success/Case18.v b/test-suite/success/Case18.v index 91c80e88..be9ca8d4 100644 --- a/test-suite/success/Case18.v +++ b/test-suite/success/Case18.v @@ -12,3 +12,15 @@ Fixpoint max (n m:nat) {struct m} : nat := | S n', S m' => S (max n' m') | 0, p | p, 0 => p end. + +(* Check bug #1477 *) + +Inductive I : Set := + | A : nat -> nat -> I + | B : nat -> nat -> I. + +Definition foo (x:I) : nat := + match x with + | A a b | B b a => S b + end. + diff --git a/test-suite/success/Cases-bug1834.v b/test-suite/success/Cases-bug1834.v new file mode 100644 index 00000000..543ca0c9 --- /dev/null +++ b/test-suite/success/Cases-bug1834.v @@ -0,0 +1,13 @@ +(* Bug in the computation of generalization *) + +(* The following bug, elaborated by Bruno Barras, is solved from r11083 *) + +Parameter P : unit -> Prop. +Definition T := sig P. +Parameter Q : T -> Prop. +Definition U := sig Q. +Parameter a : U. +Check (match a with exist (exist tt e2) e3 => e3=e3 end). + +(* There is still a form submitted by Pierre Corbineau (#1834) which fails *) + diff --git a/test-suite/success/Cases.v b/test-suite/success/Cases.v index 7c2b7c0b..499c0660 100644 --- a/test-suite/success/Cases.v +++ b/test-suite/success/Cases.v @@ -10,6 +10,10 @@ Type match 0, eq, 0 return nat with | O, x, y => 0 | S x, y, z => x end. +Type match 0, eq, 0 return _ with + | O, x, y => 0 + | S x, y, z => x + end. (* Non dependent form of annotation *) Type match 0, eq return nat with @@ -406,7 +410,6 @@ Type match niln with | x => 0 end. - Type match niln return nat with | niln => 0 | consn n a l => a diff --git a/test-suite/success/CasesDep.v b/test-suite/success/CasesDep.v index 0477377e..49bd77fc 100644 --- a/test-suite/success/CasesDep.v +++ b/test-suite/success/CasesDep.v @@ -71,13 +71,9 @@ Inductive Setoid : Type := Definition elem (A : Setoid) := let (S, R, e) := A in S. -(* : Grammar is replaced by Notation *) - Definition equal (A : Setoid) := let (S, R, e) as s return (Relation (elem s)) := A in R. -(* : Grammar is replaced by Notation *) - Axiom prf_equiv : forall A : Setoid, Equivalence (elem A) (equal A). Axiom prf_refl : forall A : Setoid, Reflexive (elem A) (equal A). @@ -430,3 +426,57 @@ Definition f0 (F : False) (ty : bool) : bProp ty := | _, false => F | _, true => I end. + +(* Simplification of bug/wish #1671 *) + +Inductive I : unit -> Type := +| C : forall a, I a -> I tt. + +(* +Definition F (l:I tt) : l = l := +match l return l = l with +| C tt (C _ l') => refl_equal (C tt (C _ l')) +end. + +one would expect that the compilation of F (this involves +some kind of pattern-unification) would produce: +*) + +Definition F (l:I tt) : l = l := +match l return l = l with +| C tt l' => match l' return C _ l' = C _ l' with C _ l'' => refl_equal (C tt (C _ l'')) end +end. + +Inductive J : nat -> Type := +| D : forall a, J (S a) -> J a. + +(* +Definition G (l:J O) : l = l := +match l return l = l with +| D O (D 1 l') => refl_equal (D O (D 1 l')) +| D _ _ => refl_equal _ +end. + +one would expect that the compilation of G (this involves inversion) +would produce: +*) + +Definition G (l:J O) : l = l := +match l return l = l with +| D 0 l'' => + match l'' as _l'' in J n return + match n return forall l:J n, Prop with + | O => fun _ => l = l + | S p => fun l'' => D p l'' = D p l'' + end _l'' with + | D 1 l' => refl_equal (D O (D 1 l')) + | _ => refl_equal _ + end +| _ => refl_equal _ +end. + +Fixpoint app {A} {n m} (v : listn A n) (w : listn A m) : listn A (n + m) := + match v with + | niln => w + | consn a n' v' => consn _ a _ (app v' w) + end. diff --git a/test-suite/success/Discriminate.v b/test-suite/success/Discriminate.v index f28c83de..b57c5478 100644 --- a/test-suite/success/Discriminate.v +++ b/test-suite/success/Discriminate.v @@ -9,3 +9,26 @@ Qed. Lemma l2 : forall H : 0 = 1, H = H. discriminate H. Qed. + +(* Check the variants of discriminate *) + +Goal O = S O -> True. +discriminate 1. +Undo. +intros. +discriminate H. +Undo. +Ltac g x := discriminate x. +g H. +Abort. + +Goal (forall x y : nat, x = y -> x = S y) -> True. +intros. +try discriminate (H O) || exact I. +Qed. + +Goal (forall x y : nat, x = y -> x = S y) -> True. +intros. +ediscriminate (H O). +instantiate (1:=O). +Abort. diff --git a/test-suite/success/Fixpoint.v b/test-suite/success/Fixpoint.v index 680046da..cf821073 100644 --- a/test-suite/success/Fixpoint.v +++ b/test-suite/success/Fixpoint.v @@ -29,3 +29,22 @@ CoFixpoint g (n:nat) (m:=pred n) (l:Stream m) (p:=S n) : Stream p := Eval compute in (fun l => match g 2 (Consn 0 6 l) with Consn _ a _ => a end). +(* Check inference of simple types in presence of non ambiguous + dependencies (needs revision 10125) *) + +Section folding. + +Inductive vector (A:Type) : nat -> Type := + | Vnil : vector A 0 + | Vcons : forall (a:A) (n:nat), vector A n -> vector A (S n). + +Variables (B C : Set) (g : B -> C -> C) (c : C). + +Fixpoint foldrn n bs := + match bs with + | Vnil => c + | Vcons b _ tl => g b (foldrn _ tl) + end. + +End folding. + diff --git a/test-suite/success/ImplicitArguments.v b/test-suite/success/ImplicitArguments.v new file mode 100644 index 00000000..e7795733 --- /dev/null +++ b/test-suite/success/ImplicitArguments.v @@ -0,0 +1,17 @@ +Inductive vector {A : Type} : nat -> Type := +| vnil : vector 0 +| vcons : A -> forall {n'}, vector n' -> vector (S n'). + +Require Import Coq.Program.Program. + +Program Definition head {A : Type} {n : nat} (v : vector A (S n)) : vector A n := + match v with + | vnil => ! + | vcons a n' v' => v' + end. + +Fixpoint app {A : Type} {n m : nat} (v : vector A n) (w : vector A m) : vector A (n + m) := + match v in vector _ n return vector A (n + m) with + | vnil => w + | vcons a n' v' => vcons a (app v' w) + end. diff --git a/test-suite/success/Injection.v b/test-suite/success/Injection.v index 606e884a..867d7374 100644 --- a/test-suite/success/Injection.v +++ b/test-suite/success/Injection.v @@ -43,6 +43,29 @@ intros; injection H as Hyt Hxz. exact Hxz. Qed. +(* Check the variants of injection *) + +Goal forall x y, S x = S y -> True. +injection 1 as H'. +Undo. +intros. +injection H as H'. +Undo. +Ltac f x := injection x. +f H. +Abort. + +Goal (forall x y : nat, x = y -> S x = S y) -> True. +intros. +try injection (H O) || exact I. +Qed. + +Goal (forall x y : nat, x = y -> S x = S y) -> True. +intros. +einjection (H O). +instantiate (1:=O). +Abort. + (* Injection does not projects at positions in Prop... allow it? Inductive t (A:Prop) : Set := c : A -> t A. @@ -53,7 +76,7 @@ Abort. *) -(* Accept does not project on discriminable positions... allow it? +(* Injection does not project on discriminable positions... allow it? Goal 1=2 -> 1=0. intro H. @@ -61,4 +84,4 @@ injection H. intro; assumption. Qed. - *) +*) diff --git a/test-suite/success/LetPat.v b/test-suite/success/LetPat.v new file mode 100644 index 00000000..545b8aeb --- /dev/null +++ b/test-suite/success/LetPat.v @@ -0,0 +1,55 @@ +(* Simple let-patterns *) +Variable A B : Type. + +Definition l1 (t : A * B * B) : A := let '(x, y, z) := t in x. +Print l1. +Definition l2 (t : (A * B) * B) : A := let '((x, y), z) := t in x. +Definition l3 (t : A * (B * B)) : A := let '(x, (y, z)) := t in x. +Print l3. + +Record someT (A : Type) := mkT { a : nat; b: A }. + +Definition l4 A (t : someT A) : nat := let 'mkT x y := t in x. +Print l4. +Print sigT. + +Definition l5 A (B : A -> Type) (t : sigT B) : B (projT1 t) := + let 'existT x y := t return B (projT1 t) in y. + +Definition l6 A (B : A -> Type) (t : sigT B) : B (projT1 t) := + let 'existT x y as t' := t return B (projT1 t') in y. + +Definition l7 A (B : A -> Type) (t : sigT B) : B (projT1 t) := + let 'existT x y as t' in sigT _ := t return B (projT1 t') in y. + +Definition l8 A (B : A -> Type) (t : sigT B) : B (projT1 t) := + match t with + existT x y => y + end. + +(** An example from algebra, using let' and inference of return clauses + to deconstruct contexts. *) + +Record a_category (A : Type) (hom : A -> A -> Type) := { }. + +Definition category := { A : Type & { hom : A -> A -> Type & a_category A hom } }. + +Record a_functor (A : Type) (hom : A -> A -> Type) (C : a_category A hom) := { }. + +Notation " x :& y " := (@existT _ _ x y) (right associativity, at level 55) : core_scope. + +Definition functor (c d : category) := + let ' A :& homA :& CA := c in + let ' B :& homB :& CB := d in + A -> B. + +Definition identity_functor (c : category) : functor c c := + let 'A :& homA :& CA := c in + fun x => x. + +Definition functor_composition (a b c : category) : functor a b -> functor b c -> functor a c := + let 'A :& homA :& CA := a in + let 'B :& homB :& CB := b in + let 'C :& homB :& CB := c in + fun f g => + fun x => g (f x). diff --git a/test-suite/success/Notations.v b/test-suite/success/Notations.v index a9e2c59a..facd5509 100644 --- a/test-suite/success/Notations.v +++ b/test-suite/success/Notations.v @@ -1,5 +1,5 @@ (* Check that "where" clause behaves as if given independently of the *) -(* definition (variant of bug #113? submitted by Assia Mahboubi) *) +(* definition (variant of bug #1132 submitted by Assia Mahboubi) *) Fixpoint plus1 (n m:nat) {struct n} : nat := match n with @@ -7,3 +7,17 @@ Fixpoint plus1 (n m:nat) {struct n} : nat := | S p => S (p+m) end where "n + m" := (plus1 n m) : nat_scope. + +(* Check behaviour wrt yet empty levels (see Stephane's bug #1850) *) + +Parameter P : Type -> Type -> Type -> Type. +Notation "e |= t --> v" := (P e t v) (at level 100, t at level 54). +Check (nat |= nat --> nat). + +(* Check that first non empty definition at an empty level can be of any + associativity *) + +Definition marker := O. +Notation "x +1" := (S x) (at level 8, left associativity). +Reset marker. +Notation "x +1" := (S x) (at level 8, right associativity). diff --git a/test-suite/success/Omega.v b/test-suite/success/Omega.v index 2d29a835..ecbf04e4 100644 --- a/test-suite/success/Omega.v +++ b/test-suite/success/Omega.v @@ -10,14 +10,14 @@ intros x y. omega. Qed. -(* Proposed by Pierre Crégut *) +(* Proposed by Pierre Crégut *) Lemma lem2 : forall x : Z, (x < 4)%Z -> (x > 2)%Z -> x = 3%Z. intro. omega. Qed. -(* Proposed by Jean-Christophe Filliâtre *) +(* Proposed by Jean-Christophe Filliâtre *) Lemma lem3 : forall x y : Z, x = y -> (x + x)%Z = (y + y)%Z. Proof. @@ -25,7 +25,7 @@ intros. omega. Qed. -(* Proposed by Jean-Christophe Filliâtre: confusion between an Omega *) +(* Proposed by Jean-Christophe Filliâtre: confusion between an Omega *) (* internal variable and a section variable (June 2001) *) Section A. @@ -87,10 +87,8 @@ Qed. (* Check that the interpretation of mult on nat enforces its positivity *) (* Submitted by Hubert Thierry (bug #743) *) -(* Postponed... problem with goals of the form "(n*m=0)%nat -> (n*m=0)%Z" -Require Omega. -Lemma lem10 : (n, m : nat) (le n (plus n (mult n m))). +(* Postponed... problem with goals of the form "(n*m=0)%nat -> (n*m=0)%Z" *) +Lemma lem10 : forall n m:nat, le n (plus n (mult n m)). Proof. -Intros; Omega. +intros; omega with *. Qed. -*) diff --git a/test-suite/success/OmegaPre.v b/test-suite/success/OmegaPre.v new file mode 100644 index 00000000..bb800b7a --- /dev/null +++ b/test-suite/success/OmegaPre.v @@ -0,0 +1,127 @@ +Require Import ZArith Nnat Omega. +Open Scope Z_scope. + +(** Test of the zify preprocessor for (R)Omega *) + +(* More details in file PreOmega.v + + (r)omega with Z : starts with zify_op + (r)omega with nat : starts with zify_nat + (r)omega with positive : starts with zify_positive + (r)omega with N : starts with uses zify_N + (r)omega with * : starts zify (a saturation of the others) +*) + +(* zify_op *) + +Goal forall a:Z, Zmax a a = a. +intros. +omega with *. +Qed. + +Goal forall a b:Z, Zmax a b = Zmax b a. +intros. +omega with *. +Qed. + +Goal forall a b c:Z, Zmax a (Zmax b c) = Zmax (Zmax a b) c. +intros. +omega with *. +Qed. + +Goal forall a b:Z, Zmax a b + Zmin a b = a + b. +intros. +omega with *. +Qed. + +Goal forall a:Z, (Zabs a)*(Zsgn a) = a. +intros. +zify. +intuition; subst; omega. (* pure multiplication: omega alone can't do it *) +Qed. + +Goal forall a:Z, Zabs a = a -> a >= 0. +intros. +omega with *. +Qed. + +Goal forall a:Z, Zsgn a = a -> a = 1 \/ a = 0 \/ a = -1. +intros. +omega with *. +Qed. + +(* zify_nat *) + +Goal forall m: nat, (m<2)%nat -> (0<= m+m <=2)%nat. +intros. +omega with *. +Qed. + +Goal forall m:nat, (m<1)%nat -> (m=0)%nat. +intros. +omega with *. +Qed. + +Goal forall m: nat, (m<=100)%nat -> (0<= m+m <=200)%nat. +intros. +omega with *. +Qed. +(* 2000 instead of 200: works, but quite slow *) + +Goal forall m: nat, (m*m>=0)%nat. +intros. +omega with *. +Qed. + +(* zify_positive *) + +Goal forall m: positive, (m<2)%positive -> (2 <= m+m /\ m+m <= 2)%positive. +intros. +omega with *. +Qed. + +Goal forall m:positive, (m<2)%positive -> (m=1)%positive. +intros. +omega with *. +Qed. + +Goal forall m: positive, (m<=1000)%positive -> (2<=m+m/\m+m <=2000)%positive. +intros. +omega with *. +Qed. + +Goal forall m: positive, (m*m>=1)%positive. +intros. +omega with *. +Qed. + +(* zify_N *) + +Goal forall m:N, (m<2)%N -> (0 <= m+m /\ m+m <= 2)%N. +intros. +omega with *. +Qed. + +Goal forall m:N, (m<1)%N -> (m=0)%N. +intros. +omega with *. +Qed. + +Goal forall m:N, (m<=1000)%N -> (0<=m+m/\m+m <=2000)%N. +intros. +omega with *. +Qed. + +Goal forall m:N, (m*m>=0)%N. +intros. +omega with *. +Qed. + +(* mix of datatypes *) + +Goal forall p, Z_of_N (N_of_nat (nat_of_N (Npos p))) = Zpos p. +intros. +omega with *. +Qed. + + diff --git a/test-suite/success/ROmega.v b/test-suite/success/ROmega.v index ff1f57df..0c37c59a 100644 --- a/test-suite/success/ROmega.v +++ b/test-suite/success/ROmega.v @@ -68,31 +68,29 @@ Variable n : nat. Variable ap_n : n <> 0. Let delta := f n ap_n. Lemma lem7 : n = n. - (*romega. ---> ROMEGA CANT DEAL WITH NAT*) -Admitted. + romega with nat. +Qed. End C. (* Problem of dependencies *) Require Import Omega. Lemma lem8 : forall H : 0 = 0 -> 0 = 0, H = H -> 0 = 0. intros. -(* romega. ---> ROMEGA CANT DEAL WITH NAT*) -Admitted. +romega with nat. +Qed. (* Bug that what caused by the use of intro_using in Omega *) Require Import Omega. Lemma lem9 : forall p q : nat, ~ (p <= q /\ p < q \/ q <= p /\ p < q) -> p < p \/ p <= p. intros. -(* romega. ---> ROMEGA CANT DEAL WITH NAT*) -Admitted. +romega with nat. +Qed. (* Check that the interpretation of mult on nat enforces its positivity *) (* Submitted by Hubert Thierry (bug #743) *) -(* Postponed... problem with goals of the form "(n*m=0)%nat -> (n*m=0)%Z" -Require Omega. -Lemma lem10 : (n, m : nat) (le n (plus n (mult n m))). +(* Postponed... problem with goals of the form "(n*m=0)%nat -> (n*m=0)%Z" *) +Lemma lem10 : forall n m : nat, le n (plus n (mult n m)). Proof. -Intros; Omega. +intros; romega with nat. Qed. -*) diff --git a/test-suite/success/ROmegaPre.v b/test-suite/success/ROmegaPre.v new file mode 100644 index 00000000..550edca5 --- /dev/null +++ b/test-suite/success/ROmegaPre.v @@ -0,0 +1,127 @@ +Require Import ZArith Nnat ROmega. +Open Scope Z_scope. + +(** Test of the zify preprocessor for (R)Omega *) + +(* More details in file PreOmega.v + + (r)omega with Z : starts with zify_op + (r)omega with nat : starts with zify_nat + (r)omega with positive : starts with zify_positive + (r)omega with N : starts with uses zify_N + (r)omega with * : starts zify (a saturation of the others) +*) + +(* zify_op *) + +Goal forall a:Z, Zmax a a = a. +intros. +romega with *. +Qed. + +Goal forall a b:Z, Zmax a b = Zmax b a. +intros. +romega with *. +Qed. + +Goal forall a b c:Z, Zmax a (Zmax b c) = Zmax (Zmax a b) c. +intros. +romega with *. +Qed. + +Goal forall a b:Z, Zmax a b + Zmin a b = a + b. +intros. +romega with *. +Qed. + +Goal forall a:Z, (Zabs a)*(Zsgn a) = a. +intros. +zify. +intuition; subst; romega. (* pure multiplication: omega alone can't do it *) +Qed. + +Goal forall a:Z, Zabs a = a -> a >= 0. +intros. +romega with *. +Qed. + +Goal forall a:Z, Zsgn a = a -> a = 1 \/ a = 0 \/ a = -1. +intros. +romega with *. +Qed. + +(* zify_nat *) + +Goal forall m: nat, (m<2)%nat -> (0<= m+m <=2)%nat. +intros. +romega with *. +Qed. + +Goal forall m:nat, (m<1)%nat -> (m=0)%nat. +intros. +romega with *. +Qed. + +Goal forall m: nat, (m<=100)%nat -> (0<= m+m <=200)%nat. +intros. +romega with *. +Qed. +(* 2000 instead of 200: works, but quite slow *) + +Goal forall m: nat, (m*m>=0)%nat. +intros. +romega with *. +Qed. + +(* zify_positive *) + +Goal forall m: positive, (m<2)%positive -> (2 <= m+m /\ m+m <= 2)%positive. +intros. +romega with *. +Qed. + +Goal forall m:positive, (m<2)%positive -> (m=1)%positive. +intros. +romega with *. +Qed. + +Goal forall m: positive, (m<=1000)%positive -> (2<=m+m/\m+m <=2000)%positive. +intros. +romega with *. +Qed. + +Goal forall m: positive, (m*m>=1)%positive. +intros. +romega with *. +Qed. + +(* zify_N *) + +Goal forall m:N, (m<2)%N -> (0 <= m+m /\ m+m <= 2)%N. +intros. +romega with *. +Qed. + +Goal forall m:N, (m<1)%N -> (m=0)%N. +intros. +romega with *. +Qed. + +Goal forall m:N, (m<=1000)%N -> (0<=m+m/\m+m <=2000)%N. +intros. +romega with *. +Qed. + +Goal forall m:N, (m*m>=0)%N. +intros. +romega with *. +Qed. + +(* mix of datatypes *) + +Goal forall p, Z_of_N (N_of_nat (nat_of_N (Npos p))) = Zpos p. +intros. +romega with *. +Qed. + + diff --git a/test-suite/success/apply.v b/test-suite/success/apply.v index 4f260696..fcce68b9 100644 --- a/test-suite/success/apply.v +++ b/test-suite/success/apply.v @@ -7,8 +7,197 @@ assumption. Qed. Require Import ZArith. -Open Scope Z_scope. -Goal forall x y z, ~ z <= 0 -> x * z < y * z -> x <= y. +Goal (forall x y z, ~ z <= 0 -> x * z < y * z -> x <= y)%Z. intros; apply Znot_le_gt, Zgt_lt in H. apply Zmult_lt_reg_r, Zlt_le_weak in H0; auto. Qed. + +(* Check if it unfolds when there are not enough premises *) + +Goal forall n, n = S n -> False. +intros. +apply n_Sn in H. +assumption. +Qed. + +(* Check naming in with bindings; printing used to be inconsistent before *) +(* revision 9450 *) + +Notation S':=S (only parsing). +Goal (forall S, S = S' S) -> (forall S, S = S' S). +intros. +apply H with (S0 := S). +Qed. + +(* Check inference of implicit arguments in bindings *) + +Goal exists y : nat -> Type, y 0 = y 0. +exists (fun x => True). +trivial. +Qed. + +(* Check universe handling in typed unificationn *) + +Definition E := Type. +Goal exists y : E, y = y. +exists Prop. +trivial. +Qed. + +Variable Eq : Prop = (Prop -> Prop) :> E. +Goal Prop. +rewrite Eq. +Abort. + +(* Check insertion of coercions in bindings *) + +Coercion eq_true : bool >-> Sortclass. +Goal exists A:Prop, A = A. +exists true. +trivial. +Qed. + +(* Check use of unification of bindings types in specialize *) + +Variable P : nat -> Prop. +Variable L : forall (l : nat), P l -> P l. +Goal P 0 -> True. +intros. +specialize L with (1:=H). +Abort. +Reset P. + +(* Two examples that show that hnf_constr is used when unifying types + of bindings (a simplification of a script from Field_Theory) *) + +Require Import List. +Open Scope list_scope. +Fixpoint P (l : list nat) : Prop := + match l with + | nil => True + | e1 :: nil => e1 = e1 + | e1 :: l1 => e1 = e1 /\ P l1 + end. +Variable L : forall n l, P (n::l) -> P l. + +Goal forall (x:nat) l, P (x::l) -> P l. +intros. +apply L with (1:=H). +Qed. + +Goal forall (x:nat) l, match l with nil => x=x | _::_ => x=x /\ P l end -> P l. +intros. +apply L with (1:=H). +Qed. + +(* The following call to auto fails if the type of the clause + associated to the H is not beta-reduced [but apply H works] + (a simplification of a script from FSetAVL) *) + +Definition apply (f:nat->Prop) := forall x, f x. +Goal apply (fun n => n=0) -> 1=0. +intro H. +auto. +Qed. + +(* The following fails if the coercion Zpos is not introduced around p + before trying a subterm that matches the left-hand-side of the equality + (a simplication of an example taken from Nijmegen/QArith) *) + +Require Import ZArith. +Coercion Zpos : positive >-> Z. +Variable f : Z -> Z -> Z. +Variable g : forall q1 q2 p : Z, f (f q1 p) (f q2 p) = Z0. +Goal forall p q1 q2, f (f q1 (Zpos p)) (f q2 (Zpos p)) = Z0. +intros; rewrite g with (p:=p). +reflexivity. +Qed. + +(* A funny example where the behavior differs depending on which of a + multiple solution to a unification problem is chosen (an instance + of this case can be found in the proof of Buchberger.BuchRed.nf_divp) *) + +Definition succ x := S x. +Goal forall (I : nat -> Set) (P : nat -> Prop) (Q : forall n:nat, I n -> Prop), + (forall x y, P x -> Q x y) -> + (forall x, P (S x)) -> forall y: I (S 0), Q (succ 0) y. +intros. +apply H with (y:=y). +(* [x] had two possible instances: [S 0], coming from unifying the + type of [y] with [I ?n] and [succ 0] coming from the unification with + the goal; only the first one allows to make the next apply (which + does not work modulo delta) working *) +apply H0. +Qed. + +(* A similar example with a arbitrary long conversion between the two + possible instances *) + +Fixpoint compute_succ x := + match x with O => S 0 | S n => S (compute_succ n) end. + +Goal forall (I : nat -> Set) (P : nat -> Prop) (Q : forall n:nat, I n -> Prop), + (forall x y, P x -> Q x y) -> + (forall x, P (S x)) -> forall y: I (S 100), Q (compute_succ 100) y. +intros. +apply H with (y:=y). +apply H0. +Qed. + +(* Another example with multiple convertible solutions to the same + metavariable (extracted from Algebra.Hom_module.Hom_module, 10th + subgoal which precisely fails) *) + +Definition ID (A:Type) := A. +Goal forall f:Type -> Type, + forall (P : forall A:Type, A -> Prop), + (forall (B:Type) x, P (f B) x -> P (f B) x) -> + (forall (A:Type) x, P (f (f A)) x) -> + forall (A:Type) (x:f (f A)), P (f (ID (f A))) x. +intros. +apply H. +(* The parameter [B] had two possible instances: [ID (f A)] by direct + unification and [f A] by unification of the type of [x]; only the + first choice makes the next command fail, as it was + (unfortunately?) in Hom_module *) +try apply H. +unfold ID; apply H0. +Qed. + +(* Test coercion below product and on non meta-free terms in with bindings *) +(* Cf wishes #1408 from E. Makarov *) + +Parameter bool_Prop :> bool -> Prop. +Parameter r : bool -> bool -> bool. +Axiom ax : forall (A : Set) (R : A -> A -> Prop) (x y : A), R x y. + +Theorem t : r true false. +apply ax with (R := r). +Qed. + +(* Check verification of type at unification (submitted by Stéphane Lengrand): + without verification, the first "apply" works what leads to the incorrect + instantiation of x by Prop *) + +Theorem u : ~(forall x:Prop, ~x). +unfold not. +intro. +eapply H. +apply (forall B:Prop,B->B) || (instantiate (1:=True); exact I). +Defined. + +(* Fine-tuning coercion insertion in presence of unfolding (bug #1883) *) + +Parameter name : Set. +Definition atom := name. + +Inductive exp : Set := + | var : atom -> exp. + +Coercion var : atom >-> exp. + +Axiom silly_axiom : forall v : exp, v = v -> False. + +Lemma silly_lemma : forall x : atom, False. +intros x. +apply silly_axiom with (v := x). (* fails *) diff --git a/test-suite/success/cc.v b/test-suite/success/cc.v index fecc8977..94d827fd 100644 --- a/test-suite/success/cc.v +++ b/test-suite/success/cc.v @@ -78,6 +78,14 @@ intros. congruence. Qed. +(* example with implications *) + +Theorem arrow : forall (A B: Prop) (C D:Set) , A=B -> C=D -> +(A -> C) = (B -> D). +congruence. +Qed. + + Set Implicit Arguments. Parameter elt: Set. @@ -94,5 +102,6 @@ Proof. auto. Qed. + \ No newline at end of file diff --git a/test-suite/success/change.v b/test-suite/success/change.v new file mode 100644 index 00000000..cea01712 --- /dev/null +++ b/test-suite/success/change.v @@ -0,0 +1,6 @@ +(* A few tests of the syntax of clauses and of the interpretation of change *) + +Goal let a := 0+0 in a=a. +intro. +change 0 in (value of a). +change ((fun A:Type => A) nat) in (type of a). diff --git a/test-suite/success/clear.v b/test-suite/success/clear.v index 444146f7..8169361c 100644 --- a/test-suite/success/clear.v +++ b/test-suite/success/clear.v @@ -1,6 +1,15 @@ Goal forall x:nat, (forall x, x=0 -> True)->True. intros; eapply H. instantiate (1:=(fun y => _) (S x)). - simpl. - clear x || trivial. + simpl. + clear x. trivial. Qed. + +Goal forall y z, (forall x:nat, x=y -> True) -> y=z -> True. + intros; eapply H. + rename z into z'. + clear H0. + clear z'. + reflexivity. +Qed. + diff --git a/test-suite/success/conv_pbs.v b/test-suite/success/conv_pbs.v new file mode 100644 index 00000000..062c3ee5 --- /dev/null +++ b/test-suite/success/conv_pbs.v @@ -0,0 +1,223 @@ +(* A bit complex but realistic example whose last fixpoint definition + used to fail in 8.1 because of wrong environment in conversion + problems (see revision 9664) *) + +Require Import List. +Require Import Arith. + +Parameter predicate : Set. +Parameter function : Set. +Definition variable := nat. +Definition x0 := 0. +Definition var_eq_dec := eq_nat_dec. + +Inductive term : Set := + | App : function -> term -> term + | Var : variable -> term. + +Definition atom := (predicate * term)%type. + +Inductive formula : Set := + | Atom : atom -> formula + | Imply : formula -> formula -> formula + | Forall : variable -> formula -> formula. + +Notation "A --> B" := (Imply A B) (at level 40). + +Definition substitution range := list (variable * range). + +Fixpoint remove_assoc (A:Set)(x:variable)(rho: substitution A){struct rho} + : substitution A := + match rho with + | nil => rho + | (y,t) :: rho => if var_eq_dec x y then remove_assoc A x rho + else (y,t) :: remove_assoc A x rho + end. + +Fixpoint assoc (A:Set)(x:variable)(rho:substitution A){struct rho} + : option A := + match rho with + | nil => None + | (y,t) :: rho => if var_eq_dec x y then Some t + else assoc A x rho + end. + +Fixpoint subst_term (rho:substitution term)(t:term){struct t} : term := + match t with + | Var x => match assoc _ x rho with + | Some a => a + | None => Var x + end + | App f t' => App f (subst_term rho t') + end. + +Fixpoint subst_formula (rho:substitution term)(A:formula){struct A}:formula := + match A with + | Atom (p,t) => Atom (p, subst_term rho t) + | A --> B => subst_formula rho A --> subst_formula rho B + | Forall y A => Forall y (subst_formula (remove_assoc _ y rho) A) + (* assume t closed *) + end. + +Definition subst A x t := subst_formula ((x,t):: nil) A. + +Record Kripke : Type := { + worlds: Set; + wle : worlds -> worlds -> Type; + wle_refl : forall w, wle w w ; + wle_trans : forall w w' w'', wle w w' -> wle w' w'' -> wle w w''; + domain : Set; + vars : variable -> domain; + funs : function -> domain -> domain; + atoms : worlds -> predicate * domain -> Type; + atoms_mon : forall w w', wle w w' -> forall P, atoms w P -> atoms w' P +}. + +Section Sem. + +Variable K : Kripke. + +Fixpoint sem (rho: substitution (domain K))(t:term){struct t} : domain K := + match t with + | Var x => match assoc _ x rho with + | Some a => a + | None => vars K x + end + | App f t' => funs K f (sem rho t') + end. + +End Sem. + +Notation "w <= w'" := (wle _ w w'). + +Set Implicit Arguments. + +Reserved Notation "w ||- A" (at level 70). + +Definition context := list formula. + +Variable fresh : variable -> context -> Prop. + +Variable fresh_out : context -> variable. + +Axiom fresh_out_spec : forall Gamma, fresh (fresh_out Gamma) Gamma. + +Axiom fresh_peel : forall x A Gamma, fresh x (A::Gamma) -> fresh x Gamma. + +Fixpoint force (K:Kripke)(rho: substitution (domain K))(w:worlds K)(A:formula) + {struct A} : Type := + match A with + | Atom (p,t) => atoms K w (p, sem K rho t) + | A --> B => forall w', w <= w' -> force K rho w' A -> force K rho w' B + | Forall x A => forall w', w <= w' -> forall t, force K ((x,t)::remove_assoc _ x rho) w' A + end. + +Notation "w ||- A" := (force _ nil w A). + +Reserved Notation "Gamma |- A" (at level 70). +Reserved Notation "Gamma ; A |- C" (at level 70, A at next level). + +Inductive context_prefix (Gamma:context) : context -> Type := + | CtxPrefixRefl : context_prefix Gamma Gamma + | CtxPrefixTrans : forall A Gamma', context_prefix Gamma Gamma' -> context_prefix Gamma (cons A Gamma'). + +Inductive in_context (A:formula) : list formula -> Prop := + | InAxiom : forall Gamma, in_context A (cons A Gamma) + | OmWeak : forall Gamma B, in_context A Gamma -> in_context A (cons B Gamma). + +Inductive prove : list formula -> formula -> Type := + | ProofImplyR : forall A B Gamma, prove (cons A Gamma) B + -> prove Gamma (A --> B) + | ProofForallR : forall x A Gamma, (forall y, fresh y (A::Gamma) + -> prove Gamma (subst A x (Var y))) -> prove Gamma (Forall x A) + | ProofCont : forall A Gamma Gamma' C, context_prefix (A::Gamma) Gamma' + -> (prove_stoup Gamma' A C) -> (Gamma' |- C) + +where "Gamma |- A" := (prove Gamma A) + + with prove_stoup : list formula -> formula -> formula -> Type := + | ProofAxiom Gamma C: Gamma ; C |- C + | ProofImplyL Gamma C : forall A B, (Gamma |- A) + -> (prove_stoup Gamma B C) -> (prove_stoup Gamma (A --> B) C) + | ProofForallL Gamma C : forall x t A, (prove_stoup Gamma (subst A x t) C) + -> (prove_stoup Gamma (Forall x A) C) + +where " Gamma ; B |- A " := (prove_stoup Gamma B A). + +Axiom context_prefix_trans : + forall Gamma Gamma' Gamma'', + context_prefix Gamma Gamma' + -> context_prefix Gamma' Gamma'' + -> context_prefix Gamma Gamma''. + +Axiom Weakening : + forall Gamma Gamma' A, + context_prefix Gamma Gamma' -> Gamma |- A -> Gamma' |- A. + +Axiom universal_weakening : + forall Gamma Gamma', context_prefix Gamma Gamma' + -> forall P, Gamma |- Atom P -> Gamma' |- Atom P. + +Canonical Structure Universal := Build_Kripke + context + context_prefix + CtxPrefixRefl + context_prefix_trans + term + Var + App + (fun Gamma P => Gamma |- Atom P) + universal_weakening. + +Axiom subst_commute : + forall A rho x t, + subst_formula ((x,t)::rho) A = subst (subst_formula rho A) x t. + +Axiom subst_formula_atom : + forall rho p t, + Atom (p, sem _ rho t) = subst_formula rho (Atom (p,t)). + +Fixpoint universal_completeness (Gamma:context)(A:formula){struct A} + : forall rho:substitution term, + force _ rho Gamma A -> Gamma |- subst_formula rho A + := + match A + return forall rho, force _ rho Gamma A + -> Gamma |- subst_formula rho A + with + | Atom (p,t) => fun rho H => eq_rect _ (fun A => Gamma |- A) H _ (subst_formula_atom rho p t) + | A --> B => fun rho HImplyAB => + let A' := subst_formula rho A in + ProofImplyR (universal_completeness (A'::Gamma) B rho + (HImplyAB (A'::Gamma)(CtxPrefixTrans A' (CtxPrefixRefl Gamma)) + (universal_completeness_stoup A rho (fun C Gamma' Hle p + => ProofCont Hle p)))) + | Forall x A => fun rho HForallA + => ProofForallR x (fun y Hfresh + => eq_rect _ _ (universal_completeness Gamma A _ + (HForallA Gamma (CtxPrefixRefl Gamma)(Var y))) _ (subst_commute _ _ _ _ )) + end +with universal_completeness_stoup (Gamma:context)(A:formula){struct A} + : forall rho, (forall C Gamma', context_prefix Gamma Gamma' + -> Gamma' ; subst_formula rho A |- C -> Gamma' |- C) + -> force _ rho Gamma A + := + match A return forall rho, + (forall C Gamma', context_prefix Gamma Gamma' + -> Gamma' ; subst_formula rho A |- C + -> Gamma' |- C) + -> force _ rho Gamma A + with + | Atom (p,t) as C => fun rho H + => H _ Gamma (CtxPrefixRefl Gamma)(ProofAxiom _ _) + | A --> B => fun rho H => fun Gamma' Hle HA + => universal_completeness_stoup B rho (fun C Gamma'' Hle' p + => H C Gamma'' (context_prefix_trans Hle Hle') + (ProofImplyL (Weakening Hle' (universal_completeness Gamma' A rho HA)) p)) + | Forall x A => fun rho H => fun Gamma' Hle t + => (universal_completeness_stoup A ((x,t)::remove_assoc _ x rho) + (fun C Gamma'' Hle' p => + H C Gamma'' (context_prefix_trans Hle Hle') + (ProofForallL x t (subst_formula (remove_assoc _ x rho) A) + (eq_rect _ (fun D => Gamma'' ; D |- C) p _ (subst_commute _ _ _ _))))) + end. diff --git a/test-suite/success/decl_mode.v b/test-suite/success/decl_mode.v new file mode 100644 index 00000000..fede31a8 --- /dev/null +++ b/test-suite/success/decl_mode.v @@ -0,0 +1,182 @@ +(* \sqrt 2 is irrationnal, (c) 2006 Pierre Corbineau *) + +Set Firstorder Depth 1. +Require Import ArithRing Wf_nat Peano_dec Div2 Even Lt. + +Lemma double_div2: forall n, div2 (double n) = n. +proof. + assume n:nat. + per induction on n. + suppose it is 0. + suffices (0=0) to show thesis. + thus thesis. + suppose it is (S m) and Hrec:thesis for m. + have (div2 (double (S m))= div2 (S (S (double m)))). + ~= (S (div2 (double m))). + thus ~= (S m) by Hrec. + end induction. +end proof. +Show Script. +Qed. + +Lemma double_inv : forall n m, double n = double m -> n = m . +proof. + let n, m be such that H:(double n = double m). +have (n = div2 (double n)) by double_div2,H. + ~= (div2 (double m)) by H. + thus ~= m by double_div2. +end proof. +Qed. + +Lemma double_mult_l : forall n m, (double (n * m)=n * double m). +proof. + assume n:nat and m:nat. + have (double (n * m) = n*m + n * m). + ~= (n * (m+m)) by * using ring. + thus ~= (n * double m). +end proof. +Qed. + +Lemma double_mult_r : forall n m, (double (n * m)=double n * m). +proof. + assume n:nat and m:nat. + have (double (n * m) = n*m + n * m). + ~= ((n + n) * m) by * using ring. + thus ~= (double n * m). +end proof. +Qed. + +Lemma even_is_even_times_even: forall n, even (n*n) -> even n. +proof. + let n be such that H:(even (n*n)). + per cases of (even n \/ odd n) by even_or_odd. + suppose (odd n). + hence thesis by H,even_mult_inv_r. + end cases. +end proof. +Qed. + +Lemma main_thm_aux: forall n,even n -> +double (double (div2 n *div2 n))=n*n. +proof. + given n such that H:(even n). + *** have (double (double (div2 n * div2 n)) + = double (div2 n) * double (div2 n)) + by double_mult_l,double_mult_r. + thus ~= (n*n) by H,even_double. +end proof. +Qed. + +Require Omega. + +Lemma even_double_n: (forall m, even (double m)). +proof. + assume m:nat. + per induction on m. + suppose it is 0. + thus thesis. + suppose it is (S mm) and thesis for mm. + then H:(even (S (S (mm+mm)))). + have (S (S (mm + mm)) = S mm + S mm) using omega. + hence (even (S mm +S mm)) by H. + end induction. +end proof. +Qed. + +Theorem main_theorem: forall n p, n*n=double (p*p) -> p=0. +proof. + assume n0:nat. + define P n as (forall p, n*n=double (p*p) -> p=0). + claim rec_step: (forall n, (forall m,m P m) -> P n). + let n be such that H:(forall m : nat, m < n -> P m) and p:nat . + per cases of ({n=0}+{n<>0}) by eq_nat_dec. + suppose H1:(n=0). + per cases on p. + suppose it is (S p'). + assume (n * n = double (S p' * S p')). + =~ 0 by H1,mult_n_O. + ~= (S ( p' + p' * S p' + S p'* S p')) + by plus_n_Sm. + hence thesis . + suppose it is 0. + thus thesis. + end cases. + suppose H1:(n<>0). + assume H0:(n*n=double (p*p)). + have (even (double (p*p))) by even_double_n . + then (even (n*n)) by H0. + then H2:(even n) by even_is_even_times_even. + then (double (double (div2 n *div2 n))=n*n) + by main_thm_aux. + ~= (double (p*p)) by H0. + then H':(double (div2 n *div2 n)= p*p) by double_inv. + have (even (double (div2 n *div2 n))) by even_double_n. + then (even (p*p)) by even_double_n,H'. + then H3:(even p) by even_is_even_times_even. + have (double(double (div2 n * div2 n)) = n*n) + by H2,main_thm_aux. + ~= (double (p*p)) by H0. + ~= (double(double (double (div2 p * div2 p)))) + by H3,main_thm_aux. + then H'':(div2 n * div2 n = double (div2 p * div2 p)) + by double_inv. + then (div2 n < n) by lt_div2,neq_O_lt,H1. + then H4:(div2 p=0) by (H (div2 n)),H''. + then (double (div2 p) = double 0). + =~ p by even_double,H3. + thus ~= 0. + end cases. + end claim. + hence thesis by (lt_wf_ind n0 P). +end proof. +Qed. + +Require Import Reals Field. +(*Coercion INR: nat >->R. +Coercion IZR: Z >->R.*) + +Open Scope R_scope. + +Lemma square_abs_square: + forall p,(INR (Zabs_nat p) * INR (Zabs_nat p)) = (IZR p * IZR p). +proof. + assume p:Z. + per cases on p. + suppose it is (0%Z). + thus thesis. + suppose it is (Zpos z). + thus thesis. + suppose it is (Zneg z). + have ((INR (Zabs_nat (Zneg z)) * INR (Zabs_nat (Zneg z))) = + (IZR (Zpos z) * IZR (Zpos z))). + ~= ((- IZR (Zpos z)) * (- IZR (Zpos z))). + thus ~= (IZR (Zneg z) * IZR (Zneg z)). + end cases. +end proof. +Qed. + +Definition irrational (x:R):Prop := + forall (p:Z) (q:nat),q<>0%nat -> x<> (IZR p/INR q). + +Theorem irrationnal_sqrt_2: irrational (sqrt (INR 2%nat)). +proof. + let p:Z,q:nat be such that H:(q<>0%nat) + and H0:(sqrt (INR 2%nat)=(IZR p/INR q)). + have H_in_R:(INR q<>0:>R) by H. + have triv:((IZR p/INR q* INR q) =IZR p :>R) by * using field. + have sqrt2:((sqrt (INR 2%nat) * sqrt (INR 2%nat))= INR 2%nat:>R) by sqrt_def. + have (INR (Zabs_nat p * Zabs_nat p) + = (INR (Zabs_nat p) * INR (Zabs_nat p))) + by mult_INR. + ~= (IZR p* IZR p) by square_abs_square. + ~= ((IZR p/INR q*INR q)*(IZR p/INR q*INR q)) by triv. (* we have to factor because field is too weak *) + ~= ((IZR p/INR q)*(IZR p/INR q)*(INR q*INR q)) using ring. + ~= (sqrt (INR 2%nat) * sqrt (INR 2%nat)*(INR q*INR q)) by H0. + ~= (INR (2%nat * (q*q))) by sqrt2,mult_INR. + then (Zabs_nat p * Zabs_nat p = 2* (q * q))%nat. + ~= ((q*q)+(q*q))%nat. + ~= (Div2.double (q*q)). + then (q=0%nat) by main_theorem. + hence thesis by H. +end proof. +Qed. diff --git a/test-suite/success/dependentind.v b/test-suite/success/dependentind.v new file mode 100644 index 00000000..48255386 --- /dev/null +++ b/test-suite/success/dependentind.v @@ -0,0 +1,100 @@ +Require Import Coq.Program.Program. +Set Implicit Arguments. +Unset Strict Implicit. + +Variable A : Set. + +Inductive vector : nat -> Type := vnil : vector 0 | vcons : A -> forall n, vector n -> vector (S n). + +Goal forall n, forall v : vector (S n), vector n. +Proof. + intros n H. + dependent destruction H. + assumption. +Save. + +Require Import ProofIrrelevance. + +Goal forall n, forall v : vector (S n), exists v' : vector n, exists a : A, v = vcons a v'. +Proof. + intros n v. + dependent destruction v. + exists v ; exists a. + reflexivity. +Save. + +(* Extraction Unnamed_thm. *) + +Inductive type : Type := +| base : type +| arrow : type -> type -> type. + +Notation " t --> t' " := (arrow t t') (at level 20, t' at next level). + +Inductive ctx : Type := +| empty : ctx +| snoc : ctx -> type -> ctx. + +Notation " Γ , Ï„ " := (snoc Γ Ï„) (at level 25, t at next level, left associativity). + +Fixpoint conc (Γ Δ : ctx) : ctx := + match Δ with + | empty => Γ + | snoc Δ' x => snoc (conc Γ Δ') x + end. + +Notation " Γ ; Δ " := (conc Γ Δ) (at level 25, left associativity). + +Inductive term : ctx -> type -> Type := +| ax : forall Γ Ï„, term (Γ, Ï„) Ï„ +| weak : forall Γ Ï„, term Γ Ï„ -> forall Ï„', term (Γ, Ï„') Ï„ +| abs : forall Γ Ï„ Ï„', term (Γ , Ï„) Ï„' -> term Γ (Ï„ --> Ï„') +| app : forall Γ Ï„ Ï„', term Γ (Ï„ --> Ï„') -> term Γ Ï„ -> term Γ Ï„'. + +Lemma weakening : forall Γ Δ Ï„, term (Γ ; Δ) Ï„ -> + forall Ï„', term (Γ , Ï„' ; Δ) Ï„. +Proof with simpl in * ; auto ; simpl_depind. + intros Γ Δ Ï„ H. + + dependent induction H. + + destruct Δ... + apply weak ; apply ax. + + apply ax. + + destruct Δ... + specialize (IHterm Γ empty)... + apply weak... + + apply weak... + + destruct Δ... + apply weak ; apply abs ; apply H. + + apply abs... + specialize (IHterm Γ0 (Δ, t, Ï„))... + + apply app with Ï„... +Qed. + +Lemma exchange : forall Γ Δ α β Ï„, term (Γ, α, β ; Δ) Ï„ -> term (Γ, β, α ; Δ) Ï„. +Proof with simpl in * ; simpl_depind ; auto. + intros until 1. + dependent induction H. + + destruct Δ... + apply weak ; apply ax. + + apply ax. + + destruct Δ... + pose (weakening (Γ:=Γ0) (Δ:=(empty, α)))... + + apply weak... + + apply abs... + specialize (IHterm Γ0 α β (Δ, Ï„))... + + eapply app with Ï„... +Save. diff --git a/test-suite/success/destruct.v b/test-suite/success/destruct.v index 9f938e10..5aa78816 100644 --- a/test-suite/success/destruct.v +++ b/test-suite/success/destruct.v @@ -23,3 +23,35 @@ set (b := true) in *. try destruct b. Abort. +(* Used to fail with error "n is used in conclusion" before revision 9447 *) + +Goal forall n, n = S n. +induction S. +Abort. + +(* Check that elimination with remaining evars do not raise an bad + error message *) + +Theorem Refl : forall P, P <-> P. tauto. Qed. +Goal True. +case Refl || ecase Refl. +Abort. + + +(* Submitted by B. Baydemir (bug #1882) *) + +Require Import List. + +Definition alist R := list (nat * R)%type. + +Section Properties. + Variables A : Type. + Variables a : A. + Variables E : alist A. + + Lemma silly : E = E. + Proof. + clear. induction E. (* this fails. *) + Abort. + +End Properties. diff --git a/test-suite/success/evars.v b/test-suite/success/evars.v index ad69ced1..082cbfbe 100644 --- a/test-suite/success/evars.v +++ b/test-suite/success/evars.v @@ -68,9 +68,145 @@ Proof. trivial. Qed. Hint Resolve contradiction. Goal False. eauto. +Abort. (* This used to fail in V8.1beta because first-order unification was used before using type information *) Check (exist _ O (refl_equal 0) : {n:nat|n=0}). Check (exist _ O I : {n:nat|True}). + +(* An example (initially from Marseille/Fairisle) that involves an evar with + different solutions (Input, Output or bool) that may or may not be + considered distinct depending on which kind of conversion is used *) + +Section A. +Definition STATE := (nat * bool)%type. +Let Input := bool. +Let Output := bool. +Parameter Out : STATE -> Output. +Check fun (s : STATE) (reg : Input) => reg = Out s. +End A. + +(* The return predicate found should be: "in _=U return U" *) +(* (feature already available in V8.0) *) + +Definition g (T1 T2:Type) (x:T1) (e:T1=T2) : T2 := + match e with + | refl_equal => x + end. + +(* An example extracted from FMapAVL which (may) test restriction on + evars problems of the form ?n[args1]=?n[args2] with distinct args1 + and args2 *) + +Set Implicit Arguments. +Parameter t:Set->Set. +Parameter map:forall elt elt' : Set, (elt -> elt') -> t elt -> t elt'. +Parameter avl: forall elt : Set, t elt -> Prop. +Parameter bst: forall elt : Set, t elt -> Prop. +Parameter map_avl: forall (elt elt' : Set) (f : elt -> elt') (m : t elt), + avl m -> avl (map f m). +Parameter map_bst: forall (elt elt' : Set) (f : elt -> elt') (m : t elt), + bst m -> bst (map f m). +Record bbst (elt:Set) : Set := + Bbst {this :> t elt; is_bst : bst this; is_avl: avl this}. +Definition t' := bbst. +Section B. +Variables elt elt': Set. +Definition map' f (m:t' elt) : t' elt' := + Bbst (map_bst f m.(is_bst)) (map_avl f m.(is_avl)). +End B. +Unset Implicit Arguments. + +(* An example from Lexicographic_Exponentiation that tests the + contraction of reducible fixpoints in type inference *) + +Require Import List. +Check (fun (A:Set) (a b x:A) (l:list A) + (H : l ++ cons x nil = cons b (cons a nil)) => + app_inj_tail l (cons b nil) _ _ H). + +(* An example from NMake (simplified), that uses restriction in solve_refl *) + +Parameter h:(nat->nat)->(nat->nat). +Fixpoint G p cont {struct p} := + h (fun n => match p with O => cont | S p => G p cont end n). + +(* An example from Bordeaux/Cantor that applies evar restriction + below a binder *) + +Require Import Relations. +Parameter lex : forall (A B : Set), (forall (a1 a2:A), {a1=a2}+{a1<>a2}) +-> relation A -> relation B -> A * B -> A * B -> Prop. +Check + forall (A B : Set) eq_A_dec o1 o2, + antisymmetric A o1 -> transitive A o1 -> transitive B o2 -> + transitive _ (lex _ _ eq_A_dec o1 o2). + +(* Another example from Julien Forest that tests unification below binders *) + +Require Import List. +Set Implicit Arguments. +Parameter + merge : forall (A B : Set) (eqA : forall (a1 a2 : A), {a1=a2}+{a1<>a2}) + (eqB : forall (b1 b2 : B), {b1=b2}+{b1<>b2}) + (partial_res l : list (A*B)), option (list (A*B)). +Axiom merge_correct : + forall (A B : Set) eqA eqB (l1 l2 : list (A*B)), + (forall a2 b2 c2, In (a2,b2) l2 -> In (a2,c2) l2 -> b2 = c2) -> + match merge eqA eqB l1 l2 with _ => True end. +Unset Implicit Arguments. + +(* An example from Bordeaux/Additions that tests restriction below binders *) + +Section Additions_while. + +Variable A : Set. +Variables P Q : A -> Prop. +Variable le : A -> A -> Prop. +Hypothesis Q_dec : forall s : A, P s -> {Q s} + {~ Q s}. +Hypothesis le_step : forall s : A, ~ Q s -> P s -> {s' | P s' /\ le s' s}. +Hypothesis le_wf : well_founded le. + +Lemma loopexec : forall s : A, P s -> {s' : A | P s' /\ Q s'}. +refine + (well_founded_induction_type le_wf (fun s => _ -> {s' : A | _ /\ _}) + (fun s hr i => + match Q_dec s i with + | left _ => _ + | right _ => + match le_step s _ _ with + | exist s' h' => + match hr s' _ _ with + | exist s'' _ => exist _ s'' _ + end + end + end)). +Abort. + +End Additions_while. + +(* Two examples from G. Melquiond (bugs #1878 and #1884) *) + +Parameter F1 G1 : nat -> Prop. +Goal forall x : nat, F1 x -> G1 x. +refine (fun x H => proj2 (_ x H)). +Abort. + +Goal forall x : nat, F1 x -> G1 x. +refine (fun x H => proj2 (_ x H) _). +Abort. + +(* Remark: the following example does not succeed any longer in 8.2 because, + the algorithm is more general and does exclude a solution that it should + exclude for typing reason. Handling of types and backtracking is still to + be done + +Section S. +Variables A B : nat -> Prop. +Goal forall x : nat, A x -> B x. +refine (fun x H => proj2 (_ x H) _). +Abort. +End S. +*) diff --git a/test-suite/success/extraction.v b/test-suite/success/extraction.v index 0b3060d5..74d87ffa 100644 --- a/test-suite/success/extraction.v +++ b/test-suite/success/extraction.v @@ -84,7 +84,7 @@ Extraction test12. (* type test12 = (__ -> __ -> __) -> __ *) -Definition test13 := match left True I with +Definition test13 := match @left True True I with | left x => 1 | right x => 0 end. diff --git a/test-suite/success/fix.v b/test-suite/success/fix.v index f4a4d36d..78b01f3e 100644 --- a/test-suite/success/fix.v +++ b/test-suite/success/fix.v @@ -1,10 +1,3 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* rmax (maxVar p) (maxVar q) end. +(* Check bug #1491 *) + +Require Import Streams. + +Definition decomp (s:Stream nat) : Stream nat := + match s with Cons _ s => s end. + +CoFixpoint bx0 : Stream nat := Cons 0 bx1 +with bx1 : Stream nat := Cons 1 bx0. + +Lemma bx0bx : decomp bx0 = bx1. +simpl. (* used to return bx0 in V8.1 and before instead of bx1 *) +reflexivity. +Qed. + +(* Check mutually inductive statements *) + +Require Import ZArith_base Omega. +Open Scope Z_scope. + +Inductive even: Z -> Prop := +| even_base: even 0 +| even_succ: forall n, odd (n - 1) -> even n +with odd: Z -> Prop := +| odd_succ: forall n, even (n - 1) -> odd n. + +Lemma even_pos_odd_pos: forall n, even n -> n >= 0 +with odd_pos_even_pos : forall n, odd n -> n >= 1. +Proof. + intros. + destruct H. + omega. + apply odd_pos_even_pos in H. + omega. + intros. + destruct H. + apply even_pos_odd_pos in H. + omega. +Qed. + +CoInductive a : Prop := acons : b -> a +with b : Prop := bcons : a -> b. + +Lemma a1 : a +with b1 : b. +Proof. +apply acons. +assumption. + +apply bcons. +assumption. +Qed. diff --git a/test-suite/success/hyps_inclusion.v b/test-suite/success/hyps_inclusion.v new file mode 100644 index 00000000..21bfc075 --- /dev/null +++ b/test-suite/success/hyps_inclusion.v @@ -0,0 +1,32 @@ +(* Simplified example for bug #1325 *) + +(* Explanation: the proof engine see section variables as goal + variables; especially, it can change their types so that, at + type-checking, the section variables are not recognized + (Typeops.check_hyps_inclusion raises "types do no match"). It + worked before the introduction of polymorphic inductive types because + tactics were using Typing.type_of and not Typeops.typing; the former + was not checking hyps inclusion so that the discrepancy in the types + of section variables seen as goal variables was not a problem (at the + end, when the proof is completed, the section variable recovers its + original type and all is correct for Typeops) *) + +Section A. +Variable H:not True. +Lemma f:nat->nat. destruct H. exact I. Defined. +Goal f 0=f 1. +red in H. +(* next tactic was failing wrt bug #1325 because type-checking the goal + detected a syntactically different type for the section variable H *) +case 0. +Reset A. + +(* Variant with polymorphic inductive types for bug #1325 *) + +Section A. +Variable H:not True. +Inductive I (n:nat) : Type := C : H=H -> I n. +Goal I 0. +red in H. +case 0. +Reset A. diff --git a/test-suite/success/implicit.v b/test-suite/success/implicit.v index 47c58f04..9034d6a6 100644 --- a/test-suite/success/implicit.v +++ b/test-suite/success/implicit.v @@ -36,3 +36,13 @@ Check (fun x => @ rhs _ _ (f x)). Fixpoint g n := match n with O => true | S n => g n end. Inductive P n : nat -> Prop := c : P n n. + +(* Avoid evars in the computation of implicit arguments (cf r9827) *) + +Require Import List. + +Fixpoint plus n m {struct n} := + match n with + | 0 => m + | S p => S (plus p m) + end. diff --git a/test-suite/success/ltac.v b/test-suite/success/ltac.v index 3f25f703..757cf6a4 100644 --- a/test-suite/success/ltac.v +++ b/test-suite/success/ltac.v @@ -173,5 +173,50 @@ Abort. empty args *) Goal True. -match None with @None => exact I end. +match constr:@None with @None => exact I end. Abort. + +(* Check second-order pattern unification *) + +Ltac to_exist := + match goal with + |- forall x y, @?P x y => + let Q := eval lazy beta in (exists x, forall y, P x y) in + assert (Q->Q) + end. + +Goal forall x y : nat, x = y. +to_exist. exact (fun H => H). +Abort. + +(* Used to fail in V8.1 *) + +Tactic Notation "test" constr(t) integer(n) := + set (k := t) in |- * at n. + +Goal forall x : nat, x = 1 -> x + x + x = 3. +intros x H. +test x 2. +Abort. + +(* Utilisation de let rec sans arguments *) + +Ltac is := + let rec i := match goal with |- ?A -> ?B => intro; i | _ => idtac end in + i. + +Goal True -> True -> True. +is. +exact I. +Abort. + +(* Interférence entre espaces des noms *) + +Ltac O := intro. +Ltac Z1 t := set (x:=t). +Ltac Z2 t := t. +Goal True -> True. +Z1 O. +Z2 ltac:O. +exact I. +Qed. diff --git a/test-suite/success/options.v b/test-suite/success/options.v index bb678150..f43a4694 100644 --- a/test-suite/success/options.v +++ b/test-suite/success/options.v @@ -20,7 +20,7 @@ Parameter i : bool -> nat. Coercion i : bool >-> nat. Add Printing Coercion i. Remove Printing Coercion i. -Test Printing Coercion i. +Test Printing Coercion for i. Test Printing Let. Test Printing If. diff --git a/test-suite/success/parsing.v b/test-suite/success/parsing.v new file mode 100644 index 00000000..d1b679d5 --- /dev/null +++ b/test-suite/success/parsing.v @@ -0,0 +1,8 @@ +Section A. +Notation "*" := O (at level 8). +Notation "**" := O (at level 99). +Notation "***" := O (at level 9). +End A. +Notation "*" := O (at level 8). +Notation "**" := O (at level 99). +Notation "***" := O (at level 9). diff --git a/test-suite/success/pattern.v b/test-suite/success/pattern.v new file mode 100644 index 00000000..28d0bd55 --- /dev/null +++ b/test-suite/success/pattern.v @@ -0,0 +1,7 @@ +(* Test pattern with dependent occurrences; Note that it does not + behave as the succession of three generalize because each + quantification introduces new occurrences that are automatically + abstracted with the numbering still based on the original statement *) + +Goal (id true,id false)=(id true,id true). +generalize bool at 2 4 6 8 10 as B, true at 3 as tt, false as ff. diff --git a/test-suite/success/refine.v b/test-suite/success/refine.v index 4346ce9a..4b636618 100644 --- a/test-suite/success/refine.v +++ b/test-suite/success/refine.v @@ -87,3 +87,33 @@ refine | exist _ _ => _ end). Abort. + + +(* Use to fail because sigma was not propagated to get_type_of *) +(* Revealed by r9310, fixed in r9359 *) + +Goal + forall f : forall a (H:a=a), Prop, + (forall a (H:a = a :> nat), f a H -> True /\ True) -> + True. +intros. +refine (@proj1 _ _ (H 0 _ _)). +Abort. + +(* Use to fail because let-in with metas in the body where rejected + because a priori considered as dependent *) + +Require Import Peano_dec. + +Definition fact_F : + forall (n:nat), + (forall m, m nat) -> + nat. +refine + (fun n fact_rec => + if eq_nat_dec n 0 then + 1 + else + let fn := fact_rec (n-1) _ in + n * fn). +Abort. diff --git a/test-suite/success/rewrite.v b/test-suite/success/rewrite.v index 9629b213..86e55922 100644 --- a/test-suite/success/rewrite.v +++ b/test-suite/success/rewrite.v @@ -17,3 +17,24 @@ intros n n' l l'. dependent rewrite (ax n n' l l'). split; reflexivity. Qed. + +(* Used to raise an anomaly instead of an error in 8.1 *) +(* Submitted by Y. Makarov *) + +Parameter N : Set. +Parameter E : N -> N -> Prop. + +Axiom e : forall (A : Set) (EA : A -> A -> Prop) (a : A), EA a a. + +Theorem th : forall x : N, E x x. +intro x. try rewrite e. +Abort. + +(* Behavior of rewrite wrt conversion *) + +Require Import Arith. + +Goal forall n, 0 + n = n -> True. +intros n H. +rewrite plus_0_l in H. +Abort. diff --git a/test-suite/success/setoid_test.v b/test-suite/success/setoid_test.v index dd1022f0..f49f58e5 100644 --- a/test-suite/success/setoid_test.v +++ b/test-suite/success/setoid_test.v @@ -18,7 +18,7 @@ Definition same (s t : set) : Prop := forall a : A, In a s <-> In a t. Lemma setoid_set : Setoid_Theory set same. -unfold same in |- *; split. +unfold same in |- *; split ; red. red in |- *; auto. red in |- *. @@ -104,3 +104,15 @@ setoid_rewrite <- H. trivial. Qed. +(* Unifying the domain up to delta-conversion (example from emakarov) *) + +Definition id: Set -> Set := fun A => A. +Definition rel : forall A : Set, relation (id A) := @eq. +Definition f: forall A : Set, A -> A := fun A x => x. + +Add Relation (id A) (rel A) as eq_rel. + +Add Morphism (@f A) : f_morph. +Proof. +unfold rel, f. trivial. +Qed. diff --git a/test-suite/success/setoid_test2.v b/test-suite/success/setoid_test2.v index bac1cf14..34fff9d1 100644 --- a/test-suite/success/setoid_test2.v +++ b/test-suite/success/setoid_test2.v @@ -120,6 +120,8 @@ Axiom eqS1: S1 -> S1 -> Prop. Axiom SetoidS1 : Setoid_Theory S1 eqS1. Add Setoid S1 eqS1 SetoidS1 as S1setoid. +Instance eqS1_default : DefaultRelation S1 eqS1. + Axiom eqS1': S1 -> S1 -> Prop. Axiom SetoidS1' : Setoid_Theory S1 eqS1'. Axiom SetoidS1'_bis : Setoid_Theory S1 eqS1'. @@ -218,6 +220,8 @@ Axiom eqS1_test8: S1_test8 -> S1_test8 -> Prop. Axiom SetoidS1_test8 : Setoid_Theory S1_test8 eqS1_test8. Add Setoid S1_test8 eqS1_test8 SetoidS1_test8 as S1_test8setoid. +Instance eqS1_test8_default : DefaultRelation S1_test8 eqS1_test8. + Axiom f_test8 : S2 -> S1_test8. Add Morphism f_test8 : f_compat_test8. Admitted. diff --git a/test-suite/success/setoid_test_function_space.v b/test-suite/success/setoid_test_function_space.v index 1602991d..ead93d91 100644 --- a/test-suite/success/setoid_test_function_space.v +++ b/test-suite/success/setoid_test_function_space.v @@ -26,14 +26,14 @@ Hint Unfold feq. Hint Resolve feq_refl feq_sym feq_trans. Variable K:(nat -> nat)->Prop. Variable K_ext:forall a b, (K a)->(a =f b)->(K b). -Add Relation (fun A B:Type => A -> B) feq - reflexivity proved by feq_refl - symmetry proved by feq_sym - transitivity proved by feq_trans as funsetoid. +Add Parametric Relation (A B : Type) : (A -> B) (@feq A B) + reflexivity proved by (@feq_refl A B) + symmetry proved by (@feq_sym A B) + transitivity proved by (@feq_trans A B) as funsetoid. -Add Morphism K with signature feq ==> iff as K_ext1. +Add Morphism K with signature (@feq nat nat) ==> iff as K_ext1. intuition. apply (K_ext H0 H). -intuition. assert (x2 =f x1);auto. apply (K_ext H0 H1). +intuition. assert (y =f x);auto. apply (K_ext H0 H1). Qed. Lemma three:forall n, forall a, (K a)->(a =f (fun m => (a (n+m))))-> (K (fun m diff --git a/test-suite/success/specialize.v b/test-suite/success/specialize.v new file mode 100644 index 00000000..4929ae4c --- /dev/null +++ b/test-suite/success/specialize.v @@ -0,0 +1,48 @@ + +Goal forall a b c : nat, a = b -> b = c -> forall d, a+d=c+d. +intros. + +(* "compatibility" mode: specializing a global name + means a kind of generalize *) + +specialize trans_equal. intros _. +specialize trans_equal with (1:=H)(2:=H0). intros _. +specialize trans_equal with (x:=a)(y:=b)(z:=c). intros _. +specialize trans_equal with (1:=H)(z:=c). intros _. +specialize trans_equal with nat a b c. intros _. +specialize (@trans_equal nat). intros _. +specialize (@trans_equal _ a b c). intros _. +specialize (trans_equal (x:=a)). intros _. +specialize (trans_equal (x:=a)(y:=b)). intros _. +specialize (trans_equal H H0). intros _. +specialize (trans_equal H0 (z:=b)). intros _. + +(* local "in place" specialization *) +assert (Eq:=trans_equal). + +specialize Eq. +specialize Eq with (1:=H)(2:=H0). Undo. +specialize Eq with (x:=a)(y:=b)(z:=c). Undo. +specialize Eq with (1:=H)(z:=c). Undo. +specialize Eq with nat a b c. Undo. +specialize (Eq nat). Undo. +specialize (Eq _ a b c). Undo. +(* no implicit argument for Eq, hence no (Eq (x:=a)) *) +specialize (Eq _ _ _ _ H H0). Undo. +specialize (Eq _ _ _ b H0). Undo. + +(* +(** strange behavior to inspect more precisely *) + +(* 1) proof aspect : let H:= ... in (fun H => ..) H + presque ok... *) + +(* 2) echoue moins lorsque zero premise de mangé *) +specialize trans_equal with (1:=Eq). (* mal typé !! *) + +(* 3) *) +specialize trans_equal with _ a b c. intros _. +(* Anomaly: Evar ?88 was not declared. Please report. *) +*) + +Abort. \ No newline at end of file diff --git a/test-suite/success/unification.v b/test-suite/success/unification.v index 68869621..91ee18ea 100644 --- a/test-suite/success/unification.v +++ b/test-suite/success/unification.v @@ -15,6 +15,12 @@ Proof. intros; apply (H _ H0). Qed. +Lemma l3 : (forall P, ~(exists x:nat, P x)) + -> forall P:nat->Prop, ~(exists x:nat, P x -> P x). +Proof. +intros; apply H. +Qed. + (* Example submitted for Zenon *) @@ -56,10 +62,67 @@ Require Import Arith. Parameter x y : nat. Parameter G:x=y->x=y->Prop. Parameter K:x<>y->x<>y->Prop. -Lemma l3 : (forall f:x=y->Prop, forall g:x<>y->Prop, +Lemma l4 : (forall f:x=y->Prop, forall g:x<>y->Prop, match eq_nat_dec x y with left a => f a | right a => g a end) -> match eq_nat_dec x y with left a => G a a | right a => K a a end. Proof. intros. apply H. Qed. + + +(* Test unification modulo eta-expansion (if possible) *) + +(* In this example, two instances for ?P (argument of hypothesis H) can be + inferred (one is by unifying the type [Q true] and [?P true] of the + goal and type of [H]; the other is by unifying the argument of [f]); + we need to unify both instances up to allowed eta-expansions of the + instances (eta is allowed if the meta was applied to arguments) + + This used to fail before revision 9389 in trunk +*) + +Lemma l5 : + forall f : (forall P, P true), (forall P, f P = f P) -> + forall Q, f (fun x => Q x) = f (fun x => Q x). +Proof. +intros. +apply H. +Qed. + +(* Test instanciation of evars by unification *) + +Goal (forall x, 0 * x = 0 -> True) -> True. +intros; eapply H. +rewrite <- plus_n_Sm. (* should refine ?x with S ?x' *) +Abort. + +(* Check handling of identity equation between evars *) +(* The example failed to pass until revision 10623 *) + +Lemma l6 : + (forall y, (forall x, (forall z, y = 0 -> y + z = 0) -> y + x = 0) -> True) + -> True. +intros. +eapply H. +intros. +apply H0. (* Check that equation ?n[H] = ?n[H] is correctly considered true *) +reflexivity. +Qed. + +(* Check treatment of metas erased by K-redexes at the time of turning + them to evas *) + +Inductive nonemptyT (t : Type) : Prop := nonemptyT_intro : t -> nonemptyT t. +Goal True. +try case nonemptyT_intro. (* check that it fails w/o anomaly *) +Abort. + +(* Test handling of return type and when it is decided to make the + predicate dependent or not - see "bug" #1851 *) + +Goal forall X (a:X) (f':nat -> X), (exists f : nat -> X, True). +intros. +exists (fun n => match n with O => a | S n' => f' n' end). +constructor. +Qed. diff --git a/test-suite/success/univers.v b/test-suite/success/univers.v index 87edc4de..3c2c0883 100644 --- a/test-suite/success/univers.v +++ b/test-suite/success/univers.v @@ -56,3 +56,7 @@ intro. set (C := forall m, Q m -> Q m). exact I. Qed. + +(* Submitted by Danko Ilik (bug report #1507); related to LetIn *) + +Record U : Type := { A:=Type; a:A }. diff --git a/test-suite/typeclasses/NewSetoid.v b/test-suite/typeclasses/NewSetoid.v new file mode 100644 index 00000000..8ad03880 --- /dev/null +++ b/test-suite/typeclasses/NewSetoid.v @@ -0,0 +1,74 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* ((not True -> True)) \/ True. + intros. + clrewrite H. + clrewrite <- H. + right ; auto. +Defined. + +Definition reduced_thm := Eval compute in Unnamed_thm. + +(* Print reduced_thm. *) + +Lemma foo [ Setoid a R ] : True. (* forall x y, R x y -> x -> y. *) +Proof. + intros. + Print respect2. + pose setoid_morphism. + pose (respect2 (b0:=b)). + simpl in b0. + unfold binary_respectful in b0. + pose (arrow_morphism R). + pose (respect2 (b0:=b1)). + unfold binary_respectful in b2. + + pose (eq_morphism (A:=a)). + pose (respect2 (b0:=b3)). + unfold binary_respectful in b4. + exact I. +Qed. + +Goal forall A B C (H : A <-> B) (H' : B <-> C), A /\ B <-> B /\ C. + intros. + Set Printing All. + Print iff_morphism. + clrewrite H. + clrewrite H'. + reflexivity. +Defined. + +Goal forall A B C (H : A <-> B) (H' : B <-> C), A /\ B <-> B /\ C. + intros. + rewrite H. + rewrite H'. + reflexivity. +Defined. + +Require Import Setoid_tac. +Require Import Setoid_Prop. + +(* Print Unnamed_thm0. *) +(* Print Unnamed_thm1. *) + + diff --git a/test-suite/typeclasses/clrewrite.v b/test-suite/typeclasses/clrewrite.v new file mode 100644 index 00000000..2978fda2 --- /dev/null +++ b/test-suite/typeclasses/clrewrite.v @@ -0,0 +1,111 @@ + +Set Implicit Arguments. +Unset Strict Implicit. + +Require Import Coq.Classes.Equivalence. + +Section Equiv. + Context [ Equivalence A eqA ]. + + Variables x y z w : A. + + Goal eqA x y -> eqA y x. + intros H ; clrewrite H. + refl. + Qed. + + Tactic Notation "simpl" "*" := auto || relation_tac. + + Goal eqA x y -> eqA y x /\ True. + intros H ; clrewrite H. + split ; simpl*. + Qed. + + Goal eqA x y -> eqA y x /\ eqA x x. + intros H ; clrewrite H. + split ; simpl*. + Qed. + + Goal eqA x y -> eqA y z -> eqA x y. + intros H. + clrewrite H. + intro. refl. + Qed. + + Goal eqA x y -> eqA z y -> eqA x y. + intros H. + clrewrite <- H at 2. + clrewrite <- H at 1. + intro. refl. + Qed. + + Opaque complement. + + Print iff_inverse_impl_binary_morphism. + + Goal eqA x y -> eqA x y -> eqA x y. + intros H. + clrewrite H. + intro. refl. + Qed. + + Goal eqA x y -> eqA x y -> eqA x y. + intros H. + clrewrite <- H. + refl. + Qed. + + Goal eqA x y -> True /\ True /\ False /\ eqA x x -> True /\ True /\ False /\ eqA x y. + Proof. + intros. + clrewrite <- H. + apply H0. + Qed. + +End Equiv. + +Section Trans. + Context [ Transitive A R ]. + + Variables x y z w : A. + + Tactic Notation "simpl" "*" := auto || relation_tac. + +(* Typeclasses eauto := debug. *) + + Goal R x y -> R y x -> R y y -> R x x. + Proof with auto. + intros H H' H''. + + clrewrite <- H' at 2. + clrewrite H at 1... + Qed. + + Goal R x y -> R y z -> R x z. + intros H. + clrewrite H. + refl. + Qed. + + Goal R x y -> R z y -> R x y. + intros H. + clrewrite <- H at 2. + intro. + clrewrite H at 1. + Abort. + + Goal R x y -> True /\ R y z -> True /\ R x z. + Proof. + intros. + clrewrite H. + apply H0. + Qed. + + Goal R x y -> True /\ True /\ False /\ R y z -> True /\ True /\ False /\ R x z. + Proof. + intros. + clrewrite H. + apply H0. + Qed. + +End Trans. diff --git a/test-suite/typeclasses/unification_delta.v b/test-suite/typeclasses/unification_delta.v new file mode 100644 index 00000000..663a837f --- /dev/null +++ b/test-suite/typeclasses/unification_delta.v @@ -0,0 +1,46 @@ +Require Import Coq.Classes.Equivalence. +Require Import Coq.Program.Program. + +Ltac obligations_tactic ::= program_simpl ; simpl_relation. + +Lemma bla : forall [ ! Equivalence A (eqA : relation A) ] x y, eqA x y -> eqA y x. +Proof. + intros. + rewrite H0. + reflexivity. +Defined. + +Lemma bla' : forall [ ! Equivalence A (eqA : relation A) ] x y, eqA x y -> eqA y x. +Proof. + intros. + (* Need delta on [relation] to unify with the right lemmas. *) + rewrite <- H0. + reflexivity. +Qed. + +Axiom euclid : nat -> { x : nat | x > 0 } -> nat. + +Definition eq_proj {A} {s : A -> Prop} : relation (sig s) := + fun x y => `x = `y. + +Program Instance {A : Type} {s : A -> Prop} => Equivalence (sig s) eq_proj. + + Next Obligation. + Proof. + constructor ; red ; intros. + reflexivity. + Qed. + + Admit Obligations. + +Instance Morphism (eq ==> eq_proj ==> eq) euclid. +Proof. +Admitted. + +Goal forall (x : nat) (y : nat | y > 0) (z : nat | z > 0), eq_proj y z -> euclid x y = euclid x z. +Proof. + intros. + (* Breaks if too much delta in unification *) + rewrite H. + reflexivity. +Qed. \ No newline at end of file diff --git a/theories/Arith/Arith_base.v b/theories/Arith/Arith_base.v index b076de2a..fbdf2a41 100644 --- a/theories/Arith/Arith_base.v +++ b/theories/Arith/Arith_base.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id$ i*) +(*i $Id: Arith_base.v 11072 2008-06-08 16:13:37Z herbelin $ i*) Require Export Le. Require Export Lt. @@ -18,3 +18,5 @@ Require Export Between. Require Export Peano_dec. Require Export Compare_dec. Require Export Factorial. +Require Export EqNat. +Require Export Wf_nat. diff --git a/theories/Arith/Compare_dec.v b/theories/Arith/Compare_dec.v index b431fd05..e6cb5be4 100644 --- a/theories/Arith/Compare_dec.v +++ b/theories/Arith/Compare_dec.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Compare_dec.v 9941 2007-07-05 12:42:35Z letouzey $ i*) +(*i $Id: Compare_dec.v 10295 2007-11-06 22:46:21Z letouzey $ i*) Require Import Le. Require Import Lt. @@ -170,7 +170,7 @@ Proof. exact (lt_irrefl n). intros. apply not_gt. - swap H. + contradict H. destruct (nat_compare_gt n m); auto. Qed. @@ -184,7 +184,7 @@ Proof. exact (lt_irrefl m). intros. apply not_lt. - swap H. + contradict H. destruct (nat_compare_lt n m); auto. Qed. diff --git a/theories/Arith/Div.v b/theories/Arith/Div.v deleted file mode 100644 index 1dec34e2..00000000 --- a/theories/Arith/Div.v +++ /dev/null @@ -1,64 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* bool := - [m:nat] Cases n m of - O _ => true - | (S n') O => false - | (S n') (S m') => (inf_dec n' m') - end. - -Theorem div1 : (b:nat)(gt b O)->(a:nat)(diveucl a b). - Realizer Fix div1 {div1/2: nat->nat->diveucl := - [b,a]Cases a of - O => (O,O) - | (S n) => - let (q,r) = (div1 b n) in - if (le_gt_dec b (S r)) then ((S q),O) - else (q,(S r)) - end}. - Program_all. - Rewrite e. - Replace b with (S r). - Simpl. - Elim plus_n_O; Auto with arith. - Apply le_antisym; Auto with arith. - Elim plus_n_Sm; Auto with arith. -Qed. - -Theorem div2 : (b:nat)(gt b O)->(a:nat)(diveucl a b). - Realizer Fix div1 {div1/2: nat->nat->diveucl := - [b,a]Cases a of - O => (O,O) - | (S n) => - let (q,r) = (div1 b n) in - if (inf_dec b (S r)) :: :: { {(le b (S r))}+{(gt b (S r))} } - then ((S q),O) - else (q,(S r)) - end}. - Program_all. - Rewrite e. - Replace b with (S r). - Simpl. - Elim plus_n_O; Auto with arith. - Apply le_antisym; Auto with arith. - Elim plus_n_Sm; Auto with arith. -Qed. diff --git a/theories/Arith/Div2.v b/theories/Arith/Div2.v index c32759b2..1216a545 100644 --- a/theories/Arith/Div2.v +++ b/theories/Arith/Div2.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Div2.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Div2.v 10625 2008-03-06 11:21:01Z notin $ i*) Require Import Lt. Require Import Plus. @@ -169,12 +169,12 @@ Hint Resolve even_double double_even odd_double double_odd: arith. Lemma even_2n : forall n, even n -> {p : nat | n = double p}. Proof. intros n H. exists (div2 n). auto with arith. -Qed. +Defined. Lemma odd_S2n : forall n, odd n -> {p : nat | n = S (double p)}. Proof. intros n H. exists (div2 n). auto with arith. -Qed. +Defined. (** Doubling before dividing by two brings back to the initial number. *) diff --git a/theories/Arith/EqNat.v b/theories/Arith/EqNat.v index 82d05e2c..a9244455 100644 --- a/theories/Arith/EqNat.v +++ b/theories/Arith/EqNat.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: EqNat.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: EqNat.v 9966 2007-07-10 23:54:53Z letouzey $ i*) (** Equality on natural numbers *) @@ -89,3 +89,13 @@ Proof. intros n H1 H2. discriminate H2. intros n H1 z H2 H3. case (H2 _ H3). reflexivity. Defined. + +Lemma beq_nat_true : forall x y, beq_nat x y = true -> x=y. +Proof. + induction x; destruct y; simpl; auto; intros; discriminate. +Qed. + +Lemma beq_nat_false : forall x y, beq_nat x y = false -> x<>y. +Proof. + induction x; destruct y; simpl; auto; intros; discriminate. +Qed. diff --git a/theories/Arith/Even.v b/theories/Arith/Even.v index 83c0ce17..1484666b 100644 --- a/theories/Arith/Even.v +++ b/theories/Arith/Even.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Even.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Even.v 10410 2007-12-31 13:11:55Z msozeau $ i*) (** Here we define the predicates [even] and [odd] by mutual induction and we prove the decidability and the exclusion of those predicates. @@ -40,7 +40,7 @@ Proof. induction n. auto with arith. elim IHn; auto with arith. -Qed. +Defined. Lemma not_even_and_odd : forall n, even n -> odd n -> False. Proof. diff --git a/theories/Arith/Max.v b/theories/Arith/Max.v index e0222e41..95af67f8 100644 --- a/theories/Arith/Max.v +++ b/theories/Arith/Max.v @@ -6,9 +6,9 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Max.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Max.v 9883 2007-06-07 18:44:59Z letouzey $ i*) -Require Import Arith. +Require Import Le. Open Local Scope nat_scope. @@ -30,6 +30,13 @@ Proof. auto with arith. Qed. +Theorem max_assoc : forall m n p : nat, max m (max n p) = max (max m n) p. +Proof. + induction m; destruct n; destruct p; trivial. + simpl. + auto using IHm. +Qed. + Lemma max_comm : forall n m, max n m = max m n. Proof. induction n; induction m; simpl in |- *; auto with arith. diff --git a/theories/Arith/Min.v b/theories/Arith/Min.v index db14e74b..aa009963 100644 --- a/theories/Arith/Min.v +++ b/theories/Arith/Min.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Min.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Min.v 9660 2007-02-19 11:36:30Z notin $ i*) Require Import Le. @@ -25,11 +25,28 @@ Fixpoint min n m {struct n} : nat := (** * Simplifications of [min] *) +Lemma min_0_l : forall n : nat, min 0 n = 0. +Proof. + trivial. +Qed. + +Lemma min_0_r : forall n : nat, min n 0 = 0. +Proof. + destruct n; trivial. +Qed. + Lemma min_SS : forall n m, S (min n m) = min (S n) (S m). Proof. auto with arith. Qed. +Lemma min_assoc : forall m n p : nat, min m (min n p) = min (min m n) p. +Proof. + induction m; destruct n; destruct p; trivial. + simpl. + auto using (IHm n p). +Qed. + Lemma min_comm : forall n m, min n m = min m n. Proof. induction n; induction m; simpl in |- *; auto with arith. diff --git a/theories/Arith/Minus.v b/theories/Arith/Minus.v index 2380c2de..b961886d 100644 --- a/theories/Arith/Minus.v +++ b/theories/Arith/Minus.v @@ -6,13 +6,13 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Minus.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Minus.v 11072 2008-06-08 16:13:37Z herbelin $ i*) (** [minus] (difference between two natural numbers) is defined in [Init/Peano.v] as: << Fixpoint minus (n m:nat) {struct n} : nat := match n, m with - | O, _ => 0 + | O, _ => n | S k, O => S k | S k, S l => k - l end @@ -51,11 +51,18 @@ Qed. (** * Diagonal *) -Lemma minus_n_n : forall n, 0 = n - n. +Lemma minus_diag : forall n, n - n = 0. Proof. induction n; simpl in |- *; auto with arith. Qed. -Hint Resolve minus_n_n: arith v62. + +Lemma minus_diag_reverse : forall n, 0 = n - n. +Proof. + auto using minus_diag. +Qed. +Hint Resolve minus_diag_reverse: arith v62. + +Notation minus_n_n := minus_diag_reverse. (** * Simplification *) @@ -97,23 +104,39 @@ Hint Resolve le_plus_minus_r: arith v62. (** * Relation with order *) -Theorem le_minus : forall n m, n - m <= n. +Theorem minus_le_compat_r : forall n m p : nat, n <= m -> n - p <= m - p. Proof. - intros i h; pattern i, h in |- *; apply nat_double_ind; - [ auto - | auto - | intros m n H; simpl in |- *; apply le_trans with (m := m); auto ]. + intros n m p; generalize n m; clear n m; induction p as [|p HI]. + intros n m; rewrite <- (minus_n_O n); rewrite <- (minus_n_O m); trivial. + + intros n m Hnm; apply le_elim_rel with (n:=n) (m:=m); auto with arith. + intros q r H _. simpl. auto using HI. +Qed. + +Theorem minus_le_compat_l : forall n m p : nat, n <= m -> p - m <= p - n. +Proof. + intros n m p; generalize n m; clear n m; induction p as [|p HI]. + trivial. + + intros n m Hnm; apply le_elim_rel with (n:=n) (m:=m); trivial. + intros q; destruct q; auto with arith. + simpl. + apply le_trans with (m := p - 0); [apply HI | rewrite <- minus_n_O]; + auto with arith. + + intros q r Hqr _. simpl. auto using HI. +Qed. + +Corollary le_minus : forall n m, n - m <= n. +Proof. + intros n m; rewrite minus_n_O; auto using minus_le_compat_l with arith. Qed. Lemma lt_minus : forall n m, m <= n -> 0 < m -> n - m < n. Proof. intros n m Le; pattern m, n in |- *; apply le_elim_rel; simpl in |- *; - auto with arith. - intros; absurd (0 < 0); auto with arith. - intros p q lepq Hp gtp. - elim (le_lt_or_eq 0 p); auto with arith. - auto with arith. - induction 1; elim minus_n_O; auto with arith. + auto using le_minus with arith. + intros; absurd (0 < 0); auto with arith. Qed. Hint Resolve lt_minus: arith v62. diff --git a/theories/Arith/Mult.v b/theories/Arith/Mult.v index 2315e12c..a43579f9 100644 --- a/theories/Arith/Mult.v +++ b/theories/Arith/Mult.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Mult.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Mult.v 11015 2008-05-28 20:06:42Z herbelin $ i*) Require Export Plus. Require Export Minus. @@ -104,6 +104,43 @@ Proof. Qed. Hint Resolve mult_assoc: arith v62. +(** ** Inversion lemmas *) + +Lemma mult_is_O : forall n m, n * m = 0 -> n = 0 \/ m = 0. +Proof. + destruct n as [| n]. + intros; left; trivial. + + simpl; intros m H; right. + assert (H':m = 0 /\ n * m = 0) by apply (plus_is_O _ _ H). + destruct H'; trivial. +Qed. + +Lemma mult_is_one : forall n m, n * m = 1 -> n = 1 /\ m = 1. +Proof. + destruct n as [|n]. + simpl; intros m H; elim (O_S _ H). + + simpl; intros m H. + destruct (plus_is_one _ _ H) as [[Hm Hnm] | [Hm Hnm]]. + rewrite Hm in H; simpl in H; rewrite mult_0_r in H; elim (O_S _ H). + rewrite Hm in Hnm; rewrite mult_1_r in Hnm; auto. +Qed. + +(** ** Multiplication and successor *) + +Lemma mult_succ_l : forall n m:nat, S n * m = n * m + m. +Proof. + intros; simpl. rewrite plus_comm. reflexivity. +Qed. + +Lemma mult_succ_r : forall n m:nat, n * S m = n * m + n. +Proof. + induction n as [| p H]; intro m; simpl. + reflexivity. + rewrite H, <- plus_n_Sm; apply f_equal; rewrite plus_assoc; reflexivity. +Qed. + (** * Compatibility with orders *) Lemma mult_O_le : forall n m, m = 0 \/ n <= m * n. @@ -223,4 +260,4 @@ Qed. Ltac tail_simpl := repeat rewrite <- plus_tail_plus; repeat rewrite <- mult_tail_mult; - simpl in |- *. \ No newline at end of file + simpl in |- *. diff --git a/theories/Arith/Peano_dec.v b/theories/Arith/Peano_dec.v index 9ae80d79..cc970ae4 100644 --- a/theories/Arith/Peano_dec.v +++ b/theories/Arith/Peano_dec.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Peano_dec.v 9941 2007-07-05 12:42:35Z letouzey $ i*) +(*i $Id: Peano_dec.v 9698 2007-03-12 17:11:32Z letouzey $ i*) Require Import Decidable. diff --git a/theories/Arith/Plus.v b/theories/Arith/Plus.v index 74d0dc93..6d510447 100644 --- a/theories/Arith/Plus.v +++ b/theories/Arith/Plus.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Plus.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Plus.v 9750 2007-04-06 00:58:14Z letouzey $ i*) (** Properties of addition. [add] is defined in [Init/Peano.v] as: << @@ -198,16 +198,14 @@ Qed. tail-recursive, whereas [plus] is not. This can be useful when extracting programs. *) -Fixpoint plus_acc q n {struct n} : nat := +Fixpoint tail_plus n m {struct n} : nat := match n with - | O => q - | S p => plus_acc (S q) p + | O => m + | S n => tail_plus n (S m) end. -Definition tail_plus n m := plus_acc m n. - Lemma plus_tail_plus : forall n m, n + m = tail_plus n m. -unfold tail_plus in |- *; induction n as [| n IHn]; simpl in |- *; auto. +induction n as [| n IHn]; simpl in |- *; auto. intro m; rewrite <- IHn; simpl in |- *; auto. Qed. diff --git a/theories/Arith/Wf_nat.v b/theories/Arith/Wf_nat.v index 11fcd161..6ad640eb 100644 --- a/theories/Arith/Wf_nat.v +++ b/theories/Arith/Wf_nat.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Wf_nat.v 9341 2006-11-06 13:08:10Z notin $ i*) +(*i $Id: Wf_nat.v 11072 2008-06-08 16:13:37Z herbelin $ i*) (** Well-founded relations and natural numbers *) @@ -50,10 +50,12 @@ Defined. the ML-like program for [induction_ltof1] is : [[ - let induction_ltof1 F a = indrec ((f a)+1) a - where rec indrec = - function 0 -> (function a -> error) - |(S m) -> (function a -> (F a (function y -> indrec y m)));; +let induction_ltof1 f F a = + let rec indrec n k = + match n with + | O -> error + | S m -> F k (indrec m) + in indrec (f a + 1) a ]] the ML-like program for [induction_ltof2] is : @@ -210,3 +212,67 @@ Lemma well_founded_inv_rel_inv_lt_rel : forall (A:Set) (F:A -> nat -> Prop), well_founded (inv_lt_rel A F). intros; apply (well_founded_inv_lt_rel_compat A (inv_lt_rel A F) F); trivial. Qed. + +(** A constructive proof that any non empty decidable subset of + natural numbers has a least element *) + +Set Implicit Arguments. + +Require Import Le. +Require Import Compare_dec. +Require Import Decidable. + +Definition has_unique_least_element (A:Type) (R:A->A->Prop) (P:A->Prop) := + exists! x, P x /\ forall x', P x' -> R x x'. + +Lemma dec_inh_nat_subset_has_unique_least_element : + forall P:nat->Prop, (forall n, P n \/ ~ P n) -> + (exists n, P n) -> has_unique_least_element le P. +Proof. + intros P Pdec (n0,HPn0). + assert + (forall n, (exists n', n' n'<=n'') + \/(forall n', P n' -> n<=n')). + induction n. + right. + intros n' Hn'. + apply le_O_n. + destruct IHn. + left; destruct H as (n', (Hlt', HPn')). + exists n'; split. + apply lt_S; assumption. + assumption. + destruct (Pdec n). + left; exists n; split. + apply lt_n_Sn. + split; assumption. + right. + intros n' Hltn'. + destruct (le_lt_eq_dec n n') as [Hltn|Heqn]. + apply H; assumption. + assumption. + destruct H0. + rewrite Heqn; assumption. + destruct (H n0) as [(n,(Hltn,(Hmin,Huniqn)))|]; [exists n | exists n0]; + repeat split; + assumption || intros n' (HPn',Hminn'); apply le_antisym; auto. +Qed. + +Unset Implicit Arguments. + +(** [n]th iteration of the function [f] *) + +Fixpoint iter_nat (n:nat) (A:Type) (f:A -> A) (x:A) {struct n} : A := + match n with + | O => x + | S n' => f (iter_nat n' A f x) + end. + +Theorem iter_nat_plus : + forall (n m:nat) (A:Type) (f:A -> A) (x:A), + iter_nat (n + m) A f x = iter_nat n A f (iter_nat m A f x). +Proof. + simple induction n; + [ simpl in |- *; auto with arith + | intros; simpl in |- *; apply f_equal with (f := f); apply H ]. +Qed. diff --git a/theories/Bool/Bool.v b/theories/Bool/Bool.v index e126ad35..47b9fc83 100644 --- a/theories/Bool/Bool.v +++ b/theories/Bool/Bool.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Bool.v 9246 2006-10-17 14:01:18Z herbelin $ i*) +(*i $Id: Bool.v 10812 2008-04-17 16:42:37Z letouzey $ i*) (** The type [bool] is defined in the prelude as [Inductive bool : Set := true : bool | false : bool] *) @@ -126,9 +126,8 @@ Proof. destruct a; destruct b; simpl in |- *; intro; discriminate H || reflexivity. Qed. - (************************) -(** * Logical combinators *) +(** * A synonym of [if] on [bool] *) (************************) Definition ifb (b1 b2 b3:bool) : bool := @@ -137,31 +136,8 @@ Definition ifb (b1 b2 b3:bool) : bool := | false => b3 end. -Definition andb (b1 b2:bool) : bool := ifb b1 b2 false. - -Definition orb (b1 b2:bool) : bool := ifb b1 true b2. - -Definition implb (b1 b2:bool) : bool := ifb b1 b2 true. - -Definition xorb (b1 b2:bool) : bool := - match b1, b2 with - | true, true => false - | true, false => true - | false, true => true - | false, false => false - end. - -Definition negb (b:bool) := if b then false else true. - -Infix "||" := orb (at level 50, left associativity) : bool_scope. -Infix "&&" := andb (at level 40, left associativity) : bool_scope. - Open Scope bool_scope. -Delimit Scope bool_scope with bool. - -Bind Scope bool_scope with bool. - (****************************) (** * De Morgan laws *) (****************************) @@ -220,7 +196,7 @@ Qed. Lemma if_negb : - forall (A:Set) (b:bool) (x y:A), + forall (A:Type) (b:bool) (x y:A), (if negb b then x else y) = (if b then y else x). Proof. destruct b; trivial. @@ -332,12 +308,11 @@ Hint Resolve orb_comm orb_assoc: bool v62. (** * Properties of [andb] *) (*******************************) -Lemma andb_prop : forall a b:bool, a && b = true -> a = true /\ b = true. +Lemma andb_true_iff : + forall b1 b2:bool, b1 && b2 = true <-> b1 = true /\ b2 = true. Proof. - destruct a; destruct b; simpl in |- *; try (intro H; discriminate H); - auto with bool. + destruct b1; destruct b2; intuition. Qed. -Hint Resolve andb_prop: bool v62. Lemma andb_true_eq : forall a b:bool, true = a && b -> true = a /\ true = b. @@ -345,13 +320,6 @@ Proof. destruct a; destruct b; auto. Defined. -Lemma andb_true_intro : - forall b1 b2:bool, b1 = true /\ b2 = true -> b1 && b2 = true. -Proof. - destruct b1; destruct b2; simpl in |- *; tauto || auto with bool. -Qed. -Hint Resolve andb_true_intro: bool v62. - Lemma andb_false_intro1 : forall b1 b2:bool, b1 = false -> b1 && b2 = false. Proof. destruct b1; destruct b2; simpl in |- *; tauto || auto with bool. @@ -715,3 +683,43 @@ Lemma negb_prop_involutive : forall b, Is_true b -> ~ Is_true (negb b). Proof. destruct b; intuition. Qed. + +(** Rewrite rules about andb, orb and if (used in romega) *) + +Lemma andb_if : forall (A:Type)(a a':A)(b b' : bool), + (if b && b' then a else a') = + (if b then if b' then a else a' else a'). +Proof. + destruct b; destruct b'; auto. +Qed. + +Lemma negb_if : forall (A:Type)(a a':A)(b:bool), + (if negb b then a else a') = + (if b then a' else a). +Proof. + destruct b; auto. +Qed. + +(*****************************************) +(** * Alternative versions of [andb] and [orb] + with lazy behavior (for vm_compute) *) +(*****************************************) + +Notation "a &&& b" := (if a then b else false) + (at level 40, left associativity) : lazy_bool_scope. +Notation "a ||| b" := (if a then true else b) + (at level 50, left associativity) : lazy_bool_scope. + +Open Local Scope lazy_bool_scope. + +Lemma andb_lazy_alt : forall a b : bool, a && b = a &&& b. +Proof. + unfold andb; auto. +Qed. + +Lemma orb_lazy_alt : forall a b : bool, a || b = a ||| b. +Proof. + unfold orb; auto. +Qed. + + diff --git a/theories/Bool/Bvector.v b/theories/Bool/Bvector.v index 659630c5..0e8ea33c 100644 --- a/theories/Bool/Bvector.v +++ b/theories/Bool/Bvector.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Bvector.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Bvector.v 11004 2008-05-28 09:09:12Z herbelin $ i*) (** Bit vectors. Contribution by Jean Duprat (ENS Lyon). *) @@ -25,10 +25,10 @@ Malheureusement, cette verification a posteriori amene a faire de nombreux lemmes pour gerer les longueurs. La seconde idée est de faire un type dépendant dans lequel la longueur est un paramètre de construction. Cela complique un -peu les inductions structurelles, la solution qui a ma préférence -est alors d'utiliser un terme de preuve comme définition, car le -mécanisme d'inférence du type du filtrage n'est pas aussi puissant que -celui implanté par les tactiques d'élimination. +peu les inductions structurelles et dans certains cas on +utilisera un terme de preuve comme définition, car le +mécanisme d'inférence du type du filtrage n'est pas toujours +aussi puissant que celui implanté par les tactiques d'élimination. *) Section VECTORS. @@ -52,39 +52,39 @@ Inductive vector : nat -> Type := | Vnil : vector 0 | Vcons : forall (a:A) (n:nat), vector n -> vector (S n). -Definition Vhead : forall n:nat, vector (S n) -> A. -Proof. - intros n v; inversion v; exact a. -Defined. +Definition Vhead (n:nat) (v:vector (S n)) := + match v with + | Vcons a _ _ => a + end. -Definition Vtail : forall n:nat, vector (S n) -> vector n. -Proof. - intros n v; inversion v as [|_ n0 H0 H1]; exact H0. -Defined. +Definition Vtail (n:nat) (v:vector (S n)) := + match v with + | Vcons _ _ v => v + end. Definition Vlast : forall n:nat, vector (S n) -> A. Proof. induction n as [| n f]; intro v. inversion v. exact a. - + inversion v as [| n0 a H0 H1]. exact (f H0). Defined. -Definition Vconst : forall (a:A) (n:nat), vector n. -Proof. - induction n as [| n v]. - exact Vnil. +Fixpoint Vconst (a:A) (n:nat) := + match n return vector n with + | O => Vnil + | S n => Vcons a _ (Vconst a n) + end. - exact (Vcons a n v). -Defined. +(** Shifting and truncating *) Lemma Vshiftout : forall n:nat, vector (S n) -> vector n. Proof. induction n as [| n f]; intro v. exact Vnil. - + inversion v as [| a n0 H0 H1]. exact (Vcons a n (f H0)). Defined. @@ -123,25 +123,23 @@ Proof. auto with *. Defined. -Lemma Vextend : forall n p:nat, vector n -> vector p -> vector (n + p). -Proof. - induction n as [| n f]; intros p v v0. - simpl in |- *; exact v0. - - inversion v as [| a n0 H0 H1]. - simpl in |- *; exact (Vcons a (n + p) (f p H0 v0)). -Defined. +(** Concatenation of two vectors *) + +Fixpoint Vextend n p (v:vector n) (w:vector p) : vector (n+p) := + match v with + | Vnil => w + | Vcons a n' v' => Vcons a (n'+p) (Vextend n' p v' w) + end. + +(** Uniform application on the arguments of the vector *) Variable f : A -> A. -Lemma Vunary : forall n:nat, vector n -> vector n. -Proof. - induction n as [| n g]; intro v. - exact Vnil. - - inversion v as [| a n0 H0 H1]. - exact (Vcons (f a) n (g H0)). -Defined. +Fixpoint Vunary n (v:vector n) : vector n := + match v with + | Vnil => Vnil + | Vcons a n' v' => Vcons (f a) n' (Vunary n' v') + end. Variable g : A -> A -> A. @@ -154,14 +152,15 @@ Proof. exact (Vcons (g a a0) n (h H0 H2)). Defined. -Definition Vid : forall n:nat, vector n -> vector n. -Proof. - destruct n; intro X. - exact Vnil. - exact (Vcons (Vhead _ X) _ (Vtail _ X)). -Defined. +(** Eta-expansion of a vector *) + +Definition Vid n : vector n -> vector n := + match n with + | O => fun _ => Vnil + | _ => fun v => Vcons (Vhead _ v) _ (Vtail _ v) + end. -Lemma Vid_eq : forall (n:nat) (v:vector n), v=(Vid n v). +Lemma Vid_eq : forall (n:nat) (v:vector n), v = Vid n v. Proof. destruct v; auto. Qed. diff --git a/theories/Classes/EquivDec.v b/theories/Classes/EquivDec.v new file mode 100644 index 00000000..debe953a --- /dev/null +++ b/theories/Classes/EquivDec.v @@ -0,0 +1,158 @@ +(* -*- coq-prog-args: ("-emacs-U" "-nois") -*- *) +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* DecidableEquivalence := + setoid_decidable : forall x y : A, decidable (x === y). + +(** The [EqDec] class gives a decision procedure for a particular setoid equality. *) + +Class [ equiv : Equivalence A ] => EqDec := + equiv_dec : forall x y : A, { x === y } + { x =/= y }. + +(** We define the [==] overloaded notation for deciding equality. It does not take precedence + of [==] defined in the type scope, hence we can have both at the same time. *) + +Notation " x == y " := (equiv_dec (x :>) (y :>)) (no associativity, at level 70). + +Definition swap_sumbool {A B} (x : { A } + { B }) : { B } + { A } := + match x with + | left H => @right _ _ H + | right H => @left _ _ H + end. + +Require Import Coq.Program.Program. + +Open Local Scope program_scope. + +(** Invert the branches. *) + +Program Definition nequiv_dec [ EqDec A ] (x y : A) : { x =/= y } + { x === y } := swap_sumbool (x == y). + +(** Overloaded notation for inequality. *) + +Infix "=/=" := nequiv_dec (no associativity, at level 70). + +(** Define boolean versions, losing the logical information. *) + +Definition equiv_decb [ EqDec A ] (x y : A) : bool := + if x == y then true else false. + +Definition nequiv_decb [ EqDec A ] (x y : A) : bool := + negb (equiv_decb x y). + +Infix "==b" := equiv_decb (no associativity, at level 70). +Infix "<>b" := nequiv_decb (no associativity, at level 70). + +(** Decidable leibniz equality instances. *) + +Require Import Coq.Arith.Peano_dec. + +(** The equiv is burried inside the setoid, but we can recover it by specifying which setoid we're talking about. *) + +Program Instance nat_eq_eqdec : ! EqDec nat eq := + equiv_dec := eq_nat_dec. + +Require Import Coq.Bool.Bool. + +Program Instance bool_eqdec : ! EqDec bool eq := + equiv_dec := bool_dec. + +Program Instance unit_eqdec : ! EqDec unit eq := + equiv_dec x y := in_left. + + Next Obligation. + Proof. + destruct x ; destruct y. + reflexivity. + Qed. + +Program Instance prod_eqdec [ EqDec A eq, EqDec B eq ] : + ! EqDec (prod A B) eq := + equiv_dec x y := + let '(x1, x2) := x in + let '(y1, y2) := y in + if x1 == y1 then + if x2 == y2 then in_left + else in_right + else in_right. + + Solve Obligations using unfold complement, equiv ; program_simpl. + +Program Instance sum_eqdec [ EqDec A eq, EqDec B eq ] : + ! EqDec (sum A B) eq := + equiv_dec x y := + match x, y with + | inl a, inl b => if a == b then in_left else in_right + | inr a, inr b => if a == b then in_left else in_right + | inl _, inr _ | inr _, inl _ => in_right + end. + + Solve Obligations using unfold complement, equiv ; program_simpl. + +(** Objects of function spaces with countable domains like bool have decidable equality. *) + +Require Import Coq.Program.FunctionalExtensionality. + +Program Instance bool_function_eqdec [ EqDec A eq ] : ! EqDec (bool -> A) eq := + equiv_dec f g := + if f true == g true then + if f false == g false then in_left + else in_right + else in_right. + + Solve Obligations using try red ; unfold equiv, complement ; program_simpl. + + Next Obligation. + Proof. + extensionality x. + destruct x ; auto. + Qed. + +Require Import List. + +Program Instance list_eqdec [ eqa : EqDec A eq ] : ! EqDec (list A) eq := + equiv_dec := + fix aux (x : list A) y { struct x } := + match x, y with + | nil, nil => in_left + | cons hd tl, cons hd' tl' => + if hd == hd' then + if aux tl tl' then in_left else in_right + else in_right + | _, _ => in_right + end. + + Solve Obligations using unfold equiv, complement in * ; program_simpl ; intuition (discriminate || eauto). + + Next Obligation. + Proof. clear aux. red in H0. subst. + destruct y; intuition (discriminate || eauto). + Defined. \ No newline at end of file diff --git a/theories/Classes/Equivalence.v b/theories/Classes/Equivalence.v new file mode 100644 index 00000000..70bf3483 --- /dev/null +++ b/theories/Classes/Equivalence.v @@ -0,0 +1,144 @@ +(* -*- coq-prog-args: ("-emacs-U" "-nois") -*- *) +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* substitute H ; clear H x + end. + +Ltac setoid_subst_nofail := + match goal with + | [ H : ?x === ?y |- _ ] => setoid_subst H ; setoid_subst_nofail + | _ => idtac + end. + +(** [subst*] will try its best at substituting every equality in the goal. *) + +Tactic Notation "subst" "*" := subst_no_fail ; setoid_subst_nofail. + +(** Simplify the goal w.r.t. equivalence. *) + +Ltac equiv_simplify_one := + match goal with + | [ H : ?x === ?x |- _ ] => clear H + | [ H : ?x === ?y |- _ ] => setoid_subst H + | [ |- ?x =/= ?y ] => let name:=fresh "Hneq" in intro name + | [ |- ~ ?x === ?y ] => let name:=fresh "Hneq" in intro name + end. + +Ltac equiv_simplify := repeat equiv_simplify_one. + +(** "reify" relations which are equivalences to applications of the overloaded [equiv] method + for easy recognition in tactics. *) + +Ltac equivify_tac := + match goal with + | [ s : Equivalence ?A ?R, H : ?R ?x ?y |- _ ] => change R with (@equiv A R s) in H + | [ s : Equivalence ?A ?R |- context C [ ?R ?x ?y ] ] => change (R x y) with (@equiv A R s x y) + end. + +Ltac equivify := repeat equivify_tac. + +Section Respecting. + + (** Here we build an equivalence instance for functions which relates respectful ones only, + we do not export it. *) + + Definition respecting [ Equivalence A (R : relation A), Equivalence B (R' : relation B) ] : Type := + { morph : A -> B | respectful R R' morph morph }. + + Program Instance respecting_equiv [ Equivalence A R, Equivalence B R' ] : + Equivalence respecting + (fun (f g : respecting) => forall (x y : A), R x y -> R' (proj1_sig f x) (proj1_sig g y)). + + Solve Obligations using unfold respecting in * ; simpl_relation ; program_simpl. + + Next Obligation. + Proof. + unfold respecting in *. program_simpl. red in H2,H3,H4. + transitivity (y x0) ; auto. + transitivity (y y0) ; auto. + symmetry. auto. + Qed. + +End Respecting. + +(** The default equivalence on function spaces, with higher-priority than [eq]. *) + +Program Instance pointwise_equivalence [ Equivalence A eqA ] : + Equivalence (B -> A) (pointwise_relation eqA) | 9. + + Next Obligation. + Proof. + transitivity (y x0) ; auto. + Qed. + diff --git a/theories/Classes/Functions.v b/theories/Classes/Functions.v new file mode 100644 index 00000000..49fc4f89 --- /dev/null +++ b/theories/Classes/Functions.v @@ -0,0 +1,42 @@ +(* -*- coq-prog-args: ("-emacs-U" "-nois") -*- *) +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* B) (RA ++> RB) f ] => Injective : Prop := + injective : forall x y : A, RB (f x) (f y) -> RA x y. + +Class [ m : Morphism (A -> B) (RA ++> RB) f ] => Surjective : Prop := + surjective : forall y, exists x : A, RB y (f x). + +Definition Bijective [ m : Morphism (A -> B) (RA ++> RB) (f : A -> B) ] := + Injective m /\ Surjective m. + +Class [ m : Morphism (A -> B) (eqA ++> eqB) ] => MonoMorphism := + monic :> Injective m. + +Class [ m : Morphism (A -> B) (eqA ++> eqB) ] => EpiMorphism := + epic :> Surjective m. + +Class [ m : Morphism (A -> B) (eqA ++> eqB) ] => IsoMorphism := + monomorphism :> MonoMorphism m ; epimorphism :> EpiMorphism m. + +Class [ m : Morphism (A -> A) (eqA ++> eqA), ! IsoMorphism m ] => AutoMorphism. diff --git a/theories/Classes/Init.v b/theories/Classes/Init.v new file mode 100644 index 00000000..6ba0c61e --- /dev/null +++ b/theories/Classes/Init.v @@ -0,0 +1,21 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Type) (D : B -> Type) + (R : A -> B -> Prop) + (R' : forall (x : A) (y : B), C x -> D y -> Prop) : + (forall x : A, C x) -> (forall x : B, D x) -> Prop := + fun f g => forall x y, R x y -> R' x y (f x) (g y). + +(** The non-dependent version is an instance where we forget dependencies. *) + +Definition respectful (A B : Type) + (R : relation A) (R' : relation B) : relation (A -> B) := + Eval compute in @respectful_hetero A A (fun _ => B) (fun _ => B) R (fun _ _ => R'). + +(** Notations reminiscent of the old syntax for declaring morphisms. *) + +Delimit Scope signature_scope with signature. +Arguments Scope Morphism [type_scope signature_scope]. + +Notation " R ++> R' " := (@respectful _ _ (R%signature) (R'%signature)) + (right associativity, at level 55) : signature_scope. + +Notation " R ==> R' " := (@respectful _ _ (R%signature) (R'%signature)) + (right associativity, at level 55) : signature_scope. + +Notation " R --> R' " := (@respectful _ _ (inverse (R%signature)) (R'%signature)) + (right associativity, at level 55) : signature_scope. + +Arguments Scope respectful [type_scope type_scope signature_scope signature_scope]. + +Open Local Scope signature_scope. + +(** We can build a PER on the Coq function space if we have PERs on the domain and + codomain. *) + +Program Instance respectful_per [ PER A (R : relation A), PER B (R' : relation B) ] : + PER (A -> B) (R ==> R'). + + Next Obligation. + Proof with auto. + assert(R x0 x0). + transitivity y0... symmetry... + transitivity (y x0)... + Qed. + +(** Subrelations induce a morphism on the identity, not used for morphism search yet. *) + +Lemma subrelation_id_morphism [ subrelation A Râ‚ Râ‚‚ ] : Morphism (Râ‚ ==> Râ‚‚) id. +Proof. firstorder. Qed. + +(** The subrelation property goes through products as usual. *) + +Instance morphisms_subrelation [ sub : subrelation A Râ‚ Râ‚‚ ] : + ! subrelation (B -> A) (R ==> Râ‚) (R ==> Râ‚‚). +Proof. firstorder. Qed. + +Instance morphisms_subrelation_left [ sub : subrelation A Râ‚‚ Râ‚ ] : + ! subrelation (A -> B) (Râ‚ ==> R) (Râ‚‚ ==> R) | 3. +Proof. firstorder. Qed. + +(** [Morphism] is itself a covariant morphism for [subrelation]. *) + +Lemma subrelation_morphism [ sub : subrelation A Râ‚ Râ‚‚, mor : Morphism A Râ‚ m ] : Morphism Râ‚‚ m. +Proof. + intros. apply sub. apply mor. +Qed. + +Instance morphism_subrelation_morphism : + Morphism (subrelation ++> @eq _ ==> impl) (@Morphism A). +Proof. reduce. subst. firstorder. Qed. + +(** We use an external tactic to manage the application of subrelation, which is otherwise + always applicable. We allow its use only once per branch. *) + +Inductive subrelation_done : Prop := + did_subrelation : subrelation_done. + +Ltac subrelation_tac := + match goal with + | [ _ : subrelation_done |- _ ] => fail 1 + | [ |- @Morphism _ _ _ ] => let H := fresh "H" in + set(H:=did_subrelation) ; eapply @subrelation_morphism + end. + +Hint Extern 4 (@Morphism _ _ _) => subrelation_tac : typeclass_instances. + +(** Essential subrelation instances for [iff], [impl] and [pointwise_relation]. *) + +Instance iff_impl_subrelation : subrelation iff impl. +Proof. firstorder. Qed. + +Instance iff_inverse_impl_subrelation : subrelation iff (inverse impl). +Proof. firstorder. Qed. + +Instance pointwise_subrelation [ sub : subrelation A R R' ] : + subrelation (pointwise_relation (A:=B) R) (pointwise_relation R') | 4. +Proof. reduce. unfold pointwise_relation in *. apply sub. apply H. Qed. + +(** The complement of a relation conserves its morphisms. *) + +Program Instance complement_morphism + [ mR : Morphism (A -> A -> Prop) (RA ==> RA ==> iff) R ] : + Morphism (RA ==> RA ==> iff) (complement R). + + Next Obligation. + Proof. + unfold complement. + pose (mR x y H x0 y0 H0). + intuition. + Qed. + +(** The [inverse] too, actually the [flip] instance is a bit more general. *) + +Program Instance flip_morphism + [ mor : Morphism (A -> B -> C) (RA ==> RB ==> RC) f ] : + Morphism (RB ==> RA ==> RC) (flip f). + + Next Obligation. + Proof. + apply mor ; auto. + Qed. + +(** Every Transitive relation gives rise to a binary morphism on [impl], + contravariant in the first argument, covariant in the second. *) + +Program Instance trans_contra_co_morphism + [ Transitive A R ] : Morphism (R --> R ++> impl) R. + + Next Obligation. + Proof with auto. + transitivity x... + transitivity x0... + Qed. + +(* (** Dually... *) *) + +(* Program Instance [ Transitive A R ] => *) +(* trans_co_contra_inv_impl_morphism : Morphism (R ++> R --> inverse impl) R. *) + +(* Next Obligation. *) +(* Proof with auto. *) +(* apply* trans_contra_co_morphism ; eauto. eauto. *) +(* Qed. *) + +(** Morphism declarations for partial applications. *) + +Program Instance trans_contra_inv_impl_morphism + [ Transitive A R ] : Morphism (R --> inverse impl) (R x). + + Next Obligation. + Proof with auto. + transitivity y... + Qed. + +Program Instance trans_co_impl_morphism + [ Transitive A R ] : Morphism (R ==> impl) (R x). + + Next Obligation. + Proof with auto. + transitivity x0... + Qed. + +Program Instance trans_sym_co_inv_impl_morphism + [ Transitive A R, Symmetric A R ] : Morphism (R ==> inverse impl) (R x). + + Next Obligation. + Proof with auto. + transitivity y... + Qed. + +Program Instance trans_sym_contra_impl_morphism + [ Transitive A R, Symmetric _ R ] : Morphism (R --> impl) (R x). + + Next Obligation. + Proof with auto. + transitivity x0... + Qed. + +Program Instance equivalence_partial_app_morphism + [ Equivalence A R ] : Morphism (R ==> iff) (R x). + + Next Obligation. + Proof with auto. + split. intros ; transitivity x0... + intros. + transitivity y... + symmetry... + Qed. + +(** Every Transitive relation induces a morphism by "pushing" an [R x y] on the left of an [R x z] proof + to get an [R y z] goal. *) + +Program Instance trans_co_eq_inv_impl_morphism + [ Transitive A R ] : Morphism (R ==> (@eq A) ==> inverse impl) R. + + Next Obligation. + Proof with auto. + transitivity y... + Qed. + +(* Program Instance [ Transitive A R ] => *) +(* trans_contra_eq_impl_morphism : Morphism (R --> (@eq A) ==> impl) R. *) + +(* Next Obligation. *) +(* Proof with auto. *) +(* transitivity x... *) +(* Qed. *) + +(** Every Symmetric and Transitive relation gives rise to an equivariant morphism. *) + +Program Instance trans_sym_morphism + [ Transitive A R, Symmetric _ R ] : Morphism (R ==> R ==> iff) R. + + Next Obligation. + Proof with auto. + split ; intros. + transitivity x0... transitivity x... + + transitivity y... transitivity y0... + Qed. + +Program Instance equiv_morphism [ Equivalence A R ] : + Morphism (R ==> R ==> iff) R. + + Next Obligation. + Proof with auto. + split ; intros. + transitivity x0... transitivity x... symmetry... + + transitivity y... transitivity y0... symmetry... + Qed. + +(** In case the rewrite happens at top level. *) + +Program Instance iff_inverse_impl_id : + Morphism (iff ==> inverse impl) id. + +Program Instance inverse_iff_inverse_impl_id : + Morphism (iff --> inverse impl) id. + +Program Instance iff_impl_id : + Morphism (iff ==> impl) id. + +Program Instance inverse_iff_impl_id : + Morphism (iff --> impl) id. + +(** Coq functions are morphisms for leibniz equality, + applied only if really needed. *) + +(* Instance (A : Type) [ Reflexive B R ] => *) +(* eq_reflexive_morphism : Morphism (@Logic.eq A ==> R) m | 3. *) +(* Proof. simpl_relation. Qed. *) + +Instance reflexive_eq_dom_reflexive (A : Type) [ Reflexive B R' ] : + Reflexive (@Logic.eq A ==> R'). +Proof. simpl_relation. Qed. + +(** [respectful] is a morphism for relation equivalence. *) + +Instance respectful_morphism : + Morphism (relation_equivalence ++> relation_equivalence ++> relation_equivalence) (@respectful A B). +Proof. + reduce. + unfold respectful, relation_equivalence, predicate_equivalence in * ; simpl in *. + split ; intros. + + rewrite <- H0. + apply H1. + rewrite H. + assumption. + + rewrite H0. + apply H1. + rewrite <- H. + assumption. +Qed. + +(** Every element in the carrier of a reflexive relation is a morphism for this relation. + We use a proxy class for this case which is used internally to discharge reflexivity constraints. + The [Reflexive] instance will almost always be used, but it won't apply in general to any kind of + [Morphism (A -> B) _ _] goal, making proof-search much slower. A cleaner solution would be to be able + to set different priorities in different hint bases and select a particular hint database for + resolution of a type class constraint.*) + +Class MorphismProxy A (R : relation A) (m : A) : Prop := + respect_proxy : R m m. + +Instance reflexive_morphism_proxy + [ Reflexive A R ] (x : A) : MorphismProxy A R x | 1. +Proof. firstorder. Qed. + +Instance morphism_morphism_proxy + [ Morphism A R x ] : MorphismProxy A R x | 2. +Proof. firstorder. Qed. + +(* Instance (A : Type) [ Reflexive B R ] => *) +(* eq_reflexive_morphism : Morphism (@Logic.eq A ==> R) m | 3. *) +(* Proof. simpl_relation. Qed. *) + +(** [R] is Reflexive, hence we can build the needed proof. *) + +Lemma Reflexive_partial_app_morphism [ Morphism (A -> B) (R ==> R') m, MorphismProxy A R x ] : + Morphism R' (m x). +Proof. simpl_relation. Qed. + +Ltac partial_application_tactic := + let tac x := + match type of x with + | Type => fail 1 + | _ => eapply @Reflexive_partial_app_morphism + end + in + let on_morphism m := + match m with + | ?m' ?x => tac x + | ?m' _ ?x => tac x + | ?m' _ _ ?x => tac x + | ?m' _ _ _ ?x => tac x + | ?m' _ _ _ _ ?x => tac x + | ?m' _ _ _ _ _ ?x => tac x + | ?m' _ _ _ _ _ _ ?x => tac x + | ?m' _ _ _ _ _ _ _ ?x => tac x + | ?m' _ _ _ _ _ _ _ _ ?x => tac x + end + in + match goal with + | [ |- @Morphism _ _ ?m ] => on_morphism m + end. + +(* Program Instance [ Morphism (A -> B) (R ==> R') m, Reflexive A R ] (x : A) => *) +(* reflexive_partial_app_morphism : Morphism R' (m x). *) + +Hint Extern 4 (@Morphism _ _ _) => partial_application_tactic : typeclass_instances. + +Lemma inverse_respectful : forall (A : Type) (R : relation A) (B : Type) (R' : relation B), + relation_equivalence (inverse (R ==> R')) (inverse R ==> inverse R'). +Proof. + intros. + unfold flip, respectful. + split ; intros ; intuition. +Qed. + +(** Special-purpose class to do normalization of signatures w.r.t. inverse. *) + +Class (A : Type) => Normalizes (m : relation A) (m' : relation A) : Prop := + normalizes : relation_equivalence m m'. + +Instance inverse_respectful_norm : + Normalizes (A -> B) (inverse R ==> inverse R') (inverse (R ==> R')) . +Proof. firstorder. Qed. + +(* If not an inverse on the left, do a double inverse. *) + +Instance not_inverse_respectful_norm : + Normalizes (A -> B) (R ==> inverse R') (inverse (inverse R ==> R')) | 4. +Proof. firstorder. Qed. + +Instance inverse_respectful_rec_norm [ Normalizes B R' (inverse R'') ] : + Normalizes (A -> B) (inverse R ==> R') (inverse (R ==> R'')). +Proof. red ; intros. + pose normalizes as r. + setoid_rewrite r. + setoid_rewrite inverse_respectful. + reflexivity. +Qed. + +(** Once we have normalized, we will apply this instance to simplify the problem. *) + +Program Instance morphism_inverse_morphism + [ Morphism A R m ] : Morphism (inverse R) m | 2. + +(** Bootstrap !!! *) + +Instance morphism_morphism : Morphism (relation_equivalence ==> @eq _ ==> iff) (@Morphism A). +Proof. + simpl_relation. + reduce in H. + split ; red ; intros. + setoid_rewrite <- H. + apply H0. + setoid_rewrite H. + apply H0. +Qed. + +Lemma morphism_releq_morphism [ Normalizes A R R', Morphism _ R' m ] : Morphism R m. +Proof. + intros. + pose respect as r. + pose normalizes as norm. + setoid_rewrite norm. + assumption. +Qed. + +Inductive normalization_done : Prop := did_normalization. + +Ltac morphism_normalization := + match goal with + | [ _ : normalization_done |- _ ] => fail 1 + | [ |- @Morphism _ _ _ ] => let H := fresh "H" in + set(H:=did_normalization) ; eapply @morphism_releq_morphism + end. + +Hint Extern 6 (@Morphism _ _ _) => morphism_normalization : typeclass_instances. + +(** Every reflexive relation gives rise to a morphism, only for immediately solving goals without variables. *) + +Lemma reflexive_morphism [ Reflexive A R ] (x : A) + : Morphism R x. +Proof. firstorder. Qed. + +Ltac morphism_reflexive := + match goal with + | [ _ : normalization_done |- _ ] => fail 1 + | [ _ : subrelation_done |- _ ] => fail 1 + | [ |- @Morphism _ _ _ ] => eapply @reflexive_morphism + end. + +Hint Extern 4 (@Morphism _ _ _) => morphism_reflexive : typeclass_instances. \ No newline at end of file diff --git a/theories/Classes/Morphisms_Prop.v b/theories/Classes/Morphisms_Prop.v new file mode 100644 index 00000000..7dc1f95e --- /dev/null +++ b/theories/Classes/Morphisms_Prop.v @@ -0,0 +1,132 @@ +(* -*- coq-prog-args: ("-emacs-U" "-top" "Coq.Classes.Morphisms") -*- *) +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* impl) not. + +Program Instance not_iff_morphism : + Morphism (iff ++> iff) not. + +(** Logical conjunction. *) + +Program Instance and_impl_iff_morphism : + Morphism (impl ==> impl ==> impl) and. + +(* Program Instance and_impl_iff_morphism : *) +(* Morphism (impl ==> iff ==> impl) and. *) + +(* Program Instance and_iff_impl_morphism : *) +(* Morphism (iff ==> impl ==> impl) and. *) + +(* Program Instance and_inverse_impl_iff_morphism : *) +(* Morphism (inverse impl ==> iff ==> inverse impl) and. *) + +(* Program Instance and_iff_inverse_impl_morphism : *) +(* Morphism (iff ==> inverse impl ==> inverse impl) and. *) + +Program Instance and_iff_morphism : + Morphism (iff ==> iff ==> iff) and. + +(** Logical disjunction. *) + +Program Instance or_impl_iff_morphism : + Morphism (impl ==> impl ==> impl) or. + +(* Program Instance or_impl_iff_morphism : *) +(* Morphism (impl ==> iff ==> impl) or. *) + +(* Program Instance or_iff_impl_morphism : *) +(* Morphism (iff ==> impl ==> impl) or. *) + +(* Program Instance or_inverse_impl_iff_morphism : *) +(* Morphism (inverse impl ==> iff ==> inverse impl) or. *) + +(* Program Instance or_iff_inverse_impl_morphism : *) +(* Morphism (iff ==> inverse impl ==> inverse impl) or. *) + +Program Instance or_iff_morphism : + Morphism (iff ==> iff ==> iff) or. + +(** Logical implication [impl] is a morphism for logical equivalence. *) + +Program Instance iff_iff_iff_impl_morphism : Morphism (iff ==> iff ==> iff) impl. + +(** Morphisms for quantifiers *) + +Program Instance ex_iff_morphism {A : Type} : Morphism (pointwise_relation iff ==> iff) (@ex A). + + Next Obligation. + Proof. + unfold pointwise_relation in H. + split ; intros. + destruct H0 as [xâ‚ Hâ‚]. + exists xâ‚. rewrite H in Hâ‚. assumption. + + destruct H0 as [xâ‚ Hâ‚]. + exists xâ‚. rewrite H. assumption. + Qed. + +Program Instance ex_impl_morphism {A : Type} : + Morphism (pointwise_relation impl ==> impl) (@ex A). + + Next Obligation. + Proof. + unfold pointwise_relation in H. + exists H0. apply H. assumption. + Qed. + +Program Instance ex_inverse_impl_morphism {A : Type} : + Morphism (pointwise_relation (inverse impl) ==> inverse impl) (@ex A). + + Next Obligation. + Proof. + unfold pointwise_relation in H. + exists H0. apply H. assumption. + Qed. + +Program Instance all_iff_morphism {A : Type} : + Morphism (pointwise_relation iff ==> iff) (@all A). + + Next Obligation. + Proof. + unfold pointwise_relation, all in *. + intuition ; specialize (H x0) ; intuition. + Qed. + +Program Instance all_impl_morphism {A : Type} : + Morphism (pointwise_relation impl ==> impl) (@all A). + + Next Obligation. + Proof. + unfold pointwise_relation, all in *. + intuition ; specialize (H x0) ; intuition. + Qed. + +Program Instance all_inverse_impl_morphism {A : Type} : + Morphism (pointwise_relation (inverse impl) ==> inverse impl) (@all A). + + Next Obligation. + Proof. + unfold pointwise_relation, all in *. + intuition ; specialize (H x0) ; intuition. + Qed. diff --git a/theories/Classes/Morphisms_Relations.v b/theories/Classes/Morphisms_Relations.v new file mode 100644 index 00000000..5018fa01 --- /dev/null +++ b/theories/Classes/Morphisms_Relations.v @@ -0,0 +1,50 @@ +(* -*- coq-prog-args: ("-emacs-U" "-top" "Coq.Classes.Morphisms") -*- *) +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* + relation_equivalence ==> relation_equivalence) relation_conjunction. + Proof. firstorder. Qed. + +Instance relation_disjunction_morphism : Morphism (relation_equivalence (A:=A) ==> + relation_equivalence ==> relation_equivalence) relation_disjunction. + Proof. firstorder. Qed. + +(* Predicate equivalence is exactly the same as the pointwise lifting of [iff]. *) + +Require Import List. + +Lemma predicate_equivalence_pointwise (l : list Type) : + Morphism (@predicate_equivalence l ==> pointwise_lifting iff l) id. +Proof. do 2 red. unfold predicate_equivalence. auto. Qed. + +Lemma predicate_implication_pointwise (l : list Type) : + Morphism (@predicate_implication l ==> pointwise_lifting impl l) id. +Proof. do 2 red. unfold predicate_implication. auto. Qed. + +(** The instanciation at relation allows to rewrite applications of relations [R x y] to [R' x y] *) +(* when [R] and [R'] are in [relation_equivalence]. *) + +Instance relation_equivalence_pointwise : + Morphism (relation_equivalence ==> pointwise_relation (A:=A) (pointwise_relation (A:=A) iff)) id. +Proof. intro. apply (predicate_equivalence_pointwise (cons A (cons A nil))). Qed. + +Instance subrelation_pointwise : + Morphism (subrelation ==> pointwise_relation (A:=A) (pointwise_relation (A:=A) impl)) id. +Proof. intro. apply (predicate_implication_pointwise (cons A (cons A nil))). Qed. diff --git a/theories/Classes/RelationClasses.v b/theories/Classes/RelationClasses.v new file mode 100644 index 00000000..a9a53068 --- /dev/null +++ b/theories/Classes/RelationClasses.v @@ -0,0 +1,400 @@ +(* -*- coq-prog-args: ("-emacs-U" "-top" "Coq.Classes.RelationClasses") -*- *) +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* R x y -> False. + +Definition pointwise_relation {A B : Type} (R : relation B) : relation (A -> B) := + fun f g => forall x : A, R (f x) (g x). + +(** These are convertible. *) + +Lemma complement_inverse : forall A (R : relation A), complement (inverse R) = inverse (complement R). +Proof. reflexivity. Qed. + +(** We rebind relations in separate classes to be able to overload each proof. *) + +Set Implicit Arguments. +Unset Strict Implicit. + +Class Reflexive A (R : relation A) := + reflexivity : forall x, R x x. + +Class Irreflexive A (R : relation A) := + irreflexivity :> Reflexive A (complement R). + +Class Symmetric A (R : relation A) := + symmetry : forall x y, R x y -> R y x. + +Class Asymmetric A (R : relation A) := + asymmetry : forall x y, R x y -> R y x -> False. + +Class Transitive A (R : relation A) := + transitivity : forall x y z, R x y -> R y z -> R x z. + +Implicit Arguments Reflexive [A]. +Implicit Arguments Irreflexive [A]. +Implicit Arguments Symmetric [A]. +Implicit Arguments Asymmetric [A]. +Implicit Arguments Transitive [A]. + +Hint Resolve @irreflexivity : ord. + +Unset Implicit Arguments. + +(** We can already dualize all these properties. *) + +Program Instance flip_Reflexive [ Reflexive A R ] : Reflexive (flip R) := + reflexivity := reflexivity (R:=R). + +Program Instance flip_Irreflexive [ Irreflexive A R ] : Irreflexive (flip R) := + irreflexivity := irreflexivity (R:=R). + +Program Instance flip_Symmetric [ Symmetric A R ] : Symmetric (flip R). + + Solve Obligations using unfold flip ; program_simpl ; clapply Symmetric. + +Program Instance flip_Asymmetric [ Asymmetric A R ] : Asymmetric (flip R). + + Solve Obligations using program_simpl ; unfold flip in * ; intros ; clapply asymmetry. + +Program Instance flip_Transitive [ Transitive A R ] : Transitive (flip R). + + Solve Obligations using unfold flip ; program_simpl ; clapply transitivity. + +Program Instance Reflexive_complement_Irreflexive [ Reflexive A (R : relation A) ] + : Irreflexive (complement R). + + Next Obligation. + Proof. + unfold complement. + red. intros H. + intros H' ; apply H'. + apply (reflexivity H). + Qed. + + +Program Instance complement_Symmetric [ Symmetric A (R : relation A) ] : Symmetric (complement R). + + Next Obligation. + Proof. + red ; intros H'. + apply (H (symmetry H')). + Qed. + +(** * Standard instances. *) + +Ltac reduce_hyp H := + match type of H with + | context [ _ <-> _ ] => fail 1 + | _ => red in H ; try reduce_hyp H + end. + +Ltac reduce_goal := + match goal with + | [ |- _ <-> _ ] => fail 1 + | _ => red ; intros ; try reduce_goal + end. + +Tactic Notation "reduce" "in" hyp(Hid) := reduce_hyp Hid. + +Ltac reduce := reduce_goal. + +Tactic Notation "apply" "*" constr(t) := + first [ refine t | refine (t _) | refine (t _ _) | refine (t _ _ _) | refine (t _ _ _ _) | + refine (t _ _ _ _ _) | refine (t _ _ _ _ _ _) | refine (t _ _ _ _ _ _ _) ]. + +Ltac simpl_relation := + unfold flip, impl, arrow ; try reduce ; program_simpl ; + try ( solve [ intuition ]). + +Ltac obligations_tactic ::= simpl_relation. + +(** Logical implication. *) + +Program Instance impl_Reflexive : Reflexive impl. +Program Instance impl_Transitive : Transitive impl. + +(** Logical equivalence. *) + +Program Instance iff_Reflexive : Reflexive iff. +Program Instance iff_Symmetric : Symmetric iff. +Program Instance iff_Transitive : Transitive iff. + +(** Leibniz equality. *) + +Program Instance eq_Reflexive : Reflexive (@eq A). +Program Instance eq_Symmetric : Symmetric (@eq A). +Program Instance eq_Transitive : Transitive (@eq A). + +(** Various combinations of reflexivity, symmetry and transitivity. *) + +(** A [PreOrder] is both Reflexive and Transitive. *) + +Class PreOrder A (R : relation A) : Prop := + PreOrder_Reflexive :> Reflexive R ; + PreOrder_Transitive :> Transitive R. + +(** A partial equivalence relation is Symmetric and Transitive. *) + +Class PER (carrier : Type) (pequiv : relation carrier) : Prop := + PER_Symmetric :> Symmetric pequiv ; + PER_Transitive :> Transitive pequiv. + +(** Equivalence relations. *) + +Class Equivalence (carrier : Type) (equiv : relation carrier) : Prop := + Equivalence_Reflexive :> Reflexive equiv ; + Equivalence_Symmetric :> Symmetric equiv ; + Equivalence_Transitive :> Transitive equiv. + +(** An Equivalence is a PER plus reflexivity. *) + +Instance Equivalence_PER [ Equivalence A R ] : PER A R := + PER_Symmetric := Equivalence_Symmetric ; + PER_Transitive := Equivalence_Transitive. + +(** We can now define antisymmetry w.r.t. an equivalence relation on the carrier. *) + +Class [ Equivalence A eqA ] => Antisymmetric (R : relation A) := + antisymmetry : forall x y, R x y -> R y x -> eqA x y. + +Program Instance flip_antiSymmetric [ eq : Equivalence A eqA, ! Antisymmetric eq R ] : + Antisymmetric eq (flip R). + +(** Leibinz equality [eq] is an equivalence relation. + The instance has low priority as it is always applicable + if only the type is constrained. *) + +Program Instance eq_equivalence : Equivalence A (@eq A) | 10. + +(** Logical equivalence [iff] is an equivalence relation. *) + +Program Instance iff_equivalence : Equivalence Prop iff. + +(** We now develop a generalization of results on relations for arbitrary predicates. + The resulting theory can be applied to homogeneous binary relations but also to + arbitrary n-ary predicates. *) + +Require Import List. + +(* Notation " [ ] " := nil : list_scope. *) +(* Notation " [ x ; .. ; y ] " := (cons x .. (cons y nil) ..) (at level 1) : list_scope. *) + +(* Open Local Scope list_scope. *) + +(** A compact representation of non-dependent arities, with the codomain singled-out. *) + +Fixpoint arrows (l : list Type) (r : Type) : Type := + match l with + | nil => r + | A :: l' => A -> arrows l' r + end. + +(** We can define abbreviations for operation and relation types based on [arrows]. *) + +Definition unary_operation A := arrows (cons A nil) A. +Definition binary_operation A := arrows (cons A (cons A nil)) A. +Definition ternary_operation A := arrows (cons A (cons A (cons A nil))) A. + +(** We define n-ary [predicate]s as functions into [Prop]. *) + +Notation predicate l := (arrows l Prop). + +(** Unary predicates, or sets. *) + +Definition unary_predicate A := predicate (cons A nil). + +(** Homogeneous binary relations, equivalent to [relation A]. *) + +Definition binary_relation A := predicate (cons A (cons A nil)). + +(** We can close a predicate by universal or existential quantification. *) + +Fixpoint predicate_all (l : list Type) : predicate l -> Prop := + match l with + | nil => fun f => f + | A :: tl => fun f => forall x : A, predicate_all tl (f x) + end. + +Fixpoint predicate_exists (l : list Type) : predicate l -> Prop := + match l with + | nil => fun f => f + | A :: tl => fun f => exists x : A, predicate_exists tl (f x) + end. + +(** Pointwise extension of a binary operation on [T] to a binary operation + on functions whose codomain is [T]. + For an operator on [Prop] this lifts the operator to a binary operation. *) + +Fixpoint pointwise_extension {T : Type} (op : binary_operation T) + (l : list Type) : binary_operation (arrows l T) := + match l with + | nil => fun R R' => op R R' + | A :: tl => fun R R' => + fun x => pointwise_extension op tl (R x) (R' x) + end. + +(** Pointwise lifting, equivalent to doing [pointwise_extension] and closing using [predicate_all]. *) + +Fixpoint pointwise_lifting (op : binary_relation Prop) (l : list Type) : binary_relation (predicate l) := + match l with + | nil => fun R R' => op R R' + | A :: tl => fun R R' => + forall x, pointwise_lifting op tl (R x) (R' x) + end. + +(** The n-ary equivalence relation, defined by lifting the 0-ary [iff] relation. *) + +Definition predicate_equivalence {l : list Type} : binary_relation (predicate l) := + pointwise_lifting iff l. + +(** The n-ary implication relation, defined by lifting the 0-ary [impl] relation. *) + +Definition predicate_implication {l : list Type} := + pointwise_lifting impl l. + +(** Notations for pointwise equivalence and implication of predicates. *) + +Infix "<∙>" := predicate_equivalence (at level 95, no associativity) : predicate_scope. +Infix "-∙>" := predicate_implication (at level 70) : predicate_scope. + +Open Local Scope predicate_scope. + +(** The pointwise liftings of conjunction and disjunctions. + Note that these are [binary_operation]s, building new relations out of old ones. *) + +Definition predicate_intersection := pointwise_extension and. +Definition predicate_union := pointwise_extension or. + +Infix "/∙\" := predicate_intersection (at level 80, right associativity) : predicate_scope. +Infix "\∙/" := predicate_union (at level 85, right associativity) : predicate_scope. + +(** The always [True] and always [False] predicates. *) + +Fixpoint true_predicate {l : list Type} : predicate l := + match l with + | nil => True + | A :: tl => fun _ => @true_predicate tl + end. + +Fixpoint false_predicate {l : list Type} : predicate l := + match l with + | nil => False + | A :: tl => fun _ => @false_predicate tl + end. + +Notation "∙⊤∙" := true_predicate : predicate_scope. +Notation "∙⊥∙" := false_predicate : predicate_scope. + +(** Predicate equivalence is an equivalence, and predicate implication defines a preorder. *) + +Program Instance predicate_equivalence_equivalence : + Equivalence (predicate l) predicate_equivalence. + + Next Obligation. + induction l ; firstorder. + Qed. + + Next Obligation. + induction l ; firstorder. + Qed. + + Next Obligation. + fold pointwise_lifting. + induction l. firstorder. + intros. simpl in *. pose (IHl (x x0) (y x0) (z x0)). + firstorder. + Qed. + +Program Instance predicate_implication_preorder : + PreOrder (predicate l) predicate_implication. + + Next Obligation. + induction l ; firstorder. + Qed. + + Next Obligation. + induction l. firstorder. + unfold predicate_implication in *. simpl in *. + intro. pose (IHl (x x0) (y x0) (z x0)). firstorder. + Qed. + +(** We define the various operations which define the algebra on binary relations, + from the general ones. *) + +Definition relation_equivalence {A : Type} : relation (relation A) := + @predicate_equivalence (cons _ (cons _ nil)). + +Class subrelation {A:Type} (R R' : relation A) : Prop := + is_subrelation : @predicate_implication (cons A (cons A nil)) R R'. + +Implicit Arguments subrelation [[A]]. + +Definition relation_conjunction {A} (R : relation A) (R' : relation A) : relation A := + @predicate_intersection (cons A (cons A nil)) R R'. + +Definition relation_disjunction {A} (R : relation A) (R' : relation A) : relation A := + @predicate_union (cons A (cons A nil)) R R'. + +(** Relation equivalence is an equivalence, and subrelation defines a partial order. *) + +Instance relation_equivalence_equivalence (A : Type) : + Equivalence (relation A) relation_equivalence. +Proof. intro A. exact (@predicate_equivalence_equivalence (cons A (cons A nil))). Qed. + +Instance relation_implication_preorder : PreOrder (relation A) subrelation. +Proof. intro A. exact (@predicate_implication_preorder (cons A (cons A nil))). Qed. + +(** *** Partial Order. + A partial order is a preorder which is additionally antisymmetric. + We give an equivalent definition, up-to an equivalence relation + on the carrier. *) + +Class [ equ : Equivalence A eqA, PreOrder A R ] => PartialOrder := + partial_order_equivalence : relation_equivalence eqA (relation_conjunction R (inverse R)). + +(** The equivalence proof is sufficient for proving that [R] must be a morphism + for equivalence (see Morphisms). + It is also sufficient to show that [R] is antisymmetric w.r.t. [eqA] *) + +Instance partial_order_antisym [ PartialOrder A eqA R ] : ! Antisymmetric A eqA R. +Proof with auto. + reduce_goal. pose proof partial_order_equivalence as poe. do 3 red in poe. + apply <- poe. firstorder. +Qed. + +(** The partial order defined by subrelation and relation equivalence. *) + +Program Instance subrelation_partial_order : + ! PartialOrder (relation A) relation_equivalence subrelation. + + Next Obligation. + Proof. + unfold relation_equivalence in *. firstorder. + Qed. + +Lemma inverse_pointwise_relation A (R : relation A) : + relation_equivalence (pointwise_relation (inverse R)) (inverse (pointwise_relation (A:=A) R)). +Proof. reflexivity. Qed. diff --git a/theories/Classes/SetoidAxioms.v b/theories/Classes/SetoidAxioms.v new file mode 100644 index 00000000..9264b6d2 --- /dev/null +++ b/theories/Classes/SetoidAxioms.v @@ -0,0 +1,35 @@ +(* -*- coq-prog-args: ("-emacs-U" "-nois") -*- *) +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* x = y. + +(** Application of the extensionality principle for setoids. *) + +Ltac setoid_extensionality := + match goal with + [ |- @eq ?A ?X ?Y ] => apply (setoideq_eq (a:=A) (x:=X) (y:=Y)) + end. diff --git a/theories/Classes/SetoidClass.v b/theories/Classes/SetoidClass.v new file mode 100644 index 00000000..a9bdaa8f --- /dev/null +++ b/theories/Classes/SetoidClass.v @@ -0,0 +1,181 @@ +(* -*- coq-prog-args: ("-emacs-U" "-nois") -*- *) +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Equivalence A equiv. + +Typeclasses unfold equiv. + +(* Too dangerous instance *) +(* Program Instance [ eqa : Equivalence A eqA ] => *) +(* equivalence_setoid : Setoid A := *) +(* equiv := eqA ; setoid_equiv := eqa. *) + +(** Shortcuts to make proof search easier. *) + +Definition setoid_refl [ sa : Setoid A ] : Reflexive equiv. +Proof. eauto with typeclass_instances. Qed. + +Definition setoid_sym [ sa : Setoid A ] : Symmetric equiv. +Proof. eauto with typeclass_instances. Qed. + +Definition setoid_trans [ sa : Setoid A ] : Transitive equiv. +Proof. eauto with typeclass_instances. Qed. + +Existing Instance setoid_refl. +Existing Instance setoid_sym. +Existing Instance setoid_trans. + +(** Standard setoids. *) + +(* Program Instance eq_setoid : Setoid A := *) +(* equiv := eq ; setoid_equiv := eq_equivalence. *) + +Program Instance iff_setoid : Setoid Prop := + equiv := iff ; setoid_equiv := iff_equivalence. + +(** Overloaded notations for setoid equivalence and inequivalence. Not to be confused with [eq] and [=]. *) + +(** Subset objects should be first coerced to their underlying type, but that notation doesn't work in the standard case then. *) +(* Notation " x == y " := (equiv (x :>) (y :>)) (at level 70, no associativity) : type_scope. *) + +Notation " x == y " := (equiv x y) (at level 70, no associativity) : type_scope. + +Notation " x =/= y " := (complement equiv x y) (at level 70, no associativity) : type_scope. + +(** Use the [clsubstitute] command which substitutes an equality in every hypothesis. *) + +Ltac clsubst H := + match type of H with + ?x == ?y => substitute H ; clear H x + end. + +Ltac clsubst_nofail := + match goal with + | [ H : ?x == ?y |- _ ] => clsubst H ; clsubst_nofail + | _ => idtac + end. + +(** [subst*] will try its best at substituting every equality in the goal. *) + +Tactic Notation "clsubst" "*" := clsubst_nofail. + +Lemma nequiv_equiv_trans : forall [ Setoid A ] (x y z : A), x =/= y -> y == z -> x =/= z. +Proof with auto. + intros; intro. + assert(z == y) by (symmetry ; auto). + assert(x == y) by (transitivity z ; eauto). + contradiction. +Qed. + +Lemma equiv_nequiv_trans : forall [ Setoid A ] (x y z : A), x == y -> y =/= z -> x =/= z. +Proof. + intros; intro. + assert(y == x) by (symmetry ; auto). + assert(y == z) by (transitivity x ; eauto). + contradiction. +Qed. + +Ltac setoid_simplify_one := + match goal with + | [ H : (?x == ?x)%type |- _ ] => clear H + | [ H : (?x == ?y)%type |- _ ] => clsubst H + | [ |- (?x =/= ?y)%type ] => let name:=fresh "Hneq" in intro name + end. + +Ltac setoid_simplify := repeat setoid_simplify_one. + +Ltac setoidify_tac := + match goal with + | [ s : Setoid ?A, H : ?R ?x ?y |- _ ] => change R with (@equiv A R s) in H + | [ s : Setoid ?A |- context C [ ?R ?x ?y ] ] => change (R x y) with (@equiv A R s x y) + end. + +Ltac setoidify := repeat setoidify_tac. + +(** Every setoid relation gives rise to a morphism, in fact every partial setoid does. *) + +Program Definition setoid_morphism [ sa : Setoid A ] : Morphism (equiv ++> equiv ++> iff) equiv := + trans_sym_morphism. + +(** Add this very useful instance in the database. *) + +Implicit Arguments setoid_morphism [[!sa]]. +Existing Instance setoid_morphism. + +Program Definition setoid_partial_app_morphism [ sa : Setoid A ] (x : A) : Morphism (equiv ++> iff) (equiv x) := + Reflexive_partial_app_morphism. + +Existing Instance setoid_partial_app_morphism. + +Definition type_eq : relation Type := + fun x y => x = y. + +Program Instance type_equivalence : Equivalence Type type_eq. + +Ltac morphism_tac := try red ; unfold arrow ; intros ; program_simpl ; try tauto. + +Ltac obligations_tactic ::= morphism_tac. + +(** These are morphisms used to rewrite at the top level of a proof, + using [iff_impl_id_morphism] if the proof is in [Prop] and + [eq_arrow_id_morphism] if it is in Type. *) + +Program Instance iff_impl_id_morphism : Morphism (iff ++> impl) Basics.id. + +(* Program Instance eq_arrow_id_morphism : ? Morphism (eq +++> arrow) id. *) + +(* Definition compose_respect (A B C : Type) (R : relation (A -> B)) (R' : relation (B -> C)) *) +(* (x y : A -> C) : Prop := forall (f : A -> B) (g : B -> C), R f f -> R' g g. *) + +(* Program Instance (A B C : Type) (R : relation (A -> B)) (R' : relation (B -> C)) *) +(* [ mg : ? Morphism R' g ] [ mf : ? Morphism R f ] => *) +(* compose_morphism : ? Morphism (compose_respect R R') (g o f). *) + +(* Next Obligation. *) +(* Proof. *) +(* apply (respect (m0:=mg)). *) +(* apply (respect (m0:=mf)). *) +(* assumption. *) +(* Qed. *) + +(** Partial setoids don't require reflexivity so we can build a partial setoid on the function space. *) + +Class PartialSetoid (carrier : Type) := + pequiv : relation carrier ; + pequiv_prf :> PER carrier pequiv. + +(** Overloaded notation for partial setoid equivalence. *) + +Infix "=~=" := pequiv (at level 70, no associativity) : type_scope. + +(** Reset the default Program tactic. *) + +Ltac obligations_tactic ::= program_simpl. diff --git a/theories/Classes/SetoidDec.v b/theories/Classes/SetoidDec.v new file mode 100644 index 00000000..cf3d202d --- /dev/null +++ b/theories/Classes/SetoidDec.v @@ -0,0 +1,126 @@ +(* -*- coq-prog-args: ("-emacs-U" "-nois") -*- *) +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* DecidableSetoid := + setoid_decidable : forall x y : A, decidable (x == y). + +(** The [EqDec] class gives a decision procedure for a particular setoid equality. *) + +Class [ Setoid A ] => EqDec := + equiv_dec : forall x y : A, { x == y } + { x =/= y }. + +(** We define the [==] overloaded notation for deciding equality. It does not take precedence + of [==] defined in the type scope, hence we can have both at the same time. *) + +Notation " x == y " := (equiv_dec (x :>) (y :>)) (no associativity, at level 70). + +Definition swap_sumbool {A B} (x : { A } + { B }) : { B } + { A } := + match x with + | left H => @right _ _ H + | right H => @left _ _ H + end. + +Require Import Coq.Program.Program. + +Open Local Scope program_scope. + +(** Invert the branches. *) + +Program Definition nequiv_dec [ EqDec A ] (x y : A) : { x =/= y } + { x == y } := swap_sumbool (x == y). + +(** Overloaded notation for inequality. *) + +Infix "=/=" := nequiv_dec (no associativity, at level 70). + +(** Define boolean versions, losing the logical information. *) + +Definition equiv_decb [ EqDec A ] (x y : A) : bool := + if x == y then true else false. + +Definition nequiv_decb [ EqDec A ] (x y : A) : bool := + negb (equiv_decb x y). + +Infix "==b" := equiv_decb (no associativity, at level 70). +Infix "<>b" := nequiv_decb (no associativity, at level 70). + +(** Decidable leibniz equality instances. *) + +Require Import Coq.Arith.Arith. + +(** The equiv is burried inside the setoid, but we can recover it by specifying which setoid we're talking about. *) + +Program Instance eq_setoid : Setoid A := + equiv := eq ; setoid_equiv := eq_equivalence. + +Program Instance nat_eq_eqdec : EqDec (@eq_setoid nat) := + equiv_dec := eq_nat_dec. + +Require Import Coq.Bool.Bool. + +Program Instance bool_eqdec : EqDec (@eq_setoid bool) := + equiv_dec := bool_dec. + +Program Instance unit_eqdec : EqDec (@eq_setoid unit) := + equiv_dec x y := in_left. + + Next Obligation. + Proof. + destruct x ; destruct y. + reflexivity. + Qed. + +Program Instance prod_eqdec [ ! EqDec (@eq_setoid A), ! EqDec (@eq_setoid B) ] : EqDec (@eq_setoid (prod A B)) := + equiv_dec x y := + let '(x1, x2) := x in + let '(y1, y2) := y in + if x1 == y1 then + if x2 == y2 then in_left + else in_right + else in_right. + + Solve Obligations using unfold complement ; program_simpl. + +(** Objects of function spaces with countable domains like bool have decidable equality. *) + +Require Import Coq.Program.FunctionalExtensionality. + +Program Instance bool_function_eqdec [ ! EqDec (@eq_setoid A) ] : EqDec (@eq_setoid (bool -> A)) := + equiv_dec f g := + if f true == g true then + if f false == g false then in_left + else in_right + else in_right. + + Solve Obligations using try red ; unfold equiv, complement ; program_simpl. + + Next Obligation. + Proof. + extensionality x. + destruct x ; auto. + Qed. diff --git a/theories/Classes/SetoidTactics.v b/theories/Classes/SetoidTactics.v new file mode 100644 index 00000000..b29a52cc --- /dev/null +++ b/theories/Classes/SetoidTactics.v @@ -0,0 +1,176 @@ +(* -*- coq-prog-args: ("-emacs-U" "-top" "Coq.Classes.SetoidTactics") -*- *) +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* ?R' => red ; intros ; subst ; red_subst_eq_morphism R' + | ?R ==> ?R' => red ; intros ; red_subst_eq_morphism R' + | _ => idtac + end. + +Ltac destruct_morphism := + match goal with + | [ |- @Morphism ?A ?R ?m ] => red + end. + +Ltac reverse_arrows x := + match x with + | @Logic.eq ?A ==> ?R' => revert_last ; reverse_arrows R' + | ?R ==> ?R' => do 3 revert_last ; reverse_arrows R' + | _ => idtac + end. + +Ltac default_add_morphism_tactic := + intros ; + (try destruct_morphism) ; + match goal with + | [ |- (?x ==> ?y) _ _ ] => red_subst_eq_morphism (x ==> y) ; reverse_arrows (x ==> y) + end. + +Ltac add_morphism_tactic := default_add_morphism_tactic. diff --git a/theories/FSets/FMapAVL.v b/theories/FSets/FMapAVL.v index 4807ed66..8cb1236e 100644 --- a/theories/FSets/FMapAVL.v +++ b/theories/FSets/FMapAVL.v @@ -9,35 +9,35 @@ (* Finite map library. *) -(* $Id: FMapAVL.v 9862 2007-05-25 16:57:06Z letouzey $ *) +(* $Id: FMapAVL.v 11033 2008-06-01 22:56:50Z letouzey $ *) -(** This module implements map using AVL trees. - It follows the implementation from Ocaml's standard library. *) +(** * FMapAVL *) -Require Import FSetInterface. -Require Import FMapInterface. -Require Import FMapList. +(** This module implements maps using AVL trees. + It follows the implementation from Ocaml's standard library. + + See the comments at the beginning of FSetAVL for more details. +*) -Require Import ZArith. -Require Import Int. +Require Import FMapInterface FMapList ZArith Int. -Set Firstorder Depth 3. Set Implicit Arguments. Unset Strict Implicit. +(** Notations and helper lemma about pairs *) -Module Raw (I:Int)(X: OrderedType). -Import I. -Module II:=MoreInt(I). -Import II. -Open Local Scope Int_scope. +Notation "s #1" := (fst s) (at level 9, format "s '#1'") : pair_scope. +Notation "s #2" := (snd s) (at level 9, format "s '#2'") : pair_scope. -Module E := X. -Module MX := OrderedTypeFacts X. -Module PX := KeyOrderedType X. -Module L := FMapList.Raw X. -Import MX. -Import PX. +(** * The Raw functor + + Functor of pure functions + separate proofs of invariant + preservation *) + +Module Raw (Import I:Int)(X: OrderedType). +Open Local Scope pair_scope. +Open Local Scope lazy_bool_scope. +Open Local Scope Int_scope. Definition key := X.t. @@ -45,30 +45,391 @@ Definition key := X.t. Section Elt. -Variable elt : Set. +Variable elt : Type. -(* Now in KeyOrderedType: -Definition eqk (p p':key*elt) := X.eq (fst p) (fst p'). -Definition eqke (p p':key*elt) := - X.eq (fst p) (fst p') /\ (snd p) = (snd p'). -Definition ltk (p p':key*elt) := X.lt (fst p) (fst p'). -*) +(** * Trees -Notation eqk := (eqk (elt:= elt)). -Notation eqke := (eqke (elt:= elt)). -Notation ltk := (ltk (elt:= elt)). + The fifth field of [Node] is the height of the tree *) -Inductive tree : Set := +Inductive tree := | Leaf : tree | Node : tree -> key -> elt -> tree -> int -> tree. Notation t := tree. -(** The Sixth field of [Node] is the height of the tree *) +(** * Basic functions on trees: height and cardinal *) + +Definition height (m : t) : int := + match m with + | Leaf => 0 + | Node _ _ _ _ h => h + end. + +Fixpoint cardinal (m : t) : nat := + match m with + | Leaf => 0%nat + | Node l _ _ r _ => S (cardinal l + cardinal r) + end. + +(** * Empty Map *) + +Definition empty := Leaf. + +(** * Emptyness test *) + +Definition is_empty m := match m with Leaf => true | _ => false end. + +(** * Appartness *) + +(** The [mem] function is deciding appartness. It exploits the [bst] property + to achieve logarithmic complexity. *) + +Fixpoint mem x m : bool := + match m with + | Leaf => false + | Node l y _ r _ => match X.compare x y with + | LT _ => mem x l + | EQ _ => true + | GT _ => mem x r + end + end. + +Fixpoint find x m : option elt := + match m with + | Leaf => None + | Node l y d r _ => match X.compare x y with + | LT _ => find x l + | EQ _ => Some d + | GT _ => find x r + end + end. + +(** * Helper functions *) + +(** [create l x r] creates a node, assuming [l] and [r] + to be balanced and [|height l - height r| <= 2]. *) + +Definition create l x e r := + Node l x e r (max (height l) (height r) + 1). + +(** [bal l x e r] acts as [create], but performs one step of + rebalancing if necessary, i.e. assumes [|height l - height r| <= 3]. *) + +Definition assert_false := create. + +Fixpoint bal l x d r := + let hl := height l in + let hr := height r in + if gt_le_dec hl (hr+2) then + match l with + | Leaf => assert_false l x d r + | Node ll lx ld lr _ => + if ge_lt_dec (height ll) (height lr) then + create ll lx ld (create lr x d r) + else + match lr with + | Leaf => assert_false l x d r + | Node lrl lrx lrd lrr _ => + create (create ll lx ld lrl) lrx lrd (create lrr x d r) + end + end + else + if gt_le_dec hr (hl+2) then + match r with + | Leaf => assert_false l x d r + | Node rl rx rd rr _ => + if ge_lt_dec (height rr) (height rl) then + create (create l x d rl) rx rd rr + else + match rl with + | Leaf => assert_false l x d r + | Node rll rlx rld rlr _ => + create (create l x d rll) rlx rld (create rlr rx rd rr) + end + end + else + create l x d r. + +(** * Insertion *) + +Fixpoint add x d m := + match m with + | Leaf => Node Leaf x d Leaf 1 + | Node l y d' r h => + match X.compare x y with + | LT _ => bal (add x d l) y d' r + | EQ _ => Node l y d r h + | GT _ => bal l y d' (add x d r) + end + end. + +(** * Extraction of minimum binding + + Morally, [remove_min] is to be applied to a non-empty tree + [t = Node l x e r h]. Since we can't deal here with [assert false] + for [t=Leaf], we pre-unpack [t] (and forget about [h]). +*) + +Fixpoint remove_min l x d r : t*(key*elt) := + match l with + | Leaf => (r,(x,d)) + | Node ll lx ld lr lh => + let (l',m) := remove_min ll lx ld lr in + (bal l' x d r, m) + end. + +(** * Merging two trees + + [merge t1 t2] builds the union of [t1] and [t2] assuming all elements + of [t1] to be smaller than all elements of [t2], and + [|height t1 - height t2| <= 2]. +*) + +Fixpoint merge s1 s2 := match s1,s2 with + | Leaf, _ => s2 + | _, Leaf => s1 + | _, Node l2 x2 d2 r2 h2 => + match remove_min l2 x2 d2 r2 with + (s2',(x,d)) => bal s1 x d s2' + end +end. + +(** * Deletion *) + +Fixpoint remove x m := match m with + | Leaf => Leaf + | Node l y d r h => + match X.compare x y with + | LT _ => bal (remove x l) y d r + | EQ _ => merge l r + | GT _ => bal l y d (remove x r) + end + end. + +(** * join + + Same as [bal] but does not assume anything regarding heights of [l] + and [r]. +*) + +Fixpoint join l : key -> elt -> t -> t := + match l with + | Leaf => add + | Node ll lx ld lr lh => fun x d => + fix join_aux (r:t) : t := match r with + | Leaf => add x d l + | Node rl rx rd rr rh => + if gt_le_dec lh (rh+2) then bal ll lx ld (join lr x d r) + else if gt_le_dec rh (lh+2) then bal (join_aux rl) rx rd rr + else create l x d r + end + end. + +(** * Splitting + + [split x m] returns a triple [(l, o, r)] where + - [l] is the set of elements of [m] that are [< x] + - [r] is the set of elements of [m] that are [> x] + - [o] is the result of [find x m]. +*) + +Record triple := mktriple { t_left:t; t_opt:option elt; t_right:t }. +Notation "<< l , b , r >>" := (mktriple l b r) (at level 9). + +Fixpoint split x m : triple := match m with + | Leaf => << Leaf, None, Leaf >> + | Node l y d r h => + match X.compare x y with + | LT _ => let (ll,o,rl) := split x l in << ll, o, join rl y d r >> + | EQ _ => << l, Some d, r >> + | GT _ => let (rl,o,rr) := split x r in << join l y d rl, o, rr >> + end + end. + +(** * Concatenation + + Same as [merge] but does not assume anything about heights. +*) + +Definition concat m1 m2 := + match m1, m2 with + | Leaf, _ => m2 + | _ , Leaf => m1 + | _, Node l2 x2 d2 r2 _ => + let (m2',xd) := remove_min l2 x2 d2 r2 in + join m1 xd#1 xd#2 m2' + end. + +(** * Elements *) + +(** [elements_tree_aux acc t] catenates the elements of [t] in infix + order to the list [acc] *) + +Fixpoint elements_aux (acc : list (key*elt)) m : list (key*elt) := + match m with + | Leaf => acc + | Node l x d r _ => elements_aux ((x,d) :: elements_aux acc r) l + end. + +(** then [elements] is an instanciation with an empty [acc] *) + +Definition elements := elements_aux nil. + +(** * Fold *) + +Fixpoint fold (A : Type) (f : key -> elt -> A -> A) (m : t) : A -> A := + fun a => match m with + | Leaf => a + | Node l x d r _ => fold f r (f x d (fold f l a)) + end. + +(** * Comparison *) + +Variable cmp : elt->elt->bool. + +(** ** Enumeration of the elements of a tree *) + +Inductive enumeration := + | End : enumeration + | More : key -> elt -> t -> enumeration -> enumeration. + +(** [cons m e] adds the elements of tree [m] on the head of + enumeration [e]. *) + +Fixpoint cons m e : enumeration := + match m with + | Leaf => e + | Node l x d r h => cons l (More x d r e) + end. + +(** One step of comparison of elements *) + +Definition equal_more x1 d1 (cont:enumeration->bool) e2 := + match e2 with + | End => false + | More x2 d2 r2 e2 => + match X.compare x1 x2 with + | EQ _ => cmp d1 d2 &&& cont (cons r2 e2) + | _ => false + end + end. + +(** Comparison of left tree, middle element, then right tree *) + +Fixpoint equal_cont m1 (cont:enumeration->bool) e2 := + match m1 with + | Leaf => cont e2 + | Node l1 x1 d1 r1 _ => + equal_cont l1 (equal_more x1 d1 (equal_cont r1 cont)) e2 + end. + +(** Initial continuation *) + +Definition equal_end e2 := match e2 with End => true | _ => false end. + +(** The complete comparison *) + +Definition equal m1 m2 := equal_cont m1 equal_end (cons m2 End). + +End Elt. +Notation t := tree. +Notation "<< l , b , r >>" := (mktriple l b r) (at level 9). +Notation "t #l" := (t_left t) (at level 9, format "t '#l'"). +Notation "t #o" := (t_opt t) (at level 9, format "t '#o'"). +Notation "t #r" := (t_right t) (at level 9, format "t '#r'"). + + +(** * Map *) + +Fixpoint map (elt elt' : Type)(f : elt -> elt')(m : t elt) : t elt' := + match m with + | Leaf => Leaf _ + | Node l x d r h => Node (map f l) x (f d) (map f r) h + end. + +(* * Mapi *) + +Fixpoint mapi (elt elt' : Type)(f : key -> elt -> elt')(m : t elt) : t elt' := + match m with + | Leaf => Leaf _ + | Node l x d r h => Node (mapi f l) x (f x d) (mapi f r) h + end. + +(** * Map with removal *) + +Fixpoint map_option (elt elt' : Type)(f : key -> elt -> option elt')(m : t elt) + : t elt' := + match m with + | Leaf => Leaf _ + | Node l x d r h => + match f x d with + | Some d' => join (map_option f l) x d' (map_option f r) + | None => concat (map_option f l) (map_option f r) + end + end. + +(** * Optimized map2 + + Suggestion by B. Gregoire: a [map2] function with specialized + arguments allowing to bypass some tree traversal. Instead of one + [f0] of type [key -> option elt -> option elt' -> option elt''], + we ask here for: + - [f] which is a specialisation of [f0] when first option isn't [None] + - [mapl] treats a [tree elt] with [f0] when second option is [None] + - [mapr] treats a [tree elt'] with [f0] when first option is [None] + + The idea is that [mapl] and [mapr] can be instantaneous (e.g. + the identity or some constant function). +*) + +Section Map2_opt. +Variable elt elt' elt'' : Type. +Variable f : key -> elt -> option elt' -> option elt''. +Variable mapl : t elt -> t elt''. +Variable mapr : t elt' -> t elt''. + +Fixpoint map2_opt m1 m2 := + match m1, m2 with + | Leaf, _ => mapr m2 + | _, Leaf => mapl m1 + | Node l1 x1 d1 r1 h1, _ => + let (l2',o2,r2') := split x1 m2 in + match f x1 d1 o2 with + | Some e => join (map2_opt l1 l2') x1 e (map2_opt r1 r2') + | None => concat (map2_opt l1 l2') (map2_opt r1 r2') + end + end. + +End Map2_opt. + +(** * Map2 + + The [map2] function of the Map interface can be implemented + via [map2_opt] and [map_option]. +*) + +Section Map2. +Variable elt elt' elt'' : Type. +Variable f : option elt -> option elt' -> option elt''. + +Definition map2 : t elt -> t elt' -> t elt'' := + map2_opt + (fun _ d o => f (Some d) o) + (map_option (fun _ d => f (Some d) None)) + (map_option (fun _ d' => f None (Some d'))). + +End Map2. -(** * Occurrence in a tree *) -Inductive MapsTo (x : key)(e : elt) : tree -> Prop := + +(** * Invariants *) + +Section Invariants. +Variable elt : Type. + +(** ** Occurrence in a tree *) + +Inductive MapsTo (x : key)(e : elt) : t elt -> Prop := | MapsRoot : forall l r h y, X.eq x y -> MapsTo x e (Node l y e r h) | MapsLeft : forall l r h y e', @@ -76,7 +437,7 @@ Inductive MapsTo (x : key)(e : elt) : tree -> Prop := | MapsRight : forall l r h y e', MapsTo x e r -> MapsTo x e (Node l y e' r h). -Inductive In (x : key) : tree -> Prop := +Inductive In (x : key) : t elt -> Prop := | InRoot : forall l r h y e, X.eq x y -> In x (Node l y e r h) | InLeft : forall l r h y e', @@ -84,58 +445,66 @@ Inductive In (x : key) : tree -> Prop := | InRight : forall l r h y e', In x r -> In x (Node l y e' r h). -Definition In0 (k:key)(m:t) : Prop := exists e:elt, MapsTo k e m. +Definition In0 k m := exists e:elt, MapsTo k e m. -(** * Binary search trees *) +(** ** Binary search trees *) (** [lt_tree x s]: all elements in [s] are smaller than [x] (resp. greater for [gt_tree]) *) -Definition lt_tree x s := forall y:key, In y s -> X.lt y x. -Definition gt_tree x s := forall y:key, In y s -> X.lt x y. +Definition lt_tree x m := forall y, In y m -> X.lt y x. +Definition gt_tree x m := forall y, In y m -> X.lt x y. (** [bst t] : [t] is a binary search tree *) -Inductive bst : tree -> Prop := - | BSLeaf : bst Leaf - | BSNode : forall x e l r h, - bst l -> bst r -> lt_tree x l -> gt_tree x r -> bst (Node l x e r h). +Inductive bst : t elt -> Prop := + | BSLeaf : bst (Leaf _) + | BSNode : forall x e l r h, bst l -> bst r -> + lt_tree x l -> gt_tree x r -> bst (Node l x e r h). -(** * AVL trees *) +End Invariants. -(** [avl s] : [s] is a properly balanced AVL tree, - i.e. for any node the heights of the two children - differ by at most 2 *) -Definition height (s : tree) : int := - match s with - | Leaf => 0 - | Node _ _ _ _ h => h - end. +(** * Correctness proofs, isolated in a sub-module *) -Inductive avl : tree -> Prop := - | RBLeaf : avl Leaf - | RBNode : forall x e l r h, - avl l -> - avl r -> - -(2) <= height l - height r <= 2 -> - h = max (height l) (height r) + 1 -> - avl (Node l x e r h). +Module Proofs. + Module MX := OrderedTypeFacts X. + Module PX := KeyOrderedType X. + Module L := FMapList.Raw X. -(* We should end this section before the big proofs that follows, - otherwise the discharge takes a lot of time. *) -End Elt. +Functional Scheme mem_ind := Induction for mem Sort Prop. +Functional Scheme find_ind := Induction for find Sort Prop. +Functional Scheme bal_ind := Induction for bal Sort Prop. +Functional Scheme add_ind := Induction for add Sort Prop. +Functional Scheme remove_min_ind := Induction for remove_min Sort Prop. +Functional Scheme merge_ind := Induction for merge Sort Prop. +Functional Scheme remove_ind := Induction for remove Sort Prop. +Functional Scheme concat_ind := Induction for concat Sort Prop. +Functional Scheme split_ind := Induction for split Sort Prop. +Functional Scheme map_option_ind := Induction for map_option Sort Prop. +Functional Scheme map2_opt_ind := Induction for map2_opt Sort Prop. -(** Some helpful hints and tactics. *) +(** * Automation and dedicated tactics. *) -Notation t := tree. -Hint Constructors tree. -Hint Constructors MapsTo. -Hint Constructors In. -Hint Constructors bst. -Hint Constructors avl. +Hint Constructors tree MapsTo In bst. Hint Unfold lt_tree gt_tree. +Tactic Notation "factornode" ident(l) ident(x) ident(d) ident(r) ident(h) + "as" ident(s) := + set (s:=Node l x d r h) in *; clearbody s; clear l x d r h. + +(** A tactic for cleaning hypothesis after use of functional induction. *) + +Ltac clearf := + match goal with + | H : (@Logic.eq (Compare _ _ _ _) _ _) |- _ => clear H; clearf + | H : (@Logic.eq (sumbool _ _) _ _) |- _ => clear H; clearf + | _ => idtac + end. + +(** A tactic to repeat [inversion_clear] on all hyps of the + form [(f (Node ...))] *) + Ltac inv f := match goal with | H:f (Leaf _) |- _ => inversion_clear H; inv f @@ -149,14 +518,6 @@ Ltac inv f := | _ => idtac end. -Ltac safe_inv f := match goal with - | H:f (Node _ _ _ _ _) |- _ => - generalize H; inversion_clear H; safe_inv f - | H:f _ (Node _ _ _ _ _) |- _ => - generalize H; inversion_clear H; safe_inv f - | _ => intros - end. - Ltac inv_all f := match goal with | H: f _ |- _ => inversion_clear H; inv f @@ -166,55 +527,54 @@ Ltac inv_all f := | _ => idtac end. +(** Helper tactic concerning order of elements. *) + Ltac order := match goal with - | H: lt_tree ?x ?s, H1: In ?y ?s |- _ => generalize (H _ H1); clear H; order - | H: gt_tree ?x ?s, H1: In ?y ?s |- _ => generalize (H _ H1); clear H; order + | U: lt_tree _ ?s, V: In _ ?s |- _ => generalize (U _ V); clear U; order + | U: gt_tree _ ?s, V: In _ ?s |- _ => generalize (U _ V); clear U; order | _ => MX.order end. Ltac intuition_in := repeat progress (intuition; inv In; inv MapsTo). -Ltac firstorder_in := repeat progress (firstorder; inv In; inv MapsTo). -Lemma height_non_negative : forall elt (s : t elt), avl s -> height s >= 0. -Proof. - induction s; simpl; intros; auto with zarith. - inv avl; intuition; omega_max. -Qed. - -Ltac avl_nn_hyp H := - let nz := fresh "nz" in assert (nz := height_non_negative H). - -Ltac avl_nn h := - let t := type of h in - match type of t with - | Prop => avl_nn_hyp h - | _ => match goal with H : avl h |- _ => avl_nn_hyp H end - end. - -(* Repeat the previous tactic. - Drawback: need to clear the [avl _] hyps ... Thank you Ltac *) +(* Function/Functional Scheme can't deal with internal fix. + Let's do its job by hand: *) + +Ltac join_tac := + intros l; induction l as [| ll _ lx ld lr Hlr lh]; + [ | intros x d r; induction r as [| rl Hrl rx rd rr _ rh]; unfold join; + [ | destruct (gt_le_dec lh (rh+2)); + [ match goal with |- context [ bal ?u ?v ?w ?z ] => + replace (bal u v w z) + with (bal ll lx ld (join lr x d (Node rl rx rd rr rh))); [ | auto] + end + | destruct (gt_le_dec rh (lh+2)); + [ match goal with |- context [ bal ?u ?v ?w ?z ] => + replace (bal u v w z) + with (bal (join (Node ll lx ld lr lh) x d rl) rx rd rr); [ | auto] + end + | ] ] ] ]; intros. -Ltac avl_nns := - match goal with - | H:avl _ |- _ => avl_nn_hyp H; clear H; avl_nns - | _ => idtac - end. +Section Elt. +Variable elt:Type. +Implicit Types m r : t elt. +(** * Basic results about [MapsTo], [In], [lt_tree], [gt_tree], [height] *) (** Facts about [MapsTo] and [In]. *) -Lemma MapsTo_In : forall elt k e (m:t elt), MapsTo k e m -> In k m. +Lemma MapsTo_In : forall k e m, MapsTo k e m -> In k m. Proof. induction 1; auto. Qed. Hint Resolve MapsTo_In. -Lemma In_MapsTo : forall elt k (m:t elt), In k m -> exists e, MapsTo k e m. +Lemma In_MapsTo : forall k m, In k m -> exists e, MapsTo k e m. Proof. induction 1; try destruct IHIn as (e,He); exists e; auto. Qed. -Lemma In_alt : forall elt k (m:t elt), In0 k m <-> In k m. +Lemma In_alt : forall k m, In0 k m <-> In k m. Proof. split. intros (e,H); eauto. @@ -222,64 +582,70 @@ Proof. Qed. Lemma MapsTo_1 : - forall elt (m:t elt) x y e, X.eq x y -> MapsTo x e m -> MapsTo y e m. + forall m x y e, X.eq x y -> MapsTo x e m -> MapsTo y e m. Proof. induction m; simpl; intuition_in; eauto. Qed. Hint Immediate MapsTo_1. Lemma In_1 : - forall elt (m:t elt) x y, X.eq x y -> In x m -> In y m. + forall m x y, X.eq x y -> In x m -> In y m. Proof. - intros elt m x y; induction m; simpl; intuition_in; eauto. + intros m x y; induction m; simpl; intuition_in; eauto. Qed. +Lemma In_node_iff : + forall l x e r h y, + In y (Node l x e r h) <-> In y l \/ X.eq y x \/ In y r. +Proof. + intuition_in. +Qed. (** Results about [lt_tree] and [gt_tree] *) -Lemma lt_leaf : forall elt x, lt_tree x (Leaf elt). +Lemma lt_leaf : forall x, lt_tree x (Leaf elt). Proof. unfold lt_tree in |- *; intros; intuition_in. Qed. -Lemma gt_leaf : forall elt x, gt_tree x (Leaf elt). +Lemma gt_leaf : forall x, gt_tree x (Leaf elt). Proof. unfold gt_tree in |- *; intros; intuition_in. Qed. -Lemma lt_tree_node : forall elt x y (l:t elt) r e h, +Lemma lt_tree_node : forall x y l r e h, lt_tree x l -> lt_tree x r -> X.lt y x -> lt_tree x (Node l y e r h). Proof. - unfold lt_tree in *; firstorder_in; order. + unfold lt_tree in *; intuition_in; order. Qed. -Lemma gt_tree_node : forall elt x y (l:t elt) r e h, +Lemma gt_tree_node : forall x y l r e h, gt_tree x l -> gt_tree x r -> X.lt x y -> gt_tree x (Node l y e r h). Proof. - unfold gt_tree in *; firstorder_in; order. + unfold gt_tree in *; intuition_in; order. Qed. Hint Resolve lt_leaf gt_leaf lt_tree_node gt_tree_node. -Lemma lt_left : forall elt x y (l: t elt) r e h, +Lemma lt_left : forall x y l r e h, lt_tree x (Node l y e r h) -> lt_tree x l. Proof. intuition_in. Qed. -Lemma lt_right : forall elt x y (l:t elt) r e h, +Lemma lt_right : forall x y l r e h, lt_tree x (Node l y e r h) -> lt_tree x r. Proof. intuition_in. Qed. -Lemma gt_left : forall elt x y (l:t elt) r e h, +Lemma gt_left : forall x y l r e h, gt_tree x (Node l y e r h) -> gt_tree x l. Proof. intuition_in. Qed. -Lemma gt_right : forall elt x y (l:t elt) r e h, +Lemma gt_right : forall x y l r e h, gt_tree x (Node l y e r h) -> gt_tree x r. Proof. intuition_in. @@ -288,731 +654,639 @@ Qed. Hint Resolve lt_left lt_right gt_left gt_right. Lemma lt_tree_not_in : - forall elt x (t : t elt), lt_tree x t -> ~ In x t. + forall x m, lt_tree x m -> ~ In x m. Proof. intros; intro; generalize (H _ H0); order. Qed. Lemma lt_tree_trans : - forall elt x y, X.lt x y -> forall (t:t elt), lt_tree x t -> lt_tree y t. + forall x y, X.lt x y -> forall m, lt_tree x m -> lt_tree y m. Proof. - firstorder eauto. + eauto. Qed. Lemma gt_tree_not_in : - forall elt x (t : t elt), gt_tree x t -> ~ In x t. + forall x m, gt_tree x m -> ~ In x m. Proof. intros; intro; generalize (H _ H0); order. Qed. Lemma gt_tree_trans : - forall elt x y, X.lt y x -> forall (t:t elt), gt_tree x t -> gt_tree y t. + forall x y, X.lt y x -> forall m, gt_tree x m -> gt_tree y m. Proof. - firstorder eauto. + eauto. Qed. Hint Resolve lt_tree_not_in lt_tree_trans gt_tree_not_in gt_tree_trans. -(** Results about [avl] *) +(** * Empty map *) + +Definition Empty m := forall (a:key)(e:elt) , ~ MapsTo a e m. -Lemma avl_node : forall elt x e (l:t elt) r, - avl l -> - avl r -> - -(2) <= height l - height r <= 2 -> - avl (Node l x e r (max (height l) (height r) + 1)). +Lemma empty_bst : bst (empty elt). Proof. - intros; auto. + unfold empty; auto. Qed. -Hint Resolve avl_node. -(** * Helper functions *) - -(** [create l x r] creates a node, assuming [l] and [r] - to be balanced and [|height l - height r| <= 2]. *) +Lemma empty_1 : Empty (empty elt). +Proof. + unfold empty, Empty; intuition_in. +Qed. -Definition create elt (l:t elt) x e r := - Node l x e r (max (height l) (height r) + 1). +(** * Emptyness test *) -Lemma create_bst : - forall elt (l:t elt) x e r, bst l -> bst r -> lt_tree x l -> gt_tree x r -> - bst (create l x e r). +Lemma is_empty_1 : forall m, Empty m -> is_empty m = true. Proof. - unfold create; auto. + destruct m as [|r x e l h]; simpl; auto. + intro H; elim (H x e); auto. Qed. -Hint Resolve create_bst. -Lemma create_avl : - forall elt (l:t elt) x e r, avl l -> avl r -> -(2) <= height l - height r <= 2 -> - avl (create l x e r). -Proof. - unfold create; auto. +Lemma is_empty_2 : forall m, is_empty m = true -> Empty m. +Proof. + destruct m; simpl; intros; try discriminate; red; intuition_in. Qed. -Lemma create_height : - forall elt (l:t elt) x e r, avl l -> avl r -> -(2) <= height l - height r <= 2 -> - height (create l x e r) = max (height l) (height r) + 1. -Proof. - unfold create; intros; auto. +(** * Appartness *) + +Lemma mem_1 : forall m x, bst m -> In x m -> mem x m = true. +Proof. + intros m x; functional induction (mem x m); auto; intros; clearf; + inv bst; intuition_in; order. Qed. -Lemma create_in : - forall elt (l:t elt) x e r y, In y (create l x e r) <-> X.eq y x \/ In y l \/ In y r. -Proof. - unfold create; split; [ inversion_clear 1 | ]; intuition. +Lemma mem_2 : forall m x, mem x m = true -> In x m. +Proof. + intros m x; functional induction (mem x m); auto; intros; discriminate. Qed. -(** trick for emulating [assert false] in Coq *) +Lemma find_1 : forall m x e, bst m -> MapsTo x e m -> find x m = Some e. +Proof. + intros m x; functional induction (find x m); auto; intros; clearf; + inv bst; intuition_in; simpl; auto; + try solve [order | absurd (X.lt x y); eauto | absurd (X.lt y x); eauto]. +Qed. -Notation assert_false := Leaf. +Lemma find_2 : forall m x e, find x m = Some e -> MapsTo x e m. +Proof. + intros m x; functional induction (find x m); subst; intros; clearf; + try discriminate. + constructor 2; auto. + inversion H; auto. + constructor 3; auto. +Qed. -(** [bal l x e r] acts as [create], but performs one step of - rebalancing if necessary, i.e. assumes [|height l - height r| <= 3]. *) +Lemma find_iff : forall m x e, bst m -> + (find x m = Some e <-> MapsTo x e m). +Proof. + split; auto using find_1, find_2. +Qed. -Definition bal elt (l: tree elt) x e r := - let hl := height l in - let hr := height r in - if gt_le_dec hl (hr+2) then - match l with - | Leaf => assert_false _ - | Node ll lx le lr _ => - if ge_lt_dec (height ll) (height lr) then - create ll lx le (create lr x e r) - else - match lr with - | Leaf => assert_false _ - | Node lrl lrx lre lrr _ => - create (create ll lx le lrl) lrx lre (create lrr x e r) - end - end - else - if gt_le_dec hr (hl+2) then - match r with - | Leaf => assert_false _ - | Node rl rx re rr _ => - if ge_lt_dec (height rr) (height rl) then - create (create l x e rl) rx re rr - else - match rl with - | Leaf => assert_false _ - | Node rll rlx rle rlr _ => - create (create l x e rll) rlx rle (create rlr rx re rr) - end - end - else - create l x e r. - -Ltac bal_tac := - intros elt l x e r; - unfold bal; - destruct (gt_le_dec (height l) (height r + 2)); - [ destruct l as [ |ll lx le lr lh]; - [ | destruct (ge_lt_dec (height ll) (height lr)); - [ | destruct lr ] ] - | destruct (gt_le_dec (height r) (height l + 2)); - [ destruct r as [ |rl rx re rr rh]; - [ | destruct (ge_lt_dec (height rr) (height rl)); - [ | destruct rl ] ] - | ] ]; intros. - -Ltac bal_tac_imp := match goal with - | |- context [ assert_false ] => - inv avl; avl_nns; simpl in *; false_omega - | _ => idtac -end. +Lemma find_in : forall m x, find x m <> None -> In x m. +Proof. + intros. + case_eq (find x m); [intros|congruence]. + apply MapsTo_In with e; apply find_2; auto. +Qed. -Lemma bal_bst : forall elt (l:t elt) x e r, bst l -> bst r -> - lt_tree x l -> gt_tree x r -> bst (bal l x e r). +Lemma in_find : forall m x, bst m -> In x m -> find x m <> None. Proof. - bal_tac; - inv bst; repeat apply create_bst; auto; unfold create; - apply lt_tree_node || apply gt_tree_node; auto; - eapply lt_tree_trans || eapply gt_tree_trans || eauto; eauto. + intros. + destruct (In_MapsTo H0) as (d,Hd). + rewrite (find_1 H Hd); discriminate. Qed. -Lemma bal_avl : forall elt (l:t elt) x e r, avl l -> avl r -> - -(3) <= height l - height r <= 3 -> avl (bal l x e r). +Lemma find_in_iff : forall m x, bst m -> + (find x m <> None <-> In x m). Proof. - bal_tac; inv avl; repeat apply create_avl; simpl in *; auto; omega_max. + split; auto using find_in, in_find. Qed. -Lemma bal_height_1 : forall elt (l:t elt) x e r, avl l -> avl r -> - -(3) <= height l - height r <= 3 -> - 0 <= height (bal l x e r) - max (height l) (height r) <= 1. +Lemma not_find_iff : forall m x, bst m -> + (find x m = None <-> ~In x m). Proof. - bal_tac; inv avl; avl_nns; simpl in *; omega_max. + split; intros. + red; intros. + elim (in_find H H1 H0). + case_eq (find x m); [ intros | auto ]. + elim H0; apply find_in; congruence. Qed. -Lemma bal_height_2 : - forall elt (l:t elt) x e r, avl l -> avl r -> -(2) <= height l - height r <= 2 -> - height (bal l x e r) == max (height l) (height r) +1. +Lemma find_find : forall m m' x, + find x m = find x m' <-> + (forall d, find x m = Some d <-> find x m' = Some d). Proof. - bal_tac; inv avl; simpl in *; omega_max. + intros; destruct (find x m); destruct (find x m'); split; intros; + try split; try congruence. + rewrite H; auto. + symmetry; rewrite <- H; auto. + rewrite H; auto. Qed. -Lemma bal_in : forall elt (l:t elt) x e r y, avl l -> avl r -> - (In y (bal l x e r) <-> X.eq y x \/ In y l \/ In y r). +Lemma find_mapsto_equiv : forall m m' x, bst m -> bst m' -> + (find x m = find x m' <-> + (forall d, MapsTo x d m <-> MapsTo x d m')). Proof. - bal_tac; bal_tac_imp; repeat rewrite create_in; intuition_in. + intros m m' x Hm Hm'. + rewrite find_find. + split; intros H d; specialize H with d. + rewrite <- 2 find_iff; auto. + rewrite 2 find_iff; auto. Qed. -Lemma bal_mapsto : forall elt (l:t elt) x e r y e', avl l -> avl r -> - (MapsTo y e' (bal l x e r) <-> MapsTo y e' (create l x e r)). +Lemma find_in_equiv : forall m m' x, bst m -> bst m' -> + find x m = find x m' -> + (In x m <-> In x m'). Proof. - bal_tac; bal_tac_imp; unfold create; intuition_in. + split; intros; apply find_in; [ rewrite <- H1 | rewrite H1 ]; + apply in_find; auto. Qed. -Ltac omega_bal := match goal with - | H:avl ?l, H':avl ?r |- context [ bal ?l ?x ?e ?r ] => - generalize (bal_height_1 x e H H') (bal_height_2 x e H H'); - omega_max - end. +(** * Helper functions *) -(** * Insertion *) +Lemma create_bst : + forall l x e r, bst l -> bst r -> lt_tree x l -> gt_tree x r -> + bst (create l x e r). +Proof. + unfold create; auto. +Qed. +Hint Resolve create_bst. -Function add (elt:Set)(x:key)(e:elt)(s:t elt) { struct s } : t elt := match s with - | Leaf => Node (Leaf _) x e (Leaf _) 1 - | Node l y e' r h => - match X.compare x y with - | LT _ => bal (add x e l) y e' r - | EQ _ => Node l y e r h - | GT _ => bal l y e' (add x e r) - end - end. +Lemma create_in : + forall l x e r y, + In y (create l x e r) <-> X.eq y x \/ In y l \/ In y r. +Proof. + unfold create; split; [ inversion_clear 1 | ]; intuition. +Qed. -Lemma add_avl_1 : forall elt (m:t elt) x e, avl m -> - avl (add x e m) /\ 0 <= height (add x e m) - height m <= 1. -Proof. - intros elt m x e; functional induction (add x e m); intros; inv avl; simpl in *. - intuition; try constructor; simpl; auto; try omega_max. - (* LT *) - destruct IHt; auto. - split. - apply bal_avl; auto; omega_max. - omega_bal. - (* EQ *) - intuition; omega_max. - (* GT *) - destruct IHt; auto. - split. - apply bal_avl; auto; omega_max. - omega_bal. +Lemma bal_bst : forall l x e r, bst l -> bst r -> + lt_tree x l -> gt_tree x r -> bst (bal l x e r). +Proof. + intros l x e r; functional induction (bal l x e r); intros; clearf; + inv bst; repeat apply create_bst; auto; unfold create; try constructor; + (apply lt_tree_node || apply gt_tree_node); auto; + (eapply lt_tree_trans || eapply gt_tree_trans); eauto. Qed. +Hint Resolve bal_bst. -Lemma add_avl : forall elt (m:t elt) x e, avl m -> avl (add x e m). +Lemma bal_in : forall l x e r y, + In y (bal l x e r) <-> X.eq y x \/ In y l \/ In y r. Proof. - intros; generalize (add_avl_1 x e H); intuition. + intros l x e r; functional induction (bal l x e r); intros; clearf; + rewrite !create_in; intuition_in. Qed. -Hint Resolve add_avl. -Lemma add_in : forall elt (m:t elt) x y e, avl m -> - (In y (add x e m) <-> X.eq y x \/ In y m). +Lemma bal_mapsto : forall l x e r y e', + MapsTo y e' (bal l x e r) <-> MapsTo y e' (create l x e r). Proof. - intros elt m x y e; functional induction (add x e m); auto; intros. - intuition_in. - (* LT *) - inv avl. - rewrite bal_in; auto. - rewrite (IHt H0); intuition_in. - (* EQ *) - inv avl. - firstorder_in. - eapply In_1; eauto. - (* GT *) - inv avl. - rewrite bal_in; auto. - rewrite (IHt H1); intuition_in. + intros l x e r; functional induction (bal l x e r); intros; clearf; + unfold assert_false, create; intuition_in. Qed. -Lemma add_bst : forall elt (m:t elt) x e, bst m -> avl m -> bst (add x e m). -Proof. - intros elt m x e; functional induction (add x e m); - intros; inv bst; inv avl; auto; apply bal_bst; auto. - (* lt_tree -> lt_tree (add ...) *) - red; red in H4. - intros. - rewrite (add_in x y0 e H) in H0. - intuition. - eauto. - (* gt_tree -> gt_tree (add ...) *) - red; red in H4. - intros. - rewrite (add_in x y0 e H5) in H0. - intuition. - apply lt_eq with x; auto. +Lemma bal_find : forall l x e r y, + bst l -> bst r -> lt_tree x l -> gt_tree x r -> + find y (bal l x e r) = find y (create l x e r). +Proof. + intros; rewrite find_mapsto_equiv; auto; intros; apply bal_mapsto. Qed. -Lemma add_1 : forall elt (m:t elt) x y e, avl m -> X.eq x y -> MapsTo y e (add x e m). +(** * Insertion *) + +Lemma add_in : forall m x y e, + In y (add x e m) <-> X.eq y x \/ In y m. +Proof. + intros m x y e; functional induction (add x e m); auto; intros; + try (rewrite bal_in, IHt); intuition_in. + apply In_1 with x; auto. +Qed. + +Lemma add_bst : forall m x e, bst m -> bst (add x e m). +Proof. + intros m x e; functional induction (add x e m); intros; + inv bst; try apply bal_bst; auto; + intro z; rewrite add_in; intuition. + apply MX.eq_lt with x; auto. + apply MX.lt_eq with x; auto. +Qed. +Hint Resolve add_bst. + +Lemma add_1 : forall m x y e, X.eq x y -> MapsTo y e (add x e m). Proof. - intros elt m x y e; functional induction (add x e m); - intros; inv bst; inv avl; try rewrite bal_mapsto; unfold create; eauto. -Qed. + intros m x y e; functional induction (add x e m); + intros; inv bst; try rewrite bal_mapsto; unfold create; eauto. +Qed. -Lemma add_2 : forall elt (m:t elt) x y e e', avl m -> ~X.eq x y -> +Lemma add_2 : forall m x y e e', ~X.eq x y -> MapsTo y e m -> MapsTo y e (add x e' m). Proof. - intros elt m x y e e'; induction m; simpl; auto. + intros m x y e e'; induction m; simpl; auto. destruct (X.compare x k); - intros; inv bst; inv avl; try rewrite bal_mapsto; unfold create; auto; + intros; inv bst; try rewrite bal_mapsto; unfold create; auto; inv MapsTo; auto; order. Qed. -Lemma add_3 : forall elt (m:t elt) x y e e', avl m -> ~X.eq x y -> +Lemma add_3 : forall m x y e e', ~X.eq x y -> MapsTo y e (add x e' m) -> MapsTo y e m. Proof. - intros elt m x y e e'; induction m; simpl; auto. - intros; inv avl; inv MapsTo; auto; order. - destruct (X.compare x k); intro; inv avl; + intros m x y e e'; induction m; simpl; auto. + intros; inv MapsTo; auto; order. + destruct (X.compare x k); intro; try rewrite bal_mapsto; auto; unfold create; intros; inv MapsTo; auto; - order. + order. Qed. - -(** * Extraction of minimum binding - - morally, [remove_min] is to be applied to a non-empty tree - [t = Node l x e r h]. Since we can't deal here with [assert false] - for [t=Leaf], we pre-unpack [t] (and forget about [h]). -*) - -Function remove_min (elt:Set)(l:t elt)(x:key)(e:elt)(r:t elt) { struct l } : t elt*(key*elt) := - match l with - | Leaf => (r,(x,e)) - | Node ll lx le lr lh => let (l',m) := (remove_min ll lx le lr : t elt*(key*elt)) in (bal l' x e r, m) - end. - -Lemma remove_min_avl_1 : forall elt (l:t elt) x e r h, avl (Node l x e r h) -> - avl (fst (remove_min l x e r)) /\ - 0 <= height (Node l x e r h) - height (fst (remove_min l x e r)) <= 1. +Lemma add_find : forall m x y e, bst m -> + find y (add x e m) = + match X.compare y x with EQ _ => Some e | _ => find y m end. Proof. - intros elt l x e r; functional induction (remove_min l x e r); simpl in *; intros. - inv avl; simpl in *; split; auto. - avl_nns; omega_max. - (* l = Node *) - inversion_clear H. - destruct (IHp lh); auto. - split; simpl in *. - rewrite_all e1. simpl in *. - apply bal_avl; subst;auto; omega_max. - rewrite_all e1;simpl in *;omega_bal. + intros. + assert (~X.eq x y -> find y (add x e m) = find y m). + intros; rewrite find_mapsto_equiv; auto. + split; eauto using add_2, add_3. + destruct X.compare; try (apply H0; order). + auto using find_1, add_1. Qed. -Lemma remove_min_avl : forall elt (l:t elt) x e r h, avl (Node l x e r h) -> - avl (fst (remove_min l x e r)). -Proof. - intros; generalize (remove_min_avl_1 H); intuition. -Qed. +(** * Extraction of minimum binding *) -Lemma remove_min_in : forall elt (l:t elt) x e r h y, avl (Node l x e r h) -> - (In y (Node l x e r h) <-> - X.eq y (fst (snd (remove_min l x e r))) \/ In y (fst (remove_min l x e r))). +Lemma remove_min_in : forall l x e r h y, + In y (Node l x e r h) <-> + X.eq y (remove_min l x e r)#2#1 \/ In y (remove_min l x e r)#1. Proof. - intros elt l x e r; functional induction (remove_min l x e r); simpl in *; intros. + intros l x e r; functional induction (remove_min l x e r); simpl in *; intros. intuition_in. - (* l = Node *) - inversion_clear H. - generalize (remove_min_avl H0). - - rewrite_all e1; simpl; intros. - rewrite bal_in; auto. - generalize (IHp lh y H0). - intuition. - inversion_clear H7; intuition. + rewrite e0 in *; simpl; intros. + rewrite bal_in, In_node_iff, IHp; intuition. Qed. -Lemma remove_min_mapsto : forall elt (l:t elt) x e r h y e', avl (Node l x e r h) -> - (MapsTo y e' (Node l x e r h) <-> - ((X.eq y (fst (snd (remove_min l x e r))) /\ e' = (snd (snd (remove_min l x e r)))) - \/ MapsTo y e' (fst (remove_min l x e r)))). +Lemma remove_min_mapsto : forall l x e r h y e', + MapsTo y e' (Node l x e r h) <-> + ((X.eq y (remove_min l x e r)#2#1) /\ e' = (remove_min l x e r)#2#2) + \/ MapsTo y e' (remove_min l x e r)#1. Proof. - intros elt l x e r; functional induction (remove_min l x e r); simpl in *; intros. + intros l x e r; functional induction (remove_min l x e r); simpl in *; intros. intuition_in; subst; auto. - (* l = Node *) - inversion_clear H. - generalize (remove_min_avl H0). - rewrite_all e1; simpl; intros. + rewrite e0 in *; simpl; intros. rewrite bal_mapsto; auto; unfold create. - simpl in *;destruct (IHp lh y e'). - auto. + simpl in *;destruct (IHp _x y e'). intuition. - inversion_clear H2; intuition. - inversion_clear H9; intuition. + inversion_clear H1; intuition. + inversion_clear H3; intuition. Qed. -Lemma remove_min_bst : forall elt (l:t elt) x e r h, - bst (Node l x e r h) -> avl (Node l x e r h) -> bst (fst (remove_min l x e r)). +Lemma remove_min_bst : forall l x e r h, + bst (Node l x e r h) -> bst (remove_min l x e r)#1. Proof. - intros elt l x e r; functional induction (remove_min l x e r); simpl in *; intros. + intros l x e r; functional induction (remove_min l x e r); simpl in *; intros. inv bst; auto. inversion_clear H; inversion_clear H0. apply bal_bst; auto. - rewrite_all e1;simpl in *;firstorder. + rewrite e0 in *; simpl in *; apply (IHp _x); auto. intro; intros. - generalize (remove_min_in y H). - rewrite_all e1; simpl in *. + generalize (remove_min_in ll lx ld lr _x y). + rewrite e0; simpl in *. destruct 1. - apply H3; intuition. + apply H2; intuition. Qed. +Hint Resolve remove_min_bst. -Lemma remove_min_gt_tree : forall elt (l:t elt) x e r h, - bst (Node l x e r h) -> avl (Node l x e r h) -> - gt_tree (fst (snd (remove_min l x e r))) (fst (remove_min l x e r)). +Lemma remove_min_gt_tree : forall l x e r h, + bst (Node l x e r h) -> + gt_tree (remove_min l x e r)#2#1 (remove_min l x e r)#1. Proof. - intros elt l x e r; functional induction (remove_min l x e r); simpl in *; intros. + intros l x e r; functional induction (remove_min l x e r); simpl in *; intros. inv bst; auto. - inversion_clear H; inversion_clear H0. + inversion_clear H. intro; intro. - rewrite_all e1;simpl in *. - generalize (IHp lh H1 H); clear H7 H6 IHp. - generalize (remove_min_avl H). - generalize (remove_min_in (fst m) H). - rewrite e1; simpl; intros. - rewrite (bal_in x e y H7 H5) in H0. - destruct H6. - firstorder. - apply lt_eq with x; auto. - apply X.lt_trans with x; auto. -Qed. - -(** * Merging two trees - - [merge t1 t2] builds the union of [t1] and [t2] assuming all elements - of [t1] to be smaller than all elements of [t2], and - [|height t1 - height t2| <= 2]. -*) - -Function merge (elt:Set) (s1 s2 : t elt) : tree elt := match s1,s2 with - | Leaf, _ => s2 - | _, Leaf => s1 - | _, Node l2 x2 e2 r2 h2 => - match remove_min l2 x2 e2 r2 with - (s2',(x,e)) => bal s1 x e s2' - end -end. - -Lemma merge_avl_1 : forall elt (s1 s2:t elt), avl s1 -> avl s2 -> - -(2) <= height s1 - height s2 <= 2 -> - avl (merge s1 s2) /\ - 0<= height (merge s1 s2) - max (height s1) (height s2) <=1. -Proof. - intros elt s1 s2; functional induction (merge s1 s2); simpl in *; intros. - split; auto; avl_nns; omega_max. - destruct s1;try contradiction;clear y. - split; auto; avl_nns; simpl in *; omega_max. - destruct s1;try contradiction;clear y. - generalize (remove_min_avl_1 H0). - rewrite e3; simpl;destruct 1. - split. - apply bal_avl; auto. - simpl; omega_max. - omega_bal. -Qed. - -Lemma merge_avl : forall elt (s1 s2:t elt), avl s1 -> avl s2 -> - -(2) <= height s1 - height s2 <= 2 -> avl (merge s1 s2). -Proof. - intros; generalize (merge_avl_1 H H0 H1); intuition. -Qed. - -Lemma merge_in : forall elt (s1 s2:t elt) y, bst s1 -> avl s1 -> bst s2 -> avl s2 -> - (In y (merge s1 s2) <-> In y s1 \/ In y s2). -Proof. - intros elt s1 s2; functional induction (merge s1 s2);intros. - intuition_in. - intuition_in. - destruct s1;try contradiction;clear y. -(* rewrite H_eq_2; rewrite H_eq_2 in H_eq_1; clear H_eq_2. *) - replace s2' with (fst (remove_min l2 x2 e2 r2)); [|rewrite e3; auto]. - rewrite bal_in; auto. - generalize (remove_min_avl H2); rewrite e3; simpl; auto. - generalize (remove_min_in y0 H2); rewrite e3; simpl; intro. - rewrite H3; intuition. -Qed. - -Lemma merge_mapsto : forall elt (s1 s2:t elt) y e, bst s1 -> avl s1 -> bst s2 -> avl s2 -> - (MapsTo y e (merge s1 s2) <-> MapsTo y e s1 \/ MapsTo y e s2). + rewrite e0 in *;simpl in *. + generalize (IHp _x H0). + generalize (remove_min_in ll lx ld lr _x m#1). + rewrite e0; simpl; intros. + rewrite (bal_in l' x d r y) in H. + assert (In m#1 (Node ll lx ld lr _x)) by (rewrite H4; auto); clear H4. + assert (X.lt m#1 x) by order. + decompose [or] H; order. +Qed. +Hint Resolve remove_min_gt_tree. + +Lemma remove_min_find : forall l x e r h y, + bst (Node l x e r h) -> + find y (Node l x e r h) = + match X.compare y (remove_min l x e r)#2#1 with + | LT _ => None + | EQ _ => Some (remove_min l x e r)#2#2 + | GT _ => find y (remove_min l x e r)#1 + end. Proof. - intros elt s1 s2; functional induction (@merge elt s1 s2); intros. - intuition_in. - intuition_in. - destruct s1;try contradiction;clear y. - replace s2' with (fst (remove_min l2 x2 e2 r2)); [|rewrite e3; auto]. - rewrite bal_mapsto; auto; unfold create. - generalize (remove_min_avl H2); rewrite e3; simpl; auto. - generalize (remove_min_mapsto y0 e H2); rewrite e3; simpl; intro. - rewrite H3; intuition (try subst; auto). - inversion_clear H3; intuition. + intros. + destruct X.compare. + rewrite not_find_iff; auto. + rewrite remove_min_in; red; destruct 1 as [H'|H']; [ order | ]. + generalize (remove_min_gt_tree H H'); order. + apply find_1; auto. + rewrite remove_min_mapsto; auto. + rewrite find_mapsto_equiv; eauto; intros. + rewrite remove_min_mapsto; intuition; order. Qed. -Lemma merge_bst : forall elt (s1 s2:t elt), bst s1 -> avl s1 -> bst s2 -> avl s2 -> - (forall y1 y2 : key, In y1 s1 -> In y2 s2 -> X.lt y1 y2) -> - bst (merge s1 s2). -Proof. - intros elt s1 s2; functional induction (@merge elt s1 s2); intros; auto. - - apply bal_bst; auto. - destruct s1;try contradiction. - generalize (remove_min_bst H1); rewrite e3; simpl in *; auto. - destruct s1;try contradiction. - intro; intro. - apply H3; auto. - generalize (remove_min_in x H2); rewrite e3; simpl; intuition. - destruct s1;try contradiction. - generalize (remove_min_gt_tree H1); rewrite e3; simpl; auto. -Qed. - -(** * Deletion *) +(** * Merging two trees *) -Function remove (elt:Set)(x:key)(s:t elt) { struct s } : t elt := match s with - | Leaf => Leaf _ - | Node l y e r h => - match X.compare x y with - | LT _ => bal (remove x l) y e r - | EQ _ => merge l r - | GT _ => bal l y e (remove x r) - end - end. +Lemma merge_in : forall m1 m2 y, bst m1 -> bst m2 -> + (In y (merge m1 m2) <-> In y m1 \/ In y m2). +Proof. + intros m1 m2; functional induction (merge m1 m2);intros; + try factornode _x _x0 _x1 _x2 _x3 as m1. + intuition_in. + intuition_in. + rewrite bal_in, remove_min_in, e1; simpl; intuition. +Qed. -Lemma remove_avl_1 : forall elt (s:t elt) x, avl s -> - avl (remove x s) /\ 0 <= height s - height (remove x s) <= 1. +Lemma merge_mapsto : forall m1 m2 y e, bst m1 -> bst m2 -> + (MapsTo y e (merge m1 m2) <-> MapsTo y e m1 \/ MapsTo y e m2). Proof. - intros elt s x; functional induction (@remove elt x s); intros. - split; auto; omega_max. - (* LT *) - inv avl. - destruct (IHt H0). - split. - apply bal_avl; auto. - omega_max. - omega_bal. - (* EQ *) - inv avl. - generalize (merge_avl_1 H0 H1 H2). - intuition omega_max. - (* GT *) - inv avl. - destruct (IHt H1). - split. - apply bal_avl; auto. - omega_max. - omega_bal. + intros m1 m2; functional induction (merge m1 m2); intros; + try factornode _x _x0 _x1 _x2 _x3 as m1. + intuition_in. + intuition_in. + rewrite bal_mapsto, remove_min_mapsto, e1; simpl; auto. + unfold create. + intuition; subst; auto. + inversion_clear H1; intuition. Qed. -Lemma remove_avl : forall elt (s:t elt) x, avl s -> avl (remove x s). -Proof. - intros; generalize (remove_avl_1 x H); intuition. +Lemma merge_bst : forall m1 m2, bst m1 -> bst m2 -> + (forall y1 y2 : key, In y1 m1 -> In y2 m2 -> X.lt y1 y2) -> + bst (merge m1 m2). +Proof. + intros m1 m2; functional induction (merge m1 m2); intros; auto; + try factornode _x _x0 _x1 _x2 _x3 as m1. + apply bal_bst; auto. + generalize (remove_min_bst H0); rewrite e1; simpl in *; auto. + intro; intro. + apply H1; auto. + generalize (remove_min_in l2 x2 d2 r2 _x4 x); rewrite e1; simpl; intuition. + generalize (remove_min_gt_tree H0); rewrite e1; simpl; auto. Qed. -Hint Resolve remove_avl. -Lemma remove_in : forall elt (s:t elt) x y, bst s -> avl s -> - (In y (remove x s) <-> ~ X.eq y x /\ In y s). +(** * Deletion *) + +Lemma remove_in : forall m x y, bst m -> + (In y (remove x m) <-> ~ X.eq y x /\ In y m). Proof. - intros elt s x; functional induction (@remove elt x s); simpl; intros. + intros m x; functional induction (remove x m); simpl; intros. intuition_in. (* LT *) - inv avl; inv bst; clear e1. + inv bst; clear e0. rewrite bal_in; auto. generalize (IHt y0 H0); intuition; [ order | order | intuition_in ]. (* EQ *) - inv avl; inv bst; clear e1. + inv bst; clear e0. rewrite merge_in; intuition; [ order | order | intuition_in ]. - elim H9; eauto. + elim H4; eauto. (* GT *) - inv avl; inv bst; clear e1. + inv bst; clear e0. rewrite bal_in; auto. - generalize (IHt y0 H5); intuition; [ order | order | intuition_in ]. + generalize (IHt y0 H1); intuition; [ order | order | intuition_in ]. Qed. -Lemma remove_bst : forall elt (s:t elt) x, bst s -> avl s -> bst (remove x s). +Lemma remove_bst : forall m x, bst m -> bst (remove x m). Proof. - intros elt s x; functional induction (@remove elt x s); simpl; intros. + intros m x; functional induction (remove x m); simpl; intros. auto. (* LT *) - inv avl; inv bst. + inv bst. apply bal_bst; auto. intro; intro. rewrite (remove_in x y0 H0) in H; auto. destruct H; eauto. (* EQ *) - inv avl; inv bst. + inv bst. apply merge_bst; eauto. (* GT *) - inv avl; inv bst. + inv bst. apply bal_bst; auto. intro; intro. - rewrite (remove_in x y0 H5) in H; auto. + rewrite (remove_in x y0 H1) in H; auto. destruct H; eauto. Qed. -Lemma remove_1 : forall elt (m:t elt) x y, bst m -> avl m -> X.eq x y -> ~ In y (remove x m). +Lemma remove_1 : forall m x y, bst m -> X.eq x y -> ~ In y (remove x m). Proof. intros; rewrite remove_in; intuition. -Qed. +Qed. -Lemma remove_2 : forall elt (m:t elt) x y e, bst m -> avl m -> ~X.eq x y -> +Lemma remove_2 : forall m x y e, bst m -> ~X.eq x y -> MapsTo y e m -> MapsTo y e (remove x m). Proof. - intros elt m x y e; induction m; simpl; auto. + intros m x y e; induction m; simpl; auto. destruct (X.compare x k); - intros; inv bst; inv avl; try rewrite bal_mapsto; unfold create; auto; + intros; inv bst; try rewrite bal_mapsto; unfold create; auto; try solve [inv MapsTo; auto]. rewrite merge_mapsto; auto. inv MapsTo; auto; order. Qed. -Lemma remove_3 : forall elt (m:t elt) x y e, bst m -> avl m -> +Lemma remove_3 : forall m x y e, bst m -> MapsTo y e (remove x m) -> MapsTo y e m. Proof. - intros elt m x y e; induction m; simpl; auto. - destruct (X.compare x k); intros Bs Av; inv avl; inv bst; + intros m x y e; induction m; simpl; auto. + destruct (X.compare x k); intros Bs; inv bst; try rewrite bal_mapsto; auto; unfold create. - intros; inv MapsTo; auto. + intros; inv MapsTo; auto. rewrite merge_mapsto; intuition. intros; inv MapsTo; auto. Qed. -Section Elt2. +(** * join *) + +Lemma join_in : forall l x d r y, + In y (join l x d r) <-> X.eq y x \/ In y l \/ In y r. +Proof. + join_tac. + simpl. + rewrite add_in; intuition_in. + rewrite add_in; intuition_in. + rewrite bal_in, Hlr; clear Hlr Hrl; intuition_in. + rewrite bal_in, Hrl; clear Hlr Hrl; intuition_in. + apply create_in. +Qed. + +Lemma join_bst : forall l x d r, bst l -> bst r -> + lt_tree x l -> gt_tree x r -> bst (join l x d r). +Proof. + join_tac; auto; try (simpl; auto; fail); inv bst; apply bal_bst; auto; + clear Hrl Hlr z; intro; intros; rewrite join_in in *. + intuition; [ apply MX.lt_eq with x | ]; eauto. + intuition; [ apply MX.eq_lt with x | ]; eauto. +Qed. +Hint Resolve join_bst. + +Lemma join_find : forall l x d r y, + bst l -> bst r -> lt_tree x l -> gt_tree x r -> + find y (join l x d r) = find y (create l x d r). +Proof. + join_tac; auto; inv bst; + simpl (join (Leaf elt)); + try (assert (X.lt lx x) by auto); + try (assert (X.lt x rx) by auto); + rewrite ?add_find, ?bal_find; auto. -Variable elt:Set. + simpl; destruct X.compare; auto. + rewrite not_find_iff; auto; intro; order. -Notation eqk := (eqk (elt:= elt)). -Notation eqke := (eqke (elt:= elt)). -Notation ltk := (ltk (elt:= elt)). + simpl; repeat (destruct X.compare; auto); try (order; fail). + rewrite not_find_iff by auto; intro. + assert (X.lt y x) by auto; order. -(** * Empty map *) + simpl; rewrite Hlr; simpl; auto. + repeat (destruct X.compare; auto); order. + intros u Hu; rewrite join_in in Hu. + destruct Hu as [Hu|[Hu|Hu]]; try generalize (H2 _ Hu); order. -Definition Empty m := forall (a : key)(e:elt) , ~ MapsTo a e m. + simpl; rewrite Hrl; simpl; auto. + repeat (destruct X.compare; auto); order. + intros u Hu; rewrite join_in in Hu. + destruct Hu as [Hu|[Hu|Hu]]; order. +Qed. -Definition empty := (Leaf elt). +(** * split *) -Lemma empty_bst : bst empty. +Lemma split_in_1 : forall m x, bst m -> forall y, + (In y (split x m)#l <-> In y m /\ X.lt y x). Proof. - unfold empty; auto. + intros m x; functional induction (split x m); simpl; intros; + inv bst; try clear e0. + intuition_in. + rewrite e1 in IHt; simpl in IHt; rewrite IHt; intuition_in; order. + intuition_in; order. + rewrite join_in. + rewrite e1 in IHt; simpl in IHt; rewrite IHt; intuition_in; order. Qed. -Lemma empty_avl : avl empty. +Lemma split_in_2 : forall m x, bst m -> forall y, + (In y (split x m)#r <-> In y m /\ X.lt x y). Proof. - unfold empty; auto. + intros m x; functional induction (split x m); subst; simpl; intros; + inv bst; try clear e0. + intuition_in. + rewrite join_in. + rewrite e1 in IHt; simpl in IHt; rewrite IHt; intuition_in; order. + intuition_in; order. + rewrite e1 in IHt; simpl in IHt; rewrite IHt; intuition_in; order. Qed. -Lemma empty_1 : Empty empty. +Lemma split_in_3 : forall m x, bst m -> + (split x m)#o = find x m. Proof. - unfold empty, Empty; intuition_in. + intros m x; functional induction (split x m); subst; simpl; auto; + intros; inv bst; try clear e0; + destruct X.compare; try (order;fail); rewrite <-IHt, e1; auto. Qed. -(** * Emptyness test *) - -Definition is_empty (s:t elt) := match s with Leaf => true | _ => false end. +Lemma split_bst : forall m x, bst m -> + bst (split x m)#l /\ bst (split x m)#r. +Proof. + intros m x; functional induction (split x m); subst; simpl; intros; + inv bst; try clear e0; try rewrite e1 in *; simpl in *; intuition; + apply join_bst; auto. + intros y0. + generalize (split_in_2 x H0 y0); rewrite e1; simpl; intuition. + intros y0. + generalize (split_in_1 x H1 y0); rewrite e1; simpl; intuition. +Qed. -Lemma is_empty_1 : forall s, Empty s -> is_empty s = true. +Lemma split_lt_tree : forall m x, bst m -> lt_tree x (split x m)#l. Proof. - destruct s as [|r x e l h]; simpl; auto. - intro H; elim (H x e); auto. + intros m x B y Hy; rewrite split_in_1 in Hy; intuition. Qed. -Lemma is_empty_2 : forall s, is_empty s = true -> Empty s. -Proof. - destruct s; simpl; intros; try discriminate; red; intuition_in. +Lemma split_gt_tree : forall m x, bst m -> gt_tree x (split x m)#r. +Proof. + intros m x B y Hy; rewrite split_in_2 in Hy; intuition. Qed. -(** * Appartness *) - -(** The [mem] function is deciding appartness. It exploits the [bst] property - to achieve logarithmic complexity. *) +Lemma split_find : forall m x y, bst m -> + find y m = match X.compare y x with + | LT _ => find y (split x m)#l + | EQ _ => (split x m)#o + | GT _ => find y (split x m)#r + end. +Proof. + intros m x; functional induction (split x m); subst; simpl; intros; + inv bst; try clear e0; try rewrite e1 in *; simpl in *; + [ destruct X.compare; auto | .. ]; + try match goal with E:split ?x ?t = _, B:bst ?t |- _ => + generalize (split_in_1 x B)(split_in_2 x B)(split_bst x B); + rewrite E; simpl; destruct 3 end. -Function mem (x:key)(m:t elt) { struct m } : bool := - match m with - | Leaf => false - | Node l y e r _ => match X.compare x y with - | LT _ => mem x l - | EQ _ => true - | GT _ => mem x r - end - end. -Implicit Arguments mem. + rewrite join_find, IHt; auto; clear IHt; simpl. + repeat (destruct X.compare; auto); order. + intro y1; rewrite H4; intuition. -Lemma mem_1 : forall s x, bst s -> In x s -> mem x s = true. -Proof. - intros s x. - functional induction (mem x s); inversion_clear 1; auto. - intuition_in. - intuition_in; firstorder; absurd (X.lt x y); eauto. - intuition_in; firstorder; absurd (X.lt y x); eauto. -Qed. + repeat (destruct X.compare; auto); order. -Lemma mem_2 : forall s x, mem x s = true -> In x s. -Proof. - intros s x. - functional induction (mem x s); firstorder; intros; try discriminate. + rewrite join_find, IHt; auto; clear IHt; simpl. + repeat (destruct X.compare; auto); order. + intros y1; rewrite H; intuition. Qed. -Function find (x:key)(m:t elt) { struct m } : option elt := - match m with - | Leaf => None - | Node l y e r _ => match X.compare x y with - | LT _ => find x l - | EQ _ => Some e - | GT _ => find x r - end - end. +(** * Concatenation *) -Lemma find_1 : forall m x e, bst m -> MapsTo x e m -> find x m = Some e. -Proof. - intros m x e. - functional induction (find x m); inversion_clear 1; auto. +Lemma concat_in : forall m1 m2 y, + In y (concat m1 m2) <-> In y m1 \/ In y m2. +Proof. + intros m1 m2; functional induction (concat m1 m2); intros; + try factornode _x _x0 _x1 _x2 _x3 as m1. intuition_in. - intuition_in; firstorder; absurd (X.lt x y); eauto. - intuition_in; auto. - absurd (X.lt x y); eauto. - absurd (X.lt y x); eauto. - intuition_in; firstorder; absurd (X.lt y x); eauto. + intuition_in. + rewrite join_in, remove_min_in, e1; simpl; intuition. Qed. -Lemma find_2 : forall m x e, find x m = Some e -> MapsTo x e m. -Proof. - intros m x. - functional induction (find x m); subst;firstorder; intros; try discriminate. - inversion H; subst; auto. -Qed. - -(** An all-in-one spec for [add] used later in the naive [map2] *) - -Lemma add_spec : forall m x y e , bst m -> avl m -> - find x (add y e m) = if eq_dec x y then Some e else find x m. -Proof. -intros. -destruct (eq_dec x y). -apply find_1. -apply add_bst; auto. -eapply MapsTo_1 with y; eauto. -apply add_1; auto. -case_eq (find x m); intros. -apply find_1. -apply add_bst; auto. -apply add_2; auto. -apply find_2; auto. -case_eq (find x (add y e m)); auto; intros. -rewrite <- H1; symmetry. -apply find_1; auto. -eapply add_3; eauto. -apply find_2; eauto. +Lemma concat_bst : forall m1 m2, bst m1 -> bst m2 -> + (forall y1 y2, In y1 m1 -> In y2 m2 -> X.lt y1 y2) -> + bst (concat m1 m2). +Proof. + intros m1 m2; functional induction (concat m1 m2); intros; auto; + try factornode _x _x0 _x1 _x2 _x3 as m1. + apply join_bst; auto. + change (bst (m2',xd)#1); rewrite <-e1; eauto. + intros y Hy. + apply H1; auto. + rewrite remove_min_in, e1; simpl; auto. + change (gt_tree (m2',xd)#2#1 (m2',xd)#1); rewrite <-e1; eauto. Qed. +Hint Resolve concat_bst. -(** * Elements *) +Lemma concat_find : forall m1 m2 y, bst m1 -> bst m2 -> + (forall y1 y2, In y1 m1 -> In y2 m2 -> X.lt y1 y2) -> + find y (concat m1 m2) = + match find y m2 with Some d => Some d | None => find y m1 end. +Proof. + intros m1 m2; functional induction (concat m1 m2); intros; auto; + try factornode _x _x0 _x1 _x2 _x3 as m1. + simpl; destruct (find y m2); auto. -(** [elements_tree_aux acc t] catenates the elements of [t] in infix - order to the list [acc] *) + generalize (remove_min_find y H0)(remove_min_in l2 x2 d2 r2 _x4) + (remove_min_bst H0)(remove_min_gt_tree H0); + rewrite e1; simpl fst; simpl snd; intros. + + inv bst. + rewrite H2, join_find; auto; clear H2. + simpl; destruct X.compare; simpl; auto. + destruct (find y m2'); auto. + symmetry; rewrite not_find_iff; auto; intro. + apply (MX.lt_not_gt l); apply H1; auto; rewrite H3; auto. -Fixpoint elements_aux (acc : list (key*elt)) (t : t elt) {struct t} : list (key*elt) := - match t with - | Leaf => acc - | Node l x e r _ => elements_aux ((x,e) :: elements_aux acc r) l - end. + intros z Hz; apply H1; auto; rewrite H3; auto. +Qed. -(** then [elements] is an instanciation with an empty [acc] *) -Definition elements := elements_aux nil. +(** * Elements *) -Lemma elements_aux_mapsto : forall s acc x e, +Notation eqk := (PX.eqk (elt:= elt)). +Notation eqke := (PX.eqke (elt:= elt)). +Notation ltk := (PX.ltk (elt:= elt)). + +Lemma elements_aux_mapsto : forall (s:t elt) acc x e, InA eqke (x,e) (elements_aux acc s) <-> MapsTo x e s \/ InA eqke (x,e) acc. Proof. induction s as [ | l Hl x e r Hr h ]; simpl; auto. @@ -1025,13 +1299,13 @@ Proof. destruct H0; simpl in *; subst; intuition. Qed. -Lemma elements_mapsto : forall s x e, InA eqke (x,e) (elements s) <-> MapsTo x e s. +Lemma elements_mapsto : forall (s:t elt) x e, InA eqke (x,e) (elements s) <-> MapsTo x e s. Proof. intros; generalize (elements_aux_mapsto s nil x e); intuition. inversion_clear H0. Qed. -Lemma elements_in : forall s x, L.PX.In x (elements s) <-> In x s. +Lemma elements_in : forall (s:t elt) x, L.PX.In x (elements s) <-> In x s. Proof. intros. unfold L.PX.In. @@ -1043,7 +1317,7 @@ Proof. unfold L.PX.MapsTo; rewrite elements_mapsto; auto. Qed. -Lemma elements_aux_sort : forall s acc, bst s -> sort ltk acc -> +Lemma elements_aux_sort : forall (s:t elt) acc, bst s -> sort ltk acc -> (forall x e y, InA eqke (x,e) acc -> In y s -> X.lt y x) -> sort ltk (elements_aux acc s). Proof. @@ -1052,7 +1326,7 @@ Proof. apply Hl; auto. constructor. apply Hr; eauto. - apply (InA_InfA (eqke_refl (elt:=elt))); intros (y',e') H6. + apply (InA_InfA (PX.eqke_refl (elt:=elt))); intros (y',e') H6. destruct (elements_aux_mapsto r acc y' e'); intuition. red; simpl; eauto. red; simpl; eauto. @@ -1070,20 +1344,49 @@ Proof. Qed. Hint Resolve elements_sort. +Lemma elements_nodup : forall s : t elt, bst s -> NoDupA eqk (elements s). +Proof. + intros; apply PX.Sort_NoDupA; auto. +Qed. -(** * Fold *) +Lemma elements_aux_cardinal : + forall (m:t elt) acc, (length acc + cardinal m)%nat = length (elements_aux acc m). +Proof. + simple induction m; simpl; intuition. + rewrite <- H; simpl. + rewrite <- H0; omega. +Qed. -Fixpoint fold (A : Set) (f : key -> elt -> A -> A)(s : t elt) {struct s} : A -> A := - fun a => match s with - | Leaf => a - | Node l x e r _ => fold f r (f x e (fold f l a)) - end. +Lemma elements_cardinal : forall (m:t elt), cardinal m = length (elements m). +Proof. + exact (fun m => elements_aux_cardinal m nil). +Qed. + +Lemma elements_app : + forall (s:t elt) acc, elements_aux acc s = elements s ++ acc. +Proof. + induction s; simpl; intros; auto. + rewrite IHs1, IHs2. + unfold elements; simpl. + rewrite 2 IHs1, IHs2, <- !app_nil_end, !app_ass; auto. +Qed. + +Lemma elements_node : + forall (t1 t2:t elt) x e z l, + elements t1 ++ (x,e) :: elements t2 ++ l = + elements (Node t1 x e t2 z) ++ l. +Proof. + unfold elements; simpl; intros. + rewrite !elements_app, <- !app_nil_end, !app_ass; auto. +Qed. -Definition fold' (A : Set) (f : key -> elt -> A -> A)(s : t elt) := +(** * Fold *) + +Definition fold' (A : Type) (f : key -> elt -> A -> A)(s : t elt) := L.fold f (elements s). Lemma fold_equiv_aux : - forall (A : Set) (s : t elt) (f : key -> elt -> A -> A) (a : A) acc, + forall (A : Type) (s : t elt) (f : key -> elt -> A -> A) (a : A) acc, L.fold f (elements_aux acc s) a = L.fold f acc (fold f s a). Proof. simple induction s. @@ -1095,7 +1398,7 @@ Proof. Qed. Lemma fold_equiv : - forall (A : Set) (s : t elt) (f : key -> elt -> A -> A) (a : A), + forall (A : Type) (s : t elt) (f : key -> elt -> A -> A) (a : A), fold f s a = fold' f s a. Proof. unfold fold', elements in |- *. @@ -1106,8 +1409,8 @@ Proof. Qed. Lemma fold_1 : - forall (s:t elt)(Hs:bst s)(A : Set)(i:A)(f : key -> elt -> A -> A), - fold f s i = fold_left (fun a p => f (fst p) (snd p) a) (elements s) i. + forall (s:t elt)(Hs:bst s)(A : Type)(i:A)(f : key -> elt -> A -> A), + fold f s i = fold_left (fun a p => f p#1 p#2 a) (elements s) i. Proof. intros. rewrite fold_equiv. @@ -1118,288 +1421,93 @@ Qed. (** * Comparison *) -Definition Equal (cmp:elt->elt->bool) m m' := - (forall k, In k m <-> In k m') /\ - (forall k e e', MapsTo k e m -> MapsTo k e' m' -> cmp e e' = true). - -(** ** Enumeration of the elements of a tree *) - -Inductive enumeration : Set := - | End : enumeration - | More : key -> elt -> t elt -> enumeration -> enumeration. - -(** [flatten_e e] returns the list of elements of [e] i.e. the list - of elements actually compared *) +(** [flatten_e e] returns the list of elements of the enumeration [e] + i.e. the list of elements actually compared *) -Fixpoint flatten_e (e : enumeration) : list (key*elt) := match e with +Fixpoint flatten_e (e : enumeration elt) : list (key*elt) := match e with | End => nil | More x e t r => (x,e) :: elements t ++ flatten_e r end. -(** [sorted_e e] expresses that elements in the enumeration [e] are - sorted, and that all trees in [e] are binary search trees. *) - -Inductive In_e (p:key*elt) : enumeration -> Prop := - | InEHd1 : - forall (y : key)(d:elt) (s : t elt) (e : enumeration), - eqke p (y,d) -> In_e p (More y d s e) - | InEHd2 : - forall (y : key) (d:elt) (s : t elt) (e : enumeration), - MapsTo (fst p) (snd p) s -> In_e p (More y d s e) - | InETl : - forall (y : key) (d:elt) (s : t elt) (e : enumeration), - In_e p e -> In_e p (More y d s e). - -Hint Constructors In_e. - -Inductive sorted_e : enumeration -> Prop := - | SortedEEnd : sorted_e End - | SortedEMore : - forall (x : key) (d:elt) (s : t elt) (e : enumeration), - bst s -> - (gt_tree x s) -> - sorted_e e -> - (forall p, In_e p e -> ltk (x,d) p) -> - (forall p, - MapsTo (fst p) (snd p) s -> forall q, In_e q e -> ltk p q) -> - sorted_e (More x d s e). - -Hint Constructors sorted_e. - -Lemma in_flatten_e : - forall p e, InA eqke p (flatten_e e) -> In_e p e. -Proof. - simple induction e; simpl in |- *; intuition. - inversion_clear H. - inversion_clear H0; auto. - elim (InA_app H1); auto. - destruct (elements_mapsto t a b); auto. +Lemma flatten_e_elements : + forall (l:t elt) r x d z e, + elements l ++ flatten_e (More x d r e) = + elements (Node l x d r z) ++ flatten_e e. +Proof. + intros; simpl; apply elements_node. Qed. -Lemma sorted_flatten_e : - forall e : enumeration, sorted_e e -> sort ltk (flatten_e e). +Lemma cons_1 : forall (s:t elt) e, + flatten_e (cons s e) = elements s ++ flatten_e e. Proof. - simple induction e; simpl in |- *; intuition. - apply cons_sort. - apply (SortA_app (eqke_refl (elt:=elt))); inversion_clear H0; auto. - intros; apply H5; auto. - rewrite <- elements_mapsto; auto; destruct x; auto. - apply in_flatten_e; auto. - inversion_clear H0. - apply In_InfA; intros. - intros; elim (in_app_or _ _ _ H0); intuition. - generalize (In_InA (eqke_refl (elt:=elt)) H6). - destruct y; rewrite elements_mapsto; eauto. - apply H4; apply in_flatten_e; auto. - apply In_InA; auto. + induction s; simpl; auto; intros. + rewrite IHs1; apply flatten_e_elements; auto. Qed. -Lemma elements_app : - forall s acc, elements_aux acc s = elements s ++ acc. +(** Proof of correction for the comparison *) + +Variable cmp : elt->elt->bool. + +Definition IfEq b l1 l2 := L.equal cmp l1 l2 = b. + +Lemma cons_IfEq : forall b x1 x2 d1 d2 l1 l2, + X.eq x1 x2 -> cmp d1 d2 = true -> + IfEq b l1 l2 -> + IfEq b ((x1,d1)::l1) ((x2,d2)::l2). Proof. - simple induction s; simpl in |- *; intuition. - rewrite H0. - rewrite H. - unfold elements; simpl. - do 2 rewrite H. - rewrite H0. - repeat rewrite <- app_nil_end. - repeat rewrite app_ass; auto. + unfold IfEq; destruct b; simpl; intros; destruct X.compare; simpl; + try rewrite H0; auto; order. Qed. -Lemma compare_flatten_1 : - forall t1 t2 x e z l, - elements t1 ++ (x,e) :: elements t2 ++ l = - elements (Node t1 x e t2 z) ++ l. +Lemma equal_end_IfEq : forall e2, + IfEq (equal_end e2) nil (flatten_e e2). Proof. - simpl in |- *; unfold elements in |- *; simpl in |- *; intuition. - repeat rewrite elements_app. - repeat rewrite <- app_nil_end. - repeat rewrite app_ass; auto. + destruct e2; red; auto. Qed. -(** key lemma for correctness *) - -Lemma flatten_e_elements : - forall l r x d z e, - elements l ++ flatten_e (More x d r e) = - elements (Node l x d r z) ++ flatten_e e. +Lemma equal_more_IfEq : + forall x1 d1 (cont:enumeration elt -> bool) x2 d2 r2 e2 l, + IfEq (cont (cons r2 e2)) l (elements r2 ++ flatten_e e2) -> + IfEq (equal_more cmp x1 d1 cont (More x2 d2 r2 e2)) ((x1,d1)::l) + (flatten_e (More x2 d2 r2 e2)). Proof. - intros; simpl. - apply compare_flatten_1. + unfold IfEq; simpl; intros; destruct X.compare; simpl; auto. + rewrite <-andb_lazy_alt; f_equal; auto. Qed. -Open Local Scope Z_scope. - -(** termination of [compare_aux] *) - -Fixpoint measure_e_t (s : t elt) : Z := match s with - | Leaf => 0 - | Node l _ _ r _ => 1 + measure_e_t l + measure_e_t r - end. - -Fixpoint measure_e (e : enumeration) : Z := match e with - | End => 0 - | More _ _ s r => 1 + measure_e_t s + measure_e r - end. - -Ltac Measure_e_t := unfold measure_e_t in |- *; fold measure_e_t in |- *. -Ltac Measure_e := unfold measure_e in |- *; fold measure_e in |- *. - -Lemma measure_e_t_0 : forall s : t elt, measure_e_t s >= 0. +Lemma equal_cont_IfEq : forall m1 cont e2 l, + (forall e, IfEq (cont e) l (flatten_e e)) -> + IfEq (equal_cont cmp m1 cont e2) (elements m1 ++ l) (flatten_e e2). Proof. - simple induction s. - simpl in |- *; omega. - intros. - Measure_e_t; omega. + induction m1 as [|l1 Hl1 x1 d1 r1 Hr1 h1]; simpl; intros; auto. + rewrite <- elements_node; simpl. + apply Hl1; auto. + clear e2; intros [|x2 d2 r2 e2]. + simpl; red; auto. + apply equal_more_IfEq. + rewrite <- cons_1; auto. Qed. -Ltac Measure_e_t_0 s := generalize (@measure_e_t_0 s); intro. - -Lemma measure_e_0 : forall e : enumeration, measure_e e >= 0. +Lemma equal_IfEq : forall (m1 m2:t elt), + IfEq (equal cmp m1 m2) (elements m1) (elements m2). Proof. - simple induction e. - simpl in |- *; omega. + intros; unfold equal. + rewrite (app_nil_end (elements m1)). + replace (elements m2) with (flatten_e (cons m2 (End _))) + by (rewrite cons_1; simpl; rewrite <-app_nil_end; auto). + apply equal_cont_IfEq. intros. - Measure_e; Measure_e_t_0 t; omega. + apply equal_end_IfEq; auto. Qed. -Ltac Measure_e_0 e := generalize (@measure_e_0 e); intro. - -(** Induction principle over the sum of the measures for two lists *) +Definition Equivb m m' := + (forall k, In k m <-> In k m') /\ + (forall k e e', MapsTo k e m -> MapsTo k e' m' -> cmp e e' = true). -Definition compare_rec2 : - forall P : enumeration -> enumeration -> Set, - (forall x x' : enumeration, - (forall y y' : enumeration, - measure_e y + measure_e y' < measure_e x + measure_e x' -> P y y') -> - P x x') -> - forall x x' : enumeration, P x x'. +Lemma Equivb_elements : forall s s', + Equivb s s' <-> L.Equivb cmp (elements s) (elements s'). Proof. - intros P H x x'. - apply well_founded_induction_type_2 - with (R := fun yy' xx' : enumeration * enumeration => - measure_e (fst yy') + measure_e (snd yy') < - measure_e (fst xx') + measure_e (snd xx')); auto. - apply Wf_nat.well_founded_lt_compat - with (f := fun xx' : enumeration * enumeration => - Zabs_nat (measure_e (fst xx') + measure_e (snd xx'))). - intros; apply Zabs.Zabs_nat_lt. - Measure_e_0 (fst x0); Measure_e_0 (snd x0); Measure_e_0 (fst y); - Measure_e_0 (snd y); intros; omega. -Qed. - -(** [cons t e] adds the elements of tree [t] on the head of - enumeration [e]. Code: - -let rec cons s e = match s with - | Empty -> e - | Node(l, k, d, r, _) -> cons l (More(k, d, r, e)) -*) - -Definition cons : forall s e, bst s -> sorted_e e -> - (forall x y, MapsTo (fst x) (snd x) s -> In_e y e -> ltk x y) -> - { r : enumeration - | sorted_e r /\ - measure_e r = measure_e_t s + measure_e e /\ - flatten_e r = elements s ++ flatten_e e - }. -Proof. - simple induction s; intuition. - (* s = Leaf *) - exists e; intuition. - (* s = Node t k e t0 z *) - clear H0. - case (H (More k e t0 e0)); clear H; intuition. - inv bst; auto. - constructor; inversion_clear H1; auto. - inversion_clear H0; inv bst; intuition. - destruct y; red; red in H4; simpl in *; intuition. - apply lt_eq with k; eauto. - destruct y; red; simpl in *; intuition. - apply X.lt_trans with k; eauto. - exists x; intuition. - generalize H4; Measure_e; intros; Measure_e_t; omega. - rewrite H5. - apply flatten_e_elements. -Qed. - -Definition equal_aux : - forall (cmp: elt -> elt -> bool)(e1 e2:enumeration), - sorted_e e1 -> sorted_e e2 -> - { L.Equal cmp (flatten_e e1) (flatten_e e2) } + - { ~ L.Equal cmp (flatten_e e1) (flatten_e e2) }. -Proof. - intros cmp e1 e2; pattern e1, e2 in |- *; apply compare_rec2. - simple destruct x; simple destruct x'; intuition. - (* x = x' = End *) - left; unfold L.Equal in |- *; intuition. - inversion H2. - (* x = End x' = More *) - right; simpl in |- *; auto. - destruct 1. - destruct (H2 k). - destruct H5; auto. - exists e; auto. - inversion H5. - (* x = More x' = End *) - right; simpl in |- *; auto. - destruct 1. - destruct (H2 k). - destruct H4; auto. - exists e; auto. - inversion H4. - (* x = More k e t e0, x' = More k0 e3 t0 e4 *) - case (X.compare k k0); intro. - (* k < k0 *) - right. - destruct 1. - clear H3 H. - assert (L.PX.In k (flatten_e (More k0 e3 t0 e4))). - destruct (H2 k). - apply H; simpl; exists e; auto. - destruct H. - generalize (Sort_In_cons_2 (sorted_flatten_e H1) (InA_eqke_eqk H)). - compute. - intuition order. - (* k = k0 *) - case_eq (cmp e e3). - intros EQ. - destruct (@cons t e0) as [c1 (H2,(H3,H4))]; try inversion_clear H0; auto. - destruct (@cons t0 e4) as [c2 (H5,(H6,H7))]; try inversion_clear H1; auto. - destruct (H c1 c2); clear H; intuition. - Measure_e; omega. - left. - rewrite H4 in e6; rewrite H7 in e6. - simpl; rewrite <- L.equal_cons; auto. - apply (sorted_flatten_e H0). - apply (sorted_flatten_e H1). - right. - simpl; rewrite <- L.equal_cons; auto. - apply (sorted_flatten_e H0). - apply (sorted_flatten_e H1). - swap f. - rewrite H4; rewrite H7; auto. - right. - destruct 1. - rewrite (H4 k) in H2; try discriminate; simpl; auto. - (* k > k0 *) - right. - destruct 1. - clear H3 H. - assert (L.PX.In k0 (flatten_e (More k e t e0))). - destruct (H2 k0). - apply H3; simpl; exists e3; auto. - destruct H. - generalize (Sort_In_cons_2 (sorted_flatten_e H0) (InA_eqke_eqk H)). - compute. - intuition order. -Qed. - -Lemma Equal_elements : forall cmp s s', - Equal cmp s s' <-> L.Equal cmp (elements s) (elements s'). -Proof. -unfold Equal, L.Equal; split; split; intros. +unfold Equivb, L.Equivb; split; split; intros. do 2 rewrite elements_in; firstorder. destruct H. apply (H2 k); rewrite <- elements_mapsto; auto. @@ -1408,95 +1516,46 @@ destruct H. apply (H2 k); unfold L.PX.MapsTo; rewrite elements_mapsto; auto. Qed. -Definition equal : forall cmp s s', bst s -> bst s' -> - {Equal cmp s s'} + {~ Equal cmp s s'}. +Lemma equal_Equivb : forall (s s': t elt), bst s -> bst s' -> + (equal cmp s s' = true <-> Equivb s s'). Proof. - intros cmp s1 s2 s1_bst s2_bst; simpl. - destruct (@cons s1 End); auto. - inversion_clear 2. - destruct (@cons s2 End); auto. - inversion_clear 2. - simpl in a; rewrite <- app_nil_end in a. - simpl in a0; rewrite <- app_nil_end in a0. - destruct (@equal_aux cmp x x0); intuition. - left. - rewrite H4 in e; rewrite H5 in e. - rewrite Equal_elements; auto. - right. - swap n. - rewrite H4; rewrite H5. - rewrite <- Equal_elements; auto. + intros s s' B B'. + rewrite Equivb_elements, <- equal_IfEq. + split; [apply L.equal_2|apply L.equal_1]; auto. Qed. -End Elt2. - -Section Elts. - -Variable elt elt' elt'' : Set. +End Elt. Section Map. +Variable elt elt' : Type. Variable f : elt -> elt'. -Fixpoint map (m:t elt) {struct m} : t elt' := - match m with - | Leaf => Leaf _ - | Node l v d r h => Node (map l) v (f d) (map r) h - end. - -Lemma map_height : forall m, height (map m) = height m. -Proof. -destruct m; simpl; auto. -Qed. - -Lemma map_avl : forall m, avl m -> avl (map m). -Proof. -induction m; simpl; auto. -inversion_clear 1; constructor; auto; do 2 rewrite map_height; auto. -Qed. - -Lemma map_1 : forall (m: tree elt)(x:key)(e:elt), - MapsTo x e m -> MapsTo x (f e) (map m). +Lemma map_1 : forall (m: t elt)(x:key)(e:elt), + MapsTo x e m -> MapsTo x (f e) (map f m). Proof. induction m; simpl; inversion_clear 1; auto. Qed. Lemma map_2 : forall (m: t elt)(x:key), - In x (map m) -> In x m. + In x (map f m) -> In x m. Proof. induction m; simpl; inversion_clear 1; auto. Qed. -Lemma map_bst : forall m, bst m -> bst (map m). +Lemma map_bst : forall m, bst m -> bst (map f m). Proof. induction m; simpl; auto. -inversion_clear 1; constructor; auto. -red; intros; apply H2; apply map_2; auto. -red; intros; apply H3; apply map_2; auto. +inversion_clear 1; constructor; auto; + red; auto using map_2. Qed. End Map. -Section Mapi. -Variable f : key -> elt -> elt'. - -Fixpoint mapi (m:t elt) {struct m} : t elt' := - match m with - | Leaf => Leaf _ - | Node l v d r h => Node (mapi l) v (f v d) (mapi r) h - end. - -Lemma mapi_height : forall m, height (mapi m) = height m. -Proof. -destruct m; simpl; auto. -Qed. - -Lemma mapi_avl : forall m, avl m -> avl (mapi m). -Proof. -induction m; simpl; auto. -inversion_clear 1; constructor; auto; do 2 rewrite mapi_height; auto. -Qed. +Section Mapi. +Variable elt elt' : Type. +Variable f : key -> elt -> elt'. Lemma mapi_1 : forall (m: tree elt)(x:key)(e:elt), - MapsTo x e m -> exists y, X.eq y x /\ MapsTo x (f y e) (mapi m). + MapsTo x e m -> exists y, X.eq y x /\ MapsTo x (f y e) (mapi f m). Proof. induction m; simpl; inversion_clear 1; auto. exists k; auto. @@ -1507,198 +1566,242 @@ exists x0; intuition. Qed. Lemma mapi_2 : forall (m: t elt)(x:key), - In x (mapi m) -> In x m. + In x (mapi f m) -> In x m. Proof. induction m; simpl; inversion_clear 1; auto. Qed. -Lemma mapi_bst : forall m, bst m -> bst (mapi m). +Lemma mapi_bst : forall m, bst m -> bst (mapi f m). Proof. induction m; simpl; auto. -inversion_clear 1; constructor; auto. -red; intros; apply H2; apply mapi_2; auto. -red; intros; apply H3; apply mapi_2; auto. +inversion_clear 1; constructor; auto; + red; auto using mapi_2. Qed. End Mapi. -Section Map2. -Variable f : option elt -> option elt' -> option elt''. - -(* Not exactly pretty nor perfect, but should suffice as a first naive implem. - Anyway, map2 isn't in Ocaml... -*) - -Definition anti_elements (l:list (key*elt'')) := L.fold (@add _) l (empty _). - -Definition map2 (m:t elt)(m':t elt') : t elt'' := - anti_elements (L.map2 f (elements m) (elements m')). +Section Map_option. +Variable elt elt' : Type. +Variable f : key -> elt -> option elt'. +Hypothesis f_compat : forall x x' d, X.eq x x' -> f x d = f x' d. -Lemma anti_elements_avl_aux : forall (l:list (key*elt''))(m:t elt''), - avl m -> avl (L.fold (@add _) l m). +Lemma map_option_2 : forall (m:t elt)(x:key), + In x (map_option f m) -> exists d, MapsTo x d m /\ f x d <> None. Proof. -unfold anti_elements; induction l. -simpl; auto. -simpl; destruct a; intros. -apply IHl. -apply add_avl; auto. +intros m; functional induction (map_option f m); simpl; auto; intros. +inversion H. +rewrite join_in in H; destruct H as [H|[H|H]]. +exists d; split; auto; rewrite (f_compat d H), e0; discriminate. +destruct (IHt _ H) as (d0 & ? & ?); exists d0; auto. +destruct (IHt0 _ H) as (d0 & ? & ?); exists d0; auto. +rewrite concat_in in H; destruct H as [H|H]. +destruct (IHt _ H) as (d0 & ? & ?); exists d0; auto. +destruct (IHt0 _ H) as (d0 & ? & ?); exists d0; auto. Qed. -Lemma anti_elements_avl : forall l, avl (anti_elements l). +Lemma map_option_bst : forall m, bst m -> bst (map_option f m). Proof. -unfold anti_elements, empty; intros; apply anti_elements_avl_aux; auto. -Qed. +intros m; functional induction (map_option f m); simpl; auto; intros; + inv bst. +apply join_bst; auto; intros y H; + destruct (map_option_2 H) as (d0 & ? & ?); eauto using MapsTo_In. +apply concat_bst; auto; intros y y' H H'. +destruct (map_option_2 H) as (d0 & ? & ?). +destruct (map_option_2 H') as (d0' & ? & ?). +eapply X.lt_trans with x; eauto using MapsTo_In. +Qed. +Hint Resolve map_option_bst. + +Ltac nonify e := + replace e with (@None elt) by + (symmetry; rewrite not_find_iff; auto; intro; order). + +Lemma map_option_find : forall (m:t elt)(x:key), + bst m -> + find x (map_option f m) = + match (find x m) with Some d => f x d | None => None end. +Proof. +intros m; functional induction (map_option f m); simpl; auto; intros; + inv bst; rewrite join_find || rewrite concat_find; auto; simpl; + try destruct X.compare; simpl; auto. +rewrite (f_compat d e); auto. +intros y H; + destruct (map_option_2 H) as (? & ? & ?); eauto using MapsTo_In. +intros y H; + destruct (map_option_2 H) as (? & ? & ?); eauto using MapsTo_In. + +rewrite <- IHt, IHt0; auto; nonify (find x0 r); auto. +rewrite IHt, IHt0; auto; nonify (find x0 r); nonify (find x0 l); auto. +rewrite (f_compat d e); auto. +rewrite <- IHt0, IHt; auto; nonify (find x0 l); auto. + destruct (find x0 (map_option f r)); auto. + +intros y y' H H'. +destruct (map_option_2 H) as (? & ? & ?). +destruct (map_option_2 H') as (? & ? & ?). +eapply X.lt_trans with x; eauto using MapsTo_In. +Qed. + +End Map_option. + +Section Map2_opt. +Variable elt elt' elt'' : Type. +Variable f0 : key -> option elt -> option elt' -> option elt''. +Variable f : key -> elt -> option elt' -> option elt''. +Variable mapl : t elt -> t elt''. +Variable mapr : t elt' -> t elt''. +Hypothesis f0_f : forall x d o, f x d o = f0 x (Some d) o. +Hypothesis mapl_bst : forall m, bst m -> bst (mapl m). +Hypothesis mapr_bst : forall m', bst m' -> bst (mapr m'). +Hypothesis mapl_f0 : forall x m, bst m -> + find x (mapl m) = + match find x m with Some d => f0 x (Some d) None | None => None end. +Hypothesis mapr_f0 : forall x m', bst m' -> + find x (mapr m') = + match find x m' with Some d' => f0 x None (Some d') | None => None end. +Hypothesis f0_compat : forall x x' o o', X.eq x x' -> f0 x o o' = f0 x' o o'. + +Notation map2_opt := (map2_opt f mapl mapr). + +Lemma map2_opt_2 : forall m m' y, bst m -> bst m' -> + In y (map2_opt m m') -> In y m \/ In y m'. +Proof. +intros m m'; functional induction (map2_opt m m'); intros; + auto; try factornode _x0 _x1 _x2 _x3 _x4 as m2; + try (generalize (split_in_1 x1 H0 y)(split_in_2 x1 H0 y) + (split_bst x1 H0); rewrite e1; simpl; destruct 3; inv bst). + +right; apply find_in. +generalize (in_find (mapr_bst H0) H1); rewrite mapr_f0; auto. +destruct (find y m2); auto; intros; discriminate. + +factornode l1 x1 d1 r1 _x as m1. +left; apply find_in. +generalize (in_find (mapl_bst H) H1); rewrite mapl_f0; auto. +destruct (find y m1); auto; intros; discriminate. + +rewrite join_in in H1; destruct H1 as [H'|[H'|H']]; auto. +destruct (IHt1 y H6 H4 H'); intuition. +destruct (IHt0 y H7 H5 H'); intuition. + +rewrite concat_in in H1; destruct H1 as [H'|H']; auto. +destruct (IHt1 y H6 H4 H'); intuition. +destruct (IHt0 y H7 H5 H'); intuition. +Qed. + +Lemma map2_opt_bst : forall m m', bst m -> bst m' -> + bst (map2_opt m m'). +Proof. +intros m m'; functional induction (map2_opt m m'); intros; + auto; try factornode _x0 _x1 _x2 _x3 _x4 as m2; inv bst; + generalize (split_in_1 x1 H0)(split_in_2 x1 H0)(split_bst x1 H0); + rewrite e1; simpl in *; destruct 3. + +apply join_bst; auto. +intros y Hy; specialize H with y. +destruct (map2_opt_2 H1 H6 Hy); intuition. +intros y Hy; specialize H5 with y. +destruct (map2_opt_2 H2 H7 Hy); intuition. + +apply concat_bst; auto. +intros y y' Hy Hy'; specialize H with y; specialize H5 with y'. +apply X.lt_trans with x1. +destruct (map2_opt_2 H1 H6 Hy); intuition. +destruct (map2_opt_2 H2 H7 Hy'); intuition. +Qed. +Hint Resolve map2_opt_bst. + +Ltac map2_aux := + match goal with + | H : In ?x _ \/ In ?x ?m, + H' : find ?x ?m = find ?x ?m', B:bst ?m, B':bst ?m' |- _ => + destruct H; [ intuition_in; order | + rewrite <-(find_in_equiv B B' H'); auto ] + end. -Lemma anti_elements_bst_aux : forall (l:list (key*elt''))(m:t elt''), - bst m -> avl m -> bst (L.fold (@add _) l m). -Proof. -induction l. -simpl; auto. -simpl; destruct a; intros. -apply IHl. -apply add_bst; auto. -apply add_avl; auto. -Qed. +Ltac nonify t := + match t with (find ?y (map2_opt ?m ?m')) => + replace t with (@None elt''); + [ | symmetry; rewrite not_find_iff; auto; intro; + destruct (@map2_opt_2 m m' y); auto; order ] + end. -Lemma anti_elements_bst : forall l, bst (anti_elements l). -Proof. -unfold anti_elements, empty; intros; apply anti_elements_bst_aux; auto. -Qed. +Lemma map2_opt_1 : forall m m' y, bst m -> bst m' -> + In y m \/ In y m' -> + find y (map2_opt m m') = f0 y (find y m) (find y m'). +Proof. +intros m m'; functional induction (map2_opt m m'); intros; + auto; try factornode _x0 _x1 _x2 _x3 _x4 as m2; + try (generalize (split_in_1 x1 H0)(split_in_2 x1 H0) + (split_in_3 x1 H0)(split_bst x1 H0)(split_find x1 y H0) + (split_lt_tree (x:=x1) H0)(split_gt_tree (x:=x1) H0); + rewrite e1; simpl in *; destruct 4; intros; inv bst; + subst o2; rewrite H7, ?join_find, ?concat_find; auto). + +simpl; destruct H1; [ inversion_clear H1 | ]. +rewrite mapr_f0; auto. +generalize (in_find H0 H1); destruct (find y m2); intuition. + +factornode l1 x1 d1 r1 _x as m1. +destruct H1; [ | inversion_clear H1 ]. +rewrite mapl_f0; auto. +generalize (in_find H H1); destruct (find y m1); intuition. + +simpl; destruct X.compare; auto. +apply IHt1; auto; map2_aux. +rewrite (@f0_compat y x1), <- f0_f; auto. +apply IHt0; auto; map2_aux. +intros z Hz; destruct (@map2_opt_2 l1 l2' z); auto. +intros z Hz; destruct (@map2_opt_2 r1 r2' z); auto. + +destruct X.compare. +nonify (find y (map2_opt r1 r2')). +apply IHt1; auto; map2_aux. +nonify (find y (map2_opt r1 r2')). +nonify (find y (map2_opt l1 l2')). +rewrite (@f0_compat y x1), <- f0_f; auto. +nonify (find y (map2_opt l1 l2')). +rewrite IHt0; auto; [ | map2_aux ]. +destruct (f0 y (find y r1) (find y r2')); auto. +intros y1 y2 Hy1 Hy2; apply X.lt_trans with x1. + destruct (@map2_opt_2 l1 l2' y1); auto. + destruct (@map2_opt_2 r1 r2' y2); auto. +Qed. + +End Map2_opt. -Lemma anti_elements_mapsto_aux : forall (l:list (key*elt'')) m k e, - bst m -> avl m -> NoDupA (eqk (elt:=elt'')) l -> - (forall x, L.PX.In x l -> In x m -> False) -> - (MapsTo k e (L.fold (@add _) l m) <-> L.PX.MapsTo k e l \/ MapsTo k e m). -Proof. -induction l. -simpl; auto. -intuition. -inversion H4. -simpl; destruct a; intros. -rewrite IHl; clear IHl. -apply add_bst; auto. -apply add_avl; auto. -inversion H1; auto. -intros. -inversion_clear H1. -assert (~X.eq x k). - swap H5. - destruct H3. - apply InA_eqA with (x,x0); eauto. -apply (H2 x). -destruct H3; exists x0; auto. -revert H4; do 2 rewrite <- In_alt; destruct 1; exists x0; auto. -eapply add_3; eauto. -intuition. -assert (find k0 (add k e m) = Some e0). - apply find_1; auto. - apply add_bst; auto. -clear H4. -rewrite add_spec in H3; auto. -destruct (eq_dec k0 k). -inversion_clear H3; subst; auto. -right; apply find_2; auto. -inversion_clear H4; auto. -compute in H3; destruct H3. -subst; right; apply add_1; auto. -inversion_clear H1. -destruct (eq_dec k0 k). -destruct (H2 k); eauto. -right; apply add_2; auto. -Qed. - -Lemma anti_elements_mapsto : forall l k e, NoDupA (eqk (elt:=elt'')) l -> - (MapsTo k e (anti_elements l) <-> L.PX.MapsTo k e l). -Proof. -intros. -unfold anti_elements. -rewrite anti_elements_mapsto_aux; auto; unfold empty; auto. -inversion 2. -intuition. -inversion H1. -Qed. +Section Map2. +Variable elt elt' elt'' : Type. +Variable f : option elt -> option elt' -> option elt''. -Lemma map2_avl : forall (m: t elt)(m': t elt'), avl (map2 m m'). +Lemma map2_bst : forall m m', bst m -> bst m' -> bst (map2 f m m'). Proof. -unfold map2; intros; apply anti_elements_avl; auto. +unfold map2; intros. +apply map2_opt_bst with (fun _ => f); auto using map_option_bst; + intros; rewrite map_option_find; auto. Qed. -Lemma map2_bst : forall (m: t elt)(m': t elt'), bst (map2 m m'). +Lemma map2_1 : forall m m' y, bst m -> bst m' -> + In y m \/ In y m' -> find y (map2 f m m') = f (find y m) (find y m'). Proof. -unfold map2; intros; apply anti_elements_bst; auto. -Qed. - -Lemma find_elements : forall (elt:Set)(m: t elt) x, bst m -> - L.find x (elements m) = find x m. -Proof. -intros. -case_eq (find x m); intros. -apply L.find_1. -apply elements_sort; auto. -red; rewrite elements_mapsto. -apply find_2; auto. -case_eq (L.find x (elements m)); auto; intros. -rewrite <- H0; symmetry. -apply find_1; auto. -rewrite <- elements_mapsto. -apply L.find_2; auto. -Qed. - -Lemma find_anti_elements : forall (l: list (key*elt'')) x, sort (@ltk _) l -> - find x (anti_elements l) = L.find x l. -Proof. -intros. -case_eq (L.find x l); intros. -apply find_1. -apply anti_elements_bst; auto. -rewrite anti_elements_mapsto. -apply L.PX.Sort_NoDupA; auto. -apply L.find_2; auto. -case_eq (find x (anti_elements l)); auto; intros. -rewrite <- H0; symmetry. -apply L.find_1; auto. -rewrite <- anti_elements_mapsto. -apply L.PX.Sort_NoDupA; auto. -apply find_2; auto. -Qed. - -Lemma map2_1 : forall (m: t elt)(m': t elt')(x:key), bst m -> bst m' -> - In x m \/ In x m' -> find x (map2 m m') = f (find x m) (find x m'). -Proof. unfold map2; intros. -rewrite find_anti_elements; auto. -rewrite <- find_elements; auto. -rewrite <- find_elements; auto. -apply L.map2_1; auto. -apply elements_sort; auto. -apply elements_sort; auto. -do 2 rewrite elements_in; auto. -apply L.map2_sorted; auto. -apply elements_sort; auto. -apply elements_sort; auto. +rewrite (map2_opt_1 (f0:=fun _ => f)); + auto using map_option_bst; intros; rewrite map_option_find; auto. Qed. -Lemma map2_2 : forall (m: t elt)(m': t elt')(x:key), bst m -> bst m' -> - In x (map2 m m') -> In x m \/ In x m'. +Lemma map2_2 : forall m m' y, bst m -> bst m' -> + In y (map2 f m m') -> In y m \/ In y m'. Proof. unfold map2; intros. -do 2 rewrite <- elements_in. -apply L.map2_2 with (f:=f); auto. -apply elements_sort; auto. -apply elements_sort; auto. -revert H1. -rewrite <- In_alt. -destruct 1. -exists x0. -rewrite <- anti_elements_mapsto; auto. -apply L.PX.Sort_NoDupA; auto. -apply L.map2_sorted; auto. -apply elements_sort; auto. -apply elements_sort; auto. +eapply map2_opt_2 with (f0:=fun _ => f); eauto; intros. + apply map_option_bst; auto. + apply map_option_bst; auto. + rewrite map_option_find; auto. + rewrite map_option_find; auto. Qed. End Map2. -End Elts. +End Proofs. End Raw. (** * Encapsulation @@ -1710,178 +1813,184 @@ Module IntMake (I:Int)(X: OrderedType) <: S with Module E := X. Module E := X. Module Raw := Raw I X. + Import Raw.Proofs. - Record bbst (elt:Set) : Set := - Bbst {this :> Raw.tree elt; is_bst : Raw.bst this; is_avl: Raw.avl this}. + Record bst (elt:Type) := + Bst {this :> Raw.tree elt; is_bst : Raw.bst this}. - Definition t := bbst. + Definition t := bst. Definition key := E.t. Section Elt. - Variable elt elt' elt'': Set. + Variable elt elt' elt'': Type. Implicit Types m : t elt. Implicit Types x y : key. Implicit Types e : elt. - Definition empty : t elt := Bbst (Raw.empty_bst elt) (Raw.empty_avl elt). + Definition empty : t elt := Bst (empty_bst elt). Definition is_empty m : bool := Raw.is_empty m.(this). - Definition add x e m : t elt := - Bbst (Raw.add_bst x e m.(is_bst) m.(is_avl)) (Raw.add_avl x e m.(is_avl)). - Definition remove x m : t elt := - Bbst (Raw.remove_bst x m.(is_bst) m.(is_avl)) (Raw.remove_avl x m.(is_avl)). + Definition add x e m : t elt := Bst (add_bst x e m.(is_bst)). + Definition remove x m : t elt := Bst (remove_bst x m.(is_bst)). Definition mem x m : bool := Raw.mem x m.(this). Definition find x m : option elt := Raw.find x m.(this). - Definition map f m : t elt' := - Bbst (Raw.map_bst f m.(is_bst)) (Raw.map_avl f m.(is_avl)). + Definition map f m : t elt' := Bst (map_bst f m.(is_bst)). Definition mapi (f:key->elt->elt') m : t elt' := - Bbst (Raw.mapi_bst f m.(is_bst)) (Raw.mapi_avl f m.(is_avl)). + Bst (mapi_bst f m.(is_bst)). Definition map2 f m (m':t elt') : t elt'' := - Bbst (Raw.map2_bst f m m') (Raw.map2_avl f m m'). + Bst (map2_bst f m.(is_bst) m'.(is_bst)). Definition elements m : list (key*elt) := Raw.elements m.(this). - Definition fold (A:Set) (f:key->elt->A->A) m i := Raw.fold (A:=A) f m.(this) i. - Definition equal cmp m m' : bool := - if (Raw.equal cmp m.(is_bst) m'.(is_bst)) then true else false. + Definition cardinal m := Raw.cardinal m.(this). + Definition fold (A:Type) (f:key->elt->A->A) m i := Raw.fold (A:=A) f m.(this) i. + Definition equal cmp m m' : bool := Raw.equal cmp m.(this) m'.(this). Definition MapsTo x e m : Prop := Raw.MapsTo x e m.(this). Definition In x m : Prop := Raw.In0 x m.(this). - Definition Empty m : Prop := Raw.Empty m.(this). + Definition Empty m : Prop := Empty m.(this). - Definition eq_key : (key*elt) -> (key*elt) -> Prop := @Raw.PX.eqk elt. - Definition eq_key_elt : (key*elt) -> (key*elt) -> Prop := @Raw.PX.eqke elt. - Definition lt_key : (key*elt) -> (key*elt) -> Prop := @Raw.PX.ltk elt. + Definition eq_key : (key*elt) -> (key*elt) -> Prop := @PX.eqk elt. + Definition eq_key_elt : (key*elt) -> (key*elt) -> Prop := @PX.eqke elt. + Definition lt_key : (key*elt) -> (key*elt) -> Prop := @PX.ltk elt. Lemma MapsTo_1 : forall m x y e, E.eq x y -> MapsTo x e m -> MapsTo y e m. - Proof. intros m; exact (@Raw.MapsTo_1 _ m.(this)). Qed. + Proof. intros m; exact (@MapsTo_1 _ m.(this)). Qed. Lemma mem_1 : forall m x, In x m -> mem x m = true. Proof. - unfold In, mem; intros m x; rewrite Raw.In_alt; simpl; apply Raw.mem_1; auto. + unfold In, mem; intros m x; rewrite In_alt; simpl; apply mem_1; auto. apply m.(is_bst). Qed. Lemma mem_2 : forall m x, mem x m = true -> In x m. Proof. - unfold In, mem; intros m x; rewrite Raw.In_alt; simpl; apply Raw.mem_2; auto. + unfold In, mem; intros m x; rewrite In_alt; simpl; apply mem_2; auto. Qed. Lemma empty_1 : Empty empty. - Proof. exact (@Raw.empty_1 elt). Qed. + Proof. exact (@empty_1 elt). Qed. Lemma is_empty_1 : forall m, Empty m -> is_empty m = true. - Proof. intros m; exact (@Raw.is_empty_1 _ m.(this)). Qed. + Proof. intros m; exact (@is_empty_1 _ m.(this)). Qed. Lemma is_empty_2 : forall m, is_empty m = true -> Empty m. - Proof. intros m; exact (@Raw.is_empty_2 _ m.(this)). Qed. + Proof. intros m; exact (@is_empty_2 _ m.(this)). Qed. Lemma add_1 : forall m x y e, E.eq x y -> MapsTo y e (add x e m). - Proof. intros m x y e; exact (@Raw.add_1 elt _ x y e m.(is_avl)). Qed. + Proof. intros m x y e; exact (@add_1 elt _ x y e). Qed. Lemma add_2 : forall m x y e e', ~ E.eq x y -> MapsTo y e m -> MapsTo y e (add x e' m). - Proof. intros m x y e e'; exact (@Raw.add_2 elt _ x y e e' m.(is_avl)). Qed. + Proof. intros m x y e e'; exact (@add_2 elt _ x y e e'). Qed. Lemma add_3 : forall m x y e e', ~ E.eq x y -> MapsTo y e (add x e' m) -> MapsTo y e m. - Proof. intros m x y e e'; exact (@Raw.add_3 elt _ x y e e' m.(is_avl)). Qed. + Proof. intros m x y e e'; exact (@add_3 elt _ x y e e'). Qed. Lemma remove_1 : forall m x y, E.eq x y -> ~ In y (remove x m). Proof. - unfold In, remove; intros m x y; rewrite Raw.In_alt; simpl; apply Raw.remove_1; auto. + unfold In, remove; intros m x y; rewrite In_alt; simpl; apply remove_1; auto. apply m.(is_bst). - apply m.(is_avl). Qed. Lemma remove_2 : forall m x y e, ~ E.eq x y -> MapsTo y e m -> MapsTo y e (remove x m). - Proof. intros m x y e; exact (@Raw.remove_2 elt _ x y e m.(is_bst) m.(is_avl)). Qed. + Proof. intros m x y e; exact (@remove_2 elt _ x y e m.(is_bst)). Qed. Lemma remove_3 : forall m x y e, MapsTo y e (remove x m) -> MapsTo y e m. - Proof. intros m x y e; exact (@Raw.remove_3 elt _ x y e m.(is_bst) m.(is_avl)). Qed. + Proof. intros m x y e; exact (@remove_3 elt _ x y e m.(is_bst)). Qed. Lemma find_1 : forall m x e, MapsTo x e m -> find x m = Some e. - Proof. intros m x e; exact (@Raw.find_1 elt _ x e m.(is_bst)). Qed. + Proof. intros m x e; exact (@find_1 elt _ x e m.(is_bst)). Qed. Lemma find_2 : forall m x e, find x m = Some e -> MapsTo x e m. - Proof. intros m; exact (@Raw.find_2 elt m.(this)). Qed. + Proof. intros m; exact (@find_2 elt m.(this)). Qed. - Lemma fold_1 : forall m (A : Set) (i : A) (f : key -> elt -> A -> A), + Lemma fold_1 : forall m (A : Type) (i : A) (f : key -> elt -> A -> A), fold f m i = fold_left (fun a p => f (fst p) (snd p) a) (elements m) i. - Proof. intros m; exact (@Raw.fold_1 elt m.(this) m.(is_bst)). Qed. + Proof. intros m; exact (@fold_1 elt m.(this) m.(is_bst)). Qed. Lemma elements_1 : forall m x e, MapsTo x e m -> InA eq_key_elt (x,e) (elements m). Proof. - intros; unfold elements, MapsTo, eq_key_elt; rewrite Raw.elements_mapsto; auto. + intros; unfold elements, MapsTo, eq_key_elt; rewrite elements_mapsto; auto. Qed. Lemma elements_2 : forall m x e, InA eq_key_elt (x,e) (elements m) -> MapsTo x e m. Proof. - intros; unfold elements, MapsTo, eq_key_elt; rewrite <- Raw.elements_mapsto; auto. + intros; unfold elements, MapsTo, eq_key_elt; rewrite <- elements_mapsto; auto. Qed. Lemma elements_3 : forall m, sort lt_key (elements m). - Proof. intros m; exact (@Raw.elements_sort elt m.(this) m.(is_bst)). Qed. + Proof. intros m; exact (@elements_sort elt m.(this) m.(is_bst)). Qed. + + Lemma elements_3w : forall m, NoDupA eq_key (elements m). + Proof. intros m; exact (@elements_nodup elt m.(this) m.(is_bst)). Qed. - Definition Equal cmp m m' := + Lemma cardinal_1 : forall m, cardinal m = length (elements m). + Proof. intro m; exact (@elements_cardinal elt m.(this)). Qed. + + Definition Equal m m' := forall y, find y m = find y m'. + Definition Equiv (eq_elt:elt->elt->Prop) m m' := (forall k, In k m <-> In k m') /\ - (forall k e e', MapsTo k e m -> MapsTo k e' m' -> cmp e e' = true). + (forall k e e', MapsTo k e m -> MapsTo k e' m' -> eq_elt e e'). + Definition Equivb cmp := Equiv (Cmp cmp). - Lemma Equal_Equal : forall cmp m m', Equal cmp m m' <-> Raw.Equal cmp m m'. + Lemma Equivb_Equivb : forall cmp m m', + Equivb cmp m m' <-> Raw.Proofs.Equivb cmp m m'. Proof. - intros; unfold Equal, Raw.Equal, In; intuition. - generalize (H0 k); do 2 rewrite Raw.In_alt; intuition. - generalize (H0 k); do 2 rewrite Raw.In_alt; intuition. - generalize (H0 k); do 2 rewrite <- Raw.In_alt; intuition. - generalize (H0 k); do 2 rewrite <- Raw.In_alt; intuition. - Qed. + intros; unfold Equivb, Equiv, Raw.Proofs.Equivb, In; intuition. + generalize (H0 k); do 2 rewrite In_alt; intuition. + generalize (H0 k); do 2 rewrite In_alt; intuition. + generalize (H0 k); do 2 rewrite <- In_alt; intuition. + generalize (H0 k); do 2 rewrite <- In_alt; intuition. + Qed. Lemma equal_1 : forall m m' cmp, - Equal cmp m m' -> equal cmp m m' = true. + Equivb cmp m m' -> equal cmp m m' = true. Proof. - unfold equal; intros m m' cmp; rewrite Equal_Equal. - destruct (@Raw.equal _ cmp m m'); auto. + unfold equal; intros (m,b) (m',b') cmp; rewrite Equivb_Equivb; + intros; simpl in *; rewrite equal_Equivb; auto. Qed. Lemma equal_2 : forall m m' cmp, - equal cmp m m' = true -> Equal cmp m m'. + equal cmp m m' = true -> Equivb cmp m m'. Proof. - unfold equal; intros; rewrite Equal_Equal. - destruct (@Raw.equal _ cmp m m'); auto; try discriminate. - Qed. + unfold equal; intros (m,b) (m',b') cmp; rewrite Equivb_Equivb; + intros; simpl in *; rewrite <-equal_Equivb; auto. + Qed. End Elt. - Lemma map_1 : forall (elt elt':Set)(m: t elt)(x:key)(e:elt)(f:elt->elt'), + Lemma map_1 : forall (elt elt':Type)(m: t elt)(x:key)(e:elt)(f:elt->elt'), MapsTo x e m -> MapsTo x (f e) (map f m). - Proof. intros elt elt' m x e f; exact (@Raw.map_1 elt elt' f m.(this) x e). Qed. + Proof. intros elt elt' m x e f; exact (@map_1 elt elt' f m.(this) x e). Qed. - Lemma map_2 : forall (elt elt':Set)(m:t elt)(x:key)(f:elt->elt'), In x (map f m) -> In x m. + Lemma map_2 : forall (elt elt':Type)(m:t elt)(x:key)(f:elt->elt'), In x (map f m) -> In x m. Proof. - intros elt elt' m x f; do 2 unfold In in *; do 2 rewrite Raw.In_alt; simpl. - apply Raw.map_2; auto. + intros elt elt' m x f; do 2 unfold In in *; do 2 rewrite In_alt; simpl. + apply map_2; auto. Qed. - Lemma mapi_1 : forall (elt elt':Set)(m: t elt)(x:key)(e:elt) + Lemma mapi_1 : forall (elt elt':Type)(m: t elt)(x:key)(e:elt) (f:key->elt->elt'), MapsTo x e m -> exists y, E.eq y x /\ MapsTo x (f y e) (mapi f m). - Proof. intros elt elt' m x e f; exact (@Raw.mapi_1 elt elt' f m.(this) x e). Qed. - Lemma mapi_2 : forall (elt elt':Set)(m: t elt)(x:key) + Proof. intros elt elt' m x e f; exact (@mapi_1 elt elt' f m.(this) x e). Qed. + Lemma mapi_2 : forall (elt elt':Type)(m: t elt)(x:key) (f:key->elt->elt'), In x (mapi f m) -> In x m. Proof. - intros elt elt' m x f; unfold In in *; do 2 rewrite Raw.In_alt; simpl; apply Raw.mapi_2; auto. - Qed. + intros elt elt' m x f; unfold In in *; do 2 rewrite In_alt; simpl; apply mapi_2; auto. + Qed. - Lemma map2_1 : forall (elt elt' elt'':Set)(m: t elt)(m': t elt') + Lemma map2_1 : forall (elt elt' elt'':Type)(m: t elt)(m': t elt') (x:key)(f:option elt->option elt'->option elt''), In x m \/ In x m' -> find x (map2 f m m') = f (find x m) (find x m'). Proof. unfold find, map2, In; intros elt elt' elt'' m m' x f. - do 2 rewrite Raw.In_alt; intros; simpl; apply Raw.map2_1; auto. + do 2 rewrite In_alt; intros; simpl; apply map2_1; auto. apply m.(is_bst). apply m'.(is_bst). Qed. - Lemma map2_2 : forall (elt elt' elt'':Set)(m: t elt)(m': t elt') + Lemma map2_2 : forall (elt elt' elt'':Type)(m: t elt)(m': t elt') (x:key)(f:option elt->option elt'->option elt''), In x (map2 f m m') -> In x m \/ In x m'. Proof. unfold In, map2; intros elt elt' elt'' m m' x f. - do 3 rewrite Raw.In_alt; intros; simpl in *; eapply Raw.map2_2; eauto. + do 3 rewrite In_alt; intros; simpl in *; eapply map2_2; eauto. apply m.(is_bst). apply m'.(is_bst). Qed. @@ -1891,158 +2000,185 @@ End IntMake. Module IntMake_ord (I:Int)(X: OrderedType)(D : OrderedType) <: Sord with Module Data := D - with Module MapS.E := X. + with Module MapS.E := X. Module Data := D. - Module MapS := IntMake(I)(X). - Import MapS. + Module Import MapS := IntMake(I)(X). + Module LO := FMapList.Make_ord(X)(D). + Module R := Raw. + Module P := Raw.Proofs. + + Definition t := MapS.t D.t. + + Definition cmp e e' := + match D.compare e e' with EQ _ => true | _ => false end. + + (** One step of comparison of elements *) + + Definition compare_more x1 d1 (cont:R.enumeration D.t -> comparison) e2 := + match e2 with + | R.End => Gt + | R.More x2 d2 r2 e2 => + match X.compare x1 x2 with + | EQ _ => match D.compare d1 d2 with + | EQ _ => cont (R.cons r2 e2) + | LT _ => Lt + | GT _ => Gt + end + | LT _ => Lt + | GT _ => Gt + end + end. - Module MD := OrderedTypeFacts(D). - Import MD. + (** Comparison of left tree, middle element, then right tree *) - Module LO := FMapList.Make_ord(X)(D). + Fixpoint compare_cont s1 (cont:R.enumeration D.t -> comparison) e2 := + match s1 with + | R.Leaf => cont e2 + | R.Node l1 x1 d1 r1 _ => + compare_cont l1 (compare_more x1 d1 (compare_cont r1 cont)) e2 + end. + + (** Initial continuation *) + + Definition compare_end (e2:R.enumeration D.t) := + match e2 with R.End => Eq | _ => Lt end. + + (** The complete comparison *) + + Definition compare_pure s1 s2 := + compare_cont s1 compare_end (R.cons s2 (Raw.End _)). + + (** Correctness of this comparison *) + + Definition Cmp c := + match c with + | Eq => LO.eq_list + | Lt => LO.lt_list + | Gt => (fun l1 l2 => LO.lt_list l2 l1) + end. + + Lemma cons_Cmp : forall c x1 x2 d1 d2 l1 l2, + X.eq x1 x2 -> D.eq d1 d2 -> + Cmp c l1 l2 -> Cmp c ((x1,d1)::l1) ((x2,d2)::l2). + Proof. + destruct c; simpl; intros; P.MX.elim_comp; auto. + Qed. + Hint Resolve cons_Cmp. - Definition t := MapS.t D.t. + Lemma compare_end_Cmp : + forall e2, Cmp (compare_end e2) nil (P.flatten_e e2). + Proof. + destruct e2; simpl; auto. + Qed. + + Lemma compare_more_Cmp : forall x1 d1 cont x2 d2 r2 e2 l, + Cmp (cont (R.cons r2 e2)) l (R.elements r2 ++ P.flatten_e e2) -> + Cmp (compare_more x1 d1 cont (R.More x2 d2 r2 e2)) ((x1,d1)::l) + (P.flatten_e (R.More x2 d2 r2 e2)). + Proof. + simpl; intros; destruct X.compare; simpl; + try destruct D.compare; simpl; auto; P.MX.elim_comp; auto. + Qed. + + Lemma compare_cont_Cmp : forall s1 cont e2 l, + (forall e, Cmp (cont e) l (P.flatten_e e)) -> + Cmp (compare_cont s1 cont e2) (R.elements s1 ++ l) (P.flatten_e e2). + Proof. + induction s1 as [|l1 Hl1 x1 d1 r1 Hr1 h1]; simpl; intros; auto. + rewrite <- P.elements_node; simpl. + apply Hl1; auto. clear e2. intros [|x2 d2 r2 e2]. + simpl; auto. + apply compare_more_Cmp. + rewrite <- P.cons_1; auto. + Qed. + + Lemma compare_Cmp : forall s1 s2, + Cmp (compare_pure s1 s2) (R.elements s1) (R.elements s2). + Proof. + intros; unfold compare_pure. + rewrite (app_nil_end (R.elements s1)). + replace (R.elements s2) with (P.flatten_e (R.cons s2 (R.End _))) by + (rewrite P.cons_1; simpl; rewrite <- app_nil_end; auto). + auto using compare_cont_Cmp, compare_end_Cmp. + Qed. + + (** The dependent-style [compare] *) + + Definition eq (m1 m2 : t) := LO.eq_list (elements m1) (elements m2). + Definition lt (m1 m2 : t) := LO.lt_list (elements m1) (elements m2). - Definition cmp e e' := match D.compare e e' with EQ _ => true | _ => false end. + Definition compare (s s':t) : Compare lt eq s s'. + Proof. + intros (s,b) (s',b'). + generalize (compare_Cmp s s'). + destruct compare_pure; intros; [apply EQ|apply LT|apply GT]; red; auto. + Defined. + + (* Proofs about [eq] and [lt] *) + + Definition selements (m1 : t) := + LO.MapS.Build_slist (P.elements_sort m1.(is_bst)). - Definition elements (m:t) := - LO.MapS.Build_slist (Raw.elements_sort m.(is_bst)). + Definition seq (m1 m2 : t) := LO.eq (selements m1) (selements m2). + Definition slt (m1 m2 : t) := LO.lt (selements m1) (selements m2). - Definition eq : t -> t -> Prop := - fun m1 m2 => LO.eq (elements m1) (elements m2). + Lemma eq_seq : forall m1 m2, eq m1 m2 <-> seq m1 m2. + Proof. + unfold eq, seq, selements, elements, LO.eq; intuition. + Qed. - Definition lt : t -> t -> Prop := - fun m1 m2 => LO.lt (elements m1) (elements m2). + Lemma lt_slt : forall m1 m2, lt m1 m2 <-> slt m1 m2. + Proof. + unfold lt, slt, selements, elements, LO.lt; intuition. + Qed. - Lemma eq_1 : forall m m', Equal cmp m m' -> eq m m'. + Lemma eq_1 : forall (m m' : t), Equivb cmp m m' -> eq m m'. Proof. intros m m'. - unfold eq. - rewrite Equal_Equal. - rewrite Raw.Equal_elements. - intros. - apply LO.eq_1. - auto. + rewrite eq_seq; unfold seq. + rewrite Equivb_Equivb. + rewrite P.Equivb_elements. + auto using LO.eq_1. Qed. - Lemma eq_2 : forall m m', eq m m' -> Equal cmp m m'. + Lemma eq_2 : forall m m', eq m m' -> Equivb cmp m m'. Proof. intros m m'. - unfold eq. - rewrite Equal_Equal. - rewrite Raw.Equal_elements. + rewrite eq_seq; unfold seq. + rewrite Equivb_Equivb. + rewrite P.Equivb_elements. intros. generalize (LO.eq_2 H). auto. Qed. - + Lemma eq_refl : forall m : t, eq m m. Proof. - unfold eq; intros; apply LO.eq_refl. + intros; rewrite eq_seq; unfold seq; intros; apply LO.eq_refl. Qed. Lemma eq_sym : forall m1 m2 : t, eq m1 m2 -> eq m2 m1. Proof. - unfold eq; intros; apply LO.eq_sym; auto. + intros m1 m2; rewrite 2 eq_seq; unfold seq; intros; apply LO.eq_sym; auto. Qed. Lemma eq_trans : forall m1 m2 m3 : t, eq m1 m2 -> eq m2 m3 -> eq m1 m3. Proof. - unfold eq; intros; eapply LO.eq_trans; eauto. + intros m1 m2 M3; rewrite 3 eq_seq; unfold seq. + intros; eapply LO.eq_trans; eauto. Qed. Lemma lt_trans : forall m1 m2 m3 : t, lt m1 m2 -> lt m2 m3 -> lt m1 m3. Proof. - unfold lt; intros; eapply LO.lt_trans; eauto. + intros m1 m2 m3; rewrite 3 lt_slt; unfold slt; + intros; eapply LO.lt_trans; eauto. Qed. Lemma lt_not_eq : forall m1 m2 : t, lt m1 m2 -> ~ eq m1 m2. Proof. - unfold lt, eq; intros; apply LO.lt_not_eq; auto. - Qed. - - Import Raw. - - Definition flatten_slist (e:enumeration D.t)(He:sorted_e e) := - LO.MapS.Build_slist (sorted_flatten_e He). - - Open Local Scope Z_scope. - - Definition compare_aux : - forall (e1 e2:enumeration D.t)(He1:sorted_e e1)(He2: sorted_e e2), - Compare LO.lt LO.eq (flatten_slist He1) (flatten_slist He2). - Proof. - intros e1 e2; pattern e1, e2 in |- *; apply compare_rec2. - simple destruct x; simple destruct x'; intuition. - (* x = x' = End *) - constructor 2. - compute; auto. - (* x = End x' = More *) - constructor 1. - compute; auto. - (* x = More x' = End *) - constructor 3. - compute; auto. - (* x = More k t0 t1 e, x' = More k0 t2 t3 e0 *) - case (X.compare k k0); intro. - (* k < k0 *) - constructor 1. - compute; MX.elim_comp; auto. - (* k = k0 *) - destruct (D.compare t t1). - constructor 1. - compute; MX.elim_comp; auto. - destruct (@cons _ t0 e) as [c1 (H2,(H3,H4))]; try inversion_clear He1; auto. - destruct (@cons _ t2 e0) as [c2 (H5,(H6,H7))]; try inversion_clear He2; auto. - assert (measure_e c1 + measure_e c2 < - measure_e (More k t t0 e) + - measure_e (More k0 t1 t2 e0)). - unfold measure_e in *; fold measure_e in *; omega. - destruct (H c1 c2 H0 H2 H5); clear H. - constructor 1. - unfold flatten_slist, LO.lt in *; simpl; simpl in l. - MX.elim_comp. - right; split; auto. - rewrite <- H7; rewrite <- H4; auto. - constructor 2. - unfold flatten_slist, LO.eq in *; simpl; simpl in e5. - MX.elim_comp. - split; auto. - rewrite <- H7; rewrite <- H4; auto. - constructor 3. - unfold flatten_slist, LO.lt in *; simpl; simpl in l. - MX.elim_comp. - right; split; auto. - rewrite <- H7; rewrite <- H4; auto. - constructor 3. - compute; MX.elim_comp; auto. - (* k > k0 *) - constructor 3. - compute; MX.elim_comp; auto. - Qed. - - Definition compare : forall m1 m2, Compare lt eq m1 m2. - Proof. - intros (m1,m1_bst,m1_avl) (m2,m2_bst,m2_avl); simpl. - destruct (@cons _ m1 (End _)) as [x1 (H1,H11)]; auto. - apply SortedEEnd. - inversion_clear 2. - destruct (@cons _ m2 (End _)) as [x2 (H2,H22)]; auto. - apply SortedEEnd. - inversion_clear 2. - simpl in H11; rewrite <- app_nil_end in H11. - simpl in H22; rewrite <- app_nil_end in H22. - destruct (compare_aux H1 H2); intuition. - constructor 1. - unfold lt, LO.lt, IntMake_ord.elements, flatten_slist in *; simpl in *. - rewrite <- H0; rewrite <- H4; auto. - constructor 2. - unfold eq, LO.eq, IntMake_ord.elements, flatten_slist in *; simpl in *. - rewrite <- H0; rewrite <- H4; auto. - constructor 3. - unfold lt, LO.lt, IntMake_ord.elements, flatten_slist in *; simpl in *. - rewrite <- H0; rewrite <- H4; auto. + intros m1 m2; rewrite lt_slt, eq_seq; unfold slt, seq; + intros; apply LO.lt_not_eq; auto. Qed. End IntMake_ord. @@ -2056,3 +2192,4 @@ Module Make_ord (X: OrderedType)(D: OrderedType) <: Sord with Module Data := D with Module MapS.E := X :=IntMake_ord(Z_as_Int)(X)(D). + diff --git a/theories/FSets/FMapFacts.v b/theories/FSets/FMapFacts.v index 0105095a..b307efe3 100644 --- a/theories/FSets/FMapFacts.v +++ b/theories/FSets/FMapFacts.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (***********************************************************************) -(* $Id: FMapFacts.v 8882 2006-05-31 21:55:30Z letouzey $ *) +(* $Id: FMapFacts.v 10782 2008-04-12 16:08:04Z msozeau $ *) (** * Finite maps library *) @@ -15,20 +15,24 @@ different styles: equivalence and boolean equalities. *) -Require Import Bool. -Require Import OrderedType. +Require Import Bool DecidableType DecidableTypeEx OrderedType. Require Export FMapInterface. Set Implicit Arguments. Unset Strict Implicit. -Module Facts (M: S). -Module ME := OrderedTypeFacts M.E. -Import ME. -Import M. -Import Logic. (* to unmask [eq] *) -Import Peano. (* to unmask [lt] *) +(** * Facts about weak maps *) -Lemma MapsTo_fun : forall (elt:Set) m x (e e':elt), +Module WFacts (E:DecidableType)(Import M:WSfun E). + +Notation eq_dec := E.eq_dec. +Definition eqb x y := if eq_dec x y then true else false. + +Lemma eq_bool_alt : forall b b', b=b' <-> (b=true <-> b'=true). +Proof. + destruct b; destruct b'; intuition. +Qed. + +Lemma MapsTo_fun : forall (elt:Type) m x (e e':elt), MapsTo x e m -> MapsTo x e' m -> e=e'. Proof. intros. @@ -36,19 +40,14 @@ generalize (find_1 H) (find_1 H0); clear H H0. intros; rewrite H in H0; injection H0; auto. Qed. -(** * Specifications written using equivalences *) +(** ** Specifications written using equivalences *) Section IffSpec. -Variable elt elt' elt'': Set. +Variable elt elt' elt'': Type. Implicit Type m: t elt. Implicit Type x y z: key. Implicit Type e: elt. -Lemma MapsTo_iff : forall m x y e, E.eq x y -> (MapsTo x e m <-> MapsTo y e m). -Proof. -split; apply MapsTo_1; auto. -Qed. - Lemma In_iff : forall m x y, E.eq x y -> (In x m <-> In y m). Proof. unfold In. @@ -57,12 +56,34 @@ apply (MapsTo_1 H H0); auto. apply (MapsTo_1 (E.eq_sym H) H0); auto. Qed. +Lemma MapsTo_iff : forall m x y e, E.eq x y -> (MapsTo x e m <-> MapsTo y e m). +Proof. +split; apply MapsTo_1; auto. +Qed. + +Lemma mem_in_iff : forall m x, In x m <-> mem x m = true. +Proof. +split; [apply mem_1|apply mem_2]. +Qed. + +Lemma not_mem_in_iff : forall m x, ~In x m <-> mem x m = false. +Proof. +intros; rewrite mem_in_iff; destruct (mem x m); intuition. +Qed. + +Lemma In_dec : forall m x, { In x m } + { ~ In x m }. +Proof. + intros. + generalize (mem_in_iff m x). + destruct (mem x m); [left|right]; intuition. +Qed. + Lemma find_mapsto_iff : forall m x e, MapsTo x e m <-> find x m = Some e. Proof. split; [apply find_1|apply find_2]. Qed. -Lemma not_find_mapsto_iff : forall m x, ~In x m <-> find x m = None. +Lemma not_find_in_iff : forall m x, ~In x m <-> find x m = None. Proof. intros. generalize (find_mapsto_iff m x); destruct (find x m). @@ -74,17 +95,13 @@ intros; intros (e,H1). rewrite H in H1; discriminate. Qed. -Lemma mem_in_iff : forall m x, In x m <-> mem x m = true. -Proof. -split; [apply mem_1|apply mem_2]. -Qed. - -Lemma not_mem_in_iff : forall m x, ~In x m <-> mem x m = false. +Lemma in_find_iff : forall m x, In x m <-> find x m <> None. Proof. -intros; rewrite mem_in_iff; destruct (mem x m); intuition. +intros; rewrite <- not_find_in_iff, mem_in_iff. +destruct mem; intuition. Qed. -Lemma equal_iff : forall m m' cmp, Equal cmp m m' <-> equal cmp m m' = true. +Lemma equal_iff : forall m m' cmp, Equivb cmp m m' <-> equal cmp m m' = true. Proof. split; [apply equal_1|apply equal_2]. Qed. @@ -114,9 +131,9 @@ intros. intuition. destruct (eq_dec x y); [left|right]. split; auto. -symmetry; apply (MapsTo_fun (e':=e) H); auto. +symmetry; apply (MapsTo_fun (e':=e) H); auto with map. split; auto; apply add_3 with x e; auto. -subst; auto. +subst; auto with map. Qed. Lemma add_in_iff : forall m x y e, In y (add x e m) <-> E.eq x y \/ In y m. @@ -204,33 +221,33 @@ split. case_eq (find x m); intros. exists e. split. -apply (MapsTo_fun (m:=map f m) (x:=x)); auto. -apply find_2; auto. +apply (MapsTo_fun (m:=map f m) (x:=x)); auto with map. +apply find_2; auto with map. assert (In x (map f m)) by (exists b; auto). destruct (map_2 H1) as (a,H2). rewrite (find_1 H2) in H; discriminate. intros (a,(H,H0)). -subst b; auto. +subst b; auto with map. Qed. Lemma map_in_iff : forall m x (f : elt -> elt'), In x (map f m) <-> In x m. Proof. -split; intros; eauto. +split; intros; eauto with map. destruct H as (a,H). -exists (f a); auto. +exists (f a); auto with map. Qed. Lemma mapi_in_iff : forall m x (f:key->elt->elt'), In x (mapi f m) <-> In x m. Proof. -split; intros; eauto. +split; intros; eauto with map. destruct H as (a,H). destruct (mapi_1 f H) as (y,(H0,H1)). exists (f y a); auto. Qed. -(* Unfortunately, we don't have simple equivalences for [mapi] +(** Unfortunately, we don't have simple equivalences for [mapi] and [MapsTo]. The only correct one needs compatibility of [f]. *) Lemma mapi_inv : forall m x b (f : key -> elt -> elt'), @@ -240,9 +257,9 @@ Proof. intros; case_eq (find x m); intros. exists e. destruct (@mapi_1 _ _ m x e f) as (y,(H1,H2)). -apply find_2; auto. -exists y; repeat split; auto. -apply (MapsTo_fun (m:=mapi f m) (x:=x)); auto. +apply find_2; auto with map. +exists y; repeat split; auto with map. +apply (MapsTo_fun (m:=mapi f m) (x:=x)); auto with map. assert (In x (mapi f m)) by (exists b; auto). destruct (mapi_2 H1) as (a,H2). rewrite (find_1 H2) in H0; discriminate. @@ -287,11 +304,11 @@ Ltac map_iff := rewrite map_mapsto_iff || rewrite map_in_iff || rewrite mapi_in_iff)). -(** * Specifications written using boolean predicates *) +(** ** Specifications written using boolean predicates *) Section BoolSpec. -Lemma mem_find_b : forall (elt:Set)(m:t elt)(x:key), mem x m = if find x m then true else false. +Lemma mem_find_b : forall (elt:Type)(m:t elt)(x:key), mem x m = if find x m then true else false. Proof. intros. generalize (find_mapsto_iff m x)(mem_in_iff m x); unfold In. @@ -303,7 +320,7 @@ destruct H0 as (e,H0). destruct (H e); intuition discriminate. Qed. -Variable elt elt' elt'' : Set. +Variable elt elt' elt'' : Type. Implicit Types m : t elt. Implicit Types x y z : key. Implicit Types e : elt. @@ -345,24 +362,24 @@ Qed. Lemma add_eq_o : forall m x y e, E.eq x y -> find y (add x e m) = Some e. Proof. -auto. +auto with map. Qed. Lemma add_neq_o : forall m x y e, ~ E.eq x y -> find y (add x e m) = find y m. Proof. intros. -case_eq (find y m); intros; auto. -case_eq (find y (add x e m)); intros; auto. +case_eq (find y m); intros; auto with map. +case_eq (find y (add x e m)); intros; auto with map. rewrite <- H0; symmetry. -apply find_1; apply add_3 with x e; auto. +apply find_1; apply add_3 with x e; auto with map. Qed. -Hint Resolve add_neq_o. +Hint Resolve add_neq_o : map. Lemma add_o : forall m x y e, find y (add x e m) = if eq_dec x y then Some e else find y m. Proof. -intros; destruct (eq_dec x y); auto. +intros; destruct (eq_dec x y); auto with map. Qed. Lemma add_eq_b : forall m x y e, @@ -394,23 +411,23 @@ destruct (find y (remove x m)); auto. destruct 2. exists e; rewrite H0; auto. Qed. -Hint Resolve remove_eq_o. +Hint Resolve remove_eq_o : map. Lemma remove_neq_o : forall m x y, ~ E.eq x y -> find y (remove x m) = find y m. Proof. intros. -case_eq (find y m); intros; auto. -case_eq (find y (remove x m)); intros; auto. +case_eq (find y m); intros; auto with map. +case_eq (find y (remove x m)); intros; auto with map. rewrite <- H0; symmetry. -apply find_1; apply remove_3 with x; auto. +apply find_1; apply remove_3 with x; auto with map. Qed. -Hint Resolve remove_neq_o. +Hint Resolve remove_neq_o : map. Lemma remove_o : forall m x y, find y (remove x m) = if eq_dec x y then None else find y m. Proof. -intros; destruct (eq_dec x y); auto. +intros; destruct (eq_dec x y); auto with map. Qed. Lemma remove_eq_b : forall m x y, @@ -432,7 +449,7 @@ intros; do 2 rewrite mem_find_b; rewrite remove_o; unfold eqb. destruct (eq_dec x y); auto. Qed. -Definition option_map (A:Set)(B:Set)(f:A->B)(o:option A) : option B := +Definition option_map (A B:Type)(f:A->B)(o:option A) : option B := match o with | Some a => Some (f a) | None => None @@ -494,15 +511,15 @@ Proof. intros. case_eq (find x m); intros. rewrite <- H0. -apply map2_1; auto. -left; exists e; auto. +apply map2_1; auto with map. +left; exists e; auto with map. case_eq (find x m'); intros. rewrite <- H0; rewrite <- H1. apply map2_1; auto. -right; exists e; auto. +right; exists e; auto with map. rewrite H. -case_eq (find x (map2 f m m')); intros; auto. -assert (In x (map2 f m m')) by (exists e; auto). +case_eq (find x (map2 f m m')); intros; auto with map. +assert (In x (map2 f m m')) by (exists e; auto with map). destruct (map2_2 H3) as [(e0,H4)|(e0,H4)]. rewrite (find_1 H4) in H0; discriminate. rewrite (find_1 H4) in H1; discriminate. @@ -514,21 +531,18 @@ Proof. intros. assert (forall e, find x m = Some e <-> InA (eq_key_elt (elt:=elt)) (x,e) (elements m)). intros; rewrite <- find_mapsto_iff; apply elements_mapsto_iff. -assert (NoDupA (eq_key (elt:=elt)) (elements m)). - apply SortA_NoDupA with (lt_key (elt:=elt)); unfold eq_key, lt_key; intuition eauto. - destruct y; simpl in *. - apply (E.lt_not_eq H0 H1). - exact (elements_3 m). +assert (H0:=elements_3w m). generalize (fun e => @findA_NoDupA _ _ _ E.eq_sym E.eq_trans eq_dec (elements m) x e H0). -unfold eqb. -destruct (find x m); destruct (findA (fun y : E.t => if eq_dec x y then true else false) (elements m)); +fold (eqb x). +destruct (find x m); destruct (findA (eqb x) (elements m)); simpl; auto; intros. symmetry; rewrite <- H1; rewrite <- H; auto. symmetry; rewrite <- H1; rewrite <- H; auto. rewrite H; rewrite H1; auto. Qed. -Lemma elements_b : forall m x, mem x m = existsb (fun p => eqb x (fst p)) (elements m). +Lemma elements_b : forall m x, + mem x m = existsb (fun p => eqb x (fst p)) (elements m). Proof. intros. generalize (mem_in_iff m x)(elements_in_iff m x) @@ -554,4 +568,1026 @@ Qed. End BoolSpec. +Section Equalities. + +Variable elt:Type. + +(** * Relations between [Equal], [Equiv] and [Equivb]. *) + +(** First, [Equal] is [Equiv] with Leibniz on elements. *) + +Lemma Equal_Equiv : forall (m m' : t elt), + Equal m m' <-> Equiv (@Logic.eq elt) m m'. +Proof. + unfold Equal, Equiv; split; intros. + split; intros. + rewrite in_find_iff, in_find_iff, H; intuition. + rewrite find_mapsto_iff in H0,H1; congruence. + destruct H. + specialize (H y). + specialize (H0 y). + do 2 rewrite in_find_iff in H. + generalize (find_mapsto_iff m y)(find_mapsto_iff m' y). + do 2 destruct find; auto; intros. + f_equal; apply H0; [rewrite H1|rewrite H2]; auto. + destruct H as [H _]; now elim H. + destruct H as [_ H]; now elim H. +Qed. + +(** [Equivb] and [Equiv] and equivalent when [eq_elt] and [cmp] + are related. *) + +Section Cmp. +Variable eq_elt : elt->elt->Prop. +Variable cmp : elt->elt->bool. + +Definition compat_cmp := + forall e e', cmp e e' = true <-> eq_elt e e'. + +Lemma Equiv_Equivb : compat_cmp -> + forall m m', Equiv eq_elt m m' <-> Equivb cmp m m'. +Proof. + unfold Equivb, Equiv, Cmp; intuition. + red in H; rewrite H; eauto. + red in H; rewrite <-H; eauto. +Qed. +End Cmp. + +(** Composition of the two last results: relation between [Equal] + and [Equivb]. *) + +Lemma Equal_Equivb : forall cmp, + (forall e e', cmp e e' = true <-> e = e') -> + forall (m m':t elt), Equal m m' <-> Equivb cmp m m'. +Proof. + intros; rewrite Equal_Equiv. + apply Equiv_Equivb; auto. +Qed. + +Lemma Equal_Equivb_eqdec : + forall eq_elt_dec : (forall e e', { e = e' } + { e <> e' }), + let cmp := fun e e' => if eq_elt_dec e e' then true else false in + forall (m m':t elt), Equal m m' <-> Equivb cmp m m'. +Proof. +intros; apply Equal_Equivb. +unfold cmp; clear cmp; intros. +destruct eq_elt_dec; now intuition. +Qed. + +End Equalities. + +(** * [Equal] is a setoid equality. *) + +Lemma Equal_refl : forall (elt:Type)(m : t elt), Equal m m. +Proof. red; reflexivity. Qed. + +Lemma Equal_sym : forall (elt:Type)(m m' : t elt), + Equal m m' -> Equal m' m. +Proof. unfold Equal; auto. Qed. + +Lemma Equal_trans : forall (elt:Type)(m m' m'' : t elt), + Equal m m' -> Equal m' m'' -> Equal m m''. +Proof. unfold Equal; congruence. Qed. + +Definition Equal_ST : forall elt:Type, Setoid_Theory (t elt) (@Equal _). +Proof. +constructor; red; [apply Equal_refl | apply Equal_sym | apply Equal_trans]. +Qed. + +Add Relation key E.eq + reflexivity proved by E.eq_refl + symmetry proved by E.eq_sym + transitivity proved by E.eq_trans + as KeySetoid. + +Implicit Arguments Equal [[elt]]. + +Add Parametric Relation (elt : Type) : (t elt) Equal + reflexivity proved by (@Equal_refl elt) + symmetry proved by (@Equal_sym elt) + transitivity proved by (@Equal_trans elt) + as EqualSetoid. + +Add Parametric Morphism elt : (@In elt) with signature E.eq ==> Equal ==> iff as In_m. +Proof. +unfold Equal; intros k k' Hk m m' Hm. +rewrite (In_iff m Hk), in_find_iff, in_find_iff, Hm; intuition. +Qed. + +Add Parametric Morphism elt : (@MapsTo elt) + with signature E.eq ==> @Logic.eq _ ==> Equal ==> iff as MapsTo_m. +Proof. +unfold Equal; intros k k' Hk e m m' Hm. +rewrite (MapsTo_iff m e Hk), find_mapsto_iff, find_mapsto_iff, Hm; + intuition. +Qed. + +Add Parametric Morphism elt : (@Empty elt) with signature Equal ==> iff as Empty_m. +Proof. +unfold Empty; intros m m' Hm; intuition. +rewrite <-Hm in H0; eauto. +rewrite Hm in H0; eauto. +Qed. + +Add Parametric Morphism elt : (@is_empty elt) with signature Equal ==> @Logic.eq _ as is_empty_m. +Proof. +intros m m' Hm. +rewrite eq_bool_alt, <-is_empty_iff, <-is_empty_iff, Hm; intuition. +Qed. + +Add Parametric Morphism elt : (@mem elt) with signature E.eq ==> Equal ==> @Logic.eq _ as mem_m. +Proof. +intros k k' Hk m m' Hm. +rewrite eq_bool_alt, <- mem_in_iff, <-mem_in_iff, Hk, Hm; intuition. +Qed. + +Add Parametric Morphism elt : (@find elt) with signature E.eq ==> Equal ==> @Logic.eq _ as find_m. +Proof. +intros k k' Hk m m' Hm. +generalize (find_mapsto_iff m k)(find_mapsto_iff m' k') + (not_find_in_iff m k)(not_find_in_iff m' k'); +do 2 destruct find; auto; intros. +rewrite <- H, Hk, Hm, H0; auto. +rewrite <- H1, Hk, Hm, H2; auto. +symmetry; rewrite <- H2, <-Hk, <-Hm, H1; auto. +Qed. + +Add Parametric Morphism elt : (@add elt) with signature + E.eq ==> @Logic.eq _ ==> Equal ==> Equal as add_m. +Proof. +intros k k' Hk e m m' Hm y. +rewrite add_o, add_o; do 2 destruct eq_dec; auto. +elim n; rewrite <-Hk; auto. +elim n; rewrite Hk; auto. +Qed. + +Add Parametric Morphism elt : (@remove elt) with signature + E.eq ==> Equal ==> Equal as remove_m. +Proof. +intros k k' Hk m m' Hm y. +rewrite remove_o, remove_o; do 2 destruct eq_dec; auto. +elim n; rewrite <-Hk; auto. +elim n; rewrite Hk; auto. +Qed. + +Add Parametric Morphism elt elt' : (@map elt elt') with signature @Logic.eq _ ==> Equal ==> Equal as map_m. +Proof. +intros f m m' Hm y. +rewrite map_o, map_o, Hm; auto. +Qed. + +(* Later: Add Morphism cardinal *) + +(* old name: *) +Notation not_find_mapsto_iff := not_find_in_iff. + +End WFacts. + +(** * Same facts for full maps *) + +Module Facts (M:S). + Module D := OT_as_DT M.E. + Include WFacts D M. End Facts. + +(** * Additional Properties for weak maps + + Results about [fold], [elements], induction principles... +*) + +Module WProperties (E:DecidableType)(M:WSfun E). + Module Import F:=WFacts E M. + Import M. + + Section Elt. + Variable elt:Type. + + Definition Add x (e:elt) m m' := forall y, find y m' = find y (add x e m). + + Notation eqke := (@eq_key_elt elt). + Notation eqk := (@eq_key elt). + + Lemma elements_Empty : forall m:t elt, Empty m <-> elements m = nil. + Proof. + intros. + unfold Empty. + split; intros. + assert (forall a, ~ List.In a (elements m)). + red; intros. + apply (H (fst a) (snd a)). + rewrite elements_mapsto_iff. + rewrite InA_alt; exists a; auto. + split; auto; split; auto. + destruct (elements m); auto. + elim (H0 p); simpl; auto. + red; intros. + rewrite elements_mapsto_iff in H0. + rewrite InA_alt in H0; destruct H0. + rewrite H in H0; destruct H0 as (_,H0); inversion H0. + Qed. + + Lemma elements_empty : elements (@empty elt) = nil. + Proof. + rewrite <-elements_Empty; apply empty_1. + Qed. + + Lemma fold_Empty : forall m (A:Type)(f:key->elt->A->A)(i:A), + Empty m -> fold f m i = i. + Proof. + intros. + rewrite fold_1. + rewrite elements_Empty in H; rewrite H; simpl; auto. + Qed. + + Lemma NoDupA_eqk_eqke : forall l, NoDupA eqk l -> NoDupA eqke l. + Proof. + induction 1; auto. + constructor; auto. + contradict H. + destruct x as (x,y). + rewrite InA_alt in *; destruct H as ((a,b),((H1,H2),H3)); simpl in *. + exists (a,b); auto. + Qed. + + Lemma fold_Equal : forall m1 m2 (A:Type)(eqA:A->A->Prop)(st:Setoid_Theory A eqA) + (f:key->elt->A->A)(i:A), + compat_op eqke eqA (fun y =>f (fst y) (snd y)) -> + transpose eqA (fun y => f (fst y) (snd y)) -> + Equal m1 m2 -> + eqA (fold f m1 i) (fold f m2 i). + Proof. + assert (eqke_refl : forall p, eqke p p). + red; auto. + assert (eqke_sym : forall p p', eqke p p' -> eqke p' p). + intros (x1,x2) (y1,y2); unfold eq_key_elt; simpl; intuition. + assert (eqke_trans : forall p p' p'', eqke p p' -> eqke p' p'' -> eqke p p''). + intros (x1,x2) (y1,y2) (z1,z2); unfold eq_key_elt; simpl. + intuition; eauto; congruence. + intros; do 2 rewrite fold_1; do 2 rewrite <- fold_left_rev_right. + apply fold_right_equivlistA with (eqA:=eqke) (eqB:=eqA); auto. + apply NoDupA_rev; auto; apply NoDupA_eqk_eqke; apply elements_3w. + apply NoDupA_rev; auto; apply NoDupA_eqk_eqke; apply elements_3w. + red; intros. + do 2 rewrite InA_rev. + destruct x; do 2 rewrite <- elements_mapsto_iff. + do 2 rewrite find_mapsto_iff. + rewrite H1; split; auto. + Qed. + + Lemma fold_Add : forall m1 m2 x e (A:Type)(eqA:A->A->Prop)(st:Setoid_Theory A eqA) + (f:key->elt->A->A)(i:A), + compat_op eqke eqA (fun y =>f (fst y) (snd y)) -> + transpose eqA (fun y =>f (fst y) (snd y)) -> + ~In x m1 -> Add x e m1 m2 -> + eqA (fold f m2 i) (f x e (fold f m1 i)). + Proof. + assert (eqke_refl : forall p, eqke p p). + red; auto. + assert (eqke_sym : forall p p', eqke p p' -> eqke p' p). + intros (x1,x2) (y1,y2); unfold eq_key_elt; simpl; intuition. + assert (eqke_trans : forall p p' p'', eqke p p' -> eqke p' p'' -> eqke p p''). + intros (x1,x2) (y1,y2) (z1,z2); unfold eq_key_elt; simpl. + intuition; eauto; congruence. + intros; do 2 rewrite fold_1; do 2 rewrite <- fold_left_rev_right. + set (f':=fun y x0 => f (fst y) (snd y) x0) in *. + change (f x e (fold_right f' i (rev (elements m1)))) + with (f' (x,e) (fold_right f' i (rev (elements m1)))). + apply fold_right_add with (eqA:=eqke)(eqB:=eqA); auto. + apply NoDupA_rev; auto; apply NoDupA_eqk_eqke; apply elements_3w. + apply NoDupA_rev; auto; apply NoDupA_eqk_eqke; apply elements_3w. + rewrite InA_rev. + contradict H1. + exists e. + rewrite elements_mapsto_iff; auto. + intros a. + rewrite InA_cons; do 2 rewrite InA_rev; + destruct a as (a,b); do 2 rewrite <- elements_mapsto_iff. + do 2 rewrite find_mapsto_iff; unfold eq_key_elt; simpl. + rewrite H2. + rewrite add_o. + destruct (eq_dec x a); intuition. + inversion H3; auto. + f_equal; auto. + elim H1. + exists b; apply MapsTo_1 with a; auto with map. + elim n; auto. + Qed. + + Lemma cardinal_fold : forall m : t elt, + cardinal m = fold (fun _ _ => S) m 0. + Proof. + intros; rewrite cardinal_1, fold_1. + symmetry; apply fold_left_length; auto. + Qed. + + Lemma cardinal_Empty : forall m : t elt, + Empty m <-> cardinal m = 0. + Proof. + intros. + rewrite cardinal_1, elements_Empty. + destruct (elements m); intuition; discriminate. + Qed. + + Lemma Equal_cardinal : forall m m' : t elt, + Equal m m' -> cardinal m = cardinal m'. + Proof. + intros; do 2 rewrite cardinal_fold. + apply fold_Equal with (eqA:=@eq _); auto. + constructor; auto; congruence. + red; auto. + red; auto. + Qed. + + Lemma cardinal_1 : forall m : t elt, Empty m -> cardinal m = 0. + Proof. + intros; rewrite <- cardinal_Empty; auto. + Qed. + + Lemma cardinal_2 : + forall m m' x e, ~ In x m -> Add x e m m' -> cardinal m' = S (cardinal m). + Proof. + intros; do 2 rewrite cardinal_fold. + change S with ((fun _ _ => S) x e). + apply fold_Add; auto. + constructor; intros; auto; congruence. + red; simpl; auto. + red; simpl; auto. + Qed. + + Lemma cardinal_inv_1 : forall m : t elt, + cardinal m = 0 -> Empty m. + Proof. + intros; rewrite cardinal_Empty; auto. + Qed. + Hint Resolve cardinal_inv_1 : map. + + Lemma cardinal_inv_2 : + forall m n, cardinal m = S n -> { p : key*elt | MapsTo (fst p) (snd p) m }. + Proof. + intros; rewrite M.cardinal_1 in *. + generalize (elements_mapsto_iff m). + destruct (elements m); try discriminate. + exists p; auto. + rewrite H0; destruct p; simpl; auto. + constructor; red; auto. + Qed. + + Lemma cardinal_inv_2b : + forall m, cardinal m <> 0 -> { p : key*elt | MapsTo (fst p) (snd p) m }. + Proof. + intros. + generalize (@cardinal_inv_2 m); destruct cardinal. + elim H;auto. + eauto. + Qed. + + Lemma map_induction : + forall P : t elt -> Type, + (forall m, Empty m -> P m) -> + (forall m m', P m -> forall x e, ~In x m -> Add x e m m' -> P m') -> + forall m, P m. + Proof. + intros; remember (cardinal m) as n; revert m Heqn; induction n; intros. + apply X; apply cardinal_inv_1; auto. + + destruct (cardinal_inv_2 (sym_eq Heqn)) as ((x,e),H0); simpl in *. + assert (Add x e (remove x m) m). + red; intros. + rewrite add_o; rewrite remove_o; destruct (eq_dec x y); eauto with map. + apply X0 with (remove x m) x e; auto with map. + apply IHn; auto with map. + assert (S n = S (cardinal (remove x m))). + rewrite Heqn; eapply cardinal_2; eauto with map. + inversion H1; auto with map. + Qed. + + (** * Let's emulate some functions not present in the interface *) + + Definition filter (f : key -> elt -> bool)(m : t elt) := + fold (fun k e m => if f k e then add k e m else m) m (empty _). + + Definition for_all (f : key -> elt -> bool)(m : t elt) := + fold (fun k e b => if f k e then b else false) m true. + + Definition exists_ (f : key -> elt -> bool)(m : t elt) := + fold (fun k e b => if f k e then true else b) m false. + + Definition partition (f : key -> elt -> bool)(m : t elt) := + (filter f m, filter (fun k e => negb (f k e))). + + Section Specs. + Variable f : key -> elt -> bool. + Hypothesis Hf : forall e, compat_bool E.eq (fun k => f k e). + + Lemma filter_iff : forall m k e, + MapsTo k e (filter f m) <-> MapsTo k e m /\ f k e = true. + Proof. + unfold filter; intros. + rewrite fold_1. + rewrite <- fold_left_rev_right. + rewrite (elements_mapsto_iff m). + rewrite <- (InA_rev eqke (k,e) (elements m)). + assert (NoDupA eqk (rev (elements m))). + apply NoDupA_rev; auto; try apply elements_3w; auto. + intros (k1,e1); compute; auto. + intros (k1,e1)(k2,e2); compute; auto. + intros (k1,e1)(k2,e2)(k3,e3); compute; eauto. + induction (rev (elements m)); simpl; auto. + + rewrite empty_mapsto_iff. + intuition. + inversion H1. + + destruct a as (k',e'); simpl. + inversion_clear H. + case_eq (f k' e'); intros; simpl; + try rewrite add_mapsto_iff; rewrite IHl; clear IHl; intuition. + constructor; red; auto. + rewrite (Hf e' H2),H4 in H; auto. + inversion_clear H3. + compute in H2; destruct H2; auto. + destruct (E.eq_dec k' k); auto. + elim H0. + rewrite InA_alt in *; destruct H2 as (w,Hw); exists w; intuition. + red in H2; red; simpl in *; intuition. + rewrite e0; auto. + inversion_clear H3; auto. + compute in H2; destruct H2. + rewrite (Hf e H2),H3,H in H4; discriminate. + Qed. + + Lemma for_all_iff : forall m, + for_all f m = true <-> (forall k e, MapsTo k e m -> f k e = true). + Proof. + cut (forall m : t elt, + for_all f m = true <-> + (forall k e, InA eqke (k,e) (rev (elements m)) -> f k e = true)). + intros; rewrite H; split; intros. + apply H0; rewrite InA_rev, <- elements_mapsto_iff; auto. + apply H0; rewrite InA_rev, <- elements_mapsto_iff in H1; auto. + + unfold for_all; intros. + rewrite fold_1. + rewrite <- fold_left_rev_right. + assert (NoDupA eqk (rev (elements m))). + apply NoDupA_rev; auto; try apply elements_3w; auto. + intros (k1,e1); compute; auto. + intros (k1,e1)(k2,e2); compute; auto. + intros (k1,e1)(k2,e2)(k3,e3); compute; eauto. + induction (rev (elements m)); simpl; auto. + + intuition. + inversion H1. + + destruct a as (k,e); simpl. + inversion_clear H. + case_eq (f k e); intros; simpl; + try rewrite IHl; clear IHl; intuition. + inversion_clear H3; auto. + compute in H4; destruct H4. + rewrite (Hf e0 H3), H4; auto. + rewrite <-H, <-(H2 k e); auto. + constructor; red; auto. + Qed. + + Lemma exists_iff : forall m, + exists_ f m = true <-> + (exists p, MapsTo (fst p) (snd p) m /\ f (fst p) (snd p) = true). + Proof. + cut (forall m : t elt, + exists_ f m = true <-> + (exists p, InA eqke p (rev (elements m)) + /\ f (fst p) (snd p) = true)). + intros; rewrite H; split; intros. + destruct H0 as ((k,e),Hke); exists (k,e). + rewrite InA_rev, <-elements_mapsto_iff in Hke; auto. + destruct H0 as ((k,e),Hke); exists (k,e). + rewrite InA_rev, <-elements_mapsto_iff; auto. + unfold exists_; intros. + rewrite fold_1. + rewrite <- fold_left_rev_right. + assert (NoDupA eqk (rev (elements m))). + apply NoDupA_rev; auto; try apply elements_3w; auto. + intros (k1,e1); compute; auto. + intros (k1,e1)(k2,e2); compute; auto. + intros (k1,e1)(k2,e2)(k3,e3); compute; eauto. + induction (rev (elements m)); simpl; auto. + + intuition; try discriminate. + destruct H0 as ((k,e),(Hke,_)); inversion Hke. + + destruct a as (k,e); simpl. + inversion_clear H. + case_eq (f k e); intros; simpl; + try rewrite IHl; clear IHl; intuition. + exists (k,e); simpl; split; auto. + constructor; red; auto. + destruct H2 as ((k',e'),(Hke',Hf')); exists (k',e'); simpl; auto. + destruct H2 as ((k',e'),(Hke',Hf')); simpl in *. + inversion_clear Hke'. + compute in H2; destruct H2. + rewrite (Hf e' H2), H3,H in Hf'; discriminate. + exists (k',e'); auto. + Qed. + End Specs. + + (** specialized versions analyzing only keys (resp. elements) *) + + Definition filter_dom (f : key -> bool) := filter (fun k _ => f k). + Definition filter_range (f : elt -> bool) := filter (fun _ => f). + Definition for_all_dom (f : key -> bool) := for_all (fun k _ => f k). + Definition for_all_range (f : elt -> bool) := for_all (fun _ => f). + Definition exists_dom (f : key -> bool) := exists_ (fun k _ => f k). + Definition exists_range (f : elt -> bool) := exists_ (fun _ => f). + Definition partition_dom (f : key -> bool) := partition (fun k _ => f k). + Definition partition_range (f : elt -> bool) := partition (fun _ => f). + + End Elt. + + Add Parametric Morphism elt : (@cardinal elt) with signature Equal ==> @Logic.eq _ as cardinal_m. + Proof. intros; apply Equal_cardinal; auto. Qed. + +End WProperties. + +(** * Same Properties for full maps *) + +Module Properties (M:S). + Module D := OT_as_DT M.E. + Include WProperties D M. +End Properties. + +(** * Properties specific to maps with ordered keys *) + +Module OrdProperties (M:S). + Module Import ME := OrderedTypeFacts M.E. + Module Import O:=KeyOrderedType M.E. + Module Import P:=Properties M. + Import F. + Import M. + + Section Elt. + Variable elt:Type. + + Notation eqke := (@eqke elt). + Notation eqk := (@eqk elt). + Notation ltk := (@ltk elt). + Notation cardinal := (@cardinal elt). + Notation Equal := (@Equal elt). + Notation Add := (@Add elt). + + Definition Above x (m:t elt) := forall y, In y m -> E.lt y x. + Definition Below x (m:t elt) := forall y, In y m -> E.lt x y. + + Section Elements. + + Lemma sort_equivlistA_eqlistA : forall l l' : list (key*elt), + sort ltk l -> sort ltk l' -> equivlistA eqke l l' -> eqlistA eqke l l'. + Proof. + apply SortA_equivlistA_eqlistA; eauto; + unfold O.eqke, O.ltk; simpl; intuition; eauto. + Qed. + + Ltac clean_eauto := unfold O.eqke, O.ltk; simpl; intuition; eauto. + + Definition gtb (p p':key*elt) := match E.compare (fst p) (fst p') with GT _ => true | _ => false end. + Definition leb p := fun p' => negb (gtb p p'). + + Definition elements_lt p m := List.filter (gtb p) (elements m). + Definition elements_ge p m := List.filter (leb p) (elements m). + + Lemma gtb_1 : forall p p', gtb p p' = true <-> ltk p' p. + Proof. + intros (x,e) (y,e'); unfold gtb, O.ltk; simpl. + destruct (E.compare x y); intuition; try discriminate; ME.order. + Qed. + + Lemma leb_1 : forall p p', leb p p' = true <-> ~ltk p' p. + Proof. + intros (x,e) (y,e'); unfold leb, gtb, O.ltk; simpl. + destruct (E.compare x y); intuition; try discriminate; ME.order. + Qed. + + Lemma gtb_compat : forall p, compat_bool eqke (gtb p). + Proof. + red; intros (x,e) (a,e') (b,e'') H; red in H; simpl in *; destruct H. + generalize (gtb_1 (x,e) (a,e'))(gtb_1 (x,e) (b,e'')); + destruct (gtb (x,e) (a,e')); destruct (gtb (x,e) (b,e'')); auto. + unfold O.ltk in *; simpl in *; intros. + symmetry; rewrite H2. + apply ME.eq_lt with a; auto. + rewrite <- H1; auto. + unfold O.ltk in *; simpl in *; intros. + rewrite H1. + apply ME.eq_lt with b; auto. + rewrite <- H2; auto. + Qed. + + Lemma leb_compat : forall p, compat_bool eqke (leb p). + Proof. + red; intros x a b H. + unfold leb; f_equal; apply gtb_compat; auto. + Qed. + + Hint Resolve gtb_compat leb_compat elements_3 : map. + + Lemma elements_split : forall p m, + elements m = elements_lt p m ++ elements_ge p m. + Proof. + unfold elements_lt, elements_ge, leb; intros. + apply filter_split with (eqA:=eqk) (ltA:=ltk); eauto with map. + intros; destruct x; destruct y; destruct p. + rewrite gtb_1 in H; unfold O.ltk in H; simpl in *. + assert (~ltk (t1,e0) (k,e1)). + unfold gtb, O.ltk in *; simpl in *. + destruct (E.compare k t1); intuition; try discriminate; ME.order. + unfold O.ltk in *; simpl in *; ME.order. + Qed. + + Lemma elements_Add : forall m m' x e, ~In x m -> Add x e m m' -> + eqlistA eqke (elements m') + (elements_lt (x,e) m ++ (x,e):: elements_ge (x,e) m). + Proof. + intros; unfold elements_lt, elements_ge. + apply sort_equivlistA_eqlistA; auto with map. + apply (@SortA_app _ eqke); auto with map. + apply (@filter_sort _ eqke); auto with map; clean_eauto. + constructor; auto with map. + apply (@filter_sort _ eqke); auto with map; clean_eauto. + rewrite (@InfA_alt _ eqke); auto with map; try (clean_eauto; fail). + intros. + rewrite filter_InA in H1; auto with map; destruct H1. + rewrite leb_1 in H2. + destruct y; unfold O.ltk in *; simpl in *. + rewrite <- elements_mapsto_iff in H1. + assert (~E.eq x t0). + contradict H. + exists e0; apply MapsTo_1 with t0; auto. + ME.order. + apply (@filter_sort _ eqke); auto with map; clean_eauto. + intros. + rewrite filter_InA in H1; auto with map; destruct H1. + rewrite gtb_1 in H3. + destruct y; destruct x0; unfold O.ltk in *; simpl in *. + inversion_clear H2. + red in H4; simpl in *; destruct H4. + ME.order. + rewrite filter_InA in H4; auto with map; destruct H4. + rewrite leb_1 in H4. + unfold O.ltk in *; simpl in *; ME.order. + red; intros a; destruct a. + rewrite InA_app_iff; rewrite InA_cons. + do 2 (rewrite filter_InA; auto with map). + do 2 rewrite <- elements_mapsto_iff. + rewrite leb_1; rewrite gtb_1. + rewrite find_mapsto_iff; rewrite (H0 t0); rewrite <- find_mapsto_iff. + rewrite add_mapsto_iff. + unfold O.eqke, O.ltk; simpl. + destruct (E.compare t0 x); intuition. + right; split; auto; ME.order. + ME.order. + elim H. + exists e0; apply MapsTo_1 with t0; auto. + right; right; split; auto; ME.order. + ME.order. + right; split; auto; ME.order. + Qed. + + Lemma elements_Add_Above : forall m m' x e, + Above x m -> Add x e m m' -> + eqlistA eqke (elements m') (elements m ++ (x,e)::nil). + Proof. + intros. + apply sort_equivlistA_eqlistA; auto with map. + apply (@SortA_app _ eqke); auto with map. + intros. + inversion_clear H2. + destruct x0; destruct y. + rewrite <- elements_mapsto_iff in H1. + unfold O.eqke, O.ltk in *; simpl in *; destruct H3. + apply ME.lt_eq with x; auto. + apply H; firstorder. + inversion H3. + red; intros a; destruct a. + rewrite InA_app_iff; rewrite InA_cons; rewrite InA_nil. + do 2 rewrite <- elements_mapsto_iff. + rewrite find_mapsto_iff; rewrite (H0 t0); rewrite <- find_mapsto_iff. + rewrite add_mapsto_iff; unfold O.eqke; simpl. + intuition. + destruct (ME.eq_dec x t0); auto. + elimtype False. + assert (In t0 m). + exists e0; auto. + generalize (H t0 H1). + ME.order. + Qed. + + Lemma elements_Add_Below : forall m m' x e, + Below x m -> Add x e m m' -> + eqlistA eqke (elements m') ((x,e)::elements m). + Proof. + intros. + apply sort_equivlistA_eqlistA; auto with map. + change (sort ltk (((x,e)::nil) ++ elements m)). + apply (@SortA_app _ eqke); auto with map. + intros. + inversion_clear H1. + destruct y; destruct x0. + rewrite <- elements_mapsto_iff in H2. + unfold O.eqke, O.ltk in *; simpl in *; destruct H3. + apply ME.eq_lt with x; auto. + apply H; firstorder. + inversion H3. + red; intros a; destruct a. + rewrite InA_cons. + do 2 rewrite <- elements_mapsto_iff. + rewrite find_mapsto_iff; rewrite (H0 t0); rewrite <- find_mapsto_iff. + rewrite add_mapsto_iff; unfold O.eqke; simpl. + intuition. + destruct (ME.eq_dec x t0); auto. + elimtype False. + assert (In t0 m). + exists e0; auto. + generalize (H t0 H1). + ME.order. + Qed. + + Lemma elements_Equal_eqlistA : forall (m m': t elt), + Equal m m' -> eqlistA eqke (elements m) (elements m'). + Proof. + intros. + apply sort_equivlistA_eqlistA; auto with map. + red; intros. + destruct x; do 2 rewrite <- elements_mapsto_iff. + do 2 rewrite find_mapsto_iff; rewrite H; split; auto. + Qed. + + End Elements. + + Section Min_Max_Elt. + + (** We emulate two [max_elt] and [min_elt] functions. *) + + Fixpoint max_elt_aux (l:list (key*elt)) := match l with + | nil => None + | (x,e)::nil => Some (x,e) + | (x,e)::l => max_elt_aux l + end. + Definition max_elt m := max_elt_aux (elements m). + + Lemma max_elt_Above : + forall m x e, max_elt m = Some (x,e) -> Above x (remove x m). + Proof. + red; intros. + rewrite remove_in_iff in H0. + destruct H0. + rewrite elements_in_iff in H1. + destruct H1. + unfold max_elt in *. + generalize (elements_3 m). + revert x e H y x0 H0 H1. + induction (elements m). + simpl; intros; try discriminate. + intros. + destruct a; destruct l; simpl in *. + injection H; clear H; intros; subst. + inversion_clear H1. + red in H; simpl in *; intuition. + elim H0; eauto. + inversion H. + change (max_elt_aux (p::l) = Some (x,e)) in H. + generalize (IHl x e H); clear IHl; intros IHl. + inversion_clear H1; [ | inversion_clear H2; eauto ]. + red in H3; simpl in H3; destruct H3. + destruct p as (p1,p2). + destruct (ME.eq_dec p1 x). + apply ME.lt_eq with p1; auto. + inversion_clear H2. + inversion_clear H5. + red in H2; simpl in H2; ME.order. + apply E.lt_trans with p1; auto. + inversion_clear H2. + inversion_clear H5. + red in H2; simpl in H2; ME.order. + eapply IHl; eauto. + econstructor; eauto. + red; eauto. + inversion H2; auto. + Qed. + + Lemma max_elt_MapsTo : + forall m x e, max_elt m = Some (x,e) -> MapsTo x e m. + Proof. + intros. + unfold max_elt in *. + rewrite elements_mapsto_iff. + induction (elements m). + simpl; try discriminate. + destruct a; destruct l; simpl in *. + injection H; intros; subst; constructor; red; auto. + constructor 2; auto. + Qed. + + Lemma max_elt_Empty : + forall m, max_elt m = None -> Empty m. + Proof. + intros. + unfold max_elt in *. + rewrite elements_Empty. + induction (elements m); auto. + destruct a; destruct l; simpl in *; try discriminate. + assert (H':=IHl H); discriminate. + Qed. + + Definition min_elt m : option (key*elt) := match elements m with + | nil => None + | (x,e)::_ => Some (x,e) + end. + + Lemma min_elt_Below : + forall m x e, min_elt m = Some (x,e) -> Below x (remove x m). + Proof. + unfold min_elt, Below; intros. + rewrite remove_in_iff in H0; destruct H0. + rewrite elements_in_iff in H1. + destruct H1. + generalize (elements_3 m). + destruct (elements m). + try discriminate. + destruct p; injection H; intros; subst. + inversion_clear H1. + red in H2; destruct H2; simpl in *; ME.order. + inversion_clear H4. + rewrite (@InfA_alt _ eqke) in H3; eauto. + apply (H3 (y,x0)); auto. + unfold lt_key; simpl; intuition; eauto. + intros (x1,x2) (y1,y2) (z1,z2); compute; intuition; eauto. + intros (x1,x2) (y1,y2) (z1,z2); compute; intuition; eauto. + Qed. + + Lemma min_elt_MapsTo : + forall m x e, min_elt m = Some (x,e) -> MapsTo x e m. + Proof. + intros. + unfold min_elt in *. + rewrite elements_mapsto_iff. + destruct (elements m). + simpl; try discriminate. + destruct p; simpl in *. + injection H; intros; subst; constructor; red; auto. + Qed. + + Lemma min_elt_Empty : + forall m, min_elt m = None -> Empty m. + Proof. + intros. + unfold min_elt in *. + rewrite elements_Empty. + destruct (elements m); auto. + destruct p; simpl in *; discriminate. + Qed. + + End Min_Max_Elt. + + Section Induction_Principles. + + Lemma map_induction_max : + forall P : t elt -> Type, + (forall m, Empty m -> P m) -> + (forall m m', P m -> forall x e, Above x m -> Add x e m m' -> P m') -> + forall m, P m. + Proof. + intros; remember (cardinal m) as n; revert m Heqn; induction n; intros. + apply X; apply cardinal_inv_1; auto. + + case_eq (max_elt m); intros. + destruct p. + assert (Add k e (remove k m) m). + red; intros. + rewrite add_o; rewrite remove_o; destruct (eq_dec k y); eauto. + apply find_1; apply MapsTo_1 with k; auto. + apply max_elt_MapsTo; auto. + apply X0 with (remove k m) k e; auto with map. + apply IHn. + assert (S n = S (cardinal (remove k m))). + rewrite Heqn. + eapply cardinal_2; eauto with map. + inversion H1; auto. + eapply max_elt_Above; eauto. + + apply X; apply max_elt_Empty; auto. + Qed. + + Lemma map_induction_min : + forall P : t elt -> Type, + (forall m, Empty m -> P m) -> + (forall m m', P m -> forall x e, Below x m -> Add x e m m' -> P m') -> + forall m, P m. + Proof. + intros; remember (cardinal m) as n; revert m Heqn; induction n; intros. + apply X; apply cardinal_inv_1; auto. + + case_eq (min_elt m); intros. + destruct p. + assert (Add k e (remove k m) m). + red; intros. + rewrite add_o; rewrite remove_o; destruct (eq_dec k y); eauto. + apply find_1; apply MapsTo_1 with k; auto. + apply min_elt_MapsTo; auto. + apply X0 with (remove k m) k e; auto. + apply IHn. + assert (S n = S (cardinal (remove k m))). + rewrite Heqn. + eapply cardinal_2; eauto with map. + inversion H1; auto. + eapply min_elt_Below; eauto. + + apply X; apply min_elt_Empty; auto. + Qed. + + End Induction_Principles. + + Section Fold_properties. + + (** The following lemma has already been proved on Weak Maps, + but with one additionnal hypothesis (some [transpose] fact). *) + + Lemma fold_Equal : forall s1 s2 (A:Type)(eqA:A->A->Prop)(st:Setoid_Theory A eqA) + (f:key->elt->A->A)(i:A), + compat_op eqke eqA (fun y =>f (fst y) (snd y)) -> + Equal s1 s2 -> + eqA (fold f s1 i) (fold f s2 i). + Proof. + intros. + do 2 rewrite fold_1. + do 2 rewrite <- fold_left_rev_right. + apply fold_right_eqlistA with (eqA:=eqke) (eqB:=eqA); auto. + apply eqlistA_rev. + apply elements_Equal_eqlistA; auto. + Qed. + + Lemma fold_Add : forall s1 s2 x e (A:Type)(eqA:A->A->Prop)(st:Setoid_Theory A eqA) + (f:key->elt->A->A)(i:A), + compat_op eqke eqA (fun y =>f (fst y) (snd y)) -> + transpose eqA (fun y =>f (fst y) (snd y)) -> + ~In x s1 -> Add x e s1 s2 -> + eqA (fold f s2 i) (f x e (fold f s1 i)). + Proof. + intros; do 2 rewrite fold_1; do 2 rewrite <- fold_left_rev_right. + set (f':=fun y x0 => f (fst y) (snd y) x0) in *. + change (f x e (fold_right f' i (rev (elements s1)))) + with (f' (x,e) (fold_right f' i (rev (elements s1)))). + trans_st (fold_right f' i + (rev (elements_lt (x, e) s1 ++ (x,e) :: elements_ge (x, e) s1))). + apply fold_right_eqlistA with (eqA:=eqke) (eqB:=eqA); auto. + apply eqlistA_rev. + apply elements_Add; auto. + rewrite distr_rev; simpl. + rewrite app_ass; simpl. + rewrite (elements_split (x,e) s1). + rewrite distr_rev; simpl. + apply fold_right_commutes with (eqA:=eqke) (eqB:=eqA); auto. + Qed. + + Lemma fold_Add_Above : forall s1 s2 x e (A:Type)(eqA:A->A->Prop)(st:Setoid_Theory A eqA) + (f:key->elt->A->A)(i:A), + compat_op eqke eqA (fun y =>f (fst y) (snd y)) -> + Above x s1 -> Add x e s1 s2 -> + eqA (fold f s2 i) (f x e (fold f s1 i)). + Proof. + intros; do 2 rewrite fold_1; do 2 rewrite <- fold_left_rev_right. + set (f':=fun y x0 => f (fst y) (snd y) x0) in *. + trans_st (fold_right f' i (rev (elements s1 ++ (x,e)::nil))). + apply fold_right_eqlistA with (eqA:=eqke) (eqB:=eqA); auto. + apply eqlistA_rev. + apply elements_Add_Above; auto. + rewrite distr_rev; simpl. + refl_st. + Qed. + + Lemma fold_Add_Below : forall s1 s2 x e (A:Type)(eqA:A->A->Prop)(st:Setoid_Theory A eqA) + (f:key->elt->A->A)(i:A), + compat_op eqke eqA (fun y =>f (fst y) (snd y)) -> + Below x s1 -> Add x e s1 s2 -> + eqA (fold f s2 i) (fold f s1 (f x e i)). + Proof. + intros; do 2 rewrite fold_1; do 2 rewrite <- fold_left_rev_right. + set (f':=fun y x0 => f (fst y) (snd y) x0) in *. + trans_st (fold_right f' i (rev (((x,e)::nil)++elements s1))). + apply fold_right_eqlistA with (eqA:=eqke) (eqB:=eqA); auto. + apply eqlistA_rev. + simpl; apply elements_Add_Below; auto. + rewrite distr_rev; simpl. + rewrite fold_right_app. + refl_st. + Qed. + + End Fold_properties. + + End Elt. + +End OrdProperties. + + + + + diff --git a/theories/FSets/FMapFullAVL.v b/theories/FSets/FMapFullAVL.v new file mode 100644 index 00000000..57cbbcc4 --- /dev/null +++ b/theories/FSets/FMapFullAVL.v @@ -0,0 +1,823 @@ + +(***********************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Prop := + | RBLeaf : avl (Leaf _) + | RBNode : forall x e l r h, + avl l -> + avl r -> + -(2) <= height l - height r <= 2 -> + h = max (height l) (height r) + 1 -> + avl (Node l x e r h). + + +(** * Automation and dedicated tactics about [avl]. *) + +Hint Constructors avl. + +Lemma height_non_negative : forall (s : t elt), avl s -> + height s >= 0. +Proof. + induction s; simpl; intros; auto with zarith. + inv avl; intuition; omega_max. +Qed. + +Ltac avl_nn_hyp H := + let nz := fresh "nz" in assert (nz := height_non_negative H). + +Ltac avl_nn h := + let t := type of h in + match type of t with + | Prop => avl_nn_hyp h + | _ => match goal with H : avl h |- _ => avl_nn_hyp H end + end. + +(* Repeat the previous tactic. + Drawback: need to clear the [avl _] hyps ... Thank you Ltac *) + +Ltac avl_nns := + match goal with + | H:avl _ |- _ => avl_nn_hyp H; clear H; avl_nns + | _ => idtac + end. + + +(** * Basic results about [avl], [height] *) + +Lemma avl_node : forall x e l r, avl l -> avl r -> + -(2) <= height l - height r <= 2 -> + avl (Node l x e r (max (height l) (height r) + 1)). +Proof. + intros; auto. +Qed. +Hint Resolve avl_node. + +(** Results about [height] *) + +Lemma height_0 : forall l, avl l -> height l = 0 -> + l = Leaf _. +Proof. + destruct 1; intuition; simpl in *. + avl_nns; simpl in *; elimtype False; omega_max. +Qed. + + +(** * Empty map *) + +Lemma empty_avl : avl (empty elt). +Proof. + unfold empty; auto. +Qed. + + +(** * Helper functions *) + +Lemma create_avl : + forall l x e r, avl l -> avl r -> -(2) <= height l - height r <= 2 -> + avl (create l x e r). +Proof. + unfold create; auto. +Qed. + +Lemma create_height : + forall l x e r, avl l -> avl r -> -(2) <= height l - height r <= 2 -> + height (create l x e r) = max (height l) (height r) + 1. +Proof. + unfold create; intros; auto. +Qed. + +Lemma bal_avl : forall l x e r, avl l -> avl r -> + -(3) <= height l - height r <= 3 -> avl (bal l x e r). +Proof. + intros l x e r; functional induction (bal l x e r); intros; clearf; + inv avl; simpl in *; + match goal with |- avl (assert_false _ _ _ _) => avl_nns + | _ => repeat apply create_avl; simpl in *; auto + end; omega_max. +Qed. + +Lemma bal_height_1 : forall l x e r, avl l -> avl r -> + -(3) <= height l - height r <= 3 -> + 0 <= height (bal l x e r) - max (height l) (height r) <= 1. +Proof. + intros l x e r; functional induction (bal l x e r); intros; clearf; + inv avl; avl_nns; simpl in *; omega_max. +Qed. + +Lemma bal_height_2 : + forall l x e r, avl l -> avl r -> -(2) <= height l - height r <= 2 -> + height (bal l x e r) == max (height l) (height r) +1. +Proof. + intros l x e r; functional induction (bal l x e r); intros; clearf; + inv avl; avl_nns; simpl in *; omega_max. +Qed. + +Ltac omega_bal := match goal with + | H:avl ?l, H':avl ?r |- context [ bal ?l ?x ?e ?r ] => + generalize (bal_height_1 x e H H') (bal_height_2 x e H H'); + omega_max + end. + +(** * Insertion *) + +Lemma add_avl_1 : forall m x e, avl m -> + avl (add x e m) /\ 0 <= height (add x e m) - height m <= 1. +Proof. + intros m x e; functional induction (add x e m); intros; inv avl; simpl in *. + intuition; try constructor; simpl; auto; try omega_max. + (* LT *) + destruct IHt; auto. + split. + apply bal_avl; auto; omega_max. + omega_bal. + (* EQ *) + intuition; omega_max. + (* GT *) + destruct IHt; auto. + split. + apply bal_avl; auto; omega_max. + omega_bal. +Qed. + +Lemma add_avl : forall m x e, avl m -> avl (add x e m). +Proof. + intros; generalize (add_avl_1 x e H); intuition. +Qed. +Hint Resolve add_avl. + +(** * Extraction of minimum binding *) + +Lemma remove_min_avl_1 : forall l x e r h, avl (Node l x e r h) -> + avl (remove_min l x e r)#1 /\ + 0 <= height (Node l x e r h) - height (remove_min l x e r)#1 <= 1. +Proof. + intros l x e r; functional induction (remove_min l x e r); simpl in *; intros. + inv avl; simpl in *; split; auto. + avl_nns; omega_max. + inversion_clear H. + rewrite e0 in IHp;simpl in IHp;destruct (IHp _x); auto. + split; simpl in *. + apply bal_avl; auto; omega_max. + omega_bal. +Qed. + +Lemma remove_min_avl : forall l x e r h, avl (Node l x e r h) -> + avl (remove_min l x e r)#1. +Proof. + intros; generalize (remove_min_avl_1 H); intuition. +Qed. + +(** * Merging two trees *) + +Lemma merge_avl_1 : forall m1 m2, avl m1 -> avl m2 -> + -(2) <= height m1 - height m2 <= 2 -> + avl (merge m1 m2) /\ + 0<= height (merge m1 m2) - max (height m1) (height m2) <=1. +Proof. + intros m1 m2; functional induction (merge m1 m2); intros; + try factornode _x _x0 _x1 _x2 _x3 as m1. + simpl; split; auto; avl_nns; omega_max. + simpl; split; auto; avl_nns; omega_max. + generalize (remove_min_avl_1 H0). + rewrite e1; destruct 1. + split. + apply bal_avl; auto. + omega_max. + omega_bal. +Qed. + +Lemma merge_avl : forall m1 m2, avl m1 -> avl m2 -> + -(2) <= height m1 - height m2 <= 2 -> avl (merge m1 m2). +Proof. + intros; generalize (merge_avl_1 H H0 H1); intuition. +Qed. + + +(** * Deletion *) + +Lemma remove_avl_1 : forall m x, avl m -> + avl (remove x m) /\ 0 <= height m - height (remove x m) <= 1. +Proof. + intros m x; functional induction (remove x m); intros. + split; auto; omega_max. + (* LT *) + inv avl. + destruct (IHt H0). + split. + apply bal_avl; auto. + omega_max. + omega_bal. + (* EQ *) + inv avl. + generalize (merge_avl_1 H0 H1 H2). + intuition omega_max. + (* GT *) + inv avl. + destruct (IHt H1). + split. + apply bal_avl; auto. + omega_max. + omega_bal. +Qed. + +Lemma remove_avl : forall m x, avl m -> avl (remove x m). +Proof. + intros; generalize (remove_avl_1 x H); intuition. +Qed. +Hint Resolve remove_avl. + + +(** * Join *) + +Lemma join_avl_1 : forall l x d r, avl l -> avl r -> + avl (join l x d r) /\ + 0<= height (join l x d r) - max (height l) (height r) <= 1. +Proof. + join_tac. + + split; simpl; auto. + destruct (add_avl_1 x d H0). + avl_nns; omega_max. + set (l:=Node ll lx ld lr lh) in *. + split; auto. + destruct (add_avl_1 x d H). + simpl (height (Leaf elt)). + avl_nns; omega_max. + + inversion_clear H. + assert (height (Node rl rx rd rr rh) = rh); auto. + set (r := Node rl rx rd rr rh) in *; clearbody r. + destruct (Hlr x d r H2 H0); clear Hrl Hlr. + set (j := join lr x d r) in *; clearbody j. + simpl. + assert (-(3) <= height ll - height j <= 3) by omega_max. + split. + apply bal_avl; auto. + omega_bal. + + inversion_clear H0. + assert (height (Node ll lx ld lr lh) = lh); auto. + set (l := Node ll lx ld lr lh) in *; clearbody l. + destruct (Hrl H H1); clear Hrl Hlr. + set (j := join l x d rl) in *; clearbody j. + simpl. + assert (-(3) <= height j - height rr <= 3) by omega_max. + split. + apply bal_avl; auto. + omega_bal. + + clear Hrl Hlr. + assert (height (Node ll lx ld lr lh) = lh); auto. + assert (height (Node rl rx rd rr rh) = rh); auto. + set (l := Node ll lx ld lr lh) in *; clearbody l. + set (r := Node rl rx rd rr rh) in *; clearbody r. + assert (-(2) <= height l - height r <= 2) by omega_max. + split. + apply create_avl; auto. + rewrite create_height; auto; omega_max. +Qed. + +Lemma join_avl : forall l x d r, avl l -> avl r -> avl (join l x d r). +Proof. + intros; destruct (join_avl_1 x d H H0); auto. +Qed. +Hint Resolve join_avl. + +(** concat *) + +Lemma concat_avl : forall m1 m2, avl m1 -> avl m2 -> avl (concat m1 m2). +Proof. + intros m1 m2; functional induction (concat m1 m2); auto. + intros; apply join_avl; auto. + generalize (remove_min_avl H0); rewrite e1; simpl; auto. +Qed. +Hint Resolve concat_avl. + +(** split *) + +Lemma split_avl : forall m x, avl m -> + avl (split x m)#l /\ avl (split x m)#r. +Proof. + intros m x; functional induction (split x m); simpl; auto. + rewrite e1 in IHt;simpl in IHt;inversion_clear 1; intuition. + simpl; inversion_clear 1; auto. + rewrite e1 in IHt;simpl in IHt;inversion_clear 1; intuition. +Qed. + +End Elt. +Hint Constructors avl. + +Section Map. +Variable elt elt' : Type. +Variable f : elt -> elt'. + +Lemma map_height : forall m, height (map f m) = height m. +Proof. +destruct m; simpl; auto. +Qed. + +Lemma map_avl : forall m, avl m -> avl (map f m). +Proof. +induction m; simpl; auto. +inversion_clear 1; constructor; auto; do 2 rewrite map_height; auto. +Qed. + +End Map. + +Section Mapi. +Variable elt elt' : Type. +Variable f : key -> elt -> elt'. + +Lemma mapi_height : forall m, height (mapi f m) = height m. +Proof. +destruct m; simpl; auto. +Qed. + +Lemma mapi_avl : forall m, avl m -> avl (mapi f m). +Proof. +induction m; simpl; auto. +inversion_clear 1; constructor; auto; do 2 rewrite mapi_height; auto. +Qed. + +End Mapi. + +Section Map_option. +Variable elt elt' : Type. +Variable f : key -> elt -> option elt'. + +Lemma map_option_avl : forall m, avl m -> avl (map_option f m). +Proof. +induction m; simpl; auto; intros. +inv avl; destruct (f k e); auto using join_avl, concat_avl. +Qed. + +End Map_option. + +Section Map2_opt. +Variable elt elt' elt'' : Type. +Variable f : key -> elt -> option elt' -> option elt''. +Variable mapl : t elt -> t elt''. +Variable mapr : t elt' -> t elt''. +Hypothesis mapl_avl : forall m, avl m -> avl (mapl m). +Hypothesis mapr_avl : forall m', avl m' -> avl (mapr m'). + +Notation map2_opt := (map2_opt f mapl mapr). + +Lemma map2_opt_avl : forall m1 m2, avl m1 -> avl m2 -> + avl (map2_opt m1 m2). +Proof. +intros m1 m2; functional induction (map2_opt m1 m2); auto; +factornode _x0 _x1 _x2 _x3 _x4 as r2; intros; +destruct (split_avl x1 H0); rewrite e1 in *; simpl in *; inv avl; +auto using join_avl, concat_avl. +Qed. + +End Map2_opt. + +Section Map2. +Variable elt elt' elt'' : Type. +Variable f : option elt -> option elt' -> option elt''. + +Lemma map2_avl : forall m1 m2, avl m1 -> avl m2 -> avl (map2 f m1 m2). +Proof. +unfold map2; auto using map2_opt_avl, map_option_avl. +Qed. + +End Map2. +End AvlProofs. + +(** * Encapsulation + + We can implement [S] with balanced binary search trees. + When compared to [FMapAVL], we maintain here two invariants + (bst and avl) instead of only bst, which is enough for fulfilling + the FMap interface. +*) + +Module IntMake (I:Int)(X: OrderedType) <: S with Module E := X. + + Module E := X. + Module Import AvlProofs := AvlProofs I X. + Import Raw. + Import Raw.Proofs. + + Record bbst (elt:Type) := + Bbst {this :> tree elt; is_bst : bst this; is_avl: avl this}. + + Definition t := bbst. + Definition key := E.t. + + Section Elt. + Variable elt elt' elt'': Type. + + Implicit Types m : t elt. + Implicit Types x y : key. + Implicit Types e : elt. + + Definition empty : t elt := Bbst (empty_bst elt) (empty_avl elt). + Definition is_empty m : bool := is_empty m.(this). + Definition add x e m : t elt := + Bbst (add_bst x e m.(is_bst)) (add_avl x e m.(is_avl)). + Definition remove x m : t elt := + Bbst (remove_bst x m.(is_bst)) (remove_avl x m.(is_avl)). + Definition mem x m : bool := mem x m.(this). + Definition find x m : option elt := find x m.(this). + Definition map f m : t elt' := + Bbst (map_bst f m.(is_bst)) (map_avl f m.(is_avl)). + Definition mapi (f:key->elt->elt') m : t elt' := + Bbst (mapi_bst f m.(is_bst)) (mapi_avl f m.(is_avl)). + Definition map2 f m (m':t elt') : t elt'' := + Bbst (map2_bst f m.(is_bst) m'.(is_bst)) (map2_avl f m.(is_avl) m'.(is_avl)). + Definition elements m : list (key*elt) := elements m.(this). + Definition cardinal m := cardinal m.(this). + Definition fold (A:Type) (f:key->elt->A->A) m i := fold (A:=A) f m.(this) i. + Definition equal cmp m m' : bool := equal cmp m.(this) m'.(this). + + Definition MapsTo x e m : Prop := MapsTo x e m.(this). + Definition In x m : Prop := In0 x m.(this). + Definition Empty m : Prop := Empty m.(this). + + Definition eq_key : (key*elt) -> (key*elt) -> Prop := @PX.eqk elt. + Definition eq_key_elt : (key*elt) -> (key*elt) -> Prop := @PX.eqke elt. + Definition lt_key : (key*elt) -> (key*elt) -> Prop := @PX.ltk elt. + + Lemma MapsTo_1 : forall m x y e, E.eq x y -> MapsTo x e m -> MapsTo y e m. + Proof. intros m; exact (@MapsTo_1 _ m.(this)). Qed. + + Lemma mem_1 : forall m x, In x m -> mem x m = true. + Proof. + unfold In, mem; intros m x; rewrite In_alt; simpl; apply mem_1; auto. + apply m.(is_bst). + Qed. + + Lemma mem_2 : forall m x, mem x m = true -> In x m. + Proof. + unfold In, mem; intros m x; rewrite In_alt; simpl; apply mem_2; auto. + Qed. + + Lemma empty_1 : Empty empty. + Proof. exact (@empty_1 elt). Qed. + + Lemma is_empty_1 : forall m, Empty m -> is_empty m = true. + Proof. intros m; exact (@is_empty_1 _ m.(this)). Qed. + Lemma is_empty_2 : forall m, is_empty m = true -> Empty m. + Proof. intros m; exact (@is_empty_2 _ m.(this)). Qed. + + Lemma add_1 : forall m x y e, E.eq x y -> MapsTo y e (add x e m). + Proof. intros m x y e; exact (@add_1 elt _ x y e). Qed. + Lemma add_2 : forall m x y e e', ~ E.eq x y -> MapsTo y e m -> MapsTo y e (add x e' m). + Proof. intros m x y e e'; exact (@add_2 elt _ x y e e'). Qed. + Lemma add_3 : forall m x y e e', ~ E.eq x y -> MapsTo y e (add x e' m) -> MapsTo y e m. + Proof. intros m x y e e'; exact (@add_3 elt _ x y e e'). Qed. + + Lemma remove_1 : forall m x y, E.eq x y -> ~ In y (remove x m). + Proof. + unfold In, remove; intros m x y; rewrite In_alt; simpl; apply remove_1; auto. + apply m.(is_bst). + Qed. + Lemma remove_2 : forall m x y e, ~ E.eq x y -> MapsTo y e m -> MapsTo y e (remove x m). + Proof. intros m x y e; exact (@remove_2 elt _ x y e m.(is_bst)). Qed. + Lemma remove_3 : forall m x y e, MapsTo y e (remove x m) -> MapsTo y e m. + Proof. intros m x y e; exact (@remove_3 elt _ x y e m.(is_bst)). Qed. + + + Lemma find_1 : forall m x e, MapsTo x e m -> find x m = Some e. + Proof. intros m x e; exact (@find_1 elt _ x e m.(is_bst)). Qed. + Lemma find_2 : forall m x e, find x m = Some e -> MapsTo x e m. + Proof. intros m; exact (@find_2 elt m.(this)). Qed. + + Lemma fold_1 : forall m (A : Type) (i : A) (f : key -> elt -> A -> A), + fold f m i = fold_left (fun a p => f (fst p) (snd p) a) (elements m) i. + Proof. intros m; exact (@fold_1 elt m.(this) m.(is_bst)). Qed. + + Lemma elements_1 : forall m x e, + MapsTo x e m -> InA eq_key_elt (x,e) (elements m). + Proof. + intros; unfold elements, MapsTo, eq_key_elt; rewrite elements_mapsto; auto. + Qed. + + Lemma elements_2 : forall m x e, + InA eq_key_elt (x,e) (elements m) -> MapsTo x e m. + Proof. + intros; unfold elements, MapsTo, eq_key_elt; rewrite <- elements_mapsto; auto. + Qed. + + Lemma elements_3 : forall m, sort lt_key (elements m). + Proof. intros m; exact (@elements_sort elt m.(this) m.(is_bst)). Qed. + + Lemma elements_3w : forall m, NoDupA eq_key (elements m). + Proof. intros m; exact (@elements_nodup elt m.(this) m.(is_bst)). Qed. + + Lemma cardinal_1 : forall m, cardinal m = length (elements m). + Proof. intro m; exact (@elements_cardinal elt m.(this)). Qed. + + Definition Equal m m' := forall y, find y m = find y m'. + Definition Equiv (eq_elt:elt->elt->Prop) m m' := + (forall k, In k m <-> In k m') /\ + (forall k e e', MapsTo k e m -> MapsTo k e' m' -> eq_elt e e'). + Definition Equivb cmp := Equiv (Cmp cmp). + + Lemma Equivb_Equivb : forall cmp m m', + Equivb cmp m m' <-> Raw.Proofs.Equivb cmp m m'. + Proof. + intros; unfold Equivb, Equiv, Raw.Proofs.Equivb, In; intuition. + generalize (H0 k); do 2 rewrite In_alt; intuition. + generalize (H0 k); do 2 rewrite In_alt; intuition. + generalize (H0 k); do 2 rewrite <- In_alt; intuition. + generalize (H0 k); do 2 rewrite <- In_alt; intuition. + Qed. + + Lemma equal_1 : forall m m' cmp, + Equivb cmp m m' -> equal cmp m m' = true. + Proof. + unfold equal; intros (m,b,a) (m',b',a') cmp; rewrite Equivb_Equivb; + intros; simpl in *; rewrite equal_Equivb; auto. + Qed. + + Lemma equal_2 : forall m m' cmp, + equal cmp m m' = true -> Equivb cmp m m'. + Proof. + unfold equal; intros (m,b,a) (m',b',a') cmp; rewrite Equivb_Equivb; + intros; simpl in *; rewrite <-equal_Equivb; auto. + Qed. + + End Elt. + + Lemma map_1 : forall (elt elt':Type)(m: t elt)(x:key)(e:elt)(f:elt->elt'), + MapsTo x e m -> MapsTo x (f e) (map f m). + Proof. intros elt elt' m x e f; exact (@map_1 elt elt' f m.(this) x e). Qed. + + Lemma map_2 : forall (elt elt':Type)(m:t elt)(x:key)(f:elt->elt'), In x (map f m) -> In x m. + Proof. + intros elt elt' m x f; do 2 unfold In in *; do 2 rewrite In_alt; simpl. + apply map_2; auto. + Qed. + + Lemma mapi_1 : forall (elt elt':Type)(m: t elt)(x:key)(e:elt) + (f:key->elt->elt'), MapsTo x e m -> + exists y, E.eq y x /\ MapsTo x (f y e) (mapi f m). + Proof. intros elt elt' m x e f; exact (@mapi_1 elt elt' f m.(this) x e). Qed. + Lemma mapi_2 : forall (elt elt':Type)(m: t elt)(x:key) + (f:key->elt->elt'), In x (mapi f m) -> In x m. + Proof. + intros elt elt' m x f; unfold In in *; do 2 rewrite In_alt; simpl; apply mapi_2; auto. + Qed. + + Lemma map2_1 : forall (elt elt' elt'':Type)(m: t elt)(m': t elt') + (x:key)(f:option elt->option elt'->option elt''), + In x m \/ In x m' -> + find x (map2 f m m') = f (find x m) (find x m'). + Proof. + unfold find, map2, In; intros elt elt' elt'' m m' x f. + do 2 rewrite In_alt; intros; simpl; apply map2_1; auto. + apply m.(is_bst). + apply m'.(is_bst). + Qed. + + Lemma map2_2 : forall (elt elt' elt'':Type)(m: t elt)(m': t elt') + (x:key)(f:option elt->option elt'->option elt''), + In x (map2 f m m') -> In x m \/ In x m'. + Proof. + unfold In, map2; intros elt elt' elt'' m m' x f. + do 3 rewrite In_alt; intros; simpl in *; eapply map2_2; eauto. + apply m.(is_bst). + apply m'.(is_bst). + Qed. + +End IntMake. + + +Module IntMake_ord (I:Int)(X: OrderedType)(D : OrderedType) <: + Sord with Module Data := D + with Module MapS.E := X. + + Module Data := D. + Module Import MapS := IntMake(I)(X). + Import AvlProofs. + Import Raw.Proofs. + Module Import MD := OrderedTypeFacts(D). + Module LO := FMapList.Make_ord(X)(D). + + Definition t := MapS.t D.t. + + Definition cmp e e' := + match D.compare e e' with EQ _ => true | _ => false end. + + Definition elements (m:t) := + LO.MapS.Build_slist (Raw.Proofs.elements_sort m.(is_bst)). + + (** * As comparison function, we propose here a non-structural + version faithful to the code of Ocaml's Map library, instead of + the structural version of FMapAVL *) + + Fixpoint cardinal_e (e:Raw.enumeration D.t) := + match e with + | Raw.End => 0%nat + | Raw.More _ _ r e => S (Raw.cardinal r + cardinal_e e) + end. + + Lemma cons_cardinal_e : forall m e, + cardinal_e (Raw.cons m e) = (Raw.cardinal m + cardinal_e e)%nat. + Proof. + induction m; simpl; intros; auto. + rewrite IHm1; simpl; rewrite <- plus_n_Sm; auto with arith. + Qed. + + Definition cardinal_e_2 ee := + (cardinal_e (fst ee) + cardinal_e (snd ee))%nat. + + Function compare_aux (ee:Raw.enumeration D.t * Raw.enumeration D.t) + { measure cardinal_e_2 ee } : comparison := + match ee with + | (Raw.End, Raw.End) => Eq + | (Raw.End, Raw.More _ _ _ _) => Lt + | (Raw.More _ _ _ _, Raw.End) => Gt + | (Raw.More x1 d1 r1 e1, Raw.More x2 d2 r2 e2) => + match X.compare x1 x2 with + | EQ _ => match D.compare d1 d2 with + | EQ _ => compare_aux (Raw.cons r1 e1, Raw.cons r2 e2) + | LT _ => Lt + | GT _ => Gt + end + | LT _ => Lt + | GT _ => Gt + end + end. + Proof. + intros; unfold cardinal_e_2; simpl; + abstract (do 2 rewrite cons_cardinal_e; romega with * ). + Defined. + + Definition Cmp c := + match c with + | Eq => LO.eq_list + | Lt => LO.lt_list + | Gt => (fun l1 l2 => LO.lt_list l2 l1) + end. + + Lemma cons_Cmp : forall c x1 x2 d1 d2 l1 l2, + X.eq x1 x2 -> D.eq d1 d2 -> + Cmp c l1 l2 -> Cmp c ((x1,d1)::l1) ((x2,d2)::l2). + Proof. + destruct c; simpl; intros; MX.elim_comp; auto. + Qed. + Hint Resolve cons_Cmp. + + Lemma compare_aux_Cmp : forall e, + Cmp (compare_aux e) (flatten_e (fst e)) (flatten_e (snd e)). + Proof. + intros e; functional induction (compare_aux e); simpl in *; + auto; intros; try clear e0; try clear e3; try MX.elim_comp; auto. + rewrite 2 cons_1 in IHc; auto. + Qed. + + Lemma compare_Cmp : forall m1 m2, + Cmp (compare_aux (Raw.cons m1 (Raw.End _), Raw.cons m2 (Raw.End _))) + (Raw.elements m1) (Raw.elements m2). + Proof. + intros. + assert (H1:=cons_1 m1 (Raw.End _)). + assert (H2:=cons_1 m2 (Raw.End _)). + simpl in *; rewrite <- app_nil_end in *; rewrite <-H1,<-H2. + apply (@compare_aux_Cmp (Raw.cons m1 (Raw.End _), + Raw.cons m2 (Raw.End _))). + Qed. + + Definition eq (m1 m2 : t) := LO.eq_list (Raw.elements m1) (Raw.elements m2). + Definition lt (m1 m2 : t) := LO.lt_list (Raw.elements m1) (Raw.elements m2). + + Definition compare (s s':t) : Compare lt eq s s'. + Proof. + intros (s,b,a) (s',b',a'). + generalize (compare_Cmp s s'). + destruct compare_aux; intros; [apply EQ|apply LT|apply GT]; red; auto. + Defined. + + + (* Proofs about [eq] and [lt] *) + + Definition selements (m1 : t) := + LO.MapS.Build_slist (elements_sort m1.(is_bst)). + + Definition seq (m1 m2 : t) := LO.eq (selements m1) (selements m2). + Definition slt (m1 m2 : t) := LO.lt (selements m1) (selements m2). + + Lemma eq_seq : forall m1 m2, eq m1 m2 <-> seq m1 m2. + Proof. + unfold eq, seq, selements, elements, LO.eq; intuition. + Qed. + + Lemma lt_slt : forall m1 m2, lt m1 m2 <-> slt m1 m2. + Proof. + unfold lt, slt, selements, elements, LO.lt; intuition. + Qed. + + Lemma eq_1 : forall (m m' : t), MapS.Equivb cmp m m' -> eq m m'. + Proof. + intros m m'. + rewrite eq_seq; unfold seq. + rewrite Equivb_Equivb. + rewrite Equivb_elements. + auto using LO.eq_1. + Qed. + + Lemma eq_2 : forall m m', eq m m' -> MapS.Equivb cmp m m'. + Proof. + intros m m'. + rewrite eq_seq; unfold seq. + rewrite Equivb_Equivb. + rewrite Equivb_elements. + intros. + generalize (LO.eq_2 H). + auto. + Qed. + + Lemma eq_refl : forall m : t, eq m m. + Proof. + intros; rewrite eq_seq; unfold seq; intros; apply LO.eq_refl. + Qed. + + Lemma eq_sym : forall m1 m2 : t, eq m1 m2 -> eq m2 m1. + Proof. + intros m1 m2; rewrite 2 eq_seq; unfold seq; intros; apply LO.eq_sym; auto. + Qed. + + Lemma eq_trans : forall m1 m2 m3 : t, eq m1 m2 -> eq m2 m3 -> eq m1 m3. + Proof. + intros m1 m2 M3; rewrite 3 eq_seq; unfold seq. + intros; eapply LO.eq_trans; eauto. + Qed. + + Lemma lt_trans : forall m1 m2 m3 : t, lt m1 m2 -> lt m2 m3 -> lt m1 m3. + Proof. + intros m1 m2 m3; rewrite 3 lt_slt; unfold slt; + intros; eapply LO.lt_trans; eauto. + Qed. + + Lemma lt_not_eq : forall m1 m2 : t, lt m1 m2 -> ~ eq m1 m2. + Proof. + intros m1 m2; rewrite lt_slt, eq_seq; unfold slt, seq; + intros; apply LO.lt_not_eq; auto. + Qed. + +End IntMake_ord. + +(* For concrete use inside Coq, we propose an instantiation of [Int] by [Z]. *) + +Module Make (X: OrderedType) <: S with Module E := X + :=IntMake(Z_as_Int)(X). + +Module Make_ord (X: OrderedType)(D: OrderedType) + <: Sord with Module Data := D + with Module MapS.E := X + :=IntMake_ord(Z_as_Int)(X)(D). + diff --git a/theories/FSets/FMapIntMap.v b/theories/FSets/FMapIntMap.v deleted file mode 100644 index c7681bd4..00000000 --- a/theories/FSets/FMapIntMap.v +++ /dev/null @@ -1,622 +0,0 @@ -(***********************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* ~ eq x y. - Proof. - intros; intro. - rewrite H0 in H. - red in H. - rewrite Nless_not_refl in H; discriminate. - Qed. - - Definition compare : forall x y : t, Compare lt eq x y. - Proof. - intros x y. - destruct (Nless_total x y) as [[H|H]|H]. - apply LT; unfold lt; auto. - apply GT; unfold lt; auto. - apply EQ; auto. - Qed. - -End NUsualOrderedType. - - -(** The module of maps over [N] keys based on [IntMap] *) - -Module MapIntMap <: S with Module E:=NUsualOrderedType. - - Module E:=NUsualOrderedType. - Module ME:=OrderedTypeFacts(E). - Module PE:=KeyOrderedType(E). - - Definition key := N. - - Definition t := Map. - - Section A. - Variable A:Set. - - Definition empty : t A := M0 A. - - Definition is_empty (m : t A) : bool := - MapEmptyp _ (MapCanonicalize _ m). - - Definition find (x:key)(m: t A) : option A := MapGet _ m x. - - Definition mem (x:key)(m: t A) : bool := - match find x m with - | Some _ => true - | None => false - end. - - Definition add (x:key)(v:A)(m:t A) : t A := MapPut _ m x v. - - Definition remove (x:key)(m:t A) : t A := MapRemove _ m x. - - Definition elements (m : t A) : list (N*A) := alist_of_Map _ m. - - Definition MapsTo (x:key)(v:A)(m:t A) := find x m = Some v. - - Definition In (x:key)(m:t A) := exists e:A, MapsTo x e m. - - Definition Empty m := forall (a : key)(e:A) , ~ MapsTo a e m. - - Definition eq_key (p p':key*A) := E.eq (fst p) (fst p'). - - Definition eq_key_elt (p p':key*A) := - E.eq (fst p) (fst p') /\ (snd p) = (snd p'). - - Definition lt_key (p p':key*A) := E.lt (fst p) (fst p'). - - Lemma Empty_alt : forall m, Empty m <-> forall a, find a m = None. - Proof. - unfold Empty, MapsTo. - intuition. - generalize (H a). - destruct (find a m); intuition. - elim (H0 a0); auto. - rewrite H in H0; discriminate. - Qed. - - Section Spec. - Variable m m' m'' : t A. - Variable x y z : key. - Variable e e' : A. - - Lemma MapsTo_1 : E.eq x y -> MapsTo x e m -> MapsTo y e m. - Proof. intros; rewrite <- H; auto. Qed. - - Lemma find_1 : MapsTo x e m -> find x m = Some e. - Proof. unfold MapsTo; auto. Qed. - - Lemma find_2 : find x m = Some e -> MapsTo x e m. - Proof. red; auto. Qed. - - Lemma empty_1 : Empty empty. - Proof. - rewrite Empty_alt; intros; unfold empty, find; simpl; auto. - Qed. - - Lemma is_empty_1 : Empty m -> is_empty m = true. - Proof. - unfold Empty, is_empty, find; intros. - cut (MapCanonicalize _ m = M0 _). - intros; rewrite H0; simpl; auto. - apply mapcanon_unique. - apply mapcanon_exists_2. - constructor. - red; red; simpl; intros. - rewrite <- (mapcanon_exists_1 _ m). - unfold MapsTo, find in *. - generalize (H a). - destruct (MapGet _ m a); auto. - intros; generalize (H0 a0); destruct 1; auto. - Qed. - - Lemma is_empty_2 : is_empty m = true -> Empty m. - Proof. - unfold Empty, is_empty, MapsTo, find; intros. - generalize (MapEmptyp_complete _ _ H); clear H; intros. - rewrite (mapcanon_exists_1 _ m). - rewrite H; simpl; auto. - discriminate. - Qed. - - Lemma mem_1 : In x m -> mem x m = true. - Proof. - unfold In, MapsTo, mem. - destruct (find x m); auto. - destruct 1; discriminate. - Qed. - - Lemma mem_2 : forall m x, mem x m = true -> In x m. - Proof. - unfold In, MapsTo, mem. - intros. - destruct (find x0 m0); auto; try discriminate. - exists a; auto. - Qed. - - Lemma add_1 : E.eq x y -> MapsTo y e (add x e m). - Proof. - unfold MapsTo, find, add. - intro H; rewrite H; clear H. - rewrite MapPut_semantics. - rewrite Neqb_correct; auto. - Qed. - - Lemma add_2 : ~ E.eq x y -> MapsTo y e m -> MapsTo y e (add x e' m). - Proof. - unfold MapsTo, find, add. - intros. - rewrite MapPut_semantics. - rewrite H0. - generalize (Neqb_complete x y). - destruct (Neqb x y); auto. - intros. - elim H; auto. - apply H1; auto. - Qed. - - Lemma add_3 : ~ E.eq x y -> MapsTo y e (add x e' m) -> MapsTo y e m. - Proof. - unfold MapsTo, find, add. - rewrite MapPut_semantics. - intro H. - generalize (Neqb_complete x y). - destruct (Neqb x y); auto. - intros; elim H; auto. - apply H0; auto. - Qed. - - Lemma remove_1 : E.eq x y -> ~ In y (remove x m). - Proof. - unfold In, MapsTo, find, remove. - rewrite MapRemove_semantics. - intro H. - rewrite H; rewrite Neqb_correct. - red; destruct 1; discriminate. - Qed. - - Lemma remove_2 : ~ E.eq x y -> MapsTo y e m -> MapsTo y e (remove x m). - Proof. - unfold MapsTo, find, remove. - rewrite MapRemove_semantics. - intros. - rewrite H0. - generalize (Neqb_complete x y). - destruct (Neqb x y); auto. - intros; elim H; apply H1; auto. - Qed. - - Lemma remove_3 : MapsTo y e (remove x m) -> MapsTo y e m. - Proof. - unfold MapsTo, find, remove. - rewrite MapRemove_semantics. - destruct (Neqb x y); intros; auto. - discriminate. - Qed. - - Lemma alist_sorted_sort : forall l, alist_sorted A l=true -> sort lt_key l. - Proof. - induction l. - auto. - simpl. - destruct a. - destruct l. - auto. - destruct p. - intros; destruct (andb_prop _ _ H); auto. - Qed. - - Lemma elements_3 : sort lt_key (elements m). - Proof. - unfold elements. - apply alist_sorted_sort. - apply alist_of_Map_sorts. - Qed. - - Lemma elements_1 : - MapsTo x e m -> InA eq_key_elt (x,e) (elements m). - Proof. - unfold MapsTo, find, elements. - rewrite InA_alt. - intro H. - exists (x,e). - split. - red; simpl; unfold E.eq; auto. - rewrite alist_of_Map_semantics in H. - generalize H. - set (l:=alist_of_Map A m); clearbody l; clear. - induction l; simpl; auto. - intro; discriminate. - destruct a; simpl; auto. - generalize (Neqb_complete a x). - destruct (Neqb a x); auto. - left. - injection H0; auto. - intros; f_equal; auto. - Qed. - - Lemma elements_2 : - InA eq_key_elt (x,e) (elements m) -> MapsTo x e m. - Proof. - generalize elements_3. - unfold MapsTo, find, elements. - rewrite InA_alt. - intros H ((e0,a),(H0,H1)). - red in H0; simpl in H0; unfold E.eq in H0; destruct H0; subst. - rewrite alist_of_Map_semantics. - generalize H H1; clear H H1. - set (l:=alist_of_Map A m); clearbody l; clear. - induction l; simpl; auto. - intro; contradiction. - intros. - destruct a0; simpl. - inversion H1. - injection H0; intros; subst. - rewrite Neqb_correct; auto. - assert (InA eq_key (e0,a) l). - rewrite InA_alt. - exists (e0,a); split; auto. - red; simpl; auto; red; auto. - generalize (PE.Sort_In_cons_1 H H2). - unfold PE.ltk; simpl. - intros H3; generalize (E.lt_not_eq H3). - generalize (Neqb_complete a0 e0). - destruct (Neqb a0 e0); auto. - destruct 2. - apply H4; auto. - inversion H; auto. - Qed. - - Definition Equal cmp m m' := - (forall k, In k m <-> In k m') /\ - (forall k e e', MapsTo k e m -> MapsTo k e' m' -> cmp e e' = true). - - (** unfortunately, the [MapFold] of [IntMap] isn't compatible with - the FMap interface. We use a naive version for now : *) - - Definition fold (B:Set)(f:key -> A -> B -> B)(m:t A)(i:B) : B := - fold_left (fun a p => f (fst p) (snd p) a) (elements m) i. - - Lemma fold_1 : - forall (B:Set) (i : B) (f : key -> A -> B -> B), - fold f m i = fold_left (fun a p => f (fst p) (snd p) a) (elements m) i. - Proof. auto. Qed. - - End Spec. - - Variable B : Set. - - Fixpoint mapi_aux (pf:N->N)(f : N -> A -> B)(m:t A) { struct m }: t B := - match m with - | M0 => M0 _ - | M1 x y => M1 _ x (f (pf x) y) - | M2 m0 m1 => M2 _ (mapi_aux (fun n => pf (Ndouble n)) f m0) - (mapi_aux (fun n => pf (Ndouble_plus_one n)) f m1) - end. - - Definition mapi := mapi_aux (fun n => n). - - Definition map (f:A->B) := mapi (fun _ => f). - - End A. - - Lemma mapi_aux_1 : forall (elt elt':Set)(m: t elt)(pf:N->N)(x:key)(e:elt) - (f:key->elt->elt'), MapsTo x e m -> - exists y, E.eq y x /\ MapsTo x (f (pf y) e) (mapi_aux pf f m). - Proof. - unfold MapsTo; induction m; simpl; auto. - inversion 1. - - intros. - exists x; split; [red; auto|]. - generalize (Neqb_complete a x). - destruct (Neqb a x); try discriminate. - injection H; intros; subst; auto. - rewrite H1; auto. - - intros. - exists x; split; [red;auto|]. - destruct x; simpl in *. - destruct (IHm1 (fun n : N => pf (Ndouble n)) _ _ f H) as (y,(Hy,Hy')). - rewrite Hy in Hy'; simpl in Hy'; auto. - destruct p; simpl in *. - destruct (IHm2 (fun n : N => pf (Ndouble_plus_one n)) _ _ f H) as (y,(Hy,Hy')). - rewrite Hy in Hy'; simpl in Hy'; auto. - destruct (IHm1 (fun n : N => pf (Ndouble n)) _ _ f H) as (y,(Hy,Hy')). - rewrite Hy in Hy'; simpl in Hy'; auto. - destruct (IHm2 (fun n : N => pf (Ndouble_plus_one n)) _ _ f H) as (y,(Hy,Hy')). - rewrite Hy in Hy'; simpl in Hy'; auto. - Qed. - - Lemma mapi_1 : forall (elt elt':Set)(m: t elt)(x:key)(e:elt) - (f:key->elt->elt'), MapsTo x e m -> - exists y, E.eq y x /\ MapsTo x (f y e) (mapi f m). - Proof. - intros elt elt' m; exact (mapi_aux_1 (fun n => n)). - Qed. - - Lemma mapi_aux_2 : forall (elt elt':Set)(m: t elt)(pf:N->N)(x:key) - (f:key->elt->elt'), In x (mapi_aux pf f m) -> In x m. - Proof. - unfold In, MapsTo. - induction m; simpl in *. - intros pf x f (e,He); inversion He. - intros pf x f (e,He). - exists a0. - destruct (Neqb a x); try discriminate; auto. - intros pf x f (e,He). - destruct x; [|destruct p]; eauto. - Qed. - - Lemma mapi_2 : forall (elt elt':Set)(m: t elt)(x:key) - (f:key->elt->elt'), In x (mapi f m) -> In x m. - Proof. - intros elt elt' m; exact (mapi_aux_2 m (fun n => n)). - Qed. - - Lemma map_1 : forall (elt elt':Set)(m: t elt)(x:key)(e:elt)(f:elt->elt'), - MapsTo x e m -> MapsTo x (f e) (map f m). - Proof. - unfold map; intros. - destruct (@mapi_1 _ _ m x e (fun _ => f)) as (e',(_,H0)); auto. - Qed. - - Lemma map_2 : forall (elt elt':Set)(m: t elt)(x:key)(f:elt->elt'), - In x (map f m) -> In x m. - Proof. - unfold map; intros. - eapply mapi_2; eauto. - Qed. - - Module L := FMapList.Raw E. - - (** Not exactly pretty nor perfect, but should suffice as a first naive implem. - Anyway, map2 isn't in Ocaml... - *) - - Definition anti_elements (A:Set)(l:list (key*A)) := L.fold (@add _) l (empty _). - - Definition map2 (A B C:Set)(f:option A->option B -> option C)(m:t A)(m':t B) : t C := - anti_elements (L.map2 f (elements m) (elements m')). - - Lemma add_spec : forall (A:Set)(m:t A) x y e, - find x (add y e m) = if ME.eq_dec x y then Some e else find x m. - Proof. - intros. - destruct (ME.eq_dec x y). - apply find_1. - eapply MapsTo_1 with y; eauto. - red; auto. - apply add_1; auto. - red; auto. - case_eq (find x m); intros. - apply find_1. - apply add_2; unfold E.eq in *; auto. - case_eq (find x (add y e m)); auto; intros. - rewrite <- H; symmetry. - apply find_1; auto. - apply (@add_3 _ m y x a e); unfold E.eq in *; auto. - Qed. - - Lemma anti_elements_mapsto_aux : forall (A:Set)(l:list (key*A)) m k e, - NoDupA (eq_key (A:=A)) l -> - (forall x, L.PX.In x l -> In x m -> False) -> - (MapsTo k e (L.fold (@add _) l m) <-> L.PX.MapsTo k e l \/ MapsTo k e m). - Proof. - induction l. - simpl; auto. - intuition. - inversion H2. - simpl; destruct a; intros. - rewrite IHl; clear IHl. - inversion H; auto. - intros. - inversion_clear H. - assert (~E.eq x k). - swap H3. - destruct H1. - apply InA_eqA with (x,x0); eauto. - unfold eq_key, E.eq; eauto. - unfold eq_key, E.eq; congruence. - apply (H0 x). - destruct H1; exists x0; auto. - revert H2. - unfold In. - intros (e',He'). - exists e'; apply (@add_3 _ m k x e' a); unfold E.eq; auto. - intuition. - red in H2. - rewrite add_spec in H2; auto. - destruct (ME.eq_dec k0 k). - inversion_clear H2; subst; auto. - right; apply find_2; auto. - inversion_clear H2; auto. - compute in H1; destruct H1. - subst; right; apply add_1; auto. - red; auto. - inversion_clear H. - destruct (ME.eq_dec k0 k). - unfold E.eq in *; subst. - destruct (H0 k); eauto. - red; eauto. - right; apply add_2; unfold E.eq in *; auto. - Qed. - - Lemma anti_elements_mapsto : forall (A:Set) l k e, NoDupA (eq_key (A:=A)) l -> - (MapsTo k e (anti_elements l) <-> L.PX.MapsTo k e l). - Proof. - intros. - unfold anti_elements. - rewrite anti_elements_mapsto_aux; auto; unfold empty; auto. - inversion 2. - inversion H2. - intuition. - inversion H1. - Qed. - - Lemma find_anti_elements : forall (A:Set)(l: list (key*A)) x, sort (@lt_key _) l -> - find x (anti_elements l) = L.find x l. - Proof. - intros. - case_eq (L.find x l); intros. - apply find_1. - rewrite anti_elements_mapsto. - apply L.PX.Sort_NoDupA; auto. - apply L.find_2; auto. - case_eq (find x (anti_elements l)); auto; intros. - rewrite <- H0; symmetry. - apply L.find_1; auto. - rewrite <- anti_elements_mapsto. - apply L.PX.Sort_NoDupA; auto. - apply find_2; auto. - Qed. - - Lemma find_elements : forall (A:Set)(m: t A) x, - L.find x (elements m) = find x m. - Proof. - intros. - case_eq (find x m); intros. - apply L.find_1. - apply elements_3; auto. - red; apply elements_1. - apply find_2; auto. - case_eq (L.find x (elements m)); auto; intros. - rewrite <- H; symmetry. - apply find_1; auto. - apply elements_2. - apply L.find_2; auto. - Qed. - - Lemma elements_in : forall (A:Set)(s:t A) x, L.PX.In x (elements s) <-> In x s. - Proof. - intros. - unfold L.PX.In, In. - firstorder. - exists x0. - red; rewrite <- find_elements; auto. - apply L.find_1; auto. - apply elements_3. - exists x0. - apply L.find_2. - rewrite find_elements; auto. - Qed. - - Lemma map2_1 : forall (A B C:Set)(m: t A)(m': t B)(x:key) - (f:option A->option B ->option C), - In x m \/ In x m' -> find x (map2 f m m') = f (find x m) (find x m'). - Proof. - unfold map2; intros. - rewrite find_anti_elements; auto. - rewrite <- find_elements; auto. - rewrite <- find_elements; auto. - apply L.map2_1; auto. - apply elements_3; auto. - apply elements_3; auto. - do 2 rewrite elements_in; auto. - apply L.map2_sorted; auto. - apply elements_3; auto. - apply elements_3; auto. - Qed. - - Lemma map2_2 : forall (A B C: Set)(m: t A)(m': t B)(x:key) - (f:option A->option B ->option C), - In x (map2 f m m') -> In x m \/ In x m'. - Proof. - unfold map2; intros. - do 2 rewrite <- elements_in. - apply L.map2_2 with (f:=f); auto. - apply elements_3; auto. - apply elements_3; auto. - destruct H. - exists x0. - rewrite <- anti_elements_mapsto; auto. - apply L.PX.Sort_NoDupA; auto. - apply L.map2_sorted; auto. - apply elements_3; auto. - apply elements_3; auto. - Qed. - - (** same trick for [equal] *) - - Definition equal (A:Set)(cmp:A -> A -> bool)(m m' : t A) : bool := - L.equal cmp (elements m) (elements m'). - - Lemma equal_1 : - forall (A:Set)(m: t A)(m': t A)(cmp: A -> A -> bool), - Equal cmp m m' -> equal cmp m m' = true. - Proof. - unfold equal, Equal. - intros. - apply L.equal_1. - apply elements_3. - apply elements_3. - unfold L.Equal. - destruct H. - split; intros. - do 2 rewrite elements_in; auto. - apply (H0 k); - red; rewrite <- find_elements; apply L.find_1; auto; - apply elements_3. - Qed. - - Lemma equal_2 : - forall (A:Set)(m: t A)(m': t A)(cmp: A -> A -> bool), - equal cmp m m' = true -> Equal cmp m m'. - Proof. - unfold equal, Equal. - intros. - destruct (L.equal_2 (elements_3 m) (elements_3 m') H); clear H. - split. - intros; do 2 rewrite <- elements_in; auto. - intros; apply (H1 k); - apply L.find_2; rewrite find_elements;auto. - Qed. - -End MapIntMap. - diff --git a/theories/FSets/FMapInterface.v b/theories/FSets/FMapInterface.v index dde74a0a..1e475887 100644 --- a/theories/FSets/FMapInterface.v +++ b/theories/FSets/FMapInterface.v @@ -6,42 +6,72 @@ (* * GNU Lesser General Public License Version 2.1 *) (***********************************************************************) -(* $Id: FMapInterface.v 8671 2006-03-29 08:31:28Z letouzey $ *) +(* $Id: FMapInterface.v 10616 2008-03-04 17:33:35Z letouzey $ *) (** * Finite map library *) -(** This file proposes an interface for finite maps *) +(** This file proposes interfaces for finite maps *) -(* begin hide *) +Require Export Bool DecidableType OrderedType. Set Implicit Arguments. Unset Strict Implicit. -Require Import FSetInterface. -(* end hide *) - -(** When compared with Ocaml Map, this signature has been split in two: - - The first part [S] contains the usual operators (add, find, ...) - It only requires a ordered key type, the data type can be arbitrary. - The only function that asks more is [equal], whose first argument should - be an equality on data. - - Then, [Sord] extends [S] with a complete comparison function. For - that, the data type should have a decidable total ordering. + +(** When compared with Ocaml Map, this signature has been split in + several parts : + + - The first parts [WSfun] and [WS] propose signatures for weak + maps, which are maps with no ordering on the key type nor the + data type. [WSfun] and [WS] are almost identical, apart from the + fact that [WSfun] is expressed in a functorial way whereas [WS] + is self-contained. For obtaining an instance of such signatures, + a decidable equality on keys in enough (see for example + [FMapWeakList]). These signatures contain the usual operators + (add, find, ...). The only function that asks for more is + [equal], whose first argument should be a comparison on data. + + - Then comes [Sfun] and [S], that extend [WSfun] and [WS] to the + case where the key type is ordered. The main novelty is that + [elements] is required to produce sorted lists. + + - Finally, [Sord] extends [S] with a complete comparison function. For + that, the data type should have a decidable total ordering as well. + + If unsure, what you're looking for is probably [S]: apart from [Sord], + all other signatures are subsets of [S]. + + Some additional differences with Ocaml: + + - no [iter] function, useless since Coq is purely functional + - [option] types are used instead of [Not_found] exceptions + - more functions are provided: [elements] and [cardinal] and [map2] + *) -Module Type S. +Definition Cmp (elt:Type)(cmp:elt->elt->bool) e1 e2 := cmp e1 e2 = true. - Declare Module E : OrderedType. +(** ** Weak signature for maps + + No requirements for an ordering on keys nor elements, only decidability + of equality on keys. First, a functorial signature: *) + +Module Type WSfun (E : EqualityType). + + (** The module E of base objects is meant to be a [DecidableType] + (and used to be so). But requiring only an [EqualityType] here + allows subtyping between weak and ordered maps. *) Definition key := E.t. - Parameter t : Set -> Set. (** the abstract type of maps *) + Parameter t : Type -> Type. + (** the abstract type of maps *) Section Types. - Variable elt:Set. + Variable elt:Type. Parameter empty : t elt. - (** The empty map. *) + (** The empty map. *) Parameter is_empty : t elt -> bool. (** Test whether a map is empty or not. *) @@ -53,8 +83,7 @@ Module Type S. Parameter find : key -> t elt -> option elt. (** [find x m] returns the current binding of [x] in [m], - or raises [Not_found] if no such binding exists. - NB: in Coq, the exception mechanism becomes a option type. *) + or [None] if no such binding exists. *) Parameter remove : key -> t elt -> t elt. (** [remove x m] returns a map containing the same bindings as [m], @@ -64,45 +93,36 @@ Module Type S. (** [mem x m] returns [true] if [m] contains a binding for [x], and [false] otherwise. *) - (** Coq comment: [iter] is useless in a purely functional world *) - (** val iter : (key -> 'a -> unit) -> 'a t -> unit *) - (** iter f m applies f to all bindings in map m. f receives the key as - first argument, and the associated value as second argument. - The bindings are passed to f in increasing order with respect to the - ordering over the type of the keys. Only current bindings are - presented to f: bindings hidden by more recent bindings are not - passed to f. *) - - Variable elt' : Set. - Variable elt'': Set. + Variable elt' elt'' : Type. Parameter map : (elt -> elt') -> t elt -> t elt'. (** [map f m] returns a map with same domain as [m], where the associated value a of all bindings of [m] has been replaced by the result of the - application of [f] to [a]. The bindings are passed to [f] in - increasing order with respect to the ordering over the type of the - keys. *) + application of [f] to [a]. Since Coq is purely functional, the order + in which the bindings are passed to [f] is irrelevant. *) Parameter mapi : (key -> elt -> elt') -> t elt -> t elt'. - (** Same as [S.map], but the function receives as arguments both the + (** Same as [map], but the function receives as arguments both the key and the associated value for each binding of the map. *) - Parameter map2 : (option elt -> option elt' -> option elt'') -> t elt -> t elt' -> t elt''. - (** Not present in Ocaml. - [map f m m'] creates a new map whose bindings belong to the ones of either - [m] or [m']. The presence and value for a key [k] is determined by [f e e'] - where [e] and [e'] are the (optional) bindings of [k] in [m] and [m']. *) + Parameter map2 : + (option elt -> option elt' -> option elt'') -> t elt -> t elt' -> t elt''. + (** [map2 f m m'] creates a new map whose bindings belong to the ones + of either [m] or [m']. The presence and value for a key [k] is + determined by [f e e'] where [e] and [e'] are the (optional) bindings + of [k] in [m] and [m']. *) Parameter elements : t elt -> list (key*elt). - (** Not present in Ocaml. - [elements m] returns an assoc list corresponding to the bindings of [m]. - Elements of this list are sorted with respect to their first components. - Useful to specify [fold] ... *) + (** [elements m] returns an assoc list corresponding to the bindings + of [m], in any order. *) - Parameter fold : forall A: Set, (key -> elt -> A -> A) -> t elt -> A -> A. + Parameter cardinal : t elt -> nat. + (** [cardinal m] returns the number of bindings in [m]. *) + + Parameter fold : forall A: Type, (key -> elt -> A -> A) -> t elt -> A -> A. (** [fold f m a] computes [(f kN dN ... (f k1 d1 a)...)], where [k1] ... [kN] are the keys of all bindings in [m] - (in increasing order), and [d1] ... [dN] are the associated data. *) + (in any order), and [d1] ... [dN] are the associated data. *) Parameter equal : (elt -> elt -> bool) -> t elt -> t elt -> bool. (** [equal cmp m1 m2] tests whether the maps [m1] and [m2] are equal, @@ -127,8 +147,6 @@ Module Type S. Definition eq_key_elt (p p':key*elt) := E.eq (fst p) (fst p') /\ (snd p) = (snd p'). - Definition lt_key (p p':key*elt) := E.lt (fst p) (fst p'). - (** Specification of [MapsTo] *) Parameter MapsTo_1 : E.eq x y -> MapsTo x e m -> MapsTo y e m. @@ -162,61 +180,123 @@ Module Type S. MapsTo x e m -> InA eq_key_elt (x,e) (elements m). Parameter elements_2 : InA eq_key_elt (x,e) (elements m) -> MapsTo x e m. - Parameter elements_3 : sort lt_key (elements m). + (** When compared with ordered maps, here comes the only + property that is really weaker: *) + Parameter elements_3w : NoDupA eq_key (elements m). + + (** Specification of [cardinal] *) + Parameter cardinal_1 : cardinal m = length (elements m). (** Specification of [fold] *) Parameter fold_1 : - forall (A : Set) (i : A) (f : key -> elt -> A -> A), + forall (A : Type) (i : A) (f : key -> elt -> A -> A), fold f m i = fold_left (fun a p => f (fst p) (snd p) a) (elements m) i. + + (** Equality of maps *) - Definition Equal cmp m m' := + (** Caveat: there are at least three distinct equality predicates on maps. + - The simpliest (and maybe most natural) way is to consider keys up to + their equivalence [E.eq], but elements up to Leibniz equality, in + the spirit of [eq_key_elt] above. This leads to predicate [Equal]. + - Unfortunately, this [Equal] predicate can't be used to describe + the [equal] function, since this function (for compatibility with + ocaml) expects a boolean comparison [cmp] that may identify more + elements than Leibniz. So logical specification of [equal] is done + via another predicate [Equivb] + - This predicate [Equivb] is quite ad-hoc with its boolean [cmp], + it can be generalized in a [Equiv] expecting a more general + (possibly non-decidable) equality predicate on elements *) + + Definition Equal m m' := forall y, find y m = find y m'. + Definition Equiv (eq_elt:elt->elt->Prop) m m' := (forall k, In k m <-> In k m') /\ - (forall k e e', MapsTo k e m -> MapsTo k e' m' -> cmp e e' = true). + (forall k e e', MapsTo k e m -> MapsTo k e' m' -> eq_elt e e'). + Definition Equivb (cmp: elt->elt->bool) := Equiv (Cmp cmp). - Variable cmp : elt -> elt -> bool. + (** Specification of [equal] *) - (** Specification of [equal] *) - Parameter equal_1 : Equal cmp m m' -> equal cmp m m' = true. - Parameter equal_2 : equal cmp m m' = true -> Equal cmp m m'. + Variable cmp : elt -> elt -> bool. - End Spec. - End Types. + Parameter equal_1 : Equivb cmp m m' -> equal cmp m m' = true. + Parameter equal_2 : equal cmp m m' = true -> Equivb cmp m m'. + + End Spec. + End Types. (** Specification of [map] *) - Parameter map_1 : forall (elt elt':Set)(m: t elt)(x:key)(e:elt)(f:elt->elt'), + Parameter map_1 : forall (elt elt':Type)(m: t elt)(x:key)(e:elt)(f:elt->elt'), MapsTo x e m -> MapsTo x (f e) (map f m). - Parameter map_2 : forall (elt elt':Set)(m: t elt)(x:key)(f:elt->elt'), + Parameter map_2 : forall (elt elt':Type)(m: t elt)(x:key)(f:elt->elt'), In x (map f m) -> In x m. (** Specification of [mapi] *) - Parameter mapi_1 : forall (elt elt':Set)(m: t elt)(x:key)(e:elt) + Parameter mapi_1 : forall (elt elt':Type)(m: t elt)(x:key)(e:elt) (f:key->elt->elt'), MapsTo x e m -> exists y, E.eq y x /\ MapsTo x (f y e) (mapi f m). - Parameter mapi_2 : forall (elt elt':Set)(m: t elt)(x:key) + Parameter mapi_2 : forall (elt elt':Type)(m: t elt)(x:key) (f:key->elt->elt'), In x (mapi f m) -> In x m. (** Specification of [map2] *) - Parameter map2_1 : forall (elt elt' elt'':Set)(m: t elt)(m': t elt') + Parameter map2_1 : forall (elt elt' elt'':Type)(m: t elt)(m': t elt') (x:key)(f:option elt->option elt'->option elt''), In x m \/ In x m' -> find x (map2 f m m') = f (find x m) (find x m'). - Parameter map2_2 : forall (elt elt' elt'':Set)(m: t elt)(m': t elt') + Parameter map2_2 : forall (elt elt' elt'':Type)(m: t elt)(m': t elt') (x:key)(f:option elt->option elt'->option elt''), In x (map2 f m m') -> In x m \/ In x m'. - (* begin hide *) - Hint Immediate MapsTo_1 mem_2 is_empty_2. - - Hint Resolve mem_1 is_empty_1 is_empty_2 add_1 add_2 add_3 remove_1 - remove_2 remove_3 find_1 find_2 fold_1 map_1 map_2 mapi_1 mapi_2. - (* end hide *) + Hint Immediate MapsTo_1 mem_2 is_empty_2 + map_2 mapi_2 add_3 remove_3 find_2 + : map. + Hint Resolve mem_1 is_empty_1 is_empty_2 add_1 add_2 remove_1 + remove_2 find_1 fold_1 map_1 mapi_1 mapi_2 + : map. +End WSfun. + + +(** ** Static signature for Weak Maps + + Similar to [WSfun] but expressed in a self-contained way. *) + +Module Type WS. + Declare Module E : EqualityType. + Include Type WSfun E. +End WS. + + + +(** ** Maps on ordered keys, functorial signature *) + +Module Type Sfun (E : OrderedType). + Include Type WSfun E. + Section elt. + Variable elt:Type. + Definition lt_key (p p':key*elt) := E.lt (fst p) (fst p'). + (* Additional specification of [elements] *) + Parameter elements_3 : forall m, sort lt_key (elements m). + (** Remark: since [fold] is specified via [elements], this stronger + specification of [elements] has an indirect impact on [fold], + which can now be proved to receive elements in increasing order. *) + End elt. +End Sfun. + + + +(** ** Maps on ordered keys, self-contained signature *) + +Module Type S. + Declare Module E : OrderedType. + Include Type Sfun E. End S. + +(** ** Maps with ordering both on keys and datas *) + Module Type Sord. - + Declare Module Data : OrderedType. Declare Module MapS : S. Import MapS. @@ -234,12 +314,11 @@ Module Type Sord. Definition cmp e e' := match Data.compare e e' with EQ _ => true | _ => false end. - Parameter eq_1 : forall m m', Equal cmp m m' -> eq m m'. - Parameter eq_2 : forall m m', eq m m' -> Equal cmp m m'. + Parameter eq_1 : forall m m', Equivb cmp m m' -> eq m m'. + Parameter eq_2 : forall m m', eq m m' -> Equivb cmp m m'. Parameter compare : forall m1 m2, Compare lt eq m1 m2. - (** Total ordering between maps. The first argument (in Coq: Data.compare) - is a total ordering used to compare data associated with equal keys - in the two maps. *) + (** Total ordering between maps. [Data.compare] is a total ordering + used to compare data associated with equal keys in the two maps. *) -End Sord. \ No newline at end of file +End Sord. diff --git a/theories/FSets/FMapList.v b/theories/FSets/FMapList.v index 067f5a3e..23bf8196 100644 --- a/theories/FSets/FMapList.v +++ b/theories/FSets/FMapList.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (***********************************************************************) -(* $Id: FMapList.v 9035 2006-07-09 15:42:09Z herbelin $ *) +(* $Id: FMapList.v 10616 2008-03-04 17:33:35Z letouzey $ *) (** * Finite map library *) @@ -14,7 +14,6 @@ [FMapInterface.S] using lists of pairs ordered (increasing) with respect to left projection. *) -Require Import FSetInterface. Require Import FMapInterface. Set Implicit Arguments. @@ -22,26 +21,14 @@ Unset Strict Implicit. Module Raw (X:OrderedType). -Module E := X. -Module MX := OrderedTypeFacts X. -Module PX := KeyOrderedType X. -Import MX. -Import PX. +Module Import MX := OrderedTypeFacts X. +Module Import PX := KeyOrderedType X. Definition key := X.t. -Definition t (elt:Set) := list (X.t * elt). +Definition t (elt:Type) := list (X.t * elt). Section Elt. -Variable elt : Set. - -(* Now in KeyOrderedType: -Definition eqk (p p':key*elt) := X.eq (fst p) (fst p'). -Definition eqke (p p':key*elt) := - X.eq (fst p) (fst p') /\ (snd p) = (snd p'). -Definition ltk (p p':key*elt) := X.lt (fst p) (fst p'). -Definition MapsTo (k:key)(e:elt):= InA eqke (k,e). -Definition In k m := exists e:elt, MapsTo k e m. -*) +Variable elt : Type. Notation eqk := (eqk (elt:=elt)). Notation eqke := (eqke (elt:=elt)). @@ -347,15 +334,22 @@ Proof. auto. Qed. +Lemma elements_3w : forall m (Hm:Sort m), NoDupA eqk (elements m). +Proof. + intros. + apply Sort_NoDupA. + apply elements_3; auto. +Qed. + (** * [fold] *) -Function fold (A:Set)(f:key->elt->A->A)(m:t elt) (acc:A) {struct m} : A := +Function fold (A:Type)(f:key->elt->A->A)(m:t elt) (acc:A) {struct m} : A := match m with | nil => acc | (k,e)::m' => fold f m' (f k e acc) end. -Lemma fold_1 : forall m (A:Set)(i:A)(f:key->elt->A->A), +Lemma fold_1 : forall m (A:Type)(i:A)(f:key->elt->A->A), fold f m i = fold_left (fun a p => f (fst p) (snd p) a) (elements m) i. Proof. intros; functional induction (fold f m i); auto. @@ -374,29 +368,24 @@ Function equal (cmp:elt->elt->bool)(m m' : t elt) { struct m } : bool := | _, _ => false end. -Definition Equal cmp m m' := +Definition Equivb cmp m m' := (forall k, In k m <-> In k m') /\ (forall k e e', MapsTo k e m -> MapsTo k e' m' -> cmp e e' = true). Lemma equal_1 : forall m (Hm:Sort m) m' (Hm': Sort m') cmp, - Equal cmp m m' -> equal cmp m m' = true. + Equivb cmp m m' -> equal cmp m m' = true. Proof. intros m Hm m' Hm' cmp; generalize Hm Hm'; clear Hm Hm'. - functional induction (equal cmp m m'); simpl; subst;auto; unfold Equal; - intuition; subst; match goal with - | [H: X.compare _ _ = _ |- _ ] => clear H - | _ => idtac - end. - - - + functional induction (equal cmp m m'); simpl; subst;auto; unfold Equivb; + intuition; subst. + match goal with H: X.compare _ _ = _ |- _ => clear H end. assert (cmp_e_e':cmp e e' = true). apply H1 with x; auto. rewrite cmp_e_e'; simpl. apply IHb; auto. inversion_clear Hm; auto. inversion_clear Hm'; auto. - unfold Equal; intuition. + unfold Equivb; intuition. destruct (H0 k). assert (In k ((x,e) ::l)). destruct H as (e'', hyp); exists e''; auto. @@ -459,14 +448,12 @@ Qed. Lemma equal_2 : forall m (Hm:Sort m) m' (Hm:Sort m') cmp, - equal cmp m m' = true -> Equal cmp m m'. + equal cmp m m' = true -> Equivb cmp m m'. Proof. intros m Hm m' Hm' cmp; generalize Hm Hm'; clear Hm Hm'. - functional induction (equal cmp m m'); simpl; subst;auto; unfold Equal; - intuition; try discriminate; subst; match goal with - | [H: X.compare _ _ = _ |- _ ] => clear H - | _ => idtac - end. + functional induction (equal cmp m m'); simpl; subst;auto; unfold Equivb; + intuition; try discriminate; subst; + try match goal with H: X.compare _ _ = _ |- _ => clear H end. inversion H0. @@ -502,13 +489,13 @@ Proof. elim (Sort_Inf_NotIn H2 H3). exists e0; apply MapsTo_eq with k; auto; order. apply H8 with k; auto. -Qed. +Qed. -(** This lemma isn't part of the spec of [Equal], but is used in [FMapAVL] *) +(** This lemma isn't part of the spec of [Equivb], but is used in [FMapAVL] *) Lemma equal_cons : forall cmp l1 l2 x y, Sort (x::l1) -> Sort (y::l2) -> eqk x y -> cmp (snd x) (snd y) = true -> - (Equal cmp l1 l2 <-> Equal cmp (x :: l1) (y :: l2)). + (Equivb cmp l1 l2 <-> Equivb cmp (x :: l1) (y :: l2)). Proof. intros. inversion H; subst. @@ -527,7 +514,7 @@ Proof. rewrite H2; simpl; auto. Qed. -Variable elt':Set. +Variable elt':Type. (** * [map] and [mapi] *) @@ -548,7 +535,7 @@ Section Elt2. (* A new section is necessary for previous definitions to work with different [elt], especially [MapsTo]... *) -Variable elt elt' : Set. +Variable elt elt' : Type. (** Specification of [map] *) @@ -684,10 +671,10 @@ Section Elt3. (** * [map2] *) -Variable elt elt' elt'' : Set. +Variable elt elt' elt'' : Type. Variable f : option elt -> option elt' -> option elt''. -Definition option_cons (A:Set)(k:key)(o:option A)(l:list (key*A)) := +Definition option_cons (A:Type)(k:key)(o:option A)(l:list (key*A)) := match o with | Some e => (k,e)::l | None => l @@ -739,7 +726,7 @@ Fixpoint combine (m : t elt) : t elt' -> t oee' := end end. -Definition fold_right_pair (A B C:Set)(f: A->B->C->C)(l:list (A*B))(i:C) := +Definition fold_right_pair (A B C:Type)(f: A->B->C->C)(l:list (A*B))(i:C) := List.fold_right (fun p => f (fst p) (snd p)) i l. Definition map2_alt m m' := @@ -1038,12 +1025,12 @@ Module E := X. Definition key := E.t. -Record slist (elt:Set) : Set := +Record slist (elt:Type) := {this :> Raw.t elt; sorted : sort (@Raw.PX.ltk elt) this}. -Definition t (elt:Set) : Set := slist elt. +Definition t (elt:Type) : Type := slist elt. Section Elt. - Variable elt elt' elt'':Set. + Variable elt elt' elt'':Type. Implicit Types m : t elt. Implicit Types x y : key. @@ -1060,13 +1047,19 @@ Section Elt. Definition map2 f m (m':t elt') : t elt'' := Build_slist (Raw.map2_sorted f m.(sorted) m'.(sorted)). Definition elements m : list (key*elt) := @Raw.elements elt m.(this). - Definition fold (A:Set)(f:key->elt->A->A) m (i:A) : A := @Raw.fold elt A f m.(this) i. + Definition cardinal m := length m.(this). + Definition fold (A:Type)(f:key->elt->A->A) m (i:A) : A := @Raw.fold elt A f m.(this) i. Definition equal cmp m m' : bool := @Raw.equal elt cmp m.(this) m'.(this). Definition MapsTo x e m : Prop := Raw.PX.MapsTo x e m.(this). Definition In x m : Prop := Raw.PX.In x m.(this). Definition Empty m : Prop := Raw.Empty m.(this). - Definition Equal cmp m m' : Prop := @Raw.Equal elt cmp m.(this) m'.(this). + + Definition Equal m m' := forall y, find y m = find y m'. + Definition Equiv (eq_elt:elt->elt->Prop) m m' := + (forall k, In k m <-> In k m') /\ + (forall k e e', MapsTo k e m -> MapsTo k e' m' -> eq_elt e e'). + Definition Equivb cmp m m' : Prop := @Raw.Equivb elt cmp m.(this) m'.(this). Definition eq_key : (key*elt) -> (key*elt) -> Prop := @Raw.PX.eqk elt. Definition eq_key_elt : (key*elt) -> (key*elt) -> Prop:= @Raw.PX.eqke elt. @@ -1113,34 +1106,39 @@ Section Elt. Proof. intros m; exact (@Raw.elements_2 elt m.(this)). Qed. Lemma elements_3 : forall m, sort lt_key (elements m). Proof. intros m; exact (@Raw.elements_3 elt m.(this) m.(sorted)). Qed. + Lemma elements_3w : forall m, NoDupA eq_key (elements m). + Proof. intros m; exact (@Raw.elements_3w elt m.(this) m.(sorted)). Qed. + + Lemma cardinal_1 : forall m, cardinal m = length (elements m). + Proof. intros; reflexivity. Qed. - Lemma fold_1 : forall m (A : Set) (i : A) (f : key -> elt -> A -> A), + Lemma fold_1 : forall m (A : Type) (i : A) (f : key -> elt -> A -> A), fold f m i = fold_left (fun a p => f (fst p) (snd p) a) (elements m) i. Proof. intros m; exact (@Raw.fold_1 elt m.(this)). Qed. - Lemma equal_1 : forall m m' cmp, Equal cmp m m' -> equal cmp m m' = true. + Lemma equal_1 : forall m m' cmp, Equivb cmp m m' -> equal cmp m m' = true. Proof. intros m m'; exact (@Raw.equal_1 elt m.(this) m.(sorted) m'.(this) m'.(sorted)). Qed. - Lemma equal_2 : forall m m' cmp, equal cmp m m' = true -> Equal cmp m m'. + Lemma equal_2 : forall m m' cmp, equal cmp m m' = true -> Equivb cmp m m'. Proof. intros m m'; exact (@Raw.equal_2 elt m.(this) m.(sorted) m'.(this) m'.(sorted)). Qed. End Elt. - Lemma map_1 : forall (elt elt':Set)(m: t elt)(x:key)(e:elt)(f:elt->elt'), + Lemma map_1 : forall (elt elt':Type)(m: t elt)(x:key)(e:elt)(f:elt->elt'), MapsTo x e m -> MapsTo x (f e) (map f m). Proof. intros elt elt' m; exact (@Raw.map_1 elt elt' m.(this)). Qed. - Lemma map_2 : forall (elt elt':Set)(m: t elt)(x:key)(f:elt->elt'), + Lemma map_2 : forall (elt elt':Type)(m: t elt)(x:key)(f:elt->elt'), In x (map f m) -> In x m. Proof. intros elt elt' m; exact (@Raw.map_2 elt elt' m.(this)). Qed. - Lemma mapi_1 : forall (elt elt':Set)(m: t elt)(x:key)(e:elt) + Lemma mapi_1 : forall (elt elt':Type)(m: t elt)(x:key)(e:elt) (f:key->elt->elt'), MapsTo x e m -> exists y, E.eq y x /\ MapsTo x (f y e) (mapi f m). Proof. intros elt elt' m; exact (@Raw.mapi_1 elt elt' m.(this)). Qed. - Lemma mapi_2 : forall (elt elt':Set)(m: t elt)(x:key) + Lemma mapi_2 : forall (elt elt':Type)(m: t elt)(x:key) (f:key->elt->elt'), In x (mapi f m) -> In x m. Proof. intros elt elt' m; exact (@Raw.mapi_2 elt elt' m.(this)). Qed. - Lemma map2_1 : forall (elt elt' elt'':Set)(m: t elt)(m': t elt') + Lemma map2_1 : forall (elt elt' elt'':Type)(m: t elt)(m': t elt') (x:key)(f:option elt->option elt'->option elt''), In x m \/ In x m' -> find x (map2 f m m') = f (find x m) (find x m'). @@ -1148,7 +1146,7 @@ Section Elt. intros elt elt' elt'' m m' x f; exact (@Raw.map2_1 elt elt' elt'' f m.(this) m.(sorted) m'.(this) m'.(sorted) x). Qed. - Lemma map2_2 : forall (elt elt' elt'':Set)(m: t elt)(m': t elt') + Lemma map2_2 : forall (elt elt' elt'':Type)(m: t elt)(m': t elt') (x:key)(f:option elt->option elt'->option elt''), In x (map2 f m m') -> In x m \/ In x m'. Proof. @@ -1229,7 +1227,7 @@ Proof. unfold equal, eq in H6; simpl in H6; auto. Qed. -Lemma eq_1 : forall m m', Equal cmp m m' -> eq m m'. +Lemma eq_1 : forall m m', Equivb cmp m m' -> eq m m'. Proof. intros. generalize (@equal_1 D.t m m' cmp). @@ -1237,7 +1235,7 @@ Proof. intuition. Qed. -Lemma eq_2 : forall m m', eq m m' -> Equal cmp m m'. +Lemma eq_2 : forall m m', eq m m' -> Equivb cmp m m'. Proof. intros. generalize (@equal_2 D.t m m' cmp). diff --git a/theories/FSets/FMapPositive.v b/theories/FSets/FMapPositive.v index 44724767..9bc2a599 100644 --- a/theories/FSets/FMapPositive.v +++ b/theories/FSets/FMapPositive.v @@ -11,11 +11,12 @@ * Institution: LRI, CNRS UMR 8623 - Université Paris Sud * 91405 Orsay, France *) -(* $Id: FMapPositive.v 9862 2007-05-25 16:57:06Z letouzey $ *) +(* $Id: FMapPositive.v 10739 2008-04-01 14:45:20Z herbelin $ *) Require Import Bool. Require Import ZArith. Require Import OrderedType. +Require Import OrderedTypeEx. Require Import FMapInterface. Set Implicit Arguments. @@ -36,9 +37,12 @@ Open Local Scope positive_scope. usual order (see [OrderedTypeEx]), we use here a lexicographic order over bits, which is more natural here (lower bits are considered first). *) -Module PositiveOrderedTypeBits <: OrderedType. +Module PositiveOrderedTypeBits <: UsualOrderedType. Definition t:=positive. Definition eq:=@eq positive. + Definition eq_refl := @refl_equal t. + Definition eq_sym := @sym_eq t. + Definition eq_trans := @trans_eq t. Fixpoint bits_lt (p q:positive) { struct p } : Prop := match p, q with @@ -52,15 +56,6 @@ Module PositiveOrderedTypeBits <: OrderedType. Definition lt:=bits_lt. - Lemma eq_refl : forall x : t, eq x x. - Proof. red; auto. Qed. - - Lemma eq_sym : forall x y : t, eq x y -> eq y x. - Proof. red; auto. Qed. - - Lemma eq_trans : forall x y z : t, eq x y -> eq y z -> eq x z. - Proof. red; intros; transitivity y; auto. Qed. - Lemma bits_lt_trans : forall x y z : positive, bits_lt x y -> bits_lt y z -> bits_lt x z. Proof. induction x. @@ -171,17 +166,18 @@ Qed. Module PositiveMap <: S with Module E:=PositiveOrderedTypeBits. Module E:=PositiveOrderedTypeBits. + Module ME:=KeyOrderedType E. Definition key := positive. - Inductive tree (A : Set) : Set := + Inductive tree (A : Type) := | Leaf : tree A | Node : tree A -> option A -> tree A -> tree A. Definition t := tree. Section A. - Variable A:Set. + Variable A:Type. Implicit Arguments Leaf [A]. @@ -280,6 +276,15 @@ Module PositiveMap <: S with Module E:=PositiveOrderedTypeBits. Definition elements (m : t A) := xelements m xH. + (** [cardinal] *) + + Fixpoint cardinal (m : t A) : nat := + match m with + | Leaf => 0%nat + | Node l None r => (cardinal l + cardinal r)%nat + | Node l (Some _) r => S (cardinal l + cardinal r) + end. + Section CompcertSpec. Theorem gempty: @@ -560,6 +565,16 @@ Module PositiveMap <: S with Module E:=PositiveOrderedTypeBits. exact (xelements_complete i xH m v H). Qed. + Lemma cardinal_1 : + forall (m: t A), cardinal m = length (elements m). + Proof. + unfold elements. + intros m; set (p:=1); clearbody p; revert m p. + induction m; simpl; auto; intros. + rewrite (IHm1 (append p 2)), (IHm2 (append p 3)); auto. + destruct o; rewrite app_length; simpl; omega. + Qed. + End CompcertSpec. Definition MapsTo (i:positive)(v:A)(m:t A) := find i m = Some v. @@ -793,11 +808,17 @@ Module PositiveMap <: S with Module E:=PositiveOrderedTypeBits. apply xelements_sort; auto. Qed. + Lemma elements_3w : NoDupA eq_key (elements m). + Proof. + change eq_key with (@ME.eqk A). + apply ME.Sort_NoDupA; apply elements_3; auto. + Qed. + End FMapSpec. (** [map] and [mapi] *) - Variable B : Set. + Variable B : Type. Fixpoint xmapi (f : positive -> A -> B) (m : t A) (i : positive) {struct m} : t B := @@ -815,7 +836,7 @@ Module PositiveMap <: S with Module E:=PositiveOrderedTypeBits. End A. Lemma xgmapi: - forall (A B: Set) (f: positive -> A -> B) (i j : positive) (m: t A), + forall (A B: Type) (f: positive -> A -> B) (i j : positive) (m: t A), find i (xmapi f m j) = option_map (f (append j i)) (find i m). Proof. induction i; intros; destruct m; simpl; auto. @@ -825,7 +846,7 @@ Module PositiveMap <: S with Module E:=PositiveOrderedTypeBits. Qed. Theorem gmapi: - forall (A B: Set) (f: positive -> A -> B) (i: positive) (m: t A), + forall (A B: Type) (f: positive -> A -> B) (i: positive) (m: t A), find i (mapi f m) = option_map (f i) (find i m). Proof. intros. @@ -836,7 +857,7 @@ Module PositiveMap <: S with Module E:=PositiveOrderedTypeBits. Qed. Lemma mapi_1 : - forall (elt elt':Set)(m: t elt)(x:key)(e:elt)(f:key->elt->elt'), + forall (elt elt':Type)(m: t elt)(x:key)(e:elt)(f:key->elt->elt'), MapsTo x e m -> exists y, E.eq y x /\ MapsTo x (f y e) (mapi f m). Proof. @@ -851,7 +872,7 @@ Module PositiveMap <: S with Module E:=PositiveOrderedTypeBits. Qed. Lemma mapi_2 : - forall (elt elt':Set)(m: t elt)(x:key)(f:key->elt->elt'), + forall (elt elt':Type)(m: t elt)(x:key)(f:key->elt->elt'), In x (mapi f m) -> In x m. Proof. intros. @@ -864,21 +885,21 @@ Module PositiveMap <: S with Module E:=PositiveOrderedTypeBits. simpl in *; discriminate. Qed. - Lemma map_1 : forall (elt elt':Set)(m: t elt)(x:key)(e:elt)(f:elt->elt'), + Lemma map_1 : forall (elt elt':Type)(m: t elt)(x:key)(e:elt)(f:elt->elt'), MapsTo x e m -> MapsTo x (f e) (map f m). Proof. intros; unfold map. destruct (mapi_1 (fun _ => f) H); intuition. Qed. - Lemma map_2 : forall (elt elt':Set)(m: t elt)(x:key)(f:elt->elt'), + Lemma map_2 : forall (elt elt':Type)(m: t elt)(x:key)(f:elt->elt'), In x (map f m) -> In x m. Proof. intros; unfold map in *; eapply mapi_2; eauto. Qed. Section map2. - Variable A B C : Set. + Variable A B C : Type. Variable f : option A -> option B -> option C. Implicit Arguments Leaf [A]. @@ -927,10 +948,10 @@ Module PositiveMap <: S with Module E:=PositiveOrderedTypeBits. End map2. - Definition map2 (elt elt' elt'':Set)(f:option elt->option elt'->option elt'') := + Definition map2 (elt elt' elt'':Type)(f:option elt->option elt'->option elt'') := _map2 (fun o1 o2 => match o1,o2 with None,None => None | _, _ => f o1 o2 end). - Lemma map2_1 : forall (elt elt' elt'':Set)(m: t elt)(m': t elt') + Lemma map2_1 : forall (elt elt' elt'':Type)(m: t elt)(m': t elt') (x:key)(f:option elt->option elt'->option elt''), In x m \/ In x m' -> find x (map2 f m m') = f (find x m) (find x m'). @@ -946,7 +967,7 @@ Module PositiveMap <: S with Module E:=PositiveOrderedTypeBits. destruct H; intuition; try discriminate. Qed. - Lemma map2_2 : forall (elt elt' elt'':Set)(m: t elt)(m': t elt') + Lemma map2_2 : forall (elt elt' elt'':Type)(m: t elt)(m': t elt') (x:key)(f:option elt->option elt'->option elt''), In x (map2 f m m') -> In x m \/ In x m'. Proof. @@ -962,17 +983,17 @@ Module PositiveMap <: S with Module E:=PositiveOrderedTypeBits. Qed. - Definition fold (A B : Set) (f: positive -> A -> B -> B) (tr: t A) (v: B) := + Definition fold (A : Type)(B : Type) (f: positive -> A -> B -> B) (tr: t A) (v: B) := List.fold_left (fun a p => f (fst p) (snd p) a) (elements tr) v. Lemma fold_1 : - forall (A:Set)(m:t A)(B:Set)(i : B) (f : key -> A -> B -> B), + forall (A:Type)(m:t A)(B:Type)(i : B) (f : key -> A -> B -> B), fold f m i = fold_left (fun a p => f (fst p) (snd p) a) (elements m) i. Proof. intros; unfold fold; auto. Qed. - Fixpoint equal (A:Set)(cmp : A -> A -> bool)(m1 m2 : t A) {struct m1} : bool := + Fixpoint equal (A:Type)(cmp : A -> A -> bool)(m1 m2 : t A) {struct m1} : bool := match m1, m2 with | Leaf, _ => is_empty m2 | _, Leaf => is_empty m1 @@ -985,12 +1006,15 @@ Module PositiveMap <: S with Module E:=PositiveOrderedTypeBits. && equal cmp l1 l2 && equal cmp r1 r2 end. - Definition Equal (A:Set)(cmp:A->A->bool)(m m':t A) := + Definition Equal (A:Type)(m m':t A) := + forall y, find y m = find y m'. + Definition Equiv (A:Type)(eq_elt:A->A->Prop) m m' := (forall k, In k m <-> In k m') /\ - (forall k e e', MapsTo k e m -> MapsTo k e' m' -> cmp e e' = true). + (forall k e e', MapsTo k e m -> MapsTo k e' m' -> eq_elt e e'). + Definition Equivb (A:Type)(cmp: A->A->bool) := Equiv (Cmp cmp). - Lemma equal_1 : forall (A:Set)(m m':t A)(cmp:A->A->bool), - Equal cmp m m' -> equal cmp m m' = true. + Lemma equal_1 : forall (A:Type)(m m':t A)(cmp:A->A->bool), + Equivb cmp m m' -> equal cmp m m' = true. Proof. induction m. (* m = Leaf *) @@ -1024,11 +1048,11 @@ Module PositiveMap <: S with Module E:=PositiveOrderedTypeBits. destruct H2; red in H2; simpl in H2; discriminate. (* m' = Node *) destruct 1. - assert (Equal cmp m1 m'1). + assert (Equivb cmp m1 m'1). split. intros k; generalize (H (xO k)); unfold In, MapsTo; simpl; auto. intros k e e'; generalize (H0 (xO k) e e'); unfold In, MapsTo; simpl; auto. - assert (Equal cmp m2 m'2). + assert (Equivb cmp m2 m'2). split. intros k; generalize (H (xI k)); unfold In, MapsTo; simpl; auto. intros k e e'; generalize (H0 (xI k) e e'); unfold In, MapsTo; simpl; auto. @@ -1043,8 +1067,8 @@ Module PositiveMap <: S with Module E:=PositiveOrderedTypeBits. apply andb_true_intro; split; auto. Qed. - Lemma equal_2 : forall (A:Set)(m m':t A)(cmp:A->A->bool), - equal cmp m m' = true -> Equal cmp m m'. + Lemma equal_2 : forall (A:Type)(m m':t A)(cmp:A->A->bool), + equal cmp m m' = true -> Equivb cmp m m'. Proof. induction m. (* m = Leaf *) @@ -1103,7 +1127,7 @@ Module PositiveMapAdditionalFacts. (* Derivable from the Map interface *) Theorem gsspec: - forall (A:Set)(i j: positive) (x: A) (m: t A), + forall (A:Type)(i j: positive) (x: A) (m: t A), find i (add j x m) = if peq_dec i j then Some x else find i m. Proof. intros. @@ -1112,7 +1136,7 @@ Module PositiveMapAdditionalFacts. (* Not derivable from the Map interface *) Theorem gsident: - forall (A:Set)(i: positive) (m: t A) (v: A), + forall (A:Type)(i: positive) (m: t A) (v: A), find i m = Some v -> add i v m = m. Proof. induction i; intros; destruct m; simpl; simpl in H; try congruence. @@ -1121,7 +1145,7 @@ Module PositiveMapAdditionalFacts. Qed. Lemma xmap2_lr : - forall (A B : Set)(f g: option A -> option A -> option B)(m : t A), + forall (A B : Type)(f g: option A -> option A -> option B)(m : t A), (forall (i j : option A), f i j = g j i) -> xmap2_l f m = xmap2_r g m. Proof. @@ -1132,7 +1156,7 @@ Module PositiveMapAdditionalFacts. Qed. Theorem map2_commut: - forall (A B: Set) (f g: option A -> option A -> option B), + forall (A B: Type) (f g: option A -> option A -> option B), (forall (i j: option A), f i j = g j i) -> forall (m1 m2: t A), _map2 f m1 m2 = _map2 g m2 m1. diff --git a/theories/FSets/FMapWeak.v b/theories/FSets/FMapWeak.v deleted file mode 100644 index 1ad190a4..00000000 --- a/theories/FSets/FMapWeak.v +++ /dev/null @@ -1,15 +0,0 @@ -(***********************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* MapsTo x e' m -> e=e'. -Proof. -intros. -generalize (find_1 H) (find_1 H0); clear H H0. -intros; rewrite H in H0; injection H0; auto. -Qed. - -(** * Specifications written using equivalences *) - -Section IffSpec. -Variable elt elt' elt'': Set. -Implicit Type m: t elt. -Implicit Type x y z: key. -Implicit Type e: elt. - -Lemma MapsTo_iff : forall m x y e, E.eq x y -> (MapsTo x e m <-> MapsTo y e m). -Proof. -split; apply MapsTo_1; auto. -Qed. - -Lemma In_iff : forall m x y, E.eq x y -> (In x m <-> In y m). -Proof. -unfold In. -split; intros (e0,H0); exists e0. -apply (MapsTo_1 H H0); auto. -apply (MapsTo_1 (E.eq_sym H) H0); auto. -Qed. - -Lemma find_mapsto_iff : forall m x e, MapsTo x e m <-> find x m = Some e. -Proof. -split; [apply find_1|apply find_2]. -Qed. - -Lemma not_find_mapsto_iff : forall m x, ~In x m <-> find x m = None. -Proof. -intros. -generalize (find_mapsto_iff m x); destruct (find x m). -split; intros; try discriminate. -destruct H0. -exists e; rewrite H; auto. -split; auto. -intros; intros (e,H1). -rewrite H in H1; discriminate. -Qed. - -Lemma mem_in_iff : forall m x, In x m <-> mem x m = true. -Proof. -split; [apply mem_1|apply mem_2]. -Qed. - -Lemma not_mem_in_iff : forall m x, ~In x m <-> mem x m = false. -Proof. -intros; rewrite mem_in_iff; destruct (mem x m); intuition. -Qed. - -Lemma equal_iff : forall m m' cmp, Equal cmp m m' <-> equal cmp m m' = true. -Proof. -split; [apply equal_1|apply equal_2]. -Qed. - -Lemma empty_mapsto_iff : forall x e, MapsTo x e (empty elt) <-> False. -Proof. -intuition; apply (empty_1 H). -Qed. - -Lemma empty_in_iff : forall x, In x (empty elt) <-> False. -Proof. -unfold In. -split; [intros (e,H); rewrite empty_mapsto_iff in H|]; intuition. -Qed. - -Lemma is_empty_iff : forall m, Empty m <-> is_empty m = true. -Proof. -split; [apply is_empty_1|apply is_empty_2]. -Qed. - -Lemma add_mapsto_iff : forall m x y e e', - MapsTo y e' (add x e m) <-> - (E.eq x y /\ e=e') \/ - (~E.eq x y /\ MapsTo y e' m). -Proof. -intros. -intuition. -destruct (E.eq_dec x y); [left|right]. -split; auto. -symmetry; apply (MapsTo_fun (e':=e) H); auto. -split; auto; apply add_3 with x e; auto. -subst; auto. -Qed. - -Lemma add_in_iff : forall m x y e, In y (add x e m) <-> E.eq x y \/ In y m. -Proof. -unfold In; split. -intros (e',H). -destruct (E.eq_dec x y) as [E|E]; auto. -right; exists e'; auto. -apply (add_3 E H). -destruct (E.eq_dec x y) as [E|E]; auto. -intros. -exists e; apply add_1; auto. -intros [H|(e',H)]. -destruct E; auto. -exists e'; apply add_2; auto. -Qed. - -Lemma add_neq_mapsto_iff : forall m x y e e', - ~ E.eq x y -> (MapsTo y e' (add x e m) <-> MapsTo y e' m). -Proof. -split; [apply add_3|apply add_2]; auto. -Qed. - -Lemma add_neq_in_iff : forall m x y e, - ~ E.eq x y -> (In y (add x e m) <-> In y m). -Proof. -split; intros (e',H0); exists e'. -apply (add_3 H H0). -apply add_2; auto. -Qed. - -Lemma remove_mapsto_iff : forall m x y e, - MapsTo y e (remove x m) <-> ~E.eq x y /\ MapsTo y e m. -Proof. -intros. -split; intros. -split. -assert (In y (remove x m)) by (exists e; auto). -intro H1; apply (remove_1 H1 H0). -apply remove_3 with x; auto. -apply remove_2; intuition. -Qed. - -Lemma remove_in_iff : forall m x y, In y (remove x m) <-> ~E.eq x y /\ In y m. -Proof. -unfold In; split. -intros (e,H). -split. -assert (In y (remove x m)) by (exists e; auto). -intro H1; apply (remove_1 H1 H0). -exists e; apply remove_3 with x; auto. -intros (H,(e,H0)); exists e; apply remove_2; auto. -Qed. - -Lemma remove_neq_mapsto_iff : forall m x y e, - ~ E.eq x y -> (MapsTo y e (remove x m) <-> MapsTo y e m). -Proof. -split; [apply remove_3|apply remove_2]; auto. -Qed. - -Lemma remove_neq_in_iff : forall m x y, - ~ E.eq x y -> (In y (remove x m) <-> In y m). -Proof. -split; intros (e',H0); exists e'. -apply (remove_3 H0). -apply remove_2; auto. -Qed. - -Lemma elements_mapsto_iff : forall m x e, - MapsTo x e m <-> InA (@eq_key_elt _) (x,e) (elements m). -Proof. -split; [apply elements_1 | apply elements_2]. -Qed. - -Lemma elements_in_iff : forall m x, - In x m <-> exists e, InA (@eq_key_elt _) (x,e) (elements m). -Proof. -unfold In; split; intros (e,H); exists e; [apply elements_1 | apply elements_2]; auto. -Qed. - -Lemma map_mapsto_iff : forall m x b (f : elt -> elt'), - MapsTo x b (map f m) <-> exists a, b = f a /\ MapsTo x a m. -Proof. -split. -case_eq (find x m); intros. -exists e. -split. -apply (MapsTo_fun (m:=map f m) (x:=x)); auto. -apply find_2; auto. -assert (In x (map f m)) by (exists b; auto). -destruct (map_2 H1) as (a,H2). -rewrite (find_1 H2) in H; discriminate. -intros (a,(H,H0)). -subst b; auto. -Qed. - -Lemma map_in_iff : forall m x (f : elt -> elt'), - In x (map f m) <-> In x m. -Proof. -split; intros; eauto. -destruct H as (a,H). -exists (f a); auto. -Qed. - -Lemma mapi_in_iff : forall m x (f:key->elt->elt'), - In x (mapi f m) <-> In x m. -Proof. -split; intros; eauto. -destruct H as (a,H). -destruct (mapi_1 f H) as (y,(H0,H1)). -exists (f y a); auto. -Qed. - -(* Unfortunately, we don't have simple equivalences for [mapi] - and [MapsTo]. The only correct one needs compatibility of [f]. *) - -Lemma mapi_inv : forall m x b (f : key -> elt -> elt'), - MapsTo x b (mapi f m) -> - exists a, exists y, E.eq y x /\ b = f y a /\ MapsTo x a m. -Proof. -intros; case_eq (find x m); intros. -exists e. -destruct (@mapi_1 _ _ m x e f) as (y,(H1,H2)). -apply find_2; auto. -exists y; repeat split; auto. -apply (MapsTo_fun (m:=mapi f m) (x:=x)); auto. -assert (In x (mapi f m)) by (exists b; auto). -destruct (mapi_2 H1) as (a,H2). -rewrite (find_1 H2) in H0; discriminate. -Qed. - -Lemma mapi_1bis : forall m x e (f:key->elt->elt'), - (forall x y e, E.eq x y -> f x e = f y e) -> - MapsTo x e m -> MapsTo x (f x e) (mapi f m). -Proof. -intros. -destruct (mapi_1 f H0) as (y,(H1,H2)). -replace (f x e) with (f y e) by auto. -auto. -Qed. - -Lemma mapi_mapsto_iff : forall m x b (f:key->elt->elt'), - (forall x y e, E.eq x y -> f x e = f y e) -> - (MapsTo x b (mapi f m) <-> exists a, b = f x a /\ MapsTo x a m). -Proof. -split. -intros. -destruct (mapi_inv H0) as (a,(y,(H1,(H2,H3)))). -exists a; split; auto. -subst b; auto. -intros (a,(H0,H1)). -subst b. -apply mapi_1bis; auto. -Qed. - -(** Things are even worse for [map2] : we don't try to state any - equivalence, see instead boolean results below. *) - -End IffSpec. - -(** Useful tactic for simplifying expressions like [In y (add x e (remove z m))] *) - -Ltac map_iff := - repeat (progress ( - rewrite add_mapsto_iff || rewrite add_in_iff || - rewrite remove_mapsto_iff || rewrite remove_in_iff || - rewrite empty_mapsto_iff || rewrite empty_in_iff || - rewrite map_mapsto_iff || rewrite map_in_iff || - rewrite mapi_in_iff)). - -(** * Specifications written using boolean predicates *) - -Section BoolSpec. - -Definition eqb x y := if E.eq_dec x y then true else false. - -Lemma mem_find_b : forall (elt:Set)(m:t elt)(x:key), mem x m = if find x m then true else false. -Proof. -intros. -generalize (find_mapsto_iff m x)(mem_in_iff m x); unfold In. -destruct (find x m); destruct (mem x m); auto. -intros. -rewrite <- H0; exists e; rewrite H; auto. -intuition. -destruct H0 as (e,H0). -destruct (H e); intuition discriminate. -Qed. - -Variable elt elt' elt'' : Set. -Implicit Types m : t elt. -Implicit Types x y z : key. -Implicit Types e : elt. - -Lemma mem_b : forall m x y, E.eq x y -> mem x m = mem y m. -Proof. -intros. -generalize (mem_in_iff m x) (mem_in_iff m y)(In_iff m H). -destruct (mem x m); destruct (mem y m); intuition. -Qed. - -Lemma find_o : forall m x y, E.eq x y -> find x m = find y m. -Proof. -intros. -generalize (find_mapsto_iff m x) (find_mapsto_iff m y) (fun e => MapsTo_iff m e H). -destruct (find x m); destruct (find y m); intros. -rewrite <- H0; rewrite H2; rewrite H1; auto. -symmetry; rewrite <- H1; rewrite <- H2; rewrite H0; auto. -rewrite <- H0; rewrite H2; rewrite H1; auto. -auto. -Qed. - -Lemma empty_o : forall x, find x (empty elt) = None. -Proof. -intros. -case_eq (find x (empty elt)); intros; auto. -generalize (find_2 H). -rewrite empty_mapsto_iff; intuition. -Qed. - -Lemma empty_a : forall x, mem x (empty elt) = false. -Proof. -intros. -case_eq (mem x (empty elt)); intros; auto. -generalize (mem_2 H). -rewrite empty_in_iff; intuition. -Qed. - -Lemma add_eq_o : forall m x y e, - E.eq x y -> find y (add x e m) = Some e. -Proof. -auto. -Qed. - -Lemma add_neq_o : forall m x y e, - ~ E.eq x y -> find y (add x e m) = find y m. -Proof. -intros. -case_eq (find y m); intros; auto. -case_eq (find y (add x e m)); intros; auto. -rewrite <- H0; symmetry. -apply find_1; apply add_3 with x e; auto. -Qed. -Hint Resolve add_neq_o. - -Lemma add_o : forall m x y e, - find y (add x e m) = if E.eq_dec x y then Some e else find y m. -Proof. -intros; destruct (E.eq_dec x y); auto. -Qed. - -Lemma add_eq_b : forall m x y e, - E.eq x y -> mem y (add x e m) = true. -Proof. -intros; rewrite mem_find_b; rewrite add_eq_o; auto. -Qed. - -Lemma add_neq_b : forall m x y e, - ~E.eq x y -> mem y (add x e m) = mem y m. -Proof. -intros; do 2 rewrite mem_find_b; rewrite add_neq_o; auto. -Qed. - -Lemma add_b : forall m x y e, - mem y (add x e m) = eqb x y || mem y m. -Proof. -intros; do 2 rewrite mem_find_b; rewrite add_o; unfold eqb. -destruct (E.eq_dec x y); simpl; auto. -Qed. - -Lemma remove_eq_o : forall m x y, - E.eq x y -> find y (remove x m) = None. -Proof. -intros. -generalize (remove_1 (m:=m) H). -generalize (find_mapsto_iff (remove x m) y). -destruct (find y (remove x m)); auto. -destruct 2. -exists e; rewrite H0; auto. -Qed. -Hint Resolve remove_eq_o. - -Lemma remove_neq_o : forall m x y, - ~ E.eq x y -> find y (remove x m) = find y m. -Proof. -intros. -case_eq (find y m); intros; auto. -case_eq (find y (remove x m)); intros; auto. -rewrite <- H0; symmetry. -apply find_1; apply remove_3 with x; auto. -Qed. -Hint Resolve remove_neq_o. - -Lemma remove_o : forall m x y, - find y (remove x m) = if E.eq_dec x y then None else find y m. -Proof. -intros; destruct (E.eq_dec x y); auto. -Qed. - -Lemma remove_eq_b : forall m x y, - E.eq x y -> mem y (remove x m) = false. -Proof. -intros; rewrite mem_find_b; rewrite remove_eq_o; auto. -Qed. - -Lemma remove_neq_b : forall m x y, - ~ E.eq x y -> mem y (remove x m) = mem y m. -Proof. -intros; do 2 rewrite mem_find_b; rewrite remove_neq_o; auto. -Qed. - -Lemma remove_b : forall m x y, - mem y (remove x m) = negb (eqb x y) && mem y m. -Proof. -intros; do 2 rewrite mem_find_b; rewrite remove_o; unfold eqb. -destruct (E.eq_dec x y); auto. -Qed. - -Definition option_map (A:Set)(B:Set)(f:A->B)(o:option A) : option B := - match o with - | Some a => Some (f a) - | None => None - end. - -Lemma map_o : forall m x (f:elt->elt'), - find x (map f m) = option_map f (find x m). -Proof. -intros. -generalize (find_mapsto_iff (map f m) x) (find_mapsto_iff m x) - (fun b => map_mapsto_iff m x b f). -destruct (find x (map f m)); destruct (find x m); simpl; auto; intros. -rewrite <- H; rewrite H1; exists e0; rewrite H0; auto. -destruct (H e) as [_ H2]. -rewrite H1 in H2. -destruct H2 as (a,(_,H2)); auto. -rewrite H0 in H2; discriminate. -rewrite <- H; rewrite H1; exists e; rewrite H0; auto. -Qed. - -Lemma map_b : forall m x (f:elt->elt'), - mem x (map f m) = mem x m. -Proof. -intros; do 2 rewrite mem_find_b; rewrite map_o. -destruct (find x m); simpl; auto. -Qed. - -Lemma mapi_b : forall m x (f:key->elt->elt'), - mem x (mapi f m) = mem x m. -Proof. -intros. -generalize (mem_in_iff (mapi f m) x) (mem_in_iff m x) (mapi_in_iff m x f). -destruct (mem x (mapi f m)); destruct (mem x m); simpl; auto; intros. -symmetry; rewrite <- H0; rewrite <- H1; rewrite H; auto. -rewrite <- H; rewrite H1; rewrite H0; auto. -Qed. - -Lemma mapi_o : forall m x (f:key->elt->elt'), - (forall x y e, E.eq x y -> f x e = f y e) -> - find x (mapi f m) = option_map (f x) (find x m). -Proof. -intros. -generalize (find_mapsto_iff (mapi f m) x) (find_mapsto_iff m x) - (fun b => mapi_mapsto_iff m x b H). -destruct (find x (mapi f m)); destruct (find x m); simpl; auto; intros. -rewrite <- H0; rewrite H2; exists e0; rewrite H1; auto. -destruct (H0 e) as [_ H3]. -rewrite H2 in H3. -destruct H3 as (a,(_,H3)); auto. -rewrite H1 in H3; discriminate. -rewrite <- H0; rewrite H2; exists e; rewrite H1; auto. -Qed. - -Lemma map2_1bis : forall (m: t elt)(m': t elt') x - (f:option elt->option elt'->option elt''), - f None None = None -> - find x (map2 f m m') = f (find x m) (find x m'). -Proof. -intros. -case_eq (find x m); intros. -rewrite <- H0. -apply map2_1; auto. -left; exists e; auto. -case_eq (find x m'); intros. -rewrite <- H0; rewrite <- H1. -apply map2_1; auto. -right; exists e; auto. -rewrite H. -case_eq (find x (map2 f m m')); intros; auto. -assert (In x (map2 f m m')) by (exists e; auto). -destruct (map2_2 H3) as [(e0,H4)|(e0,H4)]. -rewrite (find_1 H4) in H0; discriminate. -rewrite (find_1 H4) in H1; discriminate. -Qed. - -Fixpoint findA (A B:Set)(f : A -> bool) (l:list (A*B)) : option B := - match l with - | nil => None - | (a,b)::l => if f a then Some b else findA f l - end. - -Lemma findA_NoDupA : - forall (A B:Set) - (eqA:A->A->Prop) - (eqA_sym: forall a b, eqA a b -> eqA b a) - (eqA_trans: forall a b c, eqA a b -> eqA b c -> eqA a c) - (eqA_dec : forall a a', { eqA a a' }+{~eqA a a' }) - (l:list (A*B))(x:A)(e:B), - NoDupA (fun p p' => eqA (fst p) (fst p')) l -> - (InA (fun p p' => eqA (fst p) (fst p') /\ snd p = snd p') (x,e) l <-> - findA (fun y:A => if eqA_dec x y then true else false) l = Some e). -Proof. -induction l; simpl; intros. -split; intros; try discriminate. -inversion H0. -destruct a as (y,e'). -inversion_clear H. -split; intros. -inversion_clear H. -simpl in *; destruct H2; subst e'. -destruct (eqA_dec x y); intuition. -destruct (eqA_dec x y); simpl. -destruct H0. -generalize e0 H2 eqA_trans eqA_sym; clear. -induction l. -inversion 2. -inversion_clear 2; intros; auto. -destruct a. -compute in H; destruct H. -subst b. -constructor 1; auto. -simpl. -apply eqA_trans with x; auto. -rewrite <- IHl; auto. -destruct (eqA_dec x y); simpl in *. -inversion H; clear H; intros; subst e'; auto. -constructor 2. -rewrite IHl; auto. -Qed. - -Lemma elements_o : forall m x, - find x m = findA (eqb x) (elements m). -Proof. -intros. -assert (forall e, find x m = Some e <-> InA (eq_key_elt (elt:=elt)) (x,e) (elements m)). - intros; rewrite <- find_mapsto_iff; apply elements_mapsto_iff. -assert (NoDupA (eq_key (elt:=elt)) (elements m)). - exact (elements_3 m). -generalize (fun e => @findA_NoDupA _ _ _ E.eq_sym E.eq_trans E.eq_dec (elements m) x e H0). -unfold eqb. -destruct (find x m); destruct (findA (fun y : E.t => if E.eq_dec x y then true else false) (elements m)); - simpl; auto; intros. -symmetry; rewrite <- H1; rewrite <- H; auto. -symmetry; rewrite <- H1; rewrite <- H; auto. -rewrite H; rewrite H1; auto. -Qed. - -Lemma elements_b : forall m x, mem x m = existsb (fun p => eqb x (fst p)) (elements m). -Proof. -intros. -generalize (mem_in_iff m x)(elements_in_iff m x) - (existsb_exists (fun p => eqb x (fst p)) (elements m)). -destruct (mem x m); destruct (existsb (fun p => eqb x (fst p)) (elements m)); auto; intros. -symmetry; rewrite H1. -destruct H0 as (H0,_). -destruct H0 as (e,He); [ intuition |]. -rewrite InA_alt in He. -destruct He as ((y,e'),(Ha1,Ha2)). -compute in Ha1; destruct Ha1; subst e'. -exists (y,e); split; simpl; auto. -unfold eqb; destruct (E.eq_dec x y); intuition. -rewrite <- H; rewrite H0. -destruct H1 as (H1,_). -destruct H1 as ((y,e),(Ha1,Ha2)); [intuition|]. -simpl in Ha2. -unfold eqb in *; destruct (E.eq_dec x y); auto; try discriminate. -exists e; rewrite InA_alt. -exists (y,e); intuition. -compute; auto. -Qed. - -End BoolSpec. - -End Facts. diff --git a/theories/FSets/FMapWeakInterface.v b/theories/FSets/FMapWeakInterface.v deleted file mode 100644 index b6df4da5..00000000 --- a/theories/FSets/FMapWeakInterface.v +++ /dev/null @@ -1,201 +0,0 @@ -(***********************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* Set. (** the abstract type of maps *) - - Section Types. - - Variable elt:Set. - - Parameter empty : t elt. - (** The empty map. *) - - Parameter is_empty : t elt -> bool. - (** Test whether a map is empty or not. *) - - Parameter add : key -> elt -> t elt -> t elt. - (** [add x y m] returns a map containing the same bindings as [m], - plus a binding of [x] to [y]. If [x] was already bound in [m], - its previous binding disappears. *) - - Parameter find : key -> t elt -> option elt. - (** [find x m] returns the current binding of [x] in [m], - or raises [Not_found] if no such binding exists. - NB: in Coq, the exception mechanism becomes a option type. *) - - Parameter remove : key -> t elt -> t elt. - (** [remove x m] returns a map containing the same bindings as [m], - except for [x] which is unbound in the returned map. *) - - Parameter mem : key -> t elt -> bool. - (** [mem x m] returns [true] if [m] contains a binding for [x], - and [false] otherwise. *) - - (** Coq comment: [iter] is useless in a purely functional world *) - (** val iter : (key -> 'a -> unit) -> 'a t -> unit *) - (** iter f m applies f to all bindings in map m. f receives the key as - first argument, and the associated value as second argument. - The bindings are passed to f in increasing order with respect to the - ordering over the type of the keys. Only current bindings are - presented to f: bindings hidden by more recent bindings are not - passed to f. *) - - Variable elt' : Set. - Variable elt'': Set. - - Parameter map : (elt -> elt') -> t elt -> t elt'. - (** [map f m] returns a map with same domain as [m], where the associated - value a of all bindings of [m] has been replaced by the result of the - application of [f] to [a]. The bindings are passed to [f] in - increasing order with respect to the ordering over the type of the - keys. *) - - Parameter mapi : (key -> elt -> elt') -> t elt -> t elt'. - (** Same as [S.map], but the function receives as arguments both the - key and the associated value for each binding of the map. *) - - Parameter map2 : (option elt -> option elt' -> option elt'') -> t elt -> t elt' -> t elt''. - (** Not present in Ocaml. - [map f m m'] creates a new map whose bindings belong to the ones of either - [m] or [m']. The presence and value for a key [k] is determined by [f e e'] - where [e] and [e'] are the (optional) bindings of [k] in [m] and [m']. *) - - Parameter elements : t elt -> list (key*elt). - (** Not present in Ocaml. - [elements m] returns an assoc list corresponding to the bindings of [m]. - Elements of this list are sorted with respect to their first components. - Useful to specify [fold] ... *) - - Parameter fold : forall A: Set, (key -> elt -> A -> A) -> t elt -> A -> A. - (** [fold f m a] computes [(f kN dN ... (f k1 d1 a)...)], - where [k1] ... [kN] are the keys of all bindings in [m] - (in increasing order), and [d1] ... [dN] are the associated data. *) - - Parameter equal : (elt -> elt -> bool) -> t elt -> t elt -> bool. - (** [equal cmp m1 m2] tests whether the maps [m1] and [m2] are equal, - that is, contain equal keys and associate them with equal data. - [cmp] is the equality predicate used to compare the data associated - with the keys. *) - - Section Spec. - - Variable m m' m'' : t elt. - Variable x y z : key. - Variable e e' : elt. - - Parameter MapsTo : key -> elt -> t elt -> Prop. - - Definition In (k:key)(m: t elt) : Prop := exists e:elt, MapsTo k e m. - - Definition Empty m := forall (a : key)(e:elt) , ~ MapsTo a e m. - - Definition eq_key (p p':key*elt) := E.eq (fst p) (fst p'). - - Definition eq_key_elt (p p':key*elt) := - E.eq (fst p) (fst p') /\ (snd p) = (snd p'). - - (** Specification of [MapsTo] *) - Parameter MapsTo_1 : E.eq x y -> MapsTo x e m -> MapsTo y e m. - - (** Specification of [mem] *) - Parameter mem_1 : In x m -> mem x m = true. - Parameter mem_2 : mem x m = true -> In x m. - - (** Specification of [empty] *) - Parameter empty_1 : Empty empty. - - (** Specification of [is_empty] *) - Parameter is_empty_1 : Empty m -> is_empty m = true. - Parameter is_empty_2 : is_empty m = true -> Empty m. - - (** Specification of [add] *) - Parameter add_1 : E.eq x y -> MapsTo y e (add x e m). - Parameter add_2 : ~ E.eq x y -> MapsTo y e m -> MapsTo y e (add x e' m). - Parameter add_3 : ~ E.eq x y -> MapsTo y e (add x e' m) -> MapsTo y e m. - - (** Specification of [remove] *) - Parameter remove_1 : E.eq x y -> ~ In y (remove x m). - Parameter remove_2 : ~ E.eq x y -> MapsTo y e m -> MapsTo y e (remove x m). - Parameter remove_3 : MapsTo y e (remove x m) -> MapsTo y e m. - - (** Specification of [find] *) - Parameter find_1 : MapsTo x e m -> find x m = Some e. - Parameter find_2 : find x m = Some e -> MapsTo x e m. - - (** Specification of [elements] *) - Parameter elements_1 : - MapsTo x e m -> InA eq_key_elt (x,e) (elements m). - Parameter elements_2 : - InA eq_key_elt (x,e) (elements m) -> MapsTo x e m. - Parameter elements_3 : NoDupA eq_key (elements m). - - (** Specification of [fold] *) - Parameter fold_1 : - forall (A : Set) (i : A) (f : key -> elt -> A -> A), - fold f m i = fold_left (fun a p => f (fst p) (snd p) a) (elements m) i. - - Definition Equal cmp m m' := - (forall k, In k m <-> In k m') /\ - (forall k e e', MapsTo k e m -> MapsTo k e' m' -> cmp e e' = true). - - Variable cmp : elt -> elt -> bool. - - (** Specification of [equal] *) - Parameter equal_1 : Equal cmp m m' -> equal cmp m m' = true. - Parameter equal_2 : equal cmp m m' = true -> Equal cmp m m'. - - End Spec. - End Types. - - (** Specification of [map] *) - Parameter map_1 : forall (elt elt':Set)(m: t elt)(x:key)(e:elt)(f:elt->elt'), - MapsTo x e m -> MapsTo x (f e) (map f m). - Parameter map_2 : forall (elt elt':Set)(m: t elt)(x:key)(f:elt->elt'), - In x (map f m) -> In x m. - - (** Specification of [mapi] *) - Parameter mapi_1 : forall (elt elt':Set)(m: t elt)(x:key)(e:elt) - (f:key->elt->elt'), MapsTo x e m -> - exists y, E.eq y x /\ MapsTo x (f y e) (mapi f m). - Parameter mapi_2 : forall (elt elt':Set)(m: t elt)(x:key) - (f:key->elt->elt'), In x (mapi f m) -> In x m. - - (** Specification of [map2] *) - Parameter map2_1 : forall (elt elt' elt'':Set)(m: t elt)(m': t elt') - (x:key)(f:option elt->option elt'->option elt''), - In x m \/ In x m' -> - find x (map2 f m m') = f (find x m) (find x m'). - - Parameter map2_2 : forall (elt elt' elt'':Set)(m: t elt)(m': t elt') - (x:key)(f:option elt->option elt'->option elt''), - In x (map2 f m m') -> In x m \/ In x m'. - - Hint Immediate MapsTo_1 mem_2 is_empty_2. - - Hint Resolve mem_1 is_empty_1 is_empty_2 add_1 add_2 add_3 remove_1 - remove_2 remove_3 find_1 find_2 fold_1 map_1 map_2 mapi_1 mapi_2. - -End S. diff --git a/theories/FSets/FMapWeakList.v b/theories/FSets/FMapWeakList.v index 890485a8..be09e41a 100644 --- a/theories/FSets/FMapWeakList.v +++ b/theories/FSets/FMapWeakList.v @@ -6,39 +6,28 @@ (* * GNU Lesser General Public License Version 2.1 *) (***********************************************************************) -(* $Id: FMapWeakList.v 8985 2006-06-23 16:12:45Z jforest $ *) +(* $Id: FMapWeakList.v 10616 2008-03-04 17:33:35Z letouzey $ *) (** * Finite map library *) (** This file proposes an implementation of the non-dependant interface - [FMapInterface.S] using lists of pairs, unordered but without redundancy. *) + [FMapInterface.WS] using lists of pairs, unordered but without redundancy. *) -Require Import FSetInterface. -Require Import FSetWeakInterface. -Require Import FMapWeakInterface. +Require Import FMapInterface. Set Implicit Arguments. Unset Strict Implicit. -Arguments Scope list [type_scope]. - Module Raw (X:DecidableType). -Module PX := KeyDecidableType X. -Import PX. +Module Import PX := KeyDecidableType X. Definition key := X.t. -Definition t (elt:Set) := list (X.t * elt). +Definition t (elt:Type) := list (X.t * elt). Section Elt. -Variable elt : Set. - -(* now in KeyDecidableType: -Definition eqk (p p':key*elt) := X.eq (fst p) (fst p'). -Definition eqke (p p':key*elt) := - X.eq (fst p) (fst p') /\ (snd p) = (snd p'). -*) +Variable elt : Type. Notation eqk := (eqk (elt:=elt)). Notation eqke := (eqke (elt:=elt)). @@ -221,10 +210,10 @@ Proof. destruct a as (x',e'). simpl; case (X.eq_dec x x'); inversion_clear Hm; auto. constructor; auto. - swap H. + contradict H. apply InA_eqk with (x,e); auto. constructor; auto. - swap H; apply add_3' with x e; auto. + contradict H; apply add_3' with x e; auto. Qed. (* Not part of the exported specifications, used later for [combine]. *) @@ -272,8 +261,8 @@ Proof. inversion_clear Hm. subst. - swap H0. - destruct H2 as (e,H2); unfold PX.MapsTo in H2. + contradict H0. + destruct H0 as (e,H2); unfold PX.MapsTo in H2. apply InA_eqk with (y,e); auto. compute; apply X.eq_trans with x; auto. @@ -323,7 +312,7 @@ Proof. destruct a as (x',e'). simpl; case (X.eq_dec x x'); auto. constructor; auto. - swap H; apply remove_3' with x; auto. + contradict H; apply remove_3' with x; auto. Qed. (** * [elements] *) @@ -340,20 +329,20 @@ Proof. auto. Qed. -Lemma elements_3 : forall m (Hm:NoDupA m), NoDupA (elements m). +Lemma elements_3w : forall m (Hm:NoDupA m), NoDupA (elements m). Proof. auto. Qed. (** * [fold] *) -Function fold (A:Set)(f:key->elt->A->A)(m:t elt) (acc : A) {struct m} : A := +Function fold (A:Type)(f:key->elt->A->A)(m:t elt) (acc : A) {struct m} : A := match m with | nil => acc | (k,e)::m' => fold f m' (f k e acc) end. -Lemma fold_1 : forall m (A:Set)(i:A)(f:key->elt->A->A), +Lemma fold_1 : forall m (A:Type)(i:A)(f:key->elt->A->A), fold f m i = fold_left (fun a p => f (fst p) (snd p) a) (elements m) i. Proof. intros; functional induction (@fold A f m i); auto. @@ -377,7 +366,7 @@ Definition Submap cmp m m' := (forall k, In k m -> In k m') /\ (forall k e e', MapsTo k e m -> MapsTo k e' m' -> cmp e e' = true). -Definition Equal cmp m m' := +Definition Equivb cmp m m' := (forall k, In k m <-> In k m') /\ (forall k e e', MapsTo k e m -> MapsTo k e' m' -> cmp e e' = true). @@ -444,17 +433,17 @@ Qed. (** Specification of [equal] *) Lemma equal_1 : forall m (Hm:NoDupA m) m' (Hm': NoDupA m') cmp, - Equal cmp m m' -> equal cmp m m' = true. + Equivb cmp m m' -> equal cmp m m' = true. Proof. - unfold Equal, equal. + unfold Equivb, equal. intuition. apply andb_true_intro; split; apply submap_1; unfold Submap; firstorder. Qed. Lemma equal_2 : forall m (Hm:NoDupA m) m' (Hm':NoDupA m') cmp, - equal cmp m m' = true -> Equal cmp m m'. + equal cmp m m' = true -> Equivb cmp m m'. Proof. - unfold Equal, equal. + unfold Equivb, equal. intros. destruct (andb_prop _ _ H); clear H. generalize (submap_2 Hm Hm' H0). @@ -462,7 +451,7 @@ Proof. firstorder. Qed. -Variable elt':Set. +Variable elt':Type. (** * [map] and [mapi] *) @@ -483,7 +472,7 @@ Section Elt2. (* A new section is necessary for previous definitions to work with different [elt], especially [MapsTo]... *) -Variable elt elt' : Set. +Variable elt elt' : Type. (** Specification of [map] *) @@ -533,12 +522,12 @@ Proof. destruct a as (x',e'). inversion_clear Hm. constructor; auto. - swap H. + contradict H. (* il faut un map_1 avec eqk au lieu de eqke *) clear IHm H0. induction m; simpl in *; auto. - inversion H1. - destruct a; inversion H1; auto. + inversion H. + destruct a; inversion H; auto. Qed. (** Specification of [mapi] *) @@ -593,17 +582,17 @@ Proof. destruct a as (x',e'). inversion_clear Hm; auto. constructor; auto. - swap H. + contradict H. clear IHm H0. induction m; simpl in *; auto. - inversion_clear H1. - destruct a; inversion_clear H1; auto. + inversion_clear H. + destruct a; inversion_clear H; auto. Qed. End Elt2. Section Elt3. -Variable elt elt' elt'' : Set. +Variable elt elt' elt'' : Type. Notation oee' := (option elt * option elt')%type. @@ -613,7 +602,7 @@ Definition combine_l (m:t elt)(m':t elt') : t oee' := Definition combine_r (m:t elt)(m':t elt') : t oee' := mapi (fun k e' => (find k m, Some e')) m'. -Definition fold_right_pair (A B C:Set)(f:A->B->C->C)(l:list (A*B))(i:C) := +Definition fold_right_pair (A B C:Type)(f:A->B->C->C)(l:list (A*B))(i:C) := List.fold_right (fun p => f (fst p) (snd p)) i l. Definition combine (m:t elt)(m':t elt') : t oee' := @@ -737,7 +726,7 @@ Qed. Variable f : option elt -> option elt' -> option elt''. -Definition option_cons (A:Set)(k:key)(o:option A)(l:list (key*A)) := +Definition option_cons (A:Type)(k:key)(o:option A)(l:list (key*A)) := match o with | Some e => (k,e)::l | None => l @@ -765,13 +754,13 @@ Proof. inversion_clear H1. destruct a; destruct o; simpl; auto. constructor; auto. - swap H. + contradict H. clear IHl1. induction l1. - inversion H1. + inversion H. inversion_clear H0. destruct a; destruct o; simpl in *; auto. - inversion_clear H1; auto. + inversion_clear H; auto. Qed. Definition at_least_one_then_f (o:option elt)(o':option elt') := @@ -807,7 +796,7 @@ Proof. rewrite H2. unfold f'; simpl. destruct (f oo oo'); simpl. - destruct (X.eq_dec x k); try absurd_hyp n; auto. + destruct (X.eq_dec x k); try contradict n; auto. destruct (IHm0 H1) as (_,H4); apply H4; auto. case_eq (find x m0); intros; auto. elim H0. @@ -817,7 +806,7 @@ Proof. (* k < x *) unfold f'; simpl. destruct (f oo oo'); simpl. - destruct (X.eq_dec x k); [ absurd_hyp n; auto | auto]. + destruct (X.eq_dec x k); [ contradict n; auto | auto]. destruct (IHm0 H1) as (H3,_); apply H3; auto. destruct (IHm0 H1) as (H3,_); apply H3; auto. @@ -831,7 +820,7 @@ Proof. (* k < x *) unfold f'; simpl. destruct (f oo oo'); simpl. - destruct (X.eq_dec x k); [ absurd_hyp n; auto | auto]. + destruct (X.eq_dec x k); [ contradict n; auto | auto]. destruct (IHm0 H1) as (_,H4); apply H4; auto. destruct (IHm0 H1) as (_,H4); apply H4; auto. Qed. @@ -873,18 +862,18 @@ End Elt3. End Raw. -Module Make (X: DecidableType) <: S with Module E:=X. +Module Make (X: DecidableType) <: WS with Module E:=X. Module Raw := Raw X. Module E := X. Definition key := E.t. - Record slist (elt:Set) : Set := + Record slist (elt:Type) := {this :> Raw.t elt; NoDup : NoDupA (@Raw.PX.eqk elt) this}. - Definition t (elt:Set) := slist elt. + Definition t (elt:Type) := slist elt. Section Elt. - Variable elt elt' elt'':Set. + Variable elt elt' elt'':Type. Implicit Types m : t elt. Implicit Types x y : key. @@ -901,13 +890,18 @@ Section Elt. Definition map2 f m (m':t elt') : t elt'' := Build_slist (Raw.map2_NoDup f m.(NoDup) m'.(NoDup)). Definition elements m : list (key*elt) := @Raw.elements elt m.(this). - Definition fold (A:Set)(f:key->elt->A->A) m (i:A) : A := @Raw.fold elt A f m.(this) i. + Definition cardinal m := length m.(this). + Definition fold (A:Type)(f:key->elt->A->A) m (i:A) : A := @Raw.fold elt A f m.(this) i. Definition equal cmp m m' : bool := @Raw.equal elt cmp m.(this) m'.(this). - Definition MapsTo x e m : Prop := Raw.PX.MapsTo x e m.(this). Definition In x m : Prop := Raw.PX.In x m.(this). Definition Empty m : Prop := Raw.Empty m.(this). - Definition Equal cmp m m' : Prop := @Raw.Equal elt cmp m.(this) m'.(this). + + Definition Equal m m' := forall y, find y m = find y m'. + Definition Equiv (eq_elt:elt->elt->Prop) m m' := + (forall k, In k m <-> In k m') /\ + (forall k e e', MapsTo k e m -> MapsTo k e' m' -> eq_elt e e'). + Definition Equivb cmp m m' : Prop := @Raw.Equivb elt cmp m.(this) m'.(this). Definition eq_key : (key*elt) -> (key*elt) -> Prop := @Raw.PX.eqk elt. Definition eq_key_elt : (key*elt) -> (key*elt) -> Prop:= @Raw.PX.eqke elt. @@ -951,36 +945,39 @@ Section Elt. Proof. intros m; exact (@Raw.elements_1 elt m.(this)). Qed. Lemma elements_2 : forall m x e, InA eq_key_elt (x,e) (elements m) -> MapsTo x e m. Proof. intros m; exact (@Raw.elements_2 elt m.(this)). Qed. - Lemma elements_3 : forall m, NoDupA eq_key (elements m). - Proof. intros m; exact (@Raw.elements_3 elt m.(this) m.(NoDup)). Qed. + Lemma elements_3w : forall m, NoDupA eq_key (elements m). + Proof. intros m; exact (@Raw.elements_3w elt m.(this) m.(NoDup)). Qed. + + Lemma cardinal_1 : forall m, cardinal m = length (elements m). + Proof. intros; reflexivity. Qed. - Lemma fold_1 : forall m (A : Set) (i : A) (f : key -> elt -> A -> A), + Lemma fold_1 : forall m (A : Type) (i : A) (f : key -> elt -> A -> A), fold f m i = fold_left (fun a p => f (fst p) (snd p) a) (elements m) i. Proof. intros m; exact (@Raw.fold_1 elt m.(this)). Qed. - Lemma equal_1 : forall m m' cmp, Equal cmp m m' -> equal cmp m m' = true. + Lemma equal_1 : forall m m' cmp, Equivb cmp m m' -> equal cmp m m' = true. Proof. intros m m'; exact (@Raw.equal_1 elt m.(this) m.(NoDup) m'.(this) m'.(NoDup)). Qed. - Lemma equal_2 : forall m m' cmp, equal cmp m m' = true -> Equal cmp m m'. + Lemma equal_2 : forall m m' cmp, equal cmp m m' = true -> Equivb cmp m m'. Proof. intros m m'; exact (@Raw.equal_2 elt m.(this) m.(NoDup) m'.(this) m'.(NoDup)). Qed. End Elt. - Lemma map_1 : forall (elt elt':Set)(m: t elt)(x:key)(e:elt)(f:elt->elt'), + Lemma map_1 : forall (elt elt':Type)(m: t elt)(x:key)(e:elt)(f:elt->elt'), MapsTo x e m -> MapsTo x (f e) (map f m). Proof. intros elt elt' m; exact (@Raw.map_1 elt elt' m.(this)). Qed. - Lemma map_2 : forall (elt elt':Set)(m: t elt)(x:key)(f:elt->elt'), + Lemma map_2 : forall (elt elt':Type)(m: t elt)(x:key)(f:elt->elt'), In x (map f m) -> In x m. Proof. intros elt elt' m; exact (@Raw.map_2 elt elt' m.(this)). Qed. - Lemma mapi_1 : forall (elt elt':Set)(m: t elt)(x:key)(e:elt) + Lemma mapi_1 : forall (elt elt':Type)(m: t elt)(x:key)(e:elt) (f:key->elt->elt'), MapsTo x e m -> exists y, E.eq y x /\ MapsTo x (f y e) (mapi f m). Proof. intros elt elt' m; exact (@Raw.mapi_1 elt elt' m.(this)). Qed. - Lemma mapi_2 : forall (elt elt':Set)(m: t elt)(x:key) + Lemma mapi_2 : forall (elt elt':Type)(m: t elt)(x:key) (f:key->elt->elt'), In x (mapi f m) -> In x m. Proof. intros elt elt' m; exact (@Raw.mapi_2 elt elt' m.(this)). Qed. - Lemma map2_1 : forall (elt elt' elt'':Set)(m: t elt)(m': t elt') + Lemma map2_1 : forall (elt elt' elt'':Type)(m: t elt)(m': t elt') (x:key)(f:option elt->option elt'->option elt''), In x m \/ In x m' -> find x (map2 f m m') = f (find x m) (find x m'). @@ -988,7 +985,7 @@ Section Elt. intros elt elt' elt'' m m' x f; exact (@Raw.map2_1 elt elt' elt'' f m.(this) m.(NoDup) m'.(this) m'.(NoDup) x). Qed. - Lemma map2_2 : forall (elt elt' elt'':Set)(m: t elt)(m': t elt') + Lemma map2_2 : forall (elt elt' elt'':Type)(m: t elt)(m': t elt') (x:key)(f:option elt->option elt'->option elt''), In x (map2 f m m') -> In x m \/ In x m'. Proof. diff --git a/theories/FSets/FMaps.v b/theories/FSets/FMaps.v index 72ccad3f..75904202 100644 --- a/theories/FSets/FMaps.v +++ b/theories/FSets/FMaps.v @@ -6,13 +6,13 @@ (* * GNU Lesser General Public License Version 2.1 *) (***********************************************************************) -(* $Id: FMaps.v 8844 2006-05-22 17:22:36Z letouzey $ *) +(* $Id: FMaps.v 10699 2008-03-19 20:56:43Z letouzey $ *) -Require Export OrderedType. -Require Export OrderedTypeEx. -Require Export OrderedTypeAlt. + +Require Export OrderedType OrderedTypeEx OrderedTypeAlt. +Require Export DecidableType DecidableTypeEx. Require Export FMapInterface. -Require Export FMapList. Require Export FMapPositive. -Require Export FMapIntMap. -Require Export FMapFacts. \ No newline at end of file +Require Export FMapFacts. +Require Export FMapWeakList. +Require Export FMapList. diff --git a/theories/FSets/FSetAVL.v b/theories/FSets/FSetAVL.v index d5ce54d9..faa705f6 100644 --- a/theories/FSets/FSetAVL.v +++ b/theories/FSets/FSetAVL.v @@ -1,4 +1,3 @@ - (***********************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* X.t -> tree -> int -> tree. Notation t := tree. -(** The fourth field of [Node] is the height of the tree *) +(** * Basic functions on trees: height and cardinal *) + +Definition height (s : tree) : int := + match s with + | Leaf => 0 + | Node _ _ _ h => h + end. + +Fixpoint cardinal (s : tree) : nat := + match s with + | Leaf => 0%nat + | Node l _ r _ => S (cardinal l + cardinal r) + end. + +(** * Empty Set *) + +Definition empty := Leaf. + +(** * Emptyness test *) + +Definition is_empty s := + match s with Leaf => true | _ => false end. + +(** * Appartness *) + +(** The [mem] function is deciding appartness. It exploits the + binary search tree invariant to achieve logarithmic complexity. *) + +Fixpoint mem x s := + match s with + | Leaf => false + | Node l y r _ => match X.compare x y with + | LT _ => mem x l + | EQ _ => true + | GT _ => mem x r + end + end. + +(** * Singleton set *) + +Definition singleton x := Node Leaf x Leaf 1. + +(** * Helper functions *) + +(** [create l x r] creates a node, assuming [l] and [r] + to be balanced and [|height l - height r| <= 2]. *) + +Definition create l x r := + Node l x r (max (height l) (height r) + 1). + +(** [bal l x r] acts as [create], but performs one step of + rebalancing if necessary, i.e. assumes [|height l - height r| <= 3]. *) + +Definition assert_false := create. + +Definition bal l x r := + let hl := height l in + let hr := height r in + if gt_le_dec hl (hr+2) then + match l with + | Leaf => assert_false l x r + | Node ll lx lr _ => + if ge_lt_dec (height ll) (height lr) then + create ll lx (create lr x r) + else + match lr with + | Leaf => assert_false l x r + | Node lrl lrx lrr _ => + create (create ll lx lrl) lrx (create lrr x r) + end + end + else + if gt_le_dec hr (hl+2) then + match r with + | Leaf => assert_false l x r + | Node rl rx rr _ => + if ge_lt_dec (height rr) (height rl) then + create (create l x rl) rx rr + else + match rl with + | Leaf => assert_false l x r + | Node rll rlx rlr _ => + create (create l x rll) rlx (create rlr rx rr) + end + end + else + create l x r. + +(** * Insertion *) + +Fixpoint add x s := match s with + | Leaf => Node Leaf x Leaf 1 + | Node l y r h => + match X.compare x y with + | LT _ => bal (add x l) y r + | EQ _ => Node l y r h + | GT _ => bal l y (add x r) + end + end. + +(** * Join + + Same as [bal] but does not assume anything regarding heights + of [l] and [r]. +*) + +Fixpoint join l : elt -> t -> t := + match l with + | Leaf => add + | Node ll lx lr lh => fun x => + fix join_aux (r:t) : t := match r with + | Leaf => add x l + | Node rl rx rr rh => + if gt_le_dec lh (rh+2) then bal ll lx (join lr x r) + else if gt_le_dec rh (lh+2) then bal (join_aux rl) rx rr + else create l x r + end + end. + +(** * Extraction of minimum element + + Morally, [remove_min] is to be applied to a non-empty tree + [t = Node l x r h]. Since we can't deal here with [assert false] + for [t=Leaf], we pre-unpack [t] (and forget about [h]). +*) + +Fixpoint remove_min l x r : t*elt := + match l with + | Leaf => (r,x) + | Node ll lx lr lh => + let (l',m) := remove_min ll lx lr in (bal l' x r, m) + end. + +(** * Merging two trees + + [merge t1 t2] builds the union of [t1] and [t2] assuming all elements + of [t1] to be smaller than all elements of [t2], and + [|height t1 - height t2| <= 2]. +*) + +Definition merge s1 s2 := match s1,s2 with + | Leaf, _ => s2 + | _, Leaf => s1 + | _, Node l2 x2 r2 h2 => + let (s2',m) := remove_min l2 x2 r2 in bal s1 m s2' +end. + +(** * Deletion *) + +Fixpoint remove x s := match s with + | Leaf => Leaf + | Node l y r h => + match X.compare x y with + | LT _ => bal (remove x l) y r + | EQ _ => merge l r + | GT _ => bal l y (remove x r) + end + end. + +(** * Minimum element *) + +Fixpoint min_elt s := match s with + | Leaf => None + | Node Leaf y _ _ => Some y + | Node l _ _ _ => min_elt l +end. + +(** * Maximum element *) + +Fixpoint max_elt s := match s with + | Leaf => None + | Node _ y Leaf _ => Some y + | Node _ _ r _ => max_elt r +end. + +(** * Any element *) + +Definition choose := min_elt. + +(** * Concatenation + + Same as [merge] but does not assume anything about heights. +*) + +Definition concat s1 s2 := + match s1, s2 with + | Leaf, _ => s2 + | _, Leaf => s1 + | _, Node l2 x2 r2 _ => + let (s2',m) := remove_min l2 x2 r2 in + join s1 m s2' + end. + +(** * Splitting + + [split x s] returns a triple [(l, present, r)] where + - [l] is the set of elements of [s] that are [< x] + - [r] is the set of elements of [s] that are [> x] + - [present] is [true] if and only if [s] contains [x]. +*) + +Record triple := mktriple { t_left:t; t_in:bool; t_right:t }. +Notation "<< l , b , r >>" := (mktriple l b r) (at level 9). +Notation "t #l" := (t_left t) (at level 9, format "t '#l'"). +Notation "t #b" := (t_in t) (at level 9, format "t '#b'"). +Notation "t #r" := (t_right t) (at level 9, format "t '#r'"). + +Fixpoint split x s : triple := match s with + | Leaf => << Leaf, false, Leaf >> + | Node l y r h => + match X.compare x y with + | LT _ => let (ll,b,rl) := split x l in << ll, b, join rl y r >> + | EQ _ => << l, true, r >> + | GT _ => let (rl,b,rr) := split x r in << join l y rl, b, rr >> + end + end. + +(** * Intersection *) + +Fixpoint inter s1 s2 := match s1, s2 with + | Leaf, _ => Leaf + | _, Leaf => Leaf + | Node l1 x1 r1 h1, _ => + let (l2',pres,r2') := split x1 s2 in + if pres then join (inter l1 l2') x1 (inter r1 r2') + else concat (inter l1 l2') (inter r1 r2') + end. + +(** * Difference *) + +Fixpoint diff s1 s2 := match s1, s2 with + | Leaf, _ => Leaf + | _, Leaf => s1 + | Node l1 x1 r1 h1, _ => + let (l2',pres,r2') := split x1 s2 in + if pres then concat (diff l1 l2') (diff r1 r2') + else join (diff l1 l2') x1 (diff r1 r2') +end. + +(** * Union *) + +(** In ocaml, heights of [s1] and [s2] are compared each time in order + to recursively perform the split on the smaller set. + Unfortunately, this leads to a non-structural algorithm. The + following code is a simplification of the ocaml version: no + comparison of heights. It might be slightly slower, but + experimentally all the tests I've made in ocaml have shown this + potential slowdown to be non-significant. Anyway, the exact code + of ocaml has also been formalized thanks to Function+measure, see + [ocaml_union] in [FSetFullAVL]. +*) + +Fixpoint union s1 s2 := + match s1, s2 with + | Leaf, _ => s2 + | _, Leaf => s1 + | Node l1 x1 r1 h1, _ => + let (l2',_,r2') := split x1 s2 in + join (union l1 l2') x1 (union r1 r2') + end. + +(** * Elements *) + +(** [elements_tree_aux acc t] catenates the elements of [t] in infix + order to the list [acc] *) + +Fixpoint elements_aux (acc : list X.t) (t : tree) : list X.t := + match t with + | Leaf => acc + | Node l x r _ => elements_aux (x :: elements_aux acc r) l + end. + +(** then [elements] is an instanciation with an empty [acc] *) + +Definition elements := elements_aux nil. + +(** * Filter *) + +Fixpoint filter_acc (f:elt->bool) acc s := match s with + | Leaf => acc + | Node l x r h => + filter_acc f (filter_acc f (if f x then add x acc else acc) l) r + end. + +Definition filter f := filter_acc f Leaf. + + +(** * Partition *) + +Fixpoint partition_acc (f:elt->bool)(acc : t*t)(s : t) : t*t := + match s with + | Leaf => acc + | Node l x r _ => + let (acct,accf) := acc in + partition_acc f + (partition_acc f + (if f x then (add x acct, accf) else (acct, add x accf)) l) r + end. + +Definition partition f := partition_acc f (Leaf,Leaf). + +(** * [for_all] and [exists] *) + +Fixpoint for_all (f:elt->bool) s := match s with + | Leaf => true + | Node l x r _ => f x &&& for_all f l &&& for_all f r +end. + +Fixpoint exists_ (f:elt->bool) s := match s with + | Leaf => false + | Node l x r _ => f x ||| exists_ f l ||| exists_ f r +end. + +(** * Fold *) + +Fixpoint fold (A : Type) (f : elt -> A -> A)(s : tree) : A -> A := + fun a => match s with + | Leaf => a + | Node l x r _ => fold f r (f x (fold f l a)) + end. +Implicit Arguments fold [A]. + + +(** * Subset *) + +(** In ocaml, recursive calls are made on "half-trees" such as + (Node l1 x1 Leaf _) and (Node Leaf x1 r1 _). Instead of these + non-structural calls, we propose here two specialized functions for + these situations. This version should be almost as efficient as + the one of ocaml (closures as arguments may slow things a bit), + it is simply less compact. The exact ocaml version has also been + formalized (thanks to Function+measure), see [ocaml_subset] in + [FSetFullAVL]. + *) + +Fixpoint subsetl (subset_l1:t->bool) x1 s2 : bool := + match s2 with + | Leaf => false + | Node l2 x2 r2 h2 => + match X.compare x1 x2 with + | EQ _ => subset_l1 l2 + | LT _ => subsetl subset_l1 x1 l2 + | GT _ => mem x1 r2 &&& subset_l1 s2 + end + end. + +Fixpoint subsetr (subset_r1:t->bool) x1 s2 : bool := + match s2 with + | Leaf => false + | Node l2 x2 r2 h2 => + match X.compare x1 x2 with + | EQ _ => subset_r1 r2 + | LT _ => mem x1 l2 &&& subset_r1 s2 + | GT _ => subsetr subset_r1 x1 r2 + end + end. + +Fixpoint subset s1 s2 : bool := match s1, s2 with + | Leaf, _ => true + | Node _ _ _ _, Leaf => false + | Node l1 x1 r1 h1, Node l2 x2 r2 h2 => + match X.compare x1 x2 with + | EQ _ => subset l1 l2 &&& subset r1 r2 + | LT _ => subsetl (subset l1) x1 l2 &&& subset r1 s2 + | GT _ => subsetr (subset r1) x1 r2 &&& subset l1 s2 + end + end. + +(** * A new comparison algorithm suggested by Xavier Leroy + + Transformation in C.P.S. suggested by Benjamin Grégoire. + The original ocaml code (with non-structural recursive calls) + has also been formalized (thanks to Function+measure), see + [ocaml_compare] in [FSetFullAVL]. The following code with + continuations computes dramatically faster in Coq, and + should be almost as efficient after extraction. +*) + +(** Enumeration of the elements of a tree *) + +Inductive enumeration := + | End : enumeration + | More : elt -> tree -> enumeration -> enumeration. + + +(** [cons t e] adds the elements of tree [t] on the head of + enumeration [e]. *) + +Fixpoint cons s e : enumeration := + match s with + | Leaf => e + | Node l x r h => cons l (More x r e) + end. + +(** One step of comparison of elements *) + +Definition compare_more x1 (cont:enumeration->comparison) e2 := + match e2 with + | End => Gt + | More x2 r2 e2 => + match X.compare x1 x2 with + | EQ _ => cont (cons r2 e2) + | LT _ => Lt + | GT _ => Gt + end + end. + +(** Comparison of left tree, middle element, then right tree *) + +Fixpoint compare_cont s1 (cont:enumeration->comparison) e2 := + match s1 with + | Leaf => cont e2 + | Node l1 x1 r1 _ => + compare_cont l1 (compare_more x1 (compare_cont r1 cont)) e2 + end. + +(** Initial continuation *) + +Definition compare_end e2 := + match e2 with End => Eq | _ => Lt end. + +(** The complete comparison *) + +Definition compare s1 s2 := compare_cont s1 compare_end (cons s2 End). + +(** * Equality test *) + +Definition equal s1 s2 : bool := + match compare s1 s2 with + | Eq => true + | _ => false + end. + + + + +(** * Invariants *) + +(** ** Occurrence in a tree *) + +Inductive In (x : elt) : tree -> Prop := + | IsRoot : forall l r h y, X.eq x y -> In x (Node l y r h) + | InLeft : forall l r h y, In x l -> In x (Node l y r h) + | InRight : forall l r h y, In x r -> In x (Node l y r h). + +(** ** Binary search trees *) + +(** [lt_tree x s]: all elements in [s] are smaller than [x] + (resp. greater for [gt_tree]) *) + +Definition lt_tree x s := forall y, In y s -> X.lt y x. +Definition gt_tree x s := forall y, In y s -> X.lt x y. + +(** [bst t] : [t] is a binary search tree *) + +Inductive bst : tree -> Prop := + | BSLeaf : bst Leaf + | BSNode : forall x l r h, bst l -> bst r -> + lt_tree x l -> gt_tree x r -> bst (Node l x r h). + + + + +(** * Some shortcuts *) + +Definition Equal s s' := forall a : elt, In a s <-> In a s'. +Definition Subset s s' := forall a : elt, In a s -> In a s'. +Definition Empty s := forall a : elt, ~ In a s. +Definition For_all (P : elt -> Prop) s := forall x, In x s -> P x. +Definition Exists (P : elt -> Prop) s := exists x, In x s /\ P x. + + + +(** * Correctness proofs, isolated in a sub-module *) + +Module Proofs. + Module MX := OrderedTypeFacts X. + Module L := FSetList.Raw X. + +(** * Automation and dedicated tactics *) + +Hint Constructors In bst. +Hint Unfold lt_tree gt_tree. + +Tactic Notation "factornode" ident(l) ident(x) ident(r) ident(h) + "as" ident(s) := + set (s:=Node l x r h) in *; clearbody s; clear l x r h. (** A tactic to repeat [inversion_clear] on all hyps of the form [(f (Node _ _ _ _))] *) + Ltac inv f := match goal with | H:f Leaf |- _ => inversion_clear H; inv f @@ -56,30 +569,18 @@ Ltac inv f := | _ => idtac end. -(** Same, but with a backup of the original hypothesis. *) +Ltac intuition_in := repeat progress (intuition; inv In). -Ltac safe_inv f := match goal with - | H:f (Node _ _ _ _) |- _ => - generalize H; inversion_clear H; safe_inv f - | _ => intros - end. +(** Helper tactic concerning order of elements. *) -(** * Occurrence in a tree *) +Ltac order := match goal with + | U: lt_tree _ ?s, V: In _ ?s |- _ => generalize (U _ V); clear U; order + | U: gt_tree _ ?s, V: In _ ?s |- _ => generalize (U _ V); clear U; order + | _ => MX.order +end. -Inductive In (x : elt) : tree -> Prop := - | IsRoot : - forall (l r : tree) (h : int) (y : elt), - X.eq x y -> In x (Node l y r h) - | InLeft : - forall (l r : tree) (h : int) (y : elt), - In x l -> In x (Node l y r h) - | InRight : - forall (l r : tree) (h : int) (y : elt), - In x r -> In x (Node l y r h). - -Hint Constructors In. -Ltac intuition_in := repeat progress (intuition; inv In). +(** * Basic results about [In], [lt_tree], [gt_tree], [height] *) (** [In] is compatible with [X.eq] *) @@ -90,48 +591,37 @@ Proof. Qed. Hint Immediate In_1. -(** * Binary search trees *) - -(** [lt_tree x s]: all elements in [s] are smaller than [x] - (resp. greater for [gt_tree]) *) - -Definition lt_tree (x : elt) (s : tree) := - forall y:elt, In y s -> X.lt y x. -Definition gt_tree (x : elt) (s : tree) := - forall y:elt, In y s -> X.lt x y. - -Hint Unfold lt_tree gt_tree. - -Ltac order := match goal with - | H: lt_tree ?x ?s, H1: In ?y ?s |- _ => generalize (H _ H1); clear H; order - | H: gt_tree ?x ?s, H1: In ?y ?s |- _ => generalize (H _ H1); clear H; order - | _ => MX.order -end. +Lemma In_node_iff : + forall l x r h y, + In y (Node l x r h) <-> In y l \/ X.eq y x \/ In y r. +Proof. + intuition_in. +Qed. (** Results about [lt_tree] and [gt_tree] *) Lemma lt_leaf : forall x : elt, lt_tree x Leaf. Proof. - unfold lt_tree in |- *; intros; inversion H. + red; inversion 1. Qed. Lemma gt_leaf : forall x : elt, gt_tree x Leaf. Proof. - unfold gt_tree in |- *; intros; inversion H. + red; inversion 1. Qed. Lemma lt_tree_node : forall (x y : elt) (l r : tree) (h : int), lt_tree x l -> lt_tree x r -> X.lt y x -> lt_tree x (Node l y r h). Proof. - unfold lt_tree in *; intuition_in; order. + unfold lt_tree; intuition_in; order. Qed. Lemma gt_tree_node : forall (x y : elt) (l r : tree) (h : int), gt_tree x l -> gt_tree x r -> X.lt x y -> gt_tree x (Node l y r h). Proof. - unfold gt_tree in *; intuition_in; order. + unfold gt_tree; intuition_in; order. Qed. Hint Resolve lt_leaf gt_leaf lt_tree_node gt_tree_node. @@ -145,7 +635,7 @@ Qed. Lemma lt_tree_trans : forall x y, X.lt x y -> forall t, lt_tree x t -> lt_tree y t. Proof. - firstorder eauto. + eauto. Qed. Lemma gt_tree_not_in : @@ -154,122 +644,45 @@ Proof. intros; intro; order. Qed. -Lemma gt_tree_trans : - forall x y, X.lt y x -> forall t, gt_tree x t -> gt_tree y t. -Proof. - firstorder eauto. -Qed. - -Hint Resolve lt_tree_not_in lt_tree_trans gt_tree_not_in gt_tree_trans. - -(** [bst t] : [t] is a binary search tree *) - -Inductive bst : tree -> Prop := - | BSLeaf : bst Leaf - | BSNode : - forall (x : elt) (l r : tree) (h : int), - bst l -> bst r -> lt_tree x l -> gt_tree x r -> bst (Node l x r h). - -Hint Constructors bst. - -(** * AVL trees *) - -(** [avl s] : [s] is a properly balanced AVL tree, - i.e. for any node the heights of the two children - differ by at most 2 *) - -Definition height (s : tree) : int := - match s with - | Leaf => 0 - | Node _ _ _ h => h - end. - -Inductive avl : tree -> Prop := - | RBLeaf : avl Leaf - | RBNode : - forall (x : elt) (l r : tree) (h : int), - avl l -> - avl r -> - -(2) <= height l - height r <= 2 -> - h = max (height l) (height r) + 1 -> - avl (Node l x r h). - -Hint Constructors avl. - -(** Results about [avl] *) - -Lemma avl_node : - forall (x : elt) (l r : tree), - avl l -> - avl r -> - -(2) <= height l - height r <= 2 -> - avl (Node l x r (max (height l) (height r) + 1)). -Proof. - intros; auto. -Qed. -Hint Resolve avl_node. - -(** The tactics *) - -Lemma height_non_negative : forall s : tree, avl s -> height s >= 0. +Lemma gt_tree_trans : + forall x y, X.lt y x -> forall t, gt_tree x t -> gt_tree y t. Proof. - induction s; simpl; intros; auto with zarith. - inv avl; intuition; omega_max. + eauto. Qed. -Implicit Arguments height_non_negative. - -(** When [H:avl r], typing [avl_nn H] or [avl_nn r] adds [height r>=0] *) -Ltac avl_nn_hyp H := - let nz := fresh "nz" in assert (nz := height_non_negative H). - -Ltac avl_nn h := - let t := type of h in - match type of t with - | Prop => avl_nn_hyp h - | _ => match goal with H : avl h |- _ => avl_nn_hyp H end - end. - -(* Repeat the previous tactic. - Drawback: need to clear the [avl _] hyps ... Thank you Ltac *) +Hint Resolve lt_tree_not_in lt_tree_trans gt_tree_not_in gt_tree_trans. -Ltac avl_nns := - match goal with - | H:avl _ |- _ => avl_nn_hyp H; clear H; avl_nns - | _ => idtac - end. +(** * Inductions principles *) -(** * Some shortcuts. *) +Functional Scheme mem_ind := Induction for mem Sort Prop. +Functional Scheme bal_ind := Induction for bal Sort Prop. +Functional Scheme add_ind := Induction for add Sort Prop. +Functional Scheme remove_min_ind := Induction for remove_min Sort Prop. +Functional Scheme merge_ind := Induction for merge Sort Prop. +Functional Scheme remove_ind := Induction for remove Sort Prop. +Functional Scheme min_elt_ind := Induction for min_elt Sort Prop. +Functional Scheme max_elt_ind := Induction for max_elt Sort Prop. +Functional Scheme concat_ind := Induction for concat Sort Prop. +Functional Scheme split_ind := Induction for split Sort Prop. +Functional Scheme inter_ind := Induction for inter Sort Prop. +Functional Scheme diff_ind := Induction for diff Sort Prop. +Functional Scheme union_ind := Induction for union Sort Prop. -Definition Equal s s' := forall a : elt, In a s <-> In a s'. -Definition Subset s s' := forall a : elt, In a s -> In a s'. -Definition Empty s := forall a : elt, ~ In a s. -Definition For_all (P : elt -> Prop) s := forall x, In x s -> P x. -Definition Exists (P : elt -> Prop) s := exists x, In x s /\ P x. (** * Empty set *) -Definition empty := Leaf. - -Lemma empty_bst : bst empty. -Proof. - auto. -Qed. - -Lemma empty_avl : avl empty. -Proof. - auto. -Qed. - Lemma empty_1 : Empty empty. Proof. intro; intro. inversion H. Qed. -(** * Emptyness test *) +Lemma empty_bst : bst empty. +Proof. + auto. +Qed. -Definition is_empty (s:t) := match s with Leaf => true | _ => false end. +(** * Emptyness test *) Lemma is_empty_1 : forall s, Empty s -> is_empty s = true. Proof. @@ -282,54 +695,28 @@ Proof. destruct s; simpl; intros; try discriminate; red; auto. Qed. -(** * Appartness *) -(** The [mem] function is deciding appartness. It exploits the [bst] property - to achieve logarithmic complexity. *) -Function mem (x:elt)(s:t) { struct s } : bool := - match s with - | Leaf => false - | Node l y r _ => match X.compare x y with - | LT _ => mem x l - | EQ _ => true - | GT _ => mem x r - end - end. +(** * Appartness *) Lemma mem_1 : forall s x, bst s -> In x s -> mem x s = true. -Proof. - intros s x. - functional induction (mem x s); inversion_clear 1; auto. - inversion_clear 1. - inversion_clear 1; auto; absurd (X.lt x y); eauto. - inversion_clear 1; auto; absurd (X.lt y x); eauto. +Proof. + intros s x; functional induction mem x s; auto; intros; try clear e0; + inv bst; intuition_in; order. Qed. Lemma mem_2 : forall s x, mem x s = true -> In x s. Proof. - intros s x. - functional induction (mem x s); auto; intros; try discriminate. + intros s x; functional induction mem x s; auto; intros; discriminate. Qed. -(** * Singleton set *) - -Definition singleton (x : elt) := Node Leaf x Leaf 1. -Lemma singleton_bst : forall x : elt, bst (singleton x). -Proof. - unfold singleton; auto. -Qed. -Lemma singleton_avl : forall x : elt, avl (singleton x). -Proof. - unfold singleton; intro. - constructor; auto; try red; simpl; omega_max. -Qed. +(** * Singleton set *) Lemma singleton_1 : forall x y, In y (singleton x) -> X.eq x y. Proof. - unfold singleton; inversion_clear 1; auto; inversion_clear H0. + unfold singleton; intros; inv In; order. Qed. Lemma singleton_2 : forall x y, X.eq x y -> In y (singleton x). @@ -337,35 +724,14 @@ Proof. unfold singleton; auto. Qed. -(** * Helper functions *) - -(** [create l x r] creates a node, assuming [l] and [r] - to be balanced and [|height l - height r| <= 2]. *) - -Definition create l x r := - Node l x r (max (height l) (height r) + 1). - -Lemma create_bst : - forall l x r, bst l -> bst r -> lt_tree x l -> gt_tree x r -> - bst (create l x r). +Lemma singleton_bst : forall x : elt, bst (singleton x). Proof. - unfold create; auto. + unfold singleton; auto. Qed. -Hint Resolve create_bst. -Lemma create_avl : - forall l x r, avl l -> avl r -> -(2) <= height l - height r <= 2 -> - avl (create l x r). -Proof. - unfold create; auto. -Qed. -Lemma create_height : - forall l x r, avl l -> avl r -> -(2) <= height l - height r <= 2 -> - height (create l x r) = max (height l) (height r) + 1. -Proof. - unfold create; intros; auto. -Qed. + +(** * Helper functions *) Lemma create_in : forall l x r y, In y (create l x r) <-> X.eq y x \/ In y l \/ In y r. @@ -373,196 +739,69 @@ Proof. unfold create; split; [ inversion_clear 1 | ]; intuition. Qed. -(** trick for emulating [assert false] in Coq *) - -Definition assert_false := Leaf. - -(** [bal l x r] acts as [create], but performs one step of - rebalancing if necessary, i.e. assumes [|height l - height r| <= 3]. *) - -Definition bal l x r := - let hl := height l in - let hr := height r in - if gt_le_dec hl (hr+2) then - match l with - | Leaf => assert_false - | Node ll lx lr _ => - if ge_lt_dec (height ll) (height lr) then - create ll lx (create lr x r) - else - match lr with - | Leaf => assert_false - | Node lrl lrx lrr _ => - create (create ll lx lrl) lrx (create lrr x r) - end - end - else - if gt_le_dec hr (hl+2) then - match r with - | Leaf => assert_false - | Node rl rx rr _ => - if ge_lt_dec (height rr) (height rl) then - create (create l x rl) rx rr - else - match rl with - | Leaf => assert_false - | Node rll rlx rlr _ => - create (create l x rll) rlx (create rlr rx rr) - end - end - else - create l x r. - -Ltac bal_tac := - intros l x r; - unfold bal; - destruct (gt_le_dec (height l) (height r + 2)); - [ destruct l as [ |ll lx lr lh]; - [ | destruct (ge_lt_dec (height ll) (height lr)); - [ | destruct lr ] ] - | destruct (gt_le_dec (height r) (height l + 2)); - [ destruct r as [ |rl rx rr rh]; - [ | destruct (ge_lt_dec (height rr) (height rl)); - [ | destruct rl ] ] - | ] ]; intros. - -Lemma bal_bst : forall l x r, bst l -> bst r -> - lt_tree x l -> gt_tree x r -> bst (bal l x r). -Proof. - (* intros l x r; functional induction bal l x r. MARCHE PAS !*) - bal_tac; - inv bst; repeat apply create_bst; auto; unfold create; - apply lt_tree_node || apply gt_tree_node; auto; - eapply lt_tree_trans || eapply gt_tree_trans || eauto; eauto. -Qed. - -Lemma bal_avl : forall l x r, avl l -> avl r -> - -(3) <= height l - height r <= 3 -> avl (bal l x r). +Lemma create_bst : + forall l x r, bst l -> bst r -> lt_tree x l -> gt_tree x r -> + bst (create l x r). Proof. - bal_tac; inv avl; repeat apply create_avl; simpl in *; auto; omega_max. + unfold create; auto. Qed. +Hint Resolve create_bst. -Lemma bal_height_1 : forall l x r, avl l -> avl r -> - -(3) <= height l - height r <= 3 -> - 0 <= height (bal l x r) - max (height l) (height r) <= 1. +Lemma bal_in : forall l x r y, + In y (bal l x r) <-> X.eq y x \/ In y l \/ In y r. Proof. - bal_tac; inv avl; avl_nns; simpl in *; omega_max. + intros l x r; functional induction bal l x r; intros; try clear e0; + rewrite !create_in; intuition_in. Qed. -Lemma bal_height_2 : - forall l x r, avl l -> avl r -> -(2) <= height l - height r <= 2 -> - height (bal l x r) == max (height l) (height r) +1. +Lemma bal_bst : forall l x r, bst l -> bst r -> + lt_tree x l -> gt_tree x r -> bst (bal l x r). Proof. - bal_tac; inv avl; simpl in *; omega_max. + intros l x r; functional induction bal l x r; intros; + inv bst; repeat apply create_bst; auto; unfold create; + (apply lt_tree_node || apply gt_tree_node); auto; + (eapply lt_tree_trans || eapply gt_tree_trans); eauto. Qed. +Hint Resolve bal_bst. -Lemma bal_in : forall l x r y, avl l -> avl r -> - (In y (bal l x r) <-> X.eq y x \/ In y l \/ In y r). -Proof. - bal_tac; - solve [repeat rewrite create_in; intuition_in - |inv avl; avl_nns; simpl in *; false_omega]. -Qed. -Ltac omega_bal := match goal with - | H:avl ?l, H':avl ?r |- context [ bal ?l ?x ?r ] => - generalize (bal_height_1 l x r H H') (bal_height_2 l x r H H'); - omega_max - end. (** * Insertion *) -Function add (x:elt)(s:t) { struct s } : t := match s with - | Leaf => Node Leaf x Leaf 1 - | Node l y r h => - match X.compare x y with - | LT _ => bal (add x l) y r - | EQ _ => Node l y r h - | GT _ => bal l y (add x r) - end - end. - -Lemma add_avl_1 : forall s x, avl s -> - avl (add x s) /\ 0 <= height (add x s) - height s <= 1. -Proof. - intros s x; functional induction (add x s); subst;intros; inv avl; simpl in *. - intuition; try constructor; simpl; auto; try omega_max. - (* LT *) - destruct IHt; auto. - split. - apply bal_avl; auto; omega_max. - omega_bal. - (* EQ *) - intuition; omega_max. - (* GT *) - destruct IHt; auto. - split. - apply bal_avl; auto; omega_max. - omega_bal. -Qed. - -Lemma add_avl : forall s x, avl s -> avl (add x s). -Proof. - intros; generalize (add_avl_1 s x H); intuition. -Qed. -Hint Resolve add_avl. - -Lemma add_in : forall s x y, avl s -> - (In y (add x s) <-> X.eq y x \/ In y s). +Lemma add_in : forall s x y, + In y (add x s) <-> X.eq y x \/ In y s. Proof. - intros s x; functional induction (add x s); auto; intros. - intuition_in. - (* LT *) - inv avl. - rewrite bal_in; auto. - rewrite (IHt y0 H0); intuition_in. - (* EQ *) - inv avl. - intuition. + intros s x; functional induction (add x s); auto; intros; + try rewrite bal_in, IHt; intuition_in. eapply In_1; eauto. - (* GT *) - inv avl. - rewrite bal_in; auto. - rewrite (IHt y0 H1); intuition_in. Qed. -Lemma add_bst : forall s x, bst s -> avl s -> bst (add x s). +Lemma add_bst : forall s x, bst s -> bst (add x s). Proof. - intros s x; functional induction (add x s); auto; intros. - inv bst; inv avl; apply bal_bst; auto. + intros s x; functional induction (add x s); auto; intros; + inv bst; apply bal_bst; auto. (* lt_tree -> lt_tree (add ...) *) - red; red in H4. + red; red in H3. intros. - rewrite (add_in l x y0 H) in H0. + rewrite add_in in H. intuition. eauto. - inv bst; inv avl; apply bal_bst; auto. + inv bst; auto using bal_bst. (* gt_tree -> gt_tree (add ...) *) - red; red in H4. + red; red in H3. intros. - rewrite (add_in r x y0 H5) in H0. + rewrite add_in in H. intuition. apply MX.lt_eq with x; auto. Qed. +Hint Resolve add_bst. -(** * Join - Same as [bal] but does not assume anything regarding heights - of [l] and [r]. -*) -Fixpoint join (l:t) : elt -> t -> t := - match l with - | Leaf => add - | Node ll lx lr lh => fun x => - fix join_aux (r:t) : t := match r with - | Leaf => add x l - | Node rl rx rr rh => - if gt_le_dec lh (rh+2) then bal ll lx (join lr x r) - else if gt_le_dec rh (lh+2) then bal (join_aux rl) rx rr - else create l x r - end - end. +(** * Join *) + +(* Function/Functional Scheme can't deal with internal fix. + Let's do its job by hand: *) Ltac join_tac := intro l; induction l as [| ll _ lx lr Hlr lh]; @@ -579,437 +818,200 @@ Ltac join_tac := end | ] ] ] ]; intros. -Lemma join_avl_1 : forall l x r, avl l -> avl r -> avl (join l x r) /\ - 0<= height (join l x r) - max (height l) (height r) <= 1. -Proof. - (* intros l x r; functional induction join l x r. AUTRE PROBLEME! *) - join_tac. - - split; simpl; auto. - destruct (add_avl_1 r x H0). - avl_nns; omega_max. - split; auto. - set (l:=Node ll lx lr lh) in *. - destruct (add_avl_1 l x H). - simpl (height Leaf). - avl_nns; omega_max. - - inversion_clear H. - assert (height (Node rl rx rr rh) = rh); auto. - set (r := Node rl rx rr rh) in *; clearbody r. - destruct (Hlr x r H2 H0); clear Hrl Hlr. - set (j := join lr x r) in *; clearbody j. - simpl. - assert (-(3) <= height ll - height j <= 3) by omega_max. - split. - apply bal_avl; auto. - omega_bal. - - inversion_clear H0. - assert (height (Node ll lx lr lh) = lh); auto. - set (l := Node ll lx lr lh) in *; clearbody l. - destruct (Hrl H H1); clear Hrl Hlr. - set (j := join l x rl) in *; clearbody j. - simpl. - assert (-(3) <= height j - height rr <= 3) by omega_max. - split. - apply bal_avl; auto. - omega_bal. - - clear Hrl Hlr. - assert (height (Node ll lx lr lh) = lh); auto. - assert (height (Node rl rx rr rh) = rh); auto. - set (l := Node ll lx lr lh) in *; clearbody l. - set (r := Node rl rx rr rh) in *; clearbody r. - assert (-(2) <= height l - height r <= 2) by omega_max. - split. - apply create_avl; auto. - rewrite create_height; auto; omega_max. -Qed. - -Lemma join_avl : forall l x r, avl l -> avl r -> avl (join l x r). -Proof. - intros; generalize (join_avl_1 l x r H H0); intuition. -Qed. -Hint Resolve join_avl. - -Lemma join_in : forall l x r y, avl l -> avl r -> - (In y (join l x r) <-> X.eq y x \/ In y l \/ In y r). +Lemma join_in : forall l x r y, + In y (join l x r) <-> X.eq y x \/ In y l \/ In y r. Proof. join_tac. simpl. rewrite add_in; intuition_in. - rewrite add_in; intuition_in. - - inv avl. - rewrite bal_in; auto. - rewrite Hlr; clear Hlr Hrl; intuition_in. - - inv avl. - rewrite bal_in; auto. - rewrite Hrl; clear Hlr Hrl; intuition_in. - + rewrite bal_in, Hlr; clear Hlr Hrl; intuition_in. + rewrite bal_in, Hrl; clear Hlr Hrl; intuition_in. apply create_in. Qed. -Lemma join_bst : forall l x r, bst l -> avl l -> bst r -> avl r -> +Lemma join_bst : forall l x r, bst l -> bst r -> lt_tree x l -> gt_tree x r -> bst (join l x r). Proof. - join_tac. - apply add_bst; auto. - apply add_bst; auto. - - inv bst; safe_inv avl. - apply bal_bst; auto. - clear Hrl Hlr H13 H14 H16 H17 z; intro; intros. - set (r:=Node rl rx rr rh) in *; clearbody r. - rewrite (join_in lr x r y) in H13; auto. - intuition. - apply MX.lt_eq with x; eauto. - eauto. - - inv bst; safe_inv avl. - apply bal_bst; auto. - clear Hrl Hlr H13 H14 H16 H17 z; intro; intros. - set (l:=Node ll lx lr lh) in *; clearbody l. - rewrite (join_in l x rl y) in H13; auto. - intuition. - apply MX.eq_lt with x; eauto. - eauto. - - apply create_bst; auto. + join_tac; auto; inv bst; apply bal_bst; auto; + clear Hrl Hlr z; intro; intros; rewrite join_in in *. + intuition; [ apply MX.lt_eq with x | ]; eauto. + intuition; [ apply MX.eq_lt with x | ]; eauto. Qed. +Hint Resolve join_bst. -(** * Extraction of minimum element - - morally, [remove_min] is to be applied to a non-empty tree - [t = Node l x r h]. Since we can't deal here with [assert false] - for [t=Leaf], we pre-unpack [t] (and forget about [h]). -*) - -Function remove_min (l:t)(x:elt)(r:t) { struct l } : t*elt := - match l with - | Leaf => (r,x) - | Node ll lx lr lh => let (l',m) := (remove_min ll lx lr : t*elt) in (bal l' x r, m) - end. -Lemma remove_min_avl_1 : forall l x r h, avl (Node l x r h) -> - avl (fst (remove_min l x r)) /\ - 0 <= height (Node l x r h) - height (fst (remove_min l x r)) <= 1. -Proof. - intros l x r; functional induction (remove_min l x r); subst;simpl in *; intros. - inv avl; simpl in *; split; auto. - avl_nns; omega_max. - (* l = Node *) - inversion_clear H. - rewrite e0 in IHp;simpl in IHp;destruct (IHp lh); auto. - split; simpl in *. - apply bal_avl; auto; omega_max. - omega_bal. -Qed. -Lemma remove_min_avl : forall l x r h, avl (Node l x r h) -> - avl (fst (remove_min l x r)). -Proof. - intros; generalize (remove_min_avl_1 l x r h H); intuition. -Qed. +(** * Extraction of minimum element *) -Lemma remove_min_in : forall l x r h y, avl (Node l x r h) -> - (In y (Node l x r h) <-> - X.eq y (snd (remove_min l x r)) \/ In y (fst (remove_min l x r))). +Lemma remove_min_in : forall l x r h y, + In y (Node l x r h) <-> + X.eq y (remove_min l x r)#2 \/ In y (remove_min l x r)#1. Proof. intros l x r; functional induction (remove_min l x r); simpl in *; intros. intuition_in. - (* l = Node *) - inversion_clear H. - generalize (remove_min_avl ll lx lr lh H0). - rewrite e0; simpl; intros. - rewrite bal_in; auto. - rewrite e0 in IHp;generalize (IHp lh y H0). - intuition. - inversion_clear H7; intuition. + rewrite bal_in, In_node_iff, IHp, e0; simpl; intuition. Qed. Lemma remove_min_bst : forall l x r h, - bst (Node l x r h) -> avl (Node l x r h) -> bst (fst (remove_min l x r)). + bst (Node l x r h) -> bst (remove_min l x r)#1. Proof. - intros l x r; functional induction (remove_min l x r); subst;simpl in *; intros. + intros l x r; functional induction (remove_min l x r); simpl; intros. inv bst; auto. - inversion_clear H; inversion_clear H0. - rewrite_all e0;simpl in *. + inversion_clear H. + specialize IHp with (1:=H0); rewrite e0 in IHp; auto. apply bal_bst; auto. - firstorder. - intro; intros. - generalize (remove_min_in ll lx lr lh y H). - rewrite e0; simpl. - destruct 1. - apply H3; intuition. + intro y; specialize (H2 y). + rewrite remove_min_in, e0 in H2; simpl in H2; intuition. Qed. Lemma remove_min_gt_tree : forall l x r h, - bst (Node l x r h) -> avl (Node l x r h) -> - gt_tree (snd (remove_min l x r)) (fst (remove_min l x r)). + bst (Node l x r h) -> + gt_tree (remove_min l x r)#2 (remove_min l x r)#1. Proof. - intros l x r; functional induction (remove_min l x r); subst;simpl in *; intros. + intros l x r; functional induction (remove_min l x r); simpl; intros. inv bst; auto. - inversion_clear H; inversion_clear H0. - intro; intro. - generalize (IHp lh H1 H); clear H6 H7 IHp. - generalize (remove_min_avl ll lx lr lh H). - generalize (remove_min_in ll lx lr lh m H). - rewrite e0; simpl; intros. - rewrite (bal_in l' x r y H7 H5) in H0. - destruct H6. - firstorder. - apply MX.lt_eq with x; auto. - apply X.lt_trans with x; auto. + inversion_clear H. + specialize IHp with (1:=H0); rewrite e0 in IHp; simpl in IHp. + intro y; rewrite bal_in; intuition; + specialize (H2 m); rewrite remove_min_in, e0 in H2; simpl in H2; + [ apply MX.lt_eq with x | ]; eauto. Qed. +Hint Resolve remove_min_bst remove_min_gt_tree. -(** * Merging two trees - - [merge t1 t2] builds the union of [t1] and [t2] assuming all elements - of [t1] to be smaller than all elements of [t2], and - [|height t1 - height t2| <= 2]. -*) -Function merge (s1 s2 :t) : t:= match s1,s2 with - | Leaf, _ => s2 - | _, Leaf => s1 - | _, Node l2 x2 r2 h2 => - let (s2',m) := remove_min l2 x2 r2 in bal s1 m s2' -end. -Lemma merge_avl_1 : forall s1 s2, avl s1 -> avl s2 -> - -(2) <= height s1 - height s2 <= 2 -> - avl (merge s1 s2) /\ - 0<= height (merge s1 s2) - max (height s1) (height s2) <=1. -Proof. - intros s1 s2; functional induction (merge s1 s2); subst;simpl in *; intros. - split; auto; avl_nns; omega_max. - split; auto; avl_nns; simpl in *; omega_max. - destruct s1;try contradiction;clear y. - generalize (remove_min_avl_1 l2 x2 r2 h2 H0). - rewrite e1; simpl; destruct 1. - split. - apply bal_avl; auto. - simpl; omega_max. - omega_bal. -Qed. - -Lemma merge_avl : forall s1 s2, avl s1 -> avl s2 -> - -(2) <= height s1 - height s2 <= 2 -> avl (merge s1 s2). -Proof. - intros; generalize (merge_avl_1 s1 s2 H H0 H1); intuition. -Qed. +(** * Merging two trees *) -Lemma merge_in : forall s1 s2 y, bst s1 -> avl s1 -> bst s2 -> avl s2 -> - (In y (merge s1 s2) <-> In y s1 \/ In y s2). -Proof. - intros s1 s2; functional induction (merge s1 s2); subst; simpl in *; intros. +Lemma merge_in : forall s1 s2 y, + In y (merge s1 s2) <-> In y s1 \/ In y s2. +Proof. + intros s1 s2; functional induction (merge s1 s2); intros; + try factornode _x _x0 _x1 _x2 as s1. intuition_in. intuition_in. - destruct s1;try contradiction;clear y. - replace s2' with (fst (remove_min l2 x2 r2)); [|rewrite e1; auto]. - rewrite bal_in; auto. - generalize (remove_min_avl l2 x2 r2 h2); rewrite e1; simpl; auto. - generalize (remove_min_in l2 x2 r2 h2 y0); rewrite e1; simpl; intro. - rewrite H3 ; intuition. + rewrite bal_in, remove_min_in, e1; simpl; intuition. Qed. -Lemma merge_bst : forall s1 s2, bst s1 -> avl s1 -> bst s2 -> avl s2 -> +Lemma merge_bst : forall s1 s2, bst s1 -> bst s2 -> (forall y1 y2 : elt, In y1 s1 -> In y2 s2 -> X.lt y1 y2) -> - bst (merge s1 s2). + bst (merge s1 s2). Proof. - intros s1 s2; functional induction (merge s1 s2); subst;simpl in *; intros; auto. - destruct s1;try contradiction;clear y. + intros s1 s2; functional induction (merge s1 s2); intros; auto; + try factornode _x _x0 _x1 _x2 as s1. apply bal_bst; auto. - generalize (remove_min_bst l2 x2 r2 h2); rewrite e1; simpl in *; auto. - intro; intro. - apply H3; auto. - generalize (remove_min_in l2 x2 r2 h2 m); rewrite e1; simpl; intuition. - generalize (remove_min_gt_tree l2 x2 r2 h2); rewrite e1; simpl; auto. -Qed. + change s2' with ((s2',m)#1); rewrite <-e1; eauto. + intros y Hy. + apply H1; auto. + rewrite remove_min_in, e1; simpl; auto. + change (gt_tree (s2',m)#2 (s2',m)#1); rewrite <-e1; eauto. +Qed. +Hint Resolve merge_bst. -(** * Deletion *) -Function remove (x:elt)(s:tree) { struct s } : t := match s with - | Leaf => Leaf - | Node l y r h => - match X.compare x y with - | LT _ => bal (remove x l) y r - | EQ _ => merge l r - | GT _ => bal l y (remove x r) - end - end. -Lemma remove_avl_1 : forall s x, avl s -> - avl (remove x s) /\ 0 <= height s - height (remove x s) <= 1. -Proof. - intros s x; functional induction (remove x s); subst;simpl; intros. - intuition; omega_max. - (* LT *) - inv avl. - destruct (IHt H0). - split. - apply bal_avl; auto. - omega_max. - omega_bal. - (* EQ *) - inv avl. - generalize (merge_avl_1 l r H0 H1 H2). - intuition omega_max. - (* GT *) - inv avl. - destruct (IHt H1). - split. - apply bal_avl; auto. - omega_max. - omega_bal. -Qed. - -Lemma remove_avl : forall s x, avl s -> avl (remove x s). -Proof. - intros; generalize (remove_avl_1 s x H); intuition. -Qed. -Hint Resolve remove_avl. +(** * Deletion *) -Lemma remove_in : forall s x y, bst s -> avl s -> +Lemma remove_in : forall s x y, bst s -> (In y (remove x s) <-> ~ X.eq y x /\ In y s). Proof. - intros s x; functional induction (remove x s); subst;simpl; intros. + intros s x; functional induction (remove x s); intros; inv bst. intuition_in. - (* LT *) - inv avl; inv bst; clear e0. - rewrite bal_in; auto. - generalize (IHt y0 H0); intuition; [ order | order | intuition_in ]. - (* EQ *) - inv avl; inv bst; clear e0. - rewrite merge_in; intuition; [ order | order | intuition_in ]. - elim H9; eauto. - (* GT *) - inv avl; inv bst; clear e0. - rewrite bal_in; auto. - generalize (IHt y0 H5); intuition; [ order | order | intuition_in ]. + rewrite bal_in, IHt; clear e0 IHt; intuition; [order|order|intuition_in]. + rewrite merge_in; clear e0; intuition; [order|order|intuition_in]. + elim H4; eauto. + rewrite bal_in, IHt; clear e0 IHt; intuition; [order|order|intuition_in]. Qed. -Lemma remove_bst : forall s x, bst s -> avl s -> bst (remove x s). +Lemma remove_bst : forall s x, bst s -> bst (remove x s). Proof. - intros s x; functional induction (remove x s); simpl; intros. + intros s x; functional induction (remove x s); intros; inv bst. auto. (* LT *) - inv avl; inv bst. apply bal_bst; auto. - intro; intro. - rewrite (remove_in l x y0) in H; auto. - destruct H; eauto. + intro z; rewrite remove_in; auto; destruct 1; eauto. (* EQ *) - inv avl; inv bst. - apply merge_bst; eauto. + eauto. (* GT *) - inv avl; inv bst. apply bal_bst; auto. - intro; intro. - rewrite (remove_in r x y0) in H; auto. - destruct H; eauto. + intro z; rewrite remove_in; auto; destruct 1; eauto. Qed. +Hint Resolve remove_bst. - (** * Minimum element *) -Function min_elt (s:t) : option elt := match s with - | Leaf => None - | Node Leaf y _ _ => Some y - | Node l _ _ _ => min_elt l -end. +(** * Minimum element *) Lemma min_elt_1 : forall s x, min_elt s = Some x -> In x s. Proof. - intro s; functional induction (min_elt s); subst; simpl. - inversion 1. - inversion 1; auto. - intros. - destruct l; auto. + intro s; functional induction (min_elt s); auto; inversion 1; auto. Qed. -Lemma min_elt_2 : forall s x y, bst s -> +Lemma min_elt_2 : forall s x y, bst s -> min_elt s = Some x -> In y s -> ~ X.lt y x. Proof. - intro s; functional induction (min_elt s); subst;simpl. + intro s; functional induction (min_elt s); + try rename _x1 into l1, _x2 into x1, _x3 into r1, _x4 into h1. inversion_clear 2. inversion_clear 1. inversion 1; subst. inversion_clear 1; auto. inversion_clear H5. - destruct l;try contradiction. inversion_clear 1. simpl. destruct l1. inversion 1; subst. - assert (X.lt x _x) by (apply H2; auto). + assert (X.lt x y) by (apply H2; auto). inversion_clear 1; auto; order. - assert (X.lt t _x) by auto. + assert (X.lt x1 y) by auto. inversion_clear 2; auto; - (assert (~ X.lt t x) by auto); order. + (assert (~ X.lt x1 x) by auto); order. Qed. Lemma min_elt_3 : forall s, min_elt s = None -> Empty s. Proof. - intro s; functional induction (min_elt s); subst;simpl. - red; auto. + intro s; functional induction (min_elt s). + red; red; inversion 2. inversion 1. - destruct l;try contradiction. - clear y;intro H0. - destruct (IHo H0 t); auto. + intro H0. + destruct (IHo H0 _x2); auto. Qed. -(** * Maximum element *) -Function max_elt (s:t) : option elt := match s with - | Leaf => None - | Node _ y Leaf _ => Some y - | Node _ _ r _ => max_elt r -end. +(** * Maximum element *) Lemma max_elt_1 : forall s x, max_elt s = Some x -> In x s. Proof. - intro s; functional induction (max_elt s); subst;simpl. - inversion 1. - inversion 1; auto. - destruct r;try contradiction; auto. + intro s; functional induction (max_elt s); auto; inversion 1; auto. Qed. Lemma max_elt_2 : forall s x y, bst s -> max_elt s = Some x -> In y s -> ~ X.lt x y. Proof. - intro s; functional induction (max_elt s); subst;simpl. + intro s; functional induction (max_elt s); + try rename _x1 into l1, _x2 into x1, _x3 into r1, _x4 into h1. inversion_clear 2. inversion_clear 1. inversion 1; subst. inversion_clear 1; auto. inversion_clear H5. - destruct r;try contradiction. inversion_clear 1. -(* inversion 1; subst. *) -(* assert (X.lt y x) by (apply H4; auto). *) -(* inversion_clear 1; auto; order. *) - assert (X.lt _x0 t) by auto. + assert (X.lt y x1) by auto. inversion_clear 2; auto; - (assert (~ X.lt x t) by auto); order. + (assert (~ X.lt x x1) by auto); order. Qed. Lemma max_elt_3 : forall s, max_elt s = None -> Empty s. Proof. - intro s; functional induction (max_elt s); subst;simpl. + intro s; functional induction (max_elt s). red; auto. inversion 1. - destruct r;try contradiction. - intros H0; destruct (IHo H0 t); auto. + intros H0; destruct (IHo H0 _x2); auto. Qed. -(** * Any element *) -Definition choose := min_elt. + +(** * Any element *) Lemma choose_1 : forall s x, choose s = Some x -> In x s. Proof. @@ -1021,353 +1023,215 @@ Proof. exact min_elt_3. Qed. -(** * Concatenation +Lemma choose_3 : forall s s', bst s -> bst s' -> + forall x x', choose s = Some x -> choose s' = Some x' -> + Equal s s' -> X.eq x x'. +Proof. + unfold choose, Equal; intros s s' Hb Hb' x x' Hx Hx' H. + assert (~X.lt x x'). + apply min_elt_2 with s'; auto. + rewrite <-H; auto using min_elt_1. + assert (~X.lt x' x). + apply min_elt_2 with s; auto. + rewrite H; auto using min_elt_1. + destruct (X.compare x x'); intuition. +Qed. - Same as [merge] but does not assume anything about heights. -*) -Function concat (s1 s2 : t) : t := - match s1, s2 with - | Leaf, _ => s2 - | _, Leaf => s1 - | _, Node l2 x2 r2 h2 => - let (s2',m) := remove_min l2 x2 r2 in - join s1 m s2' - end. +(** * Concatenation *) -Lemma concat_avl : forall s1 s2, avl s1 -> avl s2 -> avl (concat s1 s2). +Lemma concat_in : forall s1 s2 y, + In y (concat s1 s2) <-> In y s1 \/ In y s2. Proof. - intros s1 s2; functional induction (concat s1 s2); subst;auto. - destruct s1;try contradiction;clear y. - intros; apply join_avl; auto. - generalize (remove_min_avl l2 x2 r2 h2 H0); rewrite e1; simpl; auto. + intros s1 s2; functional induction (concat s1 s2); intros; + try factornode _x _x0 _x1 _x2 as s1. + intuition_in. + intuition_in. + rewrite join_in, remove_min_in, e1; simpl; intuition. Qed. -Lemma concat_bst : forall s1 s2, bst s1 -> avl s1 -> bst s2 -> avl s2 -> +Lemma concat_bst : forall s1 s2, bst s1 -> bst s2 -> (forall y1 y2 : elt, In y1 s1 -> In y2 s2 -> X.lt y1 y2) -> bst (concat s1 s2). Proof. - intros s1 s2; functional induction (concat s1 s2); subst ;auto. - destruct s1;try contradiction;clear y. - intros; apply join_bst; auto. - generalize (remove_min_bst l2 x2 r2 h2 H1 H2); rewrite e1; simpl; auto. - generalize (remove_min_avl l2 x2 r2 h2 H2); rewrite e1; simpl; auto. - generalize (remove_min_in l2 x2 r2 h2 m H2); rewrite e1; simpl; auto. - destruct 1; intuition. - generalize (remove_min_gt_tree l2 x2 r2 h2 H1 H2); rewrite e1; simpl; auto. -Qed. - -Lemma concat_in : forall s1 s2 y, bst s1 -> avl s1 -> bst s2 -> avl s2 -> - (forall y1 y2 : elt, In y1 s1 -> In y2 s2 -> X.lt y1 y2) -> - (In y (concat s1 s2) <-> In y s1 \/ In y s2). -Proof. - intros s1 s2; functional induction (concat s1 s2);subst;simpl. - intuition. - inversion_clear H5. - destruct s1;try contradiction;clear y;intuition. - inversion_clear H5. - destruct s1;try contradiction;clear y; intros. - rewrite (join_in (Node s1_1 t s1_2 i) m s2' y H0). - generalize (remove_min_avl l2 x2 r2 h2 H2); rewrite e1; simpl; auto. - generalize (remove_min_in l2 x2 r2 h2 y H2); rewrite e1; simpl. - intro EQ; rewrite EQ; intuition. + intros s1 s2; functional induction (concat s1 s2); intros; auto; + try factornode _x _x0 _x1 _x2 as s1. + apply join_bst; auto. + change (bst (s2',m)#1); rewrite <-e1; eauto. + intros y Hy. + apply H1; auto. + rewrite remove_min_in, e1; simpl; auto. + change (gt_tree (s2',m)#2 (s2',m)#1); rewrite <-e1; eauto. Qed. +Hint Resolve concat_bst. -(** * Splitting - - [split x s] returns a triple [(l, present, r)] where - - [l] is the set of elements of [s] that are [< x] - - [r] is the set of elements of [s] that are [> x] - - [present] is [true] if and only if [s] contains [x]. -*) - -Function split (x:elt)(s:t) {struct s} : t * (bool * t) := match s with - | Leaf => (Leaf, (false, Leaf)) - | Node l y r h => - match X.compare x y with - | LT _ => match split x l with - | (ll,(pres,rl)) => (ll, (pres, join rl y r)) - end - | EQ _ => (l, (true, r)) - | GT _ => match split x r with - | (rl,(pres,rr)) => (join l y rl, (pres, rr)) - end - end - end. -Lemma split_avl : forall s x, avl s -> - avl (fst (split x s)) /\ avl (snd (snd (split x s))). -Proof. - intros s x; functional induction (split x s);subst;simpl in *. - auto. - rewrite e1 in IHp;simpl in IHp;inversion_clear 1; intuition. - simpl; inversion_clear 1; auto. - rewrite e1 in IHp;simpl in IHp;inversion_clear 1; intuition. -Qed. +(** * Splitting *) -Lemma split_in_1 : forall s x y, bst s -> avl s -> - (In y (fst (split x s)) <-> In y s /\ X.lt y x). -Proof. - intros s x; functional induction (split x s);subst;simpl in *. - intuition; try inversion_clear H1. - (* LT *) - rewrite e1 in IHp;simpl in *; inversion_clear 1; inversion_clear 1; clear H7 H6. - rewrite (IHp y0 H0 H4); clear IHp e0. - intuition. - inversion_clear H6; auto; order. - (* EQ *) - simpl in *; inversion_clear 1; inversion_clear 1; clear H6 H5 e0. - intuition. - order. +Lemma split_in_1 : forall s x y, bst s -> + (In y (split x s)#l <-> In y s /\ X.lt y x). +Proof. + intros s x; functional induction (split x s); simpl; intros; + inv bst; try clear e0. + intuition_in. + rewrite e1 in IHt; simpl in IHt; rewrite IHt; intuition_in; order. intuition_in; order. - (* GT *) - rewrite e1 in IHp;simpl in *; inversion_clear 1; inversion_clear 1; clear H7 H6. - rewrite join_in; auto. - generalize (split_avl r x H5); rewrite e1; simpl; intuition. - rewrite (IHp y0 H1 H5); clear e1. - intuition; [ eauto | eauto | intuition_in ]. + rewrite join_in. + rewrite e1 in IHt; simpl in IHt; rewrite IHt; intuition_in; order. Qed. -Lemma split_in_2 : forall s x y, bst s -> avl s -> - (In y (snd (snd (split x s))) <-> In y s /\ X.lt x y). +Lemma split_in_2 : forall s x y, bst s -> + (In y (split x s)#r <-> In y s /\ X.lt x y). Proof. - intros s x; functional induction (split x s);subst;simpl in *. - intuition; try inversion_clear H1. - (* LT *) - rewrite e1 in IHp; simpl in *; inversion_clear 1; inversion_clear 1; clear H7 H6. - rewrite join_in; auto. - generalize (split_avl l x H4); rewrite e1; simpl; intuition. - rewrite (IHp y0 H0 H4); clear IHp e0. - intuition; [ order | order | intuition_in ]. - (* EQ *) - simpl in *; inversion_clear 1; inversion_clear 1; clear H6 H5 e0. - intuition; [ order | intuition_in; order ]. - (* GT *) - rewrite e1 in IHp; simpl in *; inversion_clear 1; inversion_clear 1; clear H7 H6. - rewrite (IHp y0 H1 H5); clear IHp e0. - intuition; intuition_in; order. + intros s x; functional induction (split x s); subst; simpl; intros; + inv bst; try clear e0. + intuition_in. + rewrite join_in. + rewrite e1 in IHt; simpl in IHt; rewrite IHt; intuition_in; order. + intuition_in; order. + rewrite e1 in IHt; simpl in IHt; rewrite IHt; intuition_in; order. Qed. -Lemma split_in_3 : forall s x, bst s -> avl s -> - (fst (snd (split x s)) = true <-> In x s). +Lemma split_in_3 : forall s x, bst s -> + ((split x s)#b = true <-> In x s). Proof. - intros s x; functional induction (split x s);subst;simpl in *. - intuition; try inversion_clear H1. - (* LT *) - rewrite e1 in IHp; simpl in *; inversion_clear 1; inversion_clear 1; clear H7 H6. - rewrite IHp; auto. - intuition_in; absurd (X.lt x y); eauto. - (* EQ *) - simpl in *; inversion_clear 1; inversion_clear 1; intuition. - (* GT *) - rewrite e1 in IHp; simpl in *; inversion_clear 1; inversion_clear 1; clear H7 H6. - rewrite IHp; auto. - intuition_in; absurd (X.lt y x); eauto. + intros s x; functional induction (split x s); subst; simpl; intros; + inv bst; try clear e0. + intuition_in; try discriminate. + rewrite e1 in IHt; simpl in IHt; rewrite IHt; intuition_in; order. + intuition. + rewrite e1 in IHt; simpl in IHt; rewrite IHt; intuition_in; order. Qed. -Lemma split_bst : forall s x, bst s -> avl s -> - bst (fst (split x s)) /\ bst (snd (snd (split x s))). +Lemma split_bst : forall s x, bst s -> + bst (split x s)#l /\ bst (split x s)#r. Proof. - intros s x; functional induction (split x s);subst;simpl in *. - intuition. - (* LT *) - rewrite e1 in IHp; simpl in *; inversion_clear 1; inversion_clear 1. - intuition. - apply join_bst; auto. - generalize (split_avl l x H4); rewrite e1; simpl; intuition. - intro; intro. - generalize (split_in_2 l x y0 H0 H4); rewrite e1; simpl; intuition. - (* EQ *) - simpl in *; inversion_clear 1; inversion_clear 1; intuition. - (* GT *) - rewrite e1 in IHp; simpl in *; inversion_clear 1; inversion_clear 1. - intuition. - apply join_bst; auto. - generalize (split_avl r x H5); rewrite e1; simpl; intuition. - intro; intro. - generalize (split_in_1 r x y0 H1 H5); rewrite e1; simpl; intuition. + intros s x; functional induction (split x s); subst; simpl; intros; + inv bst; try clear e0; try rewrite e1 in *; simpl in *; intuition; + apply join_bst; auto. + intros y0. + generalize (split_in_2 x y0 H0); rewrite e1; simpl; intuition. + intros y0. + generalize (split_in_1 x y0 H1); rewrite e1; simpl; intuition. Qed. -(** * Intersection *) -Fixpoint inter (s1 s2 : t) {struct s1} : t := match s1, s2 with - | Leaf,_ => Leaf - | _,Leaf => Leaf - | Node l1 x1 r1 h1, _ => - match split x1 s2 with - | (l2',(true,r2')) => join (inter l1 l2') x1 (inter r1 r2') - | (l2',(false,r2')) => concat (inter l1 l2') (inter r1 r2') - end - end. -Lemma inter_avl : forall s1 s2, avl s1 -> avl s2 -> avl (inter s1 s2). -Proof. - (* intros s1 s2; functional induction inter s1 s2; auto. BOF BOF *) - induction s1 as [ | l1 Hl1 x1 r1 Hr1 h1]; simpl; auto. - destruct s2 as [ | l2 x2 r2 h2]; intros; auto. - generalize H0; inv avl. - set (r:=Node l2 x2 r2 h2) in *; clearbody r; intros. - destruct (split_avl r x1 H8). - destruct (split x1 r) as [l2' (b,r2')]; simpl in *. - destruct b; [ apply join_avl | apply concat_avl ]; auto. -Qed. +(** * Intersection *) -Lemma inter_bst_in : forall s1 s2, bst s1 -> avl s1 -> bst s2 -> avl s2 -> +Lemma inter_bst_in : forall s1 s2, bst s1 -> bst s2 -> bst (inter s1 s2) /\ (forall y, In y (inter s1 s2) <-> In y s1 /\ In y s2). -Proof. - induction s1 as [ | l1 Hl1 x1 r1 Hr1 h1]; simpl; auto. - intuition; inversion_clear H3. - destruct s2 as [ | l2 x2 r2 h2]; intros. - simpl; intuition; inversion_clear H3. - generalize H1 H2; inv avl; inv bst. - set (r:=Node l2 x2 r2 h2) in *; clearbody r; intros. - destruct (split_avl r x1 H17). - destruct (split_bst r x1 H16 H17). - split. - (* bst *) - destruct (split x1 r) as [l2' (b,r2')]; simpl in *. - destruct (Hl1 l2'); auto. - destruct (Hr1 r2'); auto. - destruct b. +Proof. + intros s1 s2; functional induction inter s1 s2; intros B1 B2; + [intuition_in|intuition_in | | ]; + factornode _x0 _x1 _x2 _x3 as s2; + generalize (split_bst x1 B2); + rewrite e1; simpl; destruct 1; inv bst; + destruct IHt as (IHb1,IHi1); auto; + destruct IHt0 as (IHb2,IHi2); auto; + generalize (@split_in_1 s2 x1)(@split_in_2 s2 x1) + (split_in_3 x1 B2)(split_bst x1 B2); + rewrite e1; simpl; split; intros. (* bst join *) - apply join_bst; try apply inter_avl; firstorder. - (* bst concat *) - apply concat_bst; try apply inter_avl; auto. - intros; generalize (H22 y1) (H24 y2); intuition eauto. - (* in *) - intros. - destruct (split_in_1 r x1 y H16 H17). - destruct (split_in_2 r x1 y H16 H17). - destruct (split_in_3 r x1 H16 H17). - destruct (split x1 r) as [l2' (b,r2')]; simpl in *. - destruct (Hl1 l2'); auto. - destruct (Hr1 r2'); auto. - destruct b. - (* in join *) - rewrite join_in; try apply inter_avl; auto. - rewrite H30. - rewrite H28. - intuition_in. + apply join_bst; auto; intro y; [rewrite IHi1|rewrite IHi2]; intuition. (* In join *) + rewrite join_in, IHi1, IHi2, H5, H6; intuition_in. apply In_1 with x1; auto. - (* in concat *) - rewrite concat_in; try apply inter_avl; auto. - intros. - intros; generalize (H28 y1) (H30 y2); intuition eauto. - rewrite H30. - rewrite H28. + (* bst concat *) + apply concat_bst; auto; intros y1 y2; rewrite IHi1, IHi2; intuition; order. + (* In concat *) + rewrite concat_in, IHi1, IHi2, H5, H6; auto. + assert (~In x1 s2) by (rewrite <- H7; auto). intuition_in. - generalize (H26 (In_1 _ _ _ H22 H35)); intro; discriminate. + elim H9. + apply In_1 with y; auto. Qed. -Lemma inter_bst : forall s1 s2, bst s1 -> avl s1 -> bst s2 -> avl s2 -> - bst (inter s1 s2). +Lemma inter_in : forall s1 s2 y, bst s1 -> bst s2 -> + (In y (inter s1 s2) <-> In y s1 /\ In y s2). Proof. - intros; generalize (inter_bst_in s1 s2); intuition. + intros s1 s2 y B1 B2; destruct (inter_bst_in B1 B2); auto. Qed. -Lemma inter_in : forall s1 s2 y, bst s1 -> avl s1 -> bst s2 -> avl s2 -> - (In y (inter s1 s2) <-> In y s1 /\ In y s2). +Lemma inter_bst : forall s1 s2, bst s1 -> bst s2 -> bst (inter s1 s2). Proof. - intros; generalize (inter_bst_in s1 s2); firstorder. + intros s1 s2 B1 B2; destruct (inter_bst_in B1 B2); auto. Qed. -(** * Difference *) - -Fixpoint diff (s1 s2 : t) { struct s1 } : t := match s1, s2 with - | Leaf, _ => Leaf - | _, Leaf => s1 - | Node l1 x1 r1 h1, _ => - match split x1 s2 with - | (l2',(true,r2')) => concat (diff l1 l2') (diff r1 r2') - | (l2',(false,r2')) => join (diff l1 l2') x1 (diff r1 r2') - end -end. -Lemma diff_avl : forall s1 s2, avl s1 -> avl s2 -> avl (diff s1 s2). -Proof. - (* intros s1 s2; functional induction diff s1 s2; auto. BOF BOF *) - induction s1 as [ | l1 Hl1 x1 r1 Hr1 h1]; simpl; auto. - destruct s2 as [ | l2 x2 r2 h2]; intros; auto. - generalize H0; inv avl. - set (r:=Node l2 x2 r2 h2) in *; clearbody r; intros. - destruct (split_avl r x1 H8). - destruct (split x1 r) as [l2' (b,r2')]; simpl in *. - destruct b; [ apply concat_avl | apply join_avl ]; auto. -Qed. +(** * Difference *) -Lemma diff_bst_in : forall s1 s2, bst s1 -> avl s1 -> bst s2 -> avl s2 -> +Lemma diff_bst_in : forall s1 s2, bst s1 -> bst s2 -> bst (diff s1 s2) /\ (forall y, In y (diff s1 s2) <-> In y s1 /\ ~In y s2). -Proof. - induction s1 as [ | l1 Hl1 x1 r1 Hr1 h1]; simpl; auto. - intuition; inversion_clear H3. - destruct s2 as [ | l2 x2 r2 h2]; intros; auto. - intuition; inversion_clear H4. - generalize H1 H2; inv avl; inv bst. - set (r:=Node l2 x2 r2 h2) in *; clearbody r; intros. - destruct (split_avl r x1 H17). - destruct (split_bst r x1 H16 H17). - split. - (* bst *) - destruct (split x1 r) as [l2' (b,r2')]; simpl in *. - destruct (Hl1 l2'); auto. - destruct (Hr1 r2'); auto. - destruct b. +Proof. + intros s1 s2; functional induction diff s1 s2; intros B1 B2; + [intuition_in|intuition_in | | ]; + factornode _x0 _x1 _x2 _x3 as s2; + generalize (split_bst x1 B2); + rewrite e1; simpl; destruct 1; + inv avl; inv bst; + destruct IHt as (IHb1,IHi1); auto; + destruct IHt0 as (IHb2,IHi2); auto; + generalize (@split_in_1 s2 x1)(@split_in_2 s2 x1) + (split_in_3 x1 B2)(split_bst x1 B2); + rewrite e1; simpl; split; intros. (* bst concat *) - apply concat_bst; try apply diff_avl; auto. - intros; generalize (H22 y1) (H24 y2); intuition eauto. + apply concat_bst; auto; intros y1 y2; rewrite IHi1, IHi2; intuition; order. + (* In concat *) + rewrite concat_in, IHi1, IHi2, H5, H6; intuition_in. + elim H13. + apply In_1 with x1; auto. (* bst join *) - apply join_bst; try apply diff_avl; firstorder. - (* in *) - intros. - destruct (split_in_1 r x1 y H16 H17). - destruct (split_in_2 r x1 y H16 H17). - destruct (split_in_3 r x1 H16 H17). - destruct (split x1 r) as [l2' (b,r2')]; simpl in *. - destruct (Hl1 l2'); auto. - destruct (Hr1 r2'); auto. - destruct b. - (* in concat *) - rewrite concat_in; try apply diff_avl; auto. - intros. - intros; generalize (H28 y1) (H30 y2); intuition eauto. - rewrite H30. - rewrite H28. - intuition_in. - elim H35; apply In_1 with x1; auto. - (* in join *) - rewrite join_in; try apply diff_avl; auto. - rewrite H30. - rewrite H28. + apply join_bst; auto; intro y; [rewrite IHi1|rewrite IHi2]; intuition. (* In join *) + rewrite join_in, IHi1, IHi2, H5, H6; auto. + assert (~In x1 s2) by (rewrite <- H7; auto). intuition_in. - generalize (H26 (In_1 _ _ _ H34 H24)); intro; discriminate. + elim H9. + apply In_1 with y; auto. Qed. -Lemma diff_bst : forall s1 s2, bst s1 -> avl s1 -> bst s2 -> avl s2 -> - bst (diff s1 s2). +Lemma diff_in : forall s1 s2 y, bst s1 -> bst s2 -> + (In y (diff s1 s2) <-> In y s1 /\ ~In y s2). Proof. - intros; generalize (diff_bst_in s1 s2); intuition. + intros s1 s2 y B1 B2; destruct (diff_bst_in B1 B2); auto. Qed. -Lemma diff_in : forall s1 s2 y, bst s1 -> avl s1 -> bst s2 -> avl s2 -> - (In y (diff s1 s2) <-> In y s1 /\ ~In y s2). +Lemma diff_bst : forall s1 s2, bst s1 -> bst s2 -> bst (diff s1 s2). Proof. - intros; generalize (diff_bst_in s1 s2); firstorder. + intros s1 s2 B1 B2; destruct (diff_bst_in B1 B2); auto. Qed. -(** * Elements *) -(** [elements_tree_aux acc t] catenates the elements of [t] in infix - order to the list [acc] *) +(** * Union *) -Fixpoint elements_aux (acc : list X.t) (t : tree) {struct t} : list X.t := - match t with - | Leaf => acc - | Node l x r _ => elements_aux (x :: elements_aux acc r) l - end. +Lemma union_in : forall s1 s2 y, bst s1 -> bst s2 -> + (In y (union s1 s2) <-> In y s1 \/ In y s2). +Proof. + intros s1 s2; functional induction union s1 s2; intros y B1 B2. + intuition_in. + intuition_in. + factornode _x0 _x1 _x2 _x3 as s2. + generalize (split_in_1 x1 y B2)(split_in_2 x1 y B2)(split_bst x1 B2). + rewrite e1; simpl. + destruct 3; inv bst. + rewrite join_in, IHt, IHt0, H, H0; auto. + case (X.compare y x1); intuition_in. +Qed. -(** then [elements] is an instanciation with an empty [acc] *) +Lemma union_bst : forall s1 s2, bst s1 -> bst s2 -> + bst (union s1 s2). +Proof. + intros s1 s2; functional induction union s1 s2; intros B1 B2; auto. + factornode _x0 _x1 _x2 _x3 as s2. + generalize (@split_in_1 s2 x1)(@split_in_2 s2 x1)(split_bst x1 B2). + rewrite e1; simpl; destruct 3. + inv bst. + apply join_bst; auto. + intro y; rewrite union_in, H; intuition_in. + intro y; rewrite union_in, H0; intuition_in. +Qed. -Definition elements := elements_aux nil. + +(** * Elements *) Lemma elements_aux_in : forall s acc x, InA X.eq x (elements_aux acc s) <-> In x s \/ InA X.eq x acc. @@ -1411,246 +1275,190 @@ Proof. Qed. Hint Resolve elements_sort. -(** * Filter *) - -Section F. -Variable f : elt -> bool. +Lemma elements_nodup : forall s : tree, bst s -> NoDupA X.eq (elements s). +Proof. + auto. +Qed. -Fixpoint filter_acc (acc:t)(s:t) { struct s } : t := match s with - | Leaf => acc - | Node l x r h => - filter_acc (filter_acc (if f x then add x acc else acc) l) r - end. +Lemma elements_aux_cardinal : + forall s acc, (length acc + cardinal s)%nat = length (elements_aux acc s). +Proof. + simple induction s; simpl in |- *; intuition. + rewrite <- H. + simpl in |- *. + rewrite <- H0; omega. +Qed. -Definition filter := filter_acc Leaf. +Lemma elements_cardinal : forall s : tree, cardinal s = length (elements s). +Proof. + exact (fun s => elements_aux_cardinal s nil). +Qed. -Lemma filter_acc_avl : forall s acc, avl s -> avl acc -> - avl (filter_acc acc s). +Lemma elements_app : + forall s acc, elements_aux acc s = elements s ++ acc. Proof. - induction s; simpl; auto. - intros. - inv avl. - apply IHs2; auto. - apply IHs1; auto. - destruct (f t); auto. -Qed. -Hint Resolve filter_acc_avl. + induction s; simpl; intros; auto. + rewrite IHs1, IHs2. + unfold elements; simpl. + rewrite 2 IHs1, IHs2, <- !app_nil_end, !app_ass; auto. +Qed. -Lemma filter_acc_bst : forall s acc, bst s -> avl s -> bst acc -> avl acc -> - bst (filter_acc acc s). +Lemma elements_node : + forall l x r h acc, + elements l ++ x :: elements r ++ acc = + elements (Node l x r h) ++ acc. Proof. - induction s; simpl; auto. - intros. - inv avl; inv bst. - destruct (f t); auto. - apply IHs2; auto. - apply IHs1; auto. - apply add_bst; auto. -Qed. + unfold elements; simpl; intros; auto. + rewrite !elements_app, <- !app_nil_end, !app_ass; auto. +Qed. + + +(** * Filter *) + +Section F. +Variable f : elt -> bool. -Lemma filter_acc_in : forall s acc, avl s -> avl acc -> +Lemma filter_acc_in : forall s acc, compat_bool X.eq f -> forall x : elt, - In x (filter_acc acc s) <-> In x acc \/ In x s /\ f x = true. + In x (filter_acc f acc s) <-> In x acc \/ In x s /\ f x = true. Proof. induction s; simpl; intros. intuition_in. - inv bst; inv avl. - rewrite IHs2; auto. - destruct (f t); auto. - rewrite IHs1; auto. - destruct (f t); auto. + rewrite IHs2, IHs1 by (destruct (f t); auto). case_eq (f t); intros. rewrite (add_in); auto. intuition_in. - rewrite (H1 _ _ H8). + rewrite (H _ _ H2). intuition. intuition_in. - rewrite (H1 _ _ H8) in H9. - rewrite H in H9; discriminate. -Qed. - -Lemma filter_avl : forall s, avl s -> avl (filter s). -Proof. - unfold filter; intros; apply filter_acc_avl; auto. + rewrite (H _ _ H2) in H3. + rewrite H0 in H3; discriminate. Qed. -Lemma filter_bst : forall s, bst s -> avl s -> bst (filter s). +Lemma filter_acc_bst : forall s acc, bst s -> bst acc -> + bst (filter_acc f acc s). Proof. - unfold filter; intros; apply filter_acc_bst; auto. + induction s; simpl; auto. + intros. + inv bst. + destruct (f t); auto. Qed. -Lemma filter_in : forall s, avl s -> +Lemma filter_in : forall s, compat_bool X.eq f -> forall x : elt, - In x (filter s) <-> In x s /\ f x = true. + In x (filter f s) <-> In x s /\ f x = true. Proof. unfold filter; intros; rewrite filter_acc_in; intuition_in. -Qed. - -(** * Partition *) - -Fixpoint partition_acc (acc : t*t)(s : t) { struct s } : t*t := - match s with - | Leaf => acc - | Node l x r _ => - let (acct,accf) := acc in - partition_acc - (partition_acc - (if f x then (add x acct, accf) else (acct, add x accf)) l) r - end. - -Definition partition := partition_acc (Leaf,Leaf). +Qed. -Lemma partition_acc_avl_1 : forall s acc, avl s -> - avl (fst acc) -> avl (fst (partition_acc acc s)). +Lemma filter_bst : forall s, bst s -> bst (filter f s). Proof. - induction s; simpl; auto. - destruct acc as [acct accf]; simpl in *. - intros. - inv avl. - apply IHs2; auto. - apply IHs1; auto. - destruct (f t); simpl; auto. -Qed. + unfold filter; intros; apply filter_acc_bst; auto. +Qed. -Lemma partition_acc_avl_2 : forall s acc, avl s -> - avl (snd acc) -> avl (snd (partition_acc acc s)). -Proof. - induction s; simpl; auto. - destruct acc as [acct accf]; simpl in *. - intros. - inv avl. - apply IHs2; auto. - apply IHs1; auto. - destruct (f t); simpl; auto. -Qed. -Hint Resolve partition_acc_avl_1 partition_acc_avl_2. -Lemma partition_acc_bst_1 : forall s acc, bst s -> avl s -> - bst (fst acc) -> avl (fst acc) -> - bst (fst (partition_acc acc s)). -Proof. - induction s; simpl; auto. - destruct acc as [acct accf]; simpl in *. - intros. - inv avl; inv bst. - destruct (f t); auto. - apply IHs2; simpl; auto. - apply IHs1; simpl; auto. - apply add_bst; auto. - apply partition_acc_avl_1; simpl; auto. -Qed. -Lemma partition_acc_bst_2 : forall s acc, bst s -> avl s -> - bst (snd acc) -> avl (snd acc) -> - bst (snd (partition_acc acc s)). -Proof. - induction s; simpl; auto. - destruct acc as [acct accf]; simpl in *. - intros. - inv avl; inv bst. - destruct (f t); auto. - apply IHs2; simpl; auto. - apply IHs1; simpl; auto. - apply add_bst; auto. - apply partition_acc_avl_2; simpl; auto. -Qed. +(** * Partition *) -Lemma partition_acc_in_1 : forall s acc, avl s -> avl (fst acc) -> +Lemma partition_acc_in_1 : forall s acc, compat_bool X.eq f -> forall x : elt, - In x (fst (partition_acc acc s)) <-> - In x (fst acc) \/ In x s /\ f x = true. + In x (partition_acc f acc s)#1 <-> + In x acc#1 \/ In x s /\ f x = true. Proof. induction s; simpl; intros. intuition_in. destruct acc as [acct accf]; simpl in *. - inv bst; inv avl. - rewrite IHs2; auto. - destruct (f t); auto. - apply partition_acc_avl_1; simpl; auto. - rewrite IHs1; auto. - destruct (f t); simpl; auto. + rewrite IHs2 by + (destruct (f t); auto; apply partition_acc_avl_1; simpl; auto). + rewrite IHs1 by (destruct (f t); simpl; auto). case_eq (f t); simpl; intros. rewrite (add_in); auto. intuition_in. - rewrite (H1 _ _ H8). + rewrite (H _ _ H2). intuition. intuition_in. - rewrite (H1 _ _ H8) in H9. - rewrite H in H9; discriminate. -Qed. + rewrite (H _ _ H2) in H3. + rewrite H0 in H3; discriminate. +Qed. -Lemma partition_acc_in_2 : forall s acc, avl s -> avl (snd acc) -> +Lemma partition_acc_in_2 : forall s acc, compat_bool X.eq f -> forall x : elt, - In x (snd (partition_acc acc s)) <-> - In x (snd acc) \/ In x s /\ f x = false. + In x (partition_acc f acc s)#2 <-> + In x acc#2 \/ In x s /\ f x = false. Proof. induction s; simpl; intros. intuition_in. destruct acc as [acct accf]; simpl in *. - inv bst; inv avl. - rewrite IHs2; auto. - destruct (f t); auto. - apply partition_acc_avl_2; simpl; auto. - rewrite IHs1; auto. - destruct (f t); simpl; auto. + rewrite IHs2 by + (destruct (f t); auto; apply partition_acc_avl_2; simpl; auto). + rewrite IHs1 by (destruct (f t); simpl; auto). case_eq (f t); simpl; intros. intuition. intuition_in. - rewrite (H1 _ _ H8) in H9. - rewrite H in H9; discriminate. + rewrite (H _ _ H2) in H3. + rewrite H0 in H3; discriminate. rewrite (add_in); auto. intuition_in. - rewrite (H1 _ _ H8). + rewrite (H _ _ H2). intuition. -Qed. - -Lemma partition_avl_1 : forall s, avl s -> avl (fst (partition s)). -Proof. - unfold partition; intros; apply partition_acc_avl_1; auto. -Qed. - -Lemma partition_avl_2 : forall s, avl s -> avl (snd (partition s)). -Proof. - unfold partition; intros; apply partition_acc_avl_2; auto. -Qed. - -Lemma partition_bst_1 : forall s, bst s -> avl s -> - bst (fst (partition s)). -Proof. - unfold partition; intros; apply partition_acc_bst_1; auto. -Qed. - -Lemma partition_bst_2 : forall s, bst s -> avl s -> - bst (snd (partition s)). -Proof. - unfold partition; intros; apply partition_acc_bst_2; auto. Qed. -Lemma partition_in_1 : forall s, avl s -> +Lemma partition_in_1 : forall s, compat_bool X.eq f -> forall x : elt, - In x (fst (partition s)) <-> In x s /\ f x = true. + In x (partition f s)#1 <-> In x s /\ f x = true. Proof. unfold partition; intros; rewrite partition_acc_in_1; simpl in *; intuition_in. Qed. -Lemma partition_in_2 : forall s, avl s -> +Lemma partition_in_2 : forall s, compat_bool X.eq f -> forall x : elt, - In x (snd (partition s)) <-> In x s /\ f x = false. + In x (partition f s)#2 <-> In x s /\ f x = false. Proof. unfold partition; intros; rewrite partition_acc_in_2; simpl in *; intuition_in. Qed. -(** [for_all] and [exists] *) +Lemma partition_acc_bst_1 : forall s acc, bst s -> bst acc#1 -> + bst (partition_acc f acc s)#1. +Proof. + induction s; simpl; auto. + destruct acc as [acct accf]; simpl in *. + intros. + inv bst. + destruct (f t); auto. + apply IHs2; simpl; auto. + apply IHs1; simpl; auto. +Qed. + +Lemma partition_acc_bst_2 : forall s acc, bst s -> bst acc#2 -> + bst (partition_acc f acc s)#2. +Proof. + induction s; simpl; auto. + destruct acc as [acct accf]; simpl in *. + intros. + inv bst. + destruct (f t); auto. + apply IHs2; simpl; auto. + apply IHs1; simpl; auto. +Qed. + +Lemma partition_bst_1 : forall s, bst s -> bst (partition f s)#1. +Proof. + unfold partition; intros; apply partition_acc_bst_1; auto. +Qed. + +Lemma partition_bst_2 : forall s, bst s -> bst (partition f s)#2. +Proof. + unfold partition; intros; apply partition_acc_bst_2; auto. +Qed. + -Fixpoint for_all (s:t) : bool := match s with - | Leaf => true - | Node l x r _ => f x && for_all l && for_all r -end. -Lemma for_all_1 : forall s, compat_bool E.eq f -> - For_all (fun x => f x = true) s -> for_all s = true. +(** * [for_all] and [exists] *) + +Lemma for_all_1 : forall s, compat_bool X.eq f -> + For_all (fun x => f x = true) s -> for_all f s = true. Proof. induction s; simpl; auto. intros. @@ -1660,8 +1468,8 @@ Proof. destruct (f t); simpl; auto. Qed. -Lemma for_all_2 : forall s, compat_bool E.eq f -> - for_all s = true -> For_all (fun x => f x = true) s. +Lemma for_all_2 : forall s, compat_bool X.eq f -> + for_all f s = true -> For_all (fun x => f x = true) s. Proof. induction s; simpl; auto; intros; red; intros; inv In. destruct (andb_prop _ _ H0); auto. @@ -1673,52 +1481,40 @@ Proof. destruct (andb_prop _ _ H0); auto. Qed. -Fixpoint exists_ (s:t) : bool := match s with - | Leaf => false - | Node l x r _ => f x || exists_ l || exists_ r -end. - -Lemma exists_1 : forall s, compat_bool E.eq f -> - Exists (fun x => f x = true) s -> exists_ s = true. +Lemma exists_1 : forall s, compat_bool X.eq f -> + Exists (fun x => f x = true) s -> exists_ f s = true. Proof. - induction s; simpl; destruct 2 as (x,(U,V)); inv In. + induction s; simpl; destruct 2 as (x,(U,V)); inv In; rewrite <- ?orb_lazy_alt. rewrite (H _ _ (X.eq_sym H0)); rewrite V; auto. apply orb_true_intro; left. - apply orb_true_intro; right; apply IHs1; firstorder. - apply orb_true_intro; right; apply IHs2; firstorder. + apply orb_true_intro; right; apply IHs1; auto; exists x; auto. + apply orb_true_intro; right; apply IHs2; auto; exists x; auto. Qed. -Lemma exists_2 : forall s, compat_bool E.eq f -> - exists_ s = true -> Exists (fun x => f x = true) s. +Lemma exists_2 : forall s, compat_bool X.eq f -> + exists_ f s = true -> Exists (fun x => f x = true) s. Proof. - induction s; simpl; intros. + induction s; simpl; intros; rewrite <- ?orb_lazy_alt in *. discriminate. destruct (orb_true_elim _ _ H0) as [H1|H1]. destruct (orb_true_elim _ _ H1) as [H2|H2]. exists t; auto. - destruct (IHs1 H H2); firstorder. - destruct (IHs2 H H1); firstorder. -Qed. + destruct (IHs1 H H2); auto; exists x; intuition. + destruct (IHs2 H H1); auto; exists x; intuition. +Qed. End F. -(** * Fold *) -Module L := FSetList.Raw X. -Fixpoint fold (A : Set) (f : elt -> A -> A)(s : tree) {struct s} : A -> A := - fun a => match s with - | Leaf => a - | Node l x r _ => fold A f r (f x (fold A f l a)) - end. -Implicit Arguments fold [A]. +(** * Fold *) -Definition fold' (A : Set) (f : elt -> A -> A)(s : tree) := +Definition fold' (A : Type) (f : elt -> A -> A)(s : tree) := L.fold f (elements s). Implicit Arguments fold' [A]. Lemma fold_equiv_aux : - forall (A : Set) (s : tree) (f : elt -> A -> A) (a : A) (acc : list elt), + forall (A : Type) (s : tree) (f : elt -> A -> A) (a : A) (acc : list elt), L.fold f (elements_aux acc s) a = L.fold f acc (fold f s a). Proof. simple induction s. @@ -1730,7 +1526,7 @@ Proof. Qed. Lemma fold_equiv : - forall (A : Set) (s : tree) (f : elt -> A -> A) (a : A), + forall (A : Type) (s : tree) (f : elt -> A -> A) (a : A), fold f s a = fold' f s a. Proof. unfold fold', elements in |- *. @@ -1741,7 +1537,7 @@ Proof. Qed. Lemma fold_1 : - forall (s:t)(Hs:bst s)(A : Set)(f : elt -> A -> A)(i : A), + forall (s:t)(Hs:bst s)(A : Type)(f : elt -> A -> A)(i : A), fold f s i = fold_left (fun a e => f e a) (elements s) i. Proof. intros. @@ -1752,416 +1548,168 @@ Proof. apply elements_sort; auto. Qed. -(** * Cardinal *) - -Fixpoint cardinal (s : tree) : nat := - match s with - | Leaf => 0%nat - | Node l _ r _ => S (cardinal l + cardinal r) - end. +(** * Subset *) -Lemma cardinal_elements_aux_1 : - forall s acc, (length acc + cardinal s)%nat = length (elements_aux acc s). +Lemma subsetl_12 : forall subset_l1 l1 x1 h1 s2, + bst (Node l1 x1 Leaf h1) -> bst s2 -> + (forall s, bst s -> (subset_l1 s = true <-> Subset l1 s)) -> + (subsetl subset_l1 x1 s2 = true <-> Subset (Node l1 x1 Leaf h1) s2 ). Proof. - simple induction s; simpl in |- *; intuition. - rewrite <- H. - simpl in |- *. - rewrite <- H0; omega. -Qed. + induction s2 as [|l2 IHl2 x2 r2 IHr2 h2]; simpl; intros. + unfold Subset; intuition; try discriminate. + assert (H': In x1 Leaf) by auto; inversion H'. + inversion_clear H0. + specialize (IHl2 H H2 H1). + specialize (IHr2 H H3 H1). + inv bst. clear H8. + destruct X.compare. + + rewrite IHl2; clear H1 IHl2 IHr2. + unfold Subset. intuition_in. + assert (In a (Node l2 x2 r2 h2)) by auto; intuition_in; order. + assert (In a (Node l2 x2 r2 h2)) by auto; intuition_in; order. -Lemma cardinal_elements_1 : forall s : tree, cardinal s = length (elements s). -Proof. - exact (fun s => cardinal_elements_aux_1 s nil). -Qed. + rewrite H1 by auto; clear H1 IHl2 IHr2. + unfold Subset. intuition_in. + assert (X.eq a x2) by order; intuition_in. + assert (In a (Node l2 x2 r2 h2)) by auto; intuition_in; order. -(** NB: the remaining functions (union, subset, compare) are still defined - in a dependent style, due to the use of well-founded induction. *) + rewrite <-andb_lazy_alt, andb_true_iff, H1 by auto; clear H1 IHl2 IHr2. + unfold Subset. intuition_in. + assert (H':=mem_2 H6); apply In_1 with x1; auto. + apply mem_1; auto. + assert (In x1 (Node l2 x2 r2 h2)) by auto; intuition_in; order. +Qed. -(** Induction over cardinals *) -Lemma sorted_subset_cardinal : forall l' l : list X.t, - sort X.lt l -> sort X.lt l' -> - (forall x : elt, InA X.eq x l -> InA X.eq x l') -> (length l <= length l')%nat. +Lemma subsetr_12 : forall subset_r1 r1 x1 h1 s2, + bst (Node Leaf x1 r1 h1) -> bst s2 -> + (forall s, bst s -> (subset_r1 s = true <-> Subset r1 s)) -> + (subsetr subset_r1 x1 s2 = true <-> Subset (Node Leaf x1 r1 h1) s2). Proof. - simple induction l'; simpl in |- *; intuition. - destruct l; trivial; intros. - absurd (InA X.eq t nil); intuition. - inversion_clear H2. - inversion_clear H1. - destruct l0; simpl in |- *; intuition. + induction s2 as [|l2 IHl2 x2 r2 IHr2 h2]; simpl; intros. + unfold Subset; intuition; try discriminate. + assert (H': In x1 Leaf) by auto; inversion H'. inversion_clear H0. - apply le_n_S. - case (X.compare t a); intro. - absurd (InA X.eq t (a :: l)). - intro. - inversion_clear H0. - order. - assert (X.lt a t). - apply MX.Sort_Inf_In with l; auto. - order. - firstorder. - apply H; auto. - intros. - assert (InA X.eq x (a :: l)). - apply H2; auto. - inversion_clear H6; auto. - assert (X.lt t x). - apply MX.Sort_Inf_In with l0; auto. - order. - apply le_trans with (length (t :: l0)). - simpl in |- *; omega. - apply (H (t :: l0)); auto. - intros. - assert (InA X.eq x (a :: l)); firstorder. - inversion_clear H6; auto. - assert (X.lt a x). - apply MX.Sort_Inf_In with (t :: l0); auto. - elim (X.lt_not_eq (x:=a) (y:=x)); auto. -Qed. - -Lemma cardinal_subset : forall a b : tree, bst a -> bst b -> - (forall y : elt, In y a -> In y b) -> - (cardinal a <= cardinal b)%nat. -Proof. - intros. - do 2 rewrite cardinal_elements_1. - apply sorted_subset_cardinal; auto. - intros. - generalize (elements_in a x) (elements_in b x). - intuition. + specialize (IHl2 H H2 H1). + specialize (IHr2 H H3 H1). + inv bst. clear H7. + destruct X.compare. + + rewrite <-andb_lazy_alt, andb_true_iff, H1 by auto; clear H1 IHl2 IHr2. + unfold Subset. intuition_in. + assert (H':=mem_2 H1); apply In_1 with x1; auto. + apply mem_1; auto. + assert (In x1 (Node l2 x2 r2 h2)) by auto; intuition_in; order. + + rewrite H1 by auto; clear H1 IHl2 IHr2. + unfold Subset. intuition_in. + assert (X.eq a x2) by order; intuition_in. + assert (In a (Node l2 x2 r2 h2)) by auto; intuition_in; order. + + rewrite IHr2; clear H1 IHl2 IHr2. + unfold Subset. intuition_in. + assert (In a (Node l2 x2 r2 h2)) by auto; intuition_in; order. + assert (In a (Node l2 x2 r2 h2)) by auto; intuition_in; order. Qed. -Lemma cardinal_left : forall (l r : tree) (x : elt) (h : int), - (cardinal l < cardinal (Node l x r h))%nat. -Proof. - simpl in |- *; intuition. -Qed. -Lemma cardinal_right : - forall (l r : tree) (x : elt) (h : int), - (cardinal r < cardinal (Node l x r h))%nat. +Lemma subset_12 : forall s1 s2, bst s1 -> bst s2 -> + (subset s1 s2 = true <-> Subset s1 s2). Proof. - simpl in |- *; intuition. -Qed. - -Lemma cardinal_rec2 : forall P : tree -> tree -> Set, - (forall s1 s2 : tree, - (forall t1 t2 : tree, - (cardinal t1 + cardinal t2 < cardinal s1 + cardinal s2)%nat -> P t1 t2) - -> P s1 s2) -> - forall s1 s2 : tree, P s1 s2. -Proof. - intros P H s1 s2. - apply well_founded_induction_type_2 - with (R := fun yy' xx' : tree * tree => - (cardinal (fst yy') + cardinal (snd yy') < - cardinal (fst xx') + cardinal (snd xx'))%nat); auto. - apply (Wf_nat.well_founded_ltof _ - (fun xx' : tree * tree => (cardinal (fst xx') + cardinal (snd xx'))%nat)). -Qed. - -Lemma height_0 : forall s, avl s -> height s = 0 -> s = Leaf. -Proof. - destruct 1; intuition; simpl in *. - avl_nns; simpl in *; false_omega_max. -Qed. - -(** * Union - - [union s1 s2] does an induction over the sum of the cardinals of - [s1] and [s2]. Code is -<< - let rec union s1 s2 = - match (s1, s2) with - (Empty, t2) -> t2 - | (t1, Empty) -> t1 - | (Node(l1, v1, r1, h1), Node(l2, v2, r2, h2)) -> - if h1 >= h2 then - if h2 = 1 then add v2 s1 else begin - let (l2', _, r2') = split v1 s2 in - join (union l1 l2') v1 (union r1 r2') - end - else - if h1 = 1 then add v1 s2 else begin - let (l1', _, r1') = split v2 s1 in - join (union l1' l2) v2 (union r1' r2) - end ->> -*) + induction s1 as [|l1 IHl1 x1 r1 IHr1 h1]; simpl; intros. + unfold Subset; intuition_in. + destruct s2 as [|l2 x2 r2 h2]; simpl; intros. + unfold Subset; intuition_in; try discriminate. + assert (H': In x1 Leaf) by auto; inversion H'. + inv bst. + destruct X.compare. + + rewrite <-andb_lazy_alt, andb_true_iff, IHr1 by auto. + rewrite (@subsetl_12 (subset l1) l1 x1 h1) by auto. + clear IHl1 IHr1. + unfold Subset; intuition_in. + assert (In a (Node l2 x2 r2 h2)) by auto; intuition_in; order. + assert (In a (Node l2 x2 r2 h2)) by auto; intuition_in; order. + + rewrite <-andb_lazy_alt, andb_true_iff, IHl1, IHr1 by auto. + clear IHl1 IHr1. + unfold Subset; intuition_in. + assert (X.eq a x2) by order; intuition_in. + assert (In a (Node l2 x2 r2 h2)) by auto; intuition_in; order. + assert (In a (Node l2 x2 r2 h2)) by auto; intuition_in; order. + + rewrite <-andb_lazy_alt, andb_true_iff, IHl1 by auto. + rewrite (@subsetr_12 (subset r1) r1 x1 h1) by auto. + clear IHl1 IHr1. + unfold Subset; intuition_in. + assert (In a (Node l2 x2 r2 h2)) by auto; intuition_in; order. + assert (In a (Node l2 x2 r2 h2)) by auto; intuition_in; order. +Qed. -Definition union : - forall s1 s2, bst s1 -> avl s1 -> bst s2 -> avl s2 -> - {s' : t | bst s' /\ avl s' /\ forall x : elt, In x s' <-> In x s1 \/ In x s2}. -Proof. - intros s1 s2; pattern s1, s2; apply cardinal_rec2; clear s1 s2. - destruct s1 as [| l1 x1 r1 h1]; intros. - (* s = Leaf *) - clear H. - exists s2; intuition_in. - (* s1 = Node l1 x1 r1 *) - destruct s2 as [| l2 x2 r2 h2]; simpl in |- *. - (* s2 = Leaf *) - clear H. - exists (Node l1 x1 r1 h1); simpl; intuition_in. - (* x' = Node l2 x2 r2 *) - case (ge_lt_dec h1 h2); intro. - (* h1 >= h2 *) - case (eq_dec h2 1); intro. - (* h2 = 1 *) - clear H. - exists (add x2 (Node l1 x1 r1 h1)); auto. - inv avl; inv bst. - avl_nn l2; avl_nn r2. - rewrite (height_0 _ H); [ | omega_max]. - rewrite (height_0 _ H4); [ | omega_max]. - split; [apply add_bst; auto|]. - split; [apply add_avl; auto|]. - intros. - rewrite (add_in (Node l1 x1 r1 h1) x2 x); intuition_in. - (* h2 <> 1 *) - (* split x1 s2 = l2',_,r2' *) - case_eq (split x1 (Node l2 x2 r2 h2)); intros l2' (b,r2') EqSplit. - set (s2 := Node l2 x2 r2 h2) in *; clearbody s2. - generalize (split_avl s2 x1 H3); rewrite EqSplit; simpl in *; intros (A,B). - generalize (split_bst s2 x1 H2 H3); rewrite EqSplit; simpl in *; intros (C,D). - generalize (split_in_1 s2 x1); rewrite EqSplit; simpl in *; intros. - generalize (split_in_2 s2 x1); rewrite EqSplit; simpl in *; intros. - (* union l1 l2' = l0 *) - destruct (H l1 l2') as [l0 (H7,(H8,H9))]; inv avl; inv bst; auto. - assert (cardinal l2' <= cardinal s2)%nat. - apply cardinal_subset; trivial. - intros y; rewrite (H4 y); intuition. - omega. - (* union r1 r2' = r0 *) - destruct (H r1 r2') as [r0 (H10,(H11,H12))]; inv avl; inv bst; auto. - assert (cardinal r2' <= cardinal s2)%nat. - apply cardinal_subset; trivial. - intros y; rewrite (H5 y); intuition. - omega. - exists (join l0 x1 r0). - inv avl; inv bst; clear H. - split. - apply join_bst; auto. - red; intros. - rewrite (H9 y) in H. - destruct H; auto. - rewrite (H4 y) in H; intuition. - red; intros. - rewrite (H12 y) in H. - destruct H; auto. - rewrite (H5 y) in H; intuition. - split. - apply join_avl; auto. - intros. - rewrite join_in; auto. - rewrite H9. - rewrite H12. - rewrite H4; auto. - rewrite H5; auto. - intuition_in. - case (X.compare x x1); intuition. - (* h1 < h2 *) - case (eq_dec h1 1); intro. - (* h1 = 1 *) - exists (add x1 (Node l2 x2 r2 h2)); auto. - inv avl; inv bst. - avl_nn l1; avl_nn r1. - rewrite (height_0 _ H3); [ | omega_max]. - rewrite (height_0 _ H8); [ | omega_max]. - split; [apply add_bst; auto|]. - split; [apply add_avl; auto|]. - intros. - rewrite (add_in (Node l2 x2 r2 h2) x1 x); intuition_in. - (* h1 <> 1 *) - (* split x2 s1 = l1',_,r1' *) - case_eq (split x2 (Node l1 x1 r1 h1)); intros l1' (b,r1') EqSplit. - set (s1 := Node l1 x1 r1 h1) in *; clearbody s1. - generalize (split_avl s1 x2 H1); rewrite EqSplit; simpl in *; intros (A,B). - generalize (split_bst s1 x2 H0 H1); rewrite EqSplit; simpl in *; intros (C,D). - generalize (split_in_1 s1 x2); rewrite EqSplit; simpl in *; intros. - generalize (split_in_2 s1 x2); rewrite EqSplit; simpl in *; intros. - (* union l1' l2 = l0 *) - destruct (H l1' l2) as [l0 (H7,(H8,H9))]; inv avl; inv bst; auto. - assert (cardinal l1' <= cardinal s1)%nat. - apply cardinal_subset; trivial. - intros y; rewrite (H4 y); intuition. - omega. - (* union r1' r2 = r0 *) - destruct (H r1' r2) as [r0 (H10,(H11,H12))]; inv avl; inv bst; auto. - assert (cardinal r1' <= cardinal s1)%nat. - apply cardinal_subset; trivial. - intros y; rewrite (H5 y); intuition. - omega. - exists (join l0 x2 r0). - inv avl; inv bst; clear H. - split. - apply join_bst; auto. - red; intros. - rewrite (H9 y) in H. - destruct H; auto. - rewrite (H4 y) in H; intuition. - red; intros. - rewrite (H12 y) in H. - destruct H; auto. - rewrite (H5 y) in H; intuition. - split. - apply join_avl; auto. - intros. - rewrite join_in; auto. - rewrite H9. - rewrite H12. - rewrite H4; auto. - rewrite H5; auto. - intuition_in. - case (X.compare x x2); intuition. -Qed. - - -(** * Subset -<< - let rec subset s1 s2 = - match (s1, s2) with - Empty, _ -> true - | _, Empty -> false - | Node (l1, v1, r1, _), (Node (l2, v2, r2, _) as t2) -> - let c = Ord.compare v1 v2 in - if c = 0 then - subset l1 l2 && subset r1 r2 - else if c < 0 then - subset (Node (l1, v1, Empty, 0)) l2 && subset r1 t2 - else - subset (Node (Empty, v1, r1, 0)) r2 && subset l1 t2 ->> -*) -Definition subset : forall s1 s2 : t, bst s1 -> bst s2 -> - {Subset s1 s2} + {~ Subset s1 s2}. -Proof. - intros s1 s2; pattern s1, s2; apply cardinal_rec2; clear s1 s2. - destruct s1 as [| l1 x1 r1 h1]; intros. - (* s1 = Leaf *) - left; red; intros; inv In. - (* s1 = Node l1 x1 r1 h1 *) - destruct s2 as [| l2 x2 r2 h2]. - (* s2 = Leaf *) - right; intros; intro. - assert (In x1 Leaf); auto. - inversion_clear H3. - (* s2 = Node l2 x2 r2 h2 *) - case (X.compare x1 x2); intro. - (* x1 < x2 *) - case (H (Node l1 x1 Leaf 0) l2); inv bst; auto; intros. - simpl in |- *; omega. - case (H r1 (Node l2 x2 r2 h2)); inv bst; auto; intros. - simpl in |- *; omega. - clear H; left; red; intuition. - generalize (s a) (s0 a); clear s s0; intuition_in. - clear H; right; red; firstorder. - clear H; right; red; inv bst; intuition. - apply n; red; intros. - assert (In a (Node l2 x2 r2 h2)) by (inv In; auto). - intuition_in; order. - (* x1 = x2 *) - case (H l1 l2); inv bst; auto; intros. - simpl in |- *; omega. - case (H r1 r2); inv bst; auto; intros. - simpl in |- *; omega. - clear H; left; red; intuition_in; eauto. - clear H; right; red; inv bst; intuition. - apply n; red; intros. - assert (In a (Node l2 x2 r2 h2)) by auto. - intuition_in; order. - clear H; right; red; inv bst; intuition. - apply n; red; intros. - assert (In a (Node l2 x2 r2 h2)) by auto. - intuition_in; order. - (* x1 > x2 *) - case (H (Node Leaf x1 r1 0) r2); inv bst; auto; intros. - simpl in |- *; omega. - intros; case (H l1 (Node l2 x2 r2 h2)); inv bst; auto; intros. - simpl in |- *; omega. - clear H; left; red; intuition. - generalize (s a) (s0 a); clear s s0; intuition_in. - clear H; right; red; firstorder. - clear H; right; red; inv bst; intuition. - apply n; red; intros. - assert (In a (Node l2 x2 r2 h2)) by (inv In; auto). - intuition_in; order. -Qed. (** * Comparison *) (** ** Relations [eq] and [lt] over trees *) -Definition eq : t -> t -> Prop := Equal. +Definition eq := Equal. +Definition lt (s1 s2 : t) : Prop := L.lt (elements s1) (elements s2). -Lemma eq_refl : forall s : t, eq s s. +Lemma eq_refl : forall s : t, Equal s s. Proof. - unfold eq, Equal in |- *; intuition. + unfold Equal; intuition. Qed. -Lemma eq_sym : forall s s' : t, eq s s' -> eq s' s. +Lemma eq_sym : forall s s' : t, Equal s s' -> Equal s' s. Proof. - unfold eq, Equal in |- *; firstorder. + unfold Equal; intros s s' H x; destruct (H x); split; auto. Qed. -Lemma eq_trans : forall s s' s'' : t, eq s s' -> eq s' s'' -> eq s s''. +Lemma eq_trans : forall s s' s'' : t, + Equal s s' -> Equal s' s'' -> Equal s s''. Proof. - unfold eq, Equal in |- *; firstorder. + unfold Equal; intros s s' s'' H1 H2 x; + destruct (H1 x); destruct (H2 x); split; auto. Qed. Lemma eq_L_eq : - forall s s' : t, eq s s' -> L.eq (elements s) (elements s'). + forall s s' : t, Equal s s' -> L.eq (elements s) (elements s'). Proof. - unfold eq, Equal, L.eq, L.Equal in |- *; intros. - generalize (elements_in s a) (elements_in s' a). - firstorder. + unfold Equal, L.eq, L.Equal; intros; do 2 rewrite elements_in; auto. Qed. Lemma L_eq_eq : - forall s s' : t, L.eq (elements s) (elements s') -> eq s s'. + forall s s' : t, L.eq (elements s) (elements s') -> Equal s s'. Proof. - unfold eq, Equal, L.eq, L.Equal in |- *; intros. - generalize (elements_in s a) (elements_in s' a). - firstorder. + unfold Equal, L.eq, L.Equal; intros; do 2 rewrite <-elements_in; auto. Qed. Hint Resolve eq_L_eq L_eq_eq. -Definition lt (s1 s2 : t) : Prop := L.lt (elements s1) (elements s2). - Definition lt_trans (s s' s'' : t) (h : lt s s') (h' : lt s' s'') : lt s s'' := L.lt_trans h h'. -Lemma lt_not_eq : forall s s' : t, bst s -> bst s' -> lt s s' -> ~ eq s s'. +Lemma lt_not_eq : forall s s' : t, + bst s -> bst s' -> lt s s' -> ~ Equal s s'. Proof. unfold lt in |- *; intros; intro. apply L.lt_not_eq with (s := elements s) (s' := elements s'); auto. Qed. -(** A new comparison algorithm suggested by Xavier Leroy: - -type enumeration = End | More of elt * t * enumeration - -let rec cons s e = match s with - | Empty -> e - | Node(l, v, r, _) -> cons l (More(v, r, e)) - -let rec compare_aux e1 e2 = match (e1, e2) with - | (End, End) -> 0 - | (End, More _) -> -1 - | (More _, End) -> 1 - | (More(v1, r1, k1), More(v2, r2, k2)) -> - let c = Ord.compare v1 v2 in - if c <> 0 then c else compare_aux (cons r1 k1) (cons r2 k2) - -let compare s1 s2 = compare_aux (cons s1 End) (cons s2 End) -*) +Lemma L_eq_cons : + forall (l1 l2 : list elt) (x y : elt), + X.eq x y -> L.eq l1 l2 -> L.eq (x :: l1) (y :: l2). +Proof. + unfold L.eq, L.Equal in |- *; intuition. + inversion_clear H1; generalize (H0 a); clear H0; intuition. + apply InA_eqA with x; eauto. + inversion_clear H1; generalize (H0 a); clear H0; intuition. + apply InA_eqA with y; eauto. +Qed. +Hint Resolve L_eq_cons. -(** ** Enumeration of the elements of a tree *) -Inductive enumeration : Set := - | End : enumeration - | More : elt -> tree -> enumeration -> enumeration. +(** * A new comparison algorithm suggested by Xavier Leroy *) (** [flatten_e e] returns the list of elements of [e] i.e. the list of elements actually compared *) @@ -2171,462 +1719,166 @@ Fixpoint flatten_e (e : enumeration) : list elt := match e with | More x t r => x :: elements t ++ flatten_e r end. -(** [sorted_e e] expresses that elements in the enumeration [e] are - sorted, and that all trees in [e] are binary search trees. *) - -Inductive In_e (x:elt) : enumeration -> Prop := - | InEHd1 : - forall (y : elt) (s : tree) (e : enumeration), - X.eq x y -> In_e x (More y s e) - | InEHd2 : - forall (y : elt) (s : tree) (e : enumeration), - In x s -> In_e x (More y s e) - | InETl : - forall (y : elt) (s : tree) (e : enumeration), - In_e x e -> In_e x (More y s e). - -Hint Constructors In_e. - -Inductive sorted_e : enumeration -> Prop := - | SortedEEnd : sorted_e End - | SortedEMore : - forall (x : elt) (s : tree) (e : enumeration), - bst s -> - (gt_tree x s) -> - sorted_e e -> - (forall y : elt, In_e y e -> X.lt x y) -> - (forall y : elt, - In y s -> forall z : elt, In_e z e -> X.lt y z) -> - sorted_e (More x s e). - -Hint Constructors sorted_e. - -Lemma in_app : - forall (x : elt) (l1 l2 : list elt), - InA X.eq x (l1 ++ l2) -> InA X.eq x l1 \/ InA X.eq x l2. -Proof. - simple induction l1; simpl in |- *; intuition. - inversion_clear H0; auto. - elim (H l2 H1); auto. -Qed. - -Lemma in_flatten_e : - forall (x : elt) (e : enumeration), InA X.eq x (flatten_e e) -> In_e x e. -Proof. - simple induction e; simpl in |- *; intuition. - inversion_clear H. - inversion_clear H0; auto. - elim (in_app x _ _ H1); auto. - destruct (elements_in t x); auto. -Qed. - -Lemma sort_app : - forall l1 l2 : list elt, sort X.lt l1 -> sort X.lt l2 -> - (forall x y : elt, InA X.eq x l1 -> InA X.eq y l2 -> X.lt x y) -> - sort X.lt (l1 ++ l2). -Proof. - simple induction l1; simpl in |- *; intuition. - apply cons_sort; auto. - apply H; auto. - inversion_clear H0; trivial. - induction l as [| a0 l Hrecl]; simpl in |- *; intuition. - induction l2 as [| a0 l2 Hrecl2]; simpl in |- *; intuition. - inversion_clear H0; inversion_clear H4; auto. -Qed. - -Lemma sorted_flatten_e : - forall e : enumeration, sorted_e e -> sort X.lt (flatten_e e). -Proof. - simple induction e; simpl in |- *; intuition. - apply cons_sort. - apply sort_app; inversion H0; auto. - intros; apply H8; auto. - destruct (elements_in t x0); auto. - apply in_flatten_e; auto. - apply L.MX.ListIn_Inf. - inversion_clear H0. - intros; elim (in_app_or _ _ _ H0); intuition. - destruct (elements_in t y); auto. - apply H4; apply in_flatten_e; auto. -Qed. - -Lemma elements_app : - forall (s : tree) (acc : list elt), elements_aux acc s = elements s ++ acc. -Proof. - simple induction s; simpl in |- *; intuition. - rewrite H0. - rewrite H. - unfold elements; simpl. - do 2 rewrite H. - rewrite H0. - repeat rewrite <- app_nil_end. - repeat rewrite app_ass; auto. -Qed. - -Lemma compare_flatten_1 : - forall (t0 t2 : tree) (t1 : elt) (z : int) (l : list elt), - elements t0 ++ t1 :: elements t2 ++ l = - elements (Node t0 t1 t2 z) ++ l. +Lemma flatten_e_elements : + forall l x r h e, + elements l ++ flatten_e (More x r e) = elements (Node l x r h) ++ flatten_e e. Proof. - simpl in |- *; unfold elements in |- *; simpl in |- *; intuition. - repeat rewrite elements_app. - repeat rewrite <- app_nil_end. - repeat rewrite app_ass; auto. + intros; simpl; apply elements_node. Qed. -(** key lemma for correctness *) - -Lemma flatten_e_elements : - forall (x : elt) (l r : tree) (z : int) (e : enumeration), - elements l ++ flatten_e (More x r e) = elements (Node l x r z) ++ flatten_e e. +Lemma cons_1 : forall s e, + flatten_e (cons s e) = elements s ++ flatten_e e. Proof. - intros; simpl. - apply compare_flatten_1. + induction s; simpl; auto; intros. + rewrite IHs1; apply flatten_e_elements. Qed. -(** termination of [compare_aux] *) - -Open Local Scope Z_scope. - -Fixpoint measure_e_t (s : tree) : Z := match s with - | Leaf => 0 - | Node l _ r _ => 1 + measure_e_t l + measure_e_t r - end. +(** Correctness of this comparison *) -Fixpoint measure_e (e : enumeration) : Z := match e with - | End => 0 - | More _ s r => 1 + measure_e_t s + measure_e r +Definition Cmp c := + match c with + | Eq => L.eq + | Lt => L.lt + | Gt => (fun l1 l2 => L.lt l2 l1) end. -Ltac Measure_e_t := unfold measure_e_t in |- *; fold measure_e_t in |- *. -Ltac Measure_e := unfold measure_e in |- *; fold measure_e in |- *. - -Lemma measure_e_t_0 : forall s : tree, measure_e_t s >= 0. +Lemma cons_Cmp : forall c x1 x2 l1 l2, X.eq x1 x2 -> + Cmp c l1 l2 -> Cmp c (x1::l1) (x2::l2). Proof. - simple induction s. - simpl in |- *; omega. - intros. - Measure_e_t; omega. (* BUG Simpl! *) + destruct c; simpl; auto. Qed. +Hint Resolve cons_Cmp. -Ltac Measure_e_t_0 s := generalize (measure_e_t_0 s); intro. - -Lemma measure_e_0 : forall e : enumeration, measure_e e >= 0. +Lemma compare_end_Cmp : + forall e2, Cmp (compare_end e2) nil (flatten_e e2). Proof. - simple induction e. - simpl in |- *; omega. - intros. - Measure_e; Measure_e_t_0 t; omega. + destruct e2; simpl; auto. + apply L.eq_refl. Qed. -Ltac Measure_e_0 e := generalize (measure_e_0 e); intro. - -(** Induction principle over the sum of the measures for two lists *) - -Definition compare_rec2 : - forall P : enumeration -> enumeration -> Set, - (forall x x' : enumeration, - (forall y y' : enumeration, - measure_e y + measure_e y' < measure_e x + measure_e x' -> P y y') -> - P x x') -> - forall x x' : enumeration, P x x'. +Lemma compare_more_Cmp : forall x1 cont x2 r2 e2 l, + Cmp (cont (cons r2 e2)) l (elements r2 ++ flatten_e e2) -> + Cmp (compare_more x1 cont (More x2 r2 e2)) (x1::l) + (flatten_e (More x2 r2 e2)). Proof. - intros P H x x'. - apply well_founded_induction_type_2 - with (R := fun yy' xx' : enumeration * enumeration => - measure_e (fst yy') + measure_e (snd yy') < - measure_e (fst xx') + measure_e (snd xx')); auto. - apply Wf_nat.well_founded_lt_compat - with (f := fun xx' : enumeration * enumeration => - Zabs_nat (measure_e (fst xx') + measure_e (snd xx'))). - intros; apply Zabs.Zabs_nat_lt. - Measure_e_0 (fst x0); Measure_e_0 (snd x0); Measure_e_0 (fst y); - Measure_e_0 (snd y); intros; omega. -Qed. - -(** [cons t e] adds the elements of tree [t] on the head of - enumeration [e]. Code: - -let rec cons s e = match s with - | Empty -> e - | Node(l, v, r, _) -> cons l (More(v, r, e)) -*) - -Definition cons : forall (s : tree) (e : enumeration), bst s -> sorted_e e -> - (forall (x y : elt), In x s -> In_e y e -> X.lt x y) -> - { r : enumeration - | sorted_e r /\ - measure_e r = measure_e_t s + measure_e e /\ - flatten_e r = elements s ++ flatten_e e - }. -Proof. - simple induction s; intuition. - (* s = Leaf *) - exists e; intuition. - (* s = Node t t0 t1 z *) - clear H0. - case (H (More t0 t1 e)); clear H; intuition. - inv bst; auto. - constructor; inversion_clear H1; auto. - inversion_clear H0; inv bst; intuition; order. - exists x; intuition. - generalize H4; Measure_e; intros; Measure_e_t; omega. - rewrite H5. - apply flatten_e_elements. + simpl; intros; destruct X.compare; simpl; auto. Qed. -Lemma l_eq_cons : - forall (l1 l2 : list elt) (x y : elt), - X.eq x y -> L.eq l1 l2 -> L.eq (x :: l1) (y :: l2). +Lemma compare_cont_Cmp : forall s1 cont e2 l, + (forall e, Cmp (cont e) l (flatten_e e)) -> + Cmp (compare_cont s1 cont e2) (elements s1 ++ l) (flatten_e e2). Proof. - unfold L.eq, L.Equal in |- *; intuition. - inversion_clear H1; generalize (H0 a); clear H0; intuition. - apply InA_eqA with x; eauto. - inversion_clear H1; generalize (H0 a); clear H0; intuition. - apply InA_eqA with y; eauto. + induction s1 as [|l1 Hl1 x1 r1 Hr1 h1]; simpl; intros; auto. + rewrite <- elements_node; simpl. + apply Hl1; auto. clear e2. intros [|x2 r2 e2]. + simpl; auto. + apply compare_more_Cmp. + rewrite <- cons_1; auto. Qed. -Definition compare_aux : - forall e1 e2 : enumeration, sorted_e e1 -> sorted_e e2 -> - Compare L.lt L.eq (flatten_e e1) (flatten_e e2). -Proof. - intros e1 e2; pattern e1, e2 in |- *; apply compare_rec2. - simple destruct x; simple destruct x'; intuition. - (* x = x' = End *) - constructor 2; unfold L.eq, L.Equal in |- *; intuition. - (* x = End x' = More *) - constructor 1; simpl in |- *; auto. - (* x = More x' = End *) - constructor 3; simpl in |- *; auto. - (* x = More e t e0, x' = More e3 t0 e4 *) - case (X.compare e e3); intro. - (* e < e3 *) - constructor 1; simpl; auto. - (* e = e3 *) - destruct (cons t e0) as [c1 (H2,(H3,H4))]; try inversion_clear H0; auto. - destruct (cons t0 e4) as [c2 (H5,(H6,H7))]; try inversion_clear H1; auto. - destruct (H c1 c2); clear H; intuition. - Measure_e; omega. - constructor 1; simpl. - apply L.lt_cons_eq; auto. - rewrite H4 in l; rewrite H7 in l; auto. - constructor 2; simpl. - apply l_eq_cons; auto. - rewrite H4 in e6; rewrite H7 in e6; auto. - constructor 3; simpl. - apply L.lt_cons_eq; auto. - rewrite H4 in l; rewrite H7 in l; auto. - (* e > e3 *) - constructor 3; simpl; auto. -Qed. - -Definition compare : forall s1 s2, bst s1 -> bst s2 -> Compare lt eq s1 s2. -Proof. - intros s1 s2 s1_bst s2_bst; unfold lt, eq; simpl. - destruct (cons s1 End); intuition. - inversion_clear H0. - destruct (cons s2 End); intuition. - inversion_clear H3. - simpl in H2; rewrite <- app_nil_end in H2. - simpl in H5; rewrite <- app_nil_end in H5. - destruct (compare_aux x x0); intuition. - constructor 1; simpl in |- *. - rewrite H2 in l; rewrite H5 in l; auto. - constructor 2; apply L_eq_eq; simpl in |- *. - rewrite H2 in e; rewrite H5 in e; auto. - constructor 3; simpl in |- *. - rewrite H2 in l; rewrite H5 in l; auto. +Lemma compare_Cmp : forall s1 s2, + Cmp (compare s1 s2) (elements s1) (elements s2). +Proof. + intros; unfold compare. + rewrite (app_nil_end (elements s1)). + replace (elements s2) with (flatten_e (cons s2 End)) by + (rewrite cons_1; simpl; rewrite <- app_nil_end; auto). + apply compare_cont_Cmp; auto. + intros. + apply compare_end_Cmp; auto. Qed. (** * Equality test *) -Definition equal : forall s s' : t, bst s -> bst s' -> {Equal s s'} + {~ Equal s s'}. +Lemma equal_1 : forall s1 s2, bst s1 -> bst s2 -> + Equal s1 s2 -> equal s1 s2 = true. Proof. - intros s s' Hs Hs'; case (compare s s'); auto; intros. - right; apply lt_not_eq; auto. - right; intro; apply (lt_not_eq s' s); auto; apply eq_sym; auto. -Qed. - -(** We provide additionally a different implementation for union, subset and - equal, which is less efficient, but uses structural induction, hence computes - within Coq. *) - -(** Alternative union based on fold. - Complexity : [min(|s|,|s'|)*log(max(|s|,|s'|))] *) - -Definition union' s s' := - if ge_lt_dec (height s) (height s') then fold add s' s else fold add s s'. - -Lemma fold_add_avl : forall s s', avl s -> avl s' -> avl (fold add s s'). -Proof. - induction s; simpl; intros; inv avl; auto. -Qed. -Hint Resolve fold_add_avl. - -Lemma union'_avl : forall s s', avl s -> avl s' -> avl (union' s s'). -Proof. - unfold union'; intros; destruct (ge_lt_dec (height s) (height s')); auto. -Qed. - -Lemma fold_add_bst : forall s s', bst s -> avl s -> bst s' -> avl s' -> - bst (fold add s s'). -Proof. - induction s; simpl; intros; inv avl; inv bst; auto. - apply IHs2; auto. - apply add_bst; auto. -Qed. - -Lemma union'_bst : forall s s', bst s -> avl s -> bst s' -> avl s' -> - bst (union' s s'). -Proof. - unfold union'; intros; destruct (ge_lt_dec (height s) (height s')); - apply fold_add_bst; auto. +unfold equal; intros s1 s2 B1 B2 E. +generalize (compare_Cmp s1 s2). +destruct (compare s1 s2); simpl in *; auto; intros. +elim (lt_not_eq B1 B2 H E); auto. +elim (lt_not_eq B2 B1 H (eq_sym E)); auto. Qed. -Lemma fold_add_in : forall s s' y, bst s -> avl s -> bst s' -> avl s' -> - (In y (fold add s s') <-> In y s \/ In y s'). -Proof. - induction s; simpl; intros; inv avl; inv bst; auto. - intuition_in. - rewrite IHs2; auto. - apply add_bst; auto. - apply fold_add_bst; auto. - rewrite add_in; auto. - rewrite IHs1; auto. - intuition_in. -Qed. - -Lemma union'_in : forall s s' y, bst s -> avl s -> bst s' -> avl s' -> - (In y (union' s s') <-> In y s \/ In y s'). +Lemma equal_2 : forall s1 s2, + equal s1 s2 = true -> Equal s1 s2. Proof. - unfold union'; intros; destruct (ge_lt_dec (height s) (height s')). - rewrite fold_add_in; intuition. - apply fold_add_in; auto. -Qed. - -(** Alternative subset based on diff. *) - -Definition subset' s s' := is_empty (diff s s'). - -Lemma subset'_1 : forall s s', bst s -> avl s -> bst s' -> avl s' -> - Subset s s' -> subset' s s' = true. -Proof. - unfold subset', Subset; intros; apply is_empty_1; red; intros. - rewrite (diff_in); intuition. -Qed. - -Lemma subset'_2 : forall s s', bst s -> avl s -> bst s' -> avl s' -> - subset' s s' = true -> Subset s s'. -Proof. - unfold subset', Subset; intros; generalize (is_empty_2 _ H3 a); unfold Empty. - rewrite (diff_in); intuition. - generalize (mem_2 s' a) (mem_1 s' a); destruct (mem a s'); intuition. +unfold equal; intros s1 s2 E. +generalize (compare_Cmp s1 s2); + destruct compare; auto; discriminate. Qed. -(** Alternative equal based on subset *) - -Definition equal' s s' := subset' s s' && subset' s' s. +End Proofs. -Lemma equal'_1 : forall s s', bst s -> avl s -> bst s' -> avl s' -> - Equal s s' -> equal' s s' = true. -Proof. - unfold equal', Equal; intros. - rewrite subset'_1; firstorder; simpl. - apply subset'_1; firstorder. -Qed. +End Raw. -Lemma equal'_2 : forall s s', bst s -> avl s -> bst s' -> avl s' -> - equal' s s' = true -> Equal s s'. -Proof. - unfold equal', Equal; intros; destruct (andb_prop _ _ H3); split; - apply subset'_2; auto. -Qed. -End Raw. (** * Encapsulation Now, in order to really provide a functor implementing [S], we - need to encapsulate everything into a type of balanced binary search trees. *) + need to encapsulate everything into a type of binary search trees. + They also happen to be well-balanced, but this has no influence + on the correctness of operations, so we won't state this here, + see [FSetFullAVL] if you need more than just the FSet interface. +*) Module IntMake (I:Int)(X: OrderedType) <: S with Module E := X. Module E := X. - Module Raw := Raw I X. + Module Raw := Raw I X. + Import Raw.Proofs. - Record bbst : Set := Bbst {this :> Raw.t; is_bst : Raw.bst this; is_avl: Raw.avl this}. - Definition t := bbst. + Record bst := Bst {this :> Raw.t; is_bst : Raw.bst this}. + Definition t := bst. Definition elt := E.t. - Definition In (x : elt) (s : t) : Prop := Raw.In x s. - Definition Equal (s s':t) : Prop := forall a : elt, In a s <-> In a s'. - Definition Subset (s s':t) : Prop := forall a : elt, In a s -> In a s'. - Definition Empty (s:t) : Prop := forall a : elt, ~ In a s. - Definition For_all (P : elt -> Prop) (s:t) : Prop := forall x, In x s -> P x. - Definition Exists (P : elt -> Prop) (s:t) : Prop := exists x, In x s /\ P x. - + Definition In (x : elt) (s : t) := Raw.In x s. + Definition Equal (s s':t) := forall a : elt, In a s <-> In a s'. + Definition Subset (s s':t) := forall a : elt, In a s -> In a s'. + Definition Empty (s:t) := forall a : elt, ~ In a s. + Definition For_all (P : elt -> Prop) (s:t) := forall x, In x s -> P x. + Definition Exists (P : elt -> Prop) (s:t) := exists x, In x s /\ P x. + Lemma In_1 : forall (s:t)(x y:elt), E.eq x y -> In x s -> In y s. - Proof. intro s; exact (Raw.In_1 s). Qed. + Proof. intro s; exact (@In_1 s). Qed. Definition mem (x:elt)(s:t) : bool := Raw.mem x s. - Definition empty : t := Bbst _ Raw.empty_bst Raw.empty_avl. + Definition empty : t := Bst empty_bst. Definition is_empty (s:t) : bool := Raw.is_empty s. - Definition singleton (x:elt) : t := Bbst _ (Raw.singleton_bst x) (Raw.singleton_avl x). - Definition add (x:elt)(s:t) : t := - Bbst _ (Raw.add_bst s x (is_bst s) (is_avl s)) - (Raw.add_avl s x (is_avl s)). - Definition remove (x:elt)(s:t) : t := - Bbst _ (Raw.remove_bst s x (is_bst s) (is_avl s)) - (Raw.remove_avl s x (is_avl s)). - Definition inter (s s':t) : t := - Bbst _ (Raw.inter_bst _ _ (is_bst s) (is_avl s) (is_bst s') (is_avl s')) - (Raw.inter_avl _ _ (is_avl s) (is_avl s')). - Definition diff (s s':t) : t := - Bbst _ (Raw.diff_bst _ _ (is_bst s) (is_avl s) (is_bst s') (is_avl s')) - (Raw.diff_avl _ _ (is_avl s) (is_avl s')). + Definition singleton (x:elt) : t := Bst (singleton_bst x). + Definition add (x:elt)(s:t) : t := Bst (add_bst x (is_bst s)). + Definition remove (x:elt)(s:t) : t := Bst (remove_bst x (is_bst s)). + Definition inter (s s':t) : t := Bst (inter_bst (is_bst s) (is_bst s')). + Definition union (s s':t) : t := Bst (union_bst (is_bst s) (is_bst s')). + Definition diff (s s':t) : t := Bst (diff_bst (is_bst s) (is_bst s')). Definition elements (s:t) : list elt := Raw.elements s. Definition min_elt (s:t) : option elt := Raw.min_elt s. Definition max_elt (s:t) : option elt := Raw.max_elt s. Definition choose (s:t) : option elt := Raw.choose s. - Definition fold (B : Set) (f : elt -> B -> B) (s:t) : B -> B := Raw.fold f s. + Definition fold (B : Type) (f : elt -> B -> B) (s:t) : B -> B := Raw.fold f s. Definition cardinal (s:t) : nat := Raw.cardinal s. Definition filter (f : elt -> bool) (s:t) : t := - Bbst _ (Raw.filter_bst f _ (is_bst s) (is_avl s)) - (Raw.filter_avl f _ (is_avl s)). + Bst (filter_bst f (is_bst s)). Definition for_all (f : elt -> bool) (s:t) : bool := Raw.for_all f s. Definition exists_ (f : elt -> bool) (s:t) : bool := Raw.exists_ f s. Definition partition (f : elt -> bool) (s:t) : t * t := let p := Raw.partition f s in - (Bbst (fst p) (Raw.partition_bst_1 f _ (is_bst s) (is_avl s)) - (Raw.partition_avl_1 f _ (is_avl s)), - Bbst (snd p) (Raw.partition_bst_2 f _ (is_bst s) (is_avl s)) - (Raw.partition_avl_2 f _ (is_avl s))). - - Definition union (s s':t) : t := - let (u,p) := Raw.union _ _ (is_bst s) (is_avl s) (is_bst s') (is_avl s') in - let (b,p) := p in - let (a,_) := p in - Bbst u b a. + (@Bst (fst p) (partition_bst_1 f (is_bst s)), + @Bst (snd p) (partition_bst_2 f (is_bst s))). - Definition union' (s s' : t) : t := - Bbst _ (Raw.union'_bst _ _ (is_bst s) (is_avl s) (is_bst s') (is_avl s')) - (Raw.union'_avl _ _ (is_avl s) (is_avl s')). + Definition equal (s s':t) : bool := Raw.equal s s'. + Definition subset (s s':t) : bool := Raw.subset s s'. - Definition equal (s s': t) : bool := if Raw.equal _ _ (is_bst s) (is_bst s') then true else false. - Definition equal' (s s':t) : bool := Raw.equal' s s'. + Definition eq (s s':t) : Prop := Raw.Equal s s'. + Definition lt (s s':t) : Prop := Raw.Proofs.lt s s'. - Definition subset (s s':t) : bool := if Raw.subset _ _ (is_bst s) (is_bst s') then true else false. - Definition subset' (s s':t) : bool := Raw.subset' s s'. - - Definition eq (s s':t) : Prop := Raw.eq s s'. - Definition lt (s s':t) : Prop := Raw.lt s s'. - - Definition compare (s s':t) : Compare lt eq s s'. + Definition compare (s s':t) : Compare lt eq s s'. Proof. - intros; elim (Raw.compare _ _ (is_bst s) (is_bst s')); - [ constructor 1 | constructor 2 | constructor 3 ]; - auto. + intros (s,b) (s',b'). + generalize (compare_Cmp s s'). + destruct Raw.compare; intros; [apply EQ|apply LT|apply GT]; red; auto. Defined. (* specs *) @@ -2634,260 +1886,164 @@ Module IntMake (I:Int)(X: OrderedType) <: S with Module E := X. Variable s s' s'': t. Variable x y : elt. - Hint Resolve is_bst is_avl. + Hint Resolve is_bst. Lemma mem_1 : In x s -> mem x s = true. - Proof. exact (Raw.mem_1 s x (is_bst s)). Qed. + Proof. exact (mem_1 (is_bst s)). Qed. Lemma mem_2 : mem x s = true -> In x s. - Proof. exact (Raw.mem_2 s x). Qed. + Proof. exact (@mem_2 s x). Qed. Lemma equal_1 : Equal s s' -> equal s s' = true. - Proof. - unfold equal; destruct (Raw.equal s s'); simpl; auto. - Qed. - + Proof. exact (equal_1 (is_bst s) (is_bst s')). Qed. Lemma equal_2 : equal s s' = true -> Equal s s'. - Proof. - unfold equal; destruct (Raw.equal s s'); simpl; intuition; discriminate. - Qed. + Proof. exact (@equal_2 s s'). Qed. - Lemma equal'_1 : Equal s s' -> equal' s s' = true. - Proof. exact (Raw.equal'_1 _ _ (is_bst s) (is_avl s) (is_bst s') (is_avl s')). Qed. - Lemma equal'_2 : equal' s s' = true -> Equal s s'. - Proof. exact (Raw.equal'_2 _ _ (is_bst s) (is_avl s) (is_bst s') (is_avl s')). Qed. + Ltac wrap t H := unfold t, In; simpl; rewrite H; auto; intuition. Lemma subset_1 : Subset s s' -> subset s s' = true. - Proof. - unfold subset; destruct (Raw.subset s s'); simpl; intuition. - Qed. - + Proof. wrap subset subset_12. Qed. Lemma subset_2 : subset s s' = true -> Subset s s'. - Proof. - unfold subset; destruct (Raw.subset s s'); simpl; intuition discriminate. - Qed. - - Lemma subset'_1 : Subset s s' -> subset' s s' = true. - Proof. exact (Raw.subset'_1 _ _ (is_bst s) (is_avl s) (is_bst s') (is_avl s')). Qed. - Lemma subset'_2 : subset' s s' = true -> Subset s s'. - Proof. exact (Raw.subset'_2 _ _ (is_bst s) (is_avl s) (is_bst s') (is_avl s')). Qed. + Proof. wrap subset subset_12. Qed. Lemma empty_1 : Empty empty. - Proof. exact Raw.empty_1. Qed. + Proof. exact empty_1. Qed. Lemma is_empty_1 : Empty s -> is_empty s = true. - Proof. exact (Raw.is_empty_1 s). Qed. + Proof. exact (@is_empty_1 s). Qed. Lemma is_empty_2 : is_empty s = true -> Empty s. - Proof. exact (Raw.is_empty_2 s). Qed. + Proof. exact (@is_empty_2 s). Qed. Lemma add_1 : E.eq x y -> In y (add x s). - Proof. - unfold add, In; simpl; rewrite Raw.add_in; auto. - Qed. - + Proof. wrap add add_in. Qed. Lemma add_2 : In y s -> In y (add x s). - Proof. - unfold add, In; simpl; rewrite Raw.add_in; auto. - Qed. - + Proof. wrap add add_in. Qed. Lemma add_3 : ~ E.eq x y -> In y (add x s) -> In y s. - Proof. - unfold add, In; simpl; rewrite Raw.add_in; intuition. - elim H; auto. - Qed. + Proof. wrap add add_in. elim H; auto. Qed. Lemma remove_1 : E.eq x y -> ~ In y (remove x s). - Proof. - unfold remove, In; simpl; rewrite Raw.remove_in; intuition. - Qed. - + Proof. wrap remove remove_in. Qed. Lemma remove_2 : ~ E.eq x y -> In y s -> In y (remove x s). - Proof. - unfold remove, In; simpl; rewrite Raw.remove_in; intuition. - Qed. - + Proof. wrap remove remove_in. Qed. Lemma remove_3 : In y (remove x s) -> In y s. - Proof. - unfold remove, In; simpl; rewrite Raw.remove_in; intuition. - Qed. + Proof. wrap remove remove_in. Qed. Lemma singleton_1 : In y (singleton x) -> E.eq x y. - Proof. exact (Raw.singleton_1 x y). Qed. + Proof. exact (@singleton_1 x y). Qed. Lemma singleton_2 : E.eq x y -> In y (singleton x). - Proof. exact (Raw.singleton_2 x y). Qed. + Proof. exact (@singleton_2 x y). Qed. Lemma union_1 : In x (union s s') -> In x s \/ In x s'. - Proof. - unfold union, In; simpl. - destruct (Raw.union s s' (is_bst s) (is_avl s) (is_bst s') (is_avl s')) - as (u,(b,(a,i))). - simpl in *; rewrite i; auto. - Qed. - + Proof. wrap union union_in. Qed. Lemma union_2 : In x s -> In x (union s s'). - Proof. - unfold union, In; simpl. - destruct (Raw.union s s' (is_bst s) (is_avl s) (is_bst s') (is_avl s')) - as (u,(b,(a,i))). - simpl in *; rewrite i; auto. - Qed. - + Proof. wrap union union_in. Qed. Lemma union_3 : In x s' -> In x (union s s'). - Proof. - unfold union, In; simpl. - destruct (Raw.union s s' (is_bst s) (is_avl s) (is_bst s') (is_avl s')) - as (u,(b,(a,i))). - simpl in *; rewrite i; auto. - Qed. - - Lemma union'_1 : In x (union' s s') -> In x s \/ In x s'. - Proof. - unfold union', In; simpl; rewrite Raw.union'_in; intuition. - Qed. - - Lemma union'_2 : In x s -> In x (union' s s'). - Proof. - unfold union', In; simpl; rewrite Raw.union'_in; intuition. - Qed. - - Lemma union'_3 : In x s' -> In x (union' s s'). - Proof. - unfold union', In; simpl; rewrite Raw.union'_in; intuition. - Qed. + Proof. wrap union union_in. Qed. Lemma inter_1 : In x (inter s s') -> In x s. - Proof. - unfold inter, In; simpl; rewrite Raw.inter_in; intuition. - Qed. - + Proof. wrap inter inter_in. Qed. Lemma inter_2 : In x (inter s s') -> In x s'. - Proof. - unfold inter, In; simpl; rewrite Raw.inter_in; intuition. - Qed. - + Proof. wrap inter inter_in. Qed. Lemma inter_3 : In x s -> In x s' -> In x (inter s s'). - Proof. - unfold inter, In; simpl; rewrite Raw.inter_in; intuition. - Qed. + Proof. wrap inter inter_in. Qed. Lemma diff_1 : In x (diff s s') -> In x s. - Proof. - unfold diff, In; simpl; rewrite Raw.diff_in; intuition. - Qed. - + Proof. wrap diff diff_in. Qed. Lemma diff_2 : In x (diff s s') -> ~ In x s'. - Proof. - unfold diff, In; simpl; rewrite Raw.diff_in; intuition. - Qed. - + Proof. wrap diff diff_in. Qed. Lemma diff_3 : In x s -> ~ In x s' -> In x (diff s s'). - Proof. - unfold diff, In; simpl; rewrite Raw.diff_in; intuition. - Qed. + Proof. wrap diff diff_in. Qed. - Lemma fold_1 : forall (A : Set) (i : A) (f : elt -> A -> A), - fold A f s i = fold_left (fun a e => f e a) (elements s) i. - Proof. - unfold fold, elements; intros; apply Raw.fold_1; auto. - Qed. + Lemma fold_1 : forall (A : Type) (i : A) (f : elt -> A -> A), + fold f s i = fold_left (fun a e => f e a) (elements s) i. + Proof. unfold fold, elements; intros; apply fold_1; auto. Qed. Lemma cardinal_1 : cardinal s = length (elements s). Proof. - unfold cardinal, elements; intros; apply Raw.cardinal_elements_1; auto. + unfold cardinal, elements; intros; apply elements_cardinal; auto. Qed. Section Filter. Variable f : elt -> bool. Lemma filter_1 : compat_bool E.eq f -> In x (filter f s) -> In x s. - Proof. - intro; unfold filter, In; simpl; rewrite Raw.filter_in; intuition. - Qed. - + Proof. intro. wrap filter filter_in. Qed. Lemma filter_2 : compat_bool E.eq f -> In x (filter f s) -> f x = true. - Proof. - intro; unfold filter, In; simpl; rewrite Raw.filter_in; intuition. - Qed. - + Proof. intro. wrap filter filter_in. Qed. Lemma filter_3 : compat_bool E.eq f -> In x s -> f x = true -> In x (filter f s). - Proof. - intro; unfold filter, In; simpl; rewrite Raw.filter_in; intuition. - Qed. + Proof. intro. wrap filter filter_in. Qed. Lemma for_all_1 : compat_bool E.eq f -> For_all (fun x => f x = true) s -> for_all f s = true. - Proof. exact (Raw.for_all_1 f s). Qed. + Proof. exact (@for_all_1 f s). Qed. Lemma for_all_2 : compat_bool E.eq f -> for_all f s = true -> For_all (fun x => f x = true) s. - Proof. exact (Raw.for_all_2 f s). Qed. + Proof. exact (@for_all_2 f s). Qed. Lemma exists_1 : compat_bool E.eq f -> Exists (fun x => f x = true) s -> exists_ f s = true. - Proof. exact (Raw.exists_1 f s). Qed. + Proof. exact (@exists_1 f s). Qed. Lemma exists_2 : compat_bool E.eq f -> exists_ f s = true -> Exists (fun x => f x = true) s. - Proof. exact (Raw.exists_2 f s). Qed. + Proof. exact (@exists_2 f s). Qed. Lemma partition_1 : compat_bool E.eq f -> Equal (fst (partition f s)) (filter f s). Proof. unfold partition, filter, Equal, In; simpl ;intros H a. - rewrite Raw.partition_in_1; auto. - rewrite Raw.filter_in; intuition. + rewrite partition_in_1, filter_in; intuition. Qed. Lemma partition_2 : compat_bool E.eq f -> Equal (snd (partition f s)) (filter (fun x => negb (f x)) s). Proof. unfold partition, filter, Equal, In; simpl ;intros H a. - rewrite Raw.partition_in_2; auto. - rewrite Raw.filter_in; intuition. - red; intros. - f_equal; auto. - destruct (f a); auto. + rewrite partition_in_2, filter_in; intuition. + rewrite H2; auto. destruct (f a); auto. + red; intros; f_equal. + rewrite (H _ _ H0); auto. Qed. End Filter. Lemma elements_1 : In x s -> InA E.eq x (elements s). - Proof. - unfold elements, In; rewrite Raw.elements_in; auto. - Qed. - + Proof. wrap elements elements_in. Qed. Lemma elements_2 : InA E.eq x (elements s) -> In x s. - Proof. - unfold elements, In; rewrite Raw.elements_in; auto. - Qed. - + Proof. wrap elements elements_in. Qed. Lemma elements_3 : sort E.lt (elements s). - Proof. exact (Raw.elements_sort _ (is_bst s)). Qed. + Proof. exact (elements_sort (is_bst s)). Qed. + Lemma elements_3w : NoDupA E.eq (elements s). + Proof. exact (elements_nodup (is_bst s)). Qed. Lemma min_elt_1 : min_elt s = Some x -> In x s. - Proof. exact (Raw.min_elt_1 s x). Qed. + Proof. exact (@min_elt_1 s x). Qed. Lemma min_elt_2 : min_elt s = Some x -> In y s -> ~ E.lt y x. - Proof. exact (Raw.min_elt_2 s x y (is_bst s)). Qed. + Proof. exact (@min_elt_2 s x y (is_bst s)). Qed. Lemma min_elt_3 : min_elt s = None -> Empty s. - Proof. exact (Raw.min_elt_3 s). Qed. + Proof. exact (@min_elt_3 s). Qed. Lemma max_elt_1 : max_elt s = Some x -> In x s. - Proof. exact (Raw.max_elt_1 s x). Qed. + Proof. exact (@max_elt_1 s x). Qed. Lemma max_elt_2 : max_elt s = Some x -> In y s -> ~ E.lt x y. - Proof. exact (Raw.max_elt_2 s x y (is_bst s)). Qed. + Proof. exact (@max_elt_2 s x y (is_bst s)). Qed. Lemma max_elt_3 : max_elt s = None -> Empty s. - Proof. exact (Raw.max_elt_3 s). Qed. + Proof. exact (@max_elt_3 s). Qed. Lemma choose_1 : choose s = Some x -> In x s. - Proof. exact (Raw.choose_1 s x). Qed. + Proof. exact (@choose_1 s x). Qed. Lemma choose_2 : choose s = None -> Empty s. - Proof. exact (Raw.choose_2 s). Qed. + Proof. exact (@choose_2 s). Qed. + Lemma choose_3 : choose s = Some x -> choose s' = Some y -> + Equal s s' -> E.eq x y. + Proof. exact (@choose_3 _ _ (is_bst s) (is_bst s') x y). Qed. Lemma eq_refl : eq s s. - Proof. exact (Raw.eq_refl s). Qed. + Proof. exact (eq_refl s). Qed. Lemma eq_sym : eq s s' -> eq s' s. - Proof. exact (Raw.eq_sym s s'). Qed. + Proof. exact (@eq_sym s s'). Qed. Lemma eq_trans : eq s s' -> eq s' s'' -> eq s s''. - Proof. exact (Raw.eq_trans s s' s''). Qed. + Proof. exact (@eq_trans s s' s''). Qed. Lemma lt_trans : lt s s' -> lt s' s'' -> lt s s''. - Proof. exact (Raw.lt_trans s s' s''). Qed. + Proof. exact (@lt_trans s s' s''). Qed. Lemma lt_not_eq : lt s s' -> ~eq s s'. - Proof. exact (Raw.lt_not_eq _ _ (is_bst s) (is_bst s')). Qed. + Proof. exact (@lt_not_eq _ _ (is_bst s) (is_bst s')). Qed. End Specs. End IntMake. @@ -2897,4 +2053,3 @@ End IntMake. Module Make (X: OrderedType) <: S with Module E := X :=IntMake(Z_as_Int)(X). - diff --git a/theories/FSets/FSetBridge.v b/theories/FSets/FSetBridge.v index 08985cfc..0622451f 100644 --- a/theories/FSets/FSetBridge.v +++ b/theories/FSets/FSetBridge.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (***********************************************************************) -(* $Id: FSetBridge.v 8834 2006-05-20 00:41:35Z letouzey $ *) +(* $Id: FSetBridge.v 10601 2008-02-28 00:20:33Z letouzey $ *) (** * Finite sets library *) @@ -27,7 +27,7 @@ Module DepOfNodep (M: S) <: Sdep with Module E := M.E. Definition empty : {s : t | Empty s}. Proof. - exists empty; auto. + exists empty; auto with set. Qed. Definition is_empty : forall s : t, {Empty s} + {~ Empty s}. @@ -66,12 +66,12 @@ Module DepOfNodep (M: S) <: Sdep with Module E := M.E. {s' : t | forall y : elt, In y s' <-> ~ E.eq x y /\ In y s}. Proof. intros; exists (remove x s); intuition. - absurd (In x (remove x s)); auto. + absurd (In x (remove x s)); auto with set. apply In_1 with y; auto. elim (ME.eq_dec x y); intros; auto. - absurd (In x (remove x s)); auto. + absurd (In x (remove x s)); auto with set. apply In_1 with y; auto. - eauto. + eauto with set. Qed. Definition union : @@ -83,14 +83,14 @@ Module DepOfNodep (M: S) <: Sdep with Module E := M.E. Definition inter : forall s s' : t, {s'' : t | forall x : elt, In x s'' <-> In x s /\ In x s'}. Proof. - intros; exists (inter s s'); intuition; eauto. + intros; exists (inter s s'); intuition; eauto with set. Qed. Definition diff : forall s s' : t, {s'' : t | forall x : elt, In x s'' <-> In x s /\ ~ In x s'}. Proof. - intros; exists (diff s s'); intuition; eauto. - absurd (In x s'); eauto. + intros; exists (diff s s'); intuition; eauto with set. + absurd (In x s'); eauto with set. Qed. Definition equal : forall s s' : t, {Equal s s'} + {~ Equal s s'}. @@ -115,7 +115,7 @@ Module DepOfNodep (M: S) <: Sdep with Module E := M.E. Defined. Definition fold : - forall (A : Set) (f : elt -> A -> A) (s : t) (i : A), + forall (A : Type) (f : elt -> A -> A) (s : t) (i : A), {r : A | let (l,_) := elements s in r = fold_left (fun a e => f e a) l i}. Proof. @@ -150,7 +150,7 @@ Module DepOfNodep (M: S) <: Sdep with Module E := M.E. exists (filter (fdec Pdec) s). intro H; assert (compat_bool E.eq (fdec Pdec)); auto. intuition. - eauto. + eauto with set. generalize (filter_2 H0 H1). unfold fdec in |- *. case (Pdec x); intuition. @@ -226,7 +226,7 @@ Module DepOfNodep (M: S) <: Sdep with Module E := M.E. generalize H4; unfold For_all, Equal in |- *; intuition. elim (H0 x); intros. assert (fdec Pdec x = true). - eauto. + eapply filter_2; eauto with set. generalize H8; unfold fdec in |- *; case (Pdec x); intuition. inversion H9. generalize H; unfold For_all, Equal in |- *; intuition. @@ -238,8 +238,8 @@ Module DepOfNodep (M: S) <: Sdep with Module E := M.E. set (b := fdec Pdec x) in *; generalize (refl_equal b); pattern b at -1 in |- *; case b; unfold b in |- *; [ left | right ]. - elim (H4 x); intros _ B; apply B; auto. - elim (H x); intros _ B; apply B; auto. + elim (H4 x); intros _ B; apply B; auto with set. + elim (H x); intros _ B; apply B; auto with set. apply filter_3; auto. rewrite H5; auto. eapply (filter_1 (s:=s) (x:=x) H2); elim (H4 x); intros B _; apply B; @@ -247,12 +247,63 @@ Module DepOfNodep (M: S) <: Sdep with Module E := M.E. eapply (filter_1 (s:=s) (x:=x) H3); elim (H x); intros B _; apply B; auto. Qed. + Definition choose_aux: forall s : t, + { x : elt | M.choose s = Some x } + { M.choose s = None }. + Proof. + intros. + destruct (M.choose s); [left | right]; auto. + exists e; auto. + Qed. + Definition choose : forall s : t, {x : elt | In x s} + {Empty s}. - Proof. - intros. - generalize (choose_1 (s:=s)) (choose_2 (s:=s)). - case (choose s); [ left | right ]; auto. - exists e; auto. + Proof. + intros; destruct (choose_aux s) as [(x,Hx)|H]. + left; exists x; apply choose_1; auto. + right; apply choose_2; auto. + Defined. + + Lemma choose_ok1 : + forall s x, M.choose s = Some x <-> exists H:In x s, + choose s = inleft _ (exist (fun x => In x s) x H). + Proof. + intros s x. + unfold choose; split; intros. + destruct (choose_aux s) as [(y,Hy)|H']; try congruence. + replace x with y in * by congruence. + exists (choose_1 Hy); auto. + destruct H. + destruct (choose_aux s) as [(y,Hy)|H']; congruence. + Qed. + + Lemma choose_ok2 : + forall s, M.choose s = None <-> exists H:Empty s, + choose s = inright _ H. + Proof. + intros s. + unfold choose; split; intros. + destruct (choose_aux s) as [(y,Hy)|H']; try congruence. + exists (choose_2 H'); auto. + destruct H. + destruct (choose_aux s) as [(y,Hy)|H']; congruence. + Qed. + + Lemma choose_equal : forall s s', Equal s s' -> + match choose s, choose s' with + | inleft (exist x _), inleft (exist x' _) => E.eq x x' + | inright _, inright _ => True + | _, _ => False + end. + Proof. + intros. + generalize (@M.choose_1 s)(@M.choose_2 s) + (@M.choose_1 s')(@M.choose_2 s')(@M.choose_3 s s') + (choose_ok1 s)(choose_ok2 s)(choose_ok1 s')(choose_ok2 s'). + destruct (choose s) as [(x,Hx)|Hx]; destruct (choose s') as [(x',Hx')|Hx']; auto; intros. + apply H4; auto. + rewrite H5; exists Hx; auto. + rewrite H7; exists Hx'; auto. + apply Hx' with x; unfold Equal in H; rewrite <-H; auto. + apply Hx with x'; unfold Equal in H; rewrite H; auto. Qed. Definition min_elt : @@ -391,6 +442,15 @@ Module NodepOfDep (M: Sdep) <: S with Module E := M.E. intro s; unfold choose in |- *; case (M.choose s); auto. simple destruct s0; intros; discriminate H. Qed. + + Lemma choose_3 : forall s s' x x', + choose s = Some x -> choose s' = Some x' -> Equal s s' -> E.eq x x'. + Proof. + unfold choose; intros. + generalize (M.choose_equal H1); clear H1. + destruct (M.choose s) as [(?,?)|?]; destruct (M.choose s') as [(?,?)|?]; + simpl; auto; congruence. + Qed. Definition elements (s : t) : list elt := let (l, _) := elements s in l. @@ -408,6 +468,10 @@ Module NodepOfDep (M: Sdep) <: S with Module E := M.E. Proof. intros; unfold elements in |- *; case (M.elements s); firstorder. Qed. + Hint Resolve elements_3. + + Lemma elements_3w : forall s : t, NoDupA E.eq (elements s). + Proof. auto. Qed. Definition min_elt (s : t) : option elt := match min_elt s with @@ -578,11 +642,11 @@ Module NodepOfDep (M: Sdep) <: S with Module E := M.E. destruct (M.elements s); auto. Qed. - Definition fold (B : Set) (f : elt -> B -> B) (i : t) + Definition fold (B : Type) (f : elt -> B -> B) (i : t) (s : B) : B := let (fold, _) := fold f i s in fold. Lemma fold_1 : - forall (s : t) (A : Set) (i : A) (f : elt -> A -> A), + forall (s : t) (A : Type) (i : A) (f : elt -> A -> A), fold f s i = fold_left (fun a e => f e a) (elements s) i. Proof. intros; unfold fold in |- *; case (M.fold f s i); unfold elements in *; diff --git a/theories/FSets/FSetDecide.v b/theories/FSets/FSetDecide.v new file mode 100644 index 00000000..0639c1f1 --- /dev/null +++ b/theories/FSets/FSetDecide.v @@ -0,0 +1,841 @@ +(***********************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* ... -> Pk -> P +>> + where [P]'s are defined by the grammar: +<< + +P ::= +| Q +| Empty F +| Subset F F' +| Equal F F' + +Q ::= +| E.eq X X' +| In X F +| Q /\ Q' +| Q \/ Q' +| Q -> Q' +| Q <-> Q' +| ~ Q +| True +| False + +F ::= +| S +| empty +| singleton X +| add X F +| remove X F +| union F F' +| inter F F' +| diff F F' + +X ::= x1 | ... | xm +S ::= s1 | ... | sn + +>> + +The tactic will also work on some goals that vary slightly from +the above form: +- The variables and hypotheses may be mixed in any order and may + have already been introduced into the context. Moreover, + there may be additional, unrelated hypotheses mixed in (these + will be ignored). +- A conjunction of hypotheses will be handled as easily as + separate hypotheses, i.e., [P1 /\ P2 -> P] can be solved iff + [P1 -> P2 -> P] can be solved. +- [fsetdec] should solve any goal if the FSet-related hypotheses + are contradictory. +- [fsetdec] will first perform any necessary zeta and beta + reductions and will invoke [subst] to eliminate any Coq + equalities between finite sets or their elements. +- If [E.eq] is convertible with Coq's equality, it will not + matter which one is used in the hypotheses or conclusion. +- The tactic can solve goals where the finite sets or set + elements are expressed by Coq terms that are more complicated + than variables. However, non-local definitions are not + expanded, and Coq equalities between non-variable terms are + not used. For example, this goal will be solved: +<< + forall (f : t -> t), + forall (g : elt -> elt), + forall (s1 s2 : t), + forall (x1 x2 : elt), + Equal s1 (f s2) -> + E.eq x1 (g (g x2)) -> + In x1 s1 -> + In (g (g x2)) (f s2) +>> + This one will not be solved: +<< + forall (f : t -> t), + forall (g : elt -> elt), + forall (s1 s2 : t), + forall (x1 x2 : elt), + Equal s1 (f s2) -> + E.eq x1 (g x2) -> + In x1 s1 -> + g x2 = g (g x2) -> + In (g (g x2)) (f s2) +>> +*) + + (** * Facts and Tactics for Propositional Logic + These lemmas and tactics are in a module so that they do + not affect the namespace if you import the enclosing + module [Decide]. *) + Module FSetLogicalFacts. + Require Export Decidable. + Require Export Setoid. + + (** ** Lemmas and Tactics About Decidable Propositions *) + + (** ** Propositional Equivalences Involving Negation + These are all written with the unfolded form of + negation, since I am not sure if setoid rewriting will + always perform conversion. *) + + (** ** Tactics for Negations *) + + Tactic Notation "fold" "any" "not" := + repeat ( + match goal with + | H: context [?P -> False] |- _ => + fold (~ P) in H + | |- context [?P -> False] => + fold (~ P) + end). + + (** [push not using db] will pushes all negations to the + leaves of propositions in the goal, using the lemmas in + [db] to assist in checking the decidability of the + propositions involved. If [using db] is omitted, then + [core] will be used. Additional versions are provided + to manipulate the hypotheses or the hypotheses and goal + together. + + XXX: This tactic and the similar subsequent ones should + have been defined using [autorewrite]. However, dealing + with multiples rewrite sites and side-conditions is + done more cleverly with the following explicit + analysis of goals. *) + + Ltac or_not_l_iff P Q tac := + (rewrite (or_not_l_iff_1 P Q) by tac) || + (rewrite (or_not_l_iff_2 P Q) by tac). + + Ltac or_not_r_iff P Q tac := + (rewrite (or_not_r_iff_1 P Q) by tac) || + (rewrite (or_not_r_iff_2 P Q) by tac). + + Ltac or_not_l_iff_in P Q H tac := + (rewrite (or_not_l_iff_1 P Q) in H by tac) || + (rewrite (or_not_l_iff_2 P Q) in H by tac). + + Ltac or_not_r_iff_in P Q H tac := + (rewrite (or_not_r_iff_1 P Q) in H by tac) || + (rewrite (or_not_r_iff_2 P Q) in H by tac). + + Tactic Notation "push" "not" "using" ident(db) := + let dec := solve_decidable using db in + unfold not, iff; + repeat ( + match goal with + | |- context [True -> False] => rewrite not_true_iff + | |- context [False -> False] => rewrite not_false_iff + | |- context [(?P -> False) -> False] => rewrite (not_not_iff P) by dec + | |- context [(?P -> False) -> (?Q -> False)] => + rewrite (contrapositive P Q) by dec + | |- context [(?P -> False) \/ ?Q] => or_not_l_iff P Q dec + | |- context [?P \/ (?Q -> False)] => or_not_r_iff P Q dec + | |- context [(?P -> False) -> ?Q] => rewrite (imp_not_l P Q) by dec + | |- context [?P \/ ?Q -> False] => rewrite (not_or_iff P Q) + | |- context [?P /\ ?Q -> False] => rewrite (not_and_iff P Q) + | |- context [(?P -> ?Q) -> False] => rewrite (not_imp_iff P Q) by dec + end); + fold any not. + + Tactic Notation "push" "not" := + push not using core. + + Tactic Notation + "push" "not" "in" "*" "|-" "using" ident(db) := + let dec := solve_decidable using db in + unfold not, iff in * |-; + repeat ( + match goal with + | H: context [True -> False] |- _ => rewrite not_true_iff in H + | H: context [False -> False] |- _ => rewrite not_false_iff in H + | H: context [(?P -> False) -> False] |- _ => + rewrite (not_not_iff P) in H by dec + | H: context [(?P -> False) -> (?Q -> False)] |- _ => + rewrite (contrapositive P Q) in H by dec + | H: context [(?P -> False) \/ ?Q] |- _ => or_not_l_iff_in P Q H dec + | H: context [?P \/ (?Q -> False)] |- _ => or_not_r_iff_in P Q H dec + | H: context [(?P -> False) -> ?Q] |- _ => + rewrite (imp_not_l P Q) in H by dec + | H: context [?P \/ ?Q -> False] |- _ => rewrite (not_or_iff P Q) in H + | H: context [?P /\ ?Q -> False] |- _ => rewrite (not_and_iff P Q) in H + | H: context [(?P -> ?Q) -> False] |- _ => + rewrite (not_imp_iff P Q) in H by dec + end); + fold any not. + + Tactic Notation "push" "not" "in" "*" "|-" := + push not in * |- using core. + + Tactic Notation "push" "not" "in" "*" "using" ident(db) := + push not using db; push not in * |- using db. + Tactic Notation "push" "not" "in" "*" := + push not in * using core. + + (** A simple test case to see how this works. *) + Lemma test_push : forall P Q R : Prop, + decidable P -> + decidable Q -> + (~ True) -> + (~ False) -> + (~ ~ P) -> + (~ (P /\ Q) -> ~ R) -> + ((P /\ Q) \/ ~ R) -> + (~ (P /\ Q) \/ R) -> + (R \/ ~ (P /\ Q)) -> + (~ R \/ (P /\ Q)) -> + (~ P -> R) -> + (~ ((R -> P) \/ (Q -> R))) -> + (~ (P /\ R)) -> + (~ (P -> R)) -> + True. + Proof. + intros. push not in *. + (* note that ~(R->P) remains (since R isnt decidable) *) + tauto. + Qed. + + (** [pull not using db] will pull as many negations as + possible toward the top of the propositions in the goal, + using the lemmas in [db] to assist in checking the + decidability of the propositions involved. If [using + db] is omitted, then [core] will be used. Additional + versions are provided to manipulate the hypotheses or + the hypotheses and goal together. *) + + Tactic Notation "pull" "not" "using" ident(db) := + let dec := solve_decidable using db in + unfold not, iff; + repeat ( + match goal with + | |- context [True -> False] => rewrite not_true_iff + | |- context [False -> False] => rewrite not_false_iff + | |- context [(?P -> False) -> False] => rewrite (not_not_iff P) by dec + | |- context [(?P -> False) -> (?Q -> False)] => + rewrite (contrapositive P Q) by dec + | |- context [(?P -> False) \/ ?Q] => or_not_l_iff P Q dec + | |- context [?P \/ (?Q -> False)] => or_not_r_iff P Q dec + | |- context [(?P -> False) -> ?Q] => rewrite (imp_not_l P Q) by dec + | |- context [(?P -> False) /\ (?Q -> False)] => + rewrite <- (not_or_iff P Q) + | |- context [?P -> ?Q -> False] => rewrite <- (not_and_iff P Q) + | |- context [?P /\ (?Q -> False)] => rewrite <- (not_imp_iff P Q) by dec + | |- context [(?Q -> False) /\ ?P] => + rewrite <- (not_imp_rev_iff P Q) by dec + end); + fold any not. + + Tactic Notation "pull" "not" := + pull not using core. + + Tactic Notation + "pull" "not" "in" "*" "|-" "using" ident(db) := + let dec := solve_decidable using db in + unfold not, iff in * |-; + repeat ( + match goal with + | H: context [True -> False] |- _ => rewrite not_true_iff in H + | H: context [False -> False] |- _ => rewrite not_false_iff in H + | H: context [(?P -> False) -> False] |- _ => + rewrite (not_not_iff P) in H by dec + | H: context [(?P -> False) -> (?Q -> False)] |- _ => + rewrite (contrapositive P Q) in H by dec + | H: context [(?P -> False) \/ ?Q] |- _ => or_not_l_iff_in P Q H dec + | H: context [?P \/ (?Q -> False)] |- _ => or_not_r_iff_in P Q H dec + | H: context [(?P -> False) -> ?Q] |- _ => + rewrite (imp_not_l P Q) in H by dec + | H: context [(?P -> False) /\ (?Q -> False)] |- _ => + rewrite <- (not_or_iff P Q) in H + | H: context [?P -> ?Q -> False] |- _ => + rewrite <- (not_and_iff P Q) in H + | H: context [?P /\ (?Q -> False)] |- _ => + rewrite <- (not_imp_iff P Q) in H by dec + | H: context [(?Q -> False) /\ ?P] |- _ => + rewrite <- (not_imp_rev_iff P Q) in H by dec + end); + fold any not. + + Tactic Notation "pull" "not" "in" "*" "|-" := + pull not in * |- using core. + + Tactic Notation "pull" "not" "in" "*" "using" ident(db) := + pull not using db; pull not in * |- using db. + Tactic Notation "pull" "not" "in" "*" := + pull not in * using core. + + (** A simple test case to see how this works. *) + Lemma test_pull : forall P Q R : Prop, + decidable P -> + decidable Q -> + (~ True) -> + (~ False) -> + (~ ~ P) -> + (~ (P /\ Q) -> ~ R) -> + ((P /\ Q) \/ ~ R) -> + (~ (P /\ Q) \/ R) -> + (R \/ ~ (P /\ Q)) -> + (~ R \/ (P /\ Q)) -> + (~ P -> R) -> + (~ (R -> P) /\ ~ (Q -> R)) -> + (~ P \/ ~ R) -> + (P /\ ~ R) -> + (~ R /\ P) -> + True. + Proof. + intros. pull not in *. tauto. + Qed. + + End FSetLogicalFacts. + Import FSetLogicalFacts. + + (** * Auxiliary Tactics + Again, these lemmas and tactics are in a module so that + they do not affect the namespace if you import the + enclosing module [Decide]. *) + Module FSetDecideAuxiliary. + + (** ** Generic Tactics + We begin by defining a few generic, useful tactics. *) + + (** [if t then t1 else t2] executes [t] and, if it does not + fail, then [t1] will be applied to all subgoals + produced. If [t] fails, then [t2] is executed. *) + Tactic Notation + "if" tactic(t) + "then" tactic(t1) + "else" tactic(t2) := + first [ t; first [ t1 | fail 2 ] | t2 ]. + + (** [prop P holds by t] succeeds (but does not modify the + goal or context) if the proposition [P] can be proved by + [t] in the current context. Otherwise, the tactic + fails. *) + Tactic Notation "prop" constr(P) "holds" "by" tactic(t) := + let H := fresh in + assert P as H by t; + clear H. + + (** This tactic acts just like [assert ... by ...] but will + fail if the context already contains the proposition. *) + Tactic Notation "assert" "new" constr(e) "by" tactic(t) := + match goal with + | H: e |- _ => fail 1 + | _ => assert e by t + end. + + (** [subst++] is similar to [subst] except that + - it never fails (as [subst] does on recursive + equations), + - it substitutes locally defined variable for their + definitions, + - it performs beta reductions everywhere, which may + arise after substituting a locally defined function + for its definition. + *) + Tactic Notation "subst" "++" := + repeat ( + match goal with + | x : _ |- _ => subst x + end); + cbv zeta beta in *. + + (** [decompose records] calls [decompose record H] on every + relevant hypothesis [H]. *) + Tactic Notation "decompose" "records" := + repeat ( + match goal with + | H: _ |- _ => progress (decompose record H); clear H + end). + + (** ** Discarding Irrelevant Hypotheses + We will want to clear the context of any + non-FSet-related hypotheses in order to increase the + speed of the tactic. To do this, we will need to be + able to decide which are relevant. We do this by making + a simple inductive definition classifying the + propositions of interest. *) + + Inductive FSet_elt_Prop : Prop -> Prop := + | eq_Prop : forall (S : Set) (x y : S), + FSet_elt_Prop (x = y) + | eq_elt_prop : forall x y, + FSet_elt_Prop (E.eq x y) + | In_elt_prop : forall x s, + FSet_elt_Prop (In x s) + | True_elt_prop : + FSet_elt_Prop True + | False_elt_prop : + FSet_elt_Prop False + | conj_elt_prop : forall P Q, + FSet_elt_Prop P -> + FSet_elt_Prop Q -> + FSet_elt_Prop (P /\ Q) + | disj_elt_prop : forall P Q, + FSet_elt_Prop P -> + FSet_elt_Prop Q -> + FSet_elt_Prop (P \/ Q) + | impl_elt_prop : forall P Q, + FSet_elt_Prop P -> + FSet_elt_Prop Q -> + FSet_elt_Prop (P -> Q) + | not_elt_prop : forall P, + FSet_elt_Prop P -> + FSet_elt_Prop (~ P). + + Inductive FSet_Prop : Prop -> Prop := + | elt_FSet_Prop : forall P, + FSet_elt_Prop P -> + FSet_Prop P + | Empty_FSet_Prop : forall s, + FSet_Prop (Empty s) + | Subset_FSet_Prop : forall s1 s2, + FSet_Prop (Subset s1 s2) + | Equal_FSet_Prop : forall s1 s2, + FSet_Prop (Equal s1 s2). + + (** Here is the tactic that will throw away hypotheses that + are not useful (for the intended scope of the [fsetdec] + tactic). *) + Hint Constructors FSet_elt_Prop FSet_Prop : FSet_Prop. + Ltac discard_nonFSet := + decompose records; + repeat ( + match goal with + | H : ?P |- _ => + if prop (FSet_Prop P) holds by + (auto 100 with FSet_Prop) + then fail + else clear H + end). + + (** ** Turning Set Operators into Propositional Connectives + The lemmas from [FSetFacts] will be used to break down + set operations into propositional formulas built over + the predicates [In] and [E.eq] applied only to + variables. We are going to use them with [autorewrite]. + *) + + Hint Rewrite + F.empty_iff F.singleton_iff F.add_iff F.remove_iff + F.union_iff F.inter_iff F.diff_iff + : set_simpl. + + (** ** Decidability of FSet Propositions *) + + (** [In] is decidable. *) + Lemma dec_In : forall x s, + decidable (In x s). + Proof. + red; intros; generalize (F.mem_iff s x); case (mem x s); intuition. + Qed. + + (** [E.eq] is decidable. *) + Lemma dec_eq : forall (x y : E.t), + decidable (E.eq x y). + Proof. + red; intros x y; destruct (E.eq_dec x y); auto. + Qed. + + (** The hint database [FSet_decidability] will be given to + the [push_neg] tactic from the module [Negation]. *) + Hint Resolve dec_In dec_eq : FSet_decidability. + + (** ** Normalizing Propositions About Equality + We have to deal with the fact that [E.eq] may be + convertible with Coq's equality. Thus, we will find the + following tactics useful to replace one form with the + other everywhere. *) + + (** The next tactic, [Logic_eq_to_E_eq], mentions the term + [E.t]; thus, we must ensure that [E.t] is used in favor + of any other convertible but syntactically distinct + term. *) + Ltac change_to_E_t := + repeat ( + match goal with + | H : ?T |- _ => + progress (change T with E.t in H); + repeat ( + match goal with + | J : _ |- _ => progress (change T with E.t in J) + | |- _ => progress (change T with E.t) + end ) + end). + + (** These two tactics take us from Coq's built-in equality + to [E.eq] (and vice versa) when possible. *) + + Ltac Logic_eq_to_E_eq := + repeat ( + match goal with + | H: _ |- _ => + progress (change (@Logic.eq E.t) with E.eq in H) + | |- _ => + progress (change (@Logic.eq E.t) with E.eq) + end). + + Ltac E_eq_to_Logic_eq := + repeat ( + match goal with + | H: _ |- _ => + progress (change E.eq with (@Logic.eq E.t) in H) + | |- _ => + progress (change E.eq with (@Logic.eq E.t)) + end). + + (** This tactic works like the built-in tactic [subst], but + at the level of set element equality (which may not be + the convertible with Coq's equality). *) + Ltac substFSet := + repeat ( + match goal with + | H: E.eq ?x ?y |- _ => rewrite H in *; clear H + end). + + (** ** Considering Decidability of Base Propositions + This tactic adds assertions about the decidability of + [E.eq] and [In] to the context. This is necessary for + the completeness of the [fsetdec] tactic. However, in + order to minimize the cost of proof search, we should be + careful to not add more than we need. Once negations + have been pushed to the leaves of the propositions, we + only need to worry about decidability for those base + propositions that appear in a negated form. *) + Ltac assert_decidability := + (** We actually don't want these rules to fire if the + syntactic context in the patterns below is trivially + empty, but we'll just do some clean-up at the + afterward. *) + repeat ( + match goal with + | H: context [~ E.eq ?x ?y] |- _ => + assert new (E.eq x y \/ ~ E.eq x y) by (apply dec_eq) + | H: context [~ In ?x ?s] |- _ => + assert new (In x s \/ ~ In x s) by (apply dec_In) + | |- context [~ E.eq ?x ?y] => + assert new (E.eq x y \/ ~ E.eq x y) by (apply dec_eq) + | |- context [~ In ?x ?s] => + assert new (In x s \/ ~ In x s) by (apply dec_In) + end); + (** Now we eliminate the useless facts we added (because + they would likely be very harmful to performance). *) + repeat ( + match goal with + | _: ~ ?P, H : ?P \/ ~ ?P |- _ => clear H + end). + + (** ** Handling [Empty], [Subset], and [Equal] + This tactic instantiates universally quantified + hypotheses (which arise from the unfolding of [Empty], + [Subset], and [Equal]) for each of the set element + expressions that is involved in some membership or + equality fact. Then it throws away those hypotheses, + which should no longer be needed. *) + Ltac inst_FSet_hypotheses := + repeat ( + match goal with + | H : forall a : E.t, _, + _ : context [ In ?x _ ] |- _ => + let P := type of (H x) in + assert new P by (exact (H x)) + | H : forall a : E.t, _ + |- context [ In ?x _ ] => + let P := type of (H x) in + assert new P by (exact (H x)) + | H : forall a : E.t, _, + _ : context [ E.eq ?x _ ] |- _ => + let P := type of (H x) in + assert new P by (exact (H x)) + | H : forall a : E.t, _ + |- context [ E.eq ?x _ ] => + let P := type of (H x) in + assert new P by (exact (H x)) + | H : forall a : E.t, _, + _ : context [ E.eq _ ?x ] |- _ => + let P := type of (H x) in + assert new P by (exact (H x)) + | H : forall a : E.t, _ + |- context [ E.eq _ ?x ] => + let P := type of (H x) in + assert new P by (exact (H x)) + end); + repeat ( + match goal with + | H : forall a : E.t, _ |- _ => + clear H + end). + + (** ** The Core [fsetdec] Auxiliary Tactics *) + + (** Here is the crux of the proof search. Recursion through + [intuition]! (This will terminate if I correctly + understand the behavior of [intuition].) *) + Ltac fsetdec_rec := + try (match goal with + | H: E.eq ?x ?x -> False |- _ => destruct H + end); + (reflexivity || + contradiction || + (progress substFSet; intuition fsetdec_rec)). + + (** If we add [unfold Empty, Subset, Equal in *; intros;] to + the beginning of this tactic, it will satisfy the same + specification as the [fsetdec] tactic; however, it will + be much slower than necessary without the pre-processing + done by the wrapper tactic [fsetdec]. *) + Ltac fsetdec_body := + inst_FSet_hypotheses; + autorewrite with set_simpl in *; + push not in * using FSet_decidability; + substFSet; + assert_decidability; + auto using E.eq_refl; + (intuition fsetdec_rec) || + fail 1 + "because the goal is beyond the scope of this tactic". + + End FSetDecideAuxiliary. + Import FSetDecideAuxiliary. + + (** * The [fsetdec] Tactic + Here is the top-level tactic (the only one intended for + clients of this library). It's specification is given at + the top of the file. *) + Ltac fsetdec := + (** We first unfold any occurrences of [iff]. *) + unfold iff in *; + (** We fold occurrences of [not] because it is better for + [intros] to leave us with a goal of [~ P] than a goal of + [False]. *) + fold any not; intros; + (** Now we decompose conjunctions, which will allow the + [discard_nonFSet] and [assert_decidability] tactics to + do a much better job. *) + decompose records; + discard_nonFSet; + (** We unfold these defined propositions on finite sets. If + our goal was one of them, then have one more item to + introduce now. *) + unfold Empty, Subset, Equal in *; intros; + (** We now want to get rid of all uses of [=] in favor of + [E.eq]. However, the best way to eliminate a [=] is in + the context is with [subst], so we will try that first. + In fact, we may as well convert uses of [E.eq] into [=] + when possible before we do [subst] so that we can even + more mileage out of it. Then we will convert all + remaining uses of [=] back to [E.eq] when possible. We + use [change_to_E_t] to ensure that we have a canonical + name for set elements, so that [Logic_eq_to_E_eq] will + work properly. *) + change_to_E_t; E_eq_to_Logic_eq; subst++; Logic_eq_to_E_eq; + (** The next optimization is to swap a negated goal with a + negated hypothesis when possible. Any swap will improve + performance by eliminating the total number of + negations, but we will get the maximum benefit if we + swap the goal with a hypotheses mentioning the same set + element, so we try that first. If we reach the fourth + branch below, we attempt any swap. However, to maintain + completeness of this tactic, we can only perform such a + swap with a decidable proposition; hence, we first test + whether the hypothesis is an [FSet_elt_Prop], noting + that any [FSet_elt_Prop] is decidable. *) + pull not using FSet_decidability; + unfold not in *; + match goal with + | H: (In ?x ?r) -> False |- (In ?x ?s) -> False => + contradict H; fsetdec_body + | H: (In ?x ?r) -> False |- (E.eq ?x ?y) -> False => + contradict H; fsetdec_body + | H: (In ?x ?r) -> False |- (E.eq ?y ?x) -> False => + contradict H; fsetdec_body + | H: ?P -> False |- ?Q -> False => + if prop (FSet_elt_Prop P) holds by + (auto 100 with FSet_Prop) + then (contradict H; fsetdec_body) + else fsetdec_body + | |- _ => + fsetdec_body + end. + + (** * Examples *) + + Module FSetDecideTestCases. + + Lemma test_eq_trans_1 : forall x y z s, + E.eq x y -> + ~ ~ E.eq z y -> + In x s -> + In z s. + Proof. fsetdec. Qed. + + Lemma test_eq_trans_2 : forall x y z r s, + In x (singleton y) -> + ~ In z r -> + ~ ~ In z (add y r) -> + In x s -> + In z s. + Proof. fsetdec. Qed. + + Lemma test_eq_neq_trans_1 : forall w x y z s, + E.eq x w -> + ~ ~ E.eq x y -> + ~ E.eq y z -> + In w s -> + In w (remove z s). + Proof. fsetdec. Qed. + + Lemma test_eq_neq_trans_2 : forall w x y z r1 r2 s, + In x (singleton w) -> + ~ In x r1 -> + In x (add y r1) -> + In y r2 -> + In y (remove z r2) -> + In w s -> + In w (remove z s). + Proof. fsetdec. Qed. + + Lemma test_In_singleton : forall x, + In x (singleton x). + Proof. fsetdec. Qed. + + Lemma test_Subset_add_remove : forall x s, + s [<=] (add x (remove x s)). + Proof. fsetdec. Qed. + + Lemma test_eq_disjunction : forall w x y z, + In w (add x (add y (singleton z))) -> + E.eq w x \/ E.eq w y \/ E.eq w z. + Proof. fsetdec. Qed. + + Lemma test_not_In_disj : forall x y s1 s2 s3 s4, + ~ In x (union s1 (union s2 (union s3 (add y s4)))) -> + ~ (In x s1 \/ In x s4 \/ E.eq y x). + Proof. fsetdec. Qed. + + Lemma test_not_In_conj : forall x y s1 s2 s3 s4, + ~ In x (union s1 (union s2 (union s3 (add y s4)))) -> + ~ In x s1 /\ ~ In x s4 /\ ~ E.eq y x. + Proof. fsetdec. Qed. + + Lemma test_iff_conj : forall a x s s', + (In a s' <-> E.eq x a \/ In a s) -> + (In a s' <-> In a (add x s)). + Proof. fsetdec. Qed. + + Lemma test_set_ops_1 : forall x q r s, + (singleton x) [<=] s -> + Empty (union q r) -> + Empty (inter (diff s q) (diff s r)) -> + ~ In x s. + Proof. fsetdec. Qed. + + Lemma eq_chain_test : forall x1 x2 x3 x4 s1 s2 s3 s4, + Empty s1 -> + In x2 (add x1 s1) -> + In x3 s2 -> + ~ In x3 (remove x2 s2) -> + ~ In x4 s3 -> + In x4 (add x3 s3) -> + In x1 s4 -> + Subset (add x4 s4) s4. + Proof. fsetdec. Qed. + + Lemma test_too_complex : forall x y z r s, + E.eq x y -> + (In x (singleton y) -> r [<=] s) -> + In z r -> + In z s. + Proof. + (** [fsetdec] is not intended to solve this directly. *) + intros until s; intros Heq H Hr; lapply H; fsetdec. + Qed. + + Lemma function_test_1 : + forall (f : t -> t), + forall (g : elt -> elt), + forall (s1 s2 : t), + forall (x1 x2 : elt), + Equal s1 (f s2) -> + E.eq x1 (g (g x2)) -> + In x1 s1 -> + In (g (g x2)) (f s2). + Proof. fsetdec. Qed. + + Lemma function_test_2 : + forall (f : t -> t), + forall (g : elt -> elt), + forall (s1 s2 : t), + forall (x1 x2 : elt), + Equal s1 (f s2) -> + E.eq x1 (g x2) -> + In x1 s1 -> + g x2 = g (g x2) -> + In (g (g x2)) (f s2). + Proof. + (** [fsetdec] is not intended to solve this directly. *) + intros until 3. intros g_eq. rewrite <- g_eq. fsetdec. + Qed. + + End FSetDecideTestCases. + +End WDecide. + +Require Import FSetInterface. + +(** Now comes a special version dedicated to full sets. For this + one, only one argument [(M:S)] is necessary. *) + +Module Decide (M : S). + Module D:=OT_as_DT M.E. + Module WD := WDecide D M. + Ltac fsetdec := WD.fsetdec. +End Decide. \ No newline at end of file diff --git a/theories/FSets/FSetEqProperties.v b/theories/FSets/FSetEqProperties.v index d7062d5a..a397cc28 100644 --- a/theories/FSets/FSetEqProperties.v +++ b/theories/FSets/FSetEqProperties.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (***********************************************************************) -(* $Id: FSetEqProperties.v 8853 2006-05-23 18:17:38Z herbelin $ *) +(* $Id: FSetEqProperties.v 11064 2008-06-06 17:00:52Z letouzey $ *) (** * Finite sets library *) @@ -17,21 +17,12 @@ [mem x s=true] instead of [In x s], [equal s s'=true] instead of [Equal s s'], etc. *) +Require Import FSetProperties Zerob Sumbool Omega DecidableTypeEx. -Require Import FSetProperties. -Require Import Zerob. -Require Import Sumbool. -Require Import Omega. - -Module EqProperties (M:S). +Module WEqProperties (Import E:DecidableType)(M:WSfun E). +Module Import MP := WProperties E M. +Import FM Dec.F. Import M. -Import Logic. (* to unmask [eq] *) -Import Peano. (* to unmask [lt] *) - -Module ME := OrderedTypeFacts E. -Module MP := Properties M. -Import MP. -Import MP.FM. Definition Add := MP.Add. @@ -76,7 +67,7 @@ Qed. Lemma empty_mem: mem x empty=false. Proof. -rewrite <- not_mem_iff; auto. +rewrite <- not_mem_iff; auto with set. Qed. Lemma is_empty_equal_empty: is_empty s = equal s empty. @@ -88,17 +79,17 @@ Qed. Lemma choose_mem_1: choose s=Some x -> mem x s=true. Proof. -auto. +auto with set. Qed. Lemma choose_mem_2: choose s=None -> is_empty s=true. Proof. -auto. +auto with set. Qed. Lemma add_mem_1: mem x (add x s)=true. Proof. -auto. +auto with set. Qed. Lemma add_mem_2: ~E.eq x y -> mem y (add x s)=mem y s. @@ -108,7 +99,7 @@ Qed. Lemma remove_mem_1: mem x (remove x s)=false. Proof. -rewrite <- not_mem_iff; auto. +rewrite <- not_mem_iff; auto with set. Qed. Lemma remove_mem_2: ~E.eq x y -> mem y (remove x s)=mem y s. @@ -216,7 +207,7 @@ Proof. intros. generalize (@choose_1 s) (@choose_2 s). destruct (choose s);intros. -exists e;auto. +exists e;auto with set. generalize (H1 (refl_equal None)); clear H1. intros; rewrite (is_empty_1 H1) in H; discriminate. Qed. @@ -233,7 +224,7 @@ Qed. Lemma add_mem_3: mem y s=true -> mem y (add x s)=true. Proof. -auto. +auto with set. Qed. Lemma add_equal: @@ -260,7 +251,7 @@ Qed. Lemma add_remove: mem x s=true -> equal (add x (remove x s)) s=true. Proof. -intros; apply equal_1; apply add_remove; auto. +intros; apply equal_1; apply add_remove; auto with set. Qed. Lemma remove_add: @@ -275,9 +266,9 @@ Qed. Lemma is_empty_cardinal: is_empty s = zerob (cardinal s). Proof. intros; apply bool_1; split; intros. -rewrite cardinal_1; simpl; auto. +rewrite MP.cardinal_1; simpl; auto with set. assert (cardinal s = 0) by (apply zerob_true_elim; auto). -auto. +auto with set. Qed. (** Properties of [singleton] *) @@ -290,12 +281,12 @@ Qed. Lemma singleton_mem_2: ~E.eq x y -> mem y (singleton x)=false. Proof. intros; rewrite singleton_b. -unfold ME.eqb; destruct (ME.eq_dec x y); intuition. +unfold eqb; destruct (eq_dec x y); intuition. Qed. Lemma singleton_mem_3: mem y (singleton x)=true -> E.eq x y. Proof. -auto. +intros; apply singleton_1; auto with set. Qed. (** Properties of [union] *) @@ -358,7 +349,7 @@ Lemma union_subset_3: subset s s''=true -> subset s' s''=true -> subset (union s s') s''=true. Proof. -intros; apply subset_1; apply union_subset_3; auto. +intros; apply subset_1; apply union_subset_3; auto with set. Qed. (** Properties of [inter] *) @@ -433,7 +424,7 @@ Lemma inter_subset_3: subset s'' s=true -> subset s'' s'=true -> subset s'' (inter s s')=true. Proof. -intros; apply subset_1; apply inter_subset_3; auto. +intros; apply subset_1; apply inter_subset_3; auto with set. Qed. (** Properties of [diff] *) @@ -478,45 +469,37 @@ Hint Resolve equal_mem_1 subset_mem_1 choose_mem_1 add_mem_3 add_equal remove_mem_3 remove_equal : set. -(** General recursion principes based on [cardinal] *) +(** General recursion principle *) -Lemma cardinal_set_rec: forall (P:t->Type), +Lemma set_rec: forall (P:t->Type), (forall s s', equal s s'=true -> P s -> P s') -> (forall s x, mem x s=false -> P s -> P (add x s)) -> - P empty -> forall n s, cardinal s=n -> P s. + P empty -> forall s, P s. Proof. intros. -apply cardinal_induction with n; auto; intros. +apply set_induction; auto; intros. apply X with empty; auto with set. apply X with (add x s0); auto with set. -apply equal_1; intro a; rewrite add_iff; rewrite (H1 a); tauto. +apply equal_1; intro a; rewrite add_iff; rewrite (H0 a); tauto. apply X0; auto with set; apply mem_3; auto. Qed. -Lemma set_rec: forall (P:t->Type), - (forall s s', equal s s'=true -> P s -> P s') -> - (forall s x, mem x s=false -> P s -> P (add x s)) -> - P empty -> forall s, P s. -Proof. -intros;apply cardinal_set_rec with (cardinal s);auto. -Qed. - (** Properties of [fold] *) Lemma exclusive_set : forall s s' x, - ~In x s\/~In x s' <-> mem x s && mem x s'=false. + ~(In x s/\In x s') <-> mem x s && mem x s'=false. Proof. -intros; do 2 rewrite not_mem_iff. +intros; do 2 rewrite mem_iff. destruct (mem x s); destruct (mem x s'); intuition. Qed. Section Fold. -Variables (A:Set)(eqA:A->A->Prop)(st:Setoid_Theory _ eqA). +Variables (A:Type)(eqA:A->A->Prop)(st:Setoid_Theory _ eqA). Variables (f:elt->A->A)(Comp:compat_op E.eq eqA f)(Ass:transpose eqA f). Variables (i:A). Variables (s s':t)(x:elt). -Lemma fold_empty: eqA (fold f empty i) i. +Lemma fold_empty: (fold f empty i) = i. Proof. apply fold_empty; auto. Qed. @@ -524,7 +507,7 @@ Qed. Lemma fold_equal: equal s s'=true -> eqA (fold f s i) (fold f s' i). Proof. -intros; apply fold_equal with (eqA:=eqA); auto. +intros; apply fold_equal with (eqA:=eqA); auto with set. Qed. Lemma fold_add: @@ -537,13 +520,13 @@ Qed. Lemma add_fold: mem x s=true -> eqA (fold f (add x s) i) (fold f s i). Proof. -intros; apply add_fold with (eqA:=eqA); auto. +intros; apply add_fold with (eqA:=eqA); auto with set. Qed. Lemma remove_fold_1: mem x s=true -> eqA (f x (fold f (remove x s) i)) (fold f s i). Proof. -intros; apply remove_fold_1 with (eqA:=eqA); auto. +intros; apply remove_fold_1 with (eqA:=eqA); auto with set. Qed. Lemma remove_fold_2: @@ -581,13 +564,13 @@ Qed. Lemma remove_cardinal_1: forall s x, mem x s=true -> S (cardinal (remove x s))=cardinal s. Proof. -intros; apply remove_cardinal_1; auto. +intros; apply remove_cardinal_1; auto with set. Qed. Lemma remove_cardinal_2: forall s x, mem x s=false -> cardinal (remove x s)=cardinal s. Proof. -auto with set. +intros; apply Equal_cardinal; apply equal_2; auto with set. Qed. Lemma union_cardinal: @@ -601,7 +584,7 @@ Qed. Lemma subset_cardinal: forall s s', subset s s'=true -> cardinal s<=cardinal s'. Proof. -intros; apply subset_cardinal; auto. +intros; apply subset_cardinal; auto with set. Qed. Section Bool. @@ -644,7 +627,7 @@ Proof. intros; apply bool_1; split; intros. destruct (exists_2 Comp H) as (a,(Ha1,Ha2)). apply bool_6. -red; intros; apply (@is_empty_2 _ H0 a); auto. +red; intros; apply (@is_empty_2 _ H0 a); auto with set. generalize (@choose_1 (filter f s)) (@choose_2 (filter f s)). destruct (choose (filter f s)). intros H0 _; apply exists_1; auto. @@ -656,13 +639,30 @@ Qed. Lemma partition_filter_1: forall s, equal (fst (partition f s)) (filter f s)=true. Proof. -auto. +auto with set. Qed. Lemma partition_filter_2: forall s, equal (snd (partition f s)) (filter (fun x => negb (f x)) s)=true. Proof. -auto. +auto with set. +Qed. + +Lemma filter_add_1 : forall s x, f x = true -> + filter f (add x s) [=] add x (filter f s). +Proof. +red; intros; set_iff; do 2 (rewrite filter_iff; auto); set_iff. +intuition. +rewrite <- H; apply Comp; auto. +Qed. + +Lemma filter_add_2 : forall s x, f x = false -> + filter f (add x s) [=] filter f s. +Proof. +red; intros; do 2 (rewrite filter_iff; auto); set_iff. +intuition. +assert (f x = f a) by (apply Comp; auto). +rewrite H in H1; rewrite H2 in H1; discriminate. Qed. Lemma add_filter_1 : forall s s' x, @@ -837,6 +837,8 @@ Section Sum. (** Adding a valuation function on all elements of a set. *) Definition sum (f:elt -> nat)(s:t) := fold (fun x => plus (f x)) s 0. +Notation compat_opL := (compat_op E.eq (@Logic.eq _)). +Notation transposeL := (transpose (@Logic.eq _)). Lemma sum_plus : forall f g, compat_nat E.eq f -> compat_nat E.eq g -> @@ -844,12 +846,12 @@ Lemma sum_plus : Proof. unfold sum. intros f g Hf Hg. -assert (fc : compat_op E.eq (@eq _) (fun x:elt =>plus (f x))). auto. -assert (ft : transpose (@eq _) (fun x:elt =>plus (f x))). red; intros; omega. -assert (gc : compat_op E.eq (@eq _) (fun x:elt => plus (g x))). auto. -assert (gt : transpose (@eq _) (fun x:elt =>plus (g x))). red; intros; omega. -assert (fgc : compat_op E.eq (@eq _) (fun x:elt =>plus ((f x)+(g x)))). auto. -assert (fgt : transpose (@eq _) (fun x:elt=>plus ((f x)+(g x)))). red; intros; omega. +assert (fc : compat_opL (fun x:elt =>plus (f x))). auto. +assert (ft : transposeL (fun x:elt =>plus (f x))). red; intros; omega. +assert (gc : compat_opL (fun x:elt => plus (g x))). auto. +assert (gt : transposeL (fun x:elt =>plus (g x))). red; intros; omega. +assert (fgc : compat_opL (fun x:elt =>plus ((f x)+(g x)))). auto. +assert (fgt : transposeL (fun x:elt=>plus ((f x)+(g x)))). red; intros; omega. assert (st := gen_st nat). intros s;pattern s; apply set_rec. intros. @@ -858,7 +860,7 @@ rewrite <- (fold_equal _ _ st _ gc gt 0 _ _ H). rewrite <- (fold_equal _ _ st _ fgc fgt 0 _ _ H); auto. intros; do 3 (rewrite (fold_add _ _ st);auto). rewrite H0;simpl;omega. -intros; do 3 rewrite (fold_empty _ _ st);auto. +do 3 rewrite fold_empty;auto. Qed. Lemma sum_filter : forall f, (compat_bool E.eq f) -> @@ -866,11 +868,11 @@ Lemma sum_filter : forall f, (compat_bool E.eq f) -> Proof. unfold sum; intros f Hf. assert (st := gen_st nat). -assert (cc : compat_op E.eq (@eq _) (fun x => plus (if f x then 1 else 0))). - unfold compat_op; intros. +assert (cc : compat_opL (fun x => plus (if f x then 1 else 0))). + red; intros. rewrite (Hf x x' H); auto. -assert (ct : transpose (@eq _) (fun x => plus (if f x then 1 else 0))). - unfold transpose; intros; omega. +assert (ct : transposeL (fun x => plus (if f x then 1 else 0))). + red; intros; omega. intros s;pattern s; apply set_rec. intros. change elt with E.t. @@ -883,14 +885,14 @@ assert (~ In x (filter f s0)). case (f x); simpl; intros. rewrite (MP.cardinal_2 H1 (H2 (refl_equal true) (MP.Add_add s0 x))); auto. rewrite <- (MP.Equal_cardinal (H3 (refl_equal false) (MP.Add_add s0 x))); auto. -intros; rewrite (fold_empty _ _ st);auto. +intros; rewrite fold_empty;auto. rewrite MP.cardinal_1; auto. unfold Empty; intros. rewrite filter_iff; auto; set_iff; tauto. Qed. Lemma fold_compat : - forall (A:Set)(eqA:A->A->Prop)(st:(Setoid_Theory _ eqA)) + forall (A:Type)(eqA:A->A->Prop)(st:Setoid_Theory _ eqA) (f g:elt->A->A), (compat_op E.eq eqA f) -> (transpose eqA f) -> (compat_op E.eq eqA g) -> (transpose eqA g) -> @@ -903,26 +905,35 @@ trans_st (fold f s0 i). apply fold_equal with (eqA:=eqA); auto. rewrite equal_sym; auto. trans_st (fold g s0 i). -apply H0; intros; apply H1; auto. -elim (equal_2 H x); auto; intros. -apply fold_equal with (eqA:=eqA); auto. +apply H0; intros; apply H1; auto with set. +elim (equal_2 H x); auto with set; intros. +apply fold_equal with (eqA:=eqA); auto with set. trans_st (f x (fold f s0 i)). -apply fold_add with (eqA:=eqA); auto. -trans_st (g x (fold f s0 i)). -trans_st (g x (fold g s0 i)). +apply fold_add with (eqA:=eqA); auto with set. +trans_st (g x (fold f s0 i)); auto with set. +trans_st (g x (fold g s0 i)); auto with set. sym_st; apply fold_add with (eqA:=eqA); auto. -trans_st i; [idtac | sym_st ]; apply fold_empty; auto. +do 2 rewrite fold_empty; refl_st. Qed. Lemma sum_compat : forall f g, compat_nat E.eq f -> compat_nat E.eq g -> forall s, (forall x, In x s -> f x=g x) -> sum f s=sum g s. intros. -unfold sum; apply (fold_compat _ (@eq nat)); auto. -unfold transpose; intros; omega. -unfold transpose; intros; omega. +unfold sum; apply (fold_compat _ (@Logic.eq nat)); auto. +red; intros; omega. +red; intros; omega. Qed. End Sum. -End EqProperties. +End WEqProperties. + + +(** Now comes a special version dedicated to full sets. For this + one, only one argument [(M:S)] is necessary. *) + +Module EqProperties (M:S). + Module D := OT_as_DT M.E. + Include WEqProperties D M. +End EqProperties. diff --git a/theories/FSets/FSetFacts.v b/theories/FSets/FSetFacts.v index aa57f066..b4b834b1 100644 --- a/theories/FSets/FSetFacts.v +++ b/theories/FSets/FSetFacts.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (***********************************************************************) -(* $Id: FSetFacts.v 8882 2006-05-31 21:55:30Z letouzey $ *) +(* $Id: FSetFacts.v 10765 2008-04-08 16:15:23Z msozeau $ *) (** * Finite sets library *) @@ -16,16 +16,19 @@ Moreover, we prove that [E.Eq] and [Equal] are setoid equalities. *) +Require Import DecidableTypeEx. Require Export FSetInterface. Set Implicit Arguments. Unset Strict Implicit. -Module Facts (M: S). -Module ME := OrderedTypeFacts M.E. -Import ME. -Import M. -Import Logic. (* to unmask [eq] *) -Import Peano. (* to unmask [lt] *) +(** First, a functor for Weak Sets. Since the signature [WS] includes + an EqualityType and not a stronger DecidableType, this functor + should take two arguments in order to compensate this. *) + +Module WFacts (Import E : DecidableType)(Import M : WSfun E). + +Notation eq_dec := E.eq_dec. +Definition eqb x y := if eq_dec x y then true else false. (** * Specifications written using equivalences *) @@ -259,6 +262,8 @@ symmetry. rewrite H0; intros. destruct H1 as (_,H1). apply H1; auto. +rewrite H2. +rewrite InA_alt; eauto. Qed. Lemma exists_b : compat_bool E.eq f -> @@ -271,7 +276,8 @@ destruct (existsb f (elements s)); destruct (exists_ f s); auto; intros. rewrite <- H1; intros. destruct H0 as (H0,_). destruct H0 as (a,(Ha1,Ha2)); auto. -exists a; auto. +exists a; split; auto. +rewrite H2; rewrite InA_alt; eauto. symmetry. rewrite H0. destruct H1 as (_,H1). @@ -289,17 +295,25 @@ End BoolSpec. Definition E_ST : Setoid_Theory elt E.eq. Proof. -constructor; [apply E.eq_refl|apply E.eq_sym|apply E.eq_trans]. +constructor ; red; [apply E.eq_refl|apply E.eq_sym|apply E.eq_trans]. Qed. -Add Setoid elt E.eq E_ST as EltSetoid. - Definition Equal_ST : Setoid_Theory t Equal. Proof. -constructor; [apply eq_refl | apply eq_sym | apply eq_trans]. +constructor ; red; [apply eq_refl | apply eq_sym | apply eq_trans]. Qed. -Add Setoid t Equal Equal_ST as EqualSetoid. +Add Relation elt E.eq + reflexivity proved by E.eq_refl + symmetry proved by E.eq_sym + transitivity proved by E.eq_trans + as EltSetoid. + +Add Relation t Equal + reflexivity proved by eq_refl + symmetry proved by eq_sym + transitivity proved by eq_trans + as EqualSetoid. Add Morphism In with signature E.eq ==> Equal ==> iff as In_m. Proof. @@ -325,7 +339,7 @@ exact (H1 (refl_equal true) _ Ha). Qed. Add Morphism Empty with signature Equal ==> iff as Empty_m. -Proof. +Proof. intros; do 2 rewrite is_empty_iff; rewrite H; intuition. Qed. @@ -340,7 +354,9 @@ Qed. Add Morphism singleton : singleton_m. Proof. unfold Equal; intros x y H a. -do 2 rewrite singleton_iff; split; order. +do 2 rewrite singleton_iff; split; intros. +apply E.eq_trans with x; auto. +apply E.eq_trans with y; auto. Qed. Add Morphism add : add_m. @@ -396,6 +412,63 @@ rewrite H in H1; rewrite H0 in H1; intuition. rewrite H in H1; rewrite H0 in H1; intuition. Qed. + +(* [Subset] is a setoid order *) + +Lemma Subset_refl : forall s, s[<=]s. +Proof. red; auto. Defined. + +Lemma Subset_trans : forall s s' s'', s[<=]s'->s'[<=]s''->s[<=]s''. +Proof. unfold Subset; eauto. Defined. + +Add Relation t Subset + reflexivity proved by Subset_refl + transitivity proved by Subset_trans + as SubsetSetoid. +(* NB: for the moment, it is important to use Defined and not Qed in + the two previous lemmas, in order to allow conversion of + SubsetSetoid coming from separate Facts modules. See bug #1738. *) + +Instance In_s_m : Morphism (E.eq ==> Subset ++> impl) In | 1. +Proof. + simpl_relation. eauto with set. +Qed. + +Add Morphism Empty with signature Subset --> impl as Empty_s_m. +Proof. +unfold Subset, Empty, impl; firstorder. +Qed. + +Add Morphism add with signature E.eq ==> Subset ++> Subset as add_s_m. +Proof. +unfold Subset; intros x y H s s' H0 a. +do 2 rewrite add_iff; rewrite H; intuition. +Qed. + +Add Morphism remove with signature E.eq ==> Subset ++> Subset as remove_s_m. +Proof. +unfold Subset; intros x y H s s' H0 a. +do 2 rewrite remove_iff; rewrite H; intuition. +Qed. + +Add Morphism union with signature Subset ++> Subset ++> Subset as union_s_m. +Proof. +unfold Equal; intros s s' H s'' s''' H0 a. +do 2 rewrite union_iff; intuition. +Qed. + +Add Morphism inter with signature Subset ++> Subset ++> Subset as inter_s_m. +Proof. +unfold Equal; intros s s' H s'' s''' H0 a. +do 2 rewrite inter_iff; intuition. +Qed. + +Add Morphism diff with signature Subset ++> Subset --> Subset as diff_s_m. +Proof. +unfold Subset; intros s s' H s'' s''' H0 a. +do 2 rewrite diff_iff; intuition. +Qed. + (* [fold], [filter], [for_all], [exists_] and [partition] cannot be proved morphism without additional hypothesis on [f]. For instance: *) @@ -405,6 +478,12 @@ Proof. unfold Equal; intros; repeat rewrite filter_iff; auto; rewrite H0; tauto. Qed. +Lemma filter_subset : forall f, compat_bool E.eq f -> + forall s s', s[<=]s' -> filter f s [<=] filter f s'. +Proof. +unfold Subset; intros; rewrite filter_iff in *; intuition. +Qed. + (* For [elements], [min_elt], [max_elt] and [choose], we would need setoid structures on [list elt] and [option elt]. *) @@ -412,4 +491,15 @@ Qed. Add Morphism cardinal ; cardinal_m. *) +End WFacts. + + +(** Now comes a special version dedicated to full sets. For this + one, only one argument [(M:S)] is necessary. *) + +Module Facts (Import M:S). + Module D:=OT_as_DT M.E. + Include WFacts D M. + End Facts. + diff --git a/theories/FSets/FSetFullAVL.v b/theories/FSets/FSetFullAVL.v new file mode 100644 index 00000000..1fc109f3 --- /dev/null +++ b/theories/FSets/FSetFullAVL.v @@ -0,0 +1,1125 @@ +(***********************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Prop := + | RBLeaf : avl Leaf + | RBNode : forall x l r h, avl l -> avl r -> + -(2) <= height l - height r <= 2 -> + h = max (height l) (height r) + 1 -> + avl (Node l x r h). + +(** * Automation and dedicated tactics *) + +Hint Constructors avl. + +(** A tactic for cleaning hypothesis after use of functional induction. *) + +Ltac clearf := + match goal with + | H : (@Logic.eq (Compare _ _ _ _) _ _) |- _ => clear H; clearf + | H : (@Logic.eq (sumbool _ _) _ _) |- _ => clear H; clearf + | _ => idtac + end. + +(** Tactics about [avl] *) + +Lemma height_non_negative : forall s : tree, avl s -> height s >= 0. +Proof. + induction s; simpl; intros; auto with zarith. + inv avl; intuition; omega_max. +Qed. +Implicit Arguments height_non_negative. + +(** When [H:avl r], typing [avl_nn H] or [avl_nn r] adds [height r>=0] *) + +Ltac avl_nn_hyp H := + let nz := fresh "nz" in assert (nz := height_non_negative H). + +Ltac avl_nn h := + let t := type of h in + match type of t with + | Prop => avl_nn_hyp h + | _ => match goal with H : avl h |- _ => avl_nn_hyp H end + end. + +(* Repeat the previous tactic. + Drawback: need to clear the [avl _] hyps ... Thank you Ltac *) + +Ltac avl_nns := + match goal with + | H:avl _ |- _ => avl_nn_hyp H; clear H; avl_nns + | _ => idtac + end. + +(** Results about [height] *) + +Lemma height_0 : forall s, avl s -> height s = 0 -> s = Leaf. +Proof. + destruct 1; intuition; simpl in *. + avl_nns; simpl in *; elimtype False; omega_max. +Qed. + +(** * Results about [avl] *) + +Lemma avl_node : + forall x l r, avl l -> avl r -> + -(2) <= height l - height r <= 2 -> + avl (Node l x r (max (height l) (height r) + 1)). +Proof. + intros; auto. +Qed. +Hint Resolve avl_node. + + +(** empty *) + +Lemma empty_avl : avl empty. +Proof. + auto. +Qed. + +(** singleton *) + +Lemma singleton_avl : forall x : elt, avl (singleton x). +Proof. + unfold singleton; intro. + constructor; auto; try red; simpl; omega_max. +Qed. + +(** create *) + +Lemma create_avl : + forall l x r, avl l -> avl r -> -(2) <= height l - height r <= 2 -> + avl (create l x r). +Proof. + unfold create; auto. +Qed. + +Lemma create_height : + forall l x r, avl l -> avl r -> -(2) <= height l - height r <= 2 -> + height (create l x r) = max (height l) (height r) + 1. +Proof. + unfold create; auto. +Qed. + +(** bal *) + +Lemma bal_avl : forall l x r, avl l -> avl r -> + -(3) <= height l - height r <= 3 -> avl (bal l x r). +Proof. + intros l x r; functional induction bal l x r; intros; clearf; + inv avl; simpl in *; + match goal with |- avl (assert_false _ _ _) => avl_nns + | _ => repeat apply create_avl; simpl in *; auto + end; omega_max. +Qed. + +Lemma bal_height_1 : forall l x r, avl l -> avl r -> + -(3) <= height l - height r <= 3 -> + 0 <= height (bal l x r) - max (height l) (height r) <= 1. +Proof. + intros l x r; functional induction bal l x r; intros; clearf; + inv avl; avl_nns; simpl in *; omega_max. +Qed. + +Lemma bal_height_2 : + forall l x r, avl l -> avl r -> -(2) <= height l - height r <= 2 -> + height (bal l x r) == max (height l) (height r) +1. +Proof. + intros l x r; functional induction bal l x r; intros; clearf; + inv avl; simpl in *; omega_max. +Qed. + +Ltac omega_bal := match goal with + | H:avl ?l, H':avl ?r |- context [ bal ?l ?x ?r ] => + generalize (bal_height_1 x H H') (bal_height_2 x H H'); + omega_max + end. + +(** add *) + +Lemma add_avl_1 : forall s x, avl s -> + avl (add x s) /\ 0 <= height (add x s) - height s <= 1. +Proof. + intros s x; functional induction (add x s); subst;intros; inv avl; simpl in *. + intuition; try constructor; simpl; auto; try omega_max. + (* LT *) + destruct IHt; auto. + split. + apply bal_avl; auto; omega_max. + omega_bal. + (* EQ *) + intuition; omega_max. + (* GT *) + destruct IHt; auto. + split. + apply bal_avl; auto; omega_max. + omega_bal. +Qed. + +Lemma add_avl : forall s x, avl s -> avl (add x s). +Proof. + intros; destruct (add_avl_1 x H); auto. +Qed. +Hint Resolve add_avl. + +(** join *) + +Lemma join_avl_1 : forall l x r, avl l -> avl r -> avl (join l x r) /\ + 0<= height (join l x r) - max (height l) (height r) <= 1. +Proof. + join_tac. + + split; simpl; auto. + destruct (add_avl_1 x H0). + avl_nns; omega_max. + set (l:=Node ll lx lr lh) in *. + split; auto. + destruct (add_avl_1 x H). + simpl (height Leaf). + avl_nns; omega_max. + + inversion_clear H. + assert (height (Node rl rx rr rh) = rh); auto. + set (r := Node rl rx rr rh) in *; clearbody r. + destruct (Hlr x r H2 H0); clear Hrl Hlr. + set (j := join lr x r) in *; clearbody j. + simpl. + assert (-(3) <= height ll - height j <= 3) by omega_max. + split. + apply bal_avl; auto. + omega_bal. + + inversion_clear H0. + assert (height (Node ll lx lr lh) = lh); auto. + set (l := Node ll lx lr lh) in *; clearbody l. + destruct (Hrl H H1); clear Hrl Hlr. + set (j := join l x rl) in *; clearbody j. + simpl. + assert (-(3) <= height j - height rr <= 3) by omega_max. + split. + apply bal_avl; auto. + omega_bal. + + clear Hrl Hlr. + assert (height (Node ll lx lr lh) = lh); auto. + assert (height (Node rl rx rr rh) = rh); auto. + set (l := Node ll lx lr lh) in *; clearbody l. + set (r := Node rl rx rr rh) in *; clearbody r. + assert (-(2) <= height l - height r <= 2) by omega_max. + split. + apply create_avl; auto. + rewrite create_height; auto; omega_max. +Qed. + +Lemma join_avl : forall l x r, avl l -> avl r -> avl (join l x r). +Proof. + intros; destruct (join_avl_1 x H H0); auto. +Qed. +Hint Resolve join_avl. + +(** remove_min *) + +Lemma remove_min_avl_1 : forall l x r h, avl (Node l x r h) -> + avl (remove_min l x r)#1 /\ + 0 <= height (Node l x r h) - height (remove_min l x r)#1 <= 1. +Proof. + intros l x r; functional induction (remove_min l x r); subst;simpl in *; intros. + inv avl; simpl in *; split; auto. + avl_nns; omega_max. + inversion_clear H. + rewrite e0 in IHp;simpl in IHp;destruct (IHp _x); auto. + split; simpl in *. + apply bal_avl; auto; omega_max. + omega_bal. +Qed. + +Lemma remove_min_avl : forall l x r h, avl (Node l x r h) -> + avl (remove_min l x r)#1. +Proof. + intros; destruct (remove_min_avl_1 H); auto. +Qed. + +(** merge *) + +Lemma merge_avl_1 : forall s1 s2, avl s1 -> avl s2 -> + -(2) <= height s1 - height s2 <= 2 -> + avl (merge s1 s2) /\ + 0<= height (merge s1 s2) - max (height s1) (height s2) <=1. +Proof. + intros s1 s2; functional induction (merge s1 s2); intros; + try factornode _x _x0 _x1 _x2 as s1. + simpl; split; auto; avl_nns; omega_max. + simpl; split; auto; avl_nns; simpl in *; omega_max. + generalize (remove_min_avl_1 H0). + rewrite e1; destruct 1. + split. + apply bal_avl; auto. + simpl; omega_max. + simpl in *; omega_bal. +Qed. + +Lemma merge_avl : forall s1 s2, avl s1 -> avl s2 -> + -(2) <= height s1 - height s2 <= 2 -> avl (merge s1 s2). +Proof. + intros; destruct (merge_avl_1 H H0 H1); auto. +Qed. + + +(** remove *) + +Lemma remove_avl_1 : forall s x, avl s -> + avl (remove x s) /\ 0 <= height s - height (remove x s) <= 1. +Proof. + intros s x; functional induction (remove x s); intros. + intuition; omega_max. + (* LT *) + inv avl. + destruct (IHt H0). + split. + apply bal_avl; auto. + omega_max. + omega_bal. + (* EQ *) + inv avl. + generalize (merge_avl_1 H0 H1 H2). + intuition omega_max. + (* GT *) + inv avl. + destruct (IHt H1). + split. + apply bal_avl; auto. + omega_max. + omega_bal. +Qed. + +Lemma remove_avl : forall s x, avl s -> avl (remove x s). +Proof. + intros; destruct (remove_avl_1 x H); auto. +Qed. +Hint Resolve remove_avl. + +(** concat *) + +Lemma concat_avl : forall s1 s2, avl s1 -> avl s2 -> avl (concat s1 s2). +Proof. + intros s1 s2; functional induction (concat s1 s2); auto. + intros; apply join_avl; auto. + generalize (remove_min_avl H0); rewrite e1; simpl; auto. +Qed. +Hint Resolve concat_avl. + +(** split *) + +Lemma split_avl : forall s x, avl s -> + avl (split x s)#l /\ avl (split x s)#r. +Proof. + intros s x; functional induction (split x s); simpl; auto. + rewrite e1 in IHt;simpl in IHt;inversion_clear 1; intuition. + simpl; inversion_clear 1; auto. + rewrite e1 in IHt;simpl in IHt;inversion_clear 1; intuition. +Qed. + +(** inter *) + +Lemma inter_avl : forall s1 s2, avl s1 -> avl s2 -> avl (inter s1 s2). +Proof. + intros s1 s2; functional induction inter s1 s2; auto; intros A1 A2; + generalize (split_avl x1 A2); rewrite e1; simpl; destruct 1; + inv avl; auto. +Qed. + +(** diff *) + +Lemma diff_avl : forall s1 s2, avl s1 -> avl s2 -> avl (diff s1 s2). +Proof. + intros s1 s2; functional induction diff s1 s2; auto; intros A1 A2; + generalize (split_avl x1 A2); rewrite e1; simpl; destruct 1; + inv avl; auto. +Qed. + +(** union *) + +Lemma union_avl : forall s1 s2, avl s1 -> avl s2 -> avl (union s1 s2). +Proof. + intros s1 s2; functional induction union s1 s2; auto; intros A1 A2; + generalize (split_avl x1 A2); rewrite e1; simpl; destruct 1; + inv avl; auto. +Qed. + +(** filter *) + +Lemma filter_acc_avl : forall f s acc, avl s -> avl acc -> + avl (filter_acc f acc s). +Proof. + induction s; simpl; auto. + intros. + inv avl. + destruct (f t); auto. +Qed. +Hint Resolve filter_acc_avl. + +Lemma filter_avl : forall f s, avl s -> avl (filter f s). +Proof. + unfold filter; intros; apply filter_acc_avl; auto. +Qed. + +(** partition *) + +Lemma partition_acc_avl_1 : forall f s acc, avl s -> + avl acc#1 -> avl (partition_acc f acc s)#1. +Proof. + induction s; simpl; auto. + destruct acc as [acct accf]; simpl in *. + intros. + inv avl. + apply IHs2; auto. + apply IHs1; auto. + destruct (f t); simpl; auto. +Qed. + +Lemma partition_acc_avl_2 : forall f s acc, avl s -> + avl acc#2 -> avl (partition_acc f acc s)#2. +Proof. + induction s; simpl; auto. + destruct acc as [acct accf]; simpl in *. + intros. + inv avl. + apply IHs2; auto. + apply IHs1; auto. + destruct (f t); simpl; auto. +Qed. + +Lemma partition_avl_1 : forall f s, avl s -> avl (partition f s)#1. +Proof. + unfold partition; intros; apply partition_acc_avl_1; auto. +Qed. + +Lemma partition_avl_2 : forall f s, avl s -> avl (partition f s)#2. +Proof. + unfold partition; intros; apply partition_acc_avl_2; auto. +Qed. + +End AvlProofs. + + +Module OcamlOps (Import I:Int)(X:OrderedType). +Module Import AvlProofs := AvlProofs I X. +Import Raw. +Import Raw.Proofs. +Import II. +Open Local Scope pair_scope. +Open Local Scope nat_scope. + +(** Properties of cardinal *) + +Lemma bal_cardinal : forall l x r, + cardinal (bal l x r) = S (cardinal l + cardinal r). +Proof. + intros l x r; functional induction bal l x r; intros; clearf; + simpl; auto with arith; romega with *. +Qed. + +Lemma add_cardinal : forall x s, + cardinal (add x s) <= S (cardinal s). +Proof. + intros; functional induction add x s; simpl; auto with arith; + rewrite bal_cardinal; romega with *. +Qed. + +Lemma join_cardinal : forall l x r, + cardinal (join l x r) <= S (cardinal l + cardinal r). +Proof. + join_tac; auto with arith. + simpl; apply add_cardinal. + simpl; destruct X.compare; simpl; auto with arith. + generalize (bal_cardinal (add x ll) lx lr) (add_cardinal x ll); + romega with *. + generalize (bal_cardinal ll lx (add x lr)) (add_cardinal x lr); + romega with *. + generalize (bal_cardinal ll lx (join lr x (Node rl rx rr rh))) + (Hlr x (Node rl rx rr rh)); simpl; romega with *. + simpl S in *; generalize (bal_cardinal (join (Node ll lx lr lh) x rl) rx rr). + romega with *. +Qed. + +Lemma split_cardinal_1 : forall x s, + (cardinal (split x s)#l <= cardinal s)%nat. +Proof. + intros x s; functional induction split x s; simpl; auto. + rewrite e1 in IHt; simpl in *. + romega with *. + romega with *. + rewrite e1 in IHt; simpl in *. + generalize (@join_cardinal l y rl); romega with *. +Qed. + +Lemma split_cardinal_2 : forall x s, + (cardinal (split x s)#r <= cardinal s)%nat. +Proof. + intros x s; functional induction split x s; simpl; auto. + rewrite e1 in IHt; simpl in *. + generalize (@join_cardinal rl y r); romega with *. + romega with *. + rewrite e1 in IHt; simpl in *; romega with *. +Qed. + +(** * [ocaml_union], an union faithful to the original ocaml code *) + +Definition cardinal2 (s:t*t) := (cardinal s#1 + cardinal s#2)%nat. + +Ltac ocaml_union_tac := + intros; unfold cardinal2; simpl fst in *; simpl snd in *; + match goal with H: split ?x ?s = _ |- _ => + generalize (split_cardinal_1 x s) (split_cardinal_2 x s); + rewrite H; simpl; romega with * + end. + +Import Logic. (* Unhide eq, otherwise Function complains. *) + +Function ocaml_union (s : t * t) { measure cardinal2 s } : t := + match s with + | (Leaf, Leaf) => s#2 + | (Leaf, Node _ _ _ _) => s#2 + | (Node _ _ _ _, Leaf) => s#1 + | (Node l1 x1 r1 h1, Node l2 x2 r2 h2) => + if ge_lt_dec h1 h2 then + if eq_dec h2 1%I then add x2 s#1 else + let (l2',_,r2') := split x1 s#2 in + join (ocaml_union (l1,l2')) x1 (ocaml_union (r1,r2')) + else + if eq_dec h1 1%I then add x1 s#2 else + let (l1',_,r1') := split x2 s#1 in + join (ocaml_union (l1',l2)) x2 (ocaml_union (r1',r2)) + end. +Proof. +abstract ocaml_union_tac. +abstract ocaml_union_tac. +abstract ocaml_union_tac. +abstract ocaml_union_tac. +Defined. + +Lemma ocaml_union_in : forall s y, + bst s#1 -> avl s#1 -> bst s#2 -> avl s#2 -> + (In y (ocaml_union s) <-> In y s#1 \/ In y s#2). +Proof. + intros s; functional induction ocaml_union s; intros y B1 A1 B2 A2; + simpl fst in *; simpl snd in *; try clear e0 e1. + intuition_in. + intuition_in. + intuition_in. + (* add x2 s#1 *) + inv avl. + rewrite (height_0 H); [ | avl_nn l2; omega_max]. + rewrite (height_0 H0); [ | avl_nn r2; omega_max]. + rewrite add_in; intuition_in. + (* join (union (l1,l2')) x1 (union (r1,r2')) *) + generalize + (split_avl x1 A2) (split_bst x1 B2) + (split_in_1 x1 y B2) (split_in_2 x1 y B2). + rewrite e2; simpl. + destruct 1; destruct 1; inv avl; inv bst. + rewrite join_in, IHt, IHt0; auto. + do 2 (intro Eq; rewrite Eq; clear Eq). + case (X.compare y x1); intuition_in. + (* add x1 s#2 *) + inv avl. + rewrite (height_0 H3); [ | avl_nn l1; omega_max]. + rewrite (height_0 H4); [ | avl_nn r1; omega_max]. + rewrite add_in; auto; intuition_in. + (* join (union (l1',l2)) x1 (union (r1',r2)) *) + generalize + (split_avl x2 A1) (split_bst x2 B1) + (split_in_1 x2 y B1) (split_in_2 x2 y B1). + rewrite e2; simpl. + destruct 1; destruct 1; inv avl; inv bst. + rewrite join_in, IHt, IHt0; auto. + do 2 (intro Eq; rewrite Eq; clear Eq). + case (X.compare y x2); intuition_in. +Qed. + +Lemma ocaml_union_bst : forall s, + bst s#1 -> avl s#1 -> bst s#2 -> avl s#2 -> bst (ocaml_union s). +Proof. + intros s; functional induction ocaml_union s; intros B1 A1 B2 A2; + simpl fst in *; simpl snd in *; try clear e0 e1; + try apply add_bst; auto. + (* join (union (l1,l2')) x1 (union (r1,r2')) *) + clear _x _x0; factornode l2 x2 r2 h2 as s2. + generalize (split_avl x1 A2) (split_bst x1 B2) + (@split_in_1 s2 x1)(@split_in_2 s2 x1). + rewrite e2; simpl. + destruct 1; destruct 1; intros. + inv bst; inv avl. + apply join_bst; auto. + intro y; rewrite ocaml_union_in, H3; intuition_in. + intro y; rewrite ocaml_union_in, H4; intuition_in. + (* join (union (l1',l2)) x1 (union (r1',r2)) *) + clear _x _x0; factornode l1 x1 r1 h1 as s1. + generalize (split_avl x2 A1) (split_bst x2 B1) + (@split_in_1 s1 x2)(@split_in_2 s1 x2). + rewrite e2; simpl. + destruct 1; destruct 1; intros. + inv bst; inv avl. + apply join_bst; auto. + intro y; rewrite ocaml_union_in, H3; intuition_in. + intro y; rewrite ocaml_union_in, H4; intuition_in. +Qed. + +Lemma ocaml_union_avl : forall s, + avl s#1 -> avl s#2 -> avl (ocaml_union s). +Proof. + intros s; functional induction ocaml_union s; + simpl fst in *; simpl snd in *; auto. + intros A1 A2; generalize (split_avl x1 A2); rewrite e2; simpl. + inv avl; destruct 1; auto. + intros A1 A2; generalize (split_avl x2 A1); rewrite e2; simpl. + inv avl; destruct 1; auto. +Qed. + +Lemma ocaml_union_alt : forall s, bst s#1 -> avl s#1 -> bst s#2 -> avl s#2 -> + Equal (ocaml_union s) (union s#1 s#2). +Proof. + red; intros; rewrite ocaml_union_in, union_in; simpl; intuition. +Qed. + + +(** * [ocaml_subset], a subset faithful to the original ocaml code *) + +Function ocaml_subset (s:t*t) { measure cardinal2 s } : bool := + match s with + | (Leaf, _) => true + | (Node _ _ _ _, Leaf) => false + | (Node l1 x1 r1 h1, Node l2 x2 r2 h2) => + match X.compare x1 x2 with + | EQ _ => ocaml_subset (l1,l2) && ocaml_subset (r1,r2) + | LT _ => ocaml_subset (Node l1 x1 Leaf 0%I, l2) && ocaml_subset (r1,s#2) + | GT _ => ocaml_subset (Node Leaf x1 r1 0%I, r2) && ocaml_subset (l1,s#2) + end + end. + +Proof. + intros; unfold cardinal2; simpl; abstract romega with *. + intros; unfold cardinal2; simpl; abstract romega with *. + intros; unfold cardinal2; simpl; abstract romega with *. + intros; unfold cardinal2; simpl; abstract romega with *. + intros; unfold cardinal2; simpl; abstract romega with *. + intros; unfold cardinal2; simpl; abstract romega with *. +Defined. + +Lemma ocaml_subset_12 : forall s, + bst s#1 -> bst s#2 -> + (ocaml_subset s = true <-> Subset s#1 s#2). +Proof. + intros s; functional induction ocaml_subset s; simpl; + intros B1 B2; try clear e0. + intuition. + red; auto; inversion 1. + split; intros; try discriminate. + assert (H': In _x0 Leaf) by auto; inversion H'. + (**) + simpl in *; inv bst. + rewrite andb_true_iff, IHb, IHb0; auto; clear IHb IHb0. + unfold Subset; intuition_in. + assert (X.eq a x2) by order; intuition_in. + assert (In a (Node l2 x2 r2 h2)) by auto; intuition_in; order. + assert (In a (Node l2 x2 r2 h2)) by auto; intuition_in; order. + (**) + simpl in *; inv bst. + rewrite andb_true_iff, IHb, IHb0; auto; clear IHb IHb0. + unfold Subset; intuition_in. + assert (In a (Node l2 x2 r2 h2)) by auto; intuition_in; order. + assert (In a (Node l2 x2 r2 h2)) by auto; intuition_in; order. + (**) + simpl in *; inv bst. + rewrite andb_true_iff, IHb, IHb0; auto; clear IHb IHb0. + unfold Subset; intuition_in. + assert (In a (Node l2 x2 r2 h2)) by auto; intuition_in; order. + assert (In a (Node l2 x2 r2 h2)) by auto; intuition_in; order. +Qed. + +Lemma ocaml_subset_alt : forall s, bst s#1 -> bst s#2 -> + ocaml_subset s = subset s#1 s#2. +Proof. + intros. + generalize (ocaml_subset_12 H H0); rewrite <-subset_12 by auto. + destruct ocaml_subset; destruct subset; intuition. +Qed. + + + +(** [ocaml_compare], a compare faithful to the original ocaml code *) + +(** termination of [compare_aux] *) + +Fixpoint cardinal_e e := match e with + | End => 0 + | More _ s r => S (cardinal s + cardinal_e r) + end. + +Lemma cons_cardinal_e : forall s e, + cardinal_e (cons s e) = cardinal s + cardinal_e e. +Proof. + induction s; simpl; intros; auto. + rewrite IHs1; simpl; rewrite <- plus_n_Sm; auto with arith. +Qed. + +Definition cardinal_e_2 e := cardinal_e e#1 + cardinal_e e#2. + +Function ocaml_compare_aux + (e:enumeration*enumeration) { measure cardinal_e_2 e } : comparison := + match e with + | (End,End) => Eq + | (End,More _ _ _) => Lt + | (More _ _ _, End) => Gt + | (More x1 r1 e1, More x2 r2 e2) => + match X.compare x1 x2 with + | EQ _ => ocaml_compare_aux (cons r1 e1, cons r2 e2) + | LT _ => Lt + | GT _ => Gt + end + end. + +Proof. +intros; unfold cardinal_e_2; simpl; +abstract (do 2 rewrite cons_cardinal_e; romega with *). +Defined. + +Definition ocaml_compare s1 s2 := + ocaml_compare_aux (cons s1 End, cons s2 End). + +Lemma ocaml_compare_aux_Cmp : forall e, + Cmp (ocaml_compare_aux e) (flatten_e e#1) (flatten_e e#2). +Proof. + intros e; functional induction ocaml_compare_aux e; simpl; intros; + auto; try discriminate. + apply L.eq_refl. + simpl in *. + apply cons_Cmp; auto. + rewrite <- 2 cons_1; auto. +Qed. + +Lemma ocaml_compare_Cmp : forall s1 s2, + Cmp (ocaml_compare s1 s2) (elements s1) (elements s2). +Proof. + unfold ocaml_compare; intros. + assert (H1:=cons_1 s1 End). + assert (H2:=cons_1 s2 End). + simpl in *; rewrite <- app_nil_end in *; rewrite <-H1,<-H2. + apply (@ocaml_compare_aux_Cmp (cons s1 End, cons s2 End)). +Qed. + +Lemma ocaml_compare_alt : forall s1 s2, bst s1 -> bst s2 -> + ocaml_compare s1 s2 = compare s1 s2. +Proof. + intros s1 s2 B1 B2. + generalize (ocaml_compare_Cmp s1 s2)(compare_Cmp s1 s2). + unfold Cmp. + destruct ocaml_compare; destruct compare; auto; intros; elimtype False. + elim (lt_not_eq B1 B2 H0); auto. + elim (lt_not_eq B2 B1 H0); auto. + apply eq_sym; auto. + elim (lt_not_eq B1 B2 H); auto. + elim (lt_not_eq B1 B1). + red; eapply L.lt_trans; eauto. + apply eq_refl. + elim (lt_not_eq B2 B1 H); auto. + apply eq_sym; auto. + elim (lt_not_eq B1 B2 H0); auto. + elim (lt_not_eq B1 B1). + red; eapply L.lt_trans; eauto. + apply eq_refl. +Qed. + + +(** * Equality test *) + +Definition ocaml_equal s1 s2 : bool := + match ocaml_compare s1 s2 with + | Eq => true + | _ => false + end. + +Lemma ocaml_equal_1 : forall s1 s2, bst s1 -> bst s2 -> + Equal s1 s2 -> ocaml_equal s1 s2 = true. +Proof. +unfold ocaml_equal; intros s1 s2 B1 B2 E. +generalize (ocaml_compare_Cmp s1 s2). +destruct (ocaml_compare s1 s2); auto; intros. +elim (lt_not_eq B1 B2 H E); auto. +elim (lt_not_eq B2 B1 H (eq_sym E)); auto. +Qed. + +Lemma ocaml_equal_2 : forall s1 s2, + ocaml_equal s1 s2 = true -> Equal s1 s2. +Proof. +unfold ocaml_equal; intros s1 s2 E. +generalize (ocaml_compare_Cmp s1 s2); + destruct ocaml_compare; auto; discriminate. +Qed. + +Lemma ocaml_equal_alt : forall s1 s2, bst s1 -> bst s2 -> + ocaml_equal s1 s2 = equal s1 s2. +Proof. +intros; unfold ocaml_equal, equal; rewrite ocaml_compare_alt; auto. +Qed. + +End OcamlOps. + + + +(** * Encapsulation + + We can implement [S] with balanced binary search trees. + When compared to [FSetAVL], we maintain here two invariants + (bst and avl) instead of only bst, which is enough for fulfilling + the FSet interface. + + This encapsulation propose the non-structural variants + [ocaml_union], [ocaml_subset], [ocaml_compare], [ocaml_equal]. +*) + +Module IntMake (I:Int)(X: OrderedType) <: S with Module E := X. + + Module E := X. + Module Import OcamlOps := OcamlOps I X. + Import AvlProofs. + Import Raw. + Import Raw.Proofs. + + Record bbst := Bbst {this :> Raw.t; is_bst : bst this; is_avl : avl this}. + Definition t := bbst. + Definition elt := E.t. + + Definition In (x : elt) (s : t) : Prop := In x s. + Definition Equal (s s':t) : Prop := forall a : elt, In a s <-> In a s'. + Definition Subset (s s':t) : Prop := forall a : elt, In a s -> In a s'. + Definition Empty (s:t) : Prop := forall a : elt, ~ In a s. + Definition For_all (P : elt -> Prop) (s:t) : Prop := forall x, In x s -> P x. + Definition Exists (P : elt -> Prop) (s:t) : Prop := exists x, In x s /\ P x. + + Lemma In_1 : forall (s:t)(x y:elt), E.eq x y -> In x s -> In y s. + Proof. intro s; exact (@In_1 s). Qed. + + Definition mem (x:elt)(s:t) : bool := mem x s. + + Definition empty : t := Bbst empty_bst empty_avl. + Definition is_empty (s:t) : bool := is_empty s. + Definition singleton (x:elt) : t := + Bbst (singleton_bst x) (singleton_avl x). + Definition add (x:elt)(s:t) : t := + Bbst (add_bst x (is_bst s)) (add_avl x (is_avl s)). + Definition remove (x:elt)(s:t) : t := + Bbst (remove_bst x (is_bst s)) (remove_avl x (is_avl s)). + Definition inter (s s':t) : t := + Bbst (inter_bst (is_bst s) (is_bst s')) + (inter_avl (is_avl s) (is_avl s')). + Definition union (s s':t) : t := + Bbst (union_bst (is_bst s) (is_bst s')) + (union_avl (is_avl s) (is_avl s')). + Definition ocaml_union (s s':t) : t := + Bbst (@ocaml_union_bst (s.(this),s'.(this)) + (is_bst s) (is_avl s) (is_bst s') (is_avl s')) + (@ocaml_union_avl (s.(this),s'.(this)) (is_avl s) (is_avl s')). + Definition diff (s s':t) : t := + Bbst (diff_bst (is_bst s) (is_bst s')) + (diff_avl (is_avl s) (is_avl s')). + Definition elements (s:t) : list elt := elements s. + Definition min_elt (s:t) : option elt := min_elt s. + Definition max_elt (s:t) : option elt := max_elt s. + Definition choose (s:t) : option elt := choose s. + Definition fold (B : Type) (f : elt -> B -> B) (s:t) : B -> B := fold f s. + Definition cardinal (s:t) : nat := cardinal s. + Definition filter (f : elt -> bool) (s:t) : t := + Bbst (filter_bst f (is_bst s)) (filter_avl f (is_avl s)). + Definition for_all (f : elt -> bool) (s:t) : bool := for_all f s. + Definition exists_ (f : elt -> bool) (s:t) : bool := exists_ f s. + Definition partition (f : elt -> bool) (s:t) : t * t := + let p := partition f s in + (@Bbst (fst p) (partition_bst_1 f (is_bst s)) + (partition_avl_1 f (is_avl s)), + @Bbst (snd p) (partition_bst_2 f (is_bst s)) + (partition_avl_2 f (is_avl s))). + + Definition equal (s s':t) : bool := equal s s'. + Definition ocaml_equal (s s':t) : bool := ocaml_equal s s'. + Definition subset (s s':t) : bool := subset s s'. + Definition ocaml_subset (s s':t) : bool := + ocaml_subset (s.(this),s'.(this)). + + Definition eq (s s':t) : Prop := Equal s s'. + Definition lt (s s':t) : Prop := lt s s'. + + Definition compare (s s':t) : Compare lt eq s s'. + Proof. + intros (s,b,a) (s',b',a'). + generalize (compare_Cmp s s'). + destruct Raw.compare; intros; [apply EQ|apply LT|apply GT]; red; auto. + change (Raw.Equal s s'); auto. + Defined. + + Definition ocaml_compare (s s':t) : Compare lt eq s s'. + Proof. + intros (s,b,a) (s',b',a'). + generalize (ocaml_compare_Cmp s s'). + destruct ocaml_compare; intros; [apply EQ|apply LT|apply GT]; red; auto. + change (Raw.Equal s s'); auto. + Defined. + + (* specs *) + Section Specs. + Variable s s' s'': t. + Variable x y : elt. + + Hint Resolve is_bst is_avl. + + Lemma mem_1 : In x s -> mem x s = true. + Proof. exact (mem_1 (is_bst s)). Qed. + Lemma mem_2 : mem x s = true -> In x s. + Proof. exact (@mem_2 s x). Qed. + + Lemma equal_1 : Equal s s' -> equal s s' = true. + Proof. exact (equal_1 (is_bst s) (is_bst s')). Qed. + Lemma equal_2 : equal s s' = true -> Equal s s'. + Proof. exact (@equal_2 s s'). Qed. + + Lemma ocaml_equal_alt : ocaml_equal s s' = equal s s'. + Proof. + destruct s; destruct s'; unfold ocaml_equal, equal; simpl. + apply ocaml_equal_alt; auto. + Qed. + + Lemma ocaml_equal_1 : Equal s s' -> ocaml_equal s s' = true. + Proof. exact (ocaml_equal_1 (is_bst s) (is_bst s')). Qed. + Lemma ocaml_equal_2 : ocaml_equal s s' = true -> Equal s s'. + Proof. exact (@ocaml_equal_2 s s'). Qed. + + Ltac wrap t H := unfold t, In; simpl; rewrite H; auto; intuition. + + Lemma subset_1 : Subset s s' -> subset s s' = true. + Proof. wrap subset subset_12. Qed. + Lemma subset_2 : subset s s' = true -> Subset s s'. + Proof. wrap subset subset_12. Qed. + + Lemma ocaml_subset_alt : ocaml_subset s s' = subset s s'. + Proof. + destruct s; destruct s'; unfold ocaml_subset, subset; simpl. + rewrite ocaml_subset_alt; auto. + Qed. + + Lemma ocaml_subset_1 : Subset s s' -> ocaml_subset s s' = true. + Proof. wrap ocaml_subset ocaml_subset_12; simpl; auto. Qed. + Lemma ocaml_subset_2 : ocaml_subset s s' = true -> Subset s s'. + Proof. wrap ocaml_subset ocaml_subset_12; simpl; auto. Qed. + + Lemma empty_1 : Empty empty. + Proof. exact empty_1. Qed. + + Lemma is_empty_1 : Empty s -> is_empty s = true. + Proof. exact (@is_empty_1 s). Qed. + Lemma is_empty_2 : is_empty s = true -> Empty s. + Proof. exact (@is_empty_2 s). Qed. + + Lemma add_1 : E.eq x y -> In y (add x s). + Proof. wrap add add_in. Qed. + Lemma add_2 : In y s -> In y (add x s). + Proof. wrap add add_in. Qed. + Lemma add_3 : ~ E.eq x y -> In y (add x s) -> In y s. + Proof. wrap add add_in. elim H; auto. Qed. + + Lemma remove_1 : E.eq x y -> ~ In y (remove x s). + Proof. wrap remove remove_in. Qed. + Lemma remove_2 : ~ E.eq x y -> In y s -> In y (remove x s). + Proof. wrap remove remove_in. Qed. + Lemma remove_3 : In y (remove x s) -> In y s. + Proof. wrap remove remove_in. Qed. + + Lemma singleton_1 : In y (singleton x) -> E.eq x y. + Proof. exact (@singleton_1 x y). Qed. + Lemma singleton_2 : E.eq x y -> In y (singleton x). + Proof. exact (@singleton_2 x y). Qed. + + Lemma union_1 : In x (union s s') -> In x s \/ In x s'. + Proof. wrap union union_in. Qed. + Lemma union_2 : In x s -> In x (union s s'). + Proof. wrap union union_in. Qed. + Lemma union_3 : In x s' -> In x (union s s'). + Proof. wrap union union_in. Qed. + + Lemma ocaml_union_alt : Equal (ocaml_union s s') (union s s'). + Proof. + unfold ocaml_union, union, Equal, In. + destruct s as (s0,b,a); destruct s' as (s0',b',a'); simpl. + exact (@ocaml_union_alt (s0,s0') b a b' a'). + Qed. + + Lemma ocaml_union_1 : In x (ocaml_union s s') -> In x s \/ In x s'. + Proof. wrap ocaml_union ocaml_union_in; simpl; auto. Qed. + Lemma ocaml_union_2 : In x s -> In x (ocaml_union s s'). + Proof. wrap ocaml_union ocaml_union_in; simpl; auto. Qed. + Lemma ocaml_union_3 : In x s' -> In x (ocaml_union s s'). + Proof. wrap ocaml_union ocaml_union_in; simpl; auto. Qed. + + Lemma inter_1 : In x (inter s s') -> In x s. + Proof. wrap inter inter_in. Qed. + Lemma inter_2 : In x (inter s s') -> In x s'. + Proof. wrap inter inter_in. Qed. + Lemma inter_3 : In x s -> In x s' -> In x (inter s s'). + Proof. wrap inter inter_in. Qed. + + Lemma diff_1 : In x (diff s s') -> In x s. + Proof. wrap diff diff_in. Qed. + Lemma diff_2 : In x (diff s s') -> ~ In x s'. + Proof. wrap diff diff_in. Qed. + Lemma diff_3 : In x s -> ~ In x s' -> In x (diff s s'). + Proof. wrap diff diff_in. Qed. + + Lemma fold_1 : forall (A : Type) (i : A) (f : elt -> A -> A), + fold f s i = fold_left (fun a e => f e a) (elements s) i. + Proof. + unfold fold, elements; intros; apply fold_1; auto. + Qed. + + Lemma cardinal_1 : cardinal s = length (elements s). + Proof. + unfold cardinal, elements; intros; apply elements_cardinal; auto. + Qed. + + Section Filter. + Variable f : elt -> bool. + + Lemma filter_1 : compat_bool E.eq f -> In x (filter f s) -> In x s. + Proof. intro. wrap filter filter_in. Qed. + Lemma filter_2 : compat_bool E.eq f -> In x (filter f s) -> f x = true. + Proof. intro. wrap filter filter_in. Qed. + Lemma filter_3 : compat_bool E.eq f -> In x s -> f x = true -> In x (filter f s). + Proof. intro. wrap filter filter_in. Qed. + + Lemma for_all_1 : compat_bool E.eq f -> For_all (fun x => f x = true) s -> for_all f s = true. + Proof. exact (@for_all_1 f s). Qed. + Lemma for_all_2 : compat_bool E.eq f -> for_all f s = true -> For_all (fun x => f x = true) s. + Proof. exact (@for_all_2 f s). Qed. + + Lemma exists_1 : compat_bool E.eq f -> Exists (fun x => f x = true) s -> exists_ f s = true. + Proof. exact (@exists_1 f s). Qed. + Lemma exists_2 : compat_bool E.eq f -> exists_ f s = true -> Exists (fun x => f x = true) s. + Proof. exact (@exists_2 f s). Qed. + + Lemma partition_1 : compat_bool E.eq f -> + Equal (fst (partition f s)) (filter f s). + Proof. + unfold partition, filter, Equal, In; simpl ;intros H a. + rewrite partition_in_1, filter_in; intuition. + Qed. + + Lemma partition_2 : compat_bool E.eq f -> + Equal (snd (partition f s)) (filter (fun x => negb (f x)) s). + Proof. + unfold partition, filter, Equal, In; simpl ;intros H a. + rewrite partition_in_2, filter_in; intuition. + rewrite H2; auto. + destruct (f a); auto. + red; intros; f_equal. + rewrite (H _ _ H0); auto. + Qed. + + End Filter. + + Lemma elements_1 : In x s -> InA E.eq x (elements s). + Proof. wrap elements elements_in. Qed. + Lemma elements_2 : InA E.eq x (elements s) -> In x s. + Proof. wrap elements elements_in. Qed. + Lemma elements_3 : sort E.lt (elements s). + Proof. exact (elements_sort (is_bst s)). Qed. + Lemma elements_3w : NoDupA E.eq (elements s). + Proof. exact (elements_nodup (is_bst s)). Qed. + + Lemma min_elt_1 : min_elt s = Some x -> In x s. + Proof. exact (@min_elt_1 s x). Qed. + Lemma min_elt_2 : min_elt s = Some x -> In y s -> ~ E.lt y x. + Proof. exact (@min_elt_2 s x y (is_bst s)). Qed. + Lemma min_elt_3 : min_elt s = None -> Empty s. + Proof. exact (@min_elt_3 s). Qed. + + Lemma max_elt_1 : max_elt s = Some x -> In x s. + Proof. exact (@max_elt_1 s x). Qed. + Lemma max_elt_2 : max_elt s = Some x -> In y s -> ~ E.lt x y. + Proof. exact (@max_elt_2 s x y (is_bst s)). Qed. + Lemma max_elt_3 : max_elt s = None -> Empty s. + Proof. exact (@max_elt_3 s). Qed. + + Lemma choose_1 : choose s = Some x -> In x s. + Proof. exact (@choose_1 s x). Qed. + Lemma choose_2 : choose s = None -> Empty s. + Proof. exact (@choose_2 s). Qed. + Lemma choose_3 : choose s = Some x -> choose s' = Some y -> + Equal s s' -> E.eq x y. + Proof. exact (@choose_3 _ _ (is_bst s) (is_bst s') x y). Qed. + + Lemma eq_refl : eq s s. + Proof. exact (eq_refl s). Qed. + Lemma eq_sym : eq s s' -> eq s' s. + Proof. exact (@eq_sym s s'). Qed. + Lemma eq_trans : eq s s' -> eq s' s'' -> eq s s''. + Proof. exact (@eq_trans s s' s''). Qed. + + Lemma lt_trans : lt s s' -> lt s' s'' -> lt s s''. + Proof. exact (@lt_trans s s' s''). Qed. + Lemma lt_not_eq : lt s s' -> ~eq s s'. + Proof. exact (@lt_not_eq _ _ (is_bst s) (is_bst s')). Qed. + + End Specs. +End IntMake. + +(* For concrete use inside Coq, we propose an instantiation of [Int] by [Z]. *) + +Module Make (X: OrderedType) <: S with Module E := X + :=IntMake(Z_as_Int)(X). + diff --git a/theories/FSets/FSetInterface.v b/theories/FSets/FSetInterface.v index 64ad234b..1255fcc8 100644 --- a/theories/FSets/FSetInterface.v +++ b/theories/FSets/FSetInterface.v @@ -6,40 +6,53 @@ (* * GNU Lesser General Public License Version 2.1 *) (***********************************************************************) -(* $Id: FSetInterface.v 8820 2006-05-15 11:44:05Z letouzey $ *) +(* $Id: FSetInterface.v 10616 2008-03-04 17:33:35Z letouzey $ *) (** * Finite set library *) -(** Set interfaces *) - -(* begin hide *) -Require Export Bool. -Require Export OrderedType. +(** Set interfaces, inspired by the one of Ocaml. When compared with + Ocaml, the main differences are: + - the lack of [iter] function, useless since Coq is purely functional + - the use of [option] types instead of [Not_found] exceptions + - the use of [nat] instead of [int] for the [cardinal] function + + Several variants of the set interfaces are available: + - [WSfun] : functorial signature for weak sets, non-dependent style + - [WS] : self-contained version of [WSfun] + - [Sfun] : functorial signature for ordered sets, non-dependent style + - [S] : self-contained version of [Sfun] + - [Sdep] : analog of [S] written using dependent style + + If unsure, [S] is probably what you're looking for: other signatures + are subsets of it, apart from [Sdep] which is isomorphic to [S] (see + [FSetBridge]). +*) + +Require Export Bool OrderedType DecidableType. Set Implicit Arguments. Unset Strict Implicit. -(* end hide *) -(** Compatibility of a boolean function with respect to an equality. *) -Definition compat_bool (A:Set)(eqA: A->A->Prop)(f: A-> bool) := - forall x y : A, eqA x y -> f x = f y. +(** * Non-dependent signatures -(** Compatibility of a predicate with respect to an equality. *) -Definition compat_P (A:Set)(eqA: A->A->Prop)(P : A -> Prop) := - forall x y : A, eqA x y -> P x -> P y. + The following signatures presents sets as purely informative + programs together with axioms *) -Hint Unfold compat_bool compat_P. -(** * Non-dependent signature - Signature [S] presents sets as purely informative programs - together with axioms *) +(** ** Functorial signature for weak sets -Module Type S. + Weak sets are sets without ordering on base elements, only + a decidable equality. *) + +Module Type WSfun (E : EqualityType). + + (** The module E of base objects is meant to be a [DecidableType] + (and used to be so). But requiring only an [EqualityType] here + allows subtyping between weak and ordered sets *) - Declare Module E : OrderedType. Definition elt := E.t. - Parameter t : Set. (** the abstract type of sets *) + Parameter t : Type. (** the abstract type of sets *) (** Logical predicates *) Parameter In : elt -> t -> Prop. @@ -82,10 +95,12 @@ Module Type S. (** Set difference. *) Definition eq : t -> t -> Prop := Equal. - Parameter lt : t -> t -> Prop. - Parameter compare : forall s s' : t, Compare lt eq s s'. - (** Total ordering between sets. Can be used as the ordering function - for doing sets of sets. *) + (** In order to have the subtyping WS < S between weak and ordered + sets, we do not require here an [eq_dec]. This interface is hence + not compatible with [DecidableType], but only with [EqualityType], + so in general it may not possible to form weak sets of weak sets. + Some particular implementations may allow this nonetheless, in + particular [FSetWeakList.Make]. *) Parameter equal : t -> t -> bool. (** [equal s1 s2] tests whether the sets [s1] and [s2] are @@ -95,15 +110,11 @@ Module Type S. (** [subset s1 s2] tests whether the set [s1] is a subset of the set [s2]. *) - (** Coq comment: [iter] is useless in a purely functional world *) - (** iter: (elt -> unit) -> set -> unit. i*) - (** [iter f s] applies [f] in turn to all elements of [s]. - The order in which the elements of [s] are presented to [f] - is unspecified. *) - - Parameter fold : forall A : Set, (elt -> A -> A) -> t -> A -> A. + Parameter fold : forall A : Type, (elt -> A -> A) -> t -> A -> A. (** [fold f s a] computes [(f xN ... (f x2 (f x1 a))...)], - where [x1 ... xN] are the elements of [s], in increasing order. *) + where [x1 ... xN] are the elements of [s]. + The order in which elements of [s] are presented to [f] is + unspecified. *) Parameter for_all : (elt -> bool) -> t -> bool. (** [for_all p s] checks if all elements of the set @@ -125,59 +136,39 @@ Module Type S. Parameter cardinal : t -> nat. (** Return the number of elements of a set. *) - (** Coq comment: nat instead of int ... *) Parameter elements : t -> list elt. - (** Return the list of all elements of the given set. - The returned list is sorted in increasing order with respect - to the ordering [Ord.compare], where [Ord] is the argument - given to {!Set.Make}. *) - - Parameter min_elt : t -> option elt. - (** Return the smallest element of the given set - (with respect to the [Ord.compare] ordering), or raise - [Not_found] if the set is empty. *) - (** Coq comment: [Not_found] is represented by the option type *) - - Parameter max_elt : t -> option elt. - (** Same as {!Set.S.min_elt}, but returns the largest element of the - given set. *) - (** Coq comment: [Not_found] is represented by the option type *) + (** Return the list of all elements of the given set, in any order. *) Parameter choose : t -> option elt. - (** Return one element of the given set, or raise [Not_found] if - the set is empty. Which element is chosen is unspecified, - but equal elements will be chosen for equal sets. *) - (** Coq comment: [Not_found] is represented by the option type *) + (** Return one element of the given set, or [None] if + the set is empty. Which element is chosen is unspecified. + Equal sets could return different elements. *) Section Spec. - Variable s s' s'' : t. + Variable s s' s'': t. Variable x y : elt. (** Specification of [In] *) Parameter In_1 : E.eq x y -> In x s -> In y s. - + (** Specification of [eq] *) Parameter eq_refl : eq s s. Parameter eq_sym : eq s s' -> eq s' s. Parameter eq_trans : eq s s' -> eq s' s'' -> eq s s''. - - (** Specification of [lt] *) - Parameter lt_trans : lt s s' -> lt s' s'' -> lt s s''. - Parameter lt_not_eq : lt s s' -> ~ eq s s'. (** Specification of [mem] *) Parameter mem_1 : In x s -> mem x s = true. Parameter mem_2 : mem x s = true -> In x s. (** Specification of [equal] *) - Parameter equal_1 : s[=]s' -> equal s s' = true. - Parameter equal_2 : equal s s' = true ->s[=]s'. + Parameter equal_1 : Equal s s' -> equal s s' = true. + Parameter equal_2 : equal s s' = true -> Equal s s'. (** Specification of [subset] *) - Parameter subset_1 : s[<=]s' -> subset s s' = true. - Parameter subset_2 : subset s s' = true -> s[<=]s'. + Parameter subset_1 : Subset s s' -> subset s s' = true. + Parameter subset_2 : subset s s' = true -> Subset s s'. (** Specification of [empty] *) Parameter empty_1 : Empty empty. @@ -216,7 +207,7 @@ Module Type S. Parameter diff_3 : In x s -> ~ In x s' -> In x (diff s s'). (** Specification of [fold] *) - Parameter fold_1 : forall (A : Set) (i : A) (f : elt -> A -> A), + Parameter fold_1 : forall (A : Type) (i : A) (f : elt -> A -> A), fold f s i = fold_left (fun a e => f e a) (elements s) i. (** Specification of [cardinal] *) @@ -249,18 +240,93 @@ Module Type S. exists_ f s = true -> Exists (fun x => f x = true) s. (** Specification of [partition] *) - Parameter partition_1 : compat_bool E.eq f -> - fst (partition f s) [=] filter f s. - Parameter partition_2 : compat_bool E.eq f -> - snd (partition f s) [=] filter (fun x => negb (f x)) s. + Parameter partition_1 : + compat_bool E.eq f -> Equal (fst (partition f s)) (filter f s). + Parameter partition_2 : + compat_bool E.eq f -> + Equal (snd (partition f s)) (filter (fun x => negb (f x)) s). End Filter. (** Specification of [elements] *) Parameter elements_1 : In x s -> InA E.eq x (elements s). Parameter elements_2 : InA E.eq x (elements s) -> In x s. + (** When compared with ordered sets, here comes the only + property that is really weaker: *) + Parameter elements_3w : NoDupA E.eq (elements s). + + (** Specification of [choose] *) + Parameter choose_1 : choose s = Some x -> In x s. + Parameter choose_2 : choose s = None -> Empty s. + + End Spec. + + Hint Resolve mem_1 equal_1 subset_1 empty_1 + is_empty_1 choose_1 choose_2 add_1 add_2 remove_1 + remove_2 singleton_2 union_1 union_2 union_3 + inter_3 diff_3 fold_1 filter_3 for_all_1 exists_1 + partition_1 partition_2 elements_1 elements_3w + : set. + Hint Immediate In_1 mem_2 equal_2 subset_2 is_empty_2 add_3 + remove_3 singleton_1 inter_1 inter_2 diff_1 diff_2 + filter_1 filter_2 for_all_2 exists_2 elements_2 + : set. + +End WSfun. + + + +(** ** Static signature for weak sets + + Similar to the functorial signature [SW], except that the + module [E] of base elements is incorporated in the signature. *) + +Module Type WS. + Declare Module E : EqualityType. + Include Type WSfun E. +End WS. + + + +(** ** Functorial signature for sets on ordered elements + + Based on [WSfun], plus ordering on sets and [min_elt] and [max_elt] + and some stronger specifications for other functions. *) + +Module Type Sfun (E : OrderedType). + Include Type WSfun E. + + Parameter lt : t -> t -> Prop. + Parameter compare : forall s s' : t, Compare lt eq s s'. + (** Total ordering between sets. Can be used as the ordering function + for doing sets of sets. *) + + Parameter min_elt : t -> option elt. + (** Return the smallest element of the given set + (with respect to the [E.compare] ordering), + or [None] if the set is empty. *) + + Parameter max_elt : t -> option elt. + (** Same as [min_elt], but returns the largest element of the + given set. *) + + Section Spec. + + Variable s s' s'' : t. + Variable x y : elt. + + (** Specification of [lt] *) + Parameter lt_trans : lt s s' -> lt s' s'' -> lt s s''. + Parameter lt_not_eq : lt s s' -> ~ eq s s'. + + (** Additional specification of [elements] *) Parameter elements_3 : sort E.lt (elements s). + (** Remark: since [fold] is specified via [elements], this stronger + specification of [elements] has an indirect impact on [fold], + which can now be proved to receive elements in increasing order. + *) + (** Specification of [min_elt] *) Parameter min_elt_1 : min_elt s = Some x -> In x s. Parameter min_elt_2 : min_elt s = Some x -> In y s -> ~ E.lt y x. @@ -271,37 +337,56 @@ Module Type S. Parameter max_elt_2 : max_elt s = Some x -> In y s -> ~ E.lt x y. Parameter max_elt_3 : max_elt s = None -> Empty s. - (** Specification of [choose] *) - Parameter choose_1 : choose s = Some x -> In x s. - Parameter choose_2 : choose s = None -> Empty s. -(* Parameter choose_equal: - (equal s s')=true -> E.eq (choose s) (choose s'). *) + (** Additional specification of [choose] *) + Parameter choose_3 : choose s = Some x -> choose s' = Some y -> + Equal s s' -> E.eq x y. End Spec. - (* begin hide *) - Hint Immediate In_1. - - Hint Resolve mem_1 mem_2 equal_1 equal_2 subset_1 subset_2 empty_1 - is_empty_1 is_empty_2 choose_1 choose_2 add_1 add_2 add_3 remove_1 - remove_2 remove_3 singleton_1 singleton_2 union_1 union_2 union_3 inter_1 - inter_2 inter_3 diff_1 diff_2 diff_3 filter_1 filter_2 filter_3 for_all_1 - for_all_2 exists_1 exists_2 partition_1 partition_2 elements_1 elements_2 - elements_3 min_elt_1 min_elt_2 min_elt_3 max_elt_1 max_elt_2 max_elt_3. - (* end hide *) + Hint Resolve elements_3 : set. + Hint Immediate + min_elt_1 min_elt_2 min_elt_3 max_elt_1 max_elt_2 max_elt_3 : set. + +End Sfun. + +(** ** Static signature for sets on ordered elements + + Similar to the functorial signature [Sfun], except that the + module [E] of base elements is incorporated in the signature. *) + +Module Type S. + Declare Module E : OrderedType. + Include Type Sfun E. End S. + +(** ** Some subtyping tests +<< +WSfun ---> WS + | | + | | + V V +Sfun ---> S + + +Module S_WS (M : S) <: SW := M. +Module Sfun_WSfun (E:OrderedType)(M : Sfun E) <: WSfun E := M. +Module S_Sfun (E:OrderedType)(M : S with Module E:=E) <: Sfun E := M. +Module WS_WSfun (E:EqualityType)(M : WS with Module E:=E) <: WSfun E := M. +>> +*) + (** * Dependent signature - Signature [Sdep] presents sets using dependent types *) + Signature [Sdep] presents ordered sets using dependent types *) Module Type Sdep. Declare Module E : OrderedType. Definition elt := E.t. - Parameter t : Set. + Parameter t : Type. Parameter In : elt -> t -> Prop. Definition Equal s s' := forall a : elt, In a s <-> In a s'. @@ -397,7 +482,7 @@ Module Type Sdep. Parameter fold : - forall (A : Set) (f : elt -> A -> A) (s : t) (i : A), + forall (A : Type) (f : elt -> A -> A) (s : t) (i : A), {r : A | let (l,_) := elements s in r = fold_left (fun a e => f e a) l i}. @@ -418,4 +503,14 @@ Module Type Sdep. Parameter choose : forall s : t, {x : elt | In x s} + {Empty s}. + (** The [choose_3] specification of [S] cannot be packed + in the dependent version of [choose], so we leave it separate. *) + Parameter choose_equal : forall s s', Equal s s' -> + match choose s, choose s' with + | inleft (exist x _), inleft (exist x' _) => E.eq x x' + | inright _, inright _ => True + | _, _ => False + end. + End Sdep. + diff --git a/theories/FSets/FSetList.v b/theories/FSets/FSetList.v index f6205542..a205d5b0 100644 --- a/theories/FSets/FSetList.v +++ b/theories/FSets/FSetList.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (***********************************************************************) -(* $Id: FSetList.v 8834 2006-05-20 00:41:35Z letouzey $ *) +(* $Id: FSetList.v 10616 2008-03-04 17:33:35Z letouzey $ *) (** * Finite sets library *) @@ -25,7 +25,6 @@ Unset Strict Implicit. Module Raw (X: OrderedType). - Module E := X. Module MX := OrderedTypeFacts X. Import MX. @@ -145,7 +144,7 @@ Module Raw (X: OrderedType). | _, _ => false end. - Fixpoint fold (B : Set) (f : elt -> B -> B) (s : t) {struct s} : + Fixpoint fold (B : Type) (f : elt -> B -> B) (s : t) {struct s} : B -> B := fun i => match s with | nil => i | x :: l => fold f l (f x i) @@ -649,6 +648,11 @@ Module Raw (X: OrderedType). unfold elements; auto. Qed. + Lemma elements_3w : forall (s : t) (Hs : Sort s), NoDupA X.eq (elements s). + Proof. + unfold elements; auto. + Qed. + Lemma min_elt_1 : forall (s : t) (x : elt), min_elt s = Some x -> In x s. Proof. intro s; case s; simpl; intros; inversion H; auto. @@ -718,8 +722,21 @@ Module Raw (X: OrderedType). Definition choose_2 : forall s : t, choose s = None -> Empty s := min_elt_3. + Lemma choose_3: forall s s', Sort s -> Sort s' -> forall x x', + choose s = Some x -> choose s' = Some x' -> Equal s s' -> X.eq x x'. + Proof. + unfold choose, Equal; intros s s' Hs Hs' x x' Hx Hx' H. + assert (~X.lt x x'). + apply min_elt_2 with s'; auto. + rewrite <-H; auto using min_elt_1. + assert (~X.lt x' x). + apply min_elt_2 with s; auto. + rewrite H; auto using min_elt_1. + destruct (X.compare x x'); intuition. + Qed. + Lemma fold_1 : - forall (s : t) (Hs : Sort s) (A : Set) (i : A) (f : elt -> A -> A), + forall (s : t) (Hs : Sort s) (A : Type) (i : A) (f : elt -> A -> A), fold f s i = fold_left (fun a e => f e a) (elements s) i. Proof. induction s. @@ -1037,7 +1054,7 @@ Module Make (X: OrderedType) <: S with Module E := X. Module Raw := Raw X. Module E := X. - Record slist : Set := {this :> Raw.t; sorted : sort E.lt this}. + Record slist := {this :> Raw.t; sorted : sort E.lt this}. Definition t := slist. Definition elt := E.t. @@ -1066,7 +1083,7 @@ Module Make (X: OrderedType) <: S with Module E := X. Definition min_elt (s : t) : option elt := Raw.min_elt s. Definition max_elt (s : t) : option elt := Raw.max_elt s. Definition choose (s : t) : option elt := Raw.choose s. - Definition fold (B : Set) (f : elt -> B -> B) (s : t) : B -> B := Raw.fold (B:=B) f s. + Definition fold (B : Type) (f : elt -> B -> B) (s : t) : B -> B := Raw.fold (B:=B) f s. Definition cardinal (s : t) : nat := Raw.cardinal s. Definition filter (f : elt -> bool) (s : t) : t := Build_slist (Raw.filter_sort (sorted s) f). @@ -1149,7 +1166,7 @@ Module Make (X: OrderedType) <: S with Module E := X. Lemma diff_3 : In x s -> ~ In x s' -> In x (diff s s'). Proof. exact (fun H => Raw.diff_3 s.(sorted) s'.(sorted) H). Qed. - Lemma fold_1 : forall (A : Set) (i : A) (f : elt -> A -> A), + Lemma fold_1 : forall (A : Type) (i : A) (f : elt -> A -> A), fold f s i = fold_left (fun a e => f e a) (elements s) i. Proof. exact (Raw.fold_1 s.(sorted)). Qed. @@ -1202,6 +1219,8 @@ Module Make (X: OrderedType) <: S with Module E := X. Proof. exact (fun H => Raw.elements_2 H). Qed. Lemma elements_3 : sort E.lt (elements s). Proof. exact (Raw.elements_3 s.(sorted)). Qed. + Lemma elements_3w : NoDupA E.eq (elements s). + Proof. exact (Raw.elements_3w s.(sorted)). Qed. Lemma min_elt_1 : min_elt s = Some x -> In x s. Proof. exact (fun H => Raw.min_elt_1 H). Qed. @@ -1221,6 +1240,9 @@ Module Make (X: OrderedType) <: S with Module E := X. Proof. exact (fun H => Raw.choose_1 H). Qed. Lemma choose_2 : choose s = None -> Empty s. Proof. exact (fun H => Raw.choose_2 H). Qed. + Lemma choose_3 : choose s = Some x -> choose s' = Some y -> + Equal s s' -> E.eq x y. + Proof. exact (@Raw.choose_3 _ _ s.(sorted) s'.(sorted) x y). Qed. Lemma eq_refl : eq s s. Proof. exact (Raw.eq_refl s). Qed. diff --git a/theories/FSets/FSetProperties.v b/theories/FSets/FSetProperties.v index 6e93a546..7413b06b 100644 --- a/theories/FSets/FSetProperties.v +++ b/theories/FSets/FSetProperties.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (***********************************************************************) -(* $Id: FSetProperties.v 8853 2006-05-23 18:17:38Z herbelin $ *) +(* $Id: FSetProperties.v 11064 2008-06-06 17:00:52Z letouzey $ *) (** * Finite sets library *) @@ -16,414 +16,259 @@ [In x s] instead of [mem x s=true], [Equal s s'] instead of [equal s s'=true], etc. *) -Require Export FSetInterface. -Require Import FSetFacts. +Require Export FSetInterface. +Require Import DecidableTypeEx FSetFacts FSetDecide. Set Implicit Arguments. Unset Strict Implicit. -Hint Unfold transpose compat_op compat_nat. +Hint Unfold transpose compat_op. Hint Extern 1 (Setoid_Theory _ _) => constructor; congruence. -Module Properties (M: S). - Module ME:=OrderedTypeFacts(M.E). - Import ME. (* for ME.eq_dec *) - Import M.E. - Import M. - Import Logic. (* to unmask [eq] *) - Import Peano. (* to unmask [lt] *) - - (** Results about lists without duplicates *) +(** First, a functor for Weak Sets. Since the signature [WS] includes + an EqualityType and not a stronger DecidableType, this functor + should take two arguments in order to compensate this. *) - Module FM := Facts M. - Import FM. - - Definition Add (x : elt) (s s' : t) := - forall y : elt, In y s' <-> E.eq x y \/ In y s. +Module WProperties (Import E : DecidableType)(M : WSfun E). + Module Import Dec := WDecide E M. + Module Import FM := Dec.F (* FSetFacts.WFacts E M *). + Import M. Lemma In_dec : forall x s, {In x s} + {~ In x s}. Proof. intros; generalize (mem_iff s x); case (mem x s); intuition. Qed. - Section BasicProperties. - - (** properties of [Equal] *) + Definition Add x s s' := forall y, In y s' <-> E.eq x y \/ In y s. - Lemma equal_refl : forall s, s[=]s. + Lemma Add_Equal : forall x s s', Add x s s' <-> s' [=] add x s. Proof. - unfold Equal; intuition. - Qed. - - Lemma equal_sym : forall s s', s[=]s' -> s'[=]s. - Proof. - unfold Equal; intros. - rewrite H; intuition. + unfold Add. + split; intros. + red; intros. + rewrite H; clear H. + fsetdec. + fsetdec. Qed. + + Ltac expAdd := repeat rewrite Add_Equal. - Lemma equal_trans : forall s1 s2 s3, s1[=]s2 -> s2[=]s3 -> s1[=]s3. - Proof. - unfold Equal; intros. - rewrite H; exact (H0 a). - Qed. + Section BasicProperties. Variable s s' s'' s1 s2 s3 : t. Variable x x' : elt. - (** properties of [Subset] *) - - Lemma subset_refl : s[<=]s. - Proof. - unfold Subset; intuition. - Qed. + Lemma equal_refl : s[=]s. + Proof. fsetdec. Qed. - Lemma subset_antisym : s[<=]s' -> s'[<=]s -> s[=]s'. - Proof. - unfold Subset, Equal; intuition. - Qed. + Lemma equal_sym : s[=]s' -> s'[=]s. + Proof. fsetdec. Qed. + + Lemma equal_trans : s1[=]s2 -> s2[=]s3 -> s1[=]s3. + Proof. fsetdec. Qed. + + Lemma subset_refl : s[<=]s. + Proof. fsetdec. Qed. Lemma subset_trans : s1[<=]s2 -> s2[<=]s3 -> s1[<=]s3. - Proof. - unfold Subset; intuition. - Qed. + Proof. fsetdec. Qed. + + Lemma subset_antisym : s[<=]s' -> s'[<=]s -> s[=]s'. + Proof. fsetdec. Qed. Lemma subset_equal : s[=]s' -> s[<=]s'. - Proof. - unfold Subset, Equal; firstorder. - Qed. + Proof. fsetdec. Qed. Lemma subset_empty : empty[<=]s. - Proof. - unfold Subset; intros a; set_iff; intuition. - Qed. + Proof. fsetdec. Qed. Lemma subset_remove_3 : s1[<=]s2 -> remove x s1 [<=] s2. - Proof. - unfold Subset; intros H a; set_iff; intuition. - Qed. + Proof. fsetdec. Qed. Lemma subset_diff : s1[<=]s3 -> diff s1 s2 [<=] s3. - Proof. - unfold Subset; intros H a; set_iff; intuition. - Qed. - + Proof. fsetdec. Qed. + Lemma subset_add_3 : In x s2 -> s1[<=]s2 -> add x s1 [<=] s2. - Proof. - unfold Subset; intros H H0 a; set_iff; intuition. - rewrite <- H2; auto. - Qed. + Proof. fsetdec. Qed. Lemma subset_add_2 : s1[<=]s2 -> s1[<=] add x s2. - Proof. - unfold Subset; intuition. - Qed. + Proof. fsetdec. Qed. Lemma in_subset : In x s1 -> s1[<=]s2 -> In x s2. - Proof. - unfold Subset; intuition. - Qed. + Proof. fsetdec. Qed. Lemma double_inclusion : s1[=]s2 <-> s1[<=]s2 /\ s2[<=]s1. - Proof. - unfold Subset, Equal; split; intros; intuition; generalize (H a); intuition. - Qed. - - (** properties of [empty] *) + Proof. intuition fsetdec. Qed. Lemma empty_is_empty_1 : Empty s -> s[=]empty. - Proof. - unfold Empty, Equal; intros; generalize (H a); set_iff; tauto. - Qed. + Proof. fsetdec. Qed. Lemma empty_is_empty_2 : s[=]empty -> Empty s. - Proof. - unfold Empty, Equal; intros; generalize (H a); set_iff; tauto. - Qed. - - (** properties of [add] *) + Proof. fsetdec. Qed. Lemma add_equal : In x s -> add x s [=] s. - Proof. - unfold Equal; intros; set_iff; intuition. - rewrite <- H1; auto. - Qed. + Proof. fsetdec. Qed. Lemma add_add : add x (add x' s) [=] add x' (add x s). - Proof. - unfold Equal; intros; set_iff; tauto. - Qed. - - (** properties of [remove] *) + Proof. fsetdec. Qed. Lemma remove_equal : ~ In x s -> remove x s [=] s. - Proof. - unfold Equal; intros; set_iff; intuition. - rewrite H1 in H; auto. - Qed. + Proof. fsetdec. Qed. Lemma Equal_remove : s[=]s' -> remove x s [=] remove x s'. - Proof. - intros; rewrite H; apply equal_refl. - Qed. - - (** properties of [add] and [remove] *) + Proof. fsetdec. Qed. Lemma add_remove : In x s -> add x (remove x s) [=] s. - Proof. - unfold Equal; intros; set_iff; elim (eq_dec x a); intuition. - rewrite <- H1; auto. - Qed. + Proof. fsetdec. Qed. Lemma remove_add : ~In x s -> remove x (add x s) [=] s. - Proof. - unfold Equal; intros; set_iff; elim (eq_dec x a); intuition. - rewrite H1 in H; auto. - Qed. - - (** properties of [singleton] *) + Proof. fsetdec. Qed. Lemma singleton_equal_add : singleton x [=] add x empty. - Proof. - unfold Equal; intros; set_iff; intuition. - Qed. - - (** properties of [union] *) + Proof. fsetdec. Qed. Lemma union_sym : union s s' [=] union s' s. - Proof. - unfold Equal; intros; set_iff; tauto. - Qed. + Proof. fsetdec. Qed. Lemma union_subset_equal : s[<=]s' -> union s s' [=] s'. - Proof. - unfold Subset, Equal; intros; set_iff; intuition. - Qed. + Proof. fsetdec. Qed. Lemma union_equal_1 : s[=]s' -> union s s'' [=] union s' s''. - Proof. - intros; rewrite H; apply equal_refl. - Qed. + Proof. fsetdec. Qed. Lemma union_equal_2 : s'[=]s'' -> union s s' [=] union s s''. - Proof. - intros; rewrite H; apply equal_refl. - Qed. + Proof. fsetdec. Qed. Lemma union_assoc : union (union s s') s'' [=] union s (union s' s''). - Proof. - unfold Equal; intros; set_iff; tauto. - Qed. + Proof. fsetdec. Qed. Lemma add_union_singleton : add x s [=] union (singleton x) s. - Proof. - unfold Equal; intros; set_iff; tauto. - Qed. + Proof. fsetdec. Qed. Lemma union_add : union (add x s) s' [=] add x (union s s'). - Proof. - unfold Equal; intros; set_iff; tauto. - Qed. + Proof. fsetdec. Qed. + + Lemma union_remove_add_1 : + union (remove x s) (add x s') [=] union (add x s) (remove x s'). + Proof. fsetdec. Qed. + + Lemma union_remove_add_2 : In x s -> + union (remove x s) (add x s') [=] union s s'. + Proof. fsetdec. Qed. Lemma union_subset_1 : s [<=] union s s'. - Proof. - unfold Subset; intuition. - Qed. + Proof. fsetdec. Qed. Lemma union_subset_2 : s' [<=] union s s'. - Proof. - unfold Subset; intuition. - Qed. + Proof. fsetdec. Qed. Lemma union_subset_3 : s[<=]s'' -> s'[<=]s'' -> union s s' [<=] s''. - Proof. - unfold Subset; intros H H0 a; set_iff; intuition. - Qed. + Proof. fsetdec. Qed. Lemma union_subset_4 : s[<=]s' -> union s s'' [<=] union s' s''. - Proof. - unfold Subset; intros H a; set_iff; intuition. - Qed. + Proof. fsetdec. Qed. Lemma union_subset_5 : s[<=]s' -> union s'' s [<=] union s'' s'. - Proof. - unfold Subset; intros H a; set_iff; intuition. - Qed. + Proof. fsetdec. Qed. Lemma empty_union_1 : Empty s -> union s s' [=] s'. - Proof. - unfold Equal, Empty; intros; set_iff; firstorder. - Qed. + Proof. fsetdec. Qed. Lemma empty_union_2 : Empty s -> union s' s [=] s'. - Proof. - unfold Equal, Empty; intros; set_iff; firstorder. - Qed. + Proof. fsetdec. Qed. Lemma not_in_union : ~In x s -> ~In x s' -> ~In x (union s s'). - Proof. - intros; set_iff; intuition. - Qed. - - (** properties of [inter] *) + Proof. fsetdec. Qed. Lemma inter_sym : inter s s' [=] inter s' s. - Proof. - unfold Equal; intros; set_iff; tauto. - Qed. + Proof. fsetdec. Qed. Lemma inter_subset_equal : s[<=]s' -> inter s s' [=] s. - Proof. - unfold Equal; intros; set_iff; intuition. - Qed. + Proof. fsetdec. Qed. Lemma inter_equal_1 : s[=]s' -> inter s s'' [=] inter s' s''. - Proof. - intros; rewrite H; apply equal_refl. - Qed. + Proof. fsetdec. Qed. Lemma inter_equal_2 : s'[=]s'' -> inter s s' [=] inter s s''. - Proof. - intros; rewrite H; apply equal_refl. - Qed. + Proof. fsetdec. Qed. Lemma inter_assoc : inter (inter s s') s'' [=] inter s (inter s' s''). - Proof. - unfold Equal; intros; set_iff; tauto. - Qed. + Proof. fsetdec. Qed. Lemma union_inter_1 : inter (union s s') s'' [=] union (inter s s'') (inter s' s''). - Proof. - unfold Equal; intros; set_iff; tauto. - Qed. + Proof. fsetdec. Qed. Lemma union_inter_2 : union (inter s s') s'' [=] inter (union s s'') (union s' s''). - Proof. - unfold Equal; intros; set_iff; tauto. - Qed. + Proof. fsetdec. Qed. Lemma inter_add_1 : In x s' -> inter (add x s) s' [=] add x (inter s s'). - Proof. - unfold Equal; intros; set_iff; intuition. - rewrite <- H1; auto. - Qed. + Proof. fsetdec. Qed. Lemma inter_add_2 : ~ In x s' -> inter (add x s) s' [=] inter s s'. - Proof. - unfold Equal; intros; set_iff; intuition. - destruct H; rewrite H0; auto. - Qed. + Proof. fsetdec. Qed. Lemma empty_inter_1 : Empty s -> Empty (inter s s'). - Proof. - unfold Empty; intros; set_iff; firstorder. - Qed. + Proof. fsetdec. Qed. Lemma empty_inter_2 : Empty s' -> Empty (inter s s'). - Proof. - unfold Empty; intros; set_iff; firstorder. - Qed. + Proof. fsetdec. Qed. Lemma inter_subset_1 : inter s s' [<=] s. - Proof. - unfold Subset; intro a; set_iff; tauto. - Qed. + Proof. fsetdec. Qed. Lemma inter_subset_2 : inter s s' [<=] s'. - Proof. - unfold Subset; intro a; set_iff; tauto. - Qed. + Proof. fsetdec. Qed. Lemma inter_subset_3 : s''[<=]s -> s''[<=]s' -> s''[<=] inter s s'. - Proof. - unfold Subset; intros H H' a; set_iff; intuition. - Qed. - - (** properties of [diff] *) + Proof. fsetdec. Qed. Lemma empty_diff_1 : Empty s -> Empty (diff s s'). - Proof. - unfold Empty, Equal; intros; set_iff; firstorder. - Qed. + Proof. fsetdec. Qed. Lemma empty_diff_2 : Empty s -> diff s' s [=] s'. - Proof. - unfold Empty, Equal; intros; set_iff; firstorder. - Qed. + Proof. fsetdec. Qed. Lemma diff_subset : diff s s' [<=] s. - Proof. - unfold Subset; intros a; set_iff; tauto. - Qed. + Proof. fsetdec. Qed. Lemma diff_subset_equal : s[<=]s' -> diff s s' [=] empty. - Proof. - unfold Subset, Equal; intros; set_iff; intuition; absurd (In a empty); auto. - Qed. + Proof. fsetdec. Qed. Lemma remove_diff_singleton : remove x s [=] diff s (singleton x). - Proof. - unfold Equal; intros; set_iff; intuition. - Qed. + Proof. fsetdec. Qed. Lemma diff_inter_empty : inter (diff s s') (inter s s') [=] empty. - Proof. - unfold Equal; intros; set_iff; intuition; absurd (In a empty); auto. - Qed. + Proof. fsetdec. Qed. Lemma diff_inter_all : union (diff s s') (inter s s') [=] s. - Proof. - unfold Equal; intros; set_iff; intuition. - elim (In_dec a s'); auto. - Qed. - - (** properties of [Add] *) + Proof. fsetdec. Qed. Lemma Add_add : Add x s (add x s). - Proof. - unfold Add; intros; set_iff; intuition. - Qed. + Proof. expAdd; fsetdec. Qed. Lemma Add_remove : In x s -> Add x (remove x s) s. - Proof. - unfold Add; intros; set_iff; intuition. - elim (eq_dec x y); auto. - rewrite <- H1; auto. - Qed. + Proof. expAdd; fsetdec. Qed. Lemma union_Add : Add x s s' -> Add x (union s s'') (union s' s''). - Proof. - unfold Add; intros; set_iff; rewrite H; tauto. - Qed. + Proof. expAdd; fsetdec. Qed. Lemma inter_Add : In x s'' -> Add x s s' -> Add x (inter s s'') (inter s' s''). - Proof. - unfold Add; intros; set_iff; rewrite H0; intuition. - rewrite <- H2; auto. - Qed. + Proof. expAdd; fsetdec. Qed. Lemma union_Equal : In x s'' -> Add x s s' -> union s s'' [=] union s' s''. - Proof. - unfold Add, Equal; intros; set_iff; rewrite H0; intuition. - rewrite <- H1; auto. - Qed. + Proof. expAdd; fsetdec. Qed. Lemma inter_Add_2 : ~In x s'' -> Add x s s' -> inter s s'' [=] inter s' s''. - Proof. - unfold Add, Equal; intros; set_iff; rewrite H0; intuition. - destruct H; rewrite H1; auto. - Qed. + Proof. expAdd; fsetdec. Qed. End BasicProperties. - Hint Immediate equal_sym: set. - Hint Resolve equal_refl equal_trans : set. - - Hint Immediate add_remove remove_add union_sym inter_sym: set. - Hint Resolve subset_refl subset_equal subset_antisym + Hint Immediate equal_sym add_remove remove_add union_sym inter_sym: set. + Hint Resolve equal_refl equal_trans subset_refl subset_equal subset_antisym subset_trans subset_empty subset_remove_3 subset_diff subset_add_3 subset_add_2 in_subset empty_is_empty_1 empty_is_empty_2 add_equal remove_equal singleton_equal_add union_subset_equal union_equal_1 @@ -436,6 +281,31 @@ Module Properties (M: S). remove_diff_singleton diff_inter_empty diff_inter_all Add_add Add_remove Equal_remove add_add : set. + (** * Properties of elements *) + + Lemma elements_Empty : forall s, Empty s <-> elements s = nil. + Proof. + intros. + unfold Empty. + split; intros. + assert (forall a, ~ List.In a (elements s)). + red; intros. + apply (H a). + rewrite elements_iff. + rewrite InA_alt; exists a; auto. + destruct (elements s); auto. + elim (H0 e); simpl; auto. + red; intros. + rewrite elements_iff in H0. + rewrite InA_alt in H0; destruct H0. + rewrite H in H0; destruct H0 as (_,H0); inversion H0. + Qed. + + Lemma elements_empty : elements empty = nil. + Proof. + rewrite <-elements_Empty; auto with set. + Qed. + (** * Alternative (weaker) specifications for [fold] *) Section Old_Spec_Now_Properties. @@ -447,14 +317,14 @@ Module Properties (M: S). *) Lemma fold_0 : - forall s (A : Set) (i : A) (f : elt -> A -> A), + forall s (A : Type) (i : A) (f : elt -> A -> A), exists l : list elt, NoDup l /\ (forall x : elt, In x s <-> InA E.eq x l) /\ fold f s i = fold_right f i l. Proof. intros; exists (rev (elements s)); split. - apply NoDupA_rev; auto. + apply NoDupA_rev; auto with set. exact E.eq_trans. split; intros. rewrite elements_iff; do 2 rewrite InA_alt. @@ -468,7 +338,7 @@ Module Properties (M: S). [fold_2]. *) Lemma fold_1 : - forall s (A : Set) (eqA : A -> A -> Prop) + forall s (A : Type) (eqA : A -> A -> Prop) (st : Setoid_Theory A eqA) (i : A) (f : elt -> A -> A), Empty s -> eqA (fold f s i) i. Proof. @@ -481,7 +351,7 @@ Module Properties (M: S). Qed. Lemma fold_2 : - forall s s' x (A : Set) (eqA : A -> A -> Prop) + forall s s' x (A : Type) (eqA : A -> A -> Prop) (st : Setoid_Theory A eqA) (i : A) (f : elt -> A -> A), compat_op E.eq eqA f -> transpose eqA f -> @@ -492,9 +362,21 @@ Module Properties (M: S). rewrite Hl2; rewrite Hl'2; clear Hl2 Hl'2. apply fold_right_add with (eqA:=E.eq)(eqB:=eqA); auto. eauto. - exact eq_dec. rewrite <- Hl1; auto. - intros; rewrite <- Hl1; rewrite <- Hl'1; auto. + intros a; rewrite InA_cons; rewrite <- Hl1; rewrite <- Hl'1; + rewrite (H2 a); intuition. + Qed. + + (** In fact, [fold] on empty sets is more than equivalent to + the initial element, it is Leibniz-equal to it. *) + + Lemma fold_1b : + forall s (A : Type)(i : A) (f : elt -> A -> A), + Empty s -> (fold f s i) = i. + Proof. + intros. + rewrite M.fold_1. + rewrite elements_Empty in H; rewrite H; simpl; auto. Qed. (** Similar specifications for [cardinal]. *) @@ -531,41 +413,46 @@ Module Properties (M: S). (** * Induction principle over sets *) + Lemma cardinal_Empty : forall s, Empty s <-> cardinal s = 0. + Proof. + intros. + rewrite elements_Empty, M.cardinal_1. + destruct (elements s); intuition; discriminate. + Qed. + Lemma cardinal_inv_1 : forall s, cardinal s = 0 -> Empty s. - Proof. - intros s; rewrite M.cardinal_1; intros H a; red. - rewrite elements_iff. - destruct (elements s); simpl in *; discriminate || inversion 1. + Proof. + intros; rewrite cardinal_Empty; auto. Qed. Hint Resolve cardinal_inv_1. Lemma cardinal_inv_2 : forall s n, cardinal s = S n -> { x : elt | In x s }. Proof. - intros; rewrite M.cardinal_1 in H. - generalize (elements_2 (s:=s)). - destruct (elements s); try discriminate. - exists e; auto. + intros; rewrite M.cardinal_1 in H. + generalize (elements_2 (s:=s)). + destruct (elements s); try discriminate. + exists e; auto. Qed. - Lemma Equal_cardinal_aux : - forall n s s', cardinal s = n -> s[=]s' -> cardinal s = cardinal s'. + Lemma cardinal_inv_2b : + forall s, cardinal s <> 0 -> { x : elt | In x s }. Proof. - simple induction n; intros. - rewrite H; symmetry . - apply cardinal_1. - rewrite <- H0; auto. - destruct (cardinal_inv_2 H0) as (x,H2). - revert H0. - rewrite (cardinal_2 (s:=remove x s) (s':=s) (x:=x)); auto with set. - rewrite (cardinal_2 (s:=remove x s') (s':=s') (x:=x)); auto with set. - rewrite H1 in H2; auto with set. + intro; generalize (@cardinal_inv_2 s); destruct cardinal; + [intuition|eauto]. Qed. Lemma Equal_cardinal : forall s s', s[=]s' -> cardinal s = cardinal s'. Proof. - intros; apply Equal_cardinal_aux with (cardinal s); auto. - Qed. + symmetry. + remember (cardinal s) as n; symmetry in Heqn; revert s s' Heqn H. + induction n; intros. + apply cardinal_1; rewrite <- H; auto. + destruct (cardinal_inv_2 Heqn) as (x,H2). + revert Heqn. + rewrite (cardinal_2 (s:=remove x s) (s':=s) (x:=x)); auto with set. + rewrite (cardinal_2 (s:=remove x s') (s':=s') (x:=x)); eauto with set. + Qed. Add Morphism cardinal : cardinal_m. Proof. @@ -574,40 +461,33 @@ Module Properties (M: S). Hint Resolve Add_add Add_remove Equal_remove cardinal_inv_1 Equal_cardinal. - Lemma cardinal_induction : - forall P : t -> Type, - (forall s, Empty s -> P s) -> - (forall s s', P s -> forall x, ~In x s -> Add x s s' -> P s') -> - forall n s, cardinal s = n -> P s. - Proof. - simple induction n; intros; auto. - destruct (cardinal_inv_2 H) as (x,H0). - apply X0 with (remove x s) x; auto. - apply X1; auto. - rewrite (cardinal_2 (x:=x)(s:=remove x s)(s':=s)) in H; auto. - Qed. - Lemma set_induction : forall P : t -> Type, (forall s : t, Empty s -> P s) -> (forall s s' : t, P s -> forall x : elt, ~In x s -> Add x s s' -> P s') -> forall s : t, P s. Proof. - intros; apply cardinal_induction with (cardinal s); auto. - Qed. + intros; remember (cardinal s) as n; revert s Heqn; induction n; intros; auto. + destruct (cardinal_inv_2 (sym_eq Heqn)) as (x,H0). + apply X0 with (remove x s) x; auto with set. + apply IHn; auto. + assert (S n = S (cardinal (remove x s))). + rewrite Heqn; apply cardinal_2 with x; auto with set. + inversion H; auto. + Qed. (** Other properties of [fold]. *) Section Fold. - Variables (A:Set)(eqA:A->A->Prop)(st:Setoid_Theory _ eqA). + Variables (A:Type)(eqA:A->A->Prop)(st:Setoid_Theory _ eqA). Variables (f:elt->A->A)(Comp:compat_op E.eq eqA f)(Ass:transpose eqA f). Section Fold_1. Variable i i':A. - Lemma fold_empty : eqA (fold f empty i) i. + Lemma fold_empty : (fold f empty i) = i. Proof. - apply fold_1; auto. + apply fold_1b; auto with set. Qed. Lemma fold_equal : @@ -642,7 +522,7 @@ Module Properties (M: S). Proof. intros. sym_st. - apply fold_2 with (eqA:=eqA); auto. + apply fold_2 with (eqA:=eqA); auto with set. Qed. Lemma remove_fold_2: forall s x, ~In x s -> @@ -742,7 +622,8 @@ Module Properties (M: S). apply fold_1; auto with set. Qed. - Lemma fold_union: forall s s', (forall x, ~In x s\/~In x s') -> + Lemma fold_union: forall s s', + (forall x, ~(In x s/\In x s')) -> eqA (fold f (union s s') i) (fold f s (fold f s' i)). Proof. intros. @@ -760,8 +641,8 @@ Module Properties (M: S). forall s p, fold (fun _ => S) s p = fold (fun _ => S) s 0 + p. Proof. assert (st := gen_st nat). - assert (fe : compat_op E.eq (@eq _) (fun _ => S)) by (unfold compat_op; auto). - assert (fp : transpose (@eq _) (fun _:elt => S)) by (unfold transpose; auto). + assert (fe : compat_op E.eq (@Logic.eq _) (fun _ => S)) by (unfold compat_op; auto). + assert (fp : transpose (@Logic.eq _) (fun _:elt => S)) by (unfold transpose; auto). intros s p; pattern s; apply set_induction; clear s; intros. rewrite (fold_1 st p (fun _ => S) H). rewrite (fold_1 st 0 (fun _ => S) H); trivial. @@ -774,11 +655,11 @@ Module Properties (M: S). simpl; auto. Qed. - (** properties of [cardinal] *) + (** more properties of [cardinal] *) Lemma empty_cardinal : cardinal empty = 0. Proof. - rewrite cardinal_fold; apply fold_1; auto. + rewrite cardinal_fold; apply fold_1; auto with set. Qed. Hint Immediate empty_cardinal cardinal_1 : set. @@ -798,11 +679,11 @@ Module Properties (M: S). Proof. intros; do 3 rewrite cardinal_fold. rewrite <- fold_plus. - apply fold_diff_inter with (eqA:=@eq nat); auto. + apply fold_diff_inter with (eqA:=@Logic.eq nat); auto. Qed. Lemma union_cardinal: - forall s s', (forall x, ~In x s\/~In x s') -> + forall s s', (forall x, ~(In x s/\In x s')) -> cardinal (union s s')=cardinal s+cardinal s'. Proof. intros; do 3 rewrite cardinal_fold. @@ -841,7 +722,7 @@ Module Properties (M: S). intros. do 4 rewrite cardinal_fold. do 2 rewrite <- fold_plus. - apply fold_union_inter with (eqA:=@eq nat); auto. + apply fold_union_inter with (eqA:=@Logic.eq nat); auto. Qed. Lemma union_cardinal_inter : @@ -872,7 +753,7 @@ Module Properties (M: S). intros. do 2 rewrite cardinal_fold. change S with ((fun _ => S) x); - apply fold_add with (eqA:=@eq nat); auto. + apply fold_add with (eqA:=@Logic.eq nat); auto. Qed. Lemma remove_cardinal_1 : @@ -881,7 +762,7 @@ Module Properties (M: S). intros. do 2 rewrite cardinal_fold. change S with ((fun _ =>S) x). - apply remove_fold_1 with (eqA:=@eq nat); auto. + apply remove_fold_1 with (eqA:=@Logic.eq nat); auto. Qed. Lemma remove_cardinal_2 : @@ -892,4 +773,295 @@ Module Properties (M: S). Hint Resolve subset_cardinal union_cardinal add_cardinal_1 add_cardinal_2. +End WProperties. + + +(** A clone of [WProperties] working on full sets. *) + +Module Properties (M:S). + Module D := OT_as_DT M.E. + Include WProperties D M. End Properties. + + +(** Now comes some properties specific to the element ordering, + invalid for Weak Sets. *) + +Module OrdProperties (M:S). + Module ME:=OrderedTypeFacts(M.E). + Module Import P := Properties M. + Import FM. + Import M.E. + Import M. + + (** First, a specialized version of SortA_equivlistA_eqlistA: *) + Lemma sort_equivlistA_eqlistA : forall l l' : list elt, + sort E.lt l -> sort E.lt l' -> equivlistA E.eq l l' -> eqlistA E.eq l l'. + Proof. + apply SortA_equivlistA_eqlistA; eauto. + Qed. + + Definition gtb x y := match E.compare x y with GT _ => true | _ => false end. + Definition leb x := fun y => negb (gtb x y). + + Definition elements_lt x s := List.filter (gtb x) (elements s). + Definition elements_ge x s := List.filter (leb x) (elements s). + + Lemma gtb_1 : forall x y, gtb x y = true <-> E.lt y x. + Proof. + intros; unfold gtb; destruct (E.compare x y); intuition; try discriminate; ME.order. + Qed. + + Lemma leb_1 : forall x y, leb x y = true <-> ~E.lt y x. + Proof. + intros; unfold leb, gtb; destruct (E.compare x y); intuition; try discriminate; ME.order. + Qed. + + Lemma gtb_compat : forall x, compat_bool E.eq (gtb x). + Proof. + red; intros x a b H. + generalize (gtb_1 x a)(gtb_1 x b); destruct (gtb x a); destruct (gtb x b); auto. + intros. + symmetry; rewrite H1. + apply ME.eq_lt with a; auto. + rewrite <- H0; auto. + intros. + rewrite H0. + apply ME.eq_lt with b; auto. + rewrite <- H1; auto. + Qed. + + Lemma leb_compat : forall x, compat_bool E.eq (leb x). + Proof. + red; intros x a b H; unfold leb. + f_equal; apply gtb_compat; auto. + Qed. + Hint Resolve gtb_compat leb_compat. + + Lemma elements_split : forall x s, + elements s = elements_lt x s ++ elements_ge x s. + Proof. + unfold elements_lt, elements_ge, leb; intros. + eapply (@filter_split _ E.eq); eauto with set. ME.order. ME.order. ME.order. + intros. + rewrite gtb_1 in H. + assert (~E.lt y x). + unfold gtb in *; destruct (E.compare x y); intuition; try discriminate; ME.order. + ME.order. + Qed. + + Lemma elements_Add : forall s s' x, ~In x s -> Add x s s' -> + eqlistA E.eq (elements s') (elements_lt x s ++ x :: elements_ge x s). + Proof. + intros; unfold elements_ge, elements_lt. + apply sort_equivlistA_eqlistA; auto with set. + apply (@SortA_app _ E.eq); auto. + apply (@filter_sort _ E.eq); auto with set; eauto with set. + constructor; auto. + apply (@filter_sort _ E.eq); auto with set; eauto with set. + rewrite ME.Inf_alt by (apply (@filter_sort _ E.eq); eauto with set). + intros. + rewrite filter_InA in H1; auto; destruct H1. + rewrite leb_1 in H2. + rewrite <- elements_iff in H1. + assert (~E.eq x y). + contradict H; rewrite H; auto. + ME.order. + intros. + rewrite filter_InA in H1; auto; destruct H1. + rewrite gtb_1 in H3. + inversion_clear H2. + ME.order. + rewrite filter_InA in H4; auto; destruct H4. + rewrite leb_1 in H4. + ME.order. + red; intros a. + rewrite InA_app_iff; rewrite InA_cons. + do 2 (rewrite filter_InA; auto). + do 2 rewrite <- elements_iff. + rewrite leb_1; rewrite gtb_1. + rewrite (H0 a); intuition. + destruct (E.compare a x); intuition. + right; right; split; auto. + ME.order. + Qed. + + Definition Above x s := forall y, In y s -> E.lt y x. + Definition Below x s := forall y, In y s -> E.lt x y. + + Lemma elements_Add_Above : forall s s' x, + Above x s -> Add x s s' -> + eqlistA E.eq (elements s') (elements s ++ x::nil). + Proof. + intros. + apply sort_equivlistA_eqlistA; auto with set. + apply (@SortA_app _ E.eq); auto with set. + intros. + inversion_clear H2. + rewrite <- elements_iff in H1. + apply ME.lt_eq with x; auto. + inversion H3. + red; intros a. + rewrite InA_app_iff; rewrite InA_cons; rewrite InA_nil. + do 2 rewrite <- elements_iff; rewrite (H0 a); intuition. + Qed. + + Lemma elements_Add_Below : forall s s' x, + Below x s -> Add x s s' -> + eqlistA E.eq (elements s') (x::elements s). + Proof. + intros. + apply sort_equivlistA_eqlistA; auto with set. + change (sort E.lt ((x::nil) ++ elements s)). + apply (@SortA_app _ E.eq); auto with set. + intros. + inversion_clear H1. + rewrite <- elements_iff in H2. + apply ME.eq_lt with x; auto. + inversion H3. + red; intros a. + rewrite InA_cons. + do 2 rewrite <- elements_iff; rewrite (H0 a); intuition. + Qed. + + (** Two other induction principles on sets: we can be more restrictive + on the element we add at each step. *) + + Lemma set_induction_max : + forall P : t -> Type, + (forall s : t, Empty s -> P s) -> + (forall s s', P s -> forall x, Above x s -> Add x s s' -> P s') -> + forall s : t, P s. + Proof. + intros; remember (cardinal s) as n; revert s Heqn; induction n; intros; auto. + case_eq (max_elt s); intros. + apply X0 with (remove e s) e; auto with set. + apply IHn. + assert (S n = S (cardinal (remove e s))). + rewrite Heqn; apply cardinal_2 with e; auto with set. + inversion H0; auto. + red; intros. + rewrite remove_iff in H0; destruct H0. + generalize (@max_elt_2 s e y H H0); ME.order. + + assert (H0:=max_elt_3 H). + rewrite cardinal_Empty in H0; rewrite H0 in Heqn; inversion Heqn. + Qed. + + Lemma set_induction_min : + forall P : t -> Type, + (forall s : t, Empty s -> P s) -> + (forall s s', P s -> forall x, Below x s -> Add x s s' -> P s') -> + forall s : t, P s. + Proof. + intros; remember (cardinal s) as n; revert s Heqn; induction n; intros; auto. + case_eq (min_elt s); intros. + apply X0 with (remove e s) e; auto with set. + apply IHn. + assert (S n = S (cardinal (remove e s))). + rewrite Heqn; apply cardinal_2 with e; auto with set. + inversion H0; auto. + red; intros. + rewrite remove_iff in H0; destruct H0. + generalize (@min_elt_2 s e y H H0); ME.order. + + assert (H0:=min_elt_3 H). + rewrite cardinal_Empty in H0; auto; rewrite H0 in Heqn; inversion Heqn. + Qed. + + (** More properties of [fold] : behavior with respect to Above/Below *) + + Lemma fold_3 : + forall s s' x (A : Type) (eqA : A -> A -> Prop) + (st : Setoid_Theory A eqA) (i : A) (f : elt -> A -> A), + compat_op E.eq eqA f -> + Above x s -> Add x s s' -> eqA (fold f s' i) (f x (fold f s i)). + Proof. + intros. + do 2 rewrite M.fold_1. + do 2 rewrite <- fold_left_rev_right. + change (f x (fold_right f i (rev (elements s)))) with + (fold_right f i (rev (x::nil)++rev (elements s))). + apply (@fold_right_eqlistA E.t E.eq A eqA st); auto. + rewrite <- distr_rev. + apply eqlistA_rev. + apply elements_Add_Above; auto. + Qed. + + Lemma fold_4 : + forall s s' x (A : Type) (eqA : A -> A -> Prop) + (st : Setoid_Theory A eqA) (i : A) (f : elt -> A -> A), + compat_op E.eq eqA f -> + Below x s -> Add x s s' -> eqA (fold f s' i) (fold f s (f x i)). + Proof. + intros. + do 2 rewrite M.fold_1. + set (g:=fun (a : A) (e : elt) => f e a). + change (eqA (fold_left g (elements s') i) (fold_left g (x::elements s) i)). + unfold g. + do 2 rewrite <- fold_left_rev_right. + apply (@fold_right_eqlistA E.t E.eq A eqA st); auto. + apply eqlistA_rev. + apply elements_Add_Below; auto. + Qed. + + (** The following results have already been proved earlier, + but we can now prove them with one hypothesis less: + no need for [(transpose eqA f)]. *) + + Section FoldOpt. + Variables (A:Type)(eqA:A->A->Prop)(st:Setoid_Theory _ eqA). + Variables (f:elt->A->A)(Comp:compat_op E.eq eqA f). + + Lemma fold_equal : + forall i s s', s[=]s' -> eqA (fold f s i) (fold f s' i). + Proof. + intros; do 2 rewrite M.fold_1. + do 2 rewrite <- fold_left_rev_right. + apply (@fold_right_eqlistA E.t E.eq A eqA st); auto. + apply eqlistA_rev. + apply sort_equivlistA_eqlistA; auto with set. + red; intro a; do 2 rewrite <- elements_iff; auto. + Qed. + + Lemma fold_init : forall i i' s, eqA i i' -> + eqA (fold f s i) (fold f s i'). + Proof. + intros; do 2 rewrite M.fold_1. + do 2 rewrite <- fold_left_rev_right. + induction (rev (elements s)); simpl; auto. + Qed. + + Lemma add_fold : forall i s x, In x s -> + eqA (fold f (add x s) i) (fold f s i). + Proof. + intros; apply fold_equal; auto with set. + Qed. + + Lemma remove_fold_2: forall i s x, ~In x s -> + eqA (fold f (remove x s) i) (fold f s i). + Proof. + intros. + apply fold_equal; auto with set. + Qed. + + End FoldOpt. + + (** An alternative version of [choose_3] *) + + Lemma choose_equal : forall s s', Equal s s' -> + match choose s, choose s' with + | Some x, Some x' => E.eq x x' + | None, None => True + | _, _ => False + end. + Proof. + intros s s' H; + generalize (@choose_1 s)(@choose_2 s) + (@choose_1 s')(@choose_2 s')(@choose_3 s s'); + destruct (choose s); destruct (choose s'); simpl; intuition. + apply H5 with e; rewrite <-H; auto. + apply H5 with e; rewrite H; auto. + Qed. + +End OrdProperties. diff --git a/theories/FSets/FSetToFiniteSet.v b/theories/FSets/FSetToFiniteSet.v index 8cf85efe..ae51d905 100644 --- a/theories/FSets/FSetToFiniteSet.v +++ b/theories/FSets/FSetToFiniteSet.v @@ -11,16 +11,16 @@ * Institution: LRI, CNRS UMR 8623 - Université Paris Sud * 91405 Orsay, France *) -(* $Id: FSetToFiniteSet.v 8876 2006-05-30 13:43:15Z letouzey $ *) +(* $Id: FSetToFiniteSet.v 10739 2008-04-01 14:45:20Z herbelin $ *) Require Import Ensembles Finite_sets. -Require Import FSetInterface FSetProperties OrderedTypeEx. +Require Import FSetInterface FSetProperties OrderedTypeEx DecidableTypeEx. -(** * Going from [FSets] with usual equality - to the old [Ensembles] and [Finite_sets] theory. *) +(** * Going from [FSets] with usual Leibniz equality + to the good old [Ensembles] and [Finite_sets] theory. *) -Module S_to_Finite_set (U:UsualOrderedType)(M:S with Module E := U). - Module MP:= Properties(M). +Module WS_to_Finite_set (U:UsualDecidableType)(M: WSfun U). + Module MP:= WProperties U M. Import M MP FM Ensembles Finite_sets. Definition mkEns : M.t -> Ensemble M.elt := @@ -82,7 +82,7 @@ Module S_to_Finite_set (U:UsualOrderedType)(M:S with Module E := U). Lemma add_Add : forall x s, !!(add x s) === Add _ (!!s) x. Proof. unfold Same_set, Included, mkEns, In. - split; intro; set_iff; inversion 1; unfold E.eq; auto with sets. + split; intro; set_iff; inversion 1; auto with sets. inversion H0. constructor 2; constructor. constructor 1; auto. @@ -97,7 +97,7 @@ Module S_to_Finite_set (U:UsualOrderedType)(M:S with Module E := U). inversion H0. constructor 2; constructor. constructor 1; auto. - red in H; rewrite H; unfold E.eq in *. + red in H; rewrite H. inversion H0; auto. inversion H1; auto. Qed. @@ -105,10 +105,10 @@ Module S_to_Finite_set (U:UsualOrderedType)(M:S with Module E := U). Lemma remove_Subtract : forall x s, !!(remove x s) === Subtract _ (!!s) x. Proof. unfold Same_set, Included, mkEns, In. - split; intro; set_iff; inversion 1; unfold E.eq in *; auto with sets. + split; intro; set_iff; inversion 1; auto with sets. split; auto. - swap H1. - inversion H2; auto. + contradict H1. + inversion H1; auto. Qed. Lemma mkEns_Finite : forall s, Finite _ (!!s). @@ -136,4 +136,28 @@ Module S_to_Finite_set (U:UsualOrderedType)(M:S with Module E := U). apply Add_Add; auto. Qed. + (** we can even build a function from Finite Ensemble to FSet + ... at least in Prop. *) + + Lemma Ens_to_FSet : forall e : Ensemble M.elt, Finite _ e -> + exists s:M.t, !!s === e. + Proof. + induction 1. + exists M.empty. + apply empty_Empty_Set. + destruct IHFinite as (s,Hs). + exists (M.add x s). + apply Extensionality_Ensembles in Hs. + rewrite <- Hs. + apply add_Add. + Qed. + +End WS_to_Finite_set. + + +Module S_to_Finite_set (U:UsualOrderedType)(M: Sfun U). + Module D := OT_as_DT U. + Include WS_to_Finite_set D M. End S_to_Finite_set. + + diff --git a/theories/FSets/FSetWeak.v b/theories/FSets/FSetWeak.v deleted file mode 100644 index c88a7869..00000000 --- a/theories/FSets/FSetWeak.v +++ /dev/null @@ -1,16 +0,0 @@ -(***********************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* (In x s <-> In y s). -Proof. -split; apply In_1; auto. -Qed. - -Lemma mem_iff : In x s <-> mem x s = true. -Proof. -split; [apply mem_1|apply mem_2]. -Qed. - -Lemma not_mem_iff : ~In x s <-> mem x s = false. -Proof. -rewrite mem_iff; destruct (mem x s); intuition. -Qed. - -Lemma equal_iff : s[=]s' <-> equal s s' = true. -Proof. -split; [apply equal_1|apply equal_2]. -Qed. - -Lemma subset_iff : s[<=]s' <-> subset s s' = true. -Proof. -split; [apply subset_1|apply subset_2]. -Qed. - -Lemma empty_iff : In x empty <-> False. -Proof. -intuition; apply (empty_1 H). -Qed. - -Lemma is_empty_iff : Empty s <-> is_empty s = true. -Proof. -split; [apply is_empty_1|apply is_empty_2]. -Qed. - -Lemma singleton_iff : In y (singleton x) <-> E.eq x y. -Proof. -split; [apply singleton_1|apply singleton_2]. -Qed. - -Lemma add_iff : In y (add x s) <-> E.eq x y \/ In y s. -Proof. -split; [ | destruct 1; [apply add_1|apply add_2]]; auto. -destruct (eq_dec x y) as [E|E]; auto. -intro H; right; exact (add_3 E H). -Qed. - -Lemma add_neq_iff : ~ E.eq x y -> (In y (add x s) <-> In y s). -Proof. -split; [apply add_3|apply add_2]; auto. -Qed. - -Lemma remove_iff : In y (remove x s) <-> In y s /\ ~E.eq x y. -Proof. -split; [split; [apply remove_3 with x |] | destruct 1; apply remove_2]; auto. -intro. -apply (remove_1 H0 H). -Qed. - -Lemma remove_neq_iff : ~ E.eq x y -> (In y (remove x s) <-> In y s). -Proof. -split; [apply remove_3|apply remove_2]; auto. -Qed. - -Lemma union_iff : In x (union s s') <-> In x s \/ In x s'. -Proof. -split; [apply union_1 | destruct 1; [apply union_2|apply union_3]]; auto. -Qed. - -Lemma inter_iff : In x (inter s s') <-> In x s /\ In x s'. -Proof. -split; [split; [apply inter_1 with s' | apply inter_2 with s] | destruct 1; apply inter_3]; auto. -Qed. - -Lemma diff_iff : In x (diff s s') <-> In x s /\ ~ In x s'. -Proof. -split; [split; [apply diff_1 with s' | apply diff_2 with s] | destruct 1; apply diff_3]; auto. -Qed. - -Variable f : elt->bool. - -Lemma filter_iff : compat_bool E.eq f -> (In x (filter f s) <-> In x s /\ f x = true). -Proof. -split; [split; [apply filter_1 with f | apply filter_2 with s] | destruct 1; apply filter_3]; auto. -Qed. - -Lemma for_all_iff : compat_bool E.eq f -> - (For_all (fun x => f x = true) s <-> for_all f s = true). -Proof. -split; [apply for_all_1 | apply for_all_2]; auto. -Qed. - -Lemma exists_iff : compat_bool E.eq f -> - (Exists (fun x => f x = true) s <-> exists_ f s = true). -Proof. -split; [apply exists_1 | apply exists_2]; auto. -Qed. - -Lemma elements_iff : In x s <-> InA E.eq x (elements s). -Proof. -split; [apply elements_1 | apply elements_2]. -Qed. - -End IffSpec. - -(** Useful tactic for simplifying expressions like [In y (add x (union s s'))] *) - -Ltac set_iff := - repeat (progress ( - rewrite add_iff || rewrite remove_iff || rewrite singleton_iff - || rewrite union_iff || rewrite inter_iff || rewrite diff_iff - || rewrite empty_iff)). - -(** * Specifications written using boolean predicates *) - -Definition eqb x y := if eq_dec x y then true else false. - -Section BoolSpec. -Variable s s' s'' : t. -Variable x y z : elt. - -Lemma mem_b : E.eq x y -> mem x s = mem y s. -Proof. -intros. -generalize (mem_iff s x) (mem_iff s y)(In_eq_iff s H). -destruct (mem x s); destruct (mem y s); intuition. -Qed. - -Lemma empty_b : mem y empty = false. -Proof. -generalize (empty_iff y)(mem_iff empty y). -destruct (mem y empty); intuition. -Qed. - -Lemma add_b : mem y (add x s) = eqb x y || mem y s. -Proof. -generalize (mem_iff (add x s) y)(mem_iff s y)(add_iff s x y); unfold eqb. -destruct (eq_dec x y); destruct (mem y s); destruct (mem y (add x s)); intuition. -Qed. - -Lemma add_neq_b : ~ E.eq x y -> mem y (add x s) = mem y s. -Proof. -intros; generalize (mem_iff (add x s) y)(mem_iff s y)(add_neq_iff s H). -destruct (mem y s); destruct (mem y (add x s)); intuition. -Qed. - -Lemma remove_b : mem y (remove x s) = mem y s && negb (eqb x y). -Proof. -generalize (mem_iff (remove x s) y)(mem_iff s y)(remove_iff s x y); unfold eqb. -destruct (eq_dec x y); destruct (mem y s); destruct (mem y (remove x s)); simpl; intuition. -Qed. - -Lemma remove_neq_b : ~ E.eq x y -> mem y (remove x s) = mem y s. -Proof. -intros; generalize (mem_iff (remove x s) y)(mem_iff s y)(remove_neq_iff s H). -destruct (mem y s); destruct (mem y (remove x s)); intuition. -Qed. - -Lemma singleton_b : mem y (singleton x) = eqb x y. -Proof. -generalize (mem_iff (singleton x) y)(singleton_iff x y); unfold eqb. -destruct (eq_dec x y); destruct (mem y (singleton x)); intuition. -Qed. - -Lemma union_b : mem x (union s s') = mem x s || mem x s'. -Proof. -generalize (mem_iff (union s s') x)(mem_iff s x)(mem_iff s' x)(union_iff s s' x). -destruct (mem x s); destruct (mem x s'); destruct (mem x (union s s')); intuition. -Qed. - -Lemma inter_b : mem x (inter s s') = mem x s && mem x s'. -Proof. -generalize (mem_iff (inter s s') x)(mem_iff s x)(mem_iff s' x)(inter_iff s s' x). -destruct (mem x s); destruct (mem x s'); destruct (mem x (inter s s')); intuition. -Qed. - -Lemma diff_b : mem x (diff s s') = mem x s && negb (mem x s'). -Proof. -generalize (mem_iff (diff s s') x)(mem_iff s x)(mem_iff s' x)(diff_iff s s' x). -destruct (mem x s); destruct (mem x s'); destruct (mem x (diff s s')); simpl; intuition. -Qed. - -Lemma elements_b : mem x s = existsb (eqb x) (elements s). -Proof. -generalize (mem_iff s x)(elements_iff s x)(existsb_exists (eqb x) (elements s)). -rewrite InA_alt. -destruct (mem x s); destruct (existsb (eqb x) (elements s)); auto; intros. -symmetry. -rewrite H1. -destruct H0 as (H0,_). -destruct H0 as (a,(Ha1,Ha2)); [ intuition |]. -exists a; intuition. -unfold eqb; destruct (eq_dec x a); auto. -rewrite <- H. -rewrite H0. -destruct H1 as (H1,_). -destruct H1 as (a,(Ha1,Ha2)); [intuition|]. -exists a; intuition. -unfold eqb in *; destruct (eq_dec x a); auto; discriminate. -Qed. - -Variable f : elt->bool. - -Lemma filter_b : compat_bool E.eq f -> mem x (filter f s) = mem x s && f x. -Proof. -intros. -generalize (mem_iff (filter f s) x)(mem_iff s x)(filter_iff s x H). -destruct (mem x s); destruct (mem x (filter f s)); destruct (f x); simpl; intuition. -Qed. - -Lemma for_all_b : compat_bool E.eq f -> - for_all f s = forallb f (elements s). -Proof. -intros. -generalize (forallb_forall f (elements s))(for_all_iff s H)(elements_iff s). -unfold For_all. -destruct (forallb f (elements s)); destruct (for_all f s); auto; intros. -rewrite <- H1; intros. -destruct H0 as (H0,_). -rewrite (H2 x0) in H3. -rewrite (InA_alt E.eq x0 (elements s)) in H3. -destruct H3 as (a,(Ha1,Ha2)). -rewrite (H _ _ Ha1). -apply H0; auto. -symmetry. -rewrite H0; intros. -destruct H1 as (_,H1). -apply H1; auto. -rewrite H2. -rewrite InA_alt; eauto. -Qed. - -Lemma exists_b : compat_bool E.eq f -> - exists_ f s = existsb f (elements s). -Proof. -intros. -generalize (existsb_exists f (elements s))(exists_iff s H)(elements_iff s). -unfold Exists. -destruct (existsb f (elements s)); destruct (exists_ f s); auto; intros. -rewrite <- H1; intros. -destruct H0 as (H0,_). -destruct H0 as (a,(Ha1,Ha2)); auto. -exists a; auto. -split; auto. -rewrite H2; rewrite InA_alt; eauto. -symmetry. -rewrite H0. -destruct H1 as (_,H1). -destruct H1 as (a,(Ha1,Ha2)); auto. -rewrite (H2 a) in Ha1. -rewrite (InA_alt E.eq a (elements s)) in Ha1. -destruct Ha1 as (b,(Hb1,Hb2)). -exists b; auto. -rewrite <- (H _ _ Hb1); auto. -Qed. - -End BoolSpec. - -(** * [E.eq] and [Equal] are setoid equalities *) - -Definition E_ST : Setoid_Theory elt E.eq. -Proof. -constructor; [apply E.eq_refl|apply E.eq_sym|apply E.eq_trans]. -Qed. - -Add Setoid elt E.eq E_ST as EltSetoid. - -Definition Equal_ST : Setoid_Theory t Equal. -Proof. -constructor; unfold Equal; firstorder. -Qed. - -Add Setoid t Equal Equal_ST as EqualSetoid. - -Add Morphism In with signature E.eq ==> Equal ==> iff as In_m. -Proof. -unfold Equal; intros x y H s s' H0. -rewrite (In_eq_iff s H); auto. -Qed. - -Add Morphism is_empty : is_empty_m. -Proof. -unfold Equal; intros s s' H. -generalize (is_empty_iff s)(is_empty_iff s'). -destruct (is_empty s); destruct (is_empty s'); - unfold Empty; auto; intros. -symmetry. -rewrite <- H1; intros a Ha. -rewrite <- (H a) in Ha. -destruct H0 as (_,H0). -exact (H0 (refl_equal true) _ Ha). -rewrite <- H0; intros a Ha. -rewrite (H a) in Ha. -destruct H1 as (_,H1). -exact (H1 (refl_equal true) _ Ha). -Qed. - -Add Morphism Empty with signature Equal ==> iff as Empty_m. -Proof. -intros; do 2 rewrite is_empty_iff; rewrite H; intuition. -Qed. - -Add Morphism mem : mem_m. -Proof. -unfold Equal; intros x y H s s' H0. -generalize (H0 x); clear H0; rewrite (In_eq_iff s' H). -generalize (mem_iff s x)(mem_iff s' y). -destruct (mem x s); destruct (mem y s'); intuition. -Qed. - -Add Morphism singleton : singleton_m. -Proof. -unfold Equal; intros x y H a. -do 2 rewrite singleton_iff; split. -intros; apply E.eq_trans with x; auto. -intros; apply E.eq_trans with y; auto. -Qed. - -Add Morphism add : add_m. -Proof. -unfold Equal; intros x y H s s' H0 a. -do 2 rewrite add_iff; rewrite H; rewrite H0; intuition. -Qed. - -Add Morphism remove : remove_m. -Proof. -unfold Equal; intros x y H s s' H0 a. -do 2 rewrite remove_iff; rewrite H; rewrite H0; intuition. -Qed. - -Add Morphism union : union_m. -Proof. -unfold Equal; intros s s' H s'' s''' H0 a. -do 2 rewrite union_iff; rewrite H; rewrite H0; intuition. -Qed. - -Add Morphism inter : inter_m. -Proof. -unfold Equal; intros s s' H s'' s''' H0 a. -do 2 rewrite inter_iff; rewrite H; rewrite H0; intuition. -Qed. - -Add Morphism diff : diff_m. -Proof. -unfold Equal; intros s s' H s'' s''' H0 a. -do 2 rewrite diff_iff; rewrite H; rewrite H0; intuition. -Qed. - -Add Morphism Subset with signature Equal ==> Equal ==> iff as Subset_m. -Proof. -unfold Equal, Subset; firstorder. -Qed. - -Add Morphism subset : subset_m. -Proof. -intros s s' H s'' s''' H0. -generalize (subset_iff s s'') (subset_iff s' s'''). -destruct (subset s s''); destruct (subset s' s'''); auto; intros. -rewrite H in H1; rewrite H0 in H1; intuition. -rewrite H in H1; rewrite H0 in H1; intuition. -Qed. - -Add Morphism equal : equal_m. -Proof. -intros s s' H s'' s''' H0. -generalize (equal_iff s s'') (equal_iff s' s'''). -destruct (equal s s''); destruct (equal s' s'''); auto; intros. -rewrite H in H1; rewrite H0 in H1; intuition. -rewrite H in H1; rewrite H0 in H1; intuition. -Qed. - -(* [fold], [filter], [for_all], [exists_] and [partition] cannot be proved morphism - without additional hypothesis on [f]. For instance: *) - -Lemma filter_equal : forall f, compat_bool E.eq f -> - forall s s', s[=]s' -> filter f s [=] filter f s'. -Proof. -unfold Equal; intros; repeat rewrite filter_iff; auto; rewrite H0; tauto. -Qed. - -(* For [elements], [min_elt], [max_elt] and [choose], we would need setoid - structures on [list elt] and [option elt]. *) - -(* Later: -Add Morphism cardinal ; cardinal_m. -*) - -End Facts. diff --git a/theories/FSets/FSetWeakInterface.v b/theories/FSets/FSetWeakInterface.v deleted file mode 100644 index a281ce22..00000000 --- a/theories/FSets/FSetWeakInterface.v +++ /dev/null @@ -1,251 +0,0 @@ -(***********************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* A->Prop)(f: A-> bool) := - forall x y : A, eqA x y -> f x = f y. - -(** Compatibility of a predicate with respect to an equality. *) -Definition compat_P (A:Set)(eqA: A->A->Prop)(P : A -> Prop) := - forall x y : A, eqA x y -> P x -> P y. - -Hint Unfold compat_bool compat_P. - -(** * Non-dependent signature - - Signature [S] presents sets as purely informative programs - together with axioms *) - -Module Type S. - - Declare Module E : DecidableType. - Definition elt := E.t. - - Parameter t : Set. (** the abstract type of sets *) - - (** Logical predicates *) - Parameter In : elt -> t -> Prop. - Definition Equal s s' := forall a : elt, In a s <-> In a s'. - Definition Subset s s' := forall a : elt, In a s -> In a s'. - Definition Empty s := forall a : elt, ~ In a s. - Definition For_all (P : elt -> Prop) s := forall x, In x s -> P x. - Definition Exists (P : elt -> Prop) s := exists x, In x s /\ P x. - - Notation "s [=] t" := (Equal s t) (at level 70, no associativity). - Notation "s [<=] t" := (Subset s t) (at level 70, no associativity). - - Parameter empty : t. - (** The empty set. *) - - Parameter is_empty : t -> bool. - (** Test whether a set is empty or not. *) - - Parameter mem : elt -> t -> bool. - (** [mem x s] tests whether [x] belongs to the set [s]. *) - - Parameter add : elt -> t -> t. - (** [add x s] returns a set containing all elements of [s], - plus [x]. If [x] was already in [s], [s] is returned unchanged. *) - - Parameter singleton : elt -> t. - (** [singleton x] returns the one-element set containing only [x]. *) - - Parameter remove : elt -> t -> t. - (** [remove x s] returns a set containing all elements of [s], - except [x]. If [x] was not in [s], [s] is returned unchanged. *) - - Parameter union : t -> t -> t. - (** Set union. *) - - Parameter inter : t -> t -> t. - (** Set intersection. *) - - Parameter diff : t -> t -> t. - (** Set difference. *) - - Parameter equal : t -> t -> bool. - (** [equal s1 s2] tests whether the sets [s1] and [s2] are - equal, that is, contain equal elements. *) - - Parameter subset : t -> t -> bool. - (** [subset s1 s2] tests whether the set [s1] is a subset of - the set [s2]. *) - - (** Coq comment: [iter] is useless in a purely functional world *) - (** iter: (elt -> unit) -> set -> unit. i*) - (** [iter f s] applies [f] in turn to all elements of [s]. - The order in which the elements of [s] are presented to [f] - is unspecified. *) - - Parameter fold : forall A : Set, (elt -> A -> A) -> t -> A -> A. - (** [fold f s a] computes [(f xN ... (f x2 (f x1 a))...)], - where [x1 ... xN] are the elements of [s]. - The order in which elements of [s] are presented to [f] is - unspecified. *) - - Parameter for_all : (elt -> bool) -> t -> bool. - (** [for_all p s] checks if all elements of the set - satisfy the predicate [p]. *) - - Parameter exists_ : (elt -> bool) -> t -> bool. - (** [exists p s] checks if at least one element of - the set satisfies the predicate [p]. *) - - Parameter filter : (elt -> bool) -> t -> t. - (** [filter p s] returns the set of all elements in [s] - that satisfy predicate [p]. *) - - Parameter partition : (elt -> bool) -> t -> t * t. - (** [partition p s] returns a pair of sets [(s1, s2)], where - [s1] is the set of all the elements of [s] that satisfy the - predicate [p], and [s2] is the set of all the elements of - [s] that do not satisfy [p]. *) - - Parameter cardinal : t -> nat. - (** Return the number of elements of a set. *) - (** Coq comment: nat instead of int ... *) - - Parameter elements : t -> list elt. - (** Return the list of all elements of the given set, in any order. *) - - Parameter choose : t -> option elt. - (** Return one element of the given set, or raise [Not_found] if - the set is empty. Which element is chosen is unspecified. - Equal sets could return different elements. *) - (** Coq comment: [Not_found] is represented by the option type *) - - Section Spec. - - Variable s s' : t. - Variable x y : elt. - - (** Specification of [In] *) - Parameter In_1 : E.eq x y -> In x s -> In y s. - - (** Specification of [mem] *) - Parameter mem_1 : In x s -> mem x s = true. - Parameter mem_2 : mem x s = true -> In x s. - - (** Specification of [equal] *) - Parameter equal_1 : Equal s s' -> equal s s' = true. - Parameter equal_2 : equal s s' = true -> Equal s s'. - - (** Specification of [subset] *) - Parameter subset_1 : Subset s s' -> subset s s' = true. - Parameter subset_2 : subset s s' = true -> Subset s s'. - - (** Specification of [empty] *) - Parameter empty_1 : Empty empty. - - (** Specification of [is_empty] *) - Parameter is_empty_1 : Empty s -> is_empty s = true. - Parameter is_empty_2 : is_empty s = true -> Empty s. - - (** Specification of [add] *) - Parameter add_1 : E.eq x y -> In y (add x s). - Parameter add_2 : In y s -> In y (add x s). - Parameter add_3 : ~ E.eq x y -> In y (add x s) -> In y s. - - (** Specification of [remove] *) - Parameter remove_1 : E.eq x y -> ~ In y (remove x s). - Parameter remove_2 : ~ E.eq x y -> In y s -> In y (remove x s). - Parameter remove_3 : In y (remove x s) -> In y s. - - (** Specification of [singleton] *) - Parameter singleton_1 : In y (singleton x) -> E.eq x y. - Parameter singleton_2 : E.eq x y -> In y (singleton x). - - (** Specification of [union] *) - Parameter union_1 : In x (union s s') -> In x s \/ In x s'. - Parameter union_2 : In x s -> In x (union s s'). - Parameter union_3 : In x s' -> In x (union s s'). - - (** Specification of [inter] *) - Parameter inter_1 : In x (inter s s') -> In x s. - Parameter inter_2 : In x (inter s s') -> In x s'. - Parameter inter_3 : In x s -> In x s' -> In x (inter s s'). - - (** Specification of [diff] *) - Parameter diff_1 : In x (diff s s') -> In x s. - Parameter diff_2 : In x (diff s s') -> ~ In x s'. - Parameter diff_3 : In x s -> ~ In x s' -> In x (diff s s'). - - (** Specification of [fold] *) - Parameter fold_1 : forall (A : Set) (i : A) (f : elt -> A -> A), - fold f s i = fold_left (fun a e => f e a) (elements s) i. - - (** Specification of [cardinal] *) - Parameter cardinal_1 : cardinal s = length (elements s). - - Section Filter. - - Variable f : elt -> bool. - - (** Specification of [filter] *) - Parameter filter_1 : compat_bool E.eq f -> In x (filter f s) -> In x s. - Parameter filter_2 : compat_bool E.eq f -> In x (filter f s) -> f x = true. - Parameter filter_3 : - compat_bool E.eq f -> In x s -> f x = true -> In x (filter f s). - - (** Specification of [for_all] *) - Parameter for_all_1 : - compat_bool E.eq f -> - For_all (fun x => f x = true) s -> for_all f s = true. - Parameter for_all_2 : - compat_bool E.eq f -> - for_all f s = true -> For_all (fun x => f x = true) s. - - (** Specification of [exists] *) - Parameter exists_1 : - compat_bool E.eq f -> - Exists (fun x => f x = true) s -> exists_ f s = true. - Parameter exists_2 : - compat_bool E.eq f -> - exists_ f s = true -> Exists (fun x => f x = true) s. - - (** Specification of [partition] *) - Parameter partition_1 : - compat_bool E.eq f -> Equal (fst (partition f s)) (filter f s). - Parameter partition_2 : - compat_bool E.eq f -> - Equal (snd (partition f s)) (filter (fun x => negb (f x)) s). - - End Filter. - - (** Specification of [elements] *) - Parameter elements_1 : In x s -> InA E.eq x (elements s). - Parameter elements_2 : InA E.eq x (elements s) -> In x s. - Parameter elements_3 : NoDupA E.eq (elements s). - - (** Specification of [choose] *) - Parameter choose_1 : choose s = Some x -> In x s. - Parameter choose_2 : choose s = None -> Empty s. - - End Spec. - - Hint Immediate In_1. - - Hint Resolve mem_1 mem_2 equal_1 equal_2 subset_1 subset_2 empty_1 - is_empty_1 is_empty_2 choose_1 choose_2 add_1 add_2 add_3 remove_1 - remove_2 remove_3 singleton_1 singleton_2 union_1 union_2 union_3 inter_1 - inter_2 inter_3 diff_1 diff_2 diff_3 filter_1 filter_2 filter_3 for_all_1 - for_all_2 exists_1 exists_2 partition_1 partition_2 elements_1 elements_2 - elements_3. - -End S. diff --git a/theories/FSets/FSetWeakList.v b/theories/FSets/FSetWeakList.v index 97080b7a..71a0d584 100644 --- a/theories/FSets/FSetWeakList.v +++ b/theories/FSets/FSetWeakList.v @@ -6,14 +6,14 @@ (* * GNU Lesser General Public License Version 2.1 *) (***********************************************************************) -(* $Id: FSetWeakList.v 8834 2006-05-20 00:41:35Z letouzey $ *) +(* $Id: FSetWeakList.v 10631 2008-03-06 18:17:24Z msozeau $ *) (** * Finite sets library *) (** This file proposes an implementation of the non-dependant interface [FSetWeakInterface.S] using lists without redundancy. *) -Require Import FSetWeakInterface. +Require Import FSetInterface. Set Implicit Arguments. Unset Strict Implicit. @@ -24,8 +24,6 @@ Unset Strict Implicit. And the functions returning sets are proved to preserve this invariant. *) Module Raw (X: DecidableType). - - Module E := X. Definition elt := X.t. Definition t := list elt. @@ -59,7 +57,7 @@ Module Raw (X: DecidableType). if X.eq_dec x y then l else y :: remove x l end. - Fixpoint fold (B : Set) (f : elt -> B -> B) (s : t) {struct s} : + Fixpoint fold (B : Type) (f : elt -> B -> B) (s : t) {struct s} : B -> B := fun i => match s with | nil => i | x :: l => fold f l (f x i) @@ -127,7 +125,7 @@ Module Raw (X: DecidableType). Lemma In_eq : forall (s : t) (x y : elt), X.eq x y -> In x s -> In y s. Proof. - intros s x y; do 2 setoid_rewrite InA_alt; firstorder eauto. + intros s x y; setoid_rewrite InA_alt; firstorder eauto. Qed. Hint Immediate In_eq. @@ -287,13 +285,13 @@ Module Raw (X: DecidableType). unfold elements; auto. Qed. - Lemma elements_3 : forall (s : t) (Hs : NoDup s), NoDup (elements s). + Lemma elements_3w : forall (s : t) (Hs : NoDup s), NoDup (elements s). Proof. unfold elements; auto. Qed. Lemma fold_1 : - forall (s : t) (Hs : NoDup s) (A : Set) (i : A) (f : elt -> A -> A), + forall (s : t) (Hs : NoDup s) (A : Type) (i : A) (f : elt -> A -> A), fold f s i = fold_left (fun a e => f e a) (elements s) i. Proof. induction s; simpl; auto; intros. @@ -732,22 +730,68 @@ Module Raw (X: DecidableType). generalize (Hrec H0 f). case (f x); case (partition f l); simpl; auto. Qed. - + Definition eq : t -> t -> Prop := Equal. - Lemma eq_refl : forall s : t, eq s s. - Proof. - unfold eq, Equal; intuition. - Qed. + Lemma eq_refl : forall s, eq s s. + Proof. firstorder. Qed. - Lemma eq_sym : forall s s' : t, eq s s' -> eq s' s. - Proof. - unfold eq, Equal; firstorder. - Qed. + Lemma eq_sym : forall s s', eq s s' -> eq s' s. + Proof. firstorder. Qed. - Lemma eq_trans : forall s s' s'' : t, eq s s' -> eq s' s'' -> eq s s''. - Proof. - unfold eq, Equal; firstorder. + Lemma eq_trans : + forall s s' s'', eq s s' -> eq s' s'' -> eq s s''. + Proof. firstorder. Qed. + + Definition eq_dec : forall (s s':t)(Hs:NoDup s)(Hs':NoDup s'), + { eq s s' }+{ ~eq s s' }. + Proof. + unfold eq. + induction s; intros s'. + (* nil *) + destruct s'; [left|right]. + firstorder. + unfold not, Equal. + intros H; generalize (H e); clear H. + rewrite InA_nil, InA_cons; intuition. + (* cons *) + intros. + case_eq (mem a s'); intros H; + [ destruct (IHs (remove a s')) as [H'|H']; + [ | | left|right]|right]; + clear IHs. + inversion_clear Hs; auto. + apply remove_unique; auto. + (* In a s' /\ s [=] remove a s' *) + generalize (mem_2 H); clear H; intro H. + unfold Equal in *; intros b. + rewrite InA_cons; split. + destruct 1. + apply In_eq with a; auto. + rewrite H' in H0. + apply remove_3 with a; auto. + destruct (X.eq_dec b a); [left|right]; auto. + rewrite H'. + apply remove_2; auto. + (* In a s' /\ ~ s [=] remove a s' *) + generalize (mem_2 H); clear H; intro H. + contradict H'. + unfold Equal in *; intros b. + split; intros. + apply remove_2; auto. + inversion_clear Hs. + contradict H1; apply In_eq with b; auto. + rewrite <- H'; rewrite InA_cons; auto. + assert (In b s') by (apply remove_3 with a; auto). + rewrite <- H', InA_cons in H1; destruct H1; auto. + elim (remove_1 Hs' (X.eq_sym H1) H0). + (* ~ In a s' *) + assert (~In a s'). + red; intro H'; rewrite (mem_1 H') in H; discriminate. + contradict H0. + unfold Equal in *. + rewrite <- H0. + rewrite InA_cons; auto. Qed. End ForNotations. @@ -758,12 +802,12 @@ End Raw. Now, in order to really provide a functor implementing [S], we need to encapsulate everything into a type of lists without redundancy. *) -Module Make (X: DecidableType) <: S with Module E := X. +Module Make (X: DecidableType) <: WS with Module E := X. Module Raw := Raw X. Module E := X. - Record slist : Set := {this :> Raw.t; unique : NoDupA E.eq this}. + Record slist := {this :> Raw.t; unique : NoDupA E.eq this}. Definition t := slist. Definition elt := E.t. @@ -791,7 +835,7 @@ Module Make (X: DecidableType) <: S with Module E := X. Definition is_empty (s : t) : bool := Raw.is_empty s. Definition elements (s : t) : list elt := Raw.elements s. Definition choose (s:t) : option elt := Raw.choose s. - Definition fold (B : Set) (f : elt -> B -> B) (s : t) : B -> B := Raw.fold (B:=B) f s. + Definition fold (B : Type) (f : elt -> B -> B) (s : t) : B -> B := Raw.fold (B:=B) f s. Definition cardinal (s : t) : nat := Raw.cardinal s. Definition filter (f : elt -> bool) (s : t) : t := Build_slist (Raw.filter_unique (unique s) f). @@ -872,7 +916,7 @@ Module Make (X: DecidableType) <: S with Module E := X. Lemma diff_3 : In x s -> ~ In x s' -> In x (diff s s'). Proof. exact (fun H => Raw.diff_3 s.(unique) s'.(unique) H). Qed. - Lemma fold_1 : forall (A : Set) (i : A) (f : elt -> A -> A), + Lemma fold_1 : forall (A : Type) (i : A) (f : elt -> A -> A), fold f s i = fold_left (fun a e => f e a) (elements s) i. Proof. exact (Raw.fold_1 s.(unique)). Qed. @@ -923,8 +967,8 @@ Module Make (X: DecidableType) <: S with Module E := X. Proof. exact (fun H => Raw.elements_1 H). Qed. Lemma elements_2 : InA E.eq x (elements s) -> In x s. Proof. exact (fun H => Raw.elements_2 H). Qed. - Lemma elements_3 : NoDupA E.eq (elements s). - Proof. exact (Raw.elements_3 s.(unique)). Qed. + Lemma elements_3w : NoDupA E.eq (elements s). + Proof. exact (Raw.elements_3w s.(unique)). Qed. Lemma choose_1 : choose s = Some x -> In x s. Proof. exact (fun H => Raw.choose_1 H). Qed. @@ -933,4 +977,22 @@ Module Make (X: DecidableType) <: S with Module E := X. End Spec. + Definition eq : t -> t -> Prop := Equal. + + Lemma eq_refl : forall s, eq s s. + Proof. firstorder. Qed. + + Lemma eq_sym : forall s s', eq s s' -> eq s' s. + Proof. firstorder. Qed. + + Lemma eq_trans : + forall s s' s'', eq s s' -> eq s' s'' -> eq s s''. + Proof. firstorder. Qed. + + Definition eq_dec : forall (s s':t), + { eq s s' }+{ ~eq s s' }. + Proof. + intros s s'; exact (Raw.eq_dec s.(unique) s'.(unique)). + Qed. + End Make. diff --git a/theories/FSets/FSetWeakProperties.v b/theories/FSets/FSetWeakProperties.v deleted file mode 100644 index a0054d36..00000000 --- a/theories/FSets/FSetWeakProperties.v +++ /dev/null @@ -1,896 +0,0 @@ -(***********************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* constructor; congruence. - -Module Properties (M: S). - Import M.E. - Import M. - Import Logic. (* to unmask [eq] *) - Import Peano. (* to unmask [lt] *) - - (** Results about lists without duplicates *) - - Module FM := Facts M. - Import FM. - - Definition Add (x : elt) (s s' : t) := - forall y : elt, In y s' <-> E.eq x y \/ In y s. - - Lemma In_dec : forall x s, {In x s} + {~ In x s}. - Proof. - intros; generalize (mem_iff s x); case (mem x s); intuition. - Qed. - - Section BasicProperties. - - (** properties of [Equal] *) - - Lemma equal_refl : forall s, s[=]s. - Proof. - unfold Equal; intuition. - Qed. - - Lemma equal_sym : forall s s', s[=]s' -> s'[=]s. - Proof. - unfold Equal; intros. - rewrite H; intuition. - Qed. - - Lemma equal_trans : forall s1 s2 s3, s1[=]s2 -> s2[=]s3 -> s1[=]s3. - Proof. - unfold Equal; intros. - rewrite H; exact (H0 a). - Qed. - - Variable s s' s'' s1 s2 s3 : t. - Variable x x' : elt. - - (** properties of [Subset] *) - - Lemma subset_refl : s[<=]s. - Proof. - unfold Subset; intuition. - Qed. - - Lemma subset_antisym : s[<=]s' -> s'[<=]s -> s[=]s'. - Proof. - unfold Subset, Equal; intuition. - Qed. - - Lemma subset_trans : s1[<=]s2 -> s2[<=]s3 -> s1[<=]s3. - Proof. - unfold Subset; intuition. - Qed. - - Lemma subset_equal : s[=]s' -> s[<=]s'. - Proof. - unfold Subset, Equal; firstorder. - Qed. - - Lemma subset_empty : empty[<=]s. - Proof. - unfold Subset; intros a; set_iff; intuition. - Qed. - - Lemma subset_remove_3 : s1[<=]s2 -> remove x s1 [<=] s2. - Proof. - unfold Subset; intros H a; set_iff; intuition. - Qed. - - Lemma subset_diff : s1[<=]s3 -> diff s1 s2 [<=] s3. - Proof. - unfold Subset; intros H a; set_iff; intuition. - Qed. - - Lemma subset_add_3 : In x s2 -> s1[<=]s2 -> add x s1 [<=] s2. - Proof. - unfold Subset; intros H H0 a; set_iff; intuition. - rewrite <- H2; auto. - Qed. - - Lemma subset_add_2 : s1[<=]s2 -> s1[<=] add x s2. - Proof. - unfold Subset; intuition. - Qed. - - Lemma in_subset : In x s1 -> s1[<=]s2 -> In x s2. - Proof. - unfold Subset; intuition. - Qed. - - Lemma double_inclusion : s1[=]s2 <-> s1[<=]s2 /\ s2[<=]s1. - Proof. - unfold Subset, Equal; split; intros; intuition; generalize (H a); intuition. - Qed. - - (** properties of [empty] *) - - Lemma empty_is_empty_1 : Empty s -> s[=]empty. - Proof. - unfold Empty, Equal; intros; generalize (H a); set_iff; tauto. - Qed. - - Lemma empty_is_empty_2 : s[=]empty -> Empty s. - Proof. - unfold Empty, Equal; intros; generalize (H a); set_iff; tauto. - Qed. - - (** properties of [add] *) - - Lemma add_equal : In x s -> add x s [=] s. - Proof. - unfold Equal; intros; set_iff; intuition. - rewrite <- H1; auto. - Qed. - - Lemma add_add : add x (add x' s) [=] add x' (add x s). - Proof. - unfold Equal; intros; set_iff; tauto. - Qed. - - (** properties of [remove] *) - - Lemma remove_equal : ~ In x s -> remove x s [=] s. - Proof. - unfold Equal; intros; set_iff; intuition. - rewrite H1 in H; auto. - Qed. - - Lemma Equal_remove : s[=]s' -> remove x s [=] remove x s'. - Proof. - intros; rewrite H; apply equal_refl. - Qed. - - (** properties of [add] and [remove] *) - - Lemma add_remove : In x s -> add x (remove x s) [=] s. - Proof. - unfold Equal; intros; set_iff; elim (eq_dec x a); intuition. - rewrite <- H1; auto. - Qed. - - Lemma remove_add : ~In x s -> remove x (add x s) [=] s. - Proof. - unfold Equal; intros; set_iff; elim (eq_dec x a); intuition. - rewrite H1 in H; auto. - Qed. - - (** properties of [singleton] *) - - Lemma singleton_equal_add : singleton x [=] add x empty. - Proof. - unfold Equal; intros; set_iff; intuition. - Qed. - - (** properties of [union] *) - - Lemma union_sym : union s s' [=] union s' s. - Proof. - unfold Equal; intros; set_iff; tauto. - Qed. - - Lemma union_subset_equal : s[<=]s' -> union s s' [=] s'. - Proof. - unfold Subset, Equal; intros; set_iff; intuition. - Qed. - - Lemma union_equal_1 : s[=]s' -> union s s'' [=] union s' s''. - Proof. - intros; rewrite H; apply equal_refl. - Qed. - - Lemma union_equal_2 : s'[=]s'' -> union s s' [=] union s s''. - Proof. - intros; rewrite H; apply equal_refl. - Qed. - - Lemma union_assoc : union (union s s') s'' [=] union s (union s' s''). - Proof. - unfold Equal; intros; set_iff; tauto. - Qed. - - Lemma add_union_singleton : add x s [=] union (singleton x) s. - Proof. - unfold Equal; intros; set_iff; tauto. - Qed. - - Lemma union_add : union (add x s) s' [=] add x (union s s'). - Proof. - unfold Equal; intros; set_iff; tauto. - Qed. - - Lemma union_subset_1 : s [<=] union s s'. - Proof. - unfold Subset; intuition. - Qed. - - Lemma union_subset_2 : s' [<=] union s s'. - Proof. - unfold Subset; intuition. - Qed. - - Lemma union_subset_3 : s[<=]s'' -> s'[<=]s'' -> union s s' [<=] s''. - Proof. - unfold Subset; intros H H0 a; set_iff; intuition. - Qed. - - Lemma union_subset_4 : s[<=]s' -> union s s'' [<=] union s' s''. - Proof. - unfold Subset; intros H a; set_iff; intuition. - Qed. - - Lemma union_subset_5 : s[<=]s' -> union s'' s [<=] union s'' s'. - Proof. - unfold Subset; intros H a; set_iff; intuition. - Qed. - - Lemma empty_union_1 : Empty s -> union s s' [=] s'. - Proof. - unfold Equal, Empty; intros; set_iff; firstorder. - Qed. - - Lemma empty_union_2 : Empty s -> union s' s [=] s'. - Proof. - unfold Equal, Empty; intros; set_iff; firstorder. - Qed. - - Lemma not_in_union : ~In x s -> ~In x s' -> ~In x (union s s'). - Proof. - intros; set_iff; intuition. - Qed. - - (** properties of [inter] *) - - Lemma inter_sym : inter s s' [=] inter s' s. - Proof. - unfold Equal; intros; set_iff; tauto. - Qed. - - Lemma inter_subset_equal : s[<=]s' -> inter s s' [=] s. - Proof. - unfold Equal; intros; set_iff; intuition. - Qed. - - Lemma inter_equal_1 : s[=]s' -> inter s s'' [=] inter s' s''. - Proof. - intros; rewrite H; apply equal_refl. - Qed. - - Lemma inter_equal_2 : s'[=]s'' -> inter s s' [=] inter s s''. - Proof. - intros; rewrite H; apply equal_refl. - Qed. - - Lemma inter_assoc : inter (inter s s') s'' [=] inter s (inter s' s''). - Proof. - unfold Equal; intros; set_iff; tauto. - Qed. - - Lemma union_inter_1 : inter (union s s') s'' [=] union (inter s s'') (inter s' s''). - Proof. - unfold Equal; intros; set_iff; tauto. - Qed. - - Lemma union_inter_2 : union (inter s s') s'' [=] inter (union s s'') (union s' s''). - Proof. - unfold Equal; intros; set_iff; tauto. - Qed. - - Lemma inter_add_1 : In x s' -> inter (add x s) s' [=] add x (inter s s'). - Proof. - unfold Equal; intros; set_iff; intuition. - rewrite <- H1; auto. - Qed. - - Lemma inter_add_2 : ~ In x s' -> inter (add x s) s' [=] inter s s'. - Proof. - unfold Equal; intros; set_iff; intuition. - destruct H; rewrite H0; auto. - Qed. - - Lemma empty_inter_1 : Empty s -> Empty (inter s s'). - Proof. - unfold Empty; intros; set_iff; firstorder. - Qed. - - Lemma empty_inter_2 : Empty s' -> Empty (inter s s'). - Proof. - unfold Empty; intros; set_iff; firstorder. - Qed. - - Lemma inter_subset_1 : inter s s' [<=] s. - Proof. - unfold Subset; intro a; set_iff; tauto. - Qed. - - Lemma inter_subset_2 : inter s s' [<=] s'. - Proof. - unfold Subset; intro a; set_iff; tauto. - Qed. - - Lemma inter_subset_3 : - s''[<=]s -> s''[<=]s' -> s''[<=] inter s s'. - Proof. - unfold Subset; intros H H' a; set_iff; intuition. - Qed. - - (** properties of [diff] *) - - Lemma empty_diff_1 : Empty s -> Empty (diff s s'). - Proof. - unfold Empty, Equal; intros; set_iff; firstorder. - Qed. - - Lemma empty_diff_2 : Empty s -> diff s' s [=] s'. - Proof. - unfold Empty, Equal; intros; set_iff; firstorder. - Qed. - - Lemma diff_subset : diff s s' [<=] s. - Proof. - unfold Subset; intros a; set_iff; tauto. - Qed. - - Lemma diff_subset_equal : s[<=]s' -> diff s s' [=] empty. - Proof. - unfold Subset, Equal; intros; set_iff; intuition; absurd (In a empty); auto. - Qed. - - Lemma remove_diff_singleton : - remove x s [=] diff s (singleton x). - Proof. - unfold Equal; intros; set_iff; intuition. - Qed. - - Lemma diff_inter_empty : inter (diff s s') (inter s s') [=] empty. - Proof. - unfold Equal; intros; set_iff; intuition; absurd (In a empty); auto. - Qed. - - Lemma diff_inter_all : union (diff s s') (inter s s') [=] s. - Proof. - unfold Equal; intros; set_iff; intuition. - elim (In_dec a s'); auto. - Qed. - - (** properties of [Add] *) - - Lemma Add_add : Add x s (add x s). - Proof. - unfold Add; intros; set_iff; intuition. - Qed. - - Lemma Add_remove : In x s -> Add x (remove x s) s. - Proof. - unfold Add; intros; set_iff; intuition. - elim (eq_dec x y); auto. - rewrite <- H1; auto. - Qed. - - Lemma union_Add : Add x s s' -> Add x (union s s'') (union s' s''). - Proof. - unfold Add; intros; set_iff; rewrite H; tauto. - Qed. - - Lemma inter_Add : - In x s'' -> Add x s s' -> Add x (inter s s'') (inter s' s''). - Proof. - unfold Add; intros; set_iff; rewrite H0; intuition. - rewrite <- H2; auto. - Qed. - - Lemma union_Equal : - In x s'' -> Add x s s' -> union s s'' [=] union s' s''. - Proof. - unfold Add, Equal; intros; set_iff; rewrite H0; intuition. - rewrite <- H1; auto. - Qed. - - Lemma inter_Add_2 : - ~In x s'' -> Add x s s' -> inter s s'' [=] inter s' s''. - Proof. - unfold Add, Equal; intros; set_iff; rewrite H0; intuition. - destruct H; rewrite H1; auto. - Qed. - - End BasicProperties. - - Hint Immediate equal_sym: set. - Hint Resolve equal_refl equal_trans : set. - - Hint Immediate add_remove remove_add union_sym inter_sym: set. - Hint Resolve subset_refl subset_equal subset_antisym - subset_trans subset_empty subset_remove_3 subset_diff subset_add_3 - subset_add_2 in_subset empty_is_empty_1 empty_is_empty_2 add_equal - remove_equal singleton_equal_add union_subset_equal union_equal_1 - union_equal_2 union_assoc add_union_singleton union_add union_subset_1 - union_subset_2 union_subset_3 inter_subset_equal inter_equal_1 inter_equal_2 - inter_assoc union_inter_1 union_inter_2 inter_add_1 inter_add_2 - empty_inter_1 empty_inter_2 empty_union_1 empty_union_2 empty_diff_1 - empty_diff_2 union_Add inter_Add union_Equal inter_Add_2 not_in_union - inter_subset_1 inter_subset_2 inter_subset_3 diff_subset diff_subset_equal - remove_diff_singleton diff_inter_empty diff_inter_all Add_add Add_remove - Equal_remove add_add : set. - - (** * Alternative (weaker) specifications for [fold] *) - - Section Old_Spec_Now_Properties. - - Notation NoDup := (NoDupA E.eq). - - (** When [FSets] was first designed, the order in which Ocaml's [Set.fold] - takes the set elements was unspecified. This specification reflects this fact: - *) - - Lemma fold_0 : - forall s (A : Set) (i : A) (f : elt -> A -> A), - exists l : list elt, - NoDup l /\ - (forall x : elt, In x s <-> InA E.eq x l) /\ - fold f s i = fold_right f i l. - Proof. - intros; exists (rev (elements s)); split. - apply NoDupA_rev; auto. - exact E.eq_trans. - split; intros. - rewrite elements_iff; do 2 rewrite InA_alt. - split; destruct 1; generalize (In_rev (elements s) x0); exists x0; intuition. - rewrite fold_left_rev_right. - apply fold_1. - Qed. - - (** An alternate (and previous) specification for [fold] was based on - the recursive structure of a set. It is now lemmas [fold_1] and - [fold_2]. *) - - Lemma fold_1 : - forall s (A : Set) (eqA : A -> A -> Prop) - (st : Setoid_Theory A eqA) (i : A) (f : elt -> A -> A), - Empty s -> eqA (fold f s i) i. - Proof. - unfold Empty; intros; destruct (fold_0 s i f) as (l,(H1, (H2, H3))). - rewrite H3; clear H3. - generalize H H2; clear H H2; case l; simpl; intros. - refl_st. - elim (H e). - elim (H2 e); intuition. - Qed. - - Lemma fold_2 : - forall s s' x (A : Set) (eqA : A -> A -> Prop) - (st : Setoid_Theory A eqA) (i : A) (f : elt -> A -> A), - compat_op E.eq eqA f -> - transpose eqA f -> - ~ In x s -> Add x s s' -> eqA (fold f s' i) (f x (fold f s i)). - Proof. - intros; destruct (fold_0 s i f) as (l,(Hl, (Hl1, Hl2))); - destruct (fold_0 s' i f) as (l',(Hl', (Hl'1, Hl'2))). - rewrite Hl2; rewrite Hl'2; clear Hl2 Hl'2. - apply fold_right_add with (eqA:=E.eq)(eqB:=eqA); auto. - eauto. - exact eq_dec. - rewrite <- Hl1; auto. - intros; rewrite <- Hl1; rewrite <- Hl'1; auto. - Qed. - - (** Similar specifications for [cardinal]. *) - - Lemma cardinal_fold : forall s, cardinal s = fold (fun _ => S) s 0. - Proof. - intros; rewrite cardinal_1; rewrite M.fold_1. - symmetry; apply fold_left_length; auto. - Qed. - - Lemma cardinal_0 : - forall s, exists l : list elt, - NoDupA E.eq l /\ - (forall x : elt, In x s <-> InA E.eq x l) /\ - cardinal s = length l. - Proof. - intros; exists (elements s); intuition; apply cardinal_1. - Qed. - - Lemma cardinal_1 : forall s, Empty s -> cardinal s = 0. - Proof. - intros; rewrite cardinal_fold; apply fold_1; auto. - Qed. - - Lemma cardinal_2 : - forall s s' x, ~ In x s -> Add x s s' -> cardinal s' = S (cardinal s). - Proof. - intros; do 2 rewrite cardinal_fold. - change S with ((fun _ => S) x). - apply fold_2; auto. - Qed. - - End Old_Spec_Now_Properties. - - (** * Induction principle over sets *) - - Lemma cardinal_inv_1 : forall s, cardinal s = 0 -> Empty s. - Proof. - intros s; rewrite M.cardinal_1; intros H a; red. - rewrite elements_iff. - destruct (elements s); simpl in *; discriminate || inversion 1. - Qed. - Hint Resolve cardinal_inv_1. - - Lemma cardinal_inv_2 : - forall s n, cardinal s = S n -> { x : elt | In x s }. - Proof. - intros; rewrite M.cardinal_1 in H. - generalize (elements_2 (s:=s)). - destruct (elements s); try discriminate. - exists e; auto. - Qed. - - Lemma Equal_cardinal_aux : - forall n s s', cardinal s = n -> s[=]s' -> cardinal s = cardinal s'. - Proof. - simple induction n; intros. - rewrite H; symmetry . - apply cardinal_1. - rewrite <- H0; auto. - destruct (cardinal_inv_2 H0) as (x,H2). - revert H0. - rewrite (cardinal_2 (s:=remove x s) (s':=s) (x:=x)); auto with set. - rewrite (cardinal_2 (s:=remove x s') (s':=s') (x:=x)); auto with set. - rewrite H1 in H2; auto with set. - Qed. - - Lemma Equal_cardinal : forall s s', s[=]s' -> cardinal s = cardinal s'. - Proof. - intros; apply Equal_cardinal_aux with (cardinal s); auto. - Qed. - - Add Morphism cardinal : cardinal_m. - Proof. - exact Equal_cardinal. - Qed. - - Hint Resolve Add_add Add_remove Equal_remove cardinal_inv_1 Equal_cardinal. - - Lemma cardinal_induction : - forall P : t -> Type, - (forall s, Empty s -> P s) -> - (forall s s', P s -> forall x, ~In x s -> Add x s s' -> P s') -> - forall n s, cardinal s = n -> P s. - Proof. - simple induction n; intros; auto. - destruct (cardinal_inv_2 H) as (x,H0). - apply X0 with (remove x s) x; auto. - apply X1; auto. - rewrite (cardinal_2 (x:=x)(s:=remove x s)(s':=s)) in H; auto. - Qed. - - Lemma set_induction : - forall P : t -> Type, - (forall s : t, Empty s -> P s) -> - (forall s s' : t, P s -> forall x : elt, ~In x s -> Add x s s' -> P s') -> - forall s : t, P s. - Proof. - intros; apply cardinal_induction with (cardinal s); auto. - Qed. - - (** Other properties of [fold]. *) - - Section Fold. - Variables (A:Set)(eqA:A->A->Prop)(st:Setoid_Theory _ eqA). - Variables (f:elt->A->A)(Comp:compat_op E.eq eqA f)(Ass:transpose eqA f). - - Section Fold_1. - Variable i i':A. - - Lemma fold_empty : eqA (fold f empty i) i. - Proof. - apply fold_1; auto. - Qed. - - Lemma fold_equal : - forall s s', s[=]s' -> eqA (fold f s i) (fold f s' i). - Proof. - intros s; pattern s; apply set_induction; clear s; intros. - trans_st i. - apply fold_1; auto. - sym_st; apply fold_1; auto. - rewrite <- H0; auto. - trans_st (f x (fold f s i)). - apply fold_2 with (eqA := eqA); auto. - sym_st; apply fold_2 with (eqA := eqA); auto. - unfold Add in *; intros. - rewrite <- H2; auto. - Qed. - - Lemma fold_add : forall s x, ~In x s -> - eqA (fold f (add x s) i) (f x (fold f s i)). - Proof. - intros; apply fold_2 with (eqA := eqA); auto. - Qed. - - Lemma add_fold : forall s x, In x s -> - eqA (fold f (add x s) i) (fold f s i). - Proof. - intros; apply fold_equal; auto with set. - Qed. - - Lemma remove_fold_1: forall s x, In x s -> - eqA (f x (fold f (remove x s) i)) (fold f s i). - Proof. - intros. - sym_st. - apply fold_2 with (eqA:=eqA); auto. - Qed. - - Lemma remove_fold_2: forall s x, ~In x s -> - eqA (fold f (remove x s) i) (fold f s i). - Proof. - intros. - apply fold_equal; auto with set. - Qed. - - Lemma fold_commutes : forall s x, - eqA (fold f s (f x i)) (f x (fold f s i)). - Proof. - intros; pattern s; apply set_induction; clear s; intros. - trans_st (f x i). - apply fold_1; auto. - sym_st. - apply Comp; auto. - apply fold_1; auto. - trans_st (f x0 (fold f s (f x i))). - apply fold_2 with (eqA:=eqA); auto. - trans_st (f x0 (f x (fold f s i))). - trans_st (f x (f x0 (fold f s i))). - apply Comp; auto. - sym_st. - apply fold_2 with (eqA:=eqA); auto. - Qed. - - Lemma fold_init : forall s, eqA i i' -> - eqA (fold f s i) (fold f s i'). - Proof. - intros; pattern s; apply set_induction; clear s; intros. - trans_st i. - apply fold_1; auto. - trans_st i'. - sym_st; apply fold_1; auto. - trans_st (f x (fold f s i)). - apply fold_2 with (eqA:=eqA); auto. - trans_st (f x (fold f s i')). - sym_st; apply fold_2 with (eqA:=eqA); auto. - Qed. - - End Fold_1. - Section Fold_2. - Variable i:A. - - Lemma fold_union_inter : forall s s', - eqA (fold f (union s s') (fold f (inter s s') i)) - (fold f s (fold f s' i)). - Proof. - intros; pattern s; apply set_induction; clear s; intros. - trans_st (fold f s' (fold f (inter s s') i)). - apply fold_equal; auto with set. - trans_st (fold f s' i). - apply fold_init; auto. - apply fold_1; auto with set. - sym_st; apply fold_1; auto. - rename s'0 into s''. - destruct (In_dec x s'). - (* In x s' *) - trans_st (fold f (union s'' s') (f x (fold f (inter s s') i))); auto with set. - apply fold_init; auto. - apply fold_2 with (eqA:=eqA); auto with set. - rewrite inter_iff; intuition. - trans_st (f x (fold f s (fold f s' i))). - trans_st (fold f (union s s') (f x (fold f (inter s s') i))). - apply fold_equal; auto. - apply equal_sym; apply union_Equal with x; auto with set. - trans_st (f x (fold f (union s s') (fold f (inter s s') i))). - apply fold_commutes; auto. - sym_st; apply fold_2 with (eqA:=eqA); auto. - (* ~(In x s') *) - trans_st (f x (fold f (union s s') (fold f (inter s'' s') i))). - apply fold_2 with (eqA:=eqA); auto with set. - trans_st (f x (fold f (union s s') (fold f (inter s s') i))). - apply Comp;auto. - apply fold_init;auto. - apply fold_equal;auto. - apply equal_sym; apply inter_Add_2 with x; auto with set. - trans_st (f x (fold f s (fold f s' i))). - sym_st; apply fold_2 with (eqA:=eqA); auto. - Qed. - - End Fold_2. - Section Fold_3. - Variable i:A. - - Lemma fold_diff_inter : forall s s', - eqA (fold f (diff s s') (fold f (inter s s') i)) (fold f s i). - Proof. - intros. - trans_st (fold f (union (diff s s') (inter s s')) - (fold f (inter (diff s s') (inter s s')) i)). - sym_st; apply fold_union_inter; auto. - trans_st (fold f s (fold f (inter (diff s s') (inter s s')) i)). - apply fold_equal; auto with set. - apply fold_init; auto. - apply fold_1; auto with set. - Qed. - - Lemma fold_union: forall s s', (forall x, ~In x s\/~In x s') -> - eqA (fold f (union s s') i) (fold f s (fold f s' i)). - Proof. - intros. - trans_st (fold f (union s s') (fold f (inter s s') i)). - apply fold_init; auto. - sym_st; apply fold_1; auto with set. - unfold Empty; intro a; generalize (H a); set_iff; tauto. - apply fold_union_inter; auto. - Qed. - - End Fold_3. - End Fold. - - Lemma fold_plus : - forall s p, fold (fun _ => S) s p = fold (fun _ => S) s 0 + p. - Proof. - assert (st := gen_st nat). - assert (fe : compat_op E.eq (@eq _) (fun _ => S)) by (unfold compat_op; auto). - assert (fp : transpose (@eq _) (fun _:elt => S)) by (unfold transpose; auto). - intros s p; pattern s; apply set_induction; clear s; intros. - rewrite (fold_1 st p (fun _ => S) H). - rewrite (fold_1 st 0 (fun _ => S) H); trivial. - assert (forall p s', Add x s s' -> fold (fun _ => S) s' p = S (fold (fun _ => S) s p)). - change S with ((fun _ => S) x). - intros; apply fold_2; auto. - rewrite H2; auto. - rewrite (H2 0); auto. - rewrite H. - simpl; auto. - Qed. - - (** properties of [cardinal] *) - - Lemma empty_cardinal : cardinal empty = 0. - Proof. - rewrite cardinal_fold; apply fold_1; auto. - Qed. - - Hint Immediate empty_cardinal cardinal_1 : set. - - Lemma singleton_cardinal : forall x, cardinal (singleton x) = 1. - Proof. - intros. - rewrite (singleton_equal_add x). - replace 0 with (cardinal empty); auto with set. - apply cardinal_2 with x; auto with set. - Qed. - - Hint Resolve singleton_cardinal: set. - - Lemma diff_inter_cardinal : - forall s s', cardinal (diff s s') + cardinal (inter s s') = cardinal s . - Proof. - intros; do 3 rewrite cardinal_fold. - rewrite <- fold_plus. - apply fold_diff_inter with (eqA:=@eq nat); auto. - Qed. - - Lemma union_cardinal: - forall s s', (forall x, ~In x s\/~In x s') -> - cardinal (union s s')=cardinal s+cardinal s'. - Proof. - intros; do 3 rewrite cardinal_fold. - rewrite <- fold_plus. - apply fold_union; auto. - Qed. - - Lemma subset_cardinal : - forall s s', s[<=]s' -> cardinal s <= cardinal s' . - Proof. - intros. - rewrite <- (diff_inter_cardinal s' s). - rewrite (inter_sym s' s). - rewrite (inter_subset_equal H); auto with arith. - Qed. - - Lemma subset_cardinal_lt : - forall s s' x, s[<=]s' -> In x s' -> ~In x s -> cardinal s < cardinal s'. - Proof. - intros. - rewrite <- (diff_inter_cardinal s' s). - rewrite (inter_sym s' s). - rewrite (inter_subset_equal H). - generalize (@cardinal_inv_1 (diff s' s)). - destruct (cardinal (diff s' s)). - intro H2; destruct (H2 (refl_equal _) x). - set_iff; auto. - intros _. - change (0 + cardinal s < S n + cardinal s). - apply Plus.plus_lt_le_compat; auto with arith. - Qed. - - Theorem union_inter_cardinal : - forall s s', cardinal (union s s') + cardinal (inter s s') = cardinal s + cardinal s' . - Proof. - intros. - do 4 rewrite cardinal_fold. - do 2 rewrite <- fold_plus. - apply fold_union_inter with (eqA:=@eq nat); auto. - Qed. - - Lemma union_cardinal_inter : - forall s s', cardinal (union s s') = cardinal s + cardinal s' - cardinal (inter s s'). - Proof. - intros. - rewrite <- union_inter_cardinal. - rewrite Plus.plus_comm. - auto with arith. - Qed. - - Lemma union_cardinal_le : - forall s s', cardinal (union s s') <= cardinal s + cardinal s'. - Proof. - intros; generalize (union_inter_cardinal s s'). - intros; rewrite <- H; auto with arith. - Qed. - - Lemma add_cardinal_1 : - forall s x, In x s -> cardinal (add x s) = cardinal s. - Proof. - auto with set. - Qed. - - Lemma add_cardinal_2 : - forall s x, ~In x s -> cardinal (add x s) = S (cardinal s). - Proof. - intros. - do 2 rewrite cardinal_fold. - change S with ((fun _ => S) x); - apply fold_add with (eqA:=@eq nat); auto. - Qed. - - Lemma remove_cardinal_1 : - forall s x, In x s -> S (cardinal (remove x s)) = cardinal s. - Proof. - intros. - do 2 rewrite cardinal_fold. - change S with ((fun _ =>S) x). - apply remove_fold_1 with (eqA:=@eq nat); auto. - Qed. - - Lemma remove_cardinal_2 : - forall s x, ~In x s -> cardinal (remove x s) = cardinal s. - Proof. - auto with set. - Qed. - - Hint Resolve subset_cardinal union_cardinal add_cardinal_1 add_cardinal_2. - -End Properties. diff --git a/theories/FSets/FSets.v b/theories/FSets/FSets.v index b0402db6..a73c1da7 100644 --- a/theories/FSets/FSets.v +++ b/theories/FSets/FSets.v @@ -6,13 +6,19 @@ (* * GNU Lesser General Public License Version 2.1 *) (***********************************************************************) -(* $Id: FSets.v 8897 2006-06-05 21:04:10Z letouzey $ *) +(* $Id: FSets.v 10699 2008-03-19 20:56:43Z letouzey $ *) Require Export OrderedType. Require Export OrderedTypeEx. Require Export OrderedTypeAlt. +Require Export DecidableType. +Require Export DecidableTypeEx. Require Export FSetInterface. Require Export FSetBridge. +Require Export FSetFacts. +Require Export FSetDecide. Require Export FSetProperties. Require Export FSetEqProperties. +Require Export FSetWeakList. Require Export FSetList. +Require Export FSetAVL. \ No newline at end of file diff --git a/theories/FSets/OrderedType.v b/theories/FSets/OrderedType.v index f966cd4d..c56a24cf 100644 --- a/theories/FSets/OrderedType.v +++ b/theories/FSets/OrderedType.v @@ -6,32 +6,25 @@ (* * GNU Lesser General Public License Version 2.1 *) (***********************************************************************) -(* $Id: OrderedType.v 8834 2006-05-20 00:41:35Z letouzey $ *) +(* $Id: OrderedType.v 10616 2008-03-04 17:33:35Z letouzey $ *) Require Export SetoidList. Set Implicit Arguments. Unset Strict Implicit. -(* TODO concernant la tactique order: - * propagate_lt n'est sans doute pas complet - * un propagate_le - * exploiter les hypotheses negatives restant a la fin - * faire que ca marche meme quand une hypothese depend d'un eq ou lt. -*) - (** * Ordered types *) -Inductive Compare (X : Set) (lt eq : X -> X -> Prop) (x y : X) : Set := +Inductive Compare (X : Type) (lt eq : X -> X -> Prop) (x y : X) : Type := | LT : lt x y -> Compare lt eq x y | EQ : eq x y -> Compare lt eq x y | GT : lt y x -> Compare lt eq x y. Module Type OrderedType. - Parameter t : Set. + Parameter Inline t : Type. - Parameter eq : t -> t -> Prop. - Parameter lt : t -> t -> Prop. + Parameter Inline eq : t -> t -> Prop. + Parameter Inline lt : t -> t -> Prop. Axiom eq_refl : forall x : t, eq x x. Axiom eq_sym : forall x y : t, eq x y -> eq y x. @@ -122,6 +115,13 @@ Module OrderedTypeFacts (O: OrderedType). intuition. Qed. +(* TODO concernant la tactique order: + * propagate_lt n'est sans doute pas complet + * un propagate_le + * exploiter les hypotheses negatives restant a la fin + * faire que ca marche meme quand une hypothese depend d'un eq ou lt. +*) + Ltac abstraction := match goal with (* First, some obvious simplifications *) | H : False |- _ => elim H @@ -137,9 +137,9 @@ Ltac abstraction := match goal with | H1: ~lt ?x ?y, H2: ~eq ?y ?x |- _ => generalize (le_neq H1 (neq_sym H2)); clear H1 H2; intro; abstraction (* Then, we generalize all interesting facts *) - | H : lt ?x ?y |- _ => revert H; abstraction - | H : ~lt ?x ?y |- _ => revert H; abstraction | H : ~eq ?x ?y |- _ => revert H; abstraction + | H : ~lt ?x ?y |- _ => revert H; abstraction + | H : lt ?x ?y |- _ => revert H; abstraction | H : eq ?x ?y |- _ => revert H; abstraction | _ => idtac end. @@ -192,7 +192,7 @@ Ltac do_lt x y LT := match goal with | |- lt ?z x -> _ => let H := fresh "H" in (intro H; generalize (lt_trans H LT); intro); do_lt x y LT | |- lt _ _ -> _ => intro; do_lt x y LT - (* Ge *) + (* GE *) | |- ~lt y x -> _ => intros _; do_lt x y LT | |- ~lt x ?z -> _ => let H := fresh "H" in (intro H; generalize (le_lt_trans H LT); intro); do_lt x y LT @@ -296,12 +296,12 @@ Ltac false_order := elimtype False; order. Lemma eq_dec : forall x y : t, {eq x y} + {~ eq x y}. Proof. intros; elim (compare x y); [ right | left | right ]; auto. - Qed. + Defined. Lemma lt_dec : forall x y : t, {lt x y} + {~ lt x y}. Proof. intros; elim (compare x y); [ left | right | right ]; auto. - Qed. + Defined. Definition eqb x y : bool := if eq_dec x y then true else false. @@ -361,7 +361,7 @@ Module KeyOrderedType(O:OrderedType). Import MO. Section Elt. - Variable elt : Set. + Variable elt : Type. Notation key:=t. Definition eqk (p p':key*elt) := eq (fst p) (fst p'). diff --git a/theories/FSets/OrderedTypeAlt.v b/theories/FSets/OrderedTypeAlt.v index 9bcfbfc7..516df0f0 100644 --- a/theories/FSets/OrderedTypeAlt.v +++ b/theories/FSets/OrderedTypeAlt.v @@ -11,19 +11,19 @@ * Institution: LRI, CNRS UMR 8623 - Université Paris Sud * 91405 Orsay, France *) -(* $Id: OrderedTypeAlt.v 8773 2006-04-29 14:31:32Z letouzey $ *) +(* $Id: OrderedTypeAlt.v 10739 2008-04-01 14:45:20Z herbelin $ *) Require Import OrderedType. (** * An alternative (but equivalent) presentation for an Ordered Type inferface. *) -(** NB: [comparison], defined in [theories/Init/datatypes.v] is [Eq|Lt|Gt] -whereas [compare], defined in [theories/FSets/OrderedType.v] is [EQ _ | LT _ | GT _ ] +(** NB: [comparison], defined in [Datatypes.v] is [Eq|Lt|Gt] +whereas [compare], defined in [OrderedType.v] is [EQ _ | LT _ | GT _ ] *) Module Type OrderedTypeAlt. - Parameter t : Set. + Parameter t : Type. Parameter compare : t -> t -> comparison. @@ -103,24 +103,16 @@ Module OrderedType_to_Alt (O:OrderedType) <: OrderedTypeAlt. Lemma compare_sym : forall x y, (y?=x) = CompOpp (x?=y). Proof. - intros x y. - unfold compare. - destruct (O.compare y x); elim_comp; simpl; auto. + intros x y; unfold compare. + destruct O.compare; elim_comp; simpl; auto. Qed. Lemma compare_trans : forall c x y z, (x?=y) = c -> (y?=z) = c -> (x?=z) = c. Proof. intros c x y z. - destruct c; unfold compare. - destruct (O.compare x y); intros; try discriminate. - destruct (O.compare y z); intros; try discriminate. - elim_comp; auto. - destruct (O.compare x y); intros; try discriminate. - destruct (O.compare y z); intros; try discriminate. - elim_comp; auto. - destruct (O.compare x y); intros; try discriminate. - destruct (O.compare y z); intros; try discriminate. + destruct c; unfold compare; + do 2 (destruct O.compare; intros; try discriminate); elim_comp; auto. Qed. diff --git a/theories/FSets/OrderedTypeEx.v b/theories/FSets/OrderedTypeEx.v index 28a5705d..03171396 100644 --- a/theories/FSets/OrderedTypeEx.v +++ b/theories/FSets/OrderedTypeEx.v @@ -11,7 +11,7 @@ * Institution: LRI, CNRS UMR 8623 - Université Paris Sud * 91405 Orsay, France *) -(* $Id: OrderedTypeEx.v 9940 2007-07-05 12:32:47Z letouzey $ *) +(* $Id: OrderedTypeEx.v 10739 2008-04-01 14:45:20Z herbelin $ *) Require Import OrderedType. Require Import ZArith. @@ -25,9 +25,9 @@ Require Import Compare_dec. the equality is the usual one of Coq. *) Module Type UsualOrderedType. - Parameter t : Set. + Parameter Inline t : Type. Definition eq := @eq t. - Parameter lt : t -> t -> Prop. + Parameter Inline lt : t -> t -> Prop. Definition eq_refl := @refl_equal t. Definition eq_sym := @sym_eq t. Definition eq_trans := @trans_eq t. @@ -154,16 +154,16 @@ Module N_as_OT <: UsualOrderedType. Definition eq_sym := @sym_eq t. Definition eq_trans := @trans_eq t. - Definition lt p q:= Nle q p = false. + Definition lt p q:= Nleb q p = false. - Definition lt_trans := Nlt_trans. + Definition lt_trans := Nltb_trans. Lemma lt_not_eq : forall x y : t, lt x y -> ~ eq x y. Proof. intros; intro. rewrite H0 in H. unfold lt in H. - rewrite Nle_refl in H; discriminate. + rewrite Nleb_refl in H; discriminate. Qed. Definition compare : forall x y : t, Compare lt eq x y. @@ -172,16 +172,15 @@ Module N_as_OT <: UsualOrderedType. case_eq ((x ?= y)%N); intros. apply EQ; apply Ncompare_Eq_eq; auto. apply LT; unfold lt; auto. - generalize (Nle_Ncompare y x). - destruct (Nle y x); auto. - rewrite <- Ncompare_antisym. + generalize (Nleb_Nle y x). + unfold Nle; rewrite <- Ncompare_antisym. destruct (x ?= y)%N; simpl; try discriminate. - intros (H0,_); elim H0; auto. + clear H; intros H. + destruct (Nleb y x); intuition. apply GT; unfold lt. - generalize (Nle_Ncompare x y). - destruct (Nle x y); auto. - destruct (x ?= y)%N; simpl; try discriminate. - intros (H0,_); elim H0; auto. + generalize (Nleb_Nle x y). + unfold Nle; destruct (x ?= y)%N; simpl; try discriminate. + destruct (Nleb x y); intuition. Defined. End N_as_OT. diff --git a/theories/Init/Datatypes.v b/theories/Init/Datatypes.v index 56dc7e95..e5e6fd23 100644 --- a/theories/Init/Datatypes.v +++ b/theories/Init/Datatypes.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Datatypes.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Datatypes.v 11073 2008-06-08 20:24:51Z herbelin $ i*) Set Implicit Arguments. @@ -26,6 +26,52 @@ Inductive bool : Set := Add Printing If bool. +Delimit Scope bool_scope with bool. + +Bind Scope bool_scope with bool. + +(** Basic boolean operators *) + +Definition andb (b1 b2:bool) : bool := if b1 then b2 else false. + +Definition orb (b1 b2:bool) : bool := if b1 then true else b2. + +Definition implb (b1 b2:bool) : bool := if b1 then b2 else true. + +Definition xorb (b1 b2:bool) : bool := + match b1, b2 with + | true, true => false + | true, false => true + | false, true => true + | false, false => false + end. + +Definition negb (b:bool) := if b then false else true. + +Infix "||" := orb : bool_scope. +Infix "&&" := andb : bool_scope. + +(*******************************) +(** * Properties of [andb] *) +(*******************************) + +Lemma andb_prop : forall a b:bool, andb a b = true -> a = true /\ b = true. +Proof. + destruct a; destruct b; intros; split; try (reflexivity || discriminate). +Qed. +Hint Resolve andb_prop: bool v62. + +Lemma andb_true_intro : + forall b1 b2:bool, b1 = true /\ b2 = true -> andb b1 b2 = true. +Proof. + destruct b1; destruct b2; simpl in |- *; tauto || auto with bool. +Qed. +Hint Resolve andb_true_intro: bool v62. + +(** Interpretation of booleans as propositions *) + +Inductive eq_true : bool -> Prop := is_eq_true : eq_true true. + (** [nat] is the datatype of natural numbers built from [O] and successor [S]; note that the constructor name is the letter O. Numbers in [nat] can be denoted using a decimal notation; @@ -70,7 +116,7 @@ Definition option_map (A B:Type) (f:A->B) o := end. (** [sum A B], written [A + B], is the disjoint sum of [A] and [B] *) -(* Syntax defined in Specif.v *) + Inductive sum (A B:Type) : Type := | inl : A -> sum A B | inr : B -> sum A B. @@ -82,6 +128,7 @@ Notation "x + y" := (sum x y) : type_scope. Inductive prod (A B:Type) : Type := pair : A -> B -> prod A B. + Add Printing Let prod. Notation "x * y" := (prod x y) : type_scope. @@ -135,6 +182,13 @@ Definition CompOpp (r:comparison) := | Gt => Lt end. +(** Identity *) + +Definition ID := forall A:Type, A -> A. +Definition id : ID := fun A x => x. + +(* begin hide *) + (* Compatibility *) Notation prodT := prod (only parsing). @@ -146,3 +200,5 @@ Notation fstT := fst (only parsing). Notation sndT := snd (only parsing). Notation prodT_uncurry := prod_uncurry (only parsing). Notation prodT_curry := prod_curry (only parsing). + +(* end hide *) diff --git a/theories/Init/Logic.v b/theories/Init/Logic.v index 8b487432..6a636ccc 100644 --- a/theories/Init/Logic.v +++ b/theories/Init/Logic.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Logic.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Logic.v 10304 2007-11-08 17:06:32Z emakarov $ i*) Set Implicit Arguments. @@ -16,10 +16,10 @@ Require Import Notations. (** [True] is the always true proposition *) Inductive True : Prop := - I : True. + I : True. (** [False] is the always false proposition *) -Inductive False : Prop :=. +Inductive False : Prop :=. (** [not A], written [~A], is the negation of [A] *) Definition not (A:Prop) := A -> False. @@ -30,14 +30,14 @@ Hint Unfold not: core. (** [and A B], written [A /\ B], is the conjunction of [A] and [B] - [conj p q] is a proof of [A /\ B] as soon as + [conj p q] is a proof of [A /\ B] as soon as [p] is a proof of [A] and [q] a proof of [B] [proj1] and [proj2] are first and second projections of a conjunction *) Inductive and (A B:Prop) : Prop := - conj : A -> B -> A /\ B - + conj : A -> B -> A /\ B + where "A /\ B" := (and A B) : type_scope. Section Conjunction. @@ -60,7 +60,7 @@ End Conjunction. Inductive or (A B:Prop) : Prop := | or_introl : A -> A \/ B - | or_intror : B -> A \/ B + | or_intror : B -> A \/ B where "A \/ B" := (or A B) : type_scope. @@ -89,6 +89,67 @@ Theorem iff_sym : forall A B:Prop, (A <-> B) -> (B <-> A). End Equivalence. +Hint Unfold iff: extcore. + +(** Some equivalences *) + +Theorem neg_false : forall A : Prop, ~ A <-> (A <-> False). +Proof. +intro A; unfold not; split. +intro H; split; [exact H | intro H1; elim H1]. +intros [H _]; exact H. +Qed. + +Theorem and_cancel_l : forall A B C : Prop, + (B -> A) -> (C -> A) -> ((A /\ B <-> A /\ C) <-> (B <-> C)). +Proof. +intros; tauto. +Qed. + +Theorem and_cancel_r : forall A B C : Prop, + (B -> A) -> (C -> A) -> ((B /\ A <-> C /\ A) <-> (B <-> C)). +Proof. +intros; tauto. +Qed. + +Theorem or_cancel_l : forall A B C : Prop, + (B -> ~ A) -> (C -> ~ A) -> ((A \/ B <-> A \/ C) <-> (B <-> C)). +Proof. +intros; tauto. +Qed. + +Theorem or_cancel_r : forall A B C : Prop, + (B -> ~ A) -> (C -> ~ A) -> ((B \/ A <-> C \/ A) <-> (B <-> C)). +Proof. +intros; tauto. +Qed. + +(** Backward direction of the equivalences above does not need assumptions *) + +Theorem and_iff_compat_l : forall A B C : Prop, + (B <-> C) -> (A /\ B <-> A /\ C). +Proof. +intros; tauto. +Qed. + +Theorem and_iff_compat_r : forall A B C : Prop, + (B <-> C) -> (B /\ A <-> C /\ A). +Proof. +intros; tauto. +Qed. + +Theorem or_iff_compat_l : forall A B C : Prop, + (B <-> C) -> (A \/ B <-> A \/ C). +Proof. +intros; tauto. +Qed. + +Theorem or_iff_compat_r : forall A B C : Prop, + (B <-> C) -> (B \/ A <-> C \/ A). +Proof. +intros; tauto. +Qed. + (** [(IF_then_else P Q R)], written [IF P then Q else R] denotes either [P] and [Q], or [~P] and [Q] *) @@ -103,7 +164,7 @@ Notation "'IF' c1 'then' c2 'else' c3" := (IF_then_else c1 c2 c3) expresses the existence of an [x] of some type [A] in [Set] which satisfies the predicate [P]. This is existential quantification. - [ex2 P Q], or simply [exists2 x, P x & Q x], or also + [ex2 P Q], or simply [exists2 x, P x & Q x], or also [exists2 x:A, P x & Q x], expresses the existence of an [x] of type [A] which satisfies both predicates [P] and [Q]. @@ -123,14 +184,14 @@ Inductive ex (A:Type) (P:A -> Prop) : Prop := Inductive ex2 (A:Type) (P Q:A -> Prop) : Prop := ex_intro2 : forall x:A, P x -> Q x -> ex2 (A:=A) P Q. -Definition all (A:Type) (P:A -> Prop) := forall x:A, P x. +Definition all (A:Type) (P:A -> Prop) := forall x:A, P x. (* Rule order is important to give printing priority to fully typed exists *) Notation "'exists' x , p" := (ex (fun x => p)) (at level 200, x ident, right associativity) : type_scope. Notation "'exists' x : t , p" := (ex (fun x:t => p)) - (at level 200, x ident, right associativity, + (at level 200, x ident, right associativity, format "'[' 'exists' '/ ' x : t , '/ ' p ']'") : type_scope. @@ -165,14 +226,14 @@ End universal_quantification. (** [eq x y], or simply [x=y] expresses the equality of [x] and [y]. Both [x] and [y] must belong to the same type [A]. The definition is inductive and states the reflexivity of the equality. - The others properties (symmetry, transitivity, replacement of + The others properties (symmetry, transitivity, replacement of equals by equals) are proved below. The type of [x] and [y] can be made explicit using the notation [x = y :> A]. This is Leibniz equality as it expresses that [x] and [y] are equal iff every property on [A] which is true of [x] is also true of [y] *) Inductive eq (A:Type) (x:A) : A -> Prop := - refl_equal : x = x :>A + refl_equal : x = x :>A where "x = y :> A" := (@eq A x y) : type_scope. @@ -222,7 +283,7 @@ Section Logic_lemmas. Proof. red in |- *; intros h1 h2; apply h1; destruct h2; trivial. Qed. - + Definition sym_equal := sym_eq. Definition sym_not_equal := sym_not_eq. Definition trans_equal := trans_eq. @@ -233,12 +294,12 @@ Section Logic_lemmas. forall (A:Type) (x:A) (P:A -> Prop), P x -> forall y:A, y = x -> P y. intros A x P H y H0; elim sym_eq with (1 := H0); assumption. Defined. - + Definition eq_rec_r : forall (A:Type) (x:A) (P:A -> Set), P x -> forall y:A, y = x -> P y. intros A x P H y H0; elim sym_eq with (1 := H0); assumption. Defined. - + Definition eq_rect_r : forall (A:Type) (x:A) (P:A -> Type), P x -> forall y:A, y = x -> P y. intros A x P H y H0; elim sym_eq with (1 := H0); assumption. @@ -246,14 +307,14 @@ Section Logic_lemmas. End Logic_lemmas. Theorem f_equal2 : - forall (A1 A2 B:Type) (f:A1 -> A2 -> B) (x1 y1:A1) + forall (A1 A2 B:Type) (f:A1 -> A2 -> B) (x1 y1:A1) (x2 y2:A2), x1 = y1 -> x2 = y2 -> f x1 x2 = f y1 y2. Proof. destruct 1; destruct 1; reflexivity. Qed. Theorem f_equal3 : - forall (A1 A2 A3 B:Type) (f:A1 -> A2 -> A3 -> B) (x1 y1:A1) + forall (A1 A2 A3 B:Type) (f:A1 -> A2 -> A3 -> B) (x1 y1:A1) (x2 y2:A2) (x3 y3:A3), x1 = y1 -> x2 = y2 -> x3 = y3 -> f x1 x2 x3 = f y1 y2 y3. Proof. @@ -261,7 +322,7 @@ Proof. Qed. Theorem f_equal4 : - forall (A1 A2 A3 A4 B:Type) (f:A1 -> A2 -> A3 -> A4 -> B) + forall (A1 A2 A3 A4 B:Type) (f:A1 -> A2 -> A3 -> A4 -> B) (x1 y1:A1) (x2 y2:A2) (x3 y3:A3) (x4 y4:A4), x1 = y1 -> x2 = y2 -> x3 = y3 -> x4 = y4 -> f x1 x2 x3 x4 = f y1 y2 y3 y4. Proof. @@ -295,7 +356,7 @@ Definition uniqueness (A:Type) (P:A->Prop) := forall x y, P x -> P y -> x = y. Notation "'exists' ! x , P" := (ex (unique (fun x => P))) (at level 200, x ident, right associativity, format "'[' 'exists' ! '/ ' x , '/ ' P ']'") : type_scope. -Notation "'exists' ! x : A , P" := +Notation "'exists' ! x : A , P" := (ex (unique (fun x:A => P))) (at level 200, x ident, right associativity, format "'[' 'exists' ! '/ ' x : A , '/ ' P ']'") : type_scope. @@ -305,15 +366,47 @@ Lemma unique_existence : forall (A:Type) (P:A->Prop), Proof. intros A P; split. intros ((x,Hx),Huni); exists x; red; auto. - intros (x,(Hx,Huni)); split. + intros (x,(Hx,Huni)); split. exists x; assumption. intros x' x'' Hx' Hx''; transitivity x. symmetry; auto. auto. Qed. -(** Being inhabited *) +(** * Being inhabited *) + +(** The predicate [inhabited] can be used in different contexts. If [A] is + thought as a type, [inhabited A] states that [A] is inhabited. If [A] is + thought as a computationally relevant proposition, then + [inhabited A] weakens [A] so as to hide its computational meaning. + The so-weakened proof remains computationally relevant but only in + a propositional context. +*) Inductive inhabited (A:Type) : Prop := inhabits : A -> inhabited A. Hint Resolve inhabits: core. + +Lemma exists_inhabited : forall (A:Type) (P:A->Prop), + (exists x, P x) -> inhabited A. +Proof. + destruct 1; auto. +Qed. + +(** Declaration of stepl and stepr for eq and iff *) + +Lemma eq_stepl : forall (A : Type) (x y z : A), x = y -> x = z -> z = y. +Proof. +intros A x y z H1 H2. rewrite <- H2; exact H1. +Qed. + +Declare Left Step eq_stepl. +Declare Right Step trans_eq. + +Lemma iff_stepl : forall A B C : Prop, (A <-> B) -> (A <-> C) -> (C <-> B). +Proof. +intros; tauto. +Qed. + +Declare Left Step iff_stepl. +Declare Right Step iff_trans. diff --git a/theories/Init/Logic_Type.v b/theories/Init/Logic_Type.v index dbe944b0..c4e5f6c7 100644 --- a/theories/Init/Logic_Type.v +++ b/theories/Init/Logic_Type.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Logic_Type.v 8866 2006-05-28 16:21:04Z herbelin $ i*) +(*i $Id: Logic_Type.v 10840 2008-04-23 21:29:34Z herbelin $ i*) (** This module defines type constructors for types in [Type] ([Datatypes.v] and [Logic.v] defined them for types in [Set]) *) @@ -32,17 +32,17 @@ Section identity_is_a_congruence. Lemma sym_id : identity x y -> identity y x. Proof. destruct 1; trivial. - Qed. + Defined. Lemma trans_id : identity x y -> identity y z -> identity x z. Proof. destruct 2; trivial. - Qed. + Defined. Lemma congr_id : identity x y -> identity (f x) (f y). Proof. destruct 1; trivial. - Qed. + Defined. Lemma sym_not_id : notT (identity x y) -> notT (identity y x). Proof. diff --git a/theories/Init/Notations.v b/theories/Init/Notations.v index 416647b4..3dc6385d 100644 --- a/theories/Init/Notations.v +++ b/theories/Init/Notations.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Notations.v 8866 2006-05-28 16:21:04Z herbelin $ i*) +(*i $Id: Notations.v 11073 2008-06-08 20:24:51Z herbelin $ i*) (** These are the notations whose level and associativity are imposed by Coq *) @@ -19,13 +19,13 @@ Reserved Notation "~ x" (at level 75, right associativity). (** Notations for equality and inequalities *) -Reserved Notation "x = y :> T" +Reserved Notation "x = y :> T" (at level 70, y at next level, no associativity). Reserved Notation "x = y" (at level 70, no associativity). Reserved Notation "x = y = z" (at level 70, no associativity, y at next level). -Reserved Notation "x <> y :> T" +Reserved Notation "x <> y :> T" (at level 70, y at next level, no associativity). Reserved Notation "x <> y" (at level 70, no associativity). @@ -49,6 +49,11 @@ Reserved Notation "- x" (at level 35, right associativity). Reserved Notation "/ x" (at level 35, right associativity). Reserved Notation "x ^ y" (at level 30, right associativity). +(** Notations for booleans *) + +Reserved Notation "x || y" (at level 50, left associativity). +Reserved Notation "x && y" (at level 40, left associativity). + (** Notations for pairs *) Reserved Notation "( x , y , .. , z )" (at level 0). diff --git a/theories/Init/Peano.v b/theories/Init/Peano.v index 3df2b566..9ef63cc8 100644 --- a/theories/Init/Peano.v +++ b/theories/Init/Peano.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Peano.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Peano.v 11115 2008-06-12 16:03:32Z werner $ i*) (** The type [nat] of Peano natural numbers (built from [O] and [S]) is defined in [Datatypes.v] *) @@ -40,7 +40,7 @@ Hint Resolve (f_equal (A:=nat)): core. (** The predecessor function *) Definition pred (n:nat) : nat := match n with - | O => 0 + | O => n | S u => u end. Hint Resolve (f_equal pred): v62. @@ -123,6 +123,11 @@ Proof. auto. Qed. +(** Standard associated names *) + +Notation plus_0_r_reverse := plus_n_O (only parsing). +Notation plus_succ_r_reverse := plus_n_Sm (only parsing). + (** Multiplication *) Fixpoint mult (n m:nat) {struct n} : nat := @@ -149,12 +154,21 @@ Proof. Qed. Hint Resolve mult_n_Sm: core v62. +(** Standard associated names *) + +Notation mult_0_r_reverse := mult_n_O (only parsing). +Notation mult_succ_r_reverse := mult_n_Sm (only parsing). + (** Truncated subtraction: [m-n] is [0] if [n>=m] *) Fixpoint minus (n m:nat) {struct n} : nat := match n, m with - | O, _ => 0 - | S k, O => S k + | O, _ => n + | S k, O => n +(*======= + + | O, _ => n + | S k, O => S k *) | S k, S l => k - l end @@ -211,5 +225,3 @@ Proof. induction n; auto. destruct m as [| n0]; auto. Qed. - -(** Notations *) diff --git a/theories/Init/Prelude.v b/theories/Init/Prelude.v index 5f6f1eab..6492c948 100644 --- a/theories/Init/Prelude.v +++ b/theories/Init/Prelude.v @@ -6,12 +6,12 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Prelude.v 8642 2006-03-17 10:09:02Z notin $ i*) +(*i $Id: Prelude.v 10064 2007-08-08 15:32:36Z msozeau $ i*) Require Export Notations. Require Export Logic. Require Export Datatypes. Require Export Specif. Require Export Peano. -Require Export Wf. -Require Export Tactics. +Require Export Coq.Init.Wf. +Require Export Coq.Init.Tactics. diff --git a/theories/Init/Specif.v b/theories/Init/Specif.v index dd2f7697..c0f5c42a 100644 --- a/theories/Init/Specif.v +++ b/theories/Init/Specif.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Specif.v 8866 2006-05-28 16:21:04Z herbelin $ i*) +(*i $Id: Specif.v 10923 2008-05-12 18:25:06Z herbelin $ i*) (** Basic specifications : sets that may contain logical information *) @@ -46,12 +46,12 @@ Arguments Scope sigT [type_scope type_scope]. Arguments Scope sigT2 [type_scope type_scope type_scope]. Notation "{ x | P }" := (sig (fun x => P)) : type_scope. -Notation "{ x | P & Q }" := (sig2 (fun x => P) (fun x => Q)) : type_scope. +Notation "{ x | P & Q }" := (sig2 (fun x => P) (fun x => Q)) : type_scope. Notation "{ x : A | P }" := (sig (fun x:A => P)) : type_scope. -Notation "{ x : A | P & Q }" := (sig2 (fun x:A => P) (fun x:A => Q)) : +Notation "{ x : A | P & Q }" := (sig2 (fun x:A => P) (fun x:A => Q)) : type_scope. -Notation "{ x : A & P }" := (sigT (fun x:A => P)) : type_scope. -Notation "{ x : A & P & Q }" := (sigT2 (fun x:A => P) (fun x:A => Q)) : +Notation "{ x : A & P }" := (sigT (fun x:A => P)) : type_scope. +Notation "{ x : A & P & Q }" := (sigT2 (fun x:A => P) (fun x:A => Q)) : type_scope. Add Printing Let sig. @@ -107,6 +107,16 @@ Section Projections. End Projections. +(** [sigT] of a predicate is equivalent to [sig] *) + +Lemma sig_of_sigT : forall (A:Type) (P:A->Prop), sigT P -> sig P. +Proof. destruct 1 as (x,H); exists x; trivial. Defined. + +Lemma sigT_of_sig : forall (A:Type) (P:A->Prop), sig P -> sigT P. +Proof. destruct 1 as (x,H); exists x; trivial. Defined. + +Coercion sigT_of_sig : sig >-> sigT. +Coercion sig_of_sigT : sigT >-> sig. (** [sumbool] is a boolean type equipped with the justification of their value *) @@ -201,6 +211,7 @@ Proof. Qed. Hint Resolve left right inleft inright: core v62. +Hint Resolve exist exist2 existT existT2: core. (* Compatibility *) diff --git a/theories/Init/Tactics.v b/theories/Init/Tactics.v index ba210dd6..afe8297e 100644 --- a/theories/Init/Tactics.v +++ b/theories/Init/Tactics.v @@ -6,59 +6,143 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Tactics.v 9268 2006-10-24 12:56:16Z herbelin $ i*) +(*i $Id: Tactics.v 11072 2008-06-08 16:13:37Z herbelin $ i*) Require Import Notations. Require Import Logic. -(** Useful tactics *) +(** * Useful tactics *) + +(** A tactic for proof by contradiction. With contradict H, + - H:~A |- B gives |- A + - H:~A |- ~B gives H: B |- A + - H: A |- B gives |- ~A + - H: A |- ~B gives H: B |- ~A + - H:False leads to a resolved subgoal. + Moreover, negations may be in unfolded forms, + and A or B may live in Type *) + +Ltac contradict H := + let save tac H := let x:=fresh in intro x; tac H; rename x into H + in + let negpos H := case H; clear H + in + let negneg H := save negpos H + in + let pospos H := + let A := type of H in (elimtype False; revert H; try fold (~A)) + in + let posneg H := save pospos H + in + let neg H := match goal with + | |- (~_) => negneg H + | |- (_->False) => negneg H + | |- _ => negpos H + end in + let pos H := match goal with + | |- (~_) => posneg H + | |- (_->False) => posneg H + | |- _ => pospos H + end in + match type of H with + | (~_) => neg H + | (_->False) => neg H + | _ => (elim H;fail) || pos H + end. -(* A shorter name for generalize + clear, can be seen as an anti-intro *) +(* Transforming a negative goal [ H:~A |- ~B ] into a positive one [ B |- A ]*) -Tactic Notation "revert" ne_hyp_list(l) := generalize l; clear l. +Ltac swap H := + idtac "swap is OBSOLETE: use contradict instead."; + intro; apply H; clear H. -(* to contradict an hypothesis without copying its type. *) +(* To contradict an hypothesis without copying its type. *) -Ltac absurd_hyp h := - let T := type of h in +Ltac absurd_hyp H := + idtac "absurd_hyp is OBSOLETE: use contradict instead."; + let T := type of H in absurd T. -(* Transforming a negative goal [ H:~A |- ~B ] into a positive one [ B |- A ]*) +(* A useful complement to contradict. Here H:A while G allows to conclude ~A *) -Ltac swap H := intro; apply H; clear H. +Ltac false_hyp H G := + let T := type of H in absurd T; [ apply G | assumption ]. (* A case with no loss of information. *) Ltac case_eq x := generalize (refl_equal x); pattern x at -1; case x. -(* A tactic for easing the use of lemmas f_equal, f_equal2, ... *) - -Ltac f_equal := - let cg := try congruence in - let r := try reflexivity in - match goal with - | |- ?f ?a = ?f' ?a' => cut (a=a'); [cg|r] - | |- ?f ?a ?b = ?f' ?a' ?b' => - cut (b=b');[cut (a=a');[cg|r]|r] - | |- ?f ?a ?b ?c = ?f' ?a' ?b' ?c'=> - cut (c=c');[cut (b=b');[cut (a=a');[cg|r]|r]|r] - | |- ?f ?a ?b ?c ?d= ?f' ?a' ?b' ?c' ?d'=> - cut (d=d');[cut (c=c');[cut (b=b');[cut (a=a');[cg|r]|r]|r]|r] - | |- ?f ?a ?b ?c ?d ?e= ?f' ?a' ?b' ?c' ?d' ?e'=> - cut (e=e');[cut (d=d');[cut (c=c');[cut (b=b');[cut (a=a');[cg|r]|r]|r]|r]|r] - | _ => idtac - end. - (* Rewriting in all hypothesis several times everywhere *) Tactic Notation "rewrite_all" constr(eq) := repeat rewrite eq in *. Tactic Notation "rewrite_all" "<-" constr(eq) := repeat rewrite <- eq in *. -(* Keeping a copy of an expression *) - -Ltac remembertac x a := - let x := fresh x in - let H := fresh "Heq" x in - (set (x:=a) in *; assert (H: x=a) by reflexivity; clearbody x). - -Tactic Notation "remember" constr(c) "as" ident(x) := remembertac x c. +(** Tactics for applying equivalences. + +The following code provides tactics "apply -> t", "apply <- t", +"apply -> t in H" and "apply <- t in H". Here t is a term whose type +consists of nested dependent and nondependent products with an +equivalence A <-> B as the conclusion. The tactics with "->" in their +names apply A -> B while those with "<-" in the name apply B -> A. *) + +(* The idea of the tactics is to first provide a term in the context +whose type is the implication (in one of the directions), and then +apply it. The first idea is to produce a statement "forall ..., A -> +B" (call this type T) and then do "assert (H : T)" for a fresh H. +Thus, T can be proved from the original equivalence and then used to +perform the application. However, currently in Ltac it is difficult +to produce such T from the original formula. + +Therefore, we first pose the original equivalence as H. If the type of +H is a dependent product, we create an existential variable and apply +H to this variable. If the type of H has the form C -> D, then we do a +cut on C. Once we eliminate all products, we split (i.e., destruct) +the conjunction into two parts and apply the relevant one. *) + +Ltac find_equiv H := +let T := type of H in +lazymatch T with +| ?A -> ?B => + let H1 := fresh in + let H2 := fresh in + cut A; + [intro H1; pose proof (H H1) as H2; clear H H1; + rename H2 into H; find_equiv H | + clear H] +| forall x : ?t, _ => + let a := fresh "a" with + H1 := fresh "H" in + evar (a : t); pose proof (H a) as H1; unfold a in H1; + clear a; clear H; rename H1 into H; find_equiv H +| ?A <-> ?B => idtac +| _ => fail "The given statement does not seem to end with an equivalence" +end. + +Ltac bapply lemma todo := +let H := fresh in + pose proof lemma as H; + find_equiv H; [todo H; clear H | .. ]. + +Tactic Notation "apply" "->" constr(lemma) := +bapply lemma ltac:(fun H => destruct H as [H _]; apply H). + +Tactic Notation "apply" "<-" constr(lemma) := +bapply lemma ltac:(fun H => destruct H as [_ H]; apply H). + +Tactic Notation "apply" "->" constr(lemma) "in" ident(J) := +bapply lemma ltac:(fun H => destruct H as [H _]; apply H in J). + +Tactic Notation "apply" "<-" constr(lemma) "in" ident(J) := +bapply lemma ltac:(fun H => destruct H as [_ H]; apply H in J). + +(** A tactic simpler than auto that is useful for ending proofs "in one step" *) +Tactic Notation "now" tactic(t) := +t; +match goal with +| H : _ |- _ => solve [inversion H] +| _ => solve [trivial | reflexivity | symmetry; trivial | discriminate | split] +| _ => fail 1 "Cannot solve this goal" +end. + +(** A tactic to document or check what is proved at some point of a script *) +Ltac now_show c := change c. diff --git a/theories/Init/Wf.v b/theories/Init/Wf.v index 4e0f3745..f46b2b11 100644 --- a/theories/Init/Wf.v +++ b/theories/Init/Wf.v @@ -6,12 +6,11 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Wf.v 8988 2006-06-25 22:15:32Z letouzey $ i*) +(*i $Id: Wf.v 10712 2008-03-23 11:38:38Z herbelin $ i*) -(** This module proves the validity of - - well-founded recursion (also called course of values) +(** * This module proves the validity of + - well-founded recursion (also known as course of values) - well-founded induction - from a well-founded ordering on a given set *) Set Implicit Arguments. @@ -40,6 +39,7 @@ Section Well_founded. [let Acc_rec F = let rec wf x = F x wf in wf] *) Section AccRecType. + Variable P : A -> Type. Variable F : forall x:A, (forall y:A, R y x -> Acc y) -> (forall y:A, R y x -> P y) -> P x. @@ -51,17 +51,6 @@ Section Well_founded. Definition Acc_rec (P:A -> Set) := Acc_rect P. - (** A simplified version of [Acc_rect] *) - - Section AccIter. - Variable P : A -> Type. - Variable F : forall x:A, (forall y:A, R y x -> P y) -> P x. - - Fixpoint Acc_iter (x:A) (a:Acc x) {struct a} : P x := - F (fun (y:A) (h:R y x) => Acc_iter (Acc_inv a h)). - - End AccIter. - (** A relation is well-founded if every element is accessible *) Definition well_founded := forall a:A, Acc a. @@ -74,7 +63,7 @@ Section Well_founded. forall P:A -> Type, (forall x:A, (forall y:A, R y x -> P y) -> P x) -> forall a:A, P a. Proof. - intros; apply (Acc_iter P); auto. + intros; apply Acc_rect; auto. Defined. Theorem well_founded_induction : @@ -91,16 +80,26 @@ Section Well_founded. exact (fun P:A -> Prop => well_founded_induction_type P). Defined. -(** Building fixpoints *) +(** Well-founded fixpoints *) Section FixPoint. Variable P : A -> Type. Variable F : forall x:A, (forall y:A, R y x -> P y) -> P x. - Notation Fix_F := (Acc_iter P F) (only parsing). (* alias *) + Fixpoint Fix_F (x:A) (a:Acc x) {struct a} : P x := + F (fun (y:A) (h:R y x) => Fix_F (Acc_inv a h)). + + Scheme Acc_inv_dep := Induction for Acc Sort Prop. + + Lemma Fix_F_eq : + forall (x:A) (r:Acc x), + F (fun (y:A) (p:R y x) => Fix_F (x:=y) (Acc_inv r p)) = Fix_F (x:=x) r. + Proof. + destruct r using Acc_inv_dep; auto. + Qed. - Definition Fix (x:A) := Acc_iter P F (Rwf x). + Definition Fix (x:A) := Fix_F (Rwf x). (** Proof that [well_founded_induction] satisfies the fixpoint equation. It requires an extra property of the functional *) @@ -110,16 +109,7 @@ Section Well_founded. forall (x:A) (f g:forall y:A, R y x -> P y), (forall (y:A) (p:R y x), f y p = g y p) -> F f = F g. - Scheme Acc_inv_dep := Induction for Acc Sort Prop. - - Lemma Fix_F_eq : - forall (x:A) (r:Acc x), - F (fun (y:A) (p:R y x) => Fix_F y (Acc_inv r p)) = Fix_F x r. - Proof. - destruct r using Acc_inv_dep; auto. - Qed. - - Lemma Fix_F_inv : forall (x:A) (r s:Acc x), Fix_F x r = Fix_F x s. + Lemma Fix_F_inv : forall (x:A) (r s:Acc x), Fix_F r = Fix_F s. Proof. intro x; induction (Rwf x); intros. rewrite <- (Fix_F_eq r); rewrite <- (Fix_F_eq s); intros. @@ -129,7 +119,7 @@ Section Well_founded. Lemma Fix_eq : forall x:A, Fix x = F (fun (y:A) (p:R y x) => Fix y). Proof. intro x; unfold Fix in |- *. - rewrite <- (Fix_F_eq (x:=x)). + rewrite <- Fix_F_eq. apply F_ext; intros. apply Fix_F_inv. Qed. @@ -138,27 +128,29 @@ Section Well_founded. End Well_founded. -(** A recursor over pairs *) +(** Well-founded fixpoints over pairs *) Section Well_founded_2. - Variables A B : Set. + Variables A B : Type. Variable R : A * B -> A * B -> Prop. Variable P : A -> B -> Type. - Section Acc_iter_2. + Section FixPoint_2. + Variable F : forall (x:A) (x':B), (forall (y:A) (y':B), R (y, y') (x, x') -> P y y') -> P x x'. - Fixpoint Acc_iter_2 (x:A) (x':B) (a:Acc R (x, x')) {struct a} : + Fixpoint Fix_F_2 (x:A) (x':B) (a:Acc R (x, x')) {struct a} : P x x' := F (fun (y:A) (y':B) (h:R (y, y') (x, x')) => - Acc_iter_2 (x:=y) (x':=y') (Acc_inv a (y, y') h)). - End Acc_iter_2. + Fix_F_2 (x:=y) (x':=y') (Acc_inv a (y,y') h)). + + End FixPoint_2. Hypothesis Rwf : well_founded R. @@ -167,9 +159,10 @@ Section Well_founded_2. (forall (y:A) (y':B), R (y, y') (x, x') -> P y y') -> P x x') -> forall (a:A) (b:B), P a b. Proof. - intros; apply Acc_iter_2; auto. + intros; apply Fix_F_2; auto. Defined. End Well_founded_2. -Notation Fix_F := Acc_iter (only parsing). (* compatibility *) +Notation Acc_iter := Fix_F (only parsing). (* compatibility *) +Notation Acc_iter_2 := Fix_F_2 (only parsing). (* compatibility *) diff --git a/theories/IntMap/.depend b/theories/IntMap/.depend deleted file mode 100644 index 8c90ac99..00000000 --- a/theories/IntMap/.depend +++ /dev/null @@ -1,48 +0,0 @@ -Mapsubset.vo: Mapsubset.v Addr.vo Adist.vo Addec.vo Map.vo Fset.vo Mapaxioms.vo Mapiter.vo -Mapsubset.vi: Mapsubset.v Addr.vo Adist.vo Addec.vo Map.vo Fset.vo Mapaxioms.vo Mapiter.vo -Maplists.vo: Maplists.v Addr.vo Addec.vo Map.vo Fset.vo Mapaxioms.vo Mapsubset.vo Mapcard.vo Mapcanon.vo Mapc.vo Mapiter.vo Mapfold.vo -Maplists.vi: Maplists.v Addr.vo Addec.vo Map.vo Fset.vo Mapaxioms.vo Mapsubset.vo Mapcard.vo Mapcanon.vo Mapc.vo Mapiter.vo Mapfold.vo -Mapiter.vo: Mapiter.v Addr.vo Adist.vo Addec.vo Map.vo Mapaxioms.vo Fset.vo -Mapiter.vi: Mapiter.v Addr.vo Adist.vo Addec.vo Map.vo Mapaxioms.vo Fset.vo -Mapfold.vo: Mapfold.v Addr.vo Adist.vo Addec.vo Map.vo Fset.vo Mapaxioms.vo Mapiter.vo Lsort.vo Mapsubset.vo -Mapfold.vi: Mapfold.v Addr.vo Adist.vo Addec.vo Map.vo Fset.vo Mapaxioms.vo Mapiter.vo Lsort.vo Mapsubset.vo -Mapcard.vo: Mapcard.v Addr.vo Adist.vo Addec.vo Map.vo Mapaxioms.vo Mapiter.vo Fset.vo Mapsubset.vo Lsort.vo -Mapcard.vi: Mapcard.v Addr.vo Adist.vo Addec.vo Map.vo Mapaxioms.vo Mapiter.vo Fset.vo Mapsubset.vo Lsort.vo -Mapcanon.vo: Mapcanon.v Addr.vo Adist.vo Addec.vo Map.vo Mapaxioms.vo Mapiter.vo Fset.vo Lsort.vo Mapsubset.vo Mapcard.vo -Mapcanon.vi: Mapcanon.v Addr.vo Adist.vo Addec.vo Map.vo Mapaxioms.vo Mapiter.vo Fset.vo Lsort.vo Mapsubset.vo Mapcard.vo -Mapc.vo: Mapc.v Addr.vo Adist.vo Addec.vo Map.vo Mapaxioms.vo Fset.vo Mapiter.vo Mapsubset.vo Lsort.vo Mapcard.vo Mapcanon.vo -Mapc.vi: Mapc.v Addr.vo Adist.vo Addec.vo Map.vo Mapaxioms.vo Fset.vo Mapiter.vo Mapsubset.vo Lsort.vo Mapcard.vo Mapcanon.vo -Mapaxioms.vo: Mapaxioms.v Addr.vo Adist.vo Addec.vo Map.vo Fset.vo -Mapaxioms.vi: Mapaxioms.v Addr.vo Adist.vo Addec.vo Map.vo Fset.vo -Map.vo: Map.v Addr.vo Adist.vo Addec.vo -Map.vi: Map.v Addr.vo Adist.vo Addec.vo -Lsort.vo: Lsort.v Addr.vo Adist.vo Addec.vo Map.vo Mapiter.vo -Lsort.vi: Lsort.v Addr.vo Adist.vo Addec.vo Map.vo Mapiter.vo -Fset.vo: Fset.v Addr.vo Adist.vo Addec.vo Map.vo -Fset.vi: Fset.v Addr.vo Adist.vo Addec.vo Map.vo -Allmaps.vo: Allmaps.v Addr.vo Adist.vo Addec.vo Map.vo Fset.vo Mapaxioms.vo Mapiter.vo Mapsubset.vo Lsort.vo Mapfold.vo Mapcard.vo Mapcanon.vo Mapc.vo Maplists.vo Adalloc.vo -Allmaps.vi: Allmaps.v Addr.vo Adist.vo Addec.vo Map.vo Fset.vo Mapaxioms.vo Mapiter.vo Mapsubset.vo Lsort.vo Mapfold.vo Mapcard.vo Mapcanon.vo Mapc.vo Maplists.vo Adalloc.vo -Adist.vo: Adist.v Addr.vo -Adist.vi: Adist.v Addr.vo -Addr.vo: Addr.v -Addr.vi: Addr.v -Addec.vo: Addec.v Addr.vo -Addec.vi: Addec.v Addr.vo -Adalloc.vo: Adalloc.v Addr.vo Adist.vo Addec.vo Map.vo Fset.vo -Adalloc.vi: Adalloc.v Addr.vo Adist.vo Addec.vo Map.vo Fset.vo -Mapsubset.html: Mapsubset.v Addr.html Adist.html Addec.html Map.html Fset.html Mapaxioms.html Mapiter.html -Maplists.html: Maplists.v Addr.html Addec.html Map.html Fset.html Mapaxioms.html Mapsubset.html Mapcard.html Mapcanon.html Mapc.html Mapiter.html Mapfold.html -Mapiter.html: Mapiter.v Addr.html Adist.html Addec.html Map.html Mapaxioms.html Fset.html -Mapfold.html: Mapfold.v Addr.html Adist.html Addec.html Map.html Fset.html Mapaxioms.html Mapiter.html Lsort.html Mapsubset.html -Mapcard.html: Mapcard.v Addr.html Adist.html Addec.html Map.html Mapaxioms.html Mapiter.html Fset.html Mapsubset.html Lsort.html -Mapcanon.html: Mapcanon.v Addr.html Adist.html Addec.html Map.html Mapaxioms.html Mapiter.html Fset.html Lsort.html Mapsubset.html Mapcard.html -Mapc.html: Mapc.v Addr.html Adist.html Addec.html Map.html Mapaxioms.html Fset.html Mapiter.html Mapsubset.html Lsort.html Mapcard.html Mapcanon.html -Mapaxioms.html: Mapaxioms.v Addr.html Adist.html Addec.html Map.html Fset.html -Map.html: Map.v Addr.html Adist.html Addec.html -Lsort.html: Lsort.v Addr.html Adist.html Addec.html Map.html Mapiter.html -Fset.html: Fset.v Addr.html Adist.html Addec.html Map.html -Allmaps.html: Allmaps.v Addr.html Adist.html Addec.html Map.html Fset.html Mapaxioms.html Mapiter.html Mapsubset.html Lsort.html Mapfold.html Mapcard.html Mapcanon.html Mapc.html Maplists.html Adalloc.html -Adist.html: Adist.v Addr.html -Addr.html: Addr.v -Addec.html: Addec.v Addr.html -Adalloc.html: Adalloc.v Addr.html Adist.html Addec.html Map.html Fset.html diff --git a/theories/IntMap/Adalloc.v b/theories/IntMap/Adalloc.v deleted file mode 100644 index ca8e7eeb..00000000 --- a/theories/IntMap/Adalloc.v +++ /dev/null @@ -1,94 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* N0 - | M1 a _ => if Neqb a N0 then Npos 1 else N0 - | M2 m1 m2 => - Nmin (Ndouble (ad_alloc_opt m1)) - (Ndouble_plus_one (ad_alloc_opt m2)) - end. - - Lemma ad_alloc_opt_allocates_1 : - forall m:Map A, MapGet A m (ad_alloc_opt m) = None. - Proof. - induction m as [| a| m0 H m1 H0]. reflexivity. - simpl in |- *. elim (sumbool_of_bool (Neqb a N0)). intro H. rewrite H. - rewrite (Neqb_complete _ _ H). reflexivity. - intro H. rewrite H. rewrite H. reflexivity. - intros. change - (ad_alloc_opt (M2 A m0 m1)) with (Nmin (Ndouble (ad_alloc_opt m0)) - (Ndouble_plus_one (ad_alloc_opt m1))) - in |- *. - elim - (Nmin_choice (Ndouble (ad_alloc_opt m0)) - (Ndouble_plus_one (ad_alloc_opt m1))). - intro H1. rewrite H1. rewrite MapGet_M2_bit_0_0. rewrite Ndouble_div2. assumption. - apply Ndouble_bit0. - intro H1. rewrite H1. rewrite MapGet_M2_bit_0_1. rewrite Ndouble_plus_one_div2. assumption. - apply Ndouble_plus_one_bit0. - Qed. - - Lemma ad_alloc_opt_allocates : - forall m:Map A, in_dom A (ad_alloc_opt m) m = false. - Proof. - unfold in_dom in |- *. intro. rewrite (ad_alloc_opt_allocates_1 m). reflexivity. - Qed. - - (** Moreover, this is optimal: all addresses below [(ad_alloc_opt m)] - are in [dom m]: *) - - Lemma ad_alloc_opt_optimal_1 : - forall (m:Map A) (a:ad), - Nle (ad_alloc_opt m) a = false -> {y : A | MapGet A m a = Some y}. - Proof. - induction m as [| a y| m0 H m1 H0]. simpl in |- *. unfold Nle in |- *. simpl in |- *. intros. discriminate H. - simpl in |- *. intros b H. elim (sumbool_of_bool (Neqb a N0)). intro H0. rewrite H0 in H. - unfold Nle in H. cut (N0 = b). intro. split with y. rewrite <- H1. rewrite H0. reflexivity. - rewrite <- (N_of_nat_of_N b). - rewrite <- (le_n_O_eq _ (le_S_n _ _ (leb_complete_conv _ _ H))). reflexivity. - intro H0. rewrite H0 in H. discriminate H. - intros. simpl in H1. elim (Ndouble_or_double_plus_un a). intro H2. elim H2. intros a0 H3. - rewrite H3 in H1. elim (H _ (Nlt_double_mono_conv _ _ (Nmin_lt_3 _ _ _ H1))). intros y H4. - split with y. rewrite H3. rewrite MapGet_M2_bit_0_0. rewrite Ndouble_div2. assumption. - apply Ndouble_bit0. - intro H2. elim H2. intros a0 H3. rewrite H3 in H1. - elim (H0 _ (Nlt_double_plus_one_mono_conv _ _ (Nmin_lt_4 _ _ _ H1))). intros y H4. - split with y. rewrite H3. rewrite MapGet_M2_bit_0_1. rewrite Ndouble_plus_one_div2. - assumption. - apply Ndouble_plus_one_bit0. - Qed. - - Lemma ad_alloc_opt_optimal : - forall (m:Map A) (a:ad), - Nle (ad_alloc_opt m) a = false -> in_dom A a m = true. - Proof. - intros. unfold in_dom in |- *. elim (ad_alloc_opt_optimal_1 m a H). intros y H0. rewrite H0. - reflexivity. - Qed. - -End AdAlloc. diff --git a/theories/IntMap/Allmaps.v b/theories/IntMap/Allmaps.v deleted file mode 100644 index d5af8f80..00000000 --- a/theories/IntMap/Allmaps.v +++ /dev/null @@ -1,21 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* Map A := - match m with - | M0 => fun _:Map B => M0 A - | M1 a y => - fun m':Map B => match MapGet B m' a with - | None => M0 A - | _ => m - end - | M2 m1 m2 => - fun m':Map B => - match m' with - | M0 => M0 A - | M1 a' y' => - match MapGet A m a' with - | None => M0 A - | Some y => M1 A a' y - end - | M2 m'1 m'2 => - makeM2 A (MapDomRestrTo m1 m'1) (MapDomRestrTo m2 m'2) - end - end. - - Lemma MapDomRestrTo_semantics : - forall (m:Map A) (m':Map B), - eqm A (MapGet A (MapDomRestrTo m m')) - (fun a0:ad => - match MapGet B m' a0 with - | None => None - | _ => MapGet A m a0 - end). - Proof. - unfold eqm in |- *. simple induction m. simpl in |- *. intros. case (MapGet B m' a); trivial. - intros. simpl in |- *. elim (sumbool_of_bool (Neqb a a1)). intro H. rewrite H. - rewrite <- (Neqb_complete _ _ H). case (MapGet B m' a); try reflexivity. - intro. apply M1_semantics_1. - intro H. rewrite H. case (MapGet B m' a). - case (MapGet B m' a1); intros; exact (M1_semantics_2 A a a1 a0 H). - case (MapGet B m' a1); reflexivity. - simple induction m'. trivial. - unfold MapDomRestrTo in |- *. intros. elim (sumbool_of_bool (Neqb a a1)). - intro H1. - rewrite (Neqb_complete _ _ H1). rewrite (M1_semantics_1 B a1 a0). - case (MapGet A (M2 A m0 m1) a1); try reflexivity. - intro. apply M1_semantics_1. - intro H1. rewrite (M1_semantics_2 B a a1 a0 H1). case (MapGet A (M2 A m0 m1) a); try reflexivity. - intro. exact (M1_semantics_2 A a a1 a2 H1). - intros. change - (MapGet A (makeM2 A (MapDomRestrTo m0 m2) (MapDomRestrTo m1 m3)) a = - match MapGet B (M2 B m2 m3) a with - | None => None - | Some _ => MapGet A (M2 A m0 m1) a - end) in |- *. - rewrite (makeM2_M2 A (MapDomRestrTo m0 m2) (MapDomRestrTo m1 m3) a). - rewrite MapGet_M2_bit_0_if. rewrite (H0 m3 (Ndiv2 a)). rewrite (H m2 (Ndiv2 a)). - rewrite (MapGet_M2_bit_0_if B m2 m3 a). rewrite (MapGet_M2_bit_0_if A m0 m1 a). - case (Nbit0 a); reflexivity. - Qed. - - Fixpoint MapDomRestrBy (m:Map A) : Map B -> Map A := - match m with - | M0 => fun _:Map B => M0 A - | M1 a y => - fun m':Map B => match MapGet B m' a with - | None => m - | _ => M0 A - end - | M2 m1 m2 => - fun m':Map B => - match m' with - | M0 => m - | M1 a' y' => MapRemove A m a' - | M2 m'1 m'2 => - makeM2 A (MapDomRestrBy m1 m'1) (MapDomRestrBy m2 m'2) - end - end. - - Lemma MapDomRestrBy_semantics : - forall (m:Map A) (m':Map B), - eqm A (MapGet A (MapDomRestrBy m m')) - (fun a0:ad => - match MapGet B m' a0 with - | None => MapGet A m a0 - | _ => None - end). - Proof. - unfold eqm in |- *. simple induction m. simpl in |- *. intros. case (MapGet B m' a); trivial. - intros. simpl in |- *. elim (sumbool_of_bool (Neqb a a1)). intro H. rewrite H. - rewrite (Neqb_complete _ _ H). case (MapGet B m' a1). trivial. - apply M1_semantics_1. - intro H. rewrite H. case (MapGet B m' a). - case (MapGet B m' a1); trivial. - rewrite (M1_semantics_2 A a a1 a0 H). - case (MapGet B m' a1); trivial. - simple induction m'. trivial. - unfold MapDomRestrBy in |- *. intros. rewrite (MapRemove_semantics A (M2 A m0 m1) a a1). - elim (sumbool_of_bool (Neqb a a1)). intro H1. rewrite H1. rewrite (Neqb_complete _ _ H1). - rewrite (M1_semantics_1 B a1 a0). reflexivity. - intro H1. rewrite H1. rewrite (M1_semantics_2 B a a1 a0 H1). reflexivity. - intros. change - (MapGet A (makeM2 A (MapDomRestrBy m0 m2) (MapDomRestrBy m1 m3)) a = - match MapGet B (M2 B m2 m3) a with - | None => MapGet A (M2 A m0 m1) a - | Some _ => None - end) in |- *. - rewrite (makeM2_M2 A (MapDomRestrBy m0 m2) (MapDomRestrBy m1 m3) a). - rewrite MapGet_M2_bit_0_if. rewrite (H0 m3 (Ndiv2 a)). rewrite (H m2 (Ndiv2 a)). - rewrite (MapGet_M2_bit_0_if B m2 m3 a). rewrite (MapGet_M2_bit_0_if A m0 m1 a). - case (Nbit0 a); reflexivity. - Qed. - - Definition in_dom (a:ad) (m:Map A) := - match MapGet A m a with - | None => false - | _ => true - end. - - Lemma in_dom_M0 : forall a:ad, in_dom a (M0 A) = false. - Proof. - trivial. - Qed. - - Lemma in_dom_M1 : forall (a a0:ad) (y:A), in_dom a0 (M1 A a y) = Neqb a a0. - Proof. - unfold in_dom in |- *. intros. simpl in |- *. case (Neqb a a0); reflexivity. - Qed. - - Lemma in_dom_M1_1 : forall (a:ad) (y:A), in_dom a (M1 A a y) = true. - Proof. - intros. rewrite in_dom_M1. apply Neqb_correct. - Qed. - - Lemma in_dom_M1_2 : - forall (a a0:ad) (y:A), in_dom a0 (M1 A a y) = true -> a = a0. - Proof. - intros. apply (Neqb_complete a a0). rewrite (in_dom_M1 a a0 y) in H. assumption. - Qed. - - Lemma in_dom_some : - forall (m:Map A) (a:ad), - in_dom a m = true -> {y : A | MapGet A m a = Some y}. - Proof. - unfold in_dom in |- *. intros. elim (option_sum _ (MapGet A m a)). trivial. - intro H0. rewrite H0 in H. discriminate H. - Qed. - - Lemma in_dom_none : - forall (m:Map A) (a:ad), in_dom a m = false -> MapGet A m a = None. - Proof. - unfold in_dom in |- *. intros. elim (option_sum _ (MapGet A m a)). intro H0. elim H0. - intros y H1. rewrite H1 in H. discriminate H. - trivial. - Qed. - - Lemma in_dom_put : - forall (m:Map A) (a0:ad) (y0:A) (a:ad), - in_dom a (MapPut A m a0 y0) = orb (Neqb a a0) (in_dom a m). - Proof. - unfold in_dom in |- *. intros. rewrite (MapPut_semantics A m a0 y0 a). - elim (sumbool_of_bool (Neqb a a0)). intro H. rewrite H. rewrite (Neqb_comm a a0) in H. - rewrite H. rewrite orb_true_b. reflexivity. - intro H. rewrite H. rewrite (Neqb_comm a a0) in H. rewrite H. rewrite orb_false_b. - reflexivity. - Qed. - - Lemma in_dom_put_behind : - forall (m:Map A) (a0:ad) (y0:A) (a:ad), - in_dom a (MapPut_behind A m a0 y0) = orb (Neqb a a0) (in_dom a m). - Proof. - unfold in_dom in |- *. intros. rewrite (MapPut_behind_semantics A m a0 y0 a). - elim (sumbool_of_bool (Neqb a a0)). intro H. rewrite H. rewrite (Neqb_comm a a0) in H. - rewrite H. case (MapGet A m a); reflexivity. - intro H. rewrite H. rewrite (Neqb_comm a a0) in H. rewrite H. case (MapGet A m a); trivial. - Qed. - - Lemma in_dom_remove : - forall (m:Map A) (a0 a:ad), - in_dom a (MapRemove A m a0) = andb (negb (Neqb a a0)) (in_dom a m). - Proof. - unfold in_dom in |- *. intros. rewrite (MapRemove_semantics A m a0 a). - elim (sumbool_of_bool (Neqb a a0)). intro H. rewrite H. rewrite (Neqb_comm a a0) in H. - rewrite H. reflexivity. - intro H. rewrite H. rewrite (Neqb_comm a a0) in H. rewrite H. - case (MapGet A m a); reflexivity. - Qed. - - Lemma in_dom_merge : - forall (m m':Map A) (a:ad), - in_dom a (MapMerge A m m') = orb (in_dom a m) (in_dom a m'). - Proof. - unfold in_dom in |- *. intros. rewrite (MapMerge_semantics A m m' a). - elim (option_sum A (MapGet A m' a)). intro H. elim H. intros y H0. rewrite H0. - case (MapGet A m a); reflexivity. - intro H. rewrite H. rewrite orb_b_false. reflexivity. - Qed. - - Lemma in_dom_delta : - forall (m m':Map A) (a:ad), - in_dom a (MapDelta A m m') = xorb (in_dom a m) (in_dom a m'). - Proof. - unfold in_dom in |- *. intros. rewrite (MapDelta_semantics A m m' a). - elim (option_sum A (MapGet A m' a)). intro H. elim H. intros y H0. rewrite H0. - case (MapGet A m a); reflexivity. - intro H. rewrite H. case (MapGet A m a); reflexivity. - Qed. - -End Dom. - -Section InDom. - - Variables A B : Set. - - Lemma in_dom_restrto : - forall (m:Map A) (m':Map B) (a:ad), - in_dom A a (MapDomRestrTo A B m m') = - andb (in_dom A a m) (in_dom B a m'). - Proof. - unfold in_dom in |- *. intros. rewrite (MapDomRestrTo_semantics A B m m' a). - elim (option_sum B (MapGet B m' a)). intro H. elim H. intros y H0. rewrite H0. - rewrite andb_b_true. reflexivity. - intro H. rewrite H. rewrite andb_b_false. reflexivity. - Qed. - - Lemma in_dom_restrby : - forall (m:Map A) (m':Map B) (a:ad), - in_dom A a (MapDomRestrBy A B m m') = - andb (in_dom A a m) (negb (in_dom B a m')). - Proof. - unfold in_dom in |- *. intros. rewrite (MapDomRestrBy_semantics A B m m' a). - elim (option_sum B (MapGet B m' a)). intro H. elim H. intros y H0. rewrite H0. - unfold negb in |- *. rewrite andb_b_false. reflexivity. - intro H. rewrite H. unfold negb in |- *. rewrite andb_b_true. reflexivity. - Qed. - -End InDom. - -Definition FSet := Map unit. - -Section FSetDefs. - - Variable A : Set. - - Definition in_FSet : ad -> FSet -> bool := in_dom unit. - - Fixpoint MapDom (m:Map A) : FSet := - match m with - | M0 => M0 unit - | M1 a _ => M1 unit a tt - | M2 m m' => M2 unit (MapDom m) (MapDom m') - end. - - Lemma MapDom_semantics_1 : - forall (m:Map A) (a:ad) (y:A), - MapGet A m a = Some y -> in_FSet a (MapDom m) = true. - Proof. - simple induction m. intros. discriminate H. - unfold MapDom in |- *. unfold in_FSet in |- *. unfold in_dom in |- *. unfold MapGet in |- *. intros a y a0 y0. - case (Neqb a a0). trivial. - intro. discriminate H. - intros m0 H m1 H0 a y. rewrite (MapGet_M2_bit_0_if A m0 m1 a). simpl in |- *. unfold in_FSet in |- *. - unfold in_dom in |- *. rewrite (MapGet_M2_bit_0_if unit (MapDom m0) (MapDom m1) a). - case (Nbit0 a). unfold in_FSet, in_dom in H0. intro. apply H0 with (y := y). assumption. - unfold in_FSet, in_dom in H. intro. apply H with (y := y). assumption. - Qed. - - Lemma MapDom_semantics_2 : - forall (m:Map A) (a:ad), - in_FSet a (MapDom m) = true -> {y : A | MapGet A m a = Some y}. - Proof. - simple induction m. intros. discriminate H. - unfold MapDom in |- *. unfold in_FSet in |- *. unfold in_dom in |- *. unfold MapGet in |- *. intros a y a0. case (Neqb a a0). - intro. split with y. reflexivity. - intro. discriminate H. - intros m0 H m1 H0 a. rewrite (MapGet_M2_bit_0_if A m0 m1 a). simpl in |- *. unfold in_FSet in |- *. - unfold in_dom in |- *. rewrite (MapGet_M2_bit_0_if unit (MapDom m0) (MapDom m1) a). - case (Nbit0 a). unfold in_FSet, in_dom in H0. intro. apply H0. assumption. - unfold in_FSet, in_dom in H. intro. apply H. assumption. - Qed. - - Lemma MapDom_semantics_3 : - forall (m:Map A) (a:ad), - MapGet A m a = None -> in_FSet a (MapDom m) = false. - Proof. - intros. elim (sumbool_of_bool (in_FSet a (MapDom m))). intro H0. - elim (MapDom_semantics_2 m a H0). intros y H1. rewrite H in H1. discriminate H1. - trivial. - Qed. - - Lemma MapDom_semantics_4 : - forall (m:Map A) (a:ad), - in_FSet a (MapDom m) = false -> MapGet A m a = None. - Proof. - intros. elim (option_sum A (MapGet A m a)). intro H0. elim H0. intros y H1. - rewrite (MapDom_semantics_1 m a y H1) in H. discriminate H. - trivial. - Qed. - - Lemma MapDom_Dom : - forall (m:Map A) (a:ad), in_dom A a m = in_FSet a (MapDom m). - Proof. - intros. elim (sumbool_of_bool (in_FSet a (MapDom m))). intro H. - elim (MapDom_semantics_2 m a H). intros y H0. rewrite H. unfold in_dom in |- *. rewrite H0. - reflexivity. - intro H. rewrite H. unfold in_dom in |- *. rewrite (MapDom_semantics_4 m a H). reflexivity. - Qed. - - Definition FSetUnion (s s':FSet) : FSet := MapMerge unit s s'. - - Lemma in_FSet_union : - forall (s s':FSet) (a:ad), - in_FSet a (FSetUnion s s') = orb (in_FSet a s) (in_FSet a s'). - Proof. - exact (in_dom_merge unit). - Qed. - - Definition FSetInter (s s':FSet) : FSet := MapDomRestrTo unit unit s s'. - - Lemma in_FSet_inter : - forall (s s':FSet) (a:ad), - in_FSet a (FSetInter s s') = andb (in_FSet a s) (in_FSet a s'). - Proof. - exact (in_dom_restrto unit unit). - Qed. - - Definition FSetDiff (s s':FSet) : FSet := MapDomRestrBy unit unit s s'. - - Lemma in_FSet_diff : - forall (s s':FSet) (a:ad), - in_FSet a (FSetDiff s s') = andb (in_FSet a s) (negb (in_FSet a s')). - Proof. - exact (in_dom_restrby unit unit). - Qed. - - Definition FSetDelta (s s':FSet) : FSet := MapDelta unit s s'. - - Lemma in_FSet_delta : - forall (s s':FSet) (a:ad), - in_FSet a (FSetDelta s s') = xorb (in_FSet a s) (in_FSet a s'). - Proof. - exact (in_dom_delta unit). - Qed. - -End FSetDefs. - -Lemma FSet_Dom : forall s:FSet, MapDom unit s = s. -Proof. - simple induction s. trivial. - simpl in |- *. intros a t. elim t. reflexivity. - intros. simpl in |- *. rewrite H. rewrite H0. reflexivity. -Qed. \ No newline at end of file diff --git a/theories/IntMap/Lsort.v b/theories/IntMap/Lsort.v deleted file mode 100644 index c8d793a1..00000000 --- a/theories/IntMap/Lsort.v +++ /dev/null @@ -1,413 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* true - | (a, _) :: l' => - match l' with - | nil => true - | (a', y') :: l'' => andb (Nless a a') (alist_sorted l') - end - end. - - Fixpoint alist_nth_ad (n:nat) (l:alist A) {struct l} : ad := - match l with - | nil => N0 (* dummy *) - | (a, y) :: l' => match n with - | O => a - | S n' => alist_nth_ad n' l' - end - end. - - Definition alist_sorted_1 (l:alist A) := - forall n:nat, - S (S n) <= length l -> - Nless (alist_nth_ad n l) (alist_nth_ad (S n) l) = true. - - Lemma alist_sorted_imp_1 : - forall l:alist A, alist_sorted l = true -> alist_sorted_1 l. - Proof. - unfold alist_sorted_1 in |- *. simple induction l. intros. elim (le_Sn_O (S n) H0). - intro r. elim r. intros a y. simple induction l0. intros. simpl in H1. - elim (le_Sn_O n (le_S_n (S n) 0 H1)). - intro r0. elim r0. intros a0 y0. simple induction n. intros. simpl in |- *. simpl in H1. - exact (proj1 (andb_prop _ _ H1)). - intros. change - (Nless (alist_nth_ad n0 ((a0, y0) :: l1)) - (alist_nth_ad (S n0) ((a0, y0) :: l1)) = true) - in |- *. - apply H0. exact (proj2 (andb_prop _ _ H1)). - apply le_S_n. exact H3. - Qed. - - Definition alist_sorted_2 (l:alist A) := - forall m n:nat, - m < n -> - S n <= length l -> Nless (alist_nth_ad m l) (alist_nth_ad n l) = true. - - Lemma alist_sorted_1_imp_2 : - forall l:alist A, alist_sorted_1 l -> alist_sorted_2 l. - Proof. - unfold alist_sorted_1, alist_sorted_2, lt in |- *. intros l H m n H0. elim H0. exact (H m). - intros. apply Nless_trans with (a' := alist_nth_ad m0 l). apply H2. apply le_Sn_le. - assumption. - apply H. assumption. - Qed. - - Lemma alist_sorted_2_imp : - forall l:alist A, alist_sorted_2 l -> alist_sorted l = true. - Proof. - unfold alist_sorted_2, lt in |- *. simple induction l. trivial. - intro r. elim r. intros a y. simple induction l0. trivial. - intro r0. elim r0. intros a0 y0. intros. - change (andb (Nless a a0) (alist_sorted ((a0, y0) :: l1)) = true) - in |- *. - apply andb_true_intro. split. apply (H1 0 1). apply le_n. - simpl in |- *. apply le_n_S. apply le_n_S. apply le_O_n. - apply H0. intros. apply (H1 (S m) (S n)). apply le_n_S. assumption. - exact (le_n_S _ _ H3). - Qed. - - Lemma app_length : - forall (C:Set) (l l':list C), length (l ++ l') = length l + length l'. - Proof. - simple induction l. trivial. - intros. simpl in |- *. rewrite (H l'). reflexivity. - Qed. - - Lemma aapp_length : - forall l l':alist A, length (aapp A l l') = length l + length l'. - Proof. - exact (app_length (ad * A)). - Qed. - - Lemma alist_nth_ad_aapp_1 : - forall (l l':alist A) (n:nat), - S n <= length l -> alist_nth_ad n (aapp A l l') = alist_nth_ad n l. - Proof. - simple induction l. intros. elim (le_Sn_O n H). - intro r. elim r. intros a y l' H l''. simple induction n. trivial. - intros. simpl in |- *. apply H. apply le_S_n. exact H1. - Qed. - - Lemma alist_nth_ad_aapp_2 : - forall (l l':alist A) (n:nat), - S n <= length l' -> - alist_nth_ad (length l + n) (aapp A l l') = alist_nth_ad n l'. - Proof. - simple induction l. trivial. - intro r. elim r. intros a y l' H l'' n H0. simpl in |- *. apply H. exact H0. - Qed. - - Lemma interval_split : - forall p q n:nat, - S n <= p + q -> {n' : nat | S n' <= q /\ n = p + n'} + {S n <= p}. - Proof. - simple induction p. simpl in |- *. intros. left. split with n. split; [ assumption | reflexivity ]. - intros p' H q. simple induction n. intros. right. apply le_n_S. apply le_O_n. - intros. elim (H _ _ (le_S_n _ _ H1)). intro H2. left. elim H2. intros n' H3. - elim H3. intros H4 H5. split with n'. split; [ assumption | rewrite H5; reflexivity ]. - intro H2. right. apply le_n_S. assumption. - Qed. - - Lemma alist_conc_sorted : - forall l l':alist A, - alist_sorted_2 l -> - alist_sorted_2 l' -> - (forall n n':nat, - S n <= length l -> - S n' <= length l' -> - Nless (alist_nth_ad n l) (alist_nth_ad n' l') = true) -> - alist_sorted_2 (aapp A l l'). - Proof. - unfold alist_sorted_2, lt in |- *. intros. rewrite (aapp_length l l') in H3. - elim - (interval_split (length l) (length l') m - (le_trans _ _ _ (le_n_S _ _ (lt_le_weak m n H2)) H3)). - intro H4. elim H4. intros m' H5. elim H5. intros. rewrite H7. - rewrite (alist_nth_ad_aapp_2 l l' m' H6). elim (interval_split (length l) (length l') n H3). - intro H8. elim H8. intros n' H9. elim H9. intros. rewrite H11. - rewrite (alist_nth_ad_aapp_2 l l' n' H10). apply H0. rewrite H7 in H2. rewrite H11 in H2. - change (S (length l) + m' <= length l + n') in H2. - rewrite (plus_Snm_nSm (length l) m') in H2. exact ((fun p n m:nat => plus_le_reg_l n m p) (length l) (S m') n' H2). - exact H10. - intro H8. rewrite H7 in H2. cut (S (length l) <= length l). intros. elim (le_Sn_n _ H9). - apply le_trans with (m := S n). apply le_n_S. apply le_trans with (m := S (length l + m')). - apply le_trans with (m := length l + m'). apply le_plus_l. - apply le_n_Sn. - exact H2. - exact H8. - intro H4. rewrite (alist_nth_ad_aapp_1 l l' m H4). - elim (interval_split (length l) (length l') n H3). intro H5. elim H5. intros n' H6. elim H6. - intros. rewrite H8. rewrite (alist_nth_ad_aapp_2 l l' n' H7). exact (H1 m n' H4 H7). - intro H5. rewrite (alist_nth_ad_aapp_1 l l' n H5). exact (H m n H2 H5). - Qed. - - Lemma alist_nth_ad_semantics : - forall (l:alist A) (n:nat), - S n <= length l -> - {y : A | alist_semantics A l (alist_nth_ad n l) = Some y}. - Proof. - simple induction l. intros. elim (le_Sn_O _ H). - intro r. elim r. intros a y l0 H. simple induction n. simpl in |- *. intro. split with y. - rewrite (Neqb_correct a). reflexivity. - intros. elim (H _ (le_S_n _ _ H1)). intros y0 H2. - elim (sumbool_of_bool (Neqb a (alist_nth_ad n0 l0))). intro H3. split with y. - rewrite (Neqb_complete _ _ H3). simpl in |- *. rewrite (Neqb_correct (alist_nth_ad n0 l0)). - reflexivity. - intro H3. split with y0. simpl in |- *. rewrite H3. assumption. - Qed. - - Lemma alist_of_Map_nth_ad : - forall (m:Map A) (pf:ad -> ad) (l:alist A), - l = - MapFold1 A (alist A) (anil A) (aapp A) - (fun (a0:ad) (y:A) => acons A (a0, y) (anil A)) pf m -> - forall n:nat, S n <= length l -> {a' : ad | alist_nth_ad n l = pf a'}. - Proof. - intros. elim (alist_nth_ad_semantics l n H0). intros y H1. - apply (alist_of_Map_semantics_1_1 A m pf (alist_nth_ad n l) y). - rewrite <- H. assumption. - Qed. - - Definition ad_monotonic (pf:ad -> ad) := - forall a a':ad, Nless a a' = true -> Nless (pf a) (pf a') = true. - - Lemma Ndouble_monotonic : ad_monotonic Ndouble. - Proof. - unfold ad_monotonic in |- *. intros. rewrite Nless_def_1. assumption. - Qed. - - Lemma Ndouble_plus_one_monotonic : ad_monotonic Ndouble_plus_one. - Proof. - unfold ad_monotonic in |- *. intros. rewrite Nless_def_2. assumption. - Qed. - - Lemma ad_comp_monotonic : - forall pf pf':ad -> ad, - ad_monotonic pf -> - ad_monotonic pf' -> ad_monotonic (fun a0:ad => pf (pf' a0)). - Proof. - unfold ad_monotonic in |- *. intros. apply H. apply H0. exact H1. - Qed. - - Lemma ad_comp_double_monotonic : - forall pf:ad -> ad, - ad_monotonic pf -> ad_monotonic (fun a0:ad => pf (Ndouble a0)). - Proof. - intros. apply ad_comp_monotonic. assumption. - exact Ndouble_monotonic. - Qed. - - Lemma ad_comp_double_plus_un_monotonic : - forall pf:ad -> ad, - ad_monotonic pf -> ad_monotonic (fun a0:ad => pf (Ndouble_plus_one a0)). - Proof. - intros. apply ad_comp_monotonic. assumption. - exact Ndouble_plus_one_monotonic. - Qed. - - Lemma alist_of_Map_sorts_1 : - forall (m:Map A) (pf:ad -> ad), - ad_monotonic pf -> - alist_sorted_2 - (MapFold1 A (alist A) (anil A) (aapp A) - (fun (a:ad) (y:A) => acons A (a, y) (anil A)) pf m). - Proof. - simple induction m. simpl in |- *. intros. apply alist_sorted_1_imp_2. apply alist_sorted_imp_1. reflexivity. - intros. simpl in |- *. apply alist_sorted_1_imp_2. apply alist_sorted_imp_1. reflexivity. - intros. simpl in |- *. apply alist_conc_sorted. - exact - (H (fun a0:ad => pf (Ndouble a0)) (ad_comp_double_monotonic pf H1)). - exact - (H0 (fun a0:ad => pf (Ndouble_plus_one a0)) - (ad_comp_double_plus_un_monotonic pf H1)). - intros. elim - (alist_of_Map_nth_ad m0 (fun a0:ad => pf (Ndouble a0)) - (MapFold1 A (alist A) (anil A) (aapp A) - (fun (a0:ad) (y:A) => acons A (a0, y) (anil A)) - (fun a0:ad => pf (Ndouble a0)) m0) (refl_equal _) n H2). - intros a H4. rewrite H4. elim - (alist_of_Map_nth_ad m1 (fun a0:ad => pf (Ndouble_plus_one a0)) - (MapFold1 A (alist A) (anil A) (aapp A) - (fun (a0:ad) (y:A) => acons A (a0, y) (anil A)) - (fun a0:ad => pf (Ndouble_plus_one a0)) m1) ( - refl_equal _) n' H3). - intros a' H5. rewrite H5. unfold ad_monotonic in H1. apply H1. apply Nless_def_3. - Qed. - - Lemma alist_of_Map_sorts : - forall m:Map A, alist_sorted (alist_of_Map A m) = true. - Proof. - intro. apply alist_sorted_2_imp. - exact - (alist_of_Map_sorts_1 m (fun a0:ad => a0) - (fun (a a':ad) (p:Nless a a' = true) => p)). - Qed. - - Lemma alist_of_Map_sorts1 : - forall m:Map A, alist_sorted_1 (alist_of_Map A m). - Proof. - intro. apply alist_sorted_imp_1. apply alist_of_Map_sorts. - Qed. - - Lemma alist_of_Map_sorts2 : - forall m:Map A, alist_sorted_2 (alist_of_Map A m). - Proof. - intro. apply alist_sorted_1_imp_2. apply alist_of_Map_sorts1. - Qed. - - Lemma alist_too_low : - forall (l:alist A) (a a':ad) (y:A), - Nless a a' = true -> - alist_sorted_2 ((a', y) :: l) -> - alist_semantics A ((a', y) :: l) a = None. - Proof. - simple induction l. intros. simpl in |- *. elim (sumbool_of_bool (Neqb a' a)). intro H1. - rewrite (Neqb_complete _ _ H1) in H. rewrite (Nless_not_refl a) in H. discriminate H. - intro H1. rewrite H1. reflexivity. - intro r. elim r. intros a y l0 H a0 a1 y0 H0 H1. - change - (match Neqb a1 a0 with - | true => Some y0 - | false => alist_semantics A ((a, y) :: l0) a0 - end = None) in |- *. - elim (sumbool_of_bool (Neqb a1 a0)). intro H2. rewrite (Neqb_complete _ _ H2) in H0. - rewrite (Nless_not_refl a0) in H0. discriminate H0. - intro H2. rewrite H2. apply H. apply Nless_trans with (a' := a1). assumption. - unfold alist_sorted_2 in H1. apply (H1 0 1). apply lt_n_Sn. - simpl in |- *. apply le_n_S. apply le_n_S. apply le_O_n. - apply alist_sorted_1_imp_2. apply alist_sorted_imp_1. - cut (alist_sorted ((a1, y0) :: (a, y) :: l0) = true). intro H3. - exact (proj2 (andb_prop _ _ H3)). - apply alist_sorted_2_imp. assumption. - Qed. - - Lemma alist_semantics_nth_ad : - forall (l:alist A) (a:ad) (y:A), - alist_semantics A l a = Some y -> - {n : nat | S n <= length l /\ alist_nth_ad n l = a}. - Proof. - simple induction l. intros. discriminate H. - intro r. elim r. intros a y l0 H a0 y0 H0. simpl in H0. elim (sumbool_of_bool (Neqb a a0)). - intro H1. rewrite H1 in H0. split with 0. split. simpl in |- *. apply le_n_S. apply le_O_n. - simpl in |- *. exact (Neqb_complete _ _ H1). - intro H1. rewrite H1 in H0. elim (H a0 y0 H0). intros n' H2. split with (S n'). split. - simpl in |- *. apply le_n_S. exact (proj1 H2). - exact (proj2 H2). - Qed. - - Lemma alist_semantics_tail : - forall (l:alist A) (a:ad) (y:A), - alist_sorted_2 ((a, y) :: l) -> - eqm A (alist_semantics A l) - (fun a0:ad => - if Neqb a a0 then None else alist_semantics A ((a, y) :: l) a0). - Proof. - unfold eqm in |- *. intros. elim (sumbool_of_bool (Neqb a a0)). intro H0. rewrite H0. - rewrite <- (Neqb_complete _ _ H0). unfold alist_sorted_2 in H. - elim (option_sum A (alist_semantics A l a)). intro H1. elim H1. intros y0 H2. - elim (alist_semantics_nth_ad l a y0 H2). intros n H3. elim H3. intros. - cut - (Nless (alist_nth_ad 0 ((a, y) :: l)) - (alist_nth_ad (S n) ((a, y) :: l)) = true). - intro. simpl in H6. rewrite H5 in H6. rewrite (Nless_not_refl a) in H6. discriminate H6. - apply H. apply lt_O_Sn. - simpl in |- *. apply le_n_S. assumption. - trivial. - intro H0. simpl in |- *. rewrite H0. reflexivity. - Qed. - - Lemma alist_semantics_same_tail : - forall (l l':alist A) (a:ad) (y:A), - alist_sorted_2 ((a, y) :: l) -> - alist_sorted_2 ((a, y) :: l') -> - eqm A (alist_semantics A ((a, y) :: l)) - (alist_semantics A ((a, y) :: l')) -> - eqm A (alist_semantics A l) (alist_semantics A l'). - Proof. - unfold eqm in |- *. intros. rewrite (alist_semantics_tail _ _ _ H a0). - rewrite (alist_semantics_tail _ _ _ H0 a0). case (Neqb a a0). reflexivity. - exact (H1 a0). - Qed. - - Lemma alist_sorted_tail : - forall (l:alist A) (a:ad) (y:A), - alist_sorted_2 ((a, y) :: l) -> alist_sorted_2 l. - Proof. - unfold alist_sorted_2 in |- *. intros. apply (H (S m) (S n)). apply lt_n_S. assumption. - simpl in |- *. apply le_n_S. assumption. - Qed. - - Lemma alist_canonical : - forall l l':alist A, - eqm A (alist_semantics A l) (alist_semantics A l') -> - alist_sorted_2 l -> alist_sorted_2 l' -> l = l'. - Proof. - unfold eqm in |- *. simple induction l. simple induction l'. trivial. - intro r. elim r. intros a y l0 H H0 H1 H2. simpl in H0. - cut - (None = - match Neqb a a with - | true => Some y - | false => alist_semantics A l0 a - end). - rewrite (Neqb_correct a). intro. discriminate H3. - exact (H0 a). - intro r. elim r. intros a y l0 H. simple induction l'. intros. simpl in H0. - cut - (match Neqb a a with - | true => Some y - | false => alist_semantics A l0 a - end = None). - rewrite (Neqb_correct a). intro. discriminate H3. - exact (H0 a). - intro r'. elim r'. intros a' y' l'0 H0 H1 H2 H3. elim (Nless_total a a'). intro H4. - elim H4. intro H5. - cut - (alist_semantics A ((a, y) :: l0) a = - alist_semantics A ((a', y') :: l'0) a). - intro. rewrite (alist_too_low l'0 a a' y' H5 H3) in H6. simpl in H6. - rewrite (Neqb_correct a) in H6. discriminate H6. - exact (H1 a). - intro H5. cut - (alist_semantics A ((a, y) :: l0) a' = - alist_semantics A ((a', y') :: l'0) a'). - intro. rewrite (alist_too_low l0 a' a y H5 H2) in H6. simpl in H6. - rewrite (Neqb_correct a') in H6. discriminate H6. - exact (H1 a'). - intro H4. rewrite H4. - cut - (alist_semantics A ((a, y) :: l0) a = - alist_semantics A ((a', y') :: l'0) a). - intro. simpl in H5. rewrite H4 in H5. rewrite (Neqb_correct a') in H5. inversion H5. - rewrite H4 in H1. rewrite H7 in H1. cut (l0 = l'0). intro. rewrite H6. reflexivity. - apply H. rewrite H4 in H2. rewrite H7 in H2. - exact (alist_semantics_same_tail l0 l'0 a' y' H2 H3 H1). - exact (alist_sorted_tail _ _ _ H2). - exact (alist_sorted_tail _ _ _ H3). - exact (H1 a). - Qed. - -End LSort. \ No newline at end of file diff --git a/theories/IntMap/Map.v b/theories/IntMap/Map.v deleted file mode 100644 index 2be6de04..00000000 --- a/theories/IntMap/Map.v +++ /dev/null @@ -1,869 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* A -> Map - | M2 : Map -> Map -> Map. - - Lemma option_sum : forall o:option A, {y : A | o = Some y} + {o = None}. - Proof. - simple induction o. - left. split with a. reflexivity. - right. reflexivity. - Qed. - - (** The semantics of maps is given by the function [MapGet]. - The semantics of a map [m] is a partial, finite function from - [ad] to [A]: *) - - Fixpoint MapGet (m:Map) : ad -> option A := - match m with - | M0 => fun a:ad => None - | M1 x y => fun a:ad => if Neqb x a then Some y else None - | M2 m1 m2 => - fun a:ad => - match a with - | N0 => MapGet m1 N0 - | Npos xH => MapGet m2 N0 - | Npos (xO p) => MapGet m1 (Npos p) - | Npos (xI p) => MapGet m2 (Npos p) - end - end. - - Definition newMap := M0. - - Definition MapSingleton := M1. - - Definition eqm (g g':ad -> option A) := forall a:ad, g a = g' a. - - Lemma newMap_semantics : eqm (MapGet newMap) (fun a:ad => None). - Proof. - simpl in |- *. unfold eqm in |- *. trivial. - Qed. - - Lemma MapSingleton_semantics : - forall (a:ad) (y:A), - eqm (MapGet (MapSingleton a y)) - (fun a':ad => if Neqb a a' then Some y else None). - Proof. - simpl in |- *. unfold eqm in |- *. trivial. - Qed. - - Lemma M1_semantics_1 : forall (a:ad) (y:A), MapGet (M1 a y) a = Some y. - Proof. - unfold MapGet in |- *. intros. rewrite (Neqb_correct a). reflexivity. - Qed. - - Lemma M1_semantics_2 : - forall (a a':ad) (y:A), Neqb a a' = false -> MapGet (M1 a y) a' = None. - Proof. - intros. simpl in |- *. rewrite H. reflexivity. - Qed. - - Lemma Map2_semantics_1 : - forall m m':Map, - eqm (MapGet m) (fun a:ad => MapGet (M2 m m') (Ndouble a)). - Proof. - unfold eqm in |- *. simple induction a; trivial. - Qed. - - Lemma Map2_semantics_1_eq : - forall (m m':Map) (f:ad -> option A), - eqm (MapGet (M2 m m')) f -> eqm (MapGet m) (fun a:ad => f (Ndouble a)). - Proof. - unfold eqm in |- *. - intros. - rewrite <- (H (Ndouble a)). - exact (Map2_semantics_1 m m' a). - Qed. - - Lemma Map2_semantics_2 : - forall m m':Map, - eqm (MapGet m') (fun a:ad => MapGet (M2 m m') (Ndouble_plus_one a)). - Proof. - unfold eqm in |- *. simple induction a; trivial. - Qed. - - Lemma Map2_semantics_2_eq : - forall (m m':Map) (f:ad -> option A), - eqm (MapGet (M2 m m')) f -> - eqm (MapGet m') (fun a:ad => f (Ndouble_plus_one a)). - Proof. - unfold eqm in |- *. - intros. - rewrite <- (H (Ndouble_plus_one a)). - exact (Map2_semantics_2 m m' a). - Qed. - - Lemma MapGet_M2_bit_0_0 : - forall a:ad, - Nbit0 a = false -> - forall m m':Map, MapGet (M2 m m') a = MapGet m (Ndiv2 a). - Proof. - simple induction a; trivial. simple induction p. intros. discriminate H0. - trivial. - intros. discriminate H. - Qed. - - Lemma MapGet_M2_bit_0_1 : - forall a:ad, - Nbit0 a = true -> - forall m m':Map, MapGet (M2 m m') a = MapGet m' (Ndiv2 a). - Proof. - simple induction a. intros. discriminate H. - simple induction p. trivial. - intros. discriminate H0. - trivial. - Qed. - - Lemma MapGet_M2_bit_0_if : - forall (m m':Map) (a:ad), - MapGet (M2 m m') a = - (if Nbit0 a then MapGet m' (Ndiv2 a) else MapGet m (Ndiv2 a)). - Proof. - intros. elim (sumbool_of_bool (Nbit0 a)). intro H. rewrite H. - apply MapGet_M2_bit_0_1; assumption. - intro H. rewrite H. apply MapGet_M2_bit_0_0; assumption. - Qed. - - Lemma MapGet_M2_bit_0 : - forall (m m' m'':Map) (a:ad), - (if Nbit0 a then MapGet (M2 m' m) a else MapGet (M2 m m'') a) = - MapGet m (Ndiv2 a). - Proof. - intros. elim (sumbool_of_bool (Nbit0 a)). intro H. rewrite H. - apply MapGet_M2_bit_0_1; assumption. - intro H. rewrite H. apply MapGet_M2_bit_0_0; assumption. - Qed. - - Lemma Map2_semantics_3 : - forall m m':Map, - eqm (MapGet (M2 m m')) - (fun a:ad => - match Nbit0 a with - | false => MapGet m (Ndiv2 a) - | true => MapGet m' (Ndiv2 a) - end). - Proof. - unfold eqm in |- *. - simple induction a; trivial. - simple induction p; trivial. - Qed. - - Lemma Map2_semantics_3_eq : - forall (m m':Map) (f f':ad -> option A), - eqm (MapGet m) f -> - eqm (MapGet m') f' -> - eqm (MapGet (M2 m m')) - (fun a:ad => - match Nbit0 a with - | false => f (Ndiv2 a) - | true => f' (Ndiv2 a) - end). - Proof. - unfold eqm in |- *. - intros. - rewrite <- (H (Ndiv2 a)). - rewrite <- (H0 (Ndiv2 a)). - exact (Map2_semantics_3 m m' a). - Qed. - - Fixpoint MapPut1 (a:ad) (y:A) (a':ad) (y':A) (p:positive) {struct p} : - Map := - match p with - | xO p' => - let m := MapPut1 (Ndiv2 a) y (Ndiv2 a') y' p' in - match Nbit0 a with - | false => M2 m M0 - | true => M2 M0 m - end - | _ => - match Nbit0 a with - | false => M2 (M1 (Ndiv2 a) y) (M1 (Ndiv2 a') y') - | true => M2 (M1 (Ndiv2 a') y') (M1 (Ndiv2 a) y) - end - end. - - Lemma MapGet_if_commute : - forall (b:bool) (m m':Map) (a:ad), - MapGet (if b then m else m') a = (if b then MapGet m a else MapGet m' a). - Proof. - intros. case b; trivial. - Qed. - - (*i - Lemma MapGet_M2_bit_0_1' : (m,m',m'',m''':Map) - (a:ad) (MapGet (if (Nbit0 a) then (M2 m m') else (M2 m'' m''')) a)= - (MapGet (if (Nbit0 a) then m' else m'') (Ndiv2 a)). - Proof. - Intros. Rewrite (MapGet_if_commute (Nbit0 a)). Rewrite (MapGet_if_commute (Nbit0 a)). - Cut (Nbit0 a)=false\/(Nbit0 a)=true. Intros. Elim H. Intros. Rewrite H0. - Apply MapGet_M2_bit_0_0. Assumption. - Intros. Rewrite H0. Apply MapGet_M2_bit_0_1. Assumption. - Case (Nbit0 a); Auto. - Qed. - i*) - - Lemma MapGet_if_same : - forall (m:Map) (b:bool) (a:ad), MapGet (if b then m else m) a = MapGet m a. - Proof. - simple induction b; trivial. - Qed. - - Lemma MapGet_M2_bit_0_2 : - forall (m m' m'':Map) (a:ad), - MapGet (if Nbit0 a then M2 m m' else M2 m' m'') a = - MapGet m' (Ndiv2 a). - Proof. - intros. rewrite MapGet_if_commute. apply MapGet_M2_bit_0. - Qed. - - Lemma MapPut1_semantics_1 : - forall (p:positive) (a a':ad) (y y':A), - Nxor a a' = Npos p -> MapGet (MapPut1 a y a' y' p) a = Some y. - Proof. - simple induction p. intros. unfold MapPut1 in |- *. rewrite MapGet_M2_bit_0_2. apply M1_semantics_1. - intros. simpl in |- *. rewrite MapGet_M2_bit_0_2. apply H. rewrite <- Nxor_div2. rewrite H0. - reflexivity. - intros. unfold MapPut1 in |- *. rewrite MapGet_M2_bit_0_2. apply M1_semantics_1. - Qed. - - Lemma MapPut1_semantics_2 : - forall (p:positive) (a a':ad) (y y':A), - Nxor a a' = Npos p -> MapGet (MapPut1 a y a' y' p) a' = Some y'. - Proof. - simple induction p. intros. unfold MapPut1 in |- *. rewrite (Nneg_bit0_2 a a' p0 H0). - rewrite if_negb. rewrite MapGet_M2_bit_0_2. apply M1_semantics_1. - intros. simpl in |- *. rewrite (Nsame_bit0 a a' p0 H0). rewrite MapGet_M2_bit_0_2. - apply H. rewrite <- Nxor_div2. rewrite H0. reflexivity. - intros. unfold MapPut1 in |- *. rewrite (Nneg_bit0_1 a a' H). rewrite if_negb. - rewrite MapGet_M2_bit_0_2. apply M1_semantics_1. - Qed. - - Lemma MapGet_M2_both_None : - forall (m m':Map) (a:ad), - MapGet m (Ndiv2 a) = None -> - MapGet m' (Ndiv2 a) = None -> MapGet (M2 m m') a = None. - Proof. - intros. rewrite (Map2_semantics_3 m m' a). - case (Nbit0 a); assumption. - Qed. - - Lemma MapPut1_semantics_3 : - forall (p:positive) (a a' a0:ad) (y y':A), - Nxor a a' = Npos p -> - Neqb a a0 = false -> - Neqb a' a0 = false -> MapGet (MapPut1 a y a' y' p) a0 = None. - Proof. - simple induction p. intros. unfold MapPut1 in |- *. elim (Nneq_elim a a0 H1). intro. rewrite H3. rewrite if_negb. - rewrite MapGet_M2_bit_0_2. apply M1_semantics_2. apply Ndiv2_bit_neq. assumption. - rewrite (Nneg_bit0_2 a a' p0 H0) in H3. rewrite (negb_intro (Nbit0 a')). - rewrite (negb_intro (Nbit0 a0)). rewrite H3. reflexivity. - intro. elim (Nneq_elim a' a0 H2). intro. rewrite (Nneg_bit0_2 a a' p0 H0). rewrite H4. - rewrite (negb_elim (Nbit0 a0)). rewrite MapGet_M2_bit_0_2. - apply M1_semantics_2; assumption. - intro; case (Nbit0 a); apply MapGet_M2_both_None; apply M1_semantics_2; - assumption. - intros. simpl in |- *. elim (Nneq_elim a a0 H1). intro. rewrite H3. rewrite if_negb. - rewrite MapGet_M2_bit_0_2. reflexivity. - intro. elim (Nneq_elim a' a0 H2). intro. rewrite (Nsame_bit0 a a' p0 H0). rewrite H4. - rewrite if_negb. rewrite MapGet_M2_bit_0_2. reflexivity. - intro. cut (Nxor (Ndiv2 a) (Ndiv2 a') = Npos p0). intro. - case (Nbit0 a); apply MapGet_M2_both_None; trivial; apply H; - assumption. - rewrite <- Nxor_div2. rewrite H0. reflexivity. - intros. simpl in |- *. elim (Nneq_elim a a0 H0). intro. rewrite H2. rewrite if_negb. - rewrite MapGet_M2_bit_0_2. apply M1_semantics_2. apply Ndiv2_bit_neq. assumption. - rewrite (Nneg_bit0_1 a a' H) in H2. rewrite (negb_intro (Nbit0 a')). - rewrite (negb_intro (Nbit0 a0)). rewrite H2. reflexivity. - intro. elim (Nneq_elim a' a0 H1). intro. rewrite (Nneg_bit0_1 a a' H). rewrite H3. - rewrite (negb_elim (Nbit0 a0)). rewrite MapGet_M2_bit_0_2. - apply M1_semantics_2; assumption. - intro. case (Nbit0 a); apply MapGet_M2_both_None; apply M1_semantics_2; - assumption. - Qed. - - Lemma MapPut1_semantics : - forall (p:positive) (a a':ad) (y y':A), - Nxor a a' = Npos p -> - eqm (MapGet (MapPut1 a y a' y' p)) - (fun a0:ad => - if Neqb a a0 - then Some y - else if Neqb a' a0 then Some y' else None). - Proof. - unfold eqm in |- *. intros. elim (sumbool_of_bool (Neqb a a0)). intro H0. rewrite H0. - rewrite <- (Neqb_complete _ _ H0). exact (MapPut1_semantics_1 p a a' y y' H). - intro H0. rewrite H0. elim (sumbool_of_bool (Neqb a' a0)). intro H1. - rewrite <- (Neqb_complete _ _ H1). rewrite (Neqb_correct a'). - exact (MapPut1_semantics_2 p a a' y y' H). - intro H1. rewrite H1. exact (MapPut1_semantics_3 p a a' a0 y y' H H0 H1). - Qed. - - Lemma MapPut1_semantics' : - forall (p:positive) (a a':ad) (y y':A), - Nxor a a' = Npos p -> - eqm (MapGet (MapPut1 a y a' y' p)) - (fun a0:ad => - if Neqb a' a0 - then Some y' - else if Neqb a a0 then Some y else None). - Proof. - unfold eqm in |- *. intros. rewrite (MapPut1_semantics p a a' y y' H a0). - elim (sumbool_of_bool (Neqb a a0)). intro H0. rewrite H0. - rewrite <- (Neqb_complete a a0 H0). rewrite (Neqb_comm a' a). - rewrite (Nxor_eq_false a a' p H). reflexivity. - intro H0. rewrite H0. reflexivity. - Qed. - - Fixpoint MapPut (m:Map) : ad -> A -> Map := - match m with - | M0 => M1 - | M1 a y => - fun (a':ad) (y':A) => - match Nxor a a' with - | N0 => M1 a' y' - | Npos p => MapPut1 a y a' y' p - end - | M2 m1 m2 => - fun (a:ad) (y:A) => - match a with - | N0 => M2 (MapPut m1 N0 y) m2 - | Npos xH => M2 m1 (MapPut m2 N0 y) - | Npos (xO p) => M2 (MapPut m1 (Npos p) y) m2 - | Npos (xI p) => M2 m1 (MapPut m2 (Npos p) y) - end - end. - - Lemma MapPut_semantics_1 : - forall (a:ad) (y:A) (a0:ad), - MapGet (MapPut M0 a y) a0 = MapGet (M1 a y) a0. - Proof. - trivial. - Qed. - - Lemma MapPut_semantics_2_1 : - forall (a:ad) (y y':A) (a0:ad), - MapGet (MapPut (M1 a y) a y') a0 = - (if Neqb a a0 then Some y' else None). - Proof. - simpl in |- *. intros. rewrite (Nxor_nilpotent a). trivial. - Qed. - - Lemma MapPut_semantics_2_2 : - forall (a a':ad) (y y':A) (a0 a'':ad), - Nxor a a' = a'' -> - MapGet (MapPut (M1 a y) a' y') a0 = - (if Neqb a' a0 then Some y' else if Neqb a a0 then Some y else None). - Proof. - simple induction a''. intro. rewrite (Nxor_eq _ _ H). rewrite MapPut_semantics_2_1. - case (Neqb a' a0); trivial. - intros. simpl in |- *. rewrite H. rewrite (MapPut1_semantics p a a' y y' H a0). - elim (sumbool_of_bool (Neqb a a0)). intro H0. rewrite H0. rewrite <- (Neqb_complete _ _ H0). - rewrite (Neqb_comm a' a). rewrite (Nxor_eq_false _ _ _ H). reflexivity. - intro H0. rewrite H0. reflexivity. - Qed. - - Lemma MapPut_semantics_2 : - forall (a a':ad) (y y':A) (a0:ad), - MapGet (MapPut (M1 a y) a' y') a0 = - (if Neqb a' a0 then Some y' else if Neqb a a0 then Some y else None). - Proof. - intros. apply MapPut_semantics_2_2 with (a'' := Nxor a a'); trivial. - Qed. - - Lemma MapPut_semantics_3_1 : - forall (m m':Map) (a:ad) (y:A), - MapPut (M2 m m') a y = - (if Nbit0 a - then M2 m (MapPut m' (Ndiv2 a) y) - else M2 (MapPut m (Ndiv2 a) y) m'). - Proof. - simple induction a. trivial. - simple induction p; trivial. - Qed. - - Lemma MapPut_semantics : - forall (m:Map) (a:ad) (y:A), - eqm (MapGet (MapPut m a y)) - (fun a':ad => if Neqb a a' then Some y else MapGet m a'). - Proof. - unfold eqm in |- *. simple induction m. exact MapPut_semantics_1. - intros. unfold MapGet at 2 in |- *. apply MapPut_semantics_2; assumption. - intros. rewrite MapPut_semantics_3_1. rewrite (MapGet_M2_bit_0_if m0 m1 a0). - elim (sumbool_of_bool (Nbit0 a)). intro H1. rewrite H1. rewrite MapGet_M2_bit_0_if. - elim (sumbool_of_bool (Nbit0 a0)). intro H2. rewrite H2. - rewrite (H0 (Ndiv2 a) y (Ndiv2 a0)). elim (sumbool_of_bool (Neqb a a0)). - intro H3. rewrite H3. rewrite (Ndiv2_eq _ _ H3). reflexivity. - intro H3. rewrite H3. rewrite <- H2 in H1. rewrite (Ndiv2_bit_neq _ _ H3 H1). reflexivity. - intro H2. rewrite H2. rewrite (Neqb_comm a a0). rewrite (Nbit0_neq a0 a H2 H1). - reflexivity. - intro H1. rewrite H1. rewrite MapGet_M2_bit_0_if. elim (sumbool_of_bool (Nbit0 a0)). - intro H2. rewrite H2. rewrite (Nbit0_neq a a0 H1 H2). reflexivity. - intro H2. rewrite H2. rewrite (H (Ndiv2 a) y (Ndiv2 a0)). - elim (sumbool_of_bool (Neqb a a0)). intro H3. rewrite H3. - rewrite (Ndiv2_eq a a0 H3). reflexivity. - intro H3. rewrite H3. rewrite <- H2 in H1. rewrite (Ndiv2_bit_neq a a0 H3 H1). reflexivity. - Qed. - - Fixpoint MapPut_behind (m:Map) : ad -> A -> Map := - match m with - | M0 => M1 - | M1 a y => - fun (a':ad) (y':A) => - match Nxor a a' with - | N0 => m - | Npos p => MapPut1 a y a' y' p - end - | M2 m1 m2 => - fun (a:ad) (y:A) => - match a with - | N0 => M2 (MapPut_behind m1 N0 y) m2 - | Npos xH => M2 m1 (MapPut_behind m2 N0 y) - | Npos (xO p) => M2 (MapPut_behind m1 (Npos p) y) m2 - | Npos (xI p) => M2 m1 (MapPut_behind m2 (Npos p) y) - end - end. - - Lemma MapPut_behind_semantics_3_1 : - forall (m m':Map) (a:ad) (y:A), - MapPut_behind (M2 m m') a y = - (if Nbit0 a - then M2 m (MapPut_behind m' (Ndiv2 a) y) - else M2 (MapPut_behind m (Ndiv2 a) y) m'). - Proof. - simple induction a. trivial. - simple induction p; trivial. - Qed. - - Lemma MapPut_behind_as_before_1 : - forall a a' a0:ad, - Neqb a' a0 = false -> - forall y y':A, - MapGet (MapPut (M1 a y) a' y') a0 = - MapGet (MapPut_behind (M1 a y) a' y') a0. - Proof. - intros a a' a0. simpl in |- *. intros H y y'. elim (Ndiscr (Nxor a a')). intro H0. elim H0. - intros p H1. rewrite H1. reflexivity. - intro H0. rewrite H0. rewrite (Nxor_eq _ _ H0). rewrite (M1_semantics_2 a' a0 y H). - exact (M1_semantics_2 a' a0 y' H). - Qed. - - Lemma MapPut_behind_as_before : - forall (m:Map) (a:ad) (y:A) (a0:ad), - Neqb a a0 = false -> - MapGet (MapPut m a y) a0 = MapGet (MapPut_behind m a y) a0. - Proof. - simple induction m. trivial. - intros a y a' y' a0 H. exact (MapPut_behind_as_before_1 a a' a0 H y y'). - intros. rewrite MapPut_semantics_3_1. rewrite MapPut_behind_semantics_3_1. - elim (sumbool_of_bool (Nbit0 a)). intro H2. rewrite H2. rewrite MapGet_M2_bit_0_if. - rewrite MapGet_M2_bit_0_if. elim (sumbool_of_bool (Nbit0 a0)). intro H3. - rewrite H3. apply H0. rewrite <- H3 in H2. exact (Ndiv2_bit_neq a a0 H1 H2). - intro H3. rewrite H3. reflexivity. - intro H2. rewrite H2. rewrite MapGet_M2_bit_0_if. rewrite MapGet_M2_bit_0_if. - elim (sumbool_of_bool (Nbit0 a0)). intro H3. rewrite H3. reflexivity. - intro H3. rewrite H3. apply H. rewrite <- H3 in H2. exact (Ndiv2_bit_neq a a0 H1 H2). - Qed. - - Lemma MapPut_behind_new : - forall (m:Map) (a:ad) (y:A), - MapGet (MapPut_behind m a y) a = - match MapGet m a with - | Some y' => Some y' - | _ => Some y - end. - Proof. - simple induction m. simpl in |- *. intros. rewrite (Neqb_correct a). reflexivity. - intros. elim (Ndiscr (Nxor a a1)). intro H. elim H. intros p H0. simpl in |- *. - rewrite H0. rewrite (Nxor_eq_false a a1 p). exact (MapPut1_semantics_2 p a a1 a0 y H0). - assumption. - intro H. simpl in |- *. rewrite H. rewrite <- (Nxor_eq _ _ H). rewrite (Neqb_correct a). - exact (M1_semantics_1 a a0). - intros. rewrite MapPut_behind_semantics_3_1. rewrite (MapGet_M2_bit_0_if m0 m1 a). - elim (sumbool_of_bool (Nbit0 a)). intro H1. rewrite H1. rewrite (MapGet_M2_bit_0_1 a H1). - exact (H0 (Ndiv2 a) y). - intro H1. rewrite H1. rewrite (MapGet_M2_bit_0_0 a H1). exact (H (Ndiv2 a) y). - Qed. - - Lemma MapPut_behind_semantics : - forall (m:Map) (a:ad) (y:A), - eqm (MapGet (MapPut_behind m a y)) - (fun a':ad => - match MapGet m a' with - | Some y' => Some y' - | _ => if Neqb a a' then Some y else None - end). - Proof. - unfold eqm in |- *. intros. elim (sumbool_of_bool (Neqb a a0)). intro H. rewrite H. - rewrite (Neqb_complete _ _ H). apply MapPut_behind_new. - intro H. rewrite H. rewrite <- (MapPut_behind_as_before m a y a0 H). - rewrite (MapPut_semantics m a y a0). rewrite H. case (MapGet m a0); trivial. - Qed. - - Definition makeM2 (m m':Map) := - match m, m' with - | M0, M0 => M0 - | M0, M1 a y => M1 (Ndouble_plus_one a) y - | M1 a y, M0 => M1 (Ndouble a) y - | _, _ => M2 m m' - end. - - Lemma makeM2_M2 : - forall m m':Map, eqm (MapGet (makeM2 m m')) (MapGet (M2 m m')). - Proof. - unfold eqm in |- *. intros. elim (sumbool_of_bool (Nbit0 a)). intro H. - rewrite (MapGet_M2_bit_0_1 a H m m'). case m'. case m. reflexivity. - intros a0 y. simpl in |- *. rewrite (Nodd_not_double a H a0). reflexivity. - intros m1 m2. unfold makeM2 in |- *. rewrite MapGet_M2_bit_0_1. reflexivity. - assumption. - case m. intros a0 y. simpl in |- *. elim (sumbool_of_bool (Neqb a0 (Ndiv2 a))). - intro H0. rewrite H0. rewrite (Neqb_complete _ _ H0). rewrite (Ndiv2_double_plus_one a H). - rewrite (Neqb_correct a). reflexivity. - intro H0. rewrite H0. rewrite (Neqb_comm a0 (Ndiv2 a)) in H0. - rewrite (Nnot_div2_not_double_plus_one a a0 H0). reflexivity. - intros a0 y0 a1 y1. unfold makeM2 in |- *. rewrite MapGet_M2_bit_0_1. reflexivity. - assumption. - intros m1 m2 a0 y. unfold makeM2 in |- *. rewrite MapGet_M2_bit_0_1. reflexivity. - assumption. - intros m1 m2. unfold makeM2 in |- *. - cut (MapGet (M2 m (M2 m1 m2)) a = MapGet (M2 m1 m2) (Ndiv2 a)). - case m; trivial. - exact (MapGet_M2_bit_0_1 a H m (M2 m1 m2)). - intro H. rewrite (MapGet_M2_bit_0_0 a H m m'). case m. case m'. reflexivity. - intros a0 y. simpl in |- *. rewrite (Neven_not_double_plus_one a H a0). reflexivity. - intros m1 m2. unfold makeM2 in |- *. rewrite MapGet_M2_bit_0_0. reflexivity. - assumption. - case m'. intros a0 y. simpl in |- *. elim (sumbool_of_bool (Neqb a0 (Ndiv2 a))). intro H0. - rewrite H0. rewrite (Neqb_complete _ _ H0). rewrite (Ndiv2_double a H). - rewrite (Neqb_correct a). reflexivity. - intro H0. rewrite H0. rewrite (Neqb_comm (Ndouble a0) a). - rewrite (Neqb_comm a0 (Ndiv2 a)) in H0. rewrite (Nnot_div2_not_double a a0 H0). - reflexivity. - intros a0 y0 a1 y1. unfold makeM2 in |- *. rewrite MapGet_M2_bit_0_0. reflexivity. - assumption. - intros m1 m2 a0 y. unfold makeM2 in |- *. rewrite MapGet_M2_bit_0_0. reflexivity. - assumption. - intros m1 m2. unfold makeM2 in |- *. exact (MapGet_M2_bit_0_0 a H (M2 m1 m2) m'). - Qed. - - Fixpoint MapRemove (m:Map) : ad -> Map := - match m with - | M0 => fun _:ad => M0 - | M1 a y => - fun a':ad => match Neqb a a' with - | true => M0 - | false => m - end - | M2 m1 m2 => - fun a:ad => - if Nbit0 a - then makeM2 m1 (MapRemove m2 (Ndiv2 a)) - else makeM2 (MapRemove m1 (Ndiv2 a)) m2 - end. - - Lemma MapRemove_semantics : - forall (m:Map) (a:ad), - eqm (MapGet (MapRemove m a)) - (fun a':ad => if Neqb a a' then None else MapGet m a'). - Proof. - unfold eqm in |- *. simple induction m. simpl in |- *. intros. case (Neqb a a0); trivial. - intros. simpl in |- *. elim (sumbool_of_bool (Neqb a1 a2)). intro H. rewrite H. - elim (sumbool_of_bool (Neqb a a1)). intro H0. rewrite H0. reflexivity. - intro H0. rewrite H0. rewrite (Neqb_complete _ _ H) in H0. exact (M1_semantics_2 a a2 a0 H0). - intro H. elim (sumbool_of_bool (Neqb a a1)). intro H0. rewrite H0. rewrite H. - rewrite <- (Neqb_complete _ _ H0) in H. rewrite H. reflexivity. - intro H0. rewrite H0. rewrite H. reflexivity. - intros. change - (MapGet - (if Nbit0 a - then makeM2 m0 (MapRemove m1 (Ndiv2 a)) - else makeM2 (MapRemove m0 (Ndiv2 a)) m1) a0 = - (if Neqb a a0 then None else MapGet (M2 m0 m1) a0)) - in |- *. - elim (sumbool_of_bool (Nbit0 a)). intro H1. rewrite H1. - rewrite (makeM2_M2 m0 (MapRemove m1 (Ndiv2 a)) a0). elim (sumbool_of_bool (Nbit0 a0)). - intro H2. rewrite MapGet_M2_bit_0_1. rewrite (H0 (Ndiv2 a) (Ndiv2 a0)). - elim (sumbool_of_bool (Neqb a a0)). intro H3. rewrite H3. rewrite (Ndiv2_eq _ _ H3). - reflexivity. - intro H3. rewrite H3. rewrite <- H2 in H1. rewrite (Ndiv2_bit_neq _ _ H3 H1). - rewrite (MapGet_M2_bit_0_1 a0 H2 m0 m1). reflexivity. - assumption. - intro H2. rewrite (MapGet_M2_bit_0_0 a0 H2 m0 (MapRemove m1 (Ndiv2 a))). - rewrite (Neqb_comm a a0). rewrite (Nbit0_neq _ _ H2 H1). - rewrite (MapGet_M2_bit_0_0 a0 H2 m0 m1). reflexivity. - intro H1. rewrite H1. rewrite (makeM2_M2 (MapRemove m0 (Ndiv2 a)) m1 a0). - elim (sumbool_of_bool (Nbit0 a0)). intro H2. rewrite MapGet_M2_bit_0_1. - rewrite (MapGet_M2_bit_0_1 a0 H2 m0 m1). rewrite (Nbit0_neq a a0 H1 H2). reflexivity. - assumption. - intro H2. rewrite MapGet_M2_bit_0_0. rewrite (H (Ndiv2 a) (Ndiv2 a0)). - rewrite (MapGet_M2_bit_0_0 a0 H2 m0 m1). elim (sumbool_of_bool (Neqb a a0)). intro H3. - rewrite H3. rewrite (Ndiv2_eq _ _ H3). reflexivity. - intro H3. rewrite H3. rewrite <- H2 in H1. rewrite (Ndiv2_bit_neq _ _ H3 H1). reflexivity. - assumption. - Qed. - - Fixpoint MapCard (m:Map) : nat := - match m with - | M0 => 0 - | M1 _ _ => 1 - | M2 m m' => MapCard m + MapCard m' - end. - - Fixpoint MapMerge (m:Map) : Map -> Map := - match m with - | M0 => fun m':Map => m' - | M1 a y => fun m':Map => MapPut_behind m' a y - | M2 m1 m2 => - fun m':Map => - match m' with - | M0 => m - | M1 a' y' => MapPut m a' y' - | M2 m'1 m'2 => M2 (MapMerge m1 m'1) (MapMerge m2 m'2) - end - end. - - Lemma MapMerge_semantics : - forall m m':Map, - eqm (MapGet (MapMerge m m')) - (fun a0:ad => - match MapGet m' a0 with - | Some y' => Some y' - | None => MapGet m a0 - end). - Proof. - unfold eqm in |- *. simple induction m. intros. simpl in |- *. case (MapGet m' a); trivial. - intros. simpl in |- *. rewrite (MapPut_behind_semantics m' a a0 a1). reflexivity. - simple induction m'. trivial. - intros. unfold MapMerge in |- *. rewrite (MapPut_semantics (M2 m0 m1) a a0 a1). - elim (sumbool_of_bool (Neqb a a1)). intro H1. rewrite H1. rewrite (Neqb_complete _ _ H1). - rewrite (M1_semantics_1 a1 a0). reflexivity. - intro H1. rewrite H1. rewrite (M1_semantics_2 a a1 a0 H1). reflexivity. - intros. cut (MapMerge (M2 m0 m1) (M2 m2 m3) = M2 (MapMerge m0 m2) (MapMerge m1 m3)). - intro. rewrite H3. rewrite MapGet_M2_bit_0_if. rewrite (H0 m3 (Ndiv2 a)). - rewrite (H m2 (Ndiv2 a)). rewrite (MapGet_M2_bit_0_if m2 m3 a). - rewrite (MapGet_M2_bit_0_if m0 m1 a). case (Nbit0 a); trivial. - reflexivity. - Qed. - - (** [MapInter], [MapRngRestrTo], [MapRngRestrBy], [MapInverse] - not implemented: need a decidable equality on [A]. *) - - Fixpoint MapDelta (m:Map) : Map -> Map := - match m with - | M0 => fun m':Map => m' - | M1 a y => - fun m':Map => - match MapGet m' a with - | None => MapPut m' a y - | _ => MapRemove m' a - end - | M2 m1 m2 => - fun m':Map => - match m' with - | M0 => m - | M1 a' y' => - match MapGet m a' with - | None => MapPut m a' y' - | _ => MapRemove m a' - end - | M2 m'1 m'2 => makeM2 (MapDelta m1 m'1) (MapDelta m2 m'2) - end - end. - - Lemma MapDelta_semantics_comm : - forall m m':Map, eqm (MapGet (MapDelta m m')) (MapGet (MapDelta m' m)). - Proof. - unfold eqm in |- *. simple induction m. simple induction m'; reflexivity. - simple induction m'. reflexivity. - unfold MapDelta in |- *. intros. elim (sumbool_of_bool (Neqb a a1)). intro H. - rewrite <- (Neqb_complete _ _ H). rewrite (M1_semantics_1 a a2). - rewrite (M1_semantics_1 a a0). simpl in |- *. rewrite (Neqb_correct a). reflexivity. - intro H. rewrite (M1_semantics_2 a a1 a0 H). rewrite (Neqb_comm a a1) in H. - rewrite (M1_semantics_2 a1 a a2 H). rewrite (MapPut_semantics (M1 a a0) a1 a2 a3). - rewrite (MapPut_semantics (M1 a1 a2) a a0 a3). elim (sumbool_of_bool (Neqb a a3)). - intro H0. rewrite H0. rewrite (Neqb_complete _ _ H0) in H. rewrite H. - rewrite (Neqb_complete _ _ H0). rewrite (M1_semantics_1 a3 a0). reflexivity. - intro H0. rewrite H0. rewrite (M1_semantics_2 a a3 a0 H0). - elim (sumbool_of_bool (Neqb a1 a3)). intro H1. rewrite H1. - rewrite (Neqb_complete _ _ H1). exact (M1_semantics_1 a3 a2). - intro H1. rewrite H1. exact (M1_semantics_2 a1 a3 a2 H1). - intros. reflexivity. - simple induction m'. reflexivity. - reflexivity. - intros. simpl in |- *. rewrite (makeM2_M2 (MapDelta m0 m2) (MapDelta m1 m3) a). - rewrite (makeM2_M2 (MapDelta m2 m0) (MapDelta m3 m1) a). - rewrite (MapGet_M2_bit_0_if (MapDelta m0 m2) (MapDelta m1 m3) a). - rewrite (MapGet_M2_bit_0_if (MapDelta m2 m0) (MapDelta m3 m1) a). - rewrite (H0 m3 (Ndiv2 a)). rewrite (H m2 (Ndiv2 a)). reflexivity. - Qed. - - Lemma MapDelta_semantics_1_1 : - forall (a:ad) (y:A) (m':Map) (a0:ad), - MapGet (M1 a y) a0 = None -> - MapGet m' a0 = None -> MapGet (MapDelta (M1 a y) m') a0 = None. - Proof. - intros. unfold MapDelta in |- *. elim (sumbool_of_bool (Neqb a a0)). intro H1. - rewrite (Neqb_complete _ _ H1) in H. rewrite (M1_semantics_1 a0 y) in H. discriminate H. - intro H1. case (MapGet m' a). - rewrite (MapRemove_semantics m' a a0). rewrite H1. trivial. - rewrite (MapPut_semantics m' a y a0). rewrite H1. assumption. - Qed. - - Lemma MapDelta_semantics_1 : - forall (m m':Map) (a:ad), - MapGet m a = None -> - MapGet m' a = None -> MapGet (MapDelta m m') a = None. - Proof. - simple induction m. trivial. - exact MapDelta_semantics_1_1. - simple induction m'. trivial. - intros. rewrite (MapDelta_semantics_comm (M2 m0 m1) (M1 a a0) a1). - apply MapDelta_semantics_1_1; trivial. - intros. simpl in |- *. rewrite (makeM2_M2 (MapDelta m0 m2) (MapDelta m1 m3) a). - rewrite MapGet_M2_bit_0_if. elim (sumbool_of_bool (Nbit0 a)). intro H5. rewrite H5. - apply H0. rewrite (MapGet_M2_bit_0_1 a H5 m0 m1) in H3. exact H3. - rewrite (MapGet_M2_bit_0_1 a H5 m2 m3) in H4. exact H4. - intro H5. rewrite H5. apply H. rewrite (MapGet_M2_bit_0_0 a H5 m0 m1) in H3. exact H3. - rewrite (MapGet_M2_bit_0_0 a H5 m2 m3) in H4. exact H4. - Qed. - - Lemma MapDelta_semantics_2_1 : - forall (a:ad) (y:A) (m':Map) (a0:ad) (y0:A), - MapGet (M1 a y) a0 = None -> - MapGet m' a0 = Some y0 -> MapGet (MapDelta (M1 a y) m') a0 = Some y0. - Proof. - intros. unfold MapDelta in |- *. elim (sumbool_of_bool (Neqb a a0)). intro H1. - rewrite (Neqb_complete _ _ H1) in H. rewrite (M1_semantics_1 a0 y) in H. discriminate H. - intro H1. case (MapGet m' a). - rewrite (MapRemove_semantics m' a a0). rewrite H1. trivial. - rewrite (MapPut_semantics m' a y a0). rewrite H1. assumption. - Qed. - - Lemma MapDelta_semantics_2_2 : - forall (a:ad) (y:A) (m':Map) (a0:ad) (y0:A), - MapGet (M1 a y) a0 = Some y0 -> - MapGet m' a0 = None -> MapGet (MapDelta (M1 a y) m') a0 = Some y0. - Proof. - intros. unfold MapDelta in |- *. elim (sumbool_of_bool (Neqb a a0)). intro H1. - rewrite (Neqb_complete _ _ H1) in H. rewrite (Neqb_complete _ _ H1). - rewrite H0. rewrite (MapPut_semantics m' a0 y a0). rewrite (Neqb_correct a0). - rewrite (M1_semantics_1 a0 y) in H. simple inversion H. assumption. - intro H1. rewrite (M1_semantics_2 a a0 y H1) in H. discriminate H. - Qed. - - Lemma MapDelta_semantics_2 : - forall (m m':Map) (a:ad) (y:A), - MapGet m a = None -> - MapGet m' a = Some y -> MapGet (MapDelta m m') a = Some y. - Proof. - simple induction m. trivial. - exact MapDelta_semantics_2_1. - simple induction m'. intros. discriminate H2. - intros. rewrite (MapDelta_semantics_comm (M2 m0 m1) (M1 a a0) a1). - apply MapDelta_semantics_2_2; assumption. - intros. simpl in |- *. rewrite (makeM2_M2 (MapDelta m0 m2) (MapDelta m1 m3) a). - rewrite MapGet_M2_bit_0_if. elim (sumbool_of_bool (Nbit0 a)). intro H5. rewrite H5. - apply H0. rewrite <- (MapGet_M2_bit_0_1 a H5 m0 m1). assumption. - rewrite <- (MapGet_M2_bit_0_1 a H5 m2 m3). assumption. - intro H5. rewrite H5. apply H. rewrite <- (MapGet_M2_bit_0_0 a H5 m0 m1). assumption. - rewrite <- (MapGet_M2_bit_0_0 a H5 m2 m3). assumption. - Qed. - - Lemma MapDelta_semantics_3_1 : - forall (a0:ad) (y0:A) (m':Map) (a:ad) (y y':A), - MapGet (M1 a0 y0) a = Some y -> - MapGet m' a = Some y' -> MapGet (MapDelta (M1 a0 y0) m') a = None. - Proof. - intros. unfold MapDelta in |- *. elim (sumbool_of_bool (Neqb a0 a)). intro H1. - rewrite (Neqb_complete a0 a H1). rewrite H0. rewrite (MapRemove_semantics m' a a). - rewrite (Neqb_correct a). reflexivity. - intro H1. rewrite (M1_semantics_2 a0 a y0 H1) in H. discriminate H. - Qed. - - Lemma MapDelta_semantics_3 : - forall (m m':Map) (a:ad) (y y':A), - MapGet m a = Some y -> - MapGet m' a = Some y' -> MapGet (MapDelta m m') a = None. - Proof. - simple induction m. intros. discriminate H. - exact MapDelta_semantics_3_1. - simple induction m'. intros. discriminate H2. - intros. rewrite (MapDelta_semantics_comm (M2 m0 m1) (M1 a a0) a1). - exact (MapDelta_semantics_3_1 a a0 (M2 m0 m1) a1 y' y H2 H1). - intros. simpl in |- *. rewrite (makeM2_M2 (MapDelta m0 m2) (MapDelta m1 m3) a). - rewrite MapGet_M2_bit_0_if. elim (sumbool_of_bool (Nbit0 a)). intro H5. rewrite H5. - apply (H0 m3 (Ndiv2 a) y y'). rewrite <- (MapGet_M2_bit_0_1 a H5 m0 m1). assumption. - rewrite <- (MapGet_M2_bit_0_1 a H5 m2 m3). assumption. - intro H5. rewrite H5. apply (H m2 (Ndiv2 a) y y'). - rewrite <- (MapGet_M2_bit_0_0 a H5 m0 m1). assumption. - rewrite <- (MapGet_M2_bit_0_0 a H5 m2 m3). assumption. - Qed. - - Lemma MapDelta_semantics : - forall m m':Map, - eqm (MapGet (MapDelta m m')) - (fun a0:ad => - match MapGet m a0, MapGet m' a0 with - | None, Some y' => Some y' - | Some y, None => Some y - | _, _ => None - end). - Proof. - unfold eqm in |- *. intros. elim (option_sum (MapGet m' a)). intro H. elim H. intros a0 H0. - rewrite H0. elim (option_sum (MapGet m a)). intro H1. elim H1. intros a1 H2. rewrite H2. - exact (MapDelta_semantics_3 m m' a a1 a0 H2 H0). - intro H1. rewrite H1. exact (MapDelta_semantics_2 m m' a a0 H1 H0). - intro H. rewrite H. elim (option_sum (MapGet m a)). intro H0. elim H0. intros a0 H1. - rewrite H1. rewrite (MapDelta_semantics_comm m m' a). - exact (MapDelta_semantics_2 m' m a a0 H H1). - intro H0. rewrite H0. exact (MapDelta_semantics_1 m m' a H0 H). - Qed. - - Definition MapEmptyp (m:Map) := match m with - | M0 => true - | _ => false - end. - - Lemma MapEmptyp_correct : MapEmptyp M0 = true. - Proof. - reflexivity. - Qed. - - Lemma MapEmptyp_complete : forall m:Map, MapEmptyp m = true -> m = M0. - Proof. - simple induction m; trivial. intros. discriminate H. - intros. discriminate H1. - Qed. - - (** [MapSplit] not implemented: not the preferred way of recursing over Maps - (use [MapSweep], [MapCollect], or [MapFold] in Mapiter.v. *) - -End MapDefs. \ No newline at end of file diff --git a/theories/IntMap/Mapaxioms.v b/theories/IntMap/Mapaxioms.v deleted file mode 100644 index 0722bcfa..00000000 --- a/theories/IntMap/Mapaxioms.v +++ /dev/null @@ -1,761 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* option A, eqm A f f' -> eqm A f' f. - Proof. - unfold eqm in |- *. intros. rewrite H. reflexivity. - Qed. - - Lemma eqm_refl : forall f:ad -> option A, eqm A f f. - Proof. - unfold eqm in |- *. trivial. - Qed. - - Lemma eqm_trans : - forall f f' f'':ad -> option A, eqm A f f' -> eqm A f' f'' -> eqm A f f''. - Proof. - unfold eqm in |- *. intros. rewrite H. exact (H0 a). - Qed. - - Definition eqmap (m m':Map A) := eqm A (MapGet A m) (MapGet A m'). - - Lemma eqmap_sym : forall m m':Map A, eqmap m m' -> eqmap m' m. - Proof. - intros. unfold eqmap in |- *. apply eqm_sym. assumption. - Qed. - - Lemma eqmap_refl : forall m:Map A, eqmap m m. - Proof. - intros. unfold eqmap in |- *. apply eqm_refl. - Qed. - - Lemma eqmap_trans : - forall m m' m'':Map A, eqmap m m' -> eqmap m' m'' -> eqmap m m''. - Proof. - intros. exact (eqm_trans (MapGet A m) (MapGet A m') (MapGet A m'') H H0). - Qed. - - Lemma MapPut_as_Merge : - forall (m:Map A) (a:ad) (y:A), - eqmap (MapPut A m a y) (MapMerge A m (M1 A a y)). - Proof. - unfold eqmap, eqm in |- *. intros. rewrite (MapPut_semantics A m a y a0). - rewrite (MapMerge_semantics A m (M1 A a y) a0). unfold MapGet at 2. - elim (sumbool_of_bool (Neqb a a0)); intro H; rewrite H; reflexivity. - Qed. - - Lemma MapPut_ext : - forall m m':Map A, - eqmap m m' -> - forall (a:ad) (y:A), eqmap (MapPut A m a y) (MapPut A m' a y). - Proof. - unfold eqmap, eqm in |- *. intros. rewrite (MapPut_semantics A m' a y a0). - rewrite (MapPut_semantics A m a y a0). - case (Neqb a a0); [ reflexivity | apply H ]. - Qed. - - Lemma MapPut_behind_as_Merge : - forall (m:Map A) (a:ad) (y:A), - eqmap (MapPut_behind A m a y) (MapMerge A (M1 A a y) m). - Proof. - unfold eqmap, eqm in |- *. intros. rewrite (MapPut_behind_semantics A m a y a0). - rewrite (MapMerge_semantics A (M1 A a y) m a0). reflexivity. - Qed. - - Lemma MapPut_behind_ext : - forall m m':Map A, - eqmap m m' -> - forall (a:ad) (y:A), - eqmap (MapPut_behind A m a y) (MapPut_behind A m' a y). - Proof. - unfold eqmap, eqm in |- *. intros. rewrite (MapPut_behind_semantics A m' a y a0). - rewrite (MapPut_behind_semantics A m a y a0). rewrite (H a0). reflexivity. - Qed. - - Lemma MapMerge_empty_m_1 : forall m:Map A, MapMerge A (M0 A) m = m. - Proof. - trivial. - Qed. - - Lemma MapMerge_empty_m : forall m:Map A, eqmap (MapMerge A (M0 A) m) m. - Proof. - unfold eqmap, eqm in |- *. trivial. - Qed. - - Lemma MapMerge_m_empty_1 : forall m:Map A, MapMerge A m (M0 A) = m. - Proof. - simple induction m; trivial. - Qed. - - Lemma MapMerge_m_empty : forall m:Map A, eqmap (MapMerge A m (M0 A)) m. - Proof. - unfold eqmap, eqm in |- *. intros. rewrite MapMerge_m_empty_1. reflexivity. - Qed. - - Lemma MapMerge_empty_l : - forall m m':Map A, eqmap (MapMerge A m m') (M0 A) -> eqmap m (M0 A). - Proof. - unfold eqmap, eqm in |- *. intros. cut (MapGet A (MapMerge A m m') a = MapGet A (M0 A) a). - rewrite (MapMerge_semantics A m m' a). case (MapGet A m' a); trivial. - intros. discriminate H0. - exact (H a). - Qed. - - Lemma MapMerge_empty_r : - forall m m':Map A, eqmap (MapMerge A m m') (M0 A) -> eqmap m' (M0 A). - Proof. - unfold eqmap, eqm in |- *. intros. cut (MapGet A (MapMerge A m m') a = MapGet A (M0 A) a). - rewrite (MapMerge_semantics A m m' a). case (MapGet A m' a); trivial. - exact (H a). - Qed. - - Lemma MapMerge_assoc : - forall m m' m'':Map A, - eqmap (MapMerge A (MapMerge A m m') m'') - (MapMerge A m (MapMerge A m' m'')). - Proof. - unfold eqmap, eqm in |- *. intros. rewrite (MapMerge_semantics A (MapMerge A m m') m'' a). - rewrite (MapMerge_semantics A m (MapMerge A m' m'') a). rewrite (MapMerge_semantics A m m' a). - rewrite (MapMerge_semantics A m' m'' a). - case (MapGet A m'' a); case (MapGet A m' a); trivial. - Qed. - - Lemma MapMerge_idempotent : forall m:Map A, eqmap (MapMerge A m m) m. - Proof. - unfold eqmap, eqm in |- *. intros. rewrite (MapMerge_semantics A m m a). - case (MapGet A m a); trivial. - Qed. - - Lemma MapMerge_ext : - forall m1 m2 m'1 m'2:Map A, - eqmap m1 m'1 -> - eqmap m2 m'2 -> eqmap (MapMerge A m1 m2) (MapMerge A m'1 m'2). - Proof. - unfold eqmap, eqm in |- *. intros. rewrite (MapMerge_semantics A m1 m2 a). - rewrite (MapMerge_semantics A m'1 m'2 a). rewrite (H a). rewrite (H0 a). reflexivity. - Qed. - - Lemma MapMerge_ext_l : - forall m1 m'1 m2:Map A, - eqmap m1 m'1 -> eqmap (MapMerge A m1 m2) (MapMerge A m'1 m2). - Proof. - intros. apply MapMerge_ext. assumption. - apply eqmap_refl. - Qed. - - Lemma MapMerge_ext_r : - forall m1 m2 m'2:Map A, - eqmap m2 m'2 -> eqmap (MapMerge A m1 m2) (MapMerge A m1 m'2). - Proof. - intros. apply MapMerge_ext. apply eqmap_refl. - assumption. - Qed. - - Lemma MapMerge_RestrTo_l : - forall m m' m'':Map A, - eqmap (MapMerge A (MapDomRestrTo A A m m') m'') - (MapDomRestrTo A A (MapMerge A m m'') (MapMerge A m' m'')). - Proof. - unfold eqmap, eqm in |- *. intros. rewrite (MapMerge_semantics A (MapDomRestrTo A A m m') m'' a). - rewrite (MapDomRestrTo_semantics A A m m' a). - rewrite - (MapDomRestrTo_semantics A A (MapMerge A m m'') (MapMerge A m' m'') a) - . - rewrite (MapMerge_semantics A m' m'' a). rewrite (MapMerge_semantics A m m'' a). - case (MapGet A m'' a); case (MapGet A m' a); reflexivity. - Qed. - - Lemma MapRemove_as_RestrBy : - forall (m:Map A) (a:ad) (y:B), - eqmap (MapRemove A m a) (MapDomRestrBy A B m (M1 B a y)). - Proof. - unfold eqmap, eqm in |- *. intros. rewrite (MapRemove_semantics A m a a0). - rewrite (MapDomRestrBy_semantics A B m (M1 B a y) a0). elim (sumbool_of_bool (Neqb a a0)). - intro H. rewrite H. rewrite (Neqb_complete a a0 H). rewrite (M1_semantics_1 B a0 y). - reflexivity. - intro H. rewrite H. rewrite (M1_semantics_2 B a a0 y H). reflexivity. - Qed. - - Lemma MapRemove_ext : - forall m m':Map A, - eqmap m m' -> forall a:ad, eqmap (MapRemove A m a) (MapRemove A m' a). - Proof. - unfold eqmap, eqm in |- *. intros. rewrite (MapRemove_semantics A m' a a0). - rewrite (MapRemove_semantics A m a a0). - case (Neqb a a0); [ reflexivity | apply H ]. - Qed. - - Lemma MapDomRestrTo_empty_m_1 : - forall m:Map B, MapDomRestrTo A B (M0 A) m = M0 A. - Proof. - trivial. - Qed. - - Lemma MapDomRestrTo_empty_m : - forall m:Map B, eqmap (MapDomRestrTo A B (M0 A) m) (M0 A). - Proof. - unfold eqmap, eqm in |- *. trivial. - Qed. - - Lemma MapDomRestrTo_m_empty_1 : - forall m:Map A, MapDomRestrTo A B m (M0 B) = M0 A. - Proof. - simple induction m; trivial. - Qed. - - Lemma MapDomRestrTo_m_empty : - forall m:Map A, eqmap (MapDomRestrTo A B m (M0 B)) (M0 A). - Proof. - unfold eqmap, eqm in |- *. intros. rewrite (MapDomRestrTo_m_empty_1 m). reflexivity. - Qed. - - Lemma MapDomRestrTo_assoc : - forall (m:Map A) (m':Map B) (m'':Map C), - eqmap (MapDomRestrTo A C (MapDomRestrTo A B m m') m'') - (MapDomRestrTo A B m (MapDomRestrTo B C m' m'')). - Proof. - unfold eqmap, eqm in |- *. intros. - rewrite (MapDomRestrTo_semantics A C (MapDomRestrTo A B m m') m'' a). - rewrite (MapDomRestrTo_semantics A B m m' a). - rewrite (MapDomRestrTo_semantics A B m (MapDomRestrTo B C m' m'') a). - rewrite (MapDomRestrTo_semantics B C m' m'' a). - case (MapGet C m'' a); case (MapGet B m' a); trivial. - Qed. - - Lemma MapDomRestrTo_idempotent : - forall m:Map A, eqmap (MapDomRestrTo A A m m) m. - Proof. - unfold eqmap, eqm in |- *. intros. rewrite (MapDomRestrTo_semantics A A m m a). - case (MapGet A m a); trivial. - Qed. - - Lemma MapDomRestrTo_Dom : - forall (m:Map A) (m':Map B), - eqmap (MapDomRestrTo A B m m') (MapDomRestrTo A unit m (MapDom B m')). - Proof. - unfold eqmap, eqm in |- *. intros. rewrite (MapDomRestrTo_semantics A B m m' a). - rewrite (MapDomRestrTo_semantics A unit m (MapDom B m') a). - elim (sumbool_of_bool (in_FSet a (MapDom B m'))). intro H. - elim (MapDom_semantics_2 B m' a H). intros y H0. rewrite H0. unfold in_FSet, in_dom in H. - generalize H. case (MapGet unit (MapDom B m') a); trivial. intro H1. discriminate H1. - intro H. rewrite (MapDom_semantics_4 B m' a H). unfold in_FSet, in_dom in H. - generalize H. case (MapGet unit (MapDom B m') a); trivial. - intros H0 H1. discriminate H1. - Qed. - - Lemma MapDomRestrBy_empty_m_1 : - forall m:Map B, MapDomRestrBy A B (M0 A) m = M0 A. - Proof. - trivial. - Qed. - - Lemma MapDomRestrBy_empty_m : - forall m:Map B, eqmap (MapDomRestrBy A B (M0 A) m) (M0 A). - Proof. - unfold eqmap, eqm in |- *. trivial. - Qed. - - Lemma MapDomRestrBy_m_empty_1 : - forall m:Map A, MapDomRestrBy A B m (M0 B) = m. - Proof. - simple induction m; trivial. - Qed. - - Lemma MapDomRestrBy_m_empty : - forall m:Map A, eqmap (MapDomRestrBy A B m (M0 B)) m. - Proof. - unfold eqmap, eqm in |- *. intros. rewrite (MapDomRestrBy_m_empty_1 m). reflexivity. - Qed. - - Lemma MapDomRestrBy_Dom : - forall (m:Map A) (m':Map B), - eqmap (MapDomRestrBy A B m m') (MapDomRestrBy A unit m (MapDom B m')). - Proof. - unfold eqmap, eqm in |- *. intros. rewrite (MapDomRestrBy_semantics A B m m' a). - rewrite (MapDomRestrBy_semantics A unit m (MapDom B m') a). - elim (sumbool_of_bool (in_FSet a (MapDom B m'))). intro H. - elim (MapDom_semantics_2 B m' a H). intros y H0. rewrite H0. - unfold in_FSet, in_dom in H. generalize H. case (MapGet unit (MapDom B m') a); trivial. - intro H1. discriminate H1. - intro H. rewrite (MapDom_semantics_4 B m' a H). unfold in_FSet, in_dom in H. - generalize H. case (MapGet unit (MapDom B m') a); trivial. - intros H0 H1. discriminate H1. - Qed. - - Lemma MapDomRestrBy_m_m_1 : - forall m:Map A, eqmap (MapDomRestrBy A A m m) (M0 A). - Proof. - unfold eqmap, eqm in |- *. intros. rewrite (MapDomRestrBy_semantics A A m m a). - case (MapGet A m a); trivial. - Qed. - - Lemma MapDomRestrBy_By : - forall (m:Map A) (m' m'':Map B), - eqmap (MapDomRestrBy A B (MapDomRestrBy A B m m') m'') - (MapDomRestrBy A B m (MapMerge B m' m'')). - Proof. - unfold eqmap, eqm in |- *. intros. - rewrite (MapDomRestrBy_semantics A B (MapDomRestrBy A B m m') m'' a). - rewrite (MapDomRestrBy_semantics A B m m' a). - rewrite (MapDomRestrBy_semantics A B m (MapMerge B m' m'') a). - rewrite (MapMerge_semantics B m' m'' a). - case (MapGet B m'' a); case (MapGet B m' a); trivial. - Qed. - - Lemma MapDomRestrBy_By_comm : - forall (m:Map A) (m':Map B) (m'':Map C), - eqmap (MapDomRestrBy A C (MapDomRestrBy A B m m') m'') - (MapDomRestrBy A B (MapDomRestrBy A C m m'') m'). - Proof. - unfold eqmap, eqm in |- *. intros. - rewrite (MapDomRestrBy_semantics A C (MapDomRestrBy A B m m') m'' a). - rewrite (MapDomRestrBy_semantics A B m m' a). - rewrite (MapDomRestrBy_semantics A B (MapDomRestrBy A C m m'') m' a). - rewrite (MapDomRestrBy_semantics A C m m'' a). - case (MapGet C m'' a); case (MapGet B m' a); trivial. - Qed. - - Lemma MapDomRestrBy_To : - forall (m:Map A) (m':Map B) (m'':Map C), - eqmap (MapDomRestrBy A C (MapDomRestrTo A B m m') m'') - (MapDomRestrTo A B m (MapDomRestrBy B C m' m'')). - Proof. - unfold eqmap, eqm in |- *. intros. - rewrite (MapDomRestrBy_semantics A C (MapDomRestrTo A B m m') m'' a). - rewrite (MapDomRestrTo_semantics A B m m' a). - rewrite (MapDomRestrTo_semantics A B m (MapDomRestrBy B C m' m'') a). - rewrite (MapDomRestrBy_semantics B C m' m'' a). - case (MapGet C m'' a); case (MapGet B m' a); trivial. - Qed. - - Lemma MapDomRestrBy_To_comm : - forall (m:Map A) (m':Map B) (m'':Map C), - eqmap (MapDomRestrBy A C (MapDomRestrTo A B m m') m'') - (MapDomRestrTo A B (MapDomRestrBy A C m m'') m'). - Proof. - unfold eqmap, eqm in |- *. intros. - rewrite (MapDomRestrBy_semantics A C (MapDomRestrTo A B m m') m'' a). - rewrite (MapDomRestrTo_semantics A B m m' a). - rewrite (MapDomRestrTo_semantics A B (MapDomRestrBy A C m m'') m' a). - rewrite (MapDomRestrBy_semantics A C m m'' a). - case (MapGet C m'' a); case (MapGet B m' a); trivial. - Qed. - - Lemma MapDomRestrTo_By : - forall (m:Map A) (m':Map B) (m'':Map C), - eqmap (MapDomRestrTo A C (MapDomRestrBy A B m m') m'') - (MapDomRestrTo A C m (MapDomRestrBy C B m'' m')). - Proof. - unfold eqmap, eqm in |- *. intros. - rewrite (MapDomRestrTo_semantics A C (MapDomRestrBy A B m m') m'' a). - rewrite (MapDomRestrBy_semantics A B m m' a). - rewrite (MapDomRestrTo_semantics A C m (MapDomRestrBy C B m'' m') a). - rewrite (MapDomRestrBy_semantics C B m'' m' a). - case (MapGet C m'' a); case (MapGet B m' a); trivial. - Qed. - - Lemma MapDomRestrTo_By_comm : - forall (m:Map A) (m':Map B) (m'':Map C), - eqmap (MapDomRestrTo A C (MapDomRestrBy A B m m') m'') - (MapDomRestrBy A B (MapDomRestrTo A C m m'') m'). - Proof. - unfold eqmap, eqm in |- *. intros. - rewrite (MapDomRestrTo_semantics A C (MapDomRestrBy A B m m') m'' a). - rewrite (MapDomRestrBy_semantics A B m m' a). - rewrite (MapDomRestrBy_semantics A B (MapDomRestrTo A C m m'') m' a). - rewrite (MapDomRestrTo_semantics A C m m'' a). - case (MapGet C m'' a); case (MapGet B m' a); trivial. - Qed. - - Lemma MapDomRestrTo_To_comm : - forall (m:Map A) (m':Map B) (m'':Map C), - eqmap (MapDomRestrTo A C (MapDomRestrTo A B m m') m'') - (MapDomRestrTo A B (MapDomRestrTo A C m m'') m'). - Proof. - unfold eqmap, eqm in |- *. intros. - rewrite (MapDomRestrTo_semantics A C (MapDomRestrTo A B m m') m'' a). - rewrite (MapDomRestrTo_semantics A B m m' a). - rewrite (MapDomRestrTo_semantics A B (MapDomRestrTo A C m m'') m' a). - rewrite (MapDomRestrTo_semantics A C m m'' a). - case (MapGet C m'' a); case (MapGet B m' a); trivial. - Qed. - - Lemma MapMerge_DomRestrTo : - forall (m m':Map A) (m'':Map B), - eqmap (MapDomRestrTo A B (MapMerge A m m') m'') - (MapMerge A (MapDomRestrTo A B m m'') (MapDomRestrTo A B m' m'')). - Proof. - unfold eqmap, eqm in |- *. intros. - rewrite (MapDomRestrTo_semantics A B (MapMerge A m m') m'' a). - rewrite (MapMerge_semantics A m m' a). - rewrite - (MapMerge_semantics A (MapDomRestrTo A B m m'') - (MapDomRestrTo A B m' m'') a). - rewrite (MapDomRestrTo_semantics A B m' m'' a). - rewrite (MapDomRestrTo_semantics A B m m'' a). - case (MapGet B m'' a); case (MapGet A m' a); trivial. - Qed. - - Lemma MapMerge_DomRestrBy : - forall (m m':Map A) (m'':Map B), - eqmap (MapDomRestrBy A B (MapMerge A m m') m'') - (MapMerge A (MapDomRestrBy A B m m'') (MapDomRestrBy A B m' m'')). - Proof. - unfold eqmap, eqm in |- *. intros. - rewrite (MapDomRestrBy_semantics A B (MapMerge A m m') m'' a). - rewrite (MapMerge_semantics A m m' a). - rewrite - (MapMerge_semantics A (MapDomRestrBy A B m m'') - (MapDomRestrBy A B m' m'') a). - rewrite (MapDomRestrBy_semantics A B m' m'' a). - rewrite (MapDomRestrBy_semantics A B m m'' a). - case (MapGet B m'' a); case (MapGet A m' a); trivial. - Qed. - - Lemma MapDelta_empty_m_1 : forall m:Map A, MapDelta A (M0 A) m = m. - Proof. - trivial. - Qed. - - Lemma MapDelta_empty_m : forall m:Map A, eqmap (MapDelta A (M0 A) m) m. - Proof. - unfold eqmap, eqm in |- *. trivial. - Qed. - - Lemma MapDelta_m_empty_1 : forall m:Map A, MapDelta A m (M0 A) = m. - Proof. - simple induction m; trivial. - Qed. - - Lemma MapDelta_m_empty : forall m:Map A, eqmap (MapDelta A m (M0 A)) m. - Proof. - unfold eqmap, eqm in |- *. intros. rewrite MapDelta_m_empty_1. reflexivity. - Qed. - - Lemma MapDelta_nilpotent : forall m:Map A, eqmap (MapDelta A m m) (M0 A). - Proof. - unfold eqmap, eqm in |- *. intros. rewrite (MapDelta_semantics A m m a). - case (MapGet A m a); trivial. - Qed. - - Lemma MapDelta_as_Merge : - forall m m':Map A, - eqmap (MapDelta A m m') - (MapMerge A (MapDomRestrBy A A m m') (MapDomRestrBy A A m' m)). - Proof. - unfold eqmap, eqm in |- *. intros. - rewrite (MapDelta_semantics A m m' a). - rewrite - (MapMerge_semantics A (MapDomRestrBy A A m m') ( - MapDomRestrBy A A m' m) a). - rewrite (MapDomRestrBy_semantics A A m' m a). - rewrite (MapDomRestrBy_semantics A A m m' a). - case (MapGet A m a); case (MapGet A m' a); trivial. - Qed. - - Lemma MapDelta_as_DomRestrBy : - forall m m':Map A, - eqmap (MapDelta A m m') - (MapDomRestrBy A A (MapMerge A m m') (MapDomRestrTo A A m m')). - Proof. - unfold eqmap, eqm in |- *. intros. rewrite (MapDelta_semantics A m m' a). - rewrite - (MapDomRestrBy_semantics A A (MapMerge A m m') ( - MapDomRestrTo A A m m') a). - rewrite (MapDomRestrTo_semantics A A m m' a). rewrite (MapMerge_semantics A m m' a). - case (MapGet A m a); case (MapGet A m' a); trivial. - Qed. - - Lemma MapDelta_as_DomRestrBy_2 : - forall m m':Map A, - eqmap (MapDelta A m m') - (MapDomRestrBy A A (MapMerge A m m') (MapDomRestrTo A A m' m)). - Proof. - unfold eqmap, eqm in |- *. intros. rewrite (MapDelta_semantics A m m' a). - rewrite - (MapDomRestrBy_semantics A A (MapMerge A m m') ( - MapDomRestrTo A A m' m) a). - rewrite (MapDomRestrTo_semantics A A m' m a). rewrite (MapMerge_semantics A m m' a). - case (MapGet A m a); case (MapGet A m' a); trivial. - Qed. - - Lemma MapDelta_sym : - forall m m':Map A, eqmap (MapDelta A m m') (MapDelta A m' m). - Proof. - unfold eqmap, eqm in |- *. intros. rewrite (MapDelta_semantics A m m' a). - rewrite (MapDelta_semantics A m' m a). - case (MapGet A m a); case (MapGet A m' a); trivial. - Qed. - - Lemma MapDelta_ext : - forall m1 m2 m'1 m'2:Map A, - eqmap m1 m'1 -> - eqmap m2 m'2 -> eqmap (MapDelta A m1 m2) (MapDelta A m'1 m'2). - Proof. - unfold eqmap, eqm in |- *. intros. rewrite (MapDelta_semantics A m1 m2 a). - rewrite (MapDelta_semantics A m'1 m'2 a). rewrite (H a). rewrite (H0 a). reflexivity. - Qed. - - Lemma MapDelta_ext_l : - forall m1 m'1 m2:Map A, - eqmap m1 m'1 -> eqmap (MapDelta A m1 m2) (MapDelta A m'1 m2). - Proof. - intros. apply MapDelta_ext. assumption. - apply eqmap_refl. - Qed. - - Lemma MapDelta_ext_r : - forall m1 m2 m'2:Map A, - eqmap m2 m'2 -> eqmap (MapDelta A m1 m2) (MapDelta A m1 m'2). - Proof. - intros. apply MapDelta_ext. apply eqmap_refl. - assumption. - Qed. - - Lemma MapDom_Split_1 : - forall (m:Map A) (m':Map B), - eqmap m (MapMerge A (MapDomRestrTo A B m m') (MapDomRestrBy A B m m')). - Proof. - unfold eqmap, eqm in |- *. intros. - rewrite - (MapMerge_semantics A (MapDomRestrTo A B m m') ( - MapDomRestrBy A B m m') a). - rewrite (MapDomRestrBy_semantics A B m m' a). - rewrite (MapDomRestrTo_semantics A B m m' a). - case (MapGet B m' a); case (MapGet A m a); trivial. - Qed. - - Lemma MapDom_Split_2 : - forall (m:Map A) (m':Map B), - eqmap m (MapMerge A (MapDomRestrBy A B m m') (MapDomRestrTo A B m m')). - Proof. - unfold eqmap, eqm in |- *. intros. - rewrite - (MapMerge_semantics A (MapDomRestrBy A B m m') ( - MapDomRestrTo A B m m') a). - rewrite (MapDomRestrBy_semantics A B m m' a). - rewrite (MapDomRestrTo_semantics A B m m' a). - case (MapGet B m' a); case (MapGet A m a); trivial. - Qed. - - Lemma MapDom_Split_3 : - forall (m:Map A) (m':Map B), - eqmap - (MapDomRestrTo A A (MapDomRestrTo A B m m') (MapDomRestrBy A B m m')) - (M0 A). - Proof. - unfold eqmap, eqm in |- *. intros. - rewrite - (MapDomRestrTo_semantics A A (MapDomRestrTo A B m m') - (MapDomRestrBy A B m m') a). - rewrite (MapDomRestrBy_semantics A B m m' a). - rewrite (MapDomRestrTo_semantics A B m m' a). - case (MapGet B m' a); case (MapGet A m a); trivial. - Qed. - -End MapAxioms. - -Lemma MapDomRestrTo_ext : - forall (A B:Set) (m1:Map A) (m2:Map B) (m'1:Map A) - (m'2:Map B), - eqmap A m1 m'1 -> - eqmap B m2 m'2 -> - eqmap A (MapDomRestrTo A B m1 m2) (MapDomRestrTo A B m'1 m'2). -Proof. - unfold eqmap, eqm in |- *. intros. rewrite (MapDomRestrTo_semantics A B m1 m2 a). - rewrite (MapDomRestrTo_semantics A B m'1 m'2 a). rewrite (H a). rewrite (H0 a). reflexivity. -Qed. - -Lemma MapDomRestrTo_ext_l : - forall (A B:Set) (m1:Map A) (m2:Map B) (m'1:Map A), - eqmap A m1 m'1 -> - eqmap A (MapDomRestrTo A B m1 m2) (MapDomRestrTo A B m'1 m2). -Proof. - intros. apply MapDomRestrTo_ext; [ assumption | apply eqmap_refl ]. -Qed. - -Lemma MapDomRestrTo_ext_r : - forall (A B:Set) (m1:Map A) (m2 m'2:Map B), - eqmap B m2 m'2 -> - eqmap A (MapDomRestrTo A B m1 m2) (MapDomRestrTo A B m1 m'2). -Proof. - intros. apply MapDomRestrTo_ext; [ apply eqmap_refl | assumption ]. -Qed. - -Lemma MapDomRestrBy_ext : - forall (A B:Set) (m1:Map A) (m2:Map B) (m'1:Map A) - (m'2:Map B), - eqmap A m1 m'1 -> - eqmap B m2 m'2 -> - eqmap A (MapDomRestrBy A B m1 m2) (MapDomRestrBy A B m'1 m'2). -Proof. - unfold eqmap, eqm in |- *. intros. rewrite (MapDomRestrBy_semantics A B m1 m2 a). - rewrite (MapDomRestrBy_semantics A B m'1 m'2 a). rewrite (H a). rewrite (H0 a). reflexivity. -Qed. - -Lemma MapDomRestrBy_ext_l : - forall (A B:Set) (m1:Map A) (m2:Map B) (m'1:Map A), - eqmap A m1 m'1 -> - eqmap A (MapDomRestrBy A B m1 m2) (MapDomRestrBy A B m'1 m2). -Proof. - intros. apply MapDomRestrBy_ext; [ assumption | apply eqmap_refl ]. -Qed. - -Lemma MapDomRestrBy_ext_r : - forall (A B:Set) (m1:Map A) (m2 m'2:Map B), - eqmap B m2 m'2 -> - eqmap A (MapDomRestrBy A B m1 m2) (MapDomRestrBy A B m1 m'2). -Proof. - intros. apply MapDomRestrBy_ext; [ apply eqmap_refl | assumption ]. -Qed. - -Lemma MapDomRestrBy_m_m : - forall (A:Set) (m:Map A), - eqmap A (MapDomRestrBy A unit m (MapDom A m)) (M0 A). -Proof. - intros. apply eqmap_trans with (m' := MapDomRestrBy A A m m). apply eqmap_sym. - apply MapDomRestrBy_Dom. - apply MapDomRestrBy_m_m_1. -Qed. - -Lemma FSetDelta_assoc : - forall s s' s'':FSet, - eqmap unit (MapDelta _ (MapDelta _ s s') s'') - (MapDelta _ s (MapDelta _ s' s'')). -Proof. - unfold eqmap, eqm in |- *. intros. rewrite (MapDelta_semantics unit (MapDelta unit s s') s'' a). - rewrite (MapDelta_semantics unit s s' a). - rewrite (MapDelta_semantics unit s (MapDelta unit s' s'') a). - rewrite (MapDelta_semantics unit s' s'' a). - case (MapGet _ s a); case (MapGet _ s' a); case (MapGet _ s'' a); trivial. - intros. elim u. elim u1. reflexivity. -Qed. - -Lemma FSet_ext : - forall s s':FSet, - (forall a:ad, in_FSet a s = in_FSet a s') -> eqmap unit s s'. -Proof. - unfold in_FSet, eqmap, eqm in |- *. intros. elim (sumbool_of_bool (in_dom _ a s)). intro H0. - elim (in_dom_some _ s a H0). intros y H1. rewrite (H a) in H0. elim (in_dom_some _ s' a H0). - intros y' H2. rewrite H1. rewrite H2. elim y. elim y'. reflexivity. - intro H0. rewrite (in_dom_none _ s a H0). rewrite (H a) in H0. rewrite (in_dom_none _ s' a H0). - reflexivity. -Qed. - -Lemma FSetUnion_comm : - forall s s':FSet, eqmap unit (FSetUnion s s') (FSetUnion s' s). -Proof. - intros. apply FSet_ext. intro. rewrite in_FSet_union. rewrite in_FSet_union. apply orb_comm. -Qed. - -Lemma FSetUnion_assoc : - forall s s' s'':FSet, - eqmap unit (FSetUnion (FSetUnion s s') s'') - (FSetUnion s (FSetUnion s' s'')). -Proof. - exact (MapMerge_assoc unit). -Qed. - -Lemma FSetUnion_M0_s : forall s:FSet, eqmap unit (FSetUnion (M0 unit) s) s. -Proof. - exact (MapMerge_empty_m unit). -Qed. - -Lemma FSetUnion_s_M0 : forall s:FSet, eqmap unit (FSetUnion s (M0 unit)) s. -Proof. - exact (MapMerge_m_empty unit). -Qed. - -Lemma FSetUnion_idempotent : forall s:FSet, eqmap unit (FSetUnion s s) s. -Proof. - exact (MapMerge_idempotent unit). -Qed. - -Lemma FSetInter_comm : - forall s s':FSet, eqmap unit (FSetInter s s') (FSetInter s' s). -Proof. - intros. apply FSet_ext. intro. rewrite in_FSet_inter. rewrite in_FSet_inter. apply andb_comm. -Qed. - -Lemma FSetInter_assoc : - forall s s' s'':FSet, - eqmap unit (FSetInter (FSetInter s s') s'') - (FSetInter s (FSetInter s' s'')). -Proof. - exact (MapDomRestrTo_assoc unit unit unit). -Qed. - -Lemma FSetInter_M0_s : - forall s:FSet, eqmap unit (FSetInter (M0 unit) s) (M0 unit). -Proof. - exact (MapDomRestrTo_empty_m unit unit). -Qed. - -Lemma FSetInter_s_M0 : - forall s:FSet, eqmap unit (FSetInter s (M0 unit)) (M0 unit). -Proof. - exact (MapDomRestrTo_m_empty unit unit). -Qed. - -Lemma FSetInter_idempotent : forall s:FSet, eqmap unit (FSetInter s s) s. -Proof. - exact (MapDomRestrTo_idempotent unit). -Qed. - -Lemma FSetUnion_Inter_l : - forall s s' s'':FSet, - eqmap unit (FSetUnion (FSetInter s s') s'') - (FSetInter (FSetUnion s s'') (FSetUnion s' s'')). -Proof. - intros. apply FSet_ext. intro. rewrite in_FSet_union. rewrite in_FSet_inter. - rewrite in_FSet_inter. rewrite in_FSet_union. rewrite in_FSet_union. - case (in_FSet a s); case (in_FSet a s'); case (in_FSet a s''); reflexivity. -Qed. - -Lemma FSetUnion_Inter_r : - forall s s' s'':FSet, - eqmap unit (FSetUnion s (FSetInter s' s'')) - (FSetInter (FSetUnion s s') (FSetUnion s s'')). -Proof. - intros. apply FSet_ext. intro. rewrite in_FSet_union. rewrite in_FSet_inter. - rewrite in_FSet_inter. rewrite in_FSet_union. rewrite in_FSet_union. - case (in_FSet a s); case (in_FSet a s'); case (in_FSet a s''); reflexivity. -Qed. - -Lemma FSetInter_Union_l : - forall s s' s'':FSet, - eqmap unit (FSetInter (FSetUnion s s') s'') - (FSetUnion (FSetInter s s'') (FSetInter s' s'')). -Proof. - intros. apply FSet_ext. intro. rewrite in_FSet_inter. rewrite in_FSet_union. - rewrite in_FSet_union. rewrite in_FSet_inter. rewrite in_FSet_inter. - case (in_FSet a s); case (in_FSet a s'); case (in_FSet a s''); reflexivity. -Qed. - -Lemma FSetInter_Union_r : - forall s s' s'':FSet, - eqmap unit (FSetInter s (FSetUnion s' s'')) - (FSetUnion (FSetInter s s') (FSetInter s s'')). -Proof. - intros. apply FSet_ext. intro. rewrite in_FSet_inter. rewrite in_FSet_union. - rewrite in_FSet_union. rewrite in_FSet_inter. rewrite in_FSet_inter. - case (in_FSet a s); case (in_FSet a s'); case (in_FSet a s''); reflexivity. -Qed. \ No newline at end of file diff --git a/theories/IntMap/Mapc.v b/theories/IntMap/Mapc.v deleted file mode 100644 index 163373bf..00000000 --- a/theories/IntMap/Mapc.v +++ /dev/null @@ -1,539 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* - forall (a:ad) (y:A), MapPut A m a y = MapMerge A m (M1 A a y). - Proof. - intros. apply mapcanon_unique. exact (MapPut_canon A m H a y). - apply MapMerge_canon. assumption. - apply M1_canon. - apply MapPut_as_Merge. - Qed. - - Lemma MapPut_behind_as_Merge_c : - forall m:Map A, - mapcanon A m -> - forall (a:ad) (y:A), MapPut_behind A m a y = MapMerge A (M1 A a y) m. - Proof. - intros. apply mapcanon_unique. exact (MapPut_behind_canon A m H a y). - apply MapMerge_canon. apply M1_canon. - assumption. - apply MapPut_behind_as_Merge. - Qed. - - Lemma MapMerge_empty_m_c : forall m:Map A, MapMerge A (M0 A) m = m. - Proof. - trivial. - Qed. - - Lemma MapMerge_assoc_c : - forall m m' m'':Map A, - mapcanon A m -> - mapcanon A m' -> - mapcanon A m'' -> - MapMerge A (MapMerge A m m') m'' = MapMerge A m (MapMerge A m' m''). - Proof. - intros. apply mapcanon_unique. - apply MapMerge_canon; try assumption. apply MapMerge_canon; try assumption. - apply MapMerge_canon; try assumption. apply MapMerge_canon; try assumption. - apply MapMerge_assoc. - Qed. - - Lemma MapMerge_idempotent_c : - forall m:Map A, mapcanon A m -> MapMerge A m m = m. - Proof. - intros. apply mapcanon_unique. apply MapMerge_canon; assumption. - assumption. - apply MapMerge_idempotent. - Qed. - - Lemma MapMerge_RestrTo_l_c : - forall m m' m'':Map A, - mapcanon A m -> - mapcanon A m'' -> - MapMerge A (MapDomRestrTo A A m m') m'' = - MapDomRestrTo A A (MapMerge A m m'') (MapMerge A m' m''). - Proof. - intros. apply mapcanon_unique. apply MapMerge_canon. apply MapDomRestrTo_canon; assumption. - assumption. - apply MapDomRestrTo_canon; apply MapMerge_canon; assumption. - apply MapMerge_RestrTo_l. - Qed. - - Lemma MapRemove_as_RestrBy_c : - forall m:Map A, - mapcanon A m -> - forall (a:ad) (y:B), MapRemove A m a = MapDomRestrBy A B m (M1 B a y). - Proof. - intros. apply mapcanon_unique. apply MapRemove_canon; assumption. - apply MapDomRestrBy_canon; assumption. - apply MapRemove_as_RestrBy. - Qed. - - Lemma MapDomRestrTo_assoc_c : - forall (m:Map A) (m':Map B) (m'':Map C), - mapcanon A m -> - MapDomRestrTo A C (MapDomRestrTo A B m m') m'' = - MapDomRestrTo A B m (MapDomRestrTo B C m' m''). - Proof. - intros. apply mapcanon_unique. apply MapDomRestrTo_canon; try assumption. - apply MapDomRestrTo_canon; try assumption. - apply MapDomRestrTo_canon; try assumption. - apply MapDomRestrTo_assoc. - Qed. - - Lemma MapDomRestrTo_idempotent_c : - forall m:Map A, mapcanon A m -> MapDomRestrTo A A m m = m. - Proof. - intros. apply mapcanon_unique. apply MapDomRestrTo_canon; assumption. - assumption. - apply MapDomRestrTo_idempotent. - Qed. - - Lemma MapDomRestrTo_Dom_c : - forall (m:Map A) (m':Map B), - mapcanon A m -> - MapDomRestrTo A B m m' = MapDomRestrTo A unit m (MapDom B m'). - Proof. - intros. apply mapcanon_unique. apply MapDomRestrTo_canon; assumption. - apply MapDomRestrTo_canon; assumption. - apply MapDomRestrTo_Dom. - Qed. - - Lemma MapDomRestrBy_Dom_c : - forall (m:Map A) (m':Map B), - mapcanon A m -> - MapDomRestrBy A B m m' = MapDomRestrBy A unit m (MapDom B m'). - Proof. - intros. apply mapcanon_unique. apply MapDomRestrBy_canon; assumption. - apply MapDomRestrBy_canon; assumption. - apply MapDomRestrBy_Dom. - Qed. - - Lemma MapDomRestrBy_By_c : - forall (m:Map A) (m' m'':Map B), - mapcanon A m -> - MapDomRestrBy A B (MapDomRestrBy A B m m') m'' = - MapDomRestrBy A B m (MapMerge B m' m''). - Proof. - intros. apply mapcanon_unique. apply MapDomRestrBy_canon; try assumption. - apply MapDomRestrBy_canon; try assumption. - apply MapDomRestrBy_canon; try assumption. - apply MapDomRestrBy_By. - Qed. - - Lemma MapDomRestrBy_By_comm_c : - forall (m:Map A) (m':Map B) (m'':Map C), - mapcanon A m -> - MapDomRestrBy A C (MapDomRestrBy A B m m') m'' = - MapDomRestrBy A B (MapDomRestrBy A C m m'') m'. - Proof. - intros. apply mapcanon_unique. apply MapDomRestrBy_canon. - apply MapDomRestrBy_canon; assumption. - apply MapDomRestrBy_canon. apply MapDomRestrBy_canon; assumption. - apply MapDomRestrBy_By_comm. - Qed. - - Lemma MapDomRestrBy_To_c : - forall (m:Map A) (m':Map B) (m'':Map C), - mapcanon A m -> - MapDomRestrBy A C (MapDomRestrTo A B m m') m'' = - MapDomRestrTo A B m (MapDomRestrBy B C m' m''). - Proof. - intros. apply mapcanon_unique. apply MapDomRestrBy_canon. - apply MapDomRestrTo_canon; assumption. - apply MapDomRestrTo_canon; assumption. - apply MapDomRestrBy_To. - Qed. - - Lemma MapDomRestrBy_To_comm_c : - forall (m:Map A) (m':Map B) (m'':Map C), - mapcanon A m -> - MapDomRestrBy A C (MapDomRestrTo A B m m') m'' = - MapDomRestrTo A B (MapDomRestrBy A C m m'') m'. - Proof. - intros. apply mapcanon_unique. apply MapDomRestrBy_canon. - apply MapDomRestrTo_canon; assumption. - apply MapDomRestrTo_canon. apply MapDomRestrBy_canon; assumption. - apply MapDomRestrBy_To_comm. - Qed. - - Lemma MapDomRestrTo_By_c : - forall (m:Map A) (m':Map B) (m'':Map C), - mapcanon A m -> - MapDomRestrTo A C (MapDomRestrBy A B m m') m'' = - MapDomRestrTo A C m (MapDomRestrBy C B m'' m'). - Proof. - intros. apply mapcanon_unique. apply MapDomRestrTo_canon. - apply MapDomRestrBy_canon; assumption. - apply MapDomRestrTo_canon; assumption. - apply MapDomRestrTo_By. - Qed. - - Lemma MapDomRestrTo_By_comm_c : - forall (m:Map A) (m':Map B) (m'':Map C), - mapcanon A m -> - MapDomRestrTo A C (MapDomRestrBy A B m m') m'' = - MapDomRestrBy A B (MapDomRestrTo A C m m'') m'. - Proof. - intros. apply mapcanon_unique. apply MapDomRestrTo_canon. - apply MapDomRestrBy_canon; assumption. - apply MapDomRestrBy_canon. apply MapDomRestrTo_canon; assumption. - apply MapDomRestrTo_By_comm. - Qed. - - Lemma MapDomRestrTo_To_comm_c : - forall (m:Map A) (m':Map B) (m'':Map C), - mapcanon A m -> - MapDomRestrTo A C (MapDomRestrTo A B m m') m'' = - MapDomRestrTo A B (MapDomRestrTo A C m m'') m'. - Proof. - intros. apply mapcanon_unique. apply MapDomRestrTo_canon. - apply MapDomRestrTo_canon; assumption. - apply MapDomRestrTo_canon. apply MapDomRestrTo_canon; assumption. - apply MapDomRestrTo_To_comm. - Qed. - - Lemma MapMerge_DomRestrTo_c : - forall (m m':Map A) (m'':Map B), - mapcanon A m -> - mapcanon A m' -> - MapDomRestrTo A B (MapMerge A m m') m'' = - MapMerge A (MapDomRestrTo A B m m'') (MapDomRestrTo A B m' m''). - Proof. - intros. apply mapcanon_unique. apply MapDomRestrTo_canon. - apply MapMerge_canon; assumption. - apply MapMerge_canon. apply MapDomRestrTo_canon; assumption. - apply MapDomRestrTo_canon; assumption. - apply MapMerge_DomRestrTo. - Qed. - - Lemma MapMerge_DomRestrBy_c : - forall (m m':Map A) (m'':Map B), - mapcanon A m -> - mapcanon A m' -> - MapDomRestrBy A B (MapMerge A m m') m'' = - MapMerge A (MapDomRestrBy A B m m'') (MapDomRestrBy A B m' m''). - Proof. - intros. apply mapcanon_unique. apply MapDomRestrBy_canon. apply MapMerge_canon; assumption. - apply MapMerge_canon. apply MapDomRestrBy_canon; assumption. - apply MapDomRestrBy_canon; assumption. - apply MapMerge_DomRestrBy. - Qed. - - Lemma MapDelta_nilpotent_c : - forall m:Map A, mapcanon A m -> MapDelta A m m = M0 A. - Proof. - intros. apply mapcanon_unique. apply MapDelta_canon; assumption. - apply M0_canon. - apply MapDelta_nilpotent. - Qed. - - Lemma MapDelta_as_Merge_c : - forall m m':Map A, - mapcanon A m -> - mapcanon A m' -> - MapDelta A m m' = - MapMerge A (MapDomRestrBy A A m m') (MapDomRestrBy A A m' m). - Proof. - intros. apply mapcanon_unique. apply MapDelta_canon; assumption. - apply MapMerge_canon; apply MapDomRestrBy_canon; assumption. - apply MapDelta_as_Merge. - Qed. - - Lemma MapDelta_as_DomRestrBy_c : - forall m m':Map A, - mapcanon A m -> - mapcanon A m' -> - MapDelta A m m' = - MapDomRestrBy A A (MapMerge A m m') (MapDomRestrTo A A m m'). - Proof. - intros. apply mapcanon_unique. apply MapDelta_canon; assumption. - apply MapDomRestrBy_canon. apply MapMerge_canon; assumption. - apply MapDelta_as_DomRestrBy. - Qed. - - Lemma MapDelta_as_DomRestrBy_2_c : - forall m m':Map A, - mapcanon A m -> - mapcanon A m' -> - MapDelta A m m' = - MapDomRestrBy A A (MapMerge A m m') (MapDomRestrTo A A m' m). - Proof. - intros. apply mapcanon_unique. apply MapDelta_canon; assumption. - apply MapDomRestrBy_canon. apply MapMerge_canon; assumption. - apply MapDelta_as_DomRestrBy_2. - Qed. - - Lemma MapDelta_sym_c : - forall m m':Map A, - mapcanon A m -> mapcanon A m' -> MapDelta A m m' = MapDelta A m' m. - Proof. - intros. apply mapcanon_unique. apply MapDelta_canon; assumption. - apply MapDelta_canon; assumption. apply MapDelta_sym. - Qed. - - Lemma MapDom_Split_1_c : - forall (m:Map A) (m':Map B), - mapcanon A m -> - m = MapMerge A (MapDomRestrTo A B m m') (MapDomRestrBy A B m m'). - Proof. - intros. apply mapcanon_unique. assumption. - apply MapMerge_canon. apply MapDomRestrTo_canon; assumption. - apply MapDomRestrBy_canon; assumption. - apply MapDom_Split_1. - Qed. - - Lemma MapDom_Split_2_c : - forall (m:Map A) (m':Map B), - mapcanon A m -> - m = MapMerge A (MapDomRestrBy A B m m') (MapDomRestrTo A B m m'). - Proof. - intros. apply mapcanon_unique. assumption. - apply MapMerge_canon. apply MapDomRestrBy_canon; assumption. - apply MapDomRestrTo_canon; assumption. - apply MapDom_Split_2. - Qed. - - Lemma MapDom_Split_3_c : - forall (m:Map A) (m':Map B), - mapcanon A m -> - MapDomRestrTo A A (MapDomRestrTo A B m m') (MapDomRestrBy A B m m') = - M0 A. - Proof. - intros. apply mapcanon_unique. apply MapDomRestrTo_canon. - apply MapDomRestrTo_canon; assumption. - apply M0_canon. - apply MapDom_Split_3. - Qed. - - Lemma Map_of_alist_of_Map_c : - forall m:Map A, mapcanon A m -> Map_of_alist A (alist_of_Map A m) = m. - Proof. - intros. apply mapcanon_unique; try assumption. apply Map_of_alist_canon. - apply Map_of_alist_of_Map. - Qed. - - Lemma alist_of_Map_of_alist_c : - forall l:alist A, - alist_sorted_2 A l -> alist_of_Map A (Map_of_alist A l) = l. - Proof. - intros. apply alist_canonical. apply alist_of_Map_of_alist. - apply alist_of_Map_sorts2. - assumption. - Qed. - - Lemma MapSubset_antisym_c : - forall (m:Map A) (m':Map B), - mapcanon A m -> - mapcanon B m' -> - MapSubset A B m m' -> MapSubset B A m' m -> MapDom A m = MapDom B m'. - Proof. - intros. apply (mapcanon_unique unit). apply MapDom_canon; assumption. - apply MapDom_canon; assumption. - apply MapSubset_antisym; assumption. - Qed. - - Lemma FSubset_antisym_c : - forall s s':FSet, - mapcanon unit s -> - mapcanon unit s' -> MapSubset _ _ s s' -> MapSubset _ _ s' s -> s = s'. - Proof. - intros. apply (mapcanon_unique unit); try assumption. apply FSubset_antisym; assumption. - Qed. - - Lemma MapDisjoint_empty_c : - forall m:Map A, mapcanon A m -> MapDisjoint A A m m -> m = M0 A. - Proof. - intros. apply mapcanon_unique; try assumption; try apply M0_canon. - apply MapDisjoint_empty; assumption. - Qed. - - Lemma MapDelta_disjoint_c : - forall m m':Map A, - mapcanon A m -> - mapcanon A m' -> - MapDisjoint A A m m' -> MapDelta A m m' = MapMerge A m m'. - Proof. - intros. apply mapcanon_unique. apply MapDelta_canon; assumption. - apply MapMerge_canon; assumption. apply MapDelta_disjoint; assumption. - Qed. - -End MapC. - -Lemma FSetDelta_assoc_c : - forall s s' s'':FSet, - mapcanon unit s -> - mapcanon unit s' -> - mapcanon unit s'' -> - MapDelta _ (MapDelta _ s s') s'' = MapDelta _ s (MapDelta _ s' s''). -Proof. - intros. apply (mapcanon_unique unit). apply MapDelta_canon. apply MapDelta_canon; assumption. - assumption. - apply MapDelta_canon. assumption. - apply MapDelta_canon; assumption. - apply FSetDelta_assoc; assumption. -Qed. - -Lemma FSet_ext_c : - forall s s':FSet, - mapcanon unit s -> - mapcanon unit s' -> (forall a:ad, in_FSet a s = in_FSet a s') -> s = s'. -Proof. - intros. apply (mapcanon_unique unit); try assumption. apply FSet_ext. assumption. -Qed. - -Lemma FSetUnion_comm_c : - forall s s':FSet, - mapcanon unit s -> mapcanon unit s' -> FSetUnion s s' = FSetUnion s' s. -Proof. - intros. - apply (mapcanon_unique unit); - try (unfold FSetUnion in |- *; apply MapMerge_canon; assumption). - apply FSetUnion_comm. -Qed. - -Lemma FSetUnion_assoc_c : - forall s s' s'':FSet, - mapcanon unit s -> - mapcanon unit s' -> - mapcanon unit s'' -> - FSetUnion (FSetUnion s s') s'' = FSetUnion s (FSetUnion s' s''). -Proof. - exact (MapMerge_assoc_c unit). -Qed. - -Lemma FSetUnion_M0_s_c : forall s:FSet, FSetUnion (M0 unit) s = s. -Proof. - exact (MapMerge_empty_m_c unit). -Qed. - -Lemma FSetUnion_s_M0_c : forall s:FSet, FSetUnion s (M0 unit) = s. -Proof. - exact (MapMerge_m_empty_1 unit). -Qed. - -Lemma FSetUnion_idempotent : - forall s:FSet, mapcanon unit s -> FSetUnion s s = s. -Proof. - exact (MapMerge_idempotent_c unit). -Qed. - -Lemma FSetInter_comm_c : - forall s s':FSet, - mapcanon unit s -> mapcanon unit s' -> FSetInter s s' = FSetInter s' s. -Proof. - intros. - apply (mapcanon_unique unit); - try (unfold FSetInter in |- *; apply MapDomRestrTo_canon; assumption). - apply FSetInter_comm. -Qed. - -Lemma FSetInter_assoc_c : - forall s s' s'':FSet, - mapcanon unit s -> - FSetInter (FSetInter s s') s'' = FSetInter s (FSetInter s' s''). -Proof. - exact (MapDomRestrTo_assoc_c unit unit unit). -Qed. - -Lemma FSetInter_M0_s_c : forall s:FSet, FSetInter (M0 unit) s = M0 unit. -Proof. - trivial. -Qed. - -Lemma FSetInter_s_M0_c : forall s:FSet, FSetInter s (M0 unit) = M0 unit. -Proof. - exact (MapDomRestrTo_m_empty_1 unit unit). -Qed. - -Lemma FSetInter_idempotent : - forall s:FSet, mapcanon unit s -> FSetInter s s = s. -Proof. - exact (MapDomRestrTo_idempotent_c unit). -Qed. - -Lemma FSetUnion_Inter_l_c : - forall s s' s'':FSet, - mapcanon unit s -> - mapcanon unit s'' -> - FSetUnion (FSetInter s s') s'' = - FSetInter (FSetUnion s s'') (FSetUnion s' s''). -Proof. - intros. apply (mapcanon_unique unit). unfold FSetUnion in |- *. apply MapMerge_canon; try assumption. - unfold FSetInter in |- *. apply MapDomRestrTo_canon; assumption. - unfold FSetInter in |- *; unfold FSetUnion in |- *; - apply MapDomRestrTo_canon; apply MapMerge_canon; - assumption. - apply FSetUnion_Inter_l. -Qed. - -Lemma FSetUnion_Inter_r : - forall s s' s'':FSet, - mapcanon unit s -> - mapcanon unit s' -> - FSetUnion s (FSetInter s' s'') = - FSetInter (FSetUnion s s') (FSetUnion s s''). -Proof. - intros. apply (mapcanon_unique unit). unfold FSetUnion in |- *. apply MapMerge_canon; try assumption. - unfold FSetInter in |- *. apply MapDomRestrTo_canon; assumption. - unfold FSetInter in |- *; unfold FSetUnion in |- *; - apply MapDomRestrTo_canon; apply MapMerge_canon; - assumption. - apply FSetUnion_Inter_r. -Qed. - -Lemma FSetInter_Union_l_c : - forall s s' s'':FSet, - mapcanon unit s -> - mapcanon unit s' -> - FSetInter (FSetUnion s s') s'' = - FSetUnion (FSetInter s s'') (FSetInter s' s''). -Proof. - intros. apply (mapcanon_unique unit). unfold FSetInter in |- *. - apply MapDomRestrTo_canon; try assumption. unfold FSetUnion in |- *. - apply MapMerge_canon; assumption. - unfold FSetUnion in |- *; unfold FSetInter in |- *; apply MapMerge_canon; - apply MapDomRestrTo_canon; assumption. - apply FSetInter_Union_l. -Qed. - -Lemma FSetInter_Union_r : - forall s s' s'':FSet, - mapcanon unit s -> - mapcanon unit s' -> - FSetInter s (FSetUnion s' s'') = - FSetUnion (FSetInter s s') (FSetInter s s''). -Proof. - intros. apply (mapcanon_unique unit). unfold FSetInter in |- *. - apply MapDomRestrTo_canon; try assumption. - unfold FSetUnion in |- *. apply MapMerge_canon; unfold FSetInter in |- *; apply MapDomRestrTo_canon; - assumption. - apply FSetInter_Union_r. -Qed. \ No newline at end of file diff --git a/theories/IntMap/Mapcanon.v b/theories/IntMap/Mapcanon.v deleted file mode 100644 index 33741b98..00000000 --- a/theories/IntMap/Mapcanon.v +++ /dev/null @@ -1,401 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* Prop := - | M0_canon : mapcanon (M0 A) - | M1_canon : forall (a:ad) (y:A), mapcanon (M1 A a y) - | M2_canon : - forall m1 m2:Map A, - mapcanon m1 -> - mapcanon m2 -> 2 <= MapCard A (M2 A m1 m2) -> mapcanon (M2 A m1 m2). - - Lemma mapcanon_M2 : - forall m1 m2:Map A, mapcanon (M2 A m1 m2) -> 2 <= MapCard A (M2 A m1 m2). - Proof. - intros. inversion H. assumption. - Qed. - - Lemma mapcanon_M2_1 : - forall m1 m2:Map A, mapcanon (M2 A m1 m2) -> mapcanon m1. - Proof. - intros. inversion H. assumption. - Qed. - - Lemma mapcanon_M2_2 : - forall m1 m2:Map A, mapcanon (M2 A m1 m2) -> mapcanon m2. - Proof. - intros. inversion H. assumption. - Qed. - - Lemma M2_eqmap_1 : - forall m0 m1 m2 m3:Map A, - eqmap A (M2 A m0 m1) (M2 A m2 m3) -> eqmap A m0 m2. - Proof. - unfold eqmap, eqm in |- *. intros. rewrite <- (Ndouble_div2 a). - rewrite <- (MapGet_M2_bit_0_0 A _ (Ndouble_bit0 a) m0 m1). - rewrite <- (MapGet_M2_bit_0_0 A _ (Ndouble_bit0 a) m2 m3). - exact (H (Ndouble a)). - Qed. - - Lemma M2_eqmap_2 : - forall m0 m1 m2 m3:Map A, - eqmap A (M2 A m0 m1) (M2 A m2 m3) -> eqmap A m1 m3. - Proof. - unfold eqmap, eqm in |- *. intros. rewrite <- (Ndouble_plus_one_div2 a). - rewrite <- (MapGet_M2_bit_0_1 A _ (Ndouble_plus_one_bit0 a) m0 m1). - rewrite <- (MapGet_M2_bit_0_1 A _ (Ndouble_plus_one_bit0 a) m2 m3). - exact (H (Ndouble_plus_one a)). - Qed. - - Lemma mapcanon_unique : - forall m m':Map A, mapcanon m -> mapcanon m' -> eqmap A m m' -> m = m'. - Proof. - simple induction m. simple induction m'. trivial. - intros a y H H0 H1. cut (None = MapGet A (M1 A a y) a). simpl in |- *. rewrite (Neqb_correct a). - intro. discriminate H2. - exact (H1 a). - intros. cut (2 <= MapCard A (M0 A)). intro. elim (le_Sn_O _ H4). - rewrite (MapCard_ext A _ _ H3). exact (mapcanon_M2 _ _ H2). - intros a y. simple induction m'. intros. cut (MapGet A (M1 A a y) a = None). simpl in |- *. - rewrite (Neqb_correct a). intro. discriminate H2. - exact (H1 a). - intros a0 y0 H H0 H1. cut (MapGet A (M1 A a y) a = MapGet A (M1 A a0 y0) a). simpl in |- *. - rewrite (Neqb_correct a). intro. elim (sumbool_of_bool (Neqb a0 a)). intro H3. - rewrite H3 in H2. inversion H2. rewrite (Neqb_complete _ _ H3). reflexivity. - intro H3. rewrite H3 in H2. discriminate H2. - exact (H1 a). - intros. cut (2 <= MapCard A (M1 A a y)). intro. elim (le_Sn_O _ (le_S_n _ _ H4)). - rewrite (MapCard_ext A _ _ H3). exact (mapcanon_M2 _ _ H2). - simple induction m'. intros. cut (2 <= MapCard A (M0 A)). intro. elim (le_Sn_O _ H4). - rewrite <- (MapCard_ext A _ _ H3). exact (mapcanon_M2 _ _ H1). - intros a y H1 H2 H3. cut (2 <= MapCard A (M1 A a y)). intro. - elim (le_Sn_O _ (le_S_n _ _ H4)). - rewrite <- (MapCard_ext A _ _ H3). exact (mapcanon_M2 _ _ H1). - intros. rewrite (H m2). rewrite (H0 m3). reflexivity. - exact (mapcanon_M2_2 _ _ H3). - exact (mapcanon_M2_2 _ _ H4). - exact (M2_eqmap_2 _ _ _ _ H5). - exact (mapcanon_M2_1 _ _ H3). - exact (mapcanon_M2_1 _ _ H4). - exact (M2_eqmap_1 _ _ _ _ H5). - Qed. - - Lemma MapPut1_canon : - forall (p:positive) (a a':ad) (y y':A), mapcanon (MapPut1 A a y a' y' p). - Proof. - simple induction p. simpl in |- *. intros. case (Nbit0 a). apply M2_canon. apply M1_canon. - apply M1_canon. - apply le_n. - apply M2_canon. apply M1_canon. - apply M1_canon. - apply le_n. - simpl in |- *. intros. case (Nbit0 a). apply M2_canon. apply M0_canon. - apply H. - simpl in |- *. rewrite MapCard_Put1_equals_2. apply le_n. - apply M2_canon. apply H. - apply M0_canon. - simpl in |- *. rewrite MapCard_Put1_equals_2. apply le_n. - simpl in |- *. simpl in |- *. intros. case (Nbit0 a). apply M2_canon. apply M1_canon. - apply M1_canon. - simpl in |- *. apply le_n. - apply M2_canon. apply M1_canon. - apply M1_canon. - simpl in |- *. apply le_n. - Qed. - - Lemma MapPut_canon : - forall m:Map A, - mapcanon m -> forall (a:ad) (y:A), mapcanon (MapPut A m a y). - Proof. - simple induction m. intros. simpl in |- *. apply M1_canon. - intros a0 y0 H a y. simpl in |- *. case (Nxor a0 a). apply M1_canon. - intro. apply MapPut1_canon. - intros. simpl in |- *. elim a. apply M2_canon. apply H. exact (mapcanon_M2_1 m0 m1 H1). - exact (mapcanon_M2_2 m0 m1 H1). - simpl in |- *. apply le_trans with (m := MapCard A m0 + MapCard A m1). exact (mapcanon_M2 _ _ H1). - apply plus_le_compat. exact (MapCard_Put_lb A m0 N0 y). - apply le_n. - intro. case p. intro. apply M2_canon. exact (mapcanon_M2_1 m0 m1 H1). - apply H0. exact (mapcanon_M2_2 m0 m1 H1). - simpl in |- *. apply le_trans with (m := MapCard A m0 + MapCard A m1). - exact (mapcanon_M2 m0 m1 H1). - apply plus_le_compat_l. exact (MapCard_Put_lb A m1 (Npos p0) y). - intro. apply M2_canon. apply H. exact (mapcanon_M2_1 m0 m1 H1). - exact (mapcanon_M2_2 m0 m1 H1). - simpl in |- *. apply le_trans with (m := MapCard A m0 + MapCard A m1). - exact (mapcanon_M2 m0 m1 H1). - apply plus_le_compat_r. exact (MapCard_Put_lb A m0 (Npos p0) y). - apply M2_canon. apply (mapcanon_M2_1 m0 m1 H1). - apply H0. apply (mapcanon_M2_2 m0 m1 H1). - simpl in |- *. apply le_trans with (m := MapCard A m0 + MapCard A m1). - exact (mapcanon_M2 m0 m1 H1). - apply plus_le_compat_l. exact (MapCard_Put_lb A m1 N0 y). - Qed. - - Lemma MapPut_behind_canon : - forall m:Map A, - mapcanon m -> forall (a:ad) (y:A), mapcanon (MapPut_behind A m a y). - Proof. - simple induction m. intros. simpl in |- *. apply M1_canon. - intros a0 y0 H a y. simpl in |- *. case (Nxor a0 a). apply M1_canon. - intro. apply MapPut1_canon. - intros. simpl in |- *. elim a. apply M2_canon. apply H. exact (mapcanon_M2_1 m0 m1 H1). - exact (mapcanon_M2_2 m0 m1 H1). - simpl in |- *. apply le_trans with (m := MapCard A m0 + MapCard A m1). exact (mapcanon_M2 _ _ H1). - apply plus_le_compat. rewrite MapCard_Put_behind_Put. exact (MapCard_Put_lb A m0 N0 y). - apply le_n. - intro. case p. intro. apply M2_canon. exact (mapcanon_M2_1 m0 m1 H1). - apply H0. exact (mapcanon_M2_2 m0 m1 H1). - simpl in |- *. apply le_trans with (m := MapCard A m0 + MapCard A m1). - exact (mapcanon_M2 m0 m1 H1). - apply plus_le_compat_l. rewrite MapCard_Put_behind_Put. exact (MapCard_Put_lb A m1 (Npos p0) y). - intro. apply M2_canon. apply H. exact (mapcanon_M2_1 m0 m1 H1). - exact (mapcanon_M2_2 m0 m1 H1). - simpl in |- *. apply le_trans with (m := MapCard A m0 + MapCard A m1). - exact (mapcanon_M2 m0 m1 H1). - apply plus_le_compat_r. rewrite MapCard_Put_behind_Put. exact (MapCard_Put_lb A m0 (Npos p0) y). - apply M2_canon. apply (mapcanon_M2_1 m0 m1 H1). - apply H0. apply (mapcanon_M2_2 m0 m1 H1). - simpl in |- *. apply le_trans with (m := MapCard A m0 + MapCard A m1). - exact (mapcanon_M2 m0 m1 H1). - apply plus_le_compat_l. rewrite MapCard_Put_behind_Put. exact (MapCard_Put_lb A m1 N0 y). - Qed. - - Lemma makeM2_canon : - forall m m':Map A, mapcanon m -> mapcanon m' -> mapcanon (makeM2 A m m'). - Proof. - intro. case m. intro. case m'. intros. exact M0_canon. - intros a y H H0. exact (M1_canon (Ndouble_plus_one a) y). - intros. simpl in |- *. apply M2_canon; try assumption. exact (mapcanon_M2 m0 m1 H0). - intros a y m'. case m'. intros. exact (M1_canon (Ndouble a) y). - intros a0 y0 H H0. simpl in |- *. apply M2_canon; try assumption. apply le_n. - intros. simpl in |- *. apply M2_canon; try assumption. - apply le_trans with (m := MapCard A (M2 A m0 m1)). exact (mapcanon_M2 _ _ H0). - exact (le_plus_r (MapCard A (M1 A a y)) (MapCard A (M2 A m0 m1))). - simpl in |- *. intros. apply M2_canon; try assumption. - apply le_trans with (m := MapCard A (M2 A m0 m1)). exact (mapcanon_M2 _ _ H). - exact (le_plus_l (MapCard A (M2 A m0 m1)) (MapCard A m')). - Qed. - - Fixpoint MapCanonicalize (m:Map A) : Map A := - match m with - | M2 m0 m1 => makeM2 A (MapCanonicalize m0) (MapCanonicalize m1) - | _ => m - end. - - Lemma mapcanon_exists_1 : forall m:Map A, eqmap A m (MapCanonicalize m). - Proof. - simple induction m. apply eqmap_refl. - intros. apply eqmap_refl. - intros. simpl in |- *. unfold eqmap, eqm in |- *. intro. - rewrite (makeM2_M2 A (MapCanonicalize m0) (MapCanonicalize m1) a). - rewrite MapGet_M2_bit_0_if. rewrite MapGet_M2_bit_0_if. - rewrite <- (H (Ndiv2 a)). rewrite <- (H0 (Ndiv2 a)). reflexivity. - Qed. - - Lemma mapcanon_exists_2 : forall m:Map A, mapcanon (MapCanonicalize m). - Proof. - simple induction m. apply M0_canon. - intros. simpl in |- *. apply M1_canon. - intros. simpl in |- *. apply makeM2_canon; assumption. - Qed. - - Lemma mapcanon_exists : - forall m:Map A, {m' : Map A | eqmap A m m' /\ mapcanon m'}. - Proof. - intro. split with (MapCanonicalize m). split. apply mapcanon_exists_1. - apply mapcanon_exists_2. - Qed. - - Lemma MapRemove_canon : - forall m:Map A, mapcanon m -> forall a:ad, mapcanon (MapRemove A m a). - Proof. - simple induction m. intros. exact M0_canon. - intros a y H a0. simpl in |- *. case (Neqb a a0). exact M0_canon. - assumption. - intros. simpl in |- *. case (Nbit0 a). apply makeM2_canon. exact (mapcanon_M2_1 _ _ H1). - apply H0. exact (mapcanon_M2_2 _ _ H1). - apply makeM2_canon. apply H. exact (mapcanon_M2_1 _ _ H1). - exact (mapcanon_M2_2 _ _ H1). - Qed. - - Lemma MapMerge_canon : - forall m m':Map A, mapcanon m -> mapcanon m' -> mapcanon (MapMerge A m m'). - Proof. - simple induction m. intros. exact H0. - simpl in |- *. intros a y m' H H0. exact (MapPut_behind_canon m' H0 a y). - simple induction m'. intros. exact H1. - intros a y H1 H2. unfold MapMerge in |- *. exact (MapPut_canon _ H1 a y). - intros. simpl in |- *. apply M2_canon. apply H. exact (mapcanon_M2_1 _ _ H3). - exact (mapcanon_M2_1 _ _ H4). - apply H0. exact (mapcanon_M2_2 _ _ H3). - exact (mapcanon_M2_2 _ _ H4). - change (2 <= MapCard A (MapMerge A (M2 A m0 m1) (M2 A m2 m3))) in |- *. - apply le_trans with (m := MapCard A (M2 A m0 m1)). exact (mapcanon_M2 _ _ H3). - exact (MapMerge_Card_lb_l A (M2 A m0 m1) (M2 A m2 m3)). - Qed. - - Lemma MapDelta_canon : - forall m m':Map A, mapcanon m -> mapcanon m' -> mapcanon (MapDelta A m m'). - Proof. - simple induction m. intros. exact H0. - simpl in |- *. intros a y m' H H0. case (MapGet A m' a). - intro. exact (MapRemove_canon m' H0 a). - exact (MapPut_canon m' H0 a y). - simple induction m'. intros. exact H1. - unfold MapDelta in |- *. intros a y H1 H2. case (MapGet A (M2 A m0 m1) a). - intro. exact (MapRemove_canon _ H1 a). - exact (MapPut_canon _ H1 a y). - intros. simpl in |- *. apply makeM2_canon. apply H. exact (mapcanon_M2_1 _ _ H3). - exact (mapcanon_M2_1 _ _ H4). - apply H0. exact (mapcanon_M2_2 _ _ H3). - exact (mapcanon_M2_2 _ _ H4). - Qed. - - Variable B : Set. - - Lemma MapDomRestrTo_canon : - forall m:Map A, - mapcanon m -> forall m':Map B, mapcanon (MapDomRestrTo A B m m'). - Proof. - simple induction m. intros. exact M0_canon. - simpl in |- *. intros a y H m'. case (MapGet B m' a). - intro. apply M1_canon. - exact M0_canon. - simple induction m'. exact M0_canon. - unfold MapDomRestrTo in |- *. intros a y. case (MapGet A (M2 A m0 m1) a). - intro. apply M1_canon. - exact M0_canon. - intros. simpl in |- *. apply makeM2_canon. apply H. exact (mapcanon_M2_1 m0 m1 H1). - apply H0. exact (mapcanon_M2_2 m0 m1 H1). - Qed. - - Lemma MapDomRestrBy_canon : - forall m:Map A, - mapcanon m -> forall m':Map B, mapcanon (MapDomRestrBy A B m m'). - Proof. - simple induction m. intros. exact M0_canon. - simpl in |- *. intros a y H m'. case (MapGet B m' a); try assumption. - intro. exact M0_canon. - simple induction m'. exact H1. - intros a y. simpl in |- *. case (Nbit0 a). apply makeM2_canon. exact (mapcanon_M2_1 _ _ H1). - apply MapRemove_canon. exact (mapcanon_M2_2 _ _ H1). - apply makeM2_canon. apply MapRemove_canon. exact (mapcanon_M2_1 _ _ H1). - exact (mapcanon_M2_2 _ _ H1). - intros. simpl in |- *. apply makeM2_canon. apply H. exact (mapcanon_M2_1 _ _ H1). - apply H0. exact (mapcanon_M2_2 _ _ H1). - Qed. - - Lemma Map_of_alist_canon : forall l:alist A, mapcanon (Map_of_alist A l). - Proof. - simple induction l. exact M0_canon. - intro r. elim r. intros a y l0 H. simpl in |- *. apply MapPut_canon. assumption. - Qed. - - Lemma MapSubset_c_1 : - forall (m:Map A) (m':Map B), - mapcanon m -> MapSubset A B m m' -> MapDomRestrBy A B m m' = M0 A. - Proof. - intros. apply mapcanon_unique. apply MapDomRestrBy_canon. assumption. - apply M0_canon. - exact (MapSubset_imp_2 _ _ m m' H0). - Qed. - - Lemma MapSubset_c_2 : - forall (m:Map A) (m':Map B), - MapDomRestrBy A B m m' = M0 A -> MapSubset A B m m'. - Proof. - intros. apply MapSubset_2_imp. unfold MapSubset_2 in |- *. rewrite H. apply eqmap_refl. - Qed. - -End MapCanon. - -Section FSetCanon. - - Variable A : Set. - - Lemma MapDom_canon : - forall m:Map A, mapcanon A m -> mapcanon unit (MapDom A m). - Proof. - simple induction m. intro. exact (M0_canon unit). - intros a y H. exact (M1_canon unit a _). - intros. simpl in |- *. apply M2_canon. apply H. exact (mapcanon_M2_1 A _ _ H1). - apply H0. exact (mapcanon_M2_2 A _ _ H1). - change (2 <= MapCard unit (MapDom A (M2 A m0 m1))) in |- *. rewrite <- MapCard_Dom. - exact (mapcanon_M2 A _ _ H1). - Qed. - -End FSetCanon. - -Section MapFoldCanon. - - Variables A B : Set. - - Lemma MapFold_canon_1 : - forall m0:Map B, - mapcanon B m0 -> - forall op:Map B -> Map B -> Map B, - (forall m1:Map B, - mapcanon B m1 -> - forall m2:Map B, mapcanon B m2 -> mapcanon B (op m1 m2)) -> - forall f:ad -> A -> Map B, - (forall (a:ad) (y:A), mapcanon B (f a y)) -> - forall (m:Map A) (pf:ad -> ad), - mapcanon B (MapFold1 A (Map B) m0 op f pf m). - Proof. - simple induction m. intro. exact H. - intros a y pf. simpl in |- *. apply H1. - intros. simpl in |- *. apply H0. apply H2. - apply H3. - Qed. - - Lemma MapFold_canon : - forall m0:Map B, - mapcanon B m0 -> - forall op:Map B -> Map B -> Map B, - (forall m1:Map B, - mapcanon B m1 -> - forall m2:Map B, mapcanon B m2 -> mapcanon B (op m1 m2)) -> - forall f:ad -> A -> Map B, - (forall (a:ad) (y:A), mapcanon B (f a y)) -> - forall m:Map A, mapcanon B (MapFold A (Map B) m0 op f m). - Proof. - intros. exact (MapFold_canon_1 m0 H op H0 f H1 m (fun a:ad => a)). - Qed. - - Lemma MapCollect_canon : - forall f:ad -> A -> Map B, - (forall (a:ad) (y:A), mapcanon B (f a y)) -> - forall m:Map A, mapcanon B (MapCollect A B f m). - Proof. - intros. rewrite MapCollect_as_Fold. apply MapFold_canon. apply M0_canon. - intros. exact (MapMerge_canon B m1 m2 H0 H1). - assumption. - Qed. - -End MapFoldCanon. \ No newline at end of file diff --git a/theories/IntMap/Mapcard.v b/theories/IntMap/Mapcard.v deleted file mode 100644 index 36be9bf9..00000000 --- a/theories/IntMap/Mapcard.v +++ /dev/null @@ -1,764 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* forall a:ad, MapGet A m a = None. - Proof. - simple induction m. trivial. - intros a y H. discriminate H. - intros. simpl in H1. elim (plus_is_O _ _ H1). intros. rewrite (MapGet_M2_bit_0_if A m0 m1 a). - case (Nbit0 a). apply H0. assumption. - apply H. assumption. - Qed. - - Lemma MapCard_is_not_O : - forall (m:Map A) (a:ad) (y:A), - MapGet A m a = Some y -> {n : nat | MapCard A m = S n}. - Proof. - simple induction m. intros. discriminate H. - intros a y a0 y0 H. simpl in H. elim (sumbool_of_bool (Neqb a a0)). intro H0. split with 0. - reflexivity. - intro H0. rewrite H0 in H. discriminate H. - intros. elim (sumbool_of_bool (Nbit0 a)). intro H2. - rewrite (MapGet_M2_bit_0_1 A a H2 m0 m1) in H1. elim (H0 (Ndiv2 a) y H1). intros n H3. - simpl in |- *. rewrite H3. split with (MapCard A m0 + n). - rewrite <- (plus_Snm_nSm (MapCard A m0) n). reflexivity. - intro H2. rewrite (MapGet_M2_bit_0_0 A a H2 m0 m1) in H1. elim (H (Ndiv2 a) y H1). - intros n H3. simpl in |- *. rewrite H3. split with (n + MapCard A m1). reflexivity. - Qed. - - Lemma MapCard_is_one : - forall m:Map A, - MapCard A m = 1 -> {a : ad & {y : A | MapGet A m a = Some y}}. - Proof. - simple induction m. intro. discriminate H. - intros a y H. split with a. split with y. apply M1_semantics_1. - intros. simpl in H1. elim (plus_is_one (MapCard A m0) (MapCard A m1) H1). - intro H2. elim H2. intros. elim (H0 H4). intros a H5. split with (Ndouble_plus_one a). - rewrite (MapGet_M2_bit_0_1 A _ (Ndouble_plus_one_bit0 a) m0 m1). - rewrite Ndouble_plus_one_div2. exact H5. - intro H2. elim H2. intros. elim (H H3). intros a H5. split with (Ndouble a). - rewrite (MapGet_M2_bit_0_0 A _ (Ndouble_bit0 a) m0 m1). - rewrite Ndouble_div2. exact H5. - Qed. - - Lemma MapCard_is_one_unique : - forall m:Map A, - MapCard A m = 1 -> - forall (a a':ad) (y y':A), - MapGet A m a = Some y -> - MapGet A m a' = Some y' -> a = a' /\ y = y'. - Proof. - simple induction m. intro. discriminate H. - intros. elim (sumbool_of_bool (Neqb a a1)). intro H2. rewrite (Neqb_complete _ _ H2) in H0. - rewrite (M1_semantics_1 A a1 a0) in H0. inversion H0. elim (sumbool_of_bool (Neqb a a')). - intro H5. rewrite (Neqb_complete _ _ H5) in H1. rewrite (M1_semantics_1 A a' a0) in H1. - inversion H1. rewrite <- (Neqb_complete _ _ H2). rewrite <- (Neqb_complete _ _ H5). - rewrite <- H4. rewrite <- H6. split; reflexivity. - intro H5. rewrite (M1_semantics_2 A a a' a0 H5) in H1. discriminate H1. - intro H2. rewrite (M1_semantics_2 A a a1 a0 H2) in H0. discriminate H0. - intros. simpl in H1. elim (plus_is_one _ _ H1). intro H4. elim H4. intros. - rewrite (MapGet_M2_bit_0_if A m0 m1 a) in H2. elim (sumbool_of_bool (Nbit0 a)). - intro H7. rewrite H7 in H2. rewrite (MapGet_M2_bit_0_if A m0 m1 a') in H3. - elim (sumbool_of_bool (Nbit0 a')). intro H8. rewrite H8 in H3. elim (H0 H6 _ _ _ _ H2 H3). - intros. split. rewrite <- (Ndiv2_double_plus_one a H7). - rewrite <- (Ndiv2_double_plus_one a' H8). rewrite H9. reflexivity. - assumption. - intro H8. rewrite H8 in H3. rewrite (MapCard_is_O m0 H5 (Ndiv2 a')) in H3. - discriminate H3. - intro H7. rewrite H7 in H2. rewrite (MapCard_is_O m0 H5 (Ndiv2 a)) in H2. - discriminate H2. - intro H4. elim H4. intros. rewrite (MapGet_M2_bit_0_if A m0 m1 a) in H2. - elim (sumbool_of_bool (Nbit0 a)). intro H7. rewrite H7 in H2. - rewrite (MapCard_is_O m1 H6 (Ndiv2 a)) in H2. discriminate H2. - intro H7. rewrite H7 in H2. rewrite (MapGet_M2_bit_0_if A m0 m1 a') in H3. - elim (sumbool_of_bool (Nbit0 a')). intro H8. rewrite H8 in H3. - rewrite (MapCard_is_O m1 H6 (Ndiv2 a')) in H3. discriminate H3. - intro H8. rewrite H8 in H3. elim (H H5 _ _ _ _ H2 H3). intros. split. - rewrite <- (Ndiv2_double a H7). rewrite <- (Ndiv2_double a' H8). - rewrite H9. reflexivity. - assumption. - Qed. - - Lemma length_as_fold : - forall (C:Set) (l:list C), - length l = fold_right (fun (_:C) (n:nat) => S n) 0 l. - Proof. - simple induction l. reflexivity. - intros. simpl in |- *. rewrite H. reflexivity. - Qed. - - Lemma length_as_fold_2 : - forall l:alist A, - length l = - fold_right (fun (r:ad * A) (n:nat) => let (a, y) := r in 1 + n) 0 l. - Proof. - simple induction l. reflexivity. - intros. simpl in |- *. rewrite H. elim a; reflexivity. - Qed. - - Lemma MapCard_as_Fold_1 : - forall (m:Map A) (pf:ad -> ad), - MapCard A m = MapFold1 A nat 0 plus (fun (_:ad) (_:A) => 1) pf m. - Proof. - simple induction m. trivial. - trivial. - intros. simpl in |- *. rewrite <- (H (fun a0:ad => pf (Ndouble a0))). - rewrite <- (H0 (fun a0:ad => pf (Ndouble_plus_one a0))). reflexivity. - Qed. - - Lemma MapCard_as_Fold : - forall m:Map A, - MapCard A m = MapFold A nat 0 plus (fun (_:ad) (_:A) => 1) m. - Proof. - intro. exact (MapCard_as_Fold_1 m (fun a0:ad => a0)). - Qed. - - Lemma MapCard_as_length : - forall m:Map A, MapCard A m = length (alist_of_Map A m). - Proof. - intro. rewrite MapCard_as_Fold. rewrite length_as_fold_2. - apply MapFold_as_fold with - (op := plus) (neutral := 0) (f := fun (_:ad) (_:A) => 1). exact plus_assoc_reverse. - trivial. - intro. rewrite <- plus_n_O. reflexivity. - Qed. - - Lemma MapCard_Put1_equals_2 : - forall (p:positive) (a a':ad) (y y':A), - MapCard A (MapPut1 A a y a' y' p) = 2. - Proof. - simple induction p. intros. simpl in |- *. case (Nbit0 a); reflexivity. - intros. simpl in |- *. case (Nbit0 a). exact (H (Ndiv2 a) (Ndiv2 a') y y'). - simpl in |- *. rewrite <- plus_n_O. exact (H (Ndiv2 a) (Ndiv2 a') y y'). - intros. simpl in |- *. case (Nbit0 a); reflexivity. - Qed. - - Lemma MapCard_Put_sum : - forall (m m':Map A) (a:ad) (y:A) (n n':nat), - m' = MapPut A m a y -> - n = MapCard A m -> n' = MapCard A m' -> {n' = n} + {n' = S n}. - Proof. - simple induction m. simpl in |- *. intros. rewrite H in H1. simpl in H1. right. - rewrite H0. rewrite H1. reflexivity. - intros a y m' a0 y0 n n' H H0 H1. simpl in H. elim (Ndiscr (Nxor a a0)). intro H2. - elim H2. intros p H3. rewrite H3 in H. rewrite H in H1. - rewrite (MapCard_Put1_equals_2 p a a0 y y0) in H1. simpl in H0. right. - rewrite H0. rewrite H1. reflexivity. - intro H2. rewrite H2 in H. rewrite H in H1. simpl in H1. simpl in H0. left. - rewrite H0. rewrite H1. reflexivity. - intros. simpl in H2. rewrite (MapPut_semantics_3_1 A m0 m1 a y) in H1. - elim (sumbool_of_bool (Nbit0 a)). intro H4. rewrite H4 in H1. - elim - (H0 (MapPut A m1 (Ndiv2 a) y) (Ndiv2 a) y ( - MapCard A m1) (MapCard A (MapPut A m1 (Ndiv2 a) y)) ( - refl_equal _) (refl_equal _) (refl_equal _)). - intro H5. rewrite H1 in H3. simpl in H3. rewrite H5 in H3. rewrite <- H2 in H3. left. - assumption. - intro H5. rewrite H1 in H3. simpl in H3. rewrite H5 in H3. - rewrite <- (plus_Snm_nSm (MapCard A m0) (MapCard A m1)) in H3. - simpl in H3. rewrite <- H2 in H3. right. assumption. - intro H4. rewrite H4 in H1. - elim - (H (MapPut A m0 (Ndiv2 a) y) (Ndiv2 a) y ( - MapCard A m0) (MapCard A (MapPut A m0 (Ndiv2 a) y)) ( - refl_equal _) (refl_equal _) (refl_equal _)). - intro H5. rewrite H1 in H3. simpl in H3. rewrite H5 in H3. rewrite <- H2 in H3. - left. assumption. - intro H5. rewrite H1 in H3. simpl in H3. rewrite H5 in H3. simpl in H3. rewrite <- H2 in H3. - right. assumption. - Qed. - - Lemma MapCard_Put_lb : - forall (m:Map A) (a:ad) (y:A), MapCard A (MapPut A m a y) >= MapCard A m. - Proof. - unfold ge in |- *. intros. - elim - (MapCard_Put_sum m (MapPut A m a y) a y (MapCard A m) - (MapCard A (MapPut A m a y)) (refl_equal _) ( - refl_equal _) (refl_equal _)). - intro H. rewrite H. apply le_n. - intro H. rewrite H. apply le_n_Sn. - Qed. - - Lemma MapCard_Put_ub : - forall (m:Map A) (a:ad) (y:A), - MapCard A (MapPut A m a y) <= S (MapCard A m). - Proof. - intros. - elim - (MapCard_Put_sum m (MapPut A m a y) a y (MapCard A m) - (MapCard A (MapPut A m a y)) (refl_equal _) ( - refl_equal _) (refl_equal _)). - intro H. rewrite H. apply le_n_Sn. - intro H. rewrite H. apply le_n. - Qed. - - Lemma MapCard_Put_1 : - forall (m:Map A) (a:ad) (y:A), - MapCard A (MapPut A m a y) = MapCard A m -> - {y : A | MapGet A m a = Some y}. - Proof. - simple induction m. intros. discriminate H. - intros a y a0 y0 H. simpl in H. elim (Ndiscr (Nxor a a0)). intro H0. elim H0. - intros p H1. rewrite H1 in H. rewrite (MapCard_Put1_equals_2 p a a0 y y0) in H. - discriminate H. - intro H0. rewrite H0 in H. rewrite (Nxor_eq _ _ H0). split with y. apply M1_semantics_1. - intros. rewrite (MapPut_semantics_3_1 A m0 m1 a y) in H1. elim (sumbool_of_bool (Nbit0 a)). - intro H2. rewrite H2 in H1. simpl in H1. elim (H0 (Ndiv2 a) y ((fun n m p:nat => plus_reg_l m p n) _ _ _ H1)). - intros y0 H3. split with y0. rewrite <- H3. exact (MapGet_M2_bit_0_1 A a H2 m0 m1). - intro H2. rewrite H2 in H1. simpl in H1. - rewrite - (plus_comm (MapCard A (MapPut A m0 (Ndiv2 a) y)) (MapCard A m1)) - in H1. - rewrite (plus_comm (MapCard A m0) (MapCard A m1)) in H1. - elim (H (Ndiv2 a) y ((fun n m p:nat => plus_reg_l m p n) _ _ _ H1)). intros y0 H3. split with y0. - rewrite <- H3. exact (MapGet_M2_bit_0_0 A a H2 m0 m1). - Qed. - - Lemma MapCard_Put_2 : - forall (m:Map A) (a:ad) (y:A), - MapCard A (MapPut A m a y) = S (MapCard A m) -> MapGet A m a = None. - Proof. - simple induction m. trivial. - intros. simpl in H. elim (sumbool_of_bool (Neqb a a1)). intro H0. - rewrite (Neqb_complete _ _ H0) in H. rewrite (Nxor_nilpotent a1) in H. discriminate H. - intro H0. exact (M1_semantics_2 A a a1 a0 H0). - intros. elim (sumbool_of_bool (Nbit0 a)). intro H2. - rewrite (MapGet_M2_bit_0_1 A a H2 m0 m1). apply (H0 (Ndiv2 a) y). - apply (fun n m p:nat => plus_reg_l m p n) with (n := MapCard A m0). - rewrite <- (plus_Snm_nSm (MapCard A m0) (MapCard A m1)). simpl in H1. simpl in |- *. rewrite <- H1. - clear H1. - induction a. discriminate H2. - induction p. reflexivity. - discriminate H2. - reflexivity. - intro H2. rewrite (MapGet_M2_bit_0_0 A a H2 m0 m1). apply (H (Ndiv2 a) y). - cut - (MapCard A (MapPut A m0 (Ndiv2 a) y) + MapCard A m1 = - S (MapCard A m0) + MapCard A m1). - intro. rewrite (plus_comm (MapCard A (MapPut A m0 (Ndiv2 a) y)) (MapCard A m1)) - in H3. - rewrite (plus_comm (S (MapCard A m0)) (MapCard A m1)) in H3. exact ((fun n m p:nat => plus_reg_l m p n) _ _ _ H3). - simpl in |- *. simpl in H1. rewrite <- H1. induction a. trivial. - induction p. discriminate H2. - reflexivity. - discriminate H2. - Qed. - - Lemma MapCard_Put_1_conv : - forall (m:Map A) (a:ad) (y y':A), - MapGet A m a = Some y -> MapCard A (MapPut A m a y') = MapCard A m. - Proof. - intros. - elim - (MapCard_Put_sum m (MapPut A m a y') a y' (MapCard A m) - (MapCard A (MapPut A m a y')) (refl_equal _) ( - refl_equal _) (refl_equal _)). - trivial. - intro H0. rewrite (MapCard_Put_2 m a y' H0) in H. discriminate H. - Qed. - - Lemma MapCard_Put_2_conv : - forall (m:Map A) (a:ad) (y:A), - MapGet A m a = None -> MapCard A (MapPut A m a y) = S (MapCard A m). - Proof. - intros. - elim - (MapCard_Put_sum m (MapPut A m a y) a y (MapCard A m) - (MapCard A (MapPut A m a y)) (refl_equal _) ( - refl_equal _) (refl_equal _)). - intro H0. elim (MapCard_Put_1 m a y H0). intros y' H1. rewrite H1 in H. discriminate H. - trivial. - Qed. - - Lemma MapCard_ext : - forall m m':Map A, - eqm A (MapGet A m) (MapGet A m') -> MapCard A m = MapCard A m'. - Proof. - unfold eqm in |- *. intros. rewrite (MapCard_as_length m). rewrite (MapCard_as_length m'). - rewrite (alist_canonical A (alist_of_Map A m) (alist_of_Map A m')). reflexivity. - unfold eqm in |- *. intro. rewrite (Map_of_alist_semantics A (alist_of_Map A m) a). - rewrite (Map_of_alist_semantics A (alist_of_Map A m') a). rewrite (Map_of_alist_of_Map A m' a). - rewrite (Map_of_alist_of_Map A m a). exact (H a). - apply alist_of_Map_sorts2. - apply alist_of_Map_sorts2. - Qed. - - Lemma MapCard_Dom : forall m:Map A, MapCard A m = MapCard unit (MapDom A m). - Proof. - simple induction m; trivial. intros. simpl in |- *. rewrite H. rewrite H0. reflexivity. - Qed. - - Lemma MapCard_Dom_Put_behind : - forall (m:Map A) (a:ad) (y:A), - MapDom A (MapPut_behind A m a y) = MapDom A (MapPut A m a y). - Proof. - simple induction m. trivial. - intros a y a0 y0. simpl in |- *. elim (Ndiscr (Nxor a a0)). intro H. elim H. - intros p H0. rewrite H0. reflexivity. - intro H. rewrite H. rewrite (Nxor_eq _ _ H). reflexivity. - intros. simpl in |- *. elim (Ndiscr a). intro H1. elim H1. intros p H2. rewrite H2. case p. - intro p0. simpl in |- *. rewrite H0. reflexivity. - intro p0. simpl in |- *. rewrite H. reflexivity. - simpl in |- *. rewrite H0. reflexivity. - intro H1. rewrite H1. simpl in |- *. rewrite H. reflexivity. - Qed. - - Lemma MapCard_Put_behind_Put : - forall (m:Map A) (a:ad) (y:A), - MapCard A (MapPut_behind A m a y) = MapCard A (MapPut A m a y). - Proof. - intros. rewrite MapCard_Dom. rewrite MapCard_Dom. rewrite MapCard_Dom_Put_behind. - reflexivity. - Qed. - - Lemma MapCard_Put_behind_sum : - forall (m m':Map A) (a:ad) (y:A) (n n':nat), - m' = MapPut_behind A m a y -> - n = MapCard A m -> n' = MapCard A m' -> {n' = n} + {n' = S n}. - Proof. - intros. apply (MapCard_Put_sum m (MapPut A m a y) a y n n'); trivial. - rewrite <- MapCard_Put_behind_Put. rewrite <- H. assumption. - Qed. - - Lemma MapCard_makeM2 : - forall m m':Map A, MapCard A (makeM2 A m m') = MapCard A m + MapCard A m'. - Proof. - intros. rewrite (MapCard_ext _ _ (makeM2_M2 A m m')). reflexivity. - Qed. - - Lemma MapCard_Remove_sum : - forall (m m':Map A) (a:ad) (n n':nat), - m' = MapRemove A m a -> - n = MapCard A m -> n' = MapCard A m' -> {n = n'} + {n = S n'}. - Proof. - simple induction m. simpl in |- *. intros. rewrite H in H1. simpl in H1. left. rewrite H1. assumption. - simpl in |- *. intros. elim (sumbool_of_bool (Neqb a a1)). intro H2. rewrite H2 in H. - rewrite H in H1. simpl in H1. right. rewrite H1. assumption. - intro H2. rewrite H2 in H. rewrite H in H1. simpl in H1. left. rewrite H1. assumption. - intros. simpl in H1. simpl in H2. elim (sumbool_of_bool (Nbit0 a)). intro H4. - rewrite H4 in H1. rewrite H1 in H3. - rewrite (MapCard_makeM2 m0 (MapRemove A m1 (Ndiv2 a))) in H3. - elim - (H0 (MapRemove A m1 (Ndiv2 a)) (Ndiv2 a) ( - MapCard A m1) (MapCard A (MapRemove A m1 (Ndiv2 a))) - (refl_equal _) (refl_equal _) (refl_equal _)). - intro H5. rewrite H5 in H2. left. rewrite H3. exact H2. - intro H5. rewrite H5 in H2. - rewrite <- - (plus_Snm_nSm (MapCard A m0) (MapCard A (MapRemove A m1 (Ndiv2 a)))) - in H2. - right. rewrite H3. exact H2. - intro H4. rewrite H4 in H1. rewrite H1 in H3. - rewrite (MapCard_makeM2 (MapRemove A m0 (Ndiv2 a)) m1) in H3. - elim - (H (MapRemove A m0 (Ndiv2 a)) (Ndiv2 a) ( - MapCard A m0) (MapCard A (MapRemove A m0 (Ndiv2 a))) - (refl_equal _) (refl_equal _) (refl_equal _)). - intro H5. rewrite H5 in H2. left. rewrite H3. exact H2. - intro H5. rewrite H5 in H2. right. rewrite H3. exact H2. - Qed. - - Lemma MapCard_Remove_ub : - forall (m:Map A) (a:ad), MapCard A (MapRemove A m a) <= MapCard A m. - Proof. - intros. - elim - (MapCard_Remove_sum m (MapRemove A m a) a (MapCard A m) - (MapCard A (MapRemove A m a)) (refl_equal _) ( - refl_equal _) (refl_equal _)). - intro H. rewrite H. apply le_n. - intro H. rewrite H. apply le_n_Sn. - Qed. - - Lemma MapCard_Remove_lb : - forall (m:Map A) (a:ad), S (MapCard A (MapRemove A m a)) >= MapCard A m. - Proof. - unfold ge in |- *. intros. - elim - (MapCard_Remove_sum m (MapRemove A m a) a (MapCard A m) - (MapCard A (MapRemove A m a)) (refl_equal _) ( - refl_equal _) (refl_equal _)). - intro H. rewrite H. apply le_n_Sn. - intro H. rewrite H. apply le_n. - Qed. - - Lemma MapCard_Remove_1 : - forall (m:Map A) (a:ad), - MapCard A (MapRemove A m a) = MapCard A m -> MapGet A m a = None. - Proof. - simple induction m. trivial. - simpl in |- *. intros a y a0 H. elim (sumbool_of_bool (Neqb a a0)). intro H0. - rewrite H0 in H. discriminate H. - intro H0. rewrite H0. reflexivity. - intros. simpl in H1. elim (sumbool_of_bool (Nbit0 a)). intro H2. rewrite H2 in H1. - rewrite (MapCard_makeM2 m0 (MapRemove A m1 (Ndiv2 a))) in H1. - rewrite (MapGet_M2_bit_0_1 A a H2 m0 m1). apply H0. exact ((fun n m p:nat => plus_reg_l m p n) _ _ _ H1). - intro H2. rewrite H2 in H1. - rewrite (MapCard_makeM2 (MapRemove A m0 (Ndiv2 a)) m1) in H1. - rewrite (MapGet_M2_bit_0_0 A a H2 m0 m1). apply H. - rewrite - (plus_comm (MapCard A (MapRemove A m0 (Ndiv2 a))) (MapCard A m1)) - in H1. - rewrite (plus_comm (MapCard A m0) (MapCard A m1)) in H1. exact ((fun n m p:nat => plus_reg_l m p n) _ _ _ H1). - Qed. - - Lemma MapCard_Remove_2 : - forall (m:Map A) (a:ad), - S (MapCard A (MapRemove A m a)) = MapCard A m -> - {y : A | MapGet A m a = Some y}. - Proof. - simple induction m. intros. discriminate H. - intros a y a0 H. simpl in H. elim (sumbool_of_bool (Neqb a a0)). intro H0. - rewrite (Neqb_complete _ _ H0). split with y. exact (M1_semantics_1 A a0 y). - intro H0. rewrite H0 in H. discriminate H. - intros. simpl in H1. elim (sumbool_of_bool (Nbit0 a)). intro H2. rewrite H2 in H1. - rewrite (MapCard_makeM2 m0 (MapRemove A m1 (Ndiv2 a))) in H1. - rewrite (MapGet_M2_bit_0_1 A a H2 m0 m1). apply H0. - change - (S (MapCard A m0) + MapCard A (MapRemove A m1 (Ndiv2 a)) = - MapCard A m0 + MapCard A m1) in H1. - rewrite - (plus_Snm_nSm (MapCard A m0) (MapCard A (MapRemove A m1 (Ndiv2 a)))) - in H1. - exact ((fun n m p:nat => plus_reg_l m p n) _ _ _ H1). - intro H2. rewrite H2 in H1. rewrite (MapGet_M2_bit_0_0 A a H2 m0 m1). apply H. - rewrite (MapCard_makeM2 (MapRemove A m0 (Ndiv2 a)) m1) in H1. - change - (S (MapCard A (MapRemove A m0 (Ndiv2 a))) + MapCard A m1 = - MapCard A m0 + MapCard A m1) in H1. - rewrite - (plus_comm (S (MapCard A (MapRemove A m0 (Ndiv2 a)))) (MapCard A m1)) - in H1. - rewrite (plus_comm (MapCard A m0) (MapCard A m1)) in H1. exact ((fun n m p:nat => plus_reg_l m p n) _ _ _ H1). - Qed. - - Lemma MapCard_Remove_1_conv : - forall (m:Map A) (a:ad), - MapGet A m a = None -> MapCard A (MapRemove A m a) = MapCard A m. - Proof. - intros. - elim - (MapCard_Remove_sum m (MapRemove A m a) a (MapCard A m) - (MapCard A (MapRemove A m a)) (refl_equal _) ( - refl_equal _) (refl_equal _)). - intro H0. rewrite H0. reflexivity. - intro H0. elim (MapCard_Remove_2 m a (sym_eq H0)). intros y H1. rewrite H1 in H. - discriminate H. - Qed. - - Lemma MapCard_Remove_2_conv : - forall (m:Map A) (a:ad) (y:A), - MapGet A m a = Some y -> S (MapCard A (MapRemove A m a)) = MapCard A m. - Proof. - intros. - elim - (MapCard_Remove_sum m (MapRemove A m a) a (MapCard A m) - (MapCard A (MapRemove A m a)) (refl_equal _) ( - refl_equal _) (refl_equal _)). - intro H0. rewrite (MapCard_Remove_1 m a (sym_eq H0)) in H. discriminate H. - intro H0. rewrite H0. reflexivity. - Qed. - - Lemma MapMerge_Restr_Card : - forall m m':Map A, - MapCard A m + MapCard A m' = - MapCard A (MapMerge A m m') + MapCard A (MapDomRestrTo A A m m'). - Proof. - simple induction m. simpl in |- *. intro. apply plus_n_O. - simpl in |- *. intros a y m'. elim (option_sum A (MapGet A m' a)). intro H. elim H. intros y0 H0. - rewrite H0. rewrite MapCard_Put_behind_Put. rewrite (MapCard_Put_1_conv m' a y0 y H0). - simpl in |- *. rewrite <- plus_Snm_nSm. apply plus_n_O. - intro H. rewrite H. rewrite MapCard_Put_behind_Put. rewrite (MapCard_Put_2_conv m' a y H). - apply plus_n_O. - intros. - change - (MapCard A m0 + MapCard A m1 + MapCard A m' = - MapCard A (MapMerge A (M2 A m0 m1) m') + - MapCard A (MapDomRestrTo A A (M2 A m0 m1) m')) - in |- *. - elim m'. reflexivity. - intros a y. unfold MapMerge in |- *. unfold MapDomRestrTo in |- *. - elim (option_sum A (MapGet A (M2 A m0 m1) a)). intro H1. elim H1. intros y0 H2. rewrite H2. - rewrite (MapCard_Put_1_conv (M2 A m0 m1) a y0 y H2). reflexivity. - intro H1. rewrite H1. rewrite (MapCard_Put_2_conv (M2 A m0 m1) a y H1). simpl in |- *. - rewrite <- (plus_Snm_nSm (MapCard A m0 + MapCard A m1) 0). reflexivity. - intros. simpl in |- *. - rewrite - (plus_permute_2_in_4 (MapCard A m0) (MapCard A m1) ( - MapCard A m2) (MapCard A m3)). - rewrite (H m2). rewrite (H0 m3). - rewrite - (MapCard_makeM2 (MapDomRestrTo A A m0 m2) (MapDomRestrTo A A m1 m3)) - . - apply plus_permute_2_in_4. - Qed. - - Lemma MapMerge_disjoint_Card : - forall m m':Map A, - MapDisjoint A A m m' -> - MapCard A (MapMerge A m m') = MapCard A m + MapCard A m'. - Proof. - intros. rewrite (MapMerge_Restr_Card m m'). - rewrite (MapCard_ext _ _ (MapDisjoint_imp_2 _ _ _ _ H)). apply plus_n_O. - Qed. - - Lemma MapSplit_Card : - forall (m:Map A) (m':Map B), - MapCard A m = - MapCard A (MapDomRestrTo A B m m') + MapCard A (MapDomRestrBy A B m m'). - Proof. - intros. rewrite (MapCard_ext _ _ (MapDom_Split_1 A B m m')). apply MapMerge_disjoint_Card. - apply MapDisjoint_2_imp. unfold MapDisjoint_2 in |- *. apply MapDom_Split_3. - Qed. - - Lemma MapMerge_Card_ub : - forall m m':Map A, - MapCard A (MapMerge A m m') <= MapCard A m + MapCard A m'. - Proof. - intros. rewrite MapMerge_Restr_Card. apply le_plus_l. - Qed. - - Lemma MapDomRestrTo_Card_ub_l : - forall (m:Map A) (m':Map B), - MapCard A (MapDomRestrTo A B m m') <= MapCard A m. - Proof. - intros. rewrite (MapSplit_Card m m'). apply le_plus_l. - Qed. - - Lemma MapDomRestrBy_Card_ub_l : - forall (m:Map A) (m':Map B), - MapCard A (MapDomRestrBy A B m m') <= MapCard A m. - Proof. - intros. rewrite (MapSplit_Card m m'). apply le_plus_r. - Qed. - - Lemma MapMerge_Card_disjoint : - forall m m':Map A, - MapCard A (MapMerge A m m') = MapCard A m + MapCard A m' -> - MapDisjoint A A m m'. - Proof. - simple induction m. intros. apply Map_M0_disjoint. - simpl in |- *. intros. rewrite (MapCard_Put_behind_Put m' a a0) in H. unfold MapDisjoint, in_dom in |- *. - simpl in |- *. intros. elim (sumbool_of_bool (Neqb a a1)). intro H2. - rewrite (Neqb_complete _ _ H2) in H. rewrite (MapCard_Put_2 m' a1 a0 H) in H1. - discriminate H1. - intro H2. rewrite H2 in H0. discriminate H0. - simple induction m'. intros. apply Map_disjoint_M0. - intros a y H1. rewrite <- (MapCard_ext _ _ (MapPut_as_Merge A (M2 A m0 m1) a y)) in H1. - unfold MapCard at 3 in H1. rewrite <- (plus_Snm_nSm (MapCard A (M2 A m0 m1)) 0) in H1. - rewrite <- (plus_n_O (S (MapCard A (M2 A m0 m1)))) in H1. unfold MapDisjoint, in_dom in |- *. - unfold MapGet at 2 in |- *. intros. elim (sumbool_of_bool (Neqb a a0)). intro H4. - rewrite <- (Neqb_complete _ _ H4) in H2. rewrite (MapCard_Put_2 _ _ _ H1) in H2. - discriminate H2. - intro H4. rewrite H4 in H3. discriminate H3. - intros. unfold MapDisjoint in |- *. intros. elim (sumbool_of_bool (Nbit0 a)). intro H6. - unfold MapDisjoint in H0. apply H0 with (m' := m3) (a := Ndiv2 a). apply le_antisym. - apply MapMerge_Card_ub. - apply (fun p n m:nat => plus_le_reg_l n m p) with - (p := MapCard A m0 + MapCard A m2). - rewrite - (plus_permute_2_in_4 (MapCard A m0) (MapCard A m2) ( - MapCard A m1) (MapCard A m3)). - change - (MapCard A (M2 A (MapMerge A m0 m2) (MapMerge A m1 m3)) = - MapCard A m0 + MapCard A m1 + (MapCard A m2 + MapCard A m3)) - in H3. - rewrite <- H3. simpl in |- *. apply plus_le_compat_r. apply MapMerge_Card_ub. - elim (in_dom_some _ _ _ H4). intros y H7. rewrite (MapGet_M2_bit_0_1 _ a H6 m0 m1) in H7. - unfold in_dom in |- *. rewrite H7. reflexivity. - elim (in_dom_some _ _ _ H5). intros y H7. rewrite (MapGet_M2_bit_0_1 _ a H6 m2 m3) in H7. - unfold in_dom in |- *. rewrite H7. reflexivity. - intro H6. unfold MapDisjoint in H. apply H with (m' := m2) (a := Ndiv2 a). apply le_antisym. - apply MapMerge_Card_ub. - apply (fun p n m:nat => plus_le_reg_l n m p) with - (p := MapCard A m1 + MapCard A m3). - rewrite - (plus_comm (MapCard A m1 + MapCard A m3) (MapCard A m0 + MapCard A m2)) - . - rewrite - (plus_permute_2_in_4 (MapCard A m0) (MapCard A m2) ( - MapCard A m1) (MapCard A m3)). - rewrite - (plus_comm (MapCard A m1 + MapCard A m3) (MapCard A (MapMerge A m0 m2))) - . - change - (MapCard A (MapMerge A m0 m2) + MapCard A (MapMerge A m1 m3) = - MapCard A m0 + MapCard A m1 + (MapCard A m2 + MapCard A m3)) - in H3. - rewrite <- H3. apply plus_le_compat_l. apply MapMerge_Card_ub. - elim (in_dom_some _ _ _ H4). intros y H7. rewrite (MapGet_M2_bit_0_0 _ a H6 m0 m1) in H7. - unfold in_dom in |- *. rewrite H7. reflexivity. - elim (in_dom_some _ _ _ H5). intros y H7. rewrite (MapGet_M2_bit_0_0 _ a H6 m2 m3) in H7. - unfold in_dom in |- *. rewrite H7. reflexivity. - Qed. - - Lemma MapCard_is_Sn : - forall (m:Map A) (n:nat), - MapCard _ m = S n -> {a : ad | in_dom _ a m = true}. - Proof. - simple induction m. intros. discriminate H. - intros a y n H. split with a. unfold in_dom in |- *. rewrite (M1_semantics_1 _ a y). reflexivity. - intros. simpl in H1. elim (O_or_S (MapCard _ m0)). intro H2. elim H2. intros m2 H3. - elim (H _ (sym_eq H3)). intros a H4. split with (Ndouble a). unfold in_dom in |- *. - rewrite (MapGet_M2_bit_0_0 A (Ndouble a) (Ndouble_bit0 a) m0 m1). - rewrite (Ndouble_div2 a). elim (in_dom_some _ _ _ H4). intros y H5. rewrite H5. reflexivity. - intro H2. rewrite <- H2 in H1. simpl in H1. elim (H0 _ H1). intros a H3. - split with (Ndouble_plus_one a). unfold in_dom in |- *. - rewrite - (MapGet_M2_bit_0_1 A (Ndouble_plus_one a) (Ndouble_plus_one_bit0 a) - m0 m1). - rewrite (Ndouble_plus_one_div2 a). elim (in_dom_some _ _ _ H3). intros y H4. rewrite H4. - reflexivity. - Qed. - -End MapCard. - -Section MapCard2. - - Variables A B : Set. - - Lemma MapSubset_card_eq_1 : - forall (n:nat) (m:Map A) (m':Map B), - MapSubset _ _ m m' -> - MapCard _ m = n -> MapCard _ m' = n -> MapSubset _ _ m' m. - Proof. - simple induction n. intros. unfold MapSubset, in_dom in |- *. intro. rewrite (MapCard_is_O _ m H0 a). - rewrite (MapCard_is_O _ m' H1 a). intro H2. discriminate H2. - intros. elim (MapCard_is_Sn A m n0 H1). intros a H3. elim (in_dom_some _ _ _ H3). - intros y H4. elim (in_dom_some _ _ _ (H0 _ H3)). intros y' H6. - cut (eqmap _ (MapPut _ (MapRemove _ m a) a y) m). intro. - cut (eqmap _ (MapPut _ (MapRemove _ m' a) a y') m'). intro. - apply MapSubset_ext with - (m0 := MapPut _ (MapRemove _ m' a) a y') - (m2 := MapPut _ (MapRemove _ m a) a y). - assumption. - assumption. - apply MapSubset_Put_mono. apply H. apply MapSubset_Remove_mono. assumption. - rewrite <- (MapCard_Remove_2_conv _ m a y H4) in H1. inversion_clear H1. reflexivity. - rewrite <- (MapCard_Remove_2_conv _ m' a y' H6) in H2. inversion_clear H2. reflexivity. - unfold eqmap, eqm in |- *. intro. rewrite (MapPut_semantics _ (MapRemove B m' a) a y' a0). - elim (sumbool_of_bool (Neqb a a0)). intro H7. rewrite H7. rewrite <- (Neqb_complete _ _ H7). - apply sym_eq. assumption. - intro H7. rewrite H7. rewrite (MapRemove_semantics _ m' a a0). rewrite H7. reflexivity. - unfold eqmap, eqm in |- *. intro. rewrite (MapPut_semantics _ (MapRemove A m a) a y a0). - elim (sumbool_of_bool (Neqb a a0)). intro H7. rewrite H7. rewrite <- (Neqb_complete _ _ H7). - apply sym_eq. assumption. - intro H7. rewrite H7. rewrite (MapRemove_semantics A m a a0). rewrite H7. reflexivity. - Qed. - - Lemma MapDomRestrTo_Card_ub_r : - forall (m:Map A) (m':Map B), - MapCard A (MapDomRestrTo A B m m') <= MapCard B m'. - Proof. - simple induction m. intro. simpl in |- *. apply le_O_n. - intros a y m'. simpl in |- *. elim (option_sum B (MapGet B m' a)). intro H. elim H. intros y0 H0. - rewrite H0. elim (MapCard_is_not_O B m' a y0 H0). intros n H1. rewrite H1. simpl in |- *. - apply le_n_S. apply le_O_n. - intro H. rewrite H. simpl in |- *. apply le_O_n. - simple induction m'. simpl in |- *. apply le_O_n. - - intros a y. unfold MapDomRestrTo in |- *. case (MapGet A (M2 A m0 m1) a). simpl in |- *. - intro. simpl in |- *. apply le_n. - apply le_O_n. - intros. simpl in |- *. rewrite - (MapCard_makeM2 A (MapDomRestrTo A B m0 m2) (MapDomRestrTo A B m1 m3)) - . - apply plus_le_compat. apply H. - apply H0. - Qed. - -End MapCard2. - -Section MapCard3. - - Variables A B : Set. - - Lemma MapMerge_Card_lb_l : - forall m m':Map A, MapCard A (MapMerge A m m') >= MapCard A m. - Proof. - unfold ge in |- *. intros. apply ((fun p n m:nat => plus_le_reg_l n m p) (MapCard A m')). - rewrite (plus_comm (MapCard A m') (MapCard A m)). - rewrite (plus_comm (MapCard A m') (MapCard A (MapMerge A m m'))). - rewrite (MapMerge_Restr_Card A m m'). apply plus_le_compat_l. apply MapDomRestrTo_Card_ub_r. - Qed. - - Lemma MapMerge_Card_lb_r : - forall m m':Map A, MapCard A (MapMerge A m m') >= MapCard A m'. - Proof. - unfold ge in |- *. intros. apply ((fun p n m:nat => plus_le_reg_l n m p) (MapCard A m)). rewrite (MapMerge_Restr_Card A m m'). - rewrite - (plus_comm (MapCard A (MapMerge A m m')) - (MapCard A (MapDomRestrTo A A m m'))). - apply plus_le_compat_r. apply MapDomRestrTo_Card_ub_l. - Qed. - - Lemma MapDomRestrBy_Card_lb : - forall (m:Map A) (m':Map B), - MapCard B m' + MapCard A (MapDomRestrBy A B m m') >= MapCard A m. - Proof. - unfold ge in |- *. intros. rewrite (MapSplit_Card A B m m'). apply plus_le_compat_r. - apply MapDomRestrTo_Card_ub_r. - Qed. - - Lemma MapSubset_Card_le : - forall (m:Map A) (m':Map B), - MapSubset A B m m' -> MapCard A m <= MapCard B m'. - Proof. - intros. apply le_trans with (m := MapCard B m' + MapCard A (MapDomRestrBy A B m m')). - exact (MapDomRestrBy_Card_lb m m'). - rewrite (MapCard_ext _ _ _ (MapSubset_imp_2 _ _ _ _ H)). simpl in |- *. rewrite <- plus_n_O. - apply le_n. - Qed. - - Lemma MapSubset_card_eq : - forall (m:Map A) (m':Map B), - MapSubset _ _ m m' -> - MapCard _ m' <= MapCard _ m -> eqmap _ (MapDom _ m) (MapDom _ m'). - Proof. - intros. apply MapSubset_antisym. assumption. - cut (MapCard B m' = MapCard A m). intro. apply (MapSubset_card_eq_1 A B (MapCard A m)). - assumption. - reflexivity. - assumption. - apply le_antisym. assumption. - apply MapSubset_Card_le. assumption. - Qed. - -End MapCard3. \ No newline at end of file diff --git a/theories/IntMap/Mapfold.v b/theories/IntMap/Mapfold.v deleted file mode 100644 index eb58cb64..00000000 --- a/theories/IntMap/Mapfold.v +++ /dev/null @@ -1,425 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* M -> M. - - Variable nleft : forall a:M, op neutral a = a. - Variable nright : forall a:M, op a neutral = a. - Variable assoc : forall a b c:M, op (op a b) c = op a (op b c). - - Lemma MapFold_ext : - forall (f:ad -> A -> M) (m m':Map A), - eqmap A m m' -> MapFold _ _ neutral op f m = MapFold _ _ neutral op f m'. - Proof. - intros. rewrite (MapFold_as_fold A M neutral op assoc nleft nright f m). - rewrite (MapFold_as_fold A M neutral op assoc nleft nright f m'). - cut (alist_of_Map A m = alist_of_Map A m'). intro. rewrite H0. reflexivity. - apply alist_canonical. unfold eqmap in H. apply eqm_trans with (f' := MapGet A m). - apply eqm_sym. apply alist_of_Map_semantics. - apply eqm_trans with (f' := MapGet A m'). assumption. - apply alist_of_Map_semantics. - apply alist_of_Map_sorts2. - apply alist_of_Map_sorts2. - Qed. - - Lemma MapFold_ext_f_1 : - forall (m:Map A) (f g:ad -> A -> M) (pf:ad -> ad), - (forall (a:ad) (y:A), MapGet _ m a = Some y -> f (pf a) y = g (pf a) y) -> - MapFold1 _ _ neutral op f pf m = MapFold1 _ _ neutral op g pf m. - Proof. - simple induction m. trivial. - simpl in |- *. intros. apply H. rewrite (Neqb_correct a). reflexivity. - intros. simpl in |- *. rewrite (H f g (fun a0:ad => pf (Ndouble a0))). - rewrite (H0 f g (fun a0:ad => pf (Ndouble_plus_one a0))). reflexivity. - intros. apply H1. rewrite MapGet_M2_bit_0_1. rewrite Ndouble_plus_one_div2. assumption. - apply Ndouble_plus_one_bit0. - intros. apply H1. rewrite MapGet_M2_bit_0_0. rewrite Ndouble_div2. assumption. - apply Ndouble_bit0. - Qed. - - Lemma MapFold_ext_f : - forall (f g:ad -> A -> M) (m:Map A), - (forall (a:ad) (y:A), MapGet _ m a = Some y -> f a y = g a y) -> - MapFold _ _ neutral op f m = MapFold _ _ neutral op g m. - Proof. - intros. exact (MapFold_ext_f_1 m f g (fun a0:ad => a0) H). - Qed. - - Lemma MapFold1_as_Fold_1 : - forall (m:Map A) (f f':ad -> A -> M) (pf pf':ad -> ad), - (forall (a:ad) (y:A), f (pf a) y = f' (pf' a) y) -> - MapFold1 _ _ neutral op f pf m = MapFold1 _ _ neutral op f' pf' m. - Proof. - simple induction m. trivial. - intros. simpl in |- *. apply H. - intros. simpl in |- *. - rewrite - (H f f' (fun a0:ad => pf (Ndouble a0)) - (fun a0:ad => pf' (Ndouble a0))). - rewrite - (H0 f f' (fun a0:ad => pf (Ndouble_plus_one a0)) - (fun a0:ad => pf' (Ndouble_plus_one a0))). - reflexivity. - intros. apply H1. - intros. apply H1. - Qed. - - Lemma MapFold1_as_Fold : - forall (f:ad -> A -> M) (pf:ad -> ad) (m:Map A), - MapFold1 _ _ neutral op f pf m = - MapFold _ _ neutral op (fun (a:ad) (y:A) => f (pf a) y) m. - Proof. - intros. unfold MapFold in |- *. apply MapFold1_as_Fold_1. trivial. - Qed. - - Lemma MapFold1_ext : - forall (f:ad -> A -> M) (m m':Map A), - eqmap A m m' -> - forall pf:ad -> ad, - MapFold1 _ _ neutral op f pf m = MapFold1 _ _ neutral op f pf m'. - Proof. - intros. rewrite MapFold1_as_Fold. rewrite MapFold1_as_Fold. apply MapFold_ext. assumption. - Qed. - - Variable comm : forall a b:M, op a b = op b a. - - Lemma MapFold_Put_disjoint_1 : - forall (p:positive) (f:ad -> A -> M) (pf:ad -> ad) - (a1 a2:ad) (y1 y2:A), - Nxor a1 a2 = Npos p -> - MapFold1 A M neutral op f pf (MapPut1 A a1 y1 a2 y2 p) = - op (f (pf a1) y1) (f (pf a2) y2). - Proof. - simple induction p. intros. simpl in |- *. elim (sumbool_of_bool (Nbit0 a1)). intro H1. rewrite H1. - simpl in |- *. rewrite Ndiv2_double_plus_one. rewrite Ndiv2_double. apply comm. - change (Nbit0 a2 = negb true) in |- *. rewrite <- H1. rewrite (Nneg_bit0_2 _ _ _ H0). - rewrite negb_elim. reflexivity. - assumption. - intro H1. rewrite H1. simpl in |- *. rewrite Ndiv2_double. rewrite Ndiv2_double_plus_one. - reflexivity. - change (Nbit0 a2 = negb false) in |- *. rewrite <- H1. rewrite (Nneg_bit0_2 _ _ _ H0). - rewrite negb_elim. reflexivity. - assumption. - simpl in |- *. intros. elim (sumbool_of_bool (Nbit0 a1)). intro H1. rewrite H1. simpl in |- *. - rewrite nleft. - rewrite - (H f (fun a0:ad => pf (Ndouble_plus_one a0)) ( - Ndiv2 a1) (Ndiv2 a2) y1 y2). - rewrite Ndiv2_double_plus_one. rewrite Ndiv2_double_plus_one. reflexivity. - unfold Nodd. - rewrite <- (Nsame_bit0 _ _ _ H0). assumption. - assumption. - rewrite <- Nxor_div2. rewrite H0. reflexivity. - intro H1. rewrite H1. simpl in |- *. rewrite nright. - rewrite - (H f (fun a0:ad => pf (Ndouble a0)) (Ndiv2 a1) (Ndiv2 a2) y1 y2) - . - rewrite Ndiv2_double. rewrite Ndiv2_double. reflexivity. - unfold Neven. - rewrite <- (Nsame_bit0 _ _ _ H0). assumption. - assumption. - rewrite <- Nxor_div2. rewrite H0. reflexivity. - intros. simpl in |- *. elim (sumbool_of_bool (Nbit0 a1)). intro H0. rewrite H0. simpl in |- *. - rewrite Ndiv2_double. rewrite Ndiv2_double_plus_one. apply comm. - assumption. - change (Nbit0 a2 = negb true) in |- *. rewrite <- H0. rewrite (Nneg_bit0_1 _ _ H). - rewrite negb_elim. reflexivity. - intro H0. rewrite H0. simpl in |- *. rewrite Ndiv2_double. rewrite Ndiv2_double_plus_one. - reflexivity. - change (Nbit0 a2 = negb false) in |- *. rewrite <- H0. rewrite (Nneg_bit0_1 _ _ H). - rewrite negb_elim. reflexivity. - assumption. - Qed. - - Lemma MapFold_Put_disjoint_2 : - forall (f:ad -> A -> M) (m:Map A) (a:ad) (y:A) (pf:ad -> ad), - MapGet A m a = None -> - MapFold1 A M neutral op f pf (MapPut A m a y) = - op (f (pf a) y) (MapFold1 A M neutral op f pf m). - Proof. - simple induction m. intros. simpl in |- *. rewrite (nright (f (pf a) y)). reflexivity. - intros a1 y1 a2 y2 pf H. simpl in |- *. elim (Ndiscr (Nxor a1 a2)). intro H0. elim H0. - intros p H1. rewrite H1. rewrite comm. exact (MapFold_Put_disjoint_1 p f pf a1 a2 y1 y2 H1). - intro H0. rewrite (Neqb_complete _ _ (Nxor_eq_true _ _ H0)) in H. - rewrite (M1_semantics_1 A a2 y1) in H. discriminate H. - intros. elim (sumbool_of_bool (Nbit0 a)). intro H2. - cut (MapPut A (M2 A m0 m1) a y = M2 A m0 (MapPut A m1 (Ndiv2 a) y)). intro. - rewrite H3. simpl in |- *. rewrite (H0 (Ndiv2 a) y (fun a0:ad => pf (Ndouble_plus_one a0))). - rewrite Ndiv2_double_plus_one. rewrite <- assoc. - rewrite - (comm (MapFold1 A M neutral op f (fun a0:ad => pf (Ndouble a0)) m0) - (f (pf a) y)). - rewrite assoc. reflexivity. - assumption. - rewrite (MapGet_M2_bit_0_1 A a H2 m0 m1) in H1. assumption. - simpl in |- *. elim (Ndiscr a). intro H3. elim H3. intro p. elim p. intros p0 H4 H5. rewrite H5. - reflexivity. - intros p0 H4 H5. rewrite H5 in H2. discriminate H2. - intro H4. rewrite H4. reflexivity. - intro H3. rewrite H3 in H2. discriminate H2. - intro H2. cut (MapPut A (M2 A m0 m1) a y = M2 A (MapPut A m0 (Ndiv2 a) y) m1). - intro. rewrite H3. simpl in |- *. rewrite (H (Ndiv2 a) y (fun a0:ad => pf (Ndouble a0))). - rewrite Ndiv2_double. rewrite <- assoc. reflexivity. - assumption. - rewrite (MapGet_M2_bit_0_0 A a H2 m0 m1) in H1. assumption. - simpl in |- *. elim (Ndiscr a). intro H3. elim H3. intro p. elim p. intros p0 H4 H5. rewrite H5 in H2. - discriminate H2. - intros p0 H4 H5. rewrite H5. reflexivity. - intro H4. rewrite H4 in H2. discriminate H2. - intro H3. rewrite H3. reflexivity. - Qed. - - Lemma MapFold_Put_disjoint : - forall (f:ad -> A -> M) (m:Map A) (a:ad) (y:A), - MapGet A m a = None -> - MapFold A M neutral op f (MapPut A m a y) = - op (f a y) (MapFold A M neutral op f m). - Proof. - intros. exact (MapFold_Put_disjoint_2 f m a y (fun a0:ad => a0) H). - Qed. - - Lemma MapFold_Put_behind_disjoint_2 : - forall (f:ad -> A -> M) (m:Map A) (a:ad) (y:A) (pf:ad -> ad), - MapGet A m a = None -> - MapFold1 A M neutral op f pf (MapPut_behind A m a y) = - op (f (pf a) y) (MapFold1 A M neutral op f pf m). - Proof. - intros. cut (eqmap A (MapPut_behind A m a y) (MapPut A m a y)). intro. - rewrite (MapFold1_ext f _ _ H0 pf). apply MapFold_Put_disjoint_2. assumption. - apply eqmap_trans with (m' := MapMerge A (M1 A a y) m). apply MapPut_behind_as_Merge. - apply eqmap_trans with (m' := MapMerge A m (M1 A a y)). - apply eqmap_trans with (m' := MapDelta A (M1 A a y) m). apply eqmap_sym. apply MapDelta_disjoint. - unfold MapDisjoint in |- *. unfold in_dom in |- *. simpl in |- *. intros. elim (sumbool_of_bool (Neqb a a0)). - intro H2. rewrite (Neqb_complete _ _ H2) in H. rewrite H in H1. discriminate H1. - intro H2. rewrite H2 in H0. discriminate H0. - apply eqmap_trans with (m' := MapDelta A m (M1 A a y)). apply MapDelta_sym. - apply MapDelta_disjoint. unfold MapDisjoint in |- *. unfold in_dom in |- *. simpl in |- *. intros. - elim (sumbool_of_bool (Neqb a a0)). intro H2. rewrite (Neqb_complete _ _ H2) in H. - rewrite H in H0. discriminate H0. - intro H2. rewrite H2 in H1. discriminate H1. - apply eqmap_sym. apply MapPut_as_Merge. - Qed. - - Lemma MapFold_Put_behind_disjoint : - forall (f:ad -> A -> M) (m:Map A) (a:ad) (y:A), - MapGet A m a = None -> - MapFold A M neutral op f (MapPut_behind A m a y) = - op (f a y) (MapFold A M neutral op f m). - Proof. - intros. exact (MapFold_Put_behind_disjoint_2 f m a y (fun a0:ad => a0) H). - Qed. - - Lemma MapFold_Merge_disjoint_1 : - forall (f:ad -> A -> M) (m1 m2:Map A) (pf:ad -> ad), - MapDisjoint A A m1 m2 -> - MapFold1 A M neutral op f pf (MapMerge A m1 m2) = - op (MapFold1 A M neutral op f pf m1) (MapFold1 A M neutral op f pf m2). - Proof. - simple induction m1. simpl in |- *. intros. rewrite nleft. reflexivity. - intros. unfold MapMerge in |- *. apply (MapFold_Put_behind_disjoint_2 f m2 a a0 pf). - apply in_dom_none. exact (MapDisjoint_M1_l _ _ m2 a a0 H). - simple induction m2. intros. simpl in |- *. rewrite nright. reflexivity. - intros. unfold MapMerge in |- *. rewrite (MapFold_Put_disjoint_2 f (M2 A m m0) a a0 pf). apply comm. - apply in_dom_none. exact (MapDisjoint_M1_r _ _ (M2 A m m0) a a0 H1). - intros. simpl in |- *. rewrite (H m3 (fun a0:ad => pf (Ndouble a0))). - rewrite (H0 m4 (fun a0:ad => pf (Ndouble_plus_one a0))). - cut (forall a b c d:M, op (op a b) (op c d) = op (op a c) (op b d)). intro. apply H4. - intros. rewrite assoc. rewrite <- (assoc b c d). rewrite (comm b c). rewrite (assoc c b d). - rewrite assoc. reflexivity. - exact (MapDisjoint_M2_r _ _ _ _ _ _ H3). - exact (MapDisjoint_M2_l _ _ _ _ _ _ H3). - Qed. - - Lemma MapFold_Merge_disjoint : - forall (f:ad -> A -> M) (m1 m2:Map A), - MapDisjoint A A m1 m2 -> - MapFold A M neutral op f (MapMerge A m1 m2) = - op (MapFold A M neutral op f m1) (MapFold A M neutral op f m2). - Proof. - intros. exact (MapFold_Merge_disjoint_1 f m1 m2 (fun a0:ad => a0) H). - Qed. - -End MapFoldResults. - -Section MapFoldDistr. - - Variable A : Set. - - Variable M : Set. - Variable neutral : M. - Variable op : M -> M -> M. - - Variable M' : Set. - Variable neutral' : M'. - Variable op' : M' -> M' -> M'. - - Variable N : Set. - - Variable times : M -> N -> M'. - - Variable absorb : forall c:N, times neutral c = neutral'. - Variable - distr : - forall (a b:M) (c:N), times (op a b) c = op' (times a c) (times b c). - - Lemma MapFold_distr_r_1 : - forall (f:ad -> A -> M) (m:Map A) (c:N) (pf:ad -> ad), - times (MapFold1 A M neutral op f pf m) c = - MapFold1 A M' neutral' op' (fun (a:ad) (y:A) => times (f a y) c) pf m. - Proof. - simple induction m. intros. exact (absorb c). - trivial. - intros. simpl in |- *. rewrite distr. rewrite H. rewrite H0. reflexivity. - Qed. - - Lemma MapFold_distr_r : - forall (f:ad -> A -> M) (m:Map A) (c:N), - times (MapFold A M neutral op f m) c = - MapFold A M' neutral' op' (fun (a:ad) (y:A) => times (f a y) c) m. - Proof. - intros. exact (MapFold_distr_r_1 f m c (fun a:ad => a)). - Qed. - -End MapFoldDistr. - -Section MapFoldDistrL. - - Variable A : Set. - - Variable M : Set. - Variable neutral : M. - Variable op : M -> M -> M. - - Variable M' : Set. - Variable neutral' : M'. - Variable op' : M' -> M' -> M'. - - Variable N : Set. - - Variable times : N -> M -> M'. - - Variable absorb : forall c:N, times c neutral = neutral'. - Variable - distr : - forall (a b:M) (c:N), times c (op a b) = op' (times c a) (times c b). - - Lemma MapFold_distr_l : - forall (f:ad -> A -> M) (m:Map A) (c:N), - times c (MapFold A M neutral op f m) = - MapFold A M' neutral' op' (fun (a:ad) (y:A) => times c (f a y)) m. - Proof. - intros. apply MapFold_distr_r with (times := fun (a:M) (b:N) => times b a); - assumption. - Qed. - -End MapFoldDistrL. - -Section MapFoldExists. - - Variable A : Set. - - Lemma MapFold_orb_1 : - forall (f:ad -> A -> bool) (m:Map A) (pf:ad -> ad), - MapFold1 A bool false orb f pf m = - match MapSweep1 A f pf m with - | Some _ => true - | _ => false - end. - Proof. - simple induction m. trivial. - intros a y pf. simpl in |- *. unfold MapSweep2 in |- *. case (f (pf a) y); reflexivity. - intros. simpl in |- *. rewrite (H (fun a0:ad => pf (Ndouble a0))). - rewrite (H0 (fun a0:ad => pf (Ndouble_plus_one a0))). - case (MapSweep1 A f (fun a0:ad => pf (Ndouble a0)) m0); reflexivity. - Qed. - - Lemma MapFold_orb : - forall (f:ad -> A -> bool) (m:Map A), - MapFold A bool false orb f m = - match MapSweep A f m with - | Some _ => true - | _ => false - end. - Proof. - intros. exact (MapFold_orb_1 f m (fun a:ad => a)). - Qed. - -End MapFoldExists. - -Section DMergeDef. - - Variable A : Set. - - Definition DMerge := - MapFold (Map A) (Map A) (M0 A) (MapMerge A) (fun (_:ad) (m:Map A) => m). - - Lemma in_dom_DMerge_1 : - forall (m:Map (Map A)) (a:ad), - in_dom A a (DMerge m) = - match MapSweep _ (fun (_:ad) (m0:Map A) => in_dom A a m0) m with - | Some _ => true - | _ => false - end. - Proof. - unfold DMerge in |- *. intros. - rewrite - (MapFold_distr_l (Map A) (Map A) (M0 A) (MapMerge A) bool false orb ad - (in_dom A) (fun c:ad => refl_equal _) (in_dom_merge A)) - . - apply MapFold_orb. - Qed. - - Lemma in_dom_DMerge_2 : - forall (m:Map (Map A)) (a:ad), - in_dom A a (DMerge m) = true -> - {b : ad & - {m0 : Map A | MapGet _ m b = Some m0 /\ in_dom A a m0 = true}}. - Proof. - intros m a. rewrite in_dom_DMerge_1. - elim - (option_sum _ - (MapSweep (Map A) (fun (_:ad) (m0:Map A) => in_dom A a m0) m)). - intro H. elim H. intro r. elim r. intros b m0 H0. intro. split with b. split with m0. - split. exact (MapSweep_semantics_2 _ _ _ _ _ H0). - exact (MapSweep_semantics_1 _ _ _ _ _ H0). - intro H. rewrite H. intro. discriminate H0. - Qed. - - Lemma in_dom_DMerge_3 : - forall (m:Map (Map A)) (a b:ad) (m0:Map A), - MapGet _ m a = Some m0 -> - in_dom A b m0 = true -> in_dom A b (DMerge m) = true. - Proof. - intros m a b m0 H H0. rewrite in_dom_DMerge_1. - elim - (MapSweep_semantics_4 _ (fun (_:ad) (m'0:Map A) => in_dom A b m'0) _ _ _ - H H0). - intros a' H1. elim H1. intros m'0 H2. rewrite H2. reflexivity. - Qed. - -End DMergeDef. \ No newline at end of file diff --git a/theories/IntMap/Mapiter.v b/theories/IntMap/Mapiter.v deleted file mode 100644 index a8ba7e39..00000000 --- a/theories/IntMap/Mapiter.v +++ /dev/null @@ -1,618 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* A -> bool. - - Definition MapSweep2 (a0:ad) (y:A) := - if f a0 y then Some (a0, y) else None. - - Fixpoint MapSweep1 (pf:ad -> ad) (m:Map A) {struct m} : - option (ad * A) := - match m with - | M0 => None - | M1 a y => MapSweep2 (pf a) y - | M2 m m' => - match MapSweep1 (fun a:ad => pf (Ndouble a)) m with - | Some r => Some r - | None => MapSweep1 (fun a:ad => pf (Ndouble_plus_one a)) m' - end - end. - - Definition MapSweep (m:Map A) := MapSweep1 (fun a:ad => a) m. - - Lemma MapSweep_semantics_1_1 : - forall (m:Map A) (pf:ad -> ad) (a:ad) (y:A), - MapSweep1 pf m = Some (a, y) -> f a y = true. - Proof. - simple induction m. intros. discriminate H. - simpl in |- *. intros a y pf a0 y0. elim (sumbool_of_bool (f (pf a) y)). intro H. unfold MapSweep2 in |- *. - rewrite H. intro H0. inversion H0. rewrite <- H3. assumption. - intro H. unfold MapSweep2 in |- *. rewrite H. intro H0. discriminate H0. - simpl in |- *. intros. elim (option_sum (ad * A) (MapSweep1 (fun a0:ad => pf (Ndouble a0)) m0)). - intro H2. elim H2. intros r H3. rewrite H3 in H1. inversion H1. rewrite H5 in H3. - exact (H (fun a0:ad => pf (Ndouble a0)) a y H3). - intro H2. rewrite H2 in H1. exact (H0 (fun a0:ad => pf (Ndouble_plus_one a0)) a y H1). - Qed. - - Lemma MapSweep_semantics_1 : - forall (m:Map A) (a:ad) (y:A), MapSweep m = Some (a, y) -> f a y = true. - Proof. - intros. exact (MapSweep_semantics_1_1 m (fun a:ad => a) a y H). - Qed. - - Lemma MapSweep_semantics_2_1 : - forall (m:Map A) (pf:ad -> ad) (a:ad) (y:A), - MapSweep1 pf m = Some (a, y) -> {a' : ad | a = pf a'}. - Proof. - simple induction m. intros. discriminate H. - simpl in |- *. unfold MapSweep2 in |- *. intros a y pf a0 y0. case (f (pf a) y). intros. split with a. - inversion H. reflexivity. - intro. discriminate H. - intros m0 H m1 H0 pf a y. simpl in |- *. - elim - (option_sum (ad * A) (MapSweep1 (fun a0:ad => pf (Ndouble a0)) m0)). intro H1. elim H1. - intros r H2. rewrite H2. intro H3. inversion H3. rewrite H5 in H2. - elim (H (fun a0:ad => pf (Ndouble a0)) a y H2). intros a0 H6. split with (Ndouble a0). - assumption. - intro H1. rewrite H1. intro H2. elim (H0 (fun a0:ad => pf (Ndouble_plus_one a0)) a y H2). - intros a0 H3. split with (Ndouble_plus_one a0). assumption. - Qed. - - Lemma MapSweep_semantics_2_2 : - forall (m:Map A) (pf fp:ad -> ad), - (forall a0:ad, fp (pf a0) = a0) -> - forall (a:ad) (y:A), - MapSweep1 pf m = Some (a, y) -> MapGet A m (fp a) = Some y. - Proof. - simple induction m. intros. discriminate H0. - simpl in |- *. intros a y pf fp H a0 y0. unfold MapSweep2 in |- *. elim (sumbool_of_bool (f (pf a) y)). - intro H0. rewrite H0. intro H1. inversion H1. rewrite (H a). rewrite (Neqb_correct a). - reflexivity. - intro H0. rewrite H0. intro H1. discriminate H1. - intros. rewrite (MapGet_M2_bit_0_if A m0 m1 (fp a)). elim (sumbool_of_bool (Nbit0 (fp a))). - intro H3. rewrite H3. elim (option_sum (ad * A) (MapSweep1 (fun a0:ad => pf (Ndouble a0)) m0)). - intro H4. simpl in H2. apply - (H0 (fun a0:ad => pf (Ndouble_plus_one a0)) - (fun a0:ad => Ndiv2 (fp a0))). - intro. rewrite H1. apply Ndouble_plus_one_div2. - elim - (option_sum (ad * A) (MapSweep1 (fun a0:ad => pf (Ndouble a0)) m0)). intro H5. elim H5. - intros r H6. rewrite H6 in H2. inversion H2. rewrite H8 in H6. - elim (MapSweep_semantics_2_1 m0 (fun a0:ad => pf (Ndouble a0)) a y H6). intros a0 H9. - rewrite H9 in H3. rewrite (H1 (Ndouble a0)) in H3. rewrite (Ndouble_bit0 a0) in H3. - discriminate H3. - intro H5. rewrite H5 in H2. assumption. - intro H4. simpl in H2. rewrite H4 in H2. - apply - (H0 (fun a0:ad => pf (Ndouble_plus_one a0)) - (fun a0:ad => Ndiv2 (fp a0))). intro. - rewrite H1. apply Ndouble_plus_one_div2. - assumption. - intro H3. rewrite H3. simpl in H2. - elim - (option_sum (ad * A) (MapSweep1 (fun a0:ad => pf (Ndouble a0)) m0)). intro H4. elim H4. - intros r H5. rewrite H5 in H2. inversion H2. rewrite H7 in H5. - apply - (H (fun a0:ad => pf (Ndouble a0)) (fun a0:ad => Ndiv2 (fp a0))). intro. rewrite H1. - apply Ndouble_div2. - assumption. - intro H4. rewrite H4 in H2. - elim - (MapSweep_semantics_2_1 m1 (fun a0:ad => pf (Ndouble_plus_one a0)) a y - H2). - intros a0 H5. rewrite H5 in H3. rewrite (H1 (Ndouble_plus_one a0)) in H3. - rewrite (Ndouble_plus_one_bit0 a0) in H3. discriminate H3. - Qed. - - Lemma MapSweep_semantics_2 : - forall (m:Map A) (a:ad) (y:A), - MapSweep m = Some (a, y) -> MapGet A m a = Some y. - Proof. - intros. - exact - (MapSweep_semantics_2_2 m (fun a0:ad => a0) (fun a0:ad => a0) - (fun a0:ad => refl_equal a0) a y H). - Qed. - - Lemma MapSweep_semantics_3_1 : - forall (m:Map A) (pf:ad -> ad), - MapSweep1 pf m = None -> - forall (a:ad) (y:A), MapGet A m a = Some y -> f (pf a) y = false. - Proof. - simple induction m. intros. discriminate H0. - simpl in |- *. unfold MapSweep2 in |- *. intros a y pf. elim (sumbool_of_bool (f (pf a) y)). intro H. - rewrite H. intro. discriminate H0. - intro H. rewrite H. intros H0 a0 y0. elim (sumbool_of_bool (Neqb a a0)). intro H1. rewrite H1. - intro H2. inversion H2. rewrite <- H4. rewrite <- (Neqb_complete _ _ H1). assumption. - intro H1. rewrite H1. intro. discriminate H2. - intros. simpl in H1. elim (option_sum (ad * A) (MapSweep1 (fun a:ad => pf (Ndouble a)) m0)). - intro H3. elim H3. intros r H4. rewrite H4 in H1. discriminate H1. - intro H3. rewrite H3 in H1. elim (sumbool_of_bool (Nbit0 a)). intro H4. - rewrite (MapGet_M2_bit_0_1 A a H4 m0 m1) in H2. rewrite <- (Ndiv2_double_plus_one a H4). - exact (H0 (fun a:ad => pf (Ndouble_plus_one a)) H1 (Ndiv2 a) y H2). - intro H4. rewrite (MapGet_M2_bit_0_0 A a H4 m0 m1) in H2. rewrite <- (Ndiv2_double a H4). - exact (H (fun a:ad => pf (Ndouble a)) H3 (Ndiv2 a) y H2). - Qed. - - Lemma MapSweep_semantics_3 : - forall m:Map A, - MapSweep m = None -> - forall (a:ad) (y:A), MapGet A m a = Some y -> f a y = false. - Proof. - intros. - exact (MapSweep_semantics_3_1 m (fun a0:ad => a0) H a y H0). - Qed. - - Lemma MapSweep_semantics_4_1 : - forall (m:Map A) (pf:ad -> ad) (a:ad) (y:A), - MapGet A m a = Some y -> - f (pf a) y = true -> - {a' : ad & {y' : A | MapSweep1 pf m = Some (a', y')}}. - Proof. - simple induction m. intros. discriminate H. - intros. elim (sumbool_of_bool (Neqb a a1)). intro H1. split with (pf a1). split with y. - rewrite (Neqb_complete _ _ H1). unfold MapSweep1, MapSweep2 in |- *. - rewrite (Neqb_complete _ _ H1) in H. rewrite (M1_semantics_1 _ a1 a0) in H. - inversion H. rewrite H0. reflexivity. - - intro H1. rewrite (M1_semantics_2 _ a a1 a0 H1) in H. discriminate H. - - intros. elim (sumbool_of_bool (Nbit0 a)). intro H3. - rewrite (MapGet_M2_bit_0_1 _ _ H3 m0 m1) in H1. - rewrite <- (Ndiv2_double_plus_one a H3) in H2. - elim (H0 (fun a0:ad => pf (Ndouble_plus_one a0)) (Ndiv2 a) y H1 H2). intros a'' H4. elim H4. - intros y'' H5. simpl in |- *. elim (option_sum _ (MapSweep1 (fun a:ad => pf (Ndouble a)) m0)). - intro H6. elim H6. intro r. elim r. intros a''' y''' H7. rewrite H7. split with a'''. - split with y'''. reflexivity. - intro H6. rewrite H6. split with a''. split with y''. assumption. - intro H3. rewrite (MapGet_M2_bit_0_0 _ _ H3 m0 m1) in H1. - rewrite <- (Ndiv2_double a H3) in H2. - elim (H (fun a0:ad => pf (Ndouble a0)) (Ndiv2 a) y H1 H2). intros a'' H4. elim H4. - intros y'' H5. split with a''. split with y''. simpl in |- *. rewrite H5. reflexivity. - Qed. - - Lemma MapSweep_semantics_4 : - forall (m:Map A) (a:ad) (y:A), - MapGet A m a = Some y -> - f a y = true -> {a' : ad & {y' : A | MapSweep m = Some (a', y')}}. - Proof. - intros. exact (MapSweep_semantics_4_1 m (fun a0:ad => a0) a y H H0). - Qed. - - End MapSweepDef. - - Variable B : Set. - - Fixpoint MapCollect1 (f:ad -> A -> Map B) (pf:ad -> ad) - (m:Map A) {struct m} : Map B := - match m with - | M0 => M0 B - | M1 a y => f (pf a) y - | M2 m1 m2 => - MapMerge B (MapCollect1 f (fun a0:ad => pf (Ndouble a0)) m1) - (MapCollect1 f (fun a0:ad => pf (Ndouble_plus_one a0)) m2) - end. - - Definition MapCollect (f:ad -> A -> Map B) (m:Map A) := - MapCollect1 f (fun a:ad => a) m. - - Section MapFoldDef. - - Variable M : Set. - Variable neutral : M. - Variable op : M -> M -> M. - - Fixpoint MapFold1 (f:ad -> A -> M) (pf:ad -> ad) - (m:Map A) {struct m} : M := - match m with - | M0 => neutral - | M1 a y => f (pf a) y - | M2 m1 m2 => - op (MapFold1 f (fun a0:ad => pf (Ndouble a0)) m1) - (MapFold1 f (fun a0:ad => pf (Ndouble_plus_one a0)) m2) - end. - - Definition MapFold (f:ad -> A -> M) (m:Map A) := - MapFold1 f (fun a:ad => a) m. - - Lemma MapFold_empty : forall f:ad -> A -> M, MapFold f (M0 A) = neutral. - Proof. - trivial. - Qed. - - Lemma MapFold_M1 : - forall (f:ad -> A -> M) (a:ad) (y:A), MapFold f (M1 A a y) = f a y. - Proof. - trivial. - Qed. - - Variable State : Set. - Variable f : State -> ad -> A -> State * M. - - Fixpoint MapFold1_state (state:State) (pf:ad -> ad) - (m:Map A) {struct m} : State * M := - match m with - | M0 => (state, neutral) - | M1 a y => f state (pf a) y - | M2 m1 m2 => - match MapFold1_state state (fun a0:ad => pf (Ndouble a0)) m1 with - | (state1, x1) => - match - MapFold1_state state1 - (fun a0:ad => pf (Ndouble_plus_one a0)) m2 - with - | (state2, x2) => (state2, op x1 x2) - end - end - end. - - Definition MapFold_state (state:State) := - MapFold1_state state (fun a:ad => a). - - Lemma pair_sp : forall (B C:Set) (x:B * C), x = (fst x, snd x). - Proof. - simple induction x. trivial. - Qed. - - Lemma MapFold_state_stateless_1 : - forall (m:Map A) (g:ad -> A -> M) (pf:ad -> ad), - (forall (state:State) (a:ad) (y:A), snd (f state a y) = g a y) -> - forall state:State, snd (MapFold1_state state pf m) = MapFold1 g pf m. - Proof. - simple induction m. trivial. - intros. simpl in |- *. apply H. - intros. simpl in |- *. rewrite - (pair_sp _ _ (MapFold1_state state (fun a0:ad => pf (Ndouble a0)) m0)) - . - rewrite (H g (fun a0:ad => pf (Ndouble a0)) H1 state). - rewrite - (pair_sp _ _ - (MapFold1_state - (fst (MapFold1_state state (fun a0:ad => pf (Ndouble a0)) m0)) - (fun a0:ad => pf (Ndouble_plus_one a0)) m1)) - . - simpl in |- *. - rewrite - (H0 g (fun a0:ad => pf (Ndouble_plus_one a0)) H1 - (fst (MapFold1_state state (fun a0:ad => pf (Ndouble a0)) m0))) - . - reflexivity. - Qed. - - Lemma MapFold_state_stateless : - forall g:ad -> A -> M, - (forall (state:State) (a:ad) (y:A), snd (f state a y) = g a y) -> - forall (state:State) (m:Map A), - snd (MapFold_state state m) = MapFold g m. - Proof. - intros. exact (MapFold_state_stateless_1 m g (fun a0:ad => a0) H state). - Qed. - - End MapFoldDef. - - Lemma MapCollect_as_Fold : - forall (f:ad -> A -> Map B) (m:Map A), - MapCollect f m = MapFold (Map B) (M0 B) (MapMerge B) f m. - Proof. - simple induction m; trivial. - Qed. - - Definition alist := list (ad * A). - Definition anil := nil (A:=(ad * A)). - Definition acons := cons (A:=(ad * A)). - Definition aapp := app (A:=(ad * A)). - - Definition alist_of_Map := - MapFold alist anil aapp (fun (a:ad) (y:A) => acons (a, y) anil). - - Fixpoint alist_semantics (l:alist) : ad -> option A := - match l with - | nil => fun _:ad => None - | (a, y) :: l' => - fun a0:ad => if Neqb a a0 then Some y else alist_semantics l' a0 - end. - - Lemma alist_semantics_app : - forall (l l':alist) (a:ad), - alist_semantics (aapp l l') a = - match alist_semantics l a with - | None => alist_semantics l' a - | Some y => Some y - end. - Proof. - unfold aapp in |- *. simple induction l. trivial. - intros. elim a. intros a1 y1. simpl in |- *. case (Neqb a1 a0). reflexivity. - apply H. - Qed. - - Lemma alist_of_Map_semantics_1_1 : - forall (m:Map A) (pf:ad -> ad) (a:ad) (y:A), - alist_semantics - (MapFold1 alist anil aapp (fun (a0:ad) (y:A) => acons (a0, y) anil) pf - m) a = Some y -> {a' : ad | a = pf a'}. - Proof. - simple induction m. simpl in |- *. intros. discriminate H. - simpl in |- *. intros a y pf a0 y0. elim (sumbool_of_bool (Neqb (pf a) a0)). intro H. rewrite H. - intro H0. split with a. rewrite (Neqb_complete _ _ H). reflexivity. - intro H. rewrite H. intro H0. discriminate H0. - intros. change - (alist_semantics - (aapp - (MapFold1 alist anil aapp (fun (a0:ad) (y:A) => acons (a0, y) anil) - (fun a0:ad => pf (Ndouble a0)) m0) - (MapFold1 alist anil aapp (fun (a0:ad) (y:A) => acons (a0, y) anil) - (fun a0:ad => pf (Ndouble_plus_one a0)) m1)) a = - Some y) in H1. - rewrite - (alist_semantics_app - (MapFold1 alist anil aapp (fun (a0:ad) (y0:A) => acons (a0, y0) anil) - (fun a0:ad => pf (Ndouble a0)) m0) - (MapFold1 alist anil aapp (fun (a0:ad) (y0:A) => acons (a0, y0) anil) - (fun a0:ad => pf (Ndouble_plus_one a0)) m1) a) - in H1. - elim - (option_sum A - (alist_semantics - (MapFold1 alist anil aapp - (fun (a0:ad) (y0:A) => acons (a0, y0) anil) - (fun a0:ad => pf (Ndouble a0)) m0) a)). - intro H2. elim H2. intros y0 H3. elim (H (fun a0:ad => pf (Ndouble a0)) a y0 H3). intros a0 H4. - split with (Ndouble a0). assumption. - intro H2. rewrite H2 in H1. elim (H0 (fun a0:ad => pf (Ndouble_plus_one a0)) a y H1). - intros a0 H3. split with (Ndouble_plus_one a0). assumption. - Qed. - - Definition ad_inj (pf:ad -> ad) := - forall a0 a1:ad, pf a0 = pf a1 -> a0 = a1. - - Lemma ad_comp_double_inj : - forall pf:ad -> ad, ad_inj pf -> ad_inj (fun a0:ad => pf (Ndouble a0)). - Proof. - unfold ad_inj in |- *. intros. apply Ndouble_inj. exact (H _ _ H0). - Qed. - - Lemma ad_comp_double_plus_un_inj : - forall pf:ad -> ad, - ad_inj pf -> ad_inj (fun a0:ad => pf (Ndouble_plus_one a0)). - Proof. - unfold ad_inj in |- *. intros. apply Ndouble_plus_one_inj. exact (H _ _ H0). - Qed. - - Lemma alist_of_Map_semantics_1 : - forall (m:Map A) (pf:ad -> ad), - ad_inj pf -> - forall a:ad, - MapGet A m a = - alist_semantics - (MapFold1 alist anil aapp (fun (a0:ad) (y:A) => acons (a0, y) anil) - pf m) (pf a). - Proof. - simple induction m. trivial. - simpl in |- *. intros. elim (sumbool_of_bool (Neqb a a1)). intro H0. rewrite H0. - rewrite (Neqb_complete _ _ H0). rewrite (Neqb_correct (pf a1)). reflexivity. - intro H0. rewrite H0. elim (sumbool_of_bool (Neqb (pf a) (pf a1))). intro H1. - rewrite (H a a1 (Neqb_complete _ _ H1)) in H0. rewrite (Neqb_correct a1) in H0. - discriminate H0. - intro H1. rewrite H1. reflexivity. - intros. change - (MapGet A (M2 A m0 m1) a = - alist_semantics - (aapp - (MapFold1 alist anil aapp (fun (a0:ad) (y:A) => acons (a0, y) anil) - (fun a0:ad => pf (Ndouble a0)) m0) - (MapFold1 alist anil aapp (fun (a0:ad) (y:A) => acons (a0, y) anil) - (fun a0:ad => pf (Ndouble_plus_one a0)) m1)) ( - pf a)) in |- *. - rewrite alist_semantics_app. rewrite (MapGet_M2_bit_0_if A m0 m1 a). - elim (Ndouble_or_double_plus_un a). intro H2. elim H2. intros a0 H3. rewrite H3. - rewrite (Ndouble_bit0 a0). - rewrite <- - (H (fun a1:ad => pf (Ndouble a1)) (ad_comp_double_inj pf H1) a0) - . - rewrite Ndouble_div2. case (MapGet A m0 a0); trivial. - elim - (option_sum A - (alist_semantics - (MapFold1 alist anil aapp - (fun (a1:ad) (y:A) => acons (a1, y) anil) - (fun a1:ad => pf (Ndouble_plus_one a1)) m1) - (pf (Ndouble a0)))). - intro H4. elim H4. intros y H5. - elim - (alist_of_Map_semantics_1_1 m1 (fun a1:ad => pf (Ndouble_plus_one a1)) - (pf (Ndouble a0)) y H5). - intros a1 H6. cut (Nbit0 (Ndouble a0) = Nbit0 (Ndouble_plus_one a1)). - intro. rewrite (Ndouble_bit0 a0) in H7. rewrite (Ndouble_plus_one_bit0 a1) in H7. - discriminate H7. - rewrite (H1 (Ndouble a0) (Ndouble_plus_one a1) H6). reflexivity. - intro H4. rewrite H4. reflexivity. - intro H2. elim H2. intros a0 H3. rewrite H3. rewrite (Ndouble_plus_one_bit0 a0). - rewrite <- - (H0 (fun a1:ad => pf (Ndouble_plus_one a1)) - (ad_comp_double_plus_un_inj pf H1) a0). - rewrite Ndouble_plus_one_div2. - elim - (option_sum A - (alist_semantics - (MapFold1 alist anil aapp - (fun (a1:ad) (y:A) => acons (a1, y) anil) - (fun a1:ad => pf (Ndouble a1)) m0) - (pf (Ndouble_plus_one a0)))). - intro H4. elim H4. intros y H5. - elim - (alist_of_Map_semantics_1_1 m0 (fun a1:ad => pf (Ndouble a1)) - (pf (Ndouble_plus_one a0)) y H5). - intros a1 H6. cut (Nbit0 (Ndouble_plus_one a0) = Nbit0 (Ndouble a1)). - intro H7. rewrite (Ndouble_plus_one_bit0 a0) in H7. rewrite (Ndouble_bit0 a1) in H7. - discriminate H7. - rewrite (H1 (Ndouble_plus_one a0) (Ndouble a1) H6). reflexivity. - intro H4. rewrite H4. reflexivity. - Qed. - - Lemma alist_of_Map_semantics : - forall m:Map A, eqm A (MapGet A m) (alist_semantics (alist_of_Map m)). - Proof. - unfold eqm in |- *. intros. exact - (alist_of_Map_semantics_1 m (fun a0:ad => a0) - (fun (a0 a1:ad) (p:a0 = a1) => p) a). - Qed. - - Fixpoint Map_of_alist (l:alist) : Map A := - match l with - | nil => M0 A - | (a, y) :: l' => MapPut A (Map_of_alist l') a y - end. - - Lemma Map_of_alist_semantics : - forall l:alist, eqm A (alist_semantics l) (MapGet A (Map_of_alist l)). - Proof. - unfold eqm in |- *. simple induction l. trivial. - intros r l0 H a. elim r. intros a0 y0. simpl in |- *. elim (sumbool_of_bool (Neqb a0 a)). - intro H0. rewrite H0. rewrite (Neqb_complete _ _ H0). - rewrite (MapPut_semantics A (Map_of_alist l0) a y0 a). rewrite (Neqb_correct a). - reflexivity. - intro H0. rewrite H0. rewrite (MapPut_semantics A (Map_of_alist l0) a0 y0 a). - rewrite H0. apply H. - Qed. - - Lemma Map_of_alist_of_Map : - forall m:Map A, eqmap A (Map_of_alist (alist_of_Map m)) m. - Proof. - unfold eqmap in |- *. intro. apply eqm_trans with (f' := alist_semantics (alist_of_Map m)). - apply eqm_sym. apply Map_of_alist_semantics. - apply eqm_sym. apply alist_of_Map_semantics. - Qed. - - Lemma alist_of_Map_of_alist : - forall l:alist, - eqm A (alist_semantics (alist_of_Map (Map_of_alist l))) - (alist_semantics l). - Proof. - intro. apply eqm_trans with (f' := MapGet A (Map_of_alist l)). - apply eqm_sym. apply alist_of_Map_semantics. - apply eqm_sym. apply Map_of_alist_semantics. - Qed. - - Lemma fold_right_aapp : - forall (M:Set) (neutral:M) (op:M -> M -> M), - (forall a b c:M, op (op a b) c = op a (op b c)) -> - (forall a:M, op neutral a = a) -> - forall (f:ad -> A -> M) (l l':alist), - fold_right (fun (r:ad * A) (m:M) => let (a, y) := r in op (f a y) m) - neutral (aapp l l') = - op - (fold_right - (fun (r:ad * A) (m:M) => let (a, y) := r in op (f a y) m) neutral - l) - (fold_right - (fun (r:ad * A) (m:M) => let (a, y) := r in op (f a y) m) neutral - l'). - Proof. - simple induction l. simpl in |- *. intro. rewrite H0. reflexivity. - intros r l0 H1 l'. elim r. intros a y. simpl in |- *. rewrite H. rewrite (H1 l'). reflexivity. - Qed. - - Lemma MapFold_as_fold_1 : - forall (M:Set) (neutral:M) (op:M -> M -> M), - (forall a b c:M, op (op a b) c = op a (op b c)) -> - (forall a:M, op neutral a = a) -> - (forall a:M, op a neutral = a) -> - forall (f:ad -> A -> M) (m:Map A) (pf:ad -> ad), - MapFold1 M neutral op f pf m = - fold_right (fun (r:ad * A) (m:M) => let (a, y) := r in op (f a y) m) - neutral - (MapFold1 alist anil aapp (fun (a:ad) (y:A) => acons (a, y) anil) pf - m). - Proof. - simple induction m. trivial. - intros. simpl in |- *. rewrite H1. reflexivity. - intros. simpl in |- *. rewrite (fold_right_aapp M neutral op H H0 f). - rewrite (H2 (fun a0:ad => pf (Ndouble a0))). rewrite (H3 (fun a0:ad => pf (Ndouble_plus_one a0))). - reflexivity. - Qed. - - Lemma MapFold_as_fold : - forall (M:Set) (neutral:M) (op:M -> M -> M), - (forall a b c:M, op (op a b) c = op a (op b c)) -> - (forall a:M, op neutral a = a) -> - (forall a:M, op a neutral = a) -> - forall (f:ad -> A -> M) (m:Map A), - MapFold M neutral op f m = - fold_right (fun (r:ad * A) (m:M) => let (a, y) := r in op (f a y) m) - neutral (alist_of_Map m). - Proof. - intros. exact (MapFold_as_fold_1 M neutral op H H0 H1 f m (fun a0:ad => a0)). - Qed. - - Lemma alist_MapMerge_semantics : - forall m m':Map A, - eqm A (alist_semantics (aapp (alist_of_Map m') (alist_of_Map m))) - (alist_semantics (alist_of_Map (MapMerge A m m'))). - Proof. - unfold eqm in |- *. intros. rewrite alist_semantics_app. rewrite <- (alist_of_Map_semantics m a). - rewrite <- (alist_of_Map_semantics m' a). - rewrite <- (alist_of_Map_semantics (MapMerge A m m') a). - rewrite (MapMerge_semantics A m m' a). reflexivity. - Qed. - - Lemma alist_MapMerge_semantics_disjoint : - forall m m':Map A, - eqmap A (MapDomRestrTo A A m m') (M0 A) -> - eqm A (alist_semantics (aapp (alist_of_Map m) (alist_of_Map m'))) - (alist_semantics (alist_of_Map (MapMerge A m m'))). - Proof. - unfold eqm in |- *. intros. rewrite alist_semantics_app. rewrite <- (alist_of_Map_semantics m a). - rewrite <- (alist_of_Map_semantics m' a). - rewrite <- (alist_of_Map_semantics (MapMerge A m m') a). rewrite (MapMerge_semantics A m m' a). - elim (option_sum _ (MapGet A m a)). intro H0. elim H0. intros y H1. rewrite H1. - elim (option_sum _ (MapGet A m' a)). intro H2. elim H2. intros y' H3. - cut (MapGet A (MapDomRestrTo A A m m') a = None). - rewrite (MapDomRestrTo_semantics A A m m' a). rewrite H3. rewrite H1. intro. discriminate H4. - exact (H a). - intro H2. rewrite H2. reflexivity. - intro H0. rewrite H0. case (MapGet A m' a); trivial. - Qed. - - Lemma alist_semantics_disjoint_comm : - forall l l':alist, - eqmap A (MapDomRestrTo A A (Map_of_alist l) (Map_of_alist l')) (M0 A) -> - eqm A (alist_semantics (aapp l l')) (alist_semantics (aapp l' l)). - Proof. - unfold eqm in |- *. intros. rewrite (alist_semantics_app l l' a). rewrite (alist_semantics_app l' l a). - rewrite <- (alist_of_Map_of_alist l a). rewrite <- (alist_of_Map_of_alist l' a). - rewrite <- - (alist_semantics_app (alist_of_Map (Map_of_alist l)) - (alist_of_Map (Map_of_alist l')) a). - rewrite <- - (alist_semantics_app (alist_of_Map (Map_of_alist l')) - (alist_of_Map (Map_of_alist l)) a). - rewrite (alist_MapMerge_semantics (Map_of_alist l) (Map_of_alist l') a). - rewrite - (alist_MapMerge_semantics_disjoint (Map_of_alist l) ( - Map_of_alist l') H a). - reflexivity. - Qed. - -End MapIter. diff --git a/theories/IntMap/Maplists.v b/theories/IntMap/Maplists.v deleted file mode 100644 index 56a3c160..00000000 --- a/theories/IntMap/Maplists.v +++ /dev/null @@ -1,438 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* false - | a' :: l' => orb (Neqb a a') (ad_in_list a l') - end. - - Fixpoint ad_list_stutters (l:list ad) : bool := - match l with - | nil => false - | a :: l' => orb (ad_in_list a l') (ad_list_stutters l') - end. - - Lemma ad_in_list_forms_circuit : - forall (x:ad) (l:list ad), - ad_in_list x l = true -> - {l1 : list ad & {l2 : list ad | l = l1 ++ x :: l2}}. - Proof. - simple induction l. intro. discriminate H. - intros. elim (sumbool_of_bool (Neqb x a)). intro H1. simpl in H0. split with (nil (A:=ad)). - split with l0. rewrite (Neqb_complete _ _ H1). reflexivity. - intro H2. simpl in H0. rewrite H2 in H0. simpl in H0. elim (H H0). intros l'1 H3. - split with (a :: l'1). elim H3. intros l2 H4. split with l2. rewrite H4. reflexivity. - Qed. - - Lemma ad_list_stutters_has_circuit : - forall l:list ad, - ad_list_stutters l = true -> - {x : ad & - {l0 : list ad & - {l1 : list ad & {l2 : list ad | l = l0 ++ x :: l1 ++ x :: l2}}}}. - Proof. - simple induction l. intro. discriminate H. - intros. simpl in H0. elim (orb_true_elim _ _ H0). intro H1. split with a. - split with (nil (A:=ad)). simpl in |- *. elim (ad_in_list_forms_circuit a l0 H1). intros l1 H2. - split with l1. elim H2. intros l2 H3. split with l2. rewrite H3. reflexivity. - intro H1. elim (H H1). intros x H2. split with x. elim H2. intros l1 H3. - split with (a :: l1). elim H3. intros l2 H4. split with l2. elim H4. intros l3 H5. - split with l3. rewrite H5. reflexivity. - Qed. - - Fixpoint Elems (l:list ad) : FSet := - match l with - | nil => M0 unit - | a :: l' => MapPut _ (Elems l') a tt - end. - - Lemma Elems_canon : forall l:list ad, mapcanon _ (Elems l). - Proof. - simple induction l. exact (M0_canon unit). - intros. simpl in |- *. apply MapPut_canon. assumption. - Qed. - - Lemma Elems_app : - forall l l':list ad, Elems (l ++ l') = FSetUnion (Elems l) (Elems l'). - Proof. - simple induction l. trivial. - intros. simpl in |- *. rewrite (MapPut_as_Merge_c unit (Elems l0)). - rewrite (MapPut_as_Merge_c unit (Elems (l0 ++ l'))). - change - (FSetUnion (Elems (l0 ++ l')) (M1 unit a tt) = - FSetUnion (FSetUnion (Elems l0) (M1 unit a tt)) (Elems l')) - in |- *. - rewrite FSetUnion_comm_c. rewrite (FSetUnion_comm_c (Elems l0) (M1 unit a tt)). - rewrite FSetUnion_assoc_c. rewrite (H l'). reflexivity. - apply M1_canon. - apply Elems_canon. - apply Elems_canon. - apply Elems_canon. - apply M1_canon. - apply Elems_canon. - apply M1_canon. - apply Elems_canon. - apply Elems_canon. - Qed. - - Lemma Elems_rev : forall l:list ad, Elems (rev l) = Elems l. - Proof. - simple induction l. trivial. - intros. simpl in |- *. rewrite Elems_app. simpl in |- *. rewrite (MapPut_as_Merge_c unit (Elems l0)). - rewrite H. reflexivity. - apply Elems_canon. - Qed. - - Lemma ad_in_elems_in_list : - forall (l:list ad) (a:ad), in_FSet a (Elems l) = ad_in_list a l. - Proof. - simple induction l. trivial. - simpl in |- *. unfold in_FSet in |- *. intros. rewrite (in_dom_put _ (Elems l0) a tt a0). - rewrite (H a0). reflexivity. - Qed. - - Lemma ad_list_not_stutters_card : - forall l:list ad, - ad_list_stutters l = false -> length l = MapCard _ (Elems l). - Proof. - simple induction l. trivial. - simpl in |- *. intros. rewrite MapCard_Put_2_conv. rewrite H. reflexivity. - elim (orb_false_elim _ _ H0). trivial. - elim (sumbool_of_bool (in_FSet a (Elems l0))). rewrite ad_in_elems_in_list. - intro H1. rewrite H1 in H0. discriminate H0. - exact (in_dom_none unit (Elems l0) a). - Qed. - - Lemma ad_list_card : forall l:list ad, MapCard _ (Elems l) <= length l. - Proof. - simple induction l. trivial. - intros. simpl in |- *. apply le_trans with (m := S (MapCard _ (Elems l0))). apply MapCard_Put_ub. - apply le_n_S. assumption. - Qed. - - Lemma ad_list_stutters_card : - forall l:list ad, - ad_list_stutters l = true -> MapCard _ (Elems l) < length l. - Proof. - simple induction l. intro. discriminate H. - intros. simpl in |- *. simpl in H0. elim (orb_true_elim _ _ H0). intro H1. - rewrite <- (ad_in_elems_in_list l0 a) in H1. elim (in_dom_some _ _ _ H1). intros y H2. - rewrite (MapCard_Put_1_conv _ _ _ _ tt H2). apply le_lt_trans with (m := length l0). - apply ad_list_card. - apply lt_n_Sn. - intro H1. apply le_lt_trans with (m := S (MapCard _ (Elems l0))). apply MapCard_Put_ub. - apply lt_n_S. apply H. assumption. - Qed. - - Lemma ad_list_not_stutters_card_conv : - forall l:list ad, - length l = MapCard _ (Elems l) -> ad_list_stutters l = false. - Proof. - intros. elim (sumbool_of_bool (ad_list_stutters l)). intro H0. - cut (MapCard _ (Elems l) < length l). intro. rewrite H in H1. elim (lt_irrefl _ H1). - exact (ad_list_stutters_card _ H0). - trivial. - Qed. - - Lemma ad_list_stutters_card_conv : - forall l:list ad, - MapCard _ (Elems l) < length l -> ad_list_stutters l = true. - Proof. - intros. elim (sumbool_of_bool (ad_list_stutters l)). trivial. - intro H0. rewrite (ad_list_not_stutters_card _ H0) in H. elim (lt_irrefl _ H). - Qed. - - Lemma ad_in_list_l : - forall (l l':list ad) (a:ad), - ad_in_list a l = true -> ad_in_list a (l ++ l') = true. - Proof. - simple induction l. intros. discriminate H. - intros. simpl in |- *. simpl in H0. elim (orb_true_elim _ _ H0). intro H1. rewrite H1. reflexivity. - intro H1. rewrite (H l' a0 H1). apply orb_b_true. - Qed. - - Lemma ad_list_stutters_app_l : - forall l l':list ad, - ad_list_stutters l = true -> ad_list_stutters (l ++ l') = true. - Proof. - simple induction l. intros. discriminate H. - intros. simpl in |- *. simpl in H0. elim (orb_true_elim _ _ H0). intro H1. - rewrite (ad_in_list_l l0 l' a H1). reflexivity. - intro H1. rewrite (H l' H1). apply orb_b_true. - Qed. - - Lemma ad_in_list_r : - forall (l l':list ad) (a:ad), - ad_in_list a l' = true -> ad_in_list a (l ++ l') = true. - Proof. - simple induction l. trivial. - intros. simpl in |- *. rewrite (H l' a0 H0). apply orb_b_true. - Qed. - - Lemma ad_list_stutters_app_r : - forall l l':list ad, - ad_list_stutters l' = true -> ad_list_stutters (l ++ l') = true. - Proof. - simple induction l. trivial. - intros. simpl in |- *. rewrite (H l' H0). apply orb_b_true. - Qed. - - Lemma ad_list_stutters_app_conv_l : - forall l l':list ad, - ad_list_stutters (l ++ l') = false -> ad_list_stutters l = false. - Proof. - intros. elim (sumbool_of_bool (ad_list_stutters l)). intro H0. - rewrite (ad_list_stutters_app_l l l' H0) in H. discriminate H. - trivial. - Qed. - - Lemma ad_list_stutters_app_conv_r : - forall l l':list ad, - ad_list_stutters (l ++ l') = false -> ad_list_stutters l' = false. - Proof. - intros. elim (sumbool_of_bool (ad_list_stutters l')). intro H0. - rewrite (ad_list_stutters_app_r l l' H0) in H. discriminate H. - trivial. - Qed. - - Lemma ad_in_list_app_1 : - forall (l l':list ad) (x:ad), ad_in_list x (l ++ x :: l') = true. - Proof. - simple induction l. simpl in |- *. intros. rewrite (Neqb_correct x). reflexivity. - intros. simpl in |- *. rewrite (H l' x). apply orb_b_true. - Qed. - - Lemma ad_in_list_app : - forall (l l':list ad) (x:ad), - ad_in_list x (l ++ l') = orb (ad_in_list x l) (ad_in_list x l'). - Proof. - simple induction l. trivial. - intros. simpl in |- *. rewrite <- orb_assoc. rewrite (H l' x). reflexivity. - Qed. - - Lemma ad_in_list_rev : - forall (l:list ad) (x:ad), ad_in_list x (rev l) = ad_in_list x l. - Proof. - simple induction l. trivial. - intros. simpl in |- *. rewrite ad_in_list_app. rewrite (H x). simpl in |- *. rewrite orb_b_false. - apply orb_comm. - Qed. - - Lemma ad_list_has_circuit_stutters : - forall (l0 l1 l2:list ad) (x:ad), - ad_list_stutters (l0 ++ x :: l1 ++ x :: l2) = true. - Proof. - simple induction l0. simpl in |- *. intros. rewrite (ad_in_list_app_1 l1 l2 x). reflexivity. - intros. simpl in |- *. rewrite (H l1 l2 x). apply orb_b_true. - Qed. - - Lemma ad_list_stutters_prev_l : - forall (l l':list ad) (x:ad), - ad_in_list x l = true -> ad_list_stutters (l ++ x :: l') = true. - Proof. - intros. elim (ad_in_list_forms_circuit _ _ H). intros l0 H0. elim H0. intros l1 H1. - rewrite H1. rewrite app_ass. simpl in |- *. apply ad_list_has_circuit_stutters. - Qed. - - Lemma ad_list_stutters_prev_conv_l : - forall (l l':list ad) (x:ad), - ad_list_stutters (l ++ x :: l') = false -> ad_in_list x l = false. - Proof. - intros. elim (sumbool_of_bool (ad_in_list x l)). intro H0. - rewrite (ad_list_stutters_prev_l l l' x H0) in H. discriminate H. - trivial. - Qed. - - Lemma ad_list_stutters_prev_r : - forall (l l':list ad) (x:ad), - ad_in_list x l' = true -> ad_list_stutters (l ++ x :: l') = true. - Proof. - intros. elim (ad_in_list_forms_circuit _ _ H). intros l0 H0. elim H0. intros l1 H1. - rewrite H1. apply ad_list_has_circuit_stutters. - Qed. - - Lemma ad_list_stutters_prev_conv_r : - forall (l l':list ad) (x:ad), - ad_list_stutters (l ++ x :: l') = false -> ad_in_list x l' = false. - Proof. - intros. elim (sumbool_of_bool (ad_in_list x l')). intro H0. - rewrite (ad_list_stutters_prev_r l l' x H0) in H. discriminate H. - trivial. - Qed. - - Lemma ad_list_Elems : - forall l l':list ad, - MapCard _ (Elems l) = MapCard _ (Elems l') -> - length l = length l' -> ad_list_stutters l = ad_list_stutters l'. - Proof. - intros. elim (sumbool_of_bool (ad_list_stutters l)). intro H1. rewrite H1. apply sym_eq. - apply ad_list_stutters_card_conv. rewrite <- H. rewrite <- H0. apply ad_list_stutters_card. - assumption. - intro H1. rewrite H1. apply sym_eq. apply ad_list_not_stutters_card_conv. rewrite <- H. - rewrite <- H0. apply ad_list_not_stutters_card. assumption. - Qed. - - Lemma ad_list_app_length : - forall l l':list ad, length (l ++ l') = length l + length l'. - Proof. - simple induction l. trivial. - intros. simpl in |- *. rewrite (H l'). reflexivity. - Qed. - - Lemma ad_list_stutters_permute : - forall l l':list ad, - ad_list_stutters (l ++ l') = ad_list_stutters (l' ++ l). - Proof. - intros. apply ad_list_Elems. rewrite Elems_app. rewrite Elems_app. - rewrite (FSetUnion_comm_c _ _ (Elems_canon l) (Elems_canon l')). reflexivity. - rewrite ad_list_app_length. rewrite ad_list_app_length. apply plus_comm. - Qed. - - Lemma ad_list_rev_length : forall l:list ad, length (rev l) = length l. - Proof. - simple induction l. trivial. - intros. simpl in |- *. rewrite ad_list_app_length. simpl in |- *. rewrite H. rewrite <- plus_Snm_nSm. - rewrite <- plus_n_O. reflexivity. - Qed. - - Lemma ad_list_stutters_rev : - forall l:list ad, ad_list_stutters (rev l) = ad_list_stutters l. - Proof. - intros. apply ad_list_Elems. rewrite Elems_rev. reflexivity. - apply ad_list_rev_length. - Qed. - - Lemma ad_list_app_rev : - forall (l l':list ad) (x:ad), rev l ++ x :: l' = rev (x :: l) ++ l'. - Proof. - simple induction l. trivial. - intros. simpl in |- *. rewrite (app_ass (rev l0) (a :: nil) (x :: l')). simpl in |- *. - rewrite (H (x :: l') a). simpl in |- *. - rewrite (app_ass (rev l0) (a :: nil) (x :: nil)). simpl in |- *. - rewrite app_ass. simpl in |- *. rewrite app_ass. reflexivity. - Qed. - - Section ListOfDomDef. - - Variable A : Set. - - Definition ad_list_of_dom := - MapFold A (list ad) nil (app (A:=ad)) (fun (a:ad) (_:A) => a :: nil). - - Lemma ad_in_list_of_dom_in_dom : - forall (m:Map A) (a:ad), ad_in_list a (ad_list_of_dom m) = in_dom A a m. - Proof. - unfold ad_list_of_dom in |- *. intros. - rewrite - (MapFold_distr_l A (list ad) nil (app (A:=ad)) bool false orb ad - (fun (a:ad) (l:list ad) => ad_in_list a l) ( - fun c:ad => refl_equal _) ad_in_list_app - (fun (a0:ad) (_:A) => a0 :: nil) m a). - simpl in |- *. rewrite (MapFold_orb A (fun (a0:ad) (_:A) => orb (Neqb a a0) false) m). - elim - (option_sum _ - (MapSweep A (fun (a0:ad) (_:A) => orb (Neqb a a0) false) m)). intro H. elim H. - intro r. elim r. intros a0 y H0. rewrite H0. unfold in_dom in |- *. - elim (orb_prop _ _ (MapSweep_semantics_1 _ _ _ _ _ H0)). intro H1. - rewrite (Neqb_complete _ _ H1). rewrite (MapSweep_semantics_2 A _ _ _ _ H0). reflexivity. - intro H1. discriminate H1. - intro H. rewrite H. elim (sumbool_of_bool (in_dom A a m)). intro H0. - elim (in_dom_some A m a H0). intros y H1. - elim (orb_false_elim _ _ (MapSweep_semantics_3 _ _ _ H _ _ H1)). intro H2. - rewrite (Neqb_correct a) in H2. discriminate H2. - exact (sym_eq (y:=_)). - Qed. - - Lemma Elems_of_list_of_dom : - forall m:Map A, eqmap unit (Elems (ad_list_of_dom m)) (MapDom A m). - Proof. - unfold eqmap, eqm in |- *. intros. elim (sumbool_of_bool (in_FSet a (Elems (ad_list_of_dom m)))). - intro H. elim (in_dom_some _ _ _ H). intro t. elim t. intro H0. - rewrite (ad_in_elems_in_list (ad_list_of_dom m) a) in H. - rewrite (ad_in_list_of_dom_in_dom m a) in H. rewrite (MapDom_Dom A m a) in H. - elim (in_dom_some _ _ _ H). intro t'. elim t'. intro H1. rewrite H1. assumption. - intro H. rewrite (in_dom_none _ _ _ H). - rewrite (ad_in_elems_in_list (ad_list_of_dom m) a) in H. - rewrite (ad_in_list_of_dom_in_dom m a) in H. rewrite (MapDom_Dom A m a) in H. - rewrite (in_dom_none _ _ _ H). reflexivity. - Qed. - - Lemma Elems_of_list_of_dom_c : - forall m:Map A, mapcanon A m -> Elems (ad_list_of_dom m) = MapDom A m. - Proof. - intros. apply (mapcanon_unique unit). apply Elems_canon. - apply MapDom_canon. assumption. - apply Elems_of_list_of_dom. - Qed. - - Lemma ad_list_of_dom_card_1 : - forall (m:Map A) (pf:ad -> ad), - length - (MapFold1 A (list ad) nil (app (A:=ad)) (fun (a:ad) (_:A) => a :: nil) - pf m) = MapCard A m. - Proof. - simple induction m; try trivial. simpl in |- *. intros. rewrite ad_list_app_length. - rewrite (H (fun a0:ad => pf (Ndouble a0))). rewrite (H0 (fun a0:ad => pf (Ndouble_plus_one a0))). - reflexivity. - Qed. - - Lemma ad_list_of_dom_card : - forall m:Map A, length (ad_list_of_dom m) = MapCard A m. - Proof. - exact (fun m:Map A => ad_list_of_dom_card_1 m (fun a:ad => a)). - Qed. - - Lemma ad_list_of_dom_not_stutters : - forall m:Map A, ad_list_stutters (ad_list_of_dom m) = false. - Proof. - intro. apply ad_list_not_stutters_card_conv. rewrite ad_list_of_dom_card. apply sym_eq. - rewrite (MapCard_Dom A m). apply MapCard_ext. exact (Elems_of_list_of_dom m). - Qed. - - End ListOfDomDef. - - Lemma ad_list_of_dom_Dom_1 : - forall (A:Set) (m:Map A) (pf:ad -> ad), - MapFold1 A (list ad) nil (app (A:=ad)) (fun (a:ad) (_:A) => a :: nil) pf - m = - MapFold1 unit (list ad) nil (app (A:=ad)) - (fun (a:ad) (_:unit) => a :: nil) pf (MapDom A m). - Proof. - simple induction m; try trivial. simpl in |- *. intros. rewrite (H (fun a0:ad => pf (Ndouble a0))). - rewrite (H0 (fun a0:ad => pf (Ndouble_plus_one a0))). reflexivity. - Qed. - - Lemma ad_list_of_dom_Dom : - forall (A:Set) (m:Map A), - ad_list_of_dom A m = ad_list_of_dom unit (MapDom A m). - Proof. - intros. exact (ad_list_of_dom_Dom_1 A m (fun a0:ad => a0)). - Qed. - -End MapLists. \ No newline at end of file diff --git a/theories/IntMap/Mapsubset.v b/theories/IntMap/Mapsubset.v deleted file mode 100644 index 6771c03e..00000000 --- a/theories/IntMap/Mapsubset.v +++ /dev/null @@ -1,605 +0,0 @@ -(************************************************************************) -(* v * The Coq Proof Assistant / The Coq Development Team *) -(* in_dom B a m' = true. - - Definition MapSubset_1 (m:Map A) (m':Map B) := - match MapSweep A (fun (a:ad) (_:A) => negb (in_dom B a m')) m with - | None => true - | _ => false - end. - - Definition MapSubset_2 (m:Map A) (m':Map B) := - eqmap A (MapDomRestrBy A B m m') (M0 A). - - Lemma MapSubset_imp_1 : - forall (m:Map A) (m':Map B), MapSubset m m' -> MapSubset_1 m m' = true. - Proof. - unfold MapSubset, MapSubset_1 in |- *. intros. - elim - (option_sum _ (MapSweep A (fun (a:ad) (_:A) => negb (in_dom B a m')) m)). - intro H0. elim H0. intro r. elim r. intros a y H1. cut (negb (in_dom B a m') = true). - intro. cut (in_dom A a m = false). intro. unfold in_dom in H3. - rewrite (MapSweep_semantics_2 _ _ m a y H1) in H3. discriminate H3. - elim (sumbool_of_bool (in_dom A a m)). intro H3. rewrite (H a H3) in H2. discriminate H2. - trivial. - exact (MapSweep_semantics_1 _ _ m a y H1). - intro H0. rewrite H0. reflexivity. - Qed. - - Lemma MapSubset_1_imp : - forall (m:Map A) (m':Map B), MapSubset_1 m m' = true -> MapSubset m m'. - Proof. - unfold MapSubset, MapSubset_1 in |- *. unfold in_dom at 2 in |- *. intros. elim (option_sum _ (MapGet A m a)). - intro H1. elim H1. intros y H2. - elim - (option_sum _ (MapSweep A (fun (a:ad) (_:A) => negb (in_dom B a m')) m)). intro H3. - elim H3. intro r. elim r. intros a' y' H4. rewrite H4 in H. discriminate H. - intro H3. cut (negb (in_dom B a m') = false). intro. rewrite (negb_intro (in_dom B a m')). - rewrite H4. reflexivity. - exact (MapSweep_semantics_3 _ _ m H3 a y H2). - intro H1. rewrite H1 in H0. discriminate H0. - Qed. - - Lemma map_dom_empty_1 : - forall m:Map A, eqmap A m (M0 A) -> forall a:ad, in_dom _ a m = false. - Proof. - unfold eqmap, eqm, in_dom in |- *. intros. rewrite (H a). reflexivity. - Qed. - - Lemma map_dom_empty_2 : - forall m:Map A, (forall a:ad, in_dom _ a m = false) -> eqmap A m (M0 A). - Proof. - unfold eqmap, eqm, in_dom in |- *. intros. - cut - (match MapGet A m a with - | None => false - | Some _ => true - end = false). - case (MapGet A m a); trivial. - intros. discriminate H0. - exact (H a). - Qed. - - Lemma MapSubset_imp_2 : - forall (m:Map A) (m':Map B), MapSubset m m' -> MapSubset_2 m m'. - Proof. - unfold MapSubset, MapSubset_2 in |- *. intros. apply map_dom_empty_2. intro. rewrite in_dom_restrby. - elim (sumbool_of_bool (in_dom A a m)). intro H0. rewrite H0. rewrite (H a H0). reflexivity. - intro H0. rewrite H0. reflexivity. - Qed. - - Lemma MapSubset_2_imp : - forall (m:Map A) (m':Map B), MapSubset_2 m m' -> MapSubset m m'. - Proof. - unfold MapSubset, MapSubset_2 in |- *. intros. cut (in_dom _ a (MapDomRestrBy A B m m') = false). - rewrite in_dom_restrby. intro. elim (andb_false_elim _ _ H1). rewrite H0. - intro H2. discriminate H2. - intro H2. rewrite (negb_intro (in_dom B a m')). rewrite H2. reflexivity. - exact (map_dom_empty_1 _ H a). - Qed. - -End MapSubsetDef. - -Section MapSubsetOrder. - - Variables A B C : Set. - - Lemma MapSubset_refl : forall m:Map A, MapSubset A A m m. - Proof. - unfold MapSubset in |- *. trivial. - Qed. - - Lemma MapSubset_antisym : - forall (m:Map A) (m':Map B), - MapSubset A B m m' -> - MapSubset B A m' m -> eqmap unit (MapDom A m) (MapDom B m'). - Proof. - unfold MapSubset, eqmap, eqm in |- *. intros. elim (option_sum _ (MapGet _ (MapDom A m) a)). - intro H1. elim H1. intro t. elim t. intro H2. elim (option_sum _ (MapGet _ (MapDom B m') a)). - intro H3. elim H3. intro t'. elim t'. intro H4. rewrite H4. exact H2. - intro H3. cut (in_dom B a m' = true). intro. rewrite (MapDom_Dom B m' a) in H4. - unfold in_FSet, in_dom in H4. rewrite H3 in H4. discriminate H4. - apply H. rewrite (MapDom_Dom A m a). unfold in_FSet, in_dom in |- *. rewrite H2. reflexivity. - intro H1. elim (option_sum _ (MapGet _ (MapDom B m') a)). intro H2. elim H2. intros t H3. - cut (in_dom A a m = true). intro. rewrite (MapDom_Dom A m a) in H4. unfold in_FSet, in_dom in H4. - rewrite H1 in H4. discriminate H4. - apply H0. rewrite (MapDom_Dom B m' a). unfold in_FSet, in_dom in |- *. rewrite H3. reflexivity. - intro H2. rewrite H2. exact H1. - Qed. - - Lemma MapSubset_trans : - forall (m:Map A) (m':Map B) (m'':Map C), - MapSubset A B m m' -> MapSubset B C m' m'' -> MapSubset A C m m''. - Proof. - unfold MapSubset in |- *. intros. apply H0. apply H. assumption. - Qed. - -End MapSubsetOrder. - -Section FSubsetOrder. - - Lemma FSubset_refl : forall s:FSet, MapSubset _ _ s s. - Proof. - exact (MapSubset_refl unit). - Qed. - - Lemma FSubset_antisym : - forall s s':FSet, - MapSubset _ _ s s' -> MapSubset _ _ s' s -> eqmap unit s s'. - Proof. - intros. rewrite <- (FSet_Dom s). rewrite <- (FSet_Dom s'). - exact (MapSubset_antisym _ _ s s' H H0). - Qed. - - Lemma FSubset_trans : - forall s s' s'':FSet, - MapSubset _ _ s s' -> MapSubset _ _ s' s'' -> MapSubset _ _ s s''. - Proof. - exact (MapSubset_trans unit unit unit). - Qed. - -End FSubsetOrder. - -Section MapSubsetExtra. - - Variables A B : Set. - - Lemma MapSubset_Dom_1 : - forall (m:Map A) (m':Map B), - MapSubset A B m m' -> MapSubset unit unit (MapDom A m) (MapDom B m'). - Proof. - unfold MapSubset in |- *. intros. elim (MapDom_semantics_2 _ m a H0). intros y H1. - cut (in_dom A a m = true -> in_dom B a m' = true). intro. unfold in_dom in H2. - rewrite H1 in H2. elim (option_sum _ (MapGet B m' a)). intro H3. elim H3. - intros y' H4. exact (MapDom_semantics_1 _ m' a y' H4). - intro H3. rewrite H3 in H2. cut (false = true). intro. discriminate H4. - apply H2. reflexivity. - exact (H a). - Qed. - - Lemma MapSubset_Dom_2 : - forall (m:Map A) (m':Map B), - MapSubset unit unit (MapDom A m) (MapDom B m') -> MapSubset A B m m'. - Proof. - unfold MapSubset in |- *. intros. unfold in_dom in H0. elim (option_sum _ (MapGet A m a)). - intro H1. elim H1. intros y H2. - elim (MapDom_semantics_2 _ _ _ (H a (MapDom_semantics_1 _ _ _ _ H2))). intros y' H3. - unfold in_dom in |- *. rewrite H3. reflexivity. - intro H1. rewrite H1 in H0. discriminate H0. - Qed. - - Lemma MapSubset_1_Dom : - forall (m:Map A) (m':Map B), - MapSubset_1 A B m m' = MapSubset_1 unit unit (MapDom A m) (MapDom B m'). - Proof. - intros. elim (sumbool_of_bool (MapSubset_1 A B m m')). intro H. rewrite H. - apply sym_eq. apply MapSubset_imp_1. apply MapSubset_Dom_1. exact (MapSubset_1_imp _ _ _ _ H). - intro H. rewrite H. elim (sumbool_of_bool (MapSubset_1 unit unit (MapDom A m) (MapDom B m'))). - intro H0. - rewrite - (MapSubset_imp_1 _ _ _ _ - (MapSubset_Dom_2 _ _ (MapSubset_1_imp _ _ _ _ H0))) - in H. - discriminate H. - intro. apply sym_eq. assumption. - Qed. - - Lemma MapSubset_Put : - forall (m:Map A) (a:ad) (y:A), MapSubset A A m (MapPut A m a y). - Proof. - unfold MapSubset in |- *. intros. rewrite in_dom_put. rewrite H. apply orb_b_true. - Qed. - - Lemma MapSubset_Put_mono : - forall (m:Map A) (m':Map B) (a:ad) (y:A) (y':B), - MapSubset A B m m' -> MapSubset A B (MapPut A m a y) (MapPut B m' a y'). - Proof. - unfold MapSubset in |- *. intros. rewrite in_dom_put. rewrite (in_dom_put A m a y a0) in H0. - elim (orb_true_elim _ _ H0). intro H1. rewrite H1. reflexivity. - intro H1. rewrite (H _ H1). apply orb_b_true. - Qed. - - Lemma MapSubset_Put_behind : - forall (m:Map A) (a:ad) (y:A), MapSubset A A m (MapPut_behind A m a y). - Proof. - unfold MapSubset in |- *. intros. rewrite in_dom_put_behind. rewrite H. apply orb_b_true. - Qed. - - Lemma MapSubset_Put_behind_mono : - forall (m:Map A) (m':Map B) (a:ad) (y:A) (y':B), - MapSubset A B m m' -> - MapSubset A B (MapPut_behind A m a y) (MapPut_behind B m' a y'). - Proof. - unfold MapSubset in |- *. intros. rewrite in_dom_put_behind. - rewrite (in_dom_put_behind A m a y a0) in H0. - elim (orb_true_elim _ _ H0). intro H1. rewrite H1. reflexivity. - intro H1. rewrite (H _ H1). apply orb_b_true. - Qed. - - Lemma MapSubset_Remove : - forall (m:Map A) (a:ad), MapSubset A A (MapRemove A m a) m. - Proof. - unfold MapSubset in |- *. intros. unfold MapSubset in |- *. intros. rewrite (in_dom_remove _ m a a0) in H. - elim (andb_prop _ _ H). trivial. - Qed. - - Lemma MapSubset_Remove_mono : - forall (m:Map A) (m':Map B) (a:ad), - MapSubset A B m m' -> MapSubset A B (MapRemove A m a) (MapRemove B m' a). - Proof. - unfold MapSubset in |- *. intros. rewrite in_dom_remove. rewrite (in_dom_remove A m a a0) in H0. - elim (andb_prop _ _ H0). intros. rewrite H1. rewrite (H _ H2). reflexivity. - Qed. - - Lemma MapSubset_Merge_l : - forall m m':Map A, MapSubset A A m (MapMerge A m m'). - Proof. - unfold MapSubset in |- *. intros. rewrite in_dom_merge. rewrite H. reflexivity. - Qed. - - Lemma MapSubset_Merge_r : - forall m m':Map A, MapSubset A A m' (MapMerge A m m'). - Proof. - unfold MapSubset in |- *. intros. rewrite in_dom_merge. rewrite H. apply orb_b_true. - Qed. - - Lemma MapSubset_Merge_mono : - forall (m m':Map A) (m'' m''':Map B), - MapSubset A B m m'' -> - MapSubset A B m' m''' -> - MapSubset A B (MapMerge A m m') (MapMerge B m'' m'''). - Proof. - unfold MapSubset in |- *. intros. rewrite in_dom_merge. rewrite (in_dom_merge A m m' a) in H1. - elim (orb_true_elim _ _ H1). intro H2. rewrite (H _ H2). reflexivity. - intro H2. rewrite (H0 _ H2). apply orb_b_true. - Qed. - - Lemma MapSubset_DomRestrTo_l : - forall (m:Map A) (m':Map B), MapSubset A A (MapDomRestrTo A B m m') m. - Proof. - unfold MapSubset in |- *. intros. rewrite (in_dom_restrto _ _ m m' a) in H. elim (andb_prop _ _ H). - trivial. - Qed. - - Lemma MapSubset_DomRestrTo_r : - forall (m:Map A) (m':Map B), MapSubset A B (MapDomRestrTo A B m m') m'. - Proof. - unfold MapSubset in |- *. intros. rewrite (in_dom_restrto _ _ m m' a) in H. elim (andb_prop _ _ H). - trivial. - Qed. - - Lemma MapSubset_ext : - forall (m0 m1:Map A) (m2 m3:Map B), - eqmap A m0 m1 -> - eqmap B m2 m3 -> MapSubset A B m0 m2 -> MapSubset A B m1 m3. - Proof. - intros. apply MapSubset_2_imp. unfold MapSubset_2 in |- *. - apply eqmap_trans with (m' := MapDomRestrBy A B m0 m2). apply MapDomRestrBy_ext. apply eqmap_sym. - assumption. - apply eqmap_sym. assumption. - exact (MapSubset_imp_2 _ _ _ _ H1). - Qed. - - Variables C D : Set. - - Lemma MapSubset_DomRestrTo_mono : - forall (m:Map A) (m':Map B) (m'':Map C) (m''':Map D), - MapSubset _ _ m m'' -> - MapSubset _ _ m' m''' -> - MapSubset _ _ (MapDomRestrTo _ _ m m') (MapDomRestrTo _ _ m'' m'''). - Proof. - unfold MapSubset in |- *. intros. rewrite in_dom_restrto. rewrite (in_dom_restrto A B m m' a) in H1. - elim (andb_prop _ _ H1). intros. rewrite (H _ H2). rewrite (H0 _ H3). reflexivity. - Qed. - - Lemma MapSubset_DomRestrBy_l : - forall (m:Map A) (m':Map B), MapSubset A A (MapDomRestrBy A B m m') m. - Proof. - unfold MapSubset in |- *. intros. rewrite (in_dom_restrby _ _ m m' a) in H. elim (andb_prop _ _ H). - trivial. - Qed. - - Lemma MapSubset_DomRestrBy_mono : - forall (m:Map A) (m':Map B) (m'':Map C) (m''':Map D), - MapSubset _ _ m m'' -> - MapSubset _ _ m''' m' -> - MapSubset _ _ (MapDomRestrBy _ _ m m') (MapDomRestrBy _ _ m'' m'''). - Proof. - unfold MapSubset in |- *. intros. rewrite in_dom_restrby. rewrite (in_dom_restrby A B m m' a) in H1. - elim (andb_prop _ _ H1). intros. rewrite (H _ H2). elim (sumbool_of_bool (in_dom D a m''')). - intro H4. rewrite (H0 _ H4) in H3. discriminate H3. - intro H4. rewrite H4. reflexivity. - Qed. - -End MapSubsetExtra. - -Section MapDisjointDef. - - Variables A B : Set. - - Definition MapDisjoint (m:Map A) (m':Map B) := - forall a:ad, in_dom A a m = true -> in_dom B a m' = true -> False. - - Definition MapDisjoint_1 (m:Map A) (m':Map B) := - match MapSweep A (fun (a:ad) (_:A) => in_dom B a m') m with - | None => true - | _ => false - end. - - Definition MapDisjoint_2 (m:Map A) (m':Map B) := - eqmap A (MapDomRestrTo A B m m') (M0 A). - - Lemma MapDisjoint_imp_1 : - forall (m:Map A) (m':Map B), MapDisjoint m m' -> MapDisjoint_1 m m' = true. - Proof. - unfold MapDisjoint, MapDisjoint_1 in |- *. intros. - elim (option_sum _ (MapSweep A (fun (a:ad) (_:A) => in_dom B a m') m)). intro H0. elim H0. - intro r. elim r. intros a y H1. cut (in_dom A a m = true -> in_dom B a m' = true -> False). - intro. unfold in_dom at 1 in H2. rewrite (MapSweep_semantics_2 _ _ _ _ _ H1) in H2. - rewrite (MapSweep_semantics_1 _ _ _ _ _ H1) in H2. elim (H2 (refl_equal _) (refl_equal _)). - exact (H a). - intro H0. rewrite H0. reflexivity. - Qed. - - Lemma MapDisjoint_1_imp : - forall (m:Map A) (m':Map B), MapDisjoint_1 m m' = true -> MapDisjoint m m'. - Proof. - unfold MapDisjoint, MapDisjoint_1 in |- *. intros. - elim (option_sum _ (MapSweep A (fun (a:ad) (_:A) => in_dom B a m') m)). intro H2. elim H2. - intro r. elim r. intros a' y' H3. rewrite H3 in H. discriminate H. - intro H2. unfold in_dom in H0. elim (option_sum _ (MapGet A m a)). intro H3. elim H3. - intros y H4. rewrite (MapSweep_semantics_3 _ _ _ H2 a y H4) in H1. discriminate H1. - intro H3. rewrite H3 in H0. discriminate H0. - Qed. - - Lemma MapDisjoint_imp_2 : - forall (m:Map A) (m':Map B), MapDisjoint m m' -> MapDisjoint_2 m m'. - Proof. - unfold MapDisjoint, MapDisjoint_2 in |- *. unfold eqmap, eqm in |- *. intros. - rewrite (MapDomRestrTo_semantics A B m m' a). - cut (in_dom A a m = true -> in_dom B a m' = true -> False). intro. - elim (option_sum _ (MapGet A m a)). intro H1. elim H1. intros y H2. unfold in_dom at 1 in H0. - elim (option_sum _ (MapGet B m' a)). intro H3. elim H3. intros y' H4. unfold in_dom at 1 in H0. - rewrite H4 in H0. rewrite H2 in H0. elim (H0 (refl_equal _) (refl_equal _)). - intro H3. rewrite H3. reflexivity. - intro H1. rewrite H1. case (MapGet B m' a); reflexivity. - exact (H a). - Qed. - - Lemma MapDisjoint_2_imp : - forall (m:Map A) (m':Map B), MapDisjoint_2 m m' -> MapDisjoint m m'. - Proof. - unfold MapDisjoint, MapDisjoint_2 in |- *. unfold eqmap, eqm in |- *. intros. elim (in_dom_some _ _ _ H0). - intros y H2. elim (in_dom_some _ _ _ H1). intros y' H3. - cut (MapGet A (MapDomRestrTo A B m m') a = None). intro. - rewrite (MapDomRestrTo_semantics _ _ m m' a) in H4. rewrite H3 in H4. rewrite H2 in H4. - discriminate H4. - exact (H a). - Qed. - - Lemma Map_M0_disjoint : forall m:Map B, MapDisjoint (M0 A) m. - Proof. - unfold MapDisjoint, in_dom in |- *. intros. discriminate H. - Qed. - - Lemma Map_disjoint_M0 : forall m:Map A, MapDisjoint m (M0 B). - Proof. - unfold MapDisjoint, in_dom in |- *. intros. discriminate H0. - Qed. - -End MapDisjointDef. - -Section MapDisjointExtra. - - Variables A B : Set. - - Lemma MapDisjoint_ext : - forall (m0 m1:Map A) (m2 m3:Map B), - eqmap A m0 m1 -> - eqmap B m2 m3 -> MapDisjoint A B m0 m2 -> MapDisjoint A B m1 m3. - Proof. - intros. apply MapDisjoint_2_imp. unfold MapDisjoint_2 in |- *. - apply eqmap_trans with (m' := MapDomRestrTo A B m0 m2). apply eqmap_sym. apply MapDomRestrTo_ext. - assumption. - assumption. - exact (MapDisjoint_imp_2 _ _ _ _ H1). - Qed. - - Lemma MapMerge_disjoint : - forall m m':Map A, - MapDisjoint A A m m' -> - forall a:ad, - in_dom A a (MapMerge A m m') = - orb (andb (in_dom A a m) (negb (in_dom A a m'))) - (andb (in_dom A a m') (negb (in_dom A a m))). - Proof. - unfold MapDisjoint in |- *. intros. rewrite in_dom_merge. elim (sumbool_of_bool (in_dom A a m)). - intro H0. rewrite H0. elim (sumbool_of_bool (in_dom A a m')). intro H1. elim (H a H0 H1). - intro H1. rewrite H1. reflexivity. - intro H0. rewrite H0. simpl in |- *. rewrite andb_b_true. reflexivity. - Qed. - - Lemma MapDisjoint_M2_l : - forall (m0 m1:Map A) (m2 m3:Map B), - MapDisjoint A B (M2 A m0 m1) (M2 B m2 m3) -> MapDisjoint A B m0 m2. - Proof. - unfold MapDisjoint, in_dom in |- *. intros. elim (option_sum _ (MapGet A m0 a)). intro H2. - elim H2. intros y H3. elim (option_sum _ (MapGet B m2 a)). intro H4. elim H4. - intros y' H5. apply (H (Ndouble a)). - rewrite (MapGet_M2_bit_0_0 _ (Ndouble a) (Ndouble_bit0 a) m0 m1). - rewrite (Ndouble_div2 a). rewrite H3. reflexivity. - rewrite (MapGet_M2_bit_0_0 _ (Ndouble a) (Ndouble_bit0 a) m2 m3). - rewrite (Ndouble_div2 a). rewrite H5. reflexivity. - intro H4. rewrite H4 in H1. discriminate H1. - intro H2. rewrite H2 in H0. discriminate H0. - Qed. - - Lemma MapDisjoint_M2_r : - forall (m0 m1:Map A) (m2 m3:Map B), - MapDisjoint A B (M2 A m0 m1) (M2 B m2 m3) -> MapDisjoint A B m1 m3. - Proof. - unfold MapDisjoint, in_dom in |- *. intros. elim (option_sum _ (MapGet A m1 a)). intro H2. - elim H2. intros y H3. elim (option_sum _ (MapGet B m3 a)). intro H4. elim H4. - intros y' H5. apply (H (Ndouble_plus_one a)). - rewrite - (MapGet_M2_bit_0_1 _ (Ndouble_plus_one a) (Ndouble_plus_one_bit0 a) - m0 m1). - rewrite (Ndouble_plus_one_div2 a). rewrite H3. reflexivity. - rewrite - (MapGet_M2_bit_0_1 _ (Ndouble_plus_one a) (Ndouble_plus_one_bit0 a) - m2 m3). - rewrite (Ndouble_plus_one_div2 a). rewrite H5. reflexivity. - intro H4. rewrite H4 in H1. discriminate H1. - intro H2. rewrite H2 in H0. discriminate H0. - Qed. - - Lemma MapDisjoint_M2 : - forall (m0 m1:Map A) (m2 m3:Map B), - MapDisjoint A B m0 m2 -> - MapDisjoint A B m1 m3 -> MapDisjoint A B (M2 A m0 m1) (M2 B m2 m3). - Proof. - unfold MapDisjoint, in_dom in |- *. intros. elim (sumbool_of_bool (Nbit0 a)). intro H3. - rewrite (MapGet_M2_bit_0_1 A a H3 m0 m1) in H1. - rewrite (MapGet_M2_bit_0_1 B a H3 m2 m3) in H2. exact (H0 (Ndiv2 a) H1 H2). - intro H3. rewrite (MapGet_M2_bit_0_0 A a H3 m0 m1) in H1. - rewrite (MapGet_M2_bit_0_0 B a H3 m2 m3) in H2. exact (H (Ndiv2 a) H1 H2). - Qed. - - Lemma MapDisjoint_M1_l : - forall (m:Map A) (a:ad) (y:B), - MapDisjoint B A (M1 B a y) m -> in_dom A a m = false. - Proof. - unfold MapDisjoint in |- *. intros. elim (sumbool_of_bool (in_dom A a m)). intro H0. - elim (H a (in_dom_M1_1 B a y) H0). - trivial. - Qed. - - Lemma MapDisjoint_M1_r : - forall (m:Map A) (a:ad) (y:B), - MapDisjoint A B m (M1 B a y) -> in_dom A a m = false. - Proof. - unfold MapDisjoint in |- *. intros. elim (sumbool_of_bool (in_dom A a m)). intro H0. - elim (H a H0 (in_dom_M1_1 B a y)). - trivial. - Qed. - - Lemma MapDisjoint_M1_conv_l : - forall (m:Map A) (a:ad) (y:B), - in_dom A a m = false -> MapDisjoint B A (M1 B a y) m. - Proof. - unfold MapDisjoint in |- *. intros. rewrite (in_dom_M1_2 B a a0 y H0) in H. rewrite H1 in H. - discriminate H. - Qed. - - Lemma MapDisjoint_M1_conv_r : - forall (m:Map A) (a:ad) (y:B), - in_dom A a m = false -> MapDisjoint A B m (M1 B a y). - Proof. - unfold MapDisjoint in |- *. intros. rewrite (in_dom_M1_2 B a a0 y H1) in H. rewrite H0 in H. - discriminate H. - Qed. - - Lemma MapDisjoint_sym : - forall (m:Map A) (m':Map B), MapDisjoint A B m m' -> MapDisjoint B A m' m. - Proof. - unfold MapDisjoint in |- *. intros. exact (H _ H1 H0). - Qed. - - Lemma MapDisjoint_empty : - forall m:Map A, MapDisjoint A A m m -> eqmap A m (M0 A). - Proof. - unfold eqmap, eqm in |- *. intros. rewrite <- (MapDomRestrTo_idempotent A m a). - exact (MapDisjoint_imp_2 A A m m H a). - Qed. - - Lemma MapDelta_disjoint : - forall m m':Map A, - MapDisjoint A A m m' -> eqmap A (MapDelta A m m') (MapMerge A m m'). - Proof. - intros. - apply eqmap_trans with - (m' := MapDomRestrBy A A (MapMerge A m m') (MapDomRestrTo A A m m')). - apply MapDelta_as_DomRestrBy. - apply eqmap_trans with (m' := MapDomRestrBy A A (MapMerge A m m') (M0 A)). - apply MapDomRestrBy_ext. apply eqmap_refl. - exact (MapDisjoint_imp_2 A A m m' H). - apply MapDomRestrBy_m_empty. - Qed. - - Variable C : Set. - - Lemma MapDomRestr_disjoint : - forall (m:Map A) (m':Map B) (m'':Map C), - MapDisjoint A B (MapDomRestrTo A C m m'') (MapDomRestrBy B C m' m''). - Proof. - unfold MapDisjoint in |- *. intros m m' m'' a. rewrite in_dom_restrto. rewrite in_dom_restrby. - intros. elim (andb_prop _ _ H). elim (andb_prop _ _ H0). intros. rewrite H4 in H2. - discriminate H2. - Qed. - - Lemma MapDelta_RestrTo_disjoint : - forall m m':Map A, - MapDisjoint A A (MapDelta A m m') (MapDomRestrTo A A m m'). - Proof. - unfold MapDisjoint in |- *. intros m m' a. rewrite in_dom_delta. rewrite in_dom_restrto. - intros. elim (andb_prop _ _ H0). intros. rewrite H1 in H. rewrite H2 in H. discriminate H. - Qed. - - Lemma MapDelta_RestrTo_disjoint_2 : - forall m m':Map A, - MapDisjoint A A (MapDelta A m m') (MapDomRestrTo A A m' m). - Proof. - unfold MapDisjoint in |- *. intros m m' a. rewrite in_dom_delta. rewrite in_dom_restrto. - intros. elim (andb_prop _ _ H0). intros. rewrite H1 in H. rewrite H2 in H. discriminate H. - Qed. - - Variable D : Set. - - Lemma MapSubset_Disjoint : - forall (m:Map A) (m':Map B) (m'':Map C) (m''':Map D), - MapSubset _ _ m m' -> - MapSubset _ _ m'' m''' -> - MapDisjoint _ _ m' m''' -> MapDisjoint _ _ m m''. - Proof. - unfold MapSubset, MapDisjoint in |- *. intros. exact (H1 _ (H _ H2) (H0 _ H3)). - Qed. - - Lemma MapSubset_Disjoint_l : - forall (m:Map A) (m':Map B) (m'':Map C), - MapSubset _ _ m m' -> MapDisjoint _ _ m' m'' -> MapDisjoint _ _ m m''. - Proof. - unfold MapSubset, MapDisjoint in |- *. intros. exact (H0 _ (H _ H1) H2). - Qed. - - Lemma MapSubset_Disjoint_r : - forall (m:Map A) (m'':Map C) (m''':Map D), - MapSubset _ _ m'' m''' -> - MapDisjoint _ _ m m''' -> MapDisjoint _ _ m m''. - Proof. - unfold MapSubset, MapDisjoint in |- *. intros. exact (H0 _ H1 (H _ H2)). - Qed. - -End MapDisjointExtra. \ No newline at end of file diff --git a/theories/IntMap/intro.tex b/theories/IntMap/intro.tex deleted file mode 100644 index 9ad93050..00000000 --- a/theories/IntMap/intro.tex +++ /dev/null @@ -1,6 +0,0 @@ -\section{Maps indexed by binary integers : IntMap}\label{IntMap} - -This library contains a data structure for finite sets implemented by -an efficient structure of map (trees indexed by binary integers). -It was initially developed by Jean Goubault. - diff --git a/theories/Lists/List.v b/theories/Lists/List.v index c80d0b15..a72283d9 100644 --- a/theories/Lists/List.v +++ b/theories/Lists/List.v @@ -1,15 +1,14 @@ - (************************************************************************) - (* v * The Coq Proof Assistant / The Coq Development Team *) - (* l1 = l2. + Proof. + induction l; simpl; auto; injection 1; auto. + Qed. + + Lemma app_inv_tail: + forall l l1 l2 : list A, l1 ++ l = l2 ++ l -> l1 = l2. + Proof. + intros l l1 l2; revert l1 l2 l. + induction l1 as [ | x1 l1]; destruct l2 as [ | x2 l2]; + simpl; auto; intros l H. + absurd (length (x2 :: l2 ++ l) <= length l). + simpl; rewrite app_length; auto with arith. + rewrite <- H; auto with arith. + absurd (length (x1 :: l1 ++ l) <= length l). + simpl; rewrite app_length; auto with arith. + rewrite H; auto with arith. + injection H; clear H; intros; f_equal; eauto. + Qed. End Facts. @@ -512,6 +529,20 @@ Section Elts. exists (a::l'); exists a'; auto. Qed. + Lemma removelast_app : + forall l l', l' <> nil -> removelast (l++l') = l ++ removelast l'. + Proof. + induction l. + simpl; auto. + simpl; intros. + assert (l++l' <> nil). + destruct l. + simpl; auto. + simpl; discriminate. + specialize (IHl l' H). + destruct (l++l'); [elim H0; auto|f_equal; auto]. + Qed. + (****************************************) (** ** Counting occurences of a element *) @@ -534,8 +565,7 @@ Section Elts. simpl; intros; split; [destruct 1 | apply gt_irrefl]. simpl. intro x; destruct (eqA_dec y x) as [Heq|Hneq]. rewrite Heq; intuition. - rewrite <- (IHl x). - tauto. + pose (IHl x). intuition. Qed. Theorem count_occ_inv_nil : forall (l : list A), (forall x:A, count_occ l x = 0) <-> l = nil. @@ -668,8 +698,8 @@ Section ListOps. rewrite app_nth1; auto. rewrite (minus_plus_simpl_l_reverse (length l) n 1). replace (1 + length l) with (S (length l)); auto with arith. - rewrite <- minus_Sn_m; auto with arith; simpl. - apply IHl; auto. + rewrite <- minus_Sn_m; auto with arith. + apply IHl ; auto with arith. rewrite rev_length; auto. Qed. @@ -899,7 +929,7 @@ Section ListOps. apply perm_trans with (l1'++a::l2); auto using Permutation_cons_app. apply perm_skip. apply (IH a l1' l2 l3' l4); auto. - (* swap *) + (* contradict *) intros x y l l' Hp IH; intros. break_list l1 b l1' H; break_list l3 c l3' H0. auto. @@ -1345,7 +1375,7 @@ End Fold_Right_Recursor. destruct n; destruct d; simpl; auto. destruct a; destruct (split l); simpl; auto. destruct a; destruct (split l); simpl in *; auto. - rewrite IHl; simpl; auto. + apply IHl. Qed. Lemma split_length_l : forall (l:list (A*B)), @@ -1618,7 +1648,7 @@ Hint Resolve incl_refl incl_tl incl_tran incl_appl incl_appr incl_cons (**************************************) -(* ** Cutting a list at some position *) +(** * Cutting a list at some position *) (**************************************) Section Cutting. @@ -1651,6 +1681,45 @@ Section Cutting. f_equal; auto. Qed. + Lemma firstn_length : forall n l, length (firstn n l) = min n (length l). + Proof. + induction n; destruct l; simpl; auto. + Qed. + + Lemma removelast_firstn : forall n l, n < length l -> + removelast (firstn (S n) l) = firstn n l. + Proof. + induction n; destruct l. + simpl; auto. + simpl; auto. + simpl; auto. + intros. + simpl in H. + change (firstn (S (S n)) (a::l)) with ((a::nil)++firstn (S n) l). + change (firstn (S n) (a::l)) with (a::firstn n l). + rewrite removelast_app. + rewrite IHn; auto with arith. + + clear IHn; destruct l; simpl in *; try discriminate. + inversion_clear H. + inversion_clear H0. + Qed. + + Lemma firstn_removelast : forall n l, n < length l -> + firstn n (removelast l) = firstn n l. + Proof. + induction n; destruct l. + simpl; auto. + simpl; auto. + simpl; auto. + intros. + simpl in H. + change (removelast (a :: l)) with (removelast ((a::nil)++l)). + rewrite removelast_app. + simpl; f_equal; auto with arith. + intro H0; rewrite H0 in H; inversion_clear H; inversion_clear H1. + Qed. + End Cutting. @@ -1672,8 +1741,8 @@ Section ReDun. inversion_clear 1; auto. inversion_clear 1. constructor. - swap H0. - apply in_or_app; destruct (in_app_or _ _ _ H); simpl; tauto. + contradict H0. + apply in_or_app; destruct (in_app_or _ _ _ H0); simpl; tauto. apply IHl with a0; auto. Qed. @@ -1682,8 +1751,8 @@ Section ReDun. induction l; simpl. inversion_clear 1; auto. inversion_clear 1. - swap H0. - destruct H. + contradict H0. + destruct H0. subst a0. apply in_or_app; right; red; auto. destruct (IHl _ _ H1); auto. diff --git a/theories/Lists/ListSet.v b/theories/Lists/ListSet.v index 4e009ed5..021a64c1 100644 --- a/theories/Lists/ListSet.v +++ b/theories/Lists/ListSet.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: ListSet.v 6844 2005-03-16 13:09:55Z herbelin $ i*) +(*i $Id: ListSet.v 10616 2008-03-04 17:33:35Z letouzey $ i*) (** A Library for finite sets, implemented as lists *) @@ -20,7 +20,7 @@ Set Implicit Arguments. Section first_definitions. - Variable A : Set. + Variable A : Type. Hypothesis Aeq_dec : forall x y:A, {x = y} + {x <> y}. Definition set := list A. @@ -100,7 +100,7 @@ Section first_definitions. Qed. Lemma set_mem_ind : - forall (B:Set) (P:B -> Prop) (y z:B) (a:A) (x:set), + forall (B:Type) (P:B -> Prop) (y z:B) (a:A) (x:set), (set_In a x -> P y) -> P z -> P (if set_mem a x then y else z). Proof. @@ -110,7 +110,7 @@ Section first_definitions. Qed. Lemma set_mem_ind2 : - forall (B:Set) (P:B -> Prop) (y z:B) (a:A) (x:set), + forall (B:Type) (P:B -> Prop) (y z:B) (a:A) (x:set), (set_In a x -> P y) -> (~ set_In a x -> P z) -> P (if set_mem a x then y else z). @@ -373,7 +373,7 @@ End first_definitions. Section other_definitions. - Variables A B : Set. + Variables A B : Type. Definition set_prod : set A -> set B -> set (A * B) := list_prod (A:=A) (B:=B). diff --git a/theories/Lists/ListTactics.v b/theories/Lists/ListTactics.v index e46f1279..515ed138 100644 --- a/theories/Lists/ListTactics.v +++ b/theories/Lists/ListTactics.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: ListTactics.v 9551 2007-01-29 15:13:35Z bgregoir $ i*) +(*i $Id: ListTactics.v 9427 2006-12-11 18:46:35Z bgregoir $ i*) Require Import BinPos. Require Import List. diff --git a/theories/Lists/SetoidList.v b/theories/Lists/SetoidList.v index eb40594b..4edc1581 100644 --- a/theories/Lists/SetoidList.v +++ b/theories/Lists/SetoidList.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (***********************************************************************) -(* $Id: SetoidList.v 8853 2006-05-23 18:17:38Z herbelin $ *) +(* $Id: SetoidList.v 10616 2008-03-04 17:33:35Z letouzey $ *) Require Export List. Require Export Sorting. @@ -21,7 +21,7 @@ Unset Strict Implicit. found in [Sorting]. *) Section Type_with_equality. -Variable A : Set. +Variable A : Type. Variable eqA : A -> A -> Prop. (** Being in a list modulo an equality relation over type [A]. *) @@ -32,6 +32,18 @@ Inductive InA (x : A) : list A -> Prop := Hint Constructors InA. +Lemma InA_cons : forall x y l, InA x (y::l) <-> eqA x y \/ InA x l. +Proof. + intuition. + inversion H; auto. +Qed. + +Lemma InA_nil : forall x, InA x nil <-> False. +Proof. + intuition. + inversion H. +Qed. + (** An alternative definition of [InA]. *) Lemma InA_alt : forall x l, InA x l <-> exists y, eqA x y /\ In y l. @@ -53,7 +65,28 @@ Hint Constructors NoDupA. (** lists with same elements modulo [eqA] *) -Definition eqlistA l l' := forall x, InA x l <-> InA x l'. +Definition equivlistA l l' := forall x, InA x l <-> InA x l'. + +(** lists with same elements modulo [eqA] at the same place *) + +Inductive eqlistA : list A -> list A -> Prop := + | eqlistA_nil : eqlistA nil nil + | eqlistA_cons : forall x x' l l', + eqA x x' -> eqlistA l l' -> eqlistA (x::l) (x'::l'). + +Hint Constructors eqlistA. + +(** Compatibility of a boolean function with respect to an equality. *) + +Definition compat_bool (f : A->bool) := forall x y, eqA x y -> f x = f y. + +(** Compatibility of a function upon natural numbers. *) + +Definition compat_nat (f : A->nat) := forall x y, eqA x y -> f x = f y. + +(** Compatibility of a predicate with respect to an equality. *) + +Definition compat_P (P : A->Prop) := forall x y, eqA x y -> P x -> P y. (** Results concerning lists modulo [eqA] *) @@ -91,6 +124,35 @@ exists (a::l1); exists y; exists l2; auto. split; simpl; f_equal; auto. Qed. +Lemma InA_app : forall l1 l2 x, + InA x (l1 ++ l2) -> InA x l1 \/ InA x l2. +Proof. + induction l1; simpl in *; intuition. + inversion_clear H; auto. + elim (IHl1 l2 x H0); auto. +Qed. + +Lemma InA_app_iff : forall l1 l2 x, + InA x (l1 ++ l2) <-> InA x l1 \/ InA x l2. +Proof. + split. + apply InA_app. + destruct 1; generalize H; do 2 rewrite InA_alt. + destruct 1 as (y,(H1,H2)); exists y; split; auto. + apply in_or_app; auto. + destruct 1 as (y,(H1,H2)); exists y; split; auto. + apply in_or_app; auto. +Qed. + +Lemma InA_rev : forall p m, + InA p (rev m) <-> InA p m. +Proof. + intros; do 2 rewrite InA_alt. + split; intros (y,H); exists y; intuition. + rewrite In_rev; auto. + rewrite <- In_rev; auto. +Qed. + (** Results concerning lists modulo [eqA] and [ltA] *) Variable ltA : A -> A -> Prop. @@ -106,10 +168,12 @@ Hint Immediate ltA_eqA eqA_ltA. Notation InfA:=(lelistA ltA). Notation SortA:=(sort ltA). +Hint Constructors lelistA sort. + Lemma InfA_ltA : forall l x y, ltA x y -> InfA y l -> InfA x l. Proof. - intro s; case s; constructor; inversion_clear H0. + destruct l; constructor; inversion_clear H0; eapply ltA_trans; eauto. Qed. @@ -153,6 +217,26 @@ intros; eapply SortA_InfA_InA; eauto. apply InA_InfA. Qed. +Lemma InfA_app : forall l1 l2 a, InfA a l1 -> InfA a l2 -> InfA a (l1++l2). +Proof. + induction l1; simpl; auto. + inversion_clear 1; auto. +Qed. + +Lemma SortA_app : + forall l1 l2, SortA l1 -> SortA l2 -> + (forall x y, InA x l1 -> InA y l2 -> ltA x y) -> + SortA (l1 ++ l2). +Proof. + induction l1; simpl in *; intuition. + inversion_clear H. + constructor; auto. + apply InfA_app; auto. + destruct l2; auto. +Qed. + +Section NoDupA. + Lemma SortA_NoDupA : forall l, SortA l -> NoDupA l. Proof. simple induction l; auto. @@ -185,7 +269,6 @@ intros. apply (H1 x); auto. Qed. - Lemma NoDupA_rev : forall l, NoDupA l -> NoDupA (rev l). Proof. induction l. @@ -206,33 +289,240 @@ rewrite In_rev; auto. inversion H4. Qed. +Lemma NoDupA_split : forall l l' x, NoDupA (l++x::l') -> NoDupA (l++l'). +Proof. + induction l; simpl in *; inversion_clear 1; auto. + constructor; eauto. + contradict H0. + rewrite InA_app_iff in *; rewrite InA_cons; intuition. +Qed. -Lemma InA_app : forall l1 l2 x, - InA x (l1 ++ l2) -> InA x l1 \/ InA x l2. +Lemma NoDupA_swap : forall l l' x, NoDupA (l++x::l') -> NoDupA (x::l++l'). Proof. - induction l1; simpl in *; intuition. - inversion_clear H; auto. - elim (IHl1 l2 x H0); auto. + induction l; simpl in *; inversion_clear 1; auto. + constructor; eauto. + assert (H2:=IHl _ _ H1). + inversion_clear H2. + rewrite InA_cons. + red; destruct 1. + apply H0. + rewrite InA_app_iff in *; rewrite InA_cons; auto. + apply H; auto. + constructor. + contradict H0. + rewrite InA_app_iff in *; rewrite InA_cons; intuition. + eapply NoDupA_split; eauto. Qed. - Hint Constructors lelistA sort. +End NoDupA. -Lemma InfA_app : forall l1 l2 a, InfA a l1 -> InfA a l2 -> InfA a (l1++l2). +(** Some results about [eqlistA] *) + +Section EqlistA. + +Lemma eqlistA_length : forall l l', eqlistA l l' -> length l = length l'. Proof. - induction l1; simpl; auto. - inversion_clear 1; auto. +induction 1; auto; simpl; congruence. Qed. -Lemma SortA_app : - forall l1 l2, SortA l1 -> SortA l2 -> - (forall x y, InA x l1 -> InA y l2 -> ltA x y) -> - SortA (l1 ++ l2). +Lemma eqlistA_app : forall l1 l1' l2 l2', + eqlistA l1 l1' -> eqlistA l2 l2' -> eqlistA (l1++l2) (l1'++l2'). Proof. - induction l1; simpl in *; intuition. - inversion_clear H. - constructor; auto. - apply InfA_app; auto. - destruct l2; auto. +intros l1 l1' l2 l2' H; revert l2 l2'; induction H; simpl; auto. +Qed. + +Lemma eqlistA_rev_app : forall l1 l1', + eqlistA l1 l1' -> forall l2 l2', eqlistA l2 l2' -> + eqlistA ((rev l1)++l2) ((rev l1')++l2'). +Proof. +induction 1; auto. +simpl; intros. +do 2 rewrite app_ass; simpl; auto. +Qed. + +Lemma eqlistA_rev : forall l1 l1', + eqlistA l1 l1' -> eqlistA (rev l1) (rev l1'). +Proof. +intros. +rewrite (app_nil_end (rev l1)). +rewrite (app_nil_end (rev l1')). +apply eqlistA_rev_app; auto. +Qed. + +Lemma SortA_equivlistA_eqlistA : forall l l', + SortA l -> SortA l' -> equivlistA l l' -> eqlistA l l'. +Proof. +induction l; destruct l'; simpl; intros; auto. +destruct (H1 a); assert (H4 : InA a nil) by auto; inversion H4. +destruct (H1 a); assert (H4 : InA a nil) by auto; inversion H4. +inversion_clear H; inversion_clear H0. +assert (forall y, InA y l -> ltA a y). +intros; eapply SortA_InfA_InA with (l:=l); eauto. +assert (forall y, InA y l' -> ltA a0 y). +intros; eapply SortA_InfA_InA with (l:=l'); eauto. +clear H3 H4. +assert (eqA a a0). + destruct (H1 a). + destruct (H1 a0). + assert (InA a (a0::l')) by auto. + inversion_clear H8; auto. + assert (InA a0 (a::l)) by auto. + inversion_clear H8; auto. + elim (@ltA_not_eqA a a); auto. + apply ltA_trans with a0; auto. +constructor; auto. +apply IHl; auto. +split; intros. +destruct (H1 x). +assert (H8 : InA x (a0::l')) by auto; inversion_clear H8; auto. +elim (@ltA_not_eqA a x); eauto. +destruct (H1 x). +assert (H8 : InA x (a::l)) by auto; inversion_clear H8; auto. +elim (@ltA_not_eqA a0 x); eauto. +Qed. + +End EqlistA. + +(** A few things about [filter] *) + +Section Filter. + +Lemma filter_sort : forall f l, SortA l -> SortA (List.filter f l). +Proof. +induction l; simpl; auto. +inversion_clear 1; auto. +destruct (f a); auto. +constructor; auto. +apply In_InfA; auto. +intros. +rewrite filter_In in H; destruct H. +eapply SortA_InfA_InA; eauto. +Qed. + +Lemma filter_InA : forall f, (compat_bool f) -> + forall l x, InA x (List.filter f l) <-> InA x l /\ f x = true. +Proof. +intros; do 2 rewrite InA_alt; intuition. +destruct H0 as (y,(H0,H1)); rewrite filter_In in H1; exists y; intuition. +destruct H0 as (y,(H0,H1)); rewrite filter_In in H1; intuition. + rewrite (H _ _ H0); auto. +destruct H1 as (y,(H0,H1)); exists y; rewrite filter_In; intuition. + rewrite <- (H _ _ H0); auto. +Qed. + +Lemma filter_split : + forall f, (forall x y, f x = true -> f y = false -> ltA x y) -> + forall l, SortA l -> l = filter f l ++ filter (fun x=>negb (f x)) l. +Proof. +induction l; simpl; intros; auto. +inversion_clear H0. +pattern l at 1; rewrite IHl; auto. +case_eq (f a); simpl; intros; auto. +assert (forall e, In e l -> f e = false). + intros. + assert (H4:=SortA_InfA_InA H1 H2 (In_InA H3)). + case_eq (f e); simpl; intros; auto. + elim (@ltA_not_eqA e e); auto. + apply ltA_trans with a; eauto. +replace (List.filter f l) with (@nil A); auto. +generalize H3; clear; induction l; simpl; auto. +case_eq (f a); auto; intros. +rewrite H3 in H; auto; try discriminate. +Qed. + +End Filter. + +Section Fold. + +Variable B:Type. +Variable eqB:B->B->Prop. + +(** Compatibility of a two-argument function with respect to two equalities. *) +Definition compat_op (f : A -> B -> B) := + forall (x x' : A) (y y' : B), eqA x x' -> eqB y y' -> eqB (f x y) (f x' y'). + +(** Two-argument functions that allow to reorder their arguments. *) +Definition transpose (f : A -> B -> B) := + forall (x y : A) (z : B), eqB (f x (f y z)) (f y (f x z)). + +Variable st:Setoid_Theory _ eqB. +Variable f:A->B->B. +Variable i:B. +Variable Comp:compat_op f. + +Lemma fold_right_eqlistA : + forall s s', eqlistA s s' -> + eqB (fold_right f i s) (fold_right f i s'). +Proof. +induction 1; simpl; auto. +refl_st. +Qed. + +Variable Ass:transpose f. + +Lemma fold_right_commutes : forall s1 s2 x, + eqB (fold_right f i (s1++x::s2)) (f x (fold_right f i (s1++s2))). +Proof. +induction s1; simpl; auto; intros. +refl_st. +trans_st (f a (f x (fold_right f i (s1++s2)))). +Qed. + +Lemma equivlistA_NoDupA_split : forall l l1 l2 x y, eqA x y -> + NoDupA (x::l) -> NoDupA (l1++y::l2) -> + equivlistA (x::l) (l1++y::l2) -> equivlistA l (l1++l2). +Proof. + intros; intro a. + generalize (H2 a). + repeat rewrite InA_app_iff. + do 2 rewrite InA_cons. + inversion_clear H0. + assert (SW:=NoDupA_swap H1). + inversion_clear SW. + rewrite InA_app_iff in H0. + split; intros. + assert (~eqA a x). + contradict H3; apply InA_eqA with a; auto. + assert (~eqA a y). + contradict H8; eauto. + intuition. + assert (eqA a x \/ InA a l) by intuition. + destruct H8; auto. + elim H0. + destruct H7; [left|right]; eapply InA_eqA; eauto. +Qed. + +Lemma fold_right_equivlistA : + forall s s', NoDupA s -> NoDupA s' -> + equivlistA s s' -> eqB (fold_right f i s) (fold_right f i s'). +Proof. + simple induction s. + destruct s'; simpl. + intros; refl_st; auto. + unfold equivlistA; intros. + destruct (H1 a). + assert (X : InA a nil); auto; inversion X. + intros x l Hrec s' N N' E; simpl in *. + assert (InA x s'). + rewrite <- (E x); auto. + destruct (InA_split H) as (s1,(y,(s2,(H1,H2)))). + subst s'. + trans_st (f x (fold_right f i (s1++s2))). + apply Comp; auto. + apply Hrec; auto. + inversion_clear N; auto. + eapply NoDupA_split; eauto. + eapply equivlistA_NoDupA_split; eauto. + trans_st (f y (fold_right f i (s1++s2))). + apply Comp; auto; refl_st. + sym_st; apply fold_right_commutes. +Qed. + +Lemma fold_right_add : + forall s' s x, NoDupA s -> NoDupA s' -> ~ InA x s -> + equivlistA s' (x::s) -> eqB (fold_right f i s') (f x (fold_right f i s)). +Proof. + intros; apply (@fold_right_equivlistA s' (x::s)); auto. Qed. Section Remove. @@ -279,7 +569,7 @@ destruct H0; apply eqA_trans with a; auto. split. inversion_clear 1. split; auto. -swap n. +contradict n. apply eqA_trans with y; auto. rewrite (IHl x y) in H0; destruct H0; auto. destruct 1; inversion_clear H; auto. @@ -298,14 +588,14 @@ rewrite removeA_InA. intuition. Qed. -Lemma removeA_eqlistA : forall l l' x, - ~InA x l -> eqlistA (x :: l) l' -> eqlistA l (removeA x l'). +Lemma removeA_equivlistA : forall l l' x, + ~InA x l -> equivlistA (x :: l) l' -> equivlistA l (removeA x l'). Proof. -unfold eqlistA; intros. +unfold equivlistA; intros. rewrite removeA_InA. split; intros. rewrite <- H0; split; auto. -swap H. +contradict H. apply InA_eqA with x0; auto. rewrite <- (H0 x0) in H1. destruct H1. @@ -313,160 +603,17 @@ inversion_clear H1; auto. elim H2; auto. Qed. -Let addlistA x l l' := forall y, InA y l' <-> eqA x y \/ InA y l. - -Lemma removeA_add : - forall s s' x x', NoDupA s -> NoDupA (x' :: s') -> - ~ eqA x x' -> ~ InA x s -> - addlistA x s (x' :: s') -> addlistA x (removeA x' s) s'. -Proof. -unfold addlistA; intros. -inversion_clear H0. -rewrite removeA_InA; auto. -split; intros. -destruct (eqA_dec x y); auto; intros. -right; split; auto. -destruct (H3 y); clear H3. -destruct H6; intuition. -swap H4; apply InA_eqA with y; auto. -destruct H0. -assert (InA y (x' :: s')) by (rewrite H3; auto). -inversion_clear H6; auto. -elim H1; apply eqA_trans with y; auto. -destruct H0. -assert (InA y (x' :: s')) by (rewrite H3; auto). -inversion_clear H7; auto. -elim H6; auto. -Qed. - -Section Fold. - -Variable B:Set. -Variable eqB:B->B->Prop. - -(** Two-argument functions that allow to reorder its arguments. *) -Definition transpose (f : A -> B -> B) := - forall (x y : A) (z : B), eqB (f x (f y z)) (f y (f x z)). - -(** Compatibility of a two-argument function with respect to two equalities. *) -Definition compat_op (f : A -> B -> B) := - forall (x x' : A) (y y' : B), eqA x x' -> eqB y y' -> eqB (f x y) (f x' y'). - -(** Compatibility of a function upon natural numbers. *) -Definition compat_nat (f : A -> nat) := - forall x x' : A, eqA x x' -> f x = f x'. - -Variable st:Setoid_Theory _ eqB. -Variable f:A->B->B. -Variable Comp:compat_op f. -Variable Ass:transpose f. -Variable i:B. - -Lemma removeA_fold_right_0 : - forall s x, ~InA x s -> - eqB (fold_right f i s) (fold_right f i (removeA x s)). -Proof. - simple induction s; simpl; intros. - refl_st. - destruct (eqA_dec x a); simpl; intros. - absurd_hyp e; auto. - apply Comp; auto. -Qed. - -Lemma removeA_fold_right : - forall s x, NoDupA s -> InA x s -> - eqB (fold_right f i s) (f x (fold_right f i (removeA x s))). -Proof. - simple induction s; simpl. - inversion_clear 2. - intros. - inversion_clear H0. - destruct (eqA_dec x a); simpl; intros. - apply Comp; auto. - apply removeA_fold_right_0; auto. - swap H2; apply InA_eqA with x; auto. - inversion_clear H1. - destruct n; auto. - trans_st (f a (f x (fold_right f i (removeA x l)))). -Qed. - -Lemma fold_right_equal : - forall s s', NoDupA s -> NoDupA s' -> - eqlistA s s' -> eqB (fold_right f i s) (fold_right f i s'). -Proof. - simple induction s. - destruct s'; simpl. - intros; refl_st; auto. - unfold eqlistA; intros. - destruct (H1 a). - assert (X : InA a nil); auto; inversion X. - intros x l Hrec s' N N' E; simpl in *. - trans_st (f x (fold_right f i (removeA x s'))). - apply Comp; auto. - apply Hrec; auto. - inversion N; auto. - apply removeA_NoDupA; auto; apply eqA_trans. - apply removeA_eqlistA; auto. - inversion_clear N; auto. - sym_st. - apply removeA_fold_right; auto. - unfold eqlistA in E. - rewrite <- E; auto. -Qed. - -Lemma fold_right_add : - forall s' s x, NoDupA s -> NoDupA s' -> ~ InA x s -> - addlistA x s s' -> eqB (fold_right f i s') (f x (fold_right f i s)). -Proof. - simple induction s'. - unfold addlistA; intros. - destruct (H2 x); clear H2. - assert (X : InA x nil); auto; inversion X. - intros x' l' Hrec s x N N' IN EQ; simpl. - (* if x=x' *) - destruct (eqA_dec x x'). - apply Comp; auto. - apply fold_right_equal; auto. - inversion_clear N'; trivial. - unfold eqlistA; unfold addlistA in EQ; intros. - destruct (EQ x0); clear EQ. - split; intros. - destruct H; auto. - inversion_clear N'. - destruct H2; apply InA_eqA with x0; auto. - apply eqA_trans with x; auto. - assert (X:InA x0 (x' :: l')); auto; inversion_clear X; auto. - destruct IN; apply InA_eqA with x0; auto. - apply eqA_trans with x'; auto. - (* else x<>x' *) - trans_st (f x' (f x (fold_right f i (removeA x' s)))). - apply Comp; auto. - apply Hrec; auto. - apply removeA_NoDupA; auto; apply eqA_trans. - inversion_clear N'; auto. - rewrite removeA_InA; intuition. - apply removeA_add; auto. - trans_st (f x (f x' (fold_right f i (removeA x' s)))). - apply Comp; auto. - sym_st. - apply removeA_fold_right; auto. - destruct (EQ x'). - destruct H; auto; destruct n; auto. -Qed. +End Remove. End Fold. -End Remove. - End Type_with_equality. -Hint Constructors InA. -Hint Constructors NoDupA. -Hint Constructors sort. -Hint Constructors lelistA. +Hint Unfold compat_bool compat_nat compat_P. +Hint Constructors InA NoDupA sort lelistA eqlistA. Section Find. -Variable A B : Set. +Variable A B : Type. Variable eqA : A -> A -> Prop. Hypothesis eqA_sym : forall x y, eqA x y -> eqA y x. Hypothesis eqA_trans : forall x y z, eqA x y -> eqA y z -> eqA x z. diff --git a/theories/Lists/StreamMemo.v b/theories/Lists/StreamMemo.v new file mode 100644 index 00000000..bdbe0ecc --- /dev/null +++ b/theories/Lists/StreamMemo.v @@ -0,0 +1,205 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* A. + +CoFixpoint memo_make (n:nat) : Stream A := Cons (f n) (memo_make (S n)). + +Definition memo_list := memo_make 0. + +Fixpoint memo_get (n:nat) (l:Stream A) : A := + match n with + | O => hd l + | S n1 => memo_get n1 (tl l) + end. + +Theorem memo_get_correct: forall n, memo_get n memo_list = f n. +Proof. +assert (F1: forall n m, memo_get n (memo_make m) = f (n + m)). + induction n as [| n Hrec]; try (intros m; refine (refl_equal _)). + intros m; simpl; rewrite Hrec. + rewrite plus_n_Sm; auto. +intros n; apply trans_equal with (f (n + 0)); try exact (F1 n 0). +rewrite <- plus_n_O; auto. +Qed. + +(** Building with possible sharing using a iterator [g] : + We now suppose in addition that [f n] is in fact the [n]-th + iterate of a function [g]. +*) + +Variable g: A -> A. + +Hypothesis Hg_correct: forall n, f (S n) = g (f n). + +CoFixpoint imemo_make (fn:A) : Stream A := + let fn1 := g fn in + Cons fn1 (imemo_make fn1). + +Definition imemo_list := let f0 := f 0 in + Cons f0 (imemo_make f0). + +Theorem imemo_get_correct: forall n, memo_get n imemo_list = f n. +Proof. +assert (F1: forall n m, + memo_get n (imemo_make (f m)) = f (S (n + m))). + induction n as [| n Hrec]; try (intros m; exact (sym_equal (Hg_correct m))). + simpl; intros m; rewrite <- Hg_correct; rewrite Hrec; rewrite <- plus_n_Sm; auto. +destruct n as [| n]; try apply refl_equal. +unfold imemo_list; simpl; rewrite F1. +rewrite <- plus_n_O; auto. +Qed. + +End MemoFunction. + +(** For a dependent function, the previous solution is + reused thanks to a temporarly hiding of the dependency + in a "container" [memo_val]. *) + +Section DependentMemoFunction. + +Variable A: nat -> Type. +Variable f: forall n, A n. + +Inductive memo_val: Type := + memo_mval: forall n, A n -> memo_val. + +Fixpoint is_eq (n m : nat) {struct n}: {n = m} + {True} := + match n, m return {n = m} + {True} with + | 0, 0 =>left True (refl_equal 0) + | 0, S m1 => right (0 = S m1) I + | S n1, 0 => right (S n1 = 0) I + | S n1, S m1 => + match is_eq n1 m1 with + | left H => left True (f_equal S H) + | right _ => right (S n1 = S m1) I + end + end. + +Definition memo_get_val n (v: memo_val): A n := +match v with +| memo_mval m x => + match is_eq n m with + | left H => + match H in (@eq _ _ y) return (A y -> A n) with + | refl_equal => fun v1 : A n => v1 + end + | right _ => fun _ : A m => f n + end x +end. + +Let mf n := memo_mval n (f n). + +Definition dmemo_list := memo_list _ mf. + +Definition dmemo_get n l := memo_get_val n (memo_get _ n l). + +Theorem dmemo_get_correct: forall n, dmemo_get n dmemo_list = f n. +Proof. +intros n; unfold dmemo_get, dmemo_list. +rewrite (memo_get_correct memo_val mf n); simpl. +case (is_eq n n); simpl; auto; intros e. +assert (e = refl_equal n). + apply eq_proofs_unicity. + induction x as [| x Hx]; destruct y as [| y]. + left; auto. + right; intros HH; discriminate HH. + right; intros HH; discriminate HH. + case (Hx y). + intros HH; left; case HH; auto. + intros HH; right; intros HH1; case HH. + injection HH1; auto. +rewrite H; auto. +Qed. + +(** Finally, a version with both dependency and iterator *) + +Variable g: forall n, A n -> A (S n). + +Hypothesis Hg_correct: forall n, f (S n) = g n (f n). + +Let mg v := match v with + memo_mval n1 v1 => memo_mval (S n1) (g n1 v1) end. + +Definition dimemo_list := imemo_list _ mf mg. + +Theorem dimemo_get_correct: forall n, dmemo_get n dimemo_list = f n. +Proof. +intros n; unfold dmemo_get, dimemo_list. +rewrite (imemo_get_correct memo_val mf mg); simpl. +case (is_eq n n); simpl; auto; intros e. +assert (e = refl_equal n). + apply eq_proofs_unicity. + induction x as [| x Hx]; destruct y as [| y]. + left; auto. + right; intros HH; discriminate HH. + right; intros HH; discriminate HH. + case (Hx y). + intros HH; left; case HH; auto. + intros HH; right; intros HH1; case HH. + injection HH1; auto. +rewrite H; auto. +intros n1; unfold mf; rewrite Hg_correct; auto. +Qed. + +End DependentMemoFunction. + +(** An example with the memo function on factorial *) + +(* +Require Import ZArith. +Open Scope Z_scope. + +Fixpoint tfact (n: nat) := + match n with + | O => 1 + | S n1 => Z_of_nat n * tfact n1 + end. + +Definition lfact_list := + dimemo_list _ tfact (fun n z => (Z_of_nat (S n) * z)). + +Definition lfact n := dmemo_get _ tfact n lfact_list. + +Theorem lfact_correct n: lfact n = tfact n. +Proof. +intros n; unfold lfact, lfact_list. +rewrite dimemo_get_correct; auto. +Qed. + +Fixpoint nop p := + match p with + | xH => 0 + | xI p1 => nop p1 + | xO p1 => nop p1 + end. + +Fixpoint test z := + match z with + | Z0 => 0 + | Zpos p1 => nop p1 + | Zneg p1 => nop p1 + end. + +Time Eval vm_compute in test (lfact 2000). +Time Eval vm_compute in test (lfact 2000). +Time Eval vm_compute in test (lfact 1500). +Time Eval vm_compute in (lfact 1500). +*) + diff --git a/theories/Lists/Streams.v b/theories/Lists/Streams.v index 7bc6a09d..49990502 100644 --- a/theories/Lists/Streams.v +++ b/theories/Lists/Streams.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Streams.v 8642 2006-03-17 10:09:02Z notin $ i*) +(*i $Id: Streams.v 9967 2007-07-11 15:25:03Z roconnor $ i*) Set Implicit Arguments. @@ -14,9 +14,9 @@ Set Implicit Arguments. Section Streams. -Variable A : Set. +Variable A : Type. -CoInductive Stream : Set := +CoInductive Stream : Type := Cons : A -> Stream -> Stream. @@ -146,6 +146,15 @@ Inductive Exists ( x: Stream ) : Prop := CoInductive ForAll (x: Stream) : Prop := HereAndFurther : P x -> ForAll (tl x) -> ForAll x. +Lemma ForAll_Str_nth_tl : forall m x, ForAll x -> ForAll (Str_nth_tl m x). +Proof. +induction m. + tauto. +intros x [_ H]. +simpl. +apply IHm. +assumption. +Qed. Section Co_Induction_ForAll. Variable Inv : Stream -> Prop. @@ -162,15 +171,78 @@ End Stream_Properties. End Streams. Section Map. -Variables A B : Set. +Variables A B : Type. Variable f : A -> B. CoFixpoint map (s:Stream A) : Stream B := Cons (f (hd s)) (map (tl s)). + +Lemma Str_nth_tl_map : forall n s, Str_nth_tl n (map s)= map (Str_nth_tl n s). +Proof. +induction n. +reflexivity. +simpl. +intros s. +apply IHn. +Qed. + +Lemma Str_nth_map : forall n s, Str_nth n (map s)= f (Str_nth n s). +Proof. +intros n s. +unfold Str_nth. +rewrite Str_nth_tl_map. +reflexivity. +Qed. + +Lemma ForAll_map : forall (P:Stream B -> Prop) (S:Stream A), ForAll (fun s => P +(map s)) S <-> ForAll P (map S). +Proof. +intros P S. +split; generalize S; clear S; cofix; intros S; constructor; +destruct H as [H0 H]; firstorder. +Qed. + +Lemma Exists_map : forall (P:Stream B -> Prop) (S:Stream A), Exists (fun s => P +(map s)) S -> Exists P (map S). +Proof. +intros P S H. +(induction H;[left|right]); firstorder. +Defined. + End Map. Section Constant_Stream. -Variable A : Set. +Variable A : Type. Variable a : A. CoFixpoint const : Stream A := Cons a const. End Constant_Stream. -Unset Implicit Arguments. \ No newline at end of file +Section Zip. + +Variable A B C : Type. +Variable f: A -> B -> C. + +CoFixpoint zipWith (a:Stream A) (b:Stream B) : Stream C := +Cons (f (hd a) (hd b)) (zipWith (tl a) (tl b)). + +Lemma Str_nth_tl_zipWith : forall n (a:Stream A) (b:Stream B), + Str_nth_tl n (zipWith a b)= zipWith (Str_nth_tl n a) (Str_nth_tl n b). +Proof. +induction n. +reflexivity. +intros [x xs] [y ys]. +unfold Str_nth in *. +simpl in *. +apply IHn. +Qed. + +Lemma Str_nth_zipWith : forall n (a:Stream A) (b:Stream B), Str_nth n (zipWith a + b)= f (Str_nth n a) (Str_nth n b). +Proof. +intros. +unfold Str_nth. +rewrite Str_nth_tl_zipWith. +reflexivity. +Qed. + +End Zip. + +Unset Implicit Arguments. diff --git a/theories/Logic/ChoiceFacts.v b/theories/Logic/ChoiceFacts.v index 3b066cfc..3d434b37 100644 --- a/theories/Logic/ChoiceFacts.v +++ b/theories/Logic/ChoiceFacts.v @@ -1,4 +1,3 @@ -(* -*- coding: utf-8 -*- *) (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* GAC_rel and PL_2 |- AC_rel + IGP -> GAC_rel and GAC_rel = OAC_rel +3.1. typed IPL_2 + Sigma-types + PI |- AC_rel = GAC_rel and IPL_2 |- AC_rel + IGP -> GAC_rel and IPL_2 |- GAC_rel = OAC_rel + +3.2. IPL^2 |- AC_fun + IGP = GAC_fun = OAC_fun = AC_fun + Drinker -4. 2. IPL^2 |- AC_fun + IGP = GAC_fun = OAC_fun = AC_fun + Drinker +3.3. D_iota -> ID_iota and D_epsilon <-> ID_epsilon + Drinker -5. Derivability of choice for decidable relations with well-ordered codomain +4. Derivability of choice for decidable relations with well-ordered codomain -6. Equivalence of choices on dependent or non dependent functional types +5. Equivalence of choices on dependent or non dependent functional types -7. Non contradiction of constructive descriptions wrt functional choices +6. Non contradiction of constructive descriptions wrt functional choices -8. Definite description transports classical logic to the computational world +7. Definite description transports classical logic to the computational world References: -[Bell] John L. Bell, Choice principles in intuitionistic set theory, +[[Bell]] John L. Bell, Choice principles in intuitionistic set theory, unpublished. -[Bell93] John L. Bell, Hilbert's Epsilon Operator in Intuitionistic +[[Bell93]] John L. Bell, Hilbert's Epsilon Operator in Intuitionistic Type Theories, Mathematical Logic Quarterly, volume 39, 1993. [Carlstrøm05] Jesper Carlstrøm, Interpreting descriptions in @@ -84,8 +87,6 @@ intentional type theory, Journal of Symbolic Logic 70(2):488-514, 2005. Set Implicit Arguments. -Notation Local "'inhabited' A" := A (at level 10, only parsing). - (**********************************************************************) (** * Definitions *) @@ -95,9 +96,9 @@ Section ChoiceSchemes. Variables A B :Type. -Variables P:A->Prop. +Variable P:A->Prop. -Variables R:A->B->Prop. +Variable R:A->B->Prop. (** ** Constructive choice and description *) @@ -183,15 +184,15 @@ Definition OmniscientFunctionalChoice_on := (** D_epsilon *) -Definition ClassicalIndefiniteDescription := +Definition EpsilonStatement_on := forall P:A->Prop, - A -> { x:A | (exists x, P x) -> P x }. + inhabited A -> { x:A | (exists x, P x) -> P x }. (** D_iota *) -Definition ClassicalDefiniteDescription := +Definition IotaStatement_on := forall P:A->Prop, - A -> { x:A | (exists! x, P x) -> P x }. + inhabited A -> { x:A | (exists! x, P x) -> P x }. End ChoiceSchemes. @@ -223,6 +224,11 @@ Notation ConstructiveDefiniteDescription := Notation ConstructiveIndefiniteDescription := (forall A, ConstructiveIndefiniteDescription_on A). +Notation IotaStatement := + (forall A, IotaStatement_on A). +Notation EpsilonStatement := + (forall A, EpsilonStatement_on A). + (** Subclassical schemes *) Definition ProofIrrelevance := @@ -238,16 +244,17 @@ Definition SmallDrinker'sParadox := exists x, (exists x, P x) -> P x. (**********************************************************************) -(** * AC_rel + PDP = AC_fun +(** * AC_rel + AC! = AC_fun We show that the functional formulation of the axiom of Choice (usual formulation in type theory) is equivalent to its relational - formulation (only formulation of set theory) + the axiom of - (parametric) definite description (aka axiom of unique choice) *) + formulation (only formulation of set theory) + functional relation + reification (aka axiom of unique choice, or, principle of (parametric) + definite descriptions) *) (** This shows that the axiom of choice can be assumed (under its relational formulation) without known inconsistency with classical logic, - though definite description conflicts with classical logic *) + though functional relation reification conflicts with classical logic *) Lemma description_rel_choice_imp_funct_choice : forall A B : Type, @@ -289,7 +296,7 @@ Proof. exists f; exact H0. Qed. -Theorem FunChoice_Equiv_RelChoice_and_ParamDefinDescr : +Corollary FunChoice_Equiv_RelChoice_and_ParamDefinDescr : forall A B, FunctionalChoice_on A B <-> RelationalChoice_on A B /\ FunctionalRelReification_on A B. Proof. @@ -301,11 +308,13 @@ Proof. Qed. (**********************************************************************) -(** * Connection between the guarded, non guarded and descriptive choices and *) +(** * Connection between the guarded, non guarded and omniscient choices *) -(** We show that the guarded relational formulation of the axiom of Choice - comes from the non guarded formulation in presence either of the - independance of premises or proof-irrelevance *) +(** We show that the guarded formulations of the axiom of choice + are equivalent to their "omniscient" variant and comes from the non guarded + formulation in presence either of the independance of general premises + or subset types (themselves derivable from subtypes thanks to proof- + irrelevance) *) (**********************************************************************) (** ** AC_rel + PI -> GAC_rel and AC_rel + IGP -> GAC_rel and GAC_rel = OAC_rel *) @@ -352,9 +361,17 @@ Proof. exists R'; firstorder. Qed. +Lemma subset_types_imp_guarded_rel_choice_iff_rel_choice : + ProofIrrelevance -> (GuardedRelationalChoice <-> RelationalChoice). +Proof. + auto decomp using + guarded_rel_choice_imp_rel_choice, + rel_choice_and_proof_irrel_imp_guarded_rel_choice. +Qed. + (** OAC_rel = GAC_rel *) -Lemma guarded_iff_omniscient_rel_choice : +Corollary guarded_iff_omniscient_rel_choice : GuardedRelationalChoice <-> OmniscientRelationalChoice. Proof. split. @@ -378,6 +395,7 @@ Proof. exists (f tt); auto. Qed. + Lemma guarded_fun_choice_imp_fun_choice : GuardedFunctionalChoice -> FunctionalChoiceOnInhabitedSet. Proof. @@ -396,9 +414,19 @@ Proof. intro x; apply IndPrem; eauto. Qed. +Corollary fun_choice_and_indep_general_prem_iff_guarded_fun_choice : + FunctionalChoiceOnInhabitedSet /\ IndependenceOfGeneralPremises + <-> GuardedFunctionalChoice. +Proof. + auto decomp using + guarded_fun_choice_imp_indep_of_general_premises, + guarded_fun_choice_imp_fun_choice, + fun_choice_and_indep_general_prem_imp_guarded_fun_choice. +Qed. + (** AC_fun + Drinker = OAC_fun *) -(** This was already observed by Bell [Bell] *) +(** This was already observed by Bell [[Bell]] *) Lemma omniscient_fun_choice_imp_small_drinker : OmniscientFunctionalChoice -> SmallDrinker'sParadox. @@ -427,12 +455,22 @@ Proof. exists f; assumption. Qed. +Corollary fun_choice_and_small_drinker_iff_omniscient_fun_choice : + FunctionalChoiceOnInhabitedSet /\ SmallDrinker'sParadox + <-> OmniscientFunctionalChoice. +Proof. + auto decomp using + omniscient_fun_choice_imp_small_drinker, + omniscient_fun_choice_imp_fun_choice, + fun_choice_and_small_drinker_imp_omniscient_fun_choice. +Qed. + (** OAC_fun = GAC_fun *) (** This is derivable from the intuitionistic equivalence between IGP and Drinker but we give a direct proof *) -Lemma guarded_iff_omniscient_fun_choice : +Theorem guarded_iff_omniscient_fun_choice : GuardedFunctionalChoice <-> OmniscientFunctionalChoice. Proof. split. @@ -443,6 +481,57 @@ Proof. exists f; firstorder. Qed. +(**********************************************************************) +(** ** D_iota -> ID_iota and D_epsilon <-> ID_epsilon + Drinker *) + +(** D_iota -> ID_iota *) + +Lemma iota_imp_constructive_definite_description : + IotaStatement -> ConstructiveDefiniteDescription. +Proof. + intros D_iota A P H. + destruct D_iota with (P:=P) as (x,H1). + destruct H; red in H; auto. + exists x; apply H1; assumption. +Qed. + +(** ID_epsilon + Drinker <-> D_epsilon *) + +Lemma epsilon_imp_constructive_indefinite_description: + EpsilonStatement -> ConstructiveIndefiniteDescription. +Proof. + intros D_epsilon A P H. + destruct D_epsilon with (P:=P) as (x,H1). + destruct H; auto. + exists x; apply H1; assumption. +Qed. + +Lemma constructive_indefinite_description_and_small_drinker_imp_epsilon : + SmallDrinker'sParadox -> ConstructiveIndefiniteDescription -> + EpsilonStatement. +Proof. + intros Drinkers D_epsilon A P Inh; + apply D_epsilon; apply Drinkers; assumption. +Qed. + +Lemma epsilon_imp_small_drinker : + EpsilonStatement -> SmallDrinker'sParadox. +Proof. + intros D_epsilon A P Inh; edestruct D_epsilon; eauto. +Qed. + +Theorem constructive_indefinite_description_and_small_drinker_iff_epsilon : + (SmallDrinker'sParadox * ConstructiveIndefiniteDescription -> + EpsilonStatement) * + (EpsilonStatement -> + SmallDrinker'sParadox * ConstructiveIndefiniteDescription). +Proof. + auto decomp using + epsilon_imp_constructive_indefinite_description, + constructive_indefinite_description_and_small_drinker_imp_epsilon, + epsilon_imp_small_drinker. +Qed. + (**********************************************************************) (** * Derivability of choice for decidable relations with well-ordered codomain *) @@ -457,45 +546,7 @@ Qed. *) Require Import Wf_nat. -Require Import Compare_dec. Require Import Decidable. -Require Import Arith. - -Definition has_unique_least_element (A:Type) (R:A->A->Prop) (P:A->Prop) := - exists! x, P x /\ forall x', P x' -> R x x'. - -Lemma dec_inh_nat_subset_has_unique_least_element : - forall P:nat->Prop, (forall n, P n \/ ~ P n) -> - (exists n, P n) -> has_unique_least_element le P. -Proof. - intros P Pdec (n0,HPn0). - assert - (forall n, (exists n', n' n'<=n'') - \/(forall n', P n' -> n<=n')). - induction n. - right. - intros n' Hn'. - apply le_O_n. - destruct IHn. - left; destruct H as (n', (Hlt', HPn')). - exists n'; split. - apply lt_S; assumption. - assumption. - destruct (Pdec n). - left; exists n; split. - apply lt_n_Sn. - split; assumption. - right. - intros n' Hltn'. - destruct (le_lt_eq_dec n n') as [Hltn|Heqn]. - apply H; assumption. - assumption. - destruct H0. - rewrite Heqn; assumption. - destruct (H n0) as [(n,(Hltn,(Hmin,Huniqn)))|]; [exists n | exists n0]; - repeat split; - assumption || intros n' (HPn',Hminn'); apply le_antisym; auto. -Qed. Definition FunctionalChoice_on_rel (A B:Type) (R:A->B->Prop) := (forall x:A, exists y : B, R x y) -> @@ -614,16 +665,24 @@ Proof. destruct Heq using eq_indd; trivial. Qed. +Corollary dep_iff_non_dep_functional_rel_reification : + FunctionalRelReification <-> DependentFunctionalRelReification. +Proof. + auto decomp using + non_dep_dep_functional_rel_reification, + dep_non_dep_functional_rel_reification. +Qed. + (**********************************************************************) (** * Non contradiction of constructive descriptions wrt functional axioms of choice *) (** ** Non contradiction of indefinite description *) -Lemma relative_non_contradiction_of_indefinite_desc : - (ConstructiveIndefiniteDescription -> False) - -> (FunctionalChoice -> False). +Lemma relative_non_contradiction_of_indefinite_descr : + forall C:Prop, (ConstructiveIndefiniteDescription -> C) + -> (FunctionalChoice -> C). Proof. - intros H AC_fun. + intros C H AC_fun. assert (AC_depfun := non_dep_dep_functional_choice AC_fun). pose (A0 := { A:Type & { P:A->Prop & exists x, P x }}). pose (B0 := fun x:A0 => projT1 x). @@ -632,11 +691,8 @@ Proof. destruct (AC_depfun A0 B0 R0 H0) as (f, Hf). apply H. intros A P H'. - exists (f (existT (fun _ => sigT _) A - (existT (fun P => exists x, P x) P H'))). - pose (Hf' := - Hf (existT (fun _ => sigT _) A - (existT (fun P => exists x, P x) P H'))). + exists (f (existT _ A (existT _ P H'))). + pose (Hf' := Hf (existT _ A (existT _ P H'))). assumption. Qed. @@ -652,10 +708,10 @@ Qed. (** ** Non contradiction of definite description *) Lemma relative_non_contradiction_of_definite_descr : - (ConstructiveDefiniteDescription -> False) - -> (FunctionalRelReification -> False). + forall C:Prop, (ConstructiveDefiniteDescription -> C) + -> (FunctionalRelReification -> C). Proof. - intros H FunReify. + intros C H FunReify. assert (DepFunReify := non_dep_dep_functional_rel_reification FunReify). pose (A0 := { A:Type & { P:A->Prop & exists! x, P x }}). pose (B0 := fun x:A0 => projT1 x). @@ -664,11 +720,8 @@ Proof. destruct (DepFunReify A0 B0 R0 H0) as (f, Hf). apply H. intros A P H'. - exists (f (existT (fun _ => sigT _) A - (existT (fun P => exists! x, P x) P H'))). - pose (Hf' := - Hf (existT (fun _ => sigT _) A - (existT (fun P => exists! x, P x) P H'))). + exists (f (existT _ A (existT _ P H'))). + pose (Hf' := Hf (existT _ A (existT _ P H'))). assumption. Qed. @@ -681,20 +734,37 @@ Proof. apply (proj2_sig (DefDescr B (R x) (H x))). Qed. +(** Remark, the following corollaries morally hold: + +Definition In_propositional_context (A:Type) := forall C:Prop, (A -> C) -> C. + +Corollary constructive_definite_descr_in_prop_context_iff_fun_reification : + In_propositional_context ConstructiveIndefiniteDescription + <-> FunctionalChoice. + +Corollary constructive_definite_descr_in_prop_context_iff_fun_reification : + In_propositional_context ConstructiveDefiniteDescription + <-> FunctionalRelReification. + +but expecting [FunctionalChoice] (resp. [FunctionalRelReification]) to +be applied on the same Type universes on both sides of the first +(resp. second) equivalence breaks the stratification of universes. +*) + (**********************************************************************) (** * Excluded-middle + definite description => computational excluded-middle *) -(** The idea for the following proof comes from [ChicliPottierSimpson02] *) +(** The idea for the following proof comes from [[ChicliPottierSimpson02]] *) (** Classical logic and axiom of unique choice (i.e. functional - relation reification), as shown in [ChicliPottierSimpson02], + relation reification), as shown in [[ChicliPottierSimpson02]], implies the double-negation of excluded-middle in [Set] (which is incompatible with the impredicativity of [Set]). We adapt the proof to show that constructive definite description transports excluded-middle from [Prop] to [Set]. - [ChicliPottierSimpson02] Laurent Chicli, Loïc Pottier, Carlos + [[ChicliPottierSimpson02]] Laurent Chicli, Loïc Pottier, Carlos Simpson, Mathematical Quotients and Quotient Types in Coq, Proceedings of TYPES 2002, Lecture Notes in Computer Science 2646, Springer Verlag. *) @@ -717,3 +787,13 @@ Proof. left; trivial. right; trivial. Qed. + +Corollary fun_reification_descr_computational_excluded_middle_in_prop_context : + FunctionalRelReification -> + (forall P:Prop, P \/ ~ P) -> + forall C:Prop, ((forall P:Prop, {P} + {~ P}) -> C) -> C. +Proof. + intros FunReify EM C; auto decomp using + constructive_definite_descr_excluded_middle, + (relative_non_contradiction_of_definite_descr (C:=C)). +Qed. diff --git a/theories/Logic/ClassicalChoice.v b/theories/Logic/ClassicalChoice.v index bb8186ae..f9b59a6a 100644 --- a/theories/Logic/ClassicalChoice.v +++ b/theories/Logic/ClassicalChoice.v @@ -6,11 +6,17 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: ClassicalChoice.v 8892 2006-06-04 17:59:53Z herbelin $ i*) +(*i $Id: ClassicalChoice.v 10170 2007-10-03 14:41:25Z herbelin $ i*) -(** This file provides classical logic, and functional choice *) +(** This file provides classical logic and functional choice; this + especially provides both indefinite descriptions and choice functions + but this is weaker than providing epsilon operator and classical logic + as the indefinite descriptions provided by the axiom of choice can + be used only in a propositional context (especially, they cannot + be used to build choice functions outside the scope of a theorem + proof) *) -(** This file extends ClassicalUniqueChoice.v with the axiom of choice. +(** This file extends ClassicalUniqueChoice.v with full choice. As ClassicalUniqueChoice.v, it implies the double-negation of excluded-middle in [Set] and leads to a classical world populated with non computable functions. Especially it conflicts with the diff --git a/theories/Logic/ClassicalDescription.v b/theories/Logic/ClassicalDescription.v index 1f1c34bf..3737abf6 100644 --- a/theories/Logic/ClassicalDescription.v +++ b/theories/Logic/ClassicalDescription.v @@ -6,14 +6,15 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: ClassicalDescription.v 9514 2007-01-22 14:58:50Z herbelin $ i*) +(*i $Id: ClassicalDescription.v 10170 2007-10-03 14:41:25Z herbelin $ i*) -(** This file provides classical logic and definite description *) +(** This file provides classical logic and definite description, which is + equivalent to providing classical logic and Church's iota operator *) -(** Classical definite description operator (i.e. iota) implies - excluded-middle in [Set] and leads to a classical world populated - with non computable functions. It conflicts with the - impredicativity of [Set] *) +(** Classical logic and definite descriptions implies excluded-middle + in [Set] and leads to a classical world populated with non + computable functions. It conflicts with the impredicativity of + [Set] *) Set Implicit Arguments. diff --git a/theories/Logic/ClassicalEpsilon.v b/theories/Logic/ClassicalEpsilon.v index 6d0a9c77..2a4de511 100644 --- a/theories/Logic/ClassicalEpsilon.v +++ b/theories/Logic/ClassicalEpsilon.v @@ -6,12 +6,12 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: ClassicalEpsilon.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: ClassicalEpsilon.v 10170 2007-10-03 14:41:25Z herbelin $ i*) -(** This file provides classical logic and indefinite description - (Hilbert's epsilon operator) *) +(** This file provides classical logic and indefinite description under + the form of Hilbert's epsilon operator *) -(** Classical epsilon's operator (i.e. indefinite description) implies +(** Hilbert's epsilon operator and classical logic implies excluded-middle in [Set] and leads to a classical world populated with non computable functions. It conflicts with the impredicativity of [Set] *) diff --git a/theories/Logic/ClassicalFacts.v b/theories/Logic/ClassicalFacts.v index dd911db6..734de52d 100644 --- a/theories/Logic/ClassicalFacts.v +++ b/theories/Logic/ClassicalFacts.v @@ -7,7 +7,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: ClassicalFacts.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: ClassicalFacts.v 10156 2007-09-30 19:02:14Z herbelin $ i*) (** Some facts and definitions about classical logic @@ -31,8 +31,8 @@ Table of contents: 3.1. Weak excluded middle -3.2. Gödel-Dummet axiom and right distributivity of implication over - disjunction +3.2. Gödel-Dummett axiom and right distributivity of implication over + disjunction 3 3. Independence of general premises and drinker's paradox @@ -91,6 +91,17 @@ Proof. right; apply (Ext A False); split; [ exact H | apply False_ind ]. Qed. +(** A weakest form of propositional extensionality: extensionality for + provable propositions only *) + +Definition provable_prop_extensionality := forall A:Prop, A -> A = True. + +Lemma provable_prop_ext : + prop_extensionality -> provable_prop_extensionality. +Proof. + intros Ext A Ha; apply Ext; split; trivial. +Qed. + (************************************************************************) (** * Classical logic and proof-irrelevance *) @@ -105,6 +116,7 @@ Qed. (just take the identity), which implies the existence of a fixpoint operator in [A] (e.g. take the Y combinator of lambda-calculus) + *) Definition inhabited (A:Prop) := A. @@ -143,6 +155,10 @@ Proof. reflexivity. Qed. +(** Remark: [prop_extensionality] can be replaced in lemma [ext_prop_fixpoint] + by the weakest property [provable_prop_extensionality]. +*) + (************************************************************************) (** ** CC |- prop_ext /\ dep elim on bool -> proof-irrelevance *) @@ -230,6 +246,11 @@ Section Proof_irrelevance_Prop_Ext_CC. End Proof_irrelevance_Prop_Ext_CC. +(** Remark: [prop_extensionality] can be replaced in lemma + [ext_prop_dep_proof_irrel_gen] by the weakest property + [provable_prop_extensionality]. +*) + (************************************************************************) (** ** CIC |- prop. ext. -> proof-irrelevance *) @@ -396,7 +417,7 @@ End Proof_irrelevance_CCI. (** We show the following increasing in the strength of axioms: - weak excluded-middle - - right distributivity of implication over disjunction and Gödel-Dummet axiom + - right distributivity of implication over disjunction and Gödel-Dummett axiom - independence of general premises and drinker's paradox - excluded-middle *) @@ -533,7 +554,11 @@ Proof. Qed. (** Independence of general premises is weaker than (generalized) - excluded middle *) + excluded middle + +Remark: generalized excluded middle is preferred here to avoid relying on +the "ex falso quodlibet" property (i.e. [False -> forall A, A]) +*) Definition generalized_excluded_middle := forall A B:Prop, A \/ (A -> B). diff --git a/theories/Logic/ClassicalUniqueChoice.v b/theories/Logic/ClassicalUniqueChoice.v index 28d32fcc..bb846aa6 100644 --- a/theories/Logic/ClassicalUniqueChoice.v +++ b/theories/Logic/ClassicalUniqueChoice.v @@ -6,9 +6,13 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: ClassicalUniqueChoice.v 9026 2006-07-06 15:16:20Z herbelin $ i*) +(*i $Id: ClassicalUniqueChoice.v 10170 2007-10-03 14:41:25Z herbelin $ i*) -(** This file provides classical logic and unique choice *) +(** This file provides classical logic and unique choice; this is + weaker than providing iota operator and classical logic as the + definite descriptions provided by the axiom of unique choice can + be used only in a propositional context (especially, they cannot + be used to build functions outside the scope of a theorem proof) *) (** Classical logic and unique choice, as shown in [ChicliPottierSimpson02], implies the double-negation of diff --git a/theories/Logic/ConstructiveEpsilon.v b/theories/Logic/ConstructiveEpsilon.v index 61e377ea..f1503d24 100644 --- a/theories/Logic/ConstructiveEpsilon.v +++ b/theories/Logic/ConstructiveEpsilon.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id:$ i*) +(*i $Id: ConstructiveEpsilon.v 10739 2008-04-01 14:45:20Z herbelin $ i*) (** This module proves the constructive description schema, which infers the sigma-existence (i.e., [Set]-existence) of a witness to a @@ -20,17 +20,19 @@ show [{n : nat | P n}]. However, one can perform a recursion on an inductive predicate in sort [Prop] so that the returning type of the recursion is in [Set]. This trick is described in Coq'Art book, Sect. 14.2.3 and 15.4. In particular, this trick is used in the proof of -[Acc_iter] in the module Coq.Init.Wf. There, recursion is done on an +[Fix_F] in the module Coq.Init.Wf. There, recursion is done on an inductive predicate [Acc] and the resulting type is in [Type]. The predicate [Acc] delineates elements that are accessible via a given relation [R]. An element is accessible if there are no infinite [R]-descending chains starting from it. -To use [Acc_iter], we define a relation R and prove that if [exists n, +To use [Fix_F], we define a relation R and prove that if [exists n, P n] then 0 is accessible with respect to R. Then, by induction on the definition of [Acc R 0], we show [{n : nat | P n}]. *) +(** Based on ideas from Benjamin Werner and Jean-François Monin *) + (** Contributed by Yevgeniy Makarov *) Require Import Arith. @@ -49,7 +51,8 @@ numbers we try. Namely, [y] is [R]-less then [x] if we try [y] after infinite [R]-descending chain from 0 is equivalent to the termination of our searching algorithm. *) -Let R (x y : nat) := (x = S y /\ ~ P y). +Let R (x y : nat) : Prop := x = S y /\ ~ P y. + Notation Local "'acc' x" := (Acc R x) (at level 10). Lemma P_implies_acc : forall x : nat, P x -> acc x. @@ -78,7 +81,7 @@ Defined. Theorem acc_implies_P_eventually : acc 0 -> {n : nat | P n}. Proof. -intros Acc_0. pattern 0. apply Acc_iter with (R := R); [| assumption]. +intros Acc_0. pattern 0. apply Fix_F with (R := R); [| assumption]. clear Acc_0; intros x IH. destruct (P_decidable x) as [Px | not_Px]. exists x; simpl; assumption. @@ -102,7 +105,7 @@ Section ConstructiveEpsilon. there are functions [f : A -> nat] and [g : nat -> A] such that [g] is a left inverse of [f]. *) -Variable A : Type. +Variable A : Set. Variable f : A -> nat. Variable g : nat -> A. @@ -132,24 +135,11 @@ Proof. intros; apply constructive_indefinite_description; firstorder. Defined. -Definition epsilon (E : exists x : A, P x) : A +Definition constructive_epsilon (E : exists x : A, P x) : A := proj1_sig (constructive_indefinite_description E). -Definition epsilon_spec (E : (exists x, P x)) : P (epsilon E) +Definition constructive_epsilon_spec (E : (exists x, P x)) : P (constructive_epsilon E) := proj2_sig (constructive_indefinite_description E). End ConstructiveEpsilon. -Theorem choice : - forall (A B : Type) (f : B -> nat) (g : nat -> B), - (forall x : B, g (f x) = x) -> - forall (R : A -> B -> Prop), - (forall (x : A) (y : B), {R x y} + {~ R x y}) -> - (forall x : A, exists y : B, R x y) -> - (exists f : A -> B, forall x : A, R x (f x)). -Proof. -intros A B f g gof_eq_id R R_dec H. -exists (fun x : A => epsilon B f g gof_eq_id (R x) (R_dec x) (H x)). -intro x. -apply (epsilon_spec B f g gof_eq_id (R x) (R_dec x) (H x)). -Qed. diff --git a/theories/Logic/Decidable.v b/theories/Logic/Decidable.v index 8317f6bb..a7c098e8 100644 --- a/theories/Logic/Decidable.v +++ b/theories/Logic/Decidable.v @@ -5,56 +5,191 @@ (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Decidable.v 5920 2004-07-16 20:01:26Z herbelin $ i*) +(*i $Id: Decidable.v 10500 2008-02-02 15:51:00Z letouzey $ i*) (** Properties of decidable propositions *) Definition decidable (P:Prop) := P \/ ~ P. Theorem dec_not_not : forall P:Prop, decidable P -> (~ P -> False) -> P. -unfold decidable in |- *; tauto. +Proof. +unfold decidable; tauto. Qed. Theorem dec_True : decidable True. -unfold decidable in |- *; auto. +Proof. +unfold decidable; auto. Qed. Theorem dec_False : decidable False. -unfold decidable, not in |- *; auto. +Proof. +unfold decidable, not; auto. Qed. Theorem dec_or : forall A B:Prop, decidable A -> decidable B -> decidable (A \/ B). -unfold decidable in |- *; tauto. +Proof. +unfold decidable; tauto. Qed. Theorem dec_and : forall A B:Prop, decidable A -> decidable B -> decidable (A /\ B). -unfold decidable in |- *; tauto. +Proof. +unfold decidable; tauto. Qed. Theorem dec_not : forall A:Prop, decidable A -> decidable (~ A). -unfold decidable in |- *; tauto. +Proof. +unfold decidable; tauto. Qed. Theorem dec_imp : forall A B:Prop, decidable A -> decidable B -> decidable (A -> B). -unfold decidable in |- *; tauto. +Proof. +unfold decidable; tauto. +Qed. + +Theorem dec_iff : + forall A B:Prop, decidable A -> decidable B -> decidable (A<->B). +Proof. +unfold decidable; tauto. Qed. Theorem not_not : forall P:Prop, decidable P -> ~ ~ P -> P. -unfold decidable in |- *; tauto. Qed. +Proof. +unfold decidable; tauto. +Qed. Theorem not_or : forall A B:Prop, ~ (A \/ B) -> ~ A /\ ~ B. -tauto. Qed. +Proof. +tauto. +Qed. Theorem not_and : forall A B:Prop, decidable A -> ~ (A /\ B) -> ~ A \/ ~ B. -unfold decidable in |- *; tauto. Qed. +Proof. +unfold decidable; tauto. +Qed. Theorem not_imp : forall A B:Prop, decidable A -> ~ (A -> B) -> A /\ ~ B. -unfold decidable in |- *; tauto. +Proof. +unfold decidable; tauto. Qed. Theorem imp_simp : forall A B:Prop, decidable A -> (A -> B) -> ~ A \/ B. -unfold decidable in |- *; tauto. +Proof. +unfold decidable; tauto. +Qed. + +(** Results formulated with iff, used in FSetDecide. + Negation are expanded since it is unclear whether setoid rewrite + will always perform conversion. *) + +(** We begin with lemmas that, when read from left to right, + can be understood as ways to eliminate uses of [not]. *) + +Theorem not_true_iff : (True -> False) <-> False. +Proof. +tauto. +Qed. + +Theorem not_false_iff : (False -> False) <-> True. +Proof. +tauto. +Qed. + +Theorem not_not_iff : forall A:Prop, decidable A -> + (((A -> False) -> False) <-> A). +Proof. +unfold decidable; tauto. +Qed. + +Theorem contrapositive : forall A B:Prop, decidable A -> + (((A -> False) -> (B -> False)) <-> (B -> A)). +Proof. +unfold decidable; tauto. +Qed. + +Lemma or_not_l_iff_1 : forall A B: Prop, decidable A -> + ((A -> False) \/ B <-> (A -> B)). +Proof. +unfold decidable. tauto. +Qed. + +Lemma or_not_l_iff_2 : forall A B: Prop, decidable B -> + ((A -> False) \/ B <-> (A -> B)). +Proof. +unfold decidable. tauto. +Qed. + +Lemma or_not_r_iff_1 : forall A B: Prop, decidable A -> + (A \/ (B -> False) <-> (B -> A)). +Proof. +unfold decidable. tauto. Qed. + +Lemma or_not_r_iff_2 : forall A B: Prop, decidable B -> + (A \/ (B -> False) <-> (B -> A)). +Proof. +unfold decidable. tauto. +Qed. + +Lemma imp_not_l : forall A B: Prop, decidable A -> + (((A -> False) -> B) <-> (A \/ B)). +Proof. +unfold decidable. tauto. +Qed. + + +(** Moving Negations Around: + We have four lemmas that, when read from left to right, + describe how to push negations toward the leaves of a + proposition and, when read from right to left, describe + how to pull negations toward the top of a proposition. *) + +Theorem not_or_iff : forall A B:Prop, + (A \/ B -> False) <-> (A -> False) /\ (B -> False). +Proof. +tauto. +Qed. + +Lemma not_and_iff : forall A B:Prop, + (A /\ B -> False) <-> (A -> B -> False). +Proof. +tauto. +Qed. + +Lemma not_imp_iff : forall A B:Prop, decidable A -> + (((A -> B) -> False) <-> A /\ (B -> False)). +Proof. +unfold decidable. tauto. +Qed. + +Lemma not_imp_rev_iff : forall A B : Prop, decidable A -> + (((A -> B) -> False) <-> (B -> False) /\ A). +Proof. +unfold decidable. tauto. +Qed. + + + +(** With the following hint database, we can leverage [auto] to check + decidability of propositions. *) + +Hint Resolve dec_True dec_False dec_or dec_and dec_imp dec_not dec_iff + : decidable_prop. + +(** [solve_decidable using lib] will solve goals about the + decidability of a proposition, assisted by an auxiliary + database of lemmas. The database is intended to contain + lemmas stating the decidability of base propositions, + (e.g., the decidability of equality on a particular + inductive type). *) + +Tactic Notation "solve_decidable" "using" ident(db) := + match goal with + | |- decidable _ => + solve [ auto 100 with decidable_prop db ] + end. + +Tactic Notation "solve_decidable" := + solve_decidable using core. diff --git a/theories/Logic/DecidableType.v b/theories/Logic/DecidableType.v index a38b111f..a65e2c52 100644 --- a/theories/Logic/DecidableType.v +++ b/theories/Logic/DecidableType.v @@ -6,19 +6,36 @@ (* * GNU Lesser General Public License Version 2.1 *) (***********************************************************************) -(* $Id: DecidableType.v 8933 2006-06-09 14:08:38Z herbelin $ *) +(* $Id: DecidableType.v 10616 2008-03-04 17:33:35Z letouzey $ *) Require Export SetoidList. Set Implicit Arguments. Unset Strict Implicit. +(** * Types with Equalities, and nothing more (for subtyping purpose) *) + +Module Type EqualityType. + + Parameter Inline t : Type. + + Parameter Inline eq : t -> t -> Prop. + + Axiom eq_refl : forall x : t, eq x x. + Axiom eq_sym : forall x y : t, eq x y -> eq y x. + Axiom eq_trans : forall x y z : t, eq x y -> eq y z -> eq x z. + + Hint Immediate eq_sym. + Hint Resolve eq_refl eq_trans. + +End EqualityType. + (** * Types with decidable Equalities (but no ordering) *) Module Type DecidableType. - Parameter t : Set. + Parameter Inline t : Type. - Parameter eq : t -> t -> Prop. + Parameter Inline eq : t -> t -> Prop. Axiom eq_refl : forall x : t, eq x x. Axiom eq_sym : forall x y : t, eq x y -> eq y x. @@ -37,7 +54,7 @@ Module KeyDecidableType(D:DecidableType). Import D. Section Elt. - Variable elt : Set. + Variable elt : Type. Notation key:=t. Definition eqk (p p':key*elt) := eq (fst p) (fst p'). diff --git a/theories/Logic/DecidableTypeEx.v b/theories/Logic/DecidableTypeEx.v index a4f99de2..9c928598 100644 --- a/theories/Logic/DecidableTypeEx.v +++ b/theories/Logic/DecidableTypeEx.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (***********************************************************************) -(* $Id: DecidableTypeEx.v 8933 2006-06-09 14:08:38Z herbelin $ *) +(* $Id: DecidableTypeEx.v 10739 2008-04-01 14:45:20Z herbelin $ *) Require Import DecidableType OrderedType OrderedTypeEx. Set Implicit Arguments. @@ -18,7 +18,7 @@ Unset Strict Implicit. the equality is the usual one of Coq. *) Module Type UsualDecidableType. - Parameter t : Set. + Parameter Inline t : Type. Definition eq := @eq t. Definition eq_refl := @refl_equal t. Definition eq_sym := @sym_eq t. @@ -30,6 +30,22 @@ End UsualDecidableType. Module UDT_to_DT (U:UsualDecidableType) <: DecidableType := U. +(** an shortcut for easily building a UsualDecidableType *) + +Module Type MiniDecidableType. + Parameter Inline t : Type. + Parameter eq_dec : forall x y:t, { x=y }+{ x<>y }. +End MiniDecidableType. + +Module Make_UDT (M:MiniDecidableType) <: UsualDecidableType. + Definition t:=M.t. + Definition eq := @eq t. + Definition eq_refl := @refl_equal t. + Definition eq_sym := @sym_eq t. + Definition eq_trans := @trans_eq t. + Definition eq_dec := M.eq_dec. +End Make_UDT. + (** An OrderedType can be seen as a DecidableType *) Module OT_as_DT (O:OrderedType) <: DecidableType. @@ -48,3 +64,54 @@ Module Nat_as_DT <: UsualDecidableType := OT_as_DT (Nat_as_OT). Module Positive_as_DT <: UsualDecidableType := OT_as_DT (Positive_as_OT). Module N_as_DT <: UsualDecidableType := OT_as_DT (N_as_OT). Module Z_as_DT <: UsualDecidableType := OT_as_DT (Z_as_OT). + +(** From two decidable types, we can build a new DecidableType + over their cartesian product. *) + +Module PairDecidableType(D1 D2:DecidableType) <: DecidableType. + + Definition t := prod D1.t D2.t. + + Definition eq x y := D1.eq (fst x) (fst y) /\ D2.eq (snd x) (snd y). + + Lemma eq_refl : forall x : t, eq x x. + Proof. + intros (x1,x2); red; simpl; auto. + Qed. + + Lemma eq_sym : forall x y : t, eq x y -> eq y x. + Proof. + intros (x1,x2) (y1,y2); unfold eq; simpl; intuition. + Qed. + + Lemma eq_trans : forall x y z : t, eq x y -> eq y z -> eq x z. + Proof. + intros (x1,x2) (y1,y2) (z1,z2); unfold eq; simpl; intuition eauto. + Qed. + + Definition eq_dec : forall x y, { eq x y }+{ ~eq x y }. + Proof. + intros (x1,x2) (y1,y2); unfold eq; simpl. + destruct (D1.eq_dec x1 y1); destruct (D2.eq_dec x2 y2); intuition. + Defined. + +End PairDecidableType. + +(** Similarly for pairs of UsualDecidableType *) + +Module PairUsualDecidableType(D1 D2:UsualDecidableType) <: DecidableType. + Definition t := prod D1.t D2.t. + Definition eq := @eq t. + Definition eq_refl := @refl_equal t. + Definition eq_sym := @sym_eq t. + Definition eq_trans := @trans_eq t. + Definition eq_dec : forall x y, { eq x y }+{ ~eq x y }. + Proof. + intros (x1,x2) (y1,y2); + destruct (D1.eq_dec x1 y1); destruct (D2.eq_dec x2 y2); + unfold eq, D1.eq, D2.eq in *; simpl; + (left; f_equal; auto; fail) || + (right; intro H; injection H; auto). + Defined. + +End PairUsualDecidableType. diff --git a/theories/Logic/Description.v b/theories/Logic/Description.v new file mode 100644 index 00000000..962f2a2a --- /dev/null +++ b/theories/Logic/Description.v @@ -0,0 +1,21 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Prop), + (exists! x, P x) -> { x : A | P x }. diff --git a/theories/Logic/Epsilon.v b/theories/Logic/Epsilon.v new file mode 100644 index 00000000..65d4d853 --- /dev/null +++ b/theories/Logic/Epsilon.v @@ -0,0 +1,72 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Prop), inhabited A -> + { x : A | (exists x, P x) -> P x }. + +Lemma constructive_indefinite_description : + forall (A : Type) (P : A->Prop), + (exists x, P x) -> { x : A | P x }. +Proof. + apply epsilon_imp_constructive_indefinite_description. + exact epsilon_statement. +Qed. + +Lemma small_drinkers'_paradox : + forall (A:Type) (P:A -> Prop), inhabited A -> + exists x, (exists x, P x) -> P x. +Proof. + apply epsilon_imp_small_drinker. + exact epsilon_statement. +Qed. + +Theorem iota_statement : + forall (A : Type) (P : A->Prop), inhabited A -> + { x : A | (exists! x : A, P x) -> P x }. +Proof. + intros; destruct epsilon_statement with (P:=P); firstorder. +Qed. + +Lemma constructive_definite_description : + forall (A : Type) (P : A->Prop), + (exists! x, P x) -> { x : A | P x }. +Proof. + apply iota_imp_constructive_definite_description. + exact iota_statement. +Qed. + +(** Hilbert's epsilon operator and its specification *) + +Definition epsilon (A : Type) (i:inhabited A) (P : A->Prop) : A + := proj1_sig (epsilon_statement P i). + +Definition epsilon_spec (A : Type) (i:inhabited A) (P : A->Prop) : + (exists x, P x) -> P (epsilon i P) + := proj2_sig (epsilon_statement P i). + +(** Church's iota operator and its specification *) + +Definition iota (A : Type) (i:inhabited A) (P : A->Prop) : A + := proj1_sig (iota_statement P i). + +Definition iota_spec (A : Type) (i:inhabited A) (P : A->Prop) : + (exists! x:A, P x) -> P (iota i P) + := proj2_sig (iota_statement P i). + diff --git a/theories/Logic/EqdepFacts.v b/theories/Logic/EqdepFacts.v index 94a577ca..844bff88 100644 --- a/theories/Logic/EqdepFacts.v +++ b/theories/Logic/EqdepFacts.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: EqdepFacts.v 9597 2007-02-06 19:44:05Z herbelin $ i*) +(*i $Id: EqdepFacts.v 11095 2008-06-10 19:36:10Z herbelin $ i*) (** This file defines dependent equality and shows its equivalence with equality on dependent pairs (inhabiting sigma-types). It derives @@ -104,7 +104,7 @@ Implicit Arguments eq_dep1 [U P]. (** Dependent equality is equivalent to equality on dependent pairs *) -Lemma eq_sigS_eq_dep : +Lemma eq_sigT_eq_dep : forall (U:Type) (P:U -> Type) (p q:U) (x:P p) (y:P q), existT P p x = existT P q y -> eq_dep p x q y. Proof. @@ -113,26 +113,19 @@ Proof. apply eq_dep_intro. Qed. +Notation eq_sigS_eq_dep := eq_sigT_eq_dep (only parsing). (* Compatibility *) + Lemma equiv_eqex_eqdep : forall (U:Type) (P:U -> Type) (p q:U) (x:P p) (y:P q), - existS P p x = existS P q y <-> eq_dep p x q y. + existT P p x = existT P q y <-> eq_dep p x q y. Proof. split. (* -> *) - apply eq_sigS_eq_dep. + apply eq_sigT_eq_dep. (* <- *) destruct 1; reflexivity. Qed. -Lemma eq_sigT_eq_dep : - forall (U:Type) (P:U -> Type) (p q:U) (x:P p) (y:P q), - existT P p x = existT P q y -> eq_dep p x q y. -Proof. - intros. - dependent rewrite H. - apply eq_dep_intro. -Qed. - Lemma eq_dep_eq_sigT : forall (U:Type) (P:U -> Type) (p q:U) (x:P p) (y:P q), eq_dep p x q y -> existT P p x = existT P q y. @@ -258,7 +251,7 @@ Section Corollaries. Proof. intro eq_dep_eq; red; intros. apply eq_dep_eq. - apply eq_sigS_eq_dep. + apply eq_sigT_eq_dep. assumption. Qed. @@ -270,7 +263,7 @@ Notation eq_dep_eq__inj_pairT2 := eq_dep_eq__inj_pair2. (************************************************************************) -(** *** C. Definition of the functor that builds properties of dependent equalities assuming axiom eq_rect_eq *) +(** * Definition of the functor that builds properties of dependent equalities assuming axiom eq_rect_eq *) Module Type EqdepElimination. diff --git a/theories/Logic/Eqdep_dec.v b/theories/Logic/Eqdep_dec.v index 103efd22..0281916e 100644 --- a/theories/Logic/Eqdep_dec.v +++ b/theories/Logic/Eqdep_dec.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Eqdep_dec.v 9597 2007-02-06 19:44:05Z herbelin $ i*) +(*i $Id: Eqdep_dec.v 10144 2007-09-26 15:12:17Z vsiles $ i*) (** We prove that there is only one proof of [x=x], i.e [refl_equal x]. This holds if the equality upon the set of [x] is decidable. @@ -158,6 +158,13 @@ Proof. apply (Streicher_K__eq_rect_eq A (K_dec_type eq_dec)). Qed. +(** We deduce the injectivity of dependent equality for decidable types *) +Theorem eq_dep_eq_dec : + forall A:Type, + (forall x y:A, {x = y} + {x <> y}) -> + forall (P:A->Type) (p:A) (x y:P p), eq_dep A P p x p y -> x = y. +Proof (fun A eq_dec => eq_rect_eq__eq_dep_eq A (eq_rect_eq_dec eq_dec)). + Unset Implicit Arguments. (************************************************************************) @@ -229,7 +236,7 @@ Module DecidableEqDep (M:DecidableType). End DecidableEqDep. (************************************************************************) -(** ** B Definition of the functor that builds properties of dependent equalities on decidable sets in Set *) +(** ** Definition of the functor that builds properties of dependent equalities on decidable sets in Set *) (** The signature of decidable sets in [Set] *) @@ -296,3 +303,15 @@ Module DecidableEqDepSet (M:DecidableSet). Notation inj_pairT2 := inj_pair2. End DecidableEqDepSet. + + (** From decidability to inj_pair2 **) +Lemma inj_pair2_eq_dec : forall A:Type, (forall x y:A, {x=y}+{x<>y}) -> + ( forall (P:A -> Type) (p:A) (x y:P p), existT P p x = existT P p y -> x = y ). +Proof. + intros A eq_dec. + apply eq_dep_eq__inj_pair2. + apply eq_rect_eq__eq_dep_eq. + unfold Eq_rect_eq. + apply eq_rect_eq_dec. + apply eq_dec. +Qed. diff --git a/theories/Logic/IndefiniteDescription.v b/theories/Logic/IndefiniteDescription.v new file mode 100644 index 00000000..740b889a --- /dev/null +++ b/theories/Logic/IndefiniteDescription.v @@ -0,0 +1,39 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Prop), + (exists x, P x) -> { x : A | P x }. + +Lemma constructive_definite_description : + forall (A : Type) (P : A->Prop), + (exists! x, P x) -> { x : A | P x }. +Proof. + intros; apply constructive_indefinite_description; firstorder. +Qed. + +Lemma functional_choice : + forall (A B : Type) (R:A->B->Prop), + (forall x : A, exists y : B, R x y) -> + (exists f : A->B, forall x : A, R x (f x)). +Proof. + apply constructive_indefinite_descr_fun_choice. + exact constructive_indefinite_description. +Qed. diff --git a/theories/Logic/JMeq.v b/theories/Logic/JMeq.v index 6a723e43..c3573ac3 100644 --- a/theories/Logic/JMeq.v +++ b/theories/Logic/JMeq.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: JMeq.v 9077 2006-08-24 08:44:32Z herbelin $ i*) +(*i $Id: JMeq.v 9849 2007-05-22 20:40:04Z herbelin $ i*) (** John Major's Equality as proposed by Conor McBride @@ -19,9 +19,12 @@ Set Implicit Arguments. +Unset Elimination Schemes. + Inductive JMeq (A:Type) (x:A) : forall B:Type, B -> Prop := JMeq_refl : JMeq x x. -Reset JMeq_rect. + +Set Elimination Schemes. Hint Resolve JMeq_refl. @@ -65,20 +68,42 @@ Lemma JMeq_rect_r : intros A x y P H H'; case JMeq_eq with (1 := sym_JMeq H'); trivial. Qed. -(** [JMeq] is equivalent to [(eq_dep Type [X]X)] *) +(** [JMeq] is equivalent to [eq_dep Type (fun X => X)] *) Require Import Eqdep. -Lemma JMeq_eq_dep : +Lemma JMeq_eq_dep_id : forall (A B:Type) (x:A) (y:B), JMeq x y -> eq_dep Type (fun X => X) A x B y. Proof. destruct 1. apply eq_dep_intro. Qed. -Lemma eq_dep_JMeq : +Lemma eq_dep_id_JMeq : forall (A B:Type) (x:A) (y:B), eq_dep Type (fun X => X) A x B y -> JMeq x y. Proof. destruct 1. -apply JMeq_refl. +apply JMeq_refl. +Qed. + +(** [eq_dep U P p x q y] is strictly finer than [JMeq (P p) x (P q) y] *) + +Lemma eq_dep_JMeq : + forall U P p x q y, eq_dep U P p x q y -> JMeq x y. +Proof. +destruct 1. +apply JMeq_refl. +Qed. + +Lemma eq_dep_strictly_stronger_JMeq : + exists U, exists P, exists p, exists q, exists x, exists y, + JMeq x y /\ ~ eq_dep U P p x q y. +Proof. +exists bool. exists (fun _ => True). exists true. exists false. +exists I. exists I. +split. +trivial. +intro H. +assert (true=false) by (destruct H; reflexivity). +discriminate. Qed. diff --git a/theories/Logic/SetIsType.v b/theories/Logic/SetIsType.v new file mode 100644 index 00000000..3286beb4 --- /dev/null +++ b/theories/Logic/SetIsType.v @@ -0,0 +1,17 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Npos (Psucc p) end. +(** Predecessor *) + +Definition Npred (n : N) := match n with +| N0 => N0 +| Npos p => match p with + | xH => N0 + | _ => Npos (Ppred p) + end +end. + (** Addition *) Definition Nplus n m := @@ -70,6 +80,21 @@ Definition Nplus n m := Infix "+" := Nplus : N_scope. +(** Subtraction *) + +Definition Nminus (n m : N) := +match n, m with +| N0, _ => N0 +| n, N0 => n +| Npos n', Npos m' => + match Pminus_mask n' m' with + | IsPos p => Npos p + | _ => N0 + end +end. + +Infix "-" := Nminus : N_scope. + (** Multiplication *) Definition Nmult n m := @@ -93,6 +118,28 @@ Definition Ncompare n m := Infix "?=" := Ncompare (at level 70, no associativity) : N_scope. +Definition Nlt (x y:N) := (x ?= y) = Lt. +Definition Ngt (x y:N) := (x ?= y) = Gt. +Definition Nle (x y:N) := (x ?= y) <> Gt. +Definition Nge (x y:N) := (x ?= y) <> Lt. + +Infix "<=" := Nle : N_scope. +Infix "<" := Nlt : N_scope. +Infix ">=" := Nge : N_scope. +Infix ">" := Ngt : N_scope. + +(** Min and max *) + +Definition Nmin (n n' : N) := match Ncompare n n' with + | Lt | Eq => n + | Gt => n' + end. + +Definition Nmax (n n' : N) := match Ncompare n n' with + | Lt | Eq => n' + | Gt => n + end. + (** convenient induction principles *) Lemma N_ind_double : @@ -123,15 +170,48 @@ Qed. (** Peano induction on binary natural numbers *) -Theorem Nind : - forall P:N -> Prop, - P N0 -> (forall n:N, P n -> P (Nsucc n)) -> forall n:N, P n. +Definition Nrect + (P : N -> Type) (a : P N0) + (f : forall n : N, P n -> P (Nsucc n)) (n : N) : P n := +let f' (p : positive) (x : P (Npos p)) := f (Npos p) x in +let P' (p : positive) := P (Npos p) in +match n return (P n) with +| N0 => a +| Npos p => Prect P' (f N0 a) f' p +end. + +Theorem Nrect_base : forall P a f, Nrect P a f N0 = a. +Proof. +intros P a f; simpl; reflexivity. +Qed. + +Theorem Nrect_step : forall P a f n, Nrect P a f (Nsucc n) = f n (Nrect P a f n). +Proof. +intros P a f; destruct n as [| p]; simpl; +[rewrite Prect_base | rewrite Prect_succ]; reflexivity. +Qed. + +Definition Nind (P : N -> Prop) := Nrect P. + +Definition Nrec (P : N -> Set) := Nrect P. + +Theorem Nrec_base : forall P a f, Nrec P a f N0 = a. Proof. -destruct n. - assumption. - apply Pind with (P := fun p => P (Npos p)). -exact (H0 N0 H). -intro p'; exact (H0 (Npos p')). +intros P a f; unfold Nrec; apply Nrect_base. +Qed. + +Theorem Nrec_step : forall P a f n, Nrec P a f (Nsucc n) = f n (Nrec P a f n). +Proof. +intros P a f; unfold Nrec; apply Nrect_step. +Qed. + +(** Properties of successor and predecessor *) + +Theorem Npred_succ : forall n : N, Npred (Nsucc n) = n. +Proof. +destruct n as [| p]; simpl. reflexivity. +case_eq (Psucc p); try (intros q H; rewrite <- H; now rewrite Ppred_succ). +intro H; false_hyp H Psucc_not_one. Qed. (** Properties of addition *) @@ -171,6 +251,11 @@ destruct n; destruct m. simpl in |- *; rewrite Pplus_succ_permute_l; reflexivity. Qed. +Theorem Nsucc_0 : forall n : N, Nsucc n <> N0. +Proof. +intro n; elim n; simpl Nsucc; intros; discriminate. +Qed. + Theorem Nsucc_inj : forall n m:N, Nsucc n = Nsucc m -> n = m. Proof. destruct n; destruct m; simpl in |- *; intro H; reflexivity || injection H; @@ -188,13 +273,51 @@ intro n; pattern n in |- *; apply Nind; clear n; simpl in |- *. apply IHn; apply Nsucc_inj; assumption. Qed. +(** Properties of subtraction. *) + +Lemma Nminus_N0_Nle : forall n n' : N, n - n' = N0 <-> n <= n'. +Proof. +destruct n as [| p]; destruct n' as [| q]; unfold Nle; simpl; +split; intro H; try discriminate; try reflexivity. +now elim H. +intro H1; apply Pminus_mask_Gt in H1. destruct H1 as [h [H1 _]]. +rewrite H1 in H; discriminate. +case_eq (Pcompare p q Eq); intro H1; rewrite H1 in H; try now elim H. +assert (H2 : p = q); [now apply Pcompare_Eq_eq |]. now rewrite H2, Pminus_mask_diag. +now rewrite Pminus_mask_Lt. +Qed. + +Theorem Nminus_0_r : forall n : N, n - N0 = n. +Proof. +now destruct n. +Qed. + +Theorem Nminus_succ_r : forall n m : N, n - (Nsucc m) = Npred (n - m). +Proof. +destruct n as [| p]; destruct m as [| q]; try reflexivity. +now destruct p. +simpl. rewrite Pminus_mask_succ_r, Pminus_mask_carry_spec. +now destruct (Pminus_mask p q) as [| r |]; [| destruct r |]. +Qed. + (** Properties of multiplication *) +Theorem Nmult_0_l : forall n:N, N0 * n = N0. +Proof. +reflexivity. +Qed. + Theorem Nmult_1_l : forall n:N, Npos 1 * n = n. Proof. destruct n; reflexivity. Qed. +Theorem Nmult_Sn_m : forall n m : N, (Nsucc n) * m = m + n * m. +Proof. +destruct n as [| n]; destruct m as [| m]; simpl; auto. +rewrite Pmult_Sn_m; reflexivity. +Qed. + Theorem Nmult_1_r : forall n:N, n * Npos 1%positive = n. Proof. destruct n; simpl in |- *; try reflexivity. @@ -233,13 +356,14 @@ destruct n; destruct m; reflexivity || (try discriminate H). injection H; clear H; intro H; rewrite Pmult_reg_r with (1 := H); reflexivity. Qed. -Theorem Nmult_0_l : forall n:N, N0 * n = N0. +(** Properties of comparison *) + +Lemma Ncompare_refl : forall n, (n ?= n) = Eq. Proof. -reflexivity. +destruct n; simpl; auto. +apply Pcompare_refl. Qed. -(** Properties of comparison *) - Theorem Ncompare_Eq_eq : forall n m:N, (n ?= m) = Eq -> n = m. Proof. destruct n as [| n]; destruct m as [| m]; simpl in |- *; intro H; @@ -247,10 +371,10 @@ destruct n as [| n]; destruct m as [| m]; simpl in |- *; intro H; rewrite (Pcompare_Eq_eq n m H); reflexivity. Qed. -Lemma Ncompare_refl : forall n, (n ?= n) = Eq. +Theorem Ncompare_eq_correct : forall n m:N, (n ?= m) = Eq <-> n = m. Proof. -destruct n; simpl; auto. -apply Pcompare_refl. +split; intros; + [ apply Ncompare_Eq_eq; auto | subst; apply Ncompare_refl ]. Qed. Lemma Ncompare_antisym : forall n m, CompOpp (n ?= m) = (m ?= n). @@ -259,6 +383,30 @@ destruct n; destruct m; simpl; auto. exact (Pcompare_antisym p p0 Eq). Qed. +Theorem Nlt_irrefl : forall n : N, ~ n < n. +Proof. +intro n; unfold Nlt; now rewrite Ncompare_refl. +Qed. + +Theorem Ncompare_n_Sm : + forall n m : N, Ncompare n (Nsucc m) = Lt <-> Ncompare n m = Lt \/ n = m. +Proof. +intros n m; split; destruct n as [| p]; destruct m as [| q]; simpl; auto. +destruct p; simpl; intros; discriminate. +pose proof (proj1 (Pcompare_p_Sq p q)); +assert (p = q <-> Npos p = Npos q); [split; congruence | tauto]. +intros H; destruct H; discriminate. +pose proof (proj2 (Pcompare_p_Sq p q)); +assert (p = q <-> Npos p = Npos q); [split; congruence | tauto]. +Qed. + +(** 0 is the least natural number *) + +Theorem Ncompare_0 : forall n : N, Ncompare n N0 <> Lt. +Proof. +destruct n; discriminate. +Qed. + (** Dividing by 2 *) Definition Ndiv2 (n:N) := diff --git a/theories/NArith/BinPos.v b/theories/NArith/BinPos.v index 513a67c2..e3293e70 100644 --- a/theories/NArith/BinPos.v +++ b/theories/NArith/BinPos.v @@ -6,19 +6,19 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: BinPos.v 6699 2005-02-07 14:30:08Z coq $ i*) +(*i $Id: BinPos.v 11033 2008-06-01 22:56:50Z letouzey $ i*) Unset Boxed Definitions. (**********************************************************************) (** Binary positive numbers *) -(** Original development by Pierre Crégut, CNET, Lannion, France *) +(** Original development by Pierre Crégut, CNET, Lannion, France *) Inductive positive : Set := - | xI : positive -> positive - | xO : positive -> positive - | xH : positive. +| xI : positive -> positive +| xO : positive -> positive +| xH : positive. (** Declare binding key for scope positive_scope *) @@ -30,164 +30,181 @@ Bind Scope positive_scope with positive. Arguments Scope xO [positive_scope]. Arguments Scope xI [positive_scope]. +(** Postfix notation for positive numbers, allowing to mimic + the position of bits in a big-endian representation. + For instance, we can write 1~1~0 instead of (xO (xI xH)) + for the number 6 (which is 110 in binary notation). +*) + +Notation "p ~ 1" := (xI p) + (at level 7, left associativity, format "p '~' '1'") : positive_scope. +Notation "p ~ 0" := (xO p) + (at level 7, left associativity, format "p '~' '0'") : positive_scope. + +Open Local Scope positive_scope. + +(* In the current file, [xH] cannot yet be written as [1], since the + interpretation of positive numerical constants is not available + yet. We fix this here with an ad-hoc temporary notation. *) + +Notation Local "1" := xH (at level 7). + (** Successor *) Fixpoint Psucc (x:positive) : positive := match x with - | xI x' => xO (Psucc x') - | xO x' => xI x' - | xH => xO xH + | p~1 => (Psucc p)~0 + | p~0 => p~1 + | 1 => 1~0 end. (** Addition *) Set Boxed Definitions. -Fixpoint Pplus (x y:positive) {struct x} : positive := +Fixpoint Pplus (x y:positive) : positive := match x, y with - | xI x', xI y' => xO (Pplus_carry x' y') - | xI x', xO y' => xI (Pplus x' y') - | xI x', xH => xO (Psucc x') - | xO x', xI y' => xI (Pplus x' y') - | xO x', xO y' => xO (Pplus x' y') - | xO x', xH => xI x' - | xH, xI y' => xO (Psucc y') - | xH, xO y' => xI y' - | xH, xH => xO xH + | p~1, q~1 => (Pplus_carry p q)~0 + | p~1, q~0 => (Pplus p q)~1 + | p~1, 1 => (Psucc p)~0 + | p~0, q~1 => (Pplus p q)~1 + | p~0, q~0 => (Pplus p q)~0 + | p~0, 1 => p~1 + | 1, q~1 => (Psucc q)~0 + | 1, q~0 => q~1 + | 1, 1 => 1~0 end - - with Pplus_carry (x y:positive) {struct x} : positive := + +with Pplus_carry (x y:positive) : positive := match x, y with - | xI x', xI y' => xI (Pplus_carry x' y') - | xI x', xO y' => xO (Pplus_carry x' y') - | xI x', xH => xI (Psucc x') - | xO x', xI y' => xO (Pplus_carry x' y') - | xO x', xO y' => xI (Pplus x' y') - | xO x', xH => xO (Psucc x') - | xH, xI y' => xI (Psucc y') - | xH, xO y' => xO (Psucc y') - | xH, xH => xI xH + | p~1, q~1 => (Pplus_carry p q)~1 + | p~1, q~0 => (Pplus_carry p q)~0 + | p~1, 1 => (Psucc p)~1 + | p~0, q~1 => (Pplus_carry p q)~0 + | p~0, q~0 => (Pplus p q)~1 + | p~0, 1 => (Psucc p)~0 + | 1, q~1 => (Psucc q)~1 + | 1, q~0 => (Psucc q)~0 + | 1, 1 => 1~1 end. Unset Boxed Definitions. Infix "+" := Pplus : positive_scope. -Open Local Scope positive_scope. - (** From binary positive numbers to Peano natural numbers *) -Fixpoint Pmult_nat (x:positive) (pow2:nat) {struct x} : nat := +Fixpoint Pmult_nat (x:positive) (pow2:nat) : nat := match x with - | xI x' => (pow2 + Pmult_nat x' (pow2 + pow2))%nat - | xO x' => Pmult_nat x' (pow2 + pow2)%nat - | xH => pow2 + | p~1 => (pow2 + Pmult_nat p (pow2 + pow2))%nat + | p~0 => Pmult_nat p (pow2 + pow2)%nat + | 1 => pow2 end. -Definition nat_of_P (x:positive) := Pmult_nat x 1. +Definition nat_of_P (x:positive) := Pmult_nat x (S O). (** From Peano natural numbers to binary positive numbers *) Fixpoint P_of_succ_nat (n:nat) : positive := match n with - | O => xH - | S x' => Psucc (P_of_succ_nat x') + | O => 1 + | S x => Psucc (P_of_succ_nat x) end. (** Operation x -> 2*x-1 *) Fixpoint Pdouble_minus_one (x:positive) : positive := match x with - | xI x' => xI (xO x') - | xO x' => xI (Pdouble_minus_one x') - | xH => xH + | p~1 => p~0~1 + | p~0 => (Pdouble_minus_one p)~1 + | 1 => 1 end. (** Predecessor *) Definition Ppred (x:positive) := match x with - | xI x' => xO x' - | xO x' => Pdouble_minus_one x' - | xH => xH + | p~1 => p~0 + | p~0 => Pdouble_minus_one p + | 1 => 1 end. (** An auxiliary type for subtraction *) Inductive positive_mask : Set := - | IsNul : positive_mask - | IsPos : positive -> positive_mask - | IsNeg : positive_mask. +| IsNul : positive_mask +| IsPos : positive -> positive_mask +| IsNeg : positive_mask. (** Operation x -> 2*x+1 *) Definition Pdouble_plus_one_mask (x:positive_mask) := match x with - | IsNul => IsPos xH - | IsNeg => IsNeg - | IsPos p => IsPos (xI p) + | IsNul => IsPos 1 + | IsNeg => IsNeg + | IsPos p => IsPos p~1 end. (** Operation x -> 2*x *) Definition Pdouble_mask (x:positive_mask) := match x with - | IsNul => IsNul - | IsNeg => IsNeg - | IsPos p => IsPos (xO p) + | IsNul => IsNul + | IsNeg => IsNeg + | IsPos p => IsPos p~0 end. (** Operation x -> 2*x-2 *) Definition Pdouble_minus_two (x:positive) := match x with - | xI x' => IsPos (xO (xO x')) - | xO x' => IsPos (xO (Pdouble_minus_one x')) - | xH => IsNul + | p~1 => IsPos p~0~0 + | p~0 => IsPos (Pdouble_minus_one p)~0 + | 1 => IsNul end. (** Subtraction of binary positive numbers into a positive numbers mask *) Fixpoint Pminus_mask (x y:positive) {struct y} : positive_mask := match x, y with - | xI x', xI y' => Pdouble_mask (Pminus_mask x' y') - | xI x', xO y' => Pdouble_plus_one_mask (Pminus_mask x' y') - | xI x', xH => IsPos (xO x') - | xO x', xI y' => Pdouble_plus_one_mask (Pminus_mask_carry x' y') - | xO x', xO y' => Pdouble_mask (Pminus_mask x' y') - | xO x', xH => IsPos (Pdouble_minus_one x') - | xH, xH => IsNul - | xH, _ => IsNeg + | p~1, q~1 => Pdouble_mask (Pminus_mask p q) + | p~1, q~0 => Pdouble_plus_one_mask (Pminus_mask p q) + | p~1, 1 => IsPos p~0 + | p~0, q~1 => Pdouble_plus_one_mask (Pminus_mask_carry p q) + | p~0, q~0 => Pdouble_mask (Pminus_mask p q) + | p~0, 1 => IsPos (Pdouble_minus_one p) + | 1, 1 => IsNul + | 1, _ => IsNeg end - - with Pminus_mask_carry (x y:positive) {struct y} : positive_mask := + +with Pminus_mask_carry (x y:positive) {struct y} : positive_mask := match x, y with - | xI x', xI y' => Pdouble_plus_one_mask (Pminus_mask_carry x' y') - | xI x', xO y' => Pdouble_mask (Pminus_mask x' y') - | xI x', xH => IsPos (Pdouble_minus_one x') - | xO x', xI y' => Pdouble_mask (Pminus_mask_carry x' y') - | xO x', xO y' => Pdouble_plus_one_mask (Pminus_mask_carry x' y') - | xO x', xH => Pdouble_minus_two x' - | xH, _ => IsNeg + | p~1, q~1 => Pdouble_plus_one_mask (Pminus_mask_carry p q) + | p~1, q~0 => Pdouble_mask (Pminus_mask p q) + | p~1, 1 => IsPos (Pdouble_minus_one p) + | p~0, q~1 => Pdouble_mask (Pminus_mask_carry p q) + | p~0, q~0 => Pdouble_plus_one_mask (Pminus_mask_carry p q) + | p~0, 1 => Pdouble_minus_two p + | 1, _ => IsNeg end. (** Subtraction of binary positive numbers x and y, returns 1 if x<=y *) Definition Pminus (x y:positive) := match Pminus_mask x y with - | IsPos z => z - | _ => xH + | IsPos z => z + | _ => 1 end. Infix "-" := Pminus : positive_scope. (** Multiplication on binary positive numbers *) -Fixpoint Pmult (x y:positive) {struct x} : positive := +Fixpoint Pmult (x y:positive) : positive := match x with - | xI x' => y + xO (Pmult x' y) - | xO x' => xO (Pmult x' y) - | xH => y + | p~1 => y + (Pmult p y)~0 + | p~0 => (Pmult p y)~0 + | 1 => y end. Infix "*" := Pmult : positive_scope. @@ -196,9 +213,9 @@ Infix "*" := Pmult : positive_scope. Definition Pdiv2 (z:positive) := match z with - | xH => xH - | xO p => p - | xI p => p + | 1 => 1 + | p~0 => p + | p~1 => p end. Infix "/" := Pdiv2 : positive_scope. @@ -207,25 +224,51 @@ Infix "/" := Pdiv2 : positive_scope. Fixpoint Pcompare (x y:positive) (r:comparison) {struct y} : comparison := match x, y with - | xI x', xI y' => Pcompare x' y' r - | xI x', xO y' => Pcompare x' y' Gt - | xI x', xH => Gt - | xO x', xI y' => Pcompare x' y' Lt - | xO x', xO y' => Pcompare x' y' r - | xO x', xH => Gt - | xH, xI y' => Lt - | xH, xO y' => Lt - | xH, xH => r + | p~1, q~1 => Pcompare p q r + | p~1, q~0 => Pcompare p q Gt + | p~1, 1 => Gt + | p~0, q~1 => Pcompare p q Lt + | p~0, q~0 => Pcompare p q r + | p~0, 1 => Gt + | 1, q~1 => Lt + | 1, q~0 => Lt + | 1, 1 => r end. Infix "?=" := Pcompare (at level 70, no associativity) : positive_scope. +Definition Plt (x y:positive) := (Pcompare x y Eq) = Lt. +Definition Pgt (x y:positive) := (Pcompare x y Eq) = Gt. +Definition Ple (x y:positive) := (Pcompare x y Eq) <> Gt. +Definition Pge (x y:positive) := (Pcompare x y Eq) <> Lt. + +Infix "<=" := Ple : positive_scope. +Infix "<" := Plt : positive_scope. +Infix ">=" := Pge : positive_scope. +Infix ">" := Pgt : positive_scope. + +Notation "x <= y <= z" := (x <= y /\ y <= z) : positive_scope. +Notation "x <= y < z" := (x <= y /\ y < z) : positive_scope. +Notation "x < y < z" := (x < y /\ y < z) : positive_scope. +Notation "x < y <= z" := (x < y /\ y <= z) : positive_scope. + + +Definition Pmin (p p' : positive) := match Pcompare p p' Eq with + | Lt | Eq => p + | Gt => p' + end. + +Definition Pmax (p p' : positive) := match Pcompare p p' Eq with + | Lt | Eq => p' + | Gt => p + end. + (**********************************************************************) (** Miscellaneous properties of binary positive numbers *) -Lemma ZL11 : forall p:positive, p = xH \/ p <> xH. +Lemma ZL11 : forall p:positive, p = 1 \/ p <> 1. Proof. -intros x; case x; intros; (left; reflexivity) || (right; discriminate). + intros x; case x; intros; (left; reflexivity) || (right; discriminate). Qed. (**********************************************************************) @@ -233,78 +276,70 @@ Qed. (** Specification of [xI] in term of [Psucc] and [xO] *) -Lemma xI_succ_xO : forall p:positive, xI p = Psucc (xO p). +Lemma xI_succ_xO : forall p:positive, p~1 = Psucc p~0. Proof. -reflexivity. + reflexivity. Qed. Lemma Psucc_discr : forall p:positive, p <> Psucc p. Proof. -intro x; destruct x as [p| p| ]; discriminate. + destruct p; discriminate. Qed. (** Successor and double *) Lemma Psucc_o_double_minus_one_eq_xO : - forall p:positive, Psucc (Pdouble_minus_one p) = xO p. + forall p:positive, Psucc (Pdouble_minus_one p) = p~0. Proof. -intro x; induction x as [x IHx| x| ]; simpl in |- *; try rewrite IHx; - reflexivity. + induction p; simpl; f_equal; auto. Qed. Lemma Pdouble_minus_one_o_succ_eq_xI : - forall p:positive, Pdouble_minus_one (Psucc p) = xI p. + forall p:positive, Pdouble_minus_one (Psucc p) = p~1. Proof. -intro x; induction x as [x IHx| x| ]; simpl in |- *; try rewrite IHx; - reflexivity. + induction p; simpl; f_equal; auto. Qed. Lemma xO_succ_permute : - forall p:positive, xO (Psucc p) = Psucc (Psucc (xO p)). + forall p:positive, (Psucc p)~0 = Psucc (Psucc p~0). Proof. -intro y; induction y as [y Hrecy| y Hrecy| ]; simpl in |- *; auto. + induction p; simpl; auto. Qed. Lemma double_moins_un_xO_discr : - forall p:positive, Pdouble_minus_one p <> xO p. + forall p:positive, Pdouble_minus_one p <> p~0. Proof. -intro x; destruct x as [p| p| ]; discriminate. + destruct p; discriminate. Qed. (** Successor and predecessor *) -Lemma Psucc_not_one : forall p:positive, Psucc p <> xH. +Lemma Psucc_not_one : forall p:positive, Psucc p <> 1. Proof. -intro x; destruct x as [x| x| ]; discriminate. + destruct p; discriminate. Qed. Lemma Ppred_succ : forall p:positive, Ppred (Psucc p) = p. Proof. -intro x; destruct x as [p| p| ]; [ idtac | idtac | simpl in |- *; auto ]; - (induction p as [p IHp| | ]; [ idtac | reflexivity | reflexivity ]); - simpl in |- *; simpl in IHp; try rewrite <- IHp; reflexivity. + intros [[p|p| ]|[p|p| ]| ]; simpl; auto. + f_equal; apply Pdouble_minus_one_o_succ_eq_xI. Qed. -Lemma Psucc_pred : forall p:positive, p = xH \/ Psucc (Ppred p) = p. +Lemma Psucc_pred : forall p:positive, p = 1 \/ Psucc (Ppred p) = p. Proof. -intro x; induction x as [x Hrecx| x Hrecx| ]; - [ simpl in |- *; auto - | simpl in |- *; intros; right; apply Psucc_o_double_minus_one_eq_xO - | auto ]. + induction p; simpl; auto. + right; apply Psucc_o_double_minus_one_eq_xO. Qed. +Ltac destr_eq H := discriminate H || (try (injection H; clear H; intro H)). + (** Injectivity of successor *) Lemma Psucc_inj : forall p q:positive, Psucc p = Psucc q -> p = q. Proof. -intro x; induction x; intro y; destruct y as [y| y| ]; simpl in |- *; intro H; - discriminate H || (try (injection H; clear H; intro H)). -rewrite (IHx y H); reflexivity. -absurd (Psucc x = xH); [ apply Psucc_not_one | assumption ]. -apply f_equal with (1 := H); assumption. -absurd (Psucc y = xH); - [ apply Psucc_not_one | symmetry in |- *; assumption ]. -reflexivity. + induction p; intros [q|q| ] H; simpl in *; destr_eq H; f_equal; auto. + elim (Psucc_not_one p); auto. + elim (Psucc_not_one q); auto. Qed. (**********************************************************************) @@ -312,656 +347,758 @@ Qed. (** Specification of [Psucc] in term of [Pplus] *) -Lemma Pplus_one_succ_r : forall p:positive, Psucc p = p + xH. +Lemma Pplus_one_succ_r : forall p:positive, Psucc p = p + 1. Proof. -intro q; destruct q as [p| p| ]; reflexivity. + destruct p; reflexivity. Qed. -Lemma Pplus_one_succ_l : forall p:positive, Psucc p = xH + p. +Lemma Pplus_one_succ_l : forall p:positive, Psucc p = 1 + p. Proof. -intro q; destruct q as [p| p| ]; reflexivity. + destruct p; reflexivity. Qed. (** Specification of [Pplus_carry] *) Theorem Pplus_carry_spec : - forall p q:positive, Pplus_carry p q = Psucc (p + q). + forall p q:positive, Pplus_carry p q = Psucc (p + q). Proof. -intro x; induction x as [p IHp| p IHp| ]; intro y; - [ destruct y as [p0| p0| ] - | destruct y as [p0| p0| ] - | destruct y as [p| p| ] ]; simpl in |- *; auto; rewrite IHp; - auto. + induction p; destruct q; simpl; f_equal; auto. Qed. (** Commutativity *) Theorem Pplus_comm : forall p q:positive, p + q = q + p. Proof. -intro x; induction x as [p IHp| p IHp| ]; intro y; - [ destruct y as [p0| p0| ] - | destruct y as [p0| p0| ] - | destruct y as [p| p| ] ]; simpl in |- *; auto; - try do 2 rewrite Pplus_carry_spec; rewrite IHp; auto. + induction p; destruct q; simpl; f_equal; auto. + rewrite 2 Pplus_carry_spec; f_equal; auto. Qed. (** Permutation of [Pplus] and [Psucc] *) Theorem Pplus_succ_permute_r : - forall p q:positive, p + Psucc q = Psucc (p + q). + forall p q:positive, p + Psucc q = Psucc (p + q). Proof. -intro x; induction x as [p IHp| p IHp| ]; intro y; - [ destruct y as [p0| p0| ] - | destruct y as [p0| p0| ] - | destruct y as [p| p| ] ]; simpl in |- *; auto; - [ rewrite Pplus_carry_spec; rewrite IHp; auto - | rewrite Pplus_carry_spec; auto - | destruct p; simpl in |- *; auto - | rewrite IHp; auto - | destruct p; simpl in |- *; auto ]. + induction p; destruct q; simpl; f_equal; + auto using Pplus_one_succ_r; rewrite Pplus_carry_spec; auto. Qed. Theorem Pplus_succ_permute_l : - forall p q:positive, Psucc p + q = Psucc (p + q). + forall p q:positive, Psucc p + q = Psucc (p + q). Proof. -intros x y; rewrite Pplus_comm; rewrite Pplus_comm with (p := x); - apply Pplus_succ_permute_r. + intros p q; rewrite Pplus_comm, (Pplus_comm p); + apply Pplus_succ_permute_r. Qed. Theorem Pplus_carry_pred_eq_plus : - forall p q:positive, q <> xH -> Pplus_carry p (Ppred q) = p + q. + forall p q:positive, q <> 1 -> Pplus_carry p (Ppred q) = p + q. Proof. -intros q z H; elim (Psucc_pred z); - [ intro; absurd (z = xH); auto - | intros E; pattern z at 2 in |- *; rewrite <- E; - rewrite Pplus_succ_permute_r; rewrite Pplus_carry_spec; - trivial ]. -Qed. + intros p q H; rewrite Pplus_carry_spec, <- Pplus_succ_permute_r; f_equal. + destruct (Psucc_pred q); [ elim H; assumption | assumption ]. +Qed. (** No neutral for addition on strictly positive numbers *) Lemma Pplus_no_neutral : forall p q:positive, q + p <> p. Proof. -intro x; induction x; intro y; destruct y as [y| y| ]; simpl in |- *; intro H; - discriminate H || injection H; clear H; intro H; apply (IHx y H). + induction p as [p IHp|p IHp| ]; intros [q|q| ] H; + destr_eq H; apply (IHp q H). Qed. Lemma Pplus_carry_no_neutral : - forall p q:positive, Pplus_carry q p <> Psucc p. + forall p q:positive, Pplus_carry q p <> Psucc p. Proof. -intros x y H; absurd (y + x = x); - [ apply Pplus_no_neutral - | apply Psucc_inj; rewrite <- Pplus_carry_spec; assumption ]. + intros p q H; elim (Pplus_no_neutral p q). + apply Psucc_inj; rewrite <- Pplus_carry_spec; assumption. Qed. (** Simplification *) Lemma Pplus_carry_plus : - forall p q r s:positive, Pplus_carry p r = Pplus_carry q s -> p + r = q + s. + forall p q r s:positive, Pplus_carry p r = Pplus_carry q s -> p + r = q + s. Proof. -intros x y z t H; apply Psucc_inj; do 2 rewrite <- Pplus_carry_spec; - assumption. + intros p q r s H; apply Psucc_inj; do 2 rewrite <- Pplus_carry_spec; + assumption. Qed. Lemma Pplus_reg_r : forall p q r:positive, p + r = q + r -> p = q. Proof. -intros x y z; generalize x y; clear x y. -induction z as [z| z| ]. - destruct x as [x| x| ]; intro y; destruct y as [y| y| ]; simpl in |- *; - intro H; discriminate H || (try (injection H; clear H; intro H)). - rewrite IHz with (1 := Pplus_carry_plus _ _ _ _ H); reflexivity. - absurd (Pplus_carry x z = Psucc z); - [ apply Pplus_carry_no_neutral | assumption ]. - rewrite IHz with (1 := H); reflexivity. - symmetry in H; absurd (Pplus_carry y z = Psucc z); - [ apply Pplus_carry_no_neutral | assumption ]. - reflexivity. - destruct x as [x| x| ]; intro y; destruct y as [y| y| ]; simpl in |- *; - intro H; discriminate H || (try (injection H; clear H; intro H)). - rewrite IHz with (1 := H); reflexivity. - absurd (x + z = z); [ apply Pplus_no_neutral | assumption ]. - rewrite IHz with (1 := H); reflexivity. - symmetry in H; absurd (y + z = z); - [ apply Pplus_no_neutral | assumption ]. - reflexivity. - intros H x y; apply Psucc_inj; do 2 rewrite Pplus_one_succ_r; assumption. + intros p q r; revert p q; induction r. + intros [p|p| ] [q|q| ] H; simpl; destr_eq H; + f_equal; auto using Pplus_carry_plus; + contradict H; auto using Pplus_carry_no_neutral. + intros [p|p| ] [q|q| ] H; simpl; destr_eq H; f_equal; auto; + contradict H; auto using Pplus_no_neutral. + intros p q H; apply Psucc_inj; do 2 rewrite Pplus_one_succ_r; assumption. Qed. Lemma Pplus_reg_l : forall p q r:positive, p + q = p + r -> q = r. Proof. -intros x y z H; apply Pplus_reg_r with (r := x); - rewrite Pplus_comm with (p := z); rewrite Pplus_comm with (p := y); - assumption. + intros p q r H; apply Pplus_reg_r with (r:=p). + rewrite (Pplus_comm r), (Pplus_comm q); assumption. Qed. Lemma Pplus_carry_reg_r : - forall p q r:positive, Pplus_carry p r = Pplus_carry q r -> p = q. + forall p q r:positive, Pplus_carry p r = Pplus_carry q r -> p = q. Proof. -intros x y z H; apply Pplus_reg_r with (r := z); apply Pplus_carry_plus; - assumption. + intros p q r H; apply Pplus_reg_r with (r:=r); apply Pplus_carry_plus; + assumption. Qed. Lemma Pplus_carry_reg_l : - forall p q r:positive, Pplus_carry p q = Pplus_carry p r -> q = r. + forall p q r:positive, Pplus_carry p q = Pplus_carry p r -> q = r. Proof. -intros x y z H; apply Pplus_reg_r with (r := x); - rewrite Pplus_comm with (p := z); rewrite Pplus_comm with (p := y); - apply Pplus_carry_plus; assumption. + intros p q r H; apply Pplus_reg_r with (r:=p); + rewrite (Pplus_comm r), (Pplus_comm q); apply Pplus_carry_plus; assumption. Qed. (** Addition on positive is associative *) Theorem Pplus_assoc : forall p q r:positive, p + (q + r) = p + q + r. Proof. -intros x y; generalize x; clear x. -induction y as [y| y| ]; intro x. - destruct x as [x| x| ]; intro z; destruct z as [z| z| ]; simpl in |- *; - repeat rewrite Pplus_carry_spec; repeat rewrite Pplus_succ_permute_r; - repeat rewrite Pplus_succ_permute_l; - reflexivity || (repeat apply f_equal with (A := positive)); - apply IHy. - destruct x as [x| x| ]; intro z; destruct z as [z| z| ]; simpl in |- *; - repeat rewrite Pplus_carry_spec; repeat rewrite Pplus_succ_permute_r; - repeat rewrite Pplus_succ_permute_l; - reflexivity || (repeat apply f_equal with (A := positive)); - apply IHy. - intro z; rewrite Pplus_comm with (p := xH); - do 2 rewrite <- Pplus_one_succ_r; rewrite Pplus_succ_permute_l; - rewrite Pplus_succ_permute_r; reflexivity. + induction p. + intros [q|q| ] [r|r| ]; simpl; f_equal; auto; + rewrite ?Pplus_carry_spec, ?Pplus_succ_permute_r, + ?Pplus_succ_permute_l, ?Pplus_one_succ_r; f_equal; auto. + intros [q|q| ] [r|r| ]; simpl; f_equal; auto; + rewrite ?Pplus_carry_spec, ?Pplus_succ_permute_r, + ?Pplus_succ_permute_l, ?Pplus_one_succ_r; f_equal; auto. + intros p r; rewrite <- 2 Pplus_one_succ_l, Pplus_succ_permute_l; auto. Qed. (** Commutation of addition with the double of a positive number *) +Lemma Pplus_xO : forall m n : positive, (m + n)~0 = m~0 + n~0. +Proof. + destruct n; destruct m; simpl; auto. +Qed. + Lemma Pplus_xI_double_minus_one : - forall p q:positive, xO (p + q) = xI p + Pdouble_minus_one q. + forall p q:positive, (p + q)~0 = p~1 + Pdouble_minus_one q. Proof. -intros; change (xI p) with (xO p + xH) in |- *. -rewrite <- Pplus_assoc; rewrite <- Pplus_one_succ_l; - rewrite Psucc_o_double_minus_one_eq_xO. -reflexivity. + intros; change (p~1) with (p~0 + 1). + rewrite <- Pplus_assoc, <- Pplus_one_succ_l, Psucc_o_double_minus_one_eq_xO. + reflexivity. Qed. Lemma Pplus_xO_double_minus_one : - forall p q:positive, Pdouble_minus_one (p + q) = xO p + Pdouble_minus_one q. + forall p q:positive, Pdouble_minus_one (p + q) = p~0 + Pdouble_minus_one q. Proof. -induction p as [p IHp| p IHp| ]; destruct q as [q| q| ]; simpl in |- *; - try rewrite Pplus_carry_spec; try rewrite Pdouble_minus_one_o_succ_eq_xI; - try rewrite IHp; try rewrite Pplus_xI_double_minus_one; - try reflexivity. - rewrite <- Psucc_o_double_minus_one_eq_xO; rewrite Pplus_one_succ_l; - reflexivity. + induction p as [p IHp| p IHp| ]; destruct q; simpl; + rewrite ?Pplus_carry_spec, ?Pdouble_minus_one_o_succ_eq_xI, + ?Pplus_xI_double_minus_one; try reflexivity. + rewrite IHp; auto. + rewrite <- Psucc_o_double_minus_one_eq_xO, Pplus_one_succ_l; reflexivity. Qed. (** Misc *) -Lemma Pplus_diag : forall p:positive, p + p = xO p. +Lemma Pplus_diag : forall p:positive, p + p = p~0. Proof. -intro x; induction x; simpl in |- *; try rewrite Pplus_carry_spec; - try rewrite IHx; reflexivity. + induction p as [p IHp| p IHp| ]; simpl; + try rewrite ?Pplus_carry_spec, ?IHp; reflexivity. Qed. (**********************************************************************) -(** Peano induction on binary positive positive numbers *) +(** Peano induction and recursion on binary positive positive numbers *) +(** (a nice proof from Conor McBride, see "The view from the left") *) -Fixpoint plus_iter (x y:positive) {struct x} : positive := - match x with - | xH => Psucc y - | xO x => plus_iter x (plus_iter x y) - | xI x => plus_iter x (plus_iter x (Psucc y)) +Inductive PeanoView : positive -> Type := +| PeanoOne : PeanoView 1 +| PeanoSucc : forall p, PeanoView p -> PeanoView (Psucc p). + +Fixpoint peanoView_xO p (q:PeanoView p) : PeanoView (p~0) := + match q in PeanoView x return PeanoView (x~0) with + | PeanoOne => PeanoSucc _ PeanoOne + | PeanoSucc _ q => PeanoSucc _ (PeanoSucc _ (peanoView_xO _ q)) end. -Lemma plus_iter_eq_plus : forall p q:positive, plus_iter p q = p + q. -Proof. -intro x; induction x as [p IHp| p IHp| ]; intro y; - [ destruct y as [p0| p0| ] - | destruct y as [p0| p0| ] - | destruct y as [p| p| ] ]; simpl in |- *; reflexivity || (do 2 rewrite IHp); - rewrite Pplus_assoc; rewrite Pplus_diag; try reflexivity. -rewrite Pplus_carry_spec; rewrite <- Pplus_succ_permute_r; reflexivity. -rewrite Pplus_one_succ_r; reflexivity. -Qed. +Fixpoint peanoView_xI p (q:PeanoView p) : PeanoView (p~1) := + match q in PeanoView x return PeanoView (x~1) with + | PeanoOne => PeanoSucc _ (PeanoSucc _ PeanoOne) + | PeanoSucc _ q => PeanoSucc _ (PeanoSucc _ (peanoView_xI _ q)) + end. + +Fixpoint peanoView p : PeanoView p := + match p return PeanoView p with + | 1 => PeanoOne + | p~0 => peanoView_xO p (peanoView p) + | p~1 => peanoView_xI p (peanoView p) + end. -Lemma plus_iter_xO : forall p:positive, plus_iter p p = xO p. +Definition PeanoView_iter (P:positive->Type) + (a:P 1) (f:forall p, P p -> P (Psucc p)) := + (fix iter p (q:PeanoView p) : P p := + match q in PeanoView p return P p with + | PeanoOne => a + | PeanoSucc _ q => f _ (iter _ q) + end). + +Require Import Eqdep_dec EqdepFacts. + +Theorem eq_dep_eq_positive : + forall (P:positive->Type) (p:positive) (x y:P p), + eq_dep positive P p x p y -> x = y. Proof. -intro; rewrite <- Pplus_diag; apply plus_iter_eq_plus. + apply eq_dep_eq_dec. + decide equality. Qed. -Lemma plus_iter_xI : forall p:positive, Psucc (plus_iter p p) = xI p. +Theorem PeanoViewUnique : forall p (q q':PeanoView p), q = q'. Proof. -intro; rewrite xI_succ_xO; rewrite <- Pplus_diag; - apply (f_equal (A:=positive)); apply plus_iter_eq_plus. + intros. + induction q as [ | p q IHq ]. + apply eq_dep_eq_positive. + cut (1=1). pattern 1 at 1 2 5, q'. destruct q'. trivial. + destruct p0; intros; discriminate. + trivial. + apply eq_dep_eq_positive. + cut (Psucc p=Psucc p). pattern (Psucc p) at 1 2 5, q'. destruct q'. + intro. destruct p; discriminate. + intro. unfold p0 in H. apply Psucc_inj in H. + generalize q'. rewrite H. intro. + rewrite (IHq q'0). + trivial. + trivial. Qed. -Lemma iterate_add : - forall P:positive -> Type, - (forall n:positive, P n -> P (Psucc n)) -> - forall p q:positive, P q -> P (plus_iter p q). -Proof. -intros P H; induction p; simpl in |- *; intros. -apply IHp; apply IHp; apply H; assumption. -apply IHp; apply IHp; assumption. -apply H; assumption. -Defined. +Definition Prect (P:positive->Type) (a:P 1) (f:forall p, P p -> P (Psucc p)) + (p:positive) := + PeanoView_iter P a f p (peanoView p). -(** Peano induction *) +Theorem Prect_succ : forall (P:positive->Type) (a:P 1) + (f:forall p, P p -> P (Psucc p)) (p:positive), + Prect P a f (Psucc p) = f _ (Prect P a f p). +Proof. + intros. + unfold Prect. + rewrite (PeanoViewUnique _ (peanoView (Psucc p)) (PeanoSucc _ (peanoView p))). + trivial. +Qed. -Theorem Pind : - forall P:positive -> Prop, - P xH -> (forall n:positive, P n -> P (Psucc n)) -> forall p:positive, P p. +Theorem Prect_base : forall (P:positive->Type) (a:P 1) + (f:forall p, P p -> P (Psucc p)), Prect P a f 1 = a. Proof. -intros P H1 Hsucc n; induction n. -rewrite <- plus_iter_xI; apply Hsucc; apply iterate_add; assumption. -rewrite <- plus_iter_xO; apply iterate_add; assumption. -assumption. + trivial. Qed. -(** Peano recursion *) +Definition Prec (P:positive->Set) := Prect P. -Definition Prec (A:Set) (a:A) (f:positive -> A -> A) : - positive -> A := - (fix Prec (p:positive) : A := - match p with - | xH => a - | xO p => iterate_add (fun _ => A) f p p (Prec p) - | xI p => f (plus_iter p p) (iterate_add (fun _ => A) f p p (Prec p)) - end). +(** Peano induction *) + +Definition Pind (P:positive->Prop) := Prect P. (** Peano case analysis *) Theorem Pcase : - forall P:positive -> Prop, - P xH -> (forall n:positive, P (Psucc n)) -> forall p:positive, P p. + forall P:positive -> Prop, + P 1 -> (forall n:positive, P (Psucc n)) -> forall p:positive, P p. Proof. -intros; apply Pind; auto. + intros; apply Pind; auto. Qed. -(* -Check - (let fact := Prec positive xH (fun p r => Psucc p * r) in - let seven := xI (xI xH) in - let five_thousand_forty := - xO (xO (xO (xO (xI (xI (xO (xI (xI (xI (xO (xO xH))))))))))) in - refl_equal _:fact seven = five_thousand_forty). -*) - (**********************************************************************) (** Properties of multiplication on binary positive numbers *) (** One is right neutral for multiplication *) -Lemma Pmult_1_r : forall p:positive, p * xH = p. +Lemma Pmult_1_r : forall p:positive, p * 1 = p. Proof. -intro x; induction x; simpl in |- *. - rewrite IHx; reflexivity. - rewrite IHx; reflexivity. + induction p; simpl; f_equal; auto. +Qed. + +(** Successor and multiplication *) + +Lemma Pmult_Sn_m : forall n m : positive, (Psucc n) * m = m + n * m. +Proof. + induction n as [n IHn | n IHn | ]; simpl; intro m. + rewrite IHn, Pplus_assoc, Pplus_diag, <-Pplus_xO; reflexivity. reflexivity. + symmetry; apply Pplus_diag. Qed. (** Right reduction properties for multiplication *) -Lemma Pmult_xO_permute_r : forall p q:positive, p * xO q = xO (p * q). +Lemma Pmult_xO_permute_r : forall p q:positive, p * q~0 = (p * q)~0. Proof. -intros x y; induction x; simpl in |- *. - rewrite IHx; reflexivity. - rewrite IHx; reflexivity. - reflexivity. + intros p q; induction p; simpl; do 2 (f_equal; auto). Qed. -Lemma Pmult_xI_permute_r : forall p q:positive, p * xI q = p + xO (p * q). +Lemma Pmult_xI_permute_r : forall p q:positive, p * q~1 = p + (p * q)~0. Proof. -intros x y; induction x; simpl in |- *. - rewrite IHx; do 2 rewrite Pplus_assoc; rewrite Pplus_comm with (p := y); - reflexivity. - rewrite IHx; reflexivity. - reflexivity. + intros p q; induction p as [p IHp|p IHp| ]; simpl; f_equal; auto. + rewrite IHp, 2 Pplus_assoc, (Pplus_comm p); reflexivity. Qed. (** Commutativity of multiplication *) Theorem Pmult_comm : forall p q:positive, p * q = q * p. Proof. -intros x y; induction y; simpl in |- *. - rewrite <- IHy; apply Pmult_xI_permute_r. - rewrite <- IHy; apply Pmult_xO_permute_r. - apply Pmult_1_r. + intros p q; induction q as [q IHq|q IHq| ]; simpl; try rewrite <- IHq; + auto using Pmult_xI_permute_r, Pmult_xO_permute_r, Pmult_1_r. Qed. (** Distributivity of multiplication over addition *) Theorem Pmult_plus_distr_l : - forall p q r:positive, p * (q + r) = p * q + p * r. -Proof. -intros x y z; induction x; simpl in |- *. - rewrite IHx; rewrite <- Pplus_assoc with (q := xO (x * y)); - rewrite Pplus_assoc with (p := xO (x * y)); - rewrite Pplus_comm with (p := xO (x * y)); - rewrite <- Pplus_assoc with (q := xO (x * y)); - rewrite Pplus_assoc with (q := z); reflexivity. - rewrite IHx; reflexivity. + forall p q r:positive, p * (q + r) = p * q + p * r. +Proof. + intros p q r; induction p as [p IHp|p IHp| ]; simpl. + rewrite IHp. set (m:=(p*q)~0). set (n:=(p*r)~0). + change ((p*q+p*r)~0) with (m+n). + rewrite 2 Pplus_assoc; f_equal. + rewrite <- 2 Pplus_assoc; f_equal. + apply Pplus_comm. + f_equal; auto. reflexivity. Qed. Theorem Pmult_plus_distr_r : - forall p q r:positive, (p + q) * r = p * r + q * r. + forall p q r:positive, (p + q) * r = p * r + q * r. Proof. -intros x y z; do 3 rewrite Pmult_comm with (q := z); apply Pmult_plus_distr_l. + intros p q r; do 3 rewrite Pmult_comm with (q:=r); apply Pmult_plus_distr_l. Qed. (** Associativity of multiplication *) Theorem Pmult_assoc : forall p q r:positive, p * (q * r) = p * q * r. Proof. -intro x; induction x as [x| x| ]; simpl in |- *; intros y z. - rewrite IHx; rewrite Pmult_plus_distr_r; reflexivity. - rewrite IHx; reflexivity. + induction p as [p IHp| p IHp | ]; simpl; intros q r. + rewrite IHp; rewrite Pmult_plus_distr_r; reflexivity. + rewrite IHp; reflexivity. reflexivity. Qed. (** Parity properties of multiplication *) -Lemma Pmult_xI_mult_xO_discr : forall p q r:positive, xI p * r <> xO q * r. +Lemma Pmult_xI_mult_xO_discr : forall p q r:positive, p~1 * r <> q~0 * r. Proof. -intros x y z; induction z as [| z IHz| ]; try discriminate. -intro H; apply IHz; clear IHz. -do 2 rewrite Pmult_xO_permute_r in H. -injection H; clear H; intro H; exact H. + intros p q r; induction r; try discriminate. + rewrite 2 Pmult_xO_permute_r; intro H; destr_eq H; auto. Qed. -Lemma Pmult_xO_discr : forall p q:positive, xO p * q <> q. +Lemma Pmult_xO_discr : forall p q:positive, p~0 * q <> q. Proof. -intros x y; induction y; try discriminate. -rewrite Pmult_xO_permute_r; injection; assumption. + intros p q; induction q; try discriminate. + rewrite Pmult_xO_permute_r; injection; assumption. Qed. (** Simplification properties of multiplication *) Theorem Pmult_reg_r : forall p q r:positive, p * r = q * r -> p = q. Proof. -intro x; induction x as [p IHp| p IHp| ]; intro y; destruct y as [q| q| ]; - intros z H; reflexivity || apply (f_equal (A:=positive)) || apply False_ind. - simpl in H; apply IHp with (xO z); simpl in |- *; - do 2 rewrite Pmult_xO_permute_r; apply Pplus_reg_l with (1 := H). - apply Pmult_xI_mult_xO_discr with (1 := H). - simpl in H; rewrite Pplus_comm in H; apply Pplus_no_neutral with (1 := H). - symmetry in H; apply Pmult_xI_mult_xO_discr with (1 := H). - apply IHp with (xO z); simpl in |- *; do 2 rewrite Pmult_xO_permute_r; - assumption. - apply Pmult_xO_discr with (1 := H). - simpl in H; symmetry in H; rewrite Pplus_comm in H; - apply Pplus_no_neutral with (1 := H). - symmetry in H; apply Pmult_xO_discr with (1 := H). + induction p as [p IHp| p IHp| ]; intros [q|q| ] r H; + reflexivity || apply (f_equal (A:=positive)) || apply False_ind. + apply IHp with (r~0); simpl in *; + rewrite 2 Pmult_xO_permute_r; apply Pplus_reg_l with (1:=H). + apply Pmult_xI_mult_xO_discr with (1:=H). + simpl in H; rewrite Pplus_comm in H; apply Pplus_no_neutral with (1:=H). + symmetry in H; apply Pmult_xI_mult_xO_discr with (1:=H). + apply IHp with (r~0); simpl; rewrite 2 Pmult_xO_permute_r; assumption. + apply Pmult_xO_discr with (1:= H). + simpl in H; symmetry in H; rewrite Pplus_comm in H; + apply Pplus_no_neutral with (1:=H). + symmetry in H; apply Pmult_xO_discr with (1:=H). Qed. Theorem Pmult_reg_l : forall p q r:positive, r * p = r * q -> p = q. Proof. -intros x y z H; apply Pmult_reg_r with (r := z). -rewrite Pmult_comm with (p := x); rewrite Pmult_comm with (p := y); - assumption. + intros p q r H; apply Pmult_reg_r with (r:=r). + rewrite (Pmult_comm p), (Pmult_comm q); assumption. Qed. (** Inversion of multiplication *) -Lemma Pmult_1_inversion_l : forall p q:positive, p * q = xH -> p = xH. +Lemma Pmult_1_inversion_l : forall p q:positive, p * q = 1 -> p = 1. Proof. -intros x y; destruct x as [p| p| ]; simpl in |- *. - destruct y as [p0| p0| ]; intro; discriminate. - intro; discriminate. - reflexivity. + intros [p|p| ] [q|q| ] H; destr_eq H; auto. Qed. (**********************************************************************) (** Properties of comparison on binary positive numbers *) +Theorem Pcompare_refl : forall p:positive, (p ?= p) Eq = Eq. + induction p; auto. +Qed. + +(* A generalization of Pcompare_refl *) + +Theorem Pcompare_refl_id : forall (p : positive) (r : comparison), (p ?= p) r = r. + induction p; auto. +Qed. + Theorem Pcompare_not_Eq : - forall p q:positive, (p ?= q) Gt <> Eq /\ (p ?= q) Lt <> Eq. + forall p q:positive, (p ?= q) Gt <> Eq /\ (p ?= q) Lt <> Eq. Proof. -intro x; induction x as [p IHp| p IHp| ]; intro y; destruct y as [q| q| ]; - split; simpl in |- *; auto; discriminate || (elim (IHp q); auto). + induction p as [p IHp| p IHp| ]; intros [q| q| ]; split; simpl; auto; + discriminate || (elim (IHp q); auto). Qed. Theorem Pcompare_Eq_eq : forall p q:positive, (p ?= q) Eq = Eq -> p = q. Proof. -intro x; induction x as [p IHp| p IHp| ]; intro y; destruct y as [q| q| ]; - simpl in |- *; auto; intro H; - [ rewrite (IHp q); trivial - | absurd ((p ?= q) Gt = Eq); - [ elim (Pcompare_not_Eq p q); auto | assumption ] - | discriminate H - | absurd ((p ?= q) Lt = Eq); - [ elim (Pcompare_not_Eq p q); auto | assumption ] - | rewrite (IHp q); auto - | discriminate H - | discriminate H - | discriminate H ]. + induction p; intros [q| q| ] H; simpl in *; auto; + try discriminate H; try (f_equal; auto; fail). + destruct (Pcompare_not_Eq p q) as (H',_); elim H'; auto. + destruct (Pcompare_not_Eq p q) as (_,H'); elim H'; auto. Qed. Lemma Pcompare_Gt_Lt : - forall p q:positive, (p ?= q) Gt = Lt -> (p ?= q) Eq = Lt. + forall p q:positive, (p ?= q) Gt = Lt -> (p ?= q) Eq = Lt. Proof. -intro x; induction x as [x Hrecx| x Hrecx| ]; intro y; - [ induction y as [y Hrecy| y Hrecy| ] - | induction y as [y Hrecy| y Hrecy| ] - | induction y as [y Hrecy| y Hrecy| ] ]; simpl in |- *; - auto; discriminate || intros H; discriminate H. + induction p; intros [q|q| ] H; simpl; auto; discriminate. +Qed. + +Lemma Pcompare_eq_Lt : + forall p q : positive, (p ?= q) Eq = Lt <-> (p ?= q) Gt = Lt. +Proof. + intros p q; split; [| apply Pcompare_Gt_Lt]. + revert q; induction p; intros [q|q| ] H; simpl; auto; discriminate. Qed. Lemma Pcompare_Lt_Gt : - forall p q:positive, (p ?= q) Lt = Gt -> (p ?= q) Eq = Gt. + forall p q:positive, (p ?= q) Lt = Gt -> (p ?= q) Eq = Gt. Proof. -intro x; induction x as [x Hrecx| x Hrecx| ]; intro y; - [ induction y as [y Hrecy| y Hrecy| ] - | induction y as [y Hrecy| y Hrecy| ] - | induction y as [y Hrecy| y Hrecy| ] ]; simpl in |- *; - auto; discriminate || intros H; discriminate H. + induction p; intros [q|q| ] H; simpl; auto; discriminate. +Qed. + +Lemma Pcompare_eq_Gt : + forall p q : positive, (p ?= q) Eq = Gt <-> (p ?= q) Lt = Gt. +Proof. + intros p q; split; [| apply Pcompare_Lt_Gt]. + revert q; induction p; intros [q|q| ] H; simpl; auto; discriminate. Qed. Lemma Pcompare_Lt_Lt : - forall p q:positive, (p ?= q) Lt = Lt -> (p ?= q) Eq = Lt \/ p = q. + forall p q:positive, (p ?= q) Lt = Lt -> (p ?= q) Eq = Lt \/ p = q. Proof. -intro x; induction x as [p IHp| p IHp| ]; intro y; destruct y as [q| q| ]; - simpl in |- *; auto; try discriminate; intro H2; elim (IHp q H2); - auto; intros E; rewrite E; auto. + induction p as [p IHp| p IHp| ]; intros [q|q| ] H; simpl in *; auto; + destruct (IHp q H); subst; auto. +Qed. + +Lemma Pcompare_Lt_eq_Lt : + forall p q:positive, (p ?= q) Lt = Lt <-> (p ?= q) Eq = Lt \/ p = q. +Proof. + intros p q; split; [apply Pcompare_Lt_Lt |]. + intros [H|H]; [|subst; apply Pcompare_refl_id]. + revert q H; induction p; intros [q|q| ] H; simpl in *; + auto; discriminate. Qed. Lemma Pcompare_Gt_Gt : - forall p q:positive, (p ?= q) Gt = Gt -> (p ?= q) Eq = Gt \/ p = q. + forall p q:positive, (p ?= q) Gt = Gt -> (p ?= q) Eq = Gt \/ p = q. +Proof. + induction p as [p IHp|p IHp| ]; intros [q|q| ] H; simpl in *; auto; + destruct (IHp q H); subst; auto. +Qed. + +Lemma Pcompare_Gt_eq_Gt : + forall p q:positive, (p ?= q) Gt = Gt <-> (p ?= q) Eq = Gt \/ p = q. Proof. -intro x; induction x as [p IHp| p IHp| ]; intro y; destruct y as [q| q| ]; - simpl in |- *; auto; try discriminate; intro H2; elim (IHp q H2); - auto; intros E; rewrite E; auto. + intros p q; split; [apply Pcompare_Gt_Gt |]. + intros [H|H]; [|subst; apply Pcompare_refl_id]. + revert q H; induction p; intros [q|q| ] H; simpl in *; + auto; discriminate. Qed. Lemma Dcompare : forall r:comparison, r = Eq \/ r = Lt \/ r = Gt. Proof. -simple induction r; auto. + destruct r; auto. Qed. Ltac ElimPcompare c1 c2 := elim (Dcompare ((c1 ?= c2) Eq)); - [ idtac | let x := fresh "H" in - (intro x; case x; clear x) ]. - -Theorem Pcompare_refl : forall p:positive, (p ?= p) Eq = Eq. -intro x; induction x as [x Hrecx| x Hrecx| ]; auto. -Qed. + [ idtac | let x := fresh "H" in (intro x; case x; clear x) ]. Lemma Pcompare_antisym : - forall (p q:positive) (r:comparison), - CompOpp ((p ?= q) r) = (q ?= p) (CompOpp r). + forall (p q:positive) (r:comparison), + CompOpp ((p ?= q) r) = (q ?= p) (CompOpp r). Proof. -intro x; induction x as [p IHp| p IHp| ]; intro y; - [ destruct y as [p0| p0| ] - | destruct y as [p0| p0| ] - | destruct y as [p| p| ] ]; intro r; - reflexivity || - (symmetry in |- *; assumption) || discriminate H || simpl in |- *; - apply IHp || (try rewrite IHp); try reflexivity. + induction p as [p IHp|p IHp| ]; intros [q|q| ] r; simpl; auto; + rewrite IHp; auto. Qed. Lemma ZC1 : forall p q:positive, (p ?= q) Eq = Gt -> (q ?= p) Eq = Lt. Proof. -intros; change Eq with (CompOpp Eq) in |- *. -rewrite <- Pcompare_antisym; rewrite H; reflexivity. + intros p q H; change Eq with (CompOpp Eq). + rewrite <- Pcompare_antisym, H; reflexivity. Qed. Lemma ZC2 : forall p q:positive, (p ?= q) Eq = Lt -> (q ?= p) Eq = Gt. Proof. -intros; change Eq with (CompOpp Eq) in |- *. -rewrite <- Pcompare_antisym; rewrite H; reflexivity. + intros p q H; change Eq with (CompOpp Eq). + rewrite <- Pcompare_antisym, H; reflexivity. Qed. Lemma ZC3 : forall p q:positive, (p ?= q) Eq = Eq -> (q ?= p) Eq = Eq. Proof. -intros; change Eq with (CompOpp Eq) in |- *. -rewrite <- Pcompare_antisym; rewrite H; reflexivity. + intros p q H; change Eq with (CompOpp Eq). + rewrite <- Pcompare_antisym, H; reflexivity. Qed. Lemma ZC4 : forall p q:positive, (p ?= q) Eq = CompOpp ((q ?= p) Eq). Proof. -intros; change Eq at 1 with (CompOpp Eq) in |- *. -symmetry in |- *; apply Pcompare_antisym. + intros; change Eq at 1 with (CompOpp Eq). + symmetry; apply Pcompare_antisym. +Qed. + +(** Comparison and the successor *) + +Lemma Pcompare_p_Sp : forall p : positive, (p ?= Psucc p) Eq = Lt. +Proof. + induction p; simpl in *; + [ elim (Pcompare_eq_Lt p (Psucc p)); auto | + apply Pcompare_refl_id | reflexivity]. +Qed. + +Theorem Pcompare_p_Sq : forall p q : positive, + (p ?= Psucc q) Eq = Lt <-> (p ?= q) Eq = Lt \/ p = q. +Proof. + intros p q; split. + (* -> *) + revert p q; induction p as [p IHp|p IHp| ]; intros [q|q| ] H; simpl in *; + try (left; reflexivity); try (right; reflexivity). + destruct (IHp q (Pcompare_Gt_Lt _ _ H)); subst; auto. + destruct (Pcompare_eq_Lt p q); auto. + destruct p; discriminate. + left; destruct (IHp q H); + [ elim (Pcompare_Lt_eq_Lt p q); auto | subst; apply Pcompare_refl_id]. + destruct (Pcompare_Lt_Lt p q H); subst; auto. + destruct p; discriminate. + (* <- *) + intros [H|H]; [|subst; apply Pcompare_p_Sp]. + revert q H; induction p; intros [q|q| ] H; simpl in *; + auto; try discriminate. + destruct (Pcompare_eq_Lt p (Psucc q)); auto. + apply Pcompare_Gt_Lt; auto. + destruct (Pcompare_Lt_Lt p q H); subst; auto using Pcompare_p_Sp. + destruct (Pcompare_Lt_eq_Lt p q); auto. +Qed. + +(** 1 is the least positive number *) + +Lemma Pcompare_1 : forall p, ~ (p ?= 1) Eq = Lt. +Proof. + destruct p; discriminate. +Qed. + +(** Properties of the strict order on positive numbers *) + +Lemma Plt_1 : forall p, ~ p < 1. +Proof. + exact Pcompare_1. +Qed. + +Lemma Plt_lt_succ : forall n m : positive, n < m -> n < Psucc m. +Proof. + unfold Plt; intros n m H; apply <- Pcompare_p_Sq; auto. +Qed. + +Lemma Plt_irrefl : forall p : positive, ~ p < p. +Proof. + unfold Plt; intro p; rewrite Pcompare_refl; discriminate. +Qed. + +Lemma Plt_trans : forall n m p : positive, n < m -> m < p -> n < p. +Proof. + intros n m p; induction p using Pind; intros H H0. + elim (Plt_1 _ H0). + apply Plt_lt_succ. + destruct (Pcompare_p_Sq m p) as (H',_); destruct (H' H0); subst; auto. +Qed. + +Theorem Plt_ind : forall (A : positive -> Prop) (n : positive), + A (Psucc n) -> + (forall m : positive, n < m -> A m -> A (Psucc m)) -> + forall m : positive, n < m -> A m. +Proof. + intros A n AB AS m. induction m using Pind; intros H. + elim (Plt_1 _ H). + destruct (Pcompare_p_Sq n m) as (H',_); destruct (H' H); subst; auto. Qed. (**********************************************************************) (** Properties of subtraction on binary positive numbers *) +Lemma Ppred_minus : forall p, Ppred p = Pminus p 1. +Proof. + destruct p; auto. +Qed. + +Definition Ppred_mask (p : positive_mask) := +match p with +| IsPos 1 => IsNul +| IsPos q => IsPos (Ppred q) +| IsNul => IsNeg +| IsNeg => IsNeg +end. + +Lemma Pminus_mask_succ_r : + forall p q : positive, Pminus_mask p (Psucc q) = Pminus_mask_carry p q. +Proof. + induction p ; destruct q; simpl; f_equal; auto; destruct p; auto. +Qed. + +Theorem Pminus_mask_carry_spec : + forall p q : positive, Pminus_mask_carry p q = Ppred_mask (Pminus_mask p q). +Proof. + induction p as [p IHp|p IHp| ]; destruct q; simpl; + try reflexivity; try rewrite IHp; + destruct (Pminus_mask p q) as [|[r|r| ]|] || destruct p; auto. +Qed. + +Theorem Pminus_succ_r : forall p q : positive, p - (Psucc q) = Ppred (p - q). +Proof. + intros p q; unfold Pminus; + rewrite Pminus_mask_succ_r, Pminus_mask_carry_spec. + destruct (Pminus_mask p q) as [|[r|r| ]|]; auto. +Qed. + Lemma double_eq_zero_inversion : - forall p:positive_mask, Pdouble_mask p = IsNul -> p = IsNul. + forall p:positive_mask, Pdouble_mask p = IsNul -> p = IsNul. Proof. -destruct p; simpl in |- *; [ trivial | discriminate 1 | discriminate 1 ]. + destruct p; simpl; intros; trivial; discriminate. Qed. Lemma double_plus_one_zero_discr : - forall p:positive_mask, Pdouble_plus_one_mask p <> IsNul. + forall p:positive_mask, Pdouble_plus_one_mask p <> IsNul. Proof. -simple induction p; intros; discriminate. + destruct p; discriminate. Qed. Lemma double_plus_one_eq_one_inversion : - forall p:positive_mask, Pdouble_plus_one_mask p = IsPos xH -> p = IsNul. + forall p:positive_mask, Pdouble_plus_one_mask p = IsPos 1 -> p = IsNul. Proof. -destruct p; simpl in |- *; [ trivial | discriminate 1 | discriminate 1 ]. + destruct p; simpl; intros; trivial; discriminate. Qed. Lemma double_eq_one_discr : - forall p:positive_mask, Pdouble_mask p <> IsPos xH. + forall p:positive_mask, Pdouble_mask p <> IsPos 1. Proof. -simple induction p; intros; discriminate. + destruct p; discriminate. Qed. Theorem Pminus_mask_diag : forall p:positive, Pminus_mask p p = IsNul. Proof. -intro x; induction x as [p IHp| p IHp| ]; - [ simpl in |- *; rewrite IHp; simpl in |- *; trivial - | simpl in |- *; rewrite IHp; auto - | auto ]. + induction p as [p IHp| p IHp| ]; simpl; try rewrite IHp; auto. +Qed. + +Lemma Pminus_mask_carry_diag : forall p, Pminus_mask_carry p p = IsNeg. +Proof. + induction p as [p IHp| p IHp| ]; simpl; try rewrite IHp; auto. +Qed. + +Lemma Pminus_mask_IsNeg : forall p q:positive, + Pminus_mask p q = IsNeg -> Pminus_mask_carry p q = IsNeg. +Proof. + induction p as [p IHp|p IHp| ]; intros [q|q| ] H; simpl in *; auto; + try discriminate; unfold Pdouble_mask, Pdouble_plus_one_mask in H; + specialize IHp with q. + destruct (Pminus_mask p q); try discriminate; rewrite IHp; auto. + destruct (Pminus_mask p q); simpl; auto; try discriminate. + destruct (Pminus_mask_carry p q); simpl; auto; try discriminate. + destruct (Pminus_mask p q); try discriminate; rewrite IHp; auto. Qed. Lemma ZL10 : - forall p q:positive, - Pminus_mask p q = IsPos xH -> Pminus_mask_carry p q = IsNul. -Proof. -intro x; induction x as [p| p| ]; intro y; destruct y as [q| q| ]; - simpl in |- *; intro H; try discriminate H; - [ absurd (Pdouble_mask (Pminus_mask p q) = IsPos xH); - [ apply double_eq_one_discr | assumption ] - | assert (Heq : Pminus_mask p q = IsNul); - [ apply double_plus_one_eq_one_inversion; assumption - | rewrite Heq; reflexivity ] - | assert (Heq : Pminus_mask_carry p q = IsNul); - [ apply double_plus_one_eq_one_inversion; assumption - | rewrite Heq; reflexivity ] - | absurd (Pdouble_mask (Pminus_mask p q) = IsPos xH); - [ apply double_eq_one_discr | assumption ] - | destruct p; simpl in |- *; - [ discriminate H | discriminate H | reflexivity ] ]. + forall p q:positive, + Pminus_mask p q = IsPos 1 -> Pminus_mask_carry p q = IsNul. +Proof. + induction p; intros [q|q| ] H; simpl in *; try discriminate. + elim (double_eq_one_discr _ H). + rewrite (double_plus_one_eq_one_inversion _ H); auto. + rewrite (double_plus_one_eq_one_inversion _ H); auto. + elim (double_eq_one_discr _ H). + destruct p; simpl; auto; discriminate. Qed. (** Properties of subtraction valid only for x>y *) Lemma Pminus_mask_Gt : - forall p q:positive, - (p ?= q) Eq = Gt -> + forall p q:positive, + (p ?= q) Eq = Gt -> exists h : positive, - Pminus_mask p q = IsPos h /\ - q + h = p /\ (h = xH \/ Pminus_mask_carry p q = IsPos (Ppred h)). -Proof. -intro x; induction x as [p| p| ]; intro y; destruct y as [q| q| ]; - simpl in |- *; intro H; try discriminate H. - destruct (IHp q H) as [z [H4 [H6 H7]]]; exists (xO z); split. - rewrite H4; reflexivity. - split. - simpl in |- *; rewrite H6; reflexivity. - right; clear H6; destruct (ZL11 z) as [H8| H8]; - [ rewrite H8; rewrite H8 in H4; rewrite ZL10; - [ reflexivity | assumption ] - | clear H4; destruct H7 as [H9| H9]; - [ absurd (z = xH); assumption - | rewrite H9; clear H9; destruct z as [p0| p0| ]; - [ reflexivity | reflexivity | absurd (xH = xH); trivial ] ] ]. - case Pcompare_Gt_Gt with (1 := H); - [ intros H3; elim (IHp q H3); intros z H4; exists (xI z); elim H4; - intros H5 H6; elim H6; intros H7 H8; split; - [ simpl in |- *; rewrite H5; auto - | split; - [ simpl in |- *; rewrite H7; trivial - | right; - change (Pdouble_mask (Pminus_mask p q) = IsPos (Ppred (xI z))) - in |- *; rewrite H5; auto ] ] - | intros H3; exists xH; rewrite H3; split; - [ simpl in |- *; rewrite Pminus_mask_diag; auto | split; auto ] ]. - exists (xO p); auto. - destruct (IHp q) as [z [H4 [H6 H7]]]. - apply Pcompare_Lt_Gt; assumption. - destruct (ZL11 z) as [vZ| ]; - [ exists xH; split; - [ rewrite ZL10; [ reflexivity | rewrite vZ in H4; assumption ] - | split; - [ simpl in |- *; rewrite Pplus_one_succ_r; rewrite <- vZ; - rewrite H6; trivial - | auto ] ] - | exists (xI (Ppred z)); destruct H7 as [| H8]; - [ absurd (z = xH); assumption - | split; - [ rewrite H8; trivial - | split; - [ simpl in |- *; rewrite Pplus_carry_pred_eq_plus; - [ rewrite H6; trivial | assumption ] - | right; rewrite H8; reflexivity ] ] ] ]. - destruct (IHp q H) as [z [H4 [H6 H7]]]. - exists (xO z); split; - [ rewrite H4; auto - | split; - [ simpl in |- *; rewrite H6; reflexivity - | right; - change - (Pdouble_plus_one_mask (Pminus_mask_carry p q) = - IsPos (Pdouble_minus_one z)) in |- *; - destruct (ZL11 z) as [H8| H8]; - [ rewrite H8; simpl in |- *; - assert (H9 : Pminus_mask_carry p q = IsNul); - [ apply ZL10; rewrite <- H8; assumption - | rewrite H9; reflexivity ] - | destruct H7 as [H9| H9]; - [ absurd (z = xH); auto - | rewrite H9; destruct z as [p0| p0| ]; simpl in |- *; - [ reflexivity - | reflexivity - | absurd (xH = xH); [ assumption | reflexivity ] ] ] ] ] ]. - exists (Pdouble_minus_one p); split; - [ reflexivity - | clear IHp; split; - [ destruct p; simpl in |- *; - [ reflexivity - | rewrite Psucc_o_double_minus_one_eq_xO; reflexivity - | reflexivity ] - | destruct p; [ right | right | left ]; reflexivity ] ]. + Pminus_mask p q = IsPos h /\ + q + h = p /\ (h = 1 \/ Pminus_mask_carry p q = IsPos (Ppred h)). +Proof. + induction p as [p IHp| p IHp| ]; intros [q| q| ] H; simpl in *; + try discriminate H. + (* p~1, q~1 *) + destruct (IHp q H) as (r & U & V & W); exists (r~0); rewrite ?U, ?V; auto. + repeat split; auto; right. + destruct (ZL11 r) as [EQ|NE]; [|destruct W as [|W]; [elim NE; auto|]]. + rewrite ZL10; subst; auto. + rewrite W; simpl; destruct r; auto; elim NE; auto. + (* p~1, q~0 *) + destruct (Pcompare_Gt_Gt _ _ H) as [H'|H']; clear H; rename H' into H. + destruct (IHp q H) as (r & U & V & W); exists (r~1); rewrite ?U, ?V; auto. + exists 1; subst; rewrite Pminus_mask_diag; auto. + (* p~1, 1 *) + exists (p~0); auto. + (* p~0, q~1 *) + destruct (IHp q (Pcompare_Lt_Gt _ _ H)) as (r & U & V & W). + destruct (ZL11 r) as [EQ|NE]; [|destruct W as [|W]; [elim NE; auto|]]. + exists 1; subst; rewrite ZL10, Pplus_one_succ_r; auto. + exists ((Ppred r)~1); rewrite W, Pplus_carry_pred_eq_plus, V; auto. + (* p~0, q~0 *) + destruct (IHp q H) as (r & U & V & W); exists (r~0); rewrite ?U, ?V; auto. + repeat split; auto; right. + destruct (ZL11 r) as [EQ|NE]; [|destruct W as [|W]; [elim NE; auto|]]. + rewrite ZL10; subst; auto. + rewrite W; simpl; destruct r; auto; elim NE; auto. + (* p~0, 1 *) + exists (Pdouble_minus_one p); repeat split; destruct p; simpl; auto. + rewrite Psucc_o_double_minus_one_eq_xO; auto. Qed. Theorem Pplus_minus : - forall p q:positive, (p ?= q) Eq = Gt -> q + (p - q) = p. + forall p q:positive, (p ?= q) Eq = Gt -> q + (p - q) = p. +Proof. + intros p q H; destruct (Pminus_mask_Gt p q H) as (r & U & V & _). + unfold Pminus; rewrite U; simpl; auto. +Qed. + +(** When x Pminus_mask p q = IsNeg. +Proof. + unfold Plt; induction p as [p IHp|p IHp| ]; destruct q; simpl; intros; + try discriminate; try rewrite IHp; auto. + apply Pcompare_Gt_Lt; auto. + destruct (Pcompare_Lt_Lt _ _ H). + rewrite Pminus_mask_IsNeg; simpl; auto. + subst; rewrite Pminus_mask_carry_diag; auto. +Qed. + +Lemma Pminus_Lt : forall p q:positive, p p-q = 1. Proof. -intros x y H; elim Pminus_mask_Gt with (1 := H); intros z H1; elim H1; - intros H2 H3; elim H3; intros H4 H5; unfold Pminus in |- *; - rewrite H2; exact H4. + intros; unfold Plt, Pminus; rewrite Pminus_mask_Lt; auto. Qed. + +(** The substraction of x by x returns 1 *) + +Lemma Pminus_Eq : forall p:positive, p-p = 1. +Proof. + intros; unfold Pminus; rewrite Pminus_mask_diag; auto. +Qed. + +(** Number of digits in a number *) + +Fixpoint Psize (p:positive) : nat := + match p with + | 1 => S O + | p~1 => S (Psize p) + | p~0 => S (Psize p) + end. + +Lemma Psize_monotone : forall p q, (p?=q) Eq = Lt -> (Psize p <= Psize q)%nat. +Proof. + assert (le0 : forall n, (0<=n)%nat) by (induction n; auto). + assert (leS : forall n m, (n<=m -> S n <= S m)%nat) by (induction 1; auto). + induction p; destruct q; simpl; auto; intros; try discriminate. + intros; generalize (Pcompare_Gt_Lt _ _ H); auto. + intros; destruct (Pcompare_Lt_Lt _ _ H); auto; subst; auto. +Qed. + + + + + diff --git a/theories/NArith/NArith.v b/theories/NArith/NArith.v index 019ef5f7..6ece00d7 100644 --- a/theories/NArith/NArith.v +++ b/theories/NArith/NArith.v @@ -6,11 +6,13 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: NArith.v 9210 2006-10-05 10:12:15Z barras $ *) +(* $Id: NArith.v 10751 2008-04-04 10:23:35Z herbelin $ *) (** Library for binary natural numbers *) Require Export BinPos. Require Export BinNat. +Require Export Nnat. +Require Export Ndigits. Require Export NArithRing. diff --git a/theories/NArith/Ndec.v b/theories/NArith/Ndec.v index df2da25b..5bd9a378 100644 --- a/theories/NArith/Ndec.v +++ b/theories/NArith/Ndec.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Ndec.v 8733 2006-04-25 22:52:18Z letouzey $ i*) +(*i $Id: Ndec.v 10739 2008-04-01 14:45:20Z herbelin $ i*) Require Import Bool. Require Import Sumbool. @@ -37,6 +37,13 @@ Proof. induction p; destruct p'; simpl; intros; try discriminate; auto. Qed. +Lemma Peqb_complete : forall p p', Peqb p p' = true -> p = p'. +Proof. + intros. + apply Pcompare_Eq_eq. + apply Peqb_Pcompare; auto. +Qed. + Lemma Pcompare_Peqb : forall p p', Pcompare p p' Eq = Eq -> Peqb p p' = true. Proof. intros; rewrite <- (Pcompare_Eq_eq _ _ H). @@ -208,205 +215,220 @@ Qed. (** A boolean order on [N] *) -Definition Nle (a b:N) := leb (nat_of_N a) (nat_of_N b). +Definition Nleb (a b:N) := leb (nat_of_N a) (nat_of_N b). -Lemma Nle_Ncompare : forall a b, Nle a b = true <-> Ncompare a b <> Gt. +Lemma Nleb_Nle : forall a b, Nleb a b = true <-> Nle a b. Proof. - intros; rewrite nat_of_Ncompare. - unfold Nle; apply leb_compare. + intros; unfold Nle; rewrite nat_of_Ncompare. + unfold Nleb; apply leb_compare. Qed. -Lemma Nle_refl : forall a, Nle a a = true. +Lemma Nleb_refl : forall a, Nleb a a = true. Proof. - intro. unfold Nle in |- *. apply leb_correct. apply le_n. + intro. unfold Nleb in |- *. apply leb_correct. apply le_n. Qed. -Lemma Nle_antisym : - forall a b, Nle a b = true -> Nle b a = true -> a = b. +Lemma Nleb_antisym : + forall a b, Nleb a b = true -> Nleb b a = true -> a = b. Proof. - unfold Nle in |- *. intros. rewrite <- (N_of_nat_of_N a). rewrite <- (N_of_nat_of_N b). + unfold Nleb in |- *. intros. rewrite <- (N_of_nat_of_N a). rewrite <- (N_of_nat_of_N b). rewrite (le_antisym _ _ (leb_complete _ _ H) (leb_complete _ _ H0)). reflexivity. Qed. -Lemma Nle_trans : - forall a b c, Nle a b = true -> Nle b c = true -> Nle a c = true. +Lemma Nleb_trans : + forall a b c, Nleb a b = true -> Nleb b c = true -> Nleb a c = true. Proof. - unfold Nle in |- *. intros. apply leb_correct. apply le_trans with (m := nat_of_N b). + unfold Nleb in |- *. intros. apply leb_correct. apply le_trans with (m := nat_of_N b). apply leb_complete. assumption. apply leb_complete. assumption. Qed. -Lemma Nle_lt_trans : +Lemma Nleb_ltb_trans : forall a b c, - Nle a b = true -> Nle c b = false -> Nle c a = false. + Nleb a b = true -> Nleb c b = false -> Nleb c a = false. Proof. - unfold Nle in |- *. intros. apply leb_correct_conv. apply le_lt_trans with (m := nat_of_N b). + unfold Nleb in |- *. intros. apply leb_correct_conv. apply le_lt_trans with (m := nat_of_N b). apply leb_complete. assumption. apply leb_complete_conv. assumption. Qed. -Lemma Nlt_le_trans : +Lemma Nltb_leb_trans : forall a b c, - Nle b a = false -> Nle b c = true -> Nle c a = false. + Nleb b a = false -> Nleb b c = true -> Nleb c a = false. Proof. - unfold Nle in |- *. intros. apply leb_correct_conv. apply lt_le_trans with (m := nat_of_N b). + unfold Nleb in |- *. intros. apply leb_correct_conv. apply lt_le_trans with (m := nat_of_N b). apply leb_complete_conv. assumption. apply leb_complete. assumption. Qed. -Lemma Nlt_trans : +Lemma Nltb_trans : forall a b c, - Nle b a = false -> Nle c b = false -> Nle c a = false. + Nleb b a = false -> Nleb c b = false -> Nleb c a = false. Proof. - unfold Nle in |- *. intros. apply leb_correct_conv. apply lt_trans with (m := nat_of_N b). + unfold Nleb in |- *. intros. apply leb_correct_conv. apply lt_trans with (m := nat_of_N b). apply leb_complete_conv. assumption. apply leb_complete_conv. assumption. Qed. -Lemma Nlt_le_weak : forall a b:N, Nle b a = false -> Nle a b = true. +Lemma Nltb_leb_weak : forall a b:N, Nleb b a = false -> Nleb a b = true. Proof. - unfold Nle in |- *. intros. apply leb_correct. apply lt_le_weak. + unfold Nleb in |- *. intros. apply leb_correct. apply lt_le_weak. apply leb_complete_conv. assumption. Qed. -Lemma Nle_double_mono : +Lemma Nleb_double_mono : forall a b, - Nle a b = true -> Nle (Ndouble a) (Ndouble b) = true. + Nleb a b = true -> Nleb (Ndouble a) (Ndouble b) = true. Proof. - unfold Nle in |- *. intros. rewrite nat_of_Ndouble. rewrite nat_of_Ndouble. apply leb_correct. + unfold Nleb in |- *. intros. rewrite nat_of_Ndouble. rewrite nat_of_Ndouble. apply leb_correct. simpl in |- *. apply plus_le_compat. apply leb_complete. assumption. apply plus_le_compat. apply leb_complete. assumption. apply le_n. Qed. -Lemma Nle_double_plus_one_mono : +Lemma Nleb_double_plus_one_mono : forall a b, - Nle a b = true -> - Nle (Ndouble_plus_one a) (Ndouble_plus_one b) = true. + Nleb a b = true -> + Nleb (Ndouble_plus_one a) (Ndouble_plus_one b) = true. Proof. - unfold Nle in |- *. intros. rewrite nat_of_Ndouble_plus_one. rewrite nat_of_Ndouble_plus_one. + unfold Nleb in |- *. intros. rewrite nat_of_Ndouble_plus_one. rewrite nat_of_Ndouble_plus_one. apply leb_correct. apply le_n_S. simpl in |- *. apply plus_le_compat. apply leb_complete. assumption. apply plus_le_compat. apply leb_complete. assumption. apply le_n. Qed. -Lemma Nle_double_mono_conv : +Lemma Nleb_double_mono_conv : forall a b, - Nle (Ndouble a) (Ndouble b) = true -> Nle a b = true. + Nleb (Ndouble a) (Ndouble b) = true -> Nleb a b = true. Proof. - unfold Nle in |- *. intros a b. rewrite nat_of_Ndouble. rewrite nat_of_Ndouble. intro. + unfold Nleb in |- *. intros a b. rewrite nat_of_Ndouble. rewrite nat_of_Ndouble. intro. apply leb_correct. apply (mult_S_le_reg_l 1). apply leb_complete. assumption. Qed. -Lemma Nle_double_plus_one_mono_conv : +Lemma Nleb_double_plus_one_mono_conv : forall a b, - Nle (Ndouble_plus_one a) (Ndouble_plus_one b) = true -> - Nle a b = true. + Nleb (Ndouble_plus_one a) (Ndouble_plus_one b) = true -> + Nleb a b = true. Proof. - unfold Nle in |- *. intros a b. rewrite nat_of_Ndouble_plus_one. rewrite nat_of_Ndouble_plus_one. + unfold Nleb in |- *. intros a b. rewrite nat_of_Ndouble_plus_one. rewrite nat_of_Ndouble_plus_one. intro. apply leb_correct. apply (mult_S_le_reg_l 1). apply le_S_n. apply leb_complete. assumption. Qed. -Lemma Nlt_double_mono : +Lemma Nltb_double_mono : forall a b, - Nle a b = false -> Nle (Ndouble a) (Ndouble b) = false. + Nleb a b = false -> Nleb (Ndouble a) (Ndouble b) = false. Proof. - intros. elim (sumbool_of_bool (Nle (Ndouble a) (Ndouble b))). intro H0. - rewrite (Nle_double_mono_conv _ _ H0) in H. discriminate H. + intros. elim (sumbool_of_bool (Nleb (Ndouble a) (Ndouble b))). intro H0. + rewrite (Nleb_double_mono_conv _ _ H0) in H. discriminate H. trivial. Qed. -Lemma Nlt_double_plus_one_mono : +Lemma Nltb_double_plus_one_mono : forall a b, - Nle a b = false -> - Nle (Ndouble_plus_one a) (Ndouble_plus_one b) = false. + Nleb a b = false -> + Nleb (Ndouble_plus_one a) (Ndouble_plus_one b) = false. Proof. - intros. elim (sumbool_of_bool (Nle (Ndouble_plus_one a) (Ndouble_plus_one b))). intro H0. - rewrite (Nle_double_plus_one_mono_conv _ _ H0) in H. discriminate H. + intros. elim (sumbool_of_bool (Nleb (Ndouble_plus_one a) (Ndouble_plus_one b))). intro H0. + rewrite (Nleb_double_plus_one_mono_conv _ _ H0) in H. discriminate H. trivial. Qed. -Lemma Nlt_double_mono_conv : +Lemma Nltb_double_mono_conv : forall a b, - Nle (Ndouble a) (Ndouble b) = false -> Nle a b = false. + Nleb (Ndouble a) (Ndouble b) = false -> Nleb a b = false. Proof. - intros. elim (sumbool_of_bool (Nle a b)). intro H0. rewrite (Nle_double_mono _ _ H0) in H. + intros. elim (sumbool_of_bool (Nleb a b)). intro H0. rewrite (Nleb_double_mono _ _ H0) in H. discriminate H. trivial. Qed. -Lemma Nlt_double_plus_one_mono_conv : +Lemma Nltb_double_plus_one_mono_conv : forall a b, - Nle (Ndouble_plus_one a) (Ndouble_plus_one b) = false -> - Nle a b = false. + Nleb (Ndouble_plus_one a) (Ndouble_plus_one b) = false -> + Nleb a b = false. Proof. - intros. elim (sumbool_of_bool (Nle a b)). intro H0. - rewrite (Nle_double_plus_one_mono _ _ H0) in H. discriminate H. + intros. elim (sumbool_of_bool (Nleb a b)). intro H0. + rewrite (Nleb_double_plus_one_mono _ _ H0) in H. discriminate H. trivial. Qed. -(* A [min] function over [N] *) +(* An alternate [min] function over [N] *) -Definition Nmin (a b:N) := if Nle a b then a else b. +Definition Nmin' (a b:N) := if Nleb a b then a else b. + +Lemma Nmin_Nmin' : forall a b, Nmin a b = Nmin' a b. +Proof. + unfold Nmin, Nmin', Nleb; intros. + rewrite nat_of_Ncompare. + generalize (leb_compare (nat_of_N a) (nat_of_N b)); + destruct (nat_compare (nat_of_N a) (nat_of_N b)); + destruct (leb (nat_of_N a) (nat_of_N b)); intuition. + lapply H1; intros; discriminate. + lapply H1; intros; discriminate. +Qed. Lemma Nmin_choice : forall a b, {Nmin a b = a} + {Nmin a b = b}. Proof. - unfold Nmin in |- *. intros. elim (sumbool_of_bool (Nle a b)). intro H. left. rewrite H. - reflexivity. - intro H. right. rewrite H. reflexivity. + unfold Nmin in *; intros; destruct (Ncompare a b); auto. Qed. -Lemma Nmin_le_1 : forall a b, Nle (Nmin a b) a = true. +Lemma Nmin_le_1 : forall a b, Nleb (Nmin a b) a = true. Proof. - unfold Nmin in |- *. intros. elim (sumbool_of_bool (Nle a b)). intro H. rewrite H. - apply Nle_refl. - intro H. rewrite H. apply Nlt_le_weak. assumption. + intros; rewrite Nmin_Nmin'. + unfold Nmin'; elim (sumbool_of_bool (Nleb a b)). intro H. rewrite H. + apply Nleb_refl. + intro H. rewrite H. apply Nltb_leb_weak. assumption. Qed. -Lemma Nmin_le_2 : forall a b, Nle (Nmin a b) b = true. +Lemma Nmin_le_2 : forall a b, Nleb (Nmin a b) b = true. Proof. - unfold Nmin in |- *. intros. elim (sumbool_of_bool (Nle a b)). intro H. rewrite H. assumption. - intro H. rewrite H. apply Nle_refl. + intros; rewrite Nmin_Nmin'. + unfold Nmin'; elim (sumbool_of_bool (Nleb a b)). intro H. rewrite H. assumption. + intro H. rewrite H. apply Nleb_refl. Qed. Lemma Nmin_le_3 : - forall a b c, Nle a (Nmin b c) = true -> Nle a b = true. + forall a b c, Nleb a (Nmin b c) = true -> Nleb a b = true. Proof. - unfold Nmin in |- *. intros. elim (sumbool_of_bool (Nle b c)). intro H0. rewrite H0 in H. + intros; rewrite Nmin_Nmin' in *. + unfold Nmin' in *; elim (sumbool_of_bool (Nleb b c)). intro H0. rewrite H0 in H. assumption. - intro H0. rewrite H0 in H. apply Nlt_le_weak. apply Nle_lt_trans with (b := c); assumption. + intro H0. rewrite H0 in H. apply Nltb_leb_weak. apply Nleb_ltb_trans with (b := c); assumption. Qed. Lemma Nmin_le_4 : - forall a b c, Nle a (Nmin b c) = true -> Nle a c = true. + forall a b c, Nleb a (Nmin b c) = true -> Nleb a c = true. Proof. - unfold Nmin in |- *. intros. elim (sumbool_of_bool (Nle b c)). intro H0. rewrite H0 in H. - apply Nle_trans with (b := b); assumption. + intros; rewrite Nmin_Nmin' in *. + unfold Nmin' in *; elim (sumbool_of_bool (Nleb b c)). intro H0. rewrite H0 in H. + apply Nleb_trans with (b := b); assumption. intro H0. rewrite H0 in H. assumption. Qed. Lemma Nmin_le_5 : forall a b c, - Nle a b = true -> Nle a c = true -> Nle a (Nmin b c) = true. + Nleb a b = true -> Nleb a c = true -> Nleb a (Nmin b c) = true. Proof. intros. elim (Nmin_choice b c). intro H1. rewrite H1. assumption. intro H1. rewrite H1. assumption. Qed. Lemma Nmin_lt_3 : - forall a b c, Nle (Nmin b c) a = false -> Nle b a = false. + forall a b c, Nleb (Nmin b c) a = false -> Nleb b a = false. Proof. - unfold Nmin in |- *. intros. elim (sumbool_of_bool (Nle b c)). intro H0. rewrite H0 in H. + intros; rewrite Nmin_Nmin' in *. + unfold Nmin' in *. intros. elim (sumbool_of_bool (Nleb b c)). intro H0. rewrite H0 in H. assumption. - intro H0. rewrite H0 in H. apply Nlt_trans with (b := c); assumption. + intro H0. rewrite H0 in H. apply Nltb_trans with (b := c); assumption. Qed. Lemma Nmin_lt_4 : - forall a b c, Nle (Nmin b c) a = false -> Nle c a = false. + forall a b c, Nleb (Nmin b c) a = false -> Nleb c a = false. Proof. - unfold Nmin in |- *. intros. elim (sumbool_of_bool (Nle b c)). intro H0. rewrite H0 in H. - apply Nlt_le_trans with (b := b); assumption. + intros; rewrite Nmin_Nmin' in *. + unfold Nmin' in *. elim (sumbool_of_bool (Nleb b c)). intro H0. rewrite H0 in H. + apply Nltb_leb_trans with (b := b); assumption. intro H0. rewrite H0 in H. assumption. Qed. diff --git a/theories/NArith/Ndigits.v b/theories/NArith/Ndigits.v index ed8ced5b..dcdb5f92 100644 --- a/theories/NArith/Ndigits.v +++ b/theories/NArith/Ndigits.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Ndigits.v 8736 2006-04-26 21:18:44Z letouzey $ i*) +(*i $Id: Ndigits.v 10739 2008-04-01 14:45:20Z herbelin $ i*) Require Import Bool. Require Import Bvector. @@ -577,13 +577,6 @@ Qed. (** Number of digits in a number *) -Fixpoint Psize (p:positive) : nat := - match p with - | xH => 1%nat - | xI p => S (Psize p) - | xO p => S (Psize p) - end. - Definition Nsize (n:N) : nat := match n with | N0 => 0%nat | Npos p => Psize p diff --git a/theories/NArith/Ndist.v b/theories/NArith/Ndist.v index d5bfc15c..af90b8e7 100644 --- a/theories/NArith/Ndist.v +++ b/theories/NArith/Ndist.v @@ -5,7 +5,7 @@ (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Ndist.v 8733 2006-04-25 22:52:18Z letouzey $ i*) +(*i $Id: Ndist.v 10739 2008-04-01 14:45:20Z herbelin $ i*) Require Import Arith. Require Import Min. diff --git a/theories/NArith/Nnat.v b/theories/NArith/Nnat.v index 94f50bd0..bc3711ee 100644 --- a/theories/NArith/Nnat.v +++ b/theories/NArith/Nnat.v @@ -6,15 +6,21 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Nnat.v 9551 2007-01-29 15:13:35Z bgregoir $ i*) +(*i $Id: Nnat.v 10739 2008-04-01 14:45:20Z herbelin $ i*) Require Import Arith_base. Require Import Compare_dec. Require Import Sumbool. Require Import Div2. +Require Import Min. +Require Import Max. Require Import BinPos. Require Import BinNat. +Require Import BinInt. Require Import Pnat. +Require Import Zmax. +Require Import Zmin. +Require Import Znat. (** Translation from [N] to [nat] and back. *) @@ -108,6 +114,30 @@ Proof. apply N_of_nat_of_N. Qed. +Lemma nat_of_Nminus : + forall a a', nat_of_N (Nminus a a') = ((nat_of_N a)-(nat_of_N a'))%nat. +Proof. + destruct a; destruct a'; simpl; auto with arith. + case_eq (Pcompare p p0 Eq); simpl; intros. + rewrite (Pcompare_Eq_eq _ _ H); auto with arith. + rewrite Pminus_mask_diag. simpl. apply minus_n_n. + rewrite Pminus_mask_Lt. pose proof (nat_of_P_lt_Lt_compare_morphism _ _ H). simpl. + symmetry; apply not_le_minus_0. auto with arith. assumption. + pose proof (Pminus_mask_Gt p p0 H) as H1. destruct H1 as [q [H1 _]]. rewrite H1; simpl. + replace q with (Pminus p p0) by (unfold Pminus; now rewrite H1). + apply nat_of_P_minus_morphism; auto. +Qed. + +Lemma N_of_minus : + forall n n', N_of_nat (n-n') = Nminus (N_of_nat n) (N_of_nat n'). +Proof. + intros. + pattern n at 1; rewrite <- (nat_of_N_of_nat n). + pattern n' at 1; rewrite <- (nat_of_N_of_nat n'). + rewrite <- nat_of_Nminus. + apply N_of_nat_of_N. +Qed. + Lemma nat_of_Nmult : forall a a', nat_of_N (Nmult a a') = (nat_of_N a)*(nat_of_N a'). Proof. @@ -175,3 +205,176 @@ Proof. pattern n' at 1; rewrite <- (nat_of_N_of_nat n'). symmetry; apply nat_of_Ncompare. Qed. + +Lemma nat_of_Nmin : + forall a a', nat_of_N (Nmin a a') = min (nat_of_N a) (nat_of_N a'). +Proof. + intros; unfold Nmin; rewrite nat_of_Ncompare. + unfold nat_compare. + destruct (lt_eq_lt_dec (nat_of_N a) (nat_of_N a')) as [[|]|]; + simpl; intros; symmetry; auto with arith. + apply min_l; rewrite e; auto with arith. +Qed. + +Lemma N_of_min : + forall n n', N_of_nat (min n n') = Nmin (N_of_nat n) (N_of_nat n'). +Proof. + intros. + pattern n at 1; rewrite <- (nat_of_N_of_nat n). + pattern n' at 1; rewrite <- (nat_of_N_of_nat n'). + rewrite <- nat_of_Nmin. + apply N_of_nat_of_N. +Qed. + +Lemma nat_of_Nmax : + forall a a', nat_of_N (Nmax a a') = max (nat_of_N a) (nat_of_N a'). +Proof. + intros; unfold Nmax; rewrite nat_of_Ncompare. + unfold nat_compare. + destruct (lt_eq_lt_dec (nat_of_N a) (nat_of_N a')) as [[|]|]; + simpl; intros; symmetry; auto with arith. + apply max_r; rewrite e; auto with arith. +Qed. + +Lemma N_of_max : + forall n n', N_of_nat (max n n') = Nmax (N_of_nat n) (N_of_nat n'). +Proof. + intros. + pattern n at 1; rewrite <- (nat_of_N_of_nat n). + pattern n' at 1; rewrite <- (nat_of_N_of_nat n'). + rewrite <- nat_of_Nmax. + apply N_of_nat_of_N. +Qed. + +(** Properties concerning [Z_of_N] *) + +Lemma Z_of_nat_of_N : forall n:N, Z_of_nat (nat_of_N n) = Z_of_N n. +Proof. + destruct n; simpl; auto; symmetry; apply Zpos_eq_Z_of_nat_o_nat_of_P. +Qed. + +Lemma Z_of_N_eq : forall n m, n = m -> Z_of_N n = Z_of_N m. +Proof. + intros; f_equal; assumption. +Qed. + +Lemma Z_of_N_eq_rev : forall n m, Z_of_N n = Z_of_N m -> n = m. +Proof. + intros [|n] [|m]; simpl; intros; try discriminate; congruence. +Qed. + +Lemma Z_of_N_eq_iff : forall n m, n = m <-> Z_of_N n = Z_of_N m. +Proof. + split; [apply Z_of_N_eq | apply Z_of_N_eq_rev]. +Qed. + +Lemma Z_of_N_le : forall n m, (n<=m)%N -> (Z_of_N n <= Z_of_N m)%Z. +Proof. + intros [|n] [|m]; simpl; auto. +Qed. + +Lemma Z_of_N_le_rev : forall n m, (Z_of_N n <= Z_of_N m)%Z -> (n<=m)%N. +Proof. + intros [|n] [|m]; simpl; auto. +Qed. + +Lemma Z_of_N_le_iff : forall n m, (n<=m)%N <-> (Z_of_N n <= Z_of_N m)%Z. +Proof. + split; [apply Z_of_N_le | apply Z_of_N_le_rev]. +Qed. + +Lemma Z_of_N_lt : forall n m, (n (Z_of_N n < Z_of_N m)%Z. +Proof. + intros [|n] [|m]; simpl; auto. +Qed. + +Lemma Z_of_N_lt_rev : forall n m, (Z_of_N n < Z_of_N m)%Z -> (n (Z_of_N n < Z_of_N m)%Z. +Proof. + split; [apply Z_of_N_lt | apply Z_of_N_lt_rev]. +Qed. + +Lemma Z_of_N_ge : forall n m, (n>=m)%N -> (Z_of_N n >= Z_of_N m)%Z. +Proof. + intros [|n] [|m]; simpl; auto. +Qed. + +Lemma Z_of_N_ge_rev : forall n m, (Z_of_N n >= Z_of_N m)%Z -> (n>=m)%N. +Proof. + intros [|n] [|m]; simpl; auto. +Qed. + +Lemma Z_of_N_ge_iff : forall n m, (n>=m)%N <-> (Z_of_N n >= Z_of_N m)%Z. +Proof. + split; [apply Z_of_N_ge | apply Z_of_N_ge_rev]. +Qed. + +Lemma Z_of_N_gt : forall n m, (n>m)%N -> (Z_of_N n > Z_of_N m)%Z. +Proof. + intros [|n] [|m]; simpl; auto. +Qed. + +Lemma Z_of_N_gt_rev : forall n m, (Z_of_N n > Z_of_N m)%Z -> (n>m)%N. +Proof. + intros [|n] [|m]; simpl; auto. +Qed. + +Lemma Z_of_N_gt_iff : forall n m, (n>m)%N <-> (Z_of_N n > Z_of_N m)%Z. +Proof. + split; [apply Z_of_N_gt | apply Z_of_N_gt_rev]. +Qed. + +Lemma Z_of_N_of_nat : forall n:nat, Z_of_N (N_of_nat n) = Z_of_nat n. +Proof. + destruct n; simpl; auto. +Qed. + +Lemma Z_of_N_pos : forall p:positive, Z_of_N (Npos p) = Zpos p. +Proof. + destruct p; simpl; auto. +Qed. + +Lemma Z_of_N_abs : forall z:Z, Z_of_N (Zabs_N z) = Zabs z. +Proof. + destruct z; simpl; auto. +Qed. + +Lemma Z_of_N_le_0 : forall n, (0 <= Z_of_N n)%Z. +Proof. + destruct n; intro; discriminate. +Qed. + +Lemma Z_of_N_plus : forall n m:N, Z_of_N (n+m) = (Z_of_N n + Z_of_N m)%Z. +Proof. + destruct n; destruct m; auto. +Qed. + +Lemma Z_of_N_mult : forall n m:N, Z_of_N (n*m) = (Z_of_N n * Z_of_N m)%Z. +Proof. + destruct n; destruct m; auto. +Qed. + +Lemma Z_of_N_minus : forall n m:N, Z_of_N (n-m) = Zmax 0 (Z_of_N n - Z_of_N m). +Proof. + intros; do 3 rewrite <- Z_of_nat_of_N; rewrite nat_of_Nminus; apply inj_minus. +Qed. + +Lemma Z_of_N_succ : forall n:N, Z_of_N (Nsucc n) = Zsucc (Z_of_N n). +Proof. + intros; do 2 rewrite <- Z_of_nat_of_N; rewrite nat_of_Nsucc; apply inj_S. +Qed. + +Lemma Z_of_N_min : forall n m:N, Z_of_N (Nmin n m) = Zmin (Z_of_N n) (Z_of_N m). +Proof. + intros; do 3 rewrite <- Z_of_nat_of_N; rewrite nat_of_Nmin; apply inj_min. +Qed. + +Lemma Z_of_N_max : forall n m:N, Z_of_N (Nmax n m) = Zmax (Z_of_N n) (Z_of_N m). +Proof. + intros; do 3 rewrite <- Z_of_nat_of_N; rewrite nat_of_Nmax; apply inj_max. +Qed. + diff --git a/theories/NArith/Pnat.v b/theories/NArith/Pnat.v index 88abc700..2c007398 100644 --- a/theories/NArith/Pnat.v +++ b/theories/NArith/Pnat.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Pnat.v 5920 2004-07-16 20:01:26Z herbelin $ i*) +(*i $Id: Pnat.v 9883 2007-06-07 18:44:59Z letouzey $ i*) Require Import BinPos. @@ -14,7 +14,7 @@ Require Import BinPos. (** Properties of the injection from binary positive numbers to Peano natural numbers *) -(** Original development by Pierre Crégut, CNET, Lannion, France *) +(** Original development by Pierre Crégut, CNET, Lannion, France *) Require Import Le. Require Import Lt. diff --git a/theories/Numbers/BigNumPrelude.v b/theories/Numbers/BigNumPrelude.v new file mode 100644 index 00000000..9669eacd --- /dev/null +++ b/theories/Numbers/BigNumPrelude.v @@ -0,0 +1,372 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* n<>0. +Proof. + auto with zarith. +Qed. + +Definition Zdiv_mult_cancel_r a b c H := Zdiv.Zdiv_mult_cancel_r a b c (Zlt0_not_eq _ H). +Definition Zdiv_mult_cancel_l a b c H := Zdiv.Zdiv_mult_cancel_r a b c (Zlt0_not_eq _ H). +Definition Z_div_plus_l a b c H := Zdiv.Z_div_plus_full_l a b c (Zlt0_not_eq _ H). + +(* Automation *) + +Hint Extern 2 (Zle _ _) => + (match goal with + |- Zpos _ <= Zpos _ => exact (refl_equal _) +| H: _ <= ?p |- _ <= ?p => apply Zle_trans with (2 := H) +| H: _ < ?p |- _ <= ?p => apply Zlt_le_weak; apply Zle_lt_trans with (2 := H) + end). + +Hint Extern 2 (Zlt _ _) => + (match goal with + |- Zpos _ < Zpos _ => exact (refl_equal _) +| H: _ <= ?p |- _ <= ?p => apply Zlt_le_trans with (2 := H) +| H: _ < ?p |- _ <= ?p => apply Zle_lt_trans with (2 := H) + end). + + +Hint Resolve Zlt_gt Zle_ge Z_div_pos: zarith. + +(************************************** + Properties of order and product + **************************************) + + Theorem beta_lex: forall a b c d beta, + a * beta + b <= c * beta + d -> + 0 <= b < beta -> 0 <= d < beta -> + a <= c. + Proof. + intros a b c d beta H1 (H3, H4) (H5, H6). + assert (a - c < 1); auto with zarith. + apply Zmult_lt_reg_r with beta; auto with zarith. + apply Zle_lt_trans with (d - b); auto with zarith. + rewrite Zmult_minus_distr_r; auto with zarith. + Qed. + + Theorem beta_lex_inv: forall a b c d beta, + a < c -> 0 <= b < beta -> + 0 <= d < beta -> + a * beta + b < c * beta + d. + Proof. + intros a b c d beta H1 (H3, H4) (H5, H6). + case (Zle_or_lt (c * beta + d) (a * beta + b)); auto with zarith. + intros H7; contradict H1;apply Zle_not_lt;apply beta_lex with (1 := H7);auto. + Qed. + + Lemma beta_mult : forall h l beta, + 0 <= h < beta -> 0 <= l < beta -> 0 <= h*beta+l < beta^2. + Proof. + intros h l beta H1 H2;split. auto with zarith. + rewrite <- (Zplus_0_r (beta^2)); rewrite Zpower_2; + apply beta_lex_inv;auto with zarith. + Qed. + + Lemma Zmult_lt_b : + forall b x y, 0 <= x < b -> 0 <= y < b -> 0 <= x * y <= b^2 - 2*b + 1. + Proof. + intros b x y (Hx1,Hx2) (Hy1,Hy2);split;auto with zarith. + apply Zle_trans with ((b-1)*(b-1)). + apply Zmult_le_compat;auto with zarith. + apply Zeq_le;ring. + Qed. + + Lemma sum_mul_carry : forall xh xl yh yl wc cc beta, + 1 < beta -> + 0 <= wc < beta -> + 0 <= xh < beta -> + 0 <= xl < beta -> + 0 <= yh < beta -> + 0 <= yl < beta -> + 0 <= cc < beta^2 -> + wc*beta^2 + cc = xh*yl + xl*yh -> + 0 <= wc <= 1. + Proof. + intros xh xl yh yl wc cc beta U H1 H2 H3 H4 H5 H6 H7. + assert (H8 := Zmult_lt_b beta xh yl H2 H5). + assert (H9 := Zmult_lt_b beta xl yh H3 H4). + split;auto with zarith. + apply beta_lex with (cc) (beta^2 - 2) (beta^2); auto with zarith. + Qed. + + Theorem mult_add_ineq: forall x y cross beta, + 0 <= x < beta -> + 0 <= y < beta -> + 0 <= cross < beta -> + 0 <= x * y + cross < beta^2. + Proof. + intros x y cross beta HH HH1 HH2. + split; auto with zarith. + apply Zle_lt_trans with ((beta-1)*(beta-1)+(beta-1)); auto with zarith. + apply Zplus_le_compat; auto with zarith. + apply Zmult_le_compat; auto with zarith. + repeat (rewrite Zmult_minus_distr_l || rewrite Zmult_minus_distr_r); + rewrite Zpower_2; auto with zarith. + Qed. + + Theorem mult_add_ineq2: forall x y c cross beta, + 0 <= x < beta -> + 0 <= y < beta -> + 0 <= c*beta + cross <= 2*beta - 2 -> + 0 <= x * y + (c*beta + cross) < beta^2. + Proof. + intros x y c cross beta HH HH1 HH2. + split; auto with zarith. + apply Zle_lt_trans with ((beta-1)*(beta-1)+(2*beta-2));auto with zarith. + apply Zplus_le_compat; auto with zarith. + apply Zmult_le_compat; auto with zarith. + repeat (rewrite Zmult_minus_distr_l || rewrite Zmult_minus_distr_r); + rewrite Zpower_2; auto with zarith. + Qed. + +Theorem mult_add_ineq3: forall x y c cross beta, + 0 <= x < beta -> + 0 <= y < beta -> + 0 <= cross <= beta - 2 -> + 0 <= c <= 1 -> + 0 <= x * y + (c*beta + cross) < beta^2. + Proof. + intros x y c cross beta HH HH1 HH2 HH3. + apply mult_add_ineq2;auto with zarith. + split;auto with zarith. + apply Zle_trans with (1*beta+cross);auto with zarith. + Qed. + +Hint Rewrite Zmult_1_r Zmult_0_r Zmult_1_l Zmult_0_l Zplus_0_l Zplus_0_r Zminus_0_r: rm10. + + +(************************************** + Properties of Zdiv and Zmod +**************************************) + +Theorem Zmod_le_first: forall a b, 0 <= a -> 0 < b -> 0 <= a mod b <= a. + Proof. + intros a b H H1;case (Z_mod_lt a b);auto with zarith;intros H2 H3;split;auto. + case (Zle_or_lt b a); intros H4; auto with zarith. + rewrite Zmod_small; auto with zarith. + Qed. + + + Theorem Zmod_distr: forall a b r t, 0 <= a <= b -> 0 <= r -> 0 <= t < 2 ^a -> + (2 ^a * r + t) mod (2 ^ b) = (2 ^a * r) mod (2 ^ b) + t. + Proof. + intros a b r t (H1, H2) H3 (H4, H5). + assert (t < 2 ^ b). + apply Zlt_le_trans with (1:= H5); auto with zarith. + apply Zpower_le_monotone; auto with zarith. + rewrite Zplus_mod; auto with zarith. + rewrite Zmod_small with (a := t); auto with zarith. + apply Zmod_small; auto with zarith. + split; auto with zarith. + assert (0 <= 2 ^a * r); auto with zarith. + apply Zplus_le_0_compat; auto with zarith. + match goal with |- context [?X mod ?Y] => case (Z_mod_lt X Y) end; + auto with zarith. + pattern (2 ^ b) at 2; replace (2 ^ b) with ((2 ^ b - 2 ^a) + 2 ^ a); + try ring. + apply Zplus_le_lt_compat; auto with zarith. + replace b with ((b - a) + a); try ring. + rewrite Zpower_exp; auto with zarith. + pattern (2 ^a) at 4; rewrite <- (Zmult_1_l (2 ^a)); + try rewrite <- Zmult_minus_distr_r. + rewrite (Zmult_comm (2 ^(b - a))); rewrite Zmult_mod_distr_l; + auto with zarith. + rewrite (Zmult_comm (2 ^a)); apply Zmult_le_compat_r; auto with zarith. + match goal with |- context [?X mod ?Y] => case (Z_mod_lt X Y) end; + auto with zarith. + Qed. + + Theorem Zmod_shift_r: + forall a b r t, 0 <= a <= b -> 0 <= r -> 0 <= t < 2 ^a -> + (r * 2 ^a + t) mod (2 ^ b) = (r * 2 ^a) mod (2 ^ b) + t. + Proof. + intros a b r t (H1, H2) H3 (H4, H5). + assert (t < 2 ^ b). + apply Zlt_le_trans with (1:= H5); auto with zarith. + apply Zpower_le_monotone; auto with zarith. + rewrite Zplus_mod; auto with zarith. + rewrite Zmod_small with (a := t); auto with zarith. + apply Zmod_small; auto with zarith. + split; auto with zarith. + assert (0 <= 2 ^a * r); auto with zarith. + apply Zplus_le_0_compat; auto with zarith. + match goal with |- context [?X mod ?Y] => case (Z_mod_lt X Y) end; + auto with zarith. + pattern (2 ^ b) at 2;replace (2 ^ b) with ((2 ^ b - 2 ^a) + 2 ^ a); try ring. + apply Zplus_le_lt_compat; auto with zarith. + replace b with ((b - a) + a); try ring. + rewrite Zpower_exp; auto with zarith. + pattern (2 ^a) at 4; rewrite <- (Zmult_1_l (2 ^a)); + try rewrite <- Zmult_minus_distr_r. + repeat rewrite (fun x => Zmult_comm x (2 ^ a)); rewrite Zmult_mod_distr_l; + auto with zarith. + apply Zmult_le_compat_l; auto with zarith. + match goal with |- context [?X mod ?Y] => case (Z_mod_lt X Y) end; + auto with zarith. + Qed. + + Theorem Zdiv_shift_r: + forall a b r t, 0 <= a <= b -> 0 <= r -> 0 <= t < 2 ^a -> + (r * 2 ^a + t) / (2 ^ b) = (r * 2 ^a) / (2 ^ b). + Proof. + intros a b r t (H1, H2) H3 (H4, H5). + assert (Eq: t < 2 ^ b); auto with zarith. + apply Zlt_le_trans with (1 := H5); auto with zarith. + apply Zpower_le_monotone; auto with zarith. + pattern (r * 2 ^ a) at 1; rewrite Z_div_mod_eq with (b := 2 ^ b); + auto with zarith. + rewrite <- Zplus_assoc. + rewrite <- Zmod_shift_r; auto with zarith. + rewrite (Zmult_comm (2 ^ b)); rewrite Z_div_plus_full_l; auto with zarith. + rewrite (fun x y => @Zdiv_small (x mod y)); auto with zarith. + match goal with |- context [?X mod ?Y] => case (Z_mod_lt X Y) end; + auto with zarith. + Qed. + + + Lemma shift_unshift_mod : forall n p a, + 0 <= a < 2^n -> + 0 <= p <= n -> + a * 2^p = a / 2^(n - p) * 2^n + (a*2^p) mod 2^n. + Proof. + intros n p a H1 H2. + pattern (a*2^p) at 1;replace (a*2^p) with + (a*2^p/2^n * 2^n + a*2^p mod 2^n). + 2:symmetry;rewrite (Zmult_comm (a*2^p/2^n));apply Z_div_mod_eq. + replace (a * 2 ^ p / 2 ^ n) with (a / 2 ^ (n - p));trivial. + replace (2^n) with (2^(n-p)*2^p). + symmetry;apply Zdiv_mult_cancel_r. + destruct H1;trivial. + cut (0 < 2^p); auto with zarith. + rewrite <- Zpower_exp. + replace (n-p+p) with n;trivial. ring. + omega. omega. + apply Zlt_gt. apply Zpower_gt_0;auto with zarith. + Qed. + + + Lemma shift_unshift_mod_2 : forall n p a, (0<=p<=n)%Z -> + ((a * 2 ^ (n - p)) mod (2^n) / 2 ^ (n - p)) mod (2^n) = + a mod 2 ^ p. + Proof. + intros. + rewrite Zmod_small. + rewrite Zmod_eq by (auto with zarith). + unfold Zminus at 1. + rewrite Z_div_plus_l by (auto with zarith). + assert (2^n = 2^(n-p)*2^p). + rewrite <- Zpower_exp by (auto with zarith). + replace (n-p+p) with n; auto with zarith. + rewrite H0. + rewrite <- Zdiv_Zdiv, Z_div_mult by (auto with zarith). + rewrite (Zmult_comm (2^(n-p))), Zmult_assoc. + rewrite Zopp_mult_distr_l. + rewrite Z_div_mult by (auto with zarith). + symmetry; apply Zmod_eq; auto with zarith. + + remember (a * 2 ^ (n - p)) as b. + destruct (Z_mod_lt b (2^n)); auto with zarith. + split. + apply Z_div_pos; auto with zarith. + apply Zdiv_lt_upper_bound; auto with zarith. + apply Zlt_le_trans with (2^n); auto with zarith. + rewrite <- (Zmult_1_r (2^n)) at 1. + apply Zmult_le_compat; auto with zarith. + cut (0 < 2 ^ (n-p)); auto with zarith. + Qed. + + Lemma div_le_0 : forall p x, 0 <= x -> 0 <= x / 2 ^ p. + Proof. + intros p x Hle;destruct (Z_le_gt_dec 0 p). + apply Zdiv_le_lower_bound;auto with zarith. + replace (2^p) with 0. + destruct x;compute;intro;discriminate. + destruct p;trivial;discriminate z. + Qed. + + Lemma div_lt : forall p x y, 0 <= x < y -> x / 2^p < y. + Proof. + intros p x y H;destruct (Z_le_gt_dec 0 p). + apply Zdiv_lt_upper_bound;auto with zarith. + apply Zlt_le_trans with y;auto with zarith. + rewrite <- (Zmult_1_r y);apply Zmult_le_compat;auto with zarith. + assert (0 < 2^p);auto with zarith. + replace (2^p) with 0. + destruct x;change (0 (0 < Zgcd a b)%Z -> (0 < b / Zgcd a b)%Z. + Proof. + intros a b Ha Hg. + case (Zle_lt_or_eq 0 (b/Zgcd a b)); auto. + apply Z_div_pos; auto with zarith. + intros H; generalize Ha. + pattern b at 1; rewrite (Zdivide_Zdiv_eq (Zgcd a b) b); auto. + rewrite <- H; auto with zarith. + assert (F := (Zgcd_is_gcd a b)); inversion F; auto. + Qed. + +Theorem Zbounded_induction : + (forall Q : Z -> Prop, forall b : Z, + Q 0 -> + (forall n, 0 <= n -> n < b - 1 -> Q n -> Q (n + 1)) -> + forall n, 0 <= n -> n < b -> Q n)%Z. +Proof. +intros Q b Q0 QS. +set (Q' := fun n => (n < b /\ Q n) \/ (b <= n)). +assert (H : forall n, 0 <= n -> Q' n). +apply natlike_rec2; unfold Q'. +destruct (Zle_or_lt b 0) as [H | H]. now right. left; now split. +intros n H IH. destruct IH as [[IH1 IH2] | IH]. +destruct (Zle_or_lt (b - 1) n) as [H1 | H1]. +right; auto with zarith. +left. split; [auto with zarith | now apply (QS n)]. +right; auto with zarith. +unfold Q' in *; intros n H1 H2. destruct (H n H1) as [[H3 H4] | H3]. +assumption. apply Zle_not_lt in H3. false_hyp H2 H3. +Qed. + +Lemma Zsquare_le : forall x, x <= x*x. +Proof. +intros. +destruct (Z_lt_le_dec 0 x). +pattern x at 1; rewrite <- (Zmult_1_l x). +apply Zmult_le_compat; auto with zarith. +apply Zle_trans with 0; auto with zarith. +rewrite <- Zmult_opp_opp. +apply Zmult_le_0_compat; auto with zarith. +Qed. diff --git a/theories/Numbers/Cyclic/Abstract/CyclicAxioms.v b/theories/Numbers/Cyclic/Abstract/CyclicAxioms.v new file mode 100644 index 00000000..528d78c3 --- /dev/null +++ b/theories/Numbers/Cyclic/Abstract/CyclicAxioms.v @@ -0,0 +1,375 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Z; + znz_of_pos : positive -> N * znz; (* Euclidean division by [2^digits] *) + znz_head0 : znz -> znz; (* number of digits 0 in front of the number *) + znz_tail0 : znz -> znz; (* number of digits 0 at the bottom of the number *) + + (* Basic numbers *) + znz_0 : znz; + znz_1 : znz; + znz_Bm1 : znz; (* [2^digits-1], which is equivalent to [-1] *) + + (* Comparison *) + znz_compare : znz -> znz -> comparison; + znz_eq0 : znz -> bool; + + (* Basic arithmetic operations *) + znz_opp_c : znz -> carry znz; + znz_opp : znz -> znz; + znz_opp_carry : znz -> znz; (* the carry is known to be -1 *) + + znz_succ_c : znz -> carry znz; + znz_add_c : znz -> znz -> carry znz; + znz_add_carry_c : znz -> znz -> carry znz; + znz_succ : znz -> znz; + znz_add : znz -> znz -> znz; + znz_add_carry : znz -> znz -> znz; + + znz_pred_c : znz -> carry znz; + znz_sub_c : znz -> znz -> carry znz; + znz_sub_carry_c : znz -> znz -> carry znz; + znz_pred : znz -> znz; + znz_sub : znz -> znz -> znz; + znz_sub_carry : znz -> znz -> znz; + + znz_mul_c : znz -> znz -> zn2z znz; + znz_mul : znz -> znz -> znz; + znz_square_c : znz -> zn2z znz; + + (* Special divisions operations *) + znz_div21 : znz -> znz -> znz -> znz*znz; + znz_div_gt : znz -> znz -> znz * znz; (* specialized version of [znz_div] *) + znz_div : znz -> znz -> znz * znz; + + znz_mod_gt : znz -> znz -> znz; (* specialized version of [znz_mod] *) + znz_mod : znz -> znz -> znz; + + znz_gcd_gt : znz -> znz -> znz; (* specialized version of [znz_gcd] *) + znz_gcd : znz -> znz -> znz; + (* [znz_add_mul_div p i j] is a combination of the [(digits-p)] + low bits of [i] above the [p] high bits of [j]: + [znz_add_mul_div p i j = i*2^p+j/2^(digits-p)] *) + znz_add_mul_div : znz -> znz -> znz -> znz; + (* [znz_pos_mod p i] is [i mod 2^p] *) + znz_pos_mod : znz -> znz -> znz; + + znz_is_even : znz -> bool; + (* square root *) + znz_sqrt2 : znz -> znz -> znz * carry znz; + znz_sqrt : znz -> znz }. + +End Z_nZ_Op. + +Section Z_nZ_Spec. + Variable w : Type. + Variable w_op : znz_op w. + + Let w_digits := w_op.(znz_digits). + Let w_zdigits := w_op.(znz_zdigits). + Let w_to_Z := w_op.(znz_to_Z). + Let w_of_pos := w_op.(znz_of_pos). + Let w_head0 := w_op.(znz_head0). + Let w_tail0 := w_op.(znz_tail0). + + Let w0 := w_op.(znz_0). + Let w1 := w_op.(znz_1). + Let wBm1 := w_op.(znz_Bm1). + + Let w_compare := w_op.(znz_compare). + Let w_eq0 := w_op.(znz_eq0). + + Let w_opp_c := w_op.(znz_opp_c). + Let w_opp := w_op.(znz_opp). + Let w_opp_carry := w_op.(znz_opp_carry). + + Let w_succ_c := w_op.(znz_succ_c). + Let w_add_c := w_op.(znz_add_c). + Let w_add_carry_c := w_op.(znz_add_carry_c). + Let w_succ := w_op.(znz_succ). + Let w_add := w_op.(znz_add). + Let w_add_carry := w_op.(znz_add_carry). + + Let w_pred_c := w_op.(znz_pred_c). + Let w_sub_c := w_op.(znz_sub_c). + Let w_sub_carry_c := w_op.(znz_sub_carry_c). + Let w_pred := w_op.(znz_pred). + Let w_sub := w_op.(znz_sub). + Let w_sub_carry := w_op.(znz_sub_carry). + + Let w_mul_c := w_op.(znz_mul_c). + Let w_mul := w_op.(znz_mul). + Let w_square_c := w_op.(znz_square_c). + + Let w_div21 := w_op.(znz_div21). + Let w_div_gt := w_op.(znz_div_gt). + Let w_div := w_op.(znz_div). + + Let w_mod_gt := w_op.(znz_mod_gt). + Let w_mod := w_op.(znz_mod). + + Let w_gcd_gt := w_op.(znz_gcd_gt). + Let w_gcd := w_op.(znz_gcd). + + Let w_add_mul_div := w_op.(znz_add_mul_div). + + Let w_pos_mod := w_op.(znz_pos_mod). + + Let w_is_even := w_op.(znz_is_even). + Let w_sqrt2 := w_op.(znz_sqrt2). + Let w_sqrt := w_op.(znz_sqrt). + + Notation "[| x |]" := (w_to_Z x) (at level 0, x at level 99). + + Let wB := base w_digits. + + Notation "[+| c |]" := + (interp_carry 1 wB w_to_Z c) (at level 0, x at level 99). + + Notation "[-| c |]" := + (interp_carry (-1) wB w_to_Z c) (at level 0, x at level 99). + + Notation "[|| x ||]" := + (zn2z_to_Z wB w_to_Z x) (at level 0, x at level 99). + + Record znz_spec := mk_znz_spec { + + (* Conversion functions with Z *) + spec_to_Z : forall x, 0 <= [| x |] < wB; + spec_of_pos : forall p, + Zpos p = (Z_of_N (fst (w_of_pos p)))*wB + [|(snd (w_of_pos p))|]; + spec_zdigits : [| w_zdigits |] = Zpos w_digits; + spec_more_than_1_digit: 1 < Zpos w_digits; + + (* Basic numbers *) + spec_0 : [|w0|] = 0; + spec_1 : [|w1|] = 1; + spec_Bm1 : [|wBm1|] = wB - 1; + + (* Comparison *) + spec_compare : + forall x y, + match w_compare x y with + | Eq => [|x|] = [|y|] + | Lt => [|x|] < [|y|] + | Gt => [|x|] > [|y|] + end; + spec_eq0 : forall x, w_eq0 x = true -> [|x|] = 0; + (* Basic arithmetic operations *) + spec_opp_c : forall x, [-|w_opp_c x|] = -[|x|]; + spec_opp : forall x, [|w_opp x|] = (-[|x|]) mod wB; + spec_opp_carry : forall x, [|w_opp_carry x|] = wB - [|x|] - 1; + + spec_succ_c : forall x, [+|w_succ_c x|] = [|x|] + 1; + spec_add_c : forall x y, [+|w_add_c x y|] = [|x|] + [|y|]; + spec_add_carry_c : forall x y, [+|w_add_carry_c x y|] = [|x|] + [|y|] + 1; + spec_succ : forall x, [|w_succ x|] = ([|x|] + 1) mod wB; + spec_add : forall x y, [|w_add x y|] = ([|x|] + [|y|]) mod wB; + spec_add_carry : + forall x y, [|w_add_carry x y|] = ([|x|] + [|y|] + 1) mod wB; + + spec_pred_c : forall x, [-|w_pred_c x|] = [|x|] - 1; + spec_sub_c : forall x y, [-|w_sub_c x y|] = [|x|] - [|y|]; + spec_sub_carry_c : forall x y, [-|w_sub_carry_c x y|] = [|x|] - [|y|] - 1; + spec_pred : forall x, [|w_pred x|] = ([|x|] - 1) mod wB; + spec_sub : forall x y, [|w_sub x y|] = ([|x|] - [|y|]) mod wB; + spec_sub_carry : + forall x y, [|w_sub_carry x y|] = ([|x|] - [|y|] - 1) mod wB; + + spec_mul_c : forall x y, [|| w_mul_c x y ||] = [|x|] * [|y|]; + spec_mul : forall x y, [|w_mul x y|] = ([|x|] * [|y|]) mod wB; + spec_square_c : forall x, [|| w_square_c x||] = [|x|] * [|x|]; + + (* Special divisions operations *) + spec_div21 : forall a1 a2 b, + wB/2 <= [|b|] -> + [|a1|] < [|b|] -> + let (q,r) := w_div21 a1 a2 b in + [|a1|] *wB+ [|a2|] = [|q|] * [|b|] + [|r|] /\ + 0 <= [|r|] < [|b|]; + spec_div_gt : forall a b, [|a|] > [|b|] -> 0 < [|b|] -> + let (q,r) := w_div_gt a b in + [|a|] = [|q|] * [|b|] + [|r|] /\ + 0 <= [|r|] < [|b|]; + spec_div : forall a b, 0 < [|b|] -> + let (q,r) := w_div a b in + [|a|] = [|q|] * [|b|] + [|r|] /\ + 0 <= [|r|] < [|b|]; + + spec_mod_gt : forall a b, [|a|] > [|b|] -> 0 < [|b|] -> + [|w_mod_gt a b|] = [|a|] mod [|b|]; + spec_mod : forall a b, 0 < [|b|] -> + [|w_mod a b|] = [|a|] mod [|b|]; + + spec_gcd_gt : forall a b, [|a|] > [|b|] -> + Zis_gcd [|a|] [|b|] [|w_gcd_gt a b|]; + spec_gcd : forall a b, Zis_gcd [|a|] [|b|] [|w_gcd a b|]; + + + (* shift operations *) + spec_head00: forall x, [|x|] = 0 -> [|w_head0 x|] = Zpos w_digits; + spec_head0 : forall x, 0 < [|x|] -> + wB/ 2 <= 2 ^ ([|w_head0 x|]) * [|x|] < wB; + spec_tail00: forall x, [|x|] = 0 -> [|w_tail0 x|] = Zpos w_digits; + spec_tail0 : forall x, 0 < [|x|] -> + exists y, 0 <= y /\ [|x|] = (2 * y + 1) * (2 ^ [|w_tail0 x|]) ; + spec_add_mul_div : forall x y p, + [|p|] <= Zpos w_digits -> + [| w_add_mul_div p x y |] = + ([|x|] * (2 ^ [|p|]) + + [|y|] / (2 ^ ((Zpos w_digits) - [|p|]))) mod wB; + spec_pos_mod : forall w p, + [|w_pos_mod p w|] = [|w|] mod (2 ^ [|p|]); + (* sqrt *) + spec_is_even : forall x, + if w_is_even x then [|x|] mod 2 = 0 else [|x|] mod 2 = 1; + spec_sqrt2 : forall x y, + wB/ 4 <= [|x|] -> + let (s,r) := w_sqrt2 x y in + [||WW x y||] = [|s|] ^ 2 + [+|r|] /\ + [+|r|] <= 2 * [|s|]; + spec_sqrt : forall x, + [|w_sqrt x|] ^ 2 <= [|x|] < ([|w_sqrt x|] + 1) ^ 2 + }. + +End Z_nZ_Spec. + +(** Generic construction of double words *) + +Section WW. + + Variable w : Type. + Variable w_op : znz_op w. + Variable op_spec : znz_spec w_op. + + Let wB := base w_op.(znz_digits). + Let w_to_Z := w_op.(znz_to_Z). + Let w_eq0 := w_op.(znz_eq0). + Let w_0 := w_op.(znz_0). + + Definition znz_W0 h := + if w_eq0 h then W0 else WW h w_0. + + Definition znz_0W l := + if w_eq0 l then W0 else WW w_0 l. + + Definition znz_WW h l := + if w_eq0 h then znz_0W l else WW h l. + + Lemma spec_W0 : forall h, + zn2z_to_Z wB w_to_Z (znz_W0 h) = (w_to_Z h)*wB. + Proof. + unfold zn2z_to_Z, znz_W0, w_to_Z; simpl; intros. + case_eq (w_eq0 h); intros. + rewrite (op_spec.(spec_eq0) _ H); auto. + unfold w_0; rewrite op_spec.(spec_0); auto with zarith. + Qed. + + Lemma spec_0W : forall l, + zn2z_to_Z wB w_to_Z (znz_0W l) = w_to_Z l. + Proof. + unfold zn2z_to_Z, znz_0W, w_to_Z; simpl; intros. + case_eq (w_eq0 l); intros. + rewrite (op_spec.(spec_eq0) _ H); auto. + unfold w_0; rewrite op_spec.(spec_0); auto with zarith. + Qed. + + Lemma spec_WW : forall h l, + zn2z_to_Z wB w_to_Z (znz_WW h l) = (w_to_Z h)*wB + w_to_Z l. + Proof. + unfold znz_WW, w_to_Z; simpl; intros. + case_eq (w_eq0 h); intros. + rewrite (op_spec.(spec_eq0) _ H); auto. + rewrite spec_0W; auto. + simpl; auto. + Qed. + +End WW. + +(** Injecting [Z] numbers into a cyclic structure *) + +Section znz_of_pos. + + Variable w : Type. + Variable w_op : znz_op w. + Variable op_spec : znz_spec w_op. + + Notation "[| x |]" := (znz_to_Z w_op x) (at level 0, x at level 99). + + Definition znz_of_Z (w:Type) (op:znz_op w) z := + match z with + | Zpos p => snd (op.(znz_of_pos) p) + | _ => op.(znz_0) + end. + + Theorem znz_of_pos_correct: + forall p, Zpos p < base (znz_digits w_op) -> [|(snd (znz_of_pos w_op p))|] = Zpos p. + intros p Hp. + generalize (spec_of_pos op_spec p). + case (znz_of_pos w_op p); intros n w1; simpl. + case n; simpl Npos; auto with zarith. + intros p1 Hp1; contradict Hp; apply Zle_not_lt. + rewrite Hp1; auto with zarith. + match goal with |- _ <= ?X + ?Y => + apply Zle_trans with X; auto with zarith + end. + match goal with |- ?X <= _ => + pattern X at 1; rewrite <- (Zmult_1_l); + apply Zmult_le_compat_r; auto with zarith + end. + case p1; simpl; intros; red; simpl; intros; discriminate. + unfold base; auto with zarith. + case (spec_to_Z op_spec w1); auto with zarith. + Qed. + + Theorem znz_of_Z_correct: + forall p, 0 <= p < base (znz_digits w_op) -> [|znz_of_Z w_op p|] = p. + intros p; case p; simpl; try rewrite spec_0; auto. + intros; rewrite znz_of_pos_correct; auto with zarith. + intros p1 (H1, _); contradict H1; apply Zlt_not_le; red; simpl; auto. + Qed. +End znz_of_pos. + + +(** A modular specification grouping the earlier records. *) + +Module Type CyclicType. + Parameter w : Type. + Parameter w_op : znz_op w. + Parameter w_spec : znz_spec w_op. +End CyclicType. diff --git a/theories/Numbers/Cyclic/Abstract/NZCyclic.v b/theories/Numbers/Cyclic/Abstract/NZCyclic.v new file mode 100644 index 00000000..22f6d95b --- /dev/null +++ b/theories/Numbers/Cyclic/Abstract/NZCyclic.v @@ -0,0 +1,236 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Z := znz_to_Z w_op. +Definition Z_to_NZ : Z -> NZ := znz_of_Z w_op. +Notation Local wB := (base w_op.(znz_digits)). + +Notation Local "[| x |]" := (w_op.(znz_to_Z) x) (at level 0, x at level 99). + +Definition NZeq (n m : NZ) := [| n |] = [| m |]. +Definition NZ0 := w_op.(znz_0). +Definition NZsucc := w_op.(znz_succ). +Definition NZpred := w_op.(znz_pred). +Definition NZadd := w_op.(znz_add). +Definition NZsub := w_op.(znz_sub). +Definition NZmul := w_op.(znz_mul). + +Theorem NZeq_equiv : equiv NZ NZeq. +Proof. +unfold equiv, reflexive, symmetric, transitive, NZeq; repeat split; intros; auto. +now transitivity [| y |]. +Qed. + +Add Relation NZ NZeq + reflexivity proved by (proj1 NZeq_equiv) + symmetry proved by (proj2 (proj2 NZeq_equiv)) + transitivity proved by (proj1 (proj2 NZeq_equiv)) +as NZeq_rel. + +Add Morphism NZsucc with signature NZeq ==> NZeq as NZsucc_wd. +Proof. +unfold NZeq; intros n m H. do 2 rewrite w_spec.(spec_succ). now rewrite H. +Qed. + +Add Morphism NZpred with signature NZeq ==> NZeq as NZpred_wd. +Proof. +unfold NZeq; intros n m H. do 2 rewrite w_spec.(spec_pred). now rewrite H. +Qed. + +Add Morphism NZadd with signature NZeq ==> NZeq ==> NZeq as NZadd_wd. +Proof. +unfold NZeq; intros n1 n2 H1 m1 m2 H2. do 2 rewrite w_spec.(spec_add). +now rewrite H1, H2. +Qed. + +Add Morphism NZsub with signature NZeq ==> NZeq ==> NZeq as NZsub_wd. +Proof. +unfold NZeq; intros n1 n2 H1 m1 m2 H2. do 2 rewrite w_spec.(spec_sub). +now rewrite H1, H2. +Qed. + +Add Morphism NZmul with signature NZeq ==> NZeq ==> NZeq as NZmul_wd. +Proof. +unfold NZeq; intros n1 n2 H1 m1 m2 H2. do 2 rewrite w_spec.(spec_mul). +now rewrite H1, H2. +Qed. + +Delimit Scope IntScope with Int. +Bind Scope IntScope with NZ. +Open Local Scope IntScope. +Notation "x == y" := (NZeq x y) (at level 70) : IntScope. +Notation "x ~= y" := (~ NZeq x y) (at level 70) : IntScope. +Notation "0" := NZ0 : IntScope. +Notation "'S'" := NZsucc : IntScope. +Notation "'P'" := NZpred : IntScope. +(*Notation "1" := (S 0) : IntScope.*) +Notation "x + y" := (NZadd x y) : IntScope. +Notation "x - y" := (NZsub x y) : IntScope. +Notation "x * y" := (NZmul x y) : IntScope. + +Theorem gt_wB_1 : 1 < wB. +Proof. +unfold base. +apply Zpower_gt_1; unfold Zlt; auto with zarith. +Qed. + +Theorem gt_wB_0 : 0 < wB. +Proof. +pose proof gt_wB_1; auto with zarith. +Qed. + +Lemma NZsucc_mod_wB : forall n : Z, (n + 1) mod wB = ((n mod wB) + 1) mod wB. +Proof. +intro n. +pattern 1 at 2. replace 1 with (1 mod wB). rewrite <- Zplus_mod. +reflexivity. +now rewrite Zmod_small; [ | split; [auto with zarith | apply gt_wB_1]]. +Qed. + +Lemma NZpred_mod_wB : forall n : Z, (n - 1) mod wB = ((n mod wB) - 1) mod wB. +Proof. +intro n. +pattern 1 at 2. replace 1 with (1 mod wB). rewrite <- Zminus_mod. +reflexivity. +now rewrite Zmod_small; [ | split; [auto with zarith | apply gt_wB_1]]. +Qed. + +Lemma NZ_to_Z_mod : forall n : NZ, [| n |] mod wB = [| n |]. +Proof. +intro n; rewrite Zmod_small. reflexivity. apply w_spec.(spec_to_Z). +Qed. + +Theorem NZpred_succ : forall n : NZ, P (S n) == n. +Proof. +intro n; unfold NZsucc, NZpred, NZeq. rewrite w_spec.(spec_pred), w_spec.(spec_succ). +rewrite <- NZpred_mod_wB. +replace ([| n |] + 1 - 1)%Z with [| n |] by auto with zarith. apply NZ_to_Z_mod. +Qed. + +Lemma Z_to_NZ_0 : Z_to_NZ 0%Z == 0%Int. +Proof. +unfold NZeq, NZ_to_Z, Z_to_NZ. rewrite znz_of_Z_correct. +symmetry; apply w_spec.(spec_0). +exact w_spec. split; [auto with zarith |apply gt_wB_0]. +Qed. + +Section Induction. + +Variable A : NZ -> Prop. +Hypothesis A_wd : predicate_wd NZeq A. +Hypothesis A0 : A 0. +Hypothesis AS : forall n : NZ, A n <-> A (S n). (* Below, we use only -> direction *) + +Add Morphism A with signature NZeq ==> iff as A_morph. +Proof. apply A_wd. Qed. + +Let B (n : Z) := A (Z_to_NZ n). + +Lemma B0 : B 0. +Proof. +unfold B. now rewrite Z_to_NZ_0. +Qed. + +Lemma BS : forall n : Z, 0 <= n -> n < wB - 1 -> B n -> B (n + 1). +Proof. +intros n H1 H2 H3. +unfold B in *. apply -> AS in H3. +setoid_replace (Z_to_NZ (n + 1)) with (S (Z_to_NZ n)) using relation NZeq. assumption. +unfold NZeq. rewrite w_spec.(spec_succ). +unfold NZ_to_Z, Z_to_NZ. +do 2 (rewrite znz_of_Z_correct; [ | exact w_spec | auto with zarith]). +symmetry; apply Zmod_small; auto with zarith. +Qed. + +Lemma B_holds : forall n : Z, 0 <= n < wB -> B n. +Proof. +intros n [H1 H2]. +apply Zbounded_induction with wB. +apply B0. apply BS. assumption. assumption. +Qed. + +Theorem NZinduction : forall n : NZ, A n. +Proof. +intro n. setoid_replace n with (Z_to_NZ (NZ_to_Z n)) using relation NZeq. +apply B_holds. apply w_spec.(spec_to_Z). +unfold NZeq, NZ_to_Z, Z_to_NZ; rewrite znz_of_Z_correct. +reflexivity. +exact w_spec. +apply w_spec.(spec_to_Z). +Qed. + +End Induction. + +Theorem NZadd_0_l : forall n : NZ, 0 + n == n. +Proof. +intro n; unfold NZadd, NZ0, NZeq. rewrite w_spec.(spec_add). rewrite w_spec.(spec_0). +rewrite Zplus_0_l. rewrite Zmod_small; [reflexivity | apply w_spec.(spec_to_Z)]. +Qed. + +Theorem NZadd_succ_l : forall n m : NZ, (S n) + m == S (n + m). +Proof. +intros n m; unfold NZadd, NZsucc, NZeq. rewrite w_spec.(spec_add). +do 2 rewrite w_spec.(spec_succ). rewrite w_spec.(spec_add). +rewrite NZsucc_mod_wB. repeat rewrite Zplus_mod_idemp_l; try apply gt_wB_0. +rewrite <- (Zplus_assoc ([| n |] mod wB) 1 [| m |]). rewrite Zplus_mod_idemp_l. +rewrite (Zplus_comm 1 [| m |]); now rewrite Zplus_assoc. +Qed. + +Theorem NZsub_0_r : forall n : NZ, n - 0 == n. +Proof. +intro n; unfold NZsub, NZ0, NZeq. rewrite w_spec.(spec_sub). +rewrite w_spec.(spec_0). rewrite Zminus_0_r. apply NZ_to_Z_mod. +Qed. + +Theorem NZsub_succ_r : forall n m : NZ, n - (S m) == P (n - m). +Proof. +intros n m; unfold NZsub, NZsucc, NZpred, NZeq. +rewrite w_spec.(spec_pred). do 2 rewrite w_spec.(spec_sub). +rewrite w_spec.(spec_succ). rewrite Zminus_mod_idemp_r. +rewrite Zminus_mod_idemp_l. +now replace ([|n|] - ([|m|] + 1))%Z with ([|n|] - [|m|] - 1)%Z by auto with zarith. +Qed. + +Theorem NZmul_0_l : forall n : NZ, 0 * n == 0. +Proof. +intro n; unfold NZmul, NZ0, NZ, NZeq. rewrite w_spec.(spec_mul). +rewrite w_spec.(spec_0). now rewrite Zmult_0_l. +Qed. + +Theorem NZmul_succ_l : forall n m : NZ, (S n) * m == n * m + m. +Proof. +intros n m; unfold NZmul, NZsucc, NZadd, NZeq. rewrite w_spec.(spec_mul). +rewrite w_spec.(spec_add), w_spec.(spec_mul), w_spec.(spec_succ). +rewrite Zplus_mod_idemp_l, Zmult_mod_idemp_l. +now rewrite Zmult_plus_distr_l, Zmult_1_l. +Qed. + +End NZCyclicAxiomsMod. diff --git a/theories/Numbers/Cyclic/DoubleCyclic/DoubleAdd.v b/theories/Numbers/Cyclic/DoubleCyclic/DoubleAdd.v new file mode 100644 index 00000000..61d8d0fb --- /dev/null +++ b/theories/Numbers/Cyclic/DoubleCyclic/DoubleAdd.v @@ -0,0 +1,318 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* w -> zn2z w. + Variable w_W0 : w -> zn2z w. + Variable ww_1 : zn2z w. + Variable w_succ_c : w -> carry w. + Variable w_add_c : w -> w -> carry w. + Variable w_add_carry_c : w -> w -> carry w. + Variable w_succ : w -> w. + Variable w_add : w -> w -> w. + Variable w_add_carry : w -> w -> w. + + Definition ww_succ_c x := + match x with + | W0 => C0 ww_1 + | WW xh xl => + match w_succ_c xl with + | C0 l => C0 (WW xh l) + | C1 l => + match w_succ_c xh with + | C0 h => C0 (WW h w_0) + | C1 h => C1 W0 + end + end + end. + + Definition ww_succ x := + match x with + | W0 => ww_1 + | WW xh xl => + match w_succ_c xl with + | C0 l => WW xh l + | C1 l => w_W0 (w_succ xh) + end + end. + + Definition ww_add_c x y := + match x, y with + | W0, _ => C0 y + | _, W0 => C0 x + | WW xh xl, WW yh yl => + match w_add_c xl yl with + | C0 l => + match w_add_c xh yh with + | C0 h => C0 (WW h l) + | C1 h => C1 (w_WW h l) + end + | C1 l => + match w_add_carry_c xh yh with + | C0 h => C0 (WW h l) + | C1 h => C1 (w_WW h l) + end + end + end. + + Variable R : Type. + Variable f0 f1 : zn2z w -> R. + + Definition ww_add_c_cont x y := + match x, y with + | W0, _ => f0 y + | _, W0 => f0 x + | WW xh xl, WW yh yl => + match w_add_c xl yl with + | C0 l => + match w_add_c xh yh with + | C0 h => f0 (WW h l) + | C1 h => f1 (w_WW h l) + end + | C1 l => + match w_add_carry_c xh yh with + | C0 h => f0 (WW h l) + | C1 h => f1 (w_WW h l) + end + end + end. + + (* ww_add et ww_add_carry conserve la forme normale s'il n'y a pas + de debordement *) + Definition ww_add x y := + match x, y with + | W0, _ => y + | _, W0 => x + | WW xh xl, WW yh yl => + match w_add_c xl yl with + | C0 l => WW (w_add xh yh) l + | C1 l => WW (w_add_carry xh yh) l + end + end. + + Definition ww_add_carry_c x y := + match x, y with + | W0, W0 => C0 ww_1 + | W0, WW yh yl => ww_succ_c (WW yh yl) + | WW xh xl, W0 => ww_succ_c (WW xh xl) + | WW xh xl, WW yh yl => + match w_add_carry_c xl yl with + | C0 l => + match w_add_c xh yh with + | C0 h => C0 (WW h l) + | C1 h => C1 (WW h l) + end + | C1 l => + match w_add_carry_c xh yh with + | C0 h => C0 (WW h l) + | C1 h => C1 (w_WW h l) + end + end + end. + + Definition ww_add_carry x y := + match x, y with + | W0, W0 => ww_1 + | W0, WW yh yl => ww_succ (WW yh yl) + | WW xh xl, W0 => ww_succ (WW xh xl) + | WW xh xl, WW yh yl => + match w_add_carry_c xl yl with + | C0 l => WW (w_add xh yh) l + | C1 l => WW (w_add_carry xh yh) l + end + end. + + (*Section DoubleProof.*) + Variable w_digits : positive. + Variable w_to_Z : w -> Z. + + + Notation wB := (base w_digits). + Notation wwB := (base (ww_digits w_digits)). + Notation "[| x |]" := (w_to_Z x) (at level 0, x at level 99). + Notation "[+| c |]" := + (interp_carry 1 wB w_to_Z c) (at level 0, x at level 99). + Notation "[-| c |]" := + (interp_carry (-1) wB w_to_Z c) (at level 0, x at level 99). + + Notation "[[ x ]]" := (ww_to_Z w_digits w_to_Z x)(at level 0, x at level 99). + Notation "[+[ c ]]" := + (interp_carry 1 wwB (ww_to_Z w_digits w_to_Z) c) + (at level 0, x at level 99). + Notation "[-[ c ]]" := + (interp_carry (-1) wwB (ww_to_Z w_digits w_to_Z) c) + (at level 0, x at level 99). + + Variable spec_w_0 : [|w_0|] = 0. + Variable spec_w_1 : [|w_1|] = 1. + Variable spec_ww_1 : [[ww_1]] = 1. + Variable spec_to_Z : forall x, 0 <= [|x|] < wB. + Variable spec_w_WW : forall h l, [[w_WW h l]] = [|h|] * wB + [|l|]. + Variable spec_w_W0 : forall h, [[w_W0 h]] = [|h|] * wB. + Variable spec_w_succ_c : forall x, [+|w_succ_c x|] = [|x|] + 1. + Variable spec_w_add_c : forall x y, [+|w_add_c x y|] = [|x|] + [|y|]. + Variable spec_w_add_carry_c : + forall x y, [+|w_add_carry_c x y|] = [|x|] + [|y|] + 1. + Variable spec_w_succ : forall x, [|w_succ x|] = ([|x|] + 1) mod wB. + Variable spec_w_add : forall x y, [|w_add x y|] = ([|x|] + [|y|]) mod wB. + Variable spec_w_add_carry : + forall x y, [|w_add_carry x y|] = ([|x|] + [|y|] + 1) mod wB. + + Lemma spec_ww_succ_c : forall x, [+[ww_succ_c x]] = [[x]] + 1. + Proof. + destruct x as [ |xh xl];simpl. apply spec_ww_1. + generalize (spec_w_succ_c xl);destruct (w_succ_c xl) as [l|l]; + intro H;unfold interp_carry in H. simpl;rewrite H;ring. + rewrite <- Zplus_assoc;rewrite <- H;rewrite Zmult_1_l. + assert ([|l|] = 0). generalize (spec_to_Z xl)(spec_to_Z l);omega. + rewrite H0;generalize (spec_w_succ_c xh);destruct (w_succ_c xh) as [h|h]; + intro H1;unfold interp_carry in H1. + simpl;rewrite H1;rewrite spec_w_0;ring. + unfold interp_carry;simpl ww_to_Z;rewrite wwB_wBwB. + assert ([|xh|] = wB - 1). generalize (spec_to_Z xh)(spec_to_Z h);omega. + rewrite H2;ring. + Qed. + + Lemma spec_ww_add_c : forall x y, [+[ww_add_c x y]] = [[x]] + [[y]]. + Proof. + destruct x as [ |xh xl];simpl;trivial. + destruct y as [ |yh yl];simpl. rewrite Zplus_0_r;trivial. + replace ([|xh|] * wB + [|xl|] + ([|yh|] * wB + [|yl|])) + with (([|xh|]+[|yh|])*wB + ([|xl|]+[|yl|])). 2:ring. + generalize (spec_w_add_c xl yl);destruct (w_add_c xl yl) as [l|l]; + intros H;unfold interp_carry in H;rewrite <- H. + generalize (spec_w_add_c xh yh);destruct (w_add_c xh yh) as [h|h]; + intros H1;unfold interp_carry in *;rewrite <- H1. trivial. + repeat rewrite Zmult_1_l;rewrite spec_w_WW;rewrite wwB_wBwB; ring. + rewrite Zplus_assoc;rewrite <- Zmult_plus_distr_l. + generalize (spec_w_add_carry_c xh yh);destruct (w_add_carry_c xh yh) + as [h|h]; intros H1;unfold interp_carry in *;rewrite <- H1. + simpl;ring. + repeat rewrite Zmult_1_l;rewrite wwB_wBwB;rewrite spec_w_WW;ring. + Qed. + + Section Cont. + Variable P : zn2z w -> zn2z w -> R -> Prop. + Variable x y : zn2z w. + Variable spec_f0 : forall r, [[r]] = [[x]] + [[y]] -> P x y (f0 r). + Variable spec_f1 : forall r, wwB + [[r]] = [[x]] + [[y]] -> P x y (f1 r). + + Lemma spec_ww_add_c_cont : P x y (ww_add_c_cont x y). + Proof. + destruct x as [ |xh xl];simpl;trivial. + apply spec_f0;trivial. + destruct y as [ |yh yl];simpl. + apply spec_f0;simpl;rewrite Zplus_0_r;trivial. + generalize (spec_w_add_c xl yl);destruct (w_add_c xl yl) as [l|l]; + intros H;unfold interp_carry in H. + generalize (spec_w_add_c xh yh);destruct (w_add_c xh yh) as [h|h]; + intros H1;unfold interp_carry in *. + apply spec_f0. simpl;rewrite H;rewrite H1;ring. + apply spec_f1. simpl;rewrite spec_w_WW;rewrite H. + rewrite Zplus_assoc;rewrite wwB_wBwB. rewrite Zpower_2; rewrite <- Zmult_plus_distr_l. + rewrite Zmult_1_l in H1;rewrite H1;ring. + generalize (spec_w_add_carry_c xh yh);destruct (w_add_carry_c xh yh) + as [h|h]; intros H1;unfold interp_carry in *. + apply spec_f0;simpl;rewrite H1. rewrite Zmult_plus_distr_l. + rewrite <- Zplus_assoc;rewrite H;ring. + apply spec_f1. simpl;rewrite spec_w_WW;rewrite wwB_wBwB. + rewrite Zplus_assoc; rewrite Zpower_2; rewrite <- Zmult_plus_distr_l. + rewrite Zmult_1_l in H1;rewrite H1. rewrite Zmult_plus_distr_l. + rewrite <- Zplus_assoc;rewrite H;ring. + Qed. + + End Cont. + + Lemma spec_ww_add_carry_c : + forall x y, [+[ww_add_carry_c x y]] = [[x]] + [[y]] + 1. + Proof. + destruct x as [ |xh xl];intro y;simpl. + exact (spec_ww_succ_c y). + destruct y as [ |yh yl];simpl. + rewrite Zplus_0_r;exact (spec_ww_succ_c (WW xh xl)). + replace ([|xh|] * wB + [|xl|] + ([|yh|] * wB + [|yl|]) + 1) + with (([|xh|]+[|yh|])*wB + ([|xl|]+[|yl|]+1)). 2:ring. + generalize (spec_w_add_carry_c xl yl);destruct (w_add_carry_c xl yl) + as [l|l];intros H;unfold interp_carry in H;rewrite <- H. + generalize (spec_w_add_c xh yh);destruct (w_add_c xh yh) as [h|h]; + intros H1;unfold interp_carry in H1;rewrite <- H1. trivial. + unfold interp_carry;repeat rewrite Zmult_1_l;simpl;rewrite wwB_wBwB;ring. + rewrite Zplus_assoc;rewrite <- Zmult_plus_distr_l. + generalize (spec_w_add_carry_c xh yh);destruct (w_add_carry_c xh yh) + as [h|h];intros H1;unfold interp_carry in H1;rewrite <- H1. trivial. + unfold interp_carry;rewrite spec_w_WW; + repeat rewrite Zmult_1_l;simpl;rewrite wwB_wBwB;ring. + Qed. + + Lemma spec_ww_succ : forall x, [[ww_succ x]] = ([[x]] + 1) mod wwB. + Proof. + destruct x as [ |xh xl];simpl. + rewrite spec_ww_1;rewrite Zmod_small;trivial. + split;[intro;discriminate|apply wwB_pos]. + rewrite <- Zplus_assoc;generalize (spec_w_succ_c xl); + destruct (w_succ_c xl) as[l|l];intro H;unfold interp_carry in H;rewrite <-H. + rewrite Zmod_small;trivial. + rewrite wwB_wBwB;apply beta_mult;apply spec_to_Z. + assert ([|l|] = 0). clear spec_ww_1 spec_w_1 spec_w_0. + assert (H1:= spec_to_Z l); assert (H2:= spec_to_Z xl); omega. + rewrite H0;rewrite Zplus_0_r;rewrite <- Zmult_plus_distr_l;rewrite wwB_wBwB. + rewrite Zpower_2; rewrite Zmult_mod_distr_r;try apply lt_0_wB. + rewrite spec_w_W0;rewrite spec_w_succ;trivial. + Qed. + + Lemma spec_ww_add : forall x y, [[ww_add x y]] = ([[x]] + [[y]]) mod wwB. + Proof. + destruct x as [ |xh xl];intros y;simpl. + rewrite Zmod_small;trivial. apply spec_ww_to_Z;trivial. + destruct y as [ |yh yl]. + change [[W0]] with 0;rewrite Zplus_0_r. + rewrite Zmod_small;trivial. + exact (spec_ww_to_Z w_digits w_to_Z spec_to_Z (WW xh xl)). + simpl. replace ([|xh|] * wB + [|xl|] + ([|yh|] * wB + [|yl|])) + with (([|xh|]+[|yh|])*wB + ([|xl|]+[|yl|])). 2:ring. + generalize (spec_w_add_c xl yl);destruct (w_add_c xl yl) as [l|l]; + unfold interp_carry;intros H;simpl;rewrite <- H. + rewrite (mod_wwB w_digits w_to_Z spec_to_Z);rewrite spec_w_add;trivial. + rewrite Zplus_assoc;rewrite <- Zmult_plus_distr_l. + rewrite(mod_wwB w_digits w_to_Z spec_to_Z);rewrite spec_w_add_carry;trivial. + Qed. + + Lemma spec_ww_add_carry : + forall x y, [[ww_add_carry x y]] = ([[x]] + [[y]] + 1) mod wwB. + Proof. + destruct x as [ |xh xl];intros y;simpl. + exact (spec_ww_succ y). + destruct y as [ |yh yl]. + change [[W0]] with 0;rewrite Zplus_0_r. exact (spec_ww_succ (WW xh xl)). + simpl;replace ([|xh|] * wB + [|xl|] + ([|yh|] * wB + [|yl|]) + 1) + with (([|xh|]+[|yh|])*wB + ([|xl|]+[|yl|]+1)). 2:ring. + generalize (spec_w_add_carry_c xl yl);destruct (w_add_carry_c xl yl) + as [l|l];unfold interp_carry;intros H;rewrite <- H;simpl ww_to_Z. + rewrite(mod_wwB w_digits w_to_Z spec_to_Z);rewrite spec_w_add;trivial. + rewrite Zplus_assoc;rewrite <- Zmult_plus_distr_l. + rewrite(mod_wwB w_digits w_to_Z spec_to_Z);rewrite spec_w_add_carry;trivial. + Qed. + +(* End DoubleProof. *) +End DoubleAdd. diff --git a/theories/Numbers/Cyclic/DoubleCyclic/DoubleBase.v b/theories/Numbers/Cyclic/DoubleCyclic/DoubleBase.v new file mode 100644 index 00000000..952516ac --- /dev/null +++ b/theories/Numbers/Cyclic/DoubleCyclic/DoubleBase.v @@ -0,0 +1,446 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* w -> zn2z w. + Variable w_0W : w -> zn2z w. + Variable w_digits : positive. + Variable w_zdigits: w. + Variable w_add: w -> w -> zn2z w. + Variable w_to_Z : w -> Z. + Variable w_compare : w -> w -> comparison. + + Definition ww_digits := xO w_digits. + + Definition ww_zdigits := w_add w_zdigits w_zdigits. + + Definition ww_to_Z := zn2z_to_Z (base w_digits) w_to_Z. + + Definition ww_1 := WW w_0 w_1. + + Definition ww_Bm1 := WW w_Bm1 w_Bm1. + + Definition ww_WW xh xl : zn2z (zn2z w) := + match xh, xl with + | W0, W0 => W0 + | _, _ => WW xh xl + end. + + Definition ww_W0 h : zn2z (zn2z w) := + match h with + | W0 => W0 + | _ => WW h W0 + end. + + Definition ww_0W l : zn2z (zn2z w) := + match l with + | W0 => W0 + | _ => WW W0 l + end. + + Definition double_WW (n:nat) := + match n return word w n -> word w n -> word w (S n) with + | O => w_WW + | S n => + fun (h l : zn2z (word w n)) => + match h, l with + | W0, W0 => W0 + | _, _ => WW h l + end + end. + + Fixpoint double_digits (n:nat) : positive := + match n with + | O => w_digits + | S n => xO (double_digits n) + end. + + Definition double_wB n := base (double_digits n). + + Fixpoint double_to_Z (n:nat) : word w n -> Z := + match n return word w n -> Z with + | O => w_to_Z + | S n => zn2z_to_Z (double_wB n) (double_to_Z n) + end. + + Fixpoint extend_aux (n:nat) (x:zn2z w) {struct n}: word w (S n) := + match n return word w (S n) with + | O => x + | S n1 => WW W0 (extend_aux n1 x) + end. + + Definition extend (n:nat) (x:w) : word w (S n) := + let r := w_0W x in + match r with + | W0 => W0 + | _ => extend_aux n r + end. + + Definition double_0 n : word w n := + match n return word w n with + | O => w_0 + | S _ => W0 + end. + + Definition double_split (n:nat) (x:zn2z (word w n)) := + match x with + | W0 => + match n return word w n * word w n with + | O => (w_0,w_0) + | S _ => (W0, W0) + end + | WW h l => (h,l) + end. + + Definition ww_compare x y := + match x, y with + | W0, W0 => Eq + | W0, WW yh yl => + match w_compare w_0 yh with + | Eq => w_compare w_0 yl + | _ => Lt + end + | WW xh xl, W0 => + match w_compare xh w_0 with + | Eq => w_compare xl w_0 + | _ => Gt + end + | WW xh xl, WW yh yl => + match w_compare xh yh with + | Eq => w_compare xl yl + | Lt => Lt + | Gt => Gt + end + end. + + + (* Return the low part of the composed word*) + Fixpoint get_low (n : nat) {struct n}: + word w n -> w := + match n return (word w n -> w) with + | 0%nat => fun x => x + | S n1 => + fun x => + match x with + | W0 => w_0 + | WW _ x1 => get_low n1 x1 + end + end. + + + Section DoubleProof. + Notation wB := (base w_digits). + Notation wwB := (base ww_digits). + Notation "[| x |]" := (w_to_Z x) (at level 0, x at level 99). + Notation "[[ x ]]" := (ww_to_Z x) (at level 0, x at level 99). + Notation "[+[ c ]]" := + (interp_carry 1 wwB ww_to_Z c) (at level 0, x at level 99). + Notation "[-[ c ]]" := + (interp_carry (-1) wwB ww_to_Z c) (at level 0, x at level 99). + Notation "[! n | x !]" := (double_to_Z n x) (at level 0, x at level 99). + + Variable spec_w_0 : [|w_0|] = 0. + Variable spec_w_1 : [|w_1|] = 1. + Variable spec_w_Bm1 : [|w_Bm1|] = wB - 1. + Variable spec_w_WW : forall h l, [[w_WW h l]] = [|h|] * wB + [|l|]. + Variable spec_w_0W : forall l, [[w_0W l]] = [|l|]. + Variable spec_to_Z : forall x, 0 <= [|x|] < wB. + Variable spec_w_compare : forall x y, + match w_compare x y with + | Eq => [|x|] = [|y|] + | Lt => [|x|] < [|y|] + | Gt => [|x|] > [|y|] + end. + + Lemma wwB_wBwB : wwB = wB^2. + Proof. + unfold base, ww_digits;rewrite Zpower_2; rewrite (Zpos_xO w_digits). + replace (2 * Zpos w_digits) with (Zpos w_digits + Zpos w_digits). + apply Zpower_exp; unfold Zge;simpl;intros;discriminate. + ring. + Qed. + + Lemma spec_ww_1 : [[ww_1]] = 1. + Proof. simpl;rewrite spec_w_0;rewrite spec_w_1;ring. Qed. + + Lemma spec_ww_Bm1 : [[ww_Bm1]] = wwB - 1. + Proof. simpl;rewrite spec_w_Bm1;rewrite wwB_wBwB;ring. Qed. + + Lemma lt_0_wB : 0 < wB. + Proof. + unfold base;apply Zpower_gt_0. unfold Zlt;reflexivity. + unfold Zle;intros H;discriminate H. + Qed. + + Lemma lt_0_wwB : 0 < wwB. + Proof. rewrite wwB_wBwB; rewrite Zpower_2; apply Zmult_lt_0_compat;apply lt_0_wB. Qed. + + Lemma wB_pos: 1 < wB. + Proof. + unfold base;apply Zlt_le_trans with (2^1). unfold Zlt;reflexivity. + apply Zpower_le_monotone. unfold Zlt;reflexivity. + split;unfold Zle;intros H. discriminate H. + clear spec_w_0W w_0W spec_w_Bm1 spec_to_Z spec_w_WW w_WW. + destruct w_digits; discriminate H. + Qed. + + Lemma wwB_pos: 1 < wwB. + Proof. + assert (H:= wB_pos);rewrite wwB_wBwB;rewrite <-(Zmult_1_r 1). + rewrite Zpower_2. + apply Zmult_lt_compat2;(split;[unfold Zlt;reflexivity|trivial]). + apply Zlt_le_weak;trivial. + Qed. + + Theorem wB_div_2: 2 * (wB / 2) = wB. + Proof. + clear spec_w_0 w_0 spec_w_1 w_1 spec_w_Bm1 w_Bm1 spec_w_WW spec_w_0W + spec_to_Z;unfold base. + assert (2 ^ Zpos w_digits = 2 * (2 ^ (Zpos w_digits - 1))). + pattern 2 at 2; rewrite <- Zpower_1_r. + rewrite <- Zpower_exp; auto with zarith. + f_equal; auto with zarith. + case w_digits; compute; intros; discriminate. + rewrite H; f_equal; auto with zarith. + rewrite Zmult_comm; apply Z_div_mult; auto with zarith. + Qed. + + Theorem wwB_div_2 : wwB / 2 = wB / 2 * wB. + Proof. + clear spec_w_0 w_0 spec_w_1 w_1 spec_w_Bm1 w_Bm1 spec_w_WW spec_w_0W + spec_to_Z. + rewrite wwB_wBwB; rewrite Zpower_2. + pattern wB at 1; rewrite <- wB_div_2; auto. + rewrite <- Zmult_assoc. + repeat (rewrite (Zmult_comm 2); rewrite Z_div_mult); auto with zarith. + Qed. + + Lemma mod_wwB : forall z x, + (z*wB + [|x|]) mod wwB = (z mod wB)*wB + [|x|]. + Proof. + intros z x. + rewrite Zplus_mod. + pattern wwB at 1;rewrite wwB_wBwB; rewrite Zpower_2. + rewrite Zmult_mod_distr_r;try apply lt_0_wB. + rewrite (Zmod_small [|x|]). + apply Zmod_small;rewrite wwB_wBwB;apply beta_mult;try apply spec_to_Z. + apply Z_mod_lt;apply Zlt_gt;apply lt_0_wB. + destruct (spec_to_Z x);split;trivial. + change [|x|] with (0*wB+[|x|]). rewrite wwB_wBwB. + rewrite Zpower_2;rewrite <- (Zplus_0_r (wB*wB));apply beta_lex_inv. + apply lt_0_wB. apply spec_to_Z. split;[apply Zle_refl | apply lt_0_wB]. + Qed. + + Lemma wB_div : forall x y, ([|x|] * wB + [|y|]) / wB = [|x|]. + Proof. + clear spec_w_0 spec_w_1 spec_w_Bm1 w_0 w_1 w_Bm1. + intros x y;unfold base;rewrite Zdiv_shift_r;auto with zarith. + rewrite Z_div_mult;auto with zarith. + destruct (spec_to_Z x);trivial. + Qed. + + Lemma wB_div_plus : forall x y p, + 0 <= p -> + ([|x|]*wB + [|y|]) / 2^(Zpos w_digits + p) = [|x|] / 2^p. + Proof. + clear spec_w_0 spec_w_1 spec_w_Bm1 w_0 w_1 w_Bm1. + intros x y p Hp;rewrite Zpower_exp;auto with zarith. + rewrite <- Zdiv_Zdiv;auto with zarith. + rewrite wB_div;trivial. + Qed. + + Lemma lt_wB_wwB : wB < wwB. + Proof. + clear spec_w_0 spec_w_1 spec_w_Bm1 w_0 w_1 w_Bm1. + unfold base;apply Zpower_lt_monotone;auto with zarith. + assert (0 < Zpos w_digits). compute;reflexivity. + unfold ww_digits;rewrite Zpos_xO;auto with zarith. + Qed. + + Lemma w_to_Z_wwB : forall x, x < wB -> x < wwB. + Proof. + intros x H;apply Zlt_trans with wB;trivial;apply lt_wB_wwB. + Qed. + + Lemma spec_ww_to_Z : forall x, 0 <= [[x]] < wwB. + Proof. + clear spec_w_0 spec_w_1 spec_w_Bm1 w_0 w_1 w_Bm1. + destruct x as [ |h l];simpl. + split;[apply Zle_refl|apply lt_0_wwB]. + assert (H:=spec_to_Z h);assert (L:=spec_to_Z l);split. + apply Zplus_le_0_compat;auto with zarith. + rewrite <- (Zplus_0_r wwB);rewrite wwB_wBwB; rewrite Zpower_2; + apply beta_lex_inv;auto with zarith. + Qed. + + Lemma double_wB_wwB : forall n, double_wB n * double_wB n = double_wB (S n). + Proof. + intros n;unfold double_wB;simpl. + unfold base;rewrite (Zpos_xO (double_digits n)). + replace (2 * Zpos (double_digits n)) with + (Zpos (double_digits n) + Zpos (double_digits n)). + symmetry; apply Zpower_exp;intro;discriminate. + ring. + Qed. + + Lemma double_wB_pos: + forall n, 0 <= double_wB n. + Proof. + intros n; unfold double_wB, base; auto with zarith. + Qed. + + Lemma double_wB_more_digits: + forall n, wB <= double_wB n. + Proof. + clear spec_w_0 spec_w_1 spec_w_Bm1 w_0 w_1 w_Bm1. + intros n; elim n; clear n; auto. + unfold double_wB, double_digits; auto with zarith. + intros n H1; rewrite <- double_wB_wwB. + apply Zle_trans with (wB * 1). + rewrite Zmult_1_r; apply Zle_refl. + apply Zmult_le_compat; auto with zarith. + apply Zle_trans with wB; auto with zarith. + unfold base. + rewrite <- (Zpower_0_r 2). + apply Zpower_le_monotone2; auto with zarith. + unfold base; auto with zarith. + Qed. + + Lemma spec_double_to_Z : + forall n (x:word w n), 0 <= [!n | x!] < double_wB n. + Proof. + clear spec_w_0 spec_w_1 spec_w_Bm1 w_0 w_1 w_Bm1. + induction n;intros. exact (spec_to_Z x). + unfold double_to_Z;fold double_to_Z. + destruct x;unfold zn2z_to_Z. + unfold double_wB,base;split;auto with zarith. + assert (U0:= IHn w0);assert (U1:= IHn w1). + split;auto with zarith. + apply Zlt_le_trans with ((double_wB n - 1) * double_wB n + double_wB n). + assert (double_to_Z n w0*double_wB n <= (double_wB n - 1)*double_wB n). + apply Zmult_le_compat_r;auto with zarith. + auto with zarith. + rewrite <- double_wB_wwB. + replace ((double_wB n - 1) * double_wB n + double_wB n) with (double_wB n * double_wB n); + [auto with zarith | ring]. + Qed. + + Lemma spec_get_low: + forall n x, + [!n | x!] < wB -> [|get_low n x|] = [!n | x!]. + Proof. + clear spec_w_1 spec_w_Bm1. + intros n; elim n; auto; clear n. + intros n Hrec x; case x; clear x; auto. + intros xx yy H1; simpl in H1. + assert (F1: [!n | xx!] = 0). + case (Zle_lt_or_eq 0 ([!n | xx!])); auto. + case (spec_double_to_Z n xx); auto. + intros F2. + assert (F3 := double_wB_more_digits n). + assert (F4: 0 <= [!n | yy!]). + case (spec_double_to_Z n yy); auto. + assert (F5: 1 * wB <= [!n | xx!] * double_wB n); + auto with zarith. + apply Zmult_le_compat; auto with zarith. + unfold base; auto with zarith. + simpl get_low; simpl double_to_Z. + generalize H1; clear H1. + rewrite F1; rewrite Zmult_0_l; rewrite Zplus_0_l. + intros H1; apply Hrec; auto. + Qed. + + Lemma spec_double_WW : forall n (h l : word w n), + [!S n|double_WW n h l!] = [!n|h!] * double_wB n + [!n|l!]. + Proof. + induction n;simpl;intros;trivial. + destruct h;auto. + destruct l;auto. + Qed. + + Lemma spec_extend_aux : forall n x, [!S n|extend_aux n x!] = [[x]]. + Proof. induction n;simpl;trivial. Qed. + + Lemma spec_extend : forall n x, [!S n|extend n x!] = [|x|]. + Proof. + intros n x;assert (H:= spec_w_0W x);unfold extend. + destruct (w_0W x);simpl;trivial. + rewrite <- H;exact (spec_extend_aux n (WW w0 w1)). + Qed. + + Lemma spec_double_0 : forall n, [!n|double_0 n!] = 0. + Proof. destruct n;trivial. Qed. + + Lemma spec_double_split : forall n x, + let (h,l) := double_split n x in + [!S n|x!] = [!n|h!] * double_wB n + [!n|l!]. + Proof. + destruct x;simpl;auto. + destruct n;simpl;trivial. + rewrite spec_w_0;trivial. + Qed. + + Lemma wB_lex_inv: forall a b c d, + a < c -> + a * wB + [|b|] < c * wB + [|d|]. + Proof. + intros a b c d H1; apply beta_lex_inv with (1 := H1); auto. + Qed. + + Lemma spec_ww_compare : forall x y, + match ww_compare x y with + | Eq => [[x]] = [[y]] + | Lt => [[x]] < [[y]] + | Gt => [[x]] > [[y]] + end. + Proof. + destruct x as [ |xh xl];destruct y as [ |yh yl];simpl;trivial. + generalize (spec_w_compare w_0 yh);destruct (w_compare w_0 yh); + intros H;rewrite spec_w_0 in H. + rewrite <- H;simpl;rewrite <- spec_w_0;apply spec_w_compare. + change 0 with (0*wB+0);pattern 0 at 2;rewrite <- spec_w_0. + apply wB_lex_inv;trivial. + absurd (0 <= [|yh|]). apply Zgt_not_le;trivial. + destruct (spec_to_Z yh);trivial. + generalize (spec_w_compare xh w_0);destruct (w_compare xh w_0); + intros H;rewrite spec_w_0 in H. + rewrite H;simpl;rewrite <- spec_w_0;apply spec_w_compare. + absurd (0 <= [|xh|]). apply Zgt_not_le;apply Zlt_gt;trivial. + destruct (spec_to_Z xh);trivial. + apply Zlt_gt;change 0 with (0*wB+0);pattern 0 at 2;rewrite <- spec_w_0. + apply wB_lex_inv;apply Zgt_lt;trivial. + + generalize (spec_w_compare xh yh);destruct (w_compare xh yh);intros H. + rewrite H;generalize (spec_w_compare xl yl);destruct (w_compare xl yl); + intros H1;[rewrite H1|apply Zplus_lt_compat_l|apply Zplus_gt_compat_l]; + trivial. + apply wB_lex_inv;trivial. + apply Zlt_gt;apply wB_lex_inv;apply Zgt_lt;trivial. + Qed. + + + End DoubleProof. + +End DoubleBase. + diff --git a/theories/Numbers/Cyclic/DoubleCyclic/DoubleCyclic.v b/theories/Numbers/Cyclic/DoubleCyclic/DoubleCyclic.v new file mode 100644 index 00000000..cca32a59 --- /dev/null +++ b/theories/Numbers/Cyclic/DoubleCyclic/DoubleCyclic.v @@ -0,0 +1,885 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* WW w_0 p | C1 p => WW w_1 p end. + + Let _ww_digits := xO w_digits. + + Let _ww_zdigits := w_add2 w_zdigits w_zdigits. + + Let to_Z := zn2z_to_Z wB w_to_Z. + + Let w_W0 := znz_W0 w_op. + Let w_0W := znz_0W w_op. + Let w_WW := znz_WW w_op. + + Let ww_of_pos p := + match w_of_pos p with + | (N0, l) => (N0, WW w_0 l) + | (Npos ph,l) => + let (n,h) := w_of_pos ph in (n, w_WW h l) + end. + + Let head0 := + Eval lazy beta delta [ww_head0] in + ww_head0 w_0 w_0W w_compare w_head0 w_add2 w_zdigits _ww_zdigits. + + Let tail0 := + Eval lazy beta delta [ww_tail0] in + ww_tail0 w_0 w_0W w_compare w_tail0 w_add2 w_zdigits _ww_zdigits. + + Let ww_WW := Eval lazy beta delta [ww_WW] in (@ww_WW w). + Let ww_0W := Eval lazy beta delta [ww_0W] in (@ww_0W w). + Let ww_W0 := Eval lazy beta delta [ww_W0] in (@ww_W0 w). + + (* ** Comparison ** *) + Let compare := + Eval lazy beta delta[ww_compare] in ww_compare w_0 w_compare. + + Let eq0 (x:zn2z w) := + match x with + | W0 => true + | _ => false + end. + + (* ** Opposites ** *) + Let opp_c := + Eval lazy beta delta [ww_opp_c] in ww_opp_c w_0 w_opp_c w_opp_carry. + + Let opp := + Eval lazy beta delta [ww_opp] in ww_opp w_0 w_opp_c w_opp_carry w_opp. + + Let opp_carry := + Eval lazy beta delta [ww_opp_carry] in ww_opp_carry w_WW ww_Bm1 w_opp_carry. + + (* ** Additions ** *) + + Let succ_c := + Eval lazy beta delta [ww_succ_c] in ww_succ_c w_0 ww_1 w_succ_c. + + Let add_c := + Eval lazy beta delta [ww_add_c] in ww_add_c w_WW w_add_c w_add_carry_c. + + Let add_carry_c := + Eval lazy beta iota delta [ww_add_carry_c ww_succ_c] in + ww_add_carry_c w_0 w_WW ww_1 w_succ_c w_add_c w_add_carry_c. + + Let succ := + Eval lazy beta delta [ww_succ] in ww_succ w_W0 ww_1 w_succ_c w_succ. + + Let add := + Eval lazy beta delta [ww_add] in ww_add w_add_c w_add w_add_carry. + + Let add_carry := + Eval lazy beta iota delta [ww_add_carry ww_succ] in + ww_add_carry w_W0 ww_1 w_succ_c w_add_carry_c w_succ w_add w_add_carry. + + (* ** Subtractions ** *) + + Let pred_c := + Eval lazy beta delta [ww_pred_c] in ww_pred_c w_Bm1 w_WW ww_Bm1 w_pred_c. + + Let sub_c := + Eval lazy beta iota delta [ww_sub_c ww_opp_c] in + ww_sub_c w_0 w_WW w_opp_c w_opp_carry w_sub_c w_sub_carry_c. + + Let sub_carry_c := + Eval lazy beta iota delta [ww_sub_carry_c ww_pred_c ww_opp_carry] in + ww_sub_carry_c w_Bm1 w_WW ww_Bm1 w_opp_carry w_pred_c w_sub_c w_sub_carry_c. + + Let pred := + Eval lazy beta delta [ww_pred] in ww_pred w_Bm1 w_WW ww_Bm1 w_pred_c w_pred. + + Let sub := + Eval lazy beta iota delta [ww_sub ww_opp] in + ww_sub w_0 w_WW w_opp_c w_opp_carry w_sub_c w_opp w_sub w_sub_carry. + + Let sub_carry := + Eval lazy beta iota delta [ww_sub_carry ww_pred ww_opp_carry] in + ww_sub_carry w_Bm1 w_WW ww_Bm1 w_opp_carry w_pred_c w_sub_carry_c w_pred + w_sub w_sub_carry. + + + (* ** Multiplication ** *) + + Let mul_c := + Eval lazy beta iota delta [ww_mul_c double_mul_c] in + ww_mul_c w_0 w_1 w_WW w_W0 w_mul_c add_c add add_carry. + + Let karatsuba_c := + Eval lazy beta iota delta [ww_karatsuba_c double_mul_c kara_prod] in + ww_karatsuba_c w_0 w_1 w_WW w_W0 w_compare w_add w_sub w_mul_c + add_c add add_carry sub_c sub. + + Let mul := + Eval lazy beta delta [ww_mul] in + ww_mul w_W0 w_add w_mul_c w_mul add. + + Let square_c := + Eval lazy beta delta [ww_square_c] in + ww_square_c w_0 w_1 w_WW w_W0 w_mul_c w_square_c add_c add add_carry. + + (* Division operation *) + + Let div32 := + Eval lazy beta iota delta [w_div32] in + w_div32 w_0 w_Bm1 w_Bm2 w_WW w_compare w_add_c w_add_carry_c + w_add w_add_carry w_pred w_sub w_mul_c w_div21 sub_c. + + Let div21 := + Eval lazy beta iota delta [ww_div21] in + ww_div21 w_0 w_0W div32 ww_1 compare sub. + + Let low (p: zn2z w) := match p with WW _ p1 => p1 | _ => w_0 end. + + Let add_mul_div := + Eval lazy beta delta [ww_add_mul_div] in + ww_add_mul_div w_0 w_WW w_W0 w_0W compare w_add_mul_div sub w_zdigits low. + + Let div_gt := + Eval lazy beta delta [ww_div_gt] in + ww_div_gt w_0 w_WW w_0W w_compare w_eq0 w_opp_c w_opp + w_opp_carry w_sub_c w_sub w_sub_carry + w_div_gt w_add_mul_div w_head0 w_div21 div32 _ww_zdigits ww_1 add_mul_div w_zdigits. + + Let div := + Eval lazy beta delta [ww_div] in ww_div ww_1 compare div_gt. + + Let mod_gt := + Eval lazy beta delta [ww_mod_gt] in + ww_mod_gt w_0 w_WW w_0W w_compare w_eq0 w_opp_c w_opp w_opp_carry w_sub_c w_sub w_sub_carry + w_mod_gt w_add_mul_div w_head0 w_div21 div32 _ww_zdigits add_mul_div w_zdigits. + + Let mod_ := + Eval lazy beta delta [ww_mod] in ww_mod compare mod_gt. + + Let pos_mod := + Eval lazy beta delta [ww_pos_mod] in + ww_pos_mod w_0 w_zdigits w_WW w_pos_mod compare w_0W low sub _ww_zdigits. + + Let is_even := + Eval lazy beta delta [ww_is_even] in ww_is_even w_is_even. + + Let sqrt2 := + Eval lazy beta delta [ww_sqrt2] in + ww_sqrt2 w_is_even w_compare w_0 w_1 w_Bm1 w_0W w_sub w_square_c + w_div21 w_add_mul_div w_zdigits w_add_c w_sqrt2 w_pred pred_c + pred add_c add sub_c add_mul_div. + + Let sqrt := + Eval lazy beta delta [ww_sqrt] in + ww_sqrt w_is_even w_0 w_sub w_add_mul_div w_zdigits + _ww_zdigits w_sqrt2 pred add_mul_div head0 compare low. + + Let gcd_gt_fix := + Eval cbv beta delta [ww_gcd_gt_aux ww_gcd_gt_body] in + ww_gcd_gt_aux w_0 w_WW w_0W w_compare w_opp_c w_opp w_opp_carry + w_sub_c w_sub w_sub_carry w_gcd_gt + w_add_mul_div w_head0 w_div21 div32 _ww_zdigits add_mul_div + w_zdigits. + + Let gcd_cont := + Eval lazy beta delta [gcd_cont] in gcd_cont ww_1 w_1 w_compare. + + Let gcd_gt := + Eval lazy beta delta [ww_gcd_gt] in + ww_gcd_gt w_0 w_eq0 w_gcd_gt _ww_digits gcd_gt_fix gcd_cont. + + Let gcd := + Eval lazy beta delta [ww_gcd] in + ww_gcd compare w_0 w_eq0 w_gcd_gt _ww_digits gcd_gt_fix gcd_cont. + + (* ** Record of operators on 2 words *) + + Definition mk_zn2z_op := + mk_znz_op _ww_digits _ww_zdigits + to_Z ww_of_pos head0 tail0 + W0 ww_1 ww_Bm1 + compare eq0 + opp_c opp opp_carry + succ_c add_c add_carry_c + succ add add_carry + pred_c sub_c sub_carry_c + pred sub sub_carry + mul_c mul square_c + div21 div_gt div + mod_gt mod_ + gcd_gt gcd + add_mul_div + pos_mod + is_even + sqrt2 + sqrt. + + Definition mk_zn2z_op_karatsuba := + mk_znz_op _ww_digits _ww_zdigits + to_Z ww_of_pos head0 tail0 + W0 ww_1 ww_Bm1 + compare eq0 + opp_c opp opp_carry + succ_c add_c add_carry_c + succ add add_carry + pred_c sub_c sub_carry_c + pred sub sub_carry + karatsuba_c mul square_c + div21 div_gt div + mod_gt mod_ + gcd_gt gcd + add_mul_div + pos_mod + is_even + sqrt2 + sqrt. + + (* Proof *) + Variable op_spec : znz_spec w_op. + + Hint Resolve + (spec_to_Z op_spec) + (spec_of_pos op_spec) + (spec_0 op_spec) + (spec_1 op_spec) + (spec_Bm1 op_spec) + (spec_compare op_spec) + (spec_eq0 op_spec) + (spec_opp_c op_spec) + (spec_opp op_spec) + (spec_opp_carry op_spec) + (spec_succ_c op_spec) + (spec_add_c op_spec) + (spec_add_carry_c op_spec) + (spec_succ op_spec) + (spec_add op_spec) + (spec_add_carry op_spec) + (spec_pred_c op_spec) + (spec_sub_c op_spec) + (spec_sub_carry_c op_spec) + (spec_pred op_spec) + (spec_sub op_spec) + (spec_sub_carry op_spec) + (spec_mul_c op_spec) + (spec_mul op_spec) + (spec_square_c op_spec) + (spec_div21 op_spec) + (spec_div_gt op_spec) + (spec_div op_spec) + (spec_mod_gt op_spec) + (spec_mod op_spec) + (spec_gcd_gt op_spec) + (spec_gcd op_spec) + (spec_head0 op_spec) + (spec_tail0 op_spec) + (spec_add_mul_div op_spec) + (spec_pos_mod) + (spec_is_even) + (spec_sqrt2) + (spec_sqrt) + (spec_W0 op_spec) + (spec_0W op_spec) + (spec_WW op_spec). + + Ltac wwauto := unfold ww_to_Z; auto. + + Let wwB := base _ww_digits. + + Notation "[| x |]" := (to_Z x) (at level 0, x at level 99). + + Notation "[+| c |]" := + (interp_carry 1 wwB to_Z c) (at level 0, x at level 99). + + Notation "[-| c |]" := + (interp_carry (-1) wwB to_Z c) (at level 0, x at level 99). + + Notation "[[ x ]]" := (zn2z_to_Z wwB to_Z x) (at level 0, x at level 99). + + Let spec_ww_to_Z : forall x, 0 <= [| x |] < wwB. + Proof. refine (spec_ww_to_Z w_digits w_to_Z _);auto. Qed. + + Let spec_ww_of_pos : forall p, + Zpos p = (Z_of_N (fst (ww_of_pos p)))*wwB + [|(snd (ww_of_pos p))|]. + Proof. + unfold ww_of_pos;intros. + assert (H:= spec_of_pos op_spec p);unfold w_of_pos; + destruct (znz_of_pos w_op p). simpl in H. + rewrite H;clear H;destruct n;simpl to_Z. + simpl;unfold w_to_Z,w_0;rewrite (spec_0 op_spec);trivial. + unfold Z_of_N; assert (H:= spec_of_pos op_spec p0); + destruct (znz_of_pos w_op p0). simpl in H. + rewrite H;unfold fst, snd,Z_of_N, to_Z. + rewrite (spec_WW op_spec). + replace wwB with (wB*wB). + unfold wB,w_to_Z,w_digits;clear H;destruct n;ring. + symmetry. rewrite <- Zpower_2; exact (wwB_wBwB w_digits). + Qed. + + Let spec_ww_0 : [|W0|] = 0. + Proof. reflexivity. Qed. + + Let spec_ww_1 : [|ww_1|] = 1. + Proof. refine (spec_ww_1 w_0 w_1 w_digits w_to_Z _ _);auto. Qed. + + Let spec_ww_Bm1 : [|ww_Bm1|] = wwB - 1. + Proof. refine (spec_ww_Bm1 w_Bm1 w_digits w_to_Z _);auto. Qed. + + Let spec_ww_compare : + forall x y, + match compare x y with + | Eq => [|x|] = [|y|] + | Lt => [|x|] < [|y|] + | Gt => [|x|] > [|y|] + end. + Proof. + refine (spec_ww_compare w_0 w_digits w_to_Z w_compare _ _ _);auto. + exact (spec_compare op_spec). + Qed. + + Let spec_ww_eq0 : forall x, eq0 x = true -> [|x|] = 0. + Proof. destruct x;simpl;intros;trivial;discriminate. Qed. + + Let spec_ww_opp_c : forall x, [-|opp_c x|] = -[|x|]. + Proof. + refine(spec_ww_opp_c w_0 w_0 W0 w_opp_c w_opp_carry w_digits w_to_Z _ _ _ _); + auto. + Qed. + + Let spec_ww_opp : forall x, [|opp x|] = (-[|x|]) mod wwB. + Proof. + refine(spec_ww_opp w_0 w_0 W0 w_opp_c w_opp_carry w_opp + w_digits w_to_Z _ _ _ _ _); + auto. + Qed. + + Let spec_ww_opp_carry : forall x, [|opp_carry x|] = wwB - [|x|] - 1. + Proof. + refine (spec_ww_opp_carry w_WW ww_Bm1 w_opp_carry w_digits w_to_Z _ _ _); + wwauto. + Qed. + + Let spec_ww_succ_c : forall x, [+|succ_c x|] = [|x|] + 1. + Proof. + refine (spec_ww_succ_c w_0 w_0 ww_1 w_succ_c w_digits w_to_Z _ _ _ _);auto. + Qed. + + Let spec_ww_add_c : forall x y, [+|add_c x y|] = [|x|] + [|y|]. + Proof. + refine (spec_ww_add_c w_WW w_add_c w_add_carry_c w_digits w_to_Z _ _ _);wwauto. + Qed. + + Let spec_ww_add_carry_c : forall x y, [+|add_carry_c x y|] = [|x|]+[|y|]+1. + Proof. + refine (spec_ww_add_carry_c w_0 w_0 w_WW ww_1 w_succ_c w_add_c w_add_carry_c + w_digits w_to_Z _ _ _ _ _ _ _);wwauto. + Qed. + + Let spec_ww_succ : forall x, [|succ x|] = ([|x|] + 1) mod wwB. + Proof. + refine (spec_ww_succ w_W0 ww_1 w_succ_c w_succ w_digits w_to_Z _ _ _ _ _); + wwauto. + Qed. + + Let spec_ww_add : forall x y, [|add x y|] = ([|x|] + [|y|]) mod wwB. + Proof. + refine (spec_ww_add w_add_c w_add w_add_carry w_digits w_to_Z _ _ _ _);auto. + Qed. + + Let spec_ww_add_carry : forall x y, [|add_carry x y|]=([|x|]+[|y|]+1)mod wwB. + Proof. + refine (spec_ww_add_carry w_W0 ww_1 w_succ_c w_add_carry_c w_succ + w_add w_add_carry w_digits w_to_Z _ _ _ _ _ _ _ _);wwauto. + Qed. + + Let spec_ww_pred_c : forall x, [-|pred_c x|] = [|x|] - 1. + Proof. + refine (spec_ww_pred_c w_0 w_Bm1 w_WW ww_Bm1 w_pred_c w_digits w_to_Z + _ _ _ _ _);wwauto. + Qed. + + Let spec_ww_sub_c : forall x y, [-|sub_c x y|] = [|x|] - [|y|]. + Proof. + refine (spec_ww_sub_c w_0 w_0 w_WW W0 w_opp_c w_opp_carry w_sub_c + w_sub_carry_c w_digits w_to_Z _ _ _ _ _ _ _);wwauto. + Qed. + + Let spec_ww_sub_carry_c : forall x y, [-|sub_carry_c x y|] = [|x|]-[|y|]-1. + Proof. + refine (spec_ww_sub_carry_c w_0 w_Bm1 w_WW ww_Bm1 w_opp_carry w_pred_c + w_sub_c w_sub_carry_c w_digits w_to_Z _ _ _ _ _ _ _ _);wwauto. + Qed. + + Let spec_ww_pred : forall x, [|pred x|] = ([|x|] - 1) mod wwB. + Proof. + refine (spec_ww_pred w_0 w_Bm1 w_WW ww_Bm1 w_pred_c w_pred w_digits w_to_Z + _ _ _ _ _ _);wwauto. + Qed. + + Let spec_ww_sub : forall x y, [|sub x y|] = ([|x|] - [|y|]) mod wwB. + Proof. + refine (spec_ww_sub w_0 w_0 w_WW W0 w_opp_c w_opp_carry w_sub_c w_opp + w_sub w_sub_carry w_digits w_to_Z _ _ _ _ _ _ _ _ _);wwauto. + Qed. + + Let spec_ww_sub_carry : forall x y, [|sub_carry x y|]=([|x|]-[|y|]-1) mod wwB. + Proof. + refine (spec_ww_sub_carry w_0 w_Bm1 w_WW ww_Bm1 w_opp_carry w_pred_c + w_sub_carry_c w_pred w_sub w_sub_carry w_digits w_to_Z _ _ _ _ _ _ _ _ _ _); + wwauto. + Qed. + + Let spec_ww_mul_c : forall x y, [[mul_c x y ]] = [|x|] * [|y|]. + Proof. + refine (spec_ww_mul_c w_0 w_1 w_WW w_W0 w_mul_c add_c add add_carry w_digits + w_to_Z _ _ _ _ _ _ _ _ _);wwauto. + Qed. + + Let spec_ww_karatsuba_c : forall x y, [[karatsuba_c x y ]] = [|x|] * [|y|]. + Proof. + refine (spec_ww_karatsuba_c _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + _ _ _ _ _ _ _ _ _ _ _ _); wwauto. + unfold w_digits; apply spec_more_than_1_digit; auto. + exact (spec_compare op_spec). + Qed. + + Let spec_ww_mul : forall x y, [|mul x y|] = ([|x|] * [|y|]) mod wwB. + Proof. + refine (spec_ww_mul w_W0 w_add w_mul_c w_mul add w_digits w_to_Z _ _ _ _ _); + wwauto. + Qed. + + Let spec_ww_square_c : forall x, [[square_c x]] = [|x|] * [|x|]. + Proof. + refine (spec_ww_square_c w_0 w_1 w_WW w_W0 w_mul_c w_square_c add_c add + add_carry w_digits w_to_Z _ _ _ _ _ _ _ _ _ _);wwauto. + Qed. + + Let spec_w_div32 : forall a1 a2 a3 b1 b2, + wB / 2 <= (w_to_Z b1) -> + [|WW a1 a2|] < [|WW b1 b2|] -> + let (q, r) := div32 a1 a2 a3 b1 b2 in + (w_to_Z a1) * wwB + (w_to_Z a2) * wB + (w_to_Z a3) = + (w_to_Z q) * ((w_to_Z b1)*wB + (w_to_Z b2)) + [|r|] /\ + 0 <= [|r|] < (w_to_Z b1)*wB + w_to_Z b2. + Proof. + refine (spec_w_div32 w_0 w_Bm1 w_Bm2 w_WW w_compare w_add_c w_add_carry_c + w_add w_add_carry w_pred w_sub w_mul_c w_div21 sub_c w_digits w_to_Z + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _);wwauto. + unfold w_Bm2, w_to_Z, w_pred, w_Bm1. + rewrite (spec_pred op_spec);rewrite (spec_Bm1 op_spec). + unfold w_digits;rewrite Zmod_small. ring. + assert (H:= wB_pos(znz_digits w_op)). omega. + exact (spec_compare op_spec). + exact (spec_div21 op_spec). + Qed. + + Let spec_ww_div21 : forall a1 a2 b, + wwB/2 <= [|b|] -> + [|a1|] < [|b|] -> + let (q,r) := div21 a1 a2 b in + [|a1|] *wwB+ [|a2|] = [|q|] * [|b|] + [|r|] /\ + 0 <= [|r|] < [|b|]. + Proof. + refine (spec_ww_div21 w_0 w_0W div32 ww_1 compare sub w_digits w_to_Z + _ _ _ _ _ _ _);wwauto. + Qed. + + Let spec_add2: forall x y, + [|w_add2 x y|] = w_to_Z x + w_to_Z y. + unfold w_add2. + intros xh xl; generalize (spec_add_c op_spec xh xl). + unfold w_add_c; case znz_add_c; unfold interp_carry; simpl ww_to_Z. + intros w0 Hw0; simpl; unfold w_to_Z; rewrite Hw0. + unfold w_0; rewrite spec_0; simpl; auto with zarith. + intros w0; rewrite Zmult_1_l; simpl. + unfold w_to_Z, w_1; rewrite spec_1; auto with zarith. + rewrite Zmult_1_l; auto. + Qed. + + Let spec_low: forall x, + w_to_Z (low x) = [|x|] mod wB. + intros x; case x; simpl low. + unfold ww_to_Z, w_to_Z, w_0; rewrite (spec_0 op_spec); simpl. + rewrite Zmod_small; auto with zarith. + split; auto with zarith. + unfold wB, base; auto with zarith. + intros xh xl; simpl. + rewrite Zplus_comm; rewrite Z_mod_plus; auto with zarith. + rewrite Zmod_small; auto with zarith. + unfold wB, base; auto with zarith. + Qed. + + Let spec_ww_digits: + [|_ww_zdigits|] = Zpos (xO w_digits). + Proof. + unfold w_to_Z, _ww_zdigits. + rewrite spec_add2. + unfold w_to_Z, w_zdigits, w_digits. + rewrite spec_zdigits; auto. + rewrite Zpos_xO; auto with zarith. + Qed. + + + Let spec_ww_head00 : forall x, [|x|] = 0 -> [|head0 x|] = Zpos _ww_digits. + Proof. + refine (spec_ww_head00 w_0 w_0W + w_compare w_head0 w_add2 w_zdigits _ww_zdigits + w_to_Z _ _ _ (refl_equal _ww_digits) _ _ _ _); auto. + exact (spec_compare op_spec). + exact (spec_head00 op_spec). + exact (spec_zdigits op_spec). + Qed. + + Let spec_ww_head0 : forall x, 0 < [|x|] -> + wwB/ 2 <= 2 ^ [|head0 x|] * [|x|] < wwB. + Proof. + refine (spec_ww_head0 w_0 w_0W w_compare w_head0 + w_add2 w_zdigits _ww_zdigits + w_to_Z _ _ _ _ _ _ _);wwauto. + exact (spec_compare op_spec). + exact (spec_zdigits op_spec). + Qed. + + Let spec_ww_tail00 : forall x, [|x|] = 0 -> [|tail0 x|] = Zpos _ww_digits. + Proof. + refine (spec_ww_tail00 w_0 w_0W + w_compare w_tail0 w_add2 w_zdigits _ww_zdigits + w_to_Z _ _ _ (refl_equal _ww_digits) _ _ _ _); wwauto. + exact (spec_compare op_spec). + exact (spec_tail00 op_spec). + exact (spec_zdigits op_spec). + Qed. + + + Let spec_ww_tail0 : forall x, 0 < [|x|] -> + exists y, 0 <= y /\ [|x|] = (2 * y + 1) * 2 ^ [|tail0 x|]. + Proof. + refine (spec_ww_tail0 (w_digits := w_digits) w_0 w_0W w_compare w_tail0 + w_add2 w_zdigits _ww_zdigits w_to_Z _ _ _ _ _ _ _);wwauto. + exact (spec_compare op_spec). + exact (spec_zdigits op_spec). + Qed. + + Lemma spec_ww_add_mul_div : forall x y p, + [|p|] <= Zpos _ww_digits -> + [| add_mul_div p x y |] = + ([|x|] * (2 ^ [|p|]) + + [|y|] / (2 ^ ((Zpos _ww_digits) - [|p|]))) mod wwB. + Proof. + refine (@spec_ww_add_mul_div w w_0 w_WW w_W0 w_0W compare w_add_mul_div + sub w_digits w_zdigits low w_to_Z + _ _ _ _ _ _ _ _ _ _ _);wwauto. + exact (spec_zdigits op_spec). + Qed. + + Let spec_ww_div_gt : forall a b, + [|a|] > [|b|] -> 0 < [|b|] -> + let (q,r) := div_gt a b in + [|a|] = [|q|] * [|b|] + [|r|] /\ 0 <= [|r|] < [|b|]. + Proof. +refine +(@spec_ww_div_gt w w_digits w_0 w_WW w_0W w_compare w_eq0 + w_opp_c w_opp w_opp_carry w_sub_c w_sub w_sub_carry w_div_gt + w_add_mul_div w_head0 w_div21 div32 _ww_zdigits ww_1 add_mul_div w_zdigits w_to_Z + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +). + exact (spec_0 op_spec). + exact (spec_to_Z op_spec). + wwauto. + wwauto. + exact (spec_compare op_spec). + exact (spec_eq0 op_spec). + exact (spec_opp_c op_spec). + exact (spec_opp op_spec). + exact (spec_opp_carry op_spec). + exact (spec_sub_c op_spec). + exact (spec_sub op_spec). + exact (spec_sub_carry op_spec). + exact (spec_div_gt op_spec). + exact (spec_add_mul_div op_spec). + exact (spec_head0 op_spec). + exact (spec_div21 op_spec). + exact spec_w_div32. + exact (spec_zdigits op_spec). + exact spec_ww_digits. + exact spec_ww_1. + exact spec_ww_add_mul_div. + Qed. + + Let spec_ww_div : forall a b, 0 < [|b|] -> + let (q,r) := div a b in + [|a|] = [|q|] * [|b|] + [|r|] /\ + 0 <= [|r|] < [|b|]. + Proof. + refine (spec_ww_div w_digits ww_1 compare div_gt w_to_Z _ _ _ _);auto. + Qed. + + Let spec_ww_mod_gt : forall a b, + [|a|] > [|b|] -> 0 < [|b|] -> + [|mod_gt a b|] = [|a|] mod [|b|]. + Proof. + refine (@spec_ww_mod_gt w w_digits w_0 w_WW w_0W w_compare w_eq0 + w_opp_c w_opp w_opp_carry w_sub_c w_sub w_sub_carry w_div_gt w_mod_gt + w_add_mul_div w_head0 w_div21 div32 _ww_zdigits ww_1 add_mul_div + w_zdigits w_to_Z + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _);wwauto. + exact (spec_compare op_spec). + exact (spec_div_gt op_spec). + exact (spec_div21 op_spec). + exact (spec_zdigits op_spec). + exact spec_ww_add_mul_div. + Qed. + + Let spec_ww_mod : forall a b, 0 < [|b|] -> [|mod_ a b|] = [|a|] mod [|b|]. + Proof. + refine (spec_ww_mod w_digits W0 compare mod_gt w_to_Z _ _ _);auto. + Qed. + + Let spec_ww_gcd_gt : forall a b, [|a|] > [|b|] -> + Zis_gcd [|a|] [|b|] [|gcd_gt a b|]. + Proof. + refine (@spec_ww_gcd_gt w w_digits W0 w_to_Z _ + w_0 w_0 w_eq0 w_gcd_gt _ww_digits + _ gcd_gt_fix _ _ _ _ gcd_cont _);auto. + refine (@spec_ww_gcd_gt_aux w w_digits w_0 w_WW w_0W w_compare w_opp_c w_opp + w_opp_carry w_sub_c w_sub w_sub_carry w_gcd_gt w_add_mul_div w_head0 + w_div21 div32 _ww_zdigits ww_1 add_mul_div w_zdigits w_to_Z + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _);wwauto. + exact (spec_compare op_spec). + exact (spec_div21 op_spec). + exact (spec_zdigits op_spec). + exact spec_ww_add_mul_div. + refine (@spec_gcd_cont w w_digits ww_1 w_to_Z _ _ w_0 w_1 w_compare + _ _);auto. + exact (spec_compare op_spec). + Qed. + + Let spec_ww_gcd : forall a b, Zis_gcd [|a|] [|b|] [|gcd a b|]. + Proof. + refine (@spec_ww_gcd w w_digits W0 compare w_to_Z _ _ w_0 w_0 w_eq0 w_gcd_gt + _ww_digits _ gcd_gt_fix _ _ _ _ gcd_cont _);auto. + refine (@spec_ww_gcd_gt_aux w w_digits w_0 w_WW w_0W w_compare w_opp_c w_opp + w_opp_carry w_sub_c w_sub w_sub_carry w_gcd_gt w_add_mul_div w_head0 + w_div21 div32 _ww_zdigits ww_1 add_mul_div w_zdigits w_to_Z + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _);wwauto. + exact (spec_compare op_spec). + exact (spec_div21 op_spec). + exact (spec_zdigits op_spec). + exact spec_ww_add_mul_div. + refine (@spec_gcd_cont w w_digits ww_1 w_to_Z _ _ w_0 w_1 w_compare + _ _);auto. + exact (spec_compare op_spec). + Qed. + + Let spec_ww_is_even : forall x, + match is_even x with + true => [|x|] mod 2 = 0 + | false => [|x|] mod 2 = 1 + end. + Proof. + refine (@spec_ww_is_even w w_is_even w_0 w_1 w_Bm1 w_digits _ _ _ _ _); auto. + exact (spec_is_even op_spec). + Qed. + + Let spec_ww_sqrt2 : forall x y, + wwB/ 4 <= [|x|] -> + let (s,r) := sqrt2 x y in + [[WW x y]] = [|s|] ^ 2 + [+|r|] /\ + [+|r|] <= 2 * [|s|]. + Proof. + intros x y H. + refine (@spec_ww_sqrt2 w w_is_even w_compare w_0 w_1 w_Bm1 + w_0W w_sub w_square_c w_div21 w_add_mul_div w_digits w_zdigits + _ww_zdigits + w_add_c w_sqrt2 w_pred pred_c pred add_c add sub_c add_mul_div + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _); wwauto. + exact (spec_zdigits op_spec). + exact (spec_more_than_1_digit op_spec). + exact (spec_is_even op_spec). + exact (spec_compare op_spec). + exact (spec_div21 op_spec). + exact (spec_ww_add_mul_div). + exact (spec_sqrt2 op_spec). + Qed. + + Let spec_ww_sqrt : forall x, + [|sqrt x|] ^ 2 <= [|x|] < ([|sqrt x|] + 1) ^ 2. + Proof. + refine (@spec_ww_sqrt w w_is_even w_0 w_1 w_Bm1 + w_sub w_add_mul_div w_digits w_zdigits _ww_zdigits + w_sqrt2 pred add_mul_div head0 compare + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _); wwauto. + exact (spec_zdigits op_spec). + exact (spec_more_than_1_digit op_spec). + exact (spec_is_even op_spec). + exact (spec_ww_add_mul_div). + exact (spec_sqrt2 op_spec). + Qed. + + Lemma mk_znz2_spec : znz_spec mk_zn2z_op. + Proof. + apply mk_znz_spec;auto. + exact spec_ww_add_mul_div. + + refine (@spec_ww_pos_mod w w_0 w_digits w_zdigits w_WW + w_pos_mod compare w_0W low sub _ww_zdigits w_to_Z + _ _ _ _ _ _ _ _ _ _ _ _);wwauto. + exact (spec_pos_mod op_spec). + exact (spec_zdigits op_spec). + unfold w_to_Z, w_zdigits. + rewrite (spec_zdigits op_spec). + rewrite <- Zpos_xO; exact spec_ww_digits. + Qed. + + Lemma mk_znz2_karatsuba_spec : znz_spec mk_zn2z_op_karatsuba. + Proof. + apply mk_znz_spec;auto. + exact spec_ww_add_mul_div. + refine (@spec_ww_pos_mod w w_0 w_digits w_zdigits w_WW + w_pos_mod compare w_0W low sub _ww_zdigits w_to_Z + _ _ _ _ _ _ _ _ _ _ _ _);wwauto. + exact (spec_pos_mod op_spec). + exact (spec_zdigits op_spec). + unfold w_to_Z, w_zdigits. + rewrite (spec_zdigits op_spec). + rewrite <- Zpos_xO; exact spec_ww_digits. + Qed. + +End Z_2nZ. + +Section MulAdd. + + Variable w: Type. + Variable op: znz_op w. + Variable sop: znz_spec op. + + Definition mul_add:= w_mul_add (znz_0 op) (znz_succ op) (znz_add_c op) (znz_mul_c op). + + Notation "[| x |]" := (znz_to_Z op x) (at level 0, x at level 99). + + Notation "[|| x ||]" := + (zn2z_to_Z (base (znz_digits op)) (znz_to_Z op) x) (at level 0, x at level 99). + + + Lemma spec_mul_add: forall x y z, + let (zh, zl) := mul_add x y z in + [||WW zh zl||] = [|x|] * [|y|] + [|z|]. + Proof. + intros x y z. + refine (spec_w_mul_add _ _ _ _ _ _ _ _ _ _ _ _ x y z); auto. + exact (spec_0 sop). + exact (spec_to_Z sop). + exact (spec_succ sop). + exact (spec_add_c sop). + exact (spec_mul_c sop). + Qed. + +End MulAdd. + + +(** Modular versions of DoubleCyclic *) + +Module DoubleCyclic (C:CyclicType) <: CyclicType. + Definition w := zn2z C.w. + Definition w_op := mk_zn2z_op C.w_op. + Definition w_spec := mk_znz2_spec C.w_spec. +End DoubleCyclic. + +Module DoubleCyclicKaratsuba (C:CyclicType) <: CyclicType. + Definition w := zn2z C.w. + Definition w_op := mk_zn2z_op_karatsuba C.w_op. + Definition w_spec := mk_znz2_karatsuba_spec C.w_spec. +End DoubleCyclicKaratsuba. diff --git a/theories/Numbers/Cyclic/DoubleCyclic/DoubleDiv.v b/theories/Numbers/Cyclic/DoubleCyclic/DoubleDiv.v new file mode 100644 index 00000000..075aef59 --- /dev/null +++ b/theories/Numbers/Cyclic/DoubleCyclic/DoubleDiv.v @@ -0,0 +1,1540 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* w -> zn2z w. + Variable w_pos_mod : w -> w -> w. + Variable w_compare : w -> w -> comparison. + Variable ww_compare : zn2z w -> zn2z w -> comparison. + Variable w_0W : w -> zn2z w. + Variable low: zn2z w -> w. + Variable ww_sub: zn2z w -> zn2z w -> zn2z w. + Variable ww_zdigits : zn2z w. + + + Definition ww_pos_mod p x := + let zdigits := w_0W w_zdigits in + match x with + | W0 => W0 + | WW xh xl => + match ww_compare p zdigits with + | Eq => w_WW w_0 xl + | Lt => w_WW w_0 (w_pos_mod (low p) xl) + | Gt => + match ww_compare p ww_zdigits with + | Lt => + let n := low (ww_sub p zdigits) in + w_WW (w_pos_mod n xh) xl + | _ => x + end + end + end. + + + Variable w_to_Z : w -> Z. + + Notation wB := (base w_digits). + Notation wwB := (base (ww_digits w_digits)). + Notation "[| x |]" := (w_to_Z x) (at level 0, x at level 99). + + Notation "[[ x ]]" := (ww_to_Z w_digits w_to_Z x)(at level 0, x at level 99). + + + Variable spec_w_0 : [|w_0|] = 0. + + Variable spec_to_Z : forall x, 0 <= [|x|] < wB. + + Variable spec_to_w_Z : forall x, 0 <= [[x]] < wwB. + + Variable spec_w_WW : forall h l, [[w_WW h l]] = [|h|] * wB + [|l|]. + + Variable spec_pos_mod : forall w p, + [|w_pos_mod p w|] = [|w|] mod (2 ^ [|p|]). + + Variable spec_w_0W : forall l, [[w_0W l]] = [|l|]. + Variable spec_ww_compare : forall x y, + match ww_compare x y with + | Eq => [[x]] = [[y]] + | Lt => [[x]] < [[y]] + | Gt => [[x]] > [[y]] + end. + Variable spec_ww_sub: forall x y, + [[ww_sub x y]] = ([[x]] - [[y]]) mod wwB. + + Variable spec_zdigits : [| w_zdigits |] = Zpos w_digits. + Variable spec_low: forall x, [| low x|] = [[x]] mod wB. + Variable spec_ww_zdigits : [[ww_zdigits]] = 2 * [|w_zdigits|]. + Variable spec_ww_digits : ww_digits w_digits = xO w_digits. + + + Hint Rewrite spec_w_0 spec_w_WW : w_rewrite. + + Lemma spec_ww_pos_mod : forall w p, + [[ww_pos_mod p w]] = [[w]] mod (2 ^ [[p]]). + assert (HHHHH:= lt_0_wB w_digits). + assert (F0: forall x y, x - y + y = x); auto with zarith. + intros w1 p; case (spec_to_w_Z p); intros HH1 HH2. + unfold ww_pos_mod; case w1. + simpl; rewrite Zmod_small; split; auto with zarith. + intros xh xl; generalize (spec_ww_compare p (w_0W w_zdigits)); + case ww_compare; + rewrite spec_w_0W; rewrite spec_zdigits; fold wB; + intros H1. + rewrite H1; simpl ww_to_Z. + autorewrite with w_rewrite rm10. + rewrite Zplus_mod; auto with zarith. + rewrite Z_mod_mult; auto with zarith. + autorewrite with rm10. + rewrite Zmod_mod; auto with zarith. + rewrite Zmod_small; auto with zarith. + autorewrite with w_rewrite rm10. + simpl ww_to_Z. + rewrite spec_pos_mod. + assert (HH0: [|low p|] = [[p]]). + rewrite spec_low. + apply Zmod_small; auto with zarith. + case (spec_to_w_Z p); intros HHH1 HHH2; split; auto with zarith. + apply Zlt_le_trans with (1 := H1). + unfold base; apply Zpower2_le_lin; auto with zarith. + rewrite HH0. + rewrite Zplus_mod; auto with zarith. + unfold base. + rewrite <- (F0 (Zpos w_digits) [[p]]). + rewrite Zpower_exp; auto with zarith. + rewrite Zmult_assoc. + rewrite Z_mod_mult; auto with zarith. + autorewrite with w_rewrite rm10. + rewrite Zmod_mod; auto with zarith. +generalize (spec_ww_compare p ww_zdigits); + case ww_compare; rewrite spec_ww_zdigits; + rewrite spec_zdigits; intros H2. + replace (2^[[p]]) with wwB. + rewrite Zmod_small; auto with zarith. + unfold base; rewrite H2. + rewrite spec_ww_digits; auto. + assert (HH0: [|low (ww_sub p (w_0W w_zdigits))|] = + [[p]] - Zpos w_digits). + rewrite spec_low. + rewrite spec_ww_sub. + rewrite spec_w_0W; rewrite spec_zdigits. + rewrite <- Zmod_div_mod; auto with zarith. + rewrite Zmod_small; auto with zarith. + split; auto with zarith. + apply Zlt_le_trans with (Zpos w_digits); auto with zarith. + unfold base; apply Zpower2_le_lin; auto with zarith. + exists wB; unfold base; rewrite <- Zpower_exp; auto with zarith. + rewrite spec_ww_digits; + apply f_equal with (f := Zpower 2); rewrite Zpos_xO; auto with zarith. + simpl ww_to_Z; autorewrite with w_rewrite. + rewrite spec_pos_mod; rewrite HH0. + pattern [|xh|] at 2; + rewrite Z_div_mod_eq with (b := 2 ^ ([[p]] - Zpos w_digits)); + auto with zarith. + rewrite (fun x => (Zmult_comm (2 ^ x))); rewrite Zmult_plus_distr_l. + unfold base; rewrite <- Zmult_assoc; rewrite <- Zpower_exp; + auto with zarith. + rewrite F0; auto with zarith. + rewrite <- Zplus_assoc; rewrite Zplus_mod; auto with zarith. + rewrite Z_mod_mult; auto with zarith. + autorewrite with rm10. + rewrite Zmod_mod; auto with zarith. + apply sym_equal; apply Zmod_small; auto with zarith. + case (spec_to_Z xh); intros U1 U2. + case (spec_to_Z xl); intros U3 U4. + split; auto with zarith. + apply Zplus_le_0_compat; auto with zarith. + apply Zmult_le_0_compat; auto with zarith. + match goal with |- 0 <= ?X mod ?Y => + case (Z_mod_lt X Y); auto with zarith + end. + match goal with |- ?X mod ?Y * ?U + ?Z < ?T => + apply Zle_lt_trans with ((Y - 1) * U + Z ); + [case (Z_mod_lt X Y); auto with zarith | idtac] + end. + match goal with |- ?X * ?U + ?Y < ?Z => + apply Zle_lt_trans with (X * U + (U - 1)) + end. + apply Zplus_le_compat_l; auto with zarith. + case (spec_to_Z xl); unfold base; auto with zarith. + rewrite Zmult_minus_distr_r; rewrite <- Zpower_exp; auto with zarith. + rewrite F0; auto with zarith. + rewrite Zmod_small; auto with zarith. + case (spec_to_w_Z (WW xh xl)); intros U1 U2. + split; auto with zarith. + apply Zlt_le_trans with (1:= U2). + unfold base; rewrite spec_ww_digits. + apply Zpower_le_monotone; auto with zarith. + split; auto with zarith. + rewrite Zpos_xO; auto with zarith. + Qed. + +End POS_MOD. + +Section DoubleDiv32. + + Variable w : Type. + Variable w_0 : w. + Variable w_Bm1 : w. + Variable w_Bm2 : w. + Variable w_WW : w -> w -> zn2z w. + Variable w_compare : w -> w -> comparison. + Variable w_add_c : w -> w -> carry w. + Variable w_add_carry_c : w -> w -> carry w. + Variable w_add : w -> w -> w. + Variable w_add_carry : w -> w -> w. + Variable w_pred : w -> w. + Variable w_sub : w -> w -> w. + Variable w_mul_c : w -> w -> zn2z w. + Variable w_div21 : w -> w -> w -> w*w. + Variable ww_sub_c : zn2z w -> zn2z w -> carry (zn2z w). + + Definition w_div32 a1 a2 a3 b1 b2 := + Eval lazy beta iota delta [ww_add_c_cont ww_add] in + match w_compare a1 b1 with + | Lt => + let (q,r) := w_div21 a1 a2 b1 in + match ww_sub_c (w_WW r a3) (w_mul_c q b2) with + | C0 r1 => (q,r1) + | C1 r1 => + let q := w_pred q in + ww_add_c_cont w_WW w_add_c w_add_carry_c + (fun r2=>(w_pred q, ww_add w_add_c w_add w_add_carry r2 (WW b1 b2))) + (fun r2 => (q,r2)) + r1 (WW b1 b2) + end + | Eq => + ww_add_c_cont w_WW w_add_c w_add_carry_c + (fun r => (w_Bm2, ww_add w_add_c w_add w_add_carry r (WW b1 b2))) + (fun r => (w_Bm1,r)) + (WW (w_sub a2 b2) a3) (WW b1 b2) + | Gt => (w_0, W0) (* cas absurde *) + end. + + (* Proof *) + + Variable w_digits : positive. + Variable w_to_Z : w -> Z. + + Notation wB := (base w_digits). + Notation wwB := (base (ww_digits w_digits)). + Notation "[| x |]" := (w_to_Z x) (at level 0, x at level 99). + Notation "[+| c |]" := + (interp_carry 1 wB w_to_Z c) (at level 0, x at level 99). + Notation "[-| c |]" := + (interp_carry (-1) wB w_to_Z c) (at level 0, x at level 99). + + Notation "[[ x ]]" := (ww_to_Z w_digits w_to_Z x)(at level 0, x at level 99). + Notation "[-[ c ]]" := + (interp_carry (-1) wwB (ww_to_Z w_digits w_to_Z) c) + (at level 0, x at level 99). + + + Variable spec_w_0 : [|w_0|] = 0. + Variable spec_w_Bm1 : [|w_Bm1|] = wB - 1. + Variable spec_w_Bm2 : [|w_Bm2|] = wB - 2. + + Variable spec_to_Z : forall x, 0 <= [|x|] < wB. + + Variable spec_w_WW : forall h l, [[w_WW h l]] = [|h|] * wB + [|l|]. + Variable spec_compare : + forall x y, + match w_compare x y with + | Eq => [|x|] = [|y|] + | Lt => [|x|] < [|y|] + | Gt => [|x|] > [|y|] + end. + Variable spec_w_add_c : forall x y, [+|w_add_c x y|] = [|x|] + [|y|]. + Variable spec_w_add_carry_c : + forall x y, [+|w_add_carry_c x y|] = [|x|] + [|y|] + 1. + + Variable spec_w_add : forall x y, [|w_add x y|] = ([|x|] + [|y|]) mod wB. + Variable spec_w_add_carry : + forall x y, [|w_add_carry x y|] = ([|x|] + [|y|] + 1) mod wB. + + Variable spec_pred : forall x, [|w_pred x|] = ([|x|] - 1) mod wB. + Variable spec_sub : forall x y, [|w_sub x y|] = ([|x|] - [|y|]) mod wB. + + Variable spec_mul_c : forall x y, [[ w_mul_c x y ]] = [|x|] * [|y|]. + Variable spec_div21 : forall a1 a2 b, + wB/2 <= [|b|] -> + [|a1|] < [|b|] -> + let (q,r) := w_div21 a1 a2 b in + [|a1|] *wB+ [|a2|] = [|q|] * [|b|] + [|r|] /\ + 0 <= [|r|] < [|b|]. + + Variable spec_ww_sub_c : forall x y, [-[ww_sub_c x y]] = [[x]] - [[y]]. + + Ltac Spec_w_to_Z x := + let H:= fresh "HH" in + assert (H:= spec_to_Z x). + Ltac Spec_ww_to_Z x := + let H:= fresh "HH" in + assert (H:= spec_ww_to_Z w_digits w_to_Z spec_to_Z x). + + Theorem wB_div2: forall x, wB/2 <= x -> wB <= 2 * x. + intros x H; rewrite <- wB_div_2; apply Zmult_le_compat_l; auto with zarith. + Qed. + + Lemma Zmult_lt_0_reg_r_2 : forall n m : Z, 0 <= n -> 0 < m * n -> 0 < m. + Proof. + intros n m H1 H2;apply Zmult_lt_0_reg_r with n;trivial. + destruct (Zle_lt_or_eq _ _ H1);trivial. + subst;rewrite Zmult_0_r in H2;discriminate H2. + Qed. + + Theorem spec_w_div32 : forall a1 a2 a3 b1 b2, + wB/2 <= [|b1|] -> + [[WW a1 a2]] < [[WW b1 b2]] -> + let (q,r) := w_div32 a1 a2 a3 b1 b2 in + [|a1|] * wwB + [|a2|] * wB + [|a3|] = + [|q|] * ([|b1|] * wB + [|b2|]) + [[r]] /\ + 0 <= [[r]] < [|b1|] * wB + [|b2|]. + Proof. + intros a1 a2 a3 b1 b2 Hle Hlt. + assert (U:= lt_0_wB w_digits); assert (U1:= lt_0_wwB w_digits). + Spec_w_to_Z a1;Spec_w_to_Z a2;Spec_w_to_Z a3;Spec_w_to_Z b1;Spec_w_to_Z b2. + rewrite wwB_wBwB; rewrite Zpower_2; rewrite Zmult_assoc;rewrite <- Zmult_plus_distr_l. + change (w_div32 a1 a2 a3 b1 b2) with + match w_compare a1 b1 with + | Lt => + let (q,r) := w_div21 a1 a2 b1 in + match ww_sub_c (w_WW r a3) (w_mul_c q b2) with + | C0 r1 => (q,r1) + | C1 r1 => + let q := w_pred q in + ww_add_c_cont w_WW w_add_c w_add_carry_c + (fun r2=>(w_pred q, ww_add w_add_c w_add w_add_carry r2 (WW b1 b2))) + (fun r2 => (q,r2)) + r1 (WW b1 b2) + end + | Eq => + ww_add_c_cont w_WW w_add_c w_add_carry_c + (fun r => (w_Bm2, ww_add w_add_c w_add w_add_carry r (WW b1 b2))) + (fun r => (w_Bm1,r)) + (WW (w_sub a2 b2) a3) (WW b1 b2) + | Gt => (w_0, W0) (* cas absurde *) + end. + assert (Hcmp:=spec_compare a1 b1);destruct (w_compare a1 b1). + simpl in Hlt. + rewrite Hcmp in Hlt;assert ([|a2|] < [|b2|]). omega. + assert ([[WW (w_sub a2 b2) a3]] = ([|a2|]-[|b2|])*wB + [|a3|] + wwB). + simpl;rewrite spec_sub. + assert ([|a2|] - [|b2|] = wB*(-1) + ([|a2|] - [|b2|] + wB)). ring. + assert (0 <= [|a2|] - [|b2|] + wB < wB). omega. + rewrite <-(Zmod_unique ([|a2|]-[|b2|]) wB (-1) ([|a2|]-[|b2|]+wB) H1 H0). + rewrite wwB_wBwB;ring. + assert (U2 := wB_pos w_digits). + eapply spec_ww_add_c_cont with (P := + fun (x y:zn2z w) (res:w*zn2z w) => + let (q, r) := res in + ([|a1|] * wB + [|a2|]) * wB + [|a3|] = + [|q|] * ([|b1|] * wB + [|b2|]) + [[r]] /\ + 0 <= [[r]] < [|b1|] * wB + [|b2|]);eauto. + rewrite H0;intros r. + repeat + (rewrite spec_ww_add;eauto || rewrite spec_w_Bm1 || rewrite spec_w_Bm2); + simpl ww_to_Z;try rewrite Zmult_1_l;intros H1. + assert (0<= ([[r]] + ([|b1|] * wB + [|b2|])) - wwB < [|b1|] * wB + [|b2|]). + Spec_ww_to_Z r;split;zarith. + rewrite H1. + assert (H12:= wB_div2 Hle). assert (wwB <= 2 * [|b1|] * wB). + rewrite wwB_wBwB; rewrite Zpower_2; zarith. + assert (-wwB < ([|a2|] - [|b2|]) * wB + [|a3|] < 0). + split. apply Zlt_le_trans with (([|a2|] - [|b2|]) * wB);zarith. + rewrite wwB_wBwB;replace (-(wB^2)) with (-wB*wB);[zarith | ring]. + apply Zmult_lt_compat_r;zarith. + apply Zle_lt_trans with (([|a2|] - [|b2|]) * wB + (wB -1));zarith. + replace ( ([|a2|] - [|b2|]) * wB + (wB - 1)) with + (([|a2|] - [|b2|] + 1) * wB + - 1);[zarith | ring]. + assert (([|a2|] - [|b2|] + 1) * wB <= 0);zarith. + replace 0 with (0*wB);zarith. + replace (([|a2|] - [|b2|]) * wB + [|a3|] + wwB + ([|b1|] * wB + [|b2|]) + + ([|b1|] * wB + [|b2|]) - wwB) with + (([|a2|] - [|b2|]) * wB + [|a3|] + 2*[|b1|] * wB + 2*[|b2|]); + [zarith | ring]. + rewrite <- (Zmod_unique ([[r]] + ([|b1|] * wB + [|b2|])) wwB + 1 ([[r]] + ([|b1|] * wB + [|b2|]) - wwB));zarith;try (ring;fail). + split. rewrite H1;rewrite Hcmp;ring. trivial. + Spec_ww_to_Z (WW b1 b2). simpl in HH4;zarith. + rewrite H0;intros r;repeat + (rewrite spec_w_Bm1 || rewrite spec_w_Bm2); + simpl ww_to_Z;try rewrite Zmult_1_l;intros H1. + assert ([[r]]=([|a2|]-[|b2|])*wB+[|a3|]+([|b1|]*wB+[|b2|])). zarith. + split. rewrite H2;rewrite Hcmp;ring. + split. Spec_ww_to_Z r;zarith. + rewrite H2. + assert (([|a2|] - [|b2|]) * wB + [|a3|] < 0);zarith. + apply Zle_lt_trans with (([|a2|] - [|b2|]) * wB + (wB -1));zarith. + replace ( ([|a2|] - [|b2|]) * wB + (wB - 1)) with + (([|a2|] - [|b2|] + 1) * wB + - 1);[zarith|ring]. + assert (([|a2|] - [|b2|] + 1) * wB <= 0);zarith. + replace 0 with (0*wB);zarith. + (* Cas Lt *) + assert (Hdiv21 := spec_div21 a2 Hle Hcmp); + destruct (w_div21 a1 a2 b1) as (q, r);destruct Hdiv21. + rewrite H. + assert (Hq := spec_to_Z q). + generalize + (spec_ww_sub_c (w_WW r a3) (w_mul_c q b2)); + destruct (ww_sub_c (w_WW r a3) (w_mul_c q b2)) + as [r1|r1];repeat (rewrite spec_w_WW || rewrite spec_mul_c); + unfold interp_carry;intros H1. + rewrite H1. + split. ring. split. + rewrite <- H1;destruct (spec_ww_to_Z w_digits w_to_Z spec_to_Z r1);trivial. + apply Zle_lt_trans with ([|r|] * wB + [|a3|]). + assert ( 0 <= [|q|] * [|b2|]);zarith. + apply beta_lex_inv;zarith. + assert ([[r1]] = [|r|] * wB + [|a3|] - [|q|] * [|b2|] + wwB). + rewrite <- H1;ring. + Spec_ww_to_Z r1; assert (0 <= [|r|]*wB). zarith. + assert (0 < [|q|] * [|b2|]). zarith. + assert (0 < [|q|]). + apply Zmult_lt_0_reg_r_2 with [|b2|];zarith. + eapply spec_ww_add_c_cont with (P := + fun (x y:zn2z w) (res:w*zn2z w) => + let (q0, r0) := res in + ([|q|] * [|b1|] + [|r|]) * wB + [|a3|] = + [|q0|] * ([|b1|] * wB + [|b2|]) + [[r0]] /\ + 0 <= [[r0]] < [|b1|] * wB + [|b2|]);eauto. + intros r2;repeat (rewrite spec_pred || rewrite spec_ww_add;eauto); + simpl ww_to_Z;intros H7. + assert (0 < [|q|] - 1). + assert (1 <= [|q|]). zarith. + destruct (Zle_lt_or_eq _ _ H6);zarith. + rewrite <- H8 in H2;rewrite H2 in H7. + assert (0 < [|b1|]*wB). apply Zmult_lt_0_compat;zarith. + Spec_ww_to_Z r2. zarith. + rewrite (Zmod_small ([|q|] -1));zarith. + rewrite (Zmod_small ([|q|] -1 -1));zarith. + assert ([[r2]] + ([|b1|] * wB + [|b2|]) = + wwB * 1 + + ([|r|] * wB + [|a3|] - [|q|] * [|b2|] + 2 * ([|b1|] * wB + [|b2|]))). + rewrite H7;rewrite H2;ring. + assert + ([|r|]*wB + [|a3|] - [|q|]*[|b2|] + 2 * ([|b1|]*wB + [|b2|]) + < [|b1|]*wB + [|b2|]). + Spec_ww_to_Z r2;omega. + Spec_ww_to_Z (WW b1 b2). simpl in HH5. + assert + (0 <= [|r|]*wB + [|a3|] - [|q|]*[|b2|] + 2 * ([|b1|]*wB + [|b2|]) + < wwB). split;try omega. + replace (2*([|b1|]*wB+[|b2|])) with ((2*[|b1|])*wB+2*[|b2|]). 2:ring. + assert (H12:= wB_div2 Hle). assert (wwB <= 2 * [|b1|] * wB). + rewrite wwB_wBwB; rewrite Zpower_2; zarith. omega. + rewrite <- (Zmod_unique + ([[r2]] + ([|b1|] * wB + [|b2|])) + wwB + 1 + ([|r|] * wB + [|a3|] - [|q|] * [|b2|] + 2*([|b1|] * wB + [|b2|])) + H10 H8). + split. ring. zarith. + intros r2;repeat (rewrite spec_pred);simpl ww_to_Z;intros H7. + rewrite (Zmod_small ([|q|] -1));zarith. + split. + replace [[r2]] with ([[r1]] + ([|b1|] * wB + [|b2|]) -wwB). + rewrite H2; ring. rewrite <- H7; ring. + Spec_ww_to_Z r2;Spec_ww_to_Z r1. omega. + simpl in Hlt. + assert ([|a1|] * wB + [|a2|] <= [|b1|] * wB + [|b2|]). zarith. + assert (H1 := beta_lex _ _ _ _ _ H HH0 HH3). rewrite spec_w_0;simpl;zarith. + Qed. + + +End DoubleDiv32. + +Section DoubleDiv21. + Variable w : Type. + Variable w_0 : w. + + Variable w_0W : w -> zn2z w. + Variable w_div32 : w -> w -> w -> w -> w -> w * zn2z w. + + Variable ww_1 : zn2z w. + Variable ww_compare : zn2z w -> zn2z w -> comparison. + Variable ww_sub : zn2z w -> zn2z w -> zn2z w. + + + Definition ww_div21 a1 a2 b := + match a1 with + | W0 => + match ww_compare a2 b with + | Gt => (ww_1, ww_sub a2 b) + | Eq => (ww_1, W0) + | Lt => (W0, a2) + end + | WW a1h a1l => + match a2 with + | W0 => + match b with + | W0 => (W0,W0) (* cas absurde *) + | WW b1 b2 => + let (q1, r) := w_div32 a1h a1l w_0 b1 b2 in + match r with + | W0 => (WW q1 w_0, W0) + | WW r1 r2 => + let (q2, s) := w_div32 r1 r2 w_0 b1 b2 in + (WW q1 q2, s) + end + end + | WW a2h a2l => + match b with + | W0 => (W0,W0) (* cas absurde *) + | WW b1 b2 => + let (q1, r) := w_div32 a1h a1l a2h b1 b2 in + match r with + | W0 => (WW q1 w_0, w_0W a2l) + | WW r1 r2 => + let (q2, s) := w_div32 r1 r2 a2l b1 b2 in + (WW q1 q2, s) + end + end + end + end. + + (* Proof *) + + Variable w_digits : positive. + Variable w_to_Z : w -> Z. + Notation wB := (base w_digits). + Notation wwB := (base (ww_digits w_digits)). + Notation "[| x |]" := (w_to_Z x) (at level 0, x at level 99). + Notation "[[ x ]]" := (ww_to_Z w_digits w_to_Z x)(at level 0, x at level 99). + Notation "[-[ c ]]" := + (interp_carry (-1) wwB (ww_to_Z w_digits w_to_Z) c) + (at level 0, x at level 99). + + Variable spec_w_0 : [|w_0|] = 0. + Variable spec_to_Z : forall x, 0 <= [|x|] < wB. + Variable spec_w_0W : forall l, [[w_0W l]] = [|l|]. + Variable spec_w_div32 : forall a1 a2 a3 b1 b2, + wB/2 <= [|b1|] -> + [[WW a1 a2]] < [[WW b1 b2]] -> + let (q,r) := w_div32 a1 a2 a3 b1 b2 in + [|a1|] * wwB + [|a2|] * wB + [|a3|] = + [|q|] * ([|b1|] * wB + [|b2|]) + [[r]] /\ + 0 <= [[r]] < [|b1|] * wB + [|b2|]. + Variable spec_ww_1 : [[ww_1]] = 1. + Variable spec_ww_compare : forall x y, + match ww_compare x y with + | Eq => [[x]] = [[y]] + | Lt => [[x]] < [[y]] + | Gt => [[x]] > [[y]] + end. + Variable spec_ww_sub : forall x y, [[ww_sub x y]] = ([[x]] - [[y]]) mod wwB. + + Theorem wwB_div: wwB = 2 * (wwB / 2). + Proof. + rewrite wwB_div_2; rewrite Zmult_assoc; rewrite wB_div_2; auto. + rewrite <- Zpower_2; apply wwB_wBwB. + Qed. + + Ltac Spec_w_to_Z x := + let H:= fresh "HH" in + assert (H:= spec_to_Z x). + Ltac Spec_ww_to_Z x := + let H:= fresh "HH" in + assert (H:= spec_ww_to_Z w_digits w_to_Z spec_to_Z x). + + Theorem spec_ww_div21 : forall a1 a2 b, + wwB/2 <= [[b]] -> + [[a1]] < [[b]] -> + let (q,r) := ww_div21 a1 a2 b in + [[a1]] *wwB+[[a2]] = [[q]] * [[b]] + [[r]] /\ 0 <= [[r]] < [[b]]. + Proof. + assert (U:= lt_0_wB w_digits). + assert (U1:= lt_0_wwB w_digits). + intros a1 a2 b H Hlt; unfold ww_div21. + Spec_ww_to_Z b; assert (Eq: 0 < [[b]]). Spec_ww_to_Z a1;omega. + generalize Hlt H ;clear Hlt H;case a1. + intros H1 H2;simpl in H1;Spec_ww_to_Z a2; + match goal with |-context [ww_compare ?Y ?Z] => + generalize (spec_ww_compare Y Z); case (ww_compare Y Z) + end; simpl;try rewrite spec_ww_1;autorewrite with rm10; intros;zarith. + rewrite spec_ww_sub;simpl. rewrite Zmod_small;zarith. + split. ring. + assert (wwB <= 2*[[b]]);zarith. + rewrite wwB_div;zarith. + intros a1h a1l. Spec_w_to_Z a1h;Spec_w_to_Z a1l. Spec_ww_to_Z a2. + destruct a2 as [ |a3 a4]; + (destruct b as [ |b1 b2];[unfold Zle in Eq;discriminate Eq|idtac]); + try (Spec_w_to_Z a3; Spec_w_to_Z a4); Spec_w_to_Z b1; Spec_w_to_Z b2; + intros Hlt H; match goal with |-context [w_div32 ?X ?Y ?Z ?T ?U] => + generalize (@spec_w_div32 X Y Z T U); case (w_div32 X Y Z T U); + intros q1 r H0 + end; (assert (Eq1: wB / 2 <= [|b1|]);[ + apply (@beta_lex (wB / 2) 0 [|b1|] [|b2|] wB); auto with zarith; + autorewrite with rm10;repeat rewrite (Zmult_comm wB); + rewrite <- wwB_div_2; trivial + | generalize (H0 Eq1 Hlt);clear H0;destruct r as [ |r1 r2];simpl; + try rewrite spec_w_0; try rewrite spec_w_0W;repeat rewrite Zplus_0_r; + intros (H1,H2) ]). + split;[rewrite wwB_wBwB; rewrite Zpower_2 | trivial]. + rewrite Zmult_assoc;rewrite Zmult_plus_distr_l;rewrite <- Zmult_assoc; + rewrite <- Zpower_2; rewrite <- wwB_wBwB;rewrite H1;ring. + destruct H2 as (H2,H3);match goal with |-context [w_div32 ?X ?Y ?Z ?T ?U] => + generalize (@spec_w_div32 X Y Z T U); case (w_div32 X Y Z T U); + intros q r H0;generalize (H0 Eq1 H3);clear H0;intros (H4,H5) end. + split;[rewrite wwB_wBwB | trivial]. + rewrite Zpower_2. + rewrite Zmult_assoc;rewrite Zmult_plus_distr_l;rewrite <- Zmult_assoc; + rewrite <- Zpower_2. + rewrite <- wwB_wBwB;rewrite H1. + rewrite spec_w_0 in H4;rewrite Zplus_0_r in H4. + repeat rewrite Zmult_plus_distr_l. rewrite <- (Zmult_assoc [|r1|]). + rewrite <- Zpower_2; rewrite <- wwB_wBwB;rewrite H4;simpl;ring. + split;[rewrite wwB_wBwB | split;zarith]. + replace (([|a1h|] * wB + [|a1l|]) * wB^2 + ([|a3|] * wB + [|a4|])) + with (([|a1h|] * wwB + [|a1l|] * wB + [|a3|])*wB+ [|a4|]). + rewrite H1;ring. rewrite wwB_wBwB;ring. + change [|a4|] with (0*wB+[|a4|]);apply beta_lex_inv;zarith. + assert (1 <= wB/2);zarith. + assert (H_:= wB_pos w_digits);apply Zdiv_le_lower_bound;zarith. + destruct H2 as (H2,H3);match goal with |-context [w_div32 ?X ?Y ?Z ?T ?U] => + generalize (@spec_w_div32 X Y Z T U); case (w_div32 X Y Z T U); + intros q r H0;generalize (H0 Eq1 H3);clear H0;intros (H4,H5) end. + split;trivial. + replace (([|a1h|] * wB + [|a1l|]) * wwB + ([|a3|] * wB + [|a4|])) with + (([|a1h|] * wwB + [|a1l|] * wB + [|a3|])*wB + [|a4|]); + [rewrite H1 | rewrite wwB_wBwB;ring]. + replace (([|q1|]*([|b1|]*wB+[|b2|])+([|r1|]*wB+[|r2|]))*wB+[|a4|]) with + (([|q1|]*([|b1|]*wB+[|b2|]))*wB+([|r1|]*wwB+[|r2|]*wB+[|a4|])); + [rewrite H4;simpl|rewrite wwB_wBwB];ring. + Qed. + +End DoubleDiv21. + +Section DoubleDivGt. + Variable w : Type. + Variable w_digits : positive. + Variable w_0 : w. + + Variable w_WW : w -> w -> zn2z w. + Variable w_0W : w -> zn2z w. + Variable w_compare : w -> w -> comparison. + Variable w_eq0 : w -> bool. + Variable w_opp_c : w -> carry w. + Variable w_opp w_opp_carry : w -> w. + Variable w_sub_c : w -> w -> carry w. + Variable w_sub w_sub_carry : w -> w -> w. + + Variable w_div_gt : w -> w -> w*w. + Variable w_mod_gt : w -> w -> w. + Variable w_gcd_gt : w -> w -> w. + Variable w_add_mul_div : w -> w -> w -> w. + Variable w_head0 : w -> w. + Variable w_div21 : w -> w -> w -> w * w. + Variable w_div32 : w -> w -> w -> w -> w -> w * zn2z w. + + + Variable _ww_zdigits : zn2z w. + Variable ww_1 : zn2z w. + Variable ww_add_mul_div : zn2z w -> zn2z w -> zn2z w -> zn2z w. + + Variable w_zdigits : w. + + Definition ww_div_gt_aux ah al bh bl := + Eval lazy beta iota delta [ww_sub ww_opp] in + let p := w_head0 bh in + match w_compare p w_0 with + | Gt => + let b1 := w_add_mul_div p bh bl in + let b2 := w_add_mul_div p bl w_0 in + let a1 := w_add_mul_div p w_0 ah in + let a2 := w_add_mul_div p ah al in + let a3 := w_add_mul_div p al w_0 in + let (q,r) := w_div32 a1 a2 a3 b1 b2 in + (WW w_0 q, ww_add_mul_div + (ww_sub w_0 w_WW w_opp_c w_opp_carry w_sub_c + w_opp w_sub w_sub_carry _ww_zdigits (w_0W p)) W0 r) + | _ => (ww_1, ww_sub w_0 w_WW w_opp_c w_opp_carry w_sub_c + w_opp w_sub w_sub_carry (WW ah al) (WW bh bl)) + end. + + Definition ww_div_gt a b := + Eval lazy beta iota delta [ww_div_gt_aux double_divn1 + double_divn1_p double_divn1_p_aux double_divn1_0 double_divn1_0_aux + double_split double_0 double_WW] in + match a, b with + | W0, _ => (W0,W0) + | _, W0 => (W0,W0) + | WW ah al, WW bh bl => + if w_eq0 ah then + let (q,r) := w_div_gt al bl in + (WW w_0 q, w_0W r) + else + match w_compare w_0 bh with + | Eq => + let(q,r):= + double_divn1 w_zdigits w_0 w_WW w_head0 w_add_mul_div w_div21 + w_compare w_sub 1 a bl in + (q, w_0W r) + | Lt => ww_div_gt_aux ah al bh bl + | Gt => (W0,W0) (* cas absurde *) + end + end. + + Definition ww_mod_gt_aux ah al bh bl := + Eval lazy beta iota delta [ww_sub ww_opp] in + let p := w_head0 bh in + match w_compare p w_0 with + | Gt => + let b1 := w_add_mul_div p bh bl in + let b2 := w_add_mul_div p bl w_0 in + let a1 := w_add_mul_div p w_0 ah in + let a2 := w_add_mul_div p ah al in + let a3 := w_add_mul_div p al w_0 in + let (q,r) := w_div32 a1 a2 a3 b1 b2 in + ww_add_mul_div (ww_sub w_0 w_WW w_opp_c w_opp_carry w_sub_c + w_opp w_sub w_sub_carry _ww_zdigits (w_0W p)) W0 r + | _ => + ww_sub w_0 w_WW w_opp_c w_opp_carry w_sub_c + w_opp w_sub w_sub_carry (WW ah al) (WW bh bl) + end. + + Definition ww_mod_gt a b := + Eval lazy beta iota delta [ww_mod_gt_aux double_modn1 + double_modn1_p double_modn1_p_aux double_modn1_0 double_modn1_0_aux + double_split double_0 double_WW snd] in + match a, b with + | W0, _ => W0 + | _, W0 => W0 + | WW ah al, WW bh bl => + if w_eq0 ah then w_0W (w_mod_gt al bl) + else + match w_compare w_0 bh with + | Eq => + w_0W (double_modn1 w_zdigits w_0 w_head0 w_add_mul_div w_div21 + w_compare w_sub 1 a bl) + | Lt => ww_mod_gt_aux ah al bh bl + | Gt => W0 (* cas absurde *) + end + end. + + Definition ww_gcd_gt_body (cont: w->w->w->w->zn2z w) (ah al bh bl: w) := + Eval lazy beta iota delta [ww_mod_gt_aux double_modn1 + double_modn1_p double_modn1_p_aux double_modn1_0 double_modn1_0_aux + double_split double_0 double_WW snd] in + match w_compare w_0 bh with + | Eq => + match w_compare w_0 bl with + | Eq => WW ah al (* normalement n'arrive pas si forme normale *) + | Lt => + let m := double_modn1 w_zdigits w_0 w_head0 w_add_mul_div w_div21 + w_compare w_sub 1 (WW ah al) bl in + WW w_0 (w_gcd_gt bl m) + | Gt => W0 (* absurde *) + end + | Lt => + let m := ww_mod_gt_aux ah al bh bl in + match m with + | W0 => WW bh bl + | WW mh ml => + match w_compare w_0 mh with + | Eq => + match w_compare w_0 ml with + | Eq => WW bh bl + | _ => + let r := double_modn1 w_zdigits w_0 w_head0 w_add_mul_div w_div21 + w_compare w_sub 1 (WW bh bl) ml in + WW w_0 (w_gcd_gt ml r) + end + | Lt => + let r := ww_mod_gt_aux bh bl mh ml in + match r with + | W0 => m + | WW rh rl => cont mh ml rh rl + end + | Gt => W0 (* absurde *) + end + end + | Gt => W0 (* absurde *) + end. + + Fixpoint ww_gcd_gt_aux + (p:positive) (cont: w -> w -> w -> w -> zn2z w) (ah al bh bl : w) + {struct p} : zn2z w := + ww_gcd_gt_body + (fun mh ml rh rl => match p with + | xH => cont mh ml rh rl + | xO p => ww_gcd_gt_aux p (ww_gcd_gt_aux p cont) mh ml rh rl + | xI p => ww_gcd_gt_aux p (ww_gcd_gt_aux p cont) mh ml rh rl + end) ah al bh bl. + + + (* Proof *) + + Variable w_to_Z : w -> Z. + Notation wB := (base w_digits). + Notation wwB := (base (ww_digits w_digits)). + Notation "[| x |]" := (w_to_Z x) (at level 0, x at level 99). + Notation "[-| c |]" := + (interp_carry (-1) wB w_to_Z c) (at level 0, x at level 99). + + Notation "[[ x ]]" := (ww_to_Z w_digits w_to_Z x)(at level 0, x at level 99). + + Variable spec_w_0 : [|w_0|] = 0. + Variable spec_to_Z : forall x, 0 <= [|x|] < wB. + Variable spec_to_w_Z : forall x, 0 <= [[x]] < wwB. + + Variable spec_w_WW : forall h l, [[w_WW h l]] = [|h|] * wB + [|l|]. + Variable spec_w_0W : forall l, [[w_0W l]] = [|l|]. + Variable spec_compare : + forall x y, + match w_compare x y with + | Eq => [|x|] = [|y|] + | Lt => [|x|] < [|y|] + | Gt => [|x|] > [|y|] + end. + Variable spec_eq0 : forall x, w_eq0 x = true -> [|x|] = 0. + + Variable spec_opp_c : forall x, [-|w_opp_c x|] = -[|x|]. + Variable spec_opp : forall x, [|w_opp x|] = (-[|x|]) mod wB. + Variable spec_opp_carry : forall x, [|w_opp_carry x|] = wB - [|x|] - 1. + + Variable spec_sub_c : forall x y, [-|w_sub_c x y|] = [|x|] - [|y|]. + Variable spec_sub : forall x y, [|w_sub x y|] = ([|x|] - [|y|]) mod wB. + Variable spec_sub_carry : + forall x y, [|w_sub_carry x y|] = ([|x|] - [|y|] - 1) mod wB. + + Variable spec_div_gt : forall a b, [|a|] > [|b|] -> 0 < [|b|] -> + let (q,r) := w_div_gt a b in + [|a|] = [|q|] * [|b|] + [|r|] /\ + 0 <= [|r|] < [|b|]. + Variable spec_mod_gt : forall a b, [|a|] > [|b|] -> 0 < [|b|] -> + [|w_mod_gt a b|] = [|a|] mod [|b|]. + Variable spec_gcd_gt : forall a b, [|a|] > [|b|] -> + Zis_gcd [|a|] [|b|] [|w_gcd_gt a b|]. + + Variable spec_add_mul_div : forall x y p, + [|p|] <= Zpos w_digits -> + [| w_add_mul_div p x y |] = + ([|x|] * (2 ^ ([|p|])) + + [|y|] / (2 ^ ((Zpos w_digits) - [|p|]))) mod wB. + Variable spec_head0 : forall x, 0 < [|x|] -> + wB/ 2 <= 2 ^ [|w_head0 x|] * [|x|] < wB. + + Variable spec_div21 : forall a1 a2 b, + wB/2 <= [|b|] -> + [|a1|] < [|b|] -> + let (q,r) := w_div21 a1 a2 b in + [|a1|] *wB+ [|a2|] = [|q|] * [|b|] + [|r|] /\ + 0 <= [|r|] < [|b|]. + + Variable spec_w_div32 : forall a1 a2 a3 b1 b2, + wB/2 <= [|b1|] -> + [[WW a1 a2]] < [[WW b1 b2]] -> + let (q,r) := w_div32 a1 a2 a3 b1 b2 in + [|a1|] * wwB + [|a2|] * wB + [|a3|] = + [|q|] * ([|b1|] * wB + [|b2|]) + [[r]] /\ + 0 <= [[r]] < [|b1|] * wB + [|b2|]. + + Variable spec_w_zdigits: [|w_zdigits|] = Zpos w_digits. + + Variable spec_ww_digits_ : [[_ww_zdigits]] = Zpos (xO w_digits). + Variable spec_ww_1 : [[ww_1]] = 1. + Variable spec_ww_add_mul_div : forall x y p, + [[p]] <= Zpos (xO w_digits) -> + [[ ww_add_mul_div p x y ]] = + ([[x]] * (2^[[p]]) + + [[y]] / (2^(Zpos (xO w_digits) - [[p]]))) mod wwB. + + Ltac Spec_w_to_Z x := + let H:= fresh "HH" in + assert (H:= spec_to_Z x). + + Ltac Spec_ww_to_Z x := + let H:= fresh "HH" in + assert (H:= spec_ww_to_Z w_digits w_to_Z spec_to_Z x). + + Lemma to_Z_div_minus_p : forall x p, + 0 < [|p|] < Zpos w_digits -> + 0 <= [|x|] / 2 ^ (Zpos w_digits - [|p|]) < 2 ^ [|p|]. + Proof. + intros x p H;Spec_w_to_Z x. + split. apply Zdiv_le_lower_bound;zarith. + apply Zdiv_lt_upper_bound;zarith. + rewrite <- Zpower_exp;zarith. + ring_simplify ([|p|] + (Zpos w_digits - [|p|])); unfold base in HH;zarith. + Qed. + Hint Resolve to_Z_div_minus_p : zarith. + + Lemma spec_ww_div_gt_aux : forall ah al bh bl, + [[WW ah al]] > [[WW bh bl]] -> + 0 < [|bh|] -> + let (q,r) := ww_div_gt_aux ah al bh bl in + [[WW ah al]] = [[q]] * [[WW bh bl]] + [[r]] /\ + 0 <= [[r]] < [[WW bh bl]]. + Proof. + intros ah al bh bl Hgt Hpos;unfold ww_div_gt_aux. + change + (let (q, r) := let p := w_head0 bh in + match w_compare p w_0 with + | Gt => + let b1 := w_add_mul_div p bh bl in + let b2 := w_add_mul_div p bl w_0 in + let a1 := w_add_mul_div p w_0 ah in + let a2 := w_add_mul_div p ah al in + let a3 := w_add_mul_div p al w_0 in + let (q,r) := w_div32 a1 a2 a3 b1 b2 in + (WW w_0 q, ww_add_mul_div + (ww_sub w_0 w_WW w_opp_c w_opp_carry w_sub_c + w_opp w_sub w_sub_carry _ww_zdigits (w_0W p)) W0 r) + | _ => (ww_1, ww_sub w_0 w_WW w_opp_c w_opp_carry w_sub_c + w_opp w_sub w_sub_carry (WW ah al) (WW bh bl)) + end in [[WW ah al]]=[[q]]*[[WW bh bl]]+[[r]] /\ 0 <=[[r]]< [[WW bh bl]]). + assert (Hh := spec_head0 Hpos). + lazy zeta. + generalize (spec_compare (w_head0 bh) w_0); case w_compare; + rewrite spec_w_0; intros HH. + generalize Hh; rewrite HH; simpl Zpower; + rewrite Zmult_1_l; intros (HH1, HH2); clear HH. + assert (wwB <= 2*[[WW bh bl]]). + apply Zle_trans with (2*[|bh|]*wB). + rewrite wwB_wBwB; rewrite Zpower_2; apply Zmult_le_compat_r; zarith. + rewrite <- wB_div_2; apply Zmult_le_compat_l; zarith. + simpl ww_to_Z;rewrite Zmult_plus_distr_r;rewrite Zmult_assoc. + Spec_w_to_Z bl;zarith. + Spec_ww_to_Z (WW ah al). + rewrite spec_ww_sub;eauto. + simpl;rewrite spec_ww_1;rewrite Zmult_1_l;simpl. + simpl ww_to_Z in Hgt, H, HH;rewrite Zmod_small;split;zarith. + case (spec_to_Z (w_head0 bh)); auto with zarith. + assert ([|w_head0 bh|] < Zpos w_digits). + destruct (Z_lt_ge_dec [|w_head0 bh|] (Zpos w_digits));trivial. + elimtype False. + assert (2 ^ [|w_head0 bh|] * [|bh|] >= wB);auto with zarith. + apply Zle_ge; replace wB with (wB * 1);try ring. + Spec_w_to_Z bh;apply Zmult_le_compat;zarith. + unfold base;apply Zpower_le_monotone;zarith. + assert (HHHH : 0 < [|w_head0 bh|] < Zpos w_digits); auto with zarith. + assert (Hb:= Zlt_le_weak _ _ H). + generalize (spec_add_mul_div w_0 ah Hb) + (spec_add_mul_div ah al Hb) + (spec_add_mul_div al w_0 Hb) + (spec_add_mul_div bh bl Hb) + (spec_add_mul_div bl w_0 Hb); + rewrite spec_w_0; repeat rewrite Zmult_0_l;repeat rewrite Zplus_0_l; + rewrite Zdiv_0_l;repeat rewrite Zplus_0_r. + Spec_w_to_Z ah;Spec_w_to_Z bh. + unfold base;repeat rewrite Zmod_shift_r;zarith. + assert (H3:=to_Z_div_minus_p ah HHHH);assert(H4:=to_Z_div_minus_p al HHHH); + assert (H5:=to_Z_div_minus_p bl HHHH). + rewrite Zmult_comm in Hh. + assert (2^[|w_head0 bh|] < wB). unfold base;apply Zpower_lt_monotone;zarith. + unfold base in H0;rewrite Zmod_small;zarith. + fold wB; rewrite (Zmod_small ([|bh|] * 2 ^ [|w_head0 bh|]));zarith. + intros U1 U2 U3 V1 V2. + generalize (@spec_w_div32 (w_add_mul_div (w_head0 bh) w_0 ah) + (w_add_mul_div (w_head0 bh) ah al) + (w_add_mul_div (w_head0 bh) al w_0) + (w_add_mul_div (w_head0 bh) bh bl) + (w_add_mul_div (w_head0 bh) bl w_0)). + destruct (w_div32 (w_add_mul_div (w_head0 bh) w_0 ah) + (w_add_mul_div (w_head0 bh) ah al) + (w_add_mul_div (w_head0 bh) al w_0) + (w_add_mul_div (w_head0 bh) bh bl) + (w_add_mul_div (w_head0 bh) bl w_0)) as (q,r). + rewrite V1;rewrite V2. rewrite Zmult_plus_distr_l. + rewrite <- (Zplus_assoc ([|bh|] * 2 ^ [|w_head0 bh|] * wB)). + unfold base;rewrite <- shift_unshift_mod;zarith. fold wB. + replace ([|bh|] * 2 ^ [|w_head0 bh|] * wB + [|bl|] * 2 ^ [|w_head0 bh|]) with + ([[WW bh bl]] * 2^[|w_head0 bh|]). 2:simpl;ring. + fold wwB. rewrite wwB_wBwB. rewrite Zpower_2. rewrite U1;rewrite U2;rewrite U3. + rewrite Zmult_assoc. rewrite Zmult_plus_distr_l. + rewrite (Zplus_assoc ([|ah|] / 2^(Zpos(w_digits) - [|w_head0 bh|])*wB * wB)). + rewrite <- Zmult_plus_distr_l. rewrite <- Zplus_assoc. + unfold base;repeat rewrite <- shift_unshift_mod;zarith. fold wB. + replace ([|ah|] * 2 ^ [|w_head0 bh|] * wB + [|al|] * 2 ^ [|w_head0 bh|]) with + ([[WW ah al]] * 2^[|w_head0 bh|]). 2:simpl;ring. + intros Hd;destruct Hd;zarith. + simpl. apply beta_lex_inv;zarith. rewrite U1;rewrite V1. + assert ([|ah|] / 2 ^ (Zpos (w_digits) - [|w_head0 bh|]) < wB/2);zarith. + apply Zdiv_lt_upper_bound;zarith. + unfold base. + replace (2^Zpos (w_digits)) with (2^(Zpos (w_digits) - 1)*2). + rewrite Z_div_mult;zarith. rewrite <- Zpower_exp;zarith. + apply Zlt_le_trans with wB;zarith. + unfold base;apply Zpower_le_monotone;zarith. + pattern 2 at 2;replace 2 with (2^1);trivial. + rewrite <- Zpower_exp;zarith. ring_simplify (Zpos (w_digits) - 1 + 1);trivial. + change [[WW w_0 q]] with ([|w_0|]*wB+[|q|]);rewrite spec_w_0;rewrite + Zmult_0_l;rewrite Zplus_0_l. + replace [[ww_add_mul_div (ww_sub w_0 w_WW w_opp_c w_opp_carry w_sub_c w_opp w_sub w_sub_carry + _ww_zdigits (w_0W (w_head0 bh))) W0 r]] with ([[r]]/2^[|w_head0 bh|]). + assert (0 < 2^[|w_head0 bh|]). apply Zpower_gt_0;zarith. + split. + rewrite <- (Z_div_mult [[WW ah al]] (2^[|w_head0 bh|]));zarith. + rewrite H1;rewrite Zmult_assoc;apply Z_div_plus_l;trivial. + split;[apply Zdiv_le_lower_bound| apply Zdiv_lt_upper_bound];zarith. + rewrite spec_ww_add_mul_div. + rewrite spec_ww_sub; auto with zarith. + rewrite spec_ww_digits_. + change (Zpos (xO (w_digits))) with (2*Zpos (w_digits));zarith. + simpl ww_to_Z;rewrite Zmult_0_l;rewrite Zplus_0_l. + rewrite spec_w_0W. + rewrite (fun x y => Zmod_small (x-y)); auto with zarith. + ring_simplify (2 * Zpos w_digits - (2 * Zpos w_digits - [|w_head0 bh|])). + rewrite Zmod_small;zarith. + split;[apply Zdiv_le_lower_bound| apply Zdiv_lt_upper_bound];zarith. + Spec_ww_to_Z r. + apply Zlt_le_trans with wwB;zarith. + rewrite <- (Zmult_1_r wwB);apply Zmult_le_compat;zarith. + split; auto with zarith. + apply Zle_lt_trans with (2 * Zpos w_digits); auto with zarith. + unfold base, ww_digits; rewrite (Zpos_xO w_digits). + apply Zpower2_lt_lin; auto with zarith. + rewrite spec_ww_sub; auto with zarith. + rewrite spec_ww_digits_; rewrite spec_w_0W. + rewrite Zmod_small;zarith. + rewrite Zpos_xO; split; auto with zarith. + apply Zle_lt_trans with (2 * Zpos w_digits); auto with zarith. + unfold base, ww_digits; rewrite (Zpos_xO w_digits). + apply Zpower2_lt_lin; auto with zarith. + Qed. + + Lemma spec_ww_div_gt : forall a b, [[a]] > [[b]] -> 0 < [[b]] -> + let (q,r) := ww_div_gt a b in + [[a]] = [[q]] * [[b]] + [[r]] /\ + 0 <= [[r]] < [[b]]. + Proof. + intros a b Hgt Hpos;unfold ww_div_gt. + change (let (q,r) := match a, b with + | W0, _ => (W0,W0) + | _, W0 => (W0,W0) + | WW ah al, WW bh bl => + if w_eq0 ah then + let (q,r) := w_div_gt al bl in + (WW w_0 q, w_0W r) + else + match w_compare w_0 bh with + | Eq => + let(q,r):= + double_divn1 w_zdigits w_0 w_WW w_head0 w_add_mul_div w_div21 + w_compare w_sub 1 a bl in + (q, w_0W r) + | Lt => ww_div_gt_aux ah al bh bl + | Gt => (W0,W0) (* cas absurde *) + end + end in [[a]] = [[q]] * [[b]] + [[r]] /\ 0 <= [[r]] < [[b]]). + destruct a as [ |ah al]. simpl in Hgt;omega. + destruct b as [ |bh bl]. simpl in Hpos;omega. + Spec_w_to_Z ah; Spec_w_to_Z al; Spec_w_to_Z bh; Spec_w_to_Z bl. + assert (H:=@spec_eq0 ah);destruct (w_eq0 ah). + simpl ww_to_Z;rewrite H;trivial. simpl in Hgt;rewrite H in Hgt;trivial. + assert ([|bh|] <= 0). + apply beta_lex with (d:=[|al|])(b:=[|bl|]) (beta := wB);zarith. + assert ([|bh|] = 0);zarith. rewrite H1 in Hgt;rewrite H1;simpl in Hgt. + simpl. simpl in Hpos;rewrite H1 in Hpos;simpl in Hpos. + assert (H2:=spec_div_gt Hgt Hpos);destruct (w_div_gt al bl). + repeat rewrite spec_w_0W;simpl;rewrite spec_w_0;simpl;trivial. + clear H. + assert (Hcmp := spec_compare w_0 bh); destruct (w_compare w_0 bh). + rewrite spec_w_0 in Hcmp. change [[WW bh bl]] with ([|bh|]*wB+[|bl|]). + rewrite <- Hcmp;rewrite Zmult_0_l;rewrite Zplus_0_l. + simpl in Hpos;rewrite <- Hcmp in Hpos;simpl in Hpos. + assert (H2:= @spec_double_divn1 w w_digits w_zdigits w_0 w_WW w_head0 w_add_mul_div + w_div21 w_compare w_sub w_to_Z spec_to_Z spec_w_zdigits spec_w_0 spec_w_WW spec_head0 + spec_add_mul_div spec_div21 spec_compare spec_sub 1 (WW ah al) bl Hpos). + unfold double_to_Z,double_wB,double_digits in H2. + destruct (double_divn1 w_zdigits w_0 w_WW w_head0 w_add_mul_div w_div21 + w_compare w_sub 1 + (WW ah al) bl). + rewrite spec_w_0W;unfold ww_to_Z;trivial. + apply spec_ww_div_gt_aux;trivial. rewrite spec_w_0 in Hcmp;trivial. + rewrite spec_w_0 in Hcmp;elimtype False;omega. + Qed. + + Lemma spec_ww_mod_gt_aux_eq : forall ah al bh bl, + ww_mod_gt_aux ah al bh bl = snd (ww_div_gt_aux ah al bh bl). + Proof. + intros ah al bh bl. unfold ww_mod_gt_aux, ww_div_gt_aux. + case w_compare; auto. + case w_div32; auto. + Qed. + + Lemma spec_ww_mod_gt_aux : forall ah al bh bl, + [[WW ah al]] > [[WW bh bl]] -> + 0 < [|bh|] -> + [[ww_mod_gt_aux ah al bh bl]] = [[WW ah al]] mod [[WW bh bl]]. + Proof. + intros. rewrite spec_ww_mod_gt_aux_eq;trivial. + assert (H3 := spec_ww_div_gt_aux ah al bl H H0). + destruct (ww_div_gt_aux ah al bh bl) as (q,r);simpl. simpl in H,H3. + destruct H3;apply Zmod_unique with [[q]];zarith. + rewrite H1;ring. + Qed. + + Lemma spec_w_mod_gt_eq : forall a b, [|a|] > [|b|] -> 0 <[|b|] -> + [|w_mod_gt a b|] = [|snd (w_div_gt a b)|]. + Proof. + intros a b Hgt Hpos. + rewrite spec_mod_gt;trivial. + assert (H:=spec_div_gt Hgt Hpos). + destruct (w_div_gt a b) as (q,r);simpl. + rewrite Zmult_comm in H;destruct H. + symmetry;apply Zmod_unique with [|q|];trivial. + Qed. + + Lemma spec_ww_mod_gt_eq : forall a b, [[a]] > [[b]] -> 0 < [[b]] -> + [[ww_mod_gt a b]] = [[snd (ww_div_gt a b)]]. + Proof. + intros a b Hgt Hpos. + change (ww_mod_gt a b) with + (match a, b with + | W0, _ => W0 + | _, W0 => W0 + | WW ah al, WW bh bl => + if w_eq0 ah then w_0W (w_mod_gt al bl) + else + match w_compare w_0 bh with + | Eq => + w_0W (double_modn1 w_zdigits w_0 w_head0 w_add_mul_div w_div21 + w_compare w_sub 1 a bl) + | Lt => ww_mod_gt_aux ah al bh bl + | Gt => W0 (* cas absurde *) + end end). + change (ww_div_gt a b) with + (match a, b with + | W0, _ => (W0,W0) + | _, W0 => (W0,W0) + | WW ah al, WW bh bl => + if w_eq0 ah then + let (q,r) := w_div_gt al bl in + (WW w_0 q, w_0W r) + else + match w_compare w_0 bh with + | Eq => + let(q,r):= + double_divn1 w_zdigits w_0 w_WW w_head0 w_add_mul_div w_div21 + w_compare w_sub 1 a bl in + (q, w_0W r) + | Lt => ww_div_gt_aux ah al bh bl + | Gt => (W0,W0) (* cas absurde *) + end + end). + destruct a as [ |ah al];trivial. + destruct b as [ |bh bl];trivial. + Spec_w_to_Z ah; Spec_w_to_Z al; Spec_w_to_Z bh; Spec_w_to_Z bl. + assert (H:=@spec_eq0 ah);destruct (w_eq0 ah). + simpl in Hgt;rewrite H in Hgt;trivial. + assert ([|bh|] <= 0). + apply beta_lex with (d:=[|al|])(b:=[|bl|]) (beta := wB);zarith. + assert ([|bh|] = 0);zarith. rewrite H1 in Hgt;simpl in Hgt. + simpl in Hpos;rewrite H1 in Hpos;simpl in Hpos. + rewrite spec_w_0W;rewrite spec_w_mod_gt_eq;trivial. + destruct (w_div_gt al bl);simpl;rewrite spec_w_0W;trivial. + clear H. + assert (H2 := spec_compare w_0 bh);destruct (w_compare w_0 bh). + rewrite (@spec_double_modn1_aux w w_zdigits w_0 w_WW w_head0 w_add_mul_div + w_div21 w_compare w_sub w_to_Z spec_w_0 spec_compare 1 (WW ah al) bl). + destruct (double_divn1 w_zdigits w_0 w_WW w_head0 w_add_mul_div w_div21 w_compare w_sub 1 + (WW ah al) bl);simpl;trivial. + rewrite spec_ww_mod_gt_aux_eq;trivial;symmetry;trivial. + trivial. + Qed. + + Lemma spec_ww_mod_gt : forall a b, [[a]] > [[b]] -> 0 < [[b]] -> + [[ww_mod_gt a b]] = [[a]] mod [[b]]. + Proof. + intros a b Hgt Hpos. + assert (H:= spec_ww_div_gt a b Hgt Hpos). + rewrite (spec_ww_mod_gt_eq a b Hgt Hpos). + destruct (ww_div_gt a b)as(q,r);destruct H. + apply Zmod_unique with[[q]];simpl;trivial. + rewrite Zmult_comm;trivial. + Qed. + + Lemma Zis_gcd_mod : forall a b d, + 0 < b -> Zis_gcd b (a mod b) d -> Zis_gcd a b d. + Proof. + intros a b d H H1; apply Zis_gcd_for_euclid with (a/b). + pattern a at 1;rewrite (Z_div_mod_eq a b). + ring_simplify (b * (a / b) + a mod b - a / b * b);trivial. zarith. + Qed. + + Lemma spec_ww_gcd_gt_aux_body : + forall ah al bh bl n cont, + [[WW bh bl]] <= 2^n -> + [[WW ah al]] > [[WW bh bl]] -> + (forall xh xl yh yl, + [[WW xh xl]] > [[WW yh yl]] -> [[WW yh yl]] <= 2^(n-1) -> + Zis_gcd [[WW xh xl]] [[WW yh yl]] [[cont xh xl yh yl]]) -> + Zis_gcd [[WW ah al]] [[WW bh bl]] [[ww_gcd_gt_body cont ah al bh bl]]. + Proof. + intros ah al bh bl n cont Hlog Hgt Hcont. + change (ww_gcd_gt_body cont ah al bh bl) with (match w_compare w_0 bh with + | Eq => + match w_compare w_0 bl with + | Eq => WW ah al (* normalement n'arrive pas si forme normale *) + | Lt => + let m := double_modn1 w_zdigits w_0 w_head0 w_add_mul_div w_div21 + w_compare w_sub 1 (WW ah al) bl in + WW w_0 (w_gcd_gt bl m) + | Gt => W0 (* absurde *) + end + | Lt => + let m := ww_mod_gt_aux ah al bh bl in + match m with + | W0 => WW bh bl + | WW mh ml => + match w_compare w_0 mh with + | Eq => + match w_compare w_0 ml with + | Eq => WW bh bl + | _ => + let r := double_modn1 w_zdigits w_0 w_head0 w_add_mul_div w_div21 + w_compare w_sub 1 (WW bh bl) ml in + WW w_0 (w_gcd_gt ml r) + end + | Lt => + let r := ww_mod_gt_aux bh bl mh ml in + match r with + | W0 => m + | WW rh rl => cont mh ml rh rl + end + | Gt => W0 (* absurde *) + end + end + | Gt => W0 (* absurde *) + end). + assert (Hbh := spec_compare w_0 bh);destruct (w_compare w_0 bh). + simpl ww_to_Z in *. rewrite spec_w_0 in Hbh;rewrite <- Hbh; + rewrite Zmult_0_l;rewrite Zplus_0_l. + assert (Hbl := spec_compare w_0 bl); destruct (w_compare w_0 bl). + rewrite spec_w_0 in Hbl;rewrite <- Hbl;apply Zis_gcd_0. + simpl;rewrite spec_w_0;rewrite Zmult_0_l;rewrite Zplus_0_l. + rewrite spec_w_0 in Hbl. + apply Zis_gcd_mod;zarith. + change ([|ah|] * wB + [|al|]) with (double_to_Z w_digits w_to_Z 1 (WW ah al)). + rewrite <- (@spec_double_modn1 w w_digits w_zdigits w_0 w_WW w_head0 w_add_mul_div + w_div21 w_compare w_sub w_to_Z spec_to_Z spec_w_zdigits spec_w_0 spec_w_WW spec_head0 spec_add_mul_div + spec_div21 spec_compare spec_sub 1 (WW ah al) bl Hbl). + apply spec_gcd_gt. + rewrite (@spec_double_modn1 w w_digits w_zdigits w_0 w_WW); trivial. + apply Zlt_gt;match goal with | |- ?x mod ?y < ?y => + destruct (Z_mod_lt x y);zarith end. + rewrite spec_w_0 in Hbl;Spec_w_to_Z bl;elimtype False;omega. + rewrite spec_w_0 in Hbh;assert (H:= spec_ww_mod_gt_aux _ _ _ Hgt Hbh). + assert (H2 : 0 < [[WW bh bl]]). + simpl;Spec_w_to_Z bl. apply Zlt_le_trans with ([|bh|]*wB);zarith. + apply Zmult_lt_0_compat;zarith. + apply Zis_gcd_mod;trivial. rewrite <- H. + simpl in *;destruct (ww_mod_gt_aux ah al bh bl) as [ |mh ml]. + simpl;apply Zis_gcd_0;zarith. + assert (Hmh := spec_compare w_0 mh);destruct (w_compare w_0 mh). + simpl;rewrite spec_w_0 in Hmh; rewrite <- Hmh;simpl. + assert (Hml := spec_compare w_0 ml);destruct (w_compare w_0 ml). + rewrite <- Hml;rewrite spec_w_0;simpl;apply Zis_gcd_0. + simpl;rewrite spec_w_0;simpl. + rewrite spec_w_0 in Hml. apply Zis_gcd_mod;zarith. + change ([|bh|] * wB + [|bl|]) with (double_to_Z w_digits w_to_Z 1 (WW bh bl)). + rewrite <- (@spec_double_modn1 w w_digits w_zdigits w_0 w_WW w_head0 w_add_mul_div + w_div21 w_compare w_sub w_to_Z spec_to_Z spec_w_zdigits spec_w_0 spec_w_WW spec_head0 spec_add_mul_div + spec_div21 spec_compare spec_sub 1 (WW bh bl) ml Hml). + apply spec_gcd_gt. + rewrite (@spec_double_modn1 w w_digits w_zdigits w_0 w_WW); trivial. + apply Zlt_gt;match goal with | |- ?x mod ?y < ?y => + destruct (Z_mod_lt x y);zarith end. + rewrite spec_w_0 in Hml;Spec_w_to_Z ml;elimtype False;omega. + rewrite spec_w_0 in Hmh. assert ([[WW bh bl]] > [[WW mh ml]]). + rewrite H;simpl; apply Zlt_gt;match goal with | |- ?x mod ?y < ?y => + destruct (Z_mod_lt x y);zarith end. + assert (H1:= spec_ww_mod_gt_aux _ _ _ H0 Hmh). + assert (H3 : 0 < [[WW mh ml]]). + simpl;Spec_w_to_Z ml. apply Zlt_le_trans with ([|mh|]*wB);zarith. + apply Zmult_lt_0_compat;zarith. + apply Zis_gcd_mod;zarith. simpl in *;rewrite <- H1. + destruct (ww_mod_gt_aux bh bl mh ml) as [ |rh rl]. simpl; apply Zis_gcd_0. + simpl;apply Hcont. simpl in H1;rewrite H1. + apply Zlt_gt;match goal with | |- ?x mod ?y < ?y => + destruct (Z_mod_lt x y);zarith end. + apply Zle_trans with (2^n/2). + apply Zdiv_le_lower_bound;zarith. + apply Zle_trans with ([|bh|] * wB + [|bl|]);zarith. + assert (H3' := Z_div_mod_eq [[WW bh bl]] [[WW mh ml]] (Zlt_gt _ _ H3)). + assert (H4' : 0 <= [[WW bh bl]]/[[WW mh ml]]). + apply Zge_le;apply Z_div_ge0;zarith. simpl in *;rewrite H1. + pattern ([|bh|] * wB + [|bl|]) at 2;rewrite H3'. + destruct (Zle_lt_or_eq _ _ H4'). + assert (H6' : [[WW bh bl]] mod [[WW mh ml]] = + [[WW bh bl]] - [[WW mh ml]] * ([[WW bh bl]]/[[WW mh ml]])). + simpl;pattern ([|bh|] * wB + [|bl|]) at 2;rewrite H3';ring. simpl in H6'. + assert ([[WW mh ml]] <= [[WW mh ml]] * ([[WW bh bl]]/[[WW mh ml]])). + simpl;pattern ([|mh|]*wB+[|ml|]) at 1;rewrite <- Zmult_1_r;zarith. + simpl in *;assert (H8 := Z_mod_lt [[WW bh bl]] [[WW mh ml]]);simpl in H8; + zarith. + assert (H8 := Z_mod_lt [[WW bh bl]] [[WW mh ml]]);simpl in *;zarith. + rewrite <- H4 in H3';rewrite Zmult_0_r in H3';simpl in H3';zarith. + pattern n at 1;replace n with (n-1+1);try ring. + rewrite Zpower_exp;zarith. change (2^1) with 2. + rewrite Z_div_mult;zarith. + assert (2^1 <= 2^n). change (2^1) with 2;zarith. + assert (H7 := @Zpower_le_monotone_inv 2 1 n);zarith. + rewrite spec_w_0 in Hmh;Spec_w_to_Z mh;elimtype False;zarith. + rewrite spec_w_0 in Hbh;Spec_w_to_Z bh;elimtype False;zarith. + Qed. + + Lemma spec_ww_gcd_gt_aux : + forall p cont n, + (forall xh xl yh yl, + [[WW xh xl]] > [[WW yh yl]] -> + [[WW yh yl]] <= 2^n -> + Zis_gcd [[WW xh xl]] [[WW yh yl]] [[cont xh xl yh yl]]) -> + forall ah al bh bl , [[WW ah al]] > [[WW bh bl]] -> + [[WW bh bl]] <= 2^(Zpos p + n) -> + Zis_gcd [[WW ah al]] [[WW bh bl]] + [[ww_gcd_gt_aux p cont ah al bh bl]]. + Proof. + induction p;intros cont n Hcont ah al bh bl Hgt Hs;simpl ww_gcd_gt_aux. + assert (0 < Zpos p). unfold Zlt;reflexivity. + apply spec_ww_gcd_gt_aux_body with (n := Zpos (xI p) + n); + trivial;rewrite Zpos_xI. + intros. apply IHp with (n := Zpos p + n);zarith. + intros. apply IHp with (n := n );zarith. + apply Zle_trans with (2 ^ (2* Zpos p + 1+ n -1));zarith. + apply Zpower_le_monotone2;zarith. + assert (0 < Zpos p). unfold Zlt;reflexivity. + apply spec_ww_gcd_gt_aux_body with (n := Zpos (xO p) + n );trivial. + rewrite (Zpos_xO p). + intros. apply IHp with (n := Zpos p + n - 1);zarith. + intros. apply IHp with (n := n -1 );zarith. + intros;apply Hcont;zarith. + apply Zle_trans with (2^(n-1));zarith. + apply Zpower_le_monotone2;zarith. + apply Zle_trans with (2 ^ (Zpos p + n -1));zarith. + apply Zpower_le_monotone2;zarith. + apply Zle_trans with (2 ^ (2*Zpos p + n -1));zarith. + apply Zpower_le_monotone2;zarith. + apply spec_ww_gcd_gt_aux_body with (n := n+1);trivial. + rewrite Zplus_comm;trivial. + ring_simplify (n + 1 - 1);trivial. + Qed. + +End DoubleDivGt. + +Section DoubleDiv. + + Variable w : Type. + Variable w_digits : positive. + Variable ww_1 : zn2z w. + Variable ww_compare : zn2z w -> zn2z w -> comparison. + + Variable ww_div_gt : zn2z w -> zn2z w -> zn2z w * zn2z w. + Variable ww_mod_gt : zn2z w -> zn2z w -> zn2z w. + + Definition ww_div a b := + match ww_compare a b with + | Gt => ww_div_gt a b + | Eq => (ww_1, W0) + | Lt => (W0, a) + end. + + Definition ww_mod a b := + match ww_compare a b with + | Gt => ww_mod_gt a b + | Eq => W0 + | Lt => a + end. + + Variable w_to_Z : w -> Z. + Notation wB := (base w_digits). + Notation wwB := (base (ww_digits w_digits)). + Notation "[| x |]" := (w_to_Z x) (at level 0, x at level 99). + Notation "[[ x ]]" := (ww_to_Z w_digits w_to_Z x)(at level 0, x at level 99). + Variable spec_to_Z : forall x, 0 <= [|x|] < wB. + Variable spec_ww_1 : [[ww_1]] = 1. + Variable spec_ww_compare : forall x y, + match ww_compare x y with + | Eq => [[x]] = [[y]] + | Lt => [[x]] < [[y]] + | Gt => [[x]] > [[y]] + end. + Variable spec_ww_div_gt : forall a b, [[a]] > [[b]] -> 0 < [[b]] -> + let (q,r) := ww_div_gt a b in + [[a]] = [[q]] * [[b]] + [[r]] /\ + 0 <= [[r]] < [[b]]. + Variable spec_ww_mod_gt : forall a b, [[a]] > [[b]] -> 0 < [[b]] -> + [[ww_mod_gt a b]] = [[a]] mod [[b]]. + + Ltac Spec_w_to_Z x := + let H:= fresh "HH" in + assert (H:= spec_to_Z x). + + Ltac Spec_ww_to_Z x := + let H:= fresh "HH" in + assert (H:= spec_ww_to_Z w_digits w_to_Z spec_to_Z x). + + Lemma spec_ww_div : forall a b, 0 < [[b]] -> + let (q,r) := ww_div a b in + [[a]] = [[q]] * [[b]] + [[r]] /\ + 0 <= [[r]] < [[b]]. + Proof. + intros a b Hpos;unfold ww_div. + assert (H:=spec_ww_compare a b);destruct (ww_compare a b). + simpl;rewrite spec_ww_1;split;zarith. + simpl;split;[ring|Spec_ww_to_Z a;zarith]. + apply spec_ww_div_gt;trivial. + Qed. + + Lemma spec_ww_mod : forall a b, 0 < [[b]] -> + [[ww_mod a b]] = [[a]] mod [[b]]. + Proof. + intros a b Hpos;unfold ww_mod. + assert (H := spec_ww_compare a b);destruct (ww_compare a b). + simpl;apply Zmod_unique with 1;try rewrite H;zarith. + Spec_ww_to_Z a;symmetry;apply Zmod_small;zarith. + apply spec_ww_mod_gt;trivial. + Qed. + + + Variable w_0 : w. + Variable w_1 : w. + Variable w_compare : w -> w -> comparison. + Variable w_eq0 : w -> bool. + Variable w_gcd_gt : w -> w -> w. + Variable _ww_digits : positive. + Variable spec_ww_digits_ : _ww_digits = xO w_digits. + Variable ww_gcd_gt_fix : + positive -> (w -> w -> w -> w -> zn2z w) -> + w -> w -> w -> w -> zn2z w. + + Variable spec_w_0 : [|w_0|] = 0. + Variable spec_w_1 : [|w_1|] = 1. + Variable spec_compare : + forall x y, + match w_compare x y with + | Eq => [|x|] = [|y|] + | Lt => [|x|] < [|y|] + | Gt => [|x|] > [|y|] + end. + Variable spec_eq0 : forall x, w_eq0 x = true -> [|x|] = 0. + Variable spec_gcd_gt : forall a b, [|a|] > [|b|] -> + Zis_gcd [|a|] [|b|] [|w_gcd_gt a b|]. + Variable spec_gcd_gt_fix : + forall p cont n, + (forall xh xl yh yl, + [[WW xh xl]] > [[WW yh yl]] -> + [[WW yh yl]] <= 2^n -> + Zis_gcd [[WW xh xl]] [[WW yh yl]] [[cont xh xl yh yl]]) -> + forall ah al bh bl , [[WW ah al]] > [[WW bh bl]] -> + [[WW bh bl]] <= 2^(Zpos p + n) -> + Zis_gcd [[WW ah al]] [[WW bh bl]] + [[ww_gcd_gt_fix p cont ah al bh bl]]. + + Definition gcd_cont (xh xl yh yl:w) := + match w_compare w_1 yl with + | Eq => ww_1 + | _ => WW xh xl + end. + + Lemma spec_gcd_cont : forall xh xl yh yl, + [[WW xh xl]] > [[WW yh yl]] -> + [[WW yh yl]] <= 1 -> + Zis_gcd [[WW xh xl]] [[WW yh yl]] [[gcd_cont xh xl yh yl]]. + Proof. + intros xh xl yh yl Hgt' Hle. simpl in Hle. + assert ([|yh|] = 0). + change 1 with (0*wB+1) in Hle. + assert (0 <= 1 < wB). split;zarith. apply wB_pos. + assert (H1:= beta_lex _ _ _ _ _ Hle (spec_to_Z yl) H). + Spec_w_to_Z yh;zarith. + unfold gcd_cont;assert (Hcmpy:=spec_compare w_1 yl); + rewrite spec_w_1 in Hcmpy. + simpl;rewrite H;simpl;destruct (w_compare w_1 yl). + rewrite spec_ww_1;rewrite <- Hcmpy;apply Zis_gcd_mod;zarith. + rewrite <- (Zmod_unique ([|xh|]*wB+[|xl|]) 1 ([|xh|]*wB+[|xl|]) 0);zarith. + rewrite H in Hle; elimtype False;zarith. + assert ([|yl|] = 0). Spec_w_to_Z yl;zarith. + rewrite H0;simpl;apply Zis_gcd_0;trivial. + Qed. + + + Variable cont : w -> w -> w -> w -> zn2z w. + Variable spec_cont : forall xh xl yh yl, + [[WW xh xl]] > [[WW yh yl]] -> + [[WW yh yl]] <= 1 -> + Zis_gcd [[WW xh xl]] [[WW yh yl]] [[cont xh xl yh yl]]. + + Definition ww_gcd_gt a b := + match a, b with + | W0, _ => b + | _, W0 => a + | WW ah al, WW bh bl => + if w_eq0 ah then (WW w_0 (w_gcd_gt al bl)) + else ww_gcd_gt_fix _ww_digits cont ah al bh bl + end. + + Definition ww_gcd a b := + Eval lazy beta delta [ww_gcd_gt] in + match ww_compare a b with + | Gt => ww_gcd_gt a b + | Eq => a + | Lt => ww_gcd_gt b a + end. + + Lemma spec_ww_gcd_gt : forall a b, [[a]] > [[b]] -> + Zis_gcd [[a]] [[b]] [[ww_gcd_gt a b]]. + Proof. + intros a b Hgt;unfold ww_gcd_gt. + destruct a as [ |ah al]. simpl;apply Zis_gcd_sym;apply Zis_gcd_0. + destruct b as [ |bh bl]. simpl;apply Zis_gcd_0. + simpl in Hgt. generalize (@spec_eq0 ah);destruct (w_eq0 ah);intros. + simpl;rewrite H in Hgt;trivial;rewrite H;trivial;rewrite spec_w_0;simpl. + assert ([|bh|] <= 0). + apply beta_lex with (d:=[|al|])(b:=[|bl|]) (beta := wB);zarith. + Spec_w_to_Z bh;assert ([|bh|] = 0);zarith. rewrite H1 in Hgt;simpl in Hgt. + rewrite H1;simpl;auto. clear H. + apply spec_gcd_gt_fix with (n:= 0);trivial. + rewrite Zplus_0_r;rewrite spec_ww_digits_. + change (2 ^ Zpos (xO w_digits)) with wwB. Spec_ww_to_Z (WW bh bl);zarith. + Qed. + + Lemma spec_ww_gcd : forall a b, Zis_gcd [[a]] [[b]] [[ww_gcd a b]]. + Proof. + intros a b. + change (ww_gcd a b) with + (match ww_compare a b with + | Gt => ww_gcd_gt a b + | Eq => a + | Lt => ww_gcd_gt b a + end). + assert (Hcmp := spec_ww_compare a b);destruct (ww_compare a b). + Spec_ww_to_Z b;rewrite Hcmp. + apply Zis_gcd_for_euclid with 1;zarith. + ring_simplify ([[b]] - 1 * [[b]]). apply Zis_gcd_0;zarith. + apply Zis_gcd_sym;apply spec_ww_gcd_gt;zarith. + apply spec_ww_gcd_gt;zarith. + Qed. + +End DoubleDiv. + diff --git a/theories/Numbers/Cyclic/DoubleCyclic/DoubleDivn1.v b/theories/Numbers/Cyclic/DoubleCyclic/DoubleDivn1.v new file mode 100644 index 00000000..d6f6a05f --- /dev/null +++ b/theories/Numbers/Cyclic/DoubleCyclic/DoubleDivn1.v @@ -0,0 +1,528 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* w -> zn2z w. + Variable w_head0 : w -> w. + Variable w_add_mul_div : w -> w -> w -> w. + Variable w_div21 : w -> w -> w -> w * w. + Variable w_compare : w -> w -> comparison. + Variable w_sub : w -> w -> w. + + + + (* ** For proofs ** *) + Variable w_to_Z : w -> Z. + + Notation wB := (base w_digits). + + Notation "[| x |]" := (w_to_Z x) (at level 0, x at level 99). + Notation "[! n | x !]" := (double_to_Z w_digits w_to_Z n x) + (at level 0, x at level 99). + Notation "[[ x ]]" := (zn2z_to_Z wB w_to_Z x) (at level 0, x at level 99). + + Variable spec_to_Z : forall x, 0 <= [| x |] < wB. + Variable spec_w_zdigits: [|w_zdigits|] = Zpos w_digits. + Variable spec_0 : [|w_0|] = 0. + Variable spec_WW : forall h l, [[w_WW h l]] = [|h|] * wB + [|l|]. + Variable spec_head0 : forall x, 0 < [|x|] -> + wB/ 2 <= 2 ^ [|w_head0 x|] * [|x|] < wB. + Variable spec_add_mul_div : forall x y p, + [|p|] <= Zpos w_digits -> + [| w_add_mul_div p x y |] = + ([|x|] * (2 ^ [|p|]) + + [|y|] / (2 ^ ((Zpos w_digits) - [|p|]))) mod wB. + Variable spec_div21 : forall a1 a2 b, + wB/2 <= [|b|] -> + [|a1|] < [|b|] -> + let (q,r) := w_div21 a1 a2 b in + [|a1|] *wB+ [|a2|] = [|q|] * [|b|] + [|r|] /\ + 0 <= [|r|] < [|b|]. + Variable spec_compare : + forall x y, + match w_compare x y with + | Eq => [|x|] = [|y|] + | Lt => [|x|] < [|y|] + | Gt => [|x|] > [|y|] + end. + Variable spec_sub: forall x y, + [|w_sub x y|] = ([|x|] - [|y|]) mod wB. + + + + Section DIVAUX. + Variable b2p : w. + Variable b2p_le : wB/2 <= [|b2p|]. + + Definition double_divn1_0_aux n (divn1: w -> word w n -> word w n * w) r h := + let (hh,hl) := double_split w_0 n h in + let (qh,rh) := divn1 r hh in + let (ql,rl) := divn1 rh hl in + (double_WW w_WW n qh ql, rl). + + Fixpoint double_divn1_0 (n:nat) : w -> word w n -> word w n * w := + match n return w -> word w n -> word w n * w with + | O => fun r x => w_div21 r x b2p + | S n => double_divn1_0_aux n (double_divn1_0 n) + end. + + Lemma spec_split : forall (n : nat) (x : zn2z (word w n)), + let (h, l) := double_split w_0 n x in + [!S n | x!] = [!n | h!] * double_wB w_digits n + [!n | l!]. + Proof (spec_double_split w_0 w_digits w_to_Z spec_0). + + Lemma spec_double_divn1_0 : forall n r a, + [|r|] < [|b2p|] -> + let (q,r') := double_divn1_0 n r a in + [|r|] * double_wB w_digits n + [!n|a!] = [!n|q!] * [|b2p|] + [|r'|] /\ + 0 <= [|r'|] < [|b2p|]. + Proof. + induction n;intros. + exact (spec_div21 a b2p_le H). + simpl (double_divn1_0 (S n) r a); unfold double_divn1_0_aux. + assert (H1 := spec_split n a);destruct (double_split w_0 n a) as (hh,hl). + rewrite H1. + assert (H2 := IHn r hh H);destruct (double_divn1_0 n r hh) as (qh,rh). + destruct H2. + assert ([|rh|] < [|b2p|]). omega. + assert (H4 := IHn rh hl H3);destruct (double_divn1_0 n rh hl) as (ql,rl). + destruct H4;split;trivial. + rewrite spec_double_WW;trivial. + rewrite <- double_wB_wwB. + rewrite Zmult_assoc;rewrite Zplus_assoc;rewrite <- Zmult_plus_distr_l. + rewrite H0;rewrite Zmult_plus_distr_l;rewrite <- Zplus_assoc. + rewrite H4;ring. + Qed. + + Definition double_modn1_0_aux n (modn1:w -> word w n -> w) r h := + let (hh,hl) := double_split w_0 n h in modn1 (modn1 r hh) hl. + + Fixpoint double_modn1_0 (n:nat) : w -> word w n -> w := + match n return w -> word w n -> w with + | O => fun r x => snd (w_div21 r x b2p) + | S n => double_modn1_0_aux n (double_modn1_0 n) + end. + + Lemma spec_double_modn1_0 : forall n r x, + double_modn1_0 n r x = snd (double_divn1_0 n r x). + Proof. + induction n;simpl;intros;trivial. + unfold double_modn1_0_aux, double_divn1_0_aux. + destruct (double_split w_0 n x) as (hh,hl). + rewrite (IHn r hh). + destruct (double_divn1_0 n r hh) as (qh,rh);simpl. + rewrite IHn. destruct (double_divn1_0 n rh hl);trivial. + Qed. + + Variable p : w. + Variable p_bounded : [|p|] <= Zpos w_digits. + + Lemma spec_add_mul_divp : forall x y, + [| w_add_mul_div p x y |] = + ([|x|] * (2 ^ [|p|]) + + [|y|] / (2 ^ ((Zpos w_digits) - [|p|]))) mod wB. + Proof. + intros;apply spec_add_mul_div;auto. + Qed. + + Definition double_divn1_p_aux n + (divn1 : w -> word w n -> word w n -> word w n * w) r h l := + let (hh,hl) := double_split w_0 n h in + let (lh,ll) := double_split w_0 n l in + let (qh,rh) := divn1 r hh hl in + let (ql,rl) := divn1 rh hl lh in + (double_WW w_WW n qh ql, rl). + + Fixpoint double_divn1_p (n:nat) : w -> word w n -> word w n -> word w n * w := + match n return w -> word w n -> word w n -> word w n * w with + | O => fun r h l => w_div21 r (w_add_mul_div p h l) b2p + | S n => double_divn1_p_aux n (double_divn1_p n) + end. + + Lemma p_lt_double_digits : forall n, [|p|] <= Zpos (double_digits w_digits n). + Proof. +(* + induction n;simpl. destruct p_bounded;trivial. + case (spec_to_Z p); rewrite Zpos_xO;auto with zarith. +*) + induction n;simpl. trivial. + case (spec_to_Z p); rewrite Zpos_xO;auto with zarith. + Qed. + + Lemma spec_double_divn1_p : forall n r h l, + [|r|] < [|b2p|] -> + let (q,r') := double_divn1_p n r h l in + [|r|] * double_wB w_digits n + + ([!n|h!]*2^[|p|] + + [!n|l!] / (2^(Zpos(double_digits w_digits n) - [|p|]))) + mod double_wB w_digits n = [!n|q!] * [|b2p|] + [|r'|] /\ + 0 <= [|r'|] < [|b2p|]. + Proof. + case (spec_to_Z p); intros HH0 HH1. + induction n;intros. + simpl (double_divn1_p 0 r h l). + unfold double_to_Z, double_wB, double_digits. + rewrite <- spec_add_mul_divp. + exact (spec_div21 (w_add_mul_div p h l) b2p_le H). + simpl (double_divn1_p (S n) r h l). + unfold double_divn1_p_aux. + assert (H1 := spec_split n h);destruct (double_split w_0 n h) as (hh,hl). + rewrite H1. rewrite <- double_wB_wwB. + assert (H2 := spec_split n l);destruct (double_split w_0 n l) as (lh,ll). + rewrite H2. + replace ([|r|] * (double_wB w_digits n * double_wB w_digits n) + + (([!n|hh!] * double_wB w_digits n + [!n|hl!]) * 2 ^ [|p|] + + ([!n|lh!] * double_wB w_digits n + [!n|ll!]) / + 2^(Zpos (double_digits w_digits (S n)) - [|p|])) mod + (double_wB w_digits n * double_wB w_digits n)) with + (([|r|] * double_wB w_digits n + ([!n|hh!] * 2^[|p|] + + [!n|hl!] / 2^(Zpos (double_digits w_digits n) - [|p|])) mod + double_wB w_digits n) * double_wB w_digits n + + ([!n|hl!] * 2^[|p|] + + [!n|lh!] / 2^(Zpos (double_digits w_digits n) - [|p|])) mod + double_wB w_digits n). + generalize (IHn r hh hl H);destruct (double_divn1_p n r hh hl) as (qh,rh); + intros (H3,H4);rewrite H3. + assert ([|rh|] < [|b2p|]). omega. + replace (([!n|qh!] * [|b2p|] + [|rh|]) * double_wB w_digits n + + ([!n|hl!] * 2 ^ [|p|] + + [!n|lh!] / 2 ^ (Zpos (double_digits w_digits n) - [|p|])) mod + double_wB w_digits n) with + ([!n|qh!] * [|b2p|] *double_wB w_digits n + ([|rh|]*double_wB w_digits n + + ([!n|hl!] * 2 ^ [|p|] + + [!n|lh!] / 2 ^ (Zpos (double_digits w_digits n) - [|p|])) mod + double_wB w_digits n)). 2:ring. + generalize (IHn rh hl lh H0);destruct (double_divn1_p n rh hl lh) as (ql,rl); + intros (H5,H6);rewrite H5. + split;[rewrite spec_double_WW;trivial;ring|trivial]. + assert (Uhh := spec_double_to_Z w_digits w_to_Z spec_to_Z n hh); + unfold double_wB,base in Uhh. + assert (Uhl := spec_double_to_Z w_digits w_to_Z spec_to_Z n hl); + unfold double_wB,base in Uhl. + assert (Ulh := spec_double_to_Z w_digits w_to_Z spec_to_Z n lh); + unfold double_wB,base in Ulh. + assert (Ull := spec_double_to_Z w_digits w_to_Z spec_to_Z n ll); + unfold double_wB,base in Ull. + unfold double_wB,base. + assert (UU:=p_lt_double_digits n). + rewrite Zdiv_shift_r;auto with zarith. + 2:change (Zpos (double_digits w_digits (S n))) + with (2*Zpos (double_digits w_digits n));auto with zarith. + replace (2 ^ (Zpos (double_digits w_digits (S n)) - [|p|])) with + (2^(Zpos (double_digits w_digits n) - [|p|])*2^Zpos (double_digits w_digits n)). + rewrite Zdiv_mult_cancel_r;auto with zarith. + rewrite Zmult_plus_distr_l with (p:= 2^[|p|]). + pattern ([!n|hl!] * 2^[|p|]) at 2; + rewrite (shift_unshift_mod (Zpos(double_digits w_digits n))([|p|])([!n|hl!])); + auto with zarith. + rewrite Zplus_assoc. + replace + ([!n|hh!] * 2^Zpos (double_digits w_digits n)* 2^[|p|] + + ([!n|hl!] / 2^(Zpos (double_digits w_digits n)-[|p|])* + 2^Zpos(double_digits w_digits n))) + with + (([!n|hh!] *2^[|p|] + double_to_Z w_digits w_to_Z n hl / + 2^(Zpos (double_digits w_digits n)-[|p|])) + * 2^Zpos(double_digits w_digits n));try (ring;fail). + rewrite <- Zplus_assoc. + rewrite <- (Zmod_shift_r ([|p|]));auto with zarith. + replace + (2 ^ Zpos (double_digits w_digits n) * 2 ^ Zpos (double_digits w_digits n)) with + (2 ^ (Zpos (double_digits w_digits n) + Zpos (double_digits w_digits n))). + rewrite (Zmod_shift_r (Zpos (double_digits w_digits n)));auto with zarith. + replace (2 ^ (Zpos (double_digits w_digits n) + Zpos (double_digits w_digits n))) + with (2^Zpos(double_digits w_digits n) *2^Zpos(double_digits w_digits n)). + rewrite (Zmult_comm (([!n|hh!] * 2 ^ [|p|] + + [!n|hl!] / 2 ^ (Zpos (double_digits w_digits n) - [|p|])))). + rewrite Zmult_mod_distr_l;auto with zarith. + ring. + rewrite Zpower_exp;auto with zarith. + assert (0 < Zpos (double_digits w_digits n)). unfold Zlt;reflexivity. + auto with zarith. + apply Z_mod_lt;auto with zarith. + rewrite Zpower_exp;auto with zarith. + split;auto with zarith. + apply Zdiv_lt_upper_bound;auto with zarith. + rewrite <- Zpower_exp;auto with zarith. + replace ([|p|] + (Zpos (double_digits w_digits n) - [|p|])) with + (Zpos(double_digits w_digits n));auto with zarith. + rewrite <- Zpower_exp;auto with zarith. + replace (Zpos (double_digits w_digits (S n)) - [|p|]) with + (Zpos (double_digits w_digits n) - [|p|] + + Zpos (double_digits w_digits n));trivial. + change (Zpos (double_digits w_digits (S n))) with + (2*Zpos (double_digits w_digits n)). ring. + Qed. + + Definition double_modn1_p_aux n (modn1 : w -> word w n -> word w n -> w) r h l:= + let (hh,hl) := double_split w_0 n h in + let (lh,ll) := double_split w_0 n l in + modn1 (modn1 r hh hl) hl lh. + + Fixpoint double_modn1_p (n:nat) : w -> word w n -> word w n -> w := + match n return w -> word w n -> word w n -> w with + | O => fun r h l => snd (w_div21 r (w_add_mul_div p h l) b2p) + | S n => double_modn1_p_aux n (double_modn1_p n) + end. + + Lemma spec_double_modn1_p : forall n r h l , + double_modn1_p n r h l = snd (double_divn1_p n r h l). + Proof. + induction n;simpl;intros;trivial. + unfold double_modn1_p_aux, double_divn1_p_aux. + destruct(double_split w_0 n h)as(hh,hl);destruct(double_split w_0 n l) as (lh,ll). + rewrite (IHn r hh hl);destruct (double_divn1_p n r hh hl) as (qh,rh). + rewrite IHn;simpl;destruct (double_divn1_p n rh hl lh);trivial. + Qed. + + End DIVAUX. + + Fixpoint high (n:nat) : word w n -> w := + match n return word w n -> w with + | O => fun a => a + | S n => + fun (a:zn2z (word w n)) => + match a with + | W0 => w_0 + | WW h l => high n h + end + end. + + Lemma spec_double_digits:forall n, Zpos w_digits <= Zpos (double_digits w_digits n). + Proof. + induction n;simpl;auto with zarith. + change (Zpos (xO (double_digits w_digits n))) with + (2*Zpos (double_digits w_digits n)). + assert (0 < Zpos w_digits);auto with zarith. + exact (refl_equal Lt). + Qed. + + Lemma spec_high : forall n (x:word w n), + [|high n x|] = [!n|x!] / 2^(Zpos (double_digits w_digits n) - Zpos w_digits). + Proof. + induction n;intros. + unfold high,double_digits,double_to_Z. + replace (Zpos w_digits - Zpos w_digits) with 0;try ring. + simpl. rewrite <- (Zdiv_unique [|x|] 1 [|x|] 0);auto with zarith. + assert (U2 := spec_double_digits n). + assert (U3 : 0 < Zpos w_digits). exact (refl_equal Lt). + destruct x;unfold high;fold high. + unfold double_to_Z,zn2z_to_Z;rewrite spec_0. + rewrite Zdiv_0_l;trivial. + assert (U0 := spec_double_to_Z w_digits w_to_Z spec_to_Z n w0); + assert (U1 := spec_double_to_Z w_digits w_to_Z spec_to_Z n w1). + simpl [!S n|WW w0 w1!]. + unfold double_wB,base;rewrite Zdiv_shift_r;auto with zarith. + replace (2 ^ (Zpos (double_digits w_digits (S n)) - Zpos w_digits)) with + (2^(Zpos (double_digits w_digits n) - Zpos w_digits) * + 2^Zpos (double_digits w_digits n)). + rewrite Zdiv_mult_cancel_r;auto with zarith. + rewrite <- Zpower_exp;auto with zarith. + replace (Zpos (double_digits w_digits n) - Zpos w_digits + + Zpos (double_digits w_digits n)) with + (Zpos (double_digits w_digits (S n)) - Zpos w_digits);trivial. + change (Zpos (double_digits w_digits (S n))) with + (2*Zpos (double_digits w_digits n));ring. + change (Zpos (double_digits w_digits (S n))) with + (2*Zpos (double_digits w_digits n)); auto with zarith. + Qed. + + Definition double_divn1 (n:nat) (a:word w n) (b:w) := + let p := w_head0 b in + match w_compare p w_0 with + | Gt => + let b2p := w_add_mul_div p b w_0 in + let ha := high n a in + let k := w_sub w_zdigits p in + let lsr_n := w_add_mul_div k w_0 in + let r0 := w_add_mul_div p w_0 ha in + let (q,r) := double_divn1_p b2p p n r0 a (double_0 w_0 n) in + (q, lsr_n r) + | _ => double_divn1_0 b n w_0 a + end. + + Lemma spec_double_divn1 : forall n a b, + 0 < [|b|] -> + let (q,r) := double_divn1 n a b in + [!n|a!] = [!n|q!] * [|b|] + [|r|] /\ + 0 <= [|r|] < [|b|]. + Proof. + intros n a b H. unfold double_divn1. + case (spec_head0 H); intros H0 H1. + case (spec_to_Z (w_head0 b)); intros HH1 HH2. + generalize (spec_compare (w_head0 b) w_0); case w_compare; + rewrite spec_0; intros H2; auto with zarith. + assert (Hv1: wB/2 <= [|b|]). + generalize H0; rewrite H2; rewrite Zpower_0_r; + rewrite Zmult_1_l; auto. + assert (Hv2: [|w_0|] < [|b|]). + rewrite spec_0; auto. + generalize (spec_double_divn1_0 Hv1 n a Hv2). + rewrite spec_0;rewrite Zmult_0_l; rewrite Zplus_0_l; auto. + contradict H2; auto with zarith. + assert (HHHH : 0 < [|w_head0 b|]); auto with zarith. + assert ([|w_head0 b|] < Zpos w_digits). + case (Zle_or_lt (Zpos w_digits) [|w_head0 b|]); auto; intros HH. + assert (2 ^ [|w_head0 b|] < wB). + apply Zle_lt_trans with (2 ^ [|w_head0 b|] * [|b|]);auto with zarith. + replace (2 ^ [|w_head0 b|]) with (2^[|w_head0 b|] * 1);try (ring;fail). + apply Zmult_le_compat;auto with zarith. + assert (wB <= 2^[|w_head0 b|]). + unfold base;apply Zpower_le_monotone;auto with zarith. omega. + assert ([|w_add_mul_div (w_head0 b) b w_0|] = + 2 ^ [|w_head0 b|] * [|b|]). + rewrite (spec_add_mul_div b w_0); auto with zarith. + rewrite spec_0;rewrite Zdiv_0_l; try omega. + rewrite Zplus_0_r; rewrite Zmult_comm. + rewrite Zmod_small; auto with zarith. + assert (H5 := spec_to_Z (high n a)). + assert + ([|w_add_mul_div (w_head0 b) w_0 (high n a)|] + <[|w_add_mul_div (w_head0 b) b w_0|]). + rewrite H4. + rewrite spec_add_mul_div;auto with zarith. + rewrite spec_0;rewrite Zmult_0_l;rewrite Zplus_0_l. + assert (([|high n a|]/2^(Zpos w_digits - [|w_head0 b|])) < wB). + apply Zdiv_lt_upper_bound;auto with zarith. + apply Zlt_le_trans with wB;auto with zarith. + pattern wB at 1;replace wB with (wB*1);try ring. + apply Zmult_le_compat;auto with zarith. + assert (H6 := Zpower_gt_0 2 (Zpos w_digits - [|w_head0 b|])); + auto with zarith. + rewrite Zmod_small;auto with zarith. + apply Zdiv_lt_upper_bound;auto with zarith. + apply Zlt_le_trans with wB;auto with zarith. + apply Zle_trans with (2 ^ [|w_head0 b|] * [|b|] * 2). + rewrite <- wB_div_2; try omega. + apply Zmult_le_compat;auto with zarith. + pattern 2 at 1;rewrite <- Zpower_1_r. + apply Zpower_le_monotone;split;auto with zarith. + rewrite <- H4 in H0. + assert (Hb3: [|w_head0 b|] <= Zpos w_digits); auto with zarith. + assert (H7:= spec_double_divn1_p H0 Hb3 n a (double_0 w_0 n) H6). + destruct (double_divn1_p (w_add_mul_div (w_head0 b) b w_0) (w_head0 b) n + (w_add_mul_div (w_head0 b) w_0 (high n a)) a + (double_0 w_0 n)) as (q,r). + assert (U:= spec_double_digits n). + rewrite spec_double_0 in H7;trivial;rewrite Zdiv_0_l in H7. + rewrite Zplus_0_r in H7. + rewrite spec_add_mul_div in H7;auto with zarith. + rewrite spec_0 in H7;rewrite Zmult_0_l in H7;rewrite Zplus_0_l in H7. + assert (([|high n a|] / 2 ^ (Zpos w_digits - [|w_head0 b|])) mod wB + = [!n|a!] / 2^(Zpos (double_digits w_digits n) - [|w_head0 b|])). + rewrite Zmod_small;auto with zarith. + rewrite spec_high. rewrite Zdiv_Zdiv;auto with zarith. + rewrite <- Zpower_exp;auto with zarith. + replace (Zpos (double_digits w_digits n) - Zpos w_digits + + (Zpos w_digits - [|w_head0 b|])) + with (Zpos (double_digits w_digits n) - [|w_head0 b|]);trivial;ring. + assert (H8 := Zpower_gt_0 2 (Zpos w_digits - [|w_head0 b|]));auto with zarith. + split;auto with zarith. + apply Zle_lt_trans with ([|high n a|]);auto with zarith. + apply Zdiv_le_upper_bound;auto with zarith. + pattern ([|high n a|]) at 1;rewrite <- Zmult_1_r. + apply Zmult_le_compat;auto with zarith. + rewrite H8 in H7;unfold double_wB,base in H7. + rewrite <- shift_unshift_mod in H7;auto with zarith. + rewrite H4 in H7. + assert ([|w_add_mul_div (w_sub w_zdigits (w_head0 b)) w_0 r|] + = [|r|]/2^[|w_head0 b|]). + rewrite spec_add_mul_div. + rewrite spec_0;rewrite Zmult_0_l;rewrite Zplus_0_l. + replace (Zpos w_digits - [|w_sub w_zdigits (w_head0 b)|]) + with ([|w_head0 b|]). + rewrite Zmod_small;auto with zarith. + assert (H9 := spec_to_Z r). + split;auto with zarith. + apply Zle_lt_trans with ([|r|]);auto with zarith. + apply Zdiv_le_upper_bound;auto with zarith. + pattern ([|r|]) at 1;rewrite <- Zmult_1_r. + apply Zmult_le_compat;auto with zarith. + assert (H10 := Zpower_gt_0 2 ([|w_head0 b|]));auto with zarith. + rewrite spec_sub. + rewrite Zmod_small; auto with zarith. + split; auto with zarith. + case (spec_to_Z w_zdigits); auto with zarith. + rewrite spec_sub. + rewrite Zmod_small; auto with zarith. + split; auto with zarith. + case (spec_to_Z w_zdigits); auto with zarith. + case H7; intros H71 H72. + split. + rewrite <- (Z_div_mult [!n|a!] (2^[|w_head0 b|]));auto with zarith. + rewrite H71;rewrite H9. + replace ([!n|q!] * (2 ^ [|w_head0 b|] * [|b|])) + with ([!n|q!] *[|b|] * 2^[|w_head0 b|]); + try (ring;fail). + rewrite Z_div_plus_l;auto with zarith. + assert (H10 := spec_to_Z + (w_add_mul_div (w_sub w_zdigits (w_head0 b)) w_0 r));split; + auto with zarith. + rewrite H9. + apply Zdiv_lt_upper_bound;auto with zarith. + rewrite Zmult_comm;auto with zarith. + exact (spec_double_to_Z w_digits w_to_Z spec_to_Z n a). + Qed. + + + Definition double_modn1 (n:nat) (a:word w n) (b:w) := + let p := w_head0 b in + match w_compare p w_0 with + | Gt => + let b2p := w_add_mul_div p b w_0 in + let ha := high n a in + let k := w_sub w_zdigits p in + let lsr_n := w_add_mul_div k w_0 in + let r0 := w_add_mul_div p w_0 ha in + let r := double_modn1_p b2p p n r0 a (double_0 w_0 n) in + lsr_n r + | _ => double_modn1_0 b n w_0 a + end. + + Lemma spec_double_modn1_aux : forall n a b, + double_modn1 n a b = snd (double_divn1 n a b). + Proof. + intros n a b;unfold double_divn1,double_modn1. + generalize (spec_compare (w_head0 b) w_0); case w_compare; + rewrite spec_0; intros H2; auto with zarith. + apply spec_double_modn1_0. + apply spec_double_modn1_0. + rewrite spec_double_modn1_p. + destruct (double_divn1_p (w_add_mul_div (w_head0 b) b w_0) (w_head0 b) n + (w_add_mul_div (w_head0 b) w_0 (high n a)) a (double_0 w_0 n));simpl;trivial. + Qed. + + Lemma spec_double_modn1 : forall n a b, 0 < [|b|] -> + [|double_modn1 n a b|] = [!n|a!] mod [|b|]. + Proof. + intros n a b H;assert (H1 := spec_double_divn1 n a H). + assert (H2 := spec_double_modn1_aux n a b). + rewrite H2;destruct (double_divn1 n a b) as (q,r). + simpl;apply Zmod_unique with (double_to_Z w_digits w_to_Z n q);auto with zarith. + destruct H1 as (h1,h2);rewrite h1;ring. + Qed. + +End GENDIVN1. diff --git a/theories/Numbers/Cyclic/DoubleCyclic/DoubleLift.v b/theories/Numbers/Cyclic/DoubleCyclic/DoubleLift.v new file mode 100644 index 00000000..50c72487 --- /dev/null +++ b/theories/Numbers/Cyclic/DoubleCyclic/DoubleLift.v @@ -0,0 +1,487 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* w -> zn2z w. + Variable w_W0 : w -> zn2z w. + Variable w_0W : w -> zn2z w. + Variable w_compare : w -> w -> comparison. + Variable ww_compare : zn2z w -> zn2z w -> comparison. + Variable w_head0 : w -> w. + Variable w_tail0 : w -> w. + Variable w_add: w -> w -> zn2z w. + Variable w_add_mul_div : w -> w -> w -> w. + Variable ww_sub: zn2z w -> zn2z w -> zn2z w. + Variable w_digits : positive. + Variable ww_Digits : positive. + Variable w_zdigits : w. + Variable ww_zdigits : zn2z w. + Variable low: zn2z w -> w. + + Definition ww_head0 x := + match x with + | W0 => ww_zdigits + | WW xh xl => + match w_compare w_0 xh with + | Eq => w_add w_zdigits (w_head0 xl) + | _ => w_0W (w_head0 xh) + end + end. + + + Definition ww_tail0 x := + match x with + | W0 => ww_zdigits + | WW xh xl => + match w_compare w_0 xl with + | Eq => w_add w_zdigits (w_tail0 xh) + | _ => w_0W (w_tail0 xl) + end + end. + + + (* 0 < p < ww_digits *) + Definition ww_add_mul_div p x y := + let zdigits := w_0W w_zdigits in + match x, y with + | W0, W0 => W0 + | W0, WW yh yl => + match ww_compare p zdigits with + | Eq => w_0W yh + | Lt => w_0W (w_add_mul_div (low p) w_0 yh) + | Gt => + let n := low (ww_sub p zdigits) in + w_WW (w_add_mul_div n w_0 yh) (w_add_mul_div n yh yl) + end + | WW xh xl, W0 => + match ww_compare p zdigits with + | Eq => w_W0 xl + | Lt => w_WW (w_add_mul_div (low p) xh xl) (w_add_mul_div (low p) xl w_0) + | Gt => + let n := low (ww_sub p zdigits) in + w_W0 (w_add_mul_div n xl w_0) + end + | WW xh xl, WW yh yl => + match ww_compare p zdigits with + | Eq => w_WW xl yh + | Lt => w_WW (w_add_mul_div (low p) xh xl) (w_add_mul_div (low p) xl yh) + | Gt => + let n := low (ww_sub p zdigits) in + w_WW (w_add_mul_div n xl yh) (w_add_mul_div n yh yl) + end + end. + + Section DoubleProof. + Variable w_to_Z : w -> Z. + + Notation wB := (base w_digits). + Notation wwB := (base (ww_digits w_digits)). + Notation "[| x |]" := (w_to_Z x) (at level 0, x at level 99). + Notation "[[ x ]]" := (ww_to_Z w_digits w_to_Z x)(at level 0, x at level 99). + + Variable spec_w_0 : [|w_0|] = 0. + Variable spec_to_Z : forall x, 0 <= [|x|] < wB. + Variable spec_to_w_Z : forall x, 0 <= [[x]] < wwB. + Variable spec_w_WW : forall h l, [[w_WW h l]] = [|h|] * wB + [|l|]. + Variable spec_w_W0 : forall h, [[w_W0 h]] = [|h|] * wB. + Variable spec_w_0W : forall l, [[w_0W l]] = [|l|]. + Variable spec_compare : forall x y, + match w_compare x y with + | Eq => [|x|] = [|y|] + | Lt => [|x|] < [|y|] + | Gt => [|x|] > [|y|] + end. + Variable spec_ww_compare : forall x y, + match ww_compare x y with + | Eq => [[x]] = [[y]] + | Lt => [[x]] < [[y]] + | Gt => [[x]] > [[y]] + end. + Variable spec_ww_digits : ww_Digits = xO w_digits. + Variable spec_w_head00 : forall x, [|x|] = 0 -> [|w_head0 x|] = Zpos w_digits. + Variable spec_w_head0 : forall x, 0 < [|x|] -> + wB/ 2 <= 2 ^ ([|w_head0 x|]) * [|x|] < wB. + Variable spec_w_tail00 : forall x, [|x|] = 0 -> [|w_tail0 x|] = Zpos w_digits. + Variable spec_w_tail0 : forall x, 0 < [|x|] -> + exists y, 0 <= y /\ [|x|] = (2* y + 1) * (2 ^ [|w_tail0 x|]). + Variable spec_w_add_mul_div : forall x y p, + [|p|] <= Zpos w_digits -> + [| w_add_mul_div p x y |] = + ([|x|] * (2 ^ [|p|]) + + [|y|] / (2 ^ ((Zpos w_digits) - [|p|]))) mod wB. + Variable spec_w_add: forall x y, + [[w_add x y]] = [|x|] + [|y|]. + Variable spec_ww_sub: forall x y, + [[ww_sub x y]] = ([[x]] - [[y]]) mod wwB. + + Variable spec_zdigits : [| w_zdigits |] = Zpos w_digits. + Variable spec_low: forall x, [| low x|] = [[x]] mod wB. + + Variable spec_ww_zdigits : [[ww_zdigits]] = Zpos ww_Digits. + + Hint Resolve div_le_0 div_lt w_to_Z_wwB: lift. + Ltac zarith := auto with zarith lift. + + Lemma spec_ww_head00 : forall x, [[x]] = 0 -> [[ww_head0 x]] = Zpos ww_Digits. + Proof. + intros x; case x; unfold ww_head0. + intros HH; rewrite spec_ww_zdigits; auto. + intros xh xl; simpl; intros Hx. + case (spec_to_Z xh); intros Hx1 Hx2. + case (spec_to_Z xl); intros Hy1 Hy2. + assert (F1: [|xh|] = 0). + case (Zle_lt_or_eq _ _ Hy1); auto; intros Hy3. + absurd (0 < [|xh|] * wB + [|xl|]); auto with zarith. + apply Zlt_le_trans with (1 := Hy3); auto with zarith. + pattern [|xl|] at 1; rewrite <- (Zplus_0_l [|xl|]). + apply Zplus_le_compat_r; auto with zarith. + case (Zle_lt_or_eq _ _ Hx1); auto; intros Hx3. + absurd (0 < [|xh|] * wB + [|xl|]); auto with zarith. + rewrite <- Hy3; rewrite Zplus_0_r; auto with zarith. + apply Zmult_lt_0_compat; auto with zarith. + generalize (spec_compare w_0 xh); case w_compare. + intros H; simpl. + rewrite spec_w_add; rewrite spec_w_head00. + rewrite spec_zdigits; rewrite spec_ww_digits. + rewrite Zpos_xO; auto with zarith. + rewrite F1 in Hx; auto with zarith. + rewrite spec_w_0; auto with zarith. + rewrite spec_w_0; auto with zarith. + Qed. + + Lemma spec_ww_head0 : forall x, 0 < [[x]] -> + wwB/ 2 <= 2 ^ [[ww_head0 x]] * [[x]] < wwB. + Proof. + clear spec_ww_zdigits. + rewrite wwB_div_2;rewrite Zmult_comm;rewrite wwB_wBwB. + assert (U:= lt_0_wB w_digits); destruct x as [ |xh xl];simpl ww_to_Z;intros H. + unfold Zlt in H;discriminate H. + assert (H0 := spec_compare w_0 xh);rewrite spec_w_0 in H0. + destruct (w_compare w_0 xh). + rewrite <- H0. simpl Zplus. rewrite <- H0 in H;simpl in H. + case (spec_to_Z w_zdigits); + case (spec_to_Z (w_head0 xl)); intros HH1 HH2 HH3 HH4. + rewrite spec_w_add. + rewrite spec_zdigits; rewrite Zpower_exp; auto with zarith. + case (spec_w_head0 H); intros H1 H2. + rewrite Zpower_2; fold wB; rewrite <- Zmult_assoc; split. + apply Zmult_le_compat_l; auto with zarith. + apply Zmult_lt_compat_l; auto with zarith. + assert (H1 := spec_w_head0 H0). + rewrite spec_w_0W. + split. + rewrite Zmult_plus_distr_r;rewrite Zmult_assoc. + apply Zle_trans with (2 ^ [|w_head0 xh|] * [|xh|] * wB). + rewrite Zmult_comm; zarith. + assert (0 <= 2 ^ [|w_head0 xh|] * [|xl|]);zarith. + assert (H2:=spec_to_Z xl);apply Zmult_le_0_compat;zarith. + case (spec_to_Z (w_head0 xh)); intros H2 _. + generalize ([|w_head0 xh|]) H1 H2;clear H1 H2; + intros p H1 H2. + assert (Eq1 : 2^p < wB). + rewrite <- (Zmult_1_r (2^p));apply Zle_lt_trans with (2^p*[|xh|]);zarith. + assert (Eq2: p < Zpos w_digits). + destruct (Zle_or_lt (Zpos w_digits) p);trivial;contradict Eq1. + apply Zle_not_lt;unfold base;apply Zpower_le_monotone;zarith. + assert (Zpos w_digits = p + (Zpos w_digits - p)). ring. + rewrite Zpower_2. + unfold base at 2;rewrite H3;rewrite Zpower_exp;zarith. + rewrite <- Zmult_assoc; apply Zmult_lt_compat_l; zarith. + rewrite <- (Zplus_0_r (2^(Zpos w_digits - p)*wB));apply beta_lex_inv;zarith. + apply Zmult_lt_reg_r with (2 ^ p); zarith. + rewrite <- Zpower_exp;zarith. + rewrite Zmult_comm;ring_simplify (Zpos w_digits - p + p);fold wB;zarith. + assert (H1 := spec_to_Z xh);zarith. + Qed. + + Lemma spec_ww_tail00 : forall x, [[x]] = 0 -> [[ww_tail0 x]] = Zpos ww_Digits. + Proof. + intros x; case x; unfold ww_tail0. + intros HH; rewrite spec_ww_zdigits; auto. + intros xh xl; simpl; intros Hx. + case (spec_to_Z xh); intros Hx1 Hx2. + case (spec_to_Z xl); intros Hy1 Hy2. + assert (F1: [|xh|] = 0). + case (Zle_lt_or_eq _ _ Hy1); auto; intros Hy3. + absurd (0 < [|xh|] * wB + [|xl|]); auto with zarith. + apply Zlt_le_trans with (1 := Hy3); auto with zarith. + pattern [|xl|] at 1; rewrite <- (Zplus_0_l [|xl|]). + apply Zplus_le_compat_r; auto with zarith. + case (Zle_lt_or_eq _ _ Hx1); auto; intros Hx3. + absurd (0 < [|xh|] * wB + [|xl|]); auto with zarith. + rewrite <- Hy3; rewrite Zplus_0_r; auto with zarith. + apply Zmult_lt_0_compat; auto with zarith. + assert (F2: [|xl|] = 0). + rewrite F1 in Hx; auto with zarith. + generalize (spec_compare w_0 xl); case w_compare. + intros H; simpl. + rewrite spec_w_add; rewrite spec_w_tail00; auto. + rewrite spec_zdigits; rewrite spec_ww_digits. + rewrite Zpos_xO; auto with zarith. + rewrite spec_w_0; auto with zarith. + rewrite spec_w_0; auto with zarith. + Qed. + + Lemma spec_ww_tail0 : forall x, 0 < [[x]] -> + exists y, 0 <= y /\ [[x]] = (2 * y + 1) * 2 ^ [[ww_tail0 x]]. + Proof. + clear spec_ww_zdigits. + destruct x as [ |xh xl];simpl ww_to_Z;intros H. + unfold Zlt in H;discriminate H. + assert (H0 := spec_compare w_0 xl);rewrite spec_w_0 in H0. + destruct (w_compare w_0 xl). + rewrite <- H0; rewrite Zplus_0_r. + case (spec_to_Z (w_tail0 xh)); intros HH1 HH2. + generalize H; rewrite <- H0; rewrite Zplus_0_r; clear H; intros H. + case (@spec_w_tail0 xh). + apply Zmult_lt_reg_r with wB; auto with zarith. + unfold base; auto with zarith. + intros z (Hz1, Hz2); exists z; split; auto. + rewrite spec_w_add; rewrite (fun x => Zplus_comm [|x|]). + rewrite spec_zdigits; rewrite Zpower_exp; auto with zarith. + rewrite Zmult_assoc; rewrite <- Hz2; auto. + + case (spec_to_Z (w_tail0 xh)); intros HH1 HH2. + case (spec_w_tail0 H0); intros z (Hz1, Hz2). + assert (Hp: [|w_tail0 xl|] < Zpos w_digits). + case (Zle_or_lt (Zpos w_digits) [|w_tail0 xl|]); auto; intros H1. + absurd (2 ^ (Zpos w_digits) <= 2 ^ [|w_tail0 xl|]). + apply Zlt_not_le. + case (spec_to_Z xl); intros HH3 HH4. + apply Zle_lt_trans with (2 := HH4). + apply Zle_trans with (1 * 2 ^ [|w_tail0 xl|]); auto with zarith. + rewrite Hz2. + apply Zmult_le_compat_r; auto with zarith. + apply Zpower_le_monotone; auto with zarith. + exists ([|xh|] * (2 ^ ((Zpos w_digits - [|w_tail0 xl|]) - 1)) + z); split. + apply Zplus_le_0_compat; auto. + apply Zmult_le_0_compat; auto with zarith. + case (spec_to_Z xh); auto. + rewrite spec_w_0W. + rewrite (Zmult_plus_distr_r 2); rewrite <- Zplus_assoc. + rewrite Zmult_plus_distr_l; rewrite <- Hz2. + apply f_equal2 with (f := Zplus); auto. + rewrite (Zmult_comm 2). + repeat rewrite <- Zmult_assoc. + apply f_equal2 with (f := Zmult); auto. + case (spec_to_Z (w_tail0 xl)); intros HH3 HH4. + pattern 2 at 2; rewrite <- Zpower_1_r. + lazy beta; repeat rewrite <- Zpower_exp; auto with zarith. + unfold base; apply f_equal with (f := Zpower 2); auto with zarith. + + contradict H0; case (spec_to_Z xl); auto with zarith. + Qed. + + Hint Rewrite Zdiv_0_l Zmult_0_l Zplus_0_l Zmult_0_r Zplus_0_r + spec_w_W0 spec_w_0W spec_w_WW spec_w_0 + (wB_div w_digits w_to_Z spec_to_Z) + (wB_div_plus w_digits w_to_Z spec_to_Z) : w_rewrite. + Ltac w_rewrite := autorewrite with w_rewrite;trivial. + + Lemma spec_ww_add_mul_div_aux : forall xh xl yh yl p, + let zdigits := w_0W w_zdigits in + [[p]] <= Zpos (xO w_digits) -> + [[match ww_compare p zdigits with + | Eq => w_WW xl yh + | Lt => w_WW (w_add_mul_div (low p) xh xl) + (w_add_mul_div (low p) xl yh) + | Gt => + let n := low (ww_sub p zdigits) in + w_WW (w_add_mul_div n xl yh) (w_add_mul_div n yh yl) + end]] = + ([[WW xh xl]] * (2^[[p]]) + + [[WW yh yl]] / (2^(Zpos (xO w_digits) - [[p]]))) mod wwB. + Proof. + clear spec_ww_zdigits. + intros xh xl yh yl p zdigits;assert (HwwB := wwB_pos w_digits). + case (spec_to_w_Z p); intros Hv1 Hv2. + replace (Zpos (xO w_digits)) with (Zpos w_digits + Zpos w_digits). + 2 : rewrite Zpos_xO;ring. + replace (Zpos w_digits + Zpos w_digits - [[p]]) with + (Zpos w_digits + (Zpos w_digits - [[p]])). 2:ring. + intros Hp; assert (Hxh := spec_to_Z xh);assert (Hxl:=spec_to_Z xl); + assert (Hx := spec_ww_to_Z w_digits w_to_Z spec_to_Z (WW xh xl)); + simpl in Hx;assert (Hyh := spec_to_Z yh);assert (Hyl:=spec_to_Z yl); + assert (Hy:=spec_ww_to_Z w_digits w_to_Z spec_to_Z (WW yh yl));simpl in Hy. + generalize (spec_ww_compare p zdigits); case ww_compare; intros H1. + rewrite H1; unfold zdigits; rewrite spec_w_0W. + rewrite spec_zdigits; rewrite Zminus_diag; rewrite Zplus_0_r. + simpl ww_to_Z; w_rewrite;zarith. + fold wB. + rewrite Zmult_plus_distr_l;rewrite <- Zmult_assoc;rewrite <- Zplus_assoc. + rewrite <- Zpower_2. + rewrite <- wwB_wBwB;apply Zmod_unique with [|xh|]. + exact (spec_ww_to_Z w_digits w_to_Z spec_to_Z (WW xl yh)). ring. + simpl ww_to_Z; w_rewrite;zarith. + assert (HH0: [|low p|] = [[p]]). + rewrite spec_low. + apply Zmod_small. + case (spec_to_w_Z p); intros HH1 HH2; split; auto. + generalize H1; unfold zdigits; rewrite spec_w_0W; + rewrite spec_zdigits; intros tmp. + apply Zlt_le_trans with (1 := tmp). + unfold base. + apply Zpower2_le_lin; auto with zarith. + 2: generalize H1; unfold zdigits; rewrite spec_w_0W; + rewrite spec_zdigits; auto with zarith. + generalize H1; unfold zdigits; rewrite spec_w_0W; + rewrite spec_zdigits; auto; clear H1; intros H1. + assert (HH: [|low p|] <= Zpos w_digits). + rewrite HH0; auto with zarith. + repeat rewrite spec_w_add_mul_div with (1 := HH). + rewrite HH0. + rewrite Zmult_plus_distr_l. + pattern ([|xl|] * 2 ^ [[p]]) at 2; + rewrite shift_unshift_mod with (n:= Zpos w_digits);fold wB;zarith. + replace ([|xh|] * wB * 2^[[p]]) with ([|xh|] * 2^[[p]] * wB). 2:ring. + rewrite Zplus_assoc;rewrite <- Zmult_plus_distr_l. rewrite <- Zplus_assoc. + unfold base at 5;rewrite <- Zmod_shift_r;zarith. + unfold base;rewrite Zmod_shift_r with (b:= Zpos (ww_digits w_digits)); + fold wB;fold wwB;zarith. + rewrite wwB_wBwB;rewrite Zpower_2; rewrite Zmult_mod_distr_r;zarith. + unfold ww_digits;rewrite Zpos_xO;zarith. apply Z_mod_lt;zarith. + split;zarith. apply Zdiv_lt_upper_bound;zarith. + rewrite <- Zpower_exp;zarith. + ring_simplify ([[p]] + (Zpos w_digits - [[p]]));fold wB;zarith. + assert (Hv: [[p]] > Zpos w_digits). + generalize H1; clear H1. + unfold zdigits; rewrite spec_w_0W; rewrite spec_zdigits; auto. + clear H1. + assert (HH0: [|low (ww_sub p zdigits)|] = [[p]] - Zpos w_digits). + rewrite spec_low. + rewrite spec_ww_sub. + unfold zdigits; rewrite spec_w_0W; rewrite spec_zdigits. + rewrite <- Zmod_div_mod; auto with zarith. + rewrite Zmod_small; auto with zarith. + split; auto with zarith. + apply Zle_lt_trans with (Zpos w_digits); auto with zarith. + unfold base; apply Zpower2_lt_lin; auto with zarith. + exists wB; unfold base. + unfold ww_digits; rewrite (Zpos_xO w_digits). + rewrite <- Zpower_exp; auto with zarith. + apply f_equal with (f := fun x => 2 ^ x); auto with zarith. + assert (HH: [|low (ww_sub p zdigits)|] <= Zpos w_digits). + rewrite HH0; auto with zarith. + replace (Zpos w_digits + (Zpos w_digits - [[p]])) with + (Zpos w_digits - ([[p]] - Zpos w_digits)); zarith. + lazy zeta; simpl ww_to_Z; w_rewrite;zarith. + repeat rewrite spec_w_add_mul_div;zarith. + rewrite HH0. + pattern wB at 5;replace wB with + (2^(([[p]] - Zpos w_digits) + + (Zpos w_digits - ([[p]] - Zpos w_digits)))). + rewrite Zpower_exp;zarith. rewrite Zmult_assoc. + rewrite Z_div_plus_l;zarith. + rewrite shift_unshift_mod with (a:= [|yh|]) (p:= [[p]] - Zpos w_digits) + (n := Zpos w_digits);zarith. fold wB. + set (u := [[p]] - Zpos w_digits). + replace [[p]] with (u + Zpos w_digits);zarith. + rewrite Zpower_exp;zarith. rewrite Zmult_assoc. fold wB. + repeat rewrite Zplus_assoc. rewrite <- Zmult_plus_distr_l. + repeat rewrite <- Zplus_assoc. + unfold base;rewrite Zmod_shift_r with (b:= Zpos (ww_digits w_digits)); + fold wB;fold wwB;zarith. + unfold base;rewrite Zmod_shift_r with (a:= Zpos w_digits) + (b:= Zpos w_digits);fold wB;fold wwB;zarith. + rewrite wwB_wBwB; rewrite Zpower_2; rewrite Zmult_mod_distr_r;zarith. + rewrite Zmult_plus_distr_l. + replace ([|xh|] * wB * 2 ^ u) with + ([|xh|]*2^u*wB). 2:ring. + repeat rewrite <- Zplus_assoc. + rewrite (Zplus_comm ([|xh|] * 2 ^ u * wB)). + rewrite Z_mod_plus;zarith. rewrite Z_mod_mult;zarith. + unfold base;rewrite <- Zmod_shift_r;zarith. fold base;apply Z_mod_lt;zarith. + unfold u; split;zarith. + split;zarith. unfold u; apply Zdiv_lt_upper_bound;zarith. + rewrite <- Zpower_exp;zarith. + fold u. + ring_simplify (u + (Zpos w_digits - u)); fold + wB;zarith. unfold ww_digits;rewrite Zpos_xO;zarith. + unfold base;rewrite <- Zmod_shift_r;zarith. fold base;apply Z_mod_lt;zarith. + unfold u; split;zarith. + unfold u; split;zarith. + apply Zdiv_lt_upper_bound;zarith. + rewrite <- Zpower_exp;zarith. + fold u. + ring_simplify (u + (Zpos w_digits - u)); fold wB; auto with zarith. + unfold u;zarith. + unfold u;zarith. + set (u := [[p]] - Zpos w_digits). + ring_simplify (u + (Zpos w_digits - u)); fold wB; auto with zarith. + Qed. + + Lemma spec_ww_add_mul_div : forall x y p, + [[p]] <= Zpos (xO w_digits) -> + [[ ww_add_mul_div p x y ]] = + ([[x]] * (2^[[p]]) + + [[y]] / (2^(Zpos (xO w_digits) - [[p]]))) mod wwB. + Proof. + clear spec_ww_zdigits. + intros x y p H. + destruct x as [ |xh xl]; + [assert (H1 := @spec_ww_add_mul_div_aux w_0 w_0) + |assert (H1 := @spec_ww_add_mul_div_aux xh xl)]; + (destruct y as [ |yh yl]; + [generalize (H1 w_0 w_0 p H) | generalize (H1 yh yl p H)]; + clear H1;w_rewrite);simpl ww_add_mul_div. + replace [[WW w_0 w_0]] with 0;[w_rewrite|simpl;w_rewrite;trivial]. + intros Heq;rewrite <- Heq;clear Heq; auto. + generalize (spec_ww_compare p (w_0W w_zdigits)); + case ww_compare; intros H1; w_rewrite. + rewrite (spec_w_add_mul_div w_0 w_0);w_rewrite;zarith. + generalize H1; w_rewrite; rewrite spec_zdigits; clear H1; intros H1. + assert (HH0: [|low p|] = [[p]]). + rewrite spec_low. + apply Zmod_small. + case (spec_to_w_Z p); intros HH1 HH2; split; auto. + apply Zlt_le_trans with (1 := H1). + unfold base; apply Zpower2_le_lin; auto with zarith. + rewrite HH0; auto with zarith. + replace [[WW w_0 w_0]] with 0;[w_rewrite|simpl;w_rewrite;trivial]. + intros Heq;rewrite <- Heq;clear Heq. + generalize (spec_ww_compare p (w_0W w_zdigits)); + case ww_compare; intros H1; w_rewrite. + rewrite (spec_w_add_mul_div w_0 w_0);w_rewrite;zarith. + rewrite Zpos_xO in H;zarith. + assert (HH: [|low (ww_sub p (w_0W w_zdigits)) |] = [[p]] - Zpos w_digits). + generalize H1; clear H1. + rewrite spec_low. + rewrite spec_ww_sub; w_rewrite; intros H1. + rewrite <- Zmod_div_mod; auto with zarith. + rewrite Zmod_small; auto with zarith. + split; auto with zarith. + apply Zle_lt_trans with (Zpos w_digits); auto with zarith. + unfold base; apply Zpower2_lt_lin; auto with zarith. + unfold base; auto with zarith. + unfold base; auto with zarith. + exists wB; unfold base. + unfold ww_digits; rewrite (Zpos_xO w_digits). + rewrite <- Zpower_exp; auto with zarith. + apply f_equal with (f := fun x => 2 ^ x); auto with zarith. + case (spec_to_Z xh); auto with zarith. + Qed. + + End DoubleProof. + +End DoubleLift. + diff --git a/theories/Numbers/Cyclic/DoubleCyclic/DoubleMul.v b/theories/Numbers/Cyclic/DoubleCyclic/DoubleMul.v new file mode 100644 index 00000000..c7d83acc --- /dev/null +++ b/theories/Numbers/Cyclic/DoubleCyclic/DoubleMul.v @@ -0,0 +1,628 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* w -> zn2z w. + Variable w_W0 : w -> zn2z w. + Variable w_0W : w -> zn2z w. + Variable w_compare : w -> w -> comparison. + Variable w_succ : w -> w. + Variable w_add_c : w -> w -> carry w. + Variable w_add : w -> w -> w. + Variable w_sub: w -> w -> w. + Variable w_mul_c : w -> w -> zn2z w. + Variable w_mul : w -> w -> w. + Variable w_square_c : w -> zn2z w. + Variable ww_add_c : zn2z w -> zn2z w -> carry (zn2z w). + Variable ww_add : zn2z w -> zn2z w -> zn2z w. + Variable ww_add_carry : zn2z w -> zn2z w -> zn2z w. + Variable ww_sub_c : zn2z w -> zn2z w -> carry (zn2z w). + Variable ww_sub : zn2z w -> zn2z w -> zn2z w. + + (* ** Multiplication ** *) + + (* (xh*B+xl) (yh*B + yl) + xh*yh = hh = |hhh|hhl|B2 + xh*yl +xl*yh = cc = |cch|ccl|B + xl*yl = ll = |llh|lll + *) + + Definition double_mul_c (cross:w->w->w->w->zn2z w -> zn2z w -> w*zn2z w) x y := + match x, y with + | W0, _ => W0 + | _, W0 => W0 + | WW xh xl, WW yh yl => + let hh := w_mul_c xh yh in + let ll := w_mul_c xl yl in + let (wc,cc) := cross xh xl yh yl hh ll in + match cc with + | W0 => WW (ww_add hh (w_W0 wc)) ll + | WW cch ccl => + match ww_add_c (w_W0 ccl) ll with + | C0 l => WW (ww_add hh (w_WW wc cch)) l + | C1 l => WW (ww_add_carry hh (w_WW wc cch)) l + end + end + end. + + Definition ww_mul_c := + double_mul_c + (fun xh xl yh yl hh ll=> + match ww_add_c (w_mul_c xh yl) (w_mul_c xl yh) with + | C0 cc => (w_0, cc) + | C1 cc => (w_1, cc) + end). + + Definition w_2 := w_add w_1 w_1. + + Definition kara_prod xh xl yh yl hh ll := + match ww_add_c hh ll with + C0 m => + match w_compare xl xh with + Eq => (w_0, m) + | Lt => + match w_compare yl yh with + Eq => (w_0, m) + | Lt => (w_0, ww_sub m (w_mul_c (w_sub xh xl) (w_sub yh yl))) + | Gt => match ww_add_c m (w_mul_c (w_sub xh xl) (w_sub yl yh)) with + C1 m1 => (w_1, m1) | C0 m1 => (w_0, m1) + end + end + | Gt => + match w_compare yl yh with + Eq => (w_0, m) + | Lt => match ww_add_c m (w_mul_c (w_sub xl xh) (w_sub yh yl)) with + C1 m1 => (w_1, m1) | C0 m1 => (w_0, m1) + end + | Gt => (w_0, ww_sub m (w_mul_c (w_sub xl xh) (w_sub yl yh))) + end + end + | C1 m => + match w_compare xl xh with + Eq => (w_1, m) + | Lt => + match w_compare yl yh with + Eq => (w_1, m) + | Lt => match ww_sub_c m (w_mul_c (w_sub xh xl) (w_sub yh yl)) with + C0 m1 => (w_1, m1) | C1 m1 => (w_0, m1) + end + | Gt => match ww_add_c m (w_mul_c (w_sub xh xl) (w_sub yl yh)) with + C1 m1 => (w_2, m1) | C0 m1 => (w_1, m1) + end + end + | Gt => + match w_compare yl yh with + Eq => (w_1, m) + | Lt => match ww_add_c m (w_mul_c (w_sub xl xh) (w_sub yh yl)) with + C1 m1 => (w_2, m1) | C0 m1 => (w_1, m1) + end + | Gt => match ww_sub_c m (w_mul_c (w_sub xl xh) (w_sub yl yh)) with + C1 m1 => (w_0, m1) | C0 m1 => (w_1, m1) + end + end + end + end. + + Definition ww_karatsuba_c := double_mul_c kara_prod. + + Definition ww_mul x y := + match x, y with + | W0, _ => W0 + | _, W0 => W0 + | WW xh xl, WW yh yl => + let ccl := w_add (w_mul xh yl) (w_mul xl yh) in + ww_add (w_W0 ccl) (w_mul_c xl yl) + end. + + Definition ww_square_c x := + match x with + | W0 => W0 + | WW xh xl => + let hh := w_square_c xh in + let ll := w_square_c xl in + let xhxl := w_mul_c xh xl in + let (wc,cc) := + match ww_add_c xhxl xhxl with + | C0 cc => (w_0, cc) + | C1 cc => (w_1, cc) + end in + match cc with + | W0 => WW (ww_add hh (w_W0 wc)) ll + | WW cch ccl => + match ww_add_c (w_W0 ccl) ll with + | C0 l => WW (ww_add hh (w_WW wc cch)) l + | C1 l => WW (ww_add_carry hh (w_WW wc cch)) l + end + end + end. + + Section DoubleMulAddn1. + Variable w_mul_add : w -> w -> w -> w * w. + + Fixpoint double_mul_add_n1 (n:nat) : word w n -> w -> w -> w * word w n := + match n return word w n -> w -> w -> w * word w n with + | O => w_mul_add + | S n1 => + let mul_add := double_mul_add_n1 n1 in + fun x y r => + match x with + | W0 => (w_0,extend w_0W n1 r) + | WW xh xl => + let (rl,l) := mul_add xl y r in + let (rh,h) := mul_add xh y rl in + (rh, double_WW w_WW n1 h l) + end + end. + + End DoubleMulAddn1. + + Section DoubleMulAddmn1. + Variable wn: Type. + Variable extend_n : w -> wn. + Variable wn_0W : wn -> zn2z wn. + Variable wn_WW : wn -> wn -> zn2z wn. + Variable w_mul_add_n1 : wn -> w -> w -> w*wn. + Fixpoint double_mul_add_mn1 (m:nat) : + word wn m -> w -> w -> w*word wn m := + match m return word wn m -> w -> w -> w*word wn m with + | O => w_mul_add_n1 + | S m1 => + let mul_add := double_mul_add_mn1 m1 in + fun x y r => + match x with + | W0 => (w_0,extend wn_0W m1 (extend_n r)) + | WW xh xl => + let (rl,l) := mul_add xl y r in + let (rh,h) := mul_add xh y rl in + (rh, double_WW wn_WW m1 h l) + end + end. + + End DoubleMulAddmn1. + + Definition w_mul_add x y r := + match w_mul_c x y with + | W0 => (w_0, r) + | WW h l => + match w_add_c l r with + | C0 lr => (h,lr) + | C1 lr => (w_succ h, lr) + end + end. + + + (*Section DoubleProof. *) + Variable w_digits : positive. + Variable w_to_Z : w -> Z. + + Notation wB := (base w_digits). + Notation wwB := (base (ww_digits w_digits)). + Notation "[| x |]" := (w_to_Z x) (at level 0, x at level 99). + Notation "[+| c |]" := + (interp_carry 1 wB w_to_Z c) (at level 0, x at level 99). + Notation "[-| c |]" := + (interp_carry (-1) wB w_to_Z c) (at level 0, x at level 99). + + Notation "[[ x ]]" := (ww_to_Z w_digits w_to_Z x)(at level 0, x at level 99). + Notation "[+[ c ]]" := + (interp_carry 1 wwB (ww_to_Z w_digits w_to_Z) c) + (at level 0, x at level 99). + Notation "[-[ c ]]" := + (interp_carry (-1) wwB (ww_to_Z w_digits w_to_Z) c) + (at level 0, x at level 99). + + Notation "[|| x ||]" := + (zn2z_to_Z wwB (ww_to_Z w_digits w_to_Z) x) (at level 0, x at level 99). + + Notation "[! n | x !]" := (double_to_Z w_digits w_to_Z n x) + (at level 0, x at level 99). + + Variable spec_more_than_1_digit: 1 < Zpos w_digits. + Variable spec_w_0 : [|w_0|] = 0. + Variable spec_w_1 : [|w_1|] = 1. + + Variable spec_to_Z : forall x, 0 <= [|x|] < wB. + + Variable spec_w_WW : forall h l, [[w_WW h l]] = [|h|] * wB + [|l|]. + Variable spec_w_W0 : forall h, [[w_W0 h]] = [|h|] * wB. + Variable spec_w_0W : forall l, [[w_0W l]] = [|l|]. + Variable spec_w_compare : + forall x y, + match w_compare x y with + | Eq => [|x|] = [|y|] + | Lt => [|x|] < [|y|] + | Gt => [|x|] > [|y|] + end. + Variable spec_w_succ : forall x, [|w_succ x|] = ([|x|] + 1) mod wB. + Variable spec_w_add_c : forall x y, [+|w_add_c x y|] = [|x|] + [|y|]. + Variable spec_w_add : forall x y, [|w_add x y|] = ([|x|] + [|y|]) mod wB. + Variable spec_w_sub : forall x y, [|w_sub x y|] = ([|x|] - [|y|]) mod wB. + + Variable spec_w_mul_c : forall x y, [[ w_mul_c x y ]] = [|x|] * [|y|]. + Variable spec_w_mul : forall x y, [|w_mul x y|] = ([|x|] * [|y|]) mod wB. + Variable spec_w_square_c : forall x, [[ w_square_c x]] = [|x|] * [|x|]. + + Variable spec_ww_add_c : forall x y, [+[ww_add_c x y]] = [[x]] + [[y]]. + Variable spec_ww_add : forall x y, [[ww_add x y]] = ([[x]] + [[y]]) mod wwB. + Variable spec_ww_add_carry : + forall x y, [[ww_add_carry x y]] = ([[x]] + [[y]] + 1) mod wwB. + Variable spec_ww_sub : forall x y, [[ww_sub x y]] = ([[x]] - [[y]]) mod wwB. + Variable spec_ww_sub_c : forall x y, [-[ww_sub_c x y]] = [[x]] - [[y]]. + + + Lemma spec_ww_to_Z : forall x, 0 <= [[x]] < wwB. + Proof. intros x;apply spec_ww_to_Z;auto. Qed. + + Lemma spec_ww_to_Z_wBwB : forall x, 0 <= [[x]] < wB^2. + Proof. rewrite <- wwB_wBwB;apply spec_ww_to_Z. Qed. + + Hint Resolve spec_ww_to_Z spec_ww_to_Z_wBwB : mult. + Ltac zarith := auto with zarith mult. + + Lemma wBwB_lex: forall a b c d, + a * wB^2 + [[b]] <= c * wB^2 + [[d]] -> + a <= c. + Proof. + intros a b c d H; apply beta_lex with [[b]] [[d]] (wB^2);zarith. + Qed. + + Lemma wBwB_lex_inv: forall a b c d, + a < c -> + a * wB^2 + [[b]] < c * wB^2 + [[d]]. + Proof. + intros a b c d H; apply beta_lex_inv; zarith. + Qed. + + Lemma sum_mul_carry : forall xh xl yh yl wc cc, + [|wc|]*wB^2 + [[cc]] = [|xh|] * [|yl|] + [|xl|] * [|yh|] -> + 0 <= [|wc|] <= 1. + Proof. + intros. + apply (sum_mul_carry [|xh|] [|xl|] [|yh|] [|yl|] [|wc|][[cc]] wB);zarith. + apply wB_pos. + Qed. + + Theorem mult_add_ineq: forall xH yH crossH, + 0 <= [|xH|] * [|yH|] + [|crossH|] < wwB. + Proof. + intros;rewrite wwB_wBwB;apply mult_add_ineq;zarith. + Qed. + + Hint Resolve mult_add_ineq : mult. + + Lemma spec_mul_aux : forall xh xl yh yl wc (cc:zn2z w) hh ll, + [[hh]] = [|xh|] * [|yh|] -> + [[ll]] = [|xl|] * [|yl|] -> + [|wc|]*wB^2 + [[cc]] = [|xh|] * [|yl|] + [|xl|] * [|yh|] -> + [||match cc with + | W0 => WW (ww_add hh (w_W0 wc)) ll + | WW cch ccl => + match ww_add_c (w_W0 ccl) ll with + | C0 l => WW (ww_add hh (w_WW wc cch)) l + | C1 l => WW (ww_add_carry hh (w_WW wc cch)) l + end + end||] = ([|xh|] * wB + [|xl|]) * ([|yh|] * wB + [|yl|]). + Proof. + intros;assert (U1 := wB_pos w_digits). + replace (([|xh|] * wB + [|xl|]) * ([|yh|] * wB + [|yl|])) with + ([|xh|]*[|yh|]*wB^2 + ([|xh|]*[|yl|] + [|xl|]*[|yh|])*wB + [|xl|]*[|yl|]). + 2:ring. rewrite <- H1;rewrite <- H;rewrite <- H0. + assert (H2 := sum_mul_carry _ _ _ _ _ _ H1). + destruct cc as [ | cch ccl]; simpl zn2z_to_Z; simpl ww_to_Z. + rewrite spec_ww_add;rewrite spec_w_W0;rewrite Zmod_small; + rewrite wwB_wBwB. ring. + rewrite <- (Zplus_0_r ([|wc|]*wB));rewrite H;apply mult_add_ineq3;zarith. + simpl ww_to_Z in H1. assert (U:=spec_to_Z cch). + assert ([|wc|]*wB + [|cch|] <= 2*wB - 3). + destruct (Z_le_gt_dec ([|wc|]*wB + [|cch|]) (2*wB - 3));trivial. + assert ([|xh|] * [|yl|] + [|xl|] * [|yh|] <= (2*wB - 4)*wB + 2). + ring_simplify ((2*wB - 4)*wB + 2). + assert (H4 := Zmult_lt_b _ _ _ (spec_to_Z xh) (spec_to_Z yl)). + assert (H5 := Zmult_lt_b _ _ _ (spec_to_Z xl) (spec_to_Z yh)). + omega. + generalize H3;clear H3;rewrite <- H1. + rewrite Zplus_assoc; rewrite Zpower_2; rewrite Zmult_assoc; + rewrite <- Zmult_plus_distr_l. + assert (((2 * wB - 4) + 2)*wB <= ([|wc|] * wB + [|cch|])*wB). + apply Zmult_le_compat;zarith. + rewrite Zmult_plus_distr_l in H3. + intros. assert (U2 := spec_to_Z ccl);omega. + generalize (spec_ww_add_c (w_W0 ccl) ll);destruct (ww_add_c (w_W0 ccl) ll) + as [l|l];unfold interp_carry;rewrite spec_w_W0;try rewrite Zmult_1_l; + simpl zn2z_to_Z; + try rewrite spec_ww_add;try rewrite spec_ww_add_carry;rewrite spec_w_WW; + rewrite Zmod_small;rewrite wwB_wBwB;intros. + rewrite H4;ring. rewrite H;apply mult_add_ineq2;zarith. + rewrite Zplus_assoc;rewrite Zmult_plus_distr_l. + rewrite Zmult_1_l;rewrite <- Zplus_assoc;rewrite H4;ring. + repeat rewrite <- Zplus_assoc;rewrite H;apply mult_add_ineq2;zarith. + Qed. + + Lemma spec_double_mul_c : forall cross:w->w->w->w->zn2z w -> zn2z w -> w*zn2z w, + (forall xh xl yh yl hh ll, + [[hh]] = [|xh|]*[|yh|] -> + [[ll]] = [|xl|]*[|yl|] -> + let (wc,cc) := cross xh xl yh yl hh ll in + [|wc|]*wwB + [[cc]] = [|xh|]*[|yl|] + [|xl|]*[|yh|]) -> + forall x y, [||double_mul_c cross x y||] = [[x]] * [[y]]. + Proof. + intros cross Hcross x y;destruct x as [ |xh xl];simpl;trivial. + destruct y as [ |yh yl];simpl. rewrite Zmult_0_r;trivial. + assert (H1:= spec_w_mul_c xh yh);assert (H2:= spec_w_mul_c xl yl). + generalize (Hcross _ _ _ _ _ _ H1 H2). + destruct (cross xh xl yh yl (w_mul_c xh yh) (w_mul_c xl yl)) as (wc,cc). + intros;apply spec_mul_aux;trivial. + rewrite <- wwB_wBwB;trivial. + Qed. + + Lemma spec_ww_mul_c : forall x y, [||ww_mul_c x y||] = [[x]] * [[y]]. + Proof. + intros x y;unfold ww_mul_c;apply spec_double_mul_c. + intros xh xl yh yl hh ll H1 H2. + generalize (spec_ww_add_c (w_mul_c xh yl) (w_mul_c xl yh)); + destruct (ww_add_c (w_mul_c xh yl) (w_mul_c xl yh)) as [c|c]; + unfold interp_carry;repeat rewrite spec_w_mul_c;intros H; + (rewrite spec_w_0 || rewrite spec_w_1);rewrite H;ring. + Qed. + + Lemma spec_w_2: [|w_2|] = 2. + unfold w_2; rewrite spec_w_add; rewrite spec_w_1; simpl. + apply Zmod_small; split; auto with zarith. + rewrite <- (Zpower_1_r 2); unfold base; apply Zpower_lt_monotone; auto with zarith. + Qed. + + Lemma kara_prod_aux : forall xh xl yh yl, + xh*yh + xl*yl - (xh-xl)*(yh-yl) = xh*yl + xl*yh. + Proof. intros;ring. Qed. + + Lemma spec_kara_prod : forall xh xl yh yl hh ll, + [[hh]] = [|xh|]*[|yh|] -> + [[ll]] = [|xl|]*[|yl|] -> + let (wc,cc) := kara_prod xh xl yh yl hh ll in + [|wc|]*wwB + [[cc]] = [|xh|]*[|yl|] + [|xl|]*[|yh|]. + Proof. + intros xh xl yh yl hh ll H H0; rewrite <- kara_prod_aux; + rewrite <- H; rewrite <- H0; unfold kara_prod. + assert (Hxh := (spec_to_Z xh)); assert (Hxl := (spec_to_Z xl)); + assert (Hyh := (spec_to_Z yh)); assert (Hyl := (spec_to_Z yl)). + generalize (spec_ww_add_c hh ll); case (ww_add_c hh ll); + intros z Hz; rewrite <- Hz; unfold interp_carry; assert (Hz1 := (spec_ww_to_Z z)). + generalize (spec_w_compare xl xh); case (w_compare xl xh); intros Hxlh; + try rewrite Hxlh; try rewrite spec_w_0; try (ring; fail). + generalize (spec_w_compare yl yh); case (w_compare yl yh); intros Hylh. + rewrite Hylh; rewrite spec_w_0; try (ring; fail). + rewrite spec_w_0; try (ring; fail). + repeat (rewrite spec_ww_sub || rewrite spec_w_sub || rewrite spec_w_mul_c). + repeat rewrite Zmod_small; auto with zarith; try (ring; fail). + split; auto with zarith. + simpl in Hz; rewrite Hz; rewrite H; rewrite H0. + rewrite kara_prod_aux; apply Zplus_le_0_compat; apply Zmult_le_0_compat; auto with zarith. + apply Zle_lt_trans with ([[z]]-0); auto with zarith. + unfold Zminus; apply Zplus_le_compat_l; apply Zle_left_rev; simpl; rewrite Zopp_involutive. + apply Zmult_le_0_compat; auto with zarith. + match goal with |- context[ww_add_c ?x ?y] => + generalize (spec_ww_add_c x y); case (ww_add_c x y); try rewrite spec_w_0; + intros z1 Hz2 + end. + simpl in Hz2; rewrite Hz2; repeat (rewrite spec_w_sub || rewrite spec_w_mul_c). + repeat rewrite Zmod_small; auto with zarith; try (ring; fail). + rewrite spec_w_1; unfold interp_carry in Hz2; rewrite Hz2; + repeat (rewrite spec_w_sub || rewrite spec_w_mul_c). + repeat rewrite Zmod_small; auto with zarith; try (ring; fail). + generalize (spec_w_compare yl yh); case (w_compare yl yh); intros Hylh. + rewrite Hylh; rewrite spec_w_0; try (ring; fail). + match goal with |- context[ww_add_c ?x ?y] => + generalize (spec_ww_add_c x y); case (ww_add_c x y); try rewrite spec_w_0; + intros z1 Hz2 + end. + simpl in Hz2; rewrite Hz2; repeat (rewrite spec_w_sub || rewrite spec_w_mul_c). + repeat rewrite Zmod_small; auto with zarith; try (ring; fail). + rewrite spec_w_1; unfold interp_carry in Hz2; rewrite Hz2; + repeat (rewrite spec_w_sub || rewrite spec_w_mul_c). + repeat rewrite Zmod_small; auto with zarith; try (ring; fail). + rewrite spec_w_0; try (ring; fail). + repeat (rewrite spec_ww_sub || rewrite spec_w_sub || rewrite spec_w_mul_c). + repeat rewrite Zmod_small; auto with zarith; try (ring; fail). + split. + match goal with |- context[(?x - ?y) * (?z - ?t)] => + replace ((x - y) * (z - t)) with ((y - x) * (t - z)); [idtac | ring] + end. + simpl in Hz; rewrite Hz; rewrite H; rewrite H0. + rewrite kara_prod_aux; apply Zplus_le_0_compat; apply Zmult_le_0_compat; auto with zarith. + apply Zle_lt_trans with ([[z]]-0); auto with zarith. + unfold Zminus; apply Zplus_le_compat_l; apply Zle_left_rev; simpl; rewrite Zopp_involutive. + apply Zmult_le_0_compat; auto with zarith. + (** there is a carry in hh + ll **) + rewrite Zmult_1_l. + generalize (spec_w_compare xl xh); case (w_compare xl xh); intros Hxlh; + try rewrite Hxlh; try rewrite spec_w_1; try (ring; fail). + generalize (spec_w_compare yl yh); case (w_compare yl yh); intros Hylh; + try rewrite Hylh; try rewrite spec_w_1; try (ring; fail). + match goal with |- context[ww_sub_c ?x ?y] => + generalize (spec_ww_sub_c x y); case (ww_sub_c x y); try rewrite spec_w_1; + intros z1 Hz2 + end. + simpl in Hz2; rewrite Hz2; repeat (rewrite spec_w_sub || rewrite spec_w_mul_c). + repeat rewrite Zmod_small; auto with zarith; try (ring; fail). + rewrite spec_w_0; rewrite Zmult_0_l; rewrite Zplus_0_l. + generalize Hz2; clear Hz2; unfold interp_carry. + repeat (rewrite spec_w_sub || rewrite spec_w_mul_c). + repeat rewrite Zmod_small; auto with zarith; try (ring; fail). + match goal with |- context[ww_add_c ?x ?y] => + generalize (spec_ww_add_c x y); case (ww_add_c x y); try rewrite spec_w_1; + intros z1 Hz2 + end. + simpl in Hz2; rewrite Hz2; repeat (rewrite spec_w_sub || rewrite spec_w_mul_c). + repeat rewrite Zmod_small; auto with zarith; try (ring; fail). + rewrite spec_w_2; unfold interp_carry in Hz2. + apply trans_equal with (wwB + (1 * wwB + [[z1]])). + ring. + rewrite Hz2; repeat (rewrite spec_w_sub || rewrite spec_w_mul_c). + repeat rewrite Zmod_small; auto with zarith; try (ring; fail). + generalize (spec_w_compare yl yh); case (w_compare yl yh); intros Hylh; + try rewrite Hylh; try rewrite spec_w_1; try (ring; fail). + match goal with |- context[ww_add_c ?x ?y] => + generalize (spec_ww_add_c x y); case (ww_add_c x y); try rewrite spec_w_1; + intros z1 Hz2 + end. + simpl in Hz2; rewrite Hz2; repeat (rewrite spec_w_sub || rewrite spec_w_mul_c). + repeat rewrite Zmod_small; auto with zarith; try (ring; fail). + rewrite spec_w_2; unfold interp_carry in Hz2. + apply trans_equal with (wwB + (1 * wwB + [[z1]])). + ring. + rewrite Hz2; repeat (rewrite spec_w_sub || rewrite spec_w_mul_c). + repeat rewrite Zmod_small; auto with zarith; try (ring; fail). + match goal with |- context[ww_sub_c ?x ?y] => + generalize (spec_ww_sub_c x y); case (ww_sub_c x y); try rewrite spec_w_1; + intros z1 Hz2 + end. + simpl in Hz2; rewrite Hz2; repeat (rewrite spec_w_sub || rewrite spec_w_mul_c). + repeat rewrite Zmod_small; auto with zarith; try (ring; fail). + rewrite spec_w_0; rewrite Zmult_0_l; rewrite Zplus_0_l. + match goal with |- context[(?x - ?y) * (?z - ?t)] => + replace ((x - y) * (z - t)) with ((y - x) * (t - z)); [idtac | ring] + end. + generalize Hz2; clear Hz2; unfold interp_carry. + repeat (rewrite spec_w_sub || rewrite spec_w_mul_c). + repeat rewrite Zmod_small; auto with zarith; try (ring; fail). + Qed. + + Lemma sub_carry : forall xh xl yh yl z, + 0 <= z -> + [|xh|]*[|yl|] + [|xl|]*[|yh|] = wwB + z -> + z < wwB. + Proof. + intros xh xl yh yl z Hle Heq. + destruct (Z_le_gt_dec wwB z);auto with zarith. + generalize (Zmult_lt_b _ _ _ (spec_to_Z xh) (spec_to_Z yl)). + generalize (Zmult_lt_b _ _ _ (spec_to_Z xl) (spec_to_Z yh)). + rewrite <- wwB_wBwB;intros H1 H2. + assert (H3 := wB_pos w_digits). + assert (2*wB <= wwB). + rewrite wwB_wBwB; rewrite Zpower_2; apply Zmult_le_compat;zarith. + omega. + Qed. + + Ltac Spec_ww_to_Z x := + let H:= fresh "H" in + assert (H:= spec_ww_to_Z x). + + Ltac Zmult_lt_b x y := + let H := fresh "H" in + assert (H := Zmult_lt_b _ _ _ (spec_to_Z x) (spec_to_Z y)). + + Lemma spec_ww_karatsuba_c : forall x y, [||ww_karatsuba_c x y||]=[[x]]*[[y]]. + Proof. + intros x y; unfold ww_karatsuba_c;apply spec_double_mul_c. + intros; apply spec_kara_prod; auto. + Qed. + + Lemma spec_ww_mul : forall x y, [[ww_mul x y]] = [[x]]*[[y]] mod wwB. + Proof. + assert (U:= lt_0_wB w_digits). + assert (U1:= lt_0_wwB w_digits). + intros x y; case x; auto; intros xh xl. + case y; auto. + simpl; rewrite Zmult_0_r; rewrite Zmod_small; auto with zarith. + intros yh yl;simpl. + repeat (rewrite spec_ww_add || rewrite spec_w_W0 || rewrite spec_w_mul_c + || rewrite spec_w_add || rewrite spec_w_mul). + rewrite <- Zplus_mod; auto with zarith. + repeat (rewrite Zmult_plus_distr_l || rewrite Zmult_plus_distr_r). + rewrite <- Zmult_mod_distr_r; auto with zarith. + rewrite <- Zpower_2; rewrite <- wwB_wBwB; auto with zarith. + rewrite Zplus_mod; auto with zarith. + rewrite Zmod_mod; auto with zarith. + rewrite <- Zplus_mod; auto with zarith. + match goal with |- ?X mod _ = _ => + rewrite <- Z_mod_plus with (a := X) (b := [|xh|] * [|yh|]) + end; auto with zarith. + f_equal; auto; rewrite wwB_wBwB; ring. + Qed. + + Lemma spec_ww_square_c : forall x, [||ww_square_c x||] = [[x]]*[[x]]. + Proof. + destruct x as [ |xh xl];simpl;trivial. + case_eq match ww_add_c (w_mul_c xh xl) (w_mul_c xh xl) with + | C0 cc => (w_0, cc) + | C1 cc => (w_1, cc) + end;intros wc cc Heq. + apply (spec_mul_aux xh xl xh xl wc cc);trivial. + generalize Heq (spec_ww_add_c (w_mul_c xh xl) (w_mul_c xh xl));clear Heq. + rewrite spec_w_mul_c;destruct (ww_add_c (w_mul_c xh xl) (w_mul_c xh xl)); + unfold interp_carry;try rewrite Zmult_1_l;intros Heq Heq';inversion Heq; + rewrite (Zmult_comm [|xl|]);subst. + rewrite spec_w_0;rewrite Zmult_0_l;rewrite Zplus_0_l;trivial. + rewrite spec_w_1;rewrite Zmult_1_l;rewrite <- wwB_wBwB;trivial. + Qed. + + Section DoubleMulAddn1Proof. + + Variable w_mul_add : w -> w -> w -> w * w. + Variable spec_w_mul_add : forall x y r, + let (h,l):= w_mul_add x y r in + [|h|]*wB+[|l|] = [|x|]*[|y|] + [|r|]. + + Lemma spec_double_mul_add_n1 : forall n x y r, + let (h,l) := double_mul_add_n1 w_mul_add n x y r in + [|h|]*double_wB w_digits n + [!n|l!] = [!n|x!]*[|y|]+[|r|]. + Proof. + induction n;intros x y r;trivial. + exact (spec_w_mul_add x y r). + unfold double_mul_add_n1;destruct x as[ |xh xl]; + fold(double_mul_add_n1 w_mul_add). + rewrite spec_w_0;rewrite spec_extend;simpl;trivial. + assert(H:=IHn xl y r);destruct (double_mul_add_n1 w_mul_add n xl y r)as(rl,l). + assert(U:=IHn xh y rl);destruct(double_mul_add_n1 w_mul_add n xh y rl)as(rh,h). + rewrite <- double_wB_wwB. rewrite spec_double_WW;simpl;trivial. + rewrite Zmult_plus_distr_l;rewrite <- Zplus_assoc;rewrite <- H. + rewrite Zmult_assoc;rewrite Zplus_assoc;rewrite <- Zmult_plus_distr_l. + rewrite U;ring. + Qed. + + End DoubleMulAddn1Proof. + + Lemma spec_w_mul_add : forall x y r, + let (h,l):= w_mul_add x y r in + [|h|]*wB+[|l|] = [|x|]*[|y|] + [|r|]. + Proof. + intros x y r;unfold w_mul_add;assert (H:=spec_w_mul_c x y); + destruct (w_mul_c x y) as [ |h l];simpl;rewrite <- H. + rewrite spec_w_0;trivial. + assert (U:=spec_w_add_c l r);destruct (w_add_c l r) as [lr|lr];unfold + interp_carry in U;try rewrite Zmult_1_l in H;simpl. + rewrite U;ring. rewrite spec_w_succ. rewrite Zmod_small. + rewrite <- Zplus_assoc;rewrite <- U;ring. + simpl in H;assert (H1:= Zmult_lt_b _ _ _ (spec_to_Z x) (spec_to_Z y)). + rewrite <- H in H1. + assert (H2:=spec_to_Z h);split;zarith. + case H1;clear H1;intro H1;clear H1. + replace (wB ^ 2 - 2 * wB) with ((wB - 2)*wB). 2:ring. + intros H0;assert (U1:= wB_pos w_digits). + assert (H1 := beta_lex _ _ _ _ _ H0 (spec_to_Z l));zarith. + Qed. + +(* End DoubleProof. *) + +End DoubleMul. diff --git a/theories/Numbers/Cyclic/DoubleCyclic/DoubleSqrt.v b/theories/Numbers/Cyclic/DoubleCyclic/DoubleSqrt.v new file mode 100644 index 00000000..043ff351 --- /dev/null +++ b/theories/Numbers/Cyclic/DoubleCyclic/DoubleSqrt.v @@ -0,0 +1,1389 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* bool. + Variable w_compare : w -> w -> comparison. + Variable w_0 : w. + Variable w_1 : w. + Variable w_Bm1 : w. + Variable w_WW : w -> w -> zn2z w. + Variable w_W0 : w -> zn2z w. + Variable w_0W : w -> zn2z w. + Variable w_sub : w -> w -> w. + Variable w_sub_c : w -> w -> carry w. + Variable w_square_c : w -> zn2z w. + Variable w_div21 : w -> w -> w -> w * w. + Variable w_add_mul_div : w -> w -> w -> w. + Variable w_digits : positive. + Variable w_zdigits : w. + Variable ww_zdigits : zn2z w. + Variable w_add_c : w -> w -> carry w. + Variable w_sqrt2 : w -> w -> w * carry w. + Variable w_pred : w -> w. + Variable ww_pred_c : zn2z w -> carry (zn2z w). + Variable ww_pred : zn2z w -> zn2z w. + Variable ww_add_c : zn2z w -> zn2z w -> carry (zn2z w). + Variable ww_add : zn2z w -> zn2z w -> zn2z w. + Variable ww_sub_c : zn2z w -> zn2z w -> carry (zn2z w). + Variable ww_add_mul_div : zn2z w -> zn2z w -> zn2z w -> zn2z w. + Variable ww_head0 : zn2z w -> zn2z w. + Variable ww_compare : zn2z w -> zn2z w -> comparison. + Variable low : zn2z w -> w. + + Let wwBm1 := ww_Bm1 w_Bm1. + + Definition ww_is_even x := + match x with + | W0 => true + | WW xh xl => w_is_even xl + end. + + Let w_div21c x y z := + match w_compare x z with + | Eq => + match w_compare y z with + Eq => (C1 w_1, w_0) + | Gt => (C1 w_1, w_sub y z) + | Lt => (C1 w_0, y) + end + | Gt => + let x1 := w_sub x z in + let (q, r) := w_div21 x1 y z in + (C1 q, r) + | Lt => + let (q, r) := w_div21 x y z in + (C0 q, r) + end. + + Let w_div2s x y s := + match x with + C1 x1 => + let x2 := w_sub x1 s in + let (q, r) := w_div21c x2 y s in + match q with + C0 q1 => + if w_is_even q1 then + (C0 (w_add_mul_div (w_pred w_zdigits) w_1 q1), C0 r) + else + (C0 (w_add_mul_div (w_pred w_zdigits) w_1 q1), w_add_c r s) + | C1 q1 => + if w_is_even q1 then + (C1 (w_add_mul_div (w_pred w_zdigits) w_0 q1), C0 r) + else + (C1 (w_add_mul_div (w_pred w_zdigits) w_0 q1), w_add_c r s) + end + | C0 x1 => + let (q, r) := w_div21c x1 y s in + match q with + C0 q1 => + if w_is_even q1 then + (C0 (w_add_mul_div (w_pred w_zdigits) w_0 q1), C0 r) + else + (C0 (w_add_mul_div (w_pred w_zdigits) w_0 q1), w_add_c r s) + | C1 q1 => + if w_is_even q1 then + (C0 (w_add_mul_div (w_pred w_zdigits) w_1 q1), C0 r) + else + (C0 (w_add_mul_div (w_pred w_zdigits) w_1 q1), w_add_c r s) + end + end. + + Definition split x := + match x with + | W0 => (w_0,w_0) + | WW h l => (h,l) + end. + + Definition ww_sqrt2 x y := + let (x1, x2) := split x in + let (y1, y2) := split y in + let ( q, r) := w_sqrt2 x1 x2 in + let (q1, r1) := w_div2s r y1 q in + match q1 with + C0 q1 => + let q2 := w_square_c q1 in + let a := WW q q1 in + match r1 with + C1 r2 => + match ww_sub_c (WW r2 y2) q2 with + C0 r3 => (a, C1 r3) + | C1 r3 => (a, C0 r3) + end + | C0 r2 => + match ww_sub_c (WW r2 y2) q2 with + C0 r3 => (a, C0 r3) + | C1 r3 => + let a2 := ww_add_mul_div (w_0W w_1) a W0 in + match ww_pred_c a2 with + C0 a3 => + (ww_pred a, ww_add_c a3 r3) + | C1 a3 => + (ww_pred a, C0 (ww_add a3 r3)) + end + end + end + | C1 q1 => + let a1 := WW q w_Bm1 in + let a2 := ww_add_mul_div (w_0W w_1) a1 wwBm1 in + (a1, ww_add_c a2 y) + end. + + Definition ww_is_zero x := + match ww_compare W0 x with + Eq => true + | _ => false + end. + + Definition ww_head1 x := + let p := ww_head0 x in + if (ww_is_even p) then p else ww_pred p. + + Definition ww_sqrt x := + if (ww_is_zero x) then W0 + else + let p := ww_head1 x in + match ww_compare p W0 with + | Gt => + match ww_add_mul_div p x W0 with + W0 => W0 + | WW x1 x2 => + let (r, _) := w_sqrt2 x1 x2 in + WW w_0 (w_add_mul_div + (w_sub w_zdigits + (low (ww_add_mul_div (ww_pred ww_zdigits) + W0 p))) w_0 r) + end + | _ => + match x with + W0 => W0 + | WW x1 x2 => WW w_0 (fst (w_sqrt2 x1 x2)) + end + end. + + + Variable w_to_Z : w -> Z. + + Notation wB := (base w_digits). + Notation wwB := (base (ww_digits w_digits)). + Notation "[| x |]" := (w_to_Z x) (at level 0, x at level 99). + Notation "[+| c |]" := + (interp_carry 1 wB w_to_Z c) (at level 0, x at level 99). + Notation "[-| c |]" := + (interp_carry (-1) wB w_to_Z c) (at level 0, x at level 99). + + Notation "[[ x ]]" := (ww_to_Z w_digits w_to_Z x)(at level 0, x at level 99). + Notation "[+[ c ]]" := + (interp_carry 1 wwB (ww_to_Z w_digits w_to_Z) c) + (at level 0, x at level 99). + Notation "[-[ c ]]" := + (interp_carry (-1) wwB (ww_to_Z w_digits w_to_Z) c) + (at level 0, x at level 99). + + Notation "[|| x ||]" := + (zn2z_to_Z wwB (ww_to_Z w_digits w_to_Z) x) (at level 0, x at level 99). + + Notation "[! n | x !]" := (double_to_Z w_digits w_to_Z n x) + (at level 0, x at level 99). + + Variable spec_w_0 : [|w_0|] = 0. + Variable spec_w_1 : [|w_1|] = 1. + Variable spec_w_Bm1 : [|w_Bm1|] = wB - 1. + Variable spec_w_zdigits : [|w_zdigits|] = Zpos w_digits. + Variable spec_more_than_1_digit: 1 < Zpos w_digits. + + Variable spec_ww_zdigits : [[ww_zdigits]] = Zpos (xO w_digits). + Variable spec_to_Z : forall x, 0 <= [|x|] < wB. + Variable spec_to_w_Z : forall x, 0 <= [[x]] < wwB. + + Variable spec_w_WW : forall h l, [[w_WW h l]] = [|h|] * wB + [|l|]. + Variable spec_w_W0 : forall h, [[w_W0 h]] = [|h|] * wB. + Variable spec_w_0W : forall l, [[w_0W l]] = [|l|]. + Variable spec_w_is_even : forall x, + if w_is_even x then [|x|] mod 2 = 0 else [|x|] mod 2 = 1. + Variable spec_w_compare : forall x y, + match w_compare x y with + | Eq => [|x|] = [|y|] + | Lt => [|x|] < [|y|] + | Gt => [|x|] > [|y|] + end. + Variable spec_w_sub : forall x y, [|w_sub x y|] = ([|x|] - [|y|]) mod wB. + Variable spec_w_square_c : forall x, [[ w_square_c x]] = [|x|] * [|x|]. + Variable spec_w_div21 : forall a1 a2 b, + wB/2 <= [|b|] -> + [|a1|] < [|b|] -> + let (q,r) := w_div21 a1 a2 b in + [|a1|] *wB+ [|a2|] = [|q|] * [|b|] + [|r|] /\ + 0 <= [|r|] < [|b|]. + Variable spec_w_add_mul_div : forall x y p, + [|p|] <= Zpos w_digits -> + [| w_add_mul_div p x y |] = + ([|x|] * (2 ^ [|p|]) + + [|y|] / (Zpower 2 ((Zpos w_digits) - [|p|]))) mod wB. + Variable spec_ww_add_mul_div : forall x y p, + [[p]] <= Zpos (xO w_digits) -> + [[ ww_add_mul_div p x y ]] = + ([[x]] * (2^ [[p]]) + + [[y]] / (2^ (Zpos (xO w_digits) - [[p]]))) mod wwB. + Variable spec_w_add_c : forall x y, [+|w_add_c x y|] = [|x|] + [|y|]. + Variable spec_ww_add : forall x y, [[ww_add x y]] = ([[x]] + [[y]]) mod wwB. + Variable spec_w_sqrt2 : forall x y, + wB/ 4 <= [|x|] -> + let (s,r) := w_sqrt2 x y in + [[WW x y]] = [|s|] ^ 2 + [+|r|] /\ + [+|r|] <= 2 * [|s|]. + Variable spec_ww_sub_c : forall x y, [-[ww_sub_c x y]] = [[x]] - [[y]]. + Variable spec_ww_pred_c : forall x, [-[ww_pred_c x]] = [[x]] - 1. + Variable spec_pred : forall x, [|w_pred x|] = ([|x|] - 1) mod wB. + Variable spec_ww_pred : forall x, [[ww_pred x]] = ([[x]] - 1) mod wwB. + Variable spec_ww_add_c : forall x y, [+[ww_add_c x y]] = [[x]] + [[y]]. + Variable spec_ww_compare : forall x y, + match ww_compare x y with + | Eq => [[x]] = [[y]] + | Lt => [[x]] < [[y]] + | Gt => [[x]] > [[y]] + end. + Variable spec_ww_head0 : forall x, 0 < [[x]] -> + wwB/ 2 <= 2 ^ [[ww_head0 x]] * [[x]] < wwB. + Variable spec_low: forall x, [|low x|] = [[x]] mod wB. + + Let spec_ww_Bm1 : [[wwBm1]] = wwB - 1. + Proof. refine (spec_ww_Bm1 w_Bm1 w_digits w_to_Z _);auto. Qed. + + + Hint Rewrite spec_w_0 spec_w_1 w_Bm1 spec_w_WW spec_w_sub + spec_w_div21 spec_w_add_mul_div spec_ww_Bm1 + spec_w_add_c spec_w_sqrt2: w_rewrite. + + Lemma spec_ww_is_even : forall x, + if ww_is_even x then [[x]] mod 2 = 0 else [[x]] mod 2 = 1. +clear spec_more_than_1_digit. +intros x; case x; simpl ww_is_even. + simpl. + rewrite Zmod_small; auto with zarith. + intros w1 w2; simpl. + unfold base. + rewrite Zplus_mod; auto with zarith. + rewrite (fun x y => (Zdivide_mod (x * y))); auto with zarith. + rewrite Zplus_0_l; rewrite Zmod_mod; auto with zarith. + apply spec_w_is_even; auto with zarith. + apply Zdivide_mult_r; apply Zpower_divide; auto with zarith. + red; simpl; auto. + Qed. + + + Theorem spec_w_div21c : forall a1 a2 b, + wB/2 <= [|b|] -> + let (q,r) := w_div21c a1 a2 b in + [|a1|] * wB + [|a2|] = [+|q|] * [|b|] + [|r|] /\ 0 <= [|r|] < [|b|]. + intros a1 a2 b Hb; unfold w_div21c. + assert (H: 0 < [|b|]); auto with zarith. + assert (U := wB_pos w_digits). + apply Zlt_le_trans with (2 := Hb); auto with zarith. + apply Zlt_le_trans with 1; auto with zarith. + apply Zdiv_le_lower_bound; auto with zarith. + repeat match goal with |- context[w_compare ?y ?z] => + generalize (spec_w_compare y z); + case (w_compare y z) + end. + intros H1 H2; split. + unfold interp_carry; autorewrite with w_rewrite rm10; auto with zarith. + rewrite H1; rewrite H2; ring. + autorewrite with w_rewrite; auto with zarith. + intros H1 H2; split. + unfold interp_carry; autorewrite with w_rewrite rm10; auto with zarith. + rewrite H2; ring. + destruct (spec_to_Z a2);auto with zarith. + intros H1 H2; split. + unfold interp_carry; autorewrite with w_rewrite rm10; auto with zarith. + rewrite H2; rewrite Zmod_small; auto with zarith. + ring. + destruct (spec_to_Z a2);auto with zarith. + rewrite spec_w_sub; auto with zarith. + destruct (spec_to_Z a2) as [H3 H4];auto with zarith. + rewrite Zmod_small; auto with zarith. + split; auto with zarith. + assert ([|a2|] < 2 * [|b|]); auto with zarith. + apply Zlt_le_trans with (2 * (wB / 2)); auto with zarith. + rewrite wB_div_2; auto. + intros H1. + match goal with |- context[w_div21 ?y ?z ?t] => + generalize (@spec_w_div21 y z t Hb H1); + case (w_div21 y z t); simpl; autorewrite with w_rewrite; + auto + end. + intros H1. + assert (H2: [|w_sub a1 b|] < [|b|]). + rewrite spec_w_sub; auto with zarith. + rewrite Zmod_small; auto with zarith. + assert ([|a1|] < 2 * [|b|]); auto with zarith. + apply Zlt_le_trans with (2 * (wB / 2)); auto with zarith. + rewrite wB_div_2; auto. + destruct (spec_to_Z a1);auto with zarith. + destruct (spec_to_Z a1);auto with zarith. + match goal with |- context[w_div21 ?y ?z ?t] => + generalize (@spec_w_div21 y z t Hb H2); + case (w_div21 y z t); autorewrite with w_rewrite; + auto + end. + intros w0 w1; replace [+|C1 w0|] with (wB + [|w0|]). + rewrite Zmod_small; auto with zarith. + intros (H3, H4); split; auto. + rewrite Zmult_plus_distr_l. + rewrite <- Zplus_assoc; rewrite <- H3; ring. + split; auto with zarith. + assert ([|a1|] < 2 * [|b|]); auto with zarith. + apply Zlt_le_trans with (2 * (wB / 2)); auto with zarith. + rewrite wB_div_2; auto. + destruct (spec_to_Z a1);auto with zarith. + destruct (spec_to_Z a1);auto with zarith. + simpl; case wB; auto. + Qed. + + Theorem C0_id: forall p, [+|C0 p|] = [|p|]. + intros p; simpl; auto. + Qed. + + Theorem add_mult_div_2: forall w, + [|w_add_mul_div (w_pred w_zdigits) w_0 w|] = [|w|] / 2. + intros w1. + assert (Hp: [|w_pred w_zdigits|] = Zpos w_digits - 1). + rewrite spec_pred; rewrite spec_w_zdigits. + rewrite Zmod_small; auto with zarith. + split; auto with zarith. + apply Zlt_le_trans with (Zpos w_digits); auto with zarith. + unfold base; apply Zpower2_le_lin; auto with zarith. + rewrite spec_w_add_mul_div; auto with zarith. + autorewrite with w_rewrite rm10. + match goal with |- context[?X - ?Y] => + replace (X - Y) with 1 + end. + rewrite Zpower_1_r; rewrite Zmod_small; auto with zarith. + destruct (spec_to_Z w1) as [H1 H2];auto with zarith. + split; auto with zarith. + apply Zdiv_lt_upper_bound; auto with zarith. + rewrite Hp; ring. + Qed. + + Theorem add_mult_div_2_plus_1: forall w, + [|w_add_mul_div (w_pred w_zdigits) w_1 w|] = + [|w|] / 2 + 2 ^ Zpos (w_digits - 1). + intros w1. + assert (Hp: [|w_pred w_zdigits|] = Zpos w_digits - 1). + rewrite spec_pred; rewrite spec_w_zdigits. + rewrite Zmod_small; auto with zarith. + split; auto with zarith. + apply Zlt_le_trans with (Zpos w_digits); auto with zarith. + unfold base; apply Zpower2_le_lin; auto with zarith. + autorewrite with w_rewrite rm10; auto with zarith. + match goal with |- context[?X - ?Y] => + replace (X - Y) with 1 + end; rewrite Hp; try ring. + rewrite Zpos_minus; auto with zarith. + rewrite Zmax_right; auto with zarith. + rewrite Zpower_1_r; rewrite Zmod_small; auto with zarith. + destruct (spec_to_Z w1) as [H1 H2];auto with zarith. + split; auto with zarith. + unfold base. + match goal with |- _ < _ ^ ?X => + assert (tmp: forall p, 1 + (p - 1) = p); auto with zarith; + rewrite <- (tmp X); clear tmp + end. + rewrite Zpower_exp; try rewrite Zpower_1_r; auto with zarith. + assert (tmp: forall p, 1 + (p -1) - 1 = p - 1); auto with zarith; + rewrite tmp; clear tmp; auto with zarith. + match goal with |- ?X + ?Y < _ => + assert (Y < X); auto with zarith + end. + apply Zdiv_lt_upper_bound; auto with zarith. + pattern 2 at 2; rewrite <- Zpower_1_r; rewrite <- Zpower_exp; + auto with zarith. + assert (tmp: forall p, (p - 1) + 1 = p); auto with zarith; + rewrite tmp; clear tmp; auto with zarith. + Qed. + + Theorem add_mult_mult_2: forall w, + [|w_add_mul_div w_1 w w_0|] = 2 * [|w|] mod wB. + intros w1. + autorewrite with w_rewrite rm10; auto with zarith. + rewrite Zpower_1_r; auto with zarith. + rewrite Zmult_comm; auto. + Qed. + + Theorem ww_add_mult_mult_2: forall w, + [[ww_add_mul_div (w_0W w_1) w W0]] = 2 * [[w]] mod wwB. + intros w1. + rewrite spec_ww_add_mul_div; auto with zarith. + autorewrite with w_rewrite rm10. + rewrite spec_w_0W; rewrite spec_w_1. + rewrite Zpower_1_r; auto with zarith. + rewrite Zmult_comm; auto. + rewrite spec_w_0W; rewrite spec_w_1; auto with zarith. + red; simpl; intros; discriminate. + Qed. + + Theorem ww_add_mult_mult_2_plus_1: forall w, + [[ww_add_mul_div (w_0W w_1) w wwBm1]] = + (2 * [[w]] + 1) mod wwB. + intros w1. + rewrite spec_ww_add_mul_div; auto with zarith. + rewrite spec_w_0W; rewrite spec_w_1; auto with zarith. + rewrite Zpower_1_r; auto with zarith. + f_equal; auto. + rewrite Zmult_comm; f_equal; auto. + autorewrite with w_rewrite rm10. + unfold ww_digits, base. + apply sym_equal; apply Zdiv_unique with (r := 2 ^ (Zpos (ww_digits w_digits) - 1) -1); + auto with zarith. + unfold ww_digits; split; auto with zarith. + match goal with |- 0 <= ?X - 1 => + assert (0 < X); auto with zarith + end. + apply Zpower_gt_0; auto with zarith. + match goal with |- 0 <= ?X - 1 => + assert (0 < X); auto with zarith; red; reflexivity + end. + unfold ww_digits; autorewrite with rm10. + assert (tmp: forall p q r, p + (q - r) = p + q - r); auto with zarith; + rewrite tmp; clear tmp. + assert (tmp: forall p, p + p = 2 * p); auto with zarith; + rewrite tmp; clear tmp. + f_equal; auto. + pattern 2 at 2; rewrite <- Zpower_1_r; rewrite <- Zpower_exp; + auto with zarith. + assert (tmp: forall p, 1 + (p - 1) = p); auto with zarith; + rewrite tmp; clear tmp; auto. + match goal with |- ?X - 1 >= 0 => + assert (0 < X); auto with zarith; red; reflexivity + end. + rewrite spec_w_0W; rewrite spec_w_1; auto with zarith. + red; simpl; intros; discriminate. + Qed. + + Theorem Zplus_mod_one: forall a1 b1, 0 < b1 -> (a1 + b1) mod b1 = a1 mod b1. + intros a1 b1 H; rewrite Zplus_mod; auto with zarith. + rewrite Z_mod_same; try rewrite Zplus_0_r; auto with zarith. + apply Zmod_mod; auto. + Qed. + + Lemma C1_plus_wB: forall x, [+|C1 x|] = wB + [|x|]. + unfold interp_carry; auto with zarith. + Qed. + + Theorem spec_w_div2s : forall a1 a2 b, + wB/2 <= [|b|] -> [+|a1|] <= 2 * [|b|] -> + let (q,r) := w_div2s a1 a2 b in + [+|a1|] * wB + [|a2|] = [+|q|] * (2 * [|b|]) + [+|r|] /\ 0 <= [+|r|] < 2 * [|b|]. + intros a1 a2 b H. + assert (HH: 0 < [|b|]); auto with zarith. + assert (U := wB_pos w_digits). + apply Zlt_le_trans with (2 := H); auto with zarith. + apply Zlt_le_trans with 1; auto with zarith. + apply Zdiv_le_lower_bound; auto with zarith. + unfold w_div2s; case a1; intros w0 H0. + match goal with |- context[w_div21c ?y ?z ?t] => + generalize (@spec_w_div21c y z t H); + case (w_div21c y z t); autorewrite with w_rewrite; + auto + end. + intros c w1; case c. + simpl interp_carry; intros w2 (Hw1, Hw2). + match goal with |- context[w_is_even ?y] => + generalize (spec_w_is_even y); + case (w_is_even y) + end. + repeat rewrite C0_id. + rewrite add_mult_div_2. + intros H1; split; auto with zarith. + rewrite Hw1. + pattern [|w2|] at 1; rewrite (Z_div_mod_eq [|w2|] 2); + auto with zarith. + rewrite H1; ring. + repeat rewrite C0_id. + rewrite add_mult_div_2. + rewrite spec_w_add_c; auto with zarith. + intros H1; split; auto with zarith. + rewrite Hw1. + pattern [|w2|] at 1; rewrite (Z_div_mod_eq [|w2|] 2); + auto with zarith. + rewrite H1; ring. + intros w2; rewrite C1_plus_wB. + intros (Hw1, Hw2). + match goal with |- context[w_is_even ?y] => + generalize (spec_w_is_even y); + case (w_is_even y) + end. + repeat rewrite C0_id. + intros H1; split; auto with zarith. + rewrite Hw1. + pattern [|w2|] at 1; rewrite (Z_div_mod_eq [|w2|] 2); + auto with zarith. + rewrite H1. + repeat rewrite C0_id. + rewrite add_mult_div_2_plus_1; unfold base. + match goal with |- context[_ ^ ?X] => + assert (tmp: forall p, 1 + (p - 1) = p); auto with zarith; + rewrite <- (tmp X); clear tmp; rewrite Zpower_exp; + try rewrite Zpower_1_r; auto with zarith + end. + rewrite Zpos_minus; auto with zarith. + rewrite Zmax_right; auto with zarith. + ring. + repeat rewrite C0_id. + rewrite spec_w_add_c; auto with zarith. + intros H1; split; auto with zarith. + rewrite add_mult_div_2_plus_1. + rewrite Hw1. + pattern [|w2|] at 1; rewrite (Z_div_mod_eq [|w2|] 2); + auto with zarith. + rewrite H1. + unfold base. + match goal with |- context[_ ^ ?X] => + assert (tmp: forall p, 1 + (p - 1) = p); auto with zarith; + rewrite <- (tmp X); clear tmp; rewrite Zpower_exp; + try rewrite Zpower_1_r; auto with zarith + end. + rewrite Zpos_minus; auto with zarith. + rewrite Zmax_right; auto with zarith. + ring. + repeat rewrite C1_plus_wB in H0. + rewrite C1_plus_wB. + match goal with |- context[w_div21c ?y ?z ?t] => + generalize (@spec_w_div21c y z t H); + case (w_div21c y z t); autorewrite with w_rewrite; + auto + end. + intros c w1; case c. + intros w2 (Hw1, Hw2); rewrite C0_id in Hw1. + rewrite <- Zplus_mod_one in Hw1; auto with zarith. + rewrite Zmod_small in Hw1; auto with zarith. + match goal with |- context[w_is_even ?y] => + generalize (spec_w_is_even y); + case (w_is_even y) + end. + repeat rewrite C0_id. + intros H1; split; auto with zarith. + rewrite add_mult_div_2_plus_1. + replace (wB + [|w0|]) with ([|b|] + ([|w0|] - [|b|] + wB)); + auto with zarith. + rewrite Zmult_plus_distr_l; rewrite <- Zplus_assoc. + rewrite Hw1. + pattern [|w2|] at 1; rewrite (Z_div_mod_eq [|w2|] 2); + auto with zarith. + rewrite H1; unfold base. + match goal with |- context[_ ^ ?X] => + assert (tmp: forall p, 1 + (p - 1) = p); auto with zarith; + rewrite <- (tmp X); clear tmp; rewrite Zpower_exp; + try rewrite Zpower_1_r; auto with zarith + end. + rewrite Zpos_minus; auto with zarith. + rewrite Zmax_right; auto with zarith. + ring. + repeat rewrite C0_id. + rewrite add_mult_div_2_plus_1. + rewrite spec_w_add_c; auto with zarith. + intros H1; split; auto with zarith. + replace (wB + [|w0|]) with ([|b|] + ([|w0|] - [|b|] + wB)); + auto with zarith. + rewrite Zmult_plus_distr_l; rewrite <- Zplus_assoc. + rewrite Hw1. + pattern [|w2|] at 1; rewrite (Z_div_mod_eq [|w2|] 2); + auto with zarith. + rewrite H1; unfold base. + match goal with |- context[_ ^ ?X] => + assert (tmp: forall p, 1 + (p - 1) = p); auto with zarith; + rewrite <- (tmp X); clear tmp; rewrite Zpower_exp; + try rewrite Zpower_1_r; auto with zarith + end. + rewrite Zpos_minus; auto with zarith. + rewrite Zmax_right; auto with zarith. + ring. + split; auto with zarith. + destruct (spec_to_Z b);auto with zarith. + destruct (spec_to_Z w0);auto with zarith. + destruct (spec_to_Z b);auto with zarith. + destruct (spec_to_Z b);auto with zarith. + intros w2; rewrite C1_plus_wB. + rewrite <- Zplus_mod_one; auto with zarith. + rewrite Zmod_small; auto with zarith. + intros (Hw1, Hw2). + match goal with |- context[w_is_even ?y] => + generalize (spec_w_is_even y); + case (w_is_even y) + end. + repeat (rewrite C0_id || rewrite C1_plus_wB). + intros H1; split; auto with zarith. + rewrite add_mult_div_2. + replace (wB + [|w0|]) with ([|b|] + ([|w0|] - [|b|] + wB)); + auto with zarith. + rewrite Zmult_plus_distr_l; rewrite <- Zplus_assoc. + rewrite Hw1. + pattern [|w2|] at 1; rewrite (Z_div_mod_eq [|w2|] 2); + auto with zarith. + rewrite H1; ring. + repeat (rewrite C0_id || rewrite C1_plus_wB). + rewrite spec_w_add_c; auto with zarith. + intros H1; split; auto with zarith. + rewrite add_mult_div_2. + replace (wB + [|w0|]) with ([|b|] + ([|w0|] - [|b|] + wB)); + auto with zarith. + rewrite Zmult_plus_distr_l; rewrite <- Zplus_assoc. + rewrite Hw1. + pattern [|w2|] at 1; rewrite (Z_div_mod_eq [|w2|] 2); + auto with zarith. + rewrite H1; ring. + split; auto with zarith. + destruct (spec_to_Z b);auto with zarith. + destruct (spec_to_Z w0);auto with zarith. + destruct (spec_to_Z b);auto with zarith. + destruct (spec_to_Z b);auto with zarith. + Qed. + + Theorem wB_div_4: 4 * (wB / 4) = wB. + Proof. + unfold base. + assert (2 ^ Zpos w_digits = + 4 * (2 ^ (Zpos w_digits - 2))). + change 4 with (2 ^ 2). + rewrite <- Zpower_exp; auto with zarith. + f_equal; auto with zarith. + rewrite H. + rewrite (fun x => (Zmult_comm 4 (2 ^x))). + rewrite Z_div_mult; auto with zarith. + Qed. + + Theorem Zsquare_mult: forall p, p ^ 2 = p * p. + intros p; change 2 with (1 + 1); rewrite Zpower_exp; + try rewrite Zpower_1_r; auto with zarith. + Qed. + + Theorem Zsquare_pos: forall p, 0 <= p ^ 2. + intros p; case (Zle_or_lt 0 p); intros H1. + rewrite Zsquare_mult; apply Zmult_le_0_compat; auto with zarith. + rewrite Zsquare_mult; replace (p * p) with ((- p) * (- p)); try ring. + apply Zmult_le_0_compat; auto with zarith. + Qed. + + Lemma spec_split: forall x, + [|fst (split x)|] * wB + [|snd (split x)|] = [[x]]. + intros x; case x; simpl; autorewrite with w_rewrite; + auto with zarith. + Qed. + + Theorem mult_wwB: forall x y, [|x|] * [|y|] < wwB. + Proof. + intros x y; rewrite wwB_wBwB; rewrite Zpower_2. + generalize (spec_to_Z x); intros U. + generalize (spec_to_Z y); intros U1. + apply Zle_lt_trans with ((wB -1 ) * (wB - 1)); auto with zarith. + apply Zmult_le_compat; auto with zarith. + repeat (rewrite Zmult_minus_distr_r || rewrite Zmult_minus_distr_l); + auto with zarith. + Qed. + Hint Resolve mult_wwB. + + Lemma spec_ww_sqrt2 : forall x y, + wwB/ 4 <= [[x]] -> + let (s,r) := ww_sqrt2 x y in + [||WW x y||] = [[s]] ^ 2 + [+[r]] /\ + [+[r]] <= 2 * [[s]]. + intros x y H; unfold ww_sqrt2. + repeat match goal with |- context[split ?x] => + generalize (spec_split x); case (split x) + end; simpl fst; simpl snd. + intros w0 w1 Hw0 w2 w3 Hw1. + assert (U: wB/4 <= [|w2|]). + case (Zle_or_lt (wB / 4) [|w2|]); auto; intros H1. + contradict H; apply Zlt_not_le. + rewrite wwB_wBwB; rewrite Zpower_2. + pattern wB at 1; rewrite <- wB_div_4; rewrite <- Zmult_assoc; + rewrite Zmult_comm. + rewrite Z_div_mult; auto with zarith. + rewrite <- Hw1. + match goal with |- _ < ?X => + pattern X; rewrite <- Zplus_0_r; apply beta_lex_inv; + auto with zarith + end. + destruct (spec_to_Z w3);auto with zarith. + generalize (@spec_w_sqrt2 w2 w3 U); case (w_sqrt2 w2 w3). + intros w4 c (H1, H2). + assert (U1: wB/2 <= [|w4|]). + case (Zle_or_lt (wB/2) [|w4|]); auto with zarith. + intros U1. + assert (U2 : [|w4|] <= wB/2 -1); auto with zarith. + assert (U3 : [|w4|] ^ 2 <= wB/4 * wB - wB + 1); auto with zarith. + match goal with |- ?X ^ 2 <= ?Y => + rewrite Zsquare_mult; + replace Y with ((wB/2 - 1) * (wB/2 -1)) + end. + apply Zmult_le_compat; auto with zarith. + destruct (spec_to_Z w4);auto with zarith. + destruct (spec_to_Z w4);auto with zarith. + pattern wB at 4 5; rewrite <- wB_div_2. + rewrite Zmult_assoc. + replace ((wB / 4) * 2) with (wB / 2). + ring. + pattern wB at 1; rewrite <- wB_div_4. + change 4 with (2 * 2). + rewrite <- Zmult_assoc; rewrite (Zmult_comm 2). + rewrite Z_div_mult; try ring; auto with zarith. + assert (U4 : [+|c|] <= wB -2); auto with zarith. + apply Zle_trans with (1 := H2). + match goal with |- ?X <= ?Y => + replace Y with (2 * (wB/ 2 - 1)); auto with zarith + end. + pattern wB at 2; rewrite <- wB_div_2; auto with zarith. + match type of H1 with ?X = _ => + assert (U5: X < wB / 4 * wB) + end. + rewrite H1; auto with zarith. + contradict U; apply Zlt_not_le. + apply Zmult_lt_reg_r with wB; auto with zarith. + destruct (spec_to_Z w4);auto with zarith. + apply Zle_lt_trans with (2 := U5). + unfold ww_to_Z, zn2z_to_Z. + destruct (spec_to_Z w3);auto with zarith. + generalize (@spec_w_div2s c w0 w4 U1 H2). + case (w_div2s c w0 w4). + intros c0; case c0; intros w5; + repeat (rewrite C0_id || rewrite C1_plus_wB). + intros c1; case c1; intros w6; + repeat (rewrite C0_id || rewrite C1_plus_wB). + intros (H3, H4). + match goal with |- context [ww_sub_c ?y ?z] => + generalize (spec_ww_sub_c y z); case (ww_sub_c y z) + end. + intros z; change [-[C0 z]] with ([[z]]). + change [+[C0 z]] with ([[z]]). + intros H5; rewrite spec_w_square_c in H5; + auto. + split. + unfold zn2z_to_Z; rewrite <- Hw1. + unfold ww_to_Z, zn2z_to_Z in H1; rewrite H1. + rewrite <- Hw0. + match goal with |- (?X ^2 + ?Y) * wwB + (?Z * wB + ?T) = ?U => + apply trans_equal with ((X * wB) ^ 2 + (Y * wB + Z) * wB + T) + end. + repeat rewrite Zsquare_mult. + rewrite wwB_wBwB; ring. + rewrite H3. + rewrite H5. + unfold ww_to_Z, zn2z_to_Z. + repeat rewrite Zsquare_mult; ring. + rewrite H5. + unfold ww_to_Z, zn2z_to_Z. + match goal with |- ?X - ?Y * ?Y <= _ => + assert (V := Zsquare_pos Y); + rewrite Zsquare_mult in V; + apply Zle_trans with X; auto with zarith; + clear V + end. + match goal with |- ?X * wB + ?Y <= 2 * (?Z * wB + ?T) => + apply Zle_trans with ((2 * Z - 1) * wB + wB); auto with zarith + end. + destruct (spec_to_Z w1);auto with zarith. + match goal with |- ?X <= _ => + replace X with (2 * [|w4|] * wB); auto with zarith + end. + rewrite Zmult_plus_distr_r; rewrite Zmult_assoc. + destruct (spec_to_Z w5); auto with zarith. + ring. + intros z; replace [-[C1 z]] with (- wwB + [[z]]). + 2: simpl; case wwB; auto with zarith. + intros H5; rewrite spec_w_square_c in H5; + auto. + match goal with |- context [ww_pred_c ?y] => + generalize (spec_ww_pred_c y); case (ww_pred_c y) + end. + intros z1; change [-[C0 z1]] with ([[z1]]). + rewrite ww_add_mult_mult_2. + rewrite spec_ww_add_c. + rewrite spec_ww_pred. + rewrite <- Zmod_unique with (q := 1) (r := -wwB + 2 * [[WW w4 w5]]); + auto with zarith. + intros Hz1; rewrite Zmod_small; auto with zarith. + match type of H5 with -?X + ?Y = ?Z => + assert (V: Y = Z + X); + try (rewrite <- H5; ring) + end. + split. + unfold zn2z_to_Z; rewrite <- Hw1. + unfold ww_to_Z, zn2z_to_Z in H1; rewrite H1. + rewrite <- Hw0. + match goal with |- (?X ^2 + ?Y) * wwB + (?Z * wB + ?T) = ?U => + apply trans_equal with ((X * wB) ^ 2 + (Y * wB + Z) * wB + T) + end. + repeat rewrite Zsquare_mult. + rewrite wwB_wBwB; ring. + rewrite H3. + rewrite V. + rewrite Hz1. + unfold ww_to_Z; simpl zn2z_to_Z. + repeat rewrite Zsquare_mult; ring. + rewrite Hz1. + destruct (spec_ww_to_Z w_digits w_to_Z spec_to_Z z);auto with zarith. + assert (V1 := spec_ww_to_Z w_digits w_to_Z spec_to_Z (WW w4 w5)). + assert (0 < [[WW w4 w5]]); auto with zarith. + apply Zlt_le_trans with (wB/ 2 * wB + 0); auto with zarith. + autorewrite with rm10; apply Zmult_lt_0_compat; auto with zarith. + apply Zmult_lt_reg_r with 2; auto with zarith. + autorewrite with rm10. + rewrite Zmult_comm; rewrite wB_div_2; auto with zarith. + case (spec_to_Z w5);auto with zarith. + case (spec_to_Z w5);auto with zarith. + simpl. + assert (V2 := spec_to_Z w5);auto with zarith. + assert (V1 := spec_ww_to_Z w_digits w_to_Z spec_to_Z (WW w4 w5)); auto with zarith. + split; auto with zarith. + assert (wwB <= 2 * [[WW w4 w5]]); auto with zarith. + apply Zle_trans with (2 * ([|w4|] * wB)). + rewrite wwB_wBwB; rewrite Zpower_2. + rewrite Zmult_assoc; apply Zmult_le_compat_r; auto with zarith. + rewrite <- wB_div_2; auto with zarith. + assert (V2 := spec_to_Z w5);auto with zarith. + simpl ww_to_Z; assert (V2 := spec_to_Z w5);auto with zarith. + assert (V1 := spec_ww_to_Z w_digits w_to_Z spec_to_Z (WW w4 w5)); auto with zarith. + intros z1; change [-[C1 z1]] with (-wwB + [[z1]]). + match goal with |- context[([+[C0 ?z]])] => + change [+[C0 z]] with ([[z]]) + end. + rewrite spec_ww_add; auto with zarith. + rewrite spec_ww_pred; auto with zarith. + rewrite ww_add_mult_mult_2. + rename V1 into VV1. + assert (VV2: 0 < [[WW w4 w5]]); auto with zarith. + apply Zlt_le_trans with (wB/ 2 * wB + 0); auto with zarith. + autorewrite with rm10; apply Zmult_lt_0_compat; auto with zarith. + apply Zmult_lt_reg_r with 2; auto with zarith. + autorewrite with rm10. + rewrite Zmult_comm; rewrite wB_div_2; auto with zarith. + assert (VV3 := spec_to_Z w5);auto with zarith. + assert (VV3 := spec_to_Z w5);auto with zarith. + simpl. + assert (VV3 := spec_to_Z w5);auto with zarith. + assert (VV3: wwB <= 2 * [[WW w4 w5]]); auto with zarith. + apply Zle_trans with (2 * ([|w4|] * wB)). + rewrite wwB_wBwB; rewrite Zpower_2. + rewrite Zmult_assoc; apply Zmult_le_compat_r; auto with zarith. + rewrite <- wB_div_2; auto with zarith. + case (spec_to_Z w5);auto with zarith. + simpl ww_to_Z; assert (V4 := spec_to_Z w5);auto with zarith. + rewrite <- Zmod_unique with (q := 1) (r := -wwB + 2 * [[WW w4 w5]]); + auto with zarith. + intros Hz1; rewrite Zmod_small; auto with zarith. + match type of H5 with -?X + ?Y = ?Z => + assert (V: Y = Z + X); + try (rewrite <- H5; ring) + end. + match type of Hz1 with -?X + ?Y = -?X + ?Z - 1 => + assert (V1: Y = Z - 1); + [replace (Z - 1) with (X + (-X + Z -1)); + [rewrite <- Hz1 | idtac]; ring + | idtac] + end. + rewrite <- Zmod_unique with (q := 1) (r := -wwB + [[z1]] + [[z]]); + auto with zarith. + unfold zn2z_to_Z; rewrite <- Hw1. + unfold ww_to_Z, zn2z_to_Z in H1; rewrite H1. + rewrite <- Hw0. + split. + match goal with |- (?X ^2 + ?Y) * wwB + (?Z * wB + ?T) = ?U => + apply trans_equal with ((X * wB) ^ 2 + (Y * wB + Z) * wB + T) + end. + repeat rewrite Zsquare_mult. + rewrite wwB_wBwB; ring. + rewrite H3. + rewrite V. + rewrite Hz1. + unfold ww_to_Z; simpl zn2z_to_Z. + repeat rewrite Zsquare_mult; ring. + assert (V2 := spec_ww_to_Z w_digits w_to_Z spec_to_Z z);auto with zarith. + assert (V2 := spec_ww_to_Z w_digits w_to_Z spec_to_Z z);auto with zarith. + assert (V3 := spec_ww_to_Z w_digits w_to_Z spec_to_Z z1);auto with zarith. + split; auto with zarith. + rewrite (Zplus_comm (-wwB)); rewrite <- Zplus_assoc. + rewrite H5. + match goal with |- 0 <= ?X + (?Y - ?Z) => + apply Zle_trans with (X - Z); auto with zarith + end. + 2: generalize (spec_ww_to_Z w_digits w_to_Z spec_to_Z (WW w6 w1)); unfold ww_to_Z; auto with zarith. + rewrite V1. + match goal with |- 0 <= ?X - 1 - ?Y => + assert (Y < X); auto with zarith + end. + apply Zlt_le_trans with wwB; auto with zarith. + intros (H3, H4). + match goal with |- context [ww_sub_c ?y ?z] => + generalize (spec_ww_sub_c y z); case (ww_sub_c y z) + end. + intros z; change [-[C0 z]] with ([[z]]). + match goal with |- context[([+[C1 ?z]])] => + replace [+[C1 z]] with (wwB + [[z]]) + end. + 2: simpl; case wwB; auto. + intros H5; rewrite spec_w_square_c in H5; + auto. + split. + change ([||WW x y||]) with ([[x]] * wwB + [[y]]). + rewrite <- Hw1. + unfold ww_to_Z, zn2z_to_Z in H1; rewrite H1. + rewrite <- Hw0. + match goal with |- (?X ^2 + ?Y) * wwB + (?Z * wB + ?T) = ?U => + apply trans_equal with ((X * wB) ^ 2 + (Y * wB + Z) * wB + T) + end. + repeat rewrite Zsquare_mult. + rewrite wwB_wBwB; ring. + rewrite H3. + rewrite H5. + unfold ww_to_Z; simpl zn2z_to_Z. + rewrite wwB_wBwB. + repeat rewrite Zsquare_mult; ring. + simpl ww_to_Z. + rewrite H5. + simpl ww_to_Z. + rewrite wwB_wBwB; rewrite Zpower_2. + match goal with |- ?X * ?Y + (?Z * ?Y + ?T - ?U) <= _ => + apply Zle_trans with (X * Y + (Z * Y + T - 0)); + auto with zarith + end. + assert (V := Zsquare_pos [|w5|]); + rewrite Zsquare_mult in V; auto with zarith. + autorewrite with rm10. + match goal with |- _ <= 2 * (?U * ?V + ?W) => + apply Zle_trans with (2 * U * V + 0); + auto with zarith + end. + match goal with |- ?X * ?Y + (?Z * ?Y + ?T) <= _ => + replace (X * Y + (Z * Y + T)) with ((X + Z) * Y + T); + try ring + end. + apply Zlt_le_weak; apply beta_lex_inv; auto with zarith. + destruct (spec_to_Z w1);auto with zarith. + destruct (spec_to_Z w5);auto with zarith. + rewrite Zmult_plus_distr_r; auto with zarith. + rewrite Zmult_assoc; auto with zarith. + intros z; replace [-[C1 z]] with (- wwB + [[z]]). + 2: simpl; case wwB; auto with zarith. + intros H5; rewrite spec_w_square_c in H5; + auto. + match goal with |- context[([+[C0 ?z]])] => + change [+[C0 z]] with ([[z]]) + end. + match type of H5 with -?X + ?Y = ?Z => + assert (V: Y = Z + X); + try (rewrite <- H5; ring) + end. + change ([||WW x y||]) with ([[x]] * wwB + [[y]]). + simpl ww_to_Z. + rewrite <- Hw1. + simpl ww_to_Z in H1; rewrite H1. + rewrite <- Hw0. + split. + match goal with |- (?X ^2 + ?Y) * wwB + (?Z * wB + ?T) = ?U => + apply trans_equal with ((X * wB) ^ 2 + (Y * wB + Z) * wB + T) + end. + repeat rewrite Zsquare_mult. + rewrite wwB_wBwB; ring. + rewrite H3. + rewrite V. + simpl ww_to_Z. + rewrite wwB_wBwB. + repeat rewrite Zsquare_mult; ring. + rewrite V. + simpl ww_to_Z. + rewrite wwB_wBwB; rewrite Zpower_2. + match goal with |- (?Z * ?Y + ?T - ?U) + ?X * ?Y <= _ => + apply Zle_trans with ((Z * Y + T - 0) + X * Y); + auto with zarith + end. + assert (V1 := Zsquare_pos [|w5|]); + rewrite Zsquare_mult in V1; auto with zarith. + autorewrite with rm10. + match goal with |- _ <= 2 * (?U * ?V + ?W) => + apply Zle_trans with (2 * U * V + 0); + auto with zarith + end. + match goal with |- (?Z * ?Y + ?T) + ?X * ?Y <= _ => + replace ((Z * Y + T) + X * Y) with ((X + Z) * Y + T); + try ring + end. + apply Zlt_le_weak; apply beta_lex_inv; auto with zarith. + destruct (spec_to_Z w1);auto with zarith. + destruct (spec_to_Z w5);auto with zarith. + rewrite Zmult_plus_distr_r; auto with zarith. + rewrite Zmult_assoc; auto with zarith. + case Zle_lt_or_eq with (1 := H2); clear H2; intros H2. + intros c1 (H3, H4). + match type of H3 with ?X = ?Y => + absurd (X < Y) + end. + apply Zle_not_lt; rewrite <- H3; auto with zarith. + rewrite Zmult_plus_distr_l. + apply Zlt_le_trans with ((2 * [|w4|]) * wB + 0); + auto with zarith. + apply beta_lex_inv; auto with zarith. + destruct (spec_to_Z w0);auto with zarith. + assert (V1 := spec_to_Z w5);auto with zarith. + rewrite (Zmult_comm wB); auto with zarith. + assert (0 <= [|w5|] * (2 * [|w4|])); auto with zarith. + intros c1 (H3, H4); rewrite H2 in H3. + match type of H3 with ?X + ?Y = (?Z + ?T) * ?U + ?V => + assert (VV: (Y = (T * U) + V)); + [replace Y with ((X + Y) - X); + [rewrite H3; ring | ring] | idtac] + end. + assert (V1 := spec_to_Z w0);auto with zarith. + assert (V2 := spec_to_Z w5);auto with zarith. + case (Zle_lt_or_eq 0 [|w5|]); auto with zarith; intros V3. + match type of VV with ?X = ?Y => + absurd (X < Y) + end. + apply Zle_not_lt; rewrite <- VV; auto with zarith. + apply Zlt_le_trans with wB; auto with zarith. + match goal with |- _ <= ?X + _ => + apply Zle_trans with X; auto with zarith + end. + match goal with |- _ <= _ * ?X => + apply Zle_trans with (1 * X); auto with zarith + end. + autorewrite with rm10. + rewrite <- wB_div_2; apply Zmult_le_compat_l; auto with zarith. + rewrite <- V3 in VV; generalize VV; autorewrite with rm10; + clear VV; intros VV. + rewrite spec_ww_add_c; auto with zarith. + rewrite ww_add_mult_mult_2_plus_1. + match goal with |- context[?X mod wwB] => + rewrite <- Zmod_unique with (q := 1) (r := -wwB + X) + end; auto with zarith. + simpl ww_to_Z. + rewrite spec_w_Bm1; auto with zarith. + split. + change ([||WW x y||]) with ([[x]] * wwB + [[y]]). + rewrite <- Hw1. + simpl ww_to_Z in H1; rewrite H1. + rewrite <- Hw0. + match goal with |- (?X ^2 + ?Y) * wwB + (?Z * wB + ?T) = ?U => + apply trans_equal with ((X * wB) ^ 2 + (Y * wB + Z) * wB + T) + end. + repeat rewrite Zsquare_mult. + rewrite wwB_wBwB; ring. + rewrite H2. + rewrite wwB_wBwB. + repeat rewrite Zsquare_mult; ring. + assert (V4 := spec_ww_to_Z w_digits w_to_Z spec_to_Z y);auto with zarith. + assert (V4 := spec_ww_to_Z w_digits w_to_Z spec_to_Z y);auto with zarith. + simpl ww_to_Z; unfold ww_to_Z. + rewrite spec_w_Bm1; auto with zarith. + split. + rewrite wwB_wBwB; rewrite Zpower_2. + match goal with |- _ <= -?X + (2 * (?Z * ?T + ?U) + ?V) => + assert (X <= 2 * Z * T); auto with zarith + end. + apply Zmult_le_compat_r; auto with zarith. + rewrite <- wB_div_2; apply Zmult_le_compat_l; auto with zarith. + rewrite Zmult_plus_distr_r; auto with zarith. + rewrite Zmult_assoc; auto with zarith. + match goal with |- _ + ?X < _ => + replace X with ((2 * (([|w4|]) + 1) * wB) - 1); try ring + end. + assert (2 * ([|w4|] + 1) * wB <= 2 * wwB); auto with zarith. + rewrite <- Zmult_assoc; apply Zmult_le_compat_l; auto with zarith. + rewrite wwB_wBwB; rewrite Zpower_2. + apply Zmult_le_compat_r; auto with zarith. + case (spec_to_Z w4);auto with zarith. + Qed. + + Lemma spec_ww_is_zero: forall x, + if ww_is_zero x then [[x]] = 0 else 0 < [[x]]. + intro x; unfold ww_is_zero. + generalize (spec_ww_compare W0 x); case (ww_compare W0 x); + auto with zarith. + simpl ww_to_Z. + assert (V4 := spec_ww_to_Z w_digits w_to_Z spec_to_Z x);auto with zarith. + Qed. + + Lemma wwB_4_2: 2 * (wwB / 4) = wwB/ 2. + pattern wwB at 1; rewrite wwB_wBwB; rewrite Zpower_2. + rewrite <- wB_div_2. + match goal with |- context[(2 * ?X) * (2 * ?Z)] => + replace ((2 * X) * (2 * Z)) with ((X * Z) * 4); try ring + end. + rewrite Z_div_mult; auto with zarith. + rewrite Zmult_assoc; rewrite wB_div_2. + rewrite wwB_div_2; ring. + Qed. + + + Lemma spec_ww_head1 + : forall x : zn2z w, + (ww_is_even (ww_head1 x) = true) /\ + (0 < [[x]] -> wwB / 4 <= 2 ^ [[ww_head1 x]] * [[x]] < wwB). + assert (U := wB_pos w_digits). + intros x; unfold ww_head1. + generalize (spec_ww_is_even (ww_head0 x)); case_eq (ww_is_even (ww_head0 x)). + intros HH H1; rewrite HH; split; auto. + intros H2. + generalize (spec_ww_head0 x H2); case (ww_head0 x); autorewrite with rm10. + intros (H3, H4); split; auto with zarith. + apply Zle_trans with (2 := H3). + apply Zdiv_le_compat_l; auto with zarith. + intros xh xl (H3, H4); split; auto with zarith. + apply Zle_trans with (2 := H3). + apply Zdiv_le_compat_l; auto with zarith. + intros H1. + case (spec_to_w_Z (ww_head0 x)); intros Hv1 Hv2. + assert (Hp0: 0 < [[ww_head0 x]]). + generalize (spec_ww_is_even (ww_head0 x)); rewrite H1. + generalize Hv1; case [[ww_head0 x]]. + rewrite Zmod_small; auto with zarith. + intros; assert (0 < Zpos p); auto with zarith. + red; simpl; auto. + intros p H2; case H2; auto. + assert (Hp: [[ww_pred (ww_head0 x)]] = [[ww_head0 x]] - 1). + rewrite spec_ww_pred. + rewrite Zmod_small; auto with zarith. + intros H2; split. + generalize (spec_ww_is_even (ww_pred (ww_head0 x))); + case ww_is_even; auto. + rewrite Hp. + rewrite Zminus_mod; auto with zarith. + rewrite H2; repeat rewrite Zmod_small; auto with zarith. + intros H3; rewrite Hp. + case (spec_ww_head0 x); auto; intros Hv3 Hv4. + assert (Hu: forall u, 0 < u -> 2 * 2 ^ (u - 1) = 2 ^u). + intros u Hu. + pattern 2 at 1; rewrite <- Zpower_1_r. + rewrite <- Zpower_exp; auto with zarith. + ring_simplify (1 + (u - 1)); auto with zarith. + split; auto with zarith. + apply Zmult_le_reg_r with 2; auto with zarith. + repeat rewrite (fun x => Zmult_comm x 2). + rewrite wwB_4_2. + rewrite Zmult_assoc; rewrite Hu; auto with zarith. + apply Zle_lt_trans with (2 * 2 ^ ([[ww_head0 x]] - 1) * [[x]]); auto with zarith; + rewrite Hu; auto with zarith. + apply Zmult_le_compat_r; auto with zarith. + apply Zpower_le_monotone; auto with zarith. + Qed. + + Theorem wwB_4_wB_4: wwB / 4 = wB / 4 * wB. + apply sym_equal; apply Zdiv_unique with 0; + auto with zarith. + rewrite Zmult_assoc; rewrite wB_div_4; auto with zarith. + rewrite wwB_wBwB; ring. + Qed. + + Lemma spec_ww_sqrt : forall x, + [[ww_sqrt x]] ^ 2 <= [[x]] < ([[ww_sqrt x]] + 1) ^ 2. + assert (U := wB_pos w_digits). + intro x; unfold ww_sqrt. + generalize (spec_ww_is_zero x); case (ww_is_zero x). + simpl ww_to_Z; simpl Zpower; unfold Zpower_pos; simpl; + auto with zarith. + intros H1. + generalize (spec_ww_compare (ww_head1 x) W0); case ww_compare; + simpl ww_to_Z; autorewrite with rm10. + generalize H1; case x. + intros HH; contradict HH; simpl ww_to_Z; auto with zarith. + intros w0 w1; simpl ww_to_Z; autorewrite with w_rewrite rm10. + intros H2; case (spec_ww_head1 (WW w0 w1)); intros H3 H4 H5. + generalize (H4 H2); clear H4; rewrite H5; clear H5; autorewrite with rm10. + intros (H4, H5). + assert (V: wB/4 <= [|w0|]). + apply beta_lex with 0 [|w1|] wB; auto with zarith; autorewrite with rm10. + rewrite <- wwB_4_wB_4; auto. + generalize (@spec_w_sqrt2 w0 w1 V);auto with zarith. + case (w_sqrt2 w0 w1); intros w2 c. + simpl ww_to_Z; simpl fst. + case c; unfold interp_carry; autorewrite with rm10. + intros w3 (H6, H7); rewrite H6. + assert (V1 := spec_to_Z w3);auto with zarith. + split; auto with zarith. + apply Zle_lt_trans with ([|w2|] ^2 + 2 * [|w2|]); auto with zarith. + match goal with |- ?X < ?Z => + replace Z with (X + 1); auto with zarith + end. + repeat rewrite Zsquare_mult; ring. + intros w3 (H6, H7); rewrite H6. + assert (V1 := spec_to_Z w3);auto with zarith. + split; auto with zarith. + apply Zle_lt_trans with ([|w2|] ^2 + 2 * [|w2|]); auto with zarith. + match goal with |- ?X < ?Z => + replace Z with (X + 1); auto with zarith + end. + repeat rewrite Zsquare_mult; ring. + intros HH; case (spec_to_w_Z (ww_head1 x)); auto with zarith. + intros Hv1. + case (spec_ww_head1 x); intros Hp1 Hp2. + generalize (Hp2 H1); clear Hp2; intros Hp2. + assert (Hv2: [[ww_head1 x]] <= Zpos (xO w_digits)). + case (Zle_or_lt (Zpos (xO w_digits)) [[ww_head1 x]]); auto with zarith; intros HH1. + case Hp2; intros _ HH2; contradict HH2. + apply Zle_not_lt; unfold base. + apply Zle_trans with (2 ^ [[ww_head1 x]]). + apply Zpower_le_monotone; auto with zarith. + pattern (2 ^ [[ww_head1 x]]) at 1; + rewrite <- (Zmult_1_r (2 ^ [[ww_head1 x]])). + apply Zmult_le_compat_l; auto with zarith. + generalize (spec_ww_add_mul_div x W0 (ww_head1 x) Hv2); + case ww_add_mul_div. + simpl ww_to_Z; autorewrite with w_rewrite rm10. + rewrite Zmod_small; auto with zarith. + intros H2; case (Zmult_integral _ _ (sym_equal H2)); clear H2; intros H2. + rewrite H2; unfold Zpower, Zpower_pos; simpl; auto with zarith. + match type of H2 with ?X = ?Y => + absurd (Y < X); try (rewrite H2; auto with zarith; fail) + end. + apply Zpower_gt_0; auto with zarith. + split; auto with zarith. + case Hp2; intros _ tmp; apply Zle_lt_trans with (2 := tmp); + clear tmp. + rewrite Zmult_comm; apply Zmult_le_compat_r; auto with zarith. + assert (Hv0: [[ww_head1 x]] = 2 * ([[ww_head1 x]]/2)). + pattern [[ww_head1 x]] at 1; rewrite (Z_div_mod_eq [[ww_head1 x]] 2); + auto with zarith. + generalize (spec_ww_is_even (ww_head1 x)); rewrite Hp1; + intros tmp; rewrite tmp; rewrite Zplus_0_r; auto. + intros w0 w1; autorewrite with w_rewrite rm10. + rewrite Zmod_small; auto with zarith. + 2: rewrite Zmult_comm; auto with zarith. + intros H2. + assert (V: wB/4 <= [|w0|]). + apply beta_lex with 0 [|w1|] wB; auto with zarith; autorewrite with rm10. + simpl ww_to_Z in H2; rewrite H2. + rewrite <- wwB_4_wB_4; auto with zarith. + rewrite Zmult_comm; auto with zarith. + assert (V1 := spec_to_Z w1);auto with zarith. + generalize (@spec_w_sqrt2 w0 w1 V);auto with zarith. + case (w_sqrt2 w0 w1); intros w2 c. + case (spec_to_Z w2); intros HH1 HH2. + simpl ww_to_Z; simpl fst. + assert (Hv3: [[ww_pred ww_zdigits]] + = Zpos (xO w_digits) - 1). + rewrite spec_ww_pred; rewrite spec_ww_zdigits. + rewrite Zmod_small; auto with zarith. + split; auto with zarith. + apply Zlt_le_trans with (Zpos (xO w_digits)); auto with zarith. + unfold base; apply Zpower2_le_lin; auto with zarith. + assert (Hv4: [[ww_head1 x]]/2 < wB). + apply Zle_lt_trans with (Zpos w_digits). + apply Zmult_le_reg_r with 2; auto with zarith. + repeat rewrite (fun x => Zmult_comm x 2). + rewrite <- Hv0; rewrite <- Zpos_xO; auto. + unfold base; apply Zpower2_lt_lin; auto with zarith. + assert (Hv5: [[(ww_add_mul_div (ww_pred ww_zdigits) W0 (ww_head1 x))]] + = [[ww_head1 x]]/2). + rewrite spec_ww_add_mul_div. + simpl ww_to_Z; autorewrite with rm10. + rewrite Hv3. + ring_simplify (Zpos (xO w_digits) - (Zpos (xO w_digits) - 1)). + rewrite Zpower_1_r. + rewrite Zmod_small; auto with zarith. + split; auto with zarith. + apply Zlt_le_trans with (1 := Hv4); auto with zarith. + unfold base; apply Zpower_le_monotone; auto with zarith. + split; unfold ww_digits; try rewrite Zpos_xO; auto with zarith. + rewrite Hv3; auto with zarith. + assert (Hv6: [|low(ww_add_mul_div (ww_pred ww_zdigits) W0 (ww_head1 x))|] + = [[ww_head1 x]]/2). + rewrite spec_low. + rewrite Hv5; rewrite Zmod_small; auto with zarith. + rewrite spec_w_add_mul_div; auto with zarith. + rewrite spec_w_sub; auto with zarith. + rewrite spec_w_0. + simpl ww_to_Z; autorewrite with rm10. + rewrite Hv6; rewrite spec_w_zdigits. + rewrite (fun x y => Zmod_small (x - y)). + ring_simplify (Zpos w_digits - (Zpos w_digits - [[ww_head1 x]] / 2)). + rewrite Zmod_small. + simpl ww_to_Z in H2; rewrite H2; auto with zarith. + intros (H4, H5); split. + apply Zmult_le_reg_r with (2 ^ [[ww_head1 x]]); auto with zarith. + rewrite H4. + apply Zle_trans with ([|w2|] ^ 2); auto with zarith. + rewrite Zmult_comm. + pattern [[ww_head1 x]] at 1; + rewrite Hv0; auto with zarith. + rewrite (Zmult_comm 2); rewrite Zpower_mult; + auto with zarith. + assert (tmp: forall p q, p ^ 2 * q ^ 2 = (p * q) ^2); + try (intros; repeat rewrite Zsquare_mult; ring); + rewrite tmp; clear tmp. + apply Zpower_le_monotone3; auto with zarith. + split; auto with zarith. + pattern [|w2|] at 2; + rewrite (Z_div_mod_eq [|w2|] (2 ^ ([[ww_head1 x]] / 2))); + auto with zarith. + match goal with |- ?X <= ?X + ?Y => + assert (0 <= Y); auto with zarith + end. + case (Z_mod_lt [|w2|] (2 ^ ([[ww_head1 x]] / 2))); auto with zarith. + case c; unfold interp_carry; autorewrite with rm10; + intros w3; assert (V3 := spec_to_Z w3);auto with zarith. + apply Zmult_lt_reg_r with (2 ^ [[ww_head1 x]]); auto with zarith. + rewrite H4. + apply Zle_lt_trans with ([|w2|] ^ 2 + 2 * [|w2|]); auto with zarith. + apply Zlt_le_trans with (([|w2|] + 1) ^ 2); auto with zarith. + match goal with |- ?X < ?Y => + replace Y with (X + 1); auto with zarith + end. + repeat rewrite (Zsquare_mult); ring. + rewrite Zmult_comm. + pattern [[ww_head1 x]] at 1; rewrite Hv0. + rewrite (Zmult_comm 2); rewrite Zpower_mult; + auto with zarith. + assert (tmp: forall p q, p ^ 2 * q ^ 2 = (p * q) ^2); + try (intros; repeat rewrite Zsquare_mult; ring); + rewrite tmp; clear tmp. + apply Zpower_le_monotone3; auto with zarith. + split; auto with zarith. + pattern [|w2|] at 1; rewrite (Z_div_mod_eq [|w2|] (2 ^ ([[ww_head1 x]]/2))); + auto with zarith. + rewrite <- Zplus_assoc; rewrite Zmult_plus_distr_r. + autorewrite with rm10; apply Zplus_le_compat_l; auto with zarith. + case (Z_mod_lt [|w2|] (2 ^ ([[ww_head1 x]]/2))); auto with zarith. + split; auto with zarith. + apply Zle_lt_trans with ([|w2|]); auto with zarith. + apply Zdiv_le_upper_bound; auto with zarith. + pattern [|w2|] at 1; replace [|w2|] with ([|w2|] * 2 ^0); + auto with zarith. + apply Zmult_le_compat_l; auto with zarith. + apply Zpower_le_monotone; auto with zarith. + rewrite Zpower_0_r; autorewrite with rm10; auto. + split; auto with zarith. + rewrite Hv0 in Hv2; rewrite (Zpos_xO w_digits) in Hv2; auto with zarith. + apply Zle_lt_trans with (Zpos w_digits); auto with zarith. + unfold base; apply Zpower2_lt_lin; auto with zarith. + rewrite spec_w_sub; auto with zarith. + rewrite Hv6; rewrite spec_w_zdigits; auto with zarith. + assert (Hv7: 0 < [[ww_head1 x]]/2); auto with zarith. + rewrite Zmod_small; auto with zarith. + split; auto with zarith. + assert ([[ww_head1 x]]/2 <= Zpos w_digits); auto with zarith. + apply Zmult_le_reg_r with 2; auto with zarith. + repeat rewrite (fun x => Zmult_comm x 2). + rewrite <- Hv0; rewrite <- Zpos_xO; auto with zarith. + apply Zle_lt_trans with (Zpos w_digits); auto with zarith. + unfold base; apply Zpower2_lt_lin; auto with zarith. + Qed. + +End DoubleSqrt. diff --git a/theories/Numbers/Cyclic/DoubleCyclic/DoubleSub.v b/theories/Numbers/Cyclic/DoubleCyclic/DoubleSub.v new file mode 100644 index 00000000..269d62bb --- /dev/null +++ b/theories/Numbers/Cyclic/DoubleCyclic/DoubleSub.v @@ -0,0 +1,357 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* w -> zn2z w. + Variable ww_Bm1 : zn2z w. + Variable w_opp_c : w -> carry w. + Variable w_opp_carry : w -> w. + Variable w_pred_c : w -> carry w. + Variable w_sub_c : w -> w -> carry w. + Variable w_sub_carry_c : w -> w -> carry w. + Variable w_opp : w -> w. + Variable w_pred : w -> w. + Variable w_sub : w -> w -> w. + Variable w_sub_carry : w -> w -> w. + + (* ** Opposites ** *) + Definition ww_opp_c x := + match x with + | W0 => C0 W0 + | WW xh xl => + match w_opp_c xl with + | C0 _ => + match w_opp_c xh with + | C0 h => C0 W0 + | C1 h => C1 (WW h w_0) + end + | C1 l => C1 (WW (w_opp_carry xh) l) + end + end. + + Definition ww_opp x := + match x with + | W0 => W0 + | WW xh xl => + match w_opp_c xl with + | C0 _ => WW (w_opp xh) w_0 + | C1 l => WW (w_opp_carry xh) l + end + end. + + Definition ww_opp_carry x := + match x with + | W0 => ww_Bm1 + | WW xh xl => w_WW (w_opp_carry xh) (w_opp_carry xl) + end. + + Definition ww_pred_c x := + match x with + | W0 => C1 ww_Bm1 + | WW xh xl => + match w_pred_c xl with + | C0 l => C0 (w_WW xh l) + | C1 _ => + match w_pred_c xh with + | C0 h => C0 (WW h w_Bm1) + | C1 _ => C1 ww_Bm1 + end + end + end. + + Definition ww_pred x := + match x with + | W0 => ww_Bm1 + | WW xh xl => + match w_pred_c xl with + | C0 l => w_WW xh l + | C1 l => WW (w_pred xh) w_Bm1 + end + end. + + Definition ww_sub_c x y := + match y, x with + | W0, _ => C0 x + | WW yh yl, W0 => ww_opp_c (WW yh yl) + | WW yh yl, WW xh xl => + match w_sub_c xl yl with + | C0 l => + match w_sub_c xh yh with + | C0 h => C0 (w_WW h l) + | C1 h => C1 (WW h l) + end + | C1 l => + match w_sub_carry_c xh yh with + | C0 h => C0 (WW h l) + | C1 h => C1 (WW h l) + end + end + end. + + Definition ww_sub x y := + match y, x with + | W0, _ => x + | WW yh yl, W0 => ww_opp (WW yh yl) + | WW yh yl, WW xh xl => + match w_sub_c xl yl with + | C0 l => w_WW (w_sub xh yh) l + | C1 l => WW (w_sub_carry xh yh) l + end + end. + + Definition ww_sub_carry_c x y := + match y, x with + | W0, W0 => C1 ww_Bm1 + | W0, WW xh xl => ww_pred_c (WW xh xl) + | WW yh yl, W0 => C1 (ww_opp_carry (WW yh yl)) + | WW yh yl, WW xh xl => + match w_sub_carry_c xl yl with + | C0 l => + match w_sub_c xh yh with + | C0 h => C0 (w_WW h l) + | C1 h => C1 (WW h l) + end + | C1 l => + match w_sub_carry_c xh yh with + | C0 h => C0 (w_WW h l) + | C1 h => C1 (w_WW h l) + end + end + end. + + Definition ww_sub_carry x y := + match y, x with + | W0, W0 => ww_Bm1 + | W0, WW xh xl => ww_pred (WW xh xl) + | WW yh yl, W0 => ww_opp_carry (WW yh yl) + | WW yh yl, WW xh xl => + match w_sub_carry_c xl yl with + | C0 l => w_WW (w_sub xh yh) l + | C1 l => w_WW (w_sub_carry xh yh) l + end + end. + + (*Section DoubleProof.*) + Variable w_digits : positive. + Variable w_to_Z : w -> Z. + + + Notation wB := (base w_digits). + Notation wwB := (base (ww_digits w_digits)). + Notation "[| x |]" := (w_to_Z x) (at level 0, x at level 99). + Notation "[+| c |]" := + (interp_carry 1 wB w_to_Z c) (at level 0, x at level 99). + Notation "[-| c |]" := + (interp_carry (-1) wB w_to_Z c) (at level 0, x at level 99). + + Notation "[[ x ]]" := (ww_to_Z w_digits w_to_Z x)(at level 0, x at level 99). + Notation "[+[ c ]]" := + (interp_carry 1 wwB (ww_to_Z w_digits w_to_Z) c) + (at level 0, x at level 99). + Notation "[-[ c ]]" := + (interp_carry (-1) wwB (ww_to_Z w_digits w_to_Z) c) + (at level 0, x at level 99). + + Variable spec_w_0 : [|w_0|] = 0. + Variable spec_w_Bm1 : [|w_Bm1|] = wB - 1. + Variable spec_ww_Bm1 : [[ww_Bm1]] = wwB - 1. + Variable spec_to_Z : forall x, 0 <= [|x|] < wB. + Variable spec_w_WW : forall h l, [[w_WW h l]] = [|h|] * wB + [|l|]. + + Variable spec_opp_c : forall x, [-|w_opp_c x|] = -[|x|]. + Variable spec_opp : forall x, [|w_opp x|] = (-[|x|]) mod wB. + Variable spec_opp_carry : forall x, [|w_opp_carry x|] = wB - [|x|] - 1. + + Variable spec_pred_c : forall x, [-|w_pred_c x|] = [|x|] - 1. + Variable spec_sub_c : forall x y, [-|w_sub_c x y|] = [|x|] - [|y|]. + Variable spec_sub_carry_c : + forall x y, [-|w_sub_carry_c x y|] = [|x|] - [|y|] - 1. + + Variable spec_pred : forall x, [|w_pred x|] = ([|x|] - 1) mod wB. + Variable spec_sub : forall x y, [|w_sub x y|] = ([|x|] - [|y|]) mod wB. + Variable spec_sub_carry : + forall x y, [|w_sub_carry x y|] = ([|x|] - [|y|] - 1) mod wB. + + + Lemma spec_ww_opp_c : forall x, [-[ww_opp_c x]] = -[[x]]. + Proof. + destruct x as [ |xh xl];simpl. reflexivity. + rewrite Zopp_plus_distr;generalize (spec_opp_c xl);destruct (w_opp_c xl) + as [l|l];intros H;unfold interp_carry in H;rewrite <- H; + rewrite Zopp_mult_distr_l. + assert ([|l|] = 0). + assert (H1:= spec_to_Z l);assert (H2 := spec_to_Z xl);omega. + rewrite H0;generalize (spec_opp_c xh);destruct (w_opp_c xh) + as [h|h];intros H1;unfold interp_carry in *;rewrite <- H1. + assert ([|h|] = 0). + assert (H3:= spec_to_Z h);assert (H2 := spec_to_Z xh);omega. + rewrite H2;reflexivity. + simpl ww_to_Z;rewrite wwB_wBwB;rewrite spec_w_0;ring. + unfold interp_carry;simpl ww_to_Z;rewrite wwB_wBwB;rewrite spec_opp_carry; + ring. + Qed. + + Lemma spec_ww_opp : forall x, [[ww_opp x]] = (-[[x]]) mod wwB. + Proof. + destruct x as [ |xh xl];simpl. reflexivity. + rewrite Zopp_plus_distr;rewrite Zopp_mult_distr_l. + generalize (spec_opp_c xl);destruct (w_opp_c xl) + as [l|l];intros H;unfold interp_carry in H;rewrite <- H;simpl ww_to_Z. + rewrite spec_w_0;rewrite Zplus_0_r;rewrite wwB_wBwB. + assert ([|l|] = 0). + assert (H1:= spec_to_Z l);assert (H2 := spec_to_Z xl);omega. + rewrite H0;rewrite Zplus_0_r; rewrite Zpower_2; + rewrite Zmult_mod_distr_r;try apply lt_0_wB. + rewrite spec_opp;trivial. + apply Zmod_unique with (q:= -1). + exact (spec_ww_to_Z w_digits w_to_Z spec_to_Z (WW (w_opp_carry xh) l)). + rewrite spec_opp_carry;rewrite wwB_wBwB;ring. + Qed. + + Lemma spec_ww_opp_carry : forall x, [[ww_opp_carry x]] = wwB - [[x]] - 1. + Proof. + destruct x as [ |xh xl];simpl. rewrite spec_ww_Bm1;ring. + rewrite spec_w_WW;simpl;repeat rewrite spec_opp_carry;rewrite wwB_wBwB;ring. + Qed. + + Lemma spec_ww_pred_c : forall x, [-[ww_pred_c x]] = [[x]] - 1. + Proof. + destruct x as [ |xh xl];unfold ww_pred_c. + unfold interp_carry;rewrite spec_ww_Bm1;simpl ww_to_Z;ring. + simpl ww_to_Z;replace (([|xh|]*wB+[|xl|])-1) with ([|xh|]*wB+([|xl|]-1)). + 2:ring. generalize (spec_pred_c xl);destruct (w_pred_c xl) as [l|l]; + intros H;unfold interp_carry in H;rewrite <- H. simpl;apply spec_w_WW. + rewrite Zplus_assoc;rewrite <- Zmult_plus_distr_l. + assert ([|l|] = wB - 1). + assert (H1:= spec_to_Z l);assert (H2 := spec_to_Z xl);omega. + rewrite H0;change ([|xh|] + -1) with ([|xh|] - 1). + generalize (spec_pred_c xh);destruct (w_pred_c xh) as [h|h]; + intros H1;unfold interp_carry in H1;rewrite <- H1. + simpl;rewrite spec_w_Bm1;ring. + assert ([|h|] = wB - 1). + assert (H3:= spec_to_Z h);assert (H2 := spec_to_Z xh);omega. + rewrite H2;unfold interp_carry;rewrite spec_ww_Bm1;rewrite wwB_wBwB;ring. + Qed. + + Lemma spec_ww_sub_c : forall x y, [-[ww_sub_c x y]] = [[x]] - [[y]]. + Proof. + destruct y as [ |yh yl];simpl. ring. + destruct x as [ |xh xl];simpl. exact (spec_ww_opp_c (WW yh yl)). + replace ([|xh|] * wB + [|xl|] - ([|yh|] * wB + [|yl|])) + with (([|xh|]-[|yh|])*wB + ([|xl|]-[|yl|])). 2:ring. + generalize (spec_sub_c xl yl);destruct (w_sub_c xl yl) as [l|l];intros H; + unfold interp_carry in H;rewrite <- H. + generalize (spec_sub_c xh yh);destruct (w_sub_c xh yh) as [h|h];intros H1; + unfold interp_carry in H1;rewrite <- H1;unfold interp_carry; + try rewrite spec_w_WW;simpl ww_to_Z;try rewrite wwB_wBwB;ring. + rewrite Zplus_assoc;rewrite <- Zmult_plus_distr_l. + change ([|xh|] - [|yh|] + -1) with ([|xh|] - [|yh|] - 1). + generalize (spec_sub_carry_c xh yh);destruct (w_sub_carry_c xh yh) as [h|h]; + intros H1;unfold interp_carry in *;rewrite <- H1;simpl ww_to_Z; + try rewrite wwB_wBwB;ring. + Qed. + + Lemma spec_ww_sub_carry_c : + forall x y, [-[ww_sub_carry_c x y]] = [[x]] - [[y]] - 1. + Proof. + destruct y as [ |yh yl];simpl. + unfold Zminus;simpl;rewrite Zplus_0_r;exact (spec_ww_pred_c x). + destruct x as [ |xh xl]. + unfold interp_carry;rewrite spec_w_WW;simpl ww_to_Z;rewrite wwB_wBwB; + repeat rewrite spec_opp_carry;ring. + simpl ww_to_Z. + replace ([|xh|] * wB + [|xl|] - ([|yh|] * wB + [|yl|]) - 1) + with (([|xh|]-[|yh|])*wB + ([|xl|]-[|yl|]-1)). 2:ring. + generalize (spec_sub_carry_c xl yl);destruct (w_sub_carry_c xl yl) + as [l|l];intros H;unfold interp_carry in H;rewrite <- H. + generalize (spec_sub_c xh yh);destruct (w_sub_c xh yh) as [h|h];intros H1; + unfold interp_carry in H1;rewrite <- H1;unfold interp_carry; + try rewrite spec_w_WW;simpl ww_to_Z;try rewrite wwB_wBwB;ring. + rewrite Zplus_assoc;rewrite <- Zmult_plus_distr_l. + change ([|xh|] - [|yh|] + -1) with ([|xh|] - [|yh|] - 1). + generalize (spec_sub_carry_c xh yh);destruct (w_sub_carry_c xh yh) as [h|h]; + intros H1;unfold interp_carry in *;rewrite <- H1;try rewrite spec_w_WW; + simpl ww_to_Z; try rewrite wwB_wBwB;ring. + Qed. + + Lemma spec_ww_pred : forall x, [[ww_pred x]] = ([[x]] - 1) mod wwB. + Proof. + destruct x as [ |xh xl];simpl. + apply Zmod_unique with (-1). apply spec_ww_to_Z;trivial. + rewrite spec_ww_Bm1;ring. + replace ([|xh|]*wB + [|xl|] - 1) with ([|xh|]*wB + ([|xl|] - 1)). 2:ring. + generalize (spec_pred_c xl);destruct (w_pred_c xl) as [l|l];intro H; + unfold interp_carry in H;rewrite <- H;simpl ww_to_Z. + rewrite Zmod_small. apply spec_w_WW. + exact (spec_ww_to_Z w_digits w_to_Z spec_to_Z (WW xh l)). + rewrite Zplus_assoc;rewrite <- Zmult_plus_distr_l. + change ([|xh|] + -1) with ([|xh|] - 1). + assert ([|l|] = wB - 1). + assert (H1:= spec_to_Z l);assert (H2:= spec_to_Z xl);omega. + rewrite (mod_wwB w_digits w_to_Z);trivial. + rewrite spec_pred;rewrite spec_w_Bm1;rewrite <- H0;trivial. + Qed. + + Lemma spec_ww_sub : forall x y, [[ww_sub x y]] = ([[x]] - [[y]]) mod wwB. + Proof. + destruct y as [ |yh yl];simpl. + ring_simplify ([[x]] - 0);rewrite Zmod_small;trivial. apply spec_ww_to_Z;trivial. + destruct x as [ |xh xl];simpl. exact (spec_ww_opp (WW yh yl)). + replace ([|xh|] * wB + [|xl|] - ([|yh|] * wB + [|yl|])) + with (([|xh|] - [|yh|]) * wB + ([|xl|] - [|yl|])). 2:ring. + generalize (spec_sub_c xl yl);destruct (w_sub_c xl yl)as[l|l];intros H; + unfold interp_carry in H;rewrite <- H. + rewrite spec_w_WW;rewrite (mod_wwB w_digits w_to_Z spec_to_Z). + rewrite spec_sub;trivial. + simpl ww_to_Z;rewrite Zplus_assoc;rewrite <- Zmult_plus_distr_l. + rewrite (mod_wwB w_digits w_to_Z spec_to_Z);rewrite spec_sub_carry;trivial. + Qed. + + Lemma spec_ww_sub_carry : + forall x y, [[ww_sub_carry x y]] = ([[x]] - [[y]] - 1) mod wwB. + Proof. + destruct y as [ |yh yl];simpl. + ring_simplify ([[x]] - 0);exact (spec_ww_pred x). + destruct x as [ |xh xl];simpl. + apply Zmod_unique with (-1). + apply spec_ww_to_Z;trivial. + fold (ww_opp_carry (WW yh yl)). + rewrite (spec_ww_opp_carry (WW yh yl));simpl ww_to_Z;ring. + replace ([|xh|] * wB + [|xl|] - ([|yh|] * wB + [|yl|]) - 1) + with (([|xh|] - [|yh|]) * wB + ([|xl|] - [|yl|] - 1)). 2:ring. + generalize (spec_sub_carry_c xl yl);destruct (w_sub_carry_c xl yl)as[l|l]; + intros H;unfold interp_carry in H;rewrite <- H;rewrite spec_w_WW. + rewrite (mod_wwB w_digits w_to_Z spec_to_Z);rewrite spec_sub;trivial. + rewrite Zplus_assoc;rewrite <- Zmult_plus_distr_l. + rewrite (mod_wwB w_digits w_to_Z spec_to_Z);rewrite spec_sub_carry;trivial. + Qed. + +(* End DoubleProof. *) + +End DoubleSub. + + + + + diff --git a/theories/Numbers/Cyclic/DoubleCyclic/DoubleType.v b/theories/Numbers/Cyclic/DoubleCyclic/DoubleType.v new file mode 100644 index 00000000..28d40094 --- /dev/null +++ b/theories/Numbers/Cyclic/DoubleCyclic/DoubleType.v @@ -0,0 +1,71 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* carry + | C1 : A -> carry. + + Definition interp_carry (sign:Z)(B:Z)(interp:A -> Z) c := + match c with + | C0 x => interp x + | C1 x => sign*B + interp x + end. + +End Carry. + +Section Zn2Z. + + Variable znz : Type. + + (** From a type [znz] representing a cyclic structure Z/nZ, + we produce a representation of Z/2nZ by pairs of elements of [znz] + (plus a special case for zero). High half of the new number comes + first. + *) + + Inductive zn2z := + | W0 : zn2z + | WW : znz -> znz -> zn2z. + + Definition zn2z_to_Z (wB:Z) (w_to_Z:znz->Z) (x:zn2z) := + match x with + | W0 => 0 + | WW xh xl => w_to_Z xh * wB + w_to_Z xl + end. + +End Zn2Z. + +Implicit Arguments W0 [znz]. + +(** From a cyclic representation [w], we iterate the [zn2z] construct + [n] times, gaining the type of binary trees of depth at most [n], + whose leafs are either W0 (if depth < n) or elements of w + (if depth = n). +*) + +Fixpoint word (w:Type) (n:nat) : Type := + match n with + | O => w + | S n => zn2z (word w n) + end. + diff --git a/theories/Numbers/Cyclic/Int31/Cyclic31.v b/theories/Numbers/Cyclic/Int31/Cyclic31.v new file mode 100644 index 00000000..4d655eac --- /dev/null +++ b/theories/Numbers/Cyclic/Int31/Cyclic31.v @@ -0,0 +1,2516 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* x=0. + Proof. + destruct x; simpl; intros. + repeat + match goal with H:(if ?d then _ else _) = true |- _ => + destruct d; try discriminate + end. + reflexivity. + Qed. + + Lemma iszero_not_eq0 : forall x, iszero x = false -> x<>0. + Proof. + intros x H Eq; rewrite Eq in H; simpl in *; discriminate. + Qed. + + Lemma sneakl_shiftr : forall x, + x = sneakl (firstr x) (shiftr x). + Proof. + destruct x; simpl; auto. + Qed. + + Lemma sneakr_shiftl : forall x, + x = sneakr (firstl x) (shiftl x). + Proof. + destruct x; simpl; auto. + Qed. + + Lemma twice_zero : forall x, + twice x = 0 <-> twice_plus_one x = 1. + Proof. + destruct x; simpl in *; split; + intro H; injection H; intros; subst; auto. + Qed. + + Lemma twice_or_twice_plus_one : forall x, + x = twice (shiftr x) \/ x = twice_plus_one (shiftr x). + Proof. + intros; case_eq (firstr x); intros. + destruct x; simpl in *; rewrite H; auto. + destruct x; simpl in *; rewrite H; auto. + Qed. + + + + (** * Iterated shift to the right *) + + Definition nshiftr n x := iter_nat n _ shiftr x. + + Lemma nshiftr_S : + forall n x, nshiftr (S n) x = shiftr (nshiftr n x). + Proof. + reflexivity. + Qed. + + Lemma nshiftr_S_tail : + forall n x, nshiftr (S n) x = nshiftr n (shiftr x). + Proof. + induction n; simpl; auto. + intros; rewrite nshiftr_S, IHn, nshiftr_S; auto. + Qed. + + Lemma nshiftr_n_0 : forall n, nshiftr n 0 = 0. + Proof. + induction n; simpl; auto. + rewrite nshiftr_S, IHn; auto. + Qed. + + Lemma nshiftr_size : forall x, nshiftr size x = 0. + Proof. + destruct x; simpl; auto. + Qed. + + Lemma nshiftr_above_size : forall k x, size<=k -> + nshiftr k x = 0. + Proof. + intros. + replace k with ((k-size)+size)%nat by omega. + induction (k-size)%nat; auto. + rewrite nshiftr_size; auto. + simpl; rewrite nshiftr_S, IHn; auto. + Qed. + + (** * Iterated shift to the left *) + + Definition nshiftl n x := iter_nat n _ shiftl x. + + Lemma nshiftl_S : + forall n x, nshiftl (S n) x = shiftl (nshiftl n x). + Proof. + reflexivity. + Qed. + + Lemma nshiftl_S_tail : + forall n x, nshiftl (S n) x = nshiftl n (shiftl x). + Proof. + induction n; simpl; auto. + intros; rewrite nshiftl_S, IHn, nshiftl_S; auto. + Qed. + + Lemma nshiftl_n_0 : forall n, nshiftl n 0 = 0. + Proof. + induction n; simpl; auto. + rewrite nshiftl_S, IHn; auto. + Qed. + + Lemma nshiftl_size : forall x, nshiftl size x = 0. + Proof. + destruct x; simpl; auto. + Qed. + + Lemma nshiftl_above_size : forall k x, size<=k -> + nshiftl k x = 0. + Proof. + intros. + replace k with ((k-size)+size)%nat by omega. + induction (k-size)%nat; auto. + rewrite nshiftl_size; auto. + simpl; rewrite nshiftl_S, IHn; auto. + Qed. + + Lemma firstr_firstl : + forall x, firstr x = firstl (nshiftl (pred size) x). + Proof. + destruct x; simpl; auto. + Qed. + + Lemma firstl_firstr : + forall x, firstl x = firstr (nshiftr (pred size) x). + Proof. + destruct x; simpl; auto. + Qed. + + (** More advanced results about [nshiftr] *) + + Lemma nshiftr_predsize_0_firstl : forall x, + nshiftr (pred size) x = 0 -> firstl x = D0. + Proof. + destruct x; compute; intros H; injection H; intros; subst; auto. + Qed. + + Lemma nshiftr_0_propagates : forall n p x, n <= p -> + nshiftr n x = 0 -> nshiftr p x = 0. + Proof. + intros. + replace p with ((p-n)+n)%nat by omega. + induction (p-n)%nat. + simpl; auto. + simpl; rewrite nshiftr_S; rewrite IHn0; auto. + Qed. + + Lemma nshiftr_0_firstl : forall n x, n < size -> + nshiftr n x = 0 -> firstl x = D0. + Proof. + intros. + apply nshiftr_predsize_0_firstl. + apply nshiftr_0_propagates with n; auto; omega. + Qed. + + (** * Some induction principles over [int31] *) + + (** Not used for the moment. Are they really useful ? *) + + Lemma int31_ind_sneakl : forall P : int31->Prop, + P 0 -> + (forall x d, P x -> P (sneakl d x)) -> + forall x, P x. + Proof. + intros. + assert (forall n, n<=size -> P (nshiftr (size - n) x)). + induction n; intros. + rewrite nshiftr_size; auto. + rewrite sneakl_shiftr. + apply H0. + change (P (nshiftr (S (size - S n)) x)). + replace (S (size - S n))%nat with (size - n)%nat by omega. + apply IHn; omega. + change x with (nshiftr (size-size) x); auto. + Qed. + + Lemma int31_ind_twice : forall P : int31->Prop, + P 0 -> + (forall x, P x -> P (twice x)) -> + (forall x, P x -> P (twice_plus_one x)) -> + forall x, P x. + Proof. + induction x using int31_ind_sneakl; auto. + destruct d; auto. + Qed. + + + (** * Some generic results about [recr] *) + + Section Recr. + + (** [recr] satisfies the fixpoint equation used for its definition. *) + + Variable (A:Type)(case0:A)(caserec:digits->int31->A->A). + + Lemma recr_aux_eqn : forall n x, iszero x = false -> + recr_aux (S n) A case0 caserec x = + caserec (firstr x) (shiftr x) (recr_aux n A case0 caserec (shiftr x)). + Proof. + intros; simpl; rewrite H; auto. + Qed. + + Lemma recr_aux_converges : + forall n p x, n <= size -> n <= p -> + recr_aux n A case0 caserec (nshiftr (size - n) x) = + recr_aux p A case0 caserec (nshiftr (size - n) x). + Proof. + induction n. + simpl; intros. + rewrite nshiftr_size; destruct p; simpl; auto. + intros. + destruct p. + inversion H0. + unfold recr_aux; fold recr_aux. + destruct (iszero (nshiftr (size - S n) x)); auto. + f_equal. + change (shiftr (nshiftr (size - S n) x)) with (nshiftr (S (size - S n)) x). + replace (S (size - S n))%nat with (size - n)%nat by omega. + apply IHn; auto with arith. + Qed. + + Lemma recr_eqn : forall x, iszero x = false -> + recr A case0 caserec x = + caserec (firstr x) (shiftr x) (recr A case0 caserec (shiftr x)). + Proof. + intros. + unfold recr. + change x with (nshiftr (size - size) x). + rewrite (recr_aux_converges size (S size)); auto with arith. + rewrite recr_aux_eqn; auto. + Qed. + + (** [recr] is usually equivalent to a variant [recrbis] + written without [iszero] check. *) + + Fixpoint recrbis_aux (n:nat)(A:Type)(case0:A)(caserec:digits->int31->A->A) + (i:int31) : A := + match n with + | O => case0 + | S next => + let si := shiftr i in + caserec (firstr i) si (recrbis_aux next A case0 caserec si) + end. + + Definition recrbis := recrbis_aux size. + + Hypothesis case0_caserec : caserec D0 0 case0 = case0. + + Lemma recrbis_aux_equiv : forall n x, + recrbis_aux n A case0 caserec x = recr_aux n A case0 caserec x. + Proof. + induction n; simpl; auto; intros. + case_eq (iszero x); intros; [ | f_equal; auto ]. + rewrite (iszero_eq0 _ H); simpl; auto. + replace (recrbis_aux n A case0 caserec 0) with case0; auto. + clear H IHn; induction n; simpl; congruence. + Qed. + + Lemma recrbis_equiv : forall x, + recrbis A case0 caserec x = recr A case0 caserec x. + Proof. + intros; apply recrbis_aux_equiv; auto. + Qed. + + End Recr. + + (** * Incrementation *) + + Section Incr. + + (** Variant of [incr] via [recrbis] *) + + Let Incr (b : digits) (si rec : int31) := + match b with + | D0 => sneakl D1 si + | D1 => sneakl D0 rec + end. + + Definition incrbis_aux n x := recrbis_aux n _ In Incr x. + + Lemma incrbis_aux_equiv : forall x, incrbis_aux size x = incr x. + Proof. + unfold incr, recr, incrbis_aux; fold Incr; intros. + apply recrbis_aux_equiv; auto. + Qed. + + (** Recursive equations satisfied by [incr] *) + + Lemma incr_eqn1 : + forall x, firstr x = D0 -> incr x = twice_plus_one (shiftr x). + Proof. + intros. + case_eq (iszero x); intros. + rewrite (iszero_eq0 _ H0); simpl; auto. + unfold incr; rewrite recr_eqn; fold incr; auto. + rewrite H; auto. + Qed. + + Lemma incr_eqn2 : + forall x, firstr x = D1 -> incr x = twice (incr (shiftr x)). + Proof. + intros. + case_eq (iszero x); intros. + rewrite (iszero_eq0 _ H0) in H; simpl in H; discriminate. + unfold incr; rewrite recr_eqn; fold incr; auto. + rewrite H; auto. + Qed. + + Lemma incr_twice : forall x, incr (twice x) = twice_plus_one x. + Proof. + intros. + rewrite incr_eqn1; destruct x; simpl; auto. + Qed. + + Lemma incr_twice_plus_one_firstl : + forall x, firstl x = D0 -> incr (twice_plus_one x) = twice (incr x). + Proof. + intros. + rewrite incr_eqn2; [ | destruct x; simpl; auto ]. + f_equal; f_equal. + destruct x; simpl in *; rewrite H; auto. + Qed. + + (** The previous result is actually true even without the + constraint on [firstl], but this is harder to prove + (see later). *) + + End Incr. + + (** * Conversion to [Z] : the [phi] function *) + + Section Phi. + + (** Variant of [phi] via [recrbis] *) + + Let Phi := fun b (_:int31) => + match b with D0 => Zdouble | D1 => Zdouble_plus_one end. + + Definition phibis_aux n x := recrbis_aux n _ Z0 Phi x. + + Lemma phibis_aux_equiv : forall x, phibis_aux size x = phi x. + Proof. + unfold phi, recr, phibis_aux; fold Phi; intros. + apply recrbis_aux_equiv; auto. + Qed. + + (** Recursive equations satisfied by [phi] *) + + Lemma phi_eqn1 : forall x, firstr x = D0 -> + phi x = Zdouble (phi (shiftr x)). + Proof. + intros. + case_eq (iszero x); intros. + rewrite (iszero_eq0 _ H0); simpl; auto. + intros; unfold phi; rewrite recr_eqn; fold phi; auto. + rewrite H; auto. + Qed. + + Lemma phi_eqn2 : forall x, firstr x = D1 -> + phi x = Zdouble_plus_one (phi (shiftr x)). + Proof. + intros. + case_eq (iszero x); intros. + rewrite (iszero_eq0 _ H0) in H; simpl in H; discriminate. + intros; unfold phi; rewrite recr_eqn; fold phi; auto. + rewrite H; auto. + Qed. + + Lemma phi_twice_firstl : forall x, firstl x = D0 -> + phi (twice x) = Zdouble (phi x). + Proof. + intros. + rewrite phi_eqn1; auto; [ | destruct x; auto ]. + f_equal; f_equal. + destruct x; simpl in *; rewrite H; auto. + Qed. + + Lemma phi_twice_plus_one_firstl : forall x, firstl x = D0 -> + phi (twice_plus_one x) = Zdouble_plus_one (phi x). + Proof. + intros. + rewrite phi_eqn2; auto; [ | destruct x; auto ]. + f_equal; f_equal. + destruct x; simpl in *; rewrite H; auto. + Qed. + + End Phi. + + (** [phi x] is positive and lower than [2^31] *) + + Lemma phibis_aux_pos : forall n x, (0 <= phibis_aux n x)%Z. + Proof. + induction n. + simpl; unfold phibis_aux; simpl; auto with zarith. + intros. + unfold phibis_aux, recrbis_aux; fold recrbis_aux; + fold (phibis_aux n (shiftr x)). + destruct (firstr x). + specialize IHn with (shiftr x); rewrite Zdouble_mult; omega. + specialize IHn with (shiftr x); rewrite Zdouble_plus_one_mult; omega. + Qed. + + Lemma phibis_aux_bounded : + forall n x, n <= size -> + (phibis_aux n (nshiftr (size-n) x) < 2 ^ (Z_of_nat n))%Z. + Proof. + induction n. + simpl; unfold phibis_aux; simpl; auto with zarith. + intros. + unfold phibis_aux, recrbis_aux; fold recrbis_aux; + fold (phibis_aux n (shiftr (nshiftr (size - S n) x))). + assert (shiftr (nshiftr (size - S n) x) = nshiftr (size-n) x). + replace (size - n)%nat with (S (size - (S n))) by omega. + simpl; auto. + rewrite H0. + assert (H1 : n <= size) by omega. + specialize (IHn x H1). + set (y:=phibis_aux n (nshiftr (size - n) x)) in *. + rewrite inj_S, Zpower_Zsucc; auto with zarith. + case_eq (firstr (nshiftr (size - S n) x)); intros. + rewrite Zdouble_mult; auto with zarith. + rewrite Zdouble_plus_one_mult; auto with zarith. + Qed. + + Lemma phi_bounded : forall x, (0 <= phi x < 2 ^ (Z_of_nat size))%Z. + Proof. + intros. + rewrite <- phibis_aux_equiv. + split. + apply phibis_aux_pos. + change x with (nshiftr (size-size) x). + apply phibis_aux_bounded; auto. + Qed. + + Lemma phibis_aux_lowerbound : + forall n x, firstr (nshiftr n x) = D1 -> + (2 ^ Z_of_nat n <= phibis_aux (S n) x)%Z. + Proof. + induction n. + intros. + unfold nshiftr in H; simpl in *. + unfold phibis_aux, recrbis_aux. + rewrite H, Zdouble_plus_one_mult; omega. + + intros. + remember (S n) as m. + unfold phibis_aux, recrbis_aux; fold recrbis_aux; + fold (phibis_aux m (shiftr x)). + subst m. + rewrite inj_S, Zpower_Zsucc; auto with zarith. + assert (2^(Z_of_nat n) <= phibis_aux (S n) (shiftr x))%Z. + apply IHn. + rewrite <- nshiftr_S_tail; auto. + destruct (firstr x). + change (Zdouble (phibis_aux (S n) (shiftr x))) with + (2*(phibis_aux (S n) (shiftr x)))%Z. + omega. + rewrite Zdouble_plus_one_mult; omega. + Qed. + + Lemma phi_lowerbound : + forall x, firstl x = D1 -> (2^(Z_of_nat (pred size)) <= phi x)%Z. + Proof. + intros. + generalize (phibis_aux_lowerbound (pred size) x). + rewrite <- firstl_firstr. + change (S (pred size)) with size; auto. + rewrite phibis_aux_equiv; auto. + Qed. + + (** * Equivalence modulo [2^n] *) + + Section EqShiftL. + + (** After killing [n] bits at the left, are the numbers equal ?*) + + Definition EqShiftL n x y := + nshiftl n x = nshiftl n y. + + Lemma EqShiftL_zero : forall x y, EqShiftL O x y <-> x = y. + Proof. + unfold EqShiftL; intros; unfold nshiftl; simpl; split; auto. + Qed. + + Lemma EqShiftL_size : forall k x y, size<=k -> EqShiftL k x y. + Proof. + red; intros; rewrite 2 nshiftl_above_size; auto. + Qed. + + Lemma EqShiftL_le : forall k k' x y, k <= k' -> + EqShiftL k x y -> EqShiftL k' x y. + Proof. + unfold EqShiftL; intros. + replace k' with ((k'-k)+k)%nat by omega. + remember (k'-k)%nat as n. + clear Heqn H k'. + induction n; simpl; auto. + rewrite 2 nshiftl_S; f_equal; auto. + Qed. + + Lemma EqShiftL_firstr : forall k x y, k < size -> + EqShiftL k x y -> firstr x = firstr y. + Proof. + intros. + rewrite 2 firstr_firstl. + f_equal. + apply EqShiftL_le with k; auto. + unfold size. + auto with arith. + Qed. + + Lemma EqShiftL_twice : forall k x y, + EqShiftL k (twice x) (twice y) <-> EqShiftL (S k) x y. + Proof. + intros; unfold EqShiftL. + rewrite 2 nshiftl_S_tail; split; auto. + Qed. + + (** * From int31 to list of digits. *) + + (** Lower (=rightmost) bits comes first. *) + + Definition i2l := recrbis _ nil (fun d _ rec => d::rec). + + Lemma i2l_length : forall x, length (i2l x) = size. + Proof. + intros; reflexivity. + Qed. + + Fixpoint lshiftl l x := + match l with + | nil => x + | d::l => sneakl d (lshiftl l x) + end. + + Definition l2i l := lshiftl l On. + + Lemma l2i_i2l : forall x, l2i (i2l x) = x. + Proof. + destruct x; compute; auto. + Qed. + + Lemma i2l_sneakr : forall x d, + i2l (sneakr d x) = tail (i2l x) ++ d::nil. + Proof. + destruct x; compute; auto. + Qed. + + Lemma i2l_sneakl : forall x d, + i2l (sneakl d x) = d :: removelast (i2l x). + Proof. + destruct x; compute; auto. + Qed. + + Lemma i2l_l2i : forall l, length l = size -> + i2l (l2i l) = l. + Proof. + repeat (destruct l as [ |? l]; [intros; discriminate | ]). + destruct l; [ | intros; discriminate]. + intros _; compute; auto. + Qed. + + Fixpoint cstlist (A:Type)(a:A) n := + match n with + | O => nil + | S n => a::cstlist _ a n + end. + + Lemma i2l_nshiftl : forall n x, n<=size -> + i2l (nshiftl n x) = cstlist _ D0 n ++ firstn (size-n) (i2l x). + Proof. + induction n. + intros. + assert (firstn (size-0) (i2l x) = i2l x). + rewrite <- minus_n_O, <- (i2l_length x). + induction (i2l x); simpl; f_equal; auto. + rewrite H0; clear H0. + reflexivity. + + intros. + rewrite nshiftl_S. + unfold shiftl; rewrite i2l_sneakl. + simpl cstlist. + rewrite <- app_comm_cons; f_equal. + rewrite IHn; [ | omega]. + rewrite removelast_app. + f_equal. + replace (size-n)%nat with (S (size - S n))%nat by omega. + rewrite removelast_firstn; auto. + rewrite i2l_length; omega. + generalize (firstn_length (size-n) (i2l x)). + rewrite i2l_length. + intros H0 H1; rewrite H1 in H0. + rewrite min_l in H0 by omega. + simpl length in H0. + omega. + Qed. + + (** [i2l] can be used to define a relation equivalent to [EqShiftL] *) + + Lemma EqShiftL_i2l : forall k x y, + EqShiftL k x y <-> firstn (size-k) (i2l x) = firstn (size-k) (i2l y). + Proof. + intros. + destruct (le_lt_dec size k). + split; intros. + replace (size-k)%nat with O by omega. + unfold firstn; auto. + apply EqShiftL_size; auto. + + unfold EqShiftL. + assert (k <= size) by omega. + split; intros. + assert (i2l (nshiftl k x) = i2l (nshiftl k y)) by (f_equal; auto). + rewrite 2 i2l_nshiftl in H1; auto. + eapply app_inv_head; eauto. + assert (i2l (nshiftl k x) = i2l (nshiftl k y)). + rewrite 2 i2l_nshiftl; auto. + f_equal; auto. + rewrite <- (l2i_i2l (nshiftl k x)), <- (l2i_i2l (nshiftl k y)). + f_equal; auto. + Qed. + + (** This equivalence allows to prove easily the following delicate + result *) + + Lemma EqShiftL_twice_plus_one : forall k x y, + EqShiftL k (twice_plus_one x) (twice_plus_one y) <-> EqShiftL (S k) x y. + Proof. + intros. + destruct (le_lt_dec size k). + split; intros; apply EqShiftL_size; auto. + + rewrite 2 EqShiftL_i2l. + unfold twice_plus_one. + rewrite 2 i2l_sneakl. + replace (size-k)%nat with (S (size - S k))%nat by omega. + remember (size - S k)%nat as n. + remember (i2l x) as lx. + remember (i2l y) as ly. + simpl. + rewrite 2 firstn_removelast. + split; intros. + injection H; auto. + f_equal; auto. + subst ly n; rewrite i2l_length; omega. + subst lx n; rewrite i2l_length; omega. + Qed. + + Lemma EqShiftL_shiftr : forall k x y, EqShiftL k x y -> + EqShiftL (S k) (shiftr x) (shiftr y). + Proof. + intros. + destruct (le_lt_dec size (S k)). + apply EqShiftL_size; auto. + case_eq (firstr x); intros. + rewrite <- EqShiftL_twice. + unfold twice; rewrite <- H0. + rewrite <- sneakl_shiftr. + rewrite (EqShiftL_firstr k x y); auto. + rewrite <- sneakl_shiftr; auto. + omega. + rewrite <- EqShiftL_twice_plus_one. + unfold twice_plus_one; rewrite <- H0. + rewrite <- sneakl_shiftr. + rewrite (EqShiftL_firstr k x y); auto. + rewrite <- sneakl_shiftr; auto. + omega. + Qed. + + Lemma EqShiftL_incrbis : forall n k x y, n<=size -> + (n+k=S size)%nat -> + EqShiftL k x y -> + EqShiftL k (incrbis_aux n x) (incrbis_aux n y). + Proof. + induction n; simpl; intros. + red; auto. + destruct (eq_nat_dec k size). + subst k; apply EqShiftL_size; auto. + unfold incrbis_aux; simpl; + fold (incrbis_aux n (shiftr x)); fold (incrbis_aux n (shiftr y)). + + rewrite (EqShiftL_firstr k x y); auto; try omega. + case_eq (firstr y); intros. + rewrite EqShiftL_twice_plus_one. + apply EqShiftL_shiftr; auto. + + rewrite EqShiftL_twice. + apply IHn; try omega. + apply EqShiftL_shiftr; auto. + Qed. + + Lemma EqShiftL_incr : forall x y, + EqShiftL 1 x y -> EqShiftL 1 (incr x) (incr y). + Proof. + intros. + rewrite <- 2 incrbis_aux_equiv. + apply EqShiftL_incrbis; auto. + Qed. + + End EqShiftL. + + (** * More equations about [incr] *) + + Lemma incr_twice_plus_one : + forall x, incr (twice_plus_one x) = twice (incr x). + Proof. + intros. + rewrite incr_eqn2; [ | destruct x; simpl; auto]. + apply EqShiftL_incr. + red; destruct x; simpl; auto. + Qed. + + Lemma incr_firstr : forall x, firstr (incr x) <> firstr x. + Proof. + intros. + case_eq (firstr x); intros. + rewrite incr_eqn1; auto. + destruct (shiftr x); simpl; discriminate. + rewrite incr_eqn2; auto. + destruct (incr (shiftr x)); simpl; discriminate. + Qed. + + Lemma incr_inv : forall x y, + incr x = twice_plus_one y -> x = twice y. + Proof. + intros. + case_eq (iszero x); intros. + rewrite (iszero_eq0 _ H0) in *; simpl in *. + change (incr 0) with 1 in H. + symmetry; rewrite twice_zero; auto. + case_eq (firstr x); intros. + rewrite incr_eqn1 in H; auto. + clear H0; destruct x; destruct y; simpl in *. + injection H; intros; subst; auto. + elim (incr_firstr x). + rewrite H1, H; destruct y; simpl; auto. + Qed. + + (** * Conversion from [Z] : the [phi_inv] function *) + + (** First, recursive equations *) + + Lemma phi_inv_double_plus_one : forall z, + phi_inv (Zdouble_plus_one z) = twice_plus_one (phi_inv z). + Proof. + destruct z; simpl; auto. + induction p; simpl. + rewrite 2 incr_twice; auto. + rewrite incr_twice, incr_twice_plus_one. + f_equal. + apply incr_inv; auto. + auto. + Qed. + + Lemma phi_inv_double : forall z, + phi_inv (Zdouble z) = twice (phi_inv z). + Proof. + destruct z; simpl; auto. + rewrite incr_twice_plus_one; auto. + Qed. + + Lemma phi_inv_incr : forall z, + phi_inv (Zsucc z) = incr (phi_inv z). + Proof. + destruct z. + simpl; auto. + simpl; auto. + induction p; simpl; auto. + rewrite Pplus_one_succ_r, IHp, incr_twice_plus_one; auto. + rewrite incr_twice; auto. + simpl; auto. + destruct p; simpl; auto. + rewrite incr_twice; auto. + f_equal. + rewrite incr_twice_plus_one; auto. + induction p; simpl; auto. + rewrite incr_twice; auto. + f_equal. + rewrite incr_twice_plus_one; auto. + Qed. + + (** [phi_inv o inv], the always-exact and easy-to-prove trip : + from int31 to Z and then back to int31. *) + + Lemma phi_inv_phi_aux : + forall n x, n <= size -> + phi_inv (phibis_aux n (nshiftr (size-n) x)) = + nshiftr (size-n) x. + Proof. + induction n. + intros; simpl. + rewrite nshiftr_size; auto. + intros. + unfold phibis_aux, recrbis_aux; fold recrbis_aux; + fold (phibis_aux n (shiftr (nshiftr (size-S n) x))). + assert (shiftr (nshiftr (size - S n) x) = nshiftr (size-n) x). + replace (size - n)%nat with (S (size - (S n))); auto; omega. + rewrite H0. + case_eq (firstr (nshiftr (size - S n) x)); intros. + + rewrite phi_inv_double. + rewrite IHn by omega. + rewrite <- H0. + remember (nshiftr (size - S n) x) as y. + destruct y; simpl in H1; rewrite H1; auto. + + rewrite phi_inv_double_plus_one. + rewrite IHn by omega. + rewrite <- H0. + remember (nshiftr (size - S n) x) as y. + destruct y; simpl in H1; rewrite H1; auto. + Qed. + + Lemma phi_inv_phi : forall x, phi_inv (phi x) = x. + Proof. + intros. + rewrite <- phibis_aux_equiv. + replace x with (nshiftr (size - size) x) by auto. + apply phi_inv_phi_aux; auto. + Qed. + + (** The other composition [phi o phi_inv] is harder to prove correct. + In particular, an overflow can happen, so a modulo is needed. + For the moment, we proceed via several steps, the first one + being a detour to [positive_to_in31]. *) + + (** * [positive_to_int31] *) + + (** A variant of [p2i] with [twice] and [twice_plus_one] instead of + [2*i] and [2*i+1] *) + + Fixpoint p2ibis n p : (N*int31)%type := + match n with + | O => (Npos p, On) + | S n => match p with + | xO p => let (r,i) := p2ibis n p in (r, twice i) + | xI p => let (r,i) := p2ibis n p in (r, twice_plus_one i) + | xH => (N0, In) + end + end. + + Lemma p2ibis_bounded : forall n p, + nshiftr n (snd (p2ibis n p)) = 0. + Proof. + induction n. + simpl; intros; auto. + simpl; intros. + destruct p; simpl. + + specialize IHn with p. + destruct (p2ibis n p); simpl in *. + rewrite nshiftr_S_tail. + destruct (le_lt_dec size n). + rewrite nshiftr_above_size; auto. + assert (H:=nshiftr_0_firstl _ _ l IHn). + replace (shiftr (twice_plus_one i)) with i; auto. + destruct i; simpl in *; rewrite H; auto. + + specialize IHn with p. + destruct (p2ibis n p); simpl in *. + rewrite nshiftr_S_tail. + destruct (le_lt_dec size n). + rewrite nshiftr_above_size; auto. + assert (H:=nshiftr_0_firstl _ _ l IHn). + replace (shiftr (twice i)) with i; auto. + destruct i; simpl in *; rewrite H; auto. + + rewrite nshiftr_S_tail; auto. + replace (shiftr In) with 0; auto. + apply nshiftr_n_0. + Qed. + + Lemma p2ibis_spec : forall n p, n<=size -> + Zpos p = ((Z_of_N (fst (p2ibis n p)))*2^(Z_of_nat n) + + phi (snd (p2ibis n p)))%Z. + Proof. + induction n; intros. + simpl; rewrite Pmult_1_r; auto. + replace (2^(Z_of_nat (S n)))%Z with (2*2^(Z_of_nat n))%Z by + (rewrite <- Zpower_Zsucc, <- Zpos_P_of_succ_nat; + auto with zarith). + rewrite (Zmult_comm 2). + assert (n<=size) by omega. + destruct p; simpl; [ | | auto]; + specialize (IHn p H0); + generalize (p2ibis_bounded n p); + destruct (p2ibis n p) as (r,i); simpl in *; intros. + + change (Zpos p~1) with (2*Zpos p + 1)%Z. + rewrite phi_twice_plus_one_firstl, Zdouble_plus_one_mult. + rewrite IHn; ring. + apply (nshiftr_0_firstl n); auto; try omega. + + change (Zpos p~0) with (2*Zpos p)%Z. + rewrite phi_twice_firstl. + change (Zdouble (phi i)) with (2*(phi i))%Z. + rewrite IHn; ring. + apply (nshiftr_0_firstl n); auto; try omega. + Qed. + + (** We now prove that this [p2ibis] is related to [phi_inv_positive] *) + + Lemma phi_inv_positive_p2ibis : forall n p, (n<=size)%nat -> + EqShiftL (size-n) (phi_inv_positive p) (snd (p2ibis n p)). + Proof. + induction n. + intros. + apply EqShiftL_size; auto. + intros. + simpl p2ibis; destruct p; [ | | red; auto]; + specialize IHn with p; + destruct (p2ibis n p); simpl snd in *; simpl phi_inv_positive; + rewrite ?EqShiftL_twice_plus_one, ?EqShiftL_twice; + replace (S (size - S n))%nat with (size - n)%nat by omega; + apply IHn; omega. + Qed. + + (** This gives the expected result about [phi o phi_inv], at least + for the positive case. *) + + Lemma phi_phi_inv_positive : forall p, + phi (phi_inv_positive p) = (Zpos p) mod (2^(Z_of_nat size)). + Proof. + intros. + replace (phi_inv_positive p) with (snd (p2ibis size p)). + rewrite (p2ibis_spec size p) by auto. + rewrite Zplus_comm, Z_mod_plus. + symmetry; apply Zmod_small. + apply phi_bounded. + auto with zarith. + symmetry. + rewrite <- EqShiftL_zero. + apply (phi_inv_positive_p2ibis size p); auto. + Qed. + + (** Moreover, [p2ibis] is also related with [p2i] and hence with + [positive_to_int31]. *) + + Lemma double_twice_firstl : forall x, firstl x = D0 -> Twon*x = twice x. + Proof. + intros. + unfold mul31. + rewrite <- Zdouble_mult, <- phi_twice_firstl, phi_inv_phi; auto. + Qed. + + Lemma double_twice_plus_one_firstl : forall x, firstl x = D0 -> + Twon*x+In = twice_plus_one x. + Proof. + intros. + rewrite double_twice_firstl; auto. + unfold add31. + rewrite phi_twice_firstl, <- Zdouble_plus_one_mult, + <- phi_twice_plus_one_firstl, phi_inv_phi; auto. + Qed. + + Lemma p2i_p2ibis : forall n p, (n<=size)%nat -> + p2i n p = p2ibis n p. + Proof. + induction n; simpl; auto; intros. + destruct p; auto; specialize IHn with p; + generalize (p2ibis_bounded n p); + rewrite IHn; try omega; destruct (p2ibis n p); simpl; intros; + f_equal; auto. + apply double_twice_plus_one_firstl. + apply (nshiftr_0_firstl n); auto; omega. + apply double_twice_firstl. + apply (nshiftr_0_firstl n); auto; omega. + Qed. + + Lemma positive_to_int31_phi_inv_positive : forall p, + snd (positive_to_int31 p) = phi_inv_positive p. + Proof. + intros; unfold positive_to_int31. + rewrite p2i_p2ibis; auto. + symmetry. + rewrite <- EqShiftL_zero. + apply (phi_inv_positive_p2ibis size); auto. + Qed. + + Lemma positive_to_int31_spec : forall p, + Zpos p = ((Z_of_N (fst (positive_to_int31 p)))*2^(Z_of_nat size) + + phi (snd (positive_to_int31 p)))%Z. + Proof. + unfold positive_to_int31. + intros; rewrite p2i_p2ibis; auto. + apply p2ibis_spec; auto. + Qed. + + (** Thanks to the result about [phi o phi_inv_positive], we can + now establish easily the most general results about + [phi o twice] and so one. *) + + Lemma phi_twice : forall x, + phi (twice x) = (Zdouble (phi x)) mod 2^(Z_of_nat size). + Proof. + intros. + pattern x at 1; rewrite <- (phi_inv_phi x). + rewrite <- phi_inv_double. + assert (0 <= Zdouble (phi x))%Z. + rewrite Zdouble_mult; generalize (phi_bounded x); omega. + destruct (Zdouble (phi x)). + simpl; auto. + apply phi_phi_inv_positive. + compute in H; elim H; auto. + Qed. + + Lemma phi_twice_plus_one : forall x, + phi (twice_plus_one x) = (Zdouble_plus_one (phi x)) mod 2^(Z_of_nat size). + Proof. + intros. + pattern x at 1; rewrite <- (phi_inv_phi x). + rewrite <- phi_inv_double_plus_one. + assert (0 <= Zdouble_plus_one (phi x))%Z. + rewrite Zdouble_plus_one_mult; generalize (phi_bounded x); omega. + destruct (Zdouble_plus_one (phi x)). + simpl; auto. + apply phi_phi_inv_positive. + compute in H; elim H; auto. + Qed. + + Lemma phi_incr : forall x, + phi (incr x) = (Zsucc (phi x)) mod 2^(Z_of_nat size). + Proof. + intros. + pattern x at 1; rewrite <- (phi_inv_phi x). + rewrite <- phi_inv_incr. + assert (0 <= Zsucc (phi x))%Z. + change (Zsucc (phi x)) with ((phi x)+1)%Z; + generalize (phi_bounded x); omega. + destruct (Zsucc (phi x)). + simpl; auto. + apply phi_phi_inv_positive. + compute in H; elim H; auto. + Qed. + + (** With the previous results, we can deal with [phi o phi_inv] even + in the negative case *) + + Lemma phi_phi_inv_negative : + forall p, phi (incr (complement_negative p)) = (Zneg p) mod 2^(Z_of_nat size). + Proof. + induction p. + + simpl complement_negative. + rewrite phi_incr in IHp. + rewrite incr_twice, phi_twice_plus_one. + remember (phi (complement_negative p)) as q. + rewrite Zdouble_plus_one_mult. + replace (2*q+1)%Z with (2*(Zsucc q)-1)%Z by omega. + rewrite <- Zminus_mod_idemp_l, <- Zmult_mod_idemp_r, IHp. + rewrite Zmult_mod_idemp_r, Zminus_mod_idemp_l; auto with zarith. + + simpl complement_negative. + rewrite incr_twice_plus_one, phi_twice. + remember (phi (incr (complement_negative p))) as q. + rewrite Zdouble_mult, IHp, Zmult_mod_idemp_r; auto with zarith. + + simpl; auto. + Qed. + + Lemma phi_phi_inv : + forall z, phi (phi_inv z) = z mod 2 ^ (Z_of_nat size). + Proof. + destruct z. + simpl; auto. + apply phi_phi_inv_positive. + apply phi_phi_inv_negative. + Qed. + +End Basics. + + +Section Int31_Op. + +(** Nullity test *) +Let w_iszero i := match i ?= 0 with Eq => true | _ => false end. + +(** Modulo [2^p] *) +Let w_pos_mod p i := + match compare31 p 31 with + | Lt => addmuldiv31 p 0 (addmuldiv31 (31-p) i 0) + | _ => i + end. + +(** Parity test *) +Let w_iseven i := + let (_,r) := i/2 in + match r ?= 0 with Eq => true | _ => false end. + +Definition int31_op := (mk_znz_op + 31%positive (* number of digits *) + 31 (* number of digits *) + phi (* conversion to Z *) + positive_to_int31 (* positive -> N*int31 : p => N,i where p = N*2^31+phi i *) + head031 (* number of head 0 *) + tail031 (* number of tail 0 *) + (* Basic constructors *) + 0 + 1 + Tn (* 2^31 - 1 *) + (* Comparison *) + compare31 + w_iszero + (* Basic arithmetic operations *) + (fun i => 0 -c i) + (fun i => 0 - i) + (fun i => 0-i-1) + (fun i => i +c 1) + add31c + add31carryc + (fun i => i + 1) + add31 + (fun i j => i + j + 1) + (fun i => i -c 1) + sub31c + sub31carryc + (fun i => i - 1) + sub31 + (fun i j => i - j - 1) + mul31c + mul31 + (fun x => x *c x) + (* special (euclidian) division operations *) + div3121 + div31 (* this is supposed to be the special case of division a/b where a > b *) + div31 + (* euclidian division remainder *) + (* again special case for a > b *) + (fun i j => let (_,r) := i/j in r) + (fun i j => let (_,r) := i/j in r) + gcd31 (*gcd_gt*) + gcd31 (*gcd*) + (* shift operations *) + addmuldiv31 (*add_mul_div *) + (* modulo 2^p *) + w_pos_mod + (* is i even ? *) + w_iseven + (* square root operations *) + sqrt312 (* sqrt2 *) + sqrt31 (* sqrt *) +). + +End Int31_Op. + +Section Int31_Spec. + + Open Local Scope Z_scope. + + Notation "[| x |]" := (phi x) (at level 0, x at level 99). + + Notation Local wB := (2 ^ (Z_of_nat size)). + + Lemma wB_pos : wB > 0. + Proof. + auto with zarith. + Qed. + + Notation "[+| c |]" := + (interp_carry 1 wB phi c) (at level 0, x at level 99). + + Notation "[-| c |]" := + (interp_carry (-1) wB phi c) (at level 0, x at level 99). + + Notation "[|| x ||]" := + (zn2z_to_Z wB phi x) (at level 0, x at level 99). + + Lemma spec_zdigits : [| 31 |] = 31. + Proof. + reflexivity. + Qed. + + Lemma spec_more_than_1_digit: 1 < 31. + Proof. + auto with zarith. + Qed. + + Lemma spec_0 : [| 0 |] = 0. + Proof. + reflexivity. + Qed. + + Lemma spec_1 : [| 1 |] = 1. + Proof. + reflexivity. + Qed. + + Lemma spec_Bm1 : [| Tn |] = wB - 1. + Proof. + reflexivity. + Qed. + + Lemma spec_compare : forall x y, + match (x ?= y)%int31 with + | Eq => [|x|] = [|y|] + | Lt => [|x|] < [|y|] + | Gt => [|x|] > [|y|] + end. + Proof. + clear; unfold compare31; simpl; intros. + case_eq ([|x|] ?= [|y|]); auto. + intros; apply Zcompare_Eq_eq; auto. + Qed. + + (** Addition *) + + Lemma spec_add_c : forall x y, [+|add31c x y|] = [|x|] + [|y|]. + Proof. + intros; unfold add31c, add31, interp_carry; rewrite phi_phi_inv. + generalize (phi_bounded x)(phi_bounded y); intros. + set (X:=[|x|]) in *; set (Y:=[|y|]) in *; clearbody X Y. + + assert ((X+Y) mod wB ?= X+Y <> Eq -> [+|C1 (phi_inv (X+Y))|] = X+Y). + unfold interp_carry; rewrite phi_phi_inv, Zcompare_Eq_iff_eq; intros. + destruct (Z_lt_le_dec (X+Y) wB). + contradict H1; auto using Zmod_small with zarith. + rewrite <- (Z_mod_plus_full (X+Y) (-1) wB). + rewrite Zmod_small; romega. + + generalize (Zcompare_Eq_eq ((X+Y) mod wB) (X+Y)); intros Heq. + destruct Zcompare; intros; + [ rewrite phi_phi_inv; auto | now apply H1 | now apply H1]. + Qed. + + Lemma spec_succ_c : forall x, [+|add31c x 1|] = [|x|] + 1. + Proof. + intros; apply spec_add_c. + Qed. + + Lemma spec_add_carry_c : forall x y, [+|add31carryc x y|] = [|x|] + [|y|] + 1. + Proof. + intros. + unfold add31carryc, interp_carry; rewrite phi_phi_inv. + generalize (phi_bounded x)(phi_bounded y); intros. + set (X:=[|x|]) in *; set (Y:=[|y|]) in *; clearbody X Y. + + assert ((X+Y+1) mod wB ?= X+Y+1 <> Eq -> [+|C1 (phi_inv (X+Y+1))|] = X+Y+1). + unfold interp_carry; rewrite phi_phi_inv, Zcompare_Eq_iff_eq; intros. + destruct (Z_lt_le_dec (X+Y+1) wB). + contradict H1; auto using Zmod_small with zarith. + rewrite <- (Z_mod_plus_full (X+Y+1) (-1) wB). + rewrite Zmod_small; romega. + + generalize (Zcompare_Eq_eq ((X+Y+1) mod wB) (X+Y+1)); intros Heq. + destruct Zcompare; intros; + [ rewrite phi_phi_inv; auto | now apply H1 | now apply H1]. + Qed. + + Lemma spec_add : forall x y, [|x+y|] = ([|x|] + [|y|]) mod wB. + Proof. + intros; apply phi_phi_inv. + Qed. + + Lemma spec_add_carry : + forall x y, [|x+y+1|] = ([|x|] + [|y|] + 1) mod wB. + Proof. + unfold add31; intros. + repeat rewrite phi_phi_inv. + apply Zplus_mod_idemp_l. + Qed. + + Lemma spec_succ : forall x, [|x+1|] = ([|x|] + 1) mod wB. + Proof. + intros; rewrite <- spec_1; apply spec_add. + Qed. + + (** Substraction *) + + Lemma spec_sub_c : forall x y, [-|sub31c x y|] = [|x|] - [|y|]. + Proof. + unfold sub31c, sub31, interp_carry; intros. + rewrite phi_phi_inv. + generalize (phi_bounded x)(phi_bounded y); intros. + set (X:=[|x|]) in *; set (Y:=[|y|]) in *; clearbody X Y. + + assert ((X-Y) mod wB ?= X-Y <> Eq -> [-|C1 (phi_inv (X-Y))|] = X-Y). + unfold interp_carry; rewrite phi_phi_inv, Zcompare_Eq_iff_eq; intros. + destruct (Z_lt_le_dec (X-Y) 0). + rewrite <- (Z_mod_plus_full (X-Y) 1 wB). + rewrite Zmod_small; romega. + contradict H1; apply Zmod_small; romega. + + generalize (Zcompare_Eq_eq ((X-Y) mod wB) (X-Y)); intros Heq. + destruct Zcompare; intros; + [ rewrite phi_phi_inv; auto | now apply H1 | now apply H1]. + Qed. + + Lemma spec_sub_carry_c : forall x y, [-|sub31carryc x y|] = [|x|] - [|y|] - 1. + Proof. + unfold sub31carryc, sub31, interp_carry; intros. + rewrite phi_phi_inv. + generalize (phi_bounded x)(phi_bounded y); intros. + set (X:=[|x|]) in *; set (Y:=[|y|]) in *; clearbody X Y. + + assert ((X-Y-1) mod wB ?= X-Y-1 <> Eq -> [-|C1 (phi_inv (X-Y-1))|] = X-Y-1). + unfold interp_carry; rewrite phi_phi_inv, Zcompare_Eq_iff_eq; intros. + destruct (Z_lt_le_dec (X-Y-1) 0). + rewrite <- (Z_mod_plus_full (X-Y-1) 1 wB). + rewrite Zmod_small; romega. + contradict H1; apply Zmod_small; romega. + + generalize (Zcompare_Eq_eq ((X-Y-1) mod wB) (X-Y-1)); intros Heq. + destruct Zcompare; intros; + [ rewrite phi_phi_inv; auto | now apply H1 | now apply H1]. + Qed. + + Lemma spec_sub : forall x y, [|x-y|] = ([|x|] - [|y|]) mod wB. + Proof. + intros; apply phi_phi_inv. + Qed. + + Lemma spec_sub_carry : + forall x y, [|x-y-1|] = ([|x|] - [|y|] - 1) mod wB. + Proof. + unfold sub31; intros. + repeat rewrite phi_phi_inv. + apply Zminus_mod_idemp_l. + Qed. + + Lemma spec_opp_c : forall x, [-|sub31c 0 x|] = -[|x|]. + Proof. + intros; apply spec_sub_c. + Qed. + + Lemma spec_opp : forall x, [|0 - x|] = (-[|x|]) mod wB. + Proof. + intros; apply phi_phi_inv. + Qed. + + Lemma spec_opp_carry : forall x, [|0 - x - 1|] = wB - [|x|] - 1. + Proof. + unfold sub31; intros. + repeat rewrite phi_phi_inv. + change [|1|] with 1; change [|0|] with 0. + rewrite <- (Z_mod_plus_full (0-[|x|]) 1 wB). + rewrite Zminus_mod_idemp_l. + rewrite Zmod_small; generalize (phi_bounded x); romega. + Qed. + + Lemma spec_pred_c : forall x, [-|sub31c x 1|] = [|x|] - 1. + Proof. + intros; apply spec_sub_c. + Qed. + + Lemma spec_pred : forall x, [|x-1|] = ([|x|] - 1) mod wB. + Proof. + intros; apply spec_sub. + Qed. + + (** Multiplication *) + + Lemma phi2_phi_inv2 : forall x, [||phi_inv2 x||] = x mod (wB^2). + Proof. + assert (forall z, (z / wB) mod wB * wB + z mod wB = z mod wB ^ 2). + intros. + assert ((z/wB) mod wB = z/wB - (z/wB/wB)*wB). + rewrite (Z_div_mod_eq (z/wB) wB wB_pos) at 2; ring. + assert (z mod wB = z - (z/wB)*wB). + rewrite (Z_div_mod_eq z wB wB_pos) at 2; ring. + rewrite H. + rewrite H0 at 1. + ring_simplify. + rewrite Zdiv_Zdiv; auto with zarith. + rewrite (Z_div_mod_eq z (wB*wB)) at 2; auto with zarith. + change (wB*wB) with (wB^2); ring. + + unfold phi_inv2. + destruct x; unfold zn2z_to_Z; rewrite ?phi_phi_inv; + change base with wB; auto. + Qed. + + Lemma spec_mul_c : forall x y, [|| mul31c x y ||] = [|x|] * [|y|]. + Proof. + unfold mul31c; intros. + rewrite phi2_phi_inv2. + apply Zmod_small. + generalize (phi_bounded x)(phi_bounded y); intros. + change (wB^2) with (wB * wB). + auto using Zmult_lt_compat with zarith. + Qed. + + Lemma spec_mul : forall x y, [|x*y|] = ([|x|] * [|y|]) mod wB. + Proof. + intros; apply phi_phi_inv. + Qed. + + Lemma spec_square_c : forall x, [|| mul31c x x ||] = [|x|] * [|x|]. + Proof. + intros; apply spec_mul_c. + Qed. + + (** Division *) + + Lemma spec_div21 : forall a1 a2 b, + wB/2 <= [|b|] -> + [|a1|] < [|b|] -> + let (q,r) := div3121 a1 a2 b in + [|a1|] *wB+ [|a2|] = [|q|] * [|b|] + [|r|] /\ + 0 <= [|r|] < [|b|]. + Proof. + unfold div3121; intros. + generalize (phi_bounded a1)(phi_bounded a2)(phi_bounded b); intros. + assert ([|b|]>0) by (auto with zarith). + generalize (Z_div_mod (phi2 a1 a2) [|b|] H4) (Z_div_pos (phi2 a1 a2) [|b|] H4). + unfold Zdiv; destruct (Zdiv_eucl (phi2 a1 a2) [|b|]); simpl. + rewrite ?phi_phi_inv. + destruct 1; intros. + unfold phi2 in *. + change base with wB; change base with wB in H5. + change (Zpower_pos 2 31) with wB; change (Zpower_pos 2 31) with wB in H. + rewrite H5, Zmult_comm. + replace (z0 mod wB) with z0 by (symmetry; apply Zmod_small; omega). + replace (z mod wB) with z; auto with zarith. + symmetry; apply Zmod_small. + split. + apply H7; change base with wB; auto with zarith. + apply Zmult_gt_0_lt_reg_r with [|b|]. + omega. + rewrite Zmult_comm. + apply Zle_lt_trans with ([|b|]*z+z0). + omega. + rewrite <- H5. + apply Zle_lt_trans with ([|a1|]*wB+(wB-1)). + omega. + replace ([|a1|]*wB+(wB-1)) with (wB*([|a1|]+1)-1) by ring. + assert (wB*([|a1|]+1) <= wB*[|b|]); try omega. + apply Zmult_le_compat; omega. + Qed. + + Lemma spec_div : forall a b, 0 < [|b|] -> + let (q,r) := div31 a b in + [|a|] = [|q|] * [|b|] + [|r|] /\ + 0 <= [|r|] < [|b|]. + Proof. + unfold div31; intros. + assert ([|b|]>0) by (auto with zarith). + generalize (Z_div_mod [|a|] [|b|] H0) (Z_div_pos [|a|] [|b|] H0). + unfold Zdiv; destruct (Zdiv_eucl [|a|] [|b|]); simpl. + rewrite ?phi_phi_inv. + destruct 1; intros. + rewrite H1, Zmult_comm. + generalize (phi_bounded a)(phi_bounded b); intros. + replace (z0 mod wB) with z0 by (symmetry; apply Zmod_small; omega). + replace (z mod wB) with z; auto with zarith. + symmetry; apply Zmod_small. + split; auto with zarith. + apply Zle_lt_trans with [|a|]; auto with zarith. + rewrite H1. + apply Zle_trans with ([|b|]*z); try omega. + rewrite <- (Zmult_1_l z) at 1. + apply Zmult_le_compat; auto with zarith. + Qed. + + Lemma spec_mod : forall a b, 0 < [|b|] -> + [|let (_,r) := (a/b)%int31 in r|] = [|a|] mod [|b|]. + Proof. + unfold div31; intros. + assert ([|b|]>0) by (auto with zarith). + unfold Zmod. + generalize (Z_div_mod [|a|] [|b|] H0). + destruct (Zdiv_eucl [|a|] [|b|]); simpl. + rewrite ?phi_phi_inv. + destruct 1; intros. + generalize (phi_bounded b); intros. + apply Zmod_small; omega. + Qed. + + Lemma phi_gcd : forall i j, + [|gcd31 i j|] = Zgcdn (2*size) [|j|] [|i|]. + Proof. + unfold gcd31. + induction (2*size)%nat; intros. + reflexivity. + simpl. + unfold compare31. + change [|On|] with 0. + generalize (phi_bounded j)(phi_bounded i); intros. + case_eq [|j|]; intros. + simpl; intros. + generalize (Zabs_spec [|i|]); omega. + simpl. + rewrite IHn, H1; f_equal. + rewrite spec_mod, H1; auto. + rewrite H1; compute; auto. + rewrite H1 in H; destruct H as [H _]; compute in H; elim H; auto. + Qed. + + Lemma spec_gcd : forall a b, Zis_gcd [|a|] [|b|] [|gcd31 a b|]. + Proof. + intros. + rewrite phi_gcd. + apply Zis_gcd_sym. + apply Zgcdn_is_gcd. + unfold Zgcd_bound. + generalize (phi_bounded b). + destruct [|b|]. + unfold size; auto with zarith. + intros (_,H). + cut (Psize p <= size)%nat; [ omega | rewrite <- Zpower2_Psize; auto]. + intros (H,_); compute in H; elim H; auto. + Qed. + + Lemma iter_int31_iter_nat : forall A f i a, + iter_int31 i A f a = iter_nat (Zabs_nat [|i|]) A f a. + Proof. + intros. + unfold iter_int31. + rewrite <- recrbis_equiv; auto; unfold recrbis. + rewrite <- phibis_aux_equiv. + + revert i a; induction size. + simpl; auto. + simpl; intros. + case_eq (firstr i); intros H; rewrite 2 IHn; + unfold phibis_aux; simpl; rewrite H; fold (phibis_aux n (shiftr i)); + generalize (phibis_aux_pos n (shiftr i)); intros; + set (z := phibis_aux n (shiftr i)) in *; clearbody z; + rewrite <- iter_nat_plus. + + f_equal. + rewrite Zdouble_mult, Zmult_comm, <- Zplus_diag_eq_mult_2. + symmetry; apply Zabs_nat_Zplus; auto with zarith. + + change (iter_nat (S (Zabs_nat z + Zabs_nat z)) A f a = + iter_nat (Zabs_nat (Zdouble_plus_one z)) A f a); f_equal. + rewrite Zdouble_plus_one_mult, Zmult_comm, <- Zplus_diag_eq_mult_2. + rewrite Zabs_nat_Zplus; auto with zarith. + rewrite Zabs_nat_Zplus; auto with zarith. + change (Zabs_nat 1) with 1%nat; omega. + Qed. + + Fixpoint addmuldiv31_alt n i j := + match n with + | O => i + | S n => addmuldiv31_alt n (sneakl (firstl j) i) (shiftl j) + end. + + Lemma addmuldiv31_equiv : forall p x y, + addmuldiv31 p x y = addmuldiv31_alt (Zabs_nat [|p|]) x y. + Proof. + intros. + unfold addmuldiv31. + rewrite iter_int31_iter_nat. + set (n:=Zabs_nat [|p|]); clearbody n; clear p. + revert x y; induction n. + simpl; auto. + intros. + simpl addmuldiv31_alt. + replace (S n) with (n+1)%nat by (rewrite plus_comm; auto). + rewrite iter_nat_plus; simpl; auto. + Qed. + + Lemma spec_add_mul_div : forall x y p, [|p|] <= Zpos 31 -> + [| addmuldiv31 p x y |] = + ([|x|] * (2 ^ [|p|]) + [|y|] / (2 ^ ((Zpos 31) - [|p|]))) mod wB. + Proof. + intros. + rewrite addmuldiv31_equiv. + assert ([|p|] = Z_of_nat (Zabs_nat [|p|])). + rewrite inj_Zabs_nat; symmetry; apply Zabs_eq. + destruct (phi_bounded p); auto. + rewrite H0; rewrite H0 in H; clear H0; rewrite Zabs_nat_Z_of_nat. + set (n := Zabs_nat [|p|]) in *; clearbody n. + assert (n <= 31)%nat. + rewrite inj_le_iff; auto with zarith. + clear p H; revert x y. + + induction n. + simpl; intros. + change (Zpower_pos 2 31) with (2^31). + rewrite Zmult_1_r. + replace ([|y|] / 2^31) with 0. + rewrite Zplus_0_r. + symmetry; apply Zmod_small; apply phi_bounded. + symmetry; apply Zdiv_small; apply phi_bounded. + + simpl addmuldiv31_alt; intros. + rewrite IHn; [ | omega ]. + case_eq (firstl y); intros. + + rewrite phi_twice, Zdouble_mult. + rewrite phi_twice_firstl; auto. + change (Zdouble [|y|]) with (2*[|y|]). + rewrite inj_S, Zpower_Zsucc; auto with zarith. + rewrite Zplus_mod; rewrite Zmult_mod_idemp_l; rewrite <- Zplus_mod. + f_equal. + apply Zplus_eq_compat. + ring. + replace (31-Z_of_nat n) with (Zsucc(31-Zsucc(Z_of_nat n))) by ring. + rewrite Zpower_Zsucc, <- Zdiv_Zdiv; auto with zarith. + rewrite Zmult_comm, Z_div_mult; auto with zarith. + + rewrite phi_twice_plus_one, Zdouble_plus_one_mult. + rewrite phi_twice; auto. + change (Zdouble [|y|]) with (2*[|y|]). + rewrite inj_S, Zpower_Zsucc; auto with zarith. + rewrite Zplus_mod; rewrite Zmult_mod_idemp_l; rewrite <- Zplus_mod. + rewrite Zmult_plus_distr_l, Zmult_1_l, <- Zplus_assoc. + f_equal. + apply Zplus_eq_compat. + ring. + assert ((2*[|y|]) mod wB = 2*[|y|] - wB). + admit. + rewrite H1. + replace wB with (2^(Z_of_nat n)*2^(31-Z_of_nat n)) by + (rewrite <- Zpower_exp; auto with zarith; f_equal; unfold size; ring). + unfold Zminus; rewrite Zopp_mult_distr_l. + rewrite Z_div_plus; auto with zarith. + ring_simplify. + replace (31+-Z_of_nat n) with (Zsucc(31-Zsucc(Z_of_nat n))) by ring. + rewrite Zpower_Zsucc, <- Zdiv_Zdiv; auto with zarith. + rewrite Zmult_comm, Z_div_mult; auto with zarith. + Qed. + + Let w_pos_mod := int31_op.(znz_pos_mod). + + Lemma spec_pos_mod : forall w p, + [|w_pos_mod p w|] = [|w|] mod (2 ^ [|p|]). + Proof. + unfold w_pos_mod, znz_pos_mod, int31_op, compare31. + change [|31|] with 31%Z. + assert (forall w p, 31<=p -> [|w|] = [|w|] mod 2^p). + intros. + generalize (phi_bounded w). + symmetry; apply Zmod_small. + split; auto with zarith. + apply Zlt_le_trans with wB; auto with zarith. + apply Zpower_le_monotone; auto with zarith. + intros. + case_eq ([|p|] ?= 31); intros; + [ apply H; rewrite (Zcompare_Eq_eq _ _ H0); auto with zarith | | + apply H; change ([|p|]>31)%Z in H0; auto with zarith ]. + change ([|p|]<31) in H0. + rewrite spec_add_mul_div by auto with zarith. + change [|0|] with 0%Z; rewrite Zmult_0_l, Zplus_0_l. + generalize (phi_bounded p)(phi_bounded w); intros. + assert (31-[|p|] [|head031 x|] = Zpos 31. + Proof. + intros. + generalize (phi_inv_phi x). + rewrite H; simpl. + intros H'; rewrite <- H'. + simpl; auto. + Qed. + + Fixpoint head031_alt n x := + match n with + | O => 0%nat + | S n => match firstl x with + | D0 => S (head031_alt n (shiftl x)) + | D1 => 0%nat + end + end. + + Lemma head031_equiv : + forall x, [|head031 x|] = Z_of_nat (head031_alt size x). + Proof. + intros. + case_eq (iszero x); intros. + rewrite (iszero_eq0 _ H). + simpl; auto. + + unfold head031, recl. + change On with (phi_inv (Z_of_nat (31-size))). + replace (head031_alt size x) with + (head031_alt size x + (31 - size))%nat by (apply plus_0_r; auto). + assert (size <= 31)%nat by auto with arith. + + revert x H; induction size; intros. + simpl; auto. + unfold recl_aux; fold recl_aux. + unfold head031_alt; fold head031_alt. + rewrite H. + assert ([|phi_inv (Z_of_nat (31-S n))|] = Z_of_nat (31 - S n)). + rewrite phi_phi_inv. + apply Zmod_small. + split. + change 0 with (Z_of_nat O); apply inj_le; omega. + apply Zle_lt_trans with (Z_of_nat 31). + apply inj_le; omega. + compute; auto. + case_eq (firstl x); intros; auto. + rewrite plus_Sn_m, plus_n_Sm. + replace (S (31 - S n)) with (31 - n)%nat by omega. + rewrite <- IHn; [ | omega | ]. + f_equal; f_equal. + unfold add31. + rewrite H1. + f_equal. + change [|In|] with 1. + replace (31-n)%nat with (S (31 - S n))%nat by omega. + rewrite inj_S; ring. + + clear - H H2. + rewrite (sneakr_shiftl x) in H. + rewrite H2 in H. + case_eq (iszero (shiftl x)); intros; auto. + rewrite (iszero_eq0 _ H0) in H; discriminate. + Qed. + + Lemma phi_nz : forall x, 0 < [|x|] <-> x <> 0%int31. + Proof. + split; intros. + red; intro; subst x; discriminate. + assert ([|x|]<>0%Z). + contradict H. + rewrite <- (phi_inv_phi x); rewrite H; auto. + generalize (phi_bounded x); auto with zarith. + Qed. + + Lemma spec_head0 : forall x, 0 < [|x|] -> + wB/ 2 <= 2 ^ ([|head031 x|]) * [|x|] < wB. + Proof. + intros. + rewrite head031_equiv. + assert (nshiftl size x = 0%int31). + apply nshiftl_size. + revert x H H0. + unfold size at 2 5. + induction size. + simpl Z_of_nat. + intros. + compute in H0; rewrite H0 in H; discriminate. + + intros. + simpl head031_alt. + case_eq (firstl x); intros. + rewrite (inj_S (head031_alt n (shiftl x))), Zpower_Zsucc; auto with zarith. + rewrite <- Zmult_assoc, Zmult_comm, <- Zmult_assoc, <-(Zmult_comm 2). + rewrite <- Zdouble_mult, <- (phi_twice_firstl _ H1). + apply IHn. + + rewrite phi_nz; rewrite phi_nz in H; contradict H. + change twice with shiftl in H. + rewrite (sneakr_shiftl x), H1, H; auto. + + rewrite <- nshiftl_S_tail; auto. + + change (2^(Z_of_nat 0)) with 1; rewrite Zmult_1_l. + generalize (phi_bounded x); unfold size; split; auto with zarith. + change (2^(Z_of_nat 31)/2) with (2^(Z_of_nat (pred size))). + apply phi_lowerbound; auto. + Qed. + + Lemma spec_tail00: forall x, [|x|] = 0 -> [|tail031 x|] = Zpos 31. + Proof. + intros. + generalize (phi_inv_phi x). + rewrite H; simpl. + intros H'; rewrite <- H'. + simpl; auto. + Qed. + + Fixpoint tail031_alt n x := + match n with + | O => 0%nat + | S n => match firstr x with + | D0 => S (tail031_alt n (shiftr x)) + | D1 => 0%nat + end + end. + + Lemma tail031_equiv : + forall x, [|tail031 x|] = Z_of_nat (tail031_alt size x). + Proof. + intros. + case_eq (iszero x); intros. + rewrite (iszero_eq0 _ H). + simpl; auto. + + unfold tail031, recr. + change On with (phi_inv (Z_of_nat (31-size))). + replace (tail031_alt size x) with + (tail031_alt size x + (31 - size))%nat by (apply plus_0_r; auto). + assert (size <= 31)%nat by auto with arith. + + revert x H; induction size; intros. + simpl; auto. + unfold recr_aux; fold recr_aux. + unfold tail031_alt; fold tail031_alt. + rewrite H. + assert ([|phi_inv (Z_of_nat (31-S n))|] = Z_of_nat (31 - S n)). + rewrite phi_phi_inv. + apply Zmod_small. + split. + change 0 with (Z_of_nat O); apply inj_le; omega. + apply Zle_lt_trans with (Z_of_nat 31). + apply inj_le; omega. + compute; auto. + case_eq (firstr x); intros; auto. + rewrite plus_Sn_m, plus_n_Sm. + replace (S (31 - S n)) with (31 - n)%nat by omega. + rewrite <- IHn; [ | omega | ]. + f_equal; f_equal. + unfold add31. + rewrite H1. + f_equal. + change [|In|] with 1. + replace (31-n)%nat with (S (31 - S n))%nat by omega. + rewrite inj_S; ring. + + clear - H H2. + rewrite (sneakl_shiftr x) in H. + rewrite H2 in H. + case_eq (iszero (shiftr x)); intros; auto. + rewrite (iszero_eq0 _ H0) in H; discriminate. + Qed. + + Lemma spec_tail0 : forall x, 0 < [|x|] -> + exists y, 0 <= y /\ [|x|] = (2 * y + 1) * (2 ^ [|tail031 x|]). + Proof. + intros. + rewrite tail031_equiv. + assert (nshiftr size x = 0%int31). + apply nshiftr_size. + revert x H H0. + induction size. + simpl Z_of_nat. + intros. + compute in H0; rewrite H0 in H; discriminate. + + intros. + simpl tail031_alt. + case_eq (firstr x); intros. + rewrite (inj_S (tail031_alt n (shiftr x))), Zpower_Zsucc; auto with zarith. + destruct (IHn (shiftr x)) as (y & Hy1 & Hy2). + + rewrite phi_nz; rewrite phi_nz in H; contradict H. + rewrite (sneakl_shiftr x), H1, H; auto. + + rewrite <- nshiftr_S_tail; auto. + + exists y; split; auto. + rewrite phi_eqn1; auto. + rewrite Zdouble_mult, Hy2; ring. + + exists [|shiftr x|]. + split. + generalize (phi_bounded (shiftr x)); auto with zarith. + rewrite phi_eqn2; auto. + rewrite Zdouble_plus_one_mult; simpl; ring. + Qed. + + (* Sqrt *) + + (* Direct transcription of an old proof + of a fortran program in boyer-moore *) + + Lemma quotient_by_2 a: a - 1 <= (a/2) + (a/2). + Proof. + intros a; case (Z_mod_lt a 2); auto with zarith. + intros H1; rewrite Zmod_eq_full; auto with zarith. + Qed. + + Lemma sqrt_main_trick j k: 0 <= j -> 0 <= k -> + (j * k) + j <= ((j + k)/2 + 1) ^ 2. + Proof. + intros j k Hj; generalize Hj k; pattern j; apply natlike_ind; + auto; clear k j Hj. + intros _ k Hk; repeat rewrite Zplus_0_l. + apply Zmult_le_0_compat; generalize (Z_div_pos k 2); auto with zarith. + intros j Hj Hrec _ k Hk; pattern k; apply natlike_ind; auto; clear k Hk. + rewrite Zmult_0_r, Zplus_0_r, Zplus_0_l. + generalize (sqr_pos (Zsucc j / 2)) (quotient_by_2 (Zsucc j)); + unfold Zsucc. + rewrite Zpower_2, Zmult_plus_distr_l; repeat rewrite Zmult_plus_distr_r. + auto with zarith. + intros k Hk _. + replace ((Zsucc j + Zsucc k) / 2) with ((j + k)/2 + 1). + generalize (Hrec Hj k Hk) (quotient_by_2 (j + k)). + unfold Zsucc; repeat rewrite Zpower_2; + repeat rewrite Zmult_plus_distr_l; repeat rewrite Zmult_plus_distr_r. + repeat rewrite Zmult_1_l; repeat rewrite Zmult_1_r. + auto with zarith. + rewrite Zplus_comm, <- Z_div_plus_full_l; auto with zarith. + apply f_equal2 with (f := Zdiv); auto with zarith. + Qed. + + Lemma sqrt_main i j: 0 <= i -> 0 < j -> i < ((j + (i/j))/2 + 1) ^ 2. + Proof. + intros i j Hi Hj. + assert (Hij: 0 <= i/j) by (apply Z_div_pos; auto with zarith). + apply Zlt_le_trans with (2 := sqrt_main_trick _ _ (Zlt_le_weak _ _ Hj) Hij). + pattern i at 1; rewrite (Z_div_mod_eq i j); case (Z_mod_lt i j); auto with zarith. + Qed. + + Lemma sqrt_init i: 1 < i -> i < (i/2 + 1) ^ 2. + Proof. + intros i Hi. + assert (H1: 0 <= i - 2) by auto with zarith. + assert (H2: 1 <= (i / 2) ^ 2); auto with zarith. + replace i with (1* 2 + (i - 2)); auto with zarith. + rewrite Zpower_2, Z_div_plus_full_l; auto with zarith. + generalize (sqr_pos ((i - 2)/ 2)) (Z_div_pos (i - 2) 2). + rewrite Zmult_plus_distr_l; repeat rewrite Zmult_plus_distr_r. + auto with zarith. + generalize (quotient_by_2 i). + rewrite Zpower_2 in H2 |- *; + repeat (rewrite Zmult_plus_distr_l || + rewrite Zmult_plus_distr_r || + rewrite Zmult_1_l || rewrite Zmult_1_r). + auto with zarith. + Qed. + + Lemma sqrt_test_true i j: 0 <= i -> 0 < j -> i/j >= j -> j ^ 2 <= i. + Proof. + intros i j Hi Hj Hd; rewrite Zpower_2. + apply Zle_trans with (j * (i/j)); auto with zarith. + apply Z_mult_div_ge; auto with zarith. + Qed. + + Lemma sqrt_test_false i j: 0 <= i -> 0 < j -> i/j < j -> (j + (i/j))/2 < j. + Proof. + intros i j Hi Hj H; case (Zle_or_lt j ((j + (i/j))/2)); auto. + intros H1; contradict H; apply Zle_not_lt. + assert (2 * j <= j + (i/j)); auto with zarith. + apply Zle_trans with (2 * ((j + (i/j))/2)); auto with zarith. + apply Z_mult_div_ge; auto with zarith. + Qed. + + (* George's trick *) + Inductive ZcompareSpec (i j: Z): comparison -> Prop := + ZcompareSpecEq: i = j -> ZcompareSpec i j Eq + | ZcompareSpecLt: i < j -> ZcompareSpec i j Lt + | ZcompareSpecGt: j < i -> ZcompareSpec i j Gt. + + Lemma Zcompare_spec i j: ZcompareSpec i j (i ?= j). + Proof. + intros i j; case_eq (Zcompare i j); intros H. + apply ZcompareSpecEq; apply Zcompare_Eq_eq; auto. + apply ZcompareSpecLt; auto. + apply ZcompareSpecGt; apply Zgt_lt; auto. + Qed. + + Lemma sqrt31_step_def rec i j: + sqrt31_step rec i j = + match (fst (i/j) ?= j)%int31 with + Lt => rec i (fst ((j + fst(i/j))/2))%int31 + | _ => j + end. + Proof. + intros rec i j; unfold sqrt31_step; case div31; intros. + simpl; case compare31; auto. + Qed. + + Lemma div31_phi i j: 0 < [|j|] -> [|fst (i/j)%int31|] = [|i|]/[|j|]. + intros i j Hj; generalize (spec_div i j Hj). + case div31; intros q r; simpl fst. + intros (H1,H2); apply Zdiv_unique with [|r|]; auto with zarith. + rewrite H1; ring. + Qed. + + Lemma sqrt31_step_correct rec i j: + 0 < [|i|] -> 0 < [|j|] -> [|i|] < ([|j|] + 1) ^ 2 -> + 2 * [|j|] < wB -> + (forall j1 : int31, + 0 < [|j1|] < [|j|] -> [|i|] < ([|j1|] + 1) ^ 2 -> + [|rec i j1|] ^ 2 <= [|i|] < ([|rec i j1|] + 1) ^ 2) -> + [|sqrt31_step rec i j|] ^ 2 <= [|i|] < ([|sqrt31_step rec i j|] + 1) ^ 2. + Proof. + assert (Hp2: 0 < [|2|]) by exact (refl_equal Lt). + intros rec i j Hi Hj Hij H31 Hrec; rewrite sqrt31_step_def. + generalize (spec_compare (fst (i/j)%int31) j); case compare31; + rewrite div31_phi; auto; intros Hc; + try (split; auto; apply sqrt_test_true; auto with zarith; fail). + apply Hrec; repeat rewrite div31_phi; auto with zarith. + replace [|(j + fst (i / j)%int31)|] with ([|j|] + [|i|] / [|j|]). + split. + case (Zle_lt_or_eq 1 [|j|]); auto with zarith; intros Hj1. + replace ([|j|] + [|i|]/[|j|]) with + (1 * 2 + (([|j|] - 2) + [|i|] / [|j|])); try ring. + rewrite Z_div_plus_full_l; auto with zarith. + assert (0 <= [|i|]/ [|j|]) by (apply Z_div_pos; auto with zarith). + assert (0 <= ([|j|] - 2 + [|i|] / [|j|]) / [|2|]) ; auto with zarith. + rewrite <- Hj1, Zdiv_1_r. + replace (1 + [|i|])%Z with (1 * 2 + ([|i|] - 1))%Z; try ring. + rewrite Z_div_plus_full_l; auto with zarith. + assert (0 <= ([|i|] - 1) /2)%Z by (apply Z_div_pos; auto with zarith). + change ([|2|]) with 2%Z; auto with zarith. + apply sqrt_test_false; auto with zarith. + rewrite spec_add, div31_phi; auto. + apply sym_equal; apply Zmod_small. + split; auto with zarith. + replace [|j + fst (i / j)%int31|] with ([|j|] + [|i|] / [|j|]). + apply sqrt_main; auto with zarith. + rewrite spec_add, div31_phi; auto. + apply sym_equal; apply Zmod_small. + split; auto with zarith. + Qed. + + Lemma iter31_sqrt_correct n rec i j: 0 < [|i|] -> 0 < [|j|] -> + [|i|] < ([|j|] + 1) ^ 2 -> 2 * [|j|] < 2 ^ (Z_of_nat size) -> + (forall j1, 0 < [|j1|] -> 2^(Z_of_nat n) + [|j1|] <= [|j|] -> + [|i|] < ([|j1|] + 1) ^ 2 -> 2 * [|j1|] < 2 ^ (Z_of_nat size) -> + [|rec i j1|] ^ 2 <= [|i|] < ([|rec i j1|] + 1) ^ 2) -> + [|iter31_sqrt n rec i j|] ^ 2 <= [|i|] < ([|iter31_sqrt n rec i j|] + 1) ^ 2. + Proof. + intros n; elim n; unfold iter31_sqrt; fold iter31_sqrt; clear n. + intros rec i j Hi Hj Hij H31 Hrec; apply sqrt31_step_correct; auto with zarith. + intros; apply Hrec; auto with zarith. + rewrite Zpower_0_r; auto with zarith. + intros n Hrec rec i j Hi Hj Hij H31 HHrec. + apply sqrt31_step_correct; auto. + intros j1 Hj1 Hjp1; apply Hrec; auto with zarith. + intros j2 Hj2 H2j2 Hjp2 Hj31; apply Hrec; auto with zarith. + intros j3 Hj3 Hpj3. + apply HHrec; auto. + rewrite inj_S, Zpower_Zsucc. + apply Zle_trans with (2 ^Z_of_nat n + [|j2|]); auto with zarith. + apply Zle_0_nat. + Qed. + + Lemma spec_sqrt : forall x, + [|sqrt31 x|] ^ 2 <= [|x|] < ([|sqrt31 x|] + 1) ^ 2. + Proof. + intros i; unfold sqrt31. + generalize (spec_compare 1 i); case compare31; change [|1|] with 1; + intros Hi; auto with zarith. + repeat rewrite Zpower_2; auto with zarith. + apply iter31_sqrt_correct; auto with zarith. + rewrite div31_phi; change ([|2|]) with 2; auto with zarith. + replace ([|i|]) with (1 * 2 + ([|i|] - 2))%Z; try ring. + assert (0 <= ([|i|] - 2)/2)%Z by (apply Z_div_pos; auto with zarith). + rewrite Z_div_plus_full_l; auto with zarith. + rewrite div31_phi; change ([|2|]) with 2; auto with zarith. + apply sqrt_init; auto. + rewrite div31_phi; change ([|2|]) with 2; auto with zarith. + apply Zle_lt_trans with ([|i|]). + apply Z_mult_div_ge; auto with zarith. + case (phi_bounded i); auto. + intros j2 H1 H2; contradict H2; apply Zlt_not_le. + rewrite div31_phi; change ([|2|]) with 2; auto with zarith. + apply Zle_lt_trans with ([|i|]); auto with zarith. + assert (0 <= [|i|]/2)%Z by (apply Z_div_pos; auto with zarith). + apply Zle_trans with (2 * ([|i|]/2)); auto with zarith. + apply Z_mult_div_ge; auto with zarith. + case (phi_bounded i); unfold size; auto with zarith. + change [|0|] with 0; auto with zarith. + case (phi_bounded i); repeat rewrite Zpower_2; auto with zarith. + Qed. + + Lemma sqrt312_step_def rec ih il j: + sqrt312_step rec ih il j = + match (ih ?= j)%int31 with + Eq => j + | Gt => j + | _ => + match (fst (div3121 ih il j) ?= j)%int31 with + Lt => let m := match j +c fst (div3121 ih il j) with + C0 m1 => fst (m1/2)%int31 + | C1 m1 => (fst (m1/2) + v30)%int31 + end in rec ih il m + | _ => j + end + end. + Proof. + intros rec ih il j; unfold sqrt312_step; case div3121; intros. + simpl; case compare31; auto. + Qed. + + Lemma sqrt312_lower_bound ih il j: + phi2 ih il < ([|j|] + 1) ^ 2 -> [|ih|] <= [|j|]. + Proof. + intros ih il j H1. + case (phi_bounded j); intros Hbj _. + case (phi_bounded il); intros Hbil _. + case (phi_bounded ih); intros Hbih Hbih1. + assert (([|ih|] < [|j|] + 1)%Z); auto with zarith. + apply Zlt_square_simpl; auto with zarith. + repeat rewrite <-Zpower_2; apply Zle_lt_trans with (2 := H1). + apply Zle_trans with ([|ih|] * base)%Z; unfold phi2, base; + try rewrite Zpower_2; auto with zarith. + Qed. + + Lemma div312_phi ih il j: (2^30 <= [|j|] -> [|ih|] < [|j|] -> + [|fst (div3121 ih il j)|] = phi2 ih il/[|j|])%Z. + Proof. + intros ih il j Hj Hj1. + generalize (spec_div21 ih il j Hj Hj1). + case div3121; intros q r (Hq, Hr). + apply Zdiv_unique with (phi r); auto with zarith. + simpl fst; apply trans_equal with (1 := Hq); ring. + Qed. + + Lemma sqrt312_step_correct rec ih il j: + 2 ^ 29 <= [|ih|] -> 0 < [|j|] -> phi2 ih il < ([|j|] + 1) ^ 2 -> + (forall j1, 0 < [|j1|] < [|j|] -> phi2 ih il < ([|j1|] + 1) ^ 2 -> + [|rec ih il j1|] ^ 2 <= phi2 ih il < ([|rec ih il j1|] + 1) ^ 2) -> + [|sqrt312_step rec ih il j|] ^ 2 <= phi2 ih il + < ([|sqrt312_step rec ih il j|] + 1) ^ 2. + Proof. + assert (Hp2: (0 < [|2|])%Z) by exact (refl_equal Lt). + intros rec ih il j Hih Hj Hij Hrec; rewrite sqrt312_step_def. + assert (H1: ([|ih|] <= [|j|])%Z) by (apply sqrt312_lower_bound with il; auto). + case (phi_bounded ih); intros Hih1 _. + case (phi_bounded il); intros Hil1 _. + case (phi_bounded j); intros _ Hj1. + assert (Hp3: (0 < phi2 ih il)). + unfold phi2; apply Zlt_le_trans with ([|ih|] * base)%Z; auto with zarith. + apply Zmult_lt_0_compat; auto with zarith. + apply Zlt_le_trans with (2:= Hih); auto with zarith. + generalize (spec_compare ih j); case compare31; intros Hc1. + split; auto. + apply sqrt_test_true; auto. + unfold phi2, base; auto with zarith. + unfold phi2; rewrite Hc1. + assert (0 <= [|il|]/[|j|]) by (apply Z_div_pos; auto with zarith). + rewrite Zmult_comm, Z_div_plus_full_l; unfold base; auto with zarith. + unfold Zpower, Zpower_pos in Hj1; simpl in Hj1; auto with zarith. + case (Zle_or_lt (2 ^ 30) [|j|]); intros Hjj. + generalize (spec_compare (fst (div3121 ih il j)) j); case compare31; + rewrite div312_phi; auto; intros Hc; + try (split; auto; apply sqrt_test_true; auto with zarith; fail). + apply Hrec. + assert (Hf1: 0 <= phi2 ih il/ [|j|]) by (apply Z_div_pos; auto with zarith). + case (Zle_lt_or_eq 1 ([|j|])); auto with zarith; intros Hf2. + 2: contradict Hc; apply Zle_not_lt; rewrite <- Hf2, Zdiv_1_r; auto with zarith. + assert (Hf3: 0 < ([|j|] + phi2 ih il / [|j|]) / 2). + replace ([|j|] + phi2 ih il/ [|j|])%Z with + (1 * 2 + (([|j|] - 2) + phi2 ih il / [|j|])); try ring. + rewrite Z_div_plus_full_l; auto with zarith. + assert (0 <= ([|j|] - 2 + phi2 ih il / [|j|]) / 2) ; auto with zarith. + assert (Hf4: ([|j|] + phi2 ih il / [|j|]) / 2 < [|j|]). + apply sqrt_test_false; auto with zarith. + generalize (spec_add_c j (fst (div3121 ih il j))). + unfold interp_carry; case add31c; intros r; + rewrite div312_phi; auto with zarith. + rewrite div31_phi; change [|2|] with 2%Z; auto with zarith. + intros HH; rewrite HH; clear HH; auto with zarith. + rewrite spec_add, div31_phi; change [|2|] with 2%Z; auto. + rewrite Zmult_1_l; intros HH. + rewrite Zplus_comm, <- Z_div_plus_full_l; auto with zarith. + change (phi v30 * 2) with (2 ^ Z_of_nat size). + rewrite HH, Zmod_small; auto with zarith. + replace (phi + match j +c fst (div3121 ih il j) with + | C0 m1 => fst (m1 / 2)%int31 + | C1 m1 => fst (m1 / 2)%int31 + v30 + end) with ((([|j|] + (phi2 ih il)/([|j|]))/2)). + apply sqrt_main; auto with zarith. + generalize (spec_add_c j (fst (div3121 ih il j))). + unfold interp_carry; case add31c; intros r; + rewrite div312_phi; auto with zarith. + rewrite div31_phi; auto with zarith. + intros HH; rewrite HH; auto with zarith. + intros HH; rewrite <- HH. + change (1 * 2 ^ Z_of_nat size) with (phi (v30) * 2). + rewrite Z_div_plus_full_l; auto with zarith. + rewrite Zplus_comm. + rewrite spec_add, Zmod_small. + rewrite div31_phi; auto. + split; auto with zarith. + case (phi_bounded (fst (r/2)%int31)); + case (phi_bounded v30); auto with zarith. + rewrite div31_phi; change (phi 2) with 2%Z; auto. + change (2 ^Z_of_nat size) with (base/2 + phi v30). + assert (phi r / 2 < base/2); auto with zarith. + apply Zmult_gt_0_lt_reg_r with 2; auto with zarith. + change (base/2 * 2) with base. + apply Zle_lt_trans with (phi r). + rewrite Zmult_comm; apply Z_mult_div_ge; auto with zarith. + case (phi_bounded r); auto with zarith. + contradict Hij; apply Zle_not_lt. + assert ((1 + [|j|]) <= 2 ^ 30); auto with zarith. + apply Zle_trans with ((2 ^ 30) * (2 ^ 30)); auto with zarith. + assert (0 <= 1 + [|j|]); auto with zarith. + apply Zmult_le_compat; auto with zarith. + change ((2 ^ 30) * (2 ^ 30)) with ((2 ^ 29) * base). + apply Zle_trans with ([|ih|] * base); auto with zarith. + unfold phi2, base; auto with zarith. + split; auto. + apply sqrt_test_true; auto. + unfold phi2, base; auto with zarith. + apply Zle_ge; apply Zle_trans with (([|j|] * base)/[|j|]). + rewrite Zmult_comm, Z_div_mult; auto with zarith. + apply Zge_le; apply Z_div_ge; auto with zarith. + Qed. + + Lemma iter312_sqrt_correct n rec ih il j: + 2^29 <= [|ih|] -> 0 < [|j|] -> phi2 ih il < ([|j|] + 1) ^ 2 -> + (forall j1, 0 < [|j1|] -> 2^(Z_of_nat n) + [|j1|] <= [|j|] -> + phi2 ih il < ([|j1|] + 1) ^ 2 -> + [|rec ih il j1|] ^ 2 <= phi2 ih il < ([|rec ih il j1|] + 1) ^ 2) -> + [|iter312_sqrt n rec ih il j|] ^ 2 <= phi2 ih il + < ([|iter312_sqrt n rec ih il j|] + 1) ^ 2. + Proof. + intros n; elim n; unfold iter312_sqrt; fold iter312_sqrt; clear n. + intros rec ih il j Hi Hj Hij Hrec; apply sqrt312_step_correct; auto with zarith. + intros; apply Hrec; auto with zarith. + rewrite Zpower_0_r; auto with zarith. + intros n Hrec rec ih il j Hi Hj Hij HHrec. + apply sqrt312_step_correct; auto. + intros j1 Hj1 Hjp1; apply Hrec; auto with zarith. + intros j2 Hj2 H2j2 Hjp2; apply Hrec; auto with zarith. + intros j3 Hj3 Hpj3. + apply HHrec; auto. + rewrite inj_S, Zpower_Zsucc. + apply Zle_trans with (2 ^Z_of_nat n + [|j2|])%Z; auto with zarith. + apply Zle_0_nat. + Qed. + + Lemma spec_sqrt2 : forall x y, + wB/ 4 <= [|x|] -> + let (s,r) := sqrt312 x y in + [||WW x y||] = [|s|] ^ 2 + [+|r|] /\ + [+|r|] <= 2 * [|s|]. + Proof. + intros ih il Hih; unfold sqrt312. + change [||WW ih il||] with (phi2 ih il). + assert (Hbin: forall s, s * s + 2* s + 1 = (s + 1) ^ 2) by + (intros s; ring). + assert (Hb: 0 <= base) by (red; intros HH; discriminate). + assert (Hi2: phi2 ih il < (phi Tn + 1) ^ 2). + change ((phi Tn + 1) ^ 2) with (2^62). + apply Zle_lt_trans with ((2^31 -1) * base + (2^31 - 1)); auto with zarith. + 2: simpl; unfold Zpower_pos; simpl; auto with zarith. + case (phi_bounded ih); case (phi_bounded il); intros H1 H2 H3 H4. + unfold base, Zpower, Zpower_pos in H2,H4; simpl in H2,H4. + unfold phi2,Zpower, Zpower_pos; simpl iter_pos; auto with zarith. + case (iter312_sqrt_correct 31 (fun _ _ j => j) ih il Tn); auto with zarith. + change [|Tn|] with 2147483647; auto with zarith. + intros j1 _ HH; contradict HH. + apply Zlt_not_le. + change [|Tn|] with 2147483647; auto with zarith. + change (2 ^ Z_of_nat 31) with 2147483648; auto with zarith. + case (phi_bounded j1); auto with zarith. + set (s := iter312_sqrt 31 (fun _ _ j : int31 => j) ih il Tn). + intros Hs1 Hs2. + generalize (spec_mul_c s s); case mul31c. + simpl zn2z_to_Z; intros HH. + assert ([|s|] = 0). + case (Zmult_integral _ _ (sym_equal HH)); auto. + contradict Hs2; apply Zle_not_lt; rewrite H. + change ((0 + 1) ^ 2) with 1. + apply Zle_trans with (2 ^ Z_of_nat size / 4 * base). + simpl; auto with zarith. + apply Zle_trans with ([|ih|] * base); auto with zarith. + unfold phi2; case (phi_bounded il); auto with zarith. + intros ih1 il1. + change [||WW ih1 il1||] with (phi2 ih1 il1). + intros Hihl1. + generalize (spec_sub_c il il1). + case sub31c; intros il2 Hil2. + simpl interp_carry in Hil2. + generalize (spec_compare ih ih1); case compare31. + unfold interp_carry. + intros H1; split. + rewrite Zpower_2, <- Hihl1. + unfold phi2; ring[Hil2 H1]. + replace [|il2|] with (phi2 ih il - phi2 ih1 il1). + rewrite Hihl1. + rewrite <-Hbin in Hs2; auto with zarith. + unfold phi2; rewrite H1, Hil2; ring. + unfold interp_carry. + intros H1; contradict Hs1. + apply Zlt_not_le; rewrite Zpower_2, <-Hihl1. + unfold phi2. + case (phi_bounded il); intros _ H2. + apply Zlt_le_trans with (([|ih|] + 1) * base + 0). + rewrite Zmult_plus_distr_l, Zplus_0_r; auto with zarith. + case (phi_bounded il1); intros H3 _. + apply Zplus_le_compat; auto with zarith. + unfold interp_carry; change (1 * 2 ^ Z_of_nat size) with base. + rewrite Zpower_2, <- Hihl1, Hil2. + intros H1. + case (Zle_lt_or_eq ([|ih1|] + 1) ([|ih|])); auto with zarith. + intros H2; contradict Hs2; apply Zle_not_lt. + replace (([|s|] + 1) ^ 2) with (phi2 ih1 il1 + 2 * [|s|] + 1). + unfold phi2. + case (phi_bounded il); intros Hpil _. + assert (Hl1l: [|il1|] <= [|il|]). + case (phi_bounded il2); rewrite Hil2; auto with zarith. + assert ([|ih1|] * base + 2 * [|s|] + 1 <= [|ih|] * base); auto with zarith. + case (phi_bounded s); change (2 ^ Z_of_nat size) with base; intros _ Hps. + case (phi_bounded ih1); intros Hpih1 _; auto with zarith. + apply Zle_trans with (([|ih1|] + 2) * base); auto with zarith. + rewrite Zmult_plus_distr_l. + assert (2 * [|s|] + 1 <= 2 * base); auto with zarith. + rewrite Hihl1, Hbin; auto. + intros H2; split. + unfold phi2; rewrite <- H2; ring. + replace (base + ([|il|] - [|il1|])) with (phi2 ih il - ([|s|] * [|s|])). + rewrite <-Hbin in Hs2; auto with zarith. + rewrite <- Hihl1; unfold phi2; rewrite <- H2; ring. + unfold interp_carry in Hil2 |- *. + unfold interp_carry; change (1 * 2 ^ Z_of_nat size) with base. + assert (Hsih: [|ih - 1|] = [|ih|] - 1). + rewrite spec_sub, Zmod_small; auto; change [|1|] with 1. + case (phi_bounded ih); intros H1 H2. + generalize Hih; change (2 ^ Z_of_nat size / 4) with 536870912. + split; auto with zarith. + generalize (spec_compare (ih - 1) ih1); case compare31. + rewrite Hsih. + intros H1; split. + rewrite Zpower_2, <- Hihl1. + unfold phi2; rewrite <-H1. + apply trans_equal with ([|ih|] * base + [|il1|] + ([|il|] - [|il1|])). + ring. + rewrite <-Hil2. + change (2 ^ Z_of_nat size) with base; ring. + replace [|il2|] with (phi2 ih il - phi2 ih1 il1). + rewrite Hihl1. + rewrite <-Hbin in Hs2; auto with zarith. + unfold phi2. + rewrite <-H1. + ring_simplify. + apply trans_equal with (base + ([|il|] - [|il1|])). + ring. + rewrite <-Hil2. + change (2 ^ Z_of_nat size) with base; ring. + rewrite Hsih; intros H1. + assert (He: [|ih|] = [|ih1|]). + apply Zle_antisym; auto with zarith. + case (Zle_or_lt [|ih1|] [|ih|]); auto; intros H2. + contradict Hs1; apply Zlt_not_le; rewrite Zpower_2, <-Hihl1. + unfold phi2. + case (phi_bounded il); change (2 ^ Z_of_nat size) with base; + intros _ Hpil1. + apply Zlt_le_trans with (([|ih|] + 1) * base). + rewrite Zmult_plus_distr_l, Zmult_1_l; auto with zarith. + case (phi_bounded il1); intros Hpil2 _. + apply Zle_trans with (([|ih1|]) * base); auto with zarith. + rewrite Zpower_2, <-Hihl1; unfold phi2; rewrite <-He. + contradict Hs1; apply Zlt_not_le; rewrite Zpower_2, <-Hihl1. + unfold phi2; rewrite He. + assert (phi il - phi il1 < 0); auto with zarith. + rewrite <-Hil2. + case (phi_bounded il2); auto with zarith. + intros H1. + rewrite Zpower_2, <-Hihl1. + case (Zle_lt_or_eq ([|ih1|] + 2) [|ih|]); auto with zarith. + intros H2; contradict Hs2; apply Zle_not_lt. + replace (([|s|] + 1) ^ 2) with (phi2 ih1 il1 + 2 * [|s|] + 1). + unfold phi2. + assert ([|ih1|] * base + 2 * phi s + 1 <= [|ih|] * base + ([|il|] - [|il1|])); + auto with zarith. + rewrite <-Hil2. + change (-1 * 2 ^ Z_of_nat size) with (-base). + case (phi_bounded il2); intros Hpil2 _. + apply Zle_trans with ([|ih|] * base + - base); auto with zarith. + case (phi_bounded s); change (2 ^ Z_of_nat size) with base; intros _ Hps. + assert (2 * [|s|] + 1 <= 2 * base); auto with zarith. + apply Zle_trans with ([|ih1|] * base + 2 * base); auto with zarith. + assert (Hi: ([|ih1|] + 3) * base <= [|ih|] * base); auto with zarith. + rewrite Zmult_plus_distr_l in Hi; auto with zarith. + rewrite Hihl1, Hbin; auto. + intros H2; unfold phi2; rewrite <-H2. + split. + replace [|il|] with (([|il|] - [|il1|]) + [|il1|]); try ring. + rewrite <-Hil2. + change (-1 * 2 ^ Z_of_nat size) with (-base); ring. + replace (base + [|il2|]) with (phi2 ih il - phi2 ih1 il1). + rewrite Hihl1. + rewrite <-Hbin in Hs2; auto with zarith. + unfold phi2; rewrite <-H2. + replace [|il|] with (([|il|] - [|il1|]) + [|il1|]); try ring. + rewrite <-Hil2. + change (-1 * 2 ^ Z_of_nat size) with (-base); ring. + Qed. + + (** [iszero] *) + + Let w_eq0 := int31_op.(znz_eq0). + + Lemma spec_eq0 : forall x, w_eq0 x = true -> [|x|] = 0. + Proof. + clear; unfold w_eq0, znz_eq0; simpl. + unfold compare31; simpl; intros. + change [|0|] with 0 in H. + apply Zcompare_Eq_eq. + now destruct ([|x|] ?= 0). + Qed. + + (* Even *) + + Let w_is_even := int31_op.(znz_is_even). + + Lemma spec_is_even : forall x, + if w_is_even x then [|x|] mod 2 = 0 else [|x|] mod 2 = 1. + Proof. + unfold w_is_even; simpl; intros. + generalize (spec_div x 2). + destruct (x/2)%int31 as (q,r); intros. + unfold compare31. + change [|2|] with 2 in H. + change [|0|] with 0. + destruct H; auto with zarith. + replace ([|x|] mod 2) with [|r|]. + destruct H; auto with zarith. + case_eq ([|r|] ?= 0)%Z; intros. + apply Zcompare_Eq_eq; auto. + change ([|r|] < 0)%Z in H; auto with zarith. + change ([|r|] > 0)%Z in H; auto with zarith. + apply Zmod_unique with [|q|]; auto with zarith. + Qed. + + Definition int31_spec : znz_spec int31_op. + split. + exact phi_bounded. + exact positive_to_int31_spec. + exact spec_zdigits. + exact spec_more_than_1_digit. + + exact spec_0. + exact spec_1. + exact spec_Bm1. + + exact spec_compare. + exact spec_eq0. + + exact spec_opp_c. + exact spec_opp. + exact spec_opp_carry. + + exact spec_succ_c. + exact spec_add_c. + exact spec_add_carry_c. + exact spec_succ. + exact spec_add. + exact spec_add_carry. + + exact spec_pred_c. + exact spec_sub_c. + exact spec_sub_carry_c. + exact spec_pred. + exact spec_sub. + exact spec_sub_carry. + + exact spec_mul_c. + exact spec_mul. + exact spec_square_c. + + exact spec_div21. + intros; apply spec_div; auto. + exact spec_div. + + intros; unfold int31_op; simpl; apply spec_mod; auto. + exact spec_mod. + + intros; apply spec_gcd; auto. + exact spec_gcd. + + exact spec_head00. + exact spec_head0. + exact spec_tail00. + exact spec_tail0. + + exact spec_add_mul_div. + exact spec_pos_mod. + + exact spec_is_even. + exact spec_sqrt2. + exact spec_sqrt. + Qed. + +End Int31_Spec. + + +Module Int31Cyclic <: CyclicType. + Definition w := int31. + Definition w_op := int31_op. + Definition w_spec := int31_spec. +End Int31Cyclic. diff --git a/theories/Numbers/Cyclic/Int31/Int31.v b/theories/Numbers/Cyclic/Int31/Int31.v new file mode 100644 index 00000000..154b436b --- /dev/null +++ b/theories/Numbers/Cyclic/Int31/Int31.v @@ -0,0 +1,469 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* I31 b d0 ... d(N-1) end ] +*) + +Definition sneakr : digits -> int31 -> int31 := Eval compute in + fun b => int31_rect _ (napply_except_last _ _ (size-1) (I31 b)). + +(** [sneakl b x] shifts [x] to the left by one bit. + Leftmost digit is lost while rightmost digit becomes [b]. + Pseudo-code is + [ match x with (I31 d0 ... dN) => I31 d1 ... dN b end ] +*) + +Definition sneakl : digits -> int31 -> int31 := Eval compute in + fun b => int31_rect _ (fun _ => napply_then_last _ _ b (size-1) I31). + + +(** [shiftl], [shiftr], [twice] and [twice_plus_one] are direct + consequences of [sneakl] and [sneakr]. *) + +Definition shiftl := sneakl D0. +Definition shiftr := sneakr D0. +Definition twice := sneakl D0. +Definition twice_plus_one := sneakl D1. + +(** [firstl x] returns the leftmost digit of number [x]. + Pseudo-code is [ match x with (I31 d0 ... dN) => d0 end ] *) + +Definition firstl : int31 -> digits := Eval compute in + int31_rect _ (fun d => napply_discard _ _ d (size-1)). + +(** [firstr x] returns the rightmost digit of number [x]. + Pseudo-code is [ match x with (I31 d0 ... dN) => dN end ] *) + +Definition firstr : int31 -> digits := Eval compute in + int31_rect _ (napply_discard _ _ (fun d=>d) (size-1)). + +(** [iszero x] is true iff [x = I31 D0 ... D0]. Pseudo-code is + [ match x with (I31 D0 ... D0) => true | _ => false end ] *) + +Definition iszero : int31 -> bool := Eval compute in + let f d b := match d with D0 => b | D1 => false end + in int31_rect _ (nfold_bis _ _ f true size). + +(* NB: DO NOT transform the above match in a nicer (if then else). + It seems to work, but later "unfold iszero" takes forever. *) + + +(** [base] is [2^31], obtained via iterations of [Zdouble]. + It can also be seen as the smallest b > 0 s.t. phi_inv b = 0 + (see below) *) + +Definition base := Eval compute in + iter_nat size Z Zdouble 1%Z. + +(** * Recursors *) + +Fixpoint recl_aux (n:nat)(A:Type)(case0:A)(caserec:digits->int31->A->A) + (i:int31) : A := + match n with + | O => case0 + | S next => + if iszero i then + case0 + else + let si := shiftl i in + caserec (firstl i) si (recl_aux next A case0 caserec si) + end. + +Fixpoint recr_aux (n:nat)(A:Type)(case0:A)(caserec:digits->int31->A->A) + (i:int31) : A := + match n with + | O => case0 + | S next => + if iszero i then + case0 + else + let si := shiftr i in + caserec (firstr i) si (recr_aux next A case0 caserec si) + end. + +Definition recl := recl_aux size. +Definition recr := recr_aux size. + +(** * Conversions *) + +(** From int31 to Z, we simply iterates [Zdouble] or [Zdouble_plus_one]. *) + +Definition phi : int31 -> Z := + recr Z (0%Z) + (fun b _ => match b with D0 => Zdouble | D1 => Zdouble_plus_one end). + +(** From positive to int31. An abstract definition could be : + [ phi_inv (2n) = 2*(phi_inv n) /\ + phi_inv 2n+1 = 2*(phi_inv n) + 1 ] *) + +Fixpoint phi_inv_positive p := + match p with + | xI q => twice_plus_one (phi_inv_positive q) + | xO q => twice (phi_inv_positive q) + | xH => In + end. + +(** The negative part : 2-complement *) + +Fixpoint complement_negative p := + match p with + | xI q => twice (complement_negative q) + | xO q => twice_plus_one (complement_negative q) + | xH => twice Tn + end. + +(** A simple incrementation function *) + +Definition incr : int31 -> int31 := + recr int31 In + (fun b si rec => match b with + | D0 => sneakl D1 si + | D1 => sneakl D0 rec end). + +(** We can now define the conversion from Z to int31. *) + +Definition phi_inv : Z -> int31 := fun n => + match n with + | Z0 => On + | Zpos p => phi_inv_positive p + | Zneg p => incr (complement_negative p) + end. + +(** [phi_inv2] is similar to [phi_inv] but returns a double word + [zn2z int31] *) + +Definition phi_inv2 n := + match n with + | Z0 => W0 + | _ => WW (phi_inv (n/base)%Z) (phi_inv n) + end. + +(** [phi2] is similar to [phi] but takes a double word (two args) *) + +Definition phi2 nh nl := + ((phi nh)*base+(phi nl))%Z. + +(** * Addition *) + +(** Addition modulo [2^31] *) + +Definition add31 (n m : int31) := phi_inv ((phi n)+(phi m)). +Notation "n + m" := (add31 n m) : int31_scope. + +(** Addition with carry (the result is thus exact) *) + +(* spiwack : when executed in non-compiled*) +(* mode, (phi n)+(phi m) is computed twice*) +(* it may be considered to optimize it *) + +Definition add31c (n m : int31) := + let npm := n+m in + match (phi npm ?= (phi n)+(phi m))%Z with + | Eq => C0 npm + | _ => C1 npm + end. +Notation "n '+c' m" := (add31c n m) (at level 50, no associativity) : int31_scope. + +(** Addition plus one with carry (the result is thus exact) *) + +Definition add31carryc (n m : int31) := + let npmpone_exact := ((phi n)+(phi m)+1)%Z in + let npmpone := phi_inv npmpone_exact in + match (phi npmpone ?= npmpone_exact)%Z with + | Eq => C0 npmpone + | _ => C1 npmpone + end. + +(** * Substraction *) + +(** Subtraction modulo [2^31] *) + +Definition sub31 (n m : int31) := phi_inv ((phi n)-(phi m)). +Notation "n - m" := (sub31 n m) : int31_scope. + +(** Subtraction with carry (thus exact) *) + +Definition sub31c (n m : int31) := + let nmm := n-m in + match (phi nmm ?= (phi n)-(phi m))%Z with + | Eq => C0 nmm + | _ => C1 nmm + end. +Notation "n '-c' m" := (sub31c n m) (at level 50, no associativity) : int31_scope. + +(** subtraction minus one with carry (thus exact) *) + +Definition sub31carryc (n m : int31) := + let nmmmone_exact := ((phi n)-(phi m)-1)%Z in + let nmmmone := phi_inv nmmmone_exact in + match (phi nmmmone ?= nmmmone_exact)%Z with + | Eq => C0 nmmmone + | _ => C1 nmmmone + end. + + +(** Multiplication *) + +(** multiplication modulo [2^31] *) + +Definition mul31 (n m : int31) := phi_inv ((phi n)*(phi m)). +Notation "n * m" := (mul31 n m) : int31_scope. + +(** multiplication with double word result (thus exact) *) + +Definition mul31c (n m : int31) := phi_inv2 ((phi n)*(phi m)). +Notation "n '*c' m" := (mul31c n m) (at level 40, no associativity) : int31_scope. + + +(** * Division *) + +(** Division of a double size word modulo [2^31] *) + +Definition div3121 (nh nl m : int31) := + let (q,r) := Zdiv_eucl (phi2 nh nl) (phi m) in + (phi_inv q, phi_inv r). + +(** Division modulo [2^31] *) + +Definition div31 (n m : int31) := + let (q,r) := Zdiv_eucl (phi n) (phi m) in + (phi_inv q, phi_inv r). +Notation "n / m" := (div31 n m) : int31_scope. + + +(** * Unsigned comparison *) + +Definition compare31 (n m : int31) := ((phi n)?=(phi m))%Z. +Notation "n ?= m" := (compare31 n m) (at level 70, no associativity) : int31_scope. + + +(** Computing the [i]-th iterate of a function: + [iter_int31 i A f = f^i] *) + +Definition iter_int31 i A f := + recr (A->A) (fun x => x) + (fun b si rec => match b with + | D0 => fun x => rec (rec x) + | D1 => fun x => f (rec (rec x)) + end) + i. + +(** Combining the [(31-p)] low bits of [i] above the [p] high bits of [j]: + [addmuldiv31 p i j = i*2^p+j/2^(31-p)] (modulo [2^31]) *) + +Definition addmuldiv31 p i j := + let (res, _ ) := + iter_int31 p (int31*int31) + (fun ij => let (i,j) := ij in (sneakl (firstl j) i, shiftl j)) + (i,j) + in + res. + + +Register add31 as int31 plus in "coq_int31" by True. +Register add31c as int31 plusc in "coq_int31" by True. +Register add31carryc as int31 pluscarryc in "coq_int31" by True. +Register sub31 as int31 minus in "coq_int31" by True. +Register sub31c as int31 minusc in "coq_int31" by True. +Register sub31carryc as int31 minuscarryc in "coq_int31" by True. +Register mul31 as int31 times in "coq_int31" by True. +Register mul31c as int31 timesc in "coq_int31" by True. +Register div3121 as int31 div21 in "coq_int31" by True. +Register div31 as int31 div in "coq_int31" by True. +Register compare31 as int31 compare in "coq_int31" by True. +Register addmuldiv31 as int31 addmuldiv in "coq_int31" by True. + +Definition gcd31 (i j:int31) := + (fix euler (guard:nat) (i j:int31) {struct guard} := + match guard with + | O => In + | S p => match j ?= On with + | Eq => i + | _ => euler p j (let (_, r ) := i/j in r) + end + end) + (2*size)%nat i j. + +(** Square root functions using newton iteration + we use a very naive upper-bound on the iteration + 2^31 instead of the usual 31. +**) + + + +Definition sqrt31_step (rec: int31 -> int31 -> int31) (i j: int31) := +Eval lazy delta [Twon] in + let (quo,_) := i/j in + match quo ?= j with + Lt => rec i (fst ((j + quo)/Twon)) + | _ => j + end. + +Fixpoint iter31_sqrt (n: nat) (rec: int31 -> int31 -> int31) + (i j: int31) {struct n} : int31 := + sqrt31_step + (match n with + O => rec + | S n => (iter31_sqrt n (iter31_sqrt n rec)) + end) i j. + +Definition sqrt31 i := +Eval lazy delta [On In Twon] in + match compare31 In i with + Gt => On + | Eq => In + | Lt => iter31_sqrt 31 (fun i j => j) i (fst (i/Twon)) + end. + +Definition v30 := Eval compute in (addmuldiv31 (phi_inv (Z_of_nat size - 1)) In On). + +Definition sqrt312_step (rec: int31 -> int31 -> int31 -> int31) + (ih il j: int31) := +Eval lazy delta [Twon v30] in + match ih ?= j with Eq => j | Gt => j | _ => + let (quo,_) := div3121 ih il j in + match quo ?= j with + Lt => let m := match j +c quo with + C0 m1 => fst (m1/Twon) + | C1 m1 => fst (m1/Twon) + v30 + end in rec ih il m + | _ => j + end end. + +Fixpoint iter312_sqrt (n: nat) + (rec: int31 -> int31 -> int31 -> int31) + (ih il j: int31) {struct n} : int31 := + sqrt312_step + (match n with + O => rec + | S n => (iter312_sqrt n (iter312_sqrt n rec)) + end) ih il j. + +Definition sqrt312 ih il := +Eval lazy delta [On In] in + let s := iter312_sqrt 31 (fun ih il j => j) ih il Tn in + match s *c s with + W0 => (On, C0 On) (* impossible *) + | WW ih1 il1 => + match il -c il1 with + C0 il2 => + match ih ?= ih1 with + Gt => (s, C1 il2) + | _ => (s, C0 il2) + end + | C1 il2 => + match (ih - In) ?= ih1 with (* we could parametrize ih - 1 *) + Gt => (s, C1 il2) + | _ => (s, C0 il2) + end + end + end. + + +Fixpoint p2i n p : (N*int31)%type := + match n with + | O => (Npos p, On) + | S n => match p with + | xO p => let (r,i) := p2i n p in (r, Twon*i) + | xI p => let (r,i) := p2i n p in (r, Twon*i+In) + | xH => (N0, In) + end + end. + +Definition positive_to_int31 (p:positive) := p2i size p. + +(** Constant 31 converted into type int31. + It is used as default answer for numbers of zeros + in [head0] and [tail0] *) + +Definition T31 : int31 := Eval compute in phi_inv (Z_of_nat size). + +Definition head031 (i:int31) := + recl _ (fun _ => T31) + (fun b si rec n => match b with + | D0 => rec (add31 n In) + | D1 => n + end) + i On. + +Definition tail031 (i:int31) := + recr _ (fun _ => T31) + (fun b si rec n => match b with + | D0 => rec (add31 n In) + | D1 => n + end) + i On. + +Register head031 as int31 head0 in "coq_int31" by True. +Register tail031 as int31 tail0 in "coq_int31" by True. diff --git a/theories/Numbers/Cyclic/ZModulo/ZModulo.v b/theories/Numbers/Cyclic/ZModulo/ZModulo.v new file mode 100644 index 00000000..7c770e97 --- /dev/null +++ b/theories/Numbers/Cyclic/ZModulo/ZModulo.v @@ -0,0 +1,946 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* 1%positive. + + Definition wB := base digits. + + Definition znz := Z. + Definition znz_digits := digits. + Definition znz_zdigits := Zpos digits. + Definition znz_to_Z x := x mod wB. + + Notation "[| x |]" := (znz_to_Z x) (at level 0, x at level 99). + + Notation "[+| c |]" := + (interp_carry 1 wB znz_to_Z c) (at level 0, x at level 99). + + Notation "[-| c |]" := + (interp_carry (-1) wB znz_to_Z c) (at level 0, x at level 99). + + Notation "[|| x ||]" := + (zn2z_to_Z wB znz_to_Z x) (at level 0, x at level 99). + + Lemma spec_more_than_1_digit: 1 < Zpos digits. + Proof. + unfold znz_digits. + generalize digits_ne_1; destruct digits; auto. + destruct 1; auto. + Qed. + Let digits_gt_1 := spec_more_than_1_digit. + + Lemma wB_pos : wB > 0. + Proof. + unfold wB, base; auto with zarith. + Qed. + Hint Resolve wB_pos. + + Lemma spec_to_Z_1 : forall x, 0 <= [|x|]. + Proof. + unfold znz_to_Z; intros; destruct (Z_mod_lt x wB wB_pos); auto. + Qed. + + Lemma spec_to_Z_2 : forall x, [|x|] < wB. + Proof. + unfold znz_to_Z; intros; destruct (Z_mod_lt x wB wB_pos); auto. + Qed. + Hint Resolve spec_to_Z_1 spec_to_Z_2. + + Lemma spec_to_Z : forall x, 0 <= [|x|] < wB. + Proof. + auto. + Qed. + + Definition znz_of_pos x := + let (q,r) := Zdiv_eucl_POS x wB in (N_of_Z q, r). + + Lemma spec_of_pos : forall p, + Zpos p = (Z_of_N (fst (znz_of_pos p)))*wB + [|(snd (znz_of_pos p))|]. + Proof. + intros; unfold znz_of_pos; simpl. + generalize (Z_div_mod_POS wB wB_pos p). + destruct (Zdiv_eucl_POS p wB); simpl; destruct 1. + unfold znz_to_Z; rewrite Zmod_small; auto. + assert (0 <= z). + replace z with (Zpos p / wB) by + (symmetry; apply Zdiv_unique with z0; auto). + apply Z_div_pos; auto with zarith. + replace (Z_of_N (N_of_Z z)) with z by + (destruct z; simpl; auto; elim H1; auto). + rewrite Zmult_comm; auto. + Qed. + + Lemma spec_zdigits : [|znz_zdigits|] = Zpos znz_digits. + Proof. + unfold znz_to_Z, znz_zdigits, znz_digits. + apply Zmod_small. + unfold wB, base. + split; auto with zarith. + apply Zpower2_lt_lin; auto with zarith. + Qed. + + Definition znz_0 := 0. + Definition znz_1 := 1. + Definition znz_Bm1 := wB - 1. + + Lemma spec_0 : [|znz_0|] = 0. + Proof. + unfold znz_to_Z, znz_0. + apply Zmod_small; generalize wB_pos; auto with zarith. + Qed. + + Lemma spec_1 : [|znz_1|] = 1. + Proof. + unfold znz_to_Z, znz_1. + apply Zmod_small; split; auto with zarith. + unfold wB, base. + apply Zlt_trans with (Zpos digits); auto. + apply Zpower2_lt_lin; auto with zarith. + Qed. + + Lemma spec_Bm1 : [|znz_Bm1|] = wB - 1. + Proof. + unfold znz_to_Z, znz_Bm1. + apply Zmod_small; split; auto with zarith. + unfold wB, base. + cut (1 <= 2 ^ Zpos digits); auto with zarith. + apply Zle_trans with (Zpos digits); auto with zarith. + apply Zpower2_le_lin; auto with zarith. + Qed. + + Definition znz_compare x y := Zcompare [|x|] [|y|]. + + Lemma spec_compare : forall x y, + match znz_compare x y with + | Eq => [|x|] = [|y|] + | Lt => [|x|] < [|y|] + | Gt => [|x|] > [|y|] + end. + Proof. + intros; unfold znz_compare, Zlt, Zgt. + case_eq (Zcompare [|x|] [|y|]); auto. + intros; apply Zcompare_Eq_eq; auto. + Qed. + + Definition znz_eq0 x := + match [|x|] with Z0 => true | _ => false end. + + Lemma spec_eq0 : forall x, znz_eq0 x = true -> [|x|] = 0. + Proof. + unfold znz_eq0; intros; now destruct [|x|]. + Qed. + + Definition znz_opp_c x := + if znz_eq0 x then C0 0 else C1 (- x). + Definition znz_opp x := - x. + Definition znz_opp_carry x := - x - 1. + + Lemma spec_opp_c : forall x, [-|znz_opp_c x|] = -[|x|]. + Proof. + intros; unfold znz_opp_c, znz_to_Z; auto. + case_eq (znz_eq0 x); intros; unfold interp_carry. + fold [|x|]; rewrite (spec_eq0 x H); auto. + assert (x mod wB <> 0). + unfold znz_eq0, znz_to_Z in H. + intro H0; rewrite H0 in H; discriminate. + rewrite Z_mod_nz_opp_full; auto with zarith. + Qed. + + Lemma spec_opp : forall x, [|znz_opp x|] = (-[|x|]) mod wB. + Proof. + intros; unfold znz_opp, znz_to_Z; auto. + change ((- x) mod wB = (0 - (x mod wB)) mod wB). + rewrite Zminus_mod_idemp_r; simpl; auto. + Qed. + + Lemma spec_opp_carry : forall x, [|znz_opp_carry x|] = wB - [|x|] - 1. + Proof. + intros; unfold znz_opp_carry, znz_to_Z; auto. + replace (- x - 1) with (- 1 - x) by omega. + rewrite <- Zminus_mod_idemp_r. + replace ( -1 - x mod wB) with (0 + ( -1 - x mod wB)) by omega. + rewrite <- (Z_mod_same_full wB). + rewrite Zplus_mod_idemp_l. + replace (wB + (-1 - x mod wB)) with (wB - x mod wB -1) by omega. + apply Zmod_small. + generalize (Z_mod_lt x wB wB_pos); omega. + Qed. + + Definition znz_succ_c x := + let y := Zsucc x in + if znz_eq0 y then C1 0 else C0 y. + + Definition znz_add_c x y := + let z := [|x|] + [|y|] in + if Z_lt_le_dec z wB then C0 z else C1 (z-wB). + + Definition znz_add_carry_c x y := + let z := [|x|]+[|y|]+1 in + if Z_lt_le_dec z wB then C0 z else C1 (z-wB). + + Definition znz_succ := Zsucc. + Definition znz_add := Zplus. + Definition znz_add_carry x y := x + y + 1. + + Lemma Zmod_equal : + forall x y z, z>0 -> (x-y) mod z = 0 -> x mod z = y mod z. + Proof. + intros. + generalize (Z_div_mod_eq (x-y) z H); rewrite H0, Zplus_0_r. + remember ((x-y)/z) as k. + intros H1; symmetry in H1; rewrite <- Zeq_plus_swap in H1. + subst x. + rewrite Zplus_comm, Zmult_comm, Z_mod_plus; auto. + Qed. + + Lemma spec_succ_c : forall x, [+|znz_succ_c x|] = [|x|] + 1. + Proof. + intros; unfold znz_succ_c, znz_to_Z, Zsucc. + case_eq (znz_eq0 (x+1)); intros; unfold interp_carry. + + rewrite Zmult_1_l. + replace (wB + 0 mod wB) with wB by auto with zarith. + symmetry; rewrite Zeq_plus_swap. + assert ((x+1) mod wB = 0) by (apply spec_eq0; auto). + replace (wB-1) with ((wB-1) mod wB) by + (apply Zmod_small; generalize wB_pos; omega). + rewrite <- Zminus_mod_idemp_l; rewrite Z_mod_same; simpl; auto. + apply Zmod_equal; auto. + + assert ((x+1) mod wB <> 0). + unfold znz_eq0, znz_to_Z in *; now destruct ((x+1) mod wB). + assert (x mod wB + 1 <> wB). + contradict H0. + rewrite Zeq_plus_swap in H0; simpl in H0. + rewrite <- Zplus_mod_idemp_l; rewrite H0. + replace (wB-1+1) with wB; auto with zarith; apply Z_mod_same; auto. + rewrite <- Zplus_mod_idemp_l. + apply Zmod_small. + generalize (Z_mod_lt x wB wB_pos); omega. + Qed. + + Lemma spec_add_c : forall x y, [+|znz_add_c x y|] = [|x|] + [|y|]. + Proof. + intros; unfold znz_add_c, znz_to_Z, interp_carry. + destruct Z_lt_le_dec. + apply Zmod_small; + generalize (Z_mod_lt x wB wB_pos) (Z_mod_lt y wB wB_pos); omega. + rewrite Zmult_1_l, Zplus_comm, Zeq_plus_swap. + apply Zmod_small; + generalize (Z_mod_lt x wB wB_pos) (Z_mod_lt y wB wB_pos); omega. + Qed. + + Lemma spec_add_carry_c : forall x y, [+|znz_add_carry_c x y|] = [|x|] + [|y|] + 1. + Proof. + intros; unfold znz_add_carry_c, znz_to_Z, interp_carry. + destruct Z_lt_le_dec. + apply Zmod_small; + generalize (Z_mod_lt x wB wB_pos) (Z_mod_lt y wB wB_pos); omega. + rewrite Zmult_1_l, Zplus_comm, Zeq_plus_swap. + apply Zmod_small; + generalize (Z_mod_lt x wB wB_pos) (Z_mod_lt y wB wB_pos); omega. + Qed. + + Lemma spec_succ : forall x, [|znz_succ x|] = ([|x|] + 1) mod wB. + Proof. + intros; unfold znz_succ, znz_to_Z, Zsucc. + symmetry; apply Zplus_mod_idemp_l. + Qed. + + Lemma spec_add : forall x y, [|znz_add x y|] = ([|x|] + [|y|]) mod wB. + Proof. + intros; unfold znz_add, znz_to_Z; apply Zplus_mod. + Qed. + + Lemma spec_add_carry : + forall x y, [|znz_add_carry x y|] = ([|x|] + [|y|] + 1) mod wB. + Proof. + intros; unfold znz_add_carry, znz_to_Z. + rewrite <- Zplus_mod_idemp_l. + rewrite (Zplus_mod x y). + rewrite Zplus_mod_idemp_l; auto. + Qed. + + Definition znz_pred_c x := + if znz_eq0 x then C1 (wB-1) else C0 (x-1). + + Definition znz_sub_c x y := + let z := [|x|]-[|y|] in + if Z_lt_le_dec z 0 then C1 (wB+z) else C0 z. + + Definition znz_sub_carry_c x y := + let z := [|x|]-[|y|]-1 in + if Z_lt_le_dec z 0 then C1 (wB+z) else C0 z. + + Definition znz_pred := Zpred. + Definition znz_sub := Zminus. + Definition znz_sub_carry x y := x - y - 1. + + Lemma spec_pred_c : forall x, [-|znz_pred_c x|] = [|x|] - 1. + Proof. + intros; unfold znz_pred_c, znz_to_Z, interp_carry. + case_eq (znz_eq0 x); intros. + fold [|x|]; rewrite spec_eq0; auto. + replace ((wB-1) mod wB) with (wB-1); auto with zarith. + symmetry; apply Zmod_small; generalize wB_pos; omega. + + assert (x mod wB <> 0). + unfold znz_eq0, znz_to_Z in *; now destruct (x mod wB). + rewrite <- Zminus_mod_idemp_l. + apply Zmod_small. + generalize (Z_mod_lt x wB wB_pos); omega. + Qed. + + Lemma spec_sub_c : forall x y, [-|znz_sub_c x y|] = [|x|] - [|y|]. + Proof. + intros; unfold znz_sub_c, znz_to_Z, interp_carry. + destruct Z_lt_le_dec. + replace ((wB + (x mod wB - y mod wB)) mod wB) with + (wB + (x mod wB - y mod wB)). + omega. + symmetry; apply Zmod_small. + generalize wB_pos (Z_mod_lt x wB wB_pos) (Z_mod_lt y wB wB_pos); omega. + + apply Zmod_small. + generalize wB_pos (Z_mod_lt x wB wB_pos) (Z_mod_lt y wB wB_pos); omega. + Qed. + + Lemma spec_sub_carry_c : forall x y, [-|znz_sub_carry_c x y|] = [|x|] - [|y|] - 1. + Proof. + intros; unfold znz_sub_carry_c, znz_to_Z, interp_carry. + destruct Z_lt_le_dec. + replace ((wB + (x mod wB - y mod wB - 1)) mod wB) with + (wB + (x mod wB - y mod wB -1)). + omega. + symmetry; apply Zmod_small. + generalize wB_pos (Z_mod_lt x wB wB_pos) (Z_mod_lt y wB wB_pos); omega. + + apply Zmod_small. + generalize wB_pos (Z_mod_lt x wB wB_pos) (Z_mod_lt y wB wB_pos); omega. + Qed. + + Lemma spec_pred : forall x, [|znz_pred x|] = ([|x|] - 1) mod wB. + Proof. + intros; unfold znz_pred, znz_to_Z, Zpred. + rewrite <- Zplus_mod_idemp_l; auto. + Qed. + + Lemma spec_sub : forall x y, [|znz_sub x y|] = ([|x|] - [|y|]) mod wB. + Proof. + intros; unfold znz_sub, znz_to_Z; apply Zminus_mod. + Qed. + + Lemma spec_sub_carry : + forall x y, [|znz_sub_carry x y|] = ([|x|] - [|y|] - 1) mod wB. + Proof. + intros; unfold znz_sub_carry, znz_to_Z. + rewrite <- Zminus_mod_idemp_l. + rewrite (Zminus_mod x y). + rewrite Zminus_mod_idemp_l. + auto. + Qed. + + Definition znz_mul_c x y := + let (h,l) := Zdiv_eucl ([|x|]*[|y|]) wB in + if znz_eq0 h then if znz_eq0 l then W0 else WW h l else WW h l. + + Definition znz_mul := Zmult. + + Definition znz_square_c x := znz_mul_c x x. + + Lemma spec_mul_c : forall x y, [|| znz_mul_c x y ||] = [|x|] * [|y|]. + Proof. + intros; unfold znz_mul_c, zn2z_to_Z. + assert (Zdiv_eucl ([|x|]*[|y|]) wB = (([|x|]*[|y|])/wB,([|x|]*[|y|]) mod wB)). + unfold Zmod, Zdiv; destruct Zdiv_eucl; auto. + generalize (Z_div_mod ([|x|]*[|y|]) wB wB_pos); destruct Zdiv_eucl as (h,l). + destruct 1; injection H; clear H; intros. + rewrite H0. + assert ([|l|] = l). + apply Zmod_small; auto. + assert ([|h|] = h). + apply Zmod_small. + subst h. + split. + apply Z_div_pos; auto with zarith. + apply Zdiv_lt_upper_bound; auto with zarith. + apply Zmult_lt_compat; auto with zarith. + clear H H0 H1 H2. + case_eq (znz_eq0 h); simpl; intros. + case_eq (znz_eq0 l); simpl; intros. + rewrite <- H3, <- H4, (spec_eq0 h), (spec_eq0 l); auto with zarith. + rewrite H3, H4; auto with zarith. + rewrite H3, H4; auto with zarith. + Qed. + + Lemma spec_mul : forall x y, [|znz_mul x y|] = ([|x|] * [|y|]) mod wB. + Proof. + intros; unfold znz_mul, znz_to_Z; apply Zmult_mod. + Qed. + + Lemma spec_square_c : forall x, [|| znz_square_c x||] = [|x|] * [|x|]. + Proof. + intros x; exact (spec_mul_c x x). + Qed. + + Definition znz_div x y := Zdiv_eucl [|x|] [|y|]. + + Lemma spec_div : forall a b, 0 < [|b|] -> + let (q,r) := znz_div a b in + [|a|] = [|q|] * [|b|] + [|r|] /\ + 0 <= [|r|] < [|b|]. + Proof. + intros; unfold znz_div. + assert ([|b|]>0) by auto with zarith. + assert (Zdiv_eucl [|a|] [|b|] = ([|a|]/[|b|], [|a|] mod [|b|])). + unfold Zmod, Zdiv; destruct Zdiv_eucl; auto. + generalize (Z_div_mod [|a|] [|b|] H0). + destruct Zdiv_eucl as (q,r); destruct 1; intros. + injection H1; clear H1; intros. + assert ([|r|]=r). + apply Zmod_small; generalize (Z_mod_lt b wB wB_pos); fold [|b|]; + auto with zarith. + assert ([|q|]=q). + apply Zmod_small. + subst q. + split. + apply Z_div_pos; auto with zarith. + apply Zdiv_lt_upper_bound; auto with zarith. + apply Zlt_le_trans with (wB*1). + rewrite Zmult_1_r; auto with zarith. + apply Zmult_le_compat; generalize wB_pos; auto with zarith. + rewrite H5, H6; rewrite Zmult_comm; auto with zarith. + Qed. + + Definition znz_div_gt := znz_div. + + Lemma spec_div_gt : forall a b, [|a|] > [|b|] -> 0 < [|b|] -> + let (q,r) := znz_div_gt a b in + [|a|] = [|q|] * [|b|] + [|r|] /\ + 0 <= [|r|] < [|b|]. + Proof. + intros. + apply spec_div; auto. + Qed. + + Definition znz_mod x y := [|x|] mod [|y|]. + Definition znz_mod_gt x y := [|x|] mod [|y|]. + + Lemma spec_mod : forall a b, 0 < [|b|] -> + [|znz_mod a b|] = [|a|] mod [|b|]. + Proof. + intros; unfold znz_mod. + apply Zmod_small. + assert ([|b|]>0) by auto with zarith. + generalize (Z_mod_lt [|a|] [|b|] H0) (Z_mod_lt b wB wB_pos). + fold [|b|]; omega. + Qed. + + Lemma spec_mod_gt : forall a b, [|a|] > [|b|] -> 0 < [|b|] -> + [|znz_mod_gt a b|] = [|a|] mod [|b|]. + Proof. + intros; apply spec_mod; auto. + Qed. + + Definition znz_gcd x y := Zgcd [|x|] [|y|]. + Definition znz_gcd_gt x y := Zgcd [|x|] [|y|]. + + Lemma Zgcd_bound : forall a b, 0<=a -> 0<=b -> Zgcd a b <= Zmax a b. + Proof. + intros. + generalize (Zgcd_is_gcd a b); inversion_clear 1. + destruct H2; destruct H3; clear H4. + assert (H3:=Zgcd_is_pos a b). + destruct (Z_eq_dec (Zgcd a b) 0). + rewrite e; generalize (Zmax_spec a b); omega. + assert (0 <= q). + apply Zmult_le_reg_r with (Zgcd a b); auto with zarith. + destruct (Z_eq_dec q 0). + + subst q; simpl in *; subst a; simpl; auto. + generalize (Zmax_spec 0 b) (Zabs_spec b); omega. + + apply Zle_trans with a. + rewrite H1 at 2. + rewrite <- (Zmult_1_l (Zgcd a b)) at 1. + apply Zmult_le_compat; auto with zarith. + generalize (Zmax_spec a b); omega. + Qed. + + Lemma spec_gcd : forall a b, Zis_gcd [|a|] [|b|] [|znz_gcd a b|]. + Proof. + intros; unfold znz_gcd. + generalize (Z_mod_lt a wB wB_pos)(Z_mod_lt b wB wB_pos); intros. + fold [|a|] in *; fold [|b|] in *. + replace ([|Zgcd [|a|] [|b|]|]) with (Zgcd [|a|] [|b|]). + apply Zgcd_is_gcd. + symmetry; apply Zmod_small. + split. + apply Zgcd_is_pos. + apply Zle_lt_trans with (Zmax [|a|] [|b|]). + apply Zgcd_bound; auto with zarith. + generalize (Zmax_spec [|a|] [|b|]); omega. + Qed. + + Lemma spec_gcd_gt : forall a b, [|a|] > [|b|] -> + Zis_gcd [|a|] [|b|] [|znz_gcd_gt a b|]. + Proof. + intros. apply spec_gcd; auto. + Qed. + + Definition znz_div21 a1 a2 b := + Zdiv_eucl ([|a1|]*wB+[|a2|]) [|b|]. + + Lemma spec_div21 : forall a1 a2 b, + wB/2 <= [|b|] -> + [|a1|] < [|b|] -> + let (q,r) := znz_div21 a1 a2 b in + [|a1|] *wB+ [|a2|] = [|q|] * [|b|] + [|r|] /\ + 0 <= [|r|] < [|b|]. + Proof. + intros; unfold znz_div21. + generalize (Z_mod_lt a1 wB wB_pos); fold [|a1|]; intros. + generalize (Z_mod_lt a2 wB wB_pos); fold [|a2|]; intros. + assert ([|b|]>0) by auto with zarith. + remember ([|a1|]*wB+[|a2|]) as a. + assert (Zdiv_eucl a [|b|] = (a/[|b|], a mod [|b|])). + unfold Zmod, Zdiv; destruct Zdiv_eucl; auto. + generalize (Z_div_mod a [|b|] H3). + destruct Zdiv_eucl as (q,r); destruct 1; intros. + injection H4; clear H4; intros. + assert ([|r|]=r). + apply Zmod_small; generalize (Z_mod_lt b wB wB_pos); fold [|b|]; + auto with zarith. + assert ([|q|]=q). + apply Zmod_small. + subst q. + split. + apply Z_div_pos; auto with zarith. + subst a; auto with zarith. + apply Zdiv_lt_upper_bound; auto with zarith. + subst a; auto with zarith. + subst a. + replace (wB*[|b|]) with (([|b|]-1)*wB + wB) by ring. + apply Zlt_le_trans with ([|a1|]*wB+wB); auto with zarith. + rewrite H8, H9; rewrite Zmult_comm; auto with zarith. + Qed. + + Definition znz_add_mul_div p x y := + ([|x|] * (2 ^ [|p|]) + [|y|] / (2 ^ ((Zpos znz_digits) - [|p|]))). + Lemma spec_add_mul_div : forall x y p, + [|p|] <= Zpos znz_digits -> + [| znz_add_mul_div p x y |] = + ([|x|] * (2 ^ [|p|]) + + [|y|] / (2 ^ ((Zpos znz_digits) - [|p|]))) mod wB. + Proof. + intros; unfold znz_add_mul_div; auto. + Qed. + + Definition znz_pos_mod p w := [|w|] mod (2 ^ [|p|]). + Lemma spec_pos_mod : forall w p, + [|znz_pos_mod p w|] = [|w|] mod (2 ^ [|p|]). + Proof. + intros; unfold znz_pos_mod. + apply Zmod_small. + generalize (Z_mod_lt [|w|] (2 ^ [|p|])); intros. + split. + destruct H; auto with zarith. + apply Zle_lt_trans with [|w|]; auto with zarith. + apply Zmod_le; auto with zarith. + Qed. + + Definition znz_is_even x := + if Z_eq_dec ([|x|] mod 2) 0 then true else false. + + Lemma spec_is_even : forall x, + if znz_is_even x then [|x|] mod 2 = 0 else [|x|] mod 2 = 1. + Proof. + intros; unfold znz_is_even; destruct Z_eq_dec; auto. + generalize (Z_mod_lt [|x|] 2); omega. + Qed. + + Definition znz_sqrt x := Zsqrt_plain [|x|]. + Lemma spec_sqrt : forall x, + [|znz_sqrt x|] ^ 2 <= [|x|] < ([|znz_sqrt x|] + 1) ^ 2. + Proof. + intros. + unfold znz_sqrt. + repeat rewrite Zpower_2. + replace [|Zsqrt_plain [|x|]|] with (Zsqrt_plain [|x|]). + apply Zsqrt_interval; auto with zarith. + symmetry; apply Zmod_small. + split. + apply Zsqrt_plain_is_pos; auto with zarith. + + cut (Zsqrt_plain [|x|] <= (wB-1)); try omega. + rewrite <- (Zsqrt_square_id (wB-1)). + apply Zsqrt_le. + split; auto. + apply Zle_trans with (wB-1); auto with zarith. + generalize (spec_to_Z x); auto with zarith. + apply Zsquare_le. + generalize wB_pos; auto with zarith. + Qed. + + Definition znz_sqrt2 x y := + let z := [|x|]*wB+[|y|] in + match z with + | Z0 => (0, C0 0) + | Zpos p => + let (s,r,_,_) := sqrtrempos p in + (s, if Z_lt_le_dec r wB then C0 r else C1 (r-wB)) + | Zneg _ => (0, C0 0) + end. + + Lemma spec_sqrt2 : forall x y, + wB/ 4 <= [|x|] -> + let (s,r) := znz_sqrt2 x y in + [||WW x y||] = [|s|] ^ 2 + [+|r|] /\ + [+|r|] <= 2 * [|s|]. + Proof. + intros; unfold znz_sqrt2. + simpl zn2z_to_Z. + remember ([|x|]*wB+[|y|]) as z. + destruct z. + auto with zarith. + destruct sqrtrempos; intros. + assert (s < wB). + destruct (Z_lt_le_dec s wB); auto. + assert (wB * wB <= Zpos p). + rewrite e. + apply Zle_trans with (s*s); try omega. + apply Zmult_le_compat; generalize wB_pos; auto with zarith. + assert (Zpos p < wB*wB). + rewrite Heqz. + replace (wB*wB) with ((wB-1)*wB+wB) by ring. + apply Zplus_le_lt_compat; auto with zarith. + apply Zmult_le_compat; auto with zarith. + generalize (spec_to_Z x); auto with zarith. + generalize wB_pos; auto with zarith. + omega. + replace [|s|] with s by (symmetry; apply Zmod_small; auto with zarith). + destruct Z_lt_le_dec; unfold interp_carry. + replace [|r|] with r by (symmetry; apply Zmod_small; auto with zarith). + rewrite Zpower_2; auto with zarith. + replace [|r-wB|] with (r-wB) by (symmetry; apply Zmod_small; auto with zarith). + rewrite Zpower_2; omega. + + assert (0<=Zneg p). + rewrite Heqz; generalize wB_pos; auto with zarith. + compute in H0; elim H0; auto. + Qed. + + Lemma two_p_power2 : forall x, x>=0 -> two_p x = 2 ^ x. + Proof. + intros. + unfold two_p. + destruct x; simpl; auto. + apply two_power_pos_correct. + Qed. + + Definition znz_head0 x := match [|x|] with + | Z0 => znz_zdigits + | Zpos p => znz_zdigits - log_inf p - 1 + | _ => 0 + end. + + Lemma spec_head00: forall x, [|x|] = 0 -> [|znz_head0 x|] = Zpos znz_digits. + Proof. + unfold znz_head0; intros. + rewrite H; simpl. + apply spec_zdigits. + Qed. + + Lemma log_inf_bounded : forall x p, Zpos x < 2^p -> log_inf x < p. + Proof. + induction x; simpl; intros. + + assert (0 < p) by (destruct p; compute; auto with zarith; discriminate). + cut (log_inf x < p - 1); [omega| ]. + apply IHx. + change (Zpos x~1) with (2*(Zpos x)+1) in H. + replace p with (Zsucc (p-1)) in H; auto with zarith. + rewrite Zpower_Zsucc in H; auto with zarith. + + assert (0 < p) by (destruct p; compute; auto with zarith; discriminate). + cut (log_inf x < p - 1); [omega| ]. + apply IHx. + change (Zpos x~0) with (2*(Zpos x)) in H. + replace p with (Zsucc (p-1)) in H; auto with zarith. + rewrite Zpower_Zsucc in H; auto with zarith. + + simpl; intros; destruct p; compute; auto with zarith. + Qed. + + + Lemma spec_head0 : forall x, 0 < [|x|] -> + wB/ 2 <= 2 ^ ([|znz_head0 x|]) * [|x|] < wB. + Proof. + intros; unfold znz_head0. + generalize (spec_to_Z x). + destruct [|x|]; try discriminate. + intros. + destruct (log_inf_correct p). + rewrite 2 two_p_power2 in H2; auto with zarith. + assert (0 <= znz_zdigits - log_inf p - 1 < wB). + split. + cut (log_inf p < znz_zdigits); try omega. + unfold znz_zdigits. + unfold wB, base in *. + apply log_inf_bounded; auto with zarith. + apply Zlt_trans with znz_zdigits. + omega. + unfold znz_zdigits, wB, base; apply Zpower2_lt_lin; auto with zarith. + + unfold znz_to_Z; rewrite (Zmod_small _ _ H3). + destruct H2. + split. + apply Zle_trans with (2^(znz_zdigits - log_inf p - 1)*(2^log_inf p)). + apply Zdiv_le_upper_bound; auto with zarith. + rewrite <- Zpower_exp; auto with zarith. + rewrite Zmult_comm; rewrite <- Zpower_Zsucc; auto with zarith. + replace (Zsucc (znz_zdigits - log_inf p -1 +log_inf p)) with znz_zdigits + by ring. + unfold wB, base, znz_zdigits; auto with zarith. + apply Zmult_le_compat; auto with zarith. + + apply Zlt_le_trans + with (2^(znz_zdigits - log_inf p - 1)*(2^(Zsucc (log_inf p)))). + apply Zmult_lt_compat_l; auto with zarith. + rewrite <- Zpower_exp; auto with zarith. + replace (znz_zdigits - log_inf p -1 +Zsucc (log_inf p)) with znz_zdigits + by ring. + unfold wB, base, znz_zdigits; auto with zarith. + Qed. + + Fixpoint Ptail p := match p with + | xO p => (Ptail p)+1 + | _ => 0 + end. + + Lemma Ptail_pos : forall p, 0 <= Ptail p. + Proof. + induction p; simpl; auto with zarith. + Qed. + Hint Resolve Ptail_pos. + + Lemma Ptail_bounded : forall p d, Zpos p < 2^(Zpos d) -> Ptail p < Zpos d. + Proof. + induction p; try (compute; auto; fail). + intros; simpl. + assert (d <> xH). + intro; subst. + compute in H; destruct p; discriminate. + assert (Zsucc (Zpos (Ppred d)) = Zpos d). + simpl; f_equal. + rewrite <- Pplus_one_succ_r. + destruct (Psucc_pred d); auto. + rewrite H1 in H0; elim H0; auto. + assert (Ptail p < Zpos (Ppred d)). + apply IHp. + apply Zmult_lt_reg_r with 2; auto with zarith. + rewrite (Zmult_comm (Zpos p)). + change (2 * Zpos p) with (Zpos p~0). + rewrite Zmult_comm. + rewrite <- Zpower_Zsucc; auto with zarith. + rewrite H1; auto. + rewrite <- H1; omega. + Qed. + + Definition znz_tail0 x := + match [|x|] with + | Z0 => znz_zdigits + | Zpos p => Ptail p + | Zneg _ => 0 + end. + + Lemma spec_tail00: forall x, [|x|] = 0 -> [|znz_tail0 x|] = Zpos znz_digits. + Proof. + unfold znz_tail0; intros. + rewrite H; simpl. + apply spec_zdigits. + Qed. + + Lemma spec_tail0 : forall x, 0 < [|x|] -> + exists y, 0 <= y /\ [|x|] = (2 * y + 1) * (2 ^ [|znz_tail0 x|]). + Proof. + intros; unfold znz_tail0. + generalize (spec_to_Z x). + destruct [|x|]; try discriminate; intros. + assert ([|Ptail p|] = Ptail p). + apply Zmod_small. + split; auto. + unfold wB, base in *. + apply Zlt_trans with (Zpos digits). + apply Ptail_bounded; auto with zarith. + apply Zpower2_lt_lin; auto with zarith. + rewrite H1. + + clear; induction p. + exists (Zpos p); simpl; rewrite Pmult_1_r; auto with zarith. + destruct IHp as (y & Yp & Ye). + exists y. + split; auto. + change (Zpos p~0) with (2*Zpos p). + rewrite Ye. + change (Ptail p~0) with (Zsucc (Ptail p)). + rewrite Zpower_Zsucc; auto; ring. + + exists 0; simpl; auto with zarith. + Qed. + + (** Let's now group everything in two records *) + + Definition zmod_op := mk_znz_op + (znz_digits : positive) + (znz_zdigits: znz) + (znz_to_Z : znz -> Z) + (znz_of_pos : positive -> N * znz) + (znz_head0 : znz -> znz) + (znz_tail0 : znz -> znz) + + (znz_0 : znz) + (znz_1 : znz) + (znz_Bm1 : znz) + + (znz_compare : znz -> znz -> comparison) + (znz_eq0 : znz -> bool) + + (znz_opp_c : znz -> carry znz) + (znz_opp : znz -> znz) + (znz_opp_carry : znz -> znz) + + (znz_succ_c : znz -> carry znz) + (znz_add_c : znz -> znz -> carry znz) + (znz_add_carry_c : znz -> znz -> carry znz) + (znz_succ : znz -> znz) + (znz_add : znz -> znz -> znz) + (znz_add_carry : znz -> znz -> znz) + + (znz_pred_c : znz -> carry znz) + (znz_sub_c : znz -> znz -> carry znz) + (znz_sub_carry_c : znz -> znz -> carry znz) + (znz_pred : znz -> znz) + (znz_sub : znz -> znz -> znz) + (znz_sub_carry : znz -> znz -> znz) + + (znz_mul_c : znz -> znz -> zn2z znz) + (znz_mul : znz -> znz -> znz) + (znz_square_c : znz -> zn2z znz) + + (znz_div21 : znz -> znz -> znz -> znz*znz) + (znz_div_gt : znz -> znz -> znz * znz) + (znz_div : znz -> znz -> znz * znz) + + (znz_mod_gt : znz -> znz -> znz) + (znz_mod : znz -> znz -> znz) + + (znz_gcd_gt : znz -> znz -> znz) + (znz_gcd : znz -> znz -> znz) + (znz_add_mul_div : znz -> znz -> znz -> znz) + (znz_pos_mod : znz -> znz -> znz) + + (znz_is_even : znz -> bool) + (znz_sqrt2 : znz -> znz -> znz * carry znz) + (znz_sqrt : znz -> znz). + + Definition zmod_spec := mk_znz_spec zmod_op + spec_to_Z + spec_of_pos + spec_zdigits + spec_more_than_1_digit + + spec_0 + spec_1 + spec_Bm1 + + spec_compare + spec_eq0 + + spec_opp_c + spec_opp + spec_opp_carry + + spec_succ_c + spec_add_c + spec_add_carry_c + spec_succ + spec_add + spec_add_carry + + spec_pred_c + spec_sub_c + spec_sub_carry_c + spec_pred + spec_sub + spec_sub_carry + + spec_mul_c + spec_mul + spec_square_c + + spec_div21 + spec_div_gt + spec_div + + spec_mod_gt + spec_mod + + spec_gcd_gt + spec_gcd + + spec_head00 + spec_head0 + spec_tail00 + spec_tail0 + + spec_add_mul_div + spec_pos_mod + + spec_is_even + spec_sqrt2 + spec_sqrt. + +End ZModulo. + +(** A modular version of the previous construction. *) + +Module Type PositiveNotOne. + Parameter p : positive. + Axiom not_one : p<> 1%positive. +End PositiveNotOne. + +Module ZModuloCyclicType (P:PositiveNotOne) <: CyclicType. + Definition w := Z. + Definition w_op := zmod_op P.p. + Definition w_spec := zmod_spec P.not_one. +End ZModuloCyclicType. + diff --git a/theories/Numbers/Integer/Abstract/ZAdd.v b/theories/Numbers/Integer/Abstract/ZAdd.v new file mode 100644 index 00000000..df941d90 --- /dev/null +++ b/theories/Numbers/Integer/Abstract/ZAdd.v @@ -0,0 +1,345 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* forall m1 m2 : Z, m1 == m2 -> n1 + m1 == n2 + m2. +Proof NZadd_wd. + +Theorem Zadd_0_l : forall n : Z, 0 + n == n. +Proof NZadd_0_l. + +Theorem Zadd_succ_l : forall n m : Z, (S n) + m == S (n + m). +Proof NZadd_succ_l. + +Theorem Zsub_0_r : forall n : Z, n - 0 == n. +Proof NZsub_0_r. + +Theorem Zsub_succ_r : forall n m : Z, n - (S m) == P (n - m). +Proof NZsub_succ_r. + +Theorem Zopp_0 : - 0 == 0. +Proof Zopp_0. + +Theorem Zopp_succ : forall n : Z, - (S n) == P (- n). +Proof Zopp_succ. + +(* Theorems that are valid for both natural numbers and integers *) + +Theorem Zadd_0_r : forall n : Z, n + 0 == n. +Proof NZadd_0_r. + +Theorem Zadd_succ_r : forall n m : Z, n + S m == S (n + m). +Proof NZadd_succ_r. + +Theorem Zadd_comm : forall n m : Z, n + m == m + n. +Proof NZadd_comm. + +Theorem Zadd_assoc : forall n m p : Z, n + (m + p) == (n + m) + p. +Proof NZadd_assoc. + +Theorem Zadd_shuffle1 : forall n m p q : Z, (n + m) + (p + q) == (n + p) + (m + q). +Proof NZadd_shuffle1. + +Theorem Zadd_shuffle2 : forall n m p q : Z, (n + m) + (p + q) == (n + q) + (m + p). +Proof NZadd_shuffle2. + +Theorem Zadd_1_l : forall n : Z, 1 + n == S n. +Proof NZadd_1_l. + +Theorem Zadd_1_r : forall n : Z, n + 1 == S n. +Proof NZadd_1_r. + +Theorem Zadd_cancel_l : forall n m p : Z, p + n == p + m <-> n == m. +Proof NZadd_cancel_l. + +Theorem Zadd_cancel_r : forall n m p : Z, n + p == m + p <-> n == m. +Proof NZadd_cancel_r. + +(* Theorems that are either not valid on N or have different proofs on N and Z *) + +Theorem Zadd_pred_l : forall n m : Z, P n + m == P (n + m). +Proof. +intros n m. +rewrite <- (Zsucc_pred n) at 2. +rewrite Zadd_succ_l. now rewrite Zpred_succ. +Qed. + +Theorem Zadd_pred_r : forall n m : Z, n + P m == P (n + m). +Proof. +intros n m; rewrite (Zadd_comm n (P m)), (Zadd_comm n m); +apply Zadd_pred_l. +Qed. + +Theorem Zadd_opp_r : forall n m : Z, n + (- m) == n - m. +Proof. +NZinduct m. +rewrite Zopp_0; rewrite Zsub_0_r; now rewrite Zadd_0_r. +intro m. rewrite Zopp_succ, Zsub_succ_r, Zadd_pred_r; now rewrite Zpred_inj_wd. +Qed. + +Theorem Zsub_0_l : forall n : Z, 0 - n == - n. +Proof. +intro n; rewrite <- Zadd_opp_r; now rewrite Zadd_0_l. +Qed. + +Theorem Zsub_succ_l : forall n m : Z, S n - m == S (n - m). +Proof. +intros n m; do 2 rewrite <- Zadd_opp_r; now rewrite Zadd_succ_l. +Qed. + +Theorem Zsub_pred_l : forall n m : Z, P n - m == P (n - m). +Proof. +intros n m. rewrite <- (Zsucc_pred n) at 2. +rewrite Zsub_succ_l; now rewrite Zpred_succ. +Qed. + +Theorem Zsub_pred_r : forall n m : Z, n - (P m) == S (n - m). +Proof. +intros n m. rewrite <- (Zsucc_pred m) at 2. +rewrite Zsub_succ_r; now rewrite Zsucc_pred. +Qed. + +Theorem Zopp_pred : forall n : Z, - (P n) == S (- n). +Proof. +intro n. rewrite <- (Zsucc_pred n) at 2. +rewrite Zopp_succ. now rewrite Zsucc_pred. +Qed. + +Theorem Zsub_diag : forall n : Z, n - n == 0. +Proof. +NZinduct n. +now rewrite Zsub_0_r. +intro n. rewrite Zsub_succ_r, Zsub_succ_l; now rewrite Zpred_succ. +Qed. + +Theorem Zadd_opp_diag_l : forall n : Z, - n + n == 0. +Proof. +intro n; now rewrite Zadd_comm, Zadd_opp_r, Zsub_diag. +Qed. + +Theorem Zadd_opp_diag_r : forall n : Z, n + (- n) == 0. +Proof. +intro n; rewrite Zadd_comm; apply Zadd_opp_diag_l. +Qed. + +Theorem Zadd_opp_l : forall n m : Z, - m + n == n - m. +Proof. +intros n m; rewrite <- Zadd_opp_r; now rewrite Zadd_comm. +Qed. + +Theorem Zadd_sub_assoc : forall n m p : Z, n + (m - p) == (n + m) - p. +Proof. +intros n m p; do 2 rewrite <- Zadd_opp_r; now rewrite Zadd_assoc. +Qed. + +Theorem Zopp_involutive : forall n : Z, - (- n) == n. +Proof. +NZinduct n. +now do 2 rewrite Zopp_0. +intro n. rewrite Zopp_succ, Zopp_pred; now rewrite Zsucc_inj_wd. +Qed. + +Theorem Zopp_add_distr : forall n m : Z, - (n + m) == - n + (- m). +Proof. +intros n m; NZinduct n. +rewrite Zopp_0; now do 2 rewrite Zadd_0_l. +intro n. rewrite Zadd_succ_l; do 2 rewrite Zopp_succ; rewrite Zadd_pred_l. +now rewrite Zpred_inj_wd. +Qed. + +Theorem Zopp_sub_distr : forall n m : Z, - (n - m) == - n + m. +Proof. +intros n m; rewrite <- Zadd_opp_r, Zopp_add_distr. +now rewrite Zopp_involutive. +Qed. + +Theorem Zopp_inj : forall n m : Z, - n == - m -> n == m. +Proof. +intros n m H. apply Zopp_wd in H. now do 2 rewrite Zopp_involutive in H. +Qed. + +Theorem Zopp_inj_wd : forall n m : Z, - n == - m <-> n == m. +Proof. +intros n m; split; [apply Zopp_inj | apply Zopp_wd]. +Qed. + +Theorem Zeq_opp_l : forall n m : Z, - n == m <-> n == - m. +Proof. +intros n m. now rewrite <- (Zopp_inj_wd (- n) m), Zopp_involutive. +Qed. + +Theorem Zeq_opp_r : forall n m : Z, n == - m <-> - n == m. +Proof. +symmetry; apply Zeq_opp_l. +Qed. + +Theorem Zsub_add_distr : forall n m p : Z, n - (m + p) == (n - m) - p. +Proof. +intros n m p; rewrite <- Zadd_opp_r, Zopp_add_distr, Zadd_assoc. +now do 2 rewrite Zadd_opp_r. +Qed. + +Theorem Zsub_sub_distr : forall n m p : Z, n - (m - p) == (n - m) + p. +Proof. +intros n m p; rewrite <- Zadd_opp_r, Zopp_sub_distr, Zadd_assoc. +now rewrite Zadd_opp_r. +Qed. + +Theorem sub_opp_l : forall n m : Z, - n - m == - m - n. +Proof. +intros n m. do 2 rewrite <- Zadd_opp_r. now rewrite Zadd_comm. +Qed. + +Theorem Zsub_opp_r : forall n m : Z, n - (- m) == n + m. +Proof. +intros n m; rewrite <- Zadd_opp_r; now rewrite Zopp_involutive. +Qed. + +Theorem Zadd_sub_swap : forall n m p : Z, n + m - p == n - p + m. +Proof. +intros n m p. rewrite <- Zadd_sub_assoc, <- (Zadd_opp_r n p), <- Zadd_assoc. +now rewrite Zadd_opp_l. +Qed. + +Theorem Zsub_cancel_l : forall n m p : Z, n - m == n - p <-> m == p. +Proof. +intros n m p. rewrite <- (Zadd_cancel_l (n - m) (n - p) (- n)). +do 2 rewrite Zadd_sub_assoc. rewrite Zadd_opp_diag_l; do 2 rewrite Zsub_0_l. +apply Zopp_inj_wd. +Qed. + +Theorem Zsub_cancel_r : forall n m p : Z, n - p == m - p <-> n == m. +Proof. +intros n m p. +stepl (n - p + p == m - p + p) by apply Zadd_cancel_r. +now do 2 rewrite <- Zsub_sub_distr, Zsub_diag, Zsub_0_r. +Qed. + +(* The next several theorems are devoted to moving terms from one side of +an equation to the other. The name contains the operation in the original +equation (add or sub) and the indication whether the left or right term +is moved. *) + +Theorem Zadd_move_l : forall n m p : Z, n + m == p <-> m == p - n. +Proof. +intros n m p. +stepl (n + m - n == p - n) by apply Zsub_cancel_r. +now rewrite Zadd_comm, <- Zadd_sub_assoc, Zsub_diag, Zadd_0_r. +Qed. + +Theorem Zadd_move_r : forall n m p : Z, n + m == p <-> n == p - m. +Proof. +intros n m p; rewrite Zadd_comm; now apply Zadd_move_l. +Qed. + +(* The two theorems above do not allow rewriting subformulas of the form +n - m == p to n == p + m since subtraction is in the right-hand side of +the equation. Hence the following two theorems. *) + +Theorem Zsub_move_l : forall n m p : Z, n - m == p <-> - m == p - n. +Proof. +intros n m p; rewrite <- (Zadd_opp_r n m); apply Zadd_move_l. +Qed. + +Theorem Zsub_move_r : forall n m p : Z, n - m == p <-> n == p + m. +Proof. +intros n m p; rewrite <- (Zadd_opp_r n m). now rewrite Zadd_move_r, Zsub_opp_r. +Qed. + +Theorem Zadd_move_0_l : forall n m : Z, n + m == 0 <-> m == - n. +Proof. +intros n m; now rewrite Zadd_move_l, Zsub_0_l. +Qed. + +Theorem Zadd_move_0_r : forall n m : Z, n + m == 0 <-> n == - m. +Proof. +intros n m; now rewrite Zadd_move_r, Zsub_0_l. +Qed. + +Theorem Zsub_move_0_l : forall n m : Z, n - m == 0 <-> - m == - n. +Proof. +intros n m. now rewrite Zsub_move_l, Zsub_0_l. +Qed. + +Theorem Zsub_move_0_r : forall n m : Z, n - m == 0 <-> n == m. +Proof. +intros n m. now rewrite Zsub_move_r, Zadd_0_l. +Qed. + +(* The following section is devoted to cancellation of like terms. The name +includes the first operator and the position of the term being canceled. *) + +Theorem Zadd_simpl_l : forall n m : Z, n + m - n == m. +Proof. +intros; now rewrite Zadd_sub_swap, Zsub_diag, Zadd_0_l. +Qed. + +Theorem Zadd_simpl_r : forall n m : Z, n + m - m == n. +Proof. +intros; now rewrite <- Zadd_sub_assoc, Zsub_diag, Zadd_0_r. +Qed. + +Theorem Zsub_simpl_l : forall n m : Z, - n - m + n == - m. +Proof. +intros; now rewrite <- Zadd_sub_swap, Zadd_opp_diag_l, Zsub_0_l. +Qed. + +Theorem Zsub_simpl_r : forall n m : Z, n - m + m == n. +Proof. +intros; now rewrite <- Zsub_sub_distr, Zsub_diag, Zsub_0_r. +Qed. + +(* Now we have two sums or differences; the name includes the two operators +and the position of the terms being canceled *) + +Theorem Zadd_add_simpl_l_l : forall n m p : Z, (n + m) - (n + p) == m - p. +Proof. +intros n m p. now rewrite (Zadd_comm n m), <- Zadd_sub_assoc, +Zsub_add_distr, Zsub_diag, Zsub_0_l, Zadd_opp_r. +Qed. + +Theorem Zadd_add_simpl_l_r : forall n m p : Z, (n + m) - (p + n) == m - p. +Proof. +intros n m p. rewrite (Zadd_comm p n); apply Zadd_add_simpl_l_l. +Qed. + +Theorem Zadd_add_simpl_r_l : forall n m p : Z, (n + m) - (m + p) == n - p. +Proof. +intros n m p. rewrite (Zadd_comm n m); apply Zadd_add_simpl_l_l. +Qed. + +Theorem Zadd_add_simpl_r_r : forall n m p : Z, (n + m) - (p + m) == n - p. +Proof. +intros n m p. rewrite (Zadd_comm p m); apply Zadd_add_simpl_r_l. +Qed. + +Theorem Zsub_add_simpl_r_l : forall n m p : Z, (n - m) + (m + p) == n + p. +Proof. +intros n m p. now rewrite <- Zsub_sub_distr, Zsub_add_distr, Zsub_diag, +Zsub_0_l, Zsub_opp_r. +Qed. + +Theorem Zsub_add_simpl_r_r : forall n m p : Z, (n - m) + (p + m) == n + p. +Proof. +intros n m p. rewrite (Zadd_comm p m); apply Zsub_add_simpl_r_l. +Qed. + +(* Of course, there are many other variants *) + +End ZAddPropFunct. + diff --git a/theories/Numbers/Integer/Abstract/ZAddOrder.v b/theories/Numbers/Integer/Abstract/ZAddOrder.v new file mode 100644 index 00000000..101ea634 --- /dev/null +++ b/theories/Numbers/Integer/Abstract/ZAddOrder.v @@ -0,0 +1,373 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* p + n < p + m. +Proof NZadd_lt_mono_l. + +Theorem Zadd_lt_mono_r : forall n m p : Z, n < m <-> n + p < m + p. +Proof NZadd_lt_mono_r. + +Theorem Zadd_lt_mono : forall n m p q : Z, n < m -> p < q -> n + p < m + q. +Proof NZadd_lt_mono. + +Theorem Zadd_le_mono_l : forall n m p : Z, n <= m <-> p + n <= p + m. +Proof NZadd_le_mono_l. + +Theorem Zadd_le_mono_r : forall n m p : Z, n <= m <-> n + p <= m + p. +Proof NZadd_le_mono_r. + +Theorem Zadd_le_mono : forall n m p q : Z, n <= m -> p <= q -> n + p <= m + q. +Proof NZadd_le_mono. + +Theorem Zadd_lt_le_mono : forall n m p q : Z, n < m -> p <= q -> n + p < m + q. +Proof NZadd_lt_le_mono. + +Theorem Zadd_le_lt_mono : forall n m p q : Z, n <= m -> p < q -> n + p < m + q. +Proof NZadd_le_lt_mono. + +Theorem Zadd_pos_pos : forall n m : Z, 0 < n -> 0 < m -> 0 < n + m. +Proof NZadd_pos_pos. + +Theorem Zadd_pos_nonneg : forall n m : Z, 0 < n -> 0 <= m -> 0 < n + m. +Proof NZadd_pos_nonneg. + +Theorem Zadd_nonneg_pos : forall n m : Z, 0 <= n -> 0 < m -> 0 < n + m. +Proof NZadd_nonneg_pos. + +Theorem Zadd_nonneg_nonneg : forall n m : Z, 0 <= n -> 0 <= m -> 0 <= n + m. +Proof NZadd_nonneg_nonneg. + +Theorem Zlt_add_pos_l : forall n m : Z, 0 < n -> m < n + m. +Proof NZlt_add_pos_l. + +Theorem Zlt_add_pos_r : forall n m : Z, 0 < n -> m < m + n. +Proof NZlt_add_pos_r. + +Theorem Zle_lt_add_lt : forall n m p q : Z, n <= m -> p + m < q + n -> p < q. +Proof NZle_lt_add_lt. + +Theorem Zlt_le_add_lt : forall n m p q : Z, n < m -> p + m <= q + n -> p < q. +Proof NZlt_le_add_lt. + +Theorem Zle_le_add_le : forall n m p q : Z, n <= m -> p + m <= q + n -> p <= q. +Proof NZle_le_add_le. + +Theorem Zadd_lt_cases : forall n m p q : Z, n + m < p + q -> n < p \/ m < q. +Proof NZadd_lt_cases. + +Theorem Zadd_le_cases : forall n m p q : Z, n + m <= p + q -> n <= p \/ m <= q. +Proof NZadd_le_cases. + +Theorem Zadd_neg_cases : forall n m : Z, n + m < 0 -> n < 0 \/ m < 0. +Proof NZadd_neg_cases. + +Theorem Zadd_pos_cases : forall n m : Z, 0 < n + m -> 0 < n \/ 0 < m. +Proof NZadd_pos_cases. + +Theorem Zadd_nonpos_cases : forall n m : Z, n + m <= 0 -> n <= 0 \/ m <= 0. +Proof NZadd_nonpos_cases. + +Theorem Zadd_nonneg_cases : forall n m : Z, 0 <= n + m -> 0 <= n \/ 0 <= m. +Proof NZadd_nonneg_cases. + +(* Theorems that are either not valid on N or have different proofs on N and Z *) + +Theorem Zadd_neg_neg : forall n m : Z, n < 0 -> m < 0 -> n + m < 0. +Proof. +intros n m H1 H2. rewrite <- (Zadd_0_l 0). now apply Zadd_lt_mono. +Qed. + +Theorem Zadd_neg_nonpos : forall n m : Z, n < 0 -> m <= 0 -> n + m < 0. +Proof. +intros n m H1 H2. rewrite <- (Zadd_0_l 0). now apply Zadd_lt_le_mono. +Qed. + +Theorem Zadd_nonpos_neg : forall n m : Z, n <= 0 -> m < 0 -> n + m < 0. +Proof. +intros n m H1 H2. rewrite <- (Zadd_0_l 0). now apply Zadd_le_lt_mono. +Qed. + +Theorem Zadd_nonpos_nonpos : forall n m : Z, n <= 0 -> m <= 0 -> n + m <= 0. +Proof. +intros n m H1 H2. rewrite <- (Zadd_0_l 0). now apply Zadd_le_mono. +Qed. + +(** Sub and order *) + +Theorem Zlt_0_sub : forall n m : Z, 0 < m - n <-> n < m. +Proof. +intros n m. stepl (0 + n < m - n + n) by symmetry; apply Zadd_lt_mono_r. +rewrite Zadd_0_l; now rewrite Zsub_simpl_r. +Qed. + +Notation Zsub_pos := Zlt_0_sub (only parsing). + +Theorem Zle_0_sub : forall n m : Z, 0 <= m - n <-> n <= m. +Proof. +intros n m; stepl (0 + n <= m - n + n) by symmetry; apply Zadd_le_mono_r. +rewrite Zadd_0_l; now rewrite Zsub_simpl_r. +Qed. + +Notation Zsub_nonneg := Zle_0_sub (only parsing). + +Theorem Zlt_sub_0 : forall n m : Z, n - m < 0 <-> n < m. +Proof. +intros n m. stepl (n - m + m < 0 + m) by symmetry; apply Zadd_lt_mono_r. +rewrite Zadd_0_l; now rewrite Zsub_simpl_r. +Qed. + +Notation Zsub_neg := Zlt_sub_0 (only parsing). + +Theorem Zle_sub_0 : forall n m : Z, n - m <= 0 <-> n <= m. +Proof. +intros n m. stepl (n - m + m <= 0 + m) by symmetry; apply Zadd_le_mono_r. +rewrite Zadd_0_l; now rewrite Zsub_simpl_r. +Qed. + +Notation Zsub_nonpos := Zle_sub_0 (only parsing). + +Theorem Zopp_lt_mono : forall n m : Z, n < m <-> - m < - n. +Proof. +intros n m. stepr (m + - m < m + - n) by symmetry; apply Zadd_lt_mono_l. +do 2 rewrite Zadd_opp_r. rewrite Zsub_diag. symmetry; apply Zlt_0_sub. +Qed. + +Theorem Zopp_le_mono : forall n m : Z, n <= m <-> - m <= - n. +Proof. +intros n m. stepr (m + - m <= m + - n) by symmetry; apply Zadd_le_mono_l. +do 2 rewrite Zadd_opp_r. rewrite Zsub_diag. symmetry; apply Zle_0_sub. +Qed. + +Theorem Zopp_pos_neg : forall n : Z, 0 < - n <-> n < 0. +Proof. +intro n; rewrite (Zopp_lt_mono n 0); now rewrite Zopp_0. +Qed. + +Theorem Zopp_neg_pos : forall n : Z, - n < 0 <-> 0 < n. +Proof. +intro n. rewrite (Zopp_lt_mono 0 n). now rewrite Zopp_0. +Qed. + +Theorem Zopp_nonneg_nonpos : forall n : Z, 0 <= - n <-> n <= 0. +Proof. +intro n; rewrite (Zopp_le_mono n 0); now rewrite Zopp_0. +Qed. + +Theorem Zopp_nonpos_nonneg : forall n : Z, - n <= 0 <-> 0 <= n. +Proof. +intro n. rewrite (Zopp_le_mono 0 n). now rewrite Zopp_0. +Qed. + +Theorem Zsub_lt_mono_l : forall n m p : Z, n < m <-> p - m < p - n. +Proof. +intros n m p. do 2 rewrite <- Zadd_opp_r. rewrite <- Zadd_lt_mono_l. +apply Zopp_lt_mono. +Qed. + +Theorem Zsub_lt_mono_r : forall n m p : Z, n < m <-> n - p < m - p. +Proof. +intros n m p; do 2 rewrite <- Zadd_opp_r; apply Zadd_lt_mono_r. +Qed. + +Theorem Zsub_lt_mono : forall n m p q : Z, n < m -> q < p -> n - p < m - q. +Proof. +intros n m p q H1 H2. +apply NZlt_trans with (m - p); +[now apply -> Zsub_lt_mono_r | now apply -> Zsub_lt_mono_l]. +Qed. + +Theorem Zsub_le_mono_l : forall n m p : Z, n <= m <-> p - m <= p - n. +Proof. +intros n m p; do 2 rewrite <- Zadd_opp_r; rewrite <- Zadd_le_mono_l; +apply Zopp_le_mono. +Qed. + +Theorem Zsub_le_mono_r : forall n m p : Z, n <= m <-> n - p <= m - p. +Proof. +intros n m p; do 2 rewrite <- Zadd_opp_r; apply Zadd_le_mono_r. +Qed. + +Theorem Zsub_le_mono : forall n m p q : Z, n <= m -> q <= p -> n - p <= m - q. +Proof. +intros n m p q H1 H2. +apply NZle_trans with (m - p); +[now apply -> Zsub_le_mono_r | now apply -> Zsub_le_mono_l]. +Qed. + +Theorem Zsub_lt_le_mono : forall n m p q : Z, n < m -> q <= p -> n - p < m - q. +Proof. +intros n m p q H1 H2. +apply NZlt_le_trans with (m - p); +[now apply -> Zsub_lt_mono_r | now apply -> Zsub_le_mono_l]. +Qed. + +Theorem Zsub_le_lt_mono : forall n m p q : Z, n <= m -> q < p -> n - p < m - q. +Proof. +intros n m p q H1 H2. +apply NZle_lt_trans with (m - p); +[now apply -> Zsub_le_mono_r | now apply -> Zsub_lt_mono_l]. +Qed. + +Theorem Zle_lt_sub_lt : forall n m p q : Z, n <= m -> p - n < q - m -> p < q. +Proof. +intros n m p q H1 H2. apply (Zle_lt_add_lt (- m) (- n)); +[now apply -> Zopp_le_mono | now do 2 rewrite Zadd_opp_r]. +Qed. + +Theorem Zlt_le_sub_lt : forall n m p q : Z, n < m -> p - n <= q - m -> p < q. +Proof. +intros n m p q H1 H2. apply (Zlt_le_add_lt (- m) (- n)); +[now apply -> Zopp_lt_mono | now do 2 rewrite Zadd_opp_r]. +Qed. + +Theorem Zle_le_sub_lt : forall n m p q : Z, n <= m -> p - n <= q - m -> p <= q. +Proof. +intros n m p q H1 H2. apply (Zle_le_add_le (- m) (- n)); +[now apply -> Zopp_le_mono | now do 2 rewrite Zadd_opp_r]. +Qed. + +Theorem Zlt_add_lt_sub_r : forall n m p : Z, n + p < m <-> n < m - p. +Proof. +intros n m p. stepl (n + p - p < m - p) by symmetry; apply Zsub_lt_mono_r. +now rewrite Zadd_simpl_r. +Qed. + +Theorem Zle_add_le_sub_r : forall n m p : Z, n + p <= m <-> n <= m - p. +Proof. +intros n m p. stepl (n + p - p <= m - p) by symmetry; apply Zsub_le_mono_r. +now rewrite Zadd_simpl_r. +Qed. + +Theorem Zlt_add_lt_sub_l : forall n m p : Z, n + p < m <-> p < m - n. +Proof. +intros n m p. rewrite Zadd_comm; apply Zlt_add_lt_sub_r. +Qed. + +Theorem Zle_add_le_sub_l : forall n m p : Z, n + p <= m <-> p <= m - n. +Proof. +intros n m p. rewrite Zadd_comm; apply Zle_add_le_sub_r. +Qed. + +Theorem Zlt_sub_lt_add_r : forall n m p : Z, n - p < m <-> n < m + p. +Proof. +intros n m p. stepl (n - p + p < m + p) by symmetry; apply Zadd_lt_mono_r. +now rewrite Zsub_simpl_r. +Qed. + +Theorem Zle_sub_le_add_r : forall n m p : Z, n - p <= m <-> n <= m + p. +Proof. +intros n m p. stepl (n - p + p <= m + p) by symmetry; apply Zadd_le_mono_r. +now rewrite Zsub_simpl_r. +Qed. + +Theorem Zlt_sub_lt_add_l : forall n m p : Z, n - m < p <-> n < m + p. +Proof. +intros n m p. rewrite Zadd_comm; apply Zlt_sub_lt_add_r. +Qed. + +Theorem Zle_sub_le_add_l : forall n m p : Z, n - m <= p <-> n <= m + p. +Proof. +intros n m p. rewrite Zadd_comm; apply Zle_sub_le_add_r. +Qed. + +Theorem Zlt_sub_lt_add : forall n m p q : Z, n - m < p - q <-> n + q < m + p. +Proof. +intros n m p q. rewrite Zlt_sub_lt_add_l. rewrite Zadd_sub_assoc. +now rewrite <- Zlt_add_lt_sub_r. +Qed. + +Theorem Zle_sub_le_add : forall n m p q : Z, n - m <= p - q <-> n + q <= m + p. +Proof. +intros n m p q. rewrite Zle_sub_le_add_l. rewrite Zadd_sub_assoc. +now rewrite <- Zle_add_le_sub_r. +Qed. + +Theorem Zlt_sub_pos : forall n m : Z, 0 < m <-> n - m < n. +Proof. +intros n m. stepr (n - m < n - 0) by now rewrite Zsub_0_r. apply Zsub_lt_mono_l. +Qed. + +Theorem Zle_sub_nonneg : forall n m : Z, 0 <= m <-> n - m <= n. +Proof. +intros n m. stepr (n - m <= n - 0) by now rewrite Zsub_0_r. apply Zsub_le_mono_l. +Qed. + +Theorem Zsub_lt_cases : forall n m p q : Z, n - m < p - q -> n < m \/ q < p. +Proof. +intros n m p q H. rewrite Zlt_sub_lt_add in H. now apply Zadd_lt_cases. +Qed. + +Theorem Zsub_le_cases : forall n m p q : Z, n - m <= p - q -> n <= m \/ q <= p. +Proof. +intros n m p q H. rewrite Zle_sub_le_add in H. now apply Zadd_le_cases. +Qed. + +Theorem Zsub_neg_cases : forall n m : Z, n - m < 0 -> n < 0 \/ 0 < m. +Proof. +intros n m H; rewrite <- Zadd_opp_r in H. +setoid_replace (0 < m) with (- m < 0) using relation iff by (symmetry; apply Zopp_neg_pos). +now apply Zadd_neg_cases. +Qed. + +Theorem Zsub_pos_cases : forall n m : Z, 0 < n - m -> 0 < n \/ m < 0. +Proof. +intros n m H; rewrite <- Zadd_opp_r in H. +setoid_replace (m < 0) with (0 < - m) using relation iff by (symmetry; apply Zopp_pos_neg). +now apply Zadd_pos_cases. +Qed. + +Theorem Zsub_nonpos_cases : forall n m : Z, n - m <= 0 -> n <= 0 \/ 0 <= m. +Proof. +intros n m H; rewrite <- Zadd_opp_r in H. +setoid_replace (0 <= m) with (- m <= 0) using relation iff by (symmetry; apply Zopp_nonpos_nonneg). +now apply Zadd_nonpos_cases. +Qed. + +Theorem Zsub_nonneg_cases : forall n m : Z, 0 <= n - m -> 0 <= n \/ m <= 0. +Proof. +intros n m H; rewrite <- Zadd_opp_r in H. +setoid_replace (m <= 0) with (0 <= - m) using relation iff by (symmetry; apply Zopp_nonneg_nonpos). +now apply Zadd_nonneg_cases. +Qed. + +Section PosNeg. + +Variable P : Z -> Prop. +Hypothesis P_wd : predicate_wd Zeq P. + +Add Morphism P with signature Zeq ==> iff as P_morph. Proof. exact P_wd. Qed. + +Theorem Z0_pos_neg : + P 0 -> (forall n : Z, 0 < n -> P n /\ P (- n)) -> forall n : Z, P n. +Proof. +intros H1 H2 n. destruct (Zlt_trichotomy n 0) as [H3 | [H3 | H3]]. +apply <- Zopp_pos_neg in H3. apply H2 in H3. destruct H3 as [_ H3]. +now rewrite Zopp_involutive in H3. +now rewrite H3. +apply H2 in H3; now destruct H3. +Qed. + +End PosNeg. + +Ltac Z0_pos_neg n := induction_maker n ltac:(apply Z0_pos_neg). + +End ZAddOrderPropFunct. + + diff --git a/theories/Numbers/Integer/Abstract/ZAxioms.v b/theories/Numbers/Integer/Abstract/ZAxioms.v new file mode 100644 index 00000000..c4a4b6b8 --- /dev/null +++ b/theories/Numbers/Integer/Abstract/ZAxioms.v @@ -0,0 +1,65 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* y" := (NZlt y x) (only parsing) : IntScope. +Notation "x >= y" := (NZle y x) (only parsing) : IntScope. + +Parameter Zopp : Z -> Z. + +(*Notation "- 1" := (Zopp 1) : IntScope. +Check (-1).*) + +Add Morphism Zopp with signature Zeq ==> Zeq as Zopp_wd. + +Notation "- x" := (Zopp x) (at level 35, right associativity) : IntScope. +Notation "- 1" := (Zopp (NZsucc NZ0)) : IntScope. + +Open Local Scope IntScope. + +(* Integers are obtained by postulating that every number has a predecessor *) +Axiom Zsucc_pred : forall n : Z, S (P n) == n. + +Axiom Zopp_0 : - 0 == 0. +Axiom Zopp_succ : forall n : Z, - (S n) == P (- n). + +End ZAxiomsSig. + diff --git a/theories/Numbers/Integer/Abstract/ZBase.v b/theories/Numbers/Integer/Abstract/ZBase.v new file mode 100644 index 00000000..29e18548 --- /dev/null +++ b/theories/Numbers/Integer/Abstract/ZBase.v @@ -0,0 +1,86 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* S n1 == S n2. +Proof NZsucc_wd. + +Theorem Zpred_wd : forall n1 n2 : Z, n1 == n2 -> P n1 == P n2. +Proof NZpred_wd. + +Theorem Zpred_succ : forall n : Z, P (S n) == n. +Proof NZpred_succ. + +Theorem Zeq_refl : forall n : Z, n == n. +Proof (proj1 NZeq_equiv). + +Theorem Zeq_symm : forall n m : Z, n == m -> m == n. +Proof (proj2 (proj2 NZeq_equiv)). + +Theorem Zeq_trans : forall n m p : Z, n == m -> m == p -> n == p. +Proof (proj1 (proj2 NZeq_equiv)). + +Theorem Zneq_symm : forall n m : Z, n ~= m -> m ~= n. +Proof NZneq_symm. + +Theorem Zsucc_inj : forall n1 n2 : Z, S n1 == S n2 -> n1 == n2. +Proof NZsucc_inj. + +Theorem Zsucc_inj_wd : forall n1 n2 : Z, S n1 == S n2 <-> n1 == n2. +Proof NZsucc_inj_wd. + +Theorem Zsucc_inj_wd_neg : forall n m : Z, S n ~= S m <-> n ~= m. +Proof NZsucc_inj_wd_neg. + +(* Decidability and stability of equality was proved only in NZOrder, but +since it does not mention order, we'll put it here *) + +Theorem Zeq_dec : forall n m : Z, decidable (n == m). +Proof NZeq_dec. + +Theorem Zeq_dne : forall n m : Z, ~ ~ n == m <-> n == m. +Proof NZeq_dne. + +Theorem Zcentral_induction : +forall A : Z -> Prop, predicate_wd Zeq A -> + forall z : Z, A z -> + (forall n : Z, A n <-> A (S n)) -> + forall n : Z, A n. +Proof NZcentral_induction. + +(* Theorems that are true for integers but not for natural numbers *) + +Theorem Zpred_inj : forall n m : Z, P n == P m -> n == m. +Proof. +intros n m H. apply NZsucc_wd in H. now do 2 rewrite Zsucc_pred in H. +Qed. + +Theorem Zpred_inj_wd : forall n1 n2 : Z, P n1 == P n2 <-> n1 == n2. +Proof. +intros n1 n2; split; [apply Zpred_inj | apply NZpred_wd]. +Qed. + +End ZBasePropFunct. + diff --git a/theories/Numbers/Integer/Abstract/ZDomain.v b/theories/Numbers/Integer/Abstract/ZDomain.v new file mode 100644 index 00000000..15beb2b9 --- /dev/null +++ b/theories/Numbers/Integer/Abstract/ZDomain.v @@ -0,0 +1,69 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Z -> Prop. +Parameter Inline e : Z -> Z -> bool. + +Axiom eq_equiv_e : forall x y : Z, Zeq x y <-> e x y. +Axiom eq_equiv : equiv Z Zeq. + +Add Relation Z Zeq + reflexivity proved by (proj1 eq_equiv) + symmetry proved by (proj2 (proj2 eq_equiv)) + transitivity proved by (proj1 (proj2 eq_equiv)) +as eq_rel. + +Delimit Scope IntScope with Int. +Bind Scope IntScope with Z. +Notation "x == y" := (Zeq x y) (at level 70) : IntScope. +Notation "x # y" := (~ Zeq x y) (at level 70) : IntScope. + +End ZDomainSignature. + +Module ZDomainProperties (Import ZDomainModule : ZDomainSignature). +Open Local Scope IntScope. + +Add Morphism e with signature Zeq ==> Zeq ==> eq_bool as e_wd. +Proof. +intros x x' Exx' y y' Eyy'. +case_eq (e x y); case_eq (e x' y'); intros H1 H2; trivial. +assert (x == y); [apply <- eq_equiv_e; now rewrite H2 | +assert (x' == y'); [rewrite <- Exx'; now rewrite <- Eyy' | +rewrite <- H1; assert (H3 : e x' y'); [now apply -> eq_equiv_e | now inversion H3]]]. +assert (x' == y'); [apply <- eq_equiv_e; now rewrite H1 | +assert (x == y); [rewrite Exx'; now rewrite Eyy' | +rewrite <- H2; assert (H3 : e x y); [now apply -> eq_equiv_e | now inversion H3]]]. +Qed. + +Theorem neq_symm : forall n m, n # m -> m # n. +Proof. +intros n m H1 H2; symmetry in H2; false_hyp H2 H1. +Qed. + +Theorem ZE_stepl : forall x y z : Z, x == y -> x == z -> z == y. +Proof. +intros x y z H1 H2; now rewrite <- H1. +Qed. + +Declare Left Step ZE_stepl. + +(* The right step lemma is just transitivity of Zeq *) +Declare Right Step (proj1 (proj2 eq_equiv)). + +End ZDomainProperties. + + diff --git a/theories/Numbers/Integer/Abstract/ZLt.v b/theories/Numbers/Integer/Abstract/ZLt.v new file mode 100644 index 00000000..2a88a535 --- /dev/null +++ b/theories/Numbers/Integer/Abstract/ZLt.v @@ -0,0 +1,432 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* forall m1 m2 : Z, m1 == m2 -> (n1 < m1 <-> n2 < m2). +Proof NZlt_wd. + +Theorem Zle_wd : + forall n1 n2 : Z, n1 == n2 -> forall m1 m2 : Z, m1 == m2 -> (n1 <= m1 <-> n2 <= m2). +Proof NZle_wd. + +Theorem Zmin_wd : + forall n1 n2 : Z, n1 == n2 -> forall m1 m2 : Z, m1 == m2 -> Zmin n1 m1 == Zmin n2 m2. +Proof NZmin_wd. + +Theorem Zmax_wd : + forall n1 n2 : Z, n1 == n2 -> forall m1 m2 : Z, m1 == m2 -> Zmax n1 m1 == Zmax n2 m2. +Proof NZmax_wd. + +Theorem Zlt_eq_cases : forall n m : Z, n <= m <-> n < m \/ n == m. +Proof NZlt_eq_cases. + +Theorem Zlt_irrefl : forall n : Z, ~ n < n. +Proof NZlt_irrefl. + +Theorem Zlt_succ_r : forall n m : Z, n < S m <-> n <= m. +Proof NZlt_succ_r. + +Theorem Zmin_l : forall n m : Z, n <= m -> Zmin n m == n. +Proof NZmin_l. + +Theorem Zmin_r : forall n m : Z, m <= n -> Zmin n m == m. +Proof NZmin_r. + +Theorem Zmax_l : forall n m : Z, m <= n -> Zmax n m == n. +Proof NZmax_l. + +Theorem Zmax_r : forall n m : Z, n <= m -> Zmax n m == m. +Proof NZmax_r. + +(* Renaming theorems from NZOrder.v *) + +Theorem Zlt_le_incl : forall n m : Z, n < m -> n <= m. +Proof NZlt_le_incl. + +Theorem Zlt_neq : forall n m : Z, n < m -> n ~= m. +Proof NZlt_neq. + +Theorem Zle_neq : forall n m : Z, n < m <-> n <= m /\ n ~= m. +Proof NZle_neq. + +Theorem Zle_refl : forall n : Z, n <= n. +Proof NZle_refl. + +Theorem Zlt_succ_diag_r : forall n : Z, n < S n. +Proof NZlt_succ_diag_r. + +Theorem Zle_succ_diag_r : forall n : Z, n <= S n. +Proof NZle_succ_diag_r. + +Theorem Zlt_0_1 : 0 < 1. +Proof NZlt_0_1. + +Theorem Zle_0_1 : 0 <= 1. +Proof NZle_0_1. + +Theorem Zlt_lt_succ_r : forall n m : Z, n < m -> n < S m. +Proof NZlt_lt_succ_r. + +Theorem Zle_le_succ_r : forall n m : Z, n <= m -> n <= S m. +Proof NZle_le_succ_r. + +Theorem Zle_succ_r : forall n m : Z, n <= S m <-> n <= m \/ n == S m. +Proof NZle_succ_r. + +Theorem Zneq_succ_diag_l : forall n : Z, S n ~= n. +Proof NZneq_succ_diag_l. + +Theorem Zneq_succ_diag_r : forall n : Z, n ~= S n. +Proof NZneq_succ_diag_r. + +Theorem Znlt_succ_diag_l : forall n : Z, ~ S n < n. +Proof NZnlt_succ_diag_l. + +Theorem Znle_succ_diag_l : forall n : Z, ~ S n <= n. +Proof NZnle_succ_diag_l. + +Theorem Zle_succ_l : forall n m : Z, S n <= m <-> n < m. +Proof NZle_succ_l. + +Theorem Zlt_succ_l : forall n m : Z, S n < m -> n < m. +Proof NZlt_succ_l. + +Theorem Zsucc_lt_mono : forall n m : Z, n < m <-> S n < S m. +Proof NZsucc_lt_mono. + +Theorem Zsucc_le_mono : forall n m : Z, n <= m <-> S n <= S m. +Proof NZsucc_le_mono. + +Theorem Zlt_asymm : forall n m, n < m -> ~ m < n. +Proof NZlt_asymm. + +Notation Zlt_ngt := Zlt_asymm (only parsing). + +Theorem Zlt_trans : forall n m p : Z, n < m -> m < p -> n < p. +Proof NZlt_trans. + +Theorem Zle_trans : forall n m p : Z, n <= m -> m <= p -> n <= p. +Proof NZle_trans. + +Theorem Zle_lt_trans : forall n m p : Z, n <= m -> m < p -> n < p. +Proof NZle_lt_trans. + +Theorem Zlt_le_trans : forall n m p : Z, n < m -> m <= p -> n < p. +Proof NZlt_le_trans. + +Theorem Zle_antisymm : forall n m : Z, n <= m -> m <= n -> n == m. +Proof NZle_antisymm. + +Theorem Zlt_1_l : forall n m : Z, 0 < n -> n < m -> 1 < m. +Proof NZlt_1_l. + +(** Trichotomy, decidability, and double negation elimination *) + +Theorem Zlt_trichotomy : forall n m : Z, n < m \/ n == m \/ m < n. +Proof NZlt_trichotomy. + +Notation Zlt_eq_gt_cases := Zlt_trichotomy (only parsing). + +Theorem Zlt_gt_cases : forall n m : Z, n ~= m <-> n < m \/ n > m. +Proof NZlt_gt_cases. + +Theorem Zle_gt_cases : forall n m : Z, n <= m \/ n > m. +Proof NZle_gt_cases. + +Theorem Zlt_ge_cases : forall n m : Z, n < m \/ n >= m. +Proof NZlt_ge_cases. + +Theorem Zle_ge_cases : forall n m : Z, n <= m \/ n >= m. +Proof NZle_ge_cases. + +(** Instances of the previous theorems for m == 0 *) + +Theorem Zneg_pos_cases : forall n : Z, n ~= 0 <-> n < 0 \/ n > 0. +Proof. +intro; apply Zlt_gt_cases. +Qed. + +Theorem Znonpos_pos_cases : forall n : Z, n <= 0 \/ n > 0. +Proof. +intro; apply Zle_gt_cases. +Qed. + +Theorem Zneg_nonneg_cases : forall n : Z, n < 0 \/ n >= 0. +Proof. +intro; apply Zlt_ge_cases. +Qed. + +Theorem Znonpos_nonneg_cases : forall n : Z, n <= 0 \/ n >= 0. +Proof. +intro; apply Zle_ge_cases. +Qed. + +Theorem Zle_ngt : forall n m : Z, n <= m <-> ~ n > m. +Proof NZle_ngt. + +Theorem Znlt_ge : forall n m : Z, ~ n < m <-> n >= m. +Proof NZnlt_ge. + +Theorem Zlt_dec : forall n m : Z, decidable (n < m). +Proof NZlt_dec. + +Theorem Zlt_dne : forall n m, ~ ~ n < m <-> n < m. +Proof NZlt_dne. + +Theorem Znle_gt : forall n m : Z, ~ n <= m <-> n > m. +Proof NZnle_gt. + +Theorem Zlt_nge : forall n m : Z, n < m <-> ~ n >= m. +Proof NZlt_nge. + +Theorem Zle_dec : forall n m : Z, decidable (n <= m). +Proof NZle_dec. + +Theorem Zle_dne : forall n m : Z, ~ ~ n <= m <-> n <= m. +Proof NZle_dne. + +Theorem Znlt_succ_r : forall n m : Z, ~ m < S n <-> n < m. +Proof NZnlt_succ_r. + +Theorem Zlt_exists_pred : + forall z n : Z, z < n -> exists k : Z, n == S k /\ z <= k. +Proof NZlt_exists_pred. + +Theorem Zlt_succ_iter_r : + forall (n : nat) (m : Z), m < NZsucc_iter (Datatypes.S n) m. +Proof NZlt_succ_iter_r. + +Theorem Zneq_succ_iter_l : + forall (n : nat) (m : Z), NZsucc_iter (Datatypes.S n) m ~= m. +Proof NZneq_succ_iter_l. + +(** Stronger variant of induction with assumptions n >= 0 (n < 0) +in the induction step *) + +Theorem Zright_induction : + forall A : Z -> Prop, predicate_wd Zeq A -> + forall z : Z, A z -> + (forall n : Z, z <= n -> A n -> A (S n)) -> + forall n : Z, z <= n -> A n. +Proof NZright_induction. + +Theorem Zleft_induction : + forall A : Z -> Prop, predicate_wd Zeq A -> + forall z : Z, A z -> + (forall n : Z, n < z -> A (S n) -> A n) -> + forall n : Z, n <= z -> A n. +Proof NZleft_induction. + +Theorem Zright_induction' : + forall A : Z -> Prop, predicate_wd Zeq A -> + forall z : Z, + (forall n : Z, n <= z -> A n) -> + (forall n : Z, z <= n -> A n -> A (S n)) -> + forall n : Z, A n. +Proof NZright_induction'. + +Theorem Zleft_induction' : + forall A : Z -> Prop, predicate_wd Zeq A -> + forall z : Z, + (forall n : Z, z <= n -> A n) -> + (forall n : Z, n < z -> A (S n) -> A n) -> + forall n : Z, A n. +Proof NZleft_induction'. + +Theorem Zstrong_right_induction : + forall A : Z -> Prop, predicate_wd Zeq A -> + forall z : Z, + (forall n : Z, z <= n -> (forall m : Z, z <= m -> m < n -> A m) -> A n) -> + forall n : Z, z <= n -> A n. +Proof NZstrong_right_induction. + +Theorem Zstrong_left_induction : + forall A : Z -> Prop, predicate_wd Zeq A -> + forall z : Z, + (forall n : Z, n <= z -> (forall m : Z, m <= z -> S n <= m -> A m) -> A n) -> + forall n : Z, n <= z -> A n. +Proof NZstrong_left_induction. + +Theorem Zstrong_right_induction' : + forall A : Z -> Prop, predicate_wd Zeq A -> + forall z : Z, + (forall n : Z, n <= z -> A n) -> + (forall n : Z, z <= n -> (forall m : Z, z <= m -> m < n -> A m) -> A n) -> + forall n : Z, A n. +Proof NZstrong_right_induction'. + +Theorem Zstrong_left_induction' : + forall A : Z -> Prop, predicate_wd Zeq A -> + forall z : Z, + (forall n : Z, z <= n -> A n) -> + (forall n : Z, n <= z -> (forall m : Z, m <= z -> S n <= m -> A m) -> A n) -> + forall n : Z, A n. +Proof NZstrong_left_induction'. + +Theorem Zorder_induction : + forall A : Z -> Prop, predicate_wd Zeq A -> + forall z : Z, A z -> + (forall n : Z, z <= n -> A n -> A (S n)) -> + (forall n : Z, n < z -> A (S n) -> A n) -> + forall n : Z, A n. +Proof NZorder_induction. + +Theorem Zorder_induction' : + forall A : Z -> Prop, predicate_wd Zeq A -> + forall z : Z, A z -> + (forall n : Z, z <= n -> A n -> A (S n)) -> + (forall n : Z, n <= z -> A n -> A (P n)) -> + forall n : Z, A n. +Proof NZorder_induction'. + +Theorem Zorder_induction_0 : + forall A : Z -> Prop, predicate_wd Zeq A -> + A 0 -> + (forall n : Z, 0 <= n -> A n -> A (S n)) -> + (forall n : Z, n < 0 -> A (S n) -> A n) -> + forall n : Z, A n. +Proof NZorder_induction_0. + +Theorem Zorder_induction'_0 : + forall A : Z -> Prop, predicate_wd Zeq A -> + A 0 -> + (forall n : Z, 0 <= n -> A n -> A (S n)) -> + (forall n : Z, n <= 0 -> A n -> A (P n)) -> + forall n : Z, A n. +Proof NZorder_induction'_0. + +Ltac Zinduct n := induction_maker n ltac:(apply Zorder_induction_0). + +(** Elimintation principle for < *) + +Theorem Zlt_ind : + forall A : Z -> Prop, predicate_wd Zeq A -> + forall n : Z, A (S n) -> + (forall m : Z, n < m -> A m -> A (S m)) -> forall m : Z, n < m -> A m. +Proof NZlt_ind. + +(** Elimintation principle for <= *) + +Theorem Zle_ind : + forall A : Z -> Prop, predicate_wd Zeq A -> + forall n : Z, A n -> + (forall m : Z, n <= m -> A m -> A (S m)) -> forall m : Z, n <= m -> A m. +Proof NZle_ind. + +(** Well-founded relations *) + +Theorem Zlt_wf : forall z : Z, well_founded (fun n m : Z => z <= n /\ n < m). +Proof NZlt_wf. + +Theorem Zgt_wf : forall z : Z, well_founded (fun n m : Z => m < n /\ n <= z). +Proof NZgt_wf. + +(* Theorems that are either not valid on N or have different proofs on N and Z *) + +Theorem Zlt_pred_l : forall n : Z, P n < n. +Proof. +intro n; rewrite <- (Zsucc_pred n) at 2; apply Zlt_succ_diag_r. +Qed. + +Theorem Zle_pred_l : forall n : Z, P n <= n. +Proof. +intro; apply Zlt_le_incl; apply Zlt_pred_l. +Qed. + +Theorem Zlt_le_pred : forall n m : Z, n < m <-> n <= P m. +Proof. +intros n m; rewrite <- (Zsucc_pred m); rewrite Zpred_succ. apply Zlt_succ_r. +Qed. + +Theorem Znle_pred_r : forall n : Z, ~ n <= P n. +Proof. +intro; rewrite <- Zlt_le_pred; apply Zlt_irrefl. +Qed. + +Theorem Zlt_pred_le : forall n m : Z, P n < m <-> n <= m. +Proof. +intros n m; rewrite <- (Zsucc_pred n) at 2. +symmetry; apply Zle_succ_l. +Qed. + +Theorem Zlt_lt_pred : forall n m : Z, n < m -> P n < m. +Proof. +intros; apply <- Zlt_pred_le; now apply Zlt_le_incl. +Qed. + +Theorem Zle_le_pred : forall n m : Z, n <= m -> P n <= m. +Proof. +intros; apply Zlt_le_incl; now apply <- Zlt_pred_le. +Qed. + +Theorem Zlt_pred_lt : forall n m : Z, n < P m -> n < m. +Proof. +intros n m H; apply Zlt_trans with (P m); [assumption | apply Zlt_pred_l]. +Qed. + +Theorem Zle_pred_lt : forall n m : Z, n <= P m -> n <= m. +Proof. +intros; apply Zlt_le_incl; now apply <- Zlt_le_pred. +Qed. + +Theorem Zpred_lt_mono : forall n m : Z, n < m <-> P n < P m. +Proof. +intros; rewrite Zlt_le_pred; symmetry; apply Zlt_pred_le. +Qed. + +Theorem Zpred_le_mono : forall n m : Z, n <= m <-> P n <= P m. +Proof. +intros; rewrite <- Zlt_pred_le; now rewrite Zlt_le_pred. +Qed. + +Theorem Zlt_succ_lt_pred : forall n m : Z, S n < m <-> n < P m. +Proof. +intros n m; now rewrite (Zpred_lt_mono (S n) m), Zpred_succ. +Qed. + +Theorem Zle_succ_le_pred : forall n m : Z, S n <= m <-> n <= P m. +Proof. +intros n m; now rewrite (Zpred_le_mono (S n) m), Zpred_succ. +Qed. + +Theorem Zlt_pred_lt_succ : forall n m : Z, P n < m <-> n < S m. +Proof. +intros; rewrite Zlt_pred_le; symmetry; apply Zlt_succ_r. +Qed. + +Theorem Zle_pred_lt_succ : forall n m : Z, P n <= m <-> n <= S m. +Proof. +intros n m; now rewrite (Zpred_le_mono n (S m)), Zpred_succ. +Qed. + +Theorem Zneq_pred_l : forall n : Z, P n ~= n. +Proof. +intro; apply Zlt_neq; apply Zlt_pred_l. +Qed. + +Theorem Zlt_n1_r : forall n m : Z, n < m -> m < 0 -> n < -1. +Proof. +intros n m H1 H2. apply -> Zlt_le_pred in H2. +setoid_replace (P 0) with (-1) in H2. now apply NZlt_le_trans with m. +apply <- Zeq_opp_r. now rewrite Zopp_pred, Zopp_0. +Qed. + +End ZOrderPropFunct. + diff --git a/theories/Numbers/Integer/Abstract/ZMul.v b/theories/Numbers/Integer/Abstract/ZMul.v new file mode 100644 index 00000000..c48d1b4c --- /dev/null +++ b/theories/Numbers/Integer/Abstract/ZMul.v @@ -0,0 +1,115 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* forall m1 m2 : Z, m1 == m2 -> n1 * m1 == n2 * m2. +Proof NZmul_wd. + +Theorem Zmul_0_l : forall n : Z, 0 * n == 0. +Proof NZmul_0_l. + +Theorem Zmul_succ_l : forall n m : Z, (S n) * m == n * m + m. +Proof NZmul_succ_l. + +(* Theorems that are valid for both natural numbers and integers *) + +Theorem Zmul_0_r : forall n : Z, n * 0 == 0. +Proof NZmul_0_r. + +Theorem Zmul_succ_r : forall n m : Z, n * (S m) == n * m + n. +Proof NZmul_succ_r. + +Theorem Zmul_comm : forall n m : Z, n * m == m * n. +Proof NZmul_comm. + +Theorem Zmul_add_distr_r : forall n m p : Z, (n + m) * p == n * p + m * p. +Proof NZmul_add_distr_r. + +Theorem Zmul_add_distr_l : forall n m p : Z, n * (m + p) == n * m + n * p. +Proof NZmul_add_distr_l. + +(* A note on naming: right (correspondingly, left) distributivity happens +when the sum is multiplied by a number on the right (left), not when the +sum itself is the right (left) factor in the product (see planetmath.org +and mathworld.wolfram.com). In the old library BinInt, distributivity over +subtraction was named correctly, but distributivity over addition was named +incorrectly. The names in Isabelle/HOL library are also incorrect. *) + +Theorem Zmul_assoc : forall n m p : Z, n * (m * p) == (n * m) * p. +Proof NZmul_assoc. + +Theorem Zmul_1_l : forall n : Z, 1 * n == n. +Proof NZmul_1_l. + +Theorem Zmul_1_r : forall n : Z, n * 1 == n. +Proof NZmul_1_r. + +(* The following two theorems are true in an ordered ring, +but since they don't mention order, we'll put them here *) + +Theorem Zeq_mul_0 : forall n m : Z, n * m == 0 <-> n == 0 \/ m == 0. +Proof NZeq_mul_0. + +Theorem Zneq_mul_0 : forall n m : Z, n ~= 0 /\ m ~= 0 <-> n * m ~= 0. +Proof NZneq_mul_0. + +(* Theorems that are either not valid on N or have different proofs on N and Z *) + +Theorem Zmul_pred_r : forall n m : Z, n * (P m) == n * m - n. +Proof. +intros n m. +rewrite <- (Zsucc_pred m) at 2. +now rewrite Zmul_succ_r, <- Zadd_sub_assoc, Zsub_diag, Zadd_0_r. +Qed. + +Theorem Zmul_pred_l : forall n m : Z, (P n) * m == n * m - m. +Proof. +intros n m; rewrite (Zmul_comm (P n) m), (Zmul_comm n m). apply Zmul_pred_r. +Qed. + +Theorem Zmul_opp_l : forall n m : Z, (- n) * m == - (n * m). +Proof. +intros n m. apply -> Zadd_move_0_r. +now rewrite <- Zmul_add_distr_r, Zadd_opp_diag_l, Zmul_0_l. +Qed. + +Theorem Zmul_opp_r : forall n m : Z, n * (- m) == - (n * m). +Proof. +intros n m; rewrite (Zmul_comm n (- m)), (Zmul_comm n m); apply Zmul_opp_l. +Qed. + +Theorem Zmul_opp_opp : forall n m : Z, (- n) * (- m) == n * m. +Proof. +intros n m; now rewrite Zmul_opp_l, Zmul_opp_r, Zopp_involutive. +Qed. + +Theorem Zmul_sub_distr_l : forall n m p : Z, n * (m - p) == n * m - n * p. +Proof. +intros n m p. do 2 rewrite <- Zadd_opp_r. rewrite Zmul_add_distr_l. +now rewrite Zmul_opp_r. +Qed. + +Theorem Zmul_sub_distr_r : forall n m p : Z, (n - m) * p == n * p - m * p. +Proof. +intros n m p; rewrite (Zmul_comm (n - m) p), (Zmul_comm n p), (Zmul_comm m p); +now apply Zmul_sub_distr_l. +Qed. + +End ZMulPropFunct. + + diff --git a/theories/Numbers/Integer/Abstract/ZMulOrder.v b/theories/Numbers/Integer/Abstract/ZMulOrder.v new file mode 100644 index 00000000..e3f1d9aa --- /dev/null +++ b/theories/Numbers/Integer/Abstract/ZMulOrder.v @@ -0,0 +1,343 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* (p * n < p * m <-> q * n + m < q * m + n). +Proof NZmul_lt_pred. + +Theorem Zmul_lt_mono_pos_l : forall p n m : Z, 0 < p -> (n < m <-> p * n < p * m). +Proof NZmul_lt_mono_pos_l. + +Theorem Zmul_lt_mono_pos_r : forall p n m : Z, 0 < p -> (n < m <-> n * p < m * p). +Proof NZmul_lt_mono_pos_r. + +Theorem Zmul_lt_mono_neg_l : forall p n m : Z, p < 0 -> (n < m <-> p * m < p * n). +Proof NZmul_lt_mono_neg_l. + +Theorem Zmul_lt_mono_neg_r : forall p n m : Z, p < 0 -> (n < m <-> m * p < n * p). +Proof NZmul_lt_mono_neg_r. + +Theorem Zmul_le_mono_nonneg_l : forall n m p : Z, 0 <= p -> n <= m -> p * n <= p * m. +Proof NZmul_le_mono_nonneg_l. + +Theorem Zmul_le_mono_nonpos_l : forall n m p : Z, p <= 0 -> n <= m -> p * m <= p * n. +Proof NZmul_le_mono_nonpos_l. + +Theorem Zmul_le_mono_nonneg_r : forall n m p : Z, 0 <= p -> n <= m -> n * p <= m * p. +Proof NZmul_le_mono_nonneg_r. + +Theorem Zmul_le_mono_nonpos_r : forall n m p : Z, p <= 0 -> n <= m -> m * p <= n * p. +Proof NZmul_le_mono_nonpos_r. + +Theorem Zmul_cancel_l : forall n m p : Z, p ~= 0 -> (p * n == p * m <-> n == m). +Proof NZmul_cancel_l. + +Theorem Zmul_cancel_r : forall n m p : Z, p ~= 0 -> (n * p == m * p <-> n == m). +Proof NZmul_cancel_r. + +Theorem Zmul_id_l : forall n m : Z, m ~= 0 -> (n * m == m <-> n == 1). +Proof NZmul_id_l. + +Theorem Zmul_id_r : forall n m : Z, n ~= 0 -> (n * m == n <-> m == 1). +Proof NZmul_id_r. + +Theorem Zmul_le_mono_pos_l : forall n m p : Z, 0 < p -> (n <= m <-> p * n <= p * m). +Proof NZmul_le_mono_pos_l. + +Theorem Zmul_le_mono_pos_r : forall n m p : Z, 0 < p -> (n <= m <-> n * p <= m * p). +Proof NZmul_le_mono_pos_r. + +Theorem Zmul_le_mono_neg_l : forall n m p : Z, p < 0 -> (n <= m <-> p * m <= p * n). +Proof NZmul_le_mono_neg_l. + +Theorem Zmul_le_mono_neg_r : forall n m p : Z, p < 0 -> (n <= m <-> m * p <= n * p). +Proof NZmul_le_mono_neg_r. + +Theorem Zmul_lt_mono_nonneg : + forall n m p q : Z, 0 <= n -> n < m -> 0 <= p -> p < q -> n * p < m * q. +Proof NZmul_lt_mono_nonneg. + +Theorem Zmul_lt_mono_nonpos : + forall n m p q : Z, m <= 0 -> n < m -> q <= 0 -> p < q -> m * q < n * p. +Proof. +intros n m p q H1 H2 H3 H4. +apply Zle_lt_trans with (m * p). +apply Zmul_le_mono_nonpos_l; [assumption | now apply Zlt_le_incl]. +apply -> Zmul_lt_mono_neg_r; [assumption | now apply Zlt_le_trans with q]. +Qed. + +Theorem Zmul_le_mono_nonneg : + forall n m p q : Z, 0 <= n -> n <= m -> 0 <= p -> p <= q -> n * p <= m * q. +Proof NZmul_le_mono_nonneg. + +Theorem Zmul_le_mono_nonpos : + forall n m p q : Z, m <= 0 -> n <= m -> q <= 0 -> p <= q -> m * q <= n * p. +Proof. +intros n m p q H1 H2 H3 H4. +apply Zle_trans with (m * p). +now apply Zmul_le_mono_nonpos_l. +apply Zmul_le_mono_nonpos_r; [now apply Zle_trans with q | assumption]. +Qed. + +Theorem Zmul_pos_pos : forall n m : Z, 0 < n -> 0 < m -> 0 < n * m. +Proof NZmul_pos_pos. + +Theorem Zmul_neg_neg : forall n m : Z, n < 0 -> m < 0 -> 0 < n * m. +Proof NZmul_neg_neg. + +Theorem Zmul_pos_neg : forall n m : Z, 0 < n -> m < 0 -> n * m < 0. +Proof NZmul_pos_neg. + +Theorem Zmul_neg_pos : forall n m : Z, n < 0 -> 0 < m -> n * m < 0. +Proof NZmul_neg_pos. + +Theorem Zmul_nonneg_nonneg : forall n m : Z, 0 <= n -> 0 <= m -> 0 <= n * m. +Proof. +intros n m H1 H2. +rewrite <- (Zmul_0_l m). now apply Zmul_le_mono_nonneg_r. +Qed. + +Theorem Zmul_nonpos_nonpos : forall n m : Z, n <= 0 -> m <= 0 -> 0 <= n * m. +Proof. +intros n m H1 H2. +rewrite <- (Zmul_0_l m). now apply Zmul_le_mono_nonpos_r. +Qed. + +Theorem Zmul_nonneg_nonpos : forall n m : Z, 0 <= n -> m <= 0 -> n * m <= 0. +Proof. +intros n m H1 H2. +rewrite <- (Zmul_0_l m). now apply Zmul_le_mono_nonpos_r. +Qed. + +Theorem Zmul_nonpos_nonneg : forall n m : Z, n <= 0 -> 0 <= m -> n * m <= 0. +Proof. +intros; rewrite Zmul_comm; now apply Zmul_nonneg_nonpos. +Qed. + +Theorem Zlt_1_mul_pos : forall n m : Z, 1 < n -> 0 < m -> 1 < n * m. +Proof NZlt_1_mul_pos. + +Theorem Zeq_mul_0 : forall n m : Z, n * m == 0 <-> n == 0 \/ m == 0. +Proof NZeq_mul_0. + +Theorem Zneq_mul_0 : forall n m : Z, n ~= 0 /\ m ~= 0 <-> n * m ~= 0. +Proof NZneq_mul_0. + +Theorem Zeq_square_0 : forall n : Z, n * n == 0 <-> n == 0. +Proof NZeq_square_0. + +Theorem Zeq_mul_0_l : forall n m : Z, n * m == 0 -> m ~= 0 -> n == 0. +Proof NZeq_mul_0_l. + +Theorem Zeq_mul_0_r : forall n m : Z, n * m == 0 -> n ~= 0 -> m == 0. +Proof NZeq_mul_0_r. + +Theorem Zlt_0_mul : forall n m : Z, 0 < n * m <-> 0 < n /\ 0 < m \/ m < 0 /\ n < 0. +Proof NZlt_0_mul. + +Notation Zmul_pos := Zlt_0_mul (only parsing). + +Theorem Zlt_mul_0 : + forall n m : Z, n * m < 0 <-> n < 0 /\ m > 0 \/ n > 0 /\ m < 0. +Proof. +intros n m; split; [intro H | intros [[H1 H2] | [H1 H2]]]. +destruct (Zlt_trichotomy n 0) as [H1 | [H1 | H1]]; +[| rewrite H1 in H; rewrite Zmul_0_l in H; false_hyp H Zlt_irrefl |]; +(destruct (Zlt_trichotomy m 0) as [H2 | [H2 | H2]]; +[| rewrite H2 in H; rewrite Zmul_0_r in H; false_hyp H Zlt_irrefl |]); +try (left; now split); try (right; now split). +assert (H3 : n * m > 0) by now apply Zmul_neg_neg. +elimtype False; now apply (Zlt_asymm (n * m) 0). +assert (H3 : n * m > 0) by now apply Zmul_pos_pos. +elimtype False; now apply (Zlt_asymm (n * m) 0). +now apply Zmul_neg_pos. now apply Zmul_pos_neg. +Qed. + +Notation Zmul_neg := Zlt_mul_0 (only parsing). + +Theorem Zle_0_mul : + forall n m : Z, 0 <= n * m -> 0 <= n /\ 0 <= m \/ n <= 0 /\ m <= 0. +Proof. +assert (R : forall n : Z, 0 == n <-> n == 0) by (intros; split; apply Zeq_symm). +intros n m. repeat rewrite Zlt_eq_cases. repeat rewrite R. +rewrite Zlt_0_mul, Zeq_mul_0. +pose proof (Zlt_trichotomy n 0); pose proof (Zlt_trichotomy m 0). tauto. +Qed. + +Notation Zmul_nonneg := Zle_0_mul (only parsing). + +Theorem Zle_mul_0 : + forall n m : Z, n * m <= 0 -> 0 <= n /\ m <= 0 \/ n <= 0 /\ 0 <= m. +Proof. +assert (R : forall n : Z, 0 == n <-> n == 0) by (intros; split; apply Zeq_symm). +intros n m. repeat rewrite Zlt_eq_cases. repeat rewrite R. +rewrite Zlt_mul_0, Zeq_mul_0. +pose proof (Zlt_trichotomy n 0); pose proof (Zlt_trichotomy m 0). tauto. +Qed. + +Notation Zmul_nonpos := Zle_mul_0 (only parsing). + +Theorem Zle_0_square : forall n : Z, 0 <= n * n. +Proof. +intro n; destruct (Zneg_nonneg_cases n). +apply Zlt_le_incl; now apply Zmul_neg_neg. +now apply Zmul_nonneg_nonneg. +Qed. + +Notation Zsquare_nonneg := Zle_0_square (only parsing). + +Theorem Znlt_square_0 : forall n : Z, ~ n * n < 0. +Proof. +intros n H. apply -> Zlt_nge in H. apply H. apply Zsquare_nonneg. +Qed. + +Theorem Zsquare_lt_mono_nonneg : forall n m : Z, 0 <= n -> n < m -> n * n < m * m. +Proof NZsquare_lt_mono_nonneg. + +Theorem Zsquare_lt_mono_nonpos : forall n m : Z, n <= 0 -> m < n -> n * n < m * m. +Proof. +intros n m H1 H2. now apply Zmul_lt_mono_nonpos. +Qed. + +Theorem Zsquare_le_mono_nonneg : forall n m : Z, 0 <= n -> n <= m -> n * n <= m * m. +Proof NZsquare_le_mono_nonneg. + +Theorem Zsquare_le_mono_nonpos : forall n m : Z, n <= 0 -> m <= n -> n * n <= m * m. +Proof. +intros n m H1 H2. now apply Zmul_le_mono_nonpos. +Qed. + +Theorem Zsquare_lt_simpl_nonneg : forall n m : Z, 0 <= m -> n * n < m * m -> n < m. +Proof NZsquare_lt_simpl_nonneg. + +Theorem Zsquare_le_simpl_nonneg : forall n m : Z, 0 <= m -> n * n <= m * m -> n <= m. +Proof NZsquare_le_simpl_nonneg. + +Theorem Zsquare_lt_simpl_nonpos : forall n m : Z, m <= 0 -> n * n < m * m -> m < n. +Proof. +intros n m H1 H2. destruct (Zle_gt_cases n 0). +destruct (NZlt_ge_cases m n). +assumption. assert (F : m * m <= n * n) by now apply Zsquare_le_mono_nonpos. +apply -> NZle_ngt in F. false_hyp H2 F. +now apply Zle_lt_trans with 0. +Qed. + +Theorem Zsquare_le_simpl_nonpos : forall n m : NZ, m <= 0 -> n * n <= m * m -> m <= n. +Proof. +intros n m H1 H2. destruct (NZle_gt_cases n 0). +destruct (NZle_gt_cases m n). +assumption. assert (F : m * m < n * n) by now apply Zsquare_lt_mono_nonpos. +apply -> NZlt_nge in F. false_hyp H2 F. +apply Zlt_le_incl; now apply NZle_lt_trans with 0. +Qed. + +Theorem Zmul_2_mono_l : forall n m : Z, n < m -> 1 + (1 + 1) * n < (1 + 1) * m. +Proof NZmul_2_mono_l. + +Theorem Zlt_1_mul_neg : forall n m : Z, n < -1 -> m < 0 -> 1 < n * m. +Proof. +intros n m H1 H2. apply -> (NZmul_lt_mono_neg_r m) in H1. +apply <- Zopp_pos_neg in H2. rewrite Zmul_opp_l, Zmul_1_l in H1. +now apply Zlt_1_l with (- m). +assumption. +Qed. + +Theorem Zlt_mul_n1_neg : forall n m : Z, 1 < n -> m < 0 -> n * m < -1. +Proof. +intros n m H1 H2. apply -> (NZmul_lt_mono_neg_r m) in H1. +rewrite Zmul_1_l in H1. now apply Zlt_n1_r with m. +assumption. +Qed. + +Theorem Zlt_mul_n1_pos : forall n m : Z, n < -1 -> 0 < m -> n * m < -1. +Proof. +intros n m H1 H2. apply -> (NZmul_lt_mono_pos_r m) in H1. +rewrite Zmul_opp_l, Zmul_1_l in H1. +apply <- Zopp_neg_pos in H2. now apply Zlt_n1_r with (- m). +assumption. +Qed. + +Theorem Zlt_1_mul_l : forall n m : Z, 1 < n -> n * m < -1 \/ n * m == 0 \/ 1 < n * m. +Proof. +intros n m H; destruct (Zlt_trichotomy m 0) as [H1 | [H1 | H1]]. +left. now apply Zlt_mul_n1_neg. +right; left; now rewrite H1, Zmul_0_r. +right; right; now apply Zlt_1_mul_pos. +Qed. + +Theorem Zlt_n1_mul_r : forall n m : Z, n < -1 -> n * m < -1 \/ n * m == 0 \/ 1 < n * m. +Proof. +intros n m H; destruct (Zlt_trichotomy m 0) as [H1 | [H1 | H1]]. +right; right. now apply Zlt_1_mul_neg. +right; left; now rewrite H1, Zmul_0_r. +left. now apply Zlt_mul_n1_pos. +Qed. + +Theorem Zeq_mul_1 : forall n m : Z, n * m == 1 -> n == 1 \/ n == -1. +Proof. +assert (F : ~ 1 < -1). +intro H. +assert (H1 : -1 < 0). apply <- Zopp_neg_pos. apply Zlt_succ_diag_r. +assert (H2 : 1 < 0) by now apply Zlt_trans with (-1). false_hyp H2 Znlt_succ_diag_l. +Z0_pos_neg n. +intros m H; rewrite Zmul_0_l in H; false_hyp H Zneq_succ_diag_r. +intros n H; split; apply <- Zle_succ_l in H; le_elim H. +intros m H1; apply (Zlt_1_mul_l n m) in H. +rewrite H1 in H; destruct H as [H | [H | H]]. +false_hyp H F. false_hyp H Zneq_succ_diag_l. false_hyp H Zlt_irrefl. +intros; now left. +intros m H1; apply (Zlt_1_mul_l n m) in H. rewrite Zmul_opp_l in H1; +apply -> Zeq_opp_l in H1. rewrite H1 in H; destruct H as [H | [H | H]]. +false_hyp H Zlt_irrefl. apply -> Zeq_opp_l in H. rewrite Zopp_0 in H. +false_hyp H Zneq_succ_diag_l. false_hyp H F. +intros; right; symmetry; now apply Zopp_wd. +Qed. + +Theorem Zlt_mul_diag_l : forall n m : Z, n < 0 -> (1 < m <-> n * m < n). +Proof. +intros n m H. stepr (n * m < n * 1) by now rewrite Zmul_1_r. +now apply Zmul_lt_mono_neg_l. +Qed. + +Theorem Zlt_mul_diag_r : forall n m : Z, 0 < n -> (1 < m <-> n < n * m). +Proof. +intros n m H. stepr (n * 1 < n * m) by now rewrite Zmul_1_r. +now apply Zmul_lt_mono_pos_l. +Qed. + +Theorem Zle_mul_diag_l : forall n m : Z, n < 0 -> (1 <= m <-> n * m <= n). +Proof. +intros n m H. stepr (n * m <= n * 1) by now rewrite Zmul_1_r. +now apply Zmul_le_mono_neg_l. +Qed. + +Theorem Zle_mul_diag_r : forall n m : Z, 0 < n -> (1 <= m <-> n <= n * m). +Proof. +intros n m H. stepr (n * 1 <= n * m) by now rewrite Zmul_1_r. +now apply Zmul_le_mono_pos_l. +Qed. + +Theorem Zlt_mul_r : forall n m p : Z, 0 < n -> 1 < p -> n < m -> n < m * p. +Proof. +intros. stepl (n * 1) by now rewrite Zmul_1_r. +apply Zmul_lt_mono_nonneg. +now apply Zlt_le_incl. assumption. apply Zle_0_1. assumption. +Qed. + +End ZMulOrderPropFunct. + diff --git a/theories/Numbers/Integer/BigZ/BigZ.v b/theories/Numbers/Integer/BigZ/BigZ.v new file mode 100644 index 00000000..09abf424 --- /dev/null +++ b/theories/Numbers/Integer/BigZ/BigZ.v @@ -0,0 +1,109 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* + BigN.to_Z (BigZ.to_N n) = [n]. +Proof. +intros n; case n; simpl; intros p; + generalize (BigN.spec_pos p); case (BigN.to_Z p); auto. +intros p1 _ H1; case H1; auto. +intros p1 H1; case H1; auto. +Qed. + +Lemma sub_opp : forall x y : bigZ, x - y == x + (- y). +Proof. +red; intros; zsimpl; auto. +Qed. + +Lemma add_opp : forall x : bigZ, x + (- x) == 0. +Proof. +red; intros; zsimpl; auto with zarith. +Qed. + +(** [BigZ] is a ring *) + +Lemma BigZring : + ring_theory BigZ.zero BigZ.one BigZ.add BigZ.mul BigZ.sub BigZ.opp BigZ.eq. +Proof. +constructor. +exact Zadd_0_l. +exact Zadd_comm. +exact Zadd_assoc. +exact Zmul_1_l. +exact Zmul_comm. +exact Zmul_assoc. +exact Zmul_add_distr_r. +exact sub_opp. +exact add_opp. +Qed. + +Add Ring BigZr : BigZring. + +(** Todo: tactic translating from [BigZ] to [Z] + omega *) + +(** Todo: micromega *) diff --git a/theories/Numbers/Integer/BigZ/ZMake.v b/theories/Numbers/Integer/BigZ/ZMake.v new file mode 100644 index 00000000..1f2b12bb --- /dev/null +++ b/theories/Numbers/Integer/BigZ/ZMake.v @@ -0,0 +1,491 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* t_ + | Neg : N.t -> t_. + + Definition t := t_. + + Definition zero := Pos N.zero. + Definition one := Pos N.one. + Definition minus_one := Neg N.one. + + Definition of_Z x := + match x with + | Zpos x => Pos (N.of_N (Npos x)) + | Z0 => zero + | Zneg x => Neg (N.of_N (Npos x)) + end. + + Definition to_Z x := + match x with + | Pos nx => N.to_Z nx + | Neg nx => Zopp (N.to_Z nx) + end. + + Theorem spec_of_Z: forall x, to_Z (of_Z x) = x. + intros x; case x; unfold to_Z, of_Z, zero. + exact N.spec_0. + intros; rewrite N.spec_of_N; auto. + intros; rewrite N.spec_of_N; auto. + Qed. + + Definition eq x y := (to_Z x = to_Z y). + + Theorem spec_0: to_Z zero = 0. + exact N.spec_0. + Qed. + + Theorem spec_1: to_Z one = 1. + exact N.spec_1. + Qed. + + Theorem spec_m1: to_Z minus_one = -1. + simpl; rewrite N.spec_1; auto. + Qed. + + Definition compare x y := + match x, y with + | Pos nx, Pos ny => N.compare nx ny + | Pos nx, Neg ny => + match N.compare nx N.zero with + | Gt => Gt + | _ => N.compare ny N.zero + end + | Neg nx, Pos ny => + match N.compare N.zero nx with + | Lt => Lt + | _ => N.compare N.zero ny + end + | Neg nx, Neg ny => N.compare ny nx + end. + + Definition lt n m := compare n m = Lt. + Definition le n m := compare n m <> Gt. + Definition min n m := match compare n m with Gt => m | _ => n end. + Definition max n m := match compare n m with Lt => m | _ => n end. + + Theorem spec_compare: forall x y, + match compare x y with + Eq => to_Z x = to_Z y + | Lt => to_Z x < to_Z y + | Gt => to_Z x > to_Z y + end. + unfold compare, to_Z; intros x y; case x; case y; clear x y; + intros x y; auto; generalize (N.spec_pos x) (N.spec_pos y). + generalize (N.spec_compare y x); case N.compare; auto with zarith. + generalize (N.spec_compare y N.zero); case N.compare; + try rewrite N.spec_0; auto with zarith. + generalize (N.spec_compare x N.zero); case N.compare; + rewrite N.spec_0; auto with zarith. + generalize (N.spec_compare x N.zero); case N.compare; + rewrite N.spec_0; auto with zarith. + generalize (N.spec_compare N.zero y); case N.compare; + try rewrite N.spec_0; auto with zarith. + generalize (N.spec_compare N.zero x); case N.compare; + rewrite N.spec_0; auto with zarith. + generalize (N.spec_compare N.zero x); case N.compare; + rewrite N.spec_0; auto with zarith. + generalize (N.spec_compare x y); case N.compare; auto with zarith. + Qed. + + Definition eq_bool x y := + match compare x y with + | Eq => true + | _ => false + end. + + Theorem spec_eq_bool: forall x y, + if eq_bool x y then to_Z x = to_Z y else to_Z x <> to_Z y. + intros x y; unfold eq_bool; + generalize (spec_compare x y); case compare; auto with zarith. + Qed. + + Definition cmp_sign x y := + match x, y with + | Pos nx, Neg ny => + if N.eq_bool ny N.zero then Eq else Gt + | Neg nx, Pos ny => + if N.eq_bool nx N.zero then Eq else Lt + | _, _ => Eq + end. + + Theorem spec_cmp_sign: forall x y, + match cmp_sign x y with + | Gt => 0 <= to_Z x /\ to_Z y < 0 + | Lt => to_Z x < 0 /\ 0 <= to_Z y + | Eq => True + end. + Proof. + intros [x | x] [y | y]; unfold cmp_sign; auto. + generalize (N.spec_eq_bool y N.zero); case N.eq_bool; auto. + rewrite N.spec_0; unfold to_Z. + generalize (N.spec_pos x) (N.spec_pos y); auto with zarith. + generalize (N.spec_eq_bool x N.zero); case N.eq_bool; auto. + rewrite N.spec_0; unfold to_Z. + generalize (N.spec_pos x) (N.spec_pos y); auto with zarith. + Qed. + + Definition to_N x := + match x with + | Pos nx => nx + | Neg nx => nx + end. + + Definition abs x := Pos (to_N x). + + Theorem spec_abs: forall x, to_Z (abs x) = Zabs (to_Z x). + intros x; case x; clear x; intros x; assert (F:=N.spec_pos x). + simpl; rewrite Zabs_eq; auto. + simpl; rewrite Zabs_non_eq; simpl; auto with zarith. + Qed. + + Definition opp x := + match x with + | Pos nx => Neg nx + | Neg nx => Pos nx + end. + + Theorem spec_opp: forall x, to_Z (opp x) = - to_Z x. + intros x; case x; simpl; auto with zarith. + Qed. + + Definition succ x := + match x with + | Pos n => Pos (N.succ n) + | Neg n => + match N.compare N.zero n with + | Lt => Neg (N.pred n) + | _ => one + end + end. + + Theorem spec_succ: forall n, to_Z (succ n) = to_Z n + 1. + intros x; case x; clear x; intros x. + exact (N.spec_succ x). + simpl; generalize (N.spec_compare N.zero x); case N.compare; + rewrite N.spec_0; simpl. + intros HH; rewrite <- HH; rewrite N.spec_1; ring. + intros HH; rewrite N.spec_pred; auto with zarith. + generalize (N.spec_pos x); auto with zarith. + Qed. + + Definition add x y := + match x, y with + | Pos nx, Pos ny => Pos (N.add nx ny) + | Pos nx, Neg ny => + match N.compare nx ny with + | Gt => Pos (N.sub nx ny) + | Eq => zero + | Lt => Neg (N.sub ny nx) + end + | Neg nx, Pos ny => + match N.compare nx ny with + | Gt => Neg (N.sub nx ny) + | Eq => zero + | Lt => Pos (N.sub ny nx) + end + | Neg nx, Neg ny => Neg (N.add nx ny) + end. + + Theorem spec_add: forall x y, to_Z (add x y) = to_Z x + to_Z y. + unfold add, to_Z; intros [x | x] [y | y]. + exact (N.spec_add x y). + unfold zero; generalize (N.spec_compare x y); case N.compare. + rewrite N.spec_0; auto with zarith. + intros; rewrite N.spec_sub; try ring; auto with zarith. + intros; rewrite N.spec_sub; try ring; auto with zarith. + unfold zero; generalize (N.spec_compare x y); case N.compare. + rewrite N.spec_0; auto with zarith. + intros; rewrite N.spec_sub; try ring; auto with zarith. + intros; rewrite N.spec_sub; try ring; auto with zarith. + intros; rewrite N.spec_add; try ring; auto with zarith. + Qed. + + Definition pred x := + match x with + | Pos nx => + match N.compare N.zero nx with + | Lt => Pos (N.pred nx) + | _ => minus_one + end + | Neg nx => Neg (N.succ nx) + end. + + Theorem spec_pred: forall x, to_Z (pred x) = to_Z x - 1. + unfold pred, to_Z, minus_one; intros [x | x]. + generalize (N.spec_compare N.zero x); case N.compare; + rewrite N.spec_0; try rewrite N.spec_1; auto with zarith. + intros H; exact (N.spec_pred _ H). + generalize (N.spec_pos x); auto with zarith. + rewrite N.spec_succ; ring. + Qed. + + Definition sub x y := + match x, y with + | Pos nx, Pos ny => + match N.compare nx ny with + | Gt => Pos (N.sub nx ny) + | Eq => zero + | Lt => Neg (N.sub ny nx) + end + | Pos nx, Neg ny => Pos (N.add nx ny) + | Neg nx, Pos ny => Neg (N.add nx ny) + | Neg nx, Neg ny => + match N.compare nx ny with + | Gt => Neg (N.sub nx ny) + | Eq => zero + | Lt => Pos (N.sub ny nx) + end + end. + + Theorem spec_sub: forall x y, to_Z (sub x y) = to_Z x - to_Z y. + unfold sub, to_Z; intros [x | x] [y | y]. + unfold zero; generalize (N.spec_compare x y); case N.compare. + rewrite N.spec_0; auto with zarith. + intros; rewrite N.spec_sub; try ring; auto with zarith. + intros; rewrite N.spec_sub; try ring; auto with zarith. + rewrite N.spec_add; ring. + rewrite N.spec_add; ring. + unfold zero; generalize (N.spec_compare x y); case N.compare. + rewrite N.spec_0; auto with zarith. + intros; rewrite N.spec_sub; try ring; auto with zarith. + intros; rewrite N.spec_sub; try ring; auto with zarith. + Qed. + + Definition mul x y := + match x, y with + | Pos nx, Pos ny => Pos (N.mul nx ny) + | Pos nx, Neg ny => Neg (N.mul nx ny) + | Neg nx, Pos ny => Neg (N.mul nx ny) + | Neg nx, Neg ny => Pos (N.mul nx ny) + end. + + + Theorem spec_mul: forall x y, to_Z (mul x y) = to_Z x * to_Z y. + unfold mul, to_Z; intros [x | x] [y | y]; rewrite N.spec_mul; ring. + Qed. + + Definition square x := + match x with + | Pos nx => Pos (N.square nx) + | Neg nx => Pos (N.square nx) + end. + + Theorem spec_square: forall x, to_Z (square x) = to_Z x * to_Z x. + unfold square, to_Z; intros [x | x]; rewrite N.spec_square; ring. + Qed. + + Definition power_pos x p := + match x with + | Pos nx => Pos (N.power_pos nx p) + | Neg nx => + match p with + | xH => x + | xO _ => Pos (N.power_pos nx p) + | xI _ => Neg (N.power_pos nx p) + end + end. + + Theorem spec_power_pos: forall x n, to_Z (power_pos x n) = to_Z x ^ Zpos n. + assert (F0: forall x, (-x)^2 = x^2). + intros x; rewrite Zpower_2; ring. + unfold power_pos, to_Z; intros [x | x] [p | p |]; + try rewrite N.spec_power_pos; try ring. + assert (F: 0 <= 2 * Zpos p). + assert (0 <= Zpos p); auto with zarith. + rewrite Zpos_xI; repeat rewrite Zpower_exp; auto with zarith. + repeat rewrite Zpower_mult; auto with zarith. + rewrite F0; ring. + assert (F: 0 <= 2 * Zpos p). + assert (0 <= Zpos p); auto with zarith. + rewrite Zpos_xO; repeat rewrite Zpower_exp; auto with zarith. + repeat rewrite Zpower_mult; auto with zarith. + rewrite F0; ring. + Qed. + + Definition sqrt x := + match x with + | Pos nx => Pos (N.sqrt nx) + | Neg nx => Neg N.zero + end. + + + Theorem spec_sqrt: forall x, 0 <= to_Z x -> + to_Z (sqrt x) ^ 2 <= to_Z x < (to_Z (sqrt x) + 1) ^ 2. + unfold to_Z, sqrt; intros [x | x] H. + exact (N.spec_sqrt x). + replace (N.to_Z x) with 0. + rewrite N.spec_0; simpl Zpower; unfold Zpower_pos, iter_pos; + auto with zarith. + generalize (N.spec_pos x); auto with zarith. + Qed. + + Definition div_eucl x y := + match x, y with + | Pos nx, Pos ny => + let (q, r) := N.div_eucl nx ny in + (Pos q, Pos r) + | Pos nx, Neg ny => + let (q, r) := N.div_eucl nx ny in + match N.compare N.zero r with + | Eq => (Neg q, zero) + | _ => (Neg (N.succ q), Neg (N.sub ny r)) + end + | Neg nx, Pos ny => + let (q, r) := N.div_eucl nx ny in + match N.compare N.zero r with + | Eq => (Neg q, zero) + | _ => (Neg (N.succ q), Pos (N.sub ny r)) + end + | Neg nx, Neg ny => + let (q, r) := N.div_eucl nx ny in + (Pos q, Neg r) + end. + + + Theorem spec_div_eucl: forall x y, + to_Z y <> 0 -> + let (q,r) := div_eucl x y in + (to_Z q, to_Z r) = Zdiv_eucl (to_Z x) (to_Z y). + unfold div_eucl, to_Z; intros [x | x] [y | y] H. + assert (H1: 0 < N.to_Z y). + generalize (N.spec_pos y); auto with zarith. + generalize (N.spec_div_eucl x y H1); case N.div_eucl; auto. + assert (HH: 0 < N.to_Z y). + generalize (N.spec_pos y); auto with zarith. + generalize (N.spec_div_eucl x y HH); case N.div_eucl; auto. + intros q r; generalize (N.spec_pos x) HH; unfold Zdiv_eucl; + case_eq (N.to_Z x); case_eq (N.to_Z y); + try (intros; apply False_ind; auto with zarith; fail). + intros p He1 He2 _ _ H1; injection H1; intros H2 H3. + generalize (N.spec_compare N.zero r); case N.compare; + unfold zero; rewrite N.spec_0; try rewrite H3; auto. + rewrite H2; intros; apply False_ind; auto with zarith. + rewrite H2; intros; apply False_ind; auto with zarith. + intros p _ _ _ H1; discriminate H1. + intros p He p1 He1 H1 _. + generalize (N.spec_compare N.zero r); case N.compare. + change (- Zpos p) with (Zneg p). + unfold zero; lazy zeta. + rewrite N.spec_0; intros H2; rewrite <- H2. + intros H3; rewrite <- H3; auto. + rewrite N.spec_0; intros H2. + change (- Zpos p) with (Zneg p); lazy iota beta. + intros H3; rewrite <- H3; auto. + rewrite N.spec_succ; rewrite N.spec_sub. + generalize H2; case (N.to_Z r). + intros; apply False_ind; auto with zarith. + intros p2 _; rewrite He; auto with zarith. + change (Zneg p) with (- (Zpos p)); apply f_equal2 with (f := @pair Z Z); ring. + intros p2 H4; discriminate H4. + assert (N.to_Z r = (Zpos p1 mod (Zpos p))). + unfold Zmod, Zdiv_eucl; rewrite <- H3; auto. + case (Z_mod_lt (Zpos p1) (Zpos p)); auto with zarith. + rewrite N.spec_0; intros H2; generalize (N.spec_pos r); + intros; apply False_ind; auto with zarith. + assert (HH: 0 < N.to_Z y). + generalize (N.spec_pos y); auto with zarith. + generalize (N.spec_div_eucl x y HH); case N.div_eucl; auto. + intros q r; generalize (N.spec_pos x) HH; unfold Zdiv_eucl; + case_eq (N.to_Z x); case_eq (N.to_Z y); + try (intros; apply False_ind; auto with zarith; fail). + intros p He1 He2 _ _ H1; injection H1; intros H2 H3. + generalize (N.spec_compare N.zero r); case N.compare; + unfold zero; rewrite N.spec_0; try rewrite H3; auto. + rewrite H2; intros; apply False_ind; auto with zarith. + rewrite H2; intros; apply False_ind; auto with zarith. + intros p _ _ _ H1; discriminate H1. + intros p He p1 He1 H1 _. + generalize (N.spec_compare N.zero r); case N.compare. + change (- Zpos p1) with (Zneg p1). + unfold zero; lazy zeta. + rewrite N.spec_0; intros H2; rewrite <- H2. + intros H3; rewrite <- H3; auto. + rewrite N.spec_0; intros H2. + change (- Zpos p1) with (Zneg p1); lazy iota beta. + intros H3; rewrite <- H3; auto. + rewrite N.spec_succ; rewrite N.spec_sub. + generalize H2; case (N.to_Z r). + intros; apply False_ind; auto with zarith. + intros p2 _; rewrite He; auto with zarith. + intros p2 H4; discriminate H4. + assert (N.to_Z r = (Zpos p1 mod (Zpos p))). + unfold Zmod, Zdiv_eucl; rewrite <- H3; auto. + case (Z_mod_lt (Zpos p1) (Zpos p)); auto with zarith. + rewrite N.spec_0; generalize (N.spec_pos r); intros; apply False_ind; auto with zarith. + assert (H1: 0 < N.to_Z y). + generalize (N.spec_pos y); auto with zarith. + generalize (N.spec_div_eucl x y H1); case N.div_eucl; auto. + intros q r; generalize (N.spec_pos x) H1; unfold Zdiv_eucl; + case_eq (N.to_Z x); case_eq (N.to_Z y); + try (intros; apply False_ind; auto with zarith; fail). + change (-0) with 0; lazy iota beta; auto. + intros p _ _ _ _ H2; injection H2. + intros H3 H4; rewrite H3; rewrite H4; auto. + intros p _ _ _ H2; discriminate H2. + intros p He p1 He1 _ _ H2. + change (- Zpos p1) with (Zneg p1); lazy iota beta. + change (- Zpos p) with (Zneg p); lazy iota beta. + rewrite <- H2; auto. + Qed. + + Definition div x y := fst (div_eucl x y). + + Definition spec_div: forall x y, + to_Z y <> 0 -> to_Z (div x y) = to_Z x / to_Z y. + intros x y H1; generalize (spec_div_eucl x y H1); unfold div, Zdiv. + case div_eucl; case Zdiv_eucl; simpl; auto. + intros q r q11 r1 H; injection H; auto. + Qed. + + Definition modulo x y := snd (div_eucl x y). + + Theorem spec_modulo: + forall x y, to_Z y <> 0 -> to_Z (modulo x y) = to_Z x mod to_Z y. + intros x y H1; generalize (spec_div_eucl x y H1); unfold modulo, Zmod. + case div_eucl; case Zdiv_eucl; simpl; auto. + intros q r q11 r1 H; injection H; auto. + Qed. + + Definition gcd x y := + match x, y with + | Pos nx, Pos ny => Pos (N.gcd nx ny) + | Pos nx, Neg ny => Pos (N.gcd nx ny) + | Neg nx, Pos ny => Pos (N.gcd nx ny) + | Neg nx, Neg ny => Pos (N.gcd nx ny) + end. + + Theorem spec_gcd: forall a b, to_Z (gcd a b) = Zgcd (to_Z a) (to_Z b). + unfold gcd, Zgcd, to_Z; intros [x | x] [y | y]; rewrite N.spec_gcd; unfold Zgcd; + auto; case N.to_Z; simpl; auto with zarith; + try rewrite Zabs_Zopp; auto; + case N.to_Z; simpl; auto with zarith. + Qed. + +End Make. diff --git a/theories/Numbers/Integer/Binary/ZBinary.v b/theories/Numbers/Integer/Binary/ZBinary.v new file mode 100644 index 00000000..66d2a96a --- /dev/null +++ b/theories/Numbers/Integer/Binary/ZBinary.v @@ -0,0 +1,249 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* NZeq as NZsucc_wd. +Proof. +congruence. +Qed. + +Add Morphism NZpred with signature NZeq ==> NZeq as NZpred_wd. +Proof. +congruence. +Qed. + +Add Morphism NZadd with signature NZeq ==> NZeq ==> NZeq as NZadd_wd. +Proof. +congruence. +Qed. + +Add Morphism NZsub with signature NZeq ==> NZeq ==> NZeq as NZsub_wd. +Proof. +congruence. +Qed. + +Add Morphism NZmul with signature NZeq ==> NZeq ==> NZeq as NZmul_wd. +Proof. +congruence. +Qed. + +Theorem NZpred_succ : forall n : Z, NZpred (NZsucc n) = n. +Proof. +exact Zpred'_succ'. +Qed. + +Theorem NZinduction : + forall A : Z -> Prop, predicate_wd NZeq A -> + A 0 -> (forall n : Z, A n <-> A (NZsucc n)) -> forall n : Z, A n. +Proof. +intros A A_wd A0 AS n; apply Zind; clear n. +assumption. +intros; now apply -> AS. +intros n H. rewrite <- (Zsucc'_pred' n) in H. now apply <- AS. +Qed. + +Theorem NZadd_0_l : forall n : Z, 0 + n = n. +Proof. +exact Zplus_0_l. +Qed. + +Theorem NZadd_succ_l : forall n m : Z, (NZsucc n) + m = NZsucc (n + m). +Proof. +intros; do 2 rewrite <- Zsucc_succ'; apply Zplus_succ_l. +Qed. + +Theorem NZsub_0_r : forall n : Z, n - 0 = n. +Proof. +exact Zminus_0_r. +Qed. + +Theorem NZsub_succ_r : forall n m : Z, n - (NZsucc m) = NZpred (n - m). +Proof. +intros; rewrite <- Zsucc_succ'; rewrite <- Zpred_pred'; +apply Zminus_succ_r. +Qed. + +Theorem NZmul_0_l : forall n : Z, 0 * n = 0. +Proof. +reflexivity. +Qed. + +Theorem NZmul_succ_l : forall n m : Z, (NZsucc n) * m = n * m + m. +Proof. +intros; rewrite <- Zsucc_succ'; apply Zmult_succ_l. +Qed. + +End NZAxiomsMod. + +Definition NZlt := Zlt. +Definition NZle := Zle. +Definition NZmin := Zmin. +Definition NZmax := Zmax. + +Add Morphism NZlt with signature NZeq ==> NZeq ==> iff as NZlt_wd. +Proof. +unfold NZeq. intros n1 n2 H1 m1 m2 H2; rewrite H1; now rewrite H2. +Qed. + +Add Morphism NZle with signature NZeq ==> NZeq ==> iff as NZle_wd. +Proof. +unfold NZeq. intros n1 n2 H1 m1 m2 H2; rewrite H1; now rewrite H2. +Qed. + +Add Morphism NZmin with signature NZeq ==> NZeq ==> NZeq as NZmin_wd. +Proof. +congruence. +Qed. + +Add Morphism NZmax with signature NZeq ==> NZeq ==> NZeq as NZmax_wd. +Proof. +congruence. +Qed. + +Theorem NZlt_eq_cases : forall n m : Z, n <= m <-> n < m \/ n = m. +Proof. +intros n m; split. apply Zle_lt_or_eq. +intro H; destruct H as [H | H]. now apply Zlt_le_weak. rewrite H; apply Zle_refl. +Qed. + +Theorem NZlt_irrefl : forall n : Z, ~ n < n. +Proof. +exact Zlt_irrefl. +Qed. + +Theorem NZlt_succ_r : forall n m : Z, n < (NZsucc m) <-> n <= m. +Proof. +intros; unfold NZsucc; rewrite <- Zsucc_succ'; split; +[apply Zlt_succ_le | apply Zle_lt_succ]. +Qed. + +Theorem NZmin_l : forall n m : NZ, n <= m -> NZmin n m = n. +Proof. +unfold NZmin, Zmin, Zle; intros n m H. +destruct (n ?= m); try reflexivity. now elim H. +Qed. + +Theorem NZmin_r : forall n m : NZ, m <= n -> NZmin n m = m. +Proof. +unfold NZmin, Zmin, Zle; intros n m H. +case_eq (n ?= m); intro H1; try reflexivity. +now apply Zcompare_Eq_eq. +apply <- Zcompare_Gt_Lt_antisym in H1. now elim H. +Qed. + +Theorem NZmax_l : forall n m : NZ, m <= n -> NZmax n m = n. +Proof. +unfold NZmax, Zmax, Zle; intros n m H. +case_eq (n ?= m); intro H1; try reflexivity. +apply <- Zcompare_Gt_Lt_antisym in H1. now elim H. +Qed. + +Theorem NZmax_r : forall n m : NZ, n <= m -> NZmax n m = m. +Proof. +unfold NZmax, Zmax, Zle; intros n m H. +case_eq (n ?= m); intro H1. +now apply Zcompare_Eq_eq. reflexivity. now elim H. +Qed. + +End NZOrdAxiomsMod. + +Definition Zopp (x : Z) := +match x with +| Z0 => Z0 +| Zpos x => Zneg x +| Zneg x => Zpos x +end. + +Add Morphism Zopp with signature NZeq ==> NZeq as Zopp_wd. +Proof. +congruence. +Qed. + +Theorem Zsucc_pred : forall n : Z, NZsucc (NZpred n) = n. +Proof. +exact Zsucc'_pred'. +Qed. + +Theorem Zopp_0 : - 0 = 0. +Proof. +reflexivity. +Qed. + +Theorem Zopp_succ : forall n : Z, - (NZsucc n) = NZpred (- n). +Proof. +intro; rewrite <- Zsucc_succ'; rewrite <- Zpred_pred'. apply Zopp_succ. +Qed. + +End ZBinAxiomsMod. + +Module Export ZBinMulOrderPropMod := ZMulOrderPropFunct ZBinAxiomsMod. + +(** Z forms a ring *) + +(*Lemma Zring : ring_theory 0 1 NZadd NZmul NZsub Zopp NZeq. +Proof. +constructor. +exact Zadd_0_l. +exact Zadd_comm. +exact Zadd_assoc. +exact Zmul_1_l. +exact Zmul_comm. +exact Zmul_assoc. +exact Zmul_add_distr_r. +intros; now rewrite Zadd_opp_minus. +exact Zadd_opp_r. +Qed. + +Add Ring ZR : Zring.*) + + + +(* +Theorem eq_equiv_e : forall x y : Z, E x y <-> e x y. +Proof. +intros x y; unfold E, e, Zeq_bool; split; intro H. +rewrite H; now rewrite Zcompare_refl. +rewrite eq_true_unfold_pos in H. +assert (H1 : (x ?= y) = Eq). +case_eq (x ?= y); intro H1; rewrite H1 in H; simpl in H; +[reflexivity | discriminate H | discriminate H]. +now apply Zcompare_Eq_eq. +Qed. +*) diff --git a/theories/Numbers/Integer/NatPairs/ZNatPairs.v b/theories/Numbers/Integer/NatPairs/ZNatPairs.v new file mode 100644 index 00000000..8b3d815d --- /dev/null +++ b/theories/Numbers/Integer/NatPairs/ZNatPairs.v @@ -0,0 +1,422 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* (fst p1 + snd p2) = (fst p2 + snd p1), +we will provide an extra layer of definitions. *) + +Definition Z := (N * N)%type. +Definition Z0 : Z := (0, 0). +Definition Zeq (p1 p2 : Z) := ((fst p1) + (snd p2) == (fst p2) + (snd p1)). +Definition Zsucc (n : Z) : Z := (S (fst n), snd n). +Definition Zpred (n : Z) : Z := (fst n, S (snd n)). + +(* We do not have Zpred (Zsucc n) = n but only Zpred (Zsucc n) == n. It +could be possible to consider as canonical only pairs where one of the +elements is 0, and make all operations convert canonical values into other +canonical values. In that case, we could get rid of setoids and arrive at +integers as signed natural numbers. *) + +Definition Zadd (n m : Z) : Z := ((fst n) + (fst m), (snd n) + (snd m)). +Definition Zsub (n m : Z) : Z := ((fst n) + (snd m), (snd n) + (fst m)). + +(* Unfortunately, the elements of the pair keep increasing, even during +subtraction *) + +Definition Zmul (n m : Z) : Z := + ((fst n) * (fst m) + (snd n) * (snd m), (fst n) * (snd m) + (snd n) * (fst m)). +Definition Zlt (n m : Z) := (fst n) + (snd m) < (fst m) + (snd n). +Definition Zle (n m : Z) := (fst n) + (snd m) <= (fst m) + (snd n). +Definition Zmin (n m : Z) := (min ((fst n) + (snd m)) ((fst m) + (snd n)), (snd n) + (snd m)). +Definition Zmax (n m : Z) := (max ((fst n) + (snd m)) ((fst m) + (snd n)), (snd n) + (snd m)). + +Delimit Scope IntScope with Int. +Bind Scope IntScope with Z. +Notation "x == y" := (Zeq x y) (at level 70) : IntScope. +Notation "x ~= y" := (~ Zeq x y) (at level 70) : IntScope. +Notation "0" := Z0 : IntScope. +Notation "1" := (Zsucc Z0) : IntScope. +Notation "x + y" := (Zadd x y) : IntScope. +Notation "x - y" := (Zsub x y) : IntScope. +Notation "x * y" := (Zmul x y) : IntScope. +Notation "x < y" := (Zlt x y) : IntScope. +Notation "x <= y" := (Zle x y) : IntScope. +Notation "x > y" := (Zlt y x) (only parsing) : IntScope. +Notation "x >= y" := (Zle y x) (only parsing) : IntScope. + +Notation Local N := NZ. +(* To remember N without having to use a long qualifying name. since NZ will be redefined *) +Notation Local NE := NZeq (only parsing). +Notation Local add_wd := NZadd_wd (only parsing). + +Module Export NZOrdAxiomsMod <: NZOrdAxiomsSig. +Module Export NZAxiomsMod <: NZAxiomsSig. + +Definition NZ : Type := Z. +Definition NZeq := Zeq. +Definition NZ0 := Z0. +Definition NZsucc := Zsucc. +Definition NZpred := Zpred. +Definition NZadd := Zadd. +Definition NZsub := Zsub. +Definition NZmul := Zmul. + +Theorem ZE_refl : reflexive Z Zeq. +Proof. +unfold reflexive, Zeq. reflexivity. +Qed. + +Theorem ZE_symm : symmetric Z Zeq. +Proof. +unfold symmetric, Zeq; now symmetry. +Qed. + +Theorem ZE_trans : transitive Z Zeq. +Proof. +unfold transitive, Zeq. intros n m p H1 H2. +assert (H3 : (fst n + snd m) + (fst m + snd p) == (fst m + snd n) + (fst p + snd m)) +by now apply add_wd. +stepl ((fst n + snd p) + (fst m + snd m)) in H3 by ring. +stepr ((fst p + snd n) + (fst m + snd m)) in H3 by ring. +now apply -> add_cancel_r in H3. +Qed. + +Theorem NZeq_equiv : equiv Z Zeq. +Proof. +unfold equiv; repeat split; [apply ZE_refl | apply ZE_trans | apply ZE_symm]. +Qed. + +Add Relation Z Zeq + reflexivity proved by (proj1 NZeq_equiv) + symmetry proved by (proj2 (proj2 NZeq_equiv)) + transitivity proved by (proj1 (proj2 NZeq_equiv)) +as NZeq_rel. + +Add Morphism (@pair N N) with signature NE ==> NE ==> Zeq as Zpair_wd. +Proof. +intros n1 n2 H1 m1 m2 H2; unfold Zeq; simpl; rewrite H1; now rewrite H2. +Qed. + +Add Morphism NZsucc with signature Zeq ==> Zeq as NZsucc_wd. +Proof. +unfold NZsucc, Zeq; intros n m H; simpl. +do 2 rewrite add_succ_l; now rewrite H. +Qed. + +Add Morphism NZpred with signature Zeq ==> Zeq as NZpred_wd. +Proof. +unfold NZpred, Zeq; intros n m H; simpl. +do 2 rewrite add_succ_r; now rewrite H. +Qed. + +Add Morphism NZadd with signature Zeq ==> Zeq ==> Zeq as NZadd_wd. +Proof. +unfold Zeq, NZadd; intros n1 m1 H1 n2 m2 H2; simpl. +assert (H3 : (fst n1 + snd m1) + (fst n2 + snd m2) == (fst m1 + snd n1) + (fst m2 + snd n2)) +by now apply add_wd. +stepl (fst n1 + snd m1 + (fst n2 + snd m2)) by ring. +now stepr (fst m1 + snd n1 + (fst m2 + snd n2)) by ring. +Qed. + +Add Morphism NZsub with signature Zeq ==> Zeq ==> Zeq as NZsub_wd. +Proof. +unfold Zeq, NZsub; intros n1 m1 H1 n2 m2 H2; simpl. +symmetry in H2. +assert (H3 : (fst n1 + snd m1) + (fst m2 + snd n2) == (fst m1 + snd n1) + (fst n2 + snd m2)) +by now apply add_wd. +stepl (fst n1 + snd m1 + (fst m2 + snd n2)) by ring. +now stepr (fst m1 + snd n1 + (fst n2 + snd m2)) by ring. +Qed. + +Add Morphism NZmul with signature Zeq ==> Zeq ==> Zeq as NZmul_wd. +Proof. +unfold NZmul, Zeq; intros n1 m1 H1 n2 m2 H2; simpl. +stepl (fst n1 * fst n2 + (snd n1 * snd n2 + fst m1 * snd m2 + snd m1 * fst m2)) by ring. +stepr (fst n1 * snd n2 + (fst m1 * fst m2 + snd m1 * snd m2 + snd n1 * fst n2)) by ring. +apply add_mul_repl_pair with (n := fst m2) (m := snd m2); [| now idtac]. +stepl (snd n1 * snd n2 + (fst n1 * fst m2 + fst m1 * snd m2 + snd m1 * fst m2)) by ring. +stepr (snd n1 * fst n2 + (fst n1 * snd m2 + fst m1 * fst m2 + snd m1 * snd m2)) by ring. +apply add_mul_repl_pair with (n := snd m2) (m := fst m2); +[| (stepl (fst n2 + snd m2) by ring); now stepr (fst m2 + snd n2) by ring]. +stepl (snd m2 * snd n1 + (fst n1 * fst m2 + fst m1 * snd m2 + snd m1 * fst m2)) by ring. +stepr (snd m2 * fst n1 + (snd n1 * fst m2 + fst m1 * fst m2 + snd m1 * snd m2)) by ring. +apply add_mul_repl_pair with (n := snd m1) (m := fst m1); +[ | (stepl (fst n1 + snd m1) by ring); now stepr (fst m1 + snd n1) by ring]. +stepl (fst m2 * fst n1 + (snd m2 * snd m1 + fst m1 * snd m2 + snd m1 * fst m2)) by ring. +stepr (fst m2 * snd n1 + (snd m2 * fst m1 + fst m1 * fst m2 + snd m1 * snd m2)) by ring. +apply add_mul_repl_pair with (n := fst m1) (m := snd m1); [| now idtac]. +ring. +Qed. + +Section Induction. +Open Scope NatScope. (* automatically closes at the end of the section *) +Variable A : Z -> Prop. +Hypothesis A_wd : predicate_wd Zeq A. + +Add Morphism A with signature Zeq ==> iff as A_morph. +Proof. +exact A_wd. +Qed. + +Theorem NZinduction : + A 0 -> (forall n : Z, A n <-> A (Zsucc n)) -> forall n : Z, A n. (* 0 is interpreted as in Z due to "Bind" directive *) +Proof. +intros A0 AS n; unfold NZ0, Zsucc, predicate_wd, fun_wd, Zeq in *. +destruct n as [n m]. +cut (forall p : N, A (p, 0)); [intro H1 |]. +cut (forall p : N, A (0, p)); [intro H2 |]. +destruct (add_dichotomy n m) as [[p H] | [p H]]. +rewrite (A_wd (n, m) (0, p)) by (rewrite add_0_l; now rewrite add_comm). +apply H2. +rewrite (A_wd (n, m) (p, 0)) by now rewrite add_0_r. apply H1. +induct p. assumption. intros p IH. +apply -> (A_wd (0, p) (1, S p)) in IH; [| now rewrite add_0_l, add_1_l]. +now apply <- AS. +induct p. assumption. intros p IH. +replace 0 with (snd (p, 0)); [| reflexivity]. +replace (S p) with (S (fst (p, 0))); [| reflexivity]. now apply -> AS. +Qed. + +End Induction. + +(* Time to prove theorems in the language of Z *) + +Open Local Scope IntScope. + +Theorem NZpred_succ : forall n : Z, Zpred (Zsucc n) == n. +Proof. +unfold NZpred, NZsucc, Zeq; intro n; simpl. +rewrite add_succ_l; now rewrite add_succ_r. +Qed. + +Theorem NZadd_0_l : forall n : Z, 0 + n == n. +Proof. +intro n; unfold NZadd, Zeq; simpl. now do 2 rewrite add_0_l. +Qed. + +Theorem NZadd_succ_l : forall n m : Z, (Zsucc n) + m == Zsucc (n + m). +Proof. +intros n m; unfold NZadd, Zeq; simpl. now do 2 rewrite add_succ_l. +Qed. + +Theorem NZsub_0_r : forall n : Z, n - 0 == n. +Proof. +intro n; unfold NZsub, Zeq; simpl. now do 2 rewrite add_0_r. +Qed. + +Theorem NZsub_succ_r : forall n m : Z, n - (Zsucc m) == Zpred (n - m). +Proof. +intros n m; unfold NZsub, Zeq; simpl. symmetry; now rewrite add_succ_r. +Qed. + +Theorem NZmul_0_l : forall n : Z, 0 * n == 0. +Proof. +intro n; unfold NZmul, Zeq; simpl. +repeat rewrite mul_0_l. now rewrite add_assoc. +Qed. + +Theorem NZmul_succ_l : forall n m : Z, (Zsucc n) * m == n * m + m. +Proof. +intros n m; unfold NZmul, NZsucc, Zeq; simpl. +do 2 rewrite mul_succ_l. ring. +Qed. + +End NZAxiomsMod. + +Definition NZlt := Zlt. +Definition NZle := Zle. +Definition NZmin := Zmin. +Definition NZmax := Zmax. + +Add Morphism NZlt with signature Zeq ==> Zeq ==> iff as NZlt_wd. +Proof. +unfold NZlt, Zlt, Zeq; intros n1 m1 H1 n2 m2 H2; simpl. split; intro H. +stepr (snd m1 + fst m2) by apply add_comm. +apply (add_lt_repl_pair (fst n1) (snd n1)); [| assumption]. +stepl (snd m2 + fst n1) by apply add_comm. +stepr (fst m2 + snd n1) by apply add_comm. +apply (add_lt_repl_pair (snd n2) (fst n2)). +now stepl (fst n1 + snd n2) by apply add_comm. +stepl (fst m2 + snd n2) by apply add_comm. now stepr (fst n2 + snd m2) by apply add_comm. +stepr (snd n1 + fst n2) by apply add_comm. +apply (add_lt_repl_pair (fst m1) (snd m1)); [| now symmetry]. +stepl (snd n2 + fst m1) by apply add_comm. +stepr (fst n2 + snd m1) by apply add_comm. +apply (add_lt_repl_pair (snd m2) (fst m2)). +now stepl (fst m1 + snd m2) by apply add_comm. +stepl (fst n2 + snd m2) by apply add_comm. now stepr (fst m2 + snd n2) by apply add_comm. +Qed. + +Add Morphism NZle with signature Zeq ==> Zeq ==> iff as NZle_wd. +Proof. +unfold NZle, Zle, Zeq; intros n1 m1 H1 n2 m2 H2; simpl. +do 2 rewrite lt_eq_cases. rewrite (NZlt_wd n1 m1 H1 n2 m2 H2). fold (m1 < m2)%Int. +fold (n1 == n2)%Int (m1 == m2)%Int; fold (n1 == m1)%Int in H1; fold (n2 == m2)%Int in H2. +now rewrite H1, H2. +Qed. + +Add Morphism NZmin with signature Zeq ==> Zeq ==> Zeq as NZmin_wd. +Proof. +intros n1 m1 H1 n2 m2 H2; unfold NZmin, Zeq; simpl. +destruct (le_ge_cases (fst n1 + snd n2) (fst n2 + snd n1)) as [H | H]. +rewrite (min_l (fst n1 + snd n2) (fst n2 + snd n1)) by assumption. +rewrite (min_l (fst m1 + snd m2) (fst m2 + snd m1)) by +now apply -> (NZle_wd n1 m1 H1 n2 m2 H2). +stepl ((fst n1 + snd m1) + (snd n2 + snd m2)) by ring. +unfold Zeq in H1. rewrite H1. ring. +rewrite (min_r (fst n1 + snd n2) (fst n2 + snd n1)) by assumption. +rewrite (min_r (fst m1 + snd m2) (fst m2 + snd m1)) by +now apply -> (NZle_wd n2 m2 H2 n1 m1 H1). +stepl ((fst n2 + snd m2) + (snd n1 + snd m1)) by ring. +unfold Zeq in H2. rewrite H2. ring. +Qed. + +Add Morphism NZmax with signature Zeq ==> Zeq ==> Zeq as NZmax_wd. +Proof. +intros n1 m1 H1 n2 m2 H2; unfold NZmax, Zeq; simpl. +destruct (le_ge_cases (fst n1 + snd n2) (fst n2 + snd n1)) as [H | H]. +rewrite (max_r (fst n1 + snd n2) (fst n2 + snd n1)) by assumption. +rewrite (max_r (fst m1 + snd m2) (fst m2 + snd m1)) by +now apply -> (NZle_wd n1 m1 H1 n2 m2 H2). +stepl ((fst n2 + snd m2) + (snd n1 + snd m1)) by ring. +unfold Zeq in H2. rewrite H2. ring. +rewrite (max_l (fst n1 + snd n2) (fst n2 + snd n1)) by assumption. +rewrite (max_l (fst m1 + snd m2) (fst m2 + snd m1)) by +now apply -> (NZle_wd n2 m2 H2 n1 m1 H1). +stepl ((fst n1 + snd m1) + (snd n2 + snd m2)) by ring. +unfold Zeq in H1. rewrite H1. ring. +Qed. + +Open Local Scope IntScope. + +Theorem NZlt_eq_cases : forall n m : Z, n <= m <-> n < m \/ n == m. +Proof. +intros n m; unfold Zlt, Zle, Zeq; simpl. apply lt_eq_cases. +Qed. + +Theorem NZlt_irrefl : forall n : Z, ~ (n < n). +Proof. +intros n; unfold Zlt, Zeq; simpl. apply lt_irrefl. +Qed. + +Theorem NZlt_succ_r : forall n m : Z, n < (Zsucc m) <-> n <= m. +Proof. +intros n m; unfold Zlt, Zle, Zeq; simpl. rewrite add_succ_l; apply lt_succ_r. +Qed. + +Theorem NZmin_l : forall n m : Z, n <= m -> Zmin n m == n. +Proof. +unfold Zmin, Zle, Zeq; simpl; intros n m H. +rewrite min_l by assumption. ring. +Qed. + +Theorem NZmin_r : forall n m : Z, m <= n -> Zmin n m == m. +Proof. +unfold Zmin, Zle, Zeq; simpl; intros n m H. +rewrite min_r by assumption. ring. +Qed. + +Theorem NZmax_l : forall n m : Z, m <= n -> Zmax n m == n. +Proof. +unfold Zmax, Zle, Zeq; simpl; intros n m H. +rewrite max_l by assumption. ring. +Qed. + +Theorem NZmax_r : forall n m : Z, n <= m -> Zmax n m == m. +Proof. +unfold Zmax, Zle, Zeq; simpl; intros n m H. +rewrite max_r by assumption. ring. +Qed. + +End NZOrdAxiomsMod. + +Definition Zopp (n : Z) : Z := (snd n, fst n). + +Notation "- x" := (Zopp x) : IntScope. + +Add Morphism Zopp with signature Zeq ==> Zeq as Zopp_wd. +Proof. +unfold Zeq; intros n m H; simpl. symmetry. +stepl (fst n + snd m) by apply add_comm. +now stepr (fst m + snd n) by apply add_comm. +Qed. + +Open Local Scope IntScope. + +Theorem Zsucc_pred : forall n : Z, Zsucc (Zpred n) == n. +Proof. +intro n; unfold Zsucc, Zpred, Zeq; simpl. +rewrite add_succ_l; now rewrite add_succ_r. +Qed. + +Theorem Zopp_0 : - 0 == 0. +Proof. +unfold Zopp, Zeq; simpl. now rewrite add_0_l. +Qed. + +Theorem Zopp_succ : forall n, - (Zsucc n) == Zpred (- n). +Proof. +reflexivity. +Qed. + +End ZPairsAxiomsMod. + +(* For example, let's build integers out of pairs of Peano natural numbers +and get their properties *) + +(* The following lines increase the compilation time at least twice *) +(* +Require Import NPeano. + +Module Export ZPairsPeanoAxiomsMod := ZPairsAxiomsMod NPeanoAxiomsMod. +Module Export ZPairsMulOrderPropMod := ZMulOrderPropFunct ZPairsPeanoAxiomsMod. + +Open Local Scope IntScope. + +Eval compute in (3, 5) * (4, 6). +*) + diff --git a/theories/Numbers/Integer/SpecViaZ/ZSig.v b/theories/Numbers/Integer/SpecViaZ/ZSig.v new file mode 100644 index 00000000..0af98c74 --- /dev/null +++ b/theories/Numbers/Integer/SpecViaZ/ZSig.v @@ -0,0 +1,117 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Z. + Notation "[ x ]" := (to_Z x). + + Definition eq x y := ([x] = [y]). + + Parameter of_Z : Z -> t. + Parameter spec_of_Z: forall x, to_Z (of_Z x) = x. + + Parameter zero : t. + Parameter one : t. + Parameter minus_one : t. + + Parameter spec_0: [zero] = 0. + Parameter spec_1: [one] = 1. + Parameter spec_m1: [minus_one] = -1. + + Parameter compare : t -> t -> comparison. + + Parameter spec_compare: forall x y, + match compare x y with + | Eq => [x] = [y] + | Lt => [x] < [y] + | Gt => [x] > [y] + end. + + Definition lt n m := compare n m = Lt. + Definition le n m := compare n m <> Gt. + Definition min n m := match compare n m with Gt => m | _ => n end. + Definition max n m := match compare n m with Lt => m | _ => n end. + + Parameter eq_bool : t -> t -> bool. + + Parameter spec_eq_bool: forall x y, + if eq_bool x y then [x] = [y] else [x] <> [y]. + + Parameter succ : t -> t. + + Parameter spec_succ: forall n, [succ n] = [n] + 1. + + Parameter add : t -> t -> t. + + Parameter spec_add: forall x y, [add x y] = [x] + [y]. + + Parameter pred : t -> t. + + Parameter spec_pred: forall x, [pred x] = [x] - 1. + + Parameter sub : t -> t -> t. + + Parameter spec_sub: forall x y, [sub x y] = [x] - [y]. + + Parameter opp : t -> t. + + Parameter spec_opp: forall x, [opp x] = - [x]. + + Parameter mul : t -> t -> t. + + Parameter spec_mul: forall x y, [mul x y] = [x] * [y]. + + Parameter square : t -> t. + + Parameter spec_square: forall x, [square x] = [x] * [x]. + + Parameter power_pos : t -> positive -> t. + + Parameter spec_power_pos: forall x n, [power_pos x n] = [x] ^ Zpos n. + + Parameter sqrt : t -> t. + + Parameter spec_sqrt: forall x, 0 <= [x] -> + [sqrt x] ^ 2 <= [x] < ([sqrt x] + 1) ^ 2. + + Parameter div_eucl : t -> t -> t * t. + + Parameter spec_div_eucl: forall x y, [y] <> 0 -> + let (q,r) := div_eucl x y in ([q], [r]) = Zdiv_eucl [x] [y]. + + Parameter div : t -> t -> t. + + Parameter spec_div: forall x y, [y] <> 0 -> [div x y] = [x] / [y]. + + Parameter modulo : t -> t -> t. + + Parameter spec_modulo: forall x y, [y] <> 0 -> + [modulo x y] = [x] mod [y]. + + Parameter gcd : t -> t -> t. + + Parameter spec_gcd: forall a b, [gcd a b] = Zgcd (to_Z a) (to_Z b). + +End ZType. diff --git a/theories/Numbers/Integer/SpecViaZ/ZSigZAxioms.v b/theories/Numbers/Integer/SpecViaZ/ZSigZAxioms.v new file mode 100644 index 00000000..d7c56267 --- /dev/null +++ b/theories/Numbers/Integer/SpecViaZ/ZSigZAxioms.v @@ -0,0 +1,306 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Z.eq as NZsucc_wd. +Proof. +intros; zsimpl; f_equal; assumption. +Qed. + +Add Morphism NZpred with signature Z.eq ==> Z.eq as NZpred_wd. +Proof. +intros; zsimpl; f_equal; assumption. +Qed. + +Add Morphism NZadd with signature Z.eq ==> Z.eq ==> Z.eq as NZadd_wd. +Proof. +intros; zsimpl; f_equal; assumption. +Qed. + +Add Morphism NZsub with signature Z.eq ==> Z.eq ==> Z.eq as NZsub_wd. +Proof. +intros; zsimpl; f_equal; assumption. +Qed. + +Add Morphism NZmul with signature Z.eq ==> Z.eq ==> Z.eq as NZmul_wd. +Proof. +intros; zsimpl; f_equal; assumption. +Qed. + +Theorem NZpred_succ : forall n, Z.pred (Z.succ n) == n. +Proof. +intros; zsimpl; auto with zarith. +Qed. + +Section Induction. + +Variable A : Z.t -> Prop. +Hypothesis A_wd : predicate_wd Z.eq A. +Hypothesis A0 : A 0. +Hypothesis AS : forall n, A n <-> A (Z.succ n). + +Add Morphism A with signature Z.eq ==> iff as A_morph. +Proof. apply A_wd. Qed. + +Let B (z : Z) := A (Z.of_Z z). + +Lemma B0 : B 0. +Proof. +unfold B; simpl. +rewrite <- (A_wd 0); auto. +zsimpl; auto. +Qed. + +Lemma BS : forall z : Z, B z -> B (z + 1). +Proof. +intros z H. +unfold B in *. apply -> AS in H. +setoid_replace (Z.of_Z (z + 1)) with (Z.succ (Z.of_Z z)); auto. +zsimpl; auto. +Qed. + +Lemma BP : forall z : Z, B z -> B (z - 1). +Proof. +intros z H. +unfold B in *. rewrite AS. +setoid_replace (Z.succ (Z.of_Z (z - 1))) with (Z.of_Z z); auto. +zsimpl; auto with zarith. +Qed. + +Lemma B_holds : forall z : Z, B z. +Proof. +intros; destruct (Z_lt_le_dec 0 z). +apply natlike_ind; auto with zarith. +apply B0. +intros; apply BS; auto. +replace z with (-(-z))%Z in * by (auto with zarith). +remember (-z)%Z as z'. +pattern z'; apply natlike_ind. +apply B0. +intros; rewrite Zopp_succ; unfold Zpred; apply BP; auto. +subst z'; auto with zarith. +Qed. + +Theorem NZinduction : forall n, A n. +Proof. +intro n. setoid_replace n with (Z.of_Z (Z.to_Z n)). +apply B_holds. +zsimpl; auto. +Qed. + +End Induction. + +Theorem NZadd_0_l : forall n, 0 + n == n. +Proof. +intros; zsimpl; auto with zarith. +Qed. + +Theorem NZadd_succ_l : forall n m, (Z.succ n) + m == Z.succ (n + m). +Proof. +intros; zsimpl; auto with zarith. +Qed. + +Theorem NZsub_0_r : forall n, n - 0 == n. +Proof. +intros; zsimpl; auto with zarith. +Qed. + +Theorem NZsub_succ_r : forall n m, n - (Z.succ m) == Z.pred (n - m). +Proof. +intros; zsimpl; auto with zarith. +Qed. + +Theorem NZmul_0_l : forall n, 0 * n == 0. +Proof. +intros; zsimpl; auto with zarith. +Qed. + +Theorem NZmul_succ_l : forall n m, (Z.succ n) * m == n * m + m. +Proof. +intros; zsimpl; ring. +Qed. + +End NZAxiomsMod. + +Definition NZlt := Z.lt. +Definition NZle := Z.le. +Definition NZmin := Z.min. +Definition NZmax := Z.max. + +Infix "<=" := Z.le : IntScope. +Infix "<" := Z.lt : IntScope. + +Lemma spec_compare_alt : forall x y, Z.compare x y = ([x] ?= [y])%Z. +Proof. + intros; generalize (Z.spec_compare x y). + destruct (Z.compare x y); auto. + intros H; rewrite H; symmetry; apply Zcompare_refl. +Qed. + +Lemma spec_lt : forall x y, (x ([x]<[y])%Z. +Proof. + intros; unfold Z.lt, Zlt; rewrite spec_compare_alt; intuition. +Qed. + +Lemma spec_le : forall x y, (x<=y) <-> ([x]<=[y])%Z. +Proof. + intros; unfold Z.le, Zle; rewrite spec_compare_alt; intuition. +Qed. + +Lemma spec_min : forall x y, [Z.min x y] = Zmin [x] [y]. +Proof. + intros; unfold Z.min, Zmin. + rewrite spec_compare_alt; destruct Zcompare; auto. +Qed. + +Lemma spec_max : forall x y, [Z.max x y] = Zmax [x] [y]. +Proof. + intros; unfold Z.max, Zmax. + rewrite spec_compare_alt; destruct Zcompare; auto. +Qed. + +Add Morphism Z.compare with signature Z.eq ==> Z.eq ==> (@eq comparison) as compare_wd. +Proof. +intros x x' Hx y y' Hy. +rewrite 2 spec_compare_alt; rewrite Hx, Hy; intuition. +Qed. + +Add Morphism Z.lt with signature Z.eq ==> Z.eq ==> iff as NZlt_wd. +Proof. +intros x x' Hx y y' Hy; unfold Z.lt; rewrite Hx, Hy; intuition. +Qed. + +Add Morphism Z.le with signature Z.eq ==> Z.eq ==> iff as NZle_wd. +Proof. +intros x x' Hx y y' Hy; unfold Z.le; rewrite Hx, Hy; intuition. +Qed. + +Add Morphism Z.min with signature Z.eq ==> Z.eq ==> Z.eq as NZmin_wd. +Proof. +intros; red; rewrite 2 spec_min; congruence. +Qed. + +Add Morphism Z.max with signature Z.eq ==> Z.eq ==> Z.eq as NZmax_wd. +Proof. +intros; red; rewrite 2 spec_max; congruence. +Qed. + +Theorem NZlt_eq_cases : forall n m, n <= m <-> n < m \/ n == m. +Proof. +intros. +unfold Z.eq; rewrite spec_lt, spec_le; omega. +Qed. + +Theorem NZlt_irrefl : forall n, ~ n < n. +Proof. +intros; rewrite spec_lt; auto with zarith. +Qed. + +Theorem NZlt_succ_r : forall n m, n < (Z.succ m) <-> n <= m. +Proof. +intros; rewrite spec_lt, spec_le, Z.spec_succ; omega. +Qed. + +Theorem NZmin_l : forall n m, n <= m -> Z.min n m == n. +Proof. +intros n m; unfold Z.eq; rewrite spec_le, spec_min. +generalize (Zmin_spec [n] [m]); omega. +Qed. + +Theorem NZmin_r : forall n m, m <= n -> Z.min n m == m. +Proof. +intros n m; unfold Z.eq; rewrite spec_le, spec_min. +generalize (Zmin_spec [n] [m]); omega. +Qed. + +Theorem NZmax_l : forall n m, m <= n -> Z.max n m == n. +Proof. +intros n m; unfold Z.eq; rewrite spec_le, spec_max. +generalize (Zmax_spec [n] [m]); omega. +Qed. + +Theorem NZmax_r : forall n m, n <= m -> Z.max n m == m. +Proof. +intros n m; unfold Z.eq; rewrite spec_le, spec_max. +generalize (Zmax_spec [n] [m]); omega. +Qed. + +End NZOrdAxiomsMod. + +Definition Zopp := Z.opp. + +Add Morphism Z.opp with signature Z.eq ==> Z.eq as Zopp_wd. +Proof. +intros; zsimpl; auto with zarith. +Qed. + +Theorem Zsucc_pred : forall n, Z.succ (Z.pred n) == n. +Proof. +red; intros; zsimpl; auto with zarith. +Qed. + +Theorem Zopp_0 : - 0 == 0. +Proof. +red; intros; zsimpl; auto with zarith. +Qed. + +Theorem Zopp_succ : forall n, - (Z.succ n) == Z.pred (- n). +Proof. +intros; zsimpl; auto with zarith. +Qed. + +End ZSig_ZAxioms. diff --git a/theories/Numbers/NaryFunctions.v b/theories/Numbers/NaryFunctions.v new file mode 100644 index 00000000..04a48d51 --- /dev/null +++ b/theories/Numbers/NaryFunctions.v @@ -0,0 +1,142 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* ... -> A -> B] with [n] occurences of [A] in this type. *) + +Fixpoint nfun A n B := + match n with + | O => B + | S n => A -> (nfun A n B) + end. + +Notation " A ^^ n --> B " := (nfun A n B) + (at level 50, n at next level) : type_scope. + +(** [napply_cst _ _ a n f] iterates [n] times the application of a + particular constant [a] to the [n]-ary function [f]. *) + +Fixpoint napply_cst (A B:Type)(a:A) n : (A^^n-->B) -> B := + match n return (A^^n-->B) -> B with + | O => fun x => x + | S n => fun x => napply_cst _ _ a n (x a) + end. + + +(** A generic transformation from an n-ary function to another one.*) + +Fixpoint nfun_to_nfun (A B C:Type)(f:B -> C) n : + (A^^n-->B) -> (A^^n-->C) := + match n return (A^^n-->B) -> (A^^n-->C) with + | O => f + | S n => fun g a => nfun_to_nfun _ _ _ f n (g a) + end. + +(** [napply_except_last _ _ n f] expects [n] arguments of type [A], + applies [n-1] of them to [f] and discard the last one. *) + +Definition napply_except_last (A B:Type) := + nfun_to_nfun A B (A->B) (fun b a => b). + +(** [napply_then_last _ _ a n f] expects [n] arguments of type [A], + applies them to [f] and then apply [a] to the result. *) + +Definition napply_then_last (A B:Type)(a:A) := + nfun_to_nfun A (A->B) B (fun fab => fab a). + +(** [napply_discard _ b n] expects [n] arguments, discards then, + and returns [b]. *) + +Fixpoint napply_discard (A B:Type)(b:B) n : A^^n-->B := + match n return A^^n-->B with + | O => b + | S n => fun _ => napply_discard _ _ b n + end. + +(** A fold function *) + +Fixpoint nfold A B (f:A->B->B)(b:B) n : (A^^n-->B) := + match n return (A^^n-->B) with + | O => b + | S n => fun a => (nfold _ _ f (f a b) n) + end. + + +(** [n]-ary products : [nprod A n] is [A*...*A*unit], + with [n] occurrences of [A] in this type. *) + +Fixpoint nprod A n : Type := match n with + | O => unit + | S n => (A * nprod A n)%type +end. + +Notation "A ^ n" := (nprod A n) : type_scope. + +(** [n]-ary curryfication / uncurryfication *) + +Fixpoint ncurry (A B:Type) n : (A^n -> B) -> (A^^n-->B) := + match n return (A^n -> B) -> (A^^n-->B) with + | O => fun x => x tt + | S n => fun f a => ncurry _ _ n (fun p => f (a,p)) + end. + +Fixpoint nuncurry (A B:Type) n : (A^^n-->B) -> (A^n -> B) := + match n return (A^^n-->B) -> (A^n -> B) with + | O => fun x _ => x + | S n => fun f p => let (x,p) := p in nuncurry _ _ n (f x) p + end. + +(** Earlier functions can also be defined via [ncurry/nuncurry]. + For instance : *) + +Definition nfun_to_nfun_bis A B C (f:B->C) n : + (A^^n-->B) -> (A^^n-->C) := + fun anb => ncurry _ _ n (fun an => f ((nuncurry _ _ n anb) an)). + +(** We can also us it to obtain another [fold] function, + equivalent to the previous one, but with a nicer expansion + (see for instance Int31.iszero). *) + +Fixpoint nfold_bis A B (f:A->B->B)(b:B) n : (A^^n-->B) := + match n return (A^^n-->B) with + | O => b + | S n => fun a => + nfun_to_nfun_bis _ _ _ (f a) n (nfold_bis _ _ f b n) + end. + +(** From [nprod] to [list] *) + +Fixpoint nprod_to_list (A:Type) n : A^n -> list A := + match n with + | O => fun _ => nil + | S n => fun p => let (x,p) := p in x::(nprod_to_list _ n p) + end. + +(** From [list] to [nprod] *) + +Fixpoint nprod_of_list (A:Type)(l:list A) : A^(length l) := + match l return A^(length l) with + | nil => tt + | x::l => (x, nprod_of_list _ l) + end. + +(** This gives an additional way to write the fold *) + +Definition nfold_list (A B:Type)(f:A->B->B)(b:B) n : (A^^n-->B) := + ncurry _ _ n (fun p => fold_right f b (nprod_to_list _ _ p)). + diff --git a/theories/Numbers/NatInt/NZAdd.v b/theories/Numbers/NatInt/NZAdd.v new file mode 100644 index 00000000..c9bb5c95 --- /dev/null +++ b/theories/Numbers/NatInt/NZAdd.v @@ -0,0 +1,91 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* n == m. +Proof. +intros n m p; NZinduct p. +now do 2 rewrite NZadd_0_l. +intro p. do 2 rewrite NZadd_succ_l. now rewrite NZsucc_inj_wd. +Qed. + +Theorem NZadd_cancel_r : forall n m p : NZ, n + p == m + p <-> n == m. +Proof. +intros n m p. rewrite (NZadd_comm n p); rewrite (NZadd_comm m p). +apply NZadd_cancel_l. +Qed. + +Theorem NZsub_1_r : forall n : NZ, n - 1 == P n. +Proof. +intro n; rewrite NZsub_succ_r; now rewrite NZsub_0_r. +Qed. + +End NZAddPropFunct. + diff --git a/theories/Numbers/NatInt/NZAddOrder.v b/theories/Numbers/NatInt/NZAddOrder.v new file mode 100644 index 00000000..50d1c42f --- /dev/null +++ b/theories/Numbers/NatInt/NZAddOrder.v @@ -0,0 +1,166 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* p + n < p + m. +Proof. +intros n m p; NZinduct p. +now do 2 rewrite NZadd_0_l. +intro p. do 2 rewrite NZadd_succ_l. now rewrite <- NZsucc_lt_mono. +Qed. + +Theorem NZadd_lt_mono_r : forall n m p : NZ, n < m <-> n + p < m + p. +Proof. +intros n m p. +rewrite (NZadd_comm n p); rewrite (NZadd_comm m p); apply NZadd_lt_mono_l. +Qed. + +Theorem NZadd_lt_mono : forall n m p q : NZ, n < m -> p < q -> n + p < m + q. +Proof. +intros n m p q H1 H2. +apply NZlt_trans with (m + p); +[now apply -> NZadd_lt_mono_r | now apply -> NZadd_lt_mono_l]. +Qed. + +Theorem NZadd_le_mono_l : forall n m p : NZ, n <= m <-> p + n <= p + m. +Proof. +intros n m p; NZinduct p. +now do 2 rewrite NZadd_0_l. +intro p. do 2 rewrite NZadd_succ_l. now rewrite <- NZsucc_le_mono. +Qed. + +Theorem NZadd_le_mono_r : forall n m p : NZ, n <= m <-> n + p <= m + p. +Proof. +intros n m p. +rewrite (NZadd_comm n p); rewrite (NZadd_comm m p); apply NZadd_le_mono_l. +Qed. + +Theorem NZadd_le_mono : forall n m p q : NZ, n <= m -> p <= q -> n + p <= m + q. +Proof. +intros n m p q H1 H2. +apply NZle_trans with (m + p); +[now apply -> NZadd_le_mono_r | now apply -> NZadd_le_mono_l]. +Qed. + +Theorem NZadd_lt_le_mono : forall n m p q : NZ, n < m -> p <= q -> n + p < m + q. +Proof. +intros n m p q H1 H2. +apply NZlt_le_trans with (m + p); +[now apply -> NZadd_lt_mono_r | now apply -> NZadd_le_mono_l]. +Qed. + +Theorem NZadd_le_lt_mono : forall n m p q : NZ, n <= m -> p < q -> n + p < m + q. +Proof. +intros n m p q H1 H2. +apply NZle_lt_trans with (m + p); +[now apply -> NZadd_le_mono_r | now apply -> NZadd_lt_mono_l]. +Qed. + +Theorem NZadd_pos_pos : forall n m : NZ, 0 < n -> 0 < m -> 0 < n + m. +Proof. +intros n m H1 H2. rewrite <- (NZadd_0_l 0). now apply NZadd_lt_mono. +Qed. + +Theorem NZadd_pos_nonneg : forall n m : NZ, 0 < n -> 0 <= m -> 0 < n + m. +Proof. +intros n m H1 H2. rewrite <- (NZadd_0_l 0). now apply NZadd_lt_le_mono. +Qed. + +Theorem NZadd_nonneg_pos : forall n m : NZ, 0 <= n -> 0 < m -> 0 < n + m. +Proof. +intros n m H1 H2. rewrite <- (NZadd_0_l 0). now apply NZadd_le_lt_mono. +Qed. + +Theorem NZadd_nonneg_nonneg : forall n m : NZ, 0 <= n -> 0 <= m -> 0 <= n + m. +Proof. +intros n m H1 H2. rewrite <- (NZadd_0_l 0). now apply NZadd_le_mono. +Qed. + +Theorem NZlt_add_pos_l : forall n m : NZ, 0 < n -> m < n + m. +Proof. +intros n m H. apply -> (NZadd_lt_mono_r 0 n m) in H. +now rewrite NZadd_0_l in H. +Qed. + +Theorem NZlt_add_pos_r : forall n m : NZ, 0 < n -> m < m + n. +Proof. +intros; rewrite NZadd_comm; now apply NZlt_add_pos_l. +Qed. + +Theorem NZle_lt_add_lt : forall n m p q : NZ, n <= m -> p + m < q + n -> p < q. +Proof. +intros n m p q H1 H2. destruct (NZle_gt_cases q p); [| assumption]. +pose proof (NZadd_le_mono q p n m H H1) as H3. apply <- NZnle_gt in H2. +false_hyp H3 H2. +Qed. + +Theorem NZlt_le_add_lt : forall n m p q : NZ, n < m -> p + m <= q + n -> p < q. +Proof. +intros n m p q H1 H2. destruct (NZle_gt_cases q p); [| assumption]. +pose proof (NZadd_le_lt_mono q p n m H H1) as H3. apply <- NZnle_gt in H3. +false_hyp H2 H3. +Qed. + +Theorem NZle_le_add_le : forall n m p q : NZ, n <= m -> p + m <= q + n -> p <= q. +Proof. +intros n m p q H1 H2. destruct (NZle_gt_cases p q); [assumption |]. +pose proof (NZadd_lt_le_mono q p n m H H1) as H3. apply <- NZnle_gt in H3. +false_hyp H2 H3. +Qed. + +Theorem NZadd_lt_cases : forall n m p q : NZ, n + m < p + q -> n < p \/ m < q. +Proof. +intros n m p q H; +destruct (NZle_gt_cases p n) as [H1 | H1]. +destruct (NZle_gt_cases q m) as [H2 | H2]. +pose proof (NZadd_le_mono p n q m H1 H2) as H3. apply -> NZle_ngt in H3. +false_hyp H H3. +now right. now left. +Qed. + +Theorem NZadd_le_cases : forall n m p q : NZ, n + m <= p + q -> n <= p \/ m <= q. +Proof. +intros n m p q H. +destruct (NZle_gt_cases n p) as [H1 | H1]. now left. +destruct (NZle_gt_cases m q) as [H2 | H2]. now right. +assert (H3 : p + q < n + m) by now apply NZadd_lt_mono. +apply -> NZle_ngt in H. false_hyp H3 H. +Qed. + +Theorem NZadd_neg_cases : forall n m : NZ, n + m < 0 -> n < 0 \/ m < 0. +Proof. +intros n m H; apply NZadd_lt_cases; now rewrite NZadd_0_l. +Qed. + +Theorem NZadd_pos_cases : forall n m : NZ, 0 < n + m -> 0 < n \/ 0 < m. +Proof. +intros n m H; apply NZadd_lt_cases; now rewrite NZadd_0_l. +Qed. + +Theorem NZadd_nonpos_cases : forall n m : NZ, n + m <= 0 -> n <= 0 \/ m <= 0. +Proof. +intros n m H; apply NZadd_le_cases; now rewrite NZadd_0_l. +Qed. + +Theorem NZadd_nonneg_cases : forall n m : NZ, 0 <= n + m -> 0 <= n \/ 0 <= m. +Proof. +intros n m H; apply NZadd_le_cases; now rewrite NZadd_0_l. +Qed. + +End NZAddOrderPropFunct. + diff --git a/theories/Numbers/NatInt/NZAxioms.v b/theories/Numbers/NatInt/NZAxioms.v new file mode 100644 index 00000000..26933646 --- /dev/null +++ b/theories/Numbers/NatInt/NZAxioms.v @@ -0,0 +1,99 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* NZ -> Prop. +Parameter Inline NZ0 : NZ. +Parameter Inline NZsucc : NZ -> NZ. +Parameter Inline NZpred : NZ -> NZ. +Parameter Inline NZadd : NZ -> NZ -> NZ. +Parameter Inline NZsub : NZ -> NZ -> NZ. +Parameter Inline NZmul : NZ -> NZ -> NZ. + +(* Unary subtraction (opp) is not defined on natural numbers, so we have + it for integers only *) + +Axiom NZeq_equiv : equiv NZ NZeq. +Add Relation NZ NZeq + reflexivity proved by (proj1 NZeq_equiv) + symmetry proved by (proj2 (proj2 NZeq_equiv)) + transitivity proved by (proj1 (proj2 NZeq_equiv)) +as NZeq_rel. + +Add Morphism NZsucc with signature NZeq ==> NZeq as NZsucc_wd. +Add Morphism NZpred with signature NZeq ==> NZeq as NZpred_wd. +Add Morphism NZadd with signature NZeq ==> NZeq ==> NZeq as NZadd_wd. +Add Morphism NZsub with signature NZeq ==> NZeq ==> NZeq as NZsub_wd. +Add Morphism NZmul with signature NZeq ==> NZeq ==> NZeq as NZmul_wd. + +Delimit Scope NatIntScope with NatInt. +Open Local Scope NatIntScope. +Notation "x == y" := (NZeq x y) (at level 70) : NatIntScope. +Notation "x ~= y" := (~ NZeq x y) (at level 70) : NatIntScope. +Notation "0" := NZ0 : NatIntScope. +Notation S := NZsucc. +Notation P := NZpred. +Notation "1" := (S 0) : NatIntScope. +Notation "x + y" := (NZadd x y) : NatIntScope. +Notation "x - y" := (NZsub x y) : NatIntScope. +Notation "x * y" := (NZmul x y) : NatIntScope. + +Axiom NZpred_succ : forall n : NZ, P (S n) == n. + +Axiom NZinduction : + forall A : NZ -> Prop, predicate_wd NZeq A -> + A 0 -> (forall n : NZ, A n <-> A (S n)) -> forall n : NZ, A n. + +Axiom NZadd_0_l : forall n : NZ, 0 + n == n. +Axiom NZadd_succ_l : forall n m : NZ, (S n) + m == S (n + m). + +Axiom NZsub_0_r : forall n : NZ, n - 0 == n. +Axiom NZsub_succ_r : forall n m : NZ, n - (S m) == P (n - m). + +Axiom NZmul_0_l : forall n : NZ, 0 * n == 0. +Axiom NZmul_succ_l : forall n m : NZ, S n * m == n * m + m. + +End NZAxiomsSig. + +Module Type NZOrdAxiomsSig. +Declare Module Export NZAxiomsMod : NZAxiomsSig. +Open Local Scope NatIntScope. + +Parameter Inline NZlt : NZ -> NZ -> Prop. +Parameter Inline NZle : NZ -> NZ -> Prop. +Parameter Inline NZmin : NZ -> NZ -> NZ. +Parameter Inline NZmax : NZ -> NZ -> NZ. + +Add Morphism NZlt with signature NZeq ==> NZeq ==> iff as NZlt_wd. +Add Morphism NZle with signature NZeq ==> NZeq ==> iff as NZle_wd. +Add Morphism NZmin with signature NZeq ==> NZeq ==> NZeq as NZmin_wd. +Add Morphism NZmax with signature NZeq ==> NZeq ==> NZeq as NZmax_wd. + +Notation "x < y" := (NZlt x y) : NatIntScope. +Notation "x <= y" := (NZle x y) : NatIntScope. +Notation "x > y" := (NZlt y x) (only parsing) : NatIntScope. +Notation "x >= y" := (NZle y x) (only parsing) : NatIntScope. + +Axiom NZlt_eq_cases : forall n m : NZ, n <= m <-> n < m \/ n == m. +Axiom NZlt_irrefl : forall n : NZ, ~ (n < n). +Axiom NZlt_succ_r : forall n m : NZ, n < S m <-> n <= m. + +Axiom NZmin_l : forall n m : NZ, n <= m -> NZmin n m == n. +Axiom NZmin_r : forall n m : NZ, m <= n -> NZmin n m == m. +Axiom NZmax_l : forall n m : NZ, m <= n -> NZmax n m == n. +Axiom NZmax_r : forall n m : NZ, n <= m -> NZmax n m == m. + +End NZOrdAxiomsSig. diff --git a/theories/Numbers/NatInt/NZBase.v b/theories/Numbers/NatInt/NZBase.v new file mode 100644 index 00000000..8b01e353 --- /dev/null +++ b/theories/Numbers/NatInt/NZBase.v @@ -0,0 +1,84 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* m ~= n. +Proof. +intros n m H1 H2; symmetry in H2; false_hyp H2 H1. +Qed. + +Theorem NZE_stepl : forall x y z : NZ, x == y -> x == z -> z == y. +Proof. +intros x y z H1 H2; now rewrite <- H1. +Qed. + +Declare Left Step NZE_stepl. +(* The right step lemma is just the transitivity of NZeq *) +Declare Right Step (proj1 (proj2 NZeq_equiv)). + +Theorem NZsucc_inj : forall n1 n2 : NZ, S n1 == S n2 -> n1 == n2. +Proof. +intros n1 n2 H. +apply NZpred_wd in H. now do 2 rewrite NZpred_succ in H. +Qed. + +(* The following theorem is useful as an equivalence for proving +bidirectional induction steps *) +Theorem NZsucc_inj_wd : forall n1 n2 : NZ, S n1 == S n2 <-> n1 == n2. +Proof. +intros; split. +apply NZsucc_inj. +apply NZsucc_wd. +Qed. + +Theorem NZsucc_inj_wd_neg : forall n m : NZ, S n ~= S m <-> n ~= m. +Proof. +intros; now rewrite NZsucc_inj_wd. +Qed. + +(* We cannot prove that the predecessor is injective, nor that it is +left-inverse to the successor at this point *) + +Section CentralInduction. + +Variable A : predicate NZ. + +Hypothesis A_wd : predicate_wd NZeq A. + +Add Morphism A with signature NZeq ==> iff as A_morph. +Proof. apply A_wd. Qed. + +Theorem NZcentral_induction : + forall z : NZ, A z -> + (forall n : NZ, A n <-> A (S n)) -> + forall n : NZ, A n. +Proof. +intros z Base Step; revert Base; pattern z; apply NZinduction. +solve_predicate_wd. +intro; now apply NZinduction. +intro; pose proof (Step n); tauto. +Qed. + +End CentralInduction. + +Tactic Notation "NZinduct" ident(n) := + induction_maker n ltac:(apply NZinduction). + +Tactic Notation "NZinduct" ident(n) constr(u) := + induction_maker n ltac:(apply NZcentral_induction with (z := u)). + +End NZBasePropFunct. + diff --git a/theories/Numbers/NatInt/NZMul.v b/theories/Numbers/NatInt/NZMul.v new file mode 100644 index 00000000..fda8b7a3 --- /dev/null +++ b/theories/Numbers/NatInt/NZMul.v @@ -0,0 +1,80 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* (p * n < p * m <-> q * n + m < q * m + n). +Proof. +intros p q n m H. rewrite <- H. do 2 rewrite NZmul_succ_l. +rewrite <- (NZadd_assoc (p * n) n m). +rewrite <- (NZadd_assoc (p * m) m n). +rewrite (NZadd_comm n m). now rewrite <- NZadd_lt_mono_r. +Qed. + +Theorem NZmul_lt_mono_pos_l : forall p n m : NZ, 0 < p -> (n < m <-> p * n < p * m). +Proof. +NZord_induct p. +intros n m H; false_hyp H NZlt_irrefl. +intros p H IH n m H1. do 2 rewrite NZmul_succ_l. +le_elim H. assert (LR : forall n m : NZ, n < m -> p * n + n < p * m + m). +intros n1 m1 H2. apply NZadd_lt_mono; [now apply -> IH | assumption]. +split; [apply LR |]. intro H2. apply -> NZlt_dne; intro H3. +apply <- NZle_ngt in H3. le_elim H3. +apply NZlt_asymm in H2. apply H2. now apply LR. +rewrite H3 in H2; false_hyp H2 NZlt_irrefl. +rewrite <- H; do 2 rewrite NZmul_0_l; now do 2 rewrite NZadd_0_l. +intros p H1 _ n m H2. apply NZlt_asymm in H1. false_hyp H2 H1. +Qed. + +Theorem NZmul_lt_mono_pos_r : forall p n m : NZ, 0 < p -> (n < m <-> n * p < m * p). +Proof. +intros p n m. +rewrite (NZmul_comm n p); rewrite (NZmul_comm m p). now apply NZmul_lt_mono_pos_l. +Qed. + +Theorem NZmul_lt_mono_neg_l : forall p n m : NZ, p < 0 -> (n < m <-> p * m < p * n). +Proof. +NZord_induct p. +intros n m H; false_hyp H NZlt_irrefl. +intros p H1 _ n m H2. apply NZlt_succ_l in H2. apply <- NZnle_gt in H2. false_hyp H1 H2. +intros p H IH n m H1. apply <- NZle_succ_l in H. +le_elim H. assert (LR : forall n m : NZ, n < m -> p * m < p * n). +intros n1 m1 H2. apply (NZle_lt_add_lt n1 m1). +now apply NZlt_le_incl. do 2 rewrite <- NZmul_succ_l. now apply -> IH. +split; [apply LR |]. intro H2. apply -> NZlt_dne; intro H3. +apply <- NZle_ngt in H3. le_elim H3. +apply NZlt_asymm in H2. apply H2. now apply LR. +rewrite H3 in H2; false_hyp H2 NZlt_irrefl. +rewrite (NZmul_lt_pred p (S p)) by reflexivity. +rewrite H; do 2 rewrite NZmul_0_l; now do 2 rewrite NZadd_0_l. +Qed. + +Theorem NZmul_lt_mono_neg_r : forall p n m : NZ, p < 0 -> (n < m <-> m * p < n * p). +Proof. +intros p n m. +rewrite (NZmul_comm n p); rewrite (NZmul_comm m p). now apply NZmul_lt_mono_neg_l. +Qed. + +Theorem NZmul_le_mono_nonneg_l : forall n m p : NZ, 0 <= p -> n <= m -> p * n <= p * m. +Proof. +intros n m p H1 H2. le_elim H1. +le_elim H2. apply NZlt_le_incl. now apply -> NZmul_lt_mono_pos_l. +apply NZeq_le_incl; now rewrite H2. +apply NZeq_le_incl; rewrite <- H1; now do 2 rewrite NZmul_0_l. +Qed. + +Theorem NZmul_le_mono_nonpos_l : forall n m p : NZ, p <= 0 -> n <= m -> p * m <= p * n. +Proof. +intros n m p H1 H2. le_elim H1. +le_elim H2. apply NZlt_le_incl. now apply -> NZmul_lt_mono_neg_l. +apply NZeq_le_incl; now rewrite H2. +apply NZeq_le_incl; rewrite H1; now do 2 rewrite NZmul_0_l. +Qed. + +Theorem NZmul_le_mono_nonneg_r : forall n m p : NZ, 0 <= p -> n <= m -> n * p <= m * p. +Proof. +intros n m p H1 H2; rewrite (NZmul_comm n p); rewrite (NZmul_comm m p); +now apply NZmul_le_mono_nonneg_l. +Qed. + +Theorem NZmul_le_mono_nonpos_r : forall n m p : NZ, p <= 0 -> n <= m -> m * p <= n * p. +Proof. +intros n m p H1 H2; rewrite (NZmul_comm n p); rewrite (NZmul_comm m p); +now apply NZmul_le_mono_nonpos_l. +Qed. + +Theorem NZmul_cancel_l : forall n m p : NZ, p ~= 0 -> (p * n == p * m <-> n == m). +Proof. +intros n m p H; split; intro H1. +destruct (NZlt_trichotomy p 0) as [H2 | [H2 | H2]]. +apply -> NZeq_dne; intro H3. apply -> NZlt_gt_cases in H3. destruct H3 as [H3 | H3]. +assert (H4 : p * m < p * n); [now apply -> NZmul_lt_mono_neg_l |]. +rewrite H1 in H4; false_hyp H4 NZlt_irrefl. +assert (H4 : p * n < p * m); [now apply -> NZmul_lt_mono_neg_l |]. +rewrite H1 in H4; false_hyp H4 NZlt_irrefl. +false_hyp H2 H. +apply -> NZeq_dne; intro H3. apply -> NZlt_gt_cases in H3. destruct H3 as [H3 | H3]. +assert (H4 : p * n < p * m) by (now apply -> NZmul_lt_mono_pos_l). +rewrite H1 in H4; false_hyp H4 NZlt_irrefl. +assert (H4 : p * m < p * n) by (now apply -> NZmul_lt_mono_pos_l). +rewrite H1 in H4; false_hyp H4 NZlt_irrefl. +now rewrite H1. +Qed. + +Theorem NZmul_cancel_r : forall n m p : NZ, p ~= 0 -> (n * p == m * p <-> n == m). +Proof. +intros n m p. rewrite (NZmul_comm n p), (NZmul_comm m p); apply NZmul_cancel_l. +Qed. + +Theorem NZmul_id_l : forall n m : NZ, m ~= 0 -> (n * m == m <-> n == 1). +Proof. +intros n m H. +stepl (n * m == 1 * m) by now rewrite NZmul_1_l. now apply NZmul_cancel_r. +Qed. + +Theorem NZmul_id_r : forall n m : NZ, n ~= 0 -> (n * m == n <-> m == 1). +Proof. +intros n m; rewrite NZmul_comm; apply NZmul_id_l. +Qed. + +Theorem NZmul_le_mono_pos_l : forall n m p : NZ, 0 < p -> (n <= m <-> p * n <= p * m). +Proof. +intros n m p H; do 2 rewrite NZlt_eq_cases. +rewrite (NZmul_lt_mono_pos_l p n m) by assumption. +now rewrite -> (NZmul_cancel_l n m p) by +(intro H1; rewrite H1 in H; false_hyp H NZlt_irrefl). +Qed. + +Theorem NZmul_le_mono_pos_r : forall n m p : NZ, 0 < p -> (n <= m <-> n * p <= m * p). +Proof. +intros n m p. rewrite (NZmul_comm n p); rewrite (NZmul_comm m p); +apply NZmul_le_mono_pos_l. +Qed. + +Theorem NZmul_le_mono_neg_l : forall n m p : NZ, p < 0 -> (n <= m <-> p * m <= p * n). +Proof. +intros n m p H; do 2 rewrite NZlt_eq_cases. +rewrite (NZmul_lt_mono_neg_l p n m); [| assumption]. +rewrite -> (NZmul_cancel_l m n p) by (intro H1; rewrite H1 in H; false_hyp H NZlt_irrefl). +now setoid_replace (n == m) with (m == n) using relation iff by (split; now intro). +Qed. + +Theorem NZmul_le_mono_neg_r : forall n m p : NZ, p < 0 -> (n <= m <-> m * p <= n * p). +Proof. +intros n m p. rewrite (NZmul_comm n p); rewrite (NZmul_comm m p); +apply NZmul_le_mono_neg_l. +Qed. + +Theorem NZmul_lt_mono_nonneg : + forall n m p q : NZ, 0 <= n -> n < m -> 0 <= p -> p < q -> n * p < m * q. +Proof. +intros n m p q H1 H2 H3 H4. +apply NZle_lt_trans with (m * p). +apply NZmul_le_mono_nonneg_r; [assumption | now apply NZlt_le_incl]. +apply -> NZmul_lt_mono_pos_l; [assumption | now apply NZle_lt_trans with n]. +Qed. + +(* There are still many variants of the theorem above. One can assume 0 < n +or 0 < p or n <= m or p <= q. *) + +Theorem NZmul_le_mono_nonneg : + forall n m p q : NZ, 0 <= n -> n <= m -> 0 <= p -> p <= q -> n * p <= m * q. +Proof. +intros n m p q H1 H2 H3 H4. +le_elim H2; le_elim H4. +apply NZlt_le_incl; now apply NZmul_lt_mono_nonneg. +rewrite <- H4; apply NZmul_le_mono_nonneg_r; [assumption | now apply NZlt_le_incl]. +rewrite <- H2; apply NZmul_le_mono_nonneg_l; [assumption | now apply NZlt_le_incl]. +rewrite H2; rewrite H4; now apply NZeq_le_incl. +Qed. + +Theorem NZmul_pos_pos : forall n m : NZ, 0 < n -> 0 < m -> 0 < n * m. +Proof. +intros n m H1 H2. +rewrite <- (NZmul_0_l m). now apply -> NZmul_lt_mono_pos_r. +Qed. + +Theorem NZmul_neg_neg : forall n m : NZ, n < 0 -> m < 0 -> 0 < n * m. +Proof. +intros n m H1 H2. +rewrite <- (NZmul_0_l m). now apply -> NZmul_lt_mono_neg_r. +Qed. + +Theorem NZmul_pos_neg : forall n m : NZ, 0 < n -> m < 0 -> n * m < 0. +Proof. +intros n m H1 H2. +rewrite <- (NZmul_0_l m). now apply -> NZmul_lt_mono_neg_r. +Qed. + +Theorem NZmul_neg_pos : forall n m : NZ, n < 0 -> 0 < m -> n * m < 0. +Proof. +intros; rewrite NZmul_comm; now apply NZmul_pos_neg. +Qed. + +Theorem NZlt_1_mul_pos : forall n m : NZ, 1 < n -> 0 < m -> 1 < n * m. +Proof. +intros n m H1 H2. apply -> (NZmul_lt_mono_pos_r m) in H1. +rewrite NZmul_1_l in H1. now apply NZlt_1_l with m. +assumption. +Qed. + +Theorem NZeq_mul_0 : forall n m : NZ, n * m == 0 <-> n == 0 \/ m == 0. +Proof. +intros n m; split. +intro H; destruct (NZlt_trichotomy n 0) as [H1 | [H1 | H1]]; +destruct (NZlt_trichotomy m 0) as [H2 | [H2 | H2]]; +try (now right); try (now left). +elimtype False; now apply (NZlt_neq 0 (n * m)); [apply NZmul_neg_neg |]. +elimtype False; now apply (NZlt_neq (n * m) 0); [apply NZmul_neg_pos |]. +elimtype False; now apply (NZlt_neq (n * m) 0); [apply NZmul_pos_neg |]. +elimtype False; now apply (NZlt_neq 0 (n * m)); [apply NZmul_pos_pos |]. +intros [H | H]. now rewrite H, NZmul_0_l. now rewrite H, NZmul_0_r. +Qed. + +Theorem NZneq_mul_0 : forall n m : NZ, n ~= 0 /\ m ~= 0 <-> n * m ~= 0. +Proof. +intros n m; split; intro H. +intro H1; apply -> NZeq_mul_0 in H1. tauto. +split; intro H1; rewrite H1 in H; +(rewrite NZmul_0_l in H || rewrite NZmul_0_r in H); now apply H. +Qed. + +Theorem NZeq_square_0 : forall n : NZ, n * n == 0 <-> n == 0. +Proof. +intro n; rewrite NZeq_mul_0; tauto. +Qed. + +Theorem NZeq_mul_0_l : forall n m : NZ, n * m == 0 -> m ~= 0 -> n == 0. +Proof. +intros n m H1 H2. apply -> NZeq_mul_0 in H1. destruct H1 as [H1 | H1]. +assumption. false_hyp H1 H2. +Qed. + +Theorem NZeq_mul_0_r : forall n m : NZ, n * m == 0 -> n ~= 0 -> m == 0. +Proof. +intros n m H1 H2; apply -> NZeq_mul_0 in H1. destruct H1 as [H1 | H1]. +false_hyp H1 H2. assumption. +Qed. + +Theorem NZlt_0_mul : forall n m : NZ, 0 < n * m <-> (0 < n /\ 0 < m) \/ (m < 0 /\ n < 0). +Proof. +intros n m; split; [intro H | intros [[H1 H2] | [H1 H2]]]. +destruct (NZlt_trichotomy n 0) as [H1 | [H1 | H1]]; +[| rewrite H1 in H; rewrite NZmul_0_l in H; false_hyp H NZlt_irrefl |]; +(destruct (NZlt_trichotomy m 0) as [H2 | [H2 | H2]]; +[| rewrite H2 in H; rewrite NZmul_0_r in H; false_hyp H NZlt_irrefl |]); +try (left; now split); try (right; now split). +assert (H3 : n * m < 0) by now apply NZmul_neg_pos. +elimtype False; now apply (NZlt_asymm (n * m) 0). +assert (H3 : n * m < 0) by now apply NZmul_pos_neg. +elimtype False; now apply (NZlt_asymm (n * m) 0). +now apply NZmul_pos_pos. now apply NZmul_neg_neg. +Qed. + +Theorem NZsquare_lt_mono_nonneg : forall n m : NZ, 0 <= n -> n < m -> n * n < m * m. +Proof. +intros n m H1 H2. now apply NZmul_lt_mono_nonneg. +Qed. + +Theorem NZsquare_le_mono_nonneg : forall n m : NZ, 0 <= n -> n <= m -> n * n <= m * m. +Proof. +intros n m H1 H2. now apply NZmul_le_mono_nonneg. +Qed. + +(* The converse theorems require nonnegativity (or nonpositivity) of the +other variable *) + +Theorem NZsquare_lt_simpl_nonneg : forall n m : NZ, 0 <= m -> n * n < m * m -> n < m. +Proof. +intros n m H1 H2. destruct (NZlt_ge_cases n 0). +now apply NZlt_le_trans with 0. +destruct (NZlt_ge_cases n m). +assumption. assert (F : m * m <= n * n) by now apply NZsquare_le_mono_nonneg. +apply -> NZle_ngt in F. false_hyp H2 F. +Qed. + +Theorem NZsquare_le_simpl_nonneg : forall n m : NZ, 0 <= m -> n * n <= m * m -> n <= m. +Proof. +intros n m H1 H2. destruct (NZlt_ge_cases n 0). +apply NZlt_le_incl; now apply NZlt_le_trans with 0. +destruct (NZle_gt_cases n m). +assumption. assert (F : m * m < n * n) by now apply NZsquare_lt_mono_nonneg. +apply -> NZlt_nge in F. false_hyp H2 F. +Qed. + +Theorem NZmul_2_mono_l : forall n m : NZ, n < m -> 1 + (1 + 1) * n < (1 + 1) * m. +Proof. +intros n m H. apply <- NZle_succ_l in H. +apply -> (NZmul_le_mono_pos_l (S n) m (1 + 1)) in H. +repeat rewrite NZmul_add_distr_r in *; repeat rewrite NZmul_1_l in *. +repeat rewrite NZadd_succ_r in *. repeat rewrite NZadd_succ_l in *. rewrite NZadd_0_l. +now apply -> NZle_succ_l. +apply NZadd_pos_pos; now apply NZlt_succ_diag_r. +Qed. + +End NZMulOrderPropFunct. diff --git a/theories/Numbers/NatInt/NZOrder.v b/theories/Numbers/NatInt/NZOrder.v new file mode 100644 index 00000000..15004824 --- /dev/null +++ b/theories/Numbers/NatInt/NZOrder.v @@ -0,0 +1,666 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* n <= m. +Proof. +intros; apply <- NZlt_eq_cases; now left. +Qed. + +Theorem NZeq_le_incl : forall n m : NZ, n == m -> n <= m. +Proof. +intros; apply <- NZlt_eq_cases; now right. +Qed. + +Lemma NZlt_stepl : forall x y z : NZ, x < y -> x == z -> z < y. +Proof. +intros x y z H1 H2; now rewrite <- H2. +Qed. + +Lemma NZlt_stepr : forall x y z : NZ, x < y -> y == z -> x < z. +Proof. +intros x y z H1 H2; now rewrite <- H2. +Qed. + +Lemma NZle_stepl : forall x y z : NZ, x <= y -> x == z -> z <= y. +Proof. +intros x y z H1 H2; now rewrite <- H2. +Qed. + +Lemma NZle_stepr : forall x y z : NZ, x <= y -> y == z -> x <= z. +Proof. +intros x y z H1 H2; now rewrite <- H2. +Qed. + +Declare Left Step NZlt_stepl. +Declare Right Step NZlt_stepr. +Declare Left Step NZle_stepl. +Declare Right Step NZle_stepr. + +Theorem NZlt_neq : forall n m : NZ, n < m -> n ~= m. +Proof. +intros n m H1 H2; rewrite H2 in H1; false_hyp H1 NZlt_irrefl. +Qed. + +Theorem NZle_neq : forall n m : NZ, n < m <-> n <= m /\ n ~= m. +Proof. +intros n m; split; [intro H | intros [H1 H2]]. +split. now apply NZlt_le_incl. now apply NZlt_neq. +le_elim H1. assumption. false_hyp H1 H2. +Qed. + +Theorem NZle_refl : forall n : NZ, n <= n. +Proof. +intro; now apply NZeq_le_incl. +Qed. + +Theorem NZlt_succ_diag_r : forall n : NZ, n < S n. +Proof. +intro n. rewrite NZlt_succ_r. now apply NZeq_le_incl. +Qed. + +Theorem NZle_succ_diag_r : forall n : NZ, n <= S n. +Proof. +intro; apply NZlt_le_incl; apply NZlt_succ_diag_r. +Qed. + +Theorem NZlt_0_1 : 0 < 1. +Proof. +apply NZlt_succ_diag_r. +Qed. + +Theorem NZle_0_1 : 0 <= 1. +Proof. +apply NZle_succ_diag_r. +Qed. + +Theorem NZlt_lt_succ_r : forall n m : NZ, n < m -> n < S m. +Proof. +intros. rewrite NZlt_succ_r. now apply NZlt_le_incl. +Qed. + +Theorem NZle_le_succ_r : forall n m : NZ, n <= m -> n <= S m. +Proof. +intros n m H. rewrite <- NZlt_succ_r in H. now apply NZlt_le_incl. +Qed. + +Theorem NZle_succ_r : forall n m : NZ, n <= S m <-> n <= m \/ n == S m. +Proof. +intros n m; rewrite NZlt_eq_cases. now rewrite NZlt_succ_r. +Qed. + +(* The following theorem is a special case of neq_succ_iter_l below, +but we prove it separately *) + +Theorem NZneq_succ_diag_l : forall n : NZ, S n ~= n. +Proof. +intros n H. pose proof (NZlt_succ_diag_r n) as H1. rewrite H in H1. +false_hyp H1 NZlt_irrefl. +Qed. + +Theorem NZneq_succ_diag_r : forall n : NZ, n ~= S n. +Proof. +intro n; apply NZneq_symm; apply NZneq_succ_diag_l. +Qed. + +Theorem NZnlt_succ_diag_l : forall n : NZ, ~ S n < n. +Proof. +intros n H; apply NZlt_lt_succ_r in H. false_hyp H NZlt_irrefl. +Qed. + +Theorem NZnle_succ_diag_l : forall n : NZ, ~ S n <= n. +Proof. +intros n H; le_elim H. +false_hyp H NZnlt_succ_diag_l. false_hyp H NZneq_succ_diag_l. +Qed. + +Theorem NZle_succ_l : forall n m : NZ, S n <= m <-> n < m. +Proof. +intro n; NZinduct m n. +setoid_replace (n < n) with False using relation iff by + (apply -> neg_false; apply NZlt_irrefl). +now setoid_replace (S n <= n) with False using relation iff by + (apply -> neg_false; apply NZnle_succ_diag_l). +intro m. rewrite NZlt_succ_r. rewrite NZle_succ_r. +rewrite NZsucc_inj_wd. +rewrite (NZlt_eq_cases n m). +rewrite or_cancel_r. +reflexivity. +intros H1 H2; rewrite H2 in H1; false_hyp H1 NZnle_succ_diag_l. +apply NZlt_neq. +Qed. + +Theorem NZlt_succ_l : forall n m : NZ, S n < m -> n < m. +Proof. +intros n m H; apply -> NZle_succ_l; now apply NZlt_le_incl. +Qed. + +Theorem NZsucc_lt_mono : forall n m : NZ, n < m <-> S n < S m. +Proof. +intros n m. rewrite <- NZle_succ_l. symmetry. apply NZlt_succ_r. +Qed. + +Theorem NZsucc_le_mono : forall n m : NZ, n <= m <-> S n <= S m. +Proof. +intros n m. do 2 rewrite NZlt_eq_cases. +rewrite <- NZsucc_lt_mono; now rewrite NZsucc_inj_wd. +Qed. + +Theorem NZlt_asymm : forall n m, n < m -> ~ m < n. +Proof. +intros n m; NZinduct n m. +intros H _; false_hyp H NZlt_irrefl. +intro n; split; intros H H1 H2. +apply NZlt_succ_l in H1. apply -> NZlt_succ_r in H2. le_elim H2. +now apply H. rewrite H2 in H1; false_hyp H1 NZlt_irrefl. +apply NZlt_lt_succ_r in H2. apply <- NZle_succ_l in H1. le_elim H1. +now apply H. rewrite H1 in H2; false_hyp H2 NZlt_irrefl. +Qed. + +Theorem NZlt_trans : forall n m p : NZ, n < m -> m < p -> n < p. +Proof. +intros n m p; NZinduct p m. +intros _ H; false_hyp H NZlt_irrefl. +intro p. do 2 rewrite NZlt_succ_r. +split; intros H H1 H2. +apply NZlt_le_incl; le_elim H2; [now apply H | now rewrite H2 in H1]. +assert (n <= p) as H3. apply H. assumption. now apply NZlt_le_incl. +le_elim H3. assumption. rewrite <- H3 in H2. +elimtype False; now apply (NZlt_asymm n m). +Qed. + +Theorem NZle_trans : forall n m p : NZ, n <= m -> m <= p -> n <= p. +Proof. +intros n m p H1 H2; le_elim H1. +le_elim H2. apply NZlt_le_incl; now apply NZlt_trans with (m := m). +apply NZlt_le_incl; now rewrite <- H2. now rewrite H1. +Qed. + +Theorem NZle_lt_trans : forall n m p : NZ, n <= m -> m < p -> n < p. +Proof. +intros n m p H1 H2; le_elim H1. +now apply NZlt_trans with (m := m). now rewrite H1. +Qed. + +Theorem NZlt_le_trans : forall n m p : NZ, n < m -> m <= p -> n < p. +Proof. +intros n m p H1 H2; le_elim H2. +now apply NZlt_trans with (m := m). now rewrite <- H2. +Qed. + +Theorem NZle_antisymm : forall n m : NZ, n <= m -> m <= n -> n == m. +Proof. +intros n m H1 H2; now (le_elim H1; le_elim H2); +[elimtype False; apply (NZlt_asymm n m) | | |]. +Qed. + +Theorem NZlt_1_l : forall n m : NZ, 0 < n -> n < m -> 1 < m. +Proof. +intros n m H1 H2. apply <- NZle_succ_l in H1. now apply NZle_lt_trans with n. +Qed. + +(** Trichotomy, decidability, and double negation elimination *) + +Theorem NZlt_trichotomy : forall n m : NZ, n < m \/ n == m \/ m < n. +Proof. +intros n m; NZinduct n m. +right; now left. +intro n; rewrite NZlt_succ_r. stepr ((S n < m \/ S n == m) \/ m <= n) by tauto. +rewrite <- (NZlt_eq_cases (S n) m). +setoid_replace (n == m) with (m == n) using relation iff by now split. +stepl (n < m \/ m < n \/ m == n) by tauto. rewrite <- NZlt_eq_cases. +apply or_iff_compat_r. symmetry; apply NZle_succ_l. +Qed. + +(* Decidability of equality, even though true in each finite ring, does not +have a uniform proof. Otherwise, the proof for two fixed numbers would +reduce to a normal form that will say if the numbers are equal or not, +which cannot be true in all finite rings. Therefore, we prove decidability +in the presence of order. *) + +Theorem NZeq_dec : forall n m : NZ, decidable (n == m). +Proof. +intros n m; destruct (NZlt_trichotomy n m) as [H | [H | H]]. +right; intro H1; rewrite H1 in H; false_hyp H NZlt_irrefl. +now left. +right; intro H1; rewrite H1 in H; false_hyp H NZlt_irrefl. +Qed. + +(* DNE stands for double-negation elimination *) + +Theorem NZeq_dne : forall n m, ~ ~ n == m <-> n == m. +Proof. +intros n m; split; intro H. +destruct (NZeq_dec n m) as [H1 | H1]. +assumption. false_hyp H1 H. +intro H1; now apply H1. +Qed. + +Theorem NZlt_gt_cases : forall n m : NZ, n ~= m <-> n < m \/ n > m. +Proof. +intros n m; split. +pose proof (NZlt_trichotomy n m); tauto. +intros H H1; destruct H as [H | H]; rewrite H1 in H; false_hyp H NZlt_irrefl. +Qed. + +Theorem NZle_gt_cases : forall n m : NZ, n <= m \/ n > m. +Proof. +intros n m; destruct (NZlt_trichotomy n m) as [H | [H | H]]. +left; now apply NZlt_le_incl. left; now apply NZeq_le_incl. now right. +Qed. + +(* The following theorem is cleary redundant, but helps not to +remember whether one has to say le_gt_cases or lt_ge_cases *) + +Theorem NZlt_ge_cases : forall n m : NZ, n < m \/ n >= m. +Proof. +intros n m; destruct (NZle_gt_cases m n); try (now left); try (now right). +Qed. + +Theorem NZle_ge_cases : forall n m : NZ, n <= m \/ n >= m. +Proof. +intros n m; destruct (NZle_gt_cases n m) as [H | H]. +now left. right; now apply NZlt_le_incl. +Qed. + +Theorem NZle_ngt : forall n m : NZ, n <= m <-> ~ n > m. +Proof. +intros n m. split; intro H; [intro H1 |]. +eapply NZle_lt_trans in H; [| eassumption ..]. false_hyp H NZlt_irrefl. +destruct (NZle_gt_cases n m) as [H1 | H1]. +assumption. false_hyp H1 H. +Qed. + +(* Redundant but useful *) + +Theorem NZnlt_ge : forall n m : NZ, ~ n < m <-> n >= m. +Proof. +intros n m; symmetry; apply NZle_ngt. +Qed. + +Theorem NZlt_dec : forall n m : NZ, decidable (n < m). +Proof. +intros n m; destruct (NZle_gt_cases m n); +[right; now apply -> NZle_ngt | now left]. +Qed. + +Theorem NZlt_dne : forall n m, ~ ~ n < m <-> n < m. +Proof. +intros n m; split; intro H; +[destruct (NZlt_dec n m) as [H1 | H1]; [assumption | false_hyp H1 H] | +intro H1; false_hyp H H1]. +Qed. + +Theorem NZnle_gt : forall n m : NZ, ~ n <= m <-> n > m. +Proof. +intros n m. rewrite NZle_ngt. apply NZlt_dne. +Qed. + +(* Redundant but useful *) + +Theorem NZlt_nge : forall n m : NZ, n < m <-> ~ n >= m. +Proof. +intros n m; symmetry; apply NZnle_gt. +Qed. + +Theorem NZle_dec : forall n m : NZ, decidable (n <= m). +Proof. +intros n m; destruct (NZle_gt_cases n m); +[now left | right; now apply <- NZnle_gt]. +Qed. + +Theorem NZle_dne : forall n m : NZ, ~ ~ n <= m <-> n <= m. +Proof. +intros n m; split; intro H; +[destruct (NZle_dec n m) as [H1 | H1]; [assumption | false_hyp H1 H] | +intro H1; false_hyp H H1]. +Qed. + +Theorem NZnlt_succ_r : forall n m : NZ, ~ m < S n <-> n < m. +Proof. +intros n m; rewrite NZlt_succ_r; apply NZnle_gt. +Qed. + +(* The difference between integers and natural numbers is that for +every integer there is a predecessor, which is not true for natural +numbers. However, for both classes, every number that is bigger than +some other number has a predecessor. The proof of this fact by regular +induction does not go through, so we need to use strong +(course-of-value) induction. *) + +Lemma NZlt_exists_pred_strong : + forall z n m : NZ, z < m -> m <= n -> exists k : NZ, m == S k /\ z <= k. +Proof. +intro z; NZinduct n z. +intros m H1 H2; apply <- NZnle_gt in H1; false_hyp H2 H1. +intro n; split; intros IH m H1 H2. +apply -> NZle_succ_r in H2; destruct H2 as [H2 | H2]. +now apply IH. exists n. now split; [| rewrite <- NZlt_succ_r; rewrite <- H2]. +apply IH. assumption. now apply NZle_le_succ_r. +Qed. + +Theorem NZlt_exists_pred : + forall z n : NZ, z < n -> exists k : NZ, n == S k /\ z <= k. +Proof. +intros z n H; apply NZlt_exists_pred_strong with (z := z) (n := n). +assumption. apply NZle_refl. +Qed. + +(** A corollary of having an order is that NZ is infinite *) + +(* This section about infinity of NZ relies on the type nat and can be +safely removed *) + +Definition NZsucc_iter (n : nat) (m : NZ) := + nat_rect (fun _ => NZ) m (fun _ l => S l) n. + +Theorem NZlt_succ_iter_r : + forall (n : nat) (m : NZ), m < NZsucc_iter (Datatypes.S n) m. +Proof. +intros n m; induction n as [| n IH]; simpl in *. +apply NZlt_succ_diag_r. now apply NZlt_lt_succ_r. +Qed. + +Theorem NZneq_succ_iter_l : + forall (n : nat) (m : NZ), NZsucc_iter (Datatypes.S n) m ~= m. +Proof. +intros n m H. pose proof (NZlt_succ_iter_r n m) as H1. rewrite H in H1. +false_hyp H1 NZlt_irrefl. +Qed. + +(* End of the section about the infinity of NZ *) + +(** Stronger variant of induction with assumptions n >= 0 (n < 0) +in the induction step *) + +Section Induction. + +Variable A : NZ -> Prop. +Hypothesis A_wd : predicate_wd NZeq A. + +Add Morphism A with signature NZeq ==> iff as A_morph. +Proof. apply A_wd. Qed. + +Section Center. + +Variable z : NZ. (* A z is the basis of induction *) + +Section RightInduction. + +Let A' (n : NZ) := forall m : NZ, z <= m -> m < n -> A m. +Let right_step := forall n : NZ, z <= n -> A n -> A (S n). +Let right_step' := forall n : NZ, z <= n -> A' n -> A n. +Let right_step'' := forall n : NZ, A' n <-> A' (S n). + +Lemma NZrs_rs' : A z -> right_step -> right_step'. +Proof. +intros Az RS n H1 H2. +le_elim H1. apply NZlt_exists_pred in H1. destruct H1 as [k [H3 H4]]. +rewrite H3. apply RS; [assumption | apply H2; [assumption | rewrite H3; apply NZlt_succ_diag_r]]. +rewrite <- H1; apply Az. +Qed. + +Lemma NZrs'_rs'' : right_step' -> right_step''. +Proof. +intros RS' n; split; intros H1 m H2 H3. +apply -> NZlt_succ_r in H3; le_elim H3; +[now apply H1 | rewrite H3 in *; now apply RS']. +apply H1; [assumption | now apply NZlt_lt_succ_r]. +Qed. + +Lemma NZrbase : A' z. +Proof. +intros m H1 H2. apply -> NZle_ngt in H1. false_hyp H2 H1. +Qed. + +Lemma NZA'A_right : (forall n : NZ, A' n) -> forall n : NZ, z <= n -> A n. +Proof. +intros H1 n H2. apply H1 with (n := S n); [assumption | apply NZlt_succ_diag_r]. +Qed. + +Theorem NZstrong_right_induction: right_step' -> forall n : NZ, z <= n -> A n. +Proof. +intro RS'; apply NZA'A_right; unfold A'; NZinduct n z; +[apply NZrbase | apply NZrs'_rs''; apply RS']. +Qed. + +Theorem NZright_induction : A z -> right_step -> forall n : NZ, z <= n -> A n. +Proof. +intros Az RS; apply NZstrong_right_induction; now apply NZrs_rs'. +Qed. + +Theorem NZright_induction' : + (forall n : NZ, n <= z -> A n) -> right_step -> forall n : NZ, A n. +Proof. +intros L R n. +destruct (NZlt_trichotomy n z) as [H | [H | H]]. +apply L; now apply NZlt_le_incl. +apply L; now apply NZeq_le_incl. +apply NZright_induction. apply L; now apply NZeq_le_incl. assumption. now apply NZlt_le_incl. +Qed. + +Theorem NZstrong_right_induction' : + (forall n : NZ, n <= z -> A n) -> right_step' -> forall n : NZ, A n. +Proof. +intros L R n. +destruct (NZlt_trichotomy n z) as [H | [H | H]]. +apply L; now apply NZlt_le_incl. +apply L; now apply NZeq_le_incl. +apply NZstrong_right_induction. assumption. now apply NZlt_le_incl. +Qed. + +End RightInduction. + +Section LeftInduction. + +Let A' (n : NZ) := forall m : NZ, m <= z -> n <= m -> A m. +Let left_step := forall n : NZ, n < z -> A (S n) -> A n. +Let left_step' := forall n : NZ, n <= z -> A' (S n) -> A n. +Let left_step'' := forall n : NZ, A' n <-> A' (S n). + +Lemma NZls_ls' : A z -> left_step -> left_step'. +Proof. +intros Az LS n H1 H2. le_elim H1. +apply LS; [assumption | apply H2; [now apply <- NZle_succ_l | now apply NZeq_le_incl]]. +rewrite H1; apply Az. +Qed. + +Lemma NZls'_ls'' : left_step' -> left_step''. +Proof. +intros LS' n; split; intros H1 m H2 H3. +apply -> NZle_succ_l in H3. apply NZlt_le_incl in H3. now apply H1. +le_elim H3. +apply <- NZle_succ_l in H3. now apply H1. +rewrite <- H3 in *; now apply LS'. +Qed. + +Lemma NZlbase : A' (S z). +Proof. +intros m H1 H2. apply -> NZle_succ_l in H2. +apply -> NZle_ngt in H1. false_hyp H2 H1. +Qed. + +Lemma NZA'A_left : (forall n : NZ, A' n) -> forall n : NZ, n <= z -> A n. +Proof. +intros H1 n H2. apply H1 with (n := n); [assumption | now apply NZeq_le_incl]. +Qed. + +Theorem NZstrong_left_induction: left_step' -> forall n : NZ, n <= z -> A n. +Proof. +intro LS'; apply NZA'A_left; unfold A'; NZinduct n (S z); +[apply NZlbase | apply NZls'_ls''; apply LS']. +Qed. + +Theorem NZleft_induction : A z -> left_step -> forall n : NZ, n <= z -> A n. +Proof. +intros Az LS; apply NZstrong_left_induction; now apply NZls_ls'. +Qed. + +Theorem NZleft_induction' : + (forall n : NZ, z <= n -> A n) -> left_step -> forall n : NZ, A n. +Proof. +intros R L n. +destruct (NZlt_trichotomy n z) as [H | [H | H]]. +apply NZleft_induction. apply R. now apply NZeq_le_incl. assumption. now apply NZlt_le_incl. +rewrite H; apply R; now apply NZeq_le_incl. +apply R; now apply NZlt_le_incl. +Qed. + +Theorem NZstrong_left_induction' : + (forall n : NZ, z <= n -> A n) -> left_step' -> forall n : NZ, A n. +Proof. +intros R L n. +destruct (NZlt_trichotomy n z) as [H | [H | H]]. +apply NZstrong_left_induction; auto. now apply NZlt_le_incl. +rewrite H; apply R; now apply NZeq_le_incl. +apply R; now apply NZlt_le_incl. +Qed. + +End LeftInduction. + +Theorem NZorder_induction : + A z -> + (forall n : NZ, z <= n -> A n -> A (S n)) -> + (forall n : NZ, n < z -> A (S n) -> A n) -> + forall n : NZ, A n. +Proof. +intros Az RS LS n. +destruct (NZlt_trichotomy n z) as [H | [H | H]]. +now apply NZleft_induction; [| | apply NZlt_le_incl]. +now rewrite H. +now apply NZright_induction; [| | apply NZlt_le_incl]. +Qed. + +Theorem NZorder_induction' : + A z -> + (forall n : NZ, z <= n -> A n -> A (S n)) -> + (forall n : NZ, n <= z -> A n -> A (P n)) -> + forall n : NZ, A n. +Proof. +intros Az AS AP n; apply NZorder_induction; try assumption. +intros m H1 H2. apply AP in H2; [| now apply <- NZle_succ_l]. +unfold predicate_wd, fun_wd in A_wd; apply -> (A_wd (P (S m)) m); +[assumption | apply NZpred_succ]. +Qed. + +End Center. + +Theorem NZorder_induction_0 : + A 0 -> + (forall n : NZ, 0 <= n -> A n -> A (S n)) -> + (forall n : NZ, n < 0 -> A (S n) -> A n) -> + forall n : NZ, A n. +Proof (NZorder_induction 0). + +Theorem NZorder_induction'_0 : + A 0 -> + (forall n : NZ, 0 <= n -> A n -> A (S n)) -> + (forall n : NZ, n <= 0 -> A n -> A (P n)) -> + forall n : NZ, A n. +Proof (NZorder_induction' 0). + +(** Elimintation principle for < *) + +Theorem NZlt_ind : forall (n : NZ), + A (S n) -> + (forall m : NZ, n < m -> A m -> A (S m)) -> + forall m : NZ, n < m -> A m. +Proof. +intros n H1 H2 m H3. +apply NZright_induction with (S n); [assumption | | now apply <- NZle_succ_l]. +intros; apply H2; try assumption. now apply -> NZle_succ_l. +Qed. + +(** Elimintation principle for <= *) + +Theorem NZle_ind : forall (n : NZ), + A n -> + (forall m : NZ, n <= m -> A m -> A (S m)) -> + forall m : NZ, n <= m -> A m. +Proof. +intros n H1 H2 m H3. +now apply NZright_induction with n. +Qed. + +End Induction. + +Tactic Notation "NZord_induct" ident(n) := + induction_maker n ltac:(apply NZorder_induction_0). + +Tactic Notation "NZord_induct" ident(n) constr(z) := + induction_maker n ltac:(apply NZorder_induction with z). + +Section WF. + +Variable z : NZ. + +Let Rlt (n m : NZ) := z <= n /\ n < m. +Let Rgt (n m : NZ) := m < n /\ n <= z. + +Add Morphism Rlt with signature NZeq ==> NZeq ==> iff as Rlt_wd. +Proof. +intros x1 x2 H1 x3 x4 H2; unfold Rlt; rewrite H1; now rewrite H2. +Qed. + +Add Morphism Rgt with signature NZeq ==> NZeq ==> iff as Rgt_wd. +Proof. +intros x1 x2 H1 x3 x4 H2; unfold Rgt; rewrite H1; now rewrite H2. +Qed. + +Lemma NZAcc_lt_wd : predicate_wd NZeq (Acc Rlt). +Proof. +unfold predicate_wd, fun_wd. +intros x1 x2 H; split; intro H1; destruct H1 as [H2]; +constructor; intros; apply H2; now (rewrite H || rewrite <- H). +Qed. + +Lemma NZAcc_gt_wd : predicate_wd NZeq (Acc Rgt). +Proof. +unfold predicate_wd, fun_wd. +intros x1 x2 H; split; intro H1; destruct H1 as [H2]; +constructor; intros; apply H2; now (rewrite H || rewrite <- H). +Qed. + +Theorem NZlt_wf : well_founded Rlt. +Proof. +unfold well_founded. +apply NZstrong_right_induction' with (z := z). +apply NZAcc_lt_wd. +intros n H; constructor; intros y [H1 H2]. +apply <- NZnle_gt in H2. elim H2. now apply NZle_trans with z. +intros n H1 H2; constructor; intros m [H3 H4]. now apply H2. +Qed. + +Theorem NZgt_wf : well_founded Rgt. +Proof. +unfold well_founded. +apply NZstrong_left_induction' with (z := z). +apply NZAcc_gt_wd. +intros n H; constructor; intros y [H1 H2]. +apply <- NZnle_gt in H2. elim H2. now apply NZle_lt_trans with n. +intros n H1 H2; constructor; intros m [H3 H4]. +apply H2. assumption. now apply <- NZle_succ_l. +Qed. + +End WF. + +End NZOrderPropFunct. + diff --git a/theories/Numbers/Natural/Abstract/NAdd.v b/theories/Numbers/Natural/Abstract/NAdd.v new file mode 100644 index 00000000..f58b87d8 --- /dev/null +++ b/theories/Numbers/Natural/Abstract/NAdd.v @@ -0,0 +1,156 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* forall m1 m2 : N, m1 == m2 -> n1 + m1 == n2 + m2. +Proof NZadd_wd. + +Theorem add_0_l : forall n : N, 0 + n == n. +Proof NZadd_0_l. + +Theorem add_succ_l : forall n m : N, (S n) + m == S (n + m). +Proof NZadd_succ_l. + +(** Theorems that are valid for both natural numbers and integers *) + +Theorem add_0_r : forall n : N, n + 0 == n. +Proof NZadd_0_r. + +Theorem add_succ_r : forall n m : N, n + S m == S (n + m). +Proof NZadd_succ_r. + +Theorem add_comm : forall n m : N, n + m == m + n. +Proof NZadd_comm. + +Theorem add_assoc : forall n m p : N, n + (m + p) == (n + m) + p. +Proof NZadd_assoc. + +Theorem add_shuffle1 : forall n m p q : N, (n + m) + (p + q) == (n + p) + (m + q). +Proof NZadd_shuffle1. + +Theorem add_shuffle2 : forall n m p q : N, (n + m) + (p + q) == (n + q) + (m + p). +Proof NZadd_shuffle2. + +Theorem add_1_l : forall n : N, 1 + n == S n. +Proof NZadd_1_l. + +Theorem add_1_r : forall n : N, n + 1 == S n. +Proof NZadd_1_r. + +Theorem add_cancel_l : forall n m p : N, p + n == p + m <-> n == m. +Proof NZadd_cancel_l. + +Theorem add_cancel_r : forall n m p : N, n + p == m + p <-> n == m. +Proof NZadd_cancel_r. + +(* Theorems that are valid for natural numbers but cannot be proved for Z *) + +Theorem eq_add_0 : forall n m : N, n + m == 0 <-> n == 0 /\ m == 0. +Proof. +intros n m; induct n. +(* The next command does not work with the axiom add_0_l from NAddSig *) +rewrite add_0_l. intuition reflexivity. +intros n IH. rewrite add_succ_l. +setoid_replace (S (n + m) == 0) with False using relation iff by + (apply -> neg_false; apply neq_succ_0). +setoid_replace (S n == 0) with False using relation iff by + (apply -> neg_false; apply neq_succ_0). tauto. +Qed. + +Theorem eq_add_succ : + forall n m : N, (exists p : N, n + m == S p) <-> + (exists n' : N, n == S n') \/ (exists m' : N, m == S m'). +Proof. +intros n m; cases n. +split; intro H. +destruct H as [p H]. rewrite add_0_l in H; right; now exists p. +destruct H as [[n' H] | [m' H]]. +symmetry in H; false_hyp H neq_succ_0. +exists m'; now rewrite add_0_l. +intro n; split; intro H. +left; now exists n. +exists (n + m); now rewrite add_succ_l. +Qed. + +Theorem eq_add_1 : forall n m : N, + n + m == 1 -> n == 1 /\ m == 0 \/ n == 0 /\ m == 1. +Proof. +intros n m H. +assert (H1 : exists p : N, n + m == S p) by now exists 0. +apply -> eq_add_succ in H1. destruct H1 as [[n' H1] | [m' H1]]. +left. rewrite H1 in H; rewrite add_succ_l in H; apply succ_inj in H. +apply -> eq_add_0 in H. destruct H as [H2 H3]; rewrite H2 in H1; now split. +right. rewrite H1 in H; rewrite add_succ_r in H; apply succ_inj in H. +apply -> eq_add_0 in H. destruct H as [H2 H3]; rewrite H3 in H1; now split. +Qed. + +Theorem succ_add_discr : forall n m : N, m ~= S (n + m). +Proof. +intro n; induct m. +apply neq_symm. apply neq_succ_0. +intros m IH H. apply succ_inj in H. rewrite add_succ_r in H. +unfold not in IH; now apply IH. +Qed. + +Theorem add_pred_l : forall n m : N, n ~= 0 -> P n + m == P (n + m). +Proof. +intros n m; cases n. +intro H; now elim H. +intros n IH; rewrite add_succ_l; now do 2 rewrite pred_succ. +Qed. + +Theorem add_pred_r : forall n m : N, m ~= 0 -> n + P m == P (n + m). +Proof. +intros n m H; rewrite (add_comm n (P m)); +rewrite (add_comm n m); now apply add_pred_l. +Qed. + +(* One could define n <= m as exists p : N, p + n == m. Then we have +dichotomy: + +forall n m : N, n <= m \/ m <= n, + +i.e., + +forall n m : N, (exists p : N, p + n == m) \/ (exists p : N, p + m == n) (1) + +We will need (1) in the proof of induction principle for integers +constructed as pairs of natural numbers. The formula (1) can be proved +using properties of order and truncated subtraction. Thus, p would be +m - n or n - m and (1) would hold by theorem sub_add from Sub.v +depending on whether n <= m or m <= n. However, in proving induction +for integers constructed from natural numbers we do not need to +require implementations of order and sub; it is enough to prove (1) +here. *) + +Theorem add_dichotomy : + forall n m : N, (exists p : N, p + n == m) \/ (exists p : N, p + m == n). +Proof. +intros n m; induct n. +left; exists m; apply add_0_r. +intros n IH. +destruct IH as [[p H] | [p H]]. +destruct (zero_or_succ p) as [H1 | [p' H1]]; rewrite H1 in H. +rewrite add_0_l in H. right; exists (S 0); rewrite H; rewrite add_succ_l; now rewrite add_0_l. +left; exists p'; rewrite add_succ_r; now rewrite add_succ_l in H. +right; exists (S p). rewrite add_succ_l; now rewrite H. +Qed. + +End NAddPropFunct. + diff --git a/theories/Numbers/Natural/Abstract/NAddOrder.v b/theories/Numbers/Natural/Abstract/NAddOrder.v new file mode 100644 index 00000000..7024fd00 --- /dev/null +++ b/theories/Numbers/Natural/Abstract/NAddOrder.v @@ -0,0 +1,114 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* p + n < p + m. +Proof NZadd_lt_mono_l. + +Theorem add_lt_mono_r : forall n m p : N, n < m <-> n + p < m + p. +Proof NZadd_lt_mono_r. + +Theorem add_lt_mono : forall n m p q : N, n < m -> p < q -> n + p < m + q. +Proof NZadd_lt_mono. + +Theorem add_le_mono_l : forall n m p : N, n <= m <-> p + n <= p + m. +Proof NZadd_le_mono_l. + +Theorem add_le_mono_r : forall n m p : N, n <= m <-> n + p <= m + p. +Proof NZadd_le_mono_r. + +Theorem add_le_mono : forall n m p q : N, n <= m -> p <= q -> n + p <= m + q. +Proof NZadd_le_mono. + +Theorem add_lt_le_mono : forall n m p q : N, n < m -> p <= q -> n + p < m + q. +Proof NZadd_lt_le_mono. + +Theorem add_le_lt_mono : forall n m p q : N, n <= m -> p < q -> n + p < m + q. +Proof NZadd_le_lt_mono. + +Theorem add_pos_pos : forall n m : N, 0 < n -> 0 < m -> 0 < n + m. +Proof NZadd_pos_pos. + +Theorem lt_add_pos_l : forall n m : N, 0 < n -> m < n + m. +Proof NZlt_add_pos_l. + +Theorem lt_add_pos_r : forall n m : N, 0 < n -> m < m + n. +Proof NZlt_add_pos_r. + +Theorem le_lt_add_lt : forall n m p q : N, n <= m -> p + m < q + n -> p < q. +Proof NZle_lt_add_lt. + +Theorem lt_le_add_lt : forall n m p q : N, n < m -> p + m <= q + n -> p < q. +Proof NZlt_le_add_lt. + +Theorem le_le_add_le : forall n m p q : N, n <= m -> p + m <= q + n -> p <= q. +Proof NZle_le_add_le. + +Theorem add_lt_cases : forall n m p q : N, n + m < p + q -> n < p \/ m < q. +Proof NZadd_lt_cases. + +Theorem add_le_cases : forall n m p q : N, n + m <= p + q -> n <= p \/ m <= q. +Proof NZadd_le_cases. + +Theorem add_pos_cases : forall n m : N, 0 < n + m -> 0 < n \/ 0 < m. +Proof NZadd_pos_cases. + +(* Theorems true for natural numbers *) + +Theorem le_add_r : forall n m : N, n <= n + m. +Proof. +intro n; induct m. +rewrite add_0_r; now apply eq_le_incl. +intros m IH. rewrite add_succ_r; now apply le_le_succ_r. +Qed. + +Theorem lt_lt_add_r : forall n m p : N, n < m -> n < m + p. +Proof. +intros n m p H; rewrite <- (add_0_r n). +apply add_lt_le_mono; [assumption | apply le_0_l]. +Qed. + +Theorem lt_lt_add_l : forall n m p : N, n < m -> n < p + m. +Proof. +intros n m p; rewrite add_comm; apply lt_lt_add_r. +Qed. + +Theorem add_pos_l : forall n m : N, 0 < n -> 0 < n + m. +Proof. +intros; apply NZadd_pos_nonneg. assumption. apply le_0_l. +Qed. + +Theorem add_pos_r : forall n m : N, 0 < m -> 0 < n + m. +Proof. +intros; apply NZadd_nonneg_pos. apply le_0_l. assumption. +Qed. + +(* The following property is used to prove the correctness of the +definition of order on integers constructed from pairs of natural numbers *) + +Theorem add_lt_repl_pair : forall n m n' m' u v : N, + n + u < m + v -> n + m' == n' + m -> n' + u < m' + v. +Proof. +intros n m n' m' u v H1 H2. +symmetry in H2. assert (H3 : n' + m <= n + m') by now apply eq_le_incl. +pose proof (add_lt_le_mono _ _ _ _ H1 H3) as H4. +rewrite (add_shuffle2 n u), (add_shuffle1 m v), (add_comm m n) in H4. +do 2 rewrite <- add_assoc in H4. do 2 apply <- add_lt_mono_l in H4. +now rewrite (add_comm n' u), (add_comm m' v). +Qed. + +End NAddOrderPropFunct. diff --git a/theories/Numbers/Natural/Abstract/NAxioms.v b/theories/Numbers/Natural/Abstract/NAxioms.v new file mode 100644 index 00000000..750cc977 --- /dev/null +++ b/theories/Numbers/Natural/Abstract/NAxioms.v @@ -0,0 +1,71 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* y" := (NZlt y x) (only parsing) : NatScope. +Notation "x >= y" := (NZle y x) (only parsing) : NatScope. + +Open Local Scope NatScope. + +Parameter Inline recursion : forall A : Type, A -> (N -> A -> A) -> N -> A. +Implicit Arguments recursion [A]. + +Axiom pred_0 : P 0 == 0. + +Axiom recursion_wd : forall (A : Type) (Aeq : relation A), + forall a a' : A, Aeq a a' -> + forall f f' : N -> A -> A, fun2_eq Neq Aeq Aeq f f' -> + forall x x' : N, x == x' -> + Aeq (recursion a f x) (recursion a' f' x'). + +Axiom recursion_0 : + forall (A : Type) (a : A) (f : N -> A -> A), recursion a f 0 = a. + +Axiom recursion_succ : + forall (A : Type) (Aeq : relation A) (a : A) (f : N -> A -> A), + Aeq a a -> fun2_wd Neq Aeq Aeq f -> + forall n : N, Aeq (recursion a f (S n)) (f n (recursion a f n)). + +(*Axiom dep_rec : + forall A : N -> Type, A 0 -> (forall n : N, A n -> A (S n)) -> forall n : N, A n.*) + +End NAxiomsSig. + diff --git a/theories/Numbers/Natural/Abstract/NBase.v b/theories/Numbers/Natural/Abstract/NBase.v new file mode 100644 index 00000000..3e4032b5 --- /dev/null +++ b/theories/Numbers/Natural/Abstract/NBase.v @@ -0,0 +1,288 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* S n1 == S n2. +Proof NZsucc_wd. + +Theorem pred_wd : forall n1 n2 : N, n1 == n2 -> P n1 == P n2. +Proof NZpred_wd. + +Theorem pred_succ : forall n : N, P (S n) == n. +Proof NZpred_succ. + +Theorem pred_0 : P 0 == 0. +Proof pred_0. + +Theorem Neq_refl : forall n : N, n == n. +Proof (proj1 NZeq_equiv). + +Theorem Neq_symm : forall n m : N, n == m -> m == n. +Proof (proj2 (proj2 NZeq_equiv)). + +Theorem Neq_trans : forall n m p : N, n == m -> m == p -> n == p. +Proof (proj1 (proj2 NZeq_equiv)). + +Theorem neq_symm : forall n m : N, n ~= m -> m ~= n. +Proof NZneq_symm. + +Theorem succ_inj : forall n1 n2 : N, S n1 == S n2 -> n1 == n2. +Proof NZsucc_inj. + +Theorem succ_inj_wd : forall n1 n2 : N, S n1 == S n2 <-> n1 == n2. +Proof NZsucc_inj_wd. + +Theorem succ_inj_wd_neg : forall n m : N, S n ~= S m <-> n ~= m. +Proof NZsucc_inj_wd_neg. + +(* Decidability and stability of equality was proved only in NZOrder, but +since it does not mention order, we'll put it here *) + +Theorem eq_dec : forall n m : N, decidable (n == m). +Proof NZeq_dec. + +Theorem eq_dne : forall n m : N, ~ ~ n == m <-> n == m. +Proof NZeq_dne. + +(* Now we prove that the successor of a number is not zero by defining a +function (by recursion) that maps 0 to false and the successor to true *) + +Definition if_zero (A : Set) (a b : A) (n : N) : A := + recursion a (fun _ _ => b) n. + +Add Parametric Morphism (A : Set) : (if_zero A) with signature (@eq _ ==> @eq _ ==> Neq ==> @eq _) as if_zero_wd. +Proof. +intros; unfold if_zero. apply recursion_wd with (Aeq := (@eq A)). +reflexivity. unfold fun2_eq; now intros. assumption. +Qed. + +Theorem if_zero_0 : forall (A : Set) (a b : A), if_zero A a b 0 = a. +Proof. +unfold if_zero; intros; now rewrite recursion_0. +Qed. + +Theorem if_zero_succ : forall (A : Set) (a b : A) (n : N), if_zero A a b (S n) = b. +Proof. +intros; unfold if_zero. +now rewrite (@recursion_succ A (@eq A)); [| | unfold fun2_wd; now intros]. +Qed. + +Implicit Arguments if_zero [A]. + +Theorem neq_succ_0 : forall n : N, S n ~= 0. +Proof. +intros n H. +assert (true = false); [| discriminate]. +replace true with (if_zero false true (S n)) by apply if_zero_succ. +pattern false at 2; replace false with (if_zero false true 0) by apply if_zero_0. +now rewrite H. +Qed. + +Theorem neq_0_succ : forall n : N, 0 ~= S n. +Proof. +intro n; apply neq_symm; apply neq_succ_0. +Qed. + +(* Next, we show that all numbers are nonnegative and recover regular induction +from the bidirectional induction on NZ *) + +Theorem le_0_l : forall n : N, 0 <= n. +Proof. +NZinduct n. +now apply NZeq_le_incl. +intro n; split. +apply NZle_le_succ_r. +intro H; apply -> NZle_succ_r in H; destruct H as [H | H]. +assumption. +symmetry in H; false_hyp H neq_succ_0. +Qed. + +Theorem induction : + forall A : N -> Prop, predicate_wd Neq A -> + A 0 -> (forall n : N, A n -> A (S n)) -> forall n : N, A n. +Proof. +intros A A_wd A0 AS n; apply NZright_induction with 0; try assumption. +intros; auto; apply le_0_l. apply le_0_l. +Qed. + +(* The theorems NZinduction, NZcentral_induction and the tactic NZinduct +refer to bidirectional induction, which is not useful on natural +numbers. Therefore, we define a new induction tactic for natural numbers. +We do not have to call "Declare Left Step" and "Declare Right Step" +commands again, since the data for stepl and stepr tactics is inherited +from NZ. *) + +Ltac induct n := induction_maker n ltac:(apply induction). + +Theorem case_analysis : + forall A : N -> Prop, predicate_wd Neq A -> + A 0 -> (forall n : N, A (S n)) -> forall n : N, A n. +Proof. +intros; apply induction; auto. +Qed. + +Ltac cases n := induction_maker n ltac:(apply case_analysis). + +Theorem neq_0 : ~ forall n, n == 0. +Proof. +intro H; apply (neq_succ_0 0). apply H. +Qed. + +Theorem neq_0_r : forall n, n ~= 0 <-> exists m, n == S m. +Proof. +cases n. split; intro H; +[now elim H | destruct H as [m H]; symmetry in H; false_hyp H neq_succ_0]. +intro n; split; intro H; [now exists n | apply neq_succ_0]. +Qed. + +Theorem zero_or_succ : forall n, n == 0 \/ exists m, n == S m. +Proof. +cases n. +now left. +intro n; right; now exists n. +Qed. + +Theorem eq_pred_0 : forall n : N, P n == 0 <-> n == 0 \/ n == 1. +Proof. +cases n. +rewrite pred_0. setoid_replace (0 == 1) with False using relation iff. tauto. +split; intro H; [symmetry in H; false_hyp H neq_succ_0 | elim H]. +intro n. rewrite pred_succ. +setoid_replace (S n == 0) with False using relation iff by + (apply -> neg_false; apply neq_succ_0). +rewrite succ_inj_wd. tauto. +Qed. + +Theorem succ_pred : forall n : N, n ~= 0 -> S (P n) == n. +Proof. +cases n. +intro H; elimtype False; now apply H. +intros; now rewrite pred_succ. +Qed. + +Theorem pred_inj : forall n m : N, n ~= 0 -> m ~= 0 -> P n == P m -> n == m. +Proof. +intros n m; cases n. +intros H; elimtype False; now apply H. +intros n _; cases m. +intros H; elimtype False; now apply H. +intros m H2 H3. do 2 rewrite pred_succ in H3. now rewrite H3. +Qed. + +(* The following induction principle is useful for reasoning about, e.g., +Fibonacci numbers *) + +Section PairInduction. + +Variable A : N -> Prop. +Hypothesis A_wd : predicate_wd Neq A. + +Add Morphism A with signature Neq ==> iff as A_morph. +Proof. +exact A_wd. +Qed. + +Theorem pair_induction : + A 0 -> A 1 -> + (forall n, A n -> A (S n) -> A (S (S n))) -> forall n, A n. +Proof. +intros until 3. +assert (D : forall n, A n /\ A (S n)); [ |intro n; exact (proj1 (D n))]. +induct n; [ | intros n [IH1 IH2]]; auto. +Qed. + +End PairInduction. + +(*Ltac pair_induct n := induction_maker n ltac:(apply pair_induction).*) + +(* The following is useful for reasoning about, e.g., Ackermann function *) +Section TwoDimensionalInduction. + +Variable R : N -> N -> Prop. +Hypothesis R_wd : relation_wd Neq Neq R. + +Add Morphism R with signature Neq ==> Neq ==> iff as R_morph. +Proof. +exact R_wd. +Qed. + +Theorem two_dim_induction : + R 0 0 -> + (forall n m, R n m -> R n (S m)) -> + (forall n, (forall m, R n m) -> R (S n) 0) -> forall n m, R n m. +Proof. +intros H1 H2 H3. induct n. +induct m. +exact H1. exact (H2 0). +intros n IH. induct m. +now apply H3. exact (H2 (S n)). +Qed. + +End TwoDimensionalInduction. + +(*Ltac two_dim_induct n m := + try intros until n; + try intros until m; + pattern n, m; apply two_dim_induction; clear n m; + [solve_relation_wd | | | ].*) + +Section DoubleInduction. + +Variable R : N -> N -> Prop. +Hypothesis R_wd : relation_wd Neq Neq R. + +Add Morphism R with signature Neq ==> Neq ==> iff as R_morph1. +Proof. +exact R_wd. +Qed. + +Theorem double_induction : + (forall m : N, R 0 m) -> + (forall n : N, R (S n) 0) -> + (forall n m : N, R n m -> R (S n) (S m)) -> forall n m : N, R n m. +Proof. +intros H1 H2 H3; induct n; auto. +intros n H; cases m; auto. +Qed. + +End DoubleInduction. + +Ltac double_induct n m := + try intros until n; + try intros until m; + pattern n, m; apply double_induction; clear n m; + [solve_relation_wd | | | ]. + +End NBasePropFunct. + diff --git a/theories/Numbers/Natural/Abstract/NDefOps.v b/theories/Numbers/Natural/Abstract/NDefOps.v new file mode 100644 index 00000000..e15e4672 --- /dev/null +++ b/theories/Numbers/Natural/Abstract/NDefOps.v @@ -0,0 +1,298 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* S p) x. + +Infix Local "++" := def_add (at level 50, left associativity). + +Add Morphism def_add with signature Neq ==> Neq ==> Neq as def_add_wd. +Proof. +unfold def_add. +intros x x' Exx' y y' Eyy'. +apply recursion_wd with (Aeq := Neq). +assumption. +unfold fun2_eq; intros _ _ _ p p' Epp'; now rewrite Epp'. +assumption. +Qed. + +Theorem def_add_0_l : forall y : N, 0 ++ y == y. +Proof. +intro y. unfold def_add. now rewrite recursion_0. +Qed. + +Theorem def_add_succ_l : forall x y : N, S x ++ y == S (x ++ y). +Proof. +intros x y; unfold def_add. +rewrite (@recursion_succ N Neq); try reflexivity. +unfold fun2_wd. intros _ _ _ m1 m2 H2. now rewrite H2. +Qed. + +Theorem def_add_add : forall n m : N, n ++ m == n + m. +Proof. +intros n m; induct n. +now rewrite def_add_0_l, add_0_l. +intros n H. now rewrite def_add_succ_l, add_succ_l, H. +Qed. + +(*****************************************************) +(** Multiplication *) + +Definition def_mul (x y : N) := recursion 0 (fun _ p => p ++ x) y. + +Infix Local "**" := def_mul (at level 40, left associativity). + +Lemma def_mul_step_wd : forall x : N, fun2_wd Neq Neq Neq (fun _ p => def_add p x). +Proof. +unfold fun2_wd. intros. now apply def_add_wd. +Qed. + +Lemma def_mul_step_equal : + forall x x' : N, x == x' -> + fun2_eq Neq Neq Neq (fun _ p => def_add p x) (fun x p => def_add p x'). +Proof. +unfold fun2_eq; intros; apply def_add_wd; assumption. +Qed. + +Add Morphism def_mul with signature Neq ==> Neq ==> Neq as def_mul_wd. +Proof. +unfold def_mul. +intros x x' Exx' y y' Eyy'. +apply recursion_wd with (Aeq := Neq). +reflexivity. apply def_mul_step_equal. assumption. assumption. +Qed. + +Theorem def_mul_0_r : forall x : N, x ** 0 == 0. +Proof. +intro. unfold def_mul. now rewrite recursion_0. +Qed. + +Theorem def_mul_succ_r : forall x y : N, x ** S y == x ** y ++ x. +Proof. +intros x y; unfold def_mul. +now rewrite (@recursion_succ N Neq); [| apply def_mul_step_wd |]. +Qed. + +Theorem def_mul_mul : forall n m : N, n ** m == n * m. +Proof. +intros n m; induct m. +now rewrite def_mul_0_r, mul_0_r. +intros m IH; now rewrite def_mul_succ_r, mul_succ_r, def_add_add, IH. +Qed. + +(*****************************************************) +(** Order *) + +Definition def_ltb (m : N) : N -> bool := +recursion + (if_zero false true) + (fun _ f => fun n => recursion false (fun n' _ => f n') n) + m. + +Infix Local "<<" := def_ltb (at level 70, no associativity). + +Lemma lt_base_wd : fun_wd Neq (@eq bool) (if_zero false true). +unfold fun_wd; intros; now apply if_zero_wd. +Qed. + +Lemma lt_step_wd : +fun2_wd Neq (fun_eq Neq (@eq bool)) (fun_eq Neq (@eq bool)) + (fun _ f => fun n => recursion false (fun n' _ => f n') n). +Proof. +unfold fun2_wd, fun_eq. +intros x x' Exx' f f' Eff' y y' Eyy'. +apply recursion_wd with (Aeq := @eq bool). +reflexivity. +unfold fun2_eq; intros; now apply Eff'. +assumption. +Qed. + +Lemma lt_curry_wd : + forall m m' : N, m == m' -> fun_eq Neq (@eq bool) (def_ltb m) (def_ltb m'). +Proof. +unfold def_ltb. +intros m m' Emm'. +apply recursion_wd with (Aeq := fun_eq Neq (@eq bool)). +apply lt_base_wd. +apply lt_step_wd. +assumption. +Qed. + +Add Morphism def_ltb with signature Neq ==> Neq ==> (@eq bool) as def_ltb_wd. +Proof. +intros; now apply lt_curry_wd. +Qed. + +Theorem def_ltb_base : forall n : N, 0 << n = if_zero false true n. +Proof. +intro n; unfold def_ltb; now rewrite recursion_0. +Qed. + +Theorem def_ltb_step : + forall m n : N, S m << n = recursion false (fun n' _ => m << n') n. +Proof. +intros m n; unfold def_ltb. +pose proof + (@recursion_succ + (N -> bool) + (fun_eq Neq (@eq bool)) + (if_zero false true) + (fun _ f => fun n => recursion false (fun n' _ => f n') n) + lt_base_wd + lt_step_wd + m n n) as H. +now rewrite H. +Qed. + +(* Above, we rewrite applications of function. Is it possible to rewrite +functions themselves, i.e., rewrite (recursion lt_base lt_step (S n)) to +lt_step n (recursion lt_base lt_step n)? *) + +Theorem def_ltb_0 : forall n : N, n << 0 = false. +Proof. +cases n. +rewrite def_ltb_base; now rewrite if_zero_0. +intro n; rewrite def_ltb_step. now rewrite recursion_0. +Qed. + +Theorem def_ltb_0_succ : forall n : N, 0 << S n = true. +Proof. +intro n; rewrite def_ltb_base; now rewrite if_zero_succ. +Qed. + +Theorem succ_def_ltb_mono : forall n m : N, (S n << S m) = (n << m). +Proof. +intros n m. +rewrite def_ltb_step. rewrite (@recursion_succ bool (@eq bool)); try reflexivity. +unfold fun2_wd; intros; now apply def_ltb_wd. +Qed. + +Theorem def_ltb_lt : forall n m : N, n << m = true <-> n < m. +Proof. +double_induct n m. +cases m. +rewrite def_ltb_0. split; intro H; [discriminate H | false_hyp H nlt_0_r]. +intro n. rewrite def_ltb_0_succ. split; intro; [apply lt_0_succ | reflexivity]. +intro n. rewrite def_ltb_0. split; intro H; [discriminate | false_hyp H nlt_0_r]. +intros n m. rewrite succ_def_ltb_mono. now rewrite <- succ_lt_mono. +Qed. + +(* +(*****************************************************) +(** Even *) + +Definition even (x : N) := recursion true (fun _ p => negb p) x. + +Lemma even_step_wd : fun2_wd Neq (@eq bool) (@eq bool) (fun x p => if p then false else true). +Proof. +unfold fun2_wd. +intros x x' Exx' b b' Ebb'. +unfold eq_bool; destruct b; destruct b'; now simpl. +Qed. + +Add Morphism even with signature Neq ==> (@eq bool) as even_wd. +Proof. +unfold even; intros. +apply recursion_wd with (A := bool) (Aeq := (@eq bool)). +now unfold eq_bool. +unfold fun2_eq. intros _ _ _ b b' Ebb'. unfold eq_bool; destruct b; destruct b'; now simpl. +assumption. +Qed. + +Theorem even_0 : even 0 = true. +Proof. +unfold even. +now rewrite recursion_0. +Qed. + +Theorem even_succ : forall x : N, even (S x) = negb (even x). +Proof. +unfold even. +intro x; rewrite (recursion_succ (@eq bool)); try reflexivity. +unfold fun2_wd. +intros _ _ _ b b' Ebb'. destruct b; destruct b'; now simpl. +Qed. + +(*****************************************************) +(** Division by 2 *) + +Definition half_aux (x : N) : N * N := + recursion (0, 0) (fun _ p => let (x1, x2) := p in ((S x2, x1))) x. + +Definition half (x : N) := snd (half_aux x). + +Definition E2 := prod_rel Neq Neq. + +Add Relation (prod N N) E2 +reflexivity proved by (prod_rel_refl N N Neq Neq E_equiv E_equiv) +symmetry proved by (prod_rel_symm N N Neq Neq E_equiv E_equiv) +transitivity proved by (prod_rel_trans N N Neq Neq E_equiv E_equiv) +as E2_rel. + +Lemma half_step_wd: fun2_wd Neq E2 E2 (fun _ p => let (x1, x2) := p in ((S x2, x1))). +Proof. +unfold fun2_wd, E2, prod_rel. +intros _ _ _ p1 p2 [H1 H2]. +destruct p1; destruct p2; simpl in *. +now split; [rewrite H2 |]. +Qed. + +Add Morphism half with signature Neq ==> Neq as half_wd. +Proof. +unfold half. +assert (H: forall x y, x == y -> E2 (half_aux x) (half_aux y)). +intros x y Exy; unfold half_aux; apply recursion_wd with (Aeq := E2); unfold E2. +unfold E2. +unfold prod_rel; simpl; now split. +unfold fun2_eq, prod_rel; simpl. +intros _ _ _ p1 p2; destruct p1; destruct p2; simpl. +intros [H1 H2]; split; [rewrite H2 | assumption]. reflexivity. assumption. +unfold E2, prod_rel in H. intros x y Exy; apply H in Exy. +exact (proj2 Exy). +Qed. + +(*****************************************************) +(** Logarithm for the base 2 *) + +Definition log (x : N) : N := +strong_rec 0 + (fun x g => + if (e x 0) then 0 + else if (e x 1) then 0 + else S (g (half x))) + x. + +Add Morphism log with signature Neq ==> Neq as log_wd. +Proof. +intros x x' Exx'. unfold log. +apply strong_rec_wd with (Aeq := Neq); try (reflexivity || assumption). +unfold fun2_eq. intros y y' Eyy' g g' Egg'. +assert (H : e y 0 = e y' 0); [now apply e_wd|]. +rewrite <- H; clear H. +assert (H : e y 1 = e y' 1); [now apply e_wd|]. +rewrite <- H; clear H. +assert (H : S (g (half y)) == S (g' (half y'))); +[apply succ_wd; apply Egg'; now apply half_wd|]. +now destruct (e y 0); destruct (e y 1). +Qed. +*) +End NdefOpsPropFunct. + diff --git a/theories/Numbers/Natural/Abstract/NIso.v b/theories/Numbers/Natural/Abstract/NIso.v new file mode 100644 index 00000000..f6ccf3db --- /dev/null +++ b/theories/Numbers/Natural/Abstract/NIso.v @@ -0,0 +1,122 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* N2) : Prop := + f O1 == O2 /\ forall n : N1, f (S1 n) == S2 (f n). + +Definition natural_isomorphism : N1 -> N2 := + NAxiomsMod1.recursion O2 (fun (n : N1) (p : N2) => S2 p). + +Add Morphism natural_isomorphism with signature Eq1 ==> Eq2 as natural_isomorphism_wd. +Proof. +unfold natural_isomorphism. +intros n m Eqxy. +apply NAxiomsMod1.recursion_wd with (Aeq := Eq2). +reflexivity. +unfold fun2_eq. intros _ _ _ y' y'' H. now apply NBasePropMod2.succ_wd. +assumption. +Qed. + +Theorem natural_isomorphism_0 : natural_isomorphism O1 == O2. +Proof. +unfold natural_isomorphism; now rewrite NAxiomsMod1.recursion_0. +Qed. + +Theorem natural_isomorphism_succ : + forall n : N1, natural_isomorphism (S1 n) == S2 (natural_isomorphism n). +Proof. +unfold natural_isomorphism. +intro n. now rewrite (@NAxiomsMod1.recursion_succ N2 NAxiomsMod2.Neq) ; +[ | | unfold fun2_wd; intros; apply NBasePropMod2.succ_wd]. +Qed. + +Theorem hom_nat_iso : homomorphism natural_isomorphism. +Proof. +unfold homomorphism, natural_isomorphism; split; +[exact natural_isomorphism_0 | exact natural_isomorphism_succ]. +Qed. + +End Homomorphism. + +Module Inverse (NAxiomsMod1 NAxiomsMod2 : NAxiomsSig). + +Module Import NBasePropMod1 := NBasePropFunct NAxiomsMod1. +(* This makes the tactic induct available. Since it is taken from +(NBasePropFunct NAxiomsMod1), it refers to induction on N1. *) + +Module Hom12 := Homomorphism NAxiomsMod1 NAxiomsMod2. +Module Hom21 := Homomorphism NAxiomsMod2 NAxiomsMod1. + +Notation Local N1 := NAxiomsMod1.N. +Notation Local N2 := NAxiomsMod2.N. +Notation Local h12 := Hom12.natural_isomorphism. +Notation Local h21 := Hom21.natural_isomorphism. + +Notation Local "n == m" := (NAxiomsMod1.Neq n m) (at level 70, no associativity). + +Lemma inverse_nat_iso : forall n : N1, h21 (h12 n) == n. +Proof. +induct n. +now rewrite Hom12.natural_isomorphism_0, Hom21.natural_isomorphism_0. +intros n IH. +now rewrite Hom12.natural_isomorphism_succ, Hom21.natural_isomorphism_succ, IH. +Qed. + +End Inverse. + +Module Isomorphism (NAxiomsMod1 NAxiomsMod2 : NAxiomsSig). + +Module Hom12 := Homomorphism NAxiomsMod1 NAxiomsMod2. +Module Hom21 := Homomorphism NAxiomsMod2 NAxiomsMod1. + +Module Inverse12 := Inverse NAxiomsMod1 NAxiomsMod2. +Module Inverse21 := Inverse NAxiomsMod2 NAxiomsMod1. + +Notation Local N1 := NAxiomsMod1.N. +Notation Local N2 := NAxiomsMod2.N. +Notation Local Eq1 := NAxiomsMod1.Neq. +Notation Local Eq2 := NAxiomsMod2.Neq. +Notation Local h12 := Hom12.natural_isomorphism. +Notation Local h21 := Hom21.natural_isomorphism. + +Definition isomorphism (f1 : N1 -> N2) (f2 : N2 -> N1) : Prop := + Hom12.homomorphism f1 /\ Hom21.homomorphism f2 /\ + forall n : N1, Eq1 (f2 (f1 n)) n /\ + forall n : N2, Eq2 (f1 (f2 n)) n. + +Theorem iso_nat_iso : isomorphism h12 h21. +Proof. +unfold isomorphism. +split. apply Hom12.hom_nat_iso. +split. apply Hom21.hom_nat_iso. +split. apply Inverse12.inverse_nat_iso. +apply Inverse21.inverse_nat_iso. +Qed. + +End Isomorphism. + diff --git a/theories/Numbers/Natural/Abstract/NMul.v b/theories/Numbers/Natural/Abstract/NMul.v new file mode 100644 index 00000000..0b00f689 --- /dev/null +++ b/theories/Numbers/Natural/Abstract/NMul.v @@ -0,0 +1,87 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* forall m1 m2 : N, m1 == m2 -> n1 * m1 == n2 * m2. +Proof NZmul_wd. + +Theorem mul_0_l : forall n : N, 0 * n == 0. +Proof NZmul_0_l. + +Theorem mul_succ_l : forall n m : N, (S n) * m == n * m + m. +Proof NZmul_succ_l. + +(** Theorems that are valid for both natural numbers and integers *) + +Theorem mul_0_r : forall n, n * 0 == 0. +Proof NZmul_0_r. + +Theorem mul_succ_r : forall n m, n * (S m) == n * m + n. +Proof NZmul_succ_r. + +Theorem mul_comm : forall n m : N, n * m == m * n. +Proof NZmul_comm. + +Theorem mul_add_distr_r : forall n m p : N, (n + m) * p == n * p + m * p. +Proof NZmul_add_distr_r. + +Theorem mul_add_distr_l : forall n m p : N, n * (m + p) == n * m + n * p. +Proof NZmul_add_distr_l. + +Theorem mul_assoc : forall n m p : N, n * (m * p) == (n * m) * p. +Proof NZmul_assoc. + +Theorem mul_1_l : forall n : N, 1 * n == n. +Proof NZmul_1_l. + +Theorem mul_1_r : forall n : N, n * 1 == n. +Proof NZmul_1_r. + +(* Theorems that cannot be proved in NZMul *) + +(* In proving the correctness of the definition of multiplication on +integers constructed from pairs of natural numbers, we'll need the +following fact about natural numbers: + +a * n + u == a * m + v -> n + m' == n' + m -> a * n' + u = a * m' + v + +Here n + m' == n' + m expresses equality of integers (n, m) and (n', m'), +since a pair (a, b) of natural numbers represents the integer a - b. On +integers, the formula above could be proved by moving a * m to the left, +factoring out a and replacing n - m by n' - m'. However, the formula is +required in the process of constructing integers, so it has to be proved +for natural numbers, where terms cannot be moved from one side of an +equation to the other. The proof uses the cancellation laws add_cancel_l +and add_cancel_r. *) + +Theorem add_mul_repl_pair : forall a n m n' m' u v : N, + a * n + u == a * m + v -> n + m' == n' + m -> a * n' + u == a * m' + v. +Proof. +intros a n m n' m' u v H1 H2. +apply (@NZmul_wd a a) in H2; [| reflexivity]. +do 2 rewrite mul_add_distr_l in H2. symmetry in H2. +pose proof (NZadd_wd _ _ H1 _ _ H2) as H3. +rewrite (add_shuffle1 (a * m)), (add_comm (a * m) (a * n)) in H3. +do 2 rewrite <- add_assoc in H3. apply -> add_cancel_l in H3. +rewrite (add_assoc u), (add_comm (a * m)) in H3. +apply -> add_cancel_r in H3. +now rewrite (add_comm (a * n') u), (add_comm (a * m') v). +Qed. + +End NMulPropFunct. + diff --git a/theories/Numbers/Natural/Abstract/NMulOrder.v b/theories/Numbers/Natural/Abstract/NMulOrder.v new file mode 100644 index 00000000..aa21fb50 --- /dev/null +++ b/theories/Numbers/Natural/Abstract/NMulOrder.v @@ -0,0 +1,131 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* (p * n < p * m <-> q * n + m < q * m + n). +Proof NZmul_lt_pred. + +Theorem mul_lt_mono_pos_l : forall p n m : N, 0 < p -> (n < m <-> p * n < p * m). +Proof NZmul_lt_mono_pos_l. + +Theorem mul_lt_mono_pos_r : forall p n m : N, 0 < p -> (n < m <-> n * p < m * p). +Proof NZmul_lt_mono_pos_r. + +Theorem mul_cancel_l : forall n m p : N, p ~= 0 -> (p * n == p * m <-> n == m). +Proof NZmul_cancel_l. + +Theorem mul_cancel_r : forall n m p : N, p ~= 0 -> (n * p == m * p <-> n == m). +Proof NZmul_cancel_r. + +Theorem mul_id_l : forall n m : N, m ~= 0 -> (n * m == m <-> n == 1). +Proof NZmul_id_l. + +Theorem mul_id_r : forall n m : N, n ~= 0 -> (n * m == n <-> m == 1). +Proof NZmul_id_r. + +Theorem mul_le_mono_pos_l : forall n m p : N, 0 < p -> (n <= m <-> p * n <= p * m). +Proof NZmul_le_mono_pos_l. + +Theorem mul_le_mono_pos_r : forall n m p : N, 0 < p -> (n <= m <-> n * p <= m * p). +Proof NZmul_le_mono_pos_r. + +Theorem mul_pos_pos : forall n m : N, 0 < n -> 0 < m -> 0 < n * m. +Proof NZmul_pos_pos. + +Theorem lt_1_mul_pos : forall n m : N, 1 < n -> 0 < m -> 1 < n * m. +Proof NZlt_1_mul_pos. + +Theorem eq_mul_0 : forall n m : N, n * m == 0 <-> n == 0 \/ m == 0. +Proof NZeq_mul_0. + +Theorem neq_mul_0 : forall n m : N, n ~= 0 /\ m ~= 0 <-> n * m ~= 0. +Proof NZneq_mul_0. + +Theorem eq_square_0 : forall n : N, n * n == 0 <-> n == 0. +Proof NZeq_square_0. + +Theorem eq_mul_0_l : forall n m : N, n * m == 0 -> m ~= 0 -> n == 0. +Proof NZeq_mul_0_l. + +Theorem eq_mul_0_r : forall n m : N, n * m == 0 -> n ~= 0 -> m == 0. +Proof NZeq_mul_0_r. + +Theorem square_lt_mono : forall n m : N, n < m <-> n * n < m * m. +Proof. +intros n m; split; intro; +[apply NZsquare_lt_mono_nonneg | apply NZsquare_lt_simpl_nonneg]; +try assumption; apply le_0_l. +Qed. + +Theorem square_le_mono : forall n m : N, n <= m <-> n * n <= m * m. +Proof. +intros n m; split; intro; +[apply NZsquare_le_mono_nonneg | apply NZsquare_le_simpl_nonneg]; +try assumption; apply le_0_l. +Qed. + +Theorem mul_2_mono_l : forall n m : N, n < m -> 1 + (1 + 1) * n < (1 + 1) * m. +Proof NZmul_2_mono_l. + +(* Theorems that are either not valid on Z or have different proofs on N and Z *) + +Theorem mul_le_mono_l : forall n m p : N, n <= m -> p * n <= p * m. +Proof. +intros; apply NZmul_le_mono_nonneg_l. apply le_0_l. assumption. +Qed. + +Theorem mul_le_mono_r : forall n m p : N, n <= m -> n * p <= m * p. +Proof. +intros; apply NZmul_le_mono_nonneg_r. apply le_0_l. assumption. +Qed. + +Theorem mul_lt_mono : forall n m p q : N, n < m -> p < q -> n * p < m * q. +Proof. +intros; apply NZmul_lt_mono_nonneg; try assumption; apply le_0_l. +Qed. + +Theorem mul_le_mono : forall n m p q : N, n <= m -> p <= q -> n * p <= m * q. +Proof. +intros; apply NZmul_le_mono_nonneg; try assumption; apply le_0_l. +Qed. + +Theorem lt_0_mul : forall n m : N, n * m > 0 <-> n > 0 /\ m > 0. +Proof. +intros n m; split; [intro H | intros [H1 H2]]. +apply -> NZlt_0_mul in H. destruct H as [[H1 H2] | [H1 H2]]. now split. false_hyp H1 nlt_0_r. +now apply NZmul_pos_pos. +Qed. + +Notation mul_pos := lt_0_mul (only parsing). + +Theorem eq_mul_1 : forall n m : N, n * m == 1 <-> n == 1 /\ m == 1. +Proof. +intros n m. +split; [| intros [H1 H2]; now rewrite H1, H2, mul_1_l]. +intro H; destruct (NZlt_trichotomy n 1) as [H1 | [H1 | H1]]. +apply -> lt_1_r in H1. rewrite H1, mul_0_l in H. false_hyp H neq_0_succ. +rewrite H1, mul_1_l in H; now split. +destruct (eq_0_gt_0_cases m) as [H2 | H2]. +rewrite H2, mul_0_r in H; false_hyp H neq_0_succ. +apply -> (mul_lt_mono_pos_r m) in H1; [| assumption]. rewrite mul_1_l in H1. +assert (H3 : 1 < n * m) by now apply (lt_1_l 0 m). +rewrite H in H3; false_hyp H3 lt_irrefl. +Qed. + +End NMulOrderPropFunct. + diff --git a/theories/Numbers/Natural/Abstract/NOrder.v b/theories/Numbers/Natural/Abstract/NOrder.v new file mode 100644 index 00000000..826ffa2c --- /dev/null +++ b/theories/Numbers/Natural/Abstract/NOrder.v @@ -0,0 +1,539 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* forall m1 m2 : N, m1 == m2 -> (n1 < m1 <-> n2 < m2). +Proof NZlt_wd. + +Theorem le_wd : + forall n1 n2 : N, n1 == n2 -> forall m1 m2 : N, m1 == m2 -> (n1 <= m1 <-> n2 <= m2). +Proof NZle_wd. + +Theorem min_wd : + forall n1 n2 : N, n1 == n2 -> forall m1 m2 : N, m1 == m2 -> min n1 m1 == min n2 m2. +Proof NZmin_wd. + +Theorem max_wd : + forall n1 n2 : N, n1 == n2 -> forall m1 m2 : N, m1 == m2 -> max n1 m1 == max n2 m2. +Proof NZmax_wd. + +Theorem lt_eq_cases : forall n m : N, n <= m <-> n < m \/ n == m. +Proof NZlt_eq_cases. + +Theorem lt_irrefl : forall n : N, ~ n < n. +Proof NZlt_irrefl. + +Theorem lt_succ_r : forall n m : N, n < S m <-> n <= m. +Proof NZlt_succ_r. + +Theorem min_l : forall n m : N, n <= m -> min n m == n. +Proof NZmin_l. + +Theorem min_r : forall n m : N, m <= n -> min n m == m. +Proof NZmin_r. + +Theorem max_l : forall n m : N, m <= n -> max n m == n. +Proof NZmax_l. + +Theorem max_r : forall n m : N, n <= m -> max n m == m. +Proof NZmax_r. + +(* Renaming theorems from NZOrder.v *) + +Theorem lt_le_incl : forall n m : N, n < m -> n <= m. +Proof NZlt_le_incl. + +Theorem eq_le_incl : forall n m : N, n == m -> n <= m. +Proof NZeq_le_incl. + +Theorem lt_neq : forall n m : N, n < m -> n ~= m. +Proof NZlt_neq. + +Theorem le_neq : forall n m : N, n < m <-> n <= m /\ n ~= m. +Proof NZle_neq. + +Theorem le_refl : forall n : N, n <= n. +Proof NZle_refl. + +Theorem lt_succ_diag_r : forall n : N, n < S n. +Proof NZlt_succ_diag_r. + +Theorem le_succ_diag_r : forall n : N, n <= S n. +Proof NZle_succ_diag_r. + +Theorem lt_0_1 : 0 < 1. +Proof NZlt_0_1. + +Theorem le_0_1 : 0 <= 1. +Proof NZle_0_1. + +Theorem lt_lt_succ_r : forall n m : N, n < m -> n < S m. +Proof NZlt_lt_succ_r. + +Theorem le_le_succ_r : forall n m : N, n <= m -> n <= S m. +Proof NZle_le_succ_r. + +Theorem le_succ_r : forall n m : N, n <= S m <-> n <= m \/ n == S m. +Proof NZle_succ_r. + +Theorem neq_succ_diag_l : forall n : N, S n ~= n. +Proof NZneq_succ_diag_l. + +Theorem neq_succ_diag_r : forall n : N, n ~= S n. +Proof NZneq_succ_diag_r. + +Theorem nlt_succ_diag_l : forall n : N, ~ S n < n. +Proof NZnlt_succ_diag_l. + +Theorem nle_succ_diag_l : forall n : N, ~ S n <= n. +Proof NZnle_succ_diag_l. + +Theorem le_succ_l : forall n m : N, S n <= m <-> n < m. +Proof NZle_succ_l. + +Theorem lt_succ_l : forall n m : N, S n < m -> n < m. +Proof NZlt_succ_l. + +Theorem succ_lt_mono : forall n m : N, n < m <-> S n < S m. +Proof NZsucc_lt_mono. + +Theorem succ_le_mono : forall n m : N, n <= m <-> S n <= S m. +Proof NZsucc_le_mono. + +Theorem lt_asymm : forall n m : N, n < m -> ~ m < n. +Proof NZlt_asymm. + +Notation lt_ngt := lt_asymm (only parsing). + +Theorem lt_trans : forall n m p : N, n < m -> m < p -> n < p. +Proof NZlt_trans. + +Theorem le_trans : forall n m p : N, n <= m -> m <= p -> n <= p. +Proof NZle_trans. + +Theorem le_lt_trans : forall n m p : N, n <= m -> m < p -> n < p. +Proof NZle_lt_trans. + +Theorem lt_le_trans : forall n m p : N, n < m -> m <= p -> n < p. +Proof NZlt_le_trans. + +Theorem le_antisymm : forall n m : N, n <= m -> m <= n -> n == m. +Proof NZle_antisymm. + +(** Trichotomy, decidability, and double negation elimination *) + +Theorem lt_trichotomy : forall n m : N, n < m \/ n == m \/ m < n. +Proof NZlt_trichotomy. + +Notation lt_eq_gt_cases := lt_trichotomy (only parsing). + +Theorem lt_gt_cases : forall n m : N, n ~= m <-> n < m \/ n > m. +Proof NZlt_gt_cases. + +Theorem le_gt_cases : forall n m : N, n <= m \/ n > m. +Proof NZle_gt_cases. + +Theorem lt_ge_cases : forall n m : N, n < m \/ n >= m. +Proof NZlt_ge_cases. + +Theorem le_ge_cases : forall n m : N, n <= m \/ n >= m. +Proof NZle_ge_cases. + +Theorem le_ngt : forall n m : N, n <= m <-> ~ n > m. +Proof NZle_ngt. + +Theorem nlt_ge : forall n m : N, ~ n < m <-> n >= m. +Proof NZnlt_ge. + +Theorem lt_dec : forall n m : N, decidable (n < m). +Proof NZlt_dec. + +Theorem lt_dne : forall n m : N, ~ ~ n < m <-> n < m. +Proof NZlt_dne. + +Theorem nle_gt : forall n m : N, ~ n <= m <-> n > m. +Proof NZnle_gt. + +Theorem lt_nge : forall n m : N, n < m <-> ~ n >= m. +Proof NZlt_nge. + +Theorem le_dec : forall n m : N, decidable (n <= m). +Proof NZle_dec. + +Theorem le_dne : forall n m : N, ~ ~ n <= m <-> n <= m. +Proof NZle_dne. + +Theorem nlt_succ_r : forall n m : N, ~ m < S n <-> n < m. +Proof NZnlt_succ_r. + +Theorem lt_exists_pred : + forall z n : N, z < n -> exists k : N, n == S k /\ z <= k. +Proof NZlt_exists_pred. + +Theorem lt_succ_iter_r : + forall (n : nat) (m : N), m < NZsucc_iter (Datatypes.S n) m. +Proof NZlt_succ_iter_r. + +Theorem neq_succ_iter_l : + forall (n : nat) (m : N), NZsucc_iter (Datatypes.S n) m ~= m. +Proof NZneq_succ_iter_l. + +(** Stronger variant of induction with assumptions n >= 0 (n < 0) +in the induction step *) + +Theorem right_induction : + forall A : N -> Prop, predicate_wd Neq A -> + forall z : N, A z -> + (forall n : N, z <= n -> A n -> A (S n)) -> + forall n : N, z <= n -> A n. +Proof NZright_induction. + +Theorem left_induction : + forall A : N -> Prop, predicate_wd Neq A -> + forall z : N, A z -> + (forall n : N, n < z -> A (S n) -> A n) -> + forall n : N, n <= z -> A n. +Proof NZleft_induction. + +Theorem right_induction' : + forall A : N -> Prop, predicate_wd Neq A -> + forall z : N, + (forall n : N, n <= z -> A n) -> + (forall n : N, z <= n -> A n -> A (S n)) -> + forall n : N, A n. +Proof NZright_induction'. + +Theorem left_induction' : + forall A : N -> Prop, predicate_wd Neq A -> + forall z : N, + (forall n : N, z <= n -> A n) -> + (forall n : N, n < z -> A (S n) -> A n) -> + forall n : N, A n. +Proof NZleft_induction'. + +Theorem strong_right_induction : + forall A : N -> Prop, predicate_wd Neq A -> + forall z : N, + (forall n : N, z <= n -> (forall m : N, z <= m -> m < n -> A m) -> A n) -> + forall n : N, z <= n -> A n. +Proof NZstrong_right_induction. + +Theorem strong_left_induction : + forall A : N -> Prop, predicate_wd Neq A -> + forall z : N, + (forall n : N, n <= z -> (forall m : N, m <= z -> S n <= m -> A m) -> A n) -> + forall n : N, n <= z -> A n. +Proof NZstrong_left_induction. + +Theorem strong_right_induction' : + forall A : N -> Prop, predicate_wd Neq A -> + forall z : N, + (forall n : N, n <= z -> A n) -> + (forall n : N, z <= n -> (forall m : N, z <= m -> m < n -> A m) -> A n) -> + forall n : N, A n. +Proof NZstrong_right_induction'. + +Theorem strong_left_induction' : + forall A : N -> Prop, predicate_wd Neq A -> + forall z : N, + (forall n : N, z <= n -> A n) -> + (forall n : N, n <= z -> (forall m : N, m <= z -> S n <= m -> A m) -> A n) -> + forall n : N, A n. +Proof NZstrong_left_induction'. + +Theorem order_induction : + forall A : N -> Prop, predicate_wd Neq A -> + forall z : N, A z -> + (forall n : N, z <= n -> A n -> A (S n)) -> + (forall n : N, n < z -> A (S n) -> A n) -> + forall n : N, A n. +Proof NZorder_induction. + +Theorem order_induction' : + forall A : N -> Prop, predicate_wd Neq A -> + forall z : N, A z -> + (forall n : N, z <= n -> A n -> A (S n)) -> + (forall n : N, n <= z -> A n -> A (P n)) -> + forall n : N, A n. +Proof NZorder_induction'. + +(* We don't need order_induction_0 and order_induction'_0 (see NZOrder and +ZOrder) since they boil down to regular induction *) + +(** Elimintation principle for < *) + +Theorem lt_ind : + forall A : N -> Prop, predicate_wd Neq A -> + forall n : N, + A (S n) -> + (forall m : N, n < m -> A m -> A (S m)) -> + forall m : N, n < m -> A m. +Proof NZlt_ind. + +(** Elimintation principle for <= *) + +Theorem le_ind : + forall A : N -> Prop, predicate_wd Neq A -> + forall n : N, + A n -> + (forall m : N, n <= m -> A m -> A (S m)) -> + forall m : N, n <= m -> A m. +Proof NZle_ind. + +(** Well-founded relations *) + +Theorem lt_wf : forall z : N, well_founded (fun n m : N => z <= n /\ n < m). +Proof NZlt_wf. + +Theorem gt_wf : forall z : N, well_founded (fun n m : N => m < n /\ n <= z). +Proof NZgt_wf. + +Theorem lt_wf_0 : well_founded lt. +Proof. +assert (H : relations_eq lt (fun n m : N => 0 <= n /\ n < m)). +intros x y; split. +intro H; split; [apply le_0_l | assumption]. now intros [_ H]. +rewrite H; apply lt_wf. +(* does not work: +setoid_replace lt with (fun n m : N => 0 <= n /\ n < m) using relation relations_eq.*) +Qed. + +(* Theorems that are true for natural numbers but not for integers *) + +(* "le_0_l : forall n : N, 0 <= n" was proved in NBase.v *) + +Theorem nlt_0_r : forall n : N, ~ n < 0. +Proof. +intro n; apply -> le_ngt. apply le_0_l. +Qed. + +Theorem nle_succ_0 : forall n : N, ~ (S n <= 0). +Proof. +intros n H; apply -> le_succ_l in H; false_hyp H nlt_0_r. +Qed. + +Theorem le_0_r : forall n : N, n <= 0 <-> n == 0. +Proof. +intros n; split; intro H. +le_elim H; [false_hyp H nlt_0_r | assumption]. +now apply eq_le_incl. +Qed. + +Theorem lt_0_succ : forall n : N, 0 < S n. +Proof. +induct n; [apply lt_succ_diag_r | intros n H; now apply lt_lt_succ_r]. +Qed. + +Theorem neq_0_lt_0 : forall n : N, n ~= 0 <-> 0 < n. +Proof. +cases n. +split; intro H; [now elim H | intro; now apply lt_irrefl with 0]. +intro n; split; intro H; [apply lt_0_succ | apply neq_succ_0]. +Qed. + +Theorem eq_0_gt_0_cases : forall n : N, n == 0 \/ 0 < n. +Proof. +cases n. +now left. +intro; right; apply lt_0_succ. +Qed. + +Theorem zero_one : forall n : N, n == 0 \/ n == 1 \/ 1 < n. +Proof. +induct n. now left. +cases n. intros; right; now left. +intros n IH. destruct IH as [H | [H | H]]. +false_hyp H neq_succ_0. +right; right. rewrite H. apply lt_succ_diag_r. +right; right. now apply lt_lt_succ_r. +Qed. + +Theorem lt_1_r : forall n : N, n < 1 <-> n == 0. +Proof. +cases n. +split; intro; [reflexivity | apply lt_succ_diag_r]. +intros n. rewrite <- succ_lt_mono. +split; intro H; [false_hyp H nlt_0_r | false_hyp H neq_succ_0]. +Qed. + +Theorem le_1_r : forall n : N, n <= 1 <-> n == 0 \/ n == 1. +Proof. +cases n. +split; intro; [now left | apply le_succ_diag_r]. +intro n. rewrite <- succ_le_mono, le_0_r, succ_inj_wd. +split; [intro; now right | intros [H | H]; [false_hyp H neq_succ_0 | assumption]]. +Qed. + +Theorem lt_lt_0 : forall n m : N, n < m -> 0 < m. +Proof. +intros n m; induct n. +trivial. +intros n IH H. apply IH; now apply lt_succ_l. +Qed. + +Theorem lt_1_l : forall n m p : N, n < m -> m < p -> 1 < p. +Proof. +intros n m p H1 H2. +apply le_lt_trans with m. apply <- le_succ_l. apply le_lt_trans with n. +apply le_0_l. assumption. assumption. +Qed. + +(** Elimination principlies for < and <= for relations *) + +Section RelElim. + +(* FIXME: Variable R : relation N. -- does not work *) + +Variable R : N -> N -> Prop. +Hypothesis R_wd : relation_wd Neq Neq R. + +Add Morphism R with signature Neq ==> Neq ==> iff as R_morph2. +Proof. apply R_wd. Qed. + +Theorem le_ind_rel : + (forall m : N, R 0 m) -> + (forall n m : N, n <= m -> R n m -> R (S n) (S m)) -> + forall n m : N, n <= m -> R n m. +Proof. +intros Base Step; induct n. +intros; apply Base. +intros n IH m H. elim H using le_ind. +solve_predicate_wd. +apply Step; [| apply IH]; now apply eq_le_incl. +intros k H1 H2. apply -> le_succ_l in H1. apply lt_le_incl in H1. auto. +Qed. + +Theorem lt_ind_rel : + (forall m : N, R 0 (S m)) -> + (forall n m : N, n < m -> R n m -> R (S n) (S m)) -> + forall n m : N, n < m -> R n m. +Proof. +intros Base Step; induct n. +intros m H. apply lt_exists_pred in H; destruct H as [m' [H _]]. +rewrite H; apply Base. +intros n IH m H. elim H using lt_ind. +solve_predicate_wd. +apply Step; [| apply IH]; now apply lt_succ_diag_r. +intros k H1 H2. apply lt_succ_l in H1. auto. +Qed. + +End RelElim. + +(** Predecessor and order *) + +Theorem succ_pred_pos : forall n : N, 0 < n -> S (P n) == n. +Proof. +intros n H; apply succ_pred; intro H1; rewrite H1 in H. +false_hyp H lt_irrefl. +Qed. + +Theorem le_pred_l : forall n : N, P n <= n. +Proof. +cases n. +rewrite pred_0; now apply eq_le_incl. +intros; rewrite pred_succ; apply le_succ_diag_r. +Qed. + +Theorem lt_pred_l : forall n : N, n ~= 0 -> P n < n. +Proof. +cases n. +intro H; elimtype False; now apply H. +intros; rewrite pred_succ; apply lt_succ_diag_r. +Qed. + +Theorem le_le_pred : forall n m : N, n <= m -> P n <= m. +Proof. +intros n m H; apply le_trans with n. apply le_pred_l. assumption. +Qed. + +Theorem lt_lt_pred : forall n m : N, n < m -> P n < m. +Proof. +intros n m H; apply le_lt_trans with n. apply le_pred_l. assumption. +Qed. + +Theorem lt_le_pred : forall n m : N, n < m -> n <= P m. (* Converse is false for n == m == 0 *) +Proof. +intro n; cases m. +intro H; false_hyp H nlt_0_r. +intros m IH. rewrite pred_succ; now apply -> lt_succ_r. +Qed. + +Theorem lt_pred_le : forall n m : N, P n < m -> n <= m. (* Converse is false for n == m == 0 *) +Proof. +intros n m; cases n. +rewrite pred_0; intro H; now apply lt_le_incl. +intros n IH. rewrite pred_succ in IH. now apply <- le_succ_l. +Qed. + +Theorem lt_pred_lt : forall n m : N, n < P m -> n < m. +Proof. +intros n m H; apply lt_le_trans with (P m); [assumption | apply le_pred_l]. +Qed. + +Theorem le_pred_le : forall n m : N, n <= P m -> n <= m. +Proof. +intros n m H; apply le_trans with (P m); [assumption | apply le_pred_l]. +Qed. + +Theorem pred_le_mono : forall n m : N, n <= m -> P n <= P m. (* Converse is false for n == 1, m == 0 *) +Proof. +intros n m H; elim H using le_ind_rel. +solve_relation_wd. +intro; rewrite pred_0; apply le_0_l. +intros p q H1 _; now do 2 rewrite pred_succ. +Qed. + +Theorem pred_lt_mono : forall n m : N, n ~= 0 -> (n < m <-> P n < P m). +Proof. +intros n m H1; split; intro H2. +assert (m ~= 0). apply <- neq_0_lt_0. now apply lt_lt_0 with n. +now rewrite <- (succ_pred n) in H2; rewrite <- (succ_pred m) in H2 ; +[apply <- succ_lt_mono | | |]. +assert (m ~= 0). apply <- neq_0_lt_0. apply lt_lt_0 with (P n). +apply lt_le_trans with (P m). assumption. apply le_pred_l. +apply -> succ_lt_mono in H2. now do 2 rewrite succ_pred in H2. +Qed. + +Theorem lt_succ_lt_pred : forall n m : N, S n < m <-> n < P m. +Proof. +intros n m. rewrite pred_lt_mono by apply neq_succ_0. now rewrite pred_succ. +Qed. + +Theorem le_succ_le_pred : forall n m : N, S n <= m -> n <= P m. (* Converse is false for n == m == 0 *) +Proof. +intros n m H. apply lt_le_pred. now apply -> le_succ_l. +Qed. + +Theorem lt_pred_lt_succ : forall n m : N, P n < m -> n < S m. (* Converse is false for n == m == 0 *) +Proof. +intros n m H. apply <- lt_succ_r. now apply lt_pred_le. +Qed. + +Theorem le_pred_le_succ : forall n m : N, P n <= m <-> n <= S m. +Proof. +intros n m; cases n. +rewrite pred_0. split; intro H; apply le_0_l. +intro n. rewrite pred_succ. apply succ_le_mono. +Qed. + +End NOrderPropFunct. + diff --git a/theories/Numbers/Natural/Abstract/NStrongRec.v b/theories/Numbers/Natural/Abstract/NStrongRec.v new file mode 100644 index 00000000..031dbdea --- /dev/null +++ b/theories/Numbers/Natural/Abstract/NStrongRec.v @@ -0,0 +1,133 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* (N -> A) -> A) (n : N) : A := +recursion + (fun _ : N => a) + (fun (m : N) (p : N -> A) (k : N) => f k p) + (S n) + n. + +Theorem strong_rec_wd : +forall a a' : A, a ==A a' -> + forall f f', fun2_eq Neq (fun_eq Neq Aeq) Aeq f f' -> + forall n n', n == n' -> + strong_rec a f n ==A strong_rec a' f' n'. +Proof. +intros a a' Eaa' f f' Eff' n n' Enn'. +(* First we prove that recursion (which is on type N -> A) returns +extensionally equal functions, and then we use the fact that n == n' *) +assert (H : fun_eq Neq Aeq + (recursion + (fun _ : N => a) + (fun (m : N) (p : N -> A) (k : N) => f k p) + (S n)) + (recursion + (fun _ : N => a') + (fun (m : N) (p : N -> A) (k : N) => f' k p) + (S n'))). +apply recursion_wd with (Aeq := fun_eq Neq Aeq). +unfold fun_eq; now intros. +unfold fun2_eq. intros y y' Eyy' p p' Epp'. unfold fun_eq. auto. +now rewrite Enn'. +unfold strong_rec. +now apply H. +Qed. + +(*Section FixPoint. + +Variable a : A. +Variable f : N -> (N -> A) -> A. + +Hypothesis f_wd : fun2_wd Neq (fun_eq Neq Aeq) Aeq f. + +Let g (n : N) : A := strong_rec a f n. + +Add Morphism g with signature Neq ==> Aeq as g_wd. +Proof. +intros n1 n2 H. unfold g. now apply strong_rec_wd. +Qed. + +Theorem NtoA_eq_symm : symmetric (N -> A) (fun_eq Neq Aeq). +Proof. +apply fun_eq_symm. +exact (proj2 (proj2 NZeq_equiv)). +exact (proj2 (proj2 Aeq_equiv)). +Qed. + +Theorem NtoA_eq_trans : transitive (N -> A) (fun_eq Neq Aeq). +Proof. +apply fun_eq_trans. +exact (proj1 NZeq_equiv). +exact (proj1 (proj2 NZeq_equiv)). +exact (proj1 (proj2 Aeq_equiv)). +Qed. + +Add Relation (N -> A) (fun_eq Neq Aeq) + symmetry proved by NtoA_eq_symm + transitivity proved by NtoA_eq_trans +as NtoA_eq_rel. + +Add Morphism f with signature Neq ==> (fun_eq Neq Aeq) ==> Aeq as f_morph. +Proof. +apply f_wd. +Qed. + +(* We need an assumption saying that for every n, the step function (f n h) +calls h only on the segment [0 ... n - 1]. This means that if h1 and h2 +coincide on values < n, then (f n h1) coincides with (f n h2) *) + +Hypothesis step_good : + forall (n : N) (h1 h2 : N -> A), + (forall m : N, m < n -> Aeq (h1 m) (h2 m)) -> Aeq (f n h1) (f n h2). + +(* Todo: +Theorem strong_rec_fixpoint : forall n : N, Aeq (g n) (f n g). +Proof. +apply induction. +unfold predicate_wd, fun_wd. +intros x y H. rewrite H. unfold fun_eq; apply g_wd. +reflexivity. +unfold g, strong_rec. +*) + +End FixPoint.*) +End StrongRecursion. + +Implicit Arguments strong_rec [A]. + +End NStrongRecPropFunct. + diff --git a/theories/Numbers/Natural/Abstract/NSub.v b/theories/Numbers/Natural/Abstract/NSub.v new file mode 100644 index 00000000..f67689dd --- /dev/null +++ b/theories/Numbers/Natural/Abstract/NSub.v @@ -0,0 +1,180 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* forall m1 m2 : N, m1 == m2 -> n1 - m1 == n2 - m2. +Proof NZsub_wd. + +Theorem sub_0_r : forall n : N, n - 0 == n. +Proof NZsub_0_r. + +Theorem sub_succ_r : forall n m : N, n - (S m) == P (n - m). +Proof NZsub_succ_r. + +Theorem sub_1_r : forall n : N, n - 1 == P n. +Proof. +intro n; rewrite sub_succ_r; now rewrite sub_0_r. +Qed. + +Theorem sub_0_l : forall n : N, 0 - n == 0. +Proof. +induct n. +apply sub_0_r. +intros n IH; rewrite sub_succ_r; rewrite IH. now apply pred_0. +Qed. + +Theorem sub_succ : forall n m : N, S n - S m == n - m. +Proof. +intro n; induct m. +rewrite sub_succ_r. do 2 rewrite sub_0_r. now rewrite pred_succ. +intros m IH. rewrite sub_succ_r. rewrite IH. now rewrite sub_succ_r. +Qed. + +Theorem sub_diag : forall n : N, n - n == 0. +Proof. +induct n. apply sub_0_r. intros n IH; rewrite sub_succ; now rewrite IH. +Qed. + +Theorem sub_gt : forall n m : N, n > m -> n - m ~= 0. +Proof. +intros n m H; elim H using lt_ind_rel; clear n m H. +solve_relation_wd. +intro; rewrite sub_0_r; apply neq_succ_0. +intros; now rewrite sub_succ. +Qed. + +Theorem add_sub_assoc : forall n m p : N, p <= m -> n + (m - p) == (n + m) - p. +Proof. +intros n m p; induct p. +intro; now do 2 rewrite sub_0_r. +intros p IH H. do 2 rewrite sub_succ_r. +rewrite <- IH by (apply lt_le_incl; now apply -> le_succ_l). +rewrite add_pred_r by (apply sub_gt; now apply -> le_succ_l). +reflexivity. +Qed. + +Theorem sub_succ_l : forall n m : N, n <= m -> S m - n == S (m - n). +Proof. +intros n m H. rewrite <- (add_1_l m). rewrite <- (add_1_l (m - n)). +symmetry; now apply add_sub_assoc. +Qed. + +Theorem add_sub : forall n m : N, (n + m) - m == n. +Proof. +intros n m. rewrite <- add_sub_assoc by (apply le_refl). +rewrite sub_diag; now rewrite add_0_r. +Qed. + +Theorem sub_add : forall n m : N, n <= m -> (m - n) + n == m. +Proof. +intros n m H. rewrite add_comm. rewrite add_sub_assoc by assumption. +rewrite add_comm. apply add_sub. +Qed. + +Theorem add_sub_eq_l : forall n m p : N, m + p == n -> n - m == p. +Proof. +intros n m p H. symmetry. +assert (H1 : m + p - m == n - m) by now rewrite H. +rewrite add_comm in H1. now rewrite add_sub in H1. +Qed. + +Theorem add_sub_eq_r : forall n m p : N, m + p == n -> n - p == m. +Proof. +intros n m p H; rewrite add_comm in H; now apply add_sub_eq_l. +Qed. + +(* This could be proved by adding m to both sides. Then the proof would +use add_sub_assoc and sub_0_le, which is proven below. *) + +Theorem add_sub_eq_nz : forall n m p : N, p ~= 0 -> n - m == p -> m + p == n. +Proof. +intros n m p H; double_induct n m. +intros m H1; rewrite sub_0_l in H1. symmetry in H1; false_hyp H1 H. +intro n; rewrite sub_0_r; now rewrite add_0_l. +intros n m IH H1. rewrite sub_succ in H1. apply IH in H1. +rewrite add_succ_l; now rewrite H1. +Qed. + +Theorem sub_add_distr : forall n m p : N, n - (m + p) == (n - m) - p. +Proof. +intros n m; induct p. +rewrite add_0_r; now rewrite sub_0_r. +intros p IH. rewrite add_succ_r; do 2 rewrite sub_succ_r. now rewrite IH. +Qed. + +Theorem add_sub_swap : forall n m p : N, p <= n -> n + m - p == n - p + m. +Proof. +intros n m p H. +rewrite (add_comm n m). +rewrite <- add_sub_assoc by assumption. +now rewrite (add_comm m (n - p)). +Qed. + +(** Sub and order *) + +Theorem le_sub_l : forall n m : N, n - m <= n. +Proof. +intro n; induct m. +rewrite sub_0_r; now apply eq_le_incl. +intros m IH. rewrite sub_succ_r. +apply le_trans with (n - m); [apply le_pred_l | assumption]. +Qed. + +Theorem sub_0_le : forall n m : N, n - m == 0 <-> n <= m. +Proof. +double_induct n m. +intro m; split; intro; [apply le_0_l | apply sub_0_l]. +intro m; rewrite sub_0_r; split; intro H; +[false_hyp H neq_succ_0 | false_hyp H nle_succ_0]. +intros n m H. rewrite <- succ_le_mono. now rewrite sub_succ. +Qed. + +(** Sub and mul *) + +Theorem mul_pred_r : forall n m : N, n * (P m) == n * m - n. +Proof. +intros n m; cases m. +now rewrite pred_0, mul_0_r, sub_0_l. +intro m; rewrite pred_succ, mul_succ_r, <- add_sub_assoc. +now rewrite sub_diag, add_0_r. +now apply eq_le_incl. +Qed. + +Theorem mul_sub_distr_r : forall n m p : N, (n - m) * p == n * p - m * p. +Proof. +intros n m p; induct n. +now rewrite sub_0_l, mul_0_l, sub_0_l. +intros n IH. destruct (le_gt_cases m n) as [H | H]. +rewrite sub_succ_l by assumption. do 2 rewrite mul_succ_l. +rewrite (add_comm ((n - m) * p) p), (add_comm (n * p) p). +rewrite <- (add_sub_assoc p (n * p) (m * p)) by now apply mul_le_mono_r. +now apply <- add_cancel_l. +assert (H1 : S n <= m); [now apply <- le_succ_l |]. +setoid_replace (S n - m) with 0 by now apply <- sub_0_le. +setoid_replace ((S n * p) - m * p) with 0 by (apply <- sub_0_le; now apply mul_le_mono_r). +apply mul_0_l. +Qed. + +Theorem mul_sub_distr_l : forall n m p : N, p * (n - m) == p * n - p * m. +Proof. +intros n m p; rewrite (mul_comm p (n - m)), (mul_comm p n), (mul_comm p m). +apply mul_sub_distr_r. +Qed. + +End NSubPropFunct. + diff --git a/theories/Numbers/Natural/BigN/BigN.v b/theories/Numbers/Natural/BigN/BigN.v new file mode 100644 index 00000000..0574c09f --- /dev/null +++ b/theories/Numbers/Natural/BigN/BigN.v @@ -0,0 +1,83 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* BigN.succ (BigN.pred q) == q. +Proof. +intros; apply succ_pred. +intro H'; rewrite H' in H; discriminate. +Qed. + +(** [BigN] is a semi-ring *) + +Lemma BigNring : + semi_ring_theory BigN.zero BigN.one BigN.add BigN.mul BigN.eq. +Proof. +constructor. +exact add_0_l. +exact add_comm. +exact add_assoc. +exact mul_1_l. +exact mul_0_l. +exact mul_comm. +exact mul_assoc. +exact mul_add_distr_r. +Qed. + +Add Ring BigNr : BigNring. + +(** Todo: tactic translating from [BigN] to [Z] + omega *) + +(** Todo: micromega *) diff --git a/theories/Numbers/Natural/BigN/NMake_gen.ml b/theories/Numbers/Natural/BigN/NMake_gen.ml new file mode 100644 index 00000000..bd0fb5b1 --- /dev/null +++ b/theories/Numbers/Natural/BigN/NMake_gen.ml @@ -0,0 +1,3166 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Z/2nZ + process before relying on a generic construct *) +let gen_proof = true (* should we generate proofs ? *) + + +(*s Some utilities *) + +let t = "t" +let c = "N" +let pz n = if n == 0 then "w_0" else "W0" +let rec gen2 n = if n == 0 then "1" else if n == 1 then "2" + else "2 * " ^ (gen2 (n - 1)) +let rec genxO n s = + if n == 0 then s else " (xO" ^ (genxO (n - 1) s) ^ ")" + +(* NB: in ocaml >= 3.10, we could use Printf.ifprintf for printing to + /dev/null, but for being compatible with earlier ocaml and not + relying on system-dependent stuff like open_out "/dev/null", + let's use instead a magical hack *) + +(* Standard printer, with a final newline *) +let pr s = Printf.printf (s^^"\n") +(* Printing to /dev/null *) +let pn = (fun s -> Obj.magic (fun _ _ _ _ _ _ _ _ _ _ _ _ _ _ -> ()) + : ('a, out_channel, unit) format -> 'a) +(* Proof printer : prints iff gen_proof is true *) +let pp = if gen_proof then pr else pn +(* Printer for admitted parts : prints iff gen_proof is false *) +let pa = if not gen_proof then pr else pn +(* Same as before, but without the final newline *) +let pr0 = Printf.printf +let pp0 = if gen_proof then pr0 else pn + + +(*s The actual printing *) + +let _ = + + pr "(************************************************************************)"; + pr "(* v * The Coq Proof Assistant / The Coq Development Team *)"; + pr "(* znz_op (zn2z w')."; + pr ""; + pr " Fixpoint make_op_aux (n:nat) : znz_op (word w%i (S n)):=" size; + pr " match n return znz_op (word w%i (S n)) with" size; + pr " | O => w%i_op" (size+1); + pr " | S n1 =>"; + pr " match n1 return znz_op (word w%i (S (S n1))) with" size; + pr " | O => w%i_op" (size+2); + pr " | S n2 =>"; + pr " match n2 return znz_op (word w%i (S (S (S n2)))) with" size; + pr " | O => w%i_op" (size+3); + pr " | S n3 => mk _ (mk _ (mk _ (make_op_aux n3)))"; + pr " end"; + pr " end"; + pr " end."; + pr ""; + pr " End Make_op."; + pr ""; + pr " Definition omake_op := make_op_aux mk_zn2z_op_karatsuba."; + pr ""; + pr ""; + pr " Definition make_op_list := dmemo_list _ omake_op."; + pr ""; + pr " Definition make_op n := dmemo_get _ omake_op n make_op_list."; + pr ""; + pr " Lemma make_op_omake: forall n, make_op n = omake_op n."; + pr " intros n; unfold make_op, make_op_list."; + pr " refine (dmemo_get_correct _ _ _)."; + pr " Qed."; + pr ""; + + pr " Inductive %s_ :=" t; + for i = 0 to size do + pr " | %s%i : w%i -> %s_" c i i t + done; + pr " | %sn : forall n, word w%i (S n) -> %s_." c size t; + pr ""; + pr " Definition %s := %s_." t t; + pr ""; + + pr " Definition w_0 := w0_op.(znz_0)."; + pr ""; + + for i = 0 to size do + pr " Definition one%i := w%i_op.(znz_1)." i i + done; + pr ""; + + + pr " Definition zero := %s0 w_0." c; + pr " Definition one := %s0 one0." c; + pr ""; + + pr " Definition to_Z x :="; + pr " match x with"; + for i = 0 to size do + pr " | %s%i wx => w%i_op.(znz_to_Z) wx" c i i + done; + pr " | %sn n wx => (make_op n).(znz_to_Z) wx" c; + pr " end."; + pr ""; + + pr " Open Scope Z_scope."; + pr " Notation \"[ x ]\" := (to_Z x)."; + pr ""; + + pr " Definition to_N x := Zabs_N (to_Z x)."; + pr ""; + + pr " Definition eq x y := (to_Z x = to_Z y)."; + pr ""; + + pp " (* Regular make op (no karatsuba) *)"; + pp " Fixpoint nmake_op (ww:Type) (ww_op: znz_op ww) (n: nat) : "; + pp " znz_op (word ww n) :="; + pp " match n return znz_op (word ww n) with "; + pp " O => ww_op"; + pp " | S n1 => mk_zn2z_op (nmake_op ww ww_op n1) "; + pp " end."; + pp ""; + pp " (* Simplification by rewriting for nmake_op *)"; + pp " Theorem nmake_op_S: forall ww (w_op: znz_op ww) x, "; + pp " nmake_op _ w_op (S x) = mk_zn2z_op (nmake_op _ w_op x)."; + pp " auto."; + pp " Qed."; + pp ""; + + + pr " (* Eval and extend functions for each level *)"; + for i = 0 to size do + pp " Let nmake_op%i := nmake_op _ w%i_op." i i; + pp " Let eval%in n := znz_to_Z (nmake_op%i n)." i i; + if i == 0 then + pr " Let extend%i := DoubleBase.extend (WW w_0)." i + else + pr " Let extend%i := DoubleBase.extend (WW (W0: w%i))." i i; + done; + pr ""; + + + pp " Theorem digits_doubled:forall n ww (w_op: znz_op ww), "; + pp " znz_digits (nmake_op _ w_op n) = "; + pp " DoubleBase.double_digits (znz_digits w_op) n."; + pp " Proof."; + pp " intros n; elim n; auto; clear n."; + pp " intros n Hrec ww ww_op; simpl DoubleBase.double_digits."; + pp " rewrite <- Hrec; auto."; + pp " Qed."; + pp ""; + pp " Theorem nmake_double: forall n ww (w_op: znz_op ww), "; + pp " znz_to_Z (nmake_op _ w_op n) ="; + pp " @DoubleBase.double_to_Z _ (znz_digits w_op) (znz_to_Z w_op) n."; + pp " Proof."; + pp " intros n; elim n; auto; clear n."; + pp " intros n Hrec ww ww_op; simpl DoubleBase.double_to_Z; unfold zn2z_to_Z."; + pp " rewrite <- Hrec; auto."; + pp " unfold DoubleBase.double_wB; rewrite <- digits_doubled; auto."; + pp " Qed."; + pp ""; + + + pp " Theorem digits_nmake:forall n ww (w_op: znz_op ww), "; + pp " znz_digits (nmake_op _ w_op (S n)) = "; + pp " xO (znz_digits (nmake_op _ w_op n))."; + pp " Proof."; + pp " auto."; + pp " Qed."; + pp ""; + + + pp " Theorem znz_nmake_op: forall ww ww_op n xh xl,"; + pp " znz_to_Z (nmake_op ww ww_op (S n)) (WW xh xl) ="; + pp " znz_to_Z (nmake_op ww ww_op n) xh *"; + pp " base (znz_digits (nmake_op ww ww_op n)) +"; + pp " znz_to_Z (nmake_op ww ww_op n) xl."; + pp " Proof."; + pp " auto."; + pp " Qed."; + pp ""; + + pp " Theorem make_op_S: forall n,"; + pp " make_op (S n) = mk_zn2z_op_karatsuba (make_op n)."; + pp " intro n."; + pp " do 2 rewrite make_op_omake."; + pp " pattern n; apply lt_wf_ind; clear n."; + pp " intros n; case n; clear n."; + pp " intros _; unfold omake_op, make_op_aux, w%i_op; apply refl_equal." (size + 2); + pp " intros n; case n; clear n."; + pp " intros _; unfold omake_op, make_op_aux, w%i_op; apply refl_equal." (size + 3); + pp " intros n; case n; clear n."; + pp " intros _; unfold omake_op, make_op_aux, w%i_op, w%i_op; apply refl_equal." (size + 3) (size + 2); + pp " intros n Hrec."; + pp " change (omake_op (S (S (S (S n))))) with"; + pp " (mk_zn2z_op_karatsuba (mk_zn2z_op_karatsuba (mk_zn2z_op_karatsuba (omake_op (S n)))))."; + pp " change (omake_op (S (S (S n)))) with"; + pp " (mk_zn2z_op_karatsuba (mk_zn2z_op_karatsuba (mk_zn2z_op_karatsuba (omake_op n))))."; + pp " rewrite Hrec; auto with arith."; + pp " Qed."; + pp " "; + + + for i = 1 to size + 2 do + pp " Let znz_to_Z_%i: forall x y," i; + pp " znz_to_Z w%i_op (WW x y) = " i; + pp " znz_to_Z w%i_op x * base (znz_digits w%i_op) + znz_to_Z w%i_op y." (i-1) (i-1) (i-1); + pp " Proof."; + pp " auto."; + pp " Qed. "; + pp ""; + done; + + pp " Let znz_to_Z_n: forall n x y,"; + pp " znz_to_Z (make_op (S n)) (WW x y) = "; + pp " znz_to_Z (make_op n) x * base (znz_digits (make_op n)) + znz_to_Z (make_op n) y."; + pp " Proof."; + pp " intros n x y; rewrite make_op_S; auto."; + pp " Qed. "; + pp ""; + + pp " Let w0_spec: znz_spec w0_op := W0.w_spec."; + for i = 1 to 3 do + pp " Let w%i_spec: znz_spec w%i_op := mk_znz2_spec w%i_spec." i i (i-1) + done; + for i = 4 to size + 3 do + pp " Let w%i_spec : znz_spec w%i_op := mk_znz2_karatsuba_spec w%i_spec." i i (i-1) + done; + pp ""; + + pp " Let wn_spec: forall n, znz_spec (make_op n)."; + pp " intros n; elim n; clear n."; + pp " exact w%i_spec." (size + 1); + pp " intros n Hrec; rewrite make_op_S."; + pp " exact (mk_znz2_karatsuba_spec Hrec)."; + pp " Qed."; + pp ""; + + for i = 0 to size do + pr " Definition w%i_eq0 := w%i_op.(znz_eq0)." i i; + pr " Let spec_w%i_eq0: forall x, if w%i_eq0 x then [%s%i x] = 0 else True." i i c i; + pa " Admitted."; + pp " Proof."; + pp " intros x; unfold w%i_eq0, to_Z; generalize (spec_eq0 w%i_spec x);" i i; + pp " case znz_eq0; auto."; + pp " Qed."; + pr ""; + done; + pr ""; + + + for i = 0 to size do + pp " Theorem digits_w%i: znz_digits w%i_op = znz_digits (nmake_op _ w0_op %i)." i i i; + if i == 0 then + pp " auto." + else + pp " rewrite digits_nmake; rewrite <- digits_w%i; auto." (i - 1); + pp " Qed."; + pp ""; + pp " Let spec_double_eval%in: forall n, eval%in n = DoubleBase.double_to_Z (znz_digits w%i_op) (znz_to_Z w%i_op) n." i i i i; + pp " Proof."; + pp " intros n; exact (nmake_double n w%i w%i_op)." i i; + pp " Qed."; + pp ""; + done; + + for i = 0 to size do + for j = 0 to (size - i) do + pp " Theorem digits_w%in%i: znz_digits w%i_op = znz_digits (nmake_op _ w%i_op %i)." i j (i + j) i j; + pp " Proof."; + if j == 0 then + if i == 0 then + pp " auto." + else + begin + pp " apply trans_equal with (xO (znz_digits w%i_op))." (i + j -1); + pp " auto."; + pp " unfold nmake_op; auto."; + end + else + begin + pp " apply trans_equal with (xO (znz_digits w%i_op))." (i + j -1); + pp " auto."; + pp " rewrite digits_nmake."; + pp " rewrite digits_w%in%i." i (j - 1); + pp " auto."; + end; + pp " Qed."; + pp ""; + pp " Let spec_eval%in%i: forall x, [%s%i x] = eval%in %i x." i j c (i + j) i j; + pp " Proof."; + if j == 0 then + pp " intros x; rewrite spec_double_eval%in; unfold DoubleBase.double_to_Z, to_Z; auto." i + else + begin + pp " intros x; case x."; + pp " auto."; + pp " intros xh xl; unfold to_Z; rewrite znz_to_Z_%i." (i + j); + pp " rewrite digits_w%in%i." i (j - 1); + pp " generalize (spec_eval%in%i); unfold to_Z; intros HH; repeat rewrite HH." i (j - 1); + pp " unfold eval%in, nmake_op%i." i i; + pp " rewrite (znz_nmake_op _ w%i_op %i); auto." i (j - 1); + end; + pp " Qed."; + if i + j <> size then + begin + pp " Let spec_extend%in%i: forall x, [%s%i x] = [%s%i (extend%i %i x)]." i (i + j + 1) c i c (i + j + 1) i j; + if j == 0 then + begin + pp " intros x; change (extend%i 0 x) with (WW (znz_0 w%i_op) x)." i (i + j); + pp " unfold to_Z; rewrite znz_to_Z_%i." (i + j + 1); + pp " rewrite (spec_0 w%i_spec); auto." (i + j); + end + else + begin + pp " intros x; change (extend%i %i x) with (WW (znz_0 w%i_op) (extend%i %i x))." i j (i + j) i (j - 1); + pp " unfold to_Z; rewrite znz_to_Z_%i." (i + j + 1); + pp " rewrite (spec_0 w%i_spec)." (i + j); + pp " generalize (spec_extend%in%i x); unfold to_Z." i (i + j); + pp " intros HH; rewrite <- HH; auto."; + end; + pp " Qed."; + pp ""; + end; + done; + + pp " Theorem digits_w%in%i: znz_digits w%i_op = znz_digits (nmake_op _ w%i_op %i)." i (size - i + 1) (size + 1) i (size - i + 1); + pp " Proof."; + pp " apply trans_equal with (xO (znz_digits w%i_op))." size; + pp " auto."; + pp " rewrite digits_nmake."; + pp " rewrite digits_w%in%i." i (size - i); + pp " auto."; + pp " Qed."; + pp ""; + + pp " Let spec_eval%in%i: forall x, [%sn 0 x] = eval%in %i x." i (size - i + 1) c i (size - i + 1); + pp " Proof."; + pp " intros x; case x."; + pp " auto."; + pp " intros xh xl; unfold to_Z; rewrite znz_to_Z_%i." (size + 1); + pp " rewrite digits_w%in%i." i (size - i); + pp " generalize (spec_eval%in%i); unfold to_Z; intros HH; repeat rewrite HH." i (size - i); + pp " unfold eval%in, nmake_op%i." i i; + pp " rewrite (znz_nmake_op _ w%i_op %i); auto." i (size - i); + pp " Qed."; + pp ""; + + pp " Let spec_eval%in%i: forall x, [%sn 1 x] = eval%in %i x." i (size - i + 2) c i (size - i + 2); + pp " intros x; case x."; + pp " auto."; + pp " intros xh xl; unfold to_Z; rewrite znz_to_Z_%i." (size + 2); + pp " rewrite digits_w%in%i." i (size + 1 - i); + pp " generalize (spec_eval%in%i); unfold to_Z; change (make_op 0) with (w%i_op); intros HH; repeat rewrite HH." i (size + 1 - i) (size + 1); + pp " unfold eval%in, nmake_op%i." i i; + pp " rewrite (znz_nmake_op _ w%i_op %i); auto." i (size + 1 - i); + pp " Qed."; + pp ""; + done; + + pp " Let digits_w%in: forall n," size; + pp " znz_digits (make_op n) = znz_digits (nmake_op _ w%i_op (S n))." size; + pp " intros n; elim n; clear n."; + pp " change (znz_digits (make_op 0)) with (xO (znz_digits w%i_op))." size; + pp " rewrite nmake_op_S; apply sym_equal; auto."; + pp " intros n Hrec."; + pp " replace (znz_digits (make_op (S n))) with (xO (znz_digits (make_op n)))."; + pp " rewrite Hrec."; + pp " rewrite nmake_op_S; apply sym_equal; auto."; + pp " rewrite make_op_S; apply sym_equal; auto."; + pp " Qed."; + pp ""; + + pp " Let spec_eval%in: forall n x, [%sn n x] = eval%in (S n) x." size c size; + pp " intros n; elim n; clear n."; + pp " exact spec_eval%in1." size; + pp " intros n Hrec x; case x; clear x."; + pp " unfold to_Z, eval%in, nmake_op%i." size size; + pp " rewrite make_op_S; rewrite nmake_op_S; auto."; + pp " intros xh xl."; + pp " unfold to_Z in Hrec |- *."; + pp " rewrite znz_to_Z_n."; + pp " rewrite digits_w%in." size; + pp " repeat rewrite Hrec."; + pp " unfold eval%in, nmake_op%i." size size; + pp " apply sym_equal; rewrite nmake_op_S; auto."; + pp " Qed."; + pp ""; + + pp " Let spec_extend%in: forall n x, [%s%i x] = [%sn n (extend%i n x)]." size c size c size ; + pp " intros n; elim n; clear n."; + pp " intros x; change (extend%i 0 x) with (WW (znz_0 w%i_op) x)." size size; + pp " unfold to_Z."; + pp " change (make_op 0) with w%i_op." (size + 1); + pp " rewrite znz_to_Z_%i; rewrite (spec_0 w%i_spec); auto." (size + 1) size; + pp " intros n Hrec x."; + pp " change (extend%i (S n) x) with (WW W0 (extend%i n x))." size size; + pp " unfold to_Z in Hrec |- *; rewrite znz_to_Z_n; auto."; + pp " rewrite <- Hrec."; + pp " replace (znz_to_Z (make_op n) W0) with 0; auto."; + pp " case n; auto; intros; rewrite make_op_S; auto."; + pp " Qed."; + pp ""; + + pr " Theorem spec_pos: forall x, 0 <= [x]."; + pa " Admitted."; + pp " Proof."; + pp " intros x; case x; clear x."; + for i = 0 to size do + pp " intros x; case (spec_to_Z w%i_spec x); auto." i; + done; + pp " intros n x; case (spec_to_Z (wn_spec n) x); auto."; + pp " Qed."; + pr ""; + + pp " Let spec_extendn_0: forall n wx, [%sn n (extend n _ wx)] = [%sn 0 wx]." c c; + pp " intros n; elim n; auto."; + pp " intros n1 Hrec wx; simpl extend; rewrite <- Hrec; auto."; + pp " unfold to_Z."; + pp " case n1; auto; intros n2; repeat rewrite make_op_S; auto."; + pp " Qed."; + pp " Hint Rewrite spec_extendn_0: extr."; + pp ""; + pp " Let spec_extendn0_0: forall n wx, [%sn (S n) (WW W0 wx)] = [%sn n wx]." c c; + pp " Proof."; + pp " intros n x; unfold to_Z."; + pp " rewrite znz_to_Z_n."; + pp " rewrite <- (Zplus_0_l (znz_to_Z (make_op n) x))."; + pp " apply (f_equal2 Zplus); auto."; + pp " case n; auto."; + pp " intros n1; rewrite make_op_S; auto."; + pp " Qed."; + pp " Hint Rewrite spec_extendn_0: extr."; + pp ""; + pp " Let spec_extend_tr: forall m n (w: word _ (S n)),"; + pp " [%sn (m + n) (extend_tr w m)] = [%sn n w]." c c; + pp " Proof."; + pp " induction m; auto."; + pp " intros n x; simpl extend_tr."; + pp " simpl plus; rewrite spec_extendn0_0; auto."; + pp " Qed."; + pp " Hint Rewrite spec_extend_tr: extr."; + pp ""; + pp " Let spec_cast_l: forall n m x1,"; + pp " [%sn (Max.max n m)" c; + pp " (castm (diff_r n m) (extend_tr x1 (snd (diff n m))))] ="; + pp " [%sn n x1]." c; + pp " Proof."; + pp " intros n m x1; case (diff_r n m); simpl castm."; + pp " rewrite spec_extend_tr; auto."; + pp " Qed."; + pp " Hint Rewrite spec_cast_l: extr."; + pp ""; + pp " Let spec_cast_r: forall n m x1,"; + pp " [%sn (Max.max n m)" c; + pp " (castm (diff_l n m) (extend_tr x1 (fst (diff n m))))] ="; + pp " [%sn m x1]." c; + pp " Proof."; + pp " intros n m x1; case (diff_l n m); simpl castm."; + pp " rewrite spec_extend_tr; auto."; + pp " Qed."; + pp " Hint Rewrite spec_cast_r: extr."; + pp ""; + + + pr " Section LevelAndIter."; + pr ""; + pr " Variable res: Type."; + pr " Variable xxx: res."; + pr " Variable P: Z -> Z -> res -> Prop."; + pr " (* Abstraction function for each level *)"; + for i = 0 to size do + pr " Variable f%i: w%i -> w%i -> res." i i i; + pr " Variable f%in: forall n, w%i -> word w%i (S n) -> res." i i i; + pr " Variable fn%i: forall n, word w%i (S n) -> w%i -> res." i i i; + pp " Variable Pf%i: forall x y, P [%s%i x] [%s%i y] (f%i x y)." i c i c i i; + if i == size then + begin + pp " Variable Pf%in: forall n x y, P [%s%i x] (eval%in (S n) y) (f%in n x y)." i c i i i; + pp " Variable Pfn%i: forall n x y, P (eval%in (S n) x) [%s%i y] (fn%i n x y)." i i c i i; + end + else + begin + pp " Variable Pf%in: forall n x y, Z_of_nat n <= %i -> P [%s%i x] (eval%in (S n) y) (f%in n x y)." i (size - i) c i i i; + pp " Variable Pfn%i: forall n x y, Z_of_nat n <= %i -> P (eval%in (S n) x) [%s%i y] (fn%i n x y)." i (size - i) i c i i; + end; + pr ""; + done; + pr " Variable fnn: forall n, word w%i (S n) -> word w%i (S n) -> res." size size; + pp " Variable Pfnn: forall n x y, P [%sn n x] [%sn n y] (fnn n x y)." c c; + pr " Variable fnm: forall n m, word w%i (S n) -> word w%i (S m) -> res." size size; + pp " Variable Pfnm: forall n m x y, P [%sn n x] [%sn m y] (fnm n m x y)." c c; + pr ""; + pr " (* Special zero functions *)"; + pr " Variable f0t: t_ -> res."; + pp " Variable Pf0t: forall x, P 0 [x] (f0t x)."; + pr " Variable ft0: t_ -> res."; + pp " Variable Pft0: forall x, P [x] 0 (ft0 x)."; + pr ""; + + + pr " (* We level the two arguments before applying *)"; + pr " (* the functions at each leval *)"; + pr " Definition same_level (x y: t_): res :="; + pr0 " Eval lazy zeta beta iota delta ["; + for i = 0 to size do + pr0 "extend%i " i; + done; + pr ""; + pr " DoubleBase.extend DoubleBase.extend_aux"; + pr " ] in"; + pr " match x, y with"; + for i = 0 to size do + for j = 0 to i - 1 do + pr " | %s%i wx, %s%i wy => f%i wx (extend%i %i wy)" c i c j i j (i - j -1); + done; + pr " | %s%i wx, %s%i wy => f%i wx wy" c i c i i; + for j = i + 1 to size do + pr " | %s%i wx, %s%i wy => f%i (extend%i %i wx) wy" c i c j j i (j - i - 1); + done; + if i == size then + pr " | %s%i wx, %sn m wy => fnn m (extend%i m wx) wy" c size c size + else + pr " | %s%i wx, %sn m wy => fnn m (extend%i m (extend%i %i wx)) wy" c i c size i (size - i - 1); + done; + for i = 0 to size do + if i == size then + pr " | %sn n wx, %s%i wy => fnn n wx (extend%i n wy)" c c size size + else + pr " | %sn n wx, %s%i wy => fnn n wx (extend%i n (extend%i %i wy))" c c i size i (size - i - 1); + done; + pr " | %sn n wx, Nn m wy =>" c; + pr " let mn := Max.max n m in"; + pr " let d := diff n m in"; + pr " fnn mn"; + pr " (castm (diff_r n m) (extend_tr wx (snd d)))"; + pr " (castm (diff_l n m) (extend_tr wy (fst d)))"; + pr " end."; + pr ""; + + pp " Lemma spec_same_level: forall x y, P [x] [y] (same_level x y)."; + pp " Proof."; + pp " intros x; case x; clear x; unfold same_level."; + for i = 0 to size do + pp " intros x y; case y; clear y."; + for j = 0 to i - 1 do + pp " intros y; rewrite spec_extend%in%i; apply Pf%i." j i i; + done; + pp " intros y; apply Pf%i." i; + for j = i + 1 to size do + pp " intros y; rewrite spec_extend%in%i; apply Pf%i." i j j; + done; + if i == size then + pp " intros m y; rewrite (spec_extend%in m); apply Pfnn." size + else + pp " intros m y; rewrite spec_extend%in%i; rewrite (spec_extend%in m); apply Pfnn." i size size; + done; + pp " intros n x y; case y; clear y."; + for i = 0 to size do + if i == size then + pp " intros y; rewrite (spec_extend%in n); apply Pfnn." size + else + pp " intros y; rewrite spec_extend%in%i; rewrite (spec_extend%in n); apply Pfnn." i size size; + done; + pp " intros m y; rewrite <- (spec_cast_l n m x); "; + pp " rewrite <- (spec_cast_r n m y); apply Pfnn."; + pp " Qed."; + pp ""; + + pr " (* We level the two arguments before applying *)"; + pr " (* the functions at each level (special zero case) *)"; + pr " Definition same_level0 (x y: t_): res :="; + pr0 " Eval lazy zeta beta iota delta ["; + for i = 0 to size do + pr0 "extend%i " i; + done; + pr ""; + pr " DoubleBase.extend DoubleBase.extend_aux"; + pr " ] in"; + pr " match x with"; + for i = 0 to size do + pr " | %s%i wx =>" c i; + if i == 0 then + pr " if w0_eq0 wx then f0t y else"; + pr " match y with"; + for j = 0 to i - 1 do + pr " | %s%i wy =>" c j; + if j == 0 then + pr " if w0_eq0 wy then ft0 x else"; + pr " f%i wx (extend%i %i wy)" i j (i - j -1); + done; + pr " | %s%i wy => f%i wx wy" c i i; + for j = i + 1 to size do + pr " | %s%i wy => f%i (extend%i %i wx) wy" c j j i (j - i - 1); + done; + if i == size then + pr " | %sn m wy => fnn m (extend%i m wx) wy" c size + else + pr " | %sn m wy => fnn m (extend%i m (extend%i %i wx)) wy" c size i (size - i - 1); + pr" end"; + done; + pr " | %sn n wx =>" c; + pr " match y with"; + for i = 0 to size do + pr " | %s%i wy =>" c i; + if i == 0 then + pr " if w0_eq0 wy then ft0 x else"; + if i == size then + pr " fnn n wx (extend%i n wy)" size + else + pr " fnn n wx (extend%i n (extend%i %i wy))" size i (size - i - 1); + done; + pr " | %sn m wy =>" c; + pr " let mn := Max.max n m in"; + pr " let d := diff n m in"; + pr " fnn mn"; + pr " (castm (diff_r n m) (extend_tr wx (snd d)))"; + pr " (castm (diff_l n m) (extend_tr wy (fst d)))"; + pr " end"; + pr " end."; + pr ""; + + pp " Lemma spec_same_level0: forall x y, P [x] [y] (same_level0 x y)."; + pp " Proof."; + pp " intros x; case x; clear x; unfold same_level0."; + for i = 0 to size do + pp " intros x."; + if i == 0 then + begin + pp " generalize (spec_w0_eq0 x); case w0_eq0; intros H."; + pp " intros y; rewrite H; apply Pf0t."; + pp " clear H."; + end; + pp " intros y; case y; clear y."; + for j = 0 to i - 1 do + pp " intros y."; + if j == 0 then + begin + pp " generalize (spec_w0_eq0 y); case w0_eq0; intros H."; + pp " rewrite H; apply Pft0."; + pp " clear H."; + end; + pp " rewrite spec_extend%in%i; apply Pf%i." j i i; + done; + pp " intros y; apply Pf%i." i; + for j = i + 1 to size do + pp " intros y; rewrite spec_extend%in%i; apply Pf%i." i j j; + done; + if i == size then + pp " intros m y; rewrite (spec_extend%in m); apply Pfnn." size + else + pp " intros m y; rewrite spec_extend%in%i; rewrite (spec_extend%in m); apply Pfnn." i size size; + done; + pp " intros n x y; case y; clear y."; + for i = 0 to size do + pp " intros y."; + if i = 0 then + begin + pp " generalize (spec_w0_eq0 y); case w0_eq0; intros H."; + pp " rewrite H; apply Pft0."; + pp " clear H."; + end; + if i == size then + pp " rewrite (spec_extend%in n); apply Pfnn." size + else + pp " rewrite spec_extend%in%i; rewrite (spec_extend%in n); apply Pfnn." i size size; + done; + pp " intros m y; rewrite <- (spec_cast_l n m x); "; + pp " rewrite <- (spec_cast_r n m y); apply Pfnn."; + pp " Qed."; + pp ""; + + pr " (* We iter the smaller argument with the bigger *)"; + pr " Definition iter (x y: t_): res := "; + pr0 " Eval lazy zeta beta iota delta ["; + for i = 0 to size do + pr0 "extend%i " i; + done; + pr ""; + pr " DoubleBase.extend DoubleBase.extend_aux"; + pr " ] in"; + pr " match x, y with"; + for i = 0 to size do + for j = 0 to i - 1 do + pr " | %s%i wx, %s%i wy => fn%i %i wx wy" c i c j j (i - j - 1); + done; + pr " | %s%i wx, %s%i wy => f%i wx wy" c i c i i; + for j = i + 1 to size do + pr " | %s%i wx, %s%i wy => f%in %i wx wy" c i c j i (j - i - 1); + done; + if i == size then + pr " | %s%i wx, %sn m wy => f%in m wx wy" c size c size + else + pr " | %s%i wx, %sn m wy => f%in m (extend%i %i wx) wy" c i c size i (size - i - 1); + done; + for i = 0 to size do + if i == size then + pr " | %sn n wx, %s%i wy => fn%i n wx wy" c c size size + else + pr " | %sn n wx, %s%i wy => fn%i n wx (extend%i %i wy)" c c i size i (size - i - 1); + done; + pr " | %sn n wx, %sn m wy => fnm n m wx wy" c c; + pr " end."; + pr ""; + + pp " Ltac zg_tac := try"; + pp " (red; simpl Zcompare; auto;"; + pp " let t := fresh \"H\" in (intros t; discriminate t))."; + pp " Lemma spec_iter: forall x y, P [x] [y] (iter x y)."; + pp " Proof."; + pp " intros x; case x; clear x; unfold iter."; + for i = 0 to size do + pp " intros x y; case y; clear y."; + for j = 0 to i - 1 do + pp " intros y; rewrite spec_eval%in%i; apply (Pfn%i %i); zg_tac." j (i - j) j (i - j - 1); + done; + pp " intros y; apply Pf%i." i; + for j = i + 1 to size do + pp " intros y; rewrite spec_eval%in%i; apply (Pf%in %i); zg_tac." i (j - i) i (j - i - 1); + done; + if i == size then + pp " intros m y; rewrite spec_eval%in; apply Pf%in." size size + else + pp " intros m y; rewrite spec_extend%in%i; rewrite spec_eval%in; apply Pf%in." i size size size; + done; + pp " intros n x y; case y; clear y."; + for i = 0 to size do + if i == size then + pp " intros y; rewrite spec_eval%in; apply Pfn%i." size size + else + pp " intros y; rewrite spec_extend%in%i; rewrite spec_eval%in; apply Pfn%i." i size size size; + done; + pp " intros m y; apply Pfnm."; + pp " Qed."; + pp ""; + + + pr " (* We iter the smaller argument with the bigger (zero case) *)"; + pr " Definition iter0 (x y: t_): res :="; + pr0 " Eval lazy zeta beta iota delta ["; + for i = 0 to size do + pr0 "extend%i " i; + done; + pr ""; + pr " DoubleBase.extend DoubleBase.extend_aux"; + pr " ] in"; + pr " match x with"; + for i = 0 to size do + pr " | %s%i wx =>" c i; + if i == 0 then + pr " if w0_eq0 wx then f0t y else"; + pr " match y with"; + for j = 0 to i - 1 do + pr " | %s%i wy =>" c j; + if j == 0 then + pr " if w0_eq0 wy then ft0 x else"; + pr " fn%i %i wx wy" j (i - j - 1); + done; + pr " | %s%i wy => f%i wx wy" c i i; + for j = i + 1 to size do + pr " | %s%i wy => f%in %i wx wy" c j i (j - i - 1); + done; + if i == size then + pr " | %sn m wy => f%in m wx wy" c size + else + pr " | %sn m wy => f%in m (extend%i %i wx) wy" c size i (size - i - 1); + pr " end"; + done; + pr " | %sn n wx =>" c; + pr " match y with"; + for i = 0 to size do + pr " | %s%i wy =>" c i; + if i == 0 then + pr " if w0_eq0 wy then ft0 x else"; + if i == size then + pr " fn%i n wx wy" size + else + pr " fn%i n wx (extend%i %i wy)" size i (size - i - 1); + done; + pr " | %sn m wy => fnm n m wx wy" c; + pr " end"; + pr " end."; + pr ""; + + pp " Lemma spec_iter0: forall x y, P [x] [y] (iter0 x y)."; + pp " Proof."; + pp " intros x; case x; clear x; unfold iter0."; + for i = 0 to size do + pp " intros x."; + if i == 0 then + begin + pp " generalize (spec_w0_eq0 x); case w0_eq0; intros H."; + pp " intros y; rewrite H; apply Pf0t."; + pp " clear H."; + end; + pp " intros y; case y; clear y."; + for j = 0 to i - 1 do + pp " intros y."; + if j == 0 then + begin + pp " generalize (spec_w0_eq0 y); case w0_eq0; intros H."; + pp " rewrite H; apply Pft0."; + pp " clear H."; + end; + pp " rewrite spec_eval%in%i; apply (Pfn%i %i); zg_tac." j (i - j) j (i - j - 1); + done; + pp " intros y; apply Pf%i." i; + for j = i + 1 to size do + pp " intros y; rewrite spec_eval%in%i; apply (Pf%in %i); zg_tac." i (j - i) i (j - i - 1); + done; + if i == size then + pp " intros m y; rewrite spec_eval%in; apply Pf%in." size size + else + pp " intros m y; rewrite spec_extend%in%i; rewrite spec_eval%in; apply Pf%in." i size size size; + done; + pp " intros n x y; case y; clear y."; + for i = 0 to size do + pp " intros y."; + if i = 0 then + begin + pp " generalize (spec_w0_eq0 y); case w0_eq0; intros H."; + pp " rewrite H; apply Pft0."; + pp " clear H."; + end; + if i == size then + pp " rewrite spec_eval%in; apply Pfn%i." size size + else + pp " rewrite spec_extend%in%i; rewrite spec_eval%in; apply Pfn%i." i size size size; + done; + pp " intros m y; apply Pfnm."; + pp " Qed."; + pp ""; + + + pr " End LevelAndIter."; + pr ""; + + + pr " (***************************************************************)"; + pr " (* *)"; + pr " (* Reduction *)"; + pr " (* *)"; + pr " (***************************************************************)"; + pr ""; + + pr " Definition reduce_0 (x:w) := %s0 x." c; + pr " Definition reduce_1 :="; + pr " Eval lazy beta iota delta[reduce_n1] in"; + pr " reduce_n1 _ _ zero w0_eq0 %s0 %s1." c c; + for i = 2 to size do + pr " Definition reduce_%i :=" i; + pr " Eval lazy beta iota delta[reduce_n1] in"; + pr " reduce_n1 _ _ zero w%i_eq0 reduce_%i %s%i." + (i-1) (i-1) c i + done; + pr " Definition reduce_%i :=" (size+1); + pr " Eval lazy beta iota delta[reduce_n1] in"; + pr " reduce_n1 _ _ zero w%i_eq0 reduce_%i (%sn 0)." + size size c; + + pr " Definition reduce_n n := "; + pr " Eval lazy beta iota delta[reduce_n] in"; + pr " reduce_n _ _ zero reduce_%i %sn n." (size + 1) c; + pr ""; + + pp " Let spec_reduce_0: forall x, [reduce_0 x] = [%s0 x]." c; + pp " Proof."; + pp " intros x; unfold to_Z, reduce_0."; + pp " auto."; + pp " Qed."; + pp " "; + + for i = 1 to size + 1 do + if i == size + 1 then + pp " Let spec_reduce_%i: forall x, [reduce_%i x] = [%sn 0 x]." i i c + else + pp " Let spec_reduce_%i: forall x, [reduce_%i x] = [%s%i x]." i i c i; + pp " Proof."; + pp " intros x; case x; unfold reduce_%i." i; + pp " exact (spec_0 w0_spec)."; + pp " intros x1 y1."; + pp " generalize (spec_w%i_eq0 x1); " (i - 1); + pp " case w%i_eq0; intros H1; auto." (i - 1); + if i <> 1 then + pp " rewrite spec_reduce_%i." (i - 1); + pp " unfold to_Z; rewrite znz_to_Z_%i." i; + pp " unfold to_Z in H1; rewrite H1; auto."; + pp " Qed."; + pp " "; + done; + + pp " Let spec_reduce_n: forall n x, [reduce_n n x] = [%sn n x]." c; + pp " Proof."; + pp " intros n; elim n; simpl reduce_n."; + pp " intros x; rewrite <- spec_reduce_%i; auto." (size + 1); + pp " intros n1 Hrec x; case x."; + pp " unfold to_Z; rewrite make_op_S; auto."; + pp " exact (spec_0 w0_spec)."; + pp " intros x1 y1; case x1; auto."; + pp " rewrite Hrec."; + pp " rewrite spec_extendn0_0; auto."; + pp " Qed."; + pp " "; + + pr " (***************************************************************)"; + pr " (* *)"; + pr " (* Successor *)"; + pr " (* *)"; + pr " (***************************************************************)"; + pr ""; + + for i = 0 to size do + pr " Definition w%i_succ_c := w%i_op.(znz_succ_c)." i i + done; + pr ""; + + for i = 0 to size do + pr " Definition w%i_succ := w%i_op.(znz_succ)." i i + done; + pr ""; + + pr " Definition succ x :="; + pr " match x with"; + for i = 0 to size-1 do + pr " | %s%i wx =>" c i; + pr " match w%i_succ_c wx with" i; + pr " | C0 r => %s%i r" c i; + pr " | C1 r => %s%i (WW one%i r)" c (i+1) i; + pr " end"; + done; + pr " | %s%i wx =>" c size; + pr " match w%i_succ_c wx with" size; + pr " | C0 r => %s%i r" c size; + pr " | C1 r => %sn 0 (WW one%i r)" c size ; + pr " end"; + pr " | %sn n wx =>" c; + pr " let op := make_op n in"; + pr " match op.(znz_succ_c) wx with"; + pr " | C0 r => %sn n r" c; + pr " | C1 r => %sn (S n) (WW op.(znz_1) r)" c; + pr " end"; + pr " end."; + pr ""; + + pr " Theorem spec_succ: forall n, [succ n] = [n] + 1."; + pa " Admitted."; + pp " Proof."; + pp " intros n; case n; unfold succ, to_Z."; + for i = 0 to size do + pp " intros n1; generalize (spec_succ_c w%i_spec n1);" i; + pp " unfold succ, to_Z, w%i_succ_c; case znz_succ_c; auto." i; + pp " intros ww H; rewrite <- H."; + pp " (rewrite znz_to_Z_%i; unfold interp_carry;" (i + 1); + pp " apply f_equal2 with (f := Zplus); auto;"; + pp " apply f_equal2 with (f := Zmult); auto;"; + pp " exact (spec_1 w%i_spec))." i; + done; + pp " intros k n1; generalize (spec_succ_c (wn_spec k) n1)."; + pp " unfold succ, to_Z; case znz_succ_c; auto."; + pp " intros ww H; rewrite <- H."; + pp " (rewrite (znz_to_Z_n k); unfold interp_carry;"; + pp " apply f_equal2 with (f := Zplus); auto;"; + pp " apply f_equal2 with (f := Zmult); auto;"; + pp " exact (spec_1 (wn_spec k)))."; + pp " Qed."; + pr ""; + + + pr " (***************************************************************)"; + pr " (* *)"; + pr " (* Adddition *)"; + pr " (* *)"; + pr " (***************************************************************)"; + pr ""; + + for i = 0 to size do + pr " Definition w%i_add_c := znz_add_c w%i_op." i i; + pr " Definition w%i_add x y :=" i; + pr " match w%i_add_c x y with" i; + pr " | C0 r => %s%i r" c i; + if i == size then + pr " | C1 r => %sn 0 (WW one%i r)" c size + else + pr " | C1 r => %s%i (WW one%i r)" c (i + 1) i; + pr " end."; + pr ""; + done ; + pr " Definition addn n (x y : word w%i (S n)) :=" size; + pr " let op := make_op n in"; + pr " match op.(znz_add_c) x y with"; + pr " | C0 r => %sn n r" c; + pr " | C1 r => %sn (S n) (WW op.(znz_1) r) end." c; + pr ""; + + + for i = 0 to size do + pp " Let spec_w%i_add: forall x y, [w%i_add x y] = [%s%i x] + [%s%i y]." i i c i c i; + pp " Proof."; + pp " intros n m; unfold to_Z, w%i_add, w%i_add_c." i i; + pp " generalize (spec_add_c w%i_spec n m); case znz_add_c; auto." i; + pp " intros ww H; rewrite <- H."; + pp " rewrite znz_to_Z_%i; unfold interp_carry;" (i + 1); + pp " apply f_equal2 with (f := Zplus); auto;"; + pp " apply f_equal2 with (f := Zmult); auto;"; + pp " exact (spec_1 w%i_spec)." i; + pp " Qed."; + pp " Hint Rewrite spec_w%i_add: addr." i; + pp ""; + done; + pp " Let spec_wn_add: forall n x y, [addn n x y] = [%sn n x] + [%sn n y]." c c; + pp " Proof."; + pp " intros k n m; unfold to_Z, addn."; + pp " generalize (spec_add_c (wn_spec k) n m); case znz_add_c; auto."; + pp " intros ww H; rewrite <- H."; + pp " rewrite (znz_to_Z_n k); unfold interp_carry;"; + pp " apply f_equal2 with (f := Zplus); auto;"; + pp " apply f_equal2 with (f := Zmult); auto;"; + pp " exact (spec_1 (wn_spec k))."; + pp " Qed."; + pp " Hint Rewrite spec_wn_add: addr."; + + pr " Definition add := Eval lazy beta delta [same_level] in"; + pr0 " (same_level t_ "; + for i = 0 to size do + pr0 "w%i_add " i; + done; + pr "addn)."; + pr ""; + + pr " Theorem spec_add: forall x y, [add x y] = [x] + [y]."; + pa " Admitted."; + pp " Proof."; + pp " unfold add."; + pp " generalize (spec_same_level t_ (fun x y res => [res] = x + y))."; + pp " unfold same_level; intros HH; apply HH; clear HH."; + for i = 0 to size do + pp " exact spec_w%i_add." i; + done; + pp " exact spec_wn_add."; + pp " Qed."; + pr ""; + + pr " (***************************************************************)"; + pr " (* *)"; + pr " (* Predecessor *)"; + pr " (* *)"; + pr " (***************************************************************)"; + pr ""; + + for i = 0 to size do + pr " Definition w%i_pred_c := w%i_op.(znz_pred_c)." i i + done; + pr ""; + + pr " Definition pred x :="; + pr " match x with"; + for i = 0 to size do + pr " | %s%i wx =>" c i; + pr " match w%i_pred_c wx with" i; + pr " | C0 r => reduce_%i r" i; + pr " | C1 r => zero"; + pr " end"; + done; + pr " | %sn n wx =>" c; + pr " let op := make_op n in"; + pr " match op.(znz_pred_c) wx with"; + pr " | C0 r => reduce_n n r"; + pr " | C1 r => zero"; + pr " end"; + pr " end."; + pr ""; + + pr " Theorem spec_pred: forall x, 0 < [x] -> [pred x] = [x] - 1."; + pa " Admitted."; + pp " Proof."; + pp " intros x; case x; unfold pred."; + for i = 0 to size do + pp " intros x1 H1; unfold w%i_pred_c; " i; + pp " generalize (spec_pred_c w%i_spec x1); case znz_pred_c; intros y1." i; + pp " rewrite spec_reduce_%i; auto." i; + pp " unfold interp_carry; unfold to_Z."; + pp " case (spec_to_Z w%i_spec x1); intros HH1 HH2." i; + pp " case (spec_to_Z w%i_spec y1); intros HH3 HH4 HH5." i; + pp " assert (znz_to_Z w%i_op x1 - 1 < 0); auto with zarith." i; + pp " unfold to_Z in H1; auto with zarith."; + done; + pp " intros n x1 H1; "; + pp " generalize (spec_pred_c (wn_spec n) x1); case znz_pred_c; intros y1."; + pp " rewrite spec_reduce_n; auto."; + pp " unfold interp_carry; unfold to_Z."; + pp " case (spec_to_Z (wn_spec n) x1); intros HH1 HH2."; + pp " case (spec_to_Z (wn_spec n) y1); intros HH3 HH4 HH5."; + pp " assert (znz_to_Z (make_op n) x1 - 1 < 0); auto with zarith."; + pp " unfold to_Z in H1; auto with zarith."; + pp " Qed."; + pp " "; + + pp " Let spec_pred0: forall x, [x] = 0 -> [pred x] = 0."; + pp " Proof."; + pp " intros x; case x; unfold pred."; + for i = 0 to size do + pp " intros x1 H1; unfold w%i_pred_c; " i; + pp " generalize (spec_pred_c w%i_spec x1); case znz_pred_c; intros y1." i; + pp " unfold interp_carry; unfold to_Z."; + pp " unfold to_Z in H1; auto with zarith."; + pp " case (spec_to_Z w%i_spec y1); intros HH3 HH4; auto with zarith." i; + pp " intros; exact (spec_0 w0_spec)."; + done; + pp " intros n x1 H1; "; + pp " generalize (spec_pred_c (wn_spec n) x1); case znz_pred_c; intros y1."; + pp " unfold interp_carry; unfold to_Z."; + pp " unfold to_Z in H1; auto with zarith."; + pp " case (spec_to_Z (wn_spec n) y1); intros HH3 HH4; auto with zarith."; + pp " intros; exact (spec_0 w0_spec)."; + pp " Qed."; + pr " "; + + + pr " (***************************************************************)"; + pr " (* *)"; + pr " (* Subtraction *)"; + pr " (* *)"; + pr " (***************************************************************)"; + pr ""; + + for i = 0 to size do + pr " Definition w%i_sub_c := w%i_op.(znz_sub_c)." i i + done; + pr ""; + + for i = 0 to size do + pr " Definition w%i_sub x y :=" i; + pr " match w%i_sub_c x y with" i; + pr " | C0 r => reduce_%i r" i; + pr " | C1 r => zero"; + pr " end." + done; + pr ""; + + pr " Definition subn n (x y : word w%i (S n)) :=" size; + pr " let op := make_op n in"; + pr " match op.(znz_sub_c) x y with"; + pr " | C0 r => %sn n r" c; + pr " | C1 r => N0 w_0"; + pr " end."; + pr ""; + + for i = 0 to size do + pp " Let spec_w%i_sub: forall x y, [%s%i y] <= [%s%i x] -> [w%i_sub x y] = [%s%i x] - [%s%i y]." i c i c i i c i c i; + pp " Proof."; + pp " intros n m; unfold w%i_sub, w%i_sub_c." i i; + pp " generalize (spec_sub_c w%i_spec n m); case znz_sub_c; " i; + if i == 0 then + pp " intros x; auto." + else + pp " intros x; try rewrite spec_reduce_%i; auto." i; + pp " unfold interp_carry; unfold zero, w_0, to_Z."; + pp " rewrite (spec_0 w0_spec)."; + pp " case (spec_to_Z w%i_spec x); intros; auto with zarith." i; + pp " Qed."; + pp ""; + done; + + pp " Let spec_wn_sub: forall n x y, [%sn n y] <= [%sn n x] -> [subn n x y] = [%sn n x] - [%sn n y]." c c c c; + pp " Proof."; + pp " intros k n m; unfold subn."; + pp " generalize (spec_sub_c (wn_spec k) n m); case znz_sub_c; "; + pp " intros x; auto."; + pp " unfold interp_carry, to_Z."; + pp " case (spec_to_Z (wn_spec k) x); intros; auto with zarith."; + pp " Qed."; + pp ""; + + pr " Definition sub := Eval lazy beta delta [same_level] in"; + pr0 " (same_level t_ "; + for i = 0 to size do + pr0 "w%i_sub " i; + done; + pr "subn)."; + pr ""; + + pr " Theorem spec_sub: forall x y, [y] <= [x] -> [sub x y] = [x] - [y]."; + pa " Admitted."; + pp " Proof."; + pp " unfold sub."; + pp " generalize (spec_same_level t_ (fun x y res => y <= x -> [res] = x - y))."; + pp " unfold same_level; intros HH; apply HH; clear HH."; + for i = 0 to size do + pp " exact spec_w%i_sub." i; + done; + pp " exact spec_wn_sub."; + pp " Qed."; + pr ""; + + for i = 0 to size do + pp " Let spec_w%i_sub0: forall x y, [%s%i x] < [%s%i y] -> [w%i_sub x y] = 0." i c i c i i; + pp " Proof."; + pp " intros n m; unfold w%i_sub, w%i_sub_c." i i; + pp " generalize (spec_sub_c w%i_spec n m); case znz_sub_c; " i; + pp " intros x; unfold interp_carry."; + pp " unfold to_Z; case (spec_to_Z w%i_spec x); intros; auto with zarith." i; + pp " intros; unfold to_Z, zero, w_0; rewrite (spec_0 w0_spec); auto."; + pp " Qed."; + pp ""; + done; + + pp " Let spec_wn_sub0: forall n x y, [%sn n x] < [%sn n y] -> [subn n x y] = 0." c c; + pp " Proof."; + pp " intros k n m; unfold subn."; + pp " generalize (spec_sub_c (wn_spec k) n m); case znz_sub_c; "; + pp " intros x; unfold interp_carry."; + pp " unfold to_Z; case (spec_to_Z (wn_spec k) x); intros; auto with zarith."; + pp " intros; unfold to_Z, w_0; rewrite (spec_0 (w0_spec)); auto."; + pp " Qed."; + pp ""; + + pr " Theorem spec_sub0: forall x y, [x] < [y] -> [sub x y] = 0."; + pa " Admitted."; + pp " Proof."; + pp " unfold sub."; + pp " generalize (spec_same_level t_ (fun x y res => x < y -> [res] = 0))."; + pp " unfold same_level; intros HH; apply HH; clear HH."; + for i = 0 to size do + pp " exact spec_w%i_sub0." i; + done; + pp " exact spec_wn_sub0."; + pp " Qed."; + pr ""; + + + pr " (***************************************************************)"; + pr " (* *)"; + pr " (* Comparison *)"; + pr " (* *)"; + pr " (***************************************************************)"; + pr ""; + + for i = 0 to size do + pr " Definition compare_%i := w%i_op.(znz_compare)." i i; + pr " Definition comparen_%i :=" i; + pr " compare_mn_1 w%i w%i %s compare_%i (compare_%i %s) compare_%i." i i (pz i) i i (pz i) i + done; + pr ""; + + pr " Definition comparenm n m wx wy :="; + pr " let mn := Max.max n m in"; + pr " let d := diff n m in"; + pr " let op := make_op mn in"; + pr " op.(znz_compare)"; + pr " (castm (diff_r n m) (extend_tr wx (snd d)))"; + pr " (castm (diff_l n m) (extend_tr wy (fst d)))."; + pr ""; + + pr " Definition compare := Eval lazy beta delta [iter] in "; + pr " (iter _ "; + for i = 0 to size do + pr " compare_%i" i; + pr " (fun n x y => opp_compare (comparen_%i (S n) y x))" i; + pr " (fun n => comparen_%i (S n))" i; + done; + pr " comparenm)."; + pr ""; + + pr " Definition lt n m := compare n m = Lt."; + pr " Definition le n m := compare n m <> Gt."; + pr " Definition min n m := match compare n m with Gt => m | _ => n end."; + pr " Definition max n m := match compare n m with Lt => m | _ => n end."; + pr ""; + + for i = 0 to size do + pp " Let spec_compare_%i: forall x y," i; + pp " match compare_%i x y with " i; + pp " Eq => [%s%i x] = [%s%i y]" c i c i; + pp " | Lt => [%s%i x] < [%s%i y]" c i c i; + pp " | Gt => [%s%i x] > [%s%i y]" c i c i; + pp " end."; + pp " Proof."; + pp " unfold compare_%i, to_Z; exact (spec_compare w%i_spec)." i i; + pp " Qed."; + pp ""; + + pp " Let spec_comparen_%i:" i; + pp " forall (n : nat) (x : word w%i n) (y : w%i)," i i; + pp " match comparen_%i n x y with" i; + pp " | Eq => eval%in n x = [%s%i y]" i c i; + pp " | Lt => eval%in n x < [%s%i y]" i c i; + pp " | Gt => eval%in n x > [%s%i y]" i c i; + pp " end."; + pp " intros n x y."; + pp " unfold comparen_%i, to_Z; rewrite spec_double_eval%in." i i; + pp " apply spec_compare_mn_1."; + pp " exact (spec_0 w%i_spec)." i; + pp " intros x1; exact (spec_compare w%i_spec %s x1)." i (pz i); + pp " exact (spec_to_Z w%i_spec)." i; + pp " exact (spec_compare w%i_spec)." i; + pp " exact (spec_compare w%i_spec)." i; + pp " exact (spec_to_Z w%i_spec)." i; + pp " Qed."; + pp ""; + done; + + pp " Let spec_opp_compare: forall c (u v: Z),"; + pp " match c with Eq => u = v | Lt => u < v | Gt => u > v end ->"; + pp " match opp_compare c with Eq => v = u | Lt => v < u | Gt => v > u end."; + pp " Proof."; + pp " intros c u v; case c; unfold opp_compare; auto with zarith."; + pp " Qed."; + pp ""; + + + pr " Theorem spec_compare: forall x y,"; + pr " match compare x y with "; + pr " Eq => [x] = [y]"; + pr " | Lt => [x] < [y]"; + pr " | Gt => [x] > [y]"; + pr " end."; + pa " Admitted."; + pp " Proof."; + pp " refine (spec_iter _ (fun x y res => "; + pp " match res with "; + pp " Eq => x = y"; + pp " | Lt => x < y"; + pp " | Gt => x > y"; + pp " end)"; + for i = 0 to size do + pp " compare_%i" i; + pp " (fun n x y => opp_compare (comparen_%i (S n) y x))" i; + pp " (fun n => comparen_%i (S n)) _ _ _" i; + done; + pp " comparenm _)."; + + for i = 0 to size - 1 do + pp " exact spec_compare_%i." i; + pp " intros n x y H;apply spec_opp_compare; apply spec_comparen_%i." i; + pp " intros n x y H; exact (spec_comparen_%i (S n) x y)." i; + done; + pp " exact spec_compare_%i." size; + pp " intros n x y;apply spec_opp_compare; apply spec_comparen_%i." size; + pp " intros n; exact (spec_comparen_%i (S n))." size; + pp " intros n m x y; unfold comparenm."; + pp " rewrite <- (spec_cast_l n m x); rewrite <- (spec_cast_r n m y)."; + pp " unfold to_Z; apply (spec_compare (wn_spec (Max.max n m)))."; + pp " Qed."; + pr ""; + + pr " Definition eq_bool x y :="; + pr " match compare x y with"; + pr " | Eq => true"; + pr " | _ => false"; + pr " end."; + pr ""; + + + pr " Theorem spec_eq_bool: forall x y,"; + pr " if eq_bool x y then [x] = [y] else [x] <> [y]."; + pa " Admitted."; + pp " Proof."; + pp " intros x y; unfold eq_bool."; + pp " generalize (spec_compare x y); case compare; auto with zarith."; + pp " Qed."; + pr ""; + + + + pr " (***************************************************************)"; + pr " (* *)"; + pr " (* Multiplication *)"; + pr " (* *)"; + pr " (***************************************************************)"; + pr ""; + + for i = 0 to size do + pr " Definition w%i_mul_c := w%i_op.(znz_mul_c)." i i + done; + pr ""; + + for i = 0 to size do + pr " Definition w%i_mul_add :=" i; + pr " Eval lazy beta delta [w_mul_add] in"; + pr " @w_mul_add w%i %s w%i_succ w%i_add_c w%i_mul_c." i (pz i) i i i + done; + pr ""; + + for i = 0 to size do + pr " Definition w%i_0W := znz_0W w%i_op." i i + done; + pr ""; + + for i = 0 to size do + pr " Definition w%i_WW := znz_WW w%i_op." i i + done; + pr ""; + + for i = 0 to size do + pr " Definition w%i_mul_add_n1 :=" i; + pr " @double_mul_add_n1 w%i %s w%i_WW w%i_0W w%i_mul_add." i (pz i) i i i + done; + pr ""; + + for i = 0 to size - 1 do + pr " Let to_Z%i n :=" i; + pr " match n return word w%i (S n) -> t_ with" i; + for j = 0 to size - i do + if (i + j) == size then + begin + pr " | %i%s => fun x => %sn 0 x" j "%nat" c; + pr " | %i%s => fun x => %sn 1 x" (j + 1) "%nat" c + end + else + pr " | %i%s => fun x => %s%i x" j "%nat" c (i + j + 1) + done; + pr " | _ => fun _ => N0 w_0"; + pr " end."; + pr ""; + done; + + + for i = 0 to size - 1 do + pp "Theorem to_Z%i_spec:" i; + pp " forall n x, Z_of_nat n <= %i -> [to_Z%i n x] = znz_to_Z (nmake_op _ w%i_op (S n)) x." (size + 1 - i) i i; + for j = 1 to size + 2 - i do + pp " intros n; case n; clear n."; + pp " unfold to_Z%i." i; + pp " intros x H; rewrite spec_eval%in%i; auto." i j; + done; + pp " intros n x."; + pp " repeat rewrite inj_S; unfold Zsucc; auto with zarith."; + pp " Qed."; + pp ""; + done; + + + for i = 0 to size do + pr " Definition w%i_mul n x y :=" i; + pr " let (w,r) := w%i_mul_add_n1 (S n) x y %s in" i (pz i); + if i == size then + begin + pr " if w%i_eq0 w then %sn n r" i c; + pr " else %sn (S n) (WW (extend%i n w) r)." c i; + end + else + begin + pr " if w%i_eq0 w then to_Z%i n r" i i; + pr " else to_Z%i (S n) (WW (extend%i n w) r)." i i; + end; + pr ""; + done; + + pr " Definition mulnm n m x y :="; + pr " let mn := Max.max n m in"; + pr " let d := diff n m in"; + pr " let op := make_op mn in"; + pr " reduce_n (S mn) (op.(znz_mul_c)"; + pr " (castm (diff_r n m) (extend_tr x (snd d)))"; + pr " (castm (diff_l n m) (extend_tr y (fst d))))."; + pr ""; + + pr " Definition mul := Eval lazy beta delta [iter0] in "; + pr " (iter0 t_ "; + for i = 0 to size do + pr " (fun x y => reduce_%i (w%i_mul_c x y)) " (i + 1) i; + pr " (fun n x y => w%i_mul n y x)" i; + pr " w%i_mul" i; + done; + pr " mulnm"; + pr " (fun _ => N0 w_0)"; + pr " (fun _ => N0 w_0)"; + pr " )."; + pr ""; + for i = 0 to size do + pp " Let spec_w%i_mul_add: forall x y z," i; + pp " let (q,r) := w%i_mul_add x y z in" i; + pp " znz_to_Z w%i_op q * (base (znz_digits w%i_op)) + znz_to_Z w%i_op r =" i i i; + pp " znz_to_Z w%i_op x * znz_to_Z w%i_op y + znz_to_Z w%i_op z :=" i i i ; + pp " (spec_mul_add w%i_spec)." i; + pp ""; + done; + + for i = 0 to size do + pp " Theorem spec_w%i_mul_add_n1: forall n x y z," i; + pp " let (q,r) := w%i_mul_add_n1 n x y z in" i; + pp " znz_to_Z w%i_op q * (base (znz_digits (nmake_op _ w%i_op n))) +" i i; + pp " znz_to_Z (nmake_op _ w%i_op n) r =" i; + pp " znz_to_Z (nmake_op _ w%i_op n) x * znz_to_Z w%i_op y +" i i; + pp " znz_to_Z w%i_op z." i; + pp " Proof."; + pp " intros n x y z; unfold w%i_mul_add_n1." i; + pp " rewrite nmake_double."; + pp " rewrite digits_doubled."; + pp " change (base (DoubleBase.double_digits (znz_digits w%i_op) n)) with" i; + pp " (DoubleBase.double_wB (znz_digits w%i_op) n)." i; + pp " apply spec_double_mul_add_n1; auto."; + if i == 0 then pp " exact (spec_0 w%i_spec)." i; + pp " exact (spec_WW w%i_spec)." i; + pp " exact (spec_0W w%i_spec)." i; + pp " exact (spec_mul_add w%i_spec)." i; + pp " Qed."; + pp ""; + done; + + pp " Lemma nmake_op_WW: forall ww ww1 n x y,"; + pp " znz_to_Z (nmake_op ww ww1 (S n)) (WW x y) ="; + pp " znz_to_Z (nmake_op ww ww1 n) x * base (znz_digits (nmake_op ww ww1 n)) +"; + pp " znz_to_Z (nmake_op ww ww1 n) y."; + pp " auto."; + pp " Qed."; + pp ""; + + for i = 0 to size do + pp " Lemma extend%in_spec: forall n x1," i; + pp " znz_to_Z (nmake_op _ w%i_op (S n)) (extend%i n x1) = " i i; + pp " znz_to_Z w%i_op x1." i; + pp " Proof."; + pp " intros n1 x2; rewrite nmake_double."; + pp " unfold extend%i." i; + pp " rewrite DoubleBase.spec_extend; auto."; + if i == 0 then + pp " intros l; simpl; unfold w_0; rewrite (spec_0 w0_spec); ring."; + pp " Qed."; + pp ""; + done; + + pp " Lemma spec_muln:"; + pp " forall n (x: word _ (S n)) y,"; + pp " [%sn (S n) (znz_mul_c (make_op n) x y)] = [%sn n x] * [%sn n y]." c c c; + pp " Proof."; + pp " intros n x y; unfold to_Z."; + pp " rewrite <- (spec_mul_c (wn_spec n))."; + pp " rewrite make_op_S."; + pp " case znz_mul_c; auto."; + pp " Qed."; + + pr " Theorem spec_mul: forall x y, [mul x y] = [x] * [y]."; + pa " Admitted."; + pp " Proof."; + for i = 0 to size do + pp " assert(F%i: " i; + pp " forall n x y,"; + if i <> size then + pp0 " Z_of_nat n <= %i -> " (size - i); + pp " [w%i_mul n x y] = eval%in (S n) x * [%s%i y])." i i c i; + if i == size then + pp " intros n x y; unfold w%i_mul." i + else + pp " intros n x y H; unfold w%i_mul." i; + pp " generalize (spec_w%i_mul_add_n1 (S n) x y %s)." i (pz i); + pp " case w%i_mul_add_n1; intros x1 y1." i; + pp " change (znz_to_Z (nmake_op _ w%i_op (S n)) x) with (eval%in (S n) x)." i i; + pp " change (znz_to_Z w%i_op y) with ([%s%i y])." i c i; + if i == 0 then + pp " unfold w_0; rewrite (spec_0 w0_spec); rewrite Zplus_0_r." + else + pp " change (znz_to_Z w%i_op W0) with 0; rewrite Zplus_0_r." i; + pp " intros H1; rewrite <- H1; clear H1."; + pp " generalize (spec_w%i_eq0 x1); case w%i_eq0; intros HH." i i; + pp " unfold to_Z in HH; rewrite HH."; + if i == size then + begin + pp " rewrite spec_eval%in; unfold eval%in, nmake_op%i; auto." i i i; + pp " rewrite spec_eval%in; unfold eval%in, nmake_op%i." i i i + end + else + begin + pp " rewrite to_Z%i_spec; auto with zarith." i; + pp " rewrite to_Z%i_spec; try (rewrite inj_S; auto with zarith)." i + end; + pp " rewrite nmake_op_WW; rewrite extend%in_spec; auto." i; + done; + pp " refine (spec_iter0 t_ (fun x y res => [res] = x * y)"; + for i = 0 to size do + pp " (fun x y => reduce_%i (w%i_mul_c x y)) " (i + 1) i; + pp " (fun n x y => w%i_mul n y x)" i; + pp " w%i_mul _ _ _" i; + done; + pp " mulnm _"; + pp " (fun _ => N0 w_0) _"; + pp " (fun _ => N0 w_0) _"; + pp " )."; + for i = 0 to size do + pp " intros x y; rewrite spec_reduce_%i." (i + 1); + pp " unfold w%i_mul_c, to_Z." i; + pp " generalize (spec_mul_c w%i_spec x y)." i; + pp " intros HH; rewrite <- HH; clear HH; auto."; + if i == size then + begin + pp " intros n x y; rewrite F%i; auto with zarith." i; + pp " intros n x y; rewrite F%i; auto with zarith. " i; + end + else + begin + pp " intros n x y H; rewrite F%i; auto with zarith." i; + pp " intros n x y H; rewrite F%i; auto with zarith. " i; + end; + done; + pp " intros n m x y; unfold mulnm."; + pp " rewrite spec_reduce_n."; + pp " rewrite <- (spec_cast_l n m x)."; + pp " rewrite <- (spec_cast_r n m y)."; + pp " rewrite spec_muln; rewrite spec_cast_l; rewrite spec_cast_r; auto."; + pp " intros x; unfold to_Z, w_0; rewrite (spec_0 w0_spec); ring."; + pp " intros x; unfold to_Z, w_0; rewrite (spec_0 w0_spec); ring."; + pp " Qed."; + pr ""; + + pr " (***************************************************************)"; + pr " (* *)"; + pr " (* Square *)"; + pr " (* *)"; + pr " (***************************************************************)"; + pr ""; + + for i = 0 to size do + pr " Definition w%i_square_c := w%i_op.(znz_square_c)." i i + done; + pr ""; + + pr " Definition square x :="; + pr " match x with"; + pr " | %s0 wx => reduce_1 (w0_square_c wx)" c; + for i = 1 to size - 1 do + pr " | %s%i wx => %s%i (w%i_square_c wx)" c i c (i+1) i + done; + pr " | %s%i wx => %sn 0 (w%i_square_c wx)" c size c size; + pr " | %sn n wx =>" c; + pr " let op := make_op n in"; + pr " %sn (S n) (op.(znz_square_c) wx)" c; + pr " end."; + pr ""; + + pr " Theorem spec_square: forall x, [square x] = [x] * [x]."; + pa " Admitted."; + pp " Proof."; + pp " intros x; case x; unfold square; clear x."; + pp " intros x; rewrite spec_reduce_1; unfold to_Z."; + pp " exact (spec_square_c w%i_spec x)." 0; + for i = 1 to size do + pp " intros x; unfold to_Z."; + pp " exact (spec_square_c w%i_spec x)." i; + done; + pp " intros n x; unfold to_Z."; + pp " rewrite make_op_S."; + pp " exact (spec_square_c (wn_spec n) x)."; + pp "Qed."; + pr ""; + + + pr " (***************************************************************)"; + pr " (* *)"; + pr " (* Power *)"; + pr " (* *)"; + pr " (***************************************************************)"; + pr ""; + + pr " Fixpoint power_pos (x:%s) (p:positive) {struct p} : %s :=" t t; + pr " match p with"; + pr " | xH => x"; + pr " | xO p => square (power_pos x p)"; + pr " | xI p => mul (square (power_pos x p)) x"; + pr " end."; + pr ""; + + pr " Theorem spec_power_pos: forall x n, [power_pos x n] = [x] ^ Zpos n."; + pa " Admitted."; + pp " Proof."; + pp " intros x n; generalize x; elim n; clear n x; simpl power_pos."; + pp " intros; rewrite spec_mul; rewrite spec_square; rewrite H."; + pp " rewrite Zpos_xI; rewrite Zpower_exp; auto with zarith."; + pp " rewrite (Zmult_comm 2); rewrite Zpower_mult; auto with zarith."; + pp " rewrite Zpower_2; rewrite Zpower_1_r; auto."; + pp " intros; rewrite spec_square; rewrite H."; + pp " rewrite Zpos_xO; auto with zarith."; + pp " rewrite (Zmult_comm 2); rewrite Zpower_mult; auto with zarith."; + pp " rewrite Zpower_2; auto."; + pp " intros; rewrite Zpower_1_r; auto."; + pp " Qed."; + pp ""; + pr ""; + + pr " (***************************************************************)"; + pr " (* *)"; + pr " (* Square root *)"; + pr " (* *)"; + pr " (***************************************************************)"; + pr ""; + + for i = 0 to size do + pr " Definition w%i_sqrt := w%i_op.(znz_sqrt)." i i + done; + pr ""; + + pr " Definition sqrt x :="; + pr " match x with"; + for i = 0 to size do + pr " | %s%i wx => reduce_%i (w%i_sqrt wx)" c i i i; + done; + pr " | %sn n wx =>" c; + pr " let op := make_op n in"; + pr " reduce_n n (op.(znz_sqrt) wx)"; + pr " end."; + pr ""; + + pr " Theorem spec_sqrt: forall x, [sqrt x] ^ 2 <= [x] < ([sqrt x] + 1) ^ 2."; + pa " Admitted."; + pp " Proof."; + pp " intros x; unfold sqrt; case x; clear x."; + for i = 0 to size do + pp " intros x; rewrite spec_reduce_%i; exact (spec_sqrt w%i_spec x)." i i; + done; + pp " intros n x; rewrite spec_reduce_n; exact (spec_sqrt (wn_spec n) x)."; + pp " Qed."; + pr ""; + + + pr " (***************************************************************)"; + pr " (* *)"; + pr " (* Division *)"; + pr " (* *)"; + pr " (***************************************************************)"; + pr ""; + + for i = 0 to size do + pr " Definition w%i_div_gt := w%i_op.(znz_div_gt)." i i + done; + pr ""; + + pp " Let spec_divn1 ww (ww_op: znz_op ww) (ww_spec: znz_spec ww_op) := "; + pp " (spec_double_divn1 "; + pp " ww_op.(znz_zdigits) ww_op.(znz_0)"; + pp " (znz_WW ww_op) ww_op.(znz_head0)"; + pp " ww_op.(znz_add_mul_div) ww_op.(znz_div21)"; + pp " ww_op.(znz_compare) ww_op.(znz_sub) (znz_to_Z ww_op)"; + pp " (spec_to_Z ww_spec) "; + pp " (spec_zdigits ww_spec)"; + pp " (spec_0 ww_spec) (spec_WW ww_spec) (spec_head0 ww_spec)"; + pp " (spec_add_mul_div ww_spec) (spec_div21 ww_spec) "; + pp " (CyclicAxioms.spec_compare ww_spec) (CyclicAxioms.spec_sub ww_spec))."; + pp ""; + + for i = 0 to size do + pr " Definition w%i_divn1 n x y :=" i; + pr " let (u, v) :="; + pr " double_divn1 w%i_op.(znz_zdigits) w%i_op.(znz_0)" i i; + pr " (znz_WW w%i_op) w%i_op.(znz_head0)" i i; + pr " w%i_op.(znz_add_mul_div) w%i_op.(znz_div21)" i i; + pr " w%i_op.(znz_compare) w%i_op.(znz_sub) (S n) x y in" i i; + if i == size then + pr " (%sn _ u, %s%i v)." c c i + else + pr " (to_Z%i _ u, %s%i v)." i c i; + done; + pr ""; + + for i = 0 to size do + pp " Lemma spec_get_end%i: forall n x y," i; + pp " eval%in n x <= [%s%i y] -> " i c i; + pp " [%s%i (DoubleBase.get_low %s n x)] = eval%in n x." c i (pz i) i; + pp " Proof."; + pp " intros n x y H."; + pp " rewrite spec_double_eval%in; unfold to_Z." i; + pp " apply DoubleBase.spec_get_low."; + pp " exact (spec_0 w%i_spec)." i; + pp " exact (spec_to_Z w%i_spec)." i; + pp " apply Zle_lt_trans with [%s%i y]; auto." c i; + pp " rewrite <- spec_double_eval%in; auto." i; + pp " unfold to_Z; case (spec_to_Z w%i_spec y); auto." i; + pp " Qed."; + pp ""; + done; + + for i = 0 to size do + pr " Let div_gt%i x y := let (u,v) := (w%i_div_gt x y) in (reduce_%i u, reduce_%i v)." i i i i; + done; + pr ""; + + + pr " Let div_gtnm n m wx wy :="; + pr " let mn := Max.max n m in"; + pr " let d := diff n m in"; + pr " let op := make_op mn in"; + pr " let (q, r):= op.(znz_div_gt)"; + pr " (castm (diff_r n m) (extend_tr wx (snd d)))"; + pr " (castm (diff_l n m) (extend_tr wy (fst d))) in"; + pr " (reduce_n mn q, reduce_n mn r)."; + pr ""; + + pr " Definition div_gt := Eval lazy beta delta [iter] in"; + pr " (iter _ "; + for i = 0 to size do + pr " div_gt%i" i; + pr " (fun n x y => div_gt%i x (DoubleBase.get_low %s (S n) y))" i (pz i); + pr " w%i_divn1" i; + done; + pr " div_gtnm)."; + pr ""; + + pr " Theorem spec_div_gt: forall x y,"; + pr " [x] > [y] -> 0 < [y] ->"; + pr " let (q,r) := div_gt x y in"; + pr " [q] = [x] / [y] /\\ [r] = [x] mod [y]."; + pa " Admitted."; + pp " Proof."; + pp " assert (FO:"; + pp " forall x y, [x] > [y] -> 0 < [y] ->"; + pp " let (q,r) := div_gt x y in"; + pp " [x] = [q] * [y] + [r] /\\ 0 <= [r] < [y])."; + pp " refine (spec_iter (t_*t_) (fun x y res => x > y -> 0 < y ->"; + pp " let (q,r) := res in"; + pp " x = [q] * y + [r] /\\ 0 <= [r] < y)"; + for i = 0 to size do + pp " div_gt%i" i; + pp " (fun n x y => div_gt%i x (DoubleBase.get_low %s (S n) y))" i (pz i); + pp " w%i_divn1 _ _ _" i; + done; + pp " div_gtnm _)."; + for i = 0 to size do + pp " intros x y H1 H2; unfold div_gt%i, w%i_div_gt." i i; + pp " generalize (spec_div_gt w%i_spec x y H1 H2); case znz_div_gt." i; + pp " intros xx yy; repeat rewrite spec_reduce_%i; auto." i; + if i == size then + pp " intros n x y H2 H3; unfold div_gt%i, w%i_div_gt." i i + else + pp " intros n x y H1 H2 H3; unfold div_gt%i, w%i_div_gt." i i; + pp " generalize (spec_div_gt w%i_spec x " i; + pp " (DoubleBase.get_low %s (S n) y))." (pz i); + pp0 " "; + for j = 0 to i do + pp0 "unfold w%i; " (i-j); + done; + pp "case znz_div_gt."; + pp " intros xx yy H4; repeat rewrite spec_reduce_%i." i; + pp " generalize (spec_get_end%i (S n) y x); unfold to_Z; intros H5." i; + pp " unfold to_Z in H2; rewrite H5 in H4; auto with zarith."; + if i == size then + pp " intros n x y H2 H3." + else + pp " intros n x y H1 H2 H3."; + pp " generalize"; + pp " (spec_divn1 w%i w%i_op w%i_spec (S n) x y H3)." i i i; + pp0 " unfold w%i_divn1; " i; + for j = 0 to i do + pp0 "unfold w%i; " (i-j); + done; + pp "case double_divn1."; + pp " intros xx yy H4."; + if i == size then + begin + pp " repeat rewrite <- spec_double_eval%in in H4; auto." i; + pp " rewrite spec_eval%in; auto." i; + end + else + begin + pp " rewrite to_Z%i_spec; auto with zarith." i; + pp " repeat rewrite <- spec_double_eval%in in H4; auto." i; + end; + done; + pp " intros n m x y H1 H2; unfold div_gtnm."; + pp " generalize (spec_div_gt (wn_spec (Max.max n m))"; + pp " (castm (diff_r n m)"; + pp " (extend_tr x (snd (diff n m))))"; + pp " (castm (diff_l n m)"; + pp " (extend_tr y (fst (diff n m)))))."; + pp " case znz_div_gt."; + pp " intros xx yy HH."; + pp " repeat rewrite spec_reduce_n."; + pp " rewrite <- (spec_cast_l n m x)."; + pp " rewrite <- (spec_cast_r n m y)."; + pp " unfold to_Z; apply HH."; + pp " rewrite <- (spec_cast_l n m x) in H1; auto."; + pp " rewrite <- (spec_cast_r n m y) in H1; auto."; + pp " rewrite <- (spec_cast_r n m y) in H2; auto."; + pp " intros x y H1 H2; generalize (FO x y H1 H2); case div_gt."; + pp " intros q r (H3, H4); split."; + pp " apply (Zdiv_unique [x] [y] [q] [r]); auto."; + pp " rewrite Zmult_comm; auto."; + pp " apply (Zmod_unique [x] [y] [q] [r]); auto."; + pp " rewrite Zmult_comm; auto."; + pp " Qed."; + pr ""; + + pr " Definition div_eucl x y :="; + pr " match compare x y with"; + pr " | Eq => (one, zero)"; + pr " | Lt => (zero, x)"; + pr " | Gt => div_gt x y"; + pr " end."; + pr ""; + + pr " Theorem spec_div_eucl: forall x y,"; + pr " 0 < [y] ->"; + pr " let (q,r) := div_eucl x y in"; + pr " ([q], [r]) = Zdiv_eucl [x] [y]."; + pa " Admitted."; + pp " Proof."; + pp " assert (F0: [zero] = 0)."; + pp " exact (spec_0 w0_spec)."; + pp " assert (F1: [one] = 1)."; + pp " exact (spec_1 w0_spec)."; + pp " intros x y H; generalize (spec_compare x y);"; + pp " unfold div_eucl; case compare; try rewrite F0;"; + pp " try rewrite F1; intros; auto with zarith."; + pp " rewrite H0; generalize (Z_div_same [y] (Zlt_gt _ _ H))"; + pp " (Z_mod_same [y] (Zlt_gt _ _ H));"; + pp " unfold Zdiv, Zmod; case Zdiv_eucl; intros; subst; auto."; + pp " assert (F2: 0 <= [x] < [y])."; + pp " generalize (spec_pos x); auto."; + pp " generalize (Zdiv_small _ _ F2)"; + pp " (Zmod_small _ _ F2);"; + pp " unfold Zdiv, Zmod; case Zdiv_eucl; intros; subst; auto."; + pp " generalize (spec_div_gt _ _ H0 H); auto."; + pp " unfold Zdiv, Zmod; case Zdiv_eucl; case div_gt."; + pp " intros a b c d (H1, H2); subst; auto."; + pp " Qed."; + pr ""; + + pr " Definition div x y := fst (div_eucl x y)."; + pr ""; + + pr " Theorem spec_div:"; + pr " forall x y, 0 < [y] -> [div x y] = [x] / [y]."; + pa " Admitted."; + pp " Proof."; + pp " intros x y H1; unfold div; generalize (spec_div_eucl x y H1);"; + pp " case div_eucl; simpl fst."; + pp " intros xx yy; unfold Zdiv; case Zdiv_eucl; intros qq rr H; "; + pp " injection H; auto."; + pp " Qed."; + pr ""; + + pr " (***************************************************************)"; + pr " (* *)"; + pr " (* Modulo *)"; + pr " (* *)"; + pr " (***************************************************************)"; + pr ""; + + for i = 0 to size do + pr " Definition w%i_mod_gt := w%i_op.(znz_mod_gt)." i i + done; + pr ""; + + for i = 0 to size do + pr " Definition w%i_modn1 :=" i; + pr " double_modn1 w%i_op.(znz_zdigits) w%i_op.(znz_0)" i i; + pr " w%i_op.(znz_head0) w%i_op.(znz_add_mul_div) w%i_op.(znz_div21)" i i i; + pr " w%i_op.(znz_compare) w%i_op.(znz_sub)." i i; + done; + pr ""; + + pr " Let mod_gtnm n m wx wy :="; + pr " let mn := Max.max n m in"; + pr " let d := diff n m in"; + pr " let op := make_op mn in"; + pr " reduce_n mn (op.(znz_mod_gt)"; + pr " (castm (diff_r n m) (extend_tr wx (snd d)))"; + pr " (castm (diff_l n m) (extend_tr wy (fst d))))."; + pr ""; + + pr " Definition mod_gt := Eval lazy beta delta[iter] in"; + pr " (iter _ "; + for i = 0 to size do + pr " (fun x y => reduce_%i (w%i_mod_gt x y))" i i; + pr " (fun n x y => reduce_%i (w%i_mod_gt x (DoubleBase.get_low %s (S n) y)))" i i (pz i); + pr " (fun n x y => reduce_%i (w%i_modn1 (S n) x y))" i i; + done; + pr " mod_gtnm)."; + pr ""; + + pp " Let spec_modn1 ww (ww_op: znz_op ww) (ww_spec: znz_spec ww_op) := "; + pp " (spec_double_modn1 "; + pp " ww_op.(znz_zdigits) ww_op.(znz_0)"; + pp " (znz_WW ww_op) ww_op.(znz_head0)"; + pp " ww_op.(znz_add_mul_div) ww_op.(znz_div21)"; + pp " ww_op.(znz_compare) ww_op.(znz_sub) (znz_to_Z ww_op)"; + pp " (spec_to_Z ww_spec) "; + pp " (spec_zdigits ww_spec)"; + pp " (spec_0 ww_spec) (spec_WW ww_spec) (spec_head0 ww_spec)"; + pp " (spec_add_mul_div ww_spec) (spec_div21 ww_spec) "; + pp " (CyclicAxioms.spec_compare ww_spec) (CyclicAxioms.spec_sub ww_spec))."; + pp ""; + + pr " Theorem spec_mod_gt:"; + pr " forall x y, [x] > [y] -> 0 < [y] -> [mod_gt x y] = [x] mod [y]."; + pa " Admitted."; + pp " Proof."; + pp " refine (spec_iter _ (fun x y res => x > y -> 0 < y ->"; + pp " [res] = x mod y)"; + for i = 0 to size do + pp " (fun x y => reduce_%i (w%i_mod_gt x y))" i i; + pp " (fun n x y => reduce_%i (w%i_mod_gt x (DoubleBase.get_low %s (S n) y)))" i i (pz i); + pp " (fun n x y => reduce_%i (w%i_modn1 (S n) x y)) _ _ _" i i; + done; + pp " mod_gtnm _)."; + for i = 0 to size do + pp " intros x y H1 H2; rewrite spec_reduce_%i." i; + pp " exact (spec_mod_gt w%i_spec x y H1 H2)." i; + if i == size then + pp " intros n x y H2 H3; rewrite spec_reduce_%i." i + else + pp " intros n x y H1 H2 H3; rewrite spec_reduce_%i." i; + pp " unfold w%i_mod_gt." i; + pp " rewrite <- (spec_get_end%i (S n) y x); auto with zarith." i; + pp " unfold to_Z; apply (spec_mod_gt w%i_spec); auto." i; + pp " rewrite <- (spec_get_end%i (S n) y x) in H2; auto with zarith." i; + pp " rewrite <- (spec_get_end%i (S n) y x) in H3; auto with zarith." i; + if i == size then + pp " intros n x y H2 H3; rewrite spec_reduce_%i." i + else + pp " intros n x y H1 H2 H3; rewrite spec_reduce_%i." i; + pp " unfold w%i_modn1, to_Z; rewrite spec_double_eval%in." i i; + pp " apply (spec_modn1 _ _ w%i_spec); auto." i; + done; + pp " intros n m x y H1 H2; unfold mod_gtnm."; + pp " repeat rewrite spec_reduce_n."; + pp " rewrite <- (spec_cast_l n m x)."; + pp " rewrite <- (spec_cast_r n m y)."; + pp " unfold to_Z; apply (spec_mod_gt (wn_spec (Max.max n m)))."; + pp " rewrite <- (spec_cast_l n m x) in H1; auto."; + pp " rewrite <- (spec_cast_r n m y) in H1; auto."; + pp " rewrite <- (spec_cast_r n m y) in H2; auto."; + pp " Qed."; + pr ""; + + pr " Definition modulo x y := "; + pr " match compare x y with"; + pr " | Eq => zero"; + pr " | Lt => x"; + pr " | Gt => mod_gt x y"; + pr " end."; + pr ""; + + pr " Theorem spec_modulo:"; + pr " forall x y, 0 < [y] -> [modulo x y] = [x] mod [y]."; + pa " Admitted."; + pp " Proof."; + pp " assert (F0: [zero] = 0)."; + pp " exact (spec_0 w0_spec)."; + pp " assert (F1: [one] = 1)."; + pp " exact (spec_1 w0_spec)."; + pp " intros x y H; generalize (spec_compare x y);"; + pp " unfold modulo; case compare; try rewrite F0;"; + pp " try rewrite F1; intros; try split; auto with zarith."; + pp " rewrite H0; apply sym_equal; apply Z_mod_same; auto with zarith."; + pp " apply sym_equal; apply Zmod_small; auto with zarith."; + pp " generalize (spec_pos x); auto with zarith."; + pp " apply spec_mod_gt; auto."; + pp " Qed."; + pr ""; + + pr " (***************************************************************)"; + pr " (* *)"; + pr " (* Gcd *)"; + pr " (* *)"; + pr " (***************************************************************)"; + pr ""; + + pr " Definition digits x :="; + pr " match x with"; + for i = 0 to size do + pr " | %s%i _ => w%i_op.(znz_digits)" c i i; + done; + pr " | %sn n _ => (make_op n).(znz_digits)" c; + pr " end."; + pr ""; + + pr " Theorem spec_digits: forall x, 0 <= [x] < 2 ^ Zpos (digits x)."; + pa " Admitted."; + pp " Proof."; + pp " intros x; case x; clear x."; + for i = 0 to size do + pp " intros x; unfold to_Z, digits;"; + pp " generalize (spec_to_Z w%i_spec x); unfold base; intros H; exact H." i; + done; + pp " intros n x; unfold to_Z, digits;"; + pp " generalize (spec_to_Z (wn_spec n) x); unfold base; intros H; exact H."; + pp " Qed."; + pr ""; + + pr " Definition gcd_gt_body a b cont :="; + pr " match compare b zero with"; + pr " | Gt =>"; + pr " let r := mod_gt a b in"; + pr " match compare r zero with"; + pr " | Gt => cont r (mod_gt b r)"; + pr " | _ => b"; + pr " end"; + pr " | _ => a"; + pr " end."; + pr ""; + + pp " Theorem Zspec_gcd_gt_body: forall a b cont p,"; + pp " [a] > [b] -> [a] < 2 ^ p ->"; + pp " (forall a1 b1, [a1] < 2 ^ (p - 1) -> [a1] > [b1] ->"; + pp " Zis_gcd [a1] [b1] [cont a1 b1]) -> "; + pp " Zis_gcd [a] [b] [gcd_gt_body a b cont]."; + pp " Proof."; + pp " assert (F1: [zero] = 0)."; + pp " unfold zero, w_0, to_Z; rewrite (spec_0 w0_spec); auto."; + pp " intros a b cont p H2 H3 H4; unfold gcd_gt_body."; + pp " generalize (spec_compare b zero); case compare; try rewrite F1."; + pp " intros HH; rewrite HH; apply Zis_gcd_0."; + pp " intros HH; absurd (0 <= [b]); auto with zarith."; + pp " case (spec_digits b); auto with zarith."; + pp " intros H5; generalize (spec_compare (mod_gt a b) zero); "; + pp " case compare; try rewrite F1."; + pp " intros H6; rewrite <- (Zmult_1_r [b])."; + pp " rewrite (Z_div_mod_eq [a] [b]); auto with zarith."; + pp " rewrite <- spec_mod_gt; auto with zarith."; + pp " rewrite H6; rewrite Zplus_0_r."; + pp " apply Zis_gcd_mult; apply Zis_gcd_1."; + pp " intros; apply False_ind."; + pp " case (spec_digits (mod_gt a b)); auto with zarith."; + pp " intros H6; apply DoubleDiv.Zis_gcd_mod; auto with zarith."; + pp " apply DoubleDiv.Zis_gcd_mod; auto with zarith."; + pp " rewrite <- spec_mod_gt; auto with zarith."; + pp " assert (F2: [b] > [mod_gt a b])."; + pp " case (Z_mod_lt [a] [b]); auto with zarith."; + pp " repeat rewrite <- spec_mod_gt; auto with zarith."; + pp " assert (F3: [mod_gt a b] > [mod_gt b (mod_gt a b)])."; + pp " case (Z_mod_lt [b] [mod_gt a b]); auto with zarith."; + pp " rewrite <- spec_mod_gt; auto with zarith."; + pp " repeat rewrite <- spec_mod_gt; auto with zarith."; + pp " apply H4; auto with zarith."; + pp " apply Zmult_lt_reg_r with 2; auto with zarith."; + pp " apply Zle_lt_trans with ([b] + [mod_gt a b]); auto with zarith."; + pp " apply Zle_lt_trans with (([a]/[b]) * [b] + [mod_gt a b]); auto with zarith."; + pp " apply Zplus_le_compat_r."; + pp " pattern [b] at 1; rewrite <- (Zmult_1_l [b])."; + pp " apply Zmult_le_compat_r; auto with zarith."; + pp " case (Zle_lt_or_eq 0 ([a]/[b])); auto with zarith."; + pp " intros HH; rewrite (Z_div_mod_eq [a] [b]) in H2;"; + pp " try rewrite <- HH in H2; auto with zarith."; + pp " case (Z_mod_lt [a] [b]); auto with zarith."; + pp " rewrite Zmult_comm; rewrite spec_mod_gt; auto with zarith."; + pp " rewrite <- Z_div_mod_eq; auto with zarith."; + pp " pattern 2 at 2; rewrite <- (Zpower_1_r 2)."; + pp " rewrite <- Zpower_exp; auto with zarith."; + pp " ring_simplify (p - 1 + 1); auto."; + pp " case (Zle_lt_or_eq 0 p); auto with zarith."; + pp " generalize H3; case p; simpl Zpower; auto with zarith."; + pp " intros HH; generalize H3; rewrite <- HH; simpl Zpower; auto with zarith."; + pp " Qed."; + pp ""; + + pr " Fixpoint gcd_gt_aux (p:positive) (cont:t->t->t) (a b:t) {struct p} : t :="; + pr " gcd_gt_body a b"; + pr " (fun a b =>"; + pr " match p with"; + pr " | xH => cont a b"; + pr " | xO p => gcd_gt_aux p (gcd_gt_aux p cont) a b"; + pr " | xI p => gcd_gt_aux p (gcd_gt_aux p cont) a b"; + pr " end)."; + pr ""; + + pp " Theorem Zspec_gcd_gt_aux: forall p n a b cont,"; + pp " [a] > [b] -> [a] < 2 ^ (Zpos p + n) ->"; + pp " (forall a1 b1, [a1] < 2 ^ n -> [a1] > [b1] ->"; + pp " Zis_gcd [a1] [b1] [cont a1 b1]) ->"; + pp " Zis_gcd [a] [b] [gcd_gt_aux p cont a b]."; + pp " intros p; elim p; clear p."; + pp " intros p Hrec n a b cont H2 H3 H4."; + pp " unfold gcd_gt_aux; apply Zspec_gcd_gt_body with (Zpos (xI p) + n); auto."; + pp " intros a1 b1 H6 H7."; + pp " apply Hrec with (Zpos p + n); auto."; + pp " replace (Zpos p + (Zpos p + n)) with"; + pp " (Zpos (xI p) + n - 1); auto."; + pp " rewrite Zpos_xI; ring."; + pp " intros a2 b2 H9 H10."; + pp " apply Hrec with n; auto."; + pp " intros p Hrec n a b cont H2 H3 H4."; + pp " unfold gcd_gt_aux; apply Zspec_gcd_gt_body with (Zpos (xO p) + n); auto."; + pp " intros a1 b1 H6 H7."; + pp " apply Hrec with (Zpos p + n - 1); auto."; + pp " replace (Zpos p + (Zpos p + n - 1)) with"; + pp " (Zpos (xO p) + n - 1); auto."; + pp " rewrite Zpos_xO; ring."; + pp " intros a2 b2 H9 H10."; + pp " apply Hrec with (n - 1); auto."; + pp " replace (Zpos p + (n - 1)) with"; + pp " (Zpos p + n - 1); auto with zarith."; + pp " intros a3 b3 H12 H13; apply H4; auto with zarith."; + pp " apply Zlt_le_trans with (1 := H12)."; + pp " case (Zle_or_lt 1 n); intros HH."; + pp " apply Zpower_le_monotone; auto with zarith."; + pp " apply Zle_trans with 0; auto with zarith."; + pp " assert (HH1: n - 1 < 0); auto with zarith."; + pp " generalize HH1; case (n - 1); auto with zarith."; + pp " intros p1 HH2; discriminate."; + pp " intros n a b cont H H2 H3."; + pp " simpl gcd_gt_aux."; + pp " apply Zspec_gcd_gt_body with (n + 1); auto with zarith."; + pp " rewrite Zplus_comm; auto."; + pp " intros a1 b1 H5 H6; apply H3; auto."; + pp " replace n with (n + 1 - 1); auto; try ring."; + pp " Qed."; + pp ""; + + pr " Definition gcd_cont a b :="; + pr " match compare one b with"; + pr " | Eq => one"; + pr " | _ => a"; + pr " end."; + pr ""; + + pr " Definition gcd_gt a b := gcd_gt_aux (digits a) gcd_cont a b."; + pr ""; + + pr " Theorem spec_gcd_gt: forall a b,"; + pr " [a] > [b] -> [gcd_gt a b] = Zgcd [a] [b]."; + pa " Admitted."; + pp " Proof."; + pp " intros a b H2."; + pp " case (spec_digits (gcd_gt a b)); intros H3 H4."; + pp " case (spec_digits a); intros H5 H6."; + pp " apply sym_equal; apply Zis_gcd_gcd; auto with zarith."; + pp " unfold gcd_gt; apply Zspec_gcd_gt_aux with 0; auto with zarith."; + pp " intros a1 a2; rewrite Zpower_0_r."; + pp " case (spec_digits a2); intros H7 H8;"; + pp " intros; apply False_ind; auto with zarith."; + pp " Qed."; + pr ""; + + pr " Definition gcd a b :="; + pr " match compare a b with"; + pr " | Eq => a"; + pr " | Lt => gcd_gt b a"; + pr " | Gt => gcd_gt a b"; + pr " end."; + pr ""; + + pr " Theorem spec_gcd: forall a b, [gcd a b] = Zgcd [a] [b]."; + pa " Admitted."; + pp " Proof."; + pp " intros a b."; + pp " case (spec_digits a); intros H1 H2."; + pp " case (spec_digits b); intros H3 H4."; + pp " unfold gcd; generalize (spec_compare a b); case compare."; + pp " intros HH; rewrite HH; apply sym_equal; apply Zis_gcd_gcd; auto."; + pp " apply Zis_gcd_refl."; + pp " intros; apply trans_equal with (Zgcd [b] [a])."; + pp " apply spec_gcd_gt; auto with zarith."; + pp " apply Zis_gcd_gcd; auto with zarith."; + pp " apply Zgcd_is_pos."; + pp " apply Zis_gcd_sym; apply Zgcd_is_gcd."; + pp " intros; apply spec_gcd_gt; auto."; + pp " Qed."; + pr ""; + + + pr " (***************************************************************)"; + pr " (* *)"; + pr " (* Conversion *)"; + pr " (* *)"; + pr " (***************************************************************)"; + pr ""; + + pr " Definition pheight p := "; + pr " Peano.pred (nat_of_P (get_height w0_op.(znz_digits) (plength p)))."; + pr ""; + + pr " Theorem pheight_correct: forall p, "; + pr " Zpos p < 2 ^ (Zpos (znz_digits w0_op) * 2 ^ (Z_of_nat (pheight p)))."; + pr " Proof."; + pr " intros p; unfold pheight."; + pr " assert (F1: forall x, Z_of_nat (Peano.pred (nat_of_P x)) = Zpos x - 1)."; + pr " intros x."; + pr " assert (Zsucc (Z_of_nat (Peano.pred (nat_of_P x))) = Zpos x); auto with zarith."; + pr " rewrite <- inj_S."; + pr " rewrite <- (fun x => S_pred x 0); auto with zarith."; + pr " rewrite Zpos_eq_Z_of_nat_o_nat_of_P; auto."; + pr " apply lt_le_trans with 1%snat; auto with zarith." "%"; + pr " exact (le_Pmult_nat x 1)."; + pr " rewrite F1; clear F1."; + pr " assert (F2:= (get_height_correct (znz_digits w0_op) (plength p)))."; + pr " apply Zlt_le_trans with (Zpos (Psucc p))."; + pr " rewrite Zpos_succ_morphism; auto with zarith."; + pr " apply Zle_trans with (1 := plength_pred_correct (Psucc p))."; + pr " rewrite Ppred_succ."; + pr " apply Zpower_le_monotone; auto with zarith."; + pr " Qed."; + pr ""; + + pr " Definition of_pos x :="; + pr " let h := pheight x in"; + pr " match h with"; + for i = 0 to size do + pr " | %i%snat => reduce_%i (snd (w%i_op.(znz_of_pos) x))" i "%" i i; + done; + pr " | _ =>"; + pr " let n := minus h %i in" (size + 1); + pr " reduce_n n (snd ((make_op n).(znz_of_pos) x))"; + pr " end."; + pr ""; + + pr " Theorem spec_of_pos: forall x,"; + pr " [of_pos x] = Zpos x."; + pa " Admitted."; + pp " Proof."; + pp " assert (F := spec_more_than_1_digit w0_spec)."; + pp " intros x; unfold of_pos; case_eq (pheight x)."; + for i = 0 to size do + if i <> 0 then + pp " intros n; case n; clear n."; + pp " intros H1; rewrite spec_reduce_%i; unfold to_Z." i; + pp " apply (znz_of_pos_correct w%i_spec)." i; + pp " apply Zlt_le_trans with (1 := pheight_correct x)."; + pp " rewrite H1; simpl Z_of_nat; change (2^%i) with (%s)." i (gen2 i); + pp " unfold base."; + pp " apply Zpower_le_monotone; split; auto with zarith."; + if i <> 0 then + begin + pp " rewrite Zmult_comm; repeat rewrite <- Zmult_assoc."; + pp " repeat rewrite <- Zpos_xO."; + pp " refine (Zle_refl _)."; + end; + done; + pp " intros n."; + pp " intros H1; rewrite spec_reduce_n; unfold to_Z."; + pp " simpl minus; rewrite <- minus_n_O."; + pp " apply (znz_of_pos_correct (wn_spec n))."; + pp " apply Zlt_le_trans with (1 := pheight_correct x)."; + pp " unfold base."; + pp " apply Zpower_le_monotone; auto with zarith."; + pp " split; auto with zarith."; + pp " rewrite H1."; + pp " elim n; clear n H1."; + pp " simpl Z_of_nat; change (2^%i) with (%s)." (size + 1) (gen2 (size + 1)); + pp " rewrite Zmult_comm; repeat rewrite <- Zmult_assoc."; + pp " repeat rewrite <- Zpos_xO."; + pp " refine (Zle_refl _)."; + pp " intros n Hrec."; + pp " rewrite make_op_S."; + pp " change (@znz_digits (word _ (S (S n))) (mk_zn2z_op_karatsuba (make_op n))) with"; + pp " (xO (znz_digits (make_op n)))."; + pp " rewrite (fun x y => (Zpos_xO (@znz_digits x y)))."; + pp " rewrite inj_S; unfold Zsucc."; + pp " rewrite Zplus_comm; rewrite Zpower_exp; auto with zarith."; + pp " rewrite Zpower_1_r."; + pp " assert (tmp: forall x y z, x * (y * z) = y * (x * z));"; + pp " [intros; ring | rewrite tmp; clear tmp]."; + pp " apply Zmult_le_compat_l; auto with zarith."; + pp " Qed."; + pr ""; + + pr " Definition of_N x :="; + pr " match x with"; + pr " | BinNat.N0 => zero"; + pr " | Npos p => of_pos p"; + pr " end."; + pr ""; + + pr " Theorem spec_of_N: forall x,"; + pr " [of_N x] = Z_of_N x."; + pa " Admitted."; + pp " Proof."; + pp " intros x; case x."; + pp " simpl of_N."; + pp " unfold zero, w_0, to_Z; rewrite (spec_0 w0_spec); auto."; + pp " intros p; exact (spec_of_pos p)."; + pp " Qed."; + pr ""; + + pr " (***************************************************************)"; + pr " (* *)"; + pr " (* Shift *)"; + pr " (* *)"; + pr " (***************************************************************)"; + pr ""; + + (* Head0 *) + pr " Definition head0 w := match w with"; + for i = 0 to size do + pr " | %s%i w=> reduce_%i (w%i_op.(znz_head0) w)" c i i i; + done; + pr " | %sn n w=> reduce_n n ((make_op n).(znz_head0) w)" c; + pr " end."; + pr ""; + + pr " Theorem spec_head00: forall x, [x] = 0 ->[head0 x] = Zpos (digits x)."; + pa " Admitted."; + pp " Proof."; + pp " intros x; case x; unfold head0; clear x."; + for i = 0 to size do + pp " intros x; rewrite spec_reduce_%i; exact (spec_head00 w%i_spec x)." i i; + done; + pp " intros n x; rewrite spec_reduce_n; exact (spec_head00 (wn_spec n) x)."; + pp " Qed."; + pr " "; + + pr " Theorem spec_head0: forall x, 0 < [x] ->"; + pr " 2 ^ (Zpos (digits x) - 1) <= 2 ^ [head0 x] * [x] < 2 ^ Zpos (digits x)."; + pa " Admitted."; + pp " Proof."; + pp " assert (F0: forall x, (x - 1) + 1 = x)."; + pp " intros; ring. "; + pp " intros x; case x; unfold digits, head0; clear x."; + for i = 0 to size do + pp " intros x Hx; rewrite spec_reduce_%i." i; + pp " assert (F1:= spec_more_than_1_digit w%i_spec)." i; + pp " generalize (spec_head0 w%i_spec x Hx)." i; + pp " unfold base."; + pp " pattern (Zpos (znz_digits w%i_op)) at 1; " i; + pp " rewrite <- (fun x => (F0 (Zpos x)))."; + pp " rewrite Zpower_exp; auto with zarith."; + pp " rewrite Zpower_1_r; rewrite Z_div_mult; auto with zarith."; + done; + pp " intros n x Hx; rewrite spec_reduce_n."; + pp " assert (F1:= spec_more_than_1_digit (wn_spec n))."; + pp " generalize (spec_head0 (wn_spec n) x Hx)."; + pp " unfold base."; + pp " pattern (Zpos (znz_digits (make_op n))) at 1; "; + pp " rewrite <- (fun x => (F0 (Zpos x)))."; + pp " rewrite Zpower_exp; auto with zarith."; + pp " rewrite Zpower_1_r; rewrite Z_div_mult; auto with zarith."; + pp " Qed."; + pr ""; + + + (* Tail0 *) + pr " Definition tail0 w := match w with"; + for i = 0 to size do + pr " | %s%i w=> reduce_%i (w%i_op.(znz_tail0) w)" c i i i; + done; + pr " | %sn n w=> reduce_n n ((make_op n).(znz_tail0) w)" c; + pr " end."; + pr ""; + + + pr " Theorem spec_tail00: forall x, [x] = 0 ->[tail0 x] = Zpos (digits x)."; + pa " Admitted."; + pp " Proof."; + pp " intros x; case x; unfold tail0; clear x."; + for i = 0 to size do + pp " intros x; rewrite spec_reduce_%i; exact (spec_tail00 w%i_spec x)." i i; + done; + pp " intros n x; rewrite spec_reduce_n; exact (spec_tail00 (wn_spec n) x)."; + pp " Qed."; + pr " "; + + + pr " Theorem spec_tail0: forall x,"; + pr " 0 < [x] -> exists y, 0 <= y /\\ [x] = (2 * y + 1) * 2 ^ [tail0 x]."; + pa " Admitted."; + pp " Proof."; + pp " intros x; case x; clear x; unfold tail0."; + for i = 0 to size do + pp " intros x Hx; rewrite spec_reduce_%i; exact (spec_tail0 w%i_spec x Hx)." i i; + done; + pp " intros n x Hx; rewrite spec_reduce_n; exact (spec_tail0 (wn_spec n) x Hx)."; + pp " Qed."; + pr ""; + + + (* Number of digits *) + pr " Definition %sdigits x :=" c; + pr " match x with"; + pr " | %s0 _ => %s0 w0_op.(znz_zdigits)" c c; + for i = 1 to size do + pr " | %s%i _ => reduce_%i w%i_op.(znz_zdigits)" c i i i; + done; + pr " | %sn n _ => reduce_n n (make_op n).(znz_zdigits)" c; + pr " end."; + pr ""; + + pr " Theorem spec_Ndigits: forall x, [Ndigits x] = Zpos (digits x)."; + pa " Admitted."; + pp " Proof."; + pp " intros x; case x; clear x; unfold Ndigits, digits."; + for i = 0 to size do + pp " intros _; try rewrite spec_reduce_%i; exact (spec_zdigits w%i_spec)." i i; + done; + pp " intros n _; try rewrite spec_reduce_n; exact (spec_zdigits (wn_spec n))."; + pp " Qed."; + pr ""; + + + (* Shiftr *) + for i = 0 to size do + pr " Definition shiftr%i n x := w%i_op.(znz_add_mul_div) (w%i_op.(znz_sub) w%i_op.(znz_zdigits) n) w%i_op.(znz_0) x." i i i i i; + done; + pr " Definition shiftrn n p x := (make_op n).(znz_add_mul_div) ((make_op n).(znz_sub) (make_op n).(znz_zdigits) p) (make_op n).(znz_0) x."; + pr ""; + + pr " Definition shiftr := Eval lazy beta delta [same_level] in "; + pr " same_level _ (fun n x => %s0 (shiftr0 n x))" c; + for i = 1 to size do + pr " (fun n x => reduce_%i (shiftr%i n x))" i i; + done; + pr " (fun n p x => reduce_n n (shiftrn n p x))."; + pr ""; + + + pr " Theorem spec_shiftr: forall n x,"; + pr " [n] <= [Ndigits x] -> [shiftr n x] = [x] / 2 ^ [n]."; + pa " Admitted."; + pp " Proof."; + pp " assert (F0: forall x y, x - (x - y) = y)."; + pp " intros; ring."; + pp " assert (F2: forall x y z, 0 <= x -> 0 <= y -> x < z -> 0 <= x / 2 ^ y < z)."; + pp " intros x y z HH HH1 HH2."; + pp " split; auto with zarith."; + pp " apply Zle_lt_trans with (2 := HH2); auto with zarith."; + pp " apply Zdiv_le_upper_bound; auto with zarith."; + pp " pattern x at 1; replace x with (x * 2 ^ 0); auto with zarith."; + pp " apply Zmult_le_compat_l; auto."; + pp " apply Zpower_le_monotone; auto with zarith."; + pp " rewrite Zpower_0_r; ring."; + pp " assert (F3: forall x y, 0 <= y -> y <= x -> 0 <= x - y < 2 ^ x)."; + pp " intros xx y HH HH1."; + pp " split; auto with zarith."; + pp " apply Zle_lt_trans with xx; auto with zarith."; + pp " apply Zpower2_lt_lin; auto with zarith."; + pp " assert (F4: forall ww ww1 ww2 "; + pp " (ww_op: znz_op ww) (ww1_op: znz_op ww1) (ww2_op: znz_op ww2)"; + pp " xx yy xx1 yy1,"; + pp " znz_to_Z ww2_op yy <= znz_to_Z ww1_op (znz_zdigits ww1_op) ->"; + pp " znz_to_Z ww1_op (znz_zdigits ww1_op) <= znz_to_Z ww_op (znz_zdigits ww_op) ->"; + pp " znz_spec ww_op -> znz_spec ww1_op -> znz_spec ww2_op ->"; + pp " znz_to_Z ww_op xx1 = znz_to_Z ww1_op xx ->"; + pp " znz_to_Z ww_op yy1 = znz_to_Z ww2_op yy ->"; + pp " znz_to_Z ww_op"; + pp " (znz_add_mul_div ww_op (znz_sub ww_op (znz_zdigits ww_op) yy1)"; + pp " (znz_0 ww_op) xx1) = znz_to_Z ww1_op xx / 2 ^ znz_to_Z ww2_op yy)."; + pp " intros ww ww1 ww2 ww_op ww1_op ww2_op xx yy xx1 yy1 Hl Hl1 Hw Hw1 Hw2 Hx Hy."; + pp " case (spec_to_Z Hw xx1); auto with zarith; intros HH1 HH2."; + pp " case (spec_to_Z Hw yy1); auto with zarith; intros HH3 HH4."; + pp " rewrite <- Hx."; + pp " rewrite <- Hy."; + pp " generalize (spec_add_mul_div Hw"; + pp " (znz_0 ww_op) xx1"; + pp " (znz_sub ww_op (znz_zdigits ww_op) "; + pp " yy1)"; + pp " )."; + pp " rewrite (spec_0 Hw)."; + pp " rewrite Zmult_0_l; rewrite Zplus_0_l."; + pp " rewrite (CyclicAxioms.spec_sub Hw)."; + pp " rewrite Zmod_small; auto with zarith."; + pp " rewrite (spec_zdigits Hw)."; + pp " rewrite F0."; + pp " rewrite Zmod_small; auto with zarith."; + pp " unfold base; rewrite (spec_zdigits Hw) in Hl1 |- *;"; + pp " auto with zarith."; + pp " assert (F5: forall n m, (n <= m)%snat ->" "%"; + pp " Zpos (znz_digits (make_op n)) <= Zpos (znz_digits (make_op m)))."; + pp " intros n m HH; elim HH; clear m HH; auto with zarith."; + pp " intros m HH Hrec; apply Zle_trans with (1 := Hrec)."; + pp " rewrite make_op_S."; + pp " match goal with |- Zpos ?Y <= ?X => change X with (Zpos (xO Y)) end."; + pp " rewrite Zpos_xO."; + pp " assert (0 <= Zpos (znz_digits (make_op n))); auto with zarith."; + pp " assert (F6: forall n, Zpos (znz_digits w%i_op) <= Zpos (znz_digits (make_op n)))." size; + pp " intros n ; apply Zle_trans with (Zpos (znz_digits (make_op 0)))."; + pp " change (znz_digits (make_op 0)) with (xO (znz_digits w%i_op))." size; + pp " rewrite Zpos_xO."; + pp " assert (0 <= Zpos (znz_digits w%i_op)); auto with zarith." size; + pp " apply F5; auto with arith."; + pp " intros x; case x; clear x; unfold shiftr, same_level."; + for i = 0 to size do + pp " intros x y; case y; clear y."; + for j = 0 to i - 1 do + pp " intros y; unfold shiftr%i, Ndigits." i; + pp " repeat rewrite spec_reduce_%i; repeat rewrite spec_reduce_%i; unfold to_Z; intros H1." i j; + pp " apply F4 with (3:=w%i_spec)(4:=w%i_spec)(5:=w%i_spec); auto with zarith." i j i; + pp " rewrite (spec_zdigits w%i_spec)." i; + pp " rewrite (spec_zdigits w%i_spec)." j; + pp " change (znz_digits w%i_op) with %s." i (genxO (i - j) (" (znz_digits w"^(string_of_int j)^"_op)")); + pp " repeat rewrite (fun x => Zpos_xO (xO x))."; + pp " repeat rewrite (fun x y => Zpos_xO (@znz_digits x y))."; + pp " assert (0 <= Zpos (znz_digits w%i_op)); auto with zarith." j; + pp " try (apply sym_equal; exact (spec_extend%in%i y))." j i; + + done; + pp " intros y; unfold shiftr%i, Ndigits." i; + pp " repeat rewrite spec_reduce_%i; unfold to_Z; intros H1." i; + pp " apply F4 with (3:=w%i_spec)(4:=w%i_spec)(5:=w%i_spec); auto with zarith." i i i; + for j = i + 1 to size do + pp " intros y; unfold shiftr%i, Ndigits." j; + pp " repeat rewrite spec_reduce_%i; repeat rewrite spec_reduce_%i; unfold to_Z; intros H1." i j; + pp " apply F4 with (3:=w%i_spec)(4:=w%i_spec)(5:=w%i_spec); auto with zarith." j j i; + pp " try (apply sym_equal; exact (spec_extend%in%i x))." i j; + done; + if i == size then + begin + pp " intros m y; unfold shiftrn, Ndigits."; + pp " repeat rewrite spec_reduce_n; unfold to_Z; intros H1."; + pp " apply F4 with (3:=(wn_spec m))(4:=wn_spec m)(5:=w%i_spec); auto with zarith." size; + pp " try (apply sym_equal; exact (spec_extend%in m x))." size; + end + else + begin + pp " intros m y; unfold shiftrn, Ndigits."; + pp " repeat rewrite spec_reduce_n; unfold to_Z; intros H1."; + pp " apply F4 with (3:=(wn_spec m))(4:=wn_spec m)(5:=w%i_spec); auto with zarith." i; + pp " change ([Nn m (extend%i m (extend%i %i x))] = [N%i x])." size i (size - i - 1) i; + pp " rewrite <- (spec_extend%in m); rewrite <- spec_extend%in%i; auto." size i size; + end + done; + pp " intros n x y; case y; clear y;"; + pp " intros y; unfold shiftrn, Ndigits; try rewrite spec_reduce_n."; + for i = 0 to size do + pp " try rewrite spec_reduce_%i; unfold to_Z; intros H1." i; + pp " apply F4 with (3:=(wn_spec n))(4:=w%i_spec)(5:=wn_spec n); auto with zarith." i; + pp " rewrite (spec_zdigits w%i_spec)." i; + pp " rewrite (spec_zdigits (wn_spec n))."; + pp " apply Zle_trans with (2 := F6 n)."; + pp " change (znz_digits w%i_op) with %s." size (genxO (size - i) ("(znz_digits w" ^ (string_of_int i) ^ "_op)")); + pp " repeat rewrite (fun x => Zpos_xO (xO x))."; + pp " repeat rewrite (fun x y => Zpos_xO (@znz_digits x y))."; + pp " assert (H: 0 <= Zpos (znz_digits w%i_op)); auto with zarith." i; + if i == size then + pp " change ([Nn n (extend%i n y)] = [N%i y])." size i + else + pp " change ([Nn n (extend%i n (extend%i %i y))] = [N%i y])." size i (size - i - 1) i; + pp " rewrite <- (spec_extend%in n); auto." size; + if i <> size then + pp " try (rewrite <- spec_extend%in%i; auto)." i size; + done; + pp " generalize y; clear y; intros m y."; + pp " rewrite spec_reduce_n; unfold to_Z; intros H1."; + pp " apply F4 with (3:=(wn_spec (Max.max n m)))(4:=wn_spec m)(5:=wn_spec n); auto with zarith."; + pp " rewrite (spec_zdigits (wn_spec m))."; + pp " rewrite (spec_zdigits (wn_spec (Max.max n m)))."; + pp " apply F5; auto with arith."; + pp " exact (spec_cast_r n m y)."; + pp " exact (spec_cast_l n m x)."; + pp " Qed."; + pr ""; + + pr " Definition safe_shiftr n x := "; + pr " match compare n (Ndigits x) with"; + pr " | Lt => shiftr n x "; + pr " | _ => %s0 w_0" c; + pr " end."; + pr ""; + + + pr " Theorem spec_safe_shiftr: forall n x,"; + pr " [safe_shiftr n x] = [x] / 2 ^ [n]."; + pa " Admitted."; + pp " Proof."; + pp " intros n x; unfold safe_shiftr;"; + pp " generalize (spec_compare n (Ndigits x)); case compare; intros H."; + pp " apply trans_equal with (1 := spec_0 w0_spec)."; + pp " apply sym_equal; apply Zdiv_small; rewrite H."; + pp " rewrite spec_Ndigits; exact (spec_digits x)."; + pp " rewrite <- spec_shiftr; auto with zarith."; + pp " apply trans_equal with (1 := spec_0 w0_spec)."; + pp " apply sym_equal; apply Zdiv_small."; + pp " rewrite spec_Ndigits in H; case (spec_digits x); intros H1 H2."; + pp " split; auto."; + pp " apply Zlt_le_trans with (1 := H2)."; + pp " apply Zpower_le_monotone; auto with zarith."; + pp " Qed."; + pr ""; + + pr ""; + + (* Shiftl *) + for i = 0 to size do + pr " Definition shiftl%i n x := w%i_op.(znz_add_mul_div) n x w%i_op.(znz_0)." i i i + done; + pr " Definition shiftln n p x := (make_op n).(znz_add_mul_div) p x (make_op n).(znz_0)."; + pr " Definition shiftl := Eval lazy beta delta [same_level] in"; + pr " same_level _ (fun n x => %s0 (shiftl0 n x))" c; + for i = 1 to size do + pr " (fun n x => reduce_%i (shiftl%i n x))" i i; + done; + pr " (fun n p x => reduce_n n (shiftln n p x))."; + pr ""; + pr ""; + + + pr " Theorem spec_shiftl: forall n x,"; + pr " [n] <= [head0 x] -> [shiftl n x] = [x] * 2 ^ [n]."; + pa " Admitted."; + pp " Proof."; + pp " assert (F0: forall x y, x - (x - y) = y)."; + pp " intros; ring."; + pp " assert (F2: forall x y z, 0 <= x -> 0 <= y -> x < z -> 0 <= x / 2 ^ y < z)."; + pp " intros x y z HH HH1 HH2."; + pp " split; auto with zarith."; + pp " apply Zle_lt_trans with (2 := HH2); auto with zarith."; + pp " apply Zdiv_le_upper_bound; auto with zarith."; + pp " pattern x at 1; replace x with (x * 2 ^ 0); auto with zarith."; + pp " apply Zmult_le_compat_l; auto."; + pp " apply Zpower_le_monotone; auto with zarith."; + pp " rewrite Zpower_0_r; ring."; + pp " assert (F3: forall x y, 0 <= y -> y <= x -> 0 <= x - y < 2 ^ x)."; + pp " intros xx y HH HH1."; + pp " split; auto with zarith."; + pp " apply Zle_lt_trans with xx; auto with zarith."; + pp " apply Zpower2_lt_lin; auto with zarith."; + pp " assert (F4: forall ww ww1 ww2 "; + pp " (ww_op: znz_op ww) (ww1_op: znz_op ww1) (ww2_op: znz_op ww2)"; + pp " xx yy xx1 yy1,"; + pp " znz_to_Z ww2_op yy <= znz_to_Z ww1_op (znz_head0 ww1_op xx) ->"; + pp " znz_to_Z ww1_op (znz_zdigits ww1_op) <= znz_to_Z ww_op (znz_zdigits ww_op) ->"; + pp " znz_spec ww_op -> znz_spec ww1_op -> znz_spec ww2_op ->"; + pp " znz_to_Z ww_op xx1 = znz_to_Z ww1_op xx ->"; + pp " znz_to_Z ww_op yy1 = znz_to_Z ww2_op yy ->"; + pp " znz_to_Z ww_op"; + pp " (znz_add_mul_div ww_op yy1"; + pp " xx1 (znz_0 ww_op)) = znz_to_Z ww1_op xx * 2 ^ znz_to_Z ww2_op yy)."; + pp " intros ww ww1 ww2 ww_op ww1_op ww2_op xx yy xx1 yy1 Hl Hl1 Hw Hw1 Hw2 Hx Hy."; + pp " case (spec_to_Z Hw xx1); auto with zarith; intros HH1 HH2."; + pp " case (spec_to_Z Hw yy1); auto with zarith; intros HH3 HH4."; + pp " rewrite <- Hx."; + pp " rewrite <- Hy."; + pp " generalize (spec_add_mul_div Hw xx1 (znz_0 ww_op) yy1)."; + pp " rewrite (spec_0 Hw)."; + pp " assert (F1: znz_to_Z ww1_op (znz_head0 ww1_op xx) <= Zpos (znz_digits ww1_op))."; + pp " case (Zle_lt_or_eq _ _ HH1); intros HH5."; + pp " apply Zlt_le_weak."; + pp " case (CyclicAxioms.spec_head0 Hw1 xx)."; + pp " rewrite <- Hx; auto."; + pp " intros _ Hu; unfold base in Hu."; + pp " case (Zle_or_lt (Zpos (znz_digits ww1_op))"; + pp " (znz_to_Z ww1_op (znz_head0 ww1_op xx))); auto; intros H1."; + pp " absurd (2 ^ (Zpos (znz_digits ww1_op)) <= 2 ^ (znz_to_Z ww1_op (znz_head0 ww1_op xx)))."; + pp " apply Zlt_not_le."; + pp " case (spec_to_Z Hw1 xx); intros HHx3 HHx4."; + pp " rewrite <- (Zmult_1_r (2 ^ znz_to_Z ww1_op (znz_head0 ww1_op xx)))."; + pp " apply Zle_lt_trans with (2 := Hu)."; + pp " apply Zmult_le_compat_l; auto with zarith."; + pp " apply Zpower_le_monotone; auto with zarith."; + pp " rewrite (CyclicAxioms.spec_head00 Hw1 xx); auto with zarith."; + pp " rewrite Zdiv_0_l; auto with zarith."; + pp " rewrite Zplus_0_r."; + pp " case (Zle_lt_or_eq _ _ HH1); intros HH5."; + pp " rewrite Zmod_small; auto with zarith."; + pp " intros HH; apply HH."; + pp " rewrite Hy; apply Zle_trans with (1:= Hl)."; + pp " rewrite <- (spec_zdigits Hw). "; + pp " apply Zle_trans with (2 := Hl1); auto."; + pp " rewrite (spec_zdigits Hw1); auto with zarith."; + pp " split; auto with zarith ."; + pp " apply Zlt_le_trans with (base (znz_digits ww1_op))."; + pp " rewrite Hx."; + pp " case (CyclicAxioms.spec_head0 Hw1 xx); auto."; + pp " rewrite <- Hx; auto."; + pp " intros _ Hu; rewrite Zmult_comm in Hu."; + pp " apply Zle_lt_trans with (2 := Hu)."; + pp " apply Zmult_le_compat_l; auto with zarith."; + pp " apply Zpower_le_monotone; auto with zarith."; + pp " unfold base; apply Zpower_le_monotone; auto with zarith."; + pp " split; auto with zarith."; + pp " rewrite <- (spec_zdigits Hw); auto with zarith."; + pp " rewrite <- (spec_zdigits Hw1); auto with zarith."; + pp " rewrite <- HH5."; + pp " rewrite Zmult_0_l."; + pp " rewrite Zmod_small; auto with zarith."; + pp " intros HH; apply HH."; + pp " rewrite Hy; apply Zle_trans with (1 := Hl)."; + pp " rewrite (CyclicAxioms.spec_head00 Hw1 xx); auto with zarith."; + pp " rewrite <- (spec_zdigits Hw); auto with zarith."; + pp " rewrite <- (spec_zdigits Hw1); auto with zarith."; + pp " assert (F5: forall n m, (n <= m)%snat ->" "%"; + pp " Zpos (znz_digits (make_op n)) <= Zpos (znz_digits (make_op m)))."; + pp " intros n m HH; elim HH; clear m HH; auto with zarith."; + pp " intros m HH Hrec; apply Zle_trans with (1 := Hrec)."; + pp " rewrite make_op_S."; + pp " match goal with |- Zpos ?Y <= ?X => change X with (Zpos (xO Y)) end."; + pp " rewrite Zpos_xO."; + pp " assert (0 <= Zpos (znz_digits (make_op n))); auto with zarith."; + pp " assert (F6: forall n, Zpos (znz_digits w%i_op) <= Zpos (znz_digits (make_op n)))." size; + pp " intros n ; apply Zle_trans with (Zpos (znz_digits (make_op 0)))."; + pp " change (znz_digits (make_op 0)) with (xO (znz_digits w%i_op))." size; + pp " rewrite Zpos_xO."; + pp " assert (0 <= Zpos (znz_digits w%i_op)); auto with zarith." size; + pp " apply F5; auto with arith."; + pp " intros x; case x; clear x; unfold shiftl, same_level."; + for i = 0 to size do + pp " intros x y; case y; clear y."; + for j = 0 to i - 1 do + pp " intros y; unfold shiftl%i, head0." i; + pp " repeat rewrite spec_reduce_%i; repeat rewrite spec_reduce_%i; unfold to_Z; intros H1." i j; + pp " apply F4 with (3:=w%i_spec)(4:=w%i_spec)(5:=w%i_spec); auto with zarith." i j i; + pp " rewrite (spec_zdigits w%i_spec)." i; + pp " rewrite (spec_zdigits w%i_spec)." j; + pp " change (znz_digits w%i_op) with %s." i (genxO (i - j) (" (znz_digits w"^(string_of_int j)^"_op)")); + pp " repeat rewrite (fun x => Zpos_xO (xO x))."; + pp " repeat rewrite (fun x y => Zpos_xO (@znz_digits x y))."; + pp " assert (0 <= Zpos (znz_digits w%i_op)); auto with zarith." j; + pp " try (apply sym_equal; exact (spec_extend%in%i y))." j i; + done; + pp " intros y; unfold shiftl%i, head0." i; + pp " repeat rewrite spec_reduce_%i; unfold to_Z; intros H1." i; + pp " apply F4 with (3:=w%i_spec)(4:=w%i_spec)(5:=w%i_spec); auto with zarith." i i i; + for j = i + 1 to size do + pp " intros y; unfold shiftl%i, head0." j; + pp " repeat rewrite spec_reduce_%i; repeat rewrite spec_reduce_%i; unfold to_Z; intros H1." i j; + pp " apply F4 with (3:=w%i_spec)(4:=w%i_spec)(5:=w%i_spec); auto with zarith." j j i; + pp " try (apply sym_equal; exact (spec_extend%in%i x))." i j; + done; + if i == size then + begin + pp " intros m y; unfold shiftln, head0."; + pp " repeat rewrite spec_reduce_n; unfold to_Z; intros H1."; + pp " apply F4 with (3:=(wn_spec m))(4:=wn_spec m)(5:=w%i_spec); auto with zarith." size; + pp " try (apply sym_equal; exact (spec_extend%in m x))." size; + end + else + begin + pp " intros m y; unfold shiftln, head0."; + pp " repeat rewrite spec_reduce_n; unfold to_Z; intros H1."; + pp " apply F4 with (3:=(wn_spec m))(4:=wn_spec m)(5:=w%i_spec); auto with zarith." i; + pp " change ([Nn m (extend%i m (extend%i %i x))] = [N%i x])." size i (size - i - 1) i; + pp " rewrite <- (spec_extend%in m); rewrite <- spec_extend%in%i; auto." size i size; + end + done; + pp " intros n x y; case y; clear y;"; + pp " intros y; unfold shiftln, head0; try rewrite spec_reduce_n."; + for i = 0 to size do + pp " try rewrite spec_reduce_%i; unfold to_Z; intros H1." i; + pp " apply F4 with (3:=(wn_spec n))(4:=w%i_spec)(5:=wn_spec n); auto with zarith." i; + pp " rewrite (spec_zdigits w%i_spec)." i; + pp " rewrite (spec_zdigits (wn_spec n))."; + pp " apply Zle_trans with (2 := F6 n)."; + pp " change (znz_digits w%i_op) with %s." size (genxO (size - i) ("(znz_digits w" ^ (string_of_int i) ^ "_op)")); + pp " repeat rewrite (fun x => Zpos_xO (xO x))."; + pp " repeat rewrite (fun x y => Zpos_xO (@znz_digits x y))."; + pp " assert (H: 0 <= Zpos (znz_digits w%i_op)); auto with zarith." i; + if i == size then + pp " change ([Nn n (extend%i n y)] = [N%i y])." size i + else + pp " change ([Nn n (extend%i n (extend%i %i y))] = [N%i y])." size i (size - i - 1) i; + pp " rewrite <- (spec_extend%in n); auto." size; + if i <> size then + pp " try (rewrite <- spec_extend%in%i; auto)." i size; + done; + pp " generalize y; clear y; intros m y."; + pp " repeat rewrite spec_reduce_n; unfold to_Z; intros H1."; + pp " apply F4 with (3:=(wn_spec (Max.max n m)))(4:=wn_spec m)(5:=wn_spec n); auto with zarith."; + pp " rewrite (spec_zdigits (wn_spec m))."; + pp " rewrite (spec_zdigits (wn_spec (Max.max n m)))."; + pp " apply F5; auto with arith."; + pp " exact (spec_cast_r n m y)."; + pp " exact (spec_cast_l n m x)."; + pp " Qed."; + pr ""; + + (* Double size *) + pr " Definition double_size w := match w with"; + for i = 0 to size-1 do + pr " | %s%i x => %s%i (WW (znz_0 w%i_op) x)" c i c (i + 1) i; + done; + pr " | %s%i x => %sn 0 (WW (znz_0 w%i_op) x)" c size c size; + pr " | %sn n x => %sn (S n) (WW (znz_0 (make_op n)) x)" c c; + pr " end."; + pr ""; + + pr " Theorem spec_double_size_digits: "; + pr " forall x, digits (double_size x) = xO (digits x)."; + pa " Admitted."; + pp " Proof."; + pp " intros x; case x; unfold double_size, digits; clear x; auto."; + pp " intros n x; rewrite make_op_S; auto."; + pp " Qed."; + pr ""; + + + pr " Theorem spec_double_size: forall x, [double_size x] = [x]."; + pa " Admitted."; + pp " Proof."; + pp " intros x; case x; unfold double_size; clear x."; + for i = 0 to size do + pp " intros x; unfold to_Z, make_op; "; + pp " rewrite znz_to_Z_%i; rewrite (spec_0 w%i_spec); auto with zarith." (i + 1) i; + done; + pp " intros n x; unfold to_Z;"; + pp " generalize (znz_to_Z_n n); simpl word."; + pp " intros HH; rewrite HH; clear HH."; + pp " generalize (spec_0 (wn_spec n)); simpl word."; + pp " intros HH; rewrite HH; clear HH; auto with zarith."; + pp " Qed."; + pr ""; + + + pr " Theorem spec_double_size_head0: "; + pr " forall x, 2 * [head0 x] <= [head0 (double_size x)]."; + pa " Admitted."; + pp " Proof."; + pp " intros x."; + pp " assert (F1:= spec_pos (head0 x))."; + pp " assert (F2: 0 < Zpos (digits x))."; + pp " red; auto."; + pp " case (Zle_lt_or_eq _ _ (spec_pos x)); intros HH."; + pp " generalize HH; rewrite <- (spec_double_size x); intros HH1."; + pp " case (spec_head0 x HH); intros _ HH2."; + pp " case (spec_head0 _ HH1)."; + pp " rewrite (spec_double_size x); rewrite (spec_double_size_digits x)."; + pp " intros HH3 _."; + pp " case (Zle_or_lt ([head0 (double_size x)]) (2 * [head0 x])); auto; intros HH4."; + pp " absurd (2 ^ (2 * [head0 x] )* [x] < 2 ^ [head0 (double_size x)] * [x]); auto."; + pp " apply Zle_not_lt."; + pp " apply Zmult_le_compat_r; auto with zarith."; + pp " apply Zpower_le_monotone; auto; auto with zarith."; + pp " generalize (spec_pos (head0 (double_size x))); auto with zarith."; + pp " assert (HH5: 2 ^[head0 x] <= 2 ^(Zpos (digits x) - 1))."; + pp " case (Zle_lt_or_eq 1 [x]); auto with zarith; intros HH5."; + pp " apply Zmult_le_reg_r with (2 ^ 1); auto with zarith."; + pp " rewrite <- (fun x y z => Zpower_exp x (y - z)); auto with zarith."; + pp " assert (tmp: forall x, x - 1 + 1 = x); [intros; ring | rewrite tmp; clear tmp]."; + pp " apply Zle_trans with (2 := Zlt_le_weak _ _ HH2)."; + pp " apply Zmult_le_compat_l; auto with zarith."; + pp " rewrite Zpower_1_r; auto with zarith."; + pp " apply Zpower_le_monotone; auto with zarith."; + pp " split; auto with zarith. "; + pp " case (Zle_or_lt (Zpos (digits x)) [head0 x]); auto with zarith; intros HH6."; + pp " absurd (2 ^ Zpos (digits x) <= 2 ^ [head0 x] * [x]); auto with zarith."; + pp " rewrite <- HH5; rewrite Zmult_1_r."; + pp " apply Zpower_le_monotone; auto with zarith."; + pp " rewrite (Zmult_comm 2)."; + pp " rewrite Zpower_mult; auto with zarith."; + pp " rewrite Zpower_2."; + pp " apply Zlt_le_trans with (2 := HH3)."; + pp " rewrite <- Zmult_assoc."; + pp " replace (Zpos (xO (digits x)) - 1) with"; + pp " ((Zpos (digits x) - 1) + (Zpos (digits x)))."; + pp " rewrite Zpower_exp; auto with zarith."; + pp " apply Zmult_lt_compat2; auto with zarith."; + pp " split; auto with zarith."; + pp " apply Zmult_lt_0_compat; auto with zarith."; + pp " rewrite Zpos_xO; ring."; + pp " apply Zlt_le_weak; auto."; + pp " repeat rewrite spec_head00; auto."; + pp " rewrite spec_double_size_digits."; + pp " rewrite Zpos_xO; auto with zarith."; + pp " rewrite spec_double_size; auto."; + pp " Qed."; + pr ""; + + pr " Theorem spec_double_size_head0_pos: "; + pr " forall x, 0 < [head0 (double_size x)]."; + pa " Admitted."; + pp " Proof."; + pp " intros x."; + pp " assert (F: 0 < Zpos (digits x))."; + pp " red; auto."; + pp " case (Zle_lt_or_eq _ _ (spec_pos (head0 (double_size x)))); auto; intros F0."; + pp " case (Zle_lt_or_eq _ _ (spec_pos (head0 x))); intros F1."; + pp " apply Zlt_le_trans with (2 := (spec_double_size_head0 x)); auto with zarith."; + pp " case (Zle_lt_or_eq _ _ (spec_pos x)); intros F3."; + pp " generalize F3; rewrite <- (spec_double_size x); intros F4."; + pp " absurd (2 ^ (Zpos (xO (digits x)) - 1) < 2 ^ (Zpos (digits x)))."; + pp " apply Zle_not_lt."; + pp " apply Zpower_le_monotone; auto with zarith."; + pp " split; auto with zarith."; + pp " rewrite Zpos_xO; auto with zarith."; + pp " case (spec_head0 x F3)."; + pp " rewrite <- F1; rewrite Zpower_0_r; rewrite Zmult_1_l; intros _ HH."; + pp " apply Zle_lt_trans with (2 := HH)."; + pp " case (spec_head0 _ F4)."; + pp " rewrite (spec_double_size x); rewrite (spec_double_size_digits x)."; + pp " rewrite <- F0; rewrite Zpower_0_r; rewrite Zmult_1_l; auto."; + pp " generalize F1; rewrite (spec_head00 _ (sym_equal F3)); auto with zarith."; + pp " Qed."; + pr ""; + + + (* Safe shiftl *) + + pr " Definition safe_shiftl_aux_body cont n x :="; + pr " match compare n (head0 x) with"; + pr " Gt => cont n (double_size x)"; + pr " | _ => shiftl n x"; + pr " end."; + pr ""; + + pr " Theorem spec_safe_shift_aux_body: forall n p x cont,"; + pr " 2^ Zpos p <= [head0 x] ->"; + pr " (forall x, 2 ^ (Zpos p + 1) <= [head0 x]->"; + pr " [cont n x] = [x] * 2 ^ [n]) ->"; + pr " [safe_shiftl_aux_body cont n x] = [x] * 2 ^ [n]."; + pa " Admitted."; + pp " Proof."; + pp " intros n p x cont H1 H2; unfold safe_shiftl_aux_body."; + pp " generalize (spec_compare n (head0 x)); case compare; intros H."; + pp " apply spec_shiftl; auto with zarith."; + pp " apply spec_shiftl; auto with zarith."; + pp " rewrite H2."; + pp " rewrite spec_double_size; auto."; + pp " rewrite Zplus_comm; rewrite Zpower_exp; auto with zarith."; + pp " apply Zle_trans with (2 := spec_double_size_head0 x)."; + pp " rewrite Zpower_1_r; apply Zmult_le_compat_l; auto with zarith."; + pp " Qed."; + pr ""; + + pr " Fixpoint safe_shiftl_aux p cont n x {struct p} :="; + pr " safe_shiftl_aux_body "; + pr " (fun n x => match p with"; + pr " | xH => cont n x"; + pr " | xO p => safe_shiftl_aux p (safe_shiftl_aux p cont) n x"; + pr " | xI p => safe_shiftl_aux p (safe_shiftl_aux p cont) n x"; + pr " end) n x."; + pr ""; + + pr " Theorem spec_safe_shift_aux: forall p q n x cont,"; + pr " 2 ^ (Zpos q) <= [head0 x] ->"; + pr " (forall x, 2 ^ (Zpos p + Zpos q) <= [head0 x] ->"; + pr " [cont n x] = [x] * 2 ^ [n]) -> "; + pr " [safe_shiftl_aux p cont n x] = [x] * 2 ^ [n]."; + pa " Admitted."; + pp " Proof."; + pp " intros p; elim p; unfold safe_shiftl_aux; fold safe_shiftl_aux; clear p."; + pp " intros p Hrec q n x cont H1 H2."; + pp " apply spec_safe_shift_aux_body with (q); auto."; + pp " intros x1 H3; apply Hrec with (q + 1)%spositive; auto." "%"; + pp " intros x2 H4; apply Hrec with (p + q + 1)%spositive; auto." "%"; + pp " rewrite <- Pplus_assoc."; + pp " rewrite Zpos_plus_distr; auto."; + pp " intros x3 H5; apply H2."; + pp " rewrite Zpos_xI."; + pp " replace (2 * Zpos p + 1 + Zpos q) with (Zpos p + Zpos (p + q + 1));"; + pp " auto."; + pp " repeat rewrite Zpos_plus_distr; ring."; + pp " intros p Hrec q n x cont H1 H2."; + pp " apply spec_safe_shift_aux_body with (q); auto."; + pp " intros x1 H3; apply Hrec with (q); auto."; + pp " apply Zle_trans with (2 := H3); auto with zarith."; + pp " apply Zpower_le_monotone; auto with zarith."; + pp " intros x2 H4; apply Hrec with (p + q)%spositive; auto." "%"; + pp " intros x3 H5; apply H2."; + pp " rewrite (Zpos_xO p)."; + pp " replace (2 * Zpos p + Zpos q) with (Zpos p + Zpos (p + q));"; + pp " auto."; + pp " repeat rewrite Zpos_plus_distr; ring."; + pp " intros q n x cont H1 H2."; + pp " apply spec_safe_shift_aux_body with (q); auto."; + pp " rewrite Zplus_comm; auto."; + pp " Qed."; + pr ""; + + + pr " Definition safe_shiftl n x :="; + pr " safe_shiftl_aux_body"; + pr " (safe_shiftl_aux_body"; + pr " (safe_shiftl_aux (digits n) shiftl)) n x."; + pr ""; + + pr " Theorem spec_safe_shift: forall n x,"; + pr " [safe_shiftl n x] = [x] * 2 ^ [n]."; + pa " Admitted."; + pp " Proof."; + pp " intros n x; unfold safe_shiftl, safe_shiftl_aux_body."; + pp " generalize (spec_compare n (head0 x)); case compare; intros H."; + pp " apply spec_shiftl; auto with zarith."; + pp " apply spec_shiftl; auto with zarith."; + pp " rewrite <- (spec_double_size x)."; + pp " generalize (spec_compare n (head0 (double_size x))); case compare; intros H1."; + pp " apply spec_shiftl; auto with zarith."; + pp " apply spec_shiftl; auto with zarith."; + pp " rewrite <- (spec_double_size (double_size x))."; + pp " apply spec_safe_shift_aux with 1%spositive." "%"; + pp " apply Zle_trans with (2 := spec_double_size_head0 (double_size x))."; + pp " replace (2 ^ 1) with (2 * 1)."; + pp " apply Zmult_le_compat_l; auto with zarith."; + pp " generalize (spec_double_size_head0_pos x); auto with zarith."; + pp " rewrite Zpower_1_r; ring."; + pp " intros x1 H2; apply spec_shiftl."; + pp " apply Zle_trans with (2 := H2)."; + pp " apply Zle_trans with (2 ^ Zpos (digits n)); auto with zarith."; + pp " case (spec_digits n); auto with zarith."; + pp " apply Zpower_le_monotone; auto with zarith."; + pp " Qed."; + pr ""; + + (* even *) + pr " Definition is_even x :="; + pr " match x with"; + for i = 0 to size do + pr " | %s%i wx => w%i_op.(znz_is_even) wx" c i i + done; + pr " | %sn n wx => (make_op n).(znz_is_even) wx" c; + pr " end."; + pr ""; + + + pr " Theorem spec_is_even: forall x,"; + pr " if is_even x then [x] mod 2 = 0 else [x] mod 2 = 1."; + pa " Admitted."; + pp " Proof."; + pp " intros x; case x; unfold is_even, to_Z; clear x."; + for i = 0 to size do + pp " intros x; exact (spec_is_even w%i_spec x)." i; + done; + pp " intros n x; exact (spec_is_even (wn_spec n) x)."; + pp " Qed."; + pr ""; + + pr " Theorem spec_0: [zero] = 0."; + pa " Admitted."; + pp " Proof."; + pp " exact (spec_0 w0_spec)."; + pp " Qed."; + pr ""; + + pr " Theorem spec_1: [one] = 1."; + pa " Admitted."; + pp " Proof."; + pp " exact (spec_1 w0_spec)."; + pp " Qed."; + pr ""; + + pr "End Make."; + pr ""; + diff --git a/theories/Numbers/Natural/BigN/Nbasic.v b/theories/Numbers/Natural/BigN/Nbasic.v new file mode 100644 index 00000000..ae2cfd30 --- /dev/null +++ b/theories/Numbers/Natural/BigN/Nbasic.v @@ -0,0 +1,514 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* xH + | xO p1 => Psucc (plength p1) + | xI p1 => Psucc (plength p1) + end. + +Theorem plength_correct: forall p, (Zpos p < 2 ^ Zpos (plength p))%Z. +assert (F: (forall p, 2 ^ (Zpos (Psucc p)) = 2 * 2 ^ Zpos p)%Z). +intros p; replace (Zpos (Psucc p)) with (1 + Zpos p)%Z. +rewrite Zpower_exp; auto with zarith. +rewrite Zpos_succ_morphism; unfold Zsucc; auto with zarith. +intros p; elim p; simpl plength; auto. +intros p1 Hp1; rewrite F; repeat rewrite Zpos_xI. +assert (tmp: (forall p, 2 * p = p + p)%Z); + try repeat rewrite tmp; auto with zarith. +intros p1 Hp1; rewrite F; rewrite (Zpos_xO p1). +assert (tmp: (forall p, 2 * p = p + p)%Z); + try repeat rewrite tmp; auto with zarith. +rewrite Zpower_1_r; auto with zarith. +Qed. + +Theorem plength_pred_correct: forall p, (Zpos p <= 2 ^ Zpos (plength (Ppred p)))%Z. +intros p; case (Psucc_pred p); intros H1. +subst; simpl plength. +rewrite Zpower_1_r; auto with zarith. +pattern p at 1; rewrite <- H1. +rewrite Zpos_succ_morphism; unfold Zsucc; auto with zarith. +generalize (plength_correct (Ppred p)); auto with zarith. +Qed. + +Definition Pdiv p q := + match Zdiv (Zpos p) (Zpos q) with + Zpos q1 => match (Zpos p) - (Zpos q) * (Zpos q1) with + Z0 => q1 + | _ => (Psucc q1) + end + | _ => xH + end. + +Theorem Pdiv_le: forall p q, + Zpos p <= Zpos q * Zpos (Pdiv p q). +intros p q. +unfold Pdiv. +assert (H1: Zpos q > 0); auto with zarith. +assert (H1b: Zpos p >= 0); auto with zarith. +generalize (Z_div_ge0 (Zpos p) (Zpos q) H1 H1b). +generalize (Z_div_mod_eq (Zpos p) (Zpos q) H1); case Zdiv. + intros HH _; rewrite HH; rewrite Zmult_0_r; rewrite Zmult_1_r; simpl. +case (Z_mod_lt (Zpos p) (Zpos q) H1); auto with zarith. +intros q1 H2. +replace (Zpos p - Zpos q * Zpos q1) with (Zpos p mod Zpos q). + 2: pattern (Zpos p) at 2; rewrite H2; auto with zarith. +generalize H2 (Z_mod_lt (Zpos p) (Zpos q) H1); clear H2; + case Zmod. + intros HH _; rewrite HH; auto with zarith. + intros r1 HH (_,HH1); rewrite HH; rewrite Zpos_succ_morphism. + unfold Zsucc; rewrite Zmult_plus_distr_r; auto with zarith. + intros r1 _ (HH,_); case HH; auto. +intros q1 HH; rewrite HH. +unfold Zge; simpl Zcompare; intros HH1; case HH1; auto. +Qed. + +Definition is_one p := match p with xH => true | _ => false end. + +Theorem is_one_one: forall p, is_one p = true -> p = xH. +intros p; case p; auto; intros p1 H1; discriminate H1. +Qed. + +Definition get_height digits p := + let r := Pdiv p digits in + if is_one r then xH else Psucc (plength (Ppred r)). + +Theorem get_height_correct: + forall digits N, + Zpos N <= Zpos digits * (2 ^ (Zpos (get_height digits N) -1)). +intros digits N. +unfold get_height. +assert (H1 := Pdiv_le N digits). +case_eq (is_one (Pdiv N digits)); intros H2. +rewrite (is_one_one _ H2) in H1. +rewrite Zmult_1_r in H1. +change (2^(1-1))%Z with 1; rewrite Zmult_1_r; auto. +clear H2. +apply Zle_trans with (1 := H1). +apply Zmult_le_compat_l; auto with zarith. +rewrite Zpos_succ_morphism; unfold Zsucc. +rewrite Zplus_comm; rewrite Zminus_plus. +apply plength_pred_correct. +Qed. + +Definition zn2z_word_comm : forall w n, zn2z (word w n) = word (zn2z w) n. + fix zn2z_word_comm 2. + intros w n; case n. + reflexivity. + intros n0;simpl. + case (zn2z_word_comm w n0). + reflexivity. +Defined. + +Fixpoint extend (n:nat) {struct n} : forall w:Type, zn2z w -> word w (S n) := + match n return forall w:Type, zn2z w -> word w (S n) with + | O => fun w x => x + | S m => + let aux := extend m in + fun w x => WW W0 (aux w x) + end. + +Section ExtendMax. + +Open Scope nat_scope. + +Fixpoint plusnS (n m: nat) {struct n} : (n + S m = S (n + m))%nat := + match n return (n + S m = S (n + m))%nat with + | 0 => refl_equal (S m) + | S n1 => + let v := S (S n1 + m) in + eq_ind_r (fun n => S n = v) (refl_equal v) (plusnS n1 m) + end. + +Fixpoint plusn0 n : n + 0 = n := + match n return (n + 0 = n) with + | 0 => refl_equal 0 + | S n1 => + let v := S n1 in + eq_ind_r (fun n : nat => S n = v) (refl_equal v) (plusn0 n1) + end. + + Fixpoint diff (m n: nat) {struct m}: nat * nat := + match m, n with + O, n => (O, n) + | m, O => (m, O) + | S m1, S n1 => diff m1 n1 + end. + +Fixpoint diff_l (m n : nat) {struct m} : fst (diff m n) + n = max m n := + match m return fst (diff m n) + n = max m n with + | 0 => + match n return (n = max 0 n) with + | 0 => refl_equal _ + | S n0 => refl_equal _ + end + | S m1 => + match n return (fst (diff (S m1) n) + n = max (S m1) n) + with + | 0 => plusn0 _ + | S n1 => + let v := fst (diff m1 n1) + n1 in + let v1 := fst (diff m1 n1) + S n1 in + eq_ind v (fun n => v1 = S n) + (eq_ind v1 (fun n => v1 = n) (refl_equal v1) (S v) (plusnS _ _)) + _ (diff_l _ _) + end + end. + +Fixpoint diff_r (m n: nat) {struct m}: snd (diff m n) + m = max m n := + match m return (snd (diff m n) + m = max m n) with + | 0 => + match n return (snd (diff 0 n) + 0 = max 0 n) with + | 0 => refl_equal _ + | S _ => plusn0 _ + end + | S m => + match n return (snd (diff (S m) n) + S m = max (S m) n) with + | 0 => refl_equal (snd (diff (S m) 0) + S m) + | S n1 => + let v := S (max m n1) in + eq_ind_r (fun n => n = v) + (eq_ind_r (fun n => S n = v) + (refl_equal v) (diff_r _ _)) (plusnS _ _) + end + end. + + Variable w: Type. + + Definition castm (m n: nat) (H: m = n) (x: word w (S m)): + (word w (S n)) := + match H in (_ = y) return (word w (S y)) with + | refl_equal => x + end. + +Variable m: nat. +Variable v: (word w (S m)). + +Fixpoint extend_tr (n : nat) {struct n}: (word w (S (n + m))) := + match n return (word w (S (n + m))) with + | O => v + | S n1 => WW W0 (extend_tr n1) + end. + +End ExtendMax. + +Implicit Arguments extend_tr[w m]. +Implicit Arguments castm[w m n]. + + + +Section Reduce. + + Variable w : Type. + Variable nT : Type. + Variable N0 : nT. + Variable eq0 : w -> bool. + Variable reduce_n : w -> nT. + Variable zn2z_to_Nt : zn2z w -> nT. + + Definition reduce_n1 (x:zn2z w) := + match x with + | W0 => N0 + | WW xh xl => + if eq0 xh then reduce_n xl + else zn2z_to_Nt x + end. + +End Reduce. + +Section ReduceRec. + + Variable w : Type. + Variable nT : Type. + Variable N0 : nT. + Variable reduce_1n : zn2z w -> nT. + Variable c : forall n, word w (S n) -> nT. + + Fixpoint reduce_n (n:nat) : word w (S n) -> nT := + match n return word w (S n) -> nT with + | O => reduce_1n + | S m => fun x => + match x with + | W0 => N0 + | WW xh xl => + match xh with + | W0 => @reduce_n m xl + | _ => @c (S m) x + end + end + end. + +End ReduceRec. + +Definition opp_compare cmp := + match cmp with + | Lt => Gt + | Eq => Eq + | Gt => Lt + end. + +Section CompareRec. + + Variable wm w : Type. + Variable w_0 : w. + Variable compare : w -> w -> comparison. + Variable compare0_m : wm -> comparison. + Variable compare_m : wm -> w -> comparison. + + Fixpoint compare0_mn (n:nat) : word wm n -> comparison := + match n return word wm n -> comparison with + | O => compare0_m + | S m => fun x => + match x with + | W0 => Eq + | WW xh xl => + match compare0_mn m xh with + | Eq => compare0_mn m xl + | r => Lt + end + end + end. + + Variable wm_base: positive. + Variable wm_to_Z: wm -> Z. + Variable w_to_Z: w -> Z. + Variable w_to_Z_0: w_to_Z w_0 = 0. + Variable spec_compare0_m: forall x, + match compare0_m x with + Eq => w_to_Z w_0 = wm_to_Z x + | Lt => w_to_Z w_0 < wm_to_Z x + | Gt => w_to_Z w_0 > wm_to_Z x + end. + Variable wm_to_Z_pos: forall x, 0 <= wm_to_Z x < base wm_base. + + Let double_to_Z := double_to_Z wm_base wm_to_Z. + Let double_wB := double_wB wm_base. + + Lemma base_xO: forall n, base (xO n) = (base n)^2. + Proof. + intros n1; unfold base. + rewrite (Zpos_xO n1); rewrite Zmult_comm; rewrite Zpower_mult; auto with zarith. + Qed. + + Let double_to_Z_pos: forall n x, 0 <= double_to_Z n x < double_wB n := + (spec_double_to_Z wm_base wm_to_Z wm_to_Z_pos). + + + Lemma spec_compare0_mn: forall n x, + match compare0_mn n x with + Eq => 0 = double_to_Z n x + | Lt => 0 < double_to_Z n x + | Gt => 0 > double_to_Z n x + end. + Proof. + intros n; elim n; clear n; auto. + intros x; generalize (spec_compare0_m x); rewrite w_to_Z_0; auto. + intros n Hrec x; case x; unfold compare0_mn; fold compare0_mn; auto. + intros xh xl. + generalize (Hrec xh); case compare0_mn; auto. + generalize (Hrec xl); case compare0_mn; auto. + simpl double_to_Z; intros H1 H2; rewrite H1; rewrite <- H2; auto. + simpl double_to_Z; intros H1 H2; rewrite <- H2; auto. + case (double_to_Z_pos n xl); auto with zarith. + intros H1; simpl double_to_Z. + set (u := DoubleBase.double_wB wm_base n). + case (double_to_Z_pos n xl); intros H2 H3. + assert (0 < u); auto with zarith. + unfold u, DoubleBase.double_wB, base; auto with zarith. + change 0 with (0 + 0); apply Zplus_lt_le_compat; auto with zarith. + apply Zmult_lt_0_compat; auto with zarith. + case (double_to_Z_pos n xh); auto with zarith. + Qed. + + Fixpoint compare_mn_1 (n:nat) : word wm n -> w -> comparison := + match n return word wm n -> w -> comparison with + | O => compare_m + | S m => fun x y => + match x with + | W0 => compare w_0 y + | WW xh xl => + match compare0_mn m xh with + | Eq => compare_mn_1 m xl y + | r => Gt + end + end + end. + + Variable spec_compare: forall x y, + match compare x y with + Eq => w_to_Z x = w_to_Z y + | Lt => w_to_Z x < w_to_Z y + | Gt => w_to_Z x > w_to_Z y + end. + Variable spec_compare_m: forall x y, + match compare_m x y with + Eq => wm_to_Z x = w_to_Z y + | Lt => wm_to_Z x < w_to_Z y + | Gt => wm_to_Z x > w_to_Z y + end. + Variable wm_base_lt: forall x, + 0 <= w_to_Z x < base (wm_base). + + Let double_wB_lt: forall n x, + 0 <= w_to_Z x < (double_wB n). + Proof. + intros n x; elim n; simpl; auto; clear n. + intros n (H0, H); split; auto. + apply Zlt_le_trans with (1:= H). + unfold double_wB, DoubleBase.double_wB; simpl. + rewrite base_xO. + set (u := base (double_digits wm_base n)). + assert (0 < u). + unfold u, base; auto with zarith. + replace (u^2) with (u * u); simpl; auto with zarith. + apply Zle_trans with (1 * u); auto with zarith. + unfold Zpower_pos; simpl; ring. + Qed. + + + Lemma spec_compare_mn_1: forall n x y, + match compare_mn_1 n x y with + Eq => double_to_Z n x = w_to_Z y + | Lt => double_to_Z n x < w_to_Z y + | Gt => double_to_Z n x > w_to_Z y + end. + Proof. + intros n; elim n; simpl; auto; clear n. + intros n Hrec x; case x; clear x; auto. + intros y; generalize (spec_compare w_0 y); rewrite w_to_Z_0; case compare; auto. + intros xh xl y; simpl; generalize (spec_compare0_mn n xh); case compare0_mn; intros H1b. + rewrite <- H1b; rewrite Zmult_0_l; rewrite Zplus_0_l; auto. + apply Hrec. + apply Zlt_gt. + case (double_wB_lt n y); intros _ H0. + apply Zlt_le_trans with (1:= H0). + fold double_wB. + case (double_to_Z_pos n xl); intros H1 H2. + apply Zle_trans with (double_to_Z n xh * double_wB n); auto with zarith. + apply Zle_trans with (1 * double_wB n); auto with zarith. + case (double_to_Z_pos n xh); auto with zarith. + Qed. + +End CompareRec. + + +Section AddS. + + Variable w wm : Type. + Variable incr : wm -> carry wm. + Variable addr : w -> wm -> carry wm. + Variable injr : w -> zn2z wm. + + Variable w_0 u: w. + Fixpoint injs (n:nat): word w (S n) := + match n return (word w (S n)) with + O => WW w_0 u + | S n1 => (WW W0 (injs n1)) + end. + + Definition adds x y := + match y with + W0 => C0 (injr x) + | WW hy ly => match addr x ly with + C0 z => C0 (WW hy z) + | C1 z => match incr hy with + C0 z1 => C0 (WW z1 z) + | C1 z1 => C1 (WW z1 z) + end + end + end. + +End AddS. + + + Lemma spec_opp: forall u x y, + match u with + | Eq => y = x + | Lt => y < x + | Gt => y > x + end -> + match opp_compare u with + | Eq => x = y + | Lt => x < y + | Gt => x > y + end. + Proof. + intros u x y; case u; simpl; auto with zarith. + Qed. + + Fixpoint length_pos x := + match x with xH => O | xO x1 => S (length_pos x1) | xI x1 => S (length_pos x1) end. + + Theorem length_pos_lt: forall x y, + (length_pos x < length_pos y)%nat -> Zpos x < Zpos y. + Proof. + intros x; elim x; clear x; [intros x1 Hrec | intros x1 Hrec | idtac]; + intros y; case y; clear y; intros y1 H || intros H; simpl length_pos; + try (rewrite (Zpos_xI x1) || rewrite (Zpos_xO x1)); + try (rewrite (Zpos_xI y1) || rewrite (Zpos_xO y1)); + try (inversion H; fail); + try (assert (Zpos x1 < Zpos y1); [apply Hrec; apply lt_S_n | idtac]; auto with zarith); + assert (0 < Zpos y1); auto with zarith; red; auto. + Qed. + + Theorem cancel_app: forall A B (f g: A -> B) x, f = g -> f x = g x. + Proof. + intros A B f g x H; rewrite H; auto. + Qed. + + + Section SimplOp. + + Variable w: Type. + + Theorem digits_zop: forall w (x: znz_op w), + znz_digits (mk_zn2z_op x) = xO (znz_digits x). + intros ww x; auto. + Qed. + + Theorem digits_kzop: forall w (x: znz_op w), + znz_digits (mk_zn2z_op_karatsuba x) = xO (znz_digits x). + intros ww x; auto. + Qed. + + Theorem make_zop: forall w (x: znz_op w), + znz_to_Z (mk_zn2z_op x) = + fun z => match z with + W0 => 0 + | WW xh xl => znz_to_Z x xh * base (znz_digits x) + + znz_to_Z x xl + end. + intros ww x; auto. + Qed. + + Theorem make_kzop: forall w (x: znz_op w), + znz_to_Z (mk_zn2z_op_karatsuba x) = + fun z => match z with + W0 => 0 + | WW xh xl => znz_to_Z x xh * base (znz_digits x) + + znz_to_Z x xl + end. + intros ww x; auto. + Qed. + + End SimplOp. diff --git a/theories/Numbers/Natural/Binary/NBinDefs.v b/theories/Numbers/Natural/Binary/NBinDefs.v new file mode 100644 index 00000000..fc2bd2df --- /dev/null +++ b/theories/Numbers/Natural/Binary/NBinDefs.v @@ -0,0 +1,267 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* NZeq as NZsucc_wd. +Proof. +congruence. +Qed. + +Add Morphism NZpred with signature NZeq ==> NZeq as NZpred_wd. +Proof. +congruence. +Qed. + +Add Morphism NZadd with signature NZeq ==> NZeq ==> NZeq as NZadd_wd. +Proof. +congruence. +Qed. + +Add Morphism NZsub with signature NZeq ==> NZeq ==> NZeq as NZsub_wd. +Proof. +congruence. +Qed. + +Add Morphism NZmul with signature NZeq ==> NZeq ==> NZeq as NZmul_wd. +Proof. +congruence. +Qed. + +Theorem NZinduction : + forall A : NZ -> Prop, predicate_wd NZeq A -> + A N0 -> (forall n, A n <-> A (NZsucc n)) -> forall n : NZ, A n. +Proof. +intros A A_wd A0 AS. apply Nrect. assumption. intros; now apply -> AS. +Qed. + +Theorem NZpred_succ : forall n : NZ, NZpred (NZsucc n) = n. +Proof. +destruct n as [| p]; simpl. reflexivity. +case_eq (Psucc p); try (intros q H; rewrite <- H; now rewrite Ppred_succ). +intro H; false_hyp H Psucc_not_one. +Qed. + +Theorem NZadd_0_l : forall n : NZ, N0 + n = n. +Proof. +reflexivity. +Qed. + +Theorem NZadd_succ_l : forall n m : NZ, (NZsucc n) + m = NZsucc (n + m). +Proof. +destruct n; destruct m. +simpl in |- *; reflexivity. +unfold NZsucc, NZadd, Nsucc, Nplus. rewrite <- Pplus_one_succ_l; reflexivity. +simpl in |- *; reflexivity. +simpl in |- *; rewrite Pplus_succ_permute_l; reflexivity. +Qed. + +Theorem NZsub_0_r : forall n : NZ, n - N0 = n. +Proof. +now destruct n. +Qed. + +Theorem NZsub_succ_r : forall n m : NZ, n - (NZsucc m) = NZpred (n - m). +Proof. +destruct n as [| p]; destruct m as [| q]; try reflexivity. +now destruct p. +simpl. rewrite Pminus_mask_succ_r, Pminus_mask_carry_spec. +now destruct (Pminus_mask p q) as [| r |]; [| destruct r |]. +Qed. + +Theorem NZmul_0_l : forall n : NZ, N0 * n = N0. +Proof. +destruct n; reflexivity. +Qed. + +Theorem NZmul_succ_l : forall n m : NZ, (NZsucc n) * m = n * m + m. +Proof. +destruct n as [| n]; destruct m as [| m]; simpl; try reflexivity. +now rewrite Pmult_Sn_m, Pplus_comm. +Qed. + +End NZAxiomsMod. + +Definition NZlt := Nlt. +Definition NZle := Nle. +Definition NZmin := Nmin. +Definition NZmax := Nmax. + +Add Morphism NZlt with signature NZeq ==> NZeq ==> iff as NZlt_wd. +Proof. +unfold NZeq; intros x1 x2 H1 y1 y2 H2; rewrite H1; now rewrite H2. +Qed. + +Add Morphism NZle with signature NZeq ==> NZeq ==> iff as NZle_wd. +Proof. +unfold NZeq; intros x1 x2 H1 y1 y2 H2; rewrite H1; now rewrite H2. +Qed. + +Add Morphism NZmin with signature NZeq ==> NZeq ==> NZeq as NZmin_wd. +Proof. +congruence. +Qed. + +Add Morphism NZmax with signature NZeq ==> NZeq ==> NZeq as NZmax_wd. +Proof. +congruence. +Qed. + +Theorem NZlt_eq_cases : forall n m : N, n <= m <-> n < m \/ n = m. +Proof. +intros n m. unfold Nle, Nlt. rewrite <- Ncompare_eq_correct. +destruct (n ?= m); split; intro H1; (try discriminate); try (now left); try now right. +now elim H1. destruct H1; discriminate. +Qed. + +Theorem NZlt_irrefl : forall n : NZ, ~ n < n. +Proof. +intro n; unfold Nlt; now rewrite Ncompare_refl. +Qed. + +Theorem NZlt_succ_r : forall n m : NZ, n < (NZsucc m) <-> n <= m. +Proof. +intros n m; unfold Nlt, Nle; destruct n as [| p]; destruct m as [| q]; simpl; +split; intro H; try reflexivity; try discriminate. +destruct p; simpl; intros; discriminate. elimtype False; now apply H. +apply -> Pcompare_p_Sq in H. destruct H as [H | H]. +now rewrite H. now rewrite H, Pcompare_refl. +apply <- Pcompare_p_Sq. case_eq ((p ?= q)%positive Eq); intro H1. +right; now apply Pcompare_Eq_eq. now left. elimtype False; now apply H. +Qed. + +Theorem NZmin_l : forall n m : N, n <= m -> NZmin n m = n. +Proof. +unfold NZmin, Nmin, Nle; intros n m H. +destruct (n ?= m); try reflexivity. now elim H. +Qed. + +Theorem NZmin_r : forall n m : N, m <= n -> NZmin n m = m. +Proof. +unfold NZmin, Nmin, Nle; intros n m H. +case_eq (n ?= m); intro H1; try reflexivity. +now apply -> Ncompare_eq_correct. +rewrite <- Ncompare_antisym, H1 in H; elim H; auto. +Qed. + +Theorem NZmax_l : forall n m : N, m <= n -> NZmax n m = n. +Proof. +unfold NZmax, Nmax, Nle; intros n m H. +case_eq (n ?= m); intro H1; try reflexivity. +symmetry; now apply -> Ncompare_eq_correct. +rewrite <- Ncompare_antisym, H1 in H; elim H; auto. +Qed. + +Theorem NZmax_r : forall n m : N, n <= m -> NZmax n m = m. +Proof. +unfold NZmax, Nmax, Nle; intros n m H. +destruct (n ?= m); try reflexivity. now elim H. +Qed. + +End NZOrdAxiomsMod. + +Definition recursion (A : Type) (a : A) (f : N -> A -> A) (n : N) := + Nrect (fun _ => A) a f n. +Implicit Arguments recursion [A]. + +Theorem pred_0 : Npred N0 = N0. +Proof. +reflexivity. +Qed. + +Theorem recursion_wd : +forall (A : Type) (Aeq : relation A), + forall a a' : A, Aeq a a' -> + forall f f' : N -> A -> A, fun2_eq NZeq Aeq Aeq f f' -> + forall x x' : N, x = x' -> + Aeq (recursion a f x) (recursion a' f' x'). +Proof. +unfold fun2_wd, NZeq, fun2_eq. +intros A Aeq a a' Eaa' f f' Eff'. +intro x; pattern x; apply Nrect. +intros x' H; now rewrite <- H. +clear x. +intros x IH x' H; rewrite <- H. +unfold recursion in *. do 2 rewrite Nrect_step. +now apply Eff'; [| apply IH]. +Qed. + +Theorem recursion_0 : + forall (A : Type) (a : A) (f : N -> A -> A), recursion a f N0 = a. +Proof. +intros A a f; unfold recursion; now rewrite Nrect_base. +Qed. + +Theorem recursion_succ : + forall (A : Type) (Aeq : relation A) (a : A) (f : N -> A -> A), + Aeq a a -> fun2_wd NZeq Aeq Aeq f -> + forall n : N, Aeq (recursion a f (Nsucc n)) (f n (recursion a f n)). +Proof. +unfold NZeq, recursion, fun2_wd; intros A Aeq a f EAaa f_wd n; pattern n; apply Nrect. +rewrite Nrect_step; rewrite Nrect_base; now apply f_wd. +clear n; intro n; do 2 rewrite Nrect_step; intro IH. apply f_wd; [reflexivity|]. +now rewrite Nrect_step. +Qed. + +End NBinaryAxiomsMod. + +Module Export NBinarySubPropMod := NSubPropFunct NBinaryAxiomsMod. + +(* Some fun comparing the efficiency of the generic log defined +by strong (course-of-value) recursion and the log defined by recursion +on notation *) +(* Time Eval compute in (log 100000). *) (* 98 sec *) + +(* +Fixpoint binposlog (p : positive) : N := +match p with +| xH => 0 +| xO p' => Nsucc (binposlog p') +| xI p' => Nsucc (binposlog p') +end. + +Definition binlog (n : N) : N := +match n with +| 0 => 0 +| Npos p => binposlog p +end. +*) +(* Eval compute in (binlog 1000000000000000000). *) (* Works very fast *) + diff --git a/theories/Numbers/Natural/Binary/NBinary.v b/theories/Numbers/Natural/Binary/NBinary.v new file mode 100644 index 00000000..2c99128d --- /dev/null +++ b/theories/Numbers/Natural/Binary/NBinary.v @@ -0,0 +1,15 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* NZeq as NZsucc_wd. +Proof. +congruence. +Qed. + +Add Morphism NZpred with signature NZeq ==> NZeq as NZpred_wd. +Proof. +congruence. +Qed. + +Add Morphism NZadd with signature NZeq ==> NZeq ==> NZeq as NZadd_wd. +Proof. +congruence. +Qed. + +Add Morphism NZsub with signature NZeq ==> NZeq ==> NZeq as NZsub_wd. +Proof. +congruence. +Qed. + +Add Morphism NZmul with signature NZeq ==> NZeq ==> NZeq as NZmul_wd. +Proof. +congruence. +Qed. + +Theorem NZinduction : + forall A : nat -> Prop, predicate_wd (@eq nat) A -> + A 0 -> (forall n : nat, A n <-> A (S n)) -> forall n : nat, A n. +Proof. +intros A A_wd A0 AS. apply nat_ind. assumption. intros; now apply -> AS. +Qed. + +Theorem NZpred_succ : forall n : nat, pred (S n) = n. +Proof. +reflexivity. +Qed. + +Theorem NZadd_0_l : forall n : nat, 0 + n = n. +Proof. +reflexivity. +Qed. + +Theorem NZadd_succ_l : forall n m : nat, (S n) + m = S (n + m). +Proof. +reflexivity. +Qed. + +Theorem NZsub_0_r : forall n : nat, n - 0 = n. +Proof. +intro n; now destruct n. +Qed. + +Theorem NZsub_succ_r : forall n m : nat, n - (S m) = pred (n - m). +Proof. +intros n m; induction n m using nat_double_ind; simpl; auto. apply NZsub_0_r. +Qed. + +Theorem NZmul_0_l : forall n : nat, 0 * n = 0. +Proof. +reflexivity. +Qed. + +Theorem NZmul_succ_l : forall n m : nat, S n * m = n * m + m. +Proof. +intros n m; now rewrite plus_comm. +Qed. + +End NZAxiomsMod. + +Definition NZlt := lt. +Definition NZle := le. +Definition NZmin := min. +Definition NZmax := max. + +Add Morphism NZlt with signature NZeq ==> NZeq ==> iff as NZlt_wd. +Proof. +unfold NZeq; intros x1 x2 H1 y1 y2 H2; rewrite H1; now rewrite H2. +Qed. + +Add Morphism NZle with signature NZeq ==> NZeq ==> iff as NZle_wd. +Proof. +unfold NZeq; intros x1 x2 H1 y1 y2 H2; rewrite H1; now rewrite H2. +Qed. + +Add Morphism NZmin with signature NZeq ==> NZeq ==> NZeq as NZmin_wd. +Proof. +congruence. +Qed. + +Add Morphism NZmax with signature NZeq ==> NZeq ==> NZeq as NZmax_wd. +Proof. +congruence. +Qed. + +Theorem NZlt_eq_cases : forall n m : nat, n <= m <-> n < m \/ n = m. +Proof. +intros n m; split. +apply le_lt_or_eq. +intro H; destruct H as [H | H]. +now apply lt_le_weak. rewrite H; apply le_refl. +Qed. + +Theorem NZlt_irrefl : forall n : nat, ~ (n < n). +Proof. +exact lt_irrefl. +Qed. + +Theorem NZlt_succ_r : forall n m : nat, n < S m <-> n <= m. +Proof. +intros n m; split; [apply lt_n_Sm_le | apply le_lt_n_Sm]. +Qed. + +Theorem NZmin_l : forall n m : nat, n <= m -> NZmin n m = n. +Proof. +exact min_l. +Qed. + +Theorem NZmin_r : forall n m : nat, m <= n -> NZmin n m = m. +Proof. +exact min_r. +Qed. + +Theorem NZmax_l : forall n m : nat, m <= n -> NZmax n m = n. +Proof. +exact max_l. +Qed. + +Theorem NZmax_r : forall n m : nat, n <= m -> NZmax n m = m. +Proof. +exact max_r. +Qed. + +End NZOrdAxiomsMod. + +Definition recursion : forall A : Type, A -> (nat -> A -> A) -> nat -> A := + fun A : Type => nat_rect (fun _ => A). +Implicit Arguments recursion [A]. + +Theorem succ_neq_0 : forall n : nat, S n <> 0. +Proof. +intros; discriminate. +Qed. + +Theorem pred_0 : pred 0 = 0. +Proof. +reflexivity. +Qed. + +Theorem recursion_wd : forall (A : Type) (Aeq : relation A), + forall a a' : A, Aeq a a' -> + forall f f' : nat -> A -> A, fun2_eq (@eq nat) Aeq Aeq f f' -> + forall n n' : nat, n = n' -> + Aeq (recursion a f n) (recursion a' f' n'). +Proof. +unfold fun2_eq; induction n; intros n' Enn'; rewrite <- Enn' in *; simpl; auto. +Qed. + +Theorem recursion_0 : + forall (A : Type) (a : A) (f : nat -> A -> A), recursion a f 0 = a. +Proof. +reflexivity. +Qed. + +Theorem recursion_succ : + forall (A : Type) (Aeq : relation A) (a : A) (f : nat -> A -> A), + Aeq a a -> fun2_wd (@eq nat) Aeq Aeq f -> + forall n : nat, Aeq (recursion a f (S n)) (f n (recursion a f n)). +Proof. +induction n; simpl; auto. +Qed. + +End NPeanoAxiomsMod. + +(* Now we apply the largest property functor *) + +Module Export NPeanoSubPropMod := NSubPropFunct NPeanoAxiomsMod. + diff --git a/theories/Numbers/Natural/SpecViaZ/NSig.v b/theories/Numbers/Natural/SpecViaZ/NSig.v new file mode 100644 index 00000000..0275d1e1 --- /dev/null +++ b/theories/Numbers/Natural/SpecViaZ/NSig.v @@ -0,0 +1,115 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Z. + Notation "[ x ]" := (to_Z x). + Parameter spec_pos: forall x, 0 <= [x]. + + Parameter of_N : N -> t. + Parameter spec_of_N: forall x, to_Z (of_N x) = Z_of_N x. + Definition to_N n := Zabs_N (to_Z n). + + Definition eq n m := ([n] = [m]). + + Parameter zero : t. + Parameter one : t. + + Parameter spec_0: [zero] = 0. + Parameter spec_1: [one] = 1. + + Parameter compare : t -> t -> comparison. + + Parameter spec_compare: forall x y, + match compare x y with + | Eq => [x] = [y] + | Lt => [x] < [y] + | Gt => [x] > [y] + end. + + Definition lt n m := compare n m = Lt. + Definition le n m := compare n m <> Gt. + Definition min n m := match compare n m with Gt => m | _ => n end. + Definition max n m := match compare n m with Lt => m | _ => n end. + + Parameter eq_bool : t -> t -> bool. + + Parameter spec_eq_bool: forall x y, + if eq_bool x y then [x] = [y] else [x] <> [y]. + + Parameter succ : t -> t. + + Parameter spec_succ: forall n, [succ n] = [n] + 1. + + Parameter add : t -> t -> t. + + Parameter spec_add: forall x y, [add x y] = [x] + [y]. + + Parameter pred : t -> t. + + Parameter spec_pred: forall x, 0 < [x] -> [pred x] = [x] - 1. + Parameter spec_pred0: forall x, [x] = 0 -> [pred x] = 0. + + Parameter sub : t -> t -> t. + + Parameter spec_sub: forall x y, [y] <= [x] -> [sub x y] = [x] - [y]. + Parameter spec_sub0: forall x y, [x] < [y]-> [sub x y] = 0. + + Parameter mul : t -> t -> t. + + Parameter spec_mul: forall x y, [mul x y] = [x] * [y]. + + Parameter square : t -> t. + + Parameter spec_square: forall x, [square x] = [x] * [x]. + + Parameter power_pos : t -> positive -> t. + + Parameter spec_power_pos: forall x n, [power_pos x n] = [x] ^ Zpos n. + + Parameter sqrt : t -> t. + + Parameter spec_sqrt: forall x, [sqrt x] ^ 2 <= [x] < ([sqrt x] + 1) ^ 2. + + Parameter div_eucl : t -> t -> t * t. + + Parameter spec_div_eucl: forall x y, + 0 < [y] -> + let (q,r) := div_eucl x y in ([q], [r]) = Zdiv_eucl [x] [y]. + + Parameter div : t -> t -> t. + + Parameter spec_div: forall x y, 0 < [y] -> [div x y] = [x] / [y]. + + Parameter modulo : t -> t -> t. + + Parameter spec_modulo: + forall x y, 0 < [y] -> [modulo x y] = [x] mod [y]. + + Parameter gcd : t -> t -> t. + + Parameter spec_gcd: forall a b, [gcd a b] = Zgcd (to_Z a) (to_Z b). + +End NType. diff --git a/theories/Numbers/Natural/SpecViaZ/NSigNAxioms.v b/theories/Numbers/Natural/SpecViaZ/NSigNAxioms.v new file mode 100644 index 00000000..fe068437 --- /dev/null +++ b/theories/Numbers/Natural/SpecViaZ/NSigNAxioms.v @@ -0,0 +1,356 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* N.eq as NZsucc_wd. +Proof. +unfold N.eq; intros; rewrite 2 N.spec_succ; f_equal; auto. +Qed. + +Add Morphism NZpred with signature N.eq ==> N.eq as NZpred_wd. +Proof. +unfold N.eq; intros. +generalize (N.spec_pos y) (N.spec_pos x) (N.spec_eq_bool x 0). +destruct N.eq_bool; rewrite N.spec_0; intros. +rewrite 2 N.spec_pred0; congruence. +rewrite 2 N.spec_pred; f_equal; auto; try omega. +Qed. + +Add Morphism NZadd with signature N.eq ==> N.eq ==> N.eq as NZadd_wd. +Proof. +unfold N.eq; intros; rewrite 2 N.spec_add; f_equal; auto. +Qed. + +Add Morphism NZsub with signature N.eq ==> N.eq ==> N.eq as NZsub_wd. +Proof. +unfold N.eq; intros x x' Hx y y' Hy. +destruct (Z_lt_le_dec [x] [y]). +rewrite 2 N.spec_sub0; f_equal; congruence. +rewrite 2 N.spec_sub; f_equal; congruence. +Qed. + +Add Morphism NZmul with signature N.eq ==> N.eq ==> N.eq as NZmul_wd. +Proof. +unfold N.eq; intros; rewrite 2 N.spec_mul; f_equal; auto. +Qed. + +Theorem NZpred_succ : forall n, N.pred (N.succ n) == n. +Proof. +unfold N.eq; intros. +rewrite N.spec_pred; rewrite N.spec_succ. +omega. +generalize (N.spec_pos n); omega. +Qed. + +Definition N_of_Z z := N.of_N (Zabs_N z). + +Section Induction. + +Variable A : N.t -> Prop. +Hypothesis A_wd : predicate_wd N.eq A. +Hypothesis A0 : A 0. +Hypothesis AS : forall n, A n <-> A (N.succ n). + +Add Morphism A with signature N.eq ==> iff as A_morph. +Proof. apply A_wd. Qed. + +Let B (z : Z) := A (N_of_Z z). + +Lemma B0 : B 0. +Proof. +unfold B, N_of_Z; simpl. +rewrite <- (A_wd 0); auto. +red; rewrite N.spec_0, N.spec_of_N; auto. +Qed. + +Lemma BS : forall z : Z, (0 <= z)%Z -> B z -> B (z + 1). +Proof. +intros z H1 H2. +unfold B in *. apply -> AS in H2. +setoid_replace (N_of_Z (z + 1)) with (N.succ (N_of_Z z)); auto. +unfold N.eq. rewrite N.spec_succ. +unfold N_of_Z. +rewrite 2 N.spec_of_N, 2 Z_of_N_abs, 2 Zabs_eq; auto with zarith. +Qed. + +Lemma B_holds : forall z : Z, (0 <= z)%Z -> B z. +Proof. +exact (natlike_ind B B0 BS). +Qed. + +Theorem NZinduction : forall n, A n. +Proof. +intro n. setoid_replace n with (N_of_Z (N.to_Z n)). +apply B_holds. apply N.spec_pos. +red; unfold N_of_Z. +rewrite N.spec_of_N, Z_of_N_abs, Zabs_eq; auto. +apply N.spec_pos. +Qed. + +End Induction. + +Theorem NZadd_0_l : forall n, 0 + n == n. +Proof. +intros; red; rewrite N.spec_add, N.spec_0; auto with zarith. +Qed. + +Theorem NZadd_succ_l : forall n m, (N.succ n) + m == N.succ (n + m). +Proof. +intros; red; rewrite N.spec_add, 2 N.spec_succ, N.spec_add; auto with zarith. +Qed. + +Theorem NZsub_0_r : forall n, n - 0 == n. +Proof. +intros; red; rewrite N.spec_sub; rewrite N.spec_0; auto with zarith. +apply N.spec_pos. +Qed. + +Theorem NZsub_succ_r : forall n m, n - (N.succ m) == N.pred (n - m). +Proof. +intros; red. +destruct (Z_lt_le_dec [n] [N.succ m]) as [H|H]. +rewrite N.spec_sub0; auto. +rewrite N.spec_succ in H. +rewrite N.spec_pred0; auto. +destruct (Z_eq_dec [n] [m]). +rewrite N.spec_sub; auto with zarith. +rewrite N.spec_sub0; auto with zarith. + +rewrite N.spec_sub, N.spec_succ in *; auto. +rewrite N.spec_pred, N.spec_sub; auto with zarith. +rewrite N.spec_sub; auto with zarith. +Qed. + +Theorem NZmul_0_l : forall n, 0 * n == 0. +Proof. +intros; red. +rewrite N.spec_mul, N.spec_0; auto with zarith. +Qed. + +Theorem NZmul_succ_l : forall n m, (N.succ n) * m == n * m + m. +Proof. +intros; red. +rewrite N.spec_add, 2 N.spec_mul, N.spec_succ; ring. +Qed. + +End NZAxiomsMod. + +Definition NZlt := N.lt. +Definition NZle := N.le. +Definition NZmin := N.min. +Definition NZmax := N.max. + +Infix "<=" := N.le : IntScope. +Infix "<" := N.lt : IntScope. + +Lemma spec_compare_alt : forall x y, N.compare x y = ([x] ?= [y])%Z. +Proof. + intros; generalize (N.spec_compare x y). + destruct (N.compare x y); auto. + intros H; rewrite H; symmetry; apply Zcompare_refl. +Qed. + +Lemma spec_lt : forall x y, (x ([x]<[y])%Z. +Proof. + intros; unfold N.lt, Zlt; rewrite spec_compare_alt; intuition. +Qed. + +Lemma spec_le : forall x y, (x<=y) <-> ([x]<=[y])%Z. +Proof. + intros; unfold N.le, Zle; rewrite spec_compare_alt; intuition. +Qed. + +Lemma spec_min : forall x y, [N.min x y] = Zmin [x] [y]. +Proof. + intros; unfold N.min, Zmin. + rewrite spec_compare_alt; destruct Zcompare; auto. +Qed. + +Lemma spec_max : forall x y, [N.max x y] = Zmax [x] [y]. +Proof. + intros; unfold N.max, Zmax. + rewrite spec_compare_alt; destruct Zcompare; auto. +Qed. + +Add Morphism N.compare with signature N.eq ==> N.eq ==> (@eq comparison) as compare_wd. +Proof. +intros x x' Hx y y' Hy. +rewrite 2 spec_compare_alt; rewrite Hx, Hy; intuition. +Qed. + +Add Morphism N.lt with signature N.eq ==> N.eq ==> iff as NZlt_wd. +Proof. +intros x x' Hx y y' Hy; unfold N.lt; rewrite Hx, Hy; intuition. +Qed. + +Add Morphism N.le with signature N.eq ==> N.eq ==> iff as NZle_wd. +Proof. +intros x x' Hx y y' Hy; unfold N.le; rewrite Hx, Hy; intuition. +Qed. + +Add Morphism N.min with signature N.eq ==> N.eq ==> N.eq as NZmin_wd. +Proof. +intros; red; rewrite 2 spec_min; congruence. +Qed. + +Add Morphism N.max with signature N.eq ==> N.eq ==> N.eq as NZmax_wd. +Proof. +intros; red; rewrite 2 spec_max; congruence. +Qed. + +Theorem NZlt_eq_cases : forall n m, n <= m <-> n < m \/ n == m. +Proof. +intros. +unfold N.eq; rewrite spec_lt, spec_le; omega. +Qed. + +Theorem NZlt_irrefl : forall n, ~ n < n. +Proof. +intros; rewrite spec_lt; auto with zarith. +Qed. + +Theorem NZlt_succ_r : forall n m, n < (N.succ m) <-> n <= m. +Proof. +intros; rewrite spec_lt, spec_le, N.spec_succ; omega. +Qed. + +Theorem NZmin_l : forall n m, n <= m -> N.min n m == n. +Proof. +intros n m; unfold N.eq; rewrite spec_le, spec_min. +generalize (Zmin_spec [n] [m]); omega. +Qed. + +Theorem NZmin_r : forall n m, m <= n -> N.min n m == m. +Proof. +intros n m; unfold N.eq; rewrite spec_le, spec_min. +generalize (Zmin_spec [n] [m]); omega. +Qed. + +Theorem NZmax_l : forall n m, m <= n -> N.max n m == n. +Proof. +intros n m; unfold N.eq; rewrite spec_le, spec_max. +generalize (Zmax_spec [n] [m]); omega. +Qed. + +Theorem NZmax_r : forall n m, n <= m -> N.max n m == m. +Proof. +intros n m; unfold N.eq; rewrite spec_le, spec_max. +generalize (Zmax_spec [n] [m]); omega. +Qed. + +End NZOrdAxiomsMod. + +Theorem pred_0 : N.pred 0 == 0. +Proof. +red; rewrite N.spec_pred0; rewrite N.spec_0; auto. +Qed. + +Definition recursion (A : Type) (a : A) (f : N.t -> A -> A) (n : N.t) := + Nrect (fun _ => A) a (fun n a => f (N.of_N n) a) (N.to_N n). +Implicit Arguments recursion [A]. + +Theorem recursion_wd : +forall (A : Type) (Aeq : relation A), + forall a a' : A, Aeq a a' -> + forall f f' : N.t -> A -> A, fun2_eq N.eq Aeq Aeq f f' -> + forall x x' : N.t, x == x' -> + Aeq (recursion a f x) (recursion a' f' x'). +Proof. +unfold fun2_wd, N.eq, fun2_eq. +intros A Aeq a a' Eaa' f f' Eff' x x' Exx'. +unfold recursion. +unfold N.to_N. +rewrite <- Exx'; clear x' Exx'. +replace (Zabs_N [x]) with (N_of_nat (Zabs_nat [x])). +induction (Zabs_nat [x]). +simpl; auto. +rewrite N_of_S, 2 Nrect_step; auto. +destruct [x]; simpl; auto. +change (nat_of_P p) with (nat_of_N (Npos p)); apply N_of_nat_of_N. +change (nat_of_P p) with (nat_of_N (Npos p)); apply N_of_nat_of_N. +Qed. + +Theorem recursion_0 : + forall (A : Type) (a : A) (f : N.t -> A -> A), recursion a f 0 = a. +Proof. +intros A a f; unfold recursion, N.to_N; rewrite N.spec_0; simpl; auto. +Qed. + +Theorem recursion_succ : + forall (A : Type) (Aeq : relation A) (a : A) (f : N.t -> A -> A), + Aeq a a -> fun2_wd N.eq Aeq Aeq f -> + forall n, Aeq (recursion a f (N.succ n)) (f n (recursion a f n)). +Proof. +unfold N.eq, recursion, fun2_wd; intros A Aeq a f EAaa f_wd n. +replace (N.to_N (N.succ n)) with (Nsucc (N.to_N n)). +rewrite Nrect_step. +apply f_wd; auto. +unfold N.to_N. +rewrite N.spec_of_N, Z_of_N_abs, Zabs_eq; auto. + apply N.spec_pos. + +fold (recursion a f n). +apply recursion_wd; auto. +red; auto. +red; auto. +unfold N.to_N. + +rewrite N.spec_succ. +change ([n]+1)%Z with (Zsucc [n]). +apply Z_of_N_eq_rev. +rewrite Z_of_N_succ. +rewrite 2 Z_of_N_abs. +rewrite 2 Zabs_eq; auto. +generalize (N.spec_pos n); auto with zarith. +apply N.spec_pos; auto. +Qed. + +End NSig_NAxioms. diff --git a/theories/Numbers/NumPrelude.v b/theories/Numbers/NumPrelude.v new file mode 100644 index 00000000..fdccf214 --- /dev/null +++ b/theories/Numbers/NumPrelude.v @@ -0,0 +1,267 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Prop := is_eq_true : eq_true true.*) +(* This has been added to theories/Datatypes.v *) +(*Coercion eq_true : bool >-> Sortclass.*) + +(*Theorem eq_true_unfold_pos : forall b : bool, b <-> b = true. +Proof. +intro b; split; intro H. now inversion H. now rewrite H. +Qed. + +Theorem eq_true_unfold_neg : forall b : bool, ~ b <-> b = false. +Proof. +intros b; destruct b; simpl; rewrite eq_true_unfold_pos. +split; intro H; [elim (H (refl_equal true)) | discriminate H]. +split; intro H; [reflexivity | discriminate]. +Qed. + +Theorem eq_true_or : forall b1 b2 : bool, b1 || b2 <-> b1 \/ b2. +Proof. +destruct b1; destruct b2; simpl; tauto. +Qed. + +Theorem eq_true_and : forall b1 b2 : bool, b1 && b2 <-> b1 /\ b2. +Proof. +destruct b1; destruct b2; simpl; tauto. +Qed. + +Theorem eq_true_neg : forall b : bool, negb b <-> ~ b. +Proof. +destruct b; simpl; rewrite eq_true_unfold_pos; rewrite eq_true_unfold_neg; +split; now intro. +Qed. + +Theorem eq_true_iff : forall b1 b2 : bool, b1 = b2 <-> (b1 <-> b2). +Proof. +intros b1 b2; split; intro H. +now rewrite H. +destruct b1; destruct b2; simpl; try reflexivity. +apply -> eq_true_unfold_neg. rewrite H. now intro. +symmetry; apply -> eq_true_unfold_neg. rewrite <- H; now intro. +Qed.*) + +(** Extension of the tactics stepl and stepr to make them +applicable to hypotheses *) + +Tactic Notation "stepl" constr(t1') "in" hyp(H) := +match (type of H) with +| ?R ?t1 ?t2 => + let H1 := fresh in + cut (R t1' t2); [clear H; intro H | stepl t1; [assumption |]] +| _ => fail 1 ": the hypothesis" H "does not have the form (R t1 t2)" +end. + +Tactic Notation "stepl" constr(t1') "in" hyp(H) "by" tactic(r) := stepl t1' in H; [| r]. + +Tactic Notation "stepr" constr(t2') "in" hyp(H) := +match (type of H) with +| ?R ?t1 ?t2 => + let H1 := fresh in + cut (R t1 t2'); [clear H; intro H | stepr t2; [assumption |]] +| _ => fail 1 ": the hypothesis" H "does not have the form (R t1 t2)" +end. + +Tactic Notation "stepr" constr(t2') "in" hyp(H) "by" tactic(r) := stepr t2' in H; [| r]. + +(** Extentional properties of predicates, relations and functions *) + +Definition predicate (A : Type) := A -> Prop. + +Section ExtensionalProperties. + +Variables A B C : Type. +Variable Aeq : relation A. +Variable Beq : relation B. +Variable Ceq : relation C. + +(* "wd" stands for "well-defined" *) + +Definition fun_wd (f : A -> B) := forall x y : A, Aeq x y -> Beq (f x) (f y). + +Definition fun2_wd (f : A -> B -> C) := + forall x x' : A, Aeq x x' -> forall y y' : B, Beq y y' -> Ceq (f x y) (f x' y'). + +Definition fun_eq : relation (A -> B) := + fun f f' => forall x x' : A, Aeq x x' -> Beq (f x) (f' x'). + +(* Note that reflexivity of fun_eq means that every function +is well-defined w.r.t. Aeq and Beq, i.e., +forall x x' : A, Aeq x x' -> Beq (f x) (f x') *) + +Definition fun2_eq (f f' : A -> B -> C) := + forall x x' : A, Aeq x x' -> forall y y' : B, Beq y y' -> Ceq (f x y) (f' x' y'). + +End ExtensionalProperties. + +(* The following definitions instantiate Beq or Ceq to iff; therefore, they +have to be outside the ExtensionalProperties section *) + +Definition predicate_wd (A : Type) (Aeq : relation A) := fun_wd Aeq iff. + +Definition relation_wd (A B : Type) (Aeq : relation A) (Beq : relation B) := + fun2_wd Aeq Beq iff. + +Definition relations_eq (A B : Type) (R1 R2 : A -> B -> Prop) := + forall (x : A) (y : B), R1 x y <-> R2 x y. + +Theorem relations_eq_equiv : + forall (A B : Type), equiv (A -> B -> Prop) (@relations_eq A B). +Proof. +intros A B; unfold equiv. split; [| split]; +unfold reflexive, symmetric, transitive, relations_eq. +reflexivity. +intros R1 R2 R3 H1 H2 x y; rewrite H1; apply H2. +now symmetry. +Qed. + +Add Parametric Relation (A B : Type) : (A -> B -> Prop) (@relations_eq A B) + reflexivity proved by (proj1 (relations_eq_equiv A B)) + symmetry proved by (proj2 (proj2 (relations_eq_equiv A B))) + transitivity proved by (proj1 (proj2 (relations_eq_equiv A B))) +as relations_eq_rel. + +Add Parametric Morphism (A : Type) : (@well_founded A) with signature (@relations_eq A A) ==> iff as well_founded_wd. +Proof. +unfold relations_eq, well_founded; intros R1 R2 H; +split; intros H1 a; induction (H1 a) as [x H2 H3]; constructor; +intros y H4; apply H3; [now apply <- H | now apply -> H]. +Qed. + +(* solve_predicate_wd solves the goal [predicate_wd P] for P consisting of +morhisms and quatifiers *) + +Ltac solve_predicate_wd := +unfold predicate_wd; +let x := fresh "x" in +let y := fresh "y" in +let H := fresh "H" in + intros x y H; setoid_rewrite H; reflexivity. + +(* solve_relation_wd solves the goal [relation_wd R] for R consisting of +morhisms and quatifiers *) + +Ltac solve_relation_wd := +unfold relation_wd, fun2_wd; +let x1 := fresh "x" in +let y1 := fresh "y" in +let H1 := fresh "H" in +let x2 := fresh "x" in +let y2 := fresh "y" in +let H2 := fresh "H" in + intros x1 y1 H1 x2 y2 H2; + rewrite H1; setoid_rewrite H2; reflexivity. + +(* The following tactic uses solve_predicate_wd to solve the goals +relating to well-defidedness that are produced by applying induction. +We declare it to take the tactic that applies the induction theorem +and not the induction theorem itself because the tactic may, for +example, supply additional arguments, as does NZinduct_center in +NZBase.v *) + +Ltac induction_maker n t := + try intros until n; + pattern n; t; clear n; + [solve_predicate_wd | ..]. + +(** Relations on cartesian product. Used in MiscFunct for defining +functions whose domain is a product of sets by primitive recursion *) + +Section RelationOnProduct. + +Variables A B : Set. +Variable Aeq : relation A. +Variable Beq : relation B. + +Hypothesis EA_equiv : equiv A Aeq. +Hypothesis EB_equiv : equiv B Beq. + +Definition prod_rel : relation (A * B) := + fun p1 p2 => Aeq (fst p1) (fst p2) /\ Beq (snd p1) (snd p2). + +Lemma prod_rel_refl : reflexive (A * B) prod_rel. +Proof. +unfold reflexive, prod_rel. +destruct x; split; [apply (proj1 EA_equiv) | apply (proj1 EB_equiv)]; simpl. +Qed. + +Lemma prod_rel_symm : symmetric (A * B) prod_rel. +Proof. +unfold symmetric, prod_rel. +destruct x; destruct y; +split; [apply (proj2 (proj2 EA_equiv)) | apply (proj2 (proj2 EB_equiv))]; simpl in *; tauto. +Qed. + +Lemma prod_rel_trans : transitive (A * B) prod_rel. +Proof. +unfold transitive, prod_rel. +destruct x; destruct y; destruct z; simpl. +intros; split; [apply (proj1 (proj2 EA_equiv)) with (y := a0) | +apply (proj1 (proj2 EB_equiv)) with (y := b0)]; tauto. +Qed. + +Theorem prod_rel_equiv : equiv (A * B) prod_rel. +Proof. +unfold equiv; split; [exact prod_rel_refl | split; [exact prod_rel_trans | exact prod_rel_symm]]. +Qed. + +End RelationOnProduct. + +Implicit Arguments prod_rel [A B]. +Implicit Arguments prod_rel_equiv [A B]. + +(** Miscellaneous *) + +(*Definition comp_bool (x y : comparison) : bool := +match x, y with +| Lt, Lt => true +| Eq, Eq => true +| Gt, Gt => true +| _, _ => false +end. + +Theorem comp_bool_correct : forall x y : comparison, + comp_bool x y <-> x = y. +Proof. +destruct x; destruct y; simpl; split; now intro. +Qed.*) + +Lemma eq_equiv : forall A : Set, equiv A (@eq A). +Proof. +intro A; unfold equiv, reflexive, symmetric, transitive. +repeat split; [exact (@trans_eq A) | exact (@sym_eq A)]. +(* It is interesting how the tactic split proves reflexivity *) +Qed. + +(*Add Relation (fun A : Set => A) LE_Set + reflexivity proved by (fun A : Set => (proj1 (eq_equiv A))) + symmetry proved by (fun A : Set => (proj2 (proj2 (eq_equiv A)))) + transitivity proved by (fun A : Set => (proj1 (proj2 (eq_equiv A)))) +as EA_rel.*) diff --git a/theories/Numbers/Rational/BigQ/BigQ.v b/theories/Numbers/Rational/BigQ/BigQ.v new file mode 100644 index 00000000..39e120f7 --- /dev/null +++ b/theories/Numbers/Rational/BigQ/BigQ.v @@ -0,0 +1,35 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* + Qq (BigZ.of_Z x) (BigN.of_N (Npos y)) + end. + + Definition to_Q (q: t) := + match q with + Qz x => BigZ.to_Z x # 1 + |Qq x y => if BigN.eq_bool y BigN.zero then 0 + else BigZ.to_Z x # Z2P (BigN.to_Z y) + end. + + Notation "[ x ]" := (to_Q x). + + Theorem strong_spec_of_Q: forall q: Q, [of_Q q] = q. + Proof. + intros (x,y); simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0. + rewrite BigN.spec_of_pos; intros HH; discriminate HH. + rewrite BigZ.spec_of_Z; simpl. + rewrite (BigN.spec_of_pos); auto. + Qed. + + Theorem spec_of_Q: forall q: Q, [of_Q q] == q. + Proof. + intros; rewrite strong_spec_of_Q; red; auto. + Qed. + + Definition eq x y := [x] == [y]. + + Definition zero: t := Qz BigZ.zero. + Definition one: t := Qz BigZ.one. + Definition minus_one: t := Qz BigZ.minus_one. + + Lemma spec_0: [zero] == 0. + Proof. + reflexivity. + Qed. + + Lemma spec_1: [one] == 1. + Proof. + reflexivity. + Qed. + + Lemma spec_m1: [minus_one] == -(1). + Proof. + reflexivity. + Qed. + + Definition opp (x: t): t := + match x with + | Qz zx => Qz (BigZ.opp zx) + | Qq nx dx => Qq (BigZ.opp nx) dx + end. + + Theorem strong_spec_opp: forall q, [opp q] = -[q]. + Proof. + intros [z | x y]; simpl. + rewrite BigZ.spec_opp; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0. + rewrite BigZ.spec_opp; auto. + Qed. + + Theorem spec_opp : forall q, [opp q] == -[q]. + Proof. + intros; rewrite strong_spec_opp; red; auto. + Qed. + + Definition compare (x y: t) := + match x, y with + | Qz zx, Qz zy => BigZ.compare zx zy + | Qz zx, Qq ny dy => + if BigN.eq_bool dy BigN.zero then BigZ.compare zx BigZ.zero + else BigZ.compare (BigZ.mul zx (BigZ.Pos dy)) ny + | Qq nx dx, Qz zy => + if BigN.eq_bool dx BigN.zero then BigZ.compare BigZ.zero zy + else BigZ.compare nx (BigZ.mul zy (BigZ.Pos dx)) + | Qq nx dx, Qq ny dy => + match BigN.eq_bool dx BigN.zero, BigN.eq_bool dy BigN.zero with + | true, true => Eq + | true, false => BigZ.compare BigZ.zero ny + | false, true => BigZ.compare nx BigZ.zero + | false, false => BigZ.compare (BigZ.mul nx (BigZ.Pos dy)) (BigZ.mul ny (BigZ.Pos dx)) + end + end. + + Theorem spec_compare: forall q1 q2, (compare q1 q2) = ([q1] ?= [q2]). + Proof. + intros [z1 | x1 y1] [z2 | x2 y2]; + unfold Qcompare, compare, to_Q, Qnum, Qden. + repeat rewrite Zmult_1_r. + generalize (BigZ.spec_compare z1 z2); case BigZ.compare; intros H; auto. + rewrite H; rewrite Zcompare_refl; auto. + rewrite Zmult_1_r. + generalize (BigN.spec_eq_bool y2 BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH. + rewrite Zmult_1_r; generalize (BigZ.spec_compare z1 BigZ.zero); + case BigZ.compare; auto. + rewrite BigZ.spec_0; intros HH1; rewrite HH1; rewrite Zcompare_refl; auto. + rewrite Z2P_correct; auto with zarith. + 2: generalize (BigN.spec_pos y2); auto with zarith. + generalize (BigZ.spec_compare (z1 * BigZ.Pos y2) x2)%bigZ; case BigZ.compare; + rewrite BigZ.spec_mul; simpl; intros H; apply sym_equal; auto. + rewrite H; rewrite Zcompare_refl; auto. + generalize (BigN.spec_eq_bool y1 BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH. + rewrite Zmult_0_l; rewrite Zmult_1_r. + generalize (BigZ.spec_compare BigZ.zero z2); + case BigZ.compare; auto. + rewrite BigZ.spec_0; intros HH1; rewrite <- HH1; rewrite Zcompare_refl; auto. + rewrite Z2P_correct; auto with zarith. + 2: generalize (BigN.spec_pos y1); auto with zarith. + rewrite Zmult_1_r. + generalize (BigZ.spec_compare x1 (z2 * BigZ.Pos y1))%bigZ; case BigZ.compare; + rewrite BigZ.spec_mul; simpl; intros H; apply sym_equal; auto. + rewrite H; rewrite Zcompare_refl; auto. + generalize (BigN.spec_eq_bool y1 BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH. + generalize (BigN.spec_eq_bool y2 BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH1. + rewrite Zcompare_refl; auto. + rewrite Zmult_0_l; rewrite Zmult_1_r. + generalize (BigZ.spec_compare BigZ.zero x2); + case BigZ.compare; auto. + rewrite BigZ.spec_0; intros HH2; rewrite <- HH2; rewrite Zcompare_refl; auto. + generalize (BigN.spec_eq_bool y2 BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH1. + rewrite Zmult_0_l; rewrite Zmult_1_r. + generalize (BigZ.spec_compare x1 BigZ.zero)%bigZ; case BigZ.compare; + auto; rewrite BigZ.spec_0. + intros HH2; rewrite <- HH2; rewrite Zcompare_refl; auto. + repeat rewrite Z2P_correct. + 2: generalize (BigN.spec_pos y1); auto with zarith. + 2: generalize (BigN.spec_pos y2); auto with zarith. + generalize (BigZ.spec_compare (x1 * BigZ.Pos y2) + (x2 * BigZ.Pos y1))%bigZ; case BigZ.compare; + repeat rewrite BigZ.spec_mul; simpl; intros H; apply sym_equal; auto. + rewrite H; rewrite Zcompare_refl; auto. + Qed. + + Definition lt n m := compare n m = Lt. + Definition le n m := compare n m <> Gt. + Definition min n m := match compare n m with Gt => m | _ => n end. + Definition max n m := match compare n m with Lt => m | _ => n end. + +(* Je pense que cette fonction normalise bien ... *) + Definition norm n d: t := + let gcd := BigN.gcd (BigZ.to_N n) d in + match BigN.compare BigN.one gcd with + | Lt => + let n := BigZ.div n (BigZ.Pos gcd) in + let d := BigN.div d gcd in + match BigN.compare d BigN.one with + | Gt => Qq n d + | Eq => Qz n + | Lt => zero + end + | Eq => Qq n d + | Gt => zero (* gcd = 0 => both numbers are 0 *) + end. + + Theorem spec_norm: forall n q, [norm n q] == [Qq n q]. + Proof. + intros p q; unfold norm. + assert (Hp := BigN.spec_pos (BigZ.to_N p)). + match goal with |- context[BigN.compare ?X ?Y] => + generalize (BigN.spec_compare X Y); case BigN.compare + end; auto; rewrite BigN.spec_1; rewrite BigN.spec_gcd; intros H1. + apply Qeq_refl. + generalize (BigN.spec_pos (q / BigN.gcd (BigZ.to_N p) q)%bigN). + match goal with |- context[BigN.compare ?X ?Y] => + generalize (BigN.spec_compare X Y); case BigN.compare + end; auto; rewrite BigN.spec_1; rewrite BigN.spec_div; + rewrite BigN.spec_gcd; auto with zarith; intros H2 HH. + red; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; intros H3; simpl; + rewrite BigZ.spec_div; simpl; rewrite BigN.spec_gcd; + auto with zarith. + generalize H2; rewrite H3; + rewrite Zdiv_0_l; auto with zarith. + generalize H1 H2 H3 (BigN.spec_pos q); clear H1 H2 H3. + rewrite spec_to_N. + set (a := (BigN.to_Z (BigZ.to_N p))). + set (b := (BigN.to_Z q)). + intros H1 H2 H3 H4; rewrite Z2P_correct; auto with zarith. + rewrite Zgcd_div_swap; auto with zarith. + rewrite H2; ring. + red; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; intros H3; simpl. + case H3. + generalize H1 H2 H3 HH; clear H1 H2 H3 HH. + set (a := (BigN.to_Z (BigZ.to_N p))). + set (b := (BigN.to_Z q)). + intros H1 H2 H3 HH. + rewrite (Zdivide_Zdiv_eq (Zgcd a b) b); auto with zarith. + case (Zle_lt_or_eq _ _ HH); auto with zarith. + intros HH1; rewrite <- HH1; ring. + generalize (Zgcd_is_gcd a b); intros HH1; inversion HH1; auto. + red; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; rewrite BigN.spec_div; + rewrite BigN.spec_gcd; auto with zarith; intros H3. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; intros H4. + case H3; rewrite H4; rewrite Zdiv_0_l; auto with zarith. + simpl. + assert (FF := BigN.spec_pos q). + rewrite Z2P_correct; auto with zarith. + rewrite <- BigN.spec_gcd; rewrite <- BigN.spec_div; auto with zarith. + rewrite Z2P_correct; auto with zarith. + rewrite BigN.spec_div; rewrite BigN.spec_gcd; auto with zarith. + simpl; rewrite BigZ.spec_div; simpl. + rewrite BigN.spec_gcd; auto with zarith. + generalize H1 H2 H3 H4 HH FF; clear H1 H2 H3 H4 HH FF. + set (a := (BigN.to_Z (BigZ.to_N p))). + set (b := (BigN.to_Z q)). + intros H1 H2 H3 H4 HH FF. + rewrite spec_to_N; fold a. + rewrite Zgcd_div_swap; auto with zarith. + rewrite BigN.spec_gcd; auto with zarith. + rewrite BigN.spec_div; + rewrite BigN.spec_gcd; auto with zarith. + rewrite BigN.spec_gcd; auto with zarith. + case (Zle_lt_or_eq _ _ + (BigN.spec_pos (BigN.gcd (BigZ.to_N p) q))); + rewrite BigN.spec_gcd; auto with zarith. + intros; apply False_ind; auto with zarith. + intros HH2; assert (FF1 := Zgcd_inv_0_l _ _ (sym_equal HH2)). + assert (FF2 := Zgcd_inv_0_l _ _ (sym_equal HH2)). + red; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; intros H2; simpl. + rewrite spec_to_N. + rewrite FF2; ring. + Qed. + + + Definition add (x y: t): t := + match x with + | Qz zx => + match y with + | Qz zy => Qz (BigZ.add zx zy) + | Qq ny dy => + if BigN.eq_bool dy BigN.zero then x + else Qq (BigZ.add (BigZ.mul zx (BigZ.Pos dy)) ny) dy + end + | Qq nx dx => + if BigN.eq_bool dx BigN.zero then y + else match y with + | Qz zy => Qq (BigZ.add nx (BigZ.mul zy (BigZ.Pos dx))) dx + | Qq ny dy => + if BigN.eq_bool dy BigN.zero then x + else + let n := BigZ.add (BigZ.mul nx (BigZ.Pos dy)) (BigZ.mul ny (BigZ.Pos dx)) in + let d := BigN.mul dx dy in + Qq n d + end + end. + + Theorem spec_add : forall x y, [add x y] == [x] + [y]. + Proof. + intros [x | nx dx] [y | ny dy]; unfold Qplus; simpl. + rewrite BigZ.spec_add; repeat rewrite Zmult_1_r; auto. + intros; apply Qeq_refl; auto. + assert (F1:= BigN.spec_pos dy). + rewrite Zmult_1_r; red; simpl. + generalize (BigN.spec_eq_bool dy BigN.zero); + case BigN.eq_bool; + rewrite BigN.spec_0; intros HH; simpl; try ring. + generalize (BigN.spec_eq_bool dy BigN.zero); + case BigN.eq_bool; + rewrite BigN.spec_0; intros HH1; simpl; try ring. + case HH; auto. + rewrite Z2P_correct; auto with zarith. + rewrite BigZ.spec_add; rewrite BigZ.spec_mul; simpl; auto. + generalize (BigN.spec_eq_bool dx BigN.zero); + case BigN.eq_bool; + rewrite BigN.spec_0; intros HH; simpl; try ring. + rewrite Zmult_1_r; apply Qeq_refl. + generalize (BigN.spec_eq_bool dx BigN.zero); + case BigN.eq_bool; + rewrite BigN.spec_0; intros HH1; simpl; try ring. + case HH; auto. + rewrite Z2P_correct; auto with zarith. + rewrite BigZ.spec_add; rewrite BigZ.spec_mul; simpl; auto. + rewrite Zmult_1_r; rewrite Pmult_1_r. + apply Qeq_refl. + assert (F1:= BigN.spec_pos dx); auto with zarith. + generalize (BigN.spec_eq_bool dx BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH. + generalize (BigN.spec_eq_bool dy BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH1. + simpl. + generalize (BigN.spec_eq_bool dy BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH2. + apply Qeq_refl. + case HH2; auto. + simpl. + generalize (BigN.spec_eq_bool dy BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH2. + case HH2; auto. + case HH1; auto. + rewrite Zmult_1_r; apply Qeq_refl. + generalize (BigN.spec_eq_bool dy BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH1. + simpl. + generalize (BigN.spec_eq_bool dx BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH2. + case HH; auto. + rewrite Zmult_1_r; rewrite Zplus_0_r; rewrite Pmult_1_r. + apply Qeq_refl. + simpl. + generalize (BigN.spec_eq_bool (dx * dy)%bigN BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_mul; + rewrite BigN.spec_0; intros HH2. + (case (Zmult_integral _ _ HH2); intros HH3); + [case HH| case HH1]; auto. + rewrite BigZ.spec_add; repeat rewrite BigZ.spec_mul; simpl. + assert (Fx: (0 < BigN.to_Z dx)%Z). + generalize (BigN.spec_pos dx); auto with zarith. + assert (Fy: (0 < BigN.to_Z dy)%Z). + generalize (BigN.spec_pos dy); auto with zarith. + red; simpl; rewrite Zpos_mult_morphism. + repeat rewrite Z2P_correct; auto with zarith. + apply Zmult_lt_0_compat; auto. + Qed. + + Definition add_norm (x y: t): t := + match x with + | Qz zx => + match y with + | Qz zy => Qz (BigZ.add zx zy) + | Qq ny dy => + if BigN.eq_bool dy BigN.zero then x + else norm (BigZ.add (BigZ.mul zx (BigZ.Pos dy)) ny) dy + end + | Qq nx dx => + if BigN.eq_bool dx BigN.zero then y + else match y with + | Qz zy => norm (BigZ.add nx (BigZ.mul zy (BigZ.Pos dx))) dx + | Qq ny dy => + if BigN.eq_bool dy BigN.zero then x + else + let n := BigZ.add (BigZ.mul nx (BigZ.Pos dy)) (BigZ.mul ny (BigZ.Pos dx)) in + let d := BigN.mul dx dy in + norm n d + end + end. + + Theorem spec_add_norm : forall x y, [add_norm x y] == [x] + [y]. + Proof. + intros x y; rewrite <- spec_add; auto. + case x; case y; clear x y; unfold add_norm, add. + intros; apply Qeq_refl. + intros p1 n p2. + generalize (BigN.spec_eq_bool n BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH. + apply Qeq_refl. + match goal with |- [norm ?X ?Y] == _ => + apply Qeq_trans with ([Qq X Y]); + [apply spec_norm | idtac] + end. + simpl. + generalize (BigN.spec_eq_bool n BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH1. + apply Qeq_refl. + apply Qeq_refl. + intros p1 p2 n. + generalize (BigN.spec_eq_bool n BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH. + apply Qeq_refl. + match goal with |- [norm ?X ?Y] == _ => + apply Qeq_trans with ([Qq X Y]); + [apply spec_norm | idtac] + end. + apply Qeq_refl. + intros p1 q1 p2 q2. + generalize (BigN.spec_eq_bool q2 BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH1. + apply Qeq_refl. + generalize (BigN.spec_eq_bool q1 BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH2. + apply Qeq_refl. + match goal with |- [norm ?X ?Y] == _ => + apply Qeq_trans with ([Qq X Y]); + [apply spec_norm | idtac] + end. + apply Qeq_refl. + Qed. + + Definition sub x y := add x (opp y). + + Theorem spec_sub : forall x y, [sub x y] == [x] - [y]. + Proof. + intros x y; unfold sub; rewrite spec_add; auto. + rewrite spec_opp; ring. + Qed. + + Definition sub_norm x y := add_norm x (opp y). + + Theorem spec_sub_norm : forall x y, [sub_norm x y] == [x] - [y]. + Proof. + intros x y; unfold sub_norm; rewrite spec_add_norm; auto. + rewrite spec_opp; ring. + Qed. + + Definition mul (x y: t): t := + match x, y with + | Qz zx, Qz zy => Qz (BigZ.mul zx zy) + | Qz zx, Qq ny dy => Qq (BigZ.mul zx ny) dy + | Qq nx dx, Qz zy => Qq (BigZ.mul nx zy) dx + | Qq nx dx, Qq ny dy => Qq (BigZ.mul nx ny) (BigN.mul dx dy) + end. + + Theorem spec_mul : forall x y, [mul x y] == [x] * [y]. + Proof. + intros [x | nx dx] [y | ny dy]; unfold Qmult; simpl. + rewrite BigZ.spec_mul; repeat rewrite Zmult_1_r; auto. + intros; apply Qeq_refl; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros HH1. + red; simpl; ring. + rewrite BigZ.spec_mul; apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros HH1. + red; simpl; ring. + rewrite BigZ.spec_mul; rewrite Pmult_1_r. + apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; rewrite BigN.spec_mul; + intros HH1. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros HH2. + red; simpl; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros HH3. + red; simpl; ring. + case (Zmult_integral _ _ HH1); intros HH. + case HH2; auto. + case HH3; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros HH2. + case HH1; rewrite HH2; ring. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros HH3. + case HH1; rewrite HH3; ring. + rewrite BigZ.spec_mul. + assert (tmp: + (forall a b, 0 < a -> 0 < b -> Z2P (a * b) = (Z2P a * Z2P b)%positive)%Z). + intros [|a|a] [|b|b]; simpl; auto; intros; apply False_ind; auto with zarith. + rewrite tmp; auto. + apply Qeq_refl. + generalize (BigN.spec_pos dx); auto with zarith. + generalize (BigN.spec_pos dy); auto with zarith. + Qed. + +Definition mul_norm (x y: t): t := + match x, y with + | Qz zx, Qz zy => Qz (BigZ.mul zx zy) + | Qz zx, Qq ny dy => + if BigZ.eq_bool zx BigZ.zero then zero + else + let gcd := BigN.gcd (BigZ.to_N zx) dy in + match BigN.compare gcd BigN.one with + Gt => + let zx := BigZ.div zx (BigZ.Pos gcd) in + let d := BigN.div dy gcd in + if BigN.eq_bool d BigN.one then Qz (BigZ.mul zx ny) + else Qq (BigZ.mul zx ny) d + | _ => Qq (BigZ.mul zx ny) dy + end + | Qq nx dx, Qz zy => + if BigZ.eq_bool zy BigZ.zero then zero + else + let gcd := BigN.gcd (BigZ.to_N zy) dx in + match BigN.compare gcd BigN.one with + Gt => + let zy := BigZ.div zy (BigZ.Pos gcd) in + let d := BigN.div dx gcd in + if BigN.eq_bool d BigN.one then Qz (BigZ.mul zy nx) + else Qq (BigZ.mul zy nx) d + | _ => Qq (BigZ.mul zy nx) dx + end + | Qq nx dx, Qq ny dy => + let (nx, dy) := + let gcd := BigN.gcd (BigZ.to_N nx) dy in + match BigN.compare gcd BigN.one with + Gt => (BigZ.div nx (BigZ.Pos gcd), BigN.div dy gcd) + | _ => (nx, dy) + end in + let (ny, dx) := + let gcd := BigN.gcd (BigZ.to_N ny) dx in + match BigN.compare gcd BigN.one with + Gt => (BigZ.div ny (BigZ.Pos gcd), BigN.div dx gcd) + | _ => (ny, dx) + end in + let d := (BigN.mul dx dy) in + if BigN.eq_bool d BigN.one then Qz (BigZ.mul ny nx) + else Qq (BigZ.mul ny nx) d + end. + + Theorem spec_mul_norm : forall x y, [mul_norm x y] == [x] * [y]. + Proof. + intros x y; rewrite <- spec_mul; auto. + unfold mul_norm, mul; case x; case y; clear x y. + intros; apply Qeq_refl. + intros p1 n p2. + set (a := BigN.to_Z (BigZ.to_N p2)). + set (b := BigN.to_Z n). + match goal with |- context[BigZ.eq_bool ?X ?Y] => + generalize (BigZ.spec_eq_bool X Y); case BigZ.eq_bool + end; unfold zero, to_Q; repeat rewrite BigZ.spec_0; intros H. + case BigN.eq_bool; try apply Qeq_refl. + rewrite BigZ.spec_mul; rewrite H. + red; simpl; ring. + assert (F: (0 < a)%Z). + case (Zle_lt_or_eq _ _ (BigN.spec_pos (BigZ.to_N p2))); auto. + intros H1; case H; rewrite spec_to_N; rewrite <- H1; ring. + match goal with |- context[BigN.compare ?X ?Y] => + generalize (BigN.spec_compare X Y); case BigN.compare + end; rewrite BigN.spec_1; rewrite BigN.spec_gcd; + fold a b; intros H1. + apply Qeq_refl. + apply Qeq_refl. + assert (F0 : (0 < (Zgcd a b))%Z). + apply Zlt_trans with 1%Z. + red; auto. + apply Zgt_lt; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_1; rewrite BigN.spec_div; + rewrite BigN.spec_gcd; auto with zarith; + fold a b; intros H2. + assert (F1: b = Zgcd a b). + pattern b at 1; rewrite (Zdivide_Zdiv_eq (Zgcd a b) b); + auto with zarith. + rewrite H2; ring. + assert (FF := Zgcd_is_gcd a b); inversion FF; auto. + assert (F2: (0 < b)%Z). + rewrite F1; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; fold b; intros H3. + rewrite H3 in F2; discriminate F2. + rewrite BigZ.spec_mul. + rewrite BigZ.spec_div; simpl; rewrite BigN.spec_gcd; + fold a b; auto with zarith. + rewrite BigZ.spec_mul. + red; simpl; rewrite Z2P_correct; auto. + rewrite Zmult_1_r; rewrite spec_to_N; fold a b. + repeat rewrite <- Zmult_assoc. + rewrite (Zmult_comm (BigZ.to_Z p1)). + repeat rewrite Zmult_assoc. + rewrite Zgcd_div_swap; auto with zarith. + rewrite H2; ring. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; rewrite BigN.spec_div; + rewrite BigN.spec_gcd; fold a b; auto; intros H3. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H4. + apply Qeq_refl. + case H4; fold b. + rewrite (Zdivide_Zdiv_eq (Zgcd a b) b); auto. + rewrite H3; ring. + assert (FF := Zgcd_is_gcd a b); inversion FF; auto. + simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; fold b; intros H4. + case H3; rewrite H4; rewrite Zdiv_0_l; auto. + rewrite BigZ.spec_mul; rewrite BigZ.spec_div; simpl; + rewrite BigN.spec_gcd; fold a b; auto with zarith. + assert (F1: (0 < b)%Z). + case (Zle_lt_or_eq _ _ (BigN.spec_pos n)); fold b; auto with zarith. + red; simpl. + rewrite BigZ.spec_mul. + repeat rewrite Z2P_correct; auto. + rewrite spec_to_N; fold a. + repeat rewrite <- Zmult_assoc. + rewrite (Zmult_comm (BigZ.to_Z p1)). + repeat rewrite Zmult_assoc. + rewrite Zgcd_div_swap; auto with zarith. + ring. + apply Zgcd_div_pos; auto. + intros p1 p2 n. + set (a := BigN.to_Z (BigZ.to_N p1)). + set (b := BigN.to_Z n). + match goal with |- context[BigZ.eq_bool ?X ?Y] => + generalize (BigZ.spec_eq_bool X Y); case BigZ.eq_bool + end; unfold zero, to_Q; repeat rewrite BigZ.spec_0; intros H. + case BigN.eq_bool; try apply Qeq_refl. + rewrite BigZ.spec_mul; rewrite H. + red; simpl; ring. + assert (F: (0 < a)%Z). + case (Zle_lt_or_eq _ _ (BigN.spec_pos (BigZ.to_N p1))); auto. + intros H1; case H; rewrite spec_to_N; rewrite <- H1; ring. + match goal with |- context[BigN.compare ?X ?Y] => + generalize (BigN.spec_compare X Y); case BigN.compare + end; rewrite BigN.spec_1; rewrite BigN.spec_gcd; + fold a b; intros H1. + repeat rewrite BigZ.spec_mul; rewrite Zmult_comm. + apply Qeq_refl. + repeat rewrite BigZ.spec_mul; rewrite Zmult_comm. + apply Qeq_refl. + assert (F0 : (0 < (Zgcd a b))%Z). + apply Zlt_trans with 1%Z. + red; auto. + apply Zgt_lt; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_1; rewrite BigN.spec_div; + rewrite BigN.spec_gcd; auto with zarith; + fold a b; intros H2. + assert (F1: b = Zgcd a b). + pattern b at 1; rewrite (Zdivide_Zdiv_eq (Zgcd a b) b); + auto with zarith. + rewrite H2; ring. + assert (FF := Zgcd_is_gcd a b); inversion FF; auto. + assert (F2: (0 < b)%Z). + rewrite F1; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; fold b; intros H3. + rewrite H3 in F2; discriminate F2. + rewrite BigZ.spec_mul. + rewrite BigZ.spec_div; simpl; rewrite BigN.spec_gcd; + fold a b; auto with zarith. + rewrite BigZ.spec_mul. + red; simpl; rewrite Z2P_correct; auto. + rewrite Zmult_1_r; rewrite spec_to_N; fold a b. + repeat rewrite <- Zmult_assoc. + rewrite (Zmult_comm (BigZ.to_Z p2)). + repeat rewrite Zmult_assoc. + rewrite Zgcd_div_swap; auto with zarith. + rewrite H2; ring. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; rewrite BigN.spec_div; + rewrite BigN.spec_gcd; fold a b; auto; intros H3. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H4. + apply Qeq_refl. + case H4; fold b. + rewrite (Zdivide_Zdiv_eq (Zgcd a b) b); auto. + rewrite H3; ring. + assert (FF := Zgcd_is_gcd a b); inversion FF; auto. + simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; fold b; intros H4. + case H3; rewrite H4; rewrite Zdiv_0_l; auto. + rewrite BigZ.spec_mul; rewrite BigZ.spec_div; simpl; + rewrite BigN.spec_gcd; fold a b; auto with zarith. + assert (F1: (0 < b)%Z). + case (Zle_lt_or_eq _ _ (BigN.spec_pos n)); fold b; auto with zarith. + red; simpl. + rewrite BigZ.spec_mul. + repeat rewrite Z2P_correct; auto. + rewrite spec_to_N; fold a. + repeat rewrite <- Zmult_assoc. + rewrite (Zmult_comm (BigZ.to_Z p2)). + repeat rewrite Zmult_assoc. + rewrite Zgcd_div_swap; auto with zarith. + ring. + apply Zgcd_div_pos; auto. + set (f := fun p t => + match (BigN.gcd (BigZ.to_N p) t ?= BigN.one)%bigN with + | Eq => (p, t) + | Lt => (p, t) + | Gt => + ((p / BigZ.Pos (BigN.gcd (BigZ.to_N p) t))%bigZ, + (t / BigN.gcd (BigZ.to_N p) t)%bigN) + end). + assert (F: forall p t, + let (n, d) := f p t in [Qq p t] == [Qq n d]). + intros p t1; unfold f. + match goal with |- context[BigN.compare ?X ?Y] => + generalize (BigN.spec_compare X Y); case BigN.compare + end; rewrite BigN.spec_1; rewrite BigN.spec_gcd; intros H1. + apply Qeq_refl. + apply Qeq_refl. + set (a := BigN.to_Z (BigZ.to_N p)). + set (b := BigN.to_Z t1). + fold a b in H1. + assert (F0 : (0 < (Zgcd a b))%Z). + apply Zlt_trans with 1%Z. + red; auto. + apply Zgt_lt; auto. + red; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; fold b; intros HH1. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; fold b; intros HH2. + simpl; ring. + case HH2. + rewrite BigN.spec_div; rewrite BigN.spec_gcd; fold a b; auto. + rewrite HH1; rewrite Zdiv_0_l; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; + rewrite BigN.spec_div; rewrite BigN.spec_gcd; fold a b; auto; + intros HH2. + case HH1. + rewrite (Zdivide_Zdiv_eq (Zgcd a b) b); auto. + rewrite HH2; ring. + assert (FF := Zgcd_is_gcd a b); inversion FF; auto. + simpl. + rewrite BigZ.spec_div; simpl; rewrite BigN.spec_gcd; fold a b; auto with zarith. + assert (F1: (0 < b)%Z). + case (Zle_lt_or_eq _ _ (BigN.spec_pos t1)); fold b; auto with zarith. + intros HH; case HH1; auto. + repeat rewrite Z2P_correct; auto. + rewrite spec_to_N; fold a. + rewrite Zgcd_div_swap; auto. + apply Zgcd_div_pos; auto. + intros HH; rewrite HH in F0; discriminate F0. + intros p1 n1 p2 n2. + change ([let (nx , dy) := f p2 n1 in + let (ny, dx) := f p1 n2 in + if BigN.eq_bool (dx * dy)%bigN BigN.one + then Qz (ny * nx) + else Qq (ny * nx) (dx * dy)] == [Qq (p2 * p1) (n2 * n1)]). + generalize (F p2 n1) (F p1 n2). + case f; case f. + intros u1 u2 v1 v2 Hu1 Hv1. + apply Qeq_trans with [mul (Qq p2 n1) (Qq p1 n2)]. + rewrite spec_mul; rewrite Hu1; rewrite Hv1. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_1; rewrite BigN.spec_mul; intros HH1. + assert (F1: BigN.to_Z u2 = 1%Z). + case (Zmult_1_inversion_l _ _ HH1); auto. + generalize (BigN.spec_pos u2); auto with zarith. + assert (F2: BigN.to_Z v2 = 1%Z). + rewrite Zmult_comm in HH1. + case (Zmult_1_inversion_l _ _ HH1); auto. + generalize (BigN.spec_pos v2); auto with zarith. + red; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1. + rewrite H1 in F2; discriminate F2. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H2. + rewrite H2 in F1; discriminate F1. + simpl; rewrite BigZ.spec_mul. + rewrite F1; rewrite F2; simpl; ring. + rewrite Qmult_comm; rewrite <- spec_mul. + apply Qeq_refl. + red; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; rewrite BigN.spec_mul; + rewrite Zmult_comm; intros H1. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; rewrite BigN.spec_mul; intros H2; auto. + case H2; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; rewrite BigN.spec_mul; intros H2; auto. + case H1; auto. + Qed. + + +Definition inv (x: t): t := + match x with + | Qz (BigZ.Pos n) => Qq BigZ.one n + | Qz (BigZ.Neg n) => Qq BigZ.minus_one n + | Qq (BigZ.Pos n) d => Qq (BigZ.Pos d) n + | Qq (BigZ.Neg n) d => Qq (BigZ.Neg d) n + end. + + Theorem spec_inv : forall x, [inv x] == /[x]. + Proof. + intros [ [x | x] | [nx | nx] dx]; unfold inv, Qinv; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1; auto. + rewrite H1; apply Qeq_refl. + generalize H1 (BigN.spec_pos x); case (BigN.to_Z x); auto. + intros HH; case HH; auto. + intros; red; simpl; auto. + intros p _ HH; case HH; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1; auto. + rewrite H1; apply Qeq_refl. + generalize H1 (BigN.spec_pos x); case (BigN.to_Z x); simpl; + auto. + intros HH; case HH; auto. + intros; red; simpl; auto. + intros p _ HH; case HH; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H2; simpl; auto. + apply Qeq_refl. + rewrite H1; apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H2; simpl; auto. + rewrite H2; red; simpl; auto. + generalize H1 (BigN.spec_pos nx); case (BigN.to_Z nx); simpl; + auto. + intros HH; case HH; auto. + intros; red; simpl. + rewrite Zpos_mult_morphism. + rewrite Z2P_correct; auto. + generalize (BigN.spec_pos dx); auto with zarith. + intros p _ HH; case HH; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H2; simpl; auto. + apply Qeq_refl. + rewrite H1; apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H2; simpl; auto. + rewrite H2; red; simpl; auto. + generalize H1 (BigN.spec_pos nx); case (BigN.to_Z nx); simpl; + auto. + intros HH; case HH; auto. + intros; red; simpl. + assert (tmp: forall x, Zneg x = Zopp (Zpos x)); auto. + rewrite tmp. + rewrite Zpos_mult_morphism. + rewrite Z2P_correct; auto. + ring. + generalize (BigN.spec_pos dx); auto with zarith. + intros p _ HH; case HH; auto. + Qed. + +Definition inv_norm (x: t): t := + match x with + | Qz (BigZ.Pos n) => + match BigN.compare n BigN.one with + Gt => Qq BigZ.one n + | _ => x + end + | Qz (BigZ.Neg n) => + match BigN.compare n BigN.one with + Gt => Qq BigZ.minus_one n + | _ => x + end + | Qq (BigZ.Pos n) d => + match BigN.compare n BigN.one with + Gt => Qq (BigZ.Pos d) n + | Eq => Qz (BigZ.Pos d) + | Lt => Qz (BigZ.zero) + end + | Qq (BigZ.Neg n) d => + match BigN.compare n BigN.one with + Gt => Qq (BigZ.Neg d) n + | Eq => Qz (BigZ.Neg d) + | Lt => Qz (BigZ.zero) + end + end. + + Theorem spec_inv_norm : forall x, [inv_norm x] == /[x]. + Proof. + intros [ [x | x] | [nx | nx] dx]; unfold inv_norm, Qinv. + match goal with |- context[BigN.compare ?X ?Y] => + generalize (BigN.spec_compare X Y); case BigN.compare + end; rewrite BigN.spec_1; intros H. + simpl; rewrite H; apply Qeq_refl. + case (Zle_lt_or_eq _ _ (BigN.spec_pos x)); simpl. + generalize H; case BigN.to_Z. + intros _ HH; discriminate HH. + intros p; case p; auto. + intros p1 HH; discriminate HH. + intros p1 HH; discriminate HH. + intros HH; discriminate HH. + intros p _ HH; discriminate HH. + intros HH; rewrite <- HH. + apply Qeq_refl. + generalize H; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1. + rewrite H1; intros HH; discriminate. + generalize H; case BigN.to_Z. + intros HH; discriminate HH. + intros; red; simpl; auto. + intros p HH; discriminate HH. + match goal with |- context[BigN.compare ?X ?Y] => + generalize (BigN.spec_compare X Y); case BigN.compare + end; rewrite BigN.spec_1; intros H. + simpl; rewrite H; apply Qeq_refl. + case (Zle_lt_or_eq _ _ (BigN.spec_pos x)); simpl. + generalize H; case BigN.to_Z. + intros _ HH; discriminate HH. + intros p; case p; auto. + intros p1 HH; discriminate HH. + intros p1 HH; discriminate HH. + intros HH; discriminate HH. + intros p _ HH; discriminate HH. + intros HH; rewrite <- HH. + apply Qeq_refl. + generalize H; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1. + rewrite H1; intros HH; discriminate. + generalize H; case BigN.to_Z. + intros HH; discriminate HH. + intros; red; simpl; auto. + intros p HH; discriminate HH. + simpl Qnum. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1; simpl. + case BigN.compare; red; simpl; auto. + rewrite H1; auto. + case BigN.eq_bool; auto. + simpl; rewrite H1; auto. + match goal with |- context[BigN.compare ?X ?Y] => + generalize (BigN.spec_compare X Y); case BigN.compare + end; rewrite BigN.spec_1; intros H2. + rewrite H2. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H3. + case H1; auto. + red; simpl. + rewrite Zmult_1_r; rewrite Pmult_1_r; rewrite Z2P_correct; auto. + generalize (BigN.spec_pos dx); auto with zarith. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H3. + case H1; auto. + generalize H2 (BigN.spec_pos nx); case (BigN.to_Z nx). + intros; apply Qeq_refl. + intros p; case p; clear p. + intros p HH; discriminate HH. + intros p HH; discriminate HH. + intros HH; discriminate HH. + intros p _ HH; case HH; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H3. + case H1; auto. + simpl; generalize H2; case (BigN.to_Z nx). + intros HH; discriminate HH. + intros p Hp. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H4. + rewrite H4 in H2; discriminate H2. + red; simpl. + rewrite Zpos_mult_morphism. + rewrite Z2P_correct; auto. + generalize (BigN.spec_pos dx); auto with zarith. + intros p HH; discriminate HH. + simpl Qnum. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1; simpl. + case BigN.compare; red; simpl; auto. + rewrite H1; auto. + case BigN.eq_bool; auto. + simpl; rewrite H1; auto. + match goal with |- context[BigN.compare ?X ?Y] => + generalize (BigN.spec_compare X Y); case BigN.compare + end; rewrite BigN.spec_1; intros H2. + rewrite H2. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H3. + case H1; auto. + red; simpl. + assert (tmp: forall x, Zneg x = Zopp (Zpos x)); auto. + rewrite tmp. + rewrite Zmult_1_r; rewrite Pmult_1_r; rewrite Z2P_correct; auto. + generalize (BigN.spec_pos dx); auto with zarith. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H3. + case H1; auto. + generalize H2 (BigN.spec_pos nx); case (BigN.to_Z nx). + intros; apply Qeq_refl. + intros p; case p; clear p. + intros p HH; discriminate HH. + intros p HH; discriminate HH. + intros HH; discriminate HH. + intros p _ HH; case HH; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H3. + case H1; auto. + simpl; generalize H2; case (BigN.to_Z nx). + intros HH; discriminate HH. + intros p Hp. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H4. + rewrite H4 in H2; discriminate H2. + red; simpl. + assert (tmp: forall x, Zneg x = Zopp (Zpos x)); auto. + rewrite tmp. + rewrite Zpos_mult_morphism. + rewrite Z2P_correct; auto. + ring. + generalize (BigN.spec_pos dx); auto with zarith. + intros p HH; discriminate HH. + Qed. + + Definition div x y := mul x (inv y). + + Theorem spec_div x y: [div x y] == [x] / [y]. + Proof. + intros x y; unfold div; rewrite spec_mul; auto. + unfold Qdiv; apply Qmult_comp. + apply Qeq_refl. + apply spec_inv; auto. + Qed. + + Definition div_norm x y := mul_norm x (inv y). + + Theorem spec_div_norm x y: [div_norm x y] == [x] / [y]. + Proof. + intros x y; unfold div_norm; rewrite spec_mul_norm; auto. + unfold Qdiv; apply Qmult_comp. + apply Qeq_refl. + apply spec_inv; auto. + Qed. + + Definition square (x: t): t := + match x with + | Qz zx => Qz (BigZ.square zx) + | Qq nx dx => Qq (BigZ.square nx) (BigN.square dx) + end. + + Theorem spec_square : forall x, [square x] == [x] ^ 2. + Proof. + intros [ x | nx dx]; unfold square. + red; simpl; rewrite BigZ.spec_square; auto with zarith. + simpl Qpower. + repeat match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; intros H. + red; simpl. + repeat match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; rewrite BigN.spec_square; + intros H1. + case H1; rewrite H; auto. + red; simpl. + repeat match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; rewrite BigN.spec_square; + intros H1. + case H; case (Zmult_integral _ _ H1); auto. + simpl. + rewrite BigZ.spec_square. + rewrite Zpos_mult_morphism. + assert (tmp: + (forall a b, 0 < a -> 0 < b -> Z2P (a * b) = (Z2P a * Z2P b)%positive)%Z). + intros [|a|a] [|b|b]; simpl; auto; intros; apply False_ind; auto with zarith. + rewrite tmp; auto. + generalize (BigN.spec_pos dx); auto with zarith. + generalize (BigN.spec_pos dx); auto with zarith. + Qed. + + Definition power_pos (x: t) p: t := + match x with + | Qz zx => Qz (BigZ.power_pos zx p) + | Qq nx dx => Qq (BigZ.power_pos nx p) (BigN.power_pos dx p) + end. + + Theorem spec_power_pos : forall x p, [power_pos x p] == [x] ^ Zpos p. + Proof. + intros [x | nx dx] p; unfold power_pos. + unfold power_pos; red; simpl. + generalize (Qpower_decomp p (BigZ.to_Z x) 1). + unfold Qeq; simpl. + rewrite Zpower_pos_1_l; simpl Z2P. + rewrite Zmult_1_r. + intros H; rewrite H. + rewrite BigZ.spec_power_pos; simpl; ring. + simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; rewrite BigN.spec_power_pos; intros H1. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; intros H2. + elim p; simpl. + intros; red; simpl; auto. + intros p1 Hp1; rewrite <- Hp1; red; simpl; auto. + apply Qeq_refl. + case H2; generalize H1. + elim p; simpl. + intros p1 Hrec. + change (xI p1) with (1 + (xO p1))%positive. + rewrite Zpower_pos_is_exp; rewrite Zpower_pos_1_r. + intros HH; case (Zmult_integral _ _ HH); auto. + rewrite <- Pplus_diag. + rewrite Zpower_pos_is_exp. + intros HH1; case (Zmult_integral _ _ HH1); auto. + intros p1 Hrec. + rewrite <- Pplus_diag. + rewrite Zpower_pos_is_exp. + intros HH1; case (Zmult_integral _ _ HH1); auto. + rewrite Zpower_pos_1_r; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; intros H2. + case H1; rewrite H2; auto. + simpl; rewrite Zpower_pos_0_l; auto. + assert (F1: (0 < BigN.to_Z dx)%Z). + generalize (BigN.spec_pos dx); auto with zarith. + assert (F2: (0 < BigN.to_Z dx ^ ' p)%Z). + unfold Zpower; apply Zpower_pos_pos; auto. + unfold power_pos; red; simpl. + generalize (Qpower_decomp p (BigZ.to_Z nx) + (Z2P (BigN.to_Z dx))). + unfold Qeq; simpl. + repeat rewrite Z2P_correct; auto. + unfold Qeq; simpl; intros HH. + rewrite HH. + rewrite BigZ.spec_power_pos; simpl; ring. + Qed. + + (** Interaction with [Qcanon.Qc] *) + + Open Scope Qc_scope. + + Definition of_Qc q := of_Q (this q). + + Definition to_Qc q := !!(to_Q q). + + Notation "[[ x ]]" := (to_Qc x). + + Theorem spec_of_Qc: forall q, [[of_Qc q]] = q. + Proof. + intros (x, Hx); unfold of_Qc, to_Qc; simpl. + apply Qc_decomp; simpl. + intros. + rewrite <- H0 at 2; apply Qred_complete. + apply spec_of_Q. + Qed. + + Theorem spec_oppc: forall q, [[opp q]] = -[[q]]. + Proof. + intros q; unfold Qcopp, to_Qc, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + rewrite spec_opp. + rewrite <- Qred_opp. + rewrite Qred_correct; red; auto. + Qed. + + Theorem spec_comparec: forall q1 q2, + compare q1 q2 = ([[q1]] ?= [[q2]]). + Proof. + unfold Qccompare, to_Qc. + intros q1 q2; rewrite spec_compare; simpl; auto. + apply Qcompare_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Theorem spec_addc x y: + [[add x y]] = [[x]] + [[y]]. + Proof. + intros x y; unfold to_Qc. + apply trans_equal with (!! ([x] + [y])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_add; auto. + unfold Qcplus, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qplus_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Theorem spec_add_normc x y: + [[add_norm x y]] = [[x]] + [[y]]. + Proof. + intros x y; unfold to_Qc. + apply trans_equal with (!! ([x] + [y])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_add_norm; auto. + unfold Qcplus, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qplus_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Theorem spec_subc x y: [[sub x y]] = [[x]] - [[y]]. + Proof. + intros x y; unfold sub; rewrite spec_addc; auto. + rewrite spec_oppc; ring. + Qed. + + Theorem spec_sub_normc x y: + [[sub_norm x y]] = [[x]] - [[y]]. + intros x y; unfold sub_norm; rewrite spec_add_normc; auto. + rewrite spec_oppc; ring. + Qed. + + Theorem spec_mulc x y: + [[mul x y]] = [[x]] * [[y]]. + Proof. + intros x y; unfold to_Qc. + apply trans_equal with (!! ([x] * [y])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_mul; auto. + unfold Qcmult, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qmult_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Theorem spec_mul_normc x y: + [[mul_norm x y]] = [[x]] * [[y]]. + Proof. + intros x y; unfold to_Qc. + apply trans_equal with (!! ([x] * [y])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_mul_norm; auto. + unfold Qcmult, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qmult_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Theorem spec_invc x: + [[inv x]] = /[[x]]. + Proof. + intros x; unfold to_Qc. + apply trans_equal with (!! (/[x])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_inv; auto. + unfold Qcinv, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qinv_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Theorem spec_inv_normc x: + [[inv_norm x]] = /[[x]]. + Proof. + intros x; unfold to_Qc. + apply trans_equal with (!! (/[x])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_inv_norm; auto. + unfold Qcinv, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qinv_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Theorem spec_divc x y: [[div x y]] = [[x]] / [[y]]. + Proof. + intros x y; unfold div; rewrite spec_mulc; auto. + unfold Qcdiv; apply f_equal2 with (f := Qcmult); auto. + apply spec_invc; auto. + Qed. + + Theorem spec_div_normc x y: [[div_norm x y]] = [[x]] / [[y]]. + Proof. + intros x y; unfold div_norm; rewrite spec_mul_normc; auto. + unfold Qcdiv; apply f_equal2 with (f := Qcmult); auto. + apply spec_invc; auto. + Qed. + + Theorem spec_squarec x: [[square x]] = [[x]]^2. + Proof. + intros x; unfold to_Qc. + apply trans_equal with (!! ([x]^2)). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_square; auto. + simpl Qcpower. + replace (!! [x] * 1) with (!![x]); try ring. + simpl. + unfold Qcmult, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qmult_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Theorem spec_power_posc x p: + [[power_pos x p]] = [[x]] ^ nat_of_P p. + Proof. + intros x p; unfold to_Qc. + apply trans_equal with (!! ([x]^Zpos p)). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_power_pos; auto. + pattern p; apply Pind; clear p. + simpl; ring. + intros p Hrec. + rewrite nat_of_P_succ_morphism; simpl Qcpower. + rewrite <- Hrec. + unfold Qcmult, Q2Qc. + apply Qc_decomp; intros _ _; + unfold this. + apply Qred_complete. + assert (F: [x] ^ ' Psucc p == [x] * [x] ^ ' p). + simpl; case x; simpl; clear x Hrec. + intros x; simpl; repeat rewrite Qpower_decomp; simpl. + red; simpl; repeat rewrite Zpower_pos_1_l; simpl Z2P. + rewrite Pplus_one_succ_l. + rewrite Zpower_pos_is_exp. + rewrite Zpower_pos_1_r; auto. + intros nx dx. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0. + unfold Qpower_positive. + assert (tmp: forall p, pow_pos Qmult 0%Q p = 0%Q). + intros p1; elim p1; simpl; auto; clear p1. + intros p1 Hp1; rewrite Hp1; auto. + intros p1 Hp1; rewrite Hp1; auto. + repeat rewrite tmp; intros; red; simpl; auto. + intros H1. + assert (F1: (0 < BigN.to_Z dx)%Z). + generalize (BigN.spec_pos dx); auto with zarith. + simpl; repeat rewrite Qpower_decomp; simpl. + red; simpl; repeat rewrite Zpower_pos_1_l; simpl Z2P. + rewrite Pplus_one_succ_l. + rewrite Zpower_pos_is_exp. + rewrite Zpower_pos_1_r; auto. + repeat rewrite Zpos_mult_morphism. + repeat rewrite Z2P_correct; auto. + 2: apply Zpower_pos_pos; auto. + 2: apply Zpower_pos_pos; auto. + rewrite Zpower_pos_is_exp. + rewrite Zpower_pos_1_r; auto. + rewrite F. + apply Qmult_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + +End Q0. diff --git a/theories/Numbers/Rational/BigQ/QMake_base.v b/theories/Numbers/Rational/BigQ/QMake_base.v new file mode 100644 index 00000000..547e74b7 --- /dev/null +++ b/theories/Numbers/Rational/BigQ/QMake_base.v @@ -0,0 +1,34 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* q_type + | Qq : BigZ.t -> BigN.t -> q_type. + +Definition print_type x := + match x with + | Qz _ => Z + | _ => (Z*Z)%type + end. + +Definition print x := + match x return print_type x with + | Qz zx => BigZ.to_Z zx + | Qq nx dx => (BigZ.to_Z nx, BigN.to_Z dx) + end. diff --git a/theories/Numbers/Rational/BigQ/QbiMake.v b/theories/Numbers/Rational/BigQ/QbiMake.v new file mode 100644 index 00000000..699f383e --- /dev/null +++ b/theories/Numbers/Rational/BigQ/QbiMake.v @@ -0,0 +1,1066 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* + Qq (BigZ.of_Z x) (BigN.of_N (Npos y)) + end. + + Definition of_Qc q := of_Q (this q). + + Definition to_Q (q: t) := + match q with + Qz x => BigZ.to_Z x # 1 + |Qq x y => if BigN.eq_bool y BigN.zero then 0%Q + else BigZ.to_Z x # Z2P (BigN.to_Z y) + end. + + Definition to_Qc q := !!(to_Q q). + + Notation "[[ x ]]" := (to_Qc x). + + Notation "[ x ]" := (to_Q x). + + Theorem spec_to_Q: forall q: Q, [of_Q q] = q. + intros (x,y); simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0. + rewrite BigN.spec_of_pos; intros HH; discriminate HH. + rewrite BigZ.spec_of_Z; simpl. + rewrite (BigN.spec_of_pos); auto. + Qed. + + Theorem spec_to_Qc: forall q, [[of_Qc q]] = q. + intros (x, Hx); unfold of_Qc, to_Qc; simpl. + apply Qc_decomp; simpl. + intros; rewrite spec_to_Q; auto. + Qed. + + Definition opp (x: t): t := + match x with + | Qz zx => Qz (BigZ.opp zx) + | Qq nx dx => Qq (BigZ.opp nx) dx + end. + + Theorem spec_opp: forall q, ([opp q] = -[q])%Q. + intros [z | x y]; simpl. + rewrite BigZ.spec_opp; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0. + rewrite BigZ.spec_opp; auto. + Qed. + + Theorem spec_oppc: forall q, [[opp q]] = -[[q]]. + intros q; unfold Qcopp, to_Qc, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + rewrite spec_opp. + rewrite <- Qred_opp. + rewrite Qred_involutive; auto. + Qed. + + + Definition compare (x y: t) := + match x, y with + | Qz zx, Qz zy => BigZ.compare zx zy + | Qz zx, Qq ny dy => + if BigN.eq_bool dy BigN.zero then BigZ.compare zx BigZ.zero + else + match BigZ.cmp_sign zx ny with + | Lt => Lt + | Gt => Gt + | Eq => BigZ.compare (BigZ.mul zx (BigZ.Pos dy)) ny + end + | Qq nx dx, Qz zy => + if BigN.eq_bool dx BigN.zero then BigZ.compare BigZ.zero zy + else + match BigZ.cmp_sign nx zy with + | Lt => Lt + | Gt => Gt + | Eq => BigZ.compare nx (BigZ.mul zy (BigZ.Pos dx)) + end + | Qq nx dx, Qq ny dy => + match BigN.eq_bool dx BigN.zero, BigN.eq_bool dy BigN.zero with + | true, true => Eq + | true, false => BigZ.compare BigZ.zero ny + | false, true => BigZ.compare nx BigZ.zero + | false, false => + match BigZ.cmp_sign nx ny with + | Lt => Lt + | Gt => Gt + | Eq => BigZ.compare (BigZ.mul nx (BigZ.Pos dy)) (BigZ.mul ny (BigZ.Pos dx)) + end + end + end. + + Theorem spec_compare: forall q1 q2, + compare q1 q2 = ([q1] ?= [q2])%Q. + intros [z1 | x1 y1] [z2 | x2 y2]; + unfold Qcompare, compare, to_Q, Qnum, Qden. + repeat rewrite Zmult_1_r. + generalize (BigZ.spec_compare z1 z2); case BigZ.compare; intros H; auto. + rewrite H; rewrite Zcompare_refl; auto. + rewrite Zmult_1_r. + generalize (BigN.spec_eq_bool y2 BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH. + rewrite Zmult_1_r; generalize (BigZ.spec_compare z1 BigZ.zero); + case BigZ.compare; auto. + rewrite BigZ.spec_0; intros HH1; rewrite HH1; rewrite Zcompare_refl; auto. + set (a := BigZ.to_Z z1); set (b := BigZ.to_Z x2); + set (c := BigN.to_Z y2); fold c in HH. + assert (F: (0 < c)%Z). + case (Zle_lt_or_eq _ _ (BigN.spec_pos y2)); fold c; auto. + intros H1; case HH; rewrite <- H1; auto. + rewrite Z2P_correct; auto with zarith. + generalize (BigZ.spec_cmp_sign z1 x2); case BigZ.cmp_sign; fold a b c. + intros _; generalize (BigZ.spec_compare (z1 * BigZ.Pos y2)%bigZ x2); + case BigZ.compare; rewrite BigZ.spec_mul; simpl; fold a b c; auto. + intros H1; rewrite H1; rewrite Zcompare_refl; auto. + intros (H1, H2); apply sym_equal; change (a * c < b)%Z. + apply Zlt_le_trans with (2 := H2). + change 0%Z with (0 * c)%Z. + apply Zmult_lt_compat_r; auto with zarith. + intros (H1, H2); apply sym_equal; change (a * c > b)%Z. + apply Zlt_gt. + apply Zlt_le_trans with (1 := H2). + change 0%Z with (0 * c)%Z. + apply Zmult_le_compat_r; auto with zarith. + generalize (BigN.spec_eq_bool y1 BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH. + rewrite Zmult_0_l; rewrite Zmult_1_r. + generalize (BigZ.spec_compare BigZ.zero z2); + case BigZ.compare; auto. + rewrite BigZ.spec_0; intros HH1; rewrite <- HH1; rewrite Zcompare_refl; auto. + set (a := BigZ.to_Z z2); set (b := BigZ.to_Z x1); + set (c := BigN.to_Z y1); fold c in HH. + assert (F: (0 < c)%Z). + case (Zle_lt_or_eq _ _ (BigN.spec_pos y1)); fold c; auto. + intros H1; case HH; rewrite <- H1; auto. + rewrite Zmult_1_r; rewrite Z2P_correct; auto with zarith. + generalize (BigZ.spec_cmp_sign x1 z2); case BigZ.cmp_sign; fold a b c. + intros _; generalize (BigZ.spec_compare x1 (z2 * BigZ.Pos y1)%bigZ); + case BigZ.compare; rewrite BigZ.spec_mul; simpl; fold a b c; auto. + intros H1; rewrite H1; rewrite Zcompare_refl; auto. + intros (H1, H2); apply sym_equal; change (b < a * c)%Z. + apply Zlt_le_trans with (1 := H1). + change 0%Z with (0 * c)%Z. + apply Zmult_le_compat_r; auto with zarith. + intros (H1, H2); apply sym_equal; change (b > a * c)%Z. + apply Zlt_gt. + apply Zlt_le_trans with (2 := H1). + change 0%Z with (0 * c)%Z. + apply Zmult_lt_compat_r; auto with zarith. + generalize (BigN.spec_eq_bool y1 BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH. + generalize (BigN.spec_eq_bool y2 BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH1. + rewrite Zcompare_refl; auto. + rewrite Zmult_0_l; rewrite Zmult_1_r. + generalize (BigZ.spec_compare BigZ.zero x2); + case BigZ.compare; auto. + rewrite BigZ.spec_0; intros HH2; rewrite <- HH2; rewrite Zcompare_refl; auto. + generalize (BigN.spec_eq_bool y2 BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH1. + rewrite Zmult_0_l; rewrite Zmult_1_r. + generalize (BigZ.spec_compare x1 BigZ.zero)%bigZ; case BigZ.compare; + auto; rewrite BigZ.spec_0. + intros HH2; rewrite <- HH2; rewrite Zcompare_refl; auto. + set (a := BigZ.to_Z x1); set (b := BigZ.to_Z x2); + set (c1 := BigN.to_Z y1); set (c2 := BigN.to_Z y2). + fold c1 in HH; fold c2 in HH1. + assert (F1: (0 < c1)%Z). + case (Zle_lt_or_eq _ _ (BigN.spec_pos y1)); fold c1; auto. + intros H1; case HH; rewrite <- H1; auto. + assert (F2: (0 < c2)%Z). + case (Zle_lt_or_eq _ _ (BigN.spec_pos y2)); fold c2; auto. + intros H1; case HH1; rewrite <- H1; auto. + repeat rewrite Z2P_correct; auto. + generalize (BigZ.spec_cmp_sign x1 x2); case BigZ.cmp_sign. + intros _; generalize (BigZ.spec_compare (x1 * BigZ.Pos y2)%bigZ + (x2 * BigZ.Pos y1)%bigZ); + case BigZ.compare; rewrite BigZ.spec_mul; simpl; fold a b c1 c2; auto. + rewrite BigZ.spec_mul; simpl; fold a b c1; intros HH2; rewrite HH2; + rewrite Zcompare_refl; auto. + rewrite BigZ.spec_mul; simpl; auto. + rewrite BigZ.spec_mul; simpl; auto. + fold a b; intros (H1, H2); apply sym_equal; change (a * c2 < b * c1)%Z. + apply Zlt_le_trans with 0%Z. + change 0%Z with (0 * c2)%Z. + apply Zmult_lt_compat_r; auto with zarith. + apply Zmult_le_0_compat; auto with zarith. + fold a b; intros (H1, H2); apply sym_equal; change (a * c2 > b * c1)%Z. + apply Zlt_gt; apply Zlt_le_trans with 0%Z. + change 0%Z with (0 * c1)%Z. + apply Zmult_lt_compat_r; auto with zarith. + apply Zmult_le_0_compat; auto with zarith. + Qed. + + + Definition do_norm_n n := + match n with + | BigN.N0 _ => false + | BigN.N1 _ => false + | BigN.N2 _ => false + | BigN.N3 _ => false + | BigN.N4 _ => false + | BigN.N5 _ => false + | BigN.N6 _ => false + | _ => true + end. + + Definition do_norm_z z := + match z with + | BigZ.Pos n => do_norm_n n + | BigZ.Neg n => do_norm_n n + end. + +(* Je pense que cette fonction normalise bien ... *) + Definition norm n d: t := + if andb (do_norm_z n) (do_norm_n d) then + let gcd := BigN.gcd (BigZ.to_N n) d in + match BigN.compare BigN.one gcd with + | Lt => + let n := BigZ.div n (BigZ.Pos gcd) in + let d := BigN.div d gcd in + match BigN.compare d BigN.one with + | Gt => Qq n d + | Eq => Qz n + | Lt => zero + end + | Eq => Qq n d + | Gt => zero (* gcd = 0 => both numbers are 0 *) + end + else Qq n d. + + Theorem spec_norm: forall n q, + ([norm n q] == [Qq n q])%Q. + intros p q; unfold norm. + case do_norm_z; simpl andb. + 2: apply Qeq_refl. + case do_norm_n. + 2: apply Qeq_refl. + assert (Hp := BigN.spec_pos (BigZ.to_N p)). + match goal with |- context[BigN.compare ?X ?Y] => + generalize (BigN.spec_compare X Y); case BigN.compare + end; auto; rewrite BigN.spec_1; rewrite BigN.spec_gcd; intros H1. + apply Qeq_refl. + generalize (BigN.spec_pos (q / BigN.gcd (BigZ.to_N p) q)%bigN). + match goal with |- context[BigN.compare ?X ?Y] => + generalize (BigN.spec_compare X Y); case BigN.compare + end; auto; rewrite BigN.spec_1; rewrite BigN.spec_div; + rewrite BigN.spec_gcd; auto with zarith; intros H2 HH. + red; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; intros H3; simpl; + rewrite BigZ.spec_div; simpl; rewrite BigN.spec_gcd; + auto with zarith. + generalize H2; rewrite H3; + rewrite Zdiv_0_l; auto with zarith. + generalize H1 H2 H3 (BigN.spec_pos q); clear H1 H2 H3. + rewrite spec_to_N. + set (a := (BigN.to_Z (BigZ.to_N p))). + set (b := (BigN.to_Z q)). + intros H1 H2 H3 H4; rewrite Z2P_correct; auto with zarith. + rewrite Zgcd_div_swap; auto with zarith. + rewrite H2; ring. + red; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; intros H3; simpl. + case H3. + generalize H1 H2 H3 HH; clear H1 H2 H3 HH. + set (a := (BigN.to_Z (BigZ.to_N p))). + set (b := (BigN.to_Z q)). + intros H1 H2 H3 HH. + rewrite (Zdivide_Zdiv_eq (Zgcd a b) b); auto with zarith. + case (Zle_lt_or_eq _ _ HH); auto with zarith. + intros HH1; rewrite <- HH1; ring. + generalize (Zgcd_is_gcd a b); intros HH1; inversion HH1; auto. + red; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; rewrite BigN.spec_div; + rewrite BigN.spec_gcd; auto with zarith; intros H3. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; intros H4. + case H3; rewrite H4; rewrite Zdiv_0_l; auto with zarith. + simpl. + assert (FF := BigN.spec_pos q). + rewrite Z2P_correct; auto with zarith. + rewrite <- BigN.spec_gcd; rewrite <- BigN.spec_div; auto with zarith. + rewrite Z2P_correct; auto with zarith. + rewrite BigN.spec_div; rewrite BigN.spec_gcd; auto with zarith. + simpl; rewrite BigZ.spec_div; simpl. + rewrite BigN.spec_gcd; auto with zarith. + generalize H1 H2 H3 H4 HH FF; clear H1 H2 H3 H4 HH FF. + set (a := (BigN.to_Z (BigZ.to_N p))). + set (b := (BigN.to_Z q)). + intros H1 H2 H3 H4 HH FF. + rewrite spec_to_N; fold a. + rewrite Zgcd_div_swap; auto with zarith. + rewrite BigN.spec_gcd; auto with zarith. + rewrite BigN.spec_div; + rewrite BigN.spec_gcd; auto with zarith. + rewrite BigN.spec_gcd; auto with zarith. + case (Zle_lt_or_eq _ _ + (BigN.spec_pos (BigN.gcd (BigZ.to_N p) q))); + rewrite BigN.spec_gcd; auto with zarith. + intros; apply False_ind; auto with zarith. + intros HH2; assert (FF1 := Zgcd_inv_0_l _ _ (sym_equal HH2)). + assert (FF2 := Zgcd_inv_0_l _ _ (sym_equal HH2)). + red; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; intros H2; simpl. + rewrite spec_to_N. + rewrite FF2; ring. + Qed. + + Definition add (x y: t): t := + match x with + | Qz zx => + match y with + | Qz zy => Qz (BigZ.add zx zy) + | Qq ny dy => + if BigN.eq_bool dy BigN.zero then x + else Qq (BigZ.add (BigZ.mul zx (BigZ.Pos dy)) ny) dy + end + | Qq nx dx => + if BigN.eq_bool dx BigN.zero then y + else match y with + | Qz zy => Qq (BigZ.add nx (BigZ.mul zy (BigZ.Pos dx))) dx + | Qq ny dy => + if BigN.eq_bool dy BigN.zero then x + else + if BigN.eq_bool dx dy then + let n := BigZ.add nx ny in + Qq n dx + else + let n := BigZ.add (BigZ.mul nx (BigZ.Pos dy)) (BigZ.mul ny (BigZ.Pos dx)) in + let d := BigN.mul dx dy in + Qq n d + end + end. + + + + Theorem spec_add x y: + ([add x y] == [x] + [y])%Q. + intros [x | nx dx] [y | ny dy]; unfold Qplus; simpl. + rewrite BigZ.spec_add; repeat rewrite Zmult_1_r; auto. + intros; apply Qeq_refl; auto. + assert (F1:= BigN.spec_pos dy). + rewrite Zmult_1_r; red; simpl. + generalize (BigN.spec_eq_bool dy BigN.zero); + case BigN.eq_bool; + rewrite BigN.spec_0; intros HH; simpl; try ring. + generalize (BigN.spec_eq_bool dy BigN.zero); + case BigN.eq_bool; + rewrite BigN.spec_0; intros HH1; simpl; try ring. + case HH; auto. + rewrite Z2P_correct; auto with zarith. + rewrite BigZ.spec_add; rewrite BigZ.spec_mul; simpl; auto. + generalize (BigN.spec_eq_bool dx BigN.zero); + case BigN.eq_bool; + rewrite BigN.spec_0; intros HH; simpl; try ring. + rewrite Zmult_1_r; apply Qeq_refl. + generalize (BigN.spec_eq_bool dx BigN.zero); + case BigN.eq_bool; + rewrite BigN.spec_0; intros HH1; simpl; try ring. + case HH; auto. + rewrite Z2P_correct; auto with zarith. + rewrite BigZ.spec_add; rewrite BigZ.spec_mul; simpl; auto. + rewrite Zmult_1_r; rewrite Pmult_1_r. + apply Qeq_refl. + assert (F1:= BigN.spec_pos dx); auto with zarith. + generalize (BigN.spec_eq_bool dx BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH. + generalize (BigN.spec_eq_bool dy BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH1. + simpl. + generalize (BigN.spec_eq_bool dy BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH2. + apply Qeq_refl. + case HH2; auto. + simpl. + generalize (BigN.spec_eq_bool dy BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH2. + case HH2; auto. + case HH1; auto. + rewrite Zmult_1_r; apply Qeq_refl. + generalize (BigN.spec_eq_bool dy BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH1. + simpl. + generalize (BigN.spec_eq_bool dx BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH2. + case HH; auto. + rewrite Zmult_1_r; rewrite Zplus_0_r; rewrite Pmult_1_r. + apply Qeq_refl. + simpl. + generalize (BigN.spec_eq_bool (dx * dy)%bigN BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_mul; + rewrite BigN.spec_0; intros HH2. + (case (Zmult_integral _ _ HH2); intros HH3); + [case HH| case HH1]; auto. + generalize (BigN.spec_eq_bool dx dy); + case BigN.eq_bool; intros HH3. + rewrite <- HH3. + assert (Fx: (0 < BigN.to_Z dx)%Z). + generalize (BigN.spec_pos dx); auto with zarith. + red; simpl. + generalize (BigN.spec_eq_bool dx BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH4. + case HH; auto. + simpl; rewrite Zpos_mult_morphism. + repeat rewrite Z2P_correct; auto with zarith. + rewrite BigZ.spec_add; repeat rewrite BigZ.spec_mul; simpl. + ring. + assert (Fx: (0 < BigN.to_Z dx)%Z). + generalize (BigN.spec_pos dx); auto with zarith. + assert (Fy: (0 < BigN.to_Z dy)%Z). + generalize (BigN.spec_pos dy); auto with zarith. + red; simpl; rewrite Zpos_mult_morphism. + repeat rewrite Z2P_correct; auto with zarith. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_mul; + rewrite BigN.spec_0; intros H3; simpl. + absurd (0 < 0)%Z; auto with zarith. + rewrite BigZ.spec_add; repeat rewrite BigZ.spec_mul; simpl. + repeat rewrite Z2P_correct; auto with zarith. + apply Zmult_lt_0_compat; auto. + Qed. + + Theorem spec_addc x y: + [[add x y]] = [[x]] + [[y]]. + intros x y; unfold to_Qc. + apply trans_equal with (!! ([x] + [y])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_add; auto. + unfold Qcplus, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qplus_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Definition add_norm (x y: t): t := + match x with + | Qz zx => + match y with + | Qz zy => Qz (BigZ.add zx zy) + | Qq ny dy => + if BigN.eq_bool dy BigN.zero then x + else + norm (BigZ.add (BigZ.mul zx (BigZ.Pos dy)) ny) dy + end + | Qq nx dx => + if BigN.eq_bool dx BigN.zero then y + else match y with + | Qz zy => norm (BigZ.add nx (BigZ.mul zy (BigZ.Pos dx))) dx + | Qq ny dy => + if BigN.eq_bool dy BigN.zero then x + else + if BigN.eq_bool dx dy then + let n := BigZ.add nx ny in + norm n dx + else + let n := BigZ.add (BigZ.mul nx (BigZ.Pos dy)) (BigZ.mul ny (BigZ.Pos dx)) in + let d := BigN.mul dx dy in + norm n d + end + end. + + Theorem spec_add_norm x y: + ([add_norm x y] == [x] + [y])%Q. + intros x y; rewrite <- spec_add; auto. + case x; case y; clear x y; unfold add_norm, add. + intros; apply Qeq_refl. + intros p1 n p2. + generalize (BigN.spec_eq_bool n BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH. + apply Qeq_refl. + match goal with |- [norm ?X ?Y] == _ => + apply Qeq_trans with ([Qq X Y]); + [apply spec_norm | idtac] + end. + simpl. + generalize (BigN.spec_eq_bool n BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH1. + apply Qeq_refl. + apply Qeq_refl. + intros p1 p2 n. + generalize (BigN.spec_eq_bool n BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH. + apply Qeq_refl. + match goal with |- [norm ?X ?Y] == _ => + apply Qeq_trans with ([Qq X Y]); + [apply spec_norm | idtac] + end. + apply Qeq_refl. + intros p1 q1 p2 q2. + generalize (BigN.spec_eq_bool q2 BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH1. + apply Qeq_refl. + generalize (BigN.spec_eq_bool q1 BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH2. + apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; intros HH3; + match goal with |- [norm ?X ?Y] == _ => + apply Qeq_trans with ([Qq X Y]); + [apply spec_norm | idtac] + end; apply Qeq_refl. + Qed. + + Theorem spec_add_normc x y: + [[add_norm x y]] = [[x]] + [[y]]. + intros x y; unfold to_Qc. + apply trans_equal with (!! ([x] + [y])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_add_norm; auto. + unfold Qcplus, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qplus_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Definition sub x y := add x (opp y). + + Theorem spec_sub x y: + ([sub x y] == [x] - [y])%Q. + intros x y; unfold sub; rewrite spec_add; auto. + rewrite spec_opp; ring. + Qed. + + Theorem spec_subc x y: [[sub x y]] = [[x]] - [[y]]. + intros x y; unfold sub; rewrite spec_addc; auto. + rewrite spec_oppc; ring. + Qed. + + Definition sub_norm x y := add_norm x (opp y). + + Theorem spec_sub_norm x y: + ([sub_norm x y] == [x] - [y])%Q. + intros x y; unfold sub_norm; rewrite spec_add_norm; auto. + rewrite spec_opp; ring. + Qed. + + Theorem spec_sub_normc x y: + [[sub_norm x y]] = [[x]] - [[y]]. + intros x y; unfold sub_norm; rewrite spec_add_normc; auto. + rewrite spec_oppc; ring. + Qed. + + Definition mul (x y: t): t := + match x, y with + | Qz zx, Qz zy => Qz (BigZ.mul zx zy) + | Qz zx, Qq ny dy => Qq (BigZ.mul zx ny) dy + | Qq nx dx, Qz zy => Qq (BigZ.mul nx zy) dx + | Qq nx dx, Qq ny dy => Qq (BigZ.mul nx ny) (BigN.mul dx dy) + end. + + Theorem spec_mul x y: ([mul x y] == [x] * [y])%Q. + intros [x | nx dx] [y | ny dy]; unfold Qmult; simpl. + rewrite BigZ.spec_mul; repeat rewrite Zmult_1_r; auto. + intros; apply Qeq_refl; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros HH1. + red; simpl; ring. + rewrite BigZ.spec_mul; apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros HH1. + red; simpl; ring. + rewrite BigZ.spec_mul; rewrite Pmult_1_r. + apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; rewrite BigN.spec_mul; + intros HH1. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros HH2. + red; simpl; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros HH3. + red; simpl; ring. + case (Zmult_integral _ _ HH1); intros HH. + case HH2; auto. + case HH3; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros HH2. + case HH1; rewrite HH2; ring. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros HH3. + case HH1; rewrite HH3; ring. + rewrite BigZ.spec_mul. + assert (tmp: + (forall a b, 0 < a -> 0 < b -> Z2P (a * b) = (Z2P a * Z2P b)%positive)%Z). + intros [|a|a] [|b|b]; simpl; auto; intros; apply False_ind; auto with zarith. + rewrite tmp; auto. + apply Qeq_refl. + generalize (BigN.spec_pos dx); auto with zarith. + generalize (BigN.spec_pos dy); auto with zarith. + Qed. + + Theorem spec_mulc x y: + [[mul x y]] = [[x]] * [[y]]. + intros x y; unfold to_Qc. + apply trans_equal with (!! ([x] * [y])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_mul; auto. + unfold Qcmult, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qmult_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Definition mul_norm (x y: t): t := + match x, y with + | Qz zx, Qz zy => Qz (BigZ.mul zx zy) + | Qz zx, Qq ny dy => mul (Qz ny) (norm zx dy) + | Qq nx dx, Qz zy => mul (Qz nx) (norm zy dx) + | Qq nx dx, Qq ny dy => mul (norm nx dy) (norm ny dx) + end. + + Theorem spec_mul_norm x y: + ([mul_norm x y] == [x] * [y])%Q. + intros x y; rewrite <- spec_mul; auto. + unfold mul_norm; case x; case y; clear x y. + intros; apply Qeq_refl. + intros p1 n p2. + repeat rewrite spec_mul. + match goal with |- ?Z == _ => + match Z with context id [norm ?X ?Y] => + let y := context id [Qq X Y] in + apply Qeq_trans with y; [repeat apply Qmult_comp; + repeat apply Qplus_comp; repeat apply Qeq_refl; + apply spec_norm | idtac] + end + end. + red; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros HH; simpl; ring. + intros p1 p2 n. + repeat rewrite spec_mul. + match goal with |- ?Z == _ => + match Z with context id [norm ?X ?Y] => + let y := context id [Qq X Y] in + apply Qeq_trans with y; [repeat apply Qmult_comp; + repeat apply Qplus_comp; repeat apply Qeq_refl; + apply spec_norm | idtac] + end + end. + red; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros HH; simpl; try ring. + rewrite Pmult_1_r; auto. + intros p1 n1 p2 n2. + repeat rewrite spec_mul. + repeat match goal with |- ?Z == _ => + match Z with context id [norm ?X ?Y] => + let y := context id [Qq X Y] in + apply Qeq_trans with y; [repeat apply Qmult_comp; + repeat apply Qplus_comp; repeat apply Qeq_refl; + apply spec_norm | idtac] + end + end. + red; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1; + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H2; simpl; try ring. + repeat rewrite Zpos_mult_morphism; ring. + Qed. + + Theorem spec_mul_normc x y: + [[mul_norm x y]] = [[x]] * [[y]]. + intros x y; unfold to_Qc. + apply trans_equal with (!! ([x] * [y])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_mul_norm; auto. + unfold Qcmult, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qmult_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Definition inv (x: t): t := + match x with + | Qz (BigZ.Pos n) => Qq BigZ.one n + | Qz (BigZ.Neg n) => Qq BigZ.minus_one n + | Qq (BigZ.Pos n) d => Qq (BigZ.Pos d) n + | Qq (BigZ.Neg n) d => Qq (BigZ.Neg d) n + end. + + + Theorem spec_inv x: + ([inv x] == /[x])%Q. + intros [ [x | x] | [nx | nx] dx]; unfold inv, Qinv; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1; auto. + rewrite H1; apply Qeq_refl. + generalize H1 (BigN.spec_pos x); case (BigN.to_Z x); auto. + intros HH; case HH; auto. + intros; red; simpl; auto. + intros p _ HH; case HH; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1; auto. + rewrite H1; apply Qeq_refl. + generalize H1 (BigN.spec_pos x); case (BigN.to_Z x); simpl; + auto. + intros HH; case HH; auto. + intros; red; simpl; auto. + intros p _ HH; case HH; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H2; simpl; auto. + apply Qeq_refl. + rewrite H1; apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H2; simpl; auto. + rewrite H2; red; simpl; auto. + generalize H1 (BigN.spec_pos nx); case (BigN.to_Z nx); simpl; + auto. + intros HH; case HH; auto. + intros; red; simpl. + rewrite Zpos_mult_morphism. + rewrite Z2P_correct; auto. + generalize (BigN.spec_pos dx); auto with zarith. + intros p _ HH; case HH; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H2; simpl; auto. + apply Qeq_refl. + rewrite H1; apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H2; simpl; auto. + rewrite H2; red; simpl; auto. + generalize H1 (BigN.spec_pos nx); case (BigN.to_Z nx); simpl; + auto. + intros HH; case HH; auto. + intros; red; simpl. + assert (tmp: forall x, Zneg x = Zopp (Zpos x)); auto. + rewrite tmp. + rewrite Zpos_mult_morphism. + rewrite Z2P_correct; auto. + ring. + generalize (BigN.spec_pos dx); auto with zarith. + intros p _ HH; case HH; auto. + Qed. + + Theorem spec_invc x: + [[inv x]] = /[[x]]. + intros x; unfold to_Qc. + apply trans_equal with (!! (/[x])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_inv; auto. + unfold Qcinv, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qinv_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Definition inv_norm (x: t): t := + match x with + | Qz (BigZ.Pos n) => + if BigN.eq_bool n BigN.zero then zero else Qq BigZ.one n + | Qz (BigZ.Neg n) => + if BigN.eq_bool n BigN.zero then zero else Qq BigZ.minus_one n + | Qq (BigZ.Pos n) d => + if BigN.eq_bool n BigN.zero then zero else Qq (BigZ.Pos d) n + | Qq (BigZ.Neg n) d => + if BigN.eq_bool n BigN.zero then zero else Qq (BigZ.Neg d) n + end. + + Theorem spec_inv_norm x: ([inv_norm x] == /[x])%Q. + intros x; rewrite <- spec_inv; generalize x; clear x. + intros [ [x | x] | [nx | nx] dx]; unfold inv_norm, inv; + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1; try apply Qeq_refl; + red; simpl; + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H2; auto; + case H2; auto. + Qed. + + Theorem spec_inv_normc x: + [[inv_norm x]] = /[[x]]. + intros x; unfold to_Qc. + apply trans_equal with (!! (/[x])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_inv_norm; auto. + unfold Qcinv, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qinv_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + + Definition div x y := mul x (inv y). + + Theorem spec_div x y: ([div x y] == [x] / [y])%Q. + intros x y; unfold div; rewrite spec_mul; auto. + unfold Qdiv; apply Qmult_comp. + apply Qeq_refl. + apply spec_inv; auto. + Qed. + + Theorem spec_divc x y: [[div x y]] = [[x]] / [[y]]. + intros x y; unfold div; rewrite spec_mulc; auto. + unfold Qcdiv; apply f_equal2 with (f := Qcmult); auto. + apply spec_invc; auto. + Qed. + + Definition div_norm x y := mul_norm x (inv y). + + Theorem spec_div_norm x y: ([div_norm x y] == [x] / [y])%Q. + intros x y; unfold div_norm; rewrite spec_mul_norm; auto. + unfold Qdiv; apply Qmult_comp. + apply Qeq_refl. + apply spec_inv; auto. + Qed. + + Theorem spec_div_normc x y: [[div_norm x y]] = [[x]] / [[y]]. + intros x y; unfold div_norm; rewrite spec_mul_normc; auto. + unfold Qcdiv; apply f_equal2 with (f := Qcmult); auto. + apply spec_invc; auto. + Qed. + + + Definition square (x: t): t := + match x with + | Qz zx => Qz (BigZ.square zx) + | Qq nx dx => Qq (BigZ.square nx) (BigN.square dx) + end. + + + Theorem spec_square x: ([square x] == [x] ^ 2)%Q. + intros [ x | nx dx]; unfold square. + red; simpl; rewrite BigZ.spec_square; auto with zarith. + simpl Qpower. + repeat match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; intros H. + red; simpl. + repeat match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; rewrite BigN.spec_square; + intros H1. + case H1; rewrite H; auto. + red; simpl. + repeat match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; rewrite BigN.spec_square; + intros H1. + case H; case (Zmult_integral _ _ H1); auto. + simpl. + rewrite BigZ.spec_square. + rewrite Zpos_mult_morphism. + assert (tmp: + (forall a b, 0 < a -> 0 < b -> Z2P (a * b) = (Z2P a * Z2P b)%positive)%Z). + intros [|a|a] [|b|b]; simpl; auto; intros; apply False_ind; auto with zarith. + rewrite tmp; auto. + generalize (BigN.spec_pos dx); auto with zarith. + generalize (BigN.spec_pos dx); auto with zarith. + Qed. + + Theorem spec_squarec x: [[square x]] = [[x]]^2. + intros x; unfold to_Qc. + apply trans_equal with (!! ([x]^2)). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_square; auto. + simpl Qcpower. + replace (!! [x] * 1) with (!![x]); try ring. + simpl. + unfold Qcmult, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qmult_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Definition power_pos (x: t) p: t := + match x with + | Qz zx => Qz (BigZ.power_pos zx p) + | Qq nx dx => Qq (BigZ.power_pos nx p) (BigN.power_pos dx p) + end. + + Theorem spec_power_pos x p: ([power_pos x p] == [x] ^ Zpos p)%Q. + Proof. + intros [x | nx dx] p; unfold power_pos. + unfold power_pos; red; simpl. + generalize (Qpower_decomp p (BigZ.to_Z x) 1). + unfold Qeq; simpl. + rewrite Zpower_pos_1_l; simpl Z2P. + rewrite Zmult_1_r. + intros H; rewrite H. + rewrite BigZ.spec_power_pos; simpl; ring. + simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; rewrite BigN.spec_power_pos; intros H1. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; intros H2. + elim p; simpl. + intros; red; simpl; auto. + intros p1 Hp1; rewrite <- Hp1; red; simpl; auto. + apply Qeq_refl. + case H2; generalize H1. + elim p; simpl. + intros p1 Hrec. + change (xI p1) with (1 + (xO p1))%positive. + rewrite Zpower_pos_is_exp; rewrite Zpower_pos_1_r. + intros HH; case (Zmult_integral _ _ HH); auto. + rewrite <- Pplus_diag. + rewrite Zpower_pos_is_exp. + intros HH1; case (Zmult_integral _ _ HH1); auto. + intros p1 Hrec. + rewrite <- Pplus_diag. + rewrite Zpower_pos_is_exp. + intros HH1; case (Zmult_integral _ _ HH1); auto. + rewrite Zpower_pos_1_r; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; intros H2. + case H1; rewrite H2; auto. + simpl; rewrite Zpower_pos_0_l; auto. + assert (F1: (0 < BigN.to_Z dx)%Z). + generalize (BigN.spec_pos dx); auto with zarith. + assert (F2: (0 < BigN.to_Z dx ^ ' p)%Z). + unfold Zpower; apply Zpower_pos_pos; auto. + unfold power_pos; red; simpl. + generalize (Qpower_decomp p (BigZ.to_Z nx) + (Z2P (BigN.to_Z dx))). + unfold Qeq; simpl. + repeat rewrite Z2P_correct; auto. + unfold Qeq; simpl; intros HH. + rewrite HH. + rewrite BigZ.spec_power_pos; simpl; ring. + Qed. + + Theorem spec_power_posc x p: + [[power_pos x p]] = [[x]] ^ nat_of_P p. + intros x p; unfold to_Qc. + apply trans_equal with (!! ([x]^Zpos p)). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_power_pos; auto. + pattern p; apply Pind; clear p. + simpl; ring. + intros p Hrec. + rewrite nat_of_P_succ_morphism; simpl Qcpower. + rewrite <- Hrec. + unfold Qcmult, Q2Qc. + apply Qc_decomp; intros _ _; + unfold this. + apply Qred_complete. + assert (F: [x] ^ ' Psucc p == [x] * [x] ^ ' p). + simpl; case x; simpl; clear x Hrec. + intros x; simpl; repeat rewrite Qpower_decomp; simpl. + red; simpl; repeat rewrite Zpower_pos_1_l; simpl Z2P. + rewrite Pplus_one_succ_l. + rewrite Zpower_pos_is_exp. + rewrite Zpower_pos_1_r; auto. + intros nx dx. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0. + unfold Qpower_positive. + assert (tmp: forall p, pow_pos Qmult 0%Q p = 0%Q). + intros p1; elim p1; simpl; auto; clear p1. + intros p1 Hp1; rewrite Hp1; auto. + intros p1 Hp1; rewrite Hp1; auto. + repeat rewrite tmp; intros; red; simpl; auto. + intros H1. + assert (F1: (0 < BigN.to_Z dx)%Z). + generalize (BigN.spec_pos dx); auto with zarith. + simpl; repeat rewrite Qpower_decomp; simpl. + red; simpl; repeat rewrite Zpower_pos_1_l; simpl Z2P. + rewrite Pplus_one_succ_l. + rewrite Zpower_pos_is_exp. + rewrite Zpower_pos_1_r; auto. + repeat rewrite Zpos_mult_morphism. + repeat rewrite Z2P_correct; auto. + 2: apply Zpower_pos_pos; auto. + 2: apply Zpower_pos_pos; auto. + rewrite Zpower_pos_is_exp. + rewrite Zpower_pos_1_r; auto. + rewrite F. + apply Qmult_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + +End Qbi. diff --git a/theories/Numbers/Rational/BigQ/QifMake.v b/theories/Numbers/Rational/BigQ/QifMake.v new file mode 100644 index 00000000..1d8ecc94 --- /dev/null +++ b/theories/Numbers/Rational/BigQ/QifMake.v @@ -0,0 +1,979 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* + Qq (BigZ.of_Z x) (BigN.of_N (Npos y)) + end. + + Definition of_Qc q := of_Q (this q). + + Definition to_Q (q: t) := + match q with + Qz x => BigZ.to_Z x # 1 + |Qq x y => if BigN.eq_bool y BigN.zero then 0%Q + else BigZ.to_Z x # Z2P (BigN.to_Z y) + end. + + Definition to_Qc q := !!(to_Q q). + + Notation "[[ x ]]" := (to_Qc x). + + Notation "[ x ]" := (to_Q x). + + Theorem spec_to_Q: forall q: Q, [of_Q q] = q. + intros (x,y); simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0. + rewrite BigN.spec_of_pos; intros HH; discriminate HH. + rewrite BigZ.spec_of_Z; simpl. + rewrite (BigN.spec_of_pos); auto. + Qed. + + Theorem spec_to_Qc: forall q, [[of_Qc q]] = q. + intros (x, Hx); unfold of_Qc, to_Qc; simpl. + apply Qc_decomp; simpl. + intros; rewrite spec_to_Q; auto. + Qed. + + Definition opp (x: t): t := + match x with + | Qz zx => Qz (BigZ.opp zx) + | Qq nx dx => Qq (BigZ.opp nx) dx + end. + + Theorem spec_opp: forall q, ([opp q] = -[q])%Q. + intros [z | x y]; simpl. + rewrite BigZ.spec_opp; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0. + rewrite BigZ.spec_opp; auto. + Qed. + + Theorem spec_oppc: forall q, [[opp q]] = -[[q]]. + intros q; unfold Qcopp, to_Qc, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + rewrite spec_opp. + rewrite <- Qred_opp. + rewrite Qred_involutive; auto. + Qed. + + Definition compare (x y: t) := + match x, y with + | Qz zx, Qz zy => BigZ.compare zx zy + | Qz zx, Qq ny dy => + if BigN.eq_bool dy BigN.zero then BigZ.compare zx BigZ.zero + else BigZ.compare (BigZ.mul zx (BigZ.Pos dy)) ny + | Qq nx dx, Qz zy => + if BigN.eq_bool dx BigN.zero then BigZ.compare BigZ.zero zy + else BigZ.compare nx (BigZ.mul zy (BigZ.Pos dx)) + | Qq nx dx, Qq ny dy => + match BigN.eq_bool dx BigN.zero, BigN.eq_bool dy BigN.zero with + | true, true => Eq + | true, false => BigZ.compare BigZ.zero ny + | false, true => BigZ.compare nx BigZ.zero + | false, false => BigZ.compare (BigZ.mul nx (BigZ.Pos dy)) (BigZ.mul ny (BigZ.Pos dx)) + end + end. + + Theorem spec_compare: forall q1 q2, + compare q1 q2 = ([q1] ?= [q2])%Q. + intros [z1 | x1 y1] [z2 | x2 y2]; + unfold Qcompare, compare, to_Q, Qnum, Qden. + repeat rewrite Zmult_1_r. + generalize (BigZ.spec_compare z1 z2); case BigZ.compare; intros H; auto. + rewrite H; rewrite Zcompare_refl; auto. + rewrite Zmult_1_r. + generalize (BigN.spec_eq_bool y2 BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH. + rewrite Zmult_1_r; generalize (BigZ.spec_compare z1 BigZ.zero); + case BigZ.compare; auto. + rewrite BigZ.spec_0; intros HH1; rewrite HH1; rewrite Zcompare_refl; auto. + rewrite Z2P_correct; auto with zarith. + 2: generalize (BigN.spec_pos y2); auto with zarith. + generalize (BigZ.spec_compare (z1 * BigZ.Pos y2) x2)%bigZ; case BigZ.compare; + rewrite BigZ.spec_mul; simpl; intros H; apply sym_equal; auto. + rewrite H; rewrite Zcompare_refl; auto. + generalize (BigN.spec_eq_bool y1 BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH. + rewrite Zmult_0_l; rewrite Zmult_1_r. + generalize (BigZ.spec_compare BigZ.zero z2); + case BigZ.compare; auto. + rewrite BigZ.spec_0; intros HH1; rewrite <- HH1; rewrite Zcompare_refl; auto. + rewrite Z2P_correct; auto with zarith. + 2: generalize (BigN.spec_pos y1); auto with zarith. + rewrite Zmult_1_r. + generalize (BigZ.spec_compare x1 (z2 * BigZ.Pos y1))%bigZ; case BigZ.compare; + rewrite BigZ.spec_mul; simpl; intros H; apply sym_equal; auto. + rewrite H; rewrite Zcompare_refl; auto. + generalize (BigN.spec_eq_bool y1 BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH. + generalize (BigN.spec_eq_bool y2 BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH1. + rewrite Zcompare_refl; auto. + rewrite Zmult_0_l; rewrite Zmult_1_r. + generalize (BigZ.spec_compare BigZ.zero x2); + case BigZ.compare; auto. + rewrite BigZ.spec_0; intros HH2; rewrite <- HH2; rewrite Zcompare_refl; auto. + generalize (BigN.spec_eq_bool y2 BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH1. + rewrite Zmult_0_l; rewrite Zmult_1_r. + generalize (BigZ.spec_compare x1 BigZ.zero)%bigZ; case BigZ.compare; + auto; rewrite BigZ.spec_0. + intros HH2; rewrite <- HH2; rewrite Zcompare_refl; auto. + repeat rewrite Z2P_correct. + 2: generalize (BigN.spec_pos y1); auto with zarith. + 2: generalize (BigN.spec_pos y2); auto with zarith. + generalize (BigZ.spec_compare (x1 * BigZ.Pos y2) + (x2 * BigZ.Pos y1))%bigZ; case BigZ.compare; + repeat rewrite BigZ.spec_mul; simpl; intros H; apply sym_equal; auto. + rewrite H; rewrite Zcompare_refl; auto. + Qed. + + Definition do_norm_n n := + match n with + | BigN.N0 _ => false + | BigN.N1 _ => false + | BigN.N2 _ => false + | BigN.N3 _ => false + | BigN.N4 _ => false + | BigN.N5 _ => false + | BigN.N6 _ => false + | _ => true + end. + + Definition do_norm_z z := + match z with + | BigZ.Pos n => do_norm_n n + | BigZ.Neg n => do_norm_n n + end. + +(* Je pense que cette fonction normalise bien ... *) + Definition norm n d: t := + if andb (do_norm_z n) (do_norm_n d) then + let gcd := BigN.gcd (BigZ.to_N n) d in + match BigN.compare BigN.one gcd with + | Lt => + let n := BigZ.div n (BigZ.Pos gcd) in + let d := BigN.div d gcd in + match BigN.compare d BigN.one with + | Gt => Qq n d + | Eq => Qz n + | Lt => zero + end + | Eq => Qq n d + | Gt => zero (* gcd = 0 => both numbers are 0 *) + end + else Qq n d. + + Theorem spec_norm: forall n q, + ([norm n q] == [Qq n q])%Q. + intros p q; unfold norm. + case do_norm_z; simpl andb. + 2: apply Qeq_refl. + case do_norm_n. + 2: apply Qeq_refl. + assert (Hp := BigN.spec_pos (BigZ.to_N p)). + match goal with |- context[BigN.compare ?X ?Y] => + generalize (BigN.spec_compare X Y); case BigN.compare + end; auto; rewrite BigN.spec_1; rewrite BigN.spec_gcd; intros H1. + apply Qeq_refl. + generalize (BigN.spec_pos (q / BigN.gcd (BigZ.to_N p) q)%bigN). + match goal with |- context[BigN.compare ?X ?Y] => + generalize (BigN.spec_compare X Y); case BigN.compare + end; auto; rewrite BigN.spec_1; rewrite BigN.spec_div; + rewrite BigN.spec_gcd; auto with zarith; intros H2 HH. + red; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; intros H3; simpl; + rewrite BigZ.spec_div; simpl; rewrite BigN.spec_gcd; + auto with zarith. + generalize H2; rewrite H3; + rewrite Zdiv_0_l; auto with zarith. + generalize H1 H2 H3 (BigN.spec_pos q); clear H1 H2 H3. + rewrite spec_to_N. + set (a := (BigN.to_Z (BigZ.to_N p))). + set (b := (BigN.to_Z q)). + intros H1 H2 H3 H4; rewrite Z2P_correct; auto with zarith. + rewrite Zgcd_div_swap; auto with zarith. + rewrite H2; ring. + red; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; intros H3; simpl. + case H3. + generalize H1 H2 H3 HH; clear H1 H2 H3 HH. + set (a := (BigN.to_Z (BigZ.to_N p))). + set (b := (BigN.to_Z q)). + intros H1 H2 H3 HH. + rewrite (Zdivide_Zdiv_eq (Zgcd a b) b); auto with zarith. + case (Zle_lt_or_eq _ _ HH); auto with zarith. + intros HH1; rewrite <- HH1; ring. + generalize (Zgcd_is_gcd a b); intros HH1; inversion HH1; auto. + red; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; rewrite BigN.spec_div; + rewrite BigN.spec_gcd; auto with zarith; intros H3. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; intros H4. + case H3; rewrite H4; rewrite Zdiv_0_l; auto with zarith. + simpl. + assert (FF := BigN.spec_pos q). + rewrite Z2P_correct; auto with zarith. + rewrite <- BigN.spec_gcd; rewrite <- BigN.spec_div; auto with zarith. + rewrite Z2P_correct; auto with zarith. + rewrite BigN.spec_div; rewrite BigN.spec_gcd; auto with zarith. + simpl; rewrite BigZ.spec_div; simpl. + rewrite BigN.spec_gcd; auto with zarith. + generalize H1 H2 H3 H4 HH FF; clear H1 H2 H3 H4 HH FF. + set (a := (BigN.to_Z (BigZ.to_N p))). + set (b := (BigN.to_Z q)). + intros H1 H2 H3 H4 HH FF. + rewrite spec_to_N; fold a. + rewrite Zgcd_div_swap; auto with zarith. + rewrite BigN.spec_gcd; auto with zarith. + rewrite BigN.spec_div; + rewrite BigN.spec_gcd; auto with zarith. + rewrite BigN.spec_gcd; auto with zarith. + case (Zle_lt_or_eq _ _ + (BigN.spec_pos (BigN.gcd (BigZ.to_N p) q))); + rewrite BigN.spec_gcd; auto with zarith. + intros; apply False_ind; auto with zarith. + intros HH2; assert (FF1 := Zgcd_inv_0_l _ _ (sym_equal HH2)). + assert (FF2 := Zgcd_inv_0_l _ _ (sym_equal HH2)). + red; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; intros H2; simpl. + rewrite spec_to_N. + rewrite FF2; ring. + Qed. + + + Definition add (x y: t): t := + match x with + | Qz zx => + match y with + | Qz zy => Qz (BigZ.add zx zy) + | Qq ny dy => + if BigN.eq_bool dy BigN.zero then x + else Qq (BigZ.add (BigZ.mul zx (BigZ.Pos dy)) ny) dy + end + | Qq nx dx => + if BigN.eq_bool dx BigN.zero then y + else match y with + | Qz zy => Qq (BigZ.add nx (BigZ.mul zy (BigZ.Pos dx))) dx + | Qq ny dy => + if BigN.eq_bool dy BigN.zero then x + else + let n := BigZ.add (BigZ.mul nx (BigZ.Pos dy)) (BigZ.mul ny (BigZ.Pos dx)) in + let d := BigN.mul dx dy in + Qq n d + end + end. + + + Theorem spec_add x y: + ([add x y] == [x] + [y])%Q. + intros [x | nx dx] [y | ny dy]; unfold Qplus; simpl. + rewrite BigZ.spec_add; repeat rewrite Zmult_1_r; auto. + intros; apply Qeq_refl; auto. + assert (F1:= BigN.spec_pos dy). + rewrite Zmult_1_r; red; simpl. + generalize (BigN.spec_eq_bool dy BigN.zero); + case BigN.eq_bool; + rewrite BigN.spec_0; intros HH; simpl; try ring. + generalize (BigN.spec_eq_bool dy BigN.zero); + case BigN.eq_bool; + rewrite BigN.spec_0; intros HH1; simpl; try ring. + case HH; auto. + rewrite Z2P_correct; auto with zarith. + rewrite BigZ.spec_add; rewrite BigZ.spec_mul; simpl; auto. + generalize (BigN.spec_eq_bool dx BigN.zero); + case BigN.eq_bool; + rewrite BigN.spec_0; intros HH; simpl; try ring. + rewrite Zmult_1_r; apply Qeq_refl. + generalize (BigN.spec_eq_bool dx BigN.zero); + case BigN.eq_bool; + rewrite BigN.spec_0; intros HH1; simpl; try ring. + case HH; auto. + rewrite Z2P_correct; auto with zarith. + rewrite BigZ.spec_add; rewrite BigZ.spec_mul; simpl; auto. + rewrite Zmult_1_r; rewrite Pmult_1_r. + apply Qeq_refl. + assert (F1:= BigN.spec_pos dx); auto with zarith. + generalize (BigN.spec_eq_bool dx BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH. + generalize (BigN.spec_eq_bool dy BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH1. + simpl. + generalize (BigN.spec_eq_bool dy BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH2. + apply Qeq_refl. + case HH2; auto. + simpl. + generalize (BigN.spec_eq_bool dy BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH2. + case HH2; auto. + case HH1; auto. + rewrite Zmult_1_r; apply Qeq_refl. + generalize (BigN.spec_eq_bool dy BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH1. + simpl. + generalize (BigN.spec_eq_bool dx BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH2. + case HH; auto. + rewrite Zmult_1_r; rewrite Zplus_0_r; rewrite Pmult_1_r. + apply Qeq_refl. + simpl. + generalize (BigN.spec_eq_bool (dx * dy)%bigN BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_mul; + rewrite BigN.spec_0; intros HH2. + (case (Zmult_integral _ _ HH2); intros HH3); + [case HH| case HH1]; auto. + rewrite BigZ.spec_add; repeat rewrite BigZ.spec_mul; simpl. + assert (Fx: (0 < BigN.to_Z dx)%Z). + generalize (BigN.spec_pos dx); auto with zarith. + assert (Fy: (0 < BigN.to_Z dy)%Z). + generalize (BigN.spec_pos dy); auto with zarith. + red; simpl; rewrite Zpos_mult_morphism. + repeat rewrite Z2P_correct; auto with zarith. + apply Zmult_lt_0_compat; auto. + Qed. + + Theorem spec_addc x y: + [[add x y]] = [[x]] + [[y]]. + intros x y; unfold to_Qc. + apply trans_equal with (!! ([x] + [y])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_add; auto. + unfold Qcplus, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qplus_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Definition add_norm (x y: t): t := + match x with + | Qz zx => + match y with + | Qz zy => Qz (BigZ.add zx zy) + | Qq ny dy => + if BigN.eq_bool dy BigN.zero then x + else norm (BigZ.add (BigZ.mul zx (BigZ.Pos dy)) ny) dy + end + | Qq nx dx => + if BigN.eq_bool dx BigN.zero then y + else match y with + | Qz zy => norm (BigZ.add nx (BigZ.mul zy (BigZ.Pos dx))) dx + | Qq ny dy => + if BigN.eq_bool dy BigN.zero then x + else + let n := BigZ.add (BigZ.mul nx (BigZ.Pos dy)) (BigZ.mul ny (BigZ.Pos dx)) in + let d := BigN.mul dx dy in + norm n d + end + end. + + Theorem spec_add_norm x y: + ([add_norm x y] == [x] + [y])%Q. + intros x y; rewrite <- spec_add; auto. + case x; case y; clear x y; unfold add_norm, add. + intros; apply Qeq_refl. + intros p1 n p2. + generalize (BigN.spec_eq_bool n BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH. + apply Qeq_refl. + match goal with |- [norm ?X ?Y] == _ => + apply Qeq_trans with ([Qq X Y]); + [apply spec_norm | idtac] + end. + simpl. + generalize (BigN.spec_eq_bool n BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH1. + apply Qeq_refl. + apply Qeq_refl. + intros p1 p2 n. + generalize (BigN.spec_eq_bool n BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH. + apply Qeq_refl. + match goal with |- [norm ?X ?Y] == _ => + apply Qeq_trans with ([Qq X Y]); + [apply spec_norm | idtac] + end. + apply Qeq_refl. + intros p1 q1 p2 q2. + generalize (BigN.spec_eq_bool q2 BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH1. + apply Qeq_refl. + generalize (BigN.spec_eq_bool q1 BigN.zero); + case BigN.eq_bool; rewrite BigN.spec_0; intros HH2. + apply Qeq_refl. + match goal with |- [norm ?X ?Y] == _ => + apply Qeq_trans with ([Qq X Y]); + [apply spec_norm | idtac] + end. + apply Qeq_refl. + Qed. + + Theorem spec_add_normc x y: + [[add_norm x y]] = [[x]] + [[y]]. + intros x y; unfold to_Qc. + apply trans_equal with (!! ([x] + [y])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_add_norm; auto. + unfold Qcplus, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qplus_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Definition sub x y := add x (opp y). + + + Theorem spec_sub x y: + ([sub x y] == [x] - [y])%Q. + intros x y; unfold sub; rewrite spec_add; auto. + rewrite spec_opp; ring. + Qed. + + Theorem spec_subc x y: [[sub x y]] = [[x]] - [[y]]. + intros x y; unfold sub; rewrite spec_addc; auto. + rewrite spec_oppc; ring. + Qed. + + Definition sub_norm x y := add_norm x (opp y). + + Theorem spec_sub_norm x y: + ([sub_norm x y] == [x] - [y])%Q. + intros x y; unfold sub_norm; rewrite spec_add_norm; auto. + rewrite spec_opp; ring. + Qed. + + Theorem spec_sub_normc x y: + [[sub_norm x y]] = [[x]] - [[y]]. + intros x y; unfold sub_norm; rewrite spec_add_normc; auto. + rewrite spec_oppc; ring. + Qed. + + Definition mul (x y: t): t := + match x, y with + | Qz zx, Qz zy => Qz (BigZ.mul zx zy) + | Qz zx, Qq ny dy => Qq (BigZ.mul zx ny) dy + | Qq nx dx, Qz zy => Qq (BigZ.mul nx zy) dx + | Qq nx dx, Qq ny dy => Qq (BigZ.mul nx ny) (BigN.mul dx dy) + end. + + + Theorem spec_mul x y: ([mul x y] == [x] * [y])%Q. + intros [x | nx dx] [y | ny dy]; unfold Qmult; simpl. + rewrite BigZ.spec_mul; repeat rewrite Zmult_1_r; auto. + intros; apply Qeq_refl; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros HH1. + red; simpl; ring. + rewrite BigZ.spec_mul; apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros HH1. + red; simpl; ring. + rewrite BigZ.spec_mul; rewrite Pmult_1_r. + apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; rewrite BigN.spec_mul; + intros HH1. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros HH2. + red; simpl; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros HH3. + red; simpl; ring. + case (Zmult_integral _ _ HH1); intros HH. + case HH2; auto. + case HH3; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros HH2. + case HH1; rewrite HH2; ring. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros HH3. + case HH1; rewrite HH3; ring. + rewrite BigZ.spec_mul. + assert (tmp: + (forall a b, 0 < a -> 0 < b -> Z2P (a * b) = (Z2P a * Z2P b)%positive)%Z). + intros [|a|a] [|b|b]; simpl; auto; intros; apply False_ind; auto with zarith. + rewrite tmp; auto. + apply Qeq_refl. + generalize (BigN.spec_pos dx); auto with zarith. + generalize (BigN.spec_pos dy); auto with zarith. + Qed. + + Theorem spec_mulc x y: + [[mul x y]] = [[x]] * [[y]]. + intros x y; unfold to_Qc. + apply trans_equal with (!! ([x] * [y])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_mul; auto. + unfold Qcmult, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qmult_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + + Definition mul_norm (x y: t): t := + match x, y with + | Qz zx, Qz zy => Qz (BigZ.mul zx zy) + | Qz zx, Qq ny dy => norm (BigZ.mul zx ny) dy + | Qq nx dx, Qz zy => norm (BigZ.mul nx zy) dx + | Qq nx dx, Qq ny dy => norm (BigZ.mul nx ny) (BigN.mul dx dy) + end. + + Theorem spec_mul_norm x y: + ([mul_norm x y] == [x] * [y])%Q. + intros x y; rewrite <- spec_mul; auto. + unfold mul_norm, mul; case x; case y; clear x y. + intros; apply Qeq_refl. + intros p1 n p2. + match goal with |- [norm ?X ?Y] == _ => + apply Qeq_trans with ([Qq X Y]); + [apply spec_norm | idtac] + end; apply Qeq_refl. + intros p1 p2 n. + match goal with |- [norm ?X ?Y] == _ => + apply Qeq_trans with ([Qq X Y]); + [apply spec_norm | idtac] + end; apply Qeq_refl. + intros p1 n1 p2 n2. + match goal with |- [norm ?X ?Y] == _ => + apply Qeq_trans with ([Qq X Y]); + [apply spec_norm | idtac] + end; apply Qeq_refl. + Qed. + + Theorem spec_mul_normc x y: + [[mul_norm x y]] = [[x]] * [[y]]. + intros x y; unfold to_Qc. + apply trans_equal with (!! ([x] * [y])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_mul_norm; auto. + unfold Qcmult, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qmult_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + + + Definition inv (x: t): t := + match x with + | Qz (BigZ.Pos n) => Qq BigZ.one n + | Qz (BigZ.Neg n) => Qq BigZ.minus_one n + | Qq (BigZ.Pos n) d => Qq (BigZ.Pos d) n + | Qq (BigZ.Neg n) d => Qq (BigZ.Neg d) n + end. + + Theorem spec_inv x: + ([inv x] == /[x])%Q. + intros [ [x | x] | [nx | nx] dx]; unfold inv, Qinv; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1; auto. + rewrite H1; apply Qeq_refl. + generalize H1 (BigN.spec_pos x); case (BigN.to_Z x); auto. + intros HH; case HH; auto. + intros; red; simpl; auto. + intros p _ HH; case HH; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1; auto. + rewrite H1; apply Qeq_refl. + generalize H1 (BigN.spec_pos x); case (BigN.to_Z x); simpl; + auto. + intros HH; case HH; auto. + intros; red; simpl; auto. + intros p _ HH; case HH; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H2; simpl; auto. + apply Qeq_refl. + rewrite H1; apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H2; simpl; auto. + rewrite H2; red; simpl; auto. + generalize H1 (BigN.spec_pos nx); case (BigN.to_Z nx); simpl; + auto. + intros HH; case HH; auto. + intros; red; simpl. + rewrite Zpos_mult_morphism. + rewrite Z2P_correct; auto. + generalize (BigN.spec_pos dx); auto with zarith. + intros p _ HH; case HH; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H2; simpl; auto. + apply Qeq_refl. + rewrite H1; apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H2; simpl; auto. + rewrite H2; red; simpl; auto. + generalize H1 (BigN.spec_pos nx); case (BigN.to_Z nx); simpl; + auto. + intros HH; case HH; auto. + intros; red; simpl. + assert (tmp: forall x, Zneg x = Zopp (Zpos x)); auto. + rewrite tmp. + rewrite Zpos_mult_morphism. + rewrite Z2P_correct; auto. + ring. + generalize (BigN.spec_pos dx); auto with zarith. + intros p _ HH; case HH; auto. + Qed. + + Theorem spec_invc x: + [[inv x]] = /[[x]]. + intros x; unfold to_Qc. + apply trans_equal with (!! (/[x])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_inv; auto. + unfold Qcinv, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qinv_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + +Definition inv_norm (x: t): t := + match x with + | Qz (BigZ.Pos n) => + match BigN.compare n BigN.one with + Gt => Qq BigZ.one n + | _ => x + end + | Qz (BigZ.Neg n) => + match BigN.compare n BigN.one with + Gt => Qq BigZ.minus_one n + | _ => x + end + | Qq (BigZ.Pos n) d => + match BigN.compare n BigN.one with + Gt => Qq (BigZ.Pos d) n + | Eq => Qz (BigZ.Pos d) + | Lt => Qz (BigZ.zero) + end + | Qq (BigZ.Neg n) d => + match BigN.compare n BigN.one with + Gt => Qq (BigZ.Neg d) n + | Eq => Qz (BigZ.Neg d) + | Lt => Qz (BigZ.zero) + end + end. + + Theorem spec_inv_norm x: ([inv_norm x] == /[x])%Q. + intros [ [x | x] | [nx | nx] dx]; unfold inv_norm, Qinv. + match goal with |- context[BigN.compare ?X ?Y] => + generalize (BigN.spec_compare X Y); case BigN.compare + end; rewrite BigN.spec_1; intros H. + simpl; rewrite H; apply Qeq_refl. + case (Zle_lt_or_eq _ _ (BigN.spec_pos x)); simpl. + generalize H; case BigN.to_Z. + intros _ HH; discriminate HH. + intros p; case p; auto. + intros p1 HH; discriminate HH. + intros p1 HH; discriminate HH. + intros HH; discriminate HH. + intros p _ HH; discriminate HH. + intros HH; rewrite <- HH. + apply Qeq_refl. + generalize H; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1. + rewrite H1; intros HH; discriminate. + generalize H; case BigN.to_Z. + intros HH; discriminate HH. + intros; red; simpl; auto. + intros p HH; discriminate HH. + match goal with |- context[BigN.compare ?X ?Y] => + generalize (BigN.spec_compare X Y); case BigN.compare + end; rewrite BigN.spec_1; intros H. + simpl; rewrite H; apply Qeq_refl. + case (Zle_lt_or_eq _ _ (BigN.spec_pos x)); simpl. + generalize H; case BigN.to_Z. + intros _ HH; discriminate HH. + intros p; case p; auto. + intros p1 HH; discriminate HH. + intros p1 HH; discriminate HH. + intros HH; discriminate HH. + intros p _ HH; discriminate HH. + intros HH; rewrite <- HH. + apply Qeq_refl. + generalize H; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1. + rewrite H1; intros HH; discriminate. + generalize H; case BigN.to_Z. + intros HH; discriminate HH. + intros; red; simpl; auto. + intros p HH; discriminate HH. + simpl Qnum. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1; simpl. + case BigN.compare; red; simpl; auto. + rewrite H1; auto. + case BigN.eq_bool; auto. + simpl; rewrite H1; auto. + match goal with |- context[BigN.compare ?X ?Y] => + generalize (BigN.spec_compare X Y); case BigN.compare + end; rewrite BigN.spec_1; intros H2. + rewrite H2. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H3. + case H1; auto. + red; simpl. + rewrite Zmult_1_r; rewrite Pmult_1_r; rewrite Z2P_correct; auto. + generalize (BigN.spec_pos dx); auto with zarith. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H3. + case H1; auto. + generalize H2 (BigN.spec_pos nx); case (BigN.to_Z nx). + intros; apply Qeq_refl. + intros p; case p; clear p. + intros p HH; discriminate HH. + intros p HH; discriminate HH. + intros HH; discriminate HH. + intros p _ HH; case HH; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H3. + case H1; auto. + simpl; generalize H2; case (BigN.to_Z nx). + intros HH; discriminate HH. + intros p Hp. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H4. + rewrite H4 in H2; discriminate H2. + red; simpl. + rewrite Zpos_mult_morphism. + rewrite Z2P_correct; auto. + generalize (BigN.spec_pos dx); auto with zarith. + intros p HH; discriminate HH. + simpl Qnum. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1; simpl. + case BigN.compare; red; simpl; auto. + rewrite H1; auto. + case BigN.eq_bool; auto. + simpl; rewrite H1; auto. + match goal with |- context[BigN.compare ?X ?Y] => + generalize (BigN.spec_compare X Y); case BigN.compare + end; rewrite BigN.spec_1; intros H2. + rewrite H2. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H3. + case H1; auto. + red; simpl. + assert (tmp: forall x, Zneg x = Zopp (Zpos x)); auto. + rewrite tmp. + rewrite Zmult_1_r; rewrite Pmult_1_r; rewrite Z2P_correct; auto. + generalize (BigN.spec_pos dx); auto with zarith. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H3. + case H1; auto. + generalize H2 (BigN.spec_pos nx); case (BigN.to_Z nx). + intros; apply Qeq_refl. + intros p; case p; clear p. + intros p HH; discriminate HH. + intros p HH; discriminate HH. + intros HH; discriminate HH. + intros p _ HH; case HH; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H3. + case H1; auto. + simpl; generalize H2; case (BigN.to_Z nx). + intros HH; discriminate HH. + intros p Hp. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H4. + rewrite H4 in H2; discriminate H2. + red; simpl. + assert (tmp: forall x, Zneg x = Zopp (Zpos x)); auto. + rewrite tmp. + rewrite Zpos_mult_morphism. + rewrite Z2P_correct; auto. + ring. + generalize (BigN.spec_pos dx); auto with zarith. + intros p HH; discriminate HH. + Qed. + + Theorem spec_inv_normc x: + [[inv_norm x]] = /[[x]]. + intros x; unfold to_Qc. + apply trans_equal with (!! (/[x])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_inv_norm; auto. + unfold Qcinv, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qinv_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + + Definition div x y := mul x (inv y). + + Theorem spec_div x y: ([div x y] == [x] / [y])%Q. + intros x y; unfold div; rewrite spec_mul; auto. + unfold Qdiv; apply Qmult_comp. + apply Qeq_refl. + apply spec_inv; auto. + Qed. + + Theorem spec_divc x y: [[div x y]] = [[x]] / [[y]]. + intros x y; unfold div; rewrite spec_mulc; auto. + unfold Qcdiv; apply f_equal2 with (f := Qcmult); auto. + apply spec_invc; auto. + Qed. + + Definition div_norm x y := mul_norm x (inv y). + + Theorem spec_div_norm x y: ([div_norm x y] == [x] / [y])%Q. + intros x y; unfold div_norm; rewrite spec_mul_norm; auto. + unfold Qdiv; apply Qmult_comp. + apply Qeq_refl. + apply spec_inv; auto. + Qed. + + Theorem spec_div_normc x y: [[div_norm x y]] = [[x]] / [[y]]. + intros x y; unfold div_norm; rewrite spec_mul_normc; auto. + unfold Qcdiv; apply f_equal2 with (f := Qcmult); auto. + apply spec_invc; auto. + Qed. + + + Definition square (x: t): t := + match x with + | Qz zx => Qz (BigZ.square zx) + | Qq nx dx => Qq (BigZ.square nx) (BigN.square dx) + end. + + Theorem spec_square x: ([square x] == [x] ^ 2)%Q. + intros [ x | nx dx]; unfold square. + red; simpl; rewrite BigZ.spec_square; auto with zarith. + simpl Qpower. + repeat match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; intros H. + red; simpl. + repeat match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; rewrite BigN.spec_square; + intros H1. + case H1; rewrite H; auto. + red; simpl. + repeat match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; rewrite BigN.spec_square; + intros H1. + case H; case (Zmult_integral _ _ H1); auto. + simpl. + rewrite BigZ.spec_square. + rewrite Zpos_mult_morphism. + assert (tmp: + (forall a b, 0 < a -> 0 < b -> Z2P (a * b) = (Z2P a * Z2P b)%positive)%Z). + intros [|a|a] [|b|b]; simpl; auto; intros; apply False_ind; auto with zarith. + rewrite tmp; auto. + generalize (BigN.spec_pos dx); auto with zarith. + generalize (BigN.spec_pos dx); auto with zarith. + Qed. + + Theorem spec_squarec x: [[square x]] = [[x]]^2. + intros x; unfold to_Qc. + apply trans_equal with (!! ([x]^2)). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_square; auto. + simpl Qcpower. + replace (!! [x] * 1) with (!![x]); try ring. + simpl. + unfold Qcmult, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qmult_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + +End Qif. diff --git a/theories/Numbers/Rational/BigQ/QpMake.v b/theories/Numbers/Rational/BigQ/QpMake.v new file mode 100644 index 00000000..ac3ca47a --- /dev/null +++ b/theories/Numbers/Rational/BigQ/QpMake.v @@ -0,0 +1,901 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* + Qq (BigZ.of_Z x) (BigN.pred (BigN.of_N (Npos y))) + end. + + Definition of_Qc q := of_Q (this q). + + Definition to_Q (q: t) := + match q with + Qz x => BigZ.to_Z x # 1 + |Qq x y => BigZ.to_Z x # Z2P (BigN.to_Z (BigN.succ y)) + end. + + Definition to_Qc q := !!(to_Q q). + + Notation "[[ x ]]" := (to_Qc x). + + Notation "[ x ]" := (to_Q x). + + Theorem spec_to_Q: forall q: Q, [of_Q q] = q. + intros (x,y); simpl. + rewrite BigZ.spec_of_Z; auto. + rewrite BigN.spec_succ; simpl. simpl. + rewrite BigN.spec_pred; rewrite (BigN.spec_of_pos). + replace (Zpos y - 1 + 1)%Z with (Zpos y); auto; ring. + red; auto. + Qed. + + Theorem spec_to_Qc: forall q, [[of_Qc q]] = q. + intros (x, Hx); unfold of_Qc, to_Qc; simpl. + apply Qc_decomp; simpl. + intros; rewrite spec_to_Q; auto. + Qed. + + Definition opp (x: t): t := + match x with + | Qz zx => Qz (BigZ.opp zx) + | Qq nx dx => Qq (BigZ.opp nx) dx + end. + + + Theorem spec_opp: forall q, ([opp q] = -[q])%Q. + intros [z | x y]; simpl. + rewrite BigZ.spec_opp; auto. + rewrite BigZ.spec_opp; auto. + Qed. + + + Theorem spec_oppc: forall q, [[opp q]] = -[[q]]. + intros q; unfold Qcopp, to_Qc, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + rewrite spec_opp. + rewrite <- Qred_opp. + rewrite Qred_involutive; auto. + Qed. + + Definition compare (x y: t) := + match x, y with + | Qz zx, Qz zy => BigZ.compare zx zy + | Qz zx, Qq ny dy => BigZ.compare (BigZ.mul zx (d_to_Z dy)) ny + | Qq nx dy, Qz zy => BigZ.compare nx (BigZ.mul zy (d_to_Z dy)) + | Qq nx dx, Qq ny dy => + BigZ.compare (BigZ.mul nx (d_to_Z dy)) (BigZ.mul ny (d_to_Z dx)) + end. + + Theorem spec_compare: forall q1 q2, + compare q1 q2 = ([q1] ?= [q2])%Q. + intros [z1 | x1 y1] [z2 | x2 y2]; unfold Qcompare; simpl. + repeat rewrite Zmult_1_r. + generalize (BigZ.spec_compare z1 z2); case BigZ.compare; intros H; auto. + rewrite H; rewrite Zcompare_refl; auto. + rewrite Zmult_1_r. + rewrite BigN.spec_succ. + rewrite Z2P_correct; auto with zarith. + 2: generalize (BigN.spec_pos y2); auto with zarith. + generalize (BigZ.spec_compare (z1 * d_to_Z y2) x2)%bigZ; case BigZ.compare; + intros H; rewrite <- H. + rewrite BigZ.spec_mul; unfold d_to_Z; simpl. + rewrite BigN.spec_succ. + rewrite Zcompare_refl; auto. + rewrite BigZ.spec_mul; unfold d_to_Z; simpl. + rewrite BigN.spec_succ; auto. + rewrite BigZ.spec_mul; unfold d_to_Z; simpl. + rewrite BigN.spec_succ; auto. + rewrite Zmult_1_r. + rewrite BigN.spec_succ. + rewrite Z2P_correct; auto with zarith. + 2: generalize (BigN.spec_pos y1); auto with zarith. + generalize (BigZ.spec_compare x1 (z2 * d_to_Z y1))%bigZ; case BigZ.compare; + rewrite BigZ.spec_mul; unfold d_to_Z; simpl; + rewrite BigN.spec_succ; intros H; auto. + rewrite H; rewrite Zcompare_refl; auto. + repeat rewrite BigN.spec_succ; auto. + repeat rewrite Z2P_correct; auto with zarith. + 2: generalize (BigN.spec_pos y1); auto with zarith. + 2: generalize (BigN.spec_pos y2); auto with zarith. + generalize (BigZ.spec_compare (x1 * d_to_Z y2) + (x2 * d_to_Z y1))%bigZ; case BigZ.compare; + repeat rewrite BigZ.spec_mul; unfold d_to_Z; simpl; + repeat rewrite BigN.spec_succ; intros H; auto. + rewrite H; auto. + rewrite Zcompare_refl; auto. + Qed. + + + Theorem spec_comparec: forall q1 q2, + compare q1 q2 = ([[q1]] ?= [[q2]]). + unfold Qccompare, to_Qc. + intros q1 q2; rewrite spec_compare; simpl. + apply Qcompare_comp; apply Qeq_sym; apply Qred_correct. + Qed. + +(* Inv d > 0, Pour la forme normal unique on veut d > 1 *) + Definition norm n d: t := + if BigZ.eq_bool n BigZ.zero then zero + else + let gcd := BigN.gcd (BigZ.to_N n) d in + if BigN.eq_bool gcd BigN.one then Qq n (BigN.pred d) + else + let n := BigZ.div n (BigZ.Pos gcd) in + let d := BigN.div d gcd in + if BigN.eq_bool d BigN.one then Qz n + else Qq n (BigN.pred d). + + Theorem spec_norm: forall n q, + ((0 < BigN.to_Z q)%Z -> [norm n q] == [Qq n (BigN.pred q)])%Q. + intros p q; unfold norm; intros Hq. + assert (Hp := BigN.spec_pos (BigZ.to_N p)). + match goal with |- context[BigZ.eq_bool ?X ?Y] => + generalize (BigZ.spec_eq_bool X Y); case BigZ.eq_bool + end; auto; rewrite BigZ.spec_0; intros H1. + red; simpl; rewrite H1; ring. + case (Zle_lt_or_eq _ _ Hp); clear Hp; intros Hp. + case (Zle_lt_or_eq _ _ + (Zgcd_is_pos (BigN.to_Z (BigZ.to_N p)) (BigN.to_Z q))); intros H4. + 2: generalize Hq; rewrite (Zgcd_inv_0_r _ _ (sym_equal H4)); auto with zarith. + 2: red; simpl; auto with zarith. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_1; intros H2. + apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_1. + red; simpl. + rewrite BigZ.spec_div; simpl; rewrite BigN.spec_gcd; auto with zarith. + rewrite BigN.spec_div; simpl; rewrite BigN.spec_gcd; auto with zarith. + rewrite Zmult_1_r. + rewrite BigN.succ_pred by (rewrite Nspec_lt, BigN.spec_0; auto). + rewrite Z2P_correct; auto with zarith. + rewrite spec_to_N; intros; rewrite Zgcd_div_swap; auto. + rewrite H; ring. + intros H3. + red; simpl. + rewrite BigZ.spec_div; simpl; rewrite BigN.spec_gcd; auto with zarith. + rewrite BigN.succ_pred by (rewrite Nspec_lt, BigN.spec_0; auto). + assert (F: (0 < BigN.to_Z (q / BigN.gcd (BigZ.to_N p) q)%bigN)%Z). + rewrite BigN.spec_div; auto with zarith. + rewrite BigN.spec_gcd. + apply Zgcd_div_pos; auto. + rewrite BigN.spec_gcd; auto. + rewrite BigN.succ_pred by (rewrite Nspec_lt, BigN.spec_0; auto). + rewrite Z2P_correct; auto. + rewrite Z2P_correct; auto. + rewrite BigN.spec_div; simpl; rewrite BigN.spec_gcd; auto with zarith. + rewrite spec_to_N; apply Zgcd_div_swap; auto. + case H1; rewrite spec_to_N; rewrite <- Hp; ring. + Qed. + + Theorem spec_normc: forall n q, + (0 < BigN.to_Z q)%Z -> [[norm n q]] = [[Qq n (BigN.pred q)]]. + intros n q H; unfold to_Qc, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_norm; auto. + Qed. + + Definition add (x y: t): t := + match x, y with + | Qz zx, Qz zy => Qz (BigZ.add zx zy) + | Qz zx, Qq ny dy => Qq (BigZ.add (BigZ.mul zx (d_to_Z dy)) ny) dy + | Qq nx dx, Qz zy => Qq (BigZ.add nx (BigZ.mul zy (d_to_Z dx))) dx + | Qq nx dx, Qq ny dy => + let dx' := BigN.succ dx in + let dy' := BigN.succ dy in + let n := BigZ.add (BigZ.mul nx (BigZ.Pos dy')) (BigZ.mul ny (BigZ.Pos dx')) in + let d := BigN.pred (BigN.mul dx' dy') in + Qq n d + end. + + Theorem spec_d_to_Z: forall dy, + (BigZ.to_Z (d_to_Z dy) = BigN.to_Z dy + 1)%Z. + intros dy; unfold d_to_Z; simpl. + rewrite BigN.spec_succ; auto. + Qed. + + Theorem spec_succ_pos: forall p, + (0 < BigN.to_Z (BigN.succ p))%Z. + intros p; rewrite BigN.spec_succ; + generalize (BigN.spec_pos p); auto with zarith. + Qed. + + Theorem spec_add x y: ([add x y] == [x] + [y])%Q. + intros [x | nx dx] [y | ny dy]; unfold Qplus; simpl. + rewrite BigZ.spec_add; repeat rewrite Zmult_1_r; auto. + apply Qeq_refl; auto. + assert (F1:= BigN.spec_pos dy). + rewrite Zmult_1_r. + simpl; rewrite Z2P_correct; rewrite BigN.spec_succ; auto with zarith. + rewrite BigZ.spec_add; rewrite BigZ.spec_mul. + rewrite spec_d_to_Z; apply Qeq_refl. + assert (F1:= BigN.spec_pos dx). + rewrite Zmult_1_r; rewrite Pmult_1_r. + simpl; rewrite Z2P_correct; rewrite BigN.spec_succ; auto with zarith. + rewrite BigZ.spec_add; rewrite BigZ.spec_mul. + rewrite spec_d_to_Z; apply Qeq_refl. + repeat rewrite BigN.spec_succ. + assert (Fx: (0 < BigN.to_Z dx + 1)%Z). + generalize (BigN.spec_pos dx); auto with zarith. + assert (Fy: (0 < BigN.to_Z dy + 1)%Z). + generalize (BigN.spec_pos dy); auto with zarith. + repeat rewrite BigN.spec_pred. + rewrite BigZ.spec_add; repeat rewrite BigN.spec_mul; + repeat rewrite BigN.spec_succ. + assert (tmp: forall x, (x-1+1 = x)%Z); [intros; ring | rewrite tmp; clear tmp]. + repeat rewrite Z2P_correct; auto. + repeat rewrite BigZ.spec_mul; simpl. + repeat rewrite BigN.spec_succ. + assert (tmp: + (forall a b, 0 < a -> 0 < b -> Z2P (a * b) = (Z2P a * Z2P b)%positive)%Z). + intros [|a|a] [|b|b]; simpl; auto; intros; apply False_ind; auto with zarith. + rewrite tmp; auto; apply Qeq_refl. + rewrite BigN.spec_mul; repeat rewrite BigN.spec_succ; auto with zarith. + apply Zmult_lt_0_compat; auto. + Qed. + + Theorem spec_addc x y: [[add x y]] = [[x]] + [[y]]. + intros x y; unfold to_Qc. + apply trans_equal with (!! ([x] + [y])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_add. + unfold Qcplus, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qplus_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Definition add_norm (x y: t): t := + match x, y with + | Qz zx, Qz zy => Qz (BigZ.add zx zy) + | Qz zx, Qq ny dy => + let d := BigN.succ dy in + norm (BigZ.add (BigZ.mul zx (BigZ.Pos d)) ny) d + | Qq nx dx, Qz zy => + let d := BigN.succ dx in + norm (BigZ.add (BigZ.mul zy (BigZ.Pos d)) nx) d + | Qq nx dx, Qq ny dy => + let dx' := BigN.succ dx in + let dy' := BigN.succ dy in + let n := BigZ.add (BigZ.mul nx (BigZ.Pos dy')) (BigZ.mul ny (BigZ.Pos dx')) in + let d := BigN.mul dx' dy' in + norm n d + end. + + Theorem spec_add_norm x y: ([add_norm x y] == [x] + [y])%Q. + intros x y; rewrite <- spec_add. + unfold add_norm, add; case x; case y. + intros; apply Qeq_refl. + intros p1 n p2. + match goal with |- [norm ?X ?Y] == _ => + apply Qeq_trans with ([Qq X (BigN.pred Y)]); + [apply spec_norm | idtac] + end. + rewrite BigN.spec_succ; generalize (BigN.spec_pos n); auto with zarith. + simpl. + repeat rewrite BigZ.spec_add. + repeat rewrite BigZ.spec_mul; simpl. + rewrite BigN.succ_pred; try apply Qeq_refl; apply lt_0_succ. + intros p1 n p2. + match goal with |- [norm ?X ?Y] == _ => + apply Qeq_trans with ([Qq X (BigN.pred Y)]); + [apply spec_norm | idtac] + end. + rewrite BigN.spec_succ; generalize (BigN.spec_pos p2); auto with zarith. + simpl. + repeat rewrite BigZ.spec_add. + repeat rewrite BigZ.spec_mul; simpl. + rewrite BinInt.Zplus_comm. + rewrite BigN.succ_pred; try apply Qeq_refl; apply lt_0_succ. + intros p1 q1 p2 q2. + match goal with |- [norm ?X ?Y] == _ => + apply Qeq_trans with ([Qq X (BigN.pred Y)]); + [apply spec_norm | idtac] + end; try apply Qeq_refl. + rewrite BigN.spec_mul. + apply Zmult_lt_0_compat; apply spec_succ_pos. + Qed. + + Theorem spec_add_normc x y: [[add_norm x y]] = [[x]] + [[y]]. + intros x y; unfold to_Qc. + apply trans_equal with (!! ([x] + [y])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_add_norm. + unfold Qcplus, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qplus_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Definition sub (x y: t): t := add x (opp y). + + Theorem spec_sub x y: ([sub x y] == [x] - [y])%Q. + intros x y; unfold sub; rewrite spec_add. + rewrite spec_opp; ring. + Qed. + + Theorem spec_subc x y: [[sub x y]] = [[x]] - [[y]]. + intros x y; unfold sub; rewrite spec_addc. + rewrite spec_oppc; ring. + Qed. + + Definition sub_norm x y := add_norm x (opp y). + + Theorem spec_sub_norm x y: ([sub_norm x y] == [x] - [y])%Q. + intros x y; unfold sub_norm; rewrite spec_add_norm. + rewrite spec_opp; ring. + Qed. + + Theorem spec_sub_normc x y: [[sub_norm x y]] = [[x]] - [[y]]. + intros x y; unfold sub_norm; rewrite spec_add_normc. + rewrite spec_oppc; ring. + Qed. + + + Definition mul (x y: t): t := + match x, y with + | Qz zx, Qz zy => Qz (BigZ.mul zx zy) + | Qz zx, Qq ny dy => Qq (BigZ.mul zx ny) dy + | Qq nx dx, Qz zy => Qq (BigZ.mul nx zy) dx + | Qq nx dx, Qq ny dy => + Qq (BigZ.mul nx ny) (BigN.pred (BigN.mul (BigN.succ dx) (BigN.succ dy))) + end. + + Theorem spec_mul x y: ([mul x y] == [x] * [y])%Q. + intros [x | nx dx] [y | ny dy]; unfold Qmult; simpl. + rewrite BigZ.spec_mul; repeat rewrite Zmult_1_r; auto. + apply Qeq_refl; auto. + rewrite BigZ.spec_mul; apply Qeq_refl. + rewrite BigZ.spec_mul; rewrite Pmult_1_r; auto. + apply Qeq_refl; auto. + assert (F1:= spec_succ_pos dx). + assert (F2:= spec_succ_pos dy). + rewrite BigN.succ_pred. + rewrite BigN.spec_mul; rewrite BigZ.spec_mul. + assert (tmp: + (forall a b, 0 < a -> 0 < b -> Z2P (a * b) = (Z2P a * Z2P b)%positive)%Z). + intros [|a|a] [|b|b]; simpl; auto; intros; apply False_ind; auto with zarith. + rewrite tmp; auto; apply Qeq_refl. + rewrite Nspec_lt, BigN.spec_0, BigN.spec_mul; auto. + apply Zmult_lt_0_compat; apply spec_succ_pos. + Qed. + + Theorem spec_mulc x y: [[mul x y]] = [[x]] * [[y]]. + intros x y; unfold to_Qc. + apply trans_equal with (!! ([x] * [y])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_mul. + unfold Qcmult, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qmult_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Definition mul_norm (x y: t): t := + match x, y with + | Qz zx, Qz zy => Qz (BigZ.mul zx zy) + | Qz zx, Qq ny dy => + if BigZ.eq_bool zx BigZ.zero then zero + else + let d := BigN.succ dy in + let gcd := BigN.gcd (BigZ.to_N zx) d in + if BigN.eq_bool gcd BigN.one then Qq (BigZ.mul zx ny) dy + else + let zx := BigZ.div zx (BigZ.Pos gcd) in + let d := BigN.div d gcd in + if BigN.eq_bool d BigN.one then Qz (BigZ.mul zx ny) + else Qq (BigZ.mul zx ny) (BigN.pred d) + | Qq nx dx, Qz zy => + if BigZ.eq_bool zy BigZ.zero then zero + else + let d := BigN.succ dx in + let gcd := BigN.gcd (BigZ.to_N zy) d in + if BigN.eq_bool gcd BigN.one then Qq (BigZ.mul zy nx) dx + else + let zy := BigZ.div zy (BigZ.Pos gcd) in + let d := BigN.div d gcd in + if BigN.eq_bool d BigN.one then Qz (BigZ.mul zy nx) + else Qq (BigZ.mul zy nx) (BigN.pred d) + | Qq nx dx, Qq ny dy => + norm (BigZ.mul nx ny) (BigN.mul (BigN.succ dx) (BigN.succ dy)) + end. + + Theorem spec_mul_norm x y: ([mul_norm x y] == [x] * [y])%Q. + intros x y; rewrite <- spec_mul. + unfold mul_norm, mul; case x; case y. + intros; apply Qeq_refl. + intros p1 n p2. + match goal with |- context[BigZ.eq_bool ?X ?Y] => + generalize (BigZ.spec_eq_bool X Y); case BigZ.eq_bool + end; unfold zero, to_Q; repeat rewrite BigZ.spec_0; intros H. + rewrite BigZ.spec_mul; rewrite H; red; auto. + assert (F: (0 < BigN.to_Z (BigZ.to_N p2))%Z). + case (Zle_lt_or_eq _ _ (BigN.spec_pos (BigZ.to_N p2))); auto. + intros H1; case H; rewrite spec_to_N; rewrite <- H1; ring. + assert (F1: (0 < BigN.to_Z (BigN.succ n))%Z). + rewrite BigN.spec_succ; generalize (BigN.spec_pos n); auto with zarith. + assert (F2: (0 < Zgcd (BigN.to_Z (BigZ.to_N p2)) (BigN.to_Z (BigN.succ n)))%Z). + case (Zle_lt_or_eq _ _ (Zgcd_is_pos (BigN.to_Z (BigZ.to_N p2)) + (BigN.to_Z (BigN.succ n)))); intros H3; auto. + generalize F; rewrite (Zgcd_inv_0_l _ _ (sym_equal H3)); auto with zarith. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_1; intros H1. + intros; apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_1. + rewrite BigN.spec_div; rewrite BigN.spec_gcd; + auto with zarith. + intros H2. + red; simpl. + repeat rewrite BigZ.spec_mul. + rewrite BigZ.spec_div; simpl; rewrite BigN.spec_gcd; auto with zarith. + rewrite Z2P_correct; auto with zarith. + rewrite spec_to_N. + rewrite Zmult_1_r; repeat rewrite <- Zmult_assoc. + rewrite (Zmult_comm (BigZ.to_Z p1)). + repeat rewrite Zmult_assoc. + rewrite Zgcd_div_swap; auto with zarith. + rewrite H2; ring. + intros H2. + red; simpl. + repeat rewrite BigZ.spec_mul. + rewrite BigZ.spec_div; simpl; rewrite BigN.spec_gcd; auto with zarith. + rewrite Z2P_correct; auto with zarith. + rewrite (spec_to_N p2). + case (Zle_lt_or_eq _ _ + (BigN.spec_pos (BigN.succ n / + BigN.gcd (BigZ.to_N p2) + (BigN.succ n)))%bigN); intros F3. + rewrite BigN.succ_pred; auto with zarith. + rewrite Z2P_correct; auto with zarith. + rewrite BigN.spec_div; simpl; rewrite BigN.spec_gcd; auto with zarith. + repeat rewrite <- Zmult_assoc. + rewrite (Zmult_comm (BigZ.to_Z p1)). + repeat rewrite Zmult_assoc. + rewrite Zgcd_div_swap; auto; try ring. + rewrite Nspec_lt, BigN.spec_0; auto. + apply False_ind; generalize F1. + rewrite (Zdivide_Zdiv_eq + (Zgcd (BigN.to_Z (BigZ.to_N p2)) (BigN.to_Z (BigN.succ n))) + (BigN.to_Z (BigN.succ n))); auto. + generalize F3; rewrite BigN.spec_div; rewrite BigN.spec_gcd; + auto with zarith. + intros HH; rewrite <- HH; auto with zarith. + assert (FF:= Zgcd_is_gcd (BigN.to_Z (BigZ.to_N p2)) + (BigN.to_Z (BigN.succ n))); inversion FF; auto. + intros p1 p2 n. + match goal with |- context[BigZ.eq_bool ?X ?Y] => + generalize (BigZ.spec_eq_bool X Y); case BigZ.eq_bool + end; unfold zero, to_Q; repeat rewrite BigZ.spec_0; intros H. + rewrite BigZ.spec_mul; rewrite H; red; simpl; ring. + assert (F: (0 < BigN.to_Z (BigZ.to_N p1))%Z). + case (Zle_lt_or_eq _ _ (BigN.spec_pos (BigZ.to_N p1))); auto. + intros H1; case H; rewrite spec_to_N; rewrite <- H1; ring. + assert (F1: (0 < BigN.to_Z (BigN.succ n))%Z). + rewrite BigN.spec_succ; generalize (BigN.spec_pos n); auto with zarith. + assert (F2: (0 < Zgcd (BigN.to_Z (BigZ.to_N p1)) (BigN.to_Z (BigN.succ n)))%Z). + case (Zle_lt_or_eq _ _ (Zgcd_is_pos (BigN.to_Z (BigZ.to_N p1)) + (BigN.to_Z (BigN.succ n)))); intros H3; auto. + generalize F; rewrite (Zgcd_inv_0_l _ _ (sym_equal H3)); auto with zarith. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_1; intros H1. + intros; repeat rewrite BigZ.spec_mul; rewrite Zmult_comm; apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_1. + rewrite BigN.spec_div; rewrite BigN.spec_gcd; + auto with zarith. + intros H2. + red; simpl. + repeat rewrite BigZ.spec_mul. + rewrite BigZ.spec_div; simpl; rewrite BigN.spec_gcd; auto with zarith. + rewrite Z2P_correct; auto with zarith. + rewrite spec_to_N. + rewrite Zmult_1_r; repeat rewrite <- Zmult_assoc. + rewrite (Zmult_comm (BigZ.to_Z p2)). + repeat rewrite Zmult_assoc. + rewrite Zgcd_div_swap; auto with zarith. + rewrite H2; ring. + intros H2. + red; simpl. + repeat rewrite BigZ.spec_mul. + rewrite BigZ.spec_div; simpl; rewrite BigN.spec_gcd; auto with zarith. + rewrite Z2P_correct; auto with zarith. + rewrite (spec_to_N p1). + case (Zle_lt_or_eq _ _ + (BigN.spec_pos (BigN.succ n / + BigN.gcd (BigZ.to_N p1) + (BigN.succ n)))%bigN); intros F3. + rewrite BigN.succ_pred; auto with zarith. + rewrite Z2P_correct; auto with zarith. + rewrite BigN.spec_div; simpl; rewrite BigN.spec_gcd; auto with zarith. + repeat rewrite <- Zmult_assoc. + rewrite (Zmult_comm (BigZ.to_Z p2)). + repeat rewrite Zmult_assoc. + rewrite Zgcd_div_swap; auto; try ring. + rewrite Nspec_lt, BigN.spec_0; auto. + apply False_ind; generalize F1. + rewrite (Zdivide_Zdiv_eq + (Zgcd (BigN.to_Z (BigZ.to_N p1)) (BigN.to_Z (BigN.succ n))) + (BigN.to_Z (BigN.succ n))); auto. + generalize F3; rewrite BigN.spec_div; rewrite BigN.spec_gcd; + auto with zarith. + intros HH; rewrite <- HH; auto with zarith. + assert (FF:= Zgcd_is_gcd (BigN.to_Z (BigZ.to_N p1)) + (BigN.to_Z (BigN.succ n))); inversion FF; auto. + intros p1 n1 p2 n2. + match goal with |- [norm ?X ?Y] == _ => + apply Qeq_trans with ([Qq X (BigN.pred Y)]); + [apply spec_norm | idtac] + end; try apply Qeq_refl. + rewrite BigN.spec_mul. + apply Zmult_lt_0_compat; rewrite BigN.spec_succ; + generalize (BigN.spec_pos n1) (BigN.spec_pos n2); auto with zarith. + Qed. + + Theorem spec_mul_normc x y: [[mul_norm x y]] = [[x]] * [[y]]. + intros x y; unfold to_Qc. + apply trans_equal with (!! ([x] * [y])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_mul_norm. + unfold Qcmult, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qmult_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Definition inv (x: t): t := + match x with + | Qz (BigZ.Pos n) => + if BigN.eq_bool n BigN.zero then zero else Qq BigZ.one (BigN.pred n) + | Qz (BigZ.Neg n) => + if BigN.eq_bool n BigN.zero then zero else Qq BigZ.minus_one (BigN.pred n) + | Qq (BigZ.Pos n) d => + if BigN.eq_bool n BigN.zero then zero else Qq (BigZ.Pos (BigN.succ d)) (BigN.pred n) + | Qq (BigZ.Neg n) d => + if BigN.eq_bool n BigN.zero then zero else Qq (BigZ.Neg (BigN.succ d)) (BigN.pred n) + end. + + Theorem spec_inv x: ([inv x] == /[x])%Q. + intros [ [x | x] | [nx | nx] dx]; unfold inv. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H. + unfold zero, to_Q; rewrite BigZ.spec_0. + unfold BigZ.to_Z; rewrite H; apply Qeq_refl. + assert (F: (0 < BigN.to_Z x)%Z). + case (Zle_lt_or_eq _ _ (BigN.spec_pos x)); auto with zarith. + unfold to_Q; rewrite BigZ.spec_1. + rewrite BigN.succ_pred by (rewrite Nspec_lt, BigN.spec_0; auto). + red; unfold Qinv; simpl. + generalize F; case BigN.to_Z; auto with zarith. + intros p Hp; discriminate Hp. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H. + unfold zero, to_Q; rewrite BigZ.spec_0. + unfold BigZ.to_Z; rewrite H; apply Qeq_refl. + assert (F: (0 < BigN.to_Z x)%Z). + case (Zle_lt_or_eq _ _ (BigN.spec_pos x)); auto with zarith. + red; unfold Qinv; simpl. + rewrite BigN.succ_pred by (rewrite Nspec_lt, BigN.spec_0; auto). + generalize F; case BigN.to_Z; simpl; auto with zarith. + intros p Hp; discriminate Hp. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H. + unfold zero, to_Q; rewrite BigZ.spec_0. + unfold BigZ.to_Z; rewrite H; apply Qeq_refl. + assert (F: (0 < BigN.to_Z nx)%Z). + case (Zle_lt_or_eq _ _ (BigN.spec_pos nx)); auto with zarith. + red; unfold Qinv; simpl. + rewrite BigN.succ_pred by (rewrite Nspec_lt, BigN.spec_0; auto). + rewrite BigN.spec_succ; rewrite Z2P_correct; auto with zarith. + generalize F; case BigN.to_Z; auto with zarith. + intros p Hp; discriminate Hp. + generalize (BigN.spec_pos dx); auto with zarith. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H. + unfold zero, to_Q; rewrite BigZ.spec_0. + unfold BigZ.to_Z; rewrite H; apply Qeq_refl. + assert (F: (0 < BigN.to_Z nx)%Z). + case (Zle_lt_or_eq _ _ (BigN.spec_pos nx)); auto with zarith. + red; unfold Qinv; simpl. + rewrite BigN.succ_pred by (rewrite Nspec_lt, BigN.spec_0; auto). + rewrite BigN.spec_succ; rewrite Z2P_correct; auto with zarith. + generalize F; case BigN.to_Z; auto with zarith. + simpl; intros. + match goal with |- (?X = Zneg ?Y)%Z => + replace (Zneg Y) with (-(Zpos Y))%Z; + try rewrite Z2P_correct; auto with zarith + end. + rewrite Zpos_mult_morphism; + rewrite Z2P_correct; auto with zarith; try ring. + generalize (BigN.spec_pos dx); auto with zarith. + intros p Hp; discriminate Hp. + generalize (BigN.spec_pos dx); auto with zarith. + Qed. + + Theorem spec_invc x: [[inv x]] = /[[x]]. + intros x; unfold to_Qc. + apply trans_equal with (!! (/[x])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_inv. + unfold Qcinv, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qinv_comp; apply Qeq_sym; apply Qred_correct. + Qed. + +Definition inv_norm x := + match x with + | Qz (BigZ.Pos n) => + if BigN.eq_bool n BigN.zero then zero else + if BigN.eq_bool n BigN.one then x else Qq BigZ.one (BigN.pred n) + | Qz (BigZ.Neg n) => + if BigN.eq_bool n BigN.zero then zero else + if BigN.eq_bool n BigN.one then x else Qq BigZ.minus_one (BigN.pred n) + | Qq (BigZ.Pos n) d => let d := BigN.succ d in + if BigN.eq_bool n BigN.zero then zero else + if BigN.eq_bool n BigN.one then Qz (BigZ.Pos d) + else Qq (BigZ.Pos d) (BigN.pred n) + | Qq (BigZ.Neg n) d => let d := BigN.succ d in + if BigN.eq_bool n BigN.zero then zero else + if BigN.eq_bool n BigN.one then Qz (BigZ.Neg d) + else Qq (BigZ.Neg d) (BigN.pred n) + end. + + Theorem spec_inv_norm x: ([inv_norm x] == /[x])%Q. + intros x; rewrite <- spec_inv. + (case x; clear x); [intros [x | x] | intros nx dx]; + unfold inv_norm, inv. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H. + apply Qeq_refl. + assert (F: (0 < BigN.to_Z x)%Z). + case (Zle_lt_or_eq _ _ (BigN.spec_pos x)); auto with zarith. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_1; intros H1. + red; simpl. + rewrite BigN.succ_pred by (rewrite Nspec_lt, BigN.spec_0; auto). + rewrite Z2P_correct; try rewrite H1; auto with zarith. + apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H. + apply Qeq_refl. + assert (F: (0 < BigN.to_Z x)%Z). + case (Zle_lt_or_eq _ _ (BigN.spec_pos x)); auto with zarith. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_1; intros H1. + red; simpl. + rewrite BigN.succ_pred by (rewrite Nspec_lt, BigN.spec_0; auto). + rewrite Z2P_correct; try rewrite H1; auto with zarith. + apply Qeq_refl. + case nx; clear nx; intros nx. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H. + apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_1; intros H1. + red; simpl. + rewrite BigN.succ_pred; try rewrite H1; auto with zarith. + rewrite Nspec_lt, BigN.spec_0, H1; auto with zarith. + apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H. + apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_1; intros H1. + red; simpl. + rewrite BigN.succ_pred; try rewrite H1; auto with zarith. + rewrite Nspec_lt, BigN.spec_0, H1; auto with zarith. + apply Qeq_refl. + Qed. + + + Definition div x y := mul x (inv y). + + Theorem spec_div x y: ([div x y] == [x] / [y])%Q. + intros x y; unfold div; rewrite spec_mul; auto. + unfold Qdiv; apply Qmult_comp. + apply Qeq_refl. + apply spec_inv; auto. + Qed. + + Theorem spec_divc x y: [[div x y]] = [[x]] / [[y]]. + intros x y; unfold div; rewrite spec_mulc; auto. + unfold Qcdiv; apply f_equal2 with (f := Qcmult); auto. + apply spec_invc; auto. + Qed. + + Definition div_norm x y := mul_norm x (inv y). + + Theorem spec_div_norm x y: ([div_norm x y] == [x] / [y])%Q. + intros x y; unfold div_norm; rewrite spec_mul_norm; auto. + unfold Qdiv; apply Qmult_comp. + apply Qeq_refl. + apply spec_inv; auto. + Qed. + + Theorem spec_div_normc x y: [[div_norm x y]] = [[x]] / [[y]]. + intros x y; unfold div_norm; rewrite spec_mul_normc; auto. + unfold Qcdiv; apply f_equal2 with (f := Qcmult); auto. + apply spec_invc; auto. + Qed. + + + Definition square (x: t): t := + match x with + | Qz zx => Qz (BigZ.square zx) + | Qq nx dx => Qq (BigZ.square nx) (BigN.pred (BigN.square (BigN.succ dx))) + end. + + Theorem spec_square x: ([square x] == [x] ^ 2)%Q. + intros [ x | nx dx]; unfold square. + red; simpl; rewrite BigZ.spec_square; auto with zarith. + red; simpl; rewrite BigZ.spec_square; auto with zarith. + assert (F: (0 < BigN.to_Z (BigN.succ dx))%Z). + rewrite BigN.spec_succ; + case (Zle_lt_or_eq _ _ (BigN.spec_pos dx)); auto with zarith. + assert (F1 : (0 < BigN.to_Z (BigN.square (BigN.succ dx)))%Z). + rewrite BigN.spec_square; apply Zmult_lt_0_compat; + auto with zarith. + rewrite BigN.succ_pred by (rewrite Nspec_lt, BigN.spec_0; auto). + rewrite Zpos_mult_morphism. + repeat rewrite Z2P_correct; auto with zarith. + repeat rewrite BigN.spec_succ; auto with zarith. + rewrite BigN.spec_square; auto with zarith. + repeat rewrite BigN.spec_succ; auto with zarith. + Qed. + + Theorem spec_squarec x: [[square x]] = [[x]]^2. + intros x; unfold to_Qc. + apply trans_equal with (!! ([x]^2)). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_square. + simpl Qcpower. + replace (!! [x] * 1) with (!![x]); try ring. + simpl. + unfold Qcmult, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qmult_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Definition power_pos (x: t) p: t := + match x with + | Qz zx => Qz (BigZ.power_pos zx p) + | Qq nx dx => Qq (BigZ.power_pos nx p) (BigN.pred (BigN.power_pos (BigN.succ dx) p)) + end. + + + Theorem spec_power_pos x p: ([power_pos x p] == [x] ^ Zpos p)%Q. + Proof. + intros [x | nx dx] p; unfold power_pos. + unfold power_pos; red; simpl. + generalize (Qpower_decomp p (BigZ.to_Z x) 1). + unfold Qeq; simpl. + rewrite Zpower_pos_1_l; simpl Z2P. + rewrite Zmult_1_r. + intros H; rewrite H. + rewrite BigZ.spec_power_pos; simpl; ring. + assert (F1: (0 < BigN.to_Z (BigN.succ dx))%Z). + rewrite BigN.spec_succ; + generalize (BigN.spec_pos dx); auto with zarith. + assert (F2: (0 < BigN.to_Z (BigN.succ dx) ^ ' p)%Z). + unfold Zpower; apply Zpower_pos_pos; auto. + unfold power_pos; red; simpl. + rewrite BigN.succ_pred, BigN.spec_power_pos. + rewrite Z2P_correct; auto. + generalize (Qpower_decomp p (BigZ.to_Z nx) + (Z2P (BigN.to_Z (BigN.succ dx)))). + unfold Qeq; simpl. + repeat rewrite Z2P_correct; auto. + unfold Qeq; simpl; intros HH. + rewrite HH. + rewrite BigZ.spec_power_pos; simpl; ring. + rewrite Nspec_lt, BigN.spec_0, BigN.spec_power_pos; auto. + Qed. + + Theorem spec_power_posc x p: [[power_pos x p]] = [[x]] ^ nat_of_P p. + intros x p; unfold to_Qc. + apply trans_equal with (!! ([x]^Zpos p)). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_power_pos. + pattern p; apply Pind; clear p. + simpl; ring. + intros p Hrec. + rewrite nat_of_P_succ_morphism; simpl Qcpower. + rewrite <- Hrec. + unfold Qcmult, Q2Qc. + apply Qc_decomp; intros _ _; + unfold this. + apply Qred_complete. + assert (F: [x] ^ ' Psucc p == [x] * [x] ^ ' p). + simpl; case x; simpl; clear x Hrec. + intros x; simpl; repeat rewrite Qpower_decomp; simpl. + red; simpl; repeat rewrite Zpower_pos_1_l; simpl Z2P. + rewrite Pplus_one_succ_l. + rewrite Zpower_pos_is_exp. + rewrite Zpower_pos_1_r; auto. + intros nx dx; simpl; repeat rewrite Qpower_decomp; simpl. + red; simpl; repeat rewrite Zpower_pos_1_l; simpl Z2P. + rewrite Pplus_one_succ_l. + rewrite Zpower_pos_is_exp. + rewrite Zpower_pos_1_r; auto. + assert (F1: (0 < BigN.to_Z (BigN.succ dx))%Z). + rewrite BigN.spec_succ; generalize (BigN.spec_pos dx); + auto with zarith. + repeat rewrite Zpos_mult_morphism. + repeat rewrite Z2P_correct; auto. + 2: apply Zpower_pos_pos; auto. + 2: apply Zpower_pos_pos; auto. + rewrite Zpower_pos_is_exp. + rewrite Zpower_pos_1_r; auto. + rewrite F. + apply Qmult_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + +End Qp. diff --git a/theories/Numbers/Rational/BigQ/QvMake.v b/theories/Numbers/Rational/BigQ/QvMake.v new file mode 100644 index 00000000..4523e241 --- /dev/null +++ b/theories/Numbers/Rational/BigQ/QvMake.v @@ -0,0 +1,1151 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* True + | Qq n d => if BigN.eq_bool d BigN.zero then False else True + end. + + Definition of_Q q: t := + match q with x # y => + Qq (BigZ.of_Z x) (BigN.of_N (Npos y)) + end. + + Definition of_Qc q := of_Q (this q). + + Definition to_Q (q: t) := + match q with + Qz x => BigZ.to_Z x # 1 + |Qq x y => BigZ.to_Z x # Z2P (BigN.to_Z y) + end. + + Definition to_Qc q := !!(to_Q q). + + Notation "[[ x ]]" := (to_Qc x). + + Notation "[ x ]" := (to_Q x). + + Theorem spec_to_Q: forall q: Q, [of_Q q] = q. + intros (x,y); simpl. + rewrite BigZ.spec_of_Z; simpl. + rewrite (BigN.spec_of_pos); auto. + Qed. + + Theorem spec_to_Qc: forall q, [[of_Qc q]] = q. + intros (x, Hx); unfold of_Qc, to_Qc; simpl. + apply Qc_decomp; simpl. + intros; rewrite spec_to_Q; auto. + Qed. + + Definition opp (x: t): t := + match x with + | Qz zx => Qz (BigZ.opp zx) + | Qq nx dx => Qq (BigZ.opp nx) dx + end. + + Theorem wf_opp: forall x, wf x -> wf (opp x). + intros [zx | nx dx]; unfold opp, wf; auto. + Qed. + + Theorem spec_opp: forall q, ([opp q] = -[q])%Q. + intros [z | x y]; simpl. + rewrite BigZ.spec_opp; auto. + rewrite BigZ.spec_opp; auto. + Qed. + + Theorem spec_oppc: forall q, [[opp q]] = -[[q]]. + intros q; unfold Qcopp, to_Qc, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + rewrite spec_opp. + rewrite <- Qred_opp. + rewrite Qred_involutive; auto. + Qed. + + (* Les fonctions doivent assurer que si leur arguments sont valides alors + le resultat est correct et valide (si c'est un Q) + *) + + Definition compare (x y: t) := + match x, y with + | Qz zx, Qz zy => BigZ.compare zx zy + | Qz zx, Qq ny dy => BigZ.compare (BigZ.mul zx (BigZ.Pos dy)) ny + | Qq nx dx, Qz zy => BigZ.compare nx (BigZ.mul zy (BigZ.Pos dx)) + | Qq nx dx, Qq ny dy => BigZ.compare (BigZ.mul nx (BigZ.Pos dy)) (BigZ.mul ny (BigZ.Pos dx)) + end. + + Theorem spec_compare: forall q1 q2, wf q1 -> wf q2 -> + compare q1 q2 = ([q1] ?= [q2])%Q. + intros [z1 | x1 y1] [z2 | x2 y2]; + unfold Qcompare, compare, to_Q, Qnum, Qden, wf. + repeat rewrite Zmult_1_r. + generalize (BigZ.spec_compare z1 z2); case BigZ.compare; intros H; auto. + rewrite H; rewrite Zcompare_refl; auto. + rewrite Zmult_1_r. + generalize (BigN.spec_eq_bool y2 BigN.zero); + case BigN.eq_bool. + intros _ _ HH; case HH. + rewrite BigN.spec_0; intros HH _ _. + rewrite Z2P_correct; auto with zarith. + 2: generalize (BigN.spec_pos y2); auto with zarith. + generalize (BigZ.spec_compare (z1 * BigZ.Pos y2) x2)%bigZ; case BigZ.compare; + rewrite BigZ.spec_mul; simpl; intros H; apply sym_equal; auto. + rewrite H; rewrite Zcompare_refl; auto. + generalize (BigN.spec_eq_bool y1 BigN.zero); + case BigN.eq_bool. + intros _ HH; case HH. + rewrite BigN.spec_0; intros HH _ _. + rewrite Z2P_correct; auto with zarith. + 2: generalize (BigN.spec_pos y1); auto with zarith. + rewrite Zmult_1_r. + generalize (BigZ.spec_compare x1 (z2 * BigZ.Pos y1))%bigZ; case BigZ.compare; + rewrite BigZ.spec_mul; simpl; intros H; apply sym_equal; auto. + rewrite H; rewrite Zcompare_refl; auto. + generalize (BigN.spec_eq_bool y1 BigN.zero); + case BigN.eq_bool. + intros _ HH; case HH. + rewrite BigN.spec_0; intros HH1. + generalize (BigN.spec_eq_bool y2 BigN.zero); + case BigN.eq_bool. + intros _ _ HH; case HH. + rewrite BigN.spec_0; intros HH2 _ _. + repeat rewrite Z2P_correct. + 2: generalize (BigN.spec_pos y1); auto with zarith. + 2: generalize (BigN.spec_pos y2); auto with zarith. + generalize (BigZ.spec_compare (x1 * BigZ.Pos y2) + (x2 * BigZ.Pos y1))%bigZ; case BigZ.compare; + repeat rewrite BigZ.spec_mul; simpl; intros H; apply sym_equal; auto. + rewrite H; rewrite Zcompare_refl; auto. + Qed. + + Theorem spec_comparec: forall q1 q2, wf q1 -> wf q2 -> + compare q1 q2 = ([[q1]] ?= [[q2]]). + unfold Qccompare, to_Qc. + intros q1 q2 Hq1 Hq2; rewrite spec_compare; simpl; auto. + apply Qcompare_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Definition norm n d: t := + if BigZ.eq_bool n BigZ.zero then zero + else + let gcd := BigN.gcd (BigZ.to_N n) d in + if BigN.eq_bool gcd BigN.one then Qq n d + else + let n := BigZ.div n (BigZ.Pos gcd) in + let d := BigN.div d gcd in + if BigN.eq_bool d BigN.one then Qz n + else Qq n d. + + Theorem wf_norm: forall n q, + (BigN.to_Z q <> 0)%Z -> wf (norm n q). + intros p q; unfold norm, wf; intros Hq. + assert (Hp := BigN.spec_pos (BigZ.to_N p)). + match goal with |- context[BigZ.eq_bool ?X ?Y] => + generalize (BigZ.spec_eq_bool X Y); case BigZ.eq_bool + end; auto; rewrite BigZ.spec_0; intros H1. + simpl; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_1. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_1. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0. + set (a := BigN.to_Z (BigZ.to_N p)). + set (b := (BigN.to_Z q)). + assert (F: (0 < Zgcd a b)%Z). + case (Zle_lt_or_eq _ _ (Zgcd_is_pos a b)); auto. + intros HH1; case Hq; apply (Zgcd_inv_0_r _ _ (sym_equal HH1)). + rewrite BigN.spec_div; rewrite BigN.spec_gcd; auto; fold a; fold b. + intros H; case Hq; fold b. + rewrite (Zdivide_Zdiv_eq (Zgcd a b) b); auto. + rewrite H; auto with zarith. + assert (F1:= Zgcd_is_gcd a b); inversion F1; auto. + Qed. + + Theorem spec_norm: forall n q, + ((0 < BigN.to_Z q)%Z -> [norm n q] == [Qq n q])%Q. + intros p q; unfold norm; intros Hq. + assert (Hp := BigN.spec_pos (BigZ.to_N p)). + match goal with |- context[BigZ.eq_bool ?X ?Y] => + generalize (BigZ.spec_eq_bool X Y); case BigZ.eq_bool + end; auto; rewrite BigZ.spec_0; intros H1. + red; simpl; rewrite H1; ring. + case (Zle_lt_or_eq _ _ Hp); clear Hp; intros Hp. + case (Zle_lt_or_eq _ _ + (Zgcd_is_pos (BigN.to_Z (BigZ.to_N p)) (BigN.to_Z q))); intros H4. + 2: generalize Hq; rewrite (Zgcd_inv_0_r _ _ (sym_equal H4)); auto with zarith. + 2: red; simpl; auto with zarith. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_1; intros H2. + apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_1. + red; simpl. + rewrite BigZ.spec_div; simpl; rewrite BigN.spec_gcd; auto with zarith. + rewrite BigN.spec_div; simpl; rewrite BigN.spec_gcd; auto with zarith. + rewrite Zmult_1_r. + rewrite Z2P_correct; auto with zarith. + rewrite spec_to_N; intros; rewrite Zgcd_div_swap; auto. + rewrite H; ring. + intros H3. + red; simpl. + rewrite BigZ.spec_div; simpl; rewrite BigN.spec_gcd; auto with zarith. + assert (F: (0 < BigN.to_Z (q / BigN.gcd (BigZ.to_N p) q)%bigN)%Z). + rewrite BigN.spec_div; auto with zarith. + rewrite BigN.spec_gcd. + apply Zgcd_div_pos; auto. + rewrite BigN.spec_gcd; auto. + rewrite Z2P_correct; auto. + rewrite Z2P_correct; auto. + rewrite BigN.spec_div; simpl; rewrite BigN.spec_gcd; auto with zarith. + rewrite spec_to_N; apply Zgcd_div_swap; auto. + case H1; rewrite spec_to_N; rewrite <- Hp; ring. + Qed. + + Theorem spec_normc: forall n q, + (0 < BigN.to_Z q)%Z -> [[norm n q]] = [[Qq n q]]. + intros n q H; unfold to_Qc, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_norm; auto. + Qed. + + Definition add (x y: t): t := + match x, y with + | Qz zx, Qz zy => Qz (BigZ.add zx zy) + | Qz zx, Qq ny dy => Qq (BigZ.add (BigZ.mul zx (BigZ.Pos dy)) ny) dy + | Qq nx dx, Qz zy => Qq (BigZ.add nx (BigZ.mul zy (BigZ.Pos dx))) dx + | Qq nx dx, Qq ny dy => + let n := BigZ.add (BigZ.mul nx (BigZ.Pos dy)) (BigZ.mul ny (BigZ.Pos dx)) in + let d := BigN.mul dx dy in + Qq n d + end. + + Theorem wf_add: forall x y, wf x -> wf y -> wf (add x y). + intros [zx | nx dx] [zy | ny dy]; unfold add, wf; auto. + repeat match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; rewrite BigN.spec_mul. + intros H1 H2 H3. + case (Zmult_integral _ _ H1); auto with zarith. + Qed. + + Theorem spec_add x y: wf x -> wf y -> + ([add x y] == [x] + [y])%Q. + intros [x | nx dx] [y | ny dy]; unfold Qplus; simpl. + rewrite BigZ.spec_add; repeat rewrite Zmult_1_r; auto. + intros; apply Qeq_refl; auto. + assert (F1:= BigN.spec_pos dy). + rewrite Zmult_1_r. + generalize (BigN.spec_eq_bool dy BigN.zero); + case BigN.eq_bool. + intros _ _ HH; case HH. + rewrite BigN.spec_0; intros HH _ _. + rewrite Z2P_correct; auto with zarith. + rewrite BigZ.spec_add; rewrite BigZ.spec_mul. + simpl; apply Qeq_refl. + generalize (BigN.spec_eq_bool dx BigN.zero); + case BigN.eq_bool. + intros _ HH; case HH. + rewrite BigN.spec_0; intros HH _ _. + assert (F1:= BigN.spec_pos dx). + rewrite Zmult_1_r; rewrite Pmult_1_r. + simpl; rewrite Z2P_correct; auto with zarith. + rewrite BigZ.spec_add; rewrite BigZ.spec_mul; simpl. + apply Qeq_refl. + generalize (BigN.spec_eq_bool dx BigN.zero); + case BigN.eq_bool. + intros _ HH; case HH. + rewrite BigN.spec_0; intros HH1. + generalize (BigN.spec_eq_bool dy BigN.zero); + case BigN.eq_bool. + intros _ _ HH; case HH. + rewrite BigN.spec_0; intros HH2 _ _. + assert (Fx: (0 < BigN.to_Z dx)%Z). + generalize (BigN.spec_pos dx); auto with zarith. + assert (Fy: (0 < BigN.to_Z dy)%Z). + generalize (BigN.spec_pos dy); auto with zarith. + rewrite BigZ.spec_add; repeat rewrite BigN.spec_mul. + red; simpl. + rewrite Zpos_mult_morphism. + repeat rewrite Z2P_correct; auto. + repeat rewrite BigZ.spec_mul; simpl; auto. + apply Zmult_lt_0_compat; auto. + Qed. + + Theorem spec_addc x y: wf x -> wf y -> + [[add x y]] = [[x]] + [[y]]. + intros x y H1 H2; unfold to_Qc. + apply trans_equal with (!! ([x] + [y])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_add; auto. + unfold Qcplus, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qplus_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Definition add_norm (x y: t): t := + match x, y with + | Qz zx, Qz zy => Qz (BigZ.add zx zy) + | Qz zx, Qq ny dy => + norm (BigZ.add (BigZ.mul zx (BigZ.Pos dy)) ny) dy + | Qq nx dx, Qz zy => + norm (BigZ.add (BigZ.mul zy (BigZ.Pos dx)) nx) dx + | Qq nx dx, Qq ny dy => + let n := BigZ.add (BigZ.mul nx (BigZ.Pos dy)) (BigZ.mul ny (BigZ.Pos dx)) in + let d := BigN.mul dx dy in + norm n d + end. + + Theorem wf_add_norm: forall x y, wf x -> wf y -> wf (add_norm x y). + intros [zx | nx dx] [zy | ny dy]; unfold add_norm; auto. + intros HH1 HH2; apply wf_norm. + generalize HH2; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto. + intros HH1 HH2; apply wf_norm. + generalize HH1; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto. + intros HH1 HH2; apply wf_norm. + rewrite BigN.spec_mul; intros HH3. + case (Zmult_integral _ _ HH3). + generalize HH1; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto. + generalize HH2; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto. + Qed. + + Theorem spec_add_norm x y: wf x -> wf y -> + ([add_norm x y] == [x] + [y])%Q. + intros x y H1 H2; rewrite <- spec_add; auto. + generalize H1 H2; unfold add_norm, add, wf; case x; case y; clear H1 H2. + intros; apply Qeq_refl. + intros p1 n p2 _. + generalize (BigN.spec_eq_bool n BigN.zero); + case BigN.eq_bool. + intros _ HH; case HH. + rewrite BigN.spec_0; intros HH _. + match goal with |- [norm ?X ?Y] == _ => + apply Qeq_trans with ([Qq X Y]); + [apply spec_norm | idtac] + end. + generalize (BigN.spec_pos n); auto with zarith. + simpl. + repeat rewrite BigZ.spec_add. + repeat rewrite BigZ.spec_mul; simpl. + apply Qeq_refl. + intros p1 n p2. + generalize (BigN.spec_eq_bool p2 BigN.zero); + case BigN.eq_bool. + intros _ HH; case HH. + rewrite BigN.spec_0; intros HH _ _. + match goal with |- [norm ?X ?Y] == _ => + apply Qeq_trans with ([Qq X Y]); + [apply spec_norm | idtac] + end. + generalize (BigN.spec_pos p2); auto with zarith. + simpl. + repeat rewrite BigZ.spec_add. + repeat rewrite BigZ.spec_mul; simpl. + rewrite Zplus_comm. + apply Qeq_refl. + intros p1 q1 p2 q2. + generalize (BigN.spec_eq_bool q2 BigN.zero); + case BigN.eq_bool. + intros _ HH; case HH. + rewrite BigN.spec_0; intros HH1 _. + generalize (BigN.spec_eq_bool q1 BigN.zero); + case BigN.eq_bool. + intros _ HH; case HH. + rewrite BigN.spec_0; intros HH2 _. + match goal with |- [norm ?X ?Y] == _ => + apply Qeq_trans with ([Qq X Y]); + [apply spec_norm | idtac] + end; try apply Qeq_refl. + rewrite BigN.spec_mul. + apply Zmult_lt_0_compat. + generalize (BigN.spec_pos q2); auto with zarith. + generalize (BigN.spec_pos q1); auto with zarith. + Qed. + + Theorem spec_add_normc x y: wf x -> wf y -> + [[add_norm x y]] = [[x]] + [[y]]. + intros x y Hx Hy; unfold to_Qc. + apply trans_equal with (!! ([x] + [y])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_add_norm; auto. + unfold Qcplus, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qplus_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Definition sub x y := add x (opp y). + + Theorem wf_sub x y: wf x -> wf y -> wf (sub x y). + intros x y Hx Hy; unfold sub; apply wf_add; auto. + apply wf_opp; auto. + Qed. + + Theorem spec_sub x y: wf x -> wf y -> + ([sub x y] == [x] - [y])%Q. + intros x y Hx Hy; unfold sub; rewrite spec_add; auto. + rewrite spec_opp; ring. + apply wf_opp; auto. + Qed. + + Theorem spec_subc x y: wf x -> wf y -> + [[sub x y]] = [[x]] - [[y]]. + intros x y Hx Hy; unfold sub; rewrite spec_addc; auto. + rewrite spec_oppc; ring. + apply wf_opp; auto. + Qed. + + Definition sub_norm x y := add_norm x (opp y). + + Theorem wf_sub_norm x y: wf x -> wf y -> wf (sub_norm x y). + intros x y Hx Hy; unfold sub_norm; apply wf_add_norm; auto. + apply wf_opp; auto. + Qed. + + Theorem spec_sub_norm x y: wf x -> wf y -> + ([sub_norm x y] == [x] - [y])%Q. + intros x y Hx Hy; unfold sub_norm; rewrite spec_add_norm; auto. + rewrite spec_opp; ring. + apply wf_opp; auto. + Qed. + + Theorem spec_sub_normc x y: wf x -> wf y -> + [[sub_norm x y]] = [[x]] - [[y]]. + intros x y Hx Hy; unfold sub_norm; rewrite spec_add_normc; auto. + rewrite spec_oppc; ring. + apply wf_opp; auto. + Qed. + + Definition mul (x y: t): t := + match x, y with + | Qz zx, Qz zy => Qz (BigZ.mul zx zy) + | Qz zx, Qq ny dy => Qq (BigZ.mul zx ny) dy + | Qq nx dx, Qz zy => Qq (BigZ.mul nx zy) dx + | Qq nx dx, Qq ny dy => + Qq (BigZ.mul nx ny) (BigN.mul dx dy) + end. + + Theorem wf_mul: forall x y, wf x -> wf y -> wf (mul x y). + intros [zx | nx dx] [zy | ny dy]; unfold mul, wf; auto. + repeat match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; rewrite BigN.spec_mul. + intros H1 H2 H3. + case (Zmult_integral _ _ H1); auto with zarith. + Qed. + + Theorem spec_mul x y: wf x -> wf y -> ([mul x y] == [x] * [y])%Q. + intros [x | nx dx] [y | ny dy]; unfold Qmult; simpl. + rewrite BigZ.spec_mul; repeat rewrite Zmult_1_r; auto. + intros; apply Qeq_refl; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto. + intros _ _ HH; case HH. + rewrite BigN.spec_0; intros HH1 _ _. + rewrite BigZ.spec_mul; apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto. + intros _ HH; case HH. + rewrite BigN.spec_0; intros HH1 _ _. + rewrite BigZ.spec_mul; rewrite Pmult_1_r. + apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto. + intros _ HH; case HH. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto. + intros _ _ _ HH; case HH. + rewrite BigN.spec_0; intros H1 H2 _ _. + rewrite BigZ.spec_mul; rewrite BigN.spec_mul. + assert (tmp: + (forall a b, 0 < a -> 0 < b -> Z2P (a * b) = (Z2P a * Z2P b)%positive)%Z). + intros [|a|a] [|b|b]; simpl; auto; intros; apply False_ind; auto with zarith. + rewrite tmp; auto. + apply Qeq_refl. + generalize (BigN.spec_pos dx); auto with zarith. + generalize (BigN.spec_pos dy); auto with zarith. + Qed. + + Theorem spec_mulc x y: wf x -> wf y -> + [[mul x y]] = [[x]] * [[y]]. + intros x y Hx Hy; unfold to_Qc. + apply trans_equal with (!! ([x] * [y])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_mul; auto. + unfold Qcmult, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qmult_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Definition mul_norm (x y: t): t := + match x, y with + | Qz zx, Qz zy => Qz (BigZ.mul zx zy) + | Qz zx, Qq ny dy => + if BigZ.eq_bool zx BigZ.zero then zero + else + let gcd := BigN.gcd (BigZ.to_N zx) dy in + if BigN.eq_bool gcd BigN.one then Qq (BigZ.mul zx ny) dy + else + let zx := BigZ.div zx (BigZ.Pos gcd) in + let d := BigN.div dy gcd in + if BigN.eq_bool d BigN.one then Qz (BigZ.mul zx ny) + else Qq (BigZ.mul zx ny) d + | Qq nx dx, Qz zy => + if BigZ.eq_bool zy BigZ.zero then zero + else + let gcd := BigN.gcd (BigZ.to_N zy) dx in + if BigN.eq_bool gcd BigN.one then Qq (BigZ.mul zy nx) dx + else + let zy := BigZ.div zy (BigZ.Pos gcd) in + let d := BigN.div dx gcd in + if BigN.eq_bool d BigN.one then Qz (BigZ.mul zy nx) + else Qq (BigZ.mul zy nx) d + | Qq nx dx, Qq ny dy => norm (BigZ.mul nx ny) (BigN.mul dx dy) + end. + + Theorem wf_mul_norm: forall x y, wf x -> wf y -> wf (mul_norm x y). + intros [zx | nx dx] [zy | ny dy]; unfold mul_norm; auto. + intros HH1 HH2. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; + match goal with |- context[BigZ.eq_bool ?X ?Y] => + generalize (BigZ.spec_eq_bool X Y); case BigZ.eq_bool + end; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto. + rewrite BigN.spec_1; rewrite BigZ.spec_0. + intros H1 H2; unfold wf. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto. + rewrite BigN.spec_0. + set (a := BigN.to_Z (BigZ.to_N zx)). + set (b := (BigN.to_Z dy)). + assert (F: (0 < Zgcd a b)%Z). + case (Zle_lt_or_eq _ _ (Zgcd_is_pos a b)); auto. + intros HH3; case H2; rewrite spec_to_N; fold a. + rewrite (Zgcd_inv_0_l _ _ (sym_equal HH3)); try ring. + rewrite BigN.spec_div; rewrite BigN.spec_gcd; fold a; fold b; auto. + intros H. + generalize HH2; simpl wf. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto. + rewrite BigN.spec_0; intros HH; case HH; fold b. + rewrite (Zdivide_Zdiv_eq (Zgcd a b) b); auto. + rewrite H; auto with zarith. + assert (F1:= Zgcd_is_gcd a b); inversion F1; auto. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto. + rewrite BigN.spec_1; rewrite BigN.spec_gcd. + intros HH1 H1 H2. + match goal with |- context[BigZ.eq_bool ?X ?Y] => + generalize (BigZ.spec_eq_bool X Y); case BigZ.eq_bool + end; auto. + rewrite BigN.spec_1; rewrite BigN.spec_gcd. + intros HH1 H1 H2. + match goal with |- context[BigZ.eq_bool ?X ?Y] => + generalize (BigZ.spec_eq_bool X Y); case BigZ.eq_bool + end; auto. + rewrite BigZ.spec_0. + intros HH2. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto. + set (a := BigN.to_Z (BigZ.to_N zy)). + set (b := (BigN.to_Z dx)). + assert (F: (0 < Zgcd a b)%Z). + case (Zle_lt_or_eq _ _ (Zgcd_is_pos a b)); auto. + intros HH3; case HH2; rewrite spec_to_N; fold a. + rewrite (Zgcd_inv_0_l _ _ (sym_equal HH3)); try ring. + rewrite BigN.spec_div; rewrite BigN.spec_gcd; fold a; fold b; auto. + intros H; unfold wf. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto. + rewrite BigN.spec_0. + rewrite BigN.spec_div; rewrite BigN.spec_gcd; fold a; fold b; auto. + intros HH; generalize H1; simpl wf. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto. + rewrite BigN.spec_0. + intros HH3; case HH3; fold b. + rewrite (Zdivide_Zdiv_eq (Zgcd a b) b); auto. + rewrite HH; auto with zarith. + assert (F1:= Zgcd_is_gcd a b); inversion F1; auto. + intros HH1 HH2; apply wf_norm. + rewrite BigN.spec_mul; intros HH3. + case (Zmult_integral _ _ HH3). + generalize HH1; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto. + generalize HH2; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto. + Qed. + + Theorem spec_mul_norm x y: wf x -> wf y -> + ([mul_norm x y] == [x] * [y])%Q. + intros x y Hx Hy; rewrite <- spec_mul; auto. + unfold mul_norm, mul; generalize Hx Hy; case x; case y; clear Hx Hy. + intros; apply Qeq_refl. + intros p1 n p2 Hx Hy. + match goal with |- context[BigZ.eq_bool ?X ?Y] => + generalize (BigZ.spec_eq_bool X Y); case BigZ.eq_bool + end; unfold zero, to_Q; repeat rewrite BigZ.spec_0; intros H. + rewrite BigZ.spec_mul; rewrite H; red; auto. + assert (F: (0 < BigN.to_Z (BigZ.to_N p2))%Z). + case (Zle_lt_or_eq _ _ (BigN.spec_pos (BigZ.to_N p2))); auto. + intros H1; case H; rewrite spec_to_N; rewrite <- H1; ring. + assert (F1: (0 < BigN.to_Z n)%Z). + generalize Hy; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto. + intros _ HH; case HH. + rewrite BigN.spec_0; generalize (BigN.spec_pos n); auto with zarith. + set (a := BigN.to_Z (BigZ.to_N p2)). + set (b := BigN.to_Z n). + assert (F2: (0 < Zgcd a b )%Z). + case (Zle_lt_or_eq _ _ (Zgcd_is_pos a b)); intros H3; auto. + generalize F; fold a; rewrite (Zgcd_inv_0_l _ _ (sym_equal H3)); auto with zarith. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_1; try rewrite BigN.spec_gcd; + fold a b; intros H1. + intros; apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_1. + rewrite BigN.spec_div; rewrite BigN.spec_gcd; + auto with zarith; fold a b; intros H2. + red; simpl. + repeat rewrite BigZ.spec_mul. + rewrite BigZ.spec_div; simpl; rewrite BigN.spec_gcd; + fold a b; auto with zarith. + rewrite Z2P_correct; auto with zarith. + rewrite spec_to_N; fold a; fold b. + rewrite Zmult_1_r; repeat rewrite <- Zmult_assoc. + rewrite (Zmult_comm (BigZ.to_Z p1)). + repeat rewrite Zmult_assoc. + rewrite Zgcd_div_swap; auto with zarith. + rewrite H2; ring. + repeat rewrite BigZ.spec_mul. + rewrite BigZ.spec_div; simpl; rewrite BigN.spec_gcd; + fold a b; auto with zarith. + rewrite BigN.spec_div; simpl; rewrite BigN.spec_gcd; + fold a b; auto with zarith. + intros H2; red; simpl. + repeat rewrite BigZ.spec_mul. + rewrite Z2P_correct; auto with zarith. + rewrite (spec_to_N p2); fold a b. + rewrite Z2P_correct; auto with zarith. + repeat rewrite <- Zmult_assoc. + rewrite (Zmult_comm (BigZ.to_Z p1)). + repeat rewrite Zmult_assoc. + rewrite Zgcd_div_swap; auto; try ring. + case (Zle_lt_or_eq _ _ + (BigN.spec_pos (n / + BigN.gcd (BigZ.to_N p2) + n))%bigN); + rewrite BigN.spec_div; simpl; rewrite BigN.spec_gcd; + fold a b; auto with zarith. + intros H3. + apply False_ind; generalize F1. + generalize Hy; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; auto with zarith. + intros HH; case HH; fold b. + rewrite (Zdivide_Zdiv_eq (Zgcd a b) b); auto. + rewrite <- H3; ring. + assert (FF:= Zgcd_is_gcd a b); inversion FF; auto. + intros p1 p2 n Hx Hy. + match goal with |- context[BigZ.eq_bool ?X ?Y] => + generalize (BigZ.spec_eq_bool X Y); case BigZ.eq_bool + end; unfold zero, to_Q; repeat rewrite BigZ.spec_0; intros H. + rewrite BigZ.spec_mul; rewrite H; red; simpl; ring. + set (a := BigN.to_Z (BigZ.to_N p1)). + set (b := BigN.to_Z n). + assert (F: (0 < a)%Z). + case (Zle_lt_or_eq _ _ (BigN.spec_pos (BigZ.to_N p1))); auto. + intros H1; case H; rewrite spec_to_N; rewrite <- H1; ring. + assert (F1: (0 < b)%Z). + generalize Hx; unfold wf. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; auto with zarith. + generalize (BigN.spec_pos n); fold b; auto with zarith. + assert (F2: (0 < Zgcd a b)%Z). + case (Zle_lt_or_eq _ _ (Zgcd_is_pos a b)); intros H3; auto. + generalize F; rewrite (Zgcd_inv_0_l _ _ (sym_equal H3)); auto with zarith. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_1; rewrite BigN.spec_gcd; fold a b; intros H1. + intros; repeat rewrite BigZ.spec_mul; rewrite Zmult_comm; apply Qeq_refl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_1. + rewrite BigN.spec_div; rewrite BigN.spec_gcd; + auto with zarith. + fold a b; intros H2. + red; simpl. + repeat rewrite BigZ.spec_mul. + rewrite BigZ.spec_div; simpl; rewrite BigN.spec_gcd; + fold a b; auto with zarith. + rewrite Z2P_correct; auto with zarith. + rewrite spec_to_N; fold a b. + rewrite Zmult_1_r; repeat rewrite <- Zmult_assoc. + rewrite (Zmult_comm (BigZ.to_Z p2)). + repeat rewrite Zmult_assoc. + rewrite Zgcd_div_swap; auto with zarith. + rewrite H2; ring. + intros H2. + red; simpl. + repeat rewrite BigZ.spec_mul. + rewrite BigZ.spec_div; simpl; rewrite BigN.spec_gcd; + fold a b; auto with zarith. + rewrite Z2P_correct; auto with zarith. + rewrite (spec_to_N p1); fold a b. + case (Zle_lt_or_eq _ _ + (BigN.spec_pos (n / BigN.gcd (BigZ.to_N p1) n))%bigN); intros F3. + rewrite Z2P_correct; auto with zarith. + rewrite BigN.spec_div; simpl; rewrite BigN.spec_gcd; + fold a b; auto with zarith. + repeat rewrite <- Zmult_assoc. + rewrite (Zmult_comm (BigZ.to_Z p2)). + repeat rewrite Zmult_assoc. + rewrite Zgcd_div_swap; auto; try ring. + apply False_ind; generalize F1. + rewrite (Zdivide_Zdiv_eq (Zgcd a b) b); auto. + generalize F3; rewrite BigN.spec_div; rewrite BigN.spec_gcd; fold a b; + auto with zarith. + intros HH; rewrite <- HH; auto with zarith. + assert (FF:= Zgcd_is_gcd a b); inversion FF; auto. + intros p1 n1 p2 n2 Hn1 Hn2. + match goal with |- [norm ?X ?Y] == _ => + apply Qeq_trans with ([Qq X Y]); + [apply spec_norm | idtac] + end; try apply Qeq_refl. + rewrite BigN.spec_mul. + apply Zmult_lt_0_compat. + generalize Hn1; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; auto with zarith. + generalize (BigN.spec_pos n1) (BigN.spec_pos n2); auto with zarith. + generalize Hn2; simpl. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; auto with zarith. + generalize (BigN.spec_pos n1) (BigN.spec_pos n2); auto with zarith. + Qed. + + Theorem spec_mul_normc x y: wf x -> wf y -> + [[mul_norm x y]] = [[x]] * [[y]]. + intros x y Hx Hy; unfold to_Qc. + apply trans_equal with (!! ([x] * [y])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_mul_norm; auto. + unfold Qcmult, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qmult_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + Definition inv (x: t): t := + match x with + | Qz (BigZ.Pos n) => + if BigN.eq_bool n BigN.zero then zero else Qq BigZ.one n + | Qz (BigZ.Neg n) => + if BigN.eq_bool n BigN.zero then zero else Qq BigZ.minus_one n + | Qq (BigZ.Pos n) d => + if BigN.eq_bool n BigN.zero then zero else Qq (BigZ.Pos d) n + | Qq (BigZ.Neg n) d => + if BigN.eq_bool n BigN.zero then zero else Qq (BigZ.Neg d) n + end. + + + Theorem wf_inv: forall x, wf x -> wf (inv x). + intros [ zx | nx dx]; unfold inv, wf; auto. + case zx; clear zx. + intros nx. + repeat match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; rewrite BigN.spec_mul. + intros nx. + repeat match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0; rewrite BigN.spec_mul. + repeat match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0. + intros _ HH; case HH. + intros H1 _. + case nx; clear nx. + intros nx. + repeat match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; simpl; auto. + intros nx. + repeat match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; simpl; auto. + Qed. + + Theorem spec_inv x: wf x -> + ([inv x] == /[x])%Q. + intros [ [x | x] _ | [nx | nx] dx]; unfold inv. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H. + unfold zero, to_Q; rewrite BigZ.spec_0. + unfold BigZ.to_Z; rewrite H; apply Qeq_refl. + assert (F: (0 < BigN.to_Z x)%Z). + case (Zle_lt_or_eq _ _ (BigN.spec_pos x)); auto with zarith. + unfold to_Q; rewrite BigZ.spec_1. + red; unfold Qinv; simpl. + generalize F; case BigN.to_Z; auto with zarith. + intros p Hp; discriminate Hp. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H. + unfold zero, to_Q; rewrite BigZ.spec_0. + unfold BigZ.to_Z; rewrite H; apply Qeq_refl. + assert (F: (0 < BigN.to_Z x)%Z). + case (Zle_lt_or_eq _ _ (BigN.spec_pos x)); auto with zarith. + red; unfold Qinv; simpl. + generalize F; case BigN.to_Z; simpl; auto with zarith. + intros p Hp; discriminate Hp. + simpl wf. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1. + intros HH; case HH. + intros _. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H. + unfold zero, to_Q; rewrite BigZ.spec_0. + unfold BigZ.to_Z; rewrite H; apply Qeq_refl. + assert (F: (0 < BigN.to_Z nx)%Z). + case (Zle_lt_or_eq _ _ (BigN.spec_pos nx)); auto with zarith. + red; unfold Qinv; simpl. + rewrite Z2P_correct; auto with zarith. + generalize F; case BigN.to_Z; auto with zarith. + intros p Hp; discriminate Hp. + generalize (BigN.spec_pos dx); auto with zarith. + simpl wf. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H1. + intros HH; case HH. + intros _. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; rewrite BigN.spec_0; intros H. + unfold zero, to_Q; rewrite BigZ.spec_0. + unfold BigZ.to_Z; rewrite H; apply Qeq_refl. + assert (F: (0 < BigN.to_Z nx)%Z). + case (Zle_lt_or_eq _ _ (BigN.spec_pos nx)); auto with zarith. + red; unfold Qinv; simpl. + rewrite Z2P_correct; auto with zarith. + generalize F; case BigN.to_Z; auto with zarith. + simpl; intros. + match goal with |- (?X = Zneg ?Y)%Z => + replace (Zneg Y) with (Zopp (Zpos Y)); + try rewrite Z2P_correct; auto with zarith + end. + rewrite Zpos_mult_morphism; + rewrite Z2P_correct; auto with zarith; try ring. + generalize (BigN.spec_pos dx); auto with zarith. + intros p Hp; discriminate Hp. + generalize (BigN.spec_pos dx); auto with zarith. + Qed. + + Theorem spec_invc x: wf x -> + [[inv x]] = /[[x]]. + intros x Hx; unfold to_Qc. + apply trans_equal with (!! (/[x])). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_inv; auto. + unfold Qcinv, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qinv_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + + Definition div x y := mul x (inv y). + + Theorem wf_div x y: wf x -> wf y -> wf (div x y). + intros x y Hx Hy; unfold div; apply wf_mul; auto. + apply wf_inv; auto. + Qed. + + Theorem spec_div x y: wf x -> wf y -> + ([div x y] == [x] / [y])%Q. + intros x y Hx Hy; unfold div; rewrite spec_mul; auto. + unfold Qdiv; apply Qmult_comp. + apply Qeq_refl. + apply spec_inv; auto. + apply wf_inv; auto. + Qed. + + Theorem spec_divc x y: wf x -> wf y -> + [[div x y]] = [[x]] / [[y]]. + intros x y Hx Hy; unfold div; rewrite spec_mulc; auto. + unfold Qcdiv; apply f_equal2 with (f := Qcmult); auto. + apply spec_invc; auto. + apply wf_inv; auto. + Qed. + + Definition div_norm x y := mul_norm x (inv y). + + Theorem wf_div_norm x y: wf x -> wf y -> wf (div_norm x y). + intros x y Hx Hy; unfold div_norm; apply wf_mul_norm; auto. + apply wf_inv; auto. + Qed. + + Theorem spec_div_norm x y: wf x -> wf y -> + ([div_norm x y] == [x] / [y])%Q. + intros x y Hx Hy; unfold div_norm; rewrite spec_mul_norm; auto. + unfold Qdiv; apply Qmult_comp. + apply Qeq_refl. + apply spec_inv; auto. + apply wf_inv; auto. + Qed. + + Theorem spec_div_normc x y: wf x -> wf y -> + [[div_norm x y]] = [[x]] / [[y]]. + intros x y Hx Hy; unfold div_norm; rewrite spec_mul_normc; auto. + unfold Qcdiv; apply f_equal2 with (f := Qcmult); auto. + apply spec_invc; auto. + apply wf_inv; auto. + Qed. + + Definition square (x: t): t := + match x with + | Qz zx => Qz (BigZ.square zx) + | Qq nx dx => Qq (BigZ.square nx) (BigN.square dx) + end. + + Theorem wf_square: forall x, wf x -> wf (square x). + intros [ zx | nx dx]; unfold square, wf; auto. + repeat match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0. + rewrite BigN.spec_square; intros H1 H2; case H2. + case (Zmult_integral _ _ H1); auto. + Qed. + + Theorem spec_square x: wf x -> ([square x] == [x] ^ 2)%Q. + intros [ x | nx dx]; unfold square. + intros _. + red; simpl; rewrite BigZ.spec_square; auto with zarith. + unfold wf. + repeat match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0. + intros _ HH; case HH. + intros H1 _. + red; simpl; rewrite BigZ.spec_square; auto with zarith. + assert (F: (0 < BigN.to_Z dx)%Z). + case (Zle_lt_or_eq _ _ (BigN.spec_pos dx)); auto with zarith. + assert (F1 : (0 < BigN.to_Z (BigN.square dx))%Z). + rewrite BigN.spec_square; apply Zmult_lt_0_compat; + auto with zarith. + rewrite Zpos_mult_morphism. + repeat rewrite Z2P_correct; auto with zarith. + rewrite BigN.spec_square; auto with zarith. + Qed. + + Theorem spec_squarec x: wf x -> [[square x]] = [[x]]^2. + intros x Hx; unfold to_Qc. + apply trans_equal with (!! ([x]^2)). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_square; auto. + simpl Qcpower. + replace (!! [x] * 1) with (!![x]); try ring. + simpl. + unfold Qcmult, Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete. + apply Qmult_comp; apply Qeq_sym; apply Qred_correct. + Qed. + + + Definition power_pos (x: t) p: t := + match x with + | Qz zx => Qz (BigZ.power_pos zx p) + | Qq nx dx => Qq (BigZ.power_pos nx p) (BigN.power_pos dx p) + end. + + Theorem wf_power_pos: forall x p, wf x -> wf (power_pos x p). + intros [ zx | nx dx] p; unfold power_pos, wf; auto. + repeat match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0. + rewrite BigN.spec_power_pos; simpl. + intros H1 H2 _. + case (Zle_lt_or_eq _ _ (BigN.spec_pos dx)); auto with zarith. + intros H3; generalize (Zpower_pos_pos _ p H3); auto with zarith. + Qed. + + Theorem spec_power_pos x p: wf x -> ([power_pos x p] == [x] ^ Zpos p)%Q. + Proof. + intros [x | nx dx] p; unfold power_pos. + intros _; unfold power_pos; red; simpl. + generalize (Qpower_decomp p (BigZ.to_Z x) 1). + unfold Qeq; simpl. + rewrite Zpower_pos_1_l; simpl Z2P. + rewrite Zmult_1_r. + intros H; rewrite H. + rewrite BigZ.spec_power_pos; simpl; ring. + unfold wf. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0. + intros _ HH; case HH. + intros H1 _. + assert (F1: (0 < BigN.to_Z dx)%Z). + generalize (BigN.spec_pos dx); auto with zarith. + assert (F2: (0 < BigN.to_Z dx ^ ' p)%Z). + unfold Zpower; apply Zpower_pos_pos; auto. + unfold power_pos; red; simpl. + rewrite Z2P_correct; rewrite BigN.spec_power_pos; auto. + generalize (Qpower_decomp p (BigZ.to_Z nx) + (Z2P (BigN.to_Z dx))). + unfold Qeq; simpl. + repeat rewrite Z2P_correct; auto. + unfold Qeq; simpl; intros HH. + rewrite HH. + rewrite BigZ.spec_power_pos; simpl; ring. + Qed. + + Theorem spec_power_posc x p: wf x -> + [[power_pos x p]] = [[x]] ^ nat_of_P p. + intros x p Hx; unfold to_Qc. + apply trans_equal with (!! ([x]^Zpos p)). + unfold Q2Qc. + apply Qc_decomp; intros _ _; unfold this. + apply Qred_complete; apply spec_power_pos; auto. + pattern p; apply Pind; clear p. + simpl; ring. + intros p Hrec. + rewrite nat_of_P_succ_morphism; simpl Qcpower. + rewrite <- Hrec. + unfold Qcmult, Q2Qc. + apply Qc_decomp; intros _ _; + unfold this. + apply Qred_complete. + assert (F: [x] ^ ' Psucc p == [x] * [x] ^ ' p). + simpl; generalize Hx; case x; simpl; clear x Hx Hrec. + intros x _; simpl; repeat rewrite Qpower_decomp; simpl. + red; simpl; repeat rewrite Zpower_pos_1_l; simpl Z2P. + rewrite Pplus_one_succ_l. + rewrite Zpower_pos_is_exp. + rewrite Zpower_pos_1_r; auto. + intros nx dx. + match goal with |- context[BigN.eq_bool ?X ?Y] => + generalize (BigN.spec_eq_bool X Y); case BigN.eq_bool + end; auto; rewrite BigN.spec_0. + intros _ HH; case HH. + intros H1 _. + assert (F1: (0 < BigN.to_Z dx)%Z). + generalize (BigN.spec_pos dx); auto with zarith. + simpl; repeat rewrite Qpower_decomp; simpl. + red; simpl; repeat rewrite Zpower_pos_1_l; simpl Z2P. + rewrite Pplus_one_succ_l. + rewrite Zpower_pos_is_exp. + rewrite Zpower_pos_1_r; auto. + repeat rewrite Zpos_mult_morphism. + repeat rewrite Z2P_correct; auto. + 2: apply Zpower_pos_pos; auto. + 2: apply Zpower_pos_pos; auto. + rewrite Zpower_pos_is_exp. + rewrite Zpower_pos_1_r; auto. + rewrite F. + apply Qmult_comp; apply Qeq_sym; apply Qred_correct. + Qed. + +End Qv. + diff --git a/theories/Numbers/Rational/SpecViaQ/QSig.v b/theories/Numbers/Rational/SpecViaQ/QSig.v new file mode 100644 index 00000000..a488c7c6 --- /dev/null +++ b/theories/Numbers/Rational/SpecViaQ/QSig.v @@ -0,0 +1,84 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Q. + Notation "[ x ]" := (to_Q x). + + Definition eq x y := [x] == [y]. + + Parameter of_Q : Q -> t. + Parameter spec_of_Q: forall x, to_Q (of_Q x) == x. + + Parameter zero : t. + Parameter one : t. + Parameter minus_one : t. + + Parameter spec_0: [zero] == 0. + Parameter spec_1: [one] == 1. + Parameter spec_m1: [minus_one] == -(1). + + Parameter compare : t -> t -> comparison. + + Parameter spec_compare: forall x y, compare x y = ([x] ?= [y]). + + Definition lt n m := compare n m = Lt. + Definition le n m := compare n m <> Gt. + Definition min n m := match compare n m with Gt => m | _ => n end. + Definition max n m := match compare n m with Lt => m | _ => n end. + + Parameter add : t -> t -> t. + + Parameter spec_add: forall x y, [add x y] == [x] + [y]. + + Parameter sub : t -> t -> t. + + Parameter spec_sub: forall x y, [sub x y] == [x] - [y]. + + Parameter opp : t -> t. + + Parameter spec_opp: forall x, [opp x] == - [x]. + + Parameter mul : t -> t -> t. + + Parameter spec_mul: forall x y, [mul x y] == [x] * [y]. + + Parameter square : t -> t. + + Parameter spec_square: forall x, [square x] == [x] ^ 2. + + Parameter inv : t -> t. + + Parameter spec_inv : forall x, [inv x] == / [x]. + + Parameter div : t -> t -> t. + + Parameter spec_div: forall x y, [div x y] == [x] / [y]. + + Parameter power_pos : t -> positive -> t. + + Parameter spec_power_pos: forall x n, [power_pos x n] == [x] ^ Zpos n. + +End QType. + +(* TODO: add norm function and variants, add eq_bool, what about Qc ? *) \ No newline at end of file diff --git a/theories/Program/Basics.v b/theories/Program/Basics.v new file mode 100644 index 00000000..a1a78acc --- /dev/null +++ b/theories/Program/Basics.v @@ -0,0 +1,57 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* x. + +(** Function composition. *) + +Definition compose {A B C} (g : B -> C) (f : A -> B) := + fun x : A => g (f x). + +Hint Unfold compose. + +Notation " g ∘ f " := (compose g f) + (at level 40, left associativity) : program_scope. + +Open Local Scope program_scope. + +(** The non-dependent function space between [A] and [B]. *) + +Definition arrow (A B : Type) := A -> B. + +(** Logical implication. *) + +Definition impl (A B : Prop) : Prop := A -> B. + +(** The constant function [const a] always returns [a]. *) + +Definition const {A B} (a : A) := fun _ : B => a. + +(** The [flip] combinator reverses the first two arguments of a function. *) + +Definition flip {A B C} (f : A -> B -> C) x y := f y x. + +(** Application as a combinator. *) + +Definition apply {A B} (f : A -> B) (x : A) := f x. + +(** Curryfication of [prod] is defined in [Logic.Datatypes]. *) + +Implicit Arguments prod_curry [[A] [B] [C]]. +Implicit Arguments prod_uncurry [[A] [B] [C]]. diff --git a/theories/Program/Combinators.v b/theories/Program/Combinators.v new file mode 100644 index 00000000..e267fbbe --- /dev/null +++ b/theories/Program/Combinators.v @@ -0,0 +1,71 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* B), id ∘ f = f. +Proof. + intros. + unfold id, compose. + symmetry. apply eta_expansion. +Qed. + +Lemma compose_id_right : forall A B (f : A -> B), f ∘ id = f. +Proof. + intros. + unfold id, compose. + symmetry ; apply eta_expansion. +Qed. + +Lemma compose_assoc : forall A B C D (f : A -> B) (g : B -> C) (h : C -> D), + h ∘ g ∘ f = h ∘ (g ∘ f). +Proof. + intros. + reflexivity. +Qed. + +Hint Rewrite @compose_id_left @compose_id_right @compose_assoc : core. + +(** [flip] is involutive. *) + +Lemma flip_flip : forall A B C, @flip A B C ∘ flip = id. +Proof. + unfold flip, compose. + intros. + extensionality x ; extensionality y ; extensionality z. + reflexivity. +Qed. + +(** [prod_curry] and [prod_uncurry] are each others inverses. *) + +Lemma prod_uncurry_curry : forall A B C, @prod_uncurry A B C ∘ prod_curry = id. +Proof. + simpl ; intros. + unfold prod_uncurry, prod_curry, compose. + extensionality x ; extensionality y ; extensionality z. + reflexivity. +Qed. + +Lemma prod_curry_uncurry : forall A B C, @prod_curry A B C ∘ prod_uncurry = id. +Proof. + simpl ; intros. + unfold prod_uncurry, prod_curry, compose. + extensionality x ; extensionality p. + destruct p ; simpl ; reflexivity. +Qed. diff --git a/theories/Program/Equality.v b/theories/Program/Equality.v new file mode 100644 index 00000000..d19f29c3 --- /dev/null +++ b/theories/Program/Equality.v @@ -0,0 +1,264 @@ +(* -*- coq-prog-args: ("-emacs-U") -*- *) +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* tac H + end. + +(** Try to apply [JMeq_eq] to get back a regular equality when the two types are equal. *) + +Ltac simpl_one_JMeq := + on_JMeq ltac:(fun H => replace_hyp H (JMeq_eq H)). + +(** Repeat it for every possible hypothesis. *) + +Ltac simpl_JMeq := repeat simpl_one_JMeq. + +(** Just simplify an h.eq. without clearing it. *) + +Ltac simpl_one_dep_JMeq := + on_JMeq + ltac:(fun H => let H' := fresh "H" in + assert (H' := JMeq_eq H)). + +Require Import Eqdep. + +(** Simplify dependent equality using sigmas to equality of the second projections if possible. + Uses UIP. *) + +Ltac simpl_existT := + match goal with + [ H : existT _ ?x _ = existT _ ?x _ |- _ ] => + let Hi := fresh H in assert(Hi:=inj_pairT2 _ _ _ _ _ H) ; clear H + end. + +Ltac simpl_existTs := repeat simpl_existT. + +(** Tries to eliminate a call to [eq_rect] (the substitution principle) by any means available. *) + +Ltac elim_eq_rect := + match goal with + | [ |- ?t ] => + match t with + | context [ @eq_rect _ _ _ _ _ ?p ] => + let P := fresh "P" in + set (P := p); simpl in P ; + ((case P ; clear P) || (clearbody P; rewrite (UIP_refl _ _ P); clear P)) + | context [ @eq_rect _ _ _ _ _ ?p _ ] => + let P := fresh "P" in + set (P := p); simpl in P ; + ((case P ; clear P) || (clearbody P; rewrite (UIP_refl _ _ P); clear P)) + end + end. + +(** Rewrite using uniqueness of indentity proofs [H = refl_equal X]. *) + +Ltac simpl_uip := + match goal with + [ H : ?X = ?X |- _ ] => rewrite (UIP_refl _ _ H) in *; clear H + end. + +(** Simplify equalities appearing in the context and goal. *) + +Ltac simpl_eq := simpl ; repeat (elim_eq_rect ; simpl) ; repeat (simpl_uip ; simpl). + +(** Try to abstract a proof of equality, if no proof of the same equality is present in the context. *) + +Ltac abstract_eq_hyp H' p := + let ty := type of p in + let tyred := eval simpl in ty in + match tyred with + ?X = ?Y => + match goal with + | [ H : X = Y |- _ ] => fail 1 + | _ => set (H':=p) ; try (change p with H') ; clearbody H' ; simpl in H' + end + end. + +(** Apply the tactic tac to proofs of equality appearing as coercion arguments. + Just redefine this tactic (using [Ltac on_coerce_proof tac ::=]) to handle custom coercion operators. + *) + +Ltac on_coerce_proof tac T := + match T with + | context [ eq_rect _ _ _ _ ?p ] => tac p + end. + +Ltac on_coerce_proof_gl tac := + match goal with + [ |- ?T ] => on_coerce_proof tac T + end. + +(** Abstract proofs of equalities of coercions. *) + +Ltac abstract_eq_proof := on_coerce_proof_gl ltac:(fun p => let H := fresh "eqH" in abstract_eq_hyp H p). + +Ltac abstract_eq_proofs := repeat abstract_eq_proof. + +(** Factorize proofs, by using proof irrelevance so that two proofs of the same equality + in the goal become convertible. *) + +Ltac pi_eq_proof_hyp p := + let ty := type of p in + let tyred := eval simpl in ty in + match tyred with + ?X = ?Y => + match goal with + | [ H : X = Y |- _ ] => + match p with + | H => fail 2 + | _ => rewrite (proof_irrelevance (X = Y) p H) + end + | _ => fail " No hypothesis with same type " + end + end. + +(** Factorize proofs of equality appearing as coercion arguments. *) + +Ltac pi_eq_proof := on_coerce_proof_gl pi_eq_proof_hyp. + +Ltac pi_eq_proofs := repeat pi_eq_proof. + +(** The two preceding tactics in sequence. *) + +Ltac clear_eq_proofs := + abstract_eq_proofs ; pi_eq_proofs. + +Hint Rewrite <- eq_rect_eq : refl_id. + +(** The refl_id database should be populated with lemmas of the form + [coerce_* t (refl_equal _) = t]. *) + +Ltac rewrite_refl_id := autorewrite with refl_id. + +(** Clear the context and goal of equality proofs. *) + +Ltac clear_eq_ctx := + rewrite_refl_id ; clear_eq_proofs. + +(** Reapeated elimination of [eq_rect] applications. + Abstracting equalities makes it run much faster than an naive implementation. *) + +Ltac simpl_eqs := + repeat (elim_eq_rect ; simpl ; clear_eq_ctx). + +(** Clear unused reflexivity proofs. *) + +Ltac clear_refl_eq := + match goal with [ H : ?X = ?X |- _ ] => clear H end. +Ltac clear_refl_eqs := repeat clear_refl_eq. + +(** Clear unused equality proofs. *) + +Ltac clear_eq := + match goal with [ H : _ = _ |- _ ] => clear H end. +Ltac clear_eqs := repeat clear_eq. + +(** Combine all the tactics to simplify goals containing coercions. *) + +Ltac simplify_eqs := + simpl ; simpl_eqs ; clear_eq_ctx ; clear_refl_eqs ; + try subst ; simpl ; repeat simpl_uip ; rewrite_refl_id. + +(** A tactic that tries to remove trivial equality guards in induction hypotheses coming + from [dependent induction]/[generalize_eqs] invocations. *) + + +Ltac simpl_IH_eq H := + match type of H with + | @JMeq _ ?x _ _ -> _ => + refine_hyp (H (JMeq_refl x)) + | _ -> @JMeq _ ?x _ _ -> _ => + refine_hyp (H _ (JMeq_refl x)) + | _ -> _ -> @JMeq _ ?x _ _ -> _ => + refine_hyp (H _ _ (JMeq_refl x)) + | _ -> _ -> _ -> @JMeq _ ?x _ _ -> _ => + refine_hyp (H _ _ _ (JMeq_refl x)) + | _ -> _ -> _ -> _ -> @JMeq _ ?x _ _ -> _ => + refine_hyp (H _ _ _ _ (JMeq_refl x)) + | _ -> _ -> _ -> _ -> _ -> @JMeq _ ?x _ _ -> _ => + refine_hyp (H _ _ _ _ _ (JMeq_refl x)) + | ?x = _ -> _ => + refine_hyp (H (refl_equal x)) + | _ -> ?x = _ -> _ => + refine_hyp (H _ (refl_equal x)) + | _ -> _ -> ?x = _ -> _ => + refine_hyp (H _ _ (refl_equal x)) + | _ -> _ -> _ -> ?x = _ -> _ => + refine_hyp (H _ _ _ (refl_equal x)) + | _ -> _ -> _ -> _ -> ?x = _ -> _ => + refine_hyp (H _ _ _ _ (refl_equal x)) + | _ -> _ -> _ -> _ -> _ -> ?x = _ -> _ => + refine_hyp (H _ _ _ _ _ (refl_equal x)) + end. + +Ltac simpl_IH_eqs H := repeat simpl_IH_eq H. + +Ltac do_simpl_IHs_eqs := + match goal with + | [ H : context [ @JMeq _ _ _ _ -> _ ] |- _ ] => progress (simpl_IH_eqs H) + | [ H : context [ _ = _ -> _ ] |- _ ] => progress (simpl_IH_eqs H) + end. + +Ltac simpl_IHs_eqs := repeat do_simpl_IHs_eqs. + +Ltac simpl_depind := subst* ; autoinjections ; try discriminates ; + simpl_JMeq ; simpl_existTs ; simpl_IHs_eqs. + +(** The following tactics allow to do induction on an already instantiated inductive predicate + by first generalizing it and adding the proper equalities to the context, in a maner similar to + the BasicElim tactic of "Elimination with a motive" by Conor McBride. *) + +(** The [do_depind] higher-order tactic takes an induction tactic as argument and an hypothesis + and starts a dependent induction using this tactic. *) + +Ltac do_depind tac H := + generalize_eqs H ; tac H ; repeat progress simpl_depind. + +(** Calls [destruct] on the generalized hypothesis, results should be similar to inversion. *) + +Tactic Notation "dependent" "destruction" ident(H) := + do_depind ltac:(fun H => destruct H ; intros) H ; subst*. + +Tactic Notation "dependent" "destruction" ident(H) "using" constr(c) := + do_depind ltac:(fun H => destruct H using c ; intros) H. + +(** Then we have wrappers for usual calls to induction. One can customize the induction tactic by + writting another wrapper calling do_depind. *) + +Tactic Notation "dependent" "induction" ident(H) := + do_depind ltac:(fun H => induction H ; intros) H. + +Tactic Notation "dependent" "induction" ident(H) "using" constr(c) := + do_depind ltac:(fun H => induction H using c ; intros) H. + +(** This tactic also generalizes the goal by the given variables before the induction. *) + +Tactic Notation "dependent" "induction" ident(H) "generalizing" ne_hyp_list(l) := + do_depind ltac:(fun H => generalize l ; clear l ; induction H ; intros) H. + +Tactic Notation "dependent" "induction" ident(H) "generalizing" ne_hyp_list(l) "using" constr(c) := + do_depind ltac:(fun H => generalize l ; clear l ; induction H using c ; intros) H. + diff --git a/theories/Program/FunctionalExtensionality.v b/theories/Program/FunctionalExtensionality.v new file mode 100644 index 00000000..b5ad5b4d --- /dev/null +++ b/theories/Program/FunctionalExtensionality.v @@ -0,0 +1,109 @@ +(* -*- coq-prog-args: ("-emacs-U" "-nois") -*- *) +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* B), + f = g -> forall x, f x = g x. +Proof. + intros. + rewrite H. + auto. +Qed. + +(** Statements of functional equality for simple and dependent functions. *) + +Axiom fun_extensionality_dep : forall A, forall B : (A -> Type), + forall (f g : forall x : A, B x), + (forall x, f x = g x) -> f = g. + +Lemma fun_extensionality : forall A B (f g : A -> B), + (forall x, f x = g x) -> f = g. +Proof. + intros ; apply fun_extensionality_dep. + assumption. +Qed. + +Hint Resolve fun_extensionality fun_extensionality_dep : program. + +(** Apply [fun_extensionality], introducing variable x. *) + +Tactic Notation "extensionality" ident(x) := + match goal with + [ |- ?X = ?Y ] => apply (@fun_extensionality _ _ X Y) || apply (@fun_extensionality_dep _ _ X Y) ; intro x + end. + +(** Eta expansion follows from extensionality. *) + +Lemma eta_expansion_dep : forall A (B : A -> Type) (f : forall x : A, B x), + f = fun x => f x. +Proof. + intros. + extensionality x. + reflexivity. +Qed. + +Lemma eta_expansion : forall A B (f : A -> B), + f = fun x => f x. +Proof. + intros ; apply eta_expansion_dep. +Qed. + +(** The two following lemmas allow to unfold a well-founded fixpoint definition without + restriction using the functional extensionality axiom. *) + +(** For a function defined with Program using a well-founded order. *) + +Program Lemma fix_sub_eq_ext : + forall (A : Set) (R : A -> A -> Prop) (Rwf : well_founded R) + (P : A -> Set) + (F_sub : forall x : A, (forall (y : A | R y x), P y) -> P x), + forall x : A, + Fix_sub A R Rwf P F_sub x = + F_sub x (fun (y : A | R y x) => Fix A R Rwf P F_sub y). +Proof. + intros ; apply Fix_eq ; auto. + intros. + assert(f = g). + extensionality y ; apply H. + rewrite H0 ; auto. +Qed. + +(** For a function defined with Program using a measure. *) + +Program Lemma fix_sub_measure_eq_ext : + forall (A : Type) (f : A -> nat) (P : A -> Type) + (F_sub : forall x : A, (forall (y : A | f y < f x), P y) -> P x), + forall x : A, + Fix_measure_sub A f P F_sub x = + F_sub x (fun (y : A | f y < f x) => Fix_measure_sub A f P F_sub y). +Proof. + intros ; apply Fix_measure_eq ; auto. + intros. + assert(f0 = g). + extensionality y ; apply H. + rewrite H0 ; auto. +Qed. + + diff --git a/theories/Program/Program.v b/theories/Program/Program.v new file mode 100644 index 00000000..b6c3031e --- /dev/null +++ b/theories/Program/Program.v @@ -0,0 +1,7 @@ +Require Export Coq.Program.Utils. +Require Export Coq.Program.Wf. +Require Export Coq.Program.Equality. +Require Export Coq.Program.Subset. +Require Export Coq.Program.Basics. +Require Export Coq.Program.Combinators. +Require Export Coq.Program.Syntax. \ No newline at end of file diff --git a/theories/Program/Subset.v b/theories/Program/Subset.v new file mode 100644 index 00000000..d021326a --- /dev/null +++ b/theories/Program/Subset.v @@ -0,0 +1,116 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* try on_subset_proof_aux tac P ; tac p + end. + +Ltac on_subset_proof tac := + match goal with + [ |- ?T ] => on_subset_proof_aux tac T + end. + +Ltac abstract_any_hyp H' p := + match type of p with + ?X => + match goal with + | [ H : X |- _ ] => fail 1 + | _ => set (H':=p) ; try (change p with H') ; clearbody H' + end + end. + +Ltac abstract_subset_proof := + on_subset_proof ltac:(fun p => let H := fresh "eqH" in abstract_any_hyp H p ; simpl in H). + +Ltac abstract_subset_proofs := repeat abstract_subset_proof. + +Ltac pi_subset_proof_hyp p := + match type of p with + ?X => + match goal with + | [ H : X |- _ ] => + match p with + | H => fail 2 + | _ => rewrite (proof_irrelevance X p H) + end + | _ => fail " No hypothesis with same type " + end + end. + +Ltac pi_subset_proof := on_subset_proof pi_subset_proof_hyp. + +Ltac pi_subset_proofs := repeat pi_subset_proof. + +(** The two preceding tactics in sequence. *) + +Ltac clear_subset_proofs := + abstract_subset_proofs ; simpl in * |- ; pi_subset_proofs ; clear_dups. + +Ltac pi := repeat progress f_equal ; apply proof_irrelevance. + +Lemma subset_eq : forall A (P : A -> Prop) (n m : sig P), n = m <-> `n = `m. +Proof. + induction n. + induction m. + simpl. + split ; intros ; subst. + + inversion H. + reflexivity. + + pi. +Qed. + +(* Somewhat trivial definition, but not unfolded automatically hence we can match on [match_eq ?A ?B ?x ?f] + in tactics. *) + +Definition match_eq (A B : Type) (x : A) (fn : forall (y : A | y = x), B) : B := + fn (exist _ x (refl_equal x)). + +(* This is what we want to be able to do: replace the originaly matched object by a new, + propositionally equal one. If [fn] works on [x] it should work on any [y | y = x]. *) + +Lemma match_eq_rewrite : forall (A B : Type) (x : A) (fn : forall (y : A | y = x), B) + (y : A | y = x), + match_eq A B x fn = fn y. +Proof. + intros. + unfold match_eq. + f_equal. + destruct y. + (* uses proof-irrelevance *) + apply <- subset_eq. + symmetry. assumption. +Qed. + +(** Now we make a tactic to be able to rewrite a term [t] which is applied to a [match_eq] using an arbitrary + equality [t = u], and [u] is now the subject of the [match]. *) + +Ltac rewrite_match_eq H := + match goal with + [ |- ?T ] => + match T with + context [ match_eq ?A ?B ?t ?f ] => + rewrite (match_eq_rewrite A B t f (exist _ _ (sym_eq H))) + end + end. + +(** Otherwise we can simply unfold [match_eq] and the term trivially reduces to the original definition. *) + +Ltac simpl_match_eq := unfold match_eq ; simpl. diff --git a/theories/Program/Syntax.v b/theories/Program/Syntax.v new file mode 100644 index 00000000..6cd75257 --- /dev/null +++ b/theories/Program/Syntax.v @@ -0,0 +1,59 @@ +(* -*- coq-prog-args: ("-emacs-U") -*- *) +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* (ex (fun y => p)))) + (at level 200, x ident, y ident, right associativity) : type_scope. + +Notation " 'exists' x y z , p" := (ex (fun x => (ex (fun y => (ex (fun z => p)))))) + (at level 200, x ident, y ident, z ident, right associativity) : type_scope. + +Notation " 'exists' x y z w , p" := (ex (fun x => (ex (fun y => (ex (fun z => (ex (fun w => p)))))))) + (at level 200, x ident, y ident, z ident, w ident, right associativity) : type_scope. + +Tactic Notation "exist" constr(x) := exists x. +Tactic Notation "exist" constr(x) constr(y) := exists x ; exists y. +Tactic Notation "exist" constr(x) constr(y) constr(z) := exists x ; exists y ; exists z. +Tactic Notation "exist" constr(x) constr(y) constr(z) constr(w) := exists x ; exists y ; exists z ; exists w. diff --git a/theories/Program/Tactics.v b/theories/Program/Tactics.v new file mode 100644 index 00000000..41b170c9 --- /dev/null +++ b/theories/Program/Tactics.v @@ -0,0 +1,234 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* destruct H + | [H : prod _ _ |- _] => destruct H + end. + +(** Repeateadly destruct pairs. *) + +Ltac destruct_pairs := repeat (destruct_one_pair). + +(** Destruct one existential package, keeping the name of the hypothesis for the first component. *) + +Ltac destruct_one_ex := + let tac H := let ph := fresh "H" in (destruct H as [H ph]) in + let tacT H := let ph := fresh "X" in (destruct H as [H ph]) in + match goal with + | [H : (ex _) |- _] => tac H + | [H : (sig ?P) |- _ ] => tac H + | [H : (sigT ?P) |- _ ] => tacT H + | [H : (ex2 _) |- _] => tac H + end. + +(** Repeateadly destruct existentials. *) + +Ltac destruct_exists := repeat (destruct_one_ex). + +(** Repeateadly destruct conjunctions and existentials. *) + +Ltac destruct_conjs := repeat (destruct_one_pair || destruct_one_ex). + +(** Destruct an existential hypothesis [t] keeping its name for the first component + and using [Ht] for the second *) + +Tactic Notation "destruct" "exist" ident(t) ident(Ht) := destruct t as [t Ht]. + +(** Destruct a disjunction keeping its name in both subgoals. *) + +Tactic Notation "destruct" "or" ident(H) := destruct H as [H|H]. + +(** Discriminate that also work on a [x <> x] hypothesis. *) + +Ltac discriminates := + match goal with + | [ H : ?x <> ?x |- _ ] => elim H ; reflexivity + | _ => discriminate + end. + +(** Revert the last hypothesis. *) + +Ltac revert_last := + match goal with + [ H : _ |- _ ] => revert H + end. + +(** Reapeateadly reverse the last hypothesis, putting everything in the goal. *) + +Ltac reverse := repeat revert_last. + +(** Clear duplicated hypotheses *) + +Ltac clear_dup := + match goal with + | [ H : ?X |- _ ] => + match goal with + | [ H' : X |- _ ] => + match H' with + | H => fail 2 + | _ => clear H' || clear H + end + end + end. + +Ltac clear_dups := repeat clear_dup. + +(** A non-failing subst that substitutes as much as possible. *) + +Ltac subst_no_fail := + repeat (match goal with + [ H : ?X = ?Y |- _ ] => subst X || subst Y + end). + +Tactic Notation "subst" "*" := subst_no_fail. + +Ltac on_application f tac T := + match T with + | context [f ?x ?y ?z ?w ?v ?u ?a ?b ?c] => tac (f x y z w v u a b c) + | context [f ?x ?y ?z ?w ?v ?u ?a ?b] => tac (f x y z w v u a b) + | context [f ?x ?y ?z ?w ?v ?u ?a] => tac (f x y z w v u a) + | context [f ?x ?y ?z ?w ?v ?u] => tac (f x y z w v u) + | context [f ?x ?y ?z ?w ?v] => tac (f x y z w v) + | context [f ?x ?y ?z ?w] => tac (f x y z w) + | context [f ?x ?y ?z] => tac (f x y z) + | context [f ?x ?y] => tac (f x y) + | context [f ?x] => tac (f x) + end. + +(** Tactical [on_call f tac] applies [tac] on any application of [f] in the hypothesis or goal. *) + +Ltac on_call f tac := + match goal with + | |- ?T => on_application f tac T + | H : ?T |- _ => on_application f tac T + end. + +(* Destructs calls to f in hypothesis or conclusion, useful if f creates a subset object. *) + +Ltac destruct_call f := + let tac t := (destruct t) in on_call f tac. + +Ltac destruct_calls f := repeat destruct_call f. + +Ltac destruct_call_in f H := + let tac t := (destruct t) in + let T := type of H in + on_application f tac T. + +Ltac destruct_call_as f l := + let tac t := (destruct t as l) in on_call f tac. + +Ltac destruct_call_as_in f l H := + let tac t := (destruct t as l) in + let T := type of H in + on_application f tac T. + +Tactic Notation "destruct_call" constr(f) := destruct_call f. + +(** Permit to name the results of destructing the call to [f]. *) + +Tactic Notation "destruct_call" constr(f) "as" simple_intropattern(l) := + destruct_call_as f l. + +(** Specify the hypothesis in which the call occurs as well. *) + +Tactic Notation "destruct_call" constr(f) "in" hyp(id) := + destruct_call_in f id. + +Tactic Notation "destruct_call" constr(f) "as" simple_intropattern(l) "in" hyp(id) := + destruct_call_as_in f l id. + +(** Try to inject any potential constructor equality hypothesis. *) + +Ltac autoinjection := + let tac H := progress (inversion H ; subst ; clear_dups) ; clear H in + match goal with + | [ H : ?f ?a = ?f' ?a' |- _ ] => tac H + | [ H : ?f ?a ?b = ?f' ?a' ?b' |- _ ] => tac H + | [ H : ?f ?a ?b ?c = ?f' ?a' ?b' ?c' |- _ ] => tac H + | [ H : ?f ?a ?b ?c ?d= ?f' ?a' ?b' ?c' ?d' |- _ ] => tac H + | [ H : ?f ?a ?b ?c ?d ?e= ?f' ?a' ?b' ?c' ?d' ?e' |- _ ] => tac H + | [ H : ?f ?a ?b ?c ?d ?e ?g= ?f' ?a' ?b' ?c' ?d' ?e' ?g' |- _ ] => tac H + | [ H : ?f ?a ?b ?c ?d ?e ?g ?h= ?f' ?a' ?b' ?c' ?d' ?e'?g' ?h' |- _ ] => tac H + | [ H : ?f ?a ?b ?c ?d ?e ?g ?h ?i = ?f' ?a' ?b' ?c' ?d' ?e'?g' ?h' ?i' |- _ ] => tac H + | [ H : ?f ?a ?b ?c ?d ?e ?g ?h ?i ?j = ?f' ?a' ?b' ?c' ?d' ?e'?g' ?h' ?i' ?j' |- _ ] => tac H + end. + +Ltac autoinjections := repeat autoinjection. + +(** Destruct an hypothesis by first copying it to avoid dependencies. *) + +Ltac destruct_nondep H := let H0 := fresh "H" in assert(H0 := H); destruct H0. + +(** If bang appears in the goal, it means that we have a proof of False and the goal is solved. *) + +Ltac bang := + match goal with + | |- ?x => + match x with + | context [False_rect _ ?p] => elim p + end + end. + +(** A tactic to show contradiction by first asserting an automatically provable hypothesis. *) +Tactic Notation "contradiction" "by" constr(t) := + let H := fresh in assert t as H by auto with * ; contradiction. + +(** A tactic that adds [H:=p:typeof(p)] to the context if no hypothesis of the same type appears in the goal. + Useful to do saturation using tactics. *) + +Ltac add_hypothesis H' p := + match type of p with + ?X => + match goal with + | [ H : X |- _ ] => fail 1 + | _ => set (H':=p) ; try (change p with H') ; clearbody H' + end + end. + +(** A tactic to replace an hypothesis by another term. *) + +Ltac replace_hyp H c := + let H' := fresh "H" in + assert(H' := c) ; clear H ; rename H' into H. + +(** A tactic to refine an hypothesis by supplying some of its arguments. *) + +Ltac refine_hyp c := + let tac H := replace_hyp H c in + match c with + | ?H _ => tac H + | ?H _ _ => tac H + | ?H _ _ _ => tac H + | ?H _ _ _ _ => tac H + | ?H _ _ _ _ _ => tac H + | ?H _ _ _ _ _ _ => tac H + | ?H _ _ _ _ _ _ _ => tac H + | ?H _ _ _ _ _ _ _ _ => tac H + end. + +(** The default simplification tactic used by Program is defined by [program_simpl], sometimes [auto] + is not enough, better rebind using [Obligations Tactic := tac] in this case, + possibly using [program_simplify] to use standard goal-cleaning tactics. *) + +Ltac program_simplify := + simpl ; intros ; destruct_conjs ; simpl proj1_sig in * ; subst* ; autoinjections ; try discriminates ; + try (solve [ red ; intros ; destruct_conjs ; autoinjections ; discriminates ]). + +Ltac program_simpl := program_simplify ; auto. + +Ltac obligations_tactic := program_simpl. diff --git a/theories/Program/Utils.v b/theories/Program/Utils.v new file mode 100644 index 00000000..21eee0ca --- /dev/null +++ b/theories/Program/Utils.v @@ -0,0 +1,56 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* let (x,y) := anonymous in P)) + (x ident, y ident, at level 10) : type_scope. + +(** Generates an obligation to prove False. *) + +Notation " ! " := (False_rect _ _) : program_scope. + +Delimit Scope program_scope with prg. + +(** Abbreviation for first projection and hiding of proofs of subset objects. *) + +Notation " ` t " := (proj1_sig t) (at level 10, t at next level) : program_scope. + +(** Coerces objects to their support before comparing them. *) + +Notation " x '`=' y " := ((x :>) = (y :>)) (at level 70) : program_scope. + +Require Import Coq.Bool.Sumbool. + +(** Construct a dependent disjunction from a boolean. *) + +Notation dec := sumbool_of_bool. + +(** The notations [in_right] and [in_left] construct objects of a dependent disjunction. *) + +(** Hide proofs and generates obligations when put in a term. *) + +Notation "'in_left'" := (@left _ _ _) : program_scope. +Notation "'in_right'" := (@right _ _ _) : program_scope. + +(** Extraction directives *) +(* +Extraction Inline proj1_sig. +Extract Inductive unit => "unit" [ "()" ]. +Extract Inductive bool => "bool" [ "true" "false" ]. +Extract Inductive sumbool => "bool" [ "true" "false" ]. +(* Extract Inductive prod "'a" "'b" => " 'a * 'b " [ "(,)" ]. *) +(* Extract Inductive sigT => "prod" [ "" ]. *) +*) \ No newline at end of file diff --git a/theories/Program/Wf.v b/theories/Program/Wf.v new file mode 100644 index 00000000..b6ba5d44 --- /dev/null +++ b/theories/Program/Wf.v @@ -0,0 +1,148 @@ +Require Import Coq.Init.Wf. +Require Import Coq.Program.Utils. +Require Import ProofIrrelevance. + +Open Local Scope program_scope. + +Implicit Arguments Acc_inv [A R x y]. + +(** Reformulation of the Wellfounded module using subsets where possible. *) + +Section Well_founded. + Variable A : Type. + Variable R : A -> A -> Prop. + Hypothesis Rwf : well_founded R. + + Section Acc. + + Variable P : A -> Type. + + Variable F_sub : forall x:A, (forall y: { y : A | R y x }, P (proj1_sig y)) -> P x. + + Fixpoint Fix_F_sub (x : A) (r : Acc R x) {struct r} : P x := + F_sub x (fun y: { y : A | R y x} => Fix_F_sub (proj1_sig y) + (Acc_inv r (proj2_sig y))). + + Definition Fix_sub (x : A) := Fix_F_sub x (Rwf x). + End Acc. + + Section FixPoint. + Variable P : A -> Type. + + Variable F_sub : forall x:A, (forall y: { y : A | R y x }, P (proj1_sig y)) -> P x. + + Notation Fix_F := (Fix_F_sub P F_sub) (only parsing). (* alias *) + + Definition Fix (x:A) := Fix_F_sub P F_sub x (Rwf x). + + Hypothesis + F_ext : + forall (x:A) (f g:forall y:{y:A | R y x}, P (`y)), + (forall (y : A | R y x), f y = g y) -> F_sub x f = F_sub x g. + + Lemma Fix_F_eq : + forall (x:A) (r:Acc R x), + F_sub x (fun (y:A|R y x) => Fix_F (`y) (Acc_inv r (proj2_sig y))) = Fix_F x r. + Proof. + destruct r using Acc_inv_dep; auto. + Qed. + + Lemma Fix_F_inv : forall (x:A) (r s:Acc R x), Fix_F x r = Fix_F x s. + Proof. + intro x; induction (Rwf x); intros. + rewrite (proof_irrelevance (Acc R x) r s) ; auto. + Qed. + + Lemma Fix_eq : forall x:A, Fix x = F_sub x (fun (y:A|R y x) => Fix (proj1_sig y)). + Proof. + intro x; unfold Fix in |- *. + rewrite <- (Fix_F_eq ). + apply F_ext; intros. + apply Fix_F_inv. + Qed. + + Lemma fix_sub_eq : + forall x : A, + Fix_sub P F_sub x = + let f_sub := F_sub in + f_sub x (fun (y : A | R y x) => Fix (`y)). + exact Fix_eq. + Qed. + + End FixPoint. + +End Well_founded. + +Extraction Inline Fix_F_sub Fix_sub. + +Require Import Wf_nat. +Require Import Lt. + +Section Well_founded_measure. + Variable A : Type. + Variable m : A -> nat. + + Section Acc. + + Variable P : A -> Type. + + Variable F_sub : forall x:A, (forall y: { y : A | m y < m x }, P (proj1_sig y)) -> P x. + + Program Fixpoint Fix_measure_F_sub (x : A) (r : Acc lt (m x)) {struct r} : P x := + F_sub x (fun (y : A | m y < m x) => Fix_measure_F_sub y + (@Acc_inv _ _ _ r (m y) (proj2_sig y))). + + Definition Fix_measure_sub (x : A) := Fix_measure_F_sub x (lt_wf (m x)). + + End Acc. + + Section FixPoint. + Variable P : A -> Type. + + Program Variable F_sub : forall x:A, (forall (y : A | m y < m x), P y) -> P x. + + Notation Fix_F := (Fix_measure_F_sub P F_sub) (only parsing). (* alias *) + + Definition Fix_measure (x:A) := Fix_measure_F_sub P F_sub x (lt_wf (m x)). + + Hypothesis + F_ext : + forall (x:A) (f g:forall y : { y : A | m y < m x}, P (`y)), + (forall y : { y : A | m y < m x}, f y = g y) -> F_sub x f = F_sub x g. + + Program Lemma Fix_measure_F_eq : + forall (x:A) (r:Acc lt (m x)), + F_sub x (fun (y:A | m y < m x) => Fix_F y (Acc_inv r (proj2_sig y))) = Fix_F x r. + Proof. + intros x. + set (y := m x). + unfold Fix_measure_F_sub. + intros r ; case r ; auto. + Qed. + + Lemma Fix_measure_F_inv : forall (x:A) (r s:Acc lt (m x)), Fix_F x r = Fix_F x s. + Proof. + intros x r s. + rewrite (proof_irrelevance (Acc lt (m x)) r s) ; auto. + Qed. + + Lemma Fix_measure_eq : forall x:A, Fix_measure x = F_sub x (fun (y:{y:A| m y < m x}) => Fix_measure (proj1_sig y)). + Proof. + intro x; unfold Fix_measure in |- *. + rewrite <- (Fix_measure_F_eq ). + apply F_ext; intros. + apply Fix_measure_F_inv. + Qed. + + Lemma fix_measure_sub_eq : forall x : A, + Fix_measure_sub P F_sub x = + let f_sub := F_sub in + f_sub x (fun (y : A | m y < m x) => Fix_measure (`y)). + exact Fix_measure_eq. + Qed. + + End FixPoint. + +End Well_founded_measure. + +Extraction Inline Fix_measure_F_sub Fix_measure_sub. diff --git a/theories/QArith/QArith.v b/theories/QArith/QArith.v index 03935e2b..2af65320 100644 --- a/theories/QArith/QArith.v +++ b/theories/QArith/QArith.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: QArith.v 8883 2006-05-31 21:56:37Z letouzey $ i*) +(*i $Id: QArith.v 10739 2008-04-01 14:45:20Z herbelin $ i*) Require Export QArith_base. Require Export Qring. diff --git a/theories/QArith/QArith_base.v b/theories/QArith/QArith_base.v index fc92c678..304fbf77 100644 --- a/theories/QArith/QArith_base.v +++ b/theories/QArith/QArith_base.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: QArith_base.v 9932 2007-07-02 14:31:33Z notin $ i*) +(*i $Id: QArith_base.v 10765 2008-04-08 16:15:23Z msozeau $ i*) Require Export ZArith. Require Export ZArithRing. @@ -79,9 +79,9 @@ Qed. Lemma Qge_alt : forall p q, (p>=q) <-> (p?=q <> Lt). Proof. unfold Qle, Qcompare, Zle. -split; intros; swap H. +split; intros; contradict H. rewrite Zcompare_Gt_Lt_antisym; auto. -rewrite Zcompare_Gt_Lt_antisym in H0; auto. +rewrite Zcompare_Gt_Lt_antisym in H; auto. Qed. Hint Unfold Qeq Qlt Qle: qarith. @@ -121,7 +121,7 @@ Defined. Definition Q_Setoid : Setoid_Theory Q Qeq. Proof. - split; unfold Qeq in |- *; auto; apply Qeq_trans. + split; red; unfold Qeq in |- *; auto; apply Qeq_trans. Qed. Add Setoid Q Qeq Q_Setoid as Qsetoid. @@ -130,6 +130,12 @@ Hint Resolve (Seq_refl Q Qeq Q_Setoid): qarith. Hint Resolve (Seq_sym Q Qeq Q_Setoid): qarith. Hint Resolve (Seq_trans Q Qeq Q_Setoid): qarith. +Theorem Qnot_eq_sym : forall x y, ~x == y -> ~y == x. +Proof. + auto with qarith. +Qed. + +Hint Resolve Qnot_eq_sym : qarith. (** * Addition, multiplication and opposite *) @@ -165,6 +171,13 @@ Infix "/" := Qdiv : Q_scope. Notation " ' x " := (Zpos x) (at level 20, no associativity) : Z_scope. +Lemma Qmake_Qdiv : forall a b, a#b==inject_Z a/inject_Z ('b). +Proof. +intros a b. +unfold Qeq. +simpl. +ring. +Qed. (** * Setoid compatibility results *) @@ -187,7 +200,7 @@ Proof. unfold Qeq, Qopp; simpl. Open Scope Z_scope. intros. - replace (- Qnum x1 * ' Qden x2) with (- (Qnum x1 * ' Qden x2)) by ring. + replace (- Qnum x * ' Qden y) with (- (Qnum x * ' Qden y)) by ring. rewrite H in |- *; ring. Close Scope Z_scope. Qed. @@ -416,6 +429,11 @@ Qed. (** * Inverse and division. *) +Lemma Qinv_involutive : forall q, (/ / q) == q. +Proof. +intros [[|n|n] d]; red; simpl; reflexivity. +Qed. + Theorem Qmult_inv_r : forall x, ~ x == 0 -> x*(/x) == 1. Proof. intros (x1, x2); unfold Qeq, Qdiv, Qmult; case x1; simpl; @@ -474,6 +492,8 @@ Proof. Close Scope Z_scope. Qed. +Hint Resolve Qle_trans : qarith. + Lemma Qlt_not_eq : forall x y, x ~ x==y. Proof. unfold Qlt, Qeq; auto with zarith. @@ -552,6 +572,9 @@ Proof. unfold Qle, Qlt, Qeq; intros; apply Zle_lt_or_eq; auto. Qed. +Hint Resolve Qle_not_lt Qlt_not_le Qnot_le_lt Qnot_lt_le + Qlt_le_weak Qlt_not_eq Qle_antisym Qle_refl: qartih. + (** Some decidability results about orders. *) Lemma Q_dec : forall x y, {x 0 <= q+-p. Proof. intros (x1,x2) (y1,y2); unfold Qle; simpl. @@ -641,50 +666,136 @@ Proof. Close Scope Z_scope. Qed. -(** * Rational to the n-th power *) +Lemma Qmult_le_0_compat : forall a b, 0 <= a -> 0 <= b -> 0 <= a*b. +Proof. +intros a b Ha Hb. +unfold Qle in *. +simpl in *. +auto with *. +Qed. -Fixpoint Qpower (q:Q)(n:nat) { struct n } : Q := - match n with - | O => 1 - | S n => q * (Qpower q n) - end. +Lemma Qinv_le_0_compat : forall a, 0 <= a -> 0 <= /a. +Proof. +intros [[|n|n] d] Ha; assumption. +Qed. -Notation " q ^ n " := (Qpower q n) : Q_scope. +Lemma Qle_shift_div_l : forall a b c, + 0 < c -> a*c <= b -> a <= b/c. +Proof. +intros a b c Hc H. +apply Qmult_lt_0_le_reg_r with (c). + assumption. +setoid_replace (b/c*c) with (c*(b/c)) by apply Qmult_comm. +rewrite Qmult_div_r; try assumption. +auto with *. +Qed. -Lemma Qpower_1 : forall n, 1^n == 1. +Lemma Qle_shift_inv_l : forall a c, + 0 < c -> a*c <= 1 -> a <= /c. Proof. - induction n; simpl; auto with qarith. - rewrite IHn; auto with qarith. +intros a c Hc H. +setoid_replace (/c) with (1*/c) by (symmetry; apply Qmult_1_l). +change (a <= 1/c). +apply Qle_shift_div_l; assumption. Qed. -Lemma Qpower_0 : forall n, n<>O -> 0^n == 0. +Lemma Qle_shift_div_r : forall a b c, + 0 < b -> a <= c*b -> a/b <= c. Proof. - destruct n; simpl. - destruct 1; auto. - intros. - compute; auto. +intros a b c Hc H. +apply Qmult_lt_0_le_reg_r with b. + assumption. +setoid_replace (a/b*b) with (b*(a/b)) by apply Qmult_comm. +rewrite Qmult_div_r; try assumption. +auto with *. Qed. -Lemma Qpower_pos : forall p n, 0 <= p -> 0 <= p^n. +Lemma Qle_shift_inv_r : forall b c, + 0 < b -> 1 <= c*b -> /b <= c. Proof. - induction n; simpl; auto with qarith. - intros; compute; intro; discriminate. - intros. - apply Qle_trans with (0*(p^n)). - compute; intro; discriminate. - apply Qmult_le_compat_r; auto. +intros b c Hc H. +setoid_replace (/b) with (1*/b) by (symmetry; apply Qmult_1_l). +change (1/b <= c). +apply Qle_shift_div_r; assumption. Qed. -Lemma Qinv_power_n : forall n p, (1#p)^n == /(inject_Z ('p))^n. +Lemma Qinv_lt_0_compat : forall a, 0 < a -> 0 < /a. Proof. - induction n. - compute; auto. - simpl. - intros; rewrite IHn; clear IHn. - unfold Qdiv; rewrite Qinv_mult_distr. - setoid_replace (1#p) with (/ inject_Z ('p)). - apply Qeq_refl. - compute; auto. +intros [[|n|n] d] Ha; assumption. +Qed. + +Lemma Qlt_shift_div_l : forall a b c, + 0 < c -> a*c < b -> a < b/c. +Proof. +intros a b c Hc H. +apply Qnot_le_lt. +intros H0. +apply (Qlt_not_le _ _ H). +apply Qmult_lt_0_le_reg_r with (/c). + apply Qinv_lt_0_compat. + assumption. +setoid_replace (a*c/c) with (a) by (apply Qdiv_mult_l; auto with *). +assumption. +Qed. + +Lemma Qlt_shift_inv_l : forall a c, + 0 < c -> a*c < 1 -> a < /c. +Proof. +intros a c Hc H. +setoid_replace (/c) with (1*/c) by (symmetry; apply Qmult_1_l). +change (a < 1/c). +apply Qlt_shift_div_l; assumption. +Qed. + +Lemma Qlt_shift_div_r : forall a b c, + 0 < b -> a < c*b -> a/b < c. +Proof. +intros a b c Hc H. +apply Qnot_le_lt. +intros H0. +apply (Qlt_not_le _ _ H). +apply Qmult_lt_0_le_reg_r with (/b). + apply Qinv_lt_0_compat. + assumption. +setoid_replace (c*b/b) with (c) by (apply Qdiv_mult_l; auto with *). +assumption. +Qed. + +Lemma Qlt_shift_inv_r : forall b c, + 0 < b -> 1 < c*b -> /b < c. +Proof. +intros b c Hc H. +setoid_replace (/b) with (1*/b) by (symmetry; apply Qmult_1_l). +change (1/b < c). +apply Qlt_shift_div_r; assumption. Qed. +(** * Rational to the n-th power *) + +Definition Qpower_positive (q:Q)(p:positive) : Q := + pow_pos Qmult q p. +Add Morphism Qpower_positive with signature Qeq ==> @eq _ ==> Qeq as Qpower_positive_comp. +Proof. +intros x1 x2 Hx y. +unfold Qpower_positive. +induction y; simpl; +try rewrite IHy; +try rewrite Hx; +reflexivity. +Qed. + +Definition Qpower (q:Q) (z:Z) := + match z with + | Zpos p => Qpower_positive q p + | Z0 => 1 + | Zneg p => /Qpower_positive q p + end. + +Notation " q ^ z " := (Qpower q z) : Q_scope. + +Add Morphism Qpower with signature Qeq ==> @eq _ ==> Qeq as Qpower_comp. +Proof. +intros x1 x2 Hx [|y|y]; try reflexivity; +simpl; rewrite Hx; reflexivity. +Qed. diff --git a/theories/QArith/Qabs.v b/theories/QArith/Qabs.v new file mode 100644 index 00000000..e672016e --- /dev/null +++ b/theories/QArith/Qabs.v @@ -0,0 +1,124 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Type), (0 <= x -> P x) -> (x <= 0 -> P (- x)) -> P (Qabs x). +Proof. +intros x P H1 H2. +destruct x as [[|xn|xn] xd]; +[apply H1|apply H1|apply H2]; +abstract (compute; discriminate). +Defined. + +Add Morphism Qabs with signature Qeq ==> Qeq as Qabs_wd. +intros [xn xd] [yn yd] H. +simpl. +unfold Qeq in *. +simpl in *. +change (' yd)%Z with (Zabs (' yd)). +change (' xd)%Z with (Zabs (' xd)). +repeat rewrite <- Zabs_Zmult. +congruence. +Qed. + +Lemma Qabs_pos : forall x, 0 <= x -> Qabs x == x. +Proof. +intros x H. +apply Qabs_case. +reflexivity. +intros H0. +setoid_replace x with 0. +reflexivity. +apply Qle_antisym; assumption. +Qed. + +Lemma Qabs_neg : forall x, x <= 0 -> Qabs x == - x. +Proof. +intros x H. +apply Qabs_case. +intros H0. +setoid_replace x with 0. +reflexivity. +apply Qle_antisym; assumption. +reflexivity. +Qed. + +Lemma Qabs_nonneg : forall x, 0 <= (Qabs x). +intros x. +apply Qabs_case. +auto. +apply (Qopp_le_compat x 0). +Qed. + +Lemma Zabs_Qabs : forall n d, (Zabs n#d)==Qabs (n#d). +Proof. +intros [|n|n]; reflexivity. +Qed. + +Lemma Qabs_opp : forall x, Qabs (-x) == Qabs x. +Proof. +intros x. +do 2 apply Qabs_case; try (intros; ring); +(intros H0 H1; +setoid_replace x with 0;[reflexivity|]; +apply Qle_antisym);try assumption; +rewrite Qle_minus_iff in *; +ring_simplify; +ring_simplify in H1; +assumption. +Qed. + +Lemma Qabs_triangle : forall x y, Qabs (x+y) <= Qabs x + Qabs y. +Proof. +intros [xn xd] [yn yd]. +unfold Qplus. +unfold Qle. +simpl. +apply Zmult_le_compat_r;auto with *. +change (' yd)%Z with (Zabs (' yd)). +change (' xd)%Z with (Zabs (' xd)). +repeat rewrite <- Zabs_Zmult. +apply Zabs_triangle. +Qed. + +Lemma Qabs_Qmult : forall a b, Qabs (a*b) == (Qabs a)*(Qabs b). +Proof. +intros [an ad] [bn bd]. +simpl. +rewrite Zabs_Zmult. +reflexivity. +Qed. + +Lemma Qle_Qabs : forall a, a <= Qabs a. +Proof. +intros a. +apply Qabs_case; auto with *. +intros H. +apply Qle_trans with 0; try assumption. +change 0 with (-0). +apply Qopp_le_compat. +assumption. +Qed. + +Lemma Qabs_triangle_reverse : forall x y, Qabs x - Qabs y <= Qabs (x - y). +Proof. +intros x y. +rewrite Qle_minus_iff. +setoid_replace (Qabs (x - y) + - (Qabs x - Qabs y)) with ((Qabs (x - y) + Qabs y) + - Qabs x) by ring. +rewrite <- Qle_minus_iff. +setoid_replace (Qabs x) with (Qabs (x-y+y)). +apply Qabs_triangle. +apply Qabs_wd. +ring. +Qed. diff --git a/theories/QArith/Qcanon.v b/theories/QArith/Qcanon.v index 98c5ff9e..42522468 100644 --- a/theories/QArith/Qcanon.v +++ b/theories/QArith/Qcanon.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Qcanon.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Qcanon.v 10739 2008-04-01 14:45:20Z herbelin $ i*) Require Import Field. Require Import QArith. @@ -101,6 +101,7 @@ Infix "<=" := Qcle : Qc_scope. Infix ">" := Qcgt : Qc_scope. Infix ">=" := Qcge : Qc_scope. Notation "x <= y <= z" := (x<=y/\y<=z) : Qc_scope. +Notation "x < y < z" := (xy}. Proof. intros. destruct (Qeq_dec x y) as [H|H]; auto. - right; swap H; subst; auto with qarith. + right; contradict H; subst; auto with qarith. Defined. (** The addition, multiplication and opposite are defined @@ -347,7 +348,7 @@ Proof. unfold Qcle, Qclt; intros; eapply Qlt_le_trans; eauto. Qed. -Lemma Qlt_trans : forall x y z, x y x y x 0 <= p^n. +Lemma Qcpower_pos : forall p n, 0 <= p -> 0 <= p^n. Proof. induction n; simpl; auto with qarith. intros; compute; intro; discriminate. @@ -495,23 +496,6 @@ Proof. intros _ H; inversion H. Qed. -(* -Definition Qcrt : Ring_Theory Qcplus Qcmult 1 0 Qcopp Qc_eq_bool. -Proof. -constructor. -exact Qcplus_comm. -exact Qcplus_assoc. -exact Qcmult_comm. -exact Qcmult_assoc. -exact Qcplus_0_l. -exact Qcmult_1_l. -exact Qcplus_opp_r. -exact Qcmult_plus_distr_l. -unfold Is_true; intros x y; generalize (Qc_eq_bool_correct x y); - case (Qc_eq_bool x y); auto. -Qed. -Add Ring Qc Qcplus Qcmult 1 0 Qcopp Qc_eq_bool Qcrt [ Qcmake ]. -*) Definition Qcrt : ring_theory 0 1 Qcplus Qcmult Qcminus Qcopp (eq(A:=Qc)). Proof. constructor. @@ -547,4 +531,14 @@ auto. Qed. - +Theorem Qc_decomp: forall x y: Qc, + (Qred x = x -> Qred y = y -> (x:Q) = y)-> x = y. +Proof. + intros (q, Hq) (q', Hq'); simpl; intros H. + assert (H1 := H Hq Hq'). + subst q'. + assert (Hq = Hq'). + apply Eqdep_dec.eq_proofs_unicity; auto; intros. + repeat decide equality. + congruence. +Qed. diff --git a/theories/QArith/Qfield.v b/theories/QArith/Qfield.v new file mode 100644 index 00000000..5d548aea --- /dev/null +++ b/theories/QArith/Qfield.v @@ -0,0 +1,153 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* x==y. +Proof. + intros x y; unfold Qeq_bool in |- *; case (Qeq_dec x y); simpl in |- *; auto. + intros _ H; inversion H. +Qed. + +Lemma Qeq_bool_complete : forall x y : Q, x==y -> Qeq_bool x y = true. +Proof. + intros x y; unfold Qeq_bool in |- *; case (Qeq_dec x y); simpl in |- *; auto. +Qed. + +Definition Qsft : field_theory 0 1 Qplus Qmult Qminus Qopp Qdiv Qinv Qeq. +Proof. + constructor. + constructor. + exact Qplus_0_l. + exact Qplus_comm. + exact Qplus_assoc. + exact Qmult_1_l. + exact Qmult_comm. + exact Qmult_assoc. + exact Qmult_plus_distr_l. + reflexivity. + exact Qplus_opp_r. + discriminate. + reflexivity. + intros p Hp. + rewrite Qmult_comm. + apply Qmult_inv_r. + exact Hp. +Qed. + +Lemma Qpower_theory : power_theory 1 Qmult Qeq Z_of_N Qpower. +Proof. +constructor. +intros r [|n]; +reflexivity. +Qed. + +Ltac isQcst t := + match t with + | inject_Z ?z => isZcst z + | Qmake ?n ?d => + match isZcst n with + true => isPcst d + | _ => false + end + | _ => false + end. + +Ltac Qcst t := + match isQcst t with + true => t + | _ => NotConstant + end. + +Ltac Qpow_tac t := + match t with + | Z0 => N0 + | Zpos ?n => Ncst (Npos n) + | Z_of_N ?n => Ncst n + | NtoZ ?n => Ncst n + | _ => NotConstant + end. + +Add Field Qfield : Qsft + (decidable Qeq_bool_correct, + completeness Qeq_bool_complete, + constants [Qcst], + power_tac Qpower_theory [Qpow_tac]). + +(** Exemple of use: *) + +Section Examples. + +Let ex1 : forall x y z : Q, (x+y)*z == (x*z)+(y*z). + intros. + ring. +Qed. + +Let ex2 : forall x y : Q, x+y == y+x. + intros. + ring. +Qed. + +Let ex3 : forall x y z : Q, (x+y)+z == x+(y+z). + intros. + ring. +Qed. + +Let ex4 : (inject_Z 1)+(inject_Z 1)==(inject_Z 2). + ring. +Qed. + +Let ex5 : 1+1 == 2#1. + ring. +Qed. + +Let ex6 : (1#1)+(1#1) == 2#1. + ring. +Qed. + +Let ex7 : forall x : Q, x-x== 0. + intro. + ring. +Qed. + +Let ex8 : forall x : Q, x^1 == x. + intro. + ring. +Qed. + +Let ex9 : forall x : Q, x^0 == 1. + intro. + ring. +Qed. + +Let ex10 : forall x y : Q, ~(y==0) -> (x/y)*y == x. +intros. +field. +auto. +Qed. + +End Examples. + +Lemma Qopp_plus : forall a b, -(a+b) == -a + -b. +Proof. + intros; ring. +Qed. + +Lemma Qopp_opp : forall q, - -q==q. +Proof. + intros; ring. +Qed. diff --git a/theories/QArith/Qpower.v b/theories/QArith/Qpower.v new file mode 100644 index 00000000..8672592d --- /dev/null +++ b/theories/QArith/Qpower.v @@ -0,0 +1,239 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* 0)%Z -> 0^n == 0. +Proof. + intros [|n|n] Hn; try (elim Hn; reflexivity); simpl; + rewrite Qpower_positive_0; reflexivity. +Qed. + +Lemma Qpower_not_0_positive : forall a n, ~a==0 -> ~Qpower_positive a n == 0. +Proof. +intros a n X H. +apply X; clear X. +induction n; simpl in *; try assumption; +destruct (Qmult_integral _ _ H); +try destruct (Qmult_integral _ _ H0); auto. +Qed. + +Lemma Qpower_pos_positive : forall p n, 0 <= p -> 0 <= Qpower_positive p n. +intros p n Hp. +induction n; simpl; repeat apply Qmult_le_0_compat;assumption. +Qed. + +Lemma Qpower_pos : forall p n, 0 <= p -> 0 <= p^n. +Proof. + intros p [|n|n] Hp; simpl; try discriminate; + try apply Qinv_le_0_compat; apply Qpower_pos_positive; assumption. +Qed. + +Lemma Qmult_power_positive : forall a b n, Qpower_positive (a*b) n == (Qpower_positive a n)*(Qpower_positive b n). +Proof. +induction n; +simpl; repeat rewrite IHn; ring. +Qed. + +Lemma Qmult_power : forall a b n, (a*b)^n == a^n*b^n. +Proof. + intros a b [|n|n]; simpl; + try rewrite Qmult_power_positive; + try rewrite Qinv_mult_distr; + reflexivity. +Qed. + +Lemma Qinv_power_positive : forall a n, Qpower_positive (/a) n == /(Qpower_positive a n). +Proof. +induction n; +simpl; repeat (rewrite IHn || rewrite Qinv_mult_distr); reflexivity. +Qed. + +Lemma Qinv_power : forall a n, (/a)^n == /a^n. +Proof. + intros a [|n|n]; simpl; + try rewrite Qinv_power_positive; + reflexivity. +Qed. + +Lemma Qdiv_power : forall a b n, (a/b)^n == (a^n/b^n). +Proof. +unfold Qdiv. +intros a b n. +rewrite Qmult_power. +rewrite Qinv_power. +reflexivity. +Qed. + +Lemma Qinv_power_n : forall n p, (1#p)^n == /(inject_Z ('p))^n. +Proof. +intros n p. +rewrite Qmake_Qdiv. +rewrite Qdiv_power. +rewrite Qpower_1. +unfold Qdiv. +ring. +Qed. + +Lemma Qpower_plus_positive : forall a n m, Qpower_positive a (n+m) == (Qpower_positive a n)*(Qpower_positive a m). +Proof. +intros a n m. +unfold Qpower_positive. +apply pow_pos_Pplus. +apply Q_Setoid. +apply Qmult_comp. +apply Qmult_comm. +apply Qmult_assoc. +Qed. + +Lemma Qpower_opp : forall a n, a^(-n) == /a^n. +Proof. +intros a [|n|n]; simpl; try reflexivity. +symmetry; apply Qinv_involutive. +Qed. + +Lemma Qpower_minus_positive : forall a (n m:positive), (Pcompare n m Eq=Gt)%positive -> Qpower_positive a (n-m)%positive == (Qpower_positive a n)/(Qpower_positive a m). +Proof. +intros a n m H. +destruct (Qeq_dec a 0). + rewrite q. + repeat rewrite Qpower_positive_0. + reflexivity. +rewrite <- (Qdiv_mult_l (Qpower_positive a (n - m)) (Qpower_positive a m)) by + (apply Qpower_not_0_positive; assumption). +apply Qdiv_comp;[|reflexivity]. +rewrite Qmult_comm. +rewrite <- Qpower_plus_positive. +rewrite Pplus_minus. +reflexivity. +assumption. +Qed. + +Lemma Qpower_plus : forall a n m, ~a==0 -> a^(n+m) == a^n*a^m. +Proof. +intros a [|n|n] [|m|m] H; simpl; try ring; +try rewrite Qpower_plus_positive; +try apply Qinv_mult_distr; try reflexivity; +case_eq ((n ?= m)%positive Eq); intros H0; simpl; + try rewrite Qpower_minus_positive; + try rewrite (Pcompare_Eq_eq _ _ H0); + try (field; try split; apply Qpower_not_0_positive); + try assumption; + apply ZC2; + assumption. +Qed. + +Lemma Qpower_plus' : forall a n m, (n+m <> 0)%Z -> a^(n+m) == a^n*a^m. +Proof. +intros a n m H. +destruct (Qeq_dec a 0)as [X|X]. +rewrite X. +rewrite Qpower_0 by assumption. +destruct n; destruct m; try (elim H; reflexivity); + simpl; repeat rewrite Qpower_positive_0; ring_simplify; + reflexivity. +apply Qpower_plus. +assumption. +Qed. + +Lemma Qpower_mult_positive : forall a n m, Qpower_positive a (n*m) == Qpower_positive (Qpower_positive a n) m. +Proof. +intros a n m. +induction n using Pind. + reflexivity. +rewrite Pmult_Sn_m. +rewrite Pplus_one_succ_l. +do 2 rewrite Qpower_plus_positive. +rewrite IHn. +rewrite Qmult_power_positive. +reflexivity. +Qed. + +Lemma Qpower_mult : forall a n m, a^(n*m) == (a^n)^m. +Proof. +intros a [|n|n] [|m|m]; simpl; + try rewrite Qpower_positive_1; + try rewrite Qpower_mult_positive; + try rewrite Qinv_power_positive; + try rewrite Qinv_involutive; + try reflexivity. +Qed. + +Lemma Zpower_Qpower : forall (a n:Z), (0<=n)%Z -> inject_Z (a^n) == (inject_Z a)^n. +Proof. +intros a [|n|n] H;[reflexivity| |elim H; reflexivity]. +induction n using Pind. + replace (a^1)%Z with a by ring. + ring. +rewrite Zpos_succ_morphism. +unfold Zsucc. +rewrite Zpower_exp; auto with *; try discriminate. +rewrite Qpower_plus' by discriminate. +rewrite <- IHn by discriminate. +replace (a^'n*a^1)%Z with (a^'n*a)%Z by ring. +ring_simplify. +reflexivity. +Qed. + +Lemma Qsqr_nonneg : forall a, 0 <= a^2. +Proof. +intros a. +destruct (Qlt_le_dec 0 a) as [A|A]. +apply (Qmult_le_0_compat a a); + (apply Qlt_le_weak; assumption). +setoid_replace (a^2) with ((-a)*(-a)) by ring. +rewrite Qle_minus_iff in A. +setoid_replace (0+ - a) with (-a) in A by ring. +apply Qmult_le_0_compat; assumption. +Qed. + +Theorem Qpower_decomp: forall p x y, + Qpower_positive (x #y) p == x ^ Zpos p # (Z2P ((Zpos y) ^ Zpos p)). +Proof. +induction p; intros; unfold Qmult; simpl. +(* xI *) +rewrite IHp, xI_succ_xO, <-Pplus_diag, Pplus_one_succ_l. +repeat rewrite Zpower_pos_is_exp. +red; unfold Qmult, Qnum, Qden, Zpower. +repeat rewrite Zpos_mult_morphism. +repeat rewrite Z2P_correct. +repeat rewrite Zpower_pos_1_r; ring. +apply Zpower_pos_pos; red; auto. +repeat apply Zmult_lt_0_compat; auto; + apply Zpower_pos_pos; red; auto. +(* xO *) +rewrite IHp, <-Pplus_diag. +repeat rewrite Zpower_pos_is_exp. +red; unfold Qmult, Qnum, Qden, Zpower. +repeat rewrite Zpos_mult_morphism. +repeat rewrite Z2P_correct; try ring. +apply Zpower_pos_pos; red; auto. +repeat apply Zmult_lt_0_compat; auto; + apply Zpower_pos_pos; red; auto. +(* xO *) +unfold Qmult; simpl. +red; simpl; rewrite Zpower_pos_1_r; + rewrite Zpos_mult_morphism; ring. +Qed. diff --git a/theories/QArith/Qreals.v b/theories/QArith/Qreals.v index 6bd161f3..c98cef3f 100644 --- a/theories/QArith/Qreals.v +++ b/theories/QArith/Qreals.v @@ -6,24 +6,20 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Qreals.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Qreals.v 10739 2008-04-01 14:45:20Z herbelin $ i*) Require Export Rbase. Require Export QArith_base. -(** A field tactic for rational numbers. *) +(** Injection of rational numbers into real numbers. *) -(** Since field cannot operate on setoid datatypes (yet?), - we translate Q goals into reals before applying field. *) +Definition Q2R (x : Q) : R := (IZR (Qnum x) * / IZR (QDen x))%R. Lemma IZR_nz : forall p : positive, IZR (Zpos p) <> 0%R. intros; apply not_O_IZR; auto with qarith. Qed. -Hint Immediate IZR_nz. -Hint Resolve Rmult_integral_contrapositive. - -Definition Q2R (x : Q) : R := (IZR (Qnum x) * / IZR (QDen x))%R. +Hint Resolve IZR_nz Rmult_integral_contrapositive. Lemma eqR_Qeq : forall x y : Q, Q2R x = Q2R y -> x==y. Proof. @@ -171,7 +167,7 @@ Lemma Q2R_minus : forall x y : Q, Q2R (x-y) = (Q2R x - Q2R y)%R. unfold Qminus in |- *; intros; rewrite Q2R_plus; rewrite Q2R_opp; auto. Qed. -Lemma Q2R_inv : forall x : Q, ~ x==0#1 -> Q2R (/x) = (/ Q2R x)%R. +Lemma Q2R_inv : forall x : Q, ~ x==0 -> Q2R (/x) = (/ Q2R x)%R. Proof. unfold Qinv, Q2R, Qeq in |- *; intros (x1, x2); unfold Qden, Qnum in |- *. case x1. @@ -185,7 +181,7 @@ intros; Qed. Lemma Q2R_div : - forall x y : Q, ~ y==0#1 -> Q2R (x/y) = (Q2R x / Q2R y)%R. + forall x y : Q, ~ y==0 -> Q2R (x/y) = (Q2R x / Q2R y)%R. Proof. unfold Qdiv, Rdiv in |- *. intros; rewrite Q2R_mult. @@ -194,16 +190,24 @@ Qed. Hint Rewrite Q2R_plus Q2R_mult Q2R_opp Q2R_minus Q2R_inv Q2R_div : q2r_simpl. +Section LegacyQField. + +(** In the past, the field tactic was not able to deal with setoid datatypes, + so translating from Q to R and applying field on reals was a workaround. + See now Qfield for a direct field tactic on Q. *) + Ltac QField := apply eqR_Qeq; autorewrite with q2r_simpl; try field; auto. (** Examples of use: *) -Goal forall x y z : Q, (x+y)*z == (x*z)+(y*z). +Let ex1 : forall x y z : Q, (x+y)*z == (x*z)+(y*z). intros; QField. -Abort. +Qed. -Goal forall x y : Q, ~ y==0#1 -> (x/y)*y == x. +Let ex2 : forall x y : Q, ~ y==0 -> (x/y)*y == x. intros; QField. intro; apply H; apply eqR_Qeq. rewrite H0; unfold Q2R in |- *; simpl in |- *; field; auto with real. -Abort. +Qed. + +End LegacyQField. \ No newline at end of file diff --git a/theories/QArith/Qreduction.v b/theories/QArith/Qreduction.v index 340cac83..9c522f09 100644 --- a/theories/QArith/Qreduction.v +++ b/theories/QArith/Qreduction.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Qreduction.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Qreduction.v 10739 2008-04-01 14:45:20Z herbelin $ i*) (** Normalisation functions for rational numbers. *) @@ -145,6 +145,7 @@ Qed. Definition Qplus' (p q : Q) := Qred (Qplus p q). Definition Qmult' (p q : Q) := Qred (Qmult p q). +Definition Qminus' x y := Qred (Qminus x y). Lemma Qplus'_correct : forall p q : Q, (Qplus' p q)==(Qplus p q). Proof. @@ -156,6 +157,11 @@ Proof. intros; unfold Qmult' in |- *; apply Qred_correct; auto. Qed. +Lemma Qminus'_correct : forall p q : Q, (Qminus' p q)==(Qminus p q). +Proof. + intros; unfold Qminus' in |- *; apply Qred_correct; auto. +Qed. + Add Morphism Qplus' : Qplus'_comp. Proof. intros; unfold Qplus' in |- *. @@ -167,3 +173,21 @@ Add Morphism Qmult' : Qmult'_comp. rewrite H; rewrite H0; auto with qarith. Qed. +Add Morphism Qminus' : Qminus'_comp. + intros; unfold Qminus' in |- *. + rewrite H; rewrite H0; auto with qarith. +Qed. + +Lemma Qred_opp: forall q, Qred (-q) = - (Qred q). +Proof. + intros (x, y); unfold Qred; simpl. + rewrite Zggcd_opp; case Zggcd; intros p1 (p2, p3); simpl. + unfold Qopp; auto. +Qed. + +Theorem Qred_compare: forall x y, + Qcompare x y = Qcompare (Qred x) (Qred y). +Proof. + intros x y; apply Qcompare_comp; apply Qeq_sym; apply Qred_correct. +Qed. + diff --git a/theories/QArith/Qring.v b/theories/QArith/Qring.v index f9aa3e50..2d45d537 100644 --- a/theories/QArith/Qring.v +++ b/theories/QArith/Qring.v @@ -6,99 +6,6 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Qring.v 9551 2007-01-29 15:13:35Z bgregoir $ i*) - -Require Export Ring. -Require Export QArith_base. - -(** * A ring tactic for rational numbers *) - -Definition Qeq_bool (x y : Q) := - if Qeq_dec x y then true else false. - -Lemma Qeq_bool_correct : forall x y : Q, Qeq_bool x y = true -> x==y. -Proof. - intros x y; unfold Qeq_bool in |- *; case (Qeq_dec x y); simpl in |- *; auto. - intros _ H; inversion H. -Qed. - -Definition Qsrt : ring_theory 0 1 Qplus Qmult Qminus Qopp Qeq. -Proof. - constructor. - exact Qplus_0_l. - exact Qplus_comm. - exact Qplus_assoc. - exact Qmult_1_l. - exact Qmult_comm. - exact Qmult_assoc. - exact Qmult_plus_distr_l. - reflexivity. - exact Qplus_opp_r. -Qed. - -Ltac isQcst t := - match t with - | inject_Z ?z => isZcst z - | Qmake ?n ?d => - match isZcst n with - true => isPcst d - | _ => false - end - | _ => false - end. - -Ltac Qcst t := - match isQcst t with - true => t - | _ => NotConstant - end. - -Add Ring Qring : Qsrt (decidable Qeq_bool_correct, constants [Qcst]). -(** Exemple of use: *) - -Section Examples. - -Let ex1 : forall x y z : Q, (x+y)*z == (x*z)+(y*z). - intros. - ring. -Qed. - -Let ex2 : forall x y : Q, x+y == y+x. - intros. - ring. -Qed. - -Let ex3 : forall x y z : Q, (x+y)+z == x+(y+z). - intros. - ring. -Qed. - -Let ex4 : (inject_Z 1)+(inject_Z 1)==(inject_Z 2). - ring. -Qed. - -Let ex5 : 1+1 == 2#1. - ring. -Qed. - -Let ex6 : (1#1)+(1#1) == 2#1. - ring. -Qed. - -Let ex7 : forall x : Q, x-x== 0#1. - intro. - ring. -Qed. - -End Examples. - -Lemma Qopp_plus : forall a b, -(a+b) == -a + -b. -Proof. - intros; ring. -Qed. - -Lemma Qopp_opp : forall q, - -q==q. -Proof. - intros; ring. -Qed. +(*i $Id: Qring.v 10739 2008-04-01 14:45:20Z herbelin $ i*) +Require Export Qfield. diff --git a/theories/QArith/Qround.v b/theories/QArith/Qround.v new file mode 100644 index 00000000..3f191c75 --- /dev/null +++ b/theories/QArith/Qround.v @@ -0,0 +1,139 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* - q < - p. +Proof. +intros (a1,a2) (b1,b2); unfold Qle, Qlt; simpl. +do 2 rewrite <- Zopp_mult_distr_l; omega. +Qed. + +Hint Resolve Qopp_lt_compat : qarith. + +(************) + +Coercion Local inject_Z : Z >-> Q. + +Definition Qfloor (x:Q) := let (n,d) := x in Zdiv n (Zpos d). +Definition Qceiling (x:Q) := (-(Qfloor (-x)))%Z. + +Lemma Qfloor_Z : forall z:Z, Qfloor z = z. +Proof. +intros z. +simpl. +auto with *. +Qed. + +Lemma Qceiling_Z : forall z:Z, Qceiling z = z. +Proof. +intros z. +unfold Qceiling. +simpl. +rewrite Zdiv_1_r. +auto with *. +Qed. + +Lemma Qfloor_le : forall x, Qfloor x <= x. +Proof. +intros [n d]. +simpl. +unfold Qle. +simpl. +replace (n*1)%Z with n by ring. +rewrite Zmult_comm. +apply Z_mult_div_ge. +auto with *. +Qed. + +Hint Resolve Qfloor_le : qarith. + +Lemma Qle_ceiling : forall x, x <= Qceiling x. +Proof. +intros x. +apply Qle_trans with (- - x). + rewrite Qopp_involutive. + auto with *. +change (Qceiling x:Q) with (-(Qfloor(-x))). +auto with *. +Qed. + +Hint Resolve Qle_ceiling : qarith. + +Lemma Qle_floor_ceiling : forall x, Qfloor x <= Qceiling x. +Proof. +eauto with qarith. +Qed. + +Lemma Qlt_floor : forall x, x < (Qfloor x+1)%Z. +Proof. +intros [n d]. +simpl. +unfold Qlt. +simpl. +replace (n*1)%Z with n by ring. +ring_simplify. +replace (n / ' d * ' d + ' d)%Z with + (('d * (n / 'd) + n mod 'd) + 'd - n mod 'd)%Z by ring. +rewrite <- Z_div_mod_eq; auto with*. +rewrite <- Zlt_plus_swap. +destruct (Z_mod_lt n ('d)); auto with *. +Qed. + +Hint Resolve Qlt_floor : qarith. + +Lemma Qceiling_lt : forall x, (Qceiling x-1)%Z < x. +Proof. +intros x. +unfold Qceiling. +replace (- Qfloor (- x) - 1)%Z with (-(Qfloor (-x) + 1))%Z by ring. +change ((- (Qfloor (- x) + 1))%Z:Q) with (-(Qfloor (- x) + 1)%Z). +apply Qlt_le_trans with (- - x); auto with *. +rewrite Qopp_involutive. +auto with *. +Qed. + +Hint Resolve Qceiling_lt : qarith. + +Lemma Qfloor_resp_le : forall x y, x <= y -> (Qfloor x <= Qfloor y)%Z. +Proof. +intros [xn xd] [yn yd] Hxy. +unfold Qle in *. +simpl in *. +rewrite <- (Zdiv_mult_cancel_r xn ('xd) ('yd)); auto with *. +rewrite <- (Zdiv_mult_cancel_r yn ('yd) ('xd)); auto with *. +rewrite (Zmult_comm ('yd) ('xd)). +apply Z_div_le; auto with *. +Qed. + +Hint Resolve Qfloor_resp_le : qarith. + +Lemma Qceiling_resp_le : forall x y, x <= y -> (Qceiling x <= Qceiling y)%Z. +Proof. +intros x y Hxy. +unfold Qceiling. +cut (Qfloor (-y) <= Qfloor (-x))%Z; auto with *. +Qed. + +Hint Resolve Qceiling_resp_le : qarith. + +Add Morphism Qfloor with signature Qeq ==> @eq _ as Qfloor_comp. +Proof. +intros x y H. +apply Zle_antisym. + auto with *. +symmetry in H; auto with *. +Qed. + +Add Morphism Qceiling with signature Qeq ==> @eq _ as Qceiling_comp. +Proof. +intros x y H. +apply Zle_antisym. + auto with *. +symmetry in H; auto with *. +Qed. \ No newline at end of file diff --git a/theories/Reals/Alembert.v b/theories/Reals/Alembert.v index 802bfa71..7625cce6 100644 --- a/theories/Reals/Alembert.v +++ b/theories/Reals/Alembert.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Alembert.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Alembert.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. @@ -25,12 +25,12 @@ Lemma Alembert_C1 : forall An:nat -> R, (forall n:nat, 0 < An n) -> Un_cv (fun n:nat => Rabs (An (S n) / An n)) 0 -> - sigT (fun l:R => Un_cv (fun N:nat => sum_f_R0 An N) l). + { l:R | Un_cv (fun N:nat => sum_f_R0 An N) l }. Proof. intros An H H0. cut - (sigT (fun l:R => is_lub (EUn (fun N:nat => sum_f_R0 An N)) l) -> - sigT (fun l:R => Un_cv (fun N:nat => sum_f_R0 An N) l)). + ({ l:R | is_lub (EUn (fun N:nat => sum_f_R0 An N)) l } -> + { l:R | Un_cv (fun N:nat => sum_f_R0 An N) l }). intro X; apply X. apply completeness. unfold Un_cv in H0; unfold bound in |- *; cut (0 < / 2); @@ -109,18 +109,18 @@ Proof. symmetry in |- *; apply tech2; assumption. exists (sum_f_R0 An 0); unfold EUn in |- *; exists 0%nat; reflexivity. intro X; elim X; intros. - apply existT with x; apply tech10; + exists x; apply tech10; [ unfold Un_growing in |- *; intro; rewrite tech5; pattern (sum_f_R0 An n) at 1 in |- *; rewrite <- Rplus_0_r; apply Rplus_le_compat_l; left; apply H | apply p ]. -Qed. +Defined. Lemma Alembert_C2 : forall An:nat -> R, (forall n:nat, An n <> 0) -> Un_cv (fun n:nat => Rabs (An (S n) / An n)) 0 -> - sigT (fun l:R => Un_cv (fun N:nat => sum_f_R0 An N) l). + { l:R | Un_cv (fun N:nat => sum_f_R0 An N) l }. Proof. intros. set (Vn := fun i:nat => (2 * Rabs (An i) + An i) / 2). @@ -133,7 +133,7 @@ Proof. assert (H6 := Alembert_C1 Wn H2 H4). elim H5; intros. elim H6; intros. - apply existT with (x - x0); unfold Un_cv in |- *; unfold Un_cv in p; + exists (x - x0); unfold Un_cv in |- *; unfold Un_cv in p; unfold Un_cv in p0; intros; cut (0 < eps / 2). intro; elim (p (eps / 2) H8); clear p; intros. elim (p0 (eps / 2) H8); clear p0; intros. @@ -334,21 +334,21 @@ Proof. rewrite <- Rabs_Ropp; apply RRle_abs. rewrite double; pattern (Rabs (An n)) at 1 in |- *; rewrite <- Rplus_0_r; apply Rplus_lt_compat_l; apply Rabs_pos_lt; apply H. -Qed. +Defined. Lemma AlembertC3_step1 : forall (An:nat -> R) (x:R), x <> 0 -> (forall n:nat, An n <> 0) -> Un_cv (fun n:nat => Rabs (An (S n) / An n)) 0 -> - sigT (fun l:R => Pser An x l). + { l:R | Pser An x l }. Proof. intros; set (Bn := fun i:nat => An i * x ^ i). cut (forall n:nat, Bn n <> 0). intro; cut (Un_cv (fun n:nat => Rabs (Bn (S n) / Bn n)) 0). intro; assert (H4 := Alembert_C2 Bn H2 H3). elim H4; intros. - apply existT with x0; unfold Bn in p; apply tech12; assumption. + exists x0; unfold Bn in p; apply tech12; assumption. unfold Un_cv in |- *; intros; unfold Un_cv in H1; cut (0 < eps / Rabs x). intro; elim (H1 (eps / Rabs x) H4); intros. exists x0; intros; unfold R_dist in |- *; unfold Rminus in |- *; @@ -379,13 +379,13 @@ Proof. [ assumption | apply Rinv_0_lt_compat; apply Rabs_pos_lt; assumption ]. intro; unfold Bn in |- *; apply prod_neq_R0; [ apply H0 | apply pow_nonzero; assumption ]. -Qed. +Defined. Lemma AlembertC3_step2 : - forall (An:nat -> R) (x:R), x = 0 -> sigT (fun l:R => Pser An x l). + forall (An:nat -> R) (x:R), x = 0 -> { l:R | Pser An x l }. Proof. - intros; apply existT with (An 0%nat). - unfold Pser in |- *; unfold infinit_sum in |- *; intros; exists 0%nat; intros; + intros; exists (An 0%nat). + unfold Pser in |- *; unfold infinite_sum in |- *; intros; exists 0%nat; intros; replace (sum_f_R0 (fun n0:nat => An n0 * x ^ n0) n) with (An 0%nat). unfold R_dist in |- *; unfold Rminus in |- *; rewrite Rplus_opp_r; rewrite Rabs_R0; assumption. @@ -395,12 +395,12 @@ Proof. [ rewrite H; simpl in |- *; ring | unfold ge in |- *; apply le_O_n ]. Qed. -(** An useful criterion of convergence for power series *) +(** A useful criterion of convergence for power series *) Theorem Alembert_C3 : forall (An:nat -> R) (x:R), (forall n:nat, An n <> 0) -> Un_cv (fun n:nat => Rabs (An (S n) / An n)) 0 -> - sigT (fun l:R => Pser An x l). + { l:R | Pser An x l }. Proof. intros; case (total_order_T x 0); intro. elim s; intro. @@ -411,19 +411,19 @@ Proof. cut (x <> 0). intro; apply AlembertC3_step1; assumption. red in |- *; intro; rewrite H1 in r; elim (Rlt_irrefl _ r). -Qed. +Defined. Lemma Alembert_C4 : forall (An:nat -> R) (k:R), 0 <= k < 1 -> (forall n:nat, 0 < An n) -> Un_cv (fun n:nat => Rabs (An (S n) / An n)) k -> - sigT (fun l:R => Un_cv (fun N:nat => sum_f_R0 An N) l). + { l:R | Un_cv (fun N:nat => sum_f_R0 An N) l }. Proof. intros An k Hyp H H0. cut - (sigT (fun l:R => is_lub (EUn (fun N:nat => sum_f_R0 An N)) l) -> - sigT (fun l:R => Un_cv (fun N:nat => sum_f_R0 An N) l)). + ({ l:R | is_lub (EUn (fun N:nat => sum_f_R0 An N)) l } -> + { l:R | Un_cv (fun N:nat => sum_f_R0 An N) l }). intro X; apply X. apply completeness. assert (H1 := tech13 _ _ Hyp H0). @@ -524,7 +524,7 @@ Proof. symmetry in |- *; apply tech2; assumption. exists (sum_f_R0 An 0); unfold EUn in |- *; exists 0%nat; reflexivity. intro X; elim X; intros. - apply existT with x; apply tech10; + exists x; apply tech10; [ unfold Un_growing in |- *; intro; rewrite tech5; pattern (sum_f_R0 An n) at 1 in |- *; rewrite <- Rplus_0_r; apply Rplus_le_compat_l; left; apply H @@ -536,21 +536,19 @@ Lemma Alembert_C5 : 0 <= k < 1 -> (forall n:nat, An n <> 0) -> Un_cv (fun n:nat => Rabs (An (S n) / An n)) k -> - sigT (fun l:R => Un_cv (fun N:nat => sum_f_R0 An N) l). + { l:R | Un_cv (fun N:nat => sum_f_R0 An N) l }. Proof. intros. cut - (sigT (fun l:R => Un_cv (fun N:nat => sum_f_R0 An N) l) -> - sigT (fun l:R => Un_cv (fun N:nat => sum_f_R0 An N) l)). + ({ l:R | Un_cv (fun N:nat => sum_f_R0 An N) l } -> + { l:R | Un_cv (fun N:nat => sum_f_R0 An N) l }). intro Hyp0; apply Hyp0. apply cv_cauchy_2. apply cauchy_abs. apply cv_cauchy_1. cut - (sigT - (fun l:R => Un_cv (fun N:nat => sum_f_R0 (fun i:nat => Rabs (An i)) N) l) -> - sigT - (fun l:R => Un_cv (fun N:nat => sum_f_R0 (fun i:nat => Rabs (An i)) N) l)). + ({ l:R | Un_cv (fun N:nat => sum_f_R0 (fun i:nat => Rabs (An i)) N) l } -> + { l:R | Un_cv (fun N:nat => sum_f_R0 (fun i:nat => Rabs (An i)) N) l }). intro Hyp; apply Hyp. apply (Alembert_C4 (fun i:nat => Rabs (An i)) k). assumption. @@ -568,11 +566,11 @@ Proof. apply H0. intro X. elim X; intros. - apply existT with x. + exists x. assumption. intro X. elim X; intros. - apply existT with x. + exists x. assumption. Qed. @@ -583,14 +581,12 @@ Lemma Alembert_C6 : 0 < k -> (forall n:nat, An n <> 0) -> Un_cv (fun n:nat => Rabs (An (S n) / An n)) k -> - Rabs x < / k -> sigT (fun l:R => Pser An x l). + Rabs x < / k -> { l:R | Pser An x l }. intros. - cut - (sigT - (fun l:R => Un_cv (fun N:nat => sum_f_R0 (fun i:nat => An i * x ^ i) N) l)). + cut { l:R | Un_cv (fun N:nat => sum_f_R0 (fun i:nat => An i * x ^ i) N) l }. intro X. elim X; intros. - apply existT with x0. + exists x0. apply tech12; assumption. case (total_order_T x 0); intro. elim s; intro. @@ -655,7 +651,7 @@ Lemma Alembert_C6 : assumption. apply Rinv_0_lt_compat; apply Rabs_pos_lt. red in |- *; intro H7; rewrite H7 in a; elim (Rlt_irrefl _ a). - apply existT with (An 0%nat). + exists (An 0%nat). unfold Un_cv in |- *. intros. exists 0%nat. diff --git a/theories/Reals/AltSeries.v b/theories/Reals/AltSeries.v index 581c181f..5c4bbd6a 100644 --- a/theories/Reals/AltSeries.v +++ b/theories/Reals/AltSeries.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) - (*i $Id: AltSeries.v 9551 2007-01-29 15:13:35Z bgregoir $ i*) + (*i $Id: AltSeries.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. @@ -153,14 +153,14 @@ Lemma CV_ALT : Un_decreasing Un -> positivity_seq Un -> Un_cv Un 0 -> - sigT (fun l:R => Un_cv (fun N:nat => sum_f_R0 (tg_alt Un) N) l). + { l:R | Un_cv (fun N:nat => sum_f_R0 (tg_alt Un) N) l }. Proof. intros. assert (H2 := CV_ALT_step0 _ H). assert (H3 := CV_ALT_step4 _ H H0). assert (X := growing_cv _ H2 H3). elim X; intros. - apply existT with x. + exists x. unfold Un_cv in |- *; unfold R_dist in |- *; unfold Un_cv in H1; unfold R_dist in H1; unfold Un_cv in p; unfold R_dist in p. intros; cut (0 < eps / 2); @@ -220,7 +220,7 @@ Theorem alternated_series : forall Un:nat -> R, Un_decreasing Un -> Un_cv Un 0 -> - sigT (fun l:R => Un_cv (fun N:nat => sum_f_R0 (tg_alt Un) N) l). + { l:R | Un_cv (fun N:nat => sum_f_R0 (tg_alt Un) N) l }. Proof. intros; apply CV_ALT. assumption. @@ -408,7 +408,7 @@ Proof. Qed. Lemma exist_PI : - sigT (fun l:R => Un_cv (fun N:nat => sum_f_R0 (tg_alt PI_tg) N) l). + { l:R | Un_cv (fun N:nat => sum_f_R0 (tg_alt PI_tg) N) l }. Proof. apply alternated_series. apply PI_tg_decreasing. @@ -416,9 +416,7 @@ Proof. Qed. (** Now, PI is defined *) -Definition PI : R := 4 * match exist_PI with - | existT a b => a - end. +Definition PI : R := 4 * (let (a,_) := exist_PI in a). (** We can get an approximation of PI with the following inequality *) Lemma PI_ineq : diff --git a/theories/Reals/ArithProp.v b/theories/Reals/ArithProp.v index 7dbbd605..7327c64c 100644 --- a/theories/Reals/ArithProp.v +++ b/theories/Reals/ArithProp.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) - (*i $Id: ArithProp.v 9551 2007-01-29 15:13:35Z bgregoir $ i*) + (*i $Id: ArithProp.v 9454 2006-12-15 15:30:59Z bgregoir $ i*) Require Import Rbase. Require Import Rbasic_fun. diff --git a/theories/Reals/Cos_plus.v b/theories/Reals/Cos_plus.v index 10965951..0de639e8 100644 --- a/theories/Reals/Cos_plus.v +++ b/theories/Reals/Cos_plus.v @@ -6,14 +6,16 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) - (*i $Id: Cos_plus.v 9551 2007-01-29 15:13:35Z bgregoir $ i*) + (*i $Id: Cos_plus.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. Require Import SeqSeries. Require Import Rtrigo_def. Require Import Cos_rel. -Require Import Max. Open Local Scope nat_scope. Open Local Scope R_scope. +Require Import Max. +Open Local Scope nat_scope. +Open Local Scope R_scope. Definition Majxy (x y:R) (n:nat) : R := Rmax 1 (Rmax (Rabs x) (Rabs y)) ^ (4 * S n) / INR (fact n). diff --git a/theories/Reals/Cos_rel.v b/theories/Reals/Cos_rel.v index d410e14a..aed481c7 100644 --- a/theories/Reals/Cos_rel.v +++ b/theories/Reals/Cos_rel.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Cos_rel.v 9551 2007-01-29 15:13:35Z bgregoir $ i*) +(*i $Id: Cos_rel.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. @@ -263,7 +263,7 @@ assert (H := exist_cos (x * x)). elim H; intros. assert (p_i := p). unfold cos_in in p. -unfold cos_n, infinit_sum in p. +unfold cos_n, infinite_sum in p. unfold R_dist in p. cut (cos x = x0). intro. @@ -295,7 +295,7 @@ assert (H := exist_cos ((x + y) * (x + y))). elim H; intros. assert (p_i := p). unfold cos_in in p. -unfold cos_n, infinit_sum in p. +unfold cos_n, infinite_sum in p. unfold R_dist in p. cut (cos (x + y) = x0). intro. @@ -344,7 +344,7 @@ assert (H0 := exist_sin (x * x)). elim H0; intros. assert (p_i := p). unfold sin_in in p. -unfold sin_n, infinit_sum in p. +unfold sin_n, infinite_sum in p. unfold R_dist in p. cut (sin x = x * x0). intro. diff --git a/theories/Reals/DiscrR.v b/theories/Reals/DiscrR.v index a16af05c..22a52e67 100644 --- a/theories/Reals/DiscrR.v +++ b/theories/Reals/DiscrR.v @@ -6,10 +6,11 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: DiscrR.v 9178 2006-09-26 11:18:22Z barras $ i*) +(*i $Id: DiscrR.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import RIneq. -Require Import Omega. Open Local Scope R_scope. +Require Import Omega. +Open Local Scope R_scope. Lemma Rlt_R0_R2 : 0 < 2. change 2 with (INR 2); apply lt_INR_0; apply lt_O_Sn. diff --git a/theories/Reals/Exp_prop.v b/theories/Reals/Exp_prop.v index beb4b744..bf729526 100644 --- a/theories/Reals/Exp_prop.v +++ b/theories/Reals/Exp_prop.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Exp_prop.v 9551 2007-01-29 15:13:35Z bgregoir $ i*) +(*i $Id: Exp_prop.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. @@ -27,7 +27,7 @@ Lemma E1_cvg : forall x:R, Un_cv (E1 x) (exp x). Proof. intro; unfold exp in |- *; unfold projT1 in |- *. case (exist_exp x); intro. - unfold exp_in, Un_cv in |- *; unfold infinit_sum, E1 in |- *; trivial. + unfold exp_in, Un_cv in |- *; unfold infinite_sum, E1 in |- *; trivial. Qed. Definition Reste_E (x y:R) (N:nat) : R := @@ -734,7 +734,7 @@ Proof. apply Rinv_0_lt_compat; apply INR_fact_lt_0. apply (pow_lt _ n H). unfold exp in |- *; unfold projT1 in |- *; case (exist_exp x); intro. - unfold exp_in in |- *; unfold infinit_sum, Un_cv in |- *; trivial. + unfold exp_in in |- *; unfold infinite_sum, Un_cv in |- *; trivial. Qed. (**********) @@ -769,7 +769,7 @@ Proof. unfold derivable_pt_lim in |- *; intros. set (fn := fun (N:nat) (x:R) => x ^ N / INR (fact (S N))). cut (CVN_R fn). - intro; cut (forall x:R, sigT (fun l:R => Un_cv (fun N:nat => SP fn N x) l)). + intro; cut (forall x:R, { l:R | Un_cv (fun N:nat => SP fn N x) l }). intro cv; cut (forall n:nat, continuity (fn n)). intro; cut (continuity (SFL fn cv)). intro; unfold continuity in H1. @@ -809,13 +809,12 @@ Proof. unfold Rdiv in |- *; rewrite Rinv_1; rewrite Rmult_1_r; reflexivity. apply lt_le_trans with 1%nat; [ apply lt_n_Sn | apply H9 ]. unfold SFL, exp in |- *. - unfold projT1 in |- *. - case (cv h); case (exist_exp h); intros. + case (cv h); case (exist_exp h); simpl; intros. eapply UL_sequence. apply u. unfold Un_cv in |- *; intros. unfold exp_in in e. - unfold infinit_sum in e. + unfold infinite_sum in e. cut (0 < eps0 * Rabs h). intro; elim (e _ H9); intros N0 H10. exists N0; intros. @@ -871,13 +870,12 @@ Proof. assert (H0 := Alembert_exp). unfold CVN_R in |- *. intro; unfold CVN_r in |- *. - apply existT with (fun N:nat => r ^ N / INR (fact (S N))). + exists (fun N:nat => r ^ N / INR (fact (S N))). cut - (sigT - (fun l:R => + { l:R | Un_cv (fun n:nat => - sum_f_R0 (fun k:nat => Rabs (r ^ k / INR (fact (S k)))) n) l)). + sum_f_R0 (fun k:nat => Rabs (r ^ k / INR (fact (S k)))) n) l }. intro X. elim X; intros. exists x; intros. diff --git a/theories/Reals/LegacyRfield.v b/theories/Reals/LegacyRfield.v index b33274af..3f76e77a 100644 --- a/theories/Reals/LegacyRfield.v +++ b/theories/Reals/LegacyRfield.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id$ i*) +(*i $Id: LegacyRfield.v 10739 2008-04-01 14:45:20Z herbelin $ i*) Require Export Raxioms. Require Export LegacyField. diff --git a/theories/Reals/MVT.v b/theories/Reals/MVT.v index 8bb9298a..f22e49e1 100644 --- a/theories/Reals/MVT.v +++ b/theories/Reals/MVT.v @@ -6,12 +6,13 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: MVT.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: MVT.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. Require Import Ranalysis1. -Require Import Rtopology. Open Local Scope R_scope. +Require Import Rtopology. +Open Local Scope R_scope. (* The Mean Value Theorem *) Theorem MVT : @@ -189,7 +190,7 @@ Proof. intros; apply derivable_pt_id. intros; apply derivable_continuous_pt; apply X; assumption. intros; elim H1; intros; apply X; split; left; assumption. - intros; unfold derivable_pt in |- *; apply existT with (f' c); apply H0; + intros; unfold derivable_pt in |- *; exists (f' c); apply H0; apply H1. Qed. @@ -695,11 +696,11 @@ Proof. unfold antiderivative in |- *; intros; elim H; clear H; intros; elim H0; clear H0; intros H0 _; exists (g1 a - g2 a); intros; assert (H3 : forall x:R, a <= x <= b -> derivable_pt g1 x). - intros; unfold derivable_pt in |- *; apply existT with (f x0); elim (H x0 H3); + intros; unfold derivable_pt in |- *; exists (f x0); elim (H x0 H3); intros; eapply derive_pt_eq_1; symmetry in |- *; apply H4. assert (H4 : forall x:R, a <= x <= b -> derivable_pt g2 x). - intros; unfold derivable_pt in |- *; apply existT with (f x0); + intros; unfold derivable_pt in |- *; exists (f x0); elim (H0 x0 H4); intros; eapply derive_pt_eq_1; symmetry in |- *; apply H5. assert (H5 : forall x:R, a < x < b -> derivable_pt (g1 - g2) x). diff --git a/theories/Reals/NewtonInt.v b/theories/Reals/NewtonInt.v index 306d5ac4..47ae149e 100644 --- a/theories/Reals/NewtonInt.v +++ b/theories/Reals/NewtonInt.v @@ -6,32 +6,31 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: NewtonInt.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: NewtonInt.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. Require Import SeqSeries. Require Import Rtrigo. -Require Import Ranalysis. Open Local Scope R_scope. +Require Import Ranalysis. +Open Local Scope R_scope. (*******************************************) (* Newton's Integral *) (*******************************************) Definition Newton_integrable (f:R -> R) (a b:R) : Type := - sigT (fun g:R -> R => antiderivative f g a b \/ antiderivative f g b a). + { g:R -> R | antiderivative f g a b \/ antiderivative f g b a }. Definition NewtonInt (f:R -> R) (a b:R) (pr:Newton_integrable f a b) : R := - let g := match pr with - | existT a b => a - end in g b - g a. + let (g,_) := pr in g b - g a. (* If f is differentiable, then f' is Newton integrable (Tautology ?) *) Lemma FTCN_step1 : forall (f:Differential) (a b:R), Newton_integrable (fun x:R => derive_pt f x (cond_diff f x)) a b. Proof. - intros f a b; unfold Newton_integrable in |- *; apply existT with (d1 f); + intros f a b; unfold Newton_integrable in |- *; exists (d1 f); unfold antiderivative in |- *; intros; case (Rle_dec a b); intro; [ left; split; [ intros; exists (cond_diff f x); reflexivity | assumption ] @@ -52,7 +51,7 @@ Qed. Lemma NewtonInt_P1 : forall (f:R -> R) (a:R), Newton_integrable f a a. Proof. intros f a; unfold Newton_integrable in |- *; - apply existT with (fct_cte (f a) * id)%F; left; + exists (fct_cte (f a) * id)%F; left; unfold antiderivative in |- *; split. intros; assert (H1 : derivable_pt (fct_cte (f a) * id) x). apply derivable_pt_mult. @@ -82,7 +81,7 @@ Lemma NewtonInt_P3 : Newton_integrable f b a. Proof. unfold Newton_integrable in |- *; intros; elim X; intros g H; - apply existT with g; tauto. + exists g; tauto. Defined. (* $\int_a^b f = -\int_b^a f$ *) @@ -94,7 +93,7 @@ Proof. unfold NewtonInt in |- *; case (NewtonInt_P3 f a b - (existT + (exist (fun g:R -> R => antiderivative f g a b \/ antiderivative f g b a) x p)). intros; elim o; intro. @@ -112,7 +111,7 @@ Proof. unfold NewtonInt in |- *; case (NewtonInt_P3 f a b - (existT + (exist (fun g:R -> R => antiderivative f g a b \/ antiderivative f g b a) x p)); intros; elim o; intro. assert (H1 := antiderivative_Ucte f x x0 b a H H0); elim H1; intros; @@ -325,7 +324,7 @@ Proof. | left _ => F0 x | right _ => F1 x + (F0 b - F1 b) end) x). - unfold derivable_pt in |- *; apply existT with (f x); apply H7. + unfold derivable_pt in |- *; exists (f x); apply H7. exists H8; symmetry in |- *; apply derive_pt_eq_0; apply H7. assert (H5 : a <= x <= b). split; [ assumption | right; assumption ]. @@ -370,7 +369,7 @@ Proof. | left _ => F0 x | right _ => F1 x + (F0 b - F1 b) end) x). - unfold derivable_pt in |- *; apply existT with (f x); apply H13. + unfold derivable_pt in |- *; exists (f x); apply H13. exists H14; symmetry in |- *; apply derive_pt_eq_0; apply H13. assert (H5 : b <= x <= c). split; [ left; assumption | assumption ]. @@ -417,7 +416,7 @@ Proof. | left _ => F0 x | right _ => F1 x + (F0 b - F1 b) end) x). - unfold derivable_pt in |- *; apply existT with (f x); apply H7. + unfold derivable_pt in |- *; exists (f x); apply H7. exists H8; symmetry in |- *; apply derive_pt_eq_0; apply H7. Qed. @@ -482,7 +481,7 @@ Proof. match Rle_dec x b with | left _ => F0 x | right _ => F1 x + (F0 b - F1 b) - end); apply existT with g; left; unfold g in |- *; + end); exists g; left; unfold g in |- *; apply antiderivative_P2. elim H0; intro. assumption. @@ -508,7 +507,7 @@ Proof. elim s0; intro. (* a match Rle_dec x b with | left _ => F0 x @@ -526,7 +525,7 @@ Proof. (* ac *) case (total_order_T a c); intro. elim s0; intro. - unfold Newton_integrable in |- *; apply existT with F0. + unfold Newton_integrable in |- *; exists F0. left. elim H1; intro. unfold antiderivative in H; elim H; clear H; intros _ H. @@ -540,7 +539,7 @@ Proof. unfold antiderivative in H2; elim H2; clear H2; intros _ H2. elim (Rlt_irrefl _ (Rle_lt_trans _ _ _ H2 a0)). rewrite b0; apply NewtonInt_P1. - unfold Newton_integrable in |- *; apply existT with F1. + unfold Newton_integrable in |- *; exists F1. right. elim H1; intro. unfold antiderivative in H; elim H; clear H; intros _ H. @@ -560,7 +559,7 @@ Proof. (* a>b & b R -> R) (f:R -> R) (x:R) (** Normal convergence *) Definition CVN_r (fn:nat -> R -> R) (r:posreal) : Type := - sigT - (fun An:nat -> R => - sigT - (fun l:R => + { An:nat -> R & + { l:R | Un_cv (fun n:nat => sum_f_R0 (fun k:nat => Rabs (An k)) n) l /\ - (forall (n:nat) (y:R), Boule 0 r y -> Rabs (fn n y) <= An n))). + (forall (n:nat) (y:R), Boule 0 r y -> Rabs (fn n y) <= An n) } }. Definition CVN_R (fn:nat -> R -> R) : Type := forall r:posreal, CVN_r fn r. Definition SFL (fn:nat -> R -> R) - (cv:forall x:R, sigT (fun l:R => Un_cv (fun N:nat => SP fn N x) l)) - (y:R) : R := match cv y with - | existT a b => a - end. + (cv:forall x:R, { l:R | Un_cv (fun N:nat => SP fn N x) l }) + (y:R) : R := let (a,_) := cv y in a. (** In a complete space, normal convergence implies uniform convergence *) Lemma CVN_CVU : forall (fn:nat -> R -> R) - (cv:forall x:R, sigT (fun l:R => Un_cv (fun N:nat => SP fn N x) l)) + (cv:forall x:R, {l:R | Un_cv (fun N:nat => SP fn N x) l }) (r:posreal), CVN_r fn r -> CVU (fun n:nat => SP fn n) (SFL fn cv) 0 r. Proof. intros; unfold CVU in |- *; intros. @@ -193,7 +190,7 @@ Qed. (** Continuity and normal convergence *) Lemma SFL_continuity_pt : forall (fn:nat -> R -> R) - (cv:forall x:R, sigT (fun l:R => Un_cv (fun N:nat => SP fn N x) l)) + (cv:forall x:R, { l:R | Un_cv (fun N:nat => SP fn N x) l }) (r:posreal), CVN_r fn r -> (forall (n:nat) (y:R), Boule 0 r y -> continuity_pt (fn n) y) -> @@ -210,7 +207,7 @@ Qed. Lemma SFL_continuity : forall (fn:nat -> R -> R) - (cv:forall x:R, sigT (fun l:R => Un_cv (fun N:nat => SP fn N x) l)), + (cv:forall x:R, { l:R | Un_cv (fun N:nat => SP fn N x) l }), CVN_R fn -> (forall n:nat, continuity (fn n)) -> continuity (SFL fn cv). Proof. intros; unfold continuity in |- *; intro. @@ -229,7 +226,7 @@ Qed. (** As R is complete, normal convergence implies that (fn) is simply-uniformly convergent *) Lemma CVN_R_CVS : forall fn:nat -> R -> R, - CVN_R fn -> forall x:R, sigT (fun l:R => Un_cv (fun N:nat => SP fn N x) l). + CVN_R fn -> forall x:R, { l:R | Un_cv (fun N:nat => SP fn N x) l }. Proof. intros; apply R_complete. unfold SP in |- *; set (An := fun N:nat => fn N x). @@ -248,7 +245,7 @@ Proof. rewrite Rminus_0_r. pattern (Rabs x) at 1 in |- *; rewrite <- Rplus_0_r; apply Rplus_lt_compat_l; apply Rlt_0_1. - apply existT with l. + exists l. cut (forall n:nat, 0 <= Bn n). intro; unfold Un_cv in H3; unfold Un_cv in |- *; intros. elim (H3 _ H6); intros. diff --git a/theories/Reals/PartSum.v b/theories/Reals/PartSum.v index a8f72302..d5ae2aca 100644 --- a/theories/Reals/PartSum.v +++ b/theories/Reals/PartSum.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: PartSum.v 9551 2007-01-29 15:13:35Z bgregoir $ i*) +(*i $Id: PartSum.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. @@ -153,7 +153,7 @@ Lemma tech12 : Un_cv (fun N:nat => sum_f_R0 (fun i:nat => An i * x ^ i) N) l -> Pser An x l. Proof. - intros; unfold Pser in |- *; unfold infinit_sum in |- *; unfold Un_cv in H; + intros; unfold Pser in |- *; unfold infinite_sum in |- *; unfold Un_cv in H; assumption. Qed. @@ -218,9 +218,9 @@ Qed. (* Unicity of the limit defined by convergent series *) Lemma uniqueness_sum : forall (An:nat -> R) (l1 l2:R), - infinit_sum An l1 -> infinit_sum An l2 -> l1 = l2. + infinite_sum An l1 -> infinite_sum An l2 -> l1 = l2. Proof. - unfold infinit_sum in |- *; intros. + unfold infinite_sum in |- *; intros. case (Req_dec l1 l2); intro. assumption. cut (0 < Rabs ((l1 - l2) / 2)); [ intro | apply Rabs_pos_lt ]. @@ -450,7 +450,7 @@ Qed. (**********) Lemma cv_cauchy_1 : forall An:nat -> R, - sigT (fun l:R => Un_cv (fun N:nat => sum_f_R0 An N) l) -> + { l:R | Un_cv (fun N:nat => sum_f_R0 An N) l } -> Cauchy_crit_series An. Proof. intros An X. @@ -481,7 +481,7 @@ Qed. Lemma cv_cauchy_2 : forall An:nat -> R, Cauchy_crit_series An -> - sigT (fun l:R => Un_cv (fun N:nat => sum_f_R0 An N) l). + { l:R | Un_cv (fun N:nat => sum_f_R0 An N) l }. Proof. intros. apply R_complete. diff --git a/theories/Reals/RIneq.v b/theories/Reals/RIneq.v index 7d98a844..19bdeccd 100644 --- a/theories/Reals/RIneq.v +++ b/theories/Reals/RIneq.v @@ -6,11 +6,11 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: RIneq.v 9551 2007-01-29 15:13:35Z bgregoir $ i*) +(*i $Id: RIneq.v 10762 2008-04-06 16:57:31Z herbelin $ i*) -(***************************************************************************) -(** Basic lemmas for the classical reals numbers *) -(***************************************************************************) +(*********************************************************) +(** * Basic lemmas for the classical real numbers *) +(*********************************************************) Require Export Raxioms. Require Import Rpow_def. @@ -24,21 +24,32 @@ Open Local Scope R_scope. Implicit Type r : R. -(**************************************************************************) -(** * Relation between orders and equality *) -(**************************************************************************) +(*********************************************************) +(** ** Relation between orders and equality *) +(*********************************************************) + +(** Reflexivity of the large order *) + +Lemma Rle_refl : forall r, r <= r. +Proof. + intro; right; reflexivity. +Qed. +Hint Immediate Rle_refl: rorders. + +Lemma Rge_refl : forall r, r <= r. +Proof. exact Rle_refl. Qed. +Hint Immediate Rge_refl: rorders. + +(** Irreflexivity of the strict order *) -(**********) Lemma Rlt_irrefl : forall r, ~ r < r. Proof. generalize Rlt_asym. intuition eauto. Qed. Hint Resolve Rlt_irrefl: real. -Lemma Rle_refl : forall r, r <= r. -Proof. - intro; right; reflexivity. -Qed. +Lemma Rgt_irrefl : forall r, ~ r > r. +Proof. exact Rlt_irrefl. Qed. Lemma Rlt_not_eq : forall r1 r2, r1 < r2 -> r1 <> r2. Proof. @@ -58,7 +69,7 @@ Proof. Qed. Hint Resolve Rlt_dichotomy_converse: real. -(** Reasoning by case on equalities and order *) +(** Reasoning by case on equality and order *) (**********) Lemma Req_dec : forall r1 r2, r1 = r2 \/ r1 <> r2. @@ -80,58 +91,104 @@ Proof. intros; generalize (total_order_T r1 r2); tauto. Qed. +(*********************************************************) +(** ** Relating [<], [>], [<=] and [>=] *) +(*********************************************************) + +(*********************************************************) +(** ** Order *) +(*********************************************************) -(*********************************************************************************) -(** * Order Lemma : relating [<], [>], [<=] and [>=] *) -(*********************************************************************************) +(** *** Relating strict and large orders *) -(**********) Lemma Rlt_le : forall r1 r2, r1 < r2 -> r1 <= r2. Proof. intros; red in |- *; tauto. Qed. Hint Resolve Rlt_le: real. +Lemma Rgt_ge : forall r1 r2, r1 > r2 -> r1 >= r2. +Proof. + intros; red; tauto. +Qed. + (**********) Lemma Rle_ge : forall r1 r2, r1 <= r2 -> r2 >= r1. Proof. destruct 1; red in |- *; auto with real. Qed. - Hint Immediate Rle_ge: real. +Hint Resolve Rle_ge: rorders. -(**********) Lemma Rge_le : forall r1 r2, r1 >= r2 -> r2 <= r1. Proof. destruct 1; red in |- *; auto with real. Qed. - Hint Resolve Rge_le: real. +Hint Immediate Rge_le: rorders. + +(**********) +Lemma Rlt_gt : forall r1 r2, r1 < r2 -> r2 > r1. +Proof. + trivial. +Qed. +Hint Resolve Rlt_gt: rorders. + +Lemma Rgt_lt : forall r1 r2, r1 > r2 -> r2 < r1. +Proof. + trivial. +Qed. +Hint Immediate Rgt_lt: rorders. (**********) + Lemma Rnot_le_lt : forall r1 r2, ~ r1 <= r2 -> r2 < r1. Proof. intros r1 r2; generalize (Rtotal_order r1 r2); unfold Rle in |- *; tauto. Qed. - Hint Immediate Rnot_le_lt: real. +Lemma Rnot_ge_gt : forall r1 r2, ~ r1 >= r2 -> r2 > r1. +Proof. intros; red; apply Rnot_le_lt. auto with real. Qed. + +Lemma Rnot_le_gt : forall r1 r2, ~ r1 <= r2 -> r1 > r2. +Proof. intros; red; apply Rnot_le_lt. auto with real. Qed. + Lemma Rnot_ge_lt : forall r1 r2, ~ r1 >= r2 -> r1 < r2. +Proof. intros; apply Rnot_le_lt. auto with real. Qed. + +Lemma Rnot_lt_le : forall r1 r2, ~ r1 < r2 -> r2 <= r1. Proof. - intros; apply Rnot_le_lt; auto with real. + intros r1 r2 H; destruct (Rtotal_order r1 r2) as [ | [ H0 | H0 ] ]. + contradiction. subst; auto with rorders. auto with real. Qed. +Lemma Rnot_gt_le : forall r1 r2, ~ r1 > r2 -> r1 <= r2. +Proof. auto using Rnot_lt_le with real. Qed. + +Lemma Rnot_gt_ge : forall r1 r2, ~ r1 > r2 -> r2 >= r1. +Proof. intros; eauto using Rnot_lt_le with rorders. Qed. + +Lemma Rnot_lt_ge : forall r1 r2, ~ r1 < r2 -> r1 >= r2. +Proof. eauto using Rnot_gt_ge with rorders. Qed. + (**********) Lemma Rlt_not_le : forall r1 r2, r2 < r1 -> ~ r1 <= r2. Proof. generalize Rlt_asym Rlt_dichotomy_converse; unfold Rle in |- *. intuition eauto 3. Qed. +Hint Immediate Rlt_not_le: real. Lemma Rgt_not_le : forall r1 r2, r1 > r2 -> ~ r1 <= r2. -Proof Rlt_not_le. +Proof. exact Rlt_not_le. Qed. -Hint Immediate Rlt_not_le: real. +Lemma Rlt_not_ge : forall r1 r2, r1 < r2 -> ~ r1 >= r2. +Proof. red; intros; eapply Rlt_not_le; eauto with real. Qed. +Hint Immediate Rlt_not_ge: real. + +Lemma Rgt_not_ge : forall r1 r2, r2 > r1 -> ~ r1 >= r2. +Proof. exact Rlt_not_ge. Qed. Lemma Rle_not_lt : forall r1 r2, r2 <= r1 -> ~ r1 < r2. Proof. @@ -139,13 +196,14 @@ Proof. unfold Rle in |- *; intuition. Qed. -(**********) -Lemma Rlt_not_ge : forall r1 r2, r1 < r2 -> ~ r1 >= r2. -Proof. - generalize Rlt_not_le. unfold Rle, Rge in |- *. intuition eauto 3. -Qed. +Lemma Rge_not_lt : forall r1 r2, r1 >= r2 -> ~ r1 < r2. +Proof. intros; apply Rle_not_lt; auto with real. Qed. -Hint Immediate Rlt_not_ge: real. +Lemma Rle_not_gt : forall r1 r2, r1 <= r2 -> ~ r1 > r2. +Proof. do 2 intro; apply Rle_not_lt. Qed. + +Lemma Rge_not_gt : forall r1 r2, r2 >= r1 -> ~ r1 > r2. +Proof. do 2 intro; apply Rge_not_lt. Qed. (**********) Lemma Req_le : forall r1 r2, r1 = r2 -> r1 <= r2. @@ -172,25 +230,51 @@ Proof. Qed. Hint Immediate Req_ge_sym: real. +(** *** Asymmetry *) + +(** Remark: [Rlt_asym] is an axiom *) + +Lemma Rgt_asym : forall r1 r2:R, r1 > r2 -> ~ r2 > r1. +Proof. do 2 intro; apply Rlt_asym. Qed. + +(** *** Antisymmetry *) + Lemma Rle_antisym : forall r1 r2, r1 <= r2 -> r2 <= r1 -> r1 = r2. Proof. intros r1 r2; generalize (Rlt_asym r1 r2); unfold Rle in |- *; intuition. Qed. Hint Resolve Rle_antisym: real. +Lemma Rge_antisym : forall r1 r2, r1 >= r2 -> r2 >= r1 -> r1 = r2. +Proof. auto with real. Qed. + (**********) Lemma Rle_le_eq : forall r1 r2, r1 <= r2 /\ r2 <= r1 <-> r1 = r2. Proof. intuition. Qed. +Lemma Rge_ge_eq : forall r1 r2, r1 >= r2 /\ r2 >= r1 <-> r1 = r2. +Proof. + intuition. +Qed. + +(** *** Compatibility with equality *) + Lemma Rlt_eq_compat : forall r1 r2 r3 r4, r1 = r2 -> r2 < r4 -> r4 = r3 -> r1 < r3. Proof. intros x x' y y'; intros; replace x with x'; replace y with y'; assumption. Qed. -(**********) +Lemma Rgt_eq_compat : + forall r1 r2 r3 r4, r1 = r2 -> r2 > r4 -> r4 = r3 -> r1 > r3. +Proof. intros; red; apply Rlt_eq_compat with (r2:=r4) (r4:=r2); auto. Qed. + +(** *** Transitivity *) + +(** Remark: [Rlt_trans] is an axiom *) + Lemma Rle_trans : forall r1 r2 r3, r1 <= r2 -> r2 <= r3 -> r1 <= r3. Proof. generalize trans_eq Rlt_trans Rlt_eq_compat. @@ -198,6 +282,12 @@ Proof. intuition eauto 2. Qed. +Lemma Rge_trans : forall r1 r2 r3, r1 >= r2 -> r2 >= r3 -> r1 >= r3. +Proof. eauto using Rle_trans with rorders. Qed. + +Lemma Rgt_trans : forall r1 r2 r3, r1 > r2 -> r2 > r3 -> r1 > r3. +Proof. eauto using Rlt_trans with rorders. Qed. + (**********) Lemma Rle_lt_trans : forall r1 r2 r3, r1 <= r2 -> r2 < r3 -> r1 < r3. Proof. @@ -206,21 +296,25 @@ Proof. intuition eauto 2. Qed. -(**********) Lemma Rlt_le_trans : forall r1 r2 r3, r1 < r2 -> r2 <= r3 -> r1 < r3. Proof. generalize Rlt_trans Rlt_eq_compat; unfold Rle in |- *; intuition eauto 2. Qed. +Lemma Rge_gt_trans : forall r1 r2 r3, r1 >= r2 -> r2 > r3 -> r1 > r3. +Proof. eauto using Rlt_le_trans with rorders. Qed. + +Lemma Rgt_ge_trans : forall r1 r2 r3, r1 > r2 -> r2 >= r3 -> r1 > r3. +Proof. eauto using Rle_lt_trans with rorders. Qed. + +(** *** (Classical) decidability *) -(** Decidability of the order *) Lemma Rlt_dec : forall r1 r2, {r1 < r2} + {~ r1 < r2}. Proof. intros; generalize (total_order_T r1 r2) (Rlt_dichotomy_converse r1 r2); intuition. Qed. -(**********) Lemma Rle_dec : forall r1 r2, {r1 <= r2} + {~ r1 <= r2}. Proof. intros r1 r2. @@ -228,28 +322,44 @@ Proof. intuition eauto 4 with real. Qed. -(**********) Lemma Rgt_dec : forall r1 r2, {r1 > r2} + {~ r1 > r2}. -Proof. - intros; unfold Rgt in |- *; intros; apply Rlt_dec. -Qed. +Proof. do 2 intro; apply Rlt_dec. Qed. -(**********) Lemma Rge_dec : forall r1 r2, {r1 >= r2} + {~ r1 >= r2}. +Proof. intros; edestruct Rle_dec; [left|right]; eauto with rorders. Qed. + +Lemma Rlt_le_dec : forall r1 r2, {r1 < r2} + {r2 <= r1}. Proof. - intros; generalize (Rle_dec r2 r1); intuition. + intros; generalize (total_order_T r1 r2); intuition. Qed. -Lemma Rlt_le_dec : forall r1 r2, {r1 < r2} + {r2 <= r1}. +Lemma Rgt_ge_dec : forall r1 r2, {r1 > r2} + {r2 >= r1}. +Proof. intros; edestruct Rlt_le_dec; [left|right]; eauto with rorders. Qed. + +Lemma Rle_lt_dec : forall r1 r2, {r1 <= r2} + {r2 < r1}. Proof. intros; generalize (total_order_T r1 r2); intuition. Qed. +Lemma Rge_gt_dec : forall r1 r2, {r1 >= r2} + {r2 > r1}. +Proof. intros; edestruct Rle_lt_dec; [left|right]; eauto with rorders. Qed. + +Lemma Rlt_or_le : forall r1 r2, r1 < r2 \/ r2 <= r1. +Proof. + intros n m; elim (Rle_lt_dec m n); auto with real. +Qed. + +Lemma Rgt_or_ge : forall r1 r2, r1 > r2 \/ r2 >= r1. +Proof. intros; edestruct Rlt_or_le; [left|right]; eauto with rorders. Qed. + Lemma Rle_or_lt : forall r1 r2, r1 <= r2 \/ r2 < r1. Proof. intros n m; elim (Rlt_le_dec m n); auto with real. Qed. +Lemma Rge_or_gt : forall r1 r2, r1 >= r2 \/ r2 > r1. +Proof. intros; edestruct Rle_or_lt; [left|right]; eauto with rorders. Qed. + Lemma Rle_lt_or_eq_dec : forall r1 r2, r1 <= r2 -> {r1 < r2} + {r1 = r2}. Proof. intros r1 r2 H; generalize (total_order_T r1 r2); intuition. @@ -262,19 +372,11 @@ Proof. intros n m p q; intros; generalize (Rlt_le_dec m q); intuition. Qed. -(****************************************************************) -(** * Field Lemmas *) -(* This part contains lemma involving the Fields operations *) -(****************************************************************) (*********************************************************) -(** ** Addition *) +(** ** Addition *) (*********************************************************) -Lemma Rplus_ne : forall r, r + 0 = r /\ 0 + r = r. -Proof. - split; ring. -Qed. -Hint Resolve Rplus_ne: real v62. +(** Remark: [Rplus_0_l] is an axiom *) Lemma Rplus_0_r : forall r, r + 0 = r. Proof. @@ -282,14 +384,22 @@ Proof. Qed. Hint Resolve Rplus_0_r: real. +Lemma Rplus_ne : forall r, r + 0 = r /\ 0 + r = r. +Proof. + split; ring. +Qed. +Hint Resolve Rplus_ne: real v62. + (**********) + +(** Remark: [Rplus_opp_r] is an axiom *) + Lemma Rplus_opp_l : forall r, - r + r = 0. Proof. intro; ring. Qed. Hint Resolve Rplus_opp_l: real. - (**********) Lemma Rplus_opp_r_uniq : forall r1 r2, r1 + r2 = 0 -> r2 = - r1. Proof. @@ -298,7 +408,6 @@ Proof. rewrite Rplus_assoc; rewrite H; ring. Qed. -(*i New i*) Hint Resolve (f_equal (A:=R)): real. Lemma Rplus_eq_compat_l : forall r r1 r2, r1 = r2 -> r + r1 = r + r2. @@ -325,9 +434,31 @@ Proof. intros r b; pattern r at 2 in |- *; replace r with (r + 0); eauto with real. Qed. -(***********************************************************) -(** ** Multiplication *) -(***********************************************************) +(***********) +Lemma Rplus_eq_0_l : + forall r1 r2, 0 <= r1 -> 0 <= r2 -> r1 + r2 = 0 -> r1 = 0. +Proof. + intros a b H [H0| H0] H1; auto with real. + absurd (0 < a + b). + rewrite H1; auto with real. + apply Rle_lt_trans with (a + 0). + rewrite Rplus_0_r in |- *; assumption. + auto using Rplus_lt_compat_l with real. + rewrite <- H0, Rplus_0_r in H1; assumption. +Qed. + +Lemma Rplus_eq_R0 : + forall r1 r2, 0 <= r1 -> 0 <= r2 -> r1 + r2 = 0 -> r1 = 0 /\ r2 = 0. +Proof. + intros a b; split. + apply Rplus_eq_0_l with b; auto with real. + apply Rplus_eq_0_l with a; auto with real. + rewrite Rplus_comm; auto with real. +Qed. + +(*********************************************************) +(** ** Multiplication *) +(*********************************************************) (**********) Lemma Rinv_r : forall r, r <> 0 -> r * / r = 1. @@ -340,13 +471,13 @@ Lemma Rinv_l_sym : forall r, r <> 0 -> 1 = / r * r. Proof. intros; field; trivial. Qed. +Hint Resolve Rinv_l_sym: real. Lemma Rinv_r_sym : forall r, r <> 0 -> 1 = r * / r. Proof. intros; field; trivial. Qed. -Hint Resolve Rinv_l_sym Rinv_r_sym: real. - +Hint Resolve Rinv_r_sym: real. (**********) Lemma Rmult_0_r : forall r, r * 0 = 0. @@ -382,7 +513,7 @@ Proof. auto with real. Qed. -(*i OLD i*)Hint Resolve Rmult_eq_compat_l: v62. +(*i Old i*)Hint Resolve Rmult_eq_compat_l: v62. (**********) Lemma Rmult_eq_reg_l : forall r r1 r2, r * r1 = r * r2 -> r <> 0 -> r1 = r2. @@ -423,7 +554,6 @@ Proof. auto with real. Qed. - (**********) Lemma Rmult_neq_0_reg : forall r1 r2, r1 * r2 <> 0 -> r1 <> 0 /\ r2 <> 0. Proof. @@ -439,6 +569,10 @@ Proof. Qed. Hint Resolve Rmult_integral_contrapositive: real. +Lemma Rmult_integral_contrapositive_currified : + forall r1 r2, r1 <> 0 -> r2 <> 0 -> r1 * r2 <> 0. +Proof. auto using Rmult_integral_contrapositive. Qed. + (**********) Lemma Rmult_plus_distr_r : forall r1 r2 r3, (r1 + r2) * r3 = r1 * r3 + r2 * r3. @@ -446,11 +580,15 @@ Proof. intros; ring. Qed. -(** ** Square function *) +(*********************************************************) +(** ** Square function *) +(*********************************************************) (***********) Definition Rsqr r : R := r * r. +Notation "r ²" := (Rsqr r) (at level 1, format "r ²") : R_scope. + (***********) Lemma Rsqr_0 : Rsqr 0 = 0. unfold Rsqr in |- *; auto with real. @@ -462,7 +600,7 @@ Lemma Rsqr_0_uniq : forall r, Rsqr r = 0 -> r = 0. Qed. (*********************************************************) -(** ** Opposite *) +(** ** Opposite *) (*********************************************************) (**********) @@ -509,8 +647,9 @@ Proof. Qed. Hint Resolve Ropp_plus_distr: real. - -(** ** Opposite and multiplication *) +(*********************************************************) +(** ** Opposite and multiplication *) +(*********************************************************) Lemma Ropp_mult_distr_l_reverse : forall r1 r2, - r1 * r2 = - (r1 * r2). Proof. @@ -530,7 +669,9 @@ Proof. intros; ring. Qed. -(** ** Substraction *) +(*********************************************************) +(** ** Substraction *) +(*********************************************************) Lemma Rminus_0_r : forall r, r - 0 = r. Proof. @@ -555,7 +696,6 @@ Lemma Ropp_minus_distr' : forall r1 r2, - (r2 - r1) = r1 - r2. Proof. intros; ring. Qed. -Hint Resolve Ropp_minus_distr': real. (**********) Lemma Rminus_diag_eq : forall r1 r2, r1 = r2 -> r1 - r2 = 0. @@ -605,7 +745,6 @@ Proof. Qed. Hint Resolve Rminus_not_eq_right: real. - (**********) Lemma Rmult_minus_distr_l : forall r1 r2 r3, r1 * (r2 - r3) = r1 * r2 - r1 * r3. @@ -613,7 +752,10 @@ Proof. intros; ring. Qed. -(** ** Inverse *) +(*********************************************************) +(** ** Inverse *) +(*********************************************************) + Lemma Rinv_1 : / 1 = 1. Proof. field. @@ -677,28 +819,28 @@ Proof. ring. Qed. -(** * Field operations and order *) +(*********************************************************) +(** ** Order and addition *) +(*********************************************************) + +(** *** Compatibility *) -(** ** Order and addition *) +(** Remark: [Rplus_lt_compat_l] is an axiom *) +Lemma Rplus_gt_compat_l : forall r r1 r2, r1 > r2 -> r + r1 > r + r2. +Proof. eauto using Rplus_lt_compat_l with rorders. Qed. +Hint Resolve Rplus_gt_compat_l: real. + +(**********) Lemma Rplus_lt_compat_r : forall r r1 r2, r1 < r2 -> r1 + r < r2 + r. Proof. intros. rewrite (Rplus_comm r1 r); rewrite (Rplus_comm r2 r); auto with real. Qed. - Hint Resolve Rplus_lt_compat_r: real. -(**********) -Lemma Rplus_lt_reg_r : forall r r1 r2, r + r1 < r + r2 -> r1 < r2. -Proof. - intros; cut (- r + r + r1 < - r + r + r2). - rewrite Rplus_opp_l. - elim (Rplus_ne r1); elim (Rplus_ne r2); intros; rewrite <- H3; rewrite <- H1; - auto with zarith real. - rewrite Rplus_assoc; rewrite Rplus_assoc; - apply (Rplus_lt_compat_l (- r) (r + r1) (r + r2) H). -Qed. +Lemma Rplus_gt_compat_r : forall r r1 r2, r1 > r2 -> r1 + r > r2 + r. +Proof. do 3 intro; apply Rplus_lt_compat_r. Qed. (**********) Lemma Rplus_le_compat_l : forall r r1 r2, r1 <= r2 -> r + r1 <= r + r2. @@ -708,6 +850,10 @@ Proof. right; rewrite <- H0; auto with zarith real. Qed. +Lemma Rplus_ge_compat_l : forall r r1 r2, r1 >= r2 -> r + r1 >= r + r2. +Proof. auto using Rplus_le_compat_l with rorders. Qed. +Hint Resolve Rplus_ge_compat_l: real. + (**********) Lemma Rplus_le_compat_r : forall r r1 r2, r1 <= r2 -> r1 + r <= r2 + r. Proof. @@ -718,23 +864,8 @@ Qed. Hint Resolve Rplus_le_compat_l Rplus_le_compat_r: real. -(**********) -Lemma Rplus_le_reg_l : forall r r1 r2, r + r1 <= r + r2 -> r1 <= r2. -Proof. - unfold Rle in |- *; intros; elim H; intro. - left; apply (Rplus_lt_reg_r r r1 r2 H0). - right; apply (Rplus_eq_reg_l r r1 r2 H0). -Qed. - -(**********) -Lemma sum_inequa_Rle_lt : - forall a x b c y d:R, - a <= x -> x < b -> c < y -> y <= d -> a + c < x + y < b + d. -Proof. - intros; split. - apply Rlt_le_trans with (a + y); auto with real. - apply Rlt_le_trans with (b + y); auto with real. -Qed. +Lemma Rplus_ge_compat_r : forall r r1 r2, r1 >= r2 -> r1 + r >= r2 + r. +Proof. auto using Rplus_le_compat_r with rorders. Qed. (*********) Lemma Rplus_lt_compat : @@ -742,12 +873,22 @@ Lemma Rplus_lt_compat : Proof. intros; apply Rlt_trans with (r2 + r3); auto with real. Qed. +Hint Immediate Rplus_lt_compat: real. Lemma Rplus_le_compat : forall r1 r2 r3 r4, r1 <= r2 -> r3 <= r4 -> r1 + r3 <= r2 + r4. Proof. intros; apply Rle_trans with (r2 + r3); auto with real. Qed. +Hint Immediate Rplus_le_compat: real. + +Lemma Rplus_gt_compat : + forall r1 r2 r3 r4, r1 > r2 -> r3 > r4 -> r1 + r3 > r2 + r4. +Proof. auto using Rplus_lt_compat with rorders. Qed. + +Lemma Rplus_ge_compat : + forall r1 r2 r3 r4, r1 >= r2 -> r3 >= r4 -> r1 + r3 >= r2 + r4. +Proof. auto using Rplus_le_compat with rorders. Qed. (*********) Lemma Rplus_lt_le_compat : @@ -756,81 +897,184 @@ Proof. intros; apply Rlt_le_trans with (r2 + r3); auto with real. Qed. -(*********) Lemma Rplus_le_lt_compat : forall r1 r2 r3 r4, r1 <= r2 -> r3 < r4 -> r1 + r3 < r2 + r4. Proof. intros; apply Rle_lt_trans with (r2 + r3); auto with real. Qed. -Hint Immediate Rplus_lt_compat Rplus_le_compat Rplus_lt_le_compat - Rplus_le_lt_compat: real. +Hint Immediate Rplus_lt_le_compat Rplus_le_lt_compat: real. -(** ** Order and Opposite *) +Lemma Rplus_gt_ge_compat : + forall r1 r2 r3 r4, r1 > r2 -> r3 >= r4 -> r1 + r3 > r2 + r4. +Proof. auto using Rplus_lt_le_compat with rorders. Qed. + +Lemma Rplus_ge_gt_compat : + forall r1 r2 r3 r4, r1 >= r2 -> r3 > r4 -> r1 + r3 > r2 + r4. +Proof. auto using Rplus_le_lt_compat with rorders. Qed. (**********) -Lemma Ropp_gt_lt_contravar : forall r1 r2, r1 > r2 -> - r1 < - r2. +Lemma Rplus_lt_0_compat : forall r1 r2, 0 < r1 -> 0 < r2 -> 0 < r1 + r2. Proof. - unfold Rgt in |- *; intros. - apply (Rplus_lt_reg_r (r2 + r1)). - replace (r2 + r1 + - r1) with r2. - replace (r2 + r1 + - r2) with r1. - trivial. - ring. - ring. + intros x y; intros; apply Rlt_trans with x; + [ assumption + | pattern x at 1 in |- *; rewrite <- (Rplus_0_r x); apply Rplus_lt_compat_l; + assumption ]. Qed. -Hint Resolve Ropp_gt_lt_contravar. -(**********) -Lemma Ropp_lt_gt_contravar : forall r1 r2, r1 < r2 -> - r1 > - r2. +Lemma Rplus_le_lt_0_compat : forall r1 r2, 0 <= r1 -> 0 < r2 -> 0 < r1 + r2. Proof. - unfold Rgt in |- *; auto with real. + intros x y; intros; apply Rle_lt_trans with x; + [ assumption + | pattern x at 1 in |- *; rewrite <- (Rplus_0_r x); apply Rplus_lt_compat_l; + assumption ]. Qed. -Hint Resolve Ropp_lt_gt_contravar: real. -Lemma Ropp_lt_cancel : forall r1 r2, - r2 < - r1 -> r1 < r2. +Lemma Rplus_lt_le_0_compat : forall r1 r2, 0 < r1 -> 0 <= r2 -> 0 < r1 + r2. Proof. - intros x y H'. - rewrite <- (Ropp_involutive x); rewrite <- (Ropp_involutive y); - auto with real. + intros x y; intros; rewrite <- Rplus_comm; apply Rplus_le_lt_0_compat; + assumption. Qed. -Hint Immediate Ropp_lt_cancel: real. -Lemma Ropp_lt_contravar : forall r1 r2, r2 < r1 -> - r1 < - r2. +Lemma Rplus_le_le_0_compat : forall r1 r2, 0 <= r1 -> 0 <= r2 -> 0 <= r1 + r2. Proof. - auto with real. + intros x y; intros; apply Rle_trans with x; + [ assumption + | pattern x at 1 in |- *; rewrite <- (Rplus_0_r x); apply Rplus_le_compat_l; + assumption ]. Qed. -Hint Resolve Ropp_lt_contravar: real. (**********) -Lemma Ropp_le_ge_contravar : forall r1 r2, r1 <= r2 -> - r1 >= - r2. +Lemma sum_inequa_Rle_lt : + forall a x b c y d:R, + a <= x -> x < b -> c < y -> y <= d -> a + c < x + y < b + d. Proof. - unfold Rge in |- *; intros r1 r2 [H| H]; auto with real. + intros; split. + apply Rlt_le_trans with (a + y); auto with real. + apply Rlt_le_trans with (b + y); auto with real. Qed. -Hint Resolve Ropp_le_ge_contravar: real. -Lemma Ropp_le_cancel : forall r1 r2, - r2 <= - r1 -> r1 <= r2. +(** *** Cancellation *) + +Lemma Rplus_lt_reg_r : forall r r1 r2, r + r1 < r + r2 -> r1 < r2. Proof. - intros x y H. - elim H; auto with real. - intro H1; rewrite <- (Ropp_involutive x); rewrite <- (Ropp_involutive y); - rewrite H1; auto with real. + intros; cut (- r + r + r1 < - r + r + r2). + rewrite Rplus_opp_l. + elim (Rplus_ne r1); elim (Rplus_ne r2); intros; rewrite <- H3; rewrite <- H1; + auto with zarith real. + rewrite Rplus_assoc; rewrite Rplus_assoc; + apply (Rplus_lt_compat_l (- r) (r + r1) (r + r2) H). Qed. -Hint Immediate Ropp_le_cancel: real. -Lemma Ropp_le_contravar : forall r1 r2, r2 <= r1 -> - r1 <= - r2. +Lemma Rplus_le_reg_l : forall r r1 r2, r + r1 <= r + r2 -> r1 <= r2. Proof. - intros r1 r2 H; elim H; auto with real. + unfold Rle in |- *; intros; elim H; intro. + left; apply (Rplus_lt_reg_r r r1 r2 H0). + right; apply (Rplus_eq_reg_l r r1 r2 H0). Qed. -Hint Resolve Ropp_le_contravar: real. -(**********) +Lemma Rplus_gt_reg_l : forall r r1 r2, r + r1 > r + r2 -> r1 > r2. +Proof. + unfold Rgt in |- *; intros; apply (Rplus_lt_reg_r r r2 r1 H). +Qed. + +Lemma Rplus_ge_reg_l : forall r r1 r2, r + r1 >= r + r2 -> r1 >= r2. +Proof. + intros; apply Rle_ge; apply Rplus_le_reg_l with r; auto with real. +Qed. + +(**********) +Lemma Rplus_le_reg_pos_r : + forall r1 r2 r3, 0 <= r2 -> r1 + r2 <= r3 -> r1 <= r3. +Proof. + intros x y z; intros; apply Rle_trans with (x + y); + [ pattern x at 1; rewrite <- (Rplus_0_r x); apply Rplus_le_compat_l; + assumption + | assumption ]. +Qed. + +Lemma Rplus_lt_reg_pos_r : forall r1 r2 r3, 0 <= r2 -> r1 + r2 < r3 -> r1 < r3. +Proof. + intros x y z; intros; apply Rle_lt_trans with (x + y); + [ pattern x at 1; rewrite <- (Rplus_0_r x); apply Rplus_le_compat_l; + assumption + | assumption ]. +Qed. + +Lemma Rplus_ge_reg_neg_r : + forall r1 r2 r3, 0 >= r2 -> r1 + r2 >= r3 -> r1 >= r3. +Proof. + intros x y z; intros; apply Rge_trans with (x + y); + [ pattern x at 1; rewrite <- (Rplus_0_r x); apply Rplus_ge_compat_l; + assumption + | assumption ]. +Qed. + +Lemma Rplus_gt_reg_neg_r : forall r1 r2 r3, 0 >= r2 -> r1 + r2 > r3 -> r1 > r3. +Proof. + intros x y z; intros; apply Rge_gt_trans with (x + y); + [ pattern x at 1; rewrite <- (Rplus_0_r x); apply Rplus_ge_compat_l; + assumption + | assumption ]. +Qed. + +(*********************************************************) +(** ** Order and opposite *) +(*********************************************************) + +(** *** Contravariant compatibility *) + +Lemma Ropp_gt_lt_contravar : forall r1 r2, r1 > r2 -> - r1 < - r2. +Proof. + unfold Rgt in |- *; intros. + apply (Rplus_lt_reg_r (r2 + r1)). + replace (r2 + r1 + - r1) with r2. + replace (r2 + r1 + - r2) with r1. + trivial. + ring. + ring. +Qed. +Hint Resolve Ropp_gt_lt_contravar. + +Lemma Ropp_lt_gt_contravar : forall r1 r2, r1 < r2 -> - r1 > - r2. +Proof. + unfold Rgt in |- *; auto with real. +Qed. +Hint Resolve Ropp_lt_gt_contravar: real. + +(**********) +Lemma Ropp_lt_contravar : forall r1 r2, r2 < r1 -> - r1 < - r2. +Proof. + auto with real. +Qed. +Hint Resolve Ropp_lt_contravar: real. + +Lemma Ropp_gt_contravar : forall r1 r2, r2 > r1 -> - r1 > - r2. +Proof. auto with real. Qed. + +(**********) +Lemma Ropp_le_ge_contravar : forall r1 r2, r1 <= r2 -> - r1 >= - r2. +Proof. + unfold Rge; intros r1 r2 [H| H]; auto with real. +Qed. +Hint Resolve Ropp_le_ge_contravar: real. + Lemma Ropp_ge_le_contravar : forall r1 r2, r1 >= r2 -> - r1 <= - r2. Proof. - unfold Rge in |- *; intros r1 r2 [H| H]; auto with real. + unfold Rle; intros r1 r2 [H| H]; auto with real. Qed. Hint Resolve Ropp_ge_le_contravar: real. +(**********) +Lemma Ropp_le_contravar : forall r1 r2, r2 <= r1 -> - r1 <= - r2. +Proof. + intros r1 r2 H; elim H; auto with real. +Qed. +Hint Resolve Ropp_le_contravar: real. + +Lemma Ropp_ge_contravar : forall r1 r2, r2 >= r1 -> - r1 >= - r2. +Proof. auto using Ropp_le_contravar with real. Qed. + (**********) Lemma Ropp_0_lt_gt_contravar : forall r, 0 < r -> 0 > - r. Proof. @@ -838,7 +1082,6 @@ Proof. Qed. Hint Resolve Ropp_0_lt_gt_contravar: real. -(**********) Lemma Ropp_0_gt_lt_contravar : forall r, 0 > r -> 0 < - r. Proof. intros; replace 0 with (-0); auto with real. @@ -850,13 +1093,13 @@ Lemma Ropp_lt_gt_0_contravar : forall r, r > 0 -> - r < 0. Proof. intros; rewrite <- Ropp_0; auto with real. Qed. +Hint Resolve Ropp_lt_gt_0_contravar: real. -(**********) Lemma Ropp_gt_lt_0_contravar : forall r, r < 0 -> - r > 0. Proof. intros; rewrite <- Ropp_0; auto with real. Qed. -Hint Resolve Ropp_lt_gt_0_contravar Ropp_gt_lt_0_contravar: real. +Hint Resolve Ropp_gt_lt_0_contravar: real. (**********) Lemma Ropp_0_le_ge_contravar : forall r, 0 <= r -> 0 >= - r. @@ -865,40 +1108,56 @@ Proof. Qed. Hint Resolve Ropp_0_le_ge_contravar: real. -(**********) Lemma Ropp_0_ge_le_contravar : forall r, 0 >= r -> 0 <= - r. Proof. intros; replace 0 with (-0); auto with real. Qed. Hint Resolve Ropp_0_ge_le_contravar: real. -(** ** Order and multiplication *) +(** *** Cancellation *) -Lemma Rmult_lt_compat_r : forall r r1 r2, 0 < r -> r1 < r2 -> r1 * r < r2 * r. +Lemma Ropp_lt_cancel : forall r1 r2, - r2 < - r1 -> r1 < r2. Proof. - intros; rewrite (Rmult_comm r1 r); rewrite (Rmult_comm r2 r); auto with real. + intros x y H'. + rewrite <- (Ropp_involutive x); rewrite <- (Ropp_involutive y); + auto with real. Qed. -Hint Resolve Rmult_lt_compat_r. +Hint Immediate Ropp_lt_cancel: real. -Lemma Rmult_lt_reg_l : forall r r1 r2, 0 < r -> r * r1 < r * r2 -> r1 < r2. +Lemma Ropp_gt_cancel : forall r1 r2, - r2 > - r1 -> r1 > r2. +Proof. auto using Ropp_lt_cancel with rorders. Qed. + +Lemma Ropp_le_cancel : forall r1 r2, - r2 <= - r1 -> r1 <= r2. Proof. - intros z x y H H0. - case (Rtotal_order x y); intros Eq0; auto; elim Eq0; clear Eq0; intros Eq0. - rewrite Eq0 in H0; elimtype False; apply (Rlt_irrefl (z * y)); auto. - generalize (Rmult_lt_compat_l z y x H Eq0); intro; elimtype False; - generalize (Rlt_trans (z * x) (z * y) (z * x) H0 H1); - intro; apply (Rlt_irrefl (z * x)); auto. + intros x y H. + elim H; auto with real. + intro H1; rewrite <- (Ropp_involutive x); rewrite <- (Ropp_involutive y); + rewrite H1; auto with real. Qed. +Hint Immediate Ropp_le_cancel: real. +Lemma Ropp_ge_cancel : forall r1 r2, - r2 >= - r1 -> r1 >= r2. +Proof. auto using Ropp_le_cancel with rorders. Qed. -Lemma Rmult_lt_gt_compat_neg_l : - forall r r1 r2, r < 0 -> r1 < r2 -> r * r1 > r * r2. +(*********************************************************) +(** ** Order and multiplication *) +(*********************************************************) + +(** Remark: [Rmult_lt_compat_l] is an axiom *) + +(** *** Covariant compatibility *) + +Lemma Rmult_lt_compat_r : forall r r1 r2, 0 < r -> r1 < r2 -> r1 * r < r2 * r. Proof. - intros; replace r with (- - r); auto with real. - rewrite (Ropp_mult_distr_l_reverse (- r)); - rewrite (Ropp_mult_distr_l_reverse (- r)). - apply Ropp_lt_gt_contravar; auto with real. + intros; rewrite (Rmult_comm r1 r); rewrite (Rmult_comm r2 r); auto with real. Qed. +Hint Resolve Rmult_lt_compat_r. + +Lemma Rmult_gt_compat_r : forall r r1 r2, r > 0 -> r1 > r2 -> r1 * r > r2 * r. +Proof. eauto using Rmult_lt_compat_r with rorders. Qed. + +Lemma Rmult_gt_compat_l : forall r r1 r2, r > 0 -> r1 > r2 -> r * r1 > r * r2. +Proof. eauto using Rmult_lt_compat_l with rorders. Qed. (**********) Lemma Rmult_le_compat_l : @@ -918,18 +1177,59 @@ Proof. Qed. Hint Resolve Rmult_le_compat_r: real. -Lemma Rmult_le_reg_l : forall r r1 r2, 0 < r -> r * r1 <= r * r2 -> r1 <= r2. +Lemma Rmult_ge_compat_l : + forall r r1 r2, r >= 0 -> r1 >= r2 -> r * r1 >= r * r2. +Proof. eauto using Rmult_le_compat_l with rorders. Qed. + +Lemma Rmult_ge_compat_r : + forall r r1 r2, r >= 0 -> r1 >= r2 -> r1 * r >= r2 * r. +Proof. eauto using Rmult_le_compat_r with rorders. Qed. + +(**********) +Lemma Rmult_le_compat : + forall r1 r2 r3 r4, + 0 <= r1 -> 0 <= r3 -> r1 <= r2 -> r3 <= r4 -> r1 * r3 <= r2 * r4. Proof. - intros z x y H H0; case H0; auto with real. - intros H1; apply Rlt_le. - apply Rmult_lt_reg_l with (r := z); auto. - intros H1; replace x with (/ z * (z * x)); auto with real. - replace y with (/ z * (z * y)). - rewrite H1; auto with real. - rewrite <- Rmult_assoc; rewrite Rinv_l; auto with real. - rewrite <- Rmult_assoc; rewrite Rinv_l; auto with real. + intros x y z t H' H'0 H'1 H'2. + apply Rle_trans with (r2 := x * t); auto with real. + repeat rewrite (fun x => Rmult_comm x t). + apply Rmult_le_compat_l; auto. + apply Rle_trans with z; auto. +Qed. +Hint Resolve Rmult_le_compat: real. + +Lemma Rmult_ge_compat : + forall r1 r2 r3 r4, + 0 <= r1 -> 0 <= r3 -> r1 <= r2 -> r3 <= r4 -> r1 * r3 <= r2 * r4. +Proof. auto with real rorders. Qed. + +Lemma Rmult_gt_0_lt_compat : + forall r1 r2 r3 r4, + r3 > 0 -> r2 > 0 -> r1 < r2 -> r3 < r4 -> r1 * r3 < r2 * r4. +Proof. + intros; apply Rlt_trans with (r2 * r3); auto with real. +Qed. + +(*********) +Lemma Rmult_le_0_lt_compat : + forall r1 r2 r3 r4, + 0 <= r1 -> 0 <= r3 -> r1 < r2 -> r3 < r4 -> r1 * r3 < r2 * r4. +Proof. + intros; apply Rle_lt_trans with (r2 * r3); + [ apply Rmult_le_compat_r; [ assumption | left; assumption ] + | apply Rmult_lt_compat_l; + [ apply Rle_lt_trans with r1; assumption | assumption ] ]. Qed. +(*********) +Lemma Rmult_lt_0_compat : forall r1 r2, 0 < r1 -> 0 < r2 -> 0 < r1 * r2. +Proof. intros; replace 0 with (0 * r2); auto with real. Qed. + +Lemma Rmult_gt_0_compat : forall r1 r2, r1 > 0 -> r2 > 0 -> r1 * r2 > 0. +Proof Rmult_lt_0_compat. + +(** *** Contravariant compatibility *) + Lemma Rmult_le_compat_neg_l : forall r r1 r2, r <= 0 -> r1 <= r2 -> r * r2 <= r * r1. Proof. @@ -946,35 +1246,45 @@ Proof. Qed. Hint Resolve Rmult_le_ge_compat_neg_l: real. -Lemma Rmult_le_compat : - forall r1 r2 r3 r4, - 0 <= r1 -> 0 <= r3 -> r1 <= r2 -> r3 <= r4 -> r1 * r3 <= r2 * r4. +Lemma Rmult_lt_gt_compat_neg_l : + forall r r1 r2, r < 0 -> r1 < r2 -> r * r1 > r * r2. Proof. - intros x y z t H' H'0 H'1 H'2. - apply Rle_trans with (r2 := x * t); auto with real. - repeat rewrite (fun x => Rmult_comm x t). - apply Rmult_le_compat_l; auto. - apply Rle_trans with z; auto. + intros; replace r with (- - r); auto with real. + rewrite (Ropp_mult_distr_l_reverse (- r)); + rewrite (Ropp_mult_distr_l_reverse (- r)). + apply Ropp_lt_gt_contravar; auto with real. Qed. -Hint Resolve Rmult_le_compat: real. -Lemma Rmult_gt_0_lt_compat : - forall r1 r2 r3 r4, - r3 > 0 -> r2 > 0 -> r1 < r2 -> r3 < r4 -> r1 * r3 < r2 * r4. +(** *** Cancellation *) + +Lemma Rmult_lt_reg_l : forall r r1 r2, 0 < r -> r * r1 < r * r2 -> r1 < r2. Proof. - intros; apply Rlt_trans with (r2 * r3); auto with real. + intros z x y H H0. + case (Rtotal_order x y); intros Eq0; auto; elim Eq0; clear Eq0; intros Eq0. + rewrite Eq0 in H0; elimtype False; apply (Rlt_irrefl (z * y)); auto. + generalize (Rmult_lt_compat_l z y x H Eq0); intro; elimtype False; + generalize (Rlt_trans (z * x) (z * y) (z * x) H0 H1); + intro; apply (Rlt_irrefl (z * x)); auto. Qed. -(*********) -Lemma Rmult_ge_0_gt_0_lt_compat : - forall r1 r2 r3 r4, - r3 >= 0 -> r2 > 0 -> r1 < r2 -> r3 < r4 -> r1 * r3 < r2 * r4. +Lemma Rmult_gt_reg_l : forall r r1 r2, 0 < r -> r * r1 < r * r2 -> r1 < r2. +Proof. eauto using Rmult_lt_reg_l with rorders. Qed. + +Lemma Rmult_le_reg_l : forall r r1 r2, 0 < r -> r * r1 <= r * r2 -> r1 <= r2. Proof. - intros; apply Rle_lt_trans with (r2 * r3); auto with real. + intros z x y H H0; case H0; auto with real. + intros H1; apply Rlt_le. + apply Rmult_lt_reg_l with (r := z); auto. + intros H1; replace x with (/ z * (z * x)); auto with real. + replace y with (/ z * (z * y)). + rewrite H1; auto with real. + rewrite <- Rmult_assoc; rewrite Rinv_l; auto with real. + rewrite <- Rmult_assoc; rewrite Rinv_l; auto with real. Qed. - -(** ** Order and Substractions *) +(*********************************************************) +(** ** Order and substraction *) +(*********************************************************) Lemma Rlt_minus : forall r1 r2, r1 < r2 -> r1 - r2 < 0. Proof. @@ -985,12 +1295,27 @@ Proof. Qed. Hint Resolve Rlt_minus: real. +Lemma Rgt_minus : forall r1 r2, r1 > r2 -> r1 - r2 > 0. +Proof. + intros; apply (Rplus_lt_reg_r r2). + replace (r2 + (r1 - r2)) with r1. + replace (r2 + 0) with r2; auto with real. + ring. +Qed. + (**********) Lemma Rle_minus : forall r1 r2, r1 <= r2 -> r1 - r2 <= 0. Proof. destruct 1; unfold Rle in |- *; auto with real. Qed. +Lemma Rge_minus : forall r1 r2, r1 >= r2 -> r1 - r2 >= 0. +Proof. + destruct 1. + auto using Rgt_minus, Rgt_ge. + right; auto using Rminus_diag_eq with rorders. +Qed. + (**********) Lemma Rminus_lt : forall r1 r2, r1 - r2 < 0 -> r1 < r2. Proof. @@ -999,6 +1324,14 @@ Proof. ring. Qed. +Lemma Rminus_gt : forall r1 r2, r1 - r2 > 0 -> r1 > r2. +Proof. + intros; replace r2 with (0 + r2); auto with real. + replace r1 with (r1 - r2 + r2). + apply Rplus_gt_compat_r; assumption. + ring. +Qed. + (**********) Lemma Rminus_le : forall r1 r2, r1 - r2 <= 0 -> r1 <= r2. Proof. @@ -1007,6 +1340,14 @@ Proof. ring. Qed. +Lemma Rminus_ge : forall r1 r2, r1 - r2 >= 0 -> r1 >= r2. +Proof. + intros; replace r2 with (0 + r2); auto with real. + replace r1 with (r1 - r2 + r2). + apply Rplus_ge_compat_r; assumption. + ring. +Qed. + (**********) Lemma tech_Rplus : forall r (s:R), 0 <= r -> 0 < s -> r + s <> 0. Proof. @@ -1015,8 +1356,9 @@ Proof. Qed. Hint Immediate tech_Rplus: real. - -(** ** Order and the square function *) +(*********************************************************) +(** ** Order and square function *) +(*********************************************************) Lemma Rle_0_sqr : forall r, 0 <= Rsqr r. Proof. @@ -1036,7 +1378,26 @@ Proof. Qed. Hint Resolve Rle_0_sqr Rlt_0_sqr: real. -(** ** Zero is less than one *) +(***********) +Lemma Rplus_sqr_eq_0_l : forall r1 r2, Rsqr r1 + Rsqr r2 = 0 -> r1 = 0. +Proof. + intros a b; intros; apply Rsqr_0_uniq; apply Rplus_eq_0_l with (Rsqr b); + auto with real. +Qed. + +Lemma Rplus_sqr_eq_0 : + forall r1 r2, Rsqr r1 + Rsqr r2 = 0 -> r1 = 0 /\ r2 = 0. +Proof. + intros a b; split. + apply Rplus_sqr_eq_0_l with b; auto with real. + apply Rplus_sqr_eq_0_l with a; auto with real. + rewrite Rplus_comm; auto with real. +Qed. + +(*********************************************************) +(** ** Zero is less than one *) +(*********************************************************) + Lemma Rlt_0_1 : 0 < 1. Proof. replace 1 with (Rsqr 1); auto with real. @@ -1050,7 +1411,10 @@ Proof. exact Rlt_0_1. Qed. -(** ** Order and inverse *) +(*********************************************************) +(** ** Order and inverse *) +(*********************************************************) + Lemma Rinv_0_lt_compat : forall r, 0 < r -> 0 < / r. Proof. intros; apply Rnot_le_lt; red in |- *; intros. @@ -1099,68 +1463,9 @@ Proof. Qed. Hint Resolve Rinv_1_lt_contravar: real. -(********************************************************) -(** * Greater *) -(********************************************************) - -(**********) -Lemma Rge_antisym : forall r1 r2, r1 >= r2 -> r2 >= r1 -> r1 = r2. -Proof. - intros; apply Rle_antisym; auto with real. -Qed. - -(**********) -Lemma Rnot_lt_ge : forall r1 r2, ~ r1 < r2 -> r1 >= r2. -Proof. - intros; unfold Rge in |- *; elim (Rtotal_order r1 r2); intro. - absurd (r1 < r2); trivial. - case H0; auto. -Qed. - -(**********) -Lemma Rnot_lt_le : forall r1 r2, ~ r1 < r2 -> r2 <= r1. -Proof. - intros; apply Rge_le; apply Rnot_lt_ge; assumption. -Qed. - -(**********) -Lemma Rnot_gt_le : forall r1 r2, ~ r1 > r2 -> r1 <= r2. -Proof. - intros r1 r2 H; apply Rge_le. - exact (Rnot_lt_ge r2 r1 H). -Qed. - -(**********) -Lemma Rgt_ge : forall r1 r2, r1 > r2 -> r1 >= r2. -Proof. - red in |- *; auto with real. -Qed. - - -(**********) -Lemma Rge_gt_trans : forall r1 r2 r3, r1 >= r2 -> r2 > r3 -> r1 > r3. -Proof. - unfold Rgt in |- *; intros; apply Rlt_le_trans with r2; auto with real. -Qed. - -(**********) -Lemma Rgt_ge_trans : forall r1 r2 r3, r1 > r2 -> r2 >= r3 -> r1 > r3. -Proof. - unfold Rgt in |- *; intros; apply Rle_lt_trans with r2; auto with real. -Qed. - -(**********) -Lemma Rgt_trans : forall r1 r2 r3, r1 > r2 -> r2 > r3 -> r1 > r3. -Proof. - unfold Rgt in |- *; intros; apply Rlt_trans with r2; auto with real. -Qed. - -(**********) -Lemma Rge_trans : forall r1 r2 r3, r1 >= r2 -> r2 >= r3 -> r1 >= r3. -Proof. - intros; apply Rle_ge. - apply Rle_trans with r2; auto with real. -Qed. +(*********************************************************) +(** ** Miscellaneous *) +(*********************************************************) (**********) Lemma Rle_lt_0_plus_1 : forall r, 0 <= r -> 0 < r + 1. @@ -1186,121 +1491,9 @@ Proof. pattern r1 at 2 in |- *; replace r1 with (r1 + 0); auto with real. Qed. -(***********) -Lemma Rplus_gt_compat_l : forall r r1 r2, r1 > r2 -> r + r1 > r + r2. -Proof. - unfold Rgt in |- *; auto with real. -Qed. -Hint Resolve Rplus_gt_compat_l: real. - -(***********) -Lemma Rplus_gt_reg_l : forall r r1 r2, r + r1 > r + r2 -> r1 > r2. -Proof. - unfold Rgt in |- *; intros; apply (Rplus_lt_reg_r r r2 r1 H). -Qed. - -(***********) -Lemma Rplus_ge_compat_l : forall r r1 r2, r1 >= r2 -> r + r1 >= r + r2. -Proof. - intros; apply Rle_ge; auto with real. -Qed. -Hint Resolve Rplus_ge_compat_l: real. - -(***********) -Lemma Rplus_ge_reg_l : forall r r1 r2, r + r1 >= r + r2 -> r1 >= r2. -Proof. - intros; apply Rle_ge; apply Rplus_le_reg_l with r; auto with real. -Qed. - -(***********) -Lemma Rmult_ge_compat_r : - forall r r1 r2, r >= 0 -> r1 >= r2 -> r1 * r >= r2 * r. -Proof. - intros; apply Rle_ge; apply Rmult_le_compat_r; apply Rge_le; assumption. -Qed. - -(***********) -Lemma Rgt_minus : forall r1 r2, r1 > r2 -> r1 - r2 > 0. -Proof. - intros; replace 0 with (r2 - r2); auto with real. - unfold Rgt, Rminus in |- *; auto with real. -Qed. - -(*********) -Lemma minus_Rgt : forall r1 r2, r1 - r2 > 0 -> r1 > r2. -Proof. - intros; replace r2 with (r2 + 0); auto with real. - intros; replace r1 with (r2 + (r1 - r2)); auto with real. -Qed. - -(**********) -Lemma Rge_minus : forall r1 r2, r1 >= r2 -> r1 - r2 >= 0. -Proof. - unfold Rge in |- *; intros; elim H; intro. - left; apply (Rgt_minus r1 r2 H0). - right; apply (Rminus_diag_eq r1 r2 H0). -Qed. - -(*********) -Lemma minus_Rge : forall r1 r2, r1 - r2 >= 0 -> r1 >= r2. -Proof. - intros; replace r2 with (r2 + 0); auto with real. - intros; replace r1 with (r2 + (r1 - r2)); auto with real. -Qed. - - -(*********) -Lemma Rmult_gt_0_compat : forall r1 r2, r1 > 0 -> r2 > 0 -> r1 * r2 > 0. -Proof. - unfold Rgt in |- *; intros. - replace 0 with (0 * r2); auto with real. -Qed. - -(*********) -Lemma Rmult_lt_0_compat : forall r1 r2, 0 < r1 -> 0 < r2 -> 0 < r1 * r2. -Proof Rmult_gt_0_compat. - -(***********) -Lemma Rplus_eq_0_l : - forall r1 r2, 0 <= r1 -> 0 <= r2 -> r1 + r2 = 0 -> r1 = 0. -Proof. - intros a b [H| H] H0 H1; auto with real. - absurd (0 < a + b). - rewrite H1; auto with real. - replace 0 with (0 + 0); auto with real. -Qed. - - -Lemma Rplus_eq_R0 : - forall r1 r2, 0 <= r1 -> 0 <= r2 -> r1 + r2 = 0 -> r1 = 0 /\ r2 = 0. -Proof. - intros a b; split. - apply Rplus_eq_0_l with b; auto with real. - apply Rplus_eq_0_l with a; auto with real. - rewrite Rplus_comm; auto with real. -Qed. - - -(***********) -Lemma Rplus_sqr_eq_0_l : forall r1 r2, Rsqr r1 + Rsqr r2 = 0 -> r1 = 0. -Proof. - intros a b; intros; apply Rsqr_0_uniq; apply Rplus_eq_0_l with (Rsqr b); - auto with real. -Qed. - -Lemma Rplus_sqr_eq_0 : - forall r1 r2, Rsqr r1 + Rsqr r2 = 0 -> r1 = 0 /\ r2 = 0. -Proof. - intros a b; split. - apply Rplus_sqr_eq_0_l with b; auto with real. - apply Rplus_sqr_eq_0_l with a; auto with real. - rewrite Rplus_comm; auto with real. -Qed. - - -(**********************************************************) -(** * Injection from [N] to [R] *) -(**********************************************************) +(*********************************************************) +(** ** Injection from [N] to [R] *) +(*********************************************************) (**********) Lemma S_INR : forall n:nat, INR (S n) = INR n + 1. @@ -1323,6 +1516,7 @@ Proof. repeat rewrite S_INR. rewrite Hrecn; ring. Qed. +Hint Resolve plus_INR: real. (**********) Lemma minus_INR : forall n m:nat, (m <= n)%nat -> INR (n - m) = INR n - INR m. @@ -1332,6 +1526,7 @@ Proof. intros; repeat rewrite S_INR; simpl in |- *. rewrite H0; ring. Qed. +Hint Resolve minus_INR: real. (*********) Lemma mult_INR : forall n m:nat, INR (n * m) = INR n * INR m. @@ -1341,16 +1536,15 @@ Proof. intros; repeat rewrite S_INR; simpl in |- *. rewrite plus_INR; rewrite Hrecn; ring. Qed. - -Hint Resolve plus_INR minus_INR mult_INR: real. +Hint Resolve mult_INR: real. (*********) -Lemma lt_INR_0 : forall n:nat, (0 < n)%nat -> 0 < INR n. +Lemma lt_0_INR : forall n:nat, (0 < n)%nat -> 0 < INR n. Proof. simple induction 1; intros; auto with real. rewrite S_INR; auto with real. Qed. -Hint Resolve lt_INR_0: real. +Hint Resolve lt_0_INR: real. Lemma lt_INR : forall n m:nat, (n < m)%nat -> INR n < INR m. Proof. @@ -1360,20 +1554,20 @@ Proof. Qed. Hint Resolve lt_INR: real. -Lemma INR_lt_1 : forall n:nat, (1 < n)%nat -> 1 < INR n. +Lemma lt_1_INR : forall n:nat, (1 < n)%nat -> 1 < INR n. Proof. intros; replace 1 with (INR 1); auto with real. Qed. -Hint Resolve INR_lt_1: real. +Hint Resolve lt_1_INR: real. (**********) -Lemma INR_pos : forall p:positive, 0 < INR (nat_of_P p). +Lemma pos_INR_nat_of_P : forall p:positive, 0 < INR (nat_of_P p). Proof. - intro; apply lt_INR_0. + intro; apply lt_0_INR. simpl in |- *; auto with real. apply lt_O_nat_of_P. Qed. -Hint Resolve INR_pos: real. +Hint Resolve pos_INR_nat_of_P: real. (**********) Lemma pos_INR : forall n:nat, 0 <= INR n. @@ -1410,25 +1604,25 @@ Qed. Hint Resolve le_INR: real. (**********) -Lemma not_INR_O : forall n:nat, INR n <> 0 -> n <> 0%nat. +Lemma INR_not_0 : forall n:nat, INR n <> 0 -> n <> 0%nat. Proof. red in |- *; intros n H H1. apply H. rewrite H1; trivial. Qed. -Hint Immediate not_INR_O: real. +Hint Immediate INR_not_0: real. (**********) -Lemma not_O_INR : forall n:nat, n <> 0%nat -> INR n <> 0. +Lemma not_0_INR : forall n:nat, n <> 0%nat -> INR n <> 0. Proof. intro n; case n. intro; absurd (0%nat = 0%nat); trivial. intros; rewrite S_INR. apply Rgt_not_eq; red in |- *; auto with real. Qed. -Hint Resolve not_O_INR: real. +Hint Resolve not_0_INR: real. -Lemma not_nm_INR : forall n m:nat, n <> m -> INR n <> INR m. +Lemma not_INR : forall n m:nat, n <> m -> INR n <> INR m. Proof. intros n m H; case (le_or_lt n m); intros H1. case (le_lt_or_eq _ _ H1); intros H2. @@ -1436,17 +1630,17 @@ Proof. elimtype False; auto. apply sym_not_eq; apply Rlt_dichotomy_converse; auto with real. Qed. -Hint Resolve not_nm_INR: real. +Hint Resolve not_INR: real. Lemma INR_eq : forall n m:nat, INR n = INR m -> n = m. Proof. intros; case (le_or_lt n m); intros H1. case (le_lt_or_eq _ _ H1); intros H2; auto. cut (n <> m). - intro H3; generalize (not_nm_INR n m H3); intro H4; elimtype False; auto. + intro H3; generalize (not_INR n m H3); intro H4; elimtype False; auto. omega. symmetry in |- *; cut (m <> n). - intro H3; generalize (not_nm_INR m n H3); intro H4; elimtype False; auto. + intro H3; generalize (not_INR m n H3); intro H4; elimtype False; auto. omega. Qed. Hint Resolve INR_eq: real. @@ -1465,9 +1659,9 @@ Proof. Qed. Hint Resolve not_1_INR: real. -(**********************************************************) -(** * Injection from [Z] to [R] *) -(**********************************************************) +(*********************************************************) +(** ** Injection from [Z] to [R] *) +(*********************************************************) (**********) @@ -1540,6 +1734,12 @@ Proof. rewrite mult_IZR;ring[IHn]. Qed. +(**********) +Lemma succ_IZR : forall n:Z, IZR (Zsucc n) = IZR n + 1. +Proof. + intro; change 1 with (IZR 1); unfold Zsucc; apply plus_IZR. +Qed. + (**********) Lemma Ropp_Ropp_IZR : forall n:Z, IZR (- n) = - IZR n. Proof. @@ -1554,7 +1754,7 @@ Proof. Qed. (**********) -Lemma lt_O_IZR : forall n:Z, 0 < IZR n -> (0 < n)%Z. +Lemma lt_0_IZR : forall n:Z, 0 < IZR n -> (0 < n)%Z. Proof. intro z; case z; simpl in |- *; intros. absurd (0 < 0); auto with real. @@ -1567,7 +1767,7 @@ Qed. Lemma lt_IZR : forall n m:Z, IZR n < IZR m -> (n < m)%Z. Proof. intros z1 z2 H; apply Zlt_0_minus_lt. - apply lt_O_IZR. + apply lt_0_IZR. rewrite <- Z_R_minus. exact (Rgt_minus (IZR z2) (IZR z1) H). Qed. @@ -1578,7 +1778,7 @@ Proof. intro z; destruct z; simpl in |- *; intros; auto with zarith. case (Rlt_not_eq 0 (INR (nat_of_P p))); auto with real. case (Rlt_not_eq (- INR (nat_of_P p)) 0); auto with real. - apply Ropp_lt_gt_0_contravar. unfold Rgt in |- *; apply INR_pos. + apply Ropp_lt_gt_0_contravar. unfold Rgt in |- *; apply pos_INR_nat_of_P. Qed. (**********) @@ -1590,17 +1790,17 @@ Proof. Qed. (**********) -Lemma not_O_IZR : forall n:Z, n <> 0%Z -> IZR n <> 0. +Lemma not_0_IZR : forall n:Z, n <> 0%Z -> IZR n <> 0. Proof. intros z H; red in |- *; intros H0; case H. apply eq_IZR; auto. Qed. (*********) -Lemma le_O_IZR : forall n:Z, 0 <= IZR n -> (0 <= n)%Z. +Lemma le_0_IZR : forall n:Z, 0 <= IZR n -> (0 <= n)%Z. Proof. unfold Rle in |- *; intros z [H| H]. - red in |- *; intro; apply (Zlt_le_weak 0 z (lt_O_IZR z H)); assumption. + red in |- *; intro; apply (Zlt_le_weak 0 z (lt_0_IZR z H)); assumption. rewrite (eq_IZR_R0 z); auto with zarith real. Qed. @@ -1685,32 +1885,6 @@ Proof. apply H3; apply single_z_r_R1 with r; trivial. Qed. -(*****************************************************************) -(** * Definitions of new types *) -(*****************************************************************) - -Record nonnegreal : Type := mknonnegreal - {nonneg :> R; cond_nonneg : 0 <= nonneg}. - -Record posreal : Type := mkposreal {pos :> R; cond_pos : 0 < pos}. - -Record nonposreal : Type := mknonposreal - {nonpos :> R; cond_nonpos : nonpos <= 0}. - -Record negreal : Type := mknegreal {neg :> R; cond_neg : neg < 0}. - -Record nonzeroreal : Type := mknonzeroreal - {nonzero :> R; cond_nonzero : nonzero <> 0}. - -(**********) -Lemma prod_neq_R0 : forall r1 r2, r1 <> 0 -> r2 <> 0 -> r1 * r2 <> 0. -Proof. - intros x y; intros; red in |- *; intro; generalize (Rmult_integral x y H1); - intro; elim H2; intro; - [ rewrite H3 in H; elim H | rewrite H3 in H0; elim H0 ]; - reflexivity. -Qed. - (*********) Lemma Rmult_le_pos : forall r1 r2, 0 <= r1 -> 0 <= r2 -> 0 <= r1 * r2. Proof. @@ -1728,67 +1902,18 @@ Proof. intro; rewrite <- double; unfold Rdiv in |- *; rewrite <- Rmult_assoc; symmetry in |- *; apply Rinv_r_simpl_m. replace 2 with (INR 2); - [ apply not_O_INR; discriminate | unfold INR in |- *; ring ]. -Qed. - -(**********************************************************) -(** * Other rules about < and <= *) -(**********************************************************) - -Lemma Rplus_lt_0_compat : forall r1 r2, 0 < r1 -> 0 < r2 -> 0 < r1 + r2. -Proof. - intros x y; intros; apply Rlt_trans with x; - [ assumption - | pattern x at 1 in |- *; rewrite <- (Rplus_0_r x); apply Rplus_lt_compat_l; - assumption ]. + [ apply not_0_INR; discriminate | unfold INR in |- *; ring ]. Qed. -Lemma Rplus_le_lt_0_compat : forall r1 r2, 0 <= r1 -> 0 < r2 -> 0 < r1 + r2. -Proof. - intros x y; intros; apply Rle_lt_trans with x; - [ assumption - | pattern x at 1 in |- *; rewrite <- (Rplus_0_r x); apply Rplus_lt_compat_l; - assumption ]. -Qed. - -Lemma Rplus_lt_le_0_compat : forall r1 r2, 0 < r1 -> 0 <= r2 -> 0 < r1 + r2. -Proof. - intros x y; intros; rewrite <- Rplus_comm; apply Rplus_le_lt_0_compat; - assumption. -Qed. - -Lemma Rplus_le_le_0_compat : forall r1 r2, 0 <= r1 -> 0 <= r2 -> 0 <= r1 + r2. -Proof. - intros x y; intros; apply Rle_trans with x; - [ assumption - | pattern x at 1 in |- *; rewrite <- (Rplus_0_r x); apply Rplus_le_compat_l; - assumption ]. -Qed. - -Lemma plus_le_is_le : forall r1 r2 r3, 0 <= r2 -> r1 + r2 <= r3 -> r1 <= r3. -Proof. - intros x y z; intros; apply Rle_trans with (x + y); - [ pattern x at 1 in |- *; rewrite <- (Rplus_0_r x); apply Rplus_le_compat_l; - assumption - | assumption ]. -Qed. - -Lemma plus_lt_is_lt : forall r1 r2 r3, 0 <= r2 -> r1 + r2 < r3 -> r1 < r3. -Proof. - intros x y z; intros; apply Rle_lt_trans with (x + y); - [ pattern x at 1 in |- *; rewrite <- (Rplus_0_r x); apply Rplus_le_compat_l; - assumption - | assumption ]. -Qed. +(*********************************************************) +(** ** Other rules about < and <= *) +(*********************************************************) -Lemma Rmult_le_0_lt_compat : +Lemma Rmult_ge_0_gt_0_lt_compat : forall r1 r2 r3 r4, - 0 <= r1 -> 0 <= r3 -> r1 < r2 -> r3 < r4 -> r1 * r3 < r2 * r4. + r3 >= 0 -> r2 > 0 -> r1 < r2 -> r3 < r4 -> r1 * r3 < r2 * r4. Proof. - intros; apply Rle_lt_trans with (r2 * r3); - [ apply Rmult_le_compat_r; [ assumption | left; assumption ] - | apply Rmult_lt_compat_l; - [ apply Rle_lt_trans with r1; assumption | assumption ] ]. + intros; apply Rle_lt_trans with (r2 * r3); auto with real. Qed. Lemma le_epsilon : @@ -1811,7 +1936,7 @@ Proof. rewrite Rmult_1_r; replace (2 * x) with (x + x). rewrite (Rplus_comm y); intro H5; apply Rplus_le_reg_l with x; assumption. ring. - replace 2 with (INR 2); [ apply not_O_INR; discriminate | reflexivity ]. + replace 2 with (INR 2); [ apply not_0_INR; discriminate | reflexivity ]. pattern y at 2 in |- *; replace y with (y / 2 + y / 2). unfold Rminus, Rdiv in |- *. repeat rewrite Rmult_plus_distr_r. @@ -1822,12 +1947,12 @@ Proof. unfold Rdiv in |- *. rewrite <- Rmult_assoc; apply Rinv_r_simpl_m. replace 2 with (INR 2). - apply not_O_INR. + apply not_0_INR. discriminate. unfold INR in |- *; reflexivity. intro; ring. cut (0%nat <> 2%nat); - [ intro H0; generalize (lt_INR_0 2 (neq_O_lt 2 H0)); unfold INR in |- *; + [ intro H0; generalize (lt_0_INR 2 (neq_O_lt 2 H0)); unfold INR in |- *; intro; assumption | discriminate ]. Qed. @@ -1839,3 +1964,37 @@ Lemma completeness_weak : Proof. intros; elim (completeness E H H0); intros; split with x; assumption. Qed. + +(*********************************************************) +(** * Definitions of new types *) +(*********************************************************) + +Record nonnegreal : Type := mknonnegreal + {nonneg :> R; cond_nonneg : 0 <= nonneg}. + +Record posreal : Type := mkposreal {pos :> R; cond_pos : 0 < pos}. + +Record nonposreal : Type := mknonposreal + {nonpos :> R; cond_nonpos : nonpos <= 0}. + +Record negreal : Type := mknegreal {neg :> R; cond_neg : neg < 0}. + +Record nonzeroreal : Type := mknonzeroreal + {nonzero :> R; cond_nonzero : nonzero <> 0}. + +(** Compatibility *) + +Notation prod_neq_R0 := Rmult_integral_contrapositive_currified (only parsing). +Notation minus_Rgt := Rminus_gt (only parsing). +Notation minus_Rge := Rminus_ge (only parsing). +Notation plus_le_is_le := Rplus_le_reg_pos_r (only parsing). +Notation plus_lt_is_lt := Rplus_lt_reg_pos_r (only parsing). +Notation INR_lt_1 := lt_1_INR (only parsing). +Notation lt_INR_0 := lt_0_INR (only parsing). +Notation not_nm_INR := not_INR (only parsing). +Notation INR_pos := pos_INR_nat_of_P (only parsing). +Notation not_INR_O := INR_not_0 (only parsing). +Notation not_O_INR := not_0_INR (only parsing). +Notation not_O_IZR := not_0_IZR (only parsing). +Notation le_O_IZR := le_0_IZR (only parsing). +Notation lt_O_IZR := lt_0_IZR (only parsing). diff --git a/theories/Reals/R_sqr.v b/theories/Reals/R_sqr.v index 270ea6da..17b6c60d 100644 --- a/theories/Reals/R_sqr.v +++ b/theories/Reals/R_sqr.v @@ -6,10 +6,11 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: R_sqr.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: R_sqr.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. -Require Import Rbasic_fun. Open Local Scope R_scope. +Require Import Rbasic_fun. +Open Local Scope R_scope. (****************************************************) (** Rsqr : some results *) diff --git a/theories/Reals/R_sqrt.v b/theories/Reals/R_sqrt.v index 736365a0..63b8940b 100644 --- a/theories/Reals/R_sqrt.v +++ b/theories/Reals/R_sqrt.v @@ -6,11 +6,12 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: R_sqrt.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: R_sqrt.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. -Require Import Rsqrt_def. Open Local Scope R_scope. +Require Import Rsqrt_def. +Open Local Scope R_scope. (** * Continuous extension of Rsqrt on R *) Definition sqrt (x:R) : R := diff --git a/theories/Reals/Ranalysis.v b/theories/Reals/Ranalysis.v index d712f74b..f48ce563 100644 --- a/theories/Reals/Ranalysis.v +++ b/theories/Reals/Ranalysis.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Ranalysis.v 9319 2006-10-30 12:41:21Z barras $ i*) +(*i $Id: Ranalysis.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. @@ -27,7 +27,8 @@ Require Export Rgeom. Require Export RList. Require Export Sqrt_reg. Require Export Ranalysis4. -Require Export Rpower. Open Local Scope R_scope. +Require Export Rpower. +Open Local Scope R_scope. Axiom AppVar : R. diff --git a/theories/Reals/Ranalysis1.v b/theories/Reals/Ranalysis1.v index 93a66e70..9414f7c9 100644 --- a/theories/Reals/Ranalysis1.v +++ b/theories/Reals/Ranalysis1.v @@ -6,12 +6,13 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Ranalysis1.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Ranalysis1.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. Require Export Rlimit. -Require Export Rderiv. Open Local Scope R_scope. +Require Export Rderiv. +Open Local Scope R_scope. Implicit Type f : R -> R. (****************************************************) @@ -269,10 +270,10 @@ Definition derivable_pt_lim f (x l:R) : Prop := Definition derivable_pt_abs f (x l:R) : Prop := derivable_pt_lim f x l. -Definition derivable_pt f (x:R) := sigT (derivable_pt_abs f x). +Definition derivable_pt f (x:R) := { l:R | derivable_pt_abs f x l }. Definition derivable f := forall x:R, derivable_pt f x. -Definition derive_pt f (x:R) (pr:derivable_pt f x) := projT1 pr. +Definition derive_pt f (x:R) (pr:derivable_pt f x) := proj1_sig pr. Definition derive f (pr:derivable f) (x:R) := derive_pt f x (pr x). Arguments Scope derivable_pt_lim [Rfun_scope R_scope]. @@ -380,9 +381,9 @@ Lemma derive_pt_eq : derive_pt f x pr = l <-> derivable_pt_lim f x l. Proof. intros; split. - intro; assert (H1 := projT2 pr); unfold derive_pt in H; rewrite H in H1; + intro; assert (H1 := proj2_sig pr); unfold derive_pt in H; rewrite H in H1; assumption. - intro; assert (H1 := projT2 pr); unfold derivable_pt_abs in H1. + intro; assert (H1 := proj2_sig pr); unfold derivable_pt_abs in H1. assert (H2 := uniqueness_limite _ _ _ _ H H1). unfold derive_pt in |- *; unfold derivable_pt_abs in |- *. symmetry in |- *; assumption. @@ -486,7 +487,7 @@ Qed. Lemma derivable_derive : forall f (x:R) (pr:derivable_pt f x), exists l : R, derive_pt f x pr = l. Proof. - intros; exists (projT1 pr). + intros; exists (proj1_sig pr). unfold derive_pt in |- *; reflexivity. Qed. @@ -714,7 +715,7 @@ Proof. unfold derivable_pt in |- *; intros f1 f2 x X X0. elim X; intros. elim X0; intros. - apply existT with (x0 + x1). + exists (x0 + x1). apply derivable_pt_lim_plus; assumption. Qed. @@ -723,7 +724,7 @@ Lemma derivable_pt_opp : Proof. unfold derivable_pt in |- *; intros f x X. elim X; intros. - apply existT with (- x0). + exists (- x0). apply derivable_pt_lim_opp; assumption. Qed. @@ -734,7 +735,7 @@ Proof. unfold derivable_pt in |- *; intros f1 f2 x X X0. elim X; intros. elim X0; intros. - apply existT with (x0 - x1). + exists (x0 - x1). apply derivable_pt_lim_minus; assumption. Qed. @@ -745,14 +746,14 @@ Proof. unfold derivable_pt in |- *; intros f1 f2 x X X0. elim X; intros. elim X0; intros. - apply existT with (x0 * f2 x + f1 x * x1). + exists (x0 * f2 x + f1 x * x1). apply derivable_pt_lim_mult; assumption. Qed. Lemma derivable_pt_const : forall a x:R, derivable_pt (fct_cte a) x. Proof. intros; unfold derivable_pt in |- *. - apply existT with 0. + exists 0. apply derivable_pt_lim_const. Qed. @@ -761,7 +762,7 @@ Lemma derivable_pt_scal : Proof. unfold derivable_pt in |- *; intros f1 a x X. elim X; intros. - apply existT with (a * x0). + exists (a * x0). apply derivable_pt_lim_scal; assumption. Qed. @@ -774,7 +775,7 @@ Qed. Lemma derivable_pt_Rsqr : forall x:R, derivable_pt Rsqr x. Proof. - unfold derivable_pt in |- *; intro; apply existT with (2 * x). + unfold derivable_pt in |- *; intro; exists (2 * x). apply derivable_pt_lim_Rsqr. Qed. @@ -785,7 +786,7 @@ Proof. unfold derivable_pt in |- *; intros f1 f2 x X X0. elim X; intros. elim X0; intros. - apply existT with (x1 * x0). + exists (x1 * x0). apply derivable_pt_lim_comp; assumption. Qed. @@ -860,9 +861,9 @@ Proof. elim H0; clear H0; intros l2 H0. elim H1; clear H1; intros l H1. rewrite H; rewrite H0; apply derive_pt_eq_0. - assert (H3 := projT2 pr1). + assert (H3 := proj2_sig pr1). unfold derive_pt in H; rewrite H in H3. - assert (H4 := projT2 pr2). + assert (H4 := proj2_sig pr2). unfold derive_pt in H0; rewrite H0 in H4. apply derivable_pt_lim_plus; assumption. Qed. @@ -877,7 +878,7 @@ Proof. elim H; clear H; intros l1 H. elim H0; clear H0; intros l2 H0. rewrite H; apply derive_pt_eq_0. - assert (H3 := projT2 pr1). + assert (H3 := proj2_sig pr1). unfold derive_pt in H; rewrite H in H3. apply derivable_pt_lim_opp; assumption. Qed. @@ -896,9 +897,9 @@ Proof. elim H0; clear H0; intros l2 H0. elim H1; clear H1; intros l H1. rewrite H; rewrite H0; apply derive_pt_eq_0. - assert (H3 := projT2 pr1). + assert (H3 := proj2_sig pr1). unfold derive_pt in H; rewrite H in H3. - assert (H4 := projT2 pr2). + assert (H4 := proj2_sig pr2). unfold derive_pt in H0; rewrite H0 in H4. apply derivable_pt_lim_minus; assumption. Qed. @@ -917,9 +918,9 @@ Proof. elim H0; clear H0; intros l2 H0. elim H1; clear H1; intros l H1. rewrite H; rewrite H0; apply derive_pt_eq_0. - assert (H3 := projT2 pr1). + assert (H3 := proj2_sig pr1). unfold derive_pt in H; rewrite H in H3. - assert (H4 := projT2 pr2). + assert (H4 := proj2_sig pr2). unfold derive_pt in H0; rewrite H0 in H4. apply derivable_pt_lim_mult; assumption. Qed. @@ -944,7 +945,7 @@ Proof. elim H; clear H; intros l1 H. elim H0; clear H0; intros l2 H0. rewrite H; apply derive_pt_eq_0. - assert (H3 := projT2 pr). + assert (H3 := proj2_sig pr). unfold derive_pt in H; rewrite H in H3. apply derivable_pt_lim_scal; assumption. Qed. @@ -978,9 +979,9 @@ Proof. elim H0; clear H0; intros l2 H0. elim H1; clear H1; intros l H1. rewrite H; rewrite H0; apply derive_pt_eq_0. - assert (H3 := projT2 pr1). + assert (H3 := proj2_sig pr1). unfold derive_pt in H; rewrite H in H3. - assert (H4 := projT2 pr2). + assert (H4 := proj2_sig pr2). unfold derive_pt in H0; rewrite H0 in H4. apply derivable_pt_lim_comp; assumption. Qed. @@ -1046,7 +1047,7 @@ Lemma derivable_pt_pow : forall (n:nat) (x:R), derivable_pt (fun y:R => y ^ n) x. Proof. intros; unfold derivable_pt in |- *. - apply existT with (INR n * x ^ pred n). + exists (INR n * x ^ pred n). apply derivable_pt_lim_pow. Qed. diff --git a/theories/Reals/Ranalysis2.v b/theories/Reals/Ranalysis2.v index fb89da67..54801eb7 100644 --- a/theories/Reals/Ranalysis2.v +++ b/theories/Reals/Ranalysis2.v @@ -6,11 +6,12 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Ranalysis2.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Ranalysis2.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. -Require Import Ranalysis1. Open Local Scope R_scope. +Require Import Ranalysis1. +Open Local Scope R_scope. (**********) Lemma formule : diff --git a/theories/Reals/Ranalysis3.v b/theories/Reals/Ranalysis3.v index f50aa2ad..180cf9d6 100644 --- a/theories/Reals/Ranalysis3.v +++ b/theories/Reals/Ranalysis3.v @@ -6,12 +6,13 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Ranalysis3.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Ranalysis3.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. Require Import Ranalysis1. -Require Import Ranalysis2. Open Local Scope R_scope. +Require Import Ranalysis2. +Open Local Scope R_scope. (** Division *) Theorem derivable_pt_lim_div : @@ -23,7 +24,7 @@ Theorem derivable_pt_lim_div : Proof. intros f1 f2 x l1 l2 H H0 H1. cut (derivable_pt f2 x); - [ intro X | unfold derivable_pt in |- *; apply existT with l2; exact H0 ]. + [ intro X | unfold derivable_pt in |- *; exists l2; exact H0 ]. assert (H2 := continuous_neq_0 _ _ (derivable_continuous_pt _ _ X) H1). elim H2; clear H2; intros eps_f2 H2. unfold div_fct in |- *. @@ -761,7 +762,7 @@ Proof. intros f1 f2 x X X0 H. elim X; intros. elim X0; intros. - apply existT with ((x0 * f2 x - x1 * f1 x) / Rsqr (f2 x)). + exists ((x0 * f2 x - x1 * f1 x) / Rsqr (f2 x)). apply derivable_pt_lim_div; assumption. Qed. @@ -789,9 +790,9 @@ Proof. elim H0; clear H0; intros l2 H0. elim H1; clear H1; intros l H1. rewrite H; rewrite H0; apply derive_pt_eq_0. - assert (H3 := projT2 pr1). + assert (H3 := proj2_sig pr1). unfold derive_pt in H; rewrite H in H3. - assert (H4 := projT2 pr2). + assert (H4 := proj2_sig pr2). unfold derive_pt in H0; rewrite H0 in H4. apply derivable_pt_lim_div; assumption. Qed. diff --git a/theories/Reals/Ranalysis4.v b/theories/Reals/Ranalysis4.v index 205c06b4..95f6d27e 100644 --- a/theories/Reals/Ranalysis4.v +++ b/theories/Reals/Ranalysis4.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Ranalysis4.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Ranalysis4.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. @@ -14,7 +14,8 @@ Require Import SeqSeries. Require Import Rtrigo. Require Import Ranalysis1. Require Import Ranalysis3. -Require Import Exp_prop. Open Local Scope R_scope. +Require Import Exp_prop. +Open Local Scope R_scope. (**********) Lemma derivable_pt_inv : @@ -28,7 +29,7 @@ Proof. assumption. assumption. unfold div_fct, inv_fct, fct_cte in |- *; intro X0; elim X0; intros; - unfold derivable_pt in |- *; apply existT with x0; + unfold derivable_pt in |- *; exists x0; unfold derivable_pt_abs in |- *; unfold derivable_pt_lim in |- *; unfold derivable_pt_abs in p; unfold derivable_pt_lim in p; intros; elim (p eps H0); intros; exists x1; intros; @@ -164,10 +165,10 @@ Proof. intros. case (total_order_T x 0); intro. elim s; intro. - unfold derivable_pt in |- *; apply existT with (-1). + unfold derivable_pt in |- *; exists (-1). apply (Rabs_derive_2 x a). elim H; exact b. - unfold derivable_pt in |- *; apply existT with 1. + unfold derivable_pt in |- *; exists 1. apply (Rabs_derive_1 x r). Qed. @@ -294,8 +295,8 @@ Proof. unfold derivable_pt in |- *. assert (H := derivable_pt_lim_finite_sum An x N). induction N as [| N HrecN]. - apply existT with 0; apply H. - apply existT with + exists 0; apply H. + exists (sum_f_R0 (fun k:nat => INR (S k) * An (S k) * x ^ k) (pred (S N))); apply H. Qed. @@ -352,7 +353,7 @@ Lemma derivable_pt_exp : forall x:R, derivable_pt exp x. Proof. intro. unfold derivable_pt in |- *. - apply existT with (exp x). + exists (exp x). apply derivable_pt_lim_exp. Qed. @@ -360,7 +361,7 @@ Lemma derivable_pt_cosh : forall x:R, derivable_pt cosh x. Proof. intro. unfold derivable_pt in |- *. - apply existT with (sinh x). + exists (sinh x). apply derivable_pt_lim_cosh. Qed. @@ -368,7 +369,7 @@ Lemma derivable_pt_sinh : forall x:R, derivable_pt sinh x. Proof. intro. unfold derivable_pt in |- *. - apply existT with (cosh x). + exists (cosh x). apply derivable_pt_lim_sinh. Qed. diff --git a/theories/Reals/Raxioms.v b/theories/Reals/Raxioms.v index aaea59f4..6667d2ec 100644 --- a/theories/Reals/Raxioms.v +++ b/theories/Reals/Raxioms.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Raxioms.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Raxioms.v 10710 2008-03-23 09:24:09Z herbelin $ i*) (*********************************************************) (** Axiomatisation of the classical reals *) @@ -130,7 +130,7 @@ Definition IZR (z:Z) : R := Arguments Scope IZR [Z_scope]. (**********************************************************) -(** * [R] Archimedian *) +(** * [R] Archimedean *) (**********************************************************) (**********) @@ -154,4 +154,4 @@ Definition is_lub (E:R -> Prop) (m:R) := Axiom completeness : forall E:R -> Prop, - bound E -> (exists x : R, E x) -> sigT (fun m:R => is_lub E m). + bound E -> (exists x : R, E x) -> { m:R | is_lub E m }. diff --git a/theories/Reals/Rbasic_fun.v b/theories/Reals/Rbasic_fun.v index 98bd607b..a5cc9f19 100644 --- a/theories/Reals/Rbasic_fun.v +++ b/theories/Reals/Rbasic_fun.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Rbasic_fun.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Rbasic_fun.v 10710 2008-03-23 09:24:09Z herbelin $ i*) (*********************************************************) (** Complements for the real numbers *) @@ -15,7 +15,8 @@ Require Import Rbase. Require Import R_Ifp. -Require Import Fourier. Open Local Scope R_scope. +Require Import Fourier. +Open Local Scope R_scope. Implicit Type r : R. diff --git a/theories/Reals/Rcomplete.v b/theories/Reals/Rcomplete.v index 16e12d7f..d7fee9c5 100644 --- a/theories/Reals/Rcomplete.v +++ b/theories/Reals/Rcomplete.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Rcomplete.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Rcomplete.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. @@ -24,7 +24,7 @@ Open Local Scope R_scope. (****************************************************) Theorem R_complete : - forall Un:nat -> R, Cauchy_crit Un -> sigT (fun l:R => Un_cv Un l). + forall Un:nat -> R, Cauchy_crit Un -> { l:R | Un_cv Un l } . Proof. intros. set (Vn := sequence_minorant Un (cauchy_min Un H)). @@ -37,7 +37,7 @@ Proof. elim H1; intros. cut (x = x0). intros. - apply existT with x. + exists x. rewrite <- H2 in p0. unfold Un_cv in |- *. intros. diff --git a/theories/Reals/Rdefinitions.v b/theories/Reals/Rdefinitions.v index 330c0042..002ce8d6 100644 --- a/theories/Reals/Rdefinitions.v +++ b/theories/Reals/Rdefinitions.v @@ -5,7 +5,7 @@ (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Rdefinitions.v 9551 2007-01-29 15:13:35Z bgregoir $ i*) +(*i $Id: Rdefinitions.v 10751 2008-04-04 10:23:35Z herbelin $ i*) (*********************************************************) @@ -22,6 +22,8 @@ Delimit Scope R_scope with R. (* Automatically open scope R_scope for arguments of type R *) Bind Scope R_scope with R. +Open Local Scope R_scope. + Parameter R0 : R. Parameter R1 : R. Parameter Rplus : R -> R -> R. @@ -38,33 +40,33 @@ Notation "/ x" := (Rinv x) : R_scope. Infix "<" := Rlt : R_scope. -(*i*******************************************************i*) +(***********************************************************) (**********) -Definition Rgt (r1 r2:R) : Prop := (r2 < r1)%R. +Definition Rgt (r1 r2:R) : Prop := r2 < r1. (**********) -Definition Rle (r1 r2:R) : Prop := (r1 < r2)%R \/ r1 = r2. +Definition Rle (r1 r2:R) : Prop := r1 < r2 \/ r1 = r2. (**********) Definition Rge (r1 r2:R) : Prop := Rgt r1 r2 \/ r1 = r2. (**********) -Definition Rminus (r1 r2:R) : R := (r1 + - r2)%R. +Definition Rminus (r1 r2:R) : R := r1 + - r2. (**********) -Definition Rdiv (r1 r2:R) : R := (r1 * / r2)%R. +Definition Rdiv (r1 r2:R) : R := r1 * / r2. (**********) Infix "-" := Rminus : R_scope. -Infix "/" := Rdiv : R_scope. +Infix "/" := Rdiv : R_scope. Infix "<=" := Rle : R_scope. Infix ">=" := Rge : R_scope. -Infix ">" := Rgt : R_scope. +Infix ">" := Rgt : R_scope. -Notation "x <= y <= z" := ((x <= y)%R /\ (y <= z)%R) : R_scope. -Notation "x <= y < z" := ((x <= y)%R /\ (y < z)%R) : R_scope. -Notation "x < y < z" := ((x < y)%R /\ (y < z)%R) : R_scope. -Notation "x < y <= z" := ((x < y)%R /\ (y <= z)%R) : R_scope. +Notation "x <= y <= z" := (x <= y /\ y <= z) : R_scope. +Notation "x <= y < z" := (x <= y /\ y < z) : R_scope. +Notation "x < y < z" := (x < y /\ y < z) : R_scope. +Notation "x < y <= z" := (x < y /\ y <= z) : R_scope. diff --git a/theories/Reals/Rderiv.v b/theories/Reals/Rderiv.v index e2fd2efe..ba42bad9 100644 --- a/theories/Reals/Rderiv.v +++ b/theories/Reals/Rderiv.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Rderiv.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Rderiv.v 10710 2008-03-23 09:24:09Z herbelin $ i*) (*********************************************************) (** Definition of the derivative,continuity *) @@ -19,7 +19,8 @@ Require Import Rlimit. Require Import Fourier. Require Import Classical_Prop. Require Import Classical_Pred_Type. -Require Import Omega. Open Local Scope R_scope. +Require Import Omega. +Open Local Scope R_scope. (*********) Definition D_x (D:R -> Prop) (y x:R) : Prop := D x /\ y <> x. diff --git a/theories/Reals/Rfunctions.v b/theories/Reals/Rfunctions.v index 3d1c0375..b9aec1ea 100644 --- a/theories/Reals/Rfunctions.v +++ b/theories/Reals/Rfunctions.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Rfunctions.v 9551 2007-01-29 15:13:35Z bgregoir $ i*) +(*i $Id: Rfunctions.v 10762 2008-04-06 16:57:31Z herbelin $ i*) (*i Some properties about pow and sum have been made with John Harrison i*) (*i Some Lemmas (about pow and powerRZ) have been done by Laurent Thery i*) @@ -349,8 +349,7 @@ Proof. rewrite Rabs_Rinv; auto. rewrite <- Rinv_pow; auto. rewrite RPow_abs; auto. - rewrite H'0; rewrite Rabs_right; auto with real. - apply Rle_ge; auto with real. + rewrite H'0; rewrite Rabs_right; auto with real rorders. apply Rlt_pow; auto with arith. rewrite Rabs_Rinv; auto. apply Rmult_lt_reg_l with (r := Rabs r). @@ -786,11 +785,14 @@ Proof. Qed. (*******************************) -(** * Infinit Sum *) +(** * Infinite Sum *) (*******************************) (*********) -Definition infinit_sum (s:nat -> R) (l:R) : Prop := +Definition infinite_sum (s:nat -> R) (l:R) : Prop := forall eps:R, eps > 0 -> exists N : nat, (forall n:nat, (n >= N)%nat -> R_dist (sum_f_R0 s n) l < eps). + +(** Compatibility with previous versions *) +Notation infinit_sum := infinite_sum (only parsing). diff --git a/theories/Reals/Rgeom.v b/theories/Reals/Rgeom.v index 8ac9c07f..c96ae5d6 100644 --- a/theories/Reals/Rgeom.v +++ b/theories/Reals/Rgeom.v @@ -6,13 +6,14 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Rgeom.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Rgeom.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. Require Import SeqSeries. Require Import Rtrigo. -Require Import R_sqrt. Open Local Scope R_scope. +Require Import R_sqrt. +Open Local Scope R_scope. (** * Distance *) diff --git a/theories/Reals/RiemannInt.v b/theories/Reals/RiemannInt.v index 1cba821e..8d069e2d 100644 --- a/theories/Reals/RiemannInt.v +++ b/theories/Reals/RiemannInt.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: RiemannInt.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: RiemannInt.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rfunctions. Require Import SeqSeries. @@ -15,7 +15,8 @@ Require Import Rbase. Require Import RiemannInt_SF. Require Import Classical_Prop. Require Import Classical_Pred_Type. -Require Import Max. Open Local Scope R_scope. +Require Import Max. +Open Local Scope R_scope. Set Implicit Arguments. @@ -25,13 +26,11 @@ Set Implicit Arguments. Definition Riemann_integrable (f:R -> R) (a b:R) : Type := forall eps:posreal, - sigT - (fun phi:StepFun a b => - sigT - (fun psi:StepFun a b => + { phi:StepFun a b & + { psi:StepFun a b | (forall t:R, Rmin a b <= t <= Rmax a b -> Rabs (f t - phi t) <= psi t) /\ - Rabs (RiemannInt_SF psi) < eps)). + Rabs (RiemannInt_SF psi) < eps } }. Definition phi_sequence (un:nat -> posreal) (f:R -> R) (a b:R) (pr:Riemann_integrable f a b) (n:nat) := @@ -40,12 +39,11 @@ Definition phi_sequence (un:nat -> posreal) (f:R -> R) Lemma phi_sequence_prop : forall (un:nat -> posreal) (f:R -> R) (a b:R) (pr:Riemann_integrable f a b) (N:nat), - sigT - (fun psi:StepFun a b => + { psi:StepFun a b | (forall t:R, Rmin a b <= t <= Rmax a b -> Rabs (f t - phi_sequence un pr N t) <= psi t) /\ - Rabs (RiemannInt_SF psi) < un N). + Rabs (RiemannInt_SF psi) < un N }. Proof. intros; apply (projT2 (pr (un N))). Qed. @@ -55,8 +53,8 @@ Lemma RiemannInt_P1 : Riemann_integrable f a b -> Riemann_integrable f b a. Proof. unfold Riemann_integrable in |- *; intros; elim (X eps); clear X; intros; - elim p; clear p; intros; apply existT with (mkStepFun (StepFun_P6 (pre x))); - apply existT with (mkStepFun (StepFun_P6 (pre x0))); + elim p; clear p; intros; exists (mkStepFun (StepFun_P6 (pre x))); + exists (mkStepFun (StepFun_P6 (pre x0))); elim p; clear p; intros; split. intros; apply (H t); elim H1; clear H1; intros; split; [ apply Rle_trans with (Rmin b a); try assumption; right; @@ -90,7 +88,7 @@ Lemma RiemannInt_P2 : (forall n:nat, (forall t:R, Rmin a b <= t <= Rmax a b -> Rabs (f t - vn n t) <= wn n t) /\ Rabs (RiemannInt_SF (wn n)) < un n) -> - sigT (fun l:R => Un_cv (fun N:nat => RiemannInt_SF (vn N)) l). + { l:R | Un_cv (fun N:nat => RiemannInt_SF (vn N)) l }. Proof. intros; apply R_complete; unfold Un_cv in H; unfold Cauchy_crit in |- *; intros; assert (H3 : 0 < eps / 2). @@ -143,7 +141,7 @@ Lemma RiemannInt_P3 : (forall n:nat, (forall t:R, Rmin a b <= t <= Rmax a b -> Rabs (f t - vn n t) <= wn n t) /\ Rabs (RiemannInt_SF (wn n)) < un n) -> - sigT (fun l:R => Un_cv (fun N:nat => RiemannInt_SF (vn N)) l). + { l:R | Un_cv (fun N:nat => RiemannInt_SF (vn N)) l }. Proof. intros; case (Rle_dec a b); intro. apply RiemannInt_P2 with f un wn; assumption. @@ -181,7 +179,7 @@ Proof. rewrite Rabs_Ropp in H4; apply H4. apply H4. assert (H3 := RiemannInt_P2 _ _ _ _ H H1 H2); elim H3; intros; - apply existT with (- x); unfold Un_cv in |- *; unfold Un_cv in p; + exists (- x); unfold Un_cv in |- *; unfold Un_cv in p; intros; elim (p _ H4); intros; exists x0; intros; generalize (H5 _ H6); unfold R_dist, RiemannInt_SF in |- *; case (Rle_dec b a); case (Rle_dec a b); intros. @@ -205,13 +203,12 @@ Lemma RiemannInt_exists : forall (f:R -> R) (a b:R) (pr:Riemann_integrable f a b) (un:nat -> posreal), Un_cv un 0 -> - sigT - (fun l:R => Un_cv (fun N:nat => RiemannInt_SF (phi_sequence un pr N)) l). + { l:R | Un_cv (fun N:nat => RiemannInt_SF (phi_sequence un pr N)) l }. Proof. intros f; intros; apply RiemannInt_P3 with - f un (fun n:nat => projT1 (phi_sequence_prop un pr n)); - [ apply H | intro; apply (projT2 (phi_sequence_prop un pr n)) ]. + f un (fun n:nat => proj1_sig (phi_sequence_prop un pr n)); + [ apply H | intro; apply (proj2_sig (phi_sequence_prop un pr n)) ]. Qed. Lemma RiemannInt_P4 : @@ -411,9 +408,7 @@ Qed. (**********) Definition RiemannInt (f:R -> R) (a b:R) (pr:Riemann_integrable f a b) : R := - match RiemannInt_exists pr RinvN RinvN_cv with - | existT a' b' => a' - end. + let (a,_) := RiemannInt_exists pr RinvN RinvN_cv in a. Lemma RiemannInt_P5 : forall (f:R -> R) (a b:R) (pr1 pr2:Riemann_integrable f a b), @@ -433,8 +428,7 @@ Qed. Lemma maxN : forall (a b:R) (del:posreal), - a < b -> - sigT (fun n:nat => a + INR n * del < b /\ b <= a + INR (S n) * del). + a < b -> { n:nat | a + INR n * del < b /\ b <= a + INR (S n) * del }. Proof. intros; set (I := fun n:nat => a + INR n * del < b); assert (H0 : exists n : nat, I n). @@ -478,9 +472,7 @@ Fixpoint SubEquiN (N:nat) (x y:R) (del:posreal) {struct N} : Rlist := end. Definition max_N (a b:R) (del:posreal) (h:a < b) : nat := - match maxN del h with - | existT N H0 => N - end. + let (N,_) := maxN del h in N. Definition SubEqui (a b:R) (del:posreal) (h:a < b) : Rlist := SubEquiN (S (max_N del h)) a b del. @@ -490,12 +482,11 @@ Lemma Heine_cor1 : a < b -> (forall x:R, a <= x <= b -> continuity_pt f x) -> forall eps:posreal, - sigT - (fun delta:posreal => + { delta:posreal | delta <= b - a /\ (forall x y:R, a <= x <= b -> - a <= y <= b -> Rabs (x - y) < delta -> Rabs (f x - f y) < eps)). + a <= y <= b -> Rabs (x - y) < delta -> Rabs (f x - f y) < eps) }. Proof. intro f; intros; set @@ -520,7 +511,7 @@ Proof. | intros; apply H3; try assumption; apply Rlt_le_trans with (Rmin x (b - a)); [ assumption | apply Rmin_l ] ]. assert (H3 := completeness E H1 H2); elim H3; intros; cut (0 < x <= b - a). - intro; elim H4; clear H4; intros; apply existT with (mkposreal _ H4); split. + intro; elim H4; clear H4; intros; exists (mkposreal _ H4); split. apply H5. unfold is_lub in p; elim p; intros; unfold is_upper_bound in H6; set (D := Rabs (x0 - y)); elim (classic (exists y : R, D < y /\ E y)); @@ -549,22 +540,21 @@ Lemma Heine_cor2 : forall (f:R -> R) (a b:R), (forall x:R, a <= x <= b -> continuity_pt f x) -> forall eps:posreal, - sigT - (fun delta:posreal => + { delta:posreal | forall x y:R, a <= x <= b -> - a <= y <= b -> Rabs (x - y) < delta -> Rabs (f x - f y) < eps). + a <= y <= b -> Rabs (x - y) < delta -> Rabs (f x - f y) < eps }. Proof. intro f; intros; case (total_order_T a b); intro. elim s; intro. - assert (H0 := Heine_cor1 a0 H eps); elim H0; intros; apply existT with x; + assert (H0 := Heine_cor1 a0 H eps); elim H0; intros; exists x; elim p; intros; apply H2; assumption. - apply existT with (mkposreal _ Rlt_0_1); intros; assert (H3 : x = y); + exists (mkposreal _ Rlt_0_1); intros; assert (H3 : x = y); [ elim H0; elim H1; intros; rewrite b0 in H3; rewrite b0 in H5; apply Rle_antisym; apply Rle_trans with b; assumption | rewrite H3; unfold Rminus in |- *; rewrite Rplus_opp_r; rewrite Rabs_R0; apply (cond_pos eps) ]. - apply existT with (mkposreal _ Rlt_0_1); intros; elim H0; intros; + exists (mkposreal _ Rlt_0_1); intros; elim H0; intros; elim (Rlt_irrefl _ (Rle_lt_trans _ _ _ (Rle_trans _ _ _ H3 H4) r)). Qed. @@ -664,15 +654,14 @@ Qed. Lemma SubEqui_P9 : forall (a b:R) (del:posreal) (f:R -> R) (h:a < b), - sigT - (fun g:StepFun a b => + { g:StepFun a b | g b = f b /\ (forall i:nat, (i < pred (Rlength (SubEqui del h)))%nat -> constant_D_eq g (co_interval (pos_Rl (SubEqui del h) i) (pos_Rl (SubEqui del h) (S i))) - (f (pos_Rl (SubEqui del h) i)))). + (f (pos_Rl (SubEqui del h) i))) }. Proof. intros; apply StepFun_P38; [ apply SubEqui_P7 | apply SubEqui_P1 | apply SubEqui_P2 ]. @@ -1003,11 +992,11 @@ Proof. do 2 rewrite (Rmult_comm 3); repeat rewrite Rmult_assoc; rewrite <- Rinv_l_sym; [ ring | discrR ] | discrR ]. - split with (fun n:nat => projT1 (phi_sequence_prop RinvN pr2 n)); intro; + split with (fun n:nat => proj1_sig (phi_sequence_prop RinvN pr2 n)); intro; rewrite Rmin_comm; rewrite RmaxSym; - apply (projT2 (phi_sequence_prop RinvN pr2 n)). - split with (fun n:nat => projT1 (phi_sequence_prop RinvN pr1 n)); intro; - apply (projT2 (phi_sequence_prop RinvN pr1 n)). + apply (proj2_sig (phi_sequence_prop RinvN pr2 n)). + split with (fun n:nat => proj1_sig (phi_sequence_prop RinvN pr1 n)); intro; + apply (proj2_sig (phi_sequence_prop RinvN pr1 n)). Qed. Lemma RiemannInt_P9 : @@ -1272,11 +1261,11 @@ Proof. case (RiemannInt_exists pr1 RinvN RinvN_cv); intros; eapply UL_sequence; [ apply u0 - | set (psi1 := fun n:nat => projT1 (phi_sequence_prop RinvN pr1 n)); - set (psi2 := fun n:nat => projT1 (phi_sequence_prop RinvN pr3 n)); + | set (psi1 := fun n:nat => proj1_sig (phi_sequence_prop RinvN pr1 n)); + set (psi2 := fun n:nat => proj1_sig (phi_sequence_prop RinvN pr3 n)); apply RiemannInt_P11 with f RinvN (phi_sequence RinvN pr1) psi1 psi2; [ apply RinvN_cv - | intro; apply (projT2 (phi_sequence_prop RinvN pr1 n)) + | intro; apply (proj2_sig (phi_sequence_prop RinvN pr1 n)) | intro; assert (H1 : @@ -1284,7 +1273,7 @@ Proof. Rmin a b <= t /\ t <= Rmax a b -> Rabs (f t + l * g t - phi_sequence RinvN pr3 n t) <= psi2 n t) /\ Rabs (RiemannInt_SF (psi2 n)) < RinvN n); - [ apply (projT2 (phi_sequence_prop RinvN pr3 n)) + [ apply (proj2_sig (phi_sequence_prop RinvN pr3 n)) | elim H1; intros; split; try assumption; intros; replace (f t) with (f t + l * g t); [ apply H2; assumption | rewrite H0; ring ] ] @@ -1360,8 +1349,8 @@ Proof. Rmin a b <= t /\ t <= Rmax a b -> Rabs (f t - phi_sequence RinvN pr1 n t) <= psi1 n t) /\ Rabs (RiemannInt_SF (psi1 n)) < RinvN n)). - split with (fun n:nat => projT1 (phi_sequence_prop RinvN pr1 n)); intro; - apply (projT2 (phi_sequence_prop RinvN pr1 n0)). + split with (fun n:nat => proj1_sig (phi_sequence_prop RinvN pr1 n)); intro; + apply (proj2_sig (phi_sequence_prop RinvN pr1 n0)). assert (H8 : exists psi2 : nat -> StepFun a b, @@ -1370,8 +1359,8 @@ Proof. Rmin a b <= t /\ t <= Rmax a b -> Rabs (g t - phi_sequence RinvN pr2 n t) <= psi2 n t) /\ Rabs (RiemannInt_SF (psi2 n)) < RinvN n)). - split with (fun n:nat => projT1 (phi_sequence_prop RinvN pr2 n)); intro; - apply (projT2 (phi_sequence_prop RinvN pr2 n0)). + split with (fun n:nat => proj1_sig (phi_sequence_prop RinvN pr2 n)); intro; + apply (proj2_sig (phi_sequence_prop RinvN pr2 n0)). assert (H9 : exists psi3 : nat -> StepFun a b, @@ -1380,8 +1369,8 @@ Proof. Rmin a b <= t /\ t <= Rmax a b -> Rabs (f t + l * g t - phi_sequence RinvN pr3 n t) <= psi3 n t) /\ Rabs (RiemannInt_SF (psi3 n)) < RinvN n)). - split with (fun n:nat => projT1 (phi_sequence_prop RinvN pr3 n)); intro; - apply (projT2 (phi_sequence_prop RinvN pr3 n0)). + split with (fun n:nat => proj1_sig (phi_sequence_prop RinvN pr3 n)); intro; + apply (proj2_sig (phi_sequence_prop RinvN pr3 n0)). elim H7; clear H7; intros psi1 H7; elim H8; clear H8; intros psi2 H8; elim H9; clear H9; intros psi3 H9; replace @@ -1552,8 +1541,8 @@ Proof. Rmin a b <= t /\ t <= Rmax a b -> Rabs (f t - phi_sequence RinvN pr n t) <= psi1 n t) /\ Rabs (RiemannInt_SF (psi1 n)) < RinvN n)). - split with (fun n:nat => projT1 (phi_sequence_prop RinvN pr n)); intro; - apply (projT2 (phi_sequence_prop RinvN pr n)). + split with (fun n:nat => proj1_sig (phi_sequence_prop RinvN pr n)); intro; + apply (proj2_sig (phi_sequence_prop RinvN pr n)). elim H1; clear H1; intros psi1 H1; set (phi2 := fun n:nat => mkStepFun (StepFun_P4 a b c)); set (psi2 := fun n:nat => mkStepFun (StepFun_P4 a b 0)); @@ -1647,8 +1636,8 @@ Proof. Rmin a b <= t /\ t <= Rmax a b -> Rabs (Rabs (f t) - phi3 n t) <= psi3 n t) /\ Rabs (RiemannInt_SF (psi3 n)) < RinvN n)). - split with (fun n:nat => projT1 (phi_sequence_prop RinvN pr2 n)); intro; - apply (projT2 (phi_sequence_prop RinvN pr2 n)). + split with (fun n:nat => proj1_sig (phi_sequence_prop RinvN pr2 n)); intro; + apply (proj2_sig (phi_sequence_prop RinvN pr2 n)). assert (H1 : exists psi2 : nat -> StepFun a b, @@ -1664,8 +1653,8 @@ Proof. (forall t:R, Rmin a b <= t /\ t <= Rmax a b -> Rabs (f t - phi1 n t) <= psi2 n t) /\ Rabs (RiemannInt_SF (psi2 n)) < RinvN n)). - split with (fun n:nat => projT1 (phi_sequence_prop RinvN pr1 n)); intro; - apply (projT2 (phi_sequence_prop RinvN pr1 n)). + split with (fun n:nat => proj1_sig (phi_sequence_prop RinvN pr1 n)); intro; + apply (proj2_sig (phi_sequence_prop RinvN pr1 n)). elim H1; clear H1; intros psi2 H1; split with psi2; intros; elim (H1 n); clear H1; intros; split; try assumption. intros; unfold phi2 in |- *; simpl in |- *; @@ -1698,8 +1687,8 @@ Proof. Rmin a b <= t /\ t <= Rmax a b -> Rabs (f t - phi1 n t) <= psi1 n t) /\ Rabs (RiemannInt_SF (psi1 n)) < RinvN n)). - split with (fun n:nat => projT1 (phi_sequence_prop RinvN pr1 n)); intro; - apply (projT2 (phi_sequence_prop RinvN pr1 n)). + split with (fun n:nat => proj1_sig (phi_sequence_prop RinvN pr1 n)); intro; + apply (proj2_sig (phi_sequence_prop RinvN pr1 n)). elim H1; clear H1; intros psi1 H1; set (phi2 := fun N:nat => phi_sequence RinvN pr2 N). set @@ -1722,8 +1711,8 @@ Proof. (forall t:R, Rmin a b <= t /\ t <= Rmax a b -> Rabs (g t - phi2 n t) <= psi2 n t) /\ Rabs (RiemannInt_SF (psi2 n)) < RinvN n)). - split with (fun n:nat => projT1 (phi_sequence_prop RinvN pr2 n)); intro; - apply (projT2 (phi_sequence_prop RinvN pr2 n)). + split with (fun n:nat => proj1_sig (phi_sequence_prop RinvN pr2 n)); intro; + apply (proj2_sig (phi_sequence_prop RinvN pr2 n)). elim H2; clear H2; intros psi2 H2; apply RiemannInt_P11 with f RinvN phi2_m psi2 psi1; try assumption. @@ -2378,8 +2367,8 @@ Proof. Rmin a b <= t /\ t <= Rmax a b -> Rabs (f t - phi_sequence RinvN pr1 n t) <= psi1 n t) /\ Rabs (RiemannInt_SF (psi1 n)) < RinvN n)). - split with (fun n:nat => projT1 (phi_sequence_prop RinvN pr1 n)); intro; - apply (projT2 (phi_sequence_prop RinvN pr1 n)). + split with (fun n:nat => proj1_sig (phi_sequence_prop RinvN pr1 n)); intro; + apply (proj2_sig (phi_sequence_prop RinvN pr1 n)). assert (H2 : exists psi2 : nat -> StepFun b c, @@ -2388,8 +2377,8 @@ Proof. Rmin b c <= t /\ t <= Rmax b c -> Rabs (f t - phi_sequence RinvN pr2 n t) <= psi2 n t) /\ Rabs (RiemannInt_SF (psi2 n)) < RinvN n)). - split with (fun n:nat => projT1 (phi_sequence_prop RinvN pr2 n)); intro; - apply (projT2 (phi_sequence_prop RinvN pr2 n)). + split with (fun n:nat => proj1_sig (phi_sequence_prop RinvN pr2 n)); intro; + apply (proj2_sig (phi_sequence_prop RinvN pr2 n)). assert (H3 : exists psi3 : nat -> StepFun a c, @@ -2398,8 +2387,8 @@ Proof. Rmin a c <= t /\ t <= Rmax a c -> Rabs (f t - phi_sequence RinvN pr3 n t) <= psi3 n t) /\ Rabs (RiemannInt_SF (psi3 n)) < RinvN n)). - split with (fun n:nat => projT1 (phi_sequence_prop RinvN pr3 n)); intro; - apply (projT2 (phi_sequence_prop RinvN pr3 n)). + split with (fun n:nat => proj1_sig (phi_sequence_prop RinvN pr3 n)); intro; + apply (proj2_sig (phi_sequence_prop RinvN pr3 n)). elim H1; clear H1; intros psi1 H1; elim H2; clear H2; intros psi2 H2; elim H3; clear H3; intros psi3 H3; assert (H := RinvN_cv); unfold Un_cv in |- *; intros; assert (H4 : 0 < eps / 3). @@ -3259,7 +3248,7 @@ Lemma RiemannInt_P30 : forall (f:R -> R) (a b:R), a <= b -> (forall x:R, a <= x <= b -> continuity_pt f x) -> - sigT (fun g:R -> R => antiderivative f g a b). + { g:R -> R | antiderivative f g a b }. Proof. intros; split with (primitive H (FTC_P1 H H0)); apply RiemannInt_P29. Qed. diff --git a/theories/Reals/RiemannInt_SF.v b/theories/Reals/RiemannInt_SF.v index 0f91d006..7a02544e 100644 --- a/theories/Reals/RiemannInt_SF.v +++ b/theories/Reals/RiemannInt_SF.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: RiemannInt_SF.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: RiemannInt_SF.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. @@ -31,7 +31,7 @@ Qed. Lemma Nzorn : forall I:nat -> Prop, (exists n : nat, I n) -> - Nbound I -> sigT (fun n:nat => I n /\ (forall i:nat, I i -> (i <= n)%nat)). + Nbound I -> { n:nat | I n /\ (forall i:nat, I i -> (i <= n)%nat) }. Proof. intros I H H0; set (E := fun x:R => exists i : nat, I i /\ INR i = x); assert (H1 : bound E). @@ -133,10 +133,10 @@ Definition adapted_couple_opt (f:R -> R) (a b:R) (l lf:Rlist) := (forall i:nat, (i < pred (Rlength l))%nat -> pos_Rl l i <> pos_Rl l (S i)). Definition is_subdivision (f:R -> R) (a b:R) (l:Rlist) : Type := - sigT (fun l0:Rlist => adapted_couple f a b l l0). + { l0:Rlist & adapted_couple f a b l l0 }. Definition IsStepFun (f:R -> R) (a b:R) : Type := - sigT (fun l:Rlist => is_subdivision f a b l). + { l:Rlist & is_subdivision f a b l }. (** ** Class of step functions *) Record StepFun (a b:R) : Type := mkStepFun @@ -1779,13 +1779,12 @@ Lemma StepFun_P38 : ordered_Rlist l -> pos_Rl l 0 = a -> pos_Rl l (pred (Rlength l)) = b -> - sigT - (fun g:StepFun a b => + { g:StepFun a b | g b = f b /\ (forall i:nat, (i < pred (Rlength l))%nat -> constant_D_eq g (co_interval (pos_Rl l i) (pos_Rl l (S i))) - (f (pos_Rl l i)))). + (f (pos_Rl l i))) }. Proof. intros l a b f; generalize a; clear a; induction l. intros a H H0 H1; simpl in H0; simpl in H1; @@ -2206,21 +2205,10 @@ Lemma StepFun_P43 : RiemannInt_SF (mkStepFun pr1) + RiemannInt_SF (mkStepFun pr2) = RiemannInt_SF (mkStepFun pr3). Proof. - intros f; intros; - assert - (H1 : - sigT (fun l:Rlist => sigT (fun l0:Rlist => adapted_couple f a b l l0))). - apply pr1. - assert - (H2 : - sigT (fun l:Rlist => sigT (fun l0:Rlist => adapted_couple f b c l l0))). - apply pr2. - assert - (H3 : - sigT (fun l:Rlist => sigT (fun l0:Rlist => adapted_couple f a c l l0))). - apply pr3. - elim H1; clear H1; intros l1 [lf1 H1]; elim H2; clear H2; intros l2 [lf2 H2]; - elim H3; clear H3; intros l3 [lf3 H3]. + intros f; intros. + pose proof pr1 as (l1,(lf1,H1)). + pose proof pr2 as (l2,(lf2,H2)). + pose proof pr3 as (l3,(lf3,H3)). replace (RiemannInt_SF (mkStepFun pr1)) with match Rle_dec a b with | left _ => Int_SF lf1 l1 @@ -2462,7 +2450,7 @@ Proof. (forall (l1 lf1:Rlist) (a b c:R) (f:R -> R), adapted_couple f a b l1 lf1 -> a <= c <= b -> - sigT (fun l:Rlist => sigT (fun l0:Rlist => adapted_couple f a c l l0))). + { l:Rlist & { l0:Rlist & adapted_couple f a c l l0 } }). intro X; unfold IsStepFun in |- *; unfold is_subdivision in |- *; eapply X. apply H2. split; assumption. @@ -2578,7 +2566,7 @@ Proof. (forall (l1 lf1:Rlist) (a b c:R) (f:R -> R), adapted_couple f a b l1 lf1 -> a <= c <= b -> - sigT (fun l:Rlist => sigT (fun l0:Rlist => adapted_couple f c b l l0))). + { l:Rlist & { l0:Rlist & adapted_couple f c b l l0 } }). intro X; unfold IsStepFun in |- *; unfold is_subdivision in |- *; eapply X; [ apply H2 | split; assumption ]. clear f a b c H0 H H1 H2 l1 lf1; simple induction l1. diff --git a/theories/Reals/Rlimit.v b/theories/Reals/Rlimit.v index 76579ccb..1a2fa03a 100644 --- a/theories/Reals/Rlimit.v +++ b/theories/Reals/Rlimit.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Rlimit.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Rlimit.v 10710 2008-03-23 09:24:09Z herbelin $ i*) (*********************************************************) (** Definition of the limit *) @@ -16,7 +16,8 @@ Require Import Rbase. Require Import Rfunctions. Require Import Classical_Prop. -Require Import Fourier. Open Local Scope R_scope. +Require Import Fourier. +Open Local Scope R_scope. (*******************************) (** * Calculus *) @@ -560,9 +561,9 @@ Proof. | apply Rlt_le_trans with (Rmin delta1 delta2); [ assumption | apply Rmin_l ] ]. change (0 < eps * (Rsqr l / 2)) in |- *; unfold Rdiv in |- *; - repeat rewrite Rmult_assoc; repeat apply Rmult_lt_0_compat. + repeat rewrite Rmult_assoc; apply Rmult_lt_0_compat. assumption. - apply Rsqr_pos_lt; assumption. + apply Rmult_lt_0_compat. apply Rsqr_pos_lt; assumption. apply Rinv_0_lt_compat; cut (0%nat <> 2%nat); [ intro H3; generalize (lt_INR_0 2 (neq_O_lt 2 H3)); unfold INR in |- *; intro; assumption diff --git a/theories/Reals/Rlogic.v b/theories/Reals/Rlogic.v new file mode 100644 index 00000000..8aadf8f5 --- /dev/null +++ b/theories/Reals/Rlogic.v @@ -0,0 +1,293 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Prop. +Hypothesis HP : forall n, {P n} + {~P n}. + +Let ge_fun_sums_ge_lemma : (forall (m n : nat) (f : nat -> R), (lt m n) -> (forall i : nat, 0 <= f i) -> sum_f_R0 f m <= sum_f_R0 f n). +intros m n f mn fpos. +replace (sum_f_R0 f m) with (sum_f_R0 f m + 0) by ring. +rewrite (tech2 f m n mn). +apply Rplus_le_compat_l. + induction (n - S m)%nat; simpl in *. + apply fpos. +replace 0 with (0 + 0) by ring. +apply (Rplus_le_compat _ _ _ _ IHn0 (fpos (S (m + S n0)%nat))). +Qed. + +Let ge_fun_sums_ge : (forall (m n : nat) (f : nat -> R), (le m n) -> (forall i : nat, 0 <= f i) -> sum_f_R0 f m <= sum_f_R0 f n). +intros m n f mn pos. + elim (le_lt_or_eq _ _ mn). + intro; apply ge_fun_sums_ge_lemma; assumption. +intro H; rewrite H; auto with *. +Qed. + +Let f:=fun n => (if HP n then (1/2)^n else 0)%R. + +Lemma cauchy_crit_geometric_dec_fun : Cauchy_crit_series f. +intros e He. +assert (X:(Pser (fun n:nat => 1) (1/2) (/ (1 - (1/2))))%R). + apply GP_infinite. + apply Rabs_def1; fourier. +assert (He':e/2 > 0) by fourier. +destruct (X _ He') as [N HN]. +clear X. +exists N. +intros n m Hn Hm. +replace e with (e/2 + e/2)%R by field. +set (g:=(fun n0 : nat => 1 * (1 / 2) ^ n0)) in *. +assert (R_dist (sum_f_R0 g n) (sum_f_R0 g m) < e / 2 + e / 2). + apply Rle_lt_trans with (R_dist (sum_f_R0 g n) 2+R_dist 2 (sum_f_R0 g m))%R. + apply R_dist_tri. + replace (/(1 - 1/2)) with 2 in HN by field. + cut (forall n, (n >= N)%nat -> R_dist (sum_f_R0 g n) 2 < e/2)%R. + intros Z. + apply Rplus_lt_compat. + apply Z; assumption. + rewrite R_dist_sym. + apply Z; assumption. + clear - HN He. + intros n Hn. + apply HN. + auto. +eapply Rle_lt_trans;[|apply H]. +clear -ge_fun_sums_ge n. +cut (forall n m, (m <= n)%nat -> R_dist (sum_f_R0 f n) (sum_f_R0 f m) <= R_dist (sum_f_R0 g n) (sum_f_R0 g m)). + intros H. + destruct (le_lt_dec m n). + apply H; assumption. + rewrite R_dist_sym. + rewrite (R_dist_sym (sum_f_R0 g n)). + apply H; auto with *. +clear n m. +intros n m Hnm. +unfold R_dist. +cut (forall i : nat, (1 / 2) ^ i >= 0). intro RPosPow. +rewrite Rabs_pos_eq. + rewrite Rabs_pos_eq. + cut (sum_f_R0 g m - sum_f_R0 f m <= sum_f_R0 g n - sum_f_R0 f n). + intros; fourier. + do 2 rewrite <- minus_sum. + apply (ge_fun_sums_ge m n (fun i : nat => g i - f i) Hnm). + intro i. + unfold f, g. + elim (HP i); intro; ring_simplify; auto with *. + cut (sum_f_R0 g m <= sum_f_R0 g n). + intro; fourier. + apply (ge_fun_sums_ge m n g Hnm). + intro. unfold g. + ring_simplify. + apply Rge_le. + apply RPosPow. + cut (sum_f_R0 f m <= sum_f_R0 f n). + intro; fourier. + apply (ge_fun_sums_ge m n f Hnm). + intro; unfold f. + elim (HP i); intro; simpl. + apply Rge_le. + apply RPosPow. + auto with *. +intro i. +apply Rle_ge. +apply pow_le. +fourier. +Qed. + +Lemma forall_dec : {forall n, P n} + {~forall n, P n}. +Proof. +destruct (cv_cauchy_2 _ cauchy_crit_geometric_dec_fun). + cut (2 <= x <-> forall n : nat, P n). + intro H. + elim (Rle_dec 2 x); intro X. + left; tauto. + right; tauto. +assert (A:Rabs(1/2) < 1) by (apply Rabs_def1; fourier). +assert (A0:=(GP_infinite (1/2) A)). +symmetry. + split; intro. + replace 2 with (/ (1 - (1 / 2))) by field. + unfold Pser, infinite_sum in A0. + eapply Rle_cv_lim;[|unfold Un_cv; apply A0 |apply u]. + intros n. + clear -n H. + induction n; unfold f;simpl. + destruct (HP 0); auto with *. + elim n; auto. + apply Rplus_le_compat; auto. + destruct (HP (S n)); auto with *. + elim n0; auto. +intros n. +destruct (HP n); auto. +elim (RIneq.Rle_not_lt _ _ H). +assert (B:0< (1/2)^n). + apply pow_lt. + fourier. +apply Rle_lt_trans with (2-(1/2)^n);[|fourier]. +replace (/(1-1/2))%R with 2 in A0 by field. +set (g:= fun m => if (eq_nat_dec m n) then (1/2)^n else 0). +assert (Z: Un_cv (fun N : nat => sum_f_R0 g N) ((1/2)^n)). + intros e He. + exists n. + intros a Ha. + replace (sum_f_R0 g a) with ((1/2)^n). + rewrite (R_dist_eq); assumption. + symmetry. + cut (forall a : nat, ((a >= n)%nat -> sum_f_R0 g a = (1 / 2) ^ n) /\ ((a < n)%nat -> sum_f_R0 g a = 0))%R. + intros H0. + destruct (H0 a). + auto. + clear - g. + induction a. + split; + intros H; + simpl; unfold g; + destruct (eq_nat_dec 0 n); try reflexivity. + elim f; auto with *. + elimtype False; omega. + destruct IHa as [IHa0 IHa1]. + split; + intros H; + simpl; unfold g at 2; + destruct (eq_nat_dec (S a) n). + rewrite IHa1. + ring. + omega. + ring_simplify. + apply IHa0. + omega. + elimtype False; omega. + ring_simplify. + apply IHa1. + omega. +assert (C:=CV_minus _ _ _ _ A0 Z). +eapply Rle_cv_lim;[|apply u |apply C]. +clear - n0 B. +intros m. +simpl. +induction m. + simpl. + unfold f, g. + destruct (eq_nat_dec 0 n). + destruct (HP 0). + elim n0. + congruence. + clear -n. + induction n; simpl; fourier. + destruct (HP); simpl; fourier. +cut (f (S m) <= 1 * ((1 / 2) ^ (S m)) - g (S m)). + intros L. + eapply Rle_trans. + simpl. + apply Rplus_le_compat. + apply IHm. + apply L. + simpl; fourier. +unfold f, g. +destruct (eq_nat_dec (S m) n). + destruct (HP (S m)). + elim n0. + congruence. + rewrite e. + fourier. +destruct (HP (S m)). + fourier. +ring_simplify. +apply pow_le. +fourier. +Qed. + +Lemma sig_forall_dec : {n | ~P n}+{forall n, P n}. +destruct forall_dec. + right; assumption. +left. +apply constructive_indefinite_description_nat; auto. + clear - HP. + firstorder. +apply Classical_Pred_Type.not_all_ex_not. +assumption. +Qed. + +End Arithmetical_dec. + +(** 2- Derivability of the Archimedean axiom *) + +(* This is a standard proof (it has been taken from PlanetMath). It is +formulated negatively so as to avoid the need for classical +logic. Using a proof of {n | ~P n}+{forall n, P n} (the one above or a +variant of it that does not need classical axioms) , we can in +principle also derive [up] and its [specification] *) + +Theorem not_not_archimedean : + forall r : R, ~ (forall n : nat, (INR n <= r)%R). +intros r H. +set (E := fun r => exists n : nat, r = INR n). +assert (exists x : R, E x) by + (exists 0%R; simpl; red; exists 0%nat; reflexivity). +assert (bound E) by (exists r; intros x (m,H2); rewrite H2; apply H). +destruct (completeness E) as (M,(H3,H4)); try assumption. +set (M' := (M + -1)%R). +assert (H2 : ~ is_upper_bound E M'). + intro H5. + assert (M <= M')%R by (apply H4; exact H5). + apply (Rlt_not_le M M'). + unfold M' in |- *. + pattern M at 2 in |- *. + rewrite <- Rplus_0_l. + pattern (0 + M)%R in |- *. + rewrite Rplus_comm. + rewrite <- (Rplus_opp_r 1). + apply Rplus_lt_compat_l. + rewrite Rplus_comm. + apply Rlt_plus_1. + assumption. +apply H2. +intros N (n,H7). +rewrite H7. +unfold M' in |- *. +assert (H5 : (INR (S n) <= M)%R) by (apply H3; exists (S n); reflexivity). +rewrite S_INR in H5. +assert (H6 : (INR n + 1 + -1 <= M + -1)%R). + apply Rplus_le_compat_r. + assumption. +rewrite Rplus_assoc in H6. +rewrite Rplus_opp_r in H6. +rewrite (Rplus_comm (INR n) 0) in H6. +rewrite Rplus_0_l in H6. +assumption. +Qed. diff --git a/theories/Reals/Rpow_def.v b/theories/Reals/Rpow_def.v index 5bdbb76b..90ea9726 100644 --- a/theories/Reals/Rpow_def.v +++ b/theories/Reals/Rpow_def.v @@ -1,3 +1,13 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Prop) (x y:R), P x -> P y -> P (Rmin x y). Proof. @@ -90,7 +91,7 @@ Proof. replace (/ INR (fact n)) with (1 ^ n / INR (fact n)). apply (H2 _ H3). unfold Rdiv in |- *; rewrite pow1; rewrite Rmult_1_l; reflexivity. - unfold infinit_sum in e; unfold Un_cv, tg_alt in |- *; intros; elim (e _ H0); + unfold infinite_sum in e; unfold Un_cv, tg_alt in |- *; intros; elim (e _ H0); intros; exists x0; intros; replace (sum_f_R0 (fun i:nat => (-1) ^ i * / INR (fact i)) n) with (sum_f_R0 (fun i:nat => / INR (fact i) * (-1) ^ i) n). @@ -150,62 +151,59 @@ Proof. symmetry in |- *; apply derive_pt_eq_0; apply derivable_pt_lim_exp. Qed. -Lemma ln_exists1 : forall y:R, 0 < y -> 1 <= y -> sigT (fun z:R => y = exp z). +Lemma ln_exists1 : forall y:R, 1 <= y -> { z:R | y = exp z }. Proof. - intros; set (f := fun x:R => exp x - y); cut (f 0 <= 0). - intro; cut (continuity f). - intro; cut (0 <= f y). - intro; cut (f 0 * f y <= 0). - intro; assert (X := IVT_cor f 0 y H2 (Rlt_le _ _ H) H4); elim X; intros t H5; - apply existT with t; elim H5; intros; unfold f in H7; - apply Rminus_diag_uniq_sym; exact H7. + intros; set (f := fun x:R => exp x - y). + assert (H0 : 0 < y) by (apply Rlt_le_trans with 1; auto with real). + cut (f 0 <= 0); [intro H1|]. + cut (continuity f); [intro H2|]. + cut (0 <= f y); [intro H3|]. + cut (f 0 * f y <= 0); [intro H4|]. + pose proof (IVT_cor f 0 y H2 (Rlt_le _ _ H0) H4) as (t,(_,H7)); + exists t; unfold f in H7; apply Rminus_diag_uniq_sym; exact H7. pattern 0 at 2 in |- *; rewrite <- (Rmult_0_r (f y)); rewrite (Rmult_comm (f 0)); apply Rmult_le_compat_l; assumption. unfold f in |- *; apply Rplus_le_reg_l with y; left; apply Rlt_trans with (1 + y). rewrite <- (Rplus_comm y); apply Rplus_lt_compat_l; apply Rlt_0_1. - replace (y + (exp y - y)) with (exp y); [ apply (exp_ineq1 y H) | ring ]. + replace (y + (exp y - y)) with (exp y); [ apply (exp_ineq1 y H0) | ring ]. unfold f in |- *; change (continuity (exp - fct_cte y)) in |- *; apply continuity_minus; [ apply derivable_continuous; apply derivable_exp | apply derivable_continuous; apply derivable_const ]. unfold f in |- *; rewrite exp_0; apply Rplus_le_reg_l with y; - rewrite Rplus_0_r; replace (y + (1 - y)) with 1; [ apply H0 | ring ]. + rewrite Rplus_0_r; replace (y + (1 - y)) with 1; [ apply H | ring ]. Qed. (**********) -Lemma ln_exists : forall y:R, 0 < y -> sigT (fun z:R => y = exp z). +Lemma ln_exists : forall y:R, 0 < y -> { z:R | y = exp z }. Proof. intros; case (Rle_dec 1 y); intro. - apply (ln_exists1 _ H r). + apply (ln_exists1 _ r). assert (H0 : 1 <= / y). apply Rmult_le_reg_l with y. apply H. rewrite <- Rinv_r_sym. rewrite Rmult_1_r; left; apply (Rnot_le_lt _ _ n). red in |- *; intro; rewrite H0 in H; elim (Rlt_irrefl _ H). - assert (H1 : 0 < / y). - apply Rinv_0_lt_compat; apply H. - assert (H2 := ln_exists1 _ H1 H0); elim H2; intros; apply existT with (- x); + destruct (ln_exists1 _ H0) as (x,p); exists (- x); apply Rmult_eq_reg_l with (exp x / y). unfold Rdiv in |- *; rewrite Rmult_assoc; rewrite <- Rinv_l_sym. rewrite Rmult_1_r; rewrite <- (Rmult_comm (/ y)); rewrite Rmult_assoc; rewrite <- exp_plus; rewrite Rplus_opp_r; rewrite exp_0; rewrite Rmult_1_r; symmetry in |- *; apply p. - red in |- *; intro; rewrite H3 in H; elim (Rlt_irrefl _ H). + red in |- *; intro H3; rewrite H3 in H; elim (Rlt_irrefl _ H). unfold Rdiv in |- *; apply prod_neq_R0. - assert (H3 := exp_pos x); red in |- *; intro; rewrite H4 in H3; + assert (H3 := exp_pos x); red in |- *; intro H4; rewrite H4 in H3; elim (Rlt_irrefl _ H3). - apply Rinv_neq_0_compat; red in |- *; intro; rewrite H3 in H; + apply Rinv_neq_0_compat; red in |- *; intro H3; rewrite H3 in H; elim (Rlt_irrefl _ H). Qed. (* Definition of log R+* -> R *) Definition Rln (y:posreal) : R := - match ln_exists (pos y) (cond_pos y) with - | existT a b => a - end. + let (a,_) := ln_exists (pos y) (cond_pos y) in a. (* Extension on R *) Definition ln (x:R) : R := @@ -403,6 +401,16 @@ Infix Local "^R" := Rpower (at level 30, right associativity) : R_scope. (** * Properties of Rpower *) (******************************************************************) +(** Note: [Rpower] is prolongated to [1] on negative real numbers and + it thus does not extend integer power. The next two lemmas, which + hold for integer power, accidentally hold on negative real numbers + as a side effect of the default value taken on negative real + numbers. Contrastingly, the lemmas that do not hold for the + integer power of a negative number are stated for [Rpower] on the + positive numbers only (even if they accidentally hold due to the + default value of [Rpower] on the negative side, as it is the case + for [Rpower_O]). *) + Theorem Rpower_plus : forall x y z:R, z ^R (x + y) = z ^R x * z ^R y. Proof. intros x y z; unfold Rpower in |- *. @@ -420,7 +428,7 @@ Qed. Theorem Rpower_O : forall x:R, 0 < x -> x ^R 0 = 1. Proof. - intros x H; unfold Rpower in |- *. + intros x _; unfold Rpower in |- *. rewrite Rmult_0_l; apply exp_0. Qed. diff --git a/theories/Reals/Rprod.v b/theories/Reals/Rprod.v index a84d5149..2113cc8f 100644 --- a/theories/Reals/Rprod.v +++ b/theories/Reals/Rprod.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Rprod.v 9298 2006-10-27 13:05:29Z notin $ i*) +(*i $Id: Rprod.v 10146 2007-09-27 12:28:12Z herbelin $ i*) Require Import Compare. Require Import Rbase. @@ -16,41 +16,42 @@ Require Import PartSum. Require Import Binomial. Open Local Scope R_scope. -(** TT Ak; 1<=k<=N *) -Boxed Fixpoint prod_f_SO (An:nat -> R) (N:nat) {struct N} : R := +(** TT Ak; 0<=k<=N *) +Boxed Fixpoint prod_f_R0 (f:nat -> R) (N:nat) {struct N} : R := match N with - | O => 1 - | S p => prod_f_SO An p * An (S p) + | O => f O + | S p => prod_f_R0 f p * f (S p) end. +Notation prod_f_SO := (fun An N => prod_f_R0 (fun n => An (S n)) N). + (**********) Lemma prod_SO_split : forall (An:nat -> R) (n k:nat), - (k <= n)%nat -> - prod_f_SO An n = - prod_f_SO An k * prod_f_SO (fun l:nat => An (k + l)%nat) (n - k). + (k < n)%nat -> + prod_f_R0 An n = + prod_f_R0 An k * prod_f_R0 (fun l:nat => An (k +1+l)%nat) (n - k -1). Proof. intros; induction n as [| n Hrecn]. - cut (k = 0%nat); - [ intro; rewrite H0; simpl in |- *; ring | inversion H; reflexivity ]. - cut (k = S n \/ (k <= n)%nat). - intro; elim H0; intro. - rewrite H1; simpl in |- *; rewrite <- minus_n_n; simpl in |- *; ring. - replace (S n - k)%nat with (S (n - k)). + absurd (k < 0)%nat; omega. + cut (k = n \/ (k < n)%nat);[intro; elim H0; intro|omega]. + replace (S n - k - 1)%nat with O; [rewrite H1; simpl|omega]. + replace (n+1+0)%nat with (S n); ring. + replace (S n - k-1)%nat with (S (n - k-1));[idtac|omega]. simpl in |- *; replace (k + S (n - k))%nat with (S n). + replace (k + 1 + S (n - k - 1))%nat with (S n). rewrite Hrecn; [ ring | assumption ]. omega. omega. - omega. -Qed. +Qed. (**********) Lemma prod_SO_pos : forall (An:nat -> R) (N:nat), - (forall n:nat, (n <= N)%nat -> 0 <= An n) -> 0 <= prod_f_SO An N. + (forall n:nat, (n <= N)%nat -> 0 <= An n) -> 0 <= prod_f_R0 An N. Proof. intros; induction N as [| N HrecN]. - simpl in |- *; left; apply Rlt_0_1. + simpl in |- *; apply H; trivial. simpl in |- *; apply Rmult_le_pos. apply HrecN; intros; apply H; apply le_trans with N; [ assumption | apply le_n_Sn ]. @@ -61,11 +62,11 @@ Qed. Lemma prod_SO_Rle : forall (An Bn:nat -> R) (N:nat), (forall n:nat, (n <= N)%nat -> 0 <= An n <= Bn n) -> - prod_f_SO An N <= prod_f_SO Bn N. + prod_f_R0 An N <= prod_f_R0 Bn N. Proof. intros; induction N as [| N HrecN]. - right; reflexivity. - simpl in |- *; apply Rle_trans with (prod_f_SO An N * Bn (S N)). + elim H with O; trivial. + simpl in |- *; apply Rle_trans with (prod_f_R0 An N * Bn (S N)). apply Rmult_le_compat_l. apply prod_SO_pos; intros; elim (H n (le_trans _ _ _ H0 (le_n_Sn N))); intros; assumption. @@ -79,12 +80,17 @@ Qed. (** Application to factorial *) Lemma fact_prodSO : - forall n:nat, INR (fact n) = prod_f_SO (fun k:nat => INR k) n. + forall n:nat, INR (fact n) = prod_f_R0 (fun k:nat => + (match (eq_nat_dec k 0) with + | left _ => 1%R + | right _ => INR k + end)) n. Proof. intro; induction n as [| n Hrecn]. reflexivity. - change (INR (S n * fact n) = prod_f_SO (fun k:nat => INR k) (S n)) in |- *. - rewrite mult_INR; rewrite Rmult_comm; rewrite Hrecn; reflexivity. + simpl; rewrite <- Hrecn. + case n; auto with real. + intros; repeat rewrite plus_INR;rewrite mult_INR;ring. Qed. Lemma le_n_2n : forall n:nat, (n <= 2 * n)%nat. @@ -104,40 +110,58 @@ Lemma RfactN_fact2N_factk : (k <= 2 * N)%nat -> Rsqr (INR (fact N)) <= INR (fact (2 * N - k)) * INR (fact k). Proof. + assert (forall (n:nat), 0 <= (if eq_nat_dec n 0 then 1 else INR n)). + intros; case (eq_nat_dec n 0); auto with real. + assert (forall (n:nat), (0 < n)%nat -> + (if eq_nat_dec n 0 then 1 else INR n) = INR n). + intros n; case (eq_nat_dec n 0); auto with real. + intros; absurd (0 < n)%nat; omega. intros; unfold Rsqr in |- *; repeat rewrite fact_prodSO. - cut ((k <= N)%nat \/ (N <= k)%nat). - intro; elim H0; intro. - rewrite (prod_SO_split (fun l:nat => INR l) (2 * N - k) N). + cut ((k=N)%nat \/ (k < N)%nat \/ (N < k)%nat). + intro H2; elim H2; intro H3. + rewrite H3; replace (2*N-N)%nat with N;[right; ring|omega]. + case H3; intro; clear H2 H3. + rewrite (prod_SO_split (fun l:nat => if eq_nat_dec l 0 then 1 else INR l) (2 * N - k) N). rewrite Rmult_assoc; apply Rmult_le_compat_l. - apply prod_SO_pos; intros; apply pos_INR. - replace (2 * N - k - N)%nat with (N - k)%nat. - rewrite Rmult_comm; rewrite (prod_SO_split (fun l:nat => INR l) N k). + apply prod_SO_pos; intros; auto. + replace (2 * N - k - N-1)%nat with (N - k-1)%nat. + rewrite Rmult_comm; rewrite (prod_SO_split + (fun l:nat => if eq_nat_dec l 0 then 1 else INR l) N k). apply Rmult_le_compat_l. - apply prod_SO_pos; intros; apply pos_INR. - apply prod_SO_Rle; intros; split. - apply pos_INR. - apply le_INR; apply plus_le_compat_r; assumption. + apply prod_SO_pos; intros; auto. + apply prod_SO_Rle; intros; split; auto. + rewrite H0. + rewrite H0. + apply le_INR; omega. + omega. + omega. assumption. omega. omega. - rewrite <- (Rmult_comm (prod_f_SO (fun l:nat => INR l) k)); - rewrite (prod_SO_split (fun l:nat => INR l) k N). + rewrite <- (Rmult_comm (prod_f_R0 (fun l:nat => + if eq_nat_dec l 0 then 1 else INR l) k)); + rewrite (prod_SO_split (fun l:nat => + if eq_nat_dec l 0 then 1 else INR l) k N). rewrite Rmult_assoc; apply Rmult_le_compat_l. - apply prod_SO_pos; intros; apply pos_INR. + apply prod_SO_pos; intros; auto. rewrite Rmult_comm; - rewrite (prod_SO_split (fun l:nat => INR l) N (2 * N - k)). + rewrite (prod_SO_split (fun l:nat => + if eq_nat_dec l 0 then 1 else INR l) N (2 * N - k)). apply Rmult_le_compat_l. - apply prod_SO_pos; intros; apply pos_INR. - replace (N - (2 * N - k))%nat with (k - N)%nat. - apply prod_SO_Rle; intros; split. - apply pos_INR. - apply le_INR; apply plus_le_compat_r. + apply prod_SO_pos; intros; auto. + replace (N - (2 * N - k)-1)%nat with (k - N-1)%nat. + apply prod_SO_Rle; intros; split; auto. + rewrite H0. + rewrite H0. + apply le_INR; omega. + omega. omega. omega. omega. assumption. omega. -Qed. +Qed. + (**********) Lemma INR_fact_lt_0 : forall n:nat, 0 < INR (fact n). diff --git a/theories/Reals/Rseries.v b/theories/Reals/Rseries.v index 38c39bae..702aafa4 100644 --- a/theories/Reals/Rseries.v +++ b/theories/Reals/Rseries.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Rseries.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Rseries.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. @@ -194,14 +194,14 @@ Section Isequence. Variable An : nat -> R. (*********) - Definition Pser (x l:R) : Prop := infinit_sum (fun n:nat => An n * x ^ n) l. + Definition Pser (x l:R) : Prop := infinite_sum (fun n:nat => An n * x ^ n) l. End Isequence. Lemma GP_infinite : forall x:R, Rabs x < 1 -> Pser (fun n:nat => 1) x (/ (1 - x)). Proof. - intros; unfold Pser in |- *; unfold infinit_sum in |- *; intros; + intros; unfold Pser in |- *; unfold infinite_sum in |- *; intros; elim (Req_dec x 0). intros; exists 0%nat; intros; rewrite H1; rewrite Rminus_0_r; rewrite Rinv_1; cut (sum_f_R0 (fun n0:nat => 1 * 0 ^ n0) n = 1). diff --git a/theories/Reals/Rsigma.v b/theories/Reals/Rsigma.v index cb31d3b2..7cdd4d02 100644 --- a/theories/Reals/Rsigma.v +++ b/theories/Reals/Rsigma.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Rsigma.v 9551 2007-01-29 15:13:35Z bgregoir $ i*) +(*i $Id: Rsigma.v 9454 2006-12-15 15:30:59Z bgregoir $ i*) Require Import Rbase. Require Import Rfunctions. diff --git a/theories/Reals/Rsqrt_def.v b/theories/Reals/Rsqrt_def.v index 0a9f7754..0a3af6ca 100644 --- a/theories/Reals/Rsqrt_def.v +++ b/theories/Reals/Rsqrt_def.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Rsqrt_def.v 9551 2007-01-29 15:13:35Z bgregoir $ i*) +(*i $Id: Rsqrt_def.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Sumbool. Require Import Rbase. @@ -192,7 +192,7 @@ Qed. Lemma dicho_lb_cv : forall (x y:R) (P:R -> bool), - x <= y -> sigT (fun l:R => Un_cv (dicho_lb x y P) l). + x <= y -> { l:R | Un_cv (dicho_lb x y P) l }. Proof. intros. apply growing_cv. @@ -202,7 +202,7 @@ Qed. Lemma dicho_up_cv : forall (x y:R) (P:R -> bool), - x <= y -> sigT (fun l:R => Un_cv (dicho_up x y P) l). + x <= y -> { l:R | Un_cv (dicho_up x y P) l }. Proof. intros. apply decreasing_cv. @@ -466,7 +466,7 @@ Qed. Lemma IVT : forall (f:R -> R) (x y:R), continuity f -> - x < y -> f x < 0 -> 0 < f y -> sigT (fun z:R => x <= z <= y /\ f z = 0). + x < y -> f x < 0 -> 0 < f y -> { z:R | x <= z <= y /\ f z = 0 }. Proof. intros. cut (x <= y). @@ -478,7 +478,7 @@ Proof. elim X0; intros. assert (H4 := cv_dicho _ _ _ _ _ H3 p0 p). rewrite H4 in p0. - apply existT with x0. + exists x0. split. split. apply Rle_trans with (dicho_lb x y (fun z:R => cond_positivity (f z)) 0). @@ -602,7 +602,7 @@ Qed. Lemma IVT_cor : forall (f:R -> R) (x y:R), continuity f -> - x <= y -> f x * f y <= 0 -> sigT (fun z:R => x <= z <= y /\ f z = 0). + x <= y -> f x * f y <= 0 -> { z:R | x <= z <= y /\ f z = 0 }. Proof. intros. case (total_order_T 0 (f x)); intro. @@ -628,7 +628,7 @@ Proof. cut (0 < (- f)%F y). intros. elim (H3 H5 H4); intros. - apply existT with x0. + exists x0. elim p; intros. split. assumption. @@ -643,7 +643,7 @@ Proof. assumption. rewrite H2 in a. elim (Rlt_irrefl _ (Rlt_trans _ _ _ r a)). - apply existT with x. + exists x. split. split; [ right; reflexivity | assumption ]. symmetry in |- *; assumption. @@ -656,7 +656,7 @@ Proof. assumption. rewrite H2 in r. elim (Rlt_irrefl _ (Rlt_trans _ _ _ r a)). - apply existT with y. + exists y. split. split; [ assumption | right; reflexivity ]. symmetry in |- *; assumption. @@ -670,7 +670,7 @@ Qed. (** We can now define the square root function as the reciprocal transformation of the square root function *) Lemma Rsqrt_exists : - forall y:R, 0 <= y -> sigT (fun z:R => 0 <= z /\ y = Rsqr z). + forall y:R, 0 <= y -> { z:R | 0 <= z /\ y = Rsqr z }. Proof. intros. set (f := fun x:R => Rsqr x - y). @@ -686,7 +686,7 @@ Proof. intro. assert (X := IVT_cor f 0 1 H1 (Rlt_le _ _ Rlt_0_1) H3). elim X; intros t H4. - apply existT with t. + exists t. elim H4; intros. split. elim H5; intros; assumption. @@ -700,7 +700,7 @@ Proof. rewrite Rplus_0_r; rewrite Rplus_comm; unfold Rminus in |- *; rewrite Rplus_assoc; rewrite Rplus_opp_l; rewrite Rplus_0_r; left; assumption. - apply existT with 1. + exists 1. split. left; apply Rlt_0_1. rewrite b; symmetry in |- *; apply Rsqr_1. @@ -710,7 +710,7 @@ Proof. intro. assert (X := IVT_cor f 0 y H1 H H3). elim X; intros t H4. - apply existT with t. + exists t. elim H4; intros. split. elim H5; intros; assumption. @@ -739,9 +739,7 @@ Qed. (* Definition of the square root: R+->R *) Definition Rsqrt (y:nonnegreal) : R := - match Rsqrt_exists (nonneg y) (cond_nonneg y) with - | existT a b => a - end. + let (a,_) := Rsqrt_exists (nonneg y) (cond_nonneg y) in a. (**********) Lemma Rsqrt_positivity : forall x:nonnegreal, 0 <= Rsqrt x. diff --git a/theories/Reals/Rtopology.v b/theories/Reals/Rtopology.v index aa47d72f..9501bc1e 100644 --- a/theories/Reals/Rtopology.v +++ b/theories/Reals/Rtopology.v @@ -6,15 +6,15 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Rtopology.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Rtopology.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. Require Import Ranalysis1. Require Import RList. Require Import Classical_Prop. -Require Import Classical_Pred_Type. Open Local Scope R_scope. - +Require Import Classical_Pred_Type. +Open Local Scope R_scope. (** * General definitions and propositions *) diff --git a/theories/Reals/Rtrigo.v b/theories/Reals/Rtrigo.v index b744c788..0baece39 100644 --- a/theories/Reals/Rtrigo.v +++ b/theories/Reals/Rtrigo.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Rtrigo.v 9551 2007-01-29 15:13:35Z bgregoir $ i*) +(*i $Id: Rtrigo.v 9454 2006-12-15 15:30:59Z bgregoir $ i*) Require Import Rbase. Require Import Rfunctions. diff --git a/theories/Reals/Rtrigo_alt.v b/theories/Reals/Rtrigo_alt.v index 89ee1745..d82bafc6 100644 --- a/theories/Reals/Rtrigo_alt.v +++ b/theories/Reals/Rtrigo_alt.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Rtrigo_alt.v 9551 2007-01-29 15:13:35Z bgregoir $ i*) +(*i $Id: Rtrigo_alt.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. @@ -137,7 +137,7 @@ Proof. ring. assert (X := exist_sin (Rsqr a)); elim X; intros. cut (x = sin a / a). - intro; rewrite H3 in p; unfold sin_in in p; unfold infinit_sum in p; + intro; rewrite H3 in p; unfold sin_in in p; unfold infinite_sum in p; unfold R_dist in p; unfold Un_cv in |- *; unfold R_dist in |- *; intros. cut (0 < eps / Rabs a). @@ -327,7 +327,7 @@ Proof. apply (fun m n p:nat => mult_le_compat_l p n m); apply le_n_S; assumption. assert (X := exist_cos (Rsqr a0)); elim X; intros. cut (x = cos a0). - intro; rewrite H4 in p; unfold cos_in in p; unfold infinit_sum in p; + intro; rewrite H4 in p; unfold cos_in in p; unfold infinite_sum in p; unfold R_dist in p; unfold Un_cv in |- *; unfold R_dist in |- *; intros. elim (p _ H5); intros N H6. diff --git a/theories/Reals/Rtrigo_def.v b/theories/Reals/Rtrigo_def.v index b2aeb766..e94d7448 100644 --- a/theories/Reals/Rtrigo_def.v +++ b/theories/Reals/Rtrigo_def.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Rtrigo_def.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Rtrigo_def.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. @@ -19,7 +19,7 @@ Open Local Scope R_scope. (** * Definition of exponential *) (********************************) Definition exp_in (x l:R) : Prop := - infinit_sum (fun i:nat => / INR (fact i) * x ^ i) l. + infinite_sum (fun i:nat => / INR (fact i) * x ^ i) l. Lemma exp_cof_no_R0 : forall n:nat, / INR (fact n) <> 0. Proof. @@ -28,7 +28,7 @@ Proof. apply INR_fact_neq_0. Qed. -Lemma exist_exp : forall x:R, sigT (fun l:R => exp_in x l). +Lemma exist_exp : forall x:R, { l:R | exp_in x l }. Proof. intro; generalize @@ -37,7 +37,7 @@ Proof. trivial. Defined. -Definition exp (x:R) : R := projT1 (exist_exp x). +Definition exp (x:R) : R := proj1_sig (exist_exp x). Lemma pow_i : forall i:nat, (0 < i)%nat -> 0 ^ i = 0. Proof. @@ -45,11 +45,10 @@ Proof. red in |- *; intro; rewrite H0 in H; elim (lt_irrefl _ H). Qed. -(*i Calculus of $e^0$ *) -Lemma exist_exp0 : sigT (fun l:R => exp_in 0 l). +Lemma exist_exp0 : { l:R | exp_in 0 l }. Proof. - apply existT with 1. - unfold exp_in in |- *; unfold infinit_sum in |- *; intros. + exists 1. + unfold exp_in in |- *; unfold infinite_sum in |- *; intros. exists 0%nat. intros; replace (sum_f_R0 (fun i:nat => / INR (fact i) * 0 ^ i) n) with 1. unfold R_dist in |- *; replace (1 - 1) with 0; @@ -63,6 +62,7 @@ Proof. unfold ge in |- *; apply le_O_n. Defined. +(* Value of [exp 0] *) Lemma exp_0 : exp 0 = 1. Proof. cut (exp_in 0 (exp 0)). @@ -70,8 +70,8 @@ Proof. unfold exp_in in |- *; intros; eapply uniqueness_sum. apply H0. apply H. - exact (projT2 exist_exp0). - exact (projT2 (exist_exp 0)). + exact (proj2_sig exist_exp0). + exact (proj2_sig (exist_exp 0)). Qed. (*****************************************) @@ -235,21 +235,17 @@ Qed. (**********) Definition cos_in (x l:R) : Prop := - infinit_sum (fun i:nat => cos_n i * x ^ i) l. + infinite_sum (fun i:nat => cos_n i * x ^ i) l. (**********) -Lemma exist_cos : forall x:R, sigT (fun l:R => cos_in x l). +Lemma exist_cos : forall x:R, { l:R | cos_in x l }. intro; generalize (Alembert_C3 cos_n x cosn_no_R0 Alembert_cos). unfold Pser, cos_in in |- *; trivial. Qed. (** Definition of cosinus *) -Definition cos (x:R) : R := - match exist_cos (Rsqr x) with - | existT a b => a - end. - +Definition cos (x:R) : R := let (a,_) := exist_cos (Rsqr x) in a. Definition sin_n (n:nat) : R := (-1) ^ n / INR (fact (2 * n + 1)). @@ -348,7 +344,7 @@ Proof. apply INR_eq; repeat rewrite S_INR; rewrite plus_INR; repeat rewrite mult_INR; rewrite plus_INR; rewrite mult_INR; repeat rewrite S_INR; replace (INR 0) with 0; [ ring | reflexivity ]. -Qed. +Defined. Lemma sin_no_R0 : forall n:nat, sin_n n <> 0. Proof. @@ -359,21 +355,18 @@ Qed. (**********) Definition sin_in (x l:R) : Prop := - infinit_sum (fun i:nat => sin_n i * x ^ i) l. + infinite_sum (fun i:nat => sin_n i * x ^ i) l. (**********) -Lemma exist_sin : forall x:R, sigT (fun l:R => sin_in x l). +Lemma exist_sin : forall x:R, { l:R | sin_in x l }. Proof. intro; generalize (Alembert_C3 sin_n x sin_no_R0 Alembert_sin). unfold Pser, sin_n in |- *; trivial. -Qed. +Defined. (***********************) (* Definition of sinus *) -Definition sin (x:R) : R := - match exist_sin (Rsqr x) with - | existT a b => x * a - end. +Definition sin (x:R) : R := let (a,_) := exist_sin (Rsqr x) in x * a. (*********************************************) (** * Properties *) @@ -399,10 +392,10 @@ Proof. intros; ring. Qed. -Lemma exist_cos0 : sigT (fun l:R => cos_in 0 l). +Lemma exist_cos0 : { l:R | cos_in 0 l }. Proof. - apply existT with 1. - unfold cos_in in |- *; unfold infinit_sum in |- *; intros; exists 0%nat. + exists 1. + unfold cos_in in |- *; unfold infinite_sum in |- *; intros; exists 0%nat. intros. unfold R_dist in |- *. induction n as [| n Hrecn]. @@ -417,7 +410,7 @@ Proof. simpl in |- *; ring. Defined. -(* Calculus of (cos 0) *) +(* Value of [cos 0] *) Lemma cos_0 : cos 0 = 1. Proof. cut (cos_in 0 (cos 0)). @@ -425,7 +418,7 @@ Proof. unfold cos_in in |- *; intros; eapply uniqueness_sum. apply H0. apply H. - exact (projT2 exist_cos0). - assert (H := projT2 (exist_cos (Rsqr 0))); unfold cos in |- *; + exact (proj2_sig exist_cos0). + assert (H := proj2_sig (exist_cos (Rsqr 0))); unfold cos in |- *; pattern 0 at 1 in |- *; replace 0 with (Rsqr 0); [ exact H | apply Rsqr_0 ]. Qed. diff --git a/theories/Reals/Rtrigo_fun.v b/theories/Reals/Rtrigo_fun.v index 78ef847f..6eec0329 100644 --- a/theories/Reals/Rtrigo_fun.v +++ b/theories/Reals/Rtrigo_fun.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Rtrigo_fun.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Rtrigo_fun.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. @@ -15,8 +15,7 @@ Open Local Scope R_scope. (*****************************************************************) (** To define transcendental functions *) -(** for exponential function *) -(* *) +(** and exponential function *) (*****************************************************************) (*********) diff --git a/theories/Reals/Rtrigo_reg.v b/theories/Reals/Rtrigo_reg.v index b105ca69..139563bf 100644 --- a/theories/Reals/Rtrigo_reg.v +++ b/theories/Reals/Rtrigo_reg.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Rtrigo_reg.v 9551 2007-01-29 15:13:35Z bgregoir $ i*) +(*i $Id: Rtrigo_reg.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. @@ -25,16 +25,15 @@ Proof. unfold CVN_R in |- *; intros. cut ((r:R) <> 0). intro hyp_r; unfold CVN_r in |- *. - apply existT with (fun n:nat => / INR (fact (2 * n)) * r ^ (2 * n)). + exists (fun n:nat => / INR (fact (2 * n)) * r ^ (2 * n)). cut - (sigT - (fun l:R => + { l:R | Un_cv (fun n:nat => sum_f_R0 (fun k:nat => Rabs (/ INR (fact (2 * k)) * r ^ (2 * k))) - n) l)). + n) l }. intro X; elim X; intros. - apply existT with x. + exists x. split. apply p. intros; rewrite H; unfold Rdiv in |- *; do 2 rewrite Rabs_mult. @@ -124,7 +123,7 @@ Lemma continuity_cos : continuity cos. Proof. set (fn := fun (N:nat) (x:R) => (-1) ^ N / INR (fact (2 * N)) * x ^ (2 * N)). cut (CVN_R fn). - intro; cut (forall x:R, sigT (fun l:R => Un_cv (fun N:nat => SP fn N x) l)). + intro; cut (forall x:R, { l:R | Un_cv (fun N:nat => SP fn N x) l }). intro cv; cut (forall n:nat, continuity (fn n)). intro; cut (forall x:R, cos x = SFL fn cv x). intro; cut (continuity (SFL fn cv) -> continuity cos). @@ -144,7 +143,7 @@ Proof. case (cv x); case (exist_cos (Rsqr x)); intros. symmetry in |- *; eapply UL_sequence. apply u. - unfold cos_in in c; unfold infinit_sum in c; unfold Un_cv in |- *; intros. + unfold cos_in in c; unfold infinite_sum in c; unfold Un_cv in |- *; intros. elim (c _ H0); intros N0 H1. exists N0; intros. unfold R_dist in H1; unfold R_dist, SP in |- *. @@ -200,17 +199,16 @@ Lemma CVN_R_sin : CVN_R fn. Proof. unfold CVN_R in |- *; unfold CVN_r in |- *; intros fn H r. - apply existT with (fun n:nat => / INR (fact (2 * n + 1)) * r ^ (2 * n)). + exists (fun n:nat => / INR (fact (2 * n + 1)) * r ^ (2 * n)). cut - (sigT - (fun l:R => + { l:R | Un_cv (fun n:nat => sum_f_R0 (fun k:nat => Rabs (/ INR (fact (2 * k + 1)) * r ^ (2 * k))) n) - l)). + l }. intro X; elim X; intros. - apply existT with x. + exists x. split. apply p. intros; rewrite H; unfold Rdiv in |- *; do 2 rewrite Rabs_mult; @@ -305,7 +303,7 @@ Proof. set (fn := fun (N:nat) (x:R) => (-1) ^ N / INR (fact (2 * N + 1)) * x ^ (2 * N)). cut (CVN_R fn). - intro; cut (forall x:R, sigT (fun l:R => Un_cv (fun N:nat => SP fn N x) l)). + intro; cut (forall x:R, { l:R | Un_cv (fun N:nat => SP fn N x) l }). intro cv. set (r := mkposreal _ Rlt_0_1). cut (CVN_r fn r). @@ -331,7 +329,7 @@ Proof. unfold Rdiv in |- *; rewrite (Rinv_r_simpl_m h x0 H6). eapply UL_sequence. apply u. - unfold sin_in in s; unfold sin_n, infinit_sum in s; + unfold sin_in in s; unfold sin_n, infinite_sum in s; unfold SP, fn, Un_cv in |- *; intros. elim (s _ H10); intros N0 H11. exists N0; intros. @@ -584,14 +582,14 @@ Qed. Lemma derivable_pt_sin : forall x:R, derivable_pt sin x. Proof. unfold derivable_pt in |- *; intro. - apply existT with (cos x). + exists (cos x). apply derivable_pt_lim_sin. Qed. Lemma derivable_pt_cos : forall x:R, derivable_pt cos x. Proof. unfold derivable_pt in |- *; intro. - apply existT with (- sin x). + exists (- sin x). apply derivable_pt_lim_cos. Qed. diff --git a/theories/Reals/SeqProp.v b/theories/Reals/SeqProp.v index 96351618..56088a2e 100644 --- a/theories/Reals/SeqProp.v +++ b/theories/Reals/SeqProp.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: SeqProp.v 9551 2007-01-29 15:13:35Z bgregoir $ i*) +(*i $Id: SeqProp.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. @@ -15,6 +15,10 @@ Require Import Classical. Require Import Max. Open Local Scope R_scope. +(*****************************************************************) +(** Convergence properties of sequences *) +(*****************************************************************) + Definition Un_decreasing (Un:nat -> R) : Prop := forall n:nat, Un (S n) <= Un n. Definition opp_seq (Un:nat -> R) (n:nat) : R := - Un n. @@ -23,8 +27,7 @@ Definition has_lb (Un:nat -> R) : Prop := bound (EUn (opp_seq Un)). (**********) Lemma growing_cv : - forall Un:nat -> R, - Un_growing Un -> has_ub Un -> sigT (fun l:R => Un_cv Un l). + forall Un:nat -> R, Un_growing Un -> has_ub Un -> { l:R | Un_cv Un l }. Proof. unfold Un_growing, Un_cv in |- *; intros; destruct (completeness (EUn Un) H0 (EUn_noempty Un)) as [x [H2 H3]]. @@ -64,11 +67,10 @@ Proof. Qed. Lemma decreasing_cv : - forall Un:nat -> R, - Un_decreasing Un -> has_lb Un -> sigT (fun l:R => Un_cv Un l). + forall Un:nat -> R, Un_decreasing Un -> has_lb Un -> { l:R | Un_cv Un l }. Proof. intros. - cut (sigT (fun l:R => Un_cv (opp_seq Un) l) -> sigT (fun l:R => Un_cv Un l)). + cut ({ l:R | Un_cv (opp_seq Un) l } -> { l:R | Un_cv Un l }). intro X. apply X. apply growing_cv. @@ -76,7 +78,7 @@ Proof. exact H0. intro X. elim X; intros. - apply existT with (- x). + exists (- x). unfold Un_cv in p. unfold R_dist in p. unfold opp_seq in p. @@ -91,8 +93,8 @@ Proof. Qed. (***********) -Lemma maj_sup : - forall Un:nat -> R, has_ub Un -> sigT (fun l:R => is_lub (EUn Un) l). +Lemma ub_to_lub : + forall Un:nat -> R, has_ub Un -> { l:R | is_lub (EUn Un) l }. Proof. intros. unfold has_ub in H. @@ -104,9 +106,8 @@ Proof. Qed. (**********) -Lemma min_inf : - forall Un:nat -> R, - has_lb Un -> sigT (fun l:R => is_lub (EUn (opp_seq Un)) l). +Lemma lb_to_glb : + forall Un:nat -> R, has_lb Un -> { l:R | is_lub (EUn (opp_seq Un)) l }. Proof. intros; unfold has_lb in H. apply completeness. @@ -116,15 +117,17 @@ Proof. reflexivity. Qed. -Definition majorant (Un:nat -> R) (pr:has_ub Un) : R := - match maj_sup Un pr with - | existT a b => a - end. +Definition lub (Un:nat -> R) (pr:has_ub Un) : R := + let (a,_) := ub_to_lub Un pr in a. -Definition minorant (Un:nat -> R) (pr:has_lb Un) : R := - match min_inf Un pr with - | existT a b => - a - end. +Definition glb (Un:nat -> R) (pr:has_lb Un) : R := + let (a,_) := lb_to_glb Un pr in - a. + +(* Compatibility with previous unappropriate terminology *) +Notation maj_sup := ub_to_lub (only parsing). +Notation min_inf := lb_to_glb (only parsing). +Notation majorant := lub (only parsing). +Notation minorant := glb (only parsing). Lemma maj_ss : forall (Un:nat -> R) (k:nat), @@ -162,26 +165,30 @@ Proof. exists (k + x1)%nat; assumption. Qed. -Definition sequence_majorant (Un:nat -> R) (pr:has_ub Un) - (i:nat) : R := majorant (fun k:nat => Un (i + k)%nat) (maj_ss Un i pr). +Definition sequence_ub (Un:nat -> R) (pr:has_ub Un) + (i:nat) : R := lub (fun k:nat => Un (i + k)%nat) (maj_ss Un i pr). + +Definition sequence_lb (Un:nat -> R) (pr:has_lb Un) + (i:nat) : R := glb (fun k:nat => Un (i + k)%nat) (min_ss Un i pr). -Definition sequence_minorant (Un:nat -> R) (pr:has_lb Un) - (i:nat) : R := minorant (fun k:nat => Un (i + k)%nat) (min_ss Un i pr). +(* Compatibility *) +Notation sequence_majorant := sequence_ub (only parsing). +Notation sequence_minorant := sequence_lb (only parsing). Lemma Wn_decreasing : - forall (Un:nat -> R) (pr:has_ub Un), Un_decreasing (sequence_majorant Un pr). + forall (Un:nat -> R) (pr:has_ub Un), Un_decreasing (sequence_ub Un pr). Proof. intros. unfold Un_decreasing in |- *. intro. - unfold sequence_majorant in |- *. - assert (H := maj_sup (fun k:nat => Un (S n + k)%nat) (maj_ss Un (S n) pr)). - assert (H0 := maj_sup (fun k:nat => Un (n + k)%nat) (maj_ss Un n pr)). + unfold sequence_ub in |- *. + assert (H := ub_to_lub (fun k:nat => Un (S n + k)%nat) (maj_ss Un (S n) pr)). + assert (H0 := ub_to_lub (fun k:nat => Un (n + k)%nat) (maj_ss Un n pr)). elim H; intros. elim H0; intros. - cut (majorant (fun k:nat => Un (S n + k)%nat) (maj_ss Un (S n) pr) = x); + cut (lub (fun k:nat => Un (S n + k)%nat) (maj_ss Un (S n) pr) = x); [ intro Maj1; rewrite Maj1 | idtac ]. - cut (majorant (fun k:nat => Un (n + k)%nat) (maj_ss Un n pr) = x0); + cut (lub (fun k:nat => Un (n + k)%nat) (maj_ss Un n pr) = x0); [ intro Maj2; rewrite Maj2 | idtac ]. unfold is_lub in p. unfold is_lub in p0. @@ -199,47 +206,47 @@ Proof. replace (S n) with (1 + n)%nat; [ ring | ring ]. cut (is_lub (EUn (fun k:nat => Un (n + k)%nat)) - (majorant (fun k:nat => Un (n + k)%nat) (maj_ss Un n pr))). + (lub (fun k:nat => Un (n + k)%nat) (maj_ss Un n pr))). intro. unfold is_lub in p0; unfold is_lub in H1. elim p0; intros; elim H1; intros. assert (H6 := H5 x0 H2). assert - (H7 := H3 (majorant (fun k:nat => Un (n + k)%nat) (maj_ss Un n pr)) H4). + (H7 := H3 (lub (fun k:nat => Un (n + k)%nat) (maj_ss Un n pr)) H4). apply Rle_antisym; assumption. - unfold majorant in |- *. - case (maj_sup (fun k:nat => Un (n + k)%nat) (maj_ss Un n pr)). + unfold lub in |- *. + case (ub_to_lub (fun k:nat => Un (n + k)%nat) (maj_ss Un n pr)). trivial. cut (is_lub (EUn (fun k:nat => Un (S n + k)%nat)) - (majorant (fun k:nat => Un (S n + k)%nat) (maj_ss Un (S n) pr))). + (lub (fun k:nat => Un (S n + k)%nat) (maj_ss Un (S n) pr))). intro. unfold is_lub in p; unfold is_lub in H1. elim p; intros; elim H1; intros. assert (H6 := H5 x H2). assert (H7 := - H3 (majorant (fun k:nat => Un (S n + k)%nat) (maj_ss Un (S n) pr)) H4). + H3 (lub (fun k:nat => Un (S n + k)%nat) (maj_ss Un (S n) pr)) H4). apply Rle_antisym; assumption. - unfold majorant in |- *. - case (maj_sup (fun k:nat => Un (S n + k)%nat) (maj_ss Un (S n) pr)). + unfold lub in |- *. + case (ub_to_lub (fun k:nat => Un (S n + k)%nat) (maj_ss Un (S n) pr)). trivial. Qed. Lemma Vn_growing : - forall (Un:nat -> R) (pr:has_lb Un), Un_growing (sequence_minorant Un pr). + forall (Un:nat -> R) (pr:has_lb Un), Un_growing (sequence_lb Un pr). Proof. intros. unfold Un_growing in |- *. intro. - unfold sequence_minorant in |- *. - assert (H := min_inf (fun k:nat => Un (S n + k)%nat) (min_ss Un (S n) pr)). - assert (H0 := min_inf (fun k:nat => Un (n + k)%nat) (min_ss Un n pr)). + unfold sequence_lb in |- *. + assert (H := lb_to_glb (fun k:nat => Un (S n + k)%nat) (min_ss Un (S n) pr)). + assert (H0 := lb_to_glb (fun k:nat => Un (n + k)%nat) (min_ss Un n pr)). elim H; intros. elim H0; intros. - cut (minorant (fun k:nat => Un (S n + k)%nat) (min_ss Un (S n) pr) = - x); + cut (glb (fun k:nat => Un (S n + k)%nat) (min_ss Un (S n) pr) = - x); [ intro Maj1; rewrite Maj1 | idtac ]. - cut (minorant (fun k:nat => Un (n + k)%nat) (min_ss Un n pr) = - x0); + cut (glb (fun k:nat => Un (n + k)%nat) (min_ss Un n pr) = - x0); [ intro Maj2; rewrite Maj2 | idtac ]. unfold is_lub in p. unfold is_lub in p0. @@ -260,38 +267,38 @@ Proof. replace (S n) with (1 + n)%nat; [ ring | ring ]. cut (is_lub (EUn (opp_seq (fun k:nat => Un (n + k)%nat))) - (- minorant (fun k:nat => Un (n + k)%nat) (min_ss Un n pr))). + (- glb (fun k:nat => Un (n + k)%nat) (min_ss Un n pr))). intro. unfold is_lub in p0; unfold is_lub in H1. elim p0; intros; elim H1; intros. assert (H6 := H5 x0 H2). assert - (H7 := H3 (- minorant (fun k:nat => Un (n + k)%nat) (min_ss Un n pr)) H4). + (H7 := H3 (- glb (fun k:nat => Un (n + k)%nat) (min_ss Un n pr)) H4). rewrite <- - (Ropp_involutive (minorant (fun k:nat => Un (n + k)%nat) (min_ss Un n pr))) + (Ropp_involutive (glb (fun k:nat => Un (n + k)%nat) (min_ss Un n pr))) . apply Ropp_eq_compat; apply Rle_antisym; assumption. - unfold minorant in |- *. - case (min_inf (fun k:nat => Un (n + k)%nat) (min_ss Un n pr)). + unfold glb in |- *. + case (lb_to_glb (fun k:nat => Un (n + k)%nat) (min_ss Un n pr)); simpl. intro; rewrite Ropp_involutive. trivial. cut (is_lub (EUn (opp_seq (fun k:nat => Un (S n + k)%nat))) - (- minorant (fun k:nat => Un (S n + k)%nat) (min_ss Un (S n) pr))). + (- glb (fun k:nat => Un (S n + k)%nat) (min_ss Un (S n) pr))). intro. unfold is_lub in p; unfold is_lub in H1. elim p; intros; elim H1; intros. assert (H6 := H5 x H2). assert (H7 := - H3 (- minorant (fun k:nat => Un (S n + k)%nat) (min_ss Un (S n) pr)) H4). + H3 (- glb (fun k:nat => Un (S n + k)%nat) (min_ss Un (S n) pr)) H4). rewrite <- (Ropp_involutive - (minorant (fun k:nat => Un (S n + k)%nat) (min_ss Un (S n) pr))) + (glb (fun k:nat => Un (S n + k)%nat) (min_ss Un (S n) pr))) . apply Ropp_eq_compat; apply Rle_antisym; assumption. - unfold minorant in |- *. - case (min_inf (fun k:nat => Un (S n + k)%nat) (min_ss Un (S n) pr)). + unfold glb in |- *. + case (lb_to_glb (fun k:nat => Un (S n + k)%nat) (min_ss Un (S n) pr)); simpl. intro; rewrite Ropp_involutive. trivial. Qed. @@ -299,16 +306,15 @@ Qed. (**********) Lemma Vn_Un_Wn_order : forall (Un:nat -> R) (pr1:has_ub Un) (pr2:has_lb Un) - (n:nat), sequence_minorant Un pr2 n <= Un n <= sequence_majorant Un pr1 n. + (n:nat), sequence_lb Un pr2 n <= Un n <= sequence_ub Un pr1 n. Proof. intros. split. - unfold sequence_minorant in |- *. - cut - (sigT (fun l:R => is_lub (EUn (opp_seq (fun i:nat => Un (n + i)%nat))) l)). + unfold sequence_lb in |- *. + cut { l:R | is_lub (EUn (opp_seq (fun i:nat => Un (n + i)%nat))) l }. intro X. elim X; intros. - replace (minorant (fun k:nat => Un (n + k)%nat) (min_ss Un n pr2)) with (- x). + replace (glb (fun k:nat => Un (n + k)%nat) (min_ss Un n pr2)) with (- x). unfold is_lub in p. elim p; intros. unfold is_upper_bound in H. @@ -320,28 +326,28 @@ Proof. replace (n + 0)%nat with n; [ reflexivity | ring ]. cut (is_lub (EUn (opp_seq (fun k:nat => Un (n + k)%nat))) - (- minorant (fun k:nat => Un (n + k)%nat) (min_ss Un n pr2))). + (- glb (fun k:nat => Un (n + k)%nat) (min_ss Un n pr2))). intro. unfold is_lub in p; unfold is_lub in H. elim p; intros; elim H; intros. assert (H4 := H3 x H0). assert - (H5 := H1 (- minorant (fun k:nat => Un (n + k)%nat) (min_ss Un n pr2)) H2). + (H5 := H1 (- glb (fun k:nat => Un (n + k)%nat) (min_ss Un n pr2)) H2). rewrite <- - (Ropp_involutive (minorant (fun k:nat => Un (n + k)%nat) (min_ss Un n pr2))) + (Ropp_involutive (glb (fun k:nat => Un (n + k)%nat) (min_ss Un n pr2))) . apply Ropp_eq_compat; apply Rle_antisym; assumption. - unfold minorant in |- *. - case (min_inf (fun k:nat => Un (n + k)%nat) (min_ss Un n pr2)). + unfold glb in |- *. + case (lb_to_glb (fun k:nat => Un (n + k)%nat) (min_ss Un n pr2)); simpl. intro; rewrite Ropp_involutive. trivial. - apply min_inf. + apply lb_to_glb. apply min_ss; assumption. - unfold sequence_majorant in |- *. - cut (sigT (fun l:R => is_lub (EUn (fun i:nat => Un (n + i)%nat)) l)). + unfold sequence_ub in |- *. + cut { l:R | is_lub (EUn (fun i:nat => Un (n + i)%nat)) l }. intro X. elim X; intros. - replace (majorant (fun k:nat => Un (n + k)%nat) (maj_ss Un n pr1)) with x. + replace (lub (fun k:nat => Un (n + k)%nat) (maj_ss Un n pr1)) with x. unfold is_lub in p. elim p; intros. unfold is_upper_bound in H. @@ -350,24 +356,24 @@ Proof. replace (n + 0)%nat with n; [ reflexivity | ring ]. cut (is_lub (EUn (fun k:nat => Un (n + k)%nat)) - (majorant (fun k:nat => Un (n + k)%nat) (maj_ss Un n pr1))). + (lub (fun k:nat => Un (n + k)%nat) (maj_ss Un n pr1))). intro. unfold is_lub in p; unfold is_lub in H. elim p; intros; elim H; intros. assert (H4 := H3 x H0). assert - (H5 := H1 (majorant (fun k:nat => Un (n + k)%nat) (maj_ss Un n pr1)) H2). + (H5 := H1 (lub (fun k:nat => Un (n + k)%nat) (maj_ss Un n pr1)) H2). apply Rle_antisym; assumption. - unfold majorant in |- *. - case (maj_sup (fun k:nat => Un (n + k)%nat) (maj_ss Un n pr1)). + unfold lub in |- *. + case (ub_to_lub (fun k:nat => Un (n + k)%nat) (maj_ss Un n pr1)). intro; trivial. - apply maj_sup. + apply ub_to_lub. apply maj_ss; assumption. Qed. Lemma min_maj : forall (Un:nat -> R) (pr1:has_ub Un) (pr2:has_lb Un), - has_ub (sequence_minorant Un pr2). + has_ub (sequence_lb Un pr2). Proof. intros. assert (H := Vn_Un_Wn_order Un pr1 pr2). @@ -390,7 +396,7 @@ Qed. Lemma maj_min : forall (Un:nat -> R) (pr1:has_ub Un) (pr2:has_lb Un), - has_lb (sequence_majorant Un pr1). + has_lb (sequence_ub Un pr1). Proof. intros. assert (H := Vn_Un_Wn_order Un pr1 pr2). @@ -451,7 +457,7 @@ Qed. (**********) Lemma maj_cv : forall (Un:nat -> R) (pr:Cauchy_crit Un), - sigT (fun l:R => Un_cv (sequence_majorant Un (cauchy_maj Un pr)) l). + { l:R | Un_cv (sequence_ub Un (cauchy_maj Un pr)) l }. Proof. intros. apply decreasing_cv. @@ -464,7 +470,7 @@ Qed. (**********) Lemma min_cv : forall (Un:nat -> R) (pr:Cauchy_crit Un), - sigT (fun l:R => Un_cv (sequence_minorant Un (cauchy_min Un pr)) l). + { l:R | Un_cv (sequence_lb Un (cauchy_min Un pr)) l }. Proof. intros. apply growing_cv. @@ -510,40 +516,40 @@ Qed. (**********) Lemma approx_maj : forall (Un:nat -> R) (pr:has_ub Un) (eps:R), - 0 < eps -> exists k : nat, Rabs (majorant Un pr - Un k) < eps. + 0 < eps -> exists k : nat, Rabs (lub Un pr - Un k) < eps. Proof. intros. - set (P := fun k:nat => Rabs (majorant Un pr - Un k) < eps). + set (P := fun k:nat => Rabs (lub Un pr - Un k) < eps). unfold P in |- *. cut ((exists k : nat, P k) -> - exists k : nat, Rabs (majorant Un pr - Un k) < eps). + exists k : nat, Rabs (lub Un pr - Un k) < eps). intros. apply H0. apply not_all_not_ex. red in |- *; intro. 2: unfold P in |- *; trivial. unfold P in H1. - cut (forall n:nat, Rabs (majorant Un pr - Un n) >= eps). + cut (forall n:nat, Rabs (lub Un pr - Un n) >= eps). intro. - cut (is_lub (EUn Un) (majorant Un pr)). + cut (is_lub (EUn Un) (lub Un pr)). intro. unfold is_lub in H3. unfold is_upper_bound in H3. elim H3; intros. - cut (forall n:nat, eps <= majorant Un pr - Un n). + cut (forall n:nat, eps <= lub Un pr - Un n). intro. - cut (forall n:nat, Un n <= majorant Un pr - eps). + cut (forall n:nat, Un n <= lub Un pr - eps). intro. - cut (forall x:R, EUn Un x -> x <= majorant Un pr - eps). + cut (forall x:R, EUn Un x -> x <= lub Un pr - eps). intro. - assert (H9 := H5 (majorant Un pr - eps) H8). + assert (H9 := H5 (lub Un pr - eps) H8). cut (eps <= 0). intro. elim (Rlt_irrefl _ (Rlt_le_trans _ _ _ H H10)). - apply Rplus_le_reg_l with (majorant Un pr - eps). + apply Rplus_le_reg_l with (lub Un pr - eps). rewrite Rplus_0_r. - replace (majorant Un pr - eps + eps) with (majorant Un pr); + replace (lub Un pr - eps + eps) with (lub Un pr); [ assumption | ring ]. intros. unfold EUn in H8. @@ -553,7 +559,7 @@ Proof. assert (H7 := H6 n). apply Rplus_le_reg_l with (eps - Un n). replace (eps - Un n + Un n) with eps. - replace (eps - Un n + (majorant Un pr - eps)) with (majorant Un pr - Un n). + replace (eps - Un n + (lub Un pr - eps)) with (lub Un pr - Un n). assumption. ring. ring. @@ -565,11 +571,11 @@ Proof. apply Rle_ge. apply Rplus_le_reg_l with (Un n). rewrite Rplus_0_r; - replace (Un n + (majorant Un pr - Un n)) with (majorant Un pr); + replace (Un n + (lub Un pr - Un n)) with (lub Un pr); [ apply H4 | ring ]. exists n; reflexivity. - unfold majorant in |- *. - case (maj_sup Un pr). + unfold lub in |- *. + case (ub_to_lub Un pr). trivial. intro. assert (H2 := H1 n). @@ -579,40 +585,40 @@ Qed. (**********) Lemma approx_min : forall (Un:nat -> R) (pr:has_lb Un) (eps:R), - 0 < eps -> exists k : nat, Rabs (minorant Un pr - Un k) < eps. + 0 < eps -> exists k : nat, Rabs (glb Un pr - Un k) < eps. Proof. intros. - set (P := fun k:nat => Rabs (minorant Un pr - Un k) < eps). + set (P := fun k:nat => Rabs (glb Un pr - Un k) < eps). unfold P in |- *. cut ((exists k : nat, P k) -> - exists k : nat, Rabs (minorant Un pr - Un k) < eps). + exists k : nat, Rabs (glb Un pr - Un k) < eps). intros. apply H0. apply not_all_not_ex. red in |- *; intro. 2: unfold P in |- *; trivial. unfold P in H1. - cut (forall n:nat, Rabs (minorant Un pr - Un n) >= eps). + cut (forall n:nat, Rabs (glb Un pr - Un n) >= eps). intro. - cut (is_lub (EUn (opp_seq Un)) (- minorant Un pr)). + cut (is_lub (EUn (opp_seq Un)) (- glb Un pr)). intro. unfold is_lub in H3. unfold is_upper_bound in H3. elim H3; intros. - cut (forall n:nat, eps <= Un n - minorant Un pr). + cut (forall n:nat, eps <= Un n - glb Un pr). intro. - cut (forall n:nat, opp_seq Un n <= - minorant Un pr - eps). + cut (forall n:nat, opp_seq Un n <= - glb Un pr - eps). intro. - cut (forall x:R, EUn (opp_seq Un) x -> x <= - minorant Un pr - eps). + cut (forall x:R, EUn (opp_seq Un) x -> x <= - glb Un pr - eps). intro. - assert (H9 := H5 (- minorant Un pr - eps) H8). + assert (H9 := H5 (- glb Un pr - eps) H8). cut (eps <= 0). intro. elim (Rlt_irrefl _ (Rlt_le_trans _ _ _ H H10)). - apply Rplus_le_reg_l with (- minorant Un pr - eps). + apply Rplus_le_reg_l with (- glb Un pr - eps). rewrite Rplus_0_r. - replace (- minorant Un pr - eps + eps) with (- minorant Un pr); + replace (- glb Un pr - eps + eps) with (- glb Un pr); [ assumption | ring ]. intros. unfold EUn in H8. @@ -623,7 +629,7 @@ Proof. unfold opp_seq in |- *. apply Rplus_le_reg_l with (eps + Un n). replace (eps + Un n + - Un n) with eps. - replace (eps + Un n + (- minorant Un pr - eps)) with (Un n - minorant Un pr). + replace (eps + Un n + (- glb Un pr - eps)) with (Un n - glb Un pr). assumption. ring. ring. @@ -631,16 +637,16 @@ Proof. assert (H6 := H2 n). rewrite Rabs_left1 in H6. apply Rge_le. - replace (Un n - minorant Un pr) with (- (minorant Un pr - Un n)); + replace (Un n - glb Un pr) with (- (glb Un pr - Un n)); [ assumption | ring ]. - apply Rplus_le_reg_l with (- minorant Un pr). + apply Rplus_le_reg_l with (- glb Un pr). rewrite Rplus_0_r; - replace (- minorant Un pr + (minorant Un pr - Un n)) with (- Un n). + replace (- glb Un pr + (glb Un pr - Un n)) with (- Un n). apply H4. exists n; reflexivity. ring. - unfold minorant in |- *. - case (min_inf Un pr). + unfold glb in |- *. + case (lb_to_glb Un pr); simpl. intro. rewrite Ropp_involutive. trivial. @@ -711,7 +717,7 @@ Qed. (**********) Lemma CV_Cauchy : - forall Un:nat -> R, sigT (fun l:R => Un_cv Un l) -> Cauchy_crit Un. + forall Un:nat -> R, { l:R | Un_cv Un l } -> Cauchy_crit Un. Proof. intros Un X; elim X; intros. unfold Cauchy_crit in |- *; intros. @@ -734,11 +740,11 @@ Qed. (**********) Lemma maj_by_pos : forall Un:nat -> R, - sigT (fun l:R => Un_cv Un l) -> + { l:R | Un_cv Un l } -> exists l : R, 0 < l /\ (forall n:nat, Rabs (Un n) <= l). Proof. intros Un X; elim X; intros. - cut (sigT (fun l:R => Un_cv (fun k:nat => Rabs (Un k)) l)). + cut { l:R | Un_cv (fun k:nat => Rabs (Un k)) l }. intro X0. assert (H := CV_Cauchy (fun k:nat => Rabs (Un k)) X0). assert (H0 := cauchy_bound (fun k:nat => Rabs (Un k)) H). @@ -760,7 +766,7 @@ Proof. unfold is_upper_bound in H1. apply H1. exists 0%nat; reflexivity. - apply existT with (Rabs x). + exists (Rabs x). apply cv_cvabs; assumption. Qed. @@ -770,7 +776,7 @@ Lemma CV_mult : Un_cv An l1 -> Un_cv Bn l2 -> Un_cv (fun i:nat => An i * Bn i) (l1 * l2). Proof. intros. - cut (sigT (fun l:R => Un_cv An l)). + cut { l:R | Un_cv An l }. intro X. assert (H1 := maj_by_pos An X). elim H1; intros M H2. @@ -881,7 +887,7 @@ Proof. [ assumption | apply Rinv_0_lt_compat; apply Rmult_lt_0_compat; [ prove_sup0 | assumption ] ]. - apply existT with l1; assumption. + exists l1; assumption. Qed. Lemma tech9 : diff --git a/theories/Reals/SeqSeries.v b/theories/Reals/SeqSeries.v index bc17cd43..9680b75e 100644 --- a/theories/Reals/SeqSeries.v +++ b/theories/Reals/SeqSeries.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: SeqSeries.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: SeqSeries.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. @@ -33,15 +33,9 @@ Lemma sum_maj1 : Rabs (l1 - SP fn N x) <= l2 - sum_f_R0 An N. Proof. intros; - cut - (sigT - (fun l:R => - Un_cv (fun n:nat => sum_f_R0 (fun l:nat => fn (S N + l)%nat x) n) l)). + cut { l:R | Un_cv (fun n => sum_f_R0 (fun l => fn (S N + l)%nat x) n) l }. intro X; - cut - (sigT - (fun l:R => - Un_cv (fun n:nat => sum_f_R0 (fun l:nat => An (S N + l)%nat) n) l)). + cut { l:R | Un_cv (fun n => sum_f_R0 (fun l => An (S N + l)%nat) n) l }. intro X0; elim X; intros l1N H2. elim X0; intros l2N H3. cut (l1 - SP fn N x = l1N). @@ -131,7 +125,7 @@ Proof. apply le_lt_n_Sm. apply le_plus_l. apply le_O_n. - apply existT with (l2 - sum_f_R0 An N). + exists (l2 - sum_f_R0 An N). unfold Un_cv in H0; unfold Un_cv in |- *; intros. elim (H0 eps H2); intros N0 H3. unfold R_dist in H3; exists N0; intros. @@ -167,7 +161,7 @@ Proof. apply le_lt_n_Sm. apply le_plus_l. apply le_O_n. - apply existT with (l1 - SP fn N x). + exists (l1 - SP fn N x). unfold Un_cv in H; unfold Un_cv in |- *; intros. elim (H eps H2); intros N0 H3. unfold R_dist in H3; exists N0; intros. @@ -216,8 +210,8 @@ Qed. Lemma Rseries_CV_comp : forall An Bn:nat -> R, (forall n:nat, 0 <= An n <= Bn n) -> - sigT (fun l:R => Un_cv (fun N:nat => sum_f_R0 Bn N) l) -> - sigT (fun l:R => Un_cv (fun N:nat => sum_f_R0 An N) l). + { l:R | Un_cv (fun N:nat => sum_f_R0 Bn N) l } -> + { l:R | Un_cv (fun N:nat => sum_f_R0 An N) l }. Proof. intros An Bn H X; apply cv_cauchy_2. assert (H0 := cv_cauchy_1 _ X). diff --git a/theories/Reals/Sqrt_reg.v b/theories/Reals/Sqrt_reg.v index ff0a72e8..13be46da 100644 --- a/theories/Reals/Sqrt_reg.v +++ b/theories/Reals/Sqrt_reg.v @@ -6,12 +6,13 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Sqrt_reg.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Sqrt_reg.v 10710 2008-03-23 09:24:09Z herbelin $ i*) Require Import Rbase. Require Import Rfunctions. Require Import Ranalysis1. -Require Import R_sqrt. Open Local Scope R_scope. +Require Import R_sqrt. +Open Local Scope R_scope. (**********) Lemma sqrt_var_maj : @@ -309,7 +310,7 @@ Qed. Lemma derivable_pt_sqrt : forall x:R, 0 < x -> derivable_pt sqrt x. Proof. unfold derivable_pt in |- *; intros. - apply existT with (/ (2 * sqrt x)). + exists (/ (2 * sqrt x)). apply derivable_pt_lim_sqrt; assumption. Qed. diff --git a/theories/Relations/Operators_Properties.v b/theories/Relations/Operators_Properties.v index 7e202359..0638ca8f 100644 --- a/theories/Relations/Operators_Properties.v +++ b/theories/Relations/Operators_Properties.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Operators_Properties.v 9597 2007-02-06 19:44:05Z herbelin $ i*) +(*i $Id: Operators_Properties.v 9598 2007-02-06 19:45:52Z herbelin $ i*) (****************************************************************************) (* Bruno Barras *) diff --git a/theories/Relations/Relation_Operators.v b/theories/Relations/Relation_Operators.v index 4c5a6519..87cd1e6f 100644 --- a/theories/Relations/Relation_Operators.v +++ b/theories/Relations/Relation_Operators.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Relation_Operators.v 9610 2007-02-07 14:45:18Z herbelin $ i*) +(*i $Id: Relation_Operators.v 10681 2008-03-16 13:40:45Z msozeau $ i*) (****************************************************************************) (* Bruno Barras, Cristina Cornes *) @@ -83,9 +83,9 @@ Variable leA : A -> A -> Prop. Variable leB : B -> B -> Prop. Inductive le_AsB : A + B -> A + B -> Prop := - | le_aa : forall x y:A, leA x y -> le_AsB (inl B x) (inl B y) - | le_ab : forall (x:A) (y:B), le_AsB (inl B x) (inr A y) - | le_bb : forall x y:B, leB x y -> le_AsB (inr A x) (inr A y). + | le_aa : forall x y:A, leA x y -> le_AsB (inl _ x) (inl _ y) + | le_ab : forall (x:A) (y:B), le_AsB (inl _ x) (inr _ y) + | le_bb : forall x y:B, leB x y -> le_AsB (inr _ x) (inr _ y). End Disjoint_Union. diff --git a/theories/Relations/Relations.v b/theories/Relations/Relations.v index 9da30e9b..6368ae25 100644 --- a/theories/Relations/Relations.v +++ b/theories/Relations/Relations.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Relations.v 9597 2007-02-06 19:44:05Z herbelin $ i*) +(*i $Id: Relations.v 9598 2007-02-06 19:45:52Z herbelin $ i*) Require Export Relation_Definitions. Require Export Relation_Operators. diff --git a/theories/Relations/Rstar.v b/theories/Relations/Rstar.v index 91d2aaa4..82668006 100644 --- a/theories/Relations/Rstar.v +++ b/theories/Relations/Rstar.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Rstar.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Rstar.v 9642 2007-02-12 10:31:53Z herbelin $ i*) (** Properties of a binary relation [R] on type [A] *) @@ -87,7 +87,7 @@ Section Rstar. (** Property of Commutativity of two relations *) - Definition commut (A:Set) (R1 R2:A -> A -> Prop) := + Definition commut (A:Type) (R1 R2:A -> A -> Prop) := forall x y:A, R1 y x -> forall z:A, R2 z y -> exists2 y' : A, R2 y' x & R1 z y'. diff --git a/theories/Setoids/Setoid.v b/theories/Setoids/Setoid.v index 84af7d5d..d6975e91 100644 --- a/theories/Setoids/Setoid.v +++ b/theories/Setoids/Setoid.v @@ -1,4 +1,3 @@ - (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* reflexive _ Aeq -> X_Relation_Class X - | AsymmetricReflexive : X -> forall A Aeq, reflexive A Aeq -> X_Relation_Class X - | SymmetricAreflexive : forall A Aeq, symmetric A Aeq -> X_Relation_Class X - | AsymmetricAreflexive : X -> forall A (Aeq : relation A), X_Relation_Class X - | Leibniz : Type -> X_Relation_Class X. - -Inductive variance : Set := - Covariant - | Contravariant. - -Definition Argument_Class := X_Relation_Class variance. -Definition Relation_Class := X_Relation_Class unit. - -Inductive Reflexive_Relation_Class : Type := - RSymmetric : - forall A Aeq, symmetric A Aeq -> reflexive _ Aeq -> Reflexive_Relation_Class - | RAsymmetric : - forall A Aeq, reflexive A Aeq -> Reflexive_Relation_Class - | RLeibniz : Type -> Reflexive_Relation_Class. - -Inductive Areflexive_Relation_Class : Type := - | ASymmetric : forall A Aeq, symmetric A Aeq -> Areflexive_Relation_Class - | AAsymmetric : forall A (Aeq : relation A), Areflexive_Relation_Class. - -Implicit Type Hole Out: Relation_Class. - -Definition relation_class_of_argument_class : Argument_Class -> Relation_Class. - destruct 1. - exact (SymmetricReflexive _ s r). - exact (AsymmetricReflexive tt r). - exact (SymmetricAreflexive _ s). - exact (AsymmetricAreflexive tt Aeq). - exact (Leibniz _ T). -Defined. - -Definition carrier_of_relation_class : forall X, X_Relation_Class X -> Type. - destruct 1. - exact A. - exact A. - exact A. - exact A. - exact T. -Defined. - -Definition relation_of_relation_class : - forall X R, @carrier_of_relation_class X R -> carrier_of_relation_class R -> Prop. - destruct R. - exact Aeq. - exact Aeq. - exact Aeq. - exact Aeq. - exact (@eq T). -Defined. - -Lemma about_carrier_of_relation_class_and_relation_class_of_argument_class : - forall R, - carrier_of_relation_class (relation_class_of_argument_class R) = - carrier_of_relation_class R. - destruct R; reflexivity. -Defined. - -Inductive nelistT (A : Type) : Type := - singl : A -> nelistT A - | necons : A -> nelistT A -> nelistT A. - -Definition Arguments := nelistT Argument_Class. - -Implicit Type In: Arguments. - -Definition function_type_of_morphism_signature : - Arguments -> Relation_Class -> Type. - intros In Out. - induction In. - exact (carrier_of_relation_class a -> carrier_of_relation_class Out). - exact (carrier_of_relation_class a -> IHIn). -Defined. - -Definition make_compatibility_goal_aux: - forall In Out - (f g: function_type_of_morphism_signature In Out), Prop. - intros; induction In; simpl in f, g. - induction a; simpl in f, g. - exact (forall x1 x2, Aeq x1 x2 -> relation_of_relation_class Out (f x1) (g x2)). - destruct x. - exact (forall x1 x2, Aeq x1 x2 -> relation_of_relation_class Out (f x1) (g x2)). - exact (forall x1 x2, Aeq x2 x1 -> relation_of_relation_class Out (f x1) (g x2)). - exact (forall x1 x2, Aeq x1 x2 -> relation_of_relation_class Out (f x1) (g x2)). - destruct x. - exact (forall x1 x2, Aeq x1 x2 -> relation_of_relation_class Out (f x1) (g x2)). - exact (forall x1 x2, Aeq x2 x1 -> relation_of_relation_class Out (f x1) (g x2)). - exact (forall x, relation_of_relation_class Out (f x) (g x)). - induction a; simpl in f, g. - exact (forall x1 x2, Aeq x1 x2 -> IHIn (f x1) (g x2)). - destruct x. - exact (forall x1 x2, Aeq x1 x2 -> IHIn (f x1) (g x2)). - exact (forall x1 x2, Aeq x2 x1 -> IHIn (f x1) (g x2)). - exact (forall x1 x2, Aeq x1 x2 -> IHIn (f x1) (g x2)). - destruct x. - exact (forall x1 x2, Aeq x1 x2 -> IHIn (f x1) (g x2)). - exact (forall x1 x2, Aeq x2 x1 -> IHIn (f x1) (g x2)). - exact (forall x, IHIn (f x) (g x)). -Defined. - -Definition make_compatibility_goal := - (fun In Out f => make_compatibility_goal_aux In Out f f). - -Record Morphism_Theory In Out : Type := - { Function : function_type_of_morphism_signature In Out; - Compat : make_compatibility_goal In Out Function }. - -(** The [iff] relation class *) - -Definition Iff_Relation_Class : Relation_Class. - eapply (@SymmetricReflexive unit _ iff). - exact iff_sym. - exact iff_refl. -Defined. - -(** The [impl] relation class *) - -Definition impl (A B: Prop) := A -> B. - -Theorem impl_refl: reflexive _ impl. -Proof. - hnf; unfold impl; tauto. -Qed. - -Definition Impl_Relation_Class : Relation_Class. - eapply (@AsymmetricReflexive unit tt _ impl). - exact impl_refl. -Defined. - -(** Every function is a morphism from Leibniz+ to Leibniz *) - -Definition list_of_Leibniz_of_list_of_types: nelistT Type -> Arguments. - induction 1. - exact (singl (Leibniz _ a)). - exact (necons (Leibniz _ a) IHX). -Defined. - -Definition morphism_theory_of_function : - forall (In: nelistT Type) (Out: Type), - let In' := list_of_Leibniz_of_list_of_types In in - let Out' := Leibniz _ Out in - function_type_of_morphism_signature In' Out' -> - Morphism_Theory In' Out'. - intros. - exists X. - induction In; unfold make_compatibility_goal; simpl. - reflexivity. - intro; apply (IHIn (X x)). -Defined. - -(** Every predicate is a morphism from Leibniz+ to Iff_Relation_Class *) - -Definition morphism_theory_of_predicate : - forall (In: nelistT Type), - let In' := list_of_Leibniz_of_list_of_types In in - function_type_of_morphism_signature In' Iff_Relation_Class -> - Morphism_Theory In' Iff_Relation_Class. - intros. - exists X. - induction In; unfold make_compatibility_goal; simpl. - intro; apply iff_refl. - intro; apply (IHIn (X x)). -Defined. - -(** * Utility functions to prove that every transitive relation is a morphism *) - -Definition equality_morphism_of_symmetric_areflexive_transitive_relation: - forall (A: Type)(Aeq: relation A)(sym: symmetric _ Aeq)(trans: transitive _ Aeq), - let ASetoidClass := SymmetricAreflexive _ sym in - (Morphism_Theory (necons ASetoidClass (singl ASetoidClass)) Iff_Relation_Class). - intros. - exists Aeq. - unfold make_compatibility_goal; simpl; split; eauto. -Defined. - -Definition equality_morphism_of_symmetric_reflexive_transitive_relation: - forall (A: Type)(Aeq: relation A)(refl: reflexive _ Aeq)(sym: symmetric _ Aeq) - (trans: transitive _ Aeq), let ASetoidClass := SymmetricReflexive _ sym refl in - (Morphism_Theory (necons ASetoidClass (singl ASetoidClass)) Iff_Relation_Class). - intros. - exists Aeq. - unfold make_compatibility_goal; simpl; split; eauto. -Defined. - -Definition equality_morphism_of_asymmetric_areflexive_transitive_relation: - forall (A: Type)(Aeq: relation A)(trans: transitive _ Aeq), - let ASetoidClass1 := AsymmetricAreflexive Contravariant Aeq in - let ASetoidClass2 := AsymmetricAreflexive Covariant Aeq in - (Morphism_Theory (necons ASetoidClass1 (singl ASetoidClass2)) Impl_Relation_Class). - intros. - exists Aeq. - unfold make_compatibility_goal; simpl; unfold impl; eauto. -Defined. - -Definition equality_morphism_of_asymmetric_reflexive_transitive_relation: - forall (A: Type)(Aeq: relation A)(refl: reflexive _ Aeq)(trans: transitive _ Aeq), - let ASetoidClass1 := AsymmetricReflexive Contravariant refl in - let ASetoidClass2 := AsymmetricReflexive Covariant refl in - (Morphism_Theory (necons ASetoidClass1 (singl ASetoidClass2)) Impl_Relation_Class). - intros. - exists Aeq. - unfold make_compatibility_goal; simpl; unfold impl; eauto. -Defined. - -(** * A few examples on [iff] *) - -(** [iff] as a relation *) - -Add Relation Prop iff - reflexivity proved by iff_refl - symmetry proved by iff_sym - transitivity proved by iff_trans -as iff_relation. - -(** [impl] as a relation *) - -Theorem impl_trans: transitive _ impl. -Proof. - hnf; unfold impl; tauto. -Qed. - -Add Relation Prop impl - reflexivity proved by impl_refl - transitivity proved by impl_trans -as impl_relation. - -(** [impl] is a morphism *) - -Add Morphism impl with signature iff ==> iff ==> iff as Impl_Morphism. -Proof. - unfold impl; tauto. -Qed. - -(** [and] is a morphism *) - -Add Morphism and with signature iff ==> iff ==> iff as And_Morphism. - tauto. -Qed. - -(** [or] is a morphism *) - -Add Morphism or with signature iff ==> iff ==> iff as Or_Morphism. -Proof. - tauto. -Qed. - -(** [not] is a morphism *) - -Add Morphism not with signature iff ==> iff as Not_Morphism. -Proof. - tauto. -Qed. - -(** The same examples on [impl] *) - -Add Morphism and with signature impl ++> impl ++> impl as And_Morphism2. -Proof. - unfold impl; tauto. -Qed. - -Add Morphism or with signature impl ++> impl ++> impl as Or_Morphism2. -Proof. - unfold impl; tauto. -Qed. - -Add Morphism not with signature impl --> impl as Not_Morphism2. -Proof. - unfold impl; tauto. -Qed. - -(** * The CIC part of the reflexive tactic ([setoid_rewrite]) *) - -Inductive rewrite_direction : Type := - | Left2Right - | Right2Left. - -Implicit Type dir: rewrite_direction. - -Definition variance_of_argument_class : Argument_Class -> option variance. - destruct 1. - exact None. - exact (Some v). - exact None. - exact (Some v). - exact None. -Defined. - -Definition opposite_direction := - fun dir => - match dir with - | Left2Right => Right2Left - | Right2Left => Left2Right - end. - -Lemma opposite_direction_idempotent: - forall dir, (opposite_direction (opposite_direction dir)) = dir. -Proof. - destruct dir; reflexivity. -Qed. - -Inductive check_if_variance_is_respected : - option variance -> rewrite_direction -> rewrite_direction -> Prop := - | MSNone : forall dir dir', check_if_variance_is_respected None dir dir' - | MSCovariant : forall dir, check_if_variance_is_respected (Some Covariant) dir dir - | MSContravariant : - forall dir, - check_if_variance_is_respected (Some Contravariant) dir (opposite_direction dir). - -Definition relation_class_of_reflexive_relation_class: - Reflexive_Relation_Class -> Relation_Class. - induction 1. - exact (SymmetricReflexive _ s r). - exact (AsymmetricReflexive tt r). - exact (Leibniz _ T). -Defined. - -Definition relation_class_of_areflexive_relation_class: - Areflexive_Relation_Class -> Relation_Class. - induction 1. - exact (SymmetricAreflexive _ s). - exact (AsymmetricAreflexive tt Aeq). -Defined. - -Definition carrier_of_reflexive_relation_class := - fun R => carrier_of_relation_class (relation_class_of_reflexive_relation_class R). - -Definition carrier_of_areflexive_relation_class := - fun R => carrier_of_relation_class (relation_class_of_areflexive_relation_class R). - -Definition relation_of_areflexive_relation_class := - fun R => relation_of_relation_class (relation_class_of_areflexive_relation_class R). - -Inductive Morphism_Context Hole dir : Relation_Class -> rewrite_direction -> Type := - | App : - forall In Out dir', - Morphism_Theory In Out -> Morphism_Context_List Hole dir dir' In -> - Morphism_Context Hole dir Out dir' - | ToReplace : Morphism_Context Hole dir Hole dir - | ToKeep : - forall S dir', - carrier_of_reflexive_relation_class S -> - Morphism_Context Hole dir (relation_class_of_reflexive_relation_class S) dir' - | ProperElementToKeep : - forall S dir' (x: carrier_of_areflexive_relation_class S), - relation_of_areflexive_relation_class S x x -> - Morphism_Context Hole dir (relation_class_of_areflexive_relation_class S) dir' -with Morphism_Context_List Hole dir : - rewrite_direction -> Arguments -> Type -:= - fcl_singl : - forall S dir' dir'', - check_if_variance_is_respected (variance_of_argument_class S) dir' dir'' -> - Morphism_Context Hole dir (relation_class_of_argument_class S) dir' -> - Morphism_Context_List Hole dir dir'' (singl S) - | fcl_cons : - forall S L dir' dir'', - check_if_variance_is_respected (variance_of_argument_class S) dir' dir'' -> - Morphism_Context Hole dir (relation_class_of_argument_class S) dir' -> - Morphism_Context_List Hole dir dir'' L -> - Morphism_Context_List Hole dir dir'' (necons S L). - -Scheme Morphism_Context_rect2 := Induction for Morphism_Context Sort Type -with Morphism_Context_List_rect2 := Induction for Morphism_Context_List Sort Type. - -Definition product_of_arguments : Arguments -> Type. - induction 1. - exact (carrier_of_relation_class a). - exact (prod (carrier_of_relation_class a) IHX). -Defined. - -Definition get_rewrite_direction: rewrite_direction -> Argument_Class -> rewrite_direction. - intros dir R. - destruct (variance_of_argument_class R). - destruct v. - exact dir. (* covariant *) - exact (opposite_direction dir). (* contravariant *) - exact dir. (* symmetric relation *) -Defined. - -Definition directed_relation_of_relation_class: - forall dir (R: Relation_Class), - carrier_of_relation_class R -> carrier_of_relation_class R -> Prop. - destruct 1. - exact (@relation_of_relation_class unit). - intros; exact (relation_of_relation_class _ X0 X). -Defined. - -Definition directed_relation_of_argument_class: - forall dir (R: Argument_Class), - carrier_of_relation_class R -> carrier_of_relation_class R -> Prop. - intros dir R. - rewrite <- - (about_carrier_of_relation_class_and_relation_class_of_argument_class R). - exact (directed_relation_of_relation_class dir (relation_class_of_argument_class R)). -Defined. - - -Definition relation_of_product_of_arguments: - forall dir In, - product_of_arguments In -> product_of_arguments In -> Prop. - induction In. - simpl. - exact (directed_relation_of_argument_class (get_rewrite_direction dir a) a). - - simpl; intros. - destruct X; destruct X0. - apply and. - exact - (directed_relation_of_argument_class (get_rewrite_direction dir a) a c c0). - exact (IHIn p p0). -Defined. - -Definition apply_morphism: - forall In Out (m: function_type_of_morphism_signature In Out) - (args: product_of_arguments In), carrier_of_relation_class Out. - intros. - induction In. - exact (m args). - simpl in m, args. - destruct args. - exact (IHIn (m c) p). -Defined. - -Theorem apply_morphism_compatibility_Right2Left: - forall In Out (m1 m2: function_type_of_morphism_signature In Out) - (args1 args2: product_of_arguments In), - make_compatibility_goal_aux _ _ m1 m2 -> - relation_of_product_of_arguments Right2Left _ args1 args2 -> - directed_relation_of_relation_class Right2Left _ - (apply_morphism _ _ m2 args1) - (apply_morphism _ _ m1 args2). - induction In; intros. - simpl in m1, m2, args1, args2, H0 |- *. - destruct a; simpl in H; hnf in H0. - apply H; exact H0. - destruct v; simpl in H0; apply H; exact H0. - apply H; exact H0. - destruct v; simpl in H0; apply H; exact H0. - rewrite H0; apply H; exact H0. - - simpl in m1, m2, args1, args2, H0 |- *. - destruct args1; destruct args2; simpl. - destruct H0. - simpl in H. - destruct a; simpl in H. - apply IHIn. - apply H; exact H0. - exact H1. - destruct v. - apply IHIn. - apply H; exact H0. - exact H1. - apply IHIn. - apply H; exact H0. - exact H1. - apply IHIn. - apply H; exact H0. - exact H1. - destruct v. - apply IHIn. - apply H; exact H0. - exact H1. - apply IHIn. - apply H; exact H0. - exact H1. - rewrite H0; apply IHIn. - apply H. - exact H1. -Qed. - -Theorem apply_morphism_compatibility_Left2Right: - forall In Out (m1 m2: function_type_of_morphism_signature In Out) - (args1 args2: product_of_arguments In), - make_compatibility_goal_aux _ _ m1 m2 -> - relation_of_product_of_arguments Left2Right _ args1 args2 -> - directed_relation_of_relation_class Left2Right _ - (apply_morphism _ _ m1 args1) - (apply_morphism _ _ m2 args2). -Proof. - induction In; intros. - simpl in m1, m2, args1, args2, H0 |- *. - destruct a; simpl in H; hnf in H0. - apply H; exact H0. - destruct v; simpl in H0; apply H; exact H0. - apply H; exact H0. - destruct v; simpl in H0; apply H; exact H0. - rewrite H0; apply H; exact H0. - - simpl in m1, m2, args1, args2, H0 |- *. - destruct args1; destruct args2; simpl. - destruct H0. - simpl in H. - destruct a; simpl in H. - apply IHIn. - apply H; exact H0. - exact H1. - destruct v. - apply IHIn. - apply H; exact H0. - exact H1. - apply IHIn. - apply H; exact H0. - exact H1. - apply IHIn. - apply H; exact H0. - exact H1. - apply IHIn. - destruct v; simpl in H, H0; apply H; exact H0. - exact H1. - rewrite H0; apply IHIn. - apply H. - exact H1. -Qed. - -Definition interp : - forall Hole dir Out dir', carrier_of_relation_class Hole -> - Morphism_Context Hole dir Out dir' -> carrier_of_relation_class Out. - intros Hole dir Out dir' H t. - elim t using - (@Morphism_Context_rect2 Hole dir (fun S _ _ => carrier_of_relation_class S) - (fun _ L fcl => product_of_arguments L)); - intros. - exact (apply_morphism _ _ (Function m) X). - exact H. - exact c. - exact x. - simpl; - rewrite <- - (about_carrier_of_relation_class_and_relation_class_of_argument_class S); - exact X. - split. - rewrite <- - (about_carrier_of_relation_class_and_relation_class_of_argument_class S); - exact X. - exact X0. -Defined. - -(* CSC: interp and interp_relation_class_list should be mutually defined, since - the proof term of each one contains the proof term of the other one. However - I cannot do that interactively (I should write the Fix by hand) *) -Definition interp_relation_class_list : - forall Hole dir dir' (L: Arguments), carrier_of_relation_class Hole -> - Morphism_Context_List Hole dir dir' L -> product_of_arguments L. - intros Hole dir dir' L H t. - elim t using - (@Morphism_Context_List_rect2 Hole dir (fun S _ _ => carrier_of_relation_class S) - (fun _ L fcl => product_of_arguments L)); - intros. - exact (apply_morphism _ _ (Function m) X). - exact H. - exact c. - exact x. - simpl; - rewrite <- - (about_carrier_of_relation_class_and_relation_class_of_argument_class S); - exact X. - split. - rewrite <- - (about_carrier_of_relation_class_and_relation_class_of_argument_class S); - exact X. - exact X0. -Defined. - -Theorem setoid_rewrite: - forall Hole dir Out dir' (E1 E2: carrier_of_relation_class Hole) - (E: Morphism_Context Hole dir Out dir'), - (directed_relation_of_relation_class dir Hole E1 E2) -> - (directed_relation_of_relation_class dir' Out (interp E1 E) (interp E2 E)). -Proof. - intros. - elim E using - (@Morphism_Context_rect2 Hole dir - (fun S dir'' E => directed_relation_of_relation_class dir'' S (interp E1 E) (interp E2 E)) - (fun dir'' L fcl => - relation_of_product_of_arguments dir'' _ - (interp_relation_class_list E1 fcl) - (interp_relation_class_list E2 fcl))); intros. - change (directed_relation_of_relation_class dir'0 Out0 - (apply_morphism _ _ (Function m) (interp_relation_class_list E1 m0)) - (apply_morphism _ _ (Function m) (interp_relation_class_list E2 m0))). - destruct dir'0. - apply apply_morphism_compatibility_Left2Right. - exact (Compat m). - exact H0. - apply apply_morphism_compatibility_Right2Left. - exact (Compat m). - exact H0. - - exact H. - - unfold interp, Morphism_Context_rect2. - (* CSC: reflexivity used here *) - destruct S; destruct dir'0; simpl; (apply r || reflexivity). - - destruct dir'0; exact r. - - destruct S; unfold directed_relation_of_argument_class; simpl in H0 |- *; - unfold get_rewrite_direction; simpl. - destruct dir'0; destruct dir''; - (exact H0 || - unfold directed_relation_of_argument_class; simpl; apply s; exact H0). - (* the following mess with generalize/clear/intros is to help Coq resolving *) - (* second order unification problems. *) - generalize m c H0; clear H0 m c; inversion c; - generalize m c; clear m c; rewrite <- H1; rewrite <- H2; intros; - (exact H3 || rewrite (opposite_direction_idempotent dir'0); apply H3). - destruct dir'0; destruct dir''; - (exact H0 || - unfold directed_relation_of_argument_class; simpl; apply s; exact H0). - (* the following mess with generalize/clear/intros is to help Coq resolving *) - (* second order unification problems. *) - generalize m c H0; clear H0 m c; inversion c; - generalize m c; clear m c; rewrite <- H1; rewrite <- H2; intros; - (exact H3 || rewrite (opposite_direction_idempotent dir'0); apply H3). - destruct dir'0; destruct dir''; (exact H0 || hnf; symmetry; exact H0). - - change - (directed_relation_of_argument_class (get_rewrite_direction dir'' S) S - (eq_rect _ (fun T : Type => T) (interp E1 m) _ - (about_carrier_of_relation_class_and_relation_class_of_argument_class S)) - (eq_rect _ (fun T : Type => T) (interp E2 m) _ - (about_carrier_of_relation_class_and_relation_class_of_argument_class S)) /\ - relation_of_product_of_arguments dir'' _ - (interp_relation_class_list E1 m0) (interp_relation_class_list E2 m0)). - split. - clear m0 H1; destruct S; simpl in H0 |- *; unfold get_rewrite_direction; simpl. - destruct dir''; destruct dir'0; (exact H0 || hnf; apply s; exact H0). - inversion c. - rewrite <- H3; exact H0. - rewrite (opposite_direction_idempotent dir'0); exact H0. - destruct dir''; destruct dir'0; (exact H0 || hnf; apply s; exact H0). - inversion c. - rewrite <- H3; exact H0. - rewrite (opposite_direction_idempotent dir'0); exact H0. - destruct dir''; destruct dir'0; (exact H0 || hnf; symmetry; exact H0). - exact H1. - Qed. - -(** * Miscelenous *) - -(** For backwark compatibility *) +(*i $Id: Setoid.v 10765 2008-04-08 16:15:23Z msozeau $: i*) -Record Setoid_Theory (A: Type) (Aeq: relation A) : Prop := - { Seq_refl : forall x:A, Aeq x x; - Seq_sym : forall x y:A, Aeq x y -> Aeq y x; - Seq_trans : forall x y z:A, Aeq x y -> Aeq y z -> Aeq x z }. +Require Export Coq.Classes.SetoidTactics. -Implicit Arguments Setoid_Theory []. -Implicit Arguments Seq_refl []. -Implicit Arguments Seq_sym []. -Implicit Arguments Seq_trans []. +(** For backward compatibility *) +Definition Setoid_Theory := @Equivalence. +Definition Build_Setoid_Theory := @Build_Equivalence. +Definition Seq_refl A Aeq (s : Setoid_Theory A Aeq) : forall x:A, Aeq x x := + Eval compute in reflexivity. +Definition Seq_sym A Aeq (s : Setoid_Theory A Aeq) : forall x y:A, Aeq x y -> Aeq y x := + Eval compute in symmetry. +Definition Seq_trans A Aeq (s : Setoid_Theory A Aeq) : forall x y z:A, Aeq x y -> Aeq y z -> Aeq x z := + Eval compute in transitivity. (** Some tactics for manipulating Setoid Theory not officially declared as Setoid. *) diff --git a/theories/Setoids/Setoid_Prop.v b/theories/Setoids/Setoid_Prop.v new file mode 100644 index 00000000..7300937e --- /dev/null +++ b/theories/Setoids/Setoid_Prop.v @@ -0,0 +1,79 @@ + +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* iff ==> iff as Impl_Morphism. +Proof. + unfold impl; tauto. +Qed. + +(** [and] is a morphism *) + +Add Morphism and with signature iff ==> iff ==> iff as And_Morphism. + tauto. +Qed. + +(** [or] is a morphism *) + +Add Morphism or with signature iff ==> iff ==> iff as Or_Morphism. +Proof. + tauto. +Qed. + +(** [not] is a morphism *) + +Add Morphism not with signature iff ==> iff as Not_Morphism. +Proof. + tauto. +Qed. + +(** The same examples on [impl] *) + +Add Morphism and with signature impl ++> impl ++> impl as And_Morphism2. +Proof. + unfold impl; tauto. +Qed. + +Add Morphism or with signature impl ++> impl ++> impl as Or_Morphism2. +Proof. + unfold impl; tauto. +Qed. + +Add Morphism not with signature impl --> impl as Not_Morphism2. +Proof. + unfold impl; tauto. +Qed. + diff --git a/theories/Setoids/Setoid_tac.v b/theories/Setoids/Setoid_tac.v new file mode 100644 index 00000000..cdc4eafe --- /dev/null +++ b/theories/Setoids/Setoid_tac.v @@ -0,0 +1,595 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* reflexive _ Aeq -> X_Relation_Class X + | AsymmetricReflexive : X -> forall A Aeq, reflexive A Aeq -> X_Relation_Class X + | SymmetricAreflexive : forall A Aeq, symmetric A Aeq -> X_Relation_Class X + | AsymmetricAreflexive : X -> forall A (Aeq : relation A), X_Relation_Class X + | Leibniz : Type -> X_Relation_Class X. + +Inductive variance : Set := + Covariant + | Contravariant. + +Definition Argument_Class := X_Relation_Class variance. +Definition Relation_Class := X_Relation_Class unit. + +Inductive Reflexive_Relation_Class : Type := + RSymmetric : + forall A Aeq, symmetric A Aeq -> reflexive _ Aeq -> Reflexive_Relation_Class + | RAsymmetric : + forall A Aeq, reflexive A Aeq -> Reflexive_Relation_Class + | RLeibniz : Type -> Reflexive_Relation_Class. + +Inductive Areflexive_Relation_Class : Type := + | ASymmetric : forall A Aeq, symmetric A Aeq -> Areflexive_Relation_Class + | AAsymmetric : forall A (Aeq : relation A), Areflexive_Relation_Class. + +Implicit Type Hole Out: Relation_Class. + +Definition relation_class_of_argument_class : Argument_Class -> Relation_Class. + destruct 1. + exact (SymmetricReflexive _ s r). + exact (AsymmetricReflexive tt r). + exact (SymmetricAreflexive _ s). + exact (AsymmetricAreflexive tt Aeq). + exact (Leibniz _ T). +Defined. + +Definition carrier_of_relation_class : forall X, X_Relation_Class X -> Type. + destruct 1. + exact A. + exact A. + exact A. + exact A. + exact T. +Defined. + +Definition relation_of_relation_class : + forall X R, @carrier_of_relation_class X R -> carrier_of_relation_class R -> Prop. + destruct R. + exact Aeq. + exact Aeq. + exact Aeq. + exact Aeq. + exact (@eq T). +Defined. + +Lemma about_carrier_of_relation_class_and_relation_class_of_argument_class : + forall R, + carrier_of_relation_class (relation_class_of_argument_class R) = + carrier_of_relation_class R. + destruct R; reflexivity. +Defined. + +Inductive nelistT (A : Type) : Type := + singl : A -> nelistT A + | necons : A -> nelistT A -> nelistT A. + +Definition Arguments := nelistT Argument_Class. + +Implicit Type In: Arguments. + +Definition function_type_of_morphism_signature : + Arguments -> Relation_Class -> Type. + intros In Out. + induction In. + exact (carrier_of_relation_class a -> carrier_of_relation_class Out). + exact (carrier_of_relation_class a -> IHIn). +Defined. + +Definition make_compatibility_goal_aux: + forall In Out + (f g: function_type_of_morphism_signature In Out), Prop. + intros; induction In; simpl in f, g. + induction a; simpl in f, g. + exact (forall x1 x2, Aeq x1 x2 -> relation_of_relation_class Out (f x1) (g x2)). + destruct x. + exact (forall x1 x2, Aeq x1 x2 -> relation_of_relation_class Out (f x1) (g x2)). + exact (forall x1 x2, Aeq x2 x1 -> relation_of_relation_class Out (f x1) (g x2)). + exact (forall x1 x2, Aeq x1 x2 -> relation_of_relation_class Out (f x1) (g x2)). + destruct x. + exact (forall x1 x2, Aeq x1 x2 -> relation_of_relation_class Out (f x1) (g x2)). + exact (forall x1 x2, Aeq x2 x1 -> relation_of_relation_class Out (f x1) (g x2)). + exact (forall x, relation_of_relation_class Out (f x) (g x)). + induction a; simpl in f, g. + exact (forall x1 x2, Aeq x1 x2 -> IHIn (f x1) (g x2)). + destruct x. + exact (forall x1 x2, Aeq x1 x2 -> IHIn (f x1) (g x2)). + exact (forall x1 x2, Aeq x2 x1 -> IHIn (f x1) (g x2)). + exact (forall x1 x2, Aeq x1 x2 -> IHIn (f x1) (g x2)). + destruct x. + exact (forall x1 x2, Aeq x1 x2 -> IHIn (f x1) (g x2)). + exact (forall x1 x2, Aeq x2 x1 -> IHIn (f x1) (g x2)). + exact (forall x, IHIn (f x) (g x)). +Defined. + +Definition make_compatibility_goal := + (fun In Out f => make_compatibility_goal_aux In Out f f). + +Record Morphism_Theory In Out : Type := + { Function : function_type_of_morphism_signature In Out; + Compat : make_compatibility_goal In Out Function }. + + +(** The [iff] relation class *) + +Definition Iff_Relation_Class : Relation_Class. + eapply (@SymmetricReflexive unit _ iff). + exact iff_sym. + exact iff_refl. +Defined. + +(** The [impl] relation class *) + +Definition impl (A B: Prop) := A -> B. + +Theorem impl_refl: reflexive _ impl. +Proof. + hnf; unfold impl; tauto. +Qed. + +Definition Impl_Relation_Class : Relation_Class. + eapply (@AsymmetricReflexive unit tt _ impl). + exact impl_refl. +Defined. + +(** Every function is a morphism from Leibniz+ to Leibniz *) + +Definition list_of_Leibniz_of_list_of_types: nelistT Type -> Arguments. + induction 1. + exact (singl (Leibniz _ a)). + exact (necons (Leibniz _ a) IHX). +Defined. + +Definition morphism_theory_of_function : + forall (In: nelistT Type) (Out: Type), + let In' := list_of_Leibniz_of_list_of_types In in + let Out' := Leibniz _ Out in + function_type_of_morphism_signature In' Out' -> + Morphism_Theory In' Out'. + intros. + exists X. + induction In; unfold make_compatibility_goal; simpl. + reflexivity. + intro; apply (IHIn (X x)). +Defined. + +(** Every predicate is a morphism from Leibniz+ to Iff_Relation_Class *) + +Definition morphism_theory_of_predicate : + forall (In: nelistT Type), + let In' := list_of_Leibniz_of_list_of_types In in + function_type_of_morphism_signature In' Iff_Relation_Class -> + Morphism_Theory In' Iff_Relation_Class. + intros. + exists X. + induction In; unfold make_compatibility_goal; simpl. + intro; apply iff_refl. + intro; apply (IHIn (X x)). +Defined. + +(** * Utility functions to prove that every transitive relation is a morphism *) + +Definition equality_morphism_of_symmetric_areflexive_transitive_relation: + forall (A: Type)(Aeq: relation A)(sym: symmetric _ Aeq)(trans: transitive _ Aeq), + let ASetoidClass := SymmetricAreflexive _ sym in + (Morphism_Theory (necons ASetoidClass (singl ASetoidClass)) Iff_Relation_Class). + intros. + exists Aeq. + unfold make_compatibility_goal; simpl; split; eauto. +Defined. + +Definition equality_morphism_of_symmetric_reflexive_transitive_relation: + forall (A: Type)(Aeq: relation A)(refl: reflexive _ Aeq)(sym: symmetric _ Aeq) + (trans: transitive _ Aeq), let ASetoidClass := SymmetricReflexive _ sym refl in + (Morphism_Theory (necons ASetoidClass (singl ASetoidClass)) Iff_Relation_Class). + intros. + exists Aeq. + unfold make_compatibility_goal; simpl; split; eauto. +Defined. + +Definition equality_morphism_of_asymmetric_areflexive_transitive_relation: + forall (A: Type)(Aeq: relation A)(trans: transitive _ Aeq), + let ASetoidClass1 := AsymmetricAreflexive Contravariant Aeq in + let ASetoidClass2 := AsymmetricAreflexive Covariant Aeq in + (Morphism_Theory (necons ASetoidClass1 (singl ASetoidClass2)) Impl_Relation_Class). + intros. + exists Aeq. + unfold make_compatibility_goal; simpl; unfold impl; eauto. +Defined. + +Definition equality_morphism_of_asymmetric_reflexive_transitive_relation: + forall (A: Type)(Aeq: relation A)(refl: reflexive _ Aeq)(trans: transitive _ Aeq), + let ASetoidClass1 := AsymmetricReflexive Contravariant refl in + let ASetoidClass2 := AsymmetricReflexive Covariant refl in + (Morphism_Theory (necons ASetoidClass1 (singl ASetoidClass2)) Impl_Relation_Class). + intros. + exists Aeq. + unfold make_compatibility_goal; simpl; unfold impl; eauto. +Defined. + +(** * The CIC part of the reflexive tactic ([setoid_rewrite]) *) + +Inductive rewrite_direction : Type := + | Left2Right + | Right2Left. + +Implicit Type dir: rewrite_direction. + +Definition variance_of_argument_class : Argument_Class -> option variance. + destruct 1. + exact None. + exact (Some v). + exact None. + exact (Some v). + exact None. +Defined. + +Definition opposite_direction := + fun dir => + match dir with + | Left2Right => Right2Left + | Right2Left => Left2Right + end. + +Lemma opposite_direction_idempotent: + forall dir, (opposite_direction (opposite_direction dir)) = dir. +Proof. + destruct dir; reflexivity. +Qed. + +Inductive check_if_variance_is_respected : + option variance -> rewrite_direction -> rewrite_direction -> Prop := + | MSNone : forall dir dir', check_if_variance_is_respected None dir dir' + | MSCovariant : forall dir, check_if_variance_is_respected (Some Covariant) dir dir + | MSContravariant : + forall dir, + check_if_variance_is_respected (Some Contravariant) dir (opposite_direction dir). + +Definition relation_class_of_reflexive_relation_class: + Reflexive_Relation_Class -> Relation_Class. + induction 1. + exact (SymmetricReflexive _ s r). + exact (AsymmetricReflexive tt r). + exact (Leibniz _ T). +Defined. + +Definition relation_class_of_areflexive_relation_class: + Areflexive_Relation_Class -> Relation_Class. + induction 1. + exact (SymmetricAreflexive _ s). + exact (AsymmetricAreflexive tt Aeq). +Defined. + +Definition carrier_of_reflexive_relation_class := + fun R => carrier_of_relation_class (relation_class_of_reflexive_relation_class R). + +Definition carrier_of_areflexive_relation_class := + fun R => carrier_of_relation_class (relation_class_of_areflexive_relation_class R). + +Definition relation_of_areflexive_relation_class := + fun R => relation_of_relation_class (relation_class_of_areflexive_relation_class R). + +Inductive Morphism_Context Hole dir : Relation_Class -> rewrite_direction -> Type := + | App : + forall In Out dir', + Morphism_Theory In Out -> Morphism_Context_List Hole dir dir' In -> + Morphism_Context Hole dir Out dir' + | ToReplace : Morphism_Context Hole dir Hole dir + | ToKeep : + forall S dir', + carrier_of_reflexive_relation_class S -> + Morphism_Context Hole dir (relation_class_of_reflexive_relation_class S) dir' + | ProperElementToKeep : + forall S dir' (x: carrier_of_areflexive_relation_class S), + relation_of_areflexive_relation_class S x x -> + Morphism_Context Hole dir (relation_class_of_areflexive_relation_class S) dir' +with Morphism_Context_List Hole dir : + rewrite_direction -> Arguments -> Type +:= + fcl_singl : + forall S dir' dir'', + check_if_variance_is_respected (variance_of_argument_class S) dir' dir'' -> + Morphism_Context Hole dir (relation_class_of_argument_class S) dir' -> + Morphism_Context_List Hole dir dir'' (singl S) + | fcl_cons : + forall S L dir' dir'', + check_if_variance_is_respected (variance_of_argument_class S) dir' dir'' -> + Morphism_Context Hole dir (relation_class_of_argument_class S) dir' -> + Morphism_Context_List Hole dir dir'' L -> + Morphism_Context_List Hole dir dir'' (necons S L). + +Scheme Morphism_Context_rect2 := Induction for Morphism_Context Sort Type +with Morphism_Context_List_rect2 := Induction for Morphism_Context_List Sort Type. + +Definition product_of_arguments : Arguments -> Type. + induction 1. + exact (carrier_of_relation_class a). + exact (prod (carrier_of_relation_class a) IHX). +Defined. + +Definition get_rewrite_direction: rewrite_direction -> Argument_Class -> rewrite_direction. + intros dir R. + destruct (variance_of_argument_class R). + destruct v. + exact dir. (* covariant *) + exact (opposite_direction dir). (* contravariant *) + exact dir. (* symmetric relation *) +Defined. + +Definition directed_relation_of_relation_class: + forall dir (R: Relation_Class), + carrier_of_relation_class R -> carrier_of_relation_class R -> Prop. + destruct 1. + exact (@relation_of_relation_class unit). + intros; exact (relation_of_relation_class _ X0 X). +Defined. + +Definition directed_relation_of_argument_class: + forall dir (R: Argument_Class), + carrier_of_relation_class R -> carrier_of_relation_class R -> Prop. + intros dir R. + rewrite <- + (about_carrier_of_relation_class_and_relation_class_of_argument_class R). + exact (directed_relation_of_relation_class dir (relation_class_of_argument_class R)). +Defined. + + +Definition relation_of_product_of_arguments: + forall dir In, + product_of_arguments In -> product_of_arguments In -> Prop. + induction In. + simpl. + exact (directed_relation_of_argument_class (get_rewrite_direction dir a) a). + + simpl; intros. + destruct X; destruct X0. + apply and. + exact + (directed_relation_of_argument_class (get_rewrite_direction dir a) a c c0). + exact (IHIn p p0). +Defined. + +Definition apply_morphism: + forall In Out (m: function_type_of_morphism_signature In Out) + (args: product_of_arguments In), carrier_of_relation_class Out. + intros. + induction In. + exact (m args). + simpl in m, args. + destruct args. + exact (IHIn (m c) p). +Defined. + +Theorem apply_morphism_compatibility_Right2Left: + forall In Out (m1 m2: function_type_of_morphism_signature In Out) + (args1 args2: product_of_arguments In), + make_compatibility_goal_aux _ _ m1 m2 -> + relation_of_product_of_arguments Right2Left _ args1 args2 -> + directed_relation_of_relation_class Right2Left _ + (apply_morphism _ _ m2 args1) + (apply_morphism _ _ m1 args2). + induction In; intros. + simpl in m1, m2, args1, args2, H0 |- *. + destruct a; simpl in H; hnf in H0. + apply H; exact H0. + destruct v; simpl in H0; apply H; exact H0. + apply H; exact H0. + destruct v; simpl in H0; apply H; exact H0. + rewrite H0; apply H; exact H0. + + simpl in m1, m2, args1, args2, H0 |- *. + destruct args1; destruct args2; simpl. + destruct H0. + simpl in H. + destruct a; simpl in H. + apply IHIn. + apply H; exact H0. + exact H1. + destruct v. + apply IHIn. + apply H; exact H0. + exact H1. + apply IHIn. + apply H; exact H0. + exact H1. + apply IHIn. + apply H; exact H0. + exact H1. + destruct v. + apply IHIn. + apply H; exact H0. + exact H1. + apply IHIn. + apply H; exact H0. + exact H1. + rewrite H0; apply IHIn. + apply H. + exact H1. +Qed. + +Theorem apply_morphism_compatibility_Left2Right: + forall In Out (m1 m2: function_type_of_morphism_signature In Out) + (args1 args2: product_of_arguments In), + make_compatibility_goal_aux _ _ m1 m2 -> + relation_of_product_of_arguments Left2Right _ args1 args2 -> + directed_relation_of_relation_class Left2Right _ + (apply_morphism _ _ m1 args1) + (apply_morphism _ _ m2 args2). +Proof. + induction In; intros. + simpl in m1, m2, args1, args2, H0 |- *. + destruct a; simpl in H; hnf in H0. + apply H; exact H0. + destruct v; simpl in H0; apply H; exact H0. + apply H; exact H0. + destruct v; simpl in H0; apply H; exact H0. + rewrite H0; apply H; exact H0. + + simpl in m1, m2, args1, args2, H0 |- *. + destruct args1; destruct args2; simpl. + destruct H0. + simpl in H. + destruct a; simpl in H. + apply IHIn. + apply H; exact H0. + exact H1. + destruct v. + apply IHIn. + apply H; exact H0. + exact H1. + apply IHIn. + apply H; exact H0. + exact H1. + apply IHIn. + apply H; exact H0. + exact H1. + apply IHIn. + destruct v; simpl in H, H0; apply H; exact H0. + exact H1. + rewrite H0; apply IHIn. + apply H. + exact H1. +Qed. + +Definition interp : + forall Hole dir Out dir', carrier_of_relation_class Hole -> + Morphism_Context Hole dir Out dir' -> carrier_of_relation_class Out. + intros Hole dir Out dir' H t. + elim t using + (@Morphism_Context_rect2 Hole dir (fun S _ _ => carrier_of_relation_class S) + (fun _ L fcl => product_of_arguments L)); + intros. + exact (apply_morphism _ _ (Function m) X). + exact H. + exact c. + exact x. + simpl; + rewrite <- + (about_carrier_of_relation_class_and_relation_class_of_argument_class S); + exact X. + split. + rewrite <- + (about_carrier_of_relation_class_and_relation_class_of_argument_class S); + exact X. + exact X0. +Defined. + +(* CSC: interp and interp_relation_class_list should be mutually defined, since + the proof term of each one contains the proof term of the other one. However + I cannot do that interactively (I should write the Fix by hand) *) +Definition interp_relation_class_list : + forall Hole dir dir' (L: Arguments), carrier_of_relation_class Hole -> + Morphism_Context_List Hole dir dir' L -> product_of_arguments L. + intros Hole dir dir' L H t. + elim t using + (@Morphism_Context_List_rect2 Hole dir (fun S _ _ => carrier_of_relation_class S) + (fun _ L fcl => product_of_arguments L)); + intros. + exact (apply_morphism _ _ (Function m) X). + exact H. + exact c. + exact x. + simpl; + rewrite <- + (about_carrier_of_relation_class_and_relation_class_of_argument_class S); + exact X. + split. + rewrite <- + (about_carrier_of_relation_class_and_relation_class_of_argument_class S); + exact X. + exact X0. +Defined. + +Theorem setoid_rewrite: + forall Hole dir Out dir' (E1 E2: carrier_of_relation_class Hole) + (E: Morphism_Context Hole dir Out dir'), + (directed_relation_of_relation_class dir Hole E1 E2) -> + (directed_relation_of_relation_class dir' Out (interp E1 E) (interp E2 E)). +Proof. + intros. + elim E using + (@Morphism_Context_rect2 Hole dir + (fun S dir'' E => directed_relation_of_relation_class dir'' S (interp E1 E) (interp E2 E)) + (fun dir'' L fcl => + relation_of_product_of_arguments dir'' _ + (interp_relation_class_list E1 fcl) + (interp_relation_class_list E2 fcl))); intros. + change (directed_relation_of_relation_class dir'0 Out0 + (apply_morphism _ _ (Function m) (interp_relation_class_list E1 m0)) + (apply_morphism _ _ (Function m) (interp_relation_class_list E2 m0))). + destruct dir'0. + apply apply_morphism_compatibility_Left2Right. + exact (Compat m). + exact H0. + apply apply_morphism_compatibility_Right2Left. + exact (Compat m). + exact H0. + + exact H. + + unfold interp, Morphism_Context_rect2. + (* CSC: reflexivity used here *) + destruct S; destruct dir'0; simpl; (apply r || reflexivity). + + destruct dir'0; exact r. + + destruct S; unfold directed_relation_of_argument_class; simpl in H0 |- *; + unfold get_rewrite_direction; simpl. + destruct dir'0; destruct dir''; + (exact H0 || + unfold directed_relation_of_argument_class; simpl; apply s; exact H0). + (* the following mess with generalize/clear/intros is to help Coq resolving *) + (* second order unification problems. *) + generalize m c H0; clear H0 m c; inversion c; + generalize m c; clear m c; rewrite <- H1; rewrite <- H2; intros; + (exact H3 || rewrite (opposite_direction_idempotent dir'0); apply H3). + destruct dir'0; destruct dir''; + (exact H0 || + unfold directed_relation_of_argument_class; simpl; apply s; exact H0). + (* the following mess with generalize/clear/intros is to help Coq resolving *) + (* second order unification problems. *) + generalize m c H0; clear H0 m c; inversion c; + generalize m c; clear m c; rewrite <- H1; rewrite <- H2; intros; + (exact H3 || rewrite (opposite_direction_idempotent dir'0); apply H3). + destruct dir'0; destruct dir''; (exact H0 || hnf; symmetry; exact H0). + + change + (directed_relation_of_argument_class (get_rewrite_direction dir'' S) S + (eq_rect _ (fun T : Type => T) (interp E1 m) _ + (about_carrier_of_relation_class_and_relation_class_of_argument_class S)) + (eq_rect _ (fun T : Type => T) (interp E2 m) _ + (about_carrier_of_relation_class_and_relation_class_of_argument_class S)) /\ + relation_of_product_of_arguments dir'' _ + (interp_relation_class_list E1 m0) (interp_relation_class_list E2 m0)). + split. + clear m0 H1; destruct S; simpl in H0 |- *; unfold get_rewrite_direction; simpl. + destruct dir''; destruct dir'0; (exact H0 || hnf; apply s; exact H0). + inversion c. + rewrite <- H3; exact H0. + rewrite (opposite_direction_idempotent dir'0); exact H0. + destruct dir''; destruct dir'0; (exact H0 || hnf; apply s; exact H0). + inversion c. + rewrite <- H3; exact H0. + rewrite (opposite_direction_idempotent dir'0); exact H0. + destruct dir''; destruct dir'0; (exact H0 || hnf; symmetry; exact H0). + exact H1. + Qed. diff --git a/theories/Sets/Infinite_sets.v b/theories/Sets/Infinite_sets.v index 47554ac4..ae2143c8 100644 --- a/theories/Sets/Infinite_sets.v +++ b/theories/Sets/Infinite_sets.v @@ -24,7 +24,7 @@ (* in Summer 1995. Several developments by E. Ledinot were an inspiration. *) (****************************************************************************) -(*i $Id: Infinite_sets.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Infinite_sets.v 10637 2008-03-07 23:52:56Z letouzey $ i*) Require Export Finite_sets. Require Export Constructive_sets. @@ -162,7 +162,7 @@ Section Infinite_sets. generalize (H'3 x). intro H'4; lapply H'4; [ intro H'8; try exact H'8; clear H'4 | clear H'4 ]; auto with sets. - specialize 5Im_inv with (U := U) (V := V) (X := A) (f := f) (y := x); + specialize Im_inv with (U := U) (V := V) (X := A) (f := f) (y := x); intro H'11; lapply H'11; [ intro H'13; elim H'11; clear H'11 | clear H'11 ]; auto with sets. intros x1 H'4; try assumption. diff --git a/theories/Sets/Integers.v b/theories/Sets/Integers.v index c969ad9c..1786edf1 100644 --- a/theories/Sets/Integers.v +++ b/theories/Sets/Integers.v @@ -24,7 +24,7 @@ (* in Summer 1995. Several developments by E. Ledinot were an inspiration. *) (****************************************************************************) -(*i $Id: Integers.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Integers.v 10637 2008-03-07 23:52:56Z letouzey $ i*) Require Export Finite_sets. Require Export Constructive_sets. @@ -87,7 +87,7 @@ Section Integers_sect. apply Totally_ordered_definition. simpl in |- *. intros H' x y H'0. - specialize 2le_or_lt with (n := x) (m := y); intro H'2; elim H'2. + elim le_or_lt with (n := x) (m := y). intro H'1; left; auto with sets arith. intro H'1; right. cut (y <= x); auto with sets arith. @@ -142,8 +142,8 @@ Section Integers_sect. elim H'0; intros H'1 H'2. cut (In nat Integers (S x)). intro H'3. - specialize 1H'2 with (y := S x); intro H'4; lapply H'4; - [ intro H'5; clear H'4 | try assumption; clear H'4 ]. + specialize H'2 with (y := S x); lapply H'2; + [ intro H'5; clear H'2 | try assumption; clear H'2 ]. simpl in H'5. absurd (S x <= x); auto with arith. apply triv_nat. diff --git a/theories/Sets/Multiset.v b/theories/Sets/Multiset.v index 7084a82d..d2bff488 100644 --- a/theories/Sets/Multiset.v +++ b/theories/Sets/Multiset.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Multiset.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Multiset.v 10616 2008-03-04 17:33:35Z letouzey $ i*) (* G. Huet 1-9-95 *) @@ -16,11 +16,11 @@ Set Implicit Arguments. Section multiset_defs. - Variable A : Set. + Variable A : Type. Variable eqA : A -> A -> Prop. Hypothesis Aeq_dec : forall x y:A, {eqA x y} + {~ eqA x y}. - Inductive multiset : Set := + Inductive multiset : Type := Bag : (A -> nat) -> multiset. Definition EmptyBag := Bag (fun a:A => 0). diff --git a/theories/Sets/Permut.v b/theories/Sets/Permut.v index a7c3db3a..4380f10c 100644 --- a/theories/Sets/Permut.v +++ b/theories/Sets/Permut.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Permut.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Permut.v 10616 2008-03-04 17:33:35Z letouzey $ i*) (* G. Huet 1-9-95 *) @@ -15,7 +15,7 @@ Section Axiomatisation. - Variable U : Set. + Variable U : Type. Variable op : U -> U -> U. Variable cong : U -> U -> Prop. diff --git a/theories/Sets/Powerset_Classical_facts.v b/theories/Sets/Powerset_Classical_facts.v index 47857705..34c49409 100644 --- a/theories/Sets/Powerset_Classical_facts.v +++ b/theories/Sets/Powerset_Classical_facts.v @@ -24,7 +24,7 @@ (* in Summer 1995. Several developments by E. Ledinot were an inspiration. *) (****************************************************************************) -(*i $Id: Powerset_Classical_facts.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Powerset_Classical_facts.v 10855 2008-04-27 11:16:15Z msozeau $ i*) Require Export Ensembles. Require Export Constructive_sets. diff --git a/theories/Sets/Relations_2_facts.v b/theories/Sets/Relations_2_facts.v index 3291f3ee..2374c2bf 100644 --- a/theories/Sets/Relations_2_facts.v +++ b/theories/Sets/Relations_2_facts.v @@ -24,7 +24,7 @@ (* in Summer 1995. Several developments by E. Ledinot were an inspiration. *) (****************************************************************************) -(*i $Id: Relations_2_facts.v 8642 2006-03-17 10:09:02Z notin $ i*) +(*i $Id: Relations_2_facts.v 10637 2008-03-07 23:52:56Z letouzey $ i*) Require Export Relations_1. Require Export Relations_1_facts. @@ -140,10 +140,10 @@ intros U R H' x b H'0; elim H'0. intros x0 a H'1; exists a; auto with sets. intros x0 y z H'1 H'2 H'3 a H'4. red in H'. -specialize 3H' with (x := x0) (a := a) (b := y); intro H'7; lapply H'7; +specialize H' with (x := x0) (a := a) (b := y); lapply H'; [ intro H'8; lapply H'8; - [ intro H'9; try exact H'9; clear H'8 H'7 | clear H'8 H'7 ] - | clear H'7 ]; auto with sets. + [ intro H'9; try exact H'9; clear H'8 H' | clear H'8 H' ] + | clear H' ]; auto with sets. elim H'9. intros t H'5; elim H'5; intros H'6 H'7; try exact H'6; clear H'5. elim (H'3 t); auto with sets. diff --git a/theories/Sorting/Heap.v b/theories/Sorting/Heap.v index e1e026f5..fe7902aa 100644 --- a/theories/Sorting/Heap.v +++ b/theories/Sorting/Heap.v @@ -6,18 +6,13 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Heap.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Heap.v 10698 2008-03-19 18:46:59Z letouzey $ i*) (** A development of Treesort on Heap trees *) (* G. Huet 1-9-95 uses Multiset *) -Require Import List. -Require Import Multiset. -Require Import Permutation. -Require Import Relations. -Require Import Sorting. - +Require Import List Multiset Permutation Relations Sorting. Section defs. @@ -25,7 +20,7 @@ Section defs. (** ** Definition of trees over an ordered set *) - Variable A : Set. + Variable A : Type. Variable leA : relation A. Variable eqA : relation A. @@ -43,7 +38,7 @@ Section defs. Let emptyBag := EmptyBag A. Let singletonBag := SingletonBag _ eqA_dec. - Inductive Tree : Set := + Inductive Tree := | Tree_Leaf : Tree | Tree_Node : A -> Tree -> Tree -> Tree. @@ -86,6 +81,23 @@ Section defs. intros; inversion H; auto with datatypes. Qed. + (* This lemma ought to be generated automatically by the Inversion tools *) + Lemma is_heap_rect : + forall P:Tree -> Type, + P Tree_Leaf -> + (forall (a:A) (T1 T2:Tree), + leA_Tree a T1 -> + leA_Tree a T2 -> + is_heap T1 -> P T1 -> is_heap T2 -> P T2 -> P (Tree_Node a T1 T2)) -> + forall T:Tree, is_heap T -> P T. + Proof. + simple induction T; auto with datatypes. + intros a G PG D PD PN. + elim (invert_heap a G D); auto with datatypes. + intros H1 H2; elim H2; intros H3 H4; elim H4; intros. + apply X0; auto with datatypes. + Qed. + (* This lemma ought to be generated automatically by the Inversion tools *) Lemma is_heap_rec : forall P:Tree -> Set, @@ -100,7 +112,7 @@ Section defs. intros a G PG D PD PN. elim (invert_heap a G D); auto with datatypes. intros H1 H2; elim H2; intros H3 H4; elim H4; intros. - apply H0; auto with datatypes. + apply X; auto with datatypes. Qed. Lemma low_trans : @@ -136,7 +148,7 @@ Section defs. (** ** Specification of heap insertion *) - Inductive insert_spec (a:A) (T:Tree) : Set := + Inductive insert_spec (a:A) (T:Tree) : Type := insert_exist : forall T1:Tree, is_heap T1 -> @@ -152,11 +164,11 @@ Section defs. auto using node_is_heap, nil_is_heap, leA_Tree_Leaf with datatypes. simpl in |- *; unfold meq, munion in |- *; auto using node_is_heap with datatypes. elim (leA_dec a a0); intros. - elim (H3 a0); intros. + elim (X a0); intros. apply insert_exist with (Tree_Node a T2 T0); auto using node_is_heap, nil_is_heap, leA_Tree_Leaf with datatypes. simpl in |- *; apply treesort_twist1; trivial with datatypes. - elim (H3 a); intros T3 HeapT3 ConT3 LeA. + elim (X a); intros T3 HeapT3 ConT3 LeA. apply insert_exist with (Tree_Node a0 T2 T3); auto using node_is_heap, nil_is_heap, leA_Tree_Leaf with datatypes. apply node_is_heap; auto using node_is_heap, nil_is_heap, leA_Tree_Leaf with datatypes. @@ -169,7 +181,7 @@ Section defs. (** ** Building a heap from a list *) - Inductive build_heap (l:list A) : Set := + Inductive build_heap (l:list A) : Type := heap_exist : forall T:Tree, is_heap T -> @@ -193,7 +205,7 @@ Section defs. (** ** Building the sorted list *) - Inductive flat_spec (T:Tree) : Set := + Inductive flat_spec (T:Tree) : Type := flat_exist : forall l:list A, sort leA l -> @@ -204,7 +216,7 @@ Section defs. Proof. intros T h; elim h; intros. apply flat_exist with (nil (A:=A)); auto with datatypes. - elim H2; intros l1 s1 i1 m1; elim H4; intros l2 s2 i2 m2. + elim X; intros l1 s1 i1 m1; elim X0; intros l2 s2 i2 m2. elim (merge _ leA_dec eqA_dec s1 s2); intros. apply flat_exist with (a :: l); simpl in |- *; auto with datatypes. apply meq_trans with diff --git a/theories/Sorting/PermutEq.v b/theories/Sorting/PermutEq.v index f4986198..084aae92 100644 --- a/theories/Sorting/PermutEq.v +++ b/theories/Sorting/PermutEq.v @@ -6,14 +6,9 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: PermutEq.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: PermutEq.v 10739 2008-04-01 14:45:20Z herbelin $ i*) -Require Import Omega. -Require Import Relations. -Require Import Setoid. -Require Import List. -Require Import Multiset. -Require Import Permutation. +Require Import Omega Relations Setoid List Multiset Permutation. Set Implicit Arguments. @@ -25,7 +20,7 @@ Set Implicit Arguments. Section Perm. - Variable A : Set. + Variable A : Type. Hypothesis eq_dec : forall x y:A, {x=y} + {~ x=y}. Notation permutation := (permutation _ eq_dec). @@ -214,7 +209,7 @@ Section Perm. apply permut_remove_hd with a; auto. Qed. - Variable B : Set. + Variable B : Type. Variable eqB_dec : forall x y:B, { x=y }+{ ~x=y }. (** Permutation is compatible with map. *) diff --git a/theories/Sorting/PermutSetoid.v b/theories/Sorting/PermutSetoid.v index 65369a01..c3888cfa 100644 --- a/theories/Sorting/PermutSetoid.v +++ b/theories/Sorting/PermutSetoid.v @@ -6,14 +6,9 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: PermutSetoid.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: PermutSetoid.v 10739 2008-04-01 14:45:20Z herbelin $ i*) -Require Import Omega. -Require Import Relations. -Require Import List. -Require Import Multiset. -Require Import Permutation. -Require Import SetoidList. +Require Import Omega Relations Multiset Permutation SetoidList. Set Implicit Arguments. @@ -23,7 +18,7 @@ Set Implicit Arguments. Section Perm. -Variable A : Set. +Variable A : Type. Variable eqA : relation A. Hypothesis eqA_dec : forall x y:A, {eqA x y} + {~ eqA x y}. @@ -81,7 +76,7 @@ Proof. rewrite IHl in H1. intros; destruct (eqA_dec a a0) as [H2|H2]; simpl; auto. rewrite multiplicity_InA_O; auto. - swap H0. + contradict H0. apply InA_eqA with a0; auto. intros; constructor. rewrite multiplicity_InA. @@ -185,9 +180,9 @@ Proof. destruct H2; apply eqA_trans with a; auto. Qed. -Lemma NoDupA_eqlistA_permut : +Lemma NoDupA_equivlistA_permut : forall l l', NoDupA eqA l -> NoDupA eqA l' -> - eqlistA eqA l l' -> permutation l l'. + equivlistA eqA l l' -> permutation l l'. Proof. intros. red; unfold meq; intros. @@ -198,7 +193,7 @@ Proof. Qed. -Variable B : Set. +Variable B : Type. Variable eqB : B->B->Prop. Variable eqB_dec : forall x y:B, { eqB x y }+{ ~eqB x y }. Variable eqB_trans : forall x y z, eqB x y -> eqB y z -> eqB x z. diff --git a/theories/Sorting/Permutation.v b/theories/Sorting/Permutation.v index 3ff026c2..82294b70 100644 --- a/theories/Sorting/Permutation.v +++ b/theories/Sorting/Permutation.v @@ -6,12 +6,9 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Permutation.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Permutation.v 10698 2008-03-19 18:46:59Z letouzey $ i*) -Require Import Relations. -Require Import List. -Require Import Multiset. -Require Import Arith. +Require Import Relations List Multiset Arith. (** This file define a notion of permutation for lists, based on multisets: there exists a permutation between two lists iff every elements have @@ -38,7 +35,7 @@ Section defs. (** * From lists to multisets *) - Variable A : Set. + Variable A : Type. Variable eqA : relation A. Hypothesis eqA_dec : forall x y:A, {eqA x y} + {~ eqA x y}. diff --git a/theories/Sorting/Sorting.v b/theories/Sorting/Sorting.v index f895d79e..aed8cd15 100644 --- a/theories/Sorting/Sorting.v +++ b/theories/Sorting/Sorting.v @@ -6,18 +6,15 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Sorting.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Sorting.v 10698 2008-03-19 18:46:59Z letouzey $ i*) -Require Import List. -Require Import Multiset. -Require Import Permutation. -Require Import Relations. +Require Import List Multiset Permutation Relations. Set Implicit Arguments. Section defs. - Variable A : Set. + Variable A : Type. Variable leA : relation A. Variable eqA : relation A. @@ -59,6 +56,16 @@ Section defs. intros; inversion H; auto with datatypes. Qed. + Lemma sort_rect : + forall P:list A -> Type, + P nil -> + (forall (a:A) (l:list A), sort l -> P l -> lelistA a l -> P (a :: l)) -> + forall y:list A, sort y -> P y. + Proof. + simple induction y; auto with datatypes. + intros; elim (sort_inv (a:=a) (l:=l)); auto with datatypes. + Qed. + Lemma sort_rec : forall P:list A -> Set, P nil -> @@ -71,7 +78,7 @@ Section defs. (** * Merging two sorted lists *) - Inductive merge_lem (l1 l2:list A) : Set := + Inductive merge_lem (l1 l2:list A) : Type := merge_exist : forall l:list A, sort l -> @@ -85,7 +92,7 @@ Section defs. Proof. simple induction 1; intros. apply merge_exist with l2; auto with datatypes. - elim H3; intros. + elim H2; intros. apply merge_exist with (a :: l); simpl in |- *; auto using cons_sort with datatypes. elim (leA_dec a a0); intros. @@ -104,7 +111,7 @@ Section defs. apply lelistA_inv with l; trivial with datatypes. (* 2 (leA a0 a) *) - elim H5; simpl in |- *; intros. + elim X0; simpl in |- *; intros. apply merge_exist with (a0 :: l3); simpl in |- *; auto using cons_sort, cons_leA with datatypes. apply meq_trans with diff --git a/theories/Strings/String.v b/theories/Strings/String.v index f2c58364..53260480 100644 --- a/theories/Strings/String.v +++ b/theories/Strings/String.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: String.v 8026 2006-02-11 19:40:49Z herbelin $ *) +(* $Id: String.v 10855 2008-04-27 11:16:15Z msozeau $ *) (** Contributed by Laurent Théry (INRIA); Adapted to Coq V8 by the Coq Development Team *) @@ -110,8 +110,8 @@ Proof. intros s1; elim s1; simpl in |- *; auto. intros s2 n; rewrite plus_comm; simpl in |- *; auto. intros a s1' Rec s2 n; case n; simpl in |- *; auto. -generalize (Rec s2 0); simpl in |- *; auto. -intros n0; rewrite <- Plus.plus_Snm_nSm; auto. +generalize (Rec s2 0); simpl in |- *; auto. intros. +rewrite <- Plus.plus_Snm_nSm; auto. Qed. (** *** Substrings *) diff --git a/theories/Unicode/Utf8.v b/theories/Unicode/Utf8.v new file mode 100644 index 00000000..32b892b6 --- /dev/null +++ b/theories/Unicode/Utf8.v @@ -0,0 +1,60 @@ +(* -*- coding:utf-8 -* *) +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* y) (at level 90, right associativity): type_scope. +Notation "x ↔ y" := (x <-> y) (at level 95, no associativity): type_scope. +Notation "⌉ x" := (~x) (at level 75, right associativity) : type_scope. +Notation "x ≠ y" := (x <> y) (at level 70) : type_scope. + +(* Abstraction *) +(* Not nice +Notation "'λ' x : T , y" := ([x:T] y) (at level 1, x,T,y at level 10). +Notation "'λ' x := T , y" := ([x:=T] y) (at level 1, x,T,y at level 10). +*) + +(* Arithmetic *) +Notation "x ≤ y" := (le x y) (at level 70, no associativity). +Notation "x ≥ y" := (ge x y) (at level 70, no associativity). + +(* test *) +(* +Goal ∀ x, True -> (∃ y , x ≥ y + 1) ∨ x ≤ 0. +*) + +(* Integer Arithmetic *) +(* TODO: this should come after ZArith +Notation "x ≤ y" := (Zle x y) (at level 1, y at level 10). +*) diff --git a/theories/Wellfounded/Disjoint_Union.v b/theories/Wellfounded/Disjoint_Union.v index 1e22730b..6adf629d 100644 --- a/theories/Wellfounded/Disjoint_Union.v +++ b/theories/Wellfounded/Disjoint_Union.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Disjoint_Union.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Disjoint_Union.v 10681 2008-03-16 13:40:45Z msozeau $ i*) (** Author: Cristina Cornes From : Constructing Recursion Operators in Type Theory @@ -15,7 +15,7 @@ Require Import Relation_Operators. Section Wf_Disjoint_Union. - Variables A B : Set. + Variables A B : Type. Variable leA : A -> A -> Prop. Variable leB : B -> B -> Prop. @@ -52,4 +52,4 @@ Section Wf_Disjoint_Union. apply (H0 b). Qed. -End Wf_Disjoint_Union. \ No newline at end of file +End Wf_Disjoint_Union. diff --git a/theories/Wellfounded/Inclusion.v b/theories/Wellfounded/Inclusion.v index 44e07d0b..e5ef4a70 100644 --- a/theories/Wellfounded/Inclusion.v +++ b/theories/Wellfounded/Inclusion.v @@ -6,14 +6,14 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Inclusion.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Inclusion.v 9642 2007-02-12 10:31:53Z herbelin $ i*) (** Author: Bruno Barras *) Require Import Relation_Definitions. Section WfInclusion. - Variable A : Set. + Variable A : Type. Variables R1 R2 : A -> A -> Prop. Lemma Acc_incl : inclusion A R1 R2 -> forall z:A, Acc R2 z -> Acc R1 z. @@ -29,4 +29,4 @@ Section WfInclusion. unfold well_founded in |- *; auto with sets. Qed. -End WfInclusion. \ No newline at end of file +End WfInclusion. diff --git a/theories/Wellfounded/Inverse_Image.v b/theories/Wellfounded/Inverse_Image.v index 210cc757..29fe7bb2 100644 --- a/theories/Wellfounded/Inverse_Image.v +++ b/theories/Wellfounded/Inverse_Image.v @@ -6,13 +6,13 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Inverse_Image.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Inverse_Image.v 9642 2007-02-12 10:31:53Z herbelin $ i*) (** Author: Bruno Barras *) Section Inverse_Image. - Variables A B : Set. + Variables A B : Type. Variable R : B -> B -> Prop. Variable f : A -> B. diff --git a/theories/Wellfounded/Lexicographic_Exponentiation.v b/theories/Wellfounded/Lexicographic_Exponentiation.v index efdf0495..4dfcb24b 100644 --- a/theories/Wellfounded/Lexicographic_Exponentiation.v +++ b/theories/Wellfounded/Lexicographic_Exponentiation.v @@ -6,14 +6,13 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Lexicographic_Exponentiation.v 9610 2007-02-07 14:45:18Z herbelin $ i*) +(*i $Id: Lexicographic_Exponentiation.v 9609 2007-02-07 14:42:26Z herbelin $ i*) (** Author: Cristina Cornes From : Constructing Recursion Operators in Type Theory L. Paulson JSC (1986) 2, 325-355 *) -Require Import Eqdep. Require Import List. Require Import Relation_Operators. Require Import Transitive_Closure. diff --git a/theories/Wellfounded/Lexicographic_Product.v b/theories/Wellfounded/Lexicographic_Product.v index 051c8127..818084b2 100644 --- a/theories/Wellfounded/Lexicographic_Product.v +++ b/theories/Wellfounded/Lexicographic_Product.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Lexicographic_Product.v 9597 2007-02-06 19:44:05Z herbelin $ i*) +(*i $Id: Lexicographic_Product.v 9598 2007-02-06 19:45:52Z herbelin $ i*) (** Authors: Bruno Barras, Cristina Cornes *) diff --git a/theories/Wellfounded/Transitive_Closure.v b/theories/Wellfounded/Transitive_Closure.v index bd4e4fec..e552598c 100644 --- a/theories/Wellfounded/Transitive_Closure.v +++ b/theories/Wellfounded/Transitive_Closure.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Transitive_Closure.v 9597 2007-02-06 19:44:05Z herbelin $ i*) +(*i $Id: Transitive_Closure.v 9598 2007-02-06 19:45:52Z herbelin $ i*) (** Author: Bruno Barras *) diff --git a/theories/Wellfounded/Union.v b/theories/Wellfounded/Union.v index 634576ad..8589c18f 100644 --- a/theories/Wellfounded/Union.v +++ b/theories/Wellfounded/Union.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Union.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Union.v 9642 2007-02-12 10:31:53Z herbelin $ i*) (** Author: Bruno Barras *) @@ -15,7 +15,7 @@ Require Import Relation_Definitions. Require Import Transitive_Closure. Section WfUnion. - Variable A : Set. + Variable A : Type. Variables R1 R2 : relation A. Notation Union := (union A R1 R2). @@ -72,4 +72,4 @@ Section WfUnion. apply Acc_union; auto with sets. Qed. -End WfUnion. \ No newline at end of file +End WfUnion. diff --git a/theories/Wellfounded/Well_Ordering.v b/theories/Wellfounded/Well_Ordering.v index f691f2b7..af8832ec 100644 --- a/theories/Wellfounded/Well_Ordering.v +++ b/theories/Wellfounded/Well_Ordering.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Well_Ordering.v 9597 2007-02-06 19:44:05Z herbelin $ i*) +(*i $Id: Well_Ordering.v 9598 2007-02-06 19:45:52Z herbelin $ i*) (** Author: Cristina Cornes. From: Constructing Recursion Operators in Type Theory diff --git a/theories/ZArith/BinInt.v b/theories/ZArith/BinInt.v index 71e48360..1ff88604 100644 --- a/theories/ZArith/BinInt.v +++ b/theories/ZArith/BinInt.v @@ -6,10 +6,10 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: BinInt.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: BinInt.v 11015 2008-05-28 20:06:42Z herbelin $ i*) (***********************************************************) -(** Binary Integers (Pierre Crégut, CNET, Lannion, France) *) +(** Binary Integers (Pierre Crégut, CNET, Lannion, France) *) (***********************************************************) Require Export BinPos. @@ -40,43 +40,48 @@ Arguments Scope Zneg [positive_scope]. Definition Zdouble_plus_one (x:Z) := match x with | Z0 => Zpos 1 - | Zpos p => Zpos (xI p) + | Zpos p => Zpos p~1 | Zneg p => Zneg (Pdouble_minus_one p) end. Definition Zdouble_minus_one (x:Z) := match x with | Z0 => Zneg 1 - | Zneg p => Zneg (xI p) + | Zneg p => Zneg p~1 | Zpos p => Zpos (Pdouble_minus_one p) end. Definition Zdouble (x:Z) := match x with | Z0 => Z0 - | Zpos p => Zpos (xO p) - | Zneg p => Zneg (xO p) + | Zpos p => Zpos p~0 + | Zneg p => Zneg p~0 end. +Open Local Scope positive_scope. + Fixpoint ZPminus (x y:positive) {struct y} : Z := match x, y with - | xI x', xI y' => Zdouble (ZPminus x' y') - | xI x', xO y' => Zdouble_plus_one (ZPminus x' y') - | xI x', xH => Zpos (xO x') - | xO x', xI y' => Zdouble_minus_one (ZPminus x' y') - | xO x', xO y' => Zdouble (ZPminus x' y') - | xO x', xH => Zpos (Pdouble_minus_one x') - | xH, xI y' => Zneg (xO y') - | xH, xO y' => Zneg (Pdouble_minus_one y') - | xH, xH => Z0 + | p~1, q~1 => Zdouble (ZPminus p q) + | p~1, q~0 => Zdouble_plus_one (ZPminus p q) + | p~1, 1 => Zpos p~0 + | p~0, q~1 => Zdouble_minus_one (ZPminus p q) + | p~0, q~0 => Zdouble (ZPminus p q) + | p~0, 1 => Zpos (Pdouble_minus_one p) + | 1, q~1 => Zneg q~0 + | 1, q~0 => Zneg (Pdouble_minus_one q) + | 1, 1 => Z0 end. +Close Local Scope positive_scope. + (** ** Addition on integers *) Definition Zplus (x y:Z) := match x, y with | Z0, y => y - | x, Z0 => x + | Zpos x', Z0 => Zpos x' + | Zneg x', Z0 => Zneg x' | Zpos x', Zpos y' => Zpos (x' + y') | Zpos x', Zneg y' => match (x' ?= y')%positive Eq with @@ -217,6 +222,7 @@ Qed. (**********************************************************************) + (** ** Properties of opposite on binary integer numbers *) Theorem Zopp_neg : forall p:positive, - Zneg p = Zpos p. @@ -247,30 +253,6 @@ Proof. | simplify_eq H; intro E; rewrite E; trivial ]. Qed. -(*************************************************************************) -(** ** Properties of the direct definition of successor and predecessor *) - -Lemma Zpred'_succ' : forall n:Z, Zpred' (Zsucc' n) = n. -Proof. - intro x; destruct x; simpl in |- *. - reflexivity. - destruct p; simpl in |- *; try rewrite Pdouble_minus_one_o_succ_eq_xI; - reflexivity. - destruct p; simpl in |- *; try rewrite Psucc_o_double_minus_one_eq_xO; - reflexivity. -Qed. - -Lemma Zsucc'_discr : forall n:Z, n <> Zsucc' n. -Proof. - intro x; destruct x; simpl in |- *. - discriminate. - injection; apply Psucc_discr. - destruct p; simpl in |- *. - discriminate. - intro H; symmetry in H; injection H; apply double_moins_un_xO_discr. - discriminate. -Qed. - (**********************************************************************) (** ** Other properties of binary integer numbers *) @@ -313,10 +295,15 @@ Qed. Theorem Zopp_plus_distr : forall n m:Z, - (n + m) = - n + - m. Proof. intro x; destruct x as [| p| p]; intro y; destruct y as [| q| q]; - simpl in |- *; reflexivity || destruct ((p ?= q)%positive Eq); + simpl in |- *; reflexivity || destruct ((p ?= q)%positive Eq); reflexivity. Qed. +Theorem Zopp_succ : forall n:Z, Zopp (Zsucc n) = Zpred (Zopp n). +Proof. +intro; unfold Zsucc; now rewrite Zopp_plus_distr. +Qed. + (** ** opposite is inverse for addition *) Theorem Zplus_opp_r : forall n:Z, n + - n = Z0. @@ -520,11 +507,13 @@ Proof. trivial with arith. Qed. -Lemma Zplus_succ_r : forall n m:Z, Zsucc (n + m) = n + Zsucc m. +Lemma Zplus_succ_r_reverse : forall n m:Z, Zsucc (n + m) = n + Zsucc m. Proof. intros n m; unfold Zsucc in |- *; rewrite Zplus_assoc; trivial with arith. Qed. +Notation Zplus_succ_r := Zplus_succ_r_reverse (only parsing). + Lemma Zplus_succ_comm : forall n m:Z, Zsucc n + m = n + Zsucc m. Proof. unfold Zsucc in |- *; intros n m; rewrite <- Zplus_assoc; @@ -586,10 +575,10 @@ Theorem Zsucc_pred : forall n:Z, n = Zsucc (Zpred n). Proof. intros n; unfold Zsucc, Zpred in |- *; rewrite <- Zplus_assoc; simpl in |- *; rewrite Zplus_0_r; trivial with arith. -Qed. +Qed. Hint Immediate Zsucc_pred: zarith. - + Theorem Zpred_succ : forall n:Z, n = Zpred (Zsucc n). Proof. intros m; unfold Zpred, Zsucc in |- *; rewrite <- Zplus_assoc; simpl in |- *; @@ -603,7 +592,59 @@ Proof. do 2 rewrite <- Zplus_assoc; do 2 rewrite (Zplus_comm (Zpos 1)); unfold Zsucc in H; rewrite H; trivial with arith. Qed. - + +(*************************************************************************) +(** ** Properties of the direct definition of successor and predecessor *) + +Theorem Zsucc_succ' : forall n:Z, Zsucc n = Zsucc' n. +Proof. +destruct n as [| p | p]; simpl. +reflexivity. +now rewrite Pplus_one_succ_r. +now destruct p as [q | q |]. +Qed. + +Theorem Zpred_pred' : forall n:Z, Zpred n = Zpred' n. +Proof. +destruct n as [| p | p]; simpl. +reflexivity. +now destruct p as [q | q |]. +now rewrite Pplus_one_succ_r. +Qed. + +Theorem Zsucc'_inj : forall n m:Z, Zsucc' n = Zsucc' m -> n = m. +Proof. +intros n m; do 2 rewrite <- Zsucc_succ'; now apply Zsucc_inj. +Qed. + +Theorem Zsucc'_pred' : forall n:Z, Zsucc' (Zpred' n) = n. +Proof. +intro; rewrite <- Zsucc_succ'; rewrite <- Zpred_pred'; +symmetry; apply Zsucc_pred. +Qed. + +Theorem Zpred'_succ' : forall n:Z, Zpred' (Zsucc' n) = n. +Proof. +intro; apply Zsucc'_inj; now rewrite Zsucc'_pred'. +Qed. + +Theorem Zpred'_inj : forall n m:Z, Zpred' n = Zpred' m -> n = m. +Proof. +intros n m H. +rewrite <- (Zsucc'_pred' n); rewrite <- (Zsucc'_pred' m); now rewrite H. +Qed. + +Theorem Zsucc'_discr : forall n:Z, n <> Zsucc' n. +Proof. + intro x; destruct x; simpl in |- *. + discriminate. + injection; apply Psucc_discr. + destruct p; simpl in |- *. + discriminate. + intro H; symmetry in H; injection H; apply double_moins_un_xO_discr. + discriminate. +Qed. + (** Misc properties, usually redundant or non natural *) Lemma Zsucc_eq_compat : forall n m:Z, n = m -> Zsucc n = Zsucc m. @@ -645,6 +686,22 @@ Qed. (** ** Relating [minus] with [plus] and [Zsucc] *) +Lemma Zminus_plus_distr : forall n m p:Z, n - (m + p) = n - m - p. +Proof. +intros; unfold Zminus; rewrite Zopp_plus_distr; apply Zplus_assoc. +Qed. + +Lemma Zminus_succ_l : forall n m:Z, Zsucc (n - m) = Zsucc n - m. +Proof. + intros n m; unfold Zminus, Zsucc in |- *; rewrite (Zplus_comm n (- m)); + rewrite <- Zplus_assoc; apply Zplus_comm. +Qed. + +Lemma Zminus_succ_r : forall n m:Z, n - (Zsucc m) = Zpred (n - m). +Proof. +intros; unfold Zsucc; now rewrite Zminus_plus_distr. +Qed. + Lemma Zplus_minus_eq : forall n m p:Z, n = m + p -> p = n - m. Proof. intros n m p H; unfold Zminus in |- *; apply (Zplus_reg_l m); @@ -665,12 +722,6 @@ Proof. apply Zplus_0_r. Qed. -Lemma Zminus_succ_l : forall n m:Z, Zsucc (n - m) = Zsucc n - m. -Proof. - intros n m; unfold Zminus, Zsucc in |- *; rewrite (Zplus_comm n (- m)); - rewrite <- Zplus_assoc; apply Zplus_comm. -Qed. - Lemma Zminus_plus_simpl_l : forall n m p:Z, p + n - (p + m) = n - m. Proof. intros n m p; unfold Zminus in |- *; rewrite Zopp_plus_distr; @@ -696,6 +747,16 @@ Proof. reflexivity. Qed. +Lemma Zpos_minus_morphism : forall a b:positive, Pcompare a b Eq = Lt -> + Zpos (b-a) = Zpos b - Zpos a. +Proof. + intros. + simpl. + change Eq with (CompOpp Eq). + rewrite <- Pcompare_antisym. + rewrite H; simpl; auto. +Qed. + (** ** Misc redundant properties *) Lemma Zeq_minus : forall n m:Z, n = m -> n - m = Z0. @@ -805,6 +866,19 @@ Proof. reflexivity). Qed. +(** ** Multiplication and Doubling *) + +Lemma Zdouble_mult : forall z, Zdouble z = (Zpos 2) * z. +Proof. + reflexivity. +Qed. + +Lemma Zdouble_plus_one_mult : forall z, + Zdouble_plus_one z = (Zpos 2) * z + (Zpos 1). +Proof. + destruct z; simpl; auto with zarith. +Qed. + (** ** Multiplication and Opposite *) Theorem Zopp_mult_distr_l : forall n m:Z, - (n * m) = - n * m. @@ -967,22 +1041,37 @@ Qed. (**********************************************************************) (** * Relating binary positive numbers and binary integers *) -Lemma Zpos_xI : forall p:positive, Zpos (xI p) = Zpos 2 * Zpos p + Zpos 1. +Lemma Zpos_eq : forall p q:positive, p = q -> Zpos p = Zpos q. +Proof. + intros; f_equal; auto. +Qed. + +Lemma Zpos_eq_rev : forall p q:positive, Zpos p = Zpos q -> p = q. +Proof. + inversion 1; auto. +Qed. + +Lemma Zpos_eq_iff : forall p q:positive, p = q <-> Zpos p = Zpos q. +Proof. + split; [apply Zpos_eq|apply Zpos_eq_rev]. +Qed. + +Lemma Zpos_xI : forall p:positive, Zpos p~1 = Zpos 2 * Zpos p + Zpos 1. Proof. intro; apply refl_equal. Qed. -Lemma Zpos_xO : forall p:positive, Zpos (xO p) = Zpos 2 * Zpos p. +Lemma Zpos_xO : forall p:positive, Zpos p~0 = Zpos 2 * Zpos p. Proof. intro; apply refl_equal. Qed. -Lemma Zneg_xI : forall p:positive, Zneg (xI p) = Zpos 2 * Zneg p - Zpos 1. +Lemma Zneg_xI : forall p:positive, Zneg p~1 = Zpos 2 * Zneg p - Zpos 1. Proof. intro; apply refl_equal. Qed. -Lemma Zneg_xO : forall p:positive, Zneg (xO p) = Zpos 2 * Zneg p. +Lemma Zneg_xO : forall p:positive, Zneg p~0 = Zpos 2 * Zneg p. Proof. reflexivity. Qed. @@ -1057,7 +1146,8 @@ Definition Zabs_N (z:Z) := | Zneg p => Npos p end. -Definition Z_of_N (x:N) := match x with - | N0 => Z0 - | Npos p => Zpos p - end. +Definition Z_of_N (x:N) := + match x with + | N0 => Z0 + | Npos p => Zpos p + end. diff --git a/theories/ZArith/Int.v b/theories/ZArith/Int.v index 3cee9190..fcb44d6f 100644 --- a/theories/ZArith/Int.v +++ b/theories/ZArith/Int.v @@ -7,11 +7,11 @@ (***********************************************************************) (* Finite sets library. - * Authors: Pierre Letouzey and Jean-Christophe Filliâtre - * Institution: LRI, CNRS UMR 8623 - Université Paris Sud + * Authors: Pierre Letouzey and Jean-Christophe Filliâtre + * Institution: LRI, CNRS UMR 8623 - Université Paris Sud * 91405 Orsay, France *) -(* $Id: Int.v 9319 2006-10-30 12:41:21Z barras $ *) +(* $Id: Int.v 10739 2008-04-01 14:45:20Z herbelin $ *) (** An axiomatization of integers. *) @@ -352,46 +352,15 @@ Module MoreInt (I:Int). Ltac i2z_refl := i2z_gen; match goal with |- ?t => - let e := p2ep t - in - (change (ep2p e); - apply norm_ep_correct2; - simpl) + let e := p2ep t in + change (ep2p e); apply norm_ep_correct2; simpl end. - Ltac iauto := i2z_refl; auto. - Ltac iomega := i2z_refl; intros; romega. - - Open Scope Z_scope. - - Lemma max_spec : forall (x y:Z), - x >= y /\ Zmax x y = x \/ - x < y /\ Zmax x y = y. - Proof. - intros; unfold Zmax, Zlt, Zge. - destruct (Zcompare x y); [ left | right | left ]; split; auto; discriminate. - Qed. - - Ltac omega_max_genspec x y := - generalize (max_spec x y); - (let z := fresh "z" in let Hz := fresh "Hz" in - set (z:=Zmax x y); clearbody z). - - Ltac omega_max_loop := - match goal with - (* hack: we don't want [i2z (height ...)] to be reduced by romega later... *) - | |- context [ i2z (?f ?x) ] => - let i := fresh "i2z" in (set (i:=i2z (f x)); clearbody i); omega_max_loop - | |- context [ Zmax ?x ?y ] => omega_max_genspec x y; omega_max_loop - | _ => intros - end. - - Ltac omega_max := i2z_refl; omega_max_loop; try romega. + (* i2z_refl can be replaced below by (simpl in *; i2z). + The reflexive version improves compilation of AVL files by about 15% *) - Ltac false_omega := i2z_refl; intros; romega. - Ltac false_omega_max := elimtype False; omega_max. + Ltac omega_max := i2z_refl; romega with Z. - Open Scope Int_scope. End MoreInt. diff --git a/theories/ZArith/ZArith_dec.v b/theories/ZArith/ZArith_dec.v index 7febbf6a..b831afee 100644 --- a/theories/ZArith/ZArith_dec.v +++ b/theories/ZArith/ZArith_dec.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: ZArith_dec.v 9958 2007-07-06 22:47:40Z letouzey $ i*) +(*i $Id: ZArith_dec.v 9759 2007-04-12 17:46:54Z notin $ i*) Require Import Sumbool. diff --git a/theories/ZArith/ZOdiv.v b/theories/ZArith/ZOdiv.v new file mode 100644 index 00000000..03e061f2 --- /dev/null +++ b/theories/ZArith/ZOdiv.v @@ -0,0 +1,953 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Z_of_N n >= Zpos p. +Proof. + destruct n as [|n]; simpl; intros. + discriminate. + red; simpl; destruct Pcompare; now auto. +Qed. + +Lemma NPgeb_Zlt : forall (n:N)(p:positive), + NPgeb n p = false -> Z_of_N n < Zpos p. +Proof. + destruct n as [|n]; simpl; intros. + red; auto. + red; simpl; destruct Pcompare; now auto. +Qed. + +(** * Relation between division on N and on Z. *) + +Lemma Ndiv_Z0div : forall a b:N, + Z_of_N (a/b) = (Z_of_N a / Z_of_N b). +Proof. + intros. + destruct a; destruct b; simpl; auto. + unfold Ndiv, ZOdiv; simpl; destruct Pdiv_eucl; auto. +Qed. + +Lemma Nmod_Z0mod : forall a b:N, + Z_of_N (a mod b) = (Z_of_N a) mod (Z_of_N b). +Proof. + intros. + destruct a; destruct b; simpl; auto. + unfold Nmod, ZOmod; simpl; destruct Pdiv_eucl; auto. +Qed. + +(** * Characterization of this euclidean division. *) + +(** First, the usual equation [a=q*b+r]. Notice that [a mod 0] + has been chosen to be [a], so this equation holds even for [b=0]. +*) + +Theorem N_div_mod_eq : forall a b, + a = (b * (Ndiv a b) + (Nmod a b))%N. +Proof. + intros; generalize (Ndiv_eucl_correct a b). + unfold Ndiv, Nmod; destruct Ndiv_eucl; simpl. + intro H; rewrite H; rewrite Nmult_comm; auto. +Qed. + +Theorem ZO_div_mod_eq : forall a b, + a = b * (ZOdiv a b) + (ZOmod a b). +Proof. + intros; generalize (ZOdiv_eucl_correct a b). + unfold ZOdiv, ZOmod; destruct ZOdiv_eucl; simpl. + intro H; rewrite H; rewrite Zmult_comm; auto. +Qed. + +(** Then, the inequalities constraining the remainder. *) + +Theorem Pdiv_eucl_remainder : forall a b:positive, + Z_of_N (snd (Pdiv_eucl a b)) < Zpos b. +Proof. + induction a; cbv beta iota delta [Pdiv_eucl]; fold Pdiv_eucl; cbv zeta. + intros b; generalize (IHa b); case Pdiv_eucl. + intros q1 r1 Hr1; simpl in Hr1. + case_eq (NPgeb (2*r1+1) b); intros; unfold snd. + romega with *. + apply NPgeb_Zlt; auto. + intros b; generalize (IHa b); case Pdiv_eucl. + intros q1 r1 Hr1; simpl in Hr1. + case_eq (NPgeb (2*r1) b); intros; unfold snd. + romega with *. + apply NPgeb_Zlt; auto. + destruct b; simpl; romega with *. +Qed. + +Theorem Nmod_lt : forall (a b:N), b<>0%N -> + (a mod b < b)%N. +Proof. + destruct b as [ |b]; intro H; try solve [elim H;auto]. + destruct a as [ |a]; try solve [compute;auto]; unfold Nmod, Ndiv_eucl. + generalize (Pdiv_eucl_remainder a b); destruct Pdiv_eucl; simpl. + romega with *. +Qed. + +(** The remainder is bounded by the divisor, in term of absolute values *) + +Theorem ZOmod_lt : forall a b:Z, b<>0 -> + Zabs (a mod b) < Zabs b. +Proof. + destruct b as [ |b|b]; intro H; try solve [elim H;auto]; + destruct a as [ |a|a]; try solve [compute;auto]; unfold ZOmod, ZOdiv_eucl; + generalize (Pdiv_eucl_remainder a b); destruct Pdiv_eucl; simpl; + try rewrite Zabs_Zopp; rewrite Zabs_eq; auto; apply Z_of_N_le_0. +Qed. + +(** The sign of the remainder is the one of [a]. Due to the possible + nullity of [a], a general result is to be stated in the following form: +*) + +Theorem ZOmod_sgn : forall a b:Z, + 0 <= Zsgn (a mod b) * Zsgn a. +Proof. + destruct b as [ |b|b]; destruct a as [ |a|a]; simpl; auto with zarith; + unfold ZOmod, ZOdiv_eucl; destruct Pdiv_eucl; + simpl; destruct n0; simpl; auto with zarith. +Qed. + +(** This can also be said in a simplier way: *) + +Theorem Zsgn_pos_iff : forall z, 0 <= Zsgn z <-> 0 <= z. +Proof. + destruct z; simpl; intuition auto with zarith. +Qed. + +Theorem ZOmod_sgn2 : forall a b:Z, + 0 <= (a mod b) * a. +Proof. + intros; rewrite <-Zsgn_pos_iff, Zsgn_Zmult; apply ZOmod_sgn. +Qed. + +(** Reformulation of [ZOdiv_lt] and [ZOmod_sgn] in 2 + then 4 particular cases. *) + +Theorem ZOmod_lt_pos : forall a b:Z, 0<=a -> b<>0 -> + 0 <= a mod b < Zabs b. +Proof. + intros. + assert (0 <= a mod b). + generalize (ZOmod_sgn a b). + destruct (Zle_lt_or_eq 0 a H). + rewrite <- Zsgn_pos in H1; rewrite H1; romega with *. + subst a; simpl; auto. + generalize (ZOmod_lt a b H0); romega with *. +Qed. + +Theorem ZOmod_lt_neg : forall a b:Z, a<=0 -> b<>0 -> + -Zabs b < a mod b <= 0. +Proof. + intros. + assert (a mod b <= 0). + generalize (ZOmod_sgn a b). + destruct (Zle_lt_or_eq a 0 H). + rewrite <- Zsgn_neg in H1; rewrite H1; romega with *. + subst a; simpl; auto. + generalize (ZOmod_lt a b H0); romega with *. +Qed. + +Theorem ZOmod_lt_pos_pos : forall a b:Z, 0<=a -> 0 0 <= a mod b < b. +Proof. + intros; generalize (ZOmod_lt_pos a b); romega with *. +Qed. + +Theorem ZOmod_lt_pos_neg : forall a b:Z, 0<=a -> b<0 -> 0 <= a mod b < -b. +Proof. + intros; generalize (ZOmod_lt_pos a b); romega with *. +Qed. + +Theorem ZOmod_lt_neg_pos : forall a b:Z, a<=0 -> 0 -b < a mod b <= 0. +Proof. + intros; generalize (ZOmod_lt_neg a b); romega with *. +Qed. + +Theorem ZOmod_lt_neg_neg : forall a b:Z, a<=0 -> b<0 -> b < a mod b <= 0. +Proof. + intros; generalize (ZOmod_lt_neg a b); romega with *. +Qed. + +(** * Division and Opposite *) + +(* The precise equalities that are invalid with "historic" Zdiv. *) + +Theorem ZOdiv_opp_l : forall a b:Z, (-a)/b = -(a/b). +Proof. + destruct a; destruct b; simpl; auto; + unfold ZOdiv, ZOdiv_eucl; destruct Pdiv_eucl; simpl; auto with zarith. +Qed. + +Theorem ZOdiv_opp_r : forall a b:Z, a/(-b) = -(a/b). +Proof. + destruct a; destruct b; simpl; auto; + unfold ZOdiv, ZOdiv_eucl; destruct Pdiv_eucl; simpl; auto with zarith. +Qed. + +Theorem ZOmod_opp_l : forall a b:Z, (-a) mod b = -(a mod b). +Proof. + destruct a; destruct b; simpl; auto; + unfold ZOmod, ZOdiv_eucl; destruct Pdiv_eucl; simpl; auto with zarith. +Qed. + +Theorem ZOmod_opp_r : forall a b:Z, a mod (-b) = a mod b. +Proof. + destruct a; destruct b; simpl; auto; + unfold ZOmod, ZOdiv_eucl; destruct Pdiv_eucl; simpl; auto with zarith. +Qed. + +Theorem ZOdiv_opp_opp : forall a b:Z, (-a)/(-b) = a/b. +Proof. + destruct a; destruct b; simpl; auto; + unfold ZOdiv, ZOdiv_eucl; destruct Pdiv_eucl; simpl; auto with zarith. +Qed. + +Theorem ZOmod_opp_opp : forall a b:Z, (-a) mod (-b) = -(a mod b). +Proof. + destruct a; destruct b; simpl; auto; + unfold ZOmod, ZOdiv_eucl; destruct Pdiv_eucl; simpl; auto with zarith. +Qed. + +(** * Unicity results *) + +Definition Remainder a b r := + (0 <= a /\ 0 <= r < Zabs b) \/ (a <= 0 /\ -Zabs b < r <= 0). + +Definition Remainder_alt a b r := + Zabs r < Zabs b /\ 0 <= r * a. + +Lemma Remainder_equiv : forall a b r, + Remainder a b r <-> Remainder_alt a b r. +Proof. + unfold Remainder, Remainder_alt; intuition. + romega with *. + romega with *. + rewrite <-(Zmult_opp_opp). + apply Zmult_le_0_compat; romega. + assert (0 <= Zsgn r * Zsgn a) by (rewrite <-Zsgn_Zmult, Zsgn_pos_iff; auto). + destruct r; simpl Zsgn in *; romega with *. +Qed. + +Theorem ZOdiv_mod_unique_full: + forall a b q r, Remainder a b r -> + a = b*q + r -> q = a/b /\ r = a mod b. +Proof. + destruct 1 as [(H,H0)|(H,H0)]; intros. + apply Zdiv.Zdiv_mod_unique with b; auto. + apply ZOmod_lt_pos; auto. + romega with *. + rewrite <- H1; apply ZO_div_mod_eq. + + rewrite <- (Zopp_involutive a). + rewrite ZOdiv_opp_l, ZOmod_opp_l. + generalize (Zdiv.Zdiv_mod_unique b (-q) (-a/b) (-r) (-a mod b)). + generalize (ZOmod_lt_pos (-a) b). + rewrite <-ZO_div_mod_eq, <-Zopp_mult_distr_r, <-Zopp_plus_distr, <-H1. + romega with *. +Qed. + +Theorem ZOdiv_unique_full: + forall a b q r, Remainder a b r -> + a = b*q + r -> q = a/b. +Proof. + intros; destruct (ZOdiv_mod_unique_full a b q r); auto. +Qed. + +Theorem ZOdiv_unique: + forall a b q r, 0 <= a -> 0 <= r < b -> + a = b*q + r -> q = a/b. +Proof. + intros; eapply ZOdiv_unique_full; eauto. + red; romega with *. +Qed. + +Theorem ZOmod_unique_full: + forall a b q r, Remainder a b r -> + a = b*q + r -> r = a mod b. +Proof. + intros; destruct (ZOdiv_mod_unique_full a b q r); auto. +Qed. + +Theorem ZOmod_unique: + forall a b q r, 0 <= a -> 0 <= r < b -> + a = b*q + r -> r = a mod b. +Proof. + intros; eapply ZOmod_unique_full; eauto. + red; romega with *. +Qed. + +(** * Basic values of divisions and modulo. *) + +Lemma ZOmod_0_l: forall a, 0 mod a = 0. +Proof. + destruct a; simpl; auto. +Qed. + +Lemma ZOmod_0_r: forall a, a mod 0 = a. +Proof. + destruct a; simpl; auto. +Qed. + +Lemma ZOdiv_0_l: forall a, 0/a = 0. +Proof. + destruct a; simpl; auto. +Qed. + +Lemma ZOdiv_0_r: forall a, a/0 = 0. +Proof. + destruct a; simpl; auto. +Qed. + +Lemma ZOmod_1_r: forall a, a mod 1 = 0. +Proof. + intros; symmetry; apply ZOmod_unique_full with a; auto with zarith. + rewrite Remainder_equiv; red; simpl; auto with zarith. +Qed. + +Lemma ZOdiv_1_r: forall a, a/1 = a. +Proof. + intros; symmetry; apply ZOdiv_unique_full with 0; auto with zarith. + rewrite Remainder_equiv; red; simpl; auto with zarith. +Qed. + +Hint Resolve ZOmod_0_l ZOmod_0_r ZOdiv_0_l ZOdiv_0_r ZOdiv_1_r ZOmod_1_r + : zarith. + +Lemma ZOdiv_1_l: forall a, 1 < a -> 1/a = 0. +Proof. + intros; symmetry; apply ZOdiv_unique with 1; auto with zarith. +Qed. + +Lemma ZOmod_1_l: forall a, 1 < a -> 1 mod a = 1. +Proof. + intros; symmetry; apply ZOmod_unique with 0; auto with zarith. +Qed. + +Lemma ZO_div_same : forall a:Z, a<>0 -> a/a = 1. +Proof. + intros; symmetry; apply ZOdiv_unique_full with 0; auto with *. + rewrite Remainder_equiv; red; simpl; romega with *. +Qed. + +Lemma ZO_mod_same : forall a, a mod a = 0. +Proof. + destruct a; intros; symmetry. + compute; auto. + apply ZOmod_unique with 1; auto with *; romega with *. + apply ZOmod_unique_full with 1; auto with *; red; romega with *. +Qed. + +Lemma ZO_mod_mult : forall a b, (a*b) mod b = 0. +Proof. + intros a b; destruct (Z_eq_dec b 0) as [Hb|Hb]. + subst; simpl; rewrite ZOmod_0_r; auto with zarith. + symmetry; apply ZOmod_unique_full with a; [ red; romega with * | ring ]. +Qed. + +Lemma ZO_div_mult : forall a b:Z, b <> 0 -> (a*b)/b = a. +Proof. + intros; symmetry; apply ZOdiv_unique_full with 0; auto with zarith; + [ red; romega with * | ring]. +Qed. + +(** * Order results about ZOmod and ZOdiv *) + +(* Division of positive numbers is positive. *) + +Lemma ZO_div_pos: forall a b, 0 <= a -> 0 <= b -> 0 <= a/b. +Proof. + intros. + destruct (Zle_lt_or_eq 0 b H0). + assert (H2:=ZOmod_lt_pos_pos a b H H1). + rewrite (ZO_div_mod_eq a b) in H. + destruct (Z_lt_le_dec (a/b) 0); auto. + assert (b*(a/b) <= -b). + replace (-b) with (b*-1); [ | ring]. + apply Zmult_le_compat_l; auto with zarith. + romega. + subst b; rewrite ZOdiv_0_r; auto. +Qed. + +(** As soon as the divisor is greater or equal than 2, + the division is strictly decreasing. *) + +Lemma ZO_div_lt : forall a b:Z, 0 < a -> 2 <= b -> a/b < a. +Proof. + intros. + assert (Hb : 0 < b) by romega. + assert (H1 : 0 <= a/b) by (apply ZO_div_pos; auto with zarith). + assert (H2 : 0 <= a mod b < b) by (apply ZOmod_lt_pos_pos; auto with zarith). + destruct (Zle_lt_or_eq 0 (a/b) H1) as [H3|H3]; [ | rewrite <- H3; auto]. + pattern a at 2; rewrite (ZO_div_mod_eq a b). + apply Zlt_le_trans with (2*(a/b)). + romega. + apply Zle_trans with (b*(a/b)). + apply Zmult_le_compat_r; auto. + romega. +Qed. + +(** A division of a small number by a bigger one yields zero. *) + +Theorem ZOdiv_small: forall a b, 0 <= a < b -> a/b = 0. +Proof. + intros a b H; apply sym_equal; apply ZOdiv_unique with a; auto with zarith. +Qed. + +(** Same situation, in term of modulo: *) + +Theorem ZOmod_small: forall a n, 0 <= a < n -> a mod n = a. +Proof. + intros a b H; apply sym_equal; apply ZOmod_unique with 0; auto with zarith. +Qed. + +(** [Zge] is compatible with a positive division. *) + +Lemma ZO_div_monotone_pos : forall a b c:Z, 0<=c -> 0<=a<=b -> a/c <= b/c. +Proof. + intros. + destruct H0. + destruct (Zle_lt_or_eq 0 c H); + [ clear H | subst c; do 2 rewrite ZOdiv_0_r; auto]. + generalize (ZO_div_mod_eq a c). + generalize (ZOmod_lt_pos_pos a c H0 H2). + generalize (ZO_div_mod_eq b c). + generalize (ZOmod_lt_pos_pos b c (Zle_trans _ _ _ H0 H1) H2). + intros. + elim (Z_le_gt_dec (a / c) (b / c)); auto with zarith. + intro. + absurd (a - b >= 1). + omega. + replace (a-b) with (c * (a/c-b/c) + a mod c - b mod c) by + (symmetry; pattern a at 1; rewrite H5; pattern b at 1; rewrite H3; ring). + assert (c * (a / c - b / c) >= c * 1). + apply Zmult_ge_compat_l. + omega. + omega. + assert (c * 1 = c). + ring. + omega. +Qed. + +Lemma ZO_div_monotone : forall a b c, 0<=c -> a<=b -> a/c <= b/c. +Proof. + intros. + destruct (Z_le_gt_dec 0 a). + apply ZO_div_monotone_pos; auto with zarith. + destruct (Z_le_gt_dec 0 b). + apply Zle_trans with 0. + apply Zle_left_rev. + simpl. + rewrite <- ZOdiv_opp_l. + apply ZO_div_pos; auto with zarith. + apply ZO_div_pos; auto with zarith. + rewrite <-(Zopp_involutive a), (ZOdiv_opp_l (-a)). + rewrite <-(Zopp_involutive b), (ZOdiv_opp_l (-b)). + generalize (ZO_div_monotone_pos (-b) (-a) c H). + romega. +Qed. + +(** With our choice of division, rounding of (a/b) is always done toward zero: *) + +Lemma ZO_mult_div_le : forall a b:Z, 0 <= a -> 0 <= b*(a/b) <= a. +Proof. + intros a b Ha. + destruct b as [ |b|b]. + simpl; auto with zarith. + split. + apply Zmult_le_0_compat; auto with zarith. + apply ZO_div_pos; auto with zarith. + generalize (ZO_div_mod_eq a (Zpos b)) (ZOmod_lt_pos_pos a (Zpos b) Ha); romega with *. + change (Zneg b) with (-Zpos b); rewrite ZOdiv_opp_r, Zmult_opp_opp. + split. + apply Zmult_le_0_compat; auto with zarith. + apply ZO_div_pos; auto with zarith. + generalize (ZO_div_mod_eq a (Zpos b)) (ZOmod_lt_pos_pos a (Zpos b) Ha); romega with *. +Qed. + +Lemma ZO_mult_div_ge : forall a b:Z, a <= 0 -> a <= b*(a/b) <= 0. +Proof. + intros a b Ha. + destruct b as [ |b|b]. + simpl; auto with zarith. + split. + generalize (ZO_div_mod_eq a (Zpos b)) (ZOmod_lt_neg_pos a (Zpos b) Ha); romega with *. + apply Zle_left_rev; unfold Zplus. + rewrite Zopp_mult_distr_r, <-ZOdiv_opp_l. + apply Zmult_le_0_compat; auto with zarith. + apply ZO_div_pos; auto with zarith. + change (Zneg b) with (-Zpos b); rewrite ZOdiv_opp_r, Zmult_opp_opp. + split. + generalize (ZO_div_mod_eq a (Zpos b)) (ZOmod_lt_neg_pos a (Zpos b) Ha); romega with *. + apply Zle_left_rev; unfold Zplus. + rewrite Zopp_mult_distr_r, <-ZOdiv_opp_l. + apply Zmult_le_0_compat; auto with zarith. + apply ZO_div_pos; auto with zarith. +Qed. + +(** The previous inequalities between [b*(a/b)] and [a] are exact + iff the modulo is zero. *) + +Lemma ZO_div_exact_full_1 : forall a b:Z, a = b*(a/b) -> a mod b = 0. +Proof. + intros; generalize (ZO_div_mod_eq a b); romega. +Qed. + +Lemma ZO_div_exact_full_2 : forall a b:Z, a mod b = 0 -> a = b*(a/b). +Proof. + intros; generalize (ZO_div_mod_eq a b); romega. +Qed. + +(** A modulo cannot grow beyond its starting point. *) + +Theorem ZOmod_le: forall a b, 0 <= a -> 0 <= b -> a mod b <= a. +Proof. + intros a b H1 H2. + destruct (Zle_lt_or_eq _ _ H2). + case (Zle_or_lt b a); intros H3. + case (ZOmod_lt_pos_pos a b); auto with zarith. + rewrite ZOmod_small; auto with zarith. + subst; rewrite ZOmod_0_r; auto with zarith. +Qed. + +(** Some additionnal inequalities about Zdiv. *) + +Theorem ZOdiv_le_upper_bound: + forall a b q, 0 <= a -> 0 < b -> a <= q*b -> a/b <= q. +Proof. + intros a b q H1 H2 H3. + apply Zmult_le_reg_r with b; auto with zarith. + apply Zle_trans with (2 := H3). + pattern a at 2; rewrite (ZO_div_mod_eq a b); auto with zarith. + rewrite (Zmult_comm b); case (ZOmod_lt_pos_pos a b); auto with zarith. +Qed. + +Theorem ZOdiv_lt_upper_bound: + forall a b q, 0 <= a -> 0 < b -> a < q*b -> a/b < q. +Proof. + intros a b q H1 H2 H3. + apply Zmult_lt_reg_r with b; auto with zarith. + apply Zle_lt_trans with (2 := H3). + pattern a at 2; rewrite (ZO_div_mod_eq a b); auto with zarith. + rewrite (Zmult_comm b); case (ZOmod_lt_pos_pos a b); auto with zarith. +Qed. + +Theorem ZOdiv_le_lower_bound: + forall a b q, 0 <= a -> 0 < b -> q*b <= a -> q <= a/b. +Proof. + intros a b q H1 H2 H3. + assert (q < a / b + 1); auto with zarith. + apply Zmult_lt_reg_r with b; auto with zarith. + apply Zle_lt_trans with (1 := H3). + pattern a at 1; rewrite (ZO_div_mod_eq a b); auto with zarith. + rewrite Zmult_plus_distr_l; rewrite (Zmult_comm b); case (ZOmod_lt_pos_pos a b); + auto with zarith. +Qed. + +Theorem ZOdiv_sgn: forall a b, + 0 <= Zsgn (a/b) * Zsgn a * Zsgn b. +Proof. + destruct a as [ |a|a]; destruct b as [ |b|b]; simpl; auto with zarith; + unfold ZOdiv; simpl; destruct Pdiv_eucl; simpl; destruct n; simpl; auto with zarith. +Qed. + +(** * Relations between usual operations and Zmod and Zdiv *) + +(** First, a result that used to be always valid with Zdiv, + but must be restricted here. + For instance, now (9+(-5)*2) mod 2 = -1 <> 1 = 9 mod 2 *) + +Lemma ZO_mod_plus : forall a b c:Z, + 0 <= (a+b*c) * a -> + (a + b * c) mod c = a mod c. +Proof. + intros; destruct (Z_eq_dec a 0) as [Ha|Ha]. + subst; simpl; rewrite ZOmod_0_l; apply ZO_mod_mult. + intros; destruct (Z_eq_dec c 0) as [Hc|Hc]. + subst; do 2 rewrite ZOmod_0_r; romega. + symmetry; apply ZOmod_unique_full with (a/c+b); auto with zarith. + rewrite Remainder_equiv; split. + apply ZOmod_lt; auto. + apply Zmult_le_0_reg_r with (a*a); eauto. + destruct a; simpl; auto with zarith. + replace ((a mod c)*(a+b*c)*(a*a)) with (((a mod c)*a)*((a+b*c)*a)) by ring. + apply Zmult_le_0_compat; auto. + apply ZOmod_sgn2. + rewrite Zmult_plus_distr_r, Zmult_comm. + generalize (ZO_div_mod_eq a c); romega. +Qed. + +Lemma ZO_div_plus : forall a b c:Z, + 0 <= (a+b*c) * a -> c<>0 -> + (a + b * c) / c = a / c + b. +Proof. + intros; destruct (Z_eq_dec a 0) as [Ha|Ha]. + subst; simpl; apply ZO_div_mult; auto. + symmetry. + apply ZOdiv_unique_full with (a mod c); auto with zarith. + rewrite Remainder_equiv; split. + apply ZOmod_lt; auto. + apply Zmult_le_0_reg_r with (a*a); eauto. + destruct a; simpl; auto with zarith. + replace ((a mod c)*(a+b*c)*(a*a)) with (((a mod c)*a)*((a+b*c)*a)) by ring. + apply Zmult_le_0_compat; auto. + apply ZOmod_sgn2. + rewrite Zmult_plus_distr_r, Zmult_comm. + generalize (ZO_div_mod_eq a c); romega. +Qed. + +Theorem ZO_div_plus_l: forall a b c : Z, + 0 <= (a*b+c)*c -> b<>0 -> + b<>0 -> (a * b + c) / b = a + c / b. +Proof. + intros a b c; rewrite Zplus_comm; intros; rewrite ZO_div_plus; + try apply Zplus_comm; auto with zarith. +Qed. + +(** Cancellations. *) + +Lemma ZOdiv_mult_cancel_r : forall a b c:Z, + c<>0 -> (a*c)/(b*c) = a/b. +Proof. + intros a b c Hc. + destruct (Z_eq_dec b 0). + subst; simpl; do 2 rewrite ZOdiv_0_r; auto. + symmetry. + apply ZOdiv_unique_full with ((a mod b)*c); auto with zarith. + rewrite Remainder_equiv. + split. + do 2 rewrite Zabs_Zmult. + apply Zmult_lt_compat_r. + romega with *. + apply ZOmod_lt; auto. + replace ((a mod b)*c*(a*c)) with (((a mod b)*a)*(c*c)) by ring. + apply Zmult_le_0_compat. + apply ZOmod_sgn2. + destruct c; simpl; auto with zarith. + pattern a at 1; rewrite (ZO_div_mod_eq a b); ring. +Qed. + +Lemma ZOdiv_mult_cancel_l : forall a b c:Z, + c<>0 -> (c*a)/(c*b) = a/b. +Proof. + intros. + rewrite (Zmult_comm c a); rewrite (Zmult_comm c b). + apply ZOdiv_mult_cancel_r; auto. +Qed. + +Lemma ZOmult_mod_distr_l: forall a b c, + (c*a) mod (c*b) = c * (a mod b). +Proof. + intros; destruct (Z_eq_dec c 0) as [Hc|Hc]. + subst; simpl; rewrite ZOmod_0_r; auto. + destruct (Z_eq_dec b 0) as [Hb|Hb]. + subst; repeat rewrite Zmult_0_r || rewrite ZOmod_0_r; auto. + assert (c*b <> 0). + contradict Hc; eapply Zmult_integral_l; eauto. + rewrite (Zplus_minus_eq _ _ _ (ZO_div_mod_eq (c*a) (c*b))). + rewrite (Zplus_minus_eq _ _ _ (ZO_div_mod_eq a b)). + rewrite ZOdiv_mult_cancel_l; auto with zarith. + ring. +Qed. + +Lemma ZOmult_mod_distr_r: forall a b c, + (a*c) mod (b*c) = (a mod b) * c. +Proof. + intros; repeat rewrite (fun x => (Zmult_comm x c)). + apply ZOmult_mod_distr_l; auto. +Qed. + +(** Operations modulo. *) + +Theorem ZOmod_mod: forall a n, (a mod n) mod n = a mod n. +Proof. + intros. + generalize (ZOmod_sgn2 a n). + pattern a at 2 4; rewrite (ZO_div_mod_eq a n); auto with zarith. + rewrite Zplus_comm; rewrite (Zmult_comm n). + intros. + apply sym_equal; apply ZO_mod_plus; auto with zarith. + rewrite Zmult_comm; auto. +Qed. + +Theorem ZOmult_mod: forall a b n, + (a * b) mod n = ((a mod n) * (b mod n)) mod n. +Proof. + intros. + generalize (Zmult_le_0_compat _ _ (ZOmod_sgn2 a n) (ZOmod_sgn2 b n)). + pattern a at 2 3; rewrite (ZO_div_mod_eq a n); auto with zarith. + pattern b at 2 3; rewrite (ZO_div_mod_eq b n); auto with zarith. + set (A:=a mod n); set (B:=b mod n); set (A':=a/n); set (B':=b/n). + replace (A*(n*A'+A)*(B*(n*B'+B))) with (((n*A' + A) * (n*B' + B))*(A*B)) + by ring. + replace ((n*A' + A) * (n*B' + B)) + with (A*B + (A'*B+B'*A+n*A'*B')*n) by ring. + intros. + apply ZO_mod_plus; auto with zarith. +Qed. + +(** addition and modulo + + Generally speaking, unlike with Zdiv, we don't have + (a+b) mod n = (a mod n + b mod n) mod n + for any a and b. + For instance, take (8 + (-10)) mod 3 = -2 whereas + (8 mod 3 + (-10 mod 3)) mod 3 = 1. *) + +Theorem ZOplus_mod: forall a b n, + 0 <= a * b -> + (a + b) mod n = (a mod n + b mod n) mod n. +Proof. + assert (forall a b n, 0 0 + (a + b) mod n = (a mod n + b mod n) mod n). + intros a b n Ha Hb. + assert (H : 0<=a+b) by (romega with * ); revert H. + pattern a at 1 2; rewrite (ZO_div_mod_eq a n); auto with zarith. + pattern b at 1 2; rewrite (ZO_div_mod_eq b n); auto with zarith. + replace ((n * (a / n) + a mod n) + (n * (b / n) + b mod n)) + with ((a mod n + b mod n) + (a / n + b / n) * n) by ring. + intros. + apply ZO_mod_plus; auto with zarith. + apply Zmult_le_0_compat; auto with zarith. + apply Zplus_le_0_compat. + apply Zmult_le_reg_r with a; auto with zarith. + simpl; apply ZOmod_sgn2; auto. + apply Zmult_le_reg_r with b; auto with zarith. + simpl; apply ZOmod_sgn2; auto. + (* general situation *) + intros a b n Hab. + destruct (Z_eq_dec a 0). + subst; simpl; symmetry; apply ZOmod_mod. + destruct (Z_eq_dec b 0). + subst; simpl; do 2 rewrite Zplus_0_r; symmetry; apply ZOmod_mod. + assert (0 + rewrite <-(Zopp_plus_distr x y), ZOmod_opp_l end. + f_equal; apply H; auto with zarith. +Qed. + +Lemma ZOplus_mod_idemp_l: forall a b n, + 0 <= a * b -> + (a mod n + b) mod n = (a + b) mod n. +Proof. + intros. + rewrite ZOplus_mod. + rewrite ZOmod_mod. + symmetry. + apply ZOplus_mod; auto. + destruct (Z_eq_dec a 0). + subst; rewrite ZOmod_0_l; auto. + destruct (Z_eq_dec b 0). + subst; rewrite Zmult_0_r; auto with zarith. + apply Zmult_le_reg_r with (a*b). + assert (a*b <> 0). + intro Hab. + rewrite (Zmult_integral_l _ _ n1 Hab) in n0; auto with zarith. + auto with zarith. + simpl. + replace (a mod n * b * (a*b)) with ((a mod n * a)*(b*b)) by ring. + apply Zmult_le_0_compat. + apply ZOmod_sgn2. + destruct b; simpl; auto with zarith. +Qed. + +Lemma ZOplus_mod_idemp_r: forall a b n, + 0 <= a*b -> + (b + a mod n) mod n = (b + a) mod n. +Proof. + intros. + rewrite Zplus_comm, (Zplus_comm b a). + apply ZOplus_mod_idemp_l; auto. +Qed. + +Lemma ZOmult_mod_idemp_l: forall a b n, (a mod n * b) mod n = (a * b) mod n. +Proof. + intros; rewrite ZOmult_mod, ZOmod_mod, <- ZOmult_mod; auto. +Qed. + +Lemma ZOmult_mod_idemp_r: forall a b n, (b * (a mod n)) mod n = (b * a) mod n. +Proof. + intros; rewrite ZOmult_mod, ZOmod_mod, <- ZOmult_mod; auto. +Qed. + +(** Unlike with Zdiv, the following result is true without restrictions. *) + +Lemma ZOdiv_ZOdiv : forall a b c, (a/b)/c = a/(b*c). +Proof. + (* particular case: a, b, c positive *) + assert (forall a b c, a>0 -> b>0 -> c>0 -> (a/b)/c = a/(b*c)). + intros a b c H H0 H1. + pattern a at 2;rewrite (ZO_div_mod_eq a b). + pattern (a/b) at 2;rewrite (ZO_div_mod_eq (a/b) c). + replace (b * (c * (a / b / c) + (a / b) mod c) + a mod b) with + ((a / b / c)*(b * c) + (b * ((a / b) mod c) + a mod b)) by ring. + assert (b*c<>0). + intro H2; + assert (H3: c <> 0) by auto with zarith; + rewrite (Zmult_integral_l _ _ H3 H2) in H0; auto with zarith. + assert (0<=a/b) by (apply (ZO_div_pos a b); auto with zarith). + assert (0<=a mod b < b) by (apply ZOmod_lt_pos_pos; auto with zarith). + assert (0<=(a/b) mod c < c) by + (apply ZOmod_lt_pos_pos; auto with zarith). + rewrite ZO_div_plus_l; auto with zarith. + rewrite (ZOdiv_small (b * ((a / b) mod c) + a mod b)). + ring. + split. + apply Zplus_le_0_compat;auto with zarith. + apply Zle_lt_trans with (b * ((a / b) mod c) + (b-1)). + apply Zplus_le_compat;auto with zarith. + apply Zle_lt_trans with (b * (c-1) + (b - 1)). + apply Zplus_le_compat;auto with zarith. + replace (b * (c - 1) + (b - 1)) with (b*c-1);try ring;auto with zarith. + repeat (apply Zmult_le_0_compat || apply Zplus_le_0_compat); auto with zarith. + apply (ZO_div_pos (a/b) c); auto with zarith. + (* b c positive, a general *) + assert (forall a b c, b>0 -> c>0 -> (a/b)/c = a/(b*c)). + intros; destruct a as [ |a|a]; try reflexivity. + apply H; auto with zarith. + change (Zneg a) with (-Zpos a); repeat rewrite ZOdiv_opp_l. + f_equal; apply H; auto with zarith. + (* c positive, a b general *) + assert (forall a b c, c>0 -> (a/b)/c = a/(b*c)). + intros; destruct b as [ |b|b]. + repeat rewrite ZOdiv_0_r; reflexivity. + apply H0; auto with zarith. + change (Zneg b) with (-Zpos b); + repeat (rewrite ZOdiv_opp_r || rewrite ZOdiv_opp_l || rewrite <- Zopp_mult_distr_l). + f_equal; apply H0; auto with zarith. + (* a b c general *) + intros; destruct c as [ |c|c]. + rewrite Zmult_0_r; repeat rewrite ZOdiv_0_r; reflexivity. + apply H1; auto with zarith. + change (Zneg c) with (-Zpos c); + rewrite <- Zopp_mult_distr_r; do 2 rewrite ZOdiv_opp_r. + f_equal; apply H1; auto with zarith. +Qed. + +(** A last inequality: *) + +Theorem ZOdiv_mult_le: + forall a b c, 0<=a -> 0<=b -> 0<=c -> c*(a/b) <= (c*a)/b. +Proof. + intros a b c Ha Hb Hc. + destruct (Zle_lt_or_eq _ _ Ha); + [ | subst; rewrite ZOdiv_0_l, Zmult_0_r, ZOdiv_0_l; auto]. + destruct (Zle_lt_or_eq _ _ Hb); + [ | subst; rewrite ZOdiv_0_r, ZOdiv_0_r, Zmult_0_r; auto]. + destruct (Zle_lt_or_eq _ _ Hc); + [ | subst; rewrite ZOdiv_0_l; auto]. + case (ZOmod_lt_pos_pos a b); auto with zarith; intros Hu1 Hu2. + case (ZOmod_lt_pos_pos c b); auto with zarith; intros Hv1 Hv2. + apply Zmult_le_reg_r with b; auto with zarith. + rewrite <- Zmult_assoc. + replace (a / b * b) with (a - a mod b). + replace (c * a / b * b) with (c * a - (c * a) mod b). + rewrite Zmult_minus_distr_l. + unfold Zminus; apply Zplus_le_compat_l. + match goal with |- - ?X <= -?Y => assert (Y <= X); auto with zarith end. + apply Zle_trans with ((c mod b) * (a mod b)); auto with zarith. + rewrite ZOmult_mod; auto with zarith. + apply (ZOmod_le ((c mod b) * (a mod b)) b); auto with zarith. + apply Zmult_le_compat_r; auto with zarith. + apply (ZOmod_le c b); auto. + pattern (c * a) at 1; rewrite (ZO_div_mod_eq (c * a) b); try ring; + auto with zarith. + pattern a at 1; rewrite (ZO_div_mod_eq a b); try ring; auto with zarith. +Qed. + +(** ZOmod is related to divisibility (see more in Znumtheory) *) + +Lemma ZOmod_divides : forall a b, + a mod b = 0 <-> exists c, a = b*c. +Proof. + split; intros. + exists (a/b). + pattern a at 1; rewrite (ZO_div_mod_eq a b). + rewrite H; auto with zarith. + destruct H as [c Hc]. + destruct (Z_eq_dec b 0). + subst b; simpl in *; subst a; auto. + symmetry. + apply ZOmod_unique_full with c; auto with zarith. + red; romega with *. +Qed. + +(** * Interaction with "historic" Zdiv *) + +(** They agree at least on positive numbers: *) + +Theorem ZOdiv_eucl_Zdiv_eucl_pos : forall a b:Z, 0 <= a -> 0 < b -> + a/b = Zdiv.Zdiv a b /\ a mod b = Zdiv.Zmod a b. +Proof. + intros. + apply Zdiv.Zdiv_mod_unique with b. + apply ZOmod_lt_pos; auto with zarith. + rewrite Zabs_eq; auto with *; apply Zdiv.Z_mod_lt; auto with *. + rewrite <- Zdiv.Z_div_mod_eq; auto with *. + symmetry; apply ZO_div_mod_eq; auto with *. +Qed. + +Theorem ZOdiv_Zdiv_pos : forall a b, 0 <= a -> 0 <= b -> + a/b = Zdiv.Zdiv a b. +Proof. + intros a b Ha Hb. + destruct (Zle_lt_or_eq _ _ Hb). + generalize (ZOdiv_eucl_Zdiv_eucl_pos a b Ha H); intuition. + subst; rewrite ZOdiv_0_r, Zdiv.Zdiv_0_r; reflexivity. +Qed. + +Theorem ZOmod_Zmod_pos : forall a b, 0 <= a -> 0 < b -> + a mod b = Zdiv.Zmod a b. +Proof. + intros a b Ha Hb; generalize (ZOdiv_eucl_Zdiv_eucl_pos a b Ha Hb); + intuition. +Qed. + +(** Modulos are null at the same places *) + +Theorem ZOmod_Zmod_zero : forall a b, b<>0 -> + (a mod b = 0 <-> Zdiv.Zmod a b = 0). +Proof. + intros. + rewrite ZOmod_divides, Zdiv.Zmod_divides; intuition. +Qed. diff --git a/theories/ZArith/ZOdiv_def.v b/theories/ZArith/ZOdiv_def.v new file mode 100644 index 00000000..2c84765e --- /dev/null +++ b/theories/ZArith/ZOdiv_def.v @@ -0,0 +1,136 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* false + | Npos na => match Pcompare na b Eq with Lt => false | _ => true end + end. + +Fixpoint Pdiv_eucl (a b:positive) {struct a} : N * N := + match a with + | xH => + match b with xH => (1, 0)%N | _ => (0, 1)%N end + | xO a' => + let (q, r) := Pdiv_eucl a' b in + let r' := (2 * r)%N in + if (NPgeb r' b) then (2 * q + 1, (Nminus r' (Npos b)))%N + else (2 * q, r')%N + | xI a' => + let (q, r) := Pdiv_eucl a' b in + let r' := (2 * r + 1)%N in + if (NPgeb r' b) then (2 * q + 1, (Nminus r' (Npos b)))%N + else (2 * q, r')%N + end. + +Definition ZOdiv_eucl (a b:Z) : Z * Z := + match a, b with + | Z0, _ => (Z0, Z0) + | _, Z0 => (Z0, a) + | Zpos na, Zpos nb => + let (nq, nr) := Pdiv_eucl na nb in + (Z_of_N nq, Z_of_N nr) + | Zneg na, Zpos nb => + let (nq, nr) := Pdiv_eucl na nb in + (Zopp (Z_of_N nq), Zopp (Z_of_N nr)) + | Zpos na, Zneg nb => + let (nq, nr) := Pdiv_eucl na nb in + (Zopp (Z_of_N nq), Z_of_N nr) + | Zneg na, Zneg nb => + let (nq, nr) := Pdiv_eucl na nb in + (Z_of_N nq, Zopp (Z_of_N nr)) + end. + +Definition ZOdiv a b := fst (ZOdiv_eucl a b). +Definition ZOmod a b := snd (ZOdiv_eucl a b). + + +Definition Ndiv_eucl (a b:N) : N * N := + match a, b with + | N0, _ => (N0, N0) + | _, N0 => (N0, a) + | Npos na, Npos nb => Pdiv_eucl na nb + end. + +Definition Ndiv a b := fst (Ndiv_eucl a b). +Definition Nmod a b := snd (Ndiv_eucl a b). + + +(* Proofs of specifications for these euclidean divisions. *) + +Theorem NPgeb_correct: forall (a:N)(b:positive), + if NPgeb a b then a = (Nminus a (Npos b) + Npos b)%N else True. +Proof. + destruct a; intros; simpl; auto. + generalize (Pcompare_Eq_eq p b). + case_eq (Pcompare p b Eq); intros; auto. + rewrite H0; auto. + now rewrite Pminus_mask_diag. + destruct (Pminus_mask_Gt p b H) as [d [H2 [H3 _]]]. + rewrite H2. rewrite <- H3. + simpl; f_equal; apply Pplus_comm. +Qed. + +Hint Rewrite Z_of_N_plus Z_of_N_mult Z_of_N_minus Zmult_1_l Zmult_assoc + Zmult_plus_distr_l Zmult_plus_distr_r : zdiv. +Hint Rewrite <- Zplus_assoc : zdiv. + +Theorem Pdiv_eucl_correct: forall a b, + let (q,r) := Pdiv_eucl a b in + Zpos a = Z_of_N q * Zpos b + Z_of_N r. +Proof. + induction a; cbv beta iota delta [Pdiv_eucl]; fold Pdiv_eucl; cbv zeta. + intros b; generalize (IHa b); case Pdiv_eucl. + intros q1 r1 Hq1. + generalize (NPgeb_correct (2 * r1 + 1) b); case NPgeb; intros H. + set (u := Nminus (2 * r1 + 1) (Npos b)) in * |- *. + assert (HH: Z_of_N u = (Z_of_N (2 * r1 + 1) - Zpos b)%Z). + rewrite H; autorewrite with zdiv; simpl. + rewrite Zplus_comm, Zminus_plus; trivial. + rewrite HH; autorewrite with zdiv; simpl Z_of_N. + rewrite Zpos_xI, Hq1. + autorewrite with zdiv; f_equal; rewrite Zplus_minus; trivial. + rewrite Zpos_xI, Hq1; autorewrite with zdiv; auto. + intros b; generalize (IHa b); case Pdiv_eucl. + intros q1 r1 Hq1. + generalize (NPgeb_correct (2 * r1) b); case NPgeb; intros H. + set (u := Nminus (2 * r1) (Npos b)) in * |- *. + assert (HH: Z_of_N u = (Z_of_N (2 * r1) - Zpos b)%Z). + rewrite H; autorewrite with zdiv; simpl. + rewrite Zplus_comm, Zminus_plus; trivial. + rewrite HH; autorewrite with zdiv; simpl Z_of_N. + rewrite Zpos_xO, Hq1. + autorewrite with zdiv; f_equal; rewrite Zplus_minus; trivial. + rewrite Zpos_xO, Hq1; autorewrite with zdiv; auto. + destruct b; auto. +Qed. + +Theorem ZOdiv_eucl_correct: forall a b, + let (q,r) := ZOdiv_eucl a b in a = q * b + r. +Proof. + destruct a; destruct b; simpl; auto; + generalize (Pdiv_eucl_correct p p0); case Pdiv_eucl; auto; intros; + try change (Zneg p) with (Zopp (Zpos p)); rewrite H. + destruct n; auto. + repeat (rewrite Zopp_plus_distr || rewrite Zopp_mult_distr_l); trivial. + repeat (rewrite Zopp_plus_distr || rewrite Zopp_mult_distr_r); trivial. +Qed. + +Theorem Ndiv_eucl_correct: forall a b, + let (q,r) := Ndiv_eucl a b in a = (q * b + r)%N. +Proof. + destruct a; destruct b; simpl; auto; + generalize (Pdiv_eucl_correct p p0); case Pdiv_eucl; auto; intros; + destruct n; destruct n0; simpl; simpl in H; try discriminate; + injection H; intros; subst; trivial. +Qed. diff --git a/theories/ZArith/Zabs.v b/theories/ZArith/Zabs.v index ed641358..c15493e3 100644 --- a/theories/ZArith/Zabs.v +++ b/theories/ZArith/Zabs.v @@ -5,14 +5,16 @@ (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Zabs.v 9302 2006-10-27 21:21:17Z barras $ i*) +(*i $Id: Zabs.v 10302 2007-11-08 09:54:31Z letouzey $ i*) -(** Binary Integers (Pierre Crégut (CNET, Lannion, France) *) +(** Binary Integers (Pierre Crégut (CNET, Lannion, France) *) Require Import Arith_base. Require Import BinPos. Require Import BinInt. Require Import Zorder. +Require Import Zmax. +Require Import Znat. Require Import ZArith_dec. Open Local Scope Z_scope. @@ -63,6 +65,11 @@ Lemma Zabs_pos : forall n:Z, 0 <= Zabs n. intro x; destruct x; auto with arith; compute in |- *; intros H; inversion H. Qed. +Lemma Zabs_involutive : forall x:Z, Zabs (Zabs x) = Zabs x. +Proof. + intros; apply Zabs_eq; apply Zabs_pos. +Qed. + Theorem Zabs_eq_case : forall n m:Z, Zabs n = Zabs m -> n = m \/ n = - m. Proof. intros z1 z2; case z1; case z2; simpl in |- *; auto; @@ -70,6 +77,13 @@ Proof. (intros H2; rewrite H2); auto. Qed. +Lemma Zabs_spec : forall x:Z, + 0 <= x /\ Zabs x = x \/ + 0 > x /\ Zabs x = -x. +Proof. + intros; unfold Zabs, Zle, Zgt; destruct x; simpl; intuition discriminate. +Qed. + (** * Triangular inequality *) Hint Local Resolve Zle_neg_pos: zarith. @@ -106,25 +120,106 @@ Proof. intros z1 z2; case z1; case z2; simpl in |- *; auto. Qed. -(** * Absolute value in nat is compatible with order *) +Theorem Zabs_square : forall a, Zabs a * Zabs a = a * a. +Proof. + destruct a; simpl; auto. +Qed. + +(** * Results about absolute value in nat. *) + +Theorem inj_Zabs_nat : forall z:Z, Z_of_nat (Zabs_nat z) = Zabs z. +Proof. + destruct z; simpl; auto; symmetry; apply Zpos_eq_Z_of_nat_o_nat_of_P. +Qed. + +Theorem Zabs_nat_Z_of_nat: forall n, Zabs_nat (Z_of_nat n) = n. +Proof. + destruct n; simpl; auto. + apply nat_of_P_o_P_of_succ_nat_eq_succ. +Qed. + +Lemma Zabs_nat_mult: forall n m:Z, Zabs_nat (n*m) = (Zabs_nat n * Zabs_nat m)%nat. +Proof. + intros; apply inj_eq_rev. + rewrite inj_mult; repeat rewrite inj_Zabs_nat; apply Zabs_Zmult. +Qed. + +Lemma Zabs_nat_Zsucc: + forall p, 0 <= p -> Zabs_nat (Zsucc p) = S (Zabs_nat p). +Proof. + intros; apply inj_eq_rev. + rewrite inj_S; repeat rewrite inj_Zabs_nat, Zabs_eq; auto with zarith. +Qed. + +Lemma Zabs_nat_Zplus: + forall x y, 0<=x -> 0<=y -> Zabs_nat (x+y) = (Zabs_nat x + Zabs_nat y)%nat. +Proof. + intros; apply inj_eq_rev. + rewrite inj_plus; repeat rewrite inj_Zabs_nat, Zabs_eq; auto with zarith. + apply Zplus_le_0_compat; auto. +Qed. + +Lemma Zabs_nat_Zminus: + forall x y, 0 <= x <= y -> Zabs_nat (y - x) = (Zabs_nat y - Zabs_nat x)%nat. +Proof. + intros x y (H,H'). + assert (0 <= y) by (apply Zle_trans with x; auto). + assert (0 <= y-x) by (apply Zle_minus_le_0; auto). + apply inj_eq_rev. + rewrite inj_minus; repeat rewrite inj_Zabs_nat, Zabs_eq; auto. + rewrite Zmax_right; auto. +Qed. + +Lemma Zabs_nat_le : + forall n m:Z, 0 <= n <= m -> (Zabs_nat n <= Zabs_nat m)%nat. +Proof. + intros n m (H,H'); apply inj_le_rev. + repeat rewrite inj_Zabs_nat, Zabs_eq; auto. + apply Zle_trans with n; auto. +Qed. Lemma Zabs_nat_lt : - forall n m:Z, 0 <= n /\ n < m -> (Zabs_nat n < Zabs_nat m)%nat. + forall n m:Z, 0 <= n < m -> (Zabs_nat n < Zabs_nat m)%nat. +Proof. + intros n m (H,H'); apply inj_lt_rev. + repeat rewrite inj_Zabs_nat, Zabs_eq; auto. + apply Zlt_le_weak; apply Zle_lt_trans with n; auto. +Qed. + +(** * Some results about the sign function. *) + +Lemma Zsgn_Zmult : forall a b, Zsgn (a*b) = Zsgn a * Zsgn b. +Proof. + destruct a; destruct b; simpl; auto. +Qed. + +Lemma Zsgn_Zopp : forall a, Zsgn (-a) = - Zsgn a. Proof. - intros x y. case x; simpl in |- *. case y; simpl in |- *. + destruct a; simpl; auto. +Qed. - intro. absurd (0 < 0). compute in |- *. intro H0. discriminate H0. intuition. - intros. elim (ZL4 p). intros. rewrite H0. auto with arith. - intros. elim (ZL4 p). intros. rewrite H0. auto with arith. - - case y; simpl in |- *. - intros. absurd (Zpos p < 0). compute in |- *. intro H0. discriminate H0. intuition. - intros. change (nat_of_P p > nat_of_P p0)%nat in |- *. - apply nat_of_P_gt_Gt_compare_morphism. - elim H; auto with arith. intro. exact (ZC2 p0 p). +(** A characterization of the sign function: *) - intros. absurd (Zpos p0 < Zneg p). - compute in |- *. intro H0. discriminate H0. intuition. +Lemma Zsgn_spec : forall x:Z, + 0 < x /\ Zsgn x = 1 \/ + 0 = x /\ Zsgn x = 0 \/ + 0 > x /\ Zsgn x = -1. +Proof. + intros; unfold Zsgn, Zle, Zgt; destruct x; compute; intuition. +Qed. - intros. absurd (0 <= Zneg p). compute in |- *. auto with arith. intuition. +Lemma Zsgn_pos : forall x:Z, Zsgn x = 1 <-> 0 < x. +Proof. + destruct x; now intuition. Qed. + +Lemma Zsgn_neg : forall x:Z, Zsgn x = -1 <-> x < 0. +Proof. + destruct x; now intuition. +Qed. + +Lemma Zsgn_null : forall x:Z, Zsgn x = 0 <-> x = 0. +Proof. + destruct x; now intuition. +Qed. + diff --git a/theories/ZArith/Zbool.v b/theories/ZArith/Zbool.v index 7da91c44..34114d46 100644 --- a/theories/ZArith/Zbool.v +++ b/theories/ZArith/Zbool.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: Zbool.v 9245 2006-10-17 12:53:34Z notin $ *) +(* $Id: Zbool.v 10063 2007-08-08 14:21:03Z emakarov $ *) Require Import BinInt. Require Import Zeven. @@ -104,7 +104,7 @@ Qed. Lemma Zle_bool_imp_le : forall n m:Z, Zle_bool n m = true -> (n <= m)%Z. Proof. - unfold Zle_bool, Zle in |- *. intros x y. unfold not in |- *. + unfold Zle_bool, Zle in |- *. intros x y. unfold not in |- *. case (x ?= y)%Z; intros; discriminate. Qed. @@ -178,6 +178,18 @@ Proof. intro. apply Zle_ge. apply Zle_bool_imp_le. assumption. Qed. +Lemma Zlt_is_lt_bool : forall n m:Z, (n < m)%Z <-> Zlt_bool n m = true. +Proof. +intros n m; unfold Zlt_bool, Zlt. +destruct (n ?= m)%Z; simpl; split; now intro. +Qed. + +Lemma Zgt_is_gt_bool : forall n m:Z, (n > m)%Z <-> Zgt_bool n m = true. +Proof. +intros n m; unfold Zgt_bool, Zgt. +destruct (n ?= m)%Z; simpl; split; now intro. +Qed. + Lemma Zlt_is_le_bool : forall n m:Z, (n < m)%Z <-> Zle_bool n (m - 1) = true. Proof. diff --git a/theories/ZArith/Zcomplements.v b/theories/ZArith/Zcomplements.v index 78c8a976..c6ade934 100644 --- a/theories/ZArith/Zcomplements.v +++ b/theories/ZArith/Zcomplements.v @@ -6,11 +6,11 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Zcomplements.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Zcomplements.v 10617 2008-03-04 18:07:16Z letouzey $ i*) Require Import ZArithRing. Require Import ZArith_base. -Require Import Omega. +Require Export Omega. Require Import Wf_nat. Open Local Scope Z_scope. @@ -160,7 +160,7 @@ Qed. Require Import List. -Fixpoint Zlength_aux (acc:Z) (A:Set) (l:list A) {struct l} : Z := +Fixpoint Zlength_aux (acc:Z) (A:Type) (l:list A) {struct l} : Z := match l with | nil => acc | _ :: l => Zlength_aux (Zsucc acc) A l @@ -171,7 +171,7 @@ Implicit Arguments Zlength [A]. Section Zlength_properties. - Variable A : Set. + Variable A : Type. Implicit Type l : list A. diff --git a/theories/ZArith/Zdiv.v b/theories/ZArith/Zdiv.v index 31f68207..4c560c6b 100644 --- a/theories/ZArith/Zdiv.v +++ b/theories/ZArith/Zdiv.v @@ -6,9 +6,9 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Zdiv.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Zdiv.v 10999 2008-05-27 15:55:22Z letouzey $ i*) -(* Contribution by Claude Marché and Xavier Urbain *) +(* Contribution by Claude Marché and Xavier Urbain *) (** Euclidean Division @@ -21,6 +21,7 @@ Require Import Zbool. Require Import Omega. Require Import ZArithRing. Require Import Zcomplements. +Require Export Setoid. Open Local Scope Z_scope. (** * Definitions of Euclidian operations *) @@ -70,8 +71,21 @@ Unboxed Fixpoint Zdiv_eucl_POS (a:positive) (b:Z) {struct a} : if r = 0 then (-q,0) else (-(q+1),b+r) In other word, when b is non-zero, q is chosen to be the greatest integer - smaller or equal to a/b. And sgn(r)=sgn(b) and |r| < |b|. + smaller or equal to a/b. And sgn(r)=sgn(b) and |r| < |b| (at least when + r is not null). +*) + +(* Nota: At least two others conventions also exist for euclidean division. + They all satify the equation a=b*q+r, but differ on the choice of (q,r) + on negative numbers. + + * Ocaml uses Round-Toward-Zero division: (-a)/b = a/(-b) = -(a/b). + Hence (-a) mod b = - (a mod b) + a mod (-b) = a mod b + And: |r| < |b| and sgn(r) = sgn(a) (notice the a here instead of b). + * Another solution is to always pick a non-negative remainder: + a=b*q+r with 0 <= r < |b| *) Definition Zdiv_eucl (a b:Z) : Z * Z := @@ -96,7 +110,7 @@ Definition Zdiv_eucl (a b:Z) : Z * Z := (** Division and modulo are projections of [Zdiv_eucl] *) - + Definition Zdiv (a b:Z) : Z := let (q, _) := Zdiv_eucl a b in q. Definition Zmod (a b:Z) : Z := let (_, r) := Zdiv_eucl a b in r. @@ -108,20 +122,20 @@ Infix "mod" := Zmod (at level 40, no associativity) : Z_scope. (* Tests: -Eval Compute in `(Zdiv_eucl 7 3)`. +Eval compute in (Zdiv_eucl 7 3). -Eval Compute in `(Zdiv_eucl (-7) 3)`. +Eval compute in (Zdiv_eucl (-7) 3). -Eval Compute in `(Zdiv_eucl 7 (-3))`. +Eval compute in (Zdiv_eucl 7 (-3)). -Eval Compute in `(Zdiv_eucl (-7) (-3))`. +Eval compute in (Zdiv_eucl (-7) (-3)). *) (** * Main division theorem *) -(** First a lemma for positive *) +(** First a lemma for two positive arguments *) Lemma Z_div_mod_POS : forall b:Z, @@ -129,7 +143,8 @@ Lemma Z_div_mod_POS : forall a:positive, let (q, r) := Zdiv_eucl_POS a b in Zpos a = b * q + r /\ 0 <= r < b. Proof. -simple induction a; unfold Zdiv_eucl_POS in |- *; fold Zdiv_eucl_POS in |- *. +simple induction a; cbv beta iota delta [Zdiv_eucl_POS] in |- *; + fold Zdiv_eucl_POS in |- *; cbv zeta. intro p; case (Zdiv_eucl_POS p b); intros q r [H0 H1]. generalize (Zgt_cases b (2 * r + 1)). @@ -147,6 +162,7 @@ case (Zge_bool b 2); (intros; split; [ try ring | omega ]). omega. Qed. +(** Then the usual situation of a positive [b] and no restriction on [a] *) Theorem Z_div_mod : forall a b:Z, @@ -166,27 +182,131 @@ Proof. intros [H1 H2]. split; trivial. - replace (Zneg p0) with (- Zpos p0); [ rewrite H1; ring | trivial ]. + change (Zneg p0) with (- Zpos p0); rewrite H1; ring. intros p1 [H1 H2]. split; trivial. - replace (Zneg p0) with (- Zpos p0); [ rewrite H1; ring | trivial ]. + change (Zneg p0) with (- Zpos p0); rewrite H1; ring. generalize (Zorder.Zgt_pos_0 p1); omega. intros p1 [H1 H2]. split; trivial. - replace (Zneg p0) with (- Zpos p0); [ rewrite H1; ring | trivial ]. + change (Zneg p0) with (- Zpos p0); rewrite H1; ring. generalize (Zorder.Zlt_neg_0 p1); omega. intros; discriminate. Qed. -(** Existence theorems *) +(** For stating the fully general result, let's give a short name + to the condition on the remainder. *) -Theorem Zdiv_eucl_exist : - forall b:Z, - b > 0 -> - forall a:Z, {qr : Z * Z | let (q, r) := qr in a = b * q + r /\ 0 <= r < b}. +Definition Remainder r b := 0 <= r < b \/ b < r <= 0. + +(** Another equivalent formulation: *) + +Definition Remainder_alt r b := Zabs r < Zabs b /\ Zsgn r <> - Zsgn b. + +(* In the last formulation, [ Zsgn r <> - Zsgn b ] is less nice than saying + [ Zsgn r = Zsgn b ], but at least it works even when [r] is null. *) + +Lemma Remainder_equiv : forall r b, Remainder r b <-> Remainder_alt r b. +Proof. + intros; unfold Remainder, Remainder_alt; omega with *. +Qed. + +Hint Unfold Remainder. + +(** Now comes the fully general result about Euclidean division. *) + +Theorem Z_div_mod_full : + forall a b:Z, + b <> 0 -> let (q, r) := Zdiv_eucl a b in a = b * q + r /\ Remainder r b. +Proof. + destruct b as [|b|b]. + (* b = 0 *) + intro H; elim H; auto. + (* b > 0 *) + intros _. + assert (Zpos b > 0) by auto with zarith. + generalize (Z_div_mod a (Zpos b) H). + destruct Zdiv_eucl as (q,r); intuition; simpl; auto. + (* b < 0 *) + intros _. + assert (Zpos b > 0) by auto with zarith. + generalize (Z_div_mod a (Zpos b) H). + unfold Remainder. + destruct a as [|a|a]. + (* a = 0 *) + simpl; intuition. + (* a > 0 *) + unfold Zdiv_eucl; destruct Zdiv_eucl_POS as (q,r). + destruct r as [|r|r]; [ | | omega with *]. + rewrite <- Zmult_opp_comm; simpl Zopp; intuition. + rewrite <- Zmult_opp_comm; simpl Zopp. + rewrite Zmult_plus_distr_r; omega with *. + (* a < 0 *) + unfold Zdiv_eucl. + generalize (Z_div_mod_POS (Zpos b) H a). + destruct Zdiv_eucl_POS as (q,r). + destruct r as [|r|r]; change (Zneg b) with (-Zpos b). + rewrite Zmult_opp_comm; omega with *. + rewrite <- Zmult_opp_comm, Zmult_plus_distr_r; + repeat rewrite Zmult_opp_comm; omega. + rewrite Zmult_opp_comm; omega with *. +Qed. + +(** The same results as before, stated separately in terms of Zdiv and Zmod *) + +Lemma Z_mod_remainder : forall a b:Z, b<>0 -> Remainder (a mod b) b. +Proof. + unfold Zmod; intros a b Hb; generalize (Z_div_mod_full a b Hb); auto. + destruct Zdiv_eucl; tauto. +Qed. + +Lemma Z_mod_lt : forall a b:Z, b > 0 -> 0 <= a mod b < b. +Proof. + unfold Zmod; intros a b Hb; generalize (Z_div_mod a b Hb). + destruct Zdiv_eucl; tauto. +Qed. + +Lemma Z_mod_neg : forall a b:Z, b < 0 -> b < a mod b <= 0. +Proof. + unfold Zmod; intros a b Hb. + assert (Hb' : b<>0) by (auto with zarith). + generalize (Z_div_mod_full a b Hb'). + destruct Zdiv_eucl. + unfold Remainder; intuition. +Qed. + +Lemma Z_div_mod_eq_full : forall a b:Z, b <> 0 -> a = b*(a/b) + (a mod b). +Proof. + unfold Zdiv, Zmod; intros a b Hb; generalize (Z_div_mod_full a b Hb). + destruct Zdiv_eucl; tauto. +Qed. + +Lemma Z_div_mod_eq : forall a b:Z, b > 0 -> a = b*(a/b) + (a mod b). +Proof. + intros; apply Z_div_mod_eq_full; auto with zarith. +Qed. + +Lemma Zmod_eq_full : forall a b:Z, b<>0 -> a mod b = a - (a/b)*b. +Proof. + intros. + rewrite <- Zeq_plus_swap, Zplus_comm, Zmult_comm; symmetry. + apply Z_div_mod_eq_full; auto. +Qed. + +Lemma Zmod_eq : forall a b:Z, b>0 -> a mod b = a - (a/b)*b. +Proof. + intros. + rewrite <- Zeq_plus_swap, Zplus_comm, Zmult_comm; symmetry. + apply Z_div_mod_eq; auto. +Qed. + +(** Existence theorem *) + +Theorem Zdiv_eucl_exist : forall (b:Z)(Hb:b>0)(a:Z), + {qr : Z * Z | let (q, r) := qr in a = b * q + r /\ 0 <= r < b}. Proof. intros b Hb a. exists (Zdiv_eucl a b). @@ -195,70 +315,180 @@ Qed. Implicit Arguments Zdiv_eucl_exist. -Theorem Zdiv_eucl_extended : - forall b:Z, - b <> 0 -> - forall a:Z, - {qr : Z * Z | let (q, r) := qr in a = b * q + r /\ 0 <= r < Zabs b}. + +(** Uniqueness theorems *) + +Theorem Zdiv_mod_unique : + forall b q1 q2 r1 r2:Z, + 0 <= r1 < Zabs b -> 0 <= r2 < Zabs b -> + b*q1+r1 = b*q2+r2 -> q1=q2 /\ r1=r2. Proof. - intros b Hb a. - elim (Z_le_gt_dec 0 b); intro Hb'. - cut (b > 0); [ intro Hb'' | omega ]. - rewrite Zabs_eq; [ apply Zdiv_eucl_exist; assumption | assumption ]. - cut (- b > 0); [ intro Hb'' | omega ]. - elim (Zdiv_eucl_exist Hb'' a); intros qr. - elim qr; intros q r Hqr. - exists (- q, r). - elim Hqr; intros. - split. - rewrite <- Zmult_opp_comm; assumption. - rewrite Zabs_non_eq; [ assumption | omega ]. +intros b q1 q2 r1 r2 Hr1 Hr2 H. +destruct (Z_eq_dec q1 q2) as [Hq|Hq]. +split; trivial. +rewrite Hq in H; omega. +elim (Zlt_not_le (Zabs (r2 - r1)) (Zabs b)). +omega with *. +replace (r2-r1) with (b*(q1-q2)) by (rewrite Zmult_minus_distr_l; omega). +replace (Zabs b) with ((Zabs b)*1) by ring. +rewrite Zabs_Zmult. +apply Zmult_le_compat_l; auto with *. +omega with *. Qed. -Implicit Arguments Zdiv_eucl_extended. +Theorem Zdiv_mod_unique_2 : + forall b q1 q2 r1 r2:Z, + Remainder r1 b -> Remainder r2 b -> + b*q1+r1 = b*q2+r2 -> q1=q2 /\ r1=r2. +Proof. +unfold Remainder. +intros b q1 q2 r1 r2 Hr1 Hr2 H. +destruct (Z_eq_dec q1 q2) as [Hq|Hq]. +split; trivial. +rewrite Hq in H; omega. +elim (Zlt_not_le (Zabs (r2 - r1)) (Zabs b)). +omega with *. +replace (r2-r1) with (b*(q1-q2)) by (rewrite Zmult_minus_distr_l; omega). +replace (Zabs b) with ((Zabs b)*1) by ring. +rewrite Zabs_Zmult. +apply Zmult_le_compat_l; auto with *. +omega with *. +Qed. -(** * Auxiliary lemmas about [Zdiv] and [Zmod] *) +Theorem Zdiv_unique_full: + forall a b q r, Remainder r b -> + a = b*q + r -> q = a/b. +Proof. + intros. + assert (b <> 0) by (unfold Remainder in *; omega with *). + generalize (Z_div_mod_full a b H1). + unfold Zdiv; destruct Zdiv_eucl as (q',r'). + intros (H2,H3); rewrite H2 in H0. + destruct (Zdiv_mod_unique_2 b q q' r r'); auto. +Qed. -Lemma Z_div_mod_eq : forall a b:Z, b > 0 -> a = b * Zdiv a b + Zmod a b. +Theorem Zdiv_unique: + forall a b q r, 0 <= r < b -> + a = b*q + r -> q = a/b. Proof. - unfold Zdiv, Zmod in |- *. - intros a b Hb. - generalize (Z_div_mod a b Hb). - case Zdiv_eucl; tauto. + intros; eapply Zdiv_unique_full; eauto. Qed. -Lemma Z_mod_lt : forall a b:Z, b > 0 -> 0 <= Zmod a b < b. +Theorem Zmod_unique_full: + forall a b q r, Remainder r b -> + a = b*q + r -> r = a mod b. Proof. - unfold Zmod in |- *. - intros a b Hb. - generalize (Z_div_mod a b Hb). - case (Zdiv_eucl a b); tauto. + intros. + assert (b <> 0) by (unfold Remainder in *; omega with *). + generalize (Z_div_mod_full a b H1). + unfold Zmod; destruct Zdiv_eucl as (q',r'). + intros (H2,H3); rewrite H2 in H0. + destruct (Zdiv_mod_unique_2 b q q' r r'); auto. Qed. -Lemma Z_div_POS_ge0 : - forall (b:Z) (a:positive), let (q, _) := Zdiv_eucl_POS a b in q >= 0. +Theorem Zmod_unique: + forall a b q r, 0 <= r < b -> + a = b*q + r -> r = a mod b. Proof. - simple induction a; unfold Zdiv_eucl_POS in |- *; fold Zdiv_eucl_POS in |- *. - intro p; case (Zdiv_eucl_POS p b). - intros; case (Zgt_bool b (2 * z0 + 1)); intros; omega. - intro p; case (Zdiv_eucl_POS p b). - intros; case (Zgt_bool b (2 * z0)); intros; omega. - case (Zge_bool b 2); simpl in |- *; omega. + intros; eapply Zmod_unique_full; eauto. Qed. -Lemma Z_div_ge0 : forall a b:Z, b > 0 -> a >= 0 -> Zdiv a b >= 0. +(** * Basic values of divisions and modulo. *) + +Lemma Zmod_0_l: forall a, 0 mod a = 0. Proof. - intros a b Hb; unfold Zdiv, Zdiv_eucl in |- *; case a; simpl in |- *; intros. - case b; simpl in |- *; trivial. - generalize Hb; case b; try trivial. - auto with zarith. - intros p0 Hp0; generalize (Z_div_POS_ge0 (Zpos p0) p). - case (Zdiv_eucl_POS p (Zpos p0)); simpl in |- *; tauto. - intros; discriminate. - elim H; trivial. + destruct a; simpl; auto. +Qed. + +Lemma Zmod_0_r: forall a, a mod 0 = 0. +Proof. + destruct a; simpl; auto. +Qed. + +Lemma Zdiv_0_l: forall a, 0/a = 0. +Proof. + destruct a; simpl; auto. +Qed. + +Lemma Zdiv_0_r: forall a, a/0 = 0. +Proof. + destruct a; simpl; auto. +Qed. + +Lemma Zmod_1_r: forall a, a mod 1 = 0. +Proof. + intros; symmetry; apply Zmod_unique with a; auto with zarith. Qed. -Lemma Z_div_lt : forall a b:Z, b >= 2 -> a > 0 -> Zdiv a b < a. +Lemma Zdiv_1_r: forall a, a/1 = a. +Proof. + intros; symmetry; apply Zdiv_unique with 0; auto with zarith. +Qed. + +Hint Resolve Zmod_0_l Zmod_0_r Zdiv_0_l Zdiv_0_r Zdiv_1_r Zmod_1_r + : zarith. + +Lemma Zdiv_1_l: forall a, 1 < a -> 1/a = 0. +Proof. + intros; symmetry; apply Zdiv_unique with 1; auto with zarith. +Qed. + +Lemma Zmod_1_l: forall a, 1 < a -> 1 mod a = 1. +Proof. + intros; symmetry; apply Zmod_unique with 0; auto with zarith. +Qed. + +Lemma Z_div_same_full : forall a:Z, a<>0 -> a/a = 1. +Proof. + intros; symmetry; apply Zdiv_unique_full with 0; auto with *; red; omega. +Qed. + +Lemma Z_mod_same_full : forall a, a mod a = 0. +Proof. + destruct a; intros; symmetry. + compute; auto. + apply Zmod_unique with 1; auto with *; omega with *. + apply Zmod_unique_full with 1; auto with *; red; omega with *. +Qed. + +Lemma Z_mod_mult : forall a b, (a*b) mod b = 0. +Proof. + intros a b; destruct (Z_eq_dec b 0) as [Hb|Hb]. + subst; simpl; rewrite Zmod_0_r; auto. + symmetry; apply Zmod_unique_full with a; [ red; omega | ring ]. +Qed. + +Lemma Z_div_mult_full : forall a b:Z, b <> 0 -> (a*b)/b = a. +Proof. + intros; symmetry; apply Zdiv_unique_full with 0; auto with zarith; + [ red; omega | ring]. +Qed. + +(** * Order results about Zmod and Zdiv *) + +(* Division of positive numbers is positive. *) + +Lemma Z_div_pos: forall a b, b > 0 -> 0 <= a -> 0 <= a/b. +Proof. + intros. + rewrite (Z_div_mod_eq a b H) in H0. + assert (H1:=Z_mod_lt a b H). + destruct (Z_lt_le_dec (a/b) 0); auto. + assert (b*(a/b) <= -b). + replace (-b) with (b*-1); [ | ring]. + apply Zmult_le_compat_l; auto with zarith. + omega. +Qed. + +Lemma Z_div_ge0: forall a b, b > 0 -> a >= 0 -> a/b >=0. +Proof. + intros; generalize (Z_div_pos a b H); auto with zarith. +Qed. + +(** As soon as the divisor is greater or equal than 2, + the division is strictly decreasing. *) + +Lemma Z_div_lt : forall a b:Z, b >= 2 -> a > 0 -> a/b < a. Proof. intros. cut (b > 0); [ intro Hb | omega ]. generalize (Z_div_mod a b Hb). @@ -271,9 +501,24 @@ Proof. auto with zarith. Qed. -(** * Other lemmas (now using the syntax for [Zdiv] and [Zmod]). *) -Lemma Z_div_ge : forall a b c:Z, c > 0 -> a >= b -> a / c >= b / c. +(** A division of a small number by a bigger one yields zero. *) + +Theorem Zdiv_small: forall a b, 0 <= a < b -> a/b = 0. +Proof. + intros a b H; apply sym_equal; apply Zdiv_unique with a; auto with zarith. +Qed. + +(** Same situation, in term of modulo: *) + +Theorem Zmod_small: forall a n, 0 <= a < n -> a mod n = a. +Proof. + intros a b H; apply sym_equal; apply Zmod_unique with 0; auto with zarith. +Qed. + +(** [Zge] is compatible with a positive division. *) + +Lemma Z_div_ge : forall a b c:Z, c > 0 -> a >= b -> a/c >= b/c. Proof. intros a b c cPos aGeb. generalize (Z_div_mod_eq a c cPos). @@ -285,13 +530,8 @@ Proof. intro. absurd (b - a >= 1). omega. - rewrite H0. - rewrite H2. - assert - (c * (b / c) + b mod c - (c * (a / c) + a mod c) = - c * (b / c - a / c) + b mod c - a mod c). - ring. - rewrite H3. + replace (b-a) with (c * (b/c-a/c) + b mod c - a mod c) by + (symmetry; pattern a at 1; rewrite H2; pattern b at 1; rewrite H0; ring). assert (c * (b / c - a / c) >= c * 1). apply Zmult_ge_compat_l. omega. @@ -301,111 +541,639 @@ Proof. omega. Qed. -Lemma Z_mod_plus : forall a b c:Z, c > 0 -> (a + b * c) mod c = a mod c. +(** Same, with [Zle]. *) + +Lemma Z_div_le : forall a b c:Z, c > 0 -> a <= b -> a/c <= b/c. Proof. - intros a b c cPos. - generalize (Z_div_mod_eq a c cPos). - generalize (Z_mod_lt a c cPos). - generalize (Z_div_mod_eq (a + b * c) c cPos). - generalize (Z_mod_lt (a + b * c) c cPos). - intros. + intros a b c H H0. + apply Zge_le. + apply Z_div_ge; auto with *. +Qed. - assert ((a + b * c) mod c - a mod c = c * (b + a / c - (a + b * c) / c)). - replace ((a + b * c) mod c) with (a + b * c - c * ((a + b * c) / c)). - replace (a mod c) with (a - c * (a / c)). - ring. - omega. - omega. - set (q := b + a / c - (a + b * c) / c) in *. - apply (Zcase_sign q); intros. - assert (c * q = 0). - rewrite H4; ring. - rewrite H5 in H3. - omega. +(** With our choice of division, rounding of (a/b) is always done toward bottom: *) - assert (c * q >= c). - pattern c at 2 in |- *; replace c with (c * 1). - apply Zmult_ge_compat_l; omega. - ring. - omega. +Lemma Z_mult_div_ge : forall a b:Z, b > 0 -> b*(a/b) <= a. +Proof. + intros a b H; generalize (Z_div_mod_eq a b H) (Z_mod_lt a b H); omega. +Qed. + +Lemma Z_mult_div_ge_neg : forall a b:Z, b < 0 -> b*(a/b) >= a. +Proof. + intros a b H. + generalize (Z_div_mod_eq_full a _ (Zlt_not_eq _ _ H)) (Z_mod_neg a _ H); omega. +Qed. + +(** The previous inequalities are exact iff the modulo is zero. *) + +Lemma Z_div_exact_full_1 : forall a b:Z, a = b*(a/b) -> a mod b = 0. +Proof. + intros; destruct (Z_eq_dec b 0) as [Hb|Hb]. + subst b; simpl in *; subst; auto. + generalize (Z_div_mod_eq_full a b Hb); omega. +Qed. + +Lemma Z_div_exact_full_2 : forall a b:Z, b <> 0 -> a mod b = 0 -> a = b*(a/b). +Proof. + intros; generalize (Z_div_mod_eq_full a b H); omega. +Qed. + +(** A modulo cannot grow beyond its starting point. *) + +Theorem Zmod_le: forall a b, 0 < b -> 0 <= a -> a mod b <= a. +Proof. + intros a b H1 H2; case (Zle_or_lt b a); intros H3. + case (Z_mod_lt a b); auto with zarith. + rewrite Zmod_small; auto with zarith. +Qed. + +(** Some additionnal inequalities about Zdiv. *) + +Theorem Zdiv_le_upper_bound: + forall a b q, 0 <= a -> 0 < b -> a <= q*b -> a/b <= q. +Proof. + intros a b q H1 H2 H3. + apply Zmult_le_reg_r with b; auto with zarith. + apply Zle_trans with (2 := H3). + pattern a at 2; rewrite (Z_div_mod_eq a b); auto with zarith. + rewrite (Zmult_comm b); case (Z_mod_lt a b); auto with zarith. +Qed. + +Theorem Zdiv_lt_upper_bound: + forall a b q, 0 <= a -> 0 < b -> a < q*b -> a/b < q. +Proof. + intros a b q H1 H2 H3. + apply Zmult_lt_reg_r with b; auto with zarith. + apply Zle_lt_trans with (2 := H3). + pattern a at 2; rewrite (Z_div_mod_eq a b); auto with zarith. + rewrite (Zmult_comm b); case (Z_mod_lt a b); auto with zarith. +Qed. + +Theorem Zdiv_le_lower_bound: + forall a b q, 0 <= a -> 0 < b -> q*b <= a -> q <= a/b. +Proof. + intros a b q H1 H2 H3. + assert (q < a / b + 1); auto with zarith. + apply Zmult_lt_reg_r with b; auto with zarith. + apply Zle_lt_trans with (1 := H3). + pattern a at 1; rewrite (Z_div_mod_eq a b); auto with zarith. + rewrite Zmult_plus_distr_l; rewrite (Zmult_comm b); case (Z_mod_lt a b); + auto with zarith. +Qed. + + +(** A division of respect opposite monotonicity for the divisor *) + +Lemma Zdiv_le_compat_l: forall p q r, 0 <= p -> 0 < q < r -> + p / r <= p / q. +Proof. + intros p q r H H1. + apply Zdiv_le_lower_bound; auto with zarith. + rewrite Zmult_comm. + pattern p at 2; rewrite (Z_div_mod_eq p r); auto with zarith. + apply Zle_trans with (r * (p / r)); auto with zarith. + apply Zmult_le_compat_r; auto with zarith. + apply Zdiv_le_lower_bound; auto with zarith. + case (Z_mod_lt p r); auto with zarith. +Qed. + +Theorem Zdiv_sgn: forall a b, + 0 <= Zsgn (a/b) * Zsgn a * Zsgn b. +Proof. + destruct a as [ |a|a]; destruct b as [ |b|b]; simpl; auto with zarith; + generalize (Z_div_pos (Zpos a) (Zpos b)); unfold Zdiv, Zdiv_eucl; + destruct Zdiv_eucl_POS as (q,r); destruct r; omega with *. +Qed. + +(** * Relations between usual operations and Zmod and Zdiv *) + +Lemma Z_mod_plus_full : forall a b c:Z, (a + b * c) mod c = a mod c. +Proof. + intros; destruct (Z_eq_dec c 0) as [Hc|Hc]. + subst; do 2 rewrite Zmod_0_r; auto. + symmetry; apply Zmod_unique_full with (a/c+b); auto with zarith. + red; generalize (Z_mod_lt a c)(Z_mod_neg a c); omega. + rewrite Zmult_plus_distr_r, Zmult_comm. + generalize (Z_div_mod_eq_full a c Hc); omega. +Qed. + +Lemma Z_div_plus_full : forall a b c:Z, c <> 0 -> (a + b * c) / c = a / c + b. +Proof. + intro; symmetry. + apply Zdiv_unique_full with (a mod c); auto with zarith. + red; generalize (Z_mod_lt a c)(Z_mod_neg a c); omega. + rewrite Zmult_plus_distr_r, Zmult_comm. + generalize (Z_div_mod_eq_full a c H); omega. +Qed. + +Theorem Z_div_plus_full_l: forall a b c : Z, b <> 0 -> (a * b + c) / b = a + c / b. +Proof. + intros a b c H; rewrite Zplus_comm; rewrite Z_div_plus_full; + try apply Zplus_comm; auto with zarith. +Qed. - assert (c * q <= - c). - replace (- c) with (c * -1). - apply Zmult_le_compat_l; omega. +(** [Zopp] and [Zdiv], [Zmod]. + Due to the choice of convention for our Euclidean division, + some of the relations about [Zopp] and divisions are rather complex. *) + +Lemma Zdiv_opp_opp : forall a b:Z, (-a)/(-b) = a/b. +Proof. + intros [|a|a] [|b|b]; try reflexivity; unfold Zdiv; simpl; + destruct (Zdiv_eucl_POS a (Zpos b)); destruct z0; try reflexivity. +Qed. + +Lemma Zmod_opp_opp : forall a b:Z, (-a) mod (-b) = - (a mod b). +Proof. + intros; destruct (Z_eq_dec b 0) as [Hb|Hb]. + subst; do 2 rewrite Zmod_0_r; auto. + intros; symmetry. + apply Zmod_unique_full with ((-a)/(-b)); auto. + generalize (Z_mod_remainder a b Hb); destruct 1; [right|left]; omega. + rewrite Zdiv_opp_opp. + pattern a at 1; rewrite (Z_div_mod_eq_full a b Hb); ring. +Qed. + +Lemma Z_mod_zero_opp_full : forall a b:Z, a mod b = 0 -> (-a) mod b = 0. +Proof. + intros; destruct (Z_eq_dec b 0) as [Hb|Hb]. + subst; rewrite Zmod_0_r; auto. + rewrite Z_div_exact_full_2 with a b; auto. + replace (- (b * (a / b))) with (0 + - (a / b) * b). + rewrite Z_mod_plus_full; auto. ring. - omega. Qed. -Lemma Z_div_plus : forall a b c:Z, c > 0 -> (a + b * c) / c = a / c + b. +Lemma Z_mod_nz_opp_full : forall a b:Z, a mod b <> 0 -> + (-a) mod b = b - (a mod b). Proof. - intros a b c cPos. - generalize (Z_div_mod_eq a c cPos). - generalize (Z_mod_lt a c cPos). - generalize (Z_div_mod_eq (a + b * c) c cPos). - generalize (Z_mod_lt (a + b * c) c cPos). intros. - apply Zmult_reg_l with c. omega. - replace (c * ((a + b * c) / c)) with (a + b * c - (a + b * c) mod c). - rewrite (Z_mod_plus a b c cPos). - pattern a at 1 in |- *; rewrite H2. - ring. - pattern (a + b * c) at 1 in |- *; rewrite H0. - ring. + assert (b<>0) by (contradict H; subst; rewrite Zmod_0_r; auto). + symmetry; apply Zmod_unique_full with (-1-a/b); auto. + generalize (Z_mod_remainder a b H0); destruct 1; [left|right]; omega. + rewrite Zmult_minus_distr_l. + pattern a at 1; rewrite (Z_div_mod_eq_full a b H0); ring. Qed. -Lemma Z_div_mult : forall a b:Z, b > 0 -> a * b / b = a. - intros; replace (a * b) with (0 + a * b); auto. - rewrite Z_div_plus; auto. +Lemma Z_mod_zero_opp_r : forall a b:Z, a mod b = 0 -> a mod (-b) = 0. +Proof. + intros. + rewrite <- (Zopp_involutive a). + rewrite Zmod_opp_opp. + rewrite Z_mod_zero_opp_full; auto. Qed. -Lemma Z_mult_div_ge : forall a b:Z, b > 0 -> b * (a / b) <= a. +Lemma Z_mod_nz_opp_r : forall a b:Z, a mod b <> 0 -> + a mod (-b) = (a mod b) - b. Proof. - intros a b bPos. - generalize (Z_div_mod_eq a _ bPos); intros. - generalize (Z_mod_lt a _ bPos); intros. - pattern a at 2 in |- *; rewrite H. - omega. + intros. + pattern a at 1; rewrite <- (Zopp_involutive a). + rewrite Zmod_opp_opp. + rewrite Z_mod_nz_opp_full; auto; omega. +Qed. + +Lemma Z_div_zero_opp_full : forall a b:Z, a mod b = 0 -> (-a)/b = -(a/b). +Proof. + intros; destruct (Z_eq_dec b 0) as [Hb|Hb]. + subst; do 2 rewrite Zdiv_0_r; auto. + symmetry; apply Zdiv_unique_full with 0; auto. + red; omega. + pattern a at 1; rewrite (Z_div_mod_eq_full a b Hb). + rewrite H; ring. Qed. -Lemma Z_mod_same : forall a:Z, a > 0 -> a mod a = 0. +Lemma Z_div_nz_opp_full : forall a b:Z, a mod b <> 0 -> + (-a)/b = -(a/b)-1. Proof. - intros a aPos. - generalize (Z_mod_plus 0 1 a aPos). - replace (0 + 1 * a) with a. intros. - rewrite H. - compute in |- *. - trivial. - ring. + assert (b<>0) by (contradict H; subst; rewrite Zmod_0_r; auto). + symmetry; apply Zdiv_unique_full with (b-a mod b); auto. + generalize (Z_mod_remainder a b H0); destruct 1; [left|right]; omega. + pattern a at 1; rewrite (Z_div_mod_eq_full a b H0); ring. +Qed. + +Lemma Z_div_zero_opp_r : forall a b:Z, a mod b = 0 -> a/(-b) = -(a/b). +Proof. + intros. + pattern a at 1; rewrite <- (Zopp_involutive a). + rewrite Zdiv_opp_opp. + rewrite Z_div_zero_opp_full; auto. +Qed. + +Lemma Z_div_nz_opp_r : forall a b:Z, a mod b <> 0 -> + a/(-b) = -(a/b)-1. +Proof. + intros. + pattern a at 1; rewrite <- (Zopp_involutive a). + rewrite Zdiv_opp_opp. + rewrite Z_div_nz_opp_full; auto; omega. +Qed. + +(** Cancellations. *) + +Lemma Zdiv_mult_cancel_r : forall a b c:Z, + c <> 0 -> (a*c)/(b*c) = a/b. +Proof. +assert (X: forall a b c, b > 0 -> c > 0 -> (a*c) / (b*c) = a / b). + intros a b c Hb Hc. + symmetry. + apply Zdiv_unique with ((a mod b)*c); auto with zarith. + destruct (Z_mod_lt a b Hb); split. + apply Zmult_le_0_compat; auto with zarith. + apply Zmult_lt_compat_r; auto with zarith. + pattern a at 1; rewrite (Z_div_mod_eq a b Hb); ring. +intros a b c Hc. +destruct (Z_dec b 0) as [Hb|Hb]. +destruct Hb as [Hb|Hb]; destruct (not_Zeq_inf _ _ Hc); auto with *. +rewrite <- (Zdiv_opp_opp a), <- (Zmult_opp_opp b), <-(Zmult_opp_opp a); + auto with *. +rewrite <- (Zdiv_opp_opp a), <- Zdiv_opp_opp, Zopp_mult_distr_l, + Zopp_mult_distr_l; auto with *. +rewrite <- Zdiv_opp_opp, Zopp_mult_distr_r, Zopp_mult_distr_r; auto with *. +rewrite Hb; simpl; do 2 rewrite Zdiv_0_r; auto. Qed. -Lemma Z_div_same : forall a:Z, a > 0 -> a / a = 1. +Lemma Zdiv_mult_cancel_l : forall a b c:Z, + c<>0 -> (c*a)/(c*b) = a/b. Proof. - intros a aPos. - generalize (Z_div_plus 0 1 a aPos). - replace (0 + 1 * a) with a. intros. - rewrite H. - compute in |- *. - trivial. + rewrite (Zmult_comm c a); rewrite (Zmult_comm c b). + apply Zdiv_mult_cancel_r; auto. +Qed. + +Lemma Zmult_mod_distr_l: forall a b c, + (c*a) mod (c*b) = c * (a mod b). +Proof. + intros; destruct (Z_eq_dec c 0) as [Hc|Hc]. + subst; simpl; rewrite Zmod_0_r; auto. + destruct (Z_eq_dec b 0) as [Hb|Hb]. + subst; repeat rewrite Zmult_0_r || rewrite Zmod_0_r; auto. + assert (c*b <> 0). + contradict Hc; eapply Zmult_integral_l; eauto. + rewrite (Zplus_minus_eq _ _ _ (Z_div_mod_eq_full (c*a) (c*b) H)). + rewrite (Zplus_minus_eq _ _ _ (Z_div_mod_eq_full a b Hb)). + rewrite Zdiv_mult_cancel_l; auto with zarith. ring. Qed. -Lemma Z_div_exact_1 : forall a b:Z, b > 0 -> a = b * (a / b) -> a mod b = 0. - intros a b Hb; generalize (Z_div_mod a b Hb); unfold Zmod, Zdiv in |- *. - case (Zdiv_eucl a b); intros q r; omega. +Lemma Zmult_mod_distr_r: forall a b c, + (a*c) mod (b*c) = (a mod b) * c. +Proof. + intros; repeat rewrite (fun x => (Zmult_comm x c)). + apply Zmult_mod_distr_l; auto. +Qed. + +(** Operations modulo. *) + +Theorem Zmod_mod: forall a n, (a mod n) mod n = a mod n. +Proof. + intros; destruct (Z_eq_dec n 0) as [Hb|Hb]. + subst; do 2 rewrite Zmod_0_r; auto. + pattern a at 2; rewrite (Z_div_mod_eq_full a n); auto with zarith. + rewrite Zplus_comm; rewrite Zmult_comm. + apply sym_equal; apply Z_mod_plus_full; auto with zarith. +Qed. + +Theorem Zmult_mod: forall a b n, + (a * b) mod n = ((a mod n) * (b mod n)) mod n. +Proof. + intros; destruct (Z_eq_dec n 0) as [Hb|Hb]. + subst; do 2 rewrite Zmod_0_r; auto. + pattern a at 1; rewrite (Z_div_mod_eq_full a n); auto with zarith. + pattern b at 1; rewrite (Z_div_mod_eq_full b n); auto with zarith. + set (A:=a mod n); set (B:=b mod n); set (A':=a/n); set (B':=b/n). + replace ((n*A' + A) * (n*B' + B)) + with (A*B + (A'*B+B'*A+n*A'*B')*n) by ring. + apply Z_mod_plus_full; auto with zarith. Qed. -Lemma Z_div_exact_2 : forall a b:Z, b > 0 -> a mod b = 0 -> a = b * (a / b). - intros a b Hb; generalize (Z_div_mod a b Hb); unfold Zmod, Zdiv in |- *. - case (Zdiv_eucl a b); intros q r; omega. +Theorem Zplus_mod: forall a b n, + (a + b) mod n = (a mod n + b mod n) mod n. +Proof. + intros; destruct (Z_eq_dec n 0) as [Hb|Hb]. + subst; do 2 rewrite Zmod_0_r; auto. + pattern a at 1; rewrite (Z_div_mod_eq_full a n); auto with zarith. + pattern b at 1; rewrite (Z_div_mod_eq_full b n); auto with zarith. + replace ((n * (a / n) + a mod n) + (n * (b / n) + b mod n)) + with ((a mod n + b mod n) + (a / n + b / n) * n) by ring. + apply Z_mod_plus_full; auto with zarith. Qed. -Lemma Z_mod_zero_opp : forall a b:Z, b > 0 -> a mod b = 0 -> - a mod b = 0. - intros a b Hb. +Theorem Zminus_mod: forall a b n, + (a - b) mod n = (a mod n - b mod n) mod n. +Proof. intros. - rewrite Z_div_exact_2 with a b; auto. - replace (- (b * (a / b))) with (0 + - (a / b) * b). - rewrite Z_mod_plus; auto. + replace (a - b) with (a + (-1) * b); auto with zarith. + replace (a mod n - b mod n) with (a mod n + (-1) * (b mod n)); auto with zarith. + rewrite Zplus_mod. + rewrite Zmult_mod. + rewrite Zplus_mod with (b:=(-1) * (b mod n)). + rewrite Zmult_mod. + rewrite Zmult_mod with (b:= b mod n). + repeat rewrite Zmod_mod; auto. +Qed. + +Lemma Zplus_mod_idemp_l: forall a b n, (a mod n + b) mod n = (a + b) mod n. +Proof. + intros; rewrite Zplus_mod, Zmod_mod, <- Zplus_mod; auto. +Qed. + +Lemma Zplus_mod_idemp_r: forall a b n, (b + a mod n) mod n = (b + a) mod n. +Proof. + intros; rewrite Zplus_mod, Zmod_mod, <- Zplus_mod; auto. +Qed. + +Lemma Zminus_mod_idemp_l: forall a b n, (a mod n - b) mod n = (a - b) mod n. +Proof. + intros; rewrite Zminus_mod, Zmod_mod, <- Zminus_mod; auto. +Qed. + +Lemma Zminus_mod_idemp_r: forall a b n, (a - b mod n) mod n = (a - b) mod n. +Proof. + intros; rewrite Zminus_mod, Zmod_mod, <- Zminus_mod; auto. +Qed. + +Lemma Zmult_mod_idemp_l: forall a b n, (a mod n * b) mod n = (a * b) mod n. +Proof. + intros; rewrite Zmult_mod, Zmod_mod, <- Zmult_mod; auto. +Qed. + +Lemma Zmult_mod_idemp_r: forall a b n, (b * (a mod n)) mod n = (b * a) mod n. +Proof. + intros; rewrite Zmult_mod, Zmod_mod, <- Zmult_mod; auto. +Qed. + +(** For a specific number n, equality modulo n is hence a nice setoid + equivalence, compatible with the usual operations. Due to restrictions + with Coq setoids, we cannot state this in a section, but it works + at least with a module. *) + +Module Type SomeNumber. + Parameter n:Z. +End SomeNumber. + +Module EqualityModulo (M:SomeNumber). + + Definition eqm a b := (a mod M.n = b mod M.n). + Infix "==" := eqm (at level 70). + + Lemma eqm_refl : forall a, a == a. + Proof. unfold eqm; auto. Qed. + + Lemma eqm_sym : forall a b, a == b -> b == a. + Proof. unfold eqm; auto. Qed. + + Lemma eqm_trans : forall a b c, a == b -> b == c -> a == c. + Proof. unfold eqm; eauto with *. Qed. + + Add Relation Z eqm + reflexivity proved by eqm_refl + symmetry proved by eqm_sym + transitivity proved by eqm_trans as eqm_setoid. + + Add Morphism Zplus : Zplus_eqm. + Proof. + unfold eqm; intros; rewrite Zplus_mod, H, H0, <- Zplus_mod; auto. + Qed. + + Add Morphism Zminus : Zminus_eqm. + Proof. + unfold eqm; intros; rewrite Zminus_mod, H, H0, <- Zminus_mod; auto. + Qed. + + Add Morphism Zmult : Zmult_eqm. + Proof. + unfold eqm; intros; rewrite Zmult_mod, H, H0, <- Zmult_mod; auto. + Qed. + + Add Morphism Zopp : Zopp_eqm. + Proof. + intros; change (-x == -y) with (0-x == 0-y). + rewrite H; red; auto. + Qed. + + Lemma Zmod_eqm : forall a, a mod M.n == a. + Proof. + unfold eqm; intros; apply Zmod_mod. + Qed. + + (* Zmod and Zdiv are not full morphisms with respect to eqm. + For instance, take n=2. Then 3 == 1 but we don't have + 1 mod 3 == 1 mod 1 nor 1/3 == 1/1. + *) + +End EqualityModulo. + +Lemma Zdiv_Zdiv : forall a b c, 0<=b -> 0<=c -> (a/b)/c = a/(b*c). +Proof. + intros a b c Hb Hc. + destruct (Zle_lt_or_eq _ _ Hb); [ | subst; rewrite Zdiv_0_r, Zdiv_0_r, Zdiv_0_l; auto]. + destruct (Zle_lt_or_eq _ _ Hc); [ | subst; rewrite Zmult_0_r, Zdiv_0_r, Zdiv_0_r; auto]. + pattern a at 2;rewrite (Z_div_mod_eq_full a b);auto with zarith. + pattern (a/b) at 2;rewrite (Z_div_mod_eq_full (a/b) c);auto with zarith. + replace (b * (c * (a / b / c) + (a / b) mod c) + a mod b) with + ((a / b / c)*(b * c) + (b * ((a / b) mod c) + a mod b)) by ring. + rewrite Z_div_plus_full_l; auto with zarith. + rewrite (Zdiv_small (b * ((a / b) mod c) + a mod b)). ring. + split. + apply Zplus_le_0_compat;auto with zarith. + apply Zmult_le_0_compat;auto with zarith. + destruct (Z_mod_lt (a/b) c);auto with zarith. + destruct (Z_mod_lt a b);auto with zarith. + apply Zle_lt_trans with (b * ((a / b) mod c) + (b-1)). + destruct (Z_mod_lt a b);auto with zarith. + apply Zle_lt_trans with (b * (c-1) + (b - 1)). + apply Zplus_le_compat;auto with zarith. + destruct (Z_mod_lt (a/b) c);auto with zarith. + replace (b * (c - 1) + (b - 1)) with (b*c-1);try ring;auto with zarith. + intro H1; + assert (H2: c <> 0) by auto with zarith; + rewrite (Zmult_integral_l _ _ H2 H1) in H; auto with zarith. +Qed. + +(** Unfortunately, the previous result isn't always true on negative numbers. + For instance: 3/(-2)/(-2) = 1 <> 0 = 3 / (-2*-2) *) + +(** A last inequality: *) + +Theorem Zdiv_mult_le: + forall a b c, 0<=a -> 0<=b -> 0<=c -> c*(a/b) <= (c*a)/b. +Proof. + intros a b c H1 H2 H3. + destruct (Zle_lt_or_eq _ _ H2); + [ | subst; rewrite Zdiv_0_r, Zdiv_0_r, Zmult_0_r; auto]. + case (Z_mod_lt a b); auto with zarith; intros Hu1 Hu2. + case (Z_mod_lt c b); auto with zarith; intros Hv1 Hv2. + apply Zmult_le_reg_r with b; auto with zarith. + rewrite <- Zmult_assoc. + replace (a / b * b) with (a - a mod b). + replace (c * a / b * b) with (c * a - (c * a) mod b). + rewrite Zmult_minus_distr_l. + unfold Zminus; apply Zplus_le_compat_l. + match goal with |- - ?X <= -?Y => assert (Y <= X); auto with zarith end. + apply Zle_trans with ((c mod b) * (a mod b)); auto with zarith. + rewrite Zmult_mod; auto with zarith. + apply (Zmod_le ((c mod b) * (a mod b)) b); auto with zarith. + apply Zmult_le_compat_r; auto with zarith. + apply (Zmod_le c b); auto. + pattern (c * a) at 1; rewrite (Z_div_mod_eq (c * a) b); try ring; + auto with zarith. + pattern a at 1; rewrite (Z_div_mod_eq a b); try ring; auto with zarith. +Qed. + +(** Zmod is related to divisibility (see more in Znumtheory) *) + +Lemma Zmod_divides : forall a b, b<>0 -> + (a mod b = 0 <-> exists c, a = b*c). +Proof. + split; intros. + exists (a/b). + pattern a at 1; rewrite (Z_div_mod_eq_full a b); auto with zarith. + destruct H0 as [c Hc]. + symmetry. + apply Zmod_unique_full with c; auto with zarith. + red; omega with *. +Qed. + +(** * Compatibility *) + +(** Weaker results kept only for compatibility *) + +Lemma Z_mod_same : forall a, a > 0 -> a mod a = 0. +Proof. + intros; apply Z_mod_same_full. +Qed. + +Lemma Z_div_same : forall a, a > 0 -> a/a = 1. +Proof. + intros; apply Z_div_same_full; auto with zarith. +Qed. + +Lemma Z_div_plus : forall a b c:Z, c > 0 -> (a + b * c) / c = a / c + b. +Proof. + intros; apply Z_div_plus_full; auto with zarith. +Qed. + +Lemma Z_div_mult : forall a b:Z, b > 0 -> (a*b)/b = a. +Proof. + intros; apply Z_div_mult_full; auto with zarith. Qed. + +Lemma Z_mod_plus : forall a b c:Z, c > 0 -> (a + b * c) mod c = a mod c. +Proof. + intros; apply Z_mod_plus_full; auto with zarith. +Qed. + +Lemma Z_div_exact_1 : forall a b:Z, b > 0 -> a = b*(a/b) -> a mod b = 0. +Proof. + intros; apply Z_div_exact_full_1; auto with zarith. +Qed. + +Lemma Z_div_exact_2 : forall a b:Z, b > 0 -> a mod b = 0 -> a = b*(a/b). +Proof. + intros; apply Z_div_exact_full_2; auto with zarith. +Qed. + +Lemma Z_mod_zero_opp : forall a b:Z, b > 0 -> a mod b = 0 -> (-a) mod b = 0. +Proof. + intros; apply Z_mod_zero_opp_full; auto with zarith. +Qed. + +(** * A direct way to compute Zmod *) + +Fixpoint Zmod_POS (a : positive) (b : Z) {struct a} : Z := + match a with + | xI a' => + let r := Zmod_POS a' b in + let r' := (2 * r + 1) in + if Zgt_bool b r' then r' else (r' - b) + | xO a' => + let r := Zmod_POS a' b in + let r' := (2 * r) in + if Zgt_bool b r' then r' else (r' - b) + | xH => if Zge_bool b 2 then 1 else 0 + end. + +Definition Zmod' a b := + match a with + | Z0 => 0 + | Zpos a' => + match b with + | Z0 => 0 + | Zpos _ => Zmod_POS a' b + | Zneg b' => + let r := Zmod_POS a' (Zpos b') in + match r with Z0 => 0 | _ => b + r end + end + | Zneg a' => + match b with + | Z0 => 0 + | Zpos _ => + let r := Zmod_POS a' b in + match r with Z0 => 0 | _ => b - r end + | Zneg b' => - (Zmod_POS a' (Zpos b')) + end + end. + + +Theorem Zmod_POS_correct: forall a b, Zmod_POS a b = (snd (Zdiv_eucl_POS a b)). +Proof. + intros a b; elim a; simpl; auto. + intros p Rec; rewrite Rec. + case (Zdiv_eucl_POS p b); intros z1 z2; simpl; auto. + match goal with |- context [Zgt_bool _ ?X] => case (Zgt_bool b X) end; auto. + intros p Rec; rewrite Rec. + case (Zdiv_eucl_POS p b); intros z1 z2; simpl; auto. + match goal with |- context [Zgt_bool _ ?X] => case (Zgt_bool b X) end; auto. + case (Zge_bool b 2); auto. +Qed. + +Theorem Zmod'_correct: forall a b, Zmod' a b = Zmod a b. +Proof. + intros a b; unfold Zmod; case a; simpl; auto. + intros p; case b; simpl; auto. + intros p1; refine (Zmod_POS_correct _ _); auto. + intros p1; rewrite Zmod_POS_correct; auto. + case (Zdiv_eucl_POS p (Zpos p1)); simpl; intros z1 z2; case z2; auto. + intros p; case b; simpl; auto. + intros p1; rewrite Zmod_POS_correct; auto. + case (Zdiv_eucl_POS p (Zpos p1)); simpl; intros z1 z2; case z2; auto. + intros p1; rewrite Zmod_POS_correct; simpl; auto. + case (Zdiv_eucl_POS p (Zpos p1)); auto. +Qed. + + +(** Another convention is possible for division by negative numbers: + * quotient is always the biggest integer smaller than or equal to a/b + * remainder is hence always positive or null. *) + +Theorem Zdiv_eucl_extended : + forall b:Z, + b <> 0 -> + forall a:Z, + {qr : Z * Z | let (q, r) := qr in a = b * q + r /\ 0 <= r < Zabs b}. +Proof. + intros b Hb a. + elim (Z_le_gt_dec 0 b); intro Hb'. + cut (b > 0); [ intro Hb'' | omega ]. + rewrite Zabs_eq; [ apply Zdiv_eucl_exist; assumption | assumption ]. + cut (- b > 0); [ intro Hb'' | omega ]. + elim (Zdiv_eucl_exist Hb'' a); intros qr. + elim qr; intros q r Hqr. + exists (- q, r). + elim Hqr; intros. + split. + rewrite <- Zmult_opp_comm; assumption. + rewrite Zabs_non_eq; [ assumption | omega ]. +Qed. + +Implicit Arguments Zdiv_eucl_extended. + +(** A third convention: Ocaml. + + See files ZOdiv_def.v and ZOdiv.v. + + Ocaml uses Round-Toward-Zero division: (-a)/b = a/(-b) = -(a/b). + Hence (-a) mod b = - (a mod b) + a mod (-b) = a mod b + And: |r| < |b| and sgn(r) = sgn(a) (notice the a here instead of b). +*) diff --git a/theories/ZArith/Zeven.v b/theories/ZArith/Zeven.v index 6fab4461..4a402c61 100644 --- a/theories/ZArith/Zeven.v +++ b/theories/ZArith/Zeven.v @@ -6,10 +6,12 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Zeven.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Zeven.v 10291 2007-11-06 02:18:53Z letouzey $ i*) Require Import BinInt. +Open Scope Z_scope. + (*******************************************************************) (** About parity: even and odd predicates on Z, division by 2 on Z *) @@ -135,14 +137,14 @@ Hint Unfold Zeven Zodd: zarith. Definition Zdiv2 (z:Z) := match z with - | Z0 => 0%Z - | Zpos xH => 0%Z + | Z0 => 0 + | Zpos xH => 0 | Zpos p => Zpos (Pdiv2 p) - | Zneg xH => 0%Z + | Zneg xH => 0 | Zneg p => Zneg (Pdiv2 p) end. -Lemma Zeven_div2 : forall n:Z, Zeven n -> n = (2 * Zdiv2 n)%Z. +Lemma Zeven_div2 : forall n:Z, Zeven n -> n = 2 * Zdiv2 n. Proof. intro x; destruct x. auto with arith. @@ -154,27 +156,27 @@ Proof. intros. absurd (Zeven (-1)); red in |- *; auto with arith. Qed. -Lemma Zodd_div2 : forall n:Z, (n >= 0)%Z -> Zodd n -> n = (2 * Zdiv2 n + 1)%Z. +Lemma Zodd_div2 : forall n:Z, n >= 0 -> Zodd n -> n = 2 * Zdiv2 n + 1. Proof. intro x; destruct x. intros. absurd (Zodd 0); red in |- *; auto with arith. destruct p; auto with arith. intros. absurd (Zodd (Zpos (xO p))); red in |- *; auto with arith. - intros. absurd (Zneg p >= 0)%Z; red in |- *; auto with arith. + intros. absurd (Zneg p >= 0); red in |- *; auto with arith. Qed. Lemma Zodd_div2_neg : - forall n:Z, (n <= 0)%Z -> Zodd n -> n = (2 * Zdiv2 n - 1)%Z. + forall n:Z, n <= 0 -> Zodd n -> n = 2 * Zdiv2 n - 1. Proof. intro x; destruct x. intros. absurd (Zodd 0); red in |- *; auto with arith. - intros. absurd (Zneg p >= 0)%Z; red in |- *; auto with arith. + intros. absurd (Zneg p >= 0); red in |- *; auto with arith. destruct p; auto with arith. intros. absurd (Zodd (Zneg (xO p))); red in |- *; auto with arith. Qed. Lemma Z_modulo_2 : - forall n:Z, {y : Z | n = (2 * y)%Z} + {y : Z | n = (2 * y + 1)%Z}. + forall n:Z, {y : Z | n = 2 * y} + {y : Z | n = 2 * y + 1}. Proof. intros x. elim (Zeven_odd_dec x); intro. @@ -193,7 +195,7 @@ Qed. Lemma Zsplit2 : forall n:Z, {p : Z * Z | - let (x1, x2) := p in n = (x1 + x2)%Z /\ (x1 = x2 \/ x2 = (x1 + 1)%Z)}. + let (x1, x2) := p in n = x1 + x2 /\ (x1 = x2 \/ x2 = x1 + 1)}. Proof. intros x. elim (Z_modulo_2 x); intros [y Hy]; rewrite Zmult_comm in Hy; @@ -206,3 +208,109 @@ Proof. right; reflexivity. Qed. + +Theorem Zeven_ex: forall n, Zeven n -> exists m, n = 2 * m. +Proof. + intro n; exists (Zdiv2 n); apply Zeven_div2; auto. +Qed. + +Theorem Zodd_ex: forall n, Zodd n -> exists m, n = 2 * m + 1. +Proof. + destruct n; intros. + inversion H. + exists (Zdiv2 (Zpos p)). + apply Zodd_div2; simpl; auto; compute; inversion 1. + exists (Zdiv2 (Zneg p) - 1). + unfold Zminus. + rewrite Zmult_plus_distr_r. + rewrite <- Zplus_assoc. + assert (Zneg p <= 0) by (compute; inversion 1). + exact (Zodd_div2_neg _ H0 H). +Qed. + +Theorem Zeven_2p: forall p, Zeven (2 * p). +Proof. + destruct p; simpl; auto. +Qed. + +Theorem Zodd_2p_plus_1: forall p, Zodd (2 * p + 1). +Proof. + destruct p; simpl; auto. + destruct p; simpl; auto. +Qed. + +Theorem Zeven_plus_Zodd: forall a b, + Zeven a -> Zodd b -> Zodd (a + b). +Proof. + intros a b H1 H2; case Zeven_ex with (1 := H1); intros x H3; try rewrite H3; auto. + case Zodd_ex with (1 := H2); intros y H4; try rewrite H4; auto. + replace (2 * x + (2 * y + 1)) with (2 * (x + y) + 1); try apply Zodd_2p_plus_1; auto with zarith. + rewrite Zmult_plus_distr_r, Zplus_assoc; auto. +Qed. + +Theorem Zeven_plus_Zeven: forall a b, + Zeven a -> Zeven b -> Zeven (a + b). +Proof. + intros a b H1 H2; case Zeven_ex with (1 := H1); intros x H3; try rewrite H3; auto. + case Zeven_ex with (1 := H2); intros y H4; try rewrite H4; auto. + replace (2 * x + 2 * y) with (2 * (x + y)); try apply Zeven_2p; auto with zarith. + apply Zmult_plus_distr_r; auto. +Qed. + +Theorem Zodd_plus_Zeven: forall a b, + Zodd a -> Zeven b -> Zodd (a + b). +Proof. + intros a b H1 H2; rewrite Zplus_comm; apply Zeven_plus_Zodd; auto. +Qed. + +Theorem Zodd_plus_Zodd: forall a b, + Zodd a -> Zodd b -> Zeven (a + b). +Proof. + intros a b H1 H2; case Zodd_ex with (1 := H1); intros x H3; try rewrite H3; auto. + case Zodd_ex with (1 := H2); intros y H4; try rewrite H4; auto. + replace ((2 * x + 1) + (2 * y + 1)) with (2 * (x + y + 1)); try apply Zeven_2p; auto. + (* ring part *) + do 2 rewrite Zmult_plus_distr_r; auto. + repeat rewrite <- Zplus_assoc; f_equal. + rewrite (Zplus_comm 1). + repeat rewrite <- Zplus_assoc; auto. +Qed. + +Theorem Zeven_mult_Zeven_l: forall a b, + Zeven a -> Zeven (a * b). +Proof. + intros a b H1; case Zeven_ex with (1 := H1); intros x H3; try rewrite H3; auto. + replace (2 * x * b) with (2 * (x * b)); try apply Zeven_2p; auto with zarith. + (* ring part *) + apply Zmult_assoc. +Qed. + +Theorem Zeven_mult_Zeven_r: forall a b, + Zeven b -> Zeven (a * b). +Proof. + intros a b H1; case Zeven_ex with (1 := H1); intros x H3; try rewrite H3; auto. + replace (a * (2 * x)) with (2 * (x * a)); try apply Zeven_2p; auto. + (* ring part *) + rewrite (Zmult_comm x a). + do 2 rewrite Zmult_assoc. + rewrite (Zmult_comm 2 a); auto. +Qed. + +Hint Rewrite Zmult_plus_distr_r Zmult_plus_distr_l + Zplus_assoc Zmult_1_r Zmult_1_l : Zexpand. + +Theorem Zodd_mult_Zodd: forall a b, + Zodd a -> Zodd b -> Zodd (a * b). +Proof. + intros a b H1 H2; case Zodd_ex with (1 := H1); intros x H3; try rewrite H3; auto. + case Zodd_ex with (1 := H2); intros y H4; try rewrite H4; auto. + replace ((2 * x + 1) * (2 * y + 1)) with (2 * (2 * x * y + x + y) + 1); try apply Zodd_2p_plus_1; auto. + (* ring part *) + autorewrite with Zexpand; f_equal. + repeat rewrite <- Zplus_assoc; f_equal. + repeat rewrite <- Zmult_assoc; f_equal. + repeat rewrite Zmult_assoc; f_equal; apply Zmult_comm. +Qed. + +(* for compatibility *) +Close Scope Z_scope. diff --git a/theories/ZArith/Zgcd_alt.v b/theories/ZArith/Zgcd_alt.v new file mode 100644 index 00000000..286dd710 --- /dev/null +++ b/theories/ZArith/Zgcd_alt.v @@ -0,0 +1,317 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Z -> Z := fun a b => + match n with + | O => 1 (* arbitrary, since n should be big enough *) + | S n => match a with + | Z0 => Zabs b + | Zpos _ => Zgcdn n (Zmod b a) a + | Zneg a => Zgcdn n (Zmod b (Zpos a)) (Zpos a) + end + end. + + Definition Zgcd_bound (a:Z) := + match a with + | Z0 => S O + | Zpos p => let n := Psize p in (n+n)%nat + | Zneg p => let n := Psize p in (n+n)%nat + end. + + Definition Zgcd_alt a b := Zgcdn (Zgcd_bound a) a b. + + (** A first obvious fact : [Zgcd a b] is positive. *) + + Lemma Zgcdn_pos : forall n a b, + 0 <= Zgcdn n a b. + Proof. + induction n. + simpl; auto with zarith. + destruct a; simpl; intros; auto with zarith; auto. + Qed. + + Lemma Zgcd_alt_pos : forall a b, 0 <= Zgcd_alt a b. + Proof. + intros; unfold Zgcd; apply Zgcdn_pos; auto. + Qed. + + (** We now prove that Zgcd is indeed a gcd. *) + + (** 1) We prove a weaker & easier bound. *) + + Lemma Zgcdn_linear_bound : forall n a b, + Zabs a < Z_of_nat n -> Zis_gcd a b (Zgcdn n a b). + Proof. + induction n. + simpl; intros. + elimtype False; generalize (Zabs_pos a); omega. + destruct a; intros; simpl; + [ generalize (Zis_gcd_0_abs b); intuition | | ]; + unfold Zmod; + generalize (Z_div_mod b (Zpos p) (refl_equal Gt)); + destruct (Zdiv_eucl b (Zpos p)) as (q,r); + intros (H0,H1); + rewrite inj_S in H; simpl Zabs in H; + (assert (H2: Zabs r < Z_of_nat n) by + (rewrite Zabs_eq; auto with zarith)); + assert (IH:=IHn r (Zpos p) H2); clear IHn; + simpl in IH |- *; + rewrite H0. + apply Zis_gcd_for_euclid2; auto. + apply Zis_gcd_minus; apply Zis_gcd_sym. + apply Zis_gcd_for_euclid2; auto. + Qed. + + (** 2) For Euclid's algorithm, the worst-case situation corresponds + to Fibonacci numbers. Let's define them: *) + + Fixpoint fibonacci (n:nat) : Z := + match n with + | O => 1 + | S O => 1 + | S (S n as p) => fibonacci p + fibonacci n + end. + + Lemma fibonacci_pos : forall n, 0 <= fibonacci n. + Proof. + cut (forall N n, (n 0<=fibonacci n). + eauto. + induction N. + inversion 1. + intros. + destruct n. + simpl; auto with zarith. + destruct n. + simpl; auto with zarith. + change (0 <= fibonacci (S n) + fibonacci n). + generalize (IHN n) (IHN (S n)); omega. + Qed. + + Lemma fibonacci_incr : + forall n m, (n<=m)%nat -> fibonacci n <= fibonacci m. + Proof. + induction 1. + auto with zarith. + apply Zle_trans with (fibonacci m); auto. + clear. + destruct m. + simpl; auto with zarith. + change (fibonacci (S m) <= fibonacci (S m)+fibonacci m). + generalize (fibonacci_pos m); omega. + Qed. + + (** 3) We prove that fibonacci numbers are indeed worst-case: + for a given number [n], if we reach a conclusion about [gcd(a,b)] in + exactly [n+1] loops, then [fibonacci (n+1)<=a /\ fibonacci(n+2)<=b] *) + + Lemma Zgcdn_worst_is_fibonacci : forall n a b, + 0 < a < b -> + Zis_gcd a b (Zgcdn (S n) a b) -> + Zgcdn n a b <> Zgcdn (S n) a b -> + fibonacci (S n) <= a /\ + fibonacci (S (S n)) <= b. + Proof. + induction n. + simpl; intros. + destruct a; omega. + intros. + destruct a; [simpl in *; omega| | destruct H; discriminate]. + revert H1; revert H0. + set (m:=S n) in *; (assert (m=S n) by auto); clearbody m. + pattern m at 2; rewrite H0. + simpl Zgcdn. + unfold Zmod; generalize (Z_div_mod b (Zpos p) (refl_equal Gt)). + destruct (Zdiv_eucl b (Zpos p)) as (q,r). + intros (H1,H2). + destruct H2. + destruct (Zle_lt_or_eq _ _ H2). + generalize (IHn _ _ (conj H4 H3)). + intros H5 H6 H7. + replace (fibonacci (S (S m))) with (fibonacci (S m) + fibonacci m) by auto. + assert (r = Zpos p * (-q) + b) by (rewrite H1; ring). + destruct H5; auto. + pattern r at 1; rewrite H8. + apply Zis_gcd_sym. + apply Zis_gcd_for_euclid2; auto. + apply Zis_gcd_sym; auto. + split; auto. + rewrite H1. + apply Zplus_le_compat; auto. + apply Zle_trans with (Zpos p * 1); auto. + ring_simplify (Zpos p * 1); auto. + apply Zmult_le_compat_l. + destruct q. + omega. + assert (0 < Zpos p0) by (compute; auto). + omega. + assert (Zpos p * Zneg p0 < 0) by (compute; auto). + omega. + compute; intros; discriminate. + (* r=0 *) + subst r. + simpl; rewrite H0. + intros. + simpl in H4. + simpl in H5. + destruct n. + simpl in H5. + simpl. + omega. + simpl in H5. + elim H5; auto. + Qed. + + (** 3b) We reformulate the previous result in a more positive way. *) + + Lemma Zgcdn_ok_before_fibonacci : forall n a b, + 0 < a < b -> a < fibonacci (S n) -> + Zis_gcd a b (Zgcdn n a b). + Proof. + destruct a; [ destruct 1; elimtype False; omega | | destruct 1; discriminate]. + cut (forall k n b, + k = (S (nat_of_P p) - n)%nat -> + 0 < Zpos p < b -> Zpos p < fibonacci (S n) -> + Zis_gcd (Zpos p) b (Zgcdn n (Zpos p) b)). + destruct 2; eauto. + clear n; induction k. + intros. + assert (nat_of_P p < n)%nat by omega. + apply Zgcdn_linear_bound. + simpl. + generalize (inj_le _ _ H2). + rewrite inj_S. + rewrite <- Zpos_eq_Z_of_nat_o_nat_of_P; auto. + omega. + intros. + generalize (Zgcdn_worst_is_fibonacci n (Zpos p) b H0); intros. + assert (Zis_gcd (Zpos p) b (Zgcdn (S n) (Zpos p) b)). + apply IHk; auto. + omega. + replace (fibonacci (S (S n))) with (fibonacci (S n)+fibonacci n) by auto. + generalize (fibonacci_pos n); omega. + replace (Zgcdn n (Zpos p) b) with (Zgcdn (S n) (Zpos p) b); auto. + generalize (H2 H3); clear H2 H3; omega. + Qed. + + (** 4) The proposed bound leads to a fibonacci number that is big enough. *) + + Lemma Zgcd_bound_fibonacci : + forall a, 0 < a -> a < fibonacci (Zgcd_bound a). + Proof. + destruct a; [omega| | intro H; discriminate]. + intros _. + induction p; [ | | compute; auto ]; + simpl Zgcd_bound in *; + rewrite plus_comm; simpl plus; + set (n:= (Psize p+Psize p)%nat) in *; simpl; + assert (n <> O) by (unfold n; destruct p; simpl; auto). + + destruct n as [ |m]; [elim H; auto| ]. + generalize (fibonacci_pos m); rewrite Zpos_xI; omega. + + destruct n as [ |m]; [elim H; auto| ]. + generalize (fibonacci_pos m); rewrite Zpos_xO; omega. + Qed. + + (* 5) the end: we glue everything together and take care of + situations not corresponding to [0 + Zis_gcd a b (Zgcdn n a b). + Proof. + destruct a; intros. + simpl in H. + destruct n; [elimtype False; omega | ]. + simpl; generalize (Zis_gcd_0_abs b); intuition. + (*Zpos*) + generalize (Zgcd_bound_fibonacci (Zpos p)). + simpl Zgcd_bound in *. + remember (Psize p+Psize p)%nat as m. + assert (1 < m)%nat. + rewrite Heqm; destruct p; simpl; rewrite 1? plus_comm; + auto with arith. + destruct m as [ |m]; [inversion H0; auto| ]. + destruct n as [ |n]; [inversion H; auto| ]. + simpl Zgcdn. + unfold Zmod. + generalize (Z_div_mod b (Zpos p) (refl_equal Gt)). + destruct (Zdiv_eucl b (Zpos p)) as (q,r). + intros (H2,H3) H4. + rewrite H2. + apply Zis_gcd_for_euclid2. + destruct H3. + destruct (Zle_lt_or_eq _ _ H1). + apply Zgcdn_ok_before_fibonacci; auto. + apply Zlt_le_trans with (fibonacci (S m)); [ omega | apply fibonacci_incr; auto]. + subst r; simpl. + destruct m as [ |m]; [elimtype False; omega| ]. + destruct n as [ |n]; [elimtype False; omega| ]. + simpl; apply Zis_gcd_sym; apply Zis_gcd_0. + (*Zneg*) + generalize (Zgcd_bound_fibonacci (Zpos p)). + simpl Zgcd_bound in *. + remember (Psize p+Psize p)%nat as m. + assert (1 < m)%nat. + rewrite Heqm; destruct p; simpl; rewrite 1? plus_comm; + auto with arith. + destruct m as [ |m]; [inversion H0; auto| ]. + destruct n as [ |n]; [inversion H; auto| ]. + simpl Zgcdn. + unfold Zmod. + generalize (Z_div_mod b (Zpos p) (refl_equal Gt)). + destruct (Zdiv_eucl b (Zpos p)) as (q,r). + intros (H1,H2) H3. + rewrite H1. + apply Zis_gcd_minus. + apply Zis_gcd_sym. + apply Zis_gcd_for_euclid2. + destruct H2. + destruct (Zle_lt_or_eq _ _ H2). + apply Zgcdn_ok_before_fibonacci; auto. + apply Zlt_le_trans with (fibonacci (S m)); [ omega | apply fibonacci_incr; auto]. + subst r; simpl. + destruct m as [ |m]; [elimtype False; omega| ]. + destruct n as [ |n]; [elimtype False; omega| ]. + simpl; apply Zis_gcd_sym; apply Zis_gcd_0. + Qed. + + Lemma Zgcd_is_gcd : + forall a b, Zis_gcd a b (Zgcd_alt a b). + Proof. + unfold Zgcd_alt; intros; apply Zgcdn_is_gcd; auto. + Qed. + + diff --git a/theories/ZArith/Zmax.v b/theories/ZArith/Zmax.v index 8af9b891..0d6fc94a 100644 --- a/theories/ZArith/Zmax.v +++ b/theories/ZArith/Zmax.v @@ -5,7 +5,7 @@ (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Zmax.v 9302 2006-10-27 21:21:17Z barras $ i*) +(*i $Id: Zmax.v 10291 2007-11-06 02:18:53Z letouzey $ i*) Require Import Arith_base. Require Import BinInt. @@ -38,6 +38,28 @@ Proof. destruct (n ?= m); (apply H1|| apply H2); discriminate. Qed. +Lemma Zmax_spec : forall x y:Z, + x >= y /\ Zmax x y = x \/ + x < y /\ Zmax x y = y. +Proof. + intros; unfold Zmax, Zlt, Zge. + destruct (Zcompare x y); [ left | right | left ]; split; auto; discriminate. +Qed. + +Lemma Zmax_left : forall n m:Z, n>=m -> Zmax n m = n. +Proof. + intros n m; unfold Zmax, Zge; destruct (n ?= m); auto. + intro H; elim H; auto. +Qed. + +Lemma Zmax_right : forall n m:Z, n<=m -> Zmax n m = m. +Proof. + intros n m; unfold Zmax, Zle. + generalize (Zcompare_Eq_eq n m). + destruct (n ?= m); auto. + intros _ H; elim H; auto. +Qed. + (** * Least upper bound properties of max *) Lemma Zle_max_l : forall n m:Z, n <= Zmax n m. @@ -106,3 +128,39 @@ Proof. rewrite (Zcompare_plus_compat x y n). case (x ?= y); apply Zplus_comm. Qed. + +(** * Maximum and Zpos *) + +Lemma Zpos_max : forall p q, Zpos (Pmax p q) = Zmax (Zpos p) (Zpos q). +Proof. + intros; unfold Zmax, Pmax; simpl; generalize (Pcompare_Eq_eq p q). + destruct Pcompare; auto. + intro H; rewrite H; auto. +Qed. + +Lemma Zpos_max_1 : forall p, Zmax 1 (Zpos p) = Zpos p. +Proof. + intros; unfold Zmax; simpl; destruct p; simpl; auto. +Qed. + +(** * Characterization of Pminus in term of Zminus and Zmax *) + +Lemma Zpos_minus : forall p q, Zpos (Pminus p q) = Zmax 1 (Zpos p - Zpos q). +Proof. + intros. + case_eq (Pcompare p q Eq). + intros H; rewrite (Pcompare_Eq_eq _ _ H). + rewrite Zminus_diag. + unfold Zmax; simpl. + unfold Pminus; rewrite Pminus_mask_diag; auto. + intros; rewrite Pminus_Lt; auto. + destruct (Zmax_spec 1 (Zpos p - Zpos q)) as [(H1,H2)|(H1,H2)]; auto. + elimtype False; clear H2. + assert (H1':=Zlt_trans 0 1 _ Zlt_0_1 H1). + generalize (Zlt_0_minus_lt _ _ H1'). + unfold Zlt; simpl. + rewrite (ZC2 _ _ H); intro; discriminate. + intros; simpl; rewrite H. + symmetry; apply Zpos_max_1. +Qed. + diff --git a/theories/ZArith/Zmin.v b/theories/ZArith/Zmin.v index 37d78a74..bad40a32 100644 --- a/theories/ZArith/Zmin.v +++ b/theories/ZArith/Zmin.v @@ -5,9 +5,9 @@ (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Zmin.v 9302 2006-10-27 21:21:17Z barras $ i*) +(*i $Id: Zmin.v 10028 2007-07-18 22:38:06Z letouzey $ i*) -(** Initial version from Pierre Crégut (CNET, Lannion, France), 1996. +(** Initial version from Pierre Crégut (CNET, Lannion, France), 1996. Further extensions by the Coq development team, with suggestions from Russell O'Connor (Radbout U., Nijmegen, The Netherlands). *) @@ -43,6 +43,14 @@ Proof. intros n m P H1 H2; unfold Zmin in |- *; case (n ?= m); auto with arith. Qed. +Lemma Zmin_spec : forall x y:Z, + x <= y /\ Zmin x y = x \/ + x > y /\ Zmin x y = y. +Proof. + intros; unfold Zmin, Zle, Zgt. + destruct (Zcompare x y); [ left | left | right ]; split; auto; discriminate. +Qed. + (** * Greatest lower bound properties of min *) Lemma Zle_min_l : forall n m:Z, Zmin n m <= n. @@ -128,3 +136,11 @@ Proof. Qed. Notation Zmin_plus := Zplus_min_distr_r (only parsing). + +(** * Minimum and Zpos *) + +Lemma Zpos_min : forall p q, Zpos (Pmin p q) = Zmin (Zpos p) (Zpos q). +Proof. + intros; unfold Zmin, Pmin; simpl; destruct Pcompare; auto. +Qed. + diff --git a/theories/ZArith/Zmisc.v b/theories/ZArith/Zmisc.v index d01cada6..0634096e 100644 --- a/theories/ZArith/Zmisc.v +++ b/theories/ZArith/Zmisc.v @@ -6,8 +6,9 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Zmisc.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Zmisc.v 11072 2008-06-08 16:13:37Z herbelin $ i*) +Require Import Wf_nat. Require Import BinInt. Require Import Zcompare. Require Import Zorder. @@ -18,37 +19,23 @@ Open Local Scope Z_scope. (** Iterators *) (** [n]th iteration of the function [f] *) -Fixpoint iter_nat (n:nat) (A:Set) (f:A -> A) (x:A) {struct n} : A := - match n with - | O => x - | S n' => f (iter_nat n' A f x) - end. -Fixpoint iter_pos (n:positive) (A:Set) (f:A -> A) (x:A) {struct n} : A := +Fixpoint iter_pos (n:positive) (A:Type) (f:A -> A) (x:A) {struct n} : A := match n with | xH => f x | xO n' => iter_pos n' A f (iter_pos n' A f x) | xI n' => f (iter_pos n' A f (iter_pos n' A f x)) end. -Definition iter (n:Z) (A:Set) (f:A -> A) (x:A) := +Definition iter (n:Z) (A:Type) (f:A -> A) (x:A) := match n with | Z0 => x | Zpos p => iter_pos p A f x | Zneg p => x end. -Theorem iter_nat_plus : - forall (n m:nat) (A:Set) (f:A -> A) (x:A), - iter_nat (n + m) A f x = iter_nat n A f (iter_nat m A f x). -Proof. - simple induction n; - [ simpl in |- *; auto with arith - | intros; simpl in |- *; apply f_equal with (f := f); apply H ]. -Qed. - Theorem iter_nat_of_P : - forall (p:positive) (A:Set) (f:A -> A) (x:A), + forall (p:positive) (A:Type) (f:A -> A) (x:A), iter_pos p A f x = iter_nat (nat_of_P p) A f x. Proof. intro n; induction n as [p H| p H| ]; @@ -63,7 +50,7 @@ Proof. Qed. Theorem iter_pos_plus : - forall (p q:positive) (A:Set) (f:A -> A) (x:A), + forall (p q:positive) (A:Type) (f:A -> A) (x:A), iter_pos (p + q) A f x = iter_pos p A f (iter_pos q A f x). Proof. intros n m; intros. @@ -78,7 +65,7 @@ Qed. then the iterates of [f] also preserve it. *) Theorem iter_nat_invariant : - forall (n:nat) (A:Set) (f:A -> A) (Inv:A -> Prop), + forall (n:nat) (A:Type) (f:A -> A) (Inv:A -> Prop), (forall x:A, Inv x -> Inv (f x)) -> forall x:A, Inv x -> Inv (iter_nat n A f x). Proof. @@ -89,7 +76,7 @@ Proof. Qed. Theorem iter_pos_invariant : - forall (p:positive) (A:Set) (f:A -> A) (Inv:A -> Prop), + forall (p:positive) (A:Type) (f:A -> A) (Inv:A -> Prop), (forall x:A, Inv x -> Inv (f x)) -> forall x:A, Inv x -> Inv (iter_pos p A f x). Proof. diff --git a/theories/ZArith/Znat.v b/theories/ZArith/Znat.v index f0a3d47b..c5b5edc1 100644 --- a/theories/ZArith/Znat.v +++ b/theories/ZArith/Znat.v @@ -6,9 +6,9 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Znat.v 9302 2006-10-27 21:21:17Z barras $ i*) +(*i $Id: Znat.v 10726 2008-03-28 18:15:23Z notin $ i*) -(** Binary Integers (Pierre Crégut, CNET, Lannion, France) *) +(** Binary Integers (Pierre Crégut, CNET, Lannion, France) *) Require Export Arith_base. Require Import BinPos. @@ -17,6 +17,7 @@ Require Import Zcompare. Require Import Zorder. Require Import Decidable. Require Import Peano_dec. +Require Import Min Max Zmin Zmax. Require Export Compare_dec. Open Local Scope Z_scope. @@ -26,6 +27,13 @@ Definition neq (x y:nat) := x <> y. (************************************************) (** Properties of the injection from nat into Z *) +(** Injection and successor *) + +Theorem inj_0 : Z_of_nat 0 = 0%Z. +Proof. + reflexivity. +Qed. + Theorem inj_S : forall n:nat, Z_of_nat (S n) = Zsucc (Z_of_nat n). Proof. intro y; induction y as [| n H]; @@ -33,25 +41,12 @@ Proof. | change (Zpos (Psucc (P_of_succ_nat n)) = Zsucc (Z_of_nat (S n))) in |- *; rewrite Zpos_succ_morphism; trivial with arith ]. Qed. - -Theorem inj_plus : forall n m:nat, Z_of_nat (n + m) = Z_of_nat n + Z_of_nat m. -Proof. - intro x; induction x as [| n H]; intro y; destruct y as [| m]; - [ simpl in |- *; trivial with arith - | simpl in |- *; trivial with arith - | simpl in |- *; rewrite <- plus_n_O; trivial with arith - | change (Z_of_nat (S (n + S m)) = Z_of_nat (S n) + Z_of_nat (S m)) in |- *; - rewrite inj_S; rewrite H; do 2 rewrite inj_S; rewrite Zplus_succ_l; - trivial with arith ]. -Qed. -Theorem inj_mult : forall n m:nat, Z_of_nat (n * m) = Z_of_nat n * Z_of_nat m. +(** Injection and equality. *) + +Theorem inj_eq : forall n m:nat, n = m -> Z_of_nat n = Z_of_nat m. Proof. - intro x; induction x as [| n H]; - [ simpl in |- *; trivial with arith - | intro y; rewrite inj_S; rewrite <- Zmult_succ_l_reverse; rewrite <- H; - rewrite <- inj_plus; simpl in |- *; rewrite plus_comm; - trivial with arith ]. + intros x y H; rewrite H; trivial with arith. Qed. Theorem inj_neq : forall n m:nat, neq n m -> Zne (Z_of_nat n) (Z_of_nat m). @@ -66,6 +61,24 @@ Proof. intros E; rewrite E; auto with arith ]. Qed. +Theorem inj_eq_rev : forall n m:nat, Z_of_nat n = Z_of_nat m -> n = m. +Proof. + intros x y H. + destruct (eq_nat_dec x y) as [H'|H']; auto. + elimtype False. + exact (inj_neq _ _ H' H). +Qed. + +Theorem inj_eq_iff : forall n m:nat, n=m <-> Z_of_nat n = Z_of_nat m. +Proof. + split; [apply inj_eq | apply inj_eq_rev]. +Qed. + + +(** Injection and order relations: *) + +(** One way ... *) + Theorem inj_le : forall n m:nat, (n <= m)%nat -> Z_of_nat n <= Z_of_nat m. Proof. intros x y; intros H; elim H; @@ -81,29 +94,100 @@ Proof. exact H. Qed. +Theorem inj_ge : forall n m:nat, (n >= m)%nat -> Z_of_nat n >= Z_of_nat m. +Proof. + intros x y H; apply Zle_ge; apply inj_le; apply H. +Qed. + Theorem inj_gt : forall n m:nat, (n > m)%nat -> Z_of_nat n > Z_of_nat m. Proof. intros x y H; apply Zlt_gt; apply inj_lt; exact H. Qed. -Theorem inj_ge : forall n m:nat, (n >= m)%nat -> Z_of_nat n >= Z_of_nat m. +(** The other way ... *) + +Theorem inj_le_rev : forall n m:nat, Z_of_nat n <= Z_of_nat m -> (n <= m)%nat. Proof. - intros x y H; apply Zle_ge; apply inj_le; apply H. + intros x y H. + destruct (le_lt_dec x y) as [H0|H0]; auto. + elimtype False. + assert (H1:=inj_lt _ _ H0). + red in H; red in H1. + rewrite <- Zcompare_antisym in H; rewrite H1 in H; auto. Qed. -Theorem inj_eq : forall n m:nat, n = m -> Z_of_nat n = Z_of_nat m. +Theorem inj_lt_rev : forall n m:nat, Z_of_nat n < Z_of_nat m -> (n < m)%nat. Proof. - intros x y H; rewrite H; trivial with arith. + intros x y H. + destruct (le_lt_dec y x) as [H0|H0]; auto. + elimtype False. + assert (H1:=inj_le _ _ H0). + red in H; red in H1. + rewrite <- Zcompare_antisym in H1; rewrite H in H1; auto. Qed. -Theorem intro_Z : - forall n:nat, exists y : Z, Z_of_nat n = y /\ 0 <= y * 1 + 0. +Theorem inj_ge_rev : forall n m:nat, Z_of_nat n >= Z_of_nat m -> (n >= m)%nat. Proof. - intros x; exists (Z_of_nat x); split; - [ trivial with arith - | rewrite Zmult_comm; rewrite Zmult_1_l; rewrite Zplus_0_r; - unfold Zle in |- *; elim x; intros; simpl in |- *; - discriminate ]. + intros x y H. + destruct (le_lt_dec y x) as [H0|H0]; auto. + elimtype False. + assert (H1:=inj_gt _ _ H0). + red in H; red in H1. + rewrite <- Zcompare_antisym in H; rewrite H1 in H; auto. +Qed. + +Theorem inj_gt_rev : forall n m:nat, Z_of_nat n > Z_of_nat m -> (n > m)%nat. +Proof. + intros x y H. + destruct (le_lt_dec x y) as [H0|H0]; auto. + elimtype False. + assert (H1:=inj_ge _ _ H0). + red in H; red in H1. + rewrite <- Zcompare_antisym in H1; rewrite H in H1; auto. +Qed. + +(* Both ways ... *) + +Theorem inj_le_iff : forall n m:nat, (n<=m)%nat <-> Z_of_nat n <= Z_of_nat m. +Proof. + split; [apply inj_le | apply inj_le_rev]. +Qed. + +Theorem inj_lt_iff : forall n m:nat, (n Z_of_nat n < Z_of_nat m. +Proof. + split; [apply inj_lt | apply inj_lt_rev]. +Qed. + +Theorem inj_ge_iff : forall n m:nat, (n>=m)%nat <-> Z_of_nat n >= Z_of_nat m. +Proof. + split; [apply inj_ge | apply inj_ge_rev]. +Qed. + +Theorem inj_gt_iff : forall n m:nat, (n>m)%nat <-> Z_of_nat n > Z_of_nat m. +Proof. + split; [apply inj_gt | apply inj_gt_rev]. +Qed. + +(** Injection and usual operations *) + +Theorem inj_plus : forall n m:nat, Z_of_nat (n + m) = Z_of_nat n + Z_of_nat m. +Proof. + intro x; induction x as [| n H]; intro y; destruct y as [| m]; + [ simpl in |- *; trivial with arith + | simpl in |- *; trivial with arith + | simpl in |- *; rewrite <- plus_n_O; trivial with arith + | change (Z_of_nat (S (n + S m)) = Z_of_nat (S n) + Z_of_nat (S m)) in |- *; + rewrite inj_S; rewrite H; do 2 rewrite inj_S; rewrite Zplus_succ_l; + trivial with arith ]. +Qed. + +Theorem inj_mult : forall n m:nat, Z_of_nat (n * m) = Z_of_nat n * Z_of_nat m. +Proof. + intro x; induction x as [| n H]; + [ simpl in |- *; trivial with arith + | intro y; rewrite inj_S; rewrite <- Zmult_succ_l_reverse; rewrite <- H; + rewrite <- inj_plus; simpl in |- *; rewrite plus_comm; + trivial with arith ]. Qed. Theorem inj_minus1 : @@ -121,6 +205,46 @@ Proof. [ trivial with arith | apply gt_not_le; assumption ]. Qed. +Theorem inj_minus : forall n m:nat, + Z_of_nat (minus n m) = Zmax 0 (Z_of_nat n - Z_of_nat m). +Proof. + intros. + rewrite Zmax_comm. + unfold Zmax. + destruct (le_lt_dec m n) as [H|H]. + + rewrite (inj_minus1 _ _ H). + assert (H':=Zle_minus_le_0 _ _ (inj_le _ _ H)). + unfold Zle in H'. + rewrite <- Zcompare_antisym in H'. + destruct Zcompare; simpl in *; intuition. + + rewrite (inj_minus2 _ _ H). + assert (H':=Zplus_lt_compat_r _ _ (- Z_of_nat m) (inj_lt _ _ H)). + rewrite Zplus_opp_r in H'. + unfold Zminus; rewrite H'; auto. +Qed. + +Theorem inj_min : forall n m:nat, + Z_of_nat (min n m) = Zmin (Z_of_nat n) (Z_of_nat m). +Proof. + induction n; destruct m; try (compute; auto; fail). + simpl min. + do 3 rewrite inj_S. + rewrite <- Zsucc_min_distr; f_equal; auto. +Qed. + +Theorem inj_max : forall n m:nat, + Z_of_nat (max n m) = Zmax (Z_of_nat n) (Z_of_nat m). +Proof. + induction n; destruct m; try (compute; auto; fail). + simpl max. + do 3 rewrite inj_S. + rewrite <- Zsucc_max_distr; f_equal; auto. +Qed. + +(** Composition of injections **) + Theorem Zpos_eq_Z_of_nat_o_nat_of_P : forall p:positive, Zpos p = Z_of_nat (nat_of_P p). Proof. @@ -136,3 +260,26 @@ Proof. rewrite inj_plus; repeat rewrite <- H. rewrite Zpos_xO; simpl in |- *; rewrite Pplus_diag; reflexivity. Qed. + +(** Misc *) + +Theorem intro_Z : + forall n:nat, exists y : Z, Z_of_nat n = y /\ 0 <= y * 1 + 0. +Proof. + intros x; exists (Z_of_nat x); split; + [ trivial with arith + | rewrite Zmult_comm; rewrite Zmult_1_l; rewrite Zplus_0_r; + unfold Zle in |- *; elim x; intros; simpl in |- *; + discriminate ]. +Qed. + +Lemma Zpos_P_of_succ_nat : forall n:nat, + Zpos (P_of_succ_nat n) = Zsucc (Z_of_nat n). +Proof. + intros. + unfold Z_of_nat. + destruct n. + simpl; auto. + simpl (P_of_succ_nat (S n)). + apply Zpos_succ_morphism. +Qed. diff --git a/theories/ZArith/Znumtheory.v b/theories/ZArith/Znumtheory.v index d89ec052..e77475e0 100644 --- a/theories/ZArith/Znumtheory.v +++ b/theories/ZArith/Znumtheory.v @@ -6,13 +6,12 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Znumtheory.v 9245 2006-10-17 12:53:34Z notin $ i*) +(*i $Id: Znumtheory.v 10295 2007-11-06 22:46:21Z letouzey $ i*) Require Import ZArith_base. Require Import ZArithRing. Require Import Zcomplements. Require Import Zdiv. -Require Import Ndigits. Require Import Wf_nat. Open Local Scope Z_scope. @@ -156,21 +155,27 @@ Qed. Lemma Zdivide_antisym : forall a b:Z, (a | b) -> (b | a) -> a = b \/ a = - b. Proof. -simple induction 1; intros. -inversion H1. -rewrite H0 in H2; clear H H1. -case (Z_zerop a); intro. -left; rewrite H0; rewrite e; ring. -assert (Hqq0 : q0 * q = 1). -apply Zmult_reg_l with a. -assumption. -ring_simplify. -pattern a at 2 in |- *; rewrite H2; ring. -assert (q | 1). -rewrite <- Hqq0; auto with zarith. -elim (Zdivide_1 q H); intros. -rewrite H1 in H0; left; omega. -rewrite H1 in H0; right; omega. + simple induction 1; intros. + inversion H1. + rewrite H0 in H2; clear H H1. + case (Z_zerop a); intro. + left; rewrite H0; rewrite e; ring. + assert (Hqq0 : q0 * q = 1). + apply Zmult_reg_l with a. + assumption. + ring_simplify. + pattern a at 2 in |- *; rewrite H2; ring. + assert (q | 1). + rewrite <- Hqq0; auto with zarith. + elim (Zdivide_1 q H); intros. + rewrite H1 in H0; left; omega. + rewrite H1 in H0; right; omega. +Qed. + +Theorem Zdivide_trans: forall a b c, (a | b) -> (b | c) -> (a | c). +Proof. + intros a b c [d H1] [e H2]; exists (d * e); auto with zarith. + rewrite H2; rewrite H1; ring. Qed. (** If [a] divides [b] and [b<>0] then [|a| <= |b|]. *) @@ -194,6 +199,134 @@ Proof. subst q; omega. Qed. +(** [Zdivide] can be expressed using [Zmod]. *) + +Lemma Zmod_divide : forall a b:Z, b > 0 -> a mod b = 0 -> (b | a). +Proof. + intros a b H H0. + apply Zdivide_intro with (a / b). + pattern a at 1 in |- *; rewrite (Z_div_mod_eq a b H). + rewrite H0; ring. +Qed. + +Lemma Zdivide_mod : forall a b:Z, b > 0 -> (b | a) -> a mod b = 0. +Proof. + intros a b; simple destruct 2; intros; subst. + change (q * b) with (0 + q * b) in |- *. + rewrite Z_mod_plus; auto. +Qed. + +(** [Zdivide] is hence decidable *) + +Lemma Zdivide_dec : forall a b:Z, {(a | b)} + {~ (a | b)}. +Proof. + intros a b; elim (Ztrichotomy_inf a 0). + (* a<0 *) + intros H; elim H; intros. + case (Z_eq_dec (b mod - a) 0). + left; apply Zdivide_opp_l_rev; apply Zmod_divide; auto with zarith. + intro H1; right; intro; elim H1; apply Zdivide_mod; auto with zarith. + (* a=0 *) + case (Z_eq_dec b 0); intro. + left; subst; auto with zarith. + right; subst; intro H0; inversion H0; omega. + (* a>0 *) + intro H; case (Z_eq_dec (b mod a) 0). + left; apply Zmod_divide; auto with zarith. + intro H1; right; intro; elim H1; apply Zdivide_mod; auto with zarith. +Qed. + +Theorem Zdivide_Zdiv_eq: forall a b : Z, + 0 < a -> (a | b) -> b = a * (b / a). +Proof. + intros a b Hb Hc. + pattern b at 1; rewrite (Z_div_mod_eq b a); auto with zarith. + rewrite (Zdivide_mod b a); auto with zarith. +Qed. + +Theorem Zdivide_Zdiv_eq_2: forall a b c : Z, + 0 < a -> (a | b) -> (c * b)/a = c * (b / a). +Proof. + intros a b c H1 H2. + inversion H2 as [z Hz]. + rewrite Hz; rewrite Zmult_assoc. + repeat rewrite Z_div_mult; auto with zarith. +Qed. + +Theorem Zdivide_Zabs_l: forall a b, (Zabs a | b) -> (a | b). +Proof. + intros a b [x H]; subst b. + pattern (Zabs a); apply Zabs_intro. + exists (- x); ring. + exists x; ring. +Qed. + +Theorem Zdivide_Zabs_inv_l: forall a b, (a | b) -> (Zabs a | b). +Proof. + intros a b [x H]; subst b. + pattern (Zabs a); apply Zabs_intro. + exists (- x); ring. + exists x; ring. +Qed. + +Theorem Zdivide_le: forall a b : Z, + 0 <= a -> 0 < b -> (a | b) -> a <= b. +Proof. + intros a b H1 H2 [q H3]; subst b. + case (Zle_lt_or_eq 0 a); auto with zarith; intros H3. + case (Zle_lt_or_eq 0 q); auto with zarith. + apply (Zmult_le_0_reg_r a); auto with zarith. + intros H4; apply Zle_trans with (1 * a); auto with zarith. + intros H4; subst q; omega. +Qed. + +Theorem Zdivide_Zdiv_lt_pos: forall a b : Z, + 1 < a -> 0 < b -> (a | b) -> 0 < b / a < b . +Proof. + intros a b H1 H2 H3; split. + apply Zmult_lt_reg_r with a; auto with zarith. + rewrite (Zmult_comm (Zdiv b a)); rewrite <- Zdivide_Zdiv_eq; auto with zarith. + apply Zmult_lt_reg_r with a; auto with zarith. + repeat rewrite (fun x => Zmult_comm x a); auto with zarith. + rewrite <- Zdivide_Zdiv_eq; auto with zarith. + pattern b at 1; replace b with (1 * b); auto with zarith. + apply Zmult_lt_compat_r; auto with zarith. +Qed. + +Lemma Zmod_div_mod: forall n m a, 0 < n -> 0 < m -> + (n | m) -> a mod n = (a mod m) mod n. +Proof. + intros n m a H1 H2 H3. + pattern a at 1; rewrite (Z_div_mod_eq a m); auto with zarith. + case H3; intros q Hq; pattern m at 1; rewrite Hq. + rewrite (Zmult_comm q). + rewrite Zplus_mod; auto with zarith. + rewrite <- Zmult_assoc; rewrite Zmult_mod; auto with zarith. + rewrite Z_mod_same; try rewrite Zmult_0_l; auto with zarith. + rewrite (Zmod_small 0); auto with zarith. + rewrite Zplus_0_l; rewrite Zmod_mod; auto with zarith. +Qed. + +Lemma Zmod_divide_minus: forall a b c : Z, 0 < b -> + a mod b = c -> (b | a - c). +Proof. + intros a b c H H1; apply Zmod_divide; auto with zarith. + rewrite Zminus_mod; auto with zarith. + rewrite H1; pattern c at 1; rewrite <- (Zmod_small c b); auto with zarith. + rewrite Zminus_diag; apply Zmod_small; auto with zarith. + subst; apply Z_mod_lt; auto with zarith. +Qed. + +Lemma Zdivide_mod_minus: forall a b c : Z, 0 <= c < b -> + (b | a - c) -> a mod b = c. +Proof. + intros a b c (H1, H2) H3; assert (0 < b); try apply Zle_lt_trans with c; auto. + replace a with ((a - c) + c); auto with zarith. + rewrite Zplus_mod; auto with zarith. + rewrite (Zdivide_mod (a -c) b); try rewrite Zplus_0_l; auto with zarith. + rewrite Zmod_mod; try apply Zmod_small; auto with zarith. +Qed. + (** * Greatest common divisor (gcd). *) (** There is no unicity of the gcd; hence we define the predicate [gcd a b d] @@ -246,6 +379,18 @@ Proof. Qed. Hint Resolve Zis_gcd_sym Zis_gcd_0 Zis_gcd_minus Zis_gcd_opp: zarith. + +Theorem Zis_gcd_unique: forall a b c d : Z, + Zis_gcd a b c -> Zis_gcd a b d -> c = d \/ c = (- d). +Proof. +intros a b c d H1 H2. +inversion_clear H1 as [Hc1 Hc2 Hc3]. +inversion_clear H2 as [Hd1 Hd2 Hd3]. +assert (H3: Zdivide c d); auto. +assert (H4: Zdivide d c); auto. +apply Zdivide_antisym; auto. +Qed. + (** * Extended Euclid algorithm. *) @@ -463,6 +608,7 @@ Qed. Lemma Zis_gcd_rel_prime : forall a b g:Z, b > 0 -> g >= 0 -> Zis_gcd a b g -> rel_prime (a / g) (b / g). +Proof. intros a b g; intros. assert (g <> 0). intro. @@ -491,6 +637,68 @@ Lemma Zis_gcd_rel_prime : exists q; auto with zarith. Qed. +Theorem rel_prime_sym: forall a b, rel_prime a b -> rel_prime b a. +Proof. + intros a b H; auto with zarith. + red; apply Zis_gcd_sym; auto with zarith. +Qed. + +Theorem rel_prime_div: forall p q r, + rel_prime p q -> (r | p) -> rel_prime r q. +Proof. + intros p q r H (u, H1); subst. + inversion_clear H as [H1 H2 H3]. + red; apply Zis_gcd_intro; try apply Zone_divide. + intros x H4 H5; apply H3; auto. + apply Zdivide_mult_r; auto. +Qed. + +Theorem rel_prime_1: forall n, rel_prime 1 n. +Proof. + intros n; red; apply Zis_gcd_intro; auto. + exists 1; auto with zarith. + exists n; auto with zarith. +Qed. + +Theorem not_rel_prime_0: forall n, 1 < n -> ~ rel_prime 0 n. +Proof. + intros n H H1; absurd (n = 1 \/ n = -1). + intros [H2 | H2]; subst; contradict H; auto with zarith. + case (Zis_gcd_unique 0 n n 1); auto. + apply Zis_gcd_intro; auto. + exists 0; auto with zarith. + exists 1; auto with zarith. +Qed. + +Theorem rel_prime_mod: forall p q, 0 < q -> + rel_prime p q -> rel_prime (p mod q) q. +Proof. + intros p q H H0. + assert (H1: Bezout p q 1). + apply rel_prime_bezout; auto. + inversion_clear H1 as [q1 r1 H2]. + apply bezout_rel_prime. + apply Bezout_intro with q1 (r1 + q1 * (p / q)). + rewrite <- H2. + pattern p at 3; rewrite (Z_div_mod_eq p q); try ring; auto with zarith. +Qed. + +Theorem rel_prime_mod_rev: forall p q, 0 < q -> + rel_prime (p mod q) q -> rel_prime p q. +Proof. + intros p q H H0. + rewrite (Z_div_mod_eq p q); auto with zarith; red. + apply Zis_gcd_sym; apply Zis_gcd_for_euclid2; auto with zarith. +Qed. + +Theorem Zrel_prime_neq_mod_0: forall a b, 1 < b -> rel_prime a b -> a mod b <> 0. +Proof. + intros a b H H1 H2. + case (not_rel_prime_0 _ H). + rewrite <- H2. + apply rel_prime_mod; auto with zarith. +Qed. + (** * Primality *) Inductive prime (p:Z) : Prop := @@ -543,42 +751,19 @@ Qed. Hint Resolve prime_rel_prime: zarith. -(** [Zdivide] can be expressed using [Zmod]. *) +(** As a consequence, a prime number is relatively prime with smaller numbers *) -Lemma Zmod_divide : forall a b:Z, b > 0 -> a mod b = 0 -> (b | a). +Theorem rel_prime_le_prime: + forall a p, prime p -> 1 <= a < p -> rel_prime a p. Proof. - intros a b H H0. - apply Zdivide_intro with (a / b). - pattern a at 1 in |- *; rewrite (Z_div_mod_eq a b H). - rewrite H0; ring. + intros a p Hp [H1 H2]. + apply rel_prime_sym; apply prime_rel_prime; auto. + intros [q Hq]; subst a. + case (Zle_or_lt q 0); intros Hl. + absurd (q * p <= 0 * p); auto with zarith. + absurd (1 * p <= q * p); auto with zarith. Qed. -Lemma Zdivide_mod : forall a b:Z, b > 0 -> (b | a) -> a mod b = 0. -Proof. - intros a b; simple destruct 2; intros; subst. - change (q * b) with (0 + q * b) in |- *. - rewrite Z_mod_plus; auto. -Qed. - -(** [Zdivide] is hence decidable *) - -Lemma Zdivide_dec : forall a b:Z, {(a | b)} + {~ (a | b)}. -Proof. - intros a b; elim (Ztrichotomy_inf a 0). - (* a<0 *) - intros H; elim H; intros. - case (Z_eq_dec (b mod - a) 0). - left; apply Zdivide_opp_l_rev; apply Zmod_divide; auto with zarith. - intro H1; right; intro; elim H1; apply Zdivide_mod; auto with zarith. - (* a=0 *) - case (Z_eq_dec b 0); intro. - left; subst; auto with zarith. - right; subst; intro H0; inversion H0; omega. - (* a>0 *) - intro H; case (Z_eq_dec (b mod a) 0). - left; apply Zmod_divide; auto with zarith. - intro H1; right; intro; elim H1; apply Zdivide_mod; auto with zarith. -Qed. (** If a prime [p] divides [ab] then it divides either [a] or [b] *) @@ -590,6 +775,108 @@ Proof. right; apply Gauss with a; auto with zarith. Qed. +Lemma not_prime_0: ~ prime 0. +Proof. + intros H1; case (prime_divisors _ H1 2); auto with zarith. +Qed. + +Lemma not_prime_1: ~ prime 1. +Proof. + intros H1; absurd (1 < 1); auto with zarith. + inversion H1; auto. +Qed. + +Lemma prime_2: prime 2. +Proof. + apply prime_intro; auto with zarith. + intros n [H1 H2]; case Zle_lt_or_eq with ( 1 := H1 ); auto with zarith; + clear H1; intros H1. + contradict H2; auto with zarith. + subst n; red; auto with zarith. + apply Zis_gcd_intro; auto with zarith. +Qed. + +Theorem prime_3: prime 3. +Proof. + apply prime_intro; auto with zarith. + intros n [H1 H2]; case Zle_lt_or_eq with ( 1 := H1 ); auto with zarith; + clear H1; intros H1. + case (Zle_lt_or_eq 2 n); auto with zarith; clear H1; intros H1. + contradict H2; auto with zarith. + subst n; red; auto with zarith. + apply Zis_gcd_intro; auto with zarith. + intros x [q1 Hq1] [q2 Hq2]. + exists (q2 - q1). + apply trans_equal with (3 - 2); auto with zarith. + rewrite Hq1; rewrite Hq2; ring. + subst n; red; auto with zarith. + apply Zis_gcd_intro; auto with zarith. +Qed. + +Theorem prime_ge_2: forall p, prime p -> 2 <= p. +Proof. + intros p Hp; inversion Hp; auto with zarith. +Qed. + +Definition prime' p := 1

~ (n|p)). + +Theorem prime_alt: + forall p, prime' p <-> prime p. +Proof. + split; destruct 1; intros. + (* prime -> prime' *) + constructor; auto; intros. + red; apply Zis_gcd_intro; auto with zarith; intros. + case (Zle_lt_or_eq 0 (Zabs x)); auto with zarith; intros H6. + case (Zle_lt_or_eq 1 (Zabs x)); auto with zarith; intros H7. + case (Zle_lt_or_eq (Zabs x) p); auto with zarith. + apply Zdivide_le; auto with zarith. + apply Zdivide_Zabs_inv_l; auto. + intros H8; case (H0 (Zabs x)); auto. + apply Zdivide_Zabs_inv_l; auto. + intros H8; subst p; absurd (Zabs x <= n); auto with zarith. + apply Zdivide_le; auto with zarith. + apply Zdivide_Zabs_inv_l; auto. + rewrite H7; pattern (Zabs x); apply Zabs_intro; auto with zarith. + absurd (0%Z = p); auto with zarith. + assert (x=0) by (destruct x; simpl in *; now auto). + subst x; elim H3; intro q; rewrite Zmult_0_r; auto. + (* prime' -> prime *) + split; auto; intros. + intros H2. + case (Zis_gcd_unique n p n 1); auto with zarith. + apply Zis_gcd_intro; auto with zarith. + apply H0; auto with zarith. +Qed. + +Theorem square_not_prime: forall a, ~ prime (a * a). +Proof. + intros a Ha. + rewrite <- (Zabs_square a) in Ha. + assert (0 <= Zabs a) by auto with zarith. + set (b:=Zabs a) in *; clearbody b. + rewrite <- prime_alt in Ha; destruct Ha. + case (Zle_lt_or_eq 0 b); auto with zarith; intros Hza1; [ | subst; omega]. + case (Zle_lt_or_eq 1 b); auto with zarith; intros Hza2; [ | subst; omega]. + assert (Hza3 := Zmult_lt_compat_r 1 b b Hza1 Hza2). + rewrite Zmult_1_l in Hza3. + elim (H1 _ (conj Hza2 Hza3)). + exists b; auto. +Qed. + +Theorem prime_div_prime: forall p q, + prime p -> prime q -> (p | q) -> p = q. +Proof. + intros p q H H1 H2; + assert (Hp: 0 < p); try apply Zlt_le_trans with 2; try apply prime_ge_2; auto with zarith. + assert (Hq: 0 < q); try apply Zlt_le_trans with 2; try apply prime_ge_2; auto with zarith. + case prime_divisors with (2 := H2); auto. + intros H4; contradict Hp; subst; auto with zarith. + intros [H4| [H4 | H4]]; subst; auto. + contradict H; auto; apply not_prime_1. + contradict Hp; auto with zarith. +Qed. + (** We could obtain a [Zgcd] function via Euclid algorithm. But we propose here a binary version of [Zgcd], faster and executable within Coq. @@ -617,105 +904,34 @@ Fixpoint Pgcdn (n: nat) (a b : positive) { struct n } : positive := | xO a, xO b => xO (Pgcdn n a b) | a, xO b => Pgcdn n a b | xO a, b => Pgcdn n a b - | xI a', xI b' => match Pcompare a' b' Eq with - | Eq => a - | Lt => Pgcdn n (b'-a') a - | Gt => Pgcdn n (a'-b') b - end - end - end. - -Fixpoint Pggcdn (n: nat) (a b : positive) { struct n } : (positive*(positive*positive)) := - match n with - | O => (1,(a,b)) - | S n => - match a,b with - | xH, b => (1,(1,b)) - | a, xH => (1,(a,1)) - | xO a, xO b => - let (g,p) := Pggcdn n a b in - (xO g,p) - | a, xO b => - let (g,p) := Pggcdn n a b in - let (aa,bb) := p in - (g,(aa, xO bb)) - | xO a, b => - let (g,p) := Pggcdn n a b in - let (aa,bb) := p in - (g,(xO aa, bb)) - | xI a', xI b' => match Pcompare a' b' Eq with - | Eq => (a,(1,1)) - | Lt => - let (g,p) := Pggcdn n (b'-a') a in - let (ba,aa) := p in - (g,(aa, aa + xO ba)) - | Gt => - let (g,p) := Pggcdn n (a'-b') b in - let (ab,bb) := p in - (g,(bb+xO ab, bb)) - end + | xI a', xI b' => + match Pcompare a' b' Eq with + | Eq => a + | Lt => Pgcdn n (b'-a') a + | Gt => Pgcdn n (a'-b') b + end end end. Definition Pgcd (a b: positive) := Pgcdn (Psize a + Psize b)%nat a b. -Definition Pggcd (a b: positive) := Pggcdn (Psize a + Psize b)%nat a b. -Open Scope Z_scope. +Close Scope positive_scope. -Definition Zgcd (a b : Z) : Z := match a,b with - | Z0, _ => Zabs b - | _, Z0 => Zabs a - | Zpos a, Zpos b => Zpos (Pgcd a b) - | Zpos a, Zneg b => Zpos (Pgcd a b) - | Zneg a, Zpos b => Zpos (Pgcd a b) - | Zneg a, Zneg b => Zpos (Pgcd a b) - end. - -Definition Zggcd (a b : Z) : Z*(Z*Z) := match a,b with - | Z0, _ => (Zabs b,(0, Zsgn b)) - | _, Z0 => (Zabs a,(Zsgn a, 0)) - | Zpos a, Zpos b => - let (g,p) := Pggcd a b in - let (aa,bb) := p in - (Zpos g, (Zpos aa, Zpos bb)) - | Zpos a, Zneg b => - let (g,p) := Pggcd a b in - let (aa,bb) := p in - (Zpos g, (Zpos aa, Zneg bb)) - | Zneg a, Zpos b => - let (g,p) := Pggcd a b in - let (aa,bb) := p in - (Zpos g, (Zneg aa, Zpos bb)) - | Zneg a, Zneg b => - let (g,p) := Pggcd a b in - let (aa,bb) := p in - (Zpos g, (Zneg aa, Zneg bb)) - end. +Definition Zgcd (a b : Z) : Z := + match a,b with + | Z0, _ => Zabs b + | _, Z0 => Zabs a + | Zpos a, Zpos b => Zpos (Pgcd a b) + | Zpos a, Zneg b => Zpos (Pgcd a b) + | Zneg a, Zpos b => Zpos (Pgcd a b) + | Zneg a, Zneg b => Zpos (Pgcd a b) + end. Lemma Zgcd_is_pos : forall a b, 0 <= Zgcd a b. Proof. unfold Zgcd; destruct a; destruct b; auto with zarith. Qed. -Lemma Psize_monotone : forall p q, Pcompare p q Eq = Lt -> (Psize p <= Psize q)%nat. -Proof. - induction p; destruct q; simpl; auto with arith; intros; try discriminate. - intros; generalize (Pcompare_Gt_Lt _ _ H); auto with arith. - intros; destruct (Pcompare_Lt_Lt _ _ H); auto with arith; subst; auto. -Qed. - -Lemma Pminus_Zminus : forall a b, Pcompare a b Eq = Lt -> - Zpos (b-a) = Zpos b - Zpos a. -Proof. - intros. - repeat rewrite Zpos_eq_Z_of_nat_o_nat_of_P. - rewrite nat_of_P_minus_morphism. - apply inj_minus1. - apply lt_le_weak. - apply nat_of_P_lt_Lt_compare_morphism; auto. - rewrite ZC4; rewrite H; auto. -Qed. - Lemma Zis_gcd_even_odd : forall a b g, Zis_gcd (Zpos a) (Zpos (xI b)) g -> Zis_gcd (Zpos (xO a)) (Zpos (xI b)) g. Proof. @@ -758,12 +974,12 @@ Proof. assert (Psize (b-a) <= Psize b)%nat. apply Psize_monotone. change (Zpos (b-a) < Zpos b). - rewrite (Pminus_Zminus _ _ H1). + rewrite (Zpos_minus_morphism _ _ H1). assert (0 < Zpos a) by (compute; auto). omega. omega. rewrite Zpos_xO; do 2 rewrite Zpos_xI. - rewrite Pminus_Zminus; auto. + rewrite Zpos_minus_morphism; auto. omega. (* a = xI, b = xI, compare = Gt *) apply Zis_gcd_for_euclid with 1. @@ -775,13 +991,13 @@ Proof. assert (Psize (a-b) <= Psize a)%nat. apply Psize_monotone. change (Zpos (a-b) < Zpos a). - rewrite (Pminus_Zminus b a). + rewrite (Zpos_minus_morphism b a). assert (0 < Zpos b) by (compute; auto). omega. rewrite ZC4; rewrite H1; auto. omega. rewrite Zpos_xO; do 2 rewrite Zpos_xI. - rewrite Pminus_Zminus; auto. + rewrite Zpos_minus_morphism; auto. omega. rewrite ZC4; rewrite H1; auto. (* a = xI, b = xO *) @@ -840,6 +1056,230 @@ Proof. apply Pgcd_correct. Qed. +Theorem Zgcd_spec : forall x y : Z, {z : Z | Zis_gcd x y z /\ 0 <= z}. +Proof. + intros x y; exists (Zgcd x y). + split; [apply Zgcd_is_gcd | apply Zgcd_is_pos]. +Qed. + +Theorem Zdivide_Zgcd: forall p q r : Z, + (p | q) -> (p | r) -> (p | Zgcd q r). +Proof. + intros p q r H1 H2. + assert (H3: (Zis_gcd q r (Zgcd q r))). + apply Zgcd_is_gcd. + inversion_clear H3; auto. +Qed. + +Theorem Zis_gcd_gcd: forall a b c : Z, + 0 <= c -> Zis_gcd a b c -> Zgcd a b = c. +Proof. + intros a b c H1 H2. + case (Zis_gcd_uniqueness_apart_sign a b c (Zgcd a b)); auto. + apply Zgcd_is_gcd; auto. + case Zle_lt_or_eq with (1 := H1); clear H1; intros H1; subst; auto. + intros H3; subst. + generalize (Zgcd_is_pos a b); auto with zarith. + case (Zgcd a b); simpl; auto; intros; discriminate. +Qed. + +Theorem Zgcd_inv_0_l: forall x y, Zgcd x y = 0 -> x = 0. +Proof. + intros x y H. + assert (F1: Zdivide 0 x). + rewrite <- H. + generalize (Zgcd_is_gcd x y); intros HH; inversion HH; auto. + inversion F1 as [z H1]. + rewrite H1; ring. +Qed. + +Theorem Zgcd_inv_0_r: forall x y, Zgcd x y = 0 -> y = 0. +Proof. + intros x y H. + assert (F1: Zdivide 0 y). + rewrite <- H. + generalize (Zgcd_is_gcd x y); intros HH; inversion HH; auto. + inversion F1 as [z H1]. + rewrite H1; ring. +Qed. + +Theorem Zgcd_div_swap0 : forall a b : Z, + 0 < Zgcd a b -> + 0 < b -> + (a / Zgcd a b) * b = a * (b/Zgcd a b). +Proof. + intros a b Hg Hb. + assert (F := Zgcd_is_gcd a b); inversion F as [F1 F2 F3]. + pattern b at 2; rewrite (Zdivide_Zdiv_eq (Zgcd a b) b); auto. + repeat rewrite Zmult_assoc; f_equal. + rewrite Zmult_comm. + rewrite <- Zdivide_Zdiv_eq; auto. +Qed. + +Theorem Zgcd_div_swap : forall a b c : Z, + 0 < Zgcd a b -> + 0 < b -> + (c * a) / Zgcd a b * b = c * a * (b/Zgcd a b). +Proof. + intros a b c Hg Hb. + assert (F := Zgcd_is_gcd a b); inversion F as [F1 F2 F3]. + pattern b at 2; rewrite (Zdivide_Zdiv_eq (Zgcd a b) b); auto. + repeat rewrite Zmult_assoc; f_equal. + rewrite Zdivide_Zdiv_eq_2; auto. + repeat rewrite <- Zmult_assoc; f_equal. + rewrite Zmult_comm. + rewrite <- Zdivide_Zdiv_eq; auto. +Qed. + +Theorem Zgcd_1_rel_prime : forall a b, + Zgcd a b = 1 <-> rel_prime a b. +Proof. + unfold rel_prime; split; intro H. + rewrite <- H; apply Zgcd_is_gcd. + case (Zis_gcd_unique a b (Zgcd a b) 1); auto. + apply Zgcd_is_gcd. + intros H2; absurd (0 <= Zgcd a b); auto with zarith. + generalize (Zgcd_is_pos a b); auto with zarith. +Qed. + +Definition rel_prime_dec: forall a b, + { rel_prime a b }+{ ~ rel_prime a b }. +Proof. + intros a b; case (Z_eq_dec (Zgcd a b) 1); intros H1. + left; apply -> Zgcd_1_rel_prime; auto. + right; contradict H1; apply <- Zgcd_1_rel_prime; auto. +Defined. + +Definition prime_dec_aux: + forall p m, + { forall n, 1 < n < m -> rel_prime n p } + + { exists n, 1 < n < m /\ ~ rel_prime n p }. +Proof. + intros p m. + case (Z_lt_dec 1 m); intros H1; + [ | left; intros; elimtype False; omega ]. + pattern m; apply natlike_rec; auto with zarith. + left; intros; elimtype False; omega. + intros x Hx IH; destruct IH as [F|E]. + destruct (rel_prime_dec x p) as [Y|N]. + left; intros n [HH1 HH2]. + case (Zgt_succ_gt_or_eq x n); auto with zarith. + intros HH3; subst x; auto. + case (Z_lt_dec 1 x); intros HH1. + right; exists x; split; auto with zarith. + left; intros n [HHH1 HHH2]; contradict HHH1; auto with zarith. + right; destruct E as (n,((H0,H2),H3)); exists n; auto with zarith. +Defined. + +Definition prime_dec: forall p, { prime p }+{ ~ prime p }. +Proof. + intros p; case (Z_lt_dec 1 p); intros H1. + case (prime_dec_aux p p); intros H2. + left; apply prime_intro; auto. + intros n [Hn1 Hn2]; case Zle_lt_or_eq with ( 1 := Hn1 ); auto. + intros HH; subst n. + red; apply Zis_gcd_intro; auto with zarith. + right; intros H3; inversion_clear H3 as [Hp1 Hp2]. + case H2; intros n [Hn1 Hn2]; case Hn2; auto with zarith. + right; intros H3; inversion_clear H3 as [Hp1 Hp2]; case H1; auto. +Defined. + +Theorem not_prime_divide: + forall p, 1 < p -> ~ prime p -> exists n, 1 < n < p /\ (n | p). +Proof. + intros p Hp Hp1. + case (prime_dec_aux p p); intros H1. + elim Hp1; constructor; auto. + intros n [Hn1 Hn2]. + case Zle_lt_or_eq with ( 1 := Hn1 ); auto with zarith. + intros H2; subst n; red; apply Zis_gcd_intro; auto with zarith. + case H1; intros n [Hn1 Hn2]. + generalize (Zgcd_is_pos n p); intros Hpos. + case (Zle_lt_or_eq 0 (Zgcd n p)); auto with zarith; intros H3. + case (Zle_lt_or_eq 1 (Zgcd n p)); auto with zarith; intros H4. + exists (Zgcd n p); split; auto. + split; auto. + apply Zle_lt_trans with n; auto with zarith. + generalize (Zgcd_is_gcd n p); intros tmp; inversion_clear tmp as [Hr1 Hr2 Hr3]. + case Hr1; intros q Hq. + case (Zle_or_lt q 0); auto with zarith; intros Ht. + absurd (n <= 0 * Zgcd n p) ; auto with zarith. + pattern n at 1; rewrite Hq; auto with zarith. + apply Zle_trans with (1 * Zgcd n p); auto with zarith. + pattern n at 2; rewrite Hq; auto with zarith. + generalize (Zgcd_is_gcd n p); intros Ht; inversion Ht; auto. + case Hn2; red. + rewrite H4; apply Zgcd_is_gcd. + generalize (Zgcd_is_gcd n p); rewrite <- H3; intros tmp; + inversion_clear tmp as [Hr1 Hr2 Hr3]. + absurd (n = 0); auto with zarith. + case Hr1; auto with zarith. +Qed. + +(** A Generalized Gcd that also computes Bezout coefficients. + The algorithm is the same as for Zgcd. *) + +Open Scope positive_scope. + +Fixpoint Pggcdn (n: nat) (a b : positive) { struct n } : (positive*(positive*positive)) := + match n with + | O => (1,(a,b)) + | S n => + match a,b with + | xH, b => (1,(1,b)) + | a, xH => (1,(a,1)) + | xO a, xO b => + let (g,p) := Pggcdn n a b in + (xO g,p) + | a, xO b => + let (g,p) := Pggcdn n a b in + let (aa,bb) := p in + (g,(aa, xO bb)) + | xO a, b => + let (g,p) := Pggcdn n a b in + let (aa,bb) := p in + (g,(xO aa, bb)) + | xI a', xI b' => + match Pcompare a' b' Eq with + | Eq => (a,(1,1)) + | Lt => + let (g,p) := Pggcdn n (b'-a') a in + let (ba,aa) := p in + (g,(aa, aa + xO ba)) + | Gt => + let (g,p) := Pggcdn n (a'-b') b in + let (ab,bb) := p in + (g,(bb+xO ab, bb)) + end + end + end. + +Definition Pggcd (a b: positive) := Pggcdn (Psize a + Psize b)%nat a b. + +Open Scope Z_scope. + +Definition Zggcd (a b : Z) : Z*(Z*Z) := + match a,b with + | Z0, _ => (Zabs b,(0, Zsgn b)) + | _, Z0 => (Zabs a,(Zsgn a, 0)) + | Zpos a, Zpos b => + let (g,p) := Pggcd a b in + let (aa,bb) := p in + (Zpos g, (Zpos aa, Zpos bb)) + | Zpos a, Zneg b => + let (g,p) := Pggcd a b in + let (aa,bb) := p in + (Zpos g, (Zpos aa, Zneg bb)) + | Zneg a, Zpos b => + let (g,p) := Pggcd a b in + let (aa,bb) := p in + (Zpos g, (Zneg aa, Zpos bb)) + | Zneg a, Zneg b => + let (g,p) := Pggcd a b in + let (aa,bb) := p in + (Zpos g, (Zneg aa, Zneg bb)) + end. + Lemma Pggcdn_gcdn : forall n a b, fst (Pggcdn n a b) = Pgcdn n a b. @@ -870,8 +1310,8 @@ Open Scope positive_scope. Lemma Pggcdn_correct_divisors : forall n a b, let (g,p) := Pggcdn n a b in - let (aa,bb):=p in - (a=g*aa) /\ (b=g*bb). + let (aa,bb):=p in + (a=g*aa) /\ (b=g*bb). Proof. induction n. simpl; auto. @@ -910,30 +1350,32 @@ Qed. Lemma Pggcd_correct_divisors : forall a b, let (g,p) := Pggcd a b in - let (aa,bb):=p in - (a=g*aa) /\ (b=g*bb). + let (aa,bb):=p in + (a=g*aa) /\ (b=g*bb). Proof. intros a b; exact (Pggcdn_correct_divisors (Psize a + Psize b)%nat a b). Qed. -Open Scope Z_scope. +Close Scope positive_scope. Lemma Zggcd_correct_divisors : forall a b, let (g,p) := Zggcd a b in - let (aa,bb):=p in - (a=g*aa) /\ (b=g*bb). + let (aa,bb):=p in + (a=g*aa) /\ (b=g*bb). Proof. destruct a; destruct b; simpl; auto; try solve [rewrite Pmult_comm; simpl; auto]; generalize (Pggcd_correct_divisors p p0); destruct (Pggcd p p0) as (g,(aa,bb)); destruct 1; subst; auto. Qed. -Theorem Zgcd_spec : forall x y : Z, {z : Z | Zis_gcd x y z /\ 0 <= z}. +Theorem Zggcd_opp: forall x y, + Zggcd (-x) y = let (p1,p) := Zggcd x y in + let (p2,p3) := p in + (p1,(-p2,p3)). Proof. - intros x y; exists (Zgcd x y). - split; [apply Zgcd_is_gcd | apply Zgcd_is_pos]. +intros [|x|x] [|y|y]; unfold Zggcd, Zopp; auto. +case Pggcd; intros p1 (p2, p3); auto. +case Pggcd; intros p1 (p2, p3); auto. +case Pggcd; intros p1 (p2, p3); auto. +case Pggcd; intros p1 (p2, p3); auto. Qed. - - - - diff --git a/theories/ZArith/Zorder.v b/theories/ZArith/Zorder.v index 47490be6..425aa83b 100644 --- a/theories/ZArith/Zorder.v +++ b/theories/ZArith/Zorder.v @@ -5,9 +5,9 @@ (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Zorder.v 9302 2006-10-27 21:21:17Z barras $ i*) +(*i $Id: Zorder.v 10291 2007-11-06 02:18:53Z letouzey $ i*) -(** Binary Integers (Pierre Crégut (CNET, Lannion, France) *) +(** Binary Integers (Pierre Crégut (CNET, Lannion, France) *) Require Import BinPos. Require Import BinInt. @@ -549,7 +549,7 @@ Hint Immediate Zeq_le: zarith. (** Transitivity using successor *) -Lemma Zge_trans_succ : forall n m p:Z, Zsucc n > m -> m > p -> n > p. +Lemma Zgt_trans_succ : forall n m p:Z, Zsucc n > m -> m > p -> n > p. Proof. intros n m p H1 H2; apply Zle_gt_trans with (m := m); [ apply Zgt_succ_le; assumption | assumption ]. @@ -997,5 +997,31 @@ Proof. rewrite <- Zplus_assoc; rewrite Zplus_opp_l; rewrite Zplus_0_r; exact H. Qed. +Lemma Zmult_lt_compat: + forall n m p q : Z, 0 <= n < p -> 0 <= m < q -> n * m < p * q. +Proof. + intros n m p q (H1, H2) (H3,H4). + assert (0 0 < m < q -> n * m < p * q. +Proof. + intros n m p q (H1, H2) (H3, H4). + apply Zle_lt_trans with (p * m). + apply Zmult_le_compat_r; auto. + apply Zlt_le_weak; auto. + apply Zmult_lt_compat_l; auto. + apply Zlt_le_trans with n; auto. +Qed. + (** For compatibility *) Notation Zlt_O_minus_lt := Zlt_0_minus_lt (only parsing). diff --git a/theories/ZArith/Zpow_facts.v b/theories/ZArith/Zpow_facts.v new file mode 100644 index 00000000..3d4d235a --- /dev/null +++ b/theories/ZArith/Zpow_facts.v @@ -0,0 +1,465 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* 0 < Zpower_pos x p. +Proof. + induction p; intros. + (* xI *) + rewrite xI_succ_xO, <-Pplus_diag, Pplus_one_succ_l. + repeat rewrite Zpower_pos_is_exp. + rewrite Zpower_pos_1_r. + repeat apply Zmult_lt_0_compat; auto. + (* xO *) + rewrite <- Pplus_diag. + repeat rewrite Zpower_pos_is_exp. + repeat apply Zmult_lt_0_compat; auto. + (* xH *) + rewrite Zpower_pos_1_r; auto. +Qed. + + +Theorem Zpower_1_r: forall z, z^1 = z. +Proof. + exact Zpower_pos_1_r. +Qed. + +Theorem Zpower_1_l: forall z, 0 <= z -> 1^z = 1. +Proof. + destruct z; simpl; auto. + intros; apply Zpower_pos_1_l. + intros; compute in H; elim H; auto. +Qed. + +Theorem Zpower_0_l: forall z, z<>0 -> 0^z = 0. +Proof. + destruct z; simpl; auto with zarith. + intros; apply Zpower_pos_0_l. +Qed. + +Theorem Zpower_0_r: forall z, z^0 = 1. +Proof. + simpl; auto. +Qed. + +Theorem Zpower_2: forall z, z^2 = z * z. +Proof. + intros; ring. +Qed. + +Theorem Zpower_gt_0: forall x y, + 0 < x -> 0 <= y -> 0 < x^y. +Proof. + destruct y; simpl; auto with zarith. + intros; apply Zpower_pos_pos; auto. + intros; compute in H0; elim H0; auto. +Qed. + +Theorem Zpower_Zabs: forall a b, Zabs (a^b) = (Zabs a)^b. +Proof. + intros a b; case (Zle_or_lt 0 b). + intros Hb; pattern b; apply natlike_ind; auto with zarith. + intros x Hx Hx1; unfold Zsucc. + (repeat rewrite Zpower_exp); auto with zarith. + rewrite Zabs_Zmult; rewrite Hx1. + f_equal; auto. + replace (a ^ 1) with a; auto. + simpl; unfold Zpower_pos; simpl; rewrite Zmult_1_r; auto. + simpl; unfold Zpower_pos; simpl; rewrite Zmult_1_r; auto. + case b; simpl; auto with zarith. + intros p Hp; discriminate. +Qed. + +Theorem Zpower_Zsucc: forall p n, 0 <= n -> p^(Zsucc n) = p * p^n. +Proof. + intros p n H. + unfold Zsucc; rewrite Zpower_exp; auto with zarith. + rewrite Zpower_1_r; apply Zmult_comm. +Qed. + +Theorem Zpower_mult: forall p q r, 0 <= q -> 0 <= r -> p^(q*r) = (p^q)^r. +Proof. + intros p q r H1 H2; generalize H2; pattern r; apply natlike_ind; auto. + intros H3; rewrite Zmult_0_r; repeat rewrite Zpower_exp_0; auto. + intros r1 H3 H4 H5. + unfold Zsucc; rewrite Zpower_exp; auto with zarith. + rewrite <- H4; try rewrite Zpower_1_r; try rewrite <- Zpower_exp; try f_equal; auto with zarith. + ring. + apply Zle_ge; replace 0 with (0 * r1); try apply Zmult_le_compat_r; auto. +Qed. + +Theorem Zpower_le_monotone: forall a b c, + 0 < a -> 0 <= b <= c -> a^b <= a^c. +Proof. + intros a b c H (H1, H2). + rewrite <- (Zmult_1_r (a ^ b)); replace c with (b + (c - b)); auto with zarith. + rewrite Zpower_exp; auto with zarith. + apply Zmult_le_compat_l; auto with zarith. + assert (0 < a ^ (c - b)); auto with zarith. + apply Zpower_gt_0; auto with zarith. + apply Zlt_le_weak; apply Zpower_gt_0; auto with zarith. +Qed. + +Theorem Zpower_lt_monotone: forall a b c, + 1 < a -> 0 <= b < c -> a^b < a^c. +Proof. + intros a b c H (H1, H2). + rewrite <- (Zmult_1_r (a ^ b)); replace c with (b + (c - b)); auto with zarith. + rewrite Zpower_exp; auto with zarith. + apply Zmult_lt_compat_l; auto with zarith. + apply Zpower_gt_0; auto with zarith. + assert (0 < a ^ (c - b)); auto with zarith. + apply Zpower_gt_0; auto with zarith. + apply Zlt_le_trans with (a ^1); auto with zarith. + rewrite Zpower_1_r; auto with zarith. + apply Zpower_le_monotone; auto with zarith. +Qed. + +Theorem Zpower_gt_1 : forall x y, + 1 < x -> 0 < y -> 1 < x^y. +Proof. + intros x y H1 H2. + replace 1 with (x ^ 0) by apply Zpower_0_r. + apply Zpower_lt_monotone; auto with zarith. +Qed. + +Theorem Zpower_ge_0: forall x y, 0 <= x -> 0 <= x^y. +Proof. + intros x y; case y; auto with zarith. + simpl ; auto with zarith. + intros p H1; assert (H: 0 <= Zpos p); auto with zarith. + generalize H; pattern (Zpos p); apply natlike_ind; auto with zarith. + intros p1 H2 H3 _; unfold Zsucc; rewrite Zpower_exp; simpl; auto with zarith. + apply Zmult_le_0_compat; auto with zarith. + generalize H1; case x; compute; intros; auto; try discriminate. +Qed. + +Theorem Zpower_le_monotone2: + forall a b c, 0 < a -> b <= c -> a^b <= a^c. +Proof. + intros a b c H H2. + destruct (Z_le_gt_dec 0 b). + apply Zpower_le_monotone; auto. + replace (a^b) with 0. + destruct (Z_le_gt_dec 0 c). + destruct (Zle_lt_or_eq _ _ z0). + apply Zlt_le_weak;apply Zpower_gt_0;trivial. + rewrite <- H0;simpl;auto with zarith. + replace (a^c) with 0. auto with zarith. + destruct c;trivial;unfold Zgt in z0;discriminate z0. + destruct b;trivial;unfold Zgt in z;discriminate z. +Qed. + +Theorem Zmult_power: forall p q r, 0 <= r -> + (p*q)^r = p^r * q^r. +Proof. + intros p q r H1; generalize H1; pattern r; apply natlike_ind; auto. + clear r H1; intros r H1 H2 H3. + unfold Zsucc; rewrite Zpower_exp; auto with zarith. + rewrite H2; repeat rewrite Zpower_exp; auto with zarith; ring. +Qed. + +Hint Resolve Zpower_ge_0 Zpower_gt_0: zarith. + +Theorem Zpower_le_monotone3: forall a b c, + 0 <= c -> 0 <= a <= b -> a^c <= b^c. +Proof. + intros a b c H (H1, H2). + generalize H; pattern c; apply natlike_ind; auto. + intros x HH HH1 _; unfold Zsucc; repeat rewrite Zpower_exp; auto with zarith. + repeat rewrite Zpower_1_r. + apply Zle_trans with (a^x * b); auto with zarith. +Qed. + +Lemma Zpower_le_monotone_inv: forall a b c, + 1 < a -> 0 < b -> a^b <= a^c -> b <= c. +Proof. + intros a b c H H0 H1. + destruct (Z_le_gt_dec b c);trivial. + assert (2 <= a^b). + apply Zle_trans with (2^b). + pattern 2 at 1;replace 2 with (2^1);trivial. + apply Zpower_le_monotone;auto with zarith. + apply Zpower_le_monotone3;auto with zarith. + assert (c > 0). + destruct (Z_le_gt_dec 0 c);trivial. + destruct (Zle_lt_or_eq _ _ z0);auto with zarith. + rewrite <- H3 in H1;simpl in H1; elimtype False;omega. + destruct c;try discriminate z0. simpl in H1. elimtype False;omega. + assert (H4 := Zpower_lt_monotone a c b H). elimtype False;omega. +Qed. + +Theorem Zpower_nat_Zpower: forall p q, 0 <= q -> + p^q = Zpower_nat p (Zabs_nat q). +Proof. + intros p1 q1; case q1; simpl. + intros _; exact (refl_equal _). + intros p2 _; apply Zpower_pos_nat. + intros p2 H1; case H1; auto. +Qed. + +Theorem Zpower2_lt_lin: forall n, 0 <= n -> n < 2^n. +Proof. + intros n; apply (natlike_ind (fun n => n < 2 ^n)); clear n. + simpl; auto with zarith. + intros n H1 H2; unfold Zsucc. + case (Zle_lt_or_eq _ _ H1); clear H1; intros H1. + apply Zle_lt_trans with (n + n); auto with zarith. + rewrite Zpower_exp; auto with zarith. + rewrite Zpower_1_r. + assert (tmp: forall p, p * 2 = p + p); intros; try ring; + rewrite tmp; auto with zarith. + subst n; simpl; unfold Zpower_pos; simpl; auto with zarith. +Qed. + +Theorem Zpower2_le_lin: forall n, 0 <= n -> n <= 2^n. +Proof. + intros; apply Zlt_le_weak; apply Zpower2_lt_lin; auto. +Qed. + +Lemma Zpower2_Psize : + forall n p, Zpos p < 2^(Z_of_nat n) <-> (Psize p <= n)%nat. +Proof. + induction n. + destruct p; split; intros H; discriminate H || inversion H. + destruct p; simpl Psize. + rewrite inj_S, Zpower_Zsucc; auto with zarith. + rewrite Zpos_xI; specialize IHn with p; omega. + rewrite inj_S, Zpower_Zsucc; auto with zarith. + rewrite Zpos_xO; specialize IHn with p; omega. + split; auto with arith. + intros _; apply Zpower_gt_1; auto with zarith. + rewrite inj_S; generalize (Zle_0_nat n); omega. +Qed. + +(** * Zpower and modulo *) + +Theorem Zpower_mod: forall p q n, 0 < n -> + (p^q) mod n = ((p mod n)^q) mod n. +Proof. + intros p q n Hn; case (Zle_or_lt 0 q); intros H1. + generalize H1; pattern q; apply natlike_ind; auto. + intros q1 Hq1 Rec _; unfold Zsucc; repeat rewrite Zpower_exp; repeat rewrite Zpower_1_r; auto with zarith. + rewrite (fun x => (Zmult_mod x p)); try rewrite Rec; auto with zarith. + rewrite (fun x y => (Zmult_mod (x ^y))); try f_equal; auto with zarith. + f_equal; auto; apply sym_equal; apply Zmod_mod; auto with zarith. + generalize H1; case q; simpl; auto. + intros; discriminate. +Qed. + +(** A direct way to compute Zpower modulo **) + +Fixpoint Zpow_mod_pos (a: Z)(m: positive)(n : Z) {struct m} : Z := + match m with + | xH => a mod n + | xO m' => + let z := Zpow_mod_pos a m' n in + match z with + | 0 => 0 + | _ => (z * z) mod n + end + | xI m' => + let z := Zpow_mod_pos a m' n in + match z with + | 0 => 0 + | _ => (z * z * a) mod n + end + end. + +Definition Zpow_mod a m n := + match m with + | 0 => 1 + | Zpos p => Zpow_mod_pos a p n + | Zneg p => 0 + end. + +Theorem Zpow_mod_pos_correct: forall a m n, 0 < n -> + Zpow_mod_pos a m n = (Zpower_pos a m) mod n. +Proof. + intros a m; elim m; simpl; auto. + intros p Rec n H1; rewrite xI_succ_xO, Pplus_one_succ_r, <-Pplus_diag; auto. + repeat rewrite Zpower_pos_is_exp; auto. + repeat rewrite Rec; auto. + rewrite Zpower_pos_1_r. + repeat rewrite (fun x => (Zmult_mod x a)); auto with zarith. + rewrite (Zmult_mod (Zpower_pos a p)); auto with zarith. + case (Zpower_pos a p mod n); auto. + intros p Rec n H1; rewrite <- Pplus_diag; auto. + repeat rewrite Zpower_pos_is_exp; auto. + repeat rewrite Rec; auto. + rewrite (Zmult_mod (Zpower_pos a p)); auto with zarith. + case (Zpower_pos a p mod n); auto. + unfold Zpower_pos; simpl; rewrite Zmult_1_r; auto with zarith. +Qed. + +Theorem Zpow_mod_correct: forall a m n, 1 < n -> 0 <= m -> + Zpow_mod a m n = (a ^ m) mod n. +Proof. + intros a m n; case m; simpl. + intros; apply sym_equal; apply Zmod_small; auto with zarith. + intros; apply Zpow_mod_pos_correct; auto with zarith. + intros p H H1; case H1; auto. +Qed. + +(* Complements about power and number theory. *) + +Lemma Zpower_divide: forall p q, 0 < q -> (p | p ^ q). +Proof. + intros p q H; exists (p ^(q - 1)). + pattern p at 3; rewrite <- (Zpower_1_r p); rewrite <- Zpower_exp; try f_equal; auto with zarith. +Qed. + +Theorem rel_prime_Zpower_r: forall i p q, 0 < i -> + rel_prime p q -> rel_prime p (q^i). +Proof. + intros i p q Hi Hpq; generalize Hi; pattern i; apply natlike_ind; auto with zarith; clear i Hi. + intros H; contradict H; auto with zarith. + intros i Hi Rec _; rewrite Zpower_Zsucc; auto. + apply rel_prime_mult; auto. + case Zle_lt_or_eq with (1 := Hi); intros Hi1; subst; auto. + rewrite Zpower_0_r; apply rel_prime_sym; apply rel_prime_1. +Qed. + +Theorem rel_prime_Zpower: forall i j p q, 0 <= i -> 0 <= j -> + rel_prime p q -> rel_prime (p^i) (q^j). +Proof. + intros i j p q Hi; generalize Hi j p q; pattern i; apply natlike_ind; auto with zarith; clear i Hi j p q. + intros _ j p q H H1; rewrite Zpower_0_r; apply rel_prime_1. + intros n Hn Rec _ j p q Hj Hpq. + rewrite Zpower_Zsucc; auto. + case Zle_lt_or_eq with (1 := Hj); intros Hj1; subst. + apply rel_prime_sym; apply rel_prime_mult; auto. + apply rel_prime_sym; apply rel_prime_Zpower_r; auto with arith. + apply rel_prime_sym; apply Rec; auto. + rewrite Zpower_0_r; apply rel_prime_sym; apply rel_prime_1. +Qed. + +Theorem prime_power_prime: forall p q n, 0 <= n -> + prime p -> prime q -> (p | q^n) -> p = q. +Proof. + intros p q n Hn Hp Hq; pattern n; apply natlike_ind; auto; clear n Hn. + rewrite Zpower_0_r; intros. + assert (2<=p) by (apply prime_ge_2; auto). + assert (p<=1) by (apply Zdivide_le; auto with zarith). + omega. + intros n1 H H1. + unfold Zsucc; rewrite Zpower_exp; try rewrite Zpower_1_r; auto with zarith. + assert (2<=p) by (apply prime_ge_2; auto). + assert (2<=q) by (apply prime_ge_2; auto). + intros H3; case prime_mult with (2 := H3); auto. + intros; apply prime_div_prime; auto. +Qed. + +Theorem Zdivide_power_2: forall x p n, 0 <= n -> 0 <= x -> prime p -> + (x | p^n) -> exists m, x = p^m. +Proof. + intros x p n Hn Hx; revert p n Hn; generalize Hx. + pattern x; apply Z_lt_induction; auto. + clear x Hx; intros x IH Hx p n Hn Hp H. + case Zle_lt_or_eq with (1 := Hx); auto; clear Hx; intros Hx; subst. + case (Zle_lt_or_eq 1 x); auto with zarith; clear Hx; intros Hx; subst. + (* x > 1 *) + case (prime_dec x); intros H2. + exists 1; rewrite Zpower_1_r; apply prime_power_prime with n; auto. + case not_prime_divide with (2 := H2); auto. + intros p1 ((H3, H4), (q1, Hq1)); subst. + case (IH p1) with p n; auto with zarith. + apply Zdivide_trans with (2 := H); exists q1; auto with zarith. + intros r1 Hr1. + case (IH q1) with p n; auto with zarith. + case (Zle_lt_or_eq 0 q1). + apply Zmult_le_0_reg_r with p1; auto with zarith. + split; auto with zarith. + pattern q1 at 1; replace q1 with (q1 * 1); auto with zarith. + apply Zmult_lt_compat_l; auto with zarith. + intros H5; subst; contradict Hx; auto with zarith. + apply Zmult_le_0_reg_r with p1; auto with zarith. + apply Zdivide_trans with (2 := H); exists p1; auto with zarith. + intros r2 Hr2; exists (r2 + r1); subst. + apply sym_equal; apply Zpower_exp. + generalize Hx; case r2; simpl; auto with zarith. + intros; red; simpl; intros; discriminate. + generalize H3; case r1; simpl; auto with zarith. + intros; red; simpl; intros; discriminate. + (* x = 1 *) + exists 0; rewrite Zpower_0_r; auto. + (* x = 0 *) + exists n; destruct H; rewrite Zmult_0_r in H; auto. +Qed. + +(** * Zsquare: a direct definition of [z^2] *) + +Fixpoint Psquare (p: positive): positive := + match p with + | xH => xH + | xO p => xO (xO (Psquare p)) + | xI p => xI (xO (Pplus (Psquare p) p)) + end. + +Definition Zsquare p := + match p with + | Z0 => Z0 + | Zpos p => Zpos (Psquare p) + | Zneg p => Zpos (Psquare p) + end. + +Theorem Psquare_correct: forall p, Psquare p = (p * p)%positive. +Proof. + induction p; simpl; auto; f_equal; rewrite IHp. + apply trans_equal with (xO p + xO (p*p))%positive; auto. + rewrite (Pplus_comm (xO p)); auto. + rewrite Pmult_xI_permute_r; rewrite Pplus_assoc. + f_equal; auto. + symmetry; apply Pplus_diag. + symmetry; apply Pmult_xO_permute_r. +Qed. + +Theorem Zsquare_correct: forall p, Zsquare p = p * p. +Proof. + intro p; case p; simpl; auto; intros p1; rewrite Psquare_correct; auto. +Qed. diff --git a/theories/ZArith/Zpower.v b/theories/ZArith/Zpower.v index c9cee31d..1912f5e1 100644 --- a/theories/ZArith/Zpower.v +++ b/theories/ZArith/Zpower.v @@ -6,89 +6,75 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Zpower.v 9551 2007-01-29 15:13:35Z bgregoir $ i*) +(*i $Id: Zpower.v 11072 2008-06-08 16:13:37Z herbelin $ i*) +Require Import Wf_nat. Require Import ZArith_base. Require Export Zpow_def. Require Import Omega. Require Import Zcomplements. Open Local Scope Z_scope. -Section section1. +Infix "^" := Zpower : Z_scope. (** * Definition of powers over [Z]*) (** [Zpower_nat z n] is the n-th power of [z] when [n] is an unary integer (type [nat]) and [z] a signed integer (type [Z]) *) - Definition Zpower_nat (z:Z) (n:nat) := iter_nat n Z (fun x:Z => z * x) 1. - - (** [Zpower_nat_is_exp] says [Zpower_nat] is a morphism for - [plus : nat->nat] and [Zmult : Z->Z] *) - - Lemma Zpower_nat_is_exp : - forall (n m:nat) (z:Z), - Zpower_nat z (n + m) = Zpower_nat z n * Zpower_nat z m. - Proof. - intros; elim n; - [ simpl in |- *; elim (Zpower_nat z m); auto with zarith - | unfold Zpower_nat in |- *; intros; simpl in |- *; rewrite H; - apply Zmult_assoc ]. - Qed. - - (** This theorem shows that powers of unary and binary integers - are the same thing, modulo the function convert : [positive -> nat] *) - - Theorem Zpower_pos_nat : - forall (z:Z) (p:positive), Zpower_pos z p = Zpower_nat z (nat_of_P p). - Proof. - intros; unfold Zpower_pos in |- *; unfold Zpower_nat in |- *; - apply iter_nat_of_P. - Qed. - - (** Using the theorem [Zpower_pos_nat] and the lemma [Zpower_nat_is_exp] we - deduce that the function [[n:positive](Zpower_pos z n)] is a morphism - for [add : positive->positive] and [Zmult : Z->Z] *) - - Theorem Zpower_pos_is_exp : - forall (n m:positive) (z:Z), - Zpower_pos z (n + m) = Zpower_pos z n * Zpower_pos z m. - Proof. - intros. - rewrite (Zpower_pos_nat z n). - rewrite (Zpower_pos_nat z m). - rewrite (Zpower_pos_nat z (n + m)). - rewrite (nat_of_P_plus_morphism n m). - apply Zpower_nat_is_exp. - Qed. - - Infix "^" := Zpower : Z_scope. - - Hint Immediate Zpower_nat_is_exp: zarith. - Hint Immediate Zpower_pos_is_exp: zarith. - Hint Unfold Zpower_pos: zarith. - Hint Unfold Zpower_nat: zarith. - - Lemma Zpower_exp : - forall x n m:Z, n >= 0 -> m >= 0 -> x ^ (n + m) = x ^ n * x ^ m. - Proof. - destruct n; destruct m; auto with zarith. - simpl in |- *; intros; apply Zred_factor0. - simpl in |- *; auto with zarith. - intros; compute in H0; absurd (Datatypes.Lt = Datatypes.Lt); auto with zarith. - intros; compute in H0; absurd (Datatypes.Lt = Datatypes.Lt); auto with zarith. - Qed. - -End section1. - -(** Exporting notation "^" *) - -Infix "^" := Zpower : Z_scope. - -Hint Immediate Zpower_nat_is_exp: zarith. -Hint Immediate Zpower_pos_is_exp: zarith. -Hint Unfold Zpower_pos: zarith. -Hint Unfold Zpower_nat: zarith. +Definition Zpower_nat (z:Z) (n:nat) := iter_nat n Z (fun x:Z => z * x) 1. + +(** [Zpower_nat_is_exp] says [Zpower_nat] is a morphism for + [plus : nat->nat] and [Zmult : Z->Z] *) + +Lemma Zpower_nat_is_exp : + forall (n m:nat) (z:Z), + Zpower_nat z (n + m) = Zpower_nat z n * Zpower_nat z m. +Proof. + intros; elim n; + [ simpl in |- *; elim (Zpower_nat z m); auto with zarith + | unfold Zpower_nat in |- *; intros; simpl in |- *; rewrite H; + apply Zmult_assoc ]. +Qed. + +(** This theorem shows that powers of unary and binary integers + are the same thing, modulo the function convert : [positive -> nat] *) + +Lemma Zpower_pos_nat : + forall (z:Z) (p:positive), Zpower_pos z p = Zpower_nat z (nat_of_P p). +Proof. + intros; unfold Zpower_pos in |- *; unfold Zpower_nat in |- *; + apply iter_nat_of_P. +Qed. + +(** Using the theorem [Zpower_pos_nat] and the lemma [Zpower_nat_is_exp] we + deduce that the function [[n:positive](Zpower_pos z n)] is a morphism + for [add : positive->positive] and [Zmult : Z->Z] *) + +Lemma Zpower_pos_is_exp : + forall (n m:positive) (z:Z), + Zpower_pos z (n + m) = Zpower_pos z n * Zpower_pos z m. +Proof. + intros. + rewrite (Zpower_pos_nat z n). + rewrite (Zpower_pos_nat z m). + rewrite (Zpower_pos_nat z (n + m)). + rewrite (nat_of_P_plus_morphism n m). + apply Zpower_nat_is_exp. +Qed. + +Hint Immediate Zpower_nat_is_exp Zpower_pos_is_exp : zarith. +Hint Unfold Zpower_pos Zpower_nat: zarith. + +Theorem Zpower_exp : + forall x n m:Z, n >= 0 -> m >= 0 -> x ^ (n + m) = x ^ n * x ^ m. +Proof. + destruct n; destruct m; auto with zarith. + simpl; intros; apply Zred_factor0. + simpl; auto with zarith. + intros; compute in H0; elim H0; auto. + intros; compute in H; elim H; auto. +Qed. Section Powers_of_2. diff --git a/theories/ZArith/Zsqrt.v b/theories/ZArith/Zsqrt.v index 3f475a63..6ea952e6 100644 --- a/theories/ZArith/Zsqrt.v +++ b/theories/ZArith/Zsqrt.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: Zsqrt.v 9551 2007-01-29 15:13:35Z bgregoir $ *) +(* $Id: Zsqrt.v 10295 2007-11-06 22:46:21Z letouzey $ *) Require Import ZArithRing. Require Import Omega. @@ -148,6 +148,7 @@ Definition Zsqrt_plain (x:Z) : Z := end. (** A basic theorem about Zsqrt_plain *) + Theorem Zsqrt_interval : forall n:Z, 0 <= n -> @@ -162,3 +163,53 @@ Proof. intros p Hle; elim Hle; auto. Qed. +(** Positivity *) + +Theorem Zsqrt_plain_is_pos: forall n, 0 <= n -> 0 <= Zsqrt_plain n. +Proof. + intros n m; case (Zsqrt_interval n); auto with zarith. + intros H1 H2; case (Zle_or_lt 0 (Zsqrt_plain n)); auto. + intros H3; contradict H2; auto; apply Zle_not_lt. + apply Zle_trans with ( 2 := H1 ). + replace ((Zsqrt_plain n + 1) * (Zsqrt_plain n + 1)) + with (Zsqrt_plain n * Zsqrt_plain n + (2 * Zsqrt_plain n + 1)); + auto with zarith. + ring. +Qed. + +(** Direct correctness on squares. *) + +Theorem Zsqrt_square_id: forall a, 0 <= a -> Zsqrt_plain (a * a) = a. +Proof. + intros a H. + generalize (Zsqrt_plain_is_pos (a * a)); auto with zarith; intros Haa. + case (Zsqrt_interval (a * a)); auto with zarith. + intros H1 H2. + case (Zle_or_lt a (Zsqrt_plain (a * a))); intros H3; auto. + case Zle_lt_or_eq with (1:=H3); auto; clear H3; intros H3. + contradict H1; auto; apply Zlt_not_le; auto with zarith. + apply Zle_lt_trans with (a * Zsqrt_plain (a * a)); auto with zarith. + apply Zmult_lt_compat_r; auto with zarith. + contradict H2; auto; apply Zle_not_lt; auto with zarith. + apply Zmult_le_compat; auto with zarith. +Qed. + +(** [Zsqrt_plain] is increasing *) + +Theorem Zsqrt_le: + forall p q, 0 <= p <= q -> Zsqrt_plain p <= Zsqrt_plain q. +Proof. + intros p q [H1 H2]; case Zle_lt_or_eq with (1:=H2); clear H2; intros H2; + [ | subst q; auto with zarith]. + case (Zle_or_lt (Zsqrt_plain p) (Zsqrt_plain q)); auto; intros H3. + assert (Hp: (0 <= Zsqrt_plain q)). + apply Zsqrt_plain_is_pos; auto with zarith. + absurd (q <= p); auto with zarith. + apply Zle_trans with ((Zsqrt_plain q + 1) * (Zsqrt_plain q + 1)). + case (Zsqrt_interval q); auto with zarith. + apply Zle_trans with (Zsqrt_plain p * Zsqrt_plain p); auto with zarith. + apply Zmult_le_compat; auto with zarith. + case (Zsqrt_interval p); auto with zarith. +Qed. + + diff --git a/tools/coq-tex.ml4 b/tools/coq-tex.ml4 index d55901b9..4c11725c 100644 --- a/tools/coq-tex.ml4 +++ b/tools/coq-tex.ml4 @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: coq-tex.ml4 9551 2007-01-29 15:13:35Z bgregoir $ *) +(* $Id: coq-tex.ml4 9532 2007-01-24 16:04:29Z bgregoir $ *) (* coq-tex * JCF, 16/1/98 diff --git a/tools/coq_makefile.ml4 b/tools/coq_makefile.ml4 index b6af3abc..77dbcc47 100644 --- a/tools/coq_makefile.ml4 +++ b/tools/coq_makefile.ml4 @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: coq_makefile.ml4 10185 2007-10-06 18:05:13Z herbelin $ *) +(* $Id: coq_makefile.ml4 11136 2008-06-18 10:41:34Z herbelin $ *) (* créer un Makefile pour un développement Coq automatiquement *) @@ -81,21 +81,10 @@ coq_makefile [subdirectory] .... [file.v] ... [file.ml] ... [-custom let standard sds sps = print "byte:\n"; - print "\t$(MAKE) all \"OPT=\"\n\n"; + print "\t$(MAKE) all \"OPT:=-byte\"\n\n"; print "opt:\n"; if !opt = "" then print "\t@echo \"WARNING: opt is disabled\"\n"; - print "\t$(MAKE) all \"OPT="; print !opt; print "\"\n\n"; - if !some_file then print "include .depend\n\n"; - print ".depend depend:\n"; - if !some_file then begin - print "\trm -f .depend\n"; - print "\t$(COQDEP) -i $(COQLIBS) $(VFILES) *.ml *.mli >.depend\n"; - print "\t$(COQDEP) $(COQLIBS) -suffix .html $(VFILES) >>.depend\n"; - end; - List.iter - (fun x -> print "\t(cd "; print x; print " ; $(MAKE) depend)\n") - sds; - print "\n"; + print "\t$(MAKE) all \"OPT:="; print !opt; print "\"\n\n"; print "install:\n"; print "\tmkdir -p `$(COQC) -where`/user-contrib\n"; if !some_vfile then print "\tcp -f $(VOFILES) `$(COQC) -where`/user-contrib\n"; @@ -116,7 +105,11 @@ let standard sds sps = end; print "clean:\n"; print "\trm -f *.cmo *.cmi *.cmx *.o $(VOFILES) $(VIFILES) $(GFILES) *~\n"; - print "\trm -f all.ps all-gal.ps $(HTMLFILES) $(GHTMLFILES)\n"; + print "\trm -f all.ps all-gal.ps all.glob $(VFILES:.v=.glob) $(HTMLFILES) \ + $(GHTMLFILES) $(VFILES:.v=.tex) $(VFILES:.v=.g.tex) $(VFILES:.v=.v.d)\n"; + if !some_mlfile then + print "\trm -f $(CMOFILES) $(MLFILES:.ml=.cmi) $(MLFILES:.ml=.ml.d)\n"; + print "\t- rm -rf html\n"; List.iter (fun (file,_,_) -> print "\t- rm -f "; print file; print "\n") sps; @@ -129,44 +122,32 @@ let standard sds sps = List.iter (fun x -> print "\t(cd "; print x; print " ; $(MAKE) archclean)\n") sds; - print "\n"; - print "html:\n"; - List.iter - (fun x -> print "\t(cd "; print x; print " ; $(MAKE) html)\n") - sds; - print "\n" + print "\n\n" + +let includes () = + if !some_vfile then print "-include $(VFILES:.v=.v.d)\n.SECONDARY: $(VFILES:.v=.v.d)\n\n"; + if !some_mlfile then print "-include $(MLFILES:.ml=.ml.d)\n.SECONDARY: $(MLFILES:.ml=.ml.d)\n\n" let implicit () = let ml_rules () = - print ".mli.cmi:\n\t$(CAMLC) $(ZDEBUG) $(ZFLAGS) $<\n\n"; - print ".ml.cmo:\n\t$(CAMLC) $(ZDEBUG) $(ZFLAGS) $(PP) $<\n\n"; - print ".ml.cmx:\n\t$(CAMLOPTC) $(ZDEBUG) $(ZFLAGS) $(PP) $<\n\n"; + print "%.cmi: %.mli\n\t$(CAMLC) $(ZDEBUG) $(ZFLAGS) $<\n\n"; + print "%.cmo: %.ml\n\t$(CAMLC) $(ZDEBUG) $(ZFLAGS) $(PP) $<\n\n"; + print "%.cmx: %.ml\n\t$(CAMLOPTC) $(ZDEBUG) $(ZFLAGS) $(PP) $<\n\n"; + print "%.ml.d: %.ml\n"; + print "\t$(CAMLBIN)ocamldep -slash $(ZFLAGS) $(PP) \"$<\" > \"$@\"\n\n" and v_rule () = - print ".v.vo:\n\t$(COQC) $(COQDEBUG) $(COQFLAGS) $*\n\n"; - print ".v.vi:\n\t$(COQC) -i $(COQDEBUG) $(COQFLAGS) $*\n\n"; - print ".v.g:\n\t$(GALLINA) $<\n\n"; - print ".v.tex:\n\t$(COQDOC) -latex $< -o $@\n\n"; - print ".v.html:\n\t$(COQDOC) -html $< -o $@\n\n"; - print ".v.g.tex:\n\t$(COQDOC) -latex -g $< -o $@\n\n"; - print ".v.g.html:\n\t$(COQDOC) -html -g $< -o $@\n\n" - and ml_suffixes = - if !some_mlfile then - [ ".mli"; ".ml"; ".cmo"; ".cmi"; ".cmx" ] - else - [] - and v_suffixes = - if !some_vfile then - [ ".v"; ".vo"; ".vi"; ".g"; ".html"; ".tex"; ".g.tex"; ".g.html" ] - else - [] + print "%.vo %.glob: %.v\n\t$(COQC) -dump-glob $*.glob $(COQDEBUG) $(COQFLAGS) $*\n\n"; + print "%.vi: %.v\n\t$(COQC) -i $(COQDEBUG) $(COQFLAGS) $*\n\n"; + print "%.g: %.v\n\t$(GALLINA) $<\n\n"; + print "%.tex: %.v\n\t$(COQDOC) -latex $< -o $@\n\n"; + print "%.html: %.v %.glob\n\t$(COQDOC) -glob-from $*.glob -html $< -o $@\n\n"; + print "%.g.tex: %.v\n\t$(COQDOC) -latex -g $< -o $@\n\n"; + print "%.g.html: %.v %.glob\n\t$(COQDOC) -glob-from $*.glob -html -g $< -o $@\n\n"; + print "%.v.d: %.v\n"; + print "\t$(COQDEP) -glob -slash $(COQLIBS) \"$<\" > \"$@\" || ( RV=$$?; rm -f \"$@\"; exit $${RV} )\n\n" in - let suffixes = ml_suffixes @ v_suffixes in - if suffixes <> [] then begin - print ".SUFFIXES: "; print_list " " suffixes; - print "\n\n" - end; - if !some_mlfile then ml_rules (); - if !some_vfile then v_rule () + if !some_mlfile then ml_rules (); + if !some_vfile then v_rule () let variables l = let rec var_aux = function @@ -174,71 +155,122 @@ let variables l = | Def(v,def) :: r -> print v; print "="; print def; print "\n"; var_aux r | _ :: r -> var_aux r in - section "Variables definitions."; - print "CAMLP4LIB=`camlp5 -where 2> /dev/null || camlp4 -where`\n"; - print "CAMLP4=`basename $CAMLP4LIB`\n"; - print "COQSRC=-I $(COQTOP)/kernel -I $(COQTOP)/lib \\ + section "Variables definitions."; + print "CAMLP4LIB:=$(shell $(CAMLBIN)camlp5 -where 2> /dev/null || $(CAMLBIN)camlp4 -where)\n"; + print "CAMLP4:=$(notdir $(CAMLP4LIB))\n"; + if Coq_config.local then + (print "COQSRC:=$(COQTOP)\n"; + print "COQSRCLIBS:=-I $(COQTOP)/kernel -I $(COQTOP)/lib \\ -I $(COQTOP)/library -I $(COQTOP)/parsing \\ -I $(COQTOP)/pretyping -I $(COQTOP)/interp \\ - -I $(COQTOP)/proofs -I $(COQTOP)/syntax -I $(COQTOP)/tactics \\ - -I $(COQTOP)/toplevel -I $(COQTOP)/contrib/correctness \\ - -I $(COQTOP)/contrib/extraction -I $(COQTOP)/contrib/field \\ - -I $(COQTOP)/contrib/fourier -I $(COQTOP)/contrib/graphs \\ + -I $(COQTOP)/proofs -I $(COQTOP)/tactics \\ + -I $(COQTOP)/toplevel -I $(COQTOP)/contrib/cc \\ + -I $(COQTOP)/contrib/dp -I $(COQTOP)/contrib/extraction \\ + -I $(COQTOP)/contrib/field -I $(COQTOP)/contrib/firstorder \\ + -I $(COQTOP)/contrib/fourier -I $(COQTOP)/contrib/funind \\ -I $(COQTOP)/contrib/interface -I $(COQTOP)/contrib/jprover \\ - -I $(COQTOP)/contrib/omega -I $(COQTOP)/contrib/romega \\ - -I $(COQTOP)/contrib/ring -I $(COQTOP)/contrib/xml \\ - -I $(CAMLP4LIB)\n"; - print "ZFLAGS=$(OCAMLLIBS) $(COQSRC)\n"; - if !opt = "-byte" then - print "override OPT=-byte\n" - else - print "OPT=\n"; - if !impredicative_set = true then print "OTHERFLAGS=-impredicative-set\n"; - print "COQFLAGS=-q $(OPT) $(COQLIBS) $(OTHERFLAGS) $(COQ_XML)\n"; - print "COQC=$(COQBIN)coqc\n"; - print "GALLINA=gallina\n"; - print "COQDOC=$(COQBIN)coqdoc\n"; - print "CAMLC=ocamlc -c\n"; - print "CAMLOPTC=ocamlopt -c\n"; - print "CAMLLINK=ocamlc\n"; - print "CAMLOPTLINK=ocamlopt\n"; - print "COQDEP=$(COQBIN)coqdep -c\n"; - print "GRAMMARS=grammar.cma\n"; - print "CAMLP4EXTEND=pa_extend.cmo pa_macro.cmo q_MLast.cmo\n"; - print "PP=-pp \"$(CAMLP4)o -I . -I $(COQTOP)/parsing $(CAMLP4EXTEND) $(GRAMMARS) -impl\"\n"; - var_aux l; - print "\n" + -I $(COQTOP)/contrib/micromega -I $(COQTOP)/contrib/omega \\ + -I $(COQTOP)/contrib/ring -I $(COQTOP)/contrib/romega \\ + -I $(COQTOP)/contrib/rtauto -I $(COQTOP)/contrib/setoid_ring \\ + -I $(COQTOP)/contrib/subtac -I $(COQTOP)/contrib/xml \\ + -I $(CAMLP4LIB)\n") + else + (print "COQSRC:=$(shell $(COQTOP)coqc -where)\n"; + print "COQSRCLIBS:=-I $(COQSRC)\n"); + print "ZFLAGS:=$(OCAMLLIBS) $(COQSRCLIBS)\n"; + if !opt = "-byte" then + print "override OPT:=-byte\n" + else + print "OPT:=\n"; + if !impredicative_set = true then print "OTHERFLAGS=-impredicative-set\n"; + (* Coq executables and relative variables *) + print "COQFLAGS:=-q $(OPT) $(COQLIBS) $(OTHERFLAGS) $(COQ_XML)\n"; + print "COQC:=$(COQBIN)coqc\n"; + print "COQDEP:=$(COQBIN)coqdep -c\n"; + print "GALLINA:=$(COQBIN)gallina\n"; + print "COQDOC:=$(COQBIN)coqdoc\n"; + (* Caml executables and relative variables *) + printf "CAMLC:=$(CAMLBIN)ocamlc -rectypes -c\n"; + printf "CAMLOPTC:=$(CAMLBIN)ocamlopt -rectypes -c\n"; + printf "CAMLLINK:=$(CAMLBIN)ocamlc -rectypes\n"; + printf "CAMLOPTLINK:=$(CAMLBIN)ocamlopt -rectypes\n"; + print "GRAMMARS:=grammar.cma\n"; + print "CAMLP4EXTEND:=pa_extend.cmo pa_macro.cmo q_MLast.cmo\n"; + + (if Coq_config.local then + print "PP:=-pp \"$(CAMLBIN)$(CAMLP4)o -I . -I $(COQTOP)/parsing $(CAMLP4EXTEND) $(GRAMMARS) -impl\"\n" + else + print "PP:=-pp \"$(CAMLBIN)$(CAMLP4)o -I . -I $(COQSRC) $(CAMLP4EXTEND) $(GRAMMARS) -impl\"\n"); + var_aux l; + print "\n" + +let absolute_dir dir = + let current = Sys.getcwd () in + Sys.chdir dir; + let dir' = Sys.getcwd () in + Sys.chdir current; + dir' + +let is_prefix dir1 dir2 = + let l1 = String.length dir1 in + let l2 = String.length dir2 in + dir1 = dir2 or (l1 < l2 & String.sub dir2 0 l1 = dir1 & dir2.[l1] = '/') + +let is_included dir = function + | RInclude (dir',_) -> is_prefix (absolute_dir dir') (absolute_dir dir) + | Include dir' -> absolute_dir dir = absolute_dir dir' + | _ -> false + +let dir_of_target t = + match t with + | RInclude (dir,_) -> dir + | Include dir -> dir + | _ -> assert false let include_dirs l = - let include_aux' includeR = - let rec include_aux = function - | [] -> [] - | Include x :: r -> ("-I " ^ x) :: (include_aux r) - | RInclude (p,l) :: r when includeR -> - let l' = if l = "" then "\"\"" else l in - ("-R " ^ p ^ " " ^ l') :: (include_aux r) - | _ :: r -> include_aux r - in - include_aux + let rec split_includes l = + match l with + | [] -> [], [] + | Include _ as i :: rem -> + let ri, rr = split_includes rem in + (i :: ri), rr + | RInclude _ as r :: rem -> + let ri, rr = split_includes rem in + ri, (r :: rr) + | _ :: rem -> split_includes rem + in + let rec parse_includes l = + match l with + | [] -> [] + | Include x :: rem -> ("-I " ^ x) :: parse_includes rem + | RInclude (p,l) :: rem -> + let l' = if l = "" then "\"\"" else l in + ("-R " ^ p ^ " " ^ l') :: parse_includes rem + | _ :: rem -> parse_includes rem in - let i_ocaml = "-I ." :: (include_aux' false l) in - let i_coq = "-I ." :: (include_aux' true l) in - section "Libraries definition."; - print "OCAMLLIBS="; print_list "\\\n " i_ocaml; print "\n"; - print "COQLIBS="; print_list "\\\n " i_coq; print "\n\n" + let l' = if List.exists (is_included ".") l then l else Include "." :: l in + let inc_i, inc_r = split_includes l' in + let inc_i' = List.filter (fun i -> not (List.exists (fun i' -> is_included (dir_of_target i) i') inc_r)) inc_i in + let str_i = parse_includes inc_i in + let str_i' = parse_includes inc_i' in + let str_r = parse_includes inc_r in + section "Libraries definition."; + print "OCAMLLIBS:="; print_list "\\\n " str_i; print "\n"; + print "COQLIBS:="; print_list "\\\n " str_i'; print " "; print_list "\\\n " str_r; print "\n"; + print "COQDOCLIBS:="; print_list "\\\n " str_r; print "\n\n" let rec special = function | [] -> [] | Special (file,deps,com) :: r -> (file,deps,com) :: (special r) | _ :: r -> special r - + let custom sps = let pr_sp (file,dependencies,com) = print file; print ": "; print dependencies; print "\n"; print "\t"; print com; print "\n\n" in - if sps <> [] then section "Custom targets."; - List.iter pr_sp sps + if sps <> [] then section "Custom targets."; + List.iter pr_sp sps let subdirs l = let rec subdirs_aux = function @@ -249,69 +281,69 @@ let subdirs l = print s; print ":\n\tcd "; print s; print " ; $(MAKE) all\n\n" in let sds = subdirs_aux l in - if sds <> [] then section "Subdirectories."; - List.iter pr_subdir sds; - section "Special targets."; - print ".PHONY: "; - print_list " " - ("all" :: "opt" :: "byte" :: "archclean" :: "clean" :: "install" - :: "depend" :: "html" :: sds); - print "\n\n"; - sds + if sds <> [] then section "Subdirectories."; + List.iter pr_subdir sds; + section "Special targets."; + print ".PHONY: "; + print_list " " + ("all" :: "opt" :: "byte" :: "archclean" :: "clean" :: "install" + :: "depend" :: "html" :: sds); + print "\n\n"; + sds -(* Extract gallina/html filenames (foo.v) from the list of all targets *) - -let rec other_files suff = function - | V n :: r -> - let f = (Filename.chop_suffix n ".vo") ^ suff in - f :: (other_files suff r) - | _ :: r -> - other_files suff r - | [] -> - [] - -let vfiles = other_files ".v" -let gfiles = other_files ".g" -let hfiles = other_files ".html" -let tfiles = other_files ".tex" -let vifiles = other_files ".vi" -let gtfiles l = List.map (fun f -> f ^ ".tex") (gfiles l) -let ghfiles l = List.map (fun f -> f ^ ".html") (gfiles l) -let vofiles = other_files ".vo" let all_target l = - let rec fnames = function - | ML n :: r -> n :: (fnames r) - | Subdir n :: r -> n :: (fnames r) - | V n :: r -> n :: (fnames r) - | Special (n,_,_) :: r -> n :: (fnames r) - | Include _ :: r -> fnames r - | RInclude _ :: r -> fnames r - | Def _ :: r -> fnames r - | [] -> [] + let rec parse_arguments l = + match l with + | ML n :: r -> let v,m,o = parse_arguments r in (v,n::m,o) + | Subdir n :: r -> let v,m,o = parse_arguments r in (v,m,n::o) + | V n :: r -> let v,m,o = parse_arguments r in (n::v,m,o) + | Special (n,_,_) :: r -> let v,m,o = parse_arguments r in (v,m,n::o) + | Include _ :: r -> parse_arguments r + | RInclude _ :: r -> parse_arguments r + | Def _ :: r -> parse_arguments r + | [] -> [],[],[] in - section "Definition of the \"all\" target."; - print "VFILES="; print_list "\\\n " (vfiles l); print "\n"; - print "VOFILES=$(VFILES:.v=.vo)\n"; - print "VIFILES=$(VFILES:.v=.vi)\n"; - print "GFILES=$(VFILES:.v=.g)\n"; - print "HTMLFILES=$(VFILES:.v=.html)\n"; - print "GHTMLFILES=$(VFILES:.v=.g.html)\n"; - print "\n"; - print "all: "; print_list "\\\n " (fnames l); - print "\n\n"; - if !some_vfile then begin - print "spec: $(VIFILES)\n\n"; - print "gallina: $(GFILES)\n\n"; - print "html: $(HTMLFILES)\n\n"; - print "gallinahtml: $(GHTMLFILES)\n\n"; - print "all.ps: $(VFILES)\n"; - print "\t$(COQDOC) -ps -o $@ `$(COQDEP) -sort -suffix .v $(VFILES)`\n\n"; - print "all-gal.ps: $(VFILES)\n"; - print "\t$(COQDOC) -ps -g -o $@ `$(COQDEP) -sort -suffix .v $(VFILES)`\n\n"; - print "\n\n" - end - + let + vfiles, mlfiles, other_targets = parse_arguments l + in + section "Definition of the \"all\" target."; + if !some_vfile then + begin + print "VFILES:="; print_list "\\\n " vfiles; print "\n"; + print "VOFILES:=$(VFILES:.v=.vo)\n"; + print "GLOBFILES:=$(VFILES:.v=.glob)\n"; + print "VIFILES:=$(VFILES:.v=.vi)\n"; + print "GFILES:=$(VFILES:.v=.g)\n"; + print "HTMLFILES:=$(VFILES:.v=.html)\n"; + print "GHTMLFILES:=$(VFILES:.v=.g.html)\n" + end; + if !some_mlfile then + begin + print "MLFILES:="; print_list "\\\n " mlfiles; print "\n"; + print "CMOFILES:=$(MLFILES:.ml=.cmo)\n"; + end; + print "\nall: "; + if !some_vfile then print "$(VOFILES) "; + if !some_mlfile then print "$(CMOFILES) "; + print_list "\\\n " other_targets; print "\n"; + if !some_vfile then + begin + print "spec: $(VIFILES)\n\n"; + print "gallina: $(GFILES)\n\n"; + print "html: $(GLOBFILES) $(VFILES)\n"; + print "\t- mkdir html\n"; + print "\t$(COQDOC) -toc -html $(COQDOCLIBS) -d html $(VFILES)\n\n"; + print "gallinahtml: $(GLOBFILES) $(VFILES)\n"; + print "\t- mkdir html\n"; + print "\t$(COQDOC) -toc -html -g $(COQDOCLIBS) -d html $(VFILES)\n\n"; + print "all.ps: $(VFILES)\n"; + print "\t$(COQDOC) -toc -ps $(COQDOCLIBS) -o $@ `$(COQDEP) -sort -suffix .v $(VFILES)`\n\n"; + print "all-gal.ps: $(VFILES)\n"; + print "\t$(COQDOC) -toc -ps -g $(COQDOCLIBS) -o $@ `$(COQDEP) -sort -suffix .v $(VFILES)`\n\n"; + print "\n\n" + end + let parse f = let rec string = parser | [< '' ' | '\n' | '\t' >] -> "" @@ -333,8 +365,8 @@ let parse f = in let c = open_in f in let res = args (Stream.of_channel c) in - close_in c; - res + close_in c; + res let rec process_cmd_line = function | [] -> @@ -348,8 +380,16 @@ let rec process_cmd_line = function | "-impredicative-set" :: r -> impredicative_set := true; process_cmd_line r | "-custom" :: com :: dependencies :: file :: r -> - some_file := true; - Special (file,dependencies,com) :: (process_cmd_line r) + let check_dep f = + if Filename.check_suffix f ".v" then + some_vfile := true + else if Filename.check_suffix f ".ml" then + some_mlfile := true + else + () + in + List.iter check_dep (Str.split (Str.regexp "[ \t]+") dependencies); + Special (file,dependencies,com) :: (process_cmd_line r) | "-I" :: d :: r -> Include d :: (process_cmd_line r) | "-R" :: p :: l :: r -> @@ -369,45 +409,39 @@ let rec process_cmd_line = function Def (v,def) :: (process_cmd_line r) | f :: r -> if Filename.check_suffix f ".v" then begin - some_vfile := true; - V (f^"o") :: (process_cmd_line r) - end else if Filename.check_suffix f ".ml" then begin - some_mlfile := true; - ML ((Filename.chop_suffix f "ml")^"cmo") :: (process_cmd_line r) + some_vfile := true; + V f :: (process_cmd_line r) + end else if Filename.check_suffix f ".ml" then begin + some_mlfile := true; + ML f :: (process_cmd_line r) end else - Subdir f :: (process_cmd_line r) - + Subdir f :: (process_cmd_line r) + let banner () = print -"############################################################################## -## The Calculus of Inductive Constructions ## -## ## -## Projet Coq ## -## ## -## INRIA ENS-CNRS ## -## Rocquencourt Lyon ## -## ## -## Coq V7 ## -## ## -## ## -############################################################################## +"########################################################################## +## v # The Coq Proof Assistant ## +## print x; print " ") l - + let command_line args = print "#\n# This Makefile was generated by the command line :\n"; print "# coq_makefile "; print_list args; print "\n#\n\n" - + let directories_deps l = let print_dep f dep = if dep <> [] then begin print f; print ": "; print_list dep; print "\n" end @@ -426,32 +460,33 @@ let directories_deps l = | _ :: l -> iter acc l in - iter ([],[]) l + iter ([],[]) l let do_makefile args = let l = process_cmd_line args in - banner (); - warning (); - command_line args; - variables l; - include_dirs l; - all_target l; - let sps = special l in - custom sps; - let sds = subdirs l in - implicit (); - standard sds sps; - (* TEST directories_deps l; *) - warning (); - if not (!output_channel == stdout) then close_out !output_channel; - exit 0 - + banner (); + warning (); + command_line args; + include_dirs l; + variables l; + all_target l; + let sps = special l in + custom sps; + let sds = subdirs l in + implicit (); + standard sds sps; + (* TEST directories_deps l; *) + includes (); + warning (); + if not (!output_channel == stdout) then close_out !output_channel; + exit 0 + let main () = let args = if Array.length Sys.argv = 1 then usage (); List.tl (Array.to_list Sys.argv) in - do_makefile args - + do_makefile args + let _ = Printexc.catch main () diff --git a/tools/coqdep.ml b/tools/coqdep.ml index e787cdb3..dc80476b 100644 --- a/tools/coqdep.ml +++ b/tools/coqdep.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: coqdep.ml 10196 2007-10-08 13:50:39Z notin $ *) +(* $Id: coqdep.ml 10746 2008-04-03 15:45:25Z notin $ *) open Printf open Coqdep_lexer @@ -22,9 +22,9 @@ let option_D = ref false let option_w = ref false let option_i = ref false let option_sort = ref false +let option_glob = ref false let option_slash = ref false - -let directories_added = ref false +let option_boot = ref false let suffixe = ref ".vo" let suffixe_spec = ref ".vi" @@ -41,6 +41,12 @@ let file_concat l = if l=[] then "" else List.fold_left (//) (List.hd l) (List.tl l) +let make_ml_module_name filename = + (* Computes a ML Module name from its physical name *) + let fn = try Filename.chop_extension filename with _ -> filename in + let bn = Filename.basename fn in + String.capitalize bn + (* Files specified on the command line *) let mlAccu = ref ([] : (string * string * dir) list) and mliAccu = ref ([] : (string * string * dir) list) @@ -49,28 +55,29 @@ and vAccu = ref ([] : (string * string) list) (* Queue operations *) let addQueue q v = q := v :: !q -let safe_addQueue clq q (k,v) = +let safe_hash_add clq q (k,v) = try - let v2 = List.assoc k !q in + let v2 = Hashtbl.find q k in if v<>v2 then let rec add_clash = function (k1,l1)::cltl when k=k1 -> (k1,v::l1)::cltl | cl::cltl -> cl::add_clash cltl | [] -> [(k,[v;v2])] in clq := add_clash !clq - with Not_found -> addQueue q (k,v) + with Not_found -> Hashtbl.add q k v (* Files found in the loadpaths *) -let mlKnown = ref ([] : (string * dir) list) -and mliKnown = ref ([] : (string * dir) list) -and vKnown = ref ([] : (string list * string) list) -and coqlibKnown = ref ([] : (string list * string) list) + +let mlKnown = (Hashtbl.create 19 : (string, dir) Hashtbl.t) +let mliKnown = (Hashtbl.create 19 : (string, dir) Hashtbl.t) +let vKnown = (Hashtbl.create 19 : (string list, string) Hashtbl.t) +let coqlibKnown = (Hashtbl.create 19 : (string list, unit) Hashtbl.t) let clash_v = ref ([]: (string list * string list) list) let warning_module_notfound f s = - eprintf "*** Warning : in file %s, module " f; + eprintf "*** Warning : in file %s, library " f; eprintf "%s.v is required and has not been found in loadpath !\n" (String.concat "." s); flush stderr @@ -88,7 +95,7 @@ let warning_clash file dir = let d2 = Filename.dirname f2 in let dl = List.map Filename.dirname (List.rev fl) in eprintf - "*** Warning : in file %s, \n required module %s is ambiguous!\n (found %s.v in " + "*** Warning : in file %s, \n required library %s is ambiguous!\n (found %s.v in " file (String.concat "." dir) f; List.iter (fun s -> eprintf "%s, " s) dl; eprintf "%s and %s)\n" d2 d1 @@ -96,15 +103,14 @@ let warning_clash file dir = let safe_assoc verbose file k = if verbose && List.mem_assoc k !clash_v then warning_clash file k; - List.assoc k !vKnown - + Hashtbl.find vKnown k let absolute_dir dir = let current = Sys.getcwd () in - Sys.chdir dir; - let dir' = Sys.getcwd () in - Sys.chdir current; - dir' + Sys.chdir dir; + let dir' = Sys.getcwd () in + Sys.chdir current; + dir' let absolute_file_name basename odir = let dir = match odir with Some dir -> dir | None -> "." in @@ -130,23 +136,23 @@ let traite_fichier_ML md ext = else begin addQueue deja_vu str; begin try - let mlidir = List.assoc str !mliKnown in + let mlidir = Hashtbl.find mliKnown str in let filename = file_name ([str],mlidir) in a_faire := !a_faire ^ " " ^ filename ^ ".cmi"; with Not_found -> try - let mldir = List.assoc str !mlKnown in + let mldir = Hashtbl.find mlKnown str in let filename = file_name ([str],mldir) in a_faire := !a_faire ^ " " ^ filename ^ ".cmo"; with Not_found -> () end; begin try - let mldir = List.assoc str !mlKnown in + let mldir = Hashtbl.find mlKnown str in let filename = file_name ([str],mldir) in a_faire_opt := !a_faire_opt ^ " " ^ filename ^ ".cmx" with Not_found -> try - let mlidir = List.assoc str !mliKnown in + let mlidir = Hashtbl.find mliKnown str in let filename = file_name ([str],mlidir) in a_faire_opt := !a_faire_opt ^ " " ^ filename ^ ".cmi" with Not_found -> () @@ -184,7 +190,7 @@ let sort () = | Require (_, sl) -> List.iter (fun s -> - try loop (List.assoc s !vKnown) + try loop (Hashtbl.find vKnown s) with Not_found -> ()) sl | RequireString (_, s) -> loop s @@ -216,7 +222,7 @@ let traite_fichier_Coq verbose f = printf " %s%s" (canonize file_str) (if spec then !suffixe_spec else !suffixe) with Not_found -> - if verbose && not (List.mem_assoc str !coqlibKnown) then + if verbose && not (Hashtbl.mem coqlibKnown str) then warning_module_notfound f str end) strl | RequireString (spec,s) -> @@ -224,30 +230,31 @@ let traite_fichier_Coq verbose f = if not (List.mem [str] !deja_vu_v) then begin addQueue deja_vu_v [str]; try - let file_str = List.assoc [str] !vKnown in + let file_str = Hashtbl.find vKnown [str] in printf " %s%s" (canonize file_str) (if spec then !suffixe_spec else !suffixe) with Not_found -> - begin try let _ = List.assoc [str] !coqlibKnown in () - with Not_found -> warning_notfound f s end + if not (Hashtbl.mem coqlibKnown [str]) then + warning_notfound f s end | Declare sl -> List.iter (fun str -> - if not (List.mem str !deja_vu_ml) then begin - addQueue deja_vu_ml str; - try - let mldir = List.assoc str !mlKnown in - printf " %s.cmo" (file_name ([str],mldir)) - with Not_found -> () - end) + let s = make_ml_module_name str in + if not (List.mem s !deja_vu_ml) then begin + addQueue deja_vu_ml s; + try + let mldir = Hashtbl.find mlKnown s in + printf " %s.cmo" (file_name ([String.uncapitalize s],mldir)) + with Not_found -> () + end) sl | Load str -> let str = Filename.basename str in if not (List.mem [str] !deja_vu_v) then begin addQueue deja_vu_v [str]; try - let file_str = List.assoc [str] !vKnown in + let file_str = Hashtbl.find vKnown [str] in printf " %s.v" (canonize file_str) with Not_found -> () end @@ -304,36 +311,37 @@ let traite_Declare f = let decl_list = ref ([] : string list) in let rec treat = function | s :: ll -> - if (List.mem_assoc s !mlKnown) & not (List.mem s !decl_list) then begin - let mldir = List.assoc s !mlKnown in - let fullname = file_name ([s],mldir) in - let depl = mL_dep_list s (fullname ^ ".ml") in - treat depl; - decl_list := s :: !decl_list - end; - treat ll + let s' = make_ml_module_name s in + if (Hashtbl.mem mlKnown s') & not (List.mem s' !decl_list) then begin + let mldir = Hashtbl.find mlKnown s in + let fullname = file_name ([(String.uncapitalize s')],mldir) in + let depl = mL_dep_list s (fullname ^ ".ml") in + treat depl; + decl_list := s :: !decl_list + end; + treat ll | [] -> () in - try - let chan = open_in f in - let buf = Lexing.from_channel chan in - begin try - while true do - let tok = coq_action buf in - (match tok with - | Declare sl -> - decl_list := []; - treat sl; - decl_list := List.rev !decl_list; - if !option_D then - affiche_Declare f !decl_list - else if !decl_list <> sl then - warning_Declare f !decl_list - | _ -> ()) - done - with Fin_fichier -> () end; - close_in chan - with Sys_error _ -> () + try + let chan = open_in f in + let buf = Lexing.from_channel chan in + begin try + while true do + let tok = coq_action buf in + (match tok with + | Declare sl -> + decl_list := []; + treat sl; + decl_list := List.rev !decl_list; + if !option_D then + affiche_Declare f !decl_list + else if !decl_list <> sl then + warning_Declare f !decl_list + | _ -> ()) + done + with Fin_fichier -> () end; + close_in chan + with Sys_error _ -> () let file_mem (f,_,d) = let rec loop = function @@ -367,11 +375,12 @@ let mL_dependencies () = let coq_dependencies () = List.iter (fun (name,_) -> - printf "%s%s: %s.v" name !suffixe name; + let glob = if !option_glob then " "^name^".glob" else "" in + printf "%s%s%s: %s.v" name !suffixe glob name; traite_fichier_Coq true (name ^ ".v"); printf "\n"; if !option_i then begin - printf "%s%s: %s.v" name !suffixe_spec name; + printf "%s%s%s: %s.v" name !suffixe_spec glob name; traite_fichier_Coq false (name ^ ".v"); printf "\n"; end; @@ -387,8 +396,8 @@ let declare_dependencies () = let rec warning_mult suf l = let tab = Hashtbl.create 151 in - List.iter - (fun (f,d) -> + Hashtbl.iter + (fun f d -> begin try let d' = Hashtbl.find tab f in if (Filename.dirname (file_name ([f],d))) @@ -400,163 +409,128 @@ let rec warning_mult suf l = Hashtbl.add tab f d) l -(* Gives the list of all the directories under [dir], including [dir] *) -let all_subdirs root_dir log_dir = - let l = ref [(root_dir,[log_dir])] in - let add f = l := f :: !l in - let rec traverse phys_dir dir = - let dirh = handle_unix_error opendir phys_dir in - try - while true do - let f = readdir dirh in - if f <> "." && f <> ".." then - let file = dir@[f] in - let filename = phys_dir//f in - if (stat filename).st_kind = S_DIR then begin - add (filename,file); - traverse filename file - end - done - with End_of_file -> - closedir dirh - in - traverse root_dir [log_dir]; List.rev !l - let usage () = eprintf "[ usage: coqdep [-w] [-I dir] [-R dir coqdir] [-coqlib dir] [-c] [-i] [-D] + ]\n"; flush stderr; exit 1 -let add_coqlib_known dir_name f = - let complete_name = dir_name//f in - let lib_name = Filename.basename dir_name in +let add_coqlib_known phys_dir log_dir f = + if Filename.check_suffix f ".vo" then + let basename = Filename.chop_suffix f ".vo" in + let name = log_dir@[basename] in + Hashtbl.add coqlibKnown [basename] (); + Hashtbl.add coqlibKnown name () + +let add_known phys_dir log_dir f = + if (Filename.check_suffix f ".ml" || Filename.check_suffix f ".mli" || Filename.check_suffix f ".ml4") then + let basename = make_ml_module_name f in + Hashtbl.add mlKnown basename (Some phys_dir) + else if Filename.check_suffix f ".v" then + let basename = Filename.chop_suffix f ".v" in + let name = log_dir@[basename] in + let file = phys_dir//basename in + let paths = [name;[basename]] in + List.iter + (fun n -> safe_hash_add clash_v vKnown (n,file)) paths + +(* Visits all the directories under [dir], including [dir], + or just [dir] if [recur=false] *) + +let rec add_directory recur add_file phys_dir log_dir = + let dirh = opendir phys_dir in + try + while true do + let f = readdir dirh in + (* we avoid . .. and all hidden files and subdirs (e.g. .svn) *) + if f.[0] <> '.' then + let phys_f = phys_dir//f in + match try (stat phys_f).st_kind with _ -> S_BLK with + | S_DIR when recur -> add_directory recur add_file phys_f (log_dir@[f]) + | S_REG -> add_file phys_dir log_dir f + | _ -> () + done + with End_of_file -> closedir dirh + +let add_dir add_file phys_dir log_dir = + try add_directory false add_file phys_dir log_dir with Unix_error _ -> () + +let add_rec_dir add_file phys_dir log_dir = + handle_unix_error (add_directory true add_file phys_dir) log_dir + +let rec treat_file old_dirname old_name = + let name = Filename.basename old_name + and new_dirname = Filename.dirname old_name in + let dirname = + match (old_dirname,new_dirname) with + | (d, ".") -> d + | (None,d) -> Some d + | (Some d1,d2) -> Some (d1//d2) + in + let complete_name = file_name ([name],dirname) in match try (stat complete_name).st_kind with _ -> S_BLK with + | S_DIR -> + (if name.[0] <> '.' then + let dir=opendir complete_name in + let newdirname = + match dirname with + | None -> name + | Some d -> d//name + in + try + while true do treat_file (Some newdirname) (readdir dir) done + with End_of_file -> closedir dir) | S_REG -> - if Filename.check_suffix f ".vo" then - let basename = Filename.chop_suffix f ".vo" in - addQueue coqlibKnown ([basename],complete_name); - addQueue coqlibKnown (["Coq";lib_name;basename],complete_name) + if Filename.check_suffix name ".ml" then + let basename = Filename.chop_suffix name ".ml" in + addQueue mlAccu (basename,".ml",dirname) + else if Filename.check_suffix name ".ml4" then + let basename = Filename.chop_suffix name ".ml4" in + addQueue mlAccu (basename,".ml4",dirname) + else if Filename.check_suffix name ".mli" then + let basename = Filename.chop_suffix name ".mli" in + addQueue mliAccu (basename,".mli",dirname) + else if Filename.check_suffix name ".v" then + let basename = Filename.chop_suffix name ".v" in + let name = file_name ([basename],dirname) in + addQueue vAccu (name, absolute_file_name basename dirname) | _ -> () -let add_coqlib_directory dir_name = - match try (stat dir_name).st_kind with _ -> S_BLK with - | S_DIR -> - (let dir = opendir dir_name in - try - while true do add_coqlib_known dir_name (readdir dir) done - with End_of_file -> closedir dir) - | _ -> () +let rec parse = function + | "-c" :: ll -> option_c := true; parse ll + | "-D" :: ll -> option_D := true; parse ll + | "-w" :: ll -> option_w := true; parse ll + | "-i" :: ll -> option_i := true; parse ll + | "-boot" :: ll -> option_boot := true; parse ll + | "-sort" :: ll -> option_sort := true; parse ll + | "-glob" :: ll -> option_glob := true; parse ll + | "-I" :: r :: ll -> add_dir add_known r []; parse ll + | "-I" :: [] -> usage () + | "-R" :: r :: ln :: ll -> add_rec_dir add_known r [ln]; parse ll + | "-R" :: ([] | [_]) -> usage () + | "-coqlib" :: (r :: ll) -> coqlib := r; parse ll + | "-coqlib" :: [] -> usage () + | "-suffix" :: (s :: ll) -> suffixe := s ; suffixe_spec := s; parse ll + | "-suffix" :: [] -> usage () + | "-slash" :: ll -> option_slash := true; parse ll + | f :: ll -> treat_file None f; parse ll + | [] -> () let coqdep () = - let lg_command = Array.length Sys.argv in - if lg_command < 2 then usage (); - let rec treat old_dirname old_name = - let name = Filename.basename old_name - and new_dirname = Filename.dirname old_name in - let dirname = - match (old_dirname,new_dirname) with - | (d, ".") -> d - | (None,d) -> Some d - | (Some d1,d2) -> Some (d1//d2) - in - let complete_name = file_name ([name],dirname) in - match try (stat complete_name).st_kind with _ -> S_BLK with - | S_DIR -> - (if name <> "." & name <> ".." then - let dir=opendir complete_name in - let newdirname = - match dirname with - | None -> name - | Some d -> d//name - in - try - while true do treat (Some newdirname) (readdir dir) done - with End_of_file -> closedir dir) - | S_REG -> - if Filename.check_suffix name ".ml" then - let basename = Filename.chop_suffix name ".ml" in - addQueue mlAccu (basename,".ml",dirname) - else if Filename.check_suffix name ".ml4" then - let basename = Filename.chop_suffix name ".ml4" in - addQueue mlAccu (basename,".ml4",dirname) - else if Filename.check_suffix name ".mli" then - let basename = Filename.chop_suffix name ".mli" in - addQueue mliAccu (basename,".mli",dirname) - else if Filename.check_suffix name ".v" then - let basename = Filename.chop_suffix name ".v" in - let name = file_name ([basename],dirname) in - addQueue vAccu (name, absolute_file_name basename dirname) - | _ -> () - in - let add_known phys_dir log_dir f = - let complete_name = phys_dir//f in - match try (stat complete_name).st_kind with _ -> S_BLK with - | S_REG -> - if Filename.check_suffix f ".ml" then - let basename = Filename.chop_suffix f ".ml" in - addQueue mlKnown (basename,Some phys_dir) - else if Filename.check_suffix f ".ml4" then - let basename = Filename.chop_suffix f ".ml4" in - addQueue mlKnown (basename,Some phys_dir) - else if Filename.check_suffix f ".mli" then - let basename = Filename.chop_suffix f ".mli" in - addQueue mliKnown (basename,Some phys_dir) - else if Filename.check_suffix f ".v" then - let basename = Filename.chop_suffix f ".v" in - let name = log_dir@[basename] in - let file = phys_dir//basename in - let paths = [name;[basename]] in - List.iter - (fun n -> safe_addQueue clash_v vKnown (n,file)) paths - | _ -> () in - let add_directory (phys_dir, log_dir) = - directories_added := true; - match try (stat phys_dir).st_kind with _ -> S_BLK with - | S_DIR -> - (let dir = opendir phys_dir in - try - while true do - add_known phys_dir log_dir (readdir dir) done - with End_of_file -> closedir dir) - | _ -> () - in - let add_rec_directory dir_name log_name = - List.iter add_directory (all_subdirs dir_name log_name) - in - let rec parse = function - | "-c" :: ll -> option_c := true; parse ll - | "-D" :: ll -> option_D := true; parse ll - | "-w" :: ll -> option_w := true; parse ll - | "-i" :: ll -> option_i := true; parse ll - | "-sort" :: ll -> option_sort := true; parse ll - | "-I" :: r :: ll -> add_directory (r, []); parse ll - | "-I" :: [] -> usage () - | "-R" :: r :: ln :: ll -> add_rec_directory r ln; parse ll - | "-R" :: ([] | [_]) -> usage () - | "-coqlib" :: (r :: ll) -> coqlib := r; parse ll - | "-coqlib" :: [] -> usage () - | "-suffix" :: (s :: ll) -> suffixe := s ; suffixe_spec := s; parse ll - | "-suffix" :: [] -> usage () - | "-slash" :: ll -> option_slash := true; parse ll - | f :: ll -> treat None f; parse ll - | [] -> () - in - if not !directories_added then add_directory (".", []); + if Array.length Sys.argv < 2 then usage (); parse (List.tl (Array.to_list Sys.argv)); - List.iter - (fun (s,_) -> add_coqlib_directory s) - (all_subdirs (!coqlib//"theories") "Coq"); - List.iter - (fun (s,_) -> add_coqlib_directory s) - (all_subdirs (!coqlib//"contrib") "Coq"); - add_coqlib_directory (!coqlib//"user-contrib"); - mliKnown := !mliKnown @ (List.map (fun (f,_,d) -> (f,d)) !mliAccu); - mlKnown := !mlKnown @ (List.map (fun (f,_,d) -> (f,d)) !mlAccu); - warning_mult ".mli" !mliKnown; - warning_mult ".ml" !mlKnown; -(* warning_mult ".v" (List.map (fun (s,d) -> (file_concat s, d)) - !vKnown);*) + if !option_boot then begin + add_rec_dir add_known "theories" ["Coq"]; + add_rec_dir add_known "contrib" ["Coq"] + end else begin + add_rec_dir add_coqlib_known (!coqlib//"theories") ["Coq"]; + add_rec_dir add_coqlib_known (!coqlib//"contrib") ["Coq"]; + add_dir add_coqlib_known (!coqlib//"user-contrib") [] + end; + List.iter (fun (f,_,d) -> Hashtbl.add mliKnown f d) !mliAccu; + List.iter (fun (f,_,d) -> Hashtbl.add mlKnown f d) !mlAccu; + warning_mult ".mli" mliKnown; + warning_mult ".ml" mlKnown; if !option_sort then begin sort (); exit 0 end; if !option_c && not !option_D then mL_dependencies (); if not !option_D then coq_dependencies (); diff --git a/tools/coqdep_lexer.mll b/tools/coqdep_lexer.mll index 8ecab3b4..cc9f2175 100755 --- a/tools/coqdep_lexer.mll +++ b/tools/coqdep_lexer.mll @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: coqdep_lexer.mll 8737 2006-04-26 21:55:21Z herbelin $ i*) +(*i $Id: coqdep_lexer.mll 10721 2008-03-26 14:40:30Z notin $ i*) { @@ -215,7 +215,7 @@ and modules = parse | '"' [^'"']* '"' { let lex = (Lexing.lexeme lexbuf) in let str = String.sub lex 1 (String.length lex - 2) in - mllist := str :: !mllist; modules lexbuf } + mllist := str :: !mllist; modules lexbuf} | _ { (Declare (List.rev !mllist)) } and qual_id = parse diff --git a/tools/coqdoc/cdglobals.ml b/tools/coqdoc/cdglobals.ml index 8a774876..44b9bd3c 100644 --- a/tools/coqdoc/cdglobals.ml +++ b/tools/coqdoc/cdglobals.ml @@ -26,14 +26,18 @@ let out_to = ref MultFiles let out_channel = ref stdout let open_out_file f = - let f = if !output_dir <> "" then Filename.concat !output_dir f else f in + let f = if !output_dir <> "" && Filename.is_relative f then Filename.concat !output_dir f else f in out_channel := open_out f let close_out_file () = close_out !out_channel let header_trailer = ref true -let quiet = ref false +let header_file = ref "" +let header_file_spec = ref false +let footer_file = ref "" +let footer_file_spec = ref false +let quiet = ref true let light = ref false let gallina = ref false let short = ref false diff --git a/tools/coqdoc/coqdoc.sty b/tools/coqdoc/coqdoc.sty index 2c07b9fc..d31314c5 100644 --- a/tools/coqdoc/coqdoc.sty +++ b/tools/coqdoc/coqdoc.sty @@ -8,20 +8,20 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{coqdoc}[2002/02/11] -% Headings -\usepackage{fancyhdr} -\newcommand{\coqdocleftpageheader}{\thepage\ -- \today} -\newcommand{\coqdocrightpageheader}{\today\ -- \thepage} -\pagestyle{fancyplain} +% % Headings +% \usepackage{fancyhdr} +% \newcommand{\coqdocleftpageheader}{\thepage\ -- \today} +% \newcommand{\coqdocrightpageheader}{\today\ -- \thepage} +% \pagestyle{fancyplain} -%BEGIN LATEX -\headsep 8mm -\renewcommand{\plainheadrulewidth}{0.4pt} -\renewcommand{\plainfootrulewidth}{0pt} -\lhead[\coqdocleftpageheader]{\leftmark} -\rhead[\leftmark]{\coqdocrightpageheader} -\cfoot{} -%END LATEX +% %BEGIN LATEX +% \headsep 8mm +% \renewcommand{\plainheadrulewidth}{0.4pt} +% \renewcommand{\plainfootrulewidth}{0pt} +% \lhead[\coqdocleftpageheader]{\leftmark} +% \rhead[\leftmark]{\coqdocrightpageheader} +% \cfoot{} +% %END LATEX % Hevea puts to much space with \medskip and \bigskip %HEVEA\renewcommand{\medskip}{} @@ -36,11 +36,27 @@ %END LATEX % macro for typesetting keywords -\newcommand{\coqdockw}[1]{\textsf{#1}} +\newcommand{\coqdockw}[1]{\texttt{#1}} -% macro for typesetting identifiers +% macro for typesetting variable identifiers \newcommand{\coqdocid}[1]{\textit{#1}} +% macro for typesetting constant identifiers +\newcommand{\coqdoccst}[1]{\textsf{#1}} + +% macro for typesetting module identifiers +\newcommand{\coqdocmod}[1]{\textsc{\textsf{#1}}} + +% macro for typesetting module constant identifiers (e.g. Parameters in +% module types) +\newcommand{\coqdocax}[1]{\textsl{\textsf{#1}}} + +% macro for typesetting inductive type identifiers +\newcommand{\coqdocind}[1]{\textbf{\textsf{#1}}} + +% macro for typesetting constructor identifiers +\newcommand{\coqdocconstr}[1]{\textsf{#1}} + % newline and indentation %BEGIN LATEX \newcommand{\coqdoceol}{\setlength\parskip{0pt}\par} @@ -52,6 +68,86 @@ % macro for typesetting the title of a module implementation \newcommand{\coqdocmodule}[1]{\chapter{Module #1}\markboth{Module #1}{} } +\usepackage{ifpdf} +\ifpdf + \usepackage[pdftex]{hyperref} + \hypersetup{raiselinks=true,colorlinks=true,linkcolor=black} + \usepackage[all]{hypcap} + + \newcommand{\coqdef}[3]{\phantomsection\hypertarget{coq:#1}{#3}} + \newcommand{\coqref}[2]{\hyperlink{coq:#1}{#2}} + \newcommand{\identref}[2]{\hyperlink{coq:#1}{\textsf {#2}}} + \newcommand{\coqlibrary}[2]{\cleardoublepage\phantomsection + \hypertarget{coq:#1}{\chapter{Library \coqdoccst{#2}}}} +\else + \newcommand{\coqdef}[3]{#3} + \newcommand{\coqref}[2]{#2} + \newcommand{\identref}[2]{\textsf {#2}} + \newcommand{\coqlibrary}[2]{\cleardoublepage\chapter{Library \coqdoccst{#2}}} +\fi +\usepackage{xr} + +%\usepackage{color} +%\usepackage{multind} +%\newcommand{\coqdef}[3]{\hypertarget{coq:#1}{\index{coq}{#1@#2|hyperpage}#3}} + + + +\newcommand{\coqdocvar}[1]{{\textit{#1}}} +\newcommand{\coqdoctac}[1]{{\texttt{#1}}} + + +\newcommand{\coqdefinition}[2]{\coqdef{#1}{#2}{\coqdoccst{#2}}} +\newcommand{\coqdefinitionref}[2]{\coqref{#1}{\coqdoccst{#2}}} + +%\newcommand{\coqvariable}[2]{\coqdef{#1}{#2}{\coqdocid{#2}}} +%\newcommand{\coqaxiom}[2]{\coqdef{#1}{#2}{\coqdocid{#2}}} +\newcommand{\coqvariable}[2]{\coqdocid{#2}} + +\newcommand{\coqinductive}[2]{\coqdef{#1}{#2}{\coqdocind{#2}}} +\newcommand{\coqinductiveref}[2]{\coqref{#1}{\coqdocind{#2}}} + +\newcommand{\coqconstructor}[2]{\coqdef{#1}{#2}{\coqdocconstr{#2}}} +\newcommand{\coqconstructorref}[2]{\coqref{#1}{\coqdocconstr{#2}}} + +\newcommand{\coqlemma}[2]{\coqdef{#1}{#2}{\coqdoccst{#2}}} +\newcommand{\coqlemmaref}[2]{\coqref{#1}{\coqdoccst{#2}}} + +\newcommand{\coqclass}[2]{\coqdef{#1}{#2}{\coqdocind{#2}}} +\newcommand{\coqclassref}[2]{\coqref{#1}{\coqdocind{#2}}} + +\newcommand{\coqinstance}[2]{\coqdef{#1}{#2}{\coqdoccst{#2}}} +\newcommand{\coqinstanceref}[2]{\coqref{#1}{\coqdoccst{#2}}} + +\newcommand{\coqmethod}[2]{\coqdef{#1}{#2}{\coqdoccst{#2}}} +\newcommand{\coqmethodref}[2]{\coqref{#1}{\coqdoccst{#2}}} + +\newcommand{\coqabbreviation}[2]{\coqdef{#1}{#2}{\coqdoccst{#2}}} +\newcommand{\coqabbreviationref}[2]{\coqref{#1}{\coqdoccst{#2}}} + +\newcommand{\coqrecord}[2]{\coqdef{#1}{#2}{\coqdocind{#2}}} +\newcommand{\coqrecordref}[2]{\coqref{#1}{\coqdocind{#2}}} + +\newcommand{\coqprojection}[2]{\coqdef{#1}{#2}{\coqdoccst{#2}}} +\newcommand{\coqprojectionref}[2]{\coqref{#1}{\coqdoccst{#2}}} + +\newcommand{\coqnotationref}[2]{\coqref{#1}{\coqdockw{#2}}} + +\newcommand{\coqsection}[2]{\coqdef{#1}{#2}{\coqdoccst{#2}}} +\newcommand{\coqsectionref}[2]{\coqref{#1}{\coqdoccst{#2}}} + +%\newcommand{\coqlibrary}[2]{\chapter{Library \coqdoccst{#2}}\label{coq:#1}} + +%\newcommand{\coqlibraryref}[2]{\ref{coq:#1}} + +\newcommand{\coqlibraryref}[2]{\coqref{#1}{\coqdoccst{#2}}} + +\newcommand{\coqaxiom}[2]{\coqdef{#1}{#2}{\coqdocax{#2}}} +\newcommand{\coqaxiomref}[2]{\coqref{#1}{\coqdocax{#2}}} + +\newcommand{\coqmodule}[2]{\coqdef{#1}{#2}{\coqdocmod{#2}}} +\newcommand{\coqmoduleref}[2]{\coqref{#1}{\coqdocmod{#2}}} + %HEVEA\newcommand{\lnot}{\coqwkw{not}} %HEVEA\newcommand{\lor}{\coqwkw{or}} diff --git a/tools/coqdoc/index.mli b/tools/coqdoc/index.mli index 4b53d6ff..1da8ebd7 100644 --- a/tools/coqdoc/index.mli +++ b/tools/coqdoc/index.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: index.mli 8617 2006-03-08 10:47:12Z notin $ i*) +(*i $Id: index.mli 11065 2008-06-06 22:39:43Z msozeau $ i*) open Cdglobals @@ -19,13 +19,23 @@ type entry_type = | Inductive | Constructor | Lemma + | Record + | Projection + | Instance + | Class + | Method | Variable | Axiom | TacticDefinition + | Abbreviation + | Notation + | Section + +val type_name : entry_type -> string type index_entry = | Def of string * entry_type - | Ref of coq_module * string + | Ref of coq_module * string * entry_type | Mod of coq_module * string val find : coq_module -> loc -> index_entry @@ -42,7 +52,7 @@ val scan_file : string -> coq_module -> unit (*s Read globalizations from a file (produced by coqc -dump-glob) *) -val read_glob : string -> unit +val read_glob : string -> coq_module (*s Indexes *) @@ -51,6 +61,8 @@ type 'a index = { idx_entries : (char * (string * 'a) list) list; idx_size : int } +val current_library : string ref + val all_entries : unit -> (coq_module * entry_type) index * (entry_type * coq_module index) list diff --git a/tools/coqdoc/index.mll b/tools/coqdoc/index.mll index 5b281b8b..fc2090dc 100644 --- a/tools/coqdoc/index.mll +++ b/tools/coqdoc/index.mll @@ -1,3 +1,4 @@ +(* -*- compile-command: "make -C ../.. bin/coqdoc" -*- *) (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* "<>" then + if id <> "<>" then + sp ^ "." ^ id + else sp + else if id <> "<>" + then id + else "" + +let add_def loc ty sp id = + Hashtbl.add table (!current_library, loc) (Def (full_ident sp id, ty)) +let add_ref m loc m' sp id ty = + Hashtbl.add table (m, loc) (Ref (m', full_ident sp id, ty)) + let add_mod m loc m' id = Hashtbl.add table (m, loc) (Mod (m', id)) let find m l = Hashtbl.find table (m, l) - (*s Manipulating path prefixes *) type stack = string list @@ -99,14 +118,15 @@ let make_fullid id = else id + (* Coq modules *) let split_sp s = try let i = String.rindex s '.' in - String.sub s 0 i, String.sub s (i + 1) (String.length s - i - 1) - with Not_found -> - "", s + String.sub s 0 i, String.sub s (i + 1) (String.length s - i - 1) + with + Not_found -> "", s let modules = Hashtbl.create 97 let local_modules = Hashtbl.create 97 @@ -118,8 +138,7 @@ let add_module m = type module_kind = Local | Coqlib | Unknown -let coq_module m = - String.length m >= 4 && String.sub m 0 4 = "Coq." +let coq_module m = String.length m >= 4 && String.sub m 0 4 = "Coq." let find_module m = if Hashtbl.mem local_modules m then @@ -129,14 +148,6 @@ let find_module m = else Unknown -let ref_module loc s = - try - let n = String.length s in - let i = String.rindex s ' ' in - let id = String.sub s (i+1) (n-i-1) in - add_mod !current_library (loc+i+1) (Hashtbl.find modules id) id - with Not_found -> - () (* Building indexes *) @@ -181,10 +192,18 @@ let type_name = function | Inductive -> "inductive" | Constructor -> "constructor" | Lemma -> "lemma" + | Record -> "record" + | Projection -> "projection" + | Instance -> "instance" + | Class -> "class" + | Method -> "method" | Variable -> "variable" | Axiom -> "axiom" | TacticDefinition -> "tactic" - + | Abbreviation -> "abbreviation" + | Notation -> "notation" + | Section -> "section" + let all_entries () = let gl = ref [] in let add_g s m t = gl := (s,(m,t)) :: !gl in @@ -209,6 +228,8 @@ let all_entries () = } (*s Shortcuts for regular expressions. *) +let digit = ['0'-'9'] +let num = digit+ let space = [' ' '\010' '\013' '\009' '\012'] @@ -225,16 +246,18 @@ let end_hide = "(*" space* "end" space+ "hide" space* "*)" (*s Indexing entry point. *) rule traverse = parse - | "Definition" space + | ("Program" space+)? "Definition" space { current_type := Definition; index_ident lexbuf; traverse lexbuf } | "Tactic" space+ "Definition" space { current_type := TacticDefinition; index_ident lexbuf; traverse lexbuf } | ("Axiom" | "Parameter") space { current_type := Axiom; index_ident lexbuf; traverse lexbuf } - | "Fixpoint" space + | ("Program" space+)? "Fixpoint" space { current_type := Definition; index_ident lexbuf; fixpoint lexbuf; traverse lexbuf } - | ("Lemma" | "Theorem") space + | ("Program" space+)? ("Lemma" | "Theorem") space + { current_type := Lemma; index_ident lexbuf; traverse lexbuf } + | "Obligation" space num ("of" ident)? { current_type := Lemma; index_ident lexbuf; traverse lexbuf } | "Inductive" space { current_type := Inductive; @@ -247,8 +270,8 @@ rule traverse = parse | "Variable" 's'? space { current_type := Variable; index_idents lexbuf; traverse lexbuf } ***i*) - | "Require" (space+ ("Export"|"Import"))? space+ ident - { ref_module (lexeme_start lexbuf) (lexeme lexbuf); traverse lexbuf } + | "Require" (space+ ("Export"|"Import"))? + { module_refs lexbuf; traverse lexbuf } | "End" space+ { end_ident lexbuf; traverse lexbuf } | begin_hide @@ -277,7 +300,7 @@ and index_ident = parse | Lemma -> make_fullid id | _ -> id in - add_def (lexeme_start lexbuf) !current_type fullid } + add_def (lexeme_start lexbuf) !current_type "" fullid } | eof { () } | _ @@ -289,7 +312,7 @@ and index_idents = parse | space+ | ',' { index_idents lexbuf } | ident - { add_def (lexeme_start lexbuf) !current_type (lexeme lexbuf); + { add_def (lexeme_start lexbuf) !current_type "" (lexeme lexbuf); index_idents lexbuf } | eof { () } @@ -369,14 +392,52 @@ and module_ident = parse { () } | ident { let id = lexeme lexbuf in - begin_module id; add_def (lexeme_start lexbuf) !current_type id } + begin_module id; add_def (lexeme_start lexbuf) !current_type "" id } | eof { () } | _ { () } +(*s parse module names *) + +and module_refs = parse + | space+ + { module_refs lexbuf } + | ident + { let id = lexeme lexbuf in + (try + add_mod !current_library (lexeme_start lexbuf) (Hashtbl.find modules id) id + with + Not_found -> () + ); + module_refs lexbuf } + | eof + { () } + | _ + { () } + { - + let type_of_string = function + | "def" | "coe" | "subclass" | "canonstruc" + | "ex" | "scheme" -> Definition + | "prf" | "thm" -> Lemma + | "ind" | "coind" -> Inductive + | "constr" -> Constructor + | "rec" | "corec" -> Record + | "proj" -> Projection + | "class" -> Class + | "meth" -> Method + | "inst" -> Instance + | "var" -> Variable + | "defax" | "prfax" | "ax" -> Axiom + | "syndef" -> Abbreviation + | "not" -> Notation + | "lib" -> Library + | "mod" | "modtype" -> Module + | "tac" -> TacticDefinition + | "sec" -> Section + | s -> raise (Invalid_argument ("type_of_string:" ^ s)) + let read_glob f = let c = open_in f in let cur_mod = ref "" in @@ -387,22 +448,22 @@ and module_ident = parse if n > 0 then begin match s.[0] with | 'F' -> - cur_mod := String.sub s 1 (n - 1) + cur_mod := String.sub s 1 (n - 1); + current_library := !cur_mod | 'R' -> (try - let i = String.index s ' ' in - let j = String.index_from s (i+1) ' ' in - let loc = int_of_string (String.sub s 1 (i - 1)) in - let lib_dp = String.sub s (i + 1) (j - i - 1) in - let full_id = String.sub s (j + 1) (n - j - 1) in - add_ref !cur_mod loc lib_dp full_id - with Not_found -> - ()) - | _ -> () + Scanf.sscanf s "R%d %s %s %s %s" + (fun loc lib_dp sp id ty -> + add_ref !cur_mod loc lib_dp sp id (type_of_string ty)) + with _ -> ()) + | _ -> + try Scanf.sscanf s "%s %d %s %s" + (fun ty loc sp id -> add_def loc (type_of_string ty) sp id) + with Scanf.Scan_failure _ -> () end - done + done; assert false with End_of_file -> - close_in c + close_in c; !cur_mod let scan_file f m = init_stack (); current_library := m; diff --git a/tools/coqdoc/main.ml b/tools/coqdoc/main.ml index 18a44a44..7111187f 100644 --- a/tools/coqdoc/main.ml +++ b/tools/coqdoc/main.ml @@ -1,3 +1,4 @@ +(* -*- compile-command: "make -C ../.. bin/coqdoc" -*- *) (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* on 9 & 10 Mar 2004: * - handling of absolute filenames (function coq_module) @@ -19,50 +20,53 @@ *) open Cdglobals -open Filename open Printf -open Output -open Pretty (*s \textbf{Usage.} Printed on error output. *) let usage () = prerr_endline ""; prerr_endline "Usage: coqdoc "; - prerr_endline " --html produce a HTML document (default)"; - prerr_endline " --latex produce a LaTeX document"; - prerr_endline " --texmacs produce a TeXmacs document"; - prerr_endline " --dvi output the DVI"; - prerr_endline " --ps output the PostScript"; - prerr_endline " --stdout write output to stdout"; - prerr_endline " -o write output in file "; - prerr_endline " -d

output files into directory "; - prerr_endline " -g (gallina) skip proofs"; - prerr_endline " -s (short) no titles for files"; - prerr_endline " -l light mode (only defs and statements)"; - prerr_endline " -t give a title to the document"; - prerr_endline " --body-only suppress LaTeX/HTML header and trailer"; - prerr_endline " --no-index do not output the index"; - prerr_endline " --multi-index index split in multiple files"; - prerr_endline " --toc output a table of contents"; - prerr_endline " --vernac consider as a .v file"; - prerr_endline " --tex consider as a .tex file"; - prerr_endline " -p insert in LaTeX preamble"; - prerr_endline " --files-from read file names to process in "; - prerr_endline " --quiet quiet mode"; - prerr_endline " --glob-from read Coq globalizations from file "; - prerr_endline " --no-externals no links to Coq standard library"; - prerr_endline " --coqlib set URL for Coq standard library"; - prerr_endline " (default is http://coq.inria.fr/library/)"; - prerr_endline " --coqlib_path set the path where Coq files are installed"; - prerr_endline " -R map physical dir to Coq dir"; - prerr_endline " --latin1 set ISO-8859-1 input language"; - prerr_endline " --utf8 set UTF-8 input language"; - prerr_endline " --charset set HTML charset"; - prerr_endline " --inputenc set LaTeX input encoding"; + prerr_endline " --html produce a HTML document (default)"; + prerr_endline " --latex produce a LaTeX document"; + prerr_endline " --texmacs produce a TeXmacs document"; + prerr_endline " --dvi output the DVI"; + prerr_endline " --ps output the PostScript"; + prerr_endline " --pdf output the Pdf"; + prerr_endline " --stdout write output to stdout"; + prerr_endline " -o write output in file "; + prerr_endline " -d output files into directory "; + prerr_endline " -g (gallina) skip proofs"; + prerr_endline " -s (short) no titles for files"; + prerr_endline " -l light mode (only defs and statements)"; + prerr_endline " -t give a title to the document"; + prerr_endline " --body-only suppress LaTeX/HTML header and trailer"; + prerr_endline " --with-header prepend as html reader"; + prerr_endline " --with-footer append as html footer"; + prerr_endline " --no-index do not output the index"; + prerr_endline " --multi-index index split in multiple files"; + prerr_endline " --toc output a table of contents"; + prerr_endline " --vernac consider as a .v file"; + prerr_endline " --tex consider as a .tex file"; + prerr_endline " -p insert in LaTeX preamble"; + prerr_endline " --files-from read file names to process in "; + prerr_endline " --quiet quiet mode (default)"; + prerr_endline " --verbose verbose mode"; + prerr_endline " --no-externals no links to Coq standard library"; + prerr_endline " --coqlib set URL for Coq standard library"; + prerr_endline " (default is http://coq.inria.fr/library/)"; + prerr_endline " --coqlib_path set the path where Coq files are installed"; + prerr_endline " -R map physical dir to Coq dir"; + prerr_endline " --latin1 set ISO-8859-1 input language"; + prerr_endline " --utf8 set UTF-8 input language"; + prerr_endline " --charset set HTML charset"; + prerr_endline " --inputenc set LaTeX input encoding"; prerr_endline ""; exit 1 +let obsolete s = + eprintf "Warning: option %s is now obsolete; please update your scripts\n" s + (*s \textbf{Banner.} Always printed. Notice that it is printed on error output, so that when the output of [coqdoc] is redirected this header is not (unless both standard and error outputs are redirected, of @@ -74,7 +78,7 @@ let banner () = flush stderr let target_full_name f = - match !target_language with + match !Cdglobals.target_language with | HTML -> f ^ ".html" | _ -> f ^ ".tex" @@ -88,95 +92,70 @@ let check_if_file_exists f = eprintf "\ncoqdoc: %s: no such file\n" f; exit 1 end - + + +(*s Manipulations of paths and path aliases *) + +let normalize_path p = + (* We use the Unix subsystem to normalize a physical path (relative + or absolute) and get rid of symbolic links, relative links (like + ./ or ../ in the middle of the path; it's tricky but it + works... *) + (* Rq: Sys.getcwd () returns paths without '/' at the end *) + let orig = Sys.getcwd () in + Sys.chdir p; + let res = Sys.getcwd () in + Sys.chdir orig; + res + +let normalize_filename f = + let basename = Filename.basename f in + let dirname = Filename.dirname f in + Filename.concat (normalize_path dirname) basename + +(* [paths] maps a physical path to a name *) let paths = ref [] -let add_path m l = paths := (m,l) :: !paths +let add_path dir name = + (* if dir is relative we add both the relative and absolute name *) + let p = normalize_path dir in + paths := (p,name) :: !paths -let exists_dir dir = - try let _ = Unix.opendir dir in true with Unix.Unix_error _ -> false - -let add_rec_path f l = - let rec traverse abs rel = - add_path abs rel; - let dirh = Unix.opendir abs in - try - while true do - let f = Unix.readdir dirh in - if f <> "" && f.[0] <> '.' && f <> "CVS" then - let abs' = Filename.concat abs f in - try - if exists_dir abs' then traverse abs' (rel ^ "." ^ f) - with Unix.Unix_error _ -> - () - done - with End_of_file -> - Unix.closedir dirh - in - if exists_dir f then traverse f l - (* turn A/B/C into A.B.C *) -let make_path = Str.global_replace (Str.regexp "/") ".";; +let name_of_path = Str.global_replace (Str.regexp "/") ".";; -let coq_module file = - (* TODO - * LEM: - * We should also remove things like "/./" in the middle of the filename, - * rewrite "/foo/../bar" to "/bar", recognise different paths that lead - * to the same file / directory (via symlinks), etc. The best way to do - * all this would be to use the libc function realpath() on _both_ p and - * file / f before comparing them. - * - * The semantics of realpath() on file symlinks might not be what we - * want... (But it is what we want on directory symlinks.) So, we would - * have to cook up our own version of realpath()? - * - * Do all target platforms have realpath()? - *) - let f = chop_extension file in - (* remove leading ./ and any number of slashes after *) - let f = Str.replace_first (Str.regexp "^\\./+") "" f in - if (Str.string_before f 1) = "/" then - (* f is an absolute path. Prefixes must be matched with the beginning of f, - * not prepended - *) - let rec trypath = function - | [] -> make_path f - | (p, lg) :: r -> - (* make sure p ends with a single '/' - * This guarantees that we don't match a file whose name is - * of the form p ^ "foo". It means we may miss p itself, - * but this does not matter: coqdoc doesn't do anything - * of a directory anyway. *) - let p = (Str.replace_first (Str.regexp "/*$") "/" p) in - let p_quoted = (Str.quote p) in - if (Str.string_match (Str.regexp p_quoted) f 0) then - make_path (Filename.concat lg (Str.replace_first (Str.regexp (p_quoted ^ "/*")) "" f)) - else - trypath r - in trypath !paths - else (* f is a relative path *) - let rec trypath = function - | [] -> - make_path f - | (p,lg) :: r -> - let p_file = Filename.concat p file in - if Sys.file_exists p_file then - make_path (Filename.concat lg f) - else - trypath r - in trypath !paths;; +let coq_module filename = + let bfname = Filename.chop_extension filename in + let nfname = normalize_filename bfname in + let rec change_prefix map f = + match map with + | [] -> + (* There is no prefix alias; + we just cut the name wrt current working directory *) + let cwd = Sys.getcwd () in + let exp = Str.regexp (Str.quote (cwd ^ "/")) in + if (Str.string_match exp f 0) then + name_of_path (Str.replace_first exp "" f) + else + name_of_path f + | (p, name) :: rem -> + let expp = Str.regexp (Str.quote p) in + if (Str.string_match expp f 0) then + let newp = Str.replace_first expp name f in + name_of_path newp + else + change_prefix rem f + in + change_prefix !paths nfname let what_file f = check_if_file_exists f; - if check_suffix f ".v" || check_suffix f ".g" then + if Filename.check_suffix f ".v" || Filename.check_suffix f ".g" then Vernac_file (f, coq_module f) - else if check_suffix f ".tex" then + else if Filename.check_suffix f ".tex" then Latex_file f - else begin - eprintf "\ncoqdoc: don't know what to do with %s\n" f; - exit 1 - end + else + (eprintf "\ncoqdoc: don't know what to do with %s\n" f; exit 1) (*s \textbf{Reading file names from a file.} * File names may be given @@ -214,9 +193,9 @@ let files_from_file f = (*s \textbf{Parsing of the command line.} *) -let output_file = ref "" let dvi = ref false let ps = ref false +let pdf = ref false let parse () = let files = ref [] in @@ -227,8 +206,16 @@ let parse () = | ("-nopreamble" | "--nopreamble" | "--no-preamble" | "-bodyonly" | "--bodyonly" | "--body-only") :: rem -> header_trailer := false; parse_rec rem + | ("-with-header" | "--with-header") :: f ::rem -> + header_trailer := true; header_file_spec := true; header_file := f; parse_rec rem + | ("-with-header" | "--with-header") :: [] -> + usage () + | ("-with-footer" | "--with-footer") :: f ::rem -> + header_trailer := true; footer_file_spec := true; footer_file := f; parse_rec rem + | ("-with-footer" | "--with-footer") :: [] -> + usage () | ("-p" | "--preamble") :: s :: rem -> - push_in_preamble s; parse_rec rem + Output.push_in_preamble s; parse_rec rem | ("-p" | "--preamble") :: [] -> usage () | ("-noindex" | "--noindex" | "--no-index") :: rem -> @@ -259,6 +246,8 @@ let parse () = usage () | ("-latex" | "--latex") :: rem -> Cdglobals.target_language := LaTeX; parse_rec rem + | ("-pdf" | "--pdf") :: rem -> + Cdglobals.target_language := LaTeX; pdf := true; parse_rec rem | ("-dvi" | "--dvi") :: rem -> Cdglobals.target_language := LaTeX; dvi := true; parse_rec rem | ("-ps" | "--ps") :: rem -> @@ -284,10 +273,12 @@ let parse () = | ("-q" | "-quiet" | "--quiet") :: rem -> quiet := true; parse_rec rem + | ("-v" | "-verbose" | "--verbose") :: rem -> + quiet := false; parse_rec rem | ("-h" | "-help" | "-?" | "--help") :: rem -> banner (); usage () - | ("-v" | "-version" | "--version") :: _ -> + | ("-V" | "-version" | "--version") :: _ -> banner (); exit 0 | ("-vernac-file" | "--vernac-file") :: f :: rem -> @@ -309,7 +300,7 @@ let parse () = | "-R" :: ([] | [_]) -> usage () | ("-glob-from" | "--glob-from") :: f :: rem -> - Index.read_glob f; parse_rec rem + obsolete "glob-from"; parse_rec rem | ("-glob-from" | "--glob-from") :: [] -> usage () | ("--no-externals" | "-no-externals" | "-noexternals") :: rem -> @@ -332,7 +323,7 @@ let parse () = (*s The following function produces the output. The default output is the \LaTeX\ document: in that case, we just call [Web.produce_document]. If option \verb!-dvi!, \verb!-ps! or \verb!-html! is invoked, then - we make calls to \verb!latex! or \verb!dvips! accordingly. *) + we make calls to \verb!latex! or \verb!dvips! or \verb!pdflatex! accordingly. *) let locally dir f x = let cwd = Sys.getcwd () in @@ -346,8 +337,10 @@ let clean_temp_files basefile = remove (basefile ^ ".tex"); remove (basefile ^ ".log"); remove (basefile ^ ".aux"); + remove (basefile ^ ".toc"); remove (basefile ^ ".dvi"); remove (basefile ^ ".ps"); + remove (basefile ^ ".pdf"); remove (basefile ^ ".haux"); remove (basefile ^ ".html") @@ -370,70 +363,81 @@ let copy src dst = (*s Functions for generating output files *) - + let gen_one_file l = let file = function | Vernac_file (f,m) -> - set_module m; coq_file f m + Output.set_module m; Pretty.coq_file f m | Latex_file _ -> () in - if (!header_trailer) then header (); - if !toc then make_toc (); + if (!header_trailer) then Output.header (); + if !toc then Output.make_toc (); List.iter file l; - if !index then make_index(); - if (!header_trailer) then trailer () + if !index then Output.make_index(); + if (!header_trailer) then Output.trailer () let gen_mult_files l = let file = function | Vernac_file (f,m) -> - set_module m; + Output.set_module m; let hf = target_full_name m in open_out_file hf; - if (!header_trailer) then header (); - if !toc then make_toc (); - coq_file f m; - if (!header_trailer) then trailer (); + if (!header_trailer) then Output.header (); + Pretty.coq_file f m; + if (!header_trailer) then Output.trailer (); close_out_file() | Latex_file _ -> () in List.iter file l; if (!index && !target_language=HTML) then begin - if (!multi_index) then make_multi_index (); + if (!multi_index) then Output.make_multi_index (); open_out_file "index.html"; page_title := (if !title <> "" then !title else "Index"); - if (!header_trailer) then header (); - make_index (); - if (!header_trailer) then trailer (); + if (!header_trailer) then Output.header (); + Output.make_index (); + if (!header_trailer) then Output.trailer (); close_out_file() end; if (!toc && !target_language=HTML) then begin open_out_file "toc.html"; page_title := (if !title <> "" then !title else "Table of contents"); - if (!header_trailer) then header (); + if (!header_trailer) then Output.header (); if !title <> "" then printf "

%s

\n" !title; - make_toc (); - if (!header_trailer) then trailer (); + Output.make_toc (); + if (!header_trailer) then Output.trailer (); close_out_file() end (* Rq: pour latex et texmacs, une toc ou un index séparé n'a pas de sens... *) +let read_glob x = + match x with + | Vernac_file (f,m) -> + let glob = (Filename.chop_extension f) ^ ".glob" in + (try + Vernac_file (f, Index.read_glob glob) + with _ -> + eprintf "Warning: file %s cannot be opened; links will not be available\n" glob; + x) + | Latex_file _ -> x let index_module = function - | Vernac_file (_,m) -> Index.add_module m + | Vernac_file (f,m) -> + Index.add_module m | Latex_file _ -> () let produce_document l = - List.iter index_module l; (if !target_language=HTML then let src = (Filename.concat !Cdglobals.coqlib_path "/tools/coqdoc/coqdoc.css") in let dst = if !output_dir <> "" then Filename.concat !output_dir "coqdoc.css" else "coqdoc.css" in copy src dst); (if !target_language=LaTeX then - let src = (Filename.concat !Cdglobals.coqlib_path "/tools/coqdoc/coqdoc.sty") in - let dst = if !output_dir <> "" then - Filename.concat !output_dir "coqdoc.sty" - else "coqdoc.sty" in - copy src dst); + let src = (Filename.concat !Cdglobals.coqlib_path "/tools/coqdoc/coqdoc.sty") in + let dst = if !output_dir <> "" then + Filename.concat !output_dir "coqdoc.sty" + else "coqdoc.sty" in + copy src dst); + let l = List.map read_glob l in + List.iter index_module l; match !out_to with | StdOut -> Cdglobals.out_channel := stdout; @@ -446,51 +450,64 @@ let produce_document l = gen_mult_files l let produce_output fl = - if not (!dvi || !ps) then begin + if not (!dvi || !ps || !pdf) then produce_document fl - end else begin - let texfile = temp_file "coqdoc" ".tex" in - let basefile = chop_suffix texfile ".tex" in - open_out_file texfile; - produce_document fl; - let command = - let file = basename texfile in - let file = - if !quiet then sprintf "'\\nonstopmode\\input{%s}'" file else file + else + begin + let texfile = Filename.temp_file "coqdoc" ".tex" in + let basefile = Filename.chop_suffix texfile ".tex" in + let final_out_to = !out_to in + out_to := File texfile; + output_dir := (Filename.dirname texfile); + produce_document fl; + + let latexexe = if !pdf then "pdflatex" else "latex" in + let latexcmd = + let file = Filename.basename texfile in + let file = + if !quiet then sprintf "'\\nonstopmode\\input{%s}'" file else file + in + sprintf "%s %s && %s %s 1>&2 %s" latexexe file latexexe file (if !quiet then "> /dev/null" else "") in - sprintf "(latex %s && latex %s) 1>&2 %s" file file - (if !quiet then "> /dev/null" else "") - in - let res = locally (dirname texfile) Sys.command command in - if res <> 0 then begin - eprintf "Couldn't run LaTeX successfully\n"; - clean_and_exit basefile res - end; - let dvifile = basefile ^ ".dvi" in - if !dvi then begin - if !output_file <> "" then - (* we cannot use Sys.rename accross file systems *) - copy dvifile !output_file - else - cat dvifile - end; - if !ps then begin - let psfile = - if !output_file <> "" then !output_file else basefile ^ ".ps" - in - let command = - sprintf "dvips %s -o %s %s" dvifile psfile - (if !quiet then "> /dev/null 2>&1" else "") - in - let res = Sys.command command in - if res <> 0 then begin - eprintf "Couldn't run dvips successfully\n"; - clean_and_exit basefile res + let res = locally (Filename.dirname texfile) Sys.command latexcmd in + if res <> 0 then begin + eprintf "Couldn't run LaTeX successfully\n"; + clean_and_exit basefile res + end; + + let dvifile = basefile ^ ".dvi" in + if !dvi then + begin + match final_out_to with + | MultFiles | StdOut -> cat dvifile + | File f -> copy dvifile f end; - if !output_file = "" then cat psfile - end; - clean_temp_files basefile - end + let pdffile = basefile ^ ".pdf" in + if !pdf then + begin + match final_out_to with + | MultFiles | StdOut -> cat pdffile + | File f -> copy pdffile f + end; + if !ps then begin + let psfile = basefile ^ ".ps" + in + let command = + sprintf "dvips %s -o %s %s" dvifile psfile + (if !quiet then "> /dev/null 2>&1" else "") + in + let res = Sys.command command in + if res <> 0 then begin + eprintf "Couldn't run dvips successfully\n"; + clean_and_exit basefile res + end; + match final_out_to with + | MultFiles | StdOut -> cat psfile + | File f -> copy psfile f + end; + + clean_temp_files basefile + end (*s \textbf{Main program.} Print the banner, parse the command line, diff --git a/tools/coqdoc/output.ml b/tools/coqdoc/output.ml index 2d0bc6c2..93414f22 100644 --- a/tools/coqdoc/output.ml +++ b/tools/coqdoc/output.ml @@ -1,3 +1,4 @@ +(* -*- compile-command: "make -C ../.. bin/coqdoc" -*- *) (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* Hashtbl.add token_pp s (Some l, None)) [ "*" , "\\ensuremath{\\times}"; + "|", "\\ensuremath{|}"; "->", "\\ensuremath{\\rightarrow}"; "->~", "\\ensuremath{\\rightarrow\\lnot}"; "->~~", "\\ensuremath{\\rightarrow\\lnot\\lnot}"; @@ -153,6 +171,12 @@ module Latex = struct | _ -> output_char c + let label_char c = match c with + | '\\' | '$' | '#' | '%' | '&' | '{' | '}' | '_' + | '^' | '~' -> () + | _ -> + output_char c + let latex_char = output_char let latex_string = output_string @@ -162,9 +186,14 @@ module Latex = struct let raw_ident s = for i = 0 to String.length s - 1 do char s.[i] done + let label_ident s = + for i = 0 to String.length s - 1 do label_char s.[i] done + let start_module () = if not !short then begin - printf "\\coqdocmodule{"; + printf "\\coqlibrary{"; + label_ident !current_module; + printf "}{"; raw_ident !current_module; printf "}\n\n" end @@ -192,11 +221,53 @@ module Latex = struct with Not_found -> f tok - let ident s _ = + let module_ref m s = + printf "\\moduleid{%s}{" m; raw_ident s; printf "}" + (*i + match find_module m with + | Local -> + printf "" m; raw_ident s; printf "" + | Coqlib when !externals -> + let m = Filename.concat !coqlib m in + printf "
" m; raw_ident s; printf "" + | Coqlib | Unknown -> + raw_ident s + i*) + + let ident_ref m fid typ s = + let id = if fid <> "" then (m ^ "." ^ fid) else m in + match find_module m with + | Local -> + printf "\\coq%sref{" (type_name typ); label_ident id; printf "}{"; raw_ident s; printf "}" + | Coqlib when !externals -> + let _m = Filename.concat !coqlib m in + printf "\\coq%sref{" (type_name typ); label_ident id; printf "}{"; raw_ident s; printf "}" + | Coqlib | Unknown -> + raw_ident s + + let defref m id ty s = + printf "\\coq%s{" (type_name ty); label_ident (m ^ "." ^ id); printf "}{"; raw_ident s; printf "}" + + let ident s loc = if is_keyword s then begin printf "\\coqdockw{"; raw_ident s; printf "}" end else begin - printf "\\coqdocid{"; raw_ident s; printf "}" + begin + try + (match Index.find !current_module loc with + | Def (fullid,typ) -> + defref !current_module fullid typ s + | Mod (m,s') when s = s' -> + module_ref m s + | Ref (m,fullid,typ) -> + ident_ref m fullid typ s + | Mod _ -> + printf "\\coqdocid{"; raw_ident s; printf "}") + with Not_found -> + if is_tactic s then begin + printf "\\coqdoctac{"; raw_ident s; printf "}" + end else begin printf "\\coqdocvar{"; raw_ident s; printf "}" end + end end let ident s l = with_latex_printing (fun s -> ident s l) s @@ -271,31 +342,51 @@ end module Html = struct let header () = - if !header_trailer then begin - printf "\n"; - printf "\n\n"; - printf "\n" !charset; - printf "\n"; - printf "%s\n\n\n" !page_title; - printf "\n\n
\n\n
\n
\n\n"; - printf "
\n\n" - end + if !header_trailer then + if !header_file_spec then + let cin = Pervasives.open_in !header_file in + try + while true do + let s = Pervasives.input_line cin in + printf "%s\n" s + done + with End_of_file -> Pervasives.close_in cin + else + begin + printf "\n"; + printf "\n\n"; + printf "\n" !charset; + printf "\n"; + printf "%s\n\n\n" !page_title; + printf "\n\n
\n\n
\n
\n\n"; + printf "
\n\n" + end let self = "http://coq.inria.fr" let trailer () = if !index && !current_module <> "Index" then printf "
\n\n
\n
Index"; - if !header_trailer then begin - printf "
This page has been generated by "; - printf "coqdoc\n" self; - printf "
\n\n
\n\n\n" - end + if !header_trailer then + if !footer_file_spec then + let cin = Pervasives.open_in !footer_file in + try + while true do + let s = Pervasives.input_line cin in + printf "%s\n" s + done + with End_of_file -> Pervasives.close_in cin + else + begin + printf "
This page has been generated by "; + printf "coqdoc\n" self; + printf "
\n\n
\n\n\n" + end let start_module () = if not !short then begin - (* add_toc_entry (Toc_library !current_module); *) + add_toc_entry (Toc_library !current_module); printf "

Library %s

\n\n" !current_module end @@ -338,14 +429,15 @@ module Html = struct raw_ident s i*) - let ident_ref m fid s = match find_module m with - | Local -> - printf "" m fid; raw_ident s; printf "" - | Coqlib when !externals -> - let m = Filename.concat !coqlib m in - printf "" m fid; raw_ident s; printf "" - | Coqlib | Unknown -> - raw_ident s + let ident_ref m fid s = + match find_module m with + | Local -> + printf "" m fid; raw_ident s; printf "" + | Coqlib when !externals -> + let m = Filename.concat !coqlib m in + printf "" m fid; raw_ident s; printf "" + | Coqlib | Unknown -> + raw_ident s let ident s loc = if is_keyword s then begin @@ -360,9 +452,9 @@ module Html = struct printf "" fullid; raw_ident s | Mod (m,s') when s = s' -> module_ref m s - | Ref (m,fullid) -> + | Ref (m,fullid,ty) -> ident_ref m fullid s - | Mod _ | Ref _ -> + | Mod _ -> raw_ident s) with Not_found -> raw_ident s @@ -429,17 +521,6 @@ module Html = struct let rule () = printf "
\n" - let entry_type = function - | Library -> "library" - | Module -> "module" - | Definition -> "definition" - | Inductive -> "inductive" - | Constructor -> "constructor" - | Lemma -> "lemma" - | Variable -> "variable" - | Axiom -> "axiom" - | TacticDefinition -> "tactic definition" - (* make a HTML index from a list of triples (name,text,link) *) let index_ref i c = let idxc = sprintf "%s_%c" i.idx_name c in @@ -465,7 +546,7 @@ module Html = struct if t = Library then "[library]", m ^ ".html" else - sprintf "[%s, in %s]" (entry_type t) m m , + sprintf "[%s, in %s]" (type_name t) m m , sprintf "%s.html#%s" m s) let format_bytype_index = function @@ -548,8 +629,8 @@ module Html = struct item n; printf "" r; f (); printf "\n" in - Queue.iter make_toc_entry toc_q; - stop_item (); + Queue.iter make_toc_entry toc_q; + stop_item (); end diff --git a/tools/coqdoc/pretty.mll b/tools/coqdoc/pretty.mll index e16c7979..8be3e0b0 100644 --- a/tools/coqdoc/pretty.mll +++ b/tools/coqdoc/pretty.mll @@ -1,3 +1,4 @@ +(* -*- compile-command: "make -C ../.. bin/coqdoc" -*- *) (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* count (c + (8 - (c mod 8))) (i + 1) | ' ' -> count (c + 1) (i + 1) - | _ -> c + | _ -> c,i in - count 0 0 + count 0 0 let count_dashes s = let c = ref 0 in @@ -52,6 +49,11 @@ in count 0 (String.index s '*') + let strip_eol s = + let eol = s.[String.length s - 1] = '\n' in + (eol, if eol then String.sub s 1 (String.length s - 1) else s) + + let formatted = ref false let brackets = ref 0 @@ -69,22 +71,22 @@ let state_stack = Stack.create () let save_state () = - Stack.push { st_gallina = !gallina; st_light = !light } state_stack + Stack.push { st_gallina = !Cdglobals.gallina; st_light = !Cdglobals.light } state_stack let restore_state () = let s = Stack.pop state_stack in - gallina := s.st_gallina; - light := s.st_light + Cdglobals.gallina := s.st_gallina; + Cdglobals.light := s.st_light let without_ref r f x = save_state (); r := false; f x; restore_state () - let without_gallina = without_ref gallina + let without_gallina = without_ref Cdglobals.gallina - let without_light = without_ref light + let without_light = without_ref Cdglobals.light let show_all f = without_gallina (without_light f) - let begin_show () = save_state (); gallina := false; light := false + let begin_show () = save_state (); Cdglobals.gallina := false; Cdglobals.light := false let end_show () = restore_state () (* Reset the globals *) @@ -163,15 +165,20 @@ let space = [' ' '\t'] let space_nl = [' ' '\t' '\n' '\r'] +let nl = "\r\n" | '\n' let firstchar = ['A'-'Z' 'a'-'z' '_' (* iso 8859-1 accents *) '\192'-'\214' '\216'-'\246' '\248'-'\255' ] | + '\194' '\185' | (* utf-8 latin 1 supplement *) '\195' ['\128'-'\191'] | (* utf-8 letterlike symbols *) - '\226' ('\132' ['\128'-'\191'] | '\133' ['\128'-'\143']) + '\206' ['\177'-'\183'] | + '\226' ('\130' [ '\128'-'\137' ] (* subscripts *) + | '\129' [ '\176'-'\187' ] (* superscripts *) + | '\132' ['\128'-'\191'] | '\133' ['\128'-'\143']) let identchar = firstchar | ['\'' '0'-'9' '@' ] let id = firstchar identchar* @@ -186,8 +193,9 @@ let symbolchar_no_brackets = (* utf-8 symbols *) '\226' ['\134'-'\143' '\152'-'\155' '\164'-'\165' '\168'-'\171'] _ let symbolchar = symbolchar_no_brackets | '[' | ']' +let token_no_brackets = symbolchar_no_brackets+ let token = symbolchar+ | '[' [^ '[' ']' ':']* ']' - +let printing_token = (token | id)+ let thm_token = "Theorem" @@ -202,6 +210,7 @@ let thm_token = let def_token = "Definition" | "Let" + | "Class" | "SubClass" | "Example" | "Local" @@ -209,11 +218,10 @@ let def_token = | "CoFixpoint" | "Record" | "Structure" + | "Instance" | "Scheme" | "Inductive" | "CoInductive" - | "Program" space+ "Definition" - | "Program" space+ "Fixpoint" let decl_token = "Hypothesis" @@ -224,6 +232,8 @@ let decl_token = let gallina_ext = "Module" + | "Include" space+ "Type" + | "Include" | "Declare" space+ "Module" | "Transparent" | "Opaque" @@ -235,6 +245,11 @@ let gallina_ext = | "Infix" | "Tactic" space+ "Notation" | "Reserved" space+ "Notation" + | "Section" + | "Context" + | "Variable" 's'? + | ("Hypothesis" | "Hypotheses") + | "End" let commands = "Pwd" @@ -254,6 +269,12 @@ let commands = | "Check" | "Type" + | "Section" + | "Chapter" + | "Variable" 's'? + | ("Hypothesis" | "Hypotheses") + | "End" + let extraction = "Extraction" | "Recursive" space+ "Extraction" @@ -261,6 +282,12 @@ let extraction = let gallina_kw = thm_token | def_token | decl_token | gallina_ext | commands | extraction +let prog_kw = + "Program" space+ gallina_kw + | "Obligation" + | "Obligations" + | "Solve" + let gallina_kw_to_hide = "Implicit" | "Ltac" @@ -275,11 +302,6 @@ let gallina_kw_to_hide = | "Transparent" | "Opaque" | ("Declare" space+ ("Morphism" | "Step") ) - | "Section" - | "Chapter" - | "Variable" 's'? - | ("Hypothesis" | "Hypotheses") - | "End" | ("Set" | "Unset") space+ "Printing" space+ "Coercions" | "Declare" space+ ("Left" | "Right") space+ "Step" @@ -294,10 +316,10 @@ let section = "*" | "**" | "***" | "****" let item_space = " " -let begin_hide = "(*" space* "begin" space+ "hide" space* "*)" space* '\n' -let end_hide = "(*" space* "end" space+ "hide" space* "*)" space* '\n' -let begin_show = "(*" space* "begin" space+ "show" space* "*)" space* '\n' -let end_show = "(*" space* "end" space+ "show" space* "*)" space* '\n' +let begin_hide = "(*" space* "begin" space+ "hide" space* "*)" space* nl +let end_hide = "(*" space* "end" space+ "hide" space* "*)" space* nl +let begin_show = "(*" space* "begin" space+ "show" space* "*)" space* nl +let end_show = "(*" space* "end" space+ "show" space* "*)" space* nl (* let begin_verb = "(*" space* "begin" space+ "verb" space* "*)" let end_verb = "(*" space* "end" space+ "verb" space* "*)" @@ -308,16 +330,16 @@ let end_verb = "(*" space* "end" space+ "verb" space* "*)" (*s Scanning Coq, at beginning of line *) rule coq_bol = parse - | space* '\n'+ - { empty_line_of_code (); coq_bol lexbuf } + | space* nl+ + { Output.empty_line_of_code (); coq_bol lexbuf } | space* "(**" space_nl - { end_coq (); start_doc (); + { Output.end_coq (); Output.start_doc (); let eol = doc_bol lexbuf in - end_doc (); start_coq (); + Output.end_doc (); Output.start_coq (); if eol then coq_bol lexbuf else coq lexbuf } | space* "Comments" space_nl - { end_coq (); start_doc (); comments lexbuf; end_doc (); - start_coq (); coq lexbuf } + { Output.end_coq (); Output.start_doc (); comments lexbuf; Output.end_doc (); + Output.start_coq (); coq lexbuf } | space* begin_hide { skip_hide lexbuf; coq_bol lexbuf } | space* begin_show @@ -326,28 +348,38 @@ rule coq_bol = parse { end_show (); coq_bol lexbuf } | space* gallina_kw_to_hide { let s = lexeme lexbuf in - if !light && section_or_end s then begin - skip_to_dot lexbuf; - coq_bol lexbuf - end else begin - let nbsp = count_spaces s in - indentation nbsp; - let s = String.sub s nbsp (String.length s - nbsp) in - ident s (lexeme_start lexbuf + nbsp); - let eol= body lexbuf in - if eol then coq_bol lexbuf else coq lexbuf - end } + if !Cdglobals.light && section_or_end s then + let eol = skip_to_dot lexbuf in + if eol then (Output.line_break (); coq_bol lexbuf) else coq lexbuf + else + begin + let nbsp,isp = count_spaces s in + Output.indentation nbsp; + let s = String.sub s isp (String.length s - isp) in + Output.ident s (lexeme_start lexbuf + isp); + let eol = body lexbuf in + if eol then coq_bol lexbuf else coq lexbuf + end } | space* gallina_kw { let s = lexeme lexbuf in - let nbsp = count_spaces s in - let s = String.sub s nbsp (String.length s - nbsp) in - indentation nbsp; - ident s (lexeme_start lexbuf + nbsp); + let nbsp,isp = count_spaces s in + let s = String.sub s isp (String.length s - isp) in + Output.indentation nbsp; + Output.ident s (lexeme_start lexbuf + isp); let eol= body lexbuf in if eol then coq_bol lexbuf else coq lexbuf } - | space* "(**" space+ "printing" space+ (identifier | token) space+ + | space* prog_kw + { let s = lexeme lexbuf in + let nbsp,isp = count_spaces s in + Output.indentation nbsp; + let s = String.sub s isp (String.length s - isp) in + Output.ident s (lexeme_start lexbuf + isp); + let eol= body lexbuf in + if eol then coq_bol lexbuf else coq lexbuf } + + | space* "(**" space+ "printing" space+ printing_token space+ { let tok = lexeme lexbuf in - let s = printing_token lexbuf in + let s = printing_token_body lexbuf in add_printing_token tok s; coq_bol lexbuf } | space* "(**" space+ "printing" space+ @@ -366,13 +398,13 @@ rule coq_bol = parse coq_bol lexbuf } | space* "(*" { let eol = comment lexbuf in - if eol then begin line_break(); coq_bol lexbuf end else coq lexbuf } + if eol then coq_bol lexbuf else coq lexbuf } | eof { () } | _ { let eol = - if not !gallina then - begin backtrack lexbuf; indentation 0; body_bol lexbuf end + if not !Cdglobals.gallina then + begin backtrack lexbuf; Output.indentation 0; body_bol lexbuf end else skip_to_dot lexbuf in @@ -381,141 +413,148 @@ rule coq_bol = parse (*s Scanning Coq elsewhere *) and coq = parse - | "\n" - { line_break(); coq_bol lexbuf } + | nl + { Output.line_break(); coq_bol lexbuf } | "(**" space_nl - { end_coq (); start_doc (); + { Output.end_coq (); Output.start_doc (); let eol = doc_bol lexbuf in - end_doc (); start_coq (); + Output.end_doc (); Output.start_coq (); if eol then coq_bol lexbuf else coq lexbuf } | "(*" { let eol = comment lexbuf in - if eol then begin line_break(); coq_bol lexbuf end + if eol then begin Output.line_break(); coq_bol lexbuf end else coq lexbuf } - | '\n'+ space* "]]" - { if not !formatted then begin symbol (lexeme lexbuf); coq lexbuf end } + | nl+ space* "]]" + { if not !formatted then begin Output.symbol (lexeme lexbuf); coq lexbuf end } | eof { () } | gallina_kw_to_hide { let s = lexeme lexbuf in - if !light && section_or_end s then + if !Cdglobals.light && section_or_end s then begin let eol = skip_to_dot lexbuf in if eol then coq_bol lexbuf else coq lexbuf end else begin - ident s (lexeme_start lexbuf); + Output.ident s (lexeme_start lexbuf); let eol=body lexbuf in if eol then coq_bol lexbuf else coq lexbuf end } | gallina_kw { let s = lexeme lexbuf in - ident s (lexeme_start lexbuf); + Output.ident s (lexeme_start lexbuf); let eol = body lexbuf in if eol then coq_bol lexbuf else coq lexbuf } - | space+ { char ' '; coq lexbuf } + | prog_kw + { let s = lexeme lexbuf in + Output.ident s (lexeme_start lexbuf); + let eol = body lexbuf in + if eol then coq_bol lexbuf else coq lexbuf } + | space+ { Output.char ' '; coq lexbuf } | eof { () } - | _ { let eol = - if not !gallina then - begin backtrack lexbuf; indentation 0; body lexbuf end + | _ { let eol = + if not !Cdglobals.gallina then + begin backtrack lexbuf; Output.indentation 0; body lexbuf end else - skip_to_dot lexbuf + let eol = skip_to_dot lexbuf in + if eol then Output.line_break (); eol in if eol then coq_bol lexbuf else coq lexbuf} (*s Scanning documentation, at beginning of line *) - + and doc_bol = parse - | space* "\n" '\n'* - { paragraph (); doc_bol lexbuf } - | space* section [^')'] ([^'\n' '*'] | '*' [^'\n'')'])* -{ let lev, s = sec_title (lexeme lexbuf) in - section lev (fun () -> ignore (doc (from_string s))); - doc lexbuf } -| space* '-'+ - { let n = count_dashes (lexeme lexbuf) in - if n >= 4 then rule () else item n; - doc lexbuf } -| "<<" space* - { start_verbatim (); verbatim lexbuf; doc_bol lexbuf } + | space* nl+ + { Output.paragraph (); doc_bol lexbuf } + | space* section space+ ([^'\n' '*'] | '*'+ [^'\n' ')' '*'])* ('*'+ '\n')? + { let eol, lex = strip_eol (lexeme lexbuf) in + let lev, s = sec_title lex in + Output.section lev (fun () -> ignore (doc (from_string s))); + if eol then doc_bol lexbuf else doc lexbuf } + | space* '-'+ + { let n = count_dashes (lexeme lexbuf) in + if n >= 4 then Output.rule () else Output.item n; + doc lexbuf } + | "<<" space* + { Output.start_verbatim (); verbatim lexbuf; doc_bol lexbuf } | eof - { false } + { true } | _ { backtrack lexbuf; doc lexbuf } (*s Scanning documentation elsewhere *) and doc = parse - | "\n" - { char '\n'; doc_bol lexbuf } + | nl + { Output.char '\n'; doc_bol lexbuf } | "[" { brackets := 1; - start_inline_coq (); escaped_coq lexbuf; end_inline_coq (); + Output.start_inline_coq (); escaped_coq lexbuf; Output.end_inline_coq (); doc lexbuf } - | "[[" '\n' space* - { formatted := true; line_break (); start_inline_coq (); - indentation (count_spaces (lexeme lexbuf)); + | "[[" nl space* + { formatted := true; Output.line_break (); Output.start_inline_coq (); + Output.indentation (fst (count_spaces (lexeme lexbuf))); let eol = body_bol lexbuf in - end_inline_coq (); formatted := false; + Output.end_inline_coq (); formatted := false; if eol then doc_bol lexbuf else doc lexbuf} - | '*'* "*)" space* '\n' + | '*'* "*)" space* nl { true } | '*'* "*)" { false } | "$" - { start_latex_math (); escaped_math_latex lexbuf; doc lexbuf } + { Output.start_latex_math (); escaped_math_latex lexbuf; doc lexbuf } | "$$" - { char '$'; doc lexbuf } + { Output.char '$'; doc lexbuf } | "%" { escaped_latex lexbuf; doc lexbuf } | "%%" - { char '%'; doc lexbuf } + { Output.char '%'; doc lexbuf } | "#" { escaped_html lexbuf; doc lexbuf } | "##" - { char '#'; doc lexbuf } + { Output.char '#'; doc lexbuf } | eof { false } | _ - { char (lexeme_char lexbuf 0); doc lexbuf } + { Output.char (lexeme_char lexbuf 0); doc lexbuf } (*s Various escapings *) and escaped_math_latex = parse - | "$" { stop_latex_math () } - | eof { stop_latex_math () } - | _ { latex_char (lexeme_char lexbuf 0); escaped_math_latex lexbuf } + | "$" { Output.stop_latex_math () } + | eof { Output.stop_latex_math () } + | _ { Output.latex_char (lexeme_char lexbuf 0); escaped_math_latex lexbuf } and escaped_latex = parse | "%" { () } | eof { () } - | _ { latex_char (lexeme_char lexbuf 0); escaped_latex lexbuf } + | _ { Output.latex_char (lexeme_char lexbuf 0); escaped_latex lexbuf } and escaped_html = parse | "#" { () } | "&#" - { html_char '&'; html_char '#'; escaped_html lexbuf } + { Output.html_char '&'; Output.html_char '#'; escaped_html lexbuf } | "##" - { html_char '#'; escaped_html lexbuf } + { Output.html_char '#'; escaped_html lexbuf } | eof { () } - | _ { html_char (lexeme_char lexbuf 0); escaped_html lexbuf } + | _ { Output.html_char (lexeme_char lexbuf 0); escaped_html lexbuf } and verbatim = parse - | "\n>>" { verbatim_char '\n'; stop_verbatim () } - | eof { stop_verbatim () } - | _ { verbatim_char (lexeme_char lexbuf 0); verbatim lexbuf } + | nl ">>" { Output.verbatim_char '\n'; Output.stop_verbatim () } + | eof { Output.stop_verbatim () } + | _ { Output.verbatim_char (lexeme_char lexbuf 0); verbatim lexbuf } (*s Coq, inside quotations *) and escaped_coq = parse | "]" { decr brackets; - if !brackets > 0 then begin char ']'; escaped_coq lexbuf end } + if !brackets > 0 then begin Output.char ']'; escaped_coq lexbuf end } | "[" - { incr brackets; char '['; escaped_coq lexbuf } + { incr brackets; Output.char '['; escaped_coq lexbuf } | "(*" { ignore (comment lexbuf); escaped_coq lexbuf } | "*)" @@ -524,18 +563,18 @@ and escaped_coq = parse { () } | token_brackets { let s = lexeme lexbuf in - symbol s; + Output.symbol s; escaped_coq lexbuf } | (identifier '.')* identifier - { ident (lexeme lexbuf) (lexeme_start lexbuf); escaped_coq lexbuf } + { Output.ident (lexeme lexbuf) (lexeme_start lexbuf); escaped_coq lexbuf } | _ - { char (lexeme_char lexbuf 0); escaped_coq lexbuf } + { Output.char (lexeme_char lexbuf 0); escaped_coq lexbuf } (*s Coq "Comments" command. *) and comments = parse | space_nl+ - { char ' '; comments lexbuf } + { Output.char ' '; comments lexbuf } | '"' [^ '"']* '"' { let s = lexeme lexbuf in let s = String.sub s 1 (String.length s - 2) in @@ -547,61 +586,79 @@ and comments = parse | eof { () } | _ - { char (lexeme_char lexbuf 0); comments lexbuf } + { Output.char (lexeme_char lexbuf 0); comments lexbuf } (*s Skip comments *) and comment = parse - | "(*" { ignore (comment lexbuf); comment lexbuf } - | "*)" space* '\n'+ { true } + | "(*" { comment lexbuf } + | "*)" space* nl { true } | "*)" { false } | eof { false } | _ { comment lexbuf } and skip_to_dot = parse - | '.' space* '\n' { true } + | '.' space* nl { true } | eof | '.' space+ { false} | "(*" { ignore (comment lexbuf); skip_to_dot lexbuf } | _ { skip_to_dot lexbuf } and body_bol = parse | space+ - { indentation (count_spaces (lexeme lexbuf)); body lexbuf } + { Output.indentation (fst (count_spaces (lexeme lexbuf))); body lexbuf } | _ { backtrack lexbuf; body lexbuf } and body = parse - | '\n' {line_break(); body_bol lexbuf} - | '\n'+ space* "]]" - { if not !formatted then begin symbol (lexeme lexbuf); body lexbuf end else true } + | nl {Output.line_break(); body_bol lexbuf} + | nl+ space* "]]" + { if not !formatted then begin Output.symbol (lexeme lexbuf); body lexbuf end else true } | eof { false } - | '.' space* '\n' | '.' space* eof { char '.'; line_break(); true } - | '.' space+ { char '.'; char ' '; false } + | '.' space* nl | '.' space* eof { Output.char '.'; Output.line_break(); true } + | '.' space+ { Output.char '.'; Output.char ' '; false } + | '"' { Output.char '"'; ignore(notation lexbuf); body lexbuf } | "(*" { let eol = comment lexbuf in - if eol then begin line_break(); body_bol lexbuf end else body lexbuf } + if eol + then begin Output.line_break(); body_bol lexbuf end + else body lexbuf } | identifier { let s = lexeme lexbuf in - ident s (lexeme_start lexbuf); + Output.ident s (lexeme_start lexbuf); body lexbuf } - | token + | token_no_brackets { let s = lexeme lexbuf in - symbol s; body lexbuf } + Output.symbol s; body lexbuf } | _ { let c = lexeme_char lexbuf 0 in - char c; + Output.char c; body lexbuf } +and notation_bol = parse + | space+ + { Output.indentation (fst (count_spaces (lexeme lexbuf))); notation lexbuf } + | _ { backtrack lexbuf; notation lexbuf } + +and notation = parse + | nl { Output.line_break(); notation_bol lexbuf } + | '"' { Output.char '"'; false } + | token + { let s = lexeme lexbuf in + Output.symbol s; notation lexbuf } + | _ { let c = lexeme_char lexbuf 0 in + Output.char c; + notation lexbuf } + and skip_hide = parse | eof | end_hide { () } | _ { skip_hide lexbuf } (*s Reading token pretty-print *) -and printing_token = parse +and printing_token_body = parse | "*)" | eof { let s = Buffer.contents token_buffer in Buffer.clear token_buffer; s } | _ { Buffer.add_string token_buffer (lexeme lexbuf); - printing_token lexbuf } + printing_token_body lexbuf } (*s Applying the scanners to files *) @@ -609,11 +666,11 @@ and printing_token = parse let coq_file f m = reset (); - Index.scan_file f m; - start_module (); + Index.current_library := m; + Output.start_module (); let c = open_in f in let lb = from_channel c in - start_coq (); coq_bol lb; end_coq (); + Output.start_coq (); coq_bol lb; Output.end_coq (); close_in c } diff --git a/tools/coqwc.mll b/tools/coqwc.mll index 0ce172ea..81fe06cd 100644 --- a/tools/coqwc.mll +++ b/tools/coqwc.mll @@ -9,7 +9,7 @@ (* coqwc - counts the lines of spec, proof and comments in Coq sources * Copyright (C) 2003 Jean-Christophe Filliâtre *) -(*i $Id: coqwc.mll 9976 2007-07-12 11:58:30Z msozeau $ i*) +(*i $Id: coqwc.mll 9691 2007-03-08 15:29:27Z msozeau $ i*) (*s {\bf coqwc.} Counts the lines of spec, proof and comments in a Coq source. It assumes the files to be lexically well-formed. *) diff --git a/toplevel/auto_ind_decl.ml b/toplevel/auto_ind_decl.ml new file mode 100644 index 00000000..094a77ff --- /dev/null +++ b/toplevel/auto_ind_decl.ml @@ -0,0 +1,812 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* [] + | t::q -> t::(kick_last q) + | [] -> failwith "kick_last" +and aux = function + | (0,l') -> l' + | (n,h::t) -> aux (n-1,t) + | _ -> failwith "quick_chop" + in + if n > (List.length l) then failwith "quick_chop args" + else kick_last (aux (n,l) ) + +let rec deconstruct_type t = + let l,r = decompose_prod t in + (List.map (fun (_,b) -> b) (List.rev l))@[r] + +let subst_in_constr (_,subst,(ind,const)) = + let ind' = (subst_kn subst (fst ind)),(snd ind) + and const' = subst_mps subst const in + ind',const' + +exception EqNotFound of string +exception EqUnknown of string + +(* Some pre declaration of constant we are going to use *) +let bb = constr_of_global Coqlib.glob_bool + +let andb_prop = fun _ -> (Coqlib.build_bool_type()).Coqlib.andb_prop + +let andb_true_intro = fun _ -> + (Coqlib.build_bool_type()).Coqlib.andb_true_intro + +let tt = constr_of_global Coqlib.glob_true + +let ff = constr_of_global Coqlib.glob_false + +let eq = constr_of_global Coqlib.glob_eq + +let sumbool = Coqlib.build_coq_sumbool + +let andb = fun _ -> (Coqlib.build_bool_type()).Coqlib.andb + +(* reconstruct the inductive with the correct deBruijn indexes *) +let mkFullInd ind n = + let mib = Global.lookup_mind (fst ind) in + let nparams = mib.mind_nparams in + let nparrec = mib.mind_nparams_rec in + (* params context divided *) + let lnonparrec,lnamesparrec = + context_chop (nparams-nparrec) mib.mind_params_ctxt in + if nparrec > 0 + then mkApp (mkInd ind, + Array.of_list(extended_rel_list (nparrec+n) lnamesparrec)) + else mkInd ind + +let make_eq_scheme sp = + (* fetching global env *) + let env = Global.env() in + (* fetching the mutual inductive body *) + let mib = Global.lookup_mind sp in + (* number of inductives in the mutual *) + let nb_ind = Array.length mib.mind_packets in + (* number of params in the type *) + let nparams = mib.mind_nparams in + let nparrec = mib.mind_nparams_rec in + (* params context divided *) + let lnonparrec,lnamesparrec = + context_chop (nparams-nparrec) mib.mind_params_ctxt in + (* predef coq's boolean type *) + (* rec name *) + let rec_name i =(string_of_id (Array.get mib.mind_packets i).mind_typename)^ + "_eqrec" + in + (* construct the "fun A B ... N, eqA eqB eqC ... N => fixpoint" part *) + let create_input c = + let myArrow u v = mkArrow u (lift 1 v) + and eqName = function + | Name s -> id_of_string ("eq_"^(string_of_id s)) + | Anonymous -> id_of_string "eq_A" + in + let ext_rel_list = extended_rel_list 0 lnamesparrec in + let lift_cnt = ref 0 in + let eqs_typ = List.map (fun aa -> + let a = lift !lift_cnt aa in + incr lift_cnt; + myArrow a (myArrow a bb) + ) ext_rel_list in + + let eq_input = List.fold_left2 + ( fun a b (n,_,_) -> (* mkLambda(n,b,a) ) *) + (* here I leave the Naming thingy so that the type of + the function is more readable for the user *) + mkNamedLambda (eqName n) b a ) + c (List.rev eqs_typ) lnamesparrec + in + List.fold_left (fun a (n,_,t) ->(* mkLambda(n,t,a)) eq_input rel_list *) + (* Same here , hoping the auto renaming will do something good ;) *) + mkNamedLambda + (match n with Name s -> s | Anonymous -> id_of_string "A") + t a) eq_input lnamesparrec + in + let make_one_eq cur = + let ind = sp,cur in + (* current inductive we are working on *) + let cur_packet = mib.mind_packets.(snd ind) in + (* Inductive toto : [rettyp] := *) + let rettyp = Inductive.type_of_inductive env (mib,cur_packet) in + (* split rettyp in a list without the non rec params and the last -> + e.g. Inductive vec (A:Set) : nat -> Set := ... will do [nat] *) + let rettyp_l = quick_chop nparrec (deconstruct_type rettyp) in + (* give a type A, this function tries to find the equality on A declared + previously *) + (* nlist = the number of args (A , B , ... ) + eqA = the deBruijn index of the first eq param + ndx = how much to translate due to the 2nd Case + *) + let compute_A_equality rel_list nlist eqA ndx t = + let lifti = ndx in + let rec aux c a = match c with + | Rel x -> mkRel (x-nlist+ndx) + | Var x -> mkVar (id_of_string ("eq_"^(string_of_id x))) + | Cast (x,_,_) -> aux (kind_of_term x) a + | App (x,newa) -> aux (kind_of_term x) newa + | Ind (sp',i) -> if sp=sp' then mkRel(eqA-nlist-i+nb_ind-1) + else ( try + let eq = find_eq_scheme (sp',i) + and eqa = Array.map + (fun x -> aux (kind_of_term x) [||] ) a + in + let args = Array.append + (Array.map (fun x->lift lifti x) a) eqa + in if args = [||] then eq + else mkApp (eq,Array.append + (Array.map (fun x->lift lifti x) a) eqa) + with Not_found -> raise(EqNotFound (string_of_kn sp')) + ) + | Sort _ -> raise (EqUnknown "Sort" ) + | Prod _ -> raise (EqUnknown "Prod" ) + | Lambda _-> raise (EqUnknown "Lambda") + | LetIn _ -> raise (EqUnknown "LetIn") + | Const kn -> let mp,dir,lbl= repr_con kn in + mkConst (make_con mp dir ( + mk_label ("eq_"^(string_of_label lbl)))) + | Construct _ -> raise (EqUnknown "Construct") + | Case _ -> raise (EqUnknown "Case") + | CoFix _ -> raise (EqUnknown "CoFix") + | Fix _ -> raise (EqUnknown "Fix") + | Meta _ -> raise (EqUnknown "Meta") + | Evar _ -> raise (EqUnknown "Evar") + in + aux t [||] + in + (* construct the predicate for the Case part*) + let do_predicate rel_list n = + List.fold_left (fun a b -> mkLambda(Anonymous,b,a)) + (mkLambda (Anonymous, + mkFullInd ind (n+3+(List.length rettyp_l)+nb_ind-1), + bb)) + (List.rev rettyp_l) in + (* make_one_eq *) + (* do the [| C1 ... => match Y with ... end + ... + Cn => match Y with ... end |] part *) + let ci = make_case_info env ind MatchStyle in + let constrs n = get_constructors env (make_ind_family (ind, + extended_rel_list (n+nb_ind-1) mib.mind_params_ctxt)) in + let constrsi = constrs (3+nparrec) in + let n = Array.length constrsi in + let ar = Array.create n ff in + for i=0 to n-1 do + let nb_cstr_args = List.length constrsi.(i).cs_args in + let ar2 = Array.create n ff in + let constrsj = constrs (3+nparrec+nb_cstr_args) in + for j=0 to n-1 do + if (i=j) then + ar2.(j) <- let cc = (match nb_cstr_args with + | 0 -> tt + | _ -> let eqs = Array.make nb_cstr_args tt in + for ndx = 0 to nb_cstr_args-1 do + let _,_,cc = List.nth constrsi.(i).cs_args ndx in + let eqA = compute_A_equality rel_list + nparrec + (nparrec+3+2*nb_cstr_args) + (nb_cstr_args+ndx+1) + (kind_of_term cc) + in + Array.set eqs ndx + (mkApp (eqA, + [|mkRel (ndx+1+nb_cstr_args);mkRel (ndx+1)|] + )) + done; + Array.fold_left + (fun a b -> mkApp (andb(),[|b;a|])) + (eqs.(0)) + (Array.sub eqs 1 (nb_cstr_args - 1)) + ) + in + (List.fold_left (fun a (p,q,r) -> mkLambda (p,r,a)) cc + (constrsj.(j).cs_args) + ) + else ar2.(j) <- (List.fold_left (fun a (p,q,r) -> + mkLambda (p,r,a)) ff (constrsj.(j).cs_args) ) + done; + + ar.(i) <- (List.fold_left (fun a (p,q,r) -> mkLambda (p,r,a)) + (mkCase (ci,do_predicate rel_list nb_cstr_args, + mkVar (id_of_string "Y") ,ar2)) + (constrsi.(i).cs_args)) + done; + mkNamedLambda (id_of_string "X") (mkFullInd ind (nb_ind-1+1)) ( + mkNamedLambda (id_of_string "Y") (mkFullInd ind (nb_ind-1+2)) ( + mkCase (ci, do_predicate rel_list 0,mkVar (id_of_string "X"),ar))) + in (* make_eq_scheme *) + try + let names = Array.make nb_ind Anonymous and + types = Array.make nb_ind mkSet and + cores = Array.make nb_ind mkSet and + res = Array.make nb_ind mkSet in + for i=0 to (nb_ind-1) do + names.(i) <- Name (id_of_string (rec_name i)); + types.(i) <- mkArrow (mkFullInd (sp,i) 0) + (mkArrow (mkFullInd (sp,i) 1) bb); + cores.(i) <- make_one_eq i + done; + if (string_of_mp (modpath sp ))="Coq.Init.Logic" + then print_string "Logic time, do nothing.\n" + else ( + for i=0 to (nb_ind-1) do + let cpack = Array.get mib.mind_packets i in + if check_eq_scheme (sp,i) + then message ("Boolean equality is already defined on "^ + (string_of_id cpack.mind_typename)^".") + else ( + let fix = mkFix (((Array.make nb_ind 0),i),(names,types,cores)) in + res.(i) <- create_input fix + ) + done; + ); + res + with + | EqUnknown s -> error ("Type unexpected ("^s^ + ") during boolean eq computation, please report.") + | EqNotFound s -> error ("Boolean equality on "^s^ + " is missing, equality will not be defined.") + | _ -> error ("Unknown exception during boolean equality creation,"^ + " the equality will not be defined.") + +(* This function tryies to get the [inductive] between a constr + the constr should be Ind i or App(Ind i,[|args|]) +*) +let destruct_ind c = + try let u,v = destApp c in + let indc = destInd u in + indc,v + with _-> let indc = destInd c in + indc,[||] + +(* + In the followind, avoid is the list of names to avoid. + If the args of the Inductive type are A1 ... An + then avoid should be + [| lb_An ... lb _A1 (resp. bl_An ... bl_A1) + eq_An .... eq_A1 An ... A1 |] +so from Ai we can find the the correct eq_Ai bl_ai or lb_ai +*) +(* used in the leib -> bool side*) +let do_replace_lb aavoid narg gls p q = + let avoid = Array.of_list aavoid in + let do_arg v offset = + try + let x = narg*offset in + let s = destVar v in + let n = Array.length avoid in + let rec find i = + if avoid.(n-i) = s then avoid.(n-i-x) + else (if i (* if this happen then the args have to be already declared as a + Parameter*) + ( + let mp,dir,lbl = repr_con (destConst v) in + mkConst (make_con mp dir (mk_label ( + if offset=1 then ("eq_"^(string_of_label lbl)) + else ((string_of_label lbl)^"_lb") + ))) + ) + in + let type_of_pq = pf_type_of gls p in + let u,v = destruct_ind type_of_pq + in let lb_type_of_p = + try find_lb_proof u + with Not_found -> + (* spiwack: the format of this error message should probably + be improved. *) + let err_msg = msg_with Format.str_formatter + (str "Leibniz->boolean:" ++ + str "You have to declare the" ++ + str "decidability over " ++ + Printer.pr_constr type_of_pq ++ + str " first."); + Format.flush_str_formatter () + in + error err_msg + in let lb_args = Array.append (Array.append + (Array.map (fun x -> x) v) + (Array.map (fun x -> do_arg x 1) v)) + (Array.map (fun x -> do_arg x 2) v) + in let app = if lb_args = [||] + then lb_type_of_p else mkApp (lb_type_of_p,lb_args) + in [Equality.replace p q ; apply app ; Auto.default_auto] + + +(* used in the bool -> leib side *) +let do_replace_bl ind gls aavoid narg lft rgt = + let avoid = Array.of_list aavoid in + let do_arg v offset = + try + let x = narg*offset in + let s = destVar v in + let n = Array.length avoid in + let rec find i = + if avoid.(n-i) = s then avoid.(n-i-x) + else (if i (* if this happen then the args have to be already declared as a + Parameter*) + ( + let mp,dir,lbl = repr_con (destConst v) in + mkConst (make_con mp dir (mk_label ( + if offset=1 then ("eq_"^(string_of_label lbl)) + else ((string_of_label lbl)^"_bl") + ))) + ) + in + + let rec aux l1 l2 = + match (l1,l2) with + | (t1::q1,t2::q2) -> let tt1 = pf_type_of gls t1 in + if t1=t2 then aux q1 q2 + else ( + let u,v = try destruct_ind tt1 + (* trick so that the good sequence is returned*) + with _ -> ind,[||] + in if u = ind + then (Equality.replace t1 t2)::(Auto.default_auto)::(aux q1 q2) + else ( + let bl_t1 = + try find_bl_proof u + with Not_found -> + (* spiwack: the format of this error message should probably + be improved. *) + let err_msg = msg_with Format.str_formatter + (str "boolean->Leibniz:" ++ + str "You have to declare the" ++ + str "decidability over " ++ + Printer.pr_constr tt1 ++ + str " first."); + Format.flush_str_formatter () + in + error err_msg + in let bl_args = + Array.append (Array.append + (Array.map (fun x -> x) v) + (Array.map (fun x -> do_arg x 1) v)) + (Array.map (fun x -> do_arg x 2) v ) + in + let app = if bl_args = [||] + then bl_t1 else mkApp (bl_t1,bl_args) + in + (Equality.replace_by t1 t2 + (tclTHEN (apply app) (Auto.default_auto)))::(aux q1 q2) + ) + ) + | ([],[]) -> [] + | _ -> error "Both side of the equality must have the same arity." + in + let (ind1,ca1) = try destApp lft with + _ -> error "replace failed." + and (ind2,ca2) = try destApp rgt with + _ -> error "replace failed." + in + let (sp1,i1) = try destInd ind1 with + _ -> (try fst (destConstruct ind1) with _ -> + error "The expected type is an inductive one.") + and (sp2,i2) = try destInd ind2 with + _ -> (try fst (destConstruct ind2) with _ -> + error "The expected type is an inductive one.") + in + if (sp1 <> sp2) || (i1 <> i2) + then (error "Eq should be on the same type") + else (aux (Array.to_list ca1) (Array.to_list ca2)) + +(* + create, from a list of ids [i1,i2,...,in] the list + [(in,eq_in,in_bl,in_al),,...,(i1,eq_i1,i1_bl_i1_al )] +*) +let list_id l = List.fold_left ( fun a (n,_,t) -> let s' = + match n with + Name s -> string_of_id s + | Anonymous -> "A" in + (id_of_string s',id_of_string ("eq_"^s'), + id_of_string (s'^"_bl"), + id_of_string (s'^"_lb")) + ::a + ) [] l +(* + build the right eq_I A B.. N eq_A .. eq_N +*) +let eqI ind l = + let list_id = list_id l in + let eA = Array.of_list((List.map (fun (s,_,_,_) -> mkVar s) list_id)@ + (List.map (fun (_,seq,_,_)-> mkVar seq) list_id )) + and e = try find_eq_scheme ind with + Not_found -> error + ("The boolean equality on "^(string_of_kn (fst ind))^" is needed."); + in (if eA = [||] then e else mkApp(e,eA)) + +let compute_bl_goal ind lnamesparrec nparrec = + let eqI = eqI ind lnamesparrec in + let list_id = list_id lnamesparrec in + let create_input c = + let x = id_of_string "x" and + y = id_of_string "y" in + let bl_typ = List.map (fun (s,seq,_,_) -> + mkNamedProd x (mkVar s) ( + mkNamedProd y (mkVar s) ( + mkArrow + ( mkApp(eq,[|bb;mkApp(mkVar seq,[|mkVar x;mkVar y|]);tt|])) + ( mkApp(eq,[|mkVar s;mkVar x;mkVar y|])) + )) + ) list_id in + let bl_input = List.fold_left2 ( fun a (s,_,sbl,_) b -> + mkNamedProd sbl b a + ) c (List.rev list_id) (List.rev bl_typ) in + let eqs_typ = List.map (fun (s,_,_,_) -> + mkProd(Anonymous,mkVar s,mkProd(Anonymous,mkVar s,bb)) + ) list_id in + let eq_input = List.fold_left2 ( fun a (s,seq,_,_) b -> + mkNamedProd seq b a + ) bl_input (List.rev list_id) (List.rev eqs_typ) in + List.fold_left (fun a (n,_,t) -> mkNamedProd + (match n with Name s -> s | Anonymous -> id_of_string "A") + t a) eq_input lnamesparrec + in + let n = id_of_string "n" and + m = id_of_string "m" in + create_input ( + mkNamedProd n (mkFullInd ind nparrec) ( + mkNamedProd m (mkFullInd ind (nparrec+1)) ( + mkArrow + (mkApp(eq,[|bb;mkApp(eqI,[|mkVar n;mkVar m|]);tt|])) + (mkApp(eq,[|mkFullInd ind (nparrec+3);mkVar n;mkVar m|])) + ))) + +let compute_bl_tact ind lnamesparrec nparrec = + let list_id = list_id lnamesparrec in + let avoid = ref [] in + let gsig = top_goal_of_pftreestate (Pfedit.get_pftreestate()) in + let first_intros = + ( List.map (fun (s,_,_,_) -> s ) list_id ) @ + ( List.map (fun (_,seq,_,_ ) -> seq) list_id ) @ + ( List.map (fun (_,_,sbl,_ ) -> sbl) list_id ) + in + let fresh_first_intros = List.map ( fun s -> + let fresh = fresh_id (!avoid) s gsig in + avoid := fresh::(!avoid); fresh ) first_intros in + let freshn = fresh_id (!avoid) (id_of_string "n") gsig in + let freshm = avoid := freshn::(!avoid); + fresh_id (!avoid) (id_of_string "m") gsig in + let freshz = avoid := freshm::(!avoid); + fresh_id (!avoid) (id_of_string "Z") gsig in + (* try with *) + avoid := freshz::(!avoid); + Pfedit.by ( + tclTHENSEQ [ intros_using fresh_first_intros; + intro_using freshn ; + new_induct false [ (Tacexpr.ElimOnConstr ((mkVar freshn), + Rawterm.NoBindings))] + None + Genarg.IntroAnonymous + None; + intro_using freshm; + new_destruct false [ (Tacexpr.ElimOnConstr ((mkVar freshm), + Rawterm.NoBindings))] + None + Genarg.IntroAnonymous + None; + intro_using freshz; + intros; + tclTRY ( + tclORELSE reflexivity (Equality.discr_tac false None) + ); + simpl_in_hyp + ((Rawterm.all_occurrences_expr,freshz),Tacexpr.InHyp); +(* +repeat ( apply andb_prop in z;let z1:= fresh "Z" in destruct z as [z1 z]). +*) + tclREPEAT ( + tclTHENSEQ [ + apply_in false freshz [(andb_prop()),Rawterm.NoBindings]; + fun gl -> + let fresht = fresh_id (!avoid) (id_of_string "Z") gsig + in + avoid := fresht::(!avoid); + (new_destruct false [Tacexpr.ElimOnConstr + ((mkVar freshz,Rawterm.NoBindings))] + None + ( Genarg.IntroOrAndPattern [[ + Genarg.IntroIdentifier fresht; + Genarg.IntroIdentifier freshz]]) None) gl + ]); +(* + Ci a1 ... an = Ci b1 ... bn + replace bi with ai; auto || replace bi with ai by apply typeofbi_prod ; auto +*) + fun gls-> let gl = (gls.Evd.it).Evd.evar_concl in + match (kind_of_term gl) with + | App (c,ca) -> ( + match (kind_of_term c) with + | Ind (i1,i2) -> + if(string_of_label (label i1) = "eq") + then ( + tclTHENSEQ ((do_replace_bl ind gls (!avoid) + nparrec (ca.(2)) + (ca.(1)))@[Auto.default_auto]) gls + ) + else + (error "Failure while solving Boolean->Leibniz.") + | _ -> error "Failure while solving Boolean->Leibniz." + ) + | _ -> error "Failure while solving Boolean->Leibniz." + + ] + ) + +let compute_lb_goal ind lnamesparrec nparrec = + let list_id = list_id lnamesparrec in + let eqI = eqI ind lnamesparrec in + let create_input c = + let x = id_of_string "x" and + y = id_of_string "y" in + let lb_typ = List.map (fun (s,seq,_,_) -> + mkNamedProd x (mkVar s) ( + mkNamedProd y (mkVar s) ( + mkArrow + ( mkApp(eq,[|mkVar s;mkVar x;mkVar y|])) + ( mkApp(eq,[|bb;mkApp(mkVar seq,[|mkVar x;mkVar y|]);tt|])) + )) + ) list_id in + let lb_input = List.fold_left2 ( fun a (s,_,_,slb) b -> + mkNamedProd slb b a + ) c (List.rev list_id) (List.rev lb_typ) in + let eqs_typ = List.map (fun (s,_,_,_) -> + mkProd(Anonymous,mkVar s,mkProd(Anonymous,mkVar s,bb)) + ) list_id in + let eq_input = List.fold_left2 ( fun a (s,seq,_,_) b -> + mkNamedProd seq b a + ) lb_input (List.rev list_id) (List.rev eqs_typ) in + List.fold_left (fun a (n,_,t) -> mkNamedProd + (match n with Name s -> s | Anonymous -> id_of_string "A") + t a) eq_input lnamesparrec + in + let n = id_of_string "n" and + m = id_of_string "m" in + create_input ( + mkNamedProd n (mkFullInd ind nparrec) ( + mkNamedProd m (mkFullInd ind (nparrec+1)) ( + mkArrow + (mkApp(eq,[|mkFullInd ind (nparrec+2);mkVar n;mkVar m|])) + (mkApp(eq,[|bb;mkApp(eqI,[|mkVar n;mkVar m|]);tt|])) + ))) + +let compute_lb_tact ind lnamesparrec nparrec = + let list_id = list_id lnamesparrec in + let avoid = ref [] in + let gsig = top_goal_of_pftreestate (Pfedit.get_pftreestate()) in + let first_intros = + ( List.map (fun (s,_,_,_) -> s ) list_id ) @ + ( List.map (fun (_,seq,_,_) -> seq) list_id ) @ + ( List.map (fun (_,_,_,slb) -> slb) list_id ) + in + let fresh_first_intros = List.map ( fun s -> + let fresh = fresh_id (!avoid) s gsig in + avoid := fresh::(!avoid); fresh ) first_intros in + let freshn = fresh_id (!avoid) (id_of_string "n") gsig in + let freshm = avoid := freshn::(!avoid); + fresh_id (!avoid) (id_of_string "m") gsig in + let freshz = avoid := freshm::(!avoid); + fresh_id (!avoid) (id_of_string "Z") gsig in + (* try with *) + avoid := freshz::(!avoid); + Pfedit.by ( + tclTHENSEQ [ intros_using fresh_first_intros; + intro_using freshn ; + new_induct false [Tacexpr.ElimOnConstr + ((mkVar freshn),Rawterm.NoBindings)] + None + Genarg.IntroAnonymous + None; + intro_using freshm; + new_destruct false [Tacexpr.ElimOnConstr + ((mkVar freshm),Rawterm.NoBindings)] + None + Genarg.IntroAnonymous + None; + intro_using freshz; + intros; + tclTRY ( + tclORELSE reflexivity (Equality.discr_tac false None) + ); + Equality.inj [] false (mkVar freshz,Rawterm.NoBindings); + intros; simpl_in_concl; + Auto.default_auto; + tclREPEAT ( + tclTHENSEQ [apply (andb_true_intro()); + simplest_split ;Auto.default_auto ] + ); + fun gls -> let gl = (gls.Evd.it).Evd.evar_concl in + (* assume the goal to be eq (eq_type ...) = true *) + match (kind_of_term gl) with + | App(c,ca) -> (match (kind_of_term ca.(1)) with + | App(c',ca') -> + let n = Array.length ca' in + tclTHENSEQ (do_replace_lb (!avoid) + nparrec gls + ca'.(n-2) ca'.(n-1)) gls + | _ -> error + "Failure while solving Leibniz->Boolean." + ) + | _ -> error + "Failure while solving Leibniz->Boolean." + ] + ) + +(* {n=m}+{n<>m} part *) +let compute_dec_goal ind lnamesparrec nparrec = + let list_id = list_id lnamesparrec in + let create_input c = + let x = id_of_string "x" and + y = id_of_string "y" in + let lb_typ = List.map (fun (s,seq,_,_) -> + mkNamedProd x (mkVar s) ( + mkNamedProd y (mkVar s) ( + mkArrow + ( mkApp(eq,[|mkVar s;mkVar x;mkVar y|])) + ( mkApp(eq,[|bb;mkApp(mkVar seq,[|mkVar x;mkVar y|]);tt|])) + )) + ) list_id in + let bl_typ = List.map (fun (s,seq,_,_) -> + mkNamedProd x (mkVar s) ( + mkNamedProd y (mkVar s) ( + mkArrow + ( mkApp(eq,[|bb;mkApp(mkVar seq,[|mkVar x;mkVar y|]);tt|])) + ( mkApp(eq,[|mkVar s;mkVar x;mkVar y|])) + )) + ) list_id in + + let lb_input = List.fold_left2 ( fun a (s,_,_,slb) b -> + mkNamedProd slb b a + ) c (List.rev list_id) (List.rev lb_typ) in + let bl_input = List.fold_left2 ( fun a (s,_,sbl,_) b -> + mkNamedProd sbl b a + ) lb_input (List.rev list_id) (List.rev bl_typ) in + + let eqs_typ = List.map (fun (s,_,_,_) -> + mkProd(Anonymous,mkVar s,mkProd(Anonymous,mkVar s,bb)) + ) list_id in + let eq_input = List.fold_left2 ( fun a (s,seq,_,_) b -> + mkNamedProd seq b a + ) bl_input (List.rev list_id) (List.rev eqs_typ) in + List.fold_left (fun a (n,_,t) -> mkNamedProd + (match n with Name s -> s | Anonymous -> id_of_string "A") + t a) eq_input lnamesparrec + in + let n = id_of_string "n" and + m = id_of_string "m" in + let eqnm = mkApp(eq,[|mkFullInd ind (2*nparrec+2);mkVar n;mkVar m|]) in + create_input ( + mkNamedProd n (mkFullInd ind (2*nparrec)) ( + mkNamedProd m (mkFullInd ind (2*nparrec+1)) ( + mkApp(sumbool(),[|eqnm;mkApp (Coqlib.build_coq_not(),[|eqnm|])|]) + ) + ) + ) + +let compute_dec_tact ind lnamesparrec nparrec = + let list_id = list_id lnamesparrec in + let eqI = eqI ind lnamesparrec in + let avoid = ref [] in + let gsig = top_goal_of_pftreestate (Pfedit.get_pftreestate()) in + let eqtrue x = mkApp(eq,[|bb;x;tt|]) in + let eqfalse x = mkApp(eq,[|bb;x;ff|]) in + let first_intros = + ( List.map (fun (s,_,_,_) -> s ) list_id ) @ + ( List.map (fun (_,seq,_,_) -> seq) list_id ) @ + ( List.map (fun (_,_,sbl,_) -> sbl) list_id ) @ + ( List.map (fun (_,_,_,slb) -> slb) list_id ) + in + let fresh_first_intros = List.map ( fun s -> + let fresh = fresh_id (!avoid) s gsig in + avoid := fresh::(!avoid); fresh ) first_intros in + let freshn = fresh_id (!avoid) (id_of_string "n") gsig in + let freshm = avoid := freshn::(!avoid); + fresh_id (!avoid) (id_of_string "m") gsig in + let freshH = avoid := freshm::(!avoid); + fresh_id (!avoid) (id_of_string "H") gsig in + let eqbnm = mkApp(eqI,[|mkVar freshn;mkVar freshm|]) in + avoid := freshH::(!avoid); + Pfedit.by ( tclTHENSEQ [ + intros_using fresh_first_intros; + intros_using [freshn;freshm]; + assert_as true (Genarg.IntroIdentifier freshH) ( + mkApp(sumbool(),[|eqtrue eqbnm; eqfalse eqbnm|]) + ) ]); +(*we do this so we don't have to prove the same goal twice *) + Pfedit.by ( tclTHEN + (new_destruct false [Tacexpr.ElimOnConstr + (eqbnm,Rawterm.NoBindings)] + None + Genarg.IntroAnonymous + None) + Auto.default_auto + ); + Pfedit.by ( + let freshH2 = fresh_id (!avoid) (id_of_string "H") gsig in + avoid := freshH2::(!avoid); + new_destruct false [Tacexpr.ElimOnConstr + ((mkVar freshH),Rawterm.NoBindings)] + None + (Genarg.IntroOrAndPattern [ + [Genarg.IntroAnonymous]; + [Genarg.IntroIdentifier freshH2]]) None + ); + let arfresh = Array.of_list fresh_first_intros in + let xargs = Array.sub arfresh 0 (2*nparrec) in + let blI = try find_bl_proof ind with + Not_found -> error ( + "Error during the decidability part, boolean to leibniz"^ + " equality is required.") + in + let lbI = try find_lb_proof ind with + Not_found -> error ( + "Error during the decidability part, leibniz to boolean"^ + " equality is required.") + in + + (* left *) + Pfedit.by ( tclTHENSEQ [ simplest_left; + apply (mkApp(blI,Array.map(fun x->mkVar x) xargs)); + Auto.default_auto + ]); + (*right *) + let freshH3 = fresh_id (!avoid) (id_of_string "H") gsig in + avoid := freshH3::(!avoid); + Pfedit.by (tclTHENSEQ [ simplest_right ; + unfold_constr (Lazy.force Coqlib.coq_not_ref); + intro; + Equality.subst_all; + assert_as true (Genarg.IntroIdentifier freshH3) + (mkApp(eq,[|bb;mkApp(eqI,[|mkVar freshm;mkVar freshm|]);tt|])) + ]); + Pfedit.by + (tclTHENSEQ [apply (mkApp(lbI,Array.map (fun x->mkVar x) xargs)); + Auto.default_auto + ]); + Pfedit.by (Equality.general_rewrite_bindings_in true + all_occurrences + (List.hd !avoid) + ((mkVar (List.hd (List.tl !avoid))), + Rawterm.NoBindings + ) + true); + Pfedit.by (Equality.discr_tac false None) + + diff --git a/toplevel/auto_ind_decl.mli b/toplevel/auto_ind_decl.mli new file mode 100644 index 00000000..b8fa1710 --- /dev/null +++ b/toplevel/auto_ind_decl.mli @@ -0,0 +1,27 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* (inductive*constr) + +val compute_bl_goal : inductive -> rel_context -> int -> types +val compute_bl_tact : inductive -> rel_context -> int -> unit +val compute_lb_goal : inductive -> rel_context -> int -> types +val compute_lb_tact : inductive -> rel_context -> int -> unit +val compute_dec_goal : inductive -> rel_context -> int -> types +val compute_dec_tact : inductive -> rel_context -> int -> unit + + +val make_eq_scheme :mutual_inductive -> types array diff --git a/toplevel/cerrors.ml b/toplevel/cerrors.ml index f6c5c3af..40d74256 100644 --- a/toplevel/cerrors.ml +++ b/toplevel/cerrors.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: cerrors.ml 9306 2006-10-28 18:28:19Z herbelin $ *) +(* $Id: cerrors.ml 10410 2007-12-31 13:11:55Z msozeau $ *) open Pp open Util @@ -26,11 +26,7 @@ let print_loc loc = let guill s = "\""^s^"\"" let where s = - if !Options.debug then (str"in " ++ str s ++ str":" ++ spc ()) else (mt ()) - -let anomaly_string () = str "Anomaly: " - -let report () = (str "." ++ spc () ++ str "Please report.") + if !Flags.debug then (str"in " ++ str s ++ str":" ++ spc ()) else (mt ()) (* assumption : explain_sys_exn does NOT end with a 'FNL anymore! *) @@ -68,12 +64,21 @@ let rec explain_exn_default_aux anomaly_string report_fn = function hov 0 (anomaly_string () ++ str "uncaught exception Invalid_argument " ++ str (guill s) ++ report_fn ()) | Sys.Break -> hov 0 (fnl () ++ str "User interrupt.") - | Univ.UniverseInconsistency -> - hov 0 (str "Error: Universe inconsistency.") + | Univ.UniverseInconsistency (o,u,v) -> + let msg = + if !Constrextern.print_universes then + spc() ++ str "(cannot enforce" ++ spc() ++ Univ.pr_uni u ++ spc() ++ + str (match o with Univ.Lt -> "<" | Univ.Le -> "<=" | Univ.Eq -> "=") + ++ spc() ++ Univ.pr_uni v ++ str")" + else + mt() in + hov 0 (str "Error: Universe inconsistency" ++ msg ++ str ".") | TypeError(ctx,te) -> hov 0 (str "Error:" ++ spc () ++ Himsg.explain_type_error ctx te) | PretypeError(ctx,te) -> hov 0 (str "Error:" ++ spc () ++ Himsg.explain_pretype_error ctx te) + | Typeclasses_errors.TypeClassError(env, te) -> + hov 0 (str "Error:" ++ spc () ++ Himsg.explain_typeclass_error env te) | InductiveError e -> hov 0 (str "Error:" ++ spc () ++ Himsg.explain_inductive_error e) | RecursionSchemeError e -> @@ -127,11 +132,15 @@ let rec explain_exn_default_aux anomaly_string report_fn = function hov 0 (anomaly_string () ++ str "Uncaught exception " ++ str (Printexc.to_string reraise) ++ report_fn ()) +let anomaly_string () = str "Anomaly: " + +let report () = (str "." ++ spc () ++ str "Please report.") + let explain_exn_default = - explain_exn_default_aux (fun () -> str "Anomaly: ") report + explain_exn_default_aux anomaly_string report let raise_if_debug e = - if !Options.debug then raise e + if !Flags.debug then raise e let _ = Tactic_debug.explain_logic_error := explain_exn_default diff --git a/toplevel/class.ml b/toplevel/class.ml index 5f385934..92fd2d4c 100644 --- a/toplevel/class.ml +++ b/toplevel/class.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: class.ml 7941 2006-01-28 23:07:59Z herbelin $ *) +(* $Id: class.ml 11085 2008-06-10 08:54:43Z herbelin $ *) open Util open Pp @@ -27,28 +27,12 @@ open Nametab open Decl_kinds open Safe_typing -let strength_min4 stre1 stre2 stre3 stre4 = - strength_min ((strength_min (stre1,stre2)),(strength_min (stre3,stre4))) +let strength_min l = if List.mem Local l then Local else Global let id_of_varid c = match kind_of_term c with | Var id -> id | _ -> anomaly "class__id_of_varid" -(* lf liste des variable dont depend la coercion f - lc liste des variable dont depend la classe source *) - -let rec stre_unif_cond = function - | ([],[]) -> Global - | (v::l,[]) -> variable_strength v - | ([],v::l) -> variable_strength v - | (v1::l1,v2::l2) -> - if v1=v2 then - stre_unif_cond (l1,l2) - else - let stre1 = (variable_strength v1) - and stre2 = (variable_strength v2) in - strength_min (stre1,stre2) - (* Errors *) type coercion_error_kind = @@ -98,9 +82,9 @@ let check_reference_arity ref = let check_arity = function | CL_FUN | CL_SORT -> () - | CL_CONST sp -> check_reference_arity (ConstRef sp) - | CL_SECVAR sp -> check_reference_arity (VarRef sp) - | CL_IND sp -> check_reference_arity (IndRef sp) + | CL_CONST cst -> check_reference_arity (ConstRef cst) + | CL_SECVAR id -> check_reference_arity (VarRef id) + | CL_IND kn -> check_reference_arity (IndRef kn) (* Coercions *) @@ -184,20 +168,22 @@ let prods_of t = aux [] t let strength_of_cl = function - | CL_CONST kn -> constant_strength (sp_of_global (ConstRef kn)) - | CL_SECVAR sp -> variable_strength sp + | CL_CONST kn -> Global + | CL_SECVAR id -> Local | _ -> Global let get_strength stre ref cls clt = let stres = strength_of_cl cls in let stret = strength_of_cl clt in let stref = strength_of_global ref in -(* 01/00: Supprimé la prise en compte de la force des variables locales. Sens ? - let streunif = stre_unif_cond (s_vardep,f_vardep) in - *) - let streunif = Global in - let stre' = strength_min4 stres stret stref streunif in - strength_min (stre,stre') + strength_min [stre;stres;stret;stref] + +let ident_key_of_class = function + | CL_FUN -> "Funclass" + | CL_SORT -> "Sortclass" + | CL_CONST sp -> string_of_label (con_label sp) + | CL_IND (sp,_) -> string_of_label (label sp) + | CL_SECVAR id -> string_of_id id (* coercion identité *) @@ -239,15 +225,15 @@ let build_id_coercion idf_opt source = match idf_opt with | Some idf -> idf | None -> - id_of_string ("Id_"^(string_of_class source)^"_"^ - (string_of_class (fst (find_class_type t)))) + id_of_string ("Id_"^(ident_key_of_class source)^"_"^ + (ident_key_of_class (fst (find_class_type t)))) in let constr_entry = (* Cast is necessary to express [val_f] is identity *) DefinitionEntry { const_entry_body = mkCast (val_f, DEFAULTcast, typ_f); const_entry_type = Some typ_f; const_entry_opaque = false; - const_entry_boxed = Options.boxed_definitions()} in + const_entry_boxed = Flags.boxed_definitions()} in let kn = declare_constant idf (constr_entry,IsDefinition IdentityCoercion) in ConstRef kn @@ -318,7 +304,7 @@ let try_add_new_coercion_with_source ref stre ~source = let add_coercion_hook stre ref = try_add_new_coercion ref stre; - Options.if_verbose message + Flags.if_verbose message (string_of_qualid (shortest_qualid_of_global Idset.empty ref) ^ " is now a coercion") diff --git a/toplevel/class.mli b/toplevel/class.mli index 7717d754..98ed6a0d 100644 --- a/toplevel/class.mli +++ b/toplevel/class.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: class.mli 6748 2005-02-18 22:17:50Z herbelin $ i*) +(*i $Id: class.mli 10840 2008-04-23 21:29:34Z herbelin $ i*) (*i*) open Names @@ -22,28 +22,28 @@ open Nametab (* [try_add_new_coercion_with_target ref s src tg] declares [ref] as a coercion from [src] to [tg] *) -val try_add_new_coercion_with_target : global_reference -> strength -> +val try_add_new_coercion_with_target : global_reference -> locality -> source:cl_typ -> target:cl_typ -> unit (* [try_add_new_coercion ref s] declares [ref], assumed to be of type [(x1:T1)...(xn:Tn)src->tg], as a coercion from [src] to [tg] *) -val try_add_new_coercion : global_reference -> strength -> unit +val try_add_new_coercion : global_reference -> locality -> unit (* [try_add_new_coercion_subclass cst s] expects that [cst] denotes a transparent constant which unfolds to some class [tg]; it declares an identity coercion from [cst] to [tg], named something like ["Id_cst_tg"] *) -val try_add_new_coercion_subclass : cl_typ -> strength -> unit +val try_add_new_coercion_subclass : cl_typ -> locality -> unit (* [try_add_new_coercion_with_source ref s src] declares [ref] as a coercion from [src] to [tg] where the target is inferred from the type of [ref] *) -val try_add_new_coercion_with_source : global_reference -> strength -> +val try_add_new_coercion_with_source : global_reference -> locality -> source:cl_typ -> unit (* [try_add_new_identity_coercion id s src tg] enriches the environment with a new definition of name [id] declared as an identity coercion from [src] to [tg] *) -val try_add_new_identity_coercion : identifier -> strength -> +val try_add_new_identity_coercion : identifier -> locality -> source:cl_typ -> target:cl_typ -> unit val add_coercion_hook : Tacexpr.declaration_hook diff --git a/toplevel/classes.ml b/toplevel/classes.ml new file mode 100644 index 00000000..8ed99cbd --- /dev/null +++ b/toplevel/classes.ml @@ -0,0 +1,737 @@ +(* -*- compile-command: "make -C .. bin/coqtop.byte" -*- *) +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* + Flags.silently (fun () -> + Auto.add_hints false [hint_db] + (Vernacexpr.HintsResolve + [pri, CAppExpl (dummy_loc, (None, qualid_of_con inst), [])])) ()) + +let declare_instance_cst glob con = + let instance = Typeops.type_of_constant (Global.env ()) con in + let _, r = decompose_prod_assum instance in + match class_of_constr r with + | Some tc -> add_instance (new_instance tc None glob con) + | None -> error "Constant does not build instances of a declared type class" + +let declare_instance glob idl = + let con = + try (match global (Ident idl) with + | ConstRef x -> x + | _ -> raise Not_found) + with _ -> error "Instance definition not found" + in declare_instance_cst glob con + +let mismatched_params env n m = mismatched_ctx_inst env Parameters n m +(* let mismatched_defs env n m = mismatched_ctx_inst env Definitions n m *) +let mismatched_props env n m = mismatched_ctx_inst env Properties n m + +type binder_list = (identifier located * bool * constr_expr) list + +let interp_binders_evars isevars env avoid l = + List.fold_left + (fun (env, ids, params) ((loc, i), t) -> + let n = Name i in + let t' = interp_binder_evars isevars env n t in + let d = (i,None,t') in + (push_named d env, i :: ids, d::params)) + (env, avoid, []) l + +let interp_typeclass_context_evars isevars env avoid l = + List.fold_left + (fun (env, ids, params) (iid, bk, l) -> + let t' = interp_binder_evars isevars env (snd iid) l in + let i = match snd iid with + | Anonymous -> Nameops.next_name_away (Termops.named_hd env t' Anonymous) ids + | Name id -> id + in + let d = (i,None,t') in + (push_named d env, i :: ids, d::params)) + (env, avoid, []) l + +let interp_constrs_evars isevars env avoid l = + List.fold_left + (fun (env, ids, params) t -> + let t' = interp_binder_evars isevars env Anonymous t in + let id = Nameops.next_name_away (Termops.named_hd env t' Anonymous) ids in + let d = (id,None,t') in + (push_named d env, id :: ids, d::params)) + (env, avoid, []) l + +let raw_assum_of_binders k = + List.map (fun ((loc,i),t) -> LocalRawAssum ([(loc, Name i)], k, t)) + +let raw_assum_of_constrs k = + List.map2 (fun t (n,_,_) -> LocalRawAssum ([(dummy_loc, Name n)], k, t)) + +let raw_assum_of_anonymous_constrs k = + List.map (fun t -> LocalRawAssum ([(dummy_loc, Anonymous)], k, t)) + +let decl_expr_of_binders = + List.map (fun ((loc,i),t) -> false, Vernacexpr.AssumExpr ((loc, Name i), t)) + +let rec unfold n f acc = + match n with + | 0 -> f 0 acc + | n -> unfold (n - 1) f (f n acc) + +(* Declare everything in the parameters as implicit, and the class instance as well *) +open Topconstr + +let declare_implicit_proj c proj imps sub = + let len = List.length c.cl_context in + let (ctx, _) = decompose_prod_n (len + 1) (Typeops.type_of_constant (Global.env()) (snd proj)) in + let expls = + let rec aux i expls = function + [] -> expls + | (Name n, _) :: tl -> + let impl = ExplByPos (i, Some n), (true, true) in + aux (succ i) (impl :: List.remove_assoc (ExplByName n) expls) tl + | (Anonymous,_) :: _ -> assert(false) + in + aux 1 [] (List.rev ctx) + in + let expls = expls @ List.map (function (ExplByPos (i, n), f) -> (ExplByPos (succ len + i, n)), f | _ -> assert(false)) imps in + if sub then + declare_instance_cst true (snd proj); + Impargs.declare_manual_implicits false (ConstRef (snd proj)) true expls + +let declare_implicits impls subs cl = + Util.list_iter3 (fun p imps sub -> declare_implicit_proj cl p imps sub) + cl.cl_projs impls subs; + let len = List.length cl.cl_context in + let indimps = + list_fold_left_i + (fun i acc (is, (na, b, t)) -> + if len - i <= cl.cl_params then acc + else + match is with + None | Some (_, false) -> (ExplByPos (i, Some na), (false, true)) :: acc + | _ -> acc) + 1 [] (List.rev cl.cl_context) + in + Impargs.declare_manual_implicits false cl.cl_impl false indimps + +let rel_of_named_context subst l = + List.fold_right + (fun (id, _, t) (ctx, acc) -> (Name id, None, subst_vars acc t) :: ctx, id :: acc) + l ([], subst) + +let ids_of_rel_context subst l = + List.fold_right + (fun (id, _, t) acc -> Nameops.out_name id :: acc) + l subst + +let degenerate_decl (na,b,t) = + let id = match na with + | Name id -> id + | Anonymous -> anomaly "Unnamed record variable" in + match b with + | None -> (id, Entries.LocalAssum t) + | Some b -> (id, Entries.LocalDef b) + + +let declare_structure env id idbuild params arity fields = + let nparams = List.length params and nfields = List.length fields in + let args = extended_rel_list nfields params in + let ind = applist (mkRel (1+nparams+nfields), args) in + let type_constructor = it_mkProd_or_LetIn ind fields in + let mie_ind = + { mind_entry_typename = id; + mind_entry_arity = arity; + mind_entry_consnames = [idbuild]; + mind_entry_lc = [type_constructor] } in + let mie = + { mind_entry_params = List.map degenerate_decl params; + mind_entry_record = true; + mind_entry_finite = true; + mind_entry_inds = [mie_ind] } in + let kn = Command.declare_mutual_with_eliminations true mie [] in + let rsp = (kn,0) in (* This is ind path of idstruc *) + let id = Nameops.next_ident_away id (ids_of_context (Global.env())) in + let kinds,sp_projs = Record.declare_projections rsp ~kind:Method ~name:id (List.map (fun _ -> false) fields) fields in + let _build = ConstructRef (rsp,1) in + Recordops.declare_structure(rsp,idbuild,List.rev kinds,List.rev sp_projs); + rsp + +let interp_type_evars evdref env ?(impls=([],[])) typ = + let typ' = intern_gen true ~impls (Evd.evars_of !evdref) env typ in + let imps = Implicit_quantifiers.implicits_of_rawterm typ' in + imps, Pretyping.Default.understand_tcc_evars evdref env Pretyping.IsType typ' + +let mk_interning_data env na impls typ = + let impl = Impargs.compute_implicits_with_manual env typ (Impargs.is_implicit_args()) impls + in (na, ([], impl, Notation.compute_arguments_scope typ)) + +let interp_fields_evars isevars env avoid l = + List.fold_left + (fun (env, uimpls, ids, params, impls) ((loc, i), _, t) -> + let impl, t' = interp_type_evars isevars env ~impls t in + let data = mk_interning_data env i impl t' in + let d = (i,None,t') in + (push_named d env, impl :: uimpls, Idset.add i ids, d::params, ([], data :: snd impls))) + (env, [], avoid, [], ([], [])) l + +let interp_fields_rel_evars isevars env avoid l = + List.fold_left + (fun (env, uimpls, ids, params, impls) ((loc, i), _, t) -> + let impl, t' = interp_type_evars isevars env ~impls t in + let data = mk_interning_data env i impl t' in + let d = (Name i,None,t') in + (push_rel d env, impl :: uimpls, Idset.add i ids, d::params, ([], data :: snd impls))) + (env, [], avoid, [], ([], [])) l + +let name_typeclass_binder avoid = function + | LocalRawAssum ([loc, Anonymous], bk, c) -> + let name = + let id = + match c with + CApp (_, (_, CRef (Ident (loc,id))), _) -> id + | _ -> id_of_string "assum" + in Implicit_quantifiers.make_fresh avoid (Global.env ()) id + in LocalRawAssum ([loc, Name name], bk, c), Idset.add name avoid + | x -> x, avoid + +let name_typeclass_binders avoid l = + let l', avoid = + List.fold_left + (fun (binders, avoid) b -> let b', avoid = name_typeclass_binder avoid b in + b' :: binders, avoid) + ([], avoid) l + in List.rev l', avoid + +let decompose_named_assum = + let rec prodec_rec subst l c = + match kind_of_term c with + | Prod (Name na,t,c) -> + let decl = (na,None,substl subst t) in + let subst' = mkVar na :: subst in + prodec_rec subst' (add_named_decl decl l) (substl subst' c) + | LetIn (Name na, b, t, c) -> + let decl = (na,Some (substl subst b),substl subst t) in + let subst' = mkVar na :: subst in + prodec_rec subst' (add_named_decl decl l) (substl subst' c) + | Cast (c,_,_) -> prodec_rec subst l c + | _ -> l,c + in prodec_rec [] [] + +let push_named_context = + List.fold_right push_named + +let named_of_rel_context (subst, ids, env as init) ctx = + Sign.fold_rel_context + (fun (na,c,t) (subst, avoid, env) -> + let id = Nameops.next_name_away na avoid in + let d = (id,Option.map (substl subst) c,substl subst t) in + (mkVar id :: subst, id::avoid, d::env)) + ctx ~init + +let new_class id par ar sup props = + let env0 = Global.env() in + let isevars = ref (Evd.create_evar_defs Evd.empty) in + let bound = Implicit_quantifiers.ids_of_list (Termops.ids_of_context env0) in + let bound, ids = Implicit_quantifiers.free_vars_of_binders ~bound [] (sup @ par) in + let bound = Idset.union bound (Implicit_quantifiers.ids_of_list ids) in + let sup, bound = name_typeclass_binders bound sup in + let supnames = + List.fold_left (fun acc b -> + match b with + LocalRawAssum (nl, _, _) -> nl @ acc + | LocalRawDef _ -> assert(false)) + [] sup + in + + (* Interpret the arity *) + let arity_imps, fullarity = + let ar = + match ar with + Some ar -> ar | None -> (dummy_loc, Rawterm.RType None) + in + let arity = CSort (fst ar, snd ar) in + let term = prod_constr_expr (prod_constr_expr arity par) sup in + interp_type_evars isevars env0 term + in + let ctx_params, arity = decompose_prod_assum fullarity in + let env_params = push_rel_context ctx_params env0 in + + (* Interpret the definitions and propositions *) + let env_props, prop_impls, bound, ctx_props, _ = + interp_fields_rel_evars isevars env_params bound props + in + let subs = List.map (fun ((loc, id), b, _) -> b) props in + (* Instantiate evars and check all are resolved *) + let isevars,_ = Evarconv.consider_remaining_unif_problems env_props !isevars in + let isevars = Typeclasses.resolve_typeclasses env_props isevars in + let sigma = Evd.evars_of isevars in + let ctx_params = Evarutil.nf_rel_context_evar sigma ctx_params in + let ctx_props = Evarutil.nf_rel_context_evar sigma ctx_props in + let arity = Reductionops.nf_evar sigma arity in + let ce t = Evarutil.check_evars env0 Evd.empty isevars t in + let impl, projs = + let params = ctx_params and fields = ctx_props in + List.iter (fun (_,c,t) -> ce t; match c with Some c -> ce c | None -> ()) (params @ fields); + match fields with + [(Name proj_name, _, field)] -> + let class_body = it_mkLambda_or_LetIn field params in + let class_type = + match ar with + Some _ -> Some (it_mkProd_or_LetIn arity params) + | None -> None + in + let class_entry = + { const_entry_body = class_body; + const_entry_type = class_type; + const_entry_opaque = false; + const_entry_boxed = false } + in + let cst = Declare.declare_constant (snd id) + (DefinitionEntry class_entry, IsDefinition Definition) + in + let inst_type = appvectc (mkConst cst) (rel_vect 0 (List.length params)) in + let proj_type = it_mkProd_or_LetIn (mkProd(Name (snd id), inst_type, lift 1 field)) params in + let proj_body = it_mkLambda_or_LetIn (mkLambda (Name (snd id), inst_type, mkRel 1)) params in + let proj_entry = + { const_entry_body = proj_body; + const_entry_type = Some proj_type; + const_entry_opaque = false; + const_entry_boxed = false } + in + let proj_cst = Declare.declare_constant proj_name + (DefinitionEntry proj_entry, IsDefinition Definition) + in + ConstRef cst, [proj_name, proj_cst] + | _ -> + let idb = id_of_string ("Build_" ^ (string_of_id (snd id))) in + let kn = declare_structure env0 (snd id) idb params arity fields in + IndRef kn, (List.map2 (fun (id, _, _) y -> Nameops.out_name id, Option.get y) + fields (Recordops.lookup_projections kn)) + in + let ids = List.map pi1 (named_context env0) in + let (subst, ids, named_ctx_params) = named_of_rel_context ([], ids, []) ctx_params in + let (_, _, named_ctx_props) = named_of_rel_context (subst, ids, []) ctx_props in + let ctx_context = + List.map (fun ((na, b, t) as d) -> + match Typeclasses.class_of_constr t with + | Some cl -> (Some (cl.cl_impl, List.exists (fun (_, n) -> n = Name na) supnames), d) + | None -> (None, d)) + named_ctx_params + in + let k = + { cl_impl = impl; + cl_params = List.length par; + cl_context = ctx_context; + cl_props = named_ctx_props; + cl_projs = projs } + in + declare_implicits (List.rev prop_impls) subs k; + add_class k + +type binder_def_list = (identifier located * identifier located list * constr_expr) list + +let binders_of_lidents l = + List.map (fun (loc, id) -> LocalRawAssum ([loc, Name id], Default Rawterm.Implicit, CHole (loc, None))) l + +let subst_ids_in_named_context subst l = + let x, _ = + List.fold_right + (fun (id, _, t) (ctx, k) -> (id, None, substn_vars k subst t) :: ctx, succ k) + l ([], 1) + in x + +let subst_one_named inst ids t = + substnl inst 0 (substn_vars 1 ids t) + +let subst_named inst subst ctx = + let ids = List.map (fun (id, _, _) -> id) subst in + let ctx' = subst_ids_in_named_context ids ctx in + let ctx', _ = + List.fold_right + (fun (id, _, t) (ctx, k) -> (id, None, substnl inst k t) :: ctx, succ k) + ctx' ([], 0) + in ctx' +(* +let infer_super_instances env params params_ctx super = + let super = subst_named params params_ctx super in + List.fold_right + (fun (na, _, t) (sups, ids, supctx) -> + let t = subst_one_named sups ids t in + let inst = + try resolve_one_typeclass env t + with Not_found -> + let cl, args = destClass t in + no_instance (push_named_context supctx env) (dummy_loc, cl.cl_name) (Array.to_list args) + in + let d = (na, Some inst, t) in + inst :: sups, na :: ids, d :: supctx) + super ([], [], [])*) + +(* let evars_of_context ctx id n env = *) +(* List.fold_right (fun (na, _, t) (n, env, nc) -> *) +(* let b = Evarutil.e_new_evar isevars env ~src:(dummy_loc, ImplicitArg (Ident id, (n * Some na))) t in *) +(* let d = (na, Some b, t) in *) +(* (succ n, push_named d env, d :: nc)) *) +(* ctx (n, env, []) *) + +let type_ctx_instance isevars env ctx inst subst = + List.fold_left2 + (fun (subst, instctx) (na, _, t) ce -> + let t' = replace_vars subst t in + let c = interp_casted_constr_evars isevars env ce t' in + let d = na, Some c, t' in + (na, c) :: subst, d :: instctx) + (subst, []) (List.rev ctx) inst + +let substitution_of_constrs ctx cstrs = + List.fold_right2 (fun c (na, _, _) acc -> (na, c) :: acc) cstrs ctx [] + +let destClassApp cl = + match cl with + | CApp (loc, (None,CRef (Ident f)), l) -> f, List.map fst l + | _ -> raise Not_found + +let refine_ref = ref (fun _ -> assert(false)) + +let id_of_class cl = + match cl.cl_impl with + | ConstRef kn -> let _,_,l = repr_con kn in id_of_label l + | IndRef (kn,i) -> + let mip = (Environ.lookup_mind kn (Global.env ())).Declarations.mind_packets in + mip.(0).Declarations.mind_typename + | _ -> assert false + +open Pp + +let ($$) g f = fun x -> g (f x) + +let default_on_free_vars = + Flags.if_verbose + (fun fvs -> + match fvs with + [] -> () + | l -> msgnl (str"Implicitly generalizing " ++ + prlist_with_sep (fun () -> str", ") Nameops.pr_id l ++ str".")) + +let fail_on_free_vars = function + [] -> () + | [fv] -> + errorlabstrm "Classes" + (str"Unbound variable " ++ Nameops.pr_id fv ++ str".") + | fvs -> errorlabstrm "Classes" + (str"Unbound variables " ++ + prlist_with_sep (fun () -> str", ") Nameops.pr_id fvs ++ str".") + +let instance_hook k pri global imps ?hook cst = + let inst = Typeclasses.new_instance k pri global cst in + Impargs.maybe_declare_manual_implicits false (ConstRef cst) false imps; + Typeclasses.add_instance inst; + (match hook with Some h -> h cst | None -> ()) + +let declare_instance_constant k pri global imps ?hook id term termtype = + let cdecl = + let kind = IsDefinition Instance in + let entry = + { const_entry_body = term; + const_entry_type = Some termtype; + const_entry_opaque = false; + const_entry_boxed = false } + in DefinitionEntry entry, kind + in + let kn = Declare.declare_constant id cdecl in + Flags.if_verbose Command.definition_message id; + instance_hook k pri global imps ?hook kn; + id + +let new_instance ?(global=false) ctx (instid, bk, cl) props ?(on_free_vars=default_on_free_vars) + ?(tac:Proof_type.tactic option) ?(hook:(Names.constant -> unit) option) pri = + let env = Global.env() in + let isevars = ref (Evd.create_evar_defs Evd.empty) in + let bound = Implicit_quantifiers.ids_of_list (Termops.ids_of_context env) in + let bound, fvs = Implicit_quantifiers.free_vars_of_binders ~bound [] ctx in + let tclass = + match bk with + | Implicit -> + let loc, id, par = Implicit_quantifiers.destClassAppExpl cl in + let k = class_info (Nametab.global id) in + let applen = List.fold_left (fun acc (x, y) -> if y = None then succ acc else acc) 0 par in + let needlen = List.fold_left (fun acc (x, y) -> if x = None then succ acc else acc) 0 k.cl_context in + if needlen <> applen then + mismatched_params env (List.map fst par) (List.map snd k.cl_context); + let pars, _ = Implicit_quantifiers.combine_params Idset.empty (* need no avoid *) + (fun avoid (clname, (id, _, t)) -> + match clname with + Some (cl, b) -> + let t = + if b then + let _k = class_info cl in + CHole (Util.dummy_loc, Some (Evd.ImplicitArg (k.cl_impl, (1, None)))) + else CHole (Util.dummy_loc, None) + in t, avoid + | None -> failwith ("new instance: under-applied typeclass")) + par (List.rev k.cl_context) + in Topconstr.CAppExpl (loc, (None, id), pars) + + | Explicit -> cl + in + let ctx_bound = Idset.union bound (Implicit_quantifiers.ids_of_list fvs) in + let gen_ids = Implicit_quantifiers.free_vars_of_constr_expr ~bound:ctx_bound tclass [] in + on_free_vars (List.rev fvs @ List.rev gen_ids); + let gen_idset = Implicit_quantifiers.ids_of_list gen_ids in + let bound = Idset.union gen_idset ctx_bound in + let gen_ctx = Implicit_quantifiers.binder_list_of_ids gen_ids in + let ctx, avoid = name_typeclass_binders bound ctx in + let ctx = List.append ctx (List.rev gen_ctx) in + let k, ctx', imps, subst = + let c = Command.generalize_constr_expr tclass ctx in + let imps, c' = interp_type_evars isevars env c in + let ctx, c = decompose_named_assum c' in + let cl, args = Typeclasses.dest_class_app c in + cl, ctx, imps, substitution_of_constrs (List.map snd cl.cl_context) (List.rev (Array.to_list args)) + in + let id = + match snd instid with + Name id -> + let sp = Lib.make_path id in + if Nametab.exists_cci sp then + errorlabstrm "new_instance" (Nameops.pr_id id ++ Pp.str " already exists"); + id + | Anonymous -> + let i = Nameops.add_suffix (id_of_class k) "_instance_0" in + Termops.next_global_ident_away false i (Termops.ids_of_context env) + in + let env' = push_named_context ctx' env in + isevars := Evarutil.nf_evar_defs !isevars; + isevars := resolve_typeclasses env !isevars; + let sigma = Evd.evars_of !isevars in + let substctx = Typeclasses.nf_substitution sigma subst in + if Lib.is_modtype () then + begin + let _, ty_constr = instance_constructor k (List.rev_map snd substctx) in + let termtype = + let t = it_mkNamedProd_or_LetIn ty_constr ctx' in + Evarutil.nf_isevar !isevars t + in + Evarutil.check_evars env Evd.empty !isevars termtype; + let cst = Declare.declare_internal_constant id + (Entries.ParameterEntry (termtype,false), Decl_kinds.IsAssumption Decl_kinds.Logical) + in instance_hook k None false imps ?hook cst; id + end + else + begin + let subst, _propsctx = + let props = + List.map (fun (x, l, d) -> + x, Topconstr.abstract_constr_expr d (binders_of_lidents l)) + props + in + if List.length props > List.length k.cl_props then + mismatched_props env' (List.map snd props) k.cl_props; + let props, rest = + List.fold_left + (fun (props, rest) (id,_,_) -> + try + let ((loc, mid), c) = List.find (fun ((_,id'), c) -> id' = id) rest in + let rest' = List.filter (fun ((_,id'), c) -> id' <> id) rest in + Constrintern.add_glob loc (ConstRef (List.assoc mid k.cl_projs)); + c :: props, rest' + with Not_found -> (CHole (Util.dummy_loc, None) :: props), rest) + ([], props) k.cl_props + in + if rest <> [] then + unbound_method env' k.cl_impl (fst (List.hd rest)) + else + type_ctx_instance isevars env' k.cl_props props substctx + in + let app, ty_constr = instance_constructor k (List.rev_map snd subst) in + let termtype = + let t = it_mkNamedProd_or_LetIn ty_constr ctx' in + Evarutil.nf_isevar !isevars t + in + let term = Termops.it_mkNamedLambda_or_LetIn app ctx' in + isevars := Evarutil.nf_evar_defs !isevars; + let term = Evarutil.nf_isevar !isevars term in + let evm = Evd.evars_of (undefined_evars !isevars) in + Evarutil.check_evars env Evd.empty !isevars termtype; + if evm = Evd.empty then + declare_instance_constant k pri global imps ?hook id term termtype + else begin + isevars := Typeclasses.resolve_typeclasses ~onlyargs:true ~fail:true env !isevars; + let kind = Decl_kinds.Global, Decl_kinds.DefinitionBody Decl_kinds.Instance in + Flags.silently (fun () -> + Command.start_proof id kind termtype + (fun _ -> function ConstRef cst -> instance_hook k pri global imps ?hook cst + | _ -> assert false); + if props <> [] then + Pfedit.by (* (Refiner.tclTHEN (Refiner.tclEVARS (Evd.evars_of !isevars)) *) + (!refine_ref (evm, term)); + (match tac with Some tac -> Pfedit.by tac | None -> ())) (); + Flags.if_verbose (msg $$ Printer.pr_open_subgoals) (); + id + end + end + +let goal_kind = Decl_kinds.Global, Decl_kinds.DefinitionBody Decl_kinds.Definition + +let solve_by_tac env evd evar evi t = + let goal = {it = evi; sigma = (Evd.evars_of evd) } in + let (res, valid) = t goal in + if res.it = [] then + let prooftree = valid [] in + let proofterm, obls = Refiner.extract_open_proof res.sigma prooftree in + if obls = [] then + let evd' = evars_reset_evd res.sigma evd in + let evd' = evar_define evar proofterm evd' in + evd', true + else evd, false + else evd, false + +let context ?(hook=fun _ -> ()) l = + let env = Global.env() in + let isevars = ref (Evd.create_evar_defs Evd.empty) in + let avoid = Termops.ids_of_context env in + let ctx, l = Implicit_quantifiers.resolve_class_binders (vars_of_env env) l in + let env', avoid, ctx = interp_binders_evars isevars env avoid ctx in + let env', avoid, l = interp_typeclass_context_evars isevars env' avoid l in + isevars := Evarutil.nf_evar_defs !isevars; + let sigma = Evd.evars_of !isevars in + let fullctx = Evarutil.nf_named_context_evar sigma (l @ ctx) in + List.iter (function (id,_,t) -> + if Lib.is_modtype () then + let cst = Declare.declare_internal_constant id + (ParameterEntry (t,false), IsAssumption Logical) + in + match class_of_constr t with + | Some tc -> + add_instance (Typeclasses.new_instance tc None false cst); + hook (ConstRef cst) + | None -> () + else + (Command.declare_one_assumption false (Local (* global *), Definitional) t + [] true (* implicit *) true (* always kept *) false (* inline *) (dummy_loc, id); + match class_of_constr t with + None -> () + | Some tc -> hook (VarRef id))) + (List.rev fullctx) + +open Libobject + +let module_qualid = qualid_of_dirpath (dirpath_of_string "Coq.Classes.Init") +let tactic_qualid = make_qualid (dirpath_of_string "Coq.Classes.Init") (id_of_string "typeclass_instantiation") + +let tactic_expr = Tacexpr.TacArg (Tacexpr.Reference (Qualid (dummy_loc, tactic_qualid))) +let tactic = lazy (Tacinterp.interp tactic_expr) + +let _ = + Typeclasses.solve_instanciation_problem := + (fun env evd ev evi -> + Library.require_library [(dummy_loc, module_qualid)] None; (* may be inefficient *) + solve_by_tac env evd ev evi (Lazy.force tactic)) + +(* let prod = lazy_fun Coqlib.build_prod *) + +(* let build_conjunction evm = *) +(* List.fold_left *) +(* (fun (acc, evs) (ev, evi) -> *) +(* if class_of_constr evi.evar_concl <> None then *) +(* mkApp ((Lazy.force prod).Coqlib.typ, [|evi.evar_concl; acc |]), evs *) +(* else acc, Evd.add evs ev evi) *) +(* (Coqlib.build_coq_True (), Evd.empty) evm *) + +(* let destruct_conjunction evm_list evm evm' term = *) +(* let _, evm = *) +(* List.fold_right *) +(* (fun (ev, evi) (term, evs) -> *) +(* if class_of_constr evi.evar_concl <> None then *) +(* match kind_of_term term with *) +(* | App (x, [| _ ; _ ; proof ; term |]) -> *) +(* let evs' = Evd.define evs ev proof in *) +(* (term, evs') *) +(* | _ -> assert(false) *) +(* else *) +(* match (Evd.find evm' ev).evar_body with *) +(* Evar_empty -> raise Not_found *) +(* | Evar_defined c -> *) +(* let evs' = Evd.define evs ev c in *) +(* (term, evs')) *) +(* evm_list (term, evm) *) +(* in evm *) + +(* let solve_by_tac env evd evar evi t = *) +(* let goal = {it = evi; sigma = (Evd.evars_of evd) } in *) +(* let (res, valid) = t goal in *) +(* if res.it = [] then *) +(* let prooftree = valid [] in *) +(* let proofterm, obls = Refiner.extract_open_proof res.sigma prooftree in *) +(* if obls = [] then *) +(* let evd' = evars_reset_evd res.sigma evd in *) +(* let evd' = evar_define evar proofterm evd' in *) +(* evd', true *) +(* else evd, false *) +(* else evd, false *) + +(* let resolve_all_typeclasses env evd = *) +(* let evm = Evd.evars_of evd in *) +(* let evm_list = Evd.to_list evm in *) +(* let goal, typesevm = build_conjunction evm_list in *) +(* let evars = ref (Evd.create_evar_defs typesevm) in *) +(* let term = resolve_one_typeclass_evd env evars goal in *) +(* let evm' = destruct_conjunction evm_list evm (Evd.evars_of !evars) term in *) +(* Evd.create_evar_defs evm' *) + +(* let _ = *) +(* Typeclasses.solve_instanciations_problem := *) +(* (fun env evd -> *) +(* Library.require_library [(dummy_loc, module_qualid)] None; (\* may be inefficient *\) *) +(* resolve_all_typeclasses env evd) *) + +let solve_evars_by_tac env evd t = + let ev = make_evar empty_named_context_val mkProp in + let goal = {it = ev; sigma = (Evd.evars_of evd) } in + let (res, valid) = t goal in + let evd' = evars_reset_evd res.sigma evd in + evd' +(* Library.require_library [(dummy_loc, module_qualid)] None (a\* may be inefficient *\); *) + +(* let _ = *) +(* Typeclasses.solve_instanciations_problem := *) +(* (fun env evd -> *) +(* Eauto.resolve_all_evars false (true, 15) env *) +(* (fun ev evi -> is_implicit_arg (snd (evar_source ev evd)) *) +(* && class_of_constr evi.evar_concl <> None) evd) *) diff --git a/toplevel/classes.mli b/toplevel/classes.mli new file mode 100644 index 00000000..f3cb0c58 --- /dev/null +++ b/toplevel/classes.mli @@ -0,0 +1,103 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* local_binder list + +val declare_implicit_proj : typeclass -> (identifier * constant) -> + Impargs.manual_explicitation list -> bool -> unit +(* +val infer_super_instances : env -> constr list -> + named_context -> named_context -> types list * identifier list * named_context +*) +val new_class : identifier located -> + local_binder list -> + Vernacexpr.sort_expr located option -> + local_binder list -> + binder_list -> unit + +(* By default, print the free variables that are implicitely generalized. *) + +val default_on_free_vars : identifier list -> unit + +val fail_on_free_vars : identifier list -> unit + +val declare_instance_constant : + typeclass -> + int option -> (* priority *) + bool -> (* globality *) + Impargs.manual_explicitation list -> (* implicits *) + ?hook:(Names.constant -> unit) -> + identifier -> (* name *) + Term.constr -> (* body *) + Term.types -> (* type *) + Names.identifier + +val new_instance : + ?global:bool -> (* Not global by default. *) + local_binder list -> + typeclass_constraint -> + binder_def_list -> + ?on_free_vars:(identifier list -> unit) -> + ?tac:Proof_type.tactic -> + ?hook:(constant -> unit) -> + int option -> + identifier + +(* For generation on names based on classes only *) +val id_of_class : typeclass -> identifier + +val context : ?hook:(Libnames.global_reference -> unit) -> typeclass_context -> unit + +val declare_instance : bool -> identifier located -> unit + +val mismatched_params : env -> constr_expr list -> named_context -> 'a + +val mismatched_props : env -> constr_expr list -> named_context -> 'a + +val solve_by_tac : env -> + Evd.evar_defs -> + Evd.evar -> + evar_info -> + Proof_type.tactic -> + Evd.evar_defs * bool + +val solve_evars_by_tac : env -> + Evd.evar_defs -> + Proof_type.tactic -> + Evd.evar_defs + +val refine_ref : (open_constr -> Proof_type.tactic) ref + +val decompose_named_assum : types -> named_context * types + +val push_named_context : named_context -> env -> env + +val name_typeclass_binders : Idset.t -> + Topconstr.local_binder list -> + Topconstr.local_binder list * Idset.t + diff --git a/toplevel/command.ml b/toplevel/command.ml index a8e0133e..531eadb3 100644 --- a/toplevel/command.ml +++ b/toplevel/command.ml @@ -6,11 +6,11 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: command.ml 10067 2007-08-09 17:13:16Z msozeau $ *) +(* $Id: command.ml 11169 2008-06-24 14:37:18Z notin $ *) open Pp open Util -open Options +open Flags open Term open Termops open Declarations @@ -42,22 +42,26 @@ open Pretyping open Evarutil open Evarconv open Notation +open Goptions +open Mod_subst +open Evd +open Decls -let mkLambdaCit = List.fold_right (fun (x,a) b -> mkLambdaC(x,a,b)) -let mkProdCit = List.fold_right (fun (x,a) b -> mkProdC(x,a,b)) +let mkLambdaCit = List.fold_right (fun (x,a) b -> mkLambdaC(x,default_binder_kind,a,b)) +let mkProdCit = List.fold_right (fun (x,a) b -> mkProdC(x,default_binder_kind,a,b)) let rec abstract_constr_expr c = function | [] -> c | LocalRawDef (x,b)::bl -> mkLetInC(x,b,abstract_constr_expr c bl) - | LocalRawAssum (idl,t)::bl -> - List.fold_right (fun x b -> mkLambdaC([x],t,b)) idl + | LocalRawAssum (idl,k,t)::bl -> + List.fold_right (fun x b -> mkLambdaC([x],k,t,b)) idl (abstract_constr_expr c bl) let rec generalize_constr_expr c = function | [] -> c | LocalRawDef (x,b)::bl -> mkLetInC(x,b,generalize_constr_expr c bl) - | LocalRawAssum (idl,t)::bl -> - List.fold_right (fun x b -> mkProdC([x],t,b)) idl + | LocalRawAssum (idl,k,t)::bl -> + List.fold_right (fun x b -> mkProdC([x],k,t,b)) idl (generalize_constr_expr c bl) let rec under_binders env f n c = @@ -80,7 +84,7 @@ let rec destSubCast c = match kind_of_term c with let rec complete_conclusion a cs = function | CProdN (loc,bl,c) -> CProdN (loc,bl,complete_conclusion a cs c) | CLetIn (loc,b,t,c) -> CLetIn (loc,b,t,complete_conclusion a cs c) - | CHole loc -> + | CHole (loc, k) -> let (has_no_args,name,params) = a in if not has_no_args then user_err_loc (loc,"", @@ -98,13 +102,13 @@ let definition_message id = if_verbose message ((string_of_id id) ^ " is defined") let constant_entry_of_com (bl,com,comtypopt,opacity,boxed) = - let sigma = Evd.empty in let env = Global.env() in - match comtypopt with + match comtypopt with None -> let b = abstract_constr_expr com bl in - let j = interp_constr_judgment sigma env b in - { const_entry_body = j.uj_val; + let b, imps = interp_constr_evars_impls env b in + imps, + { const_entry_body = b; const_entry_type = None; const_entry_opaque = opacity; const_entry_boxed = boxed } @@ -112,7 +116,9 @@ let constant_entry_of_com (bl,com,comtypopt,opacity,boxed) = (* We use a cast to avoid troubles with evars in comtyp *) (* that can only be resolved knowing com *) let b = abstract_constr_expr (mkCastC (com, Rawterm.CastConv (DEFAULTcast,comtyp))) bl in - let (body,typ) = destSubCast (interp_constr sigma env b) in + let b, imps = interp_constr_evars_impls env b in + let (body,typ) = destSubCast b in + imps, { const_entry_body = body; const_entry_type = Some typ; const_entry_opaque = opacity; @@ -127,16 +133,23 @@ let red_constant_entry bl ce = function (local_binders_length bl) body } -let declare_global_definition ident ce local = +let declare_global_definition ident ce local imps = let kn = declare_constant ident (DefinitionEntry ce,IsDefinition Definition) in - if local = Local && Options.is_verbose() then - msg_warning (pr_id ident ++ str" is declared as a global definition"); - definition_message ident; - ConstRef kn + let gr = ConstRef kn in + maybe_declare_manual_implicits false gr (is_implicit_args ()) imps; + if local = Local && Flags.is_verbose() then + msg_warning (pr_id ident ++ str" is declared as a global definition"); + definition_message ident; + gr + +let declare_definition_hook = ref ignore +let set_declare_definition_hook = (:=) declare_definition_hook +let get_declare_definition_hook () = !declare_definition_hook let declare_definition ident (local,boxed,dok) bl red_option c typopt hook = - let ce = constant_entry_of_com (bl,c,typopt,false,boxed) in + let imps, ce = constant_entry_of_com (bl,c,typopt,false,boxed) in let ce' = red_constant_entry bl ce red_option in + !declare_definition_hook ce'; let r = match local with | Local when Lib.sections_are_opened () -> let c = @@ -144,28 +157,29 @@ let declare_definition ident (local,boxed,dok) bl red_option c typopt hook = let _ = declare_variable ident (Lib.cwd(),c,IsDefinition Definition) in definition_message ident; if Pfedit.refining () then - msgerrnl (str"Warning: Local definition " ++ pr_id ident ++ - str" is not visible from current goals"); + Flags.if_verbose msg_warning + (str"Local definition " ++ pr_id ident ++ + str" is not visible from current goals"); VarRef ident | (Global|Local) -> - declare_global_definition ident ce' local in + declare_global_definition ident ce' local imps in hook local r -let syntax_definition ident c local onlyparse = - let c = snd (interp_aconstr [] [] c) in - Syntax_def.declare_syntactic_definition local ident onlyparse c +let syntax_definition ident (vars,c) local onlyparse = + let pat = interp_aconstr [] vars c in + Syntax_def.declare_syntactic_definition local ident onlyparse pat (* 2| Variable/Hypothesis/Parameter/Axiom declarations *) let assumption_message id = if_verbose message ((string_of_id id) ^ " is assumed") -let declare_one_assumption is_coe (local,kind) c (_,ident) = +let declare_one_assumption is_coe (local,kind) c imps impl keep nl (_,ident) = let r = match local with | Local when Lib.sections_are_opened () -> let _ = declare_variable ident - (Lib.cwd(), SectionLocalAssum c, IsAssumption kind) in + (Lib.cwd(), SectionLocalAssum (c,impl,keep), IsAssumption kind) in assumption_message ident; if is_verbose () & Pfedit.refining () then msgerrnl (str"Warning: Variable " ++ pr_id ident ++ @@ -173,19 +187,26 @@ let declare_one_assumption is_coe (local,kind) c (_,ident) = VarRef ident | (Global|Local) -> let kn = - declare_constant ident (ParameterEntry c, IsAssumption kind) in + declare_constant ident (ParameterEntry (c,nl), IsAssumption kind) in + let gr = ConstRef kn in + maybe_declare_manual_implicits false gr (is_implicit_args ()) imps; assumption_message ident; - if local=Local & Options.is_verbose () then + if local=Local & Flags.is_verbose () then msg_warning (pr_id ident ++ str" is declared as a parameter" ++ str" because it is at a global level"); - ConstRef kn in + gr in if is_coe then Class.try_add_new_coercion r local -let declare_assumption idl is_coe k bl c = +let declare_assumption_hook = ref ignore +let set_declare_assumption_hook = (:=) declare_assumption_hook + +let declare_assumption idl is_coe k bl c impl keep nl = if not (Pfedit.refining ()) then let c = generalize_constr_expr c bl in - let c = interp_type Evd.empty (Global.env()) c in - List.iter (declare_one_assumption is_coe k c) idl + let env = Global.env () in + let c', imps = interp_type_evars_impls env c in + !declare_assumption_hook c'; + List.iter (declare_one_assumption is_coe k c' imps impl keep nl) idl else errorlabstrm "Command.Assumption" (str "Cannot declare an assumption while in proof editing mode.") @@ -193,6 +214,8 @@ let declare_assumption idl is_coe k bl c = (* 3a| Elimination schemes for mutual inductive definitions *) open Indrec +open Inductiveops + let non_type_eliminations = [ (InProp,elimination_suffix InProp); @@ -208,7 +231,7 @@ let declare_one_elimination ind = { const_entry_body = c; const_entry_type = t; const_entry_opaque = false; - const_entry_boxed = Options.boxed_definitions() }, + const_entry_boxed = Flags.boxed_definitions() }, Decl_kinds.IsDefinition Definition) in definition_message id; kn @@ -248,27 +271,189 @@ let declare_one_elimination ind = let _ = declare (mindstr^suff) elim None in ()) non_type_eliminations +(* bool eq declaration flag && eq dec declaration flag *) +let eq_flag = ref false +let _ = + declare_bool_option + { optsync = true; + optname = "automatic declaration of boolean equality"; + optkey = (SecondaryTable ("Equality","Scheme")); + optread = (fun () -> !eq_flag) ; + optwrite = (fun b -> eq_flag := b) } + +(* boolean equality *) +let (inScheme,outScheme) = + declare_object {(default_object "EQSCHEME") with + cache_function = Ind_tables.cache_scheme; + load_function = (fun _ -> Ind_tables.cache_scheme); + subst_function = Auto_ind_decl.subst_in_constr; + export_function = Ind_tables.export_scheme } + +let declare_eq_scheme sp = + let mib = Global.lookup_mind sp in + let nb_ind = Array.length mib.mind_packets in + let eq_array = Auto_ind_decl.make_eq_scheme sp in + try + for i=0 to (nb_ind-1) do + let cpack = Array.get mib.mind_packets i in + let nam = id_of_string ((string_of_id cpack.mind_typename)^"_beq") + in + let cst_entry = {const_entry_body = eq_array.(i); + const_entry_type = None; + const_entry_opaque = false; + const_entry_boxed = Flags.boxed_definitions() } + in + let cst_decl = (DefinitionEntry cst_entry),(IsDefinition Definition) + in + let cst = Declare.declare_constant nam cst_decl in + Lib.add_anonymous_leaf (inScheme ((sp,i),mkConst cst)); + definition_message nam + done + with Not_found -> + error "Your type contains Parameters without a boolean equality" + +(* decidability of eq *) + + +let (inBoolLeib,outBoolLeib) = + declare_object {(default_object "BOOLLIEB") with + cache_function = Ind_tables.cache_bl; + load_function = (fun _ -> Ind_tables.cache_bl); + subst_function = Auto_ind_decl.subst_in_constr; + export_function = Ind_tables.export_bool_leib } + +let (inLeibBool,outLeibBool) = + declare_object {(default_object "LIEBBOOL") with + cache_function = Ind_tables.cache_lb; + load_function = (fun _ -> Ind_tables.cache_lb); + subst_function = Auto_ind_decl.subst_in_constr; + export_function = Ind_tables.export_leib_bool } + +let (inDec,outDec) = + declare_object {(default_object "EQDEC") with + cache_function = Ind_tables.cache_dec; + load_function = (fun _ -> Ind_tables.cache_dec); + subst_function = Auto_ind_decl.subst_in_constr; + export_function = Ind_tables.export_dec_proof } + +let start_hook = ref ignore +let set_start_hook = (:=) start_hook + +let start_proof id kind c ?init_tac hook = + let sign = Global.named_context () in + let sign = clear_proofs sign in + !start_hook c; + Pfedit.start_proof id kind sign c ?init_tac:init_tac hook + +let save id const (locality,kind) hook = + let {const_entry_body = pft; + const_entry_type = tpo; + const_entry_opaque = opacity } = const in + let k = logical_kind_of_goal_kind kind in + let l,r = match locality with + | Local when Lib.sections_are_opened () -> + let c = SectionLocalDef (pft, tpo, opacity) in + let _ = declare_variable id (Lib.cwd(), c, k) in + (Local, VarRef id) + | Local | Global -> + let kn = declare_constant id (DefinitionEntry const, k) in + (Global, ConstRef kn) in + Pfedit.delete_current_proof (); + definition_message id; + hook l r + +let save_hook = ref ignore +let set_save_hook f = save_hook := f + +let save_named opacity = + let id,(const,persistence,hook) = Pfedit.cook_proof !save_hook in + let const = { const with const_entry_opaque = opacity } in + save id const persistence hook + +let make_eq_decidability ind = + (* fetching data *) + let mib = Global.lookup_mind (fst ind) in + let nparams = mib.mind_nparams in + let nparrec = mib.mind_nparams_rec in + let lnonparrec,lnamesparrec = + context_chop (nparams-nparrec) mib.mind_params_ctxt in + let proof_name = (string_of_id( + Array.get mib.mind_packets (snd ind)).mind_typename)^"_eq_dec" in + let bl_name =(string_of_id( + Array.get mib.mind_packets (snd ind)).mind_typename)^"_dec_bl" in + let lb_name =(string_of_id( + Array.get mib.mind_packets (snd ind)).mind_typename)^"_dec_lb" in + (* main calls*) + if Ind_tables.check_bl_proof ind + then (message (bl_name^" is already declared.")) + else ( + start_proof (id_of_string bl_name) + (Global,Proof Theorem) + (Auto_ind_decl.compute_bl_goal ind lnamesparrec nparrec) + (fun _ _ -> ()); + Auto_ind_decl.compute_bl_tact ind lnamesparrec nparrec; + save_named true; + Lib.add_anonymous_leaf + (inBoolLeib (ind,mkConst (Lib.make_con (id_of_string bl_name)))) +(* definition_message (id_of_string bl_name) *) + ); + if Ind_tables.check_lb_proof ind + then (message (lb_name^" is already declared.")) + else ( + start_proof (id_of_string lb_name) + (Global,Proof Theorem) + (Auto_ind_decl.compute_lb_goal ind lnamesparrec nparrec) + ( fun _ _ -> ()); + Auto_ind_decl.compute_lb_tact ind lnamesparrec nparrec; + save_named true; + Lib.add_anonymous_leaf + (inLeibBool (ind,mkConst (Lib.make_con (id_of_string lb_name)))) +(* definition_message (id_of_string lb_name) *) + ); + if Ind_tables.check_dec_proof ind + then (message (proof_name^" is already declared.")) + else ( + start_proof (id_of_string proof_name) + (Global,Proof Theorem) + (Auto_ind_decl.compute_dec_goal ind lnamesparrec nparrec) + ( fun _ _ -> ()); + Auto_ind_decl.compute_dec_tact ind lnamesparrec nparrec; + save_named true; + Lib.add_anonymous_leaf + (inDec (ind,mkConst (Lib.make_con (id_of_string proof_name)))) +(* definition_message (id_of_string proof_name) *) + ) + +(* end of automated definition on ind*) + let declare_eliminations sp = let mib = Global.lookup_mind sp in - if mib.mind_finite then + if mib.mind_finite then begin + if (!eq_flag) then (declare_eq_scheme sp); for i = 0 to Array.length mib.mind_packets - 1 do - declare_one_elimination (sp,i) - done + declare_one_elimination (sp,i); + try + if (!eq_flag) then (make_eq_decidability (sp,i)) + with _ -> + Pfedit.delete_current_proof(); + message "Error while computing decidability scheme. Please report." + done; + end (* 3b| Mutual inductive definitions *) -let compute_interning_datas env l nal typl = - let mk_interning_data na typ = +let compute_interning_datas env l nal typl impll = + let mk_interning_data na typ impls = let idl, impl = - if is_implicit_args() then - let impl = compute_implicits env typ in - let sub_impl,_ = list_chop (List.length l) impl in - let sub_impl' = List.filter is_status_implicit sub_impl in + let impl = + compute_implicits_with_manual env typ (is_implicit_args ()) impls + in + let sub_impl,_ = list_chop (List.length l) impl in + let sub_impl' = List.filter is_status_implicit sub_impl in (List.map name_of_implicit sub_impl', impl) - else - ([],[]) in - (na, (idl, impl, compute_arguments_scope typ)) in - (l, List.map2 mk_interning_data nal typl) + in + (na, (idl, impl, compute_arguments_scope typ)) in + (l, list_map3 mk_interning_data nal typl impll) let declare_interning_data (_,impls) (df,c,scope) = silently (Metasyntax.add_notation_interpretation df impls c) scope @@ -294,34 +479,39 @@ let minductive_message = function spc () ++ str "are defined") let check_all_names_different indl = - let get_names ind = ind.ind_name::List.map fst ind.ind_lc in - if not (list_distinct (List.flatten (List.map get_names indl))) then - error "Two inductive objects have the same name" - -let mk_mltype_data isevars env assums arity indname = - let is_ml_type = is_sort env (Evd.evars_of !isevars) arity in + let ind_names = List.map (fun ind -> ind.ind_name) indl in + let cstr_names = list_map_append (fun ind -> List.map fst ind.ind_lc) indl in + let l = list_duplicates ind_names in + if l <> [] then raise (InductiveError (SameNamesTypes (List.hd l))); + let l = list_duplicates cstr_names in + if l <> [] then raise (InductiveError (SameNamesConstructors (List.hd l))); + let l = list_intersect ind_names cstr_names in + if l <> [] then raise (InductiveError (SameNamesOverlap l)) + +let mk_mltype_data evdref env assums arity indname = + let is_ml_type = is_sort env (evars_of !evdref) arity in (is_ml_type,indname,assums) let prepare_param = function | (na,None,t) -> out_name na, LocalAssum t | (na,Some b,_) -> out_name na, LocalDef b -let interp_ind_arity isevars env ind = - interp_type_evars isevars env ind.ind_arity +let interp_ind_arity evdref env ind = + interp_type_evars evdref env ind.ind_arity -let interp_cstrs isevars env impls mldata arity ind = +let interp_cstrs evdref env impls mldata arity ind = let cnames,ctyps = List.split ind.ind_lc in (* Complete conclusions of constructor types if given in ML-style syntax *) let ctyps' = List.map2 (complete_conclusion mldata) cnames ctyps in (* Interpret the constructor types *) - let ctyps'' = List.map (interp_type_evars isevars env ~impls) ctyps' in - (cnames, ctyps'') + let ctyps'', cimpls = List.split (List.map (interp_type_evars_impls ~evdref env ~impls) ctyps') in + (cnames, ctyps'', cimpls) let interp_mutual paramsl indl notations finite = check_all_names_different indl; let env0 = Global.env() in - let isevars = ref (Evd.create_evar_defs Evd.empty) in - let env_params, ctx_params = interp_context_evars isevars env0 paramsl in + let evdref = ref (Evd.create_evar_defs Evd.empty) in + let (env_params, ctx_params), userimpls = interp_context_evars evdref env0 paramsl in let indnames = List.map (fun ind -> ind.ind_name) indl in (* Names of parameters as arguments of the inductive type (defs removed) *) @@ -329,37 +519,38 @@ let interp_mutual paramsl indl notations finite = let params = List.map (fun (na,_,_) -> out_name na) assums in (* Interpret the arities *) - let arities = List.map (interp_ind_arity isevars env_params) indl in + let arities = List.map (interp_ind_arity evdref env_params) indl in let fullarities = List.map (fun c -> it_mkProd_or_LetIn c ctx_params) arities in let env_ar = push_types env0 indnames fullarities in let env_ar_params = push_rel_context ctx_params env_ar in (* Compute interpretation metadatas *) - let impls = compute_interning_datas env0 params indnames fullarities in - let mldatas = List.map2 (mk_mltype_data isevars env_params params) arities indnames in + let indimpls = List.map (fun _ -> userimpls) fullarities in + let impls = compute_interning_datas env0 params indnames fullarities indimpls in + let mldatas = List.map2 (mk_mltype_data evdref env_params params) arities indnames in let constructors = States.with_heavy_rollback (fun () -> (* Temporary declaration of notations and scopes *) List.iter (declare_interning_data impls) notations; (* Interpret the constructor types *) - list_map3 (interp_cstrs isevars env_ar_params impls) mldatas arities indl) + list_map3 (interp_cstrs evdref env_ar_params impls) mldatas arities indl) () in (* Instantiate evars and check all are resolved *) - let isevars,_ = consider_remaining_unif_problems env_params !isevars in - let sigma = Evd.evars_of isevars in - let constructors = List.map (fun (idl,cl) -> (idl,List.map (nf_evar sigma) cl)) constructors in + let evd,_ = consider_remaining_unif_problems env_params !evdref in + let sigma = evars_of evd in + let constructors = List.map (fun (idl,cl,impsl) -> (idl,List.map (nf_evar sigma) cl,impsl)) constructors in let ctx_params = Sign.map_rel_context (nf_evar sigma) ctx_params in let arities = List.map (nf_evar sigma) arities in - List.iter (check_evars env_params Evd.empty isevars) arities; - Sign.iter_rel_context (check_evars env0 Evd.empty isevars) ctx_params; - List.iter (fun (_,ctyps) -> - List.iter (check_evars env_ar_params Evd.empty isevars) ctyps) + List.iter (check_evars env_params Evd.empty evd) arities; + Sign.iter_rel_context (check_evars env0 Evd.empty evd) ctx_params; + List.iter (fun (_,ctyps,_) -> + List.iter (check_evars env_ar_params Evd.empty evd) ctyps) constructors; (* Build the inductive entries *) - let entries = list_map3 (fun ind arity (cnames,ctypes) -> { + let entries = list_map3 (fun ind arity (cnames,ctypes,cimpls) -> { mind_entry_typename = ind.ind_name; mind_entry_arity = arity; mind_entry_consnames = cnames; @@ -370,15 +561,15 @@ let interp_mutual paramsl indl notations finite = { mind_entry_params = List.map prepare_param ctx_params; mind_entry_record = false; mind_entry_finite = finite; - mind_entry_inds = entries } + mind_entry_inds = entries }, (List.map (fun (_,_,impls) -> userimpls, impls) constructors) let eq_constr_expr c1 c2 = try let _ = Constrextern.check_same_type c1 c2 in true with _ -> false (* Very syntactical equality *) let eq_local_binder d1 d2 = match d1,d2 with - | LocalRawAssum (nal1,c1), LocalRawAssum (nal2,c2) -> - List.length nal1 = List.length nal2 && + | LocalRawAssum (nal1,k1,c1), LocalRawAssum (nal2,k2,c2) -> + List.length nal1 = List.length nal2 && k1 = k2 && List.for_all2 (fun (_,na1) (_,na2) -> na1 = na2) nal1 nal2 && eq_constr_expr c1 c2 | LocalRawDef ((_,id1),c1), LocalRawDef ((_,id2),c2) -> @@ -410,23 +601,49 @@ let prepare_inductive ntnl indl = ind_arity = ar; ind_lc = List.map (fun (_,((_,id),t)) -> (id,t)) lc }) indl in - List.fold_right option_cons ntnl [], indl + List.fold_right Option.List.cons ntnl [], indl + + +let elim_flag = ref true +let _ = + declare_bool_option + { optsync = true; + optname = "automatic declaration of eliminations"; + optkey = (SecondaryTable ("Elimination","Schemes")); + optread = (fun () -> !elim_flag) ; + optwrite = (fun b -> elim_flag := b) } + + +let lift_implicits n = + List.map (fun x -> + match fst x with + ExplByPos (k, id) -> ExplByPos (k + n, id), snd x + | _ -> x) -let declare_mutual_with_eliminations isrecord mie = +let declare_mutual_with_eliminations isrecord mie impls = let names = List.map (fun e -> e.mind_entry_typename) mie.mind_entry_inds in - let (_,kn) = declare_mind isrecord mie in - if_verbose ppnl (minductive_message names); - declare_eliminations kn; - kn + let params = List.length mie.mind_entry_params in + let (_,kn) = declare_mind isrecord mie in + list_iter_i (fun i (indimpls, constrimpls) -> + let ind = (kn,i) in + list_iter_i + (fun j impls -> + maybe_declare_manual_implicits false (ConstructRef (ind, succ j)) + (is_implicit_args()) (indimpls @ (lift_implicits params impls))) + constrimpls) + impls; + if_verbose ppnl (minductive_message names); + if !elim_flag then declare_eliminations kn; + kn let build_mutual l finite = let indl,ntnl = List.split l in let paramsl = extract_params indl in let coes = extract_coercions indl in let notations,indl = prepare_inductive ntnl indl in - let mie = interp_mutual paramsl indl notations finite in + let mie,impls = interp_mutual paramsl indl notations finite in (* Declare the mutual inductive block with its eliminations *) - ignore (declare_mutual_with_eliminations false mie); + ignore (declare_mutual_with_eliminations false mie impls); (* Declare the possible notations of inductive types *) List.iter (declare_interning_data ([],[])) notations; (* Declare the coercions *) @@ -434,13 +651,27 @@ let build_mutual l finite = (* 3c| Fixpoints and co-fixpoints *) -let recursive_message = function +let pr_rank = function + | 0 -> str "1st" + | 1 -> str "2nd" + | 2 -> str "3rd" + | n -> str ((string_of_int (n+1))^"th") + +let recursive_message indexes = function | [] -> anomaly "no recursive definition" - | [id] -> pr_id id ++ str " is recursively defined" + | [id] -> pr_id id ++ str " is recursively defined" ++ + (match indexes with + | Some [|i|] -> str " (decreasing on "++pr_rank i++str " argument)" + | _ -> mt ()) | l -> hov 0 (prlist_with_sep pr_coma pr_id l ++ - spc () ++ str "are recursively defined") - -let corecursive_message = function + spc () ++ str "are recursively defined" ++ + match indexes with + | Some a -> spc () ++ str "(decreasing respectively on " ++ + prlist_with_sep pr_coma pr_rank (Array.to_list a) ++ + str " arguments)" + | None -> mt ()) + +let corecursive_message _ = function | [] -> error "no corecursive definition" | [id] -> pr_id id ++ str " is corecursively defined" | l -> hov 0 (prlist_with_sep pr_coma pr_id l ++ @@ -521,7 +752,7 @@ let check_mutuality env kind fixl = | _ -> () type fixpoint_kind = - | IsFixpoint of (int option * recursion_order_expr) list + | IsFixpoint of (identifier located option * recursion_order_expr) list | IsCoFixpoint type fixpoint_expr = { @@ -531,15 +762,20 @@ type fixpoint_expr = { fix_type : constr_expr } -let interp_fix_type isevars env fix = - interp_type_evars isevars env - (generalize_constr_expr fix.fix_type fix.fix_binders) +let interp_fix_context evdref env fix = + interp_context_evars evdref env fix.fix_binders -let interp_fix_body isevars env impls fix fixtype = - interp_casted_constr_evars isevars env ~impls - (abstract_constr_expr fix.fix_body fix.fix_binders) fixtype +let interp_fix_ccl evdref (env,_) fix = + interp_type_evars evdref env fix.fix_type -let declare_fix boxed kind f def t = +let interp_fix_body evdref env_rec impls (_,ctx) fix ccl = + let env = push_rel_context ctx env_rec in + let body = interp_casted_constr_evars evdref env ~impls fix.fix_body ccl in + it_mkLambda_or_LetIn body ctx + +let build_fix_type (_,ctx) ccl = it_mkProd_or_LetIn ccl ctx + +let declare_fix boxed kind f def t imps = let ce = { const_entry_body = def; const_entry_type = Some t; @@ -547,26 +783,37 @@ let declare_fix boxed kind f def t = const_entry_boxed = boxed } in let kn = declare_constant f (DefinitionEntry ce,IsDefinition kind) in - ConstRef kn - + let gr = ConstRef kn in + maybe_declare_manual_implicits false gr (is_implicit_args ()) imps; + gr + let prepare_recursive_declaration fixnames fixtypes fixdefs = let defs = List.map (subst_vars (List.rev fixnames)) fixdefs in let names = List.map (fun id -> Name id) fixnames in (Array.of_list names, Array.of_list fixtypes, Array.of_list defs) -let compute_guardness_evidence (n,_) fixl fixtype = +(* Jump over let-bindings. *) + +let rel_index n ctx = + list_index0 (Name n) (List.rev_map pi1 (List.filter (fun x -> pi2 x = None) ctx)) + +let rec unfold f b = + match f b with + | Some (x, b') -> x :: unfold f b' + | None -> [] + +let compute_possible_guardness_evidences (n,_) (_, fixctx) fixtype = match n with - | Some n -> n + | Some (loc, n) -> [rel_index n fixctx] | None -> - (* Recursive argument was not given by the user : - We check that there is only one inductive argument *) - let m = local_binders_length fixl.fix_binders in - let ctx = fst (Sign.decompose_prod_n_assum m fixtype) in - let isIndApp t = isInd (fst (decompose_app (strip_head_cast t))) in - (* This could be more precise (e.g. do some delta) *) - let lb = List.rev_map (fun (_,_,t) -> isIndApp t) ctx in - try (list_unique_index true lb) - 1 - with Not_found -> error "the recursive argument needs to be specified" + (* If recursive argument was not given by user, we try all args. + An earlier approach was to look only for inductive arguments, + but doing it properly involves delta-reduction, and it finally + doesn't seem to worth the effort (except for huge mutual + fixpoints ?) *) + let len = List.length fixctx in + unfold (function x when x = len -> None + | n -> Some (n, succ n)) 0 let interp_recursive fixkind l boxed = let env = Global.env() in @@ -575,70 +822,124 @@ let interp_recursive fixkind l boxed = let fixnames = List.map (fun fix -> fix.fix_name) fixl in (* Interp arities allowing for unresolved types *) - let isevars = ref (Evd.create_evar_defs Evd.empty) in - let fixtypes = List.map (interp_fix_type isevars env) fixl in + let evdref = ref (Evd.create_evar_defs Evd.empty) in + let fixctxs, fiximps = + List.split (List.map (interp_fix_context evdref env) fixl) in + let fixccls = List.map2 (interp_fix_ccl evdref) fixctxs fixl in + let fixtypes = List.map2 build_fix_type fixctxs fixccls in let env_rec = push_named_types env fixnames fixtypes in (* Get interpretation metadatas *) - let impls = compute_interning_datas env [] fixnames fixtypes in - let notations = List.fold_right option_cons ntnl [] in + let impls = compute_interning_datas env [] fixnames fixtypes fiximps in + let notations = List.fold_right Option.List.cons ntnl [] in (* Interp bodies with rollback because temp use of notations/implicit *) let fixdefs = States.with_heavy_rollback (fun () -> List.iter (declare_interning_data impls) notations; - List.map2 (interp_fix_body isevars env_rec impls) fixl fixtypes) + list_map3 (interp_fix_body evdref env_rec impls) fixctxs fixl fixccls) () in (* Instantiate evars and check all are resolved *) - let isevars,_ = consider_remaining_unif_problems env_rec !isevars in - let fixdefs = List.map (nf_evar (Evd.evars_of isevars)) fixdefs in - let fixtypes = List.map (nf_evar (Evd.evars_of isevars)) fixtypes in - List.iter (check_evars env_rec Evd.empty isevars) fixdefs; - List.iter (check_evars env Evd.empty isevars) fixtypes; + let evd,_ = consider_remaining_unif_problems env_rec !evdref in + let fixdefs = List.map (nf_evar (evars_of evd)) fixdefs in + let fixtypes = List.map (nf_evar (evars_of evd)) fixtypes in + let evd = Typeclasses.resolve_typeclasses ~onlyargs:false ~fail:true env evd in + List.iter (check_evars env_rec Evd.empty evd) fixdefs; + List.iter (check_evars env Evd.empty evd) fixtypes; check_mutuality env kind (List.combine fixnames fixdefs); (* Build the fix declaration block *) let fixdecls = prepare_recursive_declaration fixnames fixtypes fixdefs in - let fixdecls = + let indexes, fixdecls = match fixkind with | IsFixpoint wfl -> - let fixwf = list_map3 compute_guardness_evidence wfl fixl fixtypes in - list_map_i (fun i _ -> mkFix ((Array.of_list fixwf,i),fixdecls)) 0 l + let possible_indexes = + list_map3 compute_possible_guardness_evidences wfl fixctxs fixtypes in + let indexes = search_guard dummy_loc env possible_indexes fixdecls in + Some indexes, list_map_i (fun i _ -> mkFix ((indexes,i),fixdecls)) 0 l | IsCoFixpoint -> - list_map_i (fun i _ -> mkCoFix (i,fixdecls)) 0 l + None, list_map_i (fun i _ -> mkCoFix (i,fixdecls)) 0 l in (* Declare the recursive definitions *) - ignore (list_map3 (declare_fix boxed kind) fixnames fixdecls fixtypes); - if_verbose ppnl (recursive_message kind fixnames); + ignore (list_map4 (declare_fix boxed kind) fixnames fixdecls fixtypes fiximps); + if_verbose ppnl (recursive_message kind indexes fixnames); (* Declare notations *) List.iter (declare_interning_data ([],[])) notations let build_recursive l b = let g = List.map (fun ((_,wf,_,_,_),_) -> wf) l in - let fixl = List.map (fun ((id,_,bl,typ,def),ntn) -> + let fixl = List.map (fun (((_,id),_,bl,typ,def),ntn) -> ({fix_name = id; fix_binders = bl; fix_body = def; fix_type = typ},ntn)) l in interp_recursive (IsFixpoint g) fixl b let build_corecursive l b = - let fixl = List.map (fun ((id,bl,typ,def),ntn) -> + let fixl = List.map (fun (((_,id),bl,typ,def),ntn) -> ({fix_name = id; fix_binders = bl; fix_body = def; fix_type = typ},ntn)) l in interp_recursive IsCoFixpoint fixl b (* 3d| Schemes *) - -let build_scheme lnamedepindsort = +let rec split_scheme l = + let env = Global.env() in + match l with + | [] -> [],[] + | (Some id,t)::q -> let l1,l2 = split_scheme q in + ( match t with + | InductionScheme (x,y,z) -> ((id,x,y,z)::l1),l2 + | EqualityScheme x -> l1,(x::l2) + ) +(* + if no name has been provided, we build one from the types of the ind +requested +*) + | (None,t)::q -> + let l1,l2 = split_scheme q in + ( match t with + | InductionScheme (x,y,z) -> + let ind = mkInd (Nametab.inductive_of_reference y) in + let sort_of_ind = family_of_sort (Typing.sort_of env Evd.empty ind) +in + let z' = family_of_sort (interp_sort z) in + let suffix = ( + match sort_of_ind with + | InProp -> + if x then (match z' with + | InProp -> "_ind_nodep" + | InSet -> "_rec_nodep" + | InType -> "_rect_nodep") + else ( match z' with + | InProp -> "_ind" + | InSet -> "_rec" + | InType -> "_rect" ) + | _ -> + if x then (match z' with + | InProp -> "_ind" + | InSet -> "_rec" + | InType -> "_rect" ) + else (match z' with + | InProp -> "_ind_nodep" + | InSet -> "_rec_nodep" + | InType -> "_rect_nodep") + ) in + let newid = (string_of_id (Pcoq.coerce_global_to_id y))^suffix in + let newref = (dummy_loc,id_of_string newid) in + ((newref,x,y,z)::l1),l2 + | EqualityScheme x -> l1,(x::l2) + ) + + +let build_induction_scheme lnamedepindsort = let lrecnames = List.map (fun ((_,f),_,_,_) -> f) lnamedepindsort and sigma = Evd.empty and env0 = Global.env() in let lrecspec = List.map (fun (_,dep,indid,sort) -> - let ind = Nametab.global_inductive indid in + let ind = Nametab.inductive_of_reference indid in let (mib,mip) = Global.lookup_inductive ind in (ind,mib,mip,dep,interp_elimination_sort sort)) lnamedepindsort @@ -650,114 +951,259 @@ let build_scheme lnamedepindsort = let ce = { const_entry_body = decl; const_entry_type = Some decltype; const_entry_opaque = false; - const_entry_boxed = Options.boxed_definitions() } in + const_entry_boxed = Flags.boxed_definitions() } in let kn = declare_constant fi (DefinitionEntry ce, IsDefinition Scheme) in ConstRef kn :: lrecref in let _ = List.fold_right2 declare listdecl lrecnames [] in - if_verbose ppnl (recursive_message Fixpoint lrecnames) - -let rec get_concl n t = - if n = 0 then t - else - match kind_of_term t with - Prod (_,_,t) -> get_concl (pred n) t - | _ -> raise (Invalid_argument "get_concl") - -let cut_last l = - let rec aux acc = function - hd :: [] -> List.rev acc, hd - | hd :: tl -> aux (hd :: acc) tl - | [] -> raise (Invalid_argument "cut_last") - in aux [] l + if_verbose ppnl (recursive_message Fixpoint None lrecnames) + +let build_scheme l = + let ischeme,escheme = split_scheme l in +(* we want 1 kind of scheme at a time so we check if the user +tried to declare different schemes at once *) + if (ischeme <> []) && (escheme <> []) + then + error "Do not declare equality and induction scheme at the same time." + else ( + if ischeme <> [] then build_induction_scheme ischeme; + List.iter ( fun indname -> + let ind = Nametab.inductive_of_reference indname + in declare_eq_scheme (fst ind); + try + make_eq_decidability ind + with _ -> + Pfedit.delete_current_proof(); + message "Error while computing decidability scheme. Please report." + ) escheme + ) +let list_split_rev_at index l = + let rec aux i acc = function + hd :: tl when i = index -> acc, tl + | hd :: tl -> aux (succ i) (hd :: acc) tl + | [] -> failwith "list_split_at: Invalid argument" + in aux 0 [] l + +let fold_left' f = function + [] -> raise (Invalid_argument "fold_right'") + | hd :: tl -> List.fold_left f hd tl + let build_combined_scheme name schemes = let env = Global.env () in - let defs = +(* let nschemes = List.length schemes in *) + let find_inductive ty = + let (ctx, arity) = decompose_prod ty in + let (_, last) = List.hd ctx in + match kind_of_term last with + | App (ind, args) -> ctx, destInd ind, Array.length args + | _ -> ctx, destInd last, 0 + in + let defs = List.map (fun x -> let refe = Ident x in let qualid = qualid_of_reference refe in - let cst = Nametab.locate_constant (snd qualid) in - qualid, cst, Typeops.type_of_constant env cst) + let cst = try + Nametab.locate_constant (snd qualid) + with Not_found -> error ((string_of_qualid (snd qualid))^" is not declared") + in + let ty = Typeops.type_of_constant env cst in + qualid, cst, ty) schemes in let (qid, c, t) = List.hd defs in - let nargs = - let (_, arity, _) = destProd t in - nb_prod arity - in - let prods = nb_prod t - nargs in - let defs, (qid, c, t) = cut_last defs in - let (args, concl) = decompose_prod_n prods t in - let concls = List.map (fun (_, cst, t) -> cst, get_concl prods t) defs in + let ctx, ind, nargs = find_inductive t in + (* Number of clauses, including the predicates quantification *) + let prods = nb_prod t - (nargs + 1) in let coqand = Coqlib.build_coq_and () and coqconj = Coqlib.build_coq_conj () in let relargs = rel_vect 0 prods in - let concl_typ, concl_bod = - List.fold_right - (fun (cst, x) (acct, accb) -> - mkApp (coqand, [| x; acct |]), - mkApp (coqconj, [| x; acct; mkApp(mkConst cst, relargs); accb |])) - concls (concl, mkApp (mkConst c, relargs)) + let concls = List.rev_map + (fun (_, cst, t) -> + mkApp(mkConst cst, relargs), + snd (decompose_prod_n prods t)) defs in + let concl_bod, concl_typ = + fold_left' + (fun (accb, acct) (cst, x) -> + mkApp (coqconj, [| x; acct; cst; accb |]), + mkApp (coqand, [| x; acct |])) concls in - let ctx = List.map (fun (x, y) -> x, None, y) args in + let ctx, _ = + list_split_rev_at prods + (List.rev_map (fun (x, y) -> x, None, y) ctx) in let typ = it_mkProd_wo_LetIn concl_typ ctx in let body = it_mkLambda_or_LetIn concl_bod ctx in let ce = { const_entry_body = body; const_entry_type = Some typ; const_entry_opaque = false; - const_entry_boxed = Options.boxed_definitions() } in + const_entry_boxed = Flags.boxed_definitions() } in let _ = declare_constant (snd name) (DefinitionEntry ce, IsDefinition Scheme) in - if_verbose ppnl (recursive_message Fixpoint [snd name]) - + if_verbose ppnl (recursive_message Fixpoint None [snd name]) (* 4| Goal declaration *) -let start_proof id kind c hook = - let sign = Global.named_context () in - let sign = clear_proofs sign in - Pfedit.start_proof id kind sign c hook - -let start_proof_com sopt kind (bl,t) hook = - let id = match sopt with - | Some id -> - (* We check existence here: it's a bit late at Qed time *) - if Nametab.exists_cci (Lib.make_path id) or is_section_variable id then - errorlabstrm "start_proof" (pr_id id ++ str " already exists"); - id - | None -> - next_global_ident_away false (id_of_string "Unnamed_thm") - (Pfedit.get_all_proof_names ()) - in - let env = Global.env () in - let c = interp_type Evd.empty env (generalize_constr_expr t bl) in - let _ = Typeops.infer_type env c in - start_proof id kind c hook - -let save id const (locality,kind) hook = - let {const_entry_body = pft; - const_entry_type = tpo; - const_entry_opaque = opacity } = const in - let l,r = match locality with - | Local when Lib.sections_are_opened () -> - let k = logical_kind_of_goal_kind kind in - let c = SectionLocalDef (pft, tpo, opacity) in - let _ = declare_variable id (Lib.cwd(), c, k) in - (Local, VarRef id) - | Local -> - let k = logical_kind_of_goal_kind kind in - let kn = declare_constant id (DefinitionEntry const, k) in - (Global, ConstRef kn) - | Global -> - let k = logical_kind_of_goal_kind kind in - let kn = declare_constant id (DefinitionEntry const, k) in - (Global, ConstRef kn) in - Pfedit.delete_current_proof (); - definition_message id; - hook l r - -let save_named opacity = - let id,(const,persistence,hook) = Pfedit.cook_proof () in - let const = { const with const_entry_opaque = opacity } in - save id const persistence hook +(* 4.1| Support for mutually proved theorems *) + +let retrieve_first_recthm = function + | VarRef id -> + (pi2 (Global.lookup_named id),variable_opacity id) + | ConstRef cst -> + let {const_body=body;const_opaque=opaq} = + Global.lookup_constant cst in + (Option.map Declarations.force body,opaq) + | _ -> assert false + +let compute_proof_name = function + | Some (loc,id) -> + (* We check existence here: it's a bit late at Qed time *) + if Nametab.exists_cci (Lib.make_path id) or is_section_variable id then + user_err_loc (loc,"",pr_id id ++ str " already exists"); + id + | None -> + next_global_ident_away false (id_of_string "Unnamed_thm") + (Pfedit.get_all_proof_names ()) + +let save_remaining_recthms (local,kind) body opaq i (id,(t_i,imps)) = + match body with + | None -> + (match local with + | Local -> + let impl=false and keep=false in (* copy values from Vernacentries *) + let k = IsAssumption Conjectural in + let c = SectionLocalAssum (t_i,impl,keep) in + let _ = declare_variable id (Lib.cwd(),c,k) in + (Local,VarRef id,imps) + | Global -> + let k = IsAssumption Conjectural in + let kn = declare_constant id (ParameterEntry (t_i,false), k) in + (Global,ConstRef kn,imps)) + | Some body -> + let k = logical_kind_of_goal_kind kind in + let body_i = match kind_of_term body with + | Fix ((nv,0),decls) -> mkFix ((nv,i),decls) + | CoFix (0,decls) -> mkCoFix (i,decls) + | _ -> anomaly "Not a proof by induction" in + match local with + | Local -> + let c = SectionLocalDef (body_i, Some t_i, opaq) in + let _ = declare_variable id (Lib.cwd(), c, k) in + (Local,VarRef id,imps) + | Global -> + let const = + { const_entry_body = body_i; + const_entry_type = Some t_i; + const_entry_opaque = opaq; + const_entry_boxed = false (* copy of what cook_proof does *)} in + let kn = declare_constant id (DefinitionEntry const, k) in + (Global,ConstRef kn,imps) + +let look_for_mutual_statements thms = + if List.tl thms <> [] then + (* More than one statement: we look for a common inductive hyp or a *) + (* common coinductive conclusion *) + let n = List.length thms in + let inds = List.map (fun (id,(t,_) as x) -> + let (hyps,ccl) = splay_prod_assum (Global.env()) Evd.empty t in + let whnf_hyp_hds = map_rel_context_with_binders + (fun i c -> fst (whd_betadeltaiota_stack (Global.env()) Evd.empty (lift i c))) + hyps in + let ind_hyps = + List.filter ((<>) None) (list_map_i (fun i (_,b,t) -> + match kind_of_term t with + | Ind (kn,_ as ind) when + let mind = Global.lookup_mind kn in + mind.mind_ntypes = n & mind.mind_finite & b = None -> + Some (ind,x,i) + | _ -> + None) 1 whnf_hyp_hds) in + let ind_ccl = + let cclenv = push_rel_context hyps (Global.env()) in + let whnf_ccl,_ = whd_betadeltaiota_stack cclenv Evd.empty ccl in + match kind_of_term whnf_ccl with + | Ind (kn,_ as ind) when + let mind = Global.lookup_mind kn in + mind.mind_ntypes = n & not mind.mind_finite -> + Some (ind,x,0) + | _ -> + None in + ind_hyps,ind_ccl) thms in + let inds_hyps,ind_ccls = List.split inds in + let is_same_ind kn = function Some ((kn',_),_,_) -> kn = kn' | _ -> false in + let compare_kn ((kn,i),_,_) ((kn,i'),_,_) = i - i' in + (* Check if all conclusions are coinductive in the same type *) + let same_indccl = + match ind_ccls with + | (Some ((kn,_),_,_ as x))::rest when List.for_all (is_same_ind kn) rest + -> Some (x :: List.map Option.get rest) + | _ -> None in + (* Check if some hypotheses are inductive in the same type *) + let common_same_indhyp = + let rec find_same_ind inds = + match inds with + | []::_ -> + [] + | (Some ((kn,_),_,_) as x :: hyps_thms1)::other_thms -> + let others' = List.map (List.filter (is_same_ind kn)) other_thms in + (x,others')::find_same_ind (hyps_thms1::other_thms) + | (None::hyps_thm1)::other_thms -> + find_same_ind (hyps_thm1::other_thms) + | [] -> + assert false in + find_same_ind inds_hyps in + let common_inds,finite = + match same_indccl, common_same_indhyp with + | None, [(x,rest)] when List.for_all (fun l -> List.length l = 1) rest -> + (* One occurrence of common inductive hyps and no common coind ccls *) + Option.get x::List.map (fun x -> Option.get (List.hd x)) rest, + false + | Some indccl, [] -> + (* One occurrence of common coind ccls and no common inductive hyps *) + indccl, true + | _ -> + error + ("Cannot find a common mutual inductive premise or coinductive" ^ + " conclusion in the statements") in + let ordered_inds = List.sort compare_kn common_inds in + list_iter_i (fun i' ((kn,i),_,_) -> + if i <> i' then + error + ("Cannot find distinct (co)inductive types of the same family" ^ + "of mutual (co)inductive types")) + ordered_inds; + let nl,thms = List.split (List.map (fun (_,x,i) -> (i,x)) ordered_inds) in + let rec_tac = + if finite then + match List.map (fun (id,(t,_)) -> (id,t)) thms with + | (id,_)::l -> Hiddentac.h_mutual_cofix true id l + | _ -> assert false + else + match List.map2 (fun (id,(t,_)) n -> (id,n,t)) thms nl with + | (id,n,_)::l -> Hiddentac.h_mutual_fix true id n l + | _ -> assert false in + Some rec_tac,thms + else + None, thms + +(* 4.2| General support for goals *) + +let start_proof_com kind thms hook = + let thms = List.map (fun (sopt,(bl,t)) -> + (compute_proof_name sopt, + interp_type_evars_impls (Global.env()) (generalize_constr_expr t bl))) + thms in + let rec_tac,thms = look_for_mutual_statements thms in + match thms with + | [] -> anomaly "No proof to start" + | (id,(t,imps))::other_thms -> + let hook strength ref = + let other_thms_data = + if other_thms = [] then [] else + (* there are several theorems defined mutually *) + let body,opaq = retrieve_first_recthm ref in + list_map_i (save_remaining_recthms kind body opaq) 1 other_thms in + let thms_data = (strength,ref,imps)::other_thms_data in + List.iter (fun (strength,ref,imps) -> + maybe_declare_manual_implicits false ref (is_implicit_args ()) imps; + hook strength ref) thms_data in + start_proof id kind t ?init_tac:rec_tac hook let check_anonymity id save_ident = if atompart_of_id id <> "Unnamed_thm" then @@ -767,13 +1213,13 @@ let check_anonymity id save_ident = *) let save_anonymous opacity save_ident = - let id,(const,persistence,hook) = Pfedit.cook_proof () in + let id,(const,persistence,hook) = Pfedit.cook_proof !save_hook in let const = { const with const_entry_opaque = opacity } in check_anonymity id save_ident; save save_ident const persistence hook let save_anonymous_with_strength kind opacity save_ident = - let id,(const,_,hook) = Pfedit.cook_proof () in + let id,(const,_,hook) = Pfedit.cook_proof !save_hook in let const = { const with const_entry_opaque = opacity } in check_anonymity id save_ident; (* we consider that non opaque behaves as local for discharge *) @@ -786,7 +1232,7 @@ let admit () = error "Only statements declared as conjecture can be admitted"; *) let kn = - declare_constant id (ParameterEntry typ, IsAssumption Conjectural) in + declare_constant id (ParameterEntry (typ,false), IsAssumption Conjectural) in Pfedit.delete_current_proof (); assumption_message id; hook Global (ConstRef kn) @@ -795,3 +1241,5 @@ let get_current_context () = try Pfedit.get_current_goal_context () with e when Logic.catchable_exception e -> (Evd.empty, Global.env()) + + diff --git a/toplevel/command.mli b/toplevel/command.mli index d15e90cb..26526a5f 100644 --- a/toplevel/command.mli +++ b/toplevel/command.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: command.mli 10067 2007-08-09 17:13:16Z msozeau $ i*) +(*i $Id: command.mli 11024 2008-05-30 12:41:39Z msozeau $ i*) (*i*) open Util @@ -30,28 +30,74 @@ open Redexpr functions of [Declare]; they return an absolute reference to the defined object *) +val get_declare_definition_hook : unit -> (Entries.definition_entry -> unit) +val set_declare_definition_hook : (Entries.definition_entry -> unit) -> unit + +val definition_message : identifier -> unit +val assumption_message : identifier -> unit + val declare_definition : identifier -> definition_kind -> local_binder list -> red_expr option -> constr_expr -> - constr_expr option -> declaration_hook -> unit + constr_expr option -> declaration_hook -> unit -val syntax_definition : identifier -> constr_expr -> bool -> bool -> unit +val syntax_definition : identifier -> identifier list * constr_expr -> + bool -> bool -> unit -val declare_one_assumption : coercion_flag -> assumption_kind -> Term.types -> - Names.variable located -> unit +val declare_one_assumption : coercion_flag -> assumption_kind -> Term.types -> + Impargs.manual_explicitation list -> + bool (* implicit *) -> bool (* keep *) -> bool (* inline *) -> Names.variable located -> unit + +val set_declare_assumption_hook : (types -> unit) -> unit val declare_assumption : identifier located list -> - coercion_flag -> assumption_kind -> local_binder list -> constr_expr -> unit + coercion_flag -> assumption_kind -> local_binder list -> constr_expr -> + bool -> bool -> bool -> unit + +val declare_interning_data : 'a * Constrintern.implicits_env -> + string * Topconstr.constr_expr * Topconstr.scope_name option -> unit + + +val compute_interning_datas : Environ.env -> + 'a list -> + 'b list -> + Term.types list -> + Impargs.manual_explicitation list list -> + 'a list * + ('b * + (Names.identifier list * Impargs.implicits_list * + Topconstr.scope_name option list)) + list val build_mutual : (inductive_expr * decl_notation) list -> bool -> unit val declare_mutual_with_eliminations : - bool -> Entries.mutual_inductive_entry -> mutual_inductive + bool -> Entries.mutual_inductive_entry -> + (Impargs.manual_explicitation list * + Impargs.manual_explicitation list list) list -> + mutual_inductive -val build_recursive : (fixpoint_expr * decl_notation) list -> bool -> unit +type fixpoint_kind = + | IsFixpoint of (identifier located option * recursion_order_expr) list + | IsCoFixpoint -val build_corecursive : (cofixpoint_expr * decl_notation) list -> bool -> unit +type fixpoint_expr = { + fix_name : identifier; + fix_binders : local_binder list; + fix_body : constr_expr; + fix_type : constr_expr +} -val build_scheme : (identifier located * bool * reference * rawsort) list -> unit +val recursive_message : Decl_kinds.definition_object_kind -> + int array option -> Names.identifier list -> Pp.std_ppcmds + +val declare_fix : bool -> Decl_kinds.definition_object_kind -> identifier -> + constr -> types -> Impargs.manual_explicitation list -> global_reference + +val build_recursive : (Topconstr.fixpoint_expr * decl_notation) list -> bool -> unit + +val build_corecursive : (Topconstr.cofixpoint_expr * decl_notation) list -> bool -> unit + +val build_scheme : (identifier located option * scheme ) list -> unit val build_combined_scheme : identifier located -> identifier located list -> unit @@ -59,11 +105,18 @@ val generalize_constr_expr : constr_expr -> local_binder list -> constr_expr val abstract_constr_expr : constr_expr -> local_binder list -> constr_expr -val start_proof : identifier -> goal_kind -> constr -> +(* A hook start_proof calls on the type of the definition being started *) +val set_start_hook : (types -> unit) -> unit + +val start_proof : identifier -> goal_kind -> types -> + ?init_tac:Proof_type.tactic -> declaration_hook -> unit + +val start_proof_com : goal_kind -> + (lident option * (local_binder list * constr_expr)) list -> declaration_hook -> unit -val start_proof_com : identifier option -> goal_kind -> - (local_binder list * constr_expr) -> declaration_hook -> unit +(* A hook the next three functions pass to cook_proof *) +val set_save_hook : (Refiner.pftreestate -> unit) -> unit (*s [save_named b] saves the current completed proof under the name it was started; boolean [b] tells if the theorem is declared opaque; it diff --git a/toplevel/coqinit.ml b/toplevel/coqinit.ml index 44b2e231..884589e7 100644 --- a/toplevel/coqinit.ml +++ b/toplevel/coqinit.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: coqinit.ml 7732 2005-12-26 13:51:24Z herbelin $ *) +(* $Id: coqinit.ml 10901 2008-05-07 18:53:48Z letouzey $ *) open Pp open System @@ -14,7 +14,7 @@ open Toplevel let (/) = Filename.concat -let set_debug () = Options.debug := true +let set_debug () = Flags.debug := true (* Loading of the ressource file. rcfile is either $HOME/.coqrc.VERSION, or $HOME/.coqrc if the first one @@ -41,7 +41,7 @@ let load_rcfile() = Vernac.load_vernac false !rcfile else () (* - Options.if_verbose + Flags.if_verbose mSGNL (str ("No .coqrc or .coqrc."^Coq_config.version^ " found. Skipping rcfile loading.")) *) @@ -49,13 +49,14 @@ let load_rcfile() = (msgnl (str"Load of rcfile failed."); raise e) else - Options.if_verbose msgnl (str"Skipping rcfile loading.") + Flags.if_verbose msgnl (str"Skipping rcfile loading.") let add_ml_include s = Mltop.add_ml_dir s (* Puts dir in the path of ML and in the LoadPath *) -let coq_add_path s = Mltop.add_path s (Names.make_dirpath [Nameops.coq_root]) +let coq_add_path d s = + Mltop.add_path d (Names.make_dirpath [Nameops.coq_root;Names.id_of_string s]) let coq_add_rec_path s = Mltop.add_rec_path s (Names.make_dirpath [Nameops.coq_root]) (* By the option -include -I or -R of the command line *) @@ -68,32 +69,61 @@ let hm2 s = let n = String.length s in if n > 1 && s.[0] = '.' && s.[1] = '/' then String.sub s 2 (n-2) else s +(* The list of all theories in the standard library /!\ order does matter *) +let theories_dirs_map = [ + "theories/Unicode", "Unicode" ; + "theories/Classes", "Classes" ; + "theories/Program", "Program" ; + "theories/FSets", "FSets" ; + "theories/Reals", "Reals" ; + "theories/Strings", "Strings" ; + "theories/Sorting", "Sorting" ; + "theories/Setoids", "Setoids" ; + "theories/Sets", "Sets" ; + "theories/Lists", "Lists" ; + "theories/Wellfounded", "Wellfounded" ; + "theories/Relations", "Relations" ; + "theories/Numbers", "Numbers" ; + "theories/QArith", "QArith" ; + "theories/NArith", "NArith" ; + "theories/ZArith", "ZArith" ; + "theories/Arith", "Arith" ; + "theories/Bool", "Bool" ; + "theories/Logic", "Logic" ; + "theories/Init", "Init" + ] + (* Initializes the LoadPath according to COQLIB and Coq_config *) let init_load_path () = - (* developper specific directories to open *) - let dev = if Coq_config.local then [ "dev" ] else [] in let coqlib = (* variable COQLIB overrides the default library *) getenv_else "COQLIB" - (if Coq_config.local || !Options.boot then Coq_config.coqtop - else Coq_config.coqlib) in - (* first user-contrib *) + (if Coq_config.local || !Flags.boot then Coq_config.coqtop + else Coq_config.coqlib) in let user_contrib = coqlib/"user-contrib" in - if Sys.file_exists user_contrib then - Mltop.add_rec_path user_contrib Nameops.default_root_prefix; - (* then standard library *) - let vdirs = [ "theories"; "contrib" ] in - let dirs = "states" :: dev @ vdirs in - List.iter (fun s -> coq_add_rec_path (coqlib/s)) dirs; + let dirs = "states" :: ["contrib"] in let camlp4 = getenv_else "CAMLP4LIB" Coq_config.camlp4lib in - add_ml_include camlp4; - (* then current directory *) - Mltop.add_path "." Nameops.default_root_prefix; - (* additional loadpath, given with -I -include -R options *) - List.iter - (fun (s,alias,reci) -> - if reci then Mltop.add_rec_path s alias else Mltop.add_path s alias) - (List.rev !includes) + (* first user-contrib *) + if Sys.file_exists user_contrib then + Mltop.add_rec_path user_contrib Nameops.default_root_prefix; + (* then states, contrib and dev *) + List.iter (fun s -> coq_add_rec_path (coqlib/s)) dirs; + (* developer specific directory to open *) + if Coq_config.local then coq_add_path (coqlib/"dev") "dev"; + (* then standard library *) + List.iter + (fun (s,alias) -> Mltop.add_rec_path (coqlib/s) (Names.make_dirpath [Names.id_of_string alias; Nameops.coq_root])) + theories_dirs_map; + (* then camlp4lib *) + add_ml_include camlp4; + (* then current directory *) + Mltop.add_path "." Nameops.default_root_prefix; + (* additional loadpath, given with -I -include -R options *) + List.iter + (fun (s,alias,reci) -> + if reci then Mltop.add_rec_path s alias else Mltop.add_path s alias) + (List.rev !includes) + let init_library_roots () = includes := [] diff --git a/toplevel/coqtop.ml b/toplevel/coqtop.ml index 3374b0ee..e6d2deec 100644 --- a/toplevel/coqtop.ml +++ b/toplevel/coqtop.ml @@ -6,12 +6,12 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: coqtop.ml 9191 2006-09-29 15:45:42Z courtieu $ *) +(* $Id: coqtop.ml 11062 2008-06-06 14:19:50Z notin $ *) open Pp open Util open System -open Options +open Flags open Names open Libnames open Nameops @@ -32,6 +32,8 @@ let print_header () = Printf.printf "Welcome to Coq %s (%s)\n" ver rev; flush stdout +let output_context = ref false + let memory_stat = ref false let print_memory_stat () = @@ -81,7 +83,7 @@ let add_load_vernacular verb s = let load_vernacular () = List.iter (fun (s,b) -> - if Options.do_translate () then + if Flags.do_translate () then with_option translate_file (Vernac.load_vernac b) s else Vernac.load_vernac b s) @@ -102,7 +104,7 @@ let require () = let compile_list = ref ([] : (bool * string) list) let add_compile verbose s = set_batch_mode (); - Options.make_silent true; + Flags.make_silent true; compile_list := (verbose,s) :: !compile_list let compile_files () = let init_state = States.freeze() in @@ -111,7 +113,7 @@ let compile_files () = (fun (v,f) -> States.unfreeze init_state; Constrintern.coqdoc_unfreeze coqdoc_init_state; - if Options.do_translate () then + if Flags.do_translate () then with_option translate_file (Vernac.compile v) f else Vernac.compile v f) @@ -129,6 +131,11 @@ let set_opt () = re_exec_version := "opt" let re_exec is_ide = let s = !re_exec_version in let is_native = (Mltop.get()) = Mltop.Native in + (* Unix.readlink is not implemented on Windows architectures :-( + let prog = + try Unix.readlink "/proc/self/exe" + with Unix.Unix_error _ -> Sys.argv.(0) in + *) let prog = Sys.argv.(0) in if (is_native && s = "byte") || ((not is_native) && s = "opt") then begin @@ -151,7 +158,7 @@ let use_vm = ref false let set_vm_opt () = Vm.set_transp_values (not !boxed_val); - Options.set_boxed_definitions !boxed_def; + Flags.set_boxed_definitions !boxed_def; Vconv.set_use_vm !use_vm (*s Parsing of the command line. @@ -236,7 +243,7 @@ let parse_args is_ide = | "-compile-verbose" :: f :: rem -> add_compile true f; parse rem | "-compile-verbose" :: [] -> usage () - | "-dont-load-proofs" :: rem -> Options.dont_load_proofs := true; parse rem + | "-dont-load-proofs" :: rem -> Flags.dont_load_proofs := true; parse rem | "-translate" :: rem -> make_translate true; parse rem @@ -246,13 +253,15 @@ let parse_args is_ide = | "-debug" :: rem -> set_debug (); parse rem | "-vm" :: rem -> use_vm := true; parse rem - | "-emacs" :: rem -> Options.print_emacs := true; Pp.make_pp_emacs(); parse rem - | "-emacs-U" :: rem -> Options.print_emacs := true; - Options.print_emacs_safechar := true; Pp.make_pp_emacs(); parse rem - + | "-emacs" :: rem -> Flags.print_emacs := true; Pp.make_pp_emacs(); parse rem + | "-emacs-U" :: rem -> Flags.print_emacs := true; + Flags.print_emacs_safechar := true; Pp.make_pp_emacs(); parse rem + + | "-unicode" :: rem -> Flags.unicode_syntax := true; parse rem + | "-where" :: _ -> print_endline (getenv_else "COQLIB" Coq_config.coqlib); exit 0 - | ("-quiet"|"-silent") :: rem -> Options.make_silent true; parse rem + | ("-quiet"|"-silent") :: rem -> Flags.make_silent true; parse rem | ("-?"|"-h"|"-H"|"-help"|"--help") :: _ -> usage () @@ -270,13 +279,15 @@ let parse_args is_ide = | ("-m" | "--memory") :: rem -> memory_stat := true; parse rem - | "-xml" :: rem -> Options.xml_export := true; parse rem + | "-xml" :: rem -> Flags.xml_export := true; parse rem + + | "-output-context" :: rem -> output_context := true; parse rem - (* Scanned in Options! *) + (* Scanned in Flags. *) | "-v7" :: rem -> error "This version of Coq does not support v7 syntax" | "-v8" :: rem -> parse rem - | "-no-hash-consing" :: rem -> Options.hash_cons_proofs := false; parse rem + | "-no-hash-consing" :: rem -> Flags.hash_cons_proofs := false; parse rem | s :: rem -> if is_ide then begin @@ -297,15 +308,10 @@ let parse_args is_ide = end | e -> begin msgnl (Cerrors.explain_exn e); exit 1 end - -(* To prevent from doing the initialization twice *) -let initialized = ref false - let init is_ide = - if not !initialized then begin - initialized := true; - Sys.catch_break false; (* Ctrl-C is fatal during the initialisation *) - Lib.init(); + Sys.catch_break false; (* Ctrl-C is fatal during the initialisation *) + Lib.init(); + begin try parse_args is_ide; re_exec is_ide; @@ -315,21 +321,26 @@ let init is_ide = set_vm_opt (); engage (); if (not !batch_mode|| !compile_list=[]) && Global.env_is_empty() then - option_iter Declaremods.start_library !toplevel_name; + Option.iter Declaremods.start_library !toplevel_name; init_library_roots (); load_vernac_obj (); require (); load_rcfile(); load_vernacular (); compile_files (); - outputstate (); + outputstate () with e -> flush_all(); - if not !batch_mode then message "Error during initialization :"; + if not !batch_mode then message "Error during initialization:"; msgnl (Toplevel.print_toplevel_error e); exit 1 end; - if !batch_mode then (flush_all(); Profile.print_profile (); exit 0); + if !batch_mode then + (flush_all(); + if !output_context then + Pp.ppnl (with_option raw_print Prettyp.print_full_pure_context ()); + Profile.print_profile (); + exit 0); Lib.declare_initial_state () let init_ide () = init true; List.rev !ide_args diff --git a/toplevel/discharge.ml b/toplevel/discharge.ml index 63a6ad07..ae9a243f 100644 --- a/toplevel/discharge.ml +++ b/toplevel/discharge.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: discharge.ml 9310 2006-10-28 19:35:09Z herbelin $ *) +(* $Id: discharge.ml 10861 2008-04-28 08:19:14Z herbelin $ *) open Names open Util @@ -73,7 +73,7 @@ let process_inductive sechyps modlist mib = let inds = array_map_to_list (fun mip -> - let arity = expmod_constr modlist (Termops.refresh_universes (Inductive.type_of_inductive (Global.env()) (mib,mip))) in + let arity = expmod_constr modlist (Termops.refresh_universes_strict (Inductive.type_of_inductive (Global.env()) (mib,mip))) in let lc = Array.map (expmod_constr modlist) mip.mind_user_lc in (mip.mind_typename, arity, diff --git a/toplevel/himsg.ml b/toplevel/himsg.ml index 1809baa5..579acffa 100644 --- a/toplevel/himsg.ml +++ b/toplevel/himsg.ml @@ -6,11 +6,11 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: himsg.ml 9976 2007-07-12 11:58:30Z msozeau $ *) +(* $Id: himsg.ml 11150 2008-06-19 11:38:27Z msozeau $ *) open Pp open Util -open Options +open Flags open Names open Nameops open Term @@ -21,6 +21,7 @@ open Sign open Environ open Pretype_errors open Type_errors +open Typeclasses_errors open Indrec open Reduction open Cases @@ -29,51 +30,45 @@ open Printer open Rawterm open Evd -let quote s = h 0 (str "\"" ++ s ++ str "\"") - let pr_lconstr c = quote (pr_lconstr c) let pr_lconstr_env e c = quote (pr_lconstr_env e c) let pr_lconstr_env_at_top e c = quote (pr_lconstr_env_at_top e c) let pr_ljudge_env e c = let v,t = pr_ljudge_env e c in (quote v,quote t) -let nth i = - let many = match i mod 10 with 1 -> "st" | 2 -> "nd" | _ -> "th" in - int i ++ str many - -let pr_db ctx i = +let pr_db env i = try - match lookup_rel i ctx with + match lookup_rel i env with Name id, _, _ -> pr_id id - | Anonymous, _, _ -> str"<>" - with Not_found -> str"UNBOUND_REL_"++int i + | Anonymous, _, _ -> str "<>" + with Not_found -> str "UNBOUND_REL_" ++ int i -let explain_unbound_rel ctx n = - let pe = pr_ne_context_of (str "In environment") ctx in - str"Unbound reference: " ++ pe ++ - str"The reference " ++ int n ++ str " is free" +let explain_unbound_rel env n = + let pe = pr_ne_context_of (str "In environment") env in + str "Unbound reference: " ++ pe ++ + str "The reference " ++ int n ++ str " is free." -let explain_unbound_var ctx v = +let explain_unbound_var env v = let var = pr_id v in - str"No such section variable or assumption : " ++ var - -let explain_not_type ctx j = - let pe = pr_ne_context_of (str"In environment") ctx in - let pc,pt = pr_ljudge_env ctx j in - pe ++ str "the term" ++ brk(1,1) ++ pc ++ spc () ++ - str"has type" ++ spc () ++ pt ++ spc () ++ - str"which should be Set, Prop or Type." - -let explain_bad_assumption ctx j = - let pe = pr_ne_context_of (str"In environment") ctx in - let pc,pt = pr_ljudge_env ctx j in - pe ++ str "cannot declare a variable or hypothesis over the term" ++ - brk(1,1) ++ pc ++ spc () ++ str"of type" ++ spc () ++ pt ++ spc () ++ + str "No such section variable or assumption: " ++ var ++ str "." + +let explain_not_type env j = + let pe = pr_ne_context_of (str "In environment") env in + let pc,pt = pr_ljudge_env env j in + pe ++ str "The term" ++ brk(1,1) ++ pc ++ spc () ++ + str "has type" ++ spc () ++ pt ++ spc () ++ + str "which should be Set, Prop or Type." + +let explain_bad_assumption env j = + let pe = pr_ne_context_of (str "In environment") env in + let pc,pt = pr_ljudge_env env j in + pe ++ str "Cannot declare a variable or hypothesis over the term" ++ + brk(1,1) ++ pc ++ spc () ++ str "of type" ++ spc () ++ pt ++ spc () ++ str "because this term is not a type." let explain_reference_variables c = let pc = pr_lconstr c in - str "the constant" ++ spc () ++ pc ++ spc () ++ - str "refers to variables which are not in the context" + str "The constant" ++ spc () ++ pc ++ spc () ++ + str "refers to variables which are not in the context." let rec pr_disjunction pr = function | [a] -> pr a @@ -81,10 +76,10 @@ let rec pr_disjunction pr = function | a::l -> pr a ++ str "," ++ spc () ++ pr_disjunction pr l | [] -> assert false -let explain_elim_arity ctx ind sorts c pj okinds = - let ctx = make_all_name_different ctx in - let pi = pr_inductive ctx ind in - let pc = pr_lconstr_env ctx c in +let explain_elim_arity env ind sorts c pj okinds = + let env = make_all_name_different env in + let pi = pr_inductive env ind in + let pc = pr_lconstr_env env c in let msg = match okinds with | Some(kp,ki,explanation) -> let pki = pr_sort_family ki in @@ -93,144 +88,137 @@ let explain_elim_arity ctx ind sorts c pj okinds = | NonInformativeToInformative -> "proofs can be eliminated only to build proofs" | StrongEliminationOnNonSmallType -> - "strong elimination on non-small inductive types leads to paradoxes." + "strong elimination on non-small inductive types leads to paradoxes" | WrongArity -> "wrong arity" in let ppar = pr_disjunction (fun s -> quote (pr_sort_family s)) sorts in - let ppt = pr_lconstr_env ctx (snd (decompose_prod_assum pj.uj_type)) in - hov 0 - (str "the return type has sort" ++ spc() ++ ppt ++ spc() ++ - str "while it" ++ spc() ++ str "should be " ++ ppar ++ str ".") ++ - fnl() ++ + let ppt = pr_lconstr_env env (snd (decompose_prod_assum pj.uj_type)) in + hov 0 + (str "the return type has sort" ++ spc () ++ ppt ++ spc () ++ + str "while it" ++ spc () ++ str "should be " ++ ppar ++ str ".") ++ + fnl () ++ hov 0 (str "Elimination of an inductive object of sort " ++ pki ++ brk(1,0) ++ - str "is not allowed on a predicate in sort " ++ pkp ++ fnl() ++ - str "because" ++ spc() ++ str explanation ++ str ".") - | None -> + str "is not allowed on a predicate in sort " ++ pkp ++ fnl () ++ + str "because" ++ spc () ++ str explanation ++ str ".") + | None -> str "ill-formed elimination predicate." in hov 0 ( - str "Incorrect elimination of" ++ spc() ++ pc ++ spc () ++ - str "in the inductive type" ++ spc() ++ quote pi ++ str":") ++ + str "Incorrect elimination of" ++ spc () ++ pc ++ spc () ++ + str "in the inductive type" ++ spc () ++ quote pi ++ str ":") ++ fnl () ++ msg -let explain_case_not_inductive ctx cj = - let ctx = make_all_name_different ctx in - let pc = pr_lconstr_env ctx cj.uj_val in - let pct = pr_lconstr_env ctx cj.uj_type in +let explain_case_not_inductive env cj = + let env = make_all_name_different env in + let pc = pr_lconstr_env env cj.uj_val in + let pct = pr_lconstr_env env cj.uj_type in match kind_of_term cj.uj_type with - | Evar _ -> - str "Cannot infer a type for this expression" + | Evar _ -> + str "Cannot infer a type for this expression." | _ -> - str "The term" ++ brk(1,1) ++ pc ++ spc () ++ - str "has type" ++ brk(1,1) ++ pct ++ spc () ++ - str "which is not a (co-)inductive type" - -let explain_number_branches ctx cj expn = - let ctx = make_all_name_different ctx in - let pc = pr_lconstr_env ctx cj.uj_val in - let pct = pr_lconstr_env ctx cj.uj_type in - str "Matching on term" ++ brk(1,1) ++ pc ++ spc () ++ + str "The term" ++ brk(1,1) ++ pc ++ spc () ++ + str "has type" ++ brk(1,1) ++ pct ++ spc () ++ + str "which is not a (co-)inductive type." + +let explain_number_branches env cj expn = + let env = make_all_name_different env in + let pc = pr_lconstr_env env cj.uj_val in + let pct = pr_lconstr_env env cj.uj_type in + str "Matching on term" ++ brk(1,1) ++ pc ++ spc () ++ str "of type" ++ brk(1,1) ++ pct ++ spc () ++ - str "expects " ++ int expn ++ str " branches" + str "expects " ++ int expn ++ str " branches." -let ordinal n = - let s = match n mod 10 with 1 -> "st" | 2 -> "nd" | 3 -> "rd" | _ -> "th" in - string_of_int n ^ s - -let explain_ill_formed_branch ctx c i actty expty = - let ctx = make_all_name_different ctx in - let pc = pr_lconstr_env ctx c in - let pa = pr_lconstr_env ctx actty in - let pe = pr_lconstr_env ctx expty in +let explain_ill_formed_branch env c i actty expty = + let env = make_all_name_different env in + let pc = pr_lconstr_env env c in + let pa = pr_lconstr_env env actty in + let pe = pr_lconstr_env env expty in str "In pattern-matching on term" ++ brk(1,1) ++ pc ++ - spc () ++ str "the " ++ str (ordinal (i+1)) ++ str " branch has type" ++ - brk(1,1) ++ pa ++ spc () ++ - str "which should be" ++ brk(1,1) ++ pe - -let explain_generalization ctx (name,var) j = - let pe = pr_ne_context_of (str "In environment") ctx in - let pv = pr_ltype_env ctx var in - let (pc,pt) = pr_ljudge_env (push_rel_assum (name,var) ctx) j in - str"Illegal generalization: " ++ pe ++ - str"Cannot generalize" ++ brk(1,1) ++ pv ++ spc () ++ - str"over" ++ brk(1,1) ++ pc ++ str"," ++ spc () ++ - str"it has type" ++ spc () ++ pt ++ - spc () ++ str"which should be Set, Prop or Type." - -let explain_actual_type ctx j pt = - let pe = pr_ne_context_of (str "In environment") ctx in - let (pc,pct) = pr_ljudge_env ctx j in - let pt = pr_lconstr_env ctx pt in + spc () ++ str "the " ++ nth (i+1) ++ str " branch has type" ++ + brk(1,1) ++ pa ++ spc () ++ + str "which should be" ++ brk(1,1) ++ pe ++ str "." + +let explain_generalization env (name,var) j = + let pe = pr_ne_context_of (str "In environment") env in + let pv = pr_ltype_env env var in + let (pc,pt) = pr_ljudge_env (push_rel_assum (name,var) env) j in + pe ++ str "Cannot generalize" ++ brk(1,1) ++ pv ++ spc () ++ + str "over" ++ brk(1,1) ++ pc ++ str "," ++ spc () ++ + str "it has type" ++ spc () ++ pt ++ + spc () ++ str "which should be Set, Prop or Type." + +let explain_actual_type env j pt = + let pe = pr_ne_context_of (str "In environment") env in + let (pc,pct) = pr_ljudge_env env j in + let pt = pr_lconstr_env env pt in pe ++ - str "The term" ++ brk(1,1) ++ pc ++ spc () ++ - str "has type" ++ brk(1,1) ++ pct ++ brk(1,1) ++ - str "while it is expected to have type" ++ brk(1,1) ++ pt - -let explain_cant_apply_bad_type ctx (n,exptyp,actualtyp) rator randl = - let ctx = make_all_name_different ctx in - let randl = Array.to_list randl in -(* let pe = pr_ne_context_of (str"in environment") ctx in*) - let pr,prt = pr_ljudge_env ctx rator in - let term_string1,term_string2 = - if List.length randl > 1 then - str "terms", (str"The "++nth n++str" term") - else - str "term", str "This term" in - let appl = prlist_with_sep pr_fnl + str "The term" ++ brk(1,1) ++ pc ++ spc () ++ + str "has type" ++ brk(1,1) ++ pct ++ brk(1,1) ++ + str "while it is expected to have type" ++ brk(1,1) ++ pt ++ str "." + +let explain_cant_apply_bad_type env (n,exptyp,actualtyp) rator randl = + let env = make_all_name_different env in + let nargs = Array.length randl in +(* let pe = pr_ne_context_of (str "in environment") env in*) + let pr,prt = pr_ljudge_env env rator in + let term_string1 = str (plural nargs "term") in + let term_string2 = + if nargs>1 then str "The " ++ nth n ++ str " term" else str "This term" in + let appl = prvect_with_sep pr_fnl (fun c -> - let pc,pct = pr_ljudge_env ctx c in - hov 2 (pc ++ spc () ++ str": " ++ pct)) randl + let pc,pct = pr_ljudge_env env c in + hov 2 (pc ++ spc () ++ str ": " ++ pct)) randl in - str"Illegal application (Type Error): " ++ (* pe ++ *) fnl () ++ - str"The term" ++ brk(1,1) ++ pr ++ spc () ++ - str"of type" ++ brk(1,1) ++ prt ++ spc () ++ - str"cannot be applied to the " ++ term_string1 ++ fnl () ++ - str" " ++ v 0 appl ++ fnl () ++ term_string2 ++ str" has type" ++ - brk(1,1) ++ pr_lconstr_env ctx actualtyp ++ spc () ++ - str"which should be coercible to" ++ brk(1,1) ++ pr_lconstr_env ctx exptyp - -let explain_cant_apply_not_functional ctx rator randl = - let ctx = make_all_name_different ctx in - let randl = Array.to_list randl in -(* let pe = pr_ne_context_of (str"in environment") ctx in*) - let pr = pr_lconstr_env ctx rator.uj_val in - let prt = pr_lconstr_env ctx rator.uj_type in - let term_string = if List.length randl > 1 then "terms" else "term" in - let appl = prlist_with_sep pr_fnl + str "Illegal application (Type Error): " ++ (* pe ++ *) fnl () ++ + str "The term" ++ brk(1,1) ++ pr ++ spc () ++ + str "of type" ++ brk(1,1) ++ prt ++ spc () ++ + str "cannot be applied to the " ++ term_string1 ++ fnl () ++ + str " " ++ v 0 appl ++ fnl () ++ term_string2 ++ str " has type" ++ + brk(1,1) ++ pr_lconstr_env env actualtyp ++ spc () ++ + str "which should be coercible to" ++ brk(1,1) ++ + pr_lconstr_env env exptyp ++ str "." + +let explain_cant_apply_not_functional env rator randl = + let env = make_all_name_different env in + let nargs = Array.length randl in +(* let pe = pr_ne_context_of (str "in environment") env in*) + let pr = pr_lconstr_env env rator.uj_val in + let prt = pr_lconstr_env env rator.uj_type in + let appl = prvect_with_sep pr_fnl (fun c -> - let pc = pr_lconstr_env ctx c.uj_val in - let pct = pr_lconstr_env ctx c.uj_type in - hov 2 (pc ++ spc () ++ str": " ++ pct)) randl + let pc = pr_lconstr_env env c.uj_val in + let pct = pr_lconstr_env env c.uj_type in + hov 2 (pc ++ spc () ++ str ": " ++ pct)) randl in - str"Illegal application (Non-functional construction): " ++ + str "Illegal application (Non-functional construction): " ++ (* pe ++ *) fnl () ++ - str"The expression" ++ brk(1,1) ++ pr ++ spc () ++ - str"of type" ++ brk(1,1) ++ prt ++ spc () ++ - str("cannot be applied to the "^term_string) ++ fnl () ++ - str" " ++ v 0 appl - -let explain_unexpected_type ctx actual_type expected_type = - let pract = pr_lconstr_env ctx actual_type in - let prexp = pr_lconstr_env ctx expected_type in - str"This type is" ++ spc () ++ pract ++ spc () ++ + str "The expression" ++ brk(1,1) ++ pr ++ spc () ++ + str "of type" ++ brk(1,1) ++ prt ++ spc () ++ + str "cannot be applied to the " ++ str (plural nargs "term") ++ fnl () ++ + str " " ++ v 0 appl + +let explain_unexpected_type env actual_type expected_type = + let pract = pr_lconstr_env env actual_type in + let prexp = pr_lconstr_env env expected_type in + str "This type is" ++ spc () ++ pract ++ spc () ++ str "but is expected to be" ++ - spc () ++ prexp + spc () ++ prexp ++ str "." -let explain_not_product ctx c = - let pr = pr_lconstr_env ctx c in - str"The type of this term is a product," ++ spc () ++ - str"while it is expected to be" ++ - if is_Type c then str " a sort" else (brk(1,1) ++ pr) +let explain_not_product env c = + let pr = pr_lconstr_env env c in + str "The type of this term is a product" ++ spc () ++ + str "while it is expected to be" ++ + (if is_Type c then str " a sort" else (brk(1,1) ++ pr)) ++ str "." (* TODO: use the names *) (* (co)fixpoints *) -let explain_ill_formed_rec_body ctx err names i = +let explain_ill_formed_rec_body env err names i fixenv vdefj = let prt_name i = match names.(i) with Name id -> str "Recursive definition of " ++ pr_id id - | Anonymous -> str"The " ++ nth i ++ str" definition" in + | Anonymous -> str "The " ++ nth i ++ str " definition" in let st = match err with @@ -238,277 +226,359 @@ let explain_ill_formed_rec_body ctx err names i = | NotEnoughAbstractionInFixBody -> str "Not enough abstractions in the definition" | RecursionNotOnInductiveType c -> - str "Recursive definition on" ++ spc() ++ pr_lconstr_env ctx c ++ spc() ++ + str "Recursive definition on" ++ spc () ++ pr_lconstr_env env c ++ spc () ++ str "which should be an inductive type" | RecursionOnIllegalTerm(j,arg,le,lt) -> let called = match names.(j) with Name id -> pr_id id - | Anonymous -> str"the " ++ nth i ++ str" definition" in + | Anonymous -> str "the " ++ nth i ++ str " definition" in let vars = match (lt,le) with - ([],[]) -> mt() + ([],[]) -> assert false | ([],[x]) -> - str "a subterm of " ++ pr_db ctx x + str "a subterm of " ++ pr_db env x | ([],_) -> str "a subterm of the following variables: " ++ - prlist_with_sep pr_spc (pr_db ctx) le - | ([x],_) -> pr_db ctx x + prlist_with_sep pr_spc (pr_db env) le + | ([x],_) -> pr_db env x | _ -> str "one of the following variables: " ++ - prlist_with_sep pr_spc (pr_db ctx) lt in - str "Recursive call to " ++ called ++ spc() ++ - str "has principal argument equal to" ++ spc() ++ - pr_lconstr_env ctx arg ++ fnl() ++ str "instead of " ++ vars + prlist_with_sep pr_spc (pr_db env) lt in + str "Recursive call to " ++ called ++ spc () ++ + str "has principal argument equal to" ++ spc () ++ + pr_lconstr_env env arg ++ fnl () ++ str "instead of " ++ vars | NotEnoughArgumentsForFixCall j -> let called = match names.(j) with Name id -> pr_id id - | Anonymous -> str"the " ++ nth i ++ str" definition" in - str "Recursive call to " ++ called ++ str " had not enough arguments" + | Anonymous -> str "the " ++ nth i ++ str " definition" in + str "Recursive call to " ++ called ++ str " has not enough arguments" (* CoFixpoint guard errors *) | CodomainNotInductiveType c -> - str "the codomain is" ++ spc () ++ pr_lconstr_env ctx c ++ spc () ++ + str "The codomain is" ++ spc () ++ pr_lconstr_env env c ++ spc () ++ str "which should be a coinductive type" | NestedRecursiveOccurrences -> - str "nested recursive occurrences" + str "Nested recursive occurrences" | UnguardedRecursiveCall c -> - str "unguarded recursive call in" ++ spc() ++ pr_lconstr_env ctx c + str "Unguarded recursive call in" ++ spc () ++ pr_lconstr_env env c | RecCallInTypeOfAbstraction c -> - str "recursive call forbidden in the domain of an abstraction:" ++ - spc() ++ pr_lconstr_env ctx c + str "Recursive call forbidden in the domain of an abstraction:" ++ + spc () ++ pr_lconstr_env env c | RecCallInNonRecArgOfConstructor c -> - str "recursive call on a non-recursive argument of constructor" ++ - spc() ++ pr_lconstr_env ctx c + str "Recursive call on a non-recursive argument of constructor" ++ + spc () ++ pr_lconstr_env env c | RecCallInTypeOfDef c -> - str "recursive call forbidden in the type of a recursive definition" ++ - spc() ++ pr_lconstr_env ctx c + str "Recursive call forbidden in the type of a recursive definition" ++ + spc () ++ pr_lconstr_env env c | RecCallInCaseFun c -> - str "recursive call in a branch of" ++ spc() ++ pr_lconstr_env ctx c - | RecCallInCaseArg c -> - str "recursive call in the argument of cases in" ++ spc() ++ - pr_lconstr_env ctx c + str "Recursive call in a branch of" ++ spc () ++ pr_lconstr_env env c + | RecCallInCaseArg c -> + str "Recursive call in the argument of cases in" ++ spc () ++ + pr_lconstr_env env c | RecCallInCasePred c -> - str "recursive call in the type of cases in" ++ spc() ++ - pr_lconstr_env ctx c + str "Recursive call in the type of cases in" ++ spc () ++ + pr_lconstr_env env c | NotGuardedForm c -> - str "sub-expression " ++ pr_lconstr_env ctx c ++ spc() ++ - str "not in guarded form" ++ spc()++ - str"(should be a constructor, an abstraction, a match, a cofix or a recursive call)" + str "Sub-expression " ++ pr_lconstr_env env c ++ + strbrk " not in guarded form (should be a constructor," ++ + strbrk " an abstraction, a match, a cofix or a recursive call)" in - prt_name i ++ str" is ill-formed." ++ fnl() ++ - pr_ne_context_of (str "In environment") ctx ++ - st - -let explain_ill_typed_rec_body ctx i names vdefj vargs = - let ctx = make_all_name_different ctx in - let pvd,pvdt = pr_ljudge_env ctx (vdefj.(i)) in - let pv = pr_lconstr_env ctx vargs.(i) in - str"The " ++ - (if Array.length vdefj = 1 then mt () else int (i+1) ++ str "-th") ++ - str"recursive definition" ++ spc () ++ pvd ++ spc () ++ - str "has type" ++ spc () ++ pvdt ++spc () ++ - str "it should be" ++ spc () ++ pv -(* -let explain_not_inductive ctx c = - let ctx = make_all_name_different ctx in - let pc = pr_lconstr_env ctx c in - str"The term" ++ brk(1,1) ++ pc ++ spc () ++ - str "is not an inductive definition" -*) -let explain_cant_find_case_type ctx c = - let ctx = make_all_name_different ctx in - let pe = pr_lconstr_env ctx c in - hov 3 (str "Cannot infer type of pattern-matching on" ++ ws 1 ++ pe) - -let explain_occur_check ctx ev rhs = - let ctx = make_all_name_different ctx in + prt_name i ++ str " is ill-formed." ++ fnl () ++ + pr_ne_context_of (str "In environment") env ++ + st ++ str "." + +let explain_ill_typed_rec_body env i names vdefj vargs = + let env = make_all_name_different env in + let pvd,pvdt = pr_ljudge_env env (vdefj.(i)) in + let pv = pr_lconstr_env env vargs.(i) in + str "The " ++ + (if Array.length vdefj = 1 then mt () else nth (i+1) ++ spc ()) ++ + str "recursive definition" ++ spc () ++ pvd ++ spc () ++ + str "has type" ++ spc () ++ pvdt ++ spc () ++ + str "while it should be" ++ spc () ++ pv ++ str "." + +let explain_cant_find_case_type env c = + let env = make_all_name_different env in + let pe = pr_lconstr_env env c in + str "Cannot infer type of pattern-matching on" ++ ws 1 ++ pe ++ str "." + +let explain_occur_check env ev rhs = + let env = make_all_name_different env in let id = Evd.string_of_existential ev in - let pt = pr_lconstr_env ctx rhs in - str"Occur check failed: tried to define " ++ str id ++ - str" with term" ++ brk(1,1) ++ pt + let pt = pr_lconstr_env env rhs in + str "Cannot define " ++ str id ++ str " with term" ++ brk(1,1) ++ + pt ++ spc () ++ str "that would depend on itself." let explain_hole_kind env = function - | QuestionMark _ -> str "a term for this placeholder" + | QuestionMark _ -> str "this placeholder" | CasesType -> str "the type of this pattern-matching problem" | BinderType (Name id) -> - str "a type for " ++ Nameops.pr_id id + str "the type of " ++ Nameops.pr_id id | BinderType Anonymous -> - str "a type for this anonymous binder" + str "the type of this anonymous binder" | ImplicitArg (c,(n,ido)) -> - let id = out_some ido in - str "an instance for the implicit parameter " ++ + let id = Option.get ido in + str "the implicit parameter " ++ pr_id id ++ spc () ++ str "of" ++ spc () ++ Nametab.pr_global_env Idset.empty c | InternalHole -> - str "a term for an internal placeholder" + str "an internal placeholder" | TomatchTypeParameter (tyi,n) -> - str "the " ++ pr_ord n ++ + str "the " ++ nth n ++ str " argument of the inductive type (" ++ pr_inductive env tyi ++ str ") of this term" + | GoalEvar -> + str "an existential variable" + | ImpossibleCase -> + str "the type of an impossible pattern-matching clause" -let explain_not_clean ctx ev t k = - let ctx = make_all_name_different ctx in +let explain_not_clean env ev t k = + let env = make_all_name_different env in let id = Evd.string_of_existential ev in - let var = pr_lconstr_env ctx t in - str"Tried to define " ++ explain_hole_kind ctx k ++ - str" (" ++ str id ++ str ")" ++ spc() ++ - str"with a term using variable " ++ var ++ spc () ++ - str"which is not in its scope." - -let explain_unsolvable_implicit env k = - str "Cannot infer " ++ explain_hole_kind env k - - -let explain_var_not_found ctx id = - str "The variable" ++ spc () ++ str (string_of_id id) ++ - spc () ++ str "was not found" ++ - spc () ++ str "in the current" ++ spc () ++ str "environment" - -let explain_wrong_case_info ctx ind ci = - let pi = pr_lconstr (mkInd ind) in + let var = pr_lconstr_env env t in + str "Tried to instantiate " ++ explain_hole_kind env k ++ + str " (" ++ str id ++ str ")" ++ spc () ++ + str "with a term using variable " ++ var ++ spc () ++ + str "which is not in its scope." + +let explain_unsolvability = function + | None -> mt() + | Some (SeveralInstancesFound n) -> + strbrk " (several distinct possible instances found)" + +let pr_ne_context_of header footer env = + if Environ.rel_context env = empty_rel_context & + Environ.named_context env = empty_named_context then footer + else pr_ne_context_of header env + +let explain_typeclass_resolution env evi k = + match k with + InternalHole | ImplicitArg _ -> + (match Typeclasses.class_of_constr evi.evar_concl with + | Some c -> + let env = Evd.evar_env evi in + fnl () ++ str "Could not find an instance for " ++ + pr_lconstr_env env evi.evar_concl ++ + pr_ne_context_of (str " in environment:"++ fnl ()) (str ".") env + | None -> mt()) + | _ -> mt() + +let explain_unsolvable_implicit env evi k explain = + str "Cannot infer " ++ explain_hole_kind env k ++ + explain_unsolvability explain ++ str "." ++ + explain_typeclass_resolution env evi k + +let explain_var_not_found env id = + str "The variable" ++ spc () ++ pr_id id ++ + spc () ++ str "was not found" ++ + spc () ++ str "in the current" ++ spc () ++ str "environment" ++ str "." + +let explain_wrong_case_info env ind ci = + let pi = pr_inductive (Global.env()) ind in if ci.ci_ind = ind then - str"Pattern-matching expression on an object of inductive" ++ spc () ++ pi ++ - spc () ++ str"has invalid information" + str "Pattern-matching expression on an object of inductive type" ++ + spc () ++ pi ++ spc () ++ str "has invalid information." else - let pc = pr_lconstr (mkInd ci.ci_ind) in - str"A term of inductive type" ++ spc () ++ pi ++ spc () ++ - str"was given to a pattern-matching expression on the inductive type" ++ - spc () ++ pc - - -let explain_cannot_unify ctx m n = - let pm = pr_lconstr_env ctx m in - let pn = pr_lconstr_env ctx n in - str"Impossible to unify" ++ brk(1,1) ++ pm ++ spc () ++ - str"with" ++ brk(1,1) ++ pn + let pc = pr_inductive (Global.env()) ci.ci_ind in + str "A term of inductive type" ++ spc () ++ pi ++ spc () ++ + str "was given to a pattern-matching expression on the inductive type" ++ + spc () ++ pc ++ str "." + +let explain_cannot_unify env m n = + let pm = pr_lconstr_env env m in + let pn = pr_lconstr_env env n in + str "Impossible to unify" ++ brk(1,1) ++ pm ++ spc () ++ + str "with" ++ brk(1,1) ++ pn let explain_cannot_unify_local env m n subn = - let pm = pr_lconstr_env env m in + let pm = pr_lconstr_env env m in let pn = pr_lconstr_env env n in let psubn = pr_lconstr_env env subn in - str"Impossible to unify" ++ brk(1,1) ++ pm ++ spc () ++ - str"with" ++ brk(1,1) ++ pn ++ spc() ++ str"as" ++ brk(1,1) ++ - psubn ++ str" contains local variables" - -let explain_refiner_cannot_generalize ty = - str "Cannot find a well-typed generalisation of the goal with type : " ++ - pr_lconstr ty - -let explain_no_occurrence_found c = - str "Found no subterm matching " ++ pr_lconstr c ++ str " in the current goal" - -let explain_cannot_unify_binding_type ctx m n = - let pm = pr_lconstr_env ctx m in - let pn = pr_lconstr_env ctx n in - str "This binding has type" ++ brk(1,1) ++ pm ++ spc () ++ + str "Impossible to unify" ++ brk(1,1) ++ pm ++ spc () ++ + str "with" ++ brk(1,1) ++ pn ++ spc () ++ str "as" ++ brk(1,1) ++ + psubn ++ str " contains local variables" + +let explain_refiner_cannot_generalize env ty = + str "Cannot find a well-typed generalisation of the goal with type: " ++ + pr_lconstr_env env ty + +let explain_no_occurrence_found env c id = + str "Found no subterm matching " ++ pr_lconstr_env env c ++ + str " in " ++ + (match id with + | Some id -> pr_id id + | None -> str"the current goal") + +let explain_cannot_unify_binding_type env m n = + let pm = pr_lconstr_env env m in + let pn = pr_lconstr_env env n in + str "This binding has type" ++ brk(1,1) ++ pm ++ spc () ++ str "which should be unifiable with" ++ brk(1,1) ++ pn -let explain_type_error ctx err = - let ctx = make_all_name_different ctx in +let explain_cannot_find_well_typed_abstraction env p l = + let la,lc = list_chop (List.length l - 1) l in + str "Abstracting over the " ++ + str (plural (List.length l) "term") ++ spc () ++ + hov 0 (prlist_with_sep pr_coma (pr_lconstr_env env) la ++ + (if la<>[] then str " and" ++ spc () else mt()) ++ + pr_lconstr_env env (List.hd lc)) ++ spc () ++ + str "leads to a term" ++ spc () ++ pr_lconstr_env env p ++ spc () ++ + str "which is ill-typed" + +let explain_type_error env err = + let env = make_all_name_different env in match err with - | UnboundRel n -> - explain_unbound_rel ctx n - | UnboundVar v -> - explain_unbound_var ctx v - | NotAType j -> - explain_not_type ctx j - | BadAssumption c -> - explain_bad_assumption ctx c - | ReferenceVariables id -> + | UnboundRel n -> + explain_unbound_rel env n + | UnboundVar v -> + explain_unbound_var env v + | NotAType j -> + explain_not_type env j + | BadAssumption c -> + explain_bad_assumption env c + | ReferenceVariables id -> explain_reference_variables id | ElimArity (ind, aritylst, c, pj, okinds) -> - explain_elim_arity ctx ind aritylst c pj okinds - | CaseNotInductive cj -> - explain_case_not_inductive ctx cj - | NumberBranches (cj, n) -> - explain_number_branches ctx cj n - | IllFormedBranch (c, i, actty, expty) -> - explain_ill_formed_branch ctx c i actty expty + explain_elim_arity env ind aritylst c pj okinds + | CaseNotInductive cj -> + explain_case_not_inductive env cj + | NumberBranches (cj, n) -> + explain_number_branches env cj n + | IllFormedBranch (c, i, actty, expty) -> + explain_ill_formed_branch env c i actty expty | Generalization (nvar, c) -> - explain_generalization ctx nvar c - | ActualType (j, pt) -> - explain_actual_type ctx j pt + explain_generalization env nvar c + | ActualType (j, pt) -> + explain_actual_type env j pt | CantApplyBadType (t, rator, randl) -> - explain_cant_apply_bad_type ctx t rator randl + explain_cant_apply_bad_type env t rator randl | CantApplyNonFunctional (rator, randl) -> - explain_cant_apply_not_functional ctx rator randl - | IllFormedRecBody (err, lna, i) -> - explain_ill_formed_rec_body ctx err lna i - | IllTypedRecBody (i, lna, vdefj, vargs) -> - explain_ill_typed_rec_body ctx i lna vdefj vargs + explain_cant_apply_not_functional env rator randl + | IllFormedRecBody (err, lna, i, fixenv, vdefj) -> + explain_ill_formed_rec_body env err lna i fixenv vdefj + | IllTypedRecBody (i, lna, vdefj, vargs) -> + explain_ill_typed_rec_body env i lna vdefj vargs | WrongCaseInfo (ind,ci) -> - explain_wrong_case_info ctx ind ci -(* - | NotInductive c -> - explain_not_inductive ctx c -*) -let explain_pretype_error ctx err = - let ctx = make_all_name_different ctx in - match err with - | CantFindCaseType c -> - explain_cant_find_case_type ctx c - | OccurCheck (n,c) -> - explain_occur_check ctx n c - | NotClean (n,c,k) -> - explain_not_clean ctx n c k - | UnsolvableImplicit k -> - explain_unsolvable_implicit ctx k - | VarNotFound id -> - explain_var_not_found ctx id - | UnexpectedType (actual,expected) -> - explain_unexpected_type ctx actual expected - | NotProduct c -> - explain_not_product ctx c - | CannotUnify (m,n) -> explain_cannot_unify ctx m n - | CannotUnifyLocal (e,m,n,sn) -> explain_cannot_unify_local e m n sn - | CannotGeneralize ty -> explain_refiner_cannot_generalize ty - | NoOccurrenceFound c -> explain_no_occurrence_found c - | CannotUnifyBindingType (m,n) -> explain_cannot_unify_binding_type ctx m n + explain_wrong_case_info env ind ci +let explain_pretype_error env err = + let env = make_all_name_different env in + match err with + | CantFindCaseType c -> explain_cant_find_case_type env c + | OccurCheck (n,c) -> explain_occur_check env n c + | NotClean (n,c,k) -> explain_not_clean env n c k + | UnsolvableImplicit (evi,k,exp) -> explain_unsolvable_implicit env evi k exp + | VarNotFound id -> explain_var_not_found env id + | UnexpectedType (actual,expect) -> explain_unexpected_type env actual expect + | NotProduct c -> explain_not_product env c + | CannotUnify (m,n) -> explain_cannot_unify env m n + | CannotUnifyLocal (m,n,sn) -> explain_cannot_unify_local env m n sn + | CannotGeneralize ty -> explain_refiner_cannot_generalize env ty + | NoOccurrenceFound (c, id) -> explain_no_occurrence_found env c id + | CannotUnifyBindingType (m,n) -> explain_cannot_unify_binding_type env m n + | CannotFindWellTypedAbstraction (p,l) -> + explain_cannot_find_well_typed_abstraction env p l + + +(* Typeclass errors *) + +let explain_not_a_class env c = + pr_constr_env env c ++ str" is not a declared type class" + +let explain_unbound_method env cid id = + str "Unbound method name " ++ Nameops.pr_id (snd id) ++ spc () ++ str"of class" ++ spc () ++ + pr_global cid + +let pr_constr_exprs exprs = + hv 0 (List.fold_right + (fun d pps -> ws 2 ++ Ppconstr.pr_constr_expr d ++ pps) + exprs (mt ())) + +let explain_no_instance env (_,id) l = + str "No instance found for class " ++ Nameops.pr_id id ++ spc () ++ + str "applied to arguments" ++ spc () ++ + prlist_with_sep pr_spc (pr_lconstr_env env) l + +let pr_constraints env evm = + let l = Evd.to_list evm in + let (ev, evi) = List.hd l in + if List.for_all (fun (ev', evi') -> + eq_named_context_val evi.evar_hyps evi'.evar_hyps) l + then + let pe = pr_ne_context_of (str "In environment:") (mt ()) + (reset_with_named_context evi.evar_hyps env) in + pe ++ fnl () ++ + prlist_with_sep (fun () -> fnl ()) + (fun (ev, evi) -> str(string_of_existential ev)++ str " == " ++ pr_constr evi.evar_concl) l + else + pr_evar_map evm + +let explain_unsatisfiable_constraints env evd constr = + let evm = Evd.evars_of evd in + match constr with + | None -> + str"Unable to satisfy the following typeclass constraints:" ++ fnl() ++ + pr_constraints env evm + | Some (evi, k) -> + explain_unsolvable_implicit env evi k None ++ fnl () ++ + if List.length (Evd.to_list evm) > 1 then + str"With the following meta variables:" ++ + fnl() ++ Evd.pr_evar_map evm + else mt () + +let explain_mismatched_contexts env c i j = + str"Mismatched contexts while declaring instance: " ++ brk (1,1) ++ + hov 1 (str"Expected:" ++ brk (1, 1) ++ pr_named_context env j) ++ fnl () ++ brk (1,1) ++ + hov 1 (str"Found:" ++ brk (1, 1) ++ pr_constr_exprs i) + +let explain_typeclass_error env err = + match err with + | NotAClass c -> explain_not_a_class env c + | UnboundMethod (cid, id) -> explain_unbound_method env cid id + | NoInstance (id, l) -> explain_no_instance env id l + | UnsatisfiableConstraints (evd, c) -> explain_unsatisfiable_constraints env evd c + | MismatchedContextInstance (c, i, j) -> explain_mismatched_contexts env c i j + (* Refiner errors *) let explain_refiner_bad_type arg ty conclty = - str"refiner was given an argument" ++ brk(1,1) ++ + str "Refiner was given an argument" ++ brk(1,1) ++ pr_lconstr arg ++ spc () ++ - str"of type" ++ brk(1,1) ++ pr_lconstr ty ++ spc () ++ - str"instead of" ++ brk(1,1) ++ pr_lconstr conclty + str "of type" ++ brk(1,1) ++ pr_lconstr ty ++ spc () ++ + str "instead of" ++ brk(1,1) ++ pr_lconstr conclty -let explain_refiner_occur_meta t = - str"cannot refine with term" ++ brk(1,1) ++ pr_lconstr t ++ - spc () ++ str"because there are metavariables, and it is" ++ - spc () ++ str"neither an application nor a Case" - -let explain_refiner_occur_meta_goal t = - str"generated subgoal" ++ brk(1,1) ++ pr_lconstr t ++ - spc () ++ str"has metavariables in it" +let explain_refiner_unresolved_bindings l = + let l = map_succeed (function Name id -> id | _ -> failwith "") l in + str "Unable to find an instance for the " ++ + str (plural (List.length l) "variable") ++ spc () ++ + prlist_with_sep pr_coma pr_id l let explain_refiner_cannot_apply t harg = - str"in refiner, a term of type " ++ brk(1,1) ++ - pr_lconstr t ++ spc () ++ str"could not be applied to" ++ brk(1,1) ++ + str "In refiner, a term of type " ++ brk(1,1) ++ + pr_lconstr t ++ spc () ++ str "could not be applied to" ++ brk(1,1) ++ pr_lconstr harg let explain_refiner_not_well_typed c = - str"The term " ++ pr_lconstr c ++ str" is not well-typed" + str "The term " ++ pr_lconstr c ++ str " is not well-typed" let explain_intro_needs_product () = - str "Introduction tactics needs products" + str "Introduction tactics needs products." let explain_does_not_occur_in c hyp = - str "The term" ++ spc () ++ pr_lconstr c ++ spc () ++ str "does not occur in" ++ - spc () ++ pr_id hyp + str "The term" ++ spc () ++ pr_lconstr c ++ spc () ++ + str "does not occur in" ++ spc () ++ pr_id hyp ++ str "." let explain_non_linear_proof c = - str "cannot refine with term" ++ brk(1,1) ++ pr_lconstr c ++ - spc () ++ str"because a metavariable has several occurrences" + str "Cannot refine with term" ++ brk(1,1) ++ pr_lconstr c ++ + spc () ++ str "because a metavariable has several occurrences." let explain_refiner_error = function | BadType (arg,ty,conclty) -> explain_refiner_bad_type arg ty conclty - | OccurMeta t -> explain_refiner_occur_meta t - | OccurMetaGoal t -> explain_refiner_occur_meta_goal t + | UnresolvedBindings t -> explain_refiner_unresolved_bindings t | CannotApply (t,harg) -> explain_refiner_cannot_apply t harg | NotWellTyped c -> explain_refiner_not_well_typed c | IntroNeedsProduct -> explain_intro_needs_product () @@ -521,48 +591,52 @@ let error_non_strictly_positive env c v = let pc = pr_lconstr_env env c in let pv = pr_lconstr_env env v in str "Non strictly positive occurrence of " ++ pv ++ str " in" ++ - brk(1,1) ++ pc + brk(1,1) ++ pc ++ str "." let error_ill_formed_inductive env c v = let pc = pr_lconstr_env env c in let pv = pr_lconstr_env env v in str "Not enough arguments applied to the " ++ pv ++ - str " in" ++ brk(1,1) ++ pc + str " in" ++ brk(1,1) ++ pc ++ str "." -let error_ill_formed_constructor env c v = - let pc = pr_lconstr_env env c in +let error_ill_formed_constructor env id c v nparams nargs = let pv = pr_lconstr_env env v in - str "The conclusion of" ++ brk(1,1) ++ pc ++ brk(1,1) ++ - str "is not valid;" ++ brk(1,1) ++ str "it must be built from " ++ pv - -let str_of_nth n = - (string_of_int n)^ - (match n mod 10 with - | 1 -> "st" - | 2 -> "nd" - | 3 -> "rd" - | _ -> "th") + let atomic = (nb_prod c = 0) in + str "The type of constructor" ++ brk(1,1) ++ pr_id id ++ brk(1,1) ++ + str "is not valid;" ++ brk(1,1) ++ + strbrk (if atomic then "it must be " else "its conclusion must be ") ++ + pv ++ + (* warning: because of implicit arguments it is difficult to say which + parameters must be explicitly given *) + (if nparams<>0 then + strbrk " applied to its " ++ str (plural nparams "parameter") + else + mt()) ++ + (if nargs<>0 then + str (if nparams<>0 then " and" else " applied") ++ + strbrk " to some " ++ str (plural nargs "argument") + else + mt()) ++ str "." let error_bad_ind_parameters env c n v1 v2 = let pc = pr_lconstr_env_at_top env c in let pv1 = pr_lconstr_env env v1 in let pv2 = pr_lconstr_env env v2 in - str ("The "^(str_of_nth n)^" argument of ") ++ pv2 ++ brk(1,1) ++ - str "must be " ++ pv1 ++ str " in" ++ brk(1,1) ++ pc + str "The " ++ nth n ++ str " argument of " ++ pv2 ++ brk(1,1) ++ + str "must be " ++ pv1 ++ str " in" ++ brk(1,1) ++ pc ++ str "." let error_same_names_types id = - str "The name" ++ spc () ++ pr_id id ++ spc () ++ - str "is used twice is the inductive types definition." + str "The name" ++ spc () ++ pr_id id ++ spc () ++ + str "is used more than once." -let error_same_names_constructors id cid = - str "The constructor name" ++ spc () ++ pr_id cid ++ spc () ++ - str "is used twice is the definition of type" ++ spc () ++ - pr_id id +let error_same_names_constructors id = + str "The constructor name" ++ spc () ++ pr_id id ++ spc () ++ + str "is used more than once." -let error_same_names_overlap idl = - str "The following names" ++ spc () ++ - str "are used both as type names and constructor names:" ++ spc () ++ - prlist_with_sep pr_coma pr_id idl +let error_same_names_overlap idl = + strbrk "The following names are used both as type names and constructor " ++ + str "names:" ++ spc () ++ + prlist_with_sep pr_coma pr_id idl ++ str "." let error_not_an_arity id = str "The type of" ++ spc () ++ pr_id id ++ spc () ++ str "is not an arity." @@ -571,29 +645,36 @@ let error_bad_entry () = str "Bad inductive definition." let error_not_allowed_case_analysis dep kind i = - str (if dep then "Dependent" else "Non Dependent") ++ + str (if dep then "Dependent" else "Non dependent") ++ str " case analysis on sort: " ++ pr_sort kind ++ fnl () ++ str "is not allowed for inductive definition: " ++ - pr_inductive (Global.env()) i + pr_inductive (Global.env()) i ++ str "." let error_bad_induction dep indid kind = str (if dep then "Dependent" else "Non dependent") ++ str " induction for type " ++ pr_id indid ++ str " and sort " ++ pr_sort kind ++ spc () ++ - str "is not allowed" + str "is not allowed." -let error_not_mutual_in_scheme () = - str "Induction schemes are concerned only with distinct mutually inductive types" +let error_not_mutual_in_scheme ind ind' = + if ind = ind' then + str "The inductive type " ++ pr_inductive (Global.env()) ind ++ + str "occurs twice." + else + str "The inductive types " ++ pr_inductive (Global.env()) ind ++ spc () ++ + str "and" ++ spc () ++ pr_inductive (Global.env()) ind' ++ spc () ++ + str "are not mutually defined." (* Inductive constructions errors *) let explain_inductive_error = function | NonPos (env,c,v) -> error_non_strictly_positive env c v | NotEnoughArgs (env,c,v) -> error_ill_formed_inductive env c v - | NotConstructor (env,c,v) -> error_ill_formed_constructor env c v + | NotConstructor (env,id,c,v,n,m) -> + error_ill_formed_constructor env id c v n m | NonPar (env,c,n,v1,v2) -> error_bad_ind_parameters env c n v1 v2 | SameNamesTypes id -> error_same_names_types id - | SameNamesConstructors (id,cid) -> error_same_names_constructors id cid + | SameNamesConstructors id -> error_same_names_constructors id | SameNamesOverlap idl -> error_same_names_overlap idl | NotAnArity id -> error_not_an_arity id | BadEntry -> error_bad_entry () @@ -604,54 +685,54 @@ let explain_recursion_scheme_error = function | NotAllowedCaseAnalysis (dep,k,i) -> error_not_allowed_case_analysis dep k i | BadInduction (dep,indid,kind) -> error_bad_induction dep indid kind - | NotMutualInScheme -> error_not_mutual_in_scheme () + | NotMutualInScheme (ind,ind')-> error_not_mutual_in_scheme ind ind' (* Pattern-matching errors *) -let explain_bad_pattern ctx cstr ty = - let ctx = make_all_name_different ctx in - let pt = pr_lconstr_env ctx ty in - let pc = pr_constructor ctx cstr in - str "Found the constructor " ++ pc ++ brk(1,1) ++ - str "while matching a term of type " ++ pt ++ brk(1,1) ++ - str "which is not an inductive type" - -let explain_bad_constructor ctx cstr ind = - let pi = pr_inductive ctx ind in -(* let pc = pr_constructor ctx cstr in*) - let pt = pr_inductive ctx (inductive_of_constructor cstr) in - str "Found a constructor of inductive type " ++ pt ++ brk(1,1) ++ - str "while a constructor of " ++ pi ++ brk(1,1) ++ - str "is expected" +let explain_bad_pattern env cstr ty = + let env = make_all_name_different env in + let pt = pr_lconstr_env env ty in + let pc = pr_constructor env cstr in + str "Found the constructor " ++ pc ++ brk(1,1) ++ + str "while matching a term of type " ++ pt ++ brk(1,1) ++ + str "which is not an inductive type." + +let explain_bad_constructor env cstr ind = + let pi = pr_inductive env ind in +(* let pc = pr_constructor env cstr in*) + let pt = pr_inductive env (inductive_of_constructor cstr) in + str "Found a constructor of inductive type " ++ pt ++ brk(1,1) ++ + str "while a constructor of " ++ pi ++ brk(1,1) ++ + str "is expected." let decline_string n s = if n = 0 then "no "^s else if n = 1 then "1 "^s else (string_of_int n^" "^s^"s") -let explain_wrong_numarg_constructor ctx cstr n = - str "The constructor " ++ pr_constructor ctx cstr ++ - str " expects " ++ str (decline_string n "argument") +let explain_wrong_numarg_constructor env cstr n = + str "The constructor " ++ pr_constructor env cstr ++ + str " expects " ++ str (decline_string n "argument") ++ str "." -let explain_wrong_numarg_inductive ctx ind n = - str "The inductive type " ++ pr_inductive ctx ind ++ - str " expects " ++ str (decline_string n "argument") +let explain_wrong_numarg_inductive env ind n = + str "The inductive type " ++ pr_inductive env ind ++ + str " expects " ++ str (decline_string n "argument") ++ str "." -let explain_wrong_predicate_arity ctx pred nondep_arity dep_arity= - let ctx = make_all_name_different ctx in - let pp = pr_lconstr_env ctx pred in +let explain_wrong_predicate_arity env pred nondep_arity dep_arity= + let env = make_all_name_different env in + let pp = pr_lconstr_env env pred in str "The elimination predicate " ++ spc () ++ pp ++ fnl () ++ - str "should be of arity" ++ spc () ++ - pr_lconstr_env ctx nondep_arity ++ spc () ++ - str "(for non dependent case) or" ++ - spc () ++ pr_lconstr_env ctx dep_arity ++ spc () ++ str "(for dependent case)." - -let explain_needs_inversion ctx x t = - let ctx = make_all_name_different ctx in - let px = pr_lconstr_env ctx x in - let pt = pr_lconstr_env ctx t in - str "Sorry, I need inversion to compile pattern matching of term " ++ - px ++ str " of type: " ++ pt + str "should be of arity" ++ spc () ++ + pr_lconstr_env env nondep_arity ++ spc () ++ + str "(for non dependent case) or" ++ + spc () ++ pr_lconstr_env env dep_arity ++ spc () ++ str "(for dependent case)." + +let explain_needs_inversion env x t = + let env = make_all_name_different env in + let px = pr_lconstr_env env x in + let pt = pr_lconstr_env env t in + str "Sorry, I need inversion to compile pattern matching on term " ++ + px ++ str " of type: " ++ pt ++ str "." let explain_unused_clause env pats = (* Without localisation @@ -659,24 +740,24 @@ let explain_unused_clause env pats = (str ("Unused clause with pattern"^s) ++ spc () ++ hov 0 (prlist_with_sep pr_spc pr_cases_pattern pats) ++ str ")") *) - str "This clause is redundant" + str "This clause is redundant." let explain_non_exhaustive env pats = - let s = if List.length pats > 1 then "s" else "" in - str ("Non exhaustive pattern-matching: no clause found for pattern"^s) ++ + str "Non exhaustive pattern-matching: no clause found for " ++ + str (plural (List.length pats) "pattern") ++ spc () ++ hov 0 (prlist_with_sep pr_spc pr_cases_pattern pats) -let explain_cannot_infer_predicate ctx typs = - let ctx = make_all_name_different ctx in +let explain_cannot_infer_predicate env typs = + let env = make_all_name_different env in let pr_branch (cstr,typ) = let cstr,_ = decompose_app cstr in - str "For " ++ pr_lconstr_env ctx cstr ++ str " : " ++ pr_lconstr_env ctx typ + str "For " ++ pr_lconstr_env env cstr ++ str ": " ++ pr_lconstr_env env typ in str "Unable to unify the types found in the branches:" ++ spc () ++ hov 0 (prlist_with_sep pr_fnl pr_branch (Array.to_list typs)) let explain_pattern_matching_error env = function - | BadPattern (c,t) -> + | BadPattern (c,t) -> explain_bad_pattern env c t | BadConstructor (c,ind) -> explain_bad_constructor env c ind @@ -697,6 +778,6 @@ let explain_pattern_matching_error env = function let explain_reduction_tactic_error = function | Tacred.InvalidAbstraction (env,c,(env',e)) -> - str "The abstracted term" ++ spc() ++ pr_lconstr_env_at_top env c ++ - spc() ++ str "is not well typed." ++ fnl () ++ + str "The abstracted term" ++ spc () ++ pr_lconstr_env_at_top env c ++ + spc () ++ str "is not well typed." ++ fnl () ++ explain_type_error env' e diff --git a/toplevel/himsg.mli b/toplevel/himsg.mli index 92fcafb7..1b9e38ce 100644 --- a/toplevel/himsg.mli +++ b/toplevel/himsg.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: himsg.mli 8003 2006-02-07 22:11:50Z herbelin $ i*) +(*i $Id: himsg.mli 10410 2007-12-31 13:11:55Z msozeau $ i*) (*i*) open Pp @@ -15,6 +15,7 @@ open Indtypes open Environ open Type_errors open Pretype_errors +open Typeclasses_errors open Indrec open Cases open Logic @@ -28,6 +29,8 @@ val explain_pretype_error : env -> pretype_error -> std_ppcmds val explain_inductive_error : inductive_error -> std_ppcmds +val explain_typeclass_error : env -> typeclass_error -> Pp.std_ppcmds + val explain_recursion_scheme_error : recursion_scheme_error -> std_ppcmds val explain_refiner_error : refiner_error -> std_ppcmds diff --git a/toplevel/ind_tables.ml b/toplevel/ind_tables.ml new file mode 100644 index 00000000..4b97f8b2 --- /dev/null +++ b/toplevel/ind_tables.ml @@ -0,0 +1,102 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* !eq_scheme_map); + Summary.unfreeze_function = (fun fs -> eq_scheme_map := fs); + Summary.init_function = (fun () -> eq_scheme_map := Indmap.empty); + Summary.survive_module = false; + Summary.survive_section = true} + +let find_eq_scheme ind = + Indmap.find ind !eq_scheme_map + +let check_eq_scheme ind = + Indmap.mem ind !eq_scheme_map + +let bl_map = ref Indmap.empty +let lb_map = ref Indmap.empty +let dec_map = ref Indmap.empty + + +let cache_bl (_,(ind,const)) = + bl_map := Indmap.add ind const (!bl_map) + +let cache_lb (_,(ind,const)) = + lb_map := Indmap.add ind const (!lb_map) + +let cache_dec (_,(ind,const)) = + dec_map := Indmap.add ind const (!dec_map) + +let export_bool_leib obj = + Some obj + +let export_leib_bool obj = + Some obj + +let export_dec_proof obj = + Some obj + + + +let _ = Summary.declare_summary "bl_proof" + { Summary.freeze_function = (fun () -> !bl_map); + Summary.unfreeze_function = (fun fs -> bl_map := fs); + Summary.init_function = (fun () -> bl_map := Indmap.empty); + Summary.survive_module = false; + Summary.survive_section = true} + +let find_bl_proof ind = + Indmap.find ind !bl_map + +let check_bl_proof ind = + Indmap.mem ind !bl_map + +let _ = Summary.declare_summary "lb_proof" + { Summary.freeze_function = (fun () -> !lb_map); + Summary.unfreeze_function = (fun fs -> lb_map := fs); + Summary.init_function = (fun () -> lb_map := Indmap.empty); + Summary.survive_module = false; + Summary.survive_section = true} + +let find_lb_proof ind = + Indmap.find ind !lb_map + +let check_lb_proof ind = + Indmap.mem ind !lb_map + +let _ = Summary.declare_summary "eq_dec_proof" + { Summary.freeze_function = (fun () -> !dec_map); + Summary.unfreeze_function = (fun fs -> dec_map := fs); + Summary.init_function = (fun () -> dec_map := Indmap.empty); + Summary.survive_module = false; + Summary.survive_section = true} + +let find_eq_dec_proof ind = + Indmap.find ind !dec_map + +let check_dec_proof ind = + Indmap.mem ind !dec_map + + + diff --git a/toplevel/ind_tables.mli b/toplevel/ind_tables.mli new file mode 100644 index 00000000..2edb294f --- /dev/null +++ b/toplevel/ind_tables.mli @@ -0,0 +1,40 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* unit +val export_scheme : (Indmap.key*constr) -> (Indmap.key*constr) option + +val find_eq_scheme : Indmap.key -> constr +val check_eq_scheme : Indmap.key -> bool + +val cache_bl: (object_name*(Indmap.key*constr)) -> unit +val cache_lb: (object_name*(Indmap.key*constr)) -> unit +val cache_dec : (object_name*(Indmap.key*constr)) -> unit + +val export_bool_leib : (Indmap.key*constr) -> (Indmap.key*constr) option +val export_leib_bool : (Indmap.key*constr) -> (Indmap.key*constr) option +val export_dec_proof : (Indmap.key*constr) -> (Indmap.key*constr) option + +val find_bl_proof : Indmap.key -> constr +val find_lb_proof : Indmap.key -> constr +val find_eq_dec_proof : Indmap.key -> constr + +val check_bl_proof: Indmap.key -> bool +val check_lb_proof: Indmap.key -> bool +val check_dec_proof: Indmap.key -> bool + + + + diff --git a/toplevel/metasyntax.ml b/toplevel/metasyntax.ml index 13f1f1da..fbeaea34 100644 --- a/toplevel/metasyntax.ml +++ b/toplevel/metasyntax.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: metasyntax.ml 10192 2007-10-08 00:33:39Z letouzey $ *) +(* $Id: metasyntax.ml 11121 2008-06-12 21:15:49Z herbelin $ *) open Pp open Util @@ -74,7 +74,7 @@ let (inTacticGrammar, outTacticGrammar) = let cons_production_parameter l = function | VTerm _ -> l - | VNonTerm (_,_,ido) -> option_cons ido l + | VNonTerm (_,_,ido) -> Option.List.cons ido l let rec tactic_notation_key = function | VTerm id :: _ -> id @@ -97,7 +97,7 @@ let add_tactic_notation (n,prods,e) = (**********************************************************************) (* Printing grammar entries *) -let print_grammar univ = function +let print_grammar = function | "constr" | "operconstr" | "binder_constr" -> msgnl (str "Entry constr is"); Gram.Entry.print Pcoq.Constr.constr; @@ -562,7 +562,7 @@ let is_not_small_constr = function let rec define_keywords_aux = function NonTerm(_,Some(_,e)) as n1 :: Term("IDENT",k) :: l when is_not_small_constr e -> - prerr_endline ("Defining '"^k^"' as keyword"); + message ("Defining '"^k^"' as keyword"); Lexer.add_token("",k); n1 :: Term("",k) :: define_keywords_aux l | n :: l -> n :: define_keywords_aux l @@ -570,7 +570,7 @@ let rec define_keywords_aux = function let define_keywords = function Term("IDENT",k)::l -> - prerr_endline ("Defining '"^k^"' as keyword"); + message ("Defining '"^k^"' as keyword"); Lexer.add_token("",k); Term("",k) :: define_keywords_aux l | l -> define_keywords_aux l @@ -755,7 +755,7 @@ let find_precedence lev etyps symbols = error "The level of the leftmost non-terminal cannot be changed" | ETIdent | ETBigint | ETReference -> if lev = None then - Options.if_verbose msgnl (str "Setting notation at level 0") + Flags.if_verbose msgnl (str "Setting notation at level 0") else if lev <> Some 0 then error "A notation starting with an atomic expression must be at level 0"; @@ -763,21 +763,21 @@ let find_precedence lev etyps symbols = | ETPattern | ETOther _ -> (* Give a default ? *) if lev = None then error "Need an explicit level" - else out_some lev + else Option.get lev | ETConstrList _ -> assert false (* internally used in grammar only *) with Not_found -> if lev = None then error "A left-recursive notation must have an explicit level" - else out_some lev) + else Option.get lev) | Terminal _ ::l when (match list_last symbols with Terminal _ -> true |_ -> false) -> if lev = None then - (Options.if_verbose msgnl (str "Setting notation at level 0"); 0) - else out_some lev + (Flags.if_verbose msgnl (str "Setting notation at level 0"); 0) + else Option.get lev | _ -> if lev = None then error "Cannot determine the level"; - out_some lev + Option.get lev let check_curly_brackets_notation_exists () = try let _ = Notation.level_of_notation "{ _ }" in () @@ -839,7 +839,7 @@ let compute_syntax_data (df,modifiers) = (* Registration of notations interpretation *) let load_notation _ (_,(_,scope,pat,onlyparse,_)) = - option_iter Notation.declare_scope scope + Option.iter Notation.declare_scope scope let open_notation i (_,(_,scope,pat,onlyparse,(ntn,df))) = if i=1 & not (Notation.exists_notation_in_scope scope ntn pat) then begin @@ -854,8 +854,8 @@ let cache_notation o = load_notation 1 o; open_notation 1 o -let subst_notation (_,subst,(lc,scope,(metas,pat),b,ndf)) = - (lc,scope,(metas,subst_aconstr subst (List.map fst metas) pat),b,ndf) +let subst_notation (_,subst,(lc,scope,pat,b,ndf)) = + (lc,scope,subst_interpretation subst pat,b,ndf) let classify_notation (_,(local,_,_,_,_ as o)) = if local then Dispose else Substitute o diff --git a/toplevel/metasyntax.mli b/toplevel/metasyntax.mli index 71522567..c3bdadfa 100644 --- a/toplevel/metasyntax.mli +++ b/toplevel/metasyntax.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: metasyntax.mli 7732 2005-12-26 13:51:24Z herbelin $ i*) +(*i $Id: metasyntax.mli 9677 2007-02-24 14:17:54Z herbelin $ i*) (*i*) open Util @@ -51,7 +51,7 @@ val add_syntax_extension : (* Print the Camlp4 state of a grammar *) -val print_grammar : string -> string -> unit +val print_grammar : string -> unit (* Removes quotes in a notation *) diff --git a/toplevel/minicoq.ml b/toplevel/minicoq.ml index a3b51a11..e688d50e 100644 --- a/toplevel/minicoq.ml +++ b/toplevel/minicoq.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: minicoq.ml 8752 2006-04-27 19:37:33Z herbelin $ *) +(* $Id: minicoq.ml 10346 2007-12-05 21:11:19Z aspiwack $ *) open Pp open Util @@ -54,7 +54,7 @@ let check c = let definition id ty c = let c = globalize [] c in - let ty = option_map (globalize []) ty in + let ty = Option.map (globalize []) ty in let ce = { const_entry_body = c; const_entry_type = ty } in let sp = make_path [] id CCI in env := add_constant sp ce (locals()) !env; diff --git a/toplevel/mltop.ml4 b/toplevel/mltop.ml4 index 2185d2a0..30cffa34 100644 --- a/toplevel/mltop.ml4 +++ b/toplevel/mltop.ml4 @@ -6,11 +6,16 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: mltop.ml4 10185 2007-10-06 18:05:13Z herbelin $ *) +(*i camlp4use: "pa_macro.cmo" i*) +(* WARNING + * camlp4deps will not work for this file unless Makefile system enhanced. + *) + +(* $Id: mltop.ml4 10348 2007-12-06 17:36:14Z aspiwack $ *) open Util open Pp -open Options +open Flags open System open Libobject open Library @@ -99,6 +104,10 @@ let dir_ml_load s = (* TO DO: .cma loading without toplevel *) | WithoutTop -> IFDEF Byte THEN + (* WARNING + * if this code section starts to use a module not used elsewhere + * in this file, the Makefile dependency logic needs to be updated. + *) let _,gname = where_in_path !coq_mlpath_copy s in try Dynlink.loadfile gname; diff --git a/toplevel/record.ml b/toplevel/record.ml index ab430d0c..5629bb71 100644 --- a/toplevel/record.ml +++ b/toplevel/record.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: record.ml 9976 2007-07-12 11:58:30Z msozeau $ *) +(* $Id: record.ml 11024 2008-05-30 12:41:39Z msozeau $ *) open Pp open Util @@ -41,15 +41,17 @@ let interp_decl sigma env = function let j = interp_constr_judgment Evd.empty env c in (id,Some j.uj_val, refresh_universes j.uj_type) -let typecheck_params_and_fields ps fs = +let typecheck_params_and_fields id t ps fs = let env0 = Global.env () in - let env1,newps = interp_context Evd.empty env0 ps in + let (env1,newps), _ = interp_context Evd.empty env0 ps in + let fullarity = it_mkProd_or_LetIn t newps in + let env_ar = push_rel_context newps (push_rel (Name id,None,fullarity) env0) in let env2,newfs = List.fold_left (fun (env,newfs) d -> let decl = interp_decl Evd.empty env d in (push_rel decl env, decl::newfs)) - (env1,[]) fs + (env_ar,[]) fs in newps, newfs @@ -75,20 +77,20 @@ let warning_or_error coe indsp err = | BadTypedProj (fi,ctx,te) -> match te with | ElimArity (_,_,_,_,Some (_,_,NonInformativeToInformative)) -> - (str (string_of_id fi) ++ + (pr_id fi ++ str" cannot be defined because it is informative and " ++ Printer.pr_inductive (Global.env()) indsp ++ str " is not.") | ElimArity (_,_,_,_,Some (_,_,StrongEliminationOnNonSmallType)) -> - (str (string_of_id fi) ++ + (pr_id fi ++ str" cannot be defined because it is large and " ++ Printer.pr_inductive (Global.env()) indsp ++ str " is not.") | _ -> - (str " cannot be defined because it is not typable") + (pr_id fi ++ str " cannot be defined because it is not typable") in if coe then errorlabstrm "structure" st; - Options.if_verbose ppnl (hov 0 (str"Warning: " ++ st)) + Flags.if_verbose ppnl (hov 0 (str"Warning: " ++ st)) type field_status = | NoProjection of name @@ -124,15 +126,20 @@ let subst_projection fid l c = raise (NotDefinable (MissingProj (fid,List.rev !bad_projs))); c'' +let instantiate_possibly_recursive_type indsp paramdecls fields = + let subst = list_map_i (fun i _ -> mkRel i) 1 paramdecls in + substl_rel_context (subst@[mkInd indsp]) fields + (* We build projections *) -let declare_projections indsp coers fields = +let declare_projections indsp ?(kind=StructureComponent) ?name coers fields = let env = Global.env() in let (mib,mip) = Global.lookup_inductive indsp in let paramdecls = mib.mind_params_ctxt in let r = mkInd indsp in let rp = applist (r, extended_rel_list 0 paramdecls) in let paramargs = extended_rel_list 1 paramdecls in (*def in [[params;x:rp]]*) - let x = Termops.named_hd (Global.env()) r Anonymous in + let x = match name with Some n -> Name n | None -> Termops.named_hd (Global.env()) r Anonymous in + let fields = instantiate_possibly_recursive_type indsp paramdecls fields in let lifted_fields = lift_rel_context 1 fields in let (_,kinds,sp_projs,_) = List.fold_left2 @@ -152,8 +159,7 @@ let declare_projections indsp coers fields = let ccl' = liftn 1 2 ccl in let p = mkLambda (x, lift 1 rp, ccl') in let branch = it_mkLambda_or_LetIn (mkRel nfi) lifted_fields in - let ci = Inductiveops.make_case_info env indsp - LetStyle [| RegularPat |] in + let ci = Inductiveops.make_case_info env indsp LetStyle in mkCase (ci, p, mkRel 1, [|branch|]) in let proj = it_mkLambda_or_LetIn (mkLambda (x,rp,body)) paramdecls in @@ -165,10 +171,10 @@ let declare_projections indsp coers fields = const_entry_body = proj; const_entry_type = Some projtyp; const_entry_opaque = false; - const_entry_boxed = Options.boxed_definitions() } in - let k = (DefinitionEntry cie,IsDefinition StructureComponent) in + const_entry_boxed = Flags.boxed_definitions() } in + let k = (DefinitionEntry cie,IsDefinition kind) in let kn = declare_internal_constant fid k in - Options.if_verbose message (string_of_id fid ^" is defined"); + Flags.if_verbose message (string_of_id fid ^" is defined"); kn with Type_errors.TypeError (ctx,te) -> raise (NotDefinable (BadTypedProj (fid,ctx,te))) in @@ -199,23 +205,28 @@ let definition_structure ((is_coe,(_,idstruc)),ps,cfs,idbuild,s) = let allnames = idstruc::(List.fold_left extract_name [] fs) in if not (list_distinct allnames) then error "Two objects have the same name"; (* Now, younger decl in params and fields is on top *) - let params,fields = typecheck_params_and_fields ps fs in - let args = extended_rel_list (List.length fields) params in - let ind = applist (mkRel (1+List.length params+List.length fields), args) in + let params,fields = typecheck_params_and_fields idstruc (mkSort s) ps fs in + let nparams = List.length params and nfields = List.length fields in + let args = extended_rel_list nfields params in + let ind = applist (mkRel (1+nparams+nfields), args) in let type_constructor = it_mkProd_or_LetIn ind fields in let mie_ind = { mind_entry_typename = idstruc; mind_entry_arity = mkSort s; mind_entry_consnames = [idbuild]; mind_entry_lc = [type_constructor] } in + let declare_as_coind = + (* CoInd if recursive; otherwise Ind to have compat on _ind schemes *) + dependent (mkRel (nparams+1)) (it_mkProd_or_LetIn mkProp fields) in let mie = { mind_entry_params = List.map degenerate_decl params; mind_entry_record = true; - mind_entry_finite = true; + mind_entry_finite = not declare_as_coind; mind_entry_inds = [mie_ind] } in - let sp = declare_mutual_with_eliminations true mie in - let rsp = (sp,0) in (* This is ind path of idstruc *) + let kn = declare_mutual_with_eliminations true mie [] in + let rsp = (kn,0) in (* This is ind path of idstruc *) let kinds,sp_projs = declare_projections rsp coers fields in let build = ConstructRef (rsp,1) in (* This is construct path of idbuild *) if is_coe then Class.try_add_new_coercion build Global; - Recordops.declare_structure(rsp,idbuild,List.rev kinds,List.rev sp_projs) + Recordops.declare_structure(rsp,idbuild,List.rev kinds,List.rev sp_projs); + kn diff --git a/toplevel/record.mli b/toplevel/record.mli index 66282c20..9642b351 100644 --- a/toplevel/record.mli +++ b/toplevel/record.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: record.mli 6743 2005-02-18 22:14:08Z herbelin $ i*) +(*i $Id: record.mli 11024 2008-05-30 12:41:39Z msozeau $ i*) (*i*) open Names @@ -16,13 +16,13 @@ open Vernacexpr open Topconstr (*i*) -(* [declare_projections ref coers params fields] declare projections of - record [ref] (if allowed), and put them as coercions accordingly to - [coers]; it returns the absolute names of projections *) +(* [declare_projections ref name coers params fields] declare projections of + record [ref] (if allowed) using the given [name] as argument, and put them + as coercions accordingly to [coers]; it returns the absolute names of projections *) val declare_projections : - inductive -> bool list -> rel_context -> bool list * constant option list + inductive -> ?kind:Decl_kinds.definition_object_kind -> ?name:identifier -> bool list -> rel_context -> bool list * constant option list val definition_structure : lident with_coercion * local_binder list * - (local_decl_expr with_coercion) list * identifier * sorts -> unit + (local_decl_expr with_coercion) list * identifier * sorts -> kernel_name diff --git a/toplevel/toplevel.ml b/toplevel/toplevel.ml index fdd30711..42f2883a 100644 --- a/toplevel/toplevel.ml +++ b/toplevel/toplevel.ml @@ -6,11 +6,11 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: toplevel.ml 10087 2007-08-24 10:39:30Z herbelin $ *) +(* $Id: toplevel.ml 10916 2008-05-10 15:38:36Z herbelin $ *) open Pp open Util -open Options +open Flags open Cerrors open Vernac open Pcoq @@ -103,7 +103,7 @@ let get_bols_of_loc ibuf (bp,ep) = lines_rec ll nafter fl in let (fl,ll) = lines_rec ibuf.len ([],None) ibuf.bols in - (fl,out_some ll) + (fl,Option.get ll) let dotted_location (b,e) = if e-b < 3 then @@ -134,18 +134,18 @@ let print_highlight_location ib loc = (l1 ++ li ++ ln) in let loc = make_loc (bp,ep) in - (str"Toplevel input, characters " ++ Cerrors.print_loc loc ++ fnl () ++ + (str"Toplevel input, characters " ++ Cerrors.print_loc loc ++ str":" ++ fnl () ++ highlight_lines ++ fnl ()) (* Functions to report located errors in a file. *) let print_location_in_file s inlibrary fname loc = - let errstrm = (str"Error while reading " ++ str s ++ str" :" ++ fnl ()) in + let errstrm = (str"Error while reading " ++ str s ++ str":") in if loc = dummy_loc then (errstrm ++ str", unknown location." ++ fnl ()) else if inlibrary then - (errstrm ++ str"Module " ++ str ("\""^fname^"\"") ++ + (errstrm ++ fnl () ++ str"Module " ++ str ("\""^fname^"\"") ++ str" characters " ++ Cerrors.print_loc loc ++ fnl ()) else let (bp,ep) = unloc loc in @@ -162,7 +162,7 @@ let print_location_in_file s inlibrary fname loc = close_in ic; (errstrm ++ str"File " ++ str ("\""^fname^"\"") ++ str", line " ++ int line ++ - str", characters " ++ Cerrors.print_loc (make_loc (bp-bol,ep-bol)) ++ fnl ()) + str", characters " ++ Cerrors.print_loc (make_loc (bp-bol,ep-bol)) ++ str":" ++ fnl ()) with e -> (close_in ic; (errstrm ++ str", invalid location." ++ fnl ())) let print_command_location ib dloc = @@ -221,11 +221,9 @@ let make_emacs_prompt() = (fun acc x -> acc ^ (if acc <> "" then "|" else "") ^ Names.string_of_id x) "" pending in let proof_info = if dpth >= 0 then string_of_int dpth else "0" in -(* statnum ^ " |" ^ pendingprompt ^ "| " ^ proof_info ^ " < " ^ (emacs_prompt_endstring()) *) - if !Options.print_emacs then statnum ^ " |" ^ pendingprompt ^ "| " ^ proof_info ^ " < " + if !Flags.print_emacs then statnum ^ " |" ^ pendingprompt ^ "| " ^ proof_info ^ " < " else "" - (* A buffer to store the current command read on stdin. It is * initialized when a vernac command is immediately followed by "\n", * or after a Drop. *) diff --git a/toplevel/vernac.ml b/toplevel/vernac.ml index 0bcf55a8..c331c13b 100644 --- a/toplevel/vernac.ml +++ b/toplevel/vernac.ml @@ -6,14 +6,14 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: vernac.ml 9397 2006-11-21 21:50:54Z herbelin $ *) +(* $Id: vernac.ml 10836 2008-04-23 11:43:58Z courtieu $ *) (* Parsing of vernacular. *) open Pp open Lexer open Util -open Options +open Flags open System open Vernacexpr open Vernacinterp @@ -127,7 +127,7 @@ let rec vernac_com interpfun (loc,com) = (* end translator state *) (* coqdoc state *) let cds = Constrintern.coqdoc_freeze() in - if !Options.translate_file then + if !Flags.translate_file then begin let _,f = find_file_in_path (Library.get_load_paths ()) (make_suffix fname ".v") in @@ -137,13 +137,13 @@ let rec vernac_com interpfun (loc,com) = begin try read_vernac_file verbosely (make_suffix fname ".v"); - if !Options.translate_file then close_out !chan_translate; + if !Flags.translate_file then close_out !chan_translate; chan_translate := ch; Lexer.restore_com_state cs; Pp.comments := cl; Constrintern.coqdoc_unfreeze cds with e -> - if !Options.translate_file then close_out !chan_translate; + if !Flags.translate_file then close_out !chan_translate; chan_translate := ch; Lexer.restore_com_state cs; Pp.comments := cl; @@ -174,11 +174,12 @@ and vernac interpfun input = vernac_com interpfun (parse_phrase input) and read_vernac_file verbosely s = + Flags.make_warn verbosely; let interpfun = if verbosely then Vernacentries.interp else - Options.silently Vernacentries.interp + Flags.silently Vernacentries.interp in let (in_chan, fname, input) = open_file_twice_if verbosely s in try @@ -195,11 +196,13 @@ and read_vernac_file verbosely s = (* raw_do_vernac : char Stream.t -> unit * parses and executes one command of the vernacular char stream. - * Marks the end of the command in the lib_stk to make vernac undoing - * easier. *) + * Marks the end of the command in the lib_stk with a new label to + * make vernac undoing easier. Also freeze state to speed up + * backtracking. *) let raw_do_vernac po = vernac (States.with_heavy_rollback Vernacentries.interp) (po,None); + Lib.add_frozen_state(); Lib.mark_end_of_command() (* XML output hooks *) @@ -212,22 +215,22 @@ let set_xml_end_library f = xml_end_library := f (* Load a vernac file. Errors are annotated with file and location *) let load_vernac verb file = chan_translate := - if !Options.translate_file then open_out (file^"8") else stdout; + if !Flags.translate_file then open_out (file^"8") else stdout; try read_vernac_file verb file; - if !Options.translate_file then close_out !chan_translate; + if !Flags.translate_file then close_out !chan_translate; with e -> - if !Options.translate_file then close_out !chan_translate; + if !Flags.translate_file then close_out !chan_translate; raise_with_file file e (* Compile a vernac file (f is assumed without .v suffix) *) let compile verbosely f = let ldir,long_f_dot_v = Library.start_library f in if !dump then dump_string ("F" ^ Names.string_of_dirpath ldir ^ "\n"); - if !Options.xml_export then !xml_start_library (); + if !Flags.xml_export then !xml_start_library (); let _ = load_vernac verbosely long_f_dot_v in if Pfedit.get_all_proof_names () <> [] then (message "Error: There are pending proofs"; exit 1); - if !Options.xml_export then !xml_end_library (); + if !Flags.xml_export then !xml_end_library (); Library.save_library_to ldir (long_f_dot_v ^ "o") diff --git a/toplevel/vernacentries.ml b/toplevel/vernacentries.ml index dd6d7e25..402f3b34 100644 --- a/toplevel/vernacentries.ml +++ b/toplevel/vernacentries.ml @@ -6,13 +6,13 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: vernacentries.ml 10067 2007-08-09 17:13:16Z msozeau $ i*) +(*i $Id: vernacentries.ml 11065 2008-06-06 22:39:43Z msozeau $ i*) (* Concrete syntax of the mathematical vernacular MV V2.6 *) open Pp open Util -open Options +open Flags open Names open Entries open Nameops @@ -35,6 +35,7 @@ open Decl_kinds open Topconstr open Pretyping open Redexpr +open Syntax_def (* Pcoq hooks *) @@ -44,8 +45,8 @@ type pcoq_hook = { abort : string -> unit; search : searchable -> dir_path list * bool -> unit; print_name : reference -> unit; - print_check : Environ.unsafe_judgment -> unit; - print_eval : (constr -> constr) -> Environ.env -> constr_expr -> + print_check : Environ.env -> Environ.unsafe_judgment -> unit; + print_eval : Reductionops.reduction_function -> Environ.env -> Evd.evar_map -> constr_expr -> Environ.unsafe_judgment -> unit; show_goal : int option -> unit } @@ -58,7 +59,7 @@ let set_pcoq_hook f = pcoq := Some f let cl_of_qualid = function | FunClass -> Classops.CL_FUN | SortClass -> Classops.CL_SORT - | RefClass r -> Class.class_of_global (Nametab.global r) + | RefClass r -> Class.class_of_global (global_with_alias r) (*******************) (* "Show" commands *) @@ -94,7 +95,7 @@ let show_script () = let pts = get_pftreestate () in let pf = proof_of_pftreestate pts and evc = evc_of_pftreestate pts in - msgnl (print_treescript true evc pf) + msgnl_with !Pp_control.deep_ft (print_treescript true evc pf) let show_thesis () = msgnl (anomaly "TODO" ) @@ -272,6 +273,11 @@ let print_located_module r = str "No module is referred to by name ") ++ pr_qualid qid in msgnl msg +let global_with_alias r = + let gr = global_with_alias r in + if !Flags.dump then Constrintern.add_glob (loc_of_reference r) gr; + gr + (**********) (* Syntax *) @@ -284,8 +290,8 @@ let vernac_bind_scope sc cll = let vernac_open_close_scope = Notation.open_close_scope -let vernac_arguments_scope local qid scl = - Notation.declare_arguments_scope local (global qid) scl +let vernac_arguments_scope local r scl = + Notation.declare_arguments_scope local (global_with_alias r) scl let vernac_infix = Metasyntax.add_infix @@ -294,12 +300,31 @@ let vernac_notation = Metasyntax.add_notation (***********) (* Gallina *) -let start_proof_and_print idopt k t hook = - start_proof_com idopt k t hook; +let start_proof_and_print k l hook = + start_proof_com k l hook; print_subgoals (); - if !pcoq <> None then (out_some !pcoq).start_proof () + if !pcoq <> None then (Option.get !pcoq).start_proof () + +let current_dirpath sec = + drop_dirpath_prefix (Lib.library_dp ()) + (if sec then Lib.cwd () + else extract_dirpath_prefix (Lib.sections_depth ()) (Lib.cwd ())) + +let dump_definition (loc, id) sec s = + Flags.dump_string (Printf.sprintf "%s %d %s %s\n" s (fst (unloc loc)) + (string_of_dirpath (current_dirpath sec)) (string_of_id id)) + +let dump_reference loc modpath ident ty = + dump_string (Printf.sprintf "R%d %s %s %s %s\n" + (fst (unloc loc)) (string_of_dirpath (Lib.library_dp ())) modpath ident ty) -let vernac_definition (local,_,_ as k) id def hook = +let dump_constraint ((loc, n), _, _) sec ty = + match n with + | Name id -> dump_definition (loc, id) sec ty + | Anonymous -> () + +let vernac_definition (local,_,_ as k) (_,id as lid) def hook = + if !Flags.dump then dump_definition lid false "def"; match def with | ProveBody (bl,t) -> (* local binders, typ *) if Lib.is_modtype () then @@ -307,7 +332,8 @@ let vernac_definition (local,_,_ as k) id def hook = (str "Proof editing mode not supported in module types") else let hook _ _ = () in - start_proof_and_print (Some id) (local,DefinitionBody Definition) (bl,t) hook + start_proof_and_print (local,DefinitionBody Definition) + [Some lid,(bl,t)] hook | DefineBody (bl,red_option,c,typ_opt) -> let red_option = match red_option with | None -> None @@ -316,7 +342,12 @@ let vernac_definition (local,_,_ as k) id def hook = Some (interp_redexp env evc r) in declare_definition id k bl red_option c typ_opt hook -let vernac_start_proof kind sopt (bl,t) lettop hook = +let vernac_start_proof kind l lettop hook = + if !Flags.dump then + List.iter (fun (id, _) -> + match id with + | Some lid -> dump_definition lid false "prf" + | None -> ()) l; if not(refining ()) then if lettop then errorlabstrm "Vernacentries.StartProof" @@ -324,12 +355,12 @@ let vernac_start_proof kind sopt (bl,t) lettop hook = if Lib.is_modtype () then errorlabstrm "Vernacentries.StartProof" (str "Proof editing mode not supported in module types"); - start_proof_and_print sopt (Global, Proof kind) (bl,t) hook + start_proof_and_print (Global, Proof kind) l hook let vernac_end_proof = function | Admitted -> admit () | Proved (is_opaque,idopt) -> - if not !Options.print_emacs then if_verbose show_script (); + if not !Flags.print_emacs then if_verbose show_script (); match idopt with | None -> save_named is_opaque | Some ((_,id),None) -> save_anonymous is_opaque id @@ -348,14 +379,31 @@ let vernac_exact_proof c = errorlabstrm "Vernacentries.ExactProof" (str "Command 'Proof ...' can only be used at the beginning of the proof") -let vernac_assumption kind l = - List.iter (fun (is_coe,(idl,c)) -> declare_assumption idl is_coe kind [] c) l - -let vernac_inductive f indl = build_mutual indl f - -let vernac_fixpoint = build_recursive - -let vernac_cofixpoint = build_corecursive +let vernac_assumption kind l nl= + let global = fst kind = Global in + List.iter (fun (is_coe,(idl,c)) -> + if !dump then + List.iter (fun lid -> + if global then dump_definition lid false "ax" + else dump_definition lid true "var") idl; + declare_assumption idl is_coe kind [] c false false nl) l + +let vernac_inductive f indl = + if !dump then + List.iter (fun ((lid, _, _, cstrs), _) -> + dump_definition lid false"ind"; + List.iter (fun (_, (lid, _)) -> + dump_definition lid false "constr") cstrs) + indl; + build_mutual indl f + +let vernac_fixpoint l b = + List.iter (fun ((lid, _, _, _, _), _) -> dump_definition lid false "def") l; + build_recursive l b + +let vernac_cofixpoint l b = + List.iter (fun ((lid, _, _, _), _) -> dump_definition lid false "def") l; + build_corecursive l b let vernac_scheme = build_scheme @@ -369,7 +417,7 @@ let vernac_import export refl = List.iter import refl; Lib.add_frozen_state () -let vernac_declare_module export id binders_ast mty_ast_o = +let vernac_declare_module export (loc, id) binders_ast mty_ast_o = (* We check the state of the system (in section, in module type) and what module information is supplied *) if Lib.sections_are_opened () then @@ -381,33 +429,38 @@ let vernac_declare_module export id binders_ast mty_ast_o = "Remove the \"Export\" and \"Import\" keywords from every functor " ^ "argument.") else (idl,ty)) binders_ast in - Declaremods.declare_module + let mp = Declaremods.declare_module Modintern.interp_modtype Modintern.interp_modexpr - id binders_ast (Some mty_ast_o) None; + id binders_ast (Some mty_ast_o) None + in + Modintern.dump_moddef loc mp "mod"; if_verbose message ("Module "^ string_of_id id ^" is declared"); - option_iter (fun export -> vernac_import export [Ident (dummy_loc,id)]) export + Option.iter (fun export -> vernac_import export [Ident (dummy_loc,id)]) export -let vernac_define_module export id binders_ast mty_ast_o mexpr_ast_o = +let vernac_define_module export (loc, id) binders_ast mty_ast_o mexpr_ast_o = (* We check the state of the system (in section, in module type) and what module information is supplied *) if Lib.sections_are_opened () then error "Modules and Module Types are not allowed inside sections"; match mexpr_ast_o with | None -> + check_no_pending_proofs (); let binders_ast,argsexport = List.fold_right (fun (export,idl,ty) (args,argsexport) -> (idl,ty)::args, (List.map (fun (_,i) -> export,i)idl)@argsexport) binders_ast ([],[]) in - Declaremods.start_module Modintern.interp_modtype export - id binders_ast mty_ast_o; - if_verbose message - ("Interactive Module "^ string_of_id id ^" started") ; - List.iter - (fun (export,id) -> - option_iter - (fun export -> vernac_import export [Ident (dummy_loc,id)]) export - ) argsexport + let mp = Declaremods.start_module Modintern.interp_modtype export + id binders_ast mty_ast_o + in + Modintern.dump_moddef loc mp "mod"; + if_verbose message + ("Interactive Module "^ string_of_id id ^" started") ; + List.iter + (fun (export,id) -> + Option.iter + (fun export -> vernac_import export [Ident (dummy_loc,id)]) export + ) argsexport | Some _ -> let binders_ast = List.map (fun (export,idl,ty) -> @@ -416,37 +469,42 @@ let vernac_define_module export id binders_ast mty_ast_o mexpr_ast_o = " the definition is interactive. Remove the \"Export\" and " ^ "\"Import\" keywords from every functor argument.") else (idl,ty)) binders_ast in - Declaremods.declare_module + let mp = Declaremods.declare_module Modintern.interp_modtype Modintern.interp_modexpr - id binders_ast mty_ast_o mexpr_ast_o; - if_verbose message - ("Module "^ string_of_id id ^" is defined"); - option_iter (fun export -> vernac_import export [Ident (dummy_loc,id)]) - export - -let vernac_end_module export id = - Declaremods.end_module id; + id binders_ast mty_ast_o mexpr_ast_o + in + Modintern.dump_moddef loc mp "mod"; + if_verbose message + ("Module "^ string_of_id id ^" is defined"); + Option.iter (fun export -> vernac_import export [Ident (dummy_loc,id)]) + export + +let vernac_end_module export (loc,id) = + let mp = Declaremods.end_module id in + Modintern.dump_modref loc mp "mod"; if_verbose message ("Module "^ string_of_id id ^" is defined") ; - option_iter (fun export -> vernac_import export [Ident (dummy_loc,id)]) export + Option.iter (fun export -> vernac_import export [Ident (dummy_loc,id)]) export -let vernac_declare_module_type id binders_ast mty_ast_o = +let vernac_declare_module_type (loc,id) binders_ast mty_ast_o = if Lib.sections_are_opened () then error "Modules and Module Types are not allowed inside sections"; match mty_ast_o with | None -> + check_no_pending_proofs (); let binders_ast,argsexport = List.fold_right (fun (export,idl,ty) (args,argsexport) -> (idl,ty)::args, List.map (fun (_,i) -> export,i) idl) binders_ast ([],[]) in - Declaremods.start_modtype Modintern.interp_modtype id binders_ast; + let mp = Declaremods.start_modtype Modintern.interp_modtype id binders_ast in + Modintern.dump_moddef loc mp "modtype"; if_verbose message ("Interactive Module Type "^ string_of_id id ^" started"); List.iter (fun (export,id) -> - option_iter + Option.iter (fun export -> vernac_import export [Ident (dummy_loc,id)]) export ) argsexport @@ -458,25 +516,35 @@ let vernac_declare_module_type id binders_ast mty_ast_o = " the definition is interactive. Remove the \"Export\" " ^ "and \"Import\" keywords from every functor argument.") else (idl,ty)) binders_ast in - Declaremods.declare_modtype Modintern.interp_modtype - id binders_ast base_mty; + let mp = Declaremods.declare_modtype Modintern.interp_modtype + id binders_ast base_mty in + Modintern.dump_moddef loc mp "modtype"; if_verbose message ("Module Type "^ string_of_id id ^" is defined") -let vernac_end_modtype id = - Declaremods.end_modtype id; +let vernac_end_modtype (loc,id) = + let mp = Declaremods.end_modtype id in + Modintern.dump_modref loc mp "modtype"; if_verbose message ("Module Type "^ string_of_id id ^" is defined") - +let vernac_include = function + | CIMTE mty_ast -> + Declaremods.declare_include Modintern.interp_modtype mty_ast false + | CIME mexpr_ast -> + Declaremods.declare_include Modintern.interp_modexpr mexpr_ast true + + + (**********************) (* Gallina extensions *) - + let vernac_record struc binders sort nameopt cfs = let const = match nameopt with | None -> add_prefix "Build_" (snd (snd struc)) - | Some (_,id) -> id in + | Some (_,id as lid) -> + if !dump then dump_definition lid false "constr"; id in let sigma = Evd.empty in let env = Global.env() in let s = interp_constr sigma env sort in @@ -485,45 +553,48 @@ let vernac_record struc binders sort nameopt cfs = | Sort s -> s | _ -> user_err_loc (constr_loc sort,"definition_structure", str "Sort expected") in - Record.definition_structure (struc,binders,cfs,const,s) + if !dump then ( + dump_definition (snd struc) false "rec"; + List.iter (fun (_, x) -> + match x with + | AssumExpr ((loc, Name id), _) -> dump_definition (loc,id) false "proj" + | _ -> ()) cfs); + ignore(Record.definition_structure (struc,binders,cfs,const,s)) (* Sections *) -let vernac_begin_section = Lib.open_section -let vernac_end_section = Lib.close_section +let vernac_begin_section (_, id as lid) = + check_no_pending_proofs (); + if !Flags.dump then dump_definition lid true "sec"; + Lib.open_section id + +let vernac_end_section (loc, id) = + if !Flags.dump then + dump_reference loc + (string_of_dirpath (current_dirpath true)) "<>" "sec"; + Lib.close_section id -let vernac_end_segment id = +let vernac_end_segment lid = check_no_pending_proofs (); let o = try Lib.what_is_opened () with Not_found -> error "There is nothing to end." in match o with - | _,Lib.OpenedModule (export,_,_) -> vernac_end_module export id - | _,Lib.OpenedModtype _ -> vernac_end_modtype id - | _,Lib.OpenedSection _ -> vernac_end_section id + | _,Lib.OpenedModule (export,_,_) -> vernac_end_module export lid + | _,Lib.OpenedModtype _ -> vernac_end_modtype lid + | _,Lib.OpenedSection _ -> vernac_end_section lid | _ -> anomaly "No more opened things" let vernac_require import _ qidl = let qidl = List.map qualid_of_reference qidl in Library.require_library qidl import -let vernac_canonical locqid = - Recordops.declare_canonical_structure (Nametab.global locqid) - -let locate_reference ref = - let (loc,qid) = qualid_of_reference ref in - try match Nametab.extended_locate qid with - | TrueGlobal ref -> ref - | SyntacticDef kn -> - match Syntax_def.search_syntactic_definition loc kn with - | Rawterm.RRef (_,ref) -> ref - | _ -> raise Not_found - with Not_found -> - error_global_not_found_loc loc qid +let vernac_canonical r = + Recordops.declare_canonical_structure (global_with_alias r) let vernac_coercion stre ref qids qidt = let target = cl_of_qualid qidt in let source = cl_of_qualid qids in - let ref' = locate_reference ref in + let ref' = global_with_alias ref in Class.try_add_new_coercion_with_target ref' stre source target; if_verbose message ((string_of_reference ref) ^ " is now a coercion") @@ -532,6 +603,24 @@ let vernac_identity_coercion stre id qids qidt = let source = cl_of_qualid qids in Class.try_add_new_identity_coercion id stre source target +(* Type classes *) +let vernac_class id par ar sup props = + if !dump then ( + dump_definition id false "class"; + List.iter (fun (lid, _, _) -> dump_definition lid false "meth") props); + Classes.new_class id par ar sup props + +let vernac_instance glob sup inst props pri = + if !dump then dump_constraint inst false "inst"; + ignore(Classes.new_instance ~global:glob sup inst props pri) + +let vernac_context l = + if !dump then List.iter (fun x -> dump_constraint x true "var") l; + Classes.context l + +let vernac_declare_instance id = + if !dump then dump_definition id false "inst"; + Classes.declare_instance false id (***********) (* Solving *) @@ -547,12 +636,12 @@ let vernac_solve n tcom b = (* in case a strict subtree was completed, go back to the top of the prooftree *) if subtree_solved () then begin - Options.if_verbose msgnl (str "Subgoal proved"); + Flags.if_verbose msgnl (str "Subgoal proved"); make_focus 0; reset_top_of_script () end; print_subgoals(); - if !pcoq <> None then (out_some !pcoq).solve n + if !pcoq <> None then (Option.get !pcoq).solve n (* A command which should be a tactic. It has been added by Christine to patch an error in the design of the proof @@ -664,13 +753,16 @@ let vernac_declare_tactic_definition = Tacinterp.add_tacdef let vernac_hints = Auto.add_hints -let vernac_syntactic_definition = Command.syntax_definition - -let vernac_declare_implicits local locqid = function +let vernac_syntactic_definition lid = + dump_definition lid false "syndef"; + Command.syntax_definition (snd lid) + +let vernac_declare_implicits local r = function | Some imps -> - Impargs.declare_manual_implicits local (Nametab.global locqid) imps + Impargs.declare_manual_implicits local (global_with_alias r) false + (List.map (fun (ex,b,f) -> ex, (b,f)) imps) | None -> - Impargs.declare_implicits local (Nametab.global locqid) + Impargs.declare_implicits local (global_with_alias r) let vernac_reserve idl c = let t = Constrintern.interp_type Evd.empty (Global.env()) c in @@ -706,6 +798,14 @@ let _ = optread = Impargs.is_strict_implicit_args; optwrite = Impargs.make_strict_implicit_args } +let _ = + declare_bool_option + { optsync = true; + optname = "strong strict implicit arguments"; + optkey = (TertiaryTable ("Strongly","Strict","Implicit")); + optread = Impargs.is_strongly_strict_implicit_args; + optwrite = Impargs.make_strongly_strict_implicit_args } + let _ = declare_bool_option { optsync = true; @@ -714,6 +814,30 @@ let _ = optread = Impargs.is_contextual_implicit_args; optwrite = Impargs.make_contextual_implicit_args } +(* let _ = *) +(* declare_bool_option *) +(* { optsync = true; *) +(* optname = "forceable implicit arguments"; *) +(* optkey = (SecondaryTable ("Forceable","Implicit")); *) +(* optread = Impargs.is_forceable_implicit_args; *) +(* optwrite = Impargs.make_forceable_implicit_args } *) + +let _ = + declare_bool_option + { optsync = true; + optname = "implicit arguments defensive printing"; + optkey = (TertiaryTable ("Reversible","Pattern","Implicit")); + optread = Impargs.is_reversible_pattern_implicit_args; + optwrite = Impargs.make_reversible_pattern_implicit_args } + +let _ = + declare_bool_option + { optsync = true; + optname = "maximal insertion of implicit"; + optkey = (TertiaryTable ("Maximal","Implicit","Insertion")); + optread = Impargs.is_maximal_implicit_args; + optwrite = Impargs.make_maximal_implicit_args } + let _ = declare_bool_option { optsync = true; @@ -722,6 +846,13 @@ let _ = optread = (fun () -> !Constrextern.print_coercions); optwrite = (fun b -> Constrextern.print_coercions := b) } +let _ = + declare_bool_option + { optsync = true; + optname = "printing of existential variable instances"; + optkey = (TertiaryTable ("Printing","Existential","Instances")); + optread = (fun () -> !Constrextern.print_evar_arguments); + optwrite = (:=) Constrextern.print_evar_arguments } let _ = declare_bool_option { optsync = true; @@ -730,6 +861,14 @@ let _ = optread = (fun () -> !Constrextern.print_implicits); optwrite = (fun b -> Constrextern.print_implicits := b) } +let _ = + declare_bool_option + { optsync = true; + optname = "implicit arguments defensive printing"; + optkey = (TertiaryTable ("Printing","Implicit","Defensive")); + optread = (fun () -> !Constrextern.print_implicits_defensive); + optwrite = (fun b -> Constrextern.print_implicits_defensive := b) } + let _ = declare_bool_option { optsync = true; @@ -751,8 +890,8 @@ let _ = { optsync = true; optname = "raw printing"; optkey = (SecondaryTable ("Printing","All")); - optread = (fun () -> !Options.raw_print); - optwrite = (fun b -> Options.raw_print := b) } + optread = (fun () -> !Flags.raw_print); + optwrite = (fun b -> Flags.raw_print := b) } let _ = declare_bool_option @@ -767,8 +906,8 @@ let _ = { optsync = true; optname = "use of boxed definitions"; optkey = (SecondaryTable ("Boxed","Definitions")); - optread = Options.boxed_definitions; - optwrite = (fun b -> Options.set_boxed_definitions b) } + optread = Flags.boxed_definitions; + optwrite = (fun b -> Flags.set_boxed_definitions b) } let _ = declare_bool_option @@ -791,8 +930,8 @@ let _ = { optsync=false; optkey=SecondaryTable("Hyps","Limit"); optname="the hypotheses limit"; - optread=Options.print_hyps_limit; - optwrite=Options.set_print_hyps_limit } + optread=Flags.print_hyps_limit; + optwrite=Flags.set_print_hyps_limit } let _ = declare_int_option @@ -814,7 +953,7 @@ let _ = declare_bool_option { optsync=true; optkey=SecondaryTable("Printing","Universes"); - optname="the printing of universes"; + optname="printing of universes"; optread=(fun () -> !Constrextern.print_universes); optwrite=(fun b -> Constrextern.print_universes:=b) } @@ -829,15 +968,15 @@ let _ = optread=(fun () -> get_debug () <> Tactic_debug.DebugOff); optwrite=vernac_debug } -let vernac_set_opacity opaq locqid = - match Nametab.global locqid with - | ConstRef sp -> - if opaq then set_opaque_const sp - else set_transparent_const sp - | VarRef id -> - if opaq then set_opaque_var id - else set_transparent_var id - | _ -> error "cannot set an inductive type or a constructor as transparent" +let vernac_set_opacity local str = + let glob_ref r = + match global_with_alias r with + | ConstRef sp -> EvalConstRef sp + | VarRef id -> EvalVarRef id + | _ -> error + "cannot set an inductive type or a constructor as transparent" in + let str = List.map (fun (lev,ql) -> (lev,List.map glob_ref ql)) str in + Redexpr.set_strategy local str let vernac_set_option key = function | StringValue s -> set_string_option_value key s @@ -888,13 +1027,13 @@ let vernac_check_may_eval redexp glopt rc = let j = Typeops.typing env c in match redexp with | None -> - if !pcoq <> None then (out_some !pcoq).print_check j + if !pcoq <> None then (Option.get !pcoq).print_check env j else msg (print_judgment env j) | Some r -> let redfun = fst (reduction_of_red_expr (interp_redexp env evmap r)) in if !pcoq <> None - then (out_some !pcoq).print_eval (redfun env evmap) env rc j - else msg (print_eval redfun env j) + then (Option.get !pcoq).print_eval redfun env evmap rc j + else msg (print_eval redfun env evmap rc j) (* The same but avoiding the current goal context if any *) let vernac_global_check c = @@ -910,7 +1049,7 @@ let vernac_print = function | PrintFullContext -> msg (print_full_context_typ ()) | PrintSectionContext qid -> msg (print_sec_context_typ qid) | PrintInspect n -> msg (inspect n) - | PrintGrammar (uni,ent) -> Metasyntax.print_grammar uni ent + | PrintGrammar ent -> Metasyntax.print_grammar ent | PrintLoadPath -> (* For compatibility ? *) print_loadpath () | PrintModules -> msg (print_modules ()) | PrintModule qid -> print_module qid @@ -918,11 +1057,13 @@ let vernac_print = function | PrintMLLoadPath -> Mltop.print_ml_path () | PrintMLModules -> Mltop.print_ml_modules () | PrintName qid -> - if !pcoq <> None then (out_some !pcoq).print_name qid + if !pcoq <> None then (Option.get !pcoq).print_name qid else msg (print_name qid) | PrintOpaqueName qid -> msg (print_opaque_name qid) | PrintGraph -> ppnl (Prettyp.print_graph()) | PrintClasses -> ppnl (Prettyp.print_classes()) + | PrintTypeClasses -> ppnl (Prettyp.print_typeclasses()) + | PrintInstances c -> ppnl (Prettyp.print_instances (global c)) | PrintLtac qid -> ppnl (Tacinterp.print_ltac (snd (qualid_of_reference qid))) | PrintCoercions -> ppnl (Prettyp.print_coercions()) | PrintCoercionPaths (cls,clt) -> @@ -930,7 +1071,7 @@ let vernac_print = function | PrintCanonicalConversions -> ppnl (Prettyp.print_canonical_projections ()) | PrintUniverses None -> pp (Univ.pr_universes (Global.universes ())) | PrintUniverses (Some s) -> dump_universes s - | PrintHint qid -> Auto.print_hint_ref (Nametab.global qid) + | PrintHint r -> Auto.print_hint_ref (global_with_alias r) | PrintHintGoal -> Auto.print_applicable_hint () | PrintHintDbName s -> Auto.print_hint_db_by_name s | PrintRewriteHintDbName s -> Autorewrite.print_rewrite_hintdb s @@ -944,6 +1085,11 @@ let vernac_print = function pp (Notation.pr_visibility (Constrextern.without_symbols pr_lrawconstr) s) | PrintAbout qid -> msgnl (print_about qid) | PrintImplicit qid -> msg (print_impargs qid) +(*spiwack: prints all the axioms and section variables used by a term *) + | PrintAssumptions r -> + let cstr = constr_of_global (global_with_alias r) in + let nassumptions = Environ.assumptions cstr (Global.env ()) in + msg (Printer.pr_assumptionset (Global.env ()) nassumptions) let global_module r = let (loc,qid) = qualid_of_reference r in @@ -959,12 +1105,12 @@ let interp_search_restriction = function open Search let interp_search_about_item = function - | SearchRef qid -> GlobSearchRef (Nametab.global qid) + | SearchRef r -> GlobSearchRef (global_with_alias r) | SearchString s -> GlobSearchString s let vernac_search s r = let r = interp_search_restriction r in - if !pcoq <> None then (out_some !pcoq).search s r else + if !pcoq <> None then (Option.get !pcoq).search s r else match s with | SearchPattern c -> let _,pat = interp_constrpattern Evd.empty (Global.env()) c in @@ -972,8 +1118,8 @@ let vernac_search s r = | SearchRewrite c -> let _,pat = interp_constrpattern Evd.empty (Global.env()) c in Search.search_rewrite pat r - | SearchHead locqid -> - Search.search_by_head (Nametab.global locqid) r + | SearchHead ref -> + Search.search_by_head (global_with_alias ref) r | SearchAbout sl -> Search.search_about (List.map interp_search_about_item sl) r @@ -994,7 +1140,7 @@ let vernac_goal = function | Some c -> if not (refining()) then begin let unnamed_kind = Lemma (* Arbitrary *) in - start_proof_com None (Global, Proof unnamed_kind) c (fun _ _ ->()); + start_proof_com (Global, Proof unnamed_kind) [None,c] (fun _ _ ->()); print_subgoals () end else error "repeated Goal not permitted in refining mode" @@ -1003,12 +1149,12 @@ let vernac_abort = function | None -> delete_current_proof (); if_verbose message "Current goal aborted"; - if !pcoq <> None then (out_some !pcoq).abort "" + if !pcoq <> None then (Option.get !pcoq).abort "" | Some id -> delete_proof id; let s = string_of_id (snd id) in if_verbose message ("Goal "^s^" aborted"); - if !pcoq <> None then (out_some !pcoq).abort s + if !pcoq <> None then (Option.get !pcoq).abort s let vernac_abort_all () = if refining() then begin @@ -1078,7 +1224,7 @@ let explain_tree occ = let vernac_show = function | ShowGoal nopt -> - if !pcoq <> None then (out_some !pcoq).show_goal nopt + if !pcoq <> None then (Option.get !pcoq).show_goal nopt else msg (match nopt with | None -> pr_open_subgoals () | Some n -> pr_nth_open_subgoal n) @@ -1116,7 +1262,7 @@ let vernac_check_guard () = let interp c = match c with (* Control (done in vernac) *) - | (VernacTime _ | VernacVar _ | VernacList _ | VernacLoad _) -> assert false + | (VernacTime _ | VernacList _ | VernacLoad _) -> assert false (* Syntax *) | VernacTacticNotation (n,r,e) -> Metasyntax.add_tactic_notation (n,r,e) @@ -1129,12 +1275,11 @@ let interp c = match c with | VernacNotation (local,c,infpl,sc) -> vernac_notation local c infpl sc (* Gallina *) - | VernacDefinition (k,(_,id),d,f) -> vernac_definition k id d f - | VernacStartTheoremProof (k,(_,id),t,top,f) -> - vernac_start_proof k (Some id) t top f + | VernacDefinition (k,lid,d,f) -> vernac_definition k lid d f + | VernacStartTheoremProof (k,l,top,f) -> vernac_start_proof k l top f | VernacEndProof e -> vernac_end_proof e | VernacExactProof c -> vernac_exact_proof c - | VernacAssumption (stre,l) -> vernac_assumption stre l + | VernacAssumption (stre,nl,l) -> vernac_assumption stre l nl | VernacInductive (finite,l) -> vernac_inductive finite l | VernacFixpoint (l,b) -> vernac_fixpoint l b | VernacCoFixpoint (l,b) -> vernac_cofixpoint l b @@ -1142,17 +1287,18 @@ let interp c = match c with | VernacCombinedScheme (id, l) -> vernac_combined_scheme id l (* Modules *) - | VernacDeclareModule (export,(_,id),bl,mtyo) -> - vernac_declare_module export id bl mtyo - | VernacDefineModule (export,(_,id),bl,mtyo,mexpro) -> - vernac_define_module export id bl mtyo mexpro - | VernacDeclareModuleType ((_,id),bl,mtyo) -> - vernac_declare_module_type id bl mtyo - + | VernacDeclareModule (export,lid,bl,mtyo) -> + vernac_declare_module export lid bl mtyo + | VernacDefineModule (export,lid,bl,mtyo,mexpro) -> + vernac_define_module export lid bl mtyo mexpro + | VernacDeclareModuleType (lid,bl,mtyo) -> + vernac_declare_module_type lid bl mtyo + | VernacInclude (in_ast) -> + vernac_include in_ast (* Gallina extensions *) - | VernacBeginSection (_,id) -> vernac_begin_section id + | VernacBeginSection lid -> vernac_begin_section lid - | VernacEndSegment (_,id) -> vernac_end_segment id + | VernacEndSegment lid -> vernac_end_segment lid | VernacRecord (_,id,bl,s,idopt,fs) -> vernac_record id bl s idopt fs | VernacRequire (export,spec,qidl) -> vernac_require export spec qidl @@ -1161,6 +1307,13 @@ let interp c = match c with | VernacCoercion (str,r,s,t) -> vernac_coercion str r s t | VernacIdentityCoercion (str,(_,id),s,t) -> vernac_identity_coercion str id s t + (* Type classes *) + | VernacClass (id, par, ar, sup, props) -> vernac_class id par ar sup props + + | VernacInstance (glob, sup, inst, props, pri) -> vernac_instance glob sup inst props pri + | VernacContext sup -> vernac_context sup + | VernacDeclareInstance id -> vernac_declare_instance id + (* Solving *) | VernacSolve (n,tac,b) -> vernac_solve n tac b | VernacSolveExistential (n,c) -> vernac_solve_existential n c @@ -1186,6 +1339,7 @@ let interp c = match c with | VernacRestoreState s -> vernac_restore_state s (* Resetting *) + | VernacRemoveName id -> Lib.remove_name id | VernacResetName id -> vernac_reset_name id | VernacResetInitial -> vernac_reset_initial () | VernacBack n -> vernac_back n @@ -1197,7 +1351,7 @@ let interp c = match c with | VernacSyntacticDefinition (id,c,l,b) ->vernac_syntactic_definition id c l b | VernacDeclareImplicits (local,qid,l) ->vernac_declare_implicits local qid l | VernacReserve (idl,c) -> vernac_reserve idl c - | VernacSetOpacity (opaq, qidl) -> List.iter (vernac_set_opacity opaq) qidl + | VernacSetOpacity (local,qidl) -> vernac_set_opacity local qidl | VernacSetOption (key,v) -> vernac_set_option key v | VernacUnsetOption key -> vernac_unset_option key | VernacRemoveOption (key,v) -> vernac_remove_option key v @@ -1213,13 +1367,14 @@ let interp c = match c with | VernacNop -> () (* Proof management *) - | VernacGoal t -> vernac_start_proof Theorem None ([],t) false (fun _ _ ->()) + | VernacGoal t -> vernac_start_proof Theorem [None,([],t)] false (fun _ _->()) | VernacAbort id -> vernac_abort id | VernacAbortAll -> vernac_abort_all () | VernacRestart -> vernac_restart () | VernacSuspend -> vernac_suspend () | VernacResume id -> vernac_resume id | VernacUndo n -> vernac_undo n + | VernacUndoTo n -> undo_todepth n | VernacBacktrack (snum,pnum,naborts) -> vernac_backtrack snum pnum naborts | VernacFocus n -> vernac_focus n | VernacUnfocus -> vernac_unfocus () diff --git a/toplevel/vernacentries.mli b/toplevel/vernacentries.mli index bcd89490..8afb783b 100644 --- a/toplevel/vernacentries.mli +++ b/toplevel/vernacentries.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: vernacentries.mli 8781 2006-05-03 10:15:05Z jforest $ i*) +(*i $Id: vernacentries.mli 10580 2008-02-22 13:39:13Z lmamane $ i*) (*i*) open Names @@ -39,14 +39,15 @@ type pcoq_hook = { abort : string -> unit; search : searchable -> dir_path list * bool -> unit; print_name : Libnames.reference -> unit; - print_check : Environ.unsafe_judgment -> unit; - print_eval : (constr -> constr) -> Environ.env -> constr_expr -> Environ.unsafe_judgment -> unit; + print_check : Environ.env -> Environ.unsafe_judgment -> unit; + print_eval : Reductionops.reduction_function -> Environ.env -> Evd.evar_map -> constr_expr -> + Environ.unsafe_judgment -> unit; show_goal : int option -> unit } val set_pcoq_hook : pcoq_hook -> unit -(* This function makes sure that the function given is argument is preceded +(* This function makes sure that the function given in argument is preceded by a command aborting all proofs if necessary. It is used in pcoq. *) val abort_refine : ('a -> unit) -> 'a -> unit;; diff --git a/toplevel/vernacexpr.ml b/toplevel/vernacexpr.ml index 9f51841d..744c3a6f 100644 --- a/toplevel/vernacexpr.ml +++ b/toplevel/vernacexpr.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: vernacexpr.ml 10067 2007-08-09 17:13:16Z msozeau $ i*) +(*i $Id: vernacexpr.ml 11024 2008-05-30 12:41:39Z msozeau $ i*) open Util open Names @@ -37,7 +37,7 @@ type printable = | PrintFullContext | PrintSectionContext of reference | PrintInspect of int - | PrintGrammar of string * string + | PrintGrammar of string | PrintLoadPath | PrintModules | PrintModule of reference @@ -48,6 +48,8 @@ type printable = | PrintOpaqueName of reference | PrintGraph | PrintClasses + | PrintTypeClasses + | PrintInstances of reference | PrintLtac of reference | PrintCoercions | PrintCoercionPaths of class_rawexpr * class_rawexpr @@ -64,6 +66,7 @@ type printable = | PrintVisibility of string option | PrintAbout of reference | PrintImplicit of reference + | PrintAssumptions of reference type search_about_item = | SearchRef of reference @@ -109,7 +112,7 @@ type comment = | CommentInt of int type hints = - | HintsResolve of constr_expr list + | HintsResolve of (int option * constr_expr) list | HintsImmediate of constr_expr list | HintsUnfold of reference list | HintsConstructors of reference list @@ -144,10 +147,12 @@ type sort_expr = Rawterm.rawsort type decl_notation = (string * constr_expr * scope_name option) option type simple_binder = lident list * constr_expr +type class_binder = lident * constr_expr list type 'a with_coercion = coercion_flag * 'a type constructor_expr = (lident * constr_expr) with_coercion type inductive_expr = lident * local_binder list * constr_expr * constructor_expr list + type definition_expr = | ProveBody of local_binder list * constr_expr | DefineBody of local_binder list * raw_red_expr option * constr_expr @@ -167,12 +172,15 @@ type proof_end = | Admitted | Proved of opacity_flag * (lident * theorem_kind option) option +type scheme = + | InductionScheme of bool * lreference * sort_expr + | EqualityScheme of lreference + type vernac_expr = (* Control *) | VernacList of located_vernac_expr list | VernacLoad of verbose_flag * lstring | VernacTime of vernac_expr - | VernacVar of lident (* Syntax *) | VernacTacticNotation of int * grammar_production list * raw_tactic_expr @@ -190,15 +198,16 @@ type vernac_expr = (* Gallina *) | VernacDefinition of definition_kind * lident * definition_expr * declaration_hook - | VernacStartTheoremProof of theorem_kind * lident * - (local_binder list * constr_expr) * bool * declaration_hook + | VernacStartTheoremProof of theorem_kind * + (lident option * (local_binder list * constr_expr)) list * + bool * declaration_hook | VernacEndProof of proof_end | VernacExactProof of constr_expr - | VernacAssumption of assumption_kind * simple_binder with_coercion list + | VernacAssumption of assumption_kind * bool * simple_binder with_coercion list | VernacInductive of inductive_flag * (inductive_expr * decl_notation) list | VernacFixpoint of (fixpoint_expr * decl_notation) list * bool | VernacCoFixpoint of (cofixpoint_expr * decl_notation) list * bool - | VernacScheme of (lident * bool * lreference * sort_expr) list + | VernacScheme of (lident option * scheme) list | VernacCombinedScheme of lident * lident list (* Gallina extensions *) @@ -211,10 +220,30 @@ type vernac_expr = export_flag option * specif_flag option * lreference list | VernacImport of export_flag * lreference list | VernacCanonical of lreference - | VernacCoercion of strength * lreference * class_rawexpr * class_rawexpr - | VernacIdentityCoercion of strength * lident * + | VernacCoercion of locality * lreference * class_rawexpr * class_rawexpr + | VernacIdentityCoercion of locality * lident * class_rawexpr * class_rawexpr + (* Type classes *) + | VernacClass of + lident * (* name *) + local_binder list * (* params *) + sort_expr located option * (* arity *) + local_binder list * (* constraints *) + (lident * bool * constr_expr) list (* props, with substructure hints *) + + | VernacInstance of + bool * (* global *) + local_binder list * (* super *) + typeclass_constraint * (* instance name, class name, params *) + (lident * lident list * constr_expr) list * (* props *) + int option (* Priority *) + + | VernacContext of typeclass_context + + | VernacDeclareInstance of + lident (* instance name *) + (* Modules and Module Types *) | VernacDeclareModule of bool option * lident * module_binder list * (module_type_ast * bool) @@ -222,6 +251,7 @@ type vernac_expr = module_binder list * (module_type_ast * bool) option * module_ast option | VernacDeclareModuleType of lident * module_binder list * module_type_ast option + | VernacInclude of include_ast (* Solving *) @@ -248,6 +278,7 @@ type vernac_expr = | VernacRestoreState of lstring (* Resetting *) + | VernacRemoveName of lident | VernacResetName of lident | VernacResetInitial | VernacBack of int @@ -255,14 +286,15 @@ type vernac_expr = (* Commands *) | VernacDeclareTacticDefinition of - rec_flag * (lident * raw_tactic_expr) list + rec_flag * (reference * bool * raw_tactic_expr) list | VernacHints of locality_flag * lstring list * hints - | VernacSyntacticDefinition of identifier * constr_expr * locality_flag * - onlyparsing_flag - | VernacDeclareImplicits of locality_flag * lreference * - explicitation list option + | VernacSyntacticDefinition of identifier located * (identifier list * constr_expr) * + locality_flag * onlyparsing_flag + | VernacDeclareImplicits of locality_flag * lreference * + (explicitation * bool * bool) list option | VernacReserve of lident list * constr_expr - | VernacSetOpacity of opacity_flag * lreference list + | VernacSetOpacity of + locality_flag * (Conv_oracle.level * lreference list) list | VernacUnsetOption of Goptions.option_name | VernacSetOption of Goptions.option_name * option_value | VernacAddOption of Goptions.option_name * option_ref_value list @@ -285,6 +317,7 @@ type vernac_expr = | VernacSuspend | VernacResume of lident option | VernacUndo of int + | VernacUndoTo of int | VernacBacktrack of int*int*int | VernacFocus of int option | VernacUnfocus diff --git a/toplevel/vernacinterp.ml b/toplevel/vernacinterp.ml index 98584bac..f43c0c5e 100644 --- a/toplevel/vernacinterp.ml +++ b/toplevel/vernacinterp.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: vernacinterp.ml 7732 2005-12-26 13:51:24Z herbelin $ *) +(* $Id: vernacinterp.ml 10348 2007-12-06 17:36:14Z aspiwack $ *) open Pp open Util @@ -64,7 +64,7 @@ let call (opn,converted_args) = | Drop -> raise Drop | ProtectedLoop -> raise ProtectedLoop | e -> - if !Options.debug then + if !Flags.debug then msgnl (str"Vernac Interpreter " ++ str !loc); raise e diff --git a/toplevel/whelp.ml4 b/toplevel/whelp.ml4 index b067ba1f..58703c8e 100644 --- a/toplevel/whelp.ml4 +++ b/toplevel/whelp.ml4 @@ -8,9 +8,9 @@ (*i camlp4deps: "parsing/grammar.cma" i*) -(* $Id: whelp.ml4 10105 2007-08-30 16:53:32Z herbelin $ *) +(* $Id: whelp.ml4 10904 2008-05-08 16:31:26Z herbelin $ *) -open Options +open Flags open Pp open Util open System @@ -28,6 +28,7 @@ open Command open Pfedit open Refiner open Tacmach +open Syntax_def (* Coq interface to the Whelp query engine developed at the University of Bologna *) @@ -150,12 +151,12 @@ let rec uri_of_constr c = let inst,rest = merge (section_parameters f) args in uri_of_constr f; url_char ' '; uri_params uri_of_constr inst; url_list_with_sep " " uri_of_constr rest - | RLambda (_,na,ty,c) -> + | RLambda (_,na,k,ty,c) -> url_string "\\lambda "; url_of_name na; url_string ":"; uri_of_constr ty; url_string "."; uri_of_constr c - | RProd (_,Anonymous,ty,c) -> + | RProd (_,Anonymous,k,ty,c) -> uri_of_constr ty; url_string "\\to "; uri_of_constr c - | RProd (_,Name id,ty,c) -> + | RProd (_,Name id,k,ty,c) -> url_string "\\forall "; url_id id; url_string ":"; uri_of_constr ty; url_string "."; uri_of_constr c | RLetIn (_,na,b,c) -> @@ -174,7 +175,7 @@ let make_string f x = Buffer.reset b; f x; Buffer.contents b let send_whelp req s = let url = make_whelp_request req s in - let command = (fst browser_cmd_fmt) ^ url ^ (snd browser_cmd_fmt) in + let command = subst_command_placeholder browser_cmd_fmt url in let _ = run_command (fun x -> x) print_string command in () let whelp_constr req c = @@ -192,13 +193,6 @@ let whelp_locate s = let whelp_elim ind = send_whelp "elim" (make_string uri_of_global (IndRef ind)) -let locate_inductive r = - let (loc,qid) = qualid_of_reference r in - try match Syntax_def.locate_global qid with - | IndRef ind -> ind - | _ -> user_err_loc (loc,"",str "Inductive type expected") - with Not_found -> error_global_not_found_loc loc qid - let on_goal f = let gls = nth_goal_of_pftreestate 1 (get_pftreestate ()) in f (it_mkNamedProd_or_LetIn (pf_concl gls) (pf_hyps gls)) @@ -221,7 +215,7 @@ END VERNAC COMMAND EXTEND Whelp | [ "Whelp" "Locate" string(s) ] -> [ whelp_locate s ] | [ "Whelp" "Locate" preident(s) ] -> [ whelp_locate s ] -| [ "Whelp" "Elim" global(r) ] -> [ whelp_elim (locate_inductive r) ] +| [ "Whelp" "Elim" global(r) ] -> [ whelp_elim (inductive_of_reference_with_alias r) ] | [ "Whelp" whelp_constr_request(req) constr(c) ] -> [ whelp_constr_expr req c] END -- cgit v1.2.3